From 8a2681fa7ee14c49235e12318f7de5a9a7f492ea Mon Sep 17 00:00:00 2001 From: kan Date: Sat, 19 May 2007 02:42:17 +0000 Subject: Remove files that are no more part of GCC distribution from FSF branch. --- contrib/gcc/ChangeLog.0 | 13011 ----------- contrib/gcc/ChangeLog.1 | 15903 -------------- contrib/gcc/ChangeLog.10 | 16352 -------------- contrib/gcc/ChangeLog.2 | 14469 ------------- contrib/gcc/ChangeLog.3 | 16860 --------------- contrib/gcc/ChangeLog.4 | 15261 ------------- contrib/gcc/ChangeLog.5 | 14446 ------------- contrib/gcc/ChangeLog.6 | 19208 ----------------- contrib/gcc/ChangeLog.7 | 21543 ------------------- contrib/gcc/ChangeLog.8 | 14448 ------------- contrib/gcc/ChangeLog.9 | 21488 ------------------- contrib/gcc/README-fixinc | 14 - contrib/gcc/ansidecl.h | 324 - contrib/gcc/c-parse.in | 3789 ---- contrib/gcc/choose-temp.c | 72 - contrib/gcc/concat.c | 236 - contrib/gcc/config/alpha/alpha-modes.def | 23 - contrib/gcc/config/alpha/alpha-protos.h | 123 - contrib/gcc/config/alpha/alpha.c | 10308 --------- contrib/gcc/config/alpha/alpha.h | 1843 -- contrib/gcc/config/alpha/alpha.md | 8099 ------- contrib/gcc/config/alpha/crtfastmath.c | 46 - contrib/gcc/config/alpha/elf.h | 457 - 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 | 96 - contrib/gcc/config/alpha/gnu.h | 26 - contrib/gcc/config/alpha/lib1funcs.asm | 320 - contrib/gcc/config/alpha/linux-elf.h | 45 - contrib/gcc/config/alpha/linux.h | 124 - contrib/gcc/config/alpha/netbsd.h | 83 - contrib/gcc/config/alpha/openbsd.h | 99 - contrib/gcc/config/alpha/osf.h | 214 - contrib/gcc/config/alpha/osf5.h | 53 - contrib/gcc/config/alpha/qrnnd.asm | 167 - contrib/gcc/config/alpha/t-alpha | 2 - contrib/gcc/config/alpha/t-crtfm | 5 - contrib/gcc/config/alpha/t-ieee | 2 - contrib/gcc/config/alpha/t-osf-pthread | 5 - contrib/gcc/config/alpha/t-osf4 | 30 - contrib/gcc/config/alpha/t-unicosmk | 2 - contrib/gcc/config/alpha/t-vms | 26 - contrib/gcc/config/alpha/t-vms64 | 8 - contrib/gcc/config/alpha/unicosmk.h | 501 - contrib/gcc/config/alpha/va_list.h | 19 - contrib/gcc/config/alpha/vms-cc.c | 356 - contrib/gcc/config/alpha/vms-crt0-64.c | 99 - contrib/gcc/config/alpha/vms-crt0.c | 71 - contrib/gcc/config/alpha/vms-dwarf2.asm | 82 - contrib/gcc/config/alpha/vms-dwarf2eh.asm | 37 - contrib/gcc/config/alpha/vms-ld.c | 764 - contrib/gcc/config/alpha/vms-psxcrt0-64.c | 128 - contrib/gcc/config/alpha/vms-psxcrt0.c | 99 - contrib/gcc/config/alpha/vms.h | 450 - contrib/gcc/config/alpha/vms64.h | 32 - contrib/gcc/config/alpha/vms_tramp.asm | 52 - contrib/gcc/config/alpha/x-vms | 24 - contrib/gcc/config/alpha/xm-vms.h | 45 - contrib/gcc/config/frv/cmovd.c | 54 - contrib/gcc/config/frv/cmovh.c | 50 - contrib/gcc/config/frv/cmovw.c | 54 - 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 | 238 - contrib/gcc/config/frv/frv.c | 9566 --------- contrib/gcc/config/frv/frv.h | 3358 --- contrib/gcc/config/frv/frv.md | 7455 ------- contrib/gcc/config/frv/frvbegin.c | 157 - contrib/gcc/config/frv/frvend.c | 70 - contrib/gcc/config/frv/lib1funcs.asm | 282 - 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/i386/freebsd-aout.h | 230 - contrib/gcc/config/i386/kfreebsdgnu.h | 35 - contrib/gcc/config/i386/linux-aout.h | 73 - contrib/gcc/config/i386/lynx-ng.h | 70 - contrib/gcc/config/i386/moss.h | 43 - contrib/gcc/config/i386/svr3.ifile | 48 - contrib/gcc/config/i386/svr3dbx.h | 81 - contrib/gcc/config/i386/svr3gas.h | 141 - contrib/gcc/config/i386/svr3z.ifile | 48 - contrib/gcc/config/i386/sysv3.h | 105 - contrib/gcc/config/i386/t-udk | 2 - contrib/gcc/config/i386/udk.h | 28 - contrib/gcc/config/i386/vsta.h | 32 - contrib/gcc/config/kfreebsdgnu.h | 41 - contrib/gcc/config/linux-aout.h | 37 - contrib/gcc/config/lynx-ng.h | 114 - contrib/gcc/config/rs6000/altivec-defs.h | 27 - contrib/gcc/config/rs6000/darwin-ldouble-shared.c | 2 - contrib/gcc/config/rs6000/lynxbase.h | 45 - contrib/gcc/config/sparc/aout.h | 64 - contrib/gcc/config/sparc/elf.h | 50 - contrib/gcc/config/sparc/lite.h | 31 - contrib/gcc/config/sparc/litecoff.h | 69 - contrib/gcc/config/sparc/liteelf.h | 53 - contrib/gcc/config/sparc/openbsd.h | 68 - contrib/gcc/config/sparc/pbd.h | 147 - contrib/gcc/config/sparc/sp64-aout.h | 33 - contrib/gcc/config/sparc/sp86x-elf.h | 68 - contrib/gcc/config/sparc/t-openbsd | 5 - contrib/gcc/config/sparc/t-sp86x | 23 - contrib/gcc/config/sparc/t-sparclite | 23 - contrib/gcc/config/t-kfreebsd-gnu | 16 - contrib/gcc/config/t-linux-gnulibc1 | 7 - contrib/gcc/cp-demangle.c | 4459 ---- contrib/gcc/cp-demangle.h | 149 - contrib/gcc/cp-demint.c | 241 - contrib/gcc/cp/ChangeLog.1 | 9451 -------- contrib/gcc/cp/ChangeLog.2 | 20677 ------------------ contrib/gcc/cp/ChangeLog.3 | 22648 -------------------- contrib/gcc/cp/ChangeLog.egcs | 4 - contrib/gcc/cp/lex.h | 68 - contrib/gcc/cplus-dem.c | 4910 ----- contrib/gcc/cppcharset.c | 1411 -- contrib/gcc/cpperror.c | 177 - contrib/gcc/cppexp.c | 1542 -- contrib/gcc/cppfiles.c | 1286 -- contrib/gcc/cpphash.c | 118 - contrib/gcc/cpphash.h | 639 - contrib/gcc/cppinit.c | 632 - contrib/gcc/cpplex.c | 1538 -- contrib/gcc/cpplib.c | 1995 -- contrib/gcc/cpplib.h | 739 - contrib/gcc/cppmacro.c | 1728 -- contrib/gcc/cpppch.c | 717 - contrib/gcc/cpptrad.c | 1110 - contrib/gcc/cppucnid.h | 336 - contrib/gcc/cppucnid.pl | 130 - contrib/gcc/cppucnid.tab | 239 - contrib/gcc/demangle.h | 533 - contrib/gcc/df.c | 3697 ---- contrib/gcc/doloop.c | 882 - contrib/gcc/dummy-conditions.c | 36 - contrib/gcc/dyn-string.c | 442 - contrib/gcc/dyn-string.h | 92 - contrib/gcc/f/BUGS | 130 - contrib/gcc/f/ChangeLog | 7350 ------- contrib/gcc/f/ChangeLog.0 | 4806 ----- contrib/gcc/f/Make-lang.in | 516 - contrib/gcc/f/NEWS | 531 - contrib/gcc/f/RELEASE-PREP | 5 - contrib/gcc/f/ansify.c | 190 - contrib/gcc/f/bad.c | 537 - contrib/gcc/f/bad.def | 1103 - contrib/gcc/f/bad.h | 106 - contrib/gcc/f/bit.c | 200 - contrib/gcc/f/bit.h | 84 - contrib/gcc/f/bld-op.def | 69 - contrib/gcc/f/bld.c | 3135 --- contrib/gcc/f/bld.h | 748 - contrib/gcc/f/bugs.texi | 260 - contrib/gcc/f/bugs0.texi | 9 - contrib/gcc/f/com-rt.def | 289 - contrib/gcc/f/com.c | 16525 -------------- contrib/gcc/f/com.h | 290 - contrib/gcc/f/config-lang.in | 36 - contrib/gcc/f/data.c | 1877 -- contrib/gcc/f/data.h | 74 - contrib/gcc/f/equiv.c | 1484 -- contrib/gcc/f/equiv.h | 100 - contrib/gcc/f/expr.c | 18571 ---------------- contrib/gcc/f/expr.h | 194 - contrib/gcc/f/ffe.texi | 2063 -- contrib/gcc/f/fini.c | 772 - contrib/gcc/f/g77.1 | 1719 -- contrib/gcc/f/g77.texi | 11849 ---------- contrib/gcc/f/g77spec.c | 541 - contrib/gcc/f/global.c | 1586 -- contrib/gcc/f/global.h | 193 - contrib/gcc/f/implic.c | 383 - contrib/gcc/f/implic.h | 74 - contrib/gcc/f/info-b.def | 36 - contrib/gcc/f/info-k.def | 41 - contrib/gcc/f/info-w.def | 41 - contrib/gcc/f/info.c | 303 - contrib/gcc/f/info.h | 186 - contrib/gcc/f/intdoc.c | 1325 -- contrib/gcc/f/intdoc.in | 2705 --- contrib/gcc/f/intdoc.texi | 10931 ---------- contrib/gcc/f/intrin.c | 2119 -- contrib/gcc/f/intrin.def | 3358 --- contrib/gcc/f/intrin.h | 135 - contrib/gcc/f/invoke.texi | 2233 -- contrib/gcc/f/lab.c | 157 - contrib/gcc/f/lab.h | 152 - contrib/gcc/f/lang-specs.h | 47 - contrib/gcc/f/lang.opt | 402 - contrib/gcc/f/lex.c | 4571 ---- contrib/gcc/f/lex.h | 200 - contrib/gcc/f/malloc.c | 559 - contrib/gcc/f/malloc.h | 183 - contrib/gcc/f/name.c | 241 - contrib/gcc/f/name.h | 109 - contrib/gcc/f/news.texi | 3177 --- contrib/gcc/f/news0.texi | 9 - contrib/gcc/f/parse.c | 49 - contrib/gcc/f/proj.h | 52 - contrib/gcc/f/root.texi | 14 - contrib/gcc/f/src.c | 427 - contrib/gcc/f/src.h | 140 - contrib/gcc/f/st.c | 554 - contrib/gcc/f/st.h | 81 - contrib/gcc/f/sta.c | 1722 -- contrib/gcc/f/sta.h | 117 - contrib/gcc/f/stb.c | 17812 --------------- contrib/gcc/f/stb.h | 177 - contrib/gcc/f/stc.c | 10459 --------- contrib/gcc/f/stc.h | 234 - contrib/gcc/f/std.c | 3623 ---- contrib/gcc/f/std.h | 194 - contrib/gcc/f/ste.c | 4475 ---- contrib/gcc/f/ste.h | 144 - contrib/gcc/f/storag.c | 570 - contrib/gcc/f/storag.h | 165 - contrib/gcc/f/stp.c | 59 - contrib/gcc/f/stp.h | 508 - contrib/gcc/f/str-1t.fin | 135 - contrib/gcc/f/str-2t.fin | 60 - contrib/gcc/f/str-fo.fin | 55 - contrib/gcc/f/str-io.fin | 43 - contrib/gcc/f/str-nq.fin | 55 - contrib/gcc/f/str-op.fin | 57 - contrib/gcc/f/str-ot.fin | 50 - contrib/gcc/f/str.c | 217 - contrib/gcc/f/str.h | 80 - contrib/gcc/f/sts.c | 179 - contrib/gcc/f/sts.h | 85 - contrib/gcc/f/stt.c | 892 - contrib/gcc/f/stt.h | 212 - contrib/gcc/f/stu.c | 1162 - contrib/gcc/f/stu.h | 69 - contrib/gcc/f/stv.c | 66 - contrib/gcc/f/stv.h | 165 - contrib/gcc/f/stw.c | 428 - contrib/gcc/f/stw.h | 185 - contrib/gcc/f/symbol.c | 1253 -- contrib/gcc/f/symbol.def | 654 - contrib/gcc/f/symbol.h | 287 - contrib/gcc/f/target.c | 2583 --- contrib/gcc/f/target.h | 1433 -- contrib/gcc/f/top.c | 994 - contrib/gcc/f/top.h | 262 - contrib/gcc/f/type.c | 104 - contrib/gcc/f/type.h | 64 - contrib/gcc/f/where.c | 520 - contrib/gcc/f/where.h | 136 - contrib/gcc/fibheap.c | 523 - contrib/gcc/fibheap.h | 86 - contrib/gcc/filenames.h | 51 - contrib/gcc/genattrtab.h | 58 - contrib/gcc/getpwd.c | 127 - contrib/gcc/getruntime.c | 116 - contrib/gcc/ggc-simple.c | 588 - contrib/gcc/gmon.c | 326 - contrib/gcc/hashtab.c | 853 - contrib/gcc/hashtab.h | 195 - contrib/gcc/hashtable.c | 310 - contrib/gcc/hashtable.h | 81 - contrib/gcc/hex.c | 189 - contrib/gcc/lbasename.c | 62 - contrib/gcc/libgcc-darwin.ver | 229 - contrib/gcc/libiberty.h | 335 - contrib/gcc/line-map.c | 237 - contrib/gcc/line-map.h | 126 - contrib/gcc/loop.c | 10846 ---------- contrib/gcc/loop.h | 432 - contrib/gcc/make-temp-file.c | 179 - contrib/gcc/md5.c | 446 - contrib/gcc/md5.h | 148 - contrib/gcc/mkdeps.c | 345 - contrib/gcc/mkdeps.h | 72 - contrib/gcc/mkheaders.in | 105 - contrib/gcc/move-if-change | 17 - contrib/gcc/obstack.c | 593 - contrib/gcc/obstack.h | 611 - contrib/gcc/opts.sh | 175 - contrib/gcc/partition.c | 191 - contrib/gcc/partition.h | 85 - contrib/gcc/pex-common.h | 42 - contrib/gcc/pex-unix.c | 166 - contrib/gcc/physmem.c | 305 - contrib/gcc/ra-build.c | 3203 --- contrib/gcc/ra-colorize.c | 2686 --- contrib/gcc/ra-debug.c | 1087 - contrib/gcc/ra-rewrite.c | 1951 -- contrib/gcc/ra.c | 899 - contrib/gcc/ra.h | 629 - contrib/gcc/sibcall.c | 759 - contrib/gcc/splay-tree.c | 559 - contrib/gcc/splay-tree.h | 159 - contrib/gcc/stack.h | 42 - contrib/gcc/symcat.h | 49 - contrib/gcc/unroll.c | 4042 ---- contrib/gcc/unwind.h | 232 - contrib/gcc/xexit.c | 53 - contrib/gcc/xmalloc.c | 183 - contrib/gcc/xmemdup.c | 38 - contrib/gcc/xstrdup.c | 34 - contrib/gcc/xstrerror.c | 67 - 307 files changed, 520647 deletions(-) delete mode 100644 contrib/gcc/ChangeLog.0 delete mode 100644 contrib/gcc/ChangeLog.1 delete mode 100644 contrib/gcc/ChangeLog.10 delete mode 100644 contrib/gcc/ChangeLog.2 delete mode 100644 contrib/gcc/ChangeLog.3 delete mode 100644 contrib/gcc/ChangeLog.4 delete mode 100644 contrib/gcc/ChangeLog.5 delete mode 100644 contrib/gcc/ChangeLog.6 delete mode 100644 contrib/gcc/ChangeLog.7 delete mode 100644 contrib/gcc/ChangeLog.8 delete mode 100644 contrib/gcc/ChangeLog.9 delete mode 100644 contrib/gcc/README-fixinc delete mode 100644 contrib/gcc/ansidecl.h delete mode 100644 contrib/gcc/c-parse.in delete mode 100644 contrib/gcc/choose-temp.c delete mode 100644 contrib/gcc/concat.c delete mode 100644 contrib/gcc/config/alpha/alpha-modes.def delete mode 100644 contrib/gcc/config/alpha/alpha-protos.h delete mode 100644 contrib/gcc/config/alpha/alpha.c delete mode 100644 contrib/gcc/config/alpha/alpha.h delete mode 100644 contrib/gcc/config/alpha/alpha.md delete mode 100644 contrib/gcc/config/alpha/crtfastmath.c delete mode 100644 contrib/gcc/config/alpha/elf.h delete mode 100644 contrib/gcc/config/alpha/ev4.md delete mode 100644 contrib/gcc/config/alpha/ev5.md delete mode 100644 contrib/gcc/config/alpha/ev6.md delete mode 100644 contrib/gcc/config/alpha/freebsd.h delete mode 100644 contrib/gcc/config/alpha/gnu.h delete mode 100644 contrib/gcc/config/alpha/lib1funcs.asm delete mode 100644 contrib/gcc/config/alpha/linux-elf.h delete mode 100644 contrib/gcc/config/alpha/linux.h delete mode 100644 contrib/gcc/config/alpha/netbsd.h delete mode 100644 contrib/gcc/config/alpha/openbsd.h delete mode 100644 contrib/gcc/config/alpha/osf.h delete mode 100644 contrib/gcc/config/alpha/osf5.h delete mode 100644 contrib/gcc/config/alpha/qrnnd.asm delete mode 100644 contrib/gcc/config/alpha/t-alpha delete mode 100644 contrib/gcc/config/alpha/t-crtfm delete mode 100644 contrib/gcc/config/alpha/t-ieee delete mode 100644 contrib/gcc/config/alpha/t-osf-pthread delete mode 100644 contrib/gcc/config/alpha/t-osf4 delete mode 100644 contrib/gcc/config/alpha/t-unicosmk delete mode 100644 contrib/gcc/config/alpha/t-vms delete mode 100644 contrib/gcc/config/alpha/t-vms64 delete mode 100644 contrib/gcc/config/alpha/unicosmk.h delete mode 100644 contrib/gcc/config/alpha/va_list.h delete mode 100644 contrib/gcc/config/alpha/vms-cc.c delete mode 100644 contrib/gcc/config/alpha/vms-crt0-64.c delete mode 100644 contrib/gcc/config/alpha/vms-crt0.c delete mode 100644 contrib/gcc/config/alpha/vms-dwarf2.asm delete mode 100644 contrib/gcc/config/alpha/vms-dwarf2eh.asm delete mode 100644 contrib/gcc/config/alpha/vms-ld.c delete mode 100644 contrib/gcc/config/alpha/vms-psxcrt0-64.c delete mode 100644 contrib/gcc/config/alpha/vms-psxcrt0.c delete mode 100644 contrib/gcc/config/alpha/vms.h delete mode 100644 contrib/gcc/config/alpha/vms64.h delete mode 100644 contrib/gcc/config/alpha/vms_tramp.asm delete mode 100644 contrib/gcc/config/alpha/x-vms delete mode 100644 contrib/gcc/config/alpha/xm-vms.h delete mode 100644 contrib/gcc/config/frv/cmovd.c delete mode 100644 contrib/gcc/config/frv/cmovh.c delete mode 100644 contrib/gcc/config/frv/cmovw.c delete mode 100644 contrib/gcc/config/frv/frv-abi.h delete mode 100644 contrib/gcc/config/frv/frv-asm.h delete mode 100644 contrib/gcc/config/frv/frv-modes.def delete mode 100644 contrib/gcc/config/frv/frv-protos.h delete mode 100644 contrib/gcc/config/frv/frv.c delete mode 100644 contrib/gcc/config/frv/frv.h delete mode 100644 contrib/gcc/config/frv/frv.md delete mode 100644 contrib/gcc/config/frv/frvbegin.c delete mode 100644 contrib/gcc/config/frv/frvend.c delete mode 100644 contrib/gcc/config/frv/lib1funcs.asm delete mode 100644 contrib/gcc/config/frv/modi.c delete mode 100644 contrib/gcc/config/frv/t-frv delete mode 100644 contrib/gcc/config/frv/uitod.c delete mode 100644 contrib/gcc/config/frv/uitof.c delete mode 100644 contrib/gcc/config/frv/ulltod.c delete mode 100644 contrib/gcc/config/frv/ulltof.c delete mode 100644 contrib/gcc/config/frv/umodi.c delete mode 100644 contrib/gcc/config/i386/freebsd-aout.h delete mode 100644 contrib/gcc/config/i386/kfreebsdgnu.h delete mode 100644 contrib/gcc/config/i386/linux-aout.h delete mode 100644 contrib/gcc/config/i386/lynx-ng.h delete mode 100644 contrib/gcc/config/i386/moss.h delete mode 100644 contrib/gcc/config/i386/svr3.ifile delete mode 100644 contrib/gcc/config/i386/svr3dbx.h delete mode 100644 contrib/gcc/config/i386/svr3gas.h delete mode 100644 contrib/gcc/config/i386/svr3z.ifile delete mode 100644 contrib/gcc/config/i386/sysv3.h delete mode 100644 contrib/gcc/config/i386/t-udk delete mode 100644 contrib/gcc/config/i386/udk.h delete mode 100644 contrib/gcc/config/i386/vsta.h delete mode 100644 contrib/gcc/config/kfreebsdgnu.h delete mode 100644 contrib/gcc/config/linux-aout.h delete mode 100644 contrib/gcc/config/lynx-ng.h delete mode 100644 contrib/gcc/config/rs6000/altivec-defs.h delete mode 100644 contrib/gcc/config/rs6000/darwin-ldouble-shared.c delete mode 100644 contrib/gcc/config/rs6000/lynxbase.h delete mode 100644 contrib/gcc/config/sparc/aout.h delete mode 100644 contrib/gcc/config/sparc/elf.h delete mode 100644 contrib/gcc/config/sparc/lite.h delete mode 100644 contrib/gcc/config/sparc/litecoff.h delete mode 100644 contrib/gcc/config/sparc/liteelf.h delete mode 100644 contrib/gcc/config/sparc/openbsd.h delete mode 100644 contrib/gcc/config/sparc/pbd.h delete mode 100644 contrib/gcc/config/sparc/sp64-aout.h delete mode 100644 contrib/gcc/config/sparc/sp86x-elf.h delete mode 100644 contrib/gcc/config/sparc/t-openbsd delete mode 100644 contrib/gcc/config/sparc/t-sp86x delete mode 100644 contrib/gcc/config/sparc/t-sparclite delete mode 100644 contrib/gcc/config/t-kfreebsd-gnu delete mode 100644 contrib/gcc/config/t-linux-gnulibc1 delete mode 100644 contrib/gcc/cp-demangle.c delete mode 100644 contrib/gcc/cp-demangle.h delete mode 100644 contrib/gcc/cp-demint.c delete mode 100644 contrib/gcc/cp/ChangeLog.1 delete mode 100644 contrib/gcc/cp/ChangeLog.2 delete mode 100644 contrib/gcc/cp/ChangeLog.3 delete mode 100644 contrib/gcc/cp/ChangeLog.egcs delete mode 100644 contrib/gcc/cp/lex.h delete mode 100644 contrib/gcc/cplus-dem.c delete mode 100644 contrib/gcc/cppcharset.c delete mode 100644 contrib/gcc/cpperror.c delete mode 100644 contrib/gcc/cppexp.c delete mode 100644 contrib/gcc/cppfiles.c delete mode 100644 contrib/gcc/cpphash.c delete mode 100644 contrib/gcc/cpphash.h delete mode 100644 contrib/gcc/cppinit.c delete mode 100644 contrib/gcc/cpplex.c delete mode 100644 contrib/gcc/cpplib.c delete mode 100644 contrib/gcc/cpplib.h delete mode 100644 contrib/gcc/cppmacro.c delete mode 100644 contrib/gcc/cpppch.c delete mode 100644 contrib/gcc/cpptrad.c delete mode 100644 contrib/gcc/cppucnid.h delete mode 100644 contrib/gcc/cppucnid.pl delete mode 100644 contrib/gcc/cppucnid.tab delete mode 100644 contrib/gcc/demangle.h delete mode 100644 contrib/gcc/df.c delete mode 100644 contrib/gcc/doloop.c delete mode 100644 contrib/gcc/dummy-conditions.c delete mode 100644 contrib/gcc/dyn-string.c delete mode 100644 contrib/gcc/dyn-string.h delete mode 100644 contrib/gcc/f/BUGS delete mode 100644 contrib/gcc/f/ChangeLog delete mode 100644 contrib/gcc/f/ChangeLog.0 delete mode 100644 contrib/gcc/f/Make-lang.in delete mode 100644 contrib/gcc/f/NEWS delete mode 100644 contrib/gcc/f/RELEASE-PREP delete mode 100644 contrib/gcc/f/ansify.c delete mode 100644 contrib/gcc/f/bad.c delete mode 100644 contrib/gcc/f/bad.def delete mode 100644 contrib/gcc/f/bad.h delete mode 100644 contrib/gcc/f/bit.c delete mode 100644 contrib/gcc/f/bit.h delete mode 100644 contrib/gcc/f/bld-op.def delete mode 100644 contrib/gcc/f/bld.c delete mode 100644 contrib/gcc/f/bld.h delete mode 100644 contrib/gcc/f/bugs.texi delete mode 100644 contrib/gcc/f/bugs0.texi delete mode 100644 contrib/gcc/f/com-rt.def delete mode 100644 contrib/gcc/f/com.c delete mode 100644 contrib/gcc/f/com.h delete mode 100644 contrib/gcc/f/config-lang.in delete mode 100644 contrib/gcc/f/data.c delete mode 100644 contrib/gcc/f/data.h delete mode 100644 contrib/gcc/f/equiv.c delete mode 100644 contrib/gcc/f/equiv.h delete mode 100644 contrib/gcc/f/expr.c delete mode 100644 contrib/gcc/f/expr.h delete mode 100644 contrib/gcc/f/ffe.texi delete mode 100644 contrib/gcc/f/fini.c delete mode 100644 contrib/gcc/f/g77.1 delete mode 100644 contrib/gcc/f/g77.texi delete mode 100644 contrib/gcc/f/g77spec.c delete mode 100644 contrib/gcc/f/global.c delete mode 100644 contrib/gcc/f/global.h delete mode 100644 contrib/gcc/f/implic.c delete mode 100644 contrib/gcc/f/implic.h delete mode 100644 contrib/gcc/f/info-b.def delete mode 100644 contrib/gcc/f/info-k.def delete mode 100644 contrib/gcc/f/info-w.def delete mode 100644 contrib/gcc/f/info.c delete mode 100644 contrib/gcc/f/info.h delete mode 100644 contrib/gcc/f/intdoc.c delete mode 100644 contrib/gcc/f/intdoc.in delete mode 100644 contrib/gcc/f/intdoc.texi delete mode 100644 contrib/gcc/f/intrin.c delete mode 100644 contrib/gcc/f/intrin.def delete mode 100644 contrib/gcc/f/intrin.h delete mode 100644 contrib/gcc/f/invoke.texi delete mode 100644 contrib/gcc/f/lab.c delete mode 100644 contrib/gcc/f/lab.h delete mode 100644 contrib/gcc/f/lang-specs.h delete mode 100644 contrib/gcc/f/lang.opt delete mode 100644 contrib/gcc/f/lex.c delete mode 100644 contrib/gcc/f/lex.h delete mode 100644 contrib/gcc/f/malloc.c delete mode 100644 contrib/gcc/f/malloc.h delete mode 100644 contrib/gcc/f/name.c delete mode 100644 contrib/gcc/f/name.h delete mode 100644 contrib/gcc/f/news.texi delete mode 100644 contrib/gcc/f/news0.texi delete mode 100644 contrib/gcc/f/parse.c delete mode 100644 contrib/gcc/f/proj.h delete mode 100644 contrib/gcc/f/root.texi delete mode 100644 contrib/gcc/f/src.c delete mode 100644 contrib/gcc/f/src.h delete mode 100644 contrib/gcc/f/st.c delete mode 100644 contrib/gcc/f/st.h delete mode 100644 contrib/gcc/f/sta.c delete mode 100644 contrib/gcc/f/sta.h delete mode 100644 contrib/gcc/f/stb.c delete mode 100644 contrib/gcc/f/stb.h delete mode 100644 contrib/gcc/f/stc.c delete mode 100644 contrib/gcc/f/stc.h delete mode 100644 contrib/gcc/f/std.c delete mode 100644 contrib/gcc/f/std.h delete mode 100644 contrib/gcc/f/ste.c delete mode 100644 contrib/gcc/f/ste.h delete mode 100644 contrib/gcc/f/storag.c delete mode 100644 contrib/gcc/f/storag.h delete mode 100644 contrib/gcc/f/stp.c delete mode 100644 contrib/gcc/f/stp.h delete mode 100644 contrib/gcc/f/str-1t.fin delete mode 100644 contrib/gcc/f/str-2t.fin delete mode 100644 contrib/gcc/f/str-fo.fin delete mode 100644 contrib/gcc/f/str-io.fin delete mode 100644 contrib/gcc/f/str-nq.fin delete mode 100644 contrib/gcc/f/str-op.fin delete mode 100644 contrib/gcc/f/str-ot.fin delete mode 100644 contrib/gcc/f/str.c delete mode 100644 contrib/gcc/f/str.h delete mode 100644 contrib/gcc/f/sts.c delete mode 100644 contrib/gcc/f/sts.h delete mode 100644 contrib/gcc/f/stt.c delete mode 100644 contrib/gcc/f/stt.h delete mode 100644 contrib/gcc/f/stu.c delete mode 100644 contrib/gcc/f/stu.h delete mode 100644 contrib/gcc/f/stv.c delete mode 100644 contrib/gcc/f/stv.h delete mode 100644 contrib/gcc/f/stw.c delete mode 100644 contrib/gcc/f/stw.h delete mode 100644 contrib/gcc/f/symbol.c delete mode 100644 contrib/gcc/f/symbol.def delete mode 100644 contrib/gcc/f/symbol.h delete mode 100644 contrib/gcc/f/target.c delete mode 100644 contrib/gcc/f/target.h delete mode 100644 contrib/gcc/f/top.c delete mode 100644 contrib/gcc/f/top.h delete mode 100644 contrib/gcc/f/type.c delete mode 100644 contrib/gcc/f/type.h delete mode 100644 contrib/gcc/f/where.c delete mode 100644 contrib/gcc/f/where.h delete mode 100644 contrib/gcc/fibheap.c delete mode 100644 contrib/gcc/fibheap.h delete mode 100644 contrib/gcc/filenames.h delete mode 100644 contrib/gcc/genattrtab.h delete mode 100644 contrib/gcc/getpwd.c delete mode 100644 contrib/gcc/getruntime.c delete mode 100644 contrib/gcc/ggc-simple.c delete mode 100644 contrib/gcc/gmon.c delete mode 100644 contrib/gcc/hashtab.c delete mode 100644 contrib/gcc/hashtab.h delete mode 100644 contrib/gcc/hashtable.c delete mode 100644 contrib/gcc/hashtable.h delete mode 100644 contrib/gcc/hex.c delete mode 100644 contrib/gcc/lbasename.c delete mode 100644 contrib/gcc/libgcc-darwin.ver delete mode 100644 contrib/gcc/libiberty.h delete mode 100644 contrib/gcc/line-map.c delete mode 100644 contrib/gcc/line-map.h delete mode 100644 contrib/gcc/loop.c delete mode 100644 contrib/gcc/loop.h delete mode 100644 contrib/gcc/make-temp-file.c delete mode 100644 contrib/gcc/md5.c delete mode 100644 contrib/gcc/md5.h delete mode 100644 contrib/gcc/mkdeps.c delete mode 100644 contrib/gcc/mkdeps.h delete mode 100644 contrib/gcc/mkheaders.in delete mode 100755 contrib/gcc/move-if-change delete mode 100644 contrib/gcc/obstack.c delete mode 100644 contrib/gcc/obstack.h delete mode 100644 contrib/gcc/opts.sh delete mode 100644 contrib/gcc/partition.c delete mode 100644 contrib/gcc/partition.h delete mode 100644 contrib/gcc/pex-common.h delete mode 100644 contrib/gcc/pex-unix.c delete mode 100644 contrib/gcc/physmem.c delete mode 100644 contrib/gcc/ra-build.c delete mode 100644 contrib/gcc/ra-colorize.c delete mode 100644 contrib/gcc/ra-debug.c delete mode 100644 contrib/gcc/ra-rewrite.c delete mode 100644 contrib/gcc/ra.c delete mode 100644 contrib/gcc/ra.h delete mode 100644 contrib/gcc/sibcall.c delete mode 100644 contrib/gcc/splay-tree.c delete mode 100644 contrib/gcc/splay-tree.h delete mode 100644 contrib/gcc/stack.h delete mode 100644 contrib/gcc/symcat.h delete mode 100644 contrib/gcc/unroll.c delete mode 100644 contrib/gcc/unwind.h delete mode 100644 contrib/gcc/xexit.c delete mode 100644 contrib/gcc/xmalloc.c delete mode 100644 contrib/gcc/xmemdup.c delete mode 100644 contrib/gcc/xstrdup.c delete mode 100644 contrib/gcc/xstrerror.c (limited to 'contrib/gcc') diff --git a/contrib/gcc/ChangeLog.0 b/contrib/gcc/ChangeLog.0 deleted file mode 100644 index 4ed0652..0000000 --- a/contrib/gcc/ChangeLog.0 +++ /dev/null @@ -1,13011 +0,0 @@ -Tue Jul 14 02:20:38 1998 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump to avoid problems with old spec files during - bootstrap. - -Mon Jul 13 23:11:44 1998 David S. Miller - - * config/sparc/sparc.c (output_scc_insn): Enclose || conditions in - parens while walking over notes. - * config/sparc/sparc.md (reg movdi split): Clean up matching - conditions. - (all DI arithop splits on 32-bit): Handle immediate arguments - correctly when they are CONST_INTs. - -Mon Jul 13 23:57:21 1998 Kamil Iskra - - * m68k/m68k.h (TARGET_SWITCHES): Clear MASK_68040_ONLY for - -m68020-40, -m68020-60 and -m5200. - -Mon Jul 13 23:52:05 1998 Weiwen Liu - - * gcc.c (do_spec_1): Fix %O handling for secure temporary file - creation. - -Mon Jul 13 23:42:36 1998 Ralf Corsepius - - * sh/elf.h (MAX_OFILE_ALIGNMENT): Undefine before including svr4.h. - -Mon Jul 13 23:36:08 1998 Jim Wilson - - * i386/i386.h (CPP_486_SPEC, CPP_586_SPEC, CPP_686_SPEC): New specs. - (CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Use them. - (EXTRA_SPECS): Support them. - * gcc.c: Delete %[spec] support. - (do_spec_1, case '('): Likewise. - (do_spec_1, case '['): Call error. - * i386/aix386ng.h, cygwin32.h, freebsd-elf.h, gas.h, isc.h, - linux-aout.h, linux-oldld.h, linux.h, osfelf.h, osfrose.h, sco.h, - sco4.h, sco4dbx.h, sco5.h, sol2.h, sysv3.h (CPP_SPEC): Delete - %[cpp_cpu]. - -Mon Jul 13 23:31:04 1998 Andreas Schwab - - * m68k.c (output_scc_di): Use cmpw #0 only for address registers. - -Mon Jul 13 23:26:43 1998 Jeffrey A Law (law@cygnus.com) - - * tree.h (tree_common): Note front-end dependencies on layout of - this structure. - -Mon Jul 13 23:18:39 1998 Craig Burley - - * stmt.c (expand_expr_stmt): If not assigning fresh - value to last_expr_value, zero it, so old garbage - doesn't get dereferenced. - -Mon Jul 13 23:06:55 1998 Henning.Petersen@t-online.de (Henning Petersen) - - * gcse.c (hash_scan_insn): Add missing argument declaration. - -Mon Jul 13 18:59:13 1998 Jim Wilson - - * configure.in (mips-sgi-irix5cross64, mips-sgi-irix5*): Remove - HAVE_INTTYPES_H from xm_defines. Define xm_file to mips/xm-iris5.h. - * mips/xm-iris5.h (USG): Delete. - -Mon Jul 13 17:18:47 1998 Nick Clifton - - * cccp.c (main): Add support for parsing --help. - (display_help): New function: display command line switches. - - * cpplib.c (cpp_handle_option): Add support for parsing --help. - (display_help): New function: display command line switches. - - * gcc.c (main): Add support for parsing --help, and passing it on - to the sub-processes invoked by gcc. - (display_help): New function: display command line switches. - - * tm.texi (TARGET_SWITCHES and TARGET_OPTIONS): Document - 'description' field added to structure. - - * toplev.c: Add support for parsing --help. - Add documentation strings to command line option tables. - (display_help): New function: display comman line switches. - -Mon Jul 13 16:15:10 1998 John Carr - - * sparc.c, sparc.h, sparc.md: New trampoline code. - Allow integer operand 1 to V8+ DImode shift instructions. - Fix bugs in V8+ wide multiply patterns. - In 32 bit mode, split DImode register moves and logical instructions. - Write V9 branch prediction flag. - Use V9 conditional move more often for scc. - -Mon Jul 13 15:10:09 1998 Philippe De Muyter - - * invoke.texi(-fno-builtin): Explain that the names of built-in - functions begin with `__builtin_', not `__'. - -Mon Jul 13 19:01:52 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_before_p): Abort for RELOAD_FOR_OUTPUT. - -Mon Jul 13 10:50:17 1998 Mark Mitchell - - * cplus-dem.c (SCOPE_STRING): Remove DMGL_JAVA stuff. - (cplus_demangle_opname): Initialize work. - (demangle_template): Remove is_java_array. - (do_type): Remove DMGL_JAVA stuff. - (long_options): Remove "java". - (main): Remove 'j' option. - -Mon Jul 13 10:19:00 1998 Jeffrey A Law (law@cygnus.com) - - * mn10300.h (REG_CLASS_FROM_LETTER): Map 'y' to SP_REGS. - Handle 'x' as NO_REGS for this cpu. - (REGNO_OK_FOR_BIT_BASE_P): Define. - (REG_OK_FOR_BIT_BASE_P): Define. - (GO_IF_LEGITIMATE_ADDRESS): Use them. - (REG_OK_FOR_INDEX_P): Tweak. - * mn13000.c (REG_SAVE_BYTES): Define. - (expand_epilogue, initial_offset): Use it. - (secondary_reload_class): Slightly reformat. - (output_tst): Tweak comments. - * mn10300.md: Change 'x' to 'y' for SP_REGS. Then add 'x' to many - patterns. - (addsi3): Turn into a define_expand/define_insn pair. Rework code for - three operand addition case to be more efficient. - (subsi3): Turn into a define_expand/define_insn pair. - - * expr.c (expand_expr): Only set MEM_IN_STRUCT_P if the memory address - is not varying for REFERENCE_TYPE or when we think we might have found - an optimized access to the first element in an array. - -Mon Jul 13 02:24:08 1998 David S. Miller - - * regclass.c (reg_scan_mark_refs): New arg min_regno. Only update - regscan information for REGs with numbers greater than or equal to - this. All callers changed. - (reg_scan_update): New function to efficiently update regscan - information on the fly. - * rtl.h: Add prototype. - * jump.c (jump_optimize): Call it when we make a transformation - which generates new pseudo-REGs. - -Sun Jul 12 13:08:14 1998 Jeffrey A Law (law@cygnus.com) - - * collect2.c (main): Use "-x c" instead of "-lang-c" for force the - compiler into C mode. - -Sun Jul 12 01:27:05 1998 Jason Merrill - - * cplus-dem.c (demangle_nested_args): Return a value. - - * tree.h (TYPE_P): New macro. - -Sat Jul 11 16:19:48 1998 Mark Mitchell - - * cplus-dem.c (string): Move definition before work_stuff. - (work_stuff): Add volatile_type, forgetting_types, - previous_argument, and nrepeats fields. - (SCOPE_STRING): New macro. - (demangle_template): Add `remember' parameter. Add comment. - Register the `B' code type here, if remembering. Tidy. Fix crash - on NULL tmpl_argvec. Be consistent with use of tname/trawname. - (demangle_nested_args): New function. - (internal_cplus_demangle): Handle volatile-qualified member - functions. - (mop_up): Delete the previous_argument string if present. - (demangle_signature): Tidy. Handle volatile-qualified member - functions. Handle back-references using the `B' code. Use extra - parameter to demangle_template and SCOPE_STRING where appropriate. - (demangle_template_value_parm): Fix thinko; 'B' is not an integral - code. - (demangle_class): Use SCOPE_STRING. - (gnu_special): Pass additional argument to demangle_template. - Use SCOPE_STRING. - (demangle_qualified): Save qualified types for later - back-references. Handle constructors and destructors for template - types correctly. - (do_type): Tidy. Use SCOPE_STRING. Pass extra argument to - demangle_template. Use demangled_nested_args. Don't remember - qualified types here; that's now done in demangle_qualified. - Similarly for templates. - (do_arg): Improve comment. Handle 'n' repeat code. - (remember_type): Check forgetting_types. - (demangle_args): Deal with 'n' repeat codes. Tidy. - -Sat Jul 11 02:59:08 1998 Richard Earnshaw - - * arm.md (extendhisi2_mem, movhi, movhi_bytes): Propagate the volatile - and structure attribute flags to MEMs generated. - (splits for sign-extended HI & QI mode from memory): Also propagate - the volatile flag. - - * configure.in (thumb-*-coff*): Don't cause fixincludes to be run. - -Fri Jul 10 19:06:59 1998 Michael Meissner - - * varray.h: Include system.h if it hasn't already been included - before to get size_t declared. - -Fri Jul 10 12:53:58 1998 David S. Miller - - * jump.c (jump_optimize): If after_regscan and our transformations - generate new REGs, rerun reg_scan. - -Fri Jul 10 11:50:43 1998 Andrew MacLeod - - * config/i960/i960.c (i960_address_cost): MEMA operands with - positive offsets < 4096 are free. - -Fri Jul 10 12:34:37 1998 Andreas Schwab - - * config/m68k/m68k.c (const_uint32_operand): Recognize - CONSTANT_P_RTX. - (const_sint32_operand): Likewise. - -Thu Jul 9 22:58:59 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (alias.o): Depend on $(EXPR_H). - -Thu Jul 9 18:24:56 1998 J"orn Rennecke - - * reload1.c (choose_reload_regs): If using an equivalence from - find_equiv_reg and reg_reloaded_valid is not set for this register, - clear the associated spill_reg_store. - -Thu Jul 9 18:12:49 1998 J"orn Rennecke - - * reload1.c (emit_reload_insns): If an output reload copies only - to a secondary reload register, indicate that the secondary reload - does the actual store. - -Thu Jul 9 18:01:05 1998 J"orn Rennecke - - * reload.c (find_equiv_reg): If need_stable_sp is set, - check if stack pointer is changed directly in a PARALLEL. - -Thu Jul 9 10:38:14 1998 Jeffrey A Law (law@cygnus.com) - - * jump.c (duplicate_loop_exit_test): Fix thinko. - -Thu Jul 9 01:30:37 1998 Joel Sherrill - Ralf Corsepius - - * config/i386/rtemself.h: Updated to keep in sync with - config/i386/linux.h. - - * configure.in: Added sh-rtemself. - * configure: Rebuilt. - * config/sh/rtems.h: Removed -D__ELF__ since it is now COFF. - * config/sh/rtemself.h: New file. - - * config/rs6000/rtems.h: Defined STARTFILE_DEFAULT_SPEC. - -Wed Jul 8 21:43:14 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in: Check if the assembler supports ".balign" and - ".p2align" and define HAVE_GAS_BALIGN_AND_P2ALIGN appropriately. - * acconfig.h (HAVE_GAS_BALIGN_AND_P2ALIGN): New tag. - * i386/gas.h (ASM_OUTPUT_ALIGN): If the assembler has support for - ".balign" then use it. - - * print-rtl.c (print_rtx): Revert previous patch. - - * jump.c (duplicate_loop_exit_test): Do not duplicate the loop exit - test if the exit code has an insn with ASM_OPERANDS. - - * i386/cygwin32.h (STDIO_PROTO): Fix typo. - * m32r.h (STDIO_PROTO): Fix typo. - - * pa.h (LEGITIMIZE_RELOAD_ADDRESS): Handle addresses created by - LEGITIMIZE_RELOAD_ADDRESS. - * tm.texi (LEGITIMIZE_RELOAD_ADDRESS): Note that this macro must be - able to handle addresses created by previous invocations of the macro. - - * flow.c (find_auto_inc): Remove most recent change. Real bug was - elsewhere. - - * cse.c (count_reg_usage): Count registers used in addresses of - CLOBBERs. - -Wed Jul 8 15:08:29 1998 Jim Wilson - - * Makefile.in (STAGESTUFF): Readd line lost during June 9 FSF merge. - - * configure.in (mips64orion-*-rtems*): Use elf64.h not elfl64.h. - -1998-07-08 Vladimir N. Makarov - - * config/fp-bit.c (__gexf2, __fixxfsi, __floatsixf): Add function - stubs. - - * toplev.c (lang_options): Add -Wlong-long, -Wno-long-long - options. - * c-decl.c (warn_long_long): Define. - (c_decode_option): Parse -Wlong-long, -Wno-long-long options. - (grokdeclarator): Add flag `warn_long_long' as guard for - warning "ANSI C does not support `long long'". - * invoke.texi: Add description of options -Wlong-long, - -Wno-long-long. - * gcc.1: The same as above. - -Wed Jul 8 02:43:34 1998 Jeffrey A Law (law@cygnus.com) - - * rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART. If - either argument is CONSTANT_P, then return zero. - * reload.c (reg_overlap_mentioned_for_reload_p): Similarly. - - * configure.in: Also look at $srcdir/gas/configure to find a - gas version #. - -Wed Jul 8 00:28:22 1998 Carlo Wood - - * dsp16xx.h : Clean up of macro OPTIMIZATION_OPTIONS - -Tue Jul 7 21:18:14 1998 Mumit Khan - - * i386/cygwin32.h (ASM_DECLARE_FUNCTION_NAME): Merge duplicate - definitions from last two patches. - -Tue Jul 7 23:03:34 1998 J"orn Rennecke - - * reload1.c (choose_reload_regs): Don't set reload_override_in - if EQUIV is clobbered in INSN and the reload is done after INSN. - -Tue Jul 7 21:23:36 1998 J"orn Rennecke - - * expr.c (emit_queue): If emitting a SEQUENCE, set QUEUED_INSN - to the first insn of the sequence. - -Tue Jul 7 21:05:25 1998 J"orn Rennecke - - * cse.c (cse_insn): Don't make change without validation. - -Tue Jul 7 11:40:05 1998 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (various zero/sign extension patterns): Zero and sign - extensions which use "sub" clobber cc0. - -Tue Jul 7 09:12:08 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Tue Jul 7 10:07:20 1998 Jeffrey A Law (law@cygnus.com) - - * print-rtl.c (print_rtx): Use REAL_VALUE_TYPE instead of "double". - -Tue Jul 7 08:41:27 1998 Richard Henderson (rth@cygnus.com) - - * print-rtl.c (print_rtx): Only print fp values when REAL_VALUE_TYPE - is a double. - -Tue Jul 7 00:31:58 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Tue Jul 7 01:03:03 1998 Mumit Khan - - Support for dllimport and dllexport attributes for i386-pe. - - * tree.h (DECL_NON_ADDR_CONST_P): New accessor macro. - (struct tree_decl): Add non_addr_const_p field. - * tree.c (staticp): Use. - - * i386/cygwin32.h (CPP_PREDEFINES): Map __declspec(x) to GCC - attributes. - (SUBTARGET_SWITCHES): Switches to turn on/off dllimport|export - attributes. Also accept -mwindows option. - (VALID_MACHINE_DECL_ATTRIBUTE): New macro. - (MERGE_MACHINE_DECL_ATTRIBUTE): New macro. - (REDO_SECTION_INFO_P): New macro. - (DRECTVE_SECTION_FUNCTION): New macro. - (drectve_section): Cover function to implement above. - (SWITCH_TO_SECTION_FUNCTION): New macro. - (switch_to_section): Covert function to implement above. - (EXTRA_SECTIONS): Add in_drectve. - (EXTRA_SECTION_FUNCTIONS): Add in_drectve and switch_to_section. - (ENCODE_SECTION_INFO): Delete old macro and redefine as a function. - (STRIP_NAME_ENCODING): Handle new attributes. - (ASM_OUTPUT_LABELREF): New macro. - (ASM_OUTPUT_FUNCTION_NAME): New macro. - (ASM_OUTPUT_COMMON): New macro. - (ASM_OUTPUT_DECLARE_OBJECT_NAME): New macro. - - * i386/mingw32.h (CPP_PREDEFINES): Map __declspec(x) to GCC - attributes. - - * i386/winnt.c (i386_pe_valid_decl_attribute_p): New function. - (i386_pe_merge_decl_attributes): New function. - (i386_pe_check_vtable_importexport): New function. - (i386_pe_dllexport_p): New function. - (i386_pe_dllimport_p): New function. - (i386_pe_dllexport_name_p): New function. - (i386_pe_dllimport_name_p): New function. - (i386_pe_mark_dllexport): New function. - (i386_pe_mark_dllimport): New function. - (i386_pe_encode_section_info): New function. - (i386_pe_unique_section): Strip encoding from name first. - -Tue Jul 7 00:50:17 1998 Manfred Hollstein (manfred@s-direktnet.de) - - * libgcc2.c (L_exit): Provide a fake for atexit on systems which - define ON_EXIT but not HAVE_ATEXIT. - -Tue Jul 7 00:44:35 1998 Franz Sirl - - * m68k.md (zero_extend QI to HI): Correctly handle TARGET_5200. - -Tue Jul 7 00:36:41 1998 Ulrich Drepper - - * i386.c: Remove random whitespace at end of lines. - - * i386.c (ix86_epilogue): For pentium processors, try to deallocate - 4 or 8 byte stacks with pop instructions instead of an add instruction. - -Tue Jul 7 00:30:08 1998 Klaus Kaempf - - * alpha.c: Include tree.h before expr.h. - -Mon Jul 6 22:50:48 1998 Jason Merrill - - * c-parse.in (struct_head, union_head, enum_head): New nonterminals. - (structsp): Use them. Update files generated from c-parse.in. - * extend.texi (Type Attributes): Document it. - - * c-decl.c: Add warn_multichar. - (c_decode_option): Handle -Wno-multichar. - * c-lex.c (yylex): Check it. - * c-tree.h: Declare it. - * toplev.c (lang_options): Add it. - * invoke.texi: Document it. - -Mon Jul 6 22:47:55 1998 J"orn Rennecke - - * reload.c (find_equiv_reg): When looking for stack pointer + const, - make sure we don't use a stack adjust. - - * reload.c (find_equiv_reg): If need_stable_sp is set, - check if stack pointer is changed directly. - - * reload1.c (delete_dead_insn): Don't delete feeding insn - if that insn has side effects. - - * flow.c (find_auto_inc): Clear UNCHANGING bit of register that is - changed. - - * reload1.c (reload_reg_free_before_p): RELOAD_FOR_OPADDR_ADDR - precedes RELOAD_FOR_OUTADDR_ADDRESS. - - * gcse.c (hash_scan_insn): New argument IN_LIBCALL_BLOCK. Changed - caller. - -Mon Jul 6 22:21:56 1998 Kamil Iskra - - * m68k.c (output_scc_di): Use cmpw #0 instead of tstl when - testing address registers on the 68000. - -Mon Jul 6 22:17:19 1998 Alasdair Baird - - * i386.c (is_fp_test): Fix thinko. - - * jump.c (jump_optimize): Check for CONST_INT before using INTVAL. - -Mon Jul 6 22:14:31 1998 Richard Henderson (rth@cygnus.com) - - * print-rtl.c (print_rtx): Display the real-value equivalent of - a const_double when easy. - - * real.h (REAL_VALUE_TO_TARGET_SINGLE): Use a union to pun types. - Zero memory first for predictability. - (REAL_VALUE_TO_TARGET_DOUBLE): Likewise. - * varasm.c (immed_real_const_1): Notice width of H_W_I == double. - - * regclass.c (allocate_reg_info): Initialize the entire reg_data - virtual array. - -Mon Jul 6 22:09:32 1998 Ian Lance Taylor - Jeff Law - - * i386/cygwin32.h: Add some declaration of external functions. - (ASM_DECLARE_FUNCTION_NAME): Define. - (ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL): Define. - (ASM_FILE_END): Define. - * i386/winnt.c (i386_pe_declare_function_type): New function. - (struct extern_list, extern_head): Define. - (i386_pe_record_external_function): New function. - (i386_pe_asm_file_end): New function. - - * cpplib.c (cpp_options_init): Initialize cplusplus_comments to 1, - matching July 18, 1995 change to cccp.c. If -traditional then - disable cplusplus_comments. - -Mon Jul 6 21:28:14 1998 Jeffrey A Law (law@cygnus.com) - - * combine.c (expand_compound_operation): Fix thinko in code to optimize - (zero_extend:DI (subreg:SI (foo:DI) 0)) to foo:DI. - - * Disable the following change from gcc2. Not appropriate for egcs: - - Sun Jun 7 09:30:31 1998 Richard Kenner - * reload.c (find_reloads): Give preference to pseudo that was the - reloaded output of previous insn. - -Mon Jul 6 21:07:14 1998 Kaveh R. Ghazi - - * aclocal.m4 (GCC_FUNC_PRINTF_PTR): Don't define HOST_PTR_PRINTF. - Instead, define a new macro HAVE_PRINTF_PTR which only signifies - whether we have the %p format specifier or not. - - * acconfig.h: Delete stub for HOST_PTR_PRINTF, add HAVE_PRINTF_PTR. - - * machmode.h (HOST_PTR_PRINTF): When determining the definition, - check HAVE_PRINTF_PTR to see whether "%p" is okay. - - * mips-tfile.c: Include machmode.h to get HOST_PTR_PRINTF. - - * Makefile.in (mips-tfile.o): Depend on machmode.h. - -Mon Jul 6 10:42:05 1998 Mark Mitchell - - * jump.c (duplicate_loop_exit_test): Don't refuse to copy a - section of code just because it contains - NOTE_INSN_BLOCK_{BEG,END}. - * stmt.c (expand_end_loop): Likewise. Also, don't refuse to - move CALL_INSNs or CODE_LABELs. When moving code, don't move - NOTE_INSN_BLOCK_{BEG,END}. - -Mon Jul 6 09:38:15 1998 Mark Mitchell - - * cse.c (CSE_ADDRESS_COST): New macro, based on ADDRESS_COST, but - dealing with ADDRESSOF. - (find_best_addr): Use it. - -Mon Jul 6 09:27:08 1998 Richard Henderson - - * alpha/vms.h (TRAMPOLINE_TEMPLATE): Revert last change. - -Mon Jul 6 09:25:06 1998 Dave Love - - * libgcc2.c (__eprintf): Make args consistent with prototype in - assert.h. - -Mon Jul 6 00:28:43 1998 Mark Mitchell - - * cse.c (cse_insn): When SETting (MEM (ADDRESSOF (X))) to Y, - don't claim that the former is equivalent to the latter. - -Sun Jul 5 23:58:19 1998 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_insn): Second arg is an RTX now. Update all callers. - (cse_basic_block): Keep track of the current RETVAL insn for a - libcall instead of just noting that we're in a libcall. - - * combine.c (simplify_comparison): Do not commute a AND into - a paradoxical SUBREG if not WORD_REGISTER_OPERATIONS. - - * i386/freebsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Protect with - HAVE_GAS_MAX_SKIP_P2ALIGN. - * i386/linux.h: Likewise. - -Fri Jul 3 02:33:35 1998 David S. Miller - - * sparc.c (sparc_operand, move_operand, arith_operand, - arith11_operand, arith10_operand, arith_double_operand, - arith11_double_operand, arith10_double_operand, small_int, - uns_small_int): Recognize CONSTANT_P_RTX. - (output_sized_memop, output_move_with_extension, - output_load_address, output_size_for_block_move, - output_block_move, delay_operand): Remove, has not been - enabled or referenced for years. - * sparc.md (movstrsi, block_move_insn): Likewise. - * sparc.h (PREDICATE_CODES): Define. - * linux-aout.h (MACHINE_STATE_{SAVE,RESTORE}): Override with - version which uses getcc/setcc traps to save/restore condition - codes. - * linux64.h: Likewise. - * sunos4.h: Likewise. - * linux.h: Likewise. - * sol2.h: Likewise. - * sun4o3.h: Likewise. - -Fri Jul 3 02:28:05 1998 Richard Henderson - - * alpha.c (alpha_initialize_trampoline): Hack around Pmode/ptr_mode - lossage on VMS. Reported by kkaempf@rmi.de. - * alpha/vms.h (TRAMPOLINE_TEMPLATE): Add missing 0. - -Thu Jul 2 17:41:14 1998 Nick Clifton - - * config/m32r/m32r.h (MUST_PASS_IN_STACK): Override default - version. - -Thu Jul 2 14:34:48 1998 David Edelsohn - - * expr.h (STACK_SIZE_MODE): New macro. - * explow.c (allocate_dynamic_stack_space): Use it for - mode of allocate_stack pattern increment operand. - * tm.texi (STACK_SAVEAREA_MODE, STACK_SIZE_MODE): Document. - * md.texi (stack_save_block, ...): Reflect use of macro. - - * rs6000.h (PROMOTE_MODE): Always promote to word_mode. - (PROMOTE_FUNCTION_ARGS): Define. - (PROMOTE_FUNCTION_RETURN): Define. - (FUNCTION_VALUE): Promote to word_mode if smaller. - Convert to gen_rtx_FOO. - * rs6000.md (call_indirect): Store doubleword in 64-bit mode. - Convert to gen_rtx_FOO. - * rs6000.c: Convert to gen_rtx_FOO. - -Thu Jul 2 14:16:11 1998 Michael Meissner - - * varray.{c,h}: New files to provide virtual array support. - - * Makefile.in (OBJS): Add varray.o. - (varray.o): Add new file. - (REGS_H): New variable for dependencies for files including - regs.h. Add varray.h and files it includes. Change all regs.h - dependencies to $(REGS_H). - - * toplev.c (x{m,re}alloc): If size is 0, allocate 1 byte. - (xcalloc): Provide frontend for calloc. - * {tree,rtl}.h (xcalloc): Add declaration. - - * basic-block.h (REG_BASIC_BLOCK): Convert reg_n_info to be a - varray. - - * regs.h (toplevel): Include varray.h. - (reg_n_info): Switch to use a varray. - (REG_*): Likewise. - (allocate_reg_info): Change num_regs argument to be size_t. - - * regclass.c (reg_info_data): New structure to remember groups of - reg_info structures allocated that are to be zeroed. - ({pref,alt}class_buffer): New statics to hold buffers - allocate_reg_info allocates for {pref,alt}class_buffer. - (regclass): Use {pref,alt}class_buffer to initialize - {pref,alt}class. - (allocate_reg_info): Switch to make reg_n_info use varrays. - Allocate buffers for the preferred and alter register class - information. Change num_regs argument to be size_t, not int. - - * flow.c (reg_n_info): Switch to use varrays. - -Thu Jul 2 10:11:47 1998 Robert Lipe - - * install.texi (sco3.2v5): Document new --with-gnu-as flag. - * config/i386/sco5.h (JUMP_TABLES_IN_TEXT_SECTION): Defined as - in other targets. - (USE_GAS): Conditionalize away native assembler usage. - * config/i386/sco5gas.h: New file. - * config/i386/t-sco5gas: New file. - * configure.in (ix86-sco3.2v5*): Use new files if --with-gnu-as - -Thu Jul 2 08:20:00 1998 Catherine Moore - - * haifa-sched.c (alloc_EXPR_LIST): Change to use - unused_expr_list. - -Thu Jul 2 14:13:28 1998 Dave Love - - * Makefile.in (install-info): Don't use $realfile. Ignore - possible errors from the install-info program. - -Thu Jul 2 01:53:32 1998 Alasdair Baird - - * combine.c (simplify_comparison): Apply SUBREG_REG to SUBREGs. - -Wed Jul 1 23:06:03 1998 Richard Henderson - - * i386.h (HARD_REGNO_MODE_OK): Kill spurious test. - (MODES_TIEABLE_P): Tie SImode and HImode. - -1998-07-01 Andreas Jaeger - - * invoke.texi (Optimize Options): Fix typo. - -Wed Jul 1 22:25:43 1998 Jim Wilson - - * xcoffout.c (xcoffout_begin_function): Call xcoffout_block for - the zero'th block. - -Wed Jul 1 23:12:58 1998 Ken Raeburn - - * h8300.c (print_operand): Delete %L support. - * h8300.md (branch_true, branch_false): Use %= with a prefix - instead of %L for local branch labels. - -Wed Jul 1 21:27:13 1998 J"orn Rennecke - - * reload1.c (emit_reload_insns): Use proper register classes for - SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_MEMORY_NEEDED code. - -Wed Jul 1 21:17:36 1998 J"orn Rennecke - - * reload.c (find_reloads): If there are multiple - RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_OUTPUT_ADDRESS reloads for - one operand, change RELOAD_FOR_INPADDR_ADDRESS / - RELOAD_FOR_OUTADDR_ADDRESS for all but the first - RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_OUTPUT_ADDRESS reloads. - -Wed Jul 1 17:23:23 1998 J"orn Rennecke - - * regmove.c (fixup_match_2): Check that P has RTX_CLASS 'i' before - using its PATTERN. - -Wed Jul 1 05:04:41 1998 Richard Henderson - - * expr.c (emit_group_load, emit_group_store): Rewrite considering - the size and alignment of the structure being manipulated. - * expr.c, calls.c, function.c: Update all callers. - * expr.h: Update prototypes. - * cse.c (invalidate): Cope with parallels. - -Wed Jul 1 04:22:23 1998 Richard Henderson - - * sparc.c (function_arg_record_value): Take a MODE arg with which to - create the PARALLEL. Update all callers. - -Wed Jul 1 04:10:35 1998 Richard Henderson - - * expr.c (expand_assignment, store_constructor, expand_expr): Use - convert_memory_address instead of convert_to_mode when possible. - -Wed Jul 1 03:48:00 1998 Richard Henderson - - * alpha.c (alpha_initialize_trampoline): Take arguments describing - the layout. Use ptr_mode. Disable hint generation. Use gen_imb. - * alpha.h (INITIALIZE_TRAMPOLINE): Pass extra args to the init func. - (TRANSFER_FROM_TRAMPOLINE): Move ... - * alpha/osf.h: ... here. - * alpha/vms.h (INITIALIZE_TRAMPOLINE): Use alpha_initialize_trampoline. - (TRANSFER_FROM_TRAMPOLINE): Remove undef. - * alpha/win-nt.h: Likewise. - * alpha/vxworks.h: Likewise. - - * alpha/linux.h: Revert gcc2 merge lossage. - -Wed Jul 1 10:56:55 1998 Andreas Schwab - - * c-decl.c (grokdeclarator): Don't warn about implicit int in - `typedef foo = bar'. - -Wed Jul 1 02:12:33 1998 Robert Lipe - - * i386.c (asm_output_function_prefix): Make 686 function - prologues not issue .types for non-global labels. - -Tue Jun 30 23:46:53 1998 Dmitrij Tejblum - - * i386/freebsd.h (WCHAR_TYPE): Chagne to an "int". - (WCHAR_TYPE_SIZE): Update appropriately. - -Tue Jun 30 23:16:39 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (recompute_reg_usage): Does not return a value. - * rtl.h (recompute_reg_usage): Update prototype. - - * jump.c (jump_optimize): Show that the jump chain is not - valid when not optimizing. - -Tue Jun 30 16:01:01 1998 Richard Henderson - - * rtl.def (CONSTANT_P_RTX): New. - * rtl.h (CONSTANT_P): Recognize it. - * cse.c (fold_rtx): Eliminate it. - * expr.c (can_handle_constant_p): New variable. - (init_expr_once): Initialize it. - (expand_builtin): Generate CONSTANT_P_RTX if the expression is not - immediately recognizable as a constant. - - * alpha.c (reg_or_6bit_operand): Recognize CONSTANT_P_RTX. - (reg_or_8bit_operand, cint8_operand, add_operand): Likewise. - (sext_add_operand, and_operand, or_operand): Likewise. - (reg_or_cint_operand, some_operand, input_operand): Likewise. - * alpha.h (PREDICATE_CODES): Add CONSTANT_P_RTX where needed. - -1998-06-30 Benjamin Kosnik - - * dbxout.c (dbxout_type_methods): Remove warn_template_debugging. - -Tue Jun 30 14:03:34 1998 Kaveh R. Ghazi - - * aclocal.m4 (GCC_NEED_DECLARATION): Accept an optional second - argument, which is typically preprocessor code used to draw in - additional header files when looking for a function declaration. - (GCC_NEED_DECLARATIONS): Likewise. - - * configure.in (GCC_NEED_DECLARATIONS): Add checks for getrlimit - and setrlimit, search for them in sys/resource.h. - - * acconfig.h: Add stubs for NEED_DECLARATION_GETRLIMIT and - NEED_DECLARATION_SETRLIMIT. - - * system.h: Prototype getrlimit/setrlimit if necessary. - -Tue Jun 30 10:54:48 1998 Mark Mitchell - - * rtl.texi: Don't say that RTX_INTEGRATED_P is not depended - upon. - -Tue Jun 30 13:11:42 1998 Franz Sirl - - * rs6000/sysv4.h (asm output): Add tabs for asm directives. - -Tue Jun 30 13:11:42 1998 David Edelsohn - - * Makefile.in (FLAGS_TO_PASS): Set AR_FLAGS to AR_FOR_TARGET_FLAGS. - -Tue Jun 30 08:59:15 1998 Kaveh R. Ghazi - - * gansidecl.h (ATTRIBUTE_UNUSED): Use __unused__ not `unused'. - Don't define NULL here. Also, remove all vestiges of autoconf - based checks for bcmp/bcopy/bzero/index/rindex. - - * system.h: Immediately after including stdio.h, check for and if - necessary provide a default definition of NULL. - -Tue Jun 30 08:22:05 1998 Michael Meissner - - * reload1.c (reload_cse_simplify_operands): Call - fatal_insn_not_found, not abort. - -Tue Jun 30 02:34:02 1998 Jeffrey A Law (law@cygnus.com) - - * choose-temp.c (make_temp_file): Accept new argument for the - file suffix to use. Allocate space for it and add it to the - template. - * mkstemp.c (mkstemps): Renamed from mkstemp. Accept new argument - for the length of the suffix. Update template structure checks - to handle optional suffix. - * collect2.c (make_temp_file): Update prototype. - (main): Put proper suffixes on temporary files. - * gcc.c (make_temp_file): Update prototype. - (do_spec_1): Put proper suffixes on temporary files. - -Tue Jun 30 00:56:19 1998 Bruno Haible - - * invoke.texi: Document new implicit structure initialization - warning. - -Mon Jun 29 21:40:15 1998 J"orn Rennecke - - * toplev.c (flag_dump_unnumbered): Declare. - (f_options): Add dump-unnumbered. - * print-rtl.c (flag_dump_unnumbered): Define. - (print_rtx): Print only '#' for insn numbers if flag_dump_unnumbered - is nonzero. - (print_rtl): Don't output line number notes if flag_dump_unnumbered - is nonzero. - * flow.c (print_rtl_with_bb): Don't output newline after line - numbers note if flag_dump_unnumbered is nonzero. - -Mon Jun 29 22:12:06 1998 Jeffrey A Law (law@cygnus.com) - - * Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 for - details. - - * pa.c, pa.h, pa.md: Convert to gen_rtx_FOO. - -Mon Jun 29 20:12:41 1998 Kaveh R. Ghazi - - * Makefile.in (fix-header): Don't needlessly depend on cpperror.o. - - * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Cast expansion to - void since it is evaluated in a comma list. - - * mips.h (ASM_GENERATE_INTERNAL_LABEL): Always sprintf `NUM' - argument as a long and cast `NUM' to long to ensure it is of the - proper width. Wrap macro arguments in parens when they appear in - the expansion. - - * sol2.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - - * sparc.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - (ASM_DECLARE_RESULT): Fix fprintf format specifier to match - function argument return type. - (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_FP_P, - REGNO_OK_FOR_CCFP_P): Use `(unsigned)' not `U'. - - * cpplib.c (cpp_message_from_errno): Remove unneeded argument to - cpp_message. - - * dbxout.c: Fix the comments after an #endif to reflect the actual - condition tested in the preceding #if. - - * except.c (find_all_handler_type_matches): Switch to old-style - function definition. - - * expr.c (expand_builtin): Remove unused variable `type' twice. - - * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Cast -1 before comparing it - to an unsigned long. - - * haifa-sched.c (print_insn_chain): Remove unused function. - - * objc/objc-act.c (build_msg_pool_reference): Hide prototype and - definition. - - * toplev.c: When testing whether to include dbxout.h, also include - it when XCOFF_DEBUGGING_INFO is defined. - - * unroll.c (unroll_loop): Add parentheses around assignment used - as truth value. - -Mon Jun 29 12:18:00 1998 Catherine Moore - - * config/lb1spc.asm (.div, .udiv): Replace routines. - -Mon Jun 29 09:44:24 1998 Mark Mitchell - - * rtl.h: Update comment about special gen_rtx variants. - * emit-rtl.c (gen_rtx): Handle MEMs using gen_rtx_MEM. - -Sun Jun 28 20:58:51 1998 Jeffrey A Law (law@cygnus.com) - - * choose-temp.c (choose_temp_base): Restore original variant of - this function for compatibility. - (make_temp_file): This is the new, preferred interface to create - temporary files. - * collect2.c (choose_temp_base): Delete declaration. - (make_temp_file): Declare. - (temp_filename_length, temp_filename): Delete. - (main): Use make_temp_file to get temporary files. Use --lang-c - to force the resulting ctort/dtor file to be compiled with the C - compiler. Make sure to remove temporary files on all exit paths. - * gcc.c (make_temp_file): Provide prototype if MKTEMP_EACH_FILE is - defined. - (choose_temp_base): Only provide prototype if MKTEMP_EACH_FILE is - not defined. - (do_spec): Use make_temp_file if MKTEMP_EACH_FILE is defined. - -Sun Jun 28 08:57:09 1998 Kaveh R. Ghazi - - * configure.in (GCC_NEED_DECLARATIONS): Add strerror, getcwd and - getwd. - - * acconfig.m4: Add stubs for NEED_DECLARATION_STRERROR, - NEED_DECLARATION_GETCWD and NEED_DECLARATION_GETWD. - - * cccp.c: Remove strerror()/sys_nerr/sys_errlist decls. - (my_strerror): Add prototype and make it static. - - * collect2.c: Likewise. - - * cpplib.c: Likewise. - - * gcc.c: Likewise, but keep `my_strerror' extern. - - * protoize.c: Likewise. - - * pexecute.c (my_strerror): Add argument to prototype. - - * system.h: Add prototypes for getcwd, getwd and strerror. Add - extern decls for sys_nerr and sys_errlist. Make abort decl - explicitly extern. - - * getpwd.c: Remove decls for getwd and getcwd. - -Sun Jun 28 02:11:16 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Jun 27 23:32:25 1998 Richard Henderson - - * jump.c (jump_optimize): Use side_effects_p & may_trap_p instead - of rtx_unsafe_p. Use modified_between_p instead of reg_set_between_p. - Allow FP moves to be optimized. - (rtx_unsafe_p): Delete. - -Sat Jun 27 23:02:04 1998 Richard Henderson - - * objc/archive.c: Remove prototypes. - -Sat Jun 27 22:37:05 1998 Jeffrey A Law (law@cygnus.com) - - * tm.texi (NEED_MATH_LIBRARY): Document new target macro. - - * Makefile.in (gencheck): Remove $(TREE_H) dependency. - -Sat Jun 27 20:20:00 1998 John Carr - - * dsp16xx.h (FIRST_PSEUDO_REGISTER): Add parentheses to definition. - * dsp16xx.c (next_cc_user_unsigned): New function. - Remove save_next_cc_user_code. - (print_operand): Use HOST_WIDE_INT_PRINT_* macros. - * dsp16xx.md: Call next_cc_user_unsigned instead of using - save_next_cc_user_code. - Use gen_rtx_* functions instead of gen_rtx. - -Sat Jun 27 20:18:34 1998 Franz Sirl - - * rs6000.h: Add trap_comparison_operator to PREDICATE_CODES. - -Sat Jun 27 16:45:42 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (count_reg_sets): New function. - (count_reg_sets_1, count_ref_references): Likewise. - (recompute_reg_usage): Likewise. - * rtl.h (recompute_reg_usage): Add prototype. - * toplev.c (rest_of_compilation): Call recompute_reg_usage just - before local register allocation. - -Sat Jun 27 13:15:30 1998 Richard Henderson - - * alpha.md (negsf, negdf): Revert Jan 22 change. - -Sat Jun 27 07:35:21 1998 Kaveh R. Ghazi - - * mkstemp.c: Include gansidecl.h. Rename uint64_t to gcc_uint64_t. - (mkstemp): Remove size specifier for variable `letters'. Call - gettimeofday, not __gettimeofday. - - * Makefile.in (EXPR_H): New dependency variable. - (c-typeck.o): Depend on $(EXPR_H) instead of expr.h. - (c-iterate.o): Likewise. - (gencheck): Depend on $(TREE_H) instead of tree.h, etc. - (stor-layout.o): Depend on $(EXPR_H) instead of expr.h. - (toplev.o): Likewise. Also depend on $(RECOG_H) instead of recog.h. - (varasm.o): Depend on $(EXPR_H) instead of expr.h. - (function.o): Likewise. - (stmt.o): Likewise. - (except.o): Likewise. - (expr.o): Likewise. - (calls.o): Likewise. - (expmed.o): Likewise. - (explow.o): Likewise. - (optabs.o): Likewise. - (sdbout.o): Likewise. - (dwarf2out.o): Likewise. - (emit-rtl.o): Likewise. - (integrate.o): Likewise. - (jump.o): Likewise. - (cse.o): Likewise. - (gcse.o): Likewise. Also depend on $(BASIC_BLOCK_H) instead of - basic-block.h. - (loop.o): Depend on $(EXPR_H) instead of expr.h. - (unroll.o): Likewise. - (combine.o): Likewise. - (reload.o): Likewise. - (reload1.o): Likewise. - (caller-save.o): Likewise. - (reorg.o): Likewise. - (alias.o): Don't depend on insn-codes.h. - (regmove.o): Depend on $(RECOG_H)/$(EXPR_H) instead of recog.h/expr.h. - (insn-emit.o): Depend on $(EXPR_H) instead of expr.h. - (insn-opinit.o): Likewise. - -Sat Jun 27 01:35:14 1998 Jeffrey A Law (law@cygnus.com) - - * choose-temp.c (choose_temp_base): Remove MPW bits. Use mkstemp - instead of mktemp. - * gcc.c (MKTEMP_EACH_FILE): Define. - (main): No need to call choose_temp_base if we are going to - use choose_temp_base to create each file later. - * mkstemp.c: New file. Adapted from glibc. - * Makefile.in (xgcc, colect2, protoize, unprotoize): Link in mkstemp.o. - (mkstemp.o): Add dependencies. - - * configure.in (gettimeofday): Check for its existence. - * config.in (HAVE_GETTIMEOFDAY): Define. - * configure: Rebuilt. - -1998-06-26 Michael Meissner - - * rs6000.md (ne 0, non power case): Add missing & constraint. - Name pattern ne0. - (negative abs insns): Add pattern names. - -Fri Jun 26 17:36:42 1998 Dave Love - - * Makefile.in (install-info): Run install-info program in separate - loop. - -Fri Jun 26 16:03:15 1998 Michael Meissner - - * haifa-sched.c (schedule_block): Add hooks for the machine - description to reorder the ready list, and update how many more - instructions can be issued this cycle. - * tm.texi (MD_SCHED_{INIT,REORDER,VARIABLE_ISSUE}): Document. - -Fri Jun 26 11:54:11 1998 David S. Miller - - * config/sparc/sparc.h (REGNO_OK_FOR_{INDEX,BASE,FP,CCFP}_P): - Explicitly mark the constant being compared against as unsigned. - * config/sparc/sparc.c (sparc_select, cpu_default, cpu_table): - Fully initialize final members. - (mem_aligned_8): Explicit init of offset to zero. - (output_function_prologue): Explicit init of n_regs to zero. - (output_function_epilogue): Likewise, and mark arg size as - unused. - (init_cumulative_args): Mark libname and indirect as unused. - (function_arg_pass_by_reference): Likewise for cum and named. - (sparc_builtin_saveregs): Likewise for arglist. - (sparc_flat_eligible_for_epilogue_delay): Likewise for slot. - -Fri Jun 26 06:58:54 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (SECONDARY_INPUT_RELOAD_CLASS): Only need a secondary reload - if reloading a MEM. - - * arm.h (arm_adjust_cost): Renamed bogus prototype from - arm_adjust_code. - (bad_signed_byte_operand): Add prototype. - * arm.c (arm_override_options): Make I unsigned. - (const_ok_for_arm): Add casts to the constants. - (load_multiple_operation): Don't redeclare elt in sub-block. - (arm_gen_movstrqi): Delete external declaration of optimize. - (gen_compare_reg): Declare parameter fp. - - * arm.c (final_prescan_insn): Only initialize scanbody if the insn - has a pattern. - -Fri Jun 26 09:31:24 1998 Kaveh R. Ghazi - - * alpha.c: Include system.h and toplev.h. - (cint8_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. - (const48_operand): Likewise. - (mode_width_operand): Likewise. - (mode_mask_operand): Likewise. - (mul8_operand): Likewise. - (current_file_function_operand): Likewise. - (signed_comparison_operator): Likewise. - (divmod_operator): Likewise. - (any_memory_operand): Likewise. - (alpha_return_addr): Likewise for parameter `frame'. - (alpha_builtin_saveregs): Likewise for parameter `arglist'. - (vms_valid_decl_attribute_p): Likewise for parameters `decl' and - `attributes'. - (alpha_start_function): Likewise for parameter `decl'. Use - HOST_WIDE_INT_PRINT_DEC in call to fprintf. Fix various format - specifiers. Remove unused variables `lab' and `name'. - (alpha_end_function): Mark parameter `decl' with ATTRIBUTE_UNUSED. - (check_float_value): Likewise for parameter `overflow'. - (alpha_need_linkage): Likewise for parameters `name' and `is_local'. - - * alpha.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Define as - taking an argument. - (ASM_OUTPUT_SHORT): Cast argument to `int' in call to fprintf. - (ASM_OUTPUT_CHAR): Likewise. - (ASM_OUTPUT_BYTE): Likewise. - (PRINT_OPERAND_ADDRESS): Use HOST_WIDE_INT_PRINT_DEC in call to - fprintf. - (PUT_SDB_EPILOGUE_END): Mention argument `NAME' in definition. - Add prototypes for functions in alpha.c. - - * alpha.md (ashldi3): Add default case in switch. - -1998-06-26 Manfred Hollstein - - * Makefile.in (gcc_version, gcc_version_trigger): New macros. - (version): Initialize from $(gcc_version). - - * configure.in (version): Rename to gcc_version. - (gcc_version_trigger): New variable; call AC_SUBST for it and - emit it into the generated config.status. - * configure: Regenerate. - -Thu Jun 25 12:47:41 1998 Mark Mitchell - - * fold-const.c (make_range): Don't go looking at TREE_OPERANDs of - nodes that are not expressions. - -Thu Jun 25 15:08:16 1998 Mark Mitchell - - * invoke.texi (-fstrict-aliasing): Document. - * rtl.texi (MEM_ALIAS_SET): Document. - - * flags.h (flag_strict_aliasing): Declare. - * toplev.c (flag_strict_aliasing): Define. - (f_options): Add -strict-aliasing. - (main): Set flag_strict_aliasing if -O2 or higher. - - * tree.h (tree_type): Add alias_set field. - (TYPE_ALIAS_SET): New macro. - (TYPE_ALIAS_SET_KNOWN_P): Likewise. - (get_alias_set): Declare. - * tree.c (lang_get_alias_set): Define. - (make_node): Initialize TYPE_ALIAS_SET. - (get_alias_set): New function. - * print-tree.c (print_node): Dump the alias set for a type. - - * c-tree.h (c_get_alias_set): Declare. - * c-common.c (c_get_alias_set): New function. - * c-decl.c (init_decl_processing): Set lang_get_alias_set. - - * expr.c (protect_from_queue): Propagate alias sets. - (expand_assignment): Calculate alias set for new MEMs. - (expand_expr): Likewise. - * function.c (put_var_into_stack): Likewise. - (put_reg_into_stack): Likewise. - (gen_mem_addressof): Likewise. - (assign_parms): Likewise. - * stmt.c (expand_decl): Likewise. - * varasm.c (make_decl_rtl): Eliminate redundant clearing of - DECL_RTL. Calculate alias set for new MEMs. - - * rtl.def (REG): Add dummy operand. - (MEM): Add extra operand to store the MEM_ALIAS_SET. - * rtl.h (MEM_ALIAS_SET): New macro. - (gen_rtx_MEM): Declare. - * emit-rtl.c (gen_rtx_MEM): New function. - * gengenrtl.c (sepcial_rtx): Make MEMs special. - - * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. - (DIFFERENT_ALIAS_SETS_P): Likewise. - (canon_rtx): Propagate the alias set to the new MEM. - (true_dependence): Check the alias sets. - (anti_dependence): Likewise. - (output_dependence): Likewise. - * explow.c (stabilize): Progoate alias sets. - * integrate.c (copy_rtx_and_substitute): Likewise. - * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P - in an unpredictable state. Propagate alias sets. - * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which - we have no alias information. - -Thu Jun 25 16:59:18 1998 Andrew MacLeod - - * except.h (CATCH_ALL_TYPE): Definition moved to eh-common.h. - (find_all_handler_type_matches): Add function prototype. - * eh-common.h (CATCH_ALL_TYPE): Definition added. - * except.c (find_all_handler_type_matches): Add function to find all - runtime type info in the exception table. - (output_exception_table_entry): Special case for CATCH_ALL_TYPE. - -Thu Jun 25 15:47:55 1998 Kaveh R. Ghazi - - * Makefile.in (xcoffout.o): Depend on toplev.h, output.h and dbxout.h. - - * config/fp-bit.c (_fpmul_parts): Move variables `x', `ylow', - `yhigh' and `bit' into the scope in which they are used. - (_fpdiv_parts): Remove unused variables `low', `high', `r0', `r1', - `y0', `y1', `q', `remainder', `carry', `d0' and `d1'. - - * rs6000.c: Move include of output.h below tree.h. Include toplev.h. - (any_operand): Mark unused parameters `op' and `mode' with - ATTRIBUTE_UNUSED. - (count_register_operand): Likewise for parameter `mode'. - (fpmem_operand): Likewise. - (short_cint_operand): Likewise. - (u_short_cint_operand): Likewise. - (non_short_cint_operand): Likewise. - (got_operand): Likewise. - (got_no_const_operand): Likewise. - (non_add_cint_operand): Likewise. - (non_logical_cint_operand): Likewise. - (mask_operand): Likewise. - (current_file_function_operand): Likewise. - (small_data_operand): Likewise for parameters `op' and `mode' but - only when !TARGET_ELF. - (init_cumulative_args): Mark parameters `libname' with - ATTRIBUTE_UNUSED. - (function_arg_pass_by_reference): Likewise for parameters `cum', - `mode' and `named'. - (expand_builtin_saveregs): Likewise for parameter `args'. - (load_multiple_operation): Likewise for parameter `mode'. - (store_multiple_operation): Likewise. - (branch_comparison_operator): Likewise. - (secondary_reload_class): Likewise. - (print_operand): Add parentheses around & operation. - (output_prolog): Mark parameter `size' with ATTRIBUTE_UNUSED. - (output_epilog): Likewise. Cast argument to fprintf to int. - (rs6000_adjust_cost): Mark parameter `dep_insn' with ATTRIBUTE_UNUSED. - (rs6000_valid_decl_attribute_p): Likewise for parameters `decl', - `attributes', `identifier' and `args'. - (rs6000_valid_type_attribute_p): Likewise for parameter `attributes'. - (rs6000_comp_type_attributes): Likewise for parameters `type1' and - `type2'. - (rs6000_set_default_type_attributes): Likewise for parameter `type'. - - * rs6000.h (RTX_COSTS): Add parentheses around & operation. - (toc_section, private_data_section, trap_comparison_operator): Add - prototypes. - - * dbxout.h (dbxout_parms, dbxout_reg_parms, dbxout_syms): Add - prototypes. - - * xcoffout.c: Include toplev.h, outout.h and dbxout.h. - - * xcoffout.h (stab_to_sclass, xcoffout_begin_function, - xcoffout_begin_block, xcoffout_end_epilogue, - xcoffout_end_function, xcoffout_end_block, - xcoff_output_standard_types, xcoffout_declare_function, - xcoffout_source_line): Add prototypes. - -Thu Jun 25 09:54:55 1998 Nick Clifton - - * config/arm/arm.h (REG_ALLOC_ORDER): Add ARG_POINTER_REGNUM, - noticed by grahams@rcp.co.uk. - -Thu Jun 25 11:12:29 1998 Dave Brolley - - * gcc.c (default_compilers): Use new | syntax to eliminate - string concatenation. - -Thu Jun 25 01:00:48 1998 Richard Henderson - - * alpha.c (alpha_function_name): Delete. - (alpha_ra_ever_killed): Notice current_function_is_thunk. - (alpha_sa_mask, alpha_sa_size, alpha_does_function_need_gp): Likewise. - (alpha_start_function): Reorg from output_prologue. - (alpha_end_function): Reorg from output_epilogue. - * alpha.h (ASM_DECLARE_FUNCTION_NAME): Call alpha_start_function. - (ASM_DECLARE_FUNCTION_SIZE): New. - (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Delete. - (PROFILE_BEFORE_PROLOGUE): Set. - (ASM_OUTPUT_MI_THUNK): Remove bits now output by start/end_function. - * alpha/win-nt.h (ASM_OUTPUT_MI_THUNK): Likewise. - -Thu Jun 25 01:18:47 1998 John Wehle (john@feith.com) - - * i386/freebsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Define. - -1998-06-25 Herman A.J. ten Brugge - - * expr.c (expand_assignment): Rework address calculation for structure - field members to expose more invariant computations to the loop - optimizer. - (expand_expr): Likewise. - -Wed Jun 24 22:44:22 1998 Jeffrey A Law (law@cygnus.com) - - * local-alloc.c (block_alloc): Do not try to avoid false dependencies - when SMALL_REGISTER_CLASSES is nonzero. - -Wed Jun 24 17:55:15 1998 Klaus Kaempf - - * alpha.md (call_vms, call_value_vms): Strip leading * from symbol. - -Wed Jun 24 16:27:23 1998 John Carr - - * expr.c (get_memory_rtx): New function. - (expand_builtin): Call get_memory_rtx for MEM arguments to builtin - string functions. - - * expmed.c (init_expmed): Initialize all elements of *_cost arrays. - - * optabs.c: Use gen_rtx_FOO (...) instead of gen_rtx (FOO, ...). - * expr.c: Likewise. - * explow.c: Likewise. - * combine.c: Likewise. - * reload1.c: Likewise. - * gcse.c: Likewise. - -Wed Jun 24 15:13:01 1998 Dave Brolley - - * README.gnat: Add patch for new lang_decode_options interface. - -Wed Jun 24 09:14:04 1998 Andrew MacLeod - - * except.c (start_catch_handler): Do nothing if EH is not on. - -1998-06-24 Manfred Hollstein - - * configure.in (gxx_include_dir): Initialize default value depending on - new flag --enable-version-specific-runtime-libs; remove superfluous - default initialization afterwards. - * configure: Regenerate. - -Wed Jun 24 01:32:12 1998 David S. Miller - - * toplev.c (rest_of_compilation): Revert May 15 change. - -Tue Jun 23 21:27:27 1998 Ken Raeburn - - * reload.c (find_reloads): Fix check for failure to match any - alternative, to account for Mar 26 change in initial "best" cost. - -Tue Jun 23 16:44:21 1998 Dave Brolley - - * cpplib.c (do_line): Typo broke #line directive. - (cpp_message_from_errno): New function. - (cpp_error_from_errno): Call cpp_message_from_errno. - * cpplib.h (cpp_message_from_errno): New function. - -Tue Jun 23 13:38:18 1998 Andrew MacLeod - - * libgcc2.c (__get_eh_table_version, __get_eh_table_language): New - functions to return exception descriptor information. - (find_exception_handler): Pass match_info field to runtime matcher, - not a descriptor table entry. - -Tue Jun 23 09:30:58 1998 Dave Love - - * cpp.texi, gcc.texi: Add @dircategory, @direntry meant to - accompany previous Makefile.in (install-info) change. - -Tue Jun 23 10:06:07 1998 Andrew MacLeod - - * eh-common.h (struct __eh_info): Remove coerced value field. - * libgcc2.c (find_exception_handler): Don't set coerced_value field. - * except.c (get_dynamic_handler_chain, get_dynamic_cleanup_chain): Use - POINTER_SIZE instead of Pmode. - (expand_start_all_catch): Call start_catch_handler() if we are not - using new style exceptions. - -Tue Jun 23 06:45:00 1998 Catherine Moore - - * varasm.c (assemble_variable): Remove reference to warn_bss_align. - -Mon Jun 22 23:57:31 1998 David S. Miller - - * config/sparc/sparc.md (zero_extendhidi2, extendhisi2, - extendqihi2, extendqisi2, extendqidi2, extendhidi2, adddi3, - subdi3, negdi2, call, call_value, untyped_return, nonlocal_goto, - splits and peepholes): Change remaining generic gen_rtx calls to - specific genrtl ones. - * config/sparc/sparc.c: Likewise. - -Mon Jun 22 22:21:46 1998 Richard Henderson - - * gcc.c (handle_braces): Recognize | between options as an or. - -Mon Jun 22 23:13:47 1998 John Wehle (john@feith.com) - - * i386/freebsd-elf.h (JUMP_TABLES_IN_TEXT_SECTION): Define as flag_pic. - * i386/sysv4.h (JUMP_TABLES_IN_TEXT_SECTION): Define as flag_pic. - - * i386.md (exception_receiver): Define. - -Mon Jun 22 12:01:48 1998 Jim Wilson - - * Makefile.in (PROTOIZE_INSTALL_NAME, UNPROTOIZE_INSTALL_NAME, - PROTOIZE_CROSS_NAME, UNPROTOIZE_CROSS_NAME): New variables. - (install-common): Use them. - - * gcse.c (add_label_notes): New function. - (pre_insert_insn): Call it. - * unroll.c (unroll_loop): Look for insns with a REG_LABEL note, and - pass the label to set_label_in_map. - -Mon Jun 22 19:01:14 1998 Dave Love - - * Makefile.in (install-info): Fix typpo in previous change. - -Mon Jun 22 11:10:00 1998 Catherine Moore - - * varasm.c (assemble_variable): Emit alignment warning. - -Mon Jun 22 08:18:46 1998 Kaveh R. Ghazi - - * Makefile.in (varasm.o): Depend on sdbout.h. - (sdbout.o): Depend on toplev.h. - - * collect2.c (scan_prog_file): Cast fprintf argument to `long' and - use %ld specifier. - - * final.c (shorten_branches): Cast first arg of `bzero' to char *. - - * genextract.c (main): When creating insn-extract.c, mark variable - `i' with ATTRIBUTE_UNUSED. - - * genpeep.c (main): When creating insn-peep.c, mark variables - `insn', `x' and `pat' with ATTRIBUTE_UNUSED. - - * objc/init.c (__objc_tree_print): Wrap function definition in - macro `DEBUG'. - - * objc/objc-act.c (encode_array): Cast sprintf argument to `long' - and use %ld specifier. - (adorn_decl): Likewise, twice. - - * reload1.c (reload_cse_regs): Cast first arg of `bzero' to char *. - - * sdbout.c: Include output.h and toplev.h. - (PUT_SDB_INT_VAL): Use HOST_WIDE_INT_PRINT_DEV to print argument - `a'. Cast `a' to HOST_WIDE_INT to force it to always be so. - (PUT_SDB_SIZE): Likewise. - - * sdbout.h (sdbout_mark_begin_function): Add prototype. - - * stmt.c (check_for_full_enumeration_handling): Cast argument of - `warning' to long and use %ld specifier. - - * toplev.c (main): Likewise for `fprintf'. - - * toplev.h (output_file_directive): Add prototype. - - * unroll.c (unroll_loop): Use HOST_WIDE_INT_PRINT_DEC specifier in - call to `fprintf'. - (precondition_loop_p): Likewise. - - * varasm.c Include sdbout.h. - (assemble_static_space): Move sometimes-unused variable `rounded' - into the scope in which it is used. - - * mips.c (gpr_mode): Don't say `static' twice. - - * cpplib.c (cpp_handle_option): Don't pass unneeded NULL to cpp_fatal. - - * objc/objc-act.c (init_selector): Hide prototype and definition. - - * optabs.c (gen_cond_trap): Remove unused variable `icode'. - - * regmove.c (copy_src_to_dest): Likewise for `i'. - - * mips-tfile.c (add_local_symbol): Cast width format specifier to int. - (add_ext_symbol): Likewise. - (add_file): Likewise. - (parse_def): Likewise. - (write_varray): Use HOST_PTR_PRINTF to print a pointer. Fix - remaining format specifiers and arguments. - (write_object): Likewise, several times. - (read_seek): Likewise. - (out_of_bounds): Likewise. - (allocate_cluster): Likewise. - (xmalloc): Likewise. - (xcalloc): Likewise. - (xrealloc): Likewise. - (xfree): Likewise. - - * mips-tdump.c (print_symbol): Likewise. - -Sun Jun 21 17:05:34 1998 Dave Love - - * Makefile.in (install-info): Use install-info program if - available, per GNU standard. - -Sun Jun 21 18:56:44 1998 Jeffrey A Law (law@cygnus.com) - - * invoke.texi: Document -mrelax for the mn10300 and mn10200. - - * basic-block.h (init_regset_vector): Delete declaration. - * flow.c (init_regset_vector): Make it static and add a prototype. - - * bitmap.h (debug_bitmap): Declare. - - * haifa-sched.c (debug_ready_list): Make static. - - * toplev.h (fancy_abort): Declare. - -Sun Jun 21 18:30:13 1998 H.J. Lu (hjl@gnu.org) - - * basic-block.h (init_regset_vector): New declaration. - - * Makefile.in (sdbout.o): Add insn-codes.h to dependency. - - * global.c: Include machmode.h amd move hard-reg-set.h before - rtl.h. - - * haifa-sched.c (insn_issue_delay, birthing_insn_p, - adjust_priority, print_insn_chaino): New declaration. - (schedule_insns): Remove declaration. - (init_target_units, get_visual_tbl_length, - init_block_visualization): Add prototype. - - * integrate.c (pushdecl, poplevel): Remove declaration. - - * rtl.h (expand_expr): Remove declaration. - - * loop.c (oballoc): Remove declaration. - (replace_call_address): Add prototype. - -Sun Jun 21 01:08:17 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Jun 21 01:16:38 1998 John Wehle (john@feith.com) - - * i386.c (output_fp_conditional_move): Don't bother handling - (cc_prev_status.flags && CC_NO_OVERFLOW) since the INSN patterns - prevent this from happening. - - * i386.md (nonlocal_goto_receiver): Delete. - -Sun Jun 21 00:42:20 1998 H.J. Lu (hjl@gnu.org) - - * Makefile.in (crtbeginS.o, crtendS.o): Add -fno-exceptions and - -DCRTSTUFFS_O. - (INSTALL): cd $(srcdir) before make. - - * flow.c (allocate_for_life_analysis, init_regset_vector): - Remove declaration. - - * function.h (get_first_block_beg): New declaration. - - * gbl-ctors.h (__do_global_dtors): Add prototype. - - * gcov-io.h (__fetch_long): New declaration. - (__store_long): Likewise. - (__read_long): Likewise. - (__write_long): Likewise. - - * gcov.c (print_usage): New declaration. - - * Makefile.in (c-iterate.o): Depend on insn-codes.h too. - -Sat Jun 20 00:36:16 1998 Jeffrey A Law (law@cygnus.com) - - * calls.c (expand_call): Initialize "src" and "dest". - * stmt.c (expand_return): Likewise. - * expmed.c (extract_split_bit_field): Similarly for "result" - * gcse.c (compute_hash_table): Mark first arg as unused. - * jump.c (jump_optimize): Initialize reversep. - * tree.c (make_node): Initialize length. - - * c-common.c (check_format_info): Initialize length_char and - fci to keep -Wall quiet. - - * except.c (jumpif_rtx): Put declaration and definition - inside a suitable #ifdef. - (jumpifnot_rtx): Delete dead function. - - * i386.h (output_int_conditional_move): Declare. - (output_fp_conditional_move): Likewise. - (ix86_can_use_return_insn_p): Likewise. - - * optabs.c (init_traps): Put prototype inside a suitable #ifdef. - -Sat Jun 20 00:27:40 1998 Graham - - * alias.c: Include toplev.h. - * caller-save.c: Include toplev.h. - * combine.c: Include toplev.h. - * flow.c Include toplev.h. - * global.c: Include toplev.h. - * jump.c: Include toplev.h. - * local-alloc.c: Include toplev.h. - * loop.c: Include toplev.h. - * regmove.c: Include toplev.h. - * stupid.c: Include toplev.h. - * unroll.c: Include toplev.h. - * Makefile.in: Add toplev.h dependencies. - -Fri Jun 19 22:40:25 1998 Jason Merrill - - * regmove.c (copy_src_to_dest): Add decl for loop_depth. - - * svr4.h (ASM_GENERATE_INTERNAL_LABEL): Cast arg to unsigned. - * dwarf2out.c (ASM_OUTPUT_DWARF_DATA1): Likewise. - Add parens to various macros. - -Fri Jun 19 23:22:42 1998 Bruno Haible - - * c-typeck.c (pop_init_level): Warn about implicit zero initialization - of struct members. - -Fri Jun 19 23:06:33 1998 Jason Merrill - - * varasm.c (assemble_start_function): Add weak_global_object_name. - * tree.c (get_file_function_name): Use it. - -Fri Jun 19 22:55:14 1998 Jeffrey A Law (law@cygnus.com) - - * except.c (jumpif_rtx): Make static and add prototype. - (jumpifnot_rtx): Likewise. - - * README.gnat: Add a build patch from Fred Fish. - - * c-lang.c (GNU_xref_begin, GNU_xref_end): Deleted. - - * Makefile.in (c-iterate.o): Depend on expr.h. - -Fri Jun 19 20:38:34 1998 H.J. Lu (hjl@gnu.org) - - * except.h (emit_unwinder, end_eh_unwinder): Removed. - - * dwarfout.c (getpwd): Add prototype. - (is_pseudo_reg, type_main_variant, is_tagged_type, - is_redundant_typedef): New declaration. - (output_decl): Add prototype for FUNC. - (type_main_variant): Make it static. - (is_tagged_type): Likewise. - (is_redundant_typedef): Likewise. - - * expr.c (do_jump_by_parts_greater_rtx): Removed. - (truthvalue_conversion): Likewise. - - * c-iterate.c: Include "expr.h". - (expand_expr): Use proper values when calling the function. - - * explow.c (emit_stack_save): Add prototype for FCN. - (emit_stack_restore): Likewise. - - * dwarf2out.c (getpwd): Add prototype. - - * dwarf2out.h (debug_dwarf, debug_dwarf_die): New declarations. - - * c-typeck.c (c_expand_asm_operands): Use proper values when calling - expand_expr. - - * c-lex.c (yyprint): Add prototype. - (check_newline, build_objc_string): Remove declaration. - - * c-tree.h (comptypes_record_hook): Removed. - (finish_incomplete_decl): New prototype. - - * alias.c (find_base_value): Add prototype. - (true_dependence): Add prototype for function argument. - - * c-aux-info.c (xmalloc): Remove declaration. - -Fri Jun 19 20:23:05 1998 Robert Lipe - - * i386.c: Include system.h. Remove redundant includes. - (optimization_options): Mark param 'size' with ATTRIBUTE_UNUSED. - (i386_cc_probably_useless_p): Likewise for 'decl', 'attributes', - 'identifier', 'args'. - (i386_valid_type_attribute_p): Likewise for 'attributes'. - (i386_comp_type_attribute_p): Likewise for 'type1', 'type2'. - (function_arg_partial_nregs): Likewise for 'cum', 'mode', 'type', - and 'named'. - (symbolic_operand): Likewise for 'mode'. - (call_insn_operand): Likewise. - (expander_call_insn_operand): Likewise. - (ix86_logical_operator): Likewise. - (ix86_binary_operator_ok): Likewise. - (emit_pic_move): Likewise. - (VOIDmode_compare_op): Likewise. - (is_mul): Likewise. - (str_immediate_operand): Likewise. - (ix86_uary_operator_ok): Likewise for 'code', 'mode', and 'operands'.yy - (asm_output_function_prefix): Likewise for 'name'. - (function_prologue): Likewise for 'file', and 'size'. - (function_epilogue): Likewise. - -1998-06-19 Jim Wilson - - * loop.h (struct induction): Clarify comment for unrolled field. - * unroll.c (find_splittable_givs): Move set of unrolled field - after address validity check. - -Fri Jun 19 18:38:04 1998 Michael Meissner - - * config/fp-bit.c (INLINE): Only define if not already defined. - -1998-06-19 Manfred Hollstein - - * Makefile.in (installdirs): Loop over directories in $(libsubdir) - creating probably missing ones, instead of single if statements. - -Fri Jun 19 10:43:52 1998 Andreas Schwab - - * c-common.c (truthvalue_conversion): Protect side effects in the - expression when splitting a complex value. - * fold-const.c (fold): Likewise. - -Fri Jun 19 02:31:16 1998 Klaus Kaempf (kkaempf@progis.de) - - * cccp.c (hack_vms_include_specification): Rewrite to handle - '#include ' correctly. - -Fri Jun 19 02:24:11 1998 H.J. Lu (hjl@gnu.org) - - * config/i386/linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Defined. - -Fri Jun 19 02:10:10 1998 John Wehle (john@feith.com) - - * i386.c (notice_update_cc): Integer conditional moves don't - affect cc0. - - * i386.md (movsfcc, movdfcc, movxfcc): Use emit_store_flag - to support LT, LE, GE, and GT signed integer comparisons. - (movsfcc+1, movsfcc+2, movdfcc+1, movdfcc+2, - movxfcc+1, movxfcc+2): Pattern doesn't match if the comparison - is LT, LE, GE, or GT. - (movdicc): Remove code resulting from an earlier patch which - didn't apply correctly. - -Fri Jun 19 02:00:19 1998 Richard Kenner - - * reload1.c (reload_cse_regno_equal_p): If -ffloat-store, don't - consider a MEM in FP mode as equal. - -Fri Jun 19 01:02:17 1998 Jeffrey A Law (law@cygnus.com) - - * c-decl.c (duplicate_decls): Avoid setting TREE_ASM_WRITTEN for - duplicate declarations of a function. - -Fri Jun 19 00:33:33 1998 H.J. Lu (hjl@gnu.org) - - * config/float-i386.h: New. - - * configure.in (i[34567]86-*-linux-*): Set float_format to i386. - -Thu Jun 18 20:11:00 1998 Jim Wilson - - * sched.c (schedule_insns): Use xmalloc not alloca for max_uid - indexed arrays. Call free at the end of the function for them. - * haifa-sched.c (schedule_insns): Likewise. - -Thu Jun 18 18:16:01 1998 Jim Wilson - - * dwarf2out.c (size_of_string): Do count backslashes. - -Thu Jun 18 11:43:54 1998 Nick Clifton - - * config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Disallow REG+REG - addressing when one register is the frame pointer or stack - pointer. Disallow REG+CONST addressing in HI mode. - -Thu Jun 18 17:30:39 1998 J"orn Rennecke - - * reload.c (find_reloads): Don't narrow scope of RELOAD_OTHER to - RELOAD_FOR_INSN. - -Thu Jun 18 09:36:50 1998 Kaveh R. Ghazi - - * Makefile.in (c-lang.o): Depend on output.h. - - * c-lang.c: Include output.h. - - * sparc.c (sparc_builtin_saveregs): Remove unused variable `fntype'. - - * except.c (expand_builtin_eh_stub): Likewise for variable `jump_to'. - - * genrecog.c (write_subroutine): When writing insn-recog.c, mark - variables `insn', `pnum_clobbers', `x[0 .. max_depth]' and `tem' - with ATTRIBUTE_UNUSED. - - * regmove.c (copy_src_to_dest): Make function static to match its - prototype. - - * reload1.c Include hard-reg-set.h before rtl.h to get macro - HARD_CONST. Include machmode.h before hard-reg-set.h. - - * rtl.h: Prototype `retry_global_alloc' and wrap with macro - HARD_CONST to protect usage of typedef HARD_REG_SET. - - * tree.c: Prototype `_obstack_allocated_p'. - - * varasm.c: Wrap prototype of `asm_output_aligned_bss' in macro - BSS_SECTION_ASM_OP. - -Thu Jun 18 09:20:47 1998 Kaveh R. Ghazi - - * pa.c: Include system.h and toplev.h. Remove redundant code. - (call_operand_address): Mark parameter `mode' with ATTRIBUTE_UNUSED. - (symbolic_operand): Likewise. - (symbolic_memory_operand): Likewise. - (pic_label_operand): Likewise. - (fp_reg_operand): Likewise. - (pre_cint_operand): Likewise. - (post_cint_operand): Likewise. - (ireg_or_int5_operand): Likewise. - (int5_operand): Likewise. - (uint5_operand): Likewise. - (int11_operand): Likewise. - (uint32_operand): Likewise. - (ior_operand): Likewise. - (lhs_lshift_cint_operand): Likewise. - (pc_or_label_operand): Likewise. - (legitimize_pic_address): Likewise. - (hppa_legitimize_address): Likewise for parameter `old'. - (output_block_move): Likewise for parameter `size_is_constant'. - (output_function_prologue): Likewise for parameter `size'. - (output_function_epilogue): Likewise. - (return_addr_rtx): Likewise for parameter `count'. - (output_mul_insn): Likewise for parameter `unsignedp'. - (hppa_builtin_saveregs): Likewise for parameter `arglist'. - (output_bb): Likewise for parameter `operands'. - (output_bvb): Likewise. - (function_label_operand): Likewise for parameter `mode'. - (plus_xor_ior_operator): Likewise. - (shadd_operand): Likewise. - (non_hard_reg_operand): Likewise. - (eq_neq_comparison_operator): Likewise. - (movb_comparison_operator): Likewise. - (pa_combine_instructions): Likewise for parameter `insns'. - - * pa.h: Add prototypes for functions `output_deferred_plabels', - `override_options', `output_ascii', `output_function_prologue', - `output_function_epilogue', `print_operand', - `symbolic_expression_p', `reloc_needed', `compute_frame_size', - `hppa_address_cost', `and_mask_p', `symbolic_memory_operand', - `pa_adjust_cost', `pa_adjust_insn_length' and - `secondary_reload_class'. - -Wed Jun 17 22:28:48 1998 Jason Merrill - - * configure.in: Don't turn on collect2 unconditionally. - -Wed Jun 17 20:20:48 1998 Mark Mitchell - - * cse.c (cse_basic_block): Don't include NOTE insns in the count - that is used to decide whether or not it is time to erase the - equivalence table. - -Wed Jun 17 18:30:43 1998 Franz Sirl - - * rs6000/linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define to zero. - -Wed Jun 17 19:05:03 1998 John Carr - - * haifa-sched.c (haifa_classify_insn): TRAP_IF is risky. - (sched_analyze_2): Allow scheduling TRAP_IF. - - * reorg.c (mark_referenced_resources): Examine operands of TRAP_IF. - - * rtl.h (TRAP_CODE): New macro. - - * rtl.def (TRAP_IF): Change second operand type to rtx. - - * optabs.c (gen_cond_trap): New function. - (init_traps): New function. - (init_optabs): Call init_traps. - * expr.h: Declare gen_cond_trap. - - * jump.c (jump_optimize): Optimize jumps to and around traps. - - * sparc.md: Define trap instructions. - - * rs6000.md: Define trap instructions. - * rs6000.c (print_operand): New code 'V' for trap condition. - (trap_comparison_operator): New function. - - * m88k.md: Update use of TRAP_IF. - - * tree.h (enum built_in_function): New function code BUILT_IN_TRAP. - * c-decl.c (init_decl_processing): New builtin __builtin_trap. - * expr.c (expand_builtin): Handle BUILT_IN_TRAP. - - * expr.c (expand_builtin): Error if __builtin_longjmp second argument - is not 1. - -Wed Jun 17 15:20:00 1998 Catherine Moore - - * reload1.c (spill_hard_reg): Check mode of register when - spilling from scratch_list. - -Wed Jun 17 16:25:38 1998 Andrew MacLeod (amacleod@cygnus.com) - - * except.c (add_new_handler): Fix bug in finding last region handler. - * libgcc2.c (find_exception_handler): Pass exception table pointer - to runtime type matcher, not the match info field. - -Wed Jun 17 15:57:48 1998 Andrew MacLeod (amacleod@cygnus.com) - - * eh-common.h (struct eh_context): Add comment for hidden use of - field dynamic_handler_chain. - * except.c (get_dynamic_handler_chain): Comment on, and use the - correct offset of the dynamic_handler_chain field. - -1998-06-17 Jim Wilson - - * mips/iris6.h (LINK_SPEC): Add -woff 131. - -1998-06-17 Jason Merrill - - * dwarf2out.c: Disable EH_FRAME_SECTION if we don't have .init. - - * configure.in: Don't disable collect2 when we have GNU ld. - -Wed Jun 17 08:38:13 1998 Jeffrey A Law (law@cygnus.com) - - * fold-const.c (make_range): Do not widen the type of the expression. - - * expr.c (check_max_integer_computation_mode): New function. - (expand_expr): Avoid integer computations in modes wider than - MAX_INTEGER_COMPUTATION_MODE. - * fold-const.c (fold): Likewise. - * tree.h (check_max_integer_computation_mode): Declare. - * tm.texi (MAX_INTEGER_COMPUTATION_MODE): Document it. - - * configure.in (nm): Make a link to "nm" in the build tree too. - - * mn10300.md (andsi3): Fix typo. - -Tue Jun 16 22:58:40 1998 Richard Henderson - - * reload1.c (reload_cse_regs): Call bzero instead of looping. - -Tue Jun 16 18:30:35 1998 Jim Wilson - - * dwarf2out.c (stripattributes): Prepend '*' to the section name. - -Tue Jun 16 16:49:26 1998 Richard Henderson - - * alpha.c (alpha_expand_prologue, alpha_expand_epilogue): New fns. - (output_prologue, output_epilogue): Merge VMS and OSF versions; - Remove anything related to the actual code generation. - (output_end_prologue): New function. - (alpha_sa_mask, alpha_sa_size): Merge VMS and OSF versions. - (alpha_does_function_need_gp): Return false for VMS. - (alpha_function_needs_gp): Make static. - (add_long_const): Delete. - (summarize_insn): Don't assume a SUBREG is of a REG. - Prototype all static functions. Rename VMS-specific global - variables vms_*. - * alpha.h (TARGET_CAN_FAULT_IN_PROLOGUE): Default to 0. - (FUNCTION_BOUNDARY): Align to cache line. - (LOOP_ALIGN, ALIGN_LABEL_AFTER_BARRIER): Align to octaword. - (FUNCTION_END_PROLOGUE): New macro. - * alpha.md (attribute length): New. Mark all insns. - (return_internal, prologue_stack_probe_loop): New patterns. - (prologue, init_fp, epilogue): New patterns. - Disable peepholes. - * linux.h (TARGET_CAN_FAULT_IN_PROLOGUE): Define. - -Tue Jun 16 17:36:35 1998 Dave Brolley - - * toplev.c (lang_options): Add -trigraphs option for cpplib. - -Tue Jun 16 23:33:24 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_before_p): RELOAD_FOR_OUTADDR_ADDRESS - is earlier than RELOAD_FOR_OUTPUT_ADDRESS; RELOAD_FOR_INPADDR_ADDRESS - is earlier than RELOAD_FOR_INPUT_ADDRESS. - -Tue Jun 16 13:15:16 1998 Jim Wilson - - * libgcc1-test.c (memcpy): Define. - -Tue Jun 16 13:44:02 1998 Michael Meissner - - * genattrtab.c (struct attr_desc): Change int flags to bit - fields. Add bit fields for this being function_units_used - or *_blockage_range attributes. - (write_unit_name): New function to print a function unit name - given unit #. - (expand_units): Indicate whether this is function_units_used or - *_blockage_range attributes. - (write_toplevel_expr): Print function_units_used and - *_blockage_range attributes in a more friendly fashion. - (make_internal_attr): Indicate whether this attribute is either - function_units_used or *_blockage_range. - -Mon Jun 15 17:06:43 1998 Michael Meissner - Jim Wilson - - * regmove.c (copy_src_to_dest): Do not copy src to dest if either - the source or destination is special. - -Mon Jun 15 13:20:33 1998 Jim Wilson - - * c-decl.c (shadow_tag_warned): Use specs not declspecs in for loop. - -Mon Jun 15 07:16:29 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Jun 13 13:10:40 1998 Krister Walfridsson - - * config/sparc/netbsd.h (DEFAULT_PCC_STRUCT_RETURN): Undefine before - redefining it. - -Fri Jun 12 18:06:45 1998 Doug Evans - - * m32r/m32r.h (STARTFILE_SPEC): Delete crtsysc.o. - (ENDFILE_SPEC): Add -lgloss. - -Fri Jun 12 14:57:59 1998 Kaveh R. Ghazi - - * mips.c (small_int): Mark parameter `mode' with ATTRIBUTE_UNUSED. - (large_int): Likewise. - (pc_or_label_operand): Likewise. - (call_insn_operand): Likewise. - (consttable_operand): Likewise. - (m16_uimm3_b): Likewise. - (m16_simm4_1): Likewise. - (m16_nsimm4_1): Likewise. - (m16_simm5_1): Likewise. - (m16_nsimm5_1): Likewise. - (m16_uimm5_4): Likewise. - (m16_nuimm5_4): Likewise. - (m16_simm8_1): Likewise. - (m16_nsimm8_1): Likewise. - (m16_uimm8_1): Likewise. - (m16_nuimm8_1): Likewise. - (m16_uimm8_m1_1): Likewise. - (m16_uimm8_4): Likewise. - (m16_nuimm8_4): Likewise. - (m16_simm8_8): Likewise. - (m16_nsimm8_8): Likewise. - (m16_usym8_4): Likewise. - (m16_usym5_4): Likewise. - (mips_move_1word): Change type of variable `i' from int to size_t. - (mips_move_2words): Likewise. - (output_block_move): Mark parameter `libname' with ATTRIBUTE_UNUSED. - (function_arg_advance): Use HOST_PTR_PRINTF to print an address. - (function_arg): Likewise. - (function_arg_partial_nregs): Mark parameter `named' with - ATTRIBUTE_UNUSED. - (override_options): Use ISDIGIT instead of isdigit. - (mips_output_external): Mark parameter `file' with ATTRIBUTE_UNUSED. - (final_prescan_insn): Likewise for parameters `opvec' and `noperands'. - (save_restore_insns): Cast HOST_WIDE_INT arguments passed to - function `fatal' to long before printing. Use - HOST_WIDE_INT_PRINT_DEC in fprintf. Both changes done several - times in this function. - (function_prologue): Mark parameter `size' with ATTRIBUTE_UNUSED. - (function_epilogue): Likewise for parameters `file' and `size'. - Print an int with "%d" not "%ld". - (mips_select_rtx_section): Mark parameter `x' with ATTRIBUTE_UNUSED. - (mips_function_value): Likewise for parameter `func'. - (function_arg_pass_by_reference): Likewise for parameters `cum' - and `named'. - (extend_operator): Likewise for parameter `mode' - (highpart_shift_operator): Likewise. - - * mips.md (mul_acc_si): Remove unused variable `macc'. - -Fri Jun 12 09:33:44 1998 Richard Henderson - - * fold-const.c (fold): Revert last change. It breaks constant - expressions somehow. - -Fri Jun 12 10:23:36 1998 Andreas Schwab - - * expr.c (do_jump, case EQ_EXPR, NE_EXPR): When comparing complex - prevent operands from being evaluated twice. - -Fri Jun 12 00:50:27 1998 Sergey Okhapkin - - * toplev.c (lang_options): Add -remap as a preprocessor option. - -Fri Jun 12 00:30:32 1998 John Wehle (john@feith.com) - - * i386.md (cmpsi_1, cmphi_1, cmpqi_1): Remove code - which set CC_REVERSED since reload should ensure that - the operands are already the correct type. - -Thu Jun 11 17:14:15 1998 Jim Wilson - - * except.c (expand_builtin_eh_stub): Call emit_move_insn rather than - calling gen_rtx_SET. - -Thu Jun 11 18:45:49 1998 David Edelsohn - - * config/rs6000/x-aix43 (AR): Delete. - (AR_FOR_TARGET_FLAGS): Add -X32_64 here. - -Thu Jun 11 16:19:17 1998 David W. Schuler - - * config/i386/aix386ng.h (CPP_SPEC): Remove extraneous quote. - -Thu Jun 11 12:40:27 1998 Jim Wilson - - * mips.c (override_options): Replace word_mode with explicit - TARGET_64BIT check. - -Thu Jun 11 14:50:02 1998 Michael Meissner - - * regmove.c (regmove_optimize): If we can't replace the - destination in an insn that sets the source, generate an explicit - move of the source to the destination. - (copy_src_to_dest): New function. - (toplevel): Include basic-block.h. - - * Makefile.in (regmove.o): Add basic-block.h dependencies. - -Thu Jun 11 10:30:09 1998 Dave Brolley - - * toplev.c (lang_options): Add missing options (nostdinc, idirafter). - -Wed Jun 10 23:39:32 1998 Mark Mitchell - - * rtl.h (rtx_def): Improve documentation. - (MEM_IN_STRUCT_P): Likewise. - -Wed Jun 10 23:23:17 1998 Graham - - * c-decl.c (start_decl): Correct test for -Wmain. - - * c-decl.c (grokdeclarator): Remove unused variable "last". - -Wed Jun 10 14:52:27 1998 Jim Wilson - - * expr.c (expand_builtin_setjmp): Store const1_rtx in target. - (expand_builtin_longjmp): Abort if value isn't const1_rtx. - Delete code storing value in static_chain_rtx. - (expand_builtin, case BUILT_IN_LONGJMP): Pass NULL_RTX for target - to second expand_expr call. - -Wed Jun 10 13:08:41 1998 Mark Mitchell - - * mips/mips.c: Remove -mabi=o32 and -mabi=n64. - -Wed Jun 10 13:41:23 1998 Dave Brolley - - * cppmain.c (fatal): New function. - * configure.in (cpp_main): New configuration variable. - * configure: Regenerated. - * Makefile.in (CCCP): Use a configuration variable to select basex - for cccp. - (cppmain$(exeext)): Add @extra_cpp_objs@. - -Wed Jun 10 13:07:02 1998 Dave Brolley - - * objc/objc-act.c: Add cpplib declarations. - (lang_decode_option): Initialize cpplib if necessary. - (lang_decode_option): New argc/argv interface. - * tree.h (lang_decode_option): New argc/argv interface. - * toplev.c (lang_options): Add cpp options. - (main): New interface for lang_decode_option. - * gcc.c (default_compilers): Don't call cpp for a cpplib-enabled C compiler - unless -E, -M or -MM is specified. - * cpplib.h (cpp_handle_option): New function. - * cpplib.c (cpp_handle_option): New function. - (cpp_handle_options): Now calls cpp_handle_option. - * c-tree.h (c_decode_option): New argc/argv interface. - * c-lex.c (init_parse): cpplib now initialized in c_decode_option. - * c-lang.c (lang_decode_option): New argc/argv interface. - * c-decl.c: Add cpplib declarations. - (c_decode_option): New argc/argv interface. - (c_decode_option): Call cpp_handle_option. - (c_decode_option): Now returns number of strings processed. - -Wed Jun 10 09:47:13 1998 Richard Earnshaw (rearnsha@arm.com) - - * unroll.c (verify_addresses): Use validate_replace_rtx to undo the - changes. Abort if the undo fails. - -1998-06-10 Vladimir N. Makarov - - * config/rs6000/rs6000.c (output_prolog): Change locations and - directions of saving and restoring arguments of main on the stack. - -Wed Jun 10 08:56:27 1998 John Carr - - * reload1.c (reload_cse_simplify_operands): Do not call gen_rtx_REG - for each alternative. Do not replace a CONST_INT with a REG unless - the reg is cheaper. - -Wed Jun 10 02:11:55 1998 Jeffrey A Law (law@cygnus.com) - - * decl.c (init_decl_processing): Fix typo. - - * mips.c (gpr_mode): New variable. - (override_options): Initialize gpr_mode. - (compute_frame_size): Use "gpr_mode" instead of "word_mode" to - determine size and offset of general purpose registers save slots. - (save_restore_insns, mips_expand_prologue): Similarly. - - * reload.c (find_reloads_toplev): Use gen_lowpart common to convert - between constant representations when we have (SUBREG (REG)) with - REG equivalent to a constant. - -Wed Jun 10 01:39:00 1998 Juha Sarlin - - * h8300.c (get_shift_alg): Add special cases for shifts of 8 and 24. - -Tue Jun 9 22:05:34 1998 Richard Henderson - - * fold-const.c (fold): Even with otherwise constant trees, look for - opportunities to combine integer constants. - -Wed Jun 3 23:41:24 1998 John Wehle (john@feith.com) - - * i386.c (notice_update_cc): Clear cc_status.value2 in the - case of UNSPEC 5 (bsf). - - * i386.md (movsfcc, movdfcc, movxfcc): The floating point - conditional move instructions don't support signed integer - comparisons. - -Tue Jun 9 14:31:19 1998 Nick Clifton - - * config/v850/t-v850 (TCFLAGS): Add assembler options to warn of - overflows. - - * config/v850/lib1funcs.asm (__return_interrupt): Use 'addi - 16,sp,sp' ratehr than 'add 16,sp'. Patch courtesy of Biomedin - . - -Tue Jun 9 16:23:13 1998 Andrew MacLeod - - * except.c (expand_start_catch): Rename to start_catch_handler. - (expand_end_catch): Delete function. - (expand_end_all_catch): Remove catch status that expand_end_catch - use to do. - * except.h (expand_start_catch): Rename prototype. - (expand_end_catch): Delete prototype. - -Tue Jun 9 12:57:32 1998 Mark Mitchell - - * invoke.texi: Add documentation for -mips4 and -mabi=*. - -Tue Jun 9 12:12:34 1998 Klaus Kaempf (kkaempf@progis.de) - - * alpha/vms.h (EXTRA_SECTIONS): Add in_ctors and in_dtors. - (EXTRA_SECTION_FUNCTIONS): Add ctors_section and dtors_section. - (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Define. - -Tue Jun 9 12:10:27 1998 John Carr - - * haifa-sched.c (update_flow_info): Use UNITS_PER_WORD, not MOVE_MAX, - as the threshold to permit splitting memory operations. - -Tue Jun 9 12:36:16 1998 Jeffrey A Law (law@cygnus.com) - - * mips.c (gpr_mode): New variable. - (override_options): Initialize gpr_mode. - (compute_frame_size): Use "gpr_mode" instead of "word_mode" to - determine size and offset of general purpose registers save slots. - (save_restore_insns, mips_expand_prologue): Similarly. - - * Makefile.in (LIB2FUNCS_EH): Define. Just "_eh" for now. - (LIBGCC2_CFLAGS): Remove -fexceptions. - (LIB2FUNCS): Remove "_eh". - (libgcc2.a): Iterate over LIB2FUNCS_EH and build everything in - it with -fexceptions. - - * Makefile.in (local-alloc.o): Depend on insn-attr.h. - * local-alloc.c (block_alloc): Avoid creating false - dependencies for targets which use instruction scheduling. - -Tue Jun 9 02:40:49 1998 Richard Henderson - - * mips/elf.h (ASM_DECLARE_OBJECT_NAME): Define. - (ASM_FINISH_DECLARE_OBJECT): Define; - * mips/elf64.h: Likewise. - -Tue Jun 9 01:08:47 1998 Richard Henderson - - * toplev.c (flag_new_exceptions): Remove extraneous `extern'. - -Mon Jun 8 23:24:48 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Jun 8 23:24:58 1998 David Edelsohn - - * rs6000.md (mulsidi3): Add !TARGET_POWERPC64 constraint. - (mulsidi3_ppc64): Delete. - -Mon Jun 8 20:57:40 1998 Kaveh R. Ghazi - - * Makefile.in (varasm.o): Depend on dbxout.h. - (cse.o): Depend on toplev.h and output.h. - (gcse.o): Depend on output.h. - - * mips.c: Include system.h and toplev.h and remove redundant code. - Include output.h after tree.h so all its prototypes get activated. - * mips.md (table_jump): Remove unused variable `dest'. - - * sparc.h: Add prototype for `v8plus_regcmp_op'. - - * crtstuff.c (fini_dummy, init_dummy): Mark function definitions - with __attribute__ ((__unused__)). - (__frame_dummy): Provide prototype before use, wrap it with - EH_FRAME_SECTION_ASM_OP. - - * cse.c: Move inclusion of above local headers. - Include toplev.h and output.h. - - * dbxout.h: Add prototype for `dbxout_begin_function'. - - * final.c (final_scan_insn): Wrap variable `max_skip' in macro - ASM_OUTPUT_MAX_SKIP_ALIGN. - - * gcse.c: Include system.h and output.h. - (dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data): - Make extern instead of static. - (compute_can_copy): Only declare variables `reg' and `insn' when - AVOID_CCMODE_COPIES is not defined. - (record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED. - (hash_scan_clobber): Likewise for `x' and `insn'. - (hash_scan_call): Likewise. - (record_last_set_info): Likewise for `setter'. - (mark_call): Likewise for `pat'. - (pre_insert_insn): Wrap variable `note' in macro HAVE_cc0. - - * libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the - length parameter so that it multiplies the number of elements by - the sizeof(element). - - * output.h: Add prototype for `weak_finish'. - - * recog.h: Likewise for `validate_replace_src'. - - * rtl.h: Likewise for `optimize_save_area_alloca', - `fix_sched_param', `purge_addressof', `gcse_main', - `regmove_optimize', `dbr_schedule', `branch_prob' and - `end_branch_prob'. - - * toplev.h: Likewise for `set_float_handler' and - `output_quoted_string'. - - * varasm.c: Include dbxout.h. - -Mon Jun 8 18:12:06 1998 Jim Wilson - - * mips.c (mips_secondary_reload_class): Use gp_reg_p instead of - GP_REG_P. Use gr_regs instead of GR_REGS. - -Mon Jun 8 16:54:12 1998 Ken Raeburn - Jeff Law - - * Revamped multiply support for MIPS chips. - * mips.c (extend_operator): New function. - (highpart_shift_operator): Likewise. - * mips.h: Declare new functions. - (PREDICATE_CODES): Add support for new predicates. - * mips.md (mulsi3 expander): Simplify. - (mulsi_mult3): Add another constraint alternative. Support - 3 operand multiply instructions as found on various mips - parts. - (mulsi3_r4650): Delete pattern, now handled by mulsi_mult3. - (mul_acc_si): New pattern and associated splitters. - (mulsidi3 expander): Rework to use mulsidi3_64bit and - mulsidi3_internal. - (umulsidi3): New expander. - (mulsidi3_internal): Accept either sign or zero extended - operands and generate code as appropriate appropriately. - (mulsidi3_64bit): Similarly. - (smulsi3_highpart): Turn into an expander and generate code - to match new patterns. - (umulsi3_highpart): Likewise. - (xmulsi3_highpart_internal): New pattern. - (maddi patterns): Delete. Replace with: - (mul_acc_di, mul-acc_64bit_di): New patterns. - -Mon Jun 8 14:16:15 1998 Andrew MacLeod - - * eh-common.h: Remove NEW_EH_MODEL compile time flag, and replace with - flag_new_exceptions runtime flag. - (struct old_exception_table): New struct which represents what - the exception table looks like without the new model. - (NEW_EH_RUNTIME): New value used as a tag in the exception table to - flag that this is a new style table. - * except.h: Remove compile time flag NEW_EH_MODEL. - (expand_builtin_eh_stub_old): New prototype. - * tree.h (enum built_in_function): Add BUILT_IN_EH_STUB_OLD. - * expr.c (expand_builtin): New builtin func BUILT_IN_EH_STUB_OLD. - * c-decl.c (init_decl_processing): Add new builtin function - __builtin_eh_stub_old. - * final.c (final_scan_insn): Replace compile time flag NEW_EH_MODEL. - * flags.h (flag_new_exceptions): New runtime flag. - * toplev.c (flag_new_exceptions): Initialize default to 0, - -fnew-exceptions sets to 1. - * except.c (output_exception_table_entry): Output New style exception - identifier into table, and replace compile time flag NEW_EH_MODEL - with runtime flag flag_new_exceptions. - (output_exception_table): Replace compile time flag NEW_EH_MODEL. - (expand_builtin_eh_stub_old): Duplicates original functionality of - expand_builtin_eh_stub. - (expand_builtin_eh_stub): Replace compile time flag NEW_EH_MODEL. - * libgcc2.c (find_exception_handler): Remove NEW_EH_MODEL #ifdefs. - (old_find_exception_handler): New func, same as find_exception_handler - except it works on the old style exception table. - (__throw): Replace NEW_EH_MODEL. Detect new model based on presence - of identifier in the exception table, and call appropriate routines. - -Mon Jun 8 01:21:13 1998 Jason Merrill - - * function.c: Define current_function_cannot_inline. - (push_function_context_to): Save it. - (pop_function_context_from): Restore it. - * function.h (struct function): Provide it a home. - * output.h: Declare it. - * integrate.c (function_cannot_inline_p): Check it. - -Mon Jun 8 10:43:15 1998 Richard Henderson - - * expr.c (force_operand): Detect PIC address loads before - splitting arithmetic. - -Mon Jun 8 09:22:38 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Jun 8 02:55:56 1998 Graham - - * tree.c (tree_class_check): Add braces to eliminate ambiguous - else warning. - (tree_check): Likewise. - -Mon Jun 8 02:49:23 1998 H.J. Lu (hjl@gnu.org) - - * reg-stack.c (subst_stack_regs_pat): Make sure the top of - stack is the destination for conditional move insn. - -Mon Jun 8 01:21:13 1998 Jason Merrill - - * tree.h (TREE_VEC_END): Cast unused value to void. - - * i386.c (print_operand): Use %lx for long operand. - -Mon Jun 8 00:04:07 1998 Richard Henderson - - * alpha.c (summarize_insn): Ignore rtl slot format 'i'. - -Sun Jun 7 14:15:45 1998 John Carr - - * sol2.h (INIT_SUBTARGET_OPTABS): Use Solaris libc float/long long - conversion functions. - -Sun Jun 7 14:02:58 1998 Richard Henderson - - * toplev.c (flag_exceptions): Default to 0. - (compile_file): Remove flag_exceptions == 2 hack. - (main): Call lang_init_options. - * tree.h: Declare it. - * c-lang.c: Implement it. - * objc/objc-act.c: Likewise. - -Sun Jun 7 12:27:30 1998 David Edelsohn - - * rs6000.md (restore_stack_block): Generate MEM and specify mode. - * rs6000.h (STACK_SAVEAREA_MODE): SAVE_FUNCTION is VOIDmode. - * rs6000.c (rs6000_output_load_toc_table): Use fputs. - (output_function_profiler): Use asm_fprintf and fputs. - -Sat Jun 6 12:17:12 1998 Kaveh R. Ghazi - - * gencheck.c: Remove redundant stdio.h include. Add a definition - of xmalloc for when we are forced to link with alloca.o. - - * reload1.c (reload_reg_free_for_value_p): Use `(unsigned)1' - instead of `1U'. - - * fold-const.c (constant_boolean_node): Make definition static to - match the prototype. - -Fri Jun 5 15:53:17 1998 Per Bothner - - * gcc.c (lang_specific_pre_link): New LANG_SPECIFIC_DRIVER function. - (lang_specific_extra_outfiles): New LANG_SPECIFIC_DRIVER variable. - (do_spec, input_filename, input_filename_length): Make public. - (main): Adjust outfiles allocation by lang_specific_extra_outfiles. - Call lang_specific_pre_link befor elinking. - -Fri Jun 5 12:29:28 1998 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (rank_for_schedule): For "equally good insns", prefer - the insn which has the most insns dependent on it. - -Fri Jun 5 09:03:22 1998 John Carr - - * alias.c (find_base_value): Avoid reading past end of reg_base_value. - -Fri Jun 5 03:05:34 1998 Richard Henderson - - * alpha.md (insxh-1): New insxl pattern for combine. - -Fri Jun 5 01:12:15 1998 H.J. Lu (hjl@gnu.org) - - * i386/i386.c (output_fp_conditional_move): New function - to output floating point conditional move. - (output_int_conditional_move): New function to output integer - conditional move. - - * i386/i386.md (movsicci+5, movhicc+5, movdicc+5): Call - output_int_conditional_move () to output int conditional move. - (movsfcc+5, movdfcc+5, movxfcc+5): Call - output_fp_conditional_move () to output floating point - conditional move. - - * i386/i386.c (put_condition_code): In INT mode, check - cc_prev_status.flags & CC_NO_OVERFLOW for GE and LT. - -Thu Jun 4 16:09:51 1998 Dave Brolley - - * dbxout.c (dbxout_type): Output arrays of bits as if - they were bitstrings for Chill - -Thu Jun 4 14:35:27 1998 David Edelsohn - - * tree.c (get_inner_array_type): New function. - * tree.h (get_inner_array_type): Prototype. - * expr.h (STACK_SAVEAREA_MODE): New macro. - * expr.c (expand_builtin_setjmp): Initialize sa_mode using - STACK_SAVEAREA_MODE. - (expand_builtin_longjmp): Likewise. - * explow.c (emit_stack_save): Likewise. - (allocate_dynamic_stack_space): Use Pmode not insn_operand_mode. - - * rs6000/aix41.h (ASM_CPU_SPEC): Define relative to ASM_DEFAULT_SPEC. - (CPP_CPU_SPEC): Define relative to CPU_DEFAULT_SPEC. - * rs6000/aix43.h: New file. - * rs6000/t-aix43: New file. - * rs6000/x-aix41: New file. - * rs6000/x-aix43: New file. - * configure.in (rs6000-ibm-aix*): Use them. - * rs6000/powerpc.h: Delete. - * rs6000/sysv4.h: Move necessary powerpc.h definitions to here, - * rs6000/netware.h: and here, - * rs6000/win-nt.h: and here. - - * rs6000/rs6000.c (processor_target_table, 620): Do not affect - MASK_POWERPC64. - (rs6000_override_options): Ignore flag_pic for AIX. - (rs6000_immed_double_const): Delete. - (u_short_cint_operand): Don't assume 32-bit CONST_INT. - (reg_or_u_short_operand): Don't assume 32-bit CONST_INT. - (num_insns_constant): mask64_operand() is 2 insns. - (logical_operand): Don't assume 32-bit CONST_INT. - (non_logical_cint_operand): Don't assume 32-bit CONST_INT. - (easy_fp_constant): Any CONST_DOUBLE_HIGH is okay for 64-bit. - (mask_constant): HOST_WIDE_INT parameter. - (non_and_cint_operand): Delete. - (mask64_operand): New function. - (and64_operand): New function. - (function_arg_advance): DImode arguments do not need special - alignment when 64-bit. - (function_arg): Likewise. - (setup_incoming_varargs): Reverse reg_size assignment. - (print_operand): HOST_WIDE_INT second parameter. - (print_operand, 'B'): New case. - (print_operand, 'M'): Fix typo in lossage string. - (print_operandm 'S'): New case. - (rs6000_stack_info): Reverse reg_size assignment. Use total_raw_size - to compute AIX push_p. Use reg_size to compute {cr,lr}_save_offset. - (rs6000_output_load_toc_table): Reverse init_ptr assignment. Use - TARGET_64BIT not TARGET_POWERPC64. Convert fprintf to fputs. - Load GOT highpart, don't add it. Add lowpart with {cal|la}. - (rs6000_allocate_stack_space): Use {cal|la}. - (output_epilog): Use {cal|la} - (output_function_profiler): Add call glue to mcount call. - Load GOT highpart, don't add it. Add lowpart with {cal|la}. - - * rs6000/rs6000.h (TARGET_SWITCHES): Add powerpc64. - (STACK_BOUNDARY): Depend on TARGET_32BIT. - (ADJUST_FIELD_ALIGN): Calculate array alignment using innermost type. - (CONST_OK_FOR_LETTER_P): Don't assume 32-bit CONST_INT. - (EXTRA_CONSTRAINTS): Remove NT 'S' and 'T'. Replace 'S' with - 64-bit mask operand. - (RS6000_SAVE_TOC): Depend on TARGET_32BIT. - (STACK_SAVEAREA_MODE): New macro. - (LEGITIMATE_CONSTANT_P): DImode okay for 64bit. - (LEGITIMIZE_RELOAD_ADDRESS): New macro. - (RTX_COSTS, AND/IOR/XOR): Reflect current machine description. - (ASM_FILE_START): Emit 64-bit ABI directive. - (ASM_DECLARE_FUNCTION_NAME): Align CSECT on doubleword in 64-bit mode. - (ASM_OUTPUT_SPECIAL_POOL_ENTRY): DImode okay for 64-bit. - (PREDICATE_CODES): Add "and64_operand" and "mask64_operand". - Delete "non_and_cint_operand". "input_operand" includes CONST_DOUBLE. - - * rs6000/rs6000.md (iorsi3, xorsi3): Use HOST_WIDE_INT for mask. - Restore define_splits. - (floatsidf2, floatunssidf2): Remove !TARGET_POWERPC64 final constraint. - (floatsidf2_internal, floatunssidf2_internal2): Likewise. - Do not specify base register operand mode. - (floatsidf2_loadaddr): Do not specify base register operand mode. - (floatsidf2_store1, floatsidf2_store2): Operand 1 must be base - register; do not specify mode. Remove !TARGET_POWERPC64 final - constraint. - (floatsidf2_load): Do not specify base register operand mode. Remove - !TARGET_POWERPC64 final constraint. - (fix_truncdfsi2_internal, fix_truncdfsi2_{store,load}): Do not specify - base register operand mode. - (adddi3): Split large constants early. - (absdi3): Shift by 63, not 31. - (*mulsidi3_ppc64): New pattern. - (rotldi3): Add masking combiner patterns. - (anddi3): Add rldic{r,l} masking. Remove split of large constants - because PPC insns zero-extend. - (iordi3, xordi3): Split large constants early. - (movsi matcher): Remove S and T constraints. - (movsf const_double): Create SImode constant from TARGET_DOUBLE. - (movdf_hardfloat32): Add default abort() case. - (movdf easy_fp_const): Create DImode constant from TARGET_DOUBLE. - (movdi): Remove 64-bit constant generator. Try to convert - CONST_DOUBLE to CONST_INT. Handle TOC memory constants. - (movdi_32): Add default abort() case. - (movdi_64): Add numerous ways to split 64-bit constants. - Make catch-all define_split more optimal and never FAIL. - (movti_ppc64): Add default abort() case. - (allocate_stack): Remove operand modes. Use Pmode. - (restore_stack_block): Remove operand modes. Generate Pmode - temporary. - (save_stack_nonlocal, restore_stack_nonlocal): Generate Pmode - temporary. Save area is double Pmode. - (call_indirect_aix64, call_value_indirect_aix64): New patterns. - (call, call_value): Do not specify address operand mode. Choose - appropriate AIX ABI. - (*call_local64, *ret_call_local64): New patterns. - (*call_nonlocal_aix64, *ret_call_nonlocal_aix64): New patterns. - (*ret_call_nonlocal_aix32): Use call_value_indirect for REG. - (compare): Materialize DImode truthvalues. - -Thu Jun 4 01:26:57 1998 Craig Burley - - * expr.c (safe_from_p): Avoid combinatorial explosion - over duplicate SAVE_EXPRs by ensuring we never recurse - on one that has already been visited. - -Thu Jun 4 00:54:21 1998 Graham - - * loop.c (check_dbra_loop): Initialize final_value before - normalizing the loop. - -Wed Jun 3 20:00:04 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_for_value_p): New arguments out and - reloadnum. Changed all callers. - -1998-06-03 Ulrich Drepper - - * system.h: Add _() and N_() macros in preparation for gettext. - -Wed Jun 3 11:02:24 1998 Andreas Schwab - - * c-common.c (check_format_info): Put back check for C9x `hh' - length modifier. Warn about %n format writing into const. Remove - obsolete comment. - (format_char_info): Fix comments. - - * configure.in: Set float_format to m68k for all m68k targets that - do not override LONG_DOUBLE_TYPE_SIZE. - * config/float-m68k.h: New file. - -Tue Jun 2 23:14:01 1998 Richard Henderson - - * jump.c (jump_optimize): Remove debug messages accidentally left in - with the previous change. - -Tue Jun 2 22:46:08 1998 Richard Henderson - - * expr.c (store_expr): Revert stray patch associated with - 1998-05-23 commit. - -Tue Jun 2 21:59:01 1998 Richard Henderson - - * jump.c (rtx_unsafe_p): New function. - (jump_optimize): Use it on if/then/else transformations and - conditional move transformations. - -Tue Jun 2 22:50:10 1998 Andreas Schwab - - * fold-const.c (fold, case EQ_EXPR): When folding VAR++ == CONST - or VAR-- == CONST construct a proper mask if VAR is a bitfield. - Cope with CONST being out of range for the bitfield. - -Tue Jun 2 22:28:31 1998 Bernd Schmidt - - * expr.c (emit_move_insn_1): When moving complex values in several - steps, emit a CLOBBER to show the destination dies. - -Tue Jun 2 22:17:26 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (site.exp): Use the object testsuite directory as - the temporary directory. - - * expr.c (expand_expr, case ADDR_EXPR): Handle taking the - address of an ADDRESSOF rtx. - -1998-06-02 Mike Stump - - * expr.c (expand_builtin_setjmp): Handle BUILTIN_SETJMP_FRAME_VALUE. - * i960.h (SETUP_FRAME_ADDRESSES, BUILTIN_SETJMP_FRAME_VALUE): Define. - * i960.md (ret, flush_register_windows): Define. - (nonlocal_goto): Likewise. Nested function nonlocal gotos don't - work yet. - * tm.texi (BUILTIN_SETJMP_FRAME_VALUE): Document new macro. - -Tue Jun 2 14:02:38 1998 Richard Henderson - - * alpha.md (divsi3, udivsi3, modsi3, umodsi3): Enable, and work - around an OSF/1 library bug wrt sign-extension of inputs. - -Tue Jun 2 13:02:44 1998 Richard Henderson - - * vax/netbsd.h (DWARF2_UNWIND_INFO): Must be undef, not defined 0. - -Mon Jun 1 03:44:03 1998 Catherine Moore - - * config/sh/sh.h (MAX_OFILE_ALIGNMENT): Define. - - * varasm.c (assemble_variable): Augment alignment warning. - -Mon Jun 1 12:14:28 1998 Michael Meissner - - * config/fp-bit.c (_fp{add,div}_parts): Return correct IEEE result - in the presence of IEEE negative 0's. - -Sun May 31 16:11:41 1998 John Wehle (john@feith.com) - - * reload.c (find_reloads): Record the existing mode if - operand_mode == VOIDmode before replacing a register with - a constant. - * i386.md (tstsi, tsthi, tstqi, tstsf, tstdf, tstxf): Set - i386_compare_op1 to const0_rtx for the benefit of the - conditional move patterns. - (movsicc, movhicc, movsfcc, movdfcc, movxfcc, movdicc): Rewrite - based on suggestions from Jim Wilson. - -Sun May 31 00:44:02 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun May 31 00:34:17 1998 Bruce Korb - - * Makefile.in (fixinc.sh): Update rules again. - -Sun May 31 00:27:47 1998 Jeffrey A Law (law@cygnus.com) - - * extend.texi: Bring back reference to trampoline paper. - -Sun May 31 00:22:34 1998 Ulrich Drepper - - * Makefile.in (USER_H): Add stdbool.h. - * ginclude/stdbool.h: New file. - -Fri May 29 01:48:25 1998 Jeffrey A Law (law@cygnus.com) - - * jump.c (thread_jumps): Do not look at the NOTE_LINE_NUMBER - of a non-note insn. - - * gcse.c (pre_delete): Fix code to determine the mode of - the reaching pseudo register. - -Fri May 29 01:07:28 1998 Bernd Schmidt - - * Makefile.in (GEN): Add gencheck. - (STAGESTUFF): Add tree-check.h and gencheck. - -Fri May 29 00:57:37 1998 Bruce Korb - - * Makefile.in (cstamp-h.in): Remove before trying to recreate. - (fixinc.sh): Set some additional environment variables before - calling mkfixinc.sh. - -Thu May 28 12:57:05 1998 Jeffrey A Law (law@cygnus.com) - - * reload.c (find_reloads): Do not force a reloads of match_operators. - -Thu May 28 10:22:22 1998 Andrew MacLeod - - * except.h (remove_handler): Add new prototype. - * except.c (remove_handler): New function to remove handlers - from an exception region. - * flow.c (find_basic_blocks_1): Remove handlers from regions when - handler label is deleted; remove exception regions with no handlers. - -Thu May 28 09:36:39 1998 Michael Meissner - - * except.h (rtx): Define rtx type correctly if needed. - * function.h (rtx): Likewise. - (tree): Define tree type correctly if needed. - - * c-pragma.c (toplevel): Include rtl.h. - - * stor-layout.c (toplevel): Move include of rtl.h before - except.h. - - * Makefile.in (c-pragma.o): Add except.h, rtl.h dependencies. - (tree.o): Add except.h dependency. - -Wed May 27 22:02:40 1998 Jeffrey A Law (law@cygnus.com) - - * reload1.c: Revert accidental checkin. - - * configure.lang: Fix thinko when adding a definition for - target_alias to the Makefile. - -Wed May 27 02:50:00 1998 Catherine Moore (clm@cygnus.com) - - * config/sparc/lb1spc.asm (.rem and .urem): Replace - routines. - -Wed May 27 02:48:31 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (arm_gen_constant): Rework to eliminate uninitialized - variable warnings. Don't generate scratch registers if only - counting insns. - (find_barrier): Eliminate unused variable SRC. - -1998-05-27 Manfred Hollstein - - * toplev.h (rtx_def): Provide global declaration to avoid - `limited scope' warnings. - -Tue May 26 23:47:52 1998 Mumit Khan - - * Makefile.in (gencheck.o): Use HOST_CC. - * i386/t-mingw32: New file. - * configure.in (i386-*-mingw32*): Use. - -Tue May 26 07:31:04 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (bad_signed_byte_operand): New predicate function. - * arm.h (PREDICATE_CODES): Add it to the list. - * arm.md (*extendqi[sh]i_insn): Split any addresses that ldrsb - can't handle. - (define_split): Two new splits for above insns. - - * arm.c: Include toplev.h. - (arm_override_options): Add parentheses around use of tune_flags. - (arm_split_constant): Remove unused variable. - (arm_gen_constant, arm_gen_movstrqi, add_constant): Likewise. - (output_func_prologue, arm_expand_prologue): Likewise. - (arm_canonicalize_comparison): Make I unsigned; rework constants - accordingly. Add missing parentheses around << operation. - (arm_rtx_costs): Correctly parenthesize MULT costs. Add a DEFAULT - clause. - ({load,store}_multiple_sequence): Initialize BASE_REG. - (select_dominance_cc_mode): Add DEFAULT clauses. - (broken_move): Return zero if the destination is not a register. - (arm_reorg): Move unused REGNO declaration into the dead code. - * arm.h (CANONICALIZE_COMPARISON): Ensure OP1 is updated. - -Mon May 25 22:49:56 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon May 25 11:56:24 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon May 25 14:00:13 1998 Dave Brolley - - * cpperror.c (v_cpp_message): Remove static prototype. - * cpplib.c (v_cpp_message): Move prototype to cpplib.h. - * cpplib.h (v_cpp_message): Add protoptype. - (stdarg.h,varargs.h): Needed for v_cpp_message prototype. - -Sun May 24 20:36:15 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun May 24 02:08:57 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -1998-05-24 Andreas Schwab - - * m68k.h: Declare more functions used in macros. - (REG_CLASS_CONTENTS): Completely embrace initializer. - * m68k.md (adddi3, subdi3): Add abort call to avoid warning - about returning no value. - * cse.c (find_best_addr): Declare p and found_better only if - needed. - * dbxout.c (dbxout_continue): Define only if DBX_CONTIN_LENGTH > 0. - * dwarfout.c (string_length_attribute): #if 0 away. - * function.c (expand_function_end): Define varible blktramp only - if needed. - * jump.c (find_insert_position): Define only if !HAVE_cc0. - * loop.c (combine_givs_p): Define variable tem only if needed. - * real.c: Comment out unused functions eabs, eround, - e{24,53,64,113}toasc and eiinfin. - -Sat May 23 23:44:53 1998 Alexandre Oliva - - * Makefile.in (boostrap2-lean, bootstrap3-lean, - bootstrap4-lean): New targets. - -Sat May 23 23:35:14 1998 Jeffrey A Law (law@cygnus.com) - - * warn_summary, test_summary: Moved into the contrib directory. - -1998-05-23 Manfred Hollstein - - * Makefile.in (ENQUIRE_CFLAGS, ENQUIRE_LDFLAGS): Move down to the end - of the Makefile. - (FLOAT_H_TEST): Likewise. - (ENQUIRE): Likewise. - (float.h-nat): Likewise. - (float.h-cross): Likewise. - (enquire): Likewise. - (enquire.o): Likewise. - (stmp-int-hdrs): Fix comment about enquire; depend upon gfloat.h. - (stmp-headers): Move actions to stmp-int-hdrs, retaining only a - no-op. - (FLOAT_H): Remove old float.h-nat version; move current definition - to CROSS_FLOAT_H location. - (all.cross): Remove comments about enquire stuff. - - * Makefile.in (all.cross): Swap $(LIBGCC) and $(STMP_FIXPROTO). - (rest.encap): Likewise. - (libgcc2.ready): Depend upon $(STMP_FIXPROTO) - - * toplev.h (tree_node): Provide global declaration to avoid - `limited scope' warnings. - -Sat May 23 23:23:35 1998 Robert Lipe - - * test_summary: Display section breaks for each entry - in a multilibbed target's output. - -1998-05-23 Richard Henderson - - * expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF, if the - offset's mode is not ptr_mode, convert it. - -1998-05-22 Jason Merrill - - * fold-const.c (ssize_binop): New fn. - * tree.h: Declare it. - -Fri May 22 03:42:05 1998 Richard Earnshaw (rearnsha@arm.com) - - * genextract.c (print_path): Handle zero-length path as a special - case. - -Fri May 22 01:38:07 1998 Hans-Peter Nilsson - - * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767. - -Fri May 22 00:57:00 1998 Bernd Schmidt (crux@pool.informatik.rwth-aachen.de> - - * final.c (JUMP_TABLES_IN_TEXT_SECTION): Provide a default value. - (shorten_branches, final_scan_insn): Test value of - JUMP_TABLES_IN_TEXT_SECTION instead of just testing whether it - is defined. - * tm.texi (JUMP_TABLES_IN_TEXT_SECTION): Corresponding changes. - * arm/coff.h: Define JUMP_TABLES_IN_TEXT_SECTION to 1. - * arm/tcoff.h: Likewise. - * i386/386bsd.h: Likewise. - * i386/freebsd-elf.h: Likewise. - * i386/freebsd.h: Likewise. - * i386/netbsd.h: Likewise. - * i386/ptx4-i.h: Likewise. - * i386/sysv4.h: Likewise. - * pa/pa.h: Likewise. - * rs6000/linux.h: Likewise. - * rs6000/rs6000.h: Likewise. - * sh/sh.h: Likewise. - * sparc/sp64-elf.h: Likewise. - * v850/v850.h: Likewise. - * rs6000/sysv4.h: Define JUMP_TABLES_IN_TEXT_SECTION to 0. - * i386/linux.h: Define JUMP_TABLES_IN_TEXT_SECTION to (flag_pic). - -Thu May 21 19:50:13 1998 J"orn Rennecke - - * regmove.c (gen_add3_insn): New function. - (fixup_match_2): Use it instead of calling gen_addsi3. - -Thu May 21 23:09:50 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (gencheck): Depend on HOST_LIBDEPS. - - * alias.c (rtx_equal_for_memref_p): Handle SCRATCH as a memory - address. - -Thu May 21 20:18:13 1998 Martin von Loewis - - * Makefile.in (TREE_H): Add tree-check.h. - (tree-check.h, gencheck): New targets. - * gencheck.c: New file. - * tree.c (tree_check, tree_class_check): New functions. - * tree.h (TREE_CHECK, TREE_CLASS_CHECK): Define. - (TYPE_CHECK, DECL_CHECK): Define. - Modify all access macros to use generated checking macros. - -Wed May 20 23:44:28 1998 John Wehle (john@feith.com) - - * acconfig.h (HAVE_GAS_MAX_SKIP_P2ALIGN): New tag. - * configure.in: Check for it. - * i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Use it. - * final.c (uid_align, uid_shuid, label_align): Make static. - (label_align): Change type to struct label_alignment pointer. - (LABEL_TO_ALIGNMENT, shorten_branches): Update due to type change. - (LABEL_TO_MAX_SKIP): Define. - (LABEL_ALIGN_MAX_SKIP, LOOP_ALIGN_MAX_SKIP, - LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Provide defaults. - (shorten_branches): Record the maximum bytes to skip when - aligning a label. - (final_scan_insn): Use the maximum bytes to skip when aligning a label - if ASM_OUTPUT_MAX_SKIP_ALIGN is available. - * i386.h (LOOP_ALIGN_MAX_SKIP, - LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Define. - * i386.c (override_options): i386_align_jumps and i386_align_loops - default to 4 if ASM_OUTPUT_MAX_SKIP_ALIGN is available. - * invoke.texi: Document new i386 align-loops and align-jumps behavior. - -1998-05-21 Mark Mitchell - - * cplus-dem.c (do_type): Handle volatile qualification. - -Thu May 21 12:23:17 1998 Per Bothner - - * function.c (init_function_start): Don't call emit_line_note if - lineno is 0. (Can happen when compiling Java .class files.) - -Thu May 21 19:50:13 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_for_value_p): Fix RELOAD_FOR_INPUT - end of lifetime and RELOAD_FOR_OUTPUT start of lifetime. - -Thu May 21 19:32:27 1998 J"orn Rennecke - - * combine.c (nonzero_bits): For paradoxical subregs, take - LOAD_EXTENDED_OP into account. - -Thu May 21 11:51:15 1998 Dave Brolley - - * configure.in (extra_c_objs): Add prefix.o. - (extra_cxx_objs): Extra objects for C++ with cpplib. - * configure: Regenerate. - - * c-tree.h (get_directive_line): Different prototype for cpplib. - (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line. - - * c-lex.h (get_directive_line): Not needed here for cpplib. - - * c-lex.c (yy_cur,yy_lim,yy_get_token): Move to c-common.c. - (GET_DIRECTIVE_LINE): Move to c-common.c and rename to get_directive_line. - - * c-common.c (parse_in,parse_options,cpp_token): Declare for cpplib. - (yy_cur,yy_lim,yy_get_token,get_directive,line): Moved here from c-lex.c - -Thu May 21 09:04:42 1998 Kaveh R. Ghazi - - * gengenrtl.c (type_from_format, accessor_from_format): Change - type of parameter `c' from `char' to `int'. - -Wed May 20 22:28:34 1998 Jeffrey A Law (law@cygnus.com) - - * warn_summary, test_summary: New scripts from - Kaveh Ghazi and Alexandre Oliva respectively. - - * gcse.c (current_function_calls_longjmp): Declare. - -1998-05-20 Jason Merrill - - * dwarf2out.c (base_type_die): Use int_size_in_bytes. - -Wed May 20 01:11:02 1998 Doug Evans (devans@cygnus.com) - Jeff Law (law@cygnus.com) - - * Global CSE and constant/copy propagation. - * Makefile.in (OBJS): Add gcse.o. - (STAGESTUFF): Add *.gcse. - (gcse.o): Add dependencies. - (mostlyclean): Remove *.gcse and */*.gcse. - * gcse.c: New file. - * loop.c (loop_optimize): Move call to init_alias_analysis. - * recog.c (validate_replace_src): New function. - * toplev.c (gcse_dump): New global variable. - (flag_gcse, gcse_time): Likewise. - (compile_file): Initialize gcse_time and clean out the gcse dump - file if necessary. - (rest_of_compilation): Call gcse_main as requested. Dump RTL - after gcse if requested. - (main): Enable gcse for -O2 and above. Handle -dG. Enable gcse - dumps for -da. - * gcc.texi: Add gcse related internal documentation. - * invoke.texi: Note new command line options for gcse. - * tm.texi: Document AVOID_CCMODE_COPIES. - * mips.h (AVOID_CCMODE_COPIES): Define. - -Tue May 19 22:31:20 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (deduced.h): Only run scan-types if $(SYSTEM_HEADER_DIR) - exists. - (stmp-fixproto): Simlarly for running fixproto. - * cross-make (SYSTEM_HEADER_DIR): Now $(tooldir)/sys-include. - -Tue May 19 19:08:52 1998 Jim Wilson - - * config/mips/mips.c (double_memory_operand): Accept any MEM during - reload when TARGET_64BIT. - -Tue May 19 18:21:25 1998 Jim Wilson - - Finish incomplete change started by Kenner. - * configure.in (*-*-linux-gnu*): Delete NO_STAB_H from xm_defines. - (powerpcle-*-cygwin32): Delete xm_defines. - * final.c, mips-tfile.c, xcoffout.c, config/mips/mips.c: Use - HAVE_STAB_H instead of NO_STAB_H. - * config/xm-linux.h (NO_STAB_H): Delete. - (HAVE_STAB_H): Undefine. - * config/i386/xm-go32.h (NO_STAB_H): Delete. - -1998-05-19 Jim Wilson - - * dwarfout.c (dwarfout_file_scope_decl, case TYPE_DECL): Ignore - LANG_TYPE trees with DECL_SOURCE_LINE of 0. - -Tue May 19 15:07:54 1998 Todd Vierling - - * arm/netbsd.h: Ensure DWARF2_UNWIND_INFO is undefined. - -Tue May 19 17:19:16 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_for_value_p): New function. - (allocate_reload_reg, choose_reload_regs): Use it. - -Tue May 19 11:51:00 1998 Andrew MacLeod (amacleod@cygnus.com) - - * except.c (expand_start_catch): Correct logic for when to - generate a new handler label, and when to use the old one. - -Tue May 19 11:08:52 1998 Kaveh R. Ghazi - - * Makefile.in (print-rtl.o): Depend on bitmap.h. - (dbxout.o): Depend on toplev.h. - ($(SCHED_PREFIX)sched.o): Likewise. - ($(out_object_file)): Likewise for system.h and toplev.h. - (cppmain.o): Depend on gansidecl.h. - (cpplib.o): Likewise. - (cpperror.o): Likewise. - (cppexp.o): Likewise. - (cpphash.o): Likewise. - (cppalloc.o): Likewise. - (fix-header.o): Depend on cpplib.h and cpphash.h. - (scan-decls.o): Depend on gansidecl.h. - - * basic-block.h (free_regset_vector): Add prototype. - - * cccp.c (check_precompiled): Mark parameter `fname' with - ATTRIBUTE_UNUSED. - (do_assert): Likewise for `op' and `keyword'. - (do_unassert): Likewise. - (do_line): Likewise for `keyword'. - (do_error): Likewise for `op' and `keyword'. - (do_warning): Likewise. - (do_ident): Likewise for `keyword'. - (do_pragma): Likewise for `limit', `op' and `keyword'. - (do_sccs): Likewise. - (do_if): Likewise for `keyword'. - (do_elif): Likewise. - (do_else): Likewise. - (do_endif): Likewise. - - * collect2.c (getenv): Remove redundant prototype. - (collect_exit, collect_execute, dump_file): Likewise. - (dump_list): Wrap prototype and definition in COLLECT_EXPORT_LIST. - (dump_prefix_list): Hide prototype and definition. - - * sparc.c: Include toplev.h. - (intreg_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. - (symbolic_memory_operand): Likewise. - (sp64_medium_pic_operand): Likewise. - (data_segment_operand): Likewise. - (text_segment_operand): Likewise. - (splittable_symbolic_memory_operand): Likewise. - (splittable_immediate_memory_operand): Likewise. - (eq_or_neq): Likewise. - (normal_comp_operator): Likewise. - (noov_compare_op): Likewise. - (v9_regcmp_op): Likewise. - (v8plus_regcmp_op): Likewise. - (extend_op): Likewise. - (cc_arithop): Likewise. - (cc_arithopn): Likewise. - (small_int): Likewise. - (uns_small_int): Likewise. - (clobbered_register): Likewise. - (legitimize_pic_address): Likewise. - (delay_operand): Likewise. - (sparc_builtin_saveregs): Remove unused variable `stdarg'. - - * sparc.h (order_regs_for_local_alloc, eligible_for_return_delay, - sparc_issue_rate, v8plus_regcmp_p): Add prototypes. - - * sparc.md (cmpdi_v8plus): Add abort for default case in switch. - - * cppalloc.c: Include gansidecl.h. - - * cpperror.c: Include stdarg.h/varargs.h and gansidecl.h. - (cpp_file_line_for_message): Mark parameter `pfile' with - ATTRIBUTE_UNUSED. - (v_cpp_message): New function. - (cpp_message): Use it. Also convert to variable arguments. - (cpp_fatal): Likewise. - (cpp_pfatal_with_name): Constify parameter `name'. - - * cppexp.c: Move gansidecl.h before cpplib.h. - * cpphash.c: Likewise. - * cpphash.h (hashf, delete_macro): Add prototypes. - - * cpplib.c: Include stdarg.h/varargs.h and move gansidecl.h before - cpplib.h. Don't include errno.h. - (update_path): Add arguments to prototype. - (cpp_fatal, cpp_file_line_for_message, cpp_message, delete_macro, - cpp_print_containing_files): Remove redundant prototypes. - (cpp_hash_cleanup, add_import, append_include_chain, - make_assertion, path_include, initialize_builtins, - initialize_char_syntax, finclude, validate_else, comp_def_part, - lookup_import, redundant_include_p, is_system_include, - read_name_map, read_filename_string, open_include_file, - check_macro_name, compare_defs, compare_token_lists, - eval_if_expression, change_newlines): Add prototype arguments. - (hashf): Remove redundant prototype. - (read_token_list, free_token_list, safe_read, xcalloc, savestring, - conditional_skip, skip_if_group): Add prototype arguments. - (fdopen): Remove redundant prototype. - (do_define, do_line, do_include, do_undef, do_error, do_pragma, - do_ident, do_if, do_xifdef, do_else, do_elif, do_endif, do_sccs, - do_once, do_assert, do_unassert, do_warning): Add prototype arguments. - (struct directive): Add prototype arguments to function pointer - member `func'. - (handle_directive): Add missing arguments to call to `do_line'. - (do_include): Mark parameters `unused1' and `unused2' with - ATTRIBUTE_UNUSED. - (do_line): Likewise for `keyword' and new parameters `unused1' and - `unused2'. - (do_error): Likewise for `keyword'. - (do_warning): Likewise. Also add missing argument `pfile' in call - to cpp_pedwarn. - (do_once): Mark parameter `keyword', `unused1' and `unused2' with - ATTRIBUTE_UNUSED. - (do_ident): Likewise for `keyword', `buf' and `limit'. - (do_pragma): Likewise. Also add missing arguments in call to do_once. - (do_sccs): Mark parameter `keyword', `buf' and `limit' with - ATTRIBUTE_UNUSED. - (do_if): Likewise for `keyword'. - (do_elif): Likewise. - (eval_if_expression): Likewise for `buf' and `length'. - (do_xifdef): Likewise for `unused1' and `unused2'. - (do_else): Likewise for `keyword', `buf' and `limit'. - (do_endif): Likewise. - (parse_name): Add missing argument `pfile' in call to cpp_pedwarn. - (cpp_handle_options): Remove superfluous NULL argument in call to - cpp_fatal. - (cpp_handle_options): Likewise. - (do_assert): Mark parameter `keyword', `buf' and `limit' with - ATTRIBUTE_UNUSED. - (do_unassert): Likewise. - (cpp_print_file_and_line): Add missing argument `pfile' in call to - cpp_file_line_for_message. - (v_cpp_error): New function. - (cpp_error): Use it. Also accept variable arguments. - (v_cpp_warning): New function. - (cpp_warning): Use it. Also accept variable arguments. - (cpp_pedwarn): Accept variable arguments. - (v_cpp_error_with_line): New function. - (cpp_error_with_line): Use it. Accept variable arguments. - (v_cpp_warning_with_line): New function. - (cpp_warning_with_line): Use it. Accept variable arguments. Hide - definition. - (cpp_pedwarn_with_line): Accept variable arguments. - (cpp_pedwarn_with_file_and_line): Likewise. - (cpp_error_from_errno): Constify parameter `name'. Add missing - argument `pfile' in call to cpp_file_line_for_message. - (cpp_perror_with_name): Constify parameter `name'. - - * cpplib.h: Define PARAMS() in terms of PROTO(). - (fatal): Remove redundant prototype. - (cpp_error, cpp_warning, cpp_pedwarn, cpp_error_with_line, - cpp_pedwarn_with_line, cpp_pedwarn_with_file_and_line, - cpp_error_from_errno, cpp_perror_with_name, cpp_pfatal_with_name, - cpp_fatal, cpp_message, cpp_pfatal_with_name, - cpp_file_line_for_message, cpp_print_containing_files): Add - arguments to prototypes. - (scan_decls, cpp_finish): Add prototypes. - - * cppmain.c: Include gansidecl.h. - (main): Remove unused variable `i'. - - * dbxout.c: Include toplev.h. - - * demangle.h (do_tlink, collect_execute, collect_exit, - collect_wait, dump_file, file_exists): Add prototype. - - * dwarf2out.c (dwarf_type_encoding_name, decl_start_label): Hide - prototype and definition. - (gen_unspecified_parameters_die): Don't assign results of call to - function new_die() to unused variable `parm_die'. - (dwarf2out_line): Mark parameter `filename' with ATTRIBUTE_UNUSED. - (dwarf2out_define): Likewise for `lineno' and `buffer'. - - * dwarfout.c (output_unsigned_leb128, output_signed_leb128): Hide - prototype and definition. - (output_die): Add prototype arguments to function pointer arg. - (output_unspecified_parameters_die): Mark parameter `arg' with - ATTRIBUTE_UNUSED. - - * except.c (output_exception_table_entry): Remove unused variable - `eh_entry'. - - * except.h (expand_fixup_region_start, expand_fixup_region_end): - Add prototypes. - - * expr.c (do_jump_by_parts_equality_rtx): Remove prototype. - - * expr.h (do_jump_by_parts_equality_rtx): Add prototype. - - * fix-header.c: Include stdarg.h/varargs.h, move gansidecl.h - before cpplib.h, include cpphash.h, remove redundant prototype of - cpp_fatal, don't define `const', add a prototype for `fatal'. - (cpp_file_line_for_message): Add missing arguments `pfile'. - (v_cpp_message): New function. - (cpp_message): Use it. - (v_fatal): New function. - (fatal, cpp_fatal): Use it. - (cpp_pfatal_with_name): Constify parameter `name'. - - * flow.c (free_regset_vector): Remove redundant prototype. - - * function.c (round_down): Wrap prototype and definition with - macro ARGS_GROW_DOWNWARD. - (record_insns): Wrap prototype and definition with - defined (HAVE_prologue) || defined (HAVE_epilogue). - - * gansidecl.h (ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5): New macros. - - * gen-protos.c: Include gansidecl.h. - (hashf): Don't make it static, constify parameter `name'. - - * genattrtab.c (check_attr_test): Change XEXP() to XSTR() to match - specifier %s in calls to function `fatal'. - - * haifa-sched.c: Include toplev.h. - (find_rgns): Remove unused variable `j'. - - * integrate.c (note_modified_parmregs): Mark parameter `x' with - ATTRIBUTE_UNUSED. - (mark_stores): Likewise. - - * jump.c (mark_modified_reg): Likewise. - - * output.h (insn_current_reference_address): Add prototype. - (eh_frame_section): Likewise. - - * print-rtl.c: Include bitmap.h. - - * reload1.c (reload): Wrap variables `note' and `next' in macro - PRESERVE_DEATH_INFO_REGNO_P. - (forget_old_reloads_1): Mark parameter `ignored' with - ATTRIBUTE_UNUSED. - (choose_reload_regs): Remove unused variable `in'. - (reload_cse_invalidate_mem): Mark parameter `ignore' with - ATTRIBUTE_UNUSED. - (reload_cse_check_clobber): Likewise. - - * rtl.h (expand_null_return, reg_classes_intersect_p): Add prototype. - (mark_elimination): Fix typo in prototype. - - * scan-decls.c: Include gansidecl.h. - - * tree.h (using_eh_for_cleanups, supports_one_only): Add prototype. - -Mon May 18 22:37:33 1998 Jeffrey A Law (law@cygnus.com) - - * function.c (identify_blocks): Fix thinko when setting the - block number for NOTE_INSN_BLOCK_END. - -Mon May 18 15:30:42 1998 Nick Clifton - - * config/v850/lib1funcs.asm: Add .text pseudo op to start of - ___udivsi3. - - * config/v850/lib1funcs.asm: Fix .size pseudo ops to use three - underscores for the prefixes to the names of the maths functions. - - * dbxout.c (dbxout_parms): Revert to using DECL_ARG_TYPE. Add - comment explaining why. - -Mon May 18 13:20:23 1998 Richard Henderson - - * tree.h (TYPE_SIZE_UNIT): New. - (struct tree_type): Add size_unit member. - * stor-layout.c (layout_type): Initialize it. - * expr.c (get_inner_reference) [ARRAY_REF]: Use it. - * tree.c (size_in_bytes, int_size_in_bytes): Likewise. - -Mon May 18 12:07:37 1998 Richard Earnshaw (rearnsha@arm.com) - - * stor-layout.c (layout_record): Fix off-by-one error when checking - length of the TYPE_BINFO vector. - -Mon May 18 10:59:23 1998 Nick Clifton - - * dbxout.c (dbxout_parms): Use TREE_ARG to compute the type of a - function parameter passed in memory. - -Mon May 18 09:02:09 1998 Robert Lipe - - * dwarfout.h, dwarf2out.h, dbxout.h, sdbout.h: New files. - Prototypes for externally used functions in respective C files. - * dwarfout.c, dbxout.c, dwarf2out.c, sdbout.c, toplev,c, - final.c: Include above files. - * Makefile.in (toplev.o): Add dependency for above four headers. - (final.o): Likewise. - (dwarfout.o, dbxout.o, dwarf2out.o, sdbout.o): Depend on four - respective header files. - -Mon May 18 01:23:33 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (TARGET_TOOLPREFIX): No longer define. - (AR_FOR_TARGET, RANLIB_FOR_TARGET): Define to use versions in - the build tree if they exist. - (AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): Update - appropriately. - (objdir): Let configure substitute value. - (FLOAT_H): Let configure select a pre-built version from the - config subdir. - * build-make (INSTALL_TARGET, ALL): Disable, no longer needed. - * configure.in: Substitute for objdir. - - * Makefile.in (build_canonical, host_canonical): Let configure - substitute values for these variables. - * configure.in: Substitute for build_canonical, host_canonical - and target_subdir in generated Makefile. - - * output.h (find_basic_blocks): Declare. - (free_basic_block_vars, set_block_num, life_analysis): Likewise. - - * Makefile.in (BISON): Use bison from the build tree if it exists. - (FLEX): Similarly. - -Mon May 18 00:08:19 1998 Nick Clifton - - * gcc.c (SWITCH_CURTAILS_COMPILATION): Definition. - (DEFAULT_SWITCH_CURTAILS_COMPILATION): True for options -S and -c. - (process_command): If HAVE_EXECUTABLE_SUFFIX is defined then scan - command line arguments to see if an executable is not being - created, and if so - do not append the suffix. - - * tm.texi (SWITCH_CURTAILS_COMPILATION): Add description of new - driver macro. - -Sun May 17 23:59:45 1998 John Wehle (john@feith.com) - - * i386.h (ALIGN_DFmode): Delete. - (CONSTANT_ALIGNMENT): Define. - * varasm.c (force_const_mem): Use it. - -Sun May 17 19:31:05 1998 Richard Henderson - - * alpha.c (alpha_emit_conditional_branch): Clear cmp_code after - using it with swap_condition, not before. - -Sun May 17 13:44:32 1998 Jim Wilson - - * alias.c (mode_alias_check): Delete. - (true_dependence, anti_dependence, output_dependence): Revert April 21 - change. - -Sun May 17 08:45:21 1998 Krister Walfridsson - - * toplev.c (output_lang_identify): Enable prototype and definition. - -Sun May 17 01:12:27 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat May 16 23:20:32 1998 Richard Henderson - - * alpha/osf.h (HAVE_STAMP_H): Define. - * alpha.c: Use it. - * alpha/netbsd.h, alpha/netbsd-elf.h: New files. - * configure.in (alpha*-*-netbsd*): New. - Based on patches from Paul H. Anderson . - - * configure.in (alpha*-*-linux-*): Kill xm_defines. - (alpha*-*-linux-gnulibc1*) [fixincludes]: Define. - * alpha/xm-linux.h: Remove file. - -Sat May 16 18:32:45 1998 Doug Evans - - * dbxout.c (dbxout_parms): If mode of type of parameter living - in memory doesn't match mode of DECL_RTL, make big endian correction. - -Fri May 15 21:40:06 1998 John Wehle (john@feith.com) - - * i386.md (movdi-1, movdi): Rewrite based on SI move patterns. - -Fri May 15 18:55:22 1998 Jason Merrill - - * tree.h (BINFO_SIZE, TYPE_BINFO_SIZE): New macros. - * stor-layout.c (layout_record): Set it. - -Fri May 15 18:49:30 1998 Mark Mitchell - - * toplev.c (rest_of_compilation): Don't defer nested functions. - -Fri May 15 17:42:52 1998 Bob Manson - - * config/rs6000/rs6000.c (rs6000_stack_info): Align the stack bottom - to an 8-byte boundary if info_ptr->fpmem_p. - -Fri May 15 17:36:11 1998 Bill Moyer - - * loop.c (basic_induction_var): Added test preventing - CCmode parameter passed to convert_modes(). - -Fri May 15 17:26:18 1998 Alexandre Petit-Bianco - - * expr.c (expand_expr, case EXPR_WITH_FILE_LOCATION): Save/restore - input_filename and lineno around expand_expr call. Set them to values - in WFL before expand_expr call. - -Fri May 15 12:44:57 1998 Benjamin Kosnik - - * stor-layout.c (set_sizetype): Set TYPE_NAME on bitsizetype. - -Fri May 15 07:20:03 1998 Mark Mitchell - - * fold-const.c (constant_boolean_node): New function. - (fold): Use it. - -Fri May 15 11:21:16 1998 J"orn Rennecke - - * sh.c (gen_shl_and): Don't sign extend constant for kind two. - Abort if trying to split kind 3 or 4 outside of combine. - -Fri May 15 01:47:37 1998 Jeffrey A Law (law@cygnus.com) - - * mips.c (print_operand, case 'x'): Use HOST_WIDE_INT_PRINT_HEX. - -Fri May 15 01:42:45 1998 Mumit Khan - - * objc/Make-lang.in (OBJC_O): Add missing exeext. - (libobjc.a, runtime-info.h): Likewise. - -Fri May 15 01:29:39 1998 John Wehle (john@feith.com) - - * i386.h (DATA_ALIGNMENT): Define. - -Fri May 15 05:35:37 1998 J"orn Rennecke - - * reload1.c (delete_output_reload): Ignore single USE that - was emitted for the pseudo use of this INSN. - If the no reference to REG between OUTPUT_RELOAD_INSN and INSN - remains, we can always delete OUTPUT_RELOAD_INSN. - -Thu May 14 18:38:50 1998 Jim Wilson - - * reload.c (find_reloads): Don't penalize SCRATCH output reload. - -Thu May 14 15:10:30 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (expr.o): Remove dependency on deleted modemap.def file. - -Thu May 14 16:30:47 1998 Andrew MacLeod - - * eh-common.h: New file for basic EH data structures. - * except.h: Various prototypes and structures for NEW_EH_MODEL. - * function.h (struct function): Add a struct eh_stack for the catch - clause stack. - * except.c (gen_exception_label): New function to generate an - exception label. - (push_eh_entry): Use gen_exception_label() and init 'label_used' field. - (push_entry): New function to push an existing entry onto a stack. - (receive_exception_label): New function to emit the code required - at the start of all catch blocks. - (struct func_eh_entry): New structure for maintaining handlers - associated with EH regions. - (new_eh_region_entry): New function to register an EH region. - (add_new_handler): New function to register a handler with a region. - (get_new_handler): Creates anew handler entry for registering. - (find_func_region): New function to convert a NOTE eh region number - to an Eh region index. - (get_first_handler): New function to get the first handler in a region. - (clear_function_eh_region): New function to release memory. - (duplicate_handlers): New function to duplicate a list of handlers. - (expand_eh_region_end): Create a new region entry node as well. - (expand_leftover_cleanups): Call receive_exception_label() and - register the cleanup as a handler to the current region. - (expand_start_catch): New function to start a catch clause. - (expand_end_catch): New function to end a catch clause. - (expand_start_all_catch): Restructure to not do the equivalent of - what expand_start_catch() does now. Push the exception region being - handled onto the catch stack. - (output_exception_table_entry): Issue an entry for each handler - associated with a region. - (set_exception_lang_code): New function for setting the language code. - (set_exception_version_code): New function to set the version number. - (output_exception_table): Output version and language codes. - (find_exception_handler_labels): Find handler labels using new scheme. - (is_exception_handler_label): New function, returns 1 if label is - present as a handler in some exception region. - (check_exception_handler_labels): Use the new scheme. - (init_eh_for_function): Initialize the catch stack. - (save_eh_status): Save the catch stack. - (restore_eh_status): Restore the catch stack. - (scan_region): Don't remove unreferenced handler label. Flow does it. - (get_reg_for_handler): New function to get the eh_context pointer - passed by __throw. - (expand_builtin_eh_stub): Changes required for NEW_EH_MODEL only. - * final.c (final_scan_insn): With NEW_EH_MODEL, add EH table - entry when processing END region rather that START region. - * flow.c (find_basic_blocks_1): Find all potential handler regions - now that we don't automatically know what the labels might be. - Let scan_region() remove unreferenced EH BEGIN/END labels. - * integrate.c (get_label_from_map): Put inlined labels onto the - permanent obstack since we don't know which ones might be exception - labels. - (save_for_inline_copying): Make new copies of all the handlers. - (expand_inline_function): Make new copies of all the handlers. - * libgcc2.c: Remove local struct decls, and include eh-common.h. - (find_exception_handler): With NEW_EH_MODEL the first matching - region we find is the right one. Add eh_info as a new parameter. - (__throw): Pass eh_info to find_exception_handler. Set handler - and pass use different regs under NEW_EH_MODEL. - -Thu May 14 12:58:21 1998 Jim Wilson - - * i960.h (hard_regno_mode_ok): Changed to function from array of - unsigned. - (HARD_REGNO_MODE_OK): Call function instead of testing bit. - * i960.c (hard_regno_mode_ok): Changed to function from array of - unsigned. - -Thu May 14 08:41:46 1998 J"orn Rennecke - - * reload.c (remove_replacements): New function. - * reload.h (remove_replacements): Declare. - * reload1.c (choose_reload_regs): Disable some reloads that - belong to inherited reloads. - -Thu May 14 02:17:17 1998 J"orn Rennecke - - * loop.c (scan_loop): Don't call move_movables for optimize_size. - - * reload1.c (merge_assigned_reloads): When merging, reset - reload_spill_index for the eliminated reload. - -Wed May 13 17:51:13 1998 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (schedule_insns): Fix merge goof. - -1998-05-13 Jim Wilson - - * varasm.c (make_decl_rtl): Revert April 1 change. - * alpha/alpha.h, alpha/win-nt.h, arm/arm.h, i386/unix.h, i960/i960.h, - m68k/linux.h, pa/pa.h, sparc/sparc.h, vax/vax.h (ASM_OUTPUT_MI_THUNK): - Get function name from the SYMBOL_REF in the DECL_RTL, not from - DECL_ASSEMBLER_NAME. - * i386/winnt.c (gen_stdcall_suffix): Comment for questionable use of - DECL_ASSEMBLER_NAME. - -Wed May 13 13:09:19 1998 Jim Wilson - - * i386.c (notice_update_cc, output_float_compare): Disable - TARGET_CMOVE support. - -Wed May 13 15:28:59 1998 Michael Meissner - Jeff Law - - * rtlanal.c (find_reg_note): Ignore notes that are not on on - insns of class 'i'. - (find_regno_note): Likewise. - - * Makefile.in (stor-layout.o): Depend on except.h. - (varasm.o, function.o): Likewise. - (expr.o): Depend on except.h, modemap.def and hard-reg-set.h. - - * Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o. - (rtl.o, emit-rtl.o): Add dependency on bitmap.h. - ($(HOST_PREFIX_1)rtl.o): Likewise. - ($(HOST_PREFIX_1)bitmap.o): New host object. - * emit-rtl.c (toplevel): Include bitmap.h. - (gen_rtx): Handle 't' and 'b' nodes. - * print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes. - Print block number for block begin/end notes. Print 't' type - nodes as a pointer. Know that the 3rd argument of live range - start/stop notes is really a range_info rtx. If type is 'b', print - out argument as a bitmap. - * rtl.c: Include bitmap.c. - (copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'. - (note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE. - * rtl.def (RANGE_LIVE): New node to hold live information while we - recalculate the basic blocks. - (RANGE_REG, RANGE_INFO): New rtl types for live range splitting. - (RANGE_VAR): New node, to hold information saved in symbol node for New - communicating live range information to the debug output functions. - * rtl.h (rtunion_def): Add rttree and rtbit fields. - (XBITMAP, XTREE): New accessor macros. - (NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes. - (NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes. - (NOTE_BLOCK_LIVE_RANGE_BLOCK): Define. - (NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes. - (RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros. - (RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros. - (RANGE_INFO_*): Likewise. - * sched.c (sched_analyze): Keep live range start/stop notes. - (unlink_other_notes): Likewise. - * haifa-sched.c (sched_analyze): Keep live range start/stop notes. - (unlink_other_notes): Likewise. - * tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros. - (BLOCK_LIVE_RANGE_FLAG): Likewise. - (DECL_LIVE_RANGE_RTL): Likewise. - (struct tree_block): Add live_range_flag, live_range_var_flag, - live_range_start and live_range_end. - (struct tree_decl): Add live_range_rtl field. - * gengenrtl.c (type_from_format): Handle 'b' and 't'. - (accessor_from_format): Likewise. - - * haifa-sched.c (schedule_block): Make verbose output line up. - Also add a blank line in printing the individual ready lists. - -Wed May 13 15:43:44 1998 Kaveh R. Ghazi - - * Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h. - (c-lex.o): Depend on output.h. - (c-common.o): Likewise. - (stmt.o): Likewise. - (calls.o): Likewise. - (integrate.o): Depend on toplev.h. - (regclass.o): Depend on output.h. - (final.o): Depend on reload.h. - - * c-common.c: Include output.h. - (check_format_info): Remove unused variable `integral_format'. - - * c-decl.c (print_lang_decl): Mark parameters `file', `node' and - `indent' with ATTRIBUTE_UNUSED. - (print_lang_type): Likewise. - (maybe_build_cleanup): Likewise for parameter `decl'. - (copy_lang_decl): Likewise for parameter `node'. - - * c-lang.c: Include c-tree.h, c-lex.h and toplev.h. - (lang_print_xnode): Mark parameters `file', `node' and `indent' - with ATTRIBUTE_UNUSED. - (lookup_interface): Likewise for parameter `arg'. - (is_class_name): Likewise. - (maybe_objc_check_decl): Likewise for parameter `decl'. - (maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and - `reflexive'. - (maybe_objc_method_name): Likewise for parameter `decl'. - (build_objc_string): Likewise for parameters `len' and `str'. - - * c-lex.c: Include output.h. - - * c-lex.h (position_after_white_space): Correct typo in prototype. - - * c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else, - c_expand_end_cond, init_iterators): Add prototypes. - - * caller-save.c (set_reg_live): Mark parameters `reg' and `setter' - with ATTRIBUTE_UNUSED. - - * calls.c: Include output.h. - - * cccp.c (pipe_closed): Mark parameter `signo' with - ATTRIBUTE_UNUSED. - - * combine.c: Move inclusion of expr.h to after insn-config.h. - - * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define - as empty, rather define as ((void)0). - - * sparc.c (sparc_check_64): Add braces around ambiguous `else'. - Add parentheses around assignment used as truth value. - - * cplus-dem.c (squangle_mop_up): Change return type to void. - (internal_cplus_demangle): Remove unused parameter `options'. - All callers changed. - (cplus_demangle_opname): Remove function wide variable `int i' and - replace with `size_t i' at each location where it is used. - (cplus_demangle_opname): Change type of `i' from int to size_t. - - * cppexp.c (right_shift): Mark parameter `pfile' with - ATTRIBUTE_UNUSED. - - * cpphash.c (cpp_lookup): Likewise. - (cpp_hash_cleanup): Likewise. - - * cpplib.c (parse_name): Add a prototype and make it static. - (null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED. - (null_cleanup): Likewise for parameters `pbuf' and `pfile'. - (macro_cleanup): Likewise for parameter `pfile'. - (file_cleanup): Likewise. - - * cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read, - cpp_read_check_assertion, skip_rest_of_line): Add prototypes. - - * crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data, - __DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED. - - * cse.c (cse_check_loop_start): Mark parameter `set' with - ATTRIBUTE_UNUSED. - - * dbxout.c (flag_minimal_debug, have_used_extensions, - source_label_number): Move inside macro wrapper check against - defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO). - - * dwarf2out.c (gen_entry_point_die): Hide prototype and definition. - - * except.h (doing_eh): Provide prototype. - - * expr.c: Move inclusion of expr.h to after insn-config.h. - - * final.c: Include reload.h. - (shorten_branches): Cast the first argument of bzero to char *. - - * fix-header.c (cpp_print_containing_files): Mark parameter - `pfile' with ATTRIBUTE_UNUSED. - (cpp_fatal): Likewise. - - * flow.c (find_basic_blocks_1): Cast the first argument of bzero - to char *. - - * genattrtab.c (make_length_attrs): Change the type of variable - `i' from int to size_t. - (zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED. - (one_fn): Likewise. - - * genextract.c (main): When generating insn-extract.c, mark - variable `junk' with ATTRIBUTE_UNUSED. - - * gengenrtl.c (gencode): When generating genrtl.c, cast the first - argument of bzero to char*. - - * integrate.c: Include toplev.h. - - * libgcc2.c: Wrap `struct exception_table' and - `find_exception_handler' in macro DWARF2_UNWIND_INFO. - - * objc/Make-lang.in (objc-act.o): Depend on toplev.h. - - * objc/objc-act.c: Include toplev.h. - (lang_print_xnode): Mark parameters `file', `node' and `indent' - with ATTRIBUTE_UNUSED. - (finish_protocol): Likewise for parameter `protocol'. - - * output.h (declare_weak): Add prototype. - (decode_reg_name): Don't wrap with TREE_CODE macro. - (assemble_alias): Add prototype. - - * regclass.c: Include output.h. - - * reload.h (reloads_conflict): Add prototype. - - * rtl.h (print_rtl_single, mark_elimination, reg_class_subset_p, - output_func_start_profiler): Add prototypes. - - * rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with - ATTRIBUTE_UNUSED. - - * scan-decls.c: Include scan.h. - - * scan.h (recognized_function, recognized_extern): Add prototypes. - - * stmt.c: Include output.h. - - * toplev.c (error_for_asm, warning_for_asm): Remove prototypes. - (output_lang_identify): Hide prototype and definition. - (float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED. - (pipe_closed): Likewise. - - * toplev.h (count_error, strip_off_ending, error_for_asm, - warning_for_asm): Add prototypes. - -Wed May 13 12:54:19 1998 Michael Meissner - - * toplev.c (rest_of_compilation): "Charge" final for any time - doing various cleanup operations after finishing compilation - of a function. - - * flow.c (dump_flow_info): Also print number of sets and - whether or not the pseudo is a user variable. - - * flow.c (reg_n_max): New global variable. - * regclass.c (allocate_reg_info): Keep reg_n_max up to date. - Delete regno_max variable. - * regs.h (REG_N_CHECK): Define. - (REG_N_REFS, REG_N_SETS, REG_N_DEATHS): Use REG_N_CHECK. - (REG_N_CHANGES_SIZE, REG_N_CALLS_CROSSED, REG_LIVE_LENGTH): Likewise. - (REGNO_FIRST_UID, REGNO_LAST_UID, REGNO_LAST_NOTE_UID): Likewise. - -Wed May 13 12:54:19 1998 Martin von Loewis - - * acconfig.h (ENABLE_CHECKING): Undefine. - * configure.in (--enable-checking): New option. - -Wed May 13 08:52:08 1998 J"orn Rennecke - - * reload1.c (merge_assigned_reloads): Can merge - RELOAD_FOR_INPUT_ADDRESS and RELOAD_FOR_OTHER_ADDRESS even - if RELOAD_FOR_INPUT with the same reload_reg_rtx is present. - -Tue May 12 20:05:57 1998 Jim Wilson - - * collect2.c (main): Ignore do_collecting when COLLECT_EXPORT_LIST. - -Wed May 13 03:23:45 1998 J"orn Rennecke - - * reload1.c (gen_reload): Create REG_EQUIV notes. - -Tue May 12 22:21:07 1998 J"orn Rennecke - - * reload1.c (reload): Fix check for USEs to use code of pattern. - (choose_reload_regs): Remove dead variable use_insn. - -Tue May 12 14:04:49 1998 Jeffrey A Law (law@cygnus.com) - - * pa.h (DBX_CONTIN_LENGTH): Reduce to 3000 bytes. - -Tue May 12 15:16:02 1998 Michael Meissner - - * haifa-sched.c (HAIFA_INLINE): Define to be __inline unless - already defined. - (find_insn_{,mem_}list): Use HAIFA_INLINE, not __inline. - (insn_{unit,issue_delay}): Likewise. - (blockage_range): Likewise. - (actual_hazard{,_this_instance}): Likewise. - (schedule_unit): Likewise. - (potential_hazard): Likewise. - (insn_cost): Likewise. - (swap_sort): Likewise. - (queue_insn): Likewise. - (birthing_insn_p): Likewise. - (adjust_priority): Likewise. - (get_block_head_tail): Likewise. - (init_rgn_data_dependences): Likewise. - -Tue May 12 10:27:54 1998 Klaus Kaempf - - * alpha/vms.h (COMMON_ASM_OP, ASM_OUTPUT_ALIGNED_COMMON): Define. - -Tue May 12 11:44:14 1998 Gavin Koch - - * config/mips/mips.h (ASM_OUTPUT_ALIGN): Remove trailing semi-colon. - -Tue May 12 11:38:31 1998 Gavin Koch - - * config/mips/mips.md (dslot): Move after definition of "cpu" - attribute. Handle r3900 case. - -Tue May 12 10:21:36 1998 Kaveh R. Ghazi - - * system.h: Define the STRINGIFY macro here. - * protoize.c: Not here. - * gengenrtl.c (DEF_RTL_EXPR): Use the STRINGIFY macro. - -Tue May 12 00:47:33 1998 John Wehle (john@feith.com) - - * varasm.c (assemble_variable): Compute the alignment of the data - earlier so that both initialized and uninitialized variables are - effected by DATA_ALIGNMENT. - * tm.texi (DATA_ALIGNMENT): Updated appropriately. - -Mon May 11 19:57:58 1998 Jeffrey A Law (law@cygnus.com) - - * mips.c: Prototype static functions. - -Mon May 11 17:43:03 1998 Jim Wilson - - * regmove.c (fixup_match_2, find_matches, regmove_profitable): - Add explanatory comments. - - * sparc.h (SPARC_INCOMING_INT_ARG_FIRST): Support TARGET_FLAT. - -Mon May 11 17:24:27 1998 Richard Henderson - - * sparc.md (ffsdi2): Disable. Simplify the expression as well. - -Mon May 11 13:30:44 1998 Jim Wilson - - * varasm.c (make_decl_rtl): Disable April 1 change. - -Mon May 11 09:14:41 1998 Richard Henderson - - * configure.in (alpha-*-linux-gnu): Undo lossage from gcc2 merge. - -Mon May 11 08:24:18 1998 Richard Henderson - - * alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Add '`'. - * alpha.c (print_operand): Handle it. - * alpha.md (fix_truncdfsi2, fix_truncsfsi2): New patterns and - related define_splits. Also add peepholes for SImode reload - plus sign_extend lossage. - -Mon May 11 09:33:10 1998 Kaveh R. Ghazi - - * genattr.c: Include stdarg.h/varargs.h. Change function - `fatal' to use variable arguments instead of faking it with - integer parameters. Provide a prototype which also - checks the format specifiers using ATTRIBUTE_PRINTF_1. - - * genattrtab.c: Likewise. - * gencodes.c: Likewise. - * genconfig.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * genflags.c: Likewise. - * genopinit.c: Likewise. - * genpeep.c: Likewise. - * genrecog.c: Likewise. - * genoutput.c: Likewise. Similarly for function `error'. - -Sun May 10 02:27:03 1998 Kaveh R. Ghazi - - * acconfig.h (HAVE_VOLATILE): Insert stub for autoconf. - * alocal.m4 (GCC_C_VOLATILE): New autoconf test. - * configure.in: Use GCC_C_VOLATILE. - * system.h (volatile): Define as empty if no volatile support is - available. - -Sun May 10 01:21:43 1998 Jeffrey A Law (law@cygnus.com) - - * genemit.c (output_add_clobbers): Removed unused variable 'i' from - generated function. - -Sat May 9 02:02:15 1998 Richard Henderson - - * loop.c (get_condition): Don't combine when either compare is MODE_CC. - * alpha.c (alpha_emit_conditional_branch): New function. Taken from - the body of beq; additionally set the mode of the branch to CCmode for - FP compares and not fast_math. - (alpha_emit_conditional_move): Always use a compare insn for FP - when not fast_math, as well as setting CCmode on the cmov. - * alpha.md (beq, bne, blt, et al): Call alpha_emit_conditional_branch. - - * machmode.h (COMPLEX_MODE_P): New macro. - -Sat May 9 01:53:23 1998 Richard Henderson - - * haifa-sched.c (print_exp): Fix typo. - -Fri May 8 21:48:50 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Fri May 8 18:23:08 1998 Michael Meissner - - * final.c (final_scan_insn): Call fatal_insn instead of abort if - we could not split an insn when required to. - - * m32r.md ({add,sub}di3): Add define_splits and appropriate low - level insns. - (peepholes): Disable peepholes that call dead_or_set_p. - (movsi): Rewrite to handle addresses better after last change. - Add define_split to split load of addresses in large/medium modes. - (prologue): Call m32r_expand_prologue. - (movsi_{push,pop}): Generators for push/pop. - (movsi): Support PRE_{INC,DEC}, POST_INC. - (mov{di,df}): Rewrite. Always split the insns. - (movsf): Add define_split to get register load in correct mode. - (cmp_ne_small_const_insn): Use 'N' instead of 'S' constraint. - (attributes): Rewrite attributes so that type indicates both the - type and the length of the insn directly. - (all insns): Change to use new type attributes. - (debug): New attribute to convey whether -mdebug was used. - (opt_space): New attribute to convey whether -Os was used. - (function units): Loads are 3 cycles, not 2. Better classify all - insns into short/long. - (load/store/extend insns): Add separate case for load/store - indirect operations without an offset. - (divsi3): Division is a long operation, not short. - - * m32r.h (LEGITIMATE_LO_SUM_ADDRESS_P): Do not allow LO_SUM for - modes > 1 word. - (GO_IF_MODE_DEPENDENT_ADDRESS): LO_SUM is now mode dependent. - (CONST_OK_FOR_LETTER_P): Make 'N' handle reverse 8 bit compares. - (EXTRA_CONSTRAINT): Remove 'S' special support. Add 'U' for - operands with PRE_{INC,DEC}, POST_INC. - (FUNCTION_PROFILER): Call abort instead of doing nothing. - (GO_IF_LEGITIMATE_ADDRESS): Allow PRE_{INC,DEC}, POST_INC of - SImode variables. - (gen_split_move_double): Declare. - (EXTRA_CONSTRAINT): Add 'T' for memory reference with no offset. - - * m32r.c (gen_split_move_double): Fix typo. Also, don't call - emit_move_insn, build up SET's directly. - (toplevel): Include system.h, not stdio.h. - (move_double_src_operand): Allow any DF or DI mode constant. - (gen_split_move_double): Split moves of DI or DF values into the - appropriate moves, loads, or stores. Don't handle use of auto - inc/dec if using dead index. Do handle overlapping moves, etc. - (m32r_frame_info): Remove prologue_size field. - (m32r_compute_frame_size): Don't calculate prologue size. - (m32r_output_function_prologue): Change to pretty much a NOP. - (m32r_expand_prologue): Expand prologue as a series of INSNs. - (m32r_print_operand): Add support for PRE_{INC,DEC}, POST_INC. - (m32r_print_operand_address): Likewise. - -Fri May 8 14:13:21 1998 H.J. Lu (hjl@gnu.org) - - * reload1.c (emit_reload_insns): When performing expensive - optimizations, do not output the last reload insn if OLD is - not the dest of NSN and is in the src and is clobbered by INSN. - -Fri May 8 09:47:29 1998 Kaveh R. Ghazi - - * Makefile.in (genrtl.o): Depend on system.h. - * gengenrtl.c (gencode): When creating genrtl.c, have it - include system.h. - -Fri May 8 10:57:33 1998 Andreas Schwab - - * config/m68k/t-linux: Remove extra stuff already included in - config/t-linux. - -Fri May 8 09:53:24 1998 Paul Eggert - - * fixinc.wrap: Renamed from fixinc.math. Put wrapper around - curses.h if it contains `typedef char bool;', as suggested by - Manfred Hollstein . - - * configure.in: Rename fixinc.math to fixinc.wrap. - -Thu May 7 19:26:34 1998 Jim Wilson - - * gcc.c (read_specs): Handle missing blank line at end of specs file. - - * i386.md (movsicc, movhicc, movsicc_1, movhicc_1, movsfcc_1, - movdfcc_1): Disable. - -Thu May 7 15:39:14 1998 Jim Wilson - - * configure.in (enable_threads): Rename to enable_threads_flag before - main loop. Set enable_threads to enable_threads_flag inside main - loop. - -Thu May 7 17:38:03 1998 Michael Meissner - - * r6000/eabi.asm (__eabi): Restore LR in case __eabi is called - multiple times. - -Thu May 7 14:26:05 1998 Kaveh R. Ghazi - - * aclocal.m4 (GCC_FUNC_VFPRINTF_DOPRNT): New macro. - - * configure.in: Add a call to GCC_FUNC_VFPRINTF_DOPRNT. - (AC_CHECK_HEADERS): Remove unused check for varargs.h,sys/varargs.h. - (AC_CHECK_FUNCS): Remove unused check for vprintf. - - * Makefile.in: Add support for linking in vfprintf.c and doprint.c. - (cccp.o): Depend on gansidecl.h. - (cexp.o): Likewise. - - * cccp.c: Convert from using PRINTF_ALIST/PRINTF_DCL to VPROTO as - per the rest of gcc source. - * cexp.y: Likewise. Include gansidecl.h and remove all code made - redundant. - - * cccp.c: Remove checks for HAVE_VPRINTF and the associated code - used when vfprintf is missing. - * cexp.y: Likewise. - * gcc.c: Likewise. - * genattrtab.c: Likewise. - * mips-tfile.c: Likewise. - * toplev.c: Likewise. - - * vfprintf.c: New file. - * doprint.c: New file. - -Thu May 7 10:18:41 1998 Jeffrey A Law (law@cygnus.com) - - * config/linux.h (ASM_COMMENT_START): Remove from here, - * config/linux-aout.h (ASM_COMMENT_START): and here, - * config/i386/linux.h (ASM_COMMENT_START): to here, - * config/i386/linux-aout.h (ASM_COMMENT_START): and here. - * config/i386/linux-oldld.h (ASM_COMMENT_START): Define - here as '#' too. - -Thu May 7 10:55:59 1998 Andreas Schwab - - * config/m68k/m68k.md (adddi3, subdi3): Properly negate the DImode - constant. - -Wed May 6 22:32:37 1998 Robert Lipe - - * Makefile.in (dwarfout.o): Add toplev.h dependency. - * dwarfout.c, i386.c: Include toplev.h. - * toplev.h (pfatal_with_name): Add prototype. - -Wed May 6 19:02:29 1998 Jason Merrill - - * Makefile.in: Fix .SUFFIXES. - -Wed May 6 19:31:32 1998 Alan Modra - - * config/linux.h (ASM_COMMENT_START): Define as "#". - * config/linux-aout.h (ASM_COMMENT_START): Likewise. - -Wed May 6 15:51:39 1998 Jim Wilson - - * objc/Make-lang.h (objc-parse.o): Add toplev.h dependency. - * objc/objc-parse.y, objc/objc-parse.c: Regenerate. - - * toplev.c: Include toplev.h. - * Makefile.in (c-common.o, c-convert.o, c-decl.o, c-iterate.o, - c-lex.o, c-parse.o, c-pragma.o, c-typeck.o, calls.o, convert.o, - dwarf2out.o, except.o, expr.o, final.o, fold-const.o, function.o, - hash.o, profile.o, real.o, reg-stack.o, regclass.o, reload.o, - reload1.o, stmt.o, stor-layout.o, tlink.o, tree.o, varasm.o): Add - toplev.h dependency. - - * mips/mips.c (save_restore_insns): Change FRAME_POINTER_REGNUM to - HARD_FRAME_POINTER_REGNUM. - - * expr.c (target_temp_slot_level): Delete duplicate definition. - -Wed May 6 16:46:01 1998 Jeffrey A Law (law@cygnus.com) - - * stmt.c (mark_seen_cases): Make it have external linkage again. - * expr.h (mark_seen_cases): Add declaration, but only when tree.h - has been included. - - * haifa-sched.c (print_value, case SUBREG): Fix typo. - - * i386.c (output_387_binary_op): Add some braces to avoid warnings. - * i386.h (REG_CLASS_CONTENTS): Similarly. - - * toplev.c (-fsched-max): Delete flag. - (-fsched-interblock-max-blocks,-fsched-interblock-max-insns): Likewise. - * haifa-sched.c: Remove -fsched-max-N, -fsched-interblock-max-blocks-N - and -fsched-interblock-max-insns-N support. Remove INTERBLOCK_DEBUG - conditionals. - - * haifa-sched.c (find_rgns): Correctly handle reducible loops with - inner loops which are not reducible. - - * loop.c (regs_match_p): Fix typo in prototype. - - * regmove.c (try_auto_increment): Wrap declaration inside an - #ifdef AUTO_INC_DEC. - -Wed May 6 17:07:47 1998 Michael Meissner - - * final.c (output_operand_lossage): Call fatal with the operand - lossage message instead of calling abort. - -Wed May 6 15:37:27 1998 Kaveh R. Ghazi - - * c-common.c: Convert to using ctype macros defined in system.h. - * c-lex.c: Likewise. - * cccp.c: Likewise. - * collect2.c: Likewise. - * rs6000.c: Likewise. - * cpplib.c: Likewise. - * fix-header.c: Likewise. - * gcc.c: Likewise. - * gen-protos.c: Likewise. - * pexecute.c: Likewise. - * protoize.c: Likewise. - * rtl.c: Likewise. - * scan.c: Likewise. - * stmt.c: Likewise. - * tlink.c: Likewise. - * toplev.c: Likewise. - -Wed May 6 14:44:14 1998 Gavin Koch - - * config/mips/r3900.h (SUBTARGET_ASM_DEBUGGING_SPEC) : - Replace -gdwarf-2 with -g0. - -Wed May 6 11:43:18 1998 Kaveh R. Ghazi - - * Makefile.in (mips-tfile.o, mips-tdump.o): Depend on system.h. - * mips-tdump.c: Include system.h, remove redundant headers. - * mips-tfile.c: Likewise. Also, convert all ctype function calls - to calls of the macro versions defined in system.h. - - * objc/Make-lang.in (objc-act.o): Depend on system.h. - * objc/objc-act.c: Include system.h, remove redundant headers. - -Wed May 6 11:21:06 1998 Kaveh R. Ghazi - - * configure.in (AC_CHECK_FUNCS): Add isascii. - (GCC_NEED_DECLARATIONS): Add atof. - - * system.h: Provide prototypes for abort, atof, atol and sbrk here. - * rtl.c, rtl.h, toplev.c, tree.h: Not here. - -Wed May 6 10:52:49 1998 Kaveh R. Ghazi - - * system.h: Wrap time.h and sys/file.h in autoconf checks. - Provide default definitions for O_RDONLY and O_WRONLY here. - - * cccp.c, cpplib.c, fix-header.c, gcc.c, protoize.c: Not here. - -1998-05-06 Mark Mitchell - - * tree.h (IS_EXPR_CODE_CLASS): Remove bogus '3'. - -Wed May 6 06:35:38 1998 Robert Lipe - - * toplev.h: New file. Protypes for functions in toplev.c. - * tree.h, rtl.h: Deleted protos for functions in toplev.c. - * c-common.c, c-convert.c, c-decl.c, c-iterate.c, c-lex.c, - c-parse.in, c-parse.y, c-pragma.c, c-typeck.c, calls.c, - convert.c, dwarf2out.c, except.c, expr.c, final.c, fold-const.c, - function.c, hash.c, profile.c, real.c, reg-stack.c, regclass.c, - reload.c, reload1.c, stmt.c, stor-layout.c, tlink.c, tree.c, - varasm.c: Include it. - -Wed May 6 01:09:01 1998 Jeffrey A Law (law@cygnus.com) - Jim Wilson (wilson@cygnus.com) - - * haifa-sched.c (find_rgns): In no_loops case, fix test for leaf - blocks. Check for 1 successor which is the EXIT_BLOCK. - - * haifa-sched.c (find_rgns): Detect unreachable blocks, including - unreachable loops with more than one block. - -Wed May 6 08:22:24 1998 Manfred Hollstein - - * fix-header.c (write_rbrac): Add "abort" to functions which need to - be protected. - -Wed May 6 00:09:36 1998 Jeffrey A Law (law@cygnus.com) - - * Check in merge from gcc2. See ChangeLog.12 for details. - -Tue May 5 14:33:49 1998 Jim Wilson - - * c-common.c (scan_char_table): Separate 's' and 'c'. 'c' does not - accept 'a' flag. 'S' does accept 'a' flag. - (check_format_info): When pedantic, warn for m/C/S/a/A formats, - and `a' flag. - - * elf64.h (MULTILIB_DEFAULTS): Move definition after mips.h include. - -Tue May 5 10:50:39 1998 Andreas Schwab - - * config/m68k/m68k.h: Declare functions from m68k.c used in - macros and machine description. - (ASM_OUTPUT_LONG_DOUBLE): Always use `l' flag in print format for - long values. - (ASM_OUTPUT_FLOAT): Likewise. - (ASM_OUTPUT_FLOAT_OPERAND): Likewise. - -Tue May 5 01:28:12 1998 Jason Merrill - - * tree.def: Add NAMESPACE_DECL. - * dwarfout.c (type_ok_for_scope): Ignore NAMESPACE_DECLs for now. - * dwarf2out.c (push_decl_scope): Likewise. - (scope_die_for): Likewise. - * tree.c (decl_function_context): Use TREE_CODE_CLASS to determine - how to get next context level. - -Tue May 5 01:43:16 1998 Jim Wilson - - * i386.c (output_fix_trunc): Add code to emulate non-popping DImode - case. - -Tue May 5 01:15:06 1998 Jeffrey A Law (law@cygnus.com) - - * h8300.h (ADDITIONAL_REGISTER_NAMES): Add "er" registers. - - * reorg.c (fill_slots_from_thread): Update REG_DEAD/REG_UNUSED notes - for any insns skipped at the start of a block because they were - redundant. - -Mon May 4 20:23:51 1998 Jim Wilson - - * alpha.h (DBX_CONTIN_LENGTH): Decrease to 3000. - -1998-05-04 Ulrich Drepper - - * c-common.c (format_char_info): Add new field hhlen. - (print_char_table, scan_char_table, time_char_table): Initialize - hhlen field appropriately. - (char_format_info): Recognize hh modifier and lookup correct char - table entry. - -Mon May 4 19:15:29 1998 Jim Wilson - - * expr.c (expand_expr, case INDIRECT_REF): Don't optimize string - reference if this is a store. - -Mon May 4 17:25:17 1998 Richard Henderson - - * sparc.c (output_move_quad): Fix typo in mov_by_64 argument. - -Sun May 3 23:57:25 1998 Robert Lipe - - Make UnixWare 7 bootstrap support work with final shipping product. - * configure.in (i[34567]86-*-sysv5): Append, not overwrite, xm_file. - Pick up xm-siglist and xm-alloca. - (xm_defines): Add USG so dbxout will build. - * configure: Regenerate. - -Sun May 3 13:51:34 1998 Richard Henderson - - Support for official SPARC V9 ABI: - * sparc.c (sparc_override_options): Force stack bias off for !arch64. - Care for flag_pcc_struct_return default. - (output_move_quad): Rewrite to move by halves on v9 and in the - proper direction. - (move_quad_direction): New function. - (output_fp_move_quad): Use it to determine the direction of copy. - (function_arg_slotno): Return -1 for FP reg overflow as well. - (function_arg_record_value*): New functions. - (function_arg): Use them. Streamline unprototyped parameter passing. - (function_arg_pass_by_reference): Pass TCmode by reference. - (function_value): New function. - * sparc.h (PTRDIFF_TYPE, SIZE_TYPE): For -pedantic's sake, don't use - long long in 64-bit mode. - (RETURN_IN_MEMORY): v9 returns structs < 32-bytes in regs. - (DEFAULT_PCC_STRUCT_RETURN): Make the default detectable. - (BASE_RETURN_VALUE_REG): Consider complex float types for arch64. - (BASE_OUTGOING_VALUE_REG, BASE_PASSING_ARG_REG): Likewise. - (BASE_INCOMING_ARG_REG): Likewise. - (FUNCTION_VALUE): Call function_value. - (FUNCTION_OUTGOING_VALUE, LIBCALL_VALUE): Likewise. - * sparc.md (movdi_sp32_v9): Disable for arch64. - (movsf, movdf, movtf): Sort all alternatives using fp regs first. - (call_value_address_sp64): Remove register class constraints. - (call_value_symbolic_sp64): Likewise. - (nonlocal_goto): Pass label reg directly to goto_handlers. Constrain - v9 case to 32-bit constants. - (goto_handler_and_restore_v9): Provide a version for arch64. - * sparc/linux64.h (SIZE_TYPE, PTRDIFF_TYPE): Remove private definition. - * sparc/sp64-aout.h (TARGET_DEFAULT): Turn on stack bias. - (CPP_PREDEFINES): New. - * sparc/sp64-elf.h: Likewise. - (PREFERRED_DEBUGGING_TYPE): Dwarf2. - (ASM_OUTPUT_DWARF2_ADDR_CONST): New. - * sparc/sysv4.h (SIZE_TYPE, PTRDIFF_TYPE): Undo svr4.h's changes. - -Sat May 2 17:47:17 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat May 2 01:37:29 1998 J"orn Rennecke - - * reload.c (find_reloads): Emit USEs to mark where a pseudo - is reloaded with the MEM of its stack slot. - * reload1.c (cannot_omit_stores): Delete. - (reload): Don't initialize it. - Don't apply avoid_return_reg logic to USEs. - When done, remove USEs that have a REG_EQUAL note on them. - (emit_reload_insns): Handle case where we have inherited a MEM. - (choose_reload_regs): Likewise. - (delete_output_reload): Don't use cannot_omit_stores. - -Thu Apr 30 18:59:03 1998 Jim Wilson - - * Makefile.in (cpp.info, gcc.info): Put -o option before input file. - -Thu Apr 30 16:57:34 1998 Michael Meissner - - * haifa-sched.c (print_{exp,value}): Various changes to make the - debug output easier to read. Also, use only one buffer, and make - sure the buffer we are passed in doesn't overflow. - (safe_concat): Concatenate to a buffer without overflow. - -Thu Apr 30 16:57:34 1998 Kaveh R. Ghazi - - * haifa-sched.c (alloc_{INSN,EXPR}_LIST): Make static to agree - with the prototype. - -Wed Apr 29 21:45:16 1998 J"orn Rennecke - - * sched.c (new_insn_dead_notes): Check if the register was - used in the original instruction. - * haifa-sched.c (new_insn_dead_notes): Likewise. - -Wed Apr 29 13:46:03 1998 Jim Wilson - - * dwarf2out.c (scope_die_for): If could not find proper scope, - check for and handle tagged type with incorrect TYPE_CONTEXT. - -Wed Apr 29 15:34:40 1998 John Carr - - * calls.c (expand_call): Fix recognition of C++ operator new. - - * alias.c (mode_alias_check): Disable type based alias detection. - -Wed Apr 29 15:06:42 1998 Gavin Koch - - * config/mips/elf.h (ASM_OUTPUT_DEF,ASM_WEAKEN_LABEL, - ASM_OUTPUT_WEAK_ALIAS): Define. - * config/mips/elf64.h: Same. - * config/mips/r3900.h (ASM_OUTPUT_DEF,SUPPORTS_WEAK, - ASM_WEAKEN_LABEL): Removed. - -Wed Apr 29 10:53:29 1998 Andreas Schwab - - * calls.c (expand_call): Bump the length limit on the specially - recognized function names to 17. - -Tue Apr 28 17:53:33 1998 Jim Wilson - - * ginclude/stddef.h: Add check for _MACHINE_ANSI_H_ for BSD/OS - when undefining macros at the end. - - * expr.c (expand_builtin, case BUILT_IN_MEMSET): Break if either - val or len has TREE_SIDE_EFFECTS set. - - * sparc.md (mulsidi3): Call const v8plus and v8plus routines. - (mulsidi3_v8plus, const_mulsidi3_v8plus): Delete asterisk from name. - (smuldi3_highpart): Call const v8plus routine. - (smulsi3_highpart_v8plus): Renamed from smulsidi3_highpart_v8plus. - (const_smulsi3_highpart_v8plus): New pattern. - (smulsi3_highpart_sp32): Renamed from smulsidi3_highpart_sp32. - (umulsidi3): Call const v8plus routine. - (umulsi3_highpart): Handle const before v8plus. Call const v8plus - routine. - (umulsi3_highpart_v8plus): Renamed from umulsidi3_highpart_v8plus. - (umulsi3_highpart_sp32): Renamed from umulsidi3_highpart_sp32. - -Tue Apr 28 08:55:26 1998 Michael Meissner - - * m32r.c (*_oper{and|ator}): Change enum arguments and return - values to int, so they can be prototyped even in files that don't - include rtl.h. - ({small,large}_insn_p): Likewise. - (m32r_select_cc_mode): Likewise. - (gen_compare): Likewise. - (function_arg_partial_nregs): Likewise. - (m32r_setup_incoming_varargs): Likewise. - (init_reg_tables): Add prototype. - (m32r_frame_info): Add prolog_size field. - (m32r_compute_frame_size): Calculate the size of the prologue. - (m32r_first_insn_address): Return prologue size. - (m32r_output_function_prologue): Calculate frame size before - printing out information. Print out the prologue size. - - * m32r.h: Prototype all functions in m32r.c. - (FIRST_INSN_ADDRESS): Declare, returning prologue size. - - * m32r.md (bcc functions): Cast enum's to int. - - * m32r.c (conditional_move_operand): Silence a debug message. - ({small,long}_insn): New predicates. - - * m32r.h (TARGET_M32R): New macro. - (PREDICATE_CODES): Rearrange somewhat, add small_insn/long_insn. - (HAIFA_P): Define as 1/0 depending on whether the Haifa scheduler - was selected. - (ISSUE_RATE): Define as 2. - - * m32r.md (insn_size): New attribute. - ({,rev_}branch_insn): Add .s qualifier to branches believed to be - short. - (m32r): New attribute. - - * configure.in (enable_haifa): Switch m32r to Haifa by default. - * configure: Regenerate. - - (Changes from Nick Clifton ) - * m32r.h (EXTRA_CONSTRAINT): Implement 'S' constraint to perfoirm - the equivalent of a negated 'I' constraint. - (PRESERVE_DEATH_INFO_REGNO_P): Define in order to allow peephole - optimization to work. - - * m32r.md (cmp_ne_small_const_insn): Use 'S' constraint rather - than 'I' since the value is negated. - (peephole): Add peephole optimization to cope with optimization of - divide and subtracts of the same operands. - - * m32r.c zero_and_one, emit_cond_move): Add support for MVFC. - * m32r.h: Likewise. - * m32r.md: Likewise. - - * m32r.h (PREDICATE_CODES): Add declaration of machine specific - predicates. - -Tue Apr 28 07:25:53 1998 Manfred Hollstein - - * Makefile.in (libgcc2.ready): Revert last patch (Apr 24). - -Mon Apr 27 18:39:47 1998 Nick Clifton - - * config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Check against - frame_pointer_rtx not FRAME_POINTER_REGNUM. - -Mon Apr 27 18:36:28 1998 Jim Wilson - - * reg-stack.c: Revert last patch (Apr 20). - (convert_regs): Set insn to PREV_INSN (next) after do while loop. - - * m68k/lb1sf68.asm (Laddsf$3): Fix typos in mcf5200 exg code. - - * loop.c (check_dbra_loop): New locals jump, first_compare, and - compare_and_branch. Call get_condition to set first_compare. - Set compare_and_branch to number of compare/branch instructions. - Replace PREV_INSN (PREV_INSN (loop_end)) with first_compare. - Replace '2' with compare_and_branch. - -Mon Apr 27 15:53:30 1998 Andrew MacLeod - - * cplus-dem.c (demangle_qualified): Replace missing else. - -Mon Apr 27 20:22:08 1998 J"orn Rennecke - - * sh.c (gen_ashift_hi): Don't make SUBREG of a SUBREG. - -Mon Apr 27 18:23:51 1998 J"orn Rennecke - - * sh.c (sh_expand_prologue, sh_expand_epilogue): - If TARGET_DOUBLE_ALIGN, preserve 64 bit stack alignment. - * sh.h (STACK_BOUNDARY): Likewise. - -Mon Apr 27 17:22:48 1998 J"orn Rennecke - - * sh.h (LEGITIMIZE_RELOAD_ADDRESS): Define. - -Mon Apr 27 08:55:23 1998 Michael Meissner - - * system.h (abort): If abort is not defined, and neither is - USE_SYSTEM_ABORT, redefine abort to call fprintf and exit, - reporting the line and filename of the error. - - * .gdbinit: Add breakpoints on exit and fancy_abort. - - * final.c (split_double): Avoid a compiler warning if - BITS_PER_WORD is less than or equal to HOST_BIT_PER_WIDE_INT. - - * rtl.h (JUMP_{CROSS_JUMP,NOOP_MOVES,AFTER_REGSCAN}): New macros - for calling jump_optimize. - - * toplev.c (rest_of_compilation): Call jump_optimize using JUMP_* - macros, rather than 0/1's. - -Sun Apr 26 23:19:10 1998 Richard Henderson - - * alpha.h (CONST_COSTS): Zero is always free. - (RTX_COSTS): Add EV6 costs. Abort if alpha_cpu is unknown. - -Sun Apr 26 15:38:50 1998 Andreas Schwab - - * cplus-dem.c (gnu_special): Fix off-by-one bug when checking the - length in the name of a virtual table. - -Sun Apr 26 01:21:06 1998 Richard Henderson - - * alpha.c (print_operand): Don't add 'v' suffix for ALPHA_FPTM_N. - -Sat Apr 25 22:11:38 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Apr 25 17:17:15 1998 Jeffrey A Law (law@cygnus.com) - - * fold-const.c (fold_convert): Fix typo. - -Sat Apr 25 17:55:54 1998 John Carr - - * alias.c (alias_invariant): New variable. - (record_base_value): New argument INVARIANT. - (memrefs_conflict_p): If a register has an entry in the alias_invariant - array, try substituting that value for the register. - - * rtl.h: Declare record_base_value. - - * loop.c, unroll.c: Update callers of record_base_value. - - * alias.c (find_base_value, find_base_term): SIGN_EXTEND and - ZERO_EXTEND do not affect base values. - -Fri Apr 24 15:57:02 1998 Jeffrey A Law (law@cygnus.com) - - * dbxout.c (dbxout_type): Fix typo. - (dbxout_range_type): Another HOST_WIDE_INT_PRINT_DEC fix. - - * configure.in: Use CC_FOR_BUILD, not BUILD_CC. - -Fri Apr 24 16:11:47 1998 John Carr - - * expr.c (expand_builtin, case MEMSET): Set MEM_IN_STRUCT_P - if the argument is the address of a structure or array. - - * configure.in: Enable Haifa scheduler by default for SPARC. - -Fri Apr 24 20:55:47 1998 J"orn Rennecke - - * cse.c (cse_set_around_loop): Don't do optimization when - new pseudos are created. - -Fri Apr 24 11:00:18 1998 Jeffrey A Law (law@cygnus.com) - - * dbxout.c (dbxout_type_fields): Use HOST_WIDE_INT_PRINT_DEC - appropriately. - (dbxout_type_method_1, dbxout_type): Likewise. - (print_int_cst_octal, print_octal, dbxout_symbol): Likewise. - (dbxout_type): Fix check for when to print a type range in - octal vs decimal. - -Fri Apr 24 16:45:03 1998 J"orn Rennecke - - * (gen_shl_and, in case 1): Fix comparison with mask. - -Fri Apr 24 06:46:40 1998 Nick Clifton - - * config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Disallow frame - pointer as second register in REG+REG pair. - -Fri Apr 24 09:22:23 1998 Kaveh R. Ghazi - - * c-common.c (check_format_info): Don't check for the 'x' format - character twice, instead check for 'x' and 'X' - -Fri Apr 24 08:02:30 1998 Manfred Hollstein - - * Makefile.in (libgcc2.ready): Add explicit dependency from - $(STMP_FIXPROTO) to ensure all necessary include files have - been created and to guarantee proper parallel builds. - -Fri Apr 24 04:42:35 1998 J"orn Rennecke - - * sh.c (sh_expand_prologue, in !SH3E code): Don't push an extra - register for stdarg functions. - * sh.h (current_function_varargs): Declare. - (FUNCTION_ARG): Ignore NAMED for stdarg functions. - -1998-04-23 Jim Wilson - - * frame.c, libgcc2.c (stdlib.h, unistd.h): Don't include when - inhibit_libc is defined. - - * c-aux-info.c (gen_type): Use DECL_NAME only for TYPE_DECL. - -Thu Apr 23 19:09:33 1998 Jim Wilson - - * profile.c (tablejump_entry_p): New function. - (branch_prob): Add code to recognize MIPS tablejump entry branch. - Use tablejump_entry_p in MIPS and HPPA tablejump checking code. - -Thu Apr 23 15:01:13 1998 Nick Clifton - - * config/arm/arm.c (find_barrier): Return as soon as a barrier is - found, rather than at end of the loop, after the insn has been - changed. - -Thu Apr 23 20:21:06 1997 J"orn Rennecke - - * sh.c (gen_ashift_hi): Implement right shifts via gen_ashift. - * sh.md (ashrhi3_k, lshrhi3_k, lshrhi3_m, lshrhi3, lshrhi3+1): Delete. - -Wed Apr 22 17:07:35 1998 Michael Meissner - - * loop.c (note_addr_stored): Correct function to take 2 arguments, - instead of 1. - - * rtl.def (MATCH_INSN2): Add new matching pattern. - * genrecog.c (add_to_sequence): Support MATCH_INSN2. - -Wed Apr 22 15:52:22 1998 John Carr - - * emit-rtl.c (gen_highpart): The high part of a CONST_INT is not zero - if HOST_BITS_PER_WIDE_INT is larger than BITS_PER_WORD. - - * final.c (split_double): Sign extend both halves of a split CONST_INT. - -Wed Apr 22 10:42:45 1998 Jeffrey A Law (law@cygnus.com) - - * mips.c (compute_frame_size): Change only argument to a HOST_WIDE_INT. - -Wed Apr 22 10:53:49 1998 Andrew MacLeod - - * cplus-dem.c (struct work stuff): Add field for B and K mangle codes. - (cplus_demangle_opname): Call mop_up_squangle. - (cplus_demangle): Initialize squangle info, then call - internal_cplus_demangle. (Most code moved there as well) - (internal_cplus_demangle): New function, performs most of what use - to be done in cplus_demangle, but is only called with this file. - (squangle_mop_up): New function to clean up B and K code data. - (mop_up): Set pointers to NULL after freeing. - (demangle_signature, demangle_template, demangle_class): Add - switch elements to handle K and B codes. - (demangle_prefix, gnu_special, demangle_qualified): Add - code to handle K and B codes. - (do_type, demangle_fund_type): Handle B and K codes. - (remember_Ktype): New function to store K info. - (register_Btype, remember_Btype): New functions for B codes. - (forget_B_and_K_types): New function to destroy B and K info. - -1998-04-21 Jim Wilson - - * stmt.c (check_seenlabel): When search for line number note for - warning, handle case where there is no such note. - -Tue Apr 21 20:48:37 1998 John Carr - - * genemit.c (gen_exp): Allow machine description to set mode of - MATCH_OP_DUP. - -Tue Apr 21 16:36:01 1998 John Carr - - * alias.c (mode_alias_check): New function. - (true_dependence, anti_dependence, output_dependence): Call - mode_alias_check. - -Tue Apr 21 12:05:32 1998 Jeffrey A Law (law@cygnus.com) - - * mips.h (STACK_BOUNDARY): Allow specific targets to override. - (MIPS_STACK_ALIGN): Similarly. - - * c-common.c (type_for_mode): Handle TI types. - * c-decl.c (intTI_type_node, unsigned_int_TI_type_node): Define. - (init_decl_processing): Handle TI types. - * c-tree.h (intTI_type_node, unsigned_int_TI_type_node): Declare. - - * mips.c (block_move_loop): Test Pmode == DImode instead of - TARGET_MIPS64. - (expand_block_move, save_restore_insns): Likewise. - (function_prologue, mips_expand_prologue): Likewise. - (mips_expand_epilogue): Likewise. - * mips.h (POINTER_SIZE): Allow specific targets to override. - (Pmode): Allow specific targets to override. - (FUNCTION_PROFILER): Test Pmode == DImode instead of TARGET_MIPS64. - (POINTER_BOUNDARY, FUNCTION_MODE): Likewise. - (TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE): Likewise. - (TRAMPOLINE_ALIGNMENT, INITIALIZE_TRAMPOLINE): Likewise. - (CASE_VECTOR_MODE, ASM_OUTPUT_ADDR_VEC_ELT): Likewise. - (ASM_OUTPUT_ADDR_DIFF_ELT, SIZE_TYPE, PTRDIFF_TYPE): Likewise. - * mips.md (indirect, tablejump & casesi support): Test for - Pmode == DImode instead of TARGET_MIPS64. - (call patterns): Likewise. - -Tue Apr 21 09:43:55 1998 Kaveh R. Ghazi - - * objc/sendmsg.c: Define gen_rtx_MEM() to 1, as is already done - for gen_rtx(MEM, ...). - -Tue Apr 21 02:15:36 1998 Richard Henderson - - * sparc.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Rewrite - to not be so gross, and to properly function with PIC. - -Mon Apr 20 20:44:25 1998 Jim Wilson - - * frame.c (heapsort): Rename to frame_heapsort. - - * gcc.c (do_spec_1, case '['): Move flag out of loop and initialize it. - -Mon Apr 20 12:43:09 1998 Doug Evans - - * flow.c (sbitmap_vector_alloc): Ensure sbitmaps properly aligned. - -Mon Apr 20 15:04:14 1998 John Wehle (john@feith.com) - - * i386.md (movsf_push, movdf_push, movxf_push): Allow memory - operands during and after reload. - -Mon Apr 20 22:37:50 1998 J"orn Rennecke - - * final.c (shorten_branches, init_insn_lengths): Move code - to free label_align, uid_shuid, insn_lengths, insn_addresses - and uid_align from the former function into the latter one; - Add code to clear these variables. - * sh.h (label_align): Remove declaration. - -Mon Apr 20 14:48:29 1998 Michael Meissner - - * gcc.c (lang_specific_driver): Declare prototype properly so - fatal can be passed to it without error. - - * configure.in (AC_CHECK_FUNCS): Check for strchr and strrchr. - * configure: Regenerate. - * config.in: Add #undef's for strchr and strrchr. - - * protoize.c (toplevel): If we have rindex, but not strrchr, map - rindex to strrchr. - (file_could_be_converted): Use strrchr, not rindex since rindex is - not defined on Linux systems when _POSIX_SOURCE is defined. - (file_normally_convertible): Likewise. - (process_aux_info_file): Likewise. - (main): Likewise. - - * rs6000.md (mov{sf,df} define_splits): When splitting a move of - a constant to an integer register, don't split the insns that do - the simple AND and OR operations, rather just split each word, and - let the normal movsi define split handle it further. - -Mon Apr 20 18:19:40 1998 J"orn Rennecke - - * sh.c (find_barrier): Fix bug in ADDR_DIFF_VEC handling. - (split_branches): Call init_insn_lengths. - -Mon Apr 20 07:37:49 1998 Michael Meissner - - * i386.c: Include expr.h to get the change_address prototype - declared. - -Mon Apr 20 01:00:05 1998 H.J. Lu (hjl@gnu.org) - - * reg-stack.c (subst_asm_stack_regs): Change to return the last - new insn generated by this function. - (subst_stack_regs): Likewise. - (convert_regs): Record the last newly generated insn and use - it for change_stack () instead of INSN. - -Sun Apr 19 15:41:24 1998 Manfred Hollstein - - * fix-header.c (enum special_file): Undefine enumerators if they - are already defined by include files. - * fixproto (rel_source_file in unistd.h stdlib.h): Prefix file protection - macro with '__' to not pollute user namespace. - -Sun Apr 19 02:42:06 1998 Richard Henderson - - * haifa-sched.c (queue_to_ready): Fix typo in prototype. - -Sat Apr 18 23:52:35 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Apr 18 18:30:22 1998 Jim Wilson - - * i386.md (fix_truncsfdi2+[123]): Add + to operand 1 constraints. - - * i386.h (CPP_CPU_DEFAULT): Renamed to CPP_CPU_DEFAULT_SPEC. - Add missing -Dpentium* options. - (CPP_CPU_SPEC): Delete redundant definition. Include cpp_cpu_default - instead of CPP_CPU_DEFAULT. - (EXTRA_SPECS): Add entry for cpp_cpu_default. - -Sat Apr 18 19:06:59 1998 David Edelsohn - - * rs6000.md (floatsidf2_loadaddr): rs6000_fpmem_offset will be - negative in a stackless frame. - * rs6000.c (rs6000_stack_info): Don't include fixed-size link area - in stackless frame size. Support 64-bit stackless frame size. - Combine fpmem offset calculations and don't add total_size to - offset if not pushing a stack frame. - -Sat Apr 18 15:41:16 1998 Jim Wilson - - * regmove.c (fixup_match_1): In three places, in flag_exceptions - check, change p to q. - -Sat Apr 18 15:30:49 1998 Jim Wilson - - * gcc.c (lang_specific_driver): Add new parm type to prototype. - (added_libraries): New file scope static variable. - (process_command): Initialize added_libraries. Pass it to - lang_specific_driver. - (main): Use added_libraries in check for no input files. - -Sat Apr 18 01:23:11 1998 John Carr - - * sparc.c, sparc.h, sparc.md, sol2.h: Many changes related to V9 - code generation. Use 64 bit instructions in 32 bit mode when - possible. Use V9 return instruction. UltraSPARC optimizations. - - * sparc.h: Change gen_rtx (CODE to gen_rtx_CODE (. - -Fri Apr 17 22:38:17 1998 Jeffrey A Law (law@cygnus.com) - - * global.c (global_alloc): Don't pass HARD_CONST (0) to find_reg, - just pass zero. That will work regardless of the size of HARD_REG_SET. - - * libgcc2.c (__floatdisf): Fix a couple typos. - -Fri Apr 17 17:28:26 1998 Jim Wilson - - * Makefile.in (mostlyclean): Delete *.mach and *.bp files. - -Fri Apr 17 16:35:35 1998 Greg McGary - - * emit-rtl.c (gen_highpart): Initialize `word' properly for pseudo. - -Fri Apr 17 14:30:37 1998 John Carr - - * emit-rtl.c (operand_subword_force): If a register can not be - accessed by words, copy it to a pseudo register. - -Fri Apr 17 14:30:37 1998 Jim Wilson - - * rs6000/vxppc.h (CPP_SPEC): Add support for mrelocatable*. - -Fri Apr 17 17:01:25 1998 Michael Meissner - - * tree.h (mark_seen_cases): Delete declaration. - -Fri Apr 17 13:32:20 1998 Jeffrey A Law (law@cygnus.com) - - * stmt.c (mark_seen_cases): Make static and add prototype. - -Fri Apr 17 11:21:43 1998 Kaveh R. Ghazi - - * frame.c: Include stdlib.h and unistd.h to possibly get various - function prototypes. The fixproto script guarantees these header - files exist on the target system. - * libgcc2.c: Likewise. - - * gthr-single.h (__gthread_mutex_lock, __gthread_mutex_trylock, - __gthread_mutex_unlock): Add __attribute__ ((__unused__)) to the - function parameters. - * libgcc2.c (__udiv_w_sdiv): Likewise. - -Thu Apr 16 22:41:02 1998 Jeffrey A Law (law@cygnus.com) - - * varasm.c (asm_output_bss): Add prototype. - (asm_output_aligned_bss): Likewise. - - * unroll.c (verify_addresses): Add prototype. - - * toplev.c: Add many prototypes. Too many to mention here. - - * stmt.c (check_seenlabel): Add prototype. - - * rtlanal.c (reg_set_p_1): Add prototype. - (reg_set_last_1): Likewise. - - * reorg.c (find_dead_or_set_registers): Add prototype. - - * regmove (try_auto_increment): Add prototype. - - * reg-stack.c (pop_stack): Add prototype. - - * recog.c (validate_replace_rtx_1): Add prototype. - (find_constant_term_loc): Likewise. - - * loop.c (regs_patch_p): Add prototype. - (add_label_notes, count_nonfixed_reads): Likewise. - (find_single_use_in_loop): Likewise. - (express_from): Surround prototype with #ifdef. - (giv_sort): Similarly. - - * jump.c (mark_modified_reg): Add prototype. - - * haifa-sched.c (is_prisky): Add prototype. - (queue_to_ready): Likewise. - - * genextract.c (gen_insn): Add prototype. - - * genemit.c (max_operand_1): Add prototype. - (max_operand_vec, print_code, gen_exp, gen_insn): Likewise. - (gen_expand, gen_explit, output_add_clobbers): Likewise. - (output_init_mov_optab): Likewise. - - * genattrtab.c (attr_hash_add_rtx): Add prototype. - (attr_hash_add_string, write_length_unit_log): Likewise. - - * genattr.c (init_range): Add prototype. - - * combine.c (sets_function_arg_p): Add prototype. - - * expr.c (store_constructor_field): Add prototype. - (get_memory_usage_from_modifier): Likewise. - - * expmed.c (synth_mult): Add prototype. - (choose_multiplier, invert_mod2n): Likewise. - - * except.c (push_eh_entry): Add prototype. - (pop_eh_entry, enqueue_eh_entry, dequeu_eh_entry): Likewise. - (call_get_eh_context, start_dynamic_cleanup): Likewise. - (start_dynamic_handler, can_throw): Likewise. - (output_exception_table_entry, scan_region): Likewise. - (eh_regs, set_insn_eh_region): Likewise. - - * dwarfout.c (decl_class_context): Add prototype. - (output_inheritance_die, type_ok_for_scope): Likewise. - - * c-lex.c (skip_white_space_on_line): Add prototype. - - * alias.c (record_set): Add prototype. - (find_base_term, base_alias_check): Likewise. - - * function.c (assign_outer_stack_local): Make static and add prototype. - - * haifa-sched.c (build_control_flow): Accept raw data as inputs - instead of computing it locally. Callers changed. - (find_rgns): Several new arguments. Callers changed. - Generally clean up and comment better. Use dominators to - identify reducible loops. Convert some flag arrays to bitmaps. - Convert most of the code to work on pred/succ lists instead of - an edge table. Add comments for future improvements. - (schedule_insns): Allocate temporary tables for flow data, call - routines to compute flow data and pass it along to children as - arguments. - (debug_control_flow): Delete. Use dump_bb_data instead. - - * basic-block.h (compute_dominators): Declare. - - * flow.c (dump_sbitmap, dump_sbitmap_vector): New debugging - functions. - * basic-block.h: Declare them. - -Thu Apr 16 13:45:51 1998 Jim Wilson - - * reg-stack.c (constrain_asm_operands): Set n_alternatives to zero if - no operands. - -Wed Apr 15 11:33:09 1998 Alexandre Petit-Bianco - - * tree.c (build_expr_wfl): Use NULL_TREE if the file name is NULL. - Propagate TREE_SIDE_EFFECTS and TREE_TYPE iff the encapsulated - node is non NULL. Cache last file name and file name identifier node. - -1998-04-15 Mark Mitchell - - * c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get - the length of an array, not TREE_TYPE. - -Wed Apr 15 15:31:34 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (sbitmap_union_of_successors): New function. - * basic-block.h (sbitmap_union_of_successors): Declare it. - -Wed Apr 15 12:38:03 1998 Jim Wilson - - * configure.in (gnu_ld): Rename to gnu_ld_flag before main loop. - Set gnu_ld to gnu_ld_flag inside main loop. - (gas): Likewise. - -Wed Apr 15 14:50:05 1998 Dave Brolley - - * toplev.c (compile_file): Call init_parse using new interface. - (init_lex): Remove declaration. - - * c-lex.c (init_parse): Now returns char* containing filename. - -Wed Apr 15 12:37:10 1998 Jeffrey A Law (law@cygnus.com) - - * pa.h (LEGITIMIZE_RELOAD_ADDRESS): Do nothing if not optimizing. - -Wed Apr 15 12:10:18 1998 Michael Meissner - - * Makefile.in (gen{config,flags,codes,emit}): Link in host print-rtl.o. - (gen{extract,peep,opinit,output}): Likewise. - - * gen{attr,codes,config,emit,output}.c (insn_attr_name): Provide a - global definition so print-rtl.o can be linked in. - * gen{peep,recog}.c (insn_attr_name): Likewise. - -Tue Apr 14 07:30:57 1998 K. Richard Pixley - - * fixincludes: Discard empty C++ comments, as found in sys/time.h - on hpux-11.0. - -Wed Apr 15 10:47:21 1998 Andreas Schwab - - * config/m68k/m68k.md (adddi3, subdi3): Optimize for constant - operand. - -Wed Apr 15 01:21:21 1998 Jeffrey A Law (law@cygnus.com) - - * emit-rtl.c (operand_subword): Rework slightly to avoid - bogus warning from previous change. - -Tue Apr 14 23:39:13 1998 Richard Henderson - - * alpha.md: Revert Oct 27 change, as it is superseded by Kenner's - Nov 8 find_replacement change. Move decls of get_unaligned_address - * alpha.h: ... here. - -Tue Apr 14 22:00:39 1998 John Carr - - * function.c (assign_parms): Initialize unsignedp before passing - its pointer to promote_mode. - - * genattrtab.c (check_attr_test): Handle MATCH_INSN like MATCH_OPERAND. - (write_test_expr): Allow MATCH_INSN. - -Tue Apr 14 21:57:57 1998 Paul Eggert - - * install.texi: Update section on warnings that can be safely ignored. - -Tue Apr 14 14:55:16 1998 Jim Wilson - - * mips.md (reload_outdi): Change the scratch mode from DImode to - TImode. New variable scratch, used instead of operand[2] in template. - Add code for MIPS16 HILO_REGNUM case where output reg is not M16_REG_P. - -Tue Apr 14 16:19:03 1998 Michael Meissner - - * expr.c (MOVE_RATIO): Set to 3 if optimizing for space. - -Tue Apr 14 11:31:28 1998 Krister Walfridsson - - * i386/bsd386.h (ASM_OUTPUT_ALIGN): Redefine. - -Tue Apr 14 09:02:32 1998 Jeffrey A Law (law@cygnus.com) - - * svr4.h (ASM_DECLARE_OBJECT_NAME): Use HOST_WIDE_INT_PRINT_DEC. - (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * Idea and part of the patch from HJ. - * Makefile.in: auto-host.h renamed from auto-config.h. All references - changed. - (distclean): Remove auto-build.h too. - * configure.in: Rename host autoconf generated file to auto-host.h. - If host != build, then run autoconf to generate auto-build.h for - the build machine and include it in build_xm_files. - Check for wait.h and sys/wait.h. - - * combine.c (simplify_rtx, case TRUNCATE): Respect value of - TRULY_NOOP_TRUNCATION. - -Mon Apr 13 11:31:49 1998 Jason Merrill - - * tree.h (BINFO_OFFSET_ZEROP): Use integer_zerop. - -Sun Apr 12 20:55:32 1998 Catherine Moore - - * invoke.texi (ld options): Include memset requirements - for options -nodstdlib and -nodefaultlibs. - -1998-04-12 Paul Eggert - - This change is from an idea suggested by Arthur David Olson. - - * c-common.c (decl_attributes, record_function_format, - check_format_info, init_function_format_info): - Add support for strftime format checking. - (enum format_type): New type. - (record_function_format): Now static, and takes value of type - enum format_type instead of int. - (time_char_table): New constant. - (struct function_format_info): format_type member renamed from is_scan. - (check_format_info): Use `warning' rather than sprintf followed by - `warning', to avoid mishandling `%' in warnings. - Change `pedwarn' to `warning', since these warnings do not necessarily - mean the program does not conform to the C Standard, as the code - need not be executed. - - * c-tree.h (record_function_format): Remove decl; no longer extern. - - * extend.texi: Add documentation for strftime format checking. - -Sun Apr 12 20:23:03 1998 Jeffrey A Law (law@cygnus.com) - - * mips/ecoffl.h: Do not include mips.h. - * mips/elf.h: Likewise. - - * configure.in (mips-*-ecoff): Do not mention mips/mips.h in tm_files. - * mips/ecoff.h: Include "mips/mips.h". - -Sat Apr 11 22:42:54 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Apr 11 01:24:28 1998 Jeffrey A Law (law@cygnus.com) - - * cse.c (count_reg_usage): Correctly handle REG_NONNEG notes. - (delete_trivially_dead_insns): Renamed from delete_dead_from_cse. - * toplev.c (rest_of_compilation): Call delete_trivially_dead_insns instead of delete_dead_from_cse. Also call delete_trivially_dead_insns - between loop optimization passes. - * rtl.h: Updated appropriately. - -Fri Apr 10 22:28:32 1998 Jeffrey A Law (law@cygnus.com) - - Reinstall this patch from Jason. - * function.c (push_function_context_to): Don't call init_emit. - -Fri Apr 10 13:40:20 1998 Nick Clifton - - * rtl.c (read_skip_spaces): Prevent infinite loops upon - encountering unterminated comments. - -Fri Apr 10 10:43:41 1998 Jeffrey A Law (law@cygnus.com) - - * emit-rtl.c (operand_subword): Properly handle CONST_INTs for - 64x32 cross builds. - - * configure.in: Handle --with-fast-fixincludes. - (fixincludes): If --with-fast-fixincludes, then use a different - fixincludes program by default. - * Makefile.in (fixinc.sh): New rule. - -Fri Apr 10 00:36:31 1998 H.J. Lu (hjl@gnu.org) - - * i386.md (movqi+1): Handle invalid QI register. - (movsf_push-1): Likewise. - -Thu Apr 9 16:53:59 1998 Nick Clifton - - * config/m32r/m32r.c: call_address_operand(): Only accept symbolic - addresses. - symbolic_memort_operand(), call32_operand(), int8_operand(), - int16_operand(), uint24_operand(), reg_or_int8_operand(): Removed. - Not used. - uint16_operand(): Made static. - -Thu Apr 9 01:43:04 1998 Jeffrey A Law (law@cygnus.com) - - * calls.c (expand_call): Fix typo. - -Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com) - - * c-lex.c (finput): New global. - (init_parse): Always included. Handle !USE_CPPLIB using - code originally in compile_file. - (finish_parse): Update for CPPLIB. - * toplev.c (init_parse, finish_parse): Declare. - (finput): Delete variable. Now in front-ends. - (compile_file): Remove code which is now handled by init_parse - which is unconditionally called. Similarly for finish_parse. - -Wed Apr 8 23:13:50 1998 Gavin Koch - - * config/mips/r3900.h (ASM_OUTPUT_DEF,SUPPORTS_WEAK, - ASM_WEAKEN_LABEL): Add. - -Wed Apr 8 18:21:30 1998 Richard Henderson - - * alpha/crtbegin.asm, alpha/crtend.asm, alpha/t-crtb: New files. - * configure.in (alpha-*-linux*): Use them. - -Fri Apr 3 17:02:13 1998 Alexandre Petit-Bianco - - * tree.def (EXPR_WITH_FILE_LOCATION): New tree node definition. - * tree.h (EXPR_WFL_{NODE,FILENAME,FILENAME_NODE,LINENO, - COLNO,LINECOL,SET_LINECOL,EMIT_LINE_NOTE}): New macros. - (build_expr_wfl): New prototype declaration. - * tree.c (build_expr_wfl): New function, to build - EXPR_WITH_FILE_LOCATION nodes. - (copy_node): Don't zero TREE_CHAIN if copying a - EXPR_WITH_FILE_LOCATION node. - * print-tree.c (print_node): Handle EXPR_WITH_FILE_LOCATION. - * expr.c (expand_expr): Handle EXPR_WITH_FILE_LOCATION. - -Wed Apr 8 12:51:19 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in (v850): Use t-v850. - (ix86-wrs-vxworks): Recognize 786 just like other x86 configurations. - - * protoize.c (creat, read, write): Do not declare. - - * jump.c (mark_jump_label): Record REG_LABEL notes for insns which - refer to the CODE_LABEL before a dispatch table. - - * invoke.texi: Add ARC options. - - * gcc.c (process_command): Improve error message for -o with - either -c or -S. - - * i386/x-cygwin32 (CLIB): Link in advapi32. - - * alpha.h (ASM_IDENTIFY_GCC): Define to nothing. - (ASM_IDENTIFY_LANGUAGE): Likewise. - - * i386.md (movqi recognizer): Don't perfom byte increment into - a NON_QI_REG_P. - - * configure.in (x86-dg-dgux): Run fixinc.dgux. - - * i370.h: Fix typo in GEN_INT changes. - - * bitmap.c (bitmap_element_allocate): Use "void" for arglist instead - of an empty arglist in prototype. - - * Makefile.in: Remove bytecode crud that crept back in after the - gcc2 merge. - -1998-04-08 Brendan Kehoe - - * c-lex.h (is_class_name): Fix arg type to be tree, not void. - (make_pointer_declarator, reinit_parse_for_function): Fix typo. - -Wed Apr 8 06:16:45 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (LEGITIMIZE_RELOAD_ADDRESS): Define. - -Wed Apr 8 00:44:18 1998 Bernd Schmidt (crux@pool.informatik.rwth-aachen.de> - - * c-lex.c (is_class_name): Delete declaration. - (whitespace_cr): Make static and add prototype. - * c-lex.h (make_pointer_declarator, reinit_parse_for_function, - yylex, get_directive_line): Turn declarations into prototypes. - (position_after_whitespace, check_newline, yyerror,, is_class_name, - forget_protocol_qualifiers, remember_protocol_qualifiers): Add - prototypes. - * genattr.c (extend_range, write_upcase, gen_attr, write_units): Add - prototypes. - * gencodes.c (gen_insn): Add prototype. - * genconfig.c (walk_insn, gen_insn, gen_expand, gen_split, - gen_peephole): Add prototypes. - * genflags.c (num_operands, gen_proto, gen_nonproto, gen_insn): Add - prototypes. - * gengenrtl.c (type_from_format, accessor_from_format, special_rtx, - special_format, find_formats, gendecl, genmacro, gendef, genlegend, - genheader, gencode): Add prototypes. - * genopinit.c (gen_insn): Add prototype. - * genoutput.c (output_prologue, output_epilogue, scan_operands, - process_template, validate_insn_alternatives, gen_insn, gen_peephole, - gen_expand, gen_split, n_occurrences): Add prototypes. - * genpeep.c (gen_peephole): Add prototype. - * loop.c (find_and_verify_loops, mark_loop_jump, prescan_loop, - reg_in_basic_block_p, consec_sets_invariant_p, libcall_other_reg, - labels_in_range_p, count_loop_regs_set, note_addr_stored, - loop_reg_used_before_p, scan_loop, replace_call_address, - skip_consec_insns, libcall_benefit, ignore_some_movables, - force_movables, combine_movables, rtx_equal_for_loop_p, move_movables, - strength_reduce, valid_initial_value_p, find_mem_givs, record_biv, - check_final_value, record_giv, update_giv_derive, basic_induction_var, - simplify_giv_expr, general_induction_var, consec_sets_giv, - check_dbra_loop, express_from, combine_givs_p, combine_givs, - product_cheap_p, maybe_eliminate_biv, maybe_eliminate_biv_1, - last_use_this_basic_block, record_initial, update_reg_last_use, - iteration_info, analyze_loop_iterations, insert_bct, - instrument_loop_bct, indirect_jump_in_function_p): Turn declarations - into prototypes. - -Tue Apr 7 21:48:52 1998 Jeffrey A Law (law@cygnus.com) - - * pa.h (LEGITIMIZE_RELOAD_ADDRESS): Define. - -1998-04-07 Ken Raeburn - - * config/mips/mips.c (siginfo): Deleted. - (override_options): Don't install SIGINFO signal handler. - -Tue Apr 7 11:58:04 1998 Jim Wilson - - * loop.c (check_dbra_loop): When normalize comparison_val, add check - to verify it is non-negative. - -Tue Apr 7 02:01:47 1998 Richard Henderson - - * alpha.c (alpha_expand_block_move): Correctly collect block offsets. - (alpha_expand_block_clear): Likewise. - -Mon Apr 6 23:36:01 1998 Richard Henderson - - * tree.h (sizetype_tab): Fix previous change for K&R. - -Mon Apr 6 22:23:29 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Apr 6 23:16:10 1998 Richard Earnshaw (rearnsha@arm.com) - - * configure.in (sparc-*-solaris2*): Add xm-siglist.h to xm_file. - Add USG and POSIX to xm_defines. - -Mon Apr 6 21:49:57 1998 Bob Manson - - * gcc.c: Add linker spec. - (link_command_spec): Use %(linker) instead of ld. - (main): If collect2 is requested as the linker, see if it exists; - if not, use ld instead. - - * Makefile.in (USE_COLLECT2): It's named collect2 now, not ld. - (ld): Deleted. - (install-collect2): Install as collect2, not ld. - - * configure.in(will_use_collect2): It's named collect2 now. - - * collect2: Remove checks to see if we were invoked recursively. - (collect_execute): Use _spawnvp under cygwin32. - -Mon Apr 6 17:23:41 1998 Jim Wilson - - * haifa-sched.c (build_control_flow): Set unreachable for block whose - only predecessor is itself. - -Mon Apr 6 16:08:04 1998 Kaveh R. Ghazi - - * c-parse.in: Include system.h, and remove stuff now made redundant. - * cccp.c: Likewise. - * cexp.y: Likewise. - * protoize.c: Likewise. Properly check for cpp stringification. - - * Makefile.in (c-parse.o, cccp.o, cexp.o, protoize.o, unprotoize.o): - Depend on system.h. - - * objc/Make-lang.in (objc-parse.o): Likewise. - -Mon Apr 6 14:59:58 1998 Kaveh R. Ghazi - - * gansidecl.h: Check if compiler supports __attribute__. Provide - definitions for ATTRIBUTE_UNUSED and ATTRIBUTE_PRINTF using - __attribute__ when its available. Also provide definitions for - ATTRIBUTE_PRINTF_1, ATTRIBUTE_PRINTF_2 and ATTRIBUTE_PRINTF_3 in - terms of ATTRIBUTE_PRINTF. - - * genoutput.c (process_template): Use ATTRIBUTE_UNUSED in place - of __attribute__. - -Mon Apr 6 07:17:52 1998 Catherine Moore - - * combine.c (can_combine_p): Include successor in volatile test. - -Mon Apr 6 14:16:33 1998 J"orn Rennecke - - * sh.h (CASE_VECTOR_SHORTEN_MODE): Fix logic when to set - offset_unsigned. - -Mon Apr 6 02:03:29 1998 Jeffrey A Law (law@cygnus.com) - - * objc/objc-act.c (encode_aggregate_within): Avoid GNU extensions - in prototype and definition. - -Mon Apr 6 00:48:56 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Apr 6 00:08:50 1998 Richard Henderson - - * alpha.c (alpha_expand_block_clear): Add missing offset arg to - alpha_expand_unaligned_store_words. - -Sun Apr 5 21:31:24 1998 John Wehle (john@feith.com) - - * i386.md (movsf_push, movsf_mem): Remove. - (movsf_push): Rename from movsf_push_nomove and move in front of - movsf. Use nonmemory_operand predicate and don't bother checking - TARGET_MOVE. - (movsf_push_memory): New pattern. - (movsf): Don't bother checking for push_operand. If TARGET_MOVE and - both operands refer to memory then force operand[1] into a register. - (movsf_normal): Change to unnamed pattern. - Likewise for movdf, movxf, and friends. - -Sun Apr 5 18:45:51 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Apr 5 16:31:10 1998 Richard Henderson - - * configure.in (alpha-dec-osf*): Match osf1.3 correctly. - -Sun Apr 5 16:53:37 1998 Don Bowman - - * configure.in (mips-wrs-vxworks): New target. - -Sat Apr 4 23:34:32 1998 Jeff Law (law@cygnus.com) - - * expmed.c (synth_mult): The value -1, has no zeros, so it can - never have the form ...011. - - * version.c: Bump for snapshot. - -Sat Apr 4 20:16:46 1998 Richard Henderson - - * i386.c (asm_output_function_prefix, load_pic_register): - Use ASM_GENERATE_INTERNAL_LABEL properly. - (output_pic_addr_const): Recognize %X to suppress any PIC sym suffix. - (print_operand): Ignore it. - (load_pic_register): Use it for the got load call. - * i386.md (prologue_set_got, prologue_get_pc): Likewise. - (prologue_get_pc_and_set_got): Likewise. - * i386.h: Update print_operand docs. - -Sat Apr 4 19:08:37 1998 Richard Henderson - - * i386.md (ffssi, ffshi): Rewrite as define_expands. - (ffssi_1, ffshi_1): New (unspec [] 5) support patterns. - * i386.c (notice_update_cc): Recognize unspec 5. - -Sat Apr 4 18:07:16 1998 David Mosberger-Tang (davidm@mostang.com) - - * alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Accept '(' for s/sv/svi. - * alpha.c (print_operand): Handle it. - * alpha.md (fix_truncsfdi2): Use it. Add earlyclobber pattern - for ALPHA_TP_INSN. - (fix_truncdfdi2): Likewise. - -Sat Apr 4 17:42:05 1998 Richard Henderson - - * tree.h (sizetype_tab[2], sbitsizetype, ubitsizetype): Merge all - of these into a single struct, with additional [us]sizetype entries. - * stor-layout.c (set_sizetype): Initialize [us]sizetype. - * fold-const.c (size_int_wide): Don't rely on sizetype_tab being - an array. - -Sat Apr 4 17:04:41 1998 Richard Henderson - - * configure.in (alpha-*-linux-*): Undo tm_file changes from gcc2 merge. - -Sat Apr 4 13:50:01 1998 Richard Henderson - - * haifa-sched.c (split_block_insns): Don't suppress insn splitting - on subsequent passes. - - * alpha.c (hard_fp_register_operand): New function. - * alpha.h (PREDICATE_CODES): Add it. - * alpha.md (extendsidi2): Kill bogus f<-f cvtql+cvtlq case. Add an - f<-m case and accompanying define_split. - (trapb): Use a unique unspec_volatile number. - -Sat Apr 4 13:32:08 1998 Richard Henderson - - * configure.in (alpha-*-linux-gnu*): Undo Feb 3 change brought in - from gcc2 merge. - -Sat Apr 4 10:23:41 1998 Jeffrey A Law (law@cygnus.com) - - * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12 - for details. - - * haifa-sched.c: Mirror recent changes from gcc2. - -Fri Apr 3 00:17:01 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (insn*.o): Depend on system.h. - - * pa.c (output_global_address): Initialize base. - * pa.h (GO_IF_LEGITIMATE_ADDRESS): Initialize index. - -1998-04-03 Mike Stump - - * gthr.h: Support systems that don't have weak, but have threads. - * configure.in (*wrs-vxworks*): Use VxWorks threads by default. - * gthr-vxworks.h: New file. - * objc/thr-vxworks.h: Dummy file from thr-single.c for now. - -Thu Apr 2 18:00:52 1998 Jim Wilson - - * i386.md (movqi+1): Change alternative 1 from *r/r to *r/*rn. - -1998-04-02 Vladimir N. Makarov - - * ginclude/va-i960.h (va_end): Change void * to void. - -Thu Apr 2 13:51:10 1998 Kaveh R. Ghazi - - * Makefile.in (choose-temp.o): Depend on system.h. - - * choose-temp.c: Include system.h when IN_GCC. - -Thu Apr 2 02:37:07 1998 Joern Rennecke (amylaar@cygnus.co.uk) - Richard Henderson - - * reload.c (find_reloads_address): Try LEGITIMIZE_RELOAD_ADDRESS. - (move_replacements): New function. - * reload.h: Prototype it. - - * alpha.h (LEGITIMIZE_RELOAD_ADDRESS): New definition. - -Thu Apr 2 01:01:34 1998 Richard Henderson - - * configure (alpha-*-linuxecoff, alpha-*-linux-gnulibc1): - Run fixincludes. - - * emit-rtl.c (gen_lowpart_common): Skip count by HARD_REGNO_NREGS. - (gen_highpart): Likewise. - * final.c (alter_subreg): Allow the target to hook by-mode subreg - hard register number changes. - -Wed Apr 1 22:26:22 1998 Jeffrey A Law (law@cygnus.com) - - * fold-const.c optimze_bit_field_compare): Initialize rnbitpos, - rnbitsize, rnmode and rinner. - (make_range): Initialize type. - (fold): Initialize arg0, arg1 and varop. - - * function.c (instantiate_virtual_regs_1): Initialize offset, regnoi - and regnor. - (expand_function_start): Initialize last_ptr. - - * stor-layout.c (layout_record): Initialize desired_align. - (get_best_mode): Initialize unit. - - * tree.c (copy_node): Initialize length. - - * c-lex.c (yylex): Initialize traditional_type, ansi_type and type. - - * caller-save.c (insert_save_restore): Initialize pat, code and - numregs. - - * emit-rtl.c (push_to_sequence): Initialize top. - (push_topmost_sequence): Likewise. - - * genattrtab.c (simplify_by_exploding): Initialize defval. - - * profile.c (branch_prob): Initialize dest. - - * rtl.h (note_stores): Remove duplicate prototype. - (GEN_INT): Reinstate cast of second arg to HOST_WIDE_INT. - - * cplus-dem.c (gnu_special): Don't get confused by . - strings that are not actually lengths. - - * genattrtab.c: Make generated file use system.h, instead of - including stdio.h, etc directly. - * genextract.c, genopinit.c, genoutput.c: Likewise. - * genpeep.c, genrecog.c: Likewise. - - * genoutput.c (process_template): Mark operands in the generated - function as potentially unused if compiling with GNU CC. - - * i386/freebsd-elf.h (CPP_PREDEFINES): Update from FreeBSD folks. - - * pa.md (reload peepholes): Remove unused variable "mode". - -Wed Apr 1 17:06:19 1998 Nick Clifton - - * config/arm/thumb.h: Add super interworking support. - * config/arm/thumb.c: Add super interworking support. - * config/arm/thumb.md: Add super interworking support. - * config/arm/lib1funcs.asm: Add interworking support. - * config/arm/lib1thumb.asm: Add super interworking support. - * config/arm/t-semi: Add interworking support. - * config/arm/t-thumb: Add interworking support. - * config/arm/README-interworking: New file. - -Wed Apr 1 14:38:10 1998 Jim Wilson - - * config/mips/iris6.h (MD_EXEC_PREFIX): Set to /usr/bin/. - (MD_STARTFILE_PREFIX): Unset. - -1998-04-01 Mark Mitchell - - * varasm.c (make_decl_rtl): Update the DECL_ASSEMBLER_NAME for a - entity in a local scope. - - * fold-const.c (fold): Call truthvalue_conversion for values which - are folded to boolean type. - -Wed Apr 1 06:09:53 1998 Jeffrey A Law (law@cygnus.com) - - * 1750a.md, arm.c, clipper.c, clipper.md: Use GEN_INT consistently. - * convex.h, dsp16xx.c, fx80.md, gmicro.c, gmicro.md: Likewise. - * i370.h, i370.md, i860.c, i860.h, i860.md, i960.c: Likewise. - * i960.h, i960.md, m32r.md, m68k.md, m68kv4.h, m88k.c: Likewise. - * m88k.md, ns32k.c, ns32k.md, pdp11.c, pdp11.h, pdp11.md: Likewise. - * pyr.c, pyr.h, pyr.md, romp.c, romp.h, romp.md: Likewise. - * rs6000.md, sparc.c, sparc.h, sparc.md, spur.c, spur.md: Likewise. - * tahoe.md, vax.h, vax.md, we32k.c, we32k.h, we32k.md: Likewise. - * md.texi: Likewise. - -Wed Apr 1 08:33:44 1998 Manfred Hollstein - - * fixincludes (limits.h): Fix nested comments in Motorola's - limits.h and sys/limits.h. - -Tue Mar 31 16:57:33 1998 Jim Wilson - - * alpha.c (alpha_expand_unaligned_load): Use tgt instead of addr - as dest of expand_binop call. - - * alpha.md (extzv): Correct check for valid operand[2] values. - - * profile.c (branch_prob): Add code to recognize HPPA tablejump entry - branch. - - * toplev.c (rest_of__compilation): Call init_recog_no_volatile at end. - -Mon Mar 30 13:11:05 1998 Stan Cox - - * libgcc2.c (__main, __do_global_dtors, __do_global_ctors): - For __CYGWIN32__ use the versions in winsup/dcrt0.cc. - - * gcc.c, cccp.c, cpplib.c, collect2.c (GET_ENVIRONMENT): Added. - cygwin32 can override this to allow both unix and win32 style PATHs. - - * i386/xm-cygwin32.h (GET_ENVIRONMENT): Defined to allow win32 - style environment paths. - -Mon Mar 30 14:43:20 1998 Kaveh R. Ghazi - - * Makefile.in (cppalloc.o, cpperror.o, cppexp.o, cpphash.o, - cpplib.o, cppmain.o, fix-header.o, gcov.o, gen-protos.o, - gengenrtl.o, halfpic.o, hash.o, scan-decls.o, scan.o): Depend on - system.h. - - * cpphash.c: Include config.h. - * cppalloc.c: Include system.h. Add parameters to various - function prototypes. - * cpperror.c: Likewise. - * cppexp.c: Likewise. - * cpphash.c: Likewise. - * cpplib.c: Likewise. - * cppmain.c: Likewise. - * fix-header.c: Likewise. - * gcov.c: Likewise. - * gen-protos.c: Likewise. - * gengenrtl.c: Likewise. - * halfpic.c: Likewise. - * hash.c: Likewise. - * scan-decls.c: Likewise. - * scan.c: Likewise. - -Mon Mar 30 11:06:45 1998 Jim Wilson - - * README.gnat: Add lang_print_xnode definition. - -Mon Mar 30 11:12:24 1998 Andreas Schwab - - * config/m68k/m68k.c (standard_68881_constant_p): Don't use - fmovecr on the 68060. - -Mon Mar 30 00:21:03 1998 Jeffrey A Law (law@cygnus.com) - - * genemit.c (DONE): Rework so that it works in the true arm if - an if-else conditional. - (FAIL): Likewise. - -Sun Mar 29 12:45:23 1998 Jeffrey A Law (law@cygnus.com) - - * rs6000.c: Do not include stdioh or ctype.h anymore. - - * Makefile.in (c-typeck.o): Delete on expr.h, insn-codes.h and - $(RTL_H). - (stor-layout.o): Likewise. - * c-typeck.c: Include rtl.h and expr.h. - * stor-layout.c: Likewise. - - * cpplib.c (cpp_file_line_for_message): Delete unused parameter. - All callers changed. - (do_sccs): Wrap in an SCCS_DIRECTIVE ifdef. - * fix-header.c (cpp_file_line_for_message): Delete unused parameter. - All callers changed. - - * collect2.c (is_in_list): Wrap inside COLLECT_EXPORT_LIST ifdef. - - * local-alloc.c (reg_classes_overlap_p): Delete dead function. - - * tree.h (lang_print_xnode): Provide prototype. - -Sat Mar 28 23:50:44 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Mar 29 00:42:21 1998 Jeffrey A Law (law@cygnus.com) - - * objc/sendmsg.c (__objc_block_forward): Add braces for return - value if INVISIBLE_STRUCT_RETURN. - - * pa.c (arith_double_operand): Fix parens. - - * haifa-sched.c (print_pattern): Correct arg to sprintf. - - * Makefile.in (libgcc1.null): Make return type for __foo void. - -Sat Mar 28 14:37:20 1998 Jeffrey A Law (law@cygnus.com) - - * pa.h: Add declarations for many functions defined in pa.c. - - * genpeep.c (main): Remove unused variable 'i' from the generated - file. - - * genemit.c (gen_expand): Do not emit "_done" or "_fail" labels. - (gen_split): Likewise. - (main): Rework generated definitions of DONE and FAIL so that they - no longer use gotos. Avoids warnings about unused labels. - - * integrate.c (copy_rtx_and_substitute): Rework to avoid need for - unused "junk" variable. - - * genattrtab.c (write_complex_function): Add a default case in - generated switch statement to keep -W -Wall quiet. - -Sat Mar 28 10:47:21 1998 Nick Clifton - - * invoke.texi: Document more ARM and Thumb command line options. - - * config/arm/xm-thumb.h: New file. - -Sat Mar 28 01:37:33 1998 Craig Burley - - * stmt.c (expand_expr_stmt): Must generate code for - statements within an expression (gcc's `({ ... )}') - even if -fsyntax-only. - -Sat Mar 28 01:06:12 1998 Bernd Schmidt - Jeffrey A Law (law@cygnus.com) - - * basic-block.h (basic_block_computed_jump_target): Declare. - * flags.h (current_function_has_computed_jump): Declare. - * flow.c (basic_block_computed_jump_target): Define. - (flow_analysis): Allocate it. Set current_function_has_computed_jump - to 0. - (find_basic_blocks): Set current_function_has_computed_jump and - elements of basic_block_computed_jump_target to 1 as appropriate. - * function.c (current_function_has_computed_jump): Define. - * global.c (global_conflicts): Don't allocate pseudos into stack regs - at the start of a block that is reachable by a computed jump. - * reg-stack.c (stack_reg_life_analysis): If must restart, do so - immediately. - (subst_stack_regs): Undo change from Sep 4 1997. - (uses_reg_or_mem): Now unused, deleted. - * stupid.c (stupid_life_analysis): Compute - current_function_has_computed_jump. - (stupid_find_reg): Don't allocate stack regs if the function has a - computed goto. - * haifa-sched.c (is_cfg_nonregular): Delete code to determine if - the current function has a computed jump. Use the global value - instead. - -Sat Mar 28 00:21:37 1998 Jeffrey A Law (law@cygnus.com) - - * i386/freebsd.h (CPP_PREDEFINES): Remove __386BSD__. - (DWARF2_UNWIND_INFO): Define to zero. - -Fri Mar 27 16:04:49 1998 Michael Meissner - - * gcc.c (set_std_prefix): Add declaration. - (process_command): If GCC_EXEC_PREFIX is set, remove /lib/gcc-lib/ - suffix, and update the standard prefix prefix.c uses. - - * prefix.c (std_prefix): New global to hold default prefix value. - (get_key_value): Change to use std_prefix instead of PREFIX. - (translate_name): Likewise. - (update_path): Likewise. - (get_key_value): Release allocated scratch storage. - (set_std_prefix): New function to reset the standard prefix. - -Fri Mar 27 18:08:21 1998 J"orn Rennecke - - * sh.c (find_barrier): Fix calculations for alignment increase. - -Fri Mar 27 08:56:52 1998 Manfred Hollstein - - * Makefile.in (stmp-fixinc): If we're actually fixing include - files, copy gcc's assert.h into the fixed include dir. - * fixincludes (assert.h): Avoid any attempts to fix a probably - broken system specific assert.h file. - * fixproto (stdlib.h): Make sure, it'll contain a definition of - size_t. - -Fri Mar 27 00:49:46 1998 Jeffrey A Law (law@cygnus.com) - - * regclass.c (reg_scan_mark_refs): Be more selective about - when we mark a register with REGNO_POINTER_FLAG. - -Thu Mar 26 23:00:11 1998 J"orn Rennecke - - reload inheritance improvement: - * reload1.c (reg_reloaded_contents, reg_reloaded_insn): - Change meaning: index is now hard reg number. - (reg_reloaded_valid, reg_reloaded_dead): New variables. - (reload_spill_index): Content is now a hard reg number. - (reload_as_needed): Change to fit new variable meaning. - (forget_old_reloads_1, allocate_reload_reg): Likewise. - (choose_reload_regs, emit_reload_insns): Likewise. - -Thu Mar 26 18:34:13 1998 J"orn Rennecke - - * regclass.c (record_reg_classes): '?' increases cost by two. - - * reload.c (find_reloads): Double previous costs. Output - reloads cost one unit extra. - - * reload1.c (eliminate_regs): Delete LOAD_EXTENDED_OP code that - boiled down to && ! 0. - - * reload.c (find_equiv_reg): Also consider a goal offset from the - frame pointer to be constant. - -Thu Mar 26 17:34:46 1998 J"orn Rennecke - - * sh.h (OPTIMIZATION_OPTIONS): Define. - -Thu Mar 26 00:19:47 1998 Richard Henderson - - * combine.c (make_compound_operation): Simplify (subreg (*_extend) 0). - -Wed Mar 25 23:53:11 1998 Jeffrey A Law (law@cygnus.com) - - * pa.c (pa_adjust_cost): Avoid redundant calls to get_attr_type. - -Wed Mar 25 13:40:48 1998 Jim Wilson - - * c-common.c (check_format_info): Initialize type, is_type. New local - integral_format. Don't warn for 'L' when pedantic. Do warn for 'L' - when pedantic if used with integral format specifier. - -Wed Mar 25 16:09:01 1998 Michael Meissner - - * rs6000.h (FUNCTION_ARG_PADDING): Cast result to be enum - direction. - (function_arg_padding): Declare. - - * rs6000.c: Include system.h. - (function_arg_padding): Change return type to int, cast enum's to - int. - - (From Kaveh R. Ghazi ) - * collect2.c (scan_prog_file): Add explicit braces to avoid - ambiguous `else'. - - * dbxout.c (dbxout_type_fields): Add braces around empty body in - an if-statement. - (dbxout_type): Likewise. - - * rs6000.c (rs6000_override_options): Change type of `i', `j' and - `ptt_size' from int to size_t. - (rs6000_file_start): Likewise for `i'. - (rs6000_replace_regno): Add default case in enumeration switch. - (output_epilog): Remove unused variable `i'. - (rs6000_longcall_ref): Remove unused variables `len', `p', `reg1' - and `reg2'. - - * rs6000.h (ADDITIONAL_REGISTER_NAMES): Add missing braces around - initializer. - (get_issue_rate, non_logical_cint_operand): Add prototype. - (rs6000_output_load_toc_table): Likewise. - - * rs6000.md (udivmodsi4): Add explicit braces to avoid ambiguous - `else'. - -Wed Mar 25 10:05:19 1998 Nick Clifton - - * config/arm/thumb.c: New File. Support for ARM's Thumb - instruction set. - * config/arm/thumb.h: New File. Thumb definitions. - * config/arm/thumb.md: New File. Thumb machine description. - * config/arm/tcoff.h: New File. Thumb COFF support. - * config/arm/t-thumb: New File. Thumb makefile fragment. - * config/arm/lib1thumb.asm: New File. Thumb libgcc support functions. - - * configure.in: Add Thumb-coff target. - * configure: Add Thumb-coff target. - * config.sub: Add Thumb-coff target. - -Wed Mar 25 10:30:32 1998 Jim Wilson - - * loop.c (scan_loop): Initialize move_insn_first to zero. - -Wed Mar 25 01:06:49 1998 Joel Sherrill (joel@OARcorp.com) - - * config/i386/go32-rtems.h: Defined TARGET_MEM_FUNCTIONS. - * config/i386/rtems.h: Likewise. - * config/i960/rtems.h: Likewise. - * config/m68k/rtems.h: Likewise. - * config/mips/rtems64.h: Likewise. - * config/pa/rtems.h: Likewise. - * config/rs6000/rtems.h: Likewise. - * config/sh/rtems.h: Likewise. - * config/sparc/rtems.h: Likewise. - -Wed Mar 25 00:57:26 1998 Richard Kenner - - * pa.c (emit_move_sequence): If in reload, call find_replacement. - -Tue Mar 24 10:44:11 1998 Nick Clifton - - * Makefile.in (gcov$(exeext)): Support .exe extension to gcov. - - * collect2.c (find_a_file): Add debugging. - (find_a_file): Test for win32 style absolute paths if - DIR_SERPARATOR is defined. - (prefix_from_string): Add debugging. - (main): Test for debug command line switch at start of program - execution. - (main): Use GET_ENVIRONMENT rather than getenv(). - (prefix_from_env): Use GET_ENVIRONMENT. - -1998-03-24 Mark Mitchell - - * cplus-dem.c (optable): Add sizeof. - (demangle_template_value_parm): New function containing code - previously found in demangle_template. - (demangle_integral_value): New function which handles complicated - integral expressions. - (demangle_template): Use them. - -Tue Mar 24 12:13:18 1998 Kaveh R. Ghazi - - * Makefile.in (genconfig.o, genflags.o, gencodes.o, genemit.o, - genopinit.o, genrecog.o, genextract.o, genpeep.o, genattr.o, - genattrtab.o, genoutput.o): Depend on system.h. - - * genattr.c: Include system.h. Add arguments to various function - prototypes. Remove redundant prototype of read_rtx(). - * genattrtab.c: Likewise. - * gencodes.c: Likewise. - * genconfig.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * genflags.c: Likewise. - * genopinit.c: Likewise. - * genoutput.c: Likewise. - * genpeep.c: Likewise. - * genrecog.c: Likewise. - -1998-03-24 Martin von Loewis - - * c-lang.c (lang_print_xnode): New function. - * objc/objc-act.c (lang_print_xnode): Likewise. - * print-tree.c (print_node): Call it - -Mon Mar 23 23:59:11 1998 H.J. Lu (hjl@gnu.org) - - * c-parse.in: Recognize protocol qualifiers in class - definitions for objc. - Include "output.h". - (yyerror): Remove redundant decl. - (yyprint): Fix prototype. - -Mon Mar 23 23:49:47 1998 Jeffrey A Law (law@cygnus.com) - - * cse.c (rtx_cost): Only call CONST_COSTS if it is defined. - - * stmt.c (unroll_block_trees): Free block_vector if needed. - -Mon Mar 23 23:26:42 1998 Philippe De Muyter - - * m68k/m68k.md (zero_extendqidi2, zero_extendhidi2): New patterns. - (zero_extendsidi2): Avoid useless copy. - (iordi_zext): New pattern. - (iorsi_zexthi_ashl16): Pattern reworked to avoid "0" constraint for - operand 2. - (iorsi_zext): New name for old unnamed pattern; indentation fixes. - - * m68k/m68k.md (ashldi_const): Allow shift count in range ]32,63]. - (ashldi3): Allow constant shift count in range ]32,63]. - (ashrdi_const, ashrid3, lshrdi_const, lshrdi3): Likewise. - -1998-03-22 Mark Mitchell - - * tree.h (IS_EXPR_CODE_CLASS): New macro. - -Mon Mar 23 23:18:48 1998 Jeffrey A Law (law@cygnus.com) - - * h8300.h (CONST_COSTS): Remove definition. - (DEFAULT_RTX_COSTS): Define. - -Mon Mar 23 22:58:22 1998 Joel Sherrill (joel@OARcorp.com) - - * config/sh/rtems.h: Switched from ELF to COFF. - -Mon Mar 23 14:14:20 1998 J"orn Rennecke - - * freebsd.h (ASM_OUTPUT_ALIGN): Redefine. - -Sat Mar 21 23:52:56 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Mar 22 00:50:42 1998 Nick Clifton - Geoff Noer - - * Makefile.in: Various fixes for building cygwin32 native toolchains. - - * objc/Makefile.in: Various fixes for building cygwin32 native toolchains. - * objc/Make-lang.in: Likewise. - - * config/i386/xm-cygwin32.h (PATH_SEPARATOR): Set to a semi-colon. - -Sun Mar 22 00:21:46 1998 R. Ganesan - - * configure.in: Handle with-PACKAGE=no correctly - -Fri Mar 20 17:36:23 1998 Kaveh R. Ghazi - - * Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, - c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, - caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, - dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, - expr.o, final.o, flow.o, function.o, getpwd.o, global.o, - integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, - prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, - reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, - rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, - tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend - on system.h. - - * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, - c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, - caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, - dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, - expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, - integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, - prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, - reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, - rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, - stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, - xcoffout.c: Include system.h. Organize include ordering so - that stdarg/varargs comes before other system headers. Remove - spurious casts of functions assured of a prototype in system.h. - -Fri Mar 20 11:19:40 1998 Stan Cox - - * reg-stack.c (pop_stack): Define. Pops any register on the - regstack and adjusts regstack. - (compare_for_stack_reg): Use pop_stack. - -Thu Mar 19 23:51:01 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in (hppa1.0-hp-hpux10): Handle threads for this - config too. - -Thu Mar 19 20:30:31 1998 Philippe De Muyter - - * libgcc2.c (exit): Do not call __bb_exit_func if HAVE_ATEXIT. - - * fold-const.c (fold): Replace sign-extension of a zero extended - value by a single zero extension. - -Thu Mar 19 00:58:07 1998 Jason Merrill - - * except.c (init_eh): Do nothing. - (save_eh_status): Call init_eh_for_function, not init_eh. - * function.c (push_function_context_to): Don't call init_emit. - -Thu Mar 19 13:39:52 1998 Michael Meissner - - * rs6000/sysv4.h (RELATIVE_PREFIX_NOT_LINKDIR): Undef for System V - and EABI. - -Thu Mar 19 10:10:36 1998 Kaveh R. Ghazi - - * final.c (shorten_branches): Add parentheses around +/- in - operand of &. - - * flow.c (life_analysis): Wrap variable `i' in macro ELIMINABLE_REGS. - -Thu Mar 19 09:15:17 1998 Manfred Hollstein - - * regclass.c (memory_move_secondary_cost): Wrap uses of - SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS - with #ifdef tests. - -Thu Mar 19 09:06:35 1998 Manfred Hollstein - - * config/m68k/m68k.md (addqi3): Fix typo gen_INT vs. GEN_INT. - - * flow.c (life_analysis): #include to make sure - size_t is defined. - * cplus-dem.c (demangle_function_name): Likewise. - -Thu Mar 19 09:00:01 1998 Manfred Hollstein - - * final.c (insn_noperands): Change type to unsigned int. - (final_scan_insn): Likewise for noperands; - properly check operand number boundaries. - -Wed Mar 18 16:20:30 1998 Richard Henderson - - * alpha.md (extzv): Don't reject register operands. Fix - mode of operand 1. - -Wed Mar 18 16:14:23 1998 Richard Henderson - - * dbxout.c (dbxout_function_end): Fix last change. The correct - predicate is ASM_OUTPUT_SECTION_NAME. - -Wed Mar 18 12:43:20 1998 Jim Wilson - - * sh.md (ashlsi_c-1): Delete 3rd argument to gen_ashlsi_c. - (ashlsi): Use match_dup 1 instead of match_operand 2. - -Wed Mar 18 13:46:07 1998 Richard Kenner - - * fold-const.c (operand_equal_for_comparison_p): See if equal - when nop conversions are removed. - -Wed Mar 18 13:42:01 1998 Richard Kenner - - * expr.c (expand_expr, case COND_EXPR): If have conditional move, - don't use ORIGINAL_TARGET unless REG. - -Wed Mar 18 16:53:19 1998 J"orn Rennecke - - * netbsd.h (ASM_OUTPUT_ALIGN): Redefine. - -Wed Mar 18 12:43:20 1998 Jim Wilson - - * loop.c (struct movable): New field move_insn_first. - (scan_loop): In consec sets code, set it. Clear it otherwise. - (move_movables): In consec sets code, use it. Copy REG_NOTES from - p to i1 only if i1 does not have REG_NOTES. Delete obsolete ifdefed - out code. - -Wed Mar 18 09:52:56 1998 Richard Henderson - - * rtl.c (read_rtx): Fall back on homebrew atoll if HOST_WIDE_INT - is large, and the system doesn't provide atoll or atoq. - (atoll): New. - - * alpha/xm-vms.h (HAVE_ATOLL): Define. - Reported by Klaus Kaempf . - -Wed Mar 18 09:56:26 1998 Kaveh R. Ghazi - - * c-lang.c (finish_file): Wrap variable `void_list_node' with macro - test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR. - - * calls.c (emit_call_1): Wrap variable `already_popped' with macro - test !ACCUMULATE_OUTGOING_ARGS. - - * collect2.c (write_c_file_glob): Wrap function definition in - macro test !LD_INIT_SWITCH. - - * combine.c (try_combine): Wrap variables `cc_use' and - `compare_mode' in macro test EXTRA_CC_MODES. - - * cpplib.c (do_ident): Remove unused variable `len'. - (skip_if_group): Remove unused variables `at_beg_of_line' and - `after_ident'. - (cpp_get_token): Remove unused variable `dummy'. - - * dbxout.c (scope_labelno): Move static variable definition inside - the one function scope where it is used. - (dbxout_function_end): Wrap prototype and definition in - macro test !NO_DBX_FUNCTION_END. - - * dwarf2out.c (add_subscript_info): Wrap variable `dimension_number' - in macro test !MIPS_DEBUGGING_INFO. - - * expr.c (expand_builtin_setjmp): Move declaration of variable `i' - into the scope where it is used. Wrap empty else-statement body - in braces. - - * fix-header.c: Fix typo in comment. - (inf_skip_spaces): Cast results of INF_UNGET to (void). - (check_protection, main): Likewise. - - * flow.c (find_basic_blocks_1): Remove dangling comment text. - - * function.c (contains): Wrap prototype and definition in macro - test HAVE_prologue || HAVE_epilogue. - (fixup_var_refs_1): Remove unused variable `width'. - - * gen-protos.c (main): Remove unused variable `optr'. - - * haifa-sched.c (debug_control_flow): Remove unused variable `j'. - - * libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0. - (__sjpopnthrow): Remove unused variable `jmpbuf'. - (__throw): Remove unused variable `val'. - - * protoize.c: Check for a previously existing definition before - defining *_OK macros. - - * scan-decls.c (scan_decls): Remove unused variable `old_written'. - -Tue Mar 17 00:45:48 1998 J"orn Rennecke - - * vax.h (ADDR_VEC_ALIGN): Define. - -Mon Mar 16 15:57:17 1998 Michael Meissner - - * gcc.c (default_arg): Don't wander off the end of allocated - memory. - - (From Geoffrey Keating ) - * rs6000.c (small_data_operand): Ensure that any address - referenced relative to the small data area is inside the SDA. - -Mon Mar 16 12:55:15 1998 Jim Wilson - - * config/m68k/netbsd.h (ASM_SPEC): Add %{m68060}. - -Mon Mar 16 15:50:20 1998 Andrew MacLeod - - * except.h (in_same_eh_region): New prototype. - (free_insn_eh_region, init_insn_eh_region): New prototypes. - * except.c (insn_eh_region, maximum_uid): New static variables. - (set_insn_eh_region): New static function to set region numbers. - (free_insn_eh_region): New function to free EH region table. - (init_insn_eh_region): New function to initialize EH region table. - (in_same_eh_region): New function used to determine if two rtl - instructions are in the same exception region or not. - * final.c (final): Initialize the table indicating which instructions - belong in which exception region. - * genpeep.c (main): Add "except.h" to include file list in generated - file insn-peep.c. - * config/sparc/sparc.md: Add calls to 'in_same_eh_region' in 4 - peepholes involving calls and unconditional branches. - -Mon Mar 16 11:16:50 1998 Jim Wilson - - * README.gnat: New file. - -Mon Mar 16 11:14:20 1998 Andreas Schwab - - * config/m68k/m68k.c: Include for atoi. Include - "recog.h" for offsettable_memref_p. - (legitimize_pic_address): Remove unused variable `offset'. - (notice_update_cc): Change return type to void. Add default label - to switch. - (standard_68881_constant_p): Remove unused variable mode. - (print_operand): Define local variable i only if SUPPORT_SUN_FPA. - (const_int_cost): Explicitly declare as returning int. - (output_dbcc_and_branch): Change return type to void. - - * config/m68k/linux.h, config/m68k/m68k.md, config/m68k/m68k.c, - config/m68k/m68k.h: Replace gen_rtx (XXX, ...) with gen_rtx_XXX - (...). Use GEN_INT instead of gen_rtx_CONST_INT. - -Sun Mar 15 22:30:44 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Fri Mar 13 11:30:12 1998 Andreas Schwab - - * config/m68k/m68k.h (CONST_OK_FOR_LETTER_P): Fix logic in range - check for 'M' constraint. - -Thu Mar 12 14:47:14 1998 Jim Wilson - - * cccp.c (create_definition): If pedantic, call pedwarn for macro - varargs feature. - -Thu Mar 12 13:43:25 1998 Bernd Schmidt - - * i386.c (ix86_logical_operator): New function. - (split_di): Ensure that when a MEM is split, the resulting MEMs have - SImode. - * i386.md (anddi3, xordi3, iordi3): New patterns. Add a define_split - to implement them. - -Thu Mar 12 15:13:16 1998 Kaveh R. Ghazi - Richard Earnshaw - Nick Clifton - - * tm.texi (DEFAULT_RTX_COSTS): Document new macro. - - * arm.h (DEFAULT_RTX_COSTS): Define instead of RTX_COSTS. - - * cse.c (rtx_cost): Provide a default case in an enumeration - switch, and call DEFAULT_RTX_COSTS if it's defined. - -Thu Mar 12 10:02:38 1998 Manfred Hollstein - - * basic-block.h (compute_preds_succs): Change return type in - prototype to void. - * flow.c (compute_preds_succs): Likewise in function definition. - - * regmove.c (find_matches): Cast char used as array index to unsigned char - to suppress warning. - -Thu Mar 12 09:39:40 1998 Manfred Hollstein - - * i386.h (RTX_COSTS): Insert braces around nested if. - (ADDITIONAL_REGISTER_NAMES): Insert braces around structured - elements. - - * gcc.c (default_compilers): Properly put brackets around array elements in - initializer. - - * getopt.c (_getopt_internal): Add explicit braces around nested if; - reformatted. - - * reg-stack.c (record_asm_reg_life): Add explicit braces around nested if's. - (record_reg_life_pat): Add explicit parens around && and || in expression. - (stack_reg_life_analysis): Add parens around assignment used as expression. - (convert_regs): Likewise. - -Thu Mar 12 09:25:29 1998 Manfred Hollstein - - * bitmap.c (bitmap_element_allocate): Remove unused parameter; - change callers accordingly. - - * cplus-dem.c (arm_special): Remove unused parameter work in prototype - and definition; change all callers accordingly. - - * except.c (init_eh): Avoid assignment of unused return value of - build_pointer_type; cast it to void, instead, and remove unused - variable type. - - * gcc.c (lang_specific_driver): Define prototype only #ifdef - LANG_SPECIFIC_DRIVER. - (temp_names): Define only #ifdef MKTEMP_EACH_FILE. - - * genoutput.c (output_epilogue): Initialize next_name to 0. - - * real.c (efrexp): #if 0 prototype and function definition. - (eremain): Likewise. - (uditoe): Likewise. - (ditoe): Likewise. - (etoudi): Likewise. - (etodi): Likewise. - (esqrt): Likewise. - - * reload.c (push_secondary_reload): Define prototype only - #ifdef HAVE_SECONDARY_RELOADS. - - * varasm.c (assemble_static_space): Define rounded only - #ifndef ASM_OUTPUT_ALIGNED_LOCAL. - -Thu Mar 12 09:11:35 1998 Manfred Hollstein - - * i386.md (andsi): Add default case in enumeration switch. - (iorsi3): Likewise. - (iorhi3): Likewise. - (xorsi3): Likewise. - -Thu Mar 12 08:37:02 1998 Manfred Hollstein - - * c-decl (finish_struct): Change type of min_align to unsigned. - - * cplus-dem.c (demangle_function_name): Change type of variable i to size_t; - remove unused variable len. - - * dwarf2out.c (reg_save): Add explicit cast of -1 to unsigned and a - comment indicating this is proper behavior. - (reg_loc_descriptor): Remove redundant comparison of unsigned variable - reg >= 0. - (based_loc_descr): Likewise. - - * enquire.c (bitpattern): Change type of variable i to unsigned. - - * final.c (output_asm_insn): Don't cast insn_noperands to unsigned. - - * flow.c (life_analysis): Change type of variable i to size_t; - remove unused variable insn. - - * gcc.c (translate_options): Change type of variables optlen, arglen and - complen to size_t. - (input_filename_length): Change type to size_t. - (do_spec_1): Change type of variable bufsize to size_t. - (main): Change type of variables i and j to size_t; - remove subblock local definition of variable i. - (lookup_compiler): Change type of second argument to size_t; - change type of variable i to size_t. - - * genemit.c (output_init_mov_optab): Change type of variable i to size_t. - - * genopinit.c (get_insn): Change type of variable pindex to size_t. - - * genrecog.c (add_to_sequence): Change type of variable i to size_t. - - * global.c (global_alloc): Change type of variable i to size_t. - - * regclass.c (init_reg_sets): Change type of variables i and j to unsigned. - - * stmt.c (expand_end_bindings): Change type of variable i to size_t. - (expand_end_case): Change type of variable count to size_t. - - * toplev.c (main): Change type of variable j to size_t. - (set_target_switch): Change type of variable j to size_t. - (print_switch_values): Change type of variable j to size_t; - remove unused variable flags. - - * varasm.c (assemble_variable): Change type of variable align to size_t. - (const_hash_rtx): Change type of variable i to size_t. - -1998-03-11 Mark Mitchell - - * dbxout.c (dbxout_type_methods): Only treat TYPE_METHODS as a - TREE_VEC if that's what it really is. - -Wed Mar 11 15:16:01 1998 Michael Meissner - - * {haifa-,}sched.c (rank_for_schedule): Only take void * arguments - as per ISO C spec. - -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 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. - -Wed Mar 11 18:26:25 1998 J"orn Rennecke - - * sh.h (LOOP_ALIGN): Only align when optimizing. - * sh.c (find_barrier): Clear inc for CODE_LABELs. - When not optimizing, calculate alignment for BARRIERs directly. - -Wed Mar 11 15:07:18 1998 J"orn Rennecke - - * final.c (shorten_branches): Remove conditionalizing on - SHORTEN_WITH_ADJUST_INSN_LENGTH. - * sh.h, pa.h (SHORTEN_WITH_ADJUST_INSN_LENGTH): Remove. - -Wed Mar 11 02:37:41 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_basic_blocks_1): Keep the cfg accurate when removing - an unconditional jump around deleted blocks. - -Mon Mar 9 12:02:23 1998 Jim Wilson - - * profile.c (branch_prob): If see computed goto, call fatal instead of - abort. - - * config/mips/sni-svr4.h (CPP_PREDEFINE): Add -DSNI and -Dsinix. - - * configure.in (alpha-dec-osf): Add default case for osf* to switch. - Patch from Bruno Haible. - - * function.c (put_reg_into_stack): Copy MEM_IN_STRUCT_P from new. - (assign_parms): Set aggregate if hide_last_arg and last_named. - -Mon Mar 9 19:57:56 1998 J"orn Rennecke - - * final.c (shorten_branches): Initialize insn_addresses. - -Mon Mar 9 14:10:23 1998 J"orn Rennecke - - * sh.h (MUST_PASS_IN_STACK): Define. - -Sun Mar 8 13:01:56 1998 Jeffrey A Law (law@cygnus.com) - - * final.c (shorten_branches): Fix minor logic error in - ADDR_DIFF_VEC shortening support. - -Sun Mar 8 02:17:42 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Mar 7 00:54:15 1998 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (is_cfg_nonregular): Change return type to - an int. No longer compute "estimated" number of edges. Use - computed_jump_p instead of duplicating the code. Fixup/add - some comments. - (build_control_flow): Returns a value indicating an irregularity - in the cfg was detected. Count the number of edges in the cfg. - allocate various edge tables. - (find_rgns): No longer look for unreachable blocks. - (schedule_insns): Do not allocate memory for edge tables here. - Free memory for edge tables before returning. Do not perform - cross block scheduling if build_control_flow returns nonzero. - * flow.c (compute_preds_succs): More accurately determine when - a block drops in. - - * basic-block.h (free_basic_block_vargs): Provide prototype. - - * cccp.c (main): Fix dumb mistakes in last change. - -Fri Mar 6 21:28:45 1998 J"orn Rennecke - - * rtl.h (addr_diff_vec_flags): New typedef. - (union rtunion_def): New member rt_addr_diff_vec_flags. - (ADDR_DIFF_VEC_FLAGS): New macro. - - * sh.c (output_branch): Fix offset overflow problems. - - * final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE. - (final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT. - * rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags). - * stmt.c (expand_end_case): Supply new arguments to - gen_rtx_ADDR_DIFF_VEC. - * 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY. - * alpha.h, arc.h, clipper.h, convex.h : Likewise. - * dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise. - * i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise. - * mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise. - * rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise. - * vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise. - * i386/386bsd.h, i386/freebsd-elf.h : Likewise. - * i386/freebsd.h, i386/linux.h : Likewise. - * i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise. - * i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise. - * m68k/mot3300.h, m68k/sgs.h : Likewise. - * m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise. - * sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define. - (CASE_VECTOR_SHORTEN_MODE): Define. - (short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare. - (med_branch_p, braf_branch_p): Don't declare. - (mdep_reorg_phase, barrier_align): Declare. - (ADJUST_INSN_LENGTH): Remove alignment handling. - * sh.c (uid_align, uid_align_max): Deleted. - (max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted. - (short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted. - (cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted. - (output_far_jump): Don't use braf_branch_p. - (output_branchy_insn): Don't use branch_offset. - (find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs. - Remove paired barrier stuff. - Don't use cache_align_p. - Take alignment insns into account. - (fixup_addr_diff_vecs): Reduce to only fixing up the base label of - the addr_diff_vec. - (barrier_align, branch_dest): New function. - (machine_dependent_reorg, split_branches): Remove infrastructure - for branch shortening that is now provided in the backend. - * sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes. - (braf_branch_p, braf_cbranch_p): Likewise. - (attribute length): Use new attributes. - (casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC. - (addr_diff_vec_adjust): Delete. - (align_2): Now a define_expand. - (align_log): Now length 0. - -Fri Mar 6 14:41:33 1998 Michael Meissner - - * m32r.md (right): Correctly check for length == 2, not 1. - -Fri Mar 6 14:00:04 1998 Kaveh R. Ghazi - - * mips/mips.h: Prototype `machine_dependent_reorg'. - (ASM_OUTPUT_ALIGN): Remove unused variable `mask'. - -Fri Mar 6 11:43:35 1998 Joern Rennecke (amylaar@cygnus.co.uk) - - * final.c (shorten_branches): Restore accidentally removed code. - -Fri Mar 6 11:00:49 1998 Andreas Schwab - - * configure.in: Remove duplicate uses of AC_PROG_CC and - AC_PROG_MAKE_SET. - -Fri Mar 6 00:59:30 1998 Richard Henderson - - * configure.in (target_cpu_default2): Correct typo for alphapca56. - -Thu Mar 5 23:24:50 1998 Jeffrey A Law (law@cygnus.com) - Doug Evans (devans@cygnus.com) - - * haifa-sched.c (build_jmp_edges): Delete dead function. - (build_control_flow): Use cfg routines from flow.c. - (schedule_insns): Remove debugging code accidentally checked - in earlier today. - - * basic-block.h: Add external integer list structures, typdefs, - accessor macros and function declarations. Similarly for - basic block pred/succ support and simple bitmap stuff. - * flow.c: Add functions for integer list, basic block pred/succ - support and simple bitmap support. - (compute_dominators): New function to compute dominators and - post dominators. - (find_basic_blocks): Split into two functions. - (life_analysis): Likewise. - (flow_analysis): Removed. Now handled by calling find_basic_blocks, - the life_analysis from toplev.c. - * toplev.c (rest_of_compilation): Call find_basic_blocks, then - life_analysis instead of flow_analysis. - -Thu Mar 5 23:06:26 1998 J"orn Rennecke - - * jump.c (jump_optimize): Call mark_jump_label also for deleted - insns. - (mark_jump_label): Don't increment ref counts for deleted insns. - -Thu Mar 5 09:55:15 1998 Kaveh R. Ghazi - - * mips/iris6.h (TARGET_DEFAULT): Parenthesize macro definition. - - * mips/mips.c: Include stdlib.h and unistd.h. - (mips_asm_file_end): Add braces around empty body in an if-statement. - (function_prologue): Wrap variable `fnname' in - !FUNCTION_NAME_ALREADY_DECLARED. Correct format specifier in fprintf. - (mips_select_rtx_section, mips_select_section): Declare as void. - - * mips/mips.h: Add prototypes for extern functions in mips.c. - (FUNCTION_ARG_REGNO_P): Add parentheses around && within ||. - (ENCODE_SECTION_INFO): Add braces around empty body in an - if-statement. - - * mips/mips.md (movdi): Add parentheses around && within ||. - (movsf, movdf): Likewise. - (branch_zero, branch_zero_di): Add default case in - enumeration switch. - -Thu Mar 5 02:45:48 1998 Richard Henderson - - * alpha/alpha.h (TARGET_WINDOWS_NT, TARGET_OPEN_VMS): Just make them - real constants, since they can't be changed. - (TARGET_AS_CAN_SUBTRACT_LABELS): New. - * alpha/alpha.md (builtin_setjmp_receiver): Use it. - * alpha/osf.h (TARGET_AS_CAN_SUBTRACT_LABELS): New. - * alpha/osf2or3.h (TARGET_AS_CAN_SUBTRACT_LABELS): New. - * alpha/vms.h (TARGET_OPEN_VMS): New. - * alpha/win-nt.h (TARGET_WINDOWS_NT): New. - -Thu Mar 5 02:41:27 1998 Richard Henderson - - * reload.c (find_reloads): Always force (subreg (mem)) to be - reloaded if WORD_REGISTER_OPERATIONS. - -Thu Mar 5 02:14:44 1998 Richard Henderson - - * haifa-sched.c (free_list): Rename from free_pnd_lst. - (free_pending_lists): Rename free_pnd_lst uses. - (remove_dependence): Place expunged element on unused_insn_list. - (alloc_INSN_LIST, alloc_EXPR_LIST): New. Change all callers of - gen_rtx_*_LIST and alloc_rtx to use them. - (compute_block_backward_dependences): Free the reg_last_* lists. - -Thu Mar 5 00:05:40 1998 Jeffrey A Law (law@cygnus.com) - - * cccp.c (main): Avoid undefined behavior when setting pend_includes - and pend_files. - -Wed Mar 4 21:58:25 1998 Franz Sirl - - * rs6000/linux.h: Don't define DEFAULT_VTABLE_THUNKS to 1 if - USE_GNULIBC_1 is defined. - * configure.in: Add a new case powerpc-*-linux-gnulibc1 which - includes the t-linux-gnulibc1 fragment. - -Wed Mar 4 12:11:36 1998 Jim Wilson - - * mips.md (movdf_internal1a): Fix misplaced parenthesis in condition. - -Wed Mar 4 18:47:48 1998 J"orn Rennecke - - * final.c (final_scan_insn, case CODE_LABEL: Cleanup. - -Wed Mar 4 15:51:19 1998 J"orn Rennecke - - * final.c (shorten_branches): Tag the loop alignment onto the - first label after NOTE_INSN_LOOP_BEG even if there is an - intervening insn. - -Tue Mar 3 21:48:35 1998 J"orn Rennecke - - * final.c (insn_current_reference_address): - Use SEQ instead of BRANCH as argument to align_fuzz, to get a - proper alignment chain. - - * final.c (max_labelno): New static variable. - (final_scan_insn): Check max_labelno before outputting an - alignment for a label. - (shorten_branches): Remove unused variable length_align. - -Tue Mar 3 14:27:23 1998 Kaveh R. Ghazi - - * sparc.c (ultrasparc_adjust_cost): Add default case in - enumeration switch. - - * sparc.h: Add prototypes for extern functions defined in - sparc.c. - -Tue Mar 3 10:00:11 1998 Nick Clifton - - * toplev.c: Only generate .dbr file when dumping RTL if - DEALY_SLOTS is defined. - -Tue Mar 3 07:36:37 1998 Manfred Hollstein - - * reorg.c (fill_eager_delay_slots): Add new argument delay_list - in call to fill_slots_from_thread. - -Mon Mar 2 13:45:03 1998 Richard Henderson - - * alpha/linux.h (CPP_PREDEFINES): Correct connecting whitespace - to SUB_CPP_PREDEFINES. Reported by asun@saul4.u.washington.edu. - -Mon Mar 2 22:59:28 1998 J"orn Rennecke - - * final.c (insn_last_address, insn_current_align, uid_align): - New variables. - (in_align_chain, align_fuzz, align_shrink_fuzz): New functions. - (insn_current_reference_address): Likewise. - (shorten_branches, final_scan_insn): Implement LABEL_ALIGN, - LABEL_ALIGN_AFTER_BARRIER and LOOP_ALIGN target macros. - (label_to_alignment): New function. - * genattrtab.c (write_test_expr): If one of LABEL_ALIGN, - LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN is defined, call - insn_current_reference_address instead of insn_current_address. - (or_attr_value, write_length_unit_log): New functions. - (main): Call write_length_unit_log. - (write_const_num_delay_slots): Output extra '\n'. - * alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): - Replace with: - (LOOP_ALIGN, ALIGN_LABEL_AFTER_BARRIER). - * i386.h, i386/osfrose.h, i386/svr3dbx.h, m68k.h, sparc.h: Likewise. - * arc.h, m32r.h (ASM_OUTPUT_LOOP_ALIGN): Replace with: - (LOOP_ALIGN). - * i960.h, m88k.h (ASM_OUTPUT_ALIGN_CODE): Replace with: - (LABEL_ALIGN_AFTER_BARRIER). - * ns32k/encore.h, ns32k/merlin.h, ns32k.h, ns32k/sequent.h: Likewise. - * ns32k/tek6000.h: Likewise. - * i386/gas.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Delete. - * i386.md (casesi+1): Use ASM_OUTPUT_ALIGN instead of - ASM_OUTPUT_ALIGN_CODE. - -Mon Mar 2 01:05:50 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Mar 2 00:52:18 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Mar 1 18:25:49 1998 Michael P. Hayes - - * reorg.c (fill_slots_from_thread): Don't steal delay list from target - if condition code of jump conflicts with opposite_needed. - - * reorg.c (fill_slots_from_thread): Mark resources referenced in - opposite_needed thread. Return delay_list even when cannot get - any more delay insns from end of subroutine. - -Sun Mar 1 18:26:21 1998 Ken Rose (rose@acm.org) - - * reorg.c (fill_slots_from_thread): New parameter, delay_list. - All callers changed. - -Sun Mar 1 18:25:37 1998 Bruno Haible - - * frame.c (start_fde_sort, fde_split, heapsort, fde_merge, - end_fde_sort): New functions for fast sorting of an FDE array. - (fde_insert): Simplified. - (add_fdes): Change argument list. - (frame_init): Use the new functions. - -Sun Mar 1 18:06:21 1998 Jeffrey A Law (law@cygnus.com) - - * ginclude/va-ppc.h (va_arg): Fix typo in long long support. - - * i386.c (reg_mentioned_in_mem): Fix dangling else statement. - - * fold-const.c (fold_range_test): Always return a value. - -Sun Mar 1 17:57:34 1998 Mumit Khan - - * config/i386/winnt.c (i386_pe_unique_section): Put read-only - data in the text section unless READONLY_DATA_SECTION is defined. - -Sun Mar 1 17:48:46 1998 Jeffrey A Law (law@cygnus.com) - - * c-parse.in (undeclared variable error): Tweak error message to - be clearer. - -Sun Mar 1 10:22:36 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -1998-02-28 Mark Mitchell - - * final.c (final_scan_insn): Undo overzealous removal of `set'. - -Sat Feb 28 07:54:03 1998 Kaveh R. Ghazi - - * pa.h (CONST_COSTS): When checking the CONST_DOUBLE enumerated - case, add parentheses to specify the proper order of precedence in - the if-statement. - - * c-aux-info.c: Include string.h/strings.h. - - * pa.c: Include stdlib.h. - (pa_combine_instructions): Prototype the function. - (pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise. - (reloc_needed): Add default case for enumeration switch. - (remove_useless_addtr_insns): Remove unused variable `all'. - (hppa_expand_prologue): Add explicit braces to avoid - ambiguous `else'. - (output_function_epilogue): Remove unused variable `i'. - (output_millicode_call): Remove unused variable `link'. - (shadd_constant_p, forward_branch_p): Make the function static. - (following_call): Explicitly declare to return int. - (pa_reorg): Declare as void. - (pa_combine_instructions): Declare as static void. Add - parentheses around && within ||. - - * pa.h: Add prototypes for pa_reorg, symbolic_operand, - following_call, function_label_operand, lhs_lshift_cint_operand - and zdepi_cint_p. - - * pa.md: Add parentheses around && within ||. - - * cppalloc.c: Include stdlib.h. - - * cpperror.c (cpp_print_containing_files): Remove unused variable - `i'. Fix format specifier in fprintf. - - * cse.c (cse_around_loop): Add explicit braces to avoid - ambiguous `else'. - (delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0. - - * expr.c (expand_expr): Add parentheses around && within ||. - - * final.c (app_enable): Replace fprintf with fputs where there are - no format specifiers and no trailing argument after the string. - Eg, when printing ASM_APP_ON/ASM_APP_OFF. - (app_disable): Likewise. - (final_end_function): Likewise. - (final_scan_insn): Likewise. Remove unused variable `set'. - (profile_function): Wrap empty if-statement body in {} brackets. - - * function.c: Include stdlib.h. - (pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD. - (reposition_prologue_and_epilogue_notes): Add parentheses - around assignment used as truth value. - - * integrate.c (expand_inline_function): Wrap variable - `cc0_insn' in macro HAVE_cc0. - - * jump.c (jump_optimize): Wrap variable `q' in macro - HAVE_cc0. Remove unused variable `prev1'. - - * libgcc2.c (__bb_exit_trace_func): Add parentheses around && - within ||. Fix format specifier in fprintf. - (__bb_init_prg): Add parentheses around assignment used as - truth value. - - * local-alloc.c: Include stdlib.h. - (requires_inout): Add parentheses around assignment used - as truth value. - - * loop.c (analyze_loop_iterations): Wrap prototype and definition - in macro HAVE_decrement_and_branch_on_count. - (insert_bct, instrument_loop_bct): Likewise. - (move_movables): Add parentheses around assignment used as - truth value. - (consec_sets_invariant_p): Likewise. - (maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0. - - * objc/objc-act.c: Include stdlib.h. - (lookup_method_in_protocol_list): Wrap empty else-statement body - in braces. - (lookup_protocol_in_reflist): Likewise. - (objc_add_static_instance): Remove unused variables `decl_expr' - and `decl_spec'. - (get_objc_string_decl): Remove unused variable `decl'. - (generate_static_references): Remove unused variables `idecl' and - `instance'. - (check_protocols): Wrap empty else-statement body in braces. - - * protoize.c: Include stdlib.h. - (substr): Add parentheses around assignment used as truth value. - (abspath): Likewise. - (shortpath): Likewise. - - * regmove.c (fixup_match_1): Add parentheses around assignment - used as truth value. - - * reload.c (push_secondary_reload): Remove unused variable `i'. - (find_reloads): Add parentheses around assignment used as truth - value. - - * reload1.c: Include stdlib.h. - - * rtl.h: Correct typo in prototype of offsettable_memref_p. - - * stmt.c (add_case_node): Add parentheses around assignment used - as truth value. - (case_tree2list): Likewise. - - * tree.c (valid_machine_attribute): Wrap variable `decl_attr_list' - in macro VALID_MACHINE_DECL_ATTRIBUTE. Wrap variable - `type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE. - (merge_attributes): Add explicit braces to avoid ambiguous - `else'. - - * unroll.c (copy_loop_body): Wrap variable `cc0_insn' in - macro HAVE_cc0. - - * varasm.c: Include stdlib.h. - - * system.h: Remove sys/stat.h. - * gcc.c: Add sys/stat.h. - - * genattr.c: Wrap prototype of `free' in NEED_DECLARATION_FREE. - * genattrtab.c: Likewise. - * genconfig.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * genflags.c: Likewise. - * genopinit.c: Likewise. - * genoutput.c: Likewise. - * genpeep.c: Likewise. - * genrecog.c: Likewise. - * tlink.c: Likewise. Also wrap `getenv' in NEED_DECLARATION_GETENV. - -Fri Feb 27 11:02:47 1998 Andreas Schwab - - * invoke.texi: Use @itemx for a secondary item in a @table. - - * config/m68k/m68k.md (movsf+1): Optimize moving a CONST_DOUBLE - zero. - -Thu Feb 26 00:13:21 1998 Ian Lance Taylor - - * choose-temp.c: Fix handling of sys/file.h to work in libiberty. - -Wed Feb 25 23:40:54 1998 Jeffrey A Law (law@cygnus.com) - - * i386.c (struct machine_function): Add new fields for PIC stuff. - (save_386_machine_status): Fix argument to xmalloc. Save pic_label_rtx - and pic_label_name. - (restore_386_machine_status): Corresponding changes. - (clear_386_stack_locals): Also clear pic_label_rtx and pic_label_name. - -Wed Feb 25 01:31:40 1998 Jeffrey A Law (law@cygnus.com) - - * c-parse.y (undeclared variable error): Tweak error message - to be clearer. - -Tue Feb 24 23:54:07 1998 Richard Henderson - - * flags.h (g_switch_value, g_switch_set): Declare. - * alpha.c (override_options): Set g_switch_value=8 if not set. - * alpha/elf.h (CC1_SPEC): New. - (ASM_SPEC): New. - (LINK_SPEC): Pass along the -G value we were given. - (LOCAL_ASM_OP): Remove. - (ASM_OUTPUT_ALIGNED_LOCAL): Output to .bss or .sbss by size. - (MAX_OFILE_ALIGNMENT): New. - (BSS_SECTION_ASM_OP, SBSS_SECTION_ASM_OP, SDATA_SECTION_ASM_OP): New. - (EXTRA_SECTIONS): Add sbss and sdata. - (SECTION_FUNCTION_TEMPLATE): New. - (EXTRA_SECTION_FUNCTIONS): Use it. - (CTORS_SECTION_FUNCTION, DTORS_SECTION_FUNCTION): Remove. - (SELECT_SECTION): Use sdata when small enough. - * alpha/linux.h (ASM_SPEC): Remove. - -Mon Feb 23 15:09:18 1998 Bruno Haible - * config.sub (sco5): Fix typo. - -Mon Feb 23 18:19:31 1998 Manfred Hollstein - - * config/t-linux (LIBGCC1, CROSS_LIBGCC1, LIBGCC1_TEST): Add macros and - set to empty. - * config/t-linux-aout (LIBGCC1, CROSS_LIBGCC1, LIBGCC1_TEST): Likewise. - * config/alpha/t-linux: Remove file. - * config/sparc/t-linux: Remove file. - * config/m68k/t-linux (LIBGCC1, CROSS_LIBGCC1): Remove. - * config/m68k/t-linux-aout (LIBGCC1, CROSS_LIBGCC1): Likewise. - * configure.in (alpha*-*-linux-gnulibc1*): Use t-linux instead of alpha/t-linux - for tmake_file. - (alpha*-*-linux-gnu*): Likewise. - (sparc-*-linux-gnulibc1*): Use t-linux instead of sparc/t-linux for tmake_file. - (sparc-*-linux-gnu*): Likewise. - -Mon Feb 23 10:47:39 1998 Robert Lipe - * collect2.c (ldd_file_name): Bracket declaration with same - manifests as use. - (full_real_ld_suffix): Deleted. Variable was calloced and - written into, but never read. - -1998-02-23 Mike Stump - - * configure.in: Add support for i386-wrs-vxworks configuration. - * i386/vxi386.h: New file. - -Sun Feb 22 21:16:51 1998 Bruno Haible - - * tree.c (contains_placeholder_p): Ensure function always returns - a value. - * sparc.md (movdi_sp64_insn): Add default case in enumeration switch. - (movsf_const_insn, movdf_const_insn, movtf_const_insn): Likewise. - -Sun Feb 22 20:58:19 1998 Jeffrey A Law (law@cygnus.com) - - * vms.h (SELECT_SECTION): Use TREE_CODE_CLASS correctly. - -1998-02-22 Paul Eggert - - * config/sparc/sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2): - Define this new symbol. - (DWARF2_DEBUGGING_INFO, DWARF_DEBUGGING_INFO): Do not #undef. - * toplev.c (main): Do not default to DWARF2_DEBUG with -ggdb if - LINKER_DOES_NOT_WORK_WITH_DWARF2 is defined. - -Sun Feb 22 20:07:32 1998 Jim Wilson - - * iris5.h (DWARF2_UNWIND_INFO): Define to 0. - * iris5gas.h (DWARF2_UNWIND_INFO): Define to 1. - -Sun Feb 22 15:29:48 1998 Richard Henderson - - * objc/Object.m (-error): Call objc_verror with our va_list. - -Sun Feb 22 09:45:39 1998 Kaveh R. Ghazi - - * collect2.c (scan_prog_file): Completely cover uses of variable - `exports' with macro COLLECT_EXPORT_LIST. - -Sat Feb 21 20:36:23 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Fri Feb 20 16:22:13 1998 Michael Meissner - - * sched.c (schedule_block): Remove code to get arguments from hard - regs into pseudos early. Same as Aug 25, 1997 change to - haifa-sched.c. - -1998-02-20 Jason Merrill - - * collect2.c (main): Still handle !do_collecting for non-AIX targets. - -1998-02-16 Mark Mitchell - - * toplev.c (rest_of_compilation): Do not defer the output of a - nested function. - -Fri Feb 20 10:39:47 1998 Michael Tiemann - - * ginclude/va-mips.h (va_arg): Remove trailing space after '\' - continuation character (line 243). - -Fri Feb 20 12:10:26 1998 Andreas Schwab - - * genrecog.c (main): Remove duplicated sentence in emitted comment. - -Thu Feb 19 22:36:53 1998 Andrey Slepuhin - David Edelsohn - - * collect2.c (XCOFF_SCAN_LIBS): Remove. - (export_flag): New variable. - (export_file): #ifdef COLLECT_EXPORT_LIST. - (import_file, exports, imports, undefined): New variables. - (libs, cmdline_lib_dirs, libpath_lib_dirs, libpath, libexts): Same. - (dump_list, dump_prefix_list, is_in_list): New functions. - (write_export_file): $ifdef COLLECT_EXPORT_LIST. - (write_import_file, resolve_lib_name): New functions. - (use_import_list, ignore_library): Same. - (collect_exit): maybe_unlink import_file and #ifdef. - (handler): Same. - (main): New variable importf, #ifdef exportf. Move parsing of - -shared before general argument parsing. Resolve AIX library - paths and import libgcc.a symbols. Treat .so shared libraries the - same as objects and .a libraries. Create alias for object_lst and - increment it instead of original pointer. Scan AIX libraries as - objects earlier instead of using scan_libraries. Perform AIX - tlink later to resolve templates instead of forking ld. - (GCC_OK_SYMBOL): Ensure symbol not in undef section. - (GCC_UNDEF_SYMBOL): New macro. - (scan_prog_file): Loop for members of AIX libraries. Handle - export/import of ctors/dtors. - (aix_std_libs): New variable. - (scan_libraries, XCOFF): Delete. - -Thu Feb 19 22:36:52 1998 Robert Lipe - - * collect2.c (full_real_ld_suffix): #ifdef CROSS_COMPILE. - -1998-02-19 Mike Stump - - * Makefile.in: Use $tooldir for sys-include to match toplevel - configure. - -Thu Feb 19 01:32:37 1998 Jeffrey A Law (law@cygnus.com) - Richard Kenner - - * emit-rtl.c (gen_lowpart_common): Suppress last change if __complex__. - - * emit-rtl.c (hard-reg-set.h): Include. - (get_lowpart_common): Don't make new REG for hard reg in a - class that cannot change size. - * Makefile.in (emit-rtl.o): Depend on hard-reg-set.h. - - * combine.c: Revert previous patch. - -1998-02-19 Paul Eggert - - * config/sparc/sol2-sld.h: New file. - * configure.in (sparc-*-solaris2*): Use it when using the - system linker. - -Thu Feb 19 00:46:59 1998 Jeffrey A Law (law@cygnus.com) - - * loop.c (force_movables): Fix typo. - -Thu Feb 19 08:26:30 1998 Manfred Hollstein - - * m88k.h: Change file pattern to match reality. - -Wed Feb 18 23:19:52 1998 Jeffrey A Law (law@cygnus.com) - - * varasm.c (output_constant_pool): Fix dumb thinko in last - change. - - * pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Correctly translate from - a function name to a section name. - -1998-02-18 Doug Evans - - * tree.h (merge_machine_{type,decl}_attributes): Declare. - (split_specs_attrs, strip_attrs): Add prototypes. - * tree.c (merge_machine_{type,decl}_attributes): New functions. - * c-decl.c (duplicate_decls): Call merge_machine_decl_attributes. - Update olddecl's attributes too. - * c-common.c (strip_attrs): New function. - * c-typeck.c (common_type): Call merge_machine_type_attributes. - * varasm.c (make_function_rtl): New target macro REDO_SECTION_INFO_P. - (make_decl_rtl): Likewise. - -1998-02-18 Jim Wilson - - * c-decl.c (shadow_tag_warned): Call split_specs_attrs. - -Wed Feb 18 09:09:50 1998 Jeffrey A Law (law@cygnus.com) - - Remove this change until we can fix it correctly. - * collect2.c: Bracket declaration of 'exportf' and - 'full_real_ld_suffix'. - -Wed Feb 18 08:44:25 1998 Bernd Schmidt - - * Makefile.in (STAGESTUFF): Add genrtl.c, genrtl.h and gengenrtl. - -Tue Feb 17 23:30:20 1998 Bernd Schmidt - - * c-common.c (c_expand_start_cond, c_expand_end_cond, - c_expand_start_else): Don't warn about non-ambiguous else even if - braces are missing. - -Tue Feb 17 23:56:50 1998 Robert Lipe - - * sco5.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, - ASM_OUTPUT_LONG_DOUBLE): Delete. Use the ones from i386.h - instead. - -Tue Feb 17 22:56:14 1998 Richard Henderson - - * combine.c (simplify_rtx): Obey CLASS_CANNOT_CHANGE_SIZE when - simplifying a subreg of a hard reg. - (expand_compound_operation): Likewise. - (force_to_mode): Likewise. - -Tue Feb 17 22:37:22 1998 Kaveh R. Ghazi - - * fold-const.c: Include "system.h" to get stdlib.h and stdio.h. - (lshift_double): Add parentheses around + or - inside shift. - (rshift_double): Likewise. - (size_int_wide): Explicitly set type of `bit_p' to `int'. - - * Makefile.in (fold-const.o): Depend on system.h. - - * Makefile.in (gcc.o): Depend on system.h, in accordance with last - change to gcc.c. - - * haifa-sched.c: Include "system.h" to get and . - (BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |. - (sched_note_set): Remove unused parameter `b', all callers changed. - (schedule_block): Likewise for `rgn'. - (split_hard_reg_notes): Likewise for `orig_insn'. - (check_live): Likewise for `trg'. - (update_live): Likewise. - (check_live_1): Explicitly declare variable `i' as int. - (update_live_1): Likewise. - (insn_issue_delay): Remove unused variable `link'. - (sched_analyze_2): Add default case in enumeration switch. - (schedule_insns): Remove unused variable `i'. - - * Makefile.in ($(SCHED_PREFIX)sched.o): Depend on system.h. - -Tue Feb 17 22:31:04 1998 Jeffrey A Law (law@cygnus.com) - - * loop.c (rtx_equal_for_loop_p): Add some braces to disambiguate - a dangling else clause. - -Tue Feb 17 21:28:12 1998 Gavin Koch - - * mips/mips.h (CAN_ELIMINATE): Don't eliminate the frame - pointer for the stack pointer in MIPS16 and 64BIT. - -Tue Feb 17 21:17:30 1997 J"orn Rennecke - - * rtl.h (force_line_numbers, restore_line_number_status): Declare. - * emit-rtl.c (force_line_numbers, restore_line_number_status): - New functions. - * stmt.c (struct nesting): Replace seenlabel with line_number_status. - (expand_start_case): Adjust to this change. - (check_seenlabel): New function. - (pushcase, pushcase_range, expand_endcase): Use it. - -Tue Feb 17 10:14:32 1998 J"orn Rennecke - - * i386.md (adddi3): Add =!r,0,0,X alternative. - -Mon Feb 16 16:13:43 1998 David Edelsohn - - * rs6000.h (MY_ISCOFF): Add numeric value of U803XTOCMAGIC. - * x-aix31 (INSTALL): Delete. - -Mon Feb 16 09:24:32 1998 Gavin Koch - - * mips/mips.c (mips_expand_epilogue): Update tsize_rtx if - tsize changes to something other than zero. - -Mon Feb 16 09:11:48 1998 Gavin Koch - - * ginclude/va-mips.h: Replace casts of pointers to int with - casts of pointers to __PTRDIFF_TYPE__. - -Mon Feb 16 08:17:14 1998 John Carr - - * loop.c (strength_reduce, record_biv, record_giv): Use - HOST_WIDE_INT_PRINT_DEC to print CONST_INT values. - -1998-02-16 Jason Merrill - - * tree.c (first_rtl_op): New fn. - (unsave_expr_now): Use it. - * print-tree.c (print_node): Likewise. - * tree.c (has_cleanups): New fn. - * fold-const.c (fold, case CLEANUP_POINT_EXPR): Use it. Be more - conservative about pushing the cleanup point down. - * tree.h: Declare them. - -Sun Feb 15 23:28:44 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (flag_schedule_reverse_before_reload): Delete variable. - (flag_schedule_reverse_after_reload): Likewise. - (f_options): Remove reverse scheduling support. - * flags.h (flag_schedule_reverse_before_reload): Delete declaration. - (flag_schedule_reverse_after_reload): Likewise. - * haifa-sched.c (rank_for_schedule): Remove support for reverse - scheduling. - -Sun Feb 15 21:33:55 1998 Kaveh R. Ghazi - - * gcc.c: Get system includes, prototypes and macros via "system.h" - instead of doing it manually. Change all calls of the ctype - macros to custom versions defined in "system.h". - - * system.h: Fix return type of bcmp prototype from `void' to `int'. - Make bcopy, bcmp and bzero prototypes explicitly `extern'. - Add a prototype for getenv. - -Sun Feb 15 17:05:41 1998 Jim Wilson - - * mips/mips.h (INITIAL_ELIMINATION_OFFSET): Readd Jun 6 change. - -Sun Feb 15 15:23:15 1998 John Carr - - * alias.c: Include and . - (init_alias_analysis): Pass NULL_RTX instead of 0 to record_set. - -Sat Feb 14 11:23:09 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Feb 14 05:08:21 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.md (movsfcc): Also validate operands[3] when compiling hard - float. - (movdfcc): Only accept fpu_add_operand for operands[3]. - - * arm/t-semi (STMP_FIXPROTO): Define to nothing. - * arm/t-semiaof (STMP_FIXPROTO): Likewise. - -Sat Feb 14 02:02:41 1998 Jeffrey A Law (law@cygnus.com) - - * varasm.c (output_constant_pool): Bring back 'done' label inside - an appropriate #ifdef. - - * bitmap.c (bitmap_element_allocate): Wrap variable 'i' in an - appropriate #ifdef. - (bitmap_copy, bitmap_operation): Likewise. - * combine.c (combinable_i3pat): Similarly for 'src'. - * function.c (fixup_var_refs_1): Similarly for 'outerdest'. - (locate_and_pad_parm): Similarly for 'reg_parm_stack_space'. - * regclass.c (copy_cost): Similarly for 'secondary_class'. - * reload.c (make_memloc): Similarly for 'i'. - (find_reloads_address_1): Similarly for 'link'. - * reload1.c (reload): Similarly for 'previous_frame_pointer_needed'. - (emit_reload_insns): Similarly for 'second_reloadreg'. - * unroll.c (iteration_info): Similarly for 'v'. - - * caller-save.c (insert_save_restore): Remove unused variable 'i'. - * calls.c (expand_call): Similarly for 'i'. - (emit_library_call, emit_library_call_value): Similarly for 'mode'. - * fold-const.c (strip_compound_expr): Similarly for 'type'. - * function.c (fixup_var_refs_1): Similarly for 'width'. - (fixup_memory_subreg): Similarly for 'saved'. - (locate_and_pad_parm): Similarly for 'boundary_in_bytes.' - (setjmp_protect): Similarly for 'sub'. - (thread_prologue_and_epilogue_insns): Similarly for 'insn'. - * loop.c (record_giv): Similarly for 'p'. - (combine_givs): Similarly for 'temp_iv'. - (indirect_jump_in_function_p): Similarly for 'is_indirect_jump'. - * recog.c (validate_replace_rtx_1): Similarly for 'width'. - * tree.c (get_set_constructor_bytes): Similarly for 'vals'. - * unroll.c (unroll_loop): Similarly for 'copy'. - (iteration_info): Similarly for 'b'. - * varasm.c (assemble_string): Similarly for 'i'. - * i386.h (LEGITIMIZE_ADDRESS): Similarly for 'orig_x'. - -1998-02-13 Martin von Loewis - - * c-lang.c (lang_print_xnode): New function. - * objc/objc-act.c (lang_print_xnode): Likewise. - * print-tree.c (print_node): Call it - -Fri Feb 13 14:38:34 1998 Jim Wilson - - * dwarf2out.c (decl_scope_node): New type. - (decl_scope_table): Change type to use it. - (decl_scope_table_allocated, decl_scope_depth): Change type to int. - (push_decl_scope): Use new type. New locals containing_scope, i. - Add code to handle setting previous field. - (scope_die_for): Change type of local i to int. Add code to use - previous field. - (dwarf2out_init): Use new type. - -1998-02-13 Jason Merrill - - * except.c (emit_throw): Lose throw_used. - -Fri Feb 13 20:36:05 1998 J"orn Rennecke - - * sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn - was deleted. - * haifa-sched.c (update_flow_info, REG_WAS_0): Likewise. - -Fri Feb 13 12:18:40 1998 Jeffrey A Law (law@cygnus.com) - - * genextract.c (main): Fix typo. - -Fri Feb 13 08:41:49 1998 Robert Lipe - - * c-lang.c (finish_file): Bracket declaration of static_ctors, - static_dtors. - - * calls.c (expand_call): Bracket declaration of 'rtx_before_call', - 'old_stack_arg_under_construction' - (emit_library_call): Bracket declaration of 'upper_bound', - 'lower_bound', 'i', 'reg_parm_stack_space' - (emit_library_call_value): Likewise. - (store_one_arg): - - * collect2.c: Include when appropriate. - Bracket declaration of 'exportf' and 'full_real_ld_suffix'. - - * emit-rtl.c (prev_cc0_setter): Remove unused variable 'link'. - - * explow.c (plus_constant_for_output_wide): Remove unused variable - 'code'. - (memory_address): Remove unused variable 'orig_x'. - - * genattrtab.c (make_canonical): Remove unreferenced label 'cond:'. - (write_const_num_delay_slots): Remove unused variable 'i'. - - * genopinit.c (main): Remove unused variables 'dummy', 'insn_ptr'. - (gen_insn): Remove unused variable 'obstack_ptr'. - - * libgcc2.c (__bb_exit_func): Remove unused variables 'ret', - 'j', 'tmp', 'i'. - (__bb_exit_trace_func): Remove unused variable 'e'. - - * optabs.c (expand_binop): Remove unused variables 'lhs', 'rhs', - 'funexp'. - (expand_unop): Remove unused variable 'funexp'. - (expand_complex_abs): Remove unused variable 'funexp'. - (init_optabs): Bracket declaration of 'j'. - (init_complex_libfuncs): Deleted. Dead static function. - - * profile.c (branch_prob): Remove unused variables 'insn', 'dest'. - - * reg-stack.c: Fix typo in proto for 'get_asm_operand_lengths' - (reg_to_stack): 'initialized', 'before_function_beg' - explicitly type as ints instead of defaulting. - (emit_swap_insn): Remove unused variable 'i2'. - (compare_for_stack_reg): Remove unused variable 'src_note'. - - * rtlanal.c (computed_jump_p): Remove unused variable 'computed_jump'. - - * sched.c (actual_hazard): Bracket declaration of 'this_cost'. - - * stmt.c (add_case_node): Add parens for assignment used as truth. - (all_cases_count): Remove unused variable 'count_high'. - (mark_seen_cases): Remove unused variable 'i'. - (check_for_full_enumeration_handling): Remove unused variable 't'. - Bracket declaration of 'all_values', 'l'. - - * tlink.c: Include , , /. - - * varasm.c (assemble_string): Remove unused variable 'i'. - (immed_double_const): Remove unused variable 'in_current_obstack'. - (immed_real_const_1): Likewise. - (output_constant_pool): Remove unreferenced label 'done'. - (output_constant): Remove unused variable 'x'. - - * i386/i386.h (ENCODE_SECTION_INFO): TREE_PUBLIC is an int, not - a string. - - * i386/sco5.h (ASM_OUTPUT_ASCII): Add parens for assignment used - as truth. - -Fri Feb 13 10:21:41 1998 J"orn Rennecke - - * combine.c (can_combine_p): Handle USEs in PARALLELs. - -Fri Feb 13 01:34:14 1998 H.J. Lu (hjl@gnu.org) - - * config/linux.h (LIB_SPEC): Add -lc for -shared if - USE_GNULIBC_1 is not defined. - * config/sparc/linux.h; Likewise. - - * config/sparc/linux64.h (LIB_SPEC): Add -lc for -shared. - - * config/alpha/linux-elf.h (LIB_SPEC): New. Defined if - USE_GNULIBC_1 is not defined. - -Fri Feb 13 01:29:29 1998 Franz Sirl - - * rs6000/sysv4.h (ENDFILE_SPEC): Add missing %(endfile_linux) - for -mcall-linux. - -Fri Feb 13 01:23:46 1998 Kaveh R. Ghazi - - * system.h: New file to get common systems includes and various - definitions and declarations based on autoconf macros. - -Fri Feb 13 00:46:19 1998 Jeffrey A Law (law@cygnus.com) - - * cccp.c (new_include_prefix): Correctly handle -I./. - -Thu Feb 12 20:16:35 1998 Michael Meissner - - * rs6000.md: Replace gen_rtx (CONST_INT,...) with GEN_INT. - -Thu Feb 12 16:45:17 1998 Robert Lipe - - * expr.c (expand_assignment): Correct typo exposed by -Wall. - offset should have been a truth value, not an assignment. - -Thu Feb 12 15:26:50 1998 Jeffrey A Law (law@cygnus.com) - - * cse.c (delete_dead_from_cse): If a libcall produces a constant - result and that result can be substituted into SET_SRC of the - insn with the REG_RETVAL note, then perform the substitution - and delete the libcall. - -Thu Feb 12 14:04:09 1998 Gavin Koch - - * mips.md (trucndihi2,truncdiqi2): Change these to support - mips16. - -Thu Feb 12 11:34:55 1998 Gavin Koch - - * mips/mips.c (movdi_operand): Direct references to symbols - that arn't mips16 consts in mips16 mode arn't valid operands. - - * mips/mips.c (mips_move_2words): Add gprel handling. - -Thu Feb 12 11:18:37 1998 Gavin Koch - - * mips.md (extendsidi2): Allow extension to/from a non-mips16 - register. - -Thu Feb 12 00:04:16 1998 Marc Lehmann - - * i386.c: Conditionally include , , and - . - -Wed Feb 11 11:43:34 1998 Kaveh R. Ghazi - - * Makefile.in (WARN_CFLAGS): New variable. - (bootstrap, bootstrap2, bootstrap3, bootstrap4): Use it. - -1998-02-11 Mark Mitchell - - * config/i386/i386.c (reg_mentioned_in_mem): Don't abort when - falling through default case in switch. - (i386_aligned_p): Likewise. - -Wed Feb 11 12:59:56 1998 Lee Iverson - - * mips/mips.h (mips_abi_string): Correct typo in comment. - -Wed Feb 11 08:29:56 1998 Gavin Koch - - * mips/mips.md (movdi): These PLUS's need to be Pmode. - -Wed Feb 11 01:47:54 1998 Kaveh R. Ghazi - - * Makefile.in (dwarf2out.o, emit-rtl.o, jump.o, cse.o, unroll.o, - reorg.o, regmove.o): Depend on insn-codes.h, it gets included - indirectly via expr.h. - -Wed Feb 11 01:44:13 1998 Richard Henderson - - * stor-layout.c (layout_type): Do upper - lower in the native type, - so as to properly handle negative indices. - -Wed Feb 11 01:35:55 1998 Robert Lipe - - * except.c (start_dynamic_cleanup): Remove unused variable 'dhc'. - (expand_eh_region_start_tree): Remove unused variable 'note'. - (exception_optimize): Remove unused variable 'regions'. - (expand_builtin_eh_stub): Remove unused variable 'temp'. - (copy_eh_entry): Deleted. Dead function. - - * expr.c (move_block_to_reg): Bracket declaration of 'pat' and - 'last' with same #if HAVE_load_multiple as use of it. - (move_block_from_reg): Likewise. - (emit_move_insn_1): Remove unused variable 'insns'. - (store_constructor): Bracket declaration of startb, endb with - #if TARGET_MEMFUNCTIONS. Remove unused variables 'set_word_size' - 'target', and 'xtarget'. - (expand_builtin_setjmp): Remove unused variables 'op0', - 'next_arg_reg', 'old_inhibit_defer_pop'. - (expand_builtin): Remove unused variable 'offset'. - (do_store_flag): Remove unused variables 'pattern', 'jump_pat'. - (emit_queue): Add parens for assignment used as conditional. - (expand_expr): Case TARGET_EXPR: Remove unused variable 'temp'. - -Wed Feb 11 01:30:49 1998 Marc Lehmann - - * i386.c: Added include for recog.h. - (override_options): Removed unused variable p. Initialized regno to - avoid warning. - (order_regs_for_local_alloc): Initialized regno to avoid warning. - (legitimize_address): Likewise for 'other'. - (i386_aligned_reg_p): Added default case with abort (). - (print_operand): Likewise. - (reg_mentioned_in_mem): Likewise. - (ix86_expand_binary_operator): Removed unused variables i & insn. - (ix86_expand_unary_operator): Removed unused variable insn. - (output_fp_cc0_set): Removed unused variable unordered_label. - -Wed Feb 11 01:23:03 1998 John F. Carr - - * i386.c, i386.h, i386.md: Change gen_rtx (X, ...) to gen_rtx_X (...). - Use GEN_INT instead of gen_rtx (CONST_INT). Make printf arguments - and format string match. - -Wed Feb 11 01:17:39 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (life_analysis): Do not consider the stack pointer live at - the end of a function if the function calls alloca. - (mark_used_regs): Similarly. - -1998-02-10 John F Carr - - * config/sparc/sparc.md (movdi_v8plus): Output stx on alternative - 1, fzero on alternative 8. - -Tue Feb 10 09:02:19 1998 Richard Kenner - - * rs6000.c (setup_incoming_varargs): Always set rs6000_sysv_varargs_p. - -Tue Feb 10 03:35:43 1998 J"orn Rennecke - - * reload.c (find_reloads_toplev): Handle arbitrary non-paradoxical - SUBREGs of CONST_INTs. - -Mon Feb 9 17:52:36 1998 John Carr - - * mips.c (print_operand, function_prologue): Make printf format - match argument type. - -Mon Feb 9 02:37:25 1998 Kaveh R. Ghazi - - * alpha.c (alpha_return_addr): Remove unused variable `first'. - (alpha_ra_ever_killed): Remove unused variables `ra' and `i'. - (output_epilog): Remove unused variable `frame_size_from_reg_save'. - -Sun Feb 8 14:56:03 1998 Richard Kenner - - * loop.c (strength_reduce): When placing increment for auto-inc - case, do comparison in loop order. - -Sun Feb 8 13:21:38 1998 John Carr - - * bitmap.c (bitmap_debug_file): HOST_PTR_PRINTF converts a pointer, - not a HOST_WIDE_INT. - - * calls.c (expand_call): Change test of expand_inline_function - return value to stop compiler warning. - - * genattrtab.c (RTL_HASH): Cast pointer to long, not HOST_WIDE_INT. - -Sun Feb 8 12:04:24 1998 Jim Wilson (wilson@cygnus.com) - Jeff Law (law@cygnus.com) - - * regmove.c: Fix various minor formatting problems. - (optimize_reg_copy_1): Stop search at CALL_INSNs if flag_exceptions - is true. Make end of basic block tests consistent through regmove.c. - (optimize_reg_copy_2, optimize_reg_copy_3): Likewise. - (fixup_match_2, fixup_match_1, regmove_optimize): Likewise. - -Sun Feb 8 01:49:18 1998 Kaveh R. Ghazi - - * gansidecl.h: Check for a conflicting macro definition before - attempting to prototype bcopy, bcmp or bzero. - -Sun Feb 8 00:09:59 1998 Jeffrey A Law (law@cygnus.com) - - * expr.c (clear_pending_stack_adjust): Handle case where a function - calls alloca, but the user has specified -fomit-fframe-pointer. - - * function.c (assign_parms): Fix typo in last change. - -Sat Feb 7 23:54:29 1998 Robert Lipe - - * gcc.c: Include /, , , - . - (free_path_suffix): Remove unreferenced static function. - (process_command): Remove unused variable temp. - (default_arg): Remove unused variable i. - (do_spec_1): Add parens for assignment used as truth value. - (main): Likewise. - (validate_all_switches): Likewise. - (main): Remove unused variables i, first_time> - - * c-common.c: Include and /. - - * calls.c (expand_call): Remove unused variables funtree, - n_regs, and tmpmode. - - * dbxout.c, except.c: Include /. - - * explow.c (plus_constant_for_output_wide): Removed unused - variable all_constant. - - * c-decl.c, genattr.c, genattrtab.c, getconfig.c, genemit.c - genextract.c, genflags.c, genopinit.c genoutput.c, genpeep.c, - genrecog.c, global.c, integrate.c , stupid.c : Include - . - - * genextract.c (walk_rtx): Remove unused variable link. - - * genrecog.c (concat): Remove unreferenced static function. - - * prefix.c: Include /, - - * stmt.c: Include . - (expand_asm_operands): Remove unused variable val1. - (expand_return): Remove unused variable block. - (pushcase): Remove unused variables l and n. - (pushcaserange): Likewise. - - * unroll.c (unroll_loop): Remove unused variable temp. - -Sat Feb 7 23:46:09 1998 Greg McGary - - * c-decl.c (pushdecl): Set DECL_ORIGINAL_TYPE once only. - -Sat Feb 7 15:11:28 1998 Kaveh R. Ghazi - - * aclocal.m4 (GCC_FUNC_PRINTF_PTR): New macro to test the printf - functions for whether they support the %p format specifier. - * acconfig.h (HOST_PTR_PRINTF): Insert stub for autoconf. - * configure.in (GCC_FUNC_PRINTF_PTR): Use it. - * configure, config.in: Rebuild. - -Fri Feb 6 14:20:16 1998 Jim Wilson - - * function.c (assign_parms): New variable named_arg, with value - depending on STRICT_ARGUMENT_NAMING. Use instead of ! last_named. - -Fri Feb 6 14:34:28 1998 Gavin Koch - - * mips/t-r3900: New - same as t-ecoff but eliminate - multilibs: mips1 and mips3. - * configure.in (tx39*): Use new mips/t-r3900. - * configure: Rebuild. - * mips/r3900.h (MULTILIB_DEFAULTS): Eliminate mips1. - -1998-02-06 Jason Merrill - - * dwarf2out.c: Add old_args_size. - (dwarf2out_args_size): Use it. - (dwarf2out_begin_prologue): Initialize it. - (dwarf2out_stack_adjust): If !asynchronous_exceptions, save up - pushed args until we see a call. - * final.c (final_scan_insn): Hand CALL_INSNs off to the dwarf2 code - before outputting them. - -1998-02-06 Kriang Lerdsuwanakij - - * cplus-dem.c (demangle_template_template_parm): New function. - (demangle_template): Handle template template parameters. - -1998-02-02 Mark Mitchell - - * calls.c (expand_call): Don't confuse member functions named - realloc, setjmp, and so forth with the standard library - functions of the same names. - -Thu Feb 5 21:59:49 1998 Jeffrey A Law (law@cygnus.com) - - * stmt.c (expand_asm_operands): Correctly identify asm statements - no output operands. - -Thu Feb 5 21:56:06 1998 Mumit Khan - - * c-common.c (decl_attributes): Flag unrecognized attribute - functions as warnings instead of as errors. - -1998-02-05 Marc Lehmann - - * integrate.c (INTEGRATE_THRESHOLD): Inline only small functions - when -Os is specified. - * toplev.c (main): Don't disable flag_inline_functions anymore when - -Os is in effect. - -Fri Feb 6 00:27:36 1998 J"orn Rennecke - - * regmove.c: Update. - * flags.h (flag_regmove): Declare. - * rtl.h (optimize_reg_copy_1, optimize_reg_copy_2): Don't declare. - * local-alloc.c (optimize_reg_copy_1, optimize_reg_copy_2): - Moved into regmove; changed caller. - * toplev.c (rest_of_compilation): Call regmove_optimize also for - expensive_optimizations. - -Thu Feb 5 13:38:42 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Thu Feb 5 01:45:19 1998 J"orn Rennecke - Undo this change (the problem was actually in reload): - Fri Jan 23 23:28:59 1998 J"orn Rennecke - - * sh.md (movqi_i+1): New peephole. - -Tue Feb 3 01:11:12 1998 Jeffrey A Law (law@cygnus.com) - - * jump.c (jump_optimize): Lose calls to modified_in_p they are - not needed anymore due to changes elsewhere in jump.c. - - * jump.c (jump_optimize): Fix first arg to modified_in_p in - previous change. - -Mon Feb 2 19:18:14 1998 Richard Henderson - - * expr.c (expand_builtin_setjmp): Accept two new arguments for - the labels to branch to on first and subsequent executions. Don't - play with __dummy. Rename `setjmp' insn to `builtin_setjmp_setup', - and provide it with the jmp_buf. Use only one of - `builtin_setjmp_receiver' or `nonlocal_goto_receiver', - and provide the former with the target label. - (expand_builtin) [BUILTIN_SETJMP]: Generate a label for use by setjmp. - (expand_builtin) [BUILTIN_LONGJMP]: Split out to ... - (expand_builtin_longjmp): ... here. Recognize a `builtin_longjmp' - insn to replace all of the normal nonlocal_goto code. Don't play - with __dummy. Correct arguments to nonlocal_goto. - * expr.h (expand_builtin_setjmp): Update prototype. - * except.c (start_dynamic_handler): When using builtin_setjmp, - generate more accurate flow information. - - * alpha.md (nonlocal_goto_receiver_osf): Delete. - (nonlocal_goto_receiver_vms): Rename to nonlocal_goto_receiver. - (builtin_longjmp, builtin_setjmp_receiver): New. - * sparc.md (update_return): Disambiguate unspec number. - (nonlocal_goto): Rearrange arguments to match caller in except.c. - (builtin_setjmp_setup): Rename from setjmp. Match and ignore the - jmp_buf operand. - * mips.md (nonlocal_goto_receiver, builtin_setjmp_receiver): Remove. - (builtin_setjmp_setup*, builtin_longjmp): New. - -Mon Feb 2 16:43:10 1998 John Carr - - * mips.md: Change gen_rtx (CONST_INT) to GEN_INT. - -Mon Feb 2 13:06:47 1998 Jim Wilson - - * vmsconfig.com: Remove bytecode references. - -1998-01-30 Andreas Schwab - - * dwarf2out.c (dwarf2out_frame_init): Undo last change, so that - -fno-sjlj-exceptions works for a target that defines - DWARF2_UNWIND_INFO as zero. - - * regmove.c (fixup_match_1): Undo last change which removed some - "useless" code, and add a comment explaining this. - -Mon Feb 2 10:47:14 1998 Gavin Koch (gavin@cygnus.com) - - * mips.c (mips_expand_prologue): Change uses of TARGET_64BIT - to TARGET_LONG64. - -Mon Feb 2 10:38:41 1998 Klaus Kaempf - - * makefile.vms: Remove bytecode references. - Create genrtl files. - -Mon Feb 2 02:08:04 1998 Michael P. Hayes - - * jump.c (jump_optimize): Allow conditional loading of floating point - constants and constants from memory. Reinstalled modified_in_p tests. - -Mon Feb 2 01:38:39 1998 J"orn Rennecke - - * loop.c (get_condition): Handle sign-extended constants. - -Mon Feb 2 01:22:46 1998 Hans-Peter Nilsson - - * expr.c (emit_push_insn): Add code to use movstrti if present. - - * expr.c (emit_push_insn): Use same max-move-amount for movstrhi - and movstrqi as in emit_block_move (). - -Mon Feb 2 00:09:52 1998 Toon Moene - - * config/m68k/x-next: Remove /NextDeveloper/Headers from - the directories to fixinclude - /usr/include is a link - to it and hence its contents are fixed by default. - -Sun Feb 1 14:15:33 1998 Franz Sirl - - * rs6000/linux.h: Define JUMP_TABLES_IN_TEXT_SECTION. - -Sun Feb 1 13:01:15 1998 Klaus Kaempf - - * cccp.c (main): Predefine __VMS_VER on VMS. - -Sun Feb 1 12:39:53 1998 J"orn Rennecke - - * expr.c (get_inner_reference): Use sbitsizetype for type sizes. - * fold-const.c (size_int): Replace with - (size_int_wide). - (make_bit_field_ref): Use bitsize_int for bit position. - * stor-layout.c (sizetype): Delete. - (sizetype_tab, sbitsizetype, ubitsizetype): Declare. - (layout_record, layout_union, layout_type): - Use bitsize_int for bit size. - (set_sizetype): New function. - (make_signed_type, make_unsigned_type): Use it. - * c-decl.c (init_decl_processing): Likewise. - * tree.h (size_int): Don't delcare, #define. - (size_int_wide, sizetype_tab, sbitsize, ubitsize): Declare. - (set_sizetype): Declare. - (bitsize_int, size_int_2, BITS_PER_UNIT_LOG, sizetype, bitsizetype): - Define. - * c-typeck.c (c_sizeof, c_sizeof_nowarn, c_size_in_bytes): - Convert result to sizetype. - (really_start_incremental_init, push_init_level): - Set type of constructor_bit_index to sbitsizetype. - (push_init_level): Use unsigned arithmetic to determine padding. - (output_init_element): Likewise. - -Sun Feb 1 03:32:07 1998 Jeffrey A Law (law@cygnus.com) - - * combine.c (simplify_shift_const): Fix typo in last change. - -Sun Feb 1 02:50:46 1998 John Carr - - * combine.c (simplify_shift_const): (lshiftrt (truncate (lshiftrt))) - is (truncate (lshiftrt)). - -Sun Feb 1 01:06:53 1998 Richard Henderson - - * alpha.c (alpha_expand_unaligned_load): Use expand_binop properly. - Make sure result winds up in TGT. - (alpha_expand_unaligned_store): Use expand_binop properly. Allow - src to be other than DImode. - (alpha_expand_unaligned_load_words): Tidy. Take an offset argument. - (alpha_expand_unaligned_store_words): Likewise. - (alpha_expand_block_move): Use REGNO_POINTER_ALIGN. Restructure so - that source and destination are separately optimized for alignment. - (alpha_expand_block_clear): Use REGNO_POINTER_ALIGN. - -Sun Feb 1 01:55:09 1998 Jeffrey A Law (law@cygnus.com) - - * mips.md (adddi3_internal_2): Be consistent with adddi3 expander - with handling of -32768. - -Sun Feb 1 01:48:18 1998 Kaveh R. Ghazi - - * aclocal.m4 (GCC_NEED_DECLARATION): Modify macro to accept a - shell variable argument instead of only hard coded functions. - (GCC_NEED_DECLARATIONS): New macro to accept multiple functions. - - * configure.in: Collapse multiple calls to AC_CHECK_FUNCS into one - call. Collapse multiple calls to GCC_NEED_DECLARATION into one - call to GCC_NEED_DECLARATIONS (new macro.) Check if we need - declarations for bcopy, bcmp and bzero. - - * acconfig.h: Add stubs for bcopy, bcmp and bzero declarations. - - * gansidecl.h: If we have bcopy but don't declare it, then do so. - Likewise for bcmp and bzero. Only define macros for bcopy, bcmp, - bzero, index and rindex if they aren't already present. - -Sat Jan 31 11:26:58 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (close_dump_file): Wrap function prototype for - argument "func" in PROTO. - (dump_rtl): Likewise. - -Fri Jan 30 22:30:39 1998 John Carr - - * sparc.c (sparc_override_options): Make v8plus and ultrasparc set - MASK_V8PLUS. - (output_function_epilogue): Omit epilogue if nothing drops through. - (output_move_double): Suppress int ldd usage on ultrasparc and v9. - (registers_ok_for_ldd_peep): Likewise. - (print_operand): Suppress b,a on ultrasparc. Let Y accept a constant. - (ultrasparc_adjust_cost): New function. - (sparc_issue_rate): New function. - * sparc.h (MASK_VIS, TARGET_VIS): New. - (MASK_V8PLUS, TARGET_V8PLUS): New. - (TARGET_HARD_MUL32, TARGET_HARD_MUL): New. - (TARGET_SWITCHES): Add vis and v8plus. - (REG_CLASS_FROM_LETTER): Accept d and b for VIS. - (REGISTER_MOVE_COST): FP<->INT move cost 12 for ultrasparc. - (RTX_COSTS): Use TARGET_HARD_MUL. - (ADJUST_COST): Call ultrasparc_adjust_cost. - (ISSUE_RATE): New. - * sparc.md (attr type): Add sload, fpmove, fpcmove. Adjust users - of load & fp appropriately. - (supersparc function units): Adjust for Haifa. - (ultrasparc function units): Likewise. - (get_pc_via_rdpc): All v9, not just arch64. - (movdi_v8plus, movdi_v8plus+1): New. - (adddi3_sp32+1): New. - (subdi3_sp32+1): New. - (movsi_insn, movsf_const_insn, movdf_const_insn): Know VIS. - (addsi3, subsi3, anddi3_sp32, andsi3, and_not_di_sp32): Likewise. - (and_not_si, iordi3_sp32, iorsi3, or_not_di_sp32, or_not_si): Likewise. - (xorsi3_sp32, xorsi3, xor_not_di_sp32, xor_not_si): Likewise. - (one_cmpldi2_sp32, one_cmplsi2): Likewise. - (ldd peepholes): Suppress for v9. - (return_adddi): Kill redundant test. Arg1 may be arith_operand. - (return_subsi): Revmove. - -Fri Jan 30 18:30:03 1998 John F Carr - - * mips.c (save_restore_insns): Set RTX_UNCHANGING_P in register - save/restore MEM rtl. - -Fri Jan 30 09:08:16 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in: Check for declaration of abort. - * acconfig.h: Corresponding changes. - * toplev.c: Use NEED_DECLARATION_ABORT to determine if abort should - be declared. - -Thu Jan 29 20:26:12 1998 Jeffrey A Law (law@cygnus.com) - - * genattrtab.c (optimize): Define in case PRESERVE_DEATH_INFO_REGNO_P - uses it. - -Thu Jan 29 09:27:56 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Thu Jan 29 10:12:27 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in: Check for atoq and atoll. - * rtl.c (read_rtx): Use HAVE_ATOLL and HAVE_ATOQ to select the - proper routine for converting ascii into long long values. - -Thu Jan 29 01:28:14 1998 Klaus Kaempf - - * cccp.c (SYS$SEARCH, SYS$PARSE): Write as upper-case. - - * vmsconfig.com: Remove bytecode references. - - * alpha/vms.h (PREFIX): Define. - - * alpha/vms.h (ASM_OUTPUT_ALIGNED_COMMON): Remove. - - * am-alpha.h: Don't include alloca for OPEN_VMS. - - * alpha/xm-vms.h (HAVE_CPP_STRINGIFY): Define. - - * alpha/xm-vms.h (INCLUDE_DEFAULTS): Define. - (GCC_INCLUDE_DIR): Define. - - * make-cc.com, make-cccp.com, make-cc1.com: Removed. - * makefile.vms: New file. - - * alpha/vms.h (CPP_PREDEFINES): Remove -Dalpha. - - * alpha.c (output_prolog): Output '.name' directive - for minimal traceback information. - - * alpha.c (output_prolog): Don't prepend entry point symbols - with '$' on OPEN_VMS. - -Thu Jan 29 00:25:35 1998 David S. Miller - Jeffrey A Law (law@cygnus.com) - - * rtl.c (read_rtx): Use atol/atoq based upon disposition of - HOST_WIDE_INT. - - * genattrtab.c (write_test_expr): Use HOST_WIDE_INT_PRINT_DEC - as needed. - * genemit.c (gen_exp): Likewise. - * genpeep.c (match_rtx): Likewise. - * genrecog.c (write_tree_1): Likewise. - - * c-lex.c (yyprint): Use proper format string based upon - disposition of HOST_BITS_PER_WIDE_INT. - (yylex): Put casts in right place for args to build_int_2. - -Thu Jan 29 00:24:29 1998 Jeffrey A Law (law@cygnus.com) - - * combine.c: Fix typos in Jan27 changes. - -Thu Jan 29 00:07:49 1998 Ollivier Robert - - * i386/freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends. - (LINK_SPEC): Likewise. - (STARTFILE_SPEC): Likewise. - -1998-01-28 Mike Stump - - * rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after - reload completes. - * genattrtab.c (reload_completed): Define. - - * m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Remove obsolete - comments. - -Wed Jan 28 20:11:06 1998 J"orn Rennecke - - * reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the - SUBREG_REG if the word count is unchanged, also in the input reload - case. Disable non-applicable sanity checks. - -Wed Jan 28 20:08:26 1998 Jeffrey A Law (law@cygnus.com) - - * config/t-svr4 (TARGET_LIBGCC2_CFLAGS): Add -fPIC. - -Wed Jan 28 20:04:43 1998 Ian Lance Taylor - - * i386/t-cygwin32 (LIMITS_H_TEST, LIBGCC2_INCLUDES): Define. - -Wed Jan 28 11:45:27 1998 Per Bothner - - * dbxout.c (dbxout_type): For a RECORD_TYPE, check that TYPE_BINFO - is a TREE_VEC before trying to use it for baseclasses. - (Chill uses the same field for a different purpose.) - - * toplev.c (strip_off_ending): Generalize to endings up to 5 chars. - -Tue Jan 27 23:15:55 1998 Lassi A. Tuura - - * config.sub: More accurate determination of HP processor types. - -Tue Jan 27 23:11:11 1998 Kaveh R. Ghazi - - * c-lex.c: Include and /. Add - prototype for `handle_sysv_pragma', and make it static. Add - parentheses around assignment used as truth value. - - * combine.c (combine_instructions): Protect variable `prev' with - macro HAVE_cc0. - (can_combine_p): Protect variable `link' with AUTO_INC_DEC. - (extract_left_shift): Add parentheses around operand of &. - (merge_outer_ops): Avoid an empty body in an else-statement. - (gen_rtx_combine): Remove unused variable `i'. - - * sparc/gmon-sol2.c: Include . Make return type of - function monstartup `void'. Likewise for internal_mcount. Add - `static void' prototype for moncontrol. Reconcile sprintf format - vs. args. - - * sparc/sparc.c: Include and /. - Make return type of function_arg_slotno explicitly `int'. - (reg_unused_after): Add parentheses around assignment used as - truth value. - (save_regs): Add explicit braces to avoid ambiguous `else'. - (function_arg_slotno): Add parentheses around && within ||. - (function_arg_pass_by_reference): Likewise. - (sparc_flat_output_function_prologue): Reconcile fprintf format - vs. args. - - * svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around - assignment used as truth value. - - * cplus-dem.c: Include . - (demangle_signature): Avoid an empty body in an else-statement. - (do_type): Remove unused variable `lvl'. - - * cppexp.c: Don't have depend on MULTIBYTE_CHARS. - Include /. - (cpp_lex): Remove unused variable `namelen'. - (cpp_lex): Explicitly declare `num_chars' as an int. - - * cpplib.c: Avoid duplicate inclusion of , include - instead. Explicitly declare is_system_include - returning int. - (make_assertion): Remove unused variable `kt'. - (cpp_expand_to_buffer): Hide variable `obuf'. - (output_line_command): Remove unused variables, `line_end', - `line_cmd_buf' and `len'. - (macarg): Remove unused variable `arg_start'. - (special_symbol): Remove unused variable `i'. Add parentheses - around assignment used as truth value. - (do_include): Remove unused variables `pcfname' and `retried', - hide `pcf' and `pcfbuflimit'. - (do_line): Remove unused variable `i'. - (finclude): Hide variable `missing_newline'. - (cpp_handle_options): Remove unused variable `j'. - (read_token_list): Remove unused variable `eofp'. - (cpp_error_with_line): Remove unused variable `i'. - (cpp_warning_with_line): Likewise. - (cpp_pedwarn_with_line): Explicitly declare `column' as int. - (cpp_error_from_errno): Remove unused variable `i'. - - * cse.c (invalidate): Add parentheses around assignment used as - truth value. - (find_best_addr): Move declaration of variable `our_cost' inside - the conditional macro where its used. - (fold_rtx): Avoid an empty body in an if-statement. - (cse_insn): Wrap variables `this_insn_cc0_mode' and - `this_insn_cc0' in macro HAVE_cc0. - - * dwarf2out.c: Include and /. - (ASM_OUTPUT_DWARF_DATA8): Reconcile format vs. args in fprintf's. - (output_uleb128): Likewise. - (output_sleb128): Likewise. - (output_cfi): Likewise. - (output_call_frame_info): Remove unused variables `j', `fde_size' - and `fde_pad'. - (comp_unit_has_inlines): Hide declaration as per rest of file. - (size_of_line_prolog): Correct typo in prototype. - (add_arange): Likewise. - (output_aranges): Likewise. - (add_name_and_src_coords_attributes): Likewise. - (gen_array_type_die): Likewise. - (gen_inlined_subroutine_die): Likewise. - (equate_decl_number_to_die): Remove unused variable `i'. - (print_die): Reconcile format vs. args in fprintf's. - (print_dwarf_line_table): Likewise. - (output_die): Likewise. - (output_line_info): Likewise. - (add_subscript_info): Avoid an empty body in an else-statement. - (gen_subprogram_die): Remove unused variable `fp_loc'. - - * dwarfout.c: Explicitly declare `next_pubname_number' as int. - Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE - macro. Protect `src_coords_attribute' prototype with - DWARF_DECL_COORDINATES macro. Hide `output_entry_point_die' - prototype as in the rest of the file. Likewise for - `output_pointer_type_die' and `output_reference_type_die'. Remove - prototype for `type_of_for_scope'. - (output_unsigned_leb128): Reconcile format vs. args in fprintf. - (type_attribute): Add explicit braces to avoid ambiguous `else'. - - * final.c: Include and /. - (shorten_branches): Protect declaration of tmp_length with - SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros. - (profile_function): Protect declaration of `sval' and `cxt' - variables with appropriate macros. - (final_scan_insn): Likewise for `note' variable. Add explicit - braces to avoid empty body in an if-statement. - (output_asm_insn): Move variable `i' inside macro conditional - where it is used. Add parentheses around assignment used as truth - value. - (asm_fprintf): Likewise, likewise. - - * fix-header.c (main): Remove unused variable `done'. Protect - declaration of `i' with FIXPROTO_IGNORE_LIST. - - * pexecute.c: Include . Prototype `my_strerror'. - - * print-rtl.c (print_inline_rtx): Explicitly declare the parameter - `ind'. - - * profile.c: Include /. - (instrument_arcs): Remove unused variables `note', `inverted', - `zero' and `neg_one'. - (branch_prob): Avoid empty body in an if-statement. - - * regclass.c: Include . - (reg_alternate_class): Explicitly declare parameter `regno'. - - * regmove.c (regmove_optimize): Remove unused variable `p'. Add - parentheses around assignment used as truth value. - (find_matches): Remove unused variables `output_operand' and - `matching_operand'. - (fixup_match_1): Remove statement with no effect: "if (0) ;". - - * scan.c (sstring_append): Explicitly declare `count' as int. - (scan_string): Explicitly declare parameter `init' as int. - - * sched.c: Include . - (BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |. - (rank_for_schedule): Add parentheses around assignment used as - truth value. - (schedule_block): Likewise. - (regno_use_in): Likewise. - (schedule_insns): Remove unused variable `i'. - - * toplev.c: Include and /. - (v_message_with_decl): Remove unused variable `n'. - (botch): Explicitly declare parameter `s' as char *. - (main): Add parentheses around assignment used as truth value. - - * tree.c (make_node): Protect the variable `kind' with the - GATHER_STATISTICS macro. - (real_value_from_int_cst): Move variable `e' inside conditional - macro area where it is used. - (tree_last): Add parentheses around assignment used as truth value. - (build1): Protect the variable `kind' with the GATHER_STATISTICS - macro. - (print_obstack_statistics): Reconcile format vs. args in fprintf. - Protect variables `i', `total_nodes', and `total_bytes' with the - GATHER_STATISTICS macro. - -Tue Jan 27 23:01:55 1998 Mike Stump - - * m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Add - some comments regarding use of dead_or_set_p. - -Tue Jan 27 22:14:48 1998 Todd Vierling - - * fixincludes: Tweak fix for struct exception in math.h - -Tue Jan 27 17:21:09 1998 Gavin Koch (gavin@cygnus.com) - - * mips/mips.c (mips_expand_prologue,mips_expand_epilogue): - Change mode of registers used to add/sub from - hard_frame_pointer_rtx from word_mode to Pmode. - -Tue Jan 27 11:02:04 1998 Nick Clifton - - * v850.h (ASM_OUTPUT_ALIGNED_BSS): Use - asm_output_aligned_bss() instead of asm_output_bss(). - - * toplev.c (rest_of_compilation): Replace references to - stack_reg_dump_file and dbr_sched_dump_file with references to - rtl_dump_file. - -Tue Jan 27 10:22:13 1998 Kamil Iskra - - * tlink.c (scan_linker_output): Call fclose() for opened files. - -Tue Jan 27 05:05:26 1998 Richard Henderson - - * alpha.c (output_epilog [!VMS]): Don't tag global functions if - compiling with -fpic -- we want to be able to override symbols - properly. - (alpha_expand_block_move): Fix thinko in last change. - - * alpha.h (ASM_OUTPUT_MI_THUNK): New define. - * config/alpha/win-nt.h (ASM_OUTPUT_MI_THUNK): New define. - * config/alpha/vms.h (ASM_OUTPUT_MI_THUNK): New undef. - -Tue Jan 27 03:21:23 1998 Richard Henderson - - * alpha.md (abssf, absdf): Revert last change. - -Tue Jan 27 00:26:50 1998 John Carr - - * dwarf2out.c (dwarf2out_frame_init): Test value of DWARF2_UNWIND_INFO. - * mips/sni-svr4.h: Define DWARF2_UNWIND_INFO as 0. - -Tue Jan 27 00:07:02 1998 Jeffrey A Law (law@cygnus.com) - - * emit-rtl.c (gen_lowpart_common): Handle more case where converting - a CONST_INT into SFmode. - -Tue Jan 20 16:01:03 1998 Anthony Green - - * flags.h: New flag (optimize_size). - * toplev.c (main): Parse -Os option and set optimize_space - accordingly. - * gcc.c (default_compilers), cp/lang-specs.h, f/lang-specs.h: Define - __OPTIMIZE_SIZE__ when compiling with -Os. - * config/dsp16xx/dsp16xx.h, config/i386/i386.h, - config/i386/dgux.h, config/i960/i960.h, config/pdp11/pdp11.h, - config/v850/v850.h (OPTIMIZATION_OPTIONS): New SIZE argument - to macro. - * config/i386/i386.c (optimization_options): Accept new SIZE argument. - -Mon Jan 26 23:57:39 1998 Manfred Hollstein - - * libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl - stuff only if MCT_TEXT is #define'd. - -Mon Jan 26 23:52:51 1998 Markus F.X.J. Oberhumer - - * configure.in (i*86-pc-msdosdjgpp): Treat like msdos & go32 - configurations. - -Fri Jan 23 09:39:36 1998 Nick Clifton - - * toplev.c: Add -dM command line option to dump RTL after the - machine dependent reorganization pass, if there is one. - Reorganize RTL dump code, so that only one file handle is - needed. - -Mon Jan 26 12:09:42 1998 Benjamin Kosnik - - * except.c (check_exception_handler_labels): Disable warning when - flag_syntax_only. - -Mon Jan 26 18:17:32 1998 Jim Wilson - - * sparc.c (pic_setup_code): Don't set LABEL_PRESERVE_P. - -Mon Jan 26 18:11:30 1998 J"orn Rennecke - - * c-decl.c (grokdeclarator): Get parameter tags from - last_function_parm_tags. - * dwarfout.c (output_formal_types): Set TREE_ASM_WRITTEN before - traversing the parameter types. - (output_type): No early exit for FUNCTION_TYPE / METHOD_TYPE context. - -Mon Jan 26 01:44:12 1998 Jeffrey A Law (law@cygnus.com) - - * h8300.c (print_operand): Handle CONST_DOUBLE for 'e', 'f', and - the default case. - (get_shift_alg): Fix typo. - -Sun Jan 25 22:22:04 1998 Richard Henderson - - * alpha.c (alpha_expand_block_move): Copy ADDRESSOF to reg. - -Sun Jan 25 22:14:28 1998 Richard Henderson - - * toplev.c (get_run_time): Make sure each case gets its variables. - -Sun Jan 25 22:10:21 1998 Richard Henderson - - * configure.in (build_xm_file): Add auto-config.h if host=build. - (host_xm_file_list): Don't add $(srcdir) to auto-config.h. - (build_xm_file_list): Likewise. - * configure: Rebuild. - -Sun Jan 25 22:00:25 1998 Alasdair Baird - - * recog.c (validate_replace_rtx_1): Only perform substitutions - of arguments to commutative and comparison operators once. - -Sun Jan 25 12:30:18 1998 Kaveh R. Ghazi - - * sparc.c (output_cbranch): Add default case in - enumeration switch. - - * reorg.c (insn_sets_resource_p): Correct typo in prototype. - (emit_delay_sequence): Eliminate unused parameter, all callers - changed. - (fill_simple_delay_slots): Likewise. - (fill_slots_from_thread): Likewise. - (fill_eager_delay_slots): Likewise. - (mark_referenced_resources): Add default case in enumeration switch. - (mark_set_resources): Likewise. - (rare_destination): Likewise. - (mostly_true_jump): Likewise. - (find_dead_or_set_registers): Likewise. - (redirect_with_delay_slots_safe_p): Remove unused variable `slots'. - (update_reg_unused_notes): Remove unused variable `p'. - (mark_target_live_regs): Remove unused variables `next' and - `jump_count'. - (fill_simple_delay_slots): Remove unused variable `j'. - (fill_slots_from_thread): Add parentheses around assignment used - as truth value. - (dbr_schedule): Likewise. - - * objc/Make-lang.in (objc.stage1): Depend on stage1-start. - (objc.stage2, objc.stage3, objc.stage4): Likewise. - -Sun Jan 25 12:13:47 1998 Michael Tiemann - - * cse.c (simplify_ternary_operation): Don't try to simplify - IF_THEN_ELSE expressions (created by combine) that don't use - relational operators. - -Fri Jan 23 22:48:24 1998 Jeffrey A Law (law@cygnus.com) - - * cse.c (simplify_ternary_operation): Handle more IF_THEN_ELSE - simplifications. - - * crtstuff.c (init_dummy): Keep the epilogue in the init - section for non-ELF systems. - -Fri Jan 23 23:28:59 1998 J"orn Rennecke - - * sh.md (movqi_i+1): New peephole. - -Fri Jan 23 15:39:42 1998 Jim Wilson - - * Makefile.in: Remove remaining bytecode stuff. - * emit-rtl.c, expr.c: Likewise. - -Fri Jan 23 12:41:10 1998 Nick Clifton (nickc@cygnus.com) - - * toplev.c (lang_options): Add unknown-pragma options. - -Thu Jan 22 23:43:38 1998 Per Bothner - - * dwarfout.c (byte_size_attribute): Simplify and fix - don't need - special (and incomplete) handling for Chill arrays. - -Fri Jan 23 00:27:23 1998 John Carr - - * toplev.c (get_run_time): Call sysconf(_SC_CLK_TCK), when available, - to get clock rate. - -Fri Jan 23 00:19:36 1998 Gavin Koch (gavin@cygnus.com) - - * mips.md (muldi3_internal2): Reverse test for TARGET_MIPS16. - -1998-01-22 scott snyder - - * mips.c (function_prologue): Use HARD_FRAME_POINTER_REGNUM in - .frame directive instead of FRAME_POINTER_REGNUM. - -Fri Jan 23 00:08:55 1998 Robin Kirkham - - * m68k.h (TARGET_SWITCHES): -mcpu32 now clears MASK_68881. - (MACHINE_STATE_m68010_up): Replaced __mc68332__ with __mcpu32__. - * m68k/m68k-none.h(CPP_FPU_SPEC): Update relative to TARGET_SWITCHES. - (CPP_SPEC, ASM_SPEC, CC1_SPEC): Likewise. - (CPP_SPEC): -m68332 defines both __mc68332 and __mcpu32__. - * m68k/t-m68kbare (MULTILIB_OPTIONS): Add mcpu32. - (MULTILIB_MATCHES): -m68332 now uses mcpu32 libraries, not m68000. - (MULTILIB_EXCEPTIONS): Don't build 68881 libraries for m68000, - mcpu32 or m5200. - * longlong.h: Replace __mc68332__ with __mcpu32__. - -Thu Jan 22 19:55:40 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Thu Jan 22 14:47:31 1998 Jim Wilson - - * reload.c (push_reload): In WORD_REGISTER_OPERATIONS code, add test - to require the SUBREG mode to be smaller than the SUBREG_REG mode. - * reload1.c (eliminate_regs): Likewise. - -Thu Jan 22 14:49:14 1998 Jeffrey A Law (law@cygnus.com) - - * regmove.c (find_matches): Initialize matches->earlyclobber too. - -Thu Jan 22 01:40:52 1998 Richard Henderson - - * alpha.md (abssf2, absdf2): Disable in IEEE mode. - (negsf2, negdf2): Use proper subtract in IEEE mode. - -Tue Jan 20 09:29:09 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in: Remove more bytecode stuff. - * expr.c, stmt.c, config/msdos/top.sed: Likewise. - * vax/xm-vms.h, winnt/config-nt.sed: Likewise. - * f/install.texi, objc/Make-lang.in: Likewise. - - * Makefile.in: Remove all bytecode support. - (OBJS): Make sure last entry is a real object file, not EXTRA_OBJS. - * emit-rtl.c: Remove all bytecode support. - * expr.c, expr.h function.c, integrate.c: Likewise. - * output.h, regclass.c, rtl.h, stmt.c, toplev.c: Likewise. - * tree.h, varasm.c: Likewise. - * config/m68k/m68k.h: Likewise. - * bi-*, bc-*, bytecode*: Delete bytecode related files. - * modemap.def: Likewise. - -Tue Jan 20 09:02:31 1998 Gavin Koch (gavin@cygnus.com) - - * mips/mips.md (divsi3,divdi3,modsi3,moddi3,udivsi3,udivdi3, - umodsi3,umoddi3): Handle mips16 div/mod by a constant. - -Mon Jan 19 21:57:00 1998 Richard Henderson - - * i386.md (push): Prohibit symbolic constants if flag_pic. - (movsi+1): Likewise for move to non-register. - -Mon Jan 19 11:15:38 1998 Jim Wilson - - * alpha.c (mode_mask_operand): Accept 0xffffffff on 32 bit host. - (print_operand): Handle 0xffffffff on 32 bit host. - - * configure.in (thread_file): Rename uses before main loop to - target_thread_file. Initialize to empty in main loop. Set thread_file - to target_thread_file after main loop if not set. - * configure: Rebuild. - - * genattrtab.c (find_and_mark_used_attributes): Handle CONST_INT. - (add_values_to_cover): Revert last change (which had no ChangeLog - entry). - (simplify_with_current_value_aux): Handle CONST_INT. - -Mon Jan 19 10:14:55 1998 Andreas Schwab - - * unprotoize.c: Define UNPROTOIZE first, to actually take effect. - -Mon Jan 19 10:11:52 1998 Richard Henderson - - * configure.in: Add cpp stringify test. - * acconfig.h (HAVE_CPP_STRINGIFY): New tag. - * gengenrtl.c: Use it. - * configure, config.in: Rebuild. - -Mon Jan 19 09:43:15 1998 Andreas Schwab - - * Makefile.in (genrtl.c genrtl.h): Add dummy command for GNU make. - -Mon Jan 19 09:38:18 1998 Richard Henderson - - * configure.in: Find declaration for sbrk. - * acconfig.h (NEED_DECLARATION_SBRK): New tag. - * config.in, configure: Rebuild. - * mips-tfile.c: Properly protect declaration of sbrk and free. - * toplev.c: Properly protect declaration of sbrk. - -Sun Jan 18 20:18:01 1998 Richard Henderson - - * alpha.c (alpha_handle_trap_shadows): Ignore CLOBBERs. - -Sun Jan 18 01:54:27 1998 Jeffrey A Law (law@cygnus.com) - - * alpha/xm-winnt.h (HAS_INIT_SECTION): Undefine. - -Sun Jan 18 00:57:35 1998 Mike Stump - - * configure.in (i960-wrs-vxworks): Default to latest vxworks release. - -Sat Jan 17 23:41:36 1998 David S. Miller - - * combine.c (force_to_mode, nonzero_bits): Correctly optimize - constant offset computations from objects with known alignment in - the presence of STACK_BIAS. - - * varasm.c (immed_double_const): Add casts to HOST_WIDE_INT where - necessary. - (const_hash): Hash val is unsigned long. - (SYMHASH): Likewise. - - * tree.c (TYPE_HASH): Type of hash val is unsigned long. - - * print-tree.c (print_node_brief): HOST_PTR_PRINTF format wants a - char pointer, not HOST_WIDE_INT. - (print_node): Likewise. Also hash is unsigned long not - HOST_WIDE_INT. - - * cse.c (canon_hash): Hash is unsigned long not HOST_WIDE_INT. - - * explow.c (optimize_save_area_alloca): New function for targets - where SETJMP_VIA_SAVE_AREA is true. - (allocate_dynamic_stack_space): On SETJMP_VIA_SAVE_AREA targets, - compute the amount of stack space needed should we find later that - setjmp is never called by this function, stuff rtl for this inside - a REG_NOTE of the final SET of stack_pointer_rtx. - * toplev.c (rest_of_compilation): If SETJMP_VIA_SAVE_AREA and - current_function_calls_alloca, call optimize_save_area_alloca. - -Sat Jan 17 23:22:59 1998 John Wehle (john@feith.com) - - * i386.md: Remove redundant integer push patterns. - Don't bother checking for TARGET_PUSH_MEMORY when - pushing constants or registers. - -Sat Jan 17 22:35:39 1998 Mumit Khan - J.J VanderHeijden - - * pexecute.c (pexecute): New function for mingw32. Supports pipes. - (pwait): New function for mingw32. - - * gcc.c (execute): Mingw32 pexecute() supports pipes, but cygwin32 - pipe support is broken for now. - -1998-01-17 Lee Iverson - - * emit_rtl.c (init_emit_once): Ensure that potential aliasing - between frame_pointer_rtx, hard_frame_pointer_rtx, and - arg_pointer_rtx is respected in initialization. - (init_emit_once): Use gen_rtx_raw_REG() to create - return_address_pointer_rtx. - - * reorg.c: #include "expr.h" for rtx prototypes. - * Makefile.in (reorg.o): Depend on expr.h - -Sat Jan 17 21:28:08 1998 Pieter Nagel - - * Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and - local_prefix to sub-make invocations. - -Sat Jan 17 21:24:16 1998 David T. McWherter - - * objc-parse.c: Recognize protocol qualifiers in class definitions. - -Sat Jan 17 21:16:19 1998 Jeffrey A Law (law@cygnus.com) - - * rtl.h: Fix typos. - - * acconfig.h (NEED_DECLARATION_ATOL): New declaration to check for. - * configure.in: Check for atol. - * rtl.c (atol): Only provide the declaration if NEED_DECLARATION_ATOL. - - * rtl.c (read_rtx): Initialize list_rtx to NULL, not NULL_RTX. - - * loop.c (find_and_verify_loops): When attempting to move insns from - inside the loop outside the loop, create a BARRIER if no suitable - one was found. - - * jump.c (jump_optimize): Remove Dec 17, 1997 chance in - favor of an equivalent change from gcc-2.8. - - * i386/x-sco5 (CC): Remove trailing whitespace. - -Sat Jan 17 21:09:46 1998 Kaveh R. Ghazi - - * gengenrtl.c (type_from_format): De-ANSIfy function signature. - (accessor_from_format): Likewise. - (xmalloc): New function for use when linking with alloca.o. - -Mon Jan 5 02:53:01 1998 Bruno Haible - - * frame.c (find_fde): Correct FDE's upper bound. - -Fri Jan 16 16:23:52 1998 Richard Henderson - - * gengenrtl.c (DEF_RTL_EXPR): Provide a K&R compliant version. - -Fri Jan 16 10:16:10 1998 Jeffrey A Law (law@cygnus.com) - - * calls.c (expand_call): Move #ifdef code out of macro argument - lists. - (emit_library_call, emit_library_call_value): Likewise. - -Fri Jan 16 00:46:40 1998 Jeffrey A Law (law@cygnus.com) - - * rtl.def (INLINE_HEADER): Fix bug exposed by gen_rtx_FOO changes. - -Thu Jan 15 01:02:30 1998 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Wed Jan 14 22:49:17 1998 Richard Henderson - - * alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO; - change gen_rtx(expr...) to gen_rtx_fmt_foo(expr...). - * caller-save.c, calls.c, combine.c, cse.c: Likewise. - * dwarf2out.c, except.c, explow.c, expmed.c, expr.c: Likewise. - * final.c, flow.c, function.c, genpeep.c, haifa-sched.c: Likewise. - * halfpic.c, integrate.c, jump.c, local-alloc.c, loop.c: Likewise. - * profile.c, recog.c, reg-stack.c, regclass.c, regmove.c: Likewise. - * reload.c, reload1.c, reorg.c, sched.c, stmt.c, stupid.c: Likewise. - * unroll.c, varasm.c: Likewise. - * config/alpha/alpha.c, config/alpha/alpha.md: Likewise. - -Wed Jan 14 19:36:08 1998 Gavin Koch (gavin@cygnus.com) - - * mips.h: Fix some type-o's from a previous change. - -Wed Jan 14 01:26:05 1998 Jeffrey A Law (law@cygnus.com) - - * loop.c (check_dbra_loop): Make sure initial value is a - CONST_INT before trying to normalize it. - -Tue Jan 13 23:27:54 1998 Robert Lipe (robertl@dgii.com) - - * sco5.h (ASM_OUTPUT_SECTION_NAME): Refresh from ../svr4.h. - -Tue Jan 13 22:47:02 1998 Herman ten Brugge - - * cppexp.c: Include gansidecl.h - -Tue Jan 13 22:43:35 1998 Ian Lance Taylor - - * svr4.h (LINK_SPEC): Never specify -h. - * ptx4.h (LINK_SPEC): Likewise. - * rs6000/sysv4.h (LINK_SPEC): Likewise. - * sparc/sol2.h (LINK_SPEC): Likewise. - -Tue Jan 13 22:39:40 1998 Richard Henderson (rth@cygnus.com) - - * c-typeck.c (comptypes): Exit early on NULL input. - - * haifa-sched.c (schedule_insns): Correctly remove inter-block - dependencies after reload. - -Tue Jan 13 22:22:31 1998 Franz Sirl - - * rs6000/linux.h (CPP_PREDEFINES): Add -D__ELF__. - -Tue Jan 13 22:14:57 1998 Klaus Kaempf - - * alpha/vms.h (DIR_SEPARATOR): Define. - -Tue Jan 13 22:13:04 1998 Bruno Haible - - * Makefile.in (stamp-proto): Remove. - (protoize.o, unprotoize.o): Straightforward compile. - * unprotoize.c: Define UNPROTOIZE here, not in the Makefile. - -Tue Jan 13 21:59:39 1998 Mumit Khan - - * i386/cygwin32.h (STRIP_NAME_ENCODING): Define for Win32 to strip - off the trailing @[NUM] added by ENCODE_SECTION_INFO. - -Tue Jan 13 21:55:06 1998 Jeffrey A Law (law@cygnus.com) - - * arm/netbsd.h (DWARF2_UNWIND_INFO): Define as zero for now. - * i386/netbsd.h, m68k/netbsd.h, ns32k/netbsd.h: Likewise. - * sparc/netbsd.h, vax/netbsd.h: Likewise. - -Tue Jan 13 21:37:07 1998 Shigeya Suzuki - - * i386/bsd386.h (DWARF2_UNWIND_INFO): Define as zero for now. - -Tue Jan 13 17:50:55 1998 Jim Wilson - - * configure.in (target_cpu_default, target_cpu_default2): Use double - quotes around them when testing their value. - * configure: Rebuilt. - -Tue Jan 13 09:07:44 1998 John Carr - - * gengenrtl.c (gencode): Emit new function obstack_alloc_rtx - to allocate rtx. - (gendef): Call obstack_alloc_rtx. - -Tue Jan 13 01:16:36 1998 Robert Lipe (robertl@dgii.com) - - * configure.in (i[3456]86-UnixWare7-sysv5): Treat much like SVR4 - for now. - -Thu Dec 18 18:40:17 1997 Mumit Khan - - * i386/mingw32.h (INCOMING_RETURN_ADDR_RTX): Delete. Use the value - of DWARF2_UNWIND_INFO, if any, from i386/cygwin32.h instead. - (STANDARD_INCLUDE_DIR): Change to /usr/local/i386-mingw32/include. - -Tue Jan 13 00:44:02 1998 Jim Wilson - - * mips.md (return_internal): Change mode from SImode to VOIDmode. - -Sat Jan 10 22:11:39 1998 J. Kean Johnston - - * i386/sco5.h (STARTFILE_SPEC, ENDFILE_SPEC): Correctly handle - "-static". - -Sat Jan 10 22:04:15 1998 Stan Cox - - * i386.md (movsicc_1, movhicc_1): For alternate 3 set the opcode - suffix from operand 3. - -Sat Jan 10 21:50:16 1998 J"orn Rennecke - Jeffrey A Law (law@cygnus.com) - - * regmove.c: New implementation of regmove pass. - * local-alloc.c (optimize_reg_copy_1, optimize_reg_copy_2): Remove - decls, make them have external linkage. Return a value from - optimize_reg_copy_1. - * reload.h (count_occurrences): Add decl. - * reload1.c (count_occurrences): Delete decl, make it have external - linkage. - * rtl.h (optimize_reg_copy_1, optimize_reg_copy_2): Declare. - -Sat Jan 10 20:30:12 1998 Jeffrey A Law (law@cygnus.com) - - * regclass.c (record_address_regs): Don't use REG_OK_FOR_BASE_P - if it is not defined. - -Thu Jan 8 21:06:54 1998 Richard Henderson - - * Makefile.in (OBJ, GEN, RTL_H): Add genrtl.[oh] bits. - * emit-rtl.c (gen_rtx): Move special code to ... - (gen_rtx_CONST_INT): New function. - (gen_rtx_REG): New function. - (*): Update all calls to gen_rtx. - * genemit.c (gen_exp): Emit calls to gen_rtx_FOO for constant FOO. - * rtl.h: Include genrtl.h; prototype CONST_INT & REG generators. - (GEN_INT): Call gen_rtx_CONST_INT. - * gengenrtl.c: New file. - -Mon Jan 5 13:00:18 1998 John F. Carr - - * alias.c (*_dependence): Call base_alias_check before canon_rtx. - (base_alias_check): If no base found for address call canon_rtx and - try again. - -Mon Jan 5 11:39:49 1998 Jeffrey A Law (law@cygnus.com) - - * mips.c (mips_expand_prologue): Handle large frame with no outgoing - arguments for mips16. - (mips_expand_epilogue): Pass "orig_tsize" to save_restore_insns. - Don't lose if tsize is zero after handling large stack for mips16. - * mips.md (return): For trivial return, return address is in $31. - -Sun Jan 4 20:24:00 1998 Nigel Stephens - - * mips/mips16.S: Various changes to make it work with -msingle-float - and -EL. - -Sun Jan 4 14:25:18 1998 Gavin Koch - Ian Lance Taylor - Jeff Law - - * mips.c, mips.h, mips.md: First cut at merging in mips16 - support. Major modifications throughout all three files. - -Sun Jan 4 01:01:50 1998 scott snyder - - * configure.in: Make gthr-default.h a forwarding header instead of - a symlink. - -Sat Jan 3 12:08:06 1998 Kaveh R. Ghazi - - * gcov-io.h: Include sys/types.h to ensure we get size_t. - - * pa.h (ASM_OUTPUT_MI_THUNK): Add missing % in fprintf. - -Fri Jan 2 23:40:09 1998 Jim Wilson (wilson@cygnus.com) - Jeffrey A Law (law@cygnus.com) - - * crtstuff.c (__frame_dummy): New function for irix6. - (__do_global_ctors): Call __frame_dummy for irix6. - * iris6.h (LINK_SPEC): Hide __frame_dummy too. - -Fri Jan 2 04:57:57 1998 Weiwen Liu - - * alpha.c (vms_valid_decl_attribute_p): Move within #if OPEN_VMS. - -Fri Jan 2 04:34:14 1998 Richard Henderson - - * c-decl.c (init_decl_processing): Provide proper fallback symbol - for __builtin_memset. - * expr.c (expand_builtin) [MEMSET]: Arg 3 type code is INTEGER_TYPE - not INTEGER_CST. Assert arg 3 is a constant. - - * alpha.c (mode_width_operand): Accept 64-bit modes. - (mode_mask_operand): Likewise. - (print_operand): Likewise for 'M' and 'U' codes. - (alpha_expand_unaligned_load): New function. - (alpha_expand_unaligned_store): Likewise. - (alpha_expand_unaligned_load_words): Likewise. - (alpha_expand_unaligned_store_words): Likewise. - (alpha_expand_block_move): Likewise. - (alpha_expand_block_clear): Likewise. - * alpha.h (MOVE_RATIO): New define. - * alpha.md (extxl, ext*h, ins*l, mskxl): Name them. - (insql, insxh, mskxh, extv, extzv, insv, movstrqi, clrstrqi): New. - - * alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Set to 3. - (CONSTANT_ALIGNMENT, DATA_ALIGNMENT): Disable. - -Thu Jan 1 15:40:15 1998 Richard Henderson - - * configure.in: Put parenthesis around TARGET_CPU_DEFAULT's value. - * configure: Update. - -Thu Jan 1 10:49:12 1998 Jeffrey A Law (law@cygnus.com) - - * emit-rtl.c (operand_subword): Correctly handle extracting a word - from a CONST_DOUBLE for 16bit targets with !WORDS_BIG_ENDIAN. - - * mn10200.md (tstxx, cmpxx): Use "nonimmediate_operand" as predicate - for first argument. - -Wed Dec 31 14:42:18 1997 Ian Lance Taylor - - * configure.in: Set and substitute host_exeext. Use it when creating - the assembler and linker symlinks. - * configure: Rebuild. - * Makefile.in (exeext): Set to @host_exeext@. - (build_exeext): New variable, set to @build_exeext@. - (FLAGS_TO_PASS): Pass down build_exeext. - (STAGESTUFF): Use build_exeext, not exeext, for gen* and bi* - programs. - -Wed Dec 31 10:05:44 1997 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (addsi3, subsi3): Fix thinkos. - -Tue Dec 30 00:04:49 1997 Richard Henderson - - * sparc.h (ASM_OUTPUT_MI_THUNK): Move %o7 through %g1 instead of - save+restore. Fix pic+big_offset delay slot. Use "pic" case for - unix always, since we want to be able to thunk to functions in a - shared library from an application. - -Mon Dec 29 14:37:31 1997 Ian Lance Taylor - - * mips/t-ecoff (CROSS_LIBGCC1): Define to libgcc1-asm.a. - (LIB1ASMSRC, LIB1ASMFUNCS): Define. - -Mon Dec 29 14:03:38 1997 Jeffrey A Law (law@cygnus.com) - - * expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF, if the - offset's mode is not ptr_mode, convert it. - -Mon Dec 29 15:58:18 1997 Michael Meissner - - * libgcc2.c (inhibit_libc): Don't define inhibit_libc when cross - compiling if it was already defined. - -Sun Dec 28 00:32:16 1997 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_basic_blocks): Don't create a new basic block - for calls in a LIBCALL block. - -Sun Dec 28 00:30:24 1997 David Edelsohn - - * config/fp-bit.c (L_df_to_sf): Fix typo in last change. - -Sat Dec 27 22:43:12 1997 Jeffrey A Law (law@cygnus.com) - - * cse.c (rtx_cost): Remove conflicting default case. - -Sat Dec 27 21:20:02 1997 Richard Henderson - - * configure.in: Move default enabling of Haifa out of for loop. - * configure: Rebuild. - -Thu Dec 25 01:02:54 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -1997-12-25 Teemu Torma - - * Makefile.in (GTHREAD_FLAGS): New var. - (LIBGCC2_CFLAGS): Added $(GTHREAD_FLAGS). - (distclean): Remove gthr-default.h. - - * configure.in: Accept dce as a thread package. - Check for thread.h and pthread.h. - Link gthr-default.h to appropriate thread file and set - gthread_flags. - (hppa1.1-*-hpux10*): If --enable-threads, use dce threads and - include multilib definitions from pa/t-dce-thr. - (sparc-*-solaris2*): Enable threads by default, if thread.h or - pthread.h is found, preferring posix threads over solaris ones. - - * config/pa/t-dce-thr: New file. - * config/pa/t-pa: Removed multilibs. - * config/sparc/t-sol2: Likewise. - - * gthr.h: New file. - * gthr-single.h: New file. - * gthr-posix.h: New file. - * gthr-solaris.h: New file. - * gthr-dce.h: New file. - * libgcc-thr.h: Removed. - * objc/thr-dce.c: New file copied from thr-decosf1.c. - - * frame.c: Include gthr.h instead of libgcc-thr.h. - * libgcc2.c: Include gthr.h instead of libgcc-thr.h. - (eh_context_initialize): If __gthread_once fails, use static eh - context. - (eh_context_free): Call __gthread_key_dtor. - -Wed Dec 24 23:33:17 1997 Jeffrey A Law (law@cygnus.com) - - * expr.h (MUST_PASS_IN_STACK): Allow target port to override. - -Wed Dec 24 23:12:14 1997 Jim Wilson - - * cse.c (max_insn_uid): New variable. - (cse_around_loop): Use max_insn_uid. - (cse_main): Set max_insn_uid. - - * abi64.h (LONG_MAX_SPEC): Check MIPS_ABI_DEFAULT and TARGET_DEFAULT, - and define __LONG_MAX__ appropriately. Add support for -mabi=X, - -mlong64, and -mgp{32,64} options. - * mips.c (mips_abi): Change type to int. - * mips.h (enum mips_abi_type): Delete. - (ABI_32, ABI_N32, ABI_64, ABI_EABI): Define as constants. - (mips_abi): Change type to int. - -Wed Dec 24 22:38:34 1997 John Carr - - * flags.h, toplev.c, calls.c, alias.c: Remove flag_alias_check; - optimization is now always enabled. - - * calls.c (expand_call): Recognize C++ operator new as malloc-like - function. - - * alias.c (memrefs_conflict_p): Eliminate tests now done by - base_alias_check. - (*_dependence): Call canon_rtx before base_alias_check. - (init_alias_once): New function to precompute set of registers which - can hold Pmode function arguments. - - * rtl.h: Declare init_alias_once. - - * toplev.c (compile_file): Call init_alias_once. - -Wed Dec 24 22:34:55 1997 Jeffrey A Law (law@cygnus.com) - - * tree.c (restore_tree_status): Do not dereference a null pointer. - -Tue Dec 23 12:56:46 1997 Paul Eggert - - * genattrtab.c (main): Check HAVE_{G,S}ETRLIMIT in addition to - RLIMIT_STACK. This maintains consistency with the recent, similar - patch to cccp.c and toplev.c. - -Tue Dec 23 05:17:28 1997 Richard Henderson - - * genattrtab.c (expand_units): For large nr opclasses, expand - function_units_used with ORX to prevent blowups. Tag with FFS. - (num_unit_opclasses): New variable. - (gen_unit): Update it. - (enum operator): Add ORX_OP. - (operate_exp): Treat ORX as or, except don't expand across an if. - Reuse number rtx's after operating on them. - (check_attr_value): Accept IOR, AND, & FFS. - (write_test_expr): Transmute `in_comparison' to `flags'. Allow - for attribute value caching. Handle CONST_STRING, IF_THEN_ELSE. - (write_expr_attr_cache, write_toplevel_expr): New functions. - (write_attr_get): Handle FFS-tagged expressions. - (make_canonical): Don't expand const attributes. - (convert_const_symbol_ref): Dike out. - (evaluate_eq_attr): Handle SYMBOL_REF. - (main): Don't emit get_attr_foo for const attributes. - - * alpha.c (override_options): Reinstate PROCESSOR_EV6. - (alpha_adjust_cost): Add EV6 tuning; streamline EV5 tests. - * alpha.h (REGISTER_MOVE_COST): Increase ftoi/itof cost slightly. - * alpha.md: Redo all of the scheduling, adding EV6 support, and - combining function units where possible. - (attr "type"): Split loads, stores, cmov into int/fp. Combine - multiplies and divides. Add EV6 sqrt, ftoi, itof. - (attr "opsize"): New attribute. - (sqrtsf2-1, sqrtdf2-1): Provide proper TP_INSN patterns. - (movsf2-[12], movdf2-[12]): Provide CIX varients; don't allow CIX - to control register allocation. - (movsi2-1, movdi2-1): Likewise. - -Tue Dec 23 03:53:21 1997 Richard Henderson - - * alpha.h (CPP_PREDEFINES, LIB_SPEC, LINK_SPEC, STARTFILE_SPEC, - MD_STARTFILE_PREFIX, ASM_FILE_START, ASM_SPEC, ASM_FINAL_SPEC): - Move OSF/1 specific defines out. - * alpha/elf.h (TARGET_VERSION, CPP_PREDEFINES, DEFAULT_VTABLE_THUNKS): - Move Linux specific defines out. - (LINK_SPEC): Genericize. - (ASM_FILE_START): Emit .arch if using more than the base insn set. - (ASM_OUTPUT_SOURCE_LINE): Remove; identical to alpha.h version. - (SDB_DEBUGGING_INFO): Remove; gas can't handle it. - (HANDLE_SYSV_PRAGMA): Define. - * alpha/osf.h: New file. - * alpha/linux.h: Split. Retain file-format independent defines. - Import Linux bits from elf.h. - (CPP_PREDEFINES): Take a file-format specific SUB_CPP_PREDEFINES. - (FUNCTION_PROFILER): _mcount takes its address in $28. - (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Remove undef. - * alpha/linux-ecoff.h: New file. - * alpha/linux-elf.h: New file. - * alpha/vms.h (LIB_SPEC, LINK_SPEC): Copy from osf.h. - * alpha/win-nt.h (TARGET_DEFAULT): Define. - * configure.in (alpha*-*-osf*, alpha*-*-linux*) [tm_file]: - Add new headers as appropriate. - - * configure.in (alpha*): Enable Haifa by default. - (*-*-winnt3*): Change to winnt*, since we're not v3 specific. - * configure: Rebuild. - -Tue Dec 23 03:14:54 1997 Richard Henderson - - * Makefile.in (clean): Remove the stages with their objects here ... - (distclean): ... instead of here. - -Mon Dec 22 11:24:01 1997 Kaveh R. Ghazi - - * cse.c (rtx_cost): Add default case in enumeration switch. - * fix-header.c (recognized_macro): Likewise. - (recognized_extern): Likewise. - (write_rbrac): Likewise. - * objc/objc-act.c (encode_aggregate): Likewise. - (gen_declarator): Likewise. - (gen_declspecs): Likewise. - -Mon Dec 22 09:58:51 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (create_reg_dead_note): Detect and handle another - case where we kill more regs after sched than were killed before - sched. - * sched.c (create_reg_dead_note): Similarly. - -Mon Dec 22 09:18:37 1997 Jeffrey A Law (law@cygnus.com) - - * c-pragma.c: Include flags.h. - -Sun Dec 21 22:10:59 1997 Mumit Khan - - * i386/cygwin32.h (NO_IMPLICIT_EXTERN_C): Don't assume anything - about system headers. - (LIB_SPEC): Add -ladvapi32 -lshell32 to be consistent with mingw32 - and also to resolve symbols in prefix.c. - - * i386/xm-cygwin32.h (HAVE_BCOPY): Define. This avoids a conflict - between gansidecl.h and newlib's _ansi.h when building libgcc2.a, - when the definitions in auto-config.h is not visible. - (HAVE_BZERO): Likewise. - (HAVE_BCMP): Likewise. - (HAVE_RINDEX): Likewise. - (HAVE_INDEX): Likewise. - -Sun Dec 21 21:54:22 1997 Jeffrey A Law (law@cygnus.com) - - * pa.c (emit_move_sequence): Handle a function label source - operand. - -Sun Dec 21 16:13:55 1997 Nick Clifton - - * c-pragma.c (handle_pragma_token): Generate warning messages - about unknown pragmas if warn_unknown_pragmas is set. - - * c-decl.c (c_decode_option): Parse -Wunknown-pragmas command - line option to set variable: warn_unknown_pragmas. - -Sun Dec 21 15:51:10 1997 Manfred Hollstein - - * m68k/mot3300.h (ASM_BYTE_OP): Don't include '\t' in the - definition. - (ASM_OUTPUT_ASCII): Prefix ASM_BYTE_OP by one single '\t'. - -Sun Dec 21 13:58:39 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS): Define. - (libgcc2.a): Depend on $(DPBIT) and $(FPBIT). Add rules to - generate more fine grained floating point emulation libraries. - * config/fp-bit.c: Add protecting #ifdef to all functions so - that they can be compiled separately. If !FINE_GRAINED_LIBRARIES, - then compile all suitable functions. - (pack_d, unpack_d, fpcmp_parts): Add declarations, define with two - underscores to avoid namespace pollution. - * t-mn10200 (LIB2FUNCS_EXTRA): Remove fp-bit.c. - (FPBIT): Define. - * t-mn10300 (LIB2FUNCS_EXTRA): Remove fp-bit.c and dp-bit.c. - (FPBIT): Define. - (DPBIT): Define. - -Sat Dec 20 11:26:47 1997 Kaveh R. Ghazi - Jeff Law - - * bitmap.c (bitmap_clear): Ensure `inline' is at the beginning - of the declaration. - * c-decl.c (finish_decl): Use parentheses around && within ||. - * rtl.c: Include stdlib.h. - (read_skip_spaces): Add parentheses around assignments used as - truth values. - (read_rtx): Initialize list_rtx. - * cppexp.c (parse_number): Use || when operands are truth values. - * alias.c (find_base_value): Add default case. - (memrefs_conflict): Likewise. - * combine.c (sets_function_arg_p): Likewise. - * genemit.c (gen_exp): Likewise. - * local-alloc.c (contains_replace_regs): Likewise. - * rtlanal.c (jmp_uses_reg_or_mem): Likewise. - * fold-const.c (fold_convert): Use "&&" for truth values. - (fold): Add default case. - * sdbout.c (sdbout_field_types): Fix typo in declaration. - (sdbout_one_type): Add default case. - * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. - (some_operand): Add default case. - (input_operand): Likewise. - (signed_comparison_operator): Likewise. - (divmod_operator): Likewise. - (alpha_set_memflags_1): Likewise. - * reload1.c (reload_cse_simplify_operands): Ensure function - always returns a value. - * scan-decls.c (scan_decls): Likewise. - * c-lex.c (skip_white_space): Fix typo in declaration. - * c-typeck.c (comp_target_types): Add parentheses around assignment - used as truth value. - (print_spelling): Likewise. - (constructor_implicit, constructor_result): Remove unused variables. - * collect2.c (scan_library): Protect prototype with - #ifdef SCAN_LIBRARIES. - * emit-rtl.c (find_line_note): Fix typo in declaration. - * final.c (asm_insn_count): Protect prototype with - #ifdef HAVE_ATTR_length. - * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. - (try_pre_increment_1, try_pre_increment): Likewise. - * regclass.c (auto_inc_dec_reg_p): Protect prototype with - #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. - * gcov-io.h (__store_long, __write_long, __read_long): Fix - unsigned/signed comparisons. - * gcov.c (read_files): Remove unused "first_type" variable. - (scan _for_source_files): Initialize s_ptr. - (function_summary): Eliminate "%lf" formatting, use %ld for - longs. - (output_data): Initialize branch_probs and last_line_num. - Eliminate "%lf" formatting, use "%ld" for longs. - -Fri Dec 19 17:31:11 1997 Ian Lance Taylor - - * mips16.S: New file. - - * libgcc2.c (varargs): Handle mips16. - - * expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an - expression. - * stmt.c (expand_end_case): Likewise. - * alpha.h (CASE_VECTOR_PC_RELATIVE): Update. - * fx80.h, gmicro.h, m68k.h, m88k.h, ns32k.h: Likewise. - * rs6000.h, sh.h, tahoe.h, v850.h, vax.h: Likewise. - -Tue Dec 16 15:14:09 1997 Andreas Schwab - - * objc/Make-lang.in: Create runtime-info.h and libobjc_entry.o in - the build directory. - (libobjc.a): Update dependency list. - (libobjc.dll): Likewise. Use libobjc_entry.o from the build - directory. - (objc/sendmsg.o): Add -Iobjc to find runtime-info.h. - (objc.mostlyclean): Remove runtime-info.h. - -Fri Dec 19 00:19:42 1997 Richard Henderson - - * tree.c (build_range_type): Allow creation of ranges with no maximum. - * dbxout.c (dbxout_range_type): Handle missing TYPE_MAX_VALUE. - * dwarf2out.c (add_subscript_info): Likewise. - * dwarfout.c (subscript_data_attribute, byte_size_attribute): Likewise. - * sdbout.c (plain_type_1): Likewise. - * stmt.c (pushcase_range, all_cases_count, node_has_high_bound): - Likewise. - * fold-const.c (int_const_binop, fold_convert, make_range, fold): - Likewise. - -Thu Dec 18 17:05:10 1997 Kaveh R. Ghazi - - * mips.c (fatal): Remove declaration. - -1997-12-18 Mark Mitchell - - * integrate.c (get_label_from_map): New function. - (expand_inline_function): Use it. Initialize the label_map to - NULL_RTX instead of gen_label_rtx. - (copy_rtx_and_substitute): Use get_label_from_map. - * integrate.h (get_label_from_map): New function. - (set_label_from_map): New macro. - * unroll.c (unroll_loop): Use them. - (copy_loop_body): Likewise. - -Thu Dec 18 19:19:57 1997 Ian Lance Taylor - - * mips/mips.h (INIT_SUBTARGET_OPTABS): Define if not defined. - (INIT_TARGET_OPTABS): Define. - * mips/ecoff.h: Include gofast.h before mips.h. - (INIT_SUBTARGET_OPTABS): Define instead of INIT_TARGET_OPTABS. - * mips/elf64.h: Likewise. - * mips/elf.h (ASM_OUTPUT_SECTION_NAME): Define. - -Thu Dec 18 14:51:12 1997 Jason Merrill - - * except.c: Remove register_exception_table{,_p}. - -Thu Dec 18 14:57:29 1997 Gavin Koch - - * unroll.c (calculate_giv_inc): Handle constant increment found in - a MEM with an appropriate REG_EQUAL note. - - * calls.c (expand_call): Implement LOAD_ARGS_REVERSED. - - * dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the - frame pointer in the prologue. - -Thu Dec 18 00:19:38 1997 Robert Lipe - - * i386/x-sco5 (CLIB): Deleted. - (ALLOCA): Added. - * i386/xm-sco5.h (USE_C_ALLOCA): Added. - -Tue Dec 16 18:51:00 1997 Bill Moyer - - * config/m68k/m68k.c (output_function_prologue): Typecast - dwarf2out_cfi_label to (char *). - * config/m68k/m68kemb.h (STARTFILE_SPEC): Redefined to "". - -Wed Dec 17 15:06:04 1997 Richard Henderson - - * sparc.md (jump): Don't use the annul bit around an empty loop. - Patch from Kevin.Kelly@East.Sun.COM. - -Wed Dec 17 00:51:36 1997 Stan Cox (scox@cygnus.com) - - * jump.c (jump_optimize): Don't use the return register as a - source1 of a conditional move. - -Tue Dec 16 23:45:40 1997 Richard Henderson - - * sparc.c (DF_MODES): Or the mask not the bit number. - (function_arg) [ARCH64]: Send unprototyped arg to fp reg first. - -Wed Dec 17 00:13:48 1997 Christian Iseli - - * combine.c (force_to_mode): Return immediately if operand is a - CLOBBER. - -Tue Dec 16 23:44:54 1997 Manfred Hollstein - - * fixincludes (size_t): Add support for Motorola's stdlib.h - which fails to provide a definition for size_t. - (fabs/hypot): Provide a prototype for fabs on m88k-motorola-sysv3. - (strlen,strspn,strcspn return value): Handle different layout on sysV88. - (hypot): Provide a fake for hypot for m88k-motorola-sysv3. - - * m68k/xm-mot3300.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Define to - prevent unresolved externals in libio. - * m88k/xm-sysv3.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Likewise. - -Tue Dec 16 23:25:45 1997 H.J. Lu (hjl@gnu.org) - - * config/sparc/linux64.h (LIBGCC_SPEC): Removed. - (CPP_SUBTARGET_SPEC): Add %{pthread:-D_REENTRANT}. - (LIB_SPEC): Updated for glibc 2. - -Tue Dec 16 20:11:36 1997 Jeffrey A Law (law@cygnus.com) - - * ginclude/stdarg.h: Undo BeOS changes, they break hpux. - * ginclude/varargs.h: Likewise. - -Tue Dec 16 00:32:01 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Tue Dec 16 00:14:29 1997 H.J. Lu (hjl@gnu.org) - - * frame.h (__register_frame, __register_frame_table, - __deregister_frame): New. - * frame.c (__register_frame, __register_frame_table, - __deregister_frame): New. - * frame.c (__deregister_frame_info): Return void *. - * frame.h (__deregister_frame_info): Likewise. - * collect2.c (__deregister_frame_info): Likewise. - -Mon Dec 15 18:40:08 1997 Richard Henderson - - * expmed.c (expand_shift): If SHIFT_COUNT_TRUNCATED, drop a SUBREG. - -Mon Dec 15 18:31:43 1997 Richard Henderson - - * alpha.c (alpha_cpu_name): New variable. - (alpha_mlat_string): Likewise. - (alpha_memory_latency): Likewise. - (override_options): Handle -mmemory-latency. - (alpha_adjust_cost): Adjust load cost for latency. - * alpha.h (TARGET_OPTIONS): Add memory-latency. - (REGISTER_MOVE_COST): Define in terms of memory_latency. Take - TARGET_CIX into account. - (MEMORY_MOVE_COST): Define in terms of memory_latency. - * invoke.texi (DEC Alpha Options): Document -mmemory-latency. - - * alpha.h (ASM_COMMENT_START): New macro. - -Mon Dec 15 17:48:05 1997 Richard Henderson - - * reload.h, reload1.c (eliminate_regs), caller-save.c, dbxout.c, - dwarfout.c, dwarf2out.c, reload.c, sdbout.c: Revert March 15 change. - - * reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the - SUBREG_REG if the word count is unchanged. - * reload1.c (eliminate_regs) [case SET]: If W_R_O, preserve - subregs of identical word size for push_reload. - -Mon Dec 15 11:41:32 1997 Mark Mitchell - - * toplev.c (rest_of_compilation): Don't call save_for_inline_copy - if all we're doing is dealing with -Wreturn-type. - -Mon Dec 15 09:44:39 1997 Richard Henderson - - * alpha.md (zero_extendqihi2, zero_extendqisi2, zero_extendqidi2): - Use and 255 instead of zapnot 1, since it schedules better. - -Mon Dec 15 08:48:24 1997 Jeffrey A Law (law@cygnus.com) - - * stmt.c (expand_asm_operands): If an ASM has no outputs, then treat - it as volatile. - -Mon Dec 15 00:04:48 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (remove_dependencies): Set RTX_INTEGRATED_P on - dependency we delete. Properly update prev for multiple consecutive - deletions. - (priority): Skip deleted dependence. - -Fri Dec 12 18:54:23 1997 Per Bothner - - * expr.c (expand_builtin): Support BUILT_IN_FMOD - just call fmod. - -Fri Dec 12 01:19:48 1997 Jason Merrill - - * flow.c (flow_analysis): Be consistent with find_basic_blocks in - determining when a new basic block starts. - - * alpha/osf2or3.h (LIB_SPEC): Restore missing defn. - - * pa.h (TEXT_SPACE_P): Use TREE_CODE_CLASS. - * pa.md (iorsi3): Add missing args to *_operand calls. - - * except.c (call_get_eh_context): Don't mess with sequences. - (emit_eh_context): Include the call in the sequence here. - -1997-12-11 Paul Eggert - - * collect2.c (write_c_file_glob): Allocate initial frame object - in static storage and pass its address. - -Thu Dec 11 23:33:48 1997 Jason Merrill - - * except.c (call_get_eh_context): Don't take a parm. - Put the call at the top of the function. - (emit_eh_context): Adjust. - (get_eh_context): Replace with former use_eh_context. - (get_eh_context_once, get_saved_pc_ref): Remove. - (start_eh_unwinder, end_eh_unwinder, emit_unwinder): Remove. - * except.h: Adjust. - * integrate.c (expand_inline_function): Adjust. - * toplev.c (rest_of_compilation): Don't call emit_unwinder. - -Fri Oct 10 17:58:31 1997 Marc Lehmann - - * i386/xm-go32.h (EXECUTABLE_SUFFIX): Define. - (DIR_SEPARATOR, NO_SYS_SIGLIST): Likewise. - -Thu Dec 11 23:55:17 1997 Manfred Hollstein - - * fixincludes (strlen,strspn,strcspn return value): Handle different - layout on sysV88. - (hypot): Provide a fake for hypot which is broken on - m88k-motorola-sysv3. - -Thu Dec 11 23:50:17 1997 John F. Carr - - * tree.c, tree.h: Change tree_code_type, tree_code_length, and - tree_code_name from pointers to arrays. - * tree.c: Remove standard_tree_code_* variables, no longer used. - * print-tree.c: Remove declaration of tree_code_name. - - * cp/lex.c (init_lex): Update for tree_code_* changes. - * objc/objc-act.c (init_objc): Likewise. - - * tree.def, cp/cp-tree.def, objc/objc-tree.def: Update for tree_code - changes. - -Thu Dec 11 23:34:54 1997 Fred Fish - - * config.sub: Add support for BeOS target. - * configure.in: Likewise. - * ginclude/stdarg.h: Likewise. - * ginclude/stddef.h: Likewise. - * ginclude/varargs.h: Likewise. - * rs6000/beos.h: New file for BeOS. - * rs6000/t-beos: Likewise. - * rs6000/x-beos: Likewise. - * rs6000/xm-beos.h: Likewise. - * toplev.c (get_run_time): Just return 0 on BeOS. - -Thu Dec 11 23:25:23 1997 Jeffrey A Law (law@cygnus.com) - Toon Moene (toon@moene.indiv.nluug.nl) - - * m68k.h (GO_IF_LEGITIMATE_ADDRESS): No longer cater to horribly - old and broken Sun3 assemblers. Newer versions handle large - offsets correctly as does the GNU assembler. - -Thu Dec 11 23:06:48 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * objc/objc-act.c (lang_report_error_function): Disable. - * objc/objc-parse.y: Include "output.h". - (yyerror): Remove redundant decl. - (yyprint): Fix prototype. - (apply_args_register_offset): Remove redundant decl. - (get_file_function_name): Likewise. - -Thu Dec 11 22:02:10 1997 Jason Merrill - - * flow.c (find_basic_blocks): A CALL_INSN that can throw starts - a new basic block. - (find_basic_blocks_1): Likewise. - -Thu Dec 11 21:08:48 1997 Jason Merrill - - * except.c (use_eh_context): Don't copy_rtx a REG. - (emit_throw): Lose old unwinder support. - (expand_internal_throw): Likewise. - * libgcc2.c (struct eh_context): Likewise. - (new_eh_context): Likewise. - (__get_eh_info): Lose redundant cast. - (__get_dynamic_handler_chain): Likewise. - (__get_saved_pc): Lose. - Lose all old unwinder support code. - -Thu Dec 11 20:42:18 1997 Teemu Torma - - Thread-safe EH support for pthreads, DCE threads and Solaris threads. - - * integrate.c (expand_inline_function): If the inline fn uses eh - context, make sure that the current fn has one. - * toplev.c (rest_of_compilation): Call emit_eh_context. - * except.c (use_eh_context): New fn. - (get_eh_context_once): New fn. - (call_get_eh_context): New fn. - (emit_eh_context): New fn. - (get_eh_context): Call either get_eh_context_once or - call_get_eh_context, depending on what we have. - (get_dynamic_handler_chain): Call get_eh_context_once. - * except.h: Prototypes for fns above. - * optabs.c (get_eh_context_libfunc): Removed. - (init_optabs): Don't initialize it. - * expr.h (get_eh_context_libfunc): Removed. - * rtl.h, rtl.c: New reg_note REG_EH_CONTEXT. - * config/pa/pa.h (CPP_SPEC): Support for -threads. - * config/pa/pa-hpux10.h (LIB_SPEC): Likewise. - * config/pa/t-pa (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): - New multilib for -threads. - * config/sparc/t-sol2: Added multilibs for -threads and - made -pthreads alias to it. - * config/sparc/sol2.h (CPP_SPEC, LIB_SPEC): - Added -threads and -pthreads options. - * libgcc-thr.h: New file. - * libgcc2.c (__get_cpp_eh_context): Removed. - (struct cpp_eh_context): Removed. - (struct eh_context): Replaced cpp_eh_context with generic language - specific pointer. - (__get_eh_info): New function. - (__throw): Check eh_context::info. - (__sjthrow): Likewise. - * libgcc2.c: Include libgcc-thr.h. - (new_eh_context, __get_eh_context, - eh_pthread_initialize, eh_context_initialize, eh_context_static, - eh_context_specific, eh_context_free): New functions. - (get_eh_context, eh_context_key): New variables. - (__sjthrow, __sjpopnthrow, __eh_pcnthrow, __throw): Use - get_eh_context to get the context. - (longjmp): Move the declaration inside - #ifdef DONT_USE_BUILTIN_SETJMP. - * frame.c: Include libgcc-thr.h. - (object_mutex): Mutex to protect the object list. - (find_fde, __register_frame, __register_frame_table, - __deregister_frame): Hold the lock while accessing objects. - * except.h (get_eh_context): Declare. - * except.c (current_function_ehc): Define. - (current_function_dhc, current_function_dcc): Removed. - (get_eh_context): New function. - (get_dynamic_handler_chain): Use get_eh_context. - (get_saved_pc_ref): Likewise. - (get_dynamic_cleanup_chain): Removed references to - current_function_dcc. - (save_eh_status, restore_eh_status): Save and restore - current_function_ehc instead. - * optabs.c (get_eh_context_libfunc): New variable. - (init_optabs): Initialize it. - * expr.h: Declare get_eh_context_libfunc. - * function.h (struct function): Replaced dhc and dcc with ehc. - * except.c (get_saved_pc_ref): New functions. - (eh_saved_pc_rtx, eh_saved_pc): Deleted. - (expand_internal_throw_indirect): Use get_saved_pc_ref() instead - of eh_saved_pc. - (end_eh_unwinder): Likewise. - (init_eh): Remove initialization of eh_saved_pc. - * optabs.c (get_saved_pc_libfunc): New variable. - (init_optabs): Initialize it. - * expr.h: Declare get_saved_pc_libfunc. - * except.h (eh_saved_pc_rtx): Deleted. - (get_saved_pc_ref): Declared. - - From Scott Snyder : - * libgcc2.c (__get_saved_pc): New. - (__eh_type, __eh_pc): Deleted. - (__eh_pcnthrow): Use __get_saved_pc() instead of __eh_pc. - (__get_dynamic_handler_chain): Move __dynamic_handler_chain inside - this fcn. - -Thu Dec 11 17:23:48 1997 John F. Carr - - * sparc/sol2.h: Use 64 bit multiply and divide functions in - Solaris libc. Define TARGET_LIVE_G0 and TARGET_BROKEN_SAVERESTORE - as 0. - - * rtl.h (global_rtl): New variable, replacing separate variables for - commonly used rtl. - (const_int_rtx): Now array of rtx_def, not rtx. - * emit-rtl.c: Update for new rtl data structures. - * genattrtab.c: Define global_rtl. - -Thu Dec 11 15:50:29 1997 David Edelsohn - - * configure.in ({rs6000,powerpc}-*-*): Enable Haifa scheduler by - default. - -Wed Dec 10 12:30:18 1997 Anthony Green - - * crtstuff.c (__do_global_ctors): Fix typo. - -Tue Dec 9 09:43:59 1997 Manfred Hollstein - - * toplev.c (main): Check HAVE_GETRLIMIT and HAVE_SETRLIMIT in addition - to RLIMIT_STACK to see if we can call getrlimit and setrlimit. - -Tue Dec 9 09:38:58 1997 David Edelsohn - - * rs6000.h (FUNCTION_ARG_PADDING): Define. - * rs6000.c (function_arg_padding): New function. - -Tue Dec 9 10:34:21 1997 Manfred Hollstein - - * m68k.c: Include tree.h only once. - -Tue Dec 9 09:32:33 1997 Richard Kenner - - * integrate.c (save_for_inline_copying): Make a new reg_parm_stack_loc. - -Tue Dec 9 01:16:06 1997 Jeffrey A Law (law@cygnus.com) - - * Partially cleaned up prototyping code from HJ. - * tree.h: Add many prototypes. - * haifa-sched.c (haifa_classify_insn): Renamed from classify_insn. - All references changed. - * rtl.h: Protect from multiple inclusions. Add many prototypes. - -Tue Dec 9 01:15:15 1997 Fred Fish - - * libgcc2.c (string.h): Hoist inclusion to occur before first use of - string functions like strlen. - -Tue Dec 9 00:57:38 1997 Manfred Hollstein - - * configure.in: Check for functions getrlimit and setrlimit. - * cccp.c (main): Check HAVE_GETRLIMIT and HAVE_SETRLIMIT in addition - to RLIMIT_STACK to see if we can call getrlimit and setrlimit. - -Mon Dec 8 23:53:26 1997 Jay Sachs - - * Makefile.in (compare*): Handle losing behavior from 4.4bsd make. - -Mon Dec 8 21:03:28 1997 Richard Henderson - - * alpha.c (REG_RA, alpha_return_addr, output_epilog): - Fix merge problems. - - * alpha.c (override_options): Don't know about scheduling for EV6. - * alpha.md (ev5 function units): Don't overload as ev6. - - * alpha.c (alpha_adjust_cost): Simplify. Fix typo in ev5 mult case. - * alpha.md (define_attr type): Add mvi. - (ev5_e0): Define sceduling parameters for it. - (TARGET_MAX insns): Type is mvi not shift. - -Mon Dec 8 18:15:00 1997 Richard Henderson - - * alpha/win-nt.h (TRAMPOLINE_TEMPLATE): Fix backported gcc-2.8 bug. - -Mon Dec 8 21:17:28 1997 J"orn Rennecke - - * cstamp-h, auto-config.h: Delete. - -Sun Dec 7 19:19:03 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Dec 6 22:22:22 1997 Jeffrey A Law (law@cygnus.com) - - * cccp.c: Fix typo brought over in merge. - - * Merge in changes from gcc-2.8. - -Mon Nov 3 05:45:32 1997 Philippe De Muyter - - * m68k.c: Include tree.h for dwarf2out_cfi_label. - - * gcc.c (process_command): Do not take address of function fatal when - calling lang_specific_driver. - -Sat Dec 6 01:02:38 1997 Mumit Khan - - * config/i386/cygwin32.h (DWARF2_UNWIND): Exception handling - doesn't work with it yet, so set it to 0. - * config/i386/xm-cygwin32.h (NO_SYS_SIGLIST): Define. - -Sat Dec 6 01:01:02 1997 Christian Iseli - - * cse.c (cse_insn): Check for invalid entries when taking references. - -Fri Dec 5 18:26:25 1997 J"orn Rennecke - - * loop.c (invariant_p): Don't test flag_rerun_loop_opt. - (loop_optimize, scan_loop, strength_reduce): New argument unroll_p. - * toplev.c (rest_of_compilation): Pass it. Remove code to - save / clear / restore flag_unroll_{,all_}loops. - -Fri Dec 5 16:26:03 1997 Bernd Schmidt - - * i386.c (notice_update_cc): Remove bogus pentium GCC code. - -Fri Dec 5 16:25:14 1997 Jeffrey A Law (law@cygnus.com) - - * stmt.c (warn_if_unused_value): Don't warn for TRY_CATCH_EXPR. - -Thu Dec 4 11:51:00 1997 Jason Merrill - - * except.c (get_dynamic_handler_chain): Only make the call once per - function. - - * except.c (expand_end_all_catch): Fix for sjlj exceptions. - -Thu Dec 4 12:30:40 1997 J"orn Rennecke - - * sh.c (final_prescan_insn): Use local label prefix - when emitting .uses pseudo-ops. - -Wed Dec 3 12:01:56 1997 Jason Merrill - - * libgcc2.c (__throw): Use __builtin_return_addr instead of __eh_pc. - * except.c: Lose outer_context_label_stack. - (expand_eh_region_end): Rethrow from outer_context here. - (expand_fixup_region_end): Let expand_eh_region_end do the rethrow. - (expand_internal_throw): Take no args. - (expand_internal_throw_indirect): Lose. - (expand_leftover_cleanups, expand_start_all_catch): Use expand_rethrow. - (expand_start_all_catch): Start a rethrow region. - (expand_end_all_catch): End it. - (expand_rethrow): New fn. - * except.h: Reflect above changes. - * flow.c: Revert change of Nov 27. - -Thu Dec 4 00:24:09 1997 Jeffrey A Law (law@cygnus.com) - - * i386/t-sol2 (CRTSTUFF_T_CFLAGS): Turn on the optimizer. - -Wed Dec 3 12:01:56 1997 Jason Merrill - - * except.c (expand_fixup_region_end): New fn. - (expand_fixup_region_start): Likewise. - (expand_eh_region_start_tree): Store cleanup into finalization here. - * stmt.c (expand_cleanups): Use them to protect fixups. - -Wed Dec 3 11:41:13 1997 Gavin Koch - - * mips/mips.md (muldi3_r4000): Broaden the output template - and attribute assignments to handle three operand dmult; - rename to muldi3_internal2. - (muldi3): Call the new muldi3_internal2 for R4000, and - any GENERATE_MULT3 chip. - -Tue Dec 2 19:40:43 1997 Jason Merrill - - * stmt.c (expand_decl_cleanup): Update thisblock after eh_region_start. - -Tue Dec 2 12:54:33 1997 Jim Wilson - - * unroll.c (find_splittable_givs): Remove last change. Handle givs - with a dest_reg that was created by loop. - -Sat Nov 29 12:44:57 1997 David Edelsohn - - * rs6000.c (function_arg_partial_nregs): Undo Nov. 26 patch. - - * rs6000/aix41.h (ASM_CPU_SPEC): Define. - -Fri Nov 28 10:00:27 1997 Jeffrey A Law (law@cygnus.com) - - * configure.in: Fix NCR entries. - -Thu Nov 27 12:20:19 1997 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_basic_blocks): Handle cfg issues for rethrows and - nested exceptions correctly. - - * unroll.c (find_splittable_givs): Don't split givs with a dest_reg - that was created by loop. - -Thu Nov 27 09:34:58 1997 Jason Merrill - - * expr.c (preexpand_calls): Don't look past a TRY_CATCH_EXPR. - - * except.c (expand_start_all_catch): One more do_pending_stack_adjust. - -Wed Nov 26 15:47:30 1997 Michael Meissner - - * rs6000.c (SMALL_DATA_REG): Register to use for small data relocs. - (print_operand): Use SMALL_DATA_REG for the register involved in - small data relocations. - (print_operand_address): Likewise. - - * rs6000/linux.h (LINK_SPEC): Pass -dynamic-linker /lib/ld.so.1 if - -dynamic linker is not used. - - * rs6000.md (call insns): For local calls, use @local suffix under - System V. Don't use @plt under Solaris. - - * rs6000.c (output_function_profiler): Put label address in r0, and - store LR in 4(sp) for System V/eabi. - - * rs6000.h (ASM_OUTPUT_REG_{PUSH,POP}): Keep stack aligned to 16 - byte boundary, and maintain stack backchain. - -Tue Nov 25 14:08:12 1997 Jim Wilson - - * mips.md (fix_truncdfsi2, fix_truncsfsi2, fix_truncdfdi2, - fix_truncsfdi2): Change *. - -Wed Nov 26 11:12:26 1997 Jason Merrill - - * toplev.c (main): Complain about -gdwarfn. - -Tue Nov 25 22:43:30 1997 Jason Merrill - - * dwarfout.c (output_type): If finalizing, write out nested types - of types we've already written. - -Tue Nov 25 20:32:24 1997 Michael Meissner - - (patches originally from Geoffrey Keating) - * rs6000.c (function_arg): Excess floating point arguments don't - go into GPR registers after exhausting FP registers under the - System V.4 ABI. - (function_arg_partial_nregs): Likewise. - - * rs6000.md (call insns): If -fPIC or -mrelocatable, add @plt - suffix to calls. - -Tue Nov 25 23:37:27 1997 Jason Merrill - - * integrate.c (output_inline_function): Just unset DECL_INLINE. - -Tue Nov 25 23:33:29 1997 scott snyder - - * dwarf2out.c (outout_call_frame_info): Ensure that the info has - proper alignment. - - * libgcc2.c (__throw): Initialize HANDLER. - -Tue Nov 25 14:08:12 1997 Jim Wilson - - * mips.md (fix_truncdfsi2, fix_truncsfsi2, fix_truncdfdi2, - fix_truncsfdi2): Change *X to ?*X. - -Tue Nov 25 10:00:42 1997 Richard Henderson (rth@cygnus.com) - - * alpha.h (CONST_OK_FOR_LETTER): Fix 'L' handling. - -Tue Nov 25 10:00:42 1997 Jeffrey A Law (law@cygnus.com) - - * crtstuff.c (do_global_dtors_aux): Handle multiple calls better. - -Tue Nov 25 01:26:55 1997 Bruno Haible - - * dwarf2out.c (ASM_OUTPUT_DWARF_DELTA1): Implement. - -Mon Nov 24 22:41:55 1997 Jason Merrill - - * except.c (get_dynamic_handler_chain): Build up a FUNCTION_DECL. - * optabs.c (init_optabs): Lose get_dynamic_handler_chain_libfunc. - * expr.h: Likewise. - -Sat Nov 22 18:58:20 1997 Jeffrey A Law (law@cygnus.com) - - * pa-hpux10.h (NEW_HP_ASSEMBLER): Define. - * pa.h (LEGITIMATE_CONSTANT_P): Reject LABEL_REFs if not using - gas and not using the new HP assembler. - -Fri Nov 21 15:20:05 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (program_transform_cross_name): Clean up "-e" confusion. - (GCC_INSTALL_NAME, GCC_CROSS_NAME): Likewise. - -Fri Nov 21 19:37:40 1997 Andrew Cagney - - * config/mips/elf64.h (MULTILIB_DEFAULTS): Test for - TARGET_ENDIAN_DEFAULT == zero instead of testing for macro - definition. - -Fri Nov 21 12:49:56 1997 Bruno Haible - - * stmt.c (expand_end_bindings): Allow jump into block with cleanups. - -Fri Nov 21 12:18:51 1997 Jason Merrill - - * except.h: Add outer_context_label_stack. - * except.c: Likewise. - (expand_start_all_catch): Push the outer_context for the try block - onto outer_context_label_stack. - (expand_end_all_catch): Use it and pop it. - -Fri Nov 21 10:13:11 1997 Robert Lipe (robertl@dgii.com) - - * i386/sco5.h (HAVE_ATEXIT): Revert last change. - -Thu Nov 20 16:11:50 1997 Richard Henderson - - * alpha.c (alpha_emit_set_const_1): Handle narrow hosts better. - -Thu Nov 20 16:11:50 1997 Klaus Kaempf - - * alpha/vms.h (ASM_OUTPUT_ADDR_VEC_ELT): Add an L for the local label - to correspond with the change to ASM_GENERATE_INTERNAL_LABEL. - -Thu Nov 20 14:42:15 1997 Jason Merrill - - * Makefile.in (LIB2FUNCS): Remove C++ memory management support. - * libgcc2.c: Remove __builtin_new, __builtin_vec_new, set_new_handler, - __builtin_delete, and __builtin_vec_delete. - - * except.c (output_exception_table): Don't bother with - __EXCEPTION_END__. - -Thu Nov 20 16:11:50 1997 Jeffrey A Law (law@cygnus.com) - - * pa.md (pre_stwm, post_stwm, pre_ldwm, post_ldwm): Base register - is an in/out operand. - (zero extended variants of stwm/stwm patterns): Similarly. - - * mips/x-iris (FIXPROTO_DEFINES): Add -D_SGI_SOURCE. - -Thu Nov 20 13:19:32 1997 Jason Merrill - - * dwarf2out.c (ASM_OUTPUT_DWARF_OFFSET4): Rename from VALUE4. - Use assemble_name. - (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Use assemble_name. - (output_call_frame_info): Emit a \n after using it. - -Thu Nov 20 00:38:46 1997 Dave Love - - * configure.in: Add AC_ARG_ENABLE for Haifa as documentation. - -Wed Nov 19 12:03:04 1997 Philippe De Muyter - - * dwarf2out.c (CIE_LENGTH_LABEL, FDE_LENGTH_LABEL): New macros. - (ASM_OUTPUT_DWARF_VALUE4): New macro. - (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Define if SET_ASM_OP is - defined. - (output_call_frame_info): Do not output forward label differences - if ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL is defined. - * m68k/mot3300.h (SET_ASM_OP): Define when not using gas. - -Tue Nov 18 23:03:30 1997 J"orn Rennecke - - * sh.md (attribute "type"): Add nil. - (movsi_ie): y/y alternative is type nil. - (movsf_ie): Replace ry/yr/X alternative by r/y/X , y/r/X and y/y/X - alternatives. - (movsf_ie+1): Delete. - -Tue Nov 18 15:39:59 1997 Jim Wilson - - * mips/mips.c (save_restore_insns): If gp_offset or fp_offset are - large_int, emit two insns instead of one splitable insn. - * dwarf2out.c (dwarf2out_frame_debug): When set cfa_store_offset - from cfa_temp_value, use cfa_offset. Add assert checking that - cfa_reg is SP. - -Mon Nov 17 15:35:38 1997 Tom Tromey - - * cccp.c (deps_output): Properly quote file names for make. - -Mon Nov 17 13:21:40 1997 Jeffrey A Law (law@cygnus.com) - - * t-h8300 (MULTILIB_EXCEPTIONS): Define. - -Fri Nov 7 15:33:11 1997 Robert Lipe (robertl@dgii.com) - - * i386/sco5.h (HAVE_ATEXIT): Delete definition. - -Sun Nov 16 23:52:48 1997 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_insn): Don't look at JUMP_LABEL field of a conditional - return. - (cse_end_of_basic_block): Similarly. - -Sun Nov 16 23:01:40 1997 J. Kean Johnston - - * i386/sco5.h (ASM_OUTPUT_ALIGNED_BSS): Define. - (SELECT_RTX_SECTION): Define. - (LIBGCC_SPEC, LIB_SPEC): Do the right thing for PIC. - -Sun Nov 16 22:47:03 1997 Manfred Hollstein - - * Makefile.in (compare, compare-lean): Define $stage for each - shell command. - (gnucompare, gnucompare-lean): Likewise. - -Sun Nov 16 22:02:16 1997 Richard Henderson (rth@cygnus.com) - - * alpha/win-nt.h (TRAMPOLINE_TEMPLATE): Fix offsets. - - * alpha.h (ASM_OUTPUT_ADDR_DIFF_ELT): Add an L for the local label - to correspond with the change to ASM_GENERATE_INTERNAL_LABEL. - -Fri Nov 14 09:09:20 1997 Fred Fish (fnf@cygnus.com) - - * dwarfout.c (byte_size_attribute): Add local var upper_bound - and add case to handle STRING_TYPE. - * dwarfout.c (output_string_type_die): Fix code to generate - correct string length attribute for fixed length strings. - Still needs support for varying length strings. - -Fri Nov 14 08:46:56 1997 Jeffrey A Law (law@cygnus.com) - - * toplev.c (get_run_time): Do something sensible for cygwin32. - -Fri Nov 14 07:24:20 1997 Richard Henderson - - * expr.c (expand_builtin_setjmp): Set - current_function_has_nonlocal_label. - * stupid.c (stupid_life_analysis): If has_nonlocal_label, kill - call-saved registers across calls. - - * alpha.md (exception_receiver): Remove. - (nonlocal_goto_receiver_osf): New. - (nonlocal_goto_receiver_vms): Renamed from nonlocal_goto_receiver. - (nonlocal_goto_receiver): New, select _osf or _vms. - - * alpha.c (output_prolog [*]): Prefix entry labels with '$' to - keep them from being propagated to the object file. - (alpha_write_linkage): Likewise. - * alpha.md (call_vms): Likewise. - (call_value_vms): Likewise. - (unnamed osf call insns): Likewise. - - * alpha.h (ASM_OUTPUT_INTERNAL_LABEL): Don't omit L from local label. - (ASM_GENERATE_INTERNAL_LABEL): Likewise. - - * alpha.c (call_operand): Any reg is valid for WinNT. - * alpha.md (call_nt, call_value_nt): Don't force address into $27. - (anon nt calls): Add 'R' alternative. - * alpha/win-nt.h (TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE, - INITIALIZE_TRAMPOLINE): Handle lack of original $27 and 32-bit ptrs. - -Fri Nov 14 06:59:33 1997 Jeffrey A Law (law@cygnus.com) - - * calls.c (expand_call): Handle pcc_struct_value correctly for C++. - - * i386/xm-cygwin32.h (HAVE_FILE_H, HAVE_RUSAGE): Delete defines. - * i386/xm-mingw32.h (HAVE_FILE_H, HAVE_RUSAGE): Likewise. - * rs6000/xm-cygwin32.h (HAVE_FILE_H, HAVE_RUSAGE): Likewise. - -Thu Nov 13 20:37:33 1997 Michael Meissner - - * reload1.c (new_spill_reg): Improve fixed or forbidden register - spill error message. - -Thu Nov 13 20:29:08 1997 Kaveh R. Ghazi - - * prefix.c: Use stdarg.h only ifdef __STDC__. Otherwise, - use varargs.h. Wrap header with <>, not "". - -Thu Nov 13 20:21:17 1997 Jeffrey A Law (law@cygnus.com) - - * integrate.c (save_for_inline_copying): Add return value from - savealloc. - -Thu Nov 13 19:12:33 1997 Brendan Kehoe - - * fixincludes: Be a little more restrictive on what we will - substitute to replace definitions of MAXINT for HPUX. - -Thu Nov 13 18:41:02 1997 Michael Meissner - - * dbxout.c (dbxout_symbol_location): Don't assume that variables - whose address is the stack or argument pointers are indirect - pointers. - -1997-11-13 Paul Eggert - - * cccp.c, cpplib.c (compare_defs): - Don't complain about arg name respellings unless pedantic. - * cpplib.c (compare_defs): Accept pfile as new arg. - All callers changed. - -Thu Nov 13 23:33:50 1997 J"orn Rennecke - - * fold-const.c (fold_truthop): Fix bug in last change. - -1997-11-13 Paul Eggert - - Fix some confusion with IEEE minus zero. - - * real.h (REAL_VALUES_IDENTICAL): New macro. - - * expr.c (is_zeros_p): Don't consider -0.0 to be all zeros. - * fold-const.c (operand_equal_p): Don't consider -0.0 to be - identical to 0.0. - * tree.c (simple_cst_equal): Don't consider -0.0 to have the - same tree structure as 0.0. - - * varasm.c (immed_real_const_1): Use new REAL_VALUES_IDENTICAL - macro instead of doing it by hand. - -Thu Nov 13 16:56:14 1997 Jeffrey A Law (law@cygnus.com) - - * v850/lib1funcs.asm: Minor whitespace changes. - * v850.c: Fix minor formatting problems in many places. - (construct_restore_jr, construct_save_jarl): Remove unwanted aborts. - -Thu Nov 13 12:53:44 1997 Jim Wilson - - * mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete code swapping xplus0 and - xplus1 when xplus0 is not a register. - -Thu Nov 13 11:41:42 1997 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_basic_blocks): During marking phase, if we encounter - an insn with a REG_LABEL note, make the target block live and - create an edge from the insn to the target block. Do not make - edges from all blocks to the target block. - - * m68k/x-next (OTHER_FIXINCLUDES_DIRS): Include /NextDeveloper/Headers. - - * confiugre.in: Tweak NCR entries. - * configure: Rebuilt. - -Thu Nov 13 11:07:41 1997 Michael Meissner - - * rs6000.c (num_insns_constant): Use REAL_VALUE_FROM_CONST_DOUBLE to - pick apart floating point values, instead of using CONST_DOUBLE_LOW - and CONST_DOUBLE_HIGH. - - * rs6000.md (define_splits for DF constants): Use the appropriate - REAL_VALUE_* interface to pick apart DF floating point constants in - a machine independent fashion. - -Thu Nov 13 00:06:58 1997 J"orn Rennecke - - * fold-const.c (fold_truthop): When changing a one-bit comparison - against zero into a comparison against mask, do a proper sign - extension. - -Wed Nov 12 09:37:01 1997 Jeffrey A Law (law@cygnus.com) - - * except.c: Do not include "assert.h". - (save_eh_status): Turn asserts into conditional aborts. - (restore_eh_status, scan_region): Likewise. - * dwarfout.c: Do not include "assert.h". - (bit_offset_attribute): Turn asserts into conditional aborts. - (bit_size_attribute, output_inlined_enumeration_type_die): Likewise. - (output_inlined_structure_type_die): Likewise. - (output_inlined_union_type_die): Likewise. - (output_tagged_type_instantiation): Likewise. - (dwarfout_file_scope_decl): Likewise. - * dwarf2out.c: Do not include "assert.h" - (expand_builtin_dwarf_reg_size): Turn asserts into conditional aborts. - (reg_save, initial_return_save, dwarf2out_frame_debug): Likewise. - (add_child_die, modified_type_die, add_bit_offset_attribute): Likewise. - (add_bit_size_attribute, scope_die_for): Likewise. - (output_pending_types_for_scope): Likewise. - (get_inlined_enumeration_type_die): Likewise. - (get_inlined_structure_type_die): Likewise. - (get_inlined_union_type_die, gen_subprogram_die): Likewise. - (gen_tagged_type_instantiation_die): Likewise. - - * flow.c (find_basic_blocks): Refine further to get a more correct - cfg, especially in the presense of exception handling, computed - gotos, and other non-trivial cases. Call abort if an inaccuracy - is detected in the cfg. - -Tue Nov 11 21:47:27 1997 J"orn Rennecke - - * glimits.h (SHRT_MIN): Define in a way suitable for 16 bit hosts. - - * c-lex.c (whitespace_cr, skip_white_space_on_line): New functions. - (skip_white_space): Use whitespace_cr. - (check_newline): Handle whitespace more consistently. - -Tue Nov 11 16:25:49 1997 Jim Wilson - - * i386/cygwin32.h (CPP_PREDEFINES): Delete -DPOSIX. - * i386/xm-cygwin32.h (POSIX): Define. - -Mon Nov 10 20:53:11 1997 Gavin Koch - - * config/mips/mips.h (MASK_DEBUG_H): Set to zero, so this bit - is available elsewhere. - -Mon Nov 10 16:21:58 1997 Doug Evans - - * sparc/sparc.md (mov[sdt]f_const_insn): Fix condition to match - what the instruction can handle. - -Mon Nov 10 03:02:19 1997 Jason Merrill - - * stmt.c (expand_decl_cleanup_no_eh): New fn. - - * except.c (expand_leftover_cleanups): do_pending_stack_adjust. - -Mon Nov 10 00:05:56 1997 Jeffrey A Law (law@cygnus.com) - - * alias.c (MAX_ALIAS_LOOP_PASSES): Define. - (init_alias_analysis): Break out of loops after MAX_ALIAS_LOOP_PASSES. - -Sun Nov 9 14:34:47 1997 David Edelsohn - - * rs6000.md (lshrdi3_power): Delete '&' from first alternative and - swap instruction order. - -Sun Nov 9 02:07:16 1997 Jeffrey A Law (law@cygnus.com) - - * fixinc.svr4 (__STDC__): Add another case. - -Sun Nov 9 02:00:29 1997 J"orn Rennecke - - * a29k.h (ELIGIBLE_FOR_EPILOGUE_DELAY): Avoid loads from varying - addresses in the epilogue delay slot. - -Sun Nov 9 01:40:40 1997 Manfred Hollstein (manfred@s-direktnet.de) - - * m88k/dgux.h (ASM_CPU_SPEC): Reformatted to suppress wrong whitespace - in generated `specs' file. - -Sun Nov 9 01:37:11 1997 Jim Wilson (wilson@cygnus.com) - - * flags.h (flag_rerun_loop_opt): Declare. - * loop.c (invariant_p, case LABEL_REF): Check flag_rerun_loop_opt. - * toplev.c (flag_rerum_loop_opt): Delete static. - -Sat Nov 8 18:20:21 1997 J"orn Rennecke - - Bring over from FSF: - - Thu Oct 30 12:21:06 1997 J"orn Rennecke - - * va-sh.h (__va_arg_sh1): Define. - (va_arg): Use it. - SH3E doesn't use any integer registers for subsequent arguments - once a non-float value was passed in the stack. - * sh.c (machine_dependent_reorg): If optimizing, put explicit - alignment in front label for ADDR_DIFF_VEC. - * sh.h (PASS_IN_REG_P): Fix SH3E case. - (ADJUST_INSN_LENGTH): If not optimizing, add two extra bytes length. - - Tue Oct 28 15:06:44 1997 J"orn Rennecke - - * sh/elf.h (PREFERRED_DEBUGGING_TYPE): Undefine before including - svr4.h. - - Mon Oct 27 16:11:52 1997 J"orn Rennecke - - * sh.c (machine_dependent_reorg): When -flag_delayed_branches, - put an use_sfunc_addr before each sfunc. - * sh.md (use_sfunc_addr, dummy_jump): New insns. - (casesi): For TARGET_SH2, emit a dummy_jump after LAB. - - Tue Oct 21 07:12:28 1997 J"orn Rennecke - - * sh/elf.h (PREFERRED_DEBUGGING_TYPE): Don't redefine. - -Fri Nov 7 10:22:24 1997 Jason Merrill - - * frame.c (add_fdes, count_fdes): Go back to checking pc_begin for - linked once FDEs. - -Wed Nov 5 14:26:05 1997 Jeffrey A Law (law@cygnus.com) - - * alias.c (find_base_value): Only return the known base value for - pseudo registers. - -Wed Nov 5 11:27:14 1997 Jim Wilson - - * i386.c (load_pic_register): Call prologue_get_pc_and_set_got. - * i386.md (prologue_set_got, prologue_get_pc): Add UNSPEC_VOLATILE - to pattern. - (prologue_get_pc_and_set_got): New pattern. - -Tue Nov 4 20:36:50 1997 Richard Henderson (rth@cygnus.com) - - * alpha.c (summarize_insn): Handle ASM_OPERANDS. Don't recurse - for SUBREG, just fall through. - - * alpha.c (alpha_handle_trap_shadows): Init sum.defd to zero. - - * alpha.md (attr trap): Make TRAP_YES nonzero for sanity's sake. - -Tue Nov 4 18:49:42 1997 Jeffrey A Law (law@cygnus.com) - - * fixincludes: Fix "hypot" prototype in NeXT math.h. - - * Makefile.in (USE_ALLOCA): Always include alloca.o. - (USE_HOST_ALLOCA): Likewise. - - * rtl.def (CODE_LABEL): Use separate fields for LABEL_NUSES - and LABEL_REFS fields. - * rtl.h (LABEL_REFS): Update. - -Tue Nov 4 16:55:11 1997 Jim Wilson - - * combine.c (try_combine): When setting elim_i2, check whether newi2pat - sets i2dest. When calling distribute_notes for i3dest_killed, pass - elim_i2 and elim_i1. When setting elim_i1, check if newi2pat - sets i1dest. - - * mips.md (insv, extzv, extv): Add change_address call. - (movsi_ulw, movsi_usw): Change QImode to BLKmode in pattern. - - * integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc. - - * reload.c (find_reloads, case 'm' and 'o'): Reject HIGH constants. - - * mips.c (mips_expand_epilogue): Emit blockage insn before call to - save_restore_insns if no FP and GP will be restored. - - * dwarf2out.c (expand_builtin_dwarf_reg_size): New variable mode. - Convert CCmode to word_mode before calling GET_MODE_SIZE. - - * acconfig.h (HAVE_INTTYPES_H): Undef. - * configure.in (inttypes.h): Check for conflicts between sys/types.h - and inttypes.h, and verify that intmax_t is defined. - * config/mips/x-iris (CC, OPT, OLDCC): Comment out. - * config/mips/x-iris3: Likewise. - -Tue Nov 4 16:07:15 1997 Jeffrey A Law (law@cygnus.com) - - * alias.c (find_base_value): When copying arguments, return the - tentative value for a hard register. - -Tue Nov 4 13:40:35 1997 Doug Evans - - * c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling. - (yylex): Record wide strings using target endianness, not host. - -Tue Nov 4 13:13:12 1997 Jeffrey A Law (law@cygnus.com) - - * mn10200.h (ASM_OUTPUT_BSS): Delete. - (ASM_OUTPUT_ALIGNED_BSS): New macro. - * mn10300.h (ASM_OUTPUT_BSS): Delete. - (ASM_OUTPUT_ALIGNED_BSS): New macro. - * v850.h (ASM_OUTPUT_BSS): Delete. - (ASM_OUTPUT_ALIGNED_BSS): New macro. - -Tue Nov 4 00:55:48 1997 J"orn Rennecke - - * profile.c (branch_prob): Insert an insn after a NOTE_INSN_SETJMP. - -Mon Nov 3 14:36:50 1997 Jeffrey A Law (law@cygnus.com) - - * configure.in (sco5): Use cpio to install header files. - -Sun Nov 2 23:31:43 1997 Manfred Hollstein - - * aclocal.m4 (conftestdata_from, conftestdata_to): Names shortened to - 14 char length. - * configure: Rebuild. - -Sun Nov 2 19:44:00 1997 Robert Lipe (robertl@dgii.com) - - * i386/sco5.h: Enable -gstabs once again. - -Sun Nov 2 19:27:21 1997 Jeffrey A Law (law@cygnus.com) - - * arm.c (output_move_double): Allocate 3 entries in otherops array. - -Sat Nov 1 21:43:00 1997 Mike Stump - - * except.c (expand_eh_region_start_for_decl): Emit EH_REGION_BEG - notes for sjlj exceptions too. - (expand_eh_region_end): Similarly for EH_REGION_END notes. - (exception_optimize): Optimize EH regions for sjlj exceptions too. - * final.c (final_scan_insn): Don't output labels for EH REGION - notes if doing sjlj exceptions. - -Sat Nov 1 19:15:28 1997 Jeffrey A Law (law@cygnus.com) - - * alias.c (init_alias_analysis): Handle -fno-alias-check when - optimizing correctly. - - * expr.c (expand_builtin_setjmp): Don't emit a SETJMP note - or set current_function_calls_setjmp anymore. - - * flow.c (find_basic_blocks): If we delete the label for an - exception handler, remove it from the EH label list and remove - the EH_BEGIN/EH_END notes for that EH region. - -Sat Nov 1 16:44:49 1997 Jason Merrill (jason@cygnus.com) - - * flow.c (find_basic_blocks): Generate correct flow control - information when exception handling notes are present. - -Sat Nov 1 13:42:19 1997 Jeffrey A Law (law@cygnus.com) - - * dwarf2out.c (output_call_frame_info): Fix length argument - to ASM_OUTPUT_ASCII. - (output_die, output_pubnames, output_line_info): Likewise. - -Fri Oct 31 07:10:09 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - - * dwarf2out.c (output_call_frame_info): Use ASM_OUTPUT_ASCII to - output ASCII by default. Only use ASM_OUTPUT_DWARF_STRING if - flag_debug_asm is on. - (output_die, output_pubnames, output_line_info): Likewise. - - * alias.c (init_alias_analysis): Add struct_value_incoming_rtx - and static_chain_rtx into the potential base values array if - they are registers. - - * alias.c (new_reg_base_value): New array of potential base values. - (unique_id): Now file scoped static. - (find_base_value, case REG): Return the value in reg_base_value - array for the REG if it exists. Else, return the value from - new_reg_base_value if copying args and REG is a hard register. - (find_base_value, case PLUS): If either operand of the PLUS is - a REG, try to get its base value. Handle base + index and - index + base. - (record_set): Use new_reg_base_value instead of reg_base_value. - (init_alias_analysis): Allocate space for new_reg_base_value too. - Rework code to iterate over the insns propagating base value - information until nothing changes. - - * global.c (global_alloc): Free the conflict matrix after - reload has finished. - -Fri Oct 31 01:45:31 1997 Jason Merrill - - * libgcc2.c (L_eh): Define __eh_pc. - Replace __eh_type with generic pointer __eh_info. - -Fri Oct 31 00:34:55 1996 J"orn Rennecke - - * expr.c (expand_increment): When enqueing a postincrement for a MEM, - use copy_to_reg if address is not a general_operand. - -Fri Oct 31 00:16:55 1997 J"orn Rennecke - - * profile.c (output_func_start_profiler): Clear flag_inline_functions - for the duration of the call to rest_of_compilation. - -Thu Oct 30 14:40:10 1997 Doug Evans - - * configure.in (sparc-*-elf*): Use sparc/elf.h, sparc/t-elf. - Set extra_parts. - (sparc*-*-*): Recognize --with-cpu=v9. - * sparc/elf.h: New file. - * sparc/t-elf: New file. - -Thu Oct 30 13:26:12 1997 Jeffrey A Law (law@cygnus.com) - - * mn10300.c (const_8bit_operand): New function. - (mask_ok_for_mem_btst): New function. - * mn10300.md (btst patterns with mem operands): Use new functions - to avoid creating btst instructions with invalid operands. - -Wed Oct 29 16:57:19 1997 Michael Meissner - - * rs6000/xm-sysv4.h: Include xm-linux.h instead of xm-svr4.h if we - are running on PowerPC Linux. - -Wed Oct 29 13:10:11 1997 Gavin Koch - - * config/mips/elf64.h (PREFERRED_DEBUGGING_TYPE): Only define - if not previously defined. - -Tue Oct 28 23:55:27 1997 Doug Evans (devans@cygnus.com) - - * function.c (assign_parms): Correct mode of stack_parm if - entry_parm underwent a mode conversion. - -1997-10-28 Brendan Kehoe - - * global.c (global_alloc): Use xmalloc instead of alloca for - CONFLICTS, since max_allocno * allocno_row_words alone can be more - than 2.5Mb sometimes. - -Tue Oct 28 15:29:15 1997 Richard Henderson - - * reload1.c (eliminate_regs [SET]): If [SUBREG] widened the mode of - DEST for the spill, adjust mode of SRC to compensate. - -Tue Oct 28 14:36:45 1997 Richard Henderson - - * alpha.md (reload_inqi): Check for MEM before strict_memory_address_p, - since any_memory_operand() allows pseudos during reload. - (reload_inhi, reload_outqi, reload_outhi): Likewise. - -Tue Oct 28 11:53:14 1997 Jim Wilson - - * m68k.md (btst patterns): Add 5200 support. - -Tue Oct 28 11:58:40 1997 Toon Moene - - * fold-const.c (fold): For ((a * C1) / C3) or (((a * C1) + C2) / C3) - optimizations, look inside dividend to determine if the expression - can be simplified by using EXACT_DIV_EXPR. - -Tue Oct 28 10:19:01 1997 Jason Merrill - - From Brendan: - * dwarf2out.c (output_call_frame_info): Use l1 instead of ".". - -Tue Oct 28 00:32:14 1997 Richard Henderson - - * alpha.c (summarize_insn [SUBREG]): Propagate SET. - -Mon Oct 27 23:59:26 1997 Richard Henderson - - * alpha.c (alpha_handle_trap_shadows): Don't call get_attr_trap - on a CLOBBER. - -Mon Oct 27 21:25:20 1997 Richard Henderson - - * alpha.md (movqi, movhi): Make sure new insns created during reload - won't need reloading themselves. - (reload_inqi, reload_inhi, reload_outqi, reload_outhi): Likewise. - -Mon Oct 27 16:11:10 1997 Jeffrey A Law (law@cygnus.com) - - * mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Disable reg+reg. - -Sun Oct 26 13:50:44 1997 Richard Henderson - - * alpha.c (alpha_sa_mask [VMS]): Don't include $26 in the mask. - Patch from Klaus Kaempf . - -Sun Oct 26 13:31:47 1997 Jim Wilson (wilson@cygnus.com) - - * expr.c (expand_expr, case INDIRECT_REF): Optimize a reference - to an element in a constant string. - -Sun Oct 26 11:41:49 1997 Jason Merrill - - * dwarf2out.c (output_call_frame_info): The CIE pointer is now a 32 - bit PC-relative offset. The exception range table pointer is now in - the CIE. - * frame.c (dwarf_cie, dwarf_fde): Rename CIE_pointer to CIE_delta. - (count_fdes, add_fdes, get_cie): Adjust. - (cie_info, extract_cie_info, __frame_state_for): Adjust eh_ptr uses. - - From H.J. Lu: - * frame.c (count_fdes, add_fdes): Skip linked once FDE entries. - -Sun Oct 26 11:52:01 1997 Richard Henderson - - * alias.c (memrefs_conflict_p): Treat arg_pointer_rtx just - like stack_pointer_rtx. - -Sun Oct 26 11:32:16 1997 Manfred Hollstein - - * Makefile.in (bootstrap-lean): Combined with `normal' bootstrap - targets using "$@" to provide support for similar but not identical - targets without having to duplicate code. - (bootstrap4): New goal. - - * Makefile.in (compare, compare-lean, compare3): Combined to one - ruleset determining actions to be performed via $@. - (compare4, compare4-lean): New targets. - (gnucompare, gnucompare3): Combined to one ruleset determining - actions to be performed via $@. Also, note which files failed - the comparison test in .bad_compare. - (gnucompare-lean, gnucompare3-lean, gnucompare4-lean): New targets. - -Sun Oct 26 10:06:11 1997 Toon Moene - - * fold-const (fold): Also simplify FLOOR_DIV_EXPR to EXACT_DIV_EXPR - if the dividend is a multiple of the divisor. - -Sun Oct 26 09:21:40 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (LIBGCC2_CFLAGS): Add -fexceptions. - - * alias.c (find_base_term): Handle PRE_INC, PRE_DEC, POST_INC, - and POS_DEC. - - * alias.c (true_dependence): Fix typo. - - * toplev.c (flag_rerun_loop_opt): New variable. - (f_options): Handle -frerun-loop-opt. - (rest_of_compilation): If -frerun-loop-opt, then run the loop - optimizer twice. - (main): Enable -frerun-loop-opt by default for -O2 or greater. - - * loop.c (simplify_giv_expr): Adding two invariants results - in an invariant. - -Sun Oct 26 09:15:15 1997 Richard Henderson - - * expr.c (get_inner_reference): Remove the array bias after - converting the index to Pmode. - -Sat Oct 25 12:20:58 1997 Jeffrey A Law (law@cygnus.com) - - * mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug. - (TARGET_MULT_BUG): Define. - (TARGET_DEFAULT): Default to TARGET_MULT_BUG. - * mn10300.md (mulsi3): Handle TARGET_MULT_BUG. - -Fri Oct 24 17:40:34 1997 Jeffrey A Law (law@cygnus.com) - - * mn10200.c (indirect_memory_operand): Delete unused function. - * mn10200.h (EXTRA_CONSTRAINT): Handle 'R'. - * mn10200.md (bset, bclr insns): Handle output in a reg too. - -Fri Oct 24 15:54:57 1997 Richard Henderson - - * alpha.md (call patterns): Revert Oct 16 change; if we are to elide - the callee's ldgp, we must do it ourselves, and we use the jsr tag - for more than scheduling. - -Fri Oct 24 13:23:04 1997 Doug Evans - - * sparc/sparc.h (ASM_SPEC): Delete asm_arch. - -Fri Oct 24 13:19:40 1997 Jeffrey A Law (law@cygnus.com) - - * mn10300.c (symbolic_operand, legitimize_address): New functions. - * mn10300.h (LEGITIMIZE_ADDRESS): Call legitimize_address. - (GO_IF_LEGITIMATE_ADDRESS): Don't allow base + symbolic. - -Thu Oct 23 09:35:12 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Thu Oct 23 08:03:59 1997 J"orn Rennecke - - * dbxout.c (dbxout_start_new_source_file): Use output_quoted_string - for FILENAME. - -Wed Oct 22 00:34:12 1997 Jeffrey A Law (law@cygnus.com) - - * toplev.c (flag_exceptions): Default value is 2. - (compile_file): If flag_exceptions still has the value 2, then - set it to 0. - - * rs6000.c (struct machine_function): Add pic_offset_table_rtx. - (rs6000_save_machine_status): Save pic_offset_table_rtx. - (rs6000_restore_machine_status: Restore pic_offset_table_rtx. - - * local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions - are shared. - - * rs6000.md (*movsi_got_internal_mem): New pattern. - (*movsi_got_internal_mem splitter): New define_split. - -Tue Oct 21 18:14:03 1997 Jim Wilson - - * obstack.h (obstack_empty_p): Fix spurious space after backslash. - -Tue Oct 21 18:34:01 1997 Geoffrey KEATING - - * rs6000.c: Avoid creating a stack frame under SYSV ABI if we - only need to save LR. - -Tue Oct 21 10:06:40 1997 Jeffrey A Law (law@cygnus.com) - - * mn10300.md (movqi, movhi): Avoid using address registers as - destinations unless absolutely necessary. - - * mn10200.c (expand_prologue): Fix typo. - - * mn10200.h (GO_IF_LEGITIMATE_ADDRESS): Do not allow indexed - addresses. - * mn10200.md (neghi2): Provide an alternative which works if - the input and output register are the same. - - * mn10300.c (print_operand): Handle 'S'. - * mn10300.md (ashlsi3, lshrsi3, ashrsi3): Use %S for - shift amount in last alternative. - - * mn10300.c (expand_epilogue): Rework to handle register restores - in "ret" and "retf" instructions correctly. - -Mon Oct 20 16:47:08 1997 Jim Wilson - - * expmed.c (extract_bit_field): Don't make flag_force_mem disable - extzv for memory operands. - - * cse.c (simplify_ternary_operation, case IF_THEN_ELSE): Collapse - redundant conditional moves to single operand. - -Mon Oct 20 15:30:26 1997 Nick Clifton - - * v850.h: Move define of __v850__ from CPP_PREDEFINES - to CPP_SPEC. - - * xm-v850.h: Use __v850 rather than __v850__ to - identify v850 port. - -Mon Oct 20 14:15:02 1997 Jim Wilson - - * mips/mips.c (compute_frame_size): Not a leaf function if - profile_flag set. - -Mon Oct 20 14:16:38 1997 Geoffrey KEATING - - * rs6000/t-ppccomm: Use -msdata=none for crtstuff. - -Mon Oct 20 12:28:17 1997 Doug Evans - - * sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete. - (DEFAULT_ARCH32_P): New macro. - (TARGET_ARCH{32,64}): Allow compile time or runtime selection. - (enum cmodel): Declare. - (sparc_cmodel_string,sparc_cmodel): Declare. - (SPARC_DEFAULT_CMODEL): Provide default. - (TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}. - (TARGET_FULLANY): Deleted. - (TARGET_CM_MEDMID): New macro. - (CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC. - (ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC. - (CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch). - (CPP_SPEC): Rewrite. - (CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros. - (CPP_{ENDIAN,SUBTARGET}_SPEC): New macros. - (ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros. - (ASM_SPEC): Add %(asm_arch). - (EXTRA_SPECS): Rename cpp_default to cpp_cpu_default. - Rename asm_default to asm_cpu_default. - Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian, - cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch. - (NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH. - ({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values. - (MASK_INT64,MASK_LONG64): Delete. - (MASK_ARCH64): Renamed to MASK_64BIT. - (MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete. - (EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG. - (TARGET_SWITCHES): Always provide 64 bit options. - (ARCH64_SWITCHES): Delete. - (TARGET_OPTIONS): New option -mcmodel=. - (INT_TYPE_SIZE): Always 32. - (MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH. - (INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_.... - (FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support. - (PRINT_OPERAND_PUNCT_VALID_P): Add '_'. - * sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by - CPP_SPEC. - (CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC. - * sparc/linux.h: Likewise. - * sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete. - (ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC. - (TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT. - (SPARC_DEFAULT_CMODEL): Define. - (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC. - (CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC. - (LONG_DOUBLE_TYPE_SIZE): Define. - (ASM_SPEC): Add %(asm_arch). - * sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC. - (CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC. - (TARGET_CPU_DEFAULT): Add ultrasparc case. - * sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete. - (TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. - (SPARC_DEFAULT_CMODEL): Define. - * sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete. - (TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT. Delete - MASK_LONG64, MASK_MEDANY. - (SPARC_DEFAULT_CMODEL): Define. - (CPP_PREDEFINES): Delete. - (CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC. - (ASM_SPEC): Add %(asm_arch). - (LONG_DOUBLE_TYPE_SIZE): Define. - (DWARF2_DEBUGGING_INFO): Define. - * sparc/splet.h (CPP_SPEC): Delete. - * sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC. - (FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support. - (BLOCK_PROFILER): Likewise. - * sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals. - (sparc_override_options): Handle code model selection. - (sparc_init_expanders): Renamed from sparc64_init_expanders. - * sparc/sparc.md: TARGET_ renamed to TARGET_CM_.... - TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY. - (sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_.... - (sethi_di_fullany): Delete. - -Mon Oct 20 02:00:18 1997 Klaus Kaempf - Jeff Law - Richard Kenner - - * alpha/vms.h (DIVSI3_LIBCALL): OTS$ functions are upper case. - (DIVDI3_LIBCALL, UDIVSI3_LIBCALL, UDIVDI3_LIBVALL): Likewise. - (MODSI3_LIBCALL, MODDI3_LIBCALL): Likewise. - (UMODSI3_LIBCALL, UMODDI3_LIBCALL): Likewise. - * alpha/alpha.md (arg_home): Likewise. - - * alpha/alpha.c (vmskrunch): Delete. - * alpha/vms.h (ENCODE_SECTION_INFO, ASM_DECLARE_FUNCTION_NAME): Delete. - * alpha.c (output_prolog, VMS): Use alloca for entry_label and don't - truncate to 64 characters. - - * make-l2.com: Support openVMS/Alpha. - - * vmsconfig.com: Fix to work on openVMS/Alpha and openVMS/VAX. - -Sun Oct 19 19:00:35 1997 J"orn Rennecke - - * longlong.h (count_leading_zeros): Add missing casts to USItype. - -Sun Oct 19 18:44:06 1997 Jeffrey A Law (law@cygnus.com) - - * i386/bsd386.h (ASM_COMMENT_START): Define. - -Sat Oct 18 13:47:15 1997 Jason Merrill - - * tree.c (restore_tree_status): Also free up temporary storage - when we finish a toplevel function. - (dump_tree_statistics): Print stats for backend obstacks. - -Sat Oct 18 12:47:31 1997 Doug Evans - - * expr.c (use_group_regs): Don't call use_reg for MEMs. - -Sat Oct 18 09:49:46 1997 Jason Merrill - - * libgcc2.c (__throw): Don't copy the return address. - * dwarf2out.c (expand_builtin_dwarf_reg_size): Ignore return address. - - * except.c (exceptions_via_longjmp): Initialize to 2 (uninitialized). - * toplev.c (main): Initialize exceptions_via_longjmp. - - * tree.c: Add extra_inline_obstacks. - (save_tree_status): Use it. - (restore_tree_status): If this is a toplevel inline obstack and we - didn't want to save anything on it, recycle it. - (print_inline_obstack_statistics): New fn. - * function.c (pop_function_context_from): Pass context to - restore_tree_status. - * obstack.h (obstack_empty_p): New macro. - -Sat Oct 18 00:43:59 1997 Jeffrey A Law (law@cygnus.com) - - * i386/freebsd.h (ASM_COMMENT_START): Fix. - -Fri Oct 17 23:48:52 1997 Jim Wilson (wilson@cygnus.com) - - * v850.c (ep_memory_offset): New function. - (ep_memory_operand, substitute_ep_register, v850_reorg): Call it. - - * v850.h (CONST_OK_FOR_*): Add and correct comments. - (CONSTANT_ADDRESS_P): Add comment. - (EXTRA_CONSTRAINT): Define 'U'. - * v850.md: Add comments on bit field instructions. - (addsi3): Delete &r/r/r alternative. Add r/r/U alternative. - (lshrsi3): Use N not J constraint. - - * v850.md (v850_tst1+1): New define_split for tst1 instruction. - - * v850.c (reg_or_0_operand): Call register_operand. - (reg_or_int5_operand): Likewise. - * v850.h (MASK_BIG_SWITCH, TARGET_BIG_SWITCH): New macros. - (TARGET_SWITCHES): Add "big-switch". - (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT, CASE_VECTOR_MODE, - ASM_OUTPUT_BEFORE_BASE_LABEL): Add support for TARGET_BIG_SWITCH. - (CASE_DROPS_THROUGH): Comment out. - (CASE_VECTOR_PC_RELATIVE, JUMP_TABLES_IN_TEXT_SECTION): Define. - * v850.md (cmpsi): Delete compare mode. - (casesi): New pattern. - - * v850.h (CONST_OK_FOR_N): Delete redundant compare against zero. - * v850.md (ashlsi3): Use SImode not QImode for shift count. - (lshrsi3): Likewise. - - * v850.c (print_operand): Add 'c', 'C', and 'z' support. Delete - unreachable switch statement after 'b' support. Remove "b" from - strings for 'b' support. - * v850.md (branch_normal, branch_invert): Change %b to b%b. - -Fri Oct 17 23:33:20 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (LIBGCC2_CFLAGS): Avoid a backslash then an - empty line if @inhibit_libc@ is empty. - -Fri Oct 17 23:24:40 1997 Robert Lipe (robertl@dgii.com) - - * i386/sco5.h: Let ELF use dwarf2 unwinding. COFF uses sjlj. - (EH_FRAME_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP_ELF): Defined. - (EH_FRAME_SECTION_ASM_OP_COFF): Likewise. - (DWARF2_UNWIND_INFO): Let this track object file format. - (EXTRA_SECTIONS): Add in_eh. - (EH_FRAME_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP_ELF): Define. - (EH_FRAME_SECTION_ASM_OP_COFF): Likewise. - -Fri Oct 17 17:13:42 1997 David S. Miller - - * sparc/linux64.h (LINK_SPEC): Dynamic linker is ld-linux64.so.2. - * sparc/sparc.h (FUNCTION_PROFILER): Fix format string when - TARGET_MEDANY. - * sparc/sparc.c (dwarf2out_cfi_label): Extern no longer needed. - (output_double_int): Output DI mode values correctly when - HOST_BITS_PER_WIDE_INT is 64. - (output_fp_move_quad): If TARGET_V9 and not TARGET_HARD_QUAD, use - fmovd so it works if a quad float ends up in one of the upper 32 - float regs. - * sparc/sparc.md (pic_{lo_sum,sethi}_di): New patterns - necessary for PIC support on sparc64. - -Fri Oct 17 13:39:56 1997 Doug Evans - - * sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS. - * sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64. - (PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define. - (SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros. - (SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros. - (SPARC_FP_ARG_FIRST): New macro. - (CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now. - (REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs. - (NPARM_REGS): There are 32 fp argument registers now. - (FUNCTION_ARG_REGNO_P): Likewise. - (FIRST_PARM_OFFSET): Update to new v9 abi. - (REG_PARM_STACK_SPACE): Define for arch64. - (enum sparc_arg_class): Delete. - (sparc_arg_count,sparc_n_named_args): Delete. - (struct sparc_args): Redefine and use for arch32 as well as arch64. - (GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete. - (FUNCTION_ARG_ADVANCE): Rewrite. - (FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite. - (FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite. - (FUNCTION_ARG_CALLEE_COPIES): Delete. - (FUNCTION_ARG_{PADDING,BOUNDARY}): Define. - (STRICT_ARGUMENT_NAMING): Define. - (doublemove_string): Declare. - * sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete. - (single_move_string): Use GEN_INT, and HOST_WIDE_INT. - (doublemove_string): New function. - (output_move_quad): Clean up some of the arch64 support. - (compute_frame_size): Add REG_PARM_STACK_SPACE if arch64. - Don't add 8 bytes of reserved space if arch64. - (sparc_builtin_saveregs): Combine arch32/arch64 versions. - (init_cumulative_args): New function. - (function_arg_slotno): New static function. - (function_arg,function_arg_partial_nregs): New functions. - (function_arg_{pass_by_reference,advance}): New functions. - (function_arg_padding): New function. - * ginclude/va-sparc.h: Rewrite v9 support. - -Fri Oct 17 12:29:48 1997 Christian Iseli - - * regclass.c (record_address_regs): Look at REG_OK_FOR_{BASE,INDEX}_P - for hard regs to determine base and index registers. - - * reload.c (debug_reload_to_stream): New function. Specify stream - into which to write debug info. - (debug_reload): Modify to call debug_reload_to_stream with stderr. - -Thu Oct 16 15:07:51 1997 Richard Henderson - - * combine.c (can_combine_p): Don't combine with an asm whose - output is a hard register. - -Thu Oct 16 15:43:26 1997 Mike Stump - - * c-decl.c (start_struct): Ensure that structs with forward - declarations are in fact packed when -fpack-struct is given. - - * stor-layout.c (layout_record): Ignore STRUCTURE_SIZE_BOUNDARY if - we are packing a structure. This allows a structure with only - bytes to be aligned on a byte boundary and have no padding on a - m68k. - -Thu Oct 16 15:17:54 1997 Richard Kenner - - * rs6000.h (ROUND_TYPE_ALIGN): Don't blow up if no fields in record. - -Thu Oct 16 11:20:30 1997 Richard Henderson - - * alpha.c (alpha_return_addr_rtx): New variable. - (alpha_save_machine_status): New; save it. - (alpha_restore_machine_status): New; restore it. - (alpha_init_expanders): New; clear it. - (alpha_return_addr): New; set it. - (alpha_ra_ever_killed): New; if alpha_return_addr_rtx, regs_ever_live - is overly conservative, so search the insns explicitly. - (alpha_sa_mask [VMS]): Check alpha_ra_ever_killed. - (alpha_sa_size [VMS && !VMS]): Likewise. - * alpha.h (RETURN_ADDR_RTX): Call alpha_return_addr. - (INIT_EXPANDERS): New definition. - - * alpha.c: Move REG_PV, REG_RA somewhere more visible in the file. - (output_prolog [!VMS]): Use them. - - * alpha.c (output_prolog [!VMS]): Move gp detection to ... - (alpha_does_function_need_gp): ... a new function. Refine the - CALL_INSN test to just TYPE_JSR. - * alpha.md (most call insns): Fix some jsr/ibr type transpositions. - -Thu Oct 16 09:36:47 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Wed Oct 15 21:38:18 1997 Richard Kenner - - * pa.c (move_operand): Respect -mdisable-indexing. - * pa.h (GO_IF_LEGITIMATE_ADDRESS): Likewise. - -Wed Oct 15 21:34:45 1997 David Edelsohn - - * rs6000.md (udivsi3, divsi3): Split into MQ and non-MQ cases for - PPC601. - (umulsidi3,umulsi3_highpart): Likewise. - (smulsi3_highpart_no_mq): Add !TARGET_POWER. - -Wed Oct 15 18:21:46 1997 Richard Henderson - - * alpha.c (final_prescan_insn): Gut, remove and transform to ... - (alpha_handle_trap_shadows): ... a new function. Handle the entire - function in one go. Emit RTL for trapb, instead of printf directly. - (alpha_reorg): New function. Call alpha_handle_trap_shadows. - (trap_pending): Kill global variable. - (output_epilog): Don't call final_prescan_insn. - (struct shadow_summary): Elide $31 and $f31; now it fits in a word. - * alpha.h (FINAL_PRESCAN_INSN): Remove. - (MACHINE_DEPENDENT_REORG): Define. - * alpha.md (jsr patterns with trapb): Stupid and useless. Kill. - (trapb): New insn. - -Wed Oct 15 18:16:05 1997 Richard Henderson - - Tune Haifa scheduler for Alpha: - * alpha.h (ISSUE_RATE): Define. - * alpha.c (alpha_adjust_cost): Handle EV5 mult delay; don't apply - EV4 adjustments to EV5. - * alpha.md: Remove all scaling from function unit delays. Rework - EV5 function units to match the CPU. - (umuldi3_highpart): EV5 added the IMULH insn class. - -Wed Oct 15 17:42:41 1997 Jeffrey A Law (law@cygnus.com) - - * pa.c (following_call): Fail if the CALL_INSN is an indirect - call. - -Tue Oct 14 12:01:00 1997 Mark Mitchell - - * cplus-dem.c (demangle_signature): Don't look for return types on - constructors. Handle member template constructors. - -Tue Oct 14 11:30:29 1997 Jason Merrill - - * tree.c (expr_tree_cons, build_expr_list, expralloc): New fns. - * tree.h: Declare them. - -Fri Oct 10 13:46:56 1997 Doug Evans - - * configure.in: Handle --with-newlib. - * Makefile.in (LIBGCC2_CFLAGS): Add @inhibit_libc@. - - * sparc/t-sp64 (LIBGCC2_CFLAGS): Delete. - -Wed Oct 8 14:37:44 1997 Jeffrey A Law (law@cygnus.com) - - * config/ptx4.h: Fix typo. - -Wed Oct 8 08:57:20 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Tue Oct 7 16:27:34 1997 Manfred Hollstein - - * aclocal.m4: Substitute INSTALL. - * configure: Re-built. - -Tue Oct 7 15:37:35 1997 Jeffrey A Law (law@cygnus.com) - - * integrate.c (save_for_inline_copying): Avoid undefined pointer - operations. - (expand_inline_function): Likewise. - - * dwarf2out.c (output_call_frame_info): Reinstate last change - using flag_debug_asm check instead of flag_verbose_asm. - -Tue Oct 7 12:57:26 1997 Jim Wilson - - * dwarf2out.c (output_call_frame_info): Remove last change. - -1997-10-04 Andreas Schwab - - * frame.c (__frame_state_for): Execute the FDE insns until the - current pc value is strictly bigger than the target pc value. - -Tue Oct 7 11:00:42 1997 Jason Merrill - - * regclass.c (init_reg_modes): If we can't find a mode for the - register, use the previous one. - -Tue Oct 7 10:55:34 1997 Richard Henderson - - * haifa-sched.c (print_block_visualization): Call fprintf directly, - don't sprintf through an alloca'ed buffer. - -Tue Oct 7 10:52:29 1997 Thomas Koenig (ig25@rz.uni-karlsruhe.de) - - * reload.c (decompose): Always initialize val.base. - -Tue Oct 7 10:19:26 1997 Manfred Hollstein (manfred@lts.sel.alcatel.de) - - * m68k/mot3300.h (ASM_OUTPUT_ALIGN): Accept any alignment - instead of aborting. - * dwarf2out.c (output_call_frame_info): Call app_enable and - app_disable to let GNU as accept the generated comments. - -Tue Oct 7 11:41:21 1997 Michael Meissner - - * tree.h (get_file_function_name): Add declaration. - * dwarf2out.c (output_call_frame_info): No need to cast - get_file_function_name call anymore. - * profile.c (toplevel): Remove get_file_function_name - declaration. - * c-lang.c (finish_file): Likewise. - -Tue Oct 7 10:01:45 1997 Chip Salzenberg - - * Makefile.in (program_transform_name): Let autoconf substitute - the correct value. - -Tue Oct 7 09:54:35 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (schedule_block): If the first real insn in a - block has any special notes attached to it, remove them. - -Tue Oct 7 09:48:51 1997 Richard Henderson - - * alpha.h (FLOAT_STORE_FLAG_VALUE): It's 2.0 not 0.5. - -Mon Oct 6 12:47:32 1997 Manfred Hollstein (manfred@lts.sel.alcatel.de) - - * m88k.c (m88k_begin_prologue): Remove superfluous backslash. - -Mon Oct 6 12:04:24 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (check-g77): New test target. - (CHECK-TARGETS): Add check-g77. - -Fri Oct 3 11:56:36 1997 Jason Merrill - - * toplev.c (rest_of_compilation): Defer all non-nested inlines. - -Fri Oct 3 15:49:27 1997 Michael Meissner - - * flow.c (print_rtl_with_bb): Cast alloca return value for - in_bb_p. - -Thu Oct 2 21:15:03 1997 Richard Henderson - - * i386.h (RETURN_ADDR_RTX): New definition that works for - __builtin_return_address(0) and -fomit-frame-pointer. - -Wed Oct 1 13:43:53 1997 Jim Wilson - - Bring over from FSF. - Tue Aug 5 16:10:45 1997 Jason Merrill - - * mips.c (function_arg): Handle passing a struct - containing a double in a DFmode register without the PARALLEL. - -Wed Oct 1 11:13:25 1997 Ian Lance Taylor - - * pexecute.c: Use spawn if __CYGWIN32__. - - * pexecute.c: Include "config.h" first, as per autoconf manual - (from Paul Eggert ). - -Wed Oct 1 01:44:36 1997 Philippe De Muyter - - * m68k/x-mot3300 (XCFLAGS): Disable as's long/short jump - optimization for f/expr.o and f/stb.o. - -Tue Sep 30 23:48:57 1997 Jeffrey A Law (law@cygnus.com) - - * cse.c (this_insn_cc0_mode): Initialize. - -Tue Sep 30 23:09:40 1997 Thomas Koenig - - * cccp.c (expand_to_temp_buffer): Initialize all members of obuf. - - * haifa-sched.c (get_block_head_tail): Remove unneeded initialization. - -Tue Sep 30 23:06:43 1997 Richard Henderson - - * alpha.md (beq): For registers and ints 0-255, use cmpeq+bne, since - that pair will dual-issue on the 21164 and plus+beq won't. - (bne): Likewise for cmpeq+beq. - -Tue Sep 30 16:07:58 1997 Jim Wilson - - * except.c (find_exception_handler_labels): Correct argument to free. - -Tue Sep 30 11:00:00 1997 Brendan Kehoe - - * except.c (find_exception_handler_labels): Free LABELS when we're - done. - -Mon Sep 29 14:04:35 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Sep 29 10:51:53 1997 Jason Merrill - - * flow.c (find_basic_blocks): Mark calls as potentially jumping - to the EH labels. - -Mon Sep 29 09:58:06 1997 Jeffrey A Law (law@cygnus.com) - - * configure.in: Substitute for "install" too. - * configure: Rebuilt. - -Mon Sep 29 00:38:42 1997 Aaron Jackson - - * Makefile.in (bootstrap-lean, compare-lean): New targets. - -Mon Sep 29 00:18:16 1997 Richard Henderson (rth@cygnus.com) - - * alias.c (base_alias_check): Two symbols can conflict if they - are accessed via AND. - (memrefs_conflict_p): Likewise. - - * alpha.h (SETUP_INCOMING_VARARGS): Emit a blockage insn - after flushing argument registers to the stack. - - * Makefile.in (mostlyclean): Remove .regmove files. - -Sun Sep 28 18:59:58 1997 Jason Merrill - - * libgcc2.c (__throw): Fix thinko. - -Sun Sep 28 12:00:52 1997 Mark Mitchell - - * cplus-dem.c (demangle_template): Add new parameter. Handle new - template-function mangling. - (consume_count_with_underscores): New function. - (demangle_signature): Handle new name-mangling scheme. - -Sun Sep 28 01:55:04 1997 Philippe De Muyter - - * flow.c (print_rtl_with_bb): Cast alloca return values for variables - start and end. - -Sun Sep 28 01:05:16 1997 Jeffrey A Law (law@cygnus.com) - - * frame.c: Remove last change. - * dwarf2.h: Remove last change. - * tree.h: Add declarations of DWARF2 unwind info support - functions. - -Sat Sep 27 11:02:38 1997 Jason Merrill - - * c-decl.c (init_decl_processing): Add __builtin_dwarf_reg_size. - * tree.h (built_in_function): Likewise. - * expr.c (expand_builtin): Likewise. - * except.h: Likewise. - * dwarf2out.c (expand_builtin_dwarf_reg_size): New fn. - * libgcc2.c (copy_reg): New fn. - (__throw): Use it. - -Fri Sep 26 08:54:59 1997 Paul Eggert - - * c-typeck.c (build_binary_op): Warn about comparing signed vs - unsigned if -W is specified and -Wno-sign-compare is not. - * c-decl.c (warn_sign_compare): Initialize to -1. - (c_decode_option): -Wall no longer implies -Wsign-compare. - -Fri Sep 26 09:00:13 1997 Andreas Schwab - - * frame.c: Include gansidecl.h for PROTO. - * dwarf2out.c: Move inclusion of dwarf2.h down so that PROTO is - defined. Don't declare dwarf2out_cfi_label here. - * dwarf2.h: Add declarations of DWARF2 unwind info support - functions. - * m68k.c: Include dwarf2.h. - (output_function_prologue): Add dwarf2 support. - * m68k.h (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_REGNUM): New macros. - (INCOMING_FRAME_SP_OFFSET): Likewise. - - * integrate.c (expand_inline_function): Make sure there is at - least one insn that can be used as an insertion point. - -Wed Sep 24 21:34:06 1997 Jason Merrill - - * dwarf2out.c: s/flag_verbose_asm/flag_debug_asm/ - -Wed Sep 24 22:05:30 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Wed Sep 24 17:36:23 1997 Doug Evans - - Bring over from FSF. - - Wed Sep 24 19:17:08 1997 Doug Evans - - * sparc/sparc.md (get_pc_via_call): Renamed from get_pc_sp32. - (get_pc_via_rdpc): Renamed from get_pc_sp64. - * sparc/sparc.c (finalize_pic): Update call to gen_get_pc_via_call. - - Wed Sep 24 18:38:22 1997 David S. Miller - - * sparc/sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc. - (TARGET_OPTIONS): Add -malign-loops=, -malign-jumps=, - -malign-functions=. - (sparc_align_{loops,jumps,funcs}_string): Declare. - (sparc_align_{loops,jumps,funcs}): Declare. - (DEFAULT_SPARC_ALIGN_FUNCS): New macro. - (FUNCTION_BOUNDARY): Use sparc_align_funcs. - (STACK_BIAS): Define. - (SPARC_SIMM*_P): Cast to unsigned HOST_WIDE_INT first, then perform - test. - (SPARC_SETHI_P): New macro. - (CONST_OK_FOR_LETTER_P): Use it. - (ASM_OUTPUT_ALIGN_CODE): Define. - (ASM_OUTPUT_LOOP_ALIGN): Define. - * sparc/sparc.c (sparc_align_{loops,jumps,funcs}_string): New globals. - (sparc_align_{loops,jumps,funcs}): New globals. - (sparc_override_options): Handle -malign-loops=, -malign-jumps=, - -malign-functions=. - (move_operand): Use SPARC_SETHI_P. - (arith_double_operand): Cast to unsigned HOST_WIDE_INT first, then - perform test. - (arith11_double_operand): Likewise. - (arith10_double_operand): Likewise. - (finalize_pic): Finish sparc64 support. - (emit_move_sequence): Use SPARC_SETHI_P. Simplify low part of - 64 bit constants if able. - (output_fp_move_quad): Don't use fmovq unless TARGET_HARD_QUAD. - (sparc_builtin_saveregs, sparc64 case): Don't save fp regs if - ! TARGET_FPU. - * sparc/sparc.md (*): Use GEN_INT instead of gen_rtx. - (get_pc_sp32): Use for sparc64 as well. - (lo_sum_di_sp{32,64}): Fix handling on 64 bit hosts. - (sethi_di_sp64_const): Likewise. - (movtf_cc_sp64): Check TARGET_HARD_QUAD. - (cmp_zero_extract_sp64): Use unsigned HOST_WIDE_INT in cast. - (ashlsi3, ashldi3, ashrsi3, ashrdi3, lshrsi3, lshrdi3): Likewise. - - Tue Sep 23 19:02:46 1997 Doug Evans - - * sparc/linux-aout.h (COMMENT_BEGIN): Delete. - * sparc/linux.h (COMMENT_BEGIN): Likewise. - * sparc/linux64.h (COMMENT_BEGIN): Likewise. - - Tue Sep 23 14:48:18 1997 David S. Miller - - Add sparc64 linux support. - * configure.in (sparc64-*-linux*): Recognize. Add sparc/xm-sparc.h - to xm_file list on 32-bit sparc-linux. - * sparc/xm-sp64.h: New file. - * sparc/linux64.h: New file. - * sparc/xm-linux.h: Include some standard headers if not inhibit_libc. - Don't include xm-sparc.h. - * config/xm-linux.h (HAVE_PUTENV, HAVE_ATEXIT): Define. - * glimits.h (LONG_MAX): Handle sparc64. - - Sat Sep 20 03:07:54 1997 Doug Evans - - * sparc/sysv4.h (ASM_COMMENT_START): Delete. - * sparc.h (ASM_COMMENT_START): Define. - * sparc.c (output_function_prologue): Use it. - (sparc_flat_output_function_{epi,pro}logue): Likewise. - - Wed Sep 17 15:04:19 1997 Doug Evans - - * sparc/sysv4.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Delete, - use sparc.h's copies. - * sparc/sparc.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Print - ascii form as well. - - Mon Sep 8 08:45:19 1997 Richard Kenner - - * sparc.c (dwarf2out_cfi_label): Add declaration. - (save_regs, output_function_prologue): Remove cast for it. - (sparc_flat_{save_restore,output_function_prologue): Likewise. - ({save,restore}_regs): No longer inline. - -Tue Sep 23 12:34:51 1997 Richard Kenner - - * fold-const.c (make_range): Correctly handle cases of converting - from unsigned to signed type. - -Tue Sep 23 12:34:51 1997 Bernd Schmidt - - * fold-const.c (merge_ranges): Make sure that if one range is subset - of another, it will always be the second range. Correct (+,-) case to - account for this. - -Tue Sep 23 08:32:51 1997 Jason Merrill - - * final.c (final_end_function): Also do dwarf2 thing if - DWARF2_DEBUGGING_INFO. - (final_start_function): Likewise. - -Tue Sep 23 01:15:50 1997 David S. Miller - - * expmed.c (expand_divmod): If compute_mode is not the same as - mode, handle the case where convert_modes() causes op1 to no - longer be a CONST_INT. - - * reorg.c (dbr_schedule): At end of this pass, add REG_BR_PRED - note holding get_jump_flags() calculation to all JUMP_INSNs. - * rtl.h (enum reg_note): New note types REG_BR_PRED and REG_SAVE_AREA. - * rtl.c (reg_note_name): Add new note types. - -Tue Sep 23 00:59:54 1997 Jeffrey A Law (law@cygnus.com) - - * rtlanal.c (computed_jump_p): Fix typo in last change. - -Tue Sep 23 00:42:44 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * loop.c (indirect_jump_in_function_p): Return 0 - by default. - -Tue Sep 23 00:33:55 1997 Jeffrey A Law (law@cygnus.com) - - * rs6000/xm-rs6000.h: Fix thinko in last change. - * rs6000/xm-sysv4.h: Likewise. - -Mon Sep 22 19:33:53 1997 Jim Wilson - - * mips.c (save_restore_insns): Only set RTX_FRAME_RELATED_P if store_p. - -Mon Sep 22 14:41:00 1997 Jeffrey A Law (law@cygnus.com) - - * reg-stack.c (find_blocks): Fix thinko in last change. - -1997-09-21 Andreas Schwab - - * m68k.c (output_function_prologue): Add dwarf2 support. - - * m68k.h (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_REGNUM, - INCOMING_FRAME_SP_OFFSET): New definitions. - -Mon Sep 22 11:36:42 1997 David S. Miller - - * combine.c (try_combine): Use NULL_RTX instead of '0' where - appropriate in calls to gen_rtx(). - * cse.c (cse_main): Likewise. - * emit-rtl.c (gen_label_rtx): Likewise. - * expr.c (init_expr_once): Likewise. - * haifa-sched.c (flush_pending_lists, sched_analyze_insn, - sched_analyze, init_rgn_data_dependences, - compute_block_backward_dependences): Likewise. - * sched.c (schedule_insns): Likewise. - * varasm.c (immed_double_const): Likewise. - - * sparc.h (INCOMING_FRAME_SP_OFFSET): Define to - SPARC_STACK_BIAS for sake of dwarf2 on sparc64. - -Mon Sep 22 11:21:33 1997 J. Kean Johnston - - * i386/sco5.h: Make ELF default file format and add -mcoff/-melf.. - (MULTILIB_DEFAULTS): Define. - (ASM_SPEC, CPP_SPEC): Handle -mcoff. - (STARTFILE_SPEC, ENDFILE_SPEC, LINK_SPEC): Likewise. - (LIBGCC_SPEC): Likewise. - (MASK_COFF, TARGET_COFF, TARGET_ELF): Define. - (SUBTARGET_SWITCHES): Add -mcoff and -melf. - * i386/t-sco5 (CRTSTUFF_T_CFLAGS): Add -fPIC. - (CRTSTUFF_T_CFLAGS_S): Tweak for COFF. - (EXTRA_PARTS, TAROUTOPTS): Delete. - (libgcc1-elf, libgcc2-elf, libgcc-elf targets): Delete. - (MULTILIB_OPTIONS): Define. - (MULTILIB_DIRNAMES, MULTILIB_EXCEPTIONS): Likewise. - (MULTILIB_MATCHE, MULTILIB_EXTRA_OPTS): Likewise. - -Mon Sep 22 02:10:43 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Sep 21 17:45:45 1997 Jeffrey A Law (law@cygnus.com) - - * loop.c (loop_number): Delete function. Change all references - to use uid_loop_num array. - * loop.h (loop_number): Delete declaration. - * unroll.c (unroll_loop): Change "loop_number" references to - use uid_loop_num instead. - - * loop.c (loop_unroll_factor): Move outside #ifdef HAIFA - conditional. - (loop_unroll_iter): Remove unused variable and all references. - (loop_optimize): Always allocate and clear space for loop_unroll_factor. - (insert_bct): Fix minor formatting problems. - * loop.h (loop_unroll_factor): Move decl outside #ifdef HAIFA. - (loop_unroll_iter): Removed unused decl. - * unroll.c (unroll_loop): Remove code to set loop_unroll_iter. - Always record the unrolling factor. - - * cse.c (simplify_relational_operation): Set h0u just like h0s. - Similarly for h1u and h1s. - - * flow.c (jmp_uses_reg_or_mem): Deleted unused function. - (find_basic_blocks): Use computed_jump_p to determine if a - particular JUMP_INSN is a computed jump. - * reg-stack.c (find_blocks): Use computed_jump_p to determine - if a particular JUMP_INSN is a computed jump. - * rtlanal.c (jmp_uses_reg_or_mem): New function. - (computed_jump_p): Likewise. - * rtl.h (computed_jump_p): Declare. - * genattrtab.c (pc_rtx): Define and initialize. - * loop.c (loop_optimize): Always determine if the current - function has a computed jump. - (indirect_jump_in_function_p): Use computed_jump_p to determine - if a particular JUMP_INSN is a computed jump. - - * loop.c (fix_bct_param): Delete unused function. - (check_bct_param): Likewise. - -Sat Sep 20 16:22:06 1997 Jason Merrill - - * frame.c (__deregister_frame): Check properly for initialized object. - -Fri Sep 19 20:51:03 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * alpha/linux.h (HANDLE_SYSV_PRAGMA): Defined. - -Fri Sep 19 18:53:50 1997 J"orn Rennecke - - * jump.c (thread_jumps): Check can_reverse_comparison_p before - threading a reversed-condition jump. - - * sched.c (update_flow_info): Don't pass SCRATCH to dead_or_set_p. - * haifa-sched.c (update_flow_info): Likewise. - -Thu Sep 18 21:13:40 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (BOOT_CFLAGS): Use -O2. - - * configure.in (strtoul, bsearch): Have autoconf check for these - functions. - * configure, config.in: Rebuilt. - - * m68k/xm-mot3300.h (alloca): Properly declare if __STDC__. - * mips/mips.h (alloca): Likewise. - * rs6000/xm-rs6000.h (alloca): Likewise. - * rs6000/xm-sysv4.h: Likewise. - -Thu Sep 18 14:22:22 1997 Jason Merrill - - * final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code. - * dwarf2out.c (dwarf2out_frame_debug): Pass the whole insn along. - (dwarf2out_stack_adjust): A BARRIER resets the args space to 0. - - * except.c (end_eh_unwinder): Subtract 1 from return address. - * libgcc2.c (__throw): Likewise. - (find_exception_handler): Don't change PC here. Compare end with >. - -Thu Sep 18 10:43:07 1997 Nick Clifton - - * v850.c (compute_register_save_size): Correct register - number. - * v850.md (save_interrupt, return_interrupt): Correct - register number. - * v850/lib1funcs.asm (save_interrupt): Correct register number. - (return_interrupt): Use stack pointer, not element pointer. - -1997-09-18 Brendan Kehoe - - * configure.in, configure: Make sure to create the stage* and include - symbolic links in each subdirectory. - -Thu Sep 18 01:47:06 1997 Jeffrey A Law (law@cygnus.com) - - * pa.md (reload_peepholes): Don't allow addresses with side - effects for the memory operand. - -Wed Sep 17 18:19:53 1997 Jason Merrill - - * libgcc2.c (find_exception_handler): Subtract one from our PC when - looking for a handler, to avoid hitting the beginning of the next - region. - - * except.c (expand_builtin_set_return_addr_reg): Use force_operand. - -Wed Sep 17 18:33:59 1997 Jeffrey A Law (law@cygnus.com) - - * mips/abi64.h (LONG_MAX_SPEC): Define. - * mips.h (LONG_MAX_SPEC): Define. - (CPP_SPEC): Include long_max_spec. - (EXTRA_SPECS): Include long_max_spec. - -Wed Sep 17 14:11:38 1997 Jeffrey A Law (law@cygnus.com) - - * v850.c (construct_save_jarl): Fix thinko in last change. - -Wed Sep 17 09:53:07 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Tue Sep 16 14:22:36 1997 Jason Merrill - - * libgcc2.c (find_exception_handler): Not found is -1. - - * integrate.c (expand_inline_function): Move expand_start_bindings - after expanding the arguments. - -Tue Sep 16 11:13:46 1997 Jim Wilson - - * expr.c (expand_expr): Remove previous incorrect change. - If target and slot has no DECL_RTL, then call mark_addressable - again for the slot after we give it RTL. - -Tue Sep 16 09:18:52 1997 Jason Merrill (jason@cygnus.com) - - * expr.c (expand_expr, case TARGET_EXPR): Call mark_addressable - again for the slot after we give it RTL. - -Tue Sep 16 00:13:20 1997 Nick Clifton - - * v850.c (register_is_ok_for_epilogue, - pattern_is_ok_for_epilogue, construct_restore_jr, - pattern_is_ok_for_prologue, construct_save_jarl): New functions. - - * v850.h (pattern_is_ok_for_prologue, - pattern_is_ok_for_epilogue, register_is_ok_for_epilogue): New - predicates. - - * v850.md: Replace prologue and epilogue patterns with a - match_parallel pattern. - -Mon Sep 15 22:53:01 1997 Jeffrey A Law (law@cygnus.com) - - * aclocal.m4: Add replacement for AC_PROG_INSTALL. - * configure.in: Use EGCS_PROG_INSTALL. - -Mon Sep 15 22:40:55 1997 Jim Wilson (wilson@cygnus.com) - - * dwarf2out.c (gen_subprogram_die): Handle redefinition of an - extern inline function. - -Mon Sep 15 22:40:55 1997 Richard Henderson (rth@cygnus.com) - - * dwarf2out.c (reg_loc_descriptor): Fix prototype. - (concat_loc_descriptor): New function. - (loc_descriptor): Call it. - (add_AT_location_description): Also elide the descriptor if both - halves of a CONCAT are pseudos. - (add_location_or_const_value_attribute): Recognize CONCAT too. - -Mon Sep 15 15:24:00 1997 Richard Henderson - - * alpha.md (movdi): Handle CONST_DOUBLE for TARGET_BUILD_CONSTANTS. - - * alpha/alpha.c (output_prolog): New variable sa_reg. Use it for - out-or-range reg_offset. - (output_epilog): Likewise. - -Mon Sep 15 15:39:26 1997 Jeffrey A Law (law@cygnus.com) - - * cse.c (simplify_relational_operation): If MODE specifies a - mode wider than HOST_WIDE_INT, then the high word of a CONST_INT - is derived from the sign bit of the low word. - -Mon Sep 15 11:43:38 1997 Jason Merrill - - Support dwarf2 unwinding on PUSH_ROUNDING targets like the x86. - - * dwarf2.h: Add DW_CFA_GNU_args_size. - * frame.c (execute_cfa_insn): Likewise. - * dwarf2out.c (dwarf_cfi_name, output_cfi): Likewise. - (dwarf2out_args_size, dwarf2out_stack_adjust): New fns. - (dwarf2out_frame_debug): If this isn't a prologue or epilogue - insn, hand it off to dwarf2out_stack_adjust. - (dwarf2out_begin_prologue): Initialize args_size. - * frame.h (struct frame_state): Add args_size. - * libgcc2.c (__throw): Use args_size. - * final.c (final_scan_insn): If we push args, hand off all insns - to dwarf2out_frame_debug. - * defaults.h (DWARF2_UNWIND_INFO): OK for !ACCUMULATE_OUTGOING_ARGS. - - * dwarf2out.c dwarf2out_frame_debug): Fix typo. - Handle epilogue restore of SP from FP. - * emit-rtl.c (gen_sequence): Still generate a sequence if the - lone insn has RTX_FRAME_RELATED_P set. - - * frame.c (extract_cie_info): Handle "e" augmentation. - * dwarf2out.c (ASM_OUTPUT_DWARF_*): Provide definitions in the - absence of UNALIGNED_*_ASM_OP. - (UNALIGNED_*_ASM_OP): Only provide defaults if OBJECT_FORMAT_ELF. - (output_call_frame_info): Use "e" instead of "z" for augmentation. - Don't emit augmentation fields length. - (dwarf2out_do_frame): Move outside of #ifdefs. - * defaults.h (DWARF2_UNWIND_INFO): Don't require unaligned data - opcodes. - - * sparc.h (UNALIGNED_INT_ASM_OP et al): Don't define here after all. - * sparc/sysv4.h (UNALIGNED_INT_ASM_OP): Define here. - * sparc/sunos4.h (DWARF2_UNWIND_INFO): Define to 0. - * sparc/sun4gas.h: New file. - * configure.in: Use sun4gas.h if SunOS 4 --with-gnu-as. - - * collect2.c (write_c_file_stat, write_c_file_glob): Declare - __register_frame_table and __deregister_frame. - -1997-09-15 Brendan Kehoe - - * except.c (find_exception_handler_labels): Use xmalloc instead of - alloca, since MAX_LABELNO - MIN_LABELNO can be more than 1 million - in some cases. - -Sun Sep 14 21:01:23 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in: Various changes to build info files - in the object tree rather than the source tree. - -Sun Sep 14 12:24:30 1997 Jeffrey A Law (law@cygnus.com) - - * fixinc.math: New file to fix math.h on some systems. - * configure.in (freebsd, netbsd): Use fixinc.math on these - systems. - * configure: Rebuilt. - -Sun Sep 14 11:11:05 1997 Jeffrey A Law (law@cygnus.com) - - * regmove.c (regmove_optimize): If we end up moving the - original insn due to lifetime overlaps, make sure to move - REG_NOTES too. - -Sat Sep 13 15:51:11 1997 Manfred Hollstein - - * Makefile.in (INSTALL_{PROGRAM,DATA}): Use value found by configure. - -Sat Sep 13 12:57:26 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (add_branch_dependences): Make each insn in - a SCHED_GROUP_P block explicitly depend on the previous insn. - -Fri Sep 12 13:49:58 1997 Jason Merrill - - * except.h: Prototype dwarf2 hooks. - * expr.c: Adjust. - -Thu Sep 11 17:43:55 1997 Jim Wilson - - * configure.in (native_prefix): Delete. - (mips-dec-netbsd): Don't set prefix. - (*linux*): Don't set prefix. - -Thu Sep 11 15:48:32 1997 Fred Fish - - * protoize.c: Include only if HAVE_VARARGS_H is - defined. If not defined, include if - HAVE_SYS_VARARGS_H is defined. - * configure.in: Test for varargs.h and sys/varargs.h. - * configure: Regenerate with autoconf. - * config.in: Regenerate with autoheader. - - * cpplib.c (quote_string): Cast first arg of sprintf call - from "unsigned char *" to "char *". - (output_line_command): Likewise. - (macroexpand): Likewise. - (do_line): Cast atoi arg from "unsigned char *" to "char *". - -Wed Sep 10 21:37:30 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - - * Makefile.in (compare): Exit with nonzero status if there - are comparison failures. Note which files failed the - comparison test in .bad_compare. - -Wed Sep 10 17:05:46 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * config/alpha/elf.h (CPP_PREDEFINES): Remove -D__PIC__ -D__pic__. - -Wed Sep 10 16:37:28 1997 Fred Fish - - * Makefile.in (LN, LN_S): New macros, use where appropriate. - * aclocal.m4 (GCC_PROG_LN_S, GCC_PROG_LN): New tests. - * configure.in: Use GCC_PROG_LN_S and GCC_PROG_LN. - * configure: Regenerated. - -Thu Sep 11 11:09:43 1997 Jeffrey A Law (law@cygnus.com) - - * loop.c (strength_reduce): Fix typo. - -Wed Sep 10 16:01:15 1997 Jim Wilson - - * m88k/m88k.c (struct option): Rename to struct options. - * m88k/dolph.h (INITIALIZE_TRAMPOLINE): Delete here. - * m88k/sysv3.h (INITIALIZE_TRAMPOLINE): Delete ifdef and comments. - * libgcc2.c (__enable_execute_stack): Check for __sysV88__ not - __DOLPHIN__ or sysV88. - -Wed Sep 10 14:58:40 1997 Jim Wilson - - * emit-rtl.c (gen_lowpart_common): For a SUBREG, add in word when - create new subreg. - -Wed Sep 10 15:19:22 1997 Jeffrey A Law (law@cygnus.com) - - * config.sub: Accept 'amigados' for backward compatibility. - -Wed Sep 10 14:05:08 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * Makefile.in (testsuite/site.exp): New target. - (check-gcc, check-g++): Depend on testsuite/site.exp. - Don't stop for failure. - -Wed Sep 10 12:59:57 1997 Jason Merrill - - * expr.c (expand_builtin): Only support __builtin_dwarf_fp_regnum() - if DWARF2_UNWIND_INFO. - -Wed Sep 10 11:49:20 1997 Jason Merrill - - Add support for exception handling using DWARF 2 frame unwind info. - Currently works on SPARC and MIPS, and almost on x86. - - * libgcc2.c (get_reg, put_reg, get_return_addr, put_return_addr, - next_stack_level, in_reg_window): Helper fns. - (__throw): Implement for DWARF2_UNWIND_INFO. - - * expr.c (expand_builtin): Handle builtins used by __throw. - * tree.h (enum built_in_function): Add builtins used by __throw. - * c-decl.c (init_decl_processing): Declare builtins used by __throw. - * dwarf2out.c (expand_builtin_dwarf_fp_regnum): Used by __throw. - * except.c (expand_builtin_unwind_init): Hook for dwarf2 __throw. - (expand_builtin_extract_return_addr): Likewise. - (expand_builtin_frob_return_addr): Likewise. - (expand_builtin_set_return_addr_reg): Likewise. - (expand_builtin_eh_stub): Likewise. - (expand_builtin_set_eh_regs): Likewise. - (eh_regs): Choose two call-clobbered registers for passing back values. - - * frame.c, frame.h: New files for parsing dwarf 2 frame info. - * Makefile.in (LIB2ADD): New variable. Add $(srcdir)/frame.c. - (libgcc2.a): Use it instead of $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS) - (stmp-multilib): Likewise. - ($(T)crtbegin.o, $(T)crtend.o): Add -fno-exceptions. - - * except.c: #include "defaults.h". - (exceptions_via_longjmp): Default depends on DWARF2_UNWIND_INFO. - (emit_throw): Don't defeat assemble_external if DWARF2_UNWIND_INFO. - (register_exception_table_p): New fn. - (start_eh_unwinder): Don't do anything if DWARF2_UNWIND_INFO. - (end_eh_unwinder): Likewise. - - * crtstuff.c: Wrap .eh_frame section, use EH_FRAME_SECTION_ASM_OP, - call __register_frame and __deregister_frame as needed. - * varasm.c (eh_frame_section): New fn if EH_FRAME_SECTION_ASM_OP. - * dwarf2out.c (EH_FRAME_SECTION): Now a function-like macro. Check - EH_FRAME_SECTION_ASM_OP. - * sparc/sysv4.h (EH_FRAME_SECTION_ASM_OP): Define. - * mips/iris6.h (EH_FRAME_SECTION_ASM_OP): Define. - (LINK_SPEC): Add __EH_FRAME_BEGIN__ to hidden symbols. - - * dwarf2out.c (output_call_frame_info): If no support for - EXCEPTION_SECTION, mark the start of the frame info with a - collectible tag. - * collect2.c (frame_tables): New list. - (is_ctor_dtor): Recognize frame entries. - (scan_prog_file): Likewise. - (main): Pass -fno-exceptions to sub-compile. Also do collection - if there are any frame entries. - (write_c_file_stat): Call __register_frame_table and - __deregister_frame as needed. - (write_c_file_glob): Likewise. - - * defaults.h (DWARF2_UNWIND_INFO): Default to 1 if supported. - Also require unaligned reloc support. - * sparc.h (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP): Define here. - * sparc/sysv4.h: Not here. - - * toplev.c (compile_file): Call dwarf2out_frame_{init,finish}. - * dwarf2out.c (dwarf2out_init): Don't call dwarf2out_frame_init. - (dwarf2out_finish): Don't call dwarf2out_frame_finish. - - * libgcc2.c (L_eh): Reorganize, moving code shared by different - EH implementations to the top. - (find_exception_handler): Split out. Start from 0. Compare against - end with >=. - (__find_first_exception_table_match): Use it. - * except.c (output_exception_table): Don't do anything if there's - no table. Don't output a first entry of zeroes. - (eh_outer_context): Adjust properly. - (add_eh_table_entry): Use xrealloc. - * toplev.c (compile_file): Just call output_exception_table. - -Wed Sep 10 11:30:36 1997 Jason Merrill - - * i386.c (ix86_prologue): Add dwarf2 support for !do_rtl case. - -Wed Sep 10 08:17:10 1997 Torbjorn Granlund - - * except.c (eh_outer_context): Do masking using expand_and. - -Wed Sep 10 01:38:30 1997 Doug Evans - - Add port done awhile ago for the ARC cpu. - * arc/arc.h: New file. - * arc/arc.c: New file. - * arc/arc.md: New file. - * arc/initfini.c: New file. - * arc/lib1funcs.asm: New file. - * arc/t-arc: New file. - * arc/xm-arc.h: New file. - * ginclude/va-arc.h: New file. - * ginclude/stdarg.h: Include va-arc.h ifdef __arc__. - * ginclude/varargs.h: Likewise. - * Makefile.in (USER_H): Add va-arc.h. - * configure.in (arc-*-elf*): Recognize. - * longlong.h: Add ARC support. - -Wed Sep 10 01:32:54 1997 Jeffrey A Law (law@cygnus.com) - - * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx. - when clearing non-BLKmode data. - -Wed Sep 10 00:29:29 1997 Manfred Hollstein - - * m88k/sysv3.h (INITIALIZE_TRAMPOLINE): Define. - * libgcc2.c (__enable_execute_stack): Provide for sysV88 too. - - * xm-m88k.h (USG): Only define if it hasn't already been defined. - - * Makefile.in (risky-stage1): Delete gratuitous whitespace. - - * Makefile.in (clean): Delete libgcc1-test. - - * Makefile.in (INSTALL): cd to $(srcdir) before running texinfo. - -Tue Sep 9 17:07:36 1997 Stan Cox - - * m88k.c (m88k_expand_prologue): Set MEM_IN_STRUCT_P of va_list - template. - -Tue Sep 9 09:50:02 1997 Richard Kenner - - * dwarf2out.c (output_call_frame_info): Call named_section. - -Tue Sep 9 09:12:17 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (print_value): Fix last change. - -Tue Sep 9 01:30:37 1997 Jason Merrill - - * mips.h (DWARF_FRAME_REGNUM): Use the same numbering regardless of - write_symbols. - -Mon Sep 8 16:32:43 1997 Jason Merrill - - * mips.c (function_prologue): Set up the CFA when ABI_32. - - * sparc.c (save_regs): Check dwarf2out_do_frame instead of DWARF2_DEBUG - for dwarf2 unwind info. - (output_function_prologue, sparc_flat_output_function_prologue): Same. - - * final.c (final_end_function): Check dwarf2out_do_frame instead - of DWARF2_DEBUG for dwarf2 unwind info. - (final_scan_insn): Likewise. - (final_start_function): Likewise. Initialize dwarf2 frame debug here. - (final): Not here. - - * expr.c (expand_builtin_return_addr): Only SETUP_FRAME_ADDRESSES if - count > 0. - - * varasm.c (exception_section): Check EXCEPTION_SECTION first. - -Mon Sep 8 15:15:11 1997 Nick Clifton - - * v850.h (ASM_SPEC): Pass on target processor. - (CPP_PREDEFINES): Only define if not already specified. - (TARGET_VERSION): Only define if not already specified. - (MASK_CPU, MASK_V850, MASK_DEFAULT): Bits to specify target - processor. - (EXTRA_SWITCHES): Extra entries in the switches array. - (TARGET_DEFAULT): Set default target processor. - -Mon Sep 8 18:26:35 1997 Jim Wilson - - * m68k.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): In MOTOROLA - cases, add %# and %/, and add : to make them into extended asms. - -Sun Sep 7 23:57:50 1997 Weiwen Liu - - * alias.c (init_alias_analysis): Clean up incompatible pointer - type warning in bzero. - * regmove.c (regmove_optimize): Likewise. - * haifa-sched.c (find_rgns): Likewise. - - * haifa-sched.c (print_value): Clean up ptr->int cast - warnings. - -Sun Sep 7 23:18:32 1997 Fred Fish - - * INSTALL: Change 'amigados' to 'amigaos' to match current usage. - * install.texi (Configurations): Likewise. - * config.sub: Likewise. - -Sun Sep 7 22:56:56 1997 Weiwen Liu (liu@hepvms.physics.yale.edu) - - * Makefile.in (sdbout.o): Depend on insn-config.h. - -Sun Sep 7 18:44:50 1997 Jim Wilson - - * m68k/m68k.h (TARGET_SWITCHES): For 68000, 68302, subtract MASK_68881. - For 68303, 68332, cpu32, subtract MASK_68040_ONLY. - -Sun Sep 7 18:30:46 1997 Jason Merrill - - * dwarf2out.c (dwarf2out_frame_debug): Assume that in a PARALLEL - prologue insn, only the first elt is significant. - (output_call_frame_info): For exception handling, always use 4-byte - fields as specified by the dwarf2 spec. - Don't skip trivial FDEs. - -Sun Sep 7 14:19:39 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Sep 7 14:17:36 1997 Torbjorn Granlund (tege@pdc.kth.se) - - * expmed.c (expand_divmod): Make op1_is_pow2 depend on unsignedp - for negative constants. Promote EXACT_DIV_EXPR to TRUNC_DIV_EXPR - when op1_is_pow2. - -Sun Sep 7 13:46:46 1997 Jeffrey A Law (law@cygnus.com) - - * final.c (shorten_branches): During first pass, assume worst - possible alignment for ADDR_VEC and ADDR_VEC_DIFF insns. - - * Makefile.in (distclean): Remove various things left around - by running the testsuite. - -Sun Sep 7 13:16:06 1997 Manfred Hollstein - - * configure.in (out_file): Emit definition to config.status in order - to have a defined value for configure.lang. - * configure: Re-built. - -Sun Sep 7 09:59:08 1997 Jan-Jaap van der Heijden (J.J.vanderHeijden@student.utwente.nl) - - * configure.in: Make symlink to as-new rather than as.new. Similarly - for ld-new. - * configure: Rebuilt. - -Fri Sep 5 16:54:55 1997 Jim Wilson - - * profile.c (output_func_start_profiler): Set DECL_EXTERNAL to zero. - -Fri Sep 5 16:16:44 1997 Christian Kuehnke - - * sparc/sparc.md: Add ultrasparc scheduling support. - * sparc/sparc.h (RTX_COSTS): For MULT give v9 a cost of 25 insns. - -Fri Sep 5 14:04:59 1997 Philippe De Muyter - - * integrate.c (save_for_inline_copying): Use 0, not NULL_PTR, - as initial value for real_label_map. - (copy_for_inline): Likewise. - -Fri Sep 5 13:36:44 1997 J"orn Rennecke - - * sched.c (update_flow_info): When looking if to set found_split_dest - or found_orig_dest, look at all parts of a PARALLEL. - * haifa-sched.c (update_flow_info): Likewise. - -Fri Sep 5 10:08:44 1997 Jeffrey A Law (law@cygnus.com) - - * v850: New directory for v850 port. - * v850/lib1funcs.asm: New file. - * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files. - * ginclude/va-v850.h: New file. - * ginclude/varargs.h, ginclude/stdarg.h: Include va-mn10200.h. - * configure.in (mn10200-*-*): New target. - * configure: Rebuilt. - * config.sub: Handle v850-elf. - * Makefile.in (USER_H): Add va-mn10200.h. - * invoke.texi: Document v850 stuff. - -Fri Sep 5 09:37:50 1997 Jim Wilson (wilson@cygnus.com) - - * sdbout.c (plain_type_1, case ARRAY_TYPE): Verify that TYPE_DOMAIN - has integer TYPE_{MAX,MIN}_VALUE before using them. - - * m68k/m68k.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Add - __HPUX_ASM__ versions. - -Fri Sep 5 09:08:44 1997 Jeffrey A Law (law@cygnus.com) - - * install.sh: Delete duplicate install script. - -Thu Sep 4 23:14:27 1997 Stan Cox (coxs@dg-rtp.dg.com) - - * reg-stack.c (subst_stack_regs): Pop the stack register for a - computed goto which sets the same stack register. - - * reg-stack.c (compare_for_stack_reg): Swap only if the source and - destination are both on the regstack. - (subst_stack_regs_pat): Put the destination at the top of the regstack. - -Thu Sep 4 15:02:27 1997 Jim Wilson - - * mips.md (nonlocal_goto_receiver): Define. - - * profile.c (output_arc_profiler): Check next_insert_after for non - NULL before deferencing it. - - * i386/t-sol2 (TARGET_LIBGCC2_CFLAGS): Define to -fPIC. - -Thu Sep 4 14:51:57 1997 Jeffrey A Law (law@cygnus.com) - - * i386.h (CPP_CPU_DEFAULT): Avoid using #elif. - -Thu Sep 4 15:01:49 1997 Michael Meissner - - * toplev.c (rest_of_compilation): For passes starting with - flow_analysis, use print_rtl_with_bb instead of print_rtl. - - * print-rtl.c (print_rtl_single): Print a single rtl value to a - file. - - * flow.c (print_rtl_with_bb): Print which insns start and end - basic blocks. For the start of a basic block, also print the live - information. - -Thu Sep 4 11:51:43 1997 Jim Wilson - - * toplev.c (main): Change #elif to #else/#ifdef. - - * tlink.c: Include ctype.h. - * ginclude/va-mips.h: Add _VA_MIPS_H_ENUM ifdef/define/endif. - -Thu Sep 4 11:17:16 1997 Mikeael Meissner (meissner@cygnus.com) - - * bitmap.c: Conditionally include stdlib.h. - (free): Provide a declaration if NEED_DECLARATION_FREE. - -Thu Sep 4 09:58:53 1997 Joel Sherrill (joel@OARcorp.com) - - * i960/i960.h: Added default for SUBTARGET_SWITCHES macro. - -Thu Sep 4 09:53:20 1997 Jim Wilson (wilson@cygnus.com) - - * profile.c (output_arc_profiler): Verify next_insert_after is an - INSN before and after skipping a stack pop. - -Thu Sep 4 07:39:19 1997 J"orn Rennecke - - * final.c (shorten_branches): Don't count the lengths of deleted - instructions. - -Thu Sep 4 09:43:01 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Thu Sep 4 11:04:21 1997 Michael Meissner - - * bitmap.h (EXECUTE_IF_AND_IN_BITMAP): New macro, to iterate over - two bitmaps ANDed together. - (bitmap_print): Declare. - - * bitmap.c (function_obstack): Don't declare any more. - (bitmap_obstack): Obstack for allocating links from. - (bitmap_obstack_init): New static to say whether to initialize - bitmap_obstack. - (bitmap_element_allocate): Use bitmap_obstack to allocate from. - (bitmap_release_memory): Free all memory allocated from - bitmap_obstack. - - * basic-block.h (EXECUTE_IF_AND_IN_REG_SET): New macro, invoke - EXECUTE_IF_AND_IN_BITMAP. - -Wed Sep 3 10:39:42 1997 Jim Wilson - - * alias.c (true_dependence): Address with AND can alias scalars. - (anti_dependence, output_dependence): Likewise. - - * alias.c (true_dependence): Test x for BLKmode, in addition to mem. - -Wed Sep 3 09:28:50 1997 Joel Sherrill (joel@OARcorp.com) - - * i386/go32-rtems.h, i386/rtems.h, i960/rtems.h, m68k/rtems.h, - mips/rtems64.h, pa/rtems.h, rs6000/rtems.h, sh/rtems.h, - sparc/rtems.h (subtarget_switches): Removed SUBTARGET_SWITCHES - definitions. Use -qrtems instead of -mrtems. - -Wed Sep 3 09:05:41 1997 Robert Lipe (robert@dgii.com) - - * xm-sco5.h (sys_siglist): Define. - (SYS_SIGLIST_DECLARED): Likewise. - -Tue Sep 2 23:33:33 1997 Jeffrey A Law (law@cygnus.com) - - * expr.c (convert_move): Handle truncation from TQFmode to QFmode. - -Wed Sep 3 02:09:30 1997 Torbjorn Granlund - - * except.c (eh_outer_context): Expand masking operation using - expand_binop. - -Tue Sep 2 18:09:39 1997 Jim Wilson - - * alpha.md (floatdisf2-1): New pattern. - -Tue Sep 2 18:41:55 1997 Jeffrey A Law (law@cygnus.com) - - * xm-svr4.h (SYS_SIGLIST_DECLARED): Define. - * xm-news.h (SYS_SIGLIST_DECLARED): Likewise. - * xm-sysv4.h (SYS_SIGLIST_DECLARED): Likewise. - * gcc.texi: Note that if you define sys_siglist that you should - also define SYS_SIGLIST_DECLARED. - - * mn10200.h (INITIALIZE_TRAMPOLINE): PC relative instructions - are relative to the next instruction, not the current instruction. - -Tue Sep 2 14:22:43 1997 Jim Wilson - - * local-alloc.c (contains_replace_regs): New function. - (update_equiv_regs): When adding a REG_EQUIV note for a set of a MEM, - verify that there is no existing REG_EQUIV note, and add a call to - contains_place_regs. - -Tue Sep 2 12:48:11 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * config/alpha/elf.h (CPP_PREDEFINES): Add -D__PIC__ -D__pic__. - (STARTFILE_SPEC): Always use crtbegin.o%s. - (ENDFILE_SPEC): Always use crtend.o%s. - -Tue Sep 2 12:00:36 1997 Jim Wilson - - * alpha/alpha.h (PREFERRED_RELOAD_CLASS): Return NO_REGS if NO_REGS - is passed in. - * emit-rtl.c (gen_lowpart_common): Add code to convert CONST_INT to - SFmode for 64 bit hosts. - -Tue Sep 2 13:42:38 1997 Paul N. Hilfinger - - * fixincludes: Permits spaces between # and define. Discard C++ - comments in sys/pci.h on HP/UX 10.20. - -Mon Sep 1 22:13:18 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for snapshot. - - * pa.c (restore_unscaled_index_insn_codes): New function. - (record_unscaled_index_insn_codes): Likewise. - (output_function_prologue): Call restore_unscaled_index_insn_codes. - (output_function_epilogue): Free memory for unscaled_index_insn_codes. - (pa_reorg): Call record_unscaled_index_insn_codes. - - * haifa-sched.c (move_insn): Handle notes correctly for insns - with SCHED_GROUP_P set. - -Mon Sep 1 16:58:57 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * alpha/xm-linux.h (USE_BFD): Undef before define. - -Mon Sep 1 16:25:34 1997 Jim Wilson - - * cse.c (cse_insn): Don't record BLKmode values. - -Mon Sep 1 11:25:47 1997 Stephen Williams (steve@icarus.icarus.com) - - * i960.h (LINK_SPEC): Handle "-mjX" and "-mrp" switches. - -Mon Sep 1 08:29:46 1997 Jeffrey A Law (law@cygnus.com) - - * cccp.c (sys_errlist): Remove special 4.4bsd declaration. - * collect2.c (sys_errlist): Likewise. - * cpplib.c (sys_errlist): Likewise. - * gcc.c (sys_errlist): Likewise. - * protoize (sys_errlist): Likewise. - * configure.in: Check for strerror. - * xm-freebsd.h (HAVE_STRERROR): Remove definition. - * xm-gnu.h (HAVE_STRERROR): Likewise. - * xm-linux.h (HAVE_STRERROR): Likewise. - * xm-netbsd.h (HAVE_STRERROR): Likewise. - * xm-bsd386.h (HAVE_STRERROR): Likewise. - * xm-cygwin32.h (HAVE_STRERROR): Likewise. - * xm-dos.h (HAVE_STRERROR): Likewise. - * xm-mingw32.h (HAVE_STRERROR): Likewise. - * xm-pa.h (HAVE_STRERROR): Likewise. - * xm-papro.h (HAVE_STRERROR): Likewise. - * xm-sysv4.h (HAVE_STRERROR): Likewise. - * configure, config.in: Rebuilt. - - * Makefile.in: Add several missing "else true" clauses. - - * collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED. - * mips-tfile.c: Likewise. - * gcc.texi: DONT_DECLARE_SYS_SIGLIST: Remove docs. - * xm-linux.h (DONT_DECLARE_SYS_SIGLIST): Delete definition. - * xm-freebsd.h, xm-bsd386.h, xm-sysv4.h, xm-sol2.h: Likewise. - * configure.in: Check for sys_siglist declaration. - * configure, config.in: Rebuilt. - -Mon Sep 1 08:04:07 1997 Joel Sherrill (joel@OARcorp.com) - - * i386/go32-rtems.h, i386/rtems.h, i960/rtems.h, - m68k/rtems.h, mips/rtems64.h, pa/rtems.h, rs6000/rtems.h, - sparc/rtems.h (subtarget_switches): Added -mrtems as a switch. - * i960/i960.h: Added SUBTARGET_SWITCHES macro. - * rs6000/sysv4.h (extra_subtarget_switches): Added new - macro EXTRA_SUBTARGET_SWITCHES. - * configure.in (sh*-*-rtems*): New target. - * sh/rtems.h: New file. - * sh/sh.h: Added SUBTARGET_SWITCHES macro. - * configure: Rebuilt. - -Sat Aug 30 22:54:26 1997 Jim Wilson - - * unroll.c (calculate_giv_inc): Handle increment with code PLUS. - -Sat Aug 30 10:49:46 1997 David Edelsohn - - * rs6000.md: Make DF fused-add operations pay attention to - -mno-fused-add. - -Fri Aug 29 19:19:54 1997 Jim Wilson - - * i386/xm-sysv4.h (DONT_DECLARE_SYS_SIGLIST): Define. - -Fri Aug 29 16:13:51 1997 Jeffrey A Law (law@cygnus.com) - - * pa.md (reload_peepholes): Make sure operand is a REG before - examining REGNO. Allow general registers too. - -Fri Aug 29 11:42:04 1997 Jim Wilson - - * varasm.c (mark_constants): Don't look inside CONST_DOUBLEs. - -Fri Aug 29 09:33:20 1997 Philipp Thomas (kthomas@lxi165.gwdg.de) - - * dwarf2out.c (build_abbrev_table): Use xrealloc, not xmalloc - to reallocate abbrev_die_table. - -Thu Aug 28 15:14:46 1997 Jim Wilson - - * m68k/m68k.md (iorsi_zexthi_ashl16): Disable. - -1997-08-27 Andreas Schwab - - * Makefile.in (config.status): Depend on version.c. - - * expr.h (insn_gen_function): Reenable prototype. - - * expr.c (move_by_pieces_1, clear_by_pieces_1): Fix prototype of - first parameter. - -Thu Aug 28 13:01:43 1997 Jim Wilson - - * i386.c (ix86_expand_epilogue): Emit blockage instruction when pic. - -Thu Aug 28 07:03:15 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for latest snapshot. - - * bc-optab.c: Conditionally include stdlib.h. - (free): Provide a declaration if NEED_DECLARATION_FREE. - * tree.c (free): Provide a declaration if NEED_DECLARATION_FREE. - * rtl.h (free): Remove declaration. - * tree.h (free): Remvoe declaration. - - * configure: Rebuilt. - -Wed Aug 27 21:32:20 1997 Jeffrey A Law (law@cygnus.com) - - * flags.h (flag_move_all_movables): Declare. - (flag_reduce_all_givs): Likewise. - * loop.c (move_movables): Handle flag_move_all_movables. - (strength_reduce): Handle flag_reduce_all_givs. - * toplev.c (flag_move_all_movables): Define. - (flag_reduce_all_givs): Likewise. - (f_options): Add -fmove-all-movables and -freduce-all-givs. - * invoke.texi: Document new options, including alias stuff that - wasn't included last time. - -Wed Aug 27 18:08:51 1997 Bob Manson (manson@cygnus.com) - - * t-h8300: Use TARGET_LIBGCC2_CFLAGS instead of LIBGCC2_CFLAGS. - * t-mn10200: Likewise. - * t-vxsparc: Likewise. - * t-vxworks68: Likewise. - * t-vxworks960: Likewise. - * t-vx29k: Likewise. - -Wed Aug 27 16:35:29 1997 Richard Henderson - - * alpha/xm-alpha.h (alloca): Define alloca to builtin_alloca for GNUC - if not already defined, and USE_C_ALLOCA not defined. - -Wed Aug 27 16:08:43 1997 Jim Wilson - - * config.guess: Replace with script that uses ../config.guess. - - * config/alpha/elf.h (DEFAULT_VTABLE_THUNKS): New. Defined as 1 - if USE_GNULIBC_1 is not defined. - -Wed Aug 27 15:49:12 1997 Richard Henderson - - * alpha/elf.h (LINK_SPEC): Conditionalize on USE_GNULIBC_1. - * config.guess: Recognize alpha-linux-gnulibc1. - * configure.in (alpha-*-linux-gnulibc1): New target. - (alpha-*-linux-gnu*): Don't build crtbegin/end. - -Wed Aug 27 11:52:58 1997 Jim Wilson - - * m68k.md (iorsi3_internal): Readd ! TARGET_5200 check lost in - last change. - -Wed Aug 27 01:56:18 1997 Doug Evans - - * loop.c (combine_movables): Earlier insns don't match later ones. - -Wed Aug 27 01:24:25 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * config/linux.h (CC1_SPEC): Define it only if not defined. - - * config/m68k/linux.h (CC1_SPEC): Undefine it before include - - - * config/linux.h (DEFAULT_VTABLE_THUNKS): New. Defined as 1 if - USE_GNULIBC_1 is not defined. - - * config/rs6000/linux.h (DEFAULT_VTABLE_THUNKS): New. Defined as 1. - - * config/sparc/linux.h (DEFAULT_VTABLE_THUNKS): New. Defined - as 1 if USE_GNULIBC_1 is not defined. - -Wed Aug 27 00:49:14 1997 Jeffrey A Law (law@cygnus.com) - - * reorg.c (dbr_schedule): Allow current_function_return_rtx - to be something other than a REG. - * function.c (expand_function_end): Fix current_function_return_rtx - if it was a pseudo. - - * t-freebsd (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS. - * x-netbsd: Likewise. - * x-dgux (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS. - (INSTALL_HEADERS): Delete. - * x-dguxbcs: Likewise. - * x-hp3bsd44: Likewise. - * x-pa: Likewise. - -Wed Aug 27 00:30:00 1997 Bernd Schmidt - - * i386.md (pop): pop increments the stack pointer. - (prologue_set_stack_ptr): New pattern. - * i386.c (ix86_expand_prologue): Use prologue_set_stack_ptr - instead of subsi3. - -Tue Aug 26 18:50:32 1997 Jim Wilson - - * reload.c (find_reloads, case '0'): Reject matching a non-offsettable - address where an offsettable address is required. - -Tue Aug 26 17:54:56 1997 Michael P. Hayes (michaelh@ongaonga.chch.cri.nz> - - * loop.c (check_final_value): Don't miss a biv increment in a - parallel. - -Tue Aug 26 12:03:49 1997 Jim Wilson (wilson@cygnus.com) - - * dwarfout.c (dwarfout_file_scope_decl, case TYPE_DECL): Check - TYPE_DECL_IS_STUB instead of DECL_NAME. - -Mon Aug 25 23:27:10 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * objc/Make-lang.in ($(OBJC_O)): Also depend on cc1obj. - -Mon Aug 25 23:27:10 1997 Jim Meyering - - * objc/Make-lang.in ($(OBJC_O)): Also depend on $(GCC_PASSES). - -Mon Aug 25 13:12:24 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (find_pre_sched_live): Remove #if 0 code. - (find_post_sched_live): Likewise. - - * haifa-sched.c (schedule_block): Remove old code to get arguments - from hard regs into pseudos early. - -Mon Aug 25 08:55:00 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for new snapshot. - - * local-alloc.c (update_equiv_regs): All the target to reject - promotion of some REG_EQUAL to REG_EQUIV notes. - * pa.h (DONT_RECORD_EQUIVALENCE): Define. - - * pa.c (secondary_reload_class): (mem (mem ... )) does not need - secondary reloads. - - * pa.c (hppa_builtin_saveregs): Emit a blockage insn after the - store of the argument registers. - -Mon Aug 25 08:39:02 1997 Craig Burley (burley@gnu.ai.mit.edu) - - * fold-const.c (multiple_of_p): New function. - (fold): Turn some cases of *_DIV_EXPR into EXACT_DIV_EXPR. - -Mon Aug 25 01:47:41 1997 Jeffrey A Law (law@cygnus.com) - - * expr.h (insn_gen_function): Temporarily remove prototype. - -Sun Aug 24 17:22:21 1997 Jim Wilson - - * Makefile.in (install-info): Don't cd into srcdir. Add srcdir to - filenames. Use sed to extract base filename for install. - -Sat Aug 23 18:19:40 1997 John F. Carr - - * unroll.c (find_splittable_givs): Only share if two givs have the - same add and multiply values. - -Sat Aug 23 14:36:27 1997 Jim Wilson - - * m68k/next.h (GO_IF_INDEXABLE_BASE): Fix typo in undef. - * m68k/m68kemb.h (LIB_SPEC): Add missing comment end before it. - -Sat Aug 23 00:18:22 1997 Jeffrey A Law (law@cygnus.com) - - * pa.c (pa_reorg): Always put begin_brtab and end_brtab insns - around branch tables. - * pa.md (begin_brtab, end_brtab): Only emit the .begin_brtab - and .end_brtab directives if TARGET_GAS. - -Fri Aug 22 14:05:55 1997 Jim Wilson - - * alias.c (true_dependence): Pass x_addr not x to varies. - - * acconfig.h (NEED_DECLARATION_CALLOC): Add. - * configure.in: Add GCC_NEED_DECLARATION call for calloc. - * rs6000/xm-rs6000.h (malloc, realloc, calloc, free): Delete - declarations. - * config.in, configure: Regenerate. - -Thu Aug 21 23:52:16 1997 John F. Carr - - * alias.c (find_base_value): Improve handling of PLUS, MINUS, and - LO_SUM. - (record_set): Handle LO_SUM like PLUS. - (init_alias_analysis): When following chains of base addresses, - do not stop on reaching a hard register. - -Thu Aug 21 20:17:37 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump for new snapshot. - -Thu Aug 21 17:28:00 1997 Jim Wilson - - * alpha.h (ARCH_ASM_FILE_START): Define. - (ASM_FILE_START): Use ARCH_ASM_FILE_START. - * osf12.h, osf2or3.h (ARCH_ASM_FILE_START): Redefine to null string. - -Thu Aug 21 10:22:19 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (install-common): Put gcov comment at start of line. - -Wed Aug 20 22:47:33 1997 Jeffrey A Law (law@cygnus.com) - - * alias.c (init_alias_analysis): When simplifying the reg_base_value - array, simplify entries for hard registers too. - -Wed Aug 20 12:35:47 1997 Dave Love - - * dwarf2.h (enum dwarf_call_frame_info): Remove trailing comma from - list. - -Wed Aug 20 11:58:33 1997 Jim Wilson - - * stmt.c (start_cleanup_deferral, end_cleanup_deferral): Test - block_stack before dereferencing it. - -Wed Aug 20 11:57:11 1997 Michael Meissner - - * rs6000.h (ISSUE_RATE): Define instead of MACHINE_issue_rate. - -Tue Aug 19 17:10:56 1997 Jason Merrill - - * cplus-dem.c: Add 'extern' to prepends_underscore. - -Tue Aug 19 09:34:57 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (ISSUE_RATE): Renamed from MACHINE_issue_rate. - (get_issue_rate): Delete. - * pa.h (ISSUE_RATE): Define. - - * configure.in: Turn on haifa by default for the PA. - * configure: Rebuilt. - * pa.c (override_options): Accept -mschedule=7200 option. - (pa_adjust_cost): No longer need to scale costs for newer - processors. - * pa.h (enum processor_type): Add PROCESSOR_7200. - * pa.md: Revamp scheduling parameters to work better with - haifa. Add scheduling parameters for the 7200. - - * haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P - insns too. - (schedule_block): When adjusting basic_block_{head,end}, account - for movement of SCHED_GROUP_P insns too. - - * haifa-sched.c (debug_dependencies): Fix thinko. - - * Makefile.in (EXPECT, RUNTEST, RUNTESTFLAGS): Define. - (site.exp, check, check-g++, check-gcc): New targets. - - * haifa-sched.c: Make lots of variables static. - -Tue Aug 19 07:18:34 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * expr.h, real.h: Finish prototyping. - -Mon Aug 18 21:49:02 1997 Jim Wilson - - * reload.c (find_reloads): Add code to convert RELOAD_FOR_OPADDR_ADDR - reloads to RELOAD_FOR_OPERAND_ADDRESS reloads. - * reload1.c: Undo bugfix from Aug 11. - -Mon Aug 18 17:39:02 1997 Mike Meissner - - * configure.in ({powerpc,rs6000}*-*-*, --with-cpu): Remove single - quotes around the name. - * configure: Regenerate. - -Mon Aug 18 13:46:47 1997 Jim Wilson - - * Makefile.in (stmp-multilib-sub): Fix typo in last change. - -Thu Aug 7 10:33:13 1997 Manfred Hollstein - - * Makefile.in (sub-makes): Pass the current value of LANGUAGES down - to sub-makes to avoid building more passes than the user might have - requested on the command line. - -Sun Aug 17 15:42:17 1997 Dave Love (d.love@dl.ac.uk) - - * configure.in: Expurgate `broken_install' (install is - autoconfed). - - * configure.lang: Substitute autoconfed ${INSTALL} (not currently - relevant). - -Sat Aug 16 01:08:12 1997 Jeffrey A Law (law@cygnus.com) - - * loop.c (is_power_of_2, is_conditional_branch): Delete unused - functions and declarations. - (analyze_loop_iterations): Use condjump_p. - (insert_bct): Likewise. Use exact_log2. - -Fri Aug 15 23:48:32 1997 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (find_post_sched_live): Call FREE_REG_SET as needed. - (schedule_region): Likewise. - (schedule_insns): Likewise. - - * PROJECTS: Update with Haifa stuff. - -Fri Aug 15 12:49:56 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Change the version string to look like: - egcs-2.90.00 970814 (gcc2-970802 experimental). - - * loop.c (is_conditional_branch): Make definition match declaration. - - * gcc.c: Take out experimental snapshot warning message. - -Fri Aug 15 13:43:39 1997 Michael Meissner - - * haifa-sched.c (debug_dependencies): Use GET_NOTE_INSN_NAME to - print out the names of the notes. Print out the name of the insn - that is not a note, and not an {,CALL_,JUMP_}INSN. - -Wed Aug 13 17:32:38 1997 Jason Merrill - - * expr.c (expand_expr, case TARGET_EXPR): Call mark_addressable - again for the slot after we give it RTL. - -Wed Aug 13 01:03:37 1997 Doug Evans - - * configure.in (haifa configury): Fix typo. - * configure: Regenerate. - -Tue Aug 12 10:20:36 1997 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump version to "gcc-3.0.0 970802 experimental". - - * gcc.info*: Rebuilt. - - * COPYING.g77, README.g77: New files. - * real.c (ereal_unto_float, ereal_unto_double): New functions. - * real.h (ereal_unto_float, ereal_unto_double): Declare them. - (REAL_VALUE_UNTO_TARGET_DOUBLE, REAL_VALUE_UNTO_TARGET_SINGLE): Define. - -Mon Aug 11 14:50:55 1997 Jeffrey A Law (law@cygnus.com) - - * Integrate Haifa instruction scheduler. - * Makefile.in (ALL_CFLAGS): Add SCHED_CFLAGS. Prefix all references - to sched with $(SCHED_CFLAGS. - * configure.in: Handle --enable-haifa. - * configure: Rebuilt. - * flags.h: Add new flags for haifa instruction scheduler. - * genattrtab.c (expand_units): For haifa, don't subtract one - when computing blockage. - * toplev.h (flag_schedule_interblock): Haifa scheduler flag. - (flag_schedule_speculative): Likewise. - (flag_schedule_speculative_load): Likewise. - (flag_schedule_speculative_load_dangerous): Likewise. - (flag_schedule_reverse_before_reload): Likewise. - (flag_schedule_reverse_after_reload): Likewise. - (flag_branch_on_count_reg): Likewise. - (f_options): Add Haifa switches. - (main): Turn off some Haifa options if appropriate macro is - defined. Process Haifa switches. - * unroll.c (iteration_info): No longer static, since Haifa - scheduler uses it. - (unroll_loop): Inform HAIFA scheduler about loop unrolling factor. - * unroll.c (unroll_loop): Set loop_unroll_iter, loop_start_value. - * loop.h (loop_unroll_factor, loop_number): Add HAIFA decls. - * loop.h (loop_initial_value,loop_unroll_iter): New globals. - * loop.c (loop_optimize): If HAIFA is defined, allocate additional - storage for the Haifa scheduler. - (mark_loop_jump): If HAIFA defined, set LABEL_OUTSIDE_LOOP_P and - LABEL_NEXTREF. - (strength_reduce): If HAIFA and HAVE_decrement_and_branch_on_count - are defined, call analyze_loop_iterations and insert_bct to use - countdown loops. - (record_giv): Refine test for jumps out of loops if HAIFA is - defined. - (analyze_loop_iterations): New function to identify if we can use - a countdown loop. - (insert_bct): Insert countdown loop. - (instrument_loop_bct): Low level code to insert countdown loop. - (loop_number): Calculate UID of loop. - (indirect_jump_in_function_p): Return true if an indirect jump is - in the function. - (is_power_of_2): Return true if value is a power of 2. - (is_conditional_branch): Return true if insn is a conditional - jump. - (fix_bct_param): Process -fbct-{min,max}-N switches. - (check_bct_param): Return true if loop should be instrumented. - * loop.c (loop_initial_value,loop_unroll_iter): New globals. - (loop_optimize): Initialize. - (get_condition_for_loop): Likewise. - * loop.c (strength_reduce): Inside of code that uses #ifdef - HAVE_decrement_and_branch_on_count code, test it to make sure the - condition is true. - (instrument_loop_bct): Likewise. - * haifa-sched.c: New file. - - * Integrate regmove pass. - * Makefile.in (OBJS): Add regmove.o. - (regmove.o): Add dependencies. - * flow.c (find_use_as_address): No longer static. - * rtl.h (find_use_as_address): Declare. - * toplev.c (regmove_dump, flag_regmove): Define. - (f_options): Add -fregmove. - (regmove_dump_file, regmove_time): Define. - (fatal_insn): Close the regmove dump file. - (compile_file): Initialize regmove_time; open/close the regmove dump - file as needed. Print regmove time as needed. - (rest_of_compilation): Run regmove pass if requested, dump - RTL after regmove if requested. - (main): If -O2 or more, turn on regmove. Handle dump switches. - * regmove.c: New file. - -Mon Aug 11 14:15:02 1997 Jeffrey A Law (law@cygnus.com) - - * Integrate tlink patch from jason@cygnus.com - * gcc.c (SWITCH_TAKES_ARG): Add 'V', 'B' and 'b'. - (process_command): Increment n_switches for them. Don't discard - their args. Validate them. - (main): Escape " marks when creating COLLECT_GCC_OPTIONS. - From Rohan Lenard. - (process_command): Set include_prefixes from COMPILER_PATH. - (main): Set COLLECT_GCC_OPTIONS sooner. - * confiugre.in: Link ../ld/ld.new to collect-ld rather than real-ld. - * tlink.c, hash.c, hash.h: New files. - * Makefile.in (USE_COLLECT2): Always use collect2. - (collect2): Depend on and link in hash.o and tlink.o. - (tlink.o, hash.o): Add dependencies. - -Mon Aug 11 10:04:49 1997 Jeffrey A Law (law@cygnus.com) - - * Integrate alias analysis changes from jfc@mit.edu - * Makefile.in (OBJS): Add alias.o. - (alias.o): Add dependencies. - * alias.c: New file. - * sched.c: Remove alias analysis code. It lives in alias.c now. - (sched_analyze_2): Add new arguments to true_dependence. - (schedule_insns): Always call init_alias_analysis. - * calls.c (expand_call): Note calls to malloc, calloc, and realloc; - mark return value from such functions as a pointer and keep track of - them for alias analysis. If a return value from a function is a - pointer, mark it as such. - * combine.c (distribute_notes): Handle REG_NOALIAS. - * cse.c (struct write_data): Delete. No longer needed. - (invalidate): Don't call set_nonvarying_address_components anymore. - Use true_dependence to decide if an entry should be removed from - the hash table. - (invalidate_memory): Remove WRITES argument, simplify appropriately. - Fix all callers. - (note_mem_written): Similarly for WRITE_PTR argument. - (invalidate_from_clobbers): Similarly for W argument. - (invalidate_for_call): Remove memory elements from the hash table. - (refers_to_mem_p, cse_rtx_addr_varies_p): Deleted. - (cse_rtx_varies_p): New function. Derived from old - cse_rtx_addr_varies_p. - (cse_insn): Remove WRITES_MEMORY and INIT variables and all references. - Don't call note_mem_written anymore. Stack pushes invalidate the stack - pointer if PUSH_ROUNDING is defined. No longer need to call - cse_rtx_addr_varies_p to decide if a MEM should be invalidated. - (skipped_writes_memory): Remove variable. - (invalidate_skipped_set): Simplify and wewrite to use invalidate_memory. - (invalidate_skipped_block): Simplify for new alias analysis code. - (cse_set_around_loop): Likewise. - (cse_main): Call init_alias_analysis. - * flags.h (flag_alias_check, flag_argument_noalias): Declare. - * toplev.c (flag_alias_check, flag_argument_noalias): Define. - (f_options): Add new alias checking arguments. - (main): Set flag_alias_check when optimizing. - * local_alloc (validate_equiv_mem_from_store): Add new arguments - to true_dependence. - (memref_referenced_p): Likewise. - * loop.c (NUM_STORES): Increase to 30. - (prescan_loop): Only non-constant calls set unknown_address_altered. - (invariant_p): Add new arguments to true_dependence. - (record_giv): Initialize unrolled and shared fields. - (emit_iv_add_mult): Call record_base_value as needed. - * loop.h (struct induction): Add unrolled and shared fields. - * unroll.c (unroll_loop): Call record_base_value as needed. - (copy_loop_body): Likewise. - (final_biv_value): Likewise. - (final_giv_value): Likewise. - (find_splittable_regs): Likewise. Only create one new pseudo - if we have multiple address GIVs that were combined with the same - dst_reg GIV. Note when a new register is created due to unrolling. - * rtl.c (reg_note_name): Add REG_NOALIAS. - * rtl.h (enum reg_note): Similarly. - (rtx_varies_p, may_trap_p, side_effects_p): Declare. - (volatile_refs_p, volatile_insn_p, remove_note): Likewise. - (note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise. - (true_dependence, read_dependence, anti_dependence): Likewise. - (output_dependence, init_alias_analysis, end_alias_analysis): Likewise. - (mark_user_reg, mark_reg_pointer): Likewise. - - * Integrate reload bugfix from Wilon which enables the PA port - to bootstrap again. - * reload1.c (reload): Sum needs for both OPADDR_ADDR and - OPERAND_ADDRESS when computing how many registers an insn needs. - (reload_reg_free_p): OPADDR_ADDR and OPERAND_ADDRESS reloads do - conflict. - (reload_reg_free_before_p): Treat OPERAND_ADDRESS reloads just like - OPADDR_ADDR reload. - (reload_reg_reaches_end_p): For RELOAD_FOR_OPADDR_ADDR insns, registers - in reload_reg_use_in_op_addr do not reach the end. - do not reach the end. - (reloads_conflict): RELOAD_FOR_OPADDR_ADDR conflicts with - RELOAD_FOR_OPERAND_ADDRESS. - -Sun Aug 10 12:00:20 1997 Jeffrey A Law (law@cygnus.com) - - * egcs project officially starts. - -Local Variables: -add-log-time-format: current-time-string -End: diff --git a/contrib/gcc/ChangeLog.1 b/contrib/gcc/ChangeLog.1 deleted file mode 100644 index b99a937..0000000 --- a/contrib/gcc/ChangeLog.1 +++ /dev/null @@ -1,15903 +0,0 @@ -Tue May 18 03:53:37 1999 Craig Burley - - Improve open-coding of complex divide: - * flags.h: Declare new front-end-malleable flag. - * toplev.c: Define new flag. - * optabs.c (expand_cmplxdiv_straight): New function to do original - open-coding. - (expand_cmplxdiv_wide): New function to do new open-coding, - from Toon Moene, with changes (call to emit_barrier, dropping - of spurious `ok = 1;', plus the obvious `break;' -> `return 0;'). - (expand_binop): A bit of spacing fixing, while at it. - Use new functions instead of inlining the open-coding code. - -Tue May 18 00:51:46 1999 Krister Walfridsson - - * configure.in (arm*-*-netbsd*): Use collect2. - (i[34567]86-*-netbsd*): Likewise. - (m68k*-*-netbsd*): Likewise. - (ns32k-*-netbsd*): Likewise. - (sparc-*-netbsd*): Likewise. - (vax-*-netbsd*): Likewise. - * configure: Rebuilt. - -Tue May 18 00:21:34 1999 Zack Weinberg - - * cppspec.c: Insert -no-gcc into command line unless -gcc was - given by user. - * gcc.c (default_compilers): Define __GNUC__ and - __GNUC_MINOR__ only if -no-gcc was not given. - * objc/lang-specs.h: Likewise. - * cpp.texi: Document -x and -std options; explain that -lang - is no longer supported. Minor related corrections. - -Mon May 17 23:56:39 1999 Alexandre Oliva - - * Makefile.in (stmp-fixproto): Pass location of mkinstalldirs to - fixproto. - * fixproto: Avoid unportable constructs such as `basename' and - `mkdir -p'. Use mkinstalldirs from the environment if `mkdir -p' - fails. - - * fixinc/fixincl.c: Remove #error, it is not portable. - -Mon May 17 23:50:41 1999 Marc Espie - - * collect2.c (main): Fix typo in COLLECT2_HOST_INITIALIZATION. - -Mon May 17 19:45:41 1999 Rainer Orth - - * fixinc/fixincl.c (process): Wait for children from chain_open() - to avoid creating zombies. - - * fixinc/inclhack.tpl: Removed no-op pipe. - - * fixinc/inclhack.sh fixinc/fixincl.sh: regenerate - -Mon May 17 07:23:34 1999 Mark Mitchell - - * tree.def (TYPE_NONCOPIED_PARTS): Revise documentation to match - reality. - * expr.c (init_noncopied_parts): Don't generate initializers for - parts that don't need them. - -Mon May 17 02:56:35 PDT 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Oct 31 05:08:34 CET 1998 Jan Hubicka (hubicka@freesoft.cz) - - * reg-stack.c: Do not emit pop insns after cc0 setter. - (emit_pop_insn): Do not emit insn in case WHEN is NULL. - (compare_for_stack_reg): Update REG_DEAD note and - do not emit push insn. - - * i386.c: (output_float_compare): Handle new REG_DEAD notes. - -Mon May 17 01:57:37 1999 David Daney - - * i386/sol2.h (LINK_SPEC): Do not pass "-z text" to the linker - if -mimpure-text. - -1999-05-17 Andreas Schwab - - * m68k.c (standard_68881_constant_p): Don't accept -0.0 as valid - 68881 constant. - - * fold-const.c (fold_truthop): When converting a one-bit - comparison don't sign extend the constant. - - * cse.c (cse_insn): Copy SRC_CONST before putting it in the - REG_EQUAL note. - -1999-05-17 Mike Stump - - * rs6000/vxppc.h (CPP_SPEC): Fix support for vararg functions. - -Sat May 15 14:22:40 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/hackshell.tpl: Fix mis-applied patch. - * fixinc/inclhack.sh: Regenerated. - -Thu May 13 21:05:55 1999 Mark Kettenis - - * fixinc/mkfixinc.sh: Add the Hurd (*-*-gnu*) to the list of - targets that do not need any fixes. - -Sat May 15 14:12:38 1999 Michael Hayes - - * config/c4x/c4x.md (set_lo_sum+2): New splitter to load large - const_ints. - -Sat May 15 14:09:08 1999 Michael Hayes - - * config/c4x/c4x.md (decrement_and_branch_on_count): Disabled. - (doloop_begin, doloop_end): New patterns. - (*rptb_init): Added extra operands. - -Fri May 14 21:31:36 1999 Michael Hayes - - * config/c4x/c4x.md (*umulqi3_highpart_clobber): Fix operand 2 - constraints order. - -1999-05-14 Ulrich Drepper - - * fixinc/fixinc.x86-linux-gnu (FD_ZERO): Fix operand numbers in - asm input operands. - -Thu May 13 15:34:18 1999 David Edelsohn - - * rs6000.c (mask_constant): Delete. - (mask_operand): Move mask_constant() body to here. - * rs6000.h (mask_constant): Delete declaration. - * rs6000.md (nabsdi2): Reverse subtraction in splitter. - -Thu May 13 02:25:01 1999 Jeffrey A Law (law@cygnus.com) - - * cpp.texi: Fix some typos. - -Thu May 13 01:49:55 1999 Graham Stott - - * loop.c (maybe_eliminate_biv): Check regno against - max_reg_before_loop. - - * i386.c (memory_address_info): Correct the scale - factor test. - -Thu May 13 01:31:19 1999 Nick Burrett - - * arm.md (nop): Backout Apr 27 change. Ensure REGISTER_PREFIX is - applied to each register. - * aof.h (ASM_FILE_START): Define register `r0'. - -1999-05-12 20:22 -0400 Zack Weinberg - - * configure.in: Make --enable-cpp and --with-cpp-install-dir - documented options. Enable the cpp driver by default. - * configure: Rebuilt. - -Wed May 12 18:08:48 1999 David Edelsohn - Richard Henderson - - * rs6000.c (print_operand) [w]: Calculate signed constant more clearly. - (rs6000_allocate_stack_space): Print as hexadecimal value. - * rs6000.h (CONST_OK_FOR_LETTER_P): 'L' checks for a signed, - 16-bit shifted constant. Fix typo for 'P'. - (EXTRA_CONSTARINT): 'T' checks for a 32-bit mask operand. - * rs6000.md (movsi, addsi3_internal1, movdi, adddi3_internal1): - Use 'L' for shifted constant. - (anddi3_internal3): Fix typo. - (32-bit mask patterns): Use 'T'. - -Wed May 12 07:30:31 1999 Bruce Korb - - * fixinc/fixincl.c(quoted_file_exists): new procedure to ensure that - a file exists before trying to copy it into the destination - (extract_quoted_files): use that routine. - -Wed May 12 07:27:31 1999 Craig Burley - - Allow front end (like g77's) to override maintenance of errno: - * expr.c (expand_builtin): Bother with errno only if - flag_errno_math. - * flags.h: Declare flag_errno_math. - * toplev.c: Define flag_errno_math. - -Tue May 11 23:55:49 1999 Jeffrey A Law (law@cygnus.com) - - * fixproto: Change "mkdir" calls to "mkdir -p" - - * fixinc/inclhack.def (io_def_quotes): Consistently allow multiple - whitespace characters between the "define" and the name of the macro. - * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt. - -Tue May 11 20:46:37 1999 Richard Henderson - - * alpha.c (alpha_expand_block_move): Handle TImode registers - used with ADDRESSOF. - (alpha_expand_block_clear): Handle ADDRESSOF specially. - -1999-05-11 Ulrich Drepper - - * fixinc/fixinc.x86-linux-gnu (FD_ZERO): Remove unneccessary - memory output operand which irritates gcc. - -Tue May 11 11:45:16 1999 Dave Brolley - - * toplev.c (documented_lang_options): Add -MD, -MMD, -M and -MM for - cpplib-enabled compilers. - -Tue May 11 11:34:56 1999 Vladimir Makarov - - * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Add parentheses - around &&. - -Mon May 10 13:51:24 1999 Nick Clifton - - * tm.texi (FUNCTION_ARG): Stack element of PARALLEL must come - first. - -Tue May 11 01:32:01 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/inclhack.def (sun_auth_proto): Apply to all targets. - (sysz_stdlib_for_sun): Similarly. - * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt. - -Mon May 10 20:34:10 1999 Jim Wilson - - * config/mips/elf.h (UNIQUE_SECTION_P): Undef. - * config/mips/elf64.h (UNIQUE_SECTION_P): Undef. - * config/mips/mips.h (UNIQUE_SECTION_P): Define to 0. - -1999-05-10 18:21 -0400 Zack Weinberg - - * cppfiles.c (initialize_input_buffer): New function. - (finclude): Call it, if pfile->input_buffer is NULL. Accept - any character device as an input file. - (read_and_prescan): Use pfile->input_buffer and - pfile->input_speccase. - * cppinit.c (cpp_cleanup): Free pfile->input_buffer and - pfile->input_speccase. - * cpplib.h (cpp_reader): Add input_buffer, input_speccase, and - input_buffer_len members. Use memcpy in CPP_PUTS_Q. - - * cppmain.c: Buffer output in the token_buffer; throttle - number of calls to fwrite; check for errors from fwrite. - -1999-05-10 18:21 -0400 Zack Weinberg - - * cppspec.c: Treat two non-option arguments as input and - output file. Three or more non-option args is an error. - Clean up. - * gcc.c (default_compilers): Pass -$ to the preprocessor. - * objc/lang-specs.h: Likewise. - -Mon May 10 12:59:20 1999 Jeffrey A Law (law@cygnus.com) - - * optabs.c (emit_cmp_and_jump_insns): Handle the case where both - operands to the comparison are constants. - -Mon May 10 07:28:10 1999 Bruce Korb - - * fixinc/inclhack.def(arm_norcroft_hint): check before fixing - (no_double_slash): portability - (math_exception): added reminder comment - -Mon May 10 01:28:10 1999 Craig Burley - - From Fri May 7 9:31:41 1999 Donn Terry (donn@interix.com): - * varasm.c (mark_constant_pool): Add some transitive closure. - -Sun May 9 22:51:04 1999 Craig Burley - - Fix gcc.dg/990506-0.c: - * c-typeck.c (require_complete_type): Handle ERROR_MARK input. - -Sun May 9 13:19:12 1999 Jeffrey A Law (law@cygnus.com) - - * gcse.c (cprop_insn): Do not try to simplify a simple jump. - -Sun May 9 11:12:19 1999 Philip Blundell - - * config/arm/arm.h (ASM_OUTPUT_MI_THUNK): Add (PLT) to branch if - necessary. Reported by jim@federated.com. - -Sat May 8 23:05:35 1999 Jeffrey A Law (law@cygnus.com) - - * pa.h (PRINT_OPERAND_ADDRESS): Output "%r0", not "r0" for the - base register in an absolute memory address. - * pa.md (conditional moves): Avoid using immediate zero for - register zero. - -Sat May 8 06:23:21 1999 Philip Blundell - - Based on patch by Scott Bambrough: - * config/arm/arm.h (NEED_PLT_GOT): New macro. Set to 0 if not - already defined. - * config/arm/elf.h (NEED_PLT_GOT): Define to flag_pic. - * config/arm/arm.md (call_symbol, call_value_symbol et al.): If - NEED_PLT_GOT is true, add explicit "(PLT)" to generated branches. - * config/arm/arm.c (output_func_epilogue, - output_return_instruction): Likewise for calls to abort. - -Sat May 8 01:57:58 1999 Donn Terry (donn@interix.com) - - * calls.c (rtx_for_function_call): Extend function pointer being - passed to chkr_check_exec_libfunc, if needed. - -Sat May 8 01:51:50 1999 David Edelsohn - - * ginclude/stdarg.h (__va_rounded_size): Use long type for - rounding on AIX. - * ginclude/varargs.h: Likewise. - -Sat May 8 01:47:20 1999 Andreas Schwab - - * invoke.texi: Remove duplicates in the description of -d - letters. Fix use of @item vs. @itemx. - -Sat May 8 01:43:02 1999 Franz Sirl - - * rs6000.h (RS6000_VARARGS_OFFSET): Die die die. - (CUMULATIVE_ARGS): Remove varargs_offset; update commentary. - * rs6000.c (setup_incoming_varargs): Fix typo last change. - (init_cumulative_args): Remove varargs_offset references. - - * rs6000/linux.h (NO_IMPLICIT_EXTERN_C): Define. - (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Undefine. - -Sat May 8 01:34:19 1999 Andreas Schwab - - * reload1.c (gen_mode_int): New function. - (reload_cse_move2add): Use it to generate the new constants. - -Sat May 8 01:25:09 1999 Andreas Schwab - - * varasm.c (output_constant): Do nothing if -fsyntax-only. - -Fri May 7 19:10:15 1999 Vladimir Makarov - - * sparc.h (GO_IF_LEGITIMATE_ADDRESS): Prohibit REG+REG addressing - for TFmode when there are no instructions which accept REG+REG - instructions. - -Fri May 7 12:38:54 1999 Jim Wilson - - * mips/elf64.h (MAKE_DECL_ONE_ONLY, UNIQUE_SECTION_P): Define. - * mips/mips.c (mips_select_rtx_section): When TARGET_MIPS16, use - function_section instead of text_section. - * mips/mips.h (ENCODE_SECTION_INFO): Add check for UNIQUE_SECTION_P - in TARGET_MIPS16 STRING_CST handling. - -Fri May 7 09:54:11 1999 Nick Clifton - - Patch from: Nick Burrett - - * arm.c (arm_poke_function_name): New function to implement - -mpoke-function-name. - * aof.h (ASM_DECLARE_FUNCTION_NAME): Call it. - * aout.h (ASM_DECLARE_FUNCTION_NAME): Likewise. - * elf.h (ASM_DECLARE_FUNCTION_NAME): Likewise. - * arm.h: Prototype it. - (TARGET_SWITCHES): Add `no-poke-function-name'. - -Fri May 7 14:19:31 1999 Rainer Orth - - * fixinc/server.c (load_data): Cast text_size to long, adapt - format. - * fixinc/server.c (read_pipe_timeout): Declare volatile, modified - in signal handler. - (sig_handler): Add debug code. - * fixinc/server.c (run_shell): Don't \-escape cd, it breaks the - Ultrix V4.3 /bin/sh. - * fixinc/server.c (def_args): Use static instead of STATIC to - avoid redefinition error from linker iff DEBUG. - - * fixinc/hackshell.tpl: Don't strip trailing directory from - DESTDIR - that is already done - - * fixinc/fixincl.c (run_compiles): fix memory leak - -Thu May 6 20:34:00 1999 Mark Mitchell - - * resource.c (mark_referenced_resources): Make volatil - monotonically increasing. - (mark_set_resources): Likewise. - -Thu May 6 20:02:33 1999 Fred Fish - - * rs6000/xm-beos.h (HAVE_VPRINTF): Don't redefine if already defined. - (HAVE_PUTENV, HAVE_ATEXIT, HAVE_RENAME): Likewise. - -Wed May 5 20:28:32 1999 Jason Merrill - - * install.texi (Header Dirs): s/GPLUS/GPLUSPLUS/. - -Wed May 5 23:44:15 1999 J"orn Rennecke - - * unroll.c (copy_loop_body): Don't copy VTOP notes from copy_notes_from. - -Wed May 5 16:26:13 1999 Vladimir Makarov - - * function.c (purge_addressof_replacements): Rename into - purge_bitfield_addressof_replacements. - (purge_addressof_replacements): New variable. - (purge_addressof_1): Add code for changing addressof in notes for - field values which are extracted by usage MEM with narrower mode. - (purge_addressof): Initialize purge_bitfield_addressof_replacements. - -Wed May 5 07:40:02 1999 Nick Clifton - - Patch from: Nick Burrett - * config/arm/arm.h (ARM_MCOUNT_NAME): Define. - (FUNCTION_PROFILER): Remove assembler dialect dependency and use - ARM_MCOUNT_NAME. - (TRAMPOLINE_TEMPLATE): Remove assembler dialect dependency. - - * config/arm/aof.h (ARM_MCOUNT_NAME): Define. - -1999-05-05 09:58 -0400 Zack Weinberg - - * gcc.c (default_compilers): Fix brace nesting bug. - * objc/lang-specs.h: Use %i, not %g.mi, for the input file - when processing an .mi file. - -Tue May 4 13:17:55 1999 Mark Mitchell - - * resource.c (mark_set_resources): Handle UNSPEC_VOLATILE, - ASM_INPUT, TRAP_IF, and ASM_OPERANDS just like in - mark_referenced_resources. - -Mon May 3 22:38:41 1999 David Edelsohn - - * rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Change non-PowerPC - and AIX64 combination to warning. Add warning for disabling - PowerPC64 support when using 64-bit mode. - (LIB_SPEC): Do not link with libg.a in 64-bit mode. - (LINK_SPEC): Do not export libg.exp symbols in 64-bit mode. - * rs6000/rs6000.h (MY_ISCOFF): Treat import/export files as valid - XCOFF files. - (read_only_data_section, private_data_section, - read_only_private_data_section): Always align CSECTs to doubleword - boundary regardless of mode. - (TEXT_SECTION_ASM_OP): Align text CSECT on doubleword boundary in - 64-bit mode. - (DATA_SECTION_ASM_OP): Always align CSECT to doubleword boundary. - (ASM_OUTPUT_LOCAL): Use rounded size in 64-bit mode to - maintain doublword alignment. - -Mon May 3 14:45:23 1999 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (btst insns): btst does not leave cc0 in a usable - state for redundant tst eliminatino. - * mn10300.md (btst insns): Likewise. - -Mon May 3 16:14:32 1999 Kaveh R. Ghazi - - * mips.h (Pmode): Revert Oct 14th change which added a cast. - -Sun May 2 14:02:21 1999 Mark Mitchell - - * tree.h (struct tree_decl): Add comdat_flag. - (DECL_COMDAT): Define it. - * toplev.c (wrapup_global_declarations): Don't output a - DECL_COMDAT function just because it's public. - -Sun May 2 15:16:42 1999 Joseph S. Myers - - * pdp11.h (TARGET_SWITCHES): Fix error in previous change. - (ASSEMBLER_DIALECT): Define. - (CONDITIONAL_REGISTER_USAGE): Rename floating point registers if - required for the UNIX assembler. - (ASM_OUTPUT_INT): Remove. The compiler will synthesize it. - (ASM_OUTPUT_ADDR_VEC_PROLOGUE): Remove. - (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Change to "[" and "]". - (TRAMPOLINE_TEMPLATE): Use ASM_OUTPUT_SHORT. - * pdp11.c (output_addr_const_pdp11): Copy of output_addr_const - adapted to output constants in octal. - * pdp11.c, pdp11.h, pdp11.md: Use output_addr_const_pdp11 instead - of output_addr_const. Output constants in octal. Use assembler - dialect alternatives where DEC and UNIX assemblers use different - instruction names. - -Sun May 2 01:15:06 PDT 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Fri Apr 30 13:55:43 1999 Richard Henderson - - * va-ppc.h (__va_start_common): Let __builtin_saveregs do the work. - * rs6000.c (expand_builtin_saveregs): For V4, initialize a private - va_list struct, and return a pointer to it. - (setup_incoming_varargs): V4 save area based off virtual_stack_vars - instead of frame_pointer. - -Thu Apr 29 23:02:22 1999 Mark Mitchell - - * emit-rtl.c (start_sequence): Expand comments. - (start_sequence_for_rtl_expr): Likewise. - (push_to_sequence): Likewise. - (end_sequence): Likewise. - * expr.c (inhibit_defer_pop): Likewise. - * expr.h (inhibit_defer_pop): Likewise. - (NO_DEFER_POP): Likewise. - (OK_DEFER_POP): Likewise. - -Thu Apr 29 22:13:46 1999 Robert Lipe - - * configure.in (i?86-UnixWare7*-sysv): Set thread_file to 'posix' - --enable-threads[={yes,pthreads,posix}] is passed as a command - line parameter to configure. - * config/i386/sysv5.h (LIB_SPEC): Add support for '-pthread'. - (CPP_SPEC): Likewise. - -Thu Apr 29 17:23:59 1999 Richard Henderson - - * emit-rtl.c (operand_subword): Religiously mask and sign-extend - from 32-bits to HOST_WIDE_INT. - -Thu Apr 29 15:58:52 1999 Robert Lipe - - * fixinc/regex.c, fixinc/regex.h: Removed. Replace with... - * fixinc/gnu-regex.c, fixinc/gnu-regex.h: Imported from GDB 4.18. - * fixinc/Makefile.in (OBJ, HDR): Handle name changes from above. - (gnu-regex.o): Define REGEX_MALLOC to avoid memory leak. - * fixinc/fixincl.c: new regex.h header name - * Makefile.in: new regex.[ch] file names - -Thu Apr 29 12:53:33 1999 Richard Henderson - - * calls.c (emit_call_1): Pass rounded_stack_size to emit_call - instead of the unrounded size. - -1999-04-28 14:40 Bruce Korb - - * fixinc/mkfixinc.sh: Makesure the result shell script is writable - -Wed Apr 28 10:36:39 1999 Andreas Schwab - - * config/m68k/m68k.md (cmpsi+1): Use cmp.w when comparing a 16 bit - constant with an address register. - -Wed Apr 28 00:14:41 PDT 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Tue Apr 27 19:50:25 EDT 1999 Andrew MacLeod - - * rtl.h (REG_EH_REGION): Update comment to indicate a value of -1 - indicates no throw and no nonlocal gotos. - * optabs.c (emit_libcall_block): Emit REG_EH_REGION with a value - of -1 instead of 0 to indicate a nonlocal goto won't happen either. - * flow.c (count_basic_blocks, find_basic_blocks_1): Ignore libcall - blocks, look for REG_EH_REGION note exclusively. - (make_edges): Check for REG_EH_REGION > 0 for specified handlers. - -Tue Apr 27 15:33:42 1999 David Edelsohn - - * rs6000.h (read_only_data_section, private_data_section, - read_only_private_data_section, toc_section): Align CSECT on - doubleword boundary for 64-bit target. - (DATA_SECTION_ASM_OP): Likewise. - * rs6000.c (rs6000_stack_info): Leaf procedure stack limit is 288. - -Tue Apr 27 20:19:47 1999 J"orn Rennecke - - * sh.md (insv): Use copy_addr_to_reg. - - * final.c (insn_lengths_max_uid): New variable. - (init_insn_lengths, shorten_branches): Set it. - (get_attr_lengths): Test insn uid against insn_lengths_max_uid. - -1999-04-27 08:32 -0400 Zack Weinberg - - * expr.c (emit_move_insn_1): Abort if MODE argument is invalid. - (compare): Punt if TREE_OPERAND (exp, 0) is an ERROR_MARK. - -Tue Apr 27 01:33:43 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (ORDINARY_FLAGS_TO_PASS): Renmaed from FLAGS_TO_PASS. - Remove "CC". - (FLAGS_TO_PASS): New variable. - -Tue Apr 27 00:36:44 1999 Nick Burrett - - * arm.md (nop): Output instruction using output_asm_insn to fix - assembler dialect problems. - -Mon Apr 26 23:55:50 1999 Robert Lipe - - * Makefile.in (fixinc.sh): Fix dependencies. - - * fixinc/inclhack.def (avoid_bool): Enable match if typedefs are - prepended by spaces. - (sco5_stat_wrappers): New fix. Make sys/stat.h C++ safe. - * fixinc/fixincl.sh, fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt. - -Mon Apr 26 23:28:54 1999 Mumit Khan - Donn Terry - - * function.c (put_var_into_stack): Change ptr_mode to Pmode - in setup for chkr_set_right_libfunc calls. - (assign_params): Likewise. - * expr.c (emit_push_insn): Change ptr_mode to Pmode in - setup for chkr_copy_bitmap_libfunc and chkr_set_right_libfunc calls. - (expand_assignment): Change ptr_mode to Pmode in - setup for chkr_add_libfunc and chkr_copy_bitmap_libfunc. - (store_expr): Change ptr_mode to Pmode in - setup for chkr_add_libfunc and chkr_copy_bitmap_libfunc. - (expand_expr): Change ptr_mode to Pmode in - setup for chkr_check_addr_libfunc. - (expand_builtin): Change ptr_mode to Pmode in - setup for chkr_check_str_libfunc, chkr_copy_bitmap_libfunc and - chkr_check_addr_libfunc. - * calls.c (rtx_for_function_call): Change ptr_mode to Pmode in - setup for chkr_check_exec_libfunc. - (expand_call): Change ptr_mode to Pmode in - setup for chkr_set_right_libfunc. - (expand_call): Change ptr_mode to Pmode in - setup for chkr_set_right_libfunc. - (store_one_arg): Change ptr_mode to Pmode in - setup for chkr_set_right_libfunc. - - * c-parse.in (absdcl1): Allow attributes in explicit typespecs. - (%expect): Update. - * c-parse.y: Regenerate. - * c-parse.c: Likewise. - * objc/objc-parse.c: Likewise. - * objc/objc-parse.y: Likewise. - -Mon Apr 26 21:17:41 1999 Jason Merrill - - * c-pragma.c (push_alignment): Don't ignore alignments greater than - 4 bytes. - (handle_pragma_token): Likewise. - - * c-pragma.c: Support for #pragma pack (push, , ). - (struct align_stack): Add id field. - (push_alignment, pop_alignment): Take id parameter. - (handle_pragma_token): Add necessary states. - * c-pragma.h (enum pragma_state): Add necessary states. - -Tue Apr 27 13:58:23 1999 Michael Hayes - - * config/c4x/c4x.md (*cmpqf, *cmpqf_noov, *cmpqi_test, - *cmpqi_test_noov): Remove ? modifier from constraints list. - (*smulqi3_highpart_clobber, *umulqi3_highpart_clobber): Swap - output strings to match new constraint ordering. - -1999-04-26 19:16 -0400 Zack Weinberg - - * cpphash.c (dump_definition): New function. - * cpphash.h: Prototype it. - - * cpplib.c (handle_directive): Don't output anything here. - Streamline. - (pass_thru_directive): Take a length, not a pointer to the - end. All callers changed. - (do_define): Handle -dD, -dN, -g3 entirely here. Streamline. - (do_include): Handle -dI here. - (do_ident): Correct to match cccp. - (do_pragma): Copy the pragma through here. - (do_assert, do_unassert): Tidy. - - * cppinit.c (cpp_finish): If -dM was specified, walk the macro - hash table and call dump_definition on all the entries. - * cppmain.c: cpp_finish may produce output. - -Mon Apr 26 15:27:33 1999 Mark Mitchell - - * toplev.c (compile_file): Move call to check_global_declarations - after output_exception_table to restore behavior as it was before - 1999-04-22 change. - -1999-04-26 10:50 -0700 Bruce Korb - - * fixinc/fixincl.c: Improve the handling of child process exits - * fixinc/server.[ch]: Export the interface for shutting down - the server process - * fixinc/inclhack.tpl: Remove unnecessary character quote - * fixinc/fixincl.sh, fixinc/inclhack.sh: Regenerate - -Mon Apr 26 10:41:42 EDT 1999 Andrew MacLeod - - * alpha.md (builtin_setjmp_receiver): Use a label_ref instead of - a code label. - -1999-04-26 09:47 -0400 Zack Weinberg - - * rtl.texi: Document the rtl classes and their relation to - formats. - -Mon Apr 26 01:02:38 1999 Richard Henderson - - * alpha.md (fix_trunc patterns): Use reg_no_subreg_operand on op0 - for less work in reload. - (movsf and movdf patterns): Put fp reg alternatives first. - -Mon Apr 26 01:55:56 1999 Marc Espie - - * configure.in (openbsd): Factorize xmake_file. - (ix86 openbsd): Trim obsolete comment. - (vax openbsd): Fix typo. - * configure: Rebuilt. - -Mon Apr 26 01:30:59 1999 Donn Terry - - * expr.c (expand_assignment): Improve test for pointer type. - -Mon Apr 26 00:26:18 1999 Richard Henderson - - * alpha.c (print_operand_address): Account for the subreg word. - -Mon Apr 26 01:08:36 1999 Toshiyasu Morita (tm@netcom.com) - - * fold-const.c (make_range): Always initialize arg0 and arg1. - (fold): Similarly for alt0 and alt1. - * function.c (fixup_var_refs_insns): Initialize insn_list. - (instantiate_virtual_regs_1): Initialize offset. - * optabs.c (expand_binop): Initialize carry_in, carry_out, op0_xhigh - and op1_xhigh. - * stmt.c (expand_end_case): Initialize minval and maxval. - -Mon Apr 26 01:02:34 1999 Nathan Sidwell - - * toplev.c (report_error_function): Reorder file stack and - function name printing. Ignore FILE parameter. - -Mon Apr 26 00:58:54 1999 Jerry Quinn - - * pa.h (architecture_type): New enum. - (pa_arch_string, pa_arch): Declare. - (MASK_PA_10, MASK_PA_20): New flags. - (TARGET_SWITCHES): Add pa-risc-2-0. Update docs for PA1.0 codegen. - (TARGET_OPTIONS): Add -march= option. - * pa.c (pa_arch, pa_arch_string): Define. - (override_options): Set them. - * pa/pa-hpux10.h (ASM_FILE_START): Output LEVEL 2.0 asm directive for - 2.0 architecture. - * invoke.texi (Option Summary, HPPA Options): Document new - architecture flags. - - * pa/pa-hpux.h, pa/pa-hpux10.h, pa/pa-hpux9.h, pa/pa-osf.h, pa.h, - pa.c, pa.md, configure.in, configure: Replace TARGET_SNAKE by - TARGET_PA_11 and MASK_SNAKE by MASK_PA_11. - -Mon Apr 26 00:28:25 1999 Theodore Papadopoulo - - * flags.h (inline_max_insns): Declare. - * integrate.c (inline_max_insns): New variable. - (function_cannot_inline_p): Use it. - * toplev.c (main): Add the flag -finline-limit-n. - (display_help): Document -finline-limit-n. - * invoke.texi: Document -finline-limit-n - -Sun Apr 25 23:03:32 1999 Richard Henderson - - * stmt.c (expand_asm_operands): Reload in-out reg-only memory operands. - -Sun Apr 25 13:06:13 1999 Richard Henderson - - * function.c (assign_parms/STACK_BYTES): Revert last change, - and that of 19 Nov. - -Sun Apr 25 12:30:50 1999 Richard Henderson - - * calls.c (emit_call_1): New arg rounded_stack_size; update callers. - Update pending_stack_adjust based on this value. - (compute_argument_block_size): Include pending_stack_adjust in - PREFERRED_STACK_BOUNDARY alignment. - * function.c (assign_parms): Don't round to PREFERRED_STACK_BOUNDARY. - -Sun Apr 25 14:38:10 EDT 1999 John Wehle (john@feith.com) - - * stupid.c (stupid_mark_refs): Generate a REG_UNUSED note - for a register which is clobbered even if the register - was used by an earlier instruction. - - * i386.md (fix_truncsfdi2, fix_truncdfdi2, - fix_truncxfdi2): Don't bother with the gen_reg_RTX. - (fix_truncsfsi2, fix_truncsfdi2, fix_truncdfsi2, - fix_truncdfdi2, fix_truncxfsi2, fix_truncxfdi2): Update - operand constraints and modes. - * i386.c (output_fix_trunc): Use HImode register to avoid - memory stalls. Call output_move_double instead of output_to_reg. - (output_to_reg): Remove. - * i386.h: Likewise. - - * i386.md (negsf2, negdf2, negxf2): Set the type - attribute to fpop. - -Sat Apr 24 23:15:57 1999 Donn Terry (donn@interix.com) - - * alpha.md (call_value_nt): Correct subscripts. - -Sat Apr 24 20:49:20 1999 Richard Henderson - - * alpha.h (PRINT_OPERAND_ADDRESS): Break out to ... - * alpha.c (print_operand_address): here. Handle subregs. - -Fri Apr 23 22:35:41 EDT 1999 John Wehle (john@feith.com) - - * acconfig.h (HAVE_GAS_FILDS_FISTS): Add. - * configure.in: Check assembler instructions. - * configure: Rebuild. - * config.in: Likewise. - * i386.md (floathisf2, floathidf2, floathixf2): New patterns. - * i386.c (print_operand): Use the proper suffix for a 387 HImode - operand. Abort if a 387 operand has an unsupported size. - -Fri Apr 23 16:57:40 1999 Richard Henderson - - * alpha.c (alpha_write_verstamp): Mark `file' unused. - * alpha.h (FUNCTION_VALUE): Use gen_rtx_REG not gen_rtx. - (LIBCALL_VALUE): Likewise. - (GO_IF_LEGITIMATE_SIMPLE_ADDRESS): Handle normal subregs. - -Fri Apr 23 14:57:33 1999 Donn Terry - - * alpha32.h (INITIALIZE_TRAMPOLINE): Get offsets right. - - * alpha.c (alpha_initialize_trampoline): Add covert_memory_address - calls as needed. - -Fri Apr 23 14:36:47 1999 Richard Henderson - - * alpha.c (alpha_expand_prologue): Don't negate frame size - for use with subq. - -Fri Apr 23 09:43:18 1999 Nick Clifton - - * print-rtl.c (print_rtx): Display LABEL_NUSES for labels. - -Thu Apr 22 23:08:37 1999 Mark Mitchell - - * toplev.h (wrapup_global_declarations): Declare. - (check_global_declarations): Likewise. - * toplev.c (wrapup_global_declarations): New function, split out - from ... - (check_global_declarations): Likewise... - (compile_file): Here. - -Thu Apr 22 22:34:41 1999 Richard Henderson - - * c-parse.in (expr_no_commas): Verify we've an expr before - calling C_SET_EXP_ORIGINAL_CODE. - -Thu Apr 22 22:22:15 EDT 1999 John Wehle (john@feith.com) - - * toplev.c (rest_of_compilation): Always set - current_function_uses_only_leaf_regs appropriately. - -Thu Apr 22 14:39:43 1999 Mumit Khan - - * i386/xm-cygwin.h (HAVE_BCOPY): Delete unneeded macro. - (HAVE_BZERO): Likewise. - (HAVE_BCMP): Likewise. - (HAVE_RINDEX): Likewise. - (HAVE_INDEX): Likewise. - (DIR_SEPARATOR_2): Define. - (GET_ENV_PATH_LIST): Turn path lists into POSIX. - (PATH_SEPARATOR): Use ':'. - -1999-04-22 Bruce Korb - - * configure.in: enable disabling of fast fixincludes - * configure: regenerate - -1999-04-21 14:55 -0400 Zack Weinberg - - * gen-protos.c: #undef abort after including system.h. - Delete defns of fancy_abort and fatal. - * fix-header.c: Delete defn of fancy_abort. - -Wed Apr 21 12:09:38 1999 Mumit Khan - - * cccp.c (simplify_filename): Always preserve leading double slash. - -Wed Apr 21 18:15:55 1999 Michael Hayes - - * config/c4x/c4x.md: Add new peepholes to remove redundant loads. - -Wed Apr 21 17:41:29 1999 Michael Hayes - - * config/c4x/c4x.md (binary patterns): Reorder alternatives - so that two operand instructions are chosen before three operand - instructions. - -Tue Apr 20 23:38:58 1999 Nathan Sidwell - - * objc/Make-lang.in (objc-parse.c): Put BISON parameters in correct - order. - - * Makefile.in (c-parse.c): Put BISON parameters in correct - order. - -Tue Apr 20 16:38:11 1999 Richard Henderson - - * alpha.md (nt_lda): New pattern. - * alpha.c (alpha_expand_prologue): Use it for large frames - under windows nt. - -Tue Apr 20 17:57:14 1999 Catherine Moore - - * config/arm/arm.md (movhi): Add check for odd offset. - -Tue Apr 20 13:14:58 EDT 1999 John Wehle (john@feith.com) - - * i386.c (output_move_double): Abort if a non-offsettable - memory operand is encountered. Delete unused code. - (find_addr_reg): Remove. - -Mon Apr 19 21:13:02 1999 Craig Burley - - * tree.def (BLOCK): Fix typo in comment. - -1999-04-19 14:51 -0400 Zack Weinberg - - * cpplib.c (output_line_command): Drop CONDITIONAL argument. - We can omit unnecessary line commands if file_change == - same_file and pfile->lineno != 0. All callers changed. - (cpp_get_token [case '\n']): Don't bump pfile->lineno if - CPP_OPTIONS (pfile)->no_line_commands is set. - * cpplib.h: Fix prototype of output_line_command. - -1999-04-18 17:46 -0400 Zack Weinberg - - * cppfiles.c (find_position, read_and_prescan): Use `unsigned - long' variables consistently to count line and column numbers. - -Sun Apr 18 15:50:33 EDT 1999 John Wehle (john@feith.com) - - * output.h (current_function_is_leaf, - current_function_uses_only_leaf_regs): Declare. - * function.c (current_function_is_leaf, - current_function_uses_only_leaf_regs): Define. - (init_function_start): Initialize current_function_is_leaf - and current_function_uses_only_leaf_regs. - * final.c (leaf_function): Don't define. - (final_start_function): Replace uses of leaf_function with - current_function_uses_only_leaf_regs. - * toplev.c (rest_of_compilation): Set current_function_is_leaf - prior to invoking local register allocation. - (rest_of_compilation): Replace uses of leaf_function with - current_function_uses_only_leaf_regs. - * dbxout.c (dbxout_symbol, dbxout_parms): Likewise. - * dwarf2out.c (add_location_or_const_vaule_attribute): Likewise. - * dwarfout.c (add_location_or_const_value_attribute): Likewise. - * sdbout.c (sdbout_symbol): Likewise. - * sparc.h (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Likewise. - * sparc.c (eligible_for_epilogue_delay, output_return, - sparc_return_peephole_ok): Likewise. - * sparc.md (leaf_function attribute, untyped_return): Likewise. - * i386.c (ix86_compute_frame_size): Don't align the stack - for leaf functions which don't allocate any stack slots. - * tm.texi: Update documentation. - -Sun Apr 18 02:15:09 PDT 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Apr 18 00:08:45 1999 Richard Henderson - - * alpha.h (GO_IF_LEGITIMATE_SIMPLE_ADDRESS): Correct last change -- - make sure FP_BASE_P registers are only used with an integer. - -Sat Apr 17 22:54:17 1999 Richard Henderson - - * alpha.h (REG_OK_FP_BASE_P): New macro. - (GO_IF_LEGITIMATE_SIMPLE_ADDRESS): Use it. - * alpha.md (adddi3+1): New insn to handle large constants off - the soft frame pointer. - (adddi3+2): Don't split soft frame pointer or arg pointer additions. - -Sun Apr 18 17:24:10 1999 Michael Hayes - - * config/c4x/c4x.c (legitimize_operands): Use rtx_cost - to determine if it is worthwhile forcing a constant into a register. - * config/c4x/c4x.h (CONST_COSTS): An integer value of 255 or 65535 - used with a logical and or an integer value of 16 or 24 used with - a right shift has zero cost on the C40. - -Sat Apr 17 21:30:11 1999 Bernd Schmidt - - * gcse.c (compute_local_properties): If setp is nonzero, clear - TRANSP instead of setting it to all ones. - -Sat Apr 17 21:10:10 1999 Jan Hubicka - - * i386.c (i386_preferred_stack_boundary_string): New global variable. - (i386_preferred_stack_boundary): New global variable. - (override_functions): Set it. Tidy option setting code. - * i386.h (TARGET_OPTIONS): New command line option. - (i386_preferred_stack_boundary_string): Declare it. - (i386_preferred_stack_boundary): Likewise. - (PREFERRED_STACK_BOUNDARY): Use i386_preferred_stack_boundary. - -Sat Apr 17 19:22:38 1999 Jan Hubicka - - * i386.c (k6_cost): Take into account the decoding time. - -Sat Apr 17 19:13:22 1999 Donn Terry - - * i386.h (PRINT_OPERAND_PUNCT_VALID_P): Allow _. - * i386.c (print_operand): New %_ operator. - (load_pic_register): Proper number of leading _ in GOT literal. - * i386.md (prologue_get_pc_and_set_got): Likewise. - * i386/unix.h (ASM_OUTPUT_MI_THUNK): Likewise. - -Sat Apr 17 19:13:07 1999 Richard Henderson - - * alpha.c (alpha_expand_prologue): Use gen_adddi3 instead of - emit_move_insn+plus_constant. For NT, don't use the stack probe - loop pointer to allocate stack space. - * alpha.md (adddi3): Always use lda to set the stack pointer. - -1999-04-17 20:11 -0400 Zack Weinberg - - * c-aux-info.c, emit-rtl.c, explow.c, expmed.c, gcse.c, - haifa-sched.c, optabs.c, reorg.c, resource.c, sched.c: Include - toplev.h for real declaration of trim_filename. - * Makefile.in: Update dependencies. - -Sat Apr 17 14:36:19 1999 Craig Burley - - * tree.c (chainon): Check for circularity only if - ENABLE_CHECKING is defined. - -1999-04-17 10:15 -0400 Zack Weinberg - - * cccp.c: Make fatal non-static. - -Sat Apr 17 23:47:24 1999 Michael Hayes - - * config/c4x/c4x.md (*andqi3_255_clobber,*andqi3_65535_clobber): - New logical and patterns using C40 bit-field insert instructions. - (*lshrqi3_24_clobber,*ashrqi3_24_clobber,*lshrqi3_16_clobber, - *ashrqi3_16_clobber): New shift patterns using C40 bit-field insert - instructions. - -1999-04-16 22:44 -0400 Zack Weinberg - - * system.h: Always prototype abort. Prototype fatal. Define - abort to call fatal, not fprintf/exit. Define a stub macro - for trim_filename. - * toplev.c: Define DIR_SEPARATOR. (trim_filename): New - function. - * toplev.h: Prototype trim_filename, and #undef system.h's stub. - - * gcc.c, genattr.c, genattrtab.c, gencodes.c, genconfig.c, - genemit.c, genextract.c, genflags.c, genopinit.c, genoutput.c, - genpeep.c, genrecog.c: Make fatal non-static. - * gcov.c, gengenrtl.c, protoize.c: #undef abort after - including system.h. - - * config/i386/dgux.h, config/m68k/xm-amix.h: Remove stale code - relating to abort. - -Sat Apr 17 11:25:44 1999 Michael Hayes - - * config/c4x/c4x.md (mulqf3_clrqf_clobber, mulqi3_clrqi_clobber): - New patterns to support parallel multiply and load of zero. - -Fri Apr 16 01:23:47 1999 Jason Merrill - - * tree.c (valid_machine_attribute): If we're modifying the - FUNCTION_TYPE within a POINTER_TYPE and we don't get a decl, - update the POINTER_TYPE. - -Fri Apr 16 00:19:31 1999 Jan Hubicka - - * i386.c (x86_adjust_cost): Move break statement to correct place. - -Thu Apr 15 23:17:33 1999 Jerry Quinn - - * pa.h (HAVE_PRE_INCREMENT, HAVE_POST_INCREMENT, - HAVE_PRE_DECREMENT, HAVE_POST_DECREMENT): Fix pa_cpu value from - 8000 to PROCESSOR_8000. - -Thu Apr 15 20:46:57 1999 Donn Terry (donn@interix.com) - - * expr.c (expand_assignment): Force pointers to proper mode if - POINTERS_EXTEND_UNSIGNED is defined. - - * xm-alpha.h (alloca.h): Add Interix to list of special machines - that don't like alloca.h, pending using autoconf results. - - * except.c (start_catch_hadler): Be sure rtime_address is Pmode - if POINTERS_EXTEND_UNSIGNED. - - * except.c (expand_eh_return): Force pointers to proper mode if - POINTERS_EXTEND_UNSIGNED. - -Thu Apr 15 23:13:35 1999 Michael Hayes - - * config/c4x/c4x.h: Tweaked comment formatting. - * config/c4x/c4x.c: Likewise. - -Thu Apr 15 02:45:19 1999 Mumit Khan - - * aclocal.m4 (GCC_FUNC_MKDIR_TAKES_ONE_ARG): Define. - * configure.in: Use. - * configure: Rebuilt. - * acconfig.h (MKDIR_TAKES_ONE_ARG): Add. - * config.in: Rebuilt. - * system.h: Use. - -Thu Apr 15 01:03:21 1999 Jan Hubicka - Jeff Law - - * i386.md (QImode add pattern): Support lea instruction. - (HImode add pattern): Likewise. - - * i386.md (ashlsi patterns): Call output_ashl instead of output_ashlsi3. - (ashlqi): Use expander, separate LEA and SAL / ADD patterns; call - output_ashl. - (ashlhi): Likewise. - * i386.h (output_ashl): Renamed from output_ashlsi3. - * i386.c (output_ashl): Likewise; support HImode and QImode operands - as well. - - * i386.md (notsi, nothi, xorsi, xorhi, and xorqi patterns): Call - memory_address_displacement_length instead of memory_address_length. - * i386.c (memory_address_info): Renamed from memory_address_length. - Accept new argument DISP_LENGTH. All callers changed. If DISP_LENGTH, - then return the displacement length. Else return length of the - entire memory address. Handle MULT case correctly. - * i386.h (memory_address_info): Update declaration. - - * i386.md (memory_bit_test): Fix paren error. - -Wed Apr 14 21:29:18 1999 Andrew Haley - - * flow.c: (make_edges): Always make edges from a basic block - to its exception handlers, even if the block ends with a jump. - -1999-04-14 23:26 -0400 Zack Weinberg - - * graph.c (node_data): Return void. Ignore result of - print_rtl_single. Change caller to match. - * integrate.c (subst_constants): Initialize op0_mode to an - invalid mode, and abort before use if it's still invalid. - (Can only happen if the RTX_CLASS, RTX_FORMAT tables are corrupted.) - * objc/objc-act.c (get_objc_string_decl, - build_selector_translation_table, generate_protocol_list, - synth_id_with_class_suffix, build_keyword_selector, - build_selector_expr, gen_declarator): Abort when the tree - structure is corrupted. - -Wed Apr 14 19:57:49 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (alpha interix): Use symbolic names to set - target_cpu_default. - * configure: Rebuilt. - - * explow.c (allocate_dynamic_stack_space): Undo last change. Use - convert_memory_address instead. - -Wed Apr 14 19:42:02 1999 Donn Terry (donn@interix.com) - - * alpha/lib1funcs.asm: New file. - * alpha/t-interix (lib1funcs.asm): Add to build. - - * explow.c (allocate_dynamic_stack_space): Correctly convert TARGET - to Pmode. - -Wed Apr 14 14:26:36 1999 John Wehle (john@feith.com) - - * i386.md (truncxfdf): Output the template supplied - by output_move_double with the correct operands. - - * i386.md (extendsfdf, extendsfxf, extenddfxf): Use - output_float_extend instead specifying '#' as the template. - * i386.c (output_float_extend): Define. - * i386.h (output_float_extend): Declare. - -Wed Apr 14 10:48:03 1999 Catherine Moore - - * config/mips/elf.h, config/mips/elf64.h - (CTORS_SECTION_ASM_OP): Define. - (DTORS_SECTION_ASM_OP): Define. - (EXTRA_SECTIONS): Define. - (INVOKE__main): Define. - (NAME__MAIN): Define. - (SYMBOL__MAIN): Define. - (EXTRA_SECTIONS_FUNCTIONS): Define. - (SECTION_FUNCTION_TEMPLATE): Define. - (ASM_OUTPUT_CONSTRUCTOR): Define. - (ASM_OUTPUT_DESTRUCTOR): Define. - (CTOR_LIST_BEGIN): Define. - (CTOR_LIST_END): Define. - (DTOR_LIST_BEGIN): Define. - (DTOR_LIST_END): Define. - (LIB_SPEC): Define. - (STARTFILE_SPEC): Define. - (ENDFILE_SPEC): Define. - * config/mips/linux.h: Undefine all of the above. - * config/mips/rtems64.h: Likewise. - * config/mips/t-r3900: Likewise. - * config/mips/t-elf: New file. - * config/mips/vxworks.h: New file. - * configure.in (mips-wrs-vxworks): Use mips/vxworks.h. - (mips*-*-*elf*): Use t-elf instead of t-ecoff. - * configure: Regenerate. - -Wed Apr 14 09:59:38 1999 Richard Henderson - - * reload1.c (emit_reload_insns): Also find equivalent mems - for subregs of pseudos. - - * alpha.c (aligned_memory_operand): Recognize the output of - LEGITIMIZE_RELOAD_ADDRESS. Examine reg_equiv_memory_loc in - the event of a pseudo. - (unaligned_memory_operand): Likewise. Don't otherwise accept - completely illegal addresses. - (normal_memory_operand): Likewise. Handle subregs of pseudos. - (get_aligned_mem): Revert previous change. Abort if we don't have a - mem. During reload, call find_replacement on all illegal memories. - (get_unaligned_address): Likewise. - * alpha.h (SECONDARY_INPUT_RELOAD_CLASS): Use !aligned_memory_operand - instead of unaligned_memory_operand. - * alpha.md: Revert extra argument to get_aligned_mem. - (reload_inqi): Use any_memory_operand in constraints. Abort if - we're not given some sort of mem. - (reload_inhi): Likewise. - (reload_outqi, reload_outhi): Likewise. - -Wed Apr 14 09:39:20 1999 Richard Henderson - - * i386.md (neghi): Use the whole register when widening the op. - -1999-04-14 12:37 -0400 Zack Weinberg - - * cpperror.c, cppexp.c, cpplib.c: Never call abort. - * cpphash.c: Only call abort when we detect corruption of the - malloc arena. - * cppmain.c: Don't define fatal or fancy_abort. - -Wed Apr 14 09:19:39 1999 Jan Hubicka - - * i386.c (x86_adjust_cost): Agi stall takes 1 cycle on Pentium, fst - requires value to be ready one extra cycle. - -Wed Apr 14 11:28:34 1999 Dave Brolley - - * config/i386/i386.c (memory_address_length): Add missing parenthesis. - -Wed Apr 14 13:59:27 1999 Martin von Loewis - - * extend.texi (Deprecated Features): New node. - * invoke.texi (-Wdeprecated): Document. - -Wed Apr 14 00:18:22 1999 Jan Hubicka - - * i386.md (SImode logical compare): Avoid outputting non-pariable testw - and testl on Pentium. - (register and memory bit tests): Likewise. - (setcc, normal and reversed conditional branches): Use shorter - sequence for testing flags stored in EAX. - - * i386.md (xorsi3): Do not output NOT instrctions on Pentium. - (xorqi3): Likewise. - (xorhi3): Likewise. - (notsi2): Likewise. - (notqi2): Likewise. - (nothi2): Likewise; do not output prefixed opcodes when possible. - - * i386.md (neghi2): Do not output prefixed opcode when possible. - (ashlhi3): Likewise. - -Wed Apr 14 00:08:46 1999 Richard Henderson - - * i386.c (memory_address_length): New function. - * i386.h (memory_address_length): Declare it. - -Tue Apr 13 22:52:04 1999 Donn Terry (donn@interix.com) - Martin Heller (Ing.-Buero_Heller@t-online.de) - - * configure.in (interix Alpha): Add. - (winnt Alpha): Use alpha32.h - (interix i386): Parallel Alpha32. - * configure: Rebuilt. - - * config/interix.h: Move common elements from i386-interix.h. - * config/i386/i386-interix.h: Delete same. - * config/alpha/alpha-interix.h: New file. - - * config/alpha/alpha32.h: New file, part fron win-nt.h. - * config/alpha/win-nt.h: Deletions (-> alpha32.h). - * config/alpha/interix.h: New file - - * config/alpha/alpha.md (interix): Comment. - - * config/alpha/xm-alpha-interix.h: New file. - - * config/alpha/t-interix: New file. - - * fixinc/mkfixinc.sh (interix/Alpha): Add. - -1999-04-13 Mike Stump - - * i386/vxi386.h (CPP_CPU_SPEC): Define appropriately for vxworks. - (CPP_PREDEFINES, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): likewise. - -Tue Apr 13 21:01:36 1999 Jason Merrill - - * c-common.c (default_valid_lang_attribute): New fn. - (valid_lang_attribute): New callback ptr. - (decl_attributes): Call it. Move init_priority support into - C++ frontend. - -Tue Apr 13 17:47:14 1999 John Wehle (john@feith.com) - - * i386.md (movdi): Add splitter. - -Wed Apr 14 10:04:27 1999 Michael Hayes - - * config/c4x/c4x.md (storeqf_int, storeqf_int_clobber, loadqf_int, - loadqf_int_clobber): Add new patterns with corresponding splitters - to handle moves of floating point values into and out of intager - registers by using memory. - - * config/c4x/c4x.c (c4x_check_legit_addr): Disallow PRE_INC for modes - other than QFmode and QImode. - (mixed_subreg_operand): New function. - (c4x_emit_move_sequence): If moving a floating point value into or - out of an integer register, use the new patterns storeqf_int_clobber - or loadqf_int_clobber. - (reg_imm_operand, *_reg_operand): Call reg_operand instead of - register_operand. - (reg_operand, src_operand): Disallow operand if it satisifes - mixed_subreg_operand. - - * config/c4x/c4x.h (mixed_subreg_operand): Add prototype. - -Tue Apr 13 14:49:13 1999 Jan Hubicka - - * i386.c (agi_dependent): Handle push operation more correctly. - -Tue Apr 13 14:45:17 1999 Jan Hubicka - - * i386.md (anddi3): Add % constraint. - (iordi3, xordi3): Likewise. - -Tue Apr 13 14:29:58 1999 Jan Hubicka - - * i386.md (extendhisi2): Output mov instead of cw instruction for K6 - to improve decoding bandwidth. - * i386.md (extendhiqi2): Likewise. - -Tue Apr 13 14:26:31 1999 Jan Hubicka - - * i386.md (movsf_push): Handle memory to memory case too, new splitter. - (movdf_push, movxf_push): Likewise. - (movsf_push_memory, movdf_push_memory, movxf_push_memory): Remove. - -Tue Apr 13 14:14:06 1999 Jan Hubicka - - * i386.md: Do not output mov %0,reg on AMD K6. - -Tue Apr 13 12:14:07 1999 Dave Brolley - - * cppinit.c (cpp_start_read): Fix buffer overwrite. - * Makefile.in (cppinit.o): Typo in dependencies. - -Tue Apr 13 05:04:59 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (function prototypes for arm.c): Ifdef these out if - HAVE_CONFIG_H is not defined. - -Tue Apr 13 02:11:11 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c: Avoid Using immediate zero for register zero. - * pa.md: Likewise. - - * pa.c (print_operand, case 'f'): New case for FP register or 0.0. - (print_operand, case 'r'): Use %r0 for zero value. - * pa.md (move patterns, fcmp patterns): Use new %f output arg. - - * pa.c: Use a register name, not a raw immediate in branch, - compare/clear, sub, subb, uaddcm and vshd instructions. - * pa.md: Likewise. - - * pa.md, pa.h, ee.asm, ee_fp.asm, lib2funcs.asm: Likewise. - - * pa.c: Use a register name, not a raw immediate in "bv" instructions. - * pa.md, pa.h, ee.asm, ee_fp.asm, lib2funcs.asm: Likewise. - - * pa.c: Remove space register specification in memory addresses, - except where it is actually needed. - * pa.md, pa.h, ee.asm, ee_fp.asm, lib2funcs.asm: Likewise. - -Mon Apr 12 23:34:35 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Apr 12 14:58:30 1999 Jan Hubicka - - * reg-stack.c (check_stack_regs_mentioned): Remove variable SIZE. - -Mon Apr 12 19:15:17 1999 Daniel Jacobowitz - - * rs6000/sysv4.h (CPP_OS_LINUX_SPEC): Add missing backslash. - -Mon Apr 12 19:11:38 1999 Mumit Khan - - * i386/cygwin.h (SUBTARGET_SWITCHES): Add -mconsole; fix - -mno-nop-fun-dllimport and minor doc fixes. - (STARTFILE_SPEC): Cygwin DLLs don't have dllcrt0. - (LINK_SPEC): Add -mconsole support. - * i386/mingw32.h (LIB_SPEC): Make libraries consistent with - Cygwin. - (LINK_SPEC): Remove. Use Cygwin's version. - (MATH_LIBRARY): Make it null. - * i386/crtdll.h (MATH_LIBRARY): Likewise. - -Fri Apr 12 15:00:52 1999 Stan Cox - - * c-decl.c (c_decode_option, start_decl, start_function, - finish_function) : Recognize -Wno-main so we can avoid warnings. - -1999-04-12 Zack Weinberg - - * cpphash.c (collect_expansion, macroexpand, - push_macro_expansion): Make the escape character in macro - buffers '\r', not '@'. Remove code to protect literal - occurrences of the escape character; '\r' cannot appear - in a macro buffer unless we put it there. - * cpplib.c (skip_comment, copy_comment, cpp_skip_hspace, - copy_rest_of_line, cpp_get_token, parse_string, - parse_assertion): '\r' might be a backslash-newline marker, or - it might be a macro escape marker, depending on - CPP_BUFFER (pfile)->has_escapes. '@' is not a special - character. - * cpplib.h: Update commentary. - -Mon Apr 12 09:30:03 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (target_fp_name, structure_size_string, arm_cpu_select): - Const-ify. - * arm.c (target_fp_name, structure_size_string): Const-ify. - - * arm.md (reload_inhi, reload_outhi): Make the scratch DImode. - * arm.c (arm_reload_in_hi): Handle cases when the input is still - a pseudo, make use of scratch registers for reloading the address - as appropriate. - (arm_reload_outhi): Similarly for when the output is still a pseudo. - - * riscix.h (SUBTARGET_SWITCHES): Document. - -1999-04-12 Bruce Korb - - * fixincludes: - make fixincludes behave like the scripts in fixinc/ - - * Makefile.in( stmp-fixinc ): - ensure the SHELL value is that of the make - - * fixincl/inclhack.tpl: - the file name lists ought to be restricted to "*.h" anyway - C++ files may be named .../[a-z]++/... also - Adding copyright year and attribution to output - - * fixincl/inclhack.def: - fixed broken expression - Clarify a some comments - - * fixincl/fixincl.tpl: - Clarify a some comments - Remove dead template text - Correct the counting of regular expressions - -Mon Apr 12 03:07:44 1999 Richard Henderson - - * alpha.c (aligned_memory_operand): Handle out of range stack slots. - Take a new SCRATCH argument for the occasion. Update all callers. - (get_unaligned_address): Abort on out of range stack slots. - * alpha.md (adddi3 splitter): Check s_p_rtx not REGNO. - (reload_inqi): Check for aligned mems before unaligned. - (reload_inhi): Likewise. - -Mon Apr 12 03:11:30 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (flow_delete_insn): If we delete a CODE_LABEL, also remove - it from the nonlocal_goto_handler_labels list. - * jump.c (delete_insn): Likewise. - (jump_optimize_1): Also recompute LABEL_NUSES when we are just - marking labels. - * rtl.h (remove_node_from_expr_list): Declare. - * rtlanal.c (remove_node_from_expr_list): New function. - -Mon Apr 12 02:37:02 1999 Jan Hubicka - - * reg-stack.c: Update comment, include varray.h. - (stack_regs_mentioned_data): New global variable. - (check_stack_regs_mentioned): New function. - (stack_regs_mentioned): New function. - (reg_to_stack): Initialize and free stack_regs_mentioned_data, - use stack_regs_mentioned. - (record_asm_reg_life): Change insn type cache for changed insn. - (record_reg_life): Do not change the insn mode. - (emit_pop_insn): Likewise. - (emit_swap_insn): Likewise. - (move_for_stack_reg): Likewise. - (stack_reg_life_analysis): Use stack_regs_mentioned. - (emit_swap_insn): Likewise. - (subst_stack_regs): Likewise. - (convert_regs): Likewise. - * jump.c (find_cross_jump): Use stack_regs_mentioned. - * rtl.h (stack_regs_mentioned): Declare. - -Mon Apr 12 00:57:10 1999 Theodore Papadopoulo - - * integrate.c (INTEGRATE_THRESHOLD): Sync it with the comment. - -Sun Apr 11 10:24:18 1999 Mark Mitchell - - * rtl.h (rtx_def): Update documentation for jump and call. - -Sun Apr 11 07:43:44 1999 Kaveh R. Ghazi - - * jump.c (jump_optimize_1): Make the definition static to match - the prototype. - -Sat Apr 10 22:51:53 1999 Jan Hubicka - - * flow.c (life_analysis): New parameter remove_dead_code. - (life_analysis_1): Likewise. - (propagate_block): Likewise; use it. - * output.h: Update prototype. - * toplev.c: Update calls to life_analysis. - -Sat Apr 10 22:12:12 1999 Jan Hubicka - - * recog.c (constrain_operands): Ignore unary operators when - matching operands. Recognize '5'..'9' as well. - -Sat Apr 10 21:53:02 1999 Philipp Thomas (kthomas@gwdg.de) - Richard Henderson - - * configure.in: Set target_cpu_default2 for target_alias k6. - * i386.h (TARGET_SWITCHES): Remove no- entries. - (CC1_CPU_SPEC): Likewise. - (CPP_CPU_DEFAULT_SPEC): Streamline definition. Add K6 version. - (CPP_K6_SPEC): New. - (CPP_CPU_SPEC): Add K6 variant. - (EXTRA_SPECS): Likewise. - -Fri Apr 9 11:29:17 1999 Richard Henderson - - * flow.c (merge_blocks_nomove): Rewrite to properly handle two - blocks that vanish entirely during merging. - -Sat Apr 10 20:09:55 1999 John Wehle (john@feith.com) - - * i386.md (floatsisf2, floatdisf2, floatsidf2, floatdidf2, - floatsixf2, floatdixf2, movsicc, movhicc, movsfcc, movdfcc, - movxfcc, movdicc): Remove unused register constraints from - the splitters. - - * i386.md (fixuns_truncsfsi2, fixuns_truncdfsi2, - fixuns_truncxfsi2): Delete. - - * reg-stack.c (delete_insn_for_stacker): Ensure that - the only side effects of a PARALLEL are clobbers. - (subst_stack_regs): Handle subst_stack_regs_pat deleting - a PARALLEL. - * i386.md (extendsfdf2, extenddfxf2, - extendsfxf2): Rewrite using a splitter. - * i386.c (output_op_from_reg): Remove. - * i386.h: Likewise. - -Sat Apr 10 13:09:18 1999 Nick Clifton - - * config/arm/arm.c (di_operand): Allow SUBREGs as well. - (soft_df_operand): Allow SUBREGs as well. - -Sat Apr 10 06:14:31 1999 Jan Hubicka - - * extend.texi (Assembler Instructions with C Expression Operands): - Document the i386 floating point operands. - -1999-04-10 Mike Stump - - * configure.in (*-*-vxworks): Add vxWorks thread support for all - vxWorks targets. - * configure.in (thumb-wrs-xvworks): Add vxWorks support for thumb. - * configure: Rebuilt. - -Sat Apr 10 06:04:50 1999 Donn Terry (donn@interix.com) - - * i386/t-interix: Use mostly system headers unchanged. - Use system assert.h - * fixinc/fixinc.interix: Ditto (make almost no-op). - * config/x-interix.h (_ALL_SOURCE): add -D - * config/x-interix.h (crti.o): Delete dependency. - * config/xm-interix.h (ONLY_INT_FIELDS): Define only when bootstrapping. - * i386/xm-i386-interix.h: New file. - * i386/interix.h (ASM_OUTPUT_LIMITED_STRING): Fix warnings. - * i386/i386-interix.h: Renamed from interix.h. - * configure.in (interix): Use new files. - * configure: Rebuilt. - -Sat Apr 10 05:25:28 1999 Daniel Jacobowitz - - * rs6000/sysv4.h (CPP_OS_LINUX_SPEC): Fix conditions - for -Dunix and -Dlinux, and remove duplicate definition. - Change -Asystem(linux) to -Asystem(posix). - (CPP_OS_SOLARIS_SPEC): Fix conditions for -Dunix, -Dsun, - -DSVR4, -D__EXTENSIONS__. - - * rs6000/linux.h (CPP_PREDEFINES): Remove -Dunix, - -Dlinux, -Asystem(linux), and -Asystem(unix). - -Sat Apr 10 05:14:50 1999 Mark Elbrecht - - * i386/djgpp.h (SET_ASM_OP): Define. - - * cccp.c (DIR_SEPARATOR): Move to the top of the file. - (is_dir_separator): New function. - (simplify_filename): Use it. - * collect2.c (find_a_file): Use HAVE_DOS_BASED_FILE_SYSTEM in place - of the DIR_SEPARATOR test. - Consider any file starting with a drivename to be absolute. - If the absolute filename test fails and EXECUTABLE_SUFFIX is - defined, append EXECUTABLE_SUFFIX to the file and try again. - * cppinit.c (base_name): Use HAVE_DOS_BASED_FILE_SYSTEM - in place of __MSDOS__ and _WIN32. - * cppfiles.c (simplify_pathname): Likewise. - * gcc.c (IS_DIR_SEPARATOR): Define new macro. Returns true if a - character is a directory separator. - (find_a_file): Use it. - (convert_filename): Likewise. - (process_command): Likewise. - (do_spec_1): Likewise. - (is_directory): Likewise. - (main): Likewise. - * prefix.c (IS_DIR_SEPARATOR): Define. Tests whether a character is - a directory separator. - (translate_name): Use it. - (update_path): Change DIR_SEPARATOR_2 to DIR_SEPARATOR. Fix - warning in block where '/' is changed to DIR_SEPARATOR. - * i386/xm-djgpp.h (DIR_SEPARATOR): Set to '/'. - (DIR_SEPARATOR_2): New macro. Set to '\'. - (HAVE_DOS_BASED_FILESYS): Define. - * i386/xm-mingw32.h: Updated copyright. Set - DIR_SEPARATOR_2 to '/'. Define HAVE_DOS_BASED_FILE_SYSTEM. - * i386/xm-os2.h: Likewise. - * winnt/xm-winnt.h: Likewise. - * i386/xm-dos.h: Likewise. Add copyright. - -1999-04-10 Joseph S. Myers - - * pdp11.h (TARGET_SWITCHES): Add option to vary assembler syntax. - (TARGET_DEFAULT): Possibly use UNIX syntax. - (TARGET_UNIX_ASM, TARGET_UNIX_ASM_DEFAULT): New macros. - (REGISTER_NAMES): Use "r5" instead of "fp". - (ASM_OUTPUT_ALIGN): Use ".even" directive, and abort for any - greater alignment. - * 2bsd.h (TARGET_UNIX_ASM_DEFAULT): Default to UNIX assembler - syntax for 2BSD. - * pdp11.c (output_ascii): Use working syntax for ".byte". - (print_operand_address): Use "*" instead of "@" when using UNIX - assembler syntax. - -Sat Apr 10 03:50:12 1999 Jeffrey A Law (law@cygnus.com) - - * rtl.h (rebuild_jump_labels): Declare. - * jump.c (jump_optimize_1): Renamed from jump_optimize. Make static. - Add new argument MARK_LABELS_ONLY. Quit after mark_all_labels if - requested. - (jump_optimize, rebuild_jump_labels): New wrapper functions for - jump_optimize_1. - * toplev.c (rest_of_compilation): Use rebuild_jump_labels instead of - running the entire jump optimizer. - - * rtl.h (local_alloc): Returns an integer now. - * local-alloc.c (recorded_label_ref): New file scoped variable. - (local_alloc): Initialize recorded_label_ref to zero. Return its - value when local allocation has completed. - (update_equiv_regs); If we create an equivalence for a LABEL_REF, - set recorded_label_ref. - * toplev.c (rest_of_compilation): Run the jump optimizer after - register allocation and reloading if needed. - -Fri Apr 9 21:02:57 1999 Krister Walfridsson (cato@df.lth.se) - - * i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Fix typo. - * i386/freebsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. - -1999-04-09 Zack Weinberg - - * cpphash.c (special_symbol): When expanding __LINE__, use the - top file buffer, not the top buffer. - -Fri Apr 9 13:41:04 1999 Jim Wilson - - * Makefile.in (check-g++, check-gcc, check-g77, check-objc): Add - cd .. to TCL_LIBRARY command. - -Fri Apr 9 13:04:52 1999 Nick Clifton - - * config/arm/unknown-elf.h (SUBTARGET_CPU_DEFAULT): Only define if - not already specified. - -Fri Apr 9 11:18:55 1999 Jason Merrill - - * c-common.c (decl_attributes, A_INIT_PRIORITY): Allow arrays - of classes, too. - -Fri Apr 9 10:40:10 1999 Kaveh R. Ghazi - - * rs6000.c (rs6000_override_options, ptt, rs6000_file_start, - rs6000_float_const, rs6000_replace_regno, debug_stack_info, - rs6000_output_load_toc_table, output_prolog, output_epilog): - Const-ify a char*. - (output_mi_thunk): Likewise. Mark parameter `thunk_fndecl' with - ATTRIBUTE_UNUSED. Hide unused variables `r0', `sp', `toc', - `schain', `r12', `buf' and `labelno'. - (output_ascii): Const-ify a char*. - (rs6000_gen_section_name): Initialize variable `last_period'. - (rs6000_adjust_priority): Mark parameter `insn' with - ATTRIBUTE_UNUSED. - (rs6000_trampoline_template, rs6000_dll_import_ref, - rs6000_longcall_ref, rs6000_encode_section_info): Const-ify a char*. - - * rs6000.h (offsettable_mem_operand, optimization_options): Add - prototypes. - - * rs6000.md (movdi, define_split): Cast a value to HOST_WIDE_INT - when comparing against one. - -Thu Apr 8 19:20:18 1999 Jeffrey A Law (law@cygnus.com) - - * expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF): - Do not try to optimize an aggregate address which has VOIDmode. - Mirrors March 23 change to expand_assignment. - - * flow.c (delete_unreachable_blocks): Do not require EDGE_FALLTHRU - for an edge when tidying an edge which connects consecutive basic - blocks. - - * flow.c (can_delete_label_p): Do not convert a label into a - deleted label here. - - * cse.c (flush_hash_table): New function. - (cse_insn): Flush the hash table when we encounter a volatile asm. - (cse_basic_block): Use flush_hash_table instead of doing it - inline. - - * reload1.c (reload_cse_regs_1): Flush known register values if - we encounter a volatile asm. - - * loop.c (strength_reduce): Re-enable Joern's loop improvements. - -Thu Apr 8 09:37:40 1999 Nick Clifton - - * config/arm/arm.c (arm_print_operand): Undo previous change - - always print large constants in decimal. - -Thu Apr 8 10:22:23 1999 Kaveh R. Ghazi - - * configure.in (host_xm_file, build_xm_file): Include hwint.h. - Use case statements instead of "if test -a ... -a ... -a ..." - - * machmode.h: Don't define HOST_WIDE_INT, etc. Wrap use of - HOST_WIDE_INT in #ifdef. - - * mips.h: Include hwint.h instead of providing definitions for - HOST_WIDE_INT, etc. Wrap uses of HOST_WIDE_INT in #ifdef. - -Thu Apr 8 06:16:14 1999 John Wehle (john@feith.com) - - * i386.md (truncdfsf2, truncxfsf2, - truncxfdf2): Rewrite using a splitter. - -Thu Apr 8 01:26:05 1999 Arg Haas (ahaas@neosoft.com) - Jeffrey A Law (law@cygnus.com) - - * freebsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Avoid ambiguous - else statement. - * gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. - * linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. - * openbsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. - -Wed Apr 7 22:40:19 1999 Jim Wilson - - * i960/i960.c (i960_function_prologue): Don't save static chain - pointer. - * i960/i960.h (STACK_CHAIN_REGNUM): Change from r3 to g12. - (TRAMPOLINE_TEMPLATE): Likewise. - (FRAME_POINTER_REQUIRED): Check current_function_has_nonlocal_goto. - * i960/i960.md (nonlocal_goto): Rewrite. - -Tue Apr 6 17:49:49 1999 Philip Blundell - - * config/arm/lib1funcs.asm: Test for __ELF__ not __elf__. - -Wed Apr 7 14:07:34 1999 Jeffrey A Law (law@cygnus.com) - - * h8300.c (h8300_adjust_insn_length): Also avoid recognizing - ADDR_VEC and ADDR_DIFF_VEC insns. - - * h8300.c (h8300_adjust_insn_length): Avoid trying to recognize - USE, CLOBBER or SEQUENCE insns. - - * unroll.c (unroll_loop): For HAVE_cc0 machines, adjust copy_end_luid - to account for the uncopied insn that sets cc0 at the end of the loop. - - * unroll.c (copy_loop_body): Always ensure at least two insns - are in the copied loop. - -Wed Apr 7 14:52:18 1999 Catherine Moore - - * config/mips/elf.h (MAKE_DECL_ONE_ONLY): Define. - (UNIQUE_SECTION_P): Define. - -1999-04-07 Bruce Korb - - * fixinc/inclhack.tpl & fixincl.tpl: - Remove dynamic content from generated files - -Wed Apr 7 13:16:22 1999 John Wehle (john@feith.com) - - * i386.c (output_move_memory): Remove. - * i386.h: Likewise. - - * i386.md (movsi, movhi, movstricthi, movqi, movstrictqi, - movsf, movdf, movxf, movdi): Check no_new_pseudos instead - of (reload_in_progress | reload_completed). - -Wed Apr 7 03:16:45 1999 Richard Henderson - - * alpha.c (reg_no_subreg_operand): New function. - * alpha.h (PREDICATE_CODES): Add it. - * alpha.md (floatdi?f patterns): Use it for op1. - - * alpha.c (alpha_end_function): Don't flag weak functions. - -Wed Apr 7 02:11:55 1999 Richard Henderson - - * expr.c (expand_builtin) [BUILT_IN_RETURN_ADDRESS]: Use - copy_to_mode_reg; don't force constants into a register. - -Tue Apr 6 22:55:25 1999 Richard Henderson - - * toplev.c (compile_file): Typo flow_dump -> flow2_dump. - -1999-04-06 Joseph S. Myers - - * pdp11.c (simple_memory_operand): Add default case in switch. - * pdp11.h (TARGET_SWITCHES): Add help strings. - (NOTICE_UPDATE_CC): Don't include excess argument to format. - (ASM_OUTPUT_DOUBLE_INT): Remove. - -Tue Apr 6 22:09:40 1999 Richard Henderson - - * expr.c (expand_builtin_setjmp): Put setjmp return label on - nonlocal_goto_handler_labels for flow. - -Tue Apr 6 22:05:21 1999 Jan Hubicka - Richard Henderson - - * flow.c (verify_flow_info): New function. - (find_basic_blocks): Call it if ENABLE_CHECKING. - (merge_blocks): Don't merge if there are non-deletable labels. - * toplev.c (fatal_insn): Allow a printf-style arg list. - * toplev.h (fatal_insn): Update prototype. - -Tue Apr 6 16:18:58 1999 Jan Hubicka - - * flow.c (split_edge) update correctly flow graph, disable - EDGE_CRITICAL flag on the split edge, update NUSES for new label. - -Tue Apr 6 15:47:51 1999 Richard Henderson - - * emit-rtl.c (gen_rtx_CONST_DOUBLE): Use XWINT not XINT. - Clear third and following slots, if they exist. - -Tue Apr 6 15:45:28 1999 Richard Henderson - - * flow.c (create_basic_block): Make sure the bb note is in the block. - (can_delete_note_p): Rename from delete_note_p. - (delete_insn_chain): Preserve undeleteable labels too. - (tidy_fallthru_edge): Use next_real_insn instead of confusing - inline code. - -1999-04-06 Zack Weinberg - - * cppexp.c (parse_charconst): Initialize c. - (cpp_parse_expr): Initialize rprio. - * cppfiles.c (merge_include_chains): Initialize prev. - (finclude): Set fp->line_base to fp->buf before returning. - * cpphash.c (macroexpand): Initialize token. - * cppspec.c (lang_specific_driver): Change suff to - const char *const *. - -1999-04-06 Zack Weinberg - - * cppinit.c (install_predefs): Delete function. - (cpp_start_read): Don't call install_predefs. - (cpp_handle_option): Remove case 'u' and all refs to - opts->inhibit_predefs. - (print_help): Don't mention -undef. - (initialize_builtins): Define __HAVE_BUILTIN_SETJMP__, to - match cccp. - * cpplib.h (struct cpp_options): Remove inhibit_predefs - member. - - * cccp.c (predefs): Delete variable. - (main): Remove case 'u' in argument parse loop, - 'inhibit_predefs' variable, and the code block that would - process CPP_PREDEFINES. - (initialize_builtins): Don't define __OBJC__, the driver will - do that. - - * gcc.c (default_compilers): Remove -undef from all specs that - invoke a C preprocessor. - * ch/lang-specs.h: Likewise. - * cp/lang-specs.h: Likewise. - * f/lang-specs.h: Likewise. - * objc/lang-specs.h: Likewise. - -Mon Apr 5 11:55:31 1999 Donn Terry (donn@interix.com) - - * Makefile.in (SUBDIR_FLAGS_TO_PASS): Fix misapplied patch. - -Mon Apr 5 11:51:38 1999 Jeffrey A Law (law@cygnus.com) - - * m68k.md (movdf): Hide GPR sources & destinations from regclass. - -Mon Apr 5 09:54:42 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Apr 5 05:55:15 1999 Bruce Korb - - * fixincl.tpl: Separate "-e" from its argument, a la - the Sat Apr 3 17:05:13 1999 fix. - * genfixes: Ensure that the server shell is _NOT_ csh. - -Mon Apr 5 03:52:30 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Apr 5 04:47:14 1999 Jeffrey A Law (law@cygnus.com) - - * i386.c (x86_double_with_add): Turn off for Pentium and PPro. - (small_shift_operand, output_ashlsi3): New functions. - * i386.h (small_shift_operand, output_ashlsi3): Declare. - * i386.md (ashlsi3): Simplify ahlsi3 patterns. Remove splitters - that are no longer needed. - -Sun Apr 4 04:05:04 1999 Jeffrey A Law (law@cygnus.com) - - * stmt.c (expand_loop_end): When copying the loop exit test, - do not walk into a nested loop. - -Sun Apr 4 00:14:54 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/hackshell.tpl: Skip links to directories, to avoid - removing them. - * fixinc/inclhack.tpl: Likewise. - * fixinc/fixinc.sh, fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt. - -Sat Apr 3 23:46:13 1999 David Edelsohn - - * rs6000.md (addsi3, iorsi3, xorsi3, adddi3, iordi3, xordi3, - movsi_got, movsi, movsf): Use no_new_pseudos. - * rs6000.c (rs6000_got_register): Likewise. - (offsettable_mem_opereand): Use || not |. - -Sat Apr 3 22:02:56 1999 Jeffrey A Law (law@cygnus.com) - - * acconfig.h (ENABLE_CHECKING): Remove redundant #undef. - * config.in: Rebuilt. - -Sat Apr 3 16:22:59 1999 Toshiyasu Morita (tm@netcom.com) - - * gcc.texi: Add info on regmove pass. - - * regmove.c (fixup_match_1): Consistently evaluate - HAVE_POST_INCREMENT and HAVE_POST_DECREMENT. - -Sat Apr 3 19:21:05 1999 Alexandre Oliva - - * configure.in (DEFAULT_LINKER, DEFAULT_ASSEMBLER): Use grep - instead of test and sed to check whether they're GNU programs. - * configure: Rebuilt. - -Sat Apr 3 17:57:35 1999 Alexandre Oliva - - * Makefile.in (install-headers-tar, install-headers-cpio): Avoid - problems with CDPATH. - Reported by Ralf Canis - -Sat Apr 3 13:50:16 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc.x86-linux-gnu: Deleted. - -Sat Apr 3 17:05:13 1999 Alexandre Oliva - - * inclhack.tpl: Insert spaces between `sed -e' and '...'. - Reported by Kaveh R. Ghazi - * fixinc/fixincl.sh, fixinc/fixincl.x, fixinc/inclhack.sh: Regen. - -Sat Apr 3 14:54:46 1999 Craig Burley - - * tree.def (BLOCK): Fix typo in comment. - -Sat Apr 3 00:53:29 1999 John Wehle (john@feith.com) - - * i386.md (floatsisf2, floatdisf2, floatsidf2, floatdidf2, - floatsixf2, floatdixf2): Rewrite using a splitter. - -Fri Apr 2 17:36:10 1999 Nick Clifton - - * config/arm/arm.c (arm_print_operand): Print large constants in - hex rather than decimal. - -Fri Apr 2 17:23:58 1999 Nick Clifton - - * print-rtl.c (print_rtx): Use both HOST_WIDE_INT_PRINT_DEC - and HOST_WIDE_INT_PRINT_HEX to display constants. - -1999-04-02 Zack Weinberg - - * config/i386/i386.h: Document all TARGET_SWITCHES or add - explicit null initializer. - - * config/i386/cygwin.h: Document all SUBTARGET_SWITCHES. - * config/i386/dgux.h: Likewise. - * config/i386/osf1elf.h: Likewise. - * config/i386/win32.h: Likewise. - * config/i386/osfrose.h: Likewise. Drop obsolete -mno-ident option. - -Fri Apr 2 17:49:44 1999 Toshiyasu Morita - - * regmove.c (fixup_match_1): Remove now useless if (0). - -Sat Apr 3 11:37:20 1999 Michael Hayes - - * tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT, - USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document. - (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT, - USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation. - - * rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT, - USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT, - USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT, - USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default - definition. - - * expr.c (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT, - USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default - definition. - -Fri Apr 2 16:03:05 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc.dgux, fixinc.interix, fixinc.irix, fixinc.ptx: Deleted. - * fixinc.sco, fixinc.svr4, fixinc.winnt, fixinc.wrap: Likewise. - -Fri Apr 2 15:46:25 1999 Donn Terry (donn@interix.com) - - * configure.in: Set and substitute quoted_cc_set_by_configure. - * configure: Rebuilt. - * Makefile.in (SUBDIR_FLAGS_TO_PASS): Fix quoting problem with ``. - -Fri Apr 2 14:35:45 1999 Stan Cox - - * config/i386/cygwin.h (CPP_SPEC): Use mingw_include_path instead - of a hardcoded path for -mno-cygwin. - (mingw_include_path): New. - -1999-04-02 Joseph S. Myers - - * pdp11.c: Include "recog.h". - (output_function_prologue): Remove unused variables `nregs', `i', - `offset'. - (output_function_epilogue): Remove unused variables - `may_call_alloca', `nregs', `regno', `adjust_fp'. - (output_ascii): Mark as returning void. - (print_operand_address: Likewise. - (simple_memory_operand): Remove unused variables `plus0', `plus1', - `offset'. - * pdp11.h: Declare functions `arith_operand', - `const_immediate_operand', `expand_shift_operand', - `legitimate_address_p', `notice_update_cc_on_set', `output_ascii', - `output_function_epilogue', `output_function_prologue', - `print_operand_address', `register_move_cost', - `simple_memory_operand'. - (HARD_REGNO_MODE_OK): Parenthesize `REGNO' arg. - (REGNO_REG_CLASS): Likewise. - * pdp11.md: Add explicit `int' to `static count' (in two places). - (addhi3): Add explicit braces to avoid ambiguous else. - (addqi3): Likewise. - (ashlhi3): Likewise. - -Fri Apr 2 14:17:10 1999 Jerry James - - * gcc/invoke.texi: Add documentation for additional supported - MIPS CPU types, options -mips16 and -mentry, and ABI and ISA - defaults. - -Fri Apr 2 14:12:06 1999 John Wehle (john@feith.com) - - * i386.md: Delete floating point compare, add, subtract, - multiply, and divide patterns which allowed integer - operands. - * i386.c (output_387_binary_op): Delete unused code. - (output_float_compare): Likewise. - -Fri Apr 2 11:53:37 1999 John Wehle (john@feith.com) - - * i386.md (movsf+1, movdf+1, movxf+1): Update constraints - so that SECONDARY_MEMORY_RELOAD is used. Remove dead code. - -1999-04-02 Bruce Korb - - * fixinc/mkfixinc.sh: Added support for x86-interix. - * fixinc/fixinc.interix: Fixincludes script, slight changes - from ./fixinc.interix. Untested (needs interix box). - * fixinc/inclhack.def: - Complete the change to the 'fixinc.tmp' file. - Fixed regex for finding C++ headers. - * fixincl.x, fixincl.sh, inclhack.sh: Regenerate. - -Fri Apr 2 11:36:12 1999 Jan Hubicka (hubicka@paru.cas.cz) - - * i386.c (print_operand_address, case REG): Do not use ESI addressing - mode for the K6. - - * i386.c (print_operand_address, case MULT): Use more efficient - encoding (mult (reg) (const_int 2)). - -Thu Apr 1 17:01:50 1999 Richard Henderson - - Move over patch from Bernd Schmidt from GC branch: - * emit-rtl.c (gen_rtx_CONST_DOUBLE): New function. - (gen_rtx): Call it. Tidy cases. - * rtl.h (gen_rtx_CONST_DOUBLE): Prototype it. - * gengenrtl.c: Add commentary. - (special_rtx): Also match CONST_DOUBLE. - (gencode): Emit call to memset instead of bzero. - -Fri Apr 2 12:58:26 1999 Michael Hayes - - * config/c4x/c4x.md (ashlhi3, lshrhi3, ashrhi3): Force operand 1 - into a register if shift count not constant. - (ashlhi3_reg, lshrhi3_reg, ashrhi3_reg): Ensure that operand 1 - is a register. - -Fri Apr 2 12:19:17 1999 Michael Hayes - - * config/c4x/c4x.md (*db): Enable pattern if TARGET_LOOP_UNSIGNED - is nonzero. - (movstrqi_small, movstrqi_large, *cmpstrqi): Add + modifier to address - register constraints. - (*movhi_clobber+1): Modify splitter pattern to handle destination - register that is used in the source address. - (*xorhi3_clobber): Replace AND with XOR in call to legitimize_operands. - -Fri Apr 2 12:16:15 1999 Michael Hayes - - * config/c4x/c4x.h: Added more comments. - -Fri Apr 2 11:58:22 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_emit_move_sequence): Force invalid QImode - constants into memory if we get called directly from gen_move_insn - rather than emit_move_insn. - (c4x_legitimize_address): Fix up LABEL_REF addresses. - -Thu Apr 1 12:04:05 1999 Jim Wilson - - * expr.c (store_field): When check direct_store, assume all complex - modes can be directly stored. - -1999-04-01 Bruce Korb - - * fixinc/genfixes: New shell script that runs autogen - to create the generated files. - -1999-04-01 Manfred Hollstein - - * Makefile.in (cppmain$(exeext)): Depend on intl.o. Link in intl.o. - -Thu Apr 1 03:48:34 1999 H.J. Lu (hjl@gnu.org) - - * i386.c (output_fp_conditional_move): Abort for LT, LE, GE, and GT - signed integer comparisons. - - * i386.c (output_int_conditional_move): Use "enum rtx_code" for code - type. - - * i386.c (notice_update_cc): No need to check the INT mode for - conditional moves since FLOAT conditional moves don't affect cc0. - -Thu Apr 1 02:17:18 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/inclhack.def (zzz_ki_syscalls, zzz_time): Fix trigger - string to only match on hpux11. - * fixinc/fixincl.x, fixinc/inclhack.sh, fixinc/fixinc.sh: Rebuilt. - -Thu Apr 1 01:09:27 1999 Alexandre Oliva - - * fixinc/hackshell.tpl: Complete transition to fixinc.tmp. - * fixinc/inclhack.sh: Rebuilt. - - * fixinc/inclhack.def: Fix typos in c_asm.h fix. - * fixinc/fixincl.x, fixinc/inclhack.sh, fixinc/fixinc.sh: Rebuilt. - -Wed Mar 31 17:20:11 1999 Jeffrey A Law (law@cygnus.com) - - * toplev.c (rest_of_compilation): Allow dbr_schedule to write to - the dump file too. - -Wed Mar 31 12:32:43 1999 Richard Henderson - - * flow.c (find_basic_blocks): New argument `do_cleanup'. - Conditionally call delete_unreachable_blocks. - (free_basic_block_vars): Zero ENTRY/EXIT data. - (allocate_for_life_analysis): Kill. Split into... - (allocate_bb_life_data, allocate_reg_life_data): ... new functions. - (life_analysis_1): Update. - * gcse.c (gcse_main): Update find_basic_blocks call. - * toplev.c (rest_of_compilation): Likewise. - * stupid.c (stupid_life_analysis): Update life data calls. - * rtl.h, output.h: Update prototypes. - -Wed Mar 31 12:10:00 1999 Bruce Korb - - * inclhack.def (several): Added spaces in tests to ensure - correct shell syntax. Added c_asm.h fix from fixincludes. - Also corrected the corrected fix to C++ comments :-} - - * inclhack.tpl: Changed method of traversing symlink trees - so that file name matching will work correctly. - - * fixincl.c, hackshell.tpl: Fallout from above. - * fixincl.x, inclhack.sh, fixincl.sh: Rebuilt. - -Tue Mar 30 10:43:49 1999 Philip Blundell - - * config/arm/aout.h (DBX_DEBUGGING_INFO): Avoid redefinition if - dbxelf.h was previously included. - (CPP_APCS_PC_DEFAULT_SPEC): No need to undefine. - - * config/arm/linux-elf.h (FP_DEFAULT): Correctly override the - definition from arm.h. - -Wed Mar 31 10:33:37 1999 Kaveh R. Ghazi - - * Makefile.in (c-gperf.h): Generate using gperf language 'C', not - 'KR-C', so gperf uses the `const' keyword on strings. - - * c-parse.gperf (resword): Const-ify a char*. - -Wed Mar 31 01:49:31 1999 Ian Lance Taylor - - * t-rtems (LIMITS_H_TEST, LIBGCC2_INCLUDES): Define. - -Wed Mar 31 00:50:48 1999 Jeffrey A Law (law@cygnus.com) - - * system.h (STDERR_FILENO): Fix typo. - - * inclhack.def (bool): Also fix bogus bool in curses_colr/curses.h. - * fixincl.x, inclhack.sh, fixincl.sh: Rebuilt. - -Tue Mar 30 20:51:40 1999 Mark Mitchell - - * alias.c (alias_set_compare): Remove. - (record_alias_subset): Use splay_tree_compare_ints instead of - alias_set_compare. - (init_alias_once): Likewise. - * cse.c: Include splay-tree.h. - (reg_qty): Remove. - (reg_tick): Likewise. - (reg_table): Likewise. - (cse_reg_info): New structure. - (cse_reg_info_free_list): New variable. - (cse_reg_info_tree): Likewise. - (cached_regno): Likewise. - (cached_cse_reg_info): Likewise. - (all_minus_one): Remove. - (consec_ints): Likewise. - (GET_CSE_REG_INFO): New macro. - (REG_TICK): Likewise. Use throughout instead of reg_tick. - (REG_IN_TABLE): Likewise. Use throughout instead of reg_in_table. - (REG_QTY): Likewise. Use throughout instead of reg_qty. - (get_cse_reg_info): New function. - (free_cse_reg_info): Likewise. - (new_basic_block): Reinitialize cse_reg_info_tree instead of - reg_tick, all_minus_one, and consec_ints. - * Makefile.in (cse.o): Depend on splay-tree.h - -Tue Mar 30 13:19:36 1999 Jason Merrill - - * libgcc2.c (throw_helper): Just return the SP offset, rather than - a whole udata. Include args_size in the offset. - (__throw, __rethrow): Adjust. - -Tue Mar 30 11:39:27 1999 Craig Burley - - * extend.texi (Extended Asm): Delete spurious `b' before - `@end example', which was confusing texi2html. - -Tue Mar 30 00:26:34 1999 Jason Merrill - - * dwarf2out.c (output_line_info): Don't emit redundant info. - Do start a new row if the file changes and the line # doesn't. - -Mon Mar 29 15:48:39 1999 Jason Merrill - - * invoke.texi (Invoking G++, C++ Dialect Options): Update. - -Mon Mar 29 15:05:39 1999 Richard Henderson - - * except.c (start_dynamic_handler): Force jmp_buf address to - and operand before moving to memory. - -Mon Mar 29 15:11:10 1999 Craig Burley - - * invoke.texi (Code Gen Options): Attempt to clarify - -fcheck-memory-usage. Minor edits to -fprefix-function-name. - -Mon Mar 29 20:52:47 1999 J"orn Rennecke - - * loop.c (maybe_eliminate_biv): For libcalls that set a giv, skip to - end of libcall. - -Mon Mar 29 20:35:49 1999 J"orn Rennecke - - * sh.md (mulsi3): Tag an extra REG_EQUAL note to the middle insn. - -Mon Mar 29 11:50:34 1999 Jerry Quinn - - * pa.h (HAVE_PRE_INCREMENT): Disable when optimizing for a PA8000 - class machine. - (HAVE_PRE_DECREMENT, HAVE_POST_INCREMENT): Likewise. - (HAVE_POST_DECREMENT): Likewise. - -Mon Mar 29 08:24:43 1999 Bruce Korb - - * fixinc/mkfixinc.sh: Fix portability problems with old shells. - - * fixinc/README: Updated for release announcement - -Sun Mar 28 20:26:55 1999 Kaveh R. Ghazi - - * recog.h (insn_outfun, insn_operand_predicate): Add prototype - arguments. - - * rtl.h (note_stores): Likewise. - - * rtlanal.c (note_stores): Likewise. - -Sun Mar 28 15:34:28 1999 Richard Henderson - - * varasm.c (output_constant_pool): Always mark the constant pool. - -Sun Mar 28 16:09:01 1999 Jerry Quinn - - * pa.md (pa7100LCshiftmem, pa7100LCalu): Change simultaneity. Use - shift/mem ops in pa7100LCalu. - - * pa.c (pa_adjust_cost): Don't do cost adjustments on pa8000. - (pa_reorg): Don't call pa_combine_instructions on pa8000. - -Sun Mar 28 15:27:26 1999 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload): Remove accidental code duplication. - -Sun Mar 28 12:22:12 1999 Robert Lipe (robertlipe@usa.net) - - * i386/sysv5.h: New file to describe UnixWare7/SVR5. - * configure.in (i?86-UnixWare7*-sysv): Use it. - * i386/udk.h: Use sysv5.h. Now uses Dwarf-2. - -Sun Mar 28 01:15:04 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Mar 28 00:44:27 1999 Jeffrey A Law (law@cygnus.com) - - * sdbout.c (sdbout_symbol): Do not call build_pointer_type, build - one on the fly and do not cache the result. - - * gcc.cps, cpp.cps: Delete unwanted files. - -Sat Mar 27 23:37:40 1999 John Wehle (john@feith.com) - - * i386.md (movdicc+3, movdicc+4): Rewrite using split_di. - * i386.c (output_int_conditional_move): Delete unused code. - -Sat Mar 27 21:17:36 1999 David Edelsohn - - * rs6000/{aix41.h,aix43.h} (ASM_CPU_SPEC): Add 604e. - -Sat Mar 27 16:13:50 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (mark_used_regs): Improve handling of ASMs. - -1999-03-26 Zack Weinberg - - * Makefile.in (xcpp, cppspec.o): New targets. - (CPP_INSTALL_NAME): New macro. - (install-cpp): Install xcpp. Use CPP_INSTALL_NAME. - (all.build, start.encap): Build xcpp. - - * cppspec.c: New file, implements argument filtering for a - user-visible C preprocessor. - * cpp.sh: Removed. - -Fri Mar 26 20:41:46 1999 Jim Wilson - - * Makefile.in (stmp-fixinc): Use tooldir instead of gcc_tooldir. - -Fri Mar 26 16:02:37 1999 Nick Clifton - - * configure.in (arm-*-vxworks*): Just include arm/vxarm.h. - * configure: Regenerate. - * config/arm/vxarm.h: Define SUBTARGET_CPU_DEFAULT before - including arm/coff.h - -1999-02-16 Scott Bambrough - - * configure.in (arm*-*-linux-gnu*): Set thread_file to 'posix' if - --enable-threads[={yes,pthreads,posix}] is passed as a command - line parameter to configure. - - * configure: Regenerate. - - * gcc/config/arm/t-linux (TARGET_LIBGCC2_CFLAGS): Include -fPIC. - -Fri Mar 26 19:42:19 1999 J"orn Rennecke - - * loop.c (combine_givs): Fix index into can_combine when doing - benefit adjustment for remaining givs when having combined a giv. - -Fri Mar 26 11:38:01 1999 Nick Clifton - - * config/arm/t-arm-elf (EXTRA_MULTILIB_PARTS): Define. - -Fri Mar 26 10:48:27 1999 Nick Clifton - - * config/arm/linux-elf.h: Include dbxelf.h - -Fri Mar 26 10:43:47 1999 Nick Clifton - - * config/svr4.h: Include new header file dbxelf.h. - (DBX_DEBUGGING_INFO): Remove definition. - (DBX_USE_BINCL): Remove definition. - (DBX_BLOCKS_FUNCTION_RELATIVE): Remove definition. - (ASM_IDENTIFY_GCC): Remove definition. - (ASM_IDENTIFY_GCC_AFTER_SOURCE): Remove definition. - (ASM_OUTPUT_SOURCE_LINE): Remove definition. - (DBX_FUNCTION_FIRST): Remove definition. - (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Remove definition. - - * config/elfos.h: Include new header file dbxelf.h. - (DBX_DEBUGGING_INFO): Remove definition. - (DBX_BLOCKS_FUNCTION_RELATIVE): Remove definition. - (ASM_IDENTIFY_GCC): Remove definition. - (ASM_IDENTIFY_GCC_AFTER_SOURCE): Remove definition. - (ASM_OUTPUT_SOURCE_LINE): Remove definition. - (DBX_FUNCTION_FIRST): Remove definition. - - * config/dbxelf.h: New header file. - (DBX_DEBUGGING_INFO): Define. - (DBX_BLOCKS_FUNCTION_RELATIVE): Define. - (DBX_FUNCTION_FIRST): Define. - (DBX_USE_BINCL): Define. - (DBX_CONTIN_LENGTH): Define. - (ASM_IDENTIFY_GCC): Define. - (ASM_IDENTIFY_GCC_AFTER_SOURCE): Define. - (ASM_OUTPUT_SOURCE_LINE): Define. - (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Define. - -Fri Mar 26 01:59:15 1999 "Charles M. Hannum" - - * fold-const.c (fold_truthop): Optimize bitfield references with - different masks as long as their size and bit position are the same. - - * fold-const.c (fold_truthop): Build a type for both the lhs and - rhs and use it appropriately. - - * fold-const.c (fold_truthop): Mask the lhs and rhs after merging - adjacent bitfield references. - - * fold-const.c (fold_truthop): Verify that the lhs and rhs are - in the same bit position when optimizing bitfield references - which have the same mask. - -Thu Mar 25 22:53:27 1999 Martin von Löwis - - * gcc.texi (Copy Assignment): New node. - -1999-03-25 Zack Weinberg - - * gcc.c: Compile unconditionally all code formerly dependent - on #ifdef LANG_SPECIFIC_DRIVER. - * gccspec.c: New file with stub lang_specific_driver, - lang_specific_pre_link. - * Makefile.in: Link gccspec.o into xgcc. Add rule to compile - -Thu Mar 25 21:08:02 1999 Jason Merrill - - * gcc.texi (Temporaries): Update. - -Thu Mar 25 16:53:53 1999 Richard Henderson - - * combine.c (distribute_notes): Place REG_LABEL also where - REG_EQUAL indicates. - -Thu Mar 25 12:46:37 1999 Jim Wilson - - * a29k/a29k.h (TARGET_SWITCHES): Add doc strings. - * i960/i960.h (TARGET_SWITCHES): Add doc strings. - * invoke.texi (a29k): Add documentation for -mno-multm option. - -Thu Mar 25 14:04:54 1999 Andrew MacLeod - - * rtl.texi (RTX_FRAME_RELATED_P): Add documentation. - * rtl.h (struct rtx_def): Update comment for frame_related field. - (set_unique_reg_note): Declare prototype. - * dwarf2out.c (dwarf2out_frame_debug_expr): Split out from - 'dwarf2out_frame_debug' to handle only expressions, and process - component parts of a PARALLEL expression. - (dwarf2out_frame_debug): Process insns only, and call - new function 'dwarf2out_frame_debug_expr' for patterns. - * emit-rtl.c (set_unique_reg_note): New function to add a reg note, - but if there is an existing one, delete it first. - * expmed.c (expand_mult, expand_divmod): Use set_unique_reg_note. - * optabs.c (add_equal_note, expand_binop): Use set_unique_reg_note. - (emit_no_conflict_block, emit_libcall_block): Use set_unique_reg_note. - (expand_fix): Use set_unique_reg_note. - -Thu Mar 25 11:47:49 1999 Art Haas - - * tlink.c (symbol_hash_newfunc): Remove redundant call to - hash_newfunc. - (file_hash_newfunc, demangled_hash_newfunc): Likewise. - -Thu Mar 25 10:05:56 1999 Richard Henderson - - * i386.h (PREFERRED_STACK_BOUNDARY): Set to 128. - -1999-03-25 Philip Blundell - - Based on patch from Jim Studt : - * config/arm/linux-elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Copy - definitions from config/linux.h. - (DBX_BLOCKS_FUNCTION_RELATIVE): Define to 1. - -Thu Mar 25 02:12:42 1999 Finn Hakansson - - * loop.c (strength_reduce): Correct a comment. - - * rtl.h (MEM_COPY_ATTRIBUTES): Remove unnecessary ending backslash. - -Thu Mar 25 02:02:13 1999 Axel Thimm - - * Makefile.in (RANLIB_TEST): Improve test. - -Thu Mar 25 01:15:33 1999 Donn Terry - - * combine.c (force_to_mode, case PLUS): Use sign extended mask - when masking the low bits out of a constant. - -Tue Mar 23 15:45:25 1999 Richard Earnshaw (rearnsha@arm.com) - Jeff Law - - * fold-const.c (make_range): If orig_type is unset, set it as soon - as we know the type. Remove now unnecessary set of orig_type for - conversions. - -Wed Mar 24 23:27:25 1999 Mark Elbrecht - Jeff Law - - * system.h (STDIN_FILENO): Provide default definition if one is not - provided by the system header files. - (STDOUT_FILENO, STDERR_FILENO): Likewise. - - * i386/xm-djgpp.h (COLLECT2_HOST_INITIALIZATION): New macro. - * collect2.c (main): Use it. - (pexecute_pid): New variable. Holds return value from call to pexecute. - (collect2_execute): Rework to use pexecute instead of fork. - (collect2_wait): Use pwait() instead of wait(). - - * i386/djgpp.h: Fix typo. - -Wed Mar 24 23:24:30 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/mkfixinc.sh: Recognize cygwin* instead of only - cygwin32. - -Wed Mar 24 15:44:12 1999 Nick Clifton - - * config/m32r/m32r.c (init_idents): Accept both NAME and __NAME__ - versions of attribute names and values. - (m32r_valid_machine_decl_attribute): Likewise. - (m32r_encode_section_info): Likewise. - -Wed Mar 24 21:42:15 1999 J"orn Rennecke - - * reload1.c (choose_reload_regs): If output-reloading for a - simple move insn, try to inherit an equivalence for the input. - -1999-02-24 Mike Stump - - * arm/aout.h (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Fix quoting. - -1999-03-24 Jim Blandy - - * libgcc2.c (__CTOR_LIST__, __DTOR_LIST__): Initialize on all - platforms. - -Wed Mar 24 01:35:01 1999 Geoff Keating - - * fold-const.c (fold): Recognize a rotate by an unsigned amount. - -Tue Mar 23 23:32:14 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (rotlsi3): New expander. Synthesize a variable rotate - left using a variable rotate right. Provide anonymous pattern for - rotate left by a constant value. - - * expr.c (expand_assignment): Do not try to optimize an aggregate - address which has VOIDmode. - -Tue Mar 23 22:51:48 1999 Mumit Khan - Donn Terry - - * protoize.c (abspath): Preserve multiple leading slashes for - _WIN32 and Interix. - -1999-01-23 Mike Stump - - * arm/vxarm.h: Split out vxWorks support into separate headerfile - and vxify. - * arm/arm.c (cpu_defaults): Allow arm710 as default. - - * configure.in: Split out vxWorks support for Arm. - * configure: Rebuilt. - -Tue Mar 23 11:20:03 1999 Per Bothner - - * tree.c (first_rtl_op, has_cleanups): Handle GOTO_SUBROUTINE_EXPR. - -Tue Mar 23 09:00:39 1999 Nick Clifton - - * config/arm/riscix1.h (SUBTARGET_SWITCHES): Add doc string. - * config/arm/riscix1-1.h (SUBTARGET_SWITCHES): Add doc string. - -Tue Mar 23 07:50:20 1999 Mark Mitchell - - * function.c: Include hash.h. - (insns_for_mem_entry): New struct. - (put_reg_into_stack): Take an optional hash-table mapping MEMs to - the INSNs that use them. - (fixup_var_refs): Likewise. - (put_addressof_into_stack): Likewise. - (purge_addressof_1): Likewise. Keep the hash-table up to date if - we add new instructions. - (fixup_var_refs_insns): Use it to avoid searching the entire - instruction chain. - (insns_for_mem_newfunc): New function. - (insns_for_mem_comp): Likewise. - (insns_for_mem_walk): Likewise. - (compute_insns_for_mem): Likewise. - (pop_function_context_from): Pass NULL for the hash-table. - (put_var_into_stack): Likewise. - (gen_mem_addressof): Likewise. - (flush_addressof): Likewise. - (purge_addressof): Call compute_insns_for_mem to pre-compute the - hash table. - * Makefile.in (OBJS): Include hash.o. - (function.o): Depend on hash.h. - -Tue Mar 23 00:39:14 1999 Jeffrey A Law (law@cygnus.com) - - * i386/openbsd.h (TARGET_DEFAULT): Use symbolic names instead of - numbers. - * i386/netbsd.h, i386/freebsd.h: Likewise. - - * crtstuff.c: Use ANSI function definitions. Fix minor whitespace - problems. - - * i386/openbsd.h (TARGET_DEFAULT): Define. - * configure.in: Do not set TARGET_CPU_DEFAULT for x86 OpenBSD - configurations. - * configure: Rebuilt. - -Tue Mar 23 00:39:10 1999 John Wehle (john@feith.com) - - * i386/freebsd.h (TARGET_DEFAULT): Define instead - of TARGET_CPU_DEFAULT. - * i386/netbsd.h (TARGET_DEFAULT): Likewise. - -Mon Mar 22 23:52:01 1999 Mumit Khan - Donn Terry - - * sdbout.c (syms.h): Don't include on Interix. - * toplev.c (main): No sbrk on Interix. - - * configure.in: Add i386-pc-interix support. - * configure: Regenerate. - * fixinc.interix: New file. - * config/interix.h: New file. - * config/x-interix: New file. - * config/xm-interix.h: New file. - * i386/interix.h: New file. - * i386/interix.c: New file. - * i386/t-interix: New file. - -Mon Mar 22 23:41:49 1999 Jeffrey A Law (law@cygnus.com) - - * i386.h (PREFERRED_STACK_BOUNDARY): Define. - -Mon Mar 22 23:41:31 1999 John Wehle (john@feith.com) - - * i386.c (ix86_compute_frame_size): New function. - (ix86_prologue, ix86_epilogue): Use it. - * i386.h (INITIAL_ELIMINATION_OFFSET): Likewise. - * reload1.c: Provide default for PREFERRED_STACK_BOUNDARY. - -Mon Mar 22 18:06:59 1999 Jim Wilson - - * mips/mips.h (TARGET_SWITCHES, TARGET_OPTIONS): Add option doc - strings. - * mips/abi64.h (SUBTARGET_TARGET_OPTIONS): Likewise. - -Mon Mar 22 16:18:27 1999 Nick Clifton - - * config/arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Do not bother - passing ATTRIBUTES to arm_valid_machine_decl_attribute. - - * config/arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Do not bother - passing ATTRIBUTES to arm_valid_machine_decl_attribute. - - * config/arm/arm.h (DEFAULT_RTX_COSTS): Do not bother passing - OUTER_CODE to arm_rtx_costs - it is not used. - (arm_compare_fp): Delete declaration. - (FINAL_PRESCAN_INSN): Do not bother passing OPVEC or NOPERANDS to - arm_final_prescan_insn - they are not used. - (const_ok_for_op): Remove prototype. - (arm_rtx_costs): Fix prototype. - (arm_valid_machine_decl_attribute): Fix prototype. - (final_prescan_insn): Fix prototype. - - * config/arm/arm.md: Remove references to arm_compare_fp. - - * config/arm/arm.c (arm_compare_fp): Delete. - (const_ok_for_op): Make function static. Add prototype. Remove - mode parameter - it is unused. - (arm_rtx_costs): Remove outer_code parameter. - (reload_memory_operand): Declare mode parameter unused. - (power_of_two_operand): Declare mode parameter unused. - (equality_operator): Declare mode parameter unused. - (load_multiple_operation): Declare mode parameter unused. - (store_multiple_operation): Declare mode parameter unused. - (multi_register_push): Declare mode parameter unused. - (arm_valid_machine_decl_attribute): Remove attributes parameter - - it is unused. - (select_dominance_cc_mode): Remove op parameter - it is unused. - (gen_compare_reg): Remove fp parameter - it is unused. - (final_prescan_insn): Remove opvec and noperands parameters - they - are unused. - -Mon Mar 22 14:35:28 1999 Nick Clifton - - * tm.texi (MD_SCHED_INIT): Add missing closing parenthesis. - -Mon Mar 22 22:24:30 1999 J"orn Rennecke - - * reload1.c (reload_as_needed): Set reload_is_output_reload / - reload_has_output_reload for auto_inc expressions that could be - reloaded. Call forget_old_reloads for REG_INC notes. - -Mon Mar 22 21:51:57 1999 J"orn Rennecke - - * cse.c (cse_insn): Don't change the result register of a libcall. - -Mon Mar 22 21:08:59 1999 J"orn Rennecke - - * rtl.h (shallow_copy_rtx): Declare. - * rtl.c (shallow_copy_rtx): New function. - * reload.c (find_reloads_toplev): Use shallow_copy_rtx instead of - copy_rtx. - -Mon Mar 22 10:44:33 1999 Vladimir Makarov - - * config/h8300/h8300.md (adjust_length): New attribute. - (modhi3+1, andsi3+1, iorsi3+1, extzv+1, extzv+2): Change insn - default value of attribute "adjust_length" onto "no". - - * config/h8300/h8300.c (h8300_adjust_insn_length): Adjust - length only if the attribute "adjust_length" value is "yes". - Use 0 if the shift is negative. - - * final.c (shorten_branches): Check insn length after its - adjusting. - -Sun Mar 21 17:33:48 1999 Jeffrey A Law (law@cygnus.com) - - * i860.h (TARGET_SWITCHES): Add documentation for default case. - * i860/paragon.h (TARGET_SWITCHES): Add documentation for default case. - * i370.h (TARGET_SWITCHES): Add documentation for default case. - * fx80.h (TARGET_SWITCHES): Add documentation for default case. - * elxsi.h (TARGET_SWITCHES): Add documentation for default case. - * clipper.h (TARGET_SWITCHES): Add documentation for default case. - * 1750a.h (TARGET_SWITCHES): Add documentation for default case. - * pa.h (TARGET_SWITCHES): Add documentation for default case. - (TARGET_OPTIONS): Likewise for default case. - * mn10300.h (TARGET_SWITCHES): Add documentation for default case. - * h8300.h (TARGET_SWITCHES): Add documentation for default case. - - * gcse.c (dump_hash_table): Fix whitespace in declaration. - (compute_transpout): Renamed from pre_compute_transpout. - (compute_pre_*): Deleted. - (pre_expr_reaches_here_p): New argument, CHECK_PRE_COMP. All - callers changed. - (insert_insn_end_bb): Renamed from pre_insert_insn. - (pre_*): Delete unused variables. Only leave local properties and - global redundant/optimal computation points. - (alloc_pre_mem, free_pre_mem): Corresponding changes. - (compute_pre_data): Simplify and call pre_lcm to run the lazy - code motion dataflow analysis. - (pre_insert, pre_insert_copies, pre_delete): Revamp to use LCM - based redundant and optimal computation points. - - * basic-block.h (pre_lcm, pre_rev_lcm): Declare. - - * toplev.c (main): A debug option without a level defaults to - level 2. - -Sun Mar 21 12:13:01 1999 Nick Clifton - - * flow.c (can_delete_label_p): Do not allow user specified - labels to be deleted. - * dwarf2out.c (gen_label_die): Generate addresses for deleted - (programmer specified) labels. - * dwarfout.c (output_label_die): Generate addresses for deleted - (programmer specified) labels. - -1999-03-21 Manfred Hollstein - - * Makefile.in (xgcc$(exeext)): Add intl.o to list of files to be - linked with. - -Sun Mar 21 01:15:03 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Mar 20 22:26:23 1999 Kaveh R. Ghazi - - * sparc.h (TARGET_SWITCHES): Add null description to default case. - -Sat Mar 20 21:46:06 1999 Kaveh R. Ghazi - - * c-lex.c (yylex): Remove unused variable `bytes'. - - * flow.c (print_rtl_with_bb): Cast the return value of alloca. - - * function.c (assign_parms): Wrap variable `varargs_setup' in - macro SETUP_INCOMING_VARARGS. - (thread_prologue_and_epilogue_insns): Mark parameter `f' with - ATTRIBUTE_UNUSED. - - * local-alloc.c (no_equiv): Likewise for parameter `store'. - - * sched.c (schedule_insns): Remove unused variables `insn' and `next'. - - * tlink.c (symbol_hash_newfunc, symbol_hash_lookup, - file_hash_newfunc, file_hash_lookup, demangled_hash_newfunc, - demangled_hash_lookup, symbol_push, symbol_pop, file_push, - file_pop, tlink_init, tlink_execute, frob_extension, - obstack_fgets, tfgets, pfgets, freadsym, read_repo_file, - maybe_tweak, recompile_files, read_repo_files, - demangle_new_symbols, scan_linker_output): Add static prototype. - - (symbol_hash_newfunc, file_hash_newfunc, demangled_hash_newfunc): - Make the third argument a `hash_table_key'. - - * toplev.c (debug_start_source_file): Mark parameter `filename' - with ATTRIBUTE_UNUSED. - -Sun Mar 21 02:28:21 1999 Andreas Schwab - - * tm.texi (Varargs): Don't split argument of @item across lines. - - * invoke.texi: Fix use of @item vs @itemx. - -Sun Mar 21 09:59:54 1999 Michael Hayes - - * config/c4x/c4x.h (TARGET_SWITCHES): Add null description to - default case. - -Sat Mar 20 23:33:54 1999 Michael Hayes - - * loop.c (check_dbra_loop): Fix debug message. - -Sat Mar 20 15:54:35 1999 Michael Hayes - - * config/c4x/c4x.md (decrement_and_branch_on_count): Emit rptb_end - pattern instead of decrement_and_branch_until_zero pattern. - -Sat Mar 20 11:39:58 1999 Michael Hayes - - * config/c4x/c4x.h (TARGET_SWITCHES): Add documentation. - * config/c4x/c4x.h (TARGET_OPTIONS): Add documentation. - -Fri Mar 19 23:26:29 1999 Martin von Löwis - - * expr.c (expand_expr): Handle ERROR_MARK much earlier. - -Fri Mar 19 15:28:38 1999 Kaveh R. Ghazi - - * cccp.c (create_definition): Cast to U_CHAR* when assigning to one. - - * cppfiles.c (read_and_prescan): Likewise. - Start a #define in column 0. - - * cpplib.c (cpp_define): Cast to U_CHAR* when assigning to one. - (cpp_push_buffer): Likewise for cpp_buffer*. - (do_include): Change the type of `fbeg' and `fend' to unsigned char*. - (do_endif): Cast to char* when assigning to one. - (do_assert): Likewise. - (do_unassert): Likewise. - (cpp_read_check_assertion): Change the type of `name' to U_CHAR*. - Don't do unnecessary cast to char* anymore. - - * genrecog.c (make_insn_sequence): Cast to char** when assigning - to one. Cast the first argument of bzero to PTR. - - * loop.c (strength_reduce): Remove unused variable `note'. - - * reload1.c (new_insn_chain): Cast to struct insn_chain* when - assigning to one. - - * rtl.c (copy_rtx): Use memcpy instead of bcopy. - -Fri Mar 19 11:19:31 1999 Kaveh R. Ghazi - - * calls.c (initialize_argument_information): Mark parameters - `num_actuals' and `n_named_args' with ATTRIBUTE_UNUSED. - - * dbxout.c (dbxout_start_new_source_file): Likewise for parameter - `filename'. - (dbxout_finish): Likewise for parameters `file' and `filename'. - (dbxout_prepare_symbol): Likewise for parameter `decl'. - (dbxout_begin_function): Likewise. - - * explow.c (hard_function_value): Likewise for parameter `func'. - - * function.c (locate_and_pad_parm): Likewise for parameter `fndecl'. - - * expmed.c (expand_divmod): Omit unused argument to `expand_abs'. - * expr.c (expand_expr): Likewise. - * expr.h (expand_abs): Delete unused argument from prototype. - * optabs.c (expand_abs): Remove unused parameter `unsignedp'. - - * sdbout.c (sdbout_init): Mark parameter `syms' with ATTRIBUTE_UNUSED. - (sdbout_end_block): Likewise for parameter `n'. - - * toplev.c (debug_define): Likewise for parameters `lineno' and - `buffer'. - (debug_undef): Likewise. - - * varasm.c (named_section): Likewise for parameter 'reloc'. - (assemble_external): Likewise for parameter `decl'. - (assemble_alias): Likewise for parameter `target'. - -Fri Mar 19 01:54:30 1999 Theodore Papadopoulo - - * toplev.c (read_integral_parameter): Constify. Better control of - error messages. - (main): Use read_integral_parameter to set optimize, id_clash_len, - larger_than_size, and the debugging level. - * toplev.h (read_integral_parameter): Update prototype. - -Fri Mar 19 01:42:05 1999 Zack Weinberg - - * system.h: Use putc_unlocked, fputc_unlocked, and - fputs_unlocked only if putc_unlocked has a prototype already. - Prototype fputs_unlocked if necessary. - * configure.in: Check for prototypes of putc_unlocked and - fputs_unlocked. - * acconfig.h: Updated. - * config.in, configure: Rebuilt. - -Fri Mar 19 02:45:12 1999 Alexandre Oliva - - * Makefile.in (INTL_TARGETS): New macro. - ($(INTL_TARGETS)): Depend on generated sources; drop dependencies - on cp/parse.c and objc/objc-parse.c. - ($(srcdir)/cp/parse.c): Move to cp/Make-lang.in. - * objc/Make-lang.in ($(INTL_TARGETS)): Depend on objc/objc-parse.c. - -Thu Mar 18 22:28:53 1999 Jeffrey A Law (law@cygnus.com) - - * i860.h (TARGET_SWITCHES): Add documentation. - * i860/paragon.h (TARGET_SWITCHES): Add documentation. - * i370.h (TARGET_SWITCHES): Add documentation. - * fx80.h (TARGET_SWITCHES): Add documentation. - * elxsi.h (TARGET_SWITCHES): Add documentation. - * clipper.h (TARGET_SWITCHES): Add documentation. - * 1750a.h (TARGET_SWITCHES): Add documentation. - * pa.h (TARGET_SWITCHES): Add documentation. - (TARGET_OPTIONS): Likewise. - * mn10300.h (TARGET_SWITCHES): Add documentation. - * h8300.h (TARGET_SWITCHES): Add documentation. - -Thu Mar 18 15:58:26 1999 Nick Clifton - - * loop.c (strength_reduce): Do not perform pseudo replacements - if the loop contains volatile memory references. - -Thu Mar 18 19:09:50 1999 J"orn Rennecke - - * reload.c (find_reloads_toplev): When processing X recursively, - don't alter it destructively except by filling in constants. - -Thu Mar 18 10:14:18 1999 Kaveh R. Ghazi - - * cccp.c (default_include): Initialize structure members. - (pass_thru_directive): Change the type of 'keyword_length' to int. - (main): Cast `bindtextdomain' and `textdomain' to (void). - - * collect2.c (main): Likewise. - - * cppmain.c (main): Likewise. - - * gcc.c (main): Likewise. - - * gcov.c (main): Likewise. - - * protoize.c (main): Likewise. - - * toplev.c (main): Likewise. - -1999-03-18 Gavin Romig-Koch - - * config/mips/mips.c (mips_explicit_type_size_string): Correct - its type. - -Thu Mar 18 01:24:25 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in: Use "exit 1", not "exit (1)". - * configure: Rebuilt. - -Wed Mar 17 23:17:42 1999 Mark Kettenis - - * config/t-gnu (SYSTEM_HEADER_DIR): New variable. Set to - `/include' in order to find the system's limits.h. - -Wed Mar 17 23:00:18 1999 Robert Lipe - - * fixinc/fixincl.c: Include auto-host.h instead of config.h. - * fixinc/procopen.c: Likewise. - * fixinc/regex.c: Likewise. - * fixinc/server.c: Likewise. - -Wed Mar 17 22:46:13 1999 Mark Elbrecht - Jeff Law - - * pa.md: Add real PA8000 scheduling information. - - * pa.h (processor_type): Add PROCESSOR_8000 symbol. - (ISSUE_RATE): Revamp, including PA8000 support. - * pa.c (override_options): Add 8000 as -mschedule= option. - Do not call strcmp if pa_cpu_string is null. - * pa.md (attr cpu): Add 8000. - * invoke.texi: Add documentation for PA8000 scheduling. - -Wed Mar 17 18:20:24 1999 David S. Miller - - * config/sparc/sparc.h (TARGET_SWITCHES, TARGET_OPTIONS): - Add descriptions. - * config/sparc/sp64-elf.h (SUBTARGET_SWITCHES): Likewise. - * config/sparc/splet.h (SUBTARGET_SWITCHES): Likewise. - -Wed Mar 17 14:51:19 1999 Richard Henderson - - * flow.c (compute_immediate_dominators): New function. - * basic-block.h (compute_immediate_dominators): Declare it. - - * alpha.h (HARD_REGNO_MODE_OK): Allow only 4 and 8 byte unit modes - in FP regs. - (MODES_TIEABLE_P): Define asymmetricly wrt modes illegal in FP regs. - -Wed Mar 17 14:41:41 1999 Nick Clifton - - * config/arm/aout.h (ASM_GENERATE_INTERNAL_LABEL): Fix compile - time warning. - * config/arm/arm.md: Fix various compile time warnings. - * config/arm/arm.h: Fix various compile time warnings. Add - function prototypes. - * config/arm/arm.c: Fix various compile time warnings. - (arm_override_options): Reorganize to separate tuning from - targetting. - (bit_count): New function: Return a count of the number of bits - set in a word. - -Wed Mar 17 21:29:12 1999 J"orn Rennecke - - * reload1.c (eliminate_regs): Don't keep REG_DEAD notes around for - things that were eliminated. - -Wed Mar 17 12:16:26 1999 Richard Henderson - - * function.c (fixup_var_refs_1): First try moving the expression - directly into a register. Don't separate cc0 setter and user. - -Wed Mar 17 11:20:29 1999 Dave Brolley - - * cppfiles.c (PIPE_BUF): #define PIPE_BUF if not defined already. - -Wed Mar 17 09:25:06 1999 Kaveh R. Ghazi - - * c-lex.c: Don't include setjmp.h. - (parse_float): New static function. - (pf_args): New struct. - (yylex): Use them in call to `do_float_handler'. - -1999-03-16 Andreas Schwab - - * cexp.y (yyerror): Call verror to get a useful error message. - * cexp.c: Rebuilt. - - * .gdbinit: Move command to put breakpoint at abort to end of file - so that gdb does not bail out early. - -Tue Mar 16 15:30:19 1999 Nick Clifton - - * rtl.h: Rename prototype for free_bb_memory to free_bb_mem. - -Tue Mar 16 23:40:09 1999 J"orn Rennecke - - * sh.md (movsi_i): Move t/r alternative after r/rI alternative. - -Tue Mar 16 13:44:50 1999 Jim Wilson - - * mn10200/mn10200.md (addsi3, subsi3, ashlsi3, lshrsi3, ashrsi3): - Delete emit_library_call_value declaration. - -1999-03-16 Zack Weinberg - - * cppfiles.c (read_and_prescan): Map backslash-newline to '\r' - (which cannot otherwise appear in the processed buffer) and - move it out of tokens that it appears in the middle of. - Improve performance. - (find_position): New function. - - * cpplib.c: \r (one character) indicates backslash - newline, not \\\n (two characters). It cannot appear in the - middle of a token. Call CPP_BUMP_LINE (pfile) whenever - parsing moves past \n or \r. Increment pfile->lineno whenever - a \n is placed into token_buffer. Only one mark can exist at - a time, and CPP_BUMP_LINE must not be used while it is - active. It is automatically cleared by cpp_pop_buffer and - parse_goto_mark. \r is not in is_hor_space or is_space. - - (NEWLINE_FIX, NEWLINE_FIX1, adjust_position, - update_position, count_newlines, parse_move_mark): Removed. - (parse_string, copy_comment): New functions. - (parse_name): Returns void. - (parse_set_mark, parse_clear_mark, parse_goto_mark): Take only - one argument, a cpp_reader *. Change for new marking scheme. - (skip_comment): Handle CHILL line comments too. Second - argument is now first character of comment marker; all callers - changed. Issue error for unterminated block comment here. - (cpp_skip_hspace): Recognize CHILL comments. - (copy_rest_of_line): Likewise. Call skip_comment and - parse_string directly, don't go through cpp_get_token. Emit - "/**/" for block comments if -traditional (create_definition - needs this). - (do_define): Don't play with put_out_comments. - (cpp_push_buffer): Initialize ->mark to -1. - (cpp_buf_line_and_col): Just read out the values in the buffer - structure. - (output_line_command): Use cpp_buf_line_and_col. Fix - formatting. Remove stale code. - (cpp_get_token): Break out string parsing code to - parse_string. Use skip_comment for CHILL comments too. Use - copy_comment for put_out_comments instead of dinking with - marks. Remove stale code. Don't call output_line_command - unless it's necessary. - - * cpplib.h (parse_marker): Removed. - (struct cpp_buffer): Line_base is now an unsigned char *; add - `mark' [long], remove `marks' [struct parse_marker *]. - (parse_set_mark, parse_clear_mark, parse_goto_mark): Update - prototypes. - (CPP_BUMP_LINE, CPP_BUMP_BUFFER_LINE): New macros. - * cppinit.c (is_hor_space, is_space): '\r' is not considered - whitespace. - * cppexp.c (cpp_parse_expression): Use cpp_skip_hspace, not - SKIP_WHITE_SPACE. - * cpphash.c (macarg): Disable line commands while expanding. - -Tue Mar 16 11:30:19 1999 Gavin Romig-Koch - - * c-lex.c (yylex) : Remove warning for integer literals being - larger than the largest target int. Add warning for integer - literal being larger than than its chosen type. - -Tue Mar 16 10:53:17 1999 Gavin Romig-Koch - - * invoke.texi: Add -mlong32 documentation. - * config/mips/mips.h (mips_explicit_type_size_string): New. - (TARGET_SWITCHES): Add 'long32'. - (TARGET_OPTIONS): Add 'explicit-type-size'. - (CC1_SPECS): Set -mexplicit-type-size. - (LONG_MAX_SPEC): Change a use of 'no-long64' to 'long32'. - * config/mips/abi64.h (LONG_MAX_SPEC): Same. Add 'mabi=32'. - * config/mips/mips.c (mips_explicit_type_size_string): New. - (override_options): Use it. - * config/mips/osfrose.h (CC1_SPECS): Set -mexplicit-type-size. - - * config/mips/mips.h (SUBTARGET_CPP_SIZE_SPEC): - Pointer size now depends on both size longs and size of GP - registers. - -Tue Mar 16 10:22:22 1999 Gavin Romig-Koch - - * config/mips/iris.h (CTORS_SECTION_ASM_OP,DTORS_SECTION_ASM_OP, - dtors_section): Use Pmode == DImode rather than TARGET_LONG64. - * config/mips/mips.c (override_options): Allow -mlong64 and - -mint64 with -mips2 or less. - * config/mips/mips.h (MASK_LONG64): Fix comment. - (POINTER_SIZE): Use Pmode == DImode rather than TARGET_LONG64. - (Pmode): Make Pmode the smaller of longs or gp registers. - * invoke.texi: Note the new size for pointers. - -Mon Mar 15 22:45:25 1999 David Edelsohn - - * rs6000.h (ASM_OUTPUT_{DOUBLE,FLOAT}): Always generate IEEE 754 - bit-pattern directly. - (ASM_OUTPUT_REG_{PUSH,POP}): Delete. - * rs6000.c (first_reg_to_save): If profiling and context needed, - allocate a reg to save static chain for all ABIs. For AIX - profiling, calculate parameter registers to save based on need. - (output_function_profiler): Save and restore static chain around - profile call for all ABIs. - -1999-03-15 Zack Weinberg - - * cppinit.c: Instead of one pending list, keep separate lists - for each category of pending option: -D/-U, -A, -include, - -imacros. Move the four partial include-path lists into the - pending block. Use head and tail pointers so we don't ever - have to reverse the lists. - - (cpp_start_read): Break out blocks of code to their own - functions: install_predefs and initialize_dependency_output. - Use path_include for C_INCLUDE_PATH and friends as well as - CPATH. Remove include_defaults gunk. Warn about the - combination of -lang-chill and -trigraphs. Optimize string - bashing. Walk each pending list once, deallocating as we go. - - (append_include_chain): Brought over from cppfiles.c. Mark - dirs as system include dirs if and only if appending to - system include path. If opts->verbose, print a notice when a - dir is dropped from the include path because it doesn't - exist. Fix memory leak: this function is not supposed to copy - its DIR argument. - - (nreverse_pending, push_pending): Removed. - (APPEND): New macro for adding to pending lists. - (path_include): Can now add to any partial include path. - (base_name): Bring over from cccp.c. - (cpp_options_init): Allocate the pending block. - (cpp_handle_option): Add --version. Exit after --help. Fix - formatting. Order -ifoo options by frequency of usage. - (install_predefs): New function, simplified version of code - that was in cpp_start_read. - (initialize_dependency_output): Likewise. Understand OBJECT_SUFFIX. - - * cppfiles.c (simplify_pathname): Export. - (merge_include_chains): Don't nreverse the lists. If - opts->verbose, print a notice when a duplicate dir is detected - and dropped from the include path. - (finclude): Fix excessive cleverness in setting - fp->system_header_p. - (actual_directory): Set x->sysp from - CPP_BUFFER (pfile)->system_header_p so that one system header - may include another with "". - (deps_output): Fix double adjustment of deps_size which would - cause all dependencies after the first two lines to be lost. - - * cpplib.c (cpp_unassert): New function. - * cpplib.h: Lay out struct cpp_pending here. Adjust - prototypes. Add include_prefix_len to struct cpp_options. - -Mon Mar 15 16:01:52 1999 Jim Wilson - - * config/misp/mips.h (REGISTER_MOVE_COST): Make the cost of moving - from HI/LO/HILO/MD into general registers the same as for one - of moving general registers to HI/LO/HILO/MD. - -Mon Mar 15 12:39:38 1999 Nick Clifton - - * config/m32r/m32r.c (init_idents): New function. Initialize - static tree nodes for m32r specific attribute identifiers. Remove - leading and trailing double underscores from the attribute names. - (m32r_valid_machine_decl_attribute): Call init_idents. - (m32r_encode_section_info): Call init_idents. - -Mon Mar 15 10:20:20 1999 Mark Mitchell - - * reload.c (find_reloads): Add a REG_LABEL note if we substitute a - LABEL_REF for something else. - -Mon Mar 15 08:24:17 1999 Kaveh R. Ghazi - - * fold-const.c (exact_real_inverse): Move variable `float_error' - into the scope where it is used. - (const_binop_1): New static function. - (cb_args): New struct. - (const_binop): Use them in call to `do_float_handler'. - (fold_convert_1): New static function. - (fc_args): New struct. - (fold_convert): Use them in call to `do_float_handler'. - -Mon Mar 15 22:50:18 1999 Michael Hayes - - * rtlanal.c (auto_inc_p): New function. - * rtl.h (auto_inc_p): Prototype it. - * reload1.c (add_auto_inc_notes): New function. - (reload): Strip REG_INC notes and call add_auto_inc_notes - for each insn to restore them correctly. - -1999-03-15 Manfred Hollstein - - * fixinc/Makefile.in (procopen.o): List the actual - dependencies. - -Sun Mar 14 16:22:10 1999 Kaveh R. Ghazi - - * cse.c (check_fold_consts): New static function. - (cfc_args): New struct. - (simplify_relational_operation): Use them in call to - `do_float_handler'. - - * toplev.c (do_float_handler): New function to wrap calls to - setjmp/set_float_handler. - - * toplev.h (do_float_handler): Add extern prototype. - - * tree.c (build_real_from_int_cst_1): New static function. - (brfic_args): New struct. - (build_real_from_int_cst): Use them in call to - `do_float_handler'. - -Sun Mar 14 01:15:06 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Mar 13 17:37:18 1999 Richard Henderson - - * haifa-sched.c (sched_analyze_1): Only clear reg_last_uses on a SET. - -Sat Mar 13 11:36:16 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (arm_split_constant): Don't try to force a constant to - memory after arm_reorg has run. - (after_arm_reorg): New static variable. - (arm_reorg): Set it. - (output_func_epilogue): Clear it. - -Fri Mar 12 20:26:32 1999 David Edelsohn - - * configure.in ({rs6000,powerpc}-ibm-aix*): Set float_format to none. - * configure: Rebuilt. - -Fri Mar 12 20:45:30 1999 J"orn Rennecke - - * unroll.c (loop_iterations): Don't return a final value for EQ - comparison loops. - -Fri Mar 12 12:35:01 1999 Jim Wilson - - * reload1.c (calculate_needs_all_insns): When ignore equivalence - setting insn, clear need_elim, need_reload, and need_operand_change. - -Fri Mar 12 07:54:43 1999 Bruce Korb - - * fixinc/fixinc.*: Some changes from the fixincl-branch - were not applied (??!!). Corrected. - - * fixinc/Makefile.in: Same thing. - -Fri Mar 12 00:51:43 1999 Jeffrey A Law (law@cygnus.com) - - * expr.c (expand_expr): Allow a CALL_EXPR with a mode wider than - MAX_INTEGER_COMPUTATION_MODE. - -Thu Mar 11 14:00:58 1999 Richard Henderson - - * alpha.h (HARD_REGNO_MODE_OK): Disallow QI/HImode in fp regs. - (MODES_TIEABLE_P): Update. - - * alpha.md (ev5_e0): Conflict loads and stores. - -Thu Mar 11 13:55:52 1999 Richard Henderson - - * machmode.h (smallest_mode_for_size): Prototype. - * stor-layout.c (smallest_mode_for_size): Remove static. - -Thu Mar 11 21:25:59 1999 J"orn Rennecke - - * loop.c (strength_reduce): Don't do biv increment -> DEST_REG giv - conversion if we don't know the lifetime. - -Thu Mar 11 20:37:59 1999 J"orn Rennecke - - * reload.1c (delete_address_reloads_1): Check for reloads of - CURRENT_INSN even if it sets DST. - -Thu Mar 11 10:29:50 1999 Jason Merrill - - * dwarf2out.c (add_AT_lbl_offset): Rename from add_AT_section_offset. - (print_die, size_of_die, value_format, output_die): Adjust. - -Thu Mar 11 10:27:42 1999 Robert Lipe - - * dwarf2out.c (TEXT_SECTION_LABEL, DEBUG_LINE_SECTION_LABEL, - DEBUG_INFO_SECTION_LABEL, ABBREV_SECTION_LABEL, - text_section_label, debug_line_section_label, - debug_info_section_label, abbrev_section_label): New. - (output_compilation_unit_header): Emit label associated - with section instead of section name itself. - (out_pubnames, output_aranges, output_line_info, - dwarf2out_finish): Likewise. - (dwarf2out_init): Build internal label names for sections - from static labels. - -Thu Mar 11 17:28:32 1999 J"orn Rennecke - - * sh.md (mulsi3): End mul.l sequence with a no-op move. - -Thu Mar 11 08:52:02 1999 Bruce Korb - - * Makefile.in: Activated fixinc/mkfixinc.sh. - * configure.in: Activated fixinc/mkfixinc.sh. - -Thu Mar 11 01:38:02 1999 Mumit Khan - - * cppfiles.c (INO_T_EQ): Handle UWIN. - - * c-common.c (decl_attributes): Flag unrecognized attribute - functions as warnings instead of as errors. - - Support for i386-pc-uwin. - * i386/uwin.h: New file. - * i386/xm-uwin.h: New file. - * i386/t-uwin: New file. - * i386/uwin.asm: New file. - * configure.in (i[3456]86-*-uwin*): Define. - Add Workaround for vfork bug when hosted on uwin. - * configure: Regenerate. - - * cccp.c (INO_T_EQ): Undefine. UWIN has inodes. - (absolute_filename): UWIN uses POSIX pathnames only. - * libgcc2.c (getpagesize): Do not define for UWIN. - (mprotect): Likewise. - * protoize.c (dirent.h): Conditionally include. - (fputc): Prototype only if it's not a macro. - -Wed Mar 10 02:49:04 1999 Jason Merrill - - * configure.in: Remove init_priority stuff. - -1999-03-11 Colin Smith - - * sdbout.c (plain_type_1): Make boolean types work better with sdb. - -Thu Mar 11 00:20:52 1999 Alexandre Oliva - - * gcc.texi: Update bug reporting instructions to match - current ezmlm list reality. - -Wed Mar 10 23:11:19 1999 Kaveh R. Ghazi - - * gcc.c (print_file_name, print_prog_name, spec_machine, - read_specs, set_spec, lookup_compiler, build_search_list, - putenv_from_prefixes, find_a_file, record_temp_file, - delete_if_ordinary, handle_braces, do_spec, do_spec_1, find_file, - is_directory, validate_switches, used_arg, default_arg, - pfatal_with_name, perror_with_name, pfatal_pexecute, fatal, error, - notice, add_preprocessor_option, add_assembler_option, - add_linker_option, process_command, execute, - unused_prefix_warnings, clear_args, fatal_error, - lang_specific_driver, user_specs, compiler, link_command_spec, - option_map, translate_options, make_temp_file, temp_name, - programname, path_prefix, machine_suffix, just_machine_suffix, - gcc_exec_prefix, standard_exec_prefix, standard_exec_prefix_1, - md_exec_prefix, md_startfile_prefix, md_startfile_prefix_1, - standard_startfile_prefix, standard_startfile_prefix_1, - standard_startfile_prefix_2, tooldir_base_prefix, tooldir_prefix, - multilib_dir, temp_filename, temp_file, command, switchstr, - infile, outfiles, input_filename, input_basename, input_suffix, - check_live_switch, main): Qualify a char* with the `const' keyword. - -Wed Mar 10 20:28:29 1999 Jeffrey A Law (law@cygnus.com) - - * lcm.c: New file. - * Makefile.in (OBJS): Add lcm.o. - (lcm.o): Add dependencies. - - * gcse.c (compute_pre_local_properties): Delete. - (compute_pre_data): Use compute_local_properties instead of - compute_pre_local_properties. - - * gcse.c: More comments, whitespace and similar fixes. - (dump_cuid_table, maybe_set_rd_gen, dump_cprop_data): Delete. - (dump_pre_data, compute_cprop_local_properties): Likewise. - (one_classic_gcse_pass): Lose unused argument. All callers changed. - (compute_hash_table, compute_expr_hash_table): Likewise. - (compute_set_hash_table, one_pre_gcse_pass, mark_call): Likewise. - (cprop_insn, cprop, one_cprop_pass): Add new argument ALTER_JUMPS. - All callers changed. Only alter jumps if ALTER_JUMPS is nonzero. - Lose unused argument. - (gcse_main): Always run a cprop pass after finishing global cse. - (compute_local_properties): New function. - (hash_scan_pat, hash_scan_insn): No longer call maybe_set_rd_gen. - (compute_cprop_data): Use compute_local_properties. - - * gcse.c: Update various comments. - (current_function_calls_longjmp): Delete declaration. - - * gcse.c (run_jump_opt_after_gcse): New variable. - (gcse_main): Returns an integer. - (hash_scan_set): Record initializations from CONST_DOUBLEs too. - (try_replace_reg): Update some comments. - (cprop_insn): Allow propagation into some JUMP_INSNs too. - * rtl.h (gcse_main): Update prototype. - * toplev.c (rest_of_compilation): If gcse_main returns nonzero, - then run a jump optimization pass. - * jump.c (delete_barrier_successors): Delete nop jumps too. - -Wed Mar 10 19:04:31 1999 J"orn Rennecke - - * sh.c (fp_arith_reg_operand): Actually test if reg is suitable - for FP arithmetic. Changed caller. - * sh.md (subsf3, subsf_i): Use fp_arith_reg_operand. - -Wed Mar 10 18:56:31 1999 J"orn Rennecke - - * reload1.c (choose_reload_regs): When inheriting from the frame - pointer, don't clobber it. - -Wed Mar 10 08:01:52 1999 Bruce Korb - - * fixinc/fixinc.*: Resync-ed with the files in this - directory. - - * fixinc/mkfixinc.sh: The machine case elements were - out-of-order. (the ix86-*-linux-gnu* entry needed to - be earlier). - -Wed Mar 10 00:01:24 1999 J"orn Rennecke - - * reload1.c (reload_combine_note_store): Fix calculation of number - of affected registers. - -Tue Mar 9 15:48:15 1999 Richard Henderson - - * flow.c (tidy_fallthru_edge): Be more careful finding the last - BARRIER of a list. Delete the cc0 setter as well as a cond jump. - -Tue Mar 9 15:26:02 1999 Hans-Peter Nilsson - - * i386.md (ashlsi3 splitter): Fix typo in last change. - -Tue Mar 9 11:35:20 1999 Richard Henderson - - * reg-stack.c (stack_reg_life_analysis): Use returnjump_p - instead of an explicit test for RETURN. - -Tue Mar 9 09:33:16 1999 Kaveh R. Ghazi - - * Makefile.in (toplev.o): Depend on $(BASIC_BLOCK_H). - - * toplev.c: Include basic-block.h. - -Tue Mar 9 02:08:17 1999 Jeffrey A Law (law@cygnus.com) - - * calls.c (load_register_parameters): New function. - (expand_call): Use it. - - * calls.c (expand_call): Slightly reorganize code. - - * calls.c (compute_argument_addresses): New function. - (rtx_for_function_call): New function. - (expand_call): Use them. - - * i386.md (zero_extendhisi2): Split into an expander and anonymous - pattern. Add new anonymous pattern for use when optimizing for - size or for the PPro. - (zero_extendqihi2, zero_extendqisi2): Likewise. - -Mon Mar 8 23:43:47 1999 Richard Henderson - - * haifa-sched.c (sched_analyze_1): Fix last change -- add clobber - dependencies to sets in the non-hard-reg case too. - -Mon Mar 8 18:55:21 1999 Marc Espie - - * config/openbsd.h (HANDLE_SYSV_PRAGMA): Define. - -Mon Mar 8 16:04:44 1999 Jim Wilson - - * local-alloc.c (combine_regs): Don't combine if we have a hard reg - for which CLASS_LIKELY_SPILLED_P is true. - - * unroll.c (loop_iterations): Only call loop_find_equiv_value if we - have a REG or SUBREG. - -Mon Mar 8 15:27:42 1999 Jeffrey A Law (law@cygnus.com) - - * i386.md (ashlsi3): Revise comments. Provide new anonymous - pattern for Pentium and PPro/PII. Reverse constraints in - generic ashlsi3 anonymous pattern. - - * calls.c (initialize_argument_info): Accept a pointer to - CUMULATIVE_ARGS. - (expand_call): Pass the address of CUMULATIVE_ARGS. - - * rs6000/xm-sysv4.h (HOST_BITS_PER_LONGLONG): Remove #if 0. - - * mn10300.h (CASE_DROPS_THROUGH): Delete. - * mn10200.h (CASE_DROPS_THROUGH): Delete. - * h8300.h (CASE_DROPS_THROUGH): Delete. - - * flow.c (merge_blocks_nomove): For HAVE_cc0 targets, make sure - to also delete the cc0 setter when deleting a conditional branch - to the next block. - -Mon Mar 8 18:47:11 1999 J"orn Rennecke - - * regmove.c (copy_src_to_dest): New argument max_old_uid. - -Mon Mar 8 08:23:00 1999 Bruce Korb - - * ChangeLog: Merged entries from fixincl-branch. - -Sun Mar 7 11:48:56 1999 Richard Henderson - - * haifa-sched.c (ENCODE_BLOCKAGE): Don't shift unit too far. - (print_exp): Special case addition of a constant. - (print_value) [CONST_INT]: Use HOST_WIDE_INT_PRINT_HEX. - -Sun Mar 7 11:21:02 1999 Richard Henderson - - * haifa-sched.c (reg_last_clobbers): New. - (reg_pending_clobbers, bb_reg_last_clobbers): New. - (compute_block_backward_dependences): Allocate memory for them. - (schedule_region): Likewise. - (sched_analyze_1): Clobbers don't interfere with one another. - They do interfere with sets ... - (sched_analyze_2): ... and uses. - (sched_analyze): Likewise. - (sched_analyze_insn): Update reg_last_clobbers appropriately. - -Sun Mar 7 08:30:37 1999 Kaveh R. Ghazi - - * gmon-sol2.c: Include config.h and system.h. Don't redundantly - include system header files. - (sccsid): Remove. - (moncontrol, monstartup, _mcleanup, internal_mcount): Prototype. - (_mcleanup): Add the `const' keyword to a char*. - (internal_mcount): Declare `etext' as a char[] not a function. - Cast `etext' to char* when calling `monstartup'. - - * sparc.c (frame_base_name, save_regs, restore_regs, - build_big_number, sparc_cmodel_string, sparc_align_loops_string, - sparc_align_jumps_string, sparc_align_funcs_string, code_model, - cpu_default, cpu_table, output_function_prologue, - output_function_epilogue, output_return, - sparc_flat_output_function_prologue, ultra_code_names, - sparc_flat_output_function_epilogue): Constify a char*. - (hypersparc_adjust_cost): Add a default case in a switch. - - * sparc.h (sparc_cmodel_string, OVERRIDE_OPTIONS, - sparc_cpu_select, sparc_align_loops_string, - sparc_align_jumps_string, sparc_align_funcs_string, - output_return): Constify a char*. - - * sparc.md (movdi): Change the comparison of HOST_BITS_PER_WIDE_INT - so that we check "== 32", instead of "!= 64". Cast a value to - HOST_WIDE_INT when comparing against one. Hide the declaration - for variable `chain'. - -Sun Mar 7 08:05:27 1999 Kaveh R. Ghazi - - * system.h (const, inline): Move the stage2 handling of these - keywords-as-macros from here... - - * gansidecl.h (const, inline): ...to here. - -Sun Mar 7 02:44:15 1999 Richard Henderson - - * recog.c (push_operand, pop_operand): VOIDmode needn't match modes. - -Sun Mar 7 01:58:47 1999 Richard Henderson - - * cse.c (canon_hash): Never reject hard regs in CCmode. - -Sun Mar 7 01:15:04 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Mar 6 17:18:44 1999 Richard Earnshaw (rearnsha@arm.com) - Richard Henderson - - * flow.c (make_edges): Handle casesi that jump to default branch. - If CASE_DROPS_THROUGH, force fallthru to block after casesi. - -Sat Mar 6 07:49:23 1999 Kaveh R. Ghazi - - * c-aux-info.c (data_type, affix_data_type, gen_decl, - gen_formal_list_for_type, gen_formal_list_for_func_def, gen_type): - Qualify a char* with the `const' keyword. - - * c-common.c (declare_hidden_char_array, add_attribute, if_elt, - declare_function_name, decl_attributes, format_char_info, - check_format_info, binary_op_error): Likewise. - - * cexp.y (yyerror, error, pedwarn, warning, token): Likewise. - - * gcse.c (dump_hash_table): Likewise. - - * integrate.c (function_cannot_inline_p): Likewise. - - * optabs.c: Include insn-config.h earlier. - (init_libfuncs, init_integral_libfuncs, init_floating_libfuncs): - Qualify a char* with the `const' keyword. - - * real.c (asctoe24, asctoe53, asctoe64, asctoe113, asctoe, - asctoeg, mtherr, ereal_atof): Likewise. - - * real.h (ereal_atof): Likewise. - - * sbitmap.c (dump_sbitmap_vector): Likewise. - - * sbitmap.h (dump_sbitmap_vector): Likewise. - - * stmt.c (nesting, n_occurrences, expand_start_case): Likewise. - - * toplev.c (rest_of_compilation): Likewise. - - * tree.h (function_cannot_inline_p, expand_start_case): Likewise. - -Fri Mar 5 23:16:42 1999 David Edelsohn - - * rs6000.h (ASM_OUTPUT_REG_{PUSH,POP}): Add 64-bit support and do - not overwrite AIX link register save area. - -Fri Mar 5 23:08:01 1999 J"orn Rennecke - - * reload.c (find_reloads_subreg_address): Actually create the USE - for the register, not the new memory location. - -Fri Mar 5 21:41:07 1999 J"orn Rennecke - - * reload1.c (emit_reload_insns): If pseudo that can't be replaced - with its equivalent constant, fall back to reload_in. - -Fri Mar 5 13:20:39 1999 Richard Henderson - - * Makefile.in: Delete .flow2 debugging files. - -Fri Mar 5 11:36:11 1999 Nick Clifton - - * config/arm/arm.c (arm_override_options): Change default target - cpu selection so that enabling TARGET_APCS_32 does not override - default target CPU. - -Fri Mar 5 19:26:23 1999 J"orn Rennecke - - * sh.h (SLOW_BYTE_ACCESS): Define to 1. - (BOOL_TYPE_SIZE): Define. - -Fri Mar 5 02:14:54 1999 John Wehle (john@feith.com) - - * function.c (assign_stack_temp_for_type): Abort - if mode == Blkmode and align is less than - BIGGEST_ALIGNMENT / BITS_PER_UNIT. - (assign_stack_temp_for_type): Round the size parameter - passed to assign_stack_local instead of size itself. - -Thu Mar 4 15:00:35 1999 Richard Henderson - - * flow.c (delete_unreachable_blocks): Mark blocks as they - are put on to the worklist, not as they are taken off. - -Thu Mar 4 00:05:44 1999 Jeffrey A Law (law@cygnus.com) - - * function.c (current_function_has_computed_jump): Remove duplicate - definition. - -Wed Mar 3 19:09:11 1999 Jim Wilson - - * m68k/m68020-elf.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP): Undef. - (STARTFILE_SPEC, ENDFILE_SPEC): Define to empty string. - - * sparc/elf.h (MULDI3_LIBCALL, DIVDI3_LIBCALL, UDIVDI3_LIBCALL, - MODDI3_LIBCALL, UMODDI3_LIBCALL, STDC_0_IN_SYSTEM_HEADERS): Undef. - (INIT_SUBTARGET_OPTABS): Define to empty. - -Wed Mar 3 00:00:37 1999 J"orn Rennecke - - * sh.c (force_into): New function. - (expand_block_move): Use it. - -Tue Mar 2 10:39:43 1999 Nick Clifton - - * cccp.c (struct default_include): Add 'included' field. - (main): Set 'included' field when a default include directory - is added to the chain. If -v is specified list all default - include directories which do not get appended to the chain. - -Tue Mar 2 09:24:10 1999 Nick Clifton - - * configure.in (gxx_include_dir): Rename to - gcc_gxx_include_dir in order to prevent it being overridden by - a top level Makefile. - (gcc_tooldir): If $exec_prefix != $prefix then use the - difference between the two as the basis for gcc_tooldir. - - * configure: Rebuild. - - * Makefile.in: Rename gxx_include_dir to gcc_gxx_include_dir. - -Tue Mar 2 16:45:31 1999 J"orn Rennecke - - * unroll.c (copy_loop_body): Don't make extra copies of - NOTE_INSN_LOOP_CONT notes. - -Tue Mar 2 07:44:56 1999 Mark Mitchell - - * tree.c (save_tree_status): Don't treat functions with no context - as nested. - -Tue Mar 2 09:37:05 1999 Robert Lipe - - * Makefile.in (MAKEINFO): Use makeinfo built from sibling - tree when available. - -Tue Mar 2 10:12:48 1999 Kaveh R. Ghazi - - * alpha.c (alpha_cpu_name, alpha_cpu_string, alpha_tp_string, - alpha_fprm_string, alpha_fptm_string, alpha_mlat_string, - current_function_file): Add the `const' keyword. - (normal_memory_operand): Mark parameter `mode' with - ATTRIBUTE_UNUSED. - (alpha_expand_unaligned_load): Add a default case to a switch. - - * alpha.h (alpha_cpu_string, alpha_fprm_string, alpha_fptm_string, - alpha_tp_string, alpha_mlat_string): Add the `const' keyword. - (normal_memory_operand): Add prototype. - - * alpha.md: Cast an expression to `unsigned HOST_WIDE_INT' when - comparing against one. - -Tue Mar 2 10:00:21 1999 Kaveh R. Ghazi - - * mips.c (abort_with_insn): Make function static, add a prototype, - constify 2nd parameter and mark with ATTRIBUTE_NORETURN. - (current_function_file, mips_cpu_string, mips_isa_string, - mips_abi_string, mips_no_mips16_string, mips_entry_string, - mips_move_1word, mips_move_2words, output_block_move, load_store, - override_options, make_temp_file, mips16_fp_args): Qualify a char* - with the `const' keyword. - - * mips.h (current_function_file, mips_cpu_string, mips_isa_string, - mips_abi_string, mips_entry_string, mips_no_mips16_string, - mips_move_1word, mips_move_2words, output_block_move): Likewise. - (abort_with_insn): Remove extern prototype. - - * mips.md: Qualify a char* with the `const' keyword. - Remove many unused variables named `label'. - -Tue Mar 2 01:27:52 1999 H.J. Lu (hjl@gnu.org) - - * Makefile.in (cpp_install_dir, INSTALL_CPP, UNINSTALL_CPP): New - variables. - (install-cpp, uninstall-cpp): New targets. - (install-normal): Depend on $(INSTALL_CPP). - (uninstall): Depend on $(UNINSTALL_CPP). - * configure.in (cpp_install_dir): New, substitute. - (tmake_file): Added t-install-cpp for --enable-cpp. - * configure: Rebuilt. - * cpp.sh: New cpp script. - * config/t-install-cpp: New target fragment. - -Tue Mar 2 01:40:01 1999 Franz Sirl - Jeffrey A Law (law@cygnus.com) - - * cse.c (fold_rtx): Update comments for (const (minus (label) (label))) - case. - (cse_insn): Avoid creating a bogus REG_EQUAL note for - (const (minus (label) (label))) - (record_jump_cond): Fix mismatched paren in comment. - -Tue Mar 2 01:07:12 1999 Dan Nicolaescu - - * final.c (end_final): There are 11 words in the "main header" - structure, not 10. - -Tue Mar 2 00:09:18 1999 Marc Espie - - * extend.texi: Reference __extension__ in the index. - -Mon Mar 1 19:09:32 1999 Jim Wilson - - * Makefile.in (CROSS_FLOAT_H): Delete. - (FLOAT_H): Use float_h_file. - (rest.cross, stmp-int-hdrs): Delete gfloat.h dependency. - (gfloat.h): Delete. - (stmp-int-hdrs): Use FLOAT_H instead of gfloat.h. - (mostlyclean): Delete gloat.h reference. - (install-cross-rest, install-float-h-cross, stmp-headers): Update - comments. - * configure.in (sparcv9-*-solaris2*): Set float_format to none. - (sparc-*-solaris2*): Set float_format to none for 2.5 and higher. - (float_h_file): Set from float_format. Substitute into Makefile.in. - (float_format): No longer substitute into Makefile.in. - * cross-make (FLOAT_H): Delete. - * config/mips/t-cross64 (FLOAT_H): Delete. - * configure: Rebuilt. - -Mon Mar 1 16:36:18 1999 Jeffrey A Law (law@cygnus.com) - - * mips.md (div_trap_normal, div_trap_mips16): Require the dependent - insn to be an INSN before looking at its pattern. - -Mon Mar 1 15:03:51 1999 Jim Wilson - - * config/m68k/lb1sf68.asm (udivsi3): Change jmi to jcs. Fix comments. - * config/m68k/m68k.h (LEGITIMATE_INDEX_REG_P): Reject SIGN_EXTEND of - HImode reg when TARGET_5200. - -Mon Mar 1 21:44:30 1999 J"orn Rennecke - - From Toshiyasu Morita: - * sh.h (CACHE_LOG): SH2 has cache, too. - -Mon Mar 1 14:23:36 1999 Catherine Moore - - * toplev.c (compile_file): Disable -ffunction-sections and - debugging warning if the object format is elf. - -Mon Mar 1 11:46:25 1999 Vladimir N. Makarov - - * config/h8300/h8300.c (print_operand): Use 16 bit addressing - when the data in 8-bit area and can not be addressed by 8-bit. - -Sun Feb 28 16:40:00 1999 Richard Henderson - - * flow.c (create_basic_block): Disregard integrated bb notes. - -Sun Feb 28 15:57:06 1999 Richard Henderson - - * sparc.md (blockage, nonlocal_goto_receiver): Set length to 0. - -Sun Feb 28 14:47:53 1999 Arturo Montes - - * config/i386/t-sco5gas (crti.o): New target. - -Sun Feb 28 15:10:17 1999 David Edelsohn - - * rs6000.md (elf_high, movsi_got, *movsi_got_internal, - *movsi_got_internal_mem, GOT splitter, movdf_hardfloat32, - movdf_softfloat32, movdf_hardfloat64, movdf_softfloat64, - load_multiple, allocate_stack, call_indirect_aix32, - call_indirect_aix64, call_value_indirect_aix32, - call_value_indirect_aix64, call_indirect_nt, - call_value_indirect_nt): Use gpc_reg_operand instead of - register_operand. - -Sun Feb 28 15:10:17 1999 Michael Meissner - - * rs6000.md (one_cmplsi2, andsi3, iorsi3, xorsi3, *eqvsi3, - *andcsi3, *iorcsi3, *nandsi3, *norsi3): Add alternatives to use CR - other than cr0. - * rs6000.c (and{,64}_operand): If the user did -ffixed-cr0, don't - allow andi. or andis. which always set cr0. - -Sun Feb 28 01:15:04 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Feb 28 02:00:38 1999 Jeffrey A Law (law@cygnus.com) - - * invoke.texi: Update information for PA scheduling. - -Sat Feb 27 23:21:47 1999 Jerry Quinn - Mike Stump - - * pa.c (override_options): Change default to 7100LC. - - * pa.h (REG_ALLOC_ORDER): Change order to allocate left half of - float regs before right half of float regs. - -Sat Feb 27 22:48:38 1999 H.J. Lu (hjl@gnu.org) - Jeffrey A Law (law@cygnus.com) - - * frame.h: Update some comments. - * defaults.h (TARGET_ATTRIBUTE_WEAK): Define. - * crtstuff.c (__register_frame_info, __deregister_frame_info): Declare - using TARGET_WEAK_ATTRIBUTE. - (__do_global_dtors_aux): Check if __deregister_frame_info is - zero before calling it. - (__do_global_dtors): Likewise. - (frame_dummy): Check if __register_frame_info is zero before - calling it. - (__frame_dummy): Likewise. - -Sat Feb 27 19:18:24 1999 Jeffrey A Law (law@cygnus.com) - - * SERVICE: Update from the FSF. - -Sat Feb 27 14:31:22 1999 Arturo Montes - - * config/i386/t-sco5 (crti.o): New target. - * config/i386/sco5.h (STARTFILE_SPEC): Include crti.o when - linking -shared. - * configure.in (i[34567]86-*-sco3.2v5*): Add crti.o. - -Sat Feb 27 01:12:40 1999 Jeffrey A Law (law@cygnus.com) - - * md.texi (prologue,epilogue): Document named patterns. - -Fri Feb 26 19:31:25 1999 Dave Love - - * md.texi, invoke.texi: Fix unterminated @xrefs. - -Fri Feb 26 15:33:45 1999 Richard Henderson - - * genattrtab.c (simplify_knowing): Fix uninitialized read - in Feb 21 change. - - * genextract.c (main): Clear recog_operands before extracting. - -Fri Feb 26 02:24:57 1999 Jeffrey A Law (law@cygnus.com) - - * c-pragma.c (add_weak); Delete. Moved into... - * varasm.c (add_weak): New external function. - (declare_weak): If HANDLE_PRAGMA_WEAK, then add the function to - the list of weak functions. - * c-pragma (add_weak): Declare. - -Thu Feb 25 23:43:59 1999 Richard Henderson - - Flow rewrite to use basic block structures and edge lists: - - * basic-block.h (x_basic_block_head, x_basic_block_end): Kill. - (basic_block_computed_jump_target, basic_block_live_at_start): Kill. - (struct edge_def): New. - (struct basic_block_def): New. - (basic_block_info): New. - (BLOCK_HEAD, BLOCK_END): Update. - (ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR): New. - (uid_block_number): Kill. - (basic_block_for_insn, BLOCK_FOR_INSN): New. - (BLOCK_NUM): Update. - * flow.c (XNMALLOC): Kill. - (max_uid_for_flow): Kill. - (uid_block_number): Kill. - (uid_volatile): Turn into a bitmap. - (SET_INSN_VOLATILE): New. - (basic_block_info): New. - (entry_exit_blocks): New. - (x_basic_block_head, x_basic_block_end): Kill. - (basic_block_computed_jump_target, basic_block_live_at_start): Kill. - (flow_int_list_blocks, basic_block_succ, basic_block_pred): Kill. - (basic_block_loop_depth): Kill. - (basic_block_for_insn): New. - (find_basic_blocks): Split out initial block counting into - count_basic_blocks. Call functions split out of find_basic_blocks_1. - (count_basic_blocks): New. - (find_basic_blocks_1): Split out edge recognition, unreachable - block deletion. - (create_basic_block): New. - (compute_bb_for_insn): New. - (clear_edges): New. - (free_bb_memory): Kill. - (add_edge, add_edge_to_label): Kill. - (mark_label_ref): Kill. - (make_edges): Rewrite to use edge lists. - (make_edge, make_label_edge): New. - (mark_critical_edges): New. - (split_edge, insert_insn_on_edge): New. - (commit_one_edge_insertion, commit_edge_insertions): New. - (delete_unreachable_blocks): Rewrite to use edge lists. - Split out EH region manipulation into delete_eh_regions. - Call tidy_fallthru_edge and merge_blocks. - (delete_eh_regions): New. - (delete_note_p): New. - (delete_insn_chain): New. - (delete_block): Split out code into delete_insn_chain and - tidy_fallthru_edge. Update edge lists. - (expunge_block): New. - (flow_delete_insn): New? - (can_delete_label_p): New? - (merge_blocks_nomove, merge_blocks): New. - (tidy_fallthru_edge): New. - (calculate_loop_depth): New. - (life_analysis): Allocate and free uid_volatile. - (free_basic_block_vars): Update for new structures. - (record_volatile_insns): Use SET_INSN_VOLATILE. - (mark_regs_live_at_end): Tidy EXIT_IGNORE_STACK usage. - (mark_used_regs): Likewise. - (life_analysis_1): Use bb global_live_at_start, global_live_at_end, - local_set regsets. Use bb->aux to store new_live_at_end. Begin - life propagation from EXIT_BLOCK rather than last block. Clear - regs_ever_live after mark_regs_live_at_end. - (allocate_for_life_analysis): Update for new structures. - (propagate_block): Split out loop depth calculation to - calculate_loop_depth. - (regno_uninitialized): Use bb->global_live_at_start. - (regno_clobbered_at_setjmp): Likewise. - (dump_bb_data): Likewise. - (find_auto_inc): Use BLOCK_FOR_INSN instead of BLOCK_NUM. - (dump_flow_info): Update for new structures. - (dump_edge_info): New. - (print_rtl_with_bb): Update for new structures. - (compute_preds_succs): Do no work -- convert edge lists. - (set_block_for_insn): From corpse of old set_block_num. - (set_block_num): Call it. - - * rtl.c (note_insn_name): Add NOTE_INSN_BASIC_BLOCK. - * rtl.h (rtunion_def): Add bb entry. - (NOTE_BASIC_BLOCK): New. - (NOTE_INSN_BASIC_BLOCK): New. - - * varray.h (varray_data_tag): Add bb entry. - (VARRAY_BB_INIT, VARRAY_BB): New. - - * emit-rtl.c (emit_label_before): New. - - * except.c (expand_rethrow): Delete insns following the call to - rethrow. Put the REG_EH_RETHROW on the call. - - * jump.c (returnjump_p, returnjump_p_1): New. - - * expr.h (nonlocal_goto_handler_labels): New declaration. - * function.c (nonlocal_goto_handler_labels): Define it. - (push_function_context_to): Save it. - (pop_function_context_from): Restore it. - (init_function_start): Clear it. - (nonlocal_label_rtx_list): Kill. - * function.h (struct function): Add storage space for it. - * stmt.c (expand_nl_handler_label): Return the new label. - (expand_nl_goto_receivers): Collect a list of them in - nonlocal_goto_handler_labels. - - * Makefile.in (print-rtl.o): Depend on basic-block.h. - (flow.o): Depend on insn-flags.h. - - * function.c (thread_prologue_and_epilogue_insns): Do not - half-heartedly update bb structures. - - * toplev.c: Add flow2 dump as -dw. - (rest_of_compilation): Finish .greg before flow2. - - * graph.c (draw_edge): Handle class 3. - (print_rtl_graph_with_bb): Make abnormal edges red class 2, - change non-fall-thru but adjacent to green class 3. Update - to use new structures. - - * print-rtl.c (print_rtx): Handle NOTE_INSN_BASIC_BLOCK. - - * reg-stack.c (BLOCK_NUM): Convert to function. Abort if - block_number is -1. - (reg_to_stack): Initialize block_num to -1. - - * combine.c (set_nonzero_bits_and_sign_copies): Update reference - to basic_block_live_at_start to bb->global_live_at_start. - (try_combine): Likewise. - (reg_dead_at_p): Likewise. - * global.c (global_conflicts): Likewise. - Handle stack regs on all abnormal edges, not just computed jumps. - (mark_elimination): Update reference to basic_block_live_at_start. - (build_insn_chain): Likewise. - * haifa-sched.c (haifa_edge): Rename from edge for conflict. - (is_cfg_nonregular): Look at nonlocal_goto_handler_labels instead - of nonlocal_label_rtx_list. - (check_live_1): Update reference to basic_block_live_at_start. - (update_live_1): Likewise. - (find_pre_sched_live): Likewise. - (find_post_sched_live): Likewise. - * local-alloc.c (update_equiv_regs): Likewise. - (block_alloc): Likewise. - * reload1.c (reload, reload_combine): Likewise. - * regmove.c (mark_flags_life_zones): Likewise. - * resource.c (mark_target_live_regs): Likewise. - * sched.c (schedule_block): Likewise. - - * regclass.c (regset_release_memory): Don't free - basic_block_live_at_start. - - * unroll.c (copy_loop_body): Don't duplicate NOTE_INSN_BASIC_BLOCK. - -Thu Feb 25 21:32:34 1999 Jason Merrill - - * fixinc.wrap: Also handle struct queue in sys/stream.h. - * fixinc.svr4: Likewise. - - * dwarf2out.c (scope_die_for): Set scope_die to comp_unit_die - rather than asserting it. - -Thu Feb 25 23:33:06 1999 Kaveh R. Ghazi - - * cppexp.c (left_shift, right_shift, parse_charconst, COMPARE, - cpp_parse_expr): Replace uses of long/HOST_BITS_PER_LONG with - HOST_WIDEST_INT/HOST_BITS_PER_WIDEST_INT. - - * Makefile.in (cppmain.o, cpplib.o, cpphash.o, cppalloc.o, - cpperror.o, cppexp.o, cppfiles.o, cppinit.o, fix-header.o, - scan-decls.o): Don't depend on machmode.h. - - * cppexp.c: Don't define CHAR_BIT or HOST_BITS_PER_WIDE_INT anymore. - Replace all instances of HOST_WIDE_INT with HOST_WIDEST_INT. - - * cppfiles.c: Likewise. - - * cpplib.c: Likewise. - - * cpplib.h: Likewise. Also don't include machmode.h anymore. - -Thu Feb 25 18:46:26 1999 Richard Henderson - - * gcc.c (default_compilers): Define __FAST_MATH__ when appropriate. - * objc/lang-specs.h: Likewise. - -Thu Feb 25 16:19:43 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (call patterns): Lose unused argument to output_call. - - * print-rtl.c (print_rtl): Print /j and /c for the jump/call flags. - -1999-02-25 Zack Weinberg - - * cpphash.c (install): Rename to cpp_install, add cpp_reader* - first argument. All callers changed. - (hashtab): Removed. - (cpp_lookup, cpp_install): Change all refs to hashtab to - pfile->hashtab. - (cpp_hash_cleanup): Removed. - * cpphash.h: Adjust prototypes. - * cpplib.h (struct cpp_reader): Add hashtab pointer. - * cppinit.c (cpp_reader_init): Also allocate space for the - hashtab. - (cpp_cleanup): Delete all macros and free the hashtab. - -Thu Feb 25 21:52:54 1999 J"orn Rennecke - - * sh.h (PASS_IN_REG_P): For TARGET_HITACHI, don't pass structures - in registers. - - * expr.h (PRETEND_OUTGOING_VARARGS_NAMED): Provide default definition. - * function.c (assign_parms): Honor PRETEND_OUTGOING_VARARGS_NAMED. - * calls.c (expand_call): Likewise. - - * sh.c (sh_expand_prologue): For TARGET_HITACHI, don't push varargs / - stdarg arguments. - * sh.h (CPP_SPEC): Add -D__HITACHI__ for -mhitachi. - (FUNCTION_ARG): For TARGET_HITACHI, don't pass unnamed - arguments in registers. - (PRETEND_OUTGOING_VARARGS_NAMED): Define. - * va-sh.h (entire file): If __HITACHI__ is defined, use sh[123] - flavor varargs. - -Thu Feb 25 14:32:40 1999 Kaveh R. Ghazi - - * cse.c (dump_class): Revert last change and make the prototype - extern. - -Thu Feb 25 19:13:42 1999 J"orn Rennecke - - * rtl.h (insn_first_p): Don't declare. - * rtlanal.c (insn_first_p): Delete. - * loop.c (loop_insn_first_p): Faster implementation. - -Thu Feb 25 10:44:35 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (TARGET_SWITCHES): Delete deprecated switches -m[236]. - (TARGET_3, TARGET_6): Delete. - (ARM_FLAG_ARM[36]): Delete. - (CPP_CPU_ARCH_SPEC): No need to handle -m[236] any more. - (CC1_SPEC): Don't expand -m[236] into new equivalents. - (CPP_APCS_PC_SPEC): No need to handle -m[236] any more. - * arm.c (arm_override_options): Delete warnings about deprecated - options -m[236]. - - * arm.c (arm_finalize_pic): Build the label into the special pic - adjustment insn instead of issuing it separately. - * arm.md (pic_add_dot_plus_eight): Rework to contain the label - that is needed. - - * arm.md (*zeroextractqi_compare0_scratch): Delete. - (*ne_zeroextractsi): New pattern. - -Thu Feb 25 18:40:06 1999 J"orn Rennecke - - * stmt.c (expand_end_loop): Grok code emitted by - expand_exit_loop_if_false. - -Thu Feb 25 10:17:32 1999 Nick Clifton - - * config/arm/arm.c (return_in_memory): Float fields in unions - force a return in memory. - (load_multiple_sequence): Add comment explaining why two LDR - instructions can be better than an LDMIA instruction. - - * config/arm/arm.h (TARGET_SHORT_BY_BYTES): Add comment - describing the real meaning of this option. - (FIXED_REGISTERS): Default r10 to not-fixed. - (CALL_USED_REGISTERS): Default r10 to not-call-used. - (SUBTARGET_CONDITIONAL_REGISTER_USAGE): If not defined, define - as empty. - (CONDITIONAL_REGISTER_USAGE): Fix r10 if TARGET_APCS_STACK is - true. Invoke SUBTARGET_CONDITIONAL_REGISTER_USAGE after - performing other checks. - - * config/arm/arm.md (zero_extendhisi2): Undo previous change. - (extendhisi2): Undo previous change. - Also add comments describing why TARGET_SHORT_BY_BYTES can be - ignored for armv4(t) architectures. - - * config/arm/riscix.h (SUBTARGET_CONDITIONAL_REGISTER_USAGE): - Define to fix r10. - - * config/arm/riscix1-1.h - (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Define to fix r10. - -Thu Feb 25 12:09:04 1999 Kaveh R. Ghazi - - * cse.c (dump_class): Make the function definition static to match - the prototype. - -Wed Feb 24 17:47:28 1999 Jim Wilson - - * dbxout.c (gstab.h): Use if CROSS_COMPILE. - - * dwarf2out.c (add_location_or_const_value_attribute): Add big - endian correction for parms passed in regs but living on the stack. - -Wed Feb 24 14:03:54 1999 Jeffrey A Law (law@cygnus.com) - - * calls.c (initialize_argument_information): New function extracted - from expand_call. - (expand_call): Use initialize_argument_information. Remove variables - which are no longer used due to cleanups. - - * calls.c (compute_argument_block_size): New function, extracted from - expand_calls. - (expand_calls): Use compute_argument_block_size. Delete - original_args_size, use unadjusted_args_size instead. - - * calls.c (precompute_arguments): New function, extracted from - expand_call. - (expand_call): Use precompute_arguments. - - * calls.c (finalize_must_preallocate): New function, extracted from - expand_call. - (expand_call): Use finalize_must_preallocate. - - * calls.c (store_one_arg): Mark "variable_size" as possibly unused. - - * regclass.c (record_reg_classes, case 'p'): Set classes appropriately. - An alternative always fails if it needs a pseudo and no suitable - register class can be found. - -Wed Feb 24 19:47:56 1999 J"orn Rennecke - - * loop.h (loop_insn_first_p): Declare. - * loop.c (loop_insn_first_p): No longer static. - * unroll.c (iteration_info): Fix comparison to - reg_iv_type->num_elements. - Before accessing reg_biv_class, check index against - max_reg_before_loop. - Fix and enable code for giv iterators. - (loop_iterations): Compare with reg_iv_type->num_elements instead - of with max_reg_before_loop. - -Wed Feb 24 19:17:11 1999 J"orn Rennecke - - * unroll.c (unroll_loop): Avoid out-of-bounds index for local_regno. - -Wed Feb 24 11:26:41 1999 Vladimir N. Makarov - - * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Don't use - PIC_OFFSET_TABLE_REGNUM for register allocation when -fPIC. - -Tue Feb 23 16:24:19 1999 Marc Lehmann - - * config/i386/i386.md: Fix typo. - -Mon Feb 22 19:36:33 1999 Andrew Cagney - - * config/mips/mips.c (mips_debugger_offset): When TARGET_MIPS16 && - frame_pointer_needed adjust frame size. - (function_prologue): Don't MIPS16 .mask GPOFFSET. Already adjusted - in .frame pseudo-op. - Frm Jim Wilson : - * mips.c (function_prologue): Adjust frame size in .frame pseudo-op - when TARGET_MIPS16 && frame_pointer_needed. - -1999-02-22 Nick Clifton - - * config/arm/arm.h: Add TARGET_CPU_strongarm1100. - Add -mno-sched command line switch to disable scheduling of - instructions into the function's prologue. - (enum processor_type): Remove. - (TARGET_OPTIONS): Add "fpe=" option to match documentation. - (struct arm_cpu_select): Replace 'set_tune_p' and 'set_arch_p' - fields with 'processors' field. - (CONDITIONAL_REGISTER_USAGE): Allow r10 to be used if stack - checking is not enabled. - (RETURN_IN_MEMORY): Always call arm_return_in_memory. - - * config/arm/arm.c (arm_cpu): Remove. - (tune_flags): Remove. - (arm_is_strong): New variable: true iff the target processor is a - StrongARM. - (arm_is_6_or_7): New variable: true iff the target processor is an - ARM6 or and ARM7. - (arm_select): Fields reorganized. - (struct processors): processor_type field removed. - (all_procs): Remove. - (all_cores): New array: Definitions of all known ARM cpu cores. - (all_architectures): New array: Definitions of all known ARM - architectures. - (streq): New macro. - (FL_SCHED): New processor flag: processor required load - scheduling. - (FL_STRONG): New processor flag: processor is a StrongARM. - (arm_override_options): Reorganized to make code clearer. - (use_return_insn): Test for "not (TARGET_APCS and - frame_pointer_needed)". - (arm_return_in_memory): Improve handling of structures. - - * config/arm/arm.md: Remove "cpu" attribute. Replace with - "is_strongarm" and "is_arm_6_or_7" attributes. - (zero_extendhisi2): Check for TARGET_SHORT_BY_BYTES before - arm_arch4. - (extendhisi2): Check for TARGET_SHORT_BY_BYTES before arm_arch4. - - * invoke.texi (ARM Options): Document -mtune= and -mfp= options. - -1999-02-22 Philip Blundell - - * config/arm/linux-gas.h (INITIALIZE_TRAMPOLINE): Replace default - definition with one including cache synchronization. - (CLEAR_INSN_CACHE): Correct syscall number and enable definition. - Move definition of inhibit_libc to... - * config/arm/xm-linux.h: ... here. - - * config/arm/t-linux: Disable multilib configurations since the - only effect for most people is to cause builds to fail. - - * config/arm/elf.h (ASM_FILE_START): Add .file directive. - (ASM_SPEC): Translate -mapcs-float to -mfloat for the assembler. - - * config/arm/linux-elf.h (DEFAULT_VTABLE_THUNKS): Define. - (HANDLE_SYSV_PRAGMA): Likewise. - (LIB_SPEC): Copy definition from generic Linux files. - (LIBGCC_SPEC): Include -lfloat if -msoft-float was given. - (FP_DEFAULT): Set to SOFT3 on 32-bit targets. - (DWARF2_DEBUGGING_INFO): Define. - (PREFERRED_DEBUGGING_TYPE): Define as DBX_DEBUG. - -Mon Feb 22 16:54:18 1999 Andrew MacLeod - - * loop.c (libcall_other_regs): Make extern. - * rtl.h (find_last_value): Add parameter to prototype. - (libcall_other_reg): Add extern declaration. - * rtlanal.c (find_last_value): Add another parameter to allow - a definition using a hardware register to be found as well. - -Mon Feb 22 13:33:47 1999 Mark Mitchell - - * cse.c (dump_class): New function. - (invalidate_memory): Fix typo in comment. - * function.c (temp_slot): Add an alias set field. - (assign_stack_temp): Only reuse slots if they will have the - same alias set as before. - (combine_temp_slots): Don't combine if -fstrict-aliasing; - that's unsafe. - * rtl.c (copy_rtx): Copy all the flags (in particular, - MEM_SCALAR_P). - -Mon Feb 22 14:13:23 1999 Vladimir N. Makarov - - * configure.in (i[34567]86-*-linux-gnu*, - i[34567]86-*-linux-gnulibc1, i[34567]86-*-linux-gnuaout*, - i[34567]86-*-linux-gnuoldld*): Use fixinc.x86-linux-gnu as - fixincludes. - - * configure: Rebuilt. - - * fixinc.x86-linux-gnu: New script for fixing asm-statements bug - on x86 linux. - - * fixinc/fixinc.x86-linux-gnu: Copy of the previous one. - - * fixinc/mkfixinc.sh (i[34567]86-*-linux-gnu*, - i[34567]86-*-linux-gnulibc1, i[34567]86-*-linux-gnuaout*, - i[34567]86-*-linux-gnuoldld*): Use fixinc.x86-linux-gnu as - fixincludes. - -Mon Feb 22 08:55:05 1999 Ovidiu Predescu - - * objc/objc-act.c (encode_type): Temporary revert to the old - behavior of encoding types as the new one seems to break the - encoding of bitfields. - -Mon Feb 22 11:40:44 1999 Craig Burley -Sat Feb 20 09:59:36 1999 Craig Burley - - * Makefile.in (all.internal, all.cross): Depend on `doc' - target, to ensure docs get made before installation. - - Decrease spurious warnings from -fsyntax-only: - * stmt.c (expand_expr_stmt): Expand expr even when -fsyntax-only. - -Mon Feb 22 10:55:00 1999 Gavin Romig-Koch - - * c-lex.c (yylex): Replace warning about integer constants being - larger than long-longs, with a warning about integer constants - being larger than the largest target integer. - -Mon Feb 22 08:35:38 1999 Craig Burley - - Fix -fsyntax-only ICEs: - * varasm.c (assemble_zeros, assemble_variable, - output_constant_def): Do nothing when -fsyntax-only. - -Fri Feb 19 18:18:56 1999 Don Bowman - - * configure.in (mips*-*-vxworks*): Enable gthreads vxworks support. - * configure: Rebuilt. - -Sun Feb 21 20:34:44 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Feb 21 20:35:10 1999 Jeffrey A Law (law@cygnus.com) - - * config/aoutos.h (ASM_OUTPUT_CONSTRUCTOR): Delete. - (ASM_OUTPUT_DESTRUCTOR, ASM_OUTPUT_GC_ENTRY): Likewise. - * tm.texi: Update docs for constructors and destructors. - -Sun Feb 21 17:11:18 1999 Richard Henderson - - * genattrtab.c (check_attr_value): Allow negative const_int if - negative_ok. Accept integral arithmetic operators. Accept - direct references to other attributes. Accept symbol_ref in - non-constant attributes. - (max_attr_value): Add new argument `unknownp'. Update all callers. - (or_attr_value): Likewise. - (simplify_knowing): Don't optimize if max_attr_value unknown. - (write_length_unit_log): Likewise with or_attr_value. - (find_and_mark_used_attributes): Don't fallthru case. - (write_attr_set): Pass thru all non-cond expressions. - (write_attr_value): Handle symbol_ref, attr, and arithmetic. - -Sun Feb 21 13:16:44 1999 Michael Hayes - - * regmove.c (discover_flags_reg): Use word_mode instead of SImode. - -Sun Feb 21 13:15:40 1999 Richard Henderson - - * regmove.c (discover_flags_reg): Remove cc0 code. - (mark_flags_life_zones) [HAVE_cc0]: Force use of cc0; bail if - a potential flags register was identified. - -Sat Feb 20 16:16:07 1998 Franz Sirl - - * rs6000.md (scc plus ltu): Fix typo in last change. - -Sat Feb 20 09:08:44 1999 Richard Earnshaw (rearnsha@arm.com) - - * xm-arm.h (HOST_BITS_PER_LONGLONG): Define. - -Fri Feb 19 23:02:02 1999 Richard Henderson - - * regmove.c (discover_flags_reg): New function. - (flags_set_1, mark_flags_life_zones): New functions. - (regmove_optimize): Call them. - (fixup_match_1): Use insn modes rather than sets_cc0_p. - -Fri Feb 19 22:47:01 1999 J"orn Rennecke - - * rtlanal.c (insn_first_p): Fix return value for insn == reference. - - * loop.c (strength_reduce, check_final_value, check_dbra_loop): - Use loop_insn_first_p. - -Fri Feb 19 15:49:26 1999 Michael Meissner - David Edelsohn - - * rs6000.md (scc plus eq): Fix output template. - (scc plus ltu): Fix output template and collapse variants - correcting early clobbers. - (scc plus geu): Fix output template. - (scc plus gt): Fix output template. - (scc plus gtu): Fix output template and collapse variants. - -Fri Feb 19 15:43:59 1999 Kaveh R. Ghazi - - * cppinit.c (print_help): Remove unescaped newline in string. - -Fri Feb 19 19:55:06 1999 J"orn Rennecke - - * loop.c (strength_reduce): Check for intervening jumps when - converting biv increment to giv. - -Thu Feb 18 16:36:58 1999 Per Bothner - - * tree.def (TRY_FINALLY_EXPR, GOTO_SUBROUTINE_EXPR): New tree nodes, - * expr.c (expand_expr): Support new tree nodes. - -Fri Feb 19 10:17:56 1999 Andreas Schwab - - * config/m68k/m68k.c (m68k_align_loops_string, - m68k_align_jumps_string, m68k_align_funcs_string): Add const. - * config/m68k/m68k.h (m68k_align_loops_string, - m68k_align_jumps_string, m68k_align_funcs_string): Likewise. - -Thu Feb 18 23:28:35 1999 Kaveh R. Ghazi - - * bitmap.c (bitmap_print): Qualify a char* with the `const' keyword. - - * bitmap.h (bitmap_print): Likewise. - - * c-decl.c (builtin_function, grokdeclarator, grokfield): Likewise. - - * c-lang.c (build_objc_string): Likewise. - - * c-lex.c (yyerror, extend_token_buffer): Likewise. Don't include - limits.h or ctype.h. Remove unused variable `p'. - - * c-lex.h (yyerror): Qualify a char* with the `const' keyword. - - * c-pragma.c (handle_pragma_token): Likewise. - - * c-pragma.h (handle_pragma_token): Likewise. - - * c-tree.h (build_objc_string, builtin_function, grokfield, - build_indirect_ref, lvalue_or_else, readonly_warning, error_init, - pedwarn_init): Likewise. - - * c-typeck.c (convert_for_assignment, warn_for_assignment, - push_string, warning_init, incomplete_type_error, - build_indirect_ref, lvalue_or_else, readonly_warning, - build_c_cast, spelling, push_member_name, print_spelling, - error_init, pedwarn_init, start_init): Likewise. - - * objc/objc-act.c (build_objc_string): Likewise. - - * print-tree.c (print_node_brief, print_node): Likewise. - - * tree.h (lvalue_or_else, print_node, print_node_brief): Likewise. - -Thu Feb 18 20:44:21 1999 David Edelsohn - - * regclass.c (record_reg_classes): Correctly handle 'p' constraint. - -Thu Feb 18 19:59:37 1999 Marc Espie - - * configure.in :Handle OpenBSD platforms. - * configure: Rebuilt. - * config/openbsd.h: New file. - * config/xm-openbsd.h: New file. - * config/t-openbsd: New file. - * config/t-openbsd-thread: New file. - -Thu Feb 18 18:47:09 1999 Jeffrey A Law (law@cygnus.com) - - * function.c (assign_stack_temp_for_type): Round SIZE before calling - assign_stack_local for BLKmode slots. - -Fri Feb 19 01:45:06 1999 J"orn Rennecke - - * loop.c (strength_reduce): For derived givs, replace the - giv this was derived from with its new_reg. - (recombine_givs): Don't set new_reg for derived giv. - And don't print it, print SUM instead. - -Thu Feb 18 15:52:49 1999 Jim Wilson - - * m68kelf.h (ASM_RETURN_CASE_JUMP): Add 5200 support. - -1999-02-18 Zack Weinberg - - * cpplib.c: Kill define of STDC_VALUE. Don't include output.h - or prefix.h. Change CPP_IS_MACRO_BUFFER to not refer to - macro_cleanup. - (GET_ENV_PATH_LIST, PATH_SEPARATOR, STANDARD_INCLUDE_DIR, - predefs, SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, - CPP_WCHAR_TYPE, USER_LABEL_PREFIX, REGISTER_PREFIX, struct - cpp_pending, version_string, struct default_include, - include_defaults_array, path_include, cpp_options_init, - dump_special_to_buffer, initialize_builtins, cpp_start_read, - cpp_reader_init, nreverse_pending, push_pending, print_help, - cpp_handle_option, cpp_handle_options, cpp_finish, - cpp_cleanup): Move to cppinit.c. - (macro_cleanup, struct arglist, collect_expansion, - create_definition, compare_defs, comp_def_part, ARG_BASE, - struct argdata, macarg, change_newlines, timestamp, - monthnames, special_symbol, unsafe_chars, macroexpand, - push_macro_expansion): Move to cpphash.c. - (quote_string, check_macro_name, cpp_expand_to_buffer, - output_line_command, cpp_undef): Export. - (null_underflow, null_cleanup, handle_directive): Make static. - - * cpplib.h: Prototype now-exported functions. Adjust decls of - syntax tables so we can include cpplib.h in cppinit.c. - * cpphash.h: Prototype all functions exported by cpphash.c. - * cppinit.c: Make syntax tables initialized data if possible - (uses GCC designated-initializer extension). - * cppexp.c: Make cpp_lex static. - * Makefile.in: Move -D switches for the various include dirs - from cpplib.o rule to cppinit.o rule. Adjust dependencies. - -Thu Feb 18 13:15:56 1999 Marc Espie - - * alpha/openbsd.h: New file. - * alpha/xm-openbsd.h: New file. - * sparc/openbsd.h: New file. - * sparc/xm-openbsd.h: New file. - * m68k/openbsd.h: New file. - * m68k/xm-openbsd.h: New file. - * i386/openbsd.h: New file, originally from netbsd. - * i386/xm-openbsd.h: New file. - -1999-02-17 Zack Weinberg - - * Makefile.in: Correct dependencies for cpplib object files. - -Wed Feb 17 14:04:18 1999 Michael Meissner - - * rs6000.md ({add,sub}si3 `.'): Add alternatives to use CR other - than cr0. - -Wed Feb 17 16:59:28 1999 J"orn Rennecke - - * loop.c (strength_reduce): Don't move giv insn for biv turned giv - below scan_start. - -Wed Feb 17 10:56:24 1999 Kaveh R. Ghazi - - * tree.c (tree_node_kind_names, print_obstack_name, - get_identifier, maybe_get_identifier, build_string, - build_expr_wfl, is_attribute_p, lookup_attribute, - print_obstack_statistics, get_file_function_name_long, tree_check, - tree_class_check, expr_check): Qualify a char* with the `const' - keyword. - - * tree.h (get_identifier, maybe_get_identifier, build_string, - build_expr_wfl, is_attribute_p, lookup_attribute, - print_obstack_statistics, print_obstack_name, tree_check, - tree_class_check, expr_check): Likewise. - -Tue Feb 16 21:29:38 1999 Jeffrey A Law (law@cygnus.com) - - * i386/freebsd-elf.h, i386/gas.h, i386/linux.h: Fix minor spacing - errors. - - * calls.c (store_one_arg): Mark any slots used for the argument - as in-use immediately after we're done saving any slots which - will be overwritten by this argument. - -Tue Feb 16 21:02:07 1999 Anton Hartl - - * rs6000.md (call_value): Fix typo. - -Wed Feb 17 01:29:07 1999 J"orn Rennecke - - * loop.c (strength_reduce): Calculate maybe_dead before - calling recombine_givs. - -Wed Feb 17 00:43:12 1999 J"orn Rennecke - - * loop.c (strength_reduce): Dump biv increment -> giv conversions. - -Tue Feb 16 15:31:39 1999 Ovidiu Predescu - - * objc/objc-act.c (encode_type): Encode the type instead of - encoding the mode of the type (patch from Richard Frith-Macdonald - ). - -Tue Feb 16 10:53:51 1999 Richard Earnshaw (rearnsha@arm.com) - - * config/arm/arm.md (*zeroextractqi_compare0_scratch): Re-add load - instruction killed in previous change. Simplify mask generation. - (*zeroextractsi_compare0_scratch): Simplify mask generation. - -Tue Feb 16 09:52:26 1999 Nick Clifton - - * config/arm/arm.md (zeroextractqi_compare0_scratch): Ensure that - bitfield does not overflow a byte boundary. - -Tue Feb 16 01:37:33 1999 Charles G Waldman - - * c-common.c (shorten_compare): Get the min/max value from the - underlying type of an enumeration, not the enumerated type itself. - -Mon Feb 15 23:04:48 1999 Jeffrey A Law (law@cygnus.com) - - * jump.c: Include insn-attr.h. - (delete_computation): If reload has completed and insn scheduling - after reload is enabled, then do not depend on REG_DEAD notes. - * Makefile.in (jump.o): Depend on insn-attr.h. - -Mon Feb 15 16:57:38 1999 Richard Henderson - - * i386.md (addsi3): Allow lea for any constant_p. - -1999-02-15 Zack Weinberg - - * toplev.c (documented_lang_options): Remove -fident and - -fnoident, which are now handled by the language independent - option parser. - -1999-02-15 Zack Weinberg - - * c-common.c (UNGETC [USE_CPPLIB=1]): Do nothing if c is EOF. - * c-lex.c: Likewise. - * cpplib.c (cpp_push_buffer, cpp_pop_buffer): Use a linked - list in malloced memory for the buffer stack. - (cpp_get_token): Don't pop the last buffer off the stack. - Calls after CPP_EOF has been returned produce CPP_EOF with no - state change. - (cpp_finish): Pop last buffer here. - (do_line): Don't free ip->last_nominal_fname if it is equal to - ip->fname. - (special_symbol): If a T_CONST is the empty string, push a - single `@ ' escape instead. - (macroexpand): Special symbol buffers have escapes too. - * cpplib.h (struct cpp_buffer): Remove unused fields, add prev - buffer pointer. - (struct cpp_reader): Remove buffer_stack. Add - buffer_stack_depth. - (CPP_PREV_BUFFER, CPP_NULL_BUFFER): Buffer stack is now a - linked list. - -Mon Feb 15 14:44:53 1999 Kaveh R. Ghazi - - * cccp.c: Don't define HOST_WIDE_INT. Replace all occurrences of - WIDE_INT with WIDEST_INT. - - * cexp.y: Likewise. - Don't define unsigned_HOST_WIDE_INT, CHAR_BIT or - HOST_BITS_PER_WIDE_INT. Replace occurrences of PRINTF_PROTO_1() - style with PVPROTO() ATTRIBUTE_PRINTF_1 style macros. Replace - occurrences of "unsigned_HOST" with "unsigned HOST". Provide a - definition of variable `c89' when compiling a test binary and set it. - - * system.h: Don't define the PRINTF_PROTO_* macros. - -Mon Feb 15 11:33:51 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c (mark_loop_jump): Handle LO_SUM. If we encounter something - we do not understand, mark the loop and containing loops as invalid. - -Mon Feb 15 00:40:45 1999 J"orn Rennecke - - * alias.c (init_alias_analysis): Avoid self-referential value - when setting reg_known_value from REG_EQUAL notes. - -Sun Feb 14 23:12:10 1999 Richard Henderson - - * i386.c (legitimate_address_p): Verify modes of base and index. - -Sun Feb 14 23:01:28 1999 Richard Henderson - - * i386.c (legitimate_pic_address_disp_p): Remove static. - * i386.h (LEGITIMATE_PIC_OPERAND_P): Use it instead of - open-coding cases. - -Sun Feb 14 21:03:28 1999 Jeffrey A Law (law@cygnus.com) - - * except.c (start_catch_handler): Use emit_cmp_and_jump_insns. - * explow.c (probe_stack_range): Likewise. - * expmed.c (do_cmp_and_jump): Likewise. - * expr.c (store_expr, expand_expr, expand_builtin): Likewise. - (do_tablejump): Likewise. - * stmt.c (expand_expr_stmt, expand_end_case): Likewise. - (do_jump_if_equal, emit_case_nodes): Likewise. - * optabs.c (emit_cmp_and_jump_insns): Clarify comments. If UNSIGNEDP, - then convert comparison to an unsigned code before emitting the jump. - (expand_float, expand_fix): Use emit_cmp_and_jump_insns. - -Sun Feb 14 02:24:15 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Feb 14 01:15:04 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Feb 14 00:45:50 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c: Disable recent loop changes. Temporary as Joern - continues to fix problems. - -Sat Feb 13 23:29:42 1999 Richard Henderson - - * loop.c (combine_givs_used_by_other): Delete. - (combine_givs_benefit_from): Delete. - (combine_givs): Deny combination of givs only used once. Simplify - code with the death of combine_givs_benefit_from. - -Sun Feb 14 11:24:05 1999 Michael Hayes - - * loop.c (scan_loop): Call reg_in_basic_block_p before - loop_reg_used_before_p. - -Sat Feb 13 05:32:00 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.md: Use gen_rtx_FOO instead of gen_rtx (FOO, ...). - * arm.h: Likewise. - * arm.c: Likewise. - - * arm.h (TARGET_OPTIONS): Reformat for clarity. - (GO_IF_LEGITIMATE_ADDRESS): When generating PIC, references to symbols - in the constant pool aren't valid. - (LEGITIMATE_PIC_OPERAND_P): Likewise. - - * arm.c: Include "system.h", not stdio.h and string.h. - -Fri Feb 12 13:06:28 1999 Jim Wilson - - * stmt.c (expand_return): Return if optimize_tail_recursion succeeded. - (optimize_tail_recursion): Change return type from void to int. - Add return statements. - * tree.h (optimize_tail_recursion): Change prototype to match. - -Fri Feb 12 21:09:51 1999 J"orn Rennecke - - * reload.c (find_reloads_subreg_address): New function, broken out of - find_reloads_toplev. - (find_reloads_toplev, find_reloads_address_1): Use it. - -Fri Feb 12 13:20:52 1999 Jeffrey A Law (law@cygnus.com) - - * h8300.md (zero_extendhisi2 H8/300 variant): Correctly handle - extending a CONST_INT. - - * h8300.md (peephole for combining memrefs): Delete incorrect peephole. - -Fri Feb 12 18:29:11 1999 J"orn Rennecke - - * loop.c (loop_insn_first_p, biv_elimination_giv_has_0_offset): - New functions. - (maybe_eliminate_biv_1): Use biv_elimination_giv_has_0_offset. - -Fri Feb 12 16:56:10 1999 J"orn Rennecke - - * loop.c (load_mems): Don't guess how to do a load / store, use - emit_move_insn. - -Fri Feb 12 09:24:26 1999 Kaveh R. Ghazi - - * system.h: Provide a definition for HOST_WIDEST_INT, etc. - -Fri Feb 12 23:37:26 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_address_cost): Revert 9 Feb change. - -Fri Feb 12 00:51:26 1999 Jeffrey A Law (law@cygnus.com) - - * reload.c (find_reloads_address_1): Fix handling of an autoincremented - pseudo which is homed in the stack. - - * mips.c (save_restore_insns): Fix loop to save/restore FP registers. - (compute_frame_size): Change loop over FP regs to be consistent - with the loop in save_restore_insns. - -Thu Feb 11 17:38:40 1999 Jim Wilson - - * i960/i960.h (OVERRIDE_OPTIONS): Warn if -mlong-double-64 is used. - (LONG_DOUBLE_TYPE_SIZE): Undef then unconditionally define to 96. - -Thu Feb 11 15:11:35 1999 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (bset); Re-enable. - -Thu Feb 11 15:20:49 1999 J"orn Rennecke - - * sh.md (is_sfunc): New attribute. - * sh.h (INSN_SETS_ARE_DELAYED, INSN_REFERENCES_ARE_DELAYED): Use it. - -Thu Feb 11 01:06:49 1999 Nathan Sidwell - - * fold-const.c (range_binop): Take account of the bounded nature - of fixed length arithmetic when comparing unbounded ranges. - -Thu Feb 11 00:08:17 1999 John Wehle (john@feith.com) - - * function.c (assign_stack_temp_for_type): Clear best_p - when an exact match is found. - - * i386.h (LOCAL_ALIGNMENT): Define. - * function.c (assign_stack_local, assign_outer_stack_local): Use it. - (assign_stack_temp_for_type): New function based on assign_stack_temp. - (assign_stack_temp): Call it. - (assign_temp): Use assign_stack_temp_for_type, not assign_stack_temp. - * stmt.c: Use assign_temp, not assign_stack_temp. - * tm.texi: Document LOCAL_ALIGNMENT. - -Wed Feb 10 23:28:28 1999 Jeffrey A Law (law@cygnus.com) - - * reorg.c: Finish deleting half-deleted comment. - -Wed Feb 10 17:12:21 1999 Jim Wilson - - * emit-rtl.c (operand_subword): Sign extend REAL_VALUE_TO_TARGET_SINGLE - result. - * final.c (split_double): Sign extend REAL_VALUE_TO_TARGET_DOUBLE - result. - * real.c (endian): Delete sign extension code. - * config/m32r/m32r.md (movsf_insn+1): REAL_VALUE_TO_TARGET_SINGLE call - replaced with operand_subword call. - -Wed Feb 10 15:16:39 1999 Richard Henderson - - * alpha.md (cmov compound patterns): Delete. Jump can now - create the correct constructs in the first place. - -Wed Feb 10 11:03:22 1999 Richard Henderson - - * configure.in (alphaev6*): Fix typo in target_cpu_default2. - -Wed Feb 10 13:59:18 1999 Dave Brolley - - * mbchar.c (local_mb_cur_max): Handle the case where MB_CUR_MAX is 0. - -Wed Feb 10 10:35:05 1999 Jim Wilson - - * tmp-emsgids.c: Delete. - -Wed Feb 10 09:57:08 1999 Mark Mitchell - - * rtlanal.c (for_each_rtx): Fix declaration to conform to GNU - coding standards. - -Wed Feb 10 10:09:41 1999 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (bset, bclr): Operand 0 is a read/write operand. - - * reload1.c (reload_combine_note_store): Second argument is no - longer unused/ignored. Handle multi-register hard regs. - (move2add_note_store): Simplify. - -Wed Feb 10 10:05:23 1999 Mumit Khan - - * collect2.c (collect_execute): Remove cygwin-specific code. - -Tue Feb 9 17:27:29 1999 Nathan Sidwell - - * system.h (_, N_): Remove dummy i18n macros. - * protoize.c: Move inclusion of intl.h to after system.h. - * cexp.y: Include intl.h. - * cexp.c: Rebuilt. - -Tue Feb 9 16:52:22 1999 Mumit Khan - - * i386/cygwin.h (SUBTARGET_OVERRIDE_OPTIONS): New macro to ignore - fpic/fPIC for windows32 targets. - * i386/xm-cygwin.h (GET_ENV_PATH_LIST): Replace '\\' in windows32 - paths with '/'. - * i386/mingw32.h (CPP_SPEC): Define. - (CPP_PREDEFINES): Add MINGW32 version id. - * i386/crtdll.h (CPP_PREDEFINES): Likewise. - - * Makefile.in (collect2$(exeext)): Delete redundant dependency and - add missing exeext to target. - - * gcc.c (convert_filename): Handle null filename argument. - -Wed Feb 10 15:46:10 1999 Michael Hayes - - * config/c4x/c4x.md (*movhf_noclobber, *movhi_noclobber): Use - m constraint instead of QT. - -1999-02-09 Brendan Kehoe - - * cpplib.c (special_symbol): Move IP to be declared in function - scope, rather than individual case statements. - -1999-02-09 Zack Weinberg - - * cppfiles.c (finclude): Handle pipes properly under old BSD - derivatives. - -1999-02-09 Melissa O'Neill - - * system.h: Provide fallback definitions for S_ISCHR, - S_ISSOCK, S_ISFIFO, O_NONBLOCK, and O_NOCTTY. - -1999-02-09 Zack Weinberg - - * cpplib.c (do_define): Allow redefining __STDC__ with -D. - -1999-02-09 Jim Blandy - - * configure.in: For PowerPC configurations, accept "401", "ec603e", - "740", and "750" as valid arguments to --with-cpu. - * configure: Rebuilt. - -Tue Feb 9 00:00:14 1999 Mark Kettenis - - * configure.in (i[34567]86-*gnu*): Set float_format to i386. - * configure: Rebuilt. - -Mon Feb 8 22:38:24 1999 Jeffrey A Law (law@cygnus.com) - - * rs6000.md: Revert "alternate use of crs if cr0 not available" - patches from 01-22-1999, 01-24-1999, 01-26-1999, and 02-08-1999. - -Mon Feb 8 21:36:44 1999 Richard Henderson - - * output.h (current_function_has_computed_jump): Rename from - current_function_addresses_labels. - * function.h (struct function): Likewise for addresses_labels member. - * rtl.h (FUNCTION_FLAGS_HAS_COMPUTED_JUMP): Likewise. - * function.c (current_function_has_computed_jump): Likewise. - Update all references. - * integrate.c (function_cannot_inline_p): - Test current_function_has_computed_jump instead of addresses_labels. - (initialize_for_inline): Likewise save. - (output_inline_function): Likewise restore. - - * expr.c (expand_expr): Don't reference addresses_labels variables. - * stmt.c (expand_computed_goto): Set has_computed_jump. - -1999-02-08 Michael Meissner - - This is being installed only to get it into the repository to help - with the revert, resubmit & review process for the massive rs6000.md - changes. - * rs6000.md (andsi3_internal1 splitter): Don't split if using the - rlwinm instruction. - (anddi3_internal1): Likewise. - (andsi3_internal{2,3}): Correct some insn lengths. - (anddi3*): Restore missing TARGET_POWERPC64, and don't emit old - mnemonics. - -Mon Feb 8 21:31:06 1999 Richard Henderson - - * loop.c (reg_single_usage): New file-scope variable ... - (scan_loop): ... moved out of here. Always initialize. - Test loop_has_call instead of reg_single_usage not zero. - Free reg_single_usage after strength reduction. - (count_loop_regs_set): Assume single_usage nonzero. - (combine_givs_used_by_other): Test reg_single_usage. - (load_mems_and_recount_loop_regs_set): Remove reg_single_usage - as a parameter. Assume nonzero. - -1999-02-08 Zack Weinberg - - * cpplib.c (special_symbol): Rewrite. Don't copy things - multiple times. Handle __STDC__ specially. T_CONST - indicates a constant /string/. Don't handle T_*_TYPE and - T_SPEC_DEFINED. Use cpp_buf_line_and_col instead of - adjust_position. Determine the file buffer only if needed. - (initialize_builtins): Handle __SIZE_TYPE__, - __PTRDIFF_TYPE__, __WCHAR_TYPE__, __USER_LABEL_PREFIX__, and - __REGISTER_PREFIX__ with T_CONST special hashtab entries. - Don't provide __OBJC__; the driver does that. Provide - __STDC_VERSION__, using T_CONST. Use T_STDC for - __STDC__. Give install the length of all symbols defined. - (eval_if_expression): Drop code to insert and remove the - "defined" special symbol. - - * cpplib.h: Remove SELF_DIR_DUMMY (no longer used). Remove - T_*_TYPE and T_SPEC_DEFINED from enum node_type; add T_STDC. - - * cpphash.c (install): Drop the `ivalue' parameter. Constify - the `value' parameter. All callers changed. - * cpphash.h (install): Change prototype to match. - (union hashval): Remove `ival' member. - * cppexp.c (cpp_lex): Handle `defined' here. - -Mon Feb 8 17:29:42 1999 Jeffrey A Law (law@cygnus.com) - - * pa.h (EXTRA_CONSTRAINT): Fix comment. - -Mon Feb 8 18:57:45 1999 Vladimir N. Makarov - - * c-typeck.c (check_init_type_bitfields): Use nonincremental - initialization of unions whose first member is a bitfield. - Remove unnecessary code for checking the declaration mode - after DECL_C_BIT_FIELD. - - * varasm.c (output_constructor): Additional comment about the - constructor of bitfield union initialization. - -Tue Feb 9 11:55:04 1999 Michael Hayes - - * config/c4x/c4x.md (*movhi_stik): New pattern. - (movhi): Allow some immediate constants to be directly - stored in memory. - -Tue Feb 9 11:34:15 1999 Michael Hayes - - * config/c4x/c4x.md (all call patterns): Add constraints "Ur". - (call, call_value): Force address into a register if not valid - for a call instruction. - (load_immed_address): Emit a USE of the SYMBOL_REF that is - forced into memory. - * config/c4x/c4x.c (c4x_print_operand): Fix 'C' and 'U' modifiers. - -Tue Feb 9 11:08:41 1999 Michael Hayes - - * config/c4x/c4x.c (call_address_operand, symbolic_address_operand): - Rename from call_operand and symbolic_operand respectively. All - callers changed. - * config/c4x/c4x.md (call_address_operand, symbolic_address_operand): - Likewise. - * config/c4x/c4x.h (call_address_operand, symbolic_address_operand): - Likewise. - (PREDICATE_CODES): Allow CONST, LABEL_REF for call_address_operand. - -Tue Feb 9 10:52:27 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_legitimize_address): Don't generate a - LO_SUM address for HImode or HFmode but instead force address into - a register so that it is offsettable. - (c4x_emit_move_sequence): Handle LO_SUM immediate address. - -Tue Feb 9 10:46:42 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_address_cost): Return cost of 1 for - REG+REG addressing if strength reduction enabled. - -Tue Feb 9 10:10:31 1999 Michael Hayes - - * config/c4x/t-c4x (LIBGCC2_CFLAGS): Delete. - (TARGET_LIBGCC2_CFLAGS): Define. - -1999-02-08 Nick Clifton - - * config/v850/v850.md: Replace \\n\\t with \\; - - * config/v850/v850.md: Enforce TARGET_LONG_CALLS option. - * config/v850/v850.c (construct_restore_jr, construct_save_jarl): - Enforce TARGET_LONG_CALLS option. - -Mon Feb 8 11:43:07 1999 Donn Terry - - * real.c (PUT_REAL) [XFmode]: Zero the balance of the structure. - -Mon Feb 8 11:37:24 1999 Marc Espie (espie@cvs.openbsd.org) - - * m88k/t-luna-gas: Remove bash dependency. - -Mon Feb 8 11:34:44 1999 Graham - - * collect2.c (xrealloc): Fix typo in last change. - -Mon Feb 8 09:13:38 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Feb 7 22:18:42 1999 Robert Lipe - - * tree.h (TYPE_CHECK): Make it clear to the preprocessor - that we do not want macro replacement within a character constant. - (TYPE_CHECK1): Likewise. - -Sun Feb 7 15:37:10 1999 Jason Merrill - - * tree.h (DECL_P): New macro. - -Sun Feb 7 01:15:04 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Feb 6 18:14:46 1999 Jeffrey A Law (law@cygnus.com) - - * mn10300.md (reload_insi): Do not earlyclobber the output operand. - - * README.g77, gcc.c, gcc.texi: Update email addresses. - * invoke.texi system.h: Likewise. - -Sat Feb 6 11:04:08 1999 Jim Wilson - - * unroll.c (find_splittable_givs): After express_from, call replace_rtx - to convert dest_reg to new_reg. - -Sat Feb 6 10:31:35 1999 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload_combine_note_store): Be more careful with - STRICT_LOW_PART, ZERO_EXTRACT and SIGN_EXTRACT. - (move2add_note_store): Likewise. - -Sat Feb 6 10:18:01 1999 Kaveh R. Ghazi - - * cppfiles.c (read_and_prescan): Cast the result of `xrealloc' to - U_CHAR* when assigning to one. Ensure the values of a ?: operator - have the same type. - - * cppinit.c (initialize_char_syntax): Use K&R function definition. - -Sat Feb 6 11:17:03 1999 Richard Earnshaw - - Support for ARM9 - * config/arm/arm.c (all_procs): Add arm9 and arm9tdmi. - * config/arm/arm.h ((TARGET_CPU_arm9, TARGET_CPUD_arm9tdmi): Define. - (TARGET_CPU_DEFAULT): Rework to support ARM9. - (CPP_CPU_ARCH_SPEC): Likewise. - (enum processor_type): Likewise. - * config/arm/arm.md (attr cpu): Add arm9. - - General scheduling changes - * config/arm/arm.c (MAX_INSNS_SKIPPED): Delete. - (max_insns_skipped): New variable. - (arm_override_options): If generating hard floating point code for - the FPA, emit code for version 3. - When optimizing for space, don't synthesize constants. - Reword several flags based on the requested processor and optimization - level. - (use_return_insn): New argument iscond, all callers changed. Don't - use a return insn if it will be conditional and that would be - expensive; eg on StrongARM. - (arm_adjust_cost): Anti- and output- dependencies normally have no - cost. - (load_multiple_sequence): Newer ARMs don't benefit from ldm if - the sequence is short. - (final_prescan_insn): Use max_insns_skipped instead of - MAX_INSNS_SKIPPED. Note whether we will make a return instruction - conditional, and aviod this if it would be expensive. - * config/arm/arm.md (scheduling attributes and function units): - Rewrite to better describe ARM8, 9 and StrongARM. - - * config/arm/arm.md (*movhi_insn_littleend): Make op0 predicate - s_register_operand. - (*ifcompare_plus_move): Use arm_rhs_operand in place of - arm_rhsm_operand. Rework constraints. - (*if_plus_move): Likewise. - (*ifcompare_move_plus): Likewise. - (*if_move_plus): Likewise. - (*ifcompre_arith_move): Likewise. - (*if_arith_move): Likewise. - (*ifcompare_move_arith): Likewise. - (*if_move_arith): Likewise. - - * config/arm/xm-netbsd.h: Don't include arm/xm-arm.h. - -1999-02-05 Michael Meissner - - * loop.c (check_dbra_loop): A store using an address giv for which - we have no life information is not reversible. - -Fri Feb 5 17:08:01 1999 Dave Brolley - - * function.c (fixup_var_refs): Scan catch_clauses too. - -Fri Feb 5 11:49:49 1999 Benjamin Kosnik - - * c-common.c (decl_attributes): Fix reserved space for init_priority. - * tree.h (MAX_RESERVED_INIT_PRIORITY): New macro. - -Fri Feb 5 12:37:05 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c (strength_reduce): Clear not_every_iteration when - passing the NOTE_INSN_LOOP_CONT note. - - * haifa-sched.c (add_dependence): Do not add a dependency on a - note. - -Fri Feb 5 10:55:43 1999 Nick Clifton - - * recog.c (split_block_insns): Only call update_flow_info if - instruction scheduling is enabled. - -1999-02-05 Zack Weinberg - - * Makefile.in (gen-protos): Use libcpp.a like everyone else. - -Fri Feb 5 07:09:29 1999 J"orn Rennecke - - * loop.c (first_loop_store_insn): New file-scope variable. - (prescan_loop): Set it. - (check_dbra_loop): Check if a store depends on a register - that is set after the store. - -Fri Feb 5 06:55:15 1999 J"orn Rennecke - - * unroll.c (entire file): Remove tabs / spaces at end of lines. - Replace spaces with tabs where appropriate. - -Thu Feb 4 15:12:41 1999 J"orn Rennecke - - * loop.c (scan_loop): New argument loop_cont. Changed caller. - (strength_reduce): New argument loop_cont. Changed caller. - Before clearing not_every_iteration after a label, check if - we are not already past LOOP_CONT. - -1999-02-04 Zack Weinberg - - * cpperror.c (cpp_print_containing_files): Fix formatting - bug induced by merge. - -1999-02-04 Zack Weinberg - - * cpplib.c (initialize_char_syntax): Move to cppinit.c. - (cpp_define): Remove redundant syntax checks. - (make_assertion): Rename cpp_assert, remove redundant syntax - checks, export. - (cpp_options_init): Don't init things to zero twice. - (cpp_expand_to_buffer): Use memcpy, not a char-by-char loop. - (do_include): Kill excessively verbose #import warning that - snuck back in in the gcc2 merge. - (convert_string): Removed. - (do_line): Rewrite with simple last-name-used cache instead of - private hashtable. - (cpp_start_read): Call initialize_char_syntax here, not... - (cpp_reader_init): ...here. - (cpp_handle_options): Support the -std switch. - * cpplib.h (cpp_buffer): Add last_nominal_fname member. - (cpp_options): Add c9x flag. - Declare all the is_* tables and trigraph table here, as const. - Prototype cpp_assert and initialize_char_syntax. - * cppinit.c: New file. - * cppfiles.c (read_and_prescan): Optimize. - * Makefile.in (LIBCPP_OBJS): Add cppinit.o. - -Thu Feb 4 10:46:30 1999 Gavin Romig-Koch - - * config/mips/mips.md ([u]divmodsi4,[u]divmoddi4,[u]divsi3,[u]divdi3, - [u]modsi3,[u]moddi3) : Don't copy the "zero" argument to a register - before calling gen_div_trap. - -Wed Feb 3 21:56:27 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (hppa1.1-*-*, hppa2*-*): Use symbolic value rather - than numeric value for target_cpu_default.. - * configure: Rebuilt. - -Wed Feb 3 21:55:56 1999 Marc Espie - - * Makefile.in (xgcc$(exeext)): Remove choose-temp, pexecute and - mkstemp. Get them from libiberty. - (COLLECT2_OBJS): Similarly for choose-temp, cplus-dem and mkstemp. - (PROTO_OBJS): Similarly for choose-temp, getopt, getopt1 and pexecute. - (cplus-dem.o, pexecute.o, choose-temp.o): Remove build rules. - (mkstemp.o, getopt1.o, getopt.o): Likewise. - - * pa-gas.h (TARGET_DEFAULT): Use symbolic values rather than numeric - values. - * pa-hpux.h (LINK_SPEC): Likewise. - * pa-hpux10.h (LINK_SPEC): Likewise. - * pa-hpux9.h (LINK_SPEC): Likewise. - * pa-osf.h (LINK_SPEC): Likewise. - * pa-pro.h (TARGET_DEFAULT): Likewise. - * pa1.h (TARGET_DEFAULT): Likewise. - * pa.h (MASK_*): New defines. - (TARGET_*): Use symbolic values rather than numeric values. - (TARGET_SWITCHES): Likewise. - (TARGET_DEFAULT): Likewise. - (CPP_SPEC): Likewise. - -Wed Feb 3 21:07:38 1999 Bernd Schmidt - - * reload1.c (reload_cse_regs_1): Undo Jan 16 patch. - * reload.c (find_reusable_reload): New function, broken out of - push_reload. Add code to verify that none of the involved - outputs are subject to earlyclobbers. - (push_reload): Break out new function find_reusable_reload. - Delete "register" keyword for IN, OUT args. - -Wed Feb 3 15:51:04 1999 Gavin Romig-Koch - - * config/mips/mips.c (true_reg_or_0_operand) : New function. - * config/mips/mips.h (PREDICATE_CODES): Add true_reg_or_0_operand. - * config/mips/mips.md (div_trap,div_trap_normal,div_trap_mips16): - Use true_reg_or_0_operand for div_trap. - -Wed Feb 3 20:44:59 1999 J"orn Rennecke - - * loop.h (express_from): Declare. - (struct induction): Replace derived flag with derived_from pointer. - * loop.c (strength_reduce, record_giv, recombine_givs): Likewise. - (express_from): No longer static. - * unroll.c (find_splittable_givs): Replace derived with derived_from. - When processing an address giv with which another giv has been - combined that has also been derived from a third giv, handle like - having combined with the third giv. - Set splittable_regs_updates appropriately for derived givs. - -Wed Feb 3 15:26:58 1999 Gavin Romig-Koch - - * config/mips/mips.md (div_trap_mips16): Remove nop's after branches. - -Wed Feb 3 11:56:23 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (insn_sets_and_refs_are_delayed): New function. - * pa.h (INSN_SETS_ARE_DELAYED): Use it. - (INSN_REFERENCES_ARE_DELAYED): Likewise. - -Wed Feb 3 06:24:49 1999 Richard Earnshaw (rearnsha@arm.com) - - * config/arm/t-arm-elf (LIBGCC2_CFLAGS): Delete. - * config/arm/t-linux (LIBGCC2_CFLAGS): Delete. - (TARGET_LIBGCC2_CFLAGS): Define. - (LIBGCC2_DEBUG_CFLAGS): Define. - * config/arm/t-netbsd: Likewise. - * config/arm/t-semi: Likewise. - * config/arm/t-semiaof: Likewise. - * config/arm/t-riscix: Likewise. - -Wed Feb 3 10:59:07 1999 Andreas Schwab - - * config/m68k/m68k.c (print_operand_address): When printing a - SYMBOL_REF that ends in `.' put parentheses around it. - -Tue Feb 2 23:38:35 1999 David O'Brien - - * i386/freebsd*.h now allows '$' in label names and does not use the - PCC struct return method. - -Tue Feb 2 22:38:23 1999 Jim Wilson - - * Makefile.in: Change all uses of AR to AR_FOR_TARGET. Change all uses - of HOST_AR to AR. Likewise for AR_FLAGS, RANLIB, and RANLIB_TEST. - (RANLIB_TEST): Test to see if ranlib exists. Only test absolute file - names if host == target. - (HOST_AR, HOST_AR_FLAGS, HOST_RANLIB, HOST_RANLIB_TEST): Delete. - (AR_FLAGS_FOR_TARGET): Renamed from AR_FOR_TARGET_FLAGS. - (AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): Delete rules - setting them to *_FOR_TARGET. - * cross-make (AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): - Delete. - -Tue Feb 2 22:38:19 1999 Theodore Papadopoulo - - * toplev.h (read_integral_parameter): Declare. - * toplev.c (read_integral_parameter): New function. - -Fri Jan 29 21:00:56 1999 Bob Manson - - * resource.c, resource.h: New files. - * Makefile.in (OBJS): Add it. - - * haifa-sched.c (regno_use_in): Moved to rtlanal.c. - (split_block_insns): Moved to recog.c. - (update_flow_info): Make public. - * rtl.h: Declare them. - - * reorg.c: Moved the functions dealing with computing resource - usage to resource.c. - - * sched.c (regno_use_in): Moved to rtlanal.c. - (update_flow_info): Make public. - (schedule_insns): Use split_block_insns. - - * recog.c (split_block_insns): New function. - -Tue Feb 2 22:03:26 1999 David Edelsohn - - * rs6000/linux.h (LINK_START_DEFAULT_SPEC): Delete, unused. - (LINK_OS_DEFAULT_SPEC): Delete, unused. - -Tue Feb 2 20:29:34 1999 Catherine Moore - - * configure.in (arm-*-oabi): Support. - * configure: Regenerate. - * config/arm/unknown-elf-oabi.h: New file. - -Tue Feb 2 19:43:59 1999 Jeffrey A Law (law@cygnus.com) - - * i386.md (ashlsi3): Turn into a define_expand an anonymous pattern. - Make the anonymous pattern match when ! optimize_size. - (ashlsi3 size optimizer): New pattern. - - * intl/Makefile.in (uninstall): Add missing "; \". - -Tue Feb 2 18:21:23 1999 Stan Cox - - * sparc.h (TARGET_CPU_sparc86x): Added. TARGET_CPU_sparclite86x - synonym. - -Tue Feb 2 20:24:11 1999 J"orn Rennecke - - * loop.c (loop_optimize): Fix value max_uid_for_loop is reset - to after find_and_verify_loops call. - -Tue Feb 2 19:48:29 1999 J"orn Rennecke - - * (recombine_givs): Don't use a giv that's likely to be dead to - derive others. - - * loop.c (recombine_givs): Fix test for lifetime overlaps / loop - wrap around when deriving givs. - -Mon Feb 1 20:00:40 1999 Richard Henderson - - * recog.c (check_asm_operands): Treat indeterminate operand ok - results as success. Try harder to resolve a matching constraint. - * stmt.c (expand_asm_operands): Recognize when an output operand's - constraint does not allow memory. Treat indeterminate operand ok - results as failure. Try harder to resolve a matching constraint. - -Mon Feb 1 15:00:02 1999 Ken Raeburn - - Use varrays for constant-equivalence data: - - * varray.h (struct const_equiv_data): New type. - (union varray_data_tag): New element const_equiv. - (VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV): New macros. - (VARRAY_SIZE): New macro, returns number of elements. - * integrate.h: Include varray.h. - (struct inline_remap): Replace const_equiv_map, const_age_map and - const_equiv_map_size with a const_equiv_varray element. - (MAYBE_EXTEND_CONST_EQUIV_VARRAY): New macro; grows varray if - needed. - (SET_CONST_EQUIV_DATA): New macro; sets rtx and age fields - simultaneously, growing the varray if needed. - - * integrate.c (global_const_equiv_map, - global_const_equiv_map_size): Deleted, replaced by.... - (global_const_equiv_varray): New variable. - (expand_inline_function): References changed. - * integrate.h: Update declarations. - - * integrate.c (process_reg_parm, expand_inline_function, - copy_rtx_and_substitute, try_constants, subst_constants, - mark_stores): Use varray allocation and accessor macros, new - integrate.h macros, and global_const_equiv_varray. Don't - conditionalize non-NULL stores on array size; instead, expand the - array as needed. - * unroll.c (unroll_loop): Likewise. - - * unroll.c (unroll_loop): Initialize const_equiv_varray element to - zero. After allocating varray, always exit through bottom of - function, where it can be deallocated if needed. Don't explicitly - reallocate const_equiv_map storage; instead, just ensure the - varray has been initialized, and update the global reference. - -Mon Feb 1 09:40:25 1999 Kaveh R. Ghazi - - * system.h (inline, const): Handle these for stage2 (and later) gcc. - - * dwarf2out.c (inline): Don't define. - - * dwarfout.c (inline): Likewise. - -Sun Jan 31 22:04:37 1999 Richard Henderson - - * loop.c (recombine_givs): Dump recombination and derivation data. - -Sun Jan 31 20:34:29 1999 Zack Weinberg - - * flags.h: Declare flag_no_ident. - * toplev.c: Define flag_no_ident. Process -f(no-)ident here. - * c-tree.h: Don't declare flag_no_ident. - * c-decl.c: Don't define flag_no_ident. Don't process - -f(no-)ident switches here. - - * config/elfos.h (ASM_FILE_END): Output final .ident directive - only if !flag_no_ident. - * config/ptx4.h: Likewise. - * config/svr4.h: Likewise. - * config/alpha/elf.h: Likewise. - * config/arm/linux-elf.h: Likewise. - * config/i386/sco5.h: Likewise. - * config/i860/fx2800.h: Likewise. - * config/mips/gnu.h: Likewise. - * config/i386/osfrose.h: Likewise. - - * gcc.c (C specs): Map -Qn to -fno-ident. - * objc/lang-specs.h: Likewise. - -Mon Feb 1 10:52:07 1999 Michael Hayes - - * configure.in: Don't remove loop.o and unroll.o when - enable-haifa is selected. - * configure: Rebuilt. - -Sun Jan 31 13:22:02 1999 John Wehle (john@feith.com) - - * i386.md (movsicc, movhicc, movsfcc, movdfcc, - movxfcc, movdicc): Delete unconstrained alternatives. - * i386.c (output_fp_conditional_move, - output_int_conditional_move): Delete unused case. - -Sun Jan 31 01:15:04 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Jan 31 00:52:37 1999 Richard Henderson - - * alpha.md (mov patterns): Emit the assembler aliases mov and fmov - instead of bis and cpys. Combine alternatives where possible. - -Sat Jan 30 23:14:13 1999 Kaveh R. Ghazi - - * gcov.c (fnotice): Add missing FILE* parameter. - (function_summary): Fix format specifiers in calls to `fnotice'. - (output_data): Likewise. - - * toplev.c (fnotice): Constify char* parameter. - - * toplev.h (fnotice): Add prototype. - Wrap prototype with BUFSIZ to protect FILE* usage. - -Sun Jan 31 15:33:09 1999 Michael Hayes - - * config/c4x/c4x.h (RTX_COSTS): Explicitly define c4x costs. - -Sat Jan 30 08:27:23 1999 Jeffrey A Law (law@cygnus.com) - - * combine.c (distribute_notes): Handle REG_EH_REGION notes. - - * alias.c (fixed_scalar_and_varying_struct_p): Add "static" to - function definition. - (aliases_everything_p, write_dependence_p):Likewise. - - * install.texi: Fix merge lossages. - - * cccp.c (main): Only call setlocale (LC_MESSAGES, ...) if LC_MESSAGES - is defined. - * collect2.c (main): Likewise. - * cppmain.c (main): Likewise. - * gcc.c (main): Likewise. - * gcov.c (main): Likewise. - * protoize.c (main): Likewise. - * toplev.c (main): Likewise. - - * pa.md (parallel shift and shiftadd): Mark output of shift as an - earlyclobber. - - * loop.c: Disable recent loop changes. Temporary as Joern - continues to fix problems. - -Sat Jan 30 03:24:37 1999 J"orn Rennecke - - * loop.c (strength_reduce): Size reg_map according to reg_iv_type. - -Fri Jan 29 18:26:07 1999 Dave Brolley - - * emit-rtl.c (remove_insn): New function. - * rtl.h (remove_insn): Add prototype. - * function.c (reposition_prologue_and_epilogue_notes): Call remove_insn. - -Fri Jan 29 22:34:41 1999 J"orn Rennecke - - * loop.c (recombine_givs): Don't try to derive givs that have combined. - -Fri Jan 29 15:00:39 1999 Kaveh R. Ghazi - - * toplev.c (notice, fnotice): Check ANSI_PROTOTYPES, not __STDC__, - when declaring arguments and calling va_arg() to initialize them. - - * collect2.c (notice): Likewise. - - * loop.c (find_life_end): Use PROTO() macro in the prototype. - -Fri Jan 29 14:36:11 1999 Kaveh R. Ghazi - - * collect2.c (error): Fix typo in declaration. - - * cpperror.c (cpp_message): Likewise. - - * cpplib.c (cpp_warning): Likewise. - - * cpplib.h (cpp_notice): Use PVPROTO not VPROTO, also add - ATTRIBUTE_PRINTF_1. - - * toplev.c (error): Fix typo in declaration. - -Fri Jan 29 15:44:13 1999 J"orn Rennecke - - * loop.c (strength_reduce): Fix HAVE_cc0 handling when scanning - forward from cont dominator. - -Fri Jan 29 07:10:27 1999 Kaveh R. Ghazi - - * cccp.c (eprint_string): Constify a char*. - (notice): Likewise. Use PVPROTO not VPROTO, add ATTRIBUTE_PRINTF_1. - (vnotice): Constify a char*. - (error): Likewise. Use PVPROTO not VPROTO, add ATTRIBUTE_PRINTF_1. - (verror): Constify a char*. - (warning): Likewise. Use PVPROTO not VPROTO, add ATTRIBUTE_PRINTF_1. - (vwarning): Constify a char*. - (error_with_line): Likewise. Use PVPROTO not VPROTO, add - ATTRIBUTE_PRINTF_2. - (verror_with_line): Constify a char*. - (vwarning_with_line): Likewise. - (warning_with_line): Likewise. Use PVPROTO not VPROTO, add - ATTRIBUTE_PRINTF_2. - (pedwarn): Constify a char*. Use PVPROTO not VPROTO, add - ATTRIBUTE_PRINTF_1. - (pedwarn_with_line): Likewise with ATTRIBUTE_PRINTF_2. - (pedwarn_with_file_and_line): Likewise with ATTRIBUTE_PRINTF_4. - Also correct typo in parameter name declaration. - (make_assertion): Constify a char*. - (quote_string_for_make): Likewise. - (deps_output): Likewise. - (fatal): Likewise. Use PVPROTO not VPROTO, add - ATTRIBUTE_PRINTF_1. Use ATTRIBUTE_NORETURN not an explicit - "__attribute__ ((noreturn))". - (fancy_abort): Likewise for ATTRIBUTE_NORETURN. - (pfatal_with_name): Likewise. - (pipe_closed): Likewise. - (memory_full): Likewise. - -Fri Jan 29 00:14:55 1999 J"orn Rennecke - - * loop.c (strength_reduce): Grow set_in_loop / n_times_set / - may_not_optimize to proper size when converting biv increments - into givs. - If necessary, reallocate reg_iv_type / reg_iv_info before calling - recombine_givs. - -Thu Jan 28 23:24:08 1999 J"orn Rennecke - - * loop.c (recombine_givs): New parameter unroll_p. If set, don't - generate complex adds. Changed caller. - Don't generate adds that cost more than the original one. - (strength_reduce): Warning fixes. - -Thu Jan 28 09:41:11 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (hppa1.0-hp-hpux10*): Use t-pa. - * configure: Rebuilt. - -Wed Jan 27 23:39:53 1999 J"orn Rennecke - - * rtl.h (insn_first_p, no_jumps_between_p): Declare. - * rtlanal.c (insn_first_p, no_jumps_between_p): New function. - * loop.h (varray.h): Include. - (struct induction): Change combined_with to unsigned. - New members derived, ix and last_use. - (reg_iv_type, reg_iv_info): Now varray_type. All references changed. - (REG_IV_TYPE, REG_IV_INFO): Define. - (first_increment_giv, last_increment_giv): Declare. - * loop.c (loop_number_loop_cont): New static variable. - (loop_number_cont_dominator): Likewise. - (reg_iv_type, reg_iv_info): Now varray_type. - (first_increment_giv, last_increment_giv): New variables. - (compute_luids, verify_dominator, find_life_end): New functions. - (cmp_recombine_givs_stats, recombine_givs): Likewise. - (loop_optimize): Allocate loop_number_loop_cont and - loop_number_cont_dominator. Use compute_luids. - (find_and_verify_loops): Initialize loop_number_loop_cont and - loop_number_cont_dominator. - (strength_reduce): Try to find bivs that can be expressed as givs - of another biv, and to convert biv increments into givs. - Call recombine_givs. Handle derived givs. - (record_biv): New argument location. All callers changed. - (record_giv): Initialize derived and last_use fields. - (basic_induction_var): New argument location. All callers changed. - (combine_givs): Don't combine a DEST_REG giv with a DEST_ADDR giv. - Increment combined_with instead of setting to 1. - * unroll.c (derived_regs): New static variable. - (unroll_loop): Initialize it. - Allocate local_regno according to max_reg_num. - (copy_loop_body): Cope with derived givs. - (find_splittable_givs): Check for Givs made from biv increments. - Set derived_regs for givs. - * Makefile.in (stmt.o, loop.o, unroll.o): Depend on loop.h . - -Wed Jan 27 19:31:36 1999 J"orn Rennecke - - * function.c (purge_addressof_1): Handle case when a register - has been used in a wider mode. - -1999-01-27 Bruce Korb - - * fixinc/fixincl.c, fixinc/server.[ch]: - Removed the last of the capitalized variable and proc names. - - * fixinc/server.c: Removed the process open code. - * fixinc/procopen.c: New file containing the proc open code. - * fixinc/inclhack.tpl: Added code to bypass a readability test - when a file is not present. A problem on some systems. - * fixinc/inclhack.sh, fixinc/fixincl.sh: Regenerated. - -Wed Jan 27 11:58:18 1999 Dave Brolley - - * cpplib.h (cpp_notice): Add prototype. - -Wed Jan 27 02:20:48 1999 Jeffrey A Law (law@cygnus.com) - - * Merge gcc2 snapshot 19980929. - - * cccp.c (PRINTF_PROTO): Remove. - (PRINTF_PROTO_{1,2,3,4}: Likewise. - * cexp.y: Likewise. - * system.h: Add PRINTF_PROTO and PRINTF_PROTO_{1,2,3,4}. - - * fix-header.c (cpp_file_lin_for_message): Delete. In libcpp. - (cpp_print_containing_files, v_cpp_message, cpp_message): Likewise. - (cpp_fatal, cpp-Pfatal_with_name): Likewise. - - * gen-protos.c (hashf): Delete in cpphash.o. - * gen-protos.c (hashf): Delete in cpphash.o. - - * expr.c: Do not merge SAVE_STACKAREA_MODE changes. - * expmed.c: Likewise. - * rs6000.md: Likewise. - - * rs6000.c, rs6000.md: Do not merge formatting changes yet. - -Wed Jan 27 01:13:42 1999 Richard Henderson - - * rs6000.c (input_operand): Don't expect CONST around CONSTANT_P_RTX. - * rs6000.md (movsi, movdi): Likewise. - -Tue Jan 26 13:31:38 1999 Jim Wilson - - * function.c (expand_function_end): Pass arg_pointer_save_area to - validize_mem before using it. Emit code into a sequence. - -Tue Jan 26 13:41:38 1999 David Edelsohn - - * rs6000.md (doz + set cr and or + set cr patterns): Add missing - '#' to split patterns. Correct indentation of some new patterns. - -1999-01-26 Zack Weinberg - - * cppfiles.c (safe_read): Deleted. - (read_and_prescan): New function, replaces safe_read, converts - and/or warns about trigraphs, silently converts odd line - terminators (\r, \n\r, \r\n). Warns about no newline at EOF. - (finclude): Use read_and_prescan; turn off nonblocking mode on - the input descriptor; remove file-size-examination and - no-newline-at-EOF gunk which is longer necessary; be more - careful about checking that we've been handed a legitimate - file to read (only real files, pipes, and ttys are acceptable). - * cpplib.h (cpp_options): Rename no_trigraphs flag to - `trigraphs' and invert its sense. - (trigraph_table): Declare. - (cpp_warning_with_line): Prototype. - * cpplib.c: Remove all references to trigraph_pcp. Define - trigraph_table; initialize it in initialize_char_syntax. Open - files in nonblocking mode. s/no_trigraphs/trigraphs/ - throughout, and invert sense. Put cpp_warning_with_line back - in and export it. - -Tue Jan 26 23:21:49 1999 Michael Hayes - - * config/c4x/c4x.h (COUNTER_REGS): New register class. - * config/c4x/c4x.md (*rptb_init): Change constraints. - (rptb_end): Emit alternate looping instructions if - RC register not allocated for loop counter. - (decrement_and_branch_on_count): Allow other registers - for loop counter. - -1999-01-25 Zack Weinberg - - * cppexp.c (struct arglist): Removed. - (parse_number): Use HOST_WIDE_INT for the accumulator. - Allow two `l' suffixes unless C89. Clean up. Make static. - (parse_charconst): New function broken out of cpp_lex. - Code cleaned up drastically. Don't use a token_buffer. - (token_buffer): Removed. - (cpp_lex): Don't call parse_number on a constant string. - Use parse_charconst. - (cpp_parse_expr): Properly handle an ERROR op returned by - cpp_lex. - -1999-01-25 Zack Weinberg - - * cpplib.c: Don't include signal.h, sys/times.h, or - sys/resource.h. Don't declare localtime. - (macroexpand): Handle special symbols here. - (push_macro_expansion): Chop off the trailing '@ ' if possible - here. - (cpp_get_token): Don't do either of the above two things here. - Move `string' label just after case '"' so that wide strings - don't crash the preprocessor. - -Sun Jan 24 20:13:45 1999 David Edelsohn - - * rs6000.md (left shift + set cr patterns): Add missing '#' to - split patterns. - (move register + set cr pattern): Likewise. - (movdi, !TARGET_POWERPC64 splitters): Add back in Jan. 15th patch, - inadvertently deleted. - -Sun Jan 24 08:07:59 1999 Jeffrey A Law (law@cygnus.com) - - * stmt.c (stmt_loop_nest_empty): New function. - * tree.h (stmt_loop_nest_empty): Declare it. - * rtl.def (CALL_PLACEHOLDER): New rtx code. - -Sun Jan 24 21:24:43 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_emit_move_sequence, c4x_encode_section_info): - New functions. - (c4x_check_legit_addr): Remove USE and PLUS, allow - LO_SUM, and disable SYMBOL_REF, LABEL_REF, and CONST cases. - (c4x_legitimize_address): Penalize SYMBOL_REF, LABEL_REF, and - CONST cases. Add LO_SUM. - (c4x_print_operand): Modified 'C' and 'R' cases for calls. - Added 'U' case. Remove dependence on SYMBOL_REF_FLAG. - (c4x_print_operand_address): Handle LO_SUM. - (c4x_scan_for_ldp): Delete. Hooray! - (c4x_process_after_reload): Remove call to c4x_scan_for_ldp. - Split all insns. - (c4x_immed_int_constant): Renamed from c4x_int_constant. All callers - changed. - (c4x_immed_float_constant): Renamed from c4x_float_constant. All - callers changed. - (c4x_T_constraint): Allow LO_SUM, disable SYMBOL_REF, LABEL_REF, - and CONST. - (c4x_U_constraint, symbolic_operand): New functions. - (src_operand): Allow 'I' constants in HImode. Allow LO_SUM, - disable SYMBOL_REF, LABEL_REF, and CONST. - (lsrc_operand, tsrc_operand): Call src_operand instead of - general_operand. - (c4x_operand_subword): Update comments. - - * config/c4x/c4x.c (TARGET_LOAD_ADDRESS): New macro. - (LEGITIMATE_CONSTANT_P): Allow SYMBOL_REF, LABEL_REF, CONST, - plus HIGH and LO_SUM for the C40. - (ENCODE_SECTION_INFO): Define macro. - (symbolic_operand, c4x_U_constraint, c4x_emit_move_sequence): New - prototypes. - (PREDICATE_CODES): Add symbolic_operand. - - * config/c4x/c4x.md (movqi, movgqf, movhi, movhi): Call - c4x_emit_move_sequence. - (floatunsqiqf2, fixuns_truncqfqi2): Rework emitted RTL - to avoid symbol references. - (all patterns with g constraint): Replace 'g' constraint with 'rIm'. - (set_high): Renamed from set_high_use. - (set_lo_sum): Renamed from set_ior_lo_use. - (all call patterns): Make MEM explicit in call address operands. - Modified output templates to use 'U' modifier. - -Sun Jan 24 01:15:05 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Jan 23 22:34:57 1999 Kaveh R. Ghazi - - * final.c (bb_str): Qualify a char* with the keyword `const'. - (add_bb_string, final_scan_insn, output_asm_insn): Likewise. - - * fix-header.c (read_scan_file): Likewise. - - * genoutput.c (output_epilogue, process_template): Likewise. - - * local-alloc.c (requires_inout, block_alloc): Likewise. - - * output.h (output_asm_insn, assemble_string): Likewise. - - * recog.c (recog_constraints, check_asm_operands, - decode_asm_operands, extract_insn, preprocess_constraints, - constrain_operands): Likewise. - - * recog.h (operand_alternative, recog_constraints, insn_template, - insn_outfun, insn_operand_constraint, insn_name): Likewise. - - * regclass.c (record_reg_classes, scan_one_insn): Likewise. - - * regmove.c (find_matches): Likewise. - - * reload.c (alternative_allows_memconst): Likewise. - - * reload1.c (constraint_accepts_reg_p, - reload_cse_simplify_operands): Likewise. - - * rtl.h (decode_asm_operands): Likewise. - - * scan.h (fn_decl): Likewise. - - * varasm.c (assemble_string): Likewise. - -Sat Jan 23 01:37:36 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (gcc_tooldir): Handle case where exec_prefix has - not been explicitly set. - * configure: Rebuilt. - - * fold-const.c (lshift_double): Mark 'prec' arguments as possibly - unused. - - * bitmap.h (bitmap_head_def): Make indx field unsigned. - - * configure.in (gcc_tooldir): When not making a relative gcc_tooldir, - use $exec_prefix/$target_alias for gcc_tooldir. - * configure: Rebuilt. - -Fri Jan 22 11:48:56 1999 Richard Henderson - - * cppp.c (xrealloc): Fix typo last change. - * cppalloc.c, gcc.c, genattr.c, genattrtab.c, gencodes.c: Likewise. - * genconfig.c, genemit.c, genextract.c, genflags.c: Likewise. - * genopinit.c, genoutput.c, genpeep.c, genrecog.c: Likewise. - -1999-01-22 Michael Meissner - - * rs6000.h (CR0_REGNO_P): New macro to test if cr0. - (CR_REGNO_NOT_CR0_P): New macro to test if cr, but not cr0. - (PREDICATE_CODES): Add cc_reg_not_cr0_operand. - (cc_reg_not_cr0_operand): Add declaration. - - * rs6000.c (cc_reg_not_cr0_operand): Return true if register is a - pseudo register, or a control register that is not CR0. - - * rs6000.md (all combiner patterns building . instructions): For - all `.' instructions that do something and set cr0, add an - alternative that does the operation, and then sets a different - flag, in order to avoid using the costly mcrf instruction and also - allow cr0 to be clobbered in asm statements. Also fix a few - patterns that used the wrong register. - - * rs6000.h (rs6000_cpu_select): Make string, names be const char *. - (rs6000_debug_name): Make const char *, not char *. - - * sysv4.h (rs6000_{abi,sdata}_name): Make const char *. - - * rs6000.c (rs6000_{debug,abi,sdata}_name): Make const char *. - (rs6000_select): Use const char * in casts. - -Fri Jan 22 07:43:01 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (gcc_tooldir): Move before first reference. - Let autoconf substitute in a value. - * configure.in (gcc_tooldir): Only use a relative path to the - tool directory if $exec_prefix == $prefix. - * configure: Rebuilt. - - * Makefile.in (tooldir): Replace with gcc_tooldir. - -Thu Jan 21 23:21:57 1999 Jeffrey A Law (law@cygnus.com) - - * m68k.md (ashldi_const): Disable for !TARGET_5200. Fix indentation. - (ashldi3 expander): Similarly. Update comments. - (ashrdi_const, lshrdi_const): Fix indentation. - (ashrdi3, lshrdi3): Fix indentation. Update comments. - -Thu Jan 21 21:53:36 1999 Richard Henderson - - * emit-rtl.c (try_split): Don't try to split non-instructions. - -Thu Jan 21 23:47:30 1999 Andrew MacLeod - - * expr.c (emit_push_insn): Fix dumb typo. - -Thu Jan 21 20:24:02 1999 Richard Henderson - - * rs6000.h (LEGITIMIZE_RELOAD_ADDRESS): Recognize and accept - transformations that we have performed earlier. - * alpha.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise. - - * alpha.md (prologue_stack_probe_loop): Don't do our own label - handling, call gen_label_rtx instead. - -Thu Jan 21 17:45:18 1999 Richard Henderson - - * configure.in ({rs6000|powerpc}-ibm-aix4.[12]*): Add missing `then'. - - * cccp.c (xrealloc): Call malloc given a NULL old pointer. - * collect2.c, cppalloc.c, gcc.c, genattr.c, genattrtab.c: Likewise. - * gencodes.c, genconfig.c, genemit.c, genextract.c: Likewise. - * genflags.c, genopinit.c, genoutput.c, genpeep.c: Likewise. - * genrecog.c, mips-tfile.c, protoize.c: Likewise. - -Thu Jan 21 19:44:55 1999 Michael Meissner - - * configure.in ({rs6000|powerpc}-ibm-aix4.[12]*): If - --with-gnu-ld, use x-aix41-gld instead of x-aix41 to suppress - adding -Wl,-bbigtoc to BOOT_LDFLAGS. - * configure: Regenerate. - - * config/rs6000/x-aix41-gld: New file, don't set BOOT_LDFLAGS. - -Thu Jan 21 15:48:03 1999 Dave Brolley - - * cppexp.c (cpp_lex): Allocate token_buffer dynamically. - -Thu Jan 21 14:18:04 1999 Andrew MacLeod - - * expr.c (MOVE_BY_PIECES_P): Define condition for deciding to use - move_by_pieces. - (MOVE_MAX_PIECES): Define maximum number of bytes to move at once. - (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_DECREMENT): Define defaults. - (USE_STORE_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Define defaults. - (move_by_pieces): Use new macros. - (emit_block_move): Use new macros. - (clear_by_pieces): Use new macros. - (clear_storage): Use new macros. - (emit_push_insn): Use new macros. - (expand_expr): Use new macros. - * config/sh/sh.h (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_DECREMENT): - Define. - (USE_STORE_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Define. - (MOVE_BY_PIECES_P): Define based on alignment and TARGET_SMALLCODE. - (MOVE_MAX_PIECES): Move 8 bytes on SH4. - * tm.texi(MOVE_BY_PIECES_P, MOVE_MAX_PIECES, USE_LOAD_POST_INCREMENT, - USE_LOAD_PRE_DECREMENT, USE_STORE_POST_INCREMENT, - USE_STORE_PRE_DECREMENT): Describe new macros. - -Thu Jan 21 14:13:31 1999 Vladimir N. Makarov - - * varasm.c (output_constant_pool): Use floor_log2 instead of - exact_log2 for ASM_OUTPUT_ALIGN. - - * stor-layout.c (layout_type): Do machine-dependent extra alignment. - - * emit-rtl.c (operand_subword): Handle case when a subword outside - the operand. - - * tm.texi (ROUND_TYPE_{SIZE,ALIGN}): More accurate descriptions of - the macros. - -Thu Jan 21 01:59:30 1999 Richard Henderson - - * cse.c (fold_rtx): Revert 29 Dec change. - (cse_insn): Revert 12 Jan change. - * expr.c (expand_builtin): Don't emit CONST around CONSTANT_P_RTX. - * regclass.c (reg_scan_mark_refs): Revert 29 Dec change. - * rtl.def: Likewise. - * rtl.h (CONSTANT_P): Likewise. - - * expr.c (emit_move_insn): Never try to flush CONSTANT_P_RTX - to memory. - * recog.c (immediate_operand): Accept CONSTANT_P_RTX. - * alpha.c (input_operand): Likewise. - * c4x.c (const_operand): Likewise. - - * explow.c (allocate_dynamic_stack_space): Use register_operand - instead of arith_operand, which does not exist. - - * 1750a.h: Fix comment closure. - * a29k.c (a29k_set_memflags): Fix typo in 19 Jan change. - * arc.md (one_cmplsi2_set_cc_insn): Fix set mode mismatch. - * arm.h (TARGET_SWITCHES): Fix typo. - * i370.md (anon mult and div patterns): Fix set mode mismatch. - * i860.c (output_delayed_branch): Fix operands to constrain_operands. - (output_delay_insn): Likewise. - * m88k.md (anon rotate insns): Fix set mode mismatch. - (anon BLKmode moves): Commonize and fix set mode mismatches. - * ns32k.md (udivmoddi[shq]i4_internal): Fix mode mismatch. - * romp.md (movdf): Fix typo. - -Thu Jan 21 00:29:35 1999 Nathan Sidwell - - * Makefile.in (install-common): Remove extraneous chmod for gcov - install. - -Wed Jan 20 18:15:08 1999 Dave Brolley - - * function.c (assign_parms): Save and restore setting of - TREE_USED (parm). - -Wed Jan 20 12:51:42 1999 Mark Mitchell - - * arm.md: Use MEM_COPY_ATTRIBUTES where appropriate throughout. - Pass MEM_SCALAR_P to arm_gen_store_multiple where appropriate. - -Tue Jan 19 21:20:52 1999 Richard Henderson - - * recog.c (pop_operand): New function. - * recog.h (pop_operand): Declare it. - * genrecog.c (preds): Define it. - - * expr.c (do_jump_for_compare): Handle conditional branch expanders - emitting multiple jump instructions. - * jump.c (condjump_label): New function. - * rtl.h (condjump_label): Declare it. - -Tue Jan 19 21:08:20 1999 Richard Henderson - - * expr.c (emit_move_insn_1): Revert 17 Dec change. Don't emit - clobber during or after reload. - -Tue Jan 19 16:56:03 1999 Richard Henderson - - * genoutput.c (name_for_index): New function. - (scan_operands, validate_insn_alternatives): Use it. - * genrecog.c (insn_name_ptr_size): New variable. - (make_insn_sequence): Fill in insn_name_ptr. - (merge_trees): Use it. - -Tue Jan 19 16:37:36 1999 Richard Henderson - - * i386/isc.h (TARGET_DEFAULT): Define symbolicly. - * i386/isccoff.h, i386/next.h, i386/sco.h, i386/sco5.h: Likewise. - * i386/scodbx.h, i386/sequent.h, i386.unix.h: Likewise. - -Tue Jan 19 15:00:10 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c (NUM_STORES): Delete. - (loop_store_mems): Turn into an EXPR_LIST of MEMs. - (prescan_loop): Properly initialize loop_mems_idx. - (note_addr_stored): Simplify using list structure instead of - fixed sized array. - (invariant_p, check_dbra_loop, load_mems): Similarly. - - * flow.c (invalidate_from_autoinc): New function. - (mark_set_1, mark_used_regs): Use it. - - * Makefile.in (protoize.o, unprotoize.o): Depend on Makefile. - -1999-01-19 Vladimir N. Makarov - - * invoke.texi (-mlong-double-64): New option description. - -1999-01-19 Jim Wilson - - * libgcc2.c: Change all uses of LONG_DOUBLE_TYPE_SIZE to - LIBGCC2_LONG_DOUBLE_TYPE_SIZE. - (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): New. Set to LONG_DOUBLE_TYPE_SIZE - if not defined. - * i960/i960.h (MULTILIB_DEFAULTS): Define to mnumerics. - (CPP_SPECS): Add -mlong-double-64 support. - (TARGET_FLAG_LONG_DOUBLE_64, TARGET_LONG_DOUBLE_64): New. - (TARGET_SWITCHES): Add -mlong-double-64 support. - (LONG_DOUBLE_TYPE_SIZE): Likewise. - (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define. - * i960/vx960-coff.h (MULTILIB_DEFAULTS): Define to msoft-float. - (CPP_SPECS): Add -mlong-double-64 support. - * i960/t-960bare (MULTILIB_OPTIONS): Add mlong-double-64. - (MULTILIB_DIRNAMES): Add ld64. - * i960/t-vxworks960 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Likewise. - -Tue Jan 19 11:54:04 1999 Jason Merrill - - * calls.c (expand_call): Strip a TARGET_EXPR if we're passing by - invisible reference. - -Tue Jan 19 14:51:36 1999 David Edelsohn - - * rs6000.c (offsettable_addr_operand): Delete. - (offsettable_mem_operand): New function. - * rs6000.h (PREDICATE_CODES): Reflect function change. - (RS6000_SAVE_TOC): Represent address as MEM. - * win-nt.h (RS6000_SAVE_TOC): Same. - * rs6000.md (indirect calls): Change offsettable address parameter - to offsettable memory parameter. - -Tue Jan 19 10:24:53 1999 Mark Mitchell - - * rtl.h (rtx_def): Update documentation. - (MEM_IN_STRUCT_P): Likewise. - (MEM_SCALAR_P): New macro. - (MEM_COPY_ATTRIBUTES): Likewise. - (MEM_SET_IN_STRUCT_P): Likewise. - * rtl.texi (MEM_SCALAR_P): Document. - * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. - (fixed_scalar_and_varying_struct_p): New function. Use - MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. - (aliases_everything_p): Likewise. - (true_dependence): Use them. - (write_dependence_p): New function, containing code common to - anti_dependence and output_dependence. - (anti_dependence): Use it. - (output_dependence): Likewise. - * calls.c (save_fixed_argument_area): Don't clear - MEM_IN_STRUCT_P. - (expand_call): Use MEM_SET_IN_STRUCT_P. - (emit_library_call): Don't clear MEM_IN_STRUCT_P. - (emit_library_call_value): Likewise. - (store_one_arg): Use MEM_SET_IN_STRUCT_P. - * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. - (make_extraction): Likewise. - (simplify_shift_const): Likewise. - (gen_lowpart_for_combine): Likewise. - * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. - * emit-rtl.c (operand_subword): Likewise. - (change_address): Likewise. - * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. - * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. - (emit_group_store): Use MEM_SET_IN_STRUCT_P. - (copy_blkmode_from_reg): Likewise. - (store_field): Likewise. - (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P - heuristically. Use MEM_SET_IN_STRUCT_P. - (get_memory_rtx): Likewise. - * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. - * function.c (assign_stack_temp): Clear MEM_SCALAR_P and - MEM_ALIAS_SET on newly returned MEMs. - (assign_temp): Use MEM_SET_IN_STRUCT_P. - (put_reg_into_stack): Likewise. - (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. - (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. - (assign_parms): Likewise. - (expand_function): Likewise. - * integrate.c (expand_inline_function): Likewise. - (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. - * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. - * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. - * print-rtl.c (print_rtx): Print /f for frame_related. - * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. - * reload1.c (reload): Copy MEM_SCALAR_P as well. - * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. - (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. - * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. - (output_constant_def): Likewise. - * a29k.c (a29k_set_memflags_1): Take scalar_p. - Set MEM_SCALAR_P. - (a29k_set_memflags): Use it. - * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. - * c4x.c (c4x_scan_for_ld): Likewise. - * h8300.c (fix_bit_operand): Likewise. - * m88k.c (legitimize_address): Likewise. - (block_move_loop): Likewise. - (block_move_no_loop): Likewise. - (block_move_sequence): Likewise. - (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. - * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. - * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. - * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. - * arm.h (arm_gen_load_multiple): Take scalar_p. - (arm_store_load_multiple): Likewise. - * arm.c (arm_gen_load_multiple): Likewise. - (arm_gen_store_multiple): Likewise. - (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. - -Tue Jan 19 12:30:37 1999 Andrew MacLeod - - * optabs.c (emit_libcall_block): Add a REG_EH_REGION reg note to all - calls within a libcall block to indicate no throws are possible. - * flow.c (find_basic_blocks, find_basic_blocks_1): Don't look for - libcall blocks. Don't add edges to exception handlers if we see - a REG_EH_REGION note with a value of 0. - (make_edges): Override active_eh_region vector if the call has a note - indicating the call does not throw. - -1999-01-19 Vladimir N. Makarov - - * config/rs6000/sysv4.h (CC1_SPEC): Fix correct numbers of {}. - -Tue Jan 19 06:26:30 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (cccp.o, cpplib.o): Depend on Makefile. - -Mon Jan 18 09:56:41 1999 Jason Merrill - - * invoke.texi (C++ Dialect Options): Document -fno-rtti. - -1999-01-18 Vladimir N. Makarov - - * invoke.texi (-mcpu=740, -mcpu=750): New options. - (-m(no-)multiple, -m(no-)string): Describe cases for PPC740 & - PPC750. - -1999-01-18 Michael Meissner - - * rs6000.h ({ASM,CPP}_CPU_SPEC): Add support for all machines - supported with -mcpu=xxx. - (processor_type): Add PROCESSOR_PPC750. - (ADJUST_PRIORITY): Call rs6000_adjust_priority. - (RTX_COSTS): Supply costs for 750 multiply/divide operations. - (rs6000_adjust_priority): Add declaration. - - * rs6000.c (rs6000_override_options): -mcpu={750,740} now sets the - processor type as 750, not 603. Allow -mmultiple and -mstring on - little endian 750 systems. - (rs6000_adjust_priority): Stub for now. - (get_issue_rate): The PowerPC 750 can issue 2 instructions/cycle. - - * rs6000.md (function/cpu attributes): Add initial ppc750 support. - - * sysv4.h (STRICT_ALIGNMENT): Don't force strict alignment if - little endian. - (CC1_SPEC): Pass -mstrict-align if little endian, and not - overridden. - (CC1_ENDIAN_{LITTLE,BIG,DEFAULT}_SPEC): Endian specific configs. - (SUBTARGET_EXTRA_SPECS): Add cc1 endian specs. - - * {sysv4,eabi}le.h (CC1_ENDIAN_DEFAULT_SPEC): Override, default is - little endian. - - * t-ppcgas (MULTILIB_*): Delete obsolete Solaris multilibs. - -Mon Jan 18 12:03:08 1999 Gavin Romig-Koch - - * config/mips/mips.md (div_trap): Split div_trap_mips16 - from div_trap. - (div_trap_normal,div_trap_mips16): Correct the length attributes. - -Mon Jan 18 11:48:28 1999 Kaveh R. Ghazi - - * cpplib.c (special_symbol): Qualify a char* with the `const' keyword. - Instead of writing to const char *buf directly, use a non-const - variable `wbuf' to allocate and write a string, then set buf = wbuf. - - * cppulp.c (user_label_prefix): Qualify a char* with the `const' - keyword. - - * dyn-string.c (dyn_string_append): Likewise. - - * dyn-string.h (dyn_string_append): Likewise. - - * final.c (end_final, output_operand_lossage, asm_fprintf): Likewise. - - * output.h (end_final, output_operand_lossage, asm_fprintf, - named_section, decode_reg_name, make_decl_rtl, user_label_prefix): - Likewise. - - * profile.c (init_branch_prob): Likewise. - - * toplev.c (set_target_switch, vmessage, - v_message_with_file_and_line, v_message_with_decl, - v_error_with_file_and_line, v_error_with_decl, v_error_for_asm, - verror, vfatal, v_warning_with_file_and_line, v_warning_with_decl, - v_warning_for_asm, vwarning, vpedwarn, v_pedwarn_with_decl, - v_pedwarn_with_file_and_line, vsorry, v_really_sorry, - open_dump_file, dump_rtl, clean_dump_file, - print_version, print_single_switch, print_switch_values, - dump_base_name, debug_args, lang_independent_options, - user_label_prefix, documented_lang_options, target_switches, - target_options, print_time, pfatal_with_name, fatal_io_error, - fatal_insn, default_print_error_function, print_error_function, - report_error_function, error_with_file_and_line, error_with_decl, - error_for_asm, error, fatal, warning_with_file_and_line, - warning_with_decl, warning_for_asm, warning, pedwarn, - pedwarn_with_decl, pedwarn_with_file_and_line, sorry, - really_sorry, botch, output_quoted_string, output_file_directive, - open_dump_file, rest_of_decl_compilation, display_help, main): - Likewise. - - * toplev.h (print_time, fatal, fatal_io_error, pfatal_with_name, - fatal_insn, warning, error, pedwarn, pedwarn_with_file_and_line, - warning_with_file_and_line, error_with_file_and_line, sorry, - really_sorry, default_print_error_function, report_error_function, - rest_of_decl_compilation, pedwarn_with_decl, warning_with_decl, - error_with_decl, error_for_asm, warning_for_asm, output_quoted_string, - output_file_directive, botch): Likewise. - - * tree.h (make_decl_rtl): Likewise. - - * varasm.c (strip_reg_name, named_section, decode_reg_name, - make_decl_rtl): Likewise. - -Mon Jan 18 11:35:49 1999 Gavin Romig-Koch - - * Makefile.in (TCL_LIBRARY): Use 'cd' to find the library - directory logically rather than physically. - -Mon Jan 18 09:05:37 1999 Kaveh R. Ghazi - - * loop.c (insert_bct): Hide the definition of variables - `increment_direction', `compare_direction', `add_iteration' and - `loop_var_mode'. - - * recog.c (mode_dependent_address_p): Mark parameter `addr' with - ATTRIBUTE_UNUSED. Mark label `win' with ATTRIBUTE_UNUSED_LABEL. - (mode_independent_operand): Mark label `lose' with - ATTRIBUTE_UNUSED_LABEL. - - * regclass.c (n_occurrences): Remove prototype and definition. - - * reload.c (find_reloads_address_1): Mark variable `tem' with - ATTRIBUTE_UNUSED. - - * reload1.c (reload): Cast the first two arguments of `bcopy' to PTR. - - * sbitmap.c (sbitmap_copy): Likewise. - - * scan-decls.c (scan_decls): Hide label `handle_comma'. - - * toplev.c (output_lang_identify): Mark prototype with - ATTRIBUTE_UNUSED. - - * tree.c (make_node): Cast the first argument of `bzero' to PTR. - (make_tree_vec): Likewise. - (build1): Likewise. - - * varasm.c (assemble_static_space): Mark variable `tem' with - ATTRIBUTE_UNUSED. - -Mon Jan 18 04:28:36 1999 Nathan Sidwell - - * Makefile.in (GCOV_INSTALL_NAME): New macro. - (install-common): Use it. - (uninstall): Use it. - (uninstall): Use correct names for protoize and unprotoize. - -Mon Jan 18 03:52:56 1999 Christian Bruel - Jeffrey A Law (law@cygnus.com) - - * flow.c (last_mem_set): Delete variable. References removed. - (mem_set_list): New variable. - (life_analysis): Initialize and finalize alias analysis. - (propagate_block); Initialize mem_set_list. Clear for CALL_INSNs. - (insn_dead_p): For a store to memory, search the entire mem_set_list - for a match. - (mark_set_1): Kill entries on the mem_set_list for aliased writes or - changes to their addresses. Add new entries to the mem_set_list for - memory writes writes. - (mark_used_regs): Kill entries on the mem_set_list which may be - referenced by a load operation. - -Mon Jan 18 01:01:02 1999 Jeffrey A Law (law@cygnus.com) - - * alias.c (base_alias_check): Add missing return for differing - symbols case. - -Mon Jan 18 00:36:13 1999 Rainer Orth - - * mips-tdump.c (print_file_desc): Handle unknown filenames and - missing local symbols. - -Sun Jan 17 21:04:31 1999 Richard Henderson - - * jump.c (rtx_renumbered_equal_p): Special case CODE_LABEL. - - * system.h (bcopy): Implement with memmove not memcpy. - -Sun Jan 17 19:23:20 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (cppulp.o): Add dependencies. - - * i386.md (integer conditional moves): Add missing earlyclobbers. - - * regmove.c (optimize_reg_copy_1): Undo Aug 18 change. Update - REG_N_CALLS_CROSSED and REG_LIVE_LENGH if and only if we change - where a register is live. - -Sun Jan 17 03:20:47 1999 H.J. Lu (hjl@gnu.org) - - * reg-stack.c (subst_stack_regs_pat): Abort if the destination - of a FP conditional move is not on the FP register stack. - -Sun Jan 17 01:15:04 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Jan 16 23:40:33 1999 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload_cse_regs_1): Do not call - reload_cse_simplify_operands for an insn with asm operands. - - * cccp.c (print_help): Fix typos. - * cpplib.c (print_help): Fix typos. - * toplev.c (f_optiosn): Fix typos. - (documented_lang_options): Fix typos. - -Sat Jan 16 21:48:17 1999 Marc Espie (Marc.Espie@openbsd.org) - - * gcc.c (do_spec_1): Fix obvious typo. - -Sat Jan 16 19:31:07 1999 Kaveh R. Ghazi - - * c-decl.c (duplicate_decls): If `warn_traditional', warn when - a non-static function declaration follows a static one. - - * invoke.texi (-Wtraditional): Document the extra check now done - by this flag. - -Sat Jan 16 15:13:46 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (shadd): Create shadd insns, even if the result of the shift is - needed without the addition. - -Sat Jan 16 10:48:16 1999 J"orn Rennecke - - * sh.md (movdf, movsf): Temporary workaround for no_new_pseudos lossage. - -Fri Jan 15 23:44:37 1999 Richard Henderson - - * sparc.c (sparc_issue): Add hypersparc/sparclite86x entries. - -Fri Jan 15 22:30:04 1999 David Edelsohn - - * rs6000.h (CONST_OK_FOR_LETTER_P): Do not assume 32-bit CONST_INT. - * rs6000.c (u_short_cint_operand, add_operand, logical_operand, - non_add_cint_operand, non_logical_cint_operand): Likewise. - (get_issue_rate): Add CPU_PPC604E case. - * rs6000.md (movdi, !TARGET_POWERPC64 splitters): Handle 64-bit hosts. - -Fri Jan 15 18:42:12 1999 Richard Henderson - - * expr.c (queued_subexp_p): Make public. - * expr.h (queued_subexp_p): Declare it. - * recog.c (asm_operand_ok): New function. - (check_asm_operands): Use it. After reload, use constrain_operands - instead. - * recog.h (asm_operand_ok): Declare it. - * stmt.c (expand_asm_operands): Use it to try harder to make - asms initially satisfy their constraints. - -Fri Jan 15 17:43:59 1999 Jeffrey A. Law - - * sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Do not create - (mem (lo_sum (...)) for TFmode unless TARGET_V9. - -Sat Jan 16 12:47:15 1999 Michael Hayes - - * config/c4x/c4x.md (not_repeat_reg): Allow ldp instruction - in delay slot of RPTBD. - -Sat Jan 16 12:26:40 1999 Michael Hayes - - * config/c4x/libgcc.S (___divhi3, ___modhi3): Fix long long - divide and modulo sign problem. - -Fri Jan 15 11:02:31 1999 Michael Hayes - - * unroll.c (loop_iterations): Return 0 if the last loop insn - is not a jump insn or if the loop has multiple back edges. - -1999-01-15 Manfred Hollstein - - * configure.in (fixinc_defs): Do not define for m[68]8k-motorola-sysv{,3}; - it's working properly now. Remove comment saying "see m68k-motorola-sysv - as an example". - * configure: Regenerate using autoconf. - - * fixinc/fixincl.c (main): Do not ignore SIGCHLD. - -Thu Jan 14 22:38:41 1999 Jeffrey A Law (law@cygnus.com) - - * unroll.c (find_splittable_givs): For a DEST_ADDR giv, do not share - a register with another DEST_ADDR giv if the address is not valid. - - * pa.c (hppa_expand_epilogue): Save and restore the static chain - around the call to mcount. - - * h8300.h (ASM_OUTPUT_LABELREF): Use asm_fprintf, not fprintf. - - * stmt.c (expand_end_case): Use emit_cmp_and_jump_insns to avoid - generating non-canonical rtl. - -1999-01-14 Vladimir N. Makarov - - * config/i960/i960.c (i960_output_move_double_zero, - i960_output_move_quad_zero): New functions for moving zeros. - (i960_output_move_double, i960_output_move_quad): Additional code - for situation when moving unaligned register group. - - * config/i960/i960.h (i960_output_move_double_zero, - i960_output_move_quad_zero): The function definitions. - - * config/i960/i960.md (movdi+1, movti+1): Usage of the functions. - -1999-01-13 Vladimir N. Makarov - - * config/i960/i960.c (i960_function_prologue): New code (optimal - solution) for saving global registers in local registers. - (form_reg_groups, reg_group_compare, split_reg_group): New - functions used by the code. - (reg_group): New structure definition for the new code. - -1999-01-13 Manfred Hollstein - - * fixinc/fixincl.c (create_file): Pass file creation mask as - third parameter to "open". Use O_TRUNC flag to open instead of - explicitly unlink'ing the file. - (process): and forget about the "chmod" stuff. - -Wed Jan 13 20:12:37 1999 Richard Henderson - - * integrate.c (expand_inline_function): Recognize (mem (addressof)) - and substitute. Copy the return value from there into a new pseudo. - -Wed Jan 13 16:47:00 1999 Catherine Moore - - * config/arm.c (output_func_epilogue): Check TARGET_ABORT_NORETURN - before generating a call to abort for volatile functions. - * config/arm.h (ARM_FLAG_ABORT_NORETURN): Define. - (TARGET_ABORT_NORETURN): Define. - (abort-on-noreturn): New option. - -Thu Jan 14 13:52:42 1999 Michael Hayes - - * config/c4x/c4x.md (in_annul_slot_3): Correctly allow unarycc - and binarycc operations in 3rd annulled delay slot! - -Wed Jan 13 16:16:44 1999 Catherine Moore - - * config/arm.c (output_func_epilogue): Check TARGET_ABORT_NORETURN - before generating a call to abort for volatile functions. - * config/arm.h (ARM_FLAG_ABORT_NORETURN): Define. - (TARGET_ABORT_NORETURN): Define. - (abort-on-noreturn): New option. - -Wed Jan 13 13:30:08 1999 Kaveh R. Ghazi - - * cccp.c (xstrdup): Renamed from `savestring'. All callers changed. - Remove prototype which we get from libiberty.h. - - * collect2.c (xstrdup): Likewise. - - * genextract.c (xstrdup): Likewise for `copystr'. - (mybzero): Remove it and use `memset' instead. - - * genoutput.c (mybcopy, mybzero): Remove these. All callers changed - to use `memcpy' and `memset' instead. - - * genrecog.c (xstrdup): Renamed from `copystr'. All callers - changed. Remove prototype. - (mybcopy, mybzero): Remove these and use memcpy/memset. - -Wed Jan 13 00:59:04 1999 Jeffrey A Law (law@cygnus.com) - - * mips.h (LOAD_EXTEND_OP): Correct for SImode and CCmode moves when - generating code for TARGET_64BIT. - -Tue Jan 12 14:05:37 1999 David Edelsohn - - * rs6000.c (print_operand, cases 'm' and 'M'): Do not depend on - HOST_WIDE_INT word-size. - (rs6000_stack_info): Remove redundant alignment of fpmem. - -Tue Jan 12 14:05:37 1999 Richard Henderson - - * rs6000.c (short_cint_operand): Remove CONSTANT_P_RTX handling. - (u_short_cint_operand, reg_or_cint_operand, logical_operand): Likewise. - (input_operand): Adjust CONSTANT_P_RTX handling. - * rs6000.h (PREDICATE_CODES): Remove CONSTANT_P_RTX references. - * rs6000.md (movsi): Adjust CONSTANT_P_RTX handling. - (movhi, movqi): Remove CONSTANT_P_RTX handling. - (movdi): Adjust CONSTANT_P_RTX handling. - -1999-01-12 Manfred Hollstein - - * configure: Regenerate using autoconf. - - * fixinc/Makefile.in (INCLUDES): Add -I$(srcdir)/../../include. - * fixinc/fixincl.c (SIGCHLD): Use SIGCLD on (very) old systems. - (process): "fchmod" isn't available on all systems, use "chmod" - instead. - * fixinc/server.c: Add #include . - (STDIN_FILENO): Add default definition if no include file defines - it already. - (STDOUT_FILENO): Likewise. - -Tue Jan 12 10:23:24 1999 Stan Cox - - * mips.md (call_value_internal3c): New pattern for -mips16 -mlong-calls. - -1999-01-12 Manfred Hollstein - - * m68k/mot3300.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Define to - ensure all prototypes necessary for building libio will be available. - * m68k/xm-mot3300.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Remove - definitions here as they are not host specific. - * m88k/sysv3.h, m88k/xm-sysv3.h: Likewise. - -Tue Jan 12 02:53:46 1999 Richard Henderson - - * cse.c (cse_insn): Never prefer (const (constant_p_rtx)). - -Tue Jan 12 02:36:10 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Tue Jan 12 01:30:19 1999 Richard Henderson - - * rtl.c (rtx_alloc): Use memset instead of inline loop. - - * recog.h (recog_op_alt): Declare extern. - -Tue Jan 12 00:23:31 1999 Richard Henderson - - * function.c (purge_addressof_1): If the note accesses a mem+addressof - in a wider mode than any replacement, adjust the cached replacement. - Cache trivial substitutions as well. - -Tue Jan 12 00:06:00 1999 Richard Henderson - - * Makefile.in (OBJECTS): Add sbitmap.o. - (BASIC_BLOCK_H): Add sbitmap.h. - * basic-block.h: Move simple bitmap code to sbitmap.h. - * flow.c: Move simple bitmap code to sbitmap.c. - * sbitmap.h, sbitmap.c: New files. - -Mon Jan 11 23:51:50 1999 Richard Henderson - - * alpha.h (TARGET_SWITCHES): Document switches. - (TARGET_OPTIONS): Likewise. - - * alpha/elf.h (ASM_FINISH_DECLARE_OBJECT): Use HOST_WIDE_INT_PRINT_DEC. - -Mon Jan 11 22:54:14 1999 Richard Henderson - - * tree.c (new_alias_set): Return zero if !flag_strict_aliasing. - -Mon Jan 11 22:36:01 1999 Richard Henderson - - * basic-block.h (basic_block_head): Rename to x_basic_block_head. - (basic_block_end): Rename to x_basic_block_end. - (BLOCK_HEAD, BLOCK_END): Update. - - * caller-save.c: Change basic_block_head/end references to - BLOCK_HEAD/END. - * combine.c, flow.c, function.c, gcse.c, global.c: Likewise. - * graph.c, haifa-sched.c, local-alloc.c, regclass.c: Likewise. - * regmove.c, reload1.c, reorg.c, sched.c: Likewise. - -Sat Jan 9 23:54:09 1999 Kaveh R. Ghazi - - * gcc.c (xstrerror): Renamed from my_strerror. All callers - changed. Remove prototype since we get that from libiberty.h. - - * protoize.c (xstrerror): Likewise. - -Sat Jan 9 23:22:04 1999 Kaveh R. Ghazi - - * gcc.c (read_specs): Ensure format specifiers match their arguments. - -Sat Jan 9 20:04:24 1999 Richard Henderson - - * tree.c (copy_node): Oops. That would be copy not zero - in that last change. - -Sun Jan 10 15:35:41 1999 Michael Hayes - - * config/c4x/c4x.c: Include system.h. - (c4x_caller_save_map): Disable caller save for RC. - (c4x_optimization_options): Disable scheduling before reload. - (valid_parallel_load_store) : Define return type as int. - Remove unused variable regs. - * config/c4x/c4x.h (REGISTER_MOVE_COST): Make independent of register - class. - * config/c4x/c4x.md (rotlqi3, rotrqi3): Fix up emitted RTL to - handle rotations. - (*db, decrement_and_branch_until_zero): Fix up constraints - to keep reload happy. - -Sat Jan 9 18:35:29 1999 Richard Henderson - - * tree.c (make_node): Call bzero instead of inline clear. - (copy_node, make_tree_vec, build1): Likewise. - (get_identifier): Call strlen instead of inline count. - (maybe_get_identifier): Likewise. - -Sun Jan 10 14:04:51 1999 Michael Hayes - - * config/c4x/c4x.md (in_annul_slot_3): Allow unarycc and binarycc - operations in 3rd annulled delay slot. - (*lshrqi3_const_set): Disallow c constraint for operand0. - (modhi3+1, modhi3+2): Set attribute type to multi. - * config/c4x/c4x.c (c4x_S_constraint): Removed space in middle of - != operator. - -Sat Jan 9 11:44:55 1999 Kaveh R. Ghazi - - * gansidecl.h: Allow attribute unused on labels only when we are - version 2.93 or higher. Not all versions of 2.92 have this feature. - - * version.c: Bump minor number to 93. - -Fri Jan 8 10:51:13 1999 Andreas Schwab - - * config/m68k/m68k.h: Declare output_function_epilogue. - * recog.h: Declare next_insn_tests_no_inequality. - -Fri Jan 8 01:43:53 1999 Jeffrey A Law (law@cygnus.com) - - * stmt.c (optimize_tail_recursion): New function, extracted from ... - (expand_return): Use optimize_tail_recursion. - * tree.h (optimize_tail_recursion): Declare. - - * toplev.c (compile_file): Move call to output_func_start_profiler - to after the loop to emit deferred functions. - -Thu Jan 7 19:52:53 1999 Gerald Pfeifer - - * system.h (abort): Supply more detailed information on how to - report an Internal Compiler Error. - -Thu Jan 7 09:25:58 1999 Bruce Korb (korb@datadesign.com) - - * fixinc/fixincl.c (*): More decapitalization of variables - plus some explanatory comments. - - * fixinc/Makefile.in fixinc/mkfixinc.sh: - When the fixincl program does not work for a certain system, - we substitute a shell script. Added user commentary when - this happens. - -Thu Jan 7 11:26:17 1999 Mark Mitchell - - * calls.c (store_unaligned_arguments_into_pseudos): Use xmalloc to - allocate memory that will live beyond this function. - (expand_call): Free it here. - -Thu Jan 7 03:08:17 1999 Richard Henderson - - * sparc.h (PREFERRED_RELOAD_CLASS): Select GENERAL_REGS for - integer data not destined for fp regs. - (LEGITIMIZE_RELOAD_ADDRESS): New. - -Thu Jan 7 03:03:42 1999 Stan Cox - Richard Henderson - - Support for HyperSPARC and SPARClite86x: - * sparc.h (TARGET_CPU_hypersparc, TARGET_CPU_sparclite86x): New. - (CPP_CPU32_DEFAULT_SPEC): Fix up for the new targets. - (ASM_CPU32_DEFAULT_SPEC): Likewise. - (TARGET_CPU_DEFAULT): Likewise. - (enum processor_type): Likewise. - (CPP_ENDIAN_SPEC): Handle little endian data. - (LIBGCC2_WORDS_BIG_ENDIAN): Likewise. - (ADJUST_COST): Call sparc_adjust_cost. - * sparc.c (sparc_override_options): Fix up for the new targets. - (supersparc_adjust_cost): Make static. - (hypersparc_adjust_cost): New. - (ultrasparc_adjust_cost): Make static. - (sparc_adjust_cost): New. - * sparc.md (attr cpu): Add hypersparc and sparclite86x. - (function_unit): Add hypersparc scheduling rules. - - * configure.in (with_cpu handler): Recognize hypersparc. - -Thu Jan 7 23:54:05 1999 Michael Hayes - - * config/c4x/c4x.c: Added space after negation operator. - * config/c4x/c4x.h: Likewise. - * config/c4x/c4x.md: Likewise. - -Thu Jan 7 23:39:27 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_preferred_reload_class): Always return class. - -Thu Jan 7 00:29:25 1999 Bernd Schmidt - - * combine.c (num_sign_bit_copies): In NEG, MULT, DIV and MOD cases, - when a test can't be performed due to limited width of - HOST_BITS_PER_WIDE_INT, use the more conservative approximation. - Fix UDIV case for cases where the first operand has the highest bit - set. - -Thu Jan 7 00:01:38 1999 Lutz Vieweg - - * pa.h (reg_class): Add FPUPPER_REGS. - (REG_CLASS_NAMES): Similarly. - (REG_CLASS_CONTENTS): Similarly. - (REGNO_REG_CLASS): Handle FPUPPER_REGS. - (FP_REG_CLASS_P): Likewise. - (REG_CLASS_FROM_LETTER): Similarly. - (CLASS_MAX_NREGS): Similarly. - -1999-01-06 Brendan Kehoe - - * fixincludes: For HP/UX 10.20, also look in curses_colr/curses.h - for a typedef of bool. Make sure to have a copy of the file is - in place before we look to fix it. Fix typo in variable name to - FILE. - -Wed Jan 6 07:51:05 1999 Richard Henderson - - * expr.c (expand_builtin) [case BUILT_IN_CONSTANT_P]: Use - value_mode for the return mode. - -Wed Jan 6 17:55:19 1999 Robert Lipe - - * configure.in: New flag --with-dwarf2. If set, enables DWARF-2 - debugging as default. - - * config/tm-dwarf2.h: New file. - -Wed Jan 6 16:08:54 1999 Jeffrey A Law (law@cygnus.com) - - * h8300.h (ASM_OUTPUT_LABELREF): Define. - - * pa.h (DONT_RECORD_EQUIVALENCE): Kill. - * local-alloc.c (update_equiv_regs): Corresponding changes. - * tm.texi (DONT_RECORD_EQUIVALENCE): Kill. - - * calls.c (special_function_p): Push alloca test inside the large - conditional which excludes functions not at file scope or not - extern. - - * calls.c (special_function_p): New function broken out of - expand_call. - (precompute_register_parameters): Likewise. - (store_one_arg): Likewise. - (store_unaligned_argumetns_into_pseudos): Likewise. - (save_fixed_argument_area): Likewise. - (restore_fixed_argument_area): Likewise. - (expand_call): Corresponding changes. - -Thu Jan 7 00:12:24 1999 Michael Hayes - - * config/c4x/c4x.md (addqi3): If the destination operand is - a hard register other than an extended precision register, - emit addqi3_noclobber. - (*addqi3_noclobber_reload): New pattern added so that reload - will recognize a store of a pseudo, equivalent to the sum - of the frame pointer and a constant, as an add insn. - -1999-01-06 Manfred Hollstein - - * fixinc/fixincl.c: Re-indent according to the GNU standards. - fixinc/server.c: Likewise. - fixinc/server.h: Likewise. - -Wed Jan 6 10:43:29 1999 Andreas Schwab - - * config/m68k/m68k.c (const_uint32_operand): Remove CONSTANT_P_RTX - handling. - (const_sint32_operand): Likewise. - -Wed Jan 6 09:44:51 1999 Kaveh R. Ghazi - - * toplev.h: In addition to checking _JBLEN, also check if `setjmp' - is a macro when deciding if we can use `jmp_buf' in prototypes. - -Wed Jan 6 03:18:53 1999 Mark Elbrecht - - * configure.in (pc-msdosdjgpp): Set x_make to x-go32. - * configure: Rebuilt. - * i386/xm-go32.h: Define LIBSTDCXX. - * i386/x-go32: New. - * i386/go32.h (MD_EXEC_PREFIX): Define. - (FILE_NAME_ABSOLUTE_P): Define. - (LINK_COMMAND_SPEC): Define. - -Wed Jan 6 02:23:36 1999 "Charles M. Hannum" - - * expr.c (store_expr): If the lhs is a memory location pointed - to be a postincremented (or postdecremented) pointer, always - force the rhs to be evaluated into a pseudo. - -Wed Jan 6 00:54:21 1999 Geoff Keating - - * real.c (mtherr): Print more reasonable warning messages. - -Tue Jan 5 21:57:42 1999 Kaveh R. Ghazi - - * Makefile.in (gcc.o, prefix.o, cccp.o, cpplib.o): Depend on prefix.h. - - * cccp.c: Include prefix.h, don't prototype prefix.c functions. - (new_include_prefix): Constify char* parameters. - - * cppfiles.c (read_name_map): Likewise. - (append_include_chain): Likewise. Also, use a writable char* copy - of parameter `dir' which we then modify, rather than using the - parameter itself to store the new writable string. - (remap_filename): Constify some variables. Also, use a writable - char* to store an allocated string which we will be modifying. - - * cpplib.c: Include prefix.h, don't prototype prefix.c functions. - (cpp_start_read): Constify variable `str'. - - * cpplib.h (append_include_chain): Constify a char* parameter. - - * gcc.c Include prefix.h, don't prototype prefix.c functions. - (add_prefix, save_string): Constify char* parameters. - (fatal, error): Add ATTRIBUTE_PRINTF_1 to prototypes. - - * prefix.c: Include prefix.h. - (get_key_value, translate_name, save_string, update_path, - set_std_prefix): Constify various char* parameters and variables. - (save_string): Use xmalloc, not malloc. - (translate_name): Use a writable temporary variable to create and - modify a string before setting it to a const char*. - - * prefix.h: New file to prototype functions exported from prefix.c. - -Tue Jan 5 08:52:18 1999 Bruce Korb (korb@datadesign.com) - - * fixinc/fixincl.c (various): Added debug code so - Manfred can trace the processing. - - * fixinc/inclhack.def (sys/utsname.h): Provide forward declaration of - struct utsname on Ultrix V4.[35]. - - * fixinc/{fixincl.x|fixincl.sh|inclhack.sh} : Regenerated. - -Mon Jan 4 15:37:30 1999 Zack Weinberg - - * cpplib.c (skip_if_group): Split out the logic that handles - directive recognition to its own function. Don't use - parse markers; use a bare pointer into the buffer. Use - copy/skip_rest_of_line instead of doing it by hand. Remove - `return on any directive' mode which was never used, and take - only one argument. - (consider_directive_while_skipping): New function, subroutine - of skip_if_group. Logic streamlined a bit. - (conditional_skip, do_elif, do_else): Call skip_if_group with - only one argument. - -Mon Jan 4 15:27:30 1999 Zack Weinberg - - * cpplib.c (do_undef): EOF immediately after '#undef FOO' is not an - error. - -Mon Jan 4 11:55:51 1999 Jason Merrill - - * extend.texi (Bound member functions): Document. - -Mon Jan 4 11:01:48 1999 Kaveh R. Ghazi - - * mips-tdump.c (st_to_string, sc_to_string, glevel_to_string, - lang_to_string, type_to_string): Make return type const char*. - (print_symbol): Apply `const' keyword to a char*. - (print_file_desc): Cast structure member `crfd' to ulong when - comparing against one. - - * mips-tfile.c (pfatal_with_name): Apply `const' keyword to char*. - (fatal, error): Add ATTRIBUTE_PRINTF_1 to prototypes. - (progname, input_name): Apply `const' keyword to a char*. - Don't redundantly include sys/stat.h. - (alloc_info): Apply `const' keyword to a char*. - (st_to_string, sc_to_string): Likewise. - (hash_string): Cast variable `hash_string' to a symint_t when - comparing against one. - (add_string): Cast PAGE_USIZE to Ptrdiff_t when comparing against one. - Likewise cast it to long when comparing against one. - (add_local_symbol): Apply `const' keyword to a char*. - (add_ext_symbol): Likewise. - (add_unknown_tag): Likewise. - (add_procedure): Cast a printf-style field width to an int. - (add_file): Cast PAGE_USIZE to long when comparing against one. - (parse_begin): Cast a printf-style field width to an int. - (parse_bend): Likewise. - (parse_def): Likewise. - (parse_end): Likewise. - (mark_stabs): Mark parameter `start' with ATTRIBUTE_UNUSED. - (parse_stabs_common): Fix format specifier. - (parse_input): Change type of variable `i' to Size_t. - (write_object): Fix arguments to match format specifiers. - Cast variable `num_write' to long when comparing against one. - (read_seek): Cast variable `sys_read' to symint_t when comparing - against one. Fix arguments to match format specifiers. Cast - variable `size' to long when comparing against one. - (copy_object): Cast result of `sizeof' to int when comparing - against one. Fix arguments to match format specifiers. Cast - variable `ifd' to long when comparing against a signed value. - Likewise, likewise. - -Mon Jan 4 10:30:33 1999 Kaveh R. Ghazi - - * c-common.c (decl_attributes): Allow applying attribute `unused' - on a LABEL_DECL. - - * c-parse.in (label): Parse attributes after a label, and call - `decl_attributes' to handle them. - - * gansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define. - - * genrecog.c (OUTPUT_LABEL, write_tree_1, write_tree): When - generating labels, mark them with ATTRIBUTE_UNUSED_LABEL. - - * invoke.texi: Note that labels can be marked `unused'. - -Sun Jan 3 23:32:18 1999 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Jan 3 23:00:42 1999 Jeffrey A Law (law@cygnus.com) - - * optabs.c (emit_cmp_and_jump_insns): Use CONSTANT_P canonicalizing - RTL for a compare/jump sequence. - -Sun Jan 3 22:58:15 1999 Michael Hayes - - * optabs.c (emit_cmp_insn): Abort if asked to emit non-canonical RTL - for a target with HAVE_cc0 defined. - (emit_cmp_and_jump_insns): New function. - * expr.h (emit_cmp_and_jump_insns): Prototype it. - * loop.c (check_dbra_loop): Use it to replace calls - to emit_cmp_insn and emit_jump_insn and to canonicalize - the comparison if necessary. - * unroll.c (unroll_loop): Likewise. - -Sun Jan 3 21:01:04 1999 Rainer Orth - - * fixincludes (sys/utsname.h): Provide forward declaration of - struct utsname on Ultrix V4.[35]. - - * mips.md (div_trap): Use local labels instead of dot-relative - branches. - -Sun Jan 3 20:40:34 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (branch, negated branch): Handle (const_int 0) as first - source operand. - * pa.c (output_cbranch): Likewise. - -Sun Jan 3 03:20:38 1999 David Edelsohn - - * rs6000.c (rs6000_stack_info): Undo spurious part of last - change. - -1999-01-01 Manfred Hollstein - - * extend.texi (__builtin_constant_p): Add missing @smallexample. - -Fri Jan 1 11:48:20 1999 Jeffrey A Law (law@cygnus.com) - - * i386.md (doubleword shifts): Fix dumb mistakes in previous change. - -Wed Dec 30 23:38:55 1998 Jeffrey A Law (law@cygnus.com) - - * m68k.md (adddi_dilshr32): Allow all operands to be registers too. - (adddi_dishl32): Similarly. - - * cse.c (invalidate_skipped_block): Call invalidate_from_clobbers - for each insn in the skipped block. - - * reload1.c (reload_as_needed): Verify that the insn satisfies its - constraints after replacing a register address with an autoincrement - address for reload inheritance purposes. - - * i386.md (doubleword shifts): Avoid namespace pollution. - -Wed Dec 30 23:00:28 1998 David O'Brien - - * configure.in (FreeBSD ELF): Needs special crt files. - -Wed Dec 30 22:50:13 1998 Geoffrey Noer - - * i386/xm-cygwin.h: Change DIR_SEPARATOR to forward slash. - -1998-12-30 Andreas Schwab - - * loop.c (check_dbra_loop): While reversing the loop, if the - comparison value has a VOID mode use the mode of the other operand - to compute the mask. - -Wed Dec 30 22:24:00 1998 Michael Meissner - - * rs6000.md ({save,restore}_stack_function): Take 2 operands to - avoid warnings in compiling explow.c. - - (patch from Ken Raeburn, raeburn@cygnus.com) - * rs6000.c (rs6000_stack_info): Force 8-byte alignment of - fpmem_offset. Compute total size after that, and then - rs6000_fpmem_offset using both values. - -Mon Dec 28 19:26:32 1998 Gerald Pfeifer - - * gcc.texi (Non-bugs): ``Empty'' loops will be optimized away in - the future; indeed that already happens in some cases. - -Tue Dec 29 11:58:53 1998 Richard Henderson - - * sparc.c (input_operand): Recognize (const (constant_p_rtx)). - (arith_operand): Remove constant_p_rtx handling. - (const64_operand, const64_high_operand): Likewise. - (arith11_operand, arith10_operand, arith_double_operand): Likewise. - (arith11_double_operand, arith10_double_operand, small_int): Likewise. - (small_int_or_double, uns_small_int, zero_operand): Likewise. - * sparc.h (PREDICATE_CODES): Likewise. - - * rtl.h (CONSTANT_P): Remove CONSTANT_P_RTX. - -Tue Dec 29 11:32:54 1998 Richard Kenner - - * rtl.def (CONSTANT_P_RTX): Clarify commentary. - * expr.c (expand_builtin, case BUILT_IN_CONSTANT_P): Rework to - consider constant CONSTRUCTOR constant and to defer some cases - to cse. - * cse.c (fold_rtx, case CONST): Add handling for CONSTANT_P_RTX. - * regclass.c (reg_scan_mark_refs, case CONST): Likewise. - -Tue Dec 29 11:30:10 1998 Richard Henderson - - * expr.c (init_expr_once): Kill can_handle_constant_p recognition. - * cse.c (fold_rtx, case 'x'): Remove standalone CONSTANT_P_RTX code. - - * alpha.c (reg_or_6bit_operand): Remove CONSTANT_P_RTX handling. - (reg_or_8bit_operand, cint8_operand, add_operand): Likewise. - (sext_add_operand, and_operand, or_operand): Likewise. - (reg_or_cint_operand, some_operand, input_operand): Likewise. - * alpha.h (PREDICATE_CODES): Likewise. - -Sat Dec 26 23:26:26 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Dec 26 09:17:04 1998 Jeffrey A Law (law@cygnus.com) - - * gengenrtl.c (gencode): Always use bzero to clear memory instead - of dangerous casts and stores. - - * Makefile.in (compare, gnucompare): Add missing else true clauses. - -Fri Dec 25 23:00:56 1998 Jeffrey A Law (law@cygnus.com) - - * alpha.md (builtin_longjmp): Add missing "DONE". - -Thu Dec 24 10:39:57 1998 Stan Cox - - * gcc.c (execute): Enable -pipe with win32. - -Wed Dec 23 10:27:44 1998 Nick Clifton - - * config/arm/t-arm-elf: Add multiplib option for leading - underscores. - - * config/arm/thumb.h (ASM_OUTPUT_LABELREF): Use variable - 'user_label_prefix' rather than macro USER_LABEL_PREFIX. - - (thumb_shiftable_const): Use macro 'BASE_REG_CLASS' rather - than variable 'reload_address_base_reg_class'. [Note this - change is unrelated to the others in this patch]. - - * config/arm/unknown-elf.h (USER_LABEL_PREFIX): Default to no - leading underscore. - -Wed Dec 23 09:51:32 1998 Kaveh R. Ghazi - - * alias.c (record_alias_subset): Remove ignored `&'. - (init_alias_once): Likewise. - - * c-lex.c (UNGETC): Cast first argument of comma expression to void. - - * config/mips/mips.c (mips_asm_file_end): Cast the result of - fwrite to `int' when comparing against one. - - * config/mips/mips.h (CAN_ELIMINATE): Add parens around && within ||. - (INITIAL_ELIMINATION_OFFSET): Add braces to avoid ambiguous `else'. - - * cse.c (rehash_using_reg): Change type of variable `i' to - unsigned int. - - * dwarf2out.c (initial_return_save): Cast -1 to unsigned before - assigning it to one. - - * except.c (duplicate_eh_handlers): Remove unused variable `tmp'. - - * final.c (final_scan_insn): Likewise for variable `i'. - (output_asm_insn): Cast a char to unsigned char when used as an - array index. - - * gcse.c (compute_pre_ppinout): Cast -1 to SBITMAP_ELT_TYPE when - assigning it to one. - - * loop.c (strength_reduce): Remove unused variables `count' and `temp'. - - * recog.c (preprocess_constraints): Cast a char to unsigned char - when used as an array index. - - * regmove.c (find_matches): Likewise. - - * reload1.c (calculate_needs): Add default case in switch. - (eliminate_regs_in_insn): Initialize variable `offset'. - (set_offsets_for_label): Change type of variable `i' to unsigned. - (reload_as_needed): Wrap variable `i' in macro check on - AUTO_INC_DEC || INSN_CLOBBERS_REGNO_P. - - * scan-decls.c (scan_decls): Mark parameters `argc' and `argv' - with ATTRIBUTE_UNUSED. Cast variable `start_written' to size_t - when comparing against one. - - * stor-layout.c (layout_decl): Cast maximum_field_alignment to - unsigned when comparing against one. Likewise for - GET_MODE_ALIGNMENT(). - (layout_record): Cast record_align to int when comparing against a - signed value. - (layout_type): Cast TYPE_ALIGN() to int when comparing against a - signed value. - - * tree.c (get_identifier): Cast variable `len' to unsigned when - comparing against one. - (maybe_get_identifier): Likewise - -Wed Dec 23 00:10:01 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (rest_of_compilation): Do not set reload_completed. - * reload1.c (reload): Set reload_completed before calling - cleanup_subreg_operands. - -Tue Dec 22 23:58:31 1998 Richard Henderson - - * reload1.c (emit_reload_insns): Check `set' not null before use. - -Tue Dec 22 15:15:45 1998 Nick Clifton - - * rtlanal.c (multiple_sets): Change type of 'found' from 'rtx' to - 'int'. - -Tue Dec 22 13:55:44 1998 Theodore Papadopoulo - - * halfpic.c (half_pic_encode): Delete redundant code. - -Tue Dec 22 13:02:22 1998 Michael Meissner - - * toplev.c (main): Delete handling of -dM as a preprocessor - option. - -Mon Dec 21 17:39:38 1998 Michael Meissner - - * toplev.c (main): Don't emit any warnings when using -dD, -dM, or - -dI, which are handled by the preprocessor. - -Sun Dec 20 16:13:44 1998 John F. Carr - - * configure.in: Handle Digital UNIX 5.x the same as 4.x. - * i386/sol2.h: Define LOCAL_LABEL_PREFIX as ".". - -Sun Dec 20 07:39:52 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Dec 19 22:24:22 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Dec 19 21:41:32 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Dec 19 09:52:27 1998 Kaveh R. Ghazi - - * genattr.c (fatal): Qualify a char* with the `const' keyword. - - * genattrtab.c (fatal, attr_printf, attr_string, write_attr_set, - write_unit_name, write_eligible_delay, expand_units, - make_length_attrs, write_attr_case, find_attr, - make_internal_attr): Likewise. - * gencheck.c (tree_codes): Likewise. - * gencodes.c (fatal): Likewise. - * genconfig.c (fatal): Likewise. - * genemit.c (fatal): Likewise. - * genextract.c (fatal, walk_rtx, copystr): Likewise. - * genflags.c (fatal): Likewise. - * genopinit.c (fatal, optabs, gen_insn): Likewise. - * genoutput.c (fatal, error, predicates): Likewise. - * genpeep.c (fatal): Likewise. - * genrecog.c (fatal, decision, pred_table, add_to_sequence, - write_tree_1, write_tree, change_state, copystr, indents): Likewise. - -Thu Dec 17 18:21:49 1998 Rainer Orth - - * configure.in (with-fast-fixincludes): Fix whitespace. - * configure: Rebuilt. - - * fixincludes (c_asm.h): Wrap Digital UNIX V4.0B DEC C specific - asm() etc. function declarations in __DECC. - -Thu Dec 17 13:57:23 1998 Nick Clifton - - * expr.c (emit_move_insn_1): Only emit a clobber if the target - is a pseudo register. - -Thu Dec 17 13:50:29 1998 Nick Clifton - - * gcse.c: Include expr.h in order to get the prototype for - get_condition() which is used in delete_null_pointer_checks(). - -Thu Dec 17 15:58:26 1998 Kaveh R. Ghazi - - * hwint.h: New file to consolidate HOST_WIDE_INT (etc) macros. - -Thu Dec 17 12:31:12 1998 Jim Wilson - - * Makefile.in (INTERNAL_CFLAGS): Add SCHED_CFLAGS. - (ALL_CFLAGS): Delete SCHED_CFLAGS. - -1998-12-17 Vladimir N. Makarov - - * config/i60/i960.md (extendqihi2): Fix typo (usage ',' instead of - ';'). - -1998-12-17 Michael Tiemann - - * i960.md (extend*, zero_extend*): Don't generate rtl that looks - like (subreg:SI (reg:SI N) 0), because it's wrong, and it hides - optimizations from the combiner. - -Thu Dec 17 08:27:03 1998 J"orn Rennecke - - * loop.c (combine_givs_used_by_other): Don't depend on n_times_set. - -Wed Dec 16 17:30:35 1998 Nick Clifton - - * toplev.c (main): Disable optimize_size if a specific - optimization level is requested. Always set optimization - level to 2 if -Os is specified. - -Wed Dec 16 16:33:04 1998 Dave Brolley - - * objc/lang-specs.h: Pass -MD, -MMD and -MG to cc1obj if configured with - cpplib. - * cpplib.c (cpp_start_read): If in_fname is not initialized, try to - initialize it using fname. - -1998-12-16 Zack Weinberg - - * cpplib.c (do_include): Treat #include_next in the - primary source file as #include plus warning. Treat - #include_next in a file included by absolute path as an - error. fp == CPP_NULL_BUFFER is a fatal inconsistency. - -Wed Dec 16 12:28:54 1998 Kaveh R. Ghazi - - * cccp.c: Don't define MIN/MAX anymore. - * cpplib.c: Likewise. - * machmode.h: Likewise. - * system.h: Provide definitions for MIN/MAX. - -Tue Dec 15 23:47:42 1998 Zack Weinberg - - * fix-header.c: Don't define xstrdup here. - -Wed Dec 16 05:11:04 1998 J"orn Rennecke - - * loop.c (consec_sets_giv): New argument last_consec_insn. - (strength_reduce): Provide / use it. - -Wed Dec 16 17:24:07 1998 Michael Hayes - - * loop.h (loop_info): New field 'vtop'. - * loop.c (check_dbra_loop): Use loop_info->vtop rather than - scanning loop for vtop. - * unroll.c (subtract_reg_term, find_common_reg_term): New functions. - (loop_iterations): Use them to determine if loop has a constant - number of iterations. Set loop_info->vtop. Don't subtract - common reg term from initial_value and final_value if have a - do-while loop. - -Tue Dec 15 13:49:55 1998 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (addsi3 expander): Use "nonmemory_operand" for operand 2. - - * mn10300.md (bset, bclr): Operand 0 is a read/write operand. - - * mn10200.md (abssf2, negsf2): New expanders. - - * mn10300.md (absdf2, abssf2, negdf2, negsf2): New expanders. - -Tue Dec 15 11:55:30 1998 Nick Clifton - - * integrate.c (copy_rtx_and_substitute): If a SUBREG is - replaced by a CONCAT whose components do not have the same - mode as the original SUBREG, use a new SUBREG to restore the - mode. - - * emit-rtl.c (subreg_realpart_p): Cope with subregs containing - multiword complex values. - -1998-12-15 Zack Weinberg - - * cppalloc.c: Add xstrdup here. - * cpplib.h: Remove savestring prototype. - * cpplib.c: Remove savestring function. s/savestring/xstrdup/ - throughout. - * cppfiles.c: s/savestring/xstrdup/ throughout. - -1998-12-15 Zack Weinberg - - * cpplib.c: Make all directive handlers read their own - arguments. - (struct directive): Remove last two arguments from FUNC - member prototype. Remove `command_reads_line' member - entirely. - (directive_table): Remove initializations of - command_reads_line flag. Pretty-print. - (eval_if_expression, do_define, do_line, do_include, - do_undef, do_error, do_pragma, do_ident, do_if, do_xifdef, - do_else, do_elif, do_sccs, do_assert, do_unassert, - do_warning): Take only two args. - - (cpp_define): Call do_define with two args and the text to - define stuffed into a buffer. - (make_assertion): Call do_assert with two args. - (handle_directive): Call do_line with two args. Call - kt->func with two args. Remove command_reads_line - processing. - (do_define, do_undef, do_error, do_warning, do_pragma, - do_sccs): Read the rest of the line here. - (do_ident): Gobble rest of line, as cccp does. - (cpp_undef): New function. - (cpp_start_read): Call cpp_undef instead of do_undef. - -1998-12-15 Zack Weinberg - - * cpphash.h (union hash_value): Remove `keydef' member, add a - `struct hashnode *aschain' member for #assert. - - * cpplib.c (struct tokenlist_list, struct - assertion_hashnode): Delete structure definitions. - (assertion_install, assertion_lookup, delete_assertion, - check_assertion, compare_token_lists, reverse_token_list, - read_token_list, free_token_list): Delete functions. - (parse_assertion): New function. - (cpp_cleanup): Don't destroy the assertion_hashtable. - - (do_assert): Gut and rewrite. #assert foo (bar) places - entries for `#foo' and `#foo(bar)' in the macro hash table, - type T_ASSERT. The value union's `aschain' member is used - to chain all answers for a given predicate together. - (do_unassert): Also rewritten. Take an un-asserted - answer off the chain from its predicate and call - delete_macro on the hashnode, or walk a predicate chain - calling delete_macro on all the entries. - (cpp_read_check_assertion): Simply call parse_assertion to - get the canonical assertion name, and look that up in the - hash table. - - * cpplib.h (ASSERTION_HASHNODE,ASSERTION_HASHSIZE,assertion_hashtab): - Removed. - - * cpphash.c (install): Use bcopy instead of an explicit loop - to copy the macro name. - - * cppexp.c (cpp_lex): Convert the result of - cpp_read_check_assertion to a `struct operation' directly; - don't go through parse_number. - -Tue Dec 15 18:27:39 1998 J"orn Rennecke - - * loop.h (struct induction): Delete times_used member. - * loop.c (n_times_set): Rename to set_in_loop. Changed all users. - (n_times_used): Rename to n_times_set. Changed all users. - (scan_loop): Free reg_single_usage before strength reduction. - (record_giv, combine_givs): Remove handling of times_used member. - (combine_givs_used_once): Rename to: - (combine_givs_used_by_other) . Changed all callers. - -Tue Dec 15 01:45:26 1998 Jason Merrill - - * dwarf2out.c (gen_struct_or_union_type_die): Check AGGREGATE_TYPE_P - instead of TREE_CODE_CLASS == 't'. - (gen_type_die): Likewise. - (scope_die_for): Ignore FUNCTION_TYPE "scopes". - -Mon Dec 14 16:23:27 1998 Jim Wilson - - * real.c (endian): Disable last change unless - HOST_BITS_PER_WIDE_INT is greater than 32. - -Mon Dec 14 17:13:36 1998 Andrew MacLeod - - * output.h (force_data_section): New prototype. - * varasm.c (force_data_section): New function to force the - data section, regardless of what in_section thinks. - * dwarf2out.c (output_call_frame_info): Call force_data_section - since varasm may not realize we've changes sections. - -Mon Dec 14 14:09:34 1998 Nick Clifton - - * reload1.c (reload): Delete REG_RETVAL and REG_LIBCALL notes - after completing reload. - - * rtl.texi: Document that REG_RETVAL and REG_LIBCALL are - deleted after reload. - -Mon Dec 14 01:39:28 1998 Jeffrey A Law (law@cygnus.com) - - * rtl.h (multiple_sets): Fix prototype. - * rtlanal.c (multiple_sets): Fix return type. - -Sun Dec 13 12:43:58 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Dec 13 01:05:22 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -1998-12-13 Manfred Hollstein - - * protoize.c (fputs): Wrap extern declaration in #ifndef fputs. - -Sun Dec 13 00:24:14 1998 J"orn Rennecke - - * rtl.h (recompute_reg_usage): Add second argument. - * flow.c (recompute_reg_usage): Likewise. - * toplev.c (rest_of_compilation): Supply second argument to - recompute_reg_usage. - - * reload1.c (compute_use_by_pseudos): Allow reg_renumber[regno] < 0 - after reload. - -Sat Dec 12 23:39:10 1998 Jeffrey A Law (law@cygnus.com) - - * m68k/t-m68kelf (MULTILIB_OPTIONS): Add mcpu32. - (MULTILIB_MATCHES): -m68332 now uses mcpu32 libraries, not m68000. - (MULTILIB_EXCEPTIONS): Don't build 68881 libraries for m68000, - mcpu32 or m5200. - - * i386/next.h (ASM_OUTPUT_ALIGN): Use 0x90 for fill character. - - * rtlanal.c (multiple_sets): New function. - * rtl.h (multiple_sets): Declare it. - * local-alloc.c (wipe_dead_reg): Use it. - * global.c (global_conflicts): Likewise. - -Sat Dec 12 22:13:02 1998 Mark Mitchell - - * global.c (record_conflicts): Don't use an array of shorts to - store an array of ints. - (global_conflicts): Likewise. - -Sat Dec 12 16:49:24 1998 Richard Henderson - - * alpha.c (alpha_expand_block_move): mode_for_size expects - bits, not bytes. Infer extra alignment from addressof. - -1998-12-11 Michael Meissner - - * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Put small data in the - .sbss section, not .sdata. - -1998-12-11 Manfred Hollstein - - * cccp.c: Do not #include here; this is already done - by "system.h". - * collect2.c: Likewise. - * cpplib.h: Likewise. - * gcc.c: Likewise. - * gcov.c: Likewise. - * getpwd.c: Likewise. - * protoize.c: Likewise. - * toplev.c: Likewise. - - * cpplib.h (HOST_WIDE_INT): Get definition from "machmode.h" - and don't try to define it here. - * Makefile.in (cppmain.o): Depend on machmode.h. - (cpplib.o): Likewise. - (cpperror.o): Likewise. - (cppexp.o): Likewise. - (cppfiles.o): Likewise. - (cpphash.o): Likewise. - (cppalloc.o): Likewise. - (fix-header.o): Likewise. - (scan-decls.o): Likewise. - -Fri Dec 11 11:02:49 1998 Stan Cox - - * sh.c (print_operand): Lookup interrupt_handler attribute instead - of relying on static variable. - * (calc_live_regs): Likewise. - * (sh_pragma_insert_attributes): Create interrupt_handler - attribute if a pragma was specified. - * (sh_valid_machine_decl_attribute): Don't set static flag. - * sh.h (PRAGMA_INSERT_ATTRIBUTES): New. - -Fri Dec 11 12:56:07 1998 J"orn Rennecke - - * reload1.c (reload_combine): Use BASIC_BLOCK_LIVE_AT_START - to determine if a register is live at a jump destination. - Everything is dead at a BARRIER. - -Thu Dec 10 16:02:06 1998 Jim Wilson - - * cse.c (simplify_unary_operation): Sign-extend constants when - they have the most significant bit set for the target. - * real.c (endian): Sign-extend 32 bit output values on a 64 bit - host. - * m32r/m32r.c (m32r_expand_prologue): Store pretend_size in - HOST_WIDE_INT temporary before negating it. - * m32r/m32r.md (movsi_insn+1): Use ~0xffff instead of 0xffff0000. - -Thu Dec 10 15:05:59 1998 Dave Brolley - - * objc/objc-act.c (lang_init_options): Enclose cpplib related code in - #if USE_CPPLIB. - -Thu Dec 10 13:39:46 1998 Kaveh R. Ghazi - - * collect2.h: New header file for prototypes. - - * Makefile.in (collect2.o, tlink.o): Depend on collect2.h. - - * collect2.c: Include collect2.h. - * tlink.c: Likewise. - -Wed Dec 9 23:55:11 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c: Update some comments. - -Wed Dec 9 15:29:26 1998 Dave Brolley - - * objc/objc-act.c (cpp_initialized): Removed. - (lang_init_options): Initialize cpplib. - (lang_decode_option): Move initialization of cpplib to - lang_init_options. - * c-lang.c (parse_options,parse_in): Added. - (lang_init_options): Initialized cpplib here. - * c-decl.c (parse_options,cpp_initialized): Removed. - (c_decode_option): Move initialization of cpplib to - lang_init_options. - -Wed Dec 9 19:36:57 1998 J"orn Rennecke - - * reload1.c (reload_combine, reload_combine_note_store): - Make STORE_RUID always valid. - (reload_combine): Check if BASE is clobbered too early. - -Wed Dec 9 09:53:58 1998 Nick Clifton - - * reload.c (find_reloads): Display the insn that cannot be - reloaded. - -Wed Dec 9 12:15:26 1998 Dave Brolley - - * cccp.c (create_definition): Fix end of buffer logic. - -Wed Dec 9 10:15:45 1998 Kaveh R. Ghazi - - * except.c (duplicate_eh_handlers, rethrow_symbol_map): Function - pointer parameters changed to use the PARAMS() macro. - -Wed Dec 9 09:12:40 1998 Andrew MacLeod - - * except.h (struct handler_info): Add handler_number field. - * except.c (gen_exception_label): EH labels no longer need to be - on the permanent obstack. - (get_new_handler): Set the label number field. - (output_exception_table_entry): Regenerate handler label reference - from the label number field. - (init_eh): Remove a blank line. - * integrate.c (get_label_from_map): Labels no longer need to be - on the permanent obstack. - -Tue Dec 8 22:04:33 1998 Jim Wilson - - * i960/i960.h (CONST_COSTS, case CONST_INT): Accept power2_operand - only when OUTER_CODE is SET. - -Tue Dec 8 22:47:15 1998 J"orn Rennecke - - * loop.c (strength_reduce): If scan_start points to the loop exit - test, be wary of subversive use of gotos inside expression statements. - Don't set maybe_multiple for a backward jump that does not - include the label under consideration into its range. - * unroll.c (biv_total_increment): Make use of maybe_multiple field. - -Tue Dec 8 22:33:18 1998 J"orn Rennecke - - * explow.c (plus_constant_wide): Don't immediately return with - result of recursive call. - -Tue Dec 8 15:32:56 1998 Andrew MacLeod - - * eh-common.h (struct eh_context): Add table_index for rethrows. - - * rtl.h (enum reg_note): Add REG_EH_REGION and REG_EH_RETHROW reg notes. - (SYMBOL_REF_NEED_ADJUST): New flag indicating symbol needs to be - processed when inlined or unrolled (ie duplicated in some way). - - * rtl.c (reg_note_name): Add strings for new reg_note enums. - - * expr.h (rethrow_libfunc): New library decl. - - * optabs.c (rethrow_libfunc): Initialize. - - * except.h (struct eh_entry): Add new field 'rethrow_label'. - (new_eh_region_entry): No longer exported from except.c. - (duplicate_handlers): Renamed to duplicate_eh_handlers and - different prototype. - (rethrow_symbol_map, rethrow_used): New exported functions. - (eh_region_from_symbol): New exported function. - - * except.c (create_rethrow_ref): New function to create a single - SYMBOL_REF for a rethrow region. - (push_eh_entry): Initialize a rethrow ref. - (func_eh_entry): Add a rethrow_label field. - (new_eh_region_entry): Make static, and initialize the rethrow entry. - (duplicate_eh_handlers): Create a new region, and remap labels/symbols. - (eh_region_from_symbol): Find an EH region based on its rethrow symbol. - (rethrow_symbol_map): Given a label map, maps a rethrow symbol for - a region into an appropriate new symbol. - (rethrow_used): Indicate whether a rethrow symbol has been referenced. - (expand_eh_region_end): Don't issue jump around code for new-exceptions. - (end_catch_handler): Emit a barrier for new-exceptions since - control can never drop through the end of a catch block. - (expand_end_all_catch): new-exceptions never fall through a catch - block. - (expand_rethrow): Use __rethrow routine for new exceptions. - (output_exception_table_entry): Generate rethrow labels, if needed. - (output_exception_table): Generate start and end rethrow labels. - (init_eh): Create rethrow symbols for beginning and end of table. - (scan_region): Don't eliminate EH regions which are the targets of - rethrows. - - * flow.c (make_edges): Add different edges for rethrow calls, - identified by having the REG_EH_RETHROW reg label. - (delete_unreachable_blocks): Don't delete regions markers which are - the target of a rethrow. - - * integrate.c (save_for_inline_eh_labelmap): New callback routine to - allow save_for_inline_copying to call duplicate_eh_handlers. - (save_for_inline_copying): Call duplicate_eh_handlers instead of - exposing internal details of exception regions. - (copy_for_inline): Check if SYMBOL_REFs need adjustment. - (expand_inline_function_eh_labelmap): New callback routine to - allow expand_inline_function to call duplicate_eh_handlers. - (expand_inline_function): Call duplicate_eh_handlers instead of - exposing internal details of exception regions. - (copy_rtx_and_substitute): Adjust SYMBOL_REFS if SYMBOL_REF_NEED_ADJUST - flag is set. - - * libgcc2.c (find_exception_handler): Generalize to enable it to - pick up processing where it left off last time for a rethrow. - (__unwinding_cleanup): New function. debug hook which is called before - unwinding when __throw finds there is nothing but cleanups left. - (throw_helper): Common parts of __throw extracted out for reuse. - (__throw): Common parts moved to throw_helper. - (__rethrow): New function for performing rethrows. - -Tue Dec 8 13:11:04 1998 Jeffrey A Law (law@cygnus.com) - - * reload1.c (current_function_decl): Tweak declaration. - -Tue Dec 8 10:23:52 1998 Richard Henderson - - * c-decl.c (flag_isoc9x): Default off. - (c_decode_option): Kill -std=gnu, add -std=gnu89 and -std=gnu9x. - * cccp.c (print_help, main): Likewise. - * gcc.c (default_compilers): Update for -std=gnu*. - -Tue Dec 8 01:14:46 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (DEMANGLE_H): Change location to shared demangle.h. - * demangle.h: Deleted. - - * reload1.c (current_function_decl): Declare. - -Tue Dec 8 11:58:51 1998 Kaveh R. Ghazi - - * cpplib.c (convert_string): Use `0x00ff', not `0x00ffU'. - -Tue Dec 8 09:28:36 1998 Kaveh R. Ghazi - - * dbxout.c: If USG is defined use gstab.h, even if HAVE_STAB_H is set. - -1998-12-08 Ulrich Drepper - - * configure.in: Test for availability of putc_unlocked, fputc_unlocked, - and fputs_unlocked. - * configure: Rebuilt. - * system.h: If the *_unlocked functions are available use them - instead of the locked counterparts by defining macros. - * config.in: Regenerated. - -Tue Dec 8 00:34:05 1998 Mike Stump - - * i386/bsd.h (ASM_FILE_START): Don't use dump_base_name, it is - wrong and should only be used for dump related things, not - debugging information, instead main_input_filename should be used. - Also, reuse output_file_directive if possible. - * i386/aix386ng.h (ASM_FILE_START): Likewise. - * i386/isc.h (ASM_FILE_START): Likewise. - * i386/win-nt.h (ASM_FILE_START): Likewise. - * i386/sun386.h (ASM_FILE_START): Likewise. - -Mon Dec 7 23:56:28 1998 Robert Lipe - - * configure.in (mips*-*-linux*): Handle big and little endian - systems. - * configure: Rebuilt. - -Mon Dec 7 23:14:51 1998 Mike Stump - - * emit-rtl.c: Fix typo. - -Mon Dec 7 23:07:38 1998 Nathan Sidwell - - * reload1.c (eliminate_regs): Don't do anything, if we're not - generating code. - -Mon Dec 7 15:27:09 1998 DJ Delorie - - * mips/mips.h (ENCODE_SECTION_INFO): Handle TARGET_EMBEDDED_DATA. - Add comment. - * mips/mips.c (mips_select_section): Add comment. - -Mon Dec 7 17:55:06 1998 Mike Stump - - * cccp.c (ignore_escape_flag): Add support for \ as `natural' - characters in file names in #line to be consistent with #include - handling. We support escape processing in the # 1 "..." version of - the command. See also support in cp/lex.c. - (handle_directive): Likewise. - (do_line): Likewise. - -1998-12-07 Zack Weinberg - - * cpplib.c (initialize_char_syntax): Use ISALPHA and ISALNUM - so it'll work on non-ASCII platforms. Always consider $ an - identifier character. Take no arguments. - (cpp_reader_init): Call initialize_char_syntax with no - arguments. - (cpp_start_read): Don't call initialize_char_syntax again. - Clear is_idchar['$'] and is_idstart['$'] if not - opts->dollars_in_ident. - - * cpplib.h (struct cpp_reader): Replace void *data element by - cpp_options *opts. Rearrange elements to make gdb printout - less annoying (put buffer stack at end). - (CPP_OPTIONS): Get rid of now-unnecessary cast. - - * cppmain.c: s/data/opts/ when initializing cpp_reader - structure. - * c-decl.c: Likewise. - * objc/objc-act.c: Likewise. - * fix-header.c: Likewise. - -1998-12-07 Zack Weinberg - - * cpplib.h (struct cpp_buffer): Replace dir and dlen members - with a struct file_name_list pointer. - (struct cpp_reader): Add pointer to chain of `actual - directory' include searchpath entries. - (struct file_name_list): Add *alloc pointer for the sake of - the actual-directory chain. - - Move definition of HOST_WIDE_INT here. - (cpp_parse_escape): Change prototype to match changes in - cppexp.c. - - * cppfiles.c (actual_directory): New function. - (finclude): Use it to initialize the buffer's actual_dir - entry. - (find_include_file): We don't need to fix up max_include_len - here. - - * cpplib.c (do_include): Don't allocate a file_name_list on - the fly for current directory "" includes, use the one that's - been preallocated in pfile->buffer->actual_dir. Hoist out - duplicate code from the search_start selection logic. - (cpp_reader_init): Initialize pfile->actual_dirs. - - Remove definition of HOST_WIDE_INT. Change calls - to cpp_parse_escape to match changes in cppexp.c (note - hardcoded MASK, which is safe since this is the source - character set). - - * cppexp.c: Bring over changes to cpp_parse_escape from cccp.c - to handle wide character constants in #if directives. The - function now returns a HOST_WIDE_INT, and takes a third - argument which is a binary mask for all legal values (0x00ff - for 8-bit `char', 0xffff for 16-bit `wchar_t', etc.) Define - MAX_CHAR_TYPE_MASK and MAX_WCHAR_TYPE_MASK. Change callers of - cpp_parse_escape to match. [Fixes c-torture/execute/widechar-1.c] - -Mon Dec 7 15:38:25 1998 Dave Brolley - - * gcc.c (default_compilers): Fix typo in USE_CPPLIB spec for cc1. - -Mon Dec 7 15:38:25 1998 Kaveh R. Ghazi - - * c-aux-info.c (concat): Wrap function definition in !USE_CPPLIB. - * cppalloc.c: Move function `xcalloc' from cpplib.c to here. - * cpplib.c: Move function `xcalloc' from here to cppalloc.c. - -Mon Dec 7 11:30:49 1998 Nick Clifton - - * final.c (output_asm_name): Use tabs to separate comments from - assembly text. - - Include instruction lengths (if defined) in output. - -Mon Dec 7 10:53:38 1998 Michael Hayes - - * loop.c (check_dbra_loop): Fix initial_value and initial_equiv_value - in the loop_info structure. - -Mon Dec 7 11:04:40 1998 Catherine Moore - - * configure.in (arm*-*-ecos-elf): New target. - * configure: Regenerated. - * config/arm/elf.h (ASM_WEAKEN_LABEL): Define. - * config/arm/ecos-elf.h: New file. - * config/arm/unknown-elf.h (TARGET_VERSION): Check - for redefinition. - -Mon Dec 7 16:15:51 1998 J"orn Rennecke - - * sh.c (output_far_jump): Emit braf only for TARGET_SH2. - -Sun Dec 6 04:19:45 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Dec 6 05:16:16 1998 Michael Hayes - - * loop.c (check_dbra_loop): New argument loop_info. Update fields - as needed. - -Sun Dec 6 03:40:13 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Dec 6 07:49:29 1998 Alexandre Oliva - - * gcc.texi (Bug Reporting): 40Kb is a soft limit, larger - compressed reports are ok and preferred over URLs. - -Sun Dec 6 07:45:33 1998 Alexandre Oliva - - * invoke.texi (Warning Options): Soften the tone of -pedantic. - -Sun Dec 6 00:20:44 1998 H.J. Lu (hjl@gnu.org) - - * print-rtl.c (print_rtx): Add prototype. - - * unroll.c (iteration_info): Make it static. - -Sun Dec 6 01:19:46 1998 Richard Henderson - - * alias.c (memrefs_conflict_p): A second ANDed address - disables the aligned address optimization. - -Sat Dec 5 18:48:25 1998 Richard Henderson - - * alpha.c (alpha_emit_set_const_1): Fix parenthesis error - in -c << n case. - -Sat Dec 5 15:14:52 1998 Jason Merrill - - * i960.h (BOOL_TYPE_SIZE): Define. - -Sun Dec 6 00:28:16 1998 Michael Hayes - - * config/c4x/c4x.c (valid_parallel_load_store): Flog functionality - from old valid_parallel_operands_4. - (valid_parallel_operands_4): Check that operands for 4 operand - parallel insns are valid, excluding load/store insns. - * config/c4x/c4x.h (valid_parallel_load_store): Add prototype. - * config/c4x/c4x.md (*movqf_parallel, *movqi_parallel): Use - valid_parallel_load_store instead of valid_parallel_operands_4. - (*absqf2_movqf_clobber, *floatqiqf2_movqf_clobber, - *negqf2_movqf_clobber, *absqi2_movqi_clobber, - *fixqfqi2_movqi_clobber, *negqi2_movqi_clobber, - *notqi_movqi_clobber): Use valid_parallel_operands_4. - (*subqf3_movqf_clobber, *ashlqi3_movqi_clobber, - *ashrqi3_movqi_clobber, *lshrqi3_movqi_clobber, - *subqi3_movqi_clobber): Use valid_parallel_operands_5. - -Sat Dec 5 23:52:01 1998 Michael Hayes - - * config/c4x/c4x.c (iteration_info): Delete extern. - -Fri Dec 4 20:15:57 1998 Bernd Schmidt - - * tm.texi (SMALL_REGISTER_CLASSES): Make description match reality. - - * final.c (cleanup_subreg_operands): Delete some unused code. - - * recog.h (MAX_RECOG_ALTERNATIVES): New macro. - (struct insn_alternative): New structure definition. - (recog_op_alt): Declare variable. - (preprocess_constraints): Declare function. - * recog.c (recog_op_alt): New variable. - (extract_insn): Verify number of alternatives is in range. - (preprocess_constraints): New function. - * reg-stack.c: Include recog.h. - (constrain_asm_operands): Delete. - (get_asm_operand_lengths): Delete. - (get_asm_operand_n_inputs): New function. - (record_asm_reg_life): Delete OPERANDS, CONSTRAINTS, N_INPUTS and - N_OUTPUTS args. All callers changed. - Compute number of inputs and outputs here by calling - get_asm_operand_n_inputs. - Instead of constrain_asm_operands, call extract_insn, - constrain_operands and preprocess_constraints. Use information - computed by these functions throughout. - (record_reg_life): Delete code that is unused due to changes in - record_asm_reg_life. - (subst_asm_stack_regs): Delete OPERANDS, OPERAND_LOC, CONSTRAINTS, - N_INPUTS and N_OUTPUTS args. All callers changed. - Similar changes as in record_asm_reg_life. - (subst_stack_regs): Move n_operands declaration into the if statement - where it's used. - Delete code that is unused due to changes in subst_asm_stack_regs. - * stmt.c (expand_asm_operands): Verify number of alternatives is in - range. - * Makefile.in (reg-stack.o): Depend on recog.h. - -Fri Dec 4 02:23:24 1998 Jeffrey A Law (law@cygnus.com) - - * except.c (set_exception_version_code): Argument is an "int". - -Fri Dec 4 01:29:28 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in (hppa2*-*-*): Handle like hppa1.1-*-* for now. - * configure: Rebuilt. - -Fri Dec 4 01:29:28 1998 Robert Lipe - - * configure.in (mipsel-*-linux*): New target. - * mips/linux.h: New file, based on other Linux targets. - -Thu Dec 3 11:19:50 1998 Mike Stump - - * gthr-vxworks.h (__ehdtor): Fix memory leak. The delete hook - runs in the context of the deleter, not the deletee, so we must - use taskVarGet to find the correct memory to free. - (__gthread_key_create): Initialize the task - variable subsystem so that the task variable is still active when - the delete hook is run. - -1998-12-03 Joseph S. Myers - - * pdp11.h: Use optimize_size for space optimizations. - * pdp11.c: Likewise. - * pdp11.md: Likewise. - - * pdp11.h (TARGET_40_PLUS): Fix typo. - -Thu Dec 3 11:48:32 1998 Jeffrey A Law (law@cygnus.com) - - * local-alloc.c (block_alloc): Slightly retune heuristic to widen - qty lifetimes. - -Thu Dec 3 22:30:18 1998 Michael Hayes - - * alias.c (addr_side_effect_eval): New function. - (memrefs_conflict_p): Use it. - * rtl.h (addr_side_effect_eval): Prototype it. - -1998-12-02 Joseph S. Myers - - * pdp11.md (extendsfdf2): Fix mode mismatch in SET. - -Wed Dec 2 11:23:07 1998 Jim Wilson - - * reload.c (find_reloads): When force const to memory, put result - in substed_operand not *recog_operand_loc. - -1998-12-02 Ulrich Drepper - - * c-lex.c: Fix indentation from last patch. - Remove trailing whitespace. - * real.c: Likewise. - -Wed Dec 2 10:11:12 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (delete_block): Call set_last_insn after we have reset - NEXT_INSN (kept_tail). - -Wed Dec 2 00:47:31 1998 Jeffrey A Law (law@cygnus.com) - - * mips.md (trap_if): Use "$0" for the value zero. - -Tue Dec 1 20:49:49 1998 Ulrich Drepper - Stephen L Moshier - Richard Henderson - - * c-common.c (declare_function_name): Declare predefined variable - `__func__'. - - * c-decl.c (flag_isoc9x): Set to 1 by default. - (c_decode_option): Handle -std= option. Remove -flang-isoc9x. - (grokdeclarator): Always emit warning about implicit int for ISO C 9x. - - * c-parse.in: Allow constructors in ISO C 9x. - Rewrite designator list handling. - Allow [*] parameters. - Don't warn about comma at end of enum definition for ISO C 9x. - - * cccp.c (c9x): New variable. - (rest_extension): New variable. - (print_help): Document new -std= option. - (main): Recognize -std= option. Set c9x appropriately. - (create_definition): Recognize ISO C 9x vararg macros. - - * gcc.c (default_compilers): Adjust specs for -std options. - (option_map): Add --std. - (display_help): Document -std. - - * toplev.c (documented_lang_options): Add -std and remove - -flang-isoc9x. - - * c-lex.c (yylex): Recognize hex FP constants and call REAL_VALUE_ATOF - or REAL_VALUE_HTOF based on base of the constants. - * fold-const.c (real_hex_to_f): New function. Replacement function - for hex FP conversion if REAL_ARITHMETIC is not defined. - * real.c (asctoeg): Add handling of hex FP constants. - * real.h: Define REAL_VALUE_HTOF if necessary using ereal_atof or - real_hex_to_f. - -Tue Dec 1 16:45:49 1998 Stan Cox - - * mips.md (divmodsi4*, divmoddi4*, udivmodsi4*, udivmoddi4): Add - -mcheck-range-division/-mcheck-zero-division checking. Avoid as macro - expansion. Use hi/lo as destination register. - (div_trap): New. - (divsi3*, divdi3*, modsi3*, moddi3*, udivsi3*, udivdi3*, umodsi3*, - umoddi3*): Add -mcheck-range-division/-mcheck-zero-division checking. - Avoid as macro expansion. Use hi/lo as destination register. - - * mips.h (MASK_CHECK_RANGE_DIV): New. - (MASK_NO_CHECK_ZERO_DIV): New. - (ELIMINABLE_REGS): Added GP_REG_FIRST + 31. - (CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET): Allow for getting - return address for leaf functions out of r31 to support - builtin_return_address. - -Tue Dec 1 15:03:30 1998 Herman A.J. ten Brugge - - * jump.c (jump_optimize): Call regs_set_between_p with PREV_INSN(x), - NEXT_INSN(x) to check insn x. - -Tue Dec 1 15:20:44 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (delete_block): Call set_last_insn if we end up deleting the - last insn in the rtl chain. - - * reload1.c (reload): Do not set reload_completed or split insns - here. Instead... - * toplev.c (rest_of_compilation): Set reload_completed after - reload returns. Split insns after reload_cse has run. - -Tue Dec 1 11:55:04 1998 Richard Henderson - - * final.c (final_scan_insn): Abort if block_depth falls below 0. - -Tue Dec 1 10:23:16 1998 Nick Clifton - - * config/arm/t-arm-elf (LIBGCC2_CFLAGS): Define inhibit_libc. - -Tue Dec 1 10:22:18 1998 Nick Clifton - - * config/arm/unknown-elf.h (ASM_OUTPUT_DWARF2_ADDR_CONST): Remove - use of user-label_prefix. - -Tue Dec 1 17:58:26 1998 J"orn Rennecke - - * reload1.c (emit_reload_insns): Clear spill_reg_store - when doing a new non-inherited reload from the same pseudo. - - * local-alloc.c (function_invariant_p): New function. - (update_equiv_regs): Use function_invariant_p instead of CONSTANT_P - to decide if an equivalence should be recorded. - * reload1.c (num_eliminable_invariants): New static variable. - (reload): Set it. Use function_invariant_p instead of CONSTANT_P - to decide if an equivalence should be recorded. - Unshare PLUS. - (calculate_needs_all_insns): Skip insns that only set an equivalence. - Take num_eliminable_invariants into account when deciding - if register elimination should be done. - (reload_as_needed): Take num_eliminable_invariants into account - when deciding if register elimination should be done. - (eliminate_regs): Handle non-constant reg_equiv_constant. - * rtl.h (function_invariant_p): Declare. - -Mon Nov 30 02:00:08 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Nov 30 00:42:59 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Nov 29 22:59:40 1998 Jason Merrill - - * except.c (add_new_handler): Complain about additional handlers - after one that catches everything. - -Sat Nov 28 10:56:32 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in (alpha*-*-netbsd): Fix typo. - * configure: Rebuilt. - -Fri Nov 27 12:28:56 1998 Kaveh R. Ghazi - - * system.h: Include libiberty.h. - - * c-aux-info.c: Remove prototypes for concat/concat3. Change - function `concat' from fixed parameters to variable parameters, - as is done in libiberty. All callers of concat/concat3 - changed to use the new `concat' with variable args. - - * cccp.c: Remove things made redundant by libiberty.h and/or - conform to libiberty standards. - * cexp.y: Likewise. - * collect2.c: Likewise. - * config/1750a/1750a.h: Likewise. - * cppalloc.c: Likewise. - * cppexp.c: Likewise. - * cppfiles.c: Likewise. - * cpphash.c: Likewise. - * cpplib.c: Likewise. - * dyn-string.c: Likewise. - * fix-header.c: Likewise. - * gcc.c: Likewise. - * gcov.c: Likewise. - * genattr.c: Likewise. - * genattrtab.c: Likewise. - * gencheck.c: Likewise. - * gencodes.c: Likewise. - * genconfig.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * genflags.c: Likewise. - * gengenrtl.c: Likewise. - * genopinit.c: Likewise. - * genoutput.c: Likewise. - * genpeep.c: Likewise. - * genrecog.c: Likewise. - * getpwd.c: Likewise. - * halfpic.c: Likewise. - * hash.c: Likewise. - * mips-tdump.c: Likewise. Wrap malloc/realloc/calloc prototypes - in NEED_DECLARATION_* macros. - - * mips-tfile.c: Remove things made redundant by libiberty.h and/or - conform to libiberty standards. - (fatal): Fix const-ification of variable `format' in - !ANSI_PROTOTYPES case. - - * prefix.c: Remove things made redundant by libiberty.h and/or - conform to libiberty standards. - - * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid - conflicting with function `spaces' from libiberty. - - * profile.c: Remove things made redundant by libiberty.h and/or - conform to libiberty standards. - * protoize.c: Likewise. - * rtl.h: Likewise. - * scan.h: Likewise. - * tlink.c: Likewise. - * toplev.c: Likewise. - * toplev.h: Likewise. - * tree.h: Likewise. - -Thu Nov 26 08:38:06 1998 Kaveh R. Ghazi - - * cppfiles.c (simplify_pathname): Un-ANSI-fy function definition. - -Thu Nov 26 23:45:37 1998 Michael Hayes - - * README.C4X: Updated URLs. - * config/c4x/c4x.c (c4x_address_conflict): Fix typo. - (valid_parallel_operands_5): Remove unused variable. - -Thu Nov 26 23:40:03 1998 Michael Hayes - - * config/c4x/c4x.h (TARGET_DEFAULT): Fix typo. - -1998-11-26 Manfred Hollstein - - * Makefile.in (CONFIG_LANGUAGES): New macro taking all languages - which can be configured. - (LANGUAGES): Use $(CONFIG_LANGUAGES) instead of @all_languages@ - (Makefile): Pass actual LANGUAGES through the environment when - re-configuring. - (cstamp-h): Likewise. - (config.status): Likewise. - - * configure.in (enable_languages): Add new configuration parameter - "--enable-languages=lang1,lang2,...". - (${srcdir}/*/config-lang.in): Change handling to configure only - those directories, that the user might have enabled; default to - "all" existing languages. - * configure: Regenerate. - -Thu Nov 26 00:19:19 1998 Richard Henderson - - * rtlanal.c (regs_set_between_p): New function. - * rtl.h (regs_set_between_p): Prototype it. - * jump.c (jump_optimize): Use it instead of modified_between_p - in the Sep 2 change. - -Wed Nov 25 23:32:02 1998 Ian Dall - Matthias Pfaller - - * invoke.texi (Option Summary, NS32K Options): Add description - of NS32K specific options. - - * ns32k.md (tstdf, cmpdf, movdf, truncdfsf2, fixdfqi2, fixdfhi2, - fixdfsi2, fixunsdfqi2, fixunsdfhi2, fixunsdfsi2, fix_truncdfqi2, - fix_truncdfhi2, fix_truncdfsi2, adddf3, subdf3, muldf3, divdf3, - negdf2, absdf2): Use l instead of f since the double class and - float class are no longer the same. - (cmpsi, truncsiqi2, truncsihi2, addsi3, subsi3, mulsi3, umulsidi3, - divsi3, modsi3, andsi3, iorsi3, xorsi3, negsi2, one_cmplsi2, - ashlsi3, ashlhi3, ashlqi3, rotlsi3, rotlhi3, rotlqi3, abssi2,...): - Use "g" instead of "rmn" since LEGITIMATE_PIC_OPERAND has been - fixed. - (cmpsi, cmphi, cmpqi): Use general_operand instead of - non_immediate_operand. Removes erroneous assumption that can't - compare constants. - (movsf, movsi, movhi, movqi,...): New register numbering scheme. - (movsi, addsi3): Use NS32K_DISPLACEMENT_P instead of hard coded - constants. - (movstrsi, movstrsi1, movstrsi2): Completely new block move - scheme. - (...): Patterns to exploit multiply-add instructions. - (udivmodsi4, udivmodsi_internal4, udivmodhi4, - udivmoddihi4_internal, udivmodqi4, udivmoddiqi4_internal): New - patterns to exploit extended divide insns. - (udivsi3, udivhi3, udivqi3): Remove since superseded by udivmodsi - etc patterns. - - * ns32k.h (FUNCTION_VALUE, LIBCALL_VALUE): Use f0 for complex - float return values as well as simple scalar floats. - (TARGET_32381, TARGET_MULT_ADD, TARGET_SWITCHES): - Support new flag to denote 32381 fpu. - (OVERRIDE_OPTIONS): 32381 is a strict superset of 32081. - (CONDITIONAL_REGISTER_USAGE): Disable extra 32381 registers if not - compiling for 32381. - (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS, CALL_USED_REGISTERS, - REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES, OUTPUT_REGISTER_NAMES, - REG_ALLOC_ORDER, DBX_REGISTER_NUMBER, R0_REGNUM, F0_REGNUM, - L1_REGNUM, STACK_POINTER_REGNUM, FRAME_POINTER_REGNUM, - LONG_FP_REGS_P, ARG_POINTER_REGNUM, reg_class, REG_CLASS_NAMES, - REG_CLASS_CONTENTS, SUBSET_P,REGNO_REG_CLASS, - REG_CLASS_FROM_LETTER, FUNCTION_PROLOGUE, FUNCTION_EPILOGUE, - REGNO_OK_FOR_INDEX_P, FP_REG_P, REG_OK_FOR_INDEX_P, - REG_OK_FOR_BASE_P, MEM_REG): New register scheme to include 32381 - fpu registers and special register classes for new 32381 - instructions dotf and polyf. - (MODES_TIEABLE_P): Allow all integer modes, notably DI and SI, to - be tieable. - (INCOMING_RETURN_ADDR_RTX, RETURN_ADDR_RTX, - INCOMING_FRAME_SP_OFFSET): New macros in case DWARF support is - required. - (SMALL_REGISTER_CLASSES): Make dependent on -mmult-add option. - (MOVE_RATIO): Set to zero because of smart movstrsi implementation. - (REGISTER_MOVE_COST): Move code to register_move_cost function for - ease of coding and debugging. - (CLASS_LIKELY_SPILLED_P): Under new register scheme class - LONG_FLOAT_REGO is likely spilled but not caught by default - definition. - (CONSTANT_ADDRESS_P, CONSTANT_ADDRESS_NO_LABEL_P): Use macro - instead of hard coded numbers in range check. - (ASM_OUTPUT_LABELREF_AS_INT): Delete since unused. - (...): Add prototypes for functions in ns32k.c but disable because - of problems when ns32k.h is included in machine independent files. - - * ns32k.c: Include "system.h", "tree.h", "expr.h", "flags.h". - (ns32k_reg_class_contents, regcass_map, ns32k_out_reg_names, - hard_regno_mode_ok, secondary_reload_class, - print_operand, print_operand_address): New register scheme to - include 32381 fpu registers and special register classes for new - 32381 instructions dotf and polyf. - (gen_indexed_expr): Make static to keep namespace clean. - (check_reg): Remove since never called. - (move_tail, expand_block_move): Helper functions for "movstrsi" - block move insn. - (register_move_cost): Helper function for REGISTER_MOVE_COST macro. - Increase cost of moves which go via memory. - * netbsd.h (TARGET_DEFAULT): Set (new) 32381 fpu flag. - (CPP_PREDEFINES): No longer predefine "unix". - - * ns32k.md (movsi, movsi, adddi3, subdi3, subsi3, subhi3, subqi3,...): - Remove erroneous %$. print_operand() can work out from the rtx is - an immediate prefix is required. - - * ns32k.h (RETURN_POPS_ARGS, VALID_MACHINE_DECL_ATTRIBUTE, - VALID_MACHINE_TYPE_ATTRIBUTE, COMP_TYPE_ATTRIBUTES, - SET_DEFAULT_TYPE_ATTRIBUTES): Support for -mrtd calling - convention. - (LEGITIMATE_PIC_OPERAND_P, SYMBOLIC_CONST): Correct handling of - pic operands. - - * ns32k.c (symbolic_reference_mentioned_p, print_operand): - Correct handling of pic operands. - (ns32k_valid_decl_attribute_p, ns32k_valid_type_attribute_p, - ns32k_comp_type_attributes, ns32k_return_pops_args): Support for - -mrtd calling convention. - -Wed Nov 25 23:42:20 1998 Tom Tromey - - * gcc.c (option_map): Recognize --output-class-directory. - -Thu Nov 26 18:26:21 1998 Michael Hayes - - * loop.h (precondition_loop_p): Added new mode argument. - * unroll.c (precondition_loop_p): Likewise. - (approx_final_value): Function deleted and subsumed - into loop_iterations. - (loop_find_equiv_value): New function. - (loop_iterations): Use loop_find_equiv_value to find increments - too large to be immediate constants. Also use it to find terms - common to initial and final iteration values that can be removed. - -Thu Nov 26 18:05:04 1998 Michael Hayes - - * loop.h (struct loop_info): Define new structure. - (precondition_loop_p): Added prototype. - (unroll_loop): Added new argument loop_info to prototype. - (final_biv_value, final_giv_value): Added new argument n_iterations - to prototype. - * loop.c (strength_reduce): Declare new structure loop_iteration_info - and new pointer loop_info. - (loop_n_iterations): Replace global variable by element in - loop_info structure. - (check_final_value): New argument n_iterations. - (insert_bct): New argument loop_info. - (loop_unroll_factor): Replace global array by element in - loop_info structure. - (loop_optimize): Remove code to allocate and initialize - loop_unroll_factor_array. - * unroll.c (precondition_loop_p): No longer static since - used by branch on count optimization. - (precondition_loop_p, unroll_loop): New argument loop_info. - (final_biv_value, final_giv_value, find_splittable_regs): New - argument n_iterations. - (loop_iteration_var, loop_initial_value, loop_increment, - loop_final_value, loop_comparison_code, loop_unroll_factor): - Replaced global variables by loop_info structure. - (loop_unroll_factor): Replace global array by element in - loop_info structure. - -Thu Nov 26 17:49:29 1998 Michael Hayes - - * loop.c (check_dbra_loop): Update JUMP_LABEL field of jump insn - when loop reversed. - - * unroll.c (precondition_loop_p): Return loop_initial_value - for initial_value instead of loop_iteration_var. - -Thu Nov 26 17:15:38 1998 Michael Hayes - - * config/c4x/c4x.md: Fix minor formatting problems. Update docs. - (*b, *b_rev, *b_noov, *b_noov_rev, *db, - decrement_and_branch_until_zero, rptb_end): Use c4x_output_cbranch - to output the instruction sequences. - (rpts): Delete. - (rptb_top): Provide alternatives to use any register or memory - for loop counter. - (rptb_end): Emit use of operands rather than assigning them - explicitly to the RS and RE registers. - -Thu Nov 26 16:37:59 1998 Michael Hayes - - * config/c4x/c4x.c (c4x_modified_between_p, c4x_mem_set_p, - c4x_mem_set_p, c4x_mem_modified_between_p, c4x_insn_moveable_p, - c4x_parallel_pack, c4x_parallel_find, c4x_update_info_reg, - c4x_update_info_regs, c4x_copy_insn_after, c4x_copy_insns_after, - c4x_merge_notes, c4x_parallel_process, - c4x_combine_parallel_independent, c4x_combine_parallel_dependent, - c4x_combine_parallel): Delete. - -Thu Nov 26 15:16:05 1998 Michael Hayes - - * config/c4x/c4x.c (c4x_override_options): For compatibility - with old target options clear flag_branch_on_count_reg if - -mno-rptb specified and set flag_argument_alias is -mno-aliases - specified. - (c4x_output_cbranch): Handle a sequence of insns rather than a - single insn. - (c4x_rptb_insert): Do not emit a RPTB insn if the RC register - has not been allocated as the loop counter. - (c4x_address_conflict): Do not allow two volatile memory references. - (valid_parallel_operands_4, valid_parallel_operands_5, - valid_parallel_operands_6): Reject pattern if the register destination - of the first set is used as part of an address in the second set. - -Thu Nov 26 14:56:32 1998 Michael Hayes - - * config/c4x/c4x.h (TARGET_DEFAULT): Add PARALEL_MPY_FLAG. - (TARGET_SMALL_REG_CLASS): Set to 0 so that SMALL_REGISTER_CLASSES - is no longer enabled if PARALLEL_MPY_FLAG set. - (HARD_REGNO_CALL_CLOBBERED): Add parentheses to remove ambiguity. - (REG_CLASS_CONTENTS): Add braces around initializers. - (HAVE_MULTIPLE_PACK): Define. - (ASM_OUTPUT_BYTE_FLOAT): Use %lf format specifier with - REAL_VALUE_TO_DECIMAL. - (ASM_OUTPUT_SHORT_FLOAT): Use %lf format specifier with - REAL_VALUE_TO_DECIMAL. - (ar0_reg_operand): Add prototype. - (ar0_mem_operand): Likewise. - (ar1_reg_operand): Likewise. - (ar1_mem_operand): Likewise. - (ar2_reg_operand): Likewise. - (ar2_mem_operand): Likewise. - (ar3_reg_operand): Likewise. - (ar3_mem_operand): Likewise. - (ar4_reg_operand): Likewise. - (ar4_mem_operand): Likewise. - (ar5_reg_operand): Likewise. - (ar5_mem_operand): Likewise. - (ar6_reg_operand): Likewise. - (ar6_mem_operand): Likewise. - (ar7_reg_operand): Likewise. - (ar7_mem_operand): Likewise. - (ir0_reg_operand): Likewise. - (ir0_mem_operand): Likewise. - (ir1_reg_operand): Likewise. - (ir1_mem_operand): Likewise. - (group1_reg_operand): Likewise. - (group1_mem_operand): Likewise. - (ir1_reg_operand): Likewise. - (arx_reg_operand): Likewise. - (not_rc_reg): Likewise. - (not_modify_reg): Likewise. - (c4x_group1_reg_operand): Remove prototype. - (c4x_group1_mem_operand): Likewise. - (c4x_arx_reg_operand): Likewise. - -Wed Nov 25 19:02:55 1998 (Stephen L Moshier) - - * emit-rtl.c (gen_lowpart_common): Remove earlier change. - * real.c (make_nan): Make SIGN arg actually specify the sign bit. - -Thu Nov 26 14:12:05 1998 Michael Hayes - - * config/c4x/c4x.md (addqi3): Emit addqi3_noclobber pattern - during reload. - -Wed Nov 25 22:05:28 1998 J"orn Rennecke - - * config/sh/lib1funcs.asm (___udivsi3_i4): Don't switch to sz == 1 - unless FMOVD_WORKS is defined. - -Wed Nov 25 20:11:04 1998 J"orn Rennecke - - * regclass.c (init_reg_sets): Move code that calculates tables - dependent on reg_class_contents from here... - (init_reg_sets_1): To here. - -Wed Nov 25 14:54:46 1998 Zack Weinberg - - * cpplib.h: Delete struct import_file. Add ihash element to - struct cpp_buffer. Delete dont_repeat_files and - import_hash_table elements from cpp_reader; change - all_include_files to a hash table. Delete all foobar_include - / last_foobar_include elements from struct cpp_options; put - back four such: quote_include, bracket_include, - system_include, after_include. Redo struct file_name_list - completely. Add new structure type include_hash. Add - prototypes for merge_include_chains and include_hash. Change - prototypes for finclude, find_include_file, and - append_include_chain to match changes below. - - * cppfiles.c (simplify_pathname, include_hash, - remap_filename, merge_include_chains): New functions. - (add_import, lookup_import, open_include_file): Removed. - (INO_T_EQ): Define this (copied from cccp.c). - (hack_vms_include_specification): Remove all calls and #if 0 - out the definition. It was being called incorrectly and at - the wrong times. Until a VMSie can look at this, it's better - to not pretend to support it. - (append_include_chain): Change calling convention; now takes - only one directory at a time, and sets up the data structure - itself. - (redundant_include_p): Rewritten - this is now used for all - include redundancy, whether by #ifndef, #import, or #pragma - once. Looks up things in the include hash table. - (file_cleanup): Decrement pfile->system_include_depth here if - it's >0. - (find_include_file): Calling convention changed; now passes - around a struct include_hash instead of 3 separate parameters. - Guts ripped out and replaced with new include_hash mechanism. - (finclude): Calling convention changed as for - find_include_file. Error exits pulled out-of-line. Reformat. - (safe_read): Return a long, not an int. - (deps_output): Don't recurse. - - * cpplib.c (is_system_include): Deleted. - (path_include): Fix up call to append_include_chain. - (do_include): Fix up calls to find_include_file and finclude. - Clean up dependency output a bit. Shorten obnoxiously lengthy - #import warning message. Don't decrement - pfile->system_include_depth here. - (do_pragma): Understand the include_hash structure. Reformat. - (do_endif): Correct handling of control macros. Understand - the include_hash. - (cpp_start_read): Fix up calls to finclude. Call - merge_include_chains. - (cpp_handle_option): Fix up calls to append_include_chain. - Understand the four partial include chains. - (cpp_finish): Add debugging code (#if 0-ed out) for the - include_hash. - (cpp_cleanup): Free the include_hash, not the import hash and - the all_include and dont_repeat lists which no longer exist. - -Wed Nov 25 11:26:19 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (no_new_pseudos): Define. - (rest_of_compilation): Set no_new_pseudos as needed. - * emit-rtl.c (gen_reg_rtx): Abort if we try to create a new pseudo - if no_new_pseudos is set. - * rtl.h (no_new_pseudos): Declare it. - * reload1.c (reload): Update comments. - * md.texi: Corresponding changes. - -Wed Nov 25 11:26:17 1998 Bernd Schmidt - - * reload1.c (reg_used_in_insn): Renamed from reg_used_by_pseudo. - (choose_reload_regs): Rename it here as well. When computing it, - also merge in used hardregs. - -1998-11-25 Zack Weinberg - - * gcc.c: Split out Objective-C specs to... - * objc/lang-specs.h: here. (New file.) Make the specs cpplib - aware. - - * c-lex.c (init_parse): Always initialize the filename global. - * objc/objc-act.c (lang_init): Always call check_newline at - beginning of file. - -Wed Nov 25 00:48:29 1998 Graham - - * reload1.c (reload): Remove unused variable. - (reload_reg_free_for_value_p): Add missing parameter definition. - - * jump.c (jump_optimize): Remove unused variable. - -Wed Nov 25 00:07:11 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (graph.o): Depend on $(RTL_H), not rtl.h. - - * cse.c (fold_rtx): Make autoincrement addressing mode tests be - runtime selectable. - * expr.c (move_by_pieces): Similarly. - (move_by_pieces_1, clear_by_pieces, clear_by_pieces_1): Similarly. - * flow.c (find_auto_inc): Similarly. - (try_pre_increment): Similarly. - * loop.c (strength_reduce): Similarly. - * regclass.c (auto_inc_dec_reg_p): Similarly. - * regmove.c (try_auto_increment): Similarly. - (fixup_match_1): Similarly. - * rtl.h (HAVE_PRE_INCREMENT): Define if not already defined. - (HAVE_PRE_DECREMENT): Similarly. - (HAVE_POST_INCREMENT, HAVE_POST_DECREMENT): Similarly. - * Corresponding changes to all target header files. - * tm.texi: Update docs for autoinc addressing modes. - -Tue Nov 24 20:24:59 1998 Jim Wilson - - * configure.in (m68020-*-elf*, m68k-*-elf*): New targets. - * configure: Rebuild. - * config/elfos.h: New file. - * config/m68k/m68020-elf.h, config/m68k/m68kelf.h, - config/m68k/t-m68kelf: New file. - -Tue Nov 24 13:40:06 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (HOST_AR): Define. - (HOST_AR_FLAGS, HOST_RANLIB, HOST_RANLIB_TEST): Similarly. - (libcpp.a): Use the host tools explicitly. - (STAGESTUFF): Add libcpp.a. - -Tue Nov 24 09:33:49 1998 Nick Clifton - - * config/m32r/m32r.md (movstrsi_internal): Describe changes made - to source and destination registers. - -Mon Nov 23 20:28:02 1998 Mike Stump - - * libgcc2.c (top_elt): Remove top_elt, it isn't thread safe. - The strategy we now use is to pre allocate the top_elt along - with the EH context so that each thread has its own top_elt. - This is necessary as the dynamic cleanup chain is used on the - top element of the stack and each thread MUST have its own. - (eh_context_static): Likewise. - (new_eh_context): Likewise. - (__sjthrow): Likewise. - -Mon Nov 23 20:25:03 1998 Jason Merrill - - * i386/linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Wrap in do...while. - * i386.md (prologue_get_pc): Remove unused variable. - -Mon Nov 23 17:05:40 1998 Geoffrey Noer - - * i386/xm-cygwin.h: Rename cygwin_ path funcs back to cygwin32_. - -Mon Nov 23 16:40:00 1998 Ulrich Drepper - - * Makefile.in (OBJS): Add graph.o. - (graph.o): New dependency list. - * flags.h: Declare dump_for_graph and define graph_dump_types type. - * print-rtl.c (dump_for_graph): Define new variable. - (print_rtx): Rewrite to allow use in graph dumping functions. - * toplev.c: Declare print_rtl_graph_with_bb, clean_graph_dump_file, - finish_graph_dump_file. - Define graph_dump_format. - (compile_file): If graph dumping is enabled also clear these files. - Finish graph dump files. - (rest_of_compilation): Also dump graph information if enabled. - (main): Recognize -dv to enabled VCG based graph dumping. - * graph.c: New file. Graph dumping functions. - -Mon Nov 23 16:39:04 1998 Richard Henderson - - * configure.in: Look for . - * system.h: Include it before substitute S_ISREG definitions. - -Mon Nov 23 17:40:37 1998 Gavin Romig-Koch - - * config/mips/abi.h: Use ABI_O64, duplicating ABI_32 usage. - * config/mips/iris6.h: Same. - * config/mips/mips.md: Same. - * config/mips/mips.c: Same; also add "-mabi=o64" option. - * config/mips/mips.h: Same; also define ABI_O64. - -Mon Nov 23 17:02:27 1998 Kaveh R. Ghazi - - * configure.in: Use AC_PREREQ(2.12.1). - -Mon Nov 23 10:16:38 1998 Melissa O'Neill - - * cccp.c (S_ISREG, S_ISDIR): Delete defines. - * cpplib.c, gcc.c: Likewise. - * system.h (S_ISREG, S_ISDIR): Define if not already defined. - -Mon Nov 23 09:53:44 1998 Richard Henderson - - * local-alloc.c (local_alloc): Use malloc not alloca for - reg_qty, reg_offset, ref_next_in_qty. - -Mon Nov 23 16:46:46 1998 J"orn Rennecke - - * caller-save.c (insert_one_insn): Initialize the live_before and - live_after register sets. - - Add SH4 support: - - * config/sh/lib1funcs.asm (___movstr_i4_even, ___movstr_i4_odd): Define. - (___movstrSI12_i4, ___sdivsi3_i4, ___udivsi3_i4): Define. - * sh.c (reg_class_from_letter, regno_reg_class): Add DF_REGS. - (fp_reg_names, assembler_dialect): New variables. - (print_operand_address): Handle SUBREGs. - (print_operand): Added 'o' case. - Don't use adj_offsettable_operand on PRE_DEC / POST_INC. - Name of FP registers depends on mode. - (expand_block_move): Emit different code for SH4 hardware. - (prepare_scc_operands): Use emit_sf_insn / emit_df_insn as appropriate. - (from_compare): Likewise. - (add_constant): New argument last_value. Changed all callers. - (find_barrier): Don't try HImode load for FPUL_REG. - (machine_dependent_reorg): Likewise. - (sfunc_uses_reg): A CLOBBER cannot be the address register use. - (gen_far_branch): Emit a barrier after the new jump. - (barrier_align): Don't trust instruction lengths before - fixing up pcloads. - (machine_dependent_reorg): Add support for FIRST_XD_REG .. LAST_XD_REG. - Use auto-inc addressing for fp registers if doubles need to - be loaded in two steps. - Set sh_flag_remove_dead_before_cse. - (push): Support for TARGET_FMOVD. Use gen_push_fpul for fpul. - (pop): Support for TARGET_FMOVD. Use gen_pop_fpul for fpul. - (calc_live_regs): Support for TARGET_FMOVD. Don't save FPSCR. - Support for FIRST_XD_REG .. LAST_XD_REG. - (sh_expand_prologue): Support for FIRST_XD_REG .. LAST_XD_REG. - (sh_expand_epilogue): Likewise. - (sh_builtin_saveregs): Use DFmode moves for fp regs on SH4. - (initial_elimination_offset): Take TARGET_ALIGN_DOUBLE into account. - (arith_reg_operand): FPUL_REG is OK for SH4. - (fp_arith_reg_operand, fp_extended_operand): New functions. - (tertiary_reload_operand, fpscr_operand): Likewise. - (commutative_float_operator, noncommutative_float_operator): Likewise. - (binary_float_operator, get_fpscr_rtx, emit_sf_insn): Likewise. - (emit_df_insn, expand_sf_unop, expand_sf_binop): Likewise. - (expand_df_unop, expand_df_binop, expand_fp_branch): Likewise. - (emit_fpscr_use, mark_use, remove_dead_before_cse): Likewise. - * sh.h (CPP_SPEC): Add support for -m4, m4-single, m4-single-only. - (CONDITIONAL_REGISTER_USAGE): Likewise. - (HARD_SH4_BIT, FPU_SINGLE_BIT, SH4_BIT, FMOVD_BIT): Define. - (TARGET_CACHE32, TARGET_SUPERSCALAR, TARGET_HARWARD): Define. - (TARGET_HARD_SH4, TARGET_FPU_SINGLE, TARGET_SH4, TARGET_FMOVD): Define. - (target_flag): Add -m4, m4-single, m4-single-only, -mfmovd. - (OPTIMIZATION_OPTIONS): If optimizing, set flag_omit_frame_pointer - to -1 and sh_flag_remove_dead_before_cse to 1. - (ASSEMBLER_DIALECT): Define to assembler_dialect. - (assembler_dialect, fp_reg_names): Declare. - (OVERRIDE_OPTIONS): Add code for TARGET_SH4. - Hide names of registers that are not accessible. - (CACHE_LOG): Take TARGET_CACHE32 into account. - (LOOP_ALIGN): Take TARGET_HARWARD into account. - (FIRST_XD_REG, LAST_XD_REG, FPSCR_REG): Define. - (FIRST_PSEUDO_REGISTER: Now 49. - (FIXED_REGISTERS, CALL_USED_REGISTERS): Include values for registers. - (HARD_REGNO_NREGS): Special treatment of FIRST_XD_REG .. LAST_XD_REG. - (HARD_REGNO_MODE_OK): Update. - (enum reg_class): Add DF_REGS and FPSCR_REGS. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS, REG_ALLOC_ORDER): Likewise. - (SECONDARY_OUTPUT_RELOAD_CLASS, SECONDARY_INPUT_RELOAD_CLASS): Update. - (CLASS_CANNOT_CHANGE_SIZE, DEBUG_REGISTER_NAMES): Define. - (NPARM_REGS): Eight floating point parameter registers on SH4. - (BASE_RETURN_VALUE_REG): SH4 also passes double values - in floating point registers. - (GET_SH_ARG_CLASS): Likewise. - Complex float types are also returned in float registers. - (BASE_ARG_REG): Complex float types are also passes in float registers. - (FUNCTION_VALUE): Change mode like PROMOTE_MODE does. - (LIBCALL_VALUE): Remove trailing semicolon. - (ROUND_REG): Round when double precision value is passed in floating - point register(s). - (FUNCTION_ARG_ADVANCE): No change wanted for SH4 when things are - passed on the stack. - (FUNCTION_ARG): Little endian adjustment for SH4 SFmode. - (FUNCTION_ARG_PARTIAL_NREGS): Zero for SH4. - (TRAMPOLINE_ALIGNMENT): Take TARGET_HARWARD into account. - (INITIALIZE_TRAMPOLINE): Emit ic_invalidate_line for TARGET_HARWARD. - (MODE_DISP_OK_8): Not for SH4 DFmode. - (GO_IF_LEGITIMATE_ADDRESS): No base reg + index reg for SH4 DFmode. - Allow indexed addressing for PSImode after reload. - (LEGITIMIZE_ADDRESS): Not for SH4 DFmode. - (LEGITIMIZE_RELOAD_ADDRESS): Handle SH3E SFmode. - Don't change SH4 DFmode nor PSImode RELOAD_FOR_INPUT_ADDRESS. - (DOUBLE_TYPE_SIZE): 64 for SH4. - (RTX_COSTS): Add PLUS case. - Increase cost of ASHIFT, ASHIFTRT, LSHIFTRT case. - (REGISTER_MOVE_COST): Add handling of R0_REGS, FPUL_REGS, T_REGS, - MAC_REGS, PR_REGS, DF_REGS. - (REGISTER_NAMES): Use fp_reg_names. - (enum processor_type): Add PROCESSOR_SH4. - (sh_flag_remove_dead_before_cse): Declare. - (rtx_equal_function_value_matters, fpscr_rtx, get_fpscr_rtx): Declare. - (PREDICATE_CODES): Add binary_float_operator, - commutative_float_operator, fp_arith_reg_operand, fp_extended_operand, - fpscr_operand, noncommutative_float_operator. - (ADJUST_COST): Use different scale for TARGET_SUPERSCALAR. - (SH_DYNAMIC_SHIFT_COST): Cheaper for SH4. - * sh.md (attribute cpu): Add value sh4. - (attrbutes fmovd, issues): Define. - (attribute type): Add values dfp_arith, dfp_cmp, dfp_conv, dfdiv. - (function units memory, int, mpy, fp): Make dependent on issue rate. - (function units issue, single_issue, load_si, load): Define. - (function units load_store, fdiv, gp_fpul): Define. - (attribute hit_stack): Provide proper default. - (use_sfunc_addr+1, udivsi3): Predicated on ! TARGET_SH4. - (udivsi3_i4, udivsi3_i4_single, divsi3_i4, divsi3_i4_single): New insns. - (udivsi3, divsi3): Emit special patterns for SH4 hardware, - (mulsi3_call): Now uses match_operand for function address. - (mulsi3): Also emit code for SH1 case. Wrap result in REG_LIBCALL / - REG_RETVAL notes. - (push, pop, push_e, pop_e): Now define_expands. - (push_fpul, push_4, pop_fpul, pop_4, ic_invalidate_line): New expanders. - (movsi_ie): Added y/i alternative. - (ic_invalidate_line_i, movdf_i4): New insns. - (movdf_i4+[123], reload_outdf+[12345], movsi_y+[12]): New splitters. - (reload_indf, reload_outdf, reload_outsf, reload_insi): New expanders. - (movdf): Add special code for SH4. - (movsf_ie, movsf_ie+1, reload_insf, calli): Make use of fpscr visible. - (call_valuei, calli, call_value): Likewise. - (movsf): Emit no-op move. - (mov_nop, movsi_y): New insns. - (blt, sge): Generalize to handle DFmode. - (return predicate): Call emit_fpscr_use and remove_dead_before_cse. - (block_move_real, block_lump_real): Predicate on ! TARGET_HARD_SH4. - (block_move_real_i4, block_lump_real_i4, fpu_switch): New insns. - (fpu_switch0, fpu_switch1, movpsi): New expanders. - (fpu_switch+[12], fix_truncsfsi2_i4_2+1): New splitters. - (toggle_sz): New insn. - (addsf3, subsf3, mulsf3, divsf3): Now define_expands. - (addsf3_i, subsf3_i, mulsf3_i4, mulsf3_ie, divsf3_i): New insns. - (macsf3): Make use of fpscr visible. Disable for SH4. - (floatsisf2): Make use of fpscr visible. - (floatsisf2_i4): New insn. - (floatsisf2_ie, fixsfsi, cmpgtsf_t, cmpeqsf_t): Disable for SH4. - (ieee_ccmpeqsf_t): Likewise. - (fix_truncsfsi2): Emit different code for SH4. - (fix_truncsfsi2_i4, fix_truncsfsi2_i4_2, cmpgtsf_t_i4): New insns. - (cmpeqsf_t_i4, ieee_ccmpeqsf_t_4): New insns. - (negsf2, sqrtsf2, abssf2): Now expanders. - (adddf3, subdf3i, muldf2, divdf3, floatsidf2): New expanders. - (negsf2_i, sqrtsf2_i, abssf2_i, adddf3_i, subdf3_i): New insns. - (muldf3_i, divdf3_i, floatsidf2_i, fix_truncdfsi2_i): New insns. - (fix_truncdfsi2, cmpdf, negdf2, sqrtdf2, absdf2): New expanders. - (fix_truncdfsi2_i4, cmpgtdf_t, cmpeqdf_t, ieee_ccmpeqdf_t): New insns. - (fix_truncdfsi2_i4_2+1): New splitters. - (negdf2_i, sqrtdf2_i, absdf2_i, extendsfdf2_i4): New insns. - (extendsfdf2, truncdfsf2): New expanders. - (truncdfsf2_i4): New insn. - * t-sh (LIB1ASMFUNCS): Add _movstr_i4, _sdivsi3_i4, _udivsi3_i4. - (MULTILIB_OPTIONS): Add m4-single-only/m4-single/m4. - * float-sh.h: When testing for __SH3E__, also test for - __SH4_SINGLE_ONLY__ . - * va-sh.h (__va_freg): Define to float. - (__va_greg, __fa_freg, __gnuc_va_list, va_start): - Define for __SH4_SINGLE_ONLY__ like for __SH3E__ . - (__PASS_AS_FLOAT, __TARGET_SH4_P): Likewise. - (__PASS_AS_FLOAT): Use different definition for __SH4__ and - __SH4_SINGLE__. - (TARGET_SH4_P): Define. - (va_arg): Use it. - - * sh.md (movdf_k, movsf_i): Tweak the condition so that - init_expr_once is satisfied about the existence of load / store insns. - - * sh.md (movsi_i, movsi_ie, movsi_i_lowpart, movsf_i, movsf_ie): - Change m constraint in source operand to mr / mf. - - * va-sh.h (__va_arg_sh1): Use __asm instead of asm. - - * (__VA_REEF): Define. - (__va_arg_sh1): Use it. - - * va-sh.h (va_start, va_arg, va_copy): Add parentheses. - -Sun Nov 22 21:34:02 1998 Jeffrey A Law (law@cygnus.com) - - * i386/dgux.c (struct option): Add new "description field". - * m88k/m88k.c (struct option): Likewise. - -Sun Nov 22 16:07:57 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Nov 22 13:40:02 1998 Bernd Schmidt - - * regmove.c (regmove_profitable_p): Use return value of find_matches - properly. - -Sun Nov 22 02:47:37 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Nov 21 22:12:09 1998 Jeffrey A Law (law@cygnus.com) - - * reload1.c (eliminate_regs): Do not lose if eliminate_regs is called - without reload having been called earlier. - - * v850.c (ep_memory_operand): Offsets < 0 are not valid for EP - addressing modes. - (v850_reorg): Similarly. - - * loop.c (check_dbra_loop): Avoid using gen_add2_insn. - -Sat Nov 21 02:18:38 1998 J"orn Rennecke - - * loop.c (move_movables): Start of libcall might be new loop start. - -Fri Nov 20 12:14:16 1998 Kaveh R. Ghazi - - * hash.c (hash_table_init_n): Wrap prototype arguments in PARAMS(). - -Fri Nov 20 08:34:00 1998 Bernd Schmidt - - * function.c (nonlocal_goto_handler_slots): Renamed from - nonlocal_goto_handler_slot; now an EXPR_LIST chain. - (push_function_context_to): Adjust for this change. - (pop_function_context_from): Likewise. - (init_function_start): Likewise. - (expand_function_end): Likewise. - * function.h (struct function): Likewise. - * calls.c (expand_call): Likewise. - * explow.c (allocate_dynamic_stack_space): Likewise. - * expr.h (nonlocal_goto_handler_slots): Rename its declaration. - * stmt.c (declare_nonlocal_label): Make a new handler slot for each - label. - (expand_goto): When doing a nonlocal goto, find corresponding handler - slot for it. Don't put the label address in the static chain register. - (expand_end_bindings): Break out nonlocal goto handling code into - three new functions. - (expand_nl_handler_label, expand_nl_goto_receiver, - expand_nl_goto_receivers): New static functions, broken out of - expand_end_bindings and adapted to create one handler per nonlocal - label. - * function.c (delete_handlers): Delete insn if it references any of - the nonlocal goto handler slots. - * i960.md (nonlocal_goto): Comment out code that modifies - static_chain_rtx. - * sparc.md (nonlocal_goto): Likewise. - (goto_handler_and_restore_v9): Comment out. - (goto_handler_and_restore_v9_sp64): Comment out. - -Thu Nov 19 23:44:38 1998 Bernd Schmidt - - * expr.c (STACK_BYTES): Delete unused macro. - * calls.c: Provide default for PREFERRED_STACK_BOUNDARY. - (STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. - (expand_call): Likewise. - (emit_library_call): Likewise. - (emit_library_call_value): Likewise. - * function.c: Provide default for PREFERRED_STACK_BOUNDARY. - (STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. - * explow.c: Provide default for PREFERRED_STACK_BOUNDARY. - (round_push): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. - (allocate_dynamic_stack_space): Likewise. - * tm.texi (PREFERRED_STACK_BOUNDARY): Document new macro. - (STACK_BOUNDARY): Update description to reflect the new situation. - -Thu Nov 19 22:20:51 1998 Jeffrey A Law (law@cygnus.com) - - * reorg.c (relax_delay_slots): When optimizing for code size, if a - return with a filled delay slot is followed by a return with an - unfilled delay slot, delete the first return and reemit the insn - that was previously in its delay slot. - - * i860.c (single_insn_src_p): Add missing parens. - * ginclude/math-3300.h: Likewise. - -Thu Nov 19 20:55:59 1998 H.J. Lu (hjl@gnu.org) - - * regclass.c (init_reg_sets_1): Add prototype. - (init_reg_modes): Likewise. - -1998-11-19 Zack Weinberg - - * c-common.c: Change warning messages to say `comparison is - always true' or `comparison is always false' instead of the - confusing `is always 0', `is always 1'. - -Thu Nov 19 19:05:49 1998 Per Bothner - - * print-tree.c (print_node): After printing BLOCK or BIND_EXPR, - break instead of return (which loses closing '>'). - -Thu Nov 19 19:34:13 1998 Jeffrey A Law (law@cygnus.com) - - * i386.h (LEGITIMATE_CONSTANT_P): Reject CONST_DOUBLEs that are not - standard 387 constants. - - * i386.md (jump): Explicitly set "memory" attribute. - (indirect_jump, prologue_set_stack_ptr): Likewise. - (prologue_get_pc_and_set_got, pop): Likewise. - (allocate_stack_worder, blockage, return_internal): Likewise. - (return_pop_internal, nop): Likewise. - (epilogue_set_stack_ptr, leave): Likewise. - -Thu Nov 19 15:42:54 1998 Nick Clifton - - * config/arm/coff.h: Set USER_LABEL_PREFIX to "_". - -Thu Nov 19 23:20:59 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_for_value_p): - Early auto_inc reloads don't conflict with outputs. - -Thu Nov 19 12:58:55 1998 Kaveh R. Ghazi - - * configure.in: Don't do AC_CHECK_HEADERS(wait.h sys/wait.h). - Instead call AC_HEADER_SYS_WAIT. - - * collect2.c: Don't provide defaults for sys/wait.h macros. - * gcc.c: Likewise. - * protoize.c: Likewise. Also, don't include sys/wait.h. - - * system.h: Include sys/wait.h and provide macro defaults. - -1998-11-19 Andreas Schwab - - * Makefile.in (mandir): Set to @mandir@. - (man1dir): New variable to hold the former value of $(mandir). - Replace all uses of $(mandir) by $(man1dir). - -Wed Nov 18 16:31:28 1998 Jim Wilson - - * reload.c (find_reloads_address_part): If have a CONST_INT, create - a new one before passing it to force_const_mem. - - * reload.c (find_reloads_toplev): Pass &x instead of NULL_PTR in - find_reloads_address call. - -Wed Nov 18 22:13:00 1998 J"orn Rennecke - - * expr.c (store_expr): Don't generate load-store pair - if TEMP is identical (according to ==) with TARGET. - -Tue Nov 17 22:25:16 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_for_value_p): When considered reload - has an output, matching inputs are not sufficient to avoid conflict. - -Tue Nov 17 11:51:16 1998 Mark Mitchell - - * hash.h (hash_table_key): New type. - (hash_entry): Change `string' field to generic `key'. - (hash_table): Add `comp' and `hash' functions. - (hash_table_init): Take them as input. - (hash_table_init_n): Likewise. - (hash_lookup): Modify for generic keys. - (hash_newfunc): Likewise. - (hash_traverse): Likewise. - (string_hash): New function. - (string_compare): Likewise. - (string_copy): Likewise. - * hash.c (hash_table_init_n): Modify for generic keys. - (hash_table_init): Likewise. - (hash_lookup): Likewise. - (hash_newfunc): Likewise. - (hash_traverse): Likewise. - (string_hash): Split out from hash_lookup. - (string_compare): New function. - (string_copy): Split out from hash_lookup. - * tlink.c (symbol_hash_newfunc): Modify for new interfaces to hash - tables. - (symbol_hash_lookup): Likewise. - (file_hash_newfunc): Likewise. - (file_hash_lookup): Likewise. - (demangled_hash_newfunc): Likewise. - (demangled_hash_lookup): Likewise. - (tlink_int): Likewise. - (read_repo_file): Likewise. - (recompile_files): Likewise. - (demangle_new_symbols): Likewise. - (scan_linker_output): Likewise. - -Tue Nov 17 17:13:53 1998 J"orn Rennecke - - * flow.c (insn_dead_p): New argument NOTES. Changed all callers. - -Mon Nov 16 17:56:07 1998 David Edelsohn - - * rs6000.c (output_mi_thunk): Improve test for local branch. - -Mon Nov 16 17:56:07 1998 Franz Sirl - - * rs6000.c (output_mi_thunk): Correct test for aggregate values. - -Mon Nov 16 21:02:52 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_before_p): Delete. - Changed all callers to use reload_reg_free_for_value_p instead. - (reload_reg_free_for_value_p): Handle more reload types. - A RELOAD_FOR_INPUT doesn't conflict with its - RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS. - Add special case for OUT == const0_rtx. - Added ignore_address_reloads argument. Changed all callers. - -Mon Nov 16 02:22:29 1998 Jason Merrill - - * toplev.c (compile_file): Don't pedwarn about undefined static - functions just because we passed -Wunused. - -Mon Nov 16 04:41:41 1998 J"orn Rennecke - - * function.c (purge_addressof_1): Unshare rtl created by - store_bit_field. - -Mon Nov 16 04:23:06 1998 J"orn Rennecke - - * regmove.c (regmove_optimize): Don't do anything but - optimize_reg_copy[123] when flag_regmove is not set. - -Sat Nov 14 15:05:07 1998 Richard Henderson - - * alpha.md (addsi3, subsi3): Revise 5 Nov change to store DImode - value in paradoxical SImode result, rather than truncating midpoint. - -Fri Nov 13 22:19:23 1998 Richard Henderson - - * alpha.c (reg_not_elim_operand): New. - * alpha.h (PREDICATE_CODES): Add it. - * alpha.md (s48addq, s48subq patterns): Use it as the predicate - for the multiplicand. - -Fri Nov 13 22:50:37 1998 David Edelsohn - - * rs6000.md (movsf): Remove explicit secondary-reload-like - functionality. Only truncate SFmode store if in FPR. - (movsf splitters): Combine const_double splitters. - (movsf_hardfloat): Add GPR support. - -Fri Nov 13 11:02:11 1998 Stan Cox - - * splet.h (SUBTARGET_OVERRIDE_OPTIONS): New to - deprecate -mlive-g0 and -mbroken-saverestore. - * t-splet (MULTILIB_OPTIONS): Likewise. - - * sparc.c (sparc_flat_compute_frame_size): Correctly calc args_size - in a leaf function. Clarify total_size/extra_size relationship. - -Thu Nov 12 19:20:57 1998 Geoffrey Noer - - * i386/cygwin32.asm: Delete. - * i386/cygwin.asm: New file, renamed from cygwin32.asm. - * i386/cygwin32.h: Delete. - * i386/cygwin.h: New file, renamed from cygwin32.h. - * i386/t-cygwin32: Delete. - * i386/t-cygwin: New file, renamed from t-cygwin32. Include - cygwin.asm instead of cygwin32.asm. Remove "32" from comment. - * i386/x-cygwin32: Delete. - * i386/x-cygwin: New file, renamed from x-cygwin32. - * i386/xm-cygwin32: Delete. - * i386/xm-cygwin: New file, renamed from xm-cygwin32. Use newly - renamed cygwin_ funcs for path translations. - * i386/win32.h: Define __CYGWIN__ when -mcygwin given. - * i386/winnt.c: Remove "32" from comment about cygwin. - * i386/mingw32.h: Fix references to cygwin32.h in light of above. - * rs6000/cygwin32.h: Delete. - * rs6000/cygwin.h: New file, renamed from cygwin32.h. Add - -D__CYGWIN__ to CPP_PREDEFINES. - * rs6000/x-cygwin32: Delete. - * rs6000/x-cygwin: New file, renamed from x-cygwin32. - * rs6000/xm-cygwin32: Delete. - * rs6000/xm-cygwin: New file, renamed from xm-cygwin32. - - * configure.in: Check for cygwin* instead of cygwin32. Account - for the rename of cygwin-related config files to lose the "32"s. - * configure: Regenerate. - - * cccp.c, collect2.c, gcc.c, getpwd.c, libgcc2.c, protoize.c, - toplev.c: Change all refs to __CYGWIN32__ to __CYGWIN__. - -Wed Nov 11 12:25:19 1998 Tom Tromey - - * Makefile.in (JAVAGC): New macro. - * configure: Rebuilt. - * configure.in: Recognize --enable-java-gc argument. Subst - `JAVAGC' variable. - -Thu Nov 12 03:32:16 1998 J"orn Rennecke - - Handle equivalences that have been obscured by gcse: - - * reload1.c (reload): Handle equivalences set up in multiple places. - * local-alloc.c (reg_equiv_init_insns): New variable. - (no_equiv): New function. - (update_equiv_regs): Handle equivalences set up in multiple places. - Don't ignore an insn just because its destination is likely to be - spilled. - -Wed Nov 11 13:46:13 1998 Jim Wilson - - * except.c (expand_eh_return): Readd force_operand call lost in - Sept 15 change. - -Tue Nov 10 17:04:11 1998 David Edelsohn - - * rs6000.h (LEGITIMIZE_ADDRESS): Add missing goto on last case. - -1998-11-09 Andreas Schwab - - * dbxout.c: Check HAVE_STAB_H instead of HAVE_STABS_H. - -Mon Nov 9 20:15:19 1998 Bernd Schmidt - - * regmove.c (regmove_optimize): Fix error in last change. - -Mon Nov 9 16:37:52 1998 Andrew Cagney - - * mips.c (function_prologue): When TARGET_MIPS16, adjust the register - offset in the .mask pseudo to compensate for frame pointer adjustments. - (mips16_fp_args, build_mips16_call_stub): For little endian, do not - word swap arguments moved to/from FP registers. - * mips16.S (DFREVCMP): Reverse arguments to OPCODE. - -Mon Nov 9 09:47:06 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Nov 9 02:14:14 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Nov 9 03:06:24 1998 Jeffrey A Law (law@cygnus.com) - - * reload1.c (delete_output_reload_insn): If a pseudo is set multiple - times, then it can not be completely replaced. - -Mon Nov 9 00:39:02 1998 Richard Henderson - - * alpha.md (call, call_value) [OSF]: Correct alt 3 insn length. - -Sun Nov 8 17:50:30 1998 Kaveh R. Ghazi - - * gansidecl.h: Prepend a "G" to the macro wrapping this file - (to distinguish it from the macro wrapping ansidecl.h.) - Include libiberty's ansidecl.h. Remove all redundant definitions. - Define the PROTO() style macros in terms of the PARAMS() ones. - - - * calls.c (emit_library_call): Switch on ANSI_PROTOTYPES, not - __STDC__, when deciding whether to use ANSI variable args. - (emit_library_call_value): Likewise. - - * cccp.c (error): Likewise. - (warning): Likewise. - (error_with_line): Likewise. - (warning_with_line): Likewise. - (pedwarn): Likewise. - (pedwarn_with_line): Likewise. - (pedwarn_with_file_and_line): Likewise. - (fatal): Likewise. - - * cexp.y (error): Likewise. - (pedwarn): Likewise. - (warning): Likewise. - - * collect2.c (fatal_perror): Likewise. - (fatal): Likewise. - (error): Likewise. - - * combine.c (gen_rtx_combine): Likewise. - - * cpperror.c (cpp_message): Likewise. - (cpp_fatal): Likewise. - - * cpplib.c (cpp_error): Likewise. - (cpp_warning): Likewise. - (cpp_pedwarn): Likewise. - (cpp_error_with_line): Likewise. - (cpp_warning_with_line): Likewise. - (cpp_pedwarn_with_line): Likewise. - (cpp_pedwarn_with_file_and_line): Likewise. - - * cpplib.h: Don't define PARAMS() macro. - - * demangle.h: Likewise. - - * doprint.c (checkit): Switch on ANSI_PROTOTYPES, not __STDC__, - when deciding whether to use ANSI variable args. - - * emit-rtl.c (gen_rtx): Likewise. - (gen_rtvec): Likewise. - - * final.c (asm_fprintf): Likewise. - - * fix-header.c (cpp_message): Likewise. - (fatal): Likewise. - (cpp_fatal): Likewise. - - * gcc.c (concat): Likewise. - (fatal): Likewise. - (error): Likewise. - - * genattr.c (fatal): Likewise. - - * genattrtab.c (attr_rtx): Likewise. - (attr_printf): Likewise. - (fatal): Likewise. - - * gencodes.c (fatal): Likewise. - - * genconfig.c (fatal): Likewise. - - * genemit.c (fatal): Likewise. - - * genextract.c (fatal): Likewise. - - * genflags.c (fatal): Likewise. - - * genopinit.c (fatal): Likewise. - - * genoutput.c (fatal): Likewise. - (error): Likewise. - - * genpeep.c (fatal): Likewise. - - * genrecog.c (fatal): Likewise. - - * halfpic.h: Switch on ANSI_PROTOTYPES, not __STDC__, when - deciding whether to declare `tree_node' and `rtx_def'. - - * hash.h: Don't define stuff we get from gansidecl.h. - - * mips-tfile.c: Likewise. Define __proto() in terms of PARAMS(). - (fatal): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding - whether to use ANSI variable args. - (error): Likewise. - - * prefix.c (concat): Likewise. - - * scan.h: Likewise. - - * system.h: Likewise. - - * toplev.c (error_with_file_and_line): Likewise. - (error_with_decl): Likewise. - (error_for_asm): Likewise. - (error): Likewise. - (fatal): Likewise. - (warning_with_file_and_line): Likewise. - (warning_with_decl): Likewise. - (warning_for_asm): Likewise. - (warning): Likewise. - (pedwarn): Likewise. - (pedwarn_with_decl): Likewise. - (pedwarn_with_file_and_line): Likewise. - (sorry): Likewise. - (really_sorry): Likewise. - - * toplev.h: Switch on ANSI_PROTOTYPES, not __STDC__, when deciding - whether to declare `tree_node' and `rtx_def'. - - * tree.c (build): Switch on ANSI_PROTOTYPES, not __STDC__, when - deciding whether to use ANSI variable args. - (build_nt): Likewise. - (build_parse_node): Likewise. - -Sun Nov 8 13:10:55 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sat Nov 7 23:34:01 1998 Kaveh R. Ghazi - - * Makefile.in (libcpp.a): Check RANLIB_TEST before runing RANLIB. - -Sat Nov 7 22:26:19 1998 David Edelsohn - - * collect2.c (main, case 'b'): Use else if. - -Sat Nov 7 15:35:25 1998 Kaveh R. Ghazi - - * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): - Arrange to include gansidecl.h in {ht}config.h & tm.h just - before the config/ directory headers. - (tm_file_list, host_xm_file_list, build_xm_file_list): Handle - gansidecl.h in the list of dependencies. - - * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. - (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, - mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, - gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, - dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, - cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): - Likewise. - - * cccp.c: Don't include gansidecl.h. - * cexp.y: Likewise. - * collect2.c: Likewise. - * config/c4x/c4x.c: Likewise. - * config/v850/v850.h: Likewise. - * cppalloc.c: Likewise. - * cpperror.c: Likewise. - * cppexp.c: Likewise. - * cppfiles.c: Likewise. - * cpphash.c: Likewise. - * cpplib.c: Likewise. - * cppmain.c: Likewise. - * cppulp.c: Likewise. - * demangle.h: Likewise. - * doprint.c: Likewise. - * dyn-string.c: Likewise. - * eh-common.h: Likewise. - * fix-header.c: Likewise. - * frame.c: Likewise. - * gcc.c: Likewise. - * gcov.c: Likewise. - * gen-protos.c: Likewise. - * gencheck.c: Likewise. - * halfpic.h: Likewise. - * hash.c: Likewise. - * machmode.h: Likewise. - * mbchar.c: Likewise. - * prefix.c: Likewise. - * protoize.c: Likewise. - * recog.h: Likewise. - * rtl.h: Likewise. - * scan-decls.c: Likewise. - * tree.h: Likewise. - * varray.h: Likewise. - -Sat Nov 7 11:37:53 1998 Richard Henderson - - * i386.md (call_value_pop): If we're not popping anything, - defer to call_value. - (call_pop): Likewise defer to call. - -Sat Nov 7 02:49:56 1998 Richard Henderson - - * function.c (purge_addressof): Clear purge_addressof_replacements - only after processing the whole function. - -Sat Nov 7 00:54:55 1998 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload): If we can not perform a particular elimination - when we thought we could earlier, then we must always iterate through - the loop at least one more time. - -Fri Nov 6 19:37:33 1998 Richard Henderson - - * alpha.c (add_operand): Simplify the CONST_INT match. - (sext_add_operand): Correct typo in comparison by using - CONST_OK_FOR_LETTER_P. - * alpha.md (s?addq): Use sext_add_operand to allow the negative - constant alternatives to be generated. - (mulsi3, muldi3, umuldi3_highpart): Loosen constraints to allow - small constants, since the hw instructions do. - -Fri Nov 6 20:15:19 1998 Bernd Schmidt - - * reload1.c (emit_reload_insns): When rewriting the SET_DEST of a - previous insn to store directly into our reload register, make sure - that if the source of the previous insn is a reload register, its - spill_reg_store and spill_reg_stored_to values are cleared. - -Fri Nov 6 16:35:10 1998 David Edelsohn - - * rs6000.md (floatunssidf2_internal splitter): Use base register - operand, not hard-coded SP. - -Fri Nov 6 04:07:53 1998 David S. Miller - - * jump.c (calculate_can_reach_end): Fix thinko. - -Fri Nov 6 00:16:04 1998 Jeffrey A Law (law@cygnus.com) - - * reorg.c (fill_simple_delay_slots): Fix typo. - - * romp.h (LEGITIMIZE_ADDRESS): Fix typo. - -Fri Nov 6 00:10:00 1998 Jan Hubicka (hubicka@freesoft.cz) - - * i386.md (extendsidi2): Use # in the output template. - (extendsidi splitters): New splitters. - -Thu Nov 5 11:13:27 1998 Nick Clifton - - * configure.in: Use unknown-elf.h as tm_file for arm-elf - configurations. - * configure: Regenerate. - -Thu Nov 5 07:59:05 1998 David S. Miller - - * jump.c (init_label_info, delete_barrier_successors, - mark_all_labels, delete_unreferenced_labels, - delete_noop_moves, calculate_can_reach_end): New functions broken - out of jump_optimize. - (jump_optimize): Use them. - -Thu Nov 5 07:57:45 1998 Andrew MacLeod - - * except.c (expand_fixup_region_end): Make sure outer context labels - are not issued in an inner context during cleanups. - -Thu Nov 5 04:03:06 1998 Richard Henderson - - * alpha.md (addsi3, subsi3): No new temporaries once cse is - no longer expected. - -Thu Nov 5 03:29:19 1998 Richard Henderson - - * alpha.md (addsi3, subsi3): Expand to a DImode temporary so as - to expose this midpoint to CSE. - -Thu Nov 5 03:42:54 1998 David S. Miller - - * config/sparc/sparc.md (movdf_const_intreg_sp64): Enable again. - -Thu Nov 5 10:53:01 1998 Andreas Schwab - - * configure.in: Bring over gcc2 change of Nov 19 1997. - -Wed Nov 4 23:43:08 1998 Graham - - * toplev.c (output_lang_identify): Make definition dependent on - ASM_IDENTIFY_LANGUAGE. - - * print-rtl.c (spaces): Make static. - -Wed Nov 4 22:16:36 1998 Hans-Peter Nilsson - - * extend.texi: Clarify proper uses for register clobbers in asms. - -Wed Nov 4 22:16:36 1998 Bernd Schmidt - - * recog.h (enum op_type): Define. - (constrain_operands): Adjust prototype. - (recog_op_type): Declare new variable. - * recog.c (recog_op_type): New variable. - (insn_invalid_p): Allow modifying an asm statement after reload. - (extract_insn): Set up recog_op_type. - (constrain_operands): Lose INSN_CODE_NUM arg. All callers changed. - Don't compute operand types, use recog_op_type. - Use the information computed by extract_insn instead of the previous - method of finding it by insn code number. - * caller-save.c (init_caller_save): Use extract_insn, not insn_extract. - * reorg.c (fill_slots_from_thread): Likewise. - * reload1.c (reload_as_needed): Likewise. - (gen_reload): Likewise. - (inc_for_reload): Likewise. - (reload_cse_simplify_operands): Likewise. - Use the information computed by extract_insn instead of the previous - method of finding it by insn code number. - * genattrtab.c (write_attr_case): Generate call to extract_insn, not - insn_extract. - * final.c (final_scan_insn): Use extract_insn, not insn_extract. - (cleanup_operand_subregs): Use extract_insn, not insn_extract. - Use the information computed by extract_insn instead of the previous - method of finding it by insn code number. - * regmove.c (find_matches): Likewise. Change meaning of the return - value to be nonzero if the optimization can be performed, zero if - not. All callers changed. - Shorten some variable names to fix formatting problems. - (regmove_optimize): Shorten some variable names to fix formatting - problems. - Use the information computed by extract_insn instead of the previous - method of finding it by insn code number. - * regclass.c (scan_one_insn): Likewise. - (record_reg_classes): Don't compute operand types, use recog_op_type. - * reload.c (find_reloads): Lose CONSTRAINTS1 variable; use - recog_constraints instead. - -Wed Nov 4 21:37:46 1998 Jeffrey A Law (law@cygnus.com) - - * rtl.h (flow2_completed): Declare. - * flow.c (flow2_completed): Definition. - * toplev.c (rest_of_compilation): Set and clear flow2_completed - as necessary. - -Wed Nov 4 19:15:37 1998 Melissa O'Neill - - * Makefile.in (libcpp.a): Ranlib libcpp.a. - - * cppulp.c (user_label_prefix): Initialize. - -Wed Nov 4 19:07:08 1998 John Wehle (john@feith.com) - - * flow.c (mark_regs_live_at_end): Mark the stack pointer as live - at a RETURN if current_function_sp_is_unchanging is set. - -Wed Nov 4 18:16:29 1998 Herman A.J. ten Brugge - - * emit-rtl.c (try_split): Fixed error in Oct 10 patch. - -Wed Nov 4 15:11:15 1998 Geoffrey Noer - - * i386/cygwin32.h (MASK_WIN32, MASK_CYGWIN, MASK_WINDOWS, MASK_DLL, - TARGET_WIN32, TARGET_CYGWIN, TARGET_WINDOWS, TARGET_DLL): New. - (SUBTARGET_SWITCHES): Add -mno-cygwin, -mcygwin, and -mdll options. - (CPP_PREDEFINES): Don't define __CYGWIN32__ here. - (STARTFILE_SPEC): Handle -mdll, -mno-cygwin options. - (CPP_SPEC): Handle -mno-cygwin option. Define __CYWIN__ in addition - to __CYGWIN32__. - (LIB_SPEC): Handle -mno-cygwin option. - (LINK_SPEC): Handle -mdll. - -Wed Nov 4 22:56:14 1998 J"orn Rennecke - - * reload.c (find_reloads): Fix test for usage by other reload - to handle secondary reloads properly. - -Wed Nov 4 17:25:10 1998 Kaveh R. Ghazi - - * reload1.c (ELIMINABLE_REGS, NUM_ELIMINABLE_REGS): Introduce an - intermediate structure which has exactly the members provided by - ELIMINABLE_REGS. Define NUM_ELIMINABLE_REGS in terms of the - static intermediate structure. - - (init_elim_table): Xmalloc() `reg_eliminate', and initialize it - from the intermediate structure. Do the same analogous fix in - the case where ELIMINABLE_REGS is not defined. - -Tue Nov 3 20:50:03 1998 Jeffrey A Law (law@cygnus.com) - - * pa.h (SELECT_SECTION): Fix thinko. - -Tue Nov 3 17:51:36 1998 Jim Wilson - - * dwarf2out.c (output_call_frame_info): Comments on last change. - -Tue Nov 3 07:51:43 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (add_constant): When taking the address of an item in the - pool, get the mode of the item addressed. - - * arm.c (final_prescan_insn case INSN): If an insn doesn't - contain a SET or a PARALLEL, don't consider it for conditional - execution. - - Restore ABI compatibility for NetBSD. - * arm/netbsd.h (DEFAULT_PCC_STRUCT_RETURN): Override setting in - arm.h. - (RETURN_IN_MEMORY): Likewise. - -Mon Nov 2 11:46:17 1998 Doug Evans - - * m32r/m32r.c (m32r_expand_block_move): Fix byte count computations. - (m32r_output_block_move): Rewrite bytes < 4 handling. - -Mon Nov 2 10:10:35 1998 Kaveh R. Ghazi - - * configure.in: Call AC_FUNC_VFORK. - - * collect2.c: Define VFORK_STRING as a printable string for - error messages (either "vfork" or "fork".) If HAVE_VFORK_H is - defined, include vfork.h. If VMS is defined, define vfork() - appropriately. Remove vfork check on USG, we're using autoconf. - (collect_execute): Pass VFORK_STRING to fatal_perror instead of - checking locally what string to pass. - (scan_prog_file): Likewise. - (scan_libraries): Likewise. - - * gcc.c: Remove vfork check on USG, we're using autoconf. - Besides, no calls to vfork/fork occur in this file. - - * protoize.c: Likewise. - -Mon Nov 2 07:52:28 1998 Alexandre Oliva - - * configure.in (DEFAULT_LINKER): Renamed from LD. - (DEFAULT_ASSEMBLER): Renamed from AS; reverted Schwab's patch. - (gcc_cv_as): Try $DEFAULT_ASSEMBLER before $AS. - * configure: Rebuilt. - -Mon Nov 2 01:48:10 1998 Alexandre Oliva - - * BUGS: Fix the regexp for `more' to find the appropriate node. - Reported by Joerg Pietschmann - - * BUGS: Added link to the WWW FAQ. - -Sun Nov 1 18:27:15 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Nov 1 11:04:32 1998 Jeffrey A Law (law@cygnus.com) - - * From Christian Gafton: - * i386/linux.h (CPP_PREDEFINES): Add -D__i386__. - * sparc/linux.h (CPP_PREDEFINES): Add -D__sparc__. - * sparc/linux64.h (CPP_PREDEFINES): Add -D__sparc__. - -Sat Oct 31 21:42:39 1998 Mark Mitchell - - * c-common.c (c_get_alias_set): Allow all type-punning through - unions. Don't get confused about the type of a bit-field, despite - the antics of build_modify_expr. - -Sat Oct 31 22:35:29 1998 Jean-Pierre Radley - - * fixinc.sco: Parameterize #include_next values. - * fixinc/fixinc.sco: Likewise. - -Sat Oct 31 20:39:35 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (rest_of_compilation): No longer set reload_completed. - * reload1.c (reload): Set it here. Perform instruction splitting - after reload has completed if we will be running the scheduler - again. - -Sat Oct 31 12:30:02 1998 Jeffrey A Law (law@cygnus.com) - - * jump.c (jump_optimize): Initialize mappings from INSN_UID to - EH region if exceptions are enabled and we're performing cross - jump optimizations. - (find_cross_jump): Exit loop if the insns are in different EH regions. - -Sat Oct 31 10:02:48 1998 Mark Mitchell - - * dwarf2out.c (output_call_frame_info): Use - ASM_OUTPUT_DWARF_DELTA4 for the CIE offset to match frame.c. - -Sat Oct 31 10:23:14 1998 Kaveh R. Ghazi - - Reinstall Apr 24th fix, lost during May 6th gcc2 merge: - * c-common.c (check_format_info): Don't check for the 'x' - format character twice, instead check for 'x' and 'X' - -Fri Oct 30 14:50:25 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in (assembler features): Also make gas is configured if - we find it in the source tree. - -Fri Oct 30 13:23:20 1998 Richard Henderson - - * i386.c (i386_comp_type_attributes): Compare whether the - attributes are defined, not their tree nodes. - -Fri Oct 30 11:39:47 1998 Alexandre Oliva - - * configure.in (gxx_include_dir): Bitten by autoconf quoting - characters. :-( - * configure: Rebuilt. - -Fri Oct 30 10:43:29 1998 Andreas Schwab - - * configure.in: Ignore non-absolute value in $AS. - -Fri Oct 30 00:54:25 1998 Peter Jakubek - - * m68k.h (INDIRECTABLE_1_ADDRESS_P): Fix thinko. - -Fri Oct 30 00:42:34 1998 Mark Elbrecht - - * configure.in (msdosdjgpp): Set exeext and target_alias. - -Thu Oct 29 23:55:43 1998 Bernd Schmidt - - * flow.c (XNMALLOC): New macro. - (flow_int_list_blocks, basic_block_succ, basic_block_pred): New - static variables. - (add_edge, add_edge_to_label): New static functions. - (free_bb_memory): New function. - (flow_delete_insn): Delete function. - (basic_block_drops_in): Delete variable. - (find_basic_blocks): Allocate and initialize basic_block_head, - basic_block_succ. Don't allocate basic_block_drops_in. - Call free_bb_memory at the beginning. - (find_basic_blocks_1): Don't do multiple passes. - Delete code to compute basic_block_drops_in. - After calling make_edges, mark blocks reached by current block live. - Update test for unreachable live blocks. - (mark_label_ref): Delete args X, CHECKDUP. Add PRED arg. All callers - changed. - Simplify to call add_edge_to_label when a LABEL_REF is found. - (make_edges): Simplify to call add_edge_to_label instead of - mark_label_ref most of the time. - Compute here whether control drops into the next block. - (delete_unreachable_blocks): Return void. All callers changed. - Delete unreachable blocks in reverse order. - After deleting all unreachable blocks, renumber the remaining ones - and update n_basic_blocks. - (delete_block): Speed up deletion a bit. - Don't set basic_block_drops_in for deleted blocks. - (free_basic_block_vars): Don't free basic_block_drops_in. - (life_analysis_1): Update to use new edge representation. - (dump_flow_info): Delete code to print basic block info; call - dump_bb_data instead. - (compute_preds_succs): Delete code to recompute basic_block_drops_in - and uid_block_number. - Simply copy the previously computed cfg. - (dump_bb_data): New arg LIVE_INFO. All callers changed. - Print register lifetime information if LIVE_INFO is nonzero. - * basic-block.h (dump_bb_data): Adjust prototype. - * gcse.c (gcse_main): Update call to dump_bb_data. - * rtl.h (free_bb_memory): Declare. - * toplev.c (rest_of_compilation): Call free_bb_memory. - - * reload1.c (struct elim_table): Delete MAX_OFFSET member. - (update_eliminable_offsets): Don't compute it. - (set_initial_elim_offsets): Don't initialize it. - Break out some code into set_initial_label_offsets so the rest of - this function can be called from reload_as_needed. - Assume that INITIAL_FRAME_POINTER_OFFSET is defined when - ELIMINABLE_REGS isn't. - (set_initial_label_offsets): New function, broken out of - set_initial_elim_offsets. - (set_offsets_for_label): New function, broken out of set_label_offsets - and reload_as_needed. - (reload): Call the two new functions. - (reload_as_needed): Call set_initial_elim_offsets instead of - duplicating the code. Likewise for set_offsets_for_label. - - * reload1.c (choose_reload_regs): Fix typo in Oct 17 change. - (emit_reload_insns): Ensure that when we set reg_reloaded_valid for - any hard reg, reg_reloaded_dead contains valid data. - -Thu Oct 29 22:30:54 1998 Marcus Meissner - - * i386.c (i386_comp_type_attributes): Return nonzero for mismatched - "stdcall" and "cdecl" attributes. - -Thu Oct 29 19:05:17 1998 Jim Wilson - - * sched.c (update_flow_info): Add code to ! found_orig_dest case to - handle deleted no-op moves of hard registers. - * haifa-sched.c (update_flow_info): Likewise. - -Thu Oct 29 18:07:47 1998 Jeffrey A Law (law@cygnus.com) - - * mips.md (reload_{in,out}{si,di}): Emit a USE of HILO at the end - of the sequences to reload the HILO register which do not actually - reference HILO. - -Thu Oct 29 12:39:35 1998 Jim Wilson - - * c-common.c (c_get_alias_set): Handle ARRAY_REF of union field. - -Thu Oct 29 14:10:22 1998 Andrew MacLeod - - * except.c (emit_eh_context): Make the EH context register stay alive - at -O0 so stupid.c doesn't get confused. - -1998-10-29 Herman A.J. ten Brugge - - * emit-rtl.c (try_split): Do not try to split a BARRIER. - -Thu Oct 29 01:33:54 1998 Jan Hubicka - Jeffrey A Law (law@cygnus.com) - - * i386.md: Change ix86_cpu == PROCESSOR_PENTIUM to TARGET_PENTIUM. - (zero_extendsidi2): Use # in output template and handle completely by - splits. - (zero_extend splitters): New define_splits. - (ashiftrt_32): New pattern. - -Wed Oct 28 22:58:35 1998 Jason Merrill - - * tree.c (append_random_chars): New fn. - (get_file_function_name_long): Use it. - -Wed Oct 28 22:27:05 1998 Richard Henderson - - * Makefile.in (cc1): Put C_OBJS, and thence @extra_c_objs@ last. - (LIBCPP_OBJS): New. Add cppulp.o. - (cppmain, fix-header): Depend on and use libcpp.a. - * configure.in (extra_c_objs, extra_cxx_objs): Use libcpp.a instead - of the individual object files. - * objc/Make-lang.in (cc1obj): Put OBJC_OBJS, and thence @extra_c_objs@, - last. - - * cccp.c (user_label_prefix): New. - (main): Set it off -f*leading-underscore. - (special_symbol): Use it. - * cpplib.c (special_symbol): Likewise. - (cpp_handle_option): Handle -f*leading-underscore. - * cppulp.c: New file. - - * output.h (user_label_prefix): Declare it. - * dwarf2out.c (ASM_NAME_TO_STRING): Prepend user_label_prefix. - * toplev.c (f_options, main): Handle -f*leading-underscore. - - * defaults.h (ASM_OUTPUT_LABELREF): Use asm_fprintf instead of - referencing USER_LABEL_PREFIX directly. - * config/nextstep.h (ASM_OUTPUT_LABELREF): Likewise. - * m32r/m32r.h (ASM_OUTPUT_LABELREF): Likewise. - * final.c (asm_fprintf): Use user_label_prefix instead. - * arm/thumb.c (thumb_print_operand): Likewise. - - * gcc.c (default_compilers): Pass -f*leading-underscore on to - cpp wherever appropriate. - -Wed Oct 28 23:09:25 1998 Robert Lipe - - * sco5.h (SUBTARGET_SWITCHES): Add documentation for OpenServer- - specific compiler switches. - -Wed Oct 28 21:05:53 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (c-common.o): Depend on c-pragma.h. Use $(RTL_H) instead - of rtl.h. - -Wed Oct 28 20:52:47 1998 Kaveh R. Ghazi - - * gcc.c (EXTRA_SPECS, extra_specs): Introduce an intermediate - structure which has exactly the members provided by EXTRA_SPECS. - Xmalloc() the real `extra_specs', and initialize it from this - intermediate structure. - - * alpha.h (EXTRA_SPECS): Revert change for missing initializers. - - * mips.h (EXTRA_SPECS): Likewise. - - * sparc.h (EXTRA_SPECS): Likewise. - -Wed Oct 28 16:46:07 1998 Andreas Schwab - - * function.c (purge_addressof_1): Instead of aborting when a - bitfield insertion as a replacement for (MEM (ADDRESSOF)) does not - work just put the ADDRESSOF on stack. Otherwise remember all such - successful replacements, so that exactly the same replacements - can be made on the REG_NOTEs. Remove the special case for CALL - insns again. - (purge_addressof_replacements): New variable. - (purge_addressof): Clear it at end. - -1998-10-28 Zack Weinberg - - * c-lang.c: Declare extern char *yy_cur if USE_CPPLIB. - (lang_init): Call check_newline always. - * c-lex.c (init_parse) [USE_CPPLIB=1]: After calling - cpp_start_read, set yy_cur and yy_lim to read from - parse_in.token_buffer, so that we'll see the first #line - directive. - * cpplib.c (cpp_start_read): finclude the main input file - before processing -include/-imacros. Process -imacros and - -include separately, and handle -include by stacking a - buffer for the file in question as if it'd been #included. - * toplev.c (documented_lang_options): Recognize -H when - USE_CPPLIB is on. - -1998-10-28 Zack Weinberg - - * cpplib.c: Merge do_once into do_pragma. Break file handling - code out of do_include. - Move append_include_chain, deps_output, - file_cleanup, redundant_include_p, import_hash, - lookup_import, add_import, read_filename_string, read_name_map, - open_include_file, finclude, safe_read to cppfiles.c. - Move prototypes for deps_output, append_include_chain, - finclude to cpplib.h. Move definition of struct - file_name_list there also. - - * cppfiles.c: New file. Contains all the above functions - broken out of cpplib.c; also hack_vms_include_specification - from cccp.c and find_include_file, a new function broken out of - do_include. - - * Makefile.in (cppmain): Depend on cppfiles.o. - (fix-header): Likewise. - (cppfiles.o): New target. - * configure.in (--enable-c-cpplib): Add cppfiles.o to - extra_c_objs. Add ../cppfiles.o to extra_cxx_objs. - -Wed Oct 28 14:06:49 1998 Jim Wilson - - * dwarfout.c (dwarfout_file_scope_decl): If DECL_CONTEXT, don't abort - if pending_types is nonzero. - (dwarfout_finish): Verify pending_types is zero before finishing. - -Wed Oct 28 10:29:09 1998 Nick Clifton - - * expr.c (convert_move): Use shifts to perform the move if a - suitable extend pattern cannot be found. Code written by - Richard Henderson . - -Wed Oct 28 03:59:29 1998 Bernd Schmidt - - * regclass.c (renumber, regno_allocated): New static variables, moved - out of allocate_reg_info. - (allocate_reg_info): Move these two variables outside the function. - Move code to free memory into new function free_reg_info. - (free_reg_info): New function, broken out of allocate_reg_info. - * toplev.c (compile_file): Call free_reg_info, not allocate_reg_info. - * rtl.h (allocate_reg_info): Don't declare. - (free_reg_info): Declare. - - * final.c (cleanup_subreg_operands): ASM_INPUTs need no treatment. - -Wed Oct 28 02:38:12 1998 Jason Merrill - - * toplev.c (compile_file): Temporarily revert last change. - -Wed Oct 28 00:00:35 1998 Jason Merrill - - * c-typeck.c (convert_for_assignment): Parenthesize. - -1998-10-28 Andreas Schwab - - * reload1.c (delete_output_reload): Avoid ambigous else. - -Wed Oct 28 00:10:35 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (compile_file): Call allocate_reg_info to free register - table memory. - * rtl.h (allocate_reg_info): Declare. - - * PROJECTS: Remove entry for local spilling. - - * final.c (cleanup_subreg_operands): New function. - (final_scan_insn): Use it. - (alter_subreg): Clear the "used" field when we turn a SUBREG into - a REG. - * reload1.c (reload): Delete CLOBBER insns and also cleanup SUBREG - operands when reload has finished. - * reload.h (cleanup_subreg_operands): Declare.. - * flow.c (life_analysis_1): No longer delete CLOBBER insns after - reload. Handled in reload itself. - -Tue Oct 27 23:32:34 1998 Bernd Schmidt - - * reload1.c (verify_initial_offsets): New function. - (reload): Call it after reload_as_needed. Also verify that the frame - size stays constant during reload_as_needed. - * i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Undo Jul 26 change. - - * reload.h (struct insn_chain): Add need_operand_change element. - * reload1.c (new_insn_chain): Clear it. - (calculate_needs_all_insns): Set it; don't overload need_reload. - (reload_as_needed): Use it. - - * reload.c (find_reloads_address): Use BASE_REG_CLASS instead of - reload_address_base_reg_class throughout. Similar for INDEX_REG_CLASS - and reload_address_index_reg_class. - (find_reloads_address_1): Likewise. - * reload.h (reload_address_base_reg_class, - reload_address_index_reg_class): Don't declare. - * reload1.c (reg_old_renumber, pseudo_previous_regs, - pseudo_forbidden_regs, bad_spill_regs_global): New static variables. - (used_spill_regs): Now static. - (reload_address_base_reg_class, reload_address_index_reg_class, - regs_explicitly_used, counted_for_groups, counted_for_nongroups, - basic_block_needs, max_needs, group_size, group_mode, max_groups, - max_nongroups, max_needs_insn, max_groups_insn, max_nongroups_insn, - forbidden_regs): - Deleted variables. - (init_reload): Delete code to compute base/index reg classes. - (reload): Delete variable J. - Delete code to manage basic_block_needs. - Don't compute regs_explicitly_used. - Allocate, initialize and free reg_old_renumber, pseudo_forbidden_regs, - pseudo_previous_regs. - Initialize bad_spill_regs_global. - Don't call order_regs_for_reload here. - Don't initialize spill_reg_order and n_spills. - Don't forbid explicitly used regs to be used for spill regs. - Change main loop to infinite loop, with explicit break statements. - Make SOMETHING_CHANGED variable local to that loop. - Don't initialize max_needs, max_groups, max_nongroups, max_needs_insn, - max_groups_insn, max_nongroups_insn, group_size, group_mode. - Make sure spilled_pseudos is cleared before calling spill_hard_reg or - new_spill_reg. - Don't call dump_needs. - Delete code to reset potential_reload_regs. - Delete code to terminate loop conditional on the global needs variables - showing no further needs. - (calculate_needs_all_insns): Return void. All callers changed. - Initialize something_needs_elimination here, not in reload. - Delete avoid_return_reg kludge. - (calculate_needs): Lose AVOID_RETURN_REG and GLOBAL args, return void. - All callers changed. - Initialize the group_mode and group_size elements of the arg CHAIN. - Delete code to manage basic_block_needs. - Operate on elements of CHAIN instead of global variables. - Delete avoid_return_reg kludge. - (find_tworeg_group): Lose GLOBAL arg, take CHAIN arg, return void. - All callers changed. - Operate on elements of CHAIN instead of global variables. - Delete special SMALL_REGISTER_CLASSES code. - Delete spill_failure code; now in new_spill_reg. - (find_group): Lose GLOBAL arg, take CHAIN arg, return void. - All callers changed. - Operate on elements of CHAIN instead of global variables. - (maybe_mark_pseudo_spilled): New static function. - (find_reload_regs): Lose GLOBAL arg, take CHAIN arg, return void. - All callers changed. - Operate on elements of CHAIN instead of global variables. - Call order_regs_for_reload here, not in reload. - Initialize spill_reg_order and n_spills. - Simplify test whether an asm insn is involved. - Delete spill_failure code; now in new_spill_reg. - Call maybe_mark_pseudo_spilled for everything marked as live in - CHAIN. Merge CHAIN's used_spill_regs into the global variable - used_spill_regs. - (dump_needs): Take CHAIN arg. No longer static, to prevent the - compiler from optimizing this function (now unused) away. - Operate on elements of CHAIN instead of global variables. - (possible_group_p): Lose MAX_GROUPS arg, take CHAIN arg. All callers - changed. - Operate on elements of CHAIN instead of global variables. - (count_possible_groups): Lose GROUP_SIZE, GROUP_MODE, MAX_GROUPS args, - take CHAIN arg. All callers changed. - Operate on elements of CHAIN instead of global variables. - (new_spill_reg): Lose MAX_NEEDS, MAX_NONGROUPS, GLOBAL args, take - CHAIN, NONGROUP args. Return void. All callers changed. - Verify caller isn't trying to spill a pseudo. - Simplify test for illegal reg, just use bad_spill_regs. - Generate better error messages. - Operate on elements of CHAIN instead of global variables. - Mark spilled register in CHAIN's used_spill_regs element. - Don't call spill_hard_reg. - (spill_hard_reg): Lose GLOBAL arg, return void. All callers changed. - Mark spilled hard regs in bad_spill_regs_global. - Mark affected pseudos in spilled_pseudos, but don't spill them. - (ior_hard_reg_set): New static function. - (finish_spills): Return int. All callers changed. - Compute spill_reg_order, n_spills and spill_regs here. Also update - regs_ever_live for regs used as spills. - For every pseudo in spilled_pseudos, spill it and mark the previous - hard reg it had in pseudo_previous_regs. Compute which hard regs - are used as spills in insns during which it is live, and retry global - register allocation. Update all life information in the - reload_insn_chain not to include pseudos without hard regs. - Call alter_reg for all affected speudos. - - (scan_paradoxical_subregs): Disable SMALL_REGISTER_CLASSES special - case, it's not clear what it's supposed to do. - - (hard_reg_use_compare): Take bad_spill_regs into account. - (pseudos_counted): New static variable. - (count_pseudo): New static function. - (order_regs_for_reload): Take CHAIN arg. All callers changed. - Initialize bad_spill_regs from bad_spill_regs_global, then merge any - hard registers explicitly used across the current insn into the set. - Compute hard_reg_n_uses taking only pseudos live across this insn - into account. - Tweak sorting of potential_reload_regs. - (compare_spill_regs): Delete function. - (reload_as_needed): Don't sort the spill_regs array, it's computed - in proper order in finish_spills. - Delete avoid_return_reg kludge. - Delete code to manage basic_block_needs. - (allocate_reload_reg): Minor speed/readability tweaks. - Operate on elements of CHAIN instead of global variables. - (choose_reload_regs): Lose AVOID_RETURN_REG arg. All callers changed. - Delete avoid_return_reg kludge. - Initialize reload_reg_used from CHAIN's used_spill_regs element. - Delete unused label FAIL. - (reload_combine): Replace reload_address_index_reg_class with - INDEX_REGS. - Don't use used_spill_regs to determine information about lifetime of - hard regs. - -Tue Oct 27 13:15:02 1998 Nick Clifton - - * toplev.c (display_help): Ignore empty target specific - options, and if -W is also specified on the command line then - display undocumented options. - - * config/arm/arm.c: Updated with changes in devo sources. - * config/arm/arm.h: Updated with changes in devo sources. - * config/arm/lib1funcs.asm: Updated with changes in devo sources. - * config/arm/lib1thumb.asm: Add ELF support. - -Tue Oct 27 16:11:43 1998 David Edelsohn - - * collect2.c (aix64_flag): New variable. - (main, case 'b'): Parse it. - (GCC_CHECK_HDR): Object magic number must match mode. - (scan_prog_file): Only check for shared object if valid header. - Print debugging if header/mode mismatch. - -Tue Oct 27 10:15:02 1998 Nick Clifton - - Added support for arm-elf-linux configuration, submitted by Philip - Blundell , and integrated this with the arm-elf - code developed by Catherine Moore . The following - files are affected: - - * configure.in: Add arm-*-linux-gnu, armv2-*-linux and arm-*-elf - targets. - - * configure: Regenerated. - - * config/arm/aout.h: Add default definitions of REGISTER_PREFIX, - USER_LABEL_PREFIX and LOCAL_LABEL_PREFIX. Make other macro - definitions conditional on their not having been already defined. - - * config/arm/lin1funcs.asm: Add ELF only macros to generate .size - and .type directives, and add "(PLT)" qualification to function - calls. - - * config/arm/linux.h: Deleted. This file is now superseded by - either linux-elf.h or linux-aout.h. - - * config/arm/linux-gas.h: Define `inhibit_libc' if cross-compiling. - (CLEAR_INSN_CACHE): New macro, currently disabled (awaiting kernel - support). - Move definitions from old linux.h file here. - - * config/arm/elf.h: New file. Generic ARM/ELF support. - - * config/arm/linux-aout.h: New file. Support for Linux with a.out. - - * config/arm/linux-elf.h: New file. Support for Linux with ELF. - - * config/arm/linux-elf26.h: New file. Support for Linux with ELF - using the 26bit APCS. - - * config/arm/unknown-elf.h: New file. Support for OS'es other - than Linux with ELF. - - * config/arm/t-arm-elf: New file. makefile fragment for arm-elf - builds. - - * config/arm/coff.h: Include aout.h for basic assembler macros. - Add support for -mstructure_size_boundary= command line option. - - * config/arm/arm.h: Add support for -mstructure_size_boundary= - command line option. Make macro definitions conditional on their - not having been already defined. - - * config/arm/arm.c: Add support for -mstructure_size_boundary= - command line option. - - -Tue Oct 27 08:56:46 1998 Andrew MacLeod - - * dwarfout.c (ASM_OUTPUT_DWARF_STRING_NEWLINE): ASM_OUTPUT_DWARF_STRING - has been changed to not include a newline. Use this macro instead. - (output_enumeral_list, const_value_attribute, name_attribute, - comp_dir_attribute, prototyped_attribute, producer_attribute, - inline_attribute, pure_or_virtual_attribute, output_inheritance_die, - dwarfout_file_scope_decl, generate_new_sfname_entry, - generate_macinfo_entry, dwarfout_init, dwarfout_finish): Use - ASM_OUTPUT_DWARF_STRING_NEWLINE macro. - -Mon Oct 26 13:35:02 1998 Richard Henderson - - * combine.c (subst): Process the inputs to a parallel asm_operands - only once. - -Mon Oct 26 13:32:31 1998 Richard Henderson - - * stmt.c (expand_asm_operands): Accept `=' or `+' at any position. - -Mon Oct 26 12:53:14 1998 Jeffrey A Law (law@cygnus.com) - - * tm.texi (ASM_OUTPUT_MAX_SKIP_ALIGN): Document. - -Mon Oct 26 00:36:58 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Oct 25 23:36:52 1998 Jason Merrill - - * stmt.c (expand_fixup): Set fixup->before_jump to a - NOTE_INSN_DELETED instead of a NOTE_INSN_BLOCK_BEG. - -Sun Oct 25 15:49:57 1998 Kaveh R. Ghazi - - * Makefile.in (recog.o): Depend on toplev.h. - (insn-emit.o): Depend on recog.h. - (insn-peep.o): Depend on recog.h and insn-config.h. - - * combine.c (simplify_set): Remove unused variable `scratches'. - - * final.c (final_scan_insn): Wrap declaration of variables `vlen' - and `idx' in macro conditional controlling their use. - - * genemit.c (main): Make the generated output file include - recog.h. Don't have it declare `insn_operand_constraint', since - we get it from recog.h. - - * genpeep.c (main): Make the generated output file include - insn-config.h and recog.h. - - * recog.c: Include toplev.h. - (extract_insn): Remove unused variable `p'. - - * regclass.c (fix_register): Add missing braces around initializer - for `what_option'. - (allocate_reg_info): Move variable `i' into the scope where it is - used. Change its type to `size_t'. - -Sun Oct 25 13:10:15 1998 Bernd Schmidt - - * reload.c (push_reload): When merging reloads, make sure - that reload_in_reg and reload_in are from the same reload in - all cases. - -Sun Oct 25 12:07:00 1998 Mumit Khan - - * i386/crtdll.h (CPP_PREDEFINES): Fix typo. - * i386/mingw32.h (CPP_PREDEFINES): Likewise. - -Fri Oct 23 23:42:03 1998 David Edelsohn - - * loop.c (loop_has_tablejump): New variable. - (prescan_loop): Scan for it. - (insert_bct): Replace explicit scan with use of it. - * regclass.c (regclass): Restore loop variable j. - (record_reg_classes): Deterine op_types modifiers and initialize - classes[i] before matching constraints. Handle matching - constraints 5-9. - -Fri Oct 23 13:55:48 1998 Jim Wilson - - * m32r/m32r.c (gen_split_move_double): Call alter_subreg. Delete - subreg support. - -Fri Oct 23 16:19:24 1998 Kaveh R. Ghazi - - * mips.h (EXTRA_SPECS): Add missing initializers. - -Fri Oct 23 16:08:39 1998 Kaveh R. Ghazi - - * sparc.h (EXTRA_SPECS): Add missing initializers. - (sparc_defer_case_vector): Provide a prototype. - - * svr4.h (ASM_OUTPUT_ASCII): Cast STRING_LIMIT to (long) when - comparing it to the result of a pointer subtraction. - -Fri Oct 23 15:34:14 1998 Kaveh R. Ghazi - - * alpha.c (override_options): Use ISDIGIT(), not isdigit(). Cast - the argument to (unsigned char). - - * alpha.h (EXTRA_SPECS): Add missing initializers. - (ASM_GENERATE_INTERNAL_LABEL): Ensure the argument matches the - format specifier. - -Fri Oct 23 13:12:35 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (life_analysis_1): Enable "rescan" code after reload. - (propagate_block): Delete dead code after reload. - - * sched.c (update_flow_info): Revert Oct 19, 1998 change. Brings - back Oct 15, 1998 change. - * haifa-sched.c (update_flow_info): Likewise. - * flow.c (life_analysis_1): Delete CLOBBER insns after reload. - - * mn10200.md (truncated shift): Accept constant inputs too. - -Fri Oct 23 04:06:57 1998 Richard Earnshaw (rearnsha@arm.com) - - * machmode.h (mode_mask_array): No longer const. - * rtl.c (init_rtl): Fully initialize it if EXTRA_CC_MODES defined. - -Fri Oct 23 11:19:06 1998 Martin v. Löwis - - * frame.c: Somewhat explain `FDE'. - Suggested by Brendan Kehoe - -Fri Oct 23 00:56:11 1998 Jason Merrill - - * expr.c (pending_chain): Move up. - (save_expr_status): Do save pending_chain. - (restore_expr_status): And restore it. - * function.h (struct function): Add pending_chain. - -1998-10-23 Herman A.J. ten Brugge - - * reorg.c (relax_delay_slots): Fixed test for mostly_true_jump. The - did not match the code. - -Fri Oct 23 00:07:01 1998 Bernd Schmidt - - * regclass.c (regclass): Break out some code into new function - scan_one_insn, and into regclass_init. - (init_cost): New static variable, moved out of regclass. - (regclass_init): Initialize it here, not in . - (scan_one_insn): New static function, broken out of regclass. - * recog.c (apply_change_group): Break out some code into new - function insn_invalid_p. - (insn_invalid_p): New static fn, broken out of apply_change_group. - -Thu Oct 22 22:34:42 1998 Jim Wilson - - * reload1.c (reload_as_needed): When rewrite POST_INC, verify - reg_reloaded_contents matches incremented pseudo. - - * v850/v850.c (v850_reorg): Call alter_subreg. Delete subreg support. - -Fri Oct 23 11:11:56 1998 Michael Hayes - - * rtl.def (POST_MODIFY, PRE_MODIFY): New generalized operators for - addressing modes with side effects. These are currently - placeholders for the C4x target. - -Thu Oct 22 16:46:35 1998 Bernd Schmidt - - * loop.c (express_from): Make sure that when generating a PLUS of - a PLUS, any constant expression appears on the outermost PLUS. - -Thu Oct 22 15:46:23 1998 Per Bothner (bothner@cygnus.com) - - * Makefile.in (distdir-cvs, distdir-start): Clean up so it - works if "$(srcdir)" != ".". - -Wed Oct 21 19:23:59 1998 Jim Wilson - - * expmed.c (store_bit_field): If need to add a SUBREG, then remove - existing SUBREG if we can, otherwise abort. - -Wed Oct 21 09:58:51 1998 Mark Mitchell - - * c-common.c (c_apply_type_quals_to_decl): Don't crash when - `restrict' is applied to a non-pointer variable. - -Wed Oct 21 09:18:58 1998 Mark Mitchell - - * invoke.texi: Document -flang-isoc9x. - - * Makefile.in (OBJS): Add splay-tree.o. - (c-common.o): Depend on rtl.h. - (splay-tree.o): List dependencies and provide build rule. - - * rtl.h (record_alias_subset): New function. - * alias.c: Include splay-tree.h. - (alias_set_entry): New type. - (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Remove. - (DIFFERENT_ALIAS_SETS_P): Use mem_in_disjoint_alias_sets_p. - (mems_in_disjoin_alias_sets_p): New function. - (alias_set_compare): Likewise. - (insert_subset_children): Likewise. - (get_alias_set_entry): Likewise. - - * tree.h (TYPE_RESTRICT): New macro. - (TYPE_UNQUALIFIED): New manifest constant. - (TYPE_QUAL_CONST): Likewise. - (TYPE_QUAL_VOLATILE): Likewise. - (TYPE_QUAL_RESTRICT): Likewise. - (tree_type): Add restrict_flag. Reduce count of free bits. - (DECL_POINTER_ALIAS_SET): New macro. - (DECL_POINTER_ALIAS_SET_KNOWN_P): Likewise. - (tree_decl): Add pointer_alias_set. - (build_qualified_type): New function. - (build_type_variant): Define in terms of build_qualified_type. - * tree.c (set_type_quals): New function. - (make_node): Initialize DECL_POINTER_ALIAS_SET. - (build_type_attribute_variant): Use build_qualified_type and - set_type_quals. - (build_type_variant): Rename, and modify, to become... - (build_qualified_type): New function. - (build_complex_type): Use set_type_quals. - - * c-tree.h (C_TYPE_OBJECT_P): New macro. - (C_TYPE_FUNCTION_P): Likewise. - (C_TYPE_INCOMPLETE_P): Likewise. - (C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise. - (c_apply_type_quals_to_decl): New function. - (c_build_qualified_type): New function. - (c_build_type_variant): Define in terms of c_build_qualified_type. - (flag_isoc9x): Declare. - * c-typeck.c (qualify_type): Use c_build_qualified_type. - (common_type): Change to use TYPE_QUALS. - (comptypes): Likewise. - (convert_for_assignment): Likewise. - * c-aux-info.c (gen_type): Likewise. Deal with `restrict'. - * c-decl.c (flag_isoc9x): Define. - (c_decode_option): Handle -flang-isoc9x. - (grokdeclarator): Update to handle restrict. Use TYPE_QUALS, - c_build_qualified_type, etc. Use c_apply_type_quals_to_decl. - * c-lex.c (init_lex): Deal with restrict. - (init_lex): Don't treat restrict as a reserved word in - -traditional mode, or without -flang-isoc9x. - * c-lex.h (rid): Add RID_RESTRICT. - * c-parse.gperf (restrict, __restrict, __restrict__): Make - equivalent to RID_RESTRICT. - * c-parse.in (TYPE_QUAL): Update comment. - * c-common.c: Include rtl.h. - (c_find_base_decl): New function. - (c_build_type_variant): Rename, and modify, to become ... - (c_build_qualified_type): New function. - (c_apply_type_quals_to_decl): Likewise. - (c_get_alias_set): For INDIRECT_REFs, check to see if we can find - a particular alias set for the reference. - * toplev.c (documented_lang_options): Add -flang-isoc9x. - -Wed Oct 21 09:15:06 1998 Nick Clifton - - * config/arm/arm.h (TARGET_SWITCHES): Document arm specific - command line switches. - -Tue Oct 20 10:04:51 1998 Graham - - * reload.c (loc_mentioned_in_p): Add missing braces to bind - else to correct if. - -Mon Oct 19 16:34:05 1998 Tom Tromey - - * gcc.c (option_map): Added --classpath and --CLASSPATH. - -Tue Oct 20 10:59:02 1998 Gavin Romig-Koch - - * regclass.c (fix_register): Add error message. - * invoke.texi (-fcall-used-REG,-fcall-saved-REG): Note the - new error message. - -Tue Oct 20 10:12:17 1998 Kaveh R. Ghazi - - * c-decl.c (warn_missing_noreturn): New global variable. - (c_decode_option): Check for new flags -W{no-}missing-noreturn. - (finish_function): Implement missing noreturn warning. - - * c-tree.h (warn_missing_noreturn): Declare extern. - - * invoke.texi: Document new flags. - - * toplev.c (documented_lang_options): Add description. - -Tue Oct 20 22:16:11 1998 Michael Hayes - - * config/c4x/c4x.c (c4x_parallel_process): Disable until BCT - loop optimization stable for the C4x. - (c4x_rptb_info_t, c4x_dump, c4x_rptb_in_range, c4x_rptb_unjumped_loop, - c4x_rptb_find_comp_and_jump, c4x_rptb_loop_info_get, - c4x_rptb_emit_init, c4x_rptb_process): Deleted (superseded by BCT - loop optimization). - (c4x_address_conflict): Be more paranoid when packing a volatile - memref in a parallel load/store. - -Tue Oct 20 21:56:05 1998 Michael Hayes - - * config/c4x/c4x.md (repeat_block_top, repeat_block_end, - repeat_block_filler): Deleted. - (*ashlqi3_set, *ashrqi3_const_set, *ashrqi3_nonconst_clobber): - Condition code not set if destination register from 'c' class. - (*subbqi3_carry_clobber): Fix typo. - -1998-10-18 Herman A.J. ten Brugge - - * reorg.c (steal_delay_list_from_target): Check for insns that - modify the condition codes and effect the direction of the jump - in the sequence. - -Sat Oct 17 13:09:09 1998 Graham - - * function.c (purge_addressof_1): Replace call to - emit_insns_before() with emit_insn_before(). - -Mon Oct 19 19:34:03 1998 Mike Stump - - * libgcc2.c (__pure_virtual): Call __terminate instead of _exit. - -Mon Oct 19 13:26:24 1998 Bernd Schmidt - - * jump.c (sets_cc0_p): Compile only if HAVE_cc0. - -Mon Oct 19 11:40:56 1998 Jeffrey A Law (law@cygnus.com) - - * gcse.c (compute_hash_table): Correctly identify hard regs which are - clobbered across calls. - - * loop.c (scan_loop): Be more selective about what invariants are - moved out of a loop. - -Mon Oct 19 10:46:58 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Oct 19 11:40:56 1998 Jeffrey A Law (law@cygnus.com) - - * libgcc2.c (eh_context_static): Do not call malloc to allocate the - static eh_context structure. - -Mon Oct 19 10:45:40 1998 Bernd Schmidt - - * combine.c (recog_for_combine): Lose PADDED_SCRATCHES arg. All - callers changed. - (try_combine): Don't update max_scratch. - * flow.c (max_scratch, num_scratch): Delete variables. - (life_analysis_1): Don't initialize max_scratch. - (propagate_block): Don't update max_scratch. - (mark_set_1): Don't increment num_scratch. - * regs.h (max_scratch): Delete declaration. - -Mon Oct 19 10:28:15 1998 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload_reg_free_before_p): Hack. Return 0 if EQUIV - is nonzero. This is temporary! - - * sched.c (update_flow_info): Handle death notes made invalid by - instruction splitting. Partially reverts Oct 15, 1998 patch. - * haifa-sched.c (update_flow_info): Likewise. - -Sun Oct 18 17:31:26 1998 Jeffrey A Law (law@cygnus.com) - - * function.c (uninitialized_vars_warning): Do not warn for a VAR_DECL - if it has a nonzero DECL_INITIAL. - -Sat Oct 17 23:18:08 1998 Kaveh R. Ghazi - - * Makefile.in (flow.o): Depend on recog.h. - - * cpplib.h (directive_table): Add missing initializiers. - (finclude): Change type of variable `bsize' to size_t. - - * cse.c (rtx_cost): Mark parameter `outer_code' with ATTRIBUTE_UNUSED. - - * dwarfout.h (dwarfout_label): Wrap prototype in macro RTX_CODE. - - * fix-header.c (lookup_std_proto): Cast the result of `strlen' to - `int' when comparing against one. - (cpp_file_line_for_message): Mark parameter `pfile' with - ATTRIBUTE_UNUSED. - (cpp_fatal): Mark parameter `pfile' with ATTRIBUTE_UNUSED. - - * flow.c: Include recog.h. - (sbitmap_copy): Cast arguments 1 & 2 of `bcopy' to (PTR). - - * function.c (thread_prologue_and_epilogue_insns): Mark parameter - `f' with ATTRIBUTE_UNUSED. - (reposition_prologue_and_epilogue_notes): Likewise. - - * genopinit.c (gen_insn): Cast argument of ctype functions to - `unsigned char'. - - * haifa-sched.c: Include recog.h. - (blockage_range): Cast result of UNIT_BLOCKED macro to (int) when - comparing against one. - - * libgcc2.a (__throw): Revert ATTRIBUTE_UNUSED change for now. - - * mips-tfile.c (parse_end): Cast the argument of ctype function to - `unsigned char'. - (parse_ent): Likewise. - (parse_input): Likewise. - - * optabs.c (init_libfuncs): Likewise. - - * protoize.c (find_rightmost_formals_list): Likewise. - - * recog.h (const_double_operand): Fix typo in prototype. - - * tlink.c (scan_linker_output): Cast the argument of ctype - function to `unsigned char'. - - * toplev.c (check_lang_option): Cast the result of `strlen' to - `int' when comparing against one. - -Sat Oct 17 13:09:09 1998 Graham - - * gcse.c (dump_cuid_table): Correct typo. - -Sat Oct 17 11:02:47 1998 Nick Clifton - - * toplev.c (display_help): Prepend '-m' to target specific - options. - (check_lang_option): Ignore text after end of first word of a - language specific option. - -Sat Oct 17 02:26:03 1998 Bernd Schmidt - - * reload1.c (reg_used_by_pseudo): New static variable. - (choose_reload_regs): Initialize it. - Use it instead of testing spill_reg_order to determine whether a - pseudo is live in a hard register across the current insn. - Fix a typo in a reference to reload_reg_rtx. - - * flow.c (propagate_block): Replace code that computes and uses - regs_sometimes_live with simpler code that just walks the set of - currently live registers. - - * Makefile.in (insn-extract.o): Fix dependencies. - * genextract.c (main): Generate includes for insn-config.h and - recog.h. - Delete generation of declarations which are now in recog.h. - * genrecog.c (main): Delete generation of definitions which are - now in recog.c. - * local-alloc.c (block_alloc): Use extract_insn and the variables - it sets up instead of looking up values by insn_code. - * recog.c (recog_operand, recog_operand_loc, recog_dup_loc, - recog_dup_num): Define here instead of generating the definition in - genrecog.c. - (recog_n_operands, recog_n_dups, recog_n_alternatives, - recog_operand_mode, recog_constraints, recog_operand_address_p): - New variables. - (extract_insn): New function. - * recog.h (extract_insn): Declare function. - (which_alternative, recog_n_operands, recog_n_dups, - recog_n_alternatives, recog_operand_mode, recog_constraints, - recog_operand_address_p): Declare variables. - * regclass.c (n_occurrences): New static function. - * reload.c (n_occurrences): Delete function. - (find_reloads): Use extract_insn. - * reload.h (n_occurrences): Delete declaration. - -Sat Oct 17 01:17:51 1998 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload_as_needed): Fix test for when to call - update_eliminable_offsets. - -Fri Oct 16 20:40:50 1998 J"orn Rennecke - - Fix consistency problems with reg_equiv_{mem,address}; - Improve reload inheritance; - - * reload.c (reload_out_reg): New variable. - (loc_mentioned_in_p, remove_address_replacements): New functions. - (remove_replacements): Deleted. - (push_reload): Set reload_out_reg[i]. - When merging, also set reload_{in,out}_reg[i], and remove - duplicate address reloads. - (combine_reloads): Copy reload_out_reg[i]. - (find_reloads): Do make_memloc substitution also when - reg_equiv_memory_loc[regno] and num_not_at_initial_offset - are both nonzero. - Include *recog_operand_loc in commutativity operand changes. - Generate optional output reloads. - Delete reference to n_memlocs. Don't set *recog_operand_loc before - processing operands. Call make_memloc in reg_equiv_address code. - Set *recog_operand_loc only after processing operands, and only - if replace is true. Return a value. - When changing address reload types for operands that didn't get - reloaded, use RELOAD_FOR_OPADDR_ADDRESS for - RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. - Don't emit USEs for pseudo SUBREGs when not replacing. - (find_reloads_address): Do make_memloc substitution also when - reg_equiv_memory_loc[regno] and num_not_at_initial_offset - are both nonzero. - (find_reloads_toplev): Likewise. - Call make_memloc in reg_equiv_address code. - (debug_reload_to_stream): Add code to output reload_out_reg. - (make_memloc): Delete local variable i, ifdefed out code, and - references to memlocs and n_memlocs. - (memlocs, n_memlocs): Delete. - (push_secondary_reload): Clear reload_out_reg. - (find_reloads_address_1): Provide memrefloc argument to all calls - to find_reloads_address. - In AUTO_INC code, handle non-directly addressable equivalences properly. - * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. - (find_reloads): Add return type. - (remove_address_replacements, deallocate_reload_reg): Declare. - * reload1.c (num_not_at_initial_offset): No longer static. - (delete_address_reloads, delete_address_reloads_1): Likewise. - (deallocate_reload_reg): New function. - (spill_reg_stored_to): New array. - (eliminate_regs): Don't substitute from reg_equiv_memory_loc. - (eliminate_regs_in_insn): Move assignments of previous_offset and - max_offset fields, and recalculation of num_not_at_initial_offset - into new static function: - (update_eliminable_offsets) . - (reload_as_needed): Call update_eliminable_offsets after calling - find_reloads. - Call forget_old_reloads_1 with contents of reloaded auto_inc - expressions if the actual addressing can't be changed to match the - auto_inc. - (choose_reload_regs): For inheritance, replace - reload_reg_free_before_p test with reload_reg_used_at_all test, and - remove stand-alone reload_reg_used_at_all test. - Use reload_out_reg to determine which reload regs have output reloads. - Treat reload_override_in more similar to inherited reloads. - Handle (subreg (reg... for inheritance. - For flag_expensive_optimizations, add an extra pass to remove - unnecessary reloads from known working inheritance. - Delete obsolete code for pseudos replaced with MEMs. - Handle inheritance from auto_inc expressions. - (emit_reload_insns): If reload_in is a MEM, set OLD to - reload_in_reg[j]. - Don't reload directly from oldequiv; if it's a pseudo with a - stack slot, use reload_in[j]. - Check that reload_in_reg[j] is a MEM before replacing reload_in - from reg_reloaded_contents. - Include non-spill registers in reload inheritance processing. - Also try to use reload_out_reg to set spill_reg_store / - reg_last_reload_reg. - In code to set new_spill_reg_store, use single_set to find out if - there is a single set. - Add code that allows to delete optional output reloads. - Add code to allow deletion of output reloads that use no spill reg. - At the end, set reload_override_in to oldequiv. - Also call delete_output_reload if reload_out_reg is equal to old - in oldequiv code. - Add code to call delete_output_reload for stores with no matching load. - Set / use spill_reg_stored_to. - Handle case where secondary output reload uses a temporary, but - actual store isn't found. - When looking for a store of a value not loaded in order to call - delete_output_reload, count_occurrences should return 0 for no - loads; but discount inherited input reloadill_reg_stored_to. - Do checks for extra uses of REG. Changed all - callers. - Use delete_address_reloads. - (reload): Take return value of find_reloads into account. - If a no-op set needs more than one reload, delete it. - (reload_reg_free_before_p): RELOAD_FOR_INPUT - can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS - for the same operand. - (clear_reload_reg_in_use): Check for other reloads that keep a - register in use. - (reload_reg_free_for_value_p): Handle RELOAD_FOR_OPERAND_ADDRESS / - RELOAD_FOR_OPADDR_ADDR. - Take into account when an address address reload is only needed - for the address reload we are considering. - (count_occurrences): Use rtx_equal_p for MEMs. - (inc_for_reload): Return instruction that stores into RELOADREG. - New argument two, IN, and rtx. Changed all callers. - (calculate_needs_all_insns, reload_as_needed): - Don't clear after_call for a CLOBBER. - Keep track of how many hard registers need to be copied from - after_call, and don't clear after_call before we have seen - that much copies, or we see a different instruction. - -Fri Oct 16 10:58:23 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_basic_blocks_1): Do not delete unreachable blocks - after reload has completed. - -Fri Oct 16 17:26:10 1998 Dave Brolley - - * cpplib.c (cpp_get_token): Replace whitespace that occurs between - a macro name and the next token with a single blank if that whitespace - is in a macro buffer and the next token is not '('. - -Fri Oct 16 15:44:02 1998 Dave Brolley - - * cccp.c (rescan): Handle multibyte characters ending in backslash. - (rescan): Likewise. - (skip_if_group): Likewise. - (skip_to_end_of_comment): Likewise. - (macarg1): Likewise. - (discard_comments): Likewise. - (change_newlines): Likewise. - -Fri Oct 16 15:26:24 1998 Dave Brolley - - * c-lex.c (yylex): Fix unaligned access of wchar_t. - -Fri Oct 16 10:47:53 1998 Nick Clifton - - * config/arm/arm.h (TARGET_SWITCHES): Add --help documentation. - (TARGET_OPTIONS): Add --help documentation. - -Fri Oct 16 11:49:01 1998 Kaveh R. Ghazi - - * rtl.h (sets_cc0_p): Revert Oct 14 ATTRIBUTE_NORETURN change. - -Fri Oct 16 07:08:46 1998 Bruce Korb - - * fixinc/* Moved in from ../contrib directory in preparation - for integrating it into the normal build process. In particular, - fixinc/Makefile.in must be config-ed into the build directory - as fixinc/Makefile. Proposed patches to ./Makefile.in and - ./configure.in will be "in the mail" momentarily. - -Fri Oct 16 08:13:46 1998 David S. Miller - - * cse.c (cse_basic_block): Fixup hash flushing loop so we do not - accidently walk into the free list. Comment how that can happen. - (invalidate): Fix indentation. - -Thu Oct 15 23:53:29 1998 Bernd Schmidt - Jeffrey A Law (law@cygnus.com) - - * flow.c (life_analysis_1): Do not clobber regs_ever_live after - reload. Never perform rescans of the insn chain after reload. - (propagate_block): Do not delete insn or create new autoinc addressing - modes after reload. - - * jump.c (jump_optimize): Unconditionally use the code that was - previously conditional on PRESERVE_DEATH_INFO_REGNO_P. - * reload1.c (reload): When reloading is finished, delete all - REG_DEAD and REG_UNUSED notes. - (emit_reload_insns): Delete all code that was conditional on - PRESERVE_DEATH_INFO_REGNO_P. - (no_longer_dead_regs): Delete variable. - (reload_cse_delete_death_notes): Delete function. - (reload_cse_no_longer_dead): Delete function. - (reload_cse_regs_1): Delete all code to handle deletion of death - notes. - (reload_cse_noop_set_p): Likewise. - (reload_cse_simplify_set): Likewise. - (reload_cse_simplify_operands): Likewise. - (reload_cse_move2add): Likewise. - * reorg.c (used_spill_regs): Delete declaration. - (max_label_num_after_reload): Delete declaration. - (find_dead_or_set_registers): Don't assume that spill regs are - dead at a CODE_LABEL. - * rtlanal.c (dead_or_set_regno_p): Death notes are always accurate, - even after reload. - * sched.c (sched_analyze_insn): Likewise. - (update_flow_info): Likewise. - * haifa-sched.c (sched_analyze_insn): Likewise. - (update_flow_info): Likewise. - * tm.texi (PRESERVE_DEATH_INFO_REGNO_P): Delete documentation. - * toplev.c (max_label_num_after_reload): Delete variable. - (rest_of_compilation): Don't set max_label_num_after_reload. - Call life_analysis after reload_cse_regs if optimizing. - * config/gmicro/gmicro.h: Delete comment referring to - PRESERVE_DEATH_INFO_REGNO_P. - * config/i386/i386.h: Likewise. - * config/m88k/m88k.h: Likewise. - * config/m32r/m32r.h (PRESERVE_DEATH_INFO_REGNO_P): Delete definition. - * config/sh/sh.h: Likewise. - -Thu Oct 15 19:48:41 1998 David Edelsohn - - * loop.c (strength_reduce): Restore marking bct_p as - ATTRIBUTE_UNUSED. - * rs6000.c (optimization_options): Change #ifdef HAIFA to - HAVE_decrement_and_branch_on_count. - (small_data_operand): Remove TARGET_ELF condition for marking - parameters ATTRIBUTE_UNUSED. - -Thu Oct 15 11:45:51 1998 Robert Lipe - - * config/i386/sco5.h (MAX_OFILE_ALIGNMENT): Define. - (SELECT_SECTION): Resync with svr4.h. - -Thu Oct 15 12:42:13 1998 David Edelsohn - - * loop.c (strength_reduce): Undo Oct 14 change marking bct_p - ATTRIBUTE_UNUSED. - -Thu Oct 15 00:57:55 1998 Robert Lipe - - * c-pragma.c (handle_pragma_token): Test for null tree before - dereferencing TREE_CODE. - -Thu Oct 15 17:36:48 1998 Michael Hayes - - * config/c4x/c4x.c: Convert to use GEN_INT. - (c4x_parallel_process): Rework to handle new repeat loop structure. - - * config/c4x/c4x.md: Convert to use GEN_INT. - (rptb_end): Convert to use GE test. Replace uses with clobbers. - (decrement_and_branch_on_count): Likewise. - - * config/c4x/c4x.h (REPEAT_BLOCK_PROCESS): Deleted hook now that - loop.c has the desired functionality. - (rc_reg_operand): New prototype. - - * config/c4x/t-c4x: Can now build all front ends. - -Wed Oct 14 23:27:08 1998 Didier FORT (didier.fort@fedex.com) - - * fixincludes: Fix up rpc/{clnt,svr,xdr}.h for SunOS. - -Wed Oct 14 22:13:28 1998 Joel Sherrill (joel@OARcorp.com) - - * Makefile.in (stmp-fixinc): Do not install assert.h if not desired. - * config/t-rtems: Do not install assert.h -- use newlib's. - -Wed Oct 14 21:57:08 1998 J"orn Rennecke - - * combine.c (combine_instructions): When finished, call init_recog. - * regmove.c (optimize_reg_copy_3): Reject volatile MEMs. - -Wed Oct 14 16:10:22 1998 Per Bothner - - * toplev.c: If flag_syntax_only, don't open or write assembler file. - -Wed Oct 14 13:26:05 1998 Kaveh R. Ghazi - - * cppalloc.c (memory_full): Mark function prototype with - ATTRIBUTE_NORETURN. - - * demangle.h (collect_exit): Likewise. - - * fix-header.c (v_fatal, fatal): Likewise. - - * gcc.c (pfatal_with_name, pfatal_pexecute, fatal, fancy_abort): - Likewise. - - * gcov.c (print_usage): Likewise. - - * genattr.c (fatal, fancy_abort): Likewise. - - * genattrtab.c (fatal, fancy_abort): Likewise. - - * gencodes.c (fatal, fancy_abort): Likewise. - - * genconfig.c (fatal, fancy_abort): Likewise. - - * genemit.c (fatal, fancy_abort): Likewise. - - * genextract.c (fatal, fancy_abort): Likewise. - - * genflags.c (fatal, fancy_abort): Likewise. - - * genopinit.c (fatal, fancy_abort): Likewise. - - * genoutput.c (fatal, fancy_abort): Likewise. - - * genpeep.c (fatal, fancy_abort): Likewise. - - * genrecog.c (fatal, fancy_abort): Likewise. - - * libgcc2.c (__eprintf, __default_terminate, __sjthrow, - __sjpopnthrow, __throw): Likewise. - - * objc/objc-act.c (objc_fatal): Likewise. - - * protoize.c (usage, aux_info_corrupted, - declare_source_confusing): Likewise. - - * rtl.c (dump_and_abort): Likewise. - - * rtl.h (sets_cc0_p): Likewise. - - * toplev.c (float_signal, pipe_closed): Likewise. - -1998-10-14 Andreas Schwab - - * dwarf2out.c (expand_builtin_dwarf_reg_size): Look at all ranges - when generating the decision tree for the general case. - - * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Don't accept modes - wider that 12 bytes in fpu regs or wider than 8 byte in fpa regs. - -Wed Oct 14 11:14:02 1998 Kaveh R. Ghazi - - * Makefile.in (sched.o): Depend on recog.h. - - * alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to - (unsigned) when comparing against one. - (find_base_value): Likewise. - (record_base_value): Cast variable `regno' to (unsigned) when - comparing against one. Cast the result of REGNO() macro to - (unsigned) when comparing against one. - (memrefs_conflict_p): Change type of variables `r_x' and `r_y' to - unsigned. - (init_alias_analysis): Add unsigned variable `ui'. Use it as loop - variable where an unsigned index is needed. - - * caller-save.c (init_caller_save): Cast `-1' to (enum insn_code) - before comparing against one. - - * collect2.c: Add prototypes for functions `error', `fatal' and - `fatal_perror'. Make these functions take variable arguments - instead of faking it with a fixed number of args. - (write_c_file_stat): Cast the argument of ctype macro to (unsigned - char). - - * combine.c (can_combine_p): Mark parameter `pred' with - ATTRIBUTE_UNUSED. - (find_split_point): Cast variable `src' to (unsigned - HOST_WIDE_INT) when comparing against one. - (simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift. - (simplify_logical): Likewise. - (force_to_mode): Cast result of INTVAL() macro to (unsigned - HOST_WIDE_INT) when comparing against one. Cast 1 to (unsigned - HOST_WIDE_INT) in shift. - (simplify_and_const_int): Cast result of INTVAL() macro to - `unsigned HOST_WIDE_INT' when comparing against one. - (merge_outer_ops): Cast variable const0 to `unsigned - HOST_WIDE_INT' when comparing against the result of - GET_MODE_MASK() macro. - (simplify_comparison): Likewise for variable `c0'. Cast variable - `const_op' to `unsigned HOST_WIDE_INT' when comparing against - one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast the - result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing - against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast - result of INTVAL() macro to `unsigned HOST_WIDE_INT' when - comparing against one. - (distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'. - - config/mips/mips.c (gen_int_relational): Cast result of INTVAL() - macro to `unsigned HOST_WIDE_INT' when comparing against one. - (output_block_move): Cast `sizeof' expression to (int) when - comparing against one. - (function_arg): Cast BITS_PER_WORD to `unsigned' when comparing - against one. - (save_restore_insns): Cast `base_offset' to `long' to match format - specifier in fprintf. - - * config/mips/mips.h (Pmode): Cast the result of `Pmode' macro - to `enum machine_mode'. - - * flow.c (life_analysis_1): Remove unused variable `insn'. - - * gcc.c (translate_options): Move variables `j' and `k' into the - scope in which they are used. Change their types to `size_t'. - (set_spec): Cast the argument of ctype macro to `unsigned char'. - (read_specs): Likewise. - (process_command): Cast `sizeof' to (int) when comparing against one. - (do_spec_1): Cast the argument of ctype macro to `unsigned char'. - (handle_braces): Cast both sides of `==' expression to `long' to - ensure sign matching. - (main): Cast variable `i' to `int' when comparing against one. - - * gcov-io.h (__fetch_long): Change type of parameter `bytes' from - int to size_t. Cast variable `i' to size_t when comparing against - one. - - * genattrtab.c (convert_set_attr_alternative): Remove unused - parameter `insn_code'. All callers changed. - (convert_set_attr): Likewise. - - * genrecog.c (add_to_sequence): Cast result of XVECLEN() macro to - size_t when comparing against one. Likewise for variable `len'. - - * global.c (global_alloc): Cast variable `max_regno' to size_t - when comparing against one. Likewise for variable `max_allocno'. - - * jump.c (sets_cc0_p): Mark parameter `x' with ATTRIBUTE_UNUSED. - - * local-alloc.c (validate_equiv_mem_from_store): Mark parameter - `set' with ATTRIBUTE_UNUSED. - (find_free_reg): Cast `sizeof' expression to (int) when comparing - against one. - - * loop.c (count_loop_regs_set): Remove unused variable `dest'. - (strength_reduce): Mark parameter `bct_p' with ATTRIBUTE_UNUSED. - (get_condition): Cast variable `const_val' to `unsigned - HOST_WIDE_INT' when comparing against one. Cast unsigned - expression to HOST_WIDE_INT when comparing against one. - (insert_loop_mem): Mark parameter `data' with ATTRIBUTE_UNUSED. - (load_mems_and_recount_loop_regs_set): Cast variable `nregs' to - `unsigned' when comparing against one. - - * protoize.c (is_id_char): Change type of parameter `ch' to - unsigned char. - (munge_compile_params): Cast argument of ctype macro to (const - unsigned char). - (process_aux_info_file): Cast variable `aux_info_size' to int when - comparing against one. - (forward_to_next_token_char): Cast argument of ctype macro to - `const unsigned char'. - (edit_formals_lists): Likewise. - (find_rightmost_formals_list): Likewise. - (add_local_decl): Likewise. - (add_global_decls): Likewise. - (edit_fn_definition): Likewise. - (do_cleaning): Likewise. - (scan_for_missed_items): Likewise. - (edit_file): Cast variable `orig_size' to (int) when comparing - against one. - (main): Cast argument of ctype macro to `const unsigned char'. - - * recog.c (const_int_operand): Mark parameter `mode' with - ATTRIBUTE_UNUSED. - - * regclass.c (record_reg_classes): Change type of variable `c' to - `unsigned char'. Cast `char' array index to `unsigned char'. - - * reload.c (push_secondary_reload): Cast argument to - REG_CLASS_FROM_LETTER() macro to `unsigned char'. - - * reload1.c (calculate_needs): Cast `char' array index to - `unsigned char'. - (set_label_offsets): Change type of variable `i' to unsigned int. - Cast result of XVECLEN() macro to unsigned when comparing against - one. - (mark_not_eliminable): Change type of variable `i' to unsigned. - (order_regs_for_reload): Likewise. Cast `max_regno' to unsigned - when comparing against one. - (reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when - comparing against one. - (choose_reload_regs): Hide unused label `fail'. - (reload_cse_simplify_operands): Cast `char' array index to - `unsigned char'. - (reload_combine_note_store): Mark parameter `set' with - ATTRIBUTE_UNUSED. Cast UNITS_PER_WORD to unsigned when comparing - against one. - (reload_cse_move2add): Remove unused variable `src2'. - - * sched.c: Include recog.h. - (sched_note_set): Remove unused parameter `b'. All callers - changed. - (split_hard_reg_notes): Likewise for parameter `orig_insn'. - (blockage_range): Cast result of UNIT_BLOCKED() macro to (int) - when comparing against one. - - * stupid.c (stupid_find_reg): Mark parameter `changes_size' with - ATTRIBUTE_UNUSED. Cast `sizeof' expression to (int) when - comparing against one. - - * unroll.c (precondition_loop_p): Remove unused parameter - `loop_end'. All callers changed. - -Tue Oct 13 22:12:11 1998 Bernd Schmidt - - * reload1.c (maybe_fix_stack_asms): New static function. - (reload): Call it. - - * reload.h (compute_use_by_pseudos): Declare. - - * reload1.c (spilled_pseudos, insns_need_reload): New variables. - (something_needs_reloads): Delete variable. - (finish_spills): New function. - (compute_use_by_pseudos): New function. - - (delete_caller_save_insns): Lose argument FIRST. All callers changed. - Use the reload_insn_chain instead of walking the rtl directly. - - (reload): Allocate and free spilled_pseudos. - Ensure that all calls of spill_hard_reg are followed by a call to - finish_spills. - Use the insns_need_reload list instead of something_needs_reloads - to find out if reload_as_needed must be called. - Clear unused_insn_chains at the end. - - (calculate_needs_all_insns): Lose FIRST parameter. All callers - changed. - Delete code to keep track of current basic block. - Walk reload_insn_chain instead of the rtl structure. Build the - insns_need_reload chain. - Remember which insns need reloading/elimination by setting the - appropriate fields in struct insn_chain, not by putting modes on the - insn. - - (calculate_needs): Lose THIS_BLOCK arg. Accept arg CHAIN instead of - arg INSN. All callers changed. - Delete declaration of struct needs. - Don't set something_needs_reloads. - Record insn needs in the CHAIN argument. - - (spill_hard_reg): Record the affected pseudos in spilled_pseudos. - - (reload_as_needed): Lose FIRST arg. All callers changed. - Walk the reload_insn_chain instead of the rtx structure. - Delete code to keep track of current basic block. - Rename one of the NEXT variables to OLD_NEXT. - - (allocate_reload_reg): Accept arg CHAIN instead of arg INSN. All - callers changed. - (choose_reload_regs): Likewise. - - (emit_reload_insns): Replace INSN and BB args with arg CHAIN. All - callers changed. - - * caller-save.c (MOVE_MAX_WORDS): New macro. Use it throughout - instead of (MOVE_MAX / UNITS_PER_WORD) computation. - (hard_regs_live, hard_regs_need_restore): Delete variables. - (n_regs_saved): Now static. - (referenced_regs, this_insn_sets): New variables. - - (setup_save_areas): Restructure the code a bit. - - (restore_referenced_regs): Delete function. - (mark_referenced_regs): New function, similar to the old - restore_referenced_regs, but mark registers in referenced_regs. - - (clear_reg_live): Delete function. - (mark_set_regs): Renamed from set_reg_live. All callers changed. - Only mark registers in this_insn_sets. - - (save_call_clobbered_regs): Rework this function to walk the - reload_insn_chain instead of using the list of instructions directly. - Delete code to keep track of register lives, compute live regs on the - fly from information in the chain. - Instead of calling restore_referenced_regs, use mark_referenced_regs, - then walk the set it computes and call insert_restore as appropriate. - - (insert_restore): Lose INSN and BLOCK args. Add CHAIN arg. All - callers changed. - Restructure the code a bit. Test hard_regs_saved instead of - hard_regs_need_restore. - (insert_save): Lose INSN and BLOCK args. Add CHAIN and TO_SAVE - args. All callers changed. - Restructure the code a bit. Use TO_SAVE to determine which regs to - save instead of more complicated test. - (insert_one_arg): Lose INSN and BLOCK args. Add CHAIN arg. All - callers changed. - Create a new insn_chain structure for the new insn and place it - into the chain. - - * rtl.texi: Update documentation to reflect that reload no longer - puts modes on the insns. - -1998-10-14 Andreas Schwab - - * function.c (purge_addressof_1): Force the first argument of a - CALL insn to memory. - -Wed Oct 14 00:38:40 1998 Jeffrey A Law (law@cygnus.com) - - * rtl.h: Delete duplicate prototypes. Add some missing - prototypes. - * rtlanal.c (for_each_rtx): Formatting tweak. - -1998-10-13 Herman A.J. ten Brugge - - * real.c (emdnorm and etoasc): Disable round to even for c4x target - to be compatible with TI compiler. - - * Makefile.in (USER_H): Add va-c4x.h to definition. - -Tue Oct 13 23:03:37 1998 Richard Henderson - - * function.c (purge_addressof_1): Fix typo in inequality: do - bitfield optimization for equal mode sizes. - * expmed.c (store_bit_field): Don't take subregs of subregs in - the movstrict case. Tidy a potential problem in the multi-word case. - (extract_bit_field): Likewise. - -Tue Oct 13 22:12:11 1998 Bernd Schmidt - - * flow.c (find_basic_blocks): Emit NOPs after normal calls in this - function. - Compute max_uid_for_flow by calling get_max_uid after the scan. - (find_basic_blocks_1): Don't emit NOPs here. - -Tue Oct 13 22:05:49 1998 Richard Henderson - - * alias.c (base_alias_check): Accept new args for the modes of the - two references. Use them to determine if an AND can overlap. Update - all callers. - (memrefs_conflict_p): Assume sizes are aligned, and uses them - to determine if an AND can overlap. - -Tue Oct 13 17:51:04 1998 Jim Wilson - - * config/m68k/m68k.h (HARD_REGNO_MODE_OK): For FP regs, add REGNO >= 16 - check. Add comment to document problems with TARGET_SUN_FPA version - of this macro. - * config/m68k/m68k.md (movxf+1): Support 'r'/'r' moves. - -Tue Oct 13 17:46:18 1998 Kaveh R. Ghazi - - * Makefile.in (gencheck.o): Depend on gansidecl.h. - - * c-common.c (print_char_table): Add missing initializers. - (scan_char_table): Likewise. - (time_char_table): Likewise. - - * c-decl.c (c_decode_option): Mark parameter `argc' with - ATTRIBUTE_UNUSED. - (declare_parm_level): Mark parameter `definition_flag' with - ATTRIBUTE_UNUSED. - - * c-lex.c (readescape): Use `(unsigned)1' in shift. - (yylex): Likewise. Cast `sizeof' to an (int) when comparing - against one. - - * calls.c (store_one_arg): Remove unused parameter `fndecl'. All - callers changed. - (emit_call_1): Mark parameters `fndecl' and `funtype' with - ATTRIBUTE_UNUSED. - (expand_call): Cast result of MIN() to (unsigned int) when - comparing against an unsigned value. - - * cccp.c (pcfinclude): Remove unused parameter `limit'. All - callers changed. - (make_definition): Remove unused parameter `op'. All callers - changed. - (create_definition): Cast REST_EXTENSION_LENGTH to (long) when - comparing against the result of pointer arithmetic. - - * config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Cast to (unsigned) - when comparing against one. - - * dwarf2out.c (dwarf2out_frame_debug): Cast REGNO() and - HARD_FRAME_POINTER_REGNUM to (unsigned) when comparing against - one. - (output_die): Move variable `i' into the scope in which it is - used. Change its type to `unsigned'. - (output_die): Cast the result of `strlen' to (int) when passing it - to ASM_OUTPUT_ASCII(). - (output_pubnames): Likewise. - (output_line_info): Likewise. - - * emit-rtl.c (global_rtl): Add missing initializers. - - * explow.c (promote_mode): Mark parameter `for_call' with - ATTRIBUTE_UNUSED. - - * expmed.c (expand_shift): Cast the result of GET_MODE_BITSIZE to - `unsigned HOST_WIDE_INT' when comparing against one. - (synth_mult): Change type of variable `cost' to int. - (emit_store_flag): Use `(unsigned HOST_WIDE_INT) 1' in shift. - - * expr.c (copy_blkmode_from_reg): Cast BITS_PER_WORD to (unsigned) - when comparing against one. - (get_inner_reference): Change variable `alignment' to unsigned. - (expand_expr): Cast the result of GET_MODE_ALIGNMENT to (unsigned - int) when comparing against one. - (expand_builtin_setjmp): Change type of variable `i' to size_t. - - * fold-const.c (div_and_round_double): Cast BASE to - (HOST_WIDE_INT) when comparing against one. - - * gencheck.c: Include gansidecl.h. - (main): Mark parameter `argv' with ATTRIBUTE_UNUSED. - - * optabs.c (gen_cond_trap): Mark parameters `code', `op2' and - `tcode' with ATTRIBUTE_UNUSED. - - * real.c (edivm): Cast constant value to (unsigned long) in - expression compared against an unsigned value. - - * stmt.c (expand_return): Cast BITS_PER_WORD to (unsigned) when - comparing against one. - (expand_end_case): Cast CASE_VALUES_THRESHOLD to (unsigned int) - when comparing against one. - - * stor-layout.c (mode_for_size): Cast MAX_FIXED_MODE_SIZE to - (unsigned int) when comparing against one. Likewise for - GET_MODE_BITSIZE. - (smallest_mode_for_size): Likewise. - (save_storage_status): Mark parameter `p' with ATTRIBUTE_UNUSED. - (restore_storage_status): Likewise. - - * toplev.c (debug_args): Add missing initializer. - (f_options): Spelling correction. Add missing initializers. - (documented_lang_options): Likewise. - (debug_end_source_file): Mark parameter `lineno' with - ATTRIBUTE_UNUSED. - - * tree.c (valid_machine_attribute): Mark parameters `attr_args', - `decl' and `type' with ATTRIBUTE_UNUSED. - - * varasm.c (decode_reg_name): Cast `sizeof' expression to (int) - when comparing against one. - (assemble_variable): Mark parameter `top_level' with - ATTRIBUTE_UNUSED. - (assemble_external_libcall): Mark parameter `fun' with - ATTRIBUTE_UNUSED. - (output_constant_pool): Mark parameters `fnname' and `fndecl' with - ATTRIBUTE_UNUSED. - -Tue Oct 13 12:51:04 1998 Nick Clifton - - * config/v850/lib1funcs.asm (_udivsi3): Add .type declaration. - Replace use of r5 with use of r19. - - * config/v850/v850.h (LINK_POINTER_REGNUM): Define. - - * config/v850/v850.c (compute_register_save_size): Allow for the - fact that helper functions save all registers, not just those used - by the function. - - Replace constant 31 with macro LINK_POINTER_REGNUM. - - * config/v850/v850.md: Use 'indirect_operand' rather than - 'memory_operand' for bit test/set/clear patterns. - -Tue Oct 13 11:49:14 1998 Jason Merrill - - * mips/iris6.h (ASM_OUTPUT_WEAK_ALIAS): Call ASM_GLOBALIZE_LABEL. - * varasm.c (assemble_start_function et al): Don't call - ASM_GLOBALIZE_LABEL for weak symbols. - -Tue Oct 13 11:37:45 1998 Nick Clifton - - * cse.c (equiv_constant): Check for NULL return from - gen_lowpart_if_possible(). - -Tue Oct 13 11:24:51 1998 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (addsi3, subsi3, negsi2): Only allow register operands. - - * collect2.c (main): Pass -EL/-EB through to the compiler. - -1998-10-12 Herman A.J. ten Brugge - - * expr.c (push_block): Handle targets where the stack grows - to higher addresses, but args grow to lower addresses and - ACCUMULATE_OUTGOING_ARGS is not defined. - -Tue Oct 13 08:00:52 1998 Catherine Moore - - * config/v850/v850.c (print_operand): Extend meaning - of 'c' operands to support .vtinherit. - -Tue Oct 13 21:38:35 1998 Michael Hayes - - * config/c4x/c4x.c: Convert to gen_rtx_FOO. - Added ATTRIBUTE_UNUSED to unused function arguments. - (rc_reg_operand): New predicate. - (c4x_rptb_insert): New function. - (c4x_rptb_nop_p): Recognize modified rptb_top pattern. - (c4x_optimization_options): New function. - - * config/c4x/c4x.md: Convert to gen_rtx_FOO. - (decrement_and_branch_on_count): New pattern. - (rptb_top): Modified pattern to work with BCT optimization. - - * config/c4x/c4x.h (RC_REG): New register class. - (rc_reg_operand): Define prototype. - (IS_RC_REG): New macro. - (IS_RC_OR_PSEUDO_REG): New macro. - (IS_RC_OR_PSEUDO_REGNO): New macro. - (OPTIMIZATION_OPTIONS): Define. - -Mon Oct 12 19:57:34 1998 Jason Merrill - - * collect2.c (extract_init_priority): No priority is 65535. - -Mon Oct 12 12:10:37 1998 Alexandre Oliva - - * Makefile.in (build_tooldir): New variable, same as old - $(tooldir), but without depending on $(libdir)/$(unlibsubdir). - (GCC_FOR_TARGET): Add -B$(build_tooldir)/bin/. - (bootstrap, bootstrap2, bootstrap3, bootstrap4): Likewise. - - * configure.in (gxx_include_dir): Set default based on unlibsubdir. - * Makefile.in (tooldir): Likewise. - (cccp.o, cpplib.o): Use unlibsubdir implicitly through - gxx_include_dir, includedir and tooldir. - (protoize.o, unprotoize.o): Likewise. - -Mon Oct 12 10:50:44 1998 Nick Clifton - - * config/arm/arm.md: Replace (reg 24) with (reg:CC 24). - - * config/arm/thumb.c (thumb_override_options): Add warning about - PIC code not being supported just yet. - -Sun Oct 11 16:49:15 1998 John Wehle (john@feith.com) - - * flow.c: Update comment. - (notice_stack_pointer_modification): New static function. - (record_volatile_insns): Use it. - (mark_regs_live_at_end): Mark the stack pointer as alive - at the end of the function if current_function_sp_is_unchanging - is set. - (life_analysis_1): Set current_function_sp_is_unchanging. - * function.c: Define it. - (init_function_start): Initialize it. - * output.h: Declare it. - * reorg.c (fill_simple_delay_slots, dbr_schedule): Mark - the stack pointer as alive at the end of the function if - current_function_sp_is_unchanging is set. - * i386.c (ix86_epilogue): Optimize the restoring - of the stack pointer. - -Mon Oct 12 01:22:53 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Oct 11 23:04:30 1998 Robert Lipe - - * c-pragma.c (handle_pragma_token): If passed a token instead - of a tree, use that as the pack value. - -Sun Oct 11 14:21:14 1998 Mark Mitchell - - * flow.c (find_basic_blocks_1): Fix prototype. - -Sun Oct 11 05:03:41 1998 Ken Raeburn - - * tree.h (DECL_NO_CHECK_MEMORY_USAGE): New macros. - (struct tree_decl): New fields no_check_memory_usage. - * c-common.c (enum attrs): Add A_NO_CHECK_MEMORY_USAGE. - (init_attributes): Register it as a new attribute. - (decl_attributes): Set flags on functions given that attribute. - * c-decl.c (duplicate_decls): Merge new attribute. - * expr.h (current_function_check_memory_usage): Declare new var. - * calls.c, expr.c, function.c, stmt.c, alpha.c, clipper.c, m88k.c, - pa.c, sparc.c: Replace uses of flag_check_memory_usage with - current_function_check_memory_usage. - * function.h: Add field to struct function. - * function.c (current_function_check_memory_usage): Define it. - (push_function_context_to, pop_function_context_from): Save and - restore it. - (expand_function_start): Set it, based on global flag and function - attribute. - - * expr.c (expand_expr, case VAR_DECL): In memory-checking code, do - check non-automatic variables, to permit detection of writes to - read-only locations in embedded systems without memory management. - * calls.c (store_one_arg): Use ARGS_SIZE_RTX to get size of argument - when emitting chkr_set_right_libfunc call, even if the argument is - BLKmode or variable-sized; don't abort. - - * optabs.c (init_optabs): Create Checker and __cyg_profile_* - symbols in Pmode, not VOIDmode. - -Sun Oct 11 01:03:05 1998 Zack Weinberg - - * cppexp.c: When forcing unsigned comparisons, cast both sides - of the operation. - - * cpphash.h: Move static declaration of hashtab[]... - * cpphash.c: ...here. - - * cpplib.c: Cast difference of two pointers to size_t before - comparing it to size_t. Cast signed to unsigned - before comparing to size_t. (FIXME: struct argdata should use - unsigned buffer sizes.) - * cpplib.h (struct cpp_reader): Declare token_buffer_size as - unsigned int. (CPP_WRITTEN): Cast return value to size_t. - (CPP_RESERVE): Parenthesize N for evaluation order, cast to - size_t before comparison. - -Sun Oct 11 00:15:29 1998 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_basic_blocks): Delete "live_reachable_p" argument. - (find_basic_blocks_1): Similarly. - * output.h (find_basic_blocks): Fix prototype. - * gcse.c, toplev.c: Don't pass "live_reachable_p" argument to - find_basic_blocks anymore. - -Sat Oct 10 22:00:34 1998 Richard Henderson - - * basic-block.h (EXECUTE_IF_SET_IN_SBITMAP): New macro. - (sbitmap_free, sbitmap_vector_free): New macros. - * output.h (rtl_dump_file): Declare. - -Sat Oct 10 17:01:42 1998 Jeffrey A Law (law@cygnus.com) - - * regmove.c (optimize_reg_copy_3): Honor TRULY_NOOP_TRUNCATION. - -Fri Oct 9 22:08:05 1998 Kaveh R. Ghazi - - * fp-bit.c (SFtype): Don't implicitly use int in declaration. - (DFtype): Likewise. - (_fpdiv_parts): Remove unused parameter `tmp', all callers changed. - (divide): Remove unused variable `tmp'. - (si_to_float): Cast numeric constant to (SItype) before comparing - it against one. - -Fri Oct 9 16:03:19 1998 Graham - - * flow.c (print_rtl_with_bb): Changed type of in_bb_p to match use. - * gcc.c (add_preprocessor_option): Correct typo when allocating - memory, sizeof() argument had one too many `*'. - (add_assembler_option): Likewise. - (add_linker_option): Likewise. - * gcov.c (output_data): Likewise. - * local-alloc.c (memref_used_between_p): Likewise. - (update_equiv_regs): Likewise. - * loop.c (strength_reduce): Likewise. - * reg-stack.c (record_asm_reg_life): Likewise. - (subst_asm_stack_reg): Likewise. - * reorg.c (dbr_schedule): Likewise. - -Fri Oct 9 15:57:51 1998 Bernd Schmidt - - * flow.c (life_analysis_1): Break out some functions. - (find_basic_blocks_1): Likewise. Also move some variables out and - make them static. - Rename NONLOCAL_LABEL_LIST arg to NONLOCAL_LABELS and initialize - new static var nonlocal_label_list with it. - (active_eh_region, nested_eh_region, label_value_list, - nonlocal_label_list): New static variables. - (make_edges, delete_unreachable_blocks, delete_block): New static - functions, broken out of find_basic_blocks_1. - (record_volatile_insns, mark_regs_live_at_end, set_noop_p, - noop_move_p): New static functions, broken out of life_analysis_1. - -Fri Oct 9 15:49:29 1998 Richard Henderson - - * expmed.c (store_bit_field): Pun non-integral str_rtx modes. - Take extra care for op0 now possibly being a subreg. - (extract_bit_field): Likewise. - * function.c (purge_addressof_1): Revert Oct 4 change. Drop - the reg to memory if there is no equal sized integral mode. - * stor-layout.c (int_mode_for_mode): New function. - * machmode.h: Prototype it. - -Fri Oct 9 14:26:44 1998 Jeffrey A Law (law@cygnus.com) - - * global.c (build_insn_chain): Verify no real insns exist past the - end of the last basic block, then exit the loop. - -Fri Oct 9 11:44:47 1998 David Edelsohn - - * loop.c (insert_bct): Ensure loop_iteration_var nonzero before use. - -Thu Oct 8 21:59:47 1998 Dave Brolley - - * emit-rtl.c (init_emit_once): Call INIT_EXPANDERS. - -Thu Oct 8 22:03:45 1998 David Edelsohn - - * rs6000.h (RTX_COSTS): Add PROCESSOR_PPC604e cases. - -Thu Oct 8 17:00:18 1998 Richard Henderson - - * flow.c (find_basic_blocks): Correctly determine when a call - is within an exception region. - -Thu Oct 8 17:15:04 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (output_file_directive): Use DIR_SEPARATOR, not '/'. - - * cpplib.h: Protect from multiple inclusions. - * cpplib.c: Fix minor formatting problems. - - * i386/xm-cygwin32.h: Only define POSIX if it is not already defined. - - * jump.c (jump_optimize): Revert accidental patch. - - * Makefile.in (cpplib.o): Use unlibsubdir. - -Thu Oct 8 12:50:47 1998 Jim Wilson - - * loop.c (get_condition): Allow combine when either compare is - VOIDmode. - -Thu Oct 8 11:31:01 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Thu Oct 8 12:21:14 1998 Richard Frith-Macdonald - - * c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF. - (init_lex): Initialize ridpointers[RID_BYREF]. - * c-lex.h (enum rid): Add RID_BYREF. - * c-parse.gperf: Add RID_BYREF as a type qualifier. - * objc/objc-act.c (is_objc_type_qualifiers): Handle RID_BYREF. - (encode_type_qualifiers): Similarly. - * c-gperf.h: Rebuilt. - -Thu Oct 8 05:56:00 1998 Jeffrey A Law (law@cygnus.com) - - * c-common.c (type_for_mode): Only return TItype nodes when - HOST_BITS_PER_WIDE_INT is >= 64 bits. - * c-decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare - when HOST_BITS_PER_WIDE_INT is >= 64 bits. - (init_decl_processing): Only create TItype nodes when - HOST_BITS_PER_WIDE_INT is >= 64 bits. - * c-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare - when HOST_BITS_PER_WIDE_INT is >= 64 bits. - -Thu Oct 8 05:05:34 1998 Bernd Schmidt - - * stmt.c (n_occurrences): New static function. - (expand_asm_operands): Verify that all constrains match in the - number of alternatives. - Verify that '+' or '=' are at the beginning of an output constraint. - Don't allow '&' for input operands. - Verify that '%' isn't written for the last operand. - * reload.c (find_reloads): Abort if an asm is found with invalid - constraints; all possible problems ought to be checked for earlier. - -Thu Oct 8 04:26:20 1998 Michael Hayes - - * flags.h (flag_branch_on_count_reg): Always declare. - * toplev.c (flag_branch_on_count_reg): Likewise. - * toplev.c: Fix typos. - - * real.c (c4xtoe): Remove unused variables. Add some missing parens. - (toc4x): Similarly. - -Thu Oct 8 01:25:22 1998 Richard Henderson - - * flow.c (find_basic_blocks): Calc upper bound for extra nops in - max_uids_for_flow. - (find_basic_blocks_1): Add a nop to the end of a basic block when - a trailing call insn does not have abnormal control flow. - * gcse.c (pre_transpout): New variable. - (alloc_pre_mem, free_pre_mem, dump_pre_data): Bookkeeping for it. - (compute_pre_transpout): Calculate it. - (compute_pre_ppinout): Use it to eliminate impossible placements - due to abnormal control flow through calls. - (compute_pre_data): Call compute_pre_transpout. - -Wed Oct 7 21:40:24 1998 David S. Miller - - * config/sparc/sol2-sld-64.h (ASM_CPU_SPEC): Fix typo. - -Wed Oct 7 21:19:46 1998 Ken Raeburn - - * config/mips/mips.md (tablejump_internal3, tablejump_internal4 - and matching define_insns): Tack on a `use' of the table label, so - flow analysis will recognize a tablejump. - -Wed Oct 7 17:33:39 1998 Richard Henderson - - * gcse.c (pre_insert_insn): Tweek to notice that calls do not - always end basic blocks for abnormal edge reasons. - -Wed Oct 7 14:40:43 1998 Nick Clifton - - * config/i386/i386.h: Remove definition of - HANDLE_PRAGMA_PACK_PUSH_POP. - - * config/i386/go32.h: Add definition of - HANDLE_PRAGMA_PACK_PUSH_POP. - - * config/i386/win32.h: Add definition of - HANDLE_PRAGMA_PACK_PUSH_POP. - - * config/i386/cygwin32.h: Add definition of - HANDLE_PRAGMA_PACK_PUSH_POP. - - * c-pragma.c (insert_pack_attributes): Do not insert - attributes unless #pragma pack(push,) is in effect. - -Wed Oct 7 12:10:46 1998 Jim Wilson - - * expr.c (emit_group_store): Handle a PARALLEL destination. - -Wed Oct 7 10:07:29 1998 Richard Henderson - - * gcse.c (pre_insert_insn): When a call ends a bb, insert - the new insns before the argument regs are loaded. - -Wed Oct 7 12:55:26 1998 Kaveh R. Ghazi - - * Makefile.in (c-gperf.h): Add -L KR-C -F ', 0, 0' flags to gperf. - (c-parse.gperf): Update comments describing invocation flags. - (c-gperf.h): Regenerate using gperf 2.7.1 (19981006 egcs). - -1998-10-07 Manfred Hollstein - - * reload1.c (reload): Call free before clobbering the memory - locations or constants pointers. - -Wed Oct 7 02:05:20 1998 David S. Miller - - * config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Rework - for efficiency by checking whether we need to modify the current - stack permission at all. - (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Define. - * config/sparc/sparc.c (sparc_initialize_trampoline): Emit - __enable_execute_stack libcall here too if - TRANSFER_FROM_TRAMPOLINE is defined. - * config/sparc/sparc.h: Set TARGET_ARCH32 to a constant if - IN_LIBGCC2. - -Wed Oct 7 02:27:52 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (DRIVER_DEFINES): Remove last change. - -Wed Oct 7 01:08:43 1998 Bernd Schmidt - - * jump.c (duplicate_loop_exit_test): Strip REG_WAS_0 notes off all - insns we're going to copy. - * regclass.c (reg_scan_mark_refs): Don't test X for NULL_RTX. - - * loop.c (count_one_set): Add prototype. - - * caller-save.c (restore_referenced_regs): Lose mode argument. - (insert_save): Lose mode argument. - (insert_restore): Lose mode argument. - (insert_one_insn): Lose mode argument. - (save_call_clobbered_regs): Lose mode argument. - (setup_save_areas): Take no argument and return void. All callers - changed. - Don't verify validity of memory addresses. - * reload.h (setup_save_ares): Adjust prototype. - (save_call_clobbered_regs): Likewise. - * reload1.c (delete_caller_save_insns): New function. - (caller_save_spill_class): Delete variable. - (caller_save_group_size): Delete variable. - (reload): Call setup_save_areas and save_call_clobbered_regs - in the main loop, before calling calculate_needs_all_insns. - Don't call save_call_clobbered_regs after the loop. - Call delete_caller_save_insns at the end of an iteration if - something changed. - Delete code to manage caller_save_spill_class. - Emit the final note before setting reload_first_uid. - Simplify test that determines whether reload_as_needed gets run. - (calculate_needs): Delete code to manage caller_save_spill_class. - -Tue Oct 6 15:42:27 1998 Richard Henderson - - * collect2.c (main): Initialize ld_file_name. - -Tue Oct 6 15:45:15 1998 Catherine Moore - - * config/sparc/sysv4.h (ASM_OUTPUT_SECTION_NAME): Don't - check for flag_function_sections. - -Tue Oct 6 20:02:31 1998 J"orn Rennecke - - * cse.c (insert_regs): Fix bug in Sep 24 change. - -Tue Oct 6 17:00:42 1998 J"orn Rennecke - - * flags.h (flag_dump_unnumbered): Declare. - * toplev.c (flag_dump_unnumbered): Don't declare. - * print-rtl.c (flags.h): Include. - (print_rtl_single): Add return value. - * rtl.h (print_rtl_single): Update declaration. - * flow.c (flag_dump_unnumbered): Don't declare. - (print_rtl_with_bb): Use return value of print_rtl_single. - -Tue Oct 6 01:36:00 1998 Bernd Schmidt - - * loop.c (count_one_set): New static function, broken out of - count_loop_regs_set. - (count_loop_regs_set): Call it. - * global.c (mark_reg_store): Handle clobbers here by not calling - set_preference. - (mark_reg_clobber): Just call mark_reg_store after ensuring SETTER - is in fact a clobber. - * integrate.c (process_reg_param): New function, broken out of - expand_inline_function. - (expand_inline_function): Call it. - - * i386.md (addsidi3_1): Delete unused variable temp. - (addsidi3_2): Likewise. - (clstrstrsi): Delete unused variable addr1. - - * rtl.h: Don't declare any functions also declared in recog.h. - - * Makefile.in (stupid.o): Update dependencies. - (global.o): Likewise. - - * global.c: Include reload.h. - (reg_becomes_live): New function. - (reg_dies): New function. - (build_insn_chain): New function. - (global_alloc): Call build_insn_chain before calling reload. - - * reload.h (struct needs): New structure definition. - (struct insn_chain): Likewise. - (reload_insn_chain): Declare variable. - (new_insn_chain): Declare function. - - * reload1.c (reload_startobj): New variable. - (reload_insn_chain): New variable. - (unused_insn_chains): New variable. - (new_insn_chain): New function. - (init_reload): Initialize reload_startobj, not reload_firstobj. - (reload): Initialize reload_firstobj. - Before returning, free everything on the reload_obstack. - - * stupid.c: Include insn-config.h, reload.h and basic-block.h. - (reg_where_dead_chain, reg_where_born_exact, reg_where_born_clobber, - current_chain): New variables. - (reg_where_born): Delete variable. - (REG_WHERE_BORN): New macro. - (find_clobbered_regs): New function. - (stupid_life_analysis): Don't allocate/free reg_where_born. - Allocate and free reg_where_born_exact, reg_where_born_clobber, - reg_where_dead_chain. - Use REG_WHERE_BORN instead of reg_where_born. - While processing the insns, build the reload_insn_chain with - information about register lifetimes. - (stupid_reg_compare): Use REG_WHERE_BORN instead of reg_where_born. - (stupid_mark_refs): Replace arg INSN with arg CHAIN. All callers - changed. - Compute and information about birth and death of pseudo registers in - reg_where_dead_chain, reg_where_born_exact and reg_where_born_clobber. - Delete code to set elements of reg_where_born. - -Mon Oct 5 22:34:30 1998 Alexandre Petit-Bianco - - * tree.def (GOTO_EXPR): Modified documentation. - * expr.c (expand_expr): Expand GOTO_EXPR into a goto or a computed - goto. - -Mon Oct 5 22:43:36 1998 David Edelsohn - - * unroll.c (loop_iteration_var, loop_initial_value, loop_increment - loop_final_value, loop_comparison_code): No longer static. - (unroll_loop): Delete loop_start_value update. - * loop.h (loop_iteration_var, loop_initial_value, loop_increment, - loop_final_value, loop_comparison_code): Extern. - (loop_start_value): Delete extern. - * loop.c (loop_can_insert_bct, loop_increment, loop_start_value, - loop_comparison_value, loop_comparison_code): Delete. - (loop_optimize): Remove initialization for deleted variables. - (strength_reduce): Delete analyze_loop_iterations call. Only call - insert_bct if flag_branch_count_on_reg set. - (analyze_loop_iterations): Delete. - (insert_bct): Remove iteration count calculation. Move checks for - viable BCT optimization to here. Obtain iteration count from - loop_iterations and correct for unrolling. Check for enough - iteration to be beneficial. Comment out runtime iteration count - case. - (insert_bct): Print iteration count in dump file. Remove - loop_var_mode and use word_mode directly. - - * rs6000.h (processor_type): Add PROCESSOR_PPC604e. - * rs6000.c (rs6000_override_options): Use it. - (optimization_options): Enable use of flag_branch_on_count_reg. - * rs6000.md (define_function_unit): Describe 604e. - -1998-10-05 Herman A.J. ten Brugge - - * loop.c (move_movables): Corrected threshold calculation for - moved_once registers. - -Mon Oct 5 21:18:45 1998 Bernd Schmidt - - * loop.c (combine_givs_p): Fix test for identical givs. - -Mon Oct 5 10:11:28 1998 Nick Clifton - - * dwarf2out.c (gen_subprogram_die): If errorcount nonzero, don't - call abort if the function is already defined. - -Mon Oct 5 10:02:36 1998 Jeffrey A Law (law@cygnus.com) - - * combine.c (simplify_rtx): Do not replace TRUNCATE with a SUBREG if - truncation is not a no-op. - -Mon Oct 5 09:02:04 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Oct 5 08:19:55 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Oct 5 01:07:23 1998 Torbjorn Granlund - - * expmed.c (expand_divmod): Don't widen for computing remainder - if we seem to have a divmod pattern for needed mode. - -Mon Oct 5 01:01:42 1998 Zack Weinberg - - * cpplib.c (macroexpand): Correct off-by-one error in handling - of escapes. - -Sun Oct 4 23:58:30 1998 Richard Henderson - - * combine.c (expand_field_assignment): Don't do bitwise operations - on MODE_FLOAT; pun to MODE_INT if possible. - -Sun Oct 4 18:33:24 1998 Jason Merrill - scott snyder - - * tlink.c (scan_linker_output): Recognize errors from irix 6.2 - linker. Recognize mangled names in quotes. - -Sun Oct 4 02:58:20 1998 Jakub Jelinek - - * config/sparc/sparc.md (ashldi3+1): Name it ashldi3_sp64. - (ashlsi3_const1, ashldi3_const1): New combiner patterns. - (ashrsi3_extend, ashrsi3_extend2): New combiner patterns. - (lshrsi3_extend, lshrsi3_extend2): Likewise. - -Sun Oct 4 00:23:00 1998 David S. Miller - - * function.c (purge_addressof_1): If trying to take a sub-word - integral piece of a floating point mode, put it on the stack. - -Sat Oct 3 19:01:03 1998 Richard Henderson - - * alpha/linux.h (CPP_PREDEFINES): Define __alpha__ for imake. - -Sat Oct 3 14:42:19 1998 Jason Merrill - - * PROJECTS: Remove template friends. - - * collect2.c (sort_ids): Remove unused variable. - - * tm.texi (MATH_LIBRARY): Document. - (NEED_MATH_LIBRARY): Remove. - - * varasm.c (assemble_start_function, assemble_variable, weak_finish, - assemble_alias): Do ASM_GLOBALIZE_LABEL for weak symbols, too. - -Sat Oct 3 16:14:44 1998 John Carr - - * dwarf2out.c (expand_builtin_dwarf_reg_size): Initialize - last_end to 0x7fffffff. - -Fri Oct 2 19:14:20 1998 David S. Miller - - * function.c (purge_addressof_1): Do not perform endianness - corrections on bitpos, who we call will do it for us. - -Fri Oct 2 11:52:35 1998 Jeffrey A Law (law@cygnus.com) - - * h8300.c (WORD_REG_USED): Fix typo. - (initial_offset): Use WORD_REG_USED. - - * h8300.c (handle_pragma): Fix typo. - -Fri Oct 2 10:51:35 1998 Bernd Schmidt - - * caller-save.c (insert_save_restore): Break this function up - into new functions insert_restore, insert_save and insert_one_insn. - All callers changed. - (insert_restore): New function, mostly broken out of - insert_save_restore. - (insert_save): Likewise. - (insert_one_insn): Likewise. - (restore_referenced_regs): New argument BLOCK. All callers changed. - (save_call_clobbered_regs): Don't keep track of basic block boundaries - in this function, do it in insert_one_insn instead. - - * reload1.c (reload): Break out some more pieces into separate - functions. - (dump_needs): New function, broken out of reload. - (set_initial_elim_offsets): Likewise. - (init_elim_table): Likewise. - (update_eliminables): Likewise. - - * global.c (global_alloc): Delete code to manage the scratch_list. - * local-alloc.c (qty_scratch_rtx): Delete. - (scratch_block): Delete. - (scratch_list): Delete. - (scratch_list_length): Delete. - (scratch_index): Delete. - (alloc_qty_for_scratch): Delete. - (local-alloc): Update initialization of max_qty. - Delete code to manage the scratch list. - Delete code to allocate/initialize qty_scratch_rtx. - (block_alloc): Don't allocate quantities for scratches. - Delete code to manage the scratch list. - * regs.h (scratch_list): Delete declaration. - (scratch_block): Delete declaration. - (scratch_list_length): Delete declaration. - * reload1.c (reload): Delete code to manage the scratch list. - (spill_hard_reg): Likewise. - (mark_scratch_live): Delete. - - * recog.c (alter_subreg): Delete declaration. - -1998-10-02 Andreas Jaeger - - * Makefile.in (cccp.o): Fix typo in last patch. - -Fri Oct 2 16:13:12 1998 J"orn Rennecke - - * t-sh (LIB1ASMFUNCS): Add _set_fpscr . - * config/sh/lib1funcs.asm (___set_fpscr): Add. - -Fri Oct 2 02:01:59 1998 Jeffrey A Law (law@cygnus.com) - - * regclass.c (reg_scan_mark_refs): Return immediately if passed a - NULL_RTX as an argument. - - * Makefile.in (unlibsubdir): Define. - (DRIVER_DEFINES): Use unlibsubdir. - (cccp.o, cpplib.o, protoize.o, unprotoize.o): Similarly. - (stmp-fixinc): Similarly. - -Thu Oct 1 19:58:30 1998 Bernd Schmidt - - * regmove.c (regmove_optimize): Add variable old_max_uid. - At the end of the function, update basic_block_end. - -Thu Oct 1 17:58:25 1998 David S. Miller - - * dwarf2out.c (expand_builtin_dwarf_reg_size): Use - FIRST_PSEUDO_REGISTER as upper bound for last_end, not an - arbitrary constant. - -Thu Oct 1 17:57:14 1998 Nick Clifton - - * config/arm/arm.c: Improve interworking support. - -Thu Oct 1 18:43:35 1998 J"orn Rennecke - - * reload1.c (choose_reload_regs): Fix test if reload_reg_rtx[r] was - copied from reload_out[r] . - -Thu Oct 1 19:20:09 1998 John Carr - - * dwarf2out.c (expand_builtin_dwarf_reg_size): Fix to work - with more than three size ranges. - - * flow.c (sbitmap_copy): Use bcopy to copy bitmap. - - * rtl.c (mode_name): Add a null string at the end of the array. - (mode_wider_mode): Change type to unsigned char. - (mode_mask_array): New variable. - (init_rtl): Update for mode_wider_mode type change. - - * rtl.h (mode_wider_mode): Change type to unsigned char. - (mode_mask_array): Declare. - (GET_MODE_MASK): Use mode_mask_array. - -Thu Oct 1 15:56:01 1998 Gavin Romig-Koch - - * calls.c (expand_call) : Encapsulate code into - copy_blkmode_from_reg. - * expr.c (copy_blkmode_from_reg): New function. - * expr.h (copy_blkmode_from_reg): New function. - * integrate.c (function_cannot_inline_p): We can inline - these now. - (expand_inline_function): Use copy_blkmode_from_reg - if needed. Avoid creating BLKmode REGs. - (copy_rtx_and_substitute): Don't try to SUBREG a BLKmode - object. - -Thu Oct 1 10:42:27 1998 Nick Clifton - - * config/v850/v850.c: Add function prototypes. - Add support for v850 special data areas. - - * config/v850/v850.h: Add support for v850 special data areas. - - * c-pragma.c: Add support for HANDLE_PRAGMA_PACK and - HANDLE_PRAGMA_PACK_PUSH_POP. - (push_alignment): New function: Cache an alignment requested - by a #pragma pack(push,). - (pop_alignment): New function: Pop an alignment from the - alignment stack. - (insert_pack_attributes): New function: Generate __packed__ - and __aligned__ attributes for new decls whilst a #pragma pack - is in effect. - (add_weak): New function: Cache a #pragma weak directive. - (handle_pragma_token): Document calling conventions. Add - support for #pragma pack(push,) and #pragma pack (pop). - - * c-pragma.h: If HANDLE_SYSV_PRAGMA or HANDLE_PRAGMA_PACK_PUSH_POP - are defined enable HANDLE_PRAGMA_PACK. - Move 'struct weak_syms' here (from varasm.c). - Add pragma states for push and pop pragmas. - - * c-common.c (decl_attributes): Call PRAGMA_INSERT_ATTRIBUTES - if it is defined. - - * c-lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with - HANDLE_GENERIC_PRAGMAS. - - * varasm.c: Move definition of 'struct weak_syms' into - c-pragma.h. - (handle_pragma_weak): Deleted. - - * config/i386/i386.h: Define HANDLE_PRAGMA_PACK_PUSH_POP. - - * config/winnt/win-nt.h: Define HANDLE_PRAGMA_PACK_PUSH_POP. - - * c-decl.c (start_function): Add invocation of - SET_DEFAULT_DECL_ATTRIBUTES, if defined. - - * tm.texi: Remove description of non-existent macro - SET_DEFAULT_SECTION_NAME. - - (HANDLE_SYSV_PRAGMA): Document. - (HANDLE_PRAGMA_PACK_PUSH_POP): Document. - -Wed Sep 30 22:27:53 1998 Robert Lipe - - * config.sub: Recognize i[34567]86-pc-udk as new target. - * configure.in: Likewise. - * config/i386/t-udk: New file. - * config/i386/udk.h: New file. - -Wed Sep 30 19:33:07 1998 Jeffrey A Law (law@cygnus.com) - - * reorg.c (check_annul_list_true_false): Remove unused variables. - (steal_delay_list_from_target): Add missing "used_annul" variable. - (try_merge_delay_insns): Close out half formed comment. - -Wed Sep 30 19:13:20 1998 Zack Weinberg - - * cpplib.c (macroexpand): If arg->raw_before or - arg->raw_after, remove any no-reexpansion escape at the - beginning of the pasted token. Correct handling of whitespace - markers and no-reexpand markers at the end if arg->raw_after. - - * toplev.c (documented_lang_options): Recognize -include, - -imacros, -iwithprefix, -iwithprefixbefore. - * cpplib.c (cpp_start_read): Process -imacros and -include - switches at the same time and in command-line order, after - initializing the dependency-output code. Emit properly nested - #line directives for them. Emit a #line for the main file - before processing these switches, and don't do it again - afterward. - -Wed Sep 30 18:03:22 1998 Richard Henderson - - * function.c (purge_addressof_1): Use bitfield manipulation - routines to handle mem mode < reg mode. - -Wed Sep 30 18:43:32 1998 Herman ten Brugge - - * reorg.c (try_merge_delay_insns): Account for resources referenced - in each instruction in INSN's delay list before trying to eliminate - useless instructions. Similarly when looking at a trial insn's delay - slots. - - * reorg.c (check_annul_list_true_false): New function. - (steal_delay_list_from_{target,fallthrough}): Call it and also - refine tests for when we may annul if already filled a slot. - (fill_slots_from_thread): Likewise. - (delete_from_delay_slot): Return newly-created thread. - (try_merge_delay_isns): Use its new return value. - -Wed Sep 30 18:29:26 1998 Jeffrey A Law (law@cygnus.com) - - * loop.c (check_dbra_loop): Use a vanilla loop reversal if the biv is - used to compute a giv or as some other non-counting use. - -Wed Sep 30 18:19:27 1998 Michael Hayes - - * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): New macro. - * local-alloc.c (find_free_reg): Use it. - * global.c (find_reg): Likewise. - * tm.texi: Document HARD_REGNO_CALL_PART_CLOBBERED. - - * regs.h (HARD_REGNO_CALLER_SAVE_MODE): New macro. - * caller-save.c (init_caller_save): Use it. - * tm.texi: Document HARD_REGNO_CALLER_SAVE_MODE. - -Wed Sep 30 12:57:30 1998 Zack Weinberg - - * configure.in: Add --enable-cpplib option which uses cpplib - for cpp, but doesn't link cpplib into cc1. Make help text - capitalization consistent. - * configure: Rebuilt. - -Wed Sep 30 10:09:39 1998 Mark Mitchell - - * function.c (gen_mem_addressof): If the address REG is - REG_USERVAR_P make the new REG be so also. - * loop.c (scan_loop): Apply DeMorgan's laws and add documentation - in an attempt to clarify slightly. - -Wed Sep 30 09:57:40 1998 Jeffrey A Law (law@cygnus.com) - - * expr.c (expand_expr): Handle COMPONENT_REF, BIT_FIELD_REF ARRAY_REF - and INDIRECT_REF in code to check MAX_INTEGER_COMPUTATION_MODE. - -Wed Sep 30 10:13:39 1998 Catherine Moore - - * toplev.c: Fix last patch. - -Tue Sep 29 20:03:18 1998 Jim Wilson - - * loop.c (get_condition): Fix typo in May 9 change. - -Tue Sep 29 11:11:38 1998 Andrew MacLeod - - * invoke.texi (-fexceptions): Merge 2 different descriptions. - -Mon Sep 28 22:08:52 1998 Kaveh R. Ghazi - - * toplev.c (documented_lang_options): Spelling corrections. - -Mon Sep 28 19:41:24 1998 Alexandre Oliva - - * configure.in: New flags --with-ld and --with-as, equivalent - to setting LD and AS environment variables. Test whether - specified arguments are GNU commands, and report them with - checking messages. Use the specified AS for configure - tests too. - * configure: Likewise. - * acconfig.h: Add DEFAULT_ASSEMBLER and DEFAULT_LINKER. - * config.in: Likewise. - * gcc.c (find_a_file): When looking for `as' and `ld', return - the DEFAULT program if it exists. - * collect2.c (main): Use DEFAULT_LINKER if it exists. - - * gcc.c (find_a_file): The test for existence of a full - pathname was reversed. - -Mon Sep 28 17:34:35 1998 Michael Meissner - - * rs6000.h (ASM_OUTPUT_MI_THUNK): Only define on ELF systems. - * rs6000.c (output_mi_thunk): Always use a raw jump for now. - -Mon Sep 28 14:24:03 1998 Mark Mitchell - - * tree.h (TYPE_BINFO): Document. - -Mon Sep 28 12:55:49 1998 Stan Cox - - * i386-coff.h (dbxcoff.h): Added. - -Mon Sep 28 12:51:00 1998 Catherine Moore - - * toplev.c: Fix bad patch around flag_data_sections. - -Mon Sep 28 10:32:28 1998 Nick Clifton - - * reload1.c (reload): Use reload_address_index_reg_class and - reload_address_base_reg_class when setting - caller_save_spill_class. (Patch generated by Jim Wilson: - wilson@cygnus.com). - -Mon Sep 28 07:43:34 1998 Mark Mitchell - - * c-common.c (c_get_alias_set): Tighten slightly for FUNCTION_TYPEs - and ARRAY_TYPEs. Tidy up. Improve support for type-punning. - * expr.c (store_field): Add alias_set parameter. Set the - MEM_ALIAS_SET accordingly, if the target is a MEM. - (expand_assignment): Use it. - (store_constructor_field): Pass 0. - (expand_expr): Likewise. - -Mon Sep 28 07:54:03 1998 Catherine Moore - - * flags.h: Add flag_data_sections. - * toplev.c: Add option -fdata-sections. Add flag_data_sections. - (compile_file): Error if flag_data_sections not supported. - * varasm.c (assemble_variable): Handle flag_data_sections. - * config/svr4.h: Modify prefixes for UNIQUE_SECTION_NAME. - * config/mips/elf.h: Likewise. - * config/mips/elf64.h: Likewise. - * invoke.texi: Describe -fdata-sections. - -Mon Sep 28 04:15:44 1998 Craig Burley - - * invoke.texi (-ffloat-store): Clarify that this option - does not affect intermediate results -- only variables. - -Mon Sep 28 04:11:35 1998 Jeffrey A Law (law@cygnus.com) - - * cpp.texi: Update for Fortran usage from Craig. - -Fri Sep 25 22:09:47 1998 David Edelsohn - - * rs6000.c (function_arg_boundary): Revert accidental change on - September 18. - -Fri Sep 25 20:30:00 1998 Michael Meissner - - * rs6000.h (ASM_OUTPUT_MI_THUNK): Declare, call output_mi_thunk. - (output_mi_thunk): Declare. - - * rs6000.c (output_mi_thunk): Function to create thunks for MI. - (output_function_profiler): Use r12 for temp, instead of r11 so - that we preserve the static chain register. - -Fri Sep 25 14:18:33 1998 Jim Wilson - - * sdbout.c (sdbout_one_type): Don't look at TYPE_BINFO field of enums. - -Fri Sep 25 19:30:19 1998 J"orn Rennecke - - * sh.c (gen_shl_sext): Fix case 5. - -Fri Sep 25 17:35:23 1998 J"orn Rennecke - - * reload1.c (reload_combine): Re-add line that got accidentally lost. - -Fri Sep 25 10:43:47 1998 Kaveh R. Ghazi - - * cccp.c (pedwarn_with_file_and_line): For !__STDC__ case, avoid - accessing variables until they are initialized via va_arg(). - -Thu Sep 24 22:12:16 1998 David S. Miller - - * reload1.c (reload_combine): Initialize set before using. - -Thu Sep 24 18:53:20 1998 Jason Merrill - - * sdbout.c (sdbout_field_types): Don't emit the types of fields we - won't be emitting. - -Thu Sep 24 17:05:30 1998 Nick Clifton - - * config/arm/arm.md (insv): Add comment. In CONST_INT case, and - operand3 with mask before using it. Patch provided by Jim Wilson. - -Thu Sep 24 15:08:08 1998 Jakub Jelinek - - * config/sparc/sparc.c (function_value): Perform the equivalent of - PROMOTE_MODE for ARCH64. - (eligible_for_epilogue_delay): Allow DImode operations in delay - slot of a return for ARCH64. - -Thu Sep 24 22:17:54 1998 J"orn Rennecke - - * sh.md (sqrtsf2): Fix mode of sqrt. - -Thu Sep 24 21:48:51 1998 J"orn Rennecke - - * reload1.c (choose_reload_regs): Also try inheritance when - reload_in is a stack slot of a pseudo, even if we already got a - reload reg. - -Thu Sep 24 21:22:39 1998 J"orn Rennecke - - * reload1.c (reload_cse_regs_1): Renamed from reload_cse_regs. - (reload_cse_regs): New function body: call reload_cse_regs_1, - reload_combine, reload_cse_move2add. - When doing expensive_optimizations, call reload_cse_regs_1 a - second time after reload_cse_move2add. - (reload_combine, reload_combine_note_store): New functions. - (reload_combine_note_use): New function. - (reload_cse_move2add, move2add_note_store): New functions. - -Thu Sep 24 18:48:43 1998 J"orn Rennecke - - * reload.c (find_reloads): In code to promote RELOAD_FOR_X_ADDR_ADDR - reloads to RELOAD_FOR_X_ADDRESS reloads, test for reload sharing. - - Properly keep track of first RELOAD_FOR_X_ADDRESS also for - more than 3 such reloads. - - If there is not more than one RELOAD_FOR_X_ADDRESS, don't change - RELOAD_FOR_X_ADDR_ADDR reload. - -Thu Sep 24 17:45:55 1998 J"orn Rennecke - - * expr.c (store_constructor): When initializing a field that is smaller - than a word, at the start of a word, try to widen it to a full word. - - * cse.c (cse_insn): When we are about to change a register, - remove any invalid references to it. - - (remove_invalid_subreg_refs): New function. - (mention_regs): Special treatment for SUBREGs. - (insert_regs): Don't strip SUBREG for call to mention_regs. - Check if reg_tick needs to be bumped up before that call. - (lookup_as_function): Try to match known word_mode constants when - looking for a norrower constant. - (canon_hash): Special treatment for SUBREGs. - -Thu Sep 24 01:35:34 1998 David S. Miller - - * config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Define. - * config/sparc/sparc.c (sparc64_initialize_trampoline): If that is - defined, emit libcall to __enable_execute_stack. Also fix opcodes - and offsets in actual stack trampoline code so they match the - commentary and actually work. - -Thu Sep 24 01:19:02 1998 Jakub Jelinek - - * configure.in (sparcv9-*-solaris): Use t-sol2 and t-sol2-64 for - tmake_file. - (sparc64-*-linux): Use t-linux and sparc/t-linux64 for - tmake_file. Set extra_parts to needed crt objects. - * configure: Rebuilt. - * config/sparc/linux64.h (SPARC_BI_ARCH): Define. - (TARGET_DEFAULT): Set if default is v9 or ultra. - (STARTFILE_SPEC32, STARTFILE_SPEC64): New macros. - (STARTFILE_SPEC): Set to those upon SPARC_BI_ARCH. - (ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_SPEC): Likewise. - (SUBTARGET_EXTRA_SPECS, LINK_ARCH32_SPEC, LINK_ARCH64_SPEC, - LINK_SPEC, LINK_ARCH_SPEC): Likewise. - (TARGET_VERSION): Define. - (MULTILIB_DEFAULT): Define. - * config/sparc/sparc.h (CPP_CPU_DEFAULT_SPEC): Rearrange so that - mixed 32/64 bit compilers based upon SPARC_BI_ARCH work. - (CPP_CPU64_DEFAULT_SPEC, CPP_CPU32_DEFAULT_SEC): Define - appropriately. - (TARGET_SWITCHES): Allow ptr32/ptr64 options once more. - * config/sparc/sparc.c (sparc_override_options): If arch and - pointer size disagree, emit diagnostic and fix it up. If - SPARC_BI_ARCH and TARGET_ARCH32, set cmodel to CM_32. Turn off - V8PLUS in 64-bit mode. - * config/sparc/t-linux64: New file. - * config/sparc/t-sol2-64: New file. - * config/sparc/t-sol2: Adjust build rules to use MULTILIB_CFLAGS. - * config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Define. - (ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC, - CPP_CPU32_DEFAULT_SPEC, CPP_CPU64_DEFAULT_SPEC): Define. - (ASM_SPEC, CPP_CPU_SPEC): Set appropriately based upon those. - (STARTFILE_SPEC32, STARTFILE_SPEC32, STARTFILE_ARCH_SPEC): - Define. - (STARTFILE_SPEC): Set appropriately based upon those. - (CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Set based upon - disposition of DEFAULT_ARCH32_P. - (LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Define. - (LINK_ARCH_SPEC, LINK_ARCH_DEFAULT_SPEC): Set based upon those. - (CC1_SPEC, MULTILIB_DEFAULTS): Set based upon DEFAULT_ARCH32_P. - (MD_STARTFILE_PREFIX): Set correctly based upon SPARC_BI_ARCH. - * config/sparc/xm-sysv4-64.h (HOST_BITS_PER_LONG): Only set on - arch64/v9. - * config/sparc/xm-sp64.h (HOST_BITS_PER_LONG): Likewise. - -Wed Sep 23 22:32:31 1998 Mark Mitchell - - * rtl.h (init_virtual_regs): New function. - * emit-rtl.c (init_virtual_regs): Define. - (insn_emit): Use it. - * integrate.c (save_for_inline_copying): Likewise. - -Wed Sep 23 16:22:01 1998 Nick Clifton - - * config/arm/thumb.h: The following patches were made by Jim Wilson: - (enum reg_class): Add NONARG_LO_REGS support. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, - PREFERRED_RELOAD_CLASS, SECONDARY_RELOAD_CLASS): Likewise. - (GO_IF_LEGITIMATE_ADDRESS): Disable REG+REG addresses before reload - completes. Re-enable HImode REG+OFFSET addresses. - (LEGITIMIZE_RELOAD_ADDRESS): Define. - - * expmed.c (extract_bit_field): Add comment from Jim Wilson. - -Wed Sep 23 13:26:02 1998 Richard Henderson - - * alpha.c (get_aligned_mem): Revert Sep 20 change. - (alpha_set_memflags, alpha_set_memflags_1): Likewise. - (alpha_align_insns): Properly calculate initial offset wrt max_align. - -Wed Sep 23 10:45:44 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (find_barrier): Revert change of Apr 23. Handle table - jumps as a single entity, taking into account the size of the - table. - -Tue Sep 22 15:13:34 1998 Alexandre Petit-Bianco - - * tree.def (SWITCH_EXPR): New tree node definition. - -Mon Sep 21 23:40:38 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Sep 21 22:31:14 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Sep 21 22:48:09 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in: Recognize i[34567]86-*-openbsd* and handle it like - NetBSD. - -Mon Sep 21 22:05:28 1998 Jeffrey A Law (law@cygnus.com) - - * Revert this patch. - * reload.c (find_reloads): Do not replace a pseudo with - (MEM (reg_equiv_addr)) in the initializing insn for the - pseudo. - -Mon Sep 21 20:19:41 1998 John Carr - - * final.c (final_scan_insn): Disable tracking CC across branches. - -Mon Sep 21 17:15:26 1998 Andrew MacLeod - - * expr.h (eh_rtime_match_libfunc): New extern declaration. - * optabs.c (init_optabs): Set eh_rtime_match_libfunc. - * except.c (start_catch_handler): Use eh_rtime_match_libfunc. - * libgcc2.c (__eh_rtime_match): Always return 0 if the matcher is - NULL. Only include if inhibit_libc is not defined. - -Mon Sep 21 14:10:51 1998 Jason Merrill - - * toplev.c (rest_of_compilation): Skip compiling anything with - DECL_EXTERNAL set, not just if it has DECL_INLINE as well. - -Mon Sep 21 13:51:05 1998 Jim Wilson - - * flow.c (find_basic_blocks): Delete check for in_libcall_block when - prev_code is a CALL_INSN. Change check for REG_RETVAL note to - use in_libcall_block. - (find_basic_blocks_1): Delete check for in_libcall_block when prev_code - is a CALL_INSN. If CALL_INSN and in_libcall_block, then change code - to INSN. - -Mon Sep 21 14:02:23 1998 Robert Lipe - - * i386.h (TARGET_SWITCHES): Improve doc for align-double. Fix - typo in no-fancy-math-387 description. - -Mon Sep 21 09:27:18 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Sep 21 09:24:49 1998 Stan Cox - - * i386-coff.h (DBX_DEBUGGING_INFO): Added. - -Mon Sep 21 09:14:49 1998 Robert Lipe - - * i386.h (TARGET_SWITCHES): Add description fields for flags - documented in install.texi. - (TARGET_OPTIONS): Likewise. - -Mon Sep 21 01:39:03 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Sep 21 01:53:05 1998 Felix Lee - - * c-lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT (). - * cccp.c (main): Likewise. - - * cccp.c, collect2.c, cpplib.c, gcc.c, config/i386/xm-cygwin32.h: - Rename GET_ENVIRONMENT to GET_ENV_PATH_LIST, and fix some - macro-use bugs. - -Mon Sep 21 00:52:12 1998 Per Bothner - - * Makefile.in (LIBS): Link in libiberty.a. - * c-common.c, gcc.c, toplev.c: Replace (some) bcopy calls by memcpy. - -Sun Sep 20 23:28:11 1998 Richard Henderson - - * reload1.c (emit_reload_insns): Accept a new arg for the bb. Use - it to update bb boundaries. Update caller. - * function.c (reposition_prologue_and_epilogue_notes): Update - bb boundaries wrt the moved note. - -Sun Sep 20 20:57:02 1998 Robert Lipe - - * configure.in (i*86-*-sysv5*): Use fixinc.svr4 to patch byteorder - problems. - * configure: Regenerate. - -Sun Sep 20 19:01:51 1998 Richard Henderson - - * alpha.c (alpha_sr_alias_set): New variable. - (override_options): Set it. - (alpha_expand_prologue, alpha_expand_epilogue): Use it. - (mode_mask_operand): Fix signed-unsigned comparison warning. - (alpha_expand_block_move): Likewise. - (print_operand): Likewise. - (get_aligned_mem): Use change_address. - (alpha_set_memflags, alpha_set_memflags_1): Set the alias set. - (alphaev4_insn_pipe, alphaev4_next_group): New functions. - (alphaev4_next_nop, alphaev5_next_nop): New functions. - (alpha_align_insns): Remade from old alphaev5_align_insns - to handle multiple processors. - (alpha_reorg): Call alpha_align_insns for both ev4 and ev5. - * output.h (label_to_alignment): Prototype. - - * tree.c (new_alias_set): New function. - * tree.h (new_alias_set): Declare it. - * c-common.c (c_get_alias_set): Use it. - -Sun Sep 20 12:35:55 1998 Richard Henderson - - * fold-const.c (fold): Yet another COND_EXPR bug: when folding - to an ABS expr, convert an unsigned input to signed. - -Sun Sep 20 12:14:45 1998 Jeffrey A Law (law@cygnus.com) - - * fold-const.c (fold): Fix another type in COND_EXPR handling code. - -1998-09-20 Michael Hayes - - * configure.in: Add support for c4x targets. - * configure: Rebuilt. - -Sun Sep 20 00:00:51 1998 Richard Henderson - - * combine.c (distribute_notes): If an insn is a cc0 user, only - delete it if we can also delete the cc0 setter. - -Sun Sep 20 00:22:23 1998 Michael Tiemann - - * fold-const.c (fold): Fix typo in COND_EXPR handling code. - (invert_truthvalue): Enable truthvalue inversion for - floating-point operands if -ffast-math. - -Sat Sep 19 23:58:07 1998 Melissa O'Neill - - * configure.in: Disable collect2 for nextstep. Instead use - crtbegin/crtend. - * configure: Rebuilt. - * config/nextstep.h (STARTFILE_SPEC): Add crtbegin. - (ENDFILE_SPEC): Define. - (OBJECT_FORMAT_MACHO): Define. - (EH_FRAME_SECTION_ASM_OP): Define. - * crtstuff.c: Handle MACHO. - -Sun Sep 20 00:24:24 1998 Robert Lipe - - * config/i386/sco5.h (TARGET_MEM_FUNCTIONS): Define. - -1998-09-19 Torbjorn Granlund - - * fp-bit.c (pack_d): Do not clear SIGN when fraction is 0. - (_fpadd_parts): Get sign right for 0. - -1998-09-19 Michael Hayes - - * ginclude/varargs.h: Add support for C4x target. - * ginclude/stdargs.h: Likewise. - -Sat Sep 19 12:05:09 1998 Richard Henderson - - * alpha.c (alpha_return_addr): SET should be VOIDmode. - (alpha_emit_set_long_const): Rewrite to be callable from reload - and 32-bit hosts. - (alpha_expand_epilogue): Update for alpha_emit_set_long_const. - * alpha.md (movdi): Likewise. - -Sat Sep 19 07:33:36 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (add_constant): New parameter address_only, change caller. - Set it nonzero if taking the address of an item in the pool. - (arm_reorg): Handle cases where we need the address of an item in - the pool. - - * arm.c (bad_signed_byte_operand): Check both arms of a sum in - a memory address. - * arm.md (splits for *extendqihi_insn and *extendqisi_insn): Handle - memory addresses that are not in standard canonical form. - -Sat Sep 19 01:00:32 1998 Michael Hayes (mph@elec.canterbury.ac.nz) - - * README.C4X: New file with information about the c4x ports. - * ginclude/va-c4x.h: New file for c4x varargs support. - * config/c4x: New directory with c4x port files. - -Fri Sep 18 22:52:05 1998 Jeffrey A Law (law@cygnus.com) - - * reload.c (find_reloads): Do not replace a pseudo with - (MEM (reg_equiv_addr)) in the initializing insn for the - pseudo. - -Fri Sep 18 23:50:56 1998 David Edelsohn - - * toplev.c (rest_of_compilation): Set bct_p on second call to - loop_optimize. - * loop.c (loop_optimize, scan_loop, strength_reduce): New argument - bct_p. - (strength_reduce): Only call analyze_loop_iterations and - insert_bct if bct_p set. - (check_dbra_loop): Fix typo. - (insert_bct): Use word_mode instead of SImode. - (instrument_loop_bct): Likewise. Do not delete iteration count - condition code generation insn. Initialize iteration count before - loop start. - * rtl.h (loop_optimize): Update prototype. - - * ginclude/va-ppc.h (va_arg): longlong types in overflow area are - not doubleword aligned. - - * rs6000.c (optimization_options): New function. - (secondary_reload_class): Only call true_regnum for PSEUDO_REGs. - * rs6000.h (OPTIMIZATION_OPTIONS): Define. - (REG_ALLOC_ORDER): Allocate highest numbered condition regsiters - first; cr1 can be used for FP record condition insns. - -Fri Sep 18 09:44:55 1998 Nick Clifton - - * config/m32r/m32r.h (m32r_block_immediate_operand): Add to - PREDICATE_CODES. - - * config/m32r/m32r.md: Add "movstrsi" and "movstrsi_internal" - patterns. - - * config/m32r/m32r.c (m32r_print_operand): Add 's' and 'p' - operators. - (block_move_call): New function: Call a library routine to copy a - block of memory. - (m32r_expand_block_move): New function: Expand a "movstrsi" - pattern into a sequence of insns. - (m32r_output_block_move): New function: Expand a - "movstrsi_internal" pattern into a sequence of assembler opcodes. - (m32r_block_immediate_operand): New function: Return true if the - RTL is an integer constant, less than or equal to MAX_MOVE_BYTES. - -Thu Sep 17 16:42:16 1998 Andrew MacLeod - - * except.c (start_catch_handler): Issue 'fatal' instead of 'error' and - re-align some code. - * libgcc2.c (__eh_rtime_match): fprintf a runtime error. Use . - -Thu Sep 17 12:24:33 1998 J"orn Rennecke - - * regmove.c (copy_src_to_dest): Check that modes match. - -Wed Sep 16 22:10:42 1998 Robert Lipe - - * config/i386/sco5.h (SUPPORTS_WEAK): True only if targeting ELF. - -Wed Sep 16 15:24:54 1998 Richard Henderson - - * i386.h (PREFERRED_RELOAD_CLASS): Respect an existing class - narrower than FLOAT_REGS. - -Wed Sep 16 17:51:00 1998 Alexandre Oliva - - * cpplib.c: Removed OLD_GPLUSPLUS_INCLUDE_DIR. - * cccp.c: Likewise. - * Makefile.in (old_gxx_include_dir): Removed. - -Wed Sep 16 12:29:22 1998 Nick Clifton - - * config/sh/sh.h: Update definition of HANDLE_PRAGMA to match - new specification. - - * config/sh/sh.c (handle_pragma): Rename to sh_handle_pragma(). - (sh_handle_pragma): Change function arguments to match new - specification for HANDLE_PRAGMA. - -Wed Sep 16 12:43:19 1998 Kaveh R. Ghazi - - * gen-protos.c (parse_fn_proto): Cast argument of ISALNUM to - `unsigned char'. - (main): Mark parameter `argc' with ATTRIBUTE_UNUSED. - When generating output, initialize missing struct member to zero. - -Wed Sep 16 14:47:43 1998 J"orn Rennecke - - * regmove.c (copy_src_to_dest): Don't copy if that requires - (a) new register(s). - -Wed Sep 16 01:29:12 1998 Bernd Schmidt - - * global.c (reg_allocno): Now static. - * reload1.c (reg_allocno): Delete declaration. - (order_regs_for_reload): Take no arguments. Don't treat regs - allocated by global differently than those allocated by local-alloc. - -Wed Sep 16 01:09:01 1998 Kamil Iskra - - * m68k/m68k.c (output_function_prologue): Reverse NO_ADDSUB_Q - condition, fix format strings. - (output_function_epilogue): Likewise. - - * m68k/m68k.c: Don't include directly. - -Wed Sep 16 00:30:56 1998 Geoff Keating - - * gcse.c: New definition NEVER_SET for reg_first_set, reg_last_set, - mem_first_set, mem_last_set; because 0 can be a CUID. - (oprs_unchanged_p): Use new definition. - (record_last_reg_set_info): Likewise. - (record_last_mem_set_info): Likewise. - (compute_hash_table): Likewise. - -Tue Sep 15 22:59:52 1998 Jeffrey A Law (law@cygnus.com) - - * rs6000.c (output_epilogue): Handle Chill. - - * mn10200.h (ASM_OUTPUT_DWARF2_ADDR_CONST): Define. - * mn10300.h (ASM_OUTPUT_DWARF2_ADDR_CONST): Define. - - * combine.c (make_extraction): If no mode is specified for - an operand of insv, extv, or extzv, default it to word_mode. - (simplify_comparison): Similarly. - * expmed.c (store_bit_field): Similarly. - (extract_bit_field): Similarly. - * function.c (fixup_var_regs_1): Similarly. - * recog.c (validate_replace_rtx_1): Similarly. - * mips.md (extv, extzv, insv expanders): Default modes for most - operands. Handle TARGET_64BIT. - (movdi_uld, movdi_usd): New patterns. - - * pa.c (emit_move_sequence): Do not replace a pseudo with its - equivalent memory location unless we have been provided a scratch - register. Similarly do not call find_replacement unless a - scratch register has been provided. - -Tue Sep 15 19:23:01 1998 Bernd Schmidt - - * i386.h (PREFERRED_RELOAD_CLASS): For standard 387 constants, - return FLOAT_REGS. - -Tue Sep 15 19:09:06 1998 Richard Henderson - - * tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill. - (BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill. - (BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill. - (BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New. - * c-decl.c (init_decl_processing): Update accordingly. - * expr.c (expand_builtin): Likewise. - - * rtl.h (global_rtl): Add cfa entry. - (virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New. - (LAST_VIRTUAL_REGISTER): Update. - * emit-rtl.c (global_rtl): Add cfa entry. - (init_emit): Initialize it. - * function.c (cfa_offset): New. - (instantiate_virtual_regs): Initialize it. - (instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx. - (expand_function_end): Call expand_eh_return. - * tm.texi (ARG_POINTER_CFA_OFFSET): New. - - * except.c (current_function_eh_stub_label): Kill. - (current_function_eh_old_stub_label): Likwise; update all references. - (expand_builtin_set_return_addr_reg): Kill. - (expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill. - (expand_builtin_set_eh_regs): Kill. - (eh_regs): Produce a third reg for the actual handler address. - (eh_return_context, eh_return_stack_adjust): New. - (eh_return_handler, eh_return_stub_label): New. - (init_eh_for_function): Initialize them. - (expand_builtin_eh_return, expand_eh_return): New. - * except.h: Update prototypes. - * flow.c (find_basic_blocks_1): Update references to the stub label. - * function.h (struct function): Kill stub label elements. - - * libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the - register number is one that would be in the previous window. - Provide a dummy definition for non-windowed targets. - (get_reg_addr): New function. - (get_reg, put_reg, copy_reg): Use it. - (__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub - generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa. - - * alpha.c (alpha_eh_epilogue_sp_ofs): New. - (alpha_init_expanders): Initialize it. - (alpha_expand_epilogue): Use it. - * alpha.h: Declare it. - * alpha.md (eh_epilogue): New. - - * m68h.h (ARG_POINTER_CFA_OFFSET): New. - * sparc.h (ARG_POINTER_CFA_OFFSET): New. - -Tue Sep 15 19:31:58 1998 Michael Meissner - - * i960.h (CONST_COSTS): Fix thinko. Test flag, not the constant - flag bit mask. - -Tue Sep 15 14:10:54 1998 Andrew MacLeod - - * except.h (struct eh_entry): Add false_label field. - (end_catch_handler): Add prototype. - * except.c (push_eh_entry): Set false_label field to NULL_RTX. - (start_catch_handler): When using old style exceptions, issue - runtime typematch code before continuing with the handler. - (end_catch_handler): New function, generates label after handler - if needed by older style exceptions. - (expand_start_all_catch): No need to check for new style exceptions. - (output_exception_table_entry): Only output the first handler label - for old style exceptions. - * libgcc2.c (__eh_rtime_match): New routine to lump runtime matching - mechanism into one function, if a runtime matcher is provided. - -Tue Sep 15 13:53:59 1998 Andrew MacLeod - - * config/i960/i960.h (SLOW_BYTE_ACCESS): Change definition to 1. - -Tue Sep 15 09:59:01 1998 Mark Mitchell - - * integrate.c (copy_decl_list): Fix typo. - -Tue Sep 15 04:18:52 1998 David S. Miller - - * config/sparc/sparc.md (movdf_const_intreg_sp32): Fix length - attribute. - -Mon Sep 14 14:02:53 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Sep 14 10:33:56 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Mon Sep 14 09:51:05 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Sep 13 22:10:18 1998 David S. Miller - - * invoke.texi (C Dialect Options): Put back missing @end itemize. - -Mon Sep 14 02:33:46 1998 Alexandre Oliva - - * configure.in: Remove usage of `!' to negate the result of a - command; some common shells do not support it. - -Sun Sep 13 19:17:35 1998 David S. Miller - - * configure.in: In sparc9-sol2 config, use 'if test' not - brackets. - * configure: Rebuilt. - - * config/sparc/sol2-sld-64.h (SPARC_DEFAULT_CMODEL): Change to - CM_MEDANY. - (CPP_CPU_SPEC): Do not define _LP64, header files do this. - (CPP_CPU_DEFAULT_SPEC): Likewise. - * config/sparc/sol2.h (INIT_SUBTARGET_OPTABS): Get the names right - for arch64 libfuncs. - - * config/sparc/sparc.md (goto_handler_and_restore): Allow any mode - for operand zero. - -Sun Sep 13 09:11:59 1998 Kaveh R. Ghazi - - * acconfig.h (NEED_DECLARATION_STRSIGNAL): Provide a stub. - - * collect2.c: Don't declare `sys_siglist' here. - (my_strsignal): Prototype and define new function. Use it in - place of `sys_siglist' hacks. - - * mips_tfile.c: Likewise. - - * configure.in (AC_CHECK_FUNCS): Check for strsignal. - (GCC_NEED_DECLARATIONS): Likewise. - - * system.h (strsignal): Prototype it, if necessary. - (sys_siglist): Declare it, if necessary. - -Sun Sep 13 04:37:28 1998 David S. Miller - - * loop.c (move_movables): While removing insn sequences, preserve - the next pointer of the most recently deleted insn when we skip - over a NOTE. - -Sun Sep 13 08:13:39 1998 Ben Elliston - - * objc/config-lang.in: Do not output the name of the selected - thread file when building the front-end. The Makefile for the - runtime library will do this. - - * objc/Make-lang.in: Do not build the runtime library or install - the Objective-C header files. The Makefile for the runtime - library will do this. - - * objc/Makefile.in (all.indirect): Only build the front-end. - (compiler): Rename to `frontend'. - (obj-runtime): Remove target. - (copy-headers): Likewise. - (clean): No need to remove `libobjc.a' any longer. - -Sat Sep 12 11:37:19 1998 Michael Meissner - - * rs6000.h ({ASM,CPP}_CPU_SPEC): Add support for all machines - supported with -mcpu=xxx. - -Fri Sep 11 23:55:54 1998 David S. Miller - - * flow.c (mark_set_1): Recognize multi-register structure return - values in CALL insns. - (mark_used_regs): Likewise. - (count_reg_sets_1): Likewise. - (count_reg_references): Likewise. - * rtlanal.c (note_stores): Likewise. - (reg_overlap_mentioned_p): Likewise. - * haifa-sched.c (check_live_1): Likewise. - (update_live_1): Likewise. - (sched_analyze_1): Likewise. - (sched_note_set): Likewise. - (birthing_insn_p): Likewise. - (attach_deaths): Likewise. - - * config/sparc/sparc.md (movdf_const_intreg_sp64): Disable. - -Fri Sep 11 22:57:55 1998 Eric Dumazet - - * config/i386/sco5.h (ASM_WEAKEN_LABEL): Defined as in svr4.h. - -Thu Sep 10 22:02:04 1998 David S. Miller - - * glimits.h (__LONG_MAX__): Recognize __sparcv9 too. - -Thu Sep 10 21:19:10 1998 Jakub Jelinek - - * configure.in: Add check for GAS subsection -1 support. - * acconfig.h (HAVE_GAS_SUBSECTION_ORDERING): Add. - * configure config.in: Rebuilt. - * config/sparc/sparc.h (CASE_VECTOR_MODE): For V9 flag_pic, use - SImode is subsection -1 works, else use DImode. - (ASM_OUTPUT_ADDR_VEC_START, ASM_OUTPUT_ADDR_VEC_END): Define if - subsection -1 works. - * config/sparc/sparc.c (sparc_output_addr_vec, - sparc_output_addr_diff_vec): Use them if defined. - -Thu Sep 10 10:46:01 1998 Mark Mitchell - - * tree.h (DECL_ORIGIN): New macro. - * integrate.c (copy_and_set_decl_abstract_origin): New function. - (copy_decl_list): Use it. - (integrate_parm_decls): Likewise. - (integrate_decl_tree): Likewise. - * dwarf2out.c (decl_ultimate_origin): Simplify. - * dwarfout.c (decl_ultimate_origin): Likewise. - * c-decl.c (duplicate_decls): Use DECL_ORIGIN. - (pushdecl): Likewise. - -Thu Sep 10 08:01:31 1998 Anthony Green - - * config/rs6000/rs6000.c (output_epilog): Add Java support. - -Thu Sep 10 14:48:59 1998 Martin von Löwis - - * invoke.texi (C++ Dialect Options): Document -fhonor-std. - -Thu Sep 10 01:38:05 1998 Jeffrey A Law (law@cygnus.com) - - * reg-stack.c (straighten_stack): Do nothing if the virtual stack is - empty or has a single entry. - - * toplev.c (rest_of_compilation): Open up the dump file for reg-stack - before calling reg_to_stack. - -Thu Sep 10 00:03:34 1998 Richard Henderson - - * alpha.c (alphaev5_insn_pipe): Abort on default case. - (alphaev5_next_group): Swallow CLOBBERs and USEs. - - * c-tree.h (warn_long_long): Declare it. - -Wed Sep 9 23:31:36 1998 (Stephen L Moshier) - - * emit-rtl.c (gen_lowpart_common): Disable optimization of - initialized float-int union if the value is a NaN. - -Wed Sep 9 23:00:48 1998 Nathan Sidwell - - * c-lex.c (real_yylex): Don't warn about long long constants if - we're allowing long long - -Wed Sep 9 21:58:41 1998 Bernd Schmidt - - * except.h (current_function_eh_stub_label): Declare. - (current_function_eh_old_stub_label): Declare. - * function.h (struct function): New members eh_stub_label and - eh_old_stub_label. - * except.c (current_function_eh_stub_label): New variable. - (current_function_eh_old_stub_label): New variable. - (init_eh_for_function): Clear them. - (save_eh_status): Save them. - (restore_eh_status): Restore them. - (expand_builtin_eh_stub): Set current_function_eh_stub_label. - (expand_builtin_eh_stub_old): Set current_function_eh_old_stub_label. - * flow.c (find_basic_blocks_1): When handling a REG_LABEL note, don't - make an edge from the block that contains it to the block starting - with the label if this label is one of the eh stub labels. - If eh stub labels exist, show they are reachable from the last block - in the function. - - * reload1.c (reload): Break out several subroutines and make some - variables global. - (calculate_needs_all_insns): New function, broken out of reload. - (calculate_needs): Likewise. - (find_reload_regs): Likewise. - (find_group): Likewise. - (find_tworeg_group): Likewise. - (something_needs_reloads): New global variable, formerly in reload. - (something_needs_elimination): Likewise. - (caller_save_spill_class): Likewise. - (caller_save_group_size): Likewise. - (max_needs): Likewise. - (group_size): Likewise. - (max_groups): Likewise. - (max_nongroups): Likewise. - (group_mode): Likewise. - (max_needs_insn): Likewise. - (max_groups_insn): Likewise. - (max_nongroups_insn): Likewise. - (failure): Likewise. - - * print-rtl.c (print_rtx): For MEMs, print MEM_ALIAS_SET. - -Wed Sep 9 13:14:41 1998 Richard Henderson - - * loop.c (load_mems): Copy rtx for output mem. - -Wed Sep 9 15:16:58 1998 Gavin Romig-Koch - - * mips/abi64.h (LONG_MAX_SPEC): Don't set LONG_MAX for - mips1 or mips2 either. - -Wed Sep 9 12:31:35 1998 Jeffrey A Law (law@cygnus.com) - - * pa.c (pa_reorg): New marking scheme for jumps inside switch - tables. - (pa_adjust_insn_length): Update to work with new marking scheme - for jumps inside switch tables. - * pa.md (switch_jump): Remove pattern. - (jump): Handle jumps inside jump tables. - - * Makefile.in (profile.o): Depend on insn-config.h - -Wed Sep 9 09:36:51 1998 Jim Wilson - - * iris6.h (DWARF2_UNWIND_INFO): Undef. - -Wed Sep 9 01:32:01 1998 David S. Miller - - Add preliminary native sparcv9 Solaris support. - * configure.in: Recognize sparv9-*-solaris2* - * configure: Rebuilt. - * config.sub: Recognize sparcv9 just like sparc64. - * config/sparc/sol2-c1.asm config/sparc/sol2-ci.asm - config/sparc/sol2-cn.asm: Macroize so it can be shared between - 32-bit and 64-bit Solaris systems. - * config/sparc/t-sol2: Assemble those with cpp. - * config/sparc/sparc.h (TARGET_CPU_sparcv9): New alias for v9. - (*TF*_LIBCALL): If ARCH64 use V9 names. - * config/sparc/{xm-sysv4-64,sol2-sld-64}.h: New files. - -Wed Sep 9 01:07:30 1998 Jakub Jelinek - - * config/sparc/sparc.h (TARGET_CM_MEDMID): Fix documentation. - (CASE_VECTOR_MODE): Set to SImode even if PTR64, when MEDLOW and - not doing pic. - (ASM_OUTPUT_ADDR_{VEC,DIFF}_ELT): Check CASE_VECTOR_MODE not - Pmode. - * config/sparc/sparc.md (tablejump): Likewise, and sign extend op0 - to Pmode if CASE_VECTOR_MODE is something else. - -Wed Sep 9 00:10:31 1998 Jeffrey A Law (law@cygnus.com) - - * prefix.c (update_path): Correctly handle cases where PATH is - a substring of the builtin prefix, but specifies a different - directory location. - -Tue Sep 8 23:46:04 1998 Hans-Peter Nilsson - - * expr.c: Corrected comment about what MOVE_RATIO does. - * config/alpha/alpha.h: Likewise. - * config/1750a/1750a.h: Likewise. - * config/clipper/clipper.h: Likewise. - * config/i386/i386.h: Likewise. - -Tue Sep 8 22:56:12 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in (m68k-next-nextstep3*): Use collect2. - Similarly for x86 NeXT configurations. - * configure: Rebuilt. - -Tue Sep 8 01:38:57 1998 Nathan Sidwell - - * configure.in: Don't assume srcdir is .../gcc. - * configure: Rebuilt. - -Sat Sep 5 16:34:34 1998 John Wehle (john@feith.com) - - * global.c: Update comments. - (global_alloc): Assign allocation-numbers - even for registers allocated by local_alloc in case - they are later spilled and retry_global_alloc is called. - (mark_reg_store, mark_reg_clobber, - mark_reg_conflicts, mark_reg_death): Always record a - conflict with a pseudo register even if it has been - assigned to a hard register. - (dump_conflicts): Don't list pseudo registers already assigned to - a hard register as needing to be allocated, but do list their - conflicts. - * local-alloc.c: Update comment. - -Mon Sep 7 23:38:01 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in: Check for bogus GCC_EXEC_PREFIX and LIBRARY_PATH. - * configure: Rebuilt. - -Mon Sep 7 22:41:46 1998 Michael Meissner - - * rs6000.c (rs6000_override_options): Fix name for ec603e, to add - missing 'c'. - * t-ppccomm (MULTILIB_MATCHES_FLOAT): Add support for -mcpu=xxx - for all targets that set -msoft-float. - -Mon Sep 7 23:30:07 1998 Kaveh R. Ghazi - - * toplev.c (print_switch_values): Make static to match prototype. - -Mon Sep 7 19:13:59 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in: If we are unable to find the "gnatbind" program, - then do not configure the ada subdir. - * configure: Rebuilt. - -Sun Sep 6 14:03:58 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Sep 6 13:28:07 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Sun Sep 6 08:54:14 1998 Kaveh R. Ghazi - - * Makefile.in (toplev.o): Depend on $(EXPR_H). - (insn-extract.o, insn-attrtab.o): Depend on toplev.h. - - * gansidecl.h: Define ATTRIBUTE_NORETURN. - - * genattrtab.c: Have insn-attrtab.c include toplev.h. - - * genextract.c: Have insn-extract.c include toplev.h. - - * rtl.h: Don't prototype `fatal_insn_not_found' and `fatal_insn'. - - * toplev.c: Include expr.h. - (really_sorry, fancy_abort): Remove prototypes. - (set_target_switch): Add argument in prototype. - (vfatal): Mark prototype with ATTRIBUTE_NORETURN. - (v_really_sorry): Likewise. - (print_version, print_single_switch, print_switch_values): Make - static and add prototype arguments. - (decl_printable_name): Add prototype arguments. - (lang_expand_expr_t): New typedef. - (lang_expand_expr): Declare as a lang_expand_expr_t. - (incomplete_decl_finalize_hook): Add prototype argument. - (decl_name): Mark variable `verbosity' with ATTRIBUTE_UNUSED. - (botch): Likewise for variable `s'. - (rest_of_type_compilation): Mark variables `type' and `toplev' - with ATTRIBUTE_UNUSED if none of DBX_DEBUGGING_INFO, - XCOFF_DEBUGGING_INFO or SDB_DEBUGGING_INFO are defined. - (display_help): Make variable `i' an `unsigned long'. - (main): Remove unused parameter `envp'. - Cast assignment to `lang_expand_expr' to a `lang_expand_expr_t'. - Cast -1 when comparing it with a `size_t'. - - * toplev.h (fatal, fatal_io_error, pfatal_with_name): Mark - prototype with ATTRIBUTE_NORETURN. - (fatal_insn_not_found, fatal_insn, really_sorry, - push_float_handler, pop_float_handler): Add prototypes. - (fancy_abort): Mark prototype with ATTRIBUTE_NORETURN. - (do_abort, botch): Add prototypes. - -Sat Sep 6 12:05:18 1998 John Carr - - * final.c (final): If a label is reached only from a single jump, - call NOTICE_UPDATE_CC on the jump and its predecessor before - emitting the insn after the label. - - * i386.h: Add AMD K6 support. - Change TARGET_* macros to use table lookup. - (INITIALIZE_TRAMPOLINE): Improve trampoline code. - (ADJUST_COST): Change definition to call function in i386.c. - (ISSUE_RATE): Define as 2 for anything newer than an 80486. - * i386.c: Add AMD K6 support. - Add constants for feature tests used by TARGET_* macros. - (split_di): If before reload, call gen_lowpart and gen_highpart. - (x86_adjust_cost): New function. - (put_jump_code): New function. - (print_operand): New codes 'D' and 'd'. - * i386.md: New insn types. New insn attribute "memory". - Redefine scheduling parameters to use new types and add AMD K6 - support. Explicitly set type of most insns. - (move insns): K6 prefers movl $0,reg to xorl reg,reg. Pentium - Pro and K6 prefer movl $1,reg to incl reg. - (adddi3, subdi3): Set cc_status. - (DImode shift patterns): Change label counters from HOST_WIDE_INT - to int; x86 can't have more than 2^31 DImode shifts per file. - (setcc): Combine all setcc patterns. Allow writing memory. - Combine all jump patterns using match_operator. - (*bzero): Name pattern. Emit multiple stos instructions when that - is faster than rep stos. - (xordi3, anddi3, iordi3): Simplify DImode logical patterns and - add define_split. - -Sun Sep 6 11:17:20 1998 Dave Love - - * config/m68k/x-next (BOOT_LDFLAGS): Define suitably for f771 - linking. - -Sat Sep 5 22:05:25 1998 Richard Henderson - - * alpha.c (alpha_ra_ever_killed): Inspect the topmost sequence, - not whatever we're generating now. - - * alpha.c (set_frame_related_p, FRP): New. - (alpha_expand_prologue): Mark frame related insns. - (alpha_expand_epilogue): Likewise, but with a null FRP. - * alpha.h (INCOMING_RETURN_ADDR_RTX): New. - * alpha.md (exception_receiver): New. - * alpha/crtbegin.asm (.eh_frame): New beginning. - (__do_frame_setup, __do_frame_takedown): New. - * alpha/crtend.asm (.eh_frame): New ending. - * alpha/elf.h (DWARF2_DEBUGGING_INFO): Define. - (ASM_SPEC): Don't emit both dwarf2 and mdebug. - (ASM_FILE_START): Don't emit .file for dwarf2. - - * rtl.h (enum reg_note): Add REG_FRAME_RELATED_EXPR. - * rtl.c (reg_note_name): Likewise. - * rtl.texi (REG_NOTES): Likewise. - * dwarf2out.c (dwarf2out_frame_debug): Use it. Recognize a store - without an offset. - -Sat Sep 5 14:47:17 1998 Richard Henderson - - * i386.h (PREFERRED_RELOAD_CLASS): Standard fp constants load to TOS. - * i386.md (movsf, movdf, movxf): Validate memory address returned - from force_const_mem. Kill useless REG_EQUAL setting code. - -Sat Sep 5 14:23:31 1998 Torbjorn Granlund - - * m68k.md (zero_extendsidi2): Fix typo. - -Sat Sep 5 13:40:24 1998 Krister Walfridsson - - * configure.in: Removed references to the removed file. - * config/xm-netbsd.h: Use ${cpu_type}/xm-netbsd.h for - arm*-*-netbsd* and ns32k-*-netbsd*. - * config/i386/xm-netbsd.h: Removed unnecessary file. - * config/m68k/xm-netbsd.h: Likewise. - * config/sparc/xm-netbsd.h: Likewise. - * config/mips/xm-netbsd.h: Likewise. - -Sat Aug 29 13:32:58 1998 Mumit Khan - - * i386/cygwin32.h (BIGGEST_ALIGNMENT): Define. - (PCC_BITFIELD_TYPE_MATTERS): Define to be 0. - - * i386/cygwin32.h (ASM_OUTPUT_SECTION_NAME): Don't check for - for exact section attributions. - - * i386/mingw32.h (CPP_PREDEFINES): Add __MSVCRT__ for msvc - runtime. - * i386/crtdll.h (CPP_PREDEFINES): Define. - -Sat Sep 5 03:23:05 1998 Jeffrey A Law (law@cygnus.com) - - * m68k.md (5200 movqi): Do not allow byte sized memory references - using address regs. - * m68k.c (output_move_qimode): Do not use byte sized operations on - address registers. - - * Makefile.in (pexecute.o): Use pexecute.c from libiberty. Provide - explicit rules for building. Similarly for alloca, vfprintf, - choose-temp and mkstemp, getopt, getopt1, and obstack. - (INCLUDES): Add $(srcdir)/../include. - * pexecute.c, alloca.c, vfprintf.c, choose-temp.c, mkstemp.c: Delete. - * getopt.h, getopt.c getopt1.c, obstack.c, obstack.h: Likewise. - -Fri Sep 4 11:57:50 1998 Tom Tromey - - * gcc.c (do_spec_1): [case 'o'] Account for - lang_specific_extra_outfiles. - (main): Correctly clear all slots in outfiles for - lang_specific_extra_outfiles. Set input_file_number before - calling lang_specific_pre_link. - -Fri Sep 4 10:37:07 1998 Jim Wilson - - * loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call. - -Fri Sep 4 02:01:05 1998 David S. Miller - - * config/sparc/sparc.c (output_double_int): In all V9 symbolic - cases, use xword. - (sparc_output_deferred_case_vectors): If no work to do, return. - Fix thinko in Sept 1 change. - -1998-09-03 SL Baur - - * Makefile.in: Add semicolon in BISON definition for portability. - -Thu Sep 3 13:34:41 1998 Toon Moene - - * config/nextstep.c (handle_pragma): Correct name of third - argument. - -Tue Sep 1 11:30:33 1998 Nick Clifton - - * config/m32r/m32r.md: Change (reg:CC 17) to (reg:SI 17). - * config/m32r/m32r.h: Make register 17 be fixed. - * config/m32r/m32r.c: Use SImode for cc operations. - -Thu Sep 3 18:17:34 1998 Benjamin Kosnik - - * invoke.texi (Warning Options): Add -Wnon-template-friend - documentation. - -Thu Sep 3 18:16:16 1998 Michael Meissner - - * rs6000.c (rs6000_override_options): Add -mcpu={401,e603e}. - -Thu Sep 3 18:05:16 1998 David Edelsohn - - * rs6000.md (movsf): Disable explicit secondary-reload-like - functionality if TARGET_POWERPC64. - (movdf): Remove TARGET_POWERPC64 explicit secondary-reload-like - functionality. - -Thu Sep 3 11:41:40 1998 Robert Lipe - - * fixinc.sco: Borrow code to wrap 'bool' typedefs from tinfo.h - and term.h from fixinc.wrap. - -Thu Sep 3 09:47:31 1998 Kaveh R. Ghazi - - * aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is - safe to include both string.h and strings.h together. - (GCC_NEED_DECLARATION): Test STRING_WITH_STRINGS when deciding - which headers to search for function declarations. Continue to - prefer string.h over strings.h when both are not acceptable. - - * acconfig.h (STRING_WITH_STRINGS): Add stub. - - * configure.in: Call GCC_HEADER_STRING. - - * system.h: Test STRING_WITH_STRINGS when deciding which headers - to include. Continue to prefer string.h over strings.h when both - are not acceptable. - -Wed Sep 2 23:56:29 1998 David S. Miller - - * config/sparc/sparc.c (output_double_int): If V9 and MEDLOW, do - not assume top 32-bits of symbolic addresses are zero if - flag_pic. - -Thu Sep 3 00:23:21 1998 Richard Henderson - - * ginclude/va-alpha.h: Protect entire second portion of the - file against double inclusion. - -Thu Sep 3 00:37:55 1998 Ovidiu Predescu - - Added support for the Boehm's garbage collector. - * configure.in: Handle --enable-objc-gc. - * configure: Rebuilt. - * Makefile.in (CHECK_TARGETS): Add check-objc. - (check-objc): New rule. - * objc/Make-lang.in: Build a different Objective-C library that - runs with the Boehm's collector. - * objc/encoding.c (objc_round_acc_size_for_types): New function. - * objc/encoding.c: Correctly compute the size of compound types in - the presence of bitfields. Skip the variable name of the type if - any. Added support for long long. - * objc/encoding.h (_C_GCINVISIBLE): New specifier. - (_F_GCINVISIBLE): New mask. - * objc/gc.c: New file. Compute the type memory mask associated with - a class based on the runtime information. - * objc/misc.c: Added the hooks that use the Boehm's collector - allocation functions. - * objc/objc-act.c (build_class_template): Generate a new class - member (gc_object_type) to hold the class' type memory mask. - (build_shared_structure_initializer): Initialize the new member to - NULL. - (encode_complete_bitfield): New function. Generate the new - encoding. - (encode_field_decl): Generate the new encoding only for the GNU - runtime. - * objc/objc-api.h (_C_LNG_LNG, _C_ULNG_LNG): New specifiers for the - long long types. - (class_get_gc_object_type): New function to mark a pointer instance - variable as a weak pointer. - * objc/objc-features.texi: New file. - * objc/objc.h (gc_object_type): New class member. - * objc/objects.c (class_create_instance): Create a typed memory - object when compiled with Boehm's collector support. - * objc/sendmsg.c (__objc_init_install_dtable): Call - __objc_send_initialize instead of setting the initialize flag. - (__objc_send_initialize): Call __objc_generate_gc_type_description - to generate the class type memory mask. Rewrite the code that - sends the +initialize so that it is called only once (bug report - and fix from Ronald Pijnacker ). - * testsuite/objc: New testsuite for Objective-C type encoding. - * testsuite/lib/objc-torture.exp: New file. - * testsuite/lib/objc.exp: New file. - -Wed Sep 2 14:47:36 1998 Jim Wilson - - * jump.c (jump_optimize): In if/then/else transformations, add - another call to modified_between_p for the jump insn. - -Wed Sep 2 14:16:49 1998 Jeffrey A Law (law@cygnus.com) - - * fix-header.c (symlink): Treat like readlink. - -Wed Sep 2 19:30:06 1998 J"orn Rennecke - - * dwarfout.c (fundamental_type_code): Encode 32 bit floats/doubles - as FT_float. - -Wed Sep 2 10:06:07 1998 Nick Clifton - - * config/nextstep.h: Update HANDLE_PRAGMA macro. - * config/h8300/h8300.h: Update HANDLE_PRAGMA macro. - * config/i960/i960.h: Update HANDLE_PRAGMA macro. - - * config/nextstep.c (handle_pragma): Take three arguments, as per - the new HANDLE_PRAGMA macro specification. - * config/h8300/h8300.c (handle_pragma): Take three arguments, as - per the new HANDLE_PRAGMA macro specification. - * config/i960/i960.c (process_pragma): Take three arguments, as - per the new HANDLE_PRAGMA macro specification. - -Wed Sep 2 09:25:29 1998 Nick Clifton - - * c-lex.c (check_newline): Call HANDLE_PRAGMA before - HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages - if unknown pragmas are encountered. - (handle_sysv_pragma): Interpret return code from - handle_pragma_token (). Return success/failure indication rather - than next unprocessed character. - (pragma_getc): New function: retrieves characters from the - input stream. Defined when HANDLE_PRAGMA is enabled. - (pragma_ungetc): New function: replaces characters back into the - input stream. Defined when HANDLE_PRAGMA is enabled. - - * c-pragma.c (handle_pragma_token): Return success/failure status - of the parse. - - * c-pragma.h: Change prototype of handle_pragma_token(). - - * varasm.c (handle_pragma_weak): Only create this function if - HANDLE_PRAGMA_WEAK is defined. - - * c-common,c (decl_attributes): If defined call the expression - contained within the INSERT_ATTRIBUTES macro before adding - attributes to a decl. - - * tm.texi (HANDLE_PRAGMA): Document the new version of - HANDLE_PRAGMA, which takes three arguments. - (INSERT_ATTRIBUTES): Document this new macro. - - * LANGUAGES: Document the new version of HANDLE_PRAGMA and the - new INSERT_ATTRIBUTES macro. - -Wed Sep 2 02:03:23 1998 David S. Miller - - * config/sparc/sparc.md (movdf): Only generate special RTL for - LABEL_REFs when PIC. - (move_label_di): Remove. - (movdi_pic_label_ref, movdi_high_pic_label_ref, - movdi_lo_sum_pic_label_ref): New patterns for 64-bit label - references when PIC. - * config/sparc/sparc.h (ASM_OUTPUT_ADDR_VEC_ELT, - ASM_OUTPUT_ADDR_DIFF_ELT): Don't do anything special for MEDLOW, - output an .xword for all 64-bit cases. - -Tue Sep 1 15:55:17 1998 David S. Miller - - * config/sparc/sparc.c (finalize_pic): Don't output arbitrary - alignment, use FUNCTION_BOUNDARY instead. - (sparc_output_deferred_case_vectors): Likewise. - -Mon Aug 31 17:25:41 1998 David S. Miller - - * config/sparc/sparc.md (movsf_const_intreg): Kill warning. - (movtf_insn_sp64, movtf_no_e_insn_sp64): Reorder alternatives. - -Mon Aug 31 13:57:55 1998 Richard Henderson - - * alpha/va_list.h: New file. - * alpha/x-alpha (EXTRA_HEADERS): New. Add va_list.h. - -Mon Aug 31 14:55:02 1998 Jeffrey A Law (law@cygnus.com) - - * NEWS: Add SCO Openserver and Unixware 7 notes. - - * NEWS: Fix typos. - -Mon Aug 31 15:42:18 1998 Dave Brolley - - * varasm.c (compare_constant_1): Handle RANGE_EXPR. - (record_constant_1): Handle RANGE_EXPR. - -Mon Aug 31 10:54:03 1998 Richard Henderson - - * print-rtl.c (print_rtx): NOTE_INSN_LIVE has an rtx not a bitmap. - * haifa-sched.c (sched_analyze): Handle NOTE_INSN_RANGE_START - and NOTE_INSN_RANGE_END specially. - (reemit_notes): Likewise. - -Mon Aug 31 10:18:52 1998 Kaveh R. Ghazi - - * sparc.c (TMASK, UMASK): Use `(unsigned)1' not `1U'. - (ultrasparc_sched_init): Remove unneeded &. - -Mon Aug 31 10:47:16 1998 Andreas Schwab - - * config/m68k/m68k.h (TARGET_SWITCHES): Don't remove MASK_68040 - for m68020-60, to prevent the use of fintrz. - -Sun Aug 30 22:17:20 1998 Mark Mitchell - - * configure.in: If the native compiler is GCC use $(WARN_CFLAGS) - even in stage1. - * Makefile.in: Likewise. - * configure: Regenerated. - -Sun Aug 30 22:15:41 1998 H.J. Lu (hjl@gnu.org) - - * configure.in (gxx_include_dir): Changed to - '${prefix}/include/g++'-${libstdcxx_interface}. - * configure: Rebuilt. - -Sun Aug 30 20:19:43 1998 Hans-Peter Nilsson - - * expr.c (expand_expr): Change ">" to ">=" making MOVE_RATIO use - consistent. - * tm.texi (Costs): Say MOVE_RATIO is number of mem-mem move - *sequences* *below* which scalar moves will be used. - -Sun Aug 30 17:18:43 1998 Jeffrey A Law (law@cygnus.com) - - * collect2.c (mktemp): Delete unused declaration. - - * config/xm-netbsd.h: Remove unnecessary file. - * config/*/xm-netbsd.h: Do not include the generic xm-netbsd.h - file anymore, it is not needed. - -Sun Aug 30 16:05:45 1998 Mark Mitchell - - * convert.c (convert_to_integer): Issue an error on conversions to - incomplete types. - -Sun Aug 30 16:47:20 1998 Martin von Lvwis - - * Makefile.in: Add lang_tree_files and gencheck.h. - * configure.in: Generate them. - * gencheck.c: Include gencheck.h. - -Sat Aug 29 21:38:24 1998 David S. Miller - - * config/sparc/sparc.md (pic_lo_sum_di, pic_sethi_di): Rename to - movdi_lo_sum_pic and movdi_high_pic and make visible. - * config/sparc/sparc.c (legitimize_pic_address): For -fPIC, - emit these when Pmode is not SImode. - * config/sparc/linux64.h (SPARC_DEFAULT_CMODEL): Make CM_MEDLOW. - -Sat Aug 29 14:59:32 1998 Mumit Khan - - * i386/cygwin32.h (ASM_OUTPUT_SECTION_NAME): Don't emit - .linkonce directive after the first time. - -Sat Aug 29 12:39:56 1998 Jeffrey A Law (law@cygnus.com) - - * m68k.md (beq0_di): Generate correct (and more efficient) code when - the clobbered operand overlaps with an input. - (bne0_di): Similarly. - - * Makefile.in (INSTALL): Remove "--no-header" argument. - - * NEWS: Various updates. - -Fri Aug 28 19:00:44 1998 David S. Miller - - * config/sparc/sparc.c (arith_operand, const64_operand, - const64_high_operand, arith_double_4096_operand): Mark mode as - unused. - (create_simple_focus_bits): Remove unused arg highest_bit_set, all - callers changed. - (sparc_emit_set_const64): Remove unused variable i. - (sparc_splitdi_legitimate): Likewise for addr_part. - (ultra_code_from_mask): Likewise for mask. - (ultra_cmove_results_ready_p): Fixup entry modulo calc. and - reverse return values so it matches usage and comments. - (ultra_flush_pipeline): Likewise. - (ultra_fpmode_conflict_exists): Likewise, remove unused variable - this_type, and allow loads and stores of differing FP modes as - they do not create a conflict. - (ultra_find_type): Initialize fpmode to SFmode, fix - parenthesization thinkos in large conditional. - (ultrasparc_sched_init): Mark dump and sched_verbose as unused. - Init free_slot_mask after ultra_cur_hist is reset, not before. - (ultrasparc_rescan_pipeline_state): Remove unused variable ucode. - (ultrasparc_sched_reorder): Don't bzero current pipeline state, - use ultra_flush_pipeline instead, then re-init group pointer. - Fix statement with no effect. If no progress made in, and no - instructions scheduled at all, advance to new pipeline cycle else - we get into an endless loop. - (ultrasparc_adjust_cost): Remove previous arg. - * config/sparc/sparc.h (ADJUST_COST): Update to reflect that. - -Fri Aug 28 13:52:35 1998 Jim Wilson - - * sparc.md (DImode, DFmode, TFmode splits): Delete self_reference - code. Use reg_overlap_mentioned_p to detect when source and - destination overlap. - (negtf2_notv9+1): Use DFmode instead of SFmode in last two operands. - -1998-08-28 Brendan Kehoe - - * loop.c (check_dbra_loop): Pass COMPARISON_VALUE, not - COMPARISON_VAL, into invariant_p. - -Fri Aug 28 15:13:25 1998 J"orn Rennecke - - * regmove.c (regclass_compatible_p): New function. - (regmove_optimize): Use it. - - Use NREGS parameter instead of calling max_reg_num. - - (fixup_match_1): Don't use code = MINUS when later tieing with - a hard register is likely. - -Fri Aug 28 14:54:07 1998 J"orn Rennecke - - * loop.c (check_dbra_loop): Fix calculation of FINAL_VALUE when - COMPARISON_VAL was normalized. - -Thu Aug 27 20:10:46 1998 Jeffrey A Law (law@cygnus.com) - - * loop.c (check_dbra_loop): The loop ending comparison value - must be an invariant or we can not reverse the loop. - - * loop.c (scan_loop): Count down from max_reg_num - 1 to - FIRST_PSEUDO_REGISTER to avoid calling max_reg_num each iteration - of the loop. - (load_mems_and_recount_loop_regs_set): Likewise. - - * i386.c (print_operand): Remove obsolete 'c' docs. - -Wed Aug 26 17:13:37 1998 Tom Tromey - - * gthr.h: Document __GTHREAD_MUTEX_INIT_FUNCTION. - * frame.c (init_object_mutex): New function. - (init_object_mutex_once): Likewise. - (find_fde): Call it. - (__register_frame_info): Likewise. - (__register_frame_info_table): Likewise. - (__deregister_frame_info): Likewise. - -Thu Aug 27 15:14:18 1998 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (sched_analyze_insn): Fix thinko in last change. - -Thu Aug 27 16:34:51 1998 J"orn Rennecke - - * loop.c (check_dbra_loop): Enable code for reversal - of some loops without a known constant loop end. - -Wed Aug 26 18:38:15 1998 Richard Henderson - - * haifa-sched.c (last_clock_var): New. - (schedule_block): Initialize it. - (schedule_insn): Use it to fill insn modes with issue information. - - * alpha.c (alpha_handle_trap_shadows): Remove do-nothing exit. - Tag trapb and next insn with TImode. - (alphaev5_insn_pipe, alphaev5_next_group, alphaev5_align_insns): New. - (alpha_reorg): Add conditional for alpha_handle_trap_shadows. - Invoke alphaev5_align_insns as appropriate. - * alpha.h (LABEL_ALIGN_AFTER_BARRIER): Was ALIGN_LABEL_AFTER_BARRIER. - (MD_SCHED_VARIABLE_ISSUE): New. - * alpha.md (attr type): Add multi. - (define_asm_attributes): New. - (prologue_stack_probe_loop, builtin_setjmp_receiver): Set type multi. - (arg_home): Likewise. - (fnop, unop, realign): New. - -Wed Aug 26 15:55:41 1998 Jim Wilson - - * iris5.h (PREFERRED_DEBUGGING_TYPE): Undef. - * iris5gas.h (PREFERRED_DEBUGGING_TYPE): Define. - - * configure.in (powerpc-ibm-aix4.[12]*): Change from 4.[12].*. - (rs6000-ibm-aix4.[12]*): Likewise. - * configure: Regenerate. - -Wed Aug 26 09:30:59 1998 Nick Clifton - - * config/arm/thumb.c (thumb_exit): Do not move a4 into lr if it - already contains the return address. - -Wed Aug 26 12:57:09 1998 Jeffrey A Law (law@cygnus.com) - - * calls.c (expand_call): Use bitfield instructions to extract/deposit - word sized hunks when loading unaligned args into registers. - - * haifa-sched.c (sched_analyze_insn): Only create scheduling - barriers for LOOP, EH and SETJMP notes on the loop_notes list. - - * mn10300.h (RTX_COSTS): Handle UDIV and UMOD too. - -Wed Aug 26 16:35:37 1998 J"orn Rennecke - - * loop.c (check_dbra_loop): Add some code that would allow reversal - of some loops without a known constant loop end if it were enabled. - -Wed Aug 26 11:08:44 1998 Gavin Romig-Koch - - * mips.md (lshrsi3_internal2+2): Fix type-o. - -Wed Aug 26 10:53:03 1998 Kaveh R. Ghazi - - * system.h: Include stdarg.h/varargs.h, make sure they are ordered - correctly with regards to stdio.h. - - * calls.c: Remove stdarg.h/varargs.h. - * cccp.c: Likewise. - * cexp.y: Likewise. - * combine.c: Likewise. - * cpperror.c: Likewise. - * cpplib.c: Likewise. - * cpplib.h: Likewise. - * doprint.c: Likewise. - * emit-rtl.c: Likewise. - * final.c: Likewise. - * fix-header.c: Likewise. - * gcc.c: Likewise. - * genattr.c: Likewise. - * genattrtab.c: Likewise. - * gencodes.c: Likewise. - * genconfig.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * genflags.c: Likewise. - * genopinit.c: Likewise. - * genoutput.c: Likewise. - * genpeep.c: Likewise. - * genrecog.c: Likewise. - * mips-tfile.c: Likewise. - * prefix.c: Likewise. - * protoize.c: Likewise. - * regmove.c: Likewise. - * toplev.c: Likewise. - * tree.c: Likewise. - -Wed Aug 26 05:09:27 1998 Jakub Jelinek - - * config/sparc/sparc.c (sparc_override_options): If not - TARGET_FPU, turn off TARGET_VIS. - * config/sparc/sparc.h (TARGET_SWITCHES): Add no-vis. - (LEGITIMATE_CONSTANT_P): Allow SF/DF mode zero when TARGET_VIS. - * config/sparc/sparc.md (movsi_insn): Use fzeros not fzero. - (movdi_insn_sp64): Add VIS fzero alternative. - (clear_sf, clear_df): New VIS patterns. - (movsf, movdf expanders): Allow fp_zero_operand flat out when - TARGET_VIS. - (one_cmpldi2_sp64): Provide new fnot1 VIS alternative. - -Tue Aug 25 10:57:41 1998 Mark Mitchell - - * loop.c (n_times_set, n_times_used, may_not_optimize, - reg_single_usage): Convert to varrays. All uses changed. - (insert_loop_mem): Return a value. - (scan_loop): Tweak AVOID_CC_MODE_COPIES code. - (load_mems_and_recount_loop_regs_set): Likewise. Grow the arrays, if - necessary. - -Tue Aug 25 23:57:12 1998 Jeffrey A Law (law@cygnus.com) - - * From Alexandre: - * configure.in: Do not set thread_file to "irix" since no such - support exists yet. - - * sparc.md (float abs/neg splits): Check reload_completed before - calling alter_subreg. - -Tue Aug 25 19:17:59 1998 David S. Miller - - * config/sparc/sparc.c (sparc_absnegfloat_split_legitimate): New - function. - * config/sparc/sparc.h: Declare it. - * config/sparc/sparc.md (float abs/neg splits): Use it. - (all other splits): Handle SUBREGs properly where necessary. - (unnamed (1< - - * config/v850/v850.c (movsi_source_operand): Treat CONSTANT_P_RTX - as an ordinary operand. - -Tue Aug 25 12:54:57 1998 Jason Merrill - - * tree.c (valid_machine_attribute): Don't apply attributes to both - decl and type. - -Tue Aug 25 12:23:20 1998 Richard Henderson - - * reload.c (operands_match_p): Handle rtvecs. - - * i386.c (legitimate_pic_address_disp_p): New. - (legitimate_address_p): Use it. - (legitimize_pic_address): Use unspecs to represent @GOT and @GOTOFF. - Handle constant pool symbols just like statics. - (emit_pic_move): Use Pmode not SImode for clarity. - (output_pic_addr_const) [SYMBOL_REF]: Remove @GOT and @GOTOFF hacks. - [UNSPEC]: New, handling what we killed above. - [PLUS]: Detect and abort on invalid symbol arithmetic. - * i386.h (CONSTANT_ADDRESS_P): Remove HIGH. - -Tue Aug 25 12:02:23 1998 Mark Mitchell - - * alias.c: Include output.h. - (DIFFERENT_ALIAS_SETS_P): Don't treat alias sets as - different if we're in a varargs function. - * Makefile.in (alias.o): Depend on output.h - -Tue Aug 25 19:20:12 1998 J"orn Rennecke - - * sh.h (GIV_SORT_CRITERION): Delete. - -Tue Aug 25 13:19:46 1998 Dave Brolley - - * regclass.c (regclass): Use xmalloc/free instead of alloca. - * stupid.c (stupid_life_analysis): Likewise. - * reload1.c (reload): Likewise. - -Tue Aug 25 05:48:18 1998 Jakub Jelinek - - * config/sparc/sparc.c (arith_4096_operand, arith_add_operand, - arith_double_4096_operand, arith_double_add_operand): New - predicates. - * config/sparc/sparc.h (PREDICATE_CODES): Add them, declare them. - * config/sparc/sparc.md (adddi3, addsi3, subdi3, subsi3): Use - them to transform add/sub 4096 into add/sub -4096. - -Mon Aug 24 23:31:03 1998 David S. Miller - - * loop.c (scan_loop): Allocate some slop to handle pseudos - generated by move_movables. - (load_mems_and_recount_loop_regs_set): Honor AVOID_CC_MODE_COPIES - here too. - -Mon Aug 24 19:45:40 1998 Jim Wilson - - * tree.def (DECL_RESULT): Correct documentation. - -Tue Aug 25 01:15:27 1998 J"orn Rennecke - - * reload1.c (reload_reg_free_before_p): New argument EQUIV; Changed - all callers. Abort for RELOAD_FOR_INSN. RELOAD_FOR_OUTADDR_ADDR: - conflicts will all RELOAD_FOR_OUTPUT reloads. - - * reload1.c (reload_cse_regs_1): When deleting a no-op move that - loads the function result, substitute with a USE. - -Mon Aug 24 15:20:19 1998 David Edelsohn - - * rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Use TARGET_POWERPC64 - when testing LEGITIMATE_INDEXED_ADDRESS_P DFmode and DImode. - (LEGITIMIZE_ADDRESS): Use TARGET_POWERPC64 for INDEXED fixup. - * rs6000.c (print_operand, case 'L'): Add UNITS_PER_WORD, not 4. - (print_operand, cases 'O' and 'T'): Fix typos in lossage strings. - * rs6000.md (fix_truncdfsi2_store): Remove %w from non-CONST_INT - operand. - (movdf_softfloat32, movdf_hardfloat64, movdf_softfloat64): Change - 'o' to 'm' for GPR variant constraints. - -Mon Aug 24 10:25:46 1998 Jeffrey A Law (law@cygnus.com) - - * loop.c (scan_loop): Honor AVOID_CC_MODE_COPIES. - - * h8300.h (STRIP_NAME_ENCODING): Fix typo. - - * sparc.md (TFmode splits): Use reg_overlap_mentioned_p to detect - when the source and destination overlap. - - * stmt.c (emit_case_nodes): Change rtx_function to rtx_fn to avoid - clash with global type. - -Mon Aug 24 00:53:53 1998 Jason Merrill - - * fixinc.irix: Add curses.h handling from fixinc.wrap. - - * c-common.c (combine_strings): Also set TREE_READONLY. - Change warn_write_strings to flag_const_strings. - * c-decl.c, c-tree.h: Likewise. - -Sun Aug 23 18:39:11 1998 David S. Miller - - * config/sparc/sparc.c (sparc_emit_set_const32): If outputting a - CONST_INT, not a symbolic reference, don't use a HIGH/LO_SUM - sequence, use SET/IOR instead so CSE can see it. - * config/sparc/sparc.md (movhi_const64_special, - movsi_const64_special): New patterns necessitated by that change. - (movhi_high): Remove. - (movhi_lo_sum): Change to match an IOR. - (movdf_insn_sp32): Test TARGET_V9 not TARGET_ARCH64. - (movdf_insn_v9only): New pattern for when V9 but not ARCH64. - (movdf_insn_sp64): Test both TARGET_V9 and TARGET_ARCH64. - (movdf splits): Allow when not V9 or when not ARCH64 and integer - registers are involved. - (snesi_zero_extend split): Remove reload_completed test. - (unnamed plus and minus zero_extend sidi splits): Add it. - -Sun Aug 23 11:56:08 1998 Mark Mitchell - - * extend.texi: Remove description of extension to explicit - instantiation that is now endorsed by standard C++. - -Sun Aug 23 09:39:09 1998 David S. Miller - - * config/arc/arc.c (arc_initialize_pic): Remove. - * config/arc/arc.h (INITIALIZE_PIC): Similarly, this routine does - nothing on any platform and is invoked by no-one, it does not even - appear in the documentation. - * config/sparc/sparc.h (INITIALIZE_PIC): Likewise. - * config/sparc/sparc.c (initialize_pic): Likewise. - (find_addr_reg): Remove this as well, no longer referenced after - my rewrite. - -Sun Aug 23 00:17:14 1998 Jeffrey A Law (law@cygnus.com) - - * recog.c (validate_replace_rtx_group): New function. - * recog.h (validate_replace_rtx_group): Declare it. - * regmove.c (optimize_reg_copy_3): If any substitution fails, then undo - the entire group of substitutions. - -Sat Aug 22 23:31:00 1998 Klaus-Georg Adams (Klaus-Georg.Adams@chemie.uni-karlsruhe.de) - - * loop.c (load_mems): Fix initializers. - -Fri Aug 21 23:07:46 1998 David S. Miller - - * config/sparc/sparc.md (TFmode splits): Handle destination - registers being referenced in the address correctly. - - * expmed.c (make_tree) [CONST_INT]: Sign extend even if - TREE_UNSIGNED, when bitsize of type's mode is larger than - HOST_BITS_PER_WIDE_INT. - -Fri Aug 21 19:31:31 1998 Alexandre Petit-Bianco - - * tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR): New tree nodes. - * tree.h (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, - EXIT_BLOCK_LABELED_BLOCK, EXIT_BLOCK_RETURN, LOOP_EXPR_BODY): New - macros. - * expr.c (expand_expr): Handle LABELED_BLOCK_EXPR and - EXIT_BLOCK_EXPR. - -Thu Aug 20 19:43:44 1998 Jeffrey A Law (law@cygnus.com) - - * h8300.c (h8300_encode_label): Use '&' for tiny data items. - * h8300.h (TINY_DATA_NAME_P): Likewise. - (STRIP_NAME_ENCODING): Handle '&'. - - * mn10200.h (REG_OK_FOR_INDEX_P): Do not check the mode of the - register (it could be accessed via an outer SUBREG). - (REG_OK_FOR_BASE_P): Likewise. - (GO_IF_LEGITIMATE_ADDRESS): Consistently use REGNO_OK_FOR_BASE_P. - - * remove.c (optimize_reg_copy_3): Abort instead of silently generating - bogus rtl. - - * jump.c (rtx_renumbered_equal_p): Do not consider PLUS commutative. - -Thu Aug 20 17:35:20 1998 David S. Miller - - * config/sparc/sparc.md (movtf_insn_sp32): All memory operands - must be offsettable so the splits can be made. - -Thu Aug 20 13:56:53 1998 Michael Meissner - - * config/i386/winnt.c: Include system.h, not stdio.h to get - sys/param.h pulled in before rtl.h in case the system defines MIN - and MAX. - -Thu Aug 20 13:44:20 1998 David Edelsohn - - * rs6000.md (movqi, movhi): Add CONSTANT_P_RTX. - -Thu Aug 20 13:15:11 1998 Dave Brolley - - * stor-layout.c (layout_type): Compute TYPE_SIZE_UNIT correctly for - arrays of bits. - * cpplib.c (cpp_define): Handle macros with parameters. - -Wed Aug 19 21:33:19 1998 David Edelsohn - - * rs6000.c (rs6000_output_load_toc_table): Use ld for 64-bit. - (output_toc): Use single TOC slot or llong minimal-toc for DFmode - and DImode 64-bit. Use llong for minimal-toc SFmode and - SYMBOL_REF / LABEL_REF 64-bit. - (output_function_profiler): Use llong for profiler label and ld to - load 64-bit label address. - -Wed Aug 19 17:52:27 1998 Nick Clifton (nickc@cygnus.com) - - * config/arm/thumb.md (extendqisi2_insn): Cope with REG + - OFFSET addressing. - -Wed Aug 19 14:13:31 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Wed Aug 19 13:10:30 1998 Jeff Law (law@cygnus.com) - - * version.c: Bump for snapshot. - -Wed Aug 19 13:06:47 1998 Jason Merrill - - * collect2.c (extract_init_priority): Use atoi instead of strtoul. - -Wed Aug 19 13:51:35 1998 Hans-Peter Nilsson - - * tm.texi (Misc): Fix typo "teh". - - * tm.texi (PIC): Fix typo "PPIC". - - * tm.texi (Caller Saves): Say that DEFAULT_CALLER_SAVES has no - effect when -O2 and higher. - * invoke.texi (Optimize Options): Likewise for -fcaller-saves. - -1998-08-19 Michael Hayes - - * regclass.c: Changed register set documentation to be consistent - with GCC behavior. - - * final.c (final_start_function): Removed redundant test for - call_fixed_regs. - -Wed Aug 19 13:28:41 1998 Mark Mitchell - - * rtl.h (rtx_function): New type. - (for_each_rtx): New function. - * rtlanal.c (for_each_rtx): Define it. - - * recog.c (change_t): New type. - (change_objects, change_old_codes, change_locs, change_olds): - Replace with ... - (changes): New variable. - (validate_change): Dynamically allocate room for more changes, if - necessary. Uses changes array instead of change_objects, etc. - (apply_change_group): Use changes array instead of - change_objects, etc. - - * loop.c (loop_mem_info): New type. - (loop_mems): New variable. - (loop_mems_idx): Likewise. - (looop_mems_allocated): Likewise. - (scan_loop): Remove nregs parameter. - (next_insn_in_loop): New function. - (load_mems_and_recount_loop_regs_set): Likewise. - (load_mems): Likewise. - (insert_loop_mem): Likewise. - (replace_loop_mem): Likewise. - (replace_label): Likewise. - (INSN_IN_RANGE_P): New macro. - (loop_optimize): Don't pass max_reg_num() to scan_loop. - (scan_loop): Remove nregs parameter, compute it after any new - registers are created by load_mems. Use INSN_IN_RANGE_P and - next_insn_in_loop rather than expanding them inline. Call - load_mems to load memory into pseudos, if appropriate. - (prescan_loop): Figure out whether or not there are jumps from the - loop to targets other than the label immediately following the - loop. Call insert_loop_mem to notice all the MEMs used in the - loop, if it could be safe to pull MEMs into REGs for the duration - of the loop. - (strength_reduce): Use next_insn_in_loop. Tweak comments. - -Wed Aug 19 08:29:44 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (arm_override_options): Remove lie about ignoring PIC flag. - -Wed Aug 19 07:08:15 1998 David S. Miller - - * config/sparc/sparc.c (finalize_pic): Check for the correct - nonlocal_goto_receiver UNSPEC number. - * config/sparc/sparc.md (nonlocal_goto_receiver): Add comment - making note of this dependency existing in sparc.c. - (negtf2_notv9 split): Give NEG SFmode. - (negsf2): Fix insn output string. - -Tue Aug 18 12:40:27 1998 Richard Henderson - - * c-common.c (decl_attributes): Issue an error if the argument - to alias is not a string. - -Tue Aug 18 10:33:30 1998 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (sched_analyze): Put all JUMP_INSNs on the last - pending memory flush list. - - * combine.c (can_combine_p): Allow combining insns with REG_RETVAL - notes. - (try_combine): Allow combining insns with REG_LIBCALL notes. - - * expr.c (emit_block_move): Do not call memcpy as a libcall - instead build up a CALL_EXPR and call it like any other - function. - (clear_storage): Similarly for memset. - - * regmove.c (fixup_match_2): Do not call reg_overlap_mentioned_p - on notes. - - * Makefile.in (cplus-dem.o): Provide explicit rules for building - cplus-dem.o. - - * regmove.c (optimize_reg_copy_1): Update REG_N_CALLS_CROSSED - and REG_LIVE_LENGTH as successful substitutions are made. - -Tue Aug 18 07:15:27 1998 Kaveh R. Ghazi - - * config/sparc/sparc.c (ultra_find_type): Add empty semicolon - statement after end of loop label. - -Tue Aug 18 07:13:27 1998 David S. Miller - - * config/sparc/sparc.c (ultra_types_avail): New variable. - (ultra_build_types_avail): New function to record mask of insn - types in ready list at this cycle. - (ultrasparc_sched_reorder): Call it. - (ultra_find_type): Use it to quicken the search. Also simplif - dependency check, don't use rtx_equal_p because we know exactly - what we are looking for. - -Tue Aug 18 03:20:53 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (SECONDARY_INPUT_RELOAD_CLASS): Return NO_REGS if compiling - for architecture v4. - -Mon Aug 17 21:26:38 1998 David S. Miller - - * config/sparc/sparc.md (sltu, sgeu): Don't FAIL, call - gen_compare_reg. - (movsf_const_intreg, movsf_const_high, movsf_const_lo, - movdf_const_intreg and helper splits): New patterns to move float - constants into integer registers. - (negtf2, negdf2, abstf2, absdf2): Rework using new patterns and - splits. - -Mon Aug 17 11:46:19 1998 Jeffrey A Law (law@cygnus.com) - - * From Graham - * tree.c (build_index_type): Copy TYPE_SIZE_UNIT from sizetype - to itype. - * c-decl.c (finish_enum): Copy TYPE_SIZ_UNIT from enumtype to tem. - - * rs6000.c (secondary_reload_class): For TARGET_ELF, indicate that - a BASE_REGS register is needed as an intermediate when copying - a symbolic value into any register class other than BASE_REGS. - - * expr.c (move_by_pieces): No longer static. Remove prototype. - * rtl.h (move_by_pieces): Add extern prototype. - * mips.c (expand_block_move): Handle aligned straight line copy by - calling move_by_pieces. - - * expr.c (expand_expr): Allow assignments from TImode PARM_DECLs - and VAR_DECLs. - -Mon Aug 17 10:28:52 1998 Mark Mitchell - - * stmt.c (expand_end_loop): Tidy. Allow unconditional - jumps out of the loop to be treated as part of the exit test. - -Mon Aug 17 10:06:11 1998 Kaveh R. Ghazi - Jeff Law - - * Makefile.in (cplus-dep.o): Use cplus-dem.c from libiberty. - * cplus-dem.c: Delete. - - * Makefile.in (fold-const.o): Depend on $(RTL_H). - - * fold-const.c: Include rtl.h to get the prototype for - `set_identifier_local_value'. - - * loop.c (express_from_1): Remove unused variable `tmp'. - (combine_givs): Cast the first argument of bzero to char *. - - * toplev.c (display_help): Remove unused variable `looking_for_start'. - - * c-decl.c (init_decl_processing): Remove unneeded &. - - * alpha.h (alpha_initialize_trampoline): Provide prototype. - - * except.c (set_exception_lang_code, set_exception_version_code): - Change parameter from `short' to `int' to avoid using a gcc - extension. - - * except.h (set_exception_lang_code, set_exception_version_code): - Likewise for prototypes. - - * flow.c (count_reg_references): Remove unused variables `regno' - and `i'. - - * gcse.c (hash_scan_insn): Declare parameter `in_libcall_block'. - - * prefix.c (translate_name): Cast the result of `alloca'. - - * varray.h (VARRAY_FREE): Reimplement as a `do-while(0)' statement. - -Mon Aug 17 09:23:42 1998 Andreas Schwab - - * config/m68k/m68k.c: Include "system.h" instead of . - Include "toplev.h". - (valid_dbcc_comparison_p): Mark mode argument as unused. - (symbolic_operand): Likewise. - (legitimize_pic_address): Likewise. - (const_uint32_operand): Likewise. - (const_sint32_operand): Likewise. - * sched.c [!INSN_SCHEDULING]: Define only dummy function - schedule_insns and comment out rest of file. - - * m68k.c (output_move_simode_const): Use subl to move a zero into an - address register. - (output_move_[hq]imode): Likewise. - -Mon Aug 17 09:15:47 1998 Jeffrey A Law (law@cygnus.com) - - * toplev.c (main): Enable -fstrict-aliasing for -O2 and above. - * invoke.texi: Corresponding changes. - -Mon Aug 17 02:03:55 1998 Richard Henderson - - * regclass.c (allocate_reg_info): Respect MIN when clearing data. - -Sun Aug 16 17:37:06 1998 David S. Miller - - * config/sparc/sparc.c (ultra_code_from_mask, - ultra_cmove_results_ready_p, ultra_fpmode_conflict_exists, - ultra_find_type, ultra_schedule_insn, ultra_flush_pipeline, - ultrasparc_sched_init, ultrasparc_variable_issue, - ultra_rescan_pipeline_state, ultrasparc_sched_reorder): New - functions to describe UltraSPARC pipeline exactly to Haifa. - (ultrasparc_adjust_cost): Indicate IMUL type insns have zero cost, - as there is nothing the scheduler can do about it. Indicate that - REG_DEP_OUTPUT's collide. Fixup formatting. - * config/sparc/sparc.h (RTX_COSTS): Fixup integer multiply and - divide costs on Ultra for DImode. - (MD_SCHED_INIT, MD_SCHED_REORDER, MD_SCHED_VARIABLE_ISSUE): - Define. - * config/sparc/sparc.md (ieu_unnamed function unit): Rename to - ieuN and add call_no_delay_slot to type list. - (cti function unit): New unit for branches on UltraSPARC. - (subx/addx insns): Set type to misc. - (sidi zero/sign extension insns on arch64): Set type to shift. - (sign_extendhidi2_insn): Set type to sload. - -Sun Aug 16 13:52:00 1998 David Edelsohn - - * rs6000.c (rs6000_stack_info): Use if == 0 for sizes. - (output_epilog): Use if != 0 for offset. - (rs6000_fatal_bad_address): Prepare for Intl. - * rs6000.h (rs6000_fatal_bad_address): Declare. - * rs6000.md (movsfcc, movdfcc): Use else if. - (elf_high): Use {liu|lis}. - (elf_low): Use {cal|la}. Remove %a template from old mnemonics. - (movsi): Use rs6000_fatal_bad_address. - -Sun Aug 16 01:53:21 1998 Richard Henderson - - * reload.c (find_equiv_reg): Reject equivalences separated - by a volatile instruction. - -Sun Aug 16 00:21:44 1998 Franz Sirl - - * rs6000/linux.h (CPP_OS_DEFAULT_SPEC): Define. - -Sat Aug 15 20:51:35 1998 Richard Henderson - - * alpha.md (movsicc): Fix mode mismatch. - -Sat Aug 15 20:22:33 1998 H.J. Lu (hjl@gnu.org) - - * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Handle aggregated - return type. - * config/alpha/win-nt.h (ASM_OUTPUT_MI_THUNK): Likewise. - -Sat Aug 15 08:39:49 1998 David S. Miller - - * config/sparc/sparc.md (movsi_lo_sum_pic_label_reg): Remove - write-only modifier from operand 1 constraint. - -Sat Aug 15 06:28:19 1998 David S. Miller - - * config/sparc/sparc.c (sparc_emit_set_const64_quick1): If - emitting a XOR of -1 at the end, emit a NOT instead for combine's - sake. - (sparc_emit_set_const64): Likewise, also when computing trailing - bits do not negate low_bits and make fast_int an int. - -Fri Aug 14 21:07:03 1998 Jeffrey A Law (law@cygnus.com) - - * loop.c (add_label_notes): Do not ignore references to labels - before dispatch tables. Mirrors Apr 8 change to mark_jump_label. - * gcse.c (add_label_notes): Similarly. - - * pa.h (ASM_OUTPUT_MI_THUNK): Strip name encoding. - - * m68k.md (adddi_dilshr32): One of the operands must be a register. - (adddi_dishl32): Similarly. - -Fri Aug 14 14:12:59 1998 Jason Merrill - - * i386.h (MODES_TIEABLE_P): Reorganize to shut up warnings. - * alias.c (memrefs_conflict_p): Add braces to shut up warnings. - * cse.c (cse_basic_block): Add parens to shut up warnings. - -Fri Aug 14 12:58:21 1998 David S. Miller - - * config/sparc/sparc.c (sparc_emit_set_const64_quick2, - sparc_emit_set_const64_longway, const64_is_2insns, - create_simple_focus_bits, sparc_emit_set_const64): Fix more bugs - in 64-bit constant formation. - * config/sparc/sparc.md (snesi_zero_extend split): Generate - rtl for addx not subx. - (define_insn movdi_const64_special): Make available even when - HOST_BITS_PER_WIDE_INT is not 64. - (movdi_lo_sum_sp64_cint, movdi_high_sp64_cint): Remove. - (losum_di_medlow, sethm, setlo): Make op2 symbolic_operand. - (cmp_siqi_trunc_set, cmp_diqi_trunc_set): Encapsulate both - instances of operand 1 inside a QI subreg. - (xordi3_sp64_dbl): Remove '%' constraint for op1. - (one_cmpldi2_sp64): Fix output string. - (one_cmplsi2_not_liveg0): Rewrite to remove unneeded extra - alternative case. - (unnamed arch64 ashift DI): Truncate shift count if greater than - 63, not 31. - -Fri Aug 14 21:52:53 1998 J"orn Rennecke - - * expr.c (store_expr): Don't optimize away load-store pair - when either source or destination have a side effect. - -Fri Aug 14 16:50:10 1998 John Carr - - * genrecog.c (add_to_sequence): Fatal error if the modes of the - operands of SET are incompatible. - - * alpha.md: Fix max and min patterns so modes of SET operands match. - -Fri Aug 14 12:22:55 1998 Ian Lance Taylor - - * configure.in: Avoid [[ by using test and changequote. - * configure: Rebuild. - -Fri Aug 14 01:22:31 1998 David S. Miller - - * rtl.def (CONSTANT_P_RTX): Fix typo in string name. - - * config/sparc/sparc.md (seqdi_special_trunc, snedi_special_trunc, - seqsi_special_extend, snesi_special_extend, snesi_zero_extend and - split, snedi_zero_trunc and split, seqsi_zero_extend and split, - seqdi_zero_trunc and split, pic_lo_sum_di, pic_sethi_di, - movdi_cc_sp64_trunc, movdi_cc_reg_sp64_trunc, addx_extend_sp32 and - split, addx_extend_sp64, subx_extend_sp64, subx_extend and split): - Fix mismatching modes in SET operands. - (conditional move patterns): Fix formatting. - (unnamed subx arch64 pattern): Remove duplicate insn. - -Fri Aug 14 00:34:34 1998 David S. Miller - - * config/sparc/sparc.c (const64_operand, const64_high_operand): - Get it right when HOST_BITS_PER_WIDE_INT is not 64. - (input_operand): Fixup test for what we accept for constant - integers. - (sparc_emit_set_const32, sparc_emit_set_symbolic_const64): Give - set VOIDmode. - (safe_constDI): Remove. - (sparc_emit_set_safe_HIGH64, gen_safe_SET64, gen_safe_OR64, - gen_safe_XOR64): New functions. - (sparc_emit_set_const64_quick1, sparc_emit_set_const64_quick2, - sparc_emit_set_const64_longway, sparc_emit_set_const64): Use - them. - * config/sparc/sparc.md (define_insn xordi3_sp64_dbl): Only make - available when HOST_BITS_PER_WIDE_INT is not 64. - (define_insn movdi_sp64_dbl, movdi_const64_special): Likewise and - move before movdi_insn_sp64 pattern. - (define_insn movdi_lo_sum_sp64_dbl, movdi_high_sp64_dbl): Remove. - (define_insn sethi_di_medlow, seth44, setm44, sethh): Use - symbolic_operand as predicate for second operand. - (DImode minus split on arch32, negsi2 expander, one_cmplsi2 - expander): Give set VOIDmode. - -Fri Aug 14 01:45:06 1998 Mumit Khan - - * i386/cygwin32 (DEFAULT_PCC_STRUCT_RETURN): Define. - -Fri Aug 14 01:40:21 1998 Geoffrey Keating - - * rs6000/linux.h (LINK_SPEC): Pass -G args to the linker. - -Fri Aug 14 01:23:23 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm/netbsd.h (TARGET_DEFAULT): Default includes software floating - point. - (CPP_FLOAT_DEFAULT_SPEC): Re-define accordingly. - -Fri Aug 14 01:19:08 1998 Robert Lipe - - * install.texi: Various SCO OpenServer tweaks. - -Thu Aug 13 20:14:40 1998 Jim Wilson - - * reload1.c (eliminate_regs_in_insn): Handle another case when - eliminating the frame pointer to the hard frame pointer. Add - missing ep->to_rtx check to one existing case. - - * mips/mips.md (movhi_internal2+2): Fix typo mem:SI -> mem:HI. - -Thu Aug 13 17:08:11 1998 Jason Merrill - - * tree.h: De-conditionalize init_priority code. - - * mips.h (NM_FLAGS): Change from -Bp to -Bn. - * collect2.c (NM_FLAGS): Change from -p to -n. - - * configure.in: Turn on collect2 for mipstx39-elf. - Handle use_collect2=no properly. - - * c-common.c: De-conditionalize init_priority code. - * collect2.c (extract_init_priority, sort_ids): New fns. - (main): Call sort_ids. - Move sequence_number to file scope. - - * configure.in: Handle --enable-init-priority. - * c-common.c (attrs): Add A_INIT_PRIORITY. - (init_attributes, decl_attributes): Likewise. - * tree.h (DEFAULT_INIT_PRIORITY, MAX_INIT_PRIORITY): New macros. - * tree.c (get_file_function_name_long): Split out... - (get_file_function_name): ...from here. - -Thu Aug 13 16:09:53 1998 Martin von Loewis - - * expr.c (safe_from_p): Change code to ERROR_MARK only when not - accessing nodes. - -Thu Aug 13 15:24:48 1998 Jason Merrill - - * toplev.c (display_help): Add braces to shut up warnings. - * tree.c (simple_cst_equal): Likewise. - - * fold-const.c (non_lvalue): Don't deal with null pointer - constants here. - (fold, case COMPOUND_EXPR): Wrap a constant 0 in a NOP_EXPR. - - * c-typeck.c (initializer_constant_valid_p): Allow conversion of 0 - of any size to a pointer. - -Thu Aug 13 12:53:13 1998 Jim Wilson - - * i386/winnt.c (i386_pe_asm_file_end): Check TREE_SYMBOL_REFERENCED. - -Wed Aug 12 17:25:18 1998 Jeffrey A Law (law@cygnus.com) - - * mn10300.c (REG_SAVE_BYTES): Only reserve space for registers - which will be saved. - * mn10300.md (prologue insn): Only save registers which need saving. - (epilogue insn): Similarly. - - * mn10300.c, mn10300.h, mn10300.md: Remove "global zero register" - optimizations. - -Wed Aug 12 12:39:16 1998 Gavin Romig-Koch - - * mips/mips.h (ENCODE_SECTION_INFO): Set SYMBOL_REF_FLAG for - VAR_DECL's in gp addressable sections. - -Tue Aug 11 23:02:31 1998 John Carr - - * sparc.c: Change return to ; return; in functions - returning void. - * sparc.md: Add empty semicolon statement after final label in - move expanders. - -Tue Aug 11 22:42:01 1998 David S. Miller - - * config/sparc/sparc.md (define_insn addx_extend): Rename to - addx_extend_sp64, only allow when TARGET_ARCH64. - (define_insn addx_extend_sp32 and split): Version that works when - not TARGET_ARCH64. - (define_insn subx_extend): Likewise. - (define_split adddi3 and subdi3 with zero extension): Fixup and - correct bugs when not TARGET_ARCH64. - -Tue Aug 11 16:04:34 1998 John Carr - - * except.c (set_exception_lang_code, set_exception_version_code): - Use prototype-style definition if __STDC__, to match declaration - in except.h. - - * genemit.c: Change FAIL and DONE macros not to use loops. - -Tue Aug 11 12:27:03 1998 Jim Wilson - - * dwarf2out.c (ASM_OUTPUT_DWARF_ADDR_CONST): Use - ASM_OUTPUT_DWARF2_ADDR_CONST if defined. - - * mips/mips.md (reload_outsi): Use M16_REG_P when TARGET_MIPS16. - -Tue Aug 11 18:12:53 1998 Dave Love - - * README.g77: Update from Craig. - -Tue Aug 11 04:46:01 1998 David S. Miller - - * config/sparc/sparc.c (sparc_emit_set_const32): INTVAL is of - type HOST_WIDE_INT. - (safe_constDI sparc_emit_set_const64_quick1, - sparc_emit_set_const64_quick2, sparc_emit_set_const64_longway, - analyze_64bit_constant, const64_is_2insns, - create_simple_focus_bits): Fix some bugs when compiled on real - 64-bit hosts. - (function_arg_record_value_3, function_arg_record_value_2, - function_arg_record_value): Add fully prototyped forward decls. - * config/sparc/sparc.md (define_insn cmpsi_insn_sp32): Rename back - to cmpsi_insn and use on both 64 and 32 bit targets. - (define_insn cmpsi_insn_sp64): Remove. - (define_expand zero_extendsidi2): Allow for 32-bit target too. - (define_insn zero_extendsidi2_insn): Rename to - zero_extendsidi2_insn_sp64. - (define_insn zero_extendsidi2_insn_sp32): New pattern and - associated forced split for it. - - * config/sparc/sparc.c (const64_operand, const64_high_operand): - New predicates. - * config/sparc/sparc.h: Declare them. - (PREDICATE_CODES): Add them. - * config/sparc/sparc.md (movdi_lo_sum_sp64_dbl, - movdi_high_sp64_dbl, xordi3_sp64_dbl): Use them. - -Mon Aug 10 22:57:24 1998 John Carr - - * config/sparc/sparc.md (define_insn jump): Output ba,pt not b,pt - in v9 case as the latter makes the Solaris assembler crash. - -Mon Aug 10 22:39:09 1998 David S. Miller - - * config/sparc/sparc.c (input_operand): Do not accept a LO_SUM MEM - for TFmode when !v9. We require offsettable memory addresses. - * config/sparc/sparc.h (ALTER_HARD_SUBREG): Handle TFmode to - DFmode register number conversions. - * config/sparc/sparc.md (define_split DFmode moves): If register - is a SUBREG do alter_subreg on it before using. - (define_expand movtf): Fixup comment about alignment on v9. - (define_split TFmode moves): Don't use gen_{high,low}part, create - explicit SUBREGs instead. - -Mon Aug 10 19:02:55 1998 John Carr - - * Makefile.in (mbchar.o): Depend on mbchar.c. - -Mon Aug 10 04:28:13 1998 David S. Miller - Richard Henderson - - Rewrite SPARC backend for better code generation and - improved sparc64 support. - * config/sparc/sp64-elf.h: Set JUMP_TABLES_IN_TEXT_SECTION to - zero. - * config/sparc/sysv4.h: Likewise. - * config/sparc/sparc.c (v8plus_regcmp_p, sparc_operand, - move_operand, v8plus_regcmp_op, emit_move_sequence, - singlemove_string, doublemove_string, mem_aligned_8, - output_move_double, output_move_quad, output_fp_move_double, - move_quad_direction, output_fp_move_quad, output_scc_insn): - Remove. - (small_int_or_double): New predicate. - (gen_compare_reg): Remove TARGET_V8PLUS cmpdi_v8plus emission. - (legitimize_pic_address): Emit movsi_{high,lo_sum}_pic instead of - old pic_{sethi,lo_sum}_si patterns. - (mem_min_alignment): New generic function to replace - mem_aligned_8, which uses REGNO_POINTER_ALIGN information when - available and can test for arbitrary alignments. All callers - changed. - (save_regs, restore_regs, build_big_number, - output_function_prologue, output_cbranch, output_return, - sparc_flat_save_restore, sparc_flat_output_function_prologue, - sparc_flat_output_function_epilogue): Prettify - insn output. - (output_function_epilogue): Likewise and add code to output - deferred case vectors. - (output_v9branch): Likewise, add new arg INSN and use it to tack - on branch prediction settings. All callers changed. - (print_operand): Likewise and output %l44 for LO_SUMs when - TARGET_CM_MEDMID. - (sparc_splitdi_legitimate): New function to make sure DImode - splits can be run properly when !arch64. - (sparc_initialize_trampoline, sparc64_initialize_trampoline): - Reformat example code in comments. - (set_extends): Remove UNSPEC/v8plus_clear_high case. - (sparc_addr_diff_list, sparc_addr_list): New statics to keep track - of deferred case vectors we need to output. - (sparc_defer_case_vector): Record a case vector. - (sparc_output_addr_vec, sparc_output_addr_diff_vec, - sparc_output_deferred_case_vectors): New functions to output them. - (sparc_emit_set_const32): New function to form 32-bit constants in - registers when that requires more than one instruction. - (safe_constDI, sparc_emit_set_const64_quick1, - sparc_emit_set_const64_quick2, sparc_emit_set_const64_longway, - analyze_64bit_constant, const64_is_2insns, - create_simple_focus_bits, sparc_emit_set_const64): New functions - which do the same for 64-bit constants when arch64. - (sparc_emit_set_symbolic_const64): New function to emit address - loading for all code models on v9. - * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Do not make - %g1 fixed when arch64, unfix %g0 when TARGET_LIVE_G0. - (ALTER_HARD_SUBREG): Fix thinko, return REGNO + 1 not 1. - (SECONDARY_INPUT_RELOAD_CLASS, SECONDARY_OUTPUT_RELOAD_CLASS): Fix - inaccuracies in comments, add symbolic and text_segment operands - when TARGET_CM_MEDANY and TARGET_CM_EMBMEDANY respectively. Use - GENERAL_REGS in these cases as a temp REG is needed to load these - addresses into a register properly. - (EXTRA_CONSTRAINT): Document more accurately, remove Q case as it - is no longer used. - (GO_IF_LEGITIMATE_ADDRESS): Allow TFmode for LO_SUM on v9 since fp - quads are guaranteed to have 16-byte alignment. - (LEGITIMIZE_ADDRESS): For SYMBOL_REF, CONST, and LABEL_REF use - copy_to_suggested_reg instead of explicit LO_SUM and HIGH. - (ASM_OUTPUT_ADDR_VEC, ASM_OUTPUT_ADDR_DIFF_VEC): New macros for - deferred case vector implementation. - (ASM_OUTPUT_ADDR_VEC_ELT): Use fputc to output newline. - (ASM_OUTPUT_ADDR_DIFF_ELT): Parenthesize LABEL in macro calls. - Generate "internal label - label" instead of "label - 1b". - (PRINT_OPERAND_ADDRESS): For LO_SUM use %l44 on TARGET_CM_MEDMID. - (PREDICATE_CODES): Remove sparc_operand, move_operand, - v8plus_regcmp_op. Add small_int_or_double, input_operand, and - zero_operand. - (doublemove_string, output_block_move, output_fp_move_double, - output_fp_move_quad, output_move_double, output_move_quad, - output_scc_insn, singlemove_string, mem_aligned_8, move_operand, - sparc_operand, v8plus_regcmp_op, v8plus_regcmp_p): Remove externs. - (sparc_emit_set_const32, sparc_emit_set_const64, - sparc_emit_set_symbolic_const64, input_operand, zero_operand, - mem_min_alignment, small_int_or_double): Add externs. - * config/sparc/sparc.md: Document the many uses of UNSPEC and - UNSPEC_VOLATILE in this backend. - (define_function_unit ieu): Rename to ieu_unnamed. Add move and - unary to types which execute in it. - (define_function_unit ieu_shift): Rename to ieu0. - (define_function_unit ieu1): New, executes compare, call, and - uncond_branch type insns. - (define_function_units for type fdivs, fdivd, fsqrt): These - execute in the fpu multiply unit not the adder on UltraSPARC. - (define_expand cmpdi): Disallow TARGET_V8PLUS. - (define_insn cmpsi_insn): Rename to cmpsi_insn_sp32. - (define_insn cmpsi_insn_sp64): New, same as sp32 variant except it - allows the arith_double_operand predicate and rHI constraint when - TARGET_ARCH64. - (define_insn cmpdi_sp64, cmpsf_fpe, cmpdf_fpe, cmptf_fpe, - cmpsf_fp, cmpdf_fp, cmptf_fp, sltu_insn, neg_sltu_insn, - neg_sltu_minux_x, neg_sltu_plus_x, sgeu_insn, neg_sgeu_insn, - sltu_plus_x, sltu_plus_x, sltu_plus_x_plus_y, x_minus_sltu, - sgeu_plus_x, x_minus_sgeu, movqi_cc_sp64, movhi_cc_sp64, - movsi_cc_sp64, movdi_cc_sp64, movsf_cc_sp64, movdf_cc_sp64, - movtf_cc_sp64, movqi_cc_reg_sp64, movhi_cc_reg_sp64, - movsi_cc_reg_sp64, movdi_cc_reg_sp64, movsf_cc_reg_sp64, - movdf_cc_reg_sp64, movtf_cc_reg_sp64, zero_extendhisi2_insn, - cmp_siqi_trunc, cmp_siqi_trunc_set, sign_extendhisi2_insn, - sign_extendqihi2_insn, sign_extendqisi2_insn, - sign_extendqidi2_insn, sign_extendhidi2_insn, - extendsfdf2, extendsftf2, extenddftf2, truncdfsf2, trunctfsf2, - trunctfdf2, floatsisf2, floatsidf2, floatsitf2, floatdisf2, - floatdidf2, floatditf2, fix_truncsfsi2, fix_truncdfsi2, - fix_trunctfsi2, fix_truncsfdi2, fix_truncdfdi2, fix_trunctfdi2, - adddi3_sp64, addsi3, cmp_ccx_plus, cmp_cc_plus_set, subdi_sp64, - subsi3, cmp_minus_ccx, cmp_minus_ccx_set, mulsi3, muldi3, - muldi3_v8plus, cmp_mul_set, mulsidi3, mulsidi3_v8plus, - const_mulsidi3_v8plus, mulsidi3_sp32, const_mulsidi3, - smulsi3_highpart_v8plus, unnamed subreg mult, - const_smulsi3_highpart_v8plus, smulsi3_highpart_sp32, - const_smulsi3_highpart, umulsidi3_v8plus, umulsidi3_sp32, - const_umulsidi3, const_umulsidi3_v8plus, umulsi3_highpart_v8plus, - const_umulsi3_highpart_v8plus, umulsi3_highpart_sp32, - const_umulsi3_highpart, divsi3, divdi3, cmp_sdiv_cc_set, udivsi3, - udivdi3, cmp_udiv_cc_set, smacsi, smacdi, umacdi, anddi3_sp64, - andsi3, and_not_di_sp64, and_not_si, iordi3_sp64, iorsi3, - or_not_di_sp64, or_not_si, xordi3_sp64, xorsi3, xor_not_di_sp64, - xor_not_si, cmp_cc_arith_op, cmp_ccx_arith_op, - cmp_cc_arith_op_set, cmp_ccx_arith_op_set, cmp_ccx_xor_not, - cmp_cc_xor_not_set, cmp_ccx_xor_not_set, cmp_cc_arith_op_not, - cmp_ccx_arith_op_not, cmp_cc_arith_op_not_set, - cmp_ccx_arith_op_not_set, negdi2_sp64, cmp_cc_neg, cmp_ccx_neg, - cmp_cc_set_neg, cmp_ccx_set_neg, one_cmpldi2_sp64, cmp_cc_not, - cmp_ccx_not, cmp_cc_set_not, cmp_ccx_set_not, addtf3, adddf3, - addsf3, subtf3, subdf3, subsf3, multf3, muldf3, mulsf3, - muldf3_extend, multf3_extend, divtf3, divdf3, divsf3, negtf2, - negdf2, negsf2, abstf2, absdf2, abssf2, sqrttf2, sqrtdf2, sqrtsf2, - ashlsi3, ashldi3, unnamed DI ashift, cmp_cc_ashift_1, - cmp_cc_set_ashift_1, ashrsi3, ashrdi3, unnamed DI ashiftrt, - ashrdi3_v8plus, lshrsi3, lshrdi3, unnamed DI lshiftrt, - lshrdi3_v8plus, tablejump_sp32, tablejump_sp64, call_address_sp32, - call_symbolic_sp32, call_address_sp64, call_symbolic_sp64, - call_address_struct_value_sp32, call_symbolic_struct_value_sp32, - call_address_untyped_struct_value_sp32, - call_symbolic_untyped_struct_value_sp32, call_value_address_sp32, - call_value_symbolic_sp32, call_value_address_sp64, - call_value_symbolic_sp64, branch_sp32, branch_sp64, - flush_register_windows, goto_handler_and_restore, - goto_handler_and_restore_v9, goto_handler_and_restore_v9_sp64, - flush, all ldd/std peepholes, return_qi, return_hi, return_si, - return_addsi, return_di, return_adddi, return_sf, all call+jump - peepholes, trap, unnamed trap insns): Prettify output strings. - (define_insn anddi3_sp32, and_not_di_sp32, iordi3_sp32, - or_not_di_sp32, xordi3_sp32, xor_not_di_sp32, one_cmpldi2): - Likewise and force + implement splits for integer cases. - (define_insn return_sf_no_fpu): Likewise and allow to match when - no-fpu because of our subreg SFmode splits. - (define_insn zero_extendqihi2, zero_extendqisi2_insn, - zero_extendqidi2_insn, zero_extendhidi2_insn, - zero_extendsidi2_insn, sign_extendsidi2_insn): Likewise and use - input_operand for second operand. - (cmp_minus_cc, cmp_minus_cc_set): Likewise and use - reg_or_0_operand for operand 2 so new splits can use it. - (cmp_zero_extendqisi2, cmp_zero_extendqisi2_set, cmp_cc_plus, - cmp_cc_xor_not): Likewise and don't forget to check TARGET_LIVE_G0 - too. - (cmp_zero_extract, cmp_zero_extract_sp64): Likewise and allow - CONST_DOUBLEs for operand 2. - (define_insn move_label_di): Likewise and label distance - optimization because it no longer works with new deferred case - vector scheme. To be revisited. - (define_insn x_minus_y_minus_sltu, x_minus_sltu_plus_y): Likewise - and allow reg_or_0_operand and J constraint for second operand. - (define_insn jump): Set branch predict taken on V9. - (define_insn tablejump): Emit LABEL_REF + PLUS memory address for - new deferred case vector scheme. - (define_insn pic_tablejump_32, pic_tablejump_64): Remove. - (define_insn negdi2_sp32): Force + implement splits. - (define_insn negsi2, one_cmplsi2): Rename to negsi2_not_liveg0 and - one_cmplsi2_not_liveg0 respectively, and create expander of original - names which emit special rtl for TARGET_LIVE_G0. - (define_insn cmpdi_v8plus, scc_si, scc_di): Remove. - (define_insn seq, sne, slt, sge, sle, sltu, sgeu): Don't do - gen_compare_reg, FAIL instead. - (define_insn sgtu, sleu): Likewise and check gen_s*() return - values when trying to reverse condition codes, if they FAIL then - do likewise. - (define_insn snesi_zero, neg_snesi_zero, snesi_zero_extend, - snedi_zero, neg_snedi_zero, snedi_zero_trunc, seqsi_zero, - neg_seqsi_zero, seqsi_zero_extend, seqdi_zero, neg_seqdi_zero, - seqdi_zero_trunc, x_plus_i_ne_0, x_minus_i_ne_0, x_plus_i_eq_0, - x_minus_i_eq_0): Add new splits to perform these multi-insn cases, - set output string to # to indicate they are mandatory splits. - (define_insn pic_lo_sum_si, pic_sethi_si, pic_lo_sum_di, - pic_sethi_di, move_pic_label_si): Remove. - (define_insn movsi_low_sum, movsi_high, movsi_lo_sum_pic, - movsi_high_pic, movsi_pic_label_reg): New patterns to take their - place. - (define_expand movsi_pic_label_ref, define_insn - movsi_high_pic_label_ref, movsi_lo_sum_pic_label_ref): New - expander and insns to handle PIC label references and deferred - case vectors. - (define_insn get_pc_via_rdpc): Comment out as it is no longer - used. - (define_expand movqi, movhi, movsi, movdi, movsf, movdf, movtf): - Rewrite to not use emit_move_sequence, make use of new constant - formation code, and new splits for all multi-insn cases. - (define_insn movqi_insn): Remove sethi case, it can never happen. - Use reg_or_zero_operand instead of const0_rtx explicit test, - use input_operand instead of move_operand for source, and use - general_operand now for dest. - (define_insn movhi_insn): Similar but leave sethi case. - (define_insn lo_sum_qi, store_qi, store_hi): Remove. - (define_insn sethi_hi lo_sum_hi): Rename to movhi_high and - movhi_lo_sum respectively, prettify output string. - (define_insn movsi_zero_liveg0): New pattern to put zero into a - register when needed on TARGET_LIVE_G0. - (define_insn movsi_insn): Use general_operand and input_operand - for dest and src respectively. Simplify applicability test. - Prettify output strings, and add clr alternative for J - constraint. - (define_insn movdi_sp32_v9, movdi_sp32, define_splits for - deprecated std and reg-reg DI moves): Remove and... - (define_insn movdi_insn_sp32, movdi_insn_sp64): Replace with new - implementation which uses forced splits for all non-single insn - cases. - (define_split DI move cases on !arch64): New splits to handle all - situations of 64-bit double register DImode on 32bit, and - unaligned registers and memory addresses for all subtargets. - (define_insn movsf_const_insn, movdf_const_insn, store_sf): - Remove. - (define_insn movsf_insn, movsf_no_f_insn): Use general_operand and - input_operand for dest and src respectively, prettify output - strings. - (define_insn movdf_insn, movdf_no_e_insn, store_df, - movtf_const_insn, movtf_insn, movtf_no_e_insn, store_tf): Remove - and... - (define_insn movdf_insn_sp32, movdf_no_e_insn_sp32, - movdf_insn_sp64, movdf_no_e_insn_sp64, movtf_insn, - movtf_no_e_insn_sp32, movtf_insn_hq_sp64, movtf_insn_sp64, - movtf_no_e_insn_sp64): Replace with new - implementation which uses forced splits for all non-single insn - cases. - (define_split DF move cases): New splits in similar vein to DI - move counterparts. - (define_insn sethi_di_medlow, sethi_di_medium_pic, - sethi_di_embmedany_data, sethi_di_embmedany_text, sethi_di_sp64, - movdi_sp64_insn): Remove old v9 code model and constant loading - support insns and.. - (define_insn pic_lo_sum_di, pic_sethi_di, - sethi_di_medlow_embmedany_pic, sethi_di_medlow, losum_di_medlow, - seth44, setm44, setl44, sethh, setlm, sethm, setlo, - embmedany_sethi, embmedany_losum, embmedany_brsum, - embmedany_textuhi, embmedany_texthi, embmedany_textulo, - embmedany_textlo, movdi_lo_sum_sp64_cint, movdi_lo_sum_sp64_dbl, - movdi_high_sp64_cint, movdi_high_sp64_dbl): Replace with new - scheme, using unspecs, secondary reloads, and one to one sparc - insn to rtl insn mapping for better scheduling and code gen. - (define_expand reload_indi, reload_outdi): Reload helpers for - MEDANY and EMBMEDANY symbol address loading cases which require a - temporary register. - (define_expand movsicc): Remove v8plus_regcmp cases. - (define_insn movdi_cc_sp64_trunc, movdi_cc_reg_sp64_trunc, - cmp_zero_extendqidi2, cmp_zero_extendqidi2_set, cmp_qidi_trunc, - cmp_diqi_trunc_set): New patterns used by some of the new scc - splits on arch64. - (define_insn xordi3_sp64_dbl): New pattern used for constant - formation when crossing from 32-bit targets. - (define_insn movsi_cc_reg_v8plus, v8plus_clear_high, and helper - split): Remove. - (define_insn addx, subx): Make visible and prettify. - (define_insn adddi3_insn_sp32): Likewise and force split. - (define_insn addx_extend, subx_extend, unnamed): New patterns for - 64bit scc split usage. - (define_insn unnamed plusDI zero_extend, unnamed minusDI - zero_extend, subdi3): Force and implement splits. - - * final.c (final_scan_insn): Don't output labels if target - specifies ASM_OUTPUT_ADDR_{DIFF}_VEC. Do these macro operations - instead. - - * reorg.c (dbr_schedule): When taking on BR_PRED notes at the end, - don't forget to walk inside SEQUENCESs too as these are what the - delay slot scheduler will create. - -Mon Aug 10 01:21:01 1998 Richard Henderson - - * alpha.md (extxl+1,+2): New patterns to work around - combine lossage. - -Sat Aug 8 19:20:22 1998 Gary Thomas (gdt@linuxppc.org) - - * rs6000.c (rs6000_allocate_stack_space): Fix typo which - caused bad assembly code to be generated. - -Sat Aug 8 18:53:28 1998 Jeffrey A Law (law@cygnus.com) - - * netbsd.h: Fix typo. - -Mon Aug 3 00:06:42 1998 Robert Lipe - - * config.sub: Fix typo. - -Sun Aug 2 22:39:08 1998 Hans-Peter Nilsson - - * invoke.texi (Environment Variables): Typo: Change "ascpects" - into "aspects". - (Running Protoize): Typo: Change "ther" into "other". - -Sun Aug 2 00:42:50 1998 Jeffrey A Law (law@cygnus.com) - - * i386/netbsd.h: Undo previous change to DWARF2_UNWIND_INFO. - * m68k/netbsd.h: Likewise. - * ns32k/netbsd.h: Likewise. - * sparc/netbsd.h: Likewise. - -Sat Aug 1 17:59:30 1998 Richard Henderson - - * ginclude/va-alpha.h (va_list): Use a typedef, not a define. - * ginclude/va-clipper.h (va_list): Likewise. - -Fri Jul 31 20:22:02 1998 Michael Meissner - - * rs6000.c (rs6000_override_options): If big endian and -Os, use - load/store multiple instructions unless user overrides. - -Fri Jul 31 17:08:59 1998 Jeffrey A Law (law@cygnus.com) - - * ns32k/netbsd.h: Fix typo. - -Fri Jul 31 10:23:55 1998 Doug Evans - - * m32r/m32r.h (ASM_OUTPUT_SOURCE_LINE): Always output line number - labels with .debugsym if no parallel insns. - -Thu Jul 30 19:15:53 1998 Richard Henderson - - * alpha.md (fp cmp): Replicate patterns for ALPHA_TP_INSN. - (fcmov): Remove ALPHA_TP_INSN patterns -- fcmov doesn't trap. - -Thu Jul 30 19:50:15 1998 David Edelsohn - - * rs6000/x-aix43 (AR_FOR_TARGET_FLAGS): Delete. - (AR_FOR_TARGET): Define. - -Thu Jul 30 12:29:12 1998 Mark Mitchell - - * dyn-string.h: New file. - * dyn-string.c: Likewise. - * Makefile.in (OBJS): Add dyn-string.o. - (dwarf2out.o): Add dyn-string.h dependency. - (dyn-string.o): List dependencies. - * dwarf2out.c: Include dyn-string.h. - (ASM_NAME_TO_STRING): Use dyn_string_append, rather than strcpy. - (addr_const_to_string): Take a dyn_string_t, not a char* as a - prototype. Use dyn_string_append rather than strcat, throughout. - (addr_to_string): Use dyn_string_t. - -Thu Jul 30 13:08:07 1998 Ken Raeburn - - Function entry/exit profiling instrumentation: - * expr.h (profile_function_entry_libfunc, - profile_function_exit_libfunc): Declare new variables. - * optabs.c: Define them here. - (init_optabs): Initialize them. - * tree.h (struct tree_decl): New flag - no_instrument_function_entry_exit. - (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT): New accessor macro. - * c-decl.c (duplicate_decls): Merge it. - * c-common.c (enum attrs): New value A_NO_INSTRUMENT_FUNCTION. - (init_attributes): Use it for "no_instrument_function". - (decl_attributes): Handle it, for functions that have not yet been - compiled. Set decl flag. - * flags.h (flag_instrument_function_entry_exit): Declare new - variable. - * toplev.c (flag_instrument_function_entry_exit): Define it here. - (f_options): New option "instrument-functions". - * function.h (struct function): New field instrument_entry_exit. - * function.c (current_function_instrument_entry_exit): New - variable. - (push_function_context_to, pop_function_context_from): Save and - restore. - (expand_function_start): Set current_ variable, maybe emit return - label and entry profile call. - (expand_function_end): Maybe emit exit profile call. - -Thu Jul 30 00:58:34 1998 Jeffrey A Law (law@cygnus.com) - - * i386.md (movqi): When optimizing a load of (const_int 1) into a - NON_QI_REG_P, pretend the register is SImode. - -Wed Jul 29 23:49:23 1998 Todd Vierling - - * configure.in: Use xm-netbsd.h as the NetBSD xm file (not xm-siglist). - Accept arm32 as arm, m68k4k as m68k, mipsle as mips-dec, and any - manufacturer id for ns32k. - * configure: Regenerated. - * config/netbsd.h: When using ASM_WEAKEN_LABEL, make it global too. - * config/t-netbsd: Don't compile libgcc1-test as the fns are in libc. - * config/i386/netbsd.h: Undefine DWARF2_UNWIND_INFO, not define as 0. - * config/m68k/netbsd.h: Same. - * config/ns32k/netbsd.h: Same. - * config/sparc/netbsd.h: Same. - -Wed Jul 29 22:39:21 1998 Jeffrey A Law (law@cygnus.com) - - * unroll.c (unroll_loop): Do not abort for an UNROLL_MODULO - or UNROLL_COMPLETELY loop that starts with a jump to its - exit code. - -Wed Jul 29 22:18:14 1998 David Edelsohn - - * rs6000/rs6000.md (absdi2 define_split): Swap operands of MINUS. - * rs6000/rs6000.c (mask64_operand): Use HOST_BITS_PER_WIDE_INT. - (print_operand, case 'B'): Don't fall through. - (print_operand, case 'S'): Correct mask begin/end computation. - Use HOST_BITS_PER_WIDE_INT. - * rs6000/rs6000.h (CPP_PREDEFINES): Define _LONG_LONG. - (CONDITIONAL_REGISTER_USAGE): GPR13 fixed if TARGET_64BIT. - * rs6000/aix41.h (CPP_PREDEFINES): Same. - * rs6000/aix43.h (CPP_PREDEFINES): Same. - -Wed Jul 29 11:47:10 1998 Nick Clifton - - * config/arm/thumb.md (extendqisi2_insn): Remove earlyclobber - constraint from second alternative. - -Tue Jul 28 23:29:04 1998 Jason Merrill - - * configure.in: Fix --without/--disable cases for local-prefix, - gxx-include-dir and checking. - -Tue Jul 28 22:01:23 1998 David S. Miller - - * configure.in (enable_haifa): Set by default for sparc64 too. - configure: Rebuilt. - -Tue Jul 28 23:29:04 1998 Jason Merrill - - * i386/cygwin32.h (VALID_MACHINE_TYPE_ATTRIBUTE): New macro. - * i386/winnt.c (associated_type): New fn. - (i386_pe_valid_type_attribute_p): New fn. - (i386_pe_check_vtable_importexport): Remove. - (i386_pe_dllexport_p): Use associated_type. - (i386_pe_dllimport_p): Likewise. - - From Antonio M. O. Neto : - * i386.c (i386_valid_type_attribute_p): Also accept - attributes for METHOD_TYPEs. - -Tue Jul 28 23:17:39 1998 Peter Gerwinski - - * tree.c (build_range_type): Copy TYPE_SIZE_UNIT. - -Tue Jul 28 22:31:12 1998 Craig Burley - - * gcc.c: Fix commentary describing %g, %u, %U, and %O. - - * gcc.c (do_spec_1): Fix handling of %g%O and %U%O to prevent - them from generating a new base name for each occurrence of - a specific suffix. - -1998-07-28 Vladimir N. Makarov - - * cse.c (cse_insn): Enable substitution inside libcall only for REG, - SUBREG, MEM. - * rtlanal.c (replace_rtx): Prohibit replaces in CONST_DOUBLE. - - * cplus-dem.c (type_kind_t): New type. - (demangle_template_value_parm): Add type_kind_t parameter. Rely - on this parameter, rather than demangling the type again. - (demangle_integral_value): Pass tk_integral. - (demangle_template_: Pass the value returned from do_type. - (do_type): Return a type_kind_t. Pass tk_integral to - demangle_template_value_parm for array bounds. - (demangle_fund_type): Likewise. - -Mon Jul 27 00:54:41 1998 Jason Merrill - - * tree.c (simple_cst_equal, case CONSTRUCTOR): OK if the elts are - identical. - -Mon Jul 27 22:18:36 1998 Jeffrey A Law (law@cygnus.com) - - * pa.c (move_operand): Accept CONSTANT_P_RTX. - -Mon Jul 27 17:18:52 1998 Dave Brolley - - * stor-layout.c (layout_type): Handle arrays of bits, for Chill. - - * expr.c (get_inner_reference): Handle zero-based, unsigned, array - index conversion. - -Mon Jul 27 14:51:33 1998 Jeffrey A Law (law@cygnus.com) - - * mn10300.h (DEBUGGER_AUTO_OFFSET): Define. - (DEBUGGER_ARG_OFFSET): Likewise. - - * mn10300.md (movsf): Remove last change. Not needed. - -Mon Jul 27 14:22:36 1998 Dave Brolley - - * c-lex.c (yylex): Fix boundary conditions in character literal and - string literal loops. - -Mon Jul 27 11:43:54 1998 Stan Cox - - * longlong.h (count_leading_zeros): SPARClite scan instruction was - being invoked incorrectly. - - * i386.c (ix86_prologue): Added SUBTARGET_PROLOGUE invocation. - * i386/cygwin32.h (STARTFILE_SPEC, LIB_SPEC, SUBTARGET_PROLOGUE): - Add -pg support. - * i386/win32.h: New file. Hybrid mingw32.h/cygwin32.h configuration. - * configure.in: Added i[34567]86-*-win32. - * config.sub: Likewise. - * configure: Rebuilt. - -Sun Jul 26 01:11:12 1998 H.J. Lu (hjl@gnu.org) - - * i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Return 0 when eliminating - the frame pointer and compiling PIC code and reload has not completed. - - * i386.c (output_to_reg): Add code to emulate non-popping DImode - case. - -Sun Jul 26 01:01:32 1998 Jeffrey A Law (law@cygnus.com) - - * regmove.c (regmove_optimize): Fix typo initializing regmove_bb_head. - -Sat Jul 25 23:29:23 1998 Gerald Pfeifer - - * Makefile.in (install-info): Only try to update the info - directory file if it exists in the first place. - -Fri Jul 24 18:58:37 1998 Klaus Espenlaub - - * rs6000.h (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Delete. - -Fri Jul 24 14:20:26 1998 Jeffrey A Law (law@cygnus.com) - - * mn10300.md (movqi, movhi, movsi, movsf): Correctly handle - CONST_DOUBLE source. - -Fri Jul 24 11:17:04 1998 Nick Clifton - - * config/arm/thumb.c (thumb_print_operand): Decode %_ in asm - strings as the insertion of USER_LABEL_PREFIX. - * config/arm/thumb.h (PRINT_OPERAND_PUNCT_VALID_P): Accept _ as a - valid code. - * config/arm/thumb.md: Use %_ as a prefix to gcc library function - calls. - -Thu Jul 23 18:53:20 1998 Jim Wilson - - * dbxout.c (dbxout_range_type): Only call dbxout_type_index for - already defined type. - -Thu Jul 23 13:49:41 1998 Jeffrey A Law (law@cygnus.com) - - * expr.c (check_max_integer_computation_mode): Allow conversions - of constant integers to MAX_INTEGER_COMPUTATION_MODE. - (expand_expr): Likewise. - -Thu Jul 23 11:12:06 1998 Alexandre Petit-Bianco - - * expr.c (expand_expr): Expand RETURN_EXPR. - -Thu Jul 23 11:00:29 1998 Jim Wilson - - * dwarf2out.c (dwarf2out_finish): Call stripattributes on TEXT_SECTION. - -Wed Jul 22 19:10:00 1998 Catherine Moore - - * dwarf2out.c (output_aranges): Call stripattributes - for TEXT_SECTION references. - (output_line_info): Likewise. - -Wed Jul 22 14:08:54 1998 David S. Miller - - * profile.c (branch_prob): Call allocate_reg_info after outputting - profile rtl in instrument_arcs. - -Wed Jul 22 12:47:49 1998 Jim Wilson - - * fixinc.irix (math.h): Install wrapper instead of copying. - -Wed Jul 22 12:37:14 1998 Alexandre Petit-Bianco - - * tree.def (EXPR_WITH_FILE_LOCATION): Defined as an 'e' expression - so WFL are expanded correctly when contained in a COMPOUND_EXPR. - * tree.h (EXPR_WFL_EMIT_LINE_NOTE): Change macro not to use - lang_flag_0. Added documentation in the flag table. - -Tue Jul 21 23:28:35 1998 Klaus Kaempf - - * cccp.c (do_include): Fix vax c style include handling. - -Tue Jul 21 13:28:19 1998 Jason Merrill - - * cplus-dem.c (do_type): Use demangle_template_value_parm for arrays. - -Sun Jul 12 01:27:05 1998 Jason Merrill - - * fold-const.c (non_lvalue): Don't deal with null pointer - constants here. - (fold, case COMPOUND_EXPR): Wrap a constant 0 in a NOP_EXPR. - -Tue Jul 21 15:49:31 1998 David Edelsohn - - * rs6000.h (PREDICATE_CODES): Add CONSTANT_P_RTX. - * rs6000.md (movsi, movdi): Add CONSTANT_P_RTX. - * rs6000.c (short_cint_operand): Add CONSTANT_P_RTX. - (u_short_cint_operand): Same. - (reg_or_cint_operand): Same. - (logical_operand): Same. - (input_operand): Same. - (reg_or_short_operand): Use u_short_cint_operand. - -Tue Jul 21 08:56:42 1998 Richard Henderson - - * alpha.md (fix_truncdfsi2, fix_truncsfsi2): Remove the define_expands, - but keep the insns and splits. Adjust so when the ultimate destination - is memory, use cvtql. - -Tue Jul 21 08:55:09 1998 Richard Henderson - - * flow.c (regno_uninitialized): Fixed regs are never uninitialized. - -Tue Jul 21 00:31:01 1998 Jeffrey A Law (law@cygnus.com) - - * gcc.c (do_spec): Call "error" not "warning". - - * configure.in: Fix minor problems with gas feature detection code. - * configure: Rebuilt. - - * gcc.c (do_spec): Issue a warning for '%[]' usage. - - * Undo this change. - * gcc.c: Delete %[spec] support. - (do_spec_1, case '('): Likewise. - (do_spec_1, case '['): Call error. - -Mon Jul 20 22:34:17 1998 Richard Henderson - - * alpha.h (CPP_SPEC): Tidy. Hook to cpp_cpu and cpp_subtarget. - (CPP_SUBTARGET_SPEC): Default to empty string. - (CPP_AM_*, CPP_IM_*, CPP_CPU_*, CPP_CPU_SPEC): New. - (EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): New. - * alpha/elf.h (LD_SPEC): Use %(elf_dynamic_linker). - * alpha/linux-elf.h (SUBTARGET_EXTRA_SPECS): New. - (LIB_SPEC): Tidy. - * alpha/linux.h (CPP_PREDEFINES): Tidy. - * alpha/netbsd-elf.h (SUBTARGET_EXTRA_SPECS): New. - * alpha/netbsd.h (CPP_PREDEFINES): Tidy. - * alpha/osf.h (CPP_PREDEFINES): Remove bits subsumed by CPP_CPU_SPEC. - * alpha/win-nt.h (CPP_PREDEFINES): Likewise. - * alpha/vsf.h (CPP_PREDEFINES): Likewise. - (CPP_SUBTARGET_SPEC): New. Do this instead of overriding CPP_SPEC. - * alpha/vxworks.h: Likewise. - -Mon Jul 20 22:51:57 1998 Ken Raeburn - - * mips.md (reload_outsi): Added missing REGNO call. - (smulsi3_highpart, umulsi3_highpart): Provide prototype for - function pointer. - (mul_acc_di, mul_acc_64bit_di): Don't use match_op_dup, use - another match_operator and compare the codes. - - * mips.h (MASK_DEBUG_E, MASK_DEBUG_I): Set to zero. - - * MIPS multiply pattern fixes: - * mips.h (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): - Add union classes for HI, LO, or HILO plus general registers. - (GENERATE_MADD): Deleted. - * mips.md (mulsi3_mult3): Don't disparage output-LO alternative. - Add TARGET_MAD to condition. - (mulsi3): Test HAVE_mulsi3_mult3, not specific flags. - (mul_acc_si): Expand GENERATE_MADD here; it's the only use. Use - "*d" for accumulator, to give preference to LO initially but not - during reload. - -Mon Jul 20 16:16:38 1998 Dave Brolley - - * configure.in (enable_c_mbchar): New configure option. - (extra_cpp_objs): Always available now. - - * cexp.y (mbchar.h): #include it. - (yylex): Handle Multibyte characters in character literals. - - * cccp.c (mbchar.h): #include it. - (main): Set character set based on LANG environment variable. - (rescan): Handle multibyte characters in comments. - (skip_if_group): See above. - (validate_else): See above. - (skip_to_end_of_comment): See above. - (macarg1): See above. - (discard_comments): See above. - (rescan): Handle multibyte characters in string and character literals. - (collect_expansion): See above. - (skip_quoted_string): See above. - (macroexpand): See above. - (macarg1): See above. - (discard_comments): See above. - (change_newlines): See above. - - * c-lex.c (mbchar.h): #include it. - (GET_ENVIRONMENT): New macro. - (init_lex): Set character set based on LANG environment variable. - (yylex): Handle multibyte characters in character literals. - (yylex): Handle multibyte characters in string literals. - - * Makefile.in (mbchar.o): New target. - (cccp$(exeext)): @extra_cpp_objs@ is always available. - (cppmain$(exeext)): @extra_cpp_objs@ is always available. - - * mbchar.[ch]: New files for multibyte character handling. - -Mon Jul 20 01:11:11 1998 David S. Miller - - * jump.c (jump_optimize): When simplifying noop moves and - PUSH_ROUNDING, fix thinko so we use same criterion for identifying - the PUSHes to rewrite in second loop as we did in the first. - -Sun Jul 19 08:23:53 1998 Kaveh R. Ghazi - - * cplus-dem.c (demangle_nested_args): Make function definition - static to match the prototype. - -Fri Jul 17 14:58:44 1998 Richard Henderson - - * alloca.c: Respect USE_C_ALLOCA. - * gencheck.c (xmalloc): Ignore __GNUC__ for definition. - * gengenrtl.c (xmalloc): Likewise. - -Fri Jul 17 14:18:14 1998 Richard Henderson - - * loop.h (struct induction): Add no_const_addval. - * loop.c (the_movables, reg_address_cost): New variables. - (init_loop): Init reg_address_cost. - (loop_optimize): Call end_alias_analysis. - (scan_loop): Init the_movables. - (record_giv): Init induction->no_const_addval. - (basic_induction_var) [PLUS]: Use rtx_equal_p instead of ==. - [REG]: Rearrange loop search test to catch more cases. - (general_induction_var): Return success not benefit; take an extra - argument for that. Change all callers. - (simplify_giv_expr) [PLUS]: Always combine invariants. Use sge_plus. - [MULT]: Use rtx_equal_p instead of ==. Combine simple invariants. - [default]: Search the_movables for additional combinations. - (sge_plus_constant, sge_plus): New functions. - (express_from_1): New function. - (express_from): Always define. Rewrite using express_from_1. - (combine_givs_p): Handle more cases. Ignore address cost. - (cmp_combine_givs_stats): New function. - (combine_givs_used_once, combine_givs_benefit_from): New functions. - (combine_givs): Rewrite to do best-fit combination. - - * fold-const.c (operand_equal_p): Handle RTL_EXPR. - (fold): Do a complete (A*C)+(B*C) association check. - -Fri Jul 17 11:21:55 1998 Jim Wilson - - * function.c (fixup_var_refs_insns): Handle CLOBBER of a CONCAT. - -Fri Jul 17 11:48:55 1998 Jeffrey A Law (law@cygnus.com) - - * mn10300.c (MODES_TIEABLE_P): Fix typo. - -Fri Jul 17 03:26:12 1998 Rihcard Earnshaw (rearnsha@arm.com) - - * tree.c (valid_machine_attribute): Only create a new type variant if - there is a decl to use it. - -Thu Jul 16 14:48:04 1998 Nick Clifton - - * gcc.c (do_spec_1): Cope with %g/%u/%U options which do not have - a suffix. - -Fri Jul 17 03:24:40 1998 Hans-Peter Nilsson - - * extend.texi (Explicit Reg Vars): Typo: change "may deleted" into "may - be deleted" - -Thu Jul 16 14:48:47 1998 Jeffrey A Law (law@cygnus.com) - - * mn10300.c (count_tst_insns): New arg oreg_countp. Callers changed. - Simplify tests for clearing an address register. - (expand_prologue): Corresponding changes. - - * mn10300.md (movXX patterns): Make sure the destination is an - ADDRESS_REG when substituting "zero_areg" for (const_int 0). - (logical patterns): Split into expanders + patterns. - (zero and sign extension patterns): Similarly. - (shift patterns): Similarly. - -Thu Jul 16 01:17:44 1998 Richard Henderson - - * loop.c (emit_iv_add_mult): Scan the entire insn list generated - for the sequence, recording base values. - -Wed Jul 15 10:49:55 1998 Richard Henderson - - * i386.h (CPP_CPU_SPEC): Remove -Asystem(unix). - -Tue Jul 14 14:15:30 1998 Nick Clifton - - * gcc.c: Remove ANSI-C ism from --help code. - - * toplev.c: Support --help with USE_CPPLIB. - -Tue Jul 14 14:46:08 1998 Jeffrey A Law (law@cygnus.com) - - * configure.in: Rework gas feature code to work with symlink based - source trees. - - * extend.texi: Clarify some issues related to local variables - assigned to explicit registers. - - * mn10300.md (mulsi): Turn into expander + pattern. - - * mn10300.md (movsi, movsf, movdi, movdf): Remove "x" from I -> a - alternative. - -Tue Jul 14 07:41:59 1998 Richard Earnshaw (rearnsha@arm.com) - - * arm/tcoff.h (USER_LABEL_PREFIX): Make it empty to match coff.h. - -Tue Jul 14 03:02:44 1998 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump again to distinguish mainline tree from the - egcs-1.1 branch. - -See ChangeLog.0 for earlier changes. - -Local Variables: -add-log-time-format: current-time-string -End: diff --git a/contrib/gcc/ChangeLog.10 b/contrib/gcc/ChangeLog.10 deleted file mode 100644 index b197c751..0000000 --- a/contrib/gcc/ChangeLog.10 +++ /dev/null @@ -1,16352 +0,0 @@ -2003-12-31 Richard Kenner - - * print-rtl.c (print_rtx): For hard register, write out register - number and register name instead of calling PRINT_REG. - * defaults.h (PRINT_REG): Deleted. - * config/i386/i386.c (print_reg): Remove handling of CODE of -1. - Move comments here from i386.h. - (print_operand, print_operand_address): Call print_reg directly. - * config/i386/i386.h (PRINT_REG): Deleted. - -2003-12-31 Roger Sayle - - * config/ia64/hpux.h (TARGET_OS_CPP_BUILTINS): Define - _INCLUDE_LONGLONG. - -2003-12-31 Zack Weinberg - - * gcc.c (init_spec): Add -lunwind to shared case too if - USE_LIBUNWIND_EXCEPTIONS. - -2003-12-31 Joseph S. Myers - - * doc/include/texinfo.tex: Update to version 2003-12-21.10. - * doc/gcc.texi, doc/gccint.texi: Don't set font for - @def... commands. - * doc/invoke.texi: Don't use empty @opindex. - -2003-12-31 Mark Mitchell - - * c-common.c (c_expand_expr): Remove code to return a value - different from that returned by expand_expr. - * expr.c (store_expr): Use the validity of a target MEM, rather - than checking DECL_RTL (exp), to figure out if a copy is - required. - -2003-12-31 Kazu Hirata - - * config/v850/lib1funcs.asm: Fix comment formatting. - * config/v850/v850.c: Likewise. - * config/v850/v850.h: Likewise. - * config/v850/v850.md: Likewise. - -2003-12-31 Kazu Hirata - - * config/i386/i386.md (*movqi_insv_2): Remove AND in the - set source. - -2003-12-31 Kazuhiro Inaoka - - * config.gcc: Added m32r-linux m32rle-elf and m32le-linux targets. - * doc/invoke.texi: Document -mflush-func, -mflush-trap options. - Also add documentation for -mdebug, -malign-loops, -missue-rate, - and -mbranch-cost options. - * config/m32r/t-linux: New file: m32r-linux support. - * config/m32r/xm-linux.h: Likewise. - * config/m32r/xm-m32r.h: Likewise. - * config/m32r/linux.h: Likewise. - * config/m32r/little.h: New file: Little endian code generation - support. - * config/m32r/m32r-protos.h (m32r_legitimize_pic_address, - m32r_legitimate_pic_operand_p, load_pic_register): Add - prototypes. - * config/m32r/m32r.c (m32r_init): Add options for cache-flush. - (addr24_operand): Changes for PIC code generation. - * config/m32r/m32r.h (LABEL_ALIGN): Define to calculate PNOP - length at labels. - (ASM_SPEC): Add PIC support. - (FUNCTION_PROFILER): New define. - (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Changed to support - trampoline. - (CONDITIONAL_REGISTER_USAGE, CONSTANT_ADDRESS_P, - LEGITIMIZE_ADDRESS, JUMP_TABLES_IN_TEXT_SECTION, - PIC_OFFSET_TABLE_REGNUM, FINALIZE_PIC, LEGITIMATE_PIC_OPERAND_P, - ASM_OUTPUT_ADDR_DIFF_ELT, CASE_VECTOR_MODE): Define for PIC. - (move_src_operand, m32r_compute_frame_size, m32r_expand_prologue, - m32r_finalize_pic): Changes for PIC and profile support. - (global_offset_table, load_pic_register, m32r_legitimate_pic_operand_p, - m32r_legitimize_pic_address): Add for PIC support. - (m32r_file_start): Changed for little-endian-target. - * config/m32r/m32r.md (mvqi, movhi, movsi, movdi, movsf, movdf, - tablejump, tablejump_insn, call, call_value, call_value_via_label): - Changes for PIC. - (pic_load_addr, get_pc, builtin_setjmp_receiver): Added for PIC. - (flush_icache): Changes for cache-flush trap. - -2003-12-30 Kazu Hirata - - * config/i386/i386.h: Remove an unnecessary #undef. - -2003-12-30 Roger Sayle - - * cppfiles.c (pch_open_file): Minor tweak to work-around native - HPPA compiler bug. - -2003-12-30 Kazu Hirata - - * config/rs6000/aix.h: Fix comment formatting. - * config/rs6000/rs6000-modes.def: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/rs6000/rs6000.h: Likewise. - * config/rs6000/rs6000.md: Likewise. - -2003-12-30 Kazu Hirata - - * config/i386/i386-protos.h: Remove prototype for - const_int_1_operand. - * config/i386/i386.c (const_int_1_operand): Remove. - * config/i386/i386.h (PREDICATE_CODES): Remove - const_int_1_operand. - * config/i386/i386.md: Replace all uses of const_int_1_operand - with const1_operand. - * config/i386/pentium.md: Likewise. - -2003-12-30 Geoffrey Keating - - * doc/tm.texi (PREFERRED_RELOAD_CLASS): Describe use of NO_REGS - with constants. - -2003-12-30 Mark Mitchell - - * stor-layout.c (layout_decl): Turn bitfields into ordinary - fields, even if they are the first field in a structure. - -2003-12-30 Roger Sayle - - * fold-const.c (fold) : Don't require strict type - equality, instead just prevent replacing a COND_EXPR of non-void - type by one of its operands of void type. - -2003-12-30 Andreas Schwab - - * doc/c-tree.texi: Fix @item vs. @itemx. - * doc/cpp.texi: Likewise. - * doc/install.texi: Likewise. - * doc/invoke.texi: Likewise. - -2003-12-30 Nathan Sidwell - - * builtins.c (expand_builtin_apply_args_1): Fix typo in previous - change. - -2003-12-30 Jan Hubicka - - PR target/11936 - * i386.h (CLASS_LIKELY_SPILLED_P): Return true for - FP_TOP_REG/FP_SECOND_REG. - -2003-12-30 Steven Bosscher - - Backport from tree-ssa (relevant changes only): - 2003-12-18 Zdenek Dvorak - - * et-forest.h (et_forest_create, et_forest_delete, - et_forest_add_node, et_forest_add_edge, et_forest_remove_node, - et_forest_remove_edge, et_forest_parent, - et_forest_common_ancestor, et_forest_node_value, - et_forest_enumerate_sons): Declarations removed. - (struct et_node): New. - (et_new_tree, et_free_tree, et_set_father, et_split, et_nca, - et_below): Declare. - * et-forest.c (struct et_forest_occurrence, struct et_forest, - struct et_forest_node): Removed. - (et_forest_create, et_forest_delete, - et_forest_add_node, et_forest_add_edge, et_forest_remove_node, - et_forest_remove_edge, et_forest_parent, - et_forest_common_ancestor, et_forest_node_value, - et_forest_enumerate_sons, splay, remove_all_occurrences, - find_leftmost_node, find_rightmost_node, calculate_value): Removed. - (struct et_occ): New. - (et_nodes, et_occurences): New. - (set_depth, set_depth_add, set_prev, set_next, et_recomp_min, - et_check_occ_sanity, et_check_sanity, et_check_tree_sanity, - record_path_before_1, record_path_before, check_path_after_1, - check_path_after, et_splay, et_new_occ, et_new_tree, - et_free_tree, et_set_father, et_split, et_nca, et_below): New. - * basic-block.h (struct basic_block_def): New field dom. - (struct dominance_info): Type removed. - (calculate_dominance_info, free_dominance_info, - nearest_common_dominator, set_immediate_dominator, - get_immediate_dominator, dominated_by_p, get_dominated_by, - add_to_dominance_info, delete_from_dominance_info, - recount_dominator, redirect_immediate_dominators, - iterate_fix_dominators, verify_dominators): Declarations - changed. - (enum dom_state): New. - (dom_computed): New variable. - (first_dom_son, next_dom_son): Declare. - * dominance.c (struct dominance_info): Removed. - (BB_NODE, SET_BB_NODE): Removed. - (calculate_dominance_info, free_dominance_info, - nearest_common_dominator, set_immediate_dominator, - get_immediate_dominator, dominated_by_p, get_dominated_by, - add_to_dominance_info, delete_from_dominance_info, - recount_dominator, redirect_immediate_dominators, - iterate_fix_dominators, verify_dominators, - debug_dominance_info): Work over new datastructure. Access - dominance datastructures through CFG. - (assign_dfs_numbers, compute_dom_fast_query, first_dom_son, - next_dom_son): New. - * bt-load.c (dom): Variable removed. - (augment_live_range, combine_btr_defs, migrate_btr_def, - migrate_btr_defs, branch_target_load_optimize): Updated for the - new interface for dominance information. - * cfg.c {exit_entry_blocks): Update initializer. - * cfglayout.c (copy_bbs): Removed loops argument. Updated for - the new interface for dominance information. - * cfglayout.h (copy_bbs): Declaration changed. - * cfgloop.c (flow_loop_pre_header_find, flow_loops_cfg_dump, - flow_loop_scan, canonicalize_loop_headers, flow_loops_find): Updated - for the new interface for dominance information. - (flow_loop_scan): Loops argument removed. - (flow_loops_free): Don't release dominators. - * cfgloop.h (struct cfg): Dom field removed. - (flow_loop_scan, loop_split_edge_with, simple_loop_p, - just_once_each_iteration_p, split_loop_bb): Declaration changed. - * cfgloopanal.c (simple_loop_exit_p, simple_increment, - just_once_each_iteration_p, simple_loop_p): Remove loops argument. - Updated for the new interface for dominance information. - * cfgloopmanip.c (remove_bbs, find_path, create_preheader, - split_loop_bb, loopify, duplicate_loop_to_header_edge, - force_single_succ_latches, loop_split_edge_with): Ditto. - * gcse.c (dominators): Variable removed. - (free_code_hoist_mem, compute_code_hoist_data, hoist_code): - Updated for the new interface for dominance information. - * ifcvt.c (post_dominators): Variable removed. - (mark_loop_exit_edges, merge_if_block, find_if_header, - find_cond_trap, find_if_case_1, find_if_case_2, if_convert): - Updated for the new interface for dominance information. - * loop-init.c (rtl_loop_optimizer_init, - rtl_loop_optimizer_finalize): Ditto. - * loop-unroll.c (decide_peel_simple, decide_peel_once_rolling, - decide_peel_completely, decide_unroll_stupid, - decide_unroll_constant_iterations, - decide_unroll_runtime_iterations): Loops argument removed. - Updated for the new interface for dominance information. - (unroll_and_peel_loops, peel_loops_completely, - unroll_loop_runtime_iterations): Updated for the new interface for - dominance information. - * loop-unswitch.c (may_unswitch_on_p, unswitch_loops, - unswitch_single_loop, unswitch_loop): Updated for the new - interface for dominance information. - * predict.c (process_note_predictions, process_note_prediction, - estimate_probability, note_prediction_to_br_prob): Ditto. - * sched-rgn.c (find_rgns, init_regions): Ditto. - * toplev.c (rest_of_handle_branch_prob): Free the dominators. - -2003-12-30 Jan Hubicka - - PR target/13456 - * i386.md (allocate_stack_worker): Use different pattern for pre and - post reload expansion. - (allocate_stack_worker_1, allocate_stack_worker_rex64): Use - match_scratch. - (allocate_stack_worder_1_postreload, - allocate_stack_worker_rex64_postreload): New. - -2003-12-29 Nathan Sidwell - - * builtins.c (expand_builtin_apply_args_1): Add pretend args size - to the virtual incoming args pointer for downward stacks. - -2003-12-29 Roger Sayle - - PR fortran/12632 - * fold-const.c (fold) : Don't fold a constant condition, - if the type of the selected branch doesn't match its' parent. - -2003-12-29 Jan Hubicka - - * coverage.c (read_counts_file): Better error messages; cause corrupted - profiles to produce hard errors, not just warnings - (get_coverage_counts): Similarly. - - * toplev.c (rest_of_handle_loop_optimize): Enable LOOP_AUTO_UNROLL. - -2003-12-29 Phil Edwards - - * doc/cppopts.texi: Use of -idirafter, -iprefix, -iwithprefix, and - -iwithprefixbefore is not discouraged. - -2003-12-28 Mostafa Hagog - - * sbitmap.c (sbitmap_union_of_diff_cg, sbitmap_a_and_b_cg, - sbitmap_a_xor_b_cg): Accumulate "changed" properly. - (sbitmap_not): Zero all bits past n_bit. - -2003-12-27 Zdenek Dvorak - - PR opt/13159 - * cfgloopanal.c (mark_irreducible_loops): Fix the strongly connected - components detection. - * loop-unswitch.c (unswitch_loop): Preserve simple preheaders. - -2003-12-27 Bernardo Innocenti - - * config/m68k/uclinux.h (LIB_SPEC): Add elf2flt magic required for - correct linking of executables using id-based shared libraries. - -2003-12-27 Kazu Hirata - - * config/i386/i386-interix.h: Remove uses of "register" - specifier in declarations of arguments and local variables. - * config/i386/i386.c: Likewise. - * config/i386/i386elf.h: Likewise. - * config/i386/ptx4-i.h: Likewise. - * config/i386/sysv4.h: Likewise. - -2003-12-26 Fariborz Jahanian - Geoffrey Keating - David Edelsohn - - * config/rs6000/rs6000.c (legitimate_offset_address_p): Do not - restrict DFmode and TFmode to word alignment. - * config/rs6000/rs6000.md (movdf_hardfloat64): Use 'o' constraint - for ld/std and order before mr. - -2003-12-26 Andrew Pinski - - * config/darwin.h (LINK_COMMAND_SPEC): Arrange - -fprofile-generate to imply -lgcov. - -2003-12-26 Kazu Hirata - - * config/h8300/h8300.md (ldm_h8300s_2_normal): Use HImode for - addresses. - -2003-12-25 Kazu Hirata - - * config/m32r/m32r.md: Remove a constraint from a splitter. - -2003-12-25 Andrew Pinski - - PR C++/13429, C/11944 - * c-common.c (c_build_qualified_type): Return early when type is - error_mark_node. - (c_apply_type_quals_to_decl): Likewise. - -2003-12-25 Kazu Hirata - - * config/alpha/alpha-modes.def: Fix comment formatting. - * config/alpha/alpha.c: Likewise. - * config/alpha/alpha.h: Likewise. - * config/alpha/elf.h: Likewise. - * config/alpha/lib1funcs.asm: Likewise. - * config/alpha/openbsd.h: Likewise. - * config/alpha/vms-cc.c: Likewise. - * config/alpha/vms-crt0-64.c: Likewise. - * config/alpha/vms-crt0.c: Likewise. - * config/alpha/vms-ld.c: Likewise. - * config/alpha/vms-psxcrt0-64.c: Likewise. - * config/alpha/vms-psxcrt0.c: Likewise. - * config/alpha/vms.h: Likewise. - * config/arc/arc.c: Likewise. - * config/arm/aof.h: Likewise. - * config/arm/arm-modes.def: Likewise. - * config/arm/arm.c: Likewise. - * config/arm/arm.h: Likewise. - * config/arm/arm.md: Likewise. - * config/arm/linux-elf.h: Likewise. - * config/arm/vxworks.h: Likewise. - * config/avr/avr.c: Likewise. - * config/avr/avr.h: Likewise. - -2003-12-24 Kazu Hirata - - * config/xtensa/elf.h: Fix comment formatting. - * config/xtensa/xtensa-protos.h: Likewise. - * config/xtensa/xtensa.c: Likewise. - * config/xtensa/xtensa.h: Likewise. - -2003-12-24 Kazu Hirata - - * config/avr/avr.c: Fix comment formatting. - * config/avr/avr.md: Likewise. - -2003-12-24 Kazu Hirata - - PR target/12721. - * config/avr/avr.c: Include ggc.h. - (tmp_reg_rtx): Declare with GTY. - (zero_reg_rtx): Likewise. - (ldi_reg_rtx): Remove. - (avr_override_options): Initialize zero_reg_rtx and - ldi_reg_rtx. - (avr_init): Remove. - Include gt-avr.h. - * config/avr/avr.h (LDI_REG_REGNO): Remove. - Remove externs for tmp_reg_rtx, zero_reg_rtx, and ldi_reg_rtx. - -2003-12-24 David Edelsohn - - * doc/md.texi: Document PowerPC vector register constraint letter. - -2003-12-23 Mark Mitchell - - * calls.c (expand_call): Recognize calls to "sqrt" and create - corresponding notes. - -2003-12-23 Kaveh R. Ghazi - - * config/mips/mips.c (override_options): Use `inform' instead - of `warning' for -g -mabi=32 and native assembler. - - * config/mips/t-iris6 (CRTSTUFF_T_CFLAGS, TARGET_LIBGCC2_CFLAGS): - Don't pass -Wno-error. - -2003-12-23 David Edelsohn - - * function.c (assign_parms): Update max_parm_reg and - parm_reg_stack_loc when adding new parm reg. - -2003-12-23 Kazu Hirata - - * config/ns32k/ns32k.c: Convert to ISO-C. - -2003-12-23 Zack Weinberg - - * config/ia64/ia64.c (ia64_va_arg): Pass pointer for - variable-sized type through convert_memory_address. - (ia64_in_small_data_p): Always return false for FUNCTION_DECLs. - -2003-12-23 Jan Hubicka - - * common.opt (fprofile-generate,fprofile-use): Add. - * gcc.c (LINK_COMMAND_SPEC): Arrange -fprofile-generate to imply -lgcov - * opts.c (profile_arc_flag_set, flag_profile_values_set, - flag_unroll_loops_set, flag_tracer_set, - flag_value_profile_transformations_set, - flag_peel_loops_set): New static variables. - (common_handle_option): Deal with -fprofile-generate/-fprofile-use - * invoke.texi (-fprofile-generate, -fprofile-use): Describe. - -2003-12-23 Mark Mitchell - - * Makefile.in (OBJS-common): Remove dwarfout.o. - (dwarfout.o): Remove. - * common.opt: Remove -gdwarf, -gdwarf+. - * defaults.h (PREFERRED_DEBUGGING_TYPE): Do not check for - DWARF_DEBUGGING_INFO. - * dwarf2out.c: Fix typo in comment. - * dwarfout.c: Remove. - * opts.c (common_handle_option): Remove OPT_gdwarf, OPT_gdwarf_. - * toplev.c (process_options): Remove check for - DWARF_DEBUGGING_INFO. - * config/elfos.h (DWARF_DEBUGGING_INFO): Do not #define it or - #undef it. - * config/netware.h (DWARF_DEBUGGING_INFO): Likewise. - * config/ptx4.h (DWARF_DEBUGGING_INFO): Likewise. - * config/vxworks.h (DWARF_DEBUGGING_INFO): Likewise. - * config/alpha/unicosmk.h (DWARF_DEBUGGING_INFO): Likewise. - * config/arc/arc.h (DWARF_DEBUGGING_INFO): Likewise. - * config/i386/sco5.h (DWARF_DEBUGGING_INFO): Likewise. - * config/i386/x86-64.h (DWARF_DEBUGGING_INFO): Likewise. - * config/m32r/m32r.h (DWARF_DEBUGGING_INFO): Likewise. - * config/mcore/mcore-elf.h (DWARF_DEBUGGING_INFO): Likewise. - * config/sparc/linux64.h (DWARF_DEBUGGING_INFO): Likewise. - * config/sparc/liteelf.h (DWARF_DEBUGGING_INFO): Likewise. - * config/sparc/sol26-sld.h (DWARF_DEBUGGING_INFO): Likewise. - * config/sparc/sp86x-elf.h (DWARF_DEBUGGING_INFO): Likewise. - * doc/invoke.texi: Do not mention -gdwarf, -gdwarf-1, -gdwarf-1+, - or -gdwarf+. - * doc/tm.texi: Likewise. - - * c-common.c (flag_abi_version): Default to 2. - * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_ABI_VERSION - uniformly for versions above 2. - * doc/invoke.texi: Update documentation for -fabi-version. - -2003-12-22 Geoffrey Keating - - * config/rs6000/rs6000.md: Change many instances of '! - TARGET_POWERPC64' to 'TARGET_32BIT' when the pattern being guarded - was guarded only because it changed CR0 or the carry bit in XER. - -2003-12-23 Eric Botcazou - - PR optimization/13394 - * toplev.c (rest_of_compilation): Move call to - check_function_return_warnings right after the sibcall - optimization pass. - -2003-12-23 Eric Botcazou - - PR c/13382 - * c-typeck.c (convert_for_assignment): When converting from - integral type to pointer type, always call convert. - -2003-12-22 Mark Mitchell - - * doc/invoke.texi: Deprecate -fwritable-strings. - - * c-common.c (flag_external_templates): Remove. - (flag_alt_external_templates): Likewise. - * c-common.h (flag_external_templates): Remove. - (flag_alt_external_templates): Likewise. - * c-opts.c (c_common_handle_option): Unsupport - -falt-external-templates and -ftemplates. - * doc/invoke.texi: Remove mention of -fexternal-templates and - -falt-external-templates. - -2003-12-22 Andrew Pinski - - PR target/13466 - * config.gcc (powerpc-*-darwin): Remove overridden value of need_64bit_hwint. - - * emit-rtl.c (copy_rtx_if_shared): Add comment about its use of - copy_rtx_if_shared_1. - (copy_rtx_if_shared_1): Add comment about what the function does. - - * c-decl.c (finish_function): Change order of checks. - (c_expand_body): Likewise. - -2003-12-22 Fariborz Jahanian - - * config/rs6000/rs6000.c (legitimate_offset_address_p): Correct - check for the legitimate offset when memory of - DImode/DFmode/TFmode/TImode mode is being referenced and target - is TARGET_POWERPC64. - -2003-12-22 Dale Johannesen - - * reload1.c: Add reg_reloaded_call_part_clobbered. - (reload_as_needed): Use it. - (forget_old_reloads_1): Ditto. - (emit_reload_insns): Ditto. - -2003-12-22 Dale Johannesen - - PR optimization/12828 - * loop.c: Add find_regs_nested to look inside CLOBBER(MEM). - (scan_loop): Call it. - * regclass.c (reg_scan_mark_regs): Look inside CLOBBER(MEM). - -2003-12-22 Andrew Pinski - - PR c/9163 - * c-decl.c (poplevel): Only set DECL_INITIAL of a current function - if it is non-null. - (finish_function): Check for error_mark_node or null on DECL_RESULT and - DECL_RESULT of fndecl. - (c_expand_body): Only expand when DECL_INITIAL of fndecl is not - error_mark_node and not null. - -2003-12-21 Dan Nicolaescu - - * rtl.h (dump_rtx_statistics): Declare it. - * rtl.c (rtx_alloc_counts, rtx_alloc_sizes, rtvec_alloc_counts, - rtx_alloc_sizes): New static vars. - (rtx_alloc, rtvec_alloc): Update them. - (dump_rtx_statistics): New function. - * toplev.c (finalize): Call it. - * ggc-page.c (struct globals): Fix comments. Add new member - total_allocated_per_order. - (ggc_alloc): Keep track of the total allocated memory. - (ggc_print_statistics): Clarify message. Print total allocated - memory stats. - * configure.in (gather-detailed-mem-stats): New flag. - * configure: Regenerate. - * config.in: Regenerate. - * doc/install.texi (Configuration): Document - --enable-gather-detailed-mem-stats. - -2003-12-22 Kazu Hirata - - * system.h (CONVERT_HARD_REGISTER_TO_SSA_P): Poison. - * config/i386/i386.h (CONVERT_HARD_REGISTER_TO_SSA_P): Remove. - -2003-12-21 Roger Sayle - - * config/ia64/hpux.h (TARGET_OS_CPP_BUILTINS): Define _ILP32 - when compiling in ILP32 mode. - -2003-12-21 Andrew Pinski - - * config/rs6000/rs6000.c (rs6000_tls_referenced_p): Return early if - TARGET_HAVE_TLS is false. - -2003-12-21 Kazu Hirata - - * config/ip2k/ip2k-protos.h: Remove the prototype for - asm_output_section_name. - * config/ip2k/ip2k.c (asm_output_section_name): Remove. - -2003-12-21 Kazu Hirata - - * alias.c: Fix comment formatting. - * alloc-pool.c: Likewise. - * bitmap.c: Likewise. - * bitmap.h: Likewise. - * bt-load.c: Likewise. - * c-common.c: Likewise. - * c-common.h: Likewise. - * c-decl.c: Likewise. - * c-opts.c: Likewise. - * c-pretty-print.c: Likewise. - * caller-save.c: Likewise. - * cfghooks.h: Likewise. - * cgraph.c: Likewise. - * collect2.c: Likewise. - * cppfiles.c: Likewise. - * cpplib.h: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * emit-rtl.c: Likewise. - * final.c: Likewise. - * function.c: Likewise. - * gcov.c: Likewise. - * gcse.c: Likewise. - * genemit.c: Likewise. - * ggc.h: Likewise. - * haifa-sched.c: Likewise. - * ifcvt.c: Likewise. - * libgcc2.h: Likewise. - * loop.c: Likewise. - * predict.h: Likewise. - * unwind-libunwind.c: Likewise. - * varasm.c: Likewise. - -2003-12-21 Kazu Hirata - - * config/mn10300/mn10300.c (mn10300_encode_section_info): Fix - a warning. - -2003-12-21 Kazu Hirata - - * config/arm/arm.c: Convert to ISO-C. - * config/avr/avr.h: Likewise. - * config/fr30/fr30.c: Likewise. - * config/ip2k/ip2k.c: Likewise. - * config/mn10300/mn10300.c: Likewise. - -2003-12-20 Andrew Pinski - Matt Thomas - - PR target/12749 - * config/i386/i386.c (print_operand): Print only the first - 8 characters of the float in hex. - -2003-12-20 John David Anglin - - * pa.h (TRAMPOLINE_TEMPLATE): Shorten sequence when generating PA - 2.0 code. - (TRAMPOLINE_CODE_SIZE, MIN_CACHELINE_SIZE): New defines. - (INITIALIZE_TRAMPOLINE): Rework to pass line length, and aligned start - and end addresses to I and D cache instruction patterns. - * pa.md (anddi3, iordi3): Change predicates of operands 1 and 2 to - and_operand and ior_operand, respectively. When generating 64-bit - code, only one operand needs to be a register operand. - (xordi3): Change predicates of operands 1 and 2 to register_operand. - (one_cmpldi2): Change predicate of operand 1 to register_operand. - (dcacheflush, icacheflush): Revise to flush an arbitrary number of - cache lines. - -2003-12-20 Josef Zlomek - - PR optimization/13430, PR optimization/12322 - * bb-reorder.c (copy_bb_p): Do not allow block with many successors to - be copied. - (find_traces_1_round): Surround check for fake edges by - #ifdef ENABLE_CHECKING #endif. - -2003-12-20 Eric Botcazou - - PR other/7956 - * genmultilib: New variable disable_multilib. Set it to 'yes' - if enable_multilib was set to 'no'. Emit DISABLE_MULTILIB - if disable_multilib was set to 'yes'. - * gcc.c: Include multilib.h before tm.h. - * config/sparc/sol2-bi.h (LINK_ARCH_SPEC): Emit an error - message for multiarch options if DISABLE_MULTILIB is set. - * config/sparc/sol2-gld-bi.h (LINK_ARCH_SPEC): Likewise. - -2003-12-20 Eric Botcazou - - PR c/12085 - * c-typeck.c (build_function_call): Issue a warning if a - function is called through an incompatible prototype and - replace the call by a trap in this case. - -2003-12-19 James E Wilson - - * install.texi (ia64-*-linux): Document minimum libunwind version - number. - -2003-12-19 Per Bothner - - * langhooks.c (lhd_print_error_function): Fix for PR c/13110. - Don't do pp_newline; it causes an extra blank line. - * pretty-print.c (pp_base_flush): Clear pp_needs_newline. - -2003-12-19 Jason Merrill - - * tree.c (get_unwidened): Decide whether to narrow a bitfield - reference based on TYPE_SIZE, not TYPE_PRECISION. - - * stmt.c (parse_output_constraint): Warn about in-out constraint - that doesn't allow a register. - (parse_input_constraint): Warn about matching constraint that - doesn't allow a register. - -2003-12-19 James E Wilson - - * flow.c (mark_set_regs, case PARALLEL): Scan loop forwards. - Add case for ASM_OPERANDS. - * global.c (global_alloc): Set regs_ever_live for regs_asm_clobbered - registers. - -2003-12-19 Kazu Hirata - - * expr.c (check_max_integer_computation_mode): Remove. - * dojump.c (do_jump): Don't use MAX_INTEGER_COMPUTATION_MODE. - * fold-const.c (fold): Likewise. - * system.h (MAX_INTEGER_COMPUTATION_MODE): Poison. - * doc/tm.texi (MAX_INTEGER_COMPUTATION_MODE): Remove. - -2003-12-19 James E Wilson - - * configure.in: Delete libunwind_has_eh_support test. - * configure: Regenerate. - * config.gcc (ia64*-*-linux*): Delete reference to t-libunwind-no-eh - and libunwind_has_eh_support check. - * config/t-libunwind-no-eh: Delete. - -2003-12-19 Joseph S. Myers - - * c-format.c (print_char_table): Allow 'I' flag on floating point - decimal formats. - -2003-12-19 Stuart Hastings - - * gcc/config/i386/i386.c (ix86_expand_call, x86_output_mi_thunk): - Trivial fixes for i386.c on Darwin/x86. - -2003-12-19 Fariborz Jahanian - - * config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Add code to - recognize macho-style lo_sum adrress patterns. - -2003-12-19 Kazu Hirata - - * dwarfout.c: Remove uses of "register" specifier in - declarations of arguments and local variables. - * gensupport.c: Likewise. - * local-alloc.c: Likewise. - * regclass.c: Likewise. - -2003-12-19 Kelley Cook - - * config.guess: Remove. - -2003-12-19 Jakub Jelinek - - * config/ia64/unwind-ia64.c (ia64_copy_rbs): New function. - (unw_access_gr): Only call ia64_rse_rnat_addr if addr is above - regstk_top. - (uw_frame_state_for): Handle locations inside bundles. - (uw_init_context_1): Initialize context->rnat. - Set context->regstk_top to lowest rbs address which has nat collection - in context->rnat. - (uw_install_context): Fix rnat restoring. - Restore ar.rsc to previous state. - * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR, - MD_HANDLE_UNWABI): Handle unwinding through SA_ONSTACK frames. - -2003-12-19 Jakub Jelinek - - PR c++/13239 - * builtins.c (expand_builtin_expect_jump): Update - TREE_VALUE (arglist) if unsave_expr_now langhook - created a new tree. - -2003-12-19 Richard Earnshaw - - * arm.c (thumb_base_register_rtx_p): Use regno in comparison against - FIRST_PSEUDO_REGISTER. - -2003-12-18 Hartmut Penner - - * gcc/config/rs6000/rs6000.c (USE_ALTIVEC_FOR_ARG_P): Don't check - for SVR4 ABI. - -2003-12-18 Geoffrey Keating - - * config/rs6000/aix.h (OS_MISSING_POWERPC64): Define. - (OS_MISSING_ALTIVEC): Define. - * config/rs6000/darwin.h (ASM_SPEC): Be generous about supplying - -force_cpusubtype_ALL. - * config/rs6000/rs6000.c (rs6000_override_options): Rearrange - CPU information table; now always set all CPU-specific values. - Also, use Altivec and powerpc64 when chip and OS supports them. - -2003-12-18 Geoffrey Keating - - * fixinc/inclhack.def (darwin_macho_dyldh): New. - * fixinc/fixincl.x: Regenerate. - -2003-12-18 Dara Hazeghi - - * version.c (version_string): Renumber as 3.4.0 - * doc/include/gcc-common.texi: Likewise - -2003-12-18 Richard Henderson - - * genrecog.c (print_host_wide_int): New. - (write_switch, write_cond): Use it. - -2003-12-18 Richard Henderson - - * c-decl.c (check_bitfield_type_and_width): Remove enum special - case suppression of pedwarn. - * system.h (ENUM_BITFIELD): Use __extension__. - (CHAR_BITFIELD): Likewise. - -2003-12-18 Ulrich Weigand - Mark Dettinger - - * config/s390/s390.md (UNSPEC_SRST): New constant. - ("strlendi", "strlensi"): New expanders. - ("*strlendi", "*strlensi"): New insns. - -2003-12-18 Mark Mitchell - - * config/sol2.h (LINK_ARCH32_SPEC): Define in terms of ... - (LINK_ARCH32_SPEC_BASE): ... this new macro. - * config/sparc/sol2-bi.h (LINK_ARCH64_SPEC): Define in terms of - ... - (LINK_ARCH64_SPEC_BASE): ... this new macro. - * config/sparc/sol2-gld-bi.h (LINK_ARCH32_SPEC): New macro. - (LINK_ARCH64_SPEC): Likewise. - -2003-12-18 Jason Merrill - - PR middle-end/13234 - * tree-dump.c (dequeue_and_dump): Handle 'r' and 's' code - classes. - -2003-12-18 Steven Bosscher - - * Makefile.in (tracer.o, bb-reorder.o): Depend on timevar.h - * toplev.c (rest_of_handle_reorder_blocks, rest_of_handle_tracer): - Don't push and pop TV_REORDER_BLOCKS timevars, do it... - * bb-reorder.c (reorder_basic_blocks): ...here, and... - * tracer.c (tracer): here. - -2003-12-18 Ulrich Weigand - - * loop.c (move_movables): Handle combination of m->consec, - m->move_insn_first, and m->insert_temp all nonzero correctly. - -2003-12-18 Kazu Hirata - - * calls.c (load_register_parameters): Don't use - LOAD_ARGS_REVERSED. - * system.h (LOAD_ARGS_REVERSED): Poison. - * doc/tm.texi (LOAD_ARGS_REVERSED): Remove. - -2003-12-17 Per Bothner - - * emit-rtl.c (set_new_first_and_last_label_num): Remove function. - * rtl.h (set_new_first_and_last_label_num): Remove declaration. - -2003-12-17 Alexandre Oliva - - * config/frv/frv.c (frv_ifcvt_modify_insn): Don't leave alone - scratch insns of the then branch that clobber regs needed by the - else branch. - -2003-12-17 Kazu Hirata - - * calls.c (expand_call): Update comments. - * system.h (PRETEND_OUTGOING_VARARGS_NAMED): Poison. - * targhooks.c: Do not refer to PRETEND_OUTGOING_VARARGS_NAMED. - -2003-12-17 James E Wilson - Roger Sayle - - * Makefile.in (gcse.o): Add $(TREE_H) to dependencies. - * gcse.c: Include tree.h. - (implicit_set_cond_p): New. - (find_implicit_sets): Call it. - -2003-12-17 Santiago Vila - - * config/kfreebsdgnu.h (TARGET_OS_CPP_BUILTINS): Rename from - TARET_OS_CPP_BUILTINS. - -2003-12-16 Kazu Hirata - - * emit-rtl.c: Fix signed/unsigned comparison warnings. - -2003-12-17 Joseph S. Myers - - * predict.c (struct block_info_def, struct edge_info_def): Change - bit-fields of width 1 to unsigned int. - -2003-12-16 Geoffrey Keating - - PR 12480 - * c-pch.c (pch_init): Improve error message when precompiled - header can't be written. - - PR 12606 - * c-pch.c (pch_init): Make a PCH file appear invalid while it's - being written. - (c_common_write_pch): Make it valid once it's done. - -2003-12-17 Ulrich Weigand - - PR target/11992 - * config/s390/s390.md ("*cmpmem_long_64"): Use CLCLE instruction - instead of CLCL. - ("*cmpmem_long_31"): Likewise. - -2003-12-17 Vladimir Makarov - - * config/ia64/ia64.c: Add more comments about insn bundling. - -2003-12-17 Richard Earnshaw - - PR optimization/10592 - * caller-save.c (mark_referenced_regs): Don't short-circuit a reg - or subreg in SET_DEST if it isn't a hard register. - -2003-12-17 David Edelsohn - - * collect2.c (main): Add -fno-profile-arcs -fno-test-coverage - -fno-branch-probabilities to arguments when compiling ctors and - dtors. - -2003-12-17 Eric Botcazou - - * config/sparc/sol2.h: Set SUPPORTS_INIT_PRIORITY to 0. - * config/sparc/sol2-gld.h: Set SUPPORTS_INIT_PRIORITY to 1. - -2003-12-17 Richard Earnshaw - - * arm.c (thumb_base_register_rtx_p): Don't allow virtual registers - as base registers for sub-word operations. - (thumb_legitimate_address_p): Simplify REG+REG test. - -2003-12-17 Segher Boessenkool - - * opts.c (wrap_help): Fix overflow. - -2003-12-17 Fred Fish - - * configure.in: Remove code to examine linker scripts and set - HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES. - * configure, config.in: Regenerate. - -2003-12-16 Mark Mitchell - - PR c++/12218 - * varasm.c (initializer_constant_valid_p): Allow a conversion from - an integral constant to an OFFSET_TYPE. - -2003-12-16 Kazu Hirata - - PR target/11012 - * config/m32r/m32r.c (gen_compare): Call gen_addsi3 instead of - gen_cmp_ne_small_const_insn. - * config/m32r/m32r.md (cmp_ne_small_const_insn): Remove. - -2003-12-17 Neil Booth - Joseph S. Myers - - PR c/3347 - * c-decl.c (enum_decl_context): Remove BITFIELD. - (grokdeclarator): Take bit-field width as an input. - Perform bit-field width validation with - check_bitfield_type_and_width rather than waiting for - finish_struct. - (groktypename, groktypename_in_parm_context, start_decl, - push_parm_decl, grokfield, start_function): Update calls to - grokdeclarator. - (check_bitfield_type_and_width): New function. - (finish_struct): Move bit-field validation to grokdeclarator - and check_bitfield_type_and_width. - -2003-12-16 John David Anglin - - PR bootstrap/13386 - * configure.in (gcc_cv_ld_hidden): Set to yes on hppa64*-*-hpux* when - using HP native linker. - * configure: Rebuilt. - -2003-12-16 Mark Mitchell - - PR c++/13275 - * c-common.h (enum rid): Add RID_OFFSETOF. - * c-parser.in (rid_to_yy): Ignore RID_OFFSETOF. - * ginclude/stddef.h (offsetof): Reimplement for C++, using - __offsetof__. - * doc/extend.texi: Document __offsetof__. - -2003-12-16 Stan Cox - - * config/iq2000/iq2000.h: Formatting. - (MAX_INT_TYPE_SIZE, MAX_INT_TYPE_SIZE, CONST_COSTS, RTX_COSTS) - (ADDRESS_COST, ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL) - (IMPLICIT_FIX_EXPR, EASY_DIV_EXPR, SLOW_ZERO_EXTEND): Remove - * config/iq2000/iq2000.c: Formatting. - (iq2000_rtx_costs): New. - -2003-12-16 Richard Earnshaw - - * arm.md (addsi3_carryin_shift): Add missing register constraints. - -2003-12-16 Loren James Rittle - - * testsuite/g++.old-deja/g++.eh/badalloc1.C: Tweak to - pass with -pthread on FreeBSD systems. - -2003-12-16 Richard Sandiford - - * config/mips/mips.c (mips_file_end): Only write symbols that have - been referenced at some point. - -2003-12-16 Richard Sandiford - - * config/mips/mips.c: Include langhooks.h - (mips_build_builtin_va_list): Use lang_hooks.types.make_type. - -2003-12-16 Eric Botcazou - - PR optimization/13313 - * combine.c (make_extraction) [REG]: Do not use - gen_lowpart_for_combine when POS is non-zero. - -2003-12-16 Hartmut Penner - - * altivec.h (vec_cmple, vec_all_numeric): Fix typo. - * testsuite/gcc.dg/altivec-10.c: Test for above. - -2003-12-15 David O'Brien - - * Makefile.in (CPPFLAGS): Initialize from configure. - -2003-12-15 Roger Sayle - - PR middle-end/13400 - * ifcvt.c (noce_process_if_block): Disable unconditional write - optimizations if we could introduce a store to trapping memory - that wasn't present previously. - -2003-12-15 Kazu Hirata - - * system.h (DEFAULT_CALLER_SAVES): Poison. - * toplev.c (flag_caller_saves): Always initialize with 0. - * doc/tm.texi (DEFAULT_CALLER_SAVES): Remove. - -2003-12-15 Kazu Hirata - - * flow.c (EXIT_IGNORE_STACK): Move to ... - * defaults.h (EXIT_IGNORE_STACK): ... here. - * dojump.c (clear_pending_stack_adjust): Don't use #ifdef - EXIT_IGNORE_STACK. - * function.c (expand_function_end): Likewise. - * global.c (global_alloc): Likewise. - * ra.c (init_ra): Likewise. - * reload1.c (init_elim_table): Likewise. - * reorg.c (fill_simple_delay_slots): Likewise. - * resource.c (init_resource_info): Likewise. - * doc/tm.texi (EXIT_IGNORE_STACK): Document that the default - is 0. - -2003-12-15 J"orn Rennecke - - * reload.c (reg_overlap_mentioned_for_reload_p): - When looking at a PLUS in X, avoid spuriously returning nonzero - when IN is a REG or another simple PLUS, or a MEM containing one. - - * loop.c (loop_invariant_p): Amend comment about where new registers - might come from. - -2003-12-15 Andreas Jaeger - - * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Remove - handling of obsolete language CHILL. - -2003-12-15 Waldek Hebisch - - * tree.c (initializer_zerop): Add test for empty set. - * integrate.c (function_cannot_inline_p): Forbid inlining - functions calling `longjmp'. - -2003-12-15 Nathan Sidwell - - PR c++/11773 - * doc/gcov.texi (Gcov and Optimization): Document inline function - behaviour. Fix some file suffixes. - -2003-12-14 David O'Brien - - * config/i386/i386.h (__amd64, __amd64__): Remove duplicates. - -2003-12-14 Mark Mitchell - - * c-common.h (c_parse_error): Declare it. - * c-common.c (c_parse_error): New function. - * c-parse.y (yyerror): Use it. - -2003-12-14 John David Anglin - - PR target/13054 - * pa-protos.h (indexed_memory_operand, borx_reg_operand, - move_dest_operand, move_src_operand): New protypes. - (basereg_operand, move_operand, reg_or_nonsymb_mem_operand): Deleted. - * pa.c (copy_reg_pointer, indexed_memory_operand, move_dest_operand, - move_src_operand): New functions. - (basereg_operand, reg_or_nonsymb_mem_operand, move_operand): Delete. - (reg_or_0_or_nonsymb_mem_operand): Return false for unscaled indexed - address until cse is not expected on targets with non-equivalent - space registers. - (hppa_legitimize_address): Canonicalize unscaled indexed addresses - on targets non-equivalent space registers. - (emit_move_sequence): Break out indexed addresses from destination - operand. Similarly, break out unscaled indexed addresses from - source operand on targets with non-equivalent space registers. Fix - REG_POINTER flag when possible. Mark register pointer when creating - new pointers. - (print_operand): Handle unscaled index addresses. - * pa.h (IS_INDEX_ADDR_P, IS_LO_SUM_DLT_ADDR_P): New macro subroutines - for EXTRA_CONSTRAINT. - (EXTRA_CONSTRAINT): Rework to make more readable. - (MODE_OK_FOR_SCALED_INDEXING_P, MODE_OK_FOR_UNSCALED_INDEXING_P): New - subroutines for GO_IF_LEGITIMATE_ADDRESS. - (GO_IF_LEGITIMATE_ADDRESS): Rework using new subroutines. Allow scaled - and unscaled addresses. Canonicalize unscaled indexed addresses on - targets with non-equivalent space registers. Document issues in - handling indexed address modes on PA-RISC. - (PREDICATE_CODES): Update for new and deleted predicates. - * pa.md (move_dest_operand, move_src_operand, indexed_memory_operand): - Use new predicates in move patterns. - Add peephole2 patterns to optimize floating point stores. Fix - constrain preferencing in move patterns. Delete patterns for handling - unscaled indexed memory loads. Add missing load and store with - base-register modification patterns. Correct SFmode floating point - store pattern. Add missing zero extension loads. - -2003-12-13 Steven Bosscher - - * ggc-zone.c (struct alloc_zone): Don't pre-declare, it already - comes in with ggc.h. Add a new bool field `dead'. - (destroy_ggc_zone): Don't destroy a zone at once. Instead, only - set the `dead' flag for the dead zone. Wrap a sanity check in - ENABLE_CHECKING. - (ggc_collect_1): Always mark and sweep if a zone has the `dead' - flag set. - (ggc_collect): Free dead zones after collecting. - -2003-12-13 Jan Hubicka - - * coverage.c (get_coverage_counts): Use inform instead of warning - about missing profile. - -2003-12-12 Steven Bosscher - - * Makefile.in (opts.o, explow.o): Depend on langhooks.h - -2003-12-12 Geoffrey Keating - - * config.gcc : Don't use fixproto. - : Likewise. - -2003-12-12 Jakub Jelinek - - * config/ia64/linux.h (IA64_GATE_AREA_END): Increase by 64K. - (MD_FALLBACK_FRAME_STATE_FOR): Set fpsr_loc, br_loc[6] and - br_loc[7]. Update comment. - (MD_HANDLE_UNWABI): Define. - * config/ia64/unwind-ia64.c (struct unw_state_record): Add - unwabi field. - (struct _Unwind_Context): Increase br_loc array size to 8 entries. - (desc_abi): Set unwabi. - (uw_update_reg_address): Allow br up to 7. - (uw_update_context): Invoke MD_HANDLE_UNWABI if defined. - (uw_install_context): Load b1..b5 from correct locations. - Fix insn loading ar.fpsr. - * doc/tm.texi: Document MD_HANDLE_UNWABI. - -2003-12-12 Roger Sayle - - PR optimization/13037 - * loop.c (update_giv_derive): Ignore redundant sets of a biv when - calculating how to derive a giv from a biv. - -2003-12-12 Neil Booth - - PR preprocessor/12935 preprocessor/12952 preprocessor/13046 - * cpplib.c (prepare_directive_trad): Clear skipping only in - #if and #elif directives. - (do_undef): Call the handler even if the identifier is not a macro. - * cpptrad.c (scan_parameters): Emit an error message. - (_cpp_create_trad_definition): Remember the params list even on - failure. - -2003-12-11 Zack Weinberg - - * arm.c (ARM_ADDRESS_COST, THUMB_ADDRESS_COST): Convert macros - to inline functions: arm_arm_address_cost, arm_thumb_address_cost - respectively. - (arm_address_cost): Use 'em. - -2003-12-12 Rainer Orth - - * config/alpha/osf.h (TARGET_OS_CPP_BUILTINS): Define - __STDC_VERSION__ to ISO C94 for C++. - - * fixinc/inclhack.def (alpha_wchar): New fix. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/wchar.h: New file. - -2003-12-11 David Mosberger - - * unwind-libunwind.c (_Unwind_SetGR): Clear the NaT bit as - required by C++ ABI for Itanium. - * config/t-libunwind (LIB2ADDEH): Remove unwind-libunwind.c. - * config/t-libunwind-no-eh: New file. - * configure.in: Check libunwind for _Unwind_Resume() and if it's - present, set libunwind_has_eh_support to "yes". - * configure: Regenerate. - * config.gcc (ia64*-*-linux*): If $libunwind_has_eh_support is - set to yes, use t-libunwind, otherwise, use t-libunwind-no-eh. - -2003-12-11 Richard Sandiford - - * config/mips/mips.c (mips_global_pointer): Force functions with - a nonlocal goto to set up $gp. - -2003-12-11 James E Wilson - - PR target/13132 - * function.c (gen_mem_addressof): When no decl, explicitly clear flag - bits. - -2003-12-12 Nick Clifton - - * config/m32r/m32r.c: Convert to ISO-C - -2003-12-12 Kazuhiro Inaoka - - * doc/invoke.texi: Replace Mitsubishi with Renesas. - * config/m32r/m32r.h: Ditto. - * config/m32r/m32r.c: Ditto. - * config/m32r/m32r.md: Ditto. - -2003-12-11 Steven Bosscher - - * basic-block.h (BLOCK_HEAD, BLOCK_END): Remove. - (BLOCK_HEAD_TREE, BLOCK_END_TREE): Remove. - (basic_block_def): Rename `head' to `head_' and `end' to `end_'. - (BB_HEAD, BB_END): New accessor macros for the `head_' and `end_' - fields of a basic block. - * bb-reorder.c, bt-load.c, caller-save.c, cfg.c, cfganal.c, - cfgbuild.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgloopanal.c, - cfgloopmanip.c, cfgrtl.c, combine.c, conflict.c, df.c, emit-rtl.c, - final.c, flow.c, function.c, gcse.c, global.c, graph.c, - haifa-sched.c, ifcvt.c, lcm.c, local-alloc.c, loop-unswitch.c, - loop.c, postreload.c, predict.c, profile.c, ra-build.c, ra-debug.c, - ra-rewrite.c, ra.c, recog.c, reg-stack.c, regclass.c, regmove.c, - regrename.c, reload1.c, resource.c, sched-ebb.c, sched-rgn.c, - sibcall.c, tracer.c, config/frv/frv.c, config/i386/i386.c, - config/ia64/ia64.c: Use the BB_HEAD and BB_END macros instead of - accessing the `head' and `end' fields of a basic block directly. - - * gengtype.c: Teach about "void**" pointers and "void *" function - types. Fixes earlier commit. - -2003-12-10 Geoffrey Keating - - * doc/extend.texi (Vector Extensions): Document that bitwise - operations also work on vectors. - -2003-12-10 Richard Earnshaw - - * arm.md: New split patterns for optimizing bitfield accesses. - -2003-12-10 Steven Bosscher - - * README.Portability: Remove K+R section. - - * gengtype-lex.l: Teach about "void**" pointers and - "void*" function types. - -2003-12-10 Eric Botcazou - - PR target/13354 - * config/sparc/sparc.c (sparc_output_mi_thunk): Load DELTA - manually if one can do that with only one instruction. - -2003-12-10 Nick Clifton - - * config.gcc (arm-linux): Include linux.h in tm_file so that - LINUX_TARGET_OS_CPP_BUILTINS is defined. - * config/arm/linux-elf.h (LIB_SPEC): Protect the definition. - -2003-12-09 James E Wilson - - * rtl.def (CODE_LABEL, NOTE): Correct operand numbers in comments. - -2003-12-09 Matt Austern - - PR c/13134 - * c-decl.c (duplicate_decls): Copy visibility flag when appropriate. - -2003-12-09 Kazuhiro Inaoka - - * config/m32r/m32r.h: Add support for m32r2 processor. Including - a new command line option -m32r2 to select it. - * config/m32r/m32r.c: Add support for the new processor variant. - * config/m32r/m32r.md: Likewise. - * config/m32r/t-m32r: Add m32r2 multilibs. - * doc/invoke.texi: Document the new command line switch. - -2003-12-08 Kazu Hirata - - * defaults.h (LOCAL_REGNO): Give the default definition. - * flow.c (LOCAL_REGNO): Remove. - * reload1.c (LOCAL_REGNO): Likewise. - -2003-12-08 Geoffrey Keating - - PR target/11848 - * rs6000.h (CANNOT_CHANGE_MODE_CLASS): Allow change of mode - in floating-point registers between TFmode and DImode. - * rs6000.c (rs6000_emit_move): Split moves early. - (secondary_reload_class): Random Whitespace Change. - (rs6000_split_multireg_move): Support moves involving FP registers. - Emit instructions directly. - * rs6000-protos.h (rs6000_split_multireg_move): Update prototype. - * altivec.md: Update for changes to rs6000_split_multireg_move. - * rs6000.md: Update for changes to rs6000_split_multireg_move. - (movtf_internal): Support moves to/from GPRs. - -2003-12-08 Stuart Hastings - - * config/i386/i386.md: Typo in split of fp-valued if_then_else. - -2003-12-08 James E Wilson - - PR target/13132 - * expmed.c (extract_bit_field): Only call mode_for_size for scalar - integer modes. - -2003-12-08 Nathanael Nerode - - * doc/install.texi: Revert change of Dec 7; gcc is still a 2.13 - directory. - -2003-12-08 Alexandre Oliva - - * config/frv/frv.md (subdi2): Merge with _internal insn_and_split, - by using match_scratch. - (negdi2): New. - -2003-12-08 Jason Merrill - Daniel Berlin - - PR debug/11114 - Support namespaces in DWARF 2 output. - * dwarf2out.c (gen_namespace_die): New function. - (force_namespace_die, setup_namespace_context): New fns. - (declare_in_namespace): New fn. - (gen_decl_die): Call declare_in_namespace. Handle namespaces. - (dwarf2out_decl): Handle namespaces. - (scope_die_for): Pass through a namespace scope. - (class_scope_p): Rename to class_or_namespace_scope_p. - (gen_subprogram_die, gen_variable_die): Adjust. - (gen_struct_or_union_die): Always emit a declaration - if context_die is a namespace. - -2003-12-08 Jan Hubicka - - * unwind-pe.h (read_uleb128): Fix handling of large values - (read_sleb128): Fix handling of large values - -2003-12-08 Andrew Pinski - - PR middle-end/10060 - * emit-rtl.c (copy_rtx_if_shared): Split out into ... - (copy_rtx_if_shared_1): here and optimize the last one - in the sequence into tail-recursion. - (reset_used_flags): Optimize the last one - in the sequence into tail-recursion. - -2003-12-08 Richard Earnshaw - - * arm.md: New split to transform ((X << y) - 1) into ~(~(X-1) << y) - for constant X. - -2003-12-08 Richard Sandiford - - * calls.c (expand_call): Don't try using tail or recursive calls - after the function body has been expanded. - -2003-12-08 Jan Hubicka - - * i386.md (cmpstr expander): Obey TARGET_INLINE_ALL_STRINGOPS - -2003-12-08 Arnaud Charlet - - PR ada/13324, PR ada/12614 - * doc/install.texi: Update requirements for building Ada. - -2003-12-07 David Edelsohn - Graham Reed - - * collect2.c (GCC_OK_SYMBOL): Add support for AIX C_WEAKEXT. - (GCC_UNDEF_SYMBOL): Same. - -2003-12-07 Kazu Hirata - - * final.c (final_scan_insn): Don't use FINAL_PRESCAN_LABEL. - * system.h (FINAL_PRESCAN_LABEL): Poison. - * doc/tm.texi (FINAL_PRESCAN_LABEL): Remove. - -2003-12-07 Kaveh R. Ghazi - - * Makefile.in (compare): Combine toplevel and $(SUBDIRS) cases. - -2003-12-07 Nathanael Nerode - - * configure.in, aclocal.m4: Revert to pre-2.5x conversion status. - * configure: Regenerate with autoconf 2.13. - - * configure.in: Replace AC_INIT, AC_OUTPUT, AC_CANONICAL_SYSTEM - with modern equivalents. - * configure: Regenerate. - - * configure.in: Replace gcc_AC_CHECK_TYPE with AC_CHECK_TYPE. - * aclocal.m4 (gcc_AC_CHECK_TYPE): Remove. - * configure: Regenerate. - - * configure: Regenerate with (preferred) autoconf 2.57. - * doc/install.texi: Note that 'gcc' is now a 2.57 directory. - -2003-12-07 Eric Botcazou - - PR optimization/12965 - * caller-save.c (save_call_clobbered_regs): Do not save/restore - registers around no-return calls. - -2003-12-07 Nathanael Nerode - - * configure.in: Make minimum necessary changes for autoconf 2.5x. - * aclocal.m4: Make minimum necessary changes for autoconf 2.5x. - * configure: Regenerate with autoconf 2.58. - -2003-12-07 Eric Botcazou - - PR optimization/13318 - * loop.c (express_from): Protect integer division from overflow. - -2003-12-07 Eric Botcazou - - PR optimization/13060 - * function.c (fixup_var_refs_1) [SUBREG]: Recognize even if a - replacement already exists. Fix again the whole insn if that fails. - -2003-12-06 Andrew Pinski - - * config/rs6000/rs6000.c (macho_branch_islands): Use - HOST_WIDE_INT_PRINT_UNSIGNED. - -2003-12-06 Richard Sandiford - - * varasm.c (incorporeal_function_p): New. - (assemble_external): Use it as a filter. - * config/mips/mips.c (mips_output_external): Don't check for builtin - functions here. - -2003-12-06 Richard Earnshaw - - * arm.md (IOR (COMPARISON) (AND)): New define_splits. - -2003-12-06 Kelley Cook - - * Makefile.in (program_transform_cross_name): Delete. - (GCC_CROSS_NAME, CPP_CROSS_NAME): Delete. - (PROTOIZE_CROSS_NAME, UNPROTOIZE_CROSS_NAME): Delete. - (AR_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET): Adjust for above. - (install_cpp, install_driver, install-man, uninstall): Likewise. - -2003-12-06 Alan Modra - - PR 13169 - * basic-block.h (PROP_ASM_SCAN): Define. - * final.c (regs_asm_clobbered): New array. - * regs.h (regs_asm_clobbered): Declare. - * flow.c (life_analysis): Init it. - (mark_set_regs): Set PROP_ASM_SCAN for asms. - (mark_set_1): Set regs_asm_clobbered. - * global.c (global_alloc): Don't set eliminable_regset when - regs_asm_clobbered. - -2003-12-05 Mark Mitchell - - * config/ia64/ia64.h (MUST_PASS_IN_STACK): Define. - - PR c++/13314 - * emit-rtl.c (set_mem_attributes_minus_bitpos): Robustify. - -2003-12-05 Andrew Pinski - - PR driver/13211 - * gcc.c (execute) Increment execution_count when returning - early because verbose_only_flag is true. - -2003-12-05 Per Bothner - - * cppfiles.c (file_hash_hash): New static function. - (hash_string_eq): Renamed static function to file_hash_eq. - (_cpp_init_files): Create file_hash table with above callbacks. - (cpp_included): Must use htab_find_with_hash insead of htab_find. - (_cpp_find_find, make_cpp_dir): Must use htab_find_slot_with_hash. - -2003-12-05 Per Bothner - - * line-map.h (source_location): New typedef. - (fileline): Redefined as source_location. - (struct line_map, linemap_add, linemap_lookup): Replace filefile - by source_location. - * line-map.c (linemap_add, linemap_lookup): Use source_location. - -2003-12-05 Richard Henderson - - * config/alpha/alpha.c (alpha_build_builtin_va_list): Add dummy - field to suppress -Wpadded warnings. - -2003-12-05 Stuart Hastings - - * config/rs6000/rs6000.md: Correct macro test of TARGET_MACHO. - -2003-12-05 Stuart Menefy - J"orn Rennecke - - PR target/13302 - * sh.c (sh_build_builtin_va_list): Use (*lang_hooks.types.make_type). - -2003-12-05 Roger Sayle - - * dojump.c (do_jump): If the expression being compared against - zero, is the subreg of a promoted variable, perform the comparison - in the promoted mode. - * simplify-rtx.c (simplify_unary_operation): Optimize sign and - zero-extensions of subregs of promoted variables where the - extension is identical to that used to promote the variable. - -2003-12-05 Hans-Peter Nilsson - - PR target/13256 - * resource.h (enum mark_resource_type): Remove member MARK_DEST. - The only user changed as follows: - * resource.c (mark_set_resources) : Always recurse for - SET_SRC (x). - : Always recurse on - operands. - : Delete, deferring to default code. - -2003-12-05 Waldek Hebisch - - * stmt.c (expand_nl_goto_receiver): Copy hard register clobbers - and ASM_INPUT barrier from expand_builtin_setjmp_receiver. - -2003-12-05 Richard Sandiford - - * config/mips/mips.c (mips_expand_call): Don't allow laziy binding - for n32 & n64 abicalls. - -2003-12-05 Richard Sandiford - - PR bootstrap/13145 - * config/mips/mips.h (FIRST_PSEUDO_REGISTER): Adjust comment. - * config/mips/mips.c (mips_reg_names, mips_sw_reg_names): Add $fcall. - (mips_load_got): Always create a constant MEM. - (mips_expand_call): Use load_callsi and load_calldi. - * config/mips/mips.md (UNSPEC_LOAD_CALL, FAKE_CALL_REGNO): New consts. - (load_callsi, load_calldi): New patterns. - -2003-12-05 Peter Gerwinski - - * tree.def (PLACEHOLDER_EXPR): Clarify commentary. - -2003-12-05 Steven Bosscher - - * config/d30v/d30v-protos.h , config/d30v/d30v.c, - config/dsp16xx/dsp16xx-protos.h, config/dsp16xx/dsp16xx.c, - config/fr30/fr30-protos.h, config/fr30/fr30.c, - config/i370/i370-protos.h, config/i370/i370.c, - config/i960/i960-protos.h, config/i960/i960.c, - config/ip2k/ip2k-protos.h, config/ip2k/ip2k.c, - config/m32r/m32r-protos.h, config/m32r/m32r.c, - config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, - config/ns32k/ns32k-protos.h, config/ns32k/ns32k.c: - Convert to ISO C90 function declarations and definitions. - -2003-12-05 Eric Botcazou - - * doc/extend.texi (Constructing Calls): Add warning about - the limitations of the functions. - -2003-12-05 Eric Botcazou - - PR middle-end/11151 - * function.h (struct function): New field 'x_naked_return_label'. - * function.c (free_after_compilation): Set it to NULL. - (expand_function_end): Emit 'naked_return_label' if it exists. - * rtl.h (expand_naked_return): Declare. - * stmt.c (expand_naked_return): New function to generate a - jump to 'naked_return_label'. - * builtins.c (expand_builtin_return): Call expand_naked_return - instead of expand_null_return. - * config/sparc/sparc.md (untyped_return): Likewise. - -2003-12-04 Andrew Pinski - - PR target/11322 - * config/sh/netbsd-elf.h (NO_PROFILE_COUNTERS): Define. - - PR target/12467 - * config/rs6000/altivec.md (altivec_vmsummbm): Fix typo. - -2003-12-04 Stuart Hastings - - * rs6000.c (output_call, macho_branch_islands, - add_compiler_branch_island, no_previous_def, get_previous_label) - Revisions of xx_stub functions for branch islands, - add -fPIC support for Darwin. - * rs6000-protos.h (output_call) Prototype. - * rs6000.md Use output_call. - * invoke.texi Explain Darwin semantics of -longcall. - * testsuite/gcc.dg/darwin-abi-1.c Revise testcase for -longcall/jbsr. - -2003-12-04 Richard Henderson - - * config/i386/i386.md (addqi3_carry): Use q not r constraints. - (subqi3_carry): Likewise. - -2003-12-04 J"orn Rennecke - - PR optimization/13260 - * sh-protos.h (sh_expand_t_scc): Declare. - * sh.h (PREDICATE_CODES): Add cmpsi_operand. - * sh.c (cmpsi_operand, sh_expand_t_scc): New functions. - * sh.md (cmpsi): Use cmpsi_operand. If T_REG is compared to - something that is not a CONST_INT, copy it into a pseudo register. - (subc): Fix description of new T value. - (slt, sgt, sge, sgtu): Don't clobber T after rtl generation is over. - (sltu, sleu, sgeu): Likewise. - (seq, sne): Likewise. Use sh_expand_t_scc. - -2003-12-04 Nathanael Nerode - - * configure.in: Generalize the CONFIG_HEADERS pattern under which - we stamp cstamp-h. - * configure: Regenerate. - - * configure.in: Pull AC_CHECK_HEADER call out of shell if statement - to avoid trouble when updating to autoconf 2.5x. - * configure: Regenerate (with autoconf 2.13 still). - -2003-12-04 J"orn Rennecke - - * sh.md (truncdiqi2): Use andi opcode for immediate. - (reload_outdf+1,reload_outdf+2): Remove constraints. - (movv16sf_i): Fxi multiplier for SUBREG_BYTE. - (movv8qi_i+2): Zero-extend low byte before adding it to high byte. - (fipr, ftrv): Add .s suffix to opcode. - -2003-12-04 Richard Sandiford - - PR target/13186 - - Revert all of the following patch, except the addition of - hook_bool_machine_mode_true: - - 2003-11-02 Richard Sandiford - - * Makefile.in (targhooks.o, reload.o): Update dependencies. - (GTFILES): Add targhooks.c. - (gt-targhooks.h): New rule; depend on s-gtype. - * target.h (direct_pool_load_p): New hook. - * target-def.h (TARGET_DIRECT_POOL_LOAD_P): New macro. - (TARGET_INITIALIZER): Include it. - * targhooks.h (default_direct_pool_load_p): Declare. - (hook_bool_machine_mode_true): Declare. - * targhooks.c: Include insn-config.h, recog.h, ggc.h and - gt-targhooks.h. - (pool_symbol): New variable. - (default_direct_pool_load_p): New function. - (hook_bool_machine_mode_true): New function. - * reload.c: Include target.h. - (find_reloads): If an alternative will force a constant into memory, - count an extra reload if constant pool symbols are not valid - addresses. If an alternative uses memory to move values between - registers, count the move as two reloads rather than one. - * config/s390/s390.c (TARGET_DIRECT_POOL_LOAD_P): Define. - * doc/tm.texi (TARGET_DIRECT_POOL_LOAD_P): Document. - -2003-12-03 Mark Mitchell - - * config/ia64/hpux.h (TARGET_HAVE_TLS): Define it to false. - * config/ia64/ia64.h (TARGET_HAVE_TLS): Define it to true if - HAVE_AS_TLS is true. - * config/ia64/ia64.c (TARGET_HAVE_TLS): Do not define it. - -2003-12-03 James E Wilson - - * gcc.c (init_spec): Pass -lunwind to init_gcc_specs in eh_name. - - * gcc-page.c (extra_order_size_tab): Correct comment. - -2003-12-03 Kazu Hirata - - * config/h8300/h8300.c (push): Call gen_push_h8300hs_advanced - instead of gen_push_h8300hs. - (pop): Call gen_pop_h8300hs_advanced instead of - gen_pop_h8300hs. - * config/h8300/h8300.h (TRAMPOLINE_SIZE): Use Pmode. - * config/h8300/h8300.md (*tablejump_h8300hs_advanced): - Tighten the predicate. - (*tablejump_h8300hs_normal): Tighten the predicate. - (push_h8300hs): Change to - push_h8300hs_advanced. - (pop_h8300hs): Change to pop_h8300hs_advanced. - -2003-12-03 Eric Christopher - - * rtl.c: Fix typo. - * config/mips/mips.h: Ditto. Fix formatting. - -2003-12-04 Ben Elliston - - * future.options: Remove. Move to gnu.org web pages. - -2003-12-03 Eric Christopher - - * c-parse.in (c_in_iteration_stmt, c_in_case_stmt): Move - from here... - * c-tree.h: to here. - -2003-12-03 Jan Hubicka - - PR optimization/12324 - * toplev.c (rest_of_decl_compilation): Do not deffer when compiling - in unit-at-a-time mode. - -2003-12-03 Jakub Jelinek - - * expr.c (store_constructor): Only set RTX_UNCHANGING_P for - read-only field if cleared is 0. - -2003-12-03 Nathanael Nerode - - * config.gcc: Mark obsolete targets for GCC 3.4. - -2003-12-03 Zack Weinberg - - * aclocal.m4 (AM_ICONV): Add explicit check for iconv.h. - * config.in, configure.in: Regenerate. - * cpphash.h: Check both HAVE_ICONV and HAVE_ICONV_H before - including iconv.h. - -2003-12-03 Alan Modra - - PR target/11229 - * cse.c (cse_insn): Set classp using src_const_elt if - src_eqv_elt is NULL. - -2003-12-03 Richard Earnshaw - - * gcse.c (reg_clear_last_set): New function. - (reg_set_info): If data is non-null, treat it as an sbitmap of - registers, set the bit for the register being set. - (compute_store_table): Allocate last_set_in with xcalloc. Do not - memset this array on each iteration. Pass reg_set_in_block[bb->index] - to note_stores while computing last_set_in instead of scanning - last_set_in after the first pass through the insns. - Clear last_set_in using reg_clear_last_set instead of explicitly - rescanning after each insn. If checking is enabled, assert that - last_set_in is completely zeroed after each bb has been processed. - -2003-12-02 Geoffrey Keating - - * df.c (df_uses_record) : The argument of a MEM is read-only, - never read-write. - : Delete incorrect comment. - : Remove 'use_flags' variable. - -2003-12-03 David Edelsohn - - * function.c (assign_parms): Make sure parm PARALLEL combined - in reg is composed of more than one object and the mode really - produces a reg. - -2003-12-03 Jan Hubicka - - * i386.c (classify_argument): Make it 64bit clean. - -2003-12-02 Richard Sandiford - - * config/mips/mips.c (mips_output_external): Replace checks for - specific builtin-in functions with a check for DECL_BUILTIN_IN. - -2003-12-02 Richard Henderson - - * rtl.h (PUT_CODE, PUT_MODE): Remove ENUM_BITFIELD cast. - * tree.h (TREE_SET_CODE): Likewise. - * recog.h (struct insn_operand_data): Move const after ENUM_BITFIELD. - -2003-12-02 Ben Elliston - - * dbxstclass.h: Rename from this .. - * xcoff.h: .. to this. - * xcoffout.c: Include xcoff.h. - -2003-12-01 Kaveh R. Ghazi - - * Makefile.in (GCC_CFLAGS): Add -Wold-style-definition. - -2003-12-01 James Lemke - - * config/arm/arm.c (arm_rtx_costs): Improve for xscale multiply. - -2003-12-01 Roger Sayle - - PR optimization/11634 - * recog.c (split_insn): Factor test of INSN_P and handling of - set_noop_p out of here into the two callers. - (split_all_insns): Add INSN_P test and set_noop_p handling here. - If deleting a no-op set after reload that has a REG_UNUSED note, - mark the basic block as changed and recalculate life information. - (split_all_insns_noflow): Add INSN_P test and set_noop_p handling - here. - -2003-12-01 Roger Sayle - - PR optimization/12322 - * gcse.c (struct ls_expr): Change type of hash_index from int to - unsigned int. - (hash_expr): Document hash_table_size parameter and wrap long line. - (ldst_entry): Calculate expression's hash_index and record in ptr. - (trim_ld_motion_mems): Use hash_index to search a single bucket - instead of scanning the entire hash_table. Remove the "del" local - variable and use the equivalent "expr == 0" instead. Change last - to be a pointer to the pointer to the current element, to simplify - and speed-up deleting from a linked list. - -2003-12-01 James E Wilson - - * doc/contrib.texi: Update David Mosberger. - - * doc/c-tree.texi (CONSTRUCTOR): Clarify element order and handling - of missing fields. - - PR target/8407 - * config/ia64/ia64.c (ia64_function_arg): For single-reg HFA, call - gen_rtx_REG to create new reg with argument mode. - -2003-12-01 Steven Bosscher - - * ggc.h (struct alloc_zone): Move forward declaration up. - (new_ggc_zone): New function prototype. - (destroy_ggc_zone): Ditto. - * ggc-simple.c (new_ggc_zone): New function, does nothing. - (destroy_ggc_zone): Ditto. - * ggc-page.c (new_ggc_zone): New function, does nothing. - (destroy_ggc_zone): Ditto. - * ggc-zone.c (struct page_entry): Fix comment. - (ggc_alloc_typed): Use a switch statement instead of ifs. - (new_ggc_zone): New function to set up a new GC zone. - (destroy_ggc_zone): New function to remove a GC zone. - init_ggc): Use new_ggc_zone to set up the default zones. - (ggc_collect): Walk a list of zones, instead of just the - default zones. Report statistics using the zone name. - -2003-12-01 Ulrich Weigand - - * unroll.c (find_splittable_givs): Add missing extend_value_for_giv. - -2003-12-01 Roger Sayle - - PR optimization/12628 - * toplev.c (rest_of_handle_jump_bypass): Call reg_scan. - * regclass.c (reg_scan): Include allocate_reg_info time in - TV_REG_SCAN. Minor clean-ups. - (reg_scan_update): Minor clean-ups. - -2003-12-01 Ulrich Weigand - - * config.gcc (s390x-ibm-tpf*): Add extra_parts. - -2003-12-01 James E Wilson - - * config/ia64/ia64.h (FUNCTION_ARG_REGNO_P): Use AR_REG_FIRST not - GR_ARG_FIRST. - -2003-12-01 Zack Weinberg - - * common.opt: Remove -fgnu-linker. - * flags.h: Remove flag_gnu_linker. - * opts.c: Don't handle OPT_fgnu_linker. - * toplev.c: Don't initialize flag_gnu_linker. - Remove gnu-linker entry from f_options. - * config/dsp16xx/dsp16xx.h (OPTIMIZATION_OPTIONS): - Don't reset flag_gnu_linker. - * config/mips/mips.c (override_options): Likewise. - * doc/invoke.texi: Remove all mention of -fgnu-linker. - -2003-12-01 Daniel Berlin - - * ggc-zone.c (ggc_pch_write_object): Calculate object size using - ggc_get_size (which accounts for large objects properly). - -2003-12-01 Jeff Sturm - - PR optimization/13024 - * toplev.c (rest_of_handle_new_regalloc): Remove rebuild_notes - parameter. - (rest_of_handle_old_regalloc): Likewise. Add rebuild_notes - declaration. Rebuild jump labels following local_alloc if necessary. - (rest_of_compilation): Remove rebuild_label_notes_after_reload - declaration. Don't pass rebuild_notes parameter to - rest_of_handle_new_regalloc and rest_of_handle_old_regalloc. - Don't rebuild jump labels. - -2003-12-01 Jeff Law - - * flow.c (count_or_remove_death_notes_bb): New. Extracted from - count_or_remove_death_notes. - (count_or_remove_death_notes): Use EXECUTE_IF_SET_IN_SBITMAP. - -2003-12-01 Andreas Krebbel - - * builtins.c (expand_builtin_longjmp): Added two memory clobbers. - -2003-12-01 Ulrich Weigand - - * reload.c (find_reloads_address): Split addresses of type - (plus (plus (reg) (reg)) (const_int)) only if one register - is either a valid base register or else one of the stack - frame related registers (sp/fp/ap). - -2003-12-01 Steven Bosscher - - * function.c (update_epilogue_consts): Don't use PARAMS. - * rtl.h (web_main): Ditto. - * target.h (is_costly_dependence): Ditto - -2003-12-01 Eric Botcazou - - PR middle-end/7847 - * expr.c (expand_expr) [normal_inner_ref]: When 'offset' is non-zero, - do not recheck that 'op0' is a MEM. Move comment. When testing for - unaligned objects, take also into account the alignment of 'op0' and - 'mode1' if 'op0' is a MEM. - -2003-12-01 Gabriel Dos Reis - - * doc/c-tree.texi (Function Bodies): Update HANDLER documentation. - -2003-12-01 Kelley Cook - - * doc/install.texi: Note that fastjar is built with automake 1.7.x - and autoconf 2.57. - -2003-12-01 Alan Modra - - * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test - target_flags directly rather than using TARGET_* defines. - -2003-11-30 Ben Elliston - - * doschk.c: Remove. - -2003-11-30 Richard Sandiford - - PR target/12727 - * config/mips/mips.c (mips_save_reg): Fix frame information for sdc1 - on 32-bit big-endian targets. - -2003-11-30 Kazu Hirata - - * genemit.c (register_constraints): Remove. - -2003-11-30 Andreas Krebbel - - * config/s390/s390.md ("tmdi_reg", "tmsi_reg", "*movdi_64", "*movdi_31", - "iordi3"): Insns now use multiple letter constraints. - ("*movdi_lhi", "*movdi_lli", "*movdi_lay"): Insns deleted. They are now - covered by "*movdi_64". - ("*movsi_lhi", "*movsi_lli", "*movsi_lay"): Insns deleted. They are now - covered by "*movsi_zarch" and "*movsi_esa". - ("*movsi_zarch", "*movsi_!zarch"): New insns. - ("*llgt_sisi_split", "*llgt_didi_split"): Insns deleted. Now covered - by "*andsi3_zarch" and "anddi3". - ("*anddi3_ni"): Insn merged with "anddi3". - ("*andsi3_ni"): Insn merged with "*andsi3_zarch". - ("*andsi3_zarch", "*andsi3_esa"): New insns. - ("*iordi3_oi"): Insn merged with "iordi3". - ("*iorsi3_oi"): Insn merged with "*iorsi3_zarch". - ("*iorsi3_zarch", "*iorsi3_esa"): New insns. - - * config/s390/s390.c (s390_single_qi, s390_single_hi): Functions - merged to s390_single_part. - (s390_single_part): New function. - NOTE: Semantics have changed a bit. Now the value of the part must - be different from the others to get a non-negative return value. - (s390_extract_qi, s390_extract_hi): Functions merged to - s390_extract_part. - (s390_extract_part, s390_extra_constraint_str, - s390_const_ok_for_constraint_p): New functions. The L constraint got a - new meaning and the N constraint was added as a multiple letter - constraint. - (s390_extra_constraint): Function deleted. - (print_operand): New output modifier 'i' and 'j' added. - All uses of CONST_OK_FOR_LETTER_P were replaced by - CONST_OK_FOR_CONSTRAINT_P. - - * config/s390/s390-protos.h: Function prototypes adapted. - * doc/md.texi: Documentation for new constraint letters added. - -2003-11-30 Andreas Schwab - - * Makefile.in ($(DESTDIR)$(infodir)/%.info): Fix missing semicolon. - -2003-11-29 James E Wilson - - * gcc.c (init_spec): Pass -lunwind to init_gcc_specs in eh_name - instead of in shared_name. - - * final.c (final_start_function): Delete code for NON_SAVING_SETJMP. - * reload1.c (reload): Re-add it here. - -2003-11-30 Alan Modra - - * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Don't - set SECTION_WRITE on TARGET_RELOCATABLE. - -2003-11-29 Kazu Hirata - - * config/h8300/h8300.h (LIBCALL_VALUE): Use R0_REG. - -2003-11-28 Gunther Nikl - - * config/m68k/m68k.c (MOTOROLA): Move from here... - * config/m68k/m68k.h (MOTOROLA): ... to here. - (OUTPUT_JUMP): Use do {...} while (0). - * config/m68k/m68k.md: Replace #ifdef MOTOROLA with C statements. - -2003-11-28 Gunther Nikl - - * config.gcc (m68020-*-elf*, m68k-*-elf*, m68010-*-netbsdelf*, - m68k*-*-netbsdelf*, m68k-*-rtems*): Add tm_defines containing - MOTOROLA and USE_GAS. - * config/m68k/rtemself.h (MOTOROLA): Delete. - * config/m68k/netbsd-elf.h (MOTOROLA, USE_GAS): Delete. - * config/m68k/m68kelf.h (MOTOROLA, USE_GAS, SGS_CMP_ORDER): Delete. - -2003-11-29 Kazu Hirata - - * config/h8300/h8300.h (WORDS_BIG_ENDIAN): Update the comment. - -2003-11-29 Kelley Cook - - * Makefile.in (install-info): Install gccinstall.info too. - -2003-11-29 Ulrich Weigand - - * config/s390/s390.md ("cmpint_di"): Fix incorrect instruction lengths. - -2003-11-29 Ulrich Weigand - - * config/s390/s390.md ("movhi"): Do not emit extender pattern - when loading from a (MEM (ADDRESSOF ...)). - ("movqi"): Likewise. - -2003-11-29 Joseph S. Myers - - PR c/10333 - * c-parse.in (typespec_reserved_nonattr): Reject typeof on - bit-fields. - -2003-11-29 Richard Sandiford - - * stmt.c (expand_asm_operands): Check whether force_const_mem - succeeded. - -2003-11-28 Kaveh R. Ghazi - - * config/gnu.h (HURD_TARGET_OS_CPP_BUILTINS): New. - * config/linux.h (LINUX_TARGET_OS_CPP_BUILTINS): New. - - * config/alpha/gnu.h, config/alpha/linux.h, - config/arm/linux-elf.h, config/cris/cris.h, config/cris/linux.h, - config/i370/linux.h, config/i386/gnu.h, config/i386/i386.h, - config/i386/linux-aout.h, config/i386/linux.h, - config/i386/linux64.h, config/ia64/linux.h, config/m68k/linux.h, - config/m68k/uclinux.h, config/mips/linux.h, - config/mn10300/linux.h, config/pa/pa-linux.h, - config/rs6000/sysv4.h, config/s390/linux.h, config/sh/linux.h, - config/sparc/linux.h, config/sparc/linux64.h, - config/xtensa/linux.h (TARGET_OS_CPP_BUILTINS): Use - HURD_TARGET_OS_CPP_BUILTINS/LINUX_TARGET_OS_CPP_BUILTINS or ensure - all necessary assertions are included. - -2003-11-28 Jan Hubicka - - * emit-rtl.c (set_used_flags): New. - (verify_rtx_sharing, verify_rtl_sharing): New. - (unshare_all_rtl_1): Rename to.... - (unshare_all_rtl_in_chain): ... this one; make static. - (copy_rtx_if_shared): LABEL_REF chan be shared. - * ifcvt.c (unshare_ifcvt_sequence): New. - (noce_try_move, noce_try_store_flag, noce_try_store_flag_constants, - noce_try_addcc, noce_try_addcc, noce_try_store_flag_mask, - noce_try_cmove, noce_try_store_flag_mask, noce_try_minmax, - noce_try_abs, noce_process_if_block, find_cond_trap - * rtl.h (verify_rtl_sharing, set_used_flags, unshare_all_rtl_in_chain): - Declare. - -2003-11-28 Kazu Hirata - - * config/h8300/h8300.md: Fix a comment typo. - -2003-11-28 Kazu Hirata - - * config/h8300/h8300.md (*movsf_h8300h): Change to - *movsf_h8300hs. - (addsi_h8300): Change to *addsi_h8300. - (addsi_h8300h): Change to *addsi_h8300hs. - (subsi3_h8300): Change to *subsi3_h8300. - (subsi3_h8300h): Change to *subsi3_h8300hs. - (neghi2_h8300h): Change to *neghi2_h8300hs. - (negsi2_h8300h): Change to *negsi2_h8300hs. - -2003-11-28 Kazu Hirata - - * config/h8300/h8300.md (*subhi3_h8300): Remove '&' from the - constraint. - (*subhi3_h8300hs): Likewise. - -2003-11-28 David Edelsohn - - * config/rs6000/rs6000.h (MASK_MFCRF): New. - (TARGET_MFCRF): Test target_flags, not processor type. - (TARGET_SWITCHES): Add mfcrf and no-mfcrf. - Change Don't to Do not. - * config/rs6000/rs6000.c (processors_target_table): Add MASK_MFCRF - to power4, 970, G5. - -2003-11-27 J"orn Rennecke - - * cse.c (cse_set_around_loop): When changing a constant load - to a register -register copy, add a REG_EQUAL note. - -2003-11-27 Randolph Chung - John David Anglin - - * pa.c (hppa_profile_hook): Split gen_call_profiler into separate - insns. Use the regular call expander for the call to the profiler. - * pa.md (call_profiler): Delete. - (load_offset_label_address): New insn to load the address of the - current function for the profiler. - (lcla1, lcla2): New insns to output a code label and load its address. - -2003-11-27 Kazu Hirata - - * final.c (final_scan_insn): Remove commented-out code. - -2003-11-27 Nathanael Nerode - - * doc/install.texi: Remove ADAC reference and make accurate. - -2003-11-27 Kazu Hirata - - * config/h8300/h8300.h (FUNCTION_VALUE): Use R0_REG. - (FUNCTION_VALUE_REGNO_P): Likewise. - * config/h8300/h8300.md: Define R0_REG. - -2003-11-27 Kazu Hirata - - * config/h8300/h8300.c: Fix formatting. - * config/h8300/h8300.md: Likewise. - -2003-11-27 Kazu Hirata - - * config/h8300/h8300.h (ELIMINABLE_REGS): Update a comment. - -2003-11-27 Kazu Hirata - - * config/h8300/h8300.md: Give names to anonymous insns. - -2003-11-27 Kazu Hirata - - * config/h8300/h8300.md (extendqisi2): Remove constraints. - -2003-11-27 Gunther Nikl - - * doc/tm.texi (SYSROOT_HEADERS_SUFFIX_SPEC): Fix typo. - -2003-11-27 Eric Botcazou - - PR optimization/13041 - * final.c (frame_pointer_needed): Fix comment. - * reload1.c (reload): Decrease alignment of the frame - pointer if it was used for register allocation. - -2003-11-27 Eric Botcazou - - PR target/12900 - * reg-stack (move_for_stack_reg): New prototype. Return - whether a control flow insn was deleted. - (subst_stack_regs_pat): Likewise, using the information provided - by move_for_stack_reg. - (subst_stack_regs): Likewise, using the information provided - by subst_stack_regs_pat. - (convert_regs_1): Record whether a control flow insn was deleted, - using the information provided by subst_stack_regs. Purge dead - edges only if a control flow insn was deleted. - -2003-11-27 Eric Botcazou - - PR middle-end/8028 - PR middle-end/9890 - PR middle-end/11151 - PR middle-end/12210 - PR middle-end/12503 - PR middle-end/12692 - * builtins.c (expand_builtin_apply): Use virtual_outgoing_args_rtx - as the base address to copy the memory arguments to. - -2003-11-26 Danny Smith - - * config/i386/cygming.h (ASM_OUTPUT_DEF_FROM_DECLS): Declare - function aliases as functions. - -2003-11-26 Nathanael Nerode - - * aclocal.m4 (gcc_AC_PROG_GNAT): Rewrite to account for removal - of ADAC. - * configure: Regenerate. - - * Makefile.in: Remove references to ADAC. - - * configure.in: Remove check for whether ${ADAC} accepts -Wno-long-long. - * configure: Regenerate. - -2003-11-26 Eric Botcazou - Olivier Hainque - - PR target/6466 - * config/sparc/sparc-protos.h (compute_frame_size): New prototype. - (sparc_flat_compute_frame_size): Likewise. - (sparc_flat_save_restore): Move prototype... - * config/sparc/sparc.c (sparc_flat_save_restore): ...here. - (save_regs): New prototype. - (build_big_number): Likewise. - (apparent_fsize): Change type to HOST_WIDE_INT. - (actual_fsize): Likewise. - (frame_base_offset): Likewise. - (build_big_number): Add support for HOST_BITS_PER_WIDE_INT == 64. - Change string descriptor to HOST_WIDE_INT_PRINT_DEC. - [TARGET_ARCH64]: Use the sequence of sparc_emit_set_const64_longway - to load a 64-bit constant. - (sparc_nonflat_function_prologue): Change string descriptor to - HOST_WIDE_INT_PRINT_DEC. Change offset type to HOST_WIDE_INT. - (output_restore_regs): Change offset type to HOST_WIDE_INT. - (sparc_nonflat_function_epilogue): Change string descriptor to - HOST_WIDE_INT_PRINT_DEC. Use build_big_number. - (output_sibcall): Change size type to HOST_WIDE_INT. Use - build_big_number. Change string descriptor to HOST_WIDE_INT_PRINT_DEC. - (sparc_frame_info): Change types for several components. - (sparc_flat_compute_frame_size): Update types according to previous - change. - (sparc_flat_function_prologue): Change string descriptor to - HOST_WIDE_INT_PRINT_DEC. Change offset type to int. Use - build_big_number. - (sparc_flat_function_epilogue): Change offset type to int. - Rename 'size1' into 'reg_offset1'. Change string descriptor to - HOST_WIDE_INT_PRINT_DEC. Use build_big_number. Change big number - limit to 4096 instead of 4095. - - * config/sparc/sparc.c (mems_ok_for_ldd_peep): Change offset type to - HOST_WIDE_INT. - -2003-11-24 Waldek Hebisch - - * function.c: Make outer_function-chain external. - * function.h: Likewise. - -2003-11-24 Richard Sandiford - - * config.gcc (mips-sgi-irix6*): Add t-iris6gld to tmake_file when - using GNU ld. - * config/mips/iris6.h (IRIX6_STARTFILE_SPEC): New, taking the - whole of the previous STARTFILE_SPEC except crtbegin.o%s. - (IRIX6_ENDFILE_SPEC): Likewise ENDFILE_SPEC and crtend.o%s. - (STARTFILE_SPEC, ENDFILE_SPEC): Define in terms of the above. - (SUBTARGET_EXTRA_SPECS): Define. - * config/mips/iris6gld.h (LINK_SPEC): Change -init function - to __gcc_init and -fini function to __gcc_fini. - (STARTFILE_SPEC): Redefine, including irix6-crti.o before crtbegin.o. - (ENDFILE_SPEC): Likewise, including irix6-crtn.o after crtend.o. - (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP): Define. - * config/mips/t-iris6gld, - * config/mips/irix6-crti.asm, - * config/mips/irix6-crtn.asm: New files. - -2003-11-24 Eric Christopher - - PR C/13014 - * c-decl.c (c_in_iteration_stmt, c_in_case_stmt): New. - (start_function): Use. - (c_push_function_context): Ditto. - (c-pop_function_context): Ditto. - (language_function): Move... - * c-tree.h: ... here. Add x_in_iteration_stmt, and - x_in_case_stmt. - * c-parse.in (do_stmt_start, select_or_iter_stmt, stmt): Use - c_in_iteration_stmt, c_in_case_stmt for parser state. Move - check for valid break or continue statment here... - * c-semantics.c (genrtl_break_stmt, genrtl_continue_stmt): From - here. Change original errors to abort. - -2003-11-24 Jan Hubicka - - * fold-const.c (fold): Do not return early when optimizing - COMPONENT_REF and constant. - -2003-11-24 Kazu Hirata - - * config/h8300/h8300.md (tablejump_h8300): Change to - *tablejump_h8300. - (tablejump_h8300h): Change to *tablejump_h8300hs_advanced. - (tablejump_normal_mode): Change to *tablejump_h8300hs_normal. - (indirect_jump_h8300): Change to *indirect_jump_h8300. - (indirect_jump_h8300h): Change to - *indirect_jump_h8300hs_advanced. - (indirect_jump_normal_mode): Change to - *indirect_jump_h8300hs_normal. - -2003-11-24 Kazu Hirata - - * config/h8300/h8300.md: Remove constraints from expanders. - -2003-11-24 Kazu Hirata - - * config/h8300/h8300.md: (stm_h8300s_2): Change the name to - stm_h8300s_2_advanced. - (stm_h8300s_2_normal): New. - (stm_h8300s_2): Likewise. - (stm_h8300s_3): Change the name to stm_h8300s_3_advanced. - (stm_h8300s_3_normal): New. - (stm_h8300s_3): Likewise. - (stm_h8300s_4): Change the name to stm_h8300s_4_advanced. - (stm_h8300s_4_normal): New. - (stm_h8300s_4): Likewise. - (ldm_h8300s_2): Change the name to ldm_h8300s_2_advanced. - (ldm_h8300s_2_normal): New. - (ldm_h8300s_2): Likewise. - (ldm_h8300s_3): Change the name to ldm_h8300s_3_advanced. - (ldm_h8300s_3_normal): New. - (ldm_h8300s_3): Likewise. - (ldm_h8300s_4): Change the name to ldm_h8300s_4_advanced. - (ldm_h8300s_4_normal): New. - (ldm_h8300s_4): Likewise. - (two peephole2's): Enable only with !TARGET_NORMAL_MODE. - (two peephole2's): New. - -2003-11-24 Zdenek Dvorak - - * genattrtab.c (simplify_cond): Update indices correctly. - (attr_alt_subset_p, attr_alt_subset_of_compl_p, attr_alt_intersection, - attr_alt_union, attr_alt_complement, attr_alt_bit_p, mk_attr_alt): New. - (check_attr_test, encode_units_mask, compute_alternative_mask, - make_alternative_compare, simplify_and_tree, - attr_rtx_cost, simplify_test_exp, gen_attr, - write_test_expr, walk_attr_value): Handle EQ_ATTR_ALT. - * rtl.def (EQ_ATTR_ALT): New. - -2003-11-23 Zdenek Dvorak - - * genattrtab.c (strcmp_check, DEF_ATTR_STRING): New macros. - (length_str, delay_type_str, delay_1_0_str, num_delay_slots_str): - New variables. - (main): Initialize them. - (find_attr): Canonicalize the attribute name string. - (attr_rtx_1, copy_boolean, expand_delays, gen_unit): Always canonicalize - string arguments. - (attr_printf, attr_eq): Use DEF_ATTR_STRING. - (check_attr_test, check_attr_value, make_length_attrs, - write_length_unit_log, simplify_by_exploding, gen_attr, - write_test_expr, write_attr_value, write_eligible_delay, - write_complex_function, make_internal_attr, - write_const_num_delay_slots): Changed due to change of type of - find_attr. - (fill_attr, evaluate_eq_attr, simplify_and_tree, - attr_rtx_cost, simplify_by_exploding, walk_attr_value): Use - strcmp_check. - -2003-11-23 Kazu Hirata - - PR target/13122 - * config/h8300/h8300.c (push): Call push_h8300hs_normal in - normal mode. - (pop): Call pop_h8300hs_normal in normal mode. - * config/h8300/h8300.md: Likewise. - (pushqi1_h8300hs_normal): New. - (pushqi1): Call pushqi1_h8300hs_normal in normal mode. - (pushhi1_h8300hs_normal): New. - (pushhi1): Call pushhi1_h8300hs_normal in normal mode. - (push_h8300hs_normal): New. - (pop_h8300hs_normal): Likewise. - -2003-11-23 Zdenek Dvorak - - * genattrtab.c (count_sub_rtxs): Removed. - -2003-11-23 Richard Earnshaw - - * recog.c (preprocess_constraints): Only zero those elements of - recog_op_alt that are needed for this insn. - * arm.c (note_invalid_constants): A function can't contain invalid - constants if it has no constraints. - -2003-11-22 Jan Hubicka - - * i386.c (classify_argument): Pass __float128 in memory. - (ix86_return_in_memory): Likewise. - (ix86_libcall_value): Likewsie. - -2003-11-22 Kazu Hirata - - * config/h8300/h8300.c (dosize): Convert to ISO-C. - -2003-11-22 J"orn Rennecke - - * flow.c (update_life_info): Amend comment about when a register - can become dead. - -2003-11-21 Kelley Cook - - * doc/.cvsignore: Delete. - -2003-11-21 Daniel Berlin - David Edelsohn - - * dwarf2out.c (add_location_or_const_value_attribute): Add support - for PARALLEL. - -2003-11-21 Rainer Orth - - * config/mips/t-iris6 (CRTSTUFF_T_CFLAGS): Add -Wno-error. - (TARGET_LIBGCC2_CFLAGS): Define. - - * crtstuff.c [HAS_INIT_SECTION] (__do_global_dtors): Declare. - (__do_global_ctors): Likewise. - -2003-11-21 Mark Wielaard - - * doc/invoke.texi (-O2): Doesn't enable -fweb. - -2003-11-21 Kazu Hirata - - * doc/invoke.texi: Mention dV and dZ. - -2003-11-21 Kazu Hirata - - * doc/invoke.texi: Update dump file names. - Remove de, dW, and dX. - -2003-11-20 James E Wilson - - PR c/13133 - * reload1.c (reload): Delete special handling for setjmp. - -2003-11-21 Andreas Tobler - - * mklibgcc.in: Evaluate shlib_slibdir_qual during link - step too. - * config/t-slibgcc-darwin: Adjust install path. - * config/rs6000/t-darwin: Revert multilib matches since - it is not used on darwin. - -2003-11-20 Richard Henderson - - * ssa.c, ssa-dce.c, ssa-ccp.c: Remove files. - * Makefile.in (OBJS-common, GTFILES): Don't reference them. - (gtype-desc.o, toplev.o, flow.o): Remove ssa.h. - (ssa.o, ssa-dce.o, ssa-ccp.o): Remove. - * flow.c: Don't include ssa.h. - (set_phi_alternative_reg): Remove. - (calculate_global_regs_live): Don't call it. - (mark_used_regs): Don't handle PHI. - * gengtype.c (open_base_files): Don't reference ssa.h. - * rtl.def (PHI): Remove. - * timevar.def (TV_TO_SSA, TV_SSA_CCP, TV_SSA_DCE, TV_FROM_SSA): Kill. - * common.opt: Remove -fssa, -fssa-ccp, -fssa-dce. - * opts.c (common_handle_option): Likewise. - * toplev.c (f_options): Likewise. - (DFI_ssa, DFI_ssa_ccp, DFI_ssa_dce, DFI_ussa): Remove. - (dump_file): Update to match. - (flag_ssa, flag_ssa_ccp, flag_ssa_dce): Remove. - (rest_of_handle_ssa): Remove. - (rest_of_compilation): Don't call it. - * toplev.h (flag_ssa, flag_ssa_dce, flag_ssa_ccp): Remove. - * doc/invoke.texi: Remove -fssa, -fssa-ccp, -fssa-dce. - * doc/passes.texi (SSA optimizations): Remove. - -2003-11-20 Bob Wilson - - * configure.in: Add xtensa-*-* targets to test for dwarf2 debug_line. - * configure: Regenerate. - -2003-11-20 Kelley Cook - - * Makefile.in (Makefile): Pass along CONFIG_SHELL. - -2003-11-20 David Mosberger - - * config/t-libunwind (LIB2ADDEH): Add unwind-c.c. - (SHLIB_LC): Define. - * unwind-libunwind.c (_Unwind_GetCFA): Implement. - (_Unwind_GetBSP) [UNW_TARGET_IA64]: New function. - -2003-11-20 Fariborz Jahanian - David Edelsohn - - * calls.c (expand_call): Allocate new temp in pass1. - (store_one_arg): If PARALLEL, calculate excess using mode size of - rtvec elt. - * expr.c (emit_push_insn): If PARALLEL, calculate offset using - mode size of rtvec elt. - * function.c (assign_parms): Use parm in register, if available. - -2003-11-20 Kazu Hirata - - * config/h8300/lib1funcs.asm (MOVP): Remove. - (ADDP): Likewise. - (CMPP): Likewise. - -2003-11-20 Richard Earnshaw - - * arm.c (use_return_insn): New argument, SIBLING. Support returning - with a single instruction if the stack has been decremented by 4 - and we have a frame pointer. Update all callers. - (output_return_instruction): Likewise. - (arm_output_epilogue): Change argument to SIBLING. Calculate - really_return from the new argument. Update all callers. - * arm.h (USE_RETURN_INSN): Pass NULL for the sibling. - * arm.md (sibcall_epilogue): Call use_return_insn directly, and - pass the sibling call. - * arm-protos.h (use_return_insn, arm_output_epilogue): Update - prototypes. - -2003-11-20 Joseph S. Myers - - * Makefile.in (extraclean): Delete. - * configure.in (target_list): Remove extraclean. - * configure: Regenerate. - * doc/makefile.texi, doc/sourcebuild.texi: Update. - * objc/Make-lang.in (objc.extraclean): Delete. - -2003-11-20 Joseph S. Myers - - * Makefile.in (lang_checks): Add. - (check-c++, check-f77, check-java, check-g++, check-g77, - check-objc): Remove hardcoded targets. - * doc/sourcebuild.texi: Document testsuite hooks. - * objc/Make-lang.in (check-objc, lang_checks): Add. - -2003-11-19 Scott Snyder - - PR target/13131 - * dwarf2out.c (gen_array_type_die): DW_AT_declaration should be a - flag, not a constant. - -2003-11-19 Kelley Cook - - * config/arc/arc-protos.h: Update to C90 prototypes. - * config/arc/arc.c: Likewise. - * config/arc/initfini.c: Likewise. - -2003-11-19 Andreas Krebbel - - * stmt.c (expand_goto): Memory clobbers added. - -2003-11-19 Andreas Krebbel - - * reload.c (find_reloads): Added missing type casts. - -2003-11-19 James E Wilson - - * combine.c (sets_function_arg_p): Delete unused function. - -2003-11-19 Eric Christopher - - * reload1.c (reload): Revert 2 previous checkins. - -2003-11-19 Nathanael Nerode - - * cpptrad.c (_cpp_scan_out_logical_line): Improve test for - whether directive begins at the beginning of a line. - -2003-11-19 Richard Sandiford - - * config/frv/frv.c (frv_init_libfuncs): Correct ufix_optab entries. - -2003-11-19 Gerald Pfeifer - - * doc/install.texi (Specific): Remove information on old versions - of glibc versus old versions of GCC. - -2003-11-19 Richard SAndiford - - * emit-rtl.c (gen_lowpart): Don't force MEMs into a register unless - the register lowpart is a TRULY_NOOP_TRUNCATION. - -2003-11-19 Richard Henderson - - * config/i386/i386.c (print_reg): Handle QI and HI modes for - non Q regs. - -2003-11-19 Andreas Tobler - - * config/config.gcc (powerpc-*-darwin*): Add libgcc build - specification file. - * config/t-slibgcc-darwin: New file, libgcc build specification. - * config/t-darwin: Add libgcc2 flag -fPIC. - * config/rs6000/t-darwin: Multilib matches float. - * libgcc-darwin.ver: New file, contains libgcc symbols. - -2003-11-18 Nathanael Nerode - - * config/ns32k/ns32k.h: Remove obsolete comment. - -2003-11-18 Roger Sayle - - PR middle-end/11821 - * config/arm/arm.c (arm_rtx_costs_1): Improve estimate of the code - size for calls to libgcc's div & mod subroutines when using -Os. - -2003-11-18 Jan Hubicka - - * cgraph.c (change_decl_assembler_name): Avoid bogus warnings. - -2003-11-18 Marc Espie - - * config/rs6000/sysv4.h: OpenBSD hooks. - -2003-11-18 Richard Henderson - - * expr.c (expand_expr): Don't look through constant arrays if - they don't bind locally. - -2003-11-17 Richard Kenner - - * expr.c (convert_move): Use GET_MODE_PRECISION instead of bitsize - when seeing if truncation or extension. - -2003-11-17 Eric Christopher - - * reload1.c (reload): Fix previous change. - -2003-11-17 Scott Snyder - - PR debug/11325 - * dwarf2out.c (struct die_struct): Add die_definition field. - (add_AT_specification): New. - (gen_subprogram_die, gen_variable_die, - gen_struct_or_union_type_die): Use it. - (prune_unused_types_mark): If we're marking a forward declaration, - also mark the full definition, if it exists. - -2003-11-16 Nick Clifton - - * config/stormy16/stormy16.h (BUILD_VA_LIST_TYPE): Delete. - * config/stormy16/stormy16-protos.h (xstormy16_build_va_list): - Remove prototype. - * config/stormy16/stormy16.c (xstormy16_build_va_list): Rename - to xstormy16_build_builtin_va_list and make static. - (TARGET_BUILD_BUILTIN_VA_LIST): Define. - -2003-11-16 Kazu Hirata - - * config/h8300/h8300-protos.h: Add the prototype for - same_cmp_following_p. - * config/h8300/h8300.c (same_cmp_following_p): New. - * config/h8300/h8300.md (peephole2): Use it. - -2003-11-16 Kazu Hirata - - * config/h8300/h8300.md: Don't use REGNO when its operand is - not guaranteed to be a REG. - -2003-11-16 Richard Sandiford - - * Makefile.in (expr.o): Depend on $(TARGET_H). - * target.h (return_in_msb): New target hook. - * target-def.h (TARGET_RETURN_IN_MSB): New macro. - (TARGET_CALLS): Include it. - * calls.c (shift_returned_value): New function. - (expand_call): Use it. - * expr.c: Include target.h. - (copy_blkmode_from_reg): Check targetm.calls.return_in_msb when - deciding what padding is needed. Change the name of the local - padding variable from big_endian_correction to padding_correction. - * stmt.c (shift_return_value): New function. - (expand_return): Use it. Adjust memory->register copy in the same - way as copy_blkmode_from_reg. Only change the return register's - mode if it was originally BLKmode. - * doc/tm.texi (TARGET_RETURN_IN_MSB): Document. - * config/mips/mips.c (TARGET_RETURN_IN_MSB): Define. - (mips_fpr_return_fields): New, split out from mips_function_value. - (mips_return_in_msb, mips_return_fpr_pair): New functions. - (mips_function_value): Rework to use the functions above. - * config/mips/irix6-libc-compat.c: Delete. - * config/mips/t-iris6 (LIB2FUNCS_STATIC_EXTRA): Undefine. - -2003-11-16 Kazu Hirata - - * doc/install.texi (--enable-checking): Update valgrind's URL. - -2003-11-16 Kazu Hirata - - * config/h8300/h8300.md: Fix warnings by replacing -2147483648 - with -2147483647 - 1. - -2003-11-16 Gerald Pfeifer - - Fix links in online manuals. - * doc/invoke.texi (H8/300 Options): @xref to ld, not ld.info. - (Precompiled Headers): @pxref to cpp, not cpp.info. - -2003-11-16 Jason Merrill - - * Makefile.in, objc/Make-lang.in (objc.tags): Create TAGS.sub - files in each directory and TAGS files that include them for each - front end. - -2003-11-15 Kazu Hirata - - * config/h8300/lib1funcs.asm (divnorm): Store the sign in bit - 3 of S2L. - (modnorm): Likewise. - (exitdiv): Look at bit 3 of S2L only. - -2003-11-15 Kazu Hirata - - * config/h8300/h8300.h (DO_GLOBAL_CTORS_BODY): Fix warnings. - (DO_GLOBAL_DTORS_BODY): Likewise. - -2003-11-15 Joseph S. Myers - - * doc/install.texi (Prerequisites): Refine documentation of - autoconf, automake and perl requirements. Document required - gettext version. - -<2003-11-14 Jason Merrill - - * function.c (assign_parms): Use TREE_TYPE to determine the real - type of the argument object. - -2003-11-14 Kazu Hirata - - * config/h8300/lib1funcs.asm (___udivsi3): Peel off the first - iteration. - -2003-11-14 Fariborz Jahanian - - * config/rs6000/rs6000.c (rs6000_move_block_from_reg): - New routine to save vararg registers on stack. Support for - -mpowerpc64 in mixed mode. - -2003-11-14 Bernardo Innocenti - - * config/m68k/m68k.c: Use C statements instead of #ifdef's when testing - for MOTOROLA versus MIT syntax. Improves readability and provides - better compile-time error checking for both code paths. - -2003-11-14 Kelley Cook - - * config/frv/frv-protos.h: Update for C90. - * config/frv/frv.h: Likewise. - * config/frv/frvbegin.c: Likewise. - * config/frv/frv.c: Likewise. - (frv_adjust_field_align): Delete unused variable. - -2003-11-14 Geoffrey Keating - - * config/rs6000/rs6000.md: Add 'DEFAULT_ABI == ABI_DARWIN' - to each place where TARGET_LONG_DOUBLE_128 is used with - DEFAULT_ABI == ABI_AIX. - - * cppfiles.c (_cpp_find_file): Make 'one or more PCH files were found' - message comply with GNU standards. - -2003-11-14 Richard Kenner - - PR/6552 - * function.c (struct epi_info): New field const_equiv. - (update_epilogue_consts): New function. - (keep_stack_depressed): Clear new field and verify scratch register - doesn't have it set. - Call new function via note_stores. - (handle_epilogue_set): Allow setting SP equiv reg in different mode. - Allow PLUS where second operand is register known set to constant. - (emit_equiv_load): Write load using proper mode if source different. - * config/mips/mips.md (return_internal): Put (return) first. - -2003-11-14 Kazu Hirata - - * config/h8300/lib1funcs.asm (___udivsi3): Add a comment. - -2003-11-14 Kazu Hirata - - * config/h8300/lib1funcs.asm (modsi3): Don't save unused - registers. - (divsi3): Likewise. - (reti): Don't restore unused registers. - -2003-11-14 Nick Clifton - - * config/fr30/fr30.c: Include toplev.h - -2003-11-14 Richard Earnshaw - - * except.c (sjlj_emit_function_enter): Mark internal label as LOCAL. - -2003-11-14 Richard Earnshaw - - * arm.c (arm_emit_vector_const, arm_output_load_gr): Use ISO C - function definition syntax. - -2003-11-14 Eric Christopher - - * reload1.c (reload): Revert previous patch. Make - check for assignment into reg_equiv_address stricter. - -2003-11-14 Arnaud Charlet - - * Makefile.in (POSTSTAGE1_FLAGS_TO_PASS): Pass ADAFLAGS. - -2003-11-14 Richard Sandiford - - * config/frv/frv.c (frv_in_small_data_p): Return false for unknown - section names. - -2003-11-14 Jason Merrill - - PR middle-end/12526 - * tree.c (build): A CALL_EXPR has side-effects if its arguments do. - * calls.c (call_expr_flags): New fn. - * tree.h: Declare it. - -2003-11-13 Kazu Hirata - - * config/h8300/lib1funcs.asm (__udivsi3): Remove. - (divmodsi3): Change the name to ___udivsi3. - Update all callers. - -2003-11-13 Kaveh R. Ghazi - - * libgcc2.c (__negdi2, __addvsi3, __addvdi3, __subvsi3, __subvdi3, - __mulvsi3, __negvsi2, __negvdi2, __mulvdi3, __lshrdi3, __ashldi3, - __ashrdi3, __ffsDI2, __muldi3, __clzDI2, __ctzDI2, __parityDI2, - __udivmoddi4, __divdi3, __moddi3, __cmpdi2, __ucmpdi2, - __fixunstfDI, __fixunsxfDI, __fixunsdfDI, __fixunssfDI, - __floatdixf, __floatditf, __floatdidf, __floatdisf, __gcc_bcmp): - Const-ify and/or initialize automatic variables at declaration. - -2003-11-13 Kazu Hirata - - * config/h8300/lib1funcs.asm (divmodsi4): Replace all the uses - of er4 with er3. Adjust all callers. - -2003-11-13 Andrew Pinski - - * config/darwin.c (machopic_output_possible_stub_label): - Allow stub symbol be not defined when outputting possible - stub label. - -2003-11-13 Kazu Hirata - - * config/h8300/lib1funcs.asm (___udivsi3): Jump to reti - instead of exitdiv. - (___umodsi3): Likewise. - (exitdiv): Do not restore any register. - (reti): Restore registers. - -2003-11-13 Steven Bosscher - - * tree-inline.c (walk_tree): Handle PLACEHOLDER_EXPR. - -2003-11-13 Kazu Hirata - - * config/h8300/lib1funcs.asm: Fix comment typos. - -2003-11-13 Kazu Hirata - - * config/h8300/lib1funcs.asm (udivsi3): Don't save/restore - unused registers. Don't jump to exitdiv. - (umodsi3): Likewise. - -2003-11-13 Mark Mitchell - Kean Johnston - - PR c/13029 - * toplev.c (check_global_declarations): Do not warn about unused - static consts. - -2003-11-13 Pavel Pisa - Kazu Hirata - - * config/h8300/lib1funcs.asm (DenHighNonZero): Optimize using - the approximate quotient method. - -2003-11-13 Richard Earnshaw - - * combine.c (distribute_notes): When re-distributing the notes from - an insn we are about to delete, ensure we can't end up with a cyclic - list of notes. - -2003-11-13 Eric Botcazou - - PR optimization/12926 - * expr.c (expand_assignment) [COMPONENT_REF]: Don't put - the UNCHANGING_RTX_P flag on memory references to read-only - components that are not addressable. - -2003-11-12 Kazu Hirata - - * config/h8300/lib1funcs.asm (divmodsi4): Clear S0P in - DenHighNonZero. - -2003-11-13 Jan Hubicka - - PR opt/12275 - * c-decl.c (finish_decl): Use change_decl_assembler_name. - * c-pragma.c (handle_pragma_redefine_extname): Likewise. - * varasm.c (make_decl_rtl): Likewise. - * cgraph.c (change_decl_assembler_name): New function. - * tree.h (set_decl_assembler_name): Kill dead declaration. - (change_decl_assembler_name): Declare. - - * decl.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name. - * decl2.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name. - -2003-11-12 Kazu Hirata - - * config/h8300/lib1funcs.asm (___mulsi3): Don't save/restore - an unused register. - -2003-11-12 Richard Sandiford - - PR bootstrap/12752 - * config/mips/t-iris6 (MULTILIB_OPTIONS): Put -mabi=n32 first. - (MULTILIB_OSDIRNAMES): Reorder accordingly. - -2003-11-12 Janis Johnson - - * rs6000-protos.h (rs6000_initial_elimination_offset): Add. - (rs6000_stack_info): Remove. (debug_stack_info): Remove. - (rs6000_emit_eh_reg_restore): Add - * rs6000.c (rs6000_stack_t): Move from rs6000.h, change data type - of vars_size and total_size to HOST_WIDE_INT. - (emit_frame_save): Change parameter size to HOST_WIDE_INT. - (rs6000_stack_info): Make static; change data size to HOST_WIDE_INT. - (debug_stack_info): Make static; change output format of HOST_WIDE_INT - values. - (rs6000_emit_eh_reg_restore): New, with code formerly in rs6000.md. - (rs6000_initial_elimination_offset): New, with code formerly in - INITIAL_ELIMINATION_OFFSET. - * rs6000.h (rs6000_stack_t): Remove. - (INITIAL_ELIMINATION_OFFSET): Replace code with call to function - rs6000_initial_elimination_offset. - * rs6000.md (UNSPECV_EH_RR split): Replace code with call to - rs6000_emit_eh_reg_restore. - -2003-11-12 Mike Stump - - * c-typeck.c (c_convert_parm_for_inlining): Add argnum, which - is the argumnt we are processing so that warnings and errors - will have that information. - * c-tree.h (c_convert_parm_for_inlining): Add argnum. - * lang-hooks-def.h - (lhd_tree_inlining_convert_parm_for_inlining): Likewse. - * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): Likewise. - * langhooks.h (convert_parm_for_inlining): Likewise. - * tree-inline.c (initialize_inlined_parameters): Compute and - pass argnum down. - -2003-11-12 Alexey Starovoytov - Roger Sayle - - PR optimization/12953 - * tree-inline.c (inline_forbidden_p_1): Added check for BUILT_IN - before switch by FUNCTION_CODE. - -2003-11-12 Richard Earnshaw - - * arm.md (storehi): Avoid use of explicit subreg. - (storehi_bigend, storeinthi, movhi_bigend): Likewise. - -2003-11-12 J"orn Rennecke - - * config/sh/sh.md (prefetch): New pattern. - -2003-11-11 Eric Christopher - - * reload1.c (reload): Verify that addresses for - reg_equiv_* are valid for the architecture. - -2003-11-11 Eric Christopher - - * function.c (purge_addressof_1): Add libcall check. - Remove test for cached replacements on fallback case. - Simplify mode comparisons. Add libcall test for - paradoxical subregs. - -2003-11-11 Kazu Hirata - - * config/h8300/t-h8300: Fix an obsolete comment. - -2003-11-11 James E Wilson - - * expmed.c (store_bit_field, extract_bit_field): Revert last two - changes. - -2003-11-11 Kazu Hirata - - * config/h8300/lib1funcs.asm: Replace DenHighZero with - DenHighNonZero. - -2003-11-11 Jan Hubicka - - * cgraphunit.c (cgraph_function_possibly_inlined_p): Use - really_no_inline. - -2003-11-11 John David Anglin - - * pa.h (TRAMPOLINE_TEMPLATE): Fix flushing of cache lines when - generating 64-bit code. - -2003-11-10 David Edelsohn - - * config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Remove - accidental commit in previous change. - -2003-11-10 Fariborz Jahanian - - * config/rs6000/rs6000.h (STACK_SIZE_MODE): Add definition. - * config/rs6000/rs6000.c (reg_or_mem_operand): Add macho-style - address recognition. - (macho_lo_sum_memory_operand): Routine to recognize macho-style - address recognition. - -2003-11-10 Richard Henderson - - * dwarf2out.c (gen_label_die): Cope with DECL_RTL not set. - -2003-11-10 Matt Austern - - * config/darwin-protos.h (darwin_assemble_visibility): Declare. - * config/darwin.c (darwin_assemble_visibility): Define. Warn for - anything other than VISIBILITY_DEFAULT and VISIBILITY_HIDDEN. - * config/darwin.h (TARGET_ASM_ASSEMBLE_VISIBILITY): Use - darwin_assemble_visibility instead of default. - -2003-11-10 Waldek Hebisch - - PR target/12865 - * config/sparc/sparc.c (sparc_initialize_trampoline): Call - __enable_execute_stack only after writing onto the stack. - (sparc64_initialize_trampoline): Likewise. - -2003-11-09 Roger Sayle - - * loop.c (check_dbra_loop): Try swapping the comparison operands - of the loop condition to identify a suitable induction variable. - * unroll.c (loop_iterations): Likewise. - -2003-11-09 Kaveh R. Ghazi - - * config/sparc/sparc.h (TARGET_CPU_CPP_BUILTINS): Fix sparc vs - sparc64 #cpu and #machine assertions. - -2003-11-09 Richard Henderson - - * Makefile.in (rtlanal.o): Depend on BASIC_BLOCK_H. - -2003-11-09 Jan Hubicka - - * tree-optimize.c (tree_rest_of_compilation): Fix warning. - - * cgraphunit.c (cgraph_expand_function): Use - cgraph_possibly_inlined_p. - * tree-optimize.c (tree_rest_of_compilation): Do not kill saved tree. - - * opts.c (common_handle_option): Do not set max-inline-insns. - * params.def: Update comments. - (PARAM_MAX_INLINE_INSNS): Kill. - * invoke.texi (max-inline-insns): Kill. - -2003-11-08 Joseph S. Myers - - PR c/3190 - PR c/8714 - * c-format.c (set_Wformat): Do not enable -Wformat-y2k by default. - * invoke.texi: Update. - -2003-11-08 John David Anglin - - PR optimization/12630 - * pa.c (compute_movstrsi_length): Rename to compute_movstr_length. - Handle length computation 64-bit moves. - (compute_clrstr_length, output_block_clear): Implement block clear. - (output_block_move): Handle 64-bit moves. - (pa_adjust_insn_length): Use compute_movstr_length and - compute_clrstr_length. - * pa.md (movstrsi): Revise operand order and comments. Don't use - match_scratch. - (movstrsi_internal): Delete. - (movstrsi_prereload, movstrsi_postreload): New insns. Define splitter - and peephole2 patterns to transform prereload to postreload form. - (movstrdi, movstrdi_prereload, movstrdi_postreload, clrstrsi, - clrstrsi_prereload, clrstrsi_postreload, clrstrdi, clrstrdi_prereload, - clrstrdi_postreload): New patterns for 64-bit block move, and block - clear. - * pa-protos.h (output_block_clear): New prototype. - -2003-11-08 Andreas Schwab - - * dbxout.c (current_file): Also wrap inside DBX_DEBUGGING_INFO || - XCOFF_DEBUGGING_INFO. - -2003-11-08 Kaveh R. Ghazi - - * dbxout.c (current_file): Wrap declaration in DBX_USE_BINCL. - -2003-11-07 Geoffrey Keating - - * config/rs6000/rs6000.c (rs6000_legitimize_address): Remove - redundant parens. - - * cppfiles.c (pch_open_file): New parameter 'invalid_pch', set it. - (find_file_in_dir): Likewise. - (_cpp_find_file): Print message if no header file is found - but an invalid PCH file was. - -2003-11-08 Joseph S. Myers - - * c-typeck.c (pedantic_lvalue_warning): Deprecate compound - expressions as lvalues. - (internal_build_compound_expr): Remove special handling for - non-pedantic case. - * doc/extend.texi: Document that all extended lvalues are now - deprecated. - -2003-11-07 Geoffrey Keating - - PR 11654 - * dbxout.c (struct dbx_file): Do not save for PCH. - (current_file): Likewise. - (dbxout_init): Don't allocate struct dbx_file using GC. - (dbxout_start_source_file): Likewise. - -2003-11-07 Falk Hueffner - - * config/alpha/elf.h, config/alpha/unicosmk.h, - config/alpha/vms.h: Convert to ISO C90. - -2003-11-07 Nathanael Nerode - - * config/arm/pe.h: Convert to ISO C90. - -2003-11-07 J"orn Rennecke - - * sh-protos.h (sh_pch_valid_p): Declare. - * sh.c ("intl.h"): Include. - (TARGET_PCH_VALID_P): Override. - (sh_target_switches): New variable. - (target_switches): Define. - (sh_pch_valid_p): New function. - - * sh.h (MODE_AFTER): Don't change mode unless TARGET_HITACHI. - -2003-11-07 Jan Hubicka - - * i386.c (x86_64_sign_extended_value): Return false from tls variables. - (x86_64_zero_extended_value): likewise. - -2003-11-07 Richard Sandiford - - * config/mips/mips.md (loadgp): Take $25 as a second operand. - * config/mips/mips.c (mips_expand_prologue): Modify accordingly. - -2003-11-06 Matt Austern - - * c-common.c (handle_visibility_attribute): Set DECL_VISIBILITY - field instead of hanging an attribute object off the decl. - * tree.h (DECL_VISIBLITY): New accessor macro for - symbol_visibility field in struct tree_decl. - (enum symbol_visibility): Move definition to before tree_decl. - (struct tree_decl): Define new two-bit field, symbol_visibility. - (decl_visibility): Remove declaration. - * varasm.c (maybe_assemble_visibility): Use DECL_VISIBILITY - instead of decl_visibility. - (default_binds_local_p_1): Use DECL_VISIBILITY instead of - decl_visibility. - (decl_visibility): Remove. - -2003-11-06 Ulrich Weigand - - * config/s390/s390.c (s390_emit_epilogue): Recognize more cases - where register 14 will be saved. - -2003-11-06 Geoffrey Keating - - * config/rs6000/rs6000.h (USE_FP_FOR_ARG_P): Move to rs6000.c. - (USE_ALTIVEC_FOR_ARG_P): Likewise. - * config/rs6000/rs6000.c (USE_FP_FOR_ARG_P): Move from rs6000.h. - Take a pointer as the CUM parameter. Update callers. - (USE_ALTIVEC_FOR_ARG_P): Likewise. Also correct for Darwin/AIX - 32-bit ABIs. - (function_arg_advance): Use USE_ALTIVEC_FOR_ARG_P. Correct case - of vector parameters as named arguments of stdarg function. - (function_arg): Likewise. - - * config/rs6000/darwin.h (ASM_SPEC): Use -force_cpusubtype_ALL when - -maltivec is specified, not the non-existent -faltivec. - -2003-11-06 Ulrich Weigand - - * config/s390/s390-protos.h (s390_function_value): Declare. - * config/s390/s390.c (TARGET_RETURN_IN_MEMORY): Define. - (s390_return_in_memory): New function. - (s390_function_value): New function. - (s390_function_arg_float): Return false for all arguments larger - than 8 bytes. - (s390_function_arg_pass_by_reference): Likewise. Return true for - all vector arguments. - (s390_function_arg_integer): New function. - (s390_function_arg_advance): Call it. Add sanity checks. - (s390_function_arg): Likewise. - * config/s390/s390.h (FUNCTION_VALUE): Call s390_function_value. - (LIBCALL_VALUE): Likewise. - (RET_REG): Remove. - (RETURN_IN_MEMORY): Remove. - -2003-11-06 Richard Sandiford - - * config/mips/mips-protos.h (mips_initial_elimination_offset): Change - return type to HOST_WIDE_INT. - * config/mips/mips.c (mips_frame_info): Give sizes type HOST_WIDE_INT. - Make initialized a bool. Make register masks unsigned ints. - (compute_frame_size): Make same mask change here. Use HOST_WIDE_INT - where appropriate. - (mips_initial_elimination_offset): Return a HOST_WIDE_INT. - (mips_output_function_prologue): Print sizes as HOST_WIDE_INTs. - -2003-11-06 Richard Sandiford - - * config/frv/frv.c (frv_initial_elimination_offset): Remove bogus - negation. - -2003-11-06 Richard Sandiford - - * config/frv/frv.h (ASM_OUTPUT_ALIGN_WITH_NOP): Define. - -2003-11-06 Momchil Velikov - - * config/mips/mips.c (override_options): Set MASK_SOFT_FLOAT - for VR4111 too. - -2003-11-06 Jan Hubicka - - * builtins.c (simplify_builtin_strrchr, simplify_builtin_strpbrk): Add - missing casts. - -2003-11-06 Zack Weinberg - - * genmodes.c: Change the word "bitsize" to "precision" throughout. - * machmode.def: Likewise. - * machmode.h (GET_MODE_SIZE): Cast value to unsigned short. - (GET_MODE_BITSIZE): Define as GET_MODE_SIZE * BITS_PER_UNIT. - (GET_MODE_PRECISION): New macro. - (mode_bitsize): Renamed mode_precision. - * stor-layout.c (mode_for_size, smallest_mode_for_size): - Use GET_MODE_PRECISION; clarify comments. - -2003-11-05 Joseph S. Myers - - * doc/install-old.texi: Remove old documentation of building - cross-compilers. - * doc/install.texi: Move some of it to here. - -2003-11-05 Per Bothner - - PR preprocessor/12891 - * c-opts.c (finish_options): Set include_cursor to disable premature - calls to push_command_line_include from cpp_scan_nooutput. - Fixes bug reported by DJ Delorie. - -2003-11-05 Geoffrey Keating - - * config/rs6000/rs6000.c (setup_incoming_varargs): Remove - code supporting old-style varargs. - - * config/rs6000/rs6000.c (rs6000_machopic_legitimize_pic_address): Use - an intermediate register for better optimisation. - -2003-11-05 Zdenek Dvorak - - PR optimization/10080 - * cfgloopanal.c (variable_initial_value, variable_initial_values, - simple_loop_exit_p): Record the fact that initial value is extended - from inner mode. - (count_strange_loop_iterations, count_loop_iterations): Handle - ivs that iterate in a narrower mode. Fix handling of overflows. - Improve handling of NE conditions. - (inverse, fits_in_mode_p): New static functions. - (simple_increment): Detect variables that iterate in a narrower mode. - * cfgloop.h (struct loop_desc): Fields inner_mode and extend added. - -2003-11-05 Geoffrey Keating - - * config/rs6000/rs6000.c (compute_vrsave_mask): Correct off-by-one - error. - - * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Darwin - needs VRSAVE. - -2003-11-05 Joseph S. Myers - - * c-typeck.c (pedantic_lvalue_warning): Deprecate use of - conditional expressions as lvalues. - -2003-11-05 Kazu Hirata - - * tsystem.h: Add the prototype of strlen. - * unwind-pe.h (read_encoded_value_with_base): Add an - appropriate cast to handle a case where the pointer size is - smaller than sizeof (int). - -2003-11-04 Richard Sandiford - - * config/mips/mips-protos.h (mips_global_pic_constant_p): Delete. - (mips_delegitimize_address): Delete. - (mips_gotoff_global, mips_load_got_page): Declare. - (mips_load_got_global, mips_rewrite_small_data): Declare. - - * config/mips/mips.h (FIND_BASE_TERM): Remove definition. - (DANGEROUS_FOR_LA25_P): Use global_got_operand. - (PREDICATE_CODES): Add global_got_operand, local_got_operand and - small_data_pattern. Remove CONST from const_arith_operand's entry. - - * config/mips/mips.c (UNSPEC_ADDRESS_P, CONST_GP_P): New macros. - (UNSPEC_ADDRESS, UNSPEC_ADDRESS_TYPE): Likewise. - (mips_constant_type): Delete. - (mips_symbol_type): Add SYMBOL_GOTOFF_PAGE, SYMBOL_GOTOFF_GLOBAL, - SYMBOL_GOTOFF_CALL and SYMBOL_GOTOFF_LOADGP. - (NUM_SYMBOL_TYPES): New macro. - (mips_address_type): Remove ADDRESS_INVALID. - (machine_function): Add has_gp_insn_p. - (mips_constant_info): Delete. - (mips_address_info): Add the address type as an extra field. Replace - the c field with symbol_type. - (mips_split_p, mips_lo_relocs, mips_hi_relocs): New arrays. - (TARGET_DELEGITIMIZE_ADDRESS): Remove definition. - (mips_reloc_offset_ok_p, mips_classify_constant): Delete. - (mips_split_const, mips_symbolic_constant_p): New functions. - (mips_symbolic_address_p): Take the symbol type and mode as arguments. - (mips_classify_address): Return true if the address is valid, storing - its type in INFO. Use mips_symbolic_constant_p. Use mips_lo_relocs[] - to test whether a LO_SUM address is allowed. - (mips_symbol_insns): Return 0 for general mips16 symbols. - Reorder SYMBOL_GOT_GLOBAL case to match mips_symbol_type definition. - Handle the new SYMBOL_GOTOFF_*s. - (mips_address_insns): Update call to mips_classify_address. - (mips_const_insns): Be more fussy about HIGH constants. Remove use - of mips_classify_constant. Be more accurate about CONSTs. - (mips_global_pic_constant_p): Delete. - (const_arith_operand): Only accept CONST_INTs. - (call_insn_operand): Remove call to mips_classify_constant. - Let mips_symbolic_constant_p check for invalid offsets. - (move_operand): Check for general_operands first. Only accept symbolic - constants if they satisfy mips_symbolic_constant_p and cannot be split. - (symbolic_constant): Use mips_symbolic_constant_p. - (global_got_operand, local_got_operand): New predicates. - (stack_operand): Update call to mips_classify_address. - (mips_legitimate_address_p): Likewise. - (mips_reloc, mips_lui_reloc): Delete. - (mips_force_temporary): Only use the given temporary if no_new_pseudos. - Use emit_move_insn. - (mips_split_symbol, mips_unspec_address): New functions. - (mips_unspec_offset_high): New function. - (mips_load_got): Replace reloc argument with a symbol_type. - Use mips_unspec_address to create the address and put it in a - LO_SUM with the base register. - (mips_load_got16, mips_load_got32): Delete. - (mips_emit_high, mips_legitimize_symbol): Delete. - (mips_gotoff_global): New function. - (mips_load_got_page, mips_load_got_global): New functions. - (mips_legitimize_symbol): Inline handling of LO_SUM splits. - (mips_legitimize_const_move): Likewise. Remove HIGH handling. - Inline code to handle constants plus invalid offsets. Use - mips_split_symbol to legitimize constant pool addresses. - (mips_delegitimize_address): Delete. - (mips_rtx_costs): Give legitimate symbolic constants and CONST_DOUBLEs - a cost of 1 insn. Give the rest a cost of CONSTANT_POOL_ADDRESS. - (mips_subword): Pass memrefs through mips_rewrite_small_data. - (mips_output_move): Remove use of mips_classify_constant. - (mips_expand_call): Use mips_unspec_offset_high to calculate the - high part of the GOT address for calls to global functions. - (override_options): Initialize mips_split_p[], mips_lo_relocs[] - and mips_hi_relocs[]. - (print_operand): Use print_operand_reloc to handle '%h' and '%R'. - Remove use of mips_classify_constant. - (mips_reloc_string): Delete. - (print_operand_reloc): New function. - (print_operand_address): Update call to mips_classify_address. - (mips_rewrite_small_data_p, small_data_pattern_1): New functions. - (small_data_pattern): New predicate. - (mips_rewrite_small_data_1, mips_rewrite_small_data): New functions. - (mips_function_has_gp_insn): New function. - (mips_global_pointer): Use it. - (mips_gp_insn): Delete. - (mips_expand_prologue): When compiling for n32/n64 abicalls, use a - single loadgp pattern to initialize $gp. Pass it the offset of _gp - from the start of the current function. - (mips16_gp_pseudo_reg): Revert last patch. - - * config/mips/mips.md (RELOC_*): Delete. - (UNSPEC_LOADGP, UNSPEC_FIRST_ADDRESS): New constants. - (got): New insn attribute. - (type): Set to "load" if got == load. - (length): Set to 4 if got == load, 8 if got == xgot_high. - (lui[sd]i): Delete. - (*xgot_hi[sd]i, *xgot_lo[sd]i): New patterns. - (*got_disp[sd]i, *got_page[sd]i): Likewise. - (*low[sd]i): Change constraints to "d". Add a new define_split to - rewrite small data constants into LO_SUMs. - (loadgp): New insns. - -2003-11-04 Rainer Orth - - * config/mips/_tilib.c: Use _ABI* in _MIPS_SIM tests. - -2003-11-04 DJ Delorie - - * config/v850/v850.md (mulhisi3): Expand the const_int case - separately to avoid trying to sign extend the const. - -2003-11-04 Richard Sandiford - - * emit-rtl.c (copy_rtx_if_shared): Don't allow MEMs with constant - addresses to be shared. - (force_const_mem): Return a copy of the pool entry. - -2003-11-03 Andreas Jaeger - - * Makefile.in (GCC_CFLAGS): Remove @WERROR@ again. - -2003-11-03 Kelley Cook - - * Makefile.in (cpp.dvi): New target split from cpp.info. - (gcc.dvi): New target split from gcc.info. - (gccint.dvi): New target split from gccint.info. - (cppinternals.dvi): New target split from cppinternals.info - (gccinstall.info): New specific rule. - (gccinstall.dvi): Likewise. - (dvi): Move targets to $(docobjdir). - ($(docobjdir)/%.dvi): New implicit rule. - -2003-11-03 Richard Kenner - - * doc/gty.texi (tag, desc): Say more about role of desc values in - selecting between tags. - -2003-11-03 Alexander Kabaev - - * real.c (encode_ieee_single): Ensure proper promotion. - -2003-11-03 Volker Reichelt - - * doc/contrib.texi: Add Giovanni Bajo, Dara Hazeghi, Falk Hueffner, - and Andrew Pinski. - -2003-11-03 Syd Polk - - * config/rs6000/rs6000.c (rs6000_override_options): Add G3, G4, and G5 - marketing names to the list of supported processors. - * config/rs6000/rs6000.h: Ditto. - * doc/invoke.texi: Ditto. - * config.gcc: Ditto. - -2003-11-03 Rainer Orth - - * fixinc/inclhack.def (stdio_va_list): Allow tab before va_list. - Merge two substitutions. - * fixinc/fixincl.x: Regenerate. - Fixes PR bootstrap/12666. - -2003-11-03 Joseph S. Myers - - * doc/install-old.texi: Remove VMS documentation. - -2003-11-03 Jan Hubicka - - * i386.c (override_options): Remove hack enabling 128bit long double - commited by accident. - -2003-11-02 Per Bothner - - * c-opts.c (needValue): Do cpp_find_main_file before processing - any imacros flags, so pfile->main_file is set for the latter. - -2003-11-03 Andreas Jaeger - Zack Weinberg - - * Makefile.in (GCC_CFLAGS): Allow blacklisting of warnings. - (SYSCALLS.c.X-warn): Suppress warnings. - -2003-11-02 John David Anglin - - PR optimization/12845 - * pa.c (output_cbranch): Use cmpb for DImode comparisons with 0. - -2003-11-02 Zack Weinberg - - * print-rtl.c (print_rtx): Call PRINT_REG with second argument -1. - * config/i386/i386.c (print_reg): Abort on a virtual register - if code != -1; not if file == asm_out_file. - * config/i386/i386.h (PRINT_REG): Document meaning of CODE == -1. - (DEBUG_PRINT_REG): Delete, unused. - -2003-11-02 Andreas Schwab - - * config/ia64/fde-glibc.c (_GNU_SOURCE): Define to 1 instead of - empty to avoid conflict with the definition from configure. - -2003-11-02 Roger Sayle - - PR optimization/10817 - * ifcvt.c (noce_emit_move_insn): Improve documentation comment. - (noce_try_move): New function to optimize an if-the-else into an - unconditional move, i.e. "if (a!=b) x=a; else x=b" into "x=a". - (noce_process_if_block): Attempt simplification with noce_try_move. - - * simplify-rtx.c (simplify_ternary_operation): Some minor fixes - and improvements to the optimizations of IF_THEN_ELSE expressions. - (simplify_subreg): Silence signed/unsigned comparison warning. - -2003-11-02 Richard Sandiford - - * Makefile.in (targhooks.o, reload.o): Update dependencies. - (GTFILES): Add targhooks.c. - (gt-targhooks.h): New rule; depend on s-gtype. - * target.h (direct_pool_load_p): New hook. - * target-def.h (TARGET_DIRECT_POOL_LOAD_P): New macro. - (TARGET_INITIALIZER): Include it. - * targhooks.h (default_direct_pool_load_p): Declare. - (hook_bool_machine_mode_true): Declare. - * targhooks.c: Include insn-config.h, recog.h, ggc.h and - gt-targhooks.h. - (pool_symbol): New variable. - (default_direct_pool_load_p): New function. - (hook_bool_machine_mode_true): New function. - * reload.c: Include target.h. - (find_reloads): If an alternative will force a constant into memory, - count an extra reload if constant pool symbols are not valid - addresses. If an alternative uses memory to move values between - registers, count the move as two reloads rather than one. - * config/s390/s390.c (TARGET_DIRECT_POOL_LOAD_P): Define. - * doc/tm.texi (TARGET_DIRECT_POOL_LOAD_P): Document. - -2003-11-02 Eric Botcazou - - PR optimization/12799 - * postreload.c (reload_cse_move2add): Generate the add2 - patterns manually. - -2003-11-02 Eric Botcazou - - * config/sparc/sparc.c (function_arg_partial_nregs) [TARGET_ARCH64]: - Return 0 for all complex modes whose size is lesser or equal to - a word. Add a ??? comment for the condition used with 16-byte - aligned modes. - -2003-11-01 Kelley Cook - - * .cvsignore: Remove c-parse* and tradcif.c. - * objc/.cvsignore: Delete. - -2003-11-01 Roger Sayle - - * unwind-sjlj.c (_Unwind_GetCFA): Return (_Unwind_Word)0 instead - of NULL. - -2003-11-01 John David Anglin - - * som.h (DO_GLOBAL_DTORS_BODY): Change to C90 declaration. - - * libgcc2.c (SYMBOL__MAIN): Provide C90 declaration. - - * collect2.c (scan_libraries): Fix typos. - - PR preprocessor/12847 - * cppfiles.c, cppexp.c, cpperror.c, cpplib.h, cpplib.c, cpplex.c, - cppinit.c, cpptrad.c, cppmacro.c, fix-header.c, cpppch.c, c-pch.c, - c-incpath.c, cppcharset.c (DL_WARNING, DL_WARNING_SYSHDR, DL_PEDWARN, - DL_ERROR, DL_ICE, DL_EXTRACT, DL_WARNING_P): Prefix macro names with - "CPP_". - -2003-11-01 Fariborz Jahanian - - * config/rs6000/rs6000.c (rs6000_mixed_function_arg): Correct - no_units calculation. - -2003-11-01 Andreas Jaeger - - * unwind-dw2.c (_Unwind_FrameState): Remove commas at end of - enumeration list. - -2003-11-01 Andreas Schwab - - * config/ia64/sysv4.h (SDATA_SECTION_FUNCTION): Update to C90 - prototypes. - (SBSS_SECTION_FUNCTION): Likewise. - -2003-11-01 Andreas Jaeger - - * Makefile.in (GCC_CFLAGS): Add @WERROR@ for target files. - -2003-11-01 Andreas Tobler - - * config/rs6000/sysv4.h (EXTRA_SECTION_FUNCTIONS): Update to C90 - prototypes. - -2003-11-01 Andreas Jaeger - - * unwind-dw2.c (_Unwind_FindEnclosingFunction): Constify variable. - (uw_frame_state_for): Constify variables. - (extract_cie_info): Constify first argument. - - * unwind-dw2-fde-darwin.c: Adjust prototype of - _Unwind_Find_registered_FDE for recent changes. - (examine_objects): Constify return value and local variable result. - (_Unwind_Find_FDE): Constify return value and local variable ret. - -2003-10-31 Per Bothner - - * c-opts.c (finish_options): Change to returns boolean - false iff - the call to cpp_find_main_file fails. - (c_common_init): Skip preprocess_file if finish_options failed. - (c_common_parse_file): Break if finish_options failed. - Fixes PR preprocessor/12545. - -2003-10-31 John David Anglin - - * aclocal.m4: Blacklist ultrix* for mmap file. - * configure: Rebuilt. - - * function.c (assign_parms): Add ATTRIBUTE_UNUSED to variable - reg_parm_stack_space. - * toplev.c (default_get_pch_validity): Fix warning. - - * vax.c: Include toplev.h. - (vax_init_libfuncs): Fix typo (umod). - * vax.h (ASM_COMMENT_START): Define. - (PRINT_OPERAND): Fix warning when HOST_WIDE_INT is a long long. - -2003-10-31 Roger Sayle - - PR middle-end/11968 - * expr.c (expand_expr ): Remove inappropriate and - confusing comment; distributivity isn't handled in expand_expr. - * fold-const.c (extract_muldiv_1 ): Allow overflow - in distributivity, if wrap-around semantics are specified with - -fwrapv. - -2003-11-01 Alan Modra - - PR 12315 - * final.c (profile_function): Allow for NULL svrtx. - -2003-10-31 John David Anglin - - * pa.c (pa_select_section): Use new style declaration. - * som.h (readonly_data): Likewise. - -2003-10-31 Kelley Cook - - * config/rs6000/rs6000.c: Update to C90 prototypes. - -2003-10-31 Richard Earnshaw - - PR target/7513 - * arm.h (CONDITIONAL_REGISTER_USAGE): Disable use of LR in Thumb - code. - -2003-10-31 Andreas Jaeger , - Zack Weinberg - - - * crtstuff.c (__register_frame_info, __register_frame_info_bases) - (__deregister_frame_info, __deregister_frame_info_bases): - Constify void * argument. - * unwind-dw2-fde.h (struct fde_vector): - Constify 'orig_data' and 'array' fields. - (__register_frame_info, __register_frame_info_bases) - (__deregister_frame_info, __deregister_frame_info_bases): - Constify void * argument. - (get_cie, next_fde, _Unwind_Find_FDE): Constify arguments, - return values, and casts of type fde *, struct dwarf_fde *, - and struct dwarf_cie *. - * unwind-dw2-fde.c (__register_frame_info, __register_frame_info_bases) - (__deregister_frame_info, __deregister_frame_info_bases): - Constify void * argument. - (get_cie_encoding, ): Constify struct dwarf_cie * argument. - (get_fde_encoding, fde_unencoded_compare, fde_single_encoding_compare) - (fde_mixed_encoding_compare, fde_compare_t, start_fde_sort, fde_insert) - fde_split, SWAP, frame_downheap, frame_heapsort) - (classify_object_over_fdes, add_fdes, linear_search_fdes, - binary_search_unencoded_fdes, binary_search_single_encoding_fdes, - binary_search_mixed_encoding_fdes, search_object, _Unwind_Find_FDE): - Constify arguments, local variables, return values, and casts - of type fde *, fde **, struct dwarf_fde *, and struct dwarf_cie *. - Use const pointer types in sizeof expressions, for clarity. - * unwind-dw2-fde-glibc.c - (_Unwind_find_registered_FDE, _Unwind_find_FDE): Constify return value. - (struct unw_eh_callback_data): Constify 'ret' field. - -2003-10-31 Fariborz Jahanian - David Edelsohn - - * config/rs6000/rs6000.c (rs6000_mixed_function_arg): New. - (function_arg): Call it. - (rs6000_function_value): Widen integral return value to mode based - on TARGET_32BIT, not word_mode. - * config/rs6000/rs6000.h (PROMOTE_MODE): Likewise. - (UNITS_PER_ARG): New. - (RS6000_ARG_SIZE): Use it. - -2003-10-31 Gerald Pfeifer - - * .cvsignore: No longer ignore gengtype-lex.c, gengtype-yacc.c, - and gengtype-yacc.h. - -2003-10-31 Richard Earnshaw - - PR optimization/8896 - * postreload.c (reload_combine): Check that REGY doesn't die in an - insn of the form (set (regx) (plus (regx) (regy))), ie REGX != REGY. - -2003-10-31 Josef Zlomek - - PR/10239 - * cfgrtl.c (delete_insn): Decrease LABEL_NUSES for all REG_LABEL notes. - -2003-10-31 Josef Zlomek - - PR/11640 - * cfgrtl.c (try_redirect_by_replacing_jump): Move jump - immediatelly before BARRIER. - -2003-10-31 Kelley Cook - - * Makefile.in (STRICT2_WARN): Add -Wold-style-definition. - -2003-10-31 Richard Earnshaw - - PR target/11271 - * reload.c (find_reloads_address): Handle any register in - (PLUS (PLUS (REG) (REG)) (CONST_INT). - -2003-10-31 Richard Earnshaw - - * ggc-page.c (ggc_pch_read): Wrap call to poison_pages in - ENABLE_GC_CHECKING not in GGC_POISON. - -2003-10-31 Nathanael Nerode - - PR bootstrap/9863 - * configure.in: Bail out if awk is missing. - * configure: Regenerate. - - PR ada/12761 - * Makefile.in: Move default definitions of X_ADA_CFLAGS, - T_ADA_CFLAGS, X_ADAFLAGS, T_ADAFLAGS from ada/Make-lang.in to here. - -2003-10-30 Richard Henderson - - * c-objc-common.c (c_tree_printer): Handle types correctly. - Factor code a bit. - -2003-10-30 Kelley Cook - - * value-prof.c, web.c: Update to C90. - -2003-10-30 Eric Christopher - - * function.c (purge_addressof_1): Add case for REG_RETVAL - notes when modes are unequal. - -2003-10-31 Jan Hubicka - - * i386-modes.def: Add XFmode format adjustment. - -2003-10-30 Jan Hubicka - - * real.c (encode_ieee_extended): Back out previous patch. - -2003-10-30 Jan Hubicka - - * real.c (encode_ieee_extended): Initialize whole array. - * reg-stack.c (move_for_stack_reg0: Use always XFmode. - * i386-modes.def: Change definitions of TFmode and XFmode. - * i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode - code. - (construct_container): Allow constructing of TFmode integer containers. - (ix86_return_in_memory): XFmode is not returned in memory. - (init_ext_80387_constants): Always use XFmode. - (print_operand): Likewise. - (ix86_prepare_fp_compare_regs): Likewise. - (split_to_parts): Deal with TFmode. - (split_long_move): Simplify. - (ix86_init_mmx_sse_builtins): Add __float80, __float128. - (ix86_memory_move_cost): Do not confuse TFmode. - * i386.h (LONG_DOUBLE_TYPE_SIZE): Set to 96. - (IS_STACK_MODE): TFmode is not stack mode. - (HARD_REGNO_NREGS, CLASS_MAX_NREGS): Deal nicely with XFmode. - (VALID_SSE_REG_MODE): Allow TFmode. - (VALID_FP_MODE_P): Disallow TFmode. - (VALID_INT_MODE_P): Allow TFmode in 64bit mode. - * i386.md (TFmode patterns): Kill. - (movtf, motf_rex64): New patterns. - -2003-10-30 Richard Sandiford - - * config/mips/mips.md (adddi3): Fix typo in mips16 stack pointer code. - -2003-10-30 Richard Sandiford - - * config/mips/mips.md (mov_lwl): Use memory_operand where appropriate. - (mov_lwr, mov_swl, mov_swr): Likewise. - (mov_ldl, mov_ldr, mov_sdl, mov_sdr): Likewise. - -2003-10-30 Richard Sandiford - - * config/mips/mips.c (mips_global_pointer): Don't try to use $25. - -2003-10-30 Richard Henderson - - * config/mips/mips.c (mips_build_builtin_va_list): Use runtime - test for irix6 rather than preprocessor test. - -2003-10-30 Richard Henderson - - * cppcharset.c (one_utf8_to_utf16): Initialize 's' to silence warning. - -2003-10-30 Ulrich Weigand - - * config/s390/s390.c (struct machine_function): Use save_return_addr_p - as a general flag that the return address register needs to be saved, - not necessarily because of __builtin_return_addr (0). - (s390_split_branches): Remove TEMP_REG and TEMP_USED arguments, - remove special handling of zSeries machines. - (s390_optimize_prolog): Remove TEMP_USED argument, treat the return - register as a regular register on zSeries machines. - (s390_reorg): Adjust calls to s390_split_branches and - s390_optimize_prolog. - (s390_frame_info): On zSeries machines, do not assume the return - register is always used. Update regs_ever_live with current data - for the special registers. - (s390_emit_epilogue): Use save_return_addr_p to determine whether - the return register was saved. - * config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Do not mark - RETURN_REGNUM fixed on zSeries machines. - (REG_ALLOC_ORDER): Use RETURN_REGNUM last. - * config/s390/s390.md ("*doloop_si"): Handle branch overflow - via ahi-jgne pair on zSeries machines. - ("*doloop_di"): Likewise. - ("*doloop_di_long"): Remove. - -2003-10-30 Richard Earnshaw - - * arm.c (arm_override_options): Revert change of arm_constant_limit - when optimizing for size. - -2003-10-29 Richard Henderson - - * fold-const.c (fold_single_bit_test): Convert the input to the - operational intermediate type. - -2003-10-29 Richard Henderson - - * builtins.c (std_build_builtin_va_list): New. - * expr.h (std_build_builtin_va_list): Declare. - * defaults.h (BUILD_VA_LIST_TYPE): New. - * system.h (BUILD_VA_LIST_TYPE): Poison. - * target-def.h (TARGET_BUILD_BUILTIN_VA_LIST): New. - * target.h (struct gcc_target): Add build_builtin_va_list. - * tree.c (build_common_tree_nodes_2): Use it. - - * config/alpha/alpha-protos.h, config/alpha/alpha.c, - config/alpha/alpha.h, config/alpha/unicosmk.h, - config/d30v/d30v-protos.h, config/d30v/d30v.c, config/d30v/d30v.h, - config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.h, - config/i860/i860-protos.h, config/i860/i860.c, config/i860/i860.h, - config/i960/i960-protos.h, config/i960/i960.c, config/i960/i960.h, - config/mips/iris6.h, config/mips/mips-protos.h, config/mips/mips.c, - config/mips/mips.h, config/rs6000/rs6000-protos.h, - config/rs6000/rs6000.c, config/rs6000/rs6000.h, - config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, - config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.h, - config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, - config/xtensa/xtensa.h: Rename foo_build_va_list to - foo_build_builtin_va_list; make it static. Define - TARGET_BUILD_BUILTIN_VA_LIST. Remove BUILD_VA_LIST_TYPE. - Update protos. - - * config/i386/i386.c (ix86_expand_carry_flag_compare): Make static. - * config/iq2000/iq2000.h (BUILD_VA_LIST_TYPE): Remove. - -2003-10-29 James E Wilson - - * recog.c (asm_operand_ok): Add missing break after case 'X'. - Change if statements to else if statements in default case. - (extract_constrain_insn_cached): Fix misspelling of constrain_operands - in comment. - (constrain_operands_cached): Likewise. - (constrain_operands): Change if statements to else if statements in - default case. - * reload.c (find_reloads): Likewise. - -2003-10-29 Richard Henderson - - * config/m68k/m68k.c (notice_update_cc): Clear cc status for - shifts and rotates. - -2003-10-30 Alan Modra - - * config/rs6000/rs6000.md: Remove duplicate pattern. - -2003-10-29 Hans-Peter Nilsson - - * real.c (do_divide): Initialize result with a 0. - - * configure.in : Look for - first. AC_DEFINE HAVE_VALGRIND_MEMCHECK_H - if it exists. - * configure, config.in: Regenerate. - * ggc-common.c [ENABLE_VALGRIND_CHECKING && - HAVE_VALGRIND_MEMCHECK_H]: Include . Use - #elif for other alternatives. - * ggc-page.c: Ditto. - * ggc-zone.c: Don't assume ; instead copy - include structure from ggc-common.c. - -2003-10-29 John David Anglin - - * pa-linux.h (ASM_OUTPUT_ADDR_VEC_ELT): Use label in big switch ELTs. - (ASM_OUTPUT_ADDR_DIFF_ELT): Use label difference in big switch ELTs. - * pa.c (pa_adjust_insn_length): Check for btable branches using - attribute TYPE_BTABLE_BRANCH. - (pa_reorg): Simplify. - * pa.h (CASE_VECTOR_MODE): Change big switch mode to SImode. - (ASM_OUTPUT_ADDR_VEC_ELT): As above. - (ASM_OUTPUT_ADDR_DIFF_ELT): As above. - * pa.md (btable_branch): New instruction type. - (in_branch_delay, in_nullified_branch_delay, in_call_delay): Disallow - btable branches. - (define_delay): Add btable branches to insn types that may have an - insn in the delay position. - (Z2, Z3): Add btable branch to list. - Simplify unamed pattern set copy pic_label_operand to register. Add - PA 2.0 variant. - (short_jump): New jump for use in branch tables. - (casesi, casesi0): Revise for new branch table formats. - (casesi32, casesi32p, casesi64p): New casesi patterns. - (indirect_jump): Move. - -2003-10-29 David Edelsohn - - * config/rs6000/rs6000.h (UNITS_PER_WORD): Revert to - !TARGET_POWERPC64. - (UNITS_PER_GPR_WORD): Delete. - (HARD_REGNO_NREGS): Revert to UNITS_PER_WORD. - (HARD_REGNO_MODE_OK): Same. - (CLASS_MAX_NREGS): Same. - -2003-10-29 John David Anglin - - * pa.h (ASM_COMMENT_START): Define. - -2003-10-29 Zack Weinberg - - * genmodes.c (complete_mode): Record MODE_CC, MODE_INT, - MODE_FLOAT, and MODE_PARTIAL_INT modes as having one - component, not zero. - -2003-10-29 Andreas Schwab - - * config/ia64/t-ia64 (LIB2ADDEH): Add $(srcdir)/gthr-gnat.c. - -2003-10-29 Eric Botcazou - - * config/sparc/sparc.c (function_arg_partial_nregs) [TARGET_ARCH64]: - Never return 1 for complex integral modes whose size is lesser or - equal to a word. - (function_arg_pass_by_reference) [TARGET_ARCH64]: Mention CTImode - in the comment. - (function_arg_advance) [TARGET_ARCH64]: Don't special-case complex - modes. - (sparc_va_arg) [TARGET_ARCH64]: Handle any types whose size is - greater than 16 bytes by reference. - -2003-10-29 Richard Kenner - - * config/ia64/ia64.c (ia64_assemble_integer): Test POINTER_SIZE, - not TARGET_ILP32. - (ia64_initialize_trampoline): Use globalize_label target call. - -2003-10-29 Andreas Schwab - - * doc/install.texi (Building): Add a sentence about building Ada - for a canadian cross. - -2003-10-28 Zack Weinberg - - * config/ia64/ia64.c (cmptf_libfunc): New static. - (ia64_expand_compare): Add logic to open-code calls to - _U_Qfcmp for TFmode comparisons. - (ia64_hpux_init_libfuncs): Initialize cmptf_libfunc. - Set libfuncs for TFmode eq/ne/gt/ge/lt/gt to 0; these should - never be generated anymore. - * config/ia64/ia64.md (cmptf): New expander. - -2003-10-28 Zack Weinberg - - * ia64.md (UNSPEC_SETF_EXP,UNSPEC_FR_SQRT_RECIP_APPROX): New constants. - (*sqrt_approx): New instruction pattern for approximate square roots. - (*setf_exp_xf): New instruction pattern for exponentiation. - (*maddxf4_alts_truncsf): New instruction pattern for truncation. - (sqrtsf2_internal_thr): New define_and_split implementing - throughput-optimized inline calculation of SFmode square root. - (sqrtdf2_internal_thr): Likewise for DFmode. - (sqrtxf2_internal_thr): Likewise for XFmode. - (sqrtsf2, sqrtdf2, sqrtxf2): New expanders to choose between - latency- and throughput-optimized square root algorithms. - * ia64.h (MASK_INLINE_SQRT_LAT, MASK_INLINE_SQRT_THR, - TARGET_INLINE_SQRT_LAT, TARGET_INLINE_SQRT_THR, TARGET_INLINE_SQRT): - New macros. - (TARGET_SWITCHES): Add -minline-sqrt-min-latency and - -minline-sqrt-max-throughput. - * ia64.c (ia64_override_options): If both -minline-sqrt-min-latency - and -minline-sqrt-max-throughput are given, notify the user - that both options cannot be used simultaneously. - If -minline-sqrt-min-latency is given, notify the user that - this mode is not yet implemented. - (rtx_needs_barrier): Reformat initial comment to obey - 72-character width limit. Support UNSPEC_SETF_EXP and - UNSPEC_FR_SQRT_RECIP_APPROX. - -2003-10-29 Alan Modra - - * config/rs6000/rs6000.md (movdf_softfloat64): Allow dummy ctr,ctr - moves. - -2003-10-28 Franz Sirl - - PR target/11598 - PR libgcj/10610 - * config/rs6000/sysv4.h (PREFERRED_STACK_BOUNDARY): New macro. - -2003-10-28 Richard Earnshaw - - * arm.c (arm_output_epilogue): When using a frame pointer, don't emit - an extra stack adjustment insn if the stack pointer is already - pointing at the right place. - (use_return_insn): Allow a return insn to be used when we have a - frame pointer if the stack pointer is in the right place. - (output_return_instruction): Handle it. - -2003-10-28 Andreas Jaeger - - * ggc-zone.c (check_cookies): Add missing variable. - Add void to prototypes. - -2003-10-27 Kaveh R. Ghazi - - * config/mips/irix6-libc-compat.c (inet_makeaddr): Prototype. - * crtstuff.c (__do_global_ctors_1): Move prototype. - * unwind-dw2.c (NO_SIZE_OF_ENCODED_VALUE): Define when - appropriate. - * unwind-sjlj.c (_Unwind_GetCFA, _Unwind_FindEnclosingFunction): - Mark parameter with __attribute__((unused)). - -2003-10-27 Zack Weinberg - - * c-decl.c (pushdecl): Clarify comment. - -2003-10-27 Arnaud Charlet - - * doc/install.texi: Update instructions for Ada cross builds - - PR ada/5909: - * doc/sourcebuild.texi: Document Ada test suite. - -2003-10-27 Stephane Carrez - - * config/m68hc11/m68hc11.c: Convert to ISO C90. - * config/m68hc11/m68hc11-protos.h: Likewise. - -2003-10-27 Jan Hubicka - Eric Botcazou - - * toplev.c (enum dump_file_index, dump_file): Fix ordering of - webizer pass dump. - -2003-10-27 Jakub Jelinek - Jan Hubicka - - * reload1.c (struct elim_table): Change offset, initial_offset and - previous_offset fields to HOST_WIDE_INT. - (offsets_at): Change from int to HOST_WIDE_INT. - (reload): Adjust offsets_at initialization. - (eliminate_regs_in_insn): Change type of offset to HOST_WIDE_INT. - (verify_initial_elim_offsets): Change type of t to HOST_WIDE_INT. - * config/i386/i386.c (ix86_compute_frame_layout): Change offset type - to HOST_WIDE_INT. Don't save regs using mov for huge frame sizes - if TARGET_64BIT. - (pro_epilogue_adjust_stack): New function. - (ix86_expand_prologue, ix86_expand_epilogue): Use it. - * config/i386/i386.md (pro_epilogue_adjust_stack): Remove. - (pro_epilogue_adjust_stack_1): Remove * in front of name. - (pro_epilogue_adjust_stack_rex64): Handle -2147483648 properly. - (pro_epilogue_adjust_stack_rex64_2): New insn. - - * config/i386/i386.c (ix86_expand_epilogue): Fix comment typo. - - * config/i386/i386.c (ix86_expand_call): Replace 40 with - FIRST_REX_INT_REG + 3 /* R11 */. - -2003-10-26 Richard Henderson - - * config/alpha/alpha.md (attr cannot_copy): New. - (call_osf_2_er, call_value_osf_2_er, ldgp_er_1, ldgp_er_2, - prologue_ldgp_er_2, prologue_ldgp_1): Set it. - * config/alpha/alpha.c (alpha_cannot_copy_insn_p): Test it. - -2003-10-26 Daniel Berlin - - * ggc-zone.c: New file, zone allocating collector. - * configure: Accept zone option for --with-gc - * configure.in: Ditto. - * ggc.h (ggc_pch_count_object): Pass bool indicating - stringiness. Update all callers. - (ggc_pch_alloc_object): Ditto. - (ggc_pch_write_object): Ditto. - (ggc_alloc_rtx): Use typed allocation, since all RTX's are of a single - type. - (ggc_alloc_rtvec): Ditto. - (ggc_alloc_tree): Use zone allocation, since some things using this macro - aren't a single typecode. - * ggc-none.c (ggc_alloc_typed): New function. - (ggc_alloc_zone): Ditto. - * ggc-page.c: Ditto on both functions. - -2003-10-26 Gunther Nikl - - * config/m68k/m68k.c (m68k_compute_frame_layout): Ensure FPU related - frame information is always valid. - (m68k_output_function_prologue): Remove superfluous TARGET_68881 - test; fix formatting. - -2003-10-26 Gunther Nikl - - * config/m68k/m68k.c (m68k_compute_frame_layout): Swap reg_mask and - reg_rev_mask computation. - (m68k_output_function_prologue): Fix usage of current_frame (one typo - and one missing); use reg_rev_mask not reg_mask. - (m68k_output_function_epilogue): Fix usage of current_frame; - use fpu_rev_mask not fpu_mask. - -2003-10-26 Bernardo Innocenti - - * config/m68k/m68k.c (m68k_output_function_prologue): Eliminate - num_saved_regs, use current_frame.reg_no instead. - -2003-10-26 Bernardo Innocenti - Paul Dale - - * doc/extend.texi (interrupt_handler): Add m68k to the - list of processors implementing it. - * doc/invoke.texi (-msep-data): Document new m68k option. - (-mno-sep-data): Likewise. - (-mid-shared-library): Likewise. - (-mno-id-shared-library): Likewise. - (-mshared-library-id): Likewise. - -2003-10-26 Andreas Jaeger - - * unwind-dw2.c (_Unwind_GetGR): Avoid warning about unsigned - comparison. - (_Unwind_SetGR): Likewise. - -2003-10-26 Ottavio Campana - - PR target/12690 - * config/i386/mmintrin.h (_mm_set1_pi8): Fix comment. - -2003-10-26 Gunther Nikl - - * config/m68k/m68k.c (m68k_output_function_prologue): Move front - comment from here to... - (m68k_save_reg): ...here. Fix comment formatting. - (m68k_output_function_prologue): Fix comment formatting. - (m68k_output_function_epilogue): Likewise. - (const_method): Likewise. - -2003-10-26 Kazu Hirata - - * toplev.c (default_get_pch_validity): Guard the use of - target_options with #ifdef TARGET_OPTIONS. - (default_pch_valid_p): Likewise. - -2003-10-26 Andreas Jaeger - Zack Weinberg - Andreas Tobler - - * dwarf2out.c (output_cfi): Use HOST_WIDE_INT_PRINT. - (output_die): Likewise. - (print_die): Likewise. - -2003-10-26 Andreas Jaeger - - * tree.h (dwarf2out_def_cfa, dwarf2out_args_size, - dwarf2out_reg_save, new_loc_descr): Update prototypes for recent - dwarf2out.c change. - - * toplev.c (default_pch_valid_p): Fix warning. - -2003-10-25 Roger Sayle - - * simplify-rtx.c (simplify_replace_rtx): Avoid allocating duplicate - RTL nodes. If an operator's operands are unchanged, return the - original argument unchanged. - -2003-10-26 Graham Stott - - Fix bootstrap failure. - * expmed.c (store_bit_field): Don't compare bitsize against - modes with zero bit-size. - - (extract_bit_field): Likewise - -2003-10-25 Jan Hubicka - - * dwarf2out.c (dw_cfi_oprnd_struct): Offset is HOST_WIDE_INT. - (cfa_loc): Likewise. - (reg_save, stack_adjust_offset, queue_reg_save): Replace long by - HOST_WIDE_INT. - (args_size, old_args_size): change type to HOST_WIDE_INT. - (dwarf2out_def_cfa, dwarf2out_args_size, - dwarf2out_reg_save, new_loc_descr): offset is HOST_WIDE_INT. - (dw_val_struct): integers, unsigneds and offsets are HOST_WIDE_INT. - (add_AT_int, add_AT_unsigned, att_AT_offset, AT_int, AT_unsigned, - AT_offset): Use HOST_WIDE_INT. - (based_loc_descr): offset is HOST_WIDE_INT. - (add_data_member): Likewise. - (add_const_value_attribute): Simplify. - -2003-10-25 Richard Henderson - - * config/i386/i386.c (ix86_eax_live_at_start_p): New. - (ix86_expand_prologue): Save and restore eax around stack probe - if it's live. - -2003-10-25 Jan Hubicka - - * cppcharset.c (one_utf8_to_utf32): Initialize 's' to silence warning. - -2003-10-25 Eric Botcazou - - PR target/12712 - * reg-stack.c (convert_regs_1): Create an arbitrary input stack - if the block has no predecessors. - (convert_regs_2): Document the problem with successors whose - only predecessor is the block to be processed. - (convert_regs): Don't create the arbitrary input stack here. - -2003-10-24 Zack Weinberg - - * genmodes.c (struct mode_data): Add contained and next_cont - fields. - (complete_mode): Maintain linked list of modes that have a - given component. - (emit_mode_unit_size): Delete. - (emit_mode_nunits): New. - (emit_insn_modes_c): Update to match. - (emit_mode_adjustments): Propagate size and alignment - adjustments from component modes to their containers. - * machmode.h (mode_unit_size): Delete. - (mode_nunits): New. - (GET_MODE_NUNITS): Just return the value in the table. - (GET_MODE_UNIT_SIZE): Compute using GET_MODE_INNER and - GET_MODE_SIZE. - * expmed.c (store_bit_field, extract_bit_field): Can use a - plain move instruction if bitsize >= GET_MODE_BITSIZE of - destination/source mode, respectively. - * varasm.c (assemble_real): Write out the full size of the - constant, not just its bitsize. - (output_constant): Honor TYPE_MODE of TREE_REAL_CSTs. - - * config/ia64/ia64-modes.def: Define XFmode as well as TFmode. - Use ADJUST_BYTESIZE and ADJUST_ALIGNMENT to set size and - alignment of XF and TF modes in compliance with ia64 ABIs. - Can now hardwire the format of both modes. - * config/ia64/ia64.c: Change TFmode to XFmode wherever appropriate. - (general_tfmode_operand, destination_tfmode_operand) - (tfreg_or_fp01_operand, spill_tfmode_operand): Rename to - general_xfmode_operand, destination_xfmode_operand, - xfreg_or_fp01_operand, spill_xfmode_operand respectively. - (ia64_init_builtins): Make TYPE_PRECISION of fpreg_type - and float80_type be 96 so they get XFmode. Use !TARGET_HPUX, - not INTEL_EXTENDED_IEEE_FORMAT, to decide how to define - __float128. - * config/ia64/ia64.h: Default TARGET_HPUX to 0. - Change TFmode to XFmode wherever appropriate. Remove all - references to INTEL_EXTENDED_IEEE_FORMAT. - (LONG_DOUBLE_TYPE_SIZE): Varies with TARGET_HPUX. - (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define (always 96). - (PREDICATE_CODES): Update to match function renames. - * config/ia64/ia64.md: Change TF to XF throughout; rename all - patterns to match. Remove all references to - INTEL_EXTENDED_IEEE_FORMAT. Update predicate calls to match - function renames. - * config/ia64/ia64-protos.c: Update all prototypes to match - renamed functions. - * config/ia64/hpux.h: Redefine TARGET_HPUX to 1. - Remove all references to INTEL_EXTENDED_IEEE_FORMAT. - * config/ia64/lib1funcs.asm: Add __divxf3 as new name for - __divtf3; keep old name for backward compatibility. - (L__compat): New section providing forwarding stubs for - __fixtfti, __fixunstfti, __floattitf. - * config/ia64/t-ia64: Add __compat to LIB1ASMFUNCS. - -2003-10-24 Geoffrey Keating - - PR 10757 - * c-pch.c: Include target.h. Improve comments. - (struct c_pch_validity): Add target_data_length. - (pch_init): Add target's validity data. - (c_common_valid_pch): Check target's validity data. - * target-def.h (TARGET_GET_PCH_VALIDITY): New. - (TARGET_PCH_VALID_P): New. - (TARGET_INITIALIZER): Add new fields. - * target.h: Include tm.h. - (struct gcc_target): Add get_pch_validity, pch_valid_p. - * toplev.h (default_get_pch_validity): New prototype. - (default_pch_valid_p): New prototype. - * toplev.c (default_get_pch_validity): New routine. - (default_pch_valid_p): New routine. - * Makefile.in (TARGET_H): Add TM_H. Replace all users of - target.h with $(TARGET_H). - (c-pch.o): Add TARGET_H. - * doc/tm.texi (PCH Target): New node. - (TARGET_GET_PCH_VALIDITY): Document. - (TARGET_PCH_VALID_P): Document. - -2003-10-24 Kelley Cook - - * Makefile.in: Define a vpath for %.texi. Remove explicit $(docdir) - and $(docdir)/include from any *.texi dependencies. - ($(docobjdir)/%.dvi): Depend on stmp-docobjdir. - ($(docobjdir)/%.1): Depend on .pod instead of .texi. - ($(docobjdir)/%.7): Likewise. - (%.pod): New implicit rule. - (cpp.pod): New dependency only rule. - (gcc.pod): New intermediate rule with dependencies and commands. - (gfdl.pod): Likewise. - (fsf-funding.pod): Likewise. - -2003-10-24 Nathanael Nerode - - * fixinc/mkfixinc.sh: Remove special cases for svr4 and ptx, and - related code. - * fixinc/fixinc.ptx: Remove. - * fixinc/fixinc.svr4: Remove. - -2003-10-24 Ulrich Weigand - - * config/s390/s390.c (load_multiple_operation): Allow both SImode - and DImode if word_mode is DImode. - (store_multiple_operation): Likewise. - * config/s390/s390.md ("load_multiple", "store_multiple"): Likewise. - ("*load_multiple_di"): Allow only if word_mode == DImode. - ("movqi"): Use LLGC whenever TARGET_ZARCH. - ("fix_truncdfsi2"): Fix incorrect temporary size. - ("fix_truncsfsi2"): Likewise. - ("*bras_r", "*brasl_r", "*basr_r"): Remove predicate and constraint - string for function return value operand. - ("*bras_tls", "*brasl_tls", "*basr_tls"): Likewise. - -2003-10-24 Joseph S. Myers - - * c-parse.in (array_declarator): Use expr_no_commas. - Fixes PR c/11943. - -2003-10-24 Richard Sandiford - - * config/mips/linux.h: Wrap MD_FALLBACK_FRAME_STATE_FOR and - associated includes in #ifndef inhibit_libc. - -2003-10-24 Roger Sayle - - * doc/libgcc.texi: Document some more of the libgcc API. - -2003-10-24 Richard Earnshaw - - * arm.c (arm_rtx_costs_1, case TARGET_THUMB): Adjust costs for - comparing a constant with small negative numbers and add costing - for constants in conjunction with AND. - (note_invalid_constants): Tidy previous change. - (thumb_cmp_operand): Tidy. - (thumb_cmpneg_operand): New function. - * arm.h (CONDITIONAL_REGISTER_USAGE): Don't use HI regs if optimizing - for size. - (FIRST_LO_REGNUM, FIRST_HI_REGNUM, LAST_HI_REGNUM): Define. - (PREDICATE_CODES): Add thumb_cmpneg_operand. - * arm.md (cbranchsi4): Convert to define_expand. Handle comparison - with a negative constant. - (cbranchsi4_insn): Matcher for cbranchsi4. - (cbranchsi4_scratch): Similar, but a scratch is available for - handling negative constants. - (movsi_cbranchsi4): New pattern. - (tstsi3_cbranch): Renamed from andsi3_cbranch_scratch, remove scratch - and use the TST instruction. - (andsi3_cbranch, orrsi3_cbranch, xorsi3_cbranch, cbranchne_decr1) - (addsi3_cbranch, subsi3_cbranch): Ensure that register preferencing - cannot see high regs or memory alternatives. - (bicsi3_cbranch_scratch, bicsi3_cbranch): New patterns. - -2003-10-24 Richard Earnshaw - - * arm.c (note_invalid_constants): Try to extract the constant - pool value using avoid_constant_pool_reference; only use - get_pool_constant if that returns the original reference. - -2003-10-24 Jan Hubicka - - PR c++/12624 - * varasm.c (notice_global_symbol): Disqualify global registers. - -2003-10-23 Roger Sayle - - PR middle-end/11414 - * loop.c (load_mems): Use redirect_jump to forward jumps from - the original loop end label to the new "loop sink" block's label. - -2003-10-23 Roger Sayle - - PR middle-end/12705 - * optabs.c (expand_binop): When expanding complex operations - inline, always calculate result into a new temporary register. - Minor code clean-ups. - -2003-10-24 Rainer Orth - - * objc/lang-specs.h: Handle -print-objc-runtime-info. - * doc/invoke.texi (Objective-C Dialect Options): Document it. - -2003-10-24 Danny Smith - - * config/i386/cygwin.asm: Add copyright notice. Add comment - on why this code is needed. - -2003-10-23 Kazu Hirata - - * config/h8300/clzhi2.c: Fix warnings. - * config/h8300/ctzhi2.c: Likewise. - * config/h8300/fixunssfsi.c: Likewise. - * config/h8300/parityhi2.c: Likewise. - * config/h8300/popcounthi2.c: Likewise. - -2003-10-23 James E Wilson - - * gcc.c (option_map): Delete --target and --use-version. - -2003-10-23 Fariborz Jahanian - David Edelsohn - - * config/rs6000/rs6000.h (UNITS_PER_WORD): Use TARGET_32BIT, not - TARGET_POWREPC64. - (UNITS_PER_GPR_WORD): Define. - (HARD_REGNO_NREGS): Use UNITS_PER_GPR_WORD. - (HARD_REGNO_CALL_PART_CLOBBERED): Define. - (HARD_REGNO_MODE_OK): Use UNITS_PER_GPR_WORD. - (CLASS_MAX_NREGS): Use UNITS_PER_GPR_WORD. - * config/rs6000/rs6000.c (function_arg): Generate PARALLEL for - DFmode and DImode in 32-bit ABI / 64-bit computation mode. - (rs6000_emit_prologue): Select reg_mode and reg_size using - TARGET_32BIT, not TARGET_POWERPC64. - (rs6000_function_value): Generate PARALLEL for DImode in 32-bit - ABI / 64-bit computation mode - -2003-10-22 Andrew Haley - - * toplev.c (output_file_directive): Allow for null input_name. - -2003-10-22 Waldek Hebisch - - * config/i386/i386.c (classify_argument): Handle SET_TYPE. - -2003-10-22 Chris Demetriou - - * configure.in: In --enable-generated-files-in-srcdir option - handling, fix default case handling. - * configure: Regenerate. - -2003-10-22 Phil Edwards - - * config.gcc: Update *-*-vxworks* generic hook and comments. - (arm-wrs-vxworks, i[4567]86-wrs-vxworks, mips-wrs-vxworks, - mips-wrs-windiss, sh-wrs-vxworks): New stanzas. - * genmultilib: Allow the MULTILIB_OSDIRNAMES to be mapped directly. - * config/svr4.h (SWITCH_TAKES_ARG): Undefine it before redefining it. - * config/windiss.h: New file. - * config/arm/t-vxworks: New file. - * config/arm/vxworks.h: New file. - * config/i386/t-vxworks: New file. - * config/i386/vxworks.h: New file. - * config/mips/t-vxworks: New file. - * config/mips/vxworks.h: New file. - * config/mips/windiss.h: New file. - * config/sh/t-vxworks: New file. - * config/sh/vxworks.h: New file. - -2003-10-22 Kazu Hirata - - * config/h8300/h8300.c (h8300_output_function_epilogue): Remove. - (h8300_saveall_function_p): New. - (h8300_insert_attributes): Insert the saveall attribute if - #pragma saveall is specified. - (h8300_attribute_table): Add saveall. - (TARGET_ASM_FUNCTION_EPILOGUE): Remove. - * doc/extend.texi: Mention the saveall attribute. - -2003-10-22 Joseph S. Myers - - * c-typeck.c (pedantic_lvalue_warning): Unconditionally warn of - deprecation of casts as lvalues. - * fixinc/inclhack.def (obstack_lvalue_cast): New fix. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/obstack.h: New test. - -2003-10-22 Andreas Schwab - - PR target/12676 - * config/m68k/m68k.c (output_addsi3): Fix range check to work on - LP64 platforms. - -2003-10-22 Jan Hubicka - - * dwarf2out.c (dwarf2out_abstract_function): Use DW_AT to check - presence of DW_AT_inline. - (gen_subprogram_die): Likewise; do not abort instead of emitting - DW_AT_not_inline. - -2003-10-22 Jan Hubicka - - * cgraph.c (cgraph_function_possibly_inlined_p): Be conservative when - global info is not ready. - -2003-10-22 Kazu Hirata - - * doc/extend.texi: Mention H8S wherever H8/300H is mentioned. - -2003-10-22 Ulrich Weigand - - * config/s390/s390.md ("movstr_short_64", "movstr_short_31"): Merge ... - ("*movstr_short"): ... into this insn pattern. - ("movstr_short"): New expander. - ("*movstr_long_64"): Rename from "movstr_long_64", simplify. - ("*movstr_long_31"): Rename from "movstr_long_31", simplify. - ("movstr_long"): New expander. - ("clrstr_short_64", "clrstr_short_31"): Merge ... - ("*clrstr_short"): ... into this insn pattern. - ("clrstr_short"): New expander. - ("*clrstr_long_64"): Rename from "clrstr_long_64", simplify. - ("*clrstr_long_31"): Rename from "clrstr_long_31", simplify. - ("clrstr_long"): New expander. - ("cmpmem_short_64", "cmpmem_short_31"): Merge ... - ("*cmpmem_short"): ... into this insn pattern. - ("cmpmem_short"): New expander. - ("*cmpmem_long_64"): Rename from "cmpmem_long_64". - ("*cmpmem_long_31"): Rename from "cmpmem_long_31". - ("cmpmem_long"): New expander. - * config/s390/s390.c (s390_expand_movstr): Use new expanders. - (s390_expand_clrstr): Likewise. - (s390_expand_cmpmem): Likewise. - -2003-10-22 Mark Mitchell - - * c-pch.c (struct c_pch_validity): Add pch_init field. - (pch_init): Set it. - (c_common_valid_pch): Check it. - -2003-10-22 David Taylor - - PR debug/12500 - * dbxout.c (dbxout_typedefs): Use COMPLETE_OR_VOID_TYPE_P. - -2003-10-22 Richard Kenner - - * config/alpha/alpha.c (function_value [ENABLE_CHECKING]): Don't call - alpha_return_in_memory if no VALTYPE specified. - -2003-10-22 Jan Hubicka - - PR debug/12389 - * Makefile.in (dwarf2out.o): Depend on cgraph.h. - * cgraph.c (cgraph_function_possibly_inlined_p): New function. - * cgraph.h (cgraph_function_possibly_inlined_p): Declare. - (cgraph_global_info): Add flag inlined - * dwarf2out.c (gen_subprogram_die, gen_decl_die): Use - cgraph_function_possibly_inded_p - * cgraphunit.c (mark_inline): Set inlined flag. - * toplev.c (rest_of_decl_compilation): Call outlining_inline_function - only for possibly inlined functions. - * c-decl.c (duplicate_decls): Never output abstract DIE representing old - body of function. - -2003-10-22 Andrew Haley - - * varasm.c (output_constructor): Make constructor annotation - conditional on ASM_COMMENT_START. - -2003-10-21 Jason Merrill - - * tree.c (get_unwidened): Check TREE_UNSIGNED on the field's type. - (get_narrower): Likewise. - - * stor-layout.c (layout_decl): Do packed field alignment for - bit-fields, too. - -2003-10-21 Eric Christopher - - * expr.c (convert_move): Use FLOAT_EXTEND for extensions. - -2003-10-21 Geoffrey Keating - - * c-pch.c: Add comments in various places. - (struct c_pch_validity): Add the lengths of various strings. - (host_machine): New static. - (target_machine): New static. - (get_ident): Bump version number. - (pch_init): Write out version, host, target validity data. - (c_common_valid_pch): Check version, host, target. - * Makefile.in (c-pch.o): Add version.h; define HOST_MACHINE and - TARGET_MACHINE. - -2003-10-21 Jason Merrill - - * tree.h (IS_EXPR_CODE_CLASS): Use strchr. - (EXPR_P): New macro. - -2003-10-21 Zack Weinberg - - * config/ia64/ia64.md (cmpxchg_acq_si): Mark operand 3 as DImode. - * config/ia64/ia64.c (ia64_expand_fetch_and_op, - ia64_expand_op_and_fetch): Make sure the REG for ar.ccv is - DImode. Use convert_move to load ar.ccv. - (ia64_expand_compare_and_swap): Likewise. - If expand_expr doesn't put 'old' and 'new' in the proper - modes, run them through convert_to_mode. - -2003-10-21 Eric Christopher - - * config/frv/frv.c (frv_adjust_field_align): Check DECL_ARTIFICIAL - for too large bitfields. - -2003-10-21 Mark Mitchell - - * Makefile.in ($(docobjdir)/%.info): Honor BUILD_INFO. - -2003-10-21 Andrew Haley - - * varasm.c (output_constructor): Annotate constructor. - -2003-10-21 Mark Mitchell - - * Makefile.in ($(DESTDIR)$(infodir)/%.info): Conditionalize chmod - on existence of destination file. - -2003-10-21 Jan Hubicka - - * haifa-sched.c (choose_ready): Initialize index. - -2003-10-21 Jason Merrill - - * tree.c (build1): Fix off-by-one error. - -2003-10-21 Robert Millan - - * config/i386/kfreebsdgnu.h: New. i386-*-kfreebsd-gnu definitions. - * config/kfreebsdgnu.h: New. *-*-kfreebsd-gnu definitions. - * config/t-kfreebsd-gnu: New. *-*-kfreebsd-gnu tmake_file. - * config.gcc: Add *-*-kfreebsd*-gnu and i[34567]86-*-kfreebsd*-gnu. - -2003-10-21 Eric Botcazou - - * web.c: Fix various comments. - -2003-10-20 Nicolas Pitre - - * config/arm/arm.c (arm_override_options): Set arm_constant_limit - to 2 instead of 1 when optimize_size is true. Gather code based on - optimize_size together. Add comment about XScale load latency. - -2003-10-21 Gunther Nikl - - * config/m68k/m68k.c (m68k_output_function_prologue): Remove - obsolete comments. - -2003-10-20 Kelley Cook - - * Makefile.in: Get parsedir and docobjdir from configure. - * configure.in: Recogonize --enable-generated-files-in-srcdir. - Pass along parsedir and docobjdir. - * configure: Regenerate. - * doc/install.texi: Document --enable-generated-files-in-srcdir. - -2003-10-20 Kelley Cook - - * Makefile.in: Define $(docdir) before the Make-lang.in fragments are - included. - -2003-10-20 Joseph S. Myers - - * c-common.c (expand_tree_builtin): Ensure creal and cimag - functions do not return lvalues. - -2003-10-20 Jason Merrill - - PR c/12553 - * tree.c (build1) : Set TREE_SIDE_EFFECTS - appropriately. - - PR c/11446 - * stor-layout.c (layout_decl): Fix alignment handling. - -2003-10-20 Joseph S. Myers - - * doc/extend.texi: Deprecate casts as lvalues. - -2003-10-20 Jan Hubicka - - * toplev.c (rest_of_compilation): Fix webizer pass ordering. - - * cgraphunit.c (decide_is_function_needed): Fix test dealing - with functions implicitly made inline. - - * cgraphunit.c (cgraph_decide_inlining_incrementally): New function. - (cgraph_finalize_function): Use it. - (cgraph_mark_inline): Allow incrmental decisions - * invoke.texi (max-inline-slope, min-inline-insns): Kill. - * params.def (PARAM_MAX_INLINE_SLOPE, PARAM_MIN_INLINE_INSNS): Kill. - * tree-inline.c (limits_allow_inlining): Kill. - (expand_call_inline): Always use unit-at-a-time path. - -2003-10-20 Zack Weinberg - - * fixinc/inclhack.def (hpux11_snprintf): New edit. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/stdio.h: Add test for hpux11_snprintf. - -2003-10-20 Mark Mitchell - - * Makefile.in (install-info): Simplify. - ($(DESTDIR)$(infodir)/%.info): New rule. - * configure.in (target_list): Remove install-info. - * doc/.cvsignore (gcc.info*): Remove. - (gccint.info*): Likewise. - (gccinstall.info*): Likewise. - (cpp.info*): Likewise. - (cppinternals.info*): Likewise. - (*.info*): Add it. - * doc/sourcebuild.texi: Update description of install-info. - * objc/Make-lang.in (objc.install-info): Remove. - -2003-10-20 Rainer Orth - - * config/mips/linux.h (TARGET_OS_CPP_BUILTINS): Define _ABIO32. - Use it in _MIPS_SIM definition. - * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Likewise. - -2003-10-20 Zack Weinberg - - * config/i386/i386.c (print_reg): Abort if REGNO (x) is a - virtual register, but only if file == asm_out_file. - * config/i386/i386.h (HI_REGISTER_NAMES): Use "argp", not "", - for ARG_POINTER_REGNUM. - -2003-10-20 Zack Weinberg - - * c-common.c (registered_builtin_types): New static. - (c_common_type_for_mode): Consult registered_builtin_types. - (c_register_builtin_type): Add type to registered_builtin_types. - * optabs.c (init_floating_libfuncs): Initialize libfuncs for - all MODE_FLOAT modes, not just the ones corresponding to - float_type_node, double_type_node, and long_double_type_node. - -2003-10-20 Richard Henderson - - * config/alpha/alpha.h (PREDICATE_CODES): Add normal_memory_operand. - * config/alpha/alpha-protos.h: Remove PREDICATE_CODES prototypes. - -2003-10-20 Dorit Naishlos - - * config/rs6000/rs6000.h: (rs6000_sched_insert_nops): - support new flag -minsert-sched-nops. - (DEFAULT_SCHED_FINISH_NOP_INSERTION_SCHEME): Define. - * config/rs6000/rs6000.c: (rs6000_sched_insert_nops): - support new flag -minsert-sched-nops. - (is_cracked_insn, is_microcoded_insn): New functions. - (rs6000_sched_finish): New function. - (rs6000_issue_rate): Return 5 for power4. - (get_next_active_insn, insn_terminates_group_p): New - functions. - (is_costly_group, force_new_group): New functions. - (redefine_groups, pad_groups): New functions. - (rs6000_variable_issue): Use new functions. - * doc/invoke.texi (-minsert-sched-nops): Document new - option. - -2003-10-20 David S. Miller - - * config/sparc/sparc.md (type attribute): Add new insn types - fpa, fpm_pack, fgm_mul, fgm_pdist, and fgm_cmp for VIS. - (patterns emitting VIS insns): Use them. - * config/sparc/ultra1_2.md: Add VIS scheduling rules. - * config/sparc/ultra3.md: Likewise. - -2003-10-20 Falk Hueffner - - PR target/12654 - * config/alpha/alpha.c (alpha_emit_conditional_branch): Don't do - comparison against constant by adjusting the argument except for - EQ and NE. - -2003-10-19 Mark Mitchell - - * config.gcc: Add support for arm926ejs, arm1026ejs, arm1136js, - arm1136jfs, and armv6j. - * config/arm/arm.c (FL_ARCH6J): New macro. - (FL_VFPV2): Likewise. - (all_cores): Add entries for arm926ejs, arm1026ejs, arm1136js, - and arm1136jfs. - (all_architectures): Add entry for armv6j. - (arm_override_options): Add entries for arm926ejs, arm1026ejs, - arm1136js, and arm1136jfs. - * config/arm/arm.h (TARGET_CPU_arm926ej_s): New macro. - (TARGET_CPU_arm1026ej_s): Likewise. - (TARGET_CPU_arm1136j_s): Likewise. - (TARGET_CPU_arm1136jf_s): Likewise. - * doc/invoke.texi: Document new ARM cores and architecture - variants. - -2003-10-19 Zdenek Dvorak - - * Makefile.in (toplev.o): Add value-prof.h dependency. - (value-prof.o): Add REGS_H dependency. - * common.opt (fprofile-values, fvpt): New. - * flags.h (flag_value_profile_transformations): Declare. - * opts.c (common_handle_option): Handle -fprofile_values and - -fvpt. - * profile.c (branch_prob): Don't remove death notes here. - * timevar.def (TV_VPT): New. - * value-prof.c: Include regs.h. - (insn_divmod_values_to_profile, gen_divmod_fixed_value, gen_mod_pow2, - gen_mod_subtract, divmod_fixed_value_transform,mod_pow2_value_transform, - mod_subtract_transform, value_profile_transformations): New. - (insn_values_to_profile): Call insn_divmod_values_to_profile. - (find_values_to_profile): Add dumps. - * value-prof.h (value_profile_transformations): Declare. - * toplev.c: Include value-prof.h. - (rest_of_handle_value_profile_transformations): New. - (enum dump_file_index): Add DFI_vpt. - (dump_file): Add vpt dump. - (flag_value_profile_transformations): New. - (lang_independent_options): Add flag_profile_values and - flag_value_profile_transformations. - (rest_of_compilation): Call - rest_of_handle_value_profile_transformations. - (process_options): Let -fvpt imply -fprofile-values. - * doc/invoke.texi (-fvpt): Document. - -2003-10-19 Jan Hubicka - - * i386.c (print_reg): Do not abort on certain registers. - - PR optimization/12612 - * reg-stack.c (subst_stack_regs_pat): Use st(1) for clobbers. - * i386.md (fpatan, fyl2x, fscale patterns and expanders): Use - match_scratch; avoid bogus paralles. - - PR target/12674 - * i386.c (ix86_function_regparm): Disable implicit register passing - conventions when profiling. - -2003-10-19 Eric Botcazou - Richard Henderson - - PR optimization/8178 - * config/i386/i386.md (*movsi_zero): Delete. - (*ffs_no_cmove): Use ix86_expand_clear to zero the third operand. - -2003-10-19 Richard Henderson - - * config/alpha/alpha.c (fix_operator): New. - (divmod_operator): Tidy. - (alpha_emit_xfloating_cvt): Handle UNSIGNED_FIX. - * config/alpha/alpha.h (FIXUNS_TRUNC_LIKE_FIX_TRUNC): Remove. - (PREDICATE_CODES): Update. - * config/alpha/alpha.md (fix_truncdfsi_ieee): Use match_operator. - (fix_truncdfsi_internal, fix_truncdfdi_ieee): Likewise. - (fix_truncsfsi_ieee, fix_truncsfsi_internal): Likewise. - (fix_truncsfdi_ieee): Likewise. - (fix_truncdfdi2, fix_truncsfdi2): Turn into define_expand. - (fixuns_truncdfdi2, fixuns_truncsfdi2, fixuns_trunctfdi2): New. - * config/alpha/alpha-protos.h: Update. - -2003-10-19 Richard Sandiford - - * config/mips/mips.h (INITIALIZE_TRAMPOLINE): Simplify. - * config/mips/mips.c (mips_load_got): Assume Pmode == ptr_mode. - * config/mips/mips.md (extendsidi2, *extendsidi2): Merge. Don't accept - constant operands. - -2003-10-18 Kazu Hirata - - * doc/extend.texi: Fix typos. - * doc/invoke.texi: Likewise. - -2003-10-18 Nicolas Pitre - - * config/arm/arm.c (arm_override_options): Use arm_tune_xscale for - XScale optimizations not arm_arch_xscale. - * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR, MOVE_RATIO): Likewise. - -2003-10-18 Ulrich Weigand - - * config/s390/s390-protos.h (shift_count_operand): Add prototype. - * config/s390/s390.c (shift_count_operand): New function. - (s390_extra_constraint): Use it to implement 'Y' constraint. - (print_shift_count_operand): New function. - (print_operand): Use it to implement '%Y'. - * config/s390/s390.h (EXTRA_ADDRESS_CONSTRAINT): Add 'Y' constraint. - (PREDICATE_CODES): Add shift_count_operand. - * config/s390/s390.md ("rotldi3"): Merge alternatives, - using "shift_count_operand" predicate and "Y" constraint, - and "%Y" to output the combined shift count. - ("rotlsi3"): Likewise. - ("ashldi3", "*ashldi3_31", "*ashldi3_64"): Likewise. - ("ashrdi3", "*ashrdi3_31", "*ashrdi3_64", "*ashrdi3_cc_31", - "*ashrdi3_cc_64", "*ashrdi3_cconly_31", "*ashrdi3_cconly_64"): Likewise. - ("ashlsi3", "ashrsi3", "*ashrsi3_cc", "*ashrsi3_cconly"): Likewise. - ("lshrdi3", "*lshrdi3_31", "*lshrdi3_64"): Likewise. - ("lshrsi3"): Likewise. - -2003-10-18 Gunther Nikl - - * config/m68k/m68k.c (m68k_output_function_epilogue): Add missing - argument to asm_fprintf statement. - -2003-10-18 Fariborz Jahanian - - * rs6000.md: Separate TARGET_POWERPC64 patterns for TARGET_64BIT or TARGET_32BIT. - (ashrdisi3_noppc64) Generate more efficient code for 32-bit right-shift of - a "long long" argument. - -2003-10-18 Alexandre Oliva - - * final.c (final_scan_insn): Run FINAL_PRESCAN_INSNS on asm insns - as well. - -2003-10-18 Richard Sandiford - - * rtl.h (rtl_size): Declare. - (rtunion): Remove rtwint. - (rtx_def): Replace 'fld' with a union of an rtunion or a HOST_WIDE_INT. - (RTX_HDR_SIZE, RTX_SIZE): New macros. - (RTL_CHECK1): Adjust for new rtx_def layout. - (RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2): Likewise. - (XWINT, XCWINT): Likewise. Access the rtx structure directly. - (X0WINT): Remove. - (X0ANY): New macro. - * rtl.def: Adjust comments for new rtx_def layout. - * ggc.h (ggc_alloc_rtx): Take the rtx code as argument, not the - number of slots. - * rtl.c (rtx_size): New array. - (rtx_alloc): Adjust call to ggc_alloc_rtx. Use RTX_HDR_SIZE. - (copy_rtx): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. - (shallow_copy_rtx): Adjust call to ggc_alloc_rtx. Use RTX_SIZE. - * integrate.c (copy_rtx_and_substitute): Use X0ANY to copy '0' fields. - * emit-rtl.c (copy_most_rtx): Likewise. - (copy_rtx_if_shared): Use RTX_SIZE. - (copy_insn_1): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. - * gengenrtl.c (gendef): Adjust ggc_alloc_rtx call. Use RTX_HDR_SIZE. - * gengtype.c (write_rtx_next): Use RTX_HDR_SIZE. - (adjust_field_rtx_def): Expect "rtx_def" to be a union rather than - an array. Adjust output for new rtx_def layout. - * ggc-page.c (RTL_SIZE): Use RTX_HDR_SIZE. - * reload1.c (eliminate_regs): Use RTX_SIZE. - * rtlanal.c (loc_mentioned_in_p): Adjust for new rtx_def layout. - * gdbinit.in (pi): Likewise. - -2003-10-18 Jan Hubicka - - * integrate.c (copy_decl_for_inlining): Revert previous patch. - -2003-10-18 Jan Hubicka - - * integrate.c (copy_decl_for_inlining): Fix copying of copies. - -2003-10-18 Roger Sayle - - * libgcc.texi: Group multi-word types, such as "long double" and - "unsigned int", using braces in @deftypefn and @deftypefnx nodes. - Document __unord?f2 as returning a non-zero value, not just one. - -2003-10-18 Hans-Peter Nilsson - - * config/mmix/t-mmix (CRTSTUFF_T_CFLAGS): Define. - ($(T)crti.o, $(T)crtn.o): Pass CRTSTUFF_T_CFLAGS here too. - -2003-10-18 Eric Botcazou - - * config/i386/k6.md (k6_alux): Use the 'mode' attribute instead of - match_operand. - -2003-10-18 Eric Botcazou - - * config/sparc/sparc.c (function_arg_record_value_1): New fourth - parameter packed_p. Search for a DECL_PACKED field only if - packed_p is false. Pass packed_p recursively. - (function_arg_record_value_2): Likewise. - (function_arg_record_value): Update calls to - function_arg_record_value_1 and function_arg_record_value_2. - -2003-10-18 Eric Botcazou - - * cse.c (cse_insn) [src_folded]: Check that the tentative replacement - was successfully forced to memory before using the result. - -2003-10-18 Eric Botcazou - - PR optimization/8178 - * config/i386/i386.md (*movsi_zero): New insn to set - a register to zero on TARGET_USE_MOV0 targets. - -2003-10-18 Kelley Cook - - * Makefile.in (Makefile): Depend on the all Make-lang.in fragments. - (POSTSTAGE1_FLAGS_TO_PASS): Pass down MAKEINFO and MAKEINFOFLAGS. - -2003-10-17 David Edelsohn - - * doc/invoke.texi (gcse-las): Fix typo. - -2003-10-17 Andrew Pinski - - * doc/install.texi: Remove first part of the sentence for - zsh not working. Change gcc to GCC. - - PR bootstrap/12546 - * doc/install.texi: Document that zsh does not work when - configuring gcc. - -2003-10-17 Nathanael Nerode - - * config/ptx4.h: Switch to DWARF 2; update comments. - -2003-10-17 Segher Boessenkool - Hartmut Penner - - PR 10404, partial 11591, partial 11601 - * config/rs6000/altivec.md ("altivec_dst", "altivec_dstt", - "altivec_dstst", "altivec_dststt", "altivec_lvsl", "altivec_lvsr", - "altivec_lvebx", "altivec_lvehx", "altivec_lvewx", "altivec_lvxl", - "altivec_lvx", "altivec_stvx", "altivec_stvxl", "altivec_stvebx", - "altivec_stvehx", "altivec_stvewx"): Use a memory_operand. - * config/rs6000/rs6000.c (altivec_expand_lv_builtin): New function. - (altivec_expand_stv_builtin): Adjust for the memory_operand. - (altivec_expand_builtin): Call altivec_expand_lv_builtin. - (altivec_init_builtins): Use `long int' for memory offsets. - -2003-10-17 Jan Hubicka - - * opts.c (common_handle_option): Handle OPT_fweb - * invoke.texi (-fweb): Add missing parts of documentation. - -2003-10-17 Rainer Orth - - * config/mips/linux.h (FUNCTION_NAME_ALREADY_DECLARED): Undef - before redefinition. - -2003-10-17 Mostafa Hagog - - * common.opt: Add description of the new -fgcse-las flag. - * flags.h (flag_gcse_las): Declaration of global flag_gcse_las. - * gcse.c (hash_scan_set): Handle the case of store expression and - insert the memory expression to the hash table, this way we make it - possible to discover redundant loads after stores and remove them. - (pre_insert_copy_insn): moved the call to update_ld_motion_stores, - to pre_insert_copies, it is not the correct place to call it after - adding stores to be in the available expression hash table. - (pre_insert_copies): Added the call to update_ld_motion_stores when - one or more copies were inserted. - * opts.c (common_handle_option): Handle the -fgcse-las flag. - * toplev.c (flag_gcse_las): Initialization of flag_gcse_las. - - * doc/invoke.tex: Document new -fgcse-las flag. - -2003-10-18 Alan Modra - - * config/rs6000/crtsavres.asm: Correct alignment of powerpc64 code - for posterity, then remove it. - -2003-10-17 Richard Earnshaw - Nathan Sidwell - - * config/arm/arm.c (use_return_insn): Not a single instruction, if - there's a frame pointer. - (arm_output_epilogue): Protect stack pointer from being corrupted - on interrupt. - -2003-10-17 Ulrich Weigand - - * ifcvt.c (noce_try_addcc): Handle ifs with 'else' case. - -2003-10-17 Ulrich Weigand - - * combine.c (simplify_set): Do not clear out undobuf.other_insn - already set elsewhere. - -2003-10-17 Kelley Cook - - * config/i386/i386.c (ix86_expand_prologue): Use - gen_allocate_stack_worker. - -2003-10-17 Rainer Orth - - * config.gcc (mips-sgi-irix6*o32): Only enable use_collect2 - without gas. - (mips-sgi-irix6*): Likewise. - - * config/mips/iris6gas.h: New file. - * gcc/config.gcc (mips-sgi-irix6*): Use it. - - * config/mips/mips.h (TARGET_IRIX): Provide default. - (TARGET_IRIX5): Likewise. - (TARGET_SGI_O32_AS): Likewise. - * config/mips/iris5.h (TARGET_IRIX): Redefine as 1. - (TARGET_IRIX5): Likewise. - * config/mips/iris6.h (TARGET_IRIX6): Remove. - (TARGET_IRIX5): Redefine as 0. - - * config/mips/mips.c (mips_output_external): Test for IRIX 6 O32 - linker workaround with TARGET_IRIX and mips_abi instead of - ASM_OUTPUT_UNDEF_FUNCTION. - (mips_file_end): Inline old ASM_OUTPUT_UNDEF_FUNCTION definition, - testing TARGET_IRIX and mips_abi explicitly. - * config/mips/iris5.h (ASM_OUTPUT_UNDEF_FUNCTION): Remove. - * config/mips/iris6.h (ASM_OUTPUT_UNDEF_FUNCTION): Remove undef. - - * config/mips/mips.c (irix_output_external_libcall): Renamed from - mips_output_external_libcall. - Use new TARGET_IRIX in guard. - * config/mips/mips-protos.h (irix_output_external_libcall): Match - this. - * config/mips/iris5.h (TARGET_ASM_EXTERNAL_LIBCALL): Likewise. - - * config/mips/iris5gas.h (HAVE_GAS_SHF_MERGE): Update comment. - Define as 0. - - * config/mips/iris6.h (FUNCTION_NAME_ALREADY_DECLARED): Define - depending on mips_abi. - * config/mips/linux.h (FUNCTION_NAME_ALREADY_DECLARED): Define as 1. - * config/mips/mips.c (mips_output_function_prologue): Test - FUNCTION_NAME_ALREADY_DECLARED at runtime. - (mips_output_function_epilogue): Likewise. - (build_mips16_function_stub): Likewise. - (build_mips16_call_stub): Likewise. - * config/mips/mips.h (FUNCTION_NAME_ALREADY_DECLARED): Provide - default. - - * config/mips/iris6.h (DWARF2_UNWIND_INFO): Don't define for native - IRIX 6 O32 assembler. - (SUBTARGET_CC1_SPEC): Enforce mips2 ISA with O32 ABI. - (TARGET_OS_CPP_BUILTINS): Define _ABIO32, use it to define - _MIPS_SIM for O32 ABI. - (DWARF2_FRAME_INFO): Don't define for native IRIX 6 O32 assembler. - (ASM_DECLARE_FUNCTION_NAME): Integrate mips.h version. - (ASM_DECLARE_FUNCTION_SIZE): Move undef before redefinition. - Integrate O32 version. - (SUBTARGET_ASM_SPEC): Handle -mabi=32. - (SUBTARGET_ASM_DEBUGGING_SPEC): Add mdebug_asm_spec for gas with - O32 ABI. - (BSS_SECTION_ASM_OP_32): Define. - (BSS_SECTION_ASM_OP_64): Likewise. - (BSS_SECTION_ASM_OP): Define differently for O32 and N32/N64 ABIs - using them. - (TARGET_ASM_NAMED_SECTION): Reflect renaming. - Move up to allow override for O32 ABI without GNU as. - (EH_FRAME_SECTION_NAME): Define explicitly. - (MUST_USE_SJLJ_EXCEPTIONS): Define. - [_MIPS_SIM == _ABIO32 && !GAS] (CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP): Dummy definitions. - (TARGET_ASM_NAMED_SECTION): Undef statically. - (EH_FRAME_SECTION_NAME): Likewise. - (ASM_OUTPUT_FILENAME): Integrate mips.h version. - (LINK_SPEC): Only use default options -call_shared -no_unresolved - without -r. - Don't pass -init, -fini with -mabi=32. - (COLLECT_PARSE_FLAG): Define. - - * config/mips/mips.c (iris6_asm_named_section_1): Changed guard to - TARGET_IRIX. - Renamed to use irix_ prefix. - (iris6_asm_named_section): Likewise. - (iris_section_align_entry_eq): Likewise. - (iris_section_align_entry_hash): Likewise. - (iris6_file_start): Likewise. - (iris6_section_align_1): Likewise. - (iris6_file_end): Likewise. - (iris6_section_type_flags): Likewise. - (iris_section_align_htab): Likewise. - (iris_orig_asm_out_file): Likewise. - [TARGET_IRIX] (TARGET_ASM_FILE_START): Reflect rename. - (TARGET_ASM_FILE_END): Likewise. - (TARGET_SECTION_TYPE_FLAGS): Likewise. - - * config/mips/mips.c [TARGET_IRIX5 && !TARGET_IRIX6] - (TARGET_ASM_UNALIGNED_HI_OP): Use runtime initialization in - override_options instead. - (TARGET_ASM_UNALIGNED_SI_OP): Likewise. - (TARGET_ASM_UNALIGNED_DI_OP): Likewise. - * config/mips/mips.c (override_options) [USE_COLLECT2]: Restore - flag_gnu_linker to defaults without USE_COLLECT2 for non-IRIX O32 - assemblers. - Likewise for constructor/destructor handling. - (override_options): Handle IRIX O32 assembler quirks. - [TARGET_IRIX] (irix_asm_named_section): Handle O32 ABI with and - without gas. - (mips_file_start): Use new TARGET_IRIX. - (mips_declare_object_name): No special processing for IRIX O32 - assembler. - (mips_finish_declare_object): Likewise. - (irix_asm_output_align): Renamed from iris6_asm_output_align. - Don't record alignment for O32 ABI. - (irix_file_start): Renamed from iris6_file_start. - Return early for O32 ABI. - (irix_file_end): Renamed from iris6_file_end. - Don't emit .section directives for O32 ABI. - * config/mips/iris6.h (ASM_OUTPUT_ALIGN): Reflect renaming. - * config/mips/mips-protos.h (irix_asm_output_align): Likewise. - - * config/mips/t-iris6 (MULTILIB_OPTIONS): Add mabi=32. - (MULTILIB_OSDIRNAMES): Likewise. - -2003-10-17 Rainer Orth - - * collect2.c (COLLECT_PARSE_FLAG): Provide default. - (main): Use it. - * doc/tm.texi (COLLECT_PARSE_FLAG): Document it. - -2003-10-17 Richard Earnshaw - - * arm-modes.def (CC_Nmode): New condition code mode. - * arm.c (thumb_condition_code): Delete. - (arm_select_cc_mode): Handle single-bit test for Thumb. - (arm_print_operand, cases 'd' and 'D'): Don't special case the - condition code logic for Thumb. - (get_arm_condition_code): Handle CC_Nmode. - (thumb_cbrch_target_operand): New function. - * arm.h (PREDICATE_CODES): Add thumb_cbrch_target_operand. - * arm-protos.h (thumb_cbrch_target_operand): Add prototype. - * arm.md: Add Thumb split patterns for zero_extract and - sign_extract. - (tbit_cbranch, andsi3_cbranch_scratch, andsi3_cbranch) - (orrsi3_cbranch_scratch, orrsi3_cbranch, xorsi3_cbranch_scratch) - (xorsi3_cbranch, addsi3_cbranch, addsi3_cbranch_scratch) - (subsi3_cbranch, subsi3_cbranch_scratch): New Thumb patterns. - (cbranchne_decr1): Re-work to use CC_Nmode. - - * arm.c (thumb_expand_epilogue): Add clobbers of registers restored - by the return instruction. Add a use of the link register if it - wasn't stored. - -2003-10-17 Richard Earnshaw - - * flow.c (init_propagate_block_info): Don't abort if a conditional - jump is not a comparison of a register. Instead, just don't record - conditional life information. - -2003-10-16 Jan Hubicka - - PR optimization/12630 - * pa.md (movstrsi, movstrsi_internal): Use match_scratch in clobbers - for operands 7 and 8. - -2003-10-16 Kelley Cook - - * objc/Make-lang.in (objc-parse.o): Honor $(parsedir) for objc-parse.c. - -2003-10-16 Danny Smith - - * config/i386/cygming.h (ASM_OUTPUT_DEF_FROM_DECLS): Define. - - * config/i386/winnt.c (gen_stdcall_suffix): Make static - (gen_fastcall_suffix): Likewise. - (i386_pe_dllexport_p): Likewise. - (i386_pe_dllimport_p): Likewise. - (i386_pe_mark_dllexport): Likewise. - (i386_pe_mark_dllimport): Likewise. - (i386_pe_asm_named_section): Fix formatting. - -2003-10-16 Zack Weinberg - - * configure.in: Add snprintf to gcc_AC_CHECK_DECLS list. - * system.h: Declare snprintf if necessary. - * configure, config.in: Regenerate. - -2003-10-15 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_va_arg): Only align vector - arguments if TARGET_ALTIVEC_ABI. - -2003-10-15 Roger Sayle - - * builtins.c (fold_builtin_memcpy, fold_builtin_mempcpy, - fold_builtin_memmove, fold_builtin_strcpy, fold_builtin_strncpy, - fold_builtin_memcmp, fold_builtin_strcmp, fold_builtin_strncmp): - New functions. - (expand_builtin_memcpy): Use integer_zerop instead of testing - host_integerp and tree_low_cst directly. Move misapplied hunk - for optimization wher SRC and DEST point to the same location. - (expand_builtin_mempcpy): From here. - (expand_builtin_memmove): Use integer_zerop instead of testing - host_integerp and tree_low_cst_directly. - (expand_builtin_memset): Likewise. - (expand_builtin_memcmp): Likewise (and for integer_onep). - (expand_builtin_strncmp): Likewise. - (fold_builtin): Call the appropriate fold_builtin_foo functions - to optimize memcpy, mempcpy, memmove, strcpy, strncpy, memcmp, - strcmp and strncmp. - -2003-10-15 Geoffrey Keating - - * config/darwin-protos.h (machopic_non_lazy_ptr_name): Delete - prototype. Clean up some whitespace. - * config/darwin.c: Use gen_rtx_FOO (...) rather than - gen_rtx (FOO, ...). - (machopic_non_lazy_ptr_name): Make static. - (name_needs_quotes): Allow '.' and '$' unquoted. - (machopic_legitimize_pic_address): Improve codegen in dynamic-no-pic - case. - -2003-10-15 Gábor Lóki - - * fold-const.c (tree_swap_operands_p): Disable some features - when optimizing for size. - -2003-10-15 David Daney - - * config/mips/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New - * config/mips/mips.h (DWARF_FRAME_REGNUM): Fixed to allow unwind - from leaf functions. - (DWARF_FRAME_RETURN_COLUMN): Ditto. - (SIGNAL_UNWIND_RETURN_COLUMN): New, used - by MD_FALLBACK_FRAME_STATE_FOR. - * testsuite/gcc.dg/cleanup-9.c: Added mips*-*-linux* target. - -2003-10-15 Zack Weinberg - - * genmodes.c: Include hashtab.h. - (modes_by_name, hash_mode, eq_mode, struct mode_adjust) - (adj_bytesize, adj_alignment, adj_format, new_adjust) - (_ADD_ADJUST, ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FORMAT) - (print_maybe_const_decl, emit_mode_adjustments): New. - (known_modes): Rename to modes. - (find_mode): Kill class argument; look up in hash table. - (new_mode): Insert into hash table also. - (new_adjust): New. - (reset_float_format, make_partial_integer_mode) - (make_vector_mode): Tweak error reporting. - (reset_float_format): Correct type of fourth argument. - (emit_insn_modes_h): Add #defines to help make mode_size, - mode_base_align, and real_format_for_mode conditionally const. - (emit_mode_size, emit_mode_base_align): Use print_maybe_const_decl. - (emit_real_format_for_mode): Likewise, but temporarily disabled. - (emit_insn_modes_c): Call emit_mode_adjustments. - (main): Initialize modes_by_name. - * Makefile.in: Update dependencies. - * machmode.def: Document EXPR arguments and new ADJUST_* statements. - * machmode.h: Use CONST_MODE_SIZE and CONST_MODE_BASE_ALIGN in - declarations of mode_size and mode_base_align. Declare - init_adjust_machine_modes. - * toplev.c (backend_init): Call init_adjust_machine_modes. - -2003-10-15 Olivier Hainque - - * genmodes.c (calc_wider_mode): Allocate enough room for all the - entries we'll possibly assign in the sort buffer. - -2003-10-15 Ulrich Weigand - - * config.gcc (s390x-ibm-tpf*): New target. - * doc/install.texi: Document it. - * config/s390/t-tpf: New file. - * config/s390/tpf.h: New file. - -2003-10-15 Hans-Peter Nilsson - - PR target/12598 - * config/cris/cris.md (define_split "*mov_sidesi_biap_mem"+1) - (define_splits "*mov_sidesi_mem"+1, "casesi"+9, +10, +11, +12): - Use cris_mem_op and replace_equiv_address, not gen_rtx_MEM. - ("call", "call_value", define_split "*mov_sidesi_mem"+19, +20) - (define_split "*mov_sidesi_mem"+21, +22, +23, +24, +25, +26, +27) - (define_split "*mov_sidesi_mem"+28, +29, +30): Use - replace_equiv_address, not gen_rtx_MEM. - * config/cris/cris.c (cris_mem_op): New match_operator function. - (cris_notice_update_cc): Use replace_equiv_address, not - gen_rtx_MEM. - * config/cris/cris.h (PREDICATE_CODES): Add cris_mem_op. - -2003-10-15 Bernardo Innocenti - - * config/m68k/m68k.h (MASK_SEP_DATA, TARGET_SEP_DATA, - MASK_ID_SHARED_LIBRARY, TARGET_ID_SHARED_LIBRARY): Move - definitions after the other flags. - -2003-10-14 Ziemowit Laski - - * c-parse.in (methoddef, methodproto): Call objc_add_method() - instead of add_method(). - * objc/objc-act.c (objc_check_decl): Do not check for - constant_string_type. - (add_method): Rename to objc_add_method(). - (really_start_method): Call objc_add_method() instead of - add_method(). - * objc/objc-act.h (add_method): Rename to objc_add_method(). - -2003-10-14 Ulrich Weigand - - * config/s390/s390-protos.h (s390_alc_comparison): Add prototype. - (s390_slb_comparison): Likewise. - * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison): - New functions. - * config/s390/s390.h (PREDICATE_CODES): Add s390_alc_comparison - and s390_slb_comparison. - * config/s390/s390.md ("*adddi3_31", "*subdi3_31"): Do not use on - zSeries machines. - ("*adddi3_31z", "*subdi3_31z"): New insns. - ("*adddi3_alc_cc", "*adddi3_alc", "*subdi3_slb_cc", "*subdi3_slb", - "*addsi3_alc_cc", "*addsi3_alc", "*subsi3_slb_cc", "*subsi3_slb"): - New insns. - -2003-10-14 Nathanael Nerode - - * configure.in: Clean up some feedback echoes. - * configure: Regenerate. - - * aclocal.m4: Properly quote names of macros being defined. - - * config.gcc (am33_2.0-*-linux*): Use t-slibgcc-elf-ver. - -2003-10-14 Steve Ellcey - - * config/ia64/ia64.c (ia64_expand_call): Force function address - to DImode. - * config/ia64/ia64.md (call_gp): Put DImode on operand 0. - -2003-10-14 Ulrich Weigand - - * config/s390/s390.md ("muldf3", "*muldf3", "*muldf3_ibm", - "mulsf3", "*mulsf3", "*mulsf3_ibm"): Do not clobber CC. - ("divdf3", "*divdf3", "*divdf3_ibm", "divsf3", "*divsf3", - "*divsf3_ibm"): Likewise. - -2003-10-14 Nathanael Nerode - - * config.gcc, config/m68hc11/t-m68hc11-gas: Replace uses of - target_alias with target_noncanonical. - -2003-10-14 Geoffrey Keating - - * expr.c (block_move_libcall_safe_for_call_parm): Clean up, - and add case for machines where outgoing register parameters - get stack space. - - * config/darwin.c (machopic_indirect_data_reference): Use a scratch - register when generating indirect address. - -2003-10-14 Richard Earnshaw - - * arm.c (arm_addimm_operand): MODE arguemnt is unused. - * arm.md (cbranchne_decr1): Fix bootstrap warning. - -2003-10-14 Rainer Orth - - * fixinc/inclhack.def (alpha_pthread_gcc): New fix. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/pthread.h [ALPHA_PTHREAD_GCC_CHECK]: New - testcase. - Fixes PR bootstrap/9330. - -2003-10-13 Eric Christopher - - * config/frv/frv.c (frv_adjust_field_align): Redo check for - too wide bitfields. - (frv_hard_regno_mode_ok): Add SPR_P and AP_FIRST. - * config/frv/frv.h (FUNCTION_PROFILER): Remove abort call. - (SBSS_SECTION_ASM_OP): Remove. - (EXTRA_SECTIONS): Remove in_sbss. - (EXTRA_SECTION_FUNCTIONS): Remove SBSS_SECTION_FUNCTION. - (SBSS_SECTION_FUNCTION, sbss_section): Remove. - (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Change sbss_section to - named_section. - -2003-10-13 Nathanael Nerode - - * Makefile.in, configure.in, config.host, mkheaders.in: Replace - uses of ${target_alias} for directory names (and other places which - won't like the empty string) with ${target_noncanonical}. Introduce - call early in configure.in to _GCC_TOPLEV_NONCANONICAL_TARGET so it's - available. - * configure: Regenerate. - -2003-10-13 Ian Lance Taylor - - * config/arm/iwmmxt.md (cond_iwmmxt_movsi_insn): New pattern. - * config/arm/arm.md: For splits which rely on conditional moves, - remove ! TARGET_IWMMXT condition. - -2003-10-13 David S. Miller - - * ifcvt.c (num_removed_blocks): Rename to num_true_changes. - (find_cond_trap): Always increment if we emit a conditional - trap insn. - -2003-10-13 Zack Weinberg - - * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o - with min-insn-modes.o. - (STAGESTUFF): Add min-insn-modes.c. - (genobjs): Add genmodes.o. - (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). - (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. - (min-insn-modes.c, min-insn-modes.o): New rules. - (s-modes): Also generate min-insn-modes.c. - ($(BUILD_PREFIX_1)insn-modes.o): Kill. - * genmodes.c (struct mode_data): Add format field. - (blank_mode, validate_mode, complete_mode): Update to match. - (make_scalar_mode): Separate into make_int_mode and make_float_mode. - (_SCALAR_MODE): Kill. - (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. - (emit_insn_modes_c_header): Adjust. - (emit_min_insn_modes_c_header, emit_real_format_for_mode) - (emit_min_insn_modes_c): New functions. - (emit_insn_modes_c): Call emit_real_format_for_mode. - (main): Add -m option to generate min-insn-modes.c. - * machmode.h: Update documentation. Add format argument to - all uses of FLOAT_MODE. - * real.c: Don't define real_format_for_mode here. - - * dwarfout.c: Move default definition of PRINT_REG... - * defaults.h: ...here. - * print-rtl.c: Include tm_p.h. - (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): - Kill. - (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround - this entire block with #ifndef GENERATOR_FILE. - * regclass.c: Unconditionally define reg_names. - * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h - Don't define DEBUG_REGISTER_NAMES. - * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in - redefinition of REGISTER_NAMES. - * config/i386/i386.h: Don't define DEBUG_PRINT_REG. - - * combine.c: Change all preprocessor conditionals on - EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit - for clarity. - * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. - * configure.in: Don't define EXTRA_CC_MODES. - * configure, config.in: Regenerate. - * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. - - * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: - May assume that GET_MODE_CLASS is accurate for extra CC modes - at all times. - - * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct - number of arguments to aggregate_value_p. - - * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. - * machmode.def: Explain ARCH-modes.def. Document - RESET_FLOAT_FORMAT. Improve commentary on various mode - clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, - XF, or TF modes here. Remove backward-compatibility - definition of CC. - - * config/alpha/alpha-modes.def: New file; define TF mode. - * config/arc/arm-modes.def: Define XF mode. - * config/c4x/c4x-modes.def: Define QF and HF modes. Unset - float format for SF and DF modes. - * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. - * config/i386/i386-modes.def: Define XF and TF modes. - * config/i960/i960-modes.def: Define TF mode. - * config/ia64/ia64-modes.def: Define TF and OI modes. - * config/m68k/m68k-modes.def: New file; define XF mode. - * config/mips/mips-modes.def: New file; define TF mode, reset - formats for SF and DF modes. - * config/pa/pa-modes.def: Define TF mode. - * config/rs6000/rs6000.c: Define TF and PSI modes. - * config/s390/s390-modes.def: Define OI mode. - * config/sh/sh-modes.def: New file; define PSI mode. - * config/sparc/sparc-modes.def: Define TF mode. - * config/vax/vax-modes.def: New file; reset formats for SF and - DF modes. - - * config/c4x/c4x.c (c4x_override_options): No need to mess - with real_format_for_mode or set REAL_MODE_FORMATs. - (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx - variable. - * config/i386/i386.c (override_options): No need to set - REAL_MODE_FORMATs here. - * config/i960/i960.c (i960_initialize): Likewise. - * config/m68k/m68k.c (m68k_override_options): Likewise. - * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT - for TFmode only if not the default. - * config/mips/mips.c (override_options): Likewise. - * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for - DFmode only if not the default. - - * config/i370/i370.h (RET_REG): Don't consider TFmode. - * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. - * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use - of modes that don't appear anywhere in the machine description. - - * config/arc/arc-modes.def, config/arm/arm-modes.def - * config/c4x/c4x-modes.def, config/frv/frv-modes.def - * config/i386/i386-modes.def, config/i960/i960-modes.def - * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def - * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def - * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def - * config/sparc/sparc-modes.def: Convert to new style for - declaring extra CC modes. - -2003-10-13 Zack Weinberg - - * cpplex.c (_cpp_clean_line): In the common case of a line - with no trigraphs and no \-newline, avoid writing to memory. - (_cpp_skip_block_comment): Use a local 'cur' pointer instead - of the buffer member. Make c an uchar to avoid unnecessary - sign extensions. - -2003-10-13 Nathanael Nerode - - * configure.in: Remove unnecessary test. - * configure: Regenerate. - - * configure.in: Fix grammatical error. Move UWIN host error to... - * config.host: Here. - * configure: Regenerate. - -2003-10-13 Andreas Krebbel - - * config/s390/s390.md ("*fmadddf4", "*fmsubdf4", "*fmaddsf4", - "*fmsubsf4"): Insns are now dependent on TARGET_FUSED_MADD instead - of flag_unsafe_math_optimizations. - * config/s390/s390.h ("MASK_NO_FUSED_MADD", "TARGET_NO_FUSED_MADD", - "TARGET_FUSED_MADD", "TARGET_SWITCHES"): Introduced new target flags - fused-madd and no-fused-madd. - * doc/invoke.texi: Documented the new options fused-madd and - no-fused-madd for S/390. - -2003-10-14 Alan Modra - - * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Choose - MASK_ALIGN_NATURAL if rs6000_alignment_string not given. Don't - assign DEFAULT_ABI. - (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Update comment. - * config/rs6000/rs6000.c: Formatting. - (rs6000_parse_alignment_option): Only set rs6000_alignment_flags - when rs6000_alignment_string given. - -2003-10-13 Eric Botcazou - - PR target/12538 - * config/sparc/sparc.c (MUST_SAVE_REGISTER): Delete. - (sparc_flat_must_save_register_p): New function to decide whether - a register must be saved/restored in the function prologue/epilogue. - (sparc_flat_compute_frame_size): Use it instead of MUST_SAVE_REGISTER. - -2003-10-12 Steven Bosscher - - * config/avr/avr.c, config/avr/avr-protos.h: Convert to - ISO C90 function declarations and definitions. - * config/sh/sh.c, config/sh/sh-protos.h: Likewise. - -2003-10-12 Nathanael Nerode - - * config.gcc (*-*-freebsd*): Use tm_defines instead of tiny - config files which do the same thing. - * config/freebsd3.h, config/freebsd4.h, config/freebsd5.h, - config/freebsd6.h: Remove now unnecessary files. - -2003-10-12 Steven Bosscher - - * c-common.c (c_common_truthvalue_conversion): Warn if the - address of a non-weak function is used as a truth value. - -2003-10-12 Kazu Hirata - - * config/h8300/h8300.c (WORD_REG_USED): Use SP_REG instead of - a literal. - * config/h8300/h8300.h (REGNO_OK_FOR_BASE_P): Use MAC_REG - instead of a literal. - -2003-10-12 Hans-Peter Nilsson - - * doc/extend.texi (Function Attributes): Mention the exceptional - path for noreturn-marked functions. - -2003-10-12 Jan Hubicka - - * cgraphunit.c (cgraph_decide_inlining): Fix uninitialized variable - warning. - -2003-10-12 Danny Smith - - * config/i386/i386.c (x86_this_parameter): Fix typo. - -203-10-11 Jan Hubicka - - * Makefile.in (web.o): New. - * web.c: New file. - * rtl.h (web_main): Declare. - * timervar.def (TV_WEB): New. - * toplev.c (dump_file_index, dump_file_info): Add DFI_web. - (rest_of_hanle_web): New. - (flag_web): New static variable. - (lang_independent_options): Add "web". - (rest_of_compilation): Call rest_of_handle_web. - * invoke.texi (-fweb): Document. - * common.opt (fweb): New. - * flags.h (flag_web): New. - * opts.c (decode_options): Set flag_web at -O3. - - * passes.texi (web construction): Document. - * invoke.texi (-O3): Document that -fweb is enabled. - - * regrename.c (regrename_optimize): Deal better with situation when - replacement failed. - - * sched-ebb.c: Include params.h and profile.h - (schedule_ebbs): Use tracer parameters to discover superblocks - * Makefile.in (sched-ebb.o): Add dependencies. - -2003-10-11 Roger Sayle - - * fold-const.c (negate_mathfn_p): New function to determine whether - a built-in mathematical function is sign preserving, f(-x) == -f(x). - Add support for BUILT_IN_ASIN, BUILT_IN_ASINF and BUILT_IN_ASINL. - (tree_swap_operands_p): Change API to take an additional argument - indicating that the swapped operands evaluate in reverse order. - Canonicalize VAR_DECLs and PARM_DECLs last if we can, i.e. neither - operand side-effects or we don't care about flag_evaluation_order. - (reorder_operands_p): New function to check whether its safe to - evaluate the given operands in reverse order. - (negate_expr_p): We can always negate integer constants unless - we honor -ftrapv and the signed type would overflow. Only allow - -(A-B) into B-A if reorder_operands_p says that its OK. Allow - negation of COMPLEX_CST if both real and imaginary parts can be - negated. Allow negation through floating point extensions and - sign-preserving built-in functions. - (negate_expr): Move the code to negate integers from "fold" to - here. Always negate integer constants unless we honor -ftrapv - and the signed type would overflow. Always negate real constants - unless we honor -ftrapping-math. Only convert -(A-B) into B-A - if allowed by reorder_operands_p. Add support for COMPLEX_CST. - Optimize negation through floating point extensions and - sign-preserving built-in functions (as defined by negate_mathfn_p). - (fold): Adjust calls to tree_swap_operands_p. - (fold ): Move the remaining negation optimizations - to negate_expr_p/negate_expr. - (fold ): Use reorder_operands_p to check whether we're - allowed to convert (-A) - B into (-B) - A. - -2003-10-11 Roger Sayle - - * builtins.c (expand_builtin_strcmp): Defend against the possibility - that gen_cmpstrsi may fail: Stabilize the argument list against - re-evaluation and expand the library call directly using this saved - argument list if a cmpstrsi sequence can't be generated. - (expand_builtin_strncmp): Likewise. - - * config/i386/i386.md (cmpstrsi, movstrsi): Disable with -Os. - -2003-10-11 Roger Sayle - - PR optimization/12260 - * simplify-rtx.c (simplify_unary_operation): Simplify all unary - operations through CONST nodes. Optimize (neg (plus X C)) as - (minus -C X) for constant values C. - (simplify_binary_operation): Optimize (minus (neg X) C) as - (minus -C X) for constant values C. - (simplify_plus_minus): Avoid creating (neg (const (plus X C)), - instead create (minus -C X). - -2003-10-11 Roger Sayle - - * expr.c (expand_expr ): Let expand_operands call - safe_from_p for us, once it chooses an evaluation order. - (expand_expr ): Likewise. - (expand_expr ): Likewise. If expand_operands - places the second operand in "target", swap the operands. - (do_store_flag): Let expand_operands call safe_from_p for us. - -2003-10-11 Eric Botcazou - - PR optimization/12544 - * function.c (put_var_into_stack): Don't generate ADDRESSOFs - for DECL_NONLOCAL decls. - -2003-10-11 Kazu Hirata - - * expr.c: Follow spelling conventions. - * final.c: Likewise. - * optabs.c: Likewise. - * sched-deps.c: Likewise. - * sdbout.c: Likewise. - -Sat Oct 11 12:24:23 CEST 2003 Jan Hubicka - - * varasm.c (notice_global_symbol): Fix handling of variables; avoid - re-computing of variable. - -2003-10-11 Richard Henderson - - * config/alpha/alpha.c (alpha_return_in_memory): Rename from - return_in_memory, make static, change signature to match target hook. - (alpha_setup_incoming_varargs): Make static, change signature to - match target hook, add code for vms and unicos. - (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, - TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, - TARGET_RETURN_IN_MEMORY, TARGET_SETUP_INCOMING_VARARGS, - TARGET_STRICT_ARGUMENT_NAMING, - TARGET_PRETEND_OUTGOING_VARARGS_NAMED): New. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.h (PROMOTE_FUNCTION_ARGS, - PROMOTE_FUNCTION_RETURN, RETURN_IN_MEMORY, - SETUP_INCOMING_VARARGS): Remove. - * config/alpha/unicosmk.h (SETUP_INCOMING_VARARGS): Remove. - * config/alpha/vms.h (SETUP_INCOMING_VARARGS): Remove. - -2003-10-11 Ian Lance Taylor - - * config/arm/arm.c (arm_regno_class): Handle IWMMXT_GR_REGS. - -2003-10-11 Kazu Hirata - - * config/m68k/lb1sf68.asm: Follow spelling conventions. - * config/m68k/m68k.c: Likewise. - * config/m68k/m68k.h: Likewise. - * config/m68k/m68k.md: Likewise. - -2003-10-11 Roger Sayle - - * builtins.c (expand_builtin_memcpy): Optimize case when the two - pointer arguments are the equal, non-volatile and side-effect free. - (expand_builtin_mempcpy): Likewise. - (expand_builtin_memmove): Likewise. - (expand_builtin_strcpy): Likewise. - (expand_builtin_memcmp): Likewise. - (expand_builtin_strcmp): Likewise. - (expand_builtin_strncmp): Likewise. - -2003-10-11 Roger Sayle - - * combine.c (apply_distributive_law): Enable "distributive" floating - point optimizations with -funsafe-math-optimizations. - -2003-10-11 Andrew Pinski - - * genmodes.c (emit_mode_mask) Change MASK to MODE_MASK. - -2003-10-11 Kazu Hirata - - * config/m68k/m68k-protos.h: Remove the prototype for - finalize_pic. - -2003-10-11 Kazu Hirata - - * config/m68k/m68k.c: Fix comment typos. - -2003-10-11 Bernardo Innocenti - - * config/m68k/m68k-protos.h (use_return_insn): Change return type from - int to bool. - * config/m68k/m68k.c (struct m68k_frame): Add funcdef_no member. - (current_frame): New global var. - (m68k_compute_frame_layout): Cache computations in current_frame. - (m68k_initial_elimination_offset): Use values from current_frame - instead of recomputing them. - (use_return_insn): Likewise. - (m68k_output_function_prologue): Likewise. - (m68k_output_function_epilogue): Likewise. - * config/m68k/m68k.h (TARGET_CPU_CPP_PREDEFINES): Fold __PIC__ handling - inside the block for __pic__. - -2003-10-11 Peter Barada - Bernardo Innocenti - - * config/m68k/m68k.c (m68k_frame): Move before protos referencing it. - (m68k_save_reg): Add boolean parameter `interrupt_handler'. - (m68k_interrupt_function_p): New function. - (m68k_handle_fndecl_attribute): Ditto. - (m68k_compute_frame_layout): Ditto. - (m68k_attribute_table): Define back-end specific attributes. - (m68k_output_function_epilogue): Emit RTE instruction for interrupt - functions. - -2003-10-11 Bernardo Innocenti - - * config/m68k/t-uclinux: New target Makefile fragment. - * config/m68k/uclinux.h: New target macro file. - * config.gcc (m68k-*-uclinux): New target definition. - -2003-10-10 Roger Sayle - - * builtins.c (builtin_mathfn_code): Generalize to check whether - the call is to any built-in function by comparing the call's - argument list against the builtin decl's function type. - -2003-10-10 Roger Sayle - - * cse.c (constant_pool_entries_regcost): New global variable to - hold the register cost component of constant_pool_entries_cost. - (fold_rtx): Calculate constant_pool_entries_regcost at the same - time as constant_pool_entries_cost. - (cse_insn): Set both src_folded_cost and src_folded_regcost from - constant_pool_entries_cost and constant_pool_entries_regcost. - (cse_main): Initialize constant_pool_entries_regcost to zero. - - * optabs.c (expand_unop): Attach a REG_EQUAL note describing - the semantics of the sequence of bit operations used to negate - a floating-point value. - (expand_abs_nojump): Likewise attach a REG_EQUAL note describing - the semantics of the bit operations used to abs a floating point - value. - -2003-10-11 Bernardo Innocenti - Paul Dale - - * config/m68k/lb1sf68.asm: Add __PIC__ and __ID_SHARED_LIBRARY__ - support. - * config/m68k/m68k-none.h (ASM_SPEC): Pass --pcrel to assembler on - -fpic, -fPIC, -msep-data and -mid-shared-library. - * config/m68k/m68k.c (m68k_library_id_string): New global variable. - (override_options): Add -msep-data and -mshared-library-id support. - (m68k_output_function_prologue): Generate code to load A5 for - TARGET_ID_SHARED_LIBRARY and TARGET_SEP_DATA. - (m68k_output_mi_thunk): Emit indirect jump on TARGET_ID_SHARED_LIBRARY. - (m68k_output_pic_call): New function. - * gcc/config/m68k/m68k.h (TARGET_SEP_DATA): New target flag. - (TARGET_ID_SHARED_LIBRARY): Ditto. - (TARGET_SWITCHES): Add switches for -mid-shared-library and -msep-data. - * gcc/config/m68k/m68k.md (call): Call m68k_output_pic_call(). - (call_value): Likewise. - -2003-10-10 Zack Weinberg - - * gengenrtl.c (find_formats, genheader): Make i an unsigned - int, remove cast of NUM_RTX_CODE. - * machmode.h: Make the HAVE_MACHINE_MODES #ifdef encompass the - entire file. Remove the #ifs on GET_MODE_MASK etc and - GET_MODE_WIDER_MODE etc. - -2003-10-10 Eric Christopher - - * lcm.c (optimize_mode_switching): Change NORMAL_MODE - to MODE_ENTRY and MODE_EXIT. Add MODE_AFTER for insns - that set mode. - * config/sh/sh.h (MODE_ENTRY): New macro. - (MODE_EXIT): Ditto. - (MODE_AFTER): Ditto. - * config/sh/sh.md: Change for MODE_AFTER. Add - fp_set attribute. - * doc/tm.texi: Document MODE_AFTER, MODE_ENTRY, and MODE_EXIT. - -2003-10-10 Zack Weinberg - - * genmodes.c, mode-classes.def: New files. - * machmode.def: Rewritten to genmodes.c interface. - * Makefile.in (extra_modes_file): New substitution variable. - (MACHMODE_H): No longer includes machmode.def or - @extra_modes_file@; instead, mode-classes.def and insn-modes.h. - (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. - (OBJS-common): Add insn-modes.o. - (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and - genmodes$(build_exeext). - (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, - genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. - (s-genrtl): Don't depend on $(RTL_BASE_H). - (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, - or $(RTL_BASE_H); just rtl.def. - * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or - real.h. Give fake definition of CONST_DOUBLE_FORMAT and - substitute definition of NUM_RTX_CODE. Add casts to avoid - warnings. - * machmode.h: Include insn-modes.h, not machmode.def. Include - mode-classes.def to define enum mode_class. Tweak definitions - of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, - GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. - (inner_mode_array): Renamed mode_inner. - (mode_base_align): New. - * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, - mode_unit_size, mode_wider_mode, mode_mask_array, - inner_mode_array, class_narrowest_mode): Delete definitions. - * stor-layout.c (get_mode_alignment): Use mode_base_align. - * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode - and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. - - * config/ip2k/ip2k.h, config/iq2000/iq2000.h: - No need to define BITS_PER_UNIT. - -2003-10-10 Richard Kenner - - * config/ia64/ia64.c (ia64_vms_init_libfuncs): New function. - (ia64_output_function_prologue): Only write .prologue if --with-gnu-as. - (ia64_initialize_trampoline): If not using GAS, declare trampoline - as global. - * config/ia64/ia64.h (ASM_APP_ON, ASM_APP_OFF): Add vers for not GAS. - (ASM_OUTPUT_DEBUG_LABEL): Likewise. - - * stor-layout.c (compute_record_mode): Don't force BLKmode if - field is zero-length BLKmode. - * expr.c (expand_expr, case COMPONENT_REF): Handle case of BLKmode - zero-size references. - - * combine.c (distribute_links): Properly test for REG being set. - - * config/alpha/alpha.c (alpha_expand_block_mode): Don't use - gen_lowpart and company except for REG. - -2003-10-10 John David Anglin - - * pa64-hpux.h (LINK_SPEC): Use `-z' option with HP ld. - -2003-10-10 Nathanael Nerode - - * config.gcc (mips*-*-netbsd*): Remove content-free line. - -2003-10-10 Herman A.J. ten Brugge - - * gcov-io.h: Check BITS_PER_UNIT when defining gcov_unsigned_t, - gcov_position_t and gcov_type. - -2003-10-09 Kaz Kojima - - * configure.in (HAVE_AS_TLS): Add sh-*-* and sh[34]*-*-* cases. - * configure: Regenerate. - -2003-10-09 Kazu Hirata - - * config/h8300/h8300.md (define_asm_attributes): Specify - the length of an asm insn more precisely. - -2003-10-09 Rainer Orth - - * config/mips/iris6.h (SUBTARGET_CPP_SPEC): Define. - -2003-10-09 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_dbx_register_number): Change first - FP register number to 48 and MAC16 accumulator to 0x210. - -2003-10-09 Nathanael Nerode - - * config.gcc: Remove redundant thread_file setting clauses for - various *-*-linux* targets. - -2003-10-09 Kazu Hirata - - * config/h8300/h8300.md (define_asm_attributes): New. - -2003-10-09 Roger Sayle - - * optabs.c (prepare_float_lib_cmp): Always attach a REG_EQUAL note - to the comparison, as emit_libcall_block calls copy_rtx on equiv. - -2003-10-09 Dorit Naishlos - - * haifa-sched.c (ok_for_early_schedule): New function. - (early_queue_to_ready): New function. - (schedule_block): Allow early removal of insns from Q. - (schedule_insn): Update INSN_TICK in case of premature - issue. - * common.opt (sched_stalled_insns): New flag. - (sched_stalled_insns_dep): New flag. - * flags.h: Same above flags. - * opts.c: Same as above. - * toplev.c: Same as above. - * target.h (targetm.sched.is_costly_dependence): New - hook. - * target-def.h: Same as above. - * config/rs6000/rs6000.h: (rs6000_sched_costly_dep): - Support new flag -msched-costly-dep. - (DEFAULT_SCHED_COSTLY_DEP): Define. - * config/rs6000/rs6000.c: - (rs6000_is_costly_dependence): New function. - (is_load_insn, is_store_insn): New functions. - (is_load_insn1, is_store_insn1, is_mem_ref): New - functions. - * doc/invoke.texi (-fsched-stalled-insns-dep) - (-fsched-stalled-insns, -msched-costly-dep): Document - options. - * doc/tm.texi (is_costly_dependence): Define new - scheduler target hook. - -2003-10-09 Jason Merrill - - PR c++/6392 - * c-common.c (c_build_qualified_type): Look through arrays first. - (c_apply_type_quals_to_decl): Look through arrays. - - * c-common.c (c_apply_type_quals_to_decl): Unset TREE_READONLY for - types with constructors. - - * coverage.c (build_ctr_info_value): Use build_decl to make a - VAR_DECL. - (create_coverage): Likewise. - - * stmt.c (resolve_asm_operand_names): Call check_unique_operand_names - here. - (expand_asm_operands): Not here. - (parse_input_constraint): No longer static. - * tree.h: Declare it. - -2003-10-08 Kaz Kojima - - * config/sh/t-linux (SHLIB_LINK): Override to use a linker script - libgcc_s.so. - (SHLIB_INSTALL): Likewise. - -2003-10-08 Nathanael Nerode - - * doc/install.texi: Remove reference to removed 'pthreads' thread - option. - -2003-10-08 Aldy Hernandez - - * config/rs6000/rs6000.md ("abssi2_isel"): Add early clobber to - operand 2. - -2003-10-08 Nathanael Nerode - - * config.gcc: Don't accept --enable-threads=pthreads. Clean - up related case statements. - * configure.in: Don't accept --enable-threads=pthreads, - decosf1, mach, or os2 (none of which work anyway). Alphabetize - supported thread files in case clause. - * configure: Regenerate. - -2003-10-08 Geoffrey Keating - - * function.c (pad_to_arg_alignment): Move 'boundary_in_bytes' - definition to above SPARC_STACK_BOUNDARY_HACK. - -2003-10-08 Jason Merrill - - * c-pretty-print.c (pp_c_postfix_expression) - : Fix thinko. - -2003-10-08 Rainer Orth - - * mklibgcc.in: Don't hide undefined or typeless symbols. - -2003-10-08 John David Anglin - - PR optimization/12142 - * cse.c (count_reg_usage): In a SET with a REG SET_DEST, count the - uses of the register in the SET_SRC. Remove unnecessary argument. - * pa.c (legitimize_pic_address): Before reload, use a scratch register - for the intermediate result in loading the address of a SYMBOL_REF. - Set the MEM_NOTRAP_P flag for the MEM. Add a REG_EQUAL to the insn - which loads the SYMBOL_REF address. - -2003-10-08 Timo Kokkonen - Eric Botcazou - - PR bootstrap/12490 - * scan-decls.c (MAX_EXTERN_C_BRACES): New preprocessor constant - to define the size of the extern_C_braces array. Set it to 200. - (scan_decls): Abort when extern_C_braces_length is out-of-bounds. - -2003-10-08 Carlo Wood - - * Makefile.in (gengtype-lex.c): flex 2.5.4[a] doesn't understand - a space after the -o option. flex 2.5.31 understands both, with - and without the space. Removed that space. - -2003-10-08 Richard Sandiford - - * config/mips/mips.c (mips_frame_info): Add cprestore_size field. - (compute_frame_size): Initialize it. Remove the .cprestore slot - from args_size. - (mips_output_function_prologue): Simplify accordingly. - (mips_debugger_offset): Change the mips16 frame pointer offset from - current_function_outgoing_args to cfun->machine->frame.args_size. - (mips_initial_elimination_offset): Likewise. - (mips_expand_prologue): Likewise. - (mips_expand_epilogue): Likewise. - -2003-10-08 Richard Sandiford - - * config/mips/mips.h (EXTRA_CONSTRAINT): Add 'W' constraint. - (EXTRA_MEMORY_CONSTRAINT): Define. - (CAN_ELIMINATE): Remove lwu workaround. - * config/mips/mips.md (*zero_extendsidi2_mem): Enable for mips16 too. - Use a 'W' constraint for the source operand. - -2003-10-08 Kazu Hirata - - * genopinit.c (main): Output code to declare undefined - variables. - -2003-10-07 Kelley Cook - - * gengtype-lex.l: Remove -Wtraditional cruft. - * Makefile.in (gengtype-lex.c): Likewise. - -2003-10-07 Zdenek Dvorak - - * cfgloopmanip.c (fix_irreducible_loops): Initialize e correctly. - -2003-10-07 Jason Merrill - - PR c++/12519 - * c-semantics.c (genrtl_cleanup_stmt): Ignore the CLEANUP_DECL if - it isn't a decl. - -2003-10-07 Alexandre Oliva - - * gcc.c (cpp_options): Only pass -fworking-directory for -g* if - not overridden. - Fixes PR bootstrap/12173. - -2003-10-07 Zack Weinberg - - * errors.c: Don't include coretypes.h or tm.h. - (trim_filename): Use IS_DIR_SEPARATOR. - * Makefile.in: Update dependencies of errors.o and - $(BUILD_PREFIX_1)errors.o. - -2003-10-07 Geoffrey Keating - - * function.c (pad_to_arg_alignment): Take STACK_POINTER_OFFSET into - account when aligning arguments. - * calls.c (STACK_POINTER_OFFSET): Move default from here ... - * defaults.h (STACK_POINTER_OFFSET): ... to here. - * config/sparc/sparc.h (STACK_BOUNDARY): Add comment about how - it's wrong when TARGET_ARCH64 && TARGET_STACK_BIAS. - (SPARC_STACK_BOUNDARY_HACK): Define. - * config/rs6000/rs6000.c (function_arg): On non-SVR4 systems, - arrange for vector parameters to varargs functions to be passed - in both memory and GPRs when appropriate. - (rs6000_va_arg): Vector arguments passed in memory are 16-byte - aligned. - - * hooks.c (hook_bool_tree_true): New. - (hook_rtx_tree_int_null): New. - (hook_rtx_rtx_null): Use NULL, not 0. - * hooks.h: Add 'extern' to everything. - (hook_bool_tree_true): New. - (hook_rtx_tree_int_null): New. - * targhooks.c (hook_bool_CUMULATIVE_ARGS_true): New. - * targhooks.h (hook_bool_CUMULATIVE_ARGS_true): New. - * config/rs6000/rs6000-protos.h (setup_incoming_varargs): Remove - prototype. - * config/rs6000/rs6000.c (rs6000_return_in_memory): New. - (setup_incoming_varargs): Prototype. - (TARGET_PROMOTE_FUNCTION_ARGS): Define. - (TARGET_PROMOTE_FUNCTION_RETURN): Define. - (TARGET_STRUCT_VALUE_RTX): Define. - (TARGET_RETURN_IN_MEMORY): Define. - (TARGET_SETUP_INCOMING_VARARGS): Define. - (TARGET_STRICT_ARGUMENT_NAMING): Define. - (TARGET_PRETEND_OUTGOING_VARARGS_NAMED): Define. - (init_cumulative_args): Use rs6000_return_in_memory. - (setup_incoming_varargs): Make 'static'. - * config/rs6000/rs6000.h (PROMOTE_FUNCTION_ARGS): Delete. - (PROMOTE_FUNCTION_RETURN): Delete. - (STRUCT_VALUE): Delete. - (RETURN_IN_MEMORY): Delete. - (SETUP_INCOMING_VARARGS): Delete. - -2003-10-07 Gerald Pfeifer - - * doc/invoke.texi (Warning Options): Simplify and clarify the - descriptions of -Wnonnull and -Winit-self. - -2003-10-07 Richard Earnshaw - - * optabs.c (init_intraclass_conv_libfuncs): Fix order of array - indicees for floating-point conversersion libcalls. - -2003-10-07 Nathanael Nerode - - * Makefile.in: Add more comments separating large conceptually - separate sections. - - * configure.in: Clean up thread file logic. - * configure: Regenerate. - -2003-10-07 Danny Smith - - * config/i386/cygming.h (READONLY_DATA_SECTION_ASM_OP): Define. - (switch_to_section): Handle in_readonly_data. - * config/i386/winnt.c (i386_pe_asm_named_section): Handle - readonly data. - -2003-10-07 Richard Earnshaw - - * arm.md (cmpsi2_addneg): New ARM pattern. Add peephole2 to generate - it. - (cbranchne_decr1): New Thumb pattern. - * arm.c (arm_addimm_operand): New insn predicate. - * arm-protos.h: Add a prototype for it. - * arm.h (PREDICATE_CODES): Add it. - -2003-10-07 Dorit Naishlos - - * sched-int.h (sched_info): New field - sched_max_insns_priority. - * sched-rgn.c (init_ready_list): Add invocations to - targetm.sched.adjust_priority. - (sched_max_insns_priority): Init new field. - * sched-ebb.c (sched_max_insns_priority): Init new field. - * haifa-sched.c (set_priorities): Set - sched_info->sched_max_insns_priority. - * config/rs6000/rs6000.h: - (rs6000_sched_restricted_insns_priority_str): Support new - flag -mprioritize-restricted-insns. - (DEFAULT_RESTRICTED_INSNS_PRIORITY): Define. - * config/rs6000/rs6000.c (is_dispatch_slot_restricted): New - function. - (rs6000_adjust_priority): Change priority of restricted - insns, using above new function and new flag. - * doc/invoke.texi (-mprioritize-restricted-insns): Document - new option. - -2003-10-07 Zack Weinberg - - * expr.c (cmpstr_optab, cmpmem_optab): New. - * genopinit.c: Initialize them. - * optabs.h: Declare them. - * optabs.c (init_optabs): Clear them. - (prepare_cmp_insn): Use cmpstr_optab and cmpmem_optab to find - block memory compare insns, not conditional chains. Restructure - the fallback generation of a call to memcmp/bcmp for better - readability. - -2003-10-07 Richard Sandiford - - * config/mips/mips.c (MIPS_MAX_FIRST_STACK_STEP): New macro. - (mips_save_restore_fn): New typedef. - (mips_add_large_offset_to_sp, mips_emit_frame_related_store): Remove. - (mips_set_frame_expr, mips_frame_set): Move above prologue code. - (save_restore_insns): Remove, replacing with... - (mips_save_restore_reg, mips_for_each_saved_reg): ...these new fns. - (mips_save_reg, mips_restore_reg): New function. - (mips_expand_prologue, mips_expand_epilogue): Rework. - * config/mips/mips.h (MIPS_TEMP1_REGNUM, MIPS_TEMP2_REGNUM): Remove. - (MIPS_PROLOGUE_TEMP_REGNUM, MIPS_EPILOGUE_TEMP_REGNUM): New macros. - (MIPS_PROLOGUE_TEMP, MIPS_EPILOGUE_TEMP): New macros. - -2003-10-07 Richard Sandiford - - * config/mips/mips.c (mips_expand_prologue): Remove unused - traversal of function arguments. - -2003-10-07 Richard Sandiford - - * doc/invoke.texi: Remove documentation of -mentry. - * config/mips/mips.c (mips_entry_string, mips_entry): Remove. - (override_options, mips_save_reg_p): Remove handling. - (compute_frame_size, mips_output_function_prologue): Likewise. - (mips_expand_prologue, mips_expand_epilogue): Likewise. - * config/mips/mips.h (mips_entry_string): Remove declaration. - (TARGET_OPTIONS): Remove -mentry. - * config/mips/mips16.S: Remove mention of -mentry. - -2003-10-06 Zack Weinberg - - * libfuncs.h (LTI_extendsfdf2, LTI_extendsfxf2, LTI_extendsftf2) - (LTI_extenddfxf2, LTI_extenddftf2, LTI_truncdfsf2, LTI_truncxfsf2) - (LTI_trunctfsf2, LTI_truncxfdf2, LTI_trunctfdf2, LTI_floatsisf) - (LTI_floatdisf, LTI_floattisf, LTI_floatsidf, LTI_floatdidf) - (LTI_floattidf, LTI_floatsixf, LTI_floatdixf, LTI_floattixf) - (LTI_floatsitf, LTI_floatditf, LTI_floattitf, LTI_fixsfsi, LTI_fixsfdi) - (LTI_fixsfti, LTI_fixdfsi, LTI_fixdfdi, LTI_fixdfti, LTI_fixxfsi) - (LTI_fixxfdi, LTI_fixxfti, LTI_fixtfsi, LTI_fixtfdi, LTI_fixtfti) - (LTI_fixunssfsi, LTI_fixunssfdi, LTI_fixunssfti, LTI_fixunsdfsi) - (LTI_fixunsdfdi, LTI_fixunsdfti, LTI_fixunsxfsi, LTI_fixunsxfdi) - (LTI_fixunsxfti, LTI_fixunstfsi, LTI_fixunstfdi, LTI_fixunstfti) - (extendsfdf2_libfunc, extendsfxf2_libfunc, extendsftf2_libfunc) - (extenddfxf2_libfunc, extenddftf2_libfunc, truncdfsf2_libfunc) - (truncxfsf2_libfunc, trunctfsf2_libfunc, truncxfdf2_libfunc) - (trunctfdf2_libfunc, floatsisf_libfunc, floatdisf_libfunc) - (floattisf_libfunc, floatsidf_libfunc, floatdidf_libfunc) - (floattidf_libfunc, floatsixf_libfunc, floatdixf_libfunc) - (floattixf_libfunc, floatsitf_libfunc, floatditf_libfunc) - (floattitf_libfunc, fixsfsi_libfunc, fixsfdi_libfunc, fixsfti_libfunc) - (fixdfsi_libfunc, fixdfdi_libfunc, fixdfti_libfunc, fixxfsi_libfunc) - (fixxfdi_libfunc, fixxfti_libfunc, fixtfsi_libfunc, fixtfdi_libfunc) - (fixtfti_libfunc, fixunssfsi_libfunc, fixunssfdi_libfunc) - (fixunssfti_libfunc, fixunsdfsi_libfunc, fixunsdfdi_libfunc) - (fixunsdfti_libfunc, fixunsxfsi_libfunc, fixunsxfdi_libfunc) - (fixunsxfti_libfunc, fixunstfsi_libfunc, fixunstfdi_libfunc) - (fixunstfti_libfunc): Delete. - * optabs.h (struct optab_handlers): Break out of struct optab. - (struct convert_optab, convert_optab, enum convert_optab_index, - convert_optab_table, sext_optab, zext_optab, trunc_optab, - sfix_optab, ufix_optab, sfixtrunc_optab, ufixtrunc_optab, - sfloat_optab, ufloat_optab): New. - (set_conv_libfunc): Prototype. - (GEN_FCN): Use C90 indirect call syntax, remove unnecessary cast. - (trunc_optab): Renamed btrunc_optab. - * builtins.c (expand_builtin_mathfn): Update to match. - * optabs.c (extendtab, fixtab, fixtrunctab, floattab): Delete. - (convert_optab_table, new_convert_optab, init_convert_optab) - (init_interclass_conv_libfuncs, init_intraclass_conv_libfuncs) - (set_conv_libfunc): New. - (can_extend_p, gen_extend_insn, can_fix_p, can_float_p) - (expand_float, expand_fix): Use new conversion optabs, - not old insn code tables or long chains of ifs. - (init_optabs): No need to clear old insn code tables. - Initialize the new optabs, not the old libfunc array entries. - Don't handle FIXUNS_TRUNC_LIKE_FIX_TRUNC here. - * genopinit.c: Initialize conversion optabs, not the - former insn code tables. Remove unnecessary casts. - Handle FIXUNS_TRUNC_LIKE_FIX_TRUNC here. - * expr.c (convert_move): Remove redundant check that - to_real==from_real. Use the conversion optabs instead - of long chains of tests of modes. Move partial-integer-mode - interconversion above all integer conversion. Do not recurse - on a value forced into a register in the original mode. - - * config/gofast.h, config/frv/frv.c, config/ia64/ia64.c - * config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c - * config/sparc/sparc.c: Use set_conv_libfunc to adjust entries - in new conversion optabs; do not reference the old libfunc - array entries. No need to include libfuncs.h. - -2003-10-06 Roger Sayle - - * config/i386/i386.c (ix86_expand_setcc): Annotate the floating - point comparison sequence with a REG_EQUAL note that describes - the comparison's semantics. - -2003-10-06 Roger Sayle - - * expr.c (expand_expr ): Handle the void type semantics - of COND_EXPR when expanding the "A op 0 ? FOO : A" optimizations. - -2003-10-06 Roger Sayle - Zack Weinberg - - * optabs.c (prepare_float_lib_cmp): Avoid searching for REG_RETVAL - instruction by using LCT_CONST and then calling emit_libcall_block - ourselves. - -2003-10-06 Falk Hueffner - - PR optimization/11974 - * optabs.c (expand_unop): Promote libcall outmode according to - hard_libcall_value. - -2003-10-06 Zack Weinberg - - * real.h (REAL_MODE_FORMAT): New macro. - * c-cppbuiltin.c, optabs.c, real.c, config/alpha/alpha.c - * config/c4x/c4x.c, config/i370/i370.c, config/i386/freebsd.h - * config/i386/i386.c, config/i960/i960.c, config/ia64/ia64.c - * config/m68k/m68k.c, config/mips/mips.c, config/rs6000/rs6000.c - * config/vax/vax.c: Use REAL_MODE_FORMAT instead of referring - directly to real_format_for_mode array, wherever possible. - -2003-10-06 Devang Patel - - * dwarf2out.c (is_main_source): Remove variable. - (dwarf2out_start_source_file): Do not check is_main_source. - Do not reset is_main_source. - (dwarf2out_init): Do not initialize is_main_source. - -2003-10-06 Rainer Orth - - * fixinc/inclhack.def (stdio_va_list): Removed _ap fix. - (irix_stdio_va_list): Don't require leading printf, IRIX 6.5.21 - introduced some multi-line prototypes. - * fixinc/fixincl.x: Regenerate. - -2003-10-06 Richard Sandiford - - * config/mips/mips.h (PREDICATE_CODES): Add stack_operand. - * config/mips/mips.c (stack_operand): New predicate. - * config/mips/mips.md: Use it for the destination of mips16 insns - that store $31. - -2003-10-06 Richard Sandiford - - * config/mips/mips.md (*lowsi): Renamed from lowsi. - (*lowdi): Likewise lowdi. - (*lowsi_mips16, *lowdi_mips16): New patterns. - * config/mips/mips.c (mips_const_insns, mips_output_move): Remove - mips16 CONSTANT_RELOC handling. - (mips_delegitimize_address): Adjust for new sdata representation. - -2003-10-06 Richard Sandiford - - * config/mips/mips.c (mips_arg_info): If MUST_PASS_IN_STACK, - skip any remaining register arguments. - -2003-10-06 Ulrich Weigand - - * reload.c (find_reloads_subreg_address): Use correct offset for - paradoxical MEM subregs on big-endian targets. - -2003-10-06 Andrew Haley - - * tree.c (get_callee_fndecl): Call - lang_hooks.lang_get_callee_fndecl. - * langhooks-def.h (LANG_HOOKS_GET_CALLEE_FNDECL): New. - (lhd_get_callee_fndecl): New. - -2003-10-06 Andrew Pinski - - * config/darwin.c (machopic_non_lazy_ptr_name): Fix off by one - error in calculating the length of the string. - (machopic_stub_name): Likewise. - -2003-10-06 Roger Sayle - - * optabs.c (prepare_float_lib_cmp): Attach a REG_EQUAL note - describing the return value of the comparison libcall to the - REG_RETVAL instruction of the emitted sequence. - -2003-10-06 Eric Botcazou - - PR optimization/12215 - * cse.c (cse_set_around_loop): Emit the move at the beginning - of the next basic block for trapping sets. - -2003-10-06 Eric Botcazou - - PR optimization/11637 - * combine.c (adjust_for_new_dest): New function to adjust the - notes and LOG_LINKS when the dest of an insn has changed. - (try_combine): Use it when deleting the first insn of a two-insn - parallel or splitting a two-load parallel. - -2003-10-06 Richard Sandiford - - * config/mips/mips.c (mips_classify_constant): Only allow UNSPECs - if TARGET_EXPLICIT_RELOCS. - -2003-10-06 Mark Mitchell - - PR bootstrap/12512 - * Makefile.in (info): Use double-colon rules. - (dvi): Likewise. - (generated-manpages): Likewise. - * configure.in: Do not create lang.info, lang.dvi, or - lang.generated-manpages hooks. - * configure: Regenerated. - * objc/Make-lang.in (objc.info): Remove. - (objc.dvi): Remove. - (objc.generated-manpages): Remove. - * doc/sourcebuild.texi: Update description of info, dvi, and - generated-manpages hooks. - -2003-10-06 Richard Sandiford - - * config/mips/mips.md: Merge mips16 lw/srl pattern with its splitter. - -2003-10-05 Andrew Pinski - - * config/darwin.c (machopic_non_lazy_ptr_name): Fix off by one - errors in memcpy destinations. - (machopic_stub_name): Likewise. - -2003-10-05 Andrew Pinski - - * config/darwin.c (machopic_non_lazy_ptr_name): - Change strcat to memcpy and add length together. - (machopic_stub_name): Likewise. - -2003-10-05 Kaz Kojima - - * config/sh/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Handle new - signal trampoline codes. - -2003-10-05 Chris Demetriou - - * config/mips/mips.md (*divsf3): Move description of - SB-1 F2 erratum from here to... - (divsf3): Here. Disable if TARGET_FIX_SB1 is set and - flag_unsafe_math_optimizations is not. - -2003-10-05 Aldy Hernandez - - * config/rs6000/linuxspe.h: Define TARGET_SPE_ABI, TARGET_SPE, - TARGET_E500, TARGET_ISEL, and TARGET_FPRS. - -2003-10-05 Kazu Hirata - - * c-pretty-print.c: Fix comment typos. - * c-pretty-print.h: Likewise. - * calls.c: Likewise. - * cfgloopmanip.c: Likewise. - * cgraphunit.c: Likewise. - * cppfiles.c: Likewise. - * final.c: Likewise. - * function.c: Likewise. - * gcov-io.h: Likewise. - * gcse.c: Likewise. - * genoutput.c: Likewise. - * loop.c: Likewise. - * postreload.c: Likewise. - * reg-stack.c: Likewise. - * regmove.c: Likewise. - * sched-int.h: Likewise. - * sched-rgn.c: Likewise. - * simplify-rtx.c: Likewise. - * tree-inline.c: Likewise. - * config/m68hc11/m68hc11.h: Likewise. - * config/mmix/mmix.c: Likewise. - * config/mn10300/mn10300.md: Likewise. - * config/sh/sh.h: Likewise. - -2003-10-05 Richard Henderson - - * tree-inline.c (remap_type): New. - (remap_decl): Use it. Remap DECL_SIZE*. - (copy_body_r): Use it. - (walk_tree): Walk TREE_TYPE too. - (copy_tree_r): Don't walk subtrees of types. - * tree.c (variably_modified_type_p): Restructure. Consider integer - types with non-const bounds variably modified. - -2003-10-05 Kazu Hirata - - * doc/invoke.texi: Fix typos. - -2003-10-05 Kazu Hirata - - * fold-const.c: Follow spelling conventions. - * function.c: Likewise. - * config/c4x/c4x.h: Likewise. - * config/c4x/c4x.md: Likewise. - * config/frv/frv.md: Likewise. - * config/rs6000/aix.h: Likewise. - * config/rs6000/linux64.h: Likewise. - * config/xtensa/xtensa.c: Likewise. - -2003-10-05 Kazu Hirata - - * c-pretty-print.c: Fix comment formatting. - * cfglayout.c: Likewise. - * cfgloopanal.c: Likewise. - * cppcharset.c: Likewise. - * dbxout.c: Likewise. - * ggc-page.c: Likewise. - * ggc.h: Likewise. - * target.h: Likewise. - -2003-10-04 Kelley Cook - - * gengtype-lex.l: Recognize typedef of functions without PARAMS macro. - -2003-10-04 Nathanael Nerode - - * config/v850/v850-c.c, config/v850/v850-protos.h, config/v850/v850.c: - Convert to ISO C90 function declarations and definitions. - -2003-10-04 Zack Weinberg - - * libfuncs.h - (LTI_eqhf2, LTI_nehf2, LTI_gthf2, LTI_gehf2, LTI_lthf2) - (LTI_lehf2, LTI_unordhf2, LTI_eqsf2, LTI_nesf2, LTI_gtsf2) - (LTI_gesf2, LTI_ltsf2, LTI_lesf2, LTI_unordsf2, LTI_eqdf2) - (LTI_nedf2, LTI_gtdf2, LTI_gedf2, LTI_ltdf2, LTI_ledf2) - (LTI_unorddf2, LTI_eqxf2, LTI_nexf2, LTI_gtxf2, LTI_gexf2) - (LTI_ltxf2, LTI_lexf2, LTI_unordxf2, LTI_eqtf2, LTI_netf2) - (LTI_gttf2, LTI_getf2, LTI_lttf2, LTI_letf2, LTI_unordtf2) - (eqhf2_libfunc, nehf2_libfunc, gthf2_libfunc, gehf2_libfunc) - (lthf2_libfunc, lehf2_libfunc, unordhf2_libfunc, eqsf2_libfunc) - (nesf2_libfunc, gtsf2_libfunc, gesf2_libfunc, ltsf2_libfunc) - (lesf2_libfunc, unordsf2_libfunc eqdf2_libfunc, nedf2_libfunc) - (gtdf2_libfunc, gedf2_libfunc, ltdf2_libfunc, ledf2_libfunc) - (unorddf2_libfunc eqxf2_libfunc, nexf2_libfunc, gtxf2_libfunc) - (gexf2_libfunc, ltxf2_libfunc, lexf2_libfunc, unordxf2_libfunc - (eqtf2_libfunc, netf2_libfunc, gttf2_libfunc, getf2_libfunc) - (lttf2_libfunc, letf2_libfunc, unordtf2_libfunc): - Delete. - * optabs.h (OTI_eq, OTI_ne, OTI_gt, OTI_ge, OTI_lt, OTI_le) - (OTI_unord, eq_optab, ne_optab, gt_optab, ge_optab, lt_optab) - (le_optab, unord_optab): New. - - * optabs.c (prepare_float_lib_cmp): Rewrite. Get the libfuncs - from the code_to_optab table, not a giant switch; use - swap_condition; do widening only if a comparison function that - we can call exists in a wider mode, not if a cmp_optab insn or - libfunc exists in a wider mode; call protect_from_queue - exactly once on each operand. - (init_optabs): Initialize the new optabs, not the deleted libfuncs. - - * config/gofast.h, config/ia64/ia64.c, config/mips/mips.c - * config/pa/pa.c, config/rs6000/rs6000.c, config/sparc/sparc.c: - Set floating point comparison libfuncs using set_optab_libfunc - on the appropriate optab. - - * config/ia64/ia64.c (ia64_hpux_init_libfuncs): Fix typo. - * config/rs6000/rs6000.c (rs6000_init_libfuncs): Correct ABI - selector conditionals. - -2003-10-04 Stephane Carrez - - * config/m68hc11/t-m68hc11-gas (MULTILIB_MATCHES): m68hcs12 is - identical to m68hc12 as far as libraries are concerned. - -2003-10-04 Eric Botcazou - - PR c/12446 - * c-typeck.c (convert_for_assignment): Issue an error for - array to pointer assignment after default conversion. - (digest_init): Likewise. - -2003-10-04 Fariborz Jahanian - - * c-decl.c (duplicate_decls): retain DECL_COMMON of old declaration - -2003-10-03 Gerald Pfeifer - - * doc/extend.texi (Function Attributes): Fix title of GNU C - Preprocessor manual. - (C++ Extensions): Fix reference to "Predefined Macros" in the - GNU C Preprocessor manual. - -2003-10-04 Richard Earnshaw - - * doc/extend.texi: Document how GCC estimates and relies on the size - of an asm. - -2003-10-04 Richard Sandiford - - * config/mips/mips.c (mips_pad_arg_upward): Pad floating-point - arguments downward for big-endian o64. - -2003-10-03 Robert Bowdidge - - * ggc-page.c (ggc_pch_write_object): Replace fseek() with fwrite() in - PCH generation, avoiding too-frequent flushes when writing to NFS - file system. - -2003-10-03 Ziemowit Laski - - * objc/objc-act.c (lookup_category): Mark as 'inline'. - -2003-10-03 Alexander Malmberg - Ziemowit Laski - - * objc/objc-act.c (add_method_to_hash_list, lookup_category): - New functions. - (lookup_method_in_hash_lists): New parameter indicating whether - we are messaging 'Class' or 'id'. - (check_duplicates): Likewise; do not assume all methods will - be either class or instance methods. - (generate_category, finish_class): Use lookup_category(). - (add_method): Use add_method_to_hash_list(); insert instance - methods of root classes into the global class method hash table. - (add_category): Use lookup_category(); avoid constructing - duplicate categories. - (really_start_method): Add method to corresponding @interface, - if not already there (and if the @interface exists). - (finish_message_expr, finish_objc): Adjust calls to - check_duplicates(). - -2003-10-03 Roger Sayle - - PR optimization/9325, PR java/6391 - * fold-const.c (fold_convert): For floating point to integer - conversions, return the maximum/minimum representable integer - value if the real constant overflows the destination type. - * tree.c (real_value_from_int_cst): Allow the type to be NULL, - meaning don't truncate the result to a floating point mode. - Simplify the logic by calling real_from_integer directly. - * simplify-rtx.c (simplify_unary_operation): Implement the - same semantics for folding floating point to integer conversions - in RTL. - -2003-10-03 Chris Demetriou - - * config/mips/mips.c (mips_emit_prefetch): Restructure - to avoid use of arrays, handle indexed prefetch. - * config/mips/mips.h (ISA_HAS_FP4, ISA_HAS_PREFETCH): Update comments. - (ISA_HAS_PREFETCHX): New deffine. - * config/mips/mips.md ("type" attr): Add new "prefetchx" value, - update comments. - (prefetch_indexed_di, prefetch_indexed_si): New insns. - -2003-10-03 Jeff Sturm - Roger Sayle - - PR optimization/12289 - * calls.c (emit_call_1): Pretend to have popped the arguments - to noreturn and longjmp functions instead of ignoring them. - (expand_call): Don't adjust stack_pointer_dela while - inhibit_defer_pop is set. - -2003-10-03 Andreas Schwab - - PR bootstrap/12276 - * configure.in: Check for libunwind on the host only if building - a native compiler. - * configure: Regenerated. - -2003-10-03 Paolo Carlini - - * unwind-pe.h (read_encoded_value_with_base): Constify u and - its inizialization cast. - -2003-10-03 Richard Sandiford - - PR target/12485 - * config/mips/mips.c (mips_load_got): GOT accesses can't trap. - -2003-10-02 Mark Mitchell - - PR optimization/12180 - * tree-inline.c (inline_forbidden_p_1): Do not permit inlining of - functions containing calls to __builtin_next_arg. - -2003-10-02 Chris Demetriou - - * config/mips/mips.c (mips_emit_prefetch): Use operand 3 - in instructions being output. - * config/mips/mips.md (prefetch_si_address): Change third - operand's constraint letter to 'I'. - (prefetch_di_address): Likewise. - (prefetch_si, prefetch_di): Set third operand to const0_rtx. - -2003-10-02 Zack Weinberg - - * system.h: Poison macros obsoleted by earlier patch. - * config/cris/cris.c: C90-ify a function definition. - -2003-10-02 Josef Zlomek - - PR/12292 - * combine.c (make_field_assignment): Check whether rtx's code - is CONST_INT before using INTVAL. - -2003-10-02 Josef Zlomek - - * cgraph.c (cgraph_node): Use INSERT instead of 1 in - htab_find_slot_with_hash. - (cgraph_node_for_identifier): Use NO_INSERT. - (cgraph_remove_node): Use NO_INSERT. - (cgraph_varpool_node): Use INSERT. - (cgraph_varpool_node_for_identifier): Use NO_INSERT. - -2003-10-02 Josef Zlomek - - Waldek Hebisch - PR/12072 - * varasm.c (compare_constant): Fix thinko. - -2003-10-02 Richard Sandiford - - * config/frv/frv.c (frv_issue_rate): New function. - (frv_pack_insns): Use it. - (TARGET_SCHED_ISSUE_RATE): Define. - -2003-10-02 Steven Bosscher - - * config/mcore/mcore.c: Convert to ISO C90 function declarations - and definitions. - * config/mcore/mcore.h: Likewise. - * config/mcore/mcore-protos.h: Likewise. - -2003-10-02 Richard Sandiford - - * config/frv/frv.c (frv_use_dfa_pipeline_interface): New function. - (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE): Define. - -2003-10-01 Per Bothner - - * c-lex.c (src_line): Remove unneeded static variable. - (cb_line_change): Set input_line directly, instead of src_line. - (get_non_padding_token): We no longer need to compensate for the - "horrible things" the C++ front-end does with the current line number, - - * cpplib.c (_cpp_pop_buffer): Do generate a _cpp_do_file_change - callback even when popping the main file. - * c-lex.c (fe_file_change): Handle a NULL new_map. - * fix-header.c (cb_file_change): Likewise. - * c-ppoutput.c (pp_file_change): Likewise. - - * cppinit.c (cpp_read_main_file): Split into two functions: - Distribute _cpp_stack_file call over the two functions. - (cpp_find_main_file): New function. - Don't call _cpp_do_file_change even if working_directory flag set. - (cpp_push_main_file): New function. - * cppfiles.c (_cpp_find_failed): New helper function. - (find_file): Made non-static and renamed to _cpp_find_file. - (_cpp_stack_file): No longer needed. But note the following. - (stack_file): Made non-static and renamed to _cpp_stack_file. - * fix-header.c (cpp_read_main_file): Replace cpp_read_main_file - call with calls to cpp_find_main_file and cpp_push_main_file. - (search_path_head): If there is no current buffer, use main_file. - * cpphash.h: Update function declarations. - * cpplib.h: Update function declarations. - - * c-opts.c (c_common_post_options): Don't call cpp_find_main_file yet. - (c_common_parse_file): No longer need to call cpp_read_main_file - when file_index > 0 (as in multi-file or server compiation). - (finish_options): Change to is an LC_ENTER, not LC_RENAME - as this now happens before cpp_push_main_file. - (push_command_line_include): When done with options, pass LC_LEAVE - instead of LC_RENAME to cpp_change_file and finally cpp_push_main_file. - (fe_file_change): Handle NULL new_map, and simplify. - * cpplex.c (_cpp_get_fresh_line): Revert my no-longer-needed - 08-28 change, since we're never called with a NULL buffer. - (_cpp_lex_direct): Likewise. - * cpptrad.c (_cpp_read_logical_line_trad): Likewise. - Return false if buffer is NULL at end. - - * cpplex.c (_cpp_get_fresh_line): Return value now just depends on - whether pfile->buffer is NULL after pop, ignoring return_at_eof. - * cpphash.h (struct cpp_buffer): Remove unused return_at_eof field. - * cpplib.c (cpp_push_buffer): Since we no longer set return_at_eof, - remove the unused return_at_eof parameter. - * cppfiles.c, cpplib.c, cppmacro.c, cpppch.c, fix-header.c: - Update callers of cpp_push_buffer. - -2003-10-01 Zack Weinberg - - * target.h (init_libfuncs): New hook. - * target-def.h: Default TARGET_INIT_BUILTINS and - TARGET_INIT_LIBFUNCS to hook_void_void. Add - TARGET_INIT_LIBFUNCS to TARGET_INITIALIZER. - * builtins.c (default_init_builtins): Delete. - * expr.h (default_init_builtins): Delete prototype. - * doc/tm.texi: Document TARGET_INIT_LIBFUNCS and US_SOFTWARE_GOFAST. - Tweak documentation of TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL. - Remove documentation of INIT_TARGET_OPTABS, MULSI3_LIBCALL, - DIVSI3_LIBCALL, UDIVSI3_LIBCALL, MODSI3_LIBCALL, UMODSI3_LIBCALL, - MULDI3_LIBCALL, DIVDI3_LIBCALL, UDIVDI3_LIBCALL, MODDI3_LIBCALL, - and UMODDI3_LIBCALL, - - * Makefile.in (optabs.o): Depends on target.h. - * defaults.h: Provide default for FLOAT_LIB_COMPARE_RETURNS_BOOL. - * optabs.c: Include target.h. - (prepare_float_lib_cmp): No need for #ifdef around use of - FLOAT_LIB_COMPARE_RETURNS_BOOL. - (set_optab_libfunc): New function. - (init_optabs): Delete use of all *_LIBCALL defines. - Call targetm.init_libfuncs not INIT_TARGET_OPTABS. - * optabs.h: Prototype set_optab_libfunc. - - * config.gcc: Remove all references to pa/long_double.h, - ia64/hpux_longdouble.h, and gofast.h. - (mips-*-*): When --enable-gofast, just add US_SOFTWARE_GOFAST - to tm_defines; don't set INIT_SUBTARGET_OPTABS or change tm_file. - - * config/alpha/alpha.c, config/c4x/c4x.c, config/cris/cris.c - * config/frv/frv.c, config/h8300/h8300.c, config/i860/i860.c - * config/ia64/ia64.c, config/ip2k/ip2k.c, config/m68hc11/m68hc11.c - * config/mips/mips.c, config/pa/pa.c, config/rs6000/rs6000.c - * config/sparc/sparc.c, config/vax/vax.c: - Provide a definition for TARGET_INIT_LIBFUNCS. Where - necessary, include optabs.h, libfuncs.h, and/or config/gofast.h. - - * config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.h - * config/avr/avr.h, config/cris/cris.h, config/frv/frv.h - * config/h8300/h8300.h, config/i860/i860.h, config/ip2k/ip2k.h - * config/iq2000/iq2000.h, config/m68hc11/m68hc11.h, config/mips/mips.h - * config/rs6000/aix.h, config/rs6000/sysv4.h, config/sparc/elf.h - * config/sparc/lite.h, config/sparc/netbsd-elf.h, config/sparc/sol2.h - * config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h - * config/vax/elf.h: Don't define or use INIT_TARGET_OPTABS, - INIT_SUBTARGET_OPTABS, or any *_LIBCALL macros. - - * config/ia64/hpux.h: Redefine INTEL_EXTENDED_IEEE_FORMAT to 0. - Set TARGET_INIT_LIBFUNCS and FLOAT_LIB_COMPARE_RETURNS_BOOL here. - * config/pa/pa-hpux.h: Define LONG_DOUBLE_TYPE_SIZE, - HPUX_LONG_DOUBLE_LIBRARY, and FLOAT_LIB_COMPARE_RETURNS_BOOL here. - * config/ia64/hpux_longdouble.h, config/pa/long_double.h: Delete. - - * config/rs6000/xcoff.h: Don't define RS6000_ITRUNC nor RS6000_UITRUNC. - * config/sparc/sparc.h: Default SUN_CONVERSION_LIBFUNCS and - SUN_INTEGER_MULTIPLY_64 to 0. - * config/sparc/sol2.h: Redefine SUN_CONVERSION_LIBFUNCS and - SUN_INTEGER_MULTIPLY_64 to 1. - * config/sparc/elf.h: Redefine SUN_CONVERSION_LIBFUNCS and - SUN_INTEGER_MULTIPLY_64 to 0. - * config/sparc/lite.h, config/sparc/liteelf.h, config/sparc/sp86x-elf.h: - Define US_SOFTWARE_GOFAST. - * config/vax/vax.h: Default TARGET_ELF to 0. - * config/vax/elf.h: Redefine TARGET_ELF to 1. - - * config/gofast.h: Don't define any macros here. Provide one - static function, gofast_maybe_init_libfuncs, which does what - INIT_GOFAST_LIBFUNCS used to do but only if US_SOFTWARE_GOFAST - is already defined. Do not clear negation libfuncs. Do - not mess with HFmode, XFmode, or TFmode libfuncs. - - * config/avr/avr.c (avr_init_once): #if 0 out; mark FIXME. - -2003-10-01 Kelley Cook - - PR C/12466 - * c-parse.in (parmlist_2): Mark declaration with an ellipsis as ISO C. - -2003-10-01 Rainer Orth - - * config/mips/xm-iris5.h: Remove, unnecessary. - * config.build (mips-sgi-irix5*): Remove. - (mips-sgi-irix6*o32): Likewise. - * config.gcc (mips-sgi-irix6*o32): Remove xm_file. - (mips-sgi-irix5cross64): Likewise. - (mips-sgi-irix5*): Likewise. - * config.host (mips-sgi-irix5*): Remove. - (mips-sgi-irix6*o32): Likewise. - -2003-10-01 Zack Weinberg - - * dbxout.c (dbxout_fptype_value): Delete. - (dbxout_type): Emit R3 for all COMPLEX_TYPEs. - -2003-10-01 Alexandre Oliva - - * output.h (compute_reloc_for_constant): Declare. - * varasm.c (compute_reloc_for_constant): Extract from... - (output_addressed_constants): ... here. Adjust all callers. - -2003-10-01 John David Anglin - - * aclocal.m4: Add hpux10* and hpux11.00 to /dev/zero blacklist. - * configure: Rebuilt. - -2003-10-01 Richard Kenner - - * fold-const.c (make_range): When handling unsigned, don't reverse - range if high bound is zero. - -2003-09-30 Alexandre Oliva - - * config/frv/frv.h (PREDICATE_CODES): Added - condexec_si_media_operator, condexec_sf_add_operator and - condexec_sf_conv_operator. Removed condexec_sf_binary_operator - and condexec_sf_unary_operator. - -2003-10-01 John David Anglin - - * aclocal.m4: Add ultrix* to /dev/zero blacklist. - * configure: Rebuilt. - -2003-10-01 Rainer Orth - - * except.h (MUST_USE_SJLJ_EXCEPTIONS): Revert 2003-09-23 change. - Allow override. - * doc/tm.texi (MUST_USE_SJLJ_EXCEPTIONS): Document. - -2003-09-23 David S. Miller - - * config/sparc/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Undefine - before redefining. - * config/sparc/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise. - -2003-10-01 Steven Bosscher - - * config/cris/cris-protos.h, config/cris/cris.c: Convert to ISO - C90 function declarations and definitions. - -2003-10-01 Nathanael Nerode - - * config.gcc (cris-*-linux*): Revert mistaken commit. - -2003-10-01 Eric Botcazou - - PR optimization/11753 - * config/sparc/sparc.md (length attribute) [fcc branch]: Add 1 to - the length in the non-V9 case. - -2003-09-30 Richard Henderson - - * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Honor - DWARF_ALT_FRAME_RETURN_COLUMN. - * unwind-dw2.c (dwarf_reg_size_table): Expand by one. - (_Unwind_GetGR, _Unwind_SetGR): Validate lookup column. - (uw_frame_state_for): Return end-of-stack for null return address. - * doc/tm.texi (DWARF_ALT_FRAME_RETURN_COLUMN): Add. - - * config/alpha/alpha.c (alpha_sa_mask): Add r31 for eh_return. - (alpha_expand_prologue): Store a zero for it. - (alpha_expand_epilogue): Don't reload it. - * config/alpha/alpha.h (DWARF_ALT_FRAME_RETURN_COLUMN): New. - * config/alpha/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Use column 64 - for the sigframe return address. - -2003-09-30 Kelley Cook - - * sdbout.c: Convert to ISO C90 prototypes. - * objc/objc-act.c: Likewise. - -2003-09-30 Kelley Cook - - * config/i386/cygwin1.c: Convert to ISO C90 prototypes. - * config/i386/winnt.c: Likewise. - * config/i386/cygming.h: Likewise. - -2003-09-30 Kazu Hirata - - * fold-const.c (fold): Fold (A & ~B) - (A & B) into - (A ^ B) - B for any B. - -2003-09-30 Nathanael Nerode - - * config.gcc (arm*-*-kaos*, i[34567]86-*-kaos*, powerpc-*-kaos*, - powerpcle-*-kaos*, strongarm-*-kaos*): Disable fixproto. - -2003-09-30 Richard Earnshaw - - * arm/ieee754-sf.S: Tidy formatting. - -2003-09-30 Nicolas Pitre - - * arm/lib1funcs.asm (ARM_DIV_MOD_BODY): Split into ARM_DIV_BODY - and ARM_MOD_BODY. - (ARM_MOD_BODY): Rewritten. added clz insns for __ARM_ARCH__ >= 5. - (ARM_DIV_BODY): Added clz insns for __ARM_ARCH__ >= 5, - added better divisor alignment in the other case. - (ARM_DIV2_ORDER): Added, finds the order of a single bit divisor. - (__divsi3, __udivsi3, __modsi3, __umodsi3): rewritten using the - macros above, add fast exits for divisor >= dividend, etc. - -2003-09-30 Nicolas Pitre - - * arm/ieee754-df.S: Split compilation of fixunsdfsi from - L_fixdfsi target. - * arm/t-arm-elf (LIB1ASMFUNCS): Add _fixunsdfsi. - -2003-09-30 Nathanael Nerode - - * config.gcc: Default use_fixproto to 'no'. - -2003-09-30 Richard Sandiford - - PR optimization/12345 - * config/mips/mips-protos.h (mips_restore_gp): Remove. - (mips_gp_save_slot): Declare. - * config/mips/mips.c (mips_restore_gp): Remove in favor of... - (mips_gp_save_slot): ...this new function. - * config/mips/mips.md (exception_receiver): Use mips_gp_save_slot - and mips_output_move to generate the output template. - (call_internal): Force splitting if TARGET_SPLIT_CALLS. Don't emit - a gp load after a noreturn call. Load the gp using a move rather - than an exception_receiver pattern. - (call_value_internal, call_value_multiple_internal): Likewise. - (call_split, call_value_split, call_value_multiple_split): Clobber $28. - -2003-09-30 Carlo Wood - - PR debug/12319 - * cfglayout.c (insn_scope): Use prologue_locator and - epilogue_locator; return the outer function scope for - pro- and epilogue insns. - -2003-09-29 Zack Weinberg - - * objc/objc-act.c (encode_type): Encode INTEGER_TYPEs and - REAL_TYPEs based on the bitsize of the type's mode, not the - mode directly. - -2003-09-29 Rainer Orth - - * dwarf2out.c (default_eh_frame_section): Split into ... - (named_section_eh_frame_section, collect2_eh_frame_section): ... new - functions. - * output.h (named_section_eh_frame_section): Declare. - (collect2_eh_frame_section): Likewise. - -2003-09-29 Zack Weinberg - - * real.c (real_sqrt): Use get_canonical_qnan directly. - - * dwarf2out.c (add_const_value_attribute): Use real_to_target. - - * varasm.c (assemble_real): Use real_to_target directly, - calculate the number of significant elements of the result - array and write them out in a loop, instead of using a giant - switch statement to pick the correct REAL_VALUE_TO_TARGET_* - macro. - -2003-09-29 Jan Hubicka - - PR c++/12175 - * varasm.c (notice_global_symbol): Discard external symbols. - - PR optimization/12286 - * gcov-io.c (gcov_read_words): Fix memmove call. - * profile.c (compute_branch_probabilities): Add extra sanity checks. - -2003-09-29 Rainer Orth - - * config.gcc (sparc-*-solaris2*): Handle Solaris 10 and up like - Solaris 7-9. - - * fixinc/inclhack.def (solaris_widec): Replace solaris2.[0-5]* by - wildcards which explicitly match micro versions. - * fixinc/fixincl.x: Regenerate. - -2003-09-29 Kazu Hirata - - * fold-const.c (fold): Fold (A & ~B) - (A & B) into - (A ^ B) - B, where B is any power of 2 minus 1. - -2003-09-29 Jan Hubicka - - * libgcov.c (gcov_exit): Fix two pastos. - -2003-09-29 Kazu Hirata - - * config/h8300/h8300.md (*tst_extzv_1_n): Combine with the - define_split immediately below to form define_insn_and_split. - -2003-09-29 Kazu Hirata - - * config/h8300/h8300.md (*tstsi_variable_bit): New. - (*tstsi_variable_bit_qi): Likewise. - -2003-09-28 Phil Edwards - - * doc/cppopts.texi: Use 'dashMP' instead of '-MP' as a cross- - reference name. - -2003-09-28 Richard Henderson - - * c-decl.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not - file and line separately. - -2003-09-28 Ulrich Weigand - - * config/s390/s390.md ("*adddi3_carry1_cc", "*adddi3_carry1_cconly", - "*adddi3_carry2_cc", "*adddi3_carry2_cconly", "*subdi3_borrow_cc", - "*subdi3_borrow_cconly"): New insns. - ("*addsi3_sub", "*subsi3_sub"): Remove. - ("*subdi3_cc", *subdi3_cconly"): Use only if TARGET_64BIT. - ("*subsi3_cc"): Fix op_type attribute. - -2003-09-28 Richard Henderson - - * stmt.c (expand_asm_operands): Take a location_t, instead of - individual file and line. - * c-typeck.c (c_expand_asm_operands): Likewise. - * tree.h (expand_asm_operands): Update decl. - * c-common.h (c_expand_asm_operands): Likewise. - * c-semantics (genrtl_asm_stmt): Update call. - -2003-09-28 Philip Blundell - - * config/arm/arm.c (legitimize_pic_address): Check - SYMBOL_REF_LOCAL_P, not ENCODED_SHORT_CALL_ATTR_P. - (arm_assemble_integer): Likewise. - -2003-09-28 Steven Bosscher - - * config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, - config/c4x/c4x-c.c, config/c4x/c4x-protos.h, config/c4x/c4x.c, - config/c4x/c4x.h: - Convert to ISO C90 function declarations and definitions. - -2003-09-28 Steven Bosscher - - * config/stormy16/stormy16.c, config/stormy16/stormy16-protos.h: - Convert to ISO C90 function declarations and definitions. - -2003-09-28 Richard Sandiford - - * config/mips/mips.c (mips_constant_info): Add reloc field. - (mips_classify_constant): Initialize it. Always set SYMBOL to the - underlying symbol, not to an unspec. - (mips_delegitimize_address, print_operand): Clean up accordingly. - -2003-09-28 Richard Sandiford - - * config/mips/mips-protos.h (mips16_gp_pseudo_reg): Remove. - * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Remove orphaned comment. - * config/mips/mips.c (mips_reloc_offset_ok_p): New function. - (mips_classify_constant): Use it. - (mips_splittable_symbol_p): Add an offset argument. - (mips_classify_address): Adjust call accordingly. - (mips_legitimize_symbol): Handle sdata references with LO_SUM rather - than a relocation unspec. Update call to mips_splittable_symbol_p. - Generalize the code that copes with symbols + invalid offsets. - (print_operand): Allow '%R' to be applied to small data addresses. - (mips_reloc_string): Remove RELOC_GPREL16. - (mips_sdata_pointer): Renamed from mips16_gp_pseudo_reg. Return $gp - for TARGET_EXPLICIT_RELOCS. Return null if we can't use gp-relative - relocation operators. - * config/mips/mips.md (RELOC_GPREL16): Remove. Shuffle other reloc - constants accordingly. - -2003-09-27 Roger Sayle - - * toplev.c (flag_evaluation_order): New global variable. - * flags.h (flag_evaluation_order): Prototype here. - * expr.c (expand_operands): If we need to preserve observable - evaluation order, protect exp1 from clobbering exp0's result. - -2003-09-28 Andreas Jaeger - - * c-decl.c (finish_function): Convert definition to ISO C90. - * ifcvt.c (mark_loop_exit_edges): Likewise. - * ra-rewrite.c (emit_colors): Likewise. - -2003-09-27 Nathanael Nerode - - * config.gcc (alpha*-dec-osf[45]*): Disable fixproto. - * config.gcc (arm*-*-uclinux*): Disable fixproto. - * config.gcc (powerpc-*-eabispe*, powerpc-*-eabisimaltivec*, - powerpc-*-eabialtivec*): Disable fixproto. - -2003-09-27 Eric Botcazou - - PR optimization/12340 - * loop.h (struct induction): Document the new semantics - of the 'same' field for bivs. - * unroll.c (biv_total_increment): Don't count the same - biv increment several times. - (loop_iterations) [GENERAL_INDUCT]: Likewise. - -2003-09-27 Graham Stott - - * unroll.c (loop_interations)[GT]: Add missing break. - -2003-09-27 Kelley Cook - - * config/chorus.h, config/darwin-c.c, config/darwin-protos.h, - config/darwin.c, config/darwin.h, config/dbx.h, config/dbxcoff.h, - config/dbxelf.h, config/elfos.h, config/fp-bit.h, - config/freebsd-nthr.h, config/freebsd-spec.h, config/freebsd.h, - config/freebsd3.h, config/freebsd4.h, config/freebsd5.h, - config/freebsd6.h, config/netbsd-aout.h, config/netbsd-elf.h, - config/netbsd.h, config/netware.h, config/openbsd-oldgas.h, - config/openbsd.h, config/ptx4.h, config/alpha/alpha-protos.h, - config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/alpha.md, - config/alpha/elf.h, config/alpha/ev4.md, config/alpha/ev5.md, - config/alpha/ev6.md, config/alpha/freebsd.h, config/alpha/linux-elf.h, - config/alpha/linux.h, config/alpha/netbsd.h, config/alpha/openbsd.h, - config/alpha/osf.h, config/alpha/osf5.h, config/alpha/unicosmk.h, - config/alpha/vms-cc.c, config/alpha/vms-crt0-64.c, - config/alpha/vms-crt0.c, config/alpha/vms-dwarf2.asm, - config/alpha/vms-dwarf2eh.asm, config/alpha/vms-ld.c, - config/alpha/vms-psxcrt0-64.c, config/alpha/vms-psxcrt0.c, - config/alpha/vms.h, config/alpha/vms64.h, config/alpha/vms_tramp.asm, - config/alpha/xm-vms.h, config/arc/arc-modes.def, - config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, - config/arc/arc.md, config/arc/initfini.c, config/arc/lib1funcs.asm, - config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, - config/avr/avr.md, config/d30v/d30v-protos.h, config/d30v/d30v.h, - config/d30v/d30v.md, config/fr30/fr30-protos.h, config/fr30/fr30.c, - config/fr30/fr30.h, config/fr30/fr30.md, config/fr30/lib1funcs.asm, - config/frv/cmovd.c, config/frv/cmovh.c, config/frv/cmovw.c, - config/frv/frv-abi.h, config/frv/frv-asm.h, config/frv/frv-modes.def, - config/frv/frv-protos.h, config/frv/frv.c, config/frv/frv.h, - config/frv/frv.md, config/frv/frvbegin.c, config/frv/frvend.c, - config/frv/lib1funcs.asm, config/h8300/clzhi2.c, config/h8300/ctzhi2.c, - config/h8300/parityhi2.c, config/h8300/popcounthi2.c, - config/i370/i370-c.c, config/i370/i370-protos.h, config/i370/i370.c, - config/i370/i370.h, config/i370/i370.md, config/i370/linux.h, - config/i370/mvs.h, config/i370/oe.h, config/i386/darwin.h, - config/i960/i960-c.c, config/i960/i960-coff.h, - config/i960/i960-modes.def, config/i960/i960-protos.h, - config/i960/i960.c, config/i960/i960.h, config/i960/i960.md, - config/i960/rtems.h, config/ia64/elf.h, config/ia64/ia64.h, - config/m32r/initfini.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, - config/m32r/m32r.h, config/m32r/m32r.md, config/m68hc11/larith.asm, - config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, - config/m68hc11/m68hc11.h, config/m68hc11/m68hc11.md, - config/m68hc11/m68hc12.h, config/m68k/coff.h, config/m68k/crti.s, - config/m68k/crtn.s, config/m68k/hp320.h, config/m68k/hp320base.h, - config/m68k/lb1sf68.asm, config/m68k/linux.h, config/m68k/m68020-elf.h, - config/m68k/m68k-aout.h, config/m68k/m68k-none.h, - config/m68k/m68k-protos.h, config/m68k/m68k.c, config/m68k/m68k.h, - config/m68k/m68k.md, config/m68k/m68kelf.h, config/m68k/m68kv4.h, - config/m68k/netbsd-elf.h, config/m68k/openbsd.h, - config/m68k/rtemself.h, config/m68k/sgs.h, config/mcore/lib1.asm, - config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, - config/mcore/mcore-protos.h, config/mcore/mcore.c, - config/mcore/mcore.md, config/mips/elf.h, config/mips/elf64.h, - config/mips/elforion.h, config/mips/iris5.h, config/mips/iris6.h, - config/mips/iris6gld.h, config/mips/irix6-libc-compat.c, - config/mips/linux.h, config/mips/mips-protos.h, config/mips/mips.c, - config/mips/mips.h, config/mips/mips.md, config/mips/netbsd.h, - config/mips/openbsd.h, config/mips/r3900.h, config/mips/rtems.h, - config/mips/vr.h, config/mn10300/linux.h, - config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, - config/mn10300/mn10300.h, config/mn10300/mn10300.md, - config/ns32k/__unorddf2.c, config/ns32k/__unordsf2.c, - config/ns32k/netbsd.h, config/ns32k/ns32k-protos.h, - config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/ns32k/ns32k.md, - config/pdp11/2bsd.h, config/pdp11/pdp11-modes.def, - config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, - config/pdp11/pdp11.h, config/pdp11/pdp11.md, config/rs6000/biarch64.h, - config/rs6000/default64.h, config/sh/coff.h, config/sh/crt1.asm, - config/sh/crti.asm, config/sh/crtn.asm, config/sh/elf.h, - config/sh/embed-elf.h, config/sh/linux.h, config/sh/little.h, - config/sh/netbsd-elf.h, config/sh/rtems.h, config/sh/rtemself.h, - config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.h, - config/sh/sh.md, config/sh/sh64.h, config/sh/shmedia.h, - config/sh/sshmedia.h, config/sh/ushmedia.h, config/sparc/pbd.h, - config/sparc/sparc.h, doc/install-old.texi, fixinc/fixinc.ptx, - fixinc/fixinc.svr4: GNU CC -> GCC. - -2003-09-26 Loren James Rittle - - * objc/objc-act.c (tm_p.h): Tweak order. - * objc/Make-lang.in (objc/objc-act.o): Add $(TM_P_H). - -2003-09-26 Nathanael Nerode - - * config.gcc (hppa*64*-*-linux* | parisc*64*-*-linux*): - Include t-slibgcc-elf-ver and t-linux in tmake_file. - * config.gcc (hppa*64*-*-linux* | parisc*64-*-linux*): - Disable fixproto. - * config.gcc (i960-*-coff*, m68k-*-aout*, sparclite-*-coff*): - Disable fixproto. - * config.gcc (i[34567]86-*-solaris2*, sparc64-*-solaris2*, - sparcv9-*-solaris2*, sparc-*-solaris2*): Disable fixproto. - - * config/i386/unix.h: Remove (unused) DEFAULT_ASSEMBLER_DIALECT. - -2003-09-26 Loren James Rittle - - * config/i386/i386.h (ix86_return_in_memory): Revert my last patch. - * objc/objc-act.c (tm_p.h): Include. - -2003-09-26 Per Bothner - - * dbxout.c (dbxout_typedefs): Output typedefs in forward order. - No longer any need to reverse by recursion. - -2003-09-26 Roger Sayle - Richard Henderson - - PR optimization/11741 - * gcse.c (pre_insert_copy_insn): Tweak the logic for finding the - appropriate set to match that in hash_scan_insn. Fall back to - the original copy method, if we can't validate changing insn. - (pre_delete): Only delete instructions that have a single_set, - instead of aborting when we encounter an PARALLEL insn with more - then one SET. - -2003-09-26 Andreas Krebbel - - * config/s390/s390.md ("builtin_setjmp_setup"): Insn deleted. - ("builtin_longjmp"): Insn deleted. - ("save_stack_nonlocal"): Save literal pool base pointer behind - backchain and stack pointer. - ("restore_stack_nonlocal"): Restore literal pool base pointer. - * config/s390/s390.h (STACK_SAVEAREA_MODE): Double size of - the stack save area for the nonlocal goto case. - -2003-09-26 John David Anglin - - PR bootstrap/12358 - * pa.c (output_bvb): Fix typo. - -2003-09-26 Richard Sandiford - - * expmed.c (store_bit_field): Don't search for an integer mode - unless we need the result. - -2003-09-26 Richard Sandiford - - * expr.c (emit_move_insn_1): If there is no move pattern for the - original mode, try using a pattern for the corresponding integer mode. - -2003-09-26 Richard Sandiford - - PR middle-end/9200 - * combine.c (if_then_else_cond): Tighten mode check. - -2003-09-25 Nathanael Nerode - - * cppcharset.c, cpphash.h: Rename 'struct strbuf' to - 'struct _cpp_strbuf'. - - * config/i386/netbsd-elf.h, config/i386/netbsd64.h, - config/i386/netware.h, config/i386/nto.h, config/i386/openbsd.h, - config/i386/pentium.md, config/i386/pmmintrin.h, config/i386/ppro.md, - config/i386/ptx4-i.h, config/i386/rtemself.h, config/i386/sco5.h, - config/i386/sol2.h, config/i386/svr3gas.h, config/i386/sysv3.h, - config/i386/sysv4-cpp.h, config/i386/sysv4.h, config/i386/sysv5.h, - config/i386/unix.h, config/i386/uwin.h, config/i386/vsta.h, - config/i386/xm-cygwin.h, config/i386/xm-djgpp.h, - config/i386/xm-mingw32.h, config/i386/xmmintrin.h: Replace - "GNU CC", "GNU compiler", and "GNU C-compiler" with "GCC". - * config/i386/i386-aout.h, config/i386/i386-coff.h, - config/i386/i386-interix.h, config/i386/i386-interix3.h, - config/i386/i386-modes.def, config/i386/i386-protos.h, - config/i386/i386.c, config/i386/i386.h, config/i386/i386.md, - config/i386/i386elf.h, config/i386/k6.md, config/i386/kaos-i386.h, - config/i386/linux-aout.h, config/i386/linux.h, config/i386/linux64.h, - config/i386/lynx-ng.h, config/i386/lynx.h, config/i386/mingw32.h, - config/i386/mmintrin.h, config/i386/moss.h: GNU CC -> GCC. - "GNU compiler" -> GCC. - * config/i386/att.h, config/i386/beos-elf.h, config/i386/biarch64.h, - config/i386/bsd.h, config/i386/crtdll.h, config/i386/cygming.h, - config/i386/cygwin.h, config/i386/cygwin1.c, config/i386/cygwin2.c, - config/i386/darwin.h, config/i386/djgpp.h, config/i386/emmintrin.h, - config/i386/freebsd-aout.h, config/i386/freebsd.h, - config/i386/freebsd64.h, config/i386/gas.h: GNU CC -> GCC. - -2003-09-25 Kelley Cook - - * cgraph.c (dump_cgraph): Don't output newline before dump. Add in - "local" to the callgraph dump. Output "after inlining" earlier. - * cgraphunit.c: Fix dumpfile whitespace and commonize headers of the - callgraph dumps. Correct misspellings. - (cgraph_decide_inlining): Output number of insns before inlining. - Output the calling function into which a function is inlined. - (cgraph_decide_small_functions): Format dump file like always_inline. - -2003-09-25 Loren James Rittle - - * config/i386/i386.h (ix86_return_in_memory): Add prototype. - -2003-09-25 Ulrich Weigand - - * config/s390/s390.c (s390_emit_prologue): Simplify accesses to - FPR slots in the save area. - (s390_emit_epilogue): Likewise. - -2003-09-25 Richard Sandiford - - * cgraph.h (cgraph_remove_edge): Declare. - * cgraph.c (cgraph_remove_edge): Make extern. - * cgraphunit.c (cgraph_finalize_function): Call cgraph_remove_edge - instead of cgraph_remove_call. - -2003-09-25 Ulrich Weigand - - * objc/objc-act.c (gen_declaration_1): Fix printf format. - -2003-09-25 Richard Earnshaw - - * arm.c (all_cores): arm710t, arm720t and arm740t are all based on the - arm7tdmi core. - -2003-09-25 Ziemowit Laski - - * config/darwin-protos.h (objc_image_info_section): - New prototype. - -2003-09-25 Ziemowit Laski - - * Makefile.in (stub-objc.o): Depend on $(GGC_H). - -2003-09-25 Nathanael Nerode - - * config.gcc: Get rid of more gratuitious 'x'es. Actually allow - tsc701 as a --with-cpu, --with-tune setting for sparc. - -2003-09-25 Ziemowit Laski - - * c-parse.in (objc_try_stmt): Do not specify a %type. - -2003-09-25 Nathanael Nerode - - * config.gcc: New 'widely ported system' clause for rtems. - Set thread file there, not in individual clauses. - -2003-09-25 Richard Sandiford - - PR target/6222 - * config/mips/mips.c (mips_va_arg): Handle arguments that must be - passed on the stack. - -2003-09-25 Nathanael Nerode - - * config.gcc (widely ported systems section): Mostly alphabetize - by system. Comment the case where we can't. - * config.gcc (widely ported systems section): Reindent and clean up. - - * config.gcc: Remove some unnecessary uses of 'x' in case statements. - Actually allow ep9312 as an arm --with-arch setting. - - * config.gcc (*-hpux11): Disable fixproto. - -2003-09-24 Phil Edwards - - PR pch/12112 - * gcc/cppfiles.c (pch_open_file): Return based on combined - result of all files. - (validate_pch): Return validate flag for current file. - -2003-09-24 Roger Sayle - - PR bootstrap/12358 - * fold-const.c (tree_swap_operands_p): Only reorder operands when - one of the operands is constant. - -2003-09-24 Ziemowit Laski - - MERGE OF objc-improvements-branch into MAINLINE: - * Makefile.in (C_OBJS): Add in stub-objc.o. - (c-parse.y): Change sed demarcations to begin with '@@'. - (stub-objc.o): New rule. - * c-common.c (flag_nil_receivers, flag_objc_exceptions, flag_zero_link, - flag_replace_objc_classes): New flags. - * c-common.h (RID_AT_THROW, RID_AT_TRY, RID_AT_CATCH, RID_AT_FINALLY, - RID_AT_SYNCHRONIZED): New keywords. - (flag_nil_receivers, flag_objc_exceptions, flag_zero_link, - flag_replace_objc_classes): New flags. - (lookup_interface, is_class_name, objc_is_object_ptr, objc_check_decl, - objc_comptypes, objc_message_selector, lookup_objc_ivar, - get_current_scope, objc_mark_locals_volatile): New prototypes, - some moved from c-tree.h. - * c-decl.c (get_current_scope, objc_mark_locals_volatile): New functions. - (finish_decl): Adjust where objc_check_decl() gets called. - * c-lang.c (lookup_interface, is_class_name, objc_is_id, objc_check_decl, - objc_comptypes, objc_message_selector, lookup_objc_ivar): Remove stubs. - * c-opts.c (c_common_handle_option): Add handling for flag_nil_receivers, - flag_objc_exceptions, flag_replace_objc_classes and flag_zero_link. - * c-parse.in: Replace 'ifc' and 'end ifc' sed markers with '@@ifc' and - '@@end_ifc', respectively. - (AT_THROW, AT_TRY, AT_CATCH, AT_FINALLY, AT_SYNCHRONIZED): New %tokens. - (objc_try_stmt, superclass, class_ivars, objc_try_catch-stmt, - objc_finally_block): New rules. - (component_decl_list2): Clean up semantic action for @defs construct. - (component_decl, c99_block_start): Remove call to add_objc_decls(). - (poplevel): Add call to objc_clear_super_receiver(). - (stmt): Add rules for @throw, @try..@catch..@finally and @synchronized - constructs. - (classdef, methodprotolist): Clean up/simplify. - (methodprotolist2): Eliminate. - (methodproto): Call add_method() instead of add_class_method() and - add_instance_method(). - (receiver): Add TYPENAME production. - (reswords): Add "throw", "try", "catch", "finally" and "synchronized". - (rid_to_yy): Add AT_THROW, AT_TRY, AT_CATCH, AT_FINALLY and - AT_SYNCHRONIZED. - * c-tree.h (lookup_interface, is_class_name, objc_is_id, objc_check_decl, - objc_comptypes, objc_message_selector) - * c-typeck.c (comptypes): In ObjC mode, call objc_comptypes() for - struct and pointer types. - (build_c_cast): Do not discard ObjC protocol qualifiers. - (convert_for_assignment): Cache result of comp_target_types() instead - of calling it more than once. - * c.opt (fnext-runtime): Update description string. - (fnil-receivers, fobjc-exceptions, freplace-objc-classes, fzero-link): - New ObjC/ObjC++-specific flags. - * function.h (GCC_FUNCTION_H): Header guard. - * gengtype-lex.l: Teach lexer about new @@... sed demarcations. - * stub-objc.c: New file, to be used to satisfy references to ObjC - functions by the C and C++ front-ends. - * config/darwin.c (_OBJC_IMAGE_INFO): New global metadata. - * config/darwin.h (FUNCTION): Add in_objc_image_info. - (SECTION_FUNCTION): Add objc_image_info_section. - * doc/invoke.texi: Link to GCC web site for Objective-C information. - (-fconstant-string-class): Update documentation. - (-fno-nil-receivers, -fobjc-exceptions, -freplace-objc-classes, - -fzero-link): New documentation. - * objc/Make-lang.in (objc-parse.y): Change sed demarcations to begin - with '@@'. - * objc/lang-specs.h (@objective-c-header): Fix -E spec. - * objc/objc/objc-act.c: Replace TYPE_NAME with OBJC_TYPE_NAME - throughout; provide casts for return values from memory allocation - functions (xmalloc, alloca, ggc_alloc, etc.). - (OBJC_VOID_AT_END): New macro. - (rtl.h): Do not #include any more. - (STRING_OBJECT_GLOBAL_NAME): Replaced with STRING_OBJECT_GLOBAL_FORMAT. - (TAG_MSGSEND_STRET, TAG_MSGSENDSUPER_STRET, TAG_MSGSEND_NONNIL, - TAG_MSGSEND_NONNIL_STRET, TAG_EXCEPTIONEXTRACT, TAG_EXCEPTIONTRYENTER, - TAG_EXCEPTIONTRYEXIT, TAG_EXCEPTIONMATCH, TAG_EXCEPTIONTHROW, - TAG_SYNCENTER, TAG_SYNCEXIT): New NeXT runtime entry points. - (struct val_stack, catch_count_stack, exc_binding_stack, val_stack_push, - val_stack_pop): New. - (objc_check_decl): Fix precondition for error message, along with - the message itself. - (lookup_and_install_protocols): Remove nonexistent protocols from - protocol list instead of returning error_mark_node. - (create_builtin_decl): Use DECL_ARTIFICIAL only for VAR_DECLs. - (setup_string_decl): Generalize to use STRING_OBJECT_GLOBAL_FORMAT. - (synth_module_prologue): General clean-up; construct NeXT-specific - runtime API prototypes if needed. - (build_string_class_template): Remove. - (check_string_class_template, string_layout_checked): New. - (build_objc_string_object): Generalize to work with - -fconstant-string-class. - (build_objc_symtab_template): Fix layout for the NeXT runtime. - (build_metadata_decl): New. - (forward_declare_categories): Call build_metadata_decl() instead of - create_builtin_decl() et al. - (build_module_descriptor): Use OBJC_VOID_AT_END instead of - void_list_node_1. - (build_selector_reference_decl, build_class_reference_decl, - build_objc_string_decl): Do not set TREE_READONLY. - (get_proto_encoding): Do not call hack_method_prototype(). - (get_class_reference): Add failure mode for invalid class names; - support -fzero-link; defer if in an ObjC++ template declaration. - (objc_declare_alias, objc_declare_class): Fix up duplicate name - lookup; check for global scope if in ObjC++. - (is_class_name): Generalize to work with various tree nodes (TYPE_DECL, - RECORD_TYPE, IDENTIFIER_NODE, etc.) - (objc_is_id): Removed. - (objc_is_object_ptr): New function. - (get_class_ivars_from_name): New function, used for @defs construct. - (get_class_ivars): Add option to return raw ivars; create a - ClASS_OWN_IVARS list for each class as needed. - (objc_enter_block, objc_exit_block, objc_declare_variable, - objc_build_throw_stmt, val_stack_push, val_stack_pop, - objc_build_try_enter_fragment, objc_build_extract_expr, - objc_build_try_exit_fragment, objc_build_extract_fragment, - objc_build_try_prologue, objc_build_try_epilogue, - objc_build_catch_stmt, objc_build_catch_epilogue, - objc_build_finally_prologue, objc_build_finally_epilogue, - objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue, - objc_build_synchronized_epilogue, build_objc_exception_stuff): - New functions. - (_JBLEN): _setjmp jmpbuf size (needs to be made a target hook in - the future). - (build_private_template): Fix up calls to get_class_ivars(). - (offset_is_register, forwarding_offset): Remove. - (objc_method_parm_type, objc_encoded_type_size): New functions. - (encode_method_prototype): Simplify to no longer depend on - back-end information. - (build_tmp_function_decl_xxx, build_tmp_function_decl, - hack_method_prototype): Removed. - (generate_protocol_references): Remove calls to - build_tmp_function_decl(). - (generate_protocols): Adjust calls to encode_method_prototype(). - (build_class_template): Generate sel_id' and 'gc_object_type' fields - for the NeXT runtime. - (synth_forward_declarations): Call build_metadata_decl(). - (check_ivars): Check that the number of ivars matches also. - (build_super_template): Modify super_type directly; disable debugging - output while generating decl. - (build_ivar_list_initializer): Skip list elements that are not - FIELD_DECLs. - (ivar_list_length): New function. - (generate_ivar_lists): Call ivar_list_length() instead of list_length() - and encode_method_prototype() instead of encode_method_def(). - (build_shared_structure_initializer): Generate 'sel_id' field for - the NeXT runtime. - (generate_category): Do not set TREE_USED. - (build_keyword_selector): Ditto; transform into a function argument - chain. - (get_arg_type_list): If there are no user-specified arguments, use - '...'; use OBJC_VOID_AT_END. - (check_duplicates): Add a parameter indicating whether methods or - selectors are being checked. - (receiver_is_class_object): Add parameters indicating whether - receiver is 'self' or 'super'; robustify. - (build_message_expr): Defer call to finish_message_expr() if - inside an ObjC++ template. - (lookup_method_in_hash_lists): New function. - (finish_message_expr): Complete rewrite/fix. - (build_objc_method_call): Ditto; factor out commonalities between - the GNU and NeXT runtimes; acccommodate ..._stret and ...NonNil - messenger variants on the NeXT. - (lookup_instance_method_static, lookup_class_method_static): - Fold into a single lookup_method_static() function with an - additional parameter. - (add_class_method, add_instance_method): Fold into a single - add_method() function with an additional parameter. - (add_category): Make duplicate categories a hard error in ObjC++. - (add_instance_variable): Properly handle unnamed ivars, arrays of - zero or no size and bitfields. In ObjC++, check for nontrivial - C++ class instances. - (is_public): Allow C functions to access non-@public ivars, with - a warning. - (start_class): Move common initializations to - synth_module_prologue(); check for global scope if in ObjC++. - (continue_class): Fix calls to finish_struct(). - (objc_declare_protocols, start_protocol): Check for global scope - if in ObjC++. - (encode_pointer): Encode 'BOOL *' specially on the NeXT. - (encode_aggregate_within): Rewrite to properly distinguish - struct tags from typedefs in both ObjC and ObjC++. - (encode_bitfield, encode_complete_bitfield): Remove. - (encode_next_bitfield, encode_gnu_bitfield): New functions. - (encode_field_decl): Call encode_next_bitfield() or - encode_gnu_bitfield() as needed. - (synth_self_and_ucmd_args): New function. - (start_method_def): Use it. - (objc_types_are_equivalent): New function. - (comp_proto_with_proto): Use it instead of comptypes(), since - we need symmetry. - (really_start_method): Use lookup_method_static() instead of - lookup_class_method_static() and lookup_instance_method_static(); - Emit 'extern "C"' if in ObjC++ mode. - (add_objc_decls): Removed. - (UOBJC_SUPER_scope): New variable. - (get_super_receiver): Move construction of 'super' from - add_objc_decls(); remove dependency on struct objc_class. - (encode_method_def): Removed; encode_method_prototype() is - used instead. - (objc_clear_super_receiver): New function. - (objc_expand_function_end): Do not do anything for ordinary - C functions. - (finish_method_def): Mark ObjC methods as un-inlinable. - (gen_declaration_1): Emit widths of bitfields. - (finish_objc): Call generate_objc_image_info() if needed; - use check_duplicates() when checking for selector duplicates. - (generate_objc_image_info): New function. - * objc/objc-act.h (add_instance_method, add_class_method, - get_class_ivars): Remove prototypes. - (objc_build_throw_stmt, objc_build_try_catch_finally_stmt, - objc_build_synchronized_prologue, objc_build_synchronized_epilogue, - objc_build_catch_stmt, objc_build_catch_epilogue, - objc_build_finally_prologue, objc_build_finally_epilogue, - add_method, get_class_ivars_from_name): New prototypes. - (CLASS_BINFO_ELTS, PROTOCOL_BINFO_ELTS): New. - (TYPE_PROTOCOL_LIST): Robustify to distinguish from - TRANSLATION_UNIT_DECLs. - (OBJC_TYPE_NAME): New. - (objc_tree_code): Ensure that either or - got included. - (IS_SUPER): Robustify. - (umsg_stret_decl, umsg_super_stret_decl, umsg_nonnil_decl, - umsg_nonnil_stret_decl, objc_storage_class, objc_exception_extract_decl, - objc_exception_try_enter_decl, objc_exception_try_exit_decl, - objc_exception_match_decl, objc_exception_throw_decl, - objc_sync_enter_decl, objc_sync_exit_decl, objc_exception_data_template, - objc_setjmp_decl, objc_stack_exception_data, objc_caught_exception, - objc_rethrow_exception, objc_eval_once, objc_exception_block_stack, - objc_catch_type): New ObjC/ObjC++ roots. - * objc/objc-tree.def (MESSAGE_SEND_EXPR, CLASS_REFERENCE_EXPR): New - ObjC/ObjC++ tree node codes. - -2003-09-24 Alexandre Oliva - - * cpplib.c (do_pragma): Reintroduce cb_line_change call in the - code path that calls a handler. - -2003-09-24 Nathanael Nerode - - * config.gcc (c4x-*, tic4x-*, d30v-*, mmix-knuth-mmixware): - Disable fixproto. - - * config.gcc: Clean up and reindent $with_cpu=yes|no clause and - the section giving $with_cpu defaults by target. - - * config.gcc (arm-*-coff*, armel-*-coff*, arm*-*-ecos-elf, - arm*-*-elf, ep9312-*-elf, arm*-wince-pe*, arm*-*-pe*, arm*-*-pe*, - rs6000-ibm-aix4.[3456789]*, powerpc-ibm-aix4.[3456789]*, - rs6000-ibm-aix5.1.*, powerpc-ibm-aix5.1.*, - rs6000-ibm-aix[56789].*, powerpc-ibm-aix[56789].*, - i[34567]86-pc-msdosdjgpp*): Disable fixproto. - -2003-09-24 David Edelsohn - - * config/rs6000/rs6000.md (movti_power): Collapse case 1 and 2 - together. Protect load string instruction with TARGET_STRING. - (movti_string): Collapse case 1 and 2 together. - -2003-09-24 Nathan Sidwell - - * c-common.c (c_common_type_for_mode): Check for VOIDmode. - -2003-09-24 Richard Earnshaw - - * arm.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Wrap in - do...while(0) - -2003-09-23 Nathanael Nerode - - * config.gcc: Move use_fixproto=no from generic vxworks clause to - specific one. - - * config.gcc (powerpc-*-gnu-gnualtivec*): Disable fixproto - (accidentally missed in last pass). - -2003-09-23 Andrew Pinski - - PR bootstrap/12383 - * configure: Regenerate. - -2003-09-23 Nathanael Nerode - - * config.gcc (x86_64-*-freebsd*): Disable fixproto (accidentally - missed in last pass). - -2003-09-23 Alexandre Oliva - - * config/mn10300/mn10300.md (andsi3): Fix cut&pasto in 0xfffffffe - constant. - -2003-09-23 Nathanael Nerode - - * config.gcc: Move vax-*-vms* unsupported notice up with the rest. - - * config.gcc (alpha64*-dec-*vms*, alpha*-dec-*vms*, - powerpc-*-eabisim*, powerpc-*-eabi*, powerpcle-*-eabisim*, - powerpcle-*-eabi*): Disable fixproto. - - * config.gcc: Move use_fixproto=no from generic FreeBSD clause to - specific FreeBSD clauses. - * config.gcc: Move use_fixproto=no from generic NetBSD clause to - specific NetBSD clauses. - * config.gcc: Move use_fixproto=no from generic OpenBSD clause - to specific OpenBSD clauses. - -2003-09-23 John David Anglin - - * pa.c (hppa_expand_prologue): Do pic register save in frame marker - without adding a frame note. - * pa.md (allocate_stack): Save pic register in new frame marker when - generating pic code. - -2003-09-23 Kelley Cook - - * cgraphunit.c (cgraph_expand_all_functions): Renamed from - cgraph_expand_functions. - -2003-09-23 Kaveh R. Ghazi - - * Makefile.in (gnucompare*): Merge into ... - (slowcompare*): ... here. - (fastcompare*): New targets. - * aclocal.m4 (gcc_AC_PROG_CMP_IGNORE_INITIAL): Add checks for - other "fast" cmp programs. - * configure: Regenerate. - -2003-09-23 Rainer Orth - - * targhooks.c: Include output.h. - * Makefile.in (targhooks.o): Add output.h to dependency list. - -2003-09-23 Rainer Orth - - * config.host: Removed superfluous newline. - -2003-09-23 Nathanael Nerode - - * config.gcc: Use ${target}, not $machine. - * configure.in: Don't set $machine. - * configure: Regenerate. - -2003-09-23 Geoffrey Keating - - * config/t-darwin (crt2.o): Add stmp-int-hdrs to dependencies. - - * config/rs6000/rs6000.c (function_arg_pass_by_reference): Don't - pass zero-size arrays by reference. - (rs6000_va_arg): Likewise. - -2003-09-23 Nathanael Nerode - - * config.gcc: Set use_fixproto=no in each specific *-gnu* - configuration, rather than the generic one. - -2003-09-23 Richard Henderson - - * tree-inline.c (remap_save_expr): Map new save_expr to identity - rather than to error_mark_node. - -2003-09-23 Rainer Orth - - * configure.in (HAVE_GAS_SHF_MERGE): Always define to test result. - Update description. - * configure: Regenerate. - * config.in: Likewise. - * dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Test for - HAVE_GAS_SHF_MERGE value. - * varasm.c (mergeable_string_section): Likewise. - (mergeable_constant_section): Likewise. - -2003-09-23 Rainer Orth - - * except.h (MUST_USE_SJLJ_EXCEPTIONS): Test for DWARF2_UNWIND_INFO - value. - -2003-09-23 Rainer Orth - - * target.h (struct gcc_target): New member external_libcall. - * target-def.h (TARGET_ASM_EXTERNAL_LIBCALL): Provide default. - (TARGET_ASM_OUT): Use it. - * doc/tm.texi (TARGET_ASM_EXTERNAL_LIBCALL): Document. - * targhooks.c: Convert to ISO C 90. - (default_external_libcall): New function. - * targhooks.h (default_external_libcall): Declare. - * varasm.c (assemble_external_libcall): Use - targetm.asm_out.external_libcall instead of - ASM_OUTPUT_EXTERNAL_LIBCALL. - * config/mips/mips-protos.h [TARGET_IRIX5 || TARGET_IRIX 6] - (mips_output_external_libcall): Declare. - * config/mips/mips.c (mips_output_external_libcall): Change - definition guard. - Change to match TARGET_ASM_EXTERNAL_LIBCALL. - Only operate for O32 ABI. - * config/mips/iris5.h (TARGET_ASM_EXTERNAL_LIBCALL): Define - instead of ASM_OUTPUT_EXTERNAL_LIBCALL. - * config/mips/iris6.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Don't undef, - superceded by TARGET_ASM_EXTERNAL_LIBCALL. - -2003-09-22 Nathnael Nerode - - * config.gcc: Do per-target disabling of fixproto here in clauses, - not in t- fragments. - * configure.in: Adjust to set STMP_FIXPROTO correctly. - * configure: Regenerate. - * config/arm/t-semi, config/cris/t-cris, config/i386/t-beos, - config/i386/t-cygming, config/i386/t-nto, config/ia64/t-hpux, - t-freebsd, t-linux, t-netbsd, t-openbsd, t-rtems, t-vxworks, - xtensa/t-xtensa: Remove setting of STMP_FIXPROTO. - * config/i370/t-oe, config/i386/t-netware, config/pa/t-bsd, - t-interix, t-linux-aout: Delete files consisting only of - setting of STMP_FIXPROTO. - - * config.host: Allow unknown hosts (not targets). Allow - ns32k-*-netbsdelf* as a host (not a target). Remove redundant - empty clauses. Remove useless obsolete-configuration clause. - Prune unsupported configuration list. Collapse identical - clauses for closely related systems. Rewrite comment for - unsupported hosts list. Reorganize a little. - -2003-09-22 Richard Henderson - - * c-common.c (c_common_signed_or_unsigned_type): Examine mode, - not precision. - -2003-09-22 David Edelsohn - Hartmut Penner - Segher Boessenkool - - * config/rs6000/rs6000.c (altivec_in_gprs_p): Rename to ... - (gpr_or_gpr_p): Test INT_REGNO_P and convert to boolean. - (rs6000_split_altivec_in_gprs): Rename to ... - (rs6000_split_multireg_move): Add support for update addressing. - * config/rs6000/rs6000-protos.h: Same. - * config/rs6000/altivec.md: Same. - * config/rs6000/rs6000.md (movdi_internal32): Use new splitter for - multiple GPRs. - (movti): Remove TARGET_STRING || TARGET_POWERPC64 final condition. - (movti_power): Use new splitter for multiple GPRs. - (movti_string): Same. - (movti_ppc64): Same. - -2003-09-22 Bob Wilson - - * config/xtensa/xtensa-protos.h: Convert to ISO C90. - * config/xtensa/xtensa.c: Convert to ISO C90. Minor formatting fixes. - -2003-09-22 Alexandre Oliva - - * config/mn10300/mn10300.md: Revert 2003-09-17's patch. - (andsi3): Set attr cc to set_zn when using shifts or adds. - -2003-09-22 Bernardo Innocenti - - * doc/contrib.texi: Add Peter Barada, Paul Dale and myself. - -2003-09-22 Bernardo Innocenti - - * config/m68k/m68k.h (MASK_RTD, TARGET_RTD, RETURN_POPS_ARGS): - Resurrect -mrtd option. - -2003-09-21 Andrew Pinski - - PR target/12281 - * config/darwin.c (machopic_validate_stub_or_non_lazy_ptr): Call - mark_referenced instead of setting TREE_SYMBOL_REFERENCED. - -2003-09-22 Olivier Hainque - - PR target/9786 - * reg-stack.c (convert_regs_1): Purge possible dead eh edges - after potential deletion of trapping insn. Avoids later ICE - from call to fixup_abnormal_edges. - (convert_regs_2): Stack the current block successors before - processing this block, that is, before the potential deletion of - dead edges by convert_regs_1, because these edges have been used - to initialize the predecessors count. - -2003-09-22 Eric Botcazou - - * real.c: Fix several nits in the head comment. - -2003-09-21 Richard Henderson - - * tree.h c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c, - diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c, - print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c, - tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c, - config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Revert. - -2003-09-21 Richard Henderson - - * tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const. - (TREE_FILENAME, TREE_LINENO): Likewise. - (set_tree_locus, copy_tree_locus, set_tree_file_line): New. - (TREE_LOCUS_SET_P): New. - * c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c, - diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c, - print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c, - tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c, - config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match. - -2003-09-21 Nathanael Nerode - - * config/vax/vax-protos.h: Convert to ISO C90. - * config/vax/vax.c: Convert to ISO C90. - -2003-09-21 Graham Stott - - PR target/12353 - * config/i386/i386.md(ffs_no_cmove): Fix operand 2 constraint. - -2003-09-21 Eric Botcazou - - PR target/12301 - * reorg.c (stop_search_p): Return 1 for insns that can - throw internally. - -2003-09-20 Richard Henderson - - * c-format.c (gcc_diag_char_table): Add %J. - (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise. - (check_format_types): Fix wanted_type name lookup. - (init_dynamic_diag_info): Setup %J. - * diagnostic.c (text_specifies_location): Implement %J. - * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c, - dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c, - tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c, - config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c, - config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics. - - * tree-inline.c: Include intl.h - (inline_forbidden_p_1): Fix i18n of inline_forbidden_reason. - * Makefile.in (tree-inline.o): Update. - -2003-09-20 Roger Sayle - - * config/i386/i386.c (ix86_expand_carry_flag_compare): Fix - transformation of a>=0 into (unsigned)a<0x80000000. - -2003-09-20 Andrew Pinski - - * config/darwin.c (machopic_select_rtx_section): Fix check for PIC code. - -2003-09-20 Nathanael Nerode - - * Makefile.in: Don't set (unused) DLLTOOL. - - * config/arm/t-linux, config/arm/t-netbsd, config/arm-t-semi: - Remove obsolete references to ENQUIRE. - -2003-09-19 Nathanael Nerode - - * configure.in: Remove --with-elf, which doesn't work. - * configure: Regenerate. - * config.gcc: Remove references to $elf, which does nothing. - - * config/i386/xm-vsta.h: Remove xm-file believed useless. - * config.build (i386-vsta): Remove reference to it. - * config.host (i386-vsta): Remove reference to it. - -2003-09-19 Phil Edwards - - * doc/install.texi: Document the multiple testsuite options. - -2003-09-19 Gerald Pfeifer - - * doc/install.texi (Specific): Add the specific versions of GCC - where support for FreeBSD 1, HP-UX version 9 and older, and AIX - version 3 and older was discontinued. - -2003-09-19 Joel Sherrill - - * config/m68k/t-m68kbare, config/m68k/t-rtems: Change 68681 to - 68881. - -2003-09-19 Bernardo Innocenti - - * config/m68k/m68k.h (TARGET_CPU_CPP_PREDEFINES): Add predefines - for -m68030, -m68020-60 and -m68020-40. - * config/m68k/m68k.h (TARGET_68030): New target flag. - * config/m68k/m68k.h (MASK_RTD, TARGET_RTD, MASK_REGPARM, - TARGET_REGPARM): Remove. - * config/m68k/m68k.h: Regroup and renumber target flags. - * config/m68k/m68k.h (TARGET_SWITCHES): Fix some tabulations. - * config/m68k/m68k.h (RETURN_POPS_ARGS): Always evaluate to 0. - * config/m68k/m68k.h (FUNCTION_ARG): Likewise. - * config/m68k/m68k.h (FUNCTION_ARG_PARTIAL_NREGS): Likewise. - * config/m68k/m68k-none.h: Use MASK_xxx values in M68K_CPU_xxx macros. - -2003-09-19 Ralf Corsepius - - * config/m68k/t-rtems (m68k-*-rtems*): New. - * config.gcc: Use config/m68k/t-rtems. - -2003-09-19 Ralf Corsepius - - * config/mips/t-rtems: New. - * config.gcc (mips*-*-rtems*): Use config/mips/t-rtems. - -2003-09-19 Kelley Cook - - * cgraph.c: Fix typo in debugging output. - -2003-09-19 T. Papadopoulo - Eric Botcazou - - PR target/12166 - * config/sparc/sol2-c1.asm (start): Set __Argv if GCRT1. - -2003-09-18 Mike Stump - - * c-ppoutput.c (print): Use fileline typedef for field 'line'. - (print_line, maybe_print_line, cb_define, cb_undef, cb_include, - cb_ident, cb_def_pragma): Use fileline typedef. - * cpphash.h (struct cpp_reader): Likewise for field out.first_line. - -2003-09-18 Danny Smith - - * config/i386/winnt.c (gen_stdcall_suffix): Quit summation of - total parm size if a parm has incomplete type. - (gen_fastcall_suffix): Likewise. - -2003-09-18 Richard Kenner - - * except.c (output_function_exception_table): Adjust last change - to handle TYPE of INTEGER_CST. - -2003-09-18 Mark Mitchell - - PR target/11184 - * builtins.c (expand_builtin_apply): Use convert_memory_address - before returning the value. - - * alias.c (find_base_value): Simplify use of - convert_memory_address. - (find_base_term): Likewise. - * builtins.c (expand_builtin_stejmp_setup): Likewise. - (expand_builtin_longjmp): Likewise. - (expand_builtin_prefetch): Likewise. - (get_memory_rtx): Likewise. - (expand_builtin_return): Likewise. - (expand_builtin_memcpy): Likewise. - (expand_builtin_strncpy): Likewise. - (expand_builtin_memset): Likewise. - (expand_builtin_va_arg): Likewise. - (expand_builtin_va_copy): Likewise. - (expand_builtin_alloca): Likewise. - * calls.c (expand_call): Likewise. - * except.c (expand_builtin_extract_return_addr): Likewise. - (expand_builtin_eh_return): Likewise. - * explow.c (convert_memory_address): Define even when - POINTER_EXTEND_UNSIGNED is not defined. Do nothing if the address - is already in the right mode. - * explow.c (memory_address): Simplify use of convert_memory_address. - (probe_stack_range): Likewise. - * expmed.c (make_tree): Likewise. - * expr.c (emit_block_move_in_libcall): Likewise. - (expand_assignment): Likewise. - (expand_expr): Likewise. - * function.c (assign_parms): Likewise. - (expand_function_end): Likewise. - * integrate.c (copy_rtx_and_substitute): Likewise. - * stmt.c (expand_computed_goto): Likewise. - -2003-09-18 Roger Sayle - - * simplify-rtx.c (simplify_unary_operation): Only transform - (not (eq X Y)) into (ne X Y) when mode is BImode or STORE_FLAG_VALUE - is -1. RTL "not" is a bit-wise not, "~", not a logical not "!". - -2003-09-18 Zdenek Dvorak - - PR target/11674 - * config/i386/i386.c (x86_emit_floatuns): Also handle SImode operand. - -2003-09-18 Roger Sayle - - * tree.def (FFS_EXPR, CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, - PARITY_EXPR): Delete unused tree codes. - * c-common.c (c_common_truthvalue_conversion): Delete references - to FFS_EXPR and POPCOUNT_EXPR. - * c-pretty-print.c (pp_c_postfix_expression): Remove FFS_EXPR. - (pp_c_expression): Likewise. - * expr.c (expand_expr): Delete RTL expansion of FFS_EXPR, CLZ_EXPR, - CTZ_EXPR, POPCOUNT_EXPR and PARITY_EXPR. - * fold-const.c (tree_expr_nonnegative_p): Remove FFS_EXPR, CLZ_EXPR, - CTZ_EXPR, POPCOUNT_EXPR and PARITY_EXPR. Add support for calls to - BUILT_IN_FFS, BUILT_IN_PARITY and BUILT_IN_POPCOUNT and their long - and long long variants. - -2003-09-18 Gabriel Dos Reis - - * c-pretty-print.h (pp_type_specifier_seq): Fix thinko. - * c-pretty-print.c: Fix formatting. - (pp_c_integer_constant): Append type annotation to literals. Tidy. - (pp_c_type_specifier): Tidy. - (pp_c_compound_literal): New function. - (pp_c_initializer): Simplify.. - (pp_c_initializer_list): Likewise. - (pp_c_brace_enclosed_initializer_list): New function. - (pp_c_postfix_expression): Simplify. - -2003-09-17 Alexandre Oliva - - * config/mn10300/mn10300.md (andsi3, iorsi3, xorsi3, - one_complsi2, bit-clear, bit-set, iorqi3): Make them set_zn. - -2003-09-17 Richard Henderson - - * tree-optimize.c (tree_rest_of_compilation): Save and restore - input_location. - -2003-09-17 Daniel Jacobowitz - - * config/rs6000/sysv4.h (LIB_LINUX_SPEC): Give -lpthread before -lc. - -2003-09-17 Richard Henderson - - * cfg.c (dump_flow_info): Skip register dump if reg_n_info null. - -2003-09-17 Rainer Orth - - * configure.in (gcc_cv_ld_hidden): Don't test gnu_ld_flag. - * configure: Regenerate. - -2003-09-17 Mark Mitchell - - PR debug/12066 - * dbxout.c (dbxout_init): Use a langhook to find builtin types. - * langhooks-def.h (lhd_return_null_tree_v): New function. - (LANG_HOOKS_BUILTIN_TYPE_DECLS): New macro. - (LANG_HOOKS_DECLS): Add it to the intializer. - * langhooks.c (lhd_return_null_tree_v): New function. - * langhooks.h (lang_hooks_for_decls): Add builtin_type_decls. - -2003-09-17 Daniel Jacobowitz - - * configure.in: Quote gcc_config_arguments for configargs.h. - * configure: Regenerated. - * gccbug.in: Don't shell-expand gcc_config_arguments. - -2003-09-17 Gabriel Dos Reis - - PR c++/11357 - * c-pretty-print.c (pp_c_floating_constant): Append - type-annotation to floating constants. - -2003-09-17 Rainer Orth - - * config/mips/iris5.h (TARGET_OS_CPP_BUILTINS): Define _LONGLONG. - Define _ABIO32. - Use it for _MIPS_SIM. - * config/mips/iris6-o32.h (TARGET_OS_CPP_BUILTINS): Removed. - - * config/mips/iris6-o32-as.h (SUBTARGET_ASM_OPTIMIZING_SPEC): - Moved ... - * config/mips/iris5.h (SUBTARGET_ASM_OPTIMIZING_SPEC): ... here, - updating comment. - Fixes PR target/10190. - -2003-09-17 Daniel Jacobowitz - - * config/rs6000/sysv4.h (LIB_LINUX_SPEC): Make -pthread apply - to shared libraries. - -2003-09-17 Eric Botcazou - - PR optimization/11646 - * cfgrtl.c (purge_dead_edges) [JUMP_INSN]: Rematerialize the - EDGE_ABNORMAL flag for EH edges. - * toplev.c (rest_of_handle_cse): Delete unreachable blocks - if dead edges were purged. - -2003-09-16 Bernardo Innocenti - - * config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Add target predefines. - * config/m68k/m68k-none.h (CPP_CPU_DEFAULT_SPEC): Kill all definitions. - * config/m68k/m68k-none.h (CPP_FPU_SPEC): Remove. - * config/m68k/m68k-none.h (CPP_SPEC): Likewise. - -2003-09-16 Ian Lance Taylor - - * cfgcleanup.c (label_is_jump_target_p): Correct use of table - returned by tablejump_p. - -2003-09-16 Joel Brobecker - - * dwarf2asm.c (dw2_asm_output_nstring): Add comment. - -2003-09-16 Roger Sayle - - PR bootstrap/12269 - * simplify-rtx.c (simplify_gen_relational): Allow the cmp_mode - argument to be VOIDmode, taking the mode of the comparison from - the operands. Only call simplify_relational_operation if we - know the mode of the comparison. Honor FLOAT_STORE_FLAG_VALUE - if comparison has a floating point result. Ensure that the - result is always of the specified mode. - (simplify_replace_rtx): Simplify call to simplify_gen_relational. - (simplify_unary_operation): Ensure the correct mode and cmp_mode - are always passed to simplify_gen_relational. Simplify NOT of - comparison operator in any mode, not just BImode. - (simplify_ternary_operation): Correct tests on the return value - of simplify_relational_operation to use const_true_rtx, not - const1_rtx. Abort if it ever returns a non-constant result. - - * cfgloopanal.c (count_strange_loop_iterations): Use the function - simplify_relational_operation, not simplify_gen_relational, if - we're only interested in constant comparisons and will ignore - non-constant results. - -2003-09-16 Roger Sayle - - * fold-const.c (tree_swap_operands_p): New function to determine - the prefered ordering of operands. - (fold): Numerous clean-ups. Use tree_swap_operands_p when swapping - operands to commutative, comparison or ternary operators. Replace - uses of TREE_SET_CODE with recursive call to fold. Remove duplicate - transformation of A ? B : C into !A ? C : B. - -2003-09-16 Jakub Jelinek - - * config/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - * config/arm/linux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - * config/rs6000/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - * config/sh/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - * config/sparc/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - * config/sparc/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define. - -2003-09-16 Jason Merrill - Jakub Jelinek - - * c-common.c (handle_warn_unused_result_attribute): New function. - (c_common_attribute_table): Add warn_unused_result. - (c_expand_expr): Issue warning when result of inlined function - with warn_unused_result attribute is ignored. - * calls.c (expand_call): Issue warning when result of function - with warn_unused_result attribute is ignored. - * c-common.h (STMT_EXPR_WARN_UNUSED_RESULT): Define. - * expr.c (expr_wfl_stack): Define. - (expand_expr) : If ignore, - pass const0_rtx as target. Chain locations into expr_wfl_stack. - * tree-inline.c (expand_call_inline): Set STMT_EXPR_WARN_UNUSED_RESULT - bit if inlined function has warn_unused_result attribute. - * input.h (expr_wfl_stack): Declare. - * doc/extend.texi: Document warn_unused_result attribute. - -2003-09-15 Alexandre Oliva - - * cpplib.c (do_pragma): Remove unnecessary cb_line_change. - -2003-09-15 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_multibss_section_type_flags): Add - ATTRIBUTE_UNUSED. - (call_insn_operand): For PIC, don't allow a direct call to a - function in a different section than the current one. - -2003-09-16 Volker Reichelt - - * doc/invoke.texi (Warning Options): Add missing hyphen before - "Wimport". Change "-Wno-endif-labels" to "-Wendif-labels". - Move "-Wold-style-definition" to the C-only section. - Fix the ordering of the warning options. - -2003-09-15 Zdenek Dvorak - Jeff Law - - * gcse.c (remove_reachable_equiv_notes): New. - replace_store_insn): Call it. Update antic list. - (store_killed_in_insn): Take REG_EQUAL notes into account. - (build_store_vectors, delete_store): Add parameter to - replace_store_insn call. - -2003-09-15 Bob Wilson - - * config/xtensa/xtensa.h (LEGITIMATE_PIC_OPERAND_P): Use - SYMBOL_REF_LOCAL_P. - -2003-09-15 Kazu Hirata - - * expr.h (DEFAULT_FUNCTION_ARG_PADDING): New. - (FUNCTION_ARG_PADDING): Use DEFAULT_FUNCTION_ARG_PADDING. - * config/ia64/ia64.c (ia64_hpux_function_arg_padding): - Likewise. - * config/m68hc11/m68hc11.c (m68hc11_function_arg_padding): - Likewise. - * config/rs6000/rs6000.c (function_arg_padding): Likewise. - * config/sparc/sparc.c (function_arg_padding): Likewise. - -2003-09-15 Vladimir Makarov - - * haifa-sched.c (schedule_block): Use ready_remove_first instead - of choose_ready for non-dfa insn scheduling. - -2003-09-15 Andreas Jaeger - Kaveh R. Ghazi - - * doc/invoke.texi (Warning Options): Describe -Wold-style-definition. - * c-opts.c (c_common_handle_option): Handle OPT_Wold_style_definition. - * c-parse.in: Warn about old-style parameter definition. - * c-common.c: Define warn_old_style_defintion. - * c-common.h: Declare it. - * c.opt: Add Wold-style-defintion. - -2003-09-15 Andreas Jaeger - - * config/rs6000/altivec.h: Convert () prototypes to ISO C90. - * config/rs6000/rs6000.c: Likewise. - -2003-09-12 Zdenek Dvorak - - PR optimization/10914 - * expr.h (get_condition, canonicalize_condition): Declaration changed. - * cfgloopanal.c (simple_loop_exit_p): Add parameter to a get_condition - and canonicalize_condition calls. - * gcse.c (fis_get_condition, delete_null_pointer_checks_1, - delete_null_pointer_checks): Ditto. - * ifcvt.c (noce_get_alt_condition, noce_get_condition): Ditto. - * predict.c (estimate_probability, expected_value_to_br_prob): Ditto. - * loop.c (check_dbra_loop, get_condition_for_loop): Ditto. - (canonicalize_condition, get_condition): Allow to return comparisons - of cc mode registers. - * loop-unswitch.c (may_unswitch_on_p, unswitch_single_loop): Allow - cc mode registers comparison in condition. - -2003-09-12 Mark Mitchell - - * coverage.c (create_coverage): Do not call pushlevel/poplevel. - * langhooks-def.h (lhd_do_nothing_iii_return_null_tree): New - function. - * langhooks.c (lhd_do_nothing_iii_return_null_tree): Define it. - -2003-09-14 Kazu Hirata - - * combine.c (simplify_comparison): Convert - (ne (and (lshiftrt (xor X CST) Y) 1) 0) into - (eq (and (lshiftrt X Y) 1) 0). - -2003-09-14 Kazu Hirata - - * alias.c: Follow spelling conventions. - * cpphash.h: Likewise. - * fold-const.c: Likewise. - -2003-09-14 Alexandre Oliva - - * c-ppoutput.c (cb_line_change): Revert 2003-08-04's change. - * c-lex.c (cb_line_change): Skip line changing whenever - c-ppoutput.c would. - -2003-09-14 Steven Bosscher - - * ra.c: Convert to ISO C90 prototypes. - * ra-build.c: Likewise. - * ra-colorize.c: Likewise. - * ra-debug.c: Likewise. - * ra-rewrite.c: Likewise. - -2003-09-14 Richard Sandiford - - * Makefile.in (%.dvi): Remove excess $(docdir). - -2003-09-14 Richard Sandiford - - * function.c (STACK_BYTES): Move definition to head of file. - (assign_parms): Don't pass current_function_pretend_args_size - directly to SETUP_INCOMING_VARARGS. For partial register arguments, - round current_function_pretend_args_size up to STACK_BYTES. Skip any - excess before laying out the argument. - -2003-09-14 Andreas Jaeger - - * objc/objc-act.c: Convert to ISO C90 prototypes. - * objc/objc-act.h: Likewise. - -2003-09-14 Olaf Hering - - * config/rs6000/rs6000.c: Fix typo: Remove extra ')'. - -2003-09-13 Andrew Pinski - - PR target/12021 - * config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Remove the asserts - as they already are done in config/m68k/m68k.h. - * config/m68k/netbsd.h (TARGET_OS_CPP_BUILTINS): Likewise - - * config/rs6000/rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Remove. - (machopic_output_stub): Only generate pic base symbols when using pic - and generate them in the form L00000000$spb. - -2003-09-13 Richard Henderson - - * cgraphunit.c (cgraph_assemble_pending_functions): Export. - (cgraph_finalize_function): Revert TREE_ASM_WRITTEN check. - * cgraph.h: Update. - -2003-09-12 Dale Johannesen - - * config/rs6000/rs6000.c: Fix typos in previous. - -2003-09-12 Ziemowit Laski - - * pretty-print.c (pp_construct): Use xcalloc instead of xmalloc - when allocating pp->buffer. - -2003-09-12 Geoffrey Keating - - * config/darwin.c (machopic_select_rtx_section): Use - const_data_section for things that might require relocation. - -2003-09-12 H.J. Lu - - PR bootstrap/12264 - * tree-inline.c (inline_forbidden_p_1): Cast the 3rd arg to tree. - -2003-09-12 Bob Wilson - - * config/xtensa/elf.h (ASM_SPEC): Remove no-density option. Reformat. - * config/xtensa/linux.h (ASM_SPEC): Likewise. - * config/xtensa/xtensa.h (TARGET_SWITCHES): Remove -mbig-endian, - -mlittle-endian, -m[no-]density, -m[no-]abs, -m[no-]addx, -m[no-]mac16, - -m[no-]mul16, -m[no-]mul32, -m[no-]nsa, -m[no-]minmax, -m[no-]sext, - -m[no-]booleans, -mhard-float, -msoft-float, -m[no-]hard-float-div, - -m[no-]hard-float-recip, -m[no-]hard-float-sqrt, and - -m[no-]hard-float-rsqrt options. Delete corresponding MASK_* macros - and redefine corresponding TARGET_* macros with constants from the - xtensa-config.h header. - * doc/invoke.texi (Option Summary, Xtensa Options): Remove documention - for the options listed above. - -2003-09-12 Dale Johannesen - - * config/rs6000/rs6000-protos.h: Use C90 prototypes. - * config/rs6000/rs6000-c.c: Ditto. - * config/rs6000/rs6000.c: Ditto. - * config/rs6000/ sysv4.h: Ditto. - -2003-09-12 Chris Lattner - - * loop.c: Move comments describing BIV's and GIV's to top of file - -2003-09-12 Roger Sayle - - PR optimization/8967 - * alias.c (write_dependence_p): Modify to take an additional constp - argument that controls whether the UNCHANGING_RTX_P flags are used. - (anti_dependence, output_dependence): Adjust write_dependence_p - callers to pass this additional argument, to return the same result. - (unchanging_anti_dependence): New variant of anti_dependence that - ignores the UNCHANGING_RTX_P property on memory references. - * rtl.h (unchaning_anti_dependence): Prototype here. - * flow.c (init_propagate_block): Place fake constant mem writes on - the mem_set_list so that dead writes to const variables are deleted. - (insn_dead_p): Change anti_dependence to unchanging_anti_dependence. - (mark_used_regs): Likewise. - -2003-09-12 Richard Sandiford - - * config/mcore/mcore-protos.h (mcore_r15_operand_p): Declare. - (mcore_secondary_reload_class): Declare. - (mcore_output_inline_const_forced): Remove. - * config/mcore/mcore.md (movsi): Remove the code that forced - non-inlineable constants into a register if the target was r15 - or the stack pointer. Remove constant restrictions from the main - define_insn. Remove r <- I, r <- M and r <- N alternatives in favor - of an r <- P alternative. Remove fallback define_insn for reload. - (movhi, movqi): Use gen_lowpart rather than gen_SUBREG. Remove reload - define_insn. Use mcore_output_move in the remaining define_insn. - Adjust condition and constraints in the way as for movsi. - (movdi): Always split unacceptable constants into two. Use - simplify_gen_subreg instead of operand_subword{,_force}. - * config/mcore/mcore.c (mcore_output_inline_const_forced): Remove. - (mcore_output_move): Support HImode and QImode moves as well. - (mcore_m15_operand_p): New function. - (mcore_reload_class): Use it to detect cases where LRW_REGS are better. - (mcore_secondary_reload_class): New function. - * config/mcore/mcore.h (SECONDARY_RELOAD_CLASS): Redefine in - terms of mcore_secondary_reload_class. - -2003-09-11 Mike Stump - - * c-lex.c (fe_file_change): Don't transform to_line with SOURCE_LINE. - -2003-09-11 Kaveh R. Ghazi - - * builtins.c (fold_builtin_logarithm): if N can't be truncated to - MODE exactly, then only convert logN(N) -> 1.0 if - flag_unsafe_math_optimizations is set. - - * builtins.c (builtin_dconsts_init, dconstpi, dconste, - init_builtin_dconsts): Delete. - * emit-rtl.c (dconstpi, dconste): Define. - (init_emit_once): Initialize dconstpi & dconste. - * real.h (dconstpi, dconste): Declare. - -2003-09-11 Alexandre Oliva - - PR fortran/11522 - * dwarf2out.c (gen_inlined_subroutine_die): Emit abstract function - for ultimate origin even if block is abstract. - -2003-09-11 Roger Sayle - - * combine.c (combine_simplify_rtx): Move several NOT and NEG - optimizations from here... - * simplify-rtx.c (simplify_unary_operation): to here. Recursively - simplify expressions using simplify_gen_*ary instead of gen_rtx_*. - -2003-09-11 Richard Henderson - - * cgraphunit.c (cgraph_finalize_function): Add nested arg. - Tweek tests for function already generated. - (cgraph_expand_function): Don't double announce in !unit-at-a-time. - * cgraph.h (cgraph_finalize_function): Update for extra arg. - * c-decl.c (finish_function): Likewise. - -2003-09-10 Joe Buck - - * c-decl.c (poplevel): Eliminate use of |= in function_body assignment. - -2003-09-10 Jerry Quinn - - * real.c: Update URL to VAX floating point docs. - (decode_vax_d): Extract 8 exponent bits instead of 7. - -2003-09-10 Ian Lance Taylor - - * combine.c (force_to_mode): Set fuller_mask based only on mask, - not op_mode. - -2003-09-11 Jan Hubicka - - * c-objc-common.c (c_cannot_inline_tree_fn): Warn - on why function is not inlinable; do not check - the body. - (inline_forbidden_p): Move to... - * tree-inline.c (inline_forbidden_p_1): ... here; Add warnings; - deal with alloca, longjmp. - (inline_forbidden_p): New static function. - (find_alloca_call_1, find_alloca_call, find_builtin_longjmp_call_1, - find_builtin_longjmp_call): Kill. - -2003-09-10 Richard Henderson - - * cgraph.h (struct cgraph_node): Rename lowered to analyzed. - * cgraphunit.c: Update to match. - (record_call_1): Rearrange. Call lang hook for language nodes. - (cgraph_analyze_function): Don't call lower_function. - * langhooks.h (struct lang_hooks_for_callgraph): Replace - lower_function with analyze_expr. - * langhooks-def.h: Update to match. - * langhooks.c (lhd_callgraph_analyze_expr): New. - -2003-09-10 Martin Husemann - - PR target/11965 - * config/sparc/sparc.c (sparc_v8plus_shift): Protect against - constants greater than 63. - * config/sparc/sparc.md (ashlsi3, ashrsi3, lshrsi3): Protect - against constants greater than 31. - (*ashldi3_sp64, *ashrdi3_sp64, *lshrdi3_sp64): Protect against - constants greater than 63. - -2003-09-09 Richard Henderson - - * cgraphunit.c (cgraph_finalize_function): Remove unused argument. - * cgraph.h (cgraph_finalize_function): Update. - * c-decl.c (finish_function): Update. - -2003-09-09 Devang Patel - - * config/darwin.h (LINK_SPEC): Pass -nofixprebinding to linker. - * doc/invoke.texi: Document new Darwin linker option -nofixprebinding. - -2003-09-09 Eric Christopher - - * configure.in: Change usage of 'head' to 'sed 1q'. - * configure: Regenerate. - -2003-09-09 Richard Henderson - - * except.c: Include cgraph.h. - (output_function_exception_table): Invoke - cgraph_varpool_mark_needed_node. - * Makefile.in (except.o): Update. - -2003-09-07 Kelley Cook - - * Makefile.in: Define REMAKEFLAGS for LANGUAGES & BOOT_CFLAGS - and use it throughout. - -2003-09-09 Kaveh R. Ghazi - - * builtins.c (real_dconstp, fold_builtin_logarithm, - fold_builtin_exponent): New, split out from fold_builtin. Also - generalize to add log2, log10, exp2 and exp10/pow10 equivalents. - * emit-rtl.c (dconst3, dconst10, dconstthird): New. - (init_emit_once): Initialize new dconsts, use ARRAY_SIZE in lieu - of hardcoded array size. - * fold-const.c (fold): Add cases for exp2, exp10 and pow10. - (tree_expr_nonnegative_p): Likewise. - * real.h (dconst3, dconst10, dconstthird): New. - -2003-09-09 Jan Hubicka - - * cgraphunit.c (cgraph_finalize_function): Fix handling of extern - inline functions. - (cgraph_finalize_compilation_unit): Fix crash when dealing with lost - DECL_SAVED_TREE. - -2003-09-09 Roger Sayle - - * builtins.c (fold_builtin_cabs): Protect the complex argument - against multiple evaluation when optimizing cabs* into sqrt*. - -2003-09-09 Jan Hubicka - - * varasm.c (notice_global_symbol): Properly deal with weak symbols. - -2003-09-08 Kelley Cook - - * Makefile.in: Revert yesterday's change. - -2003-09-08 Bernardo Innocenti - Peter Barada - - * config/m68k/coff.h (REGISTER_NAMES): Add fake register `argptr' - * config/m68k/hp320.h (REGISTER_NAMES): Likewise. - * config/m68k/linux.h (REGISTER_NAMES): Likewise. - * config/m68k/m68kelf.h (REGISTER_NAMES): Likewise. - * gcc/config/m68k/sgs.h (REGISTER_NAMES): Likewise. - * config/m68k/m68k-protos.h (m68k_initial_elimination_offset): Add prototype. - * config/m68k/m68k.c (m68k_frame): New struct, simular to ix86 back-end. - (m68k_compute_frame_layout): New function. - (m68k_initial_elimination_offset): New function. - (m68k_output_function_prologue): ColdFire-specific movem handling. - (m68k_output_function_epilogue): Likewise. - * config/m68k/m68k.h (FIRST_PSEOUDO_REGISTER): Make room for argptr reg. - (ARG_POINTER_REGNUM): Add new definition. - (INITIAL_FRAME_POINTER_OFFSET): Remove macro. - (ELIMINABLE_REGS): Define new macro, like in ix86 back-end. - (CAN_ELIMINATE): Likewise. - (INITIAL_ELIMINATION_OFFSET): Likewise. - -2003-09-08 Bernardo Innocenti - - * config/m68k/m68k.c (m68k_output_function_prologue): Simplify - by removing redundant variable cfa_store_offset. - -2003-09-08 Mark Mitchell - - * langhooks-def.h (lhd_register_builtin_type): New function. - (LANG_HOOKS_REGISTER_BUILTIN_TYPE): New macro. - (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. - * langhooks.h (lang_hooks_for_types): Add register_builtin_type. - * langhooks.c (lhd_register_builtin_type): New function. - * c-common.h (c_register_builtin_type): Declare. - * c-common.c (c_register_builtin_type): New function. - * c-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to - c_register_builtin_type. - * config/ia64/hpux.h (TARGET_OS_CPP_BUILTINS): Remove __fpreg, - __float80, and __float128 macros. - * config/ia64/ia64.c (ia64_init_builtins): Create __fpreg, - __float80, and __float128 types. - -2003-09-08 Kaveh R. Ghazi - - * builtin-types.def - (BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE, - BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE_COMPLEX_DOUBLE, - BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT_COMPLEX_FLOAT): New. - * builtins.def (BUILT_IN_CACOS, BUILT_IN_CACOSF, BUILT_IN_CACOSH, - BUILT_IN_CACOSHF, BUILT_IN_CACOSHL, BUILT_IN_CACOSL, - BUILT_IN_CARG, BUILT_IN_CARGF, BUILT_IN_CARGL, BUILT_IN_CASIN, - BUILT_IN_CASINF, BUILT_IN_CASINH, BUILT_IN_CASINHF, - BUILT_IN_CASINHL, BUILT_IN_CASINL, BUILT_IN_CATAN, - BUILT_IN_CATANF, BUILT_IN_CATANH, BUILT_IN_CATANHF, - BUILT_IN_CATANHL, BUILT_IN_CATANL, BUILT_IN_CCOS, BUILT_IN_CCOSF, - BUILT_IN_CCOSH, BUILT_IN_CCOSHF, BUILT_IN_CCOSHL, BUILT_IN_CCOSL, - BUILT_IN_CEXP, BUILT_IN_CEXPF, BUILT_IN_CEXPL, BUILT_IN_CPOW, - BUILT_IN_CPOWF, BUILT_IN_CPOWL, BUILT_IN_CPROJ, BUILT_IN_CPROJF, - BUILT_IN_CPROJL, BUILT_IN_CSIN, BUILT_IN_CSINF, BUILT_IN_CSINH, - BUILT_IN_CSINHF, BUILT_IN_CSINHL, BUILT_IN_CSINL, BUILT_IN_CSQRT, - BUILT_IN_CSQRTF, BUILT_IN_CSQRTL, BUILT_IN_CTAN, BUILT_IN_CTANF, - BUILT_IN_CTANH, BUILT_IN_CTANHF, BUILT_IN_CTANHL, BUILT_IN_CTANL): - New. - * doc/extend.texi: Document new builtins. - -2003-09-09 Jan Hubicka - - * cgraph.c (cgraph_varpool_finalize_decl): Sanity check duplicated - finalization. - * cgraphunit.c (decide_is_fnction_needed): Avoid special case of nested - functions, check for COMDAT. - (cgraph_assemble_pending_functions): Break out from... - (cgraph_finalize_function): ... here; allow redefinig of extern inline - functions. - (record_call_1): Record function references only in non-unit-at-a-time - mode. - (cgraph_analyze_function): Reset current_function_decl. - (cgraph_finalize_compilation_unit): Assemble pending functions. - -2003-09-08 Mark Mitchell - - * mklibgcc.in (libcc.a): Depend on stmp-dirs. - (libgov.a): Likewise. - (libgcc_eh.a): Likewise. - -2003-09-08 Roger Sayle - - * fold-const.c (operand_equal_p): Clarify documentation. - -2003-09-08 Richard Henderson - - * c-decl.c (c_expand_body_1): Push and pop function context here. - * tree-optimize.c (tree_rest_of_compilation): ... not here. Take - nested argument instead of computing nesting ourselves. - -2003-09-08 Jakub Jelinek - - * toplev.c (rest_of_handle_stack_regs): Call split_all_insns before - regstack if optimizing but not scheduling after reload. - -2003-09-08 Jakub Jelinek - - * config/sparc/sparc.c (struct machine_function): New type. - (TARGET_HAVE_TLS, TARGET_CANNOT_FORCE_CONST_MEM): Define. - (sparc_override_options): Initialize init_machine_status. - (tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand, - tie_symbolic_operand, tle_symbolic_operand): New functions. - (symbolic_operand): Disallow tls_symbolic_operand. - (symbolic_memory_operand): Likewise. - (tls_call_delay, sparc_cannot_force_const_mem, legitimate_constant_p, - constant_address_p, legitimate_pic_operand_p, legitimate_address_p): - New functions. - (sparc_tls_symbol): New variable. - (sparc_tls_get_addr, sparc_tls_got, legitimize_tls_address, - legitimize_address): New functions. - (print_operand): Handle %&. - (sparc_init_machine_status, get_some_local_dynamic_name, - get_some_local_dynamic_name_1): New functions. - (sparc_output_dwarf_dtprel): New function. - * config/sparc/sparc.h (CONSTANT_ADDRESS_P): Moved into - constant_address_p. - (LEGITIMATE_PIC_OPERAND_P): Moved into legitimate_pic_operand_p. - (LEGITIMATE_CONSTANT_P): Moved into legitimate_constant_p. - (GO_IF_LEGITIMATE_ADDRESS): Moved into legitimate_address_p. - (LEGITIMIZE_ADDRESS): Moved into legitimize_address. - (PRINT_OPERAND_PUNCT_VALID_P): Add '&'. - (TARGET_TLS, TARGET_SUN_TLS, TARGET_GNU_TLS): Define. - (ASM_OUTPUT_DWARF_DTPREL): Define. - (PREDICATE_CODES): Add tgd_symbolic_operand, tld_symbolic_operand, - tie_symbolic_operand, tle_symbolic_operand. - * config/sparc/sparc.md (UNSPEC_TLSGD, UNSPEC_TLSLDM, UNSPEC_TLSLDO, - UNSPEC_TLSIE, UNSPEC_TLSLE, UNSPEC_TLSLD_BASE): New constants. - (tls_call_delay): New attribute. - (in_call_delay): Use it. - (movqi, movhi, movsi, movdi): Call legitimize_tls_address if needed. - (tgd_hi22, tgd_lo10, tgd_add32, tgd_add64, tgd_call32, tgd_call64, - tldm_hi22, tldm_lo10, tldm_add32, tldm_add64, tldm_call32, tldm_call64, - tldo_hix22, tldo_lox10, tldo_add32, tldo_add64, tie_hi22, tie_lo10, - tie_ld32, tie_ld64, tie_add32, tie_add64, tle_hix22_sp32, - tle_lox10_sp32, tle_hix22_sp64, tle_lox10_sp64): New insns. - (tldo_ldub_sp32, tldo_ldub1_sp32, tldo_ldub2_sp32, tldo_ldsb1_sp32, - tldo_ldsb2_sp32, tldo_ldub_sp64, tldo_ldub1_sp64, tldo_ldub2_sp64, - tldo_ldub3_sp64, tldo_ldsb1_sp64, tldo_ldsb2_sp64, tldo_ldsb3_sp64, - tldo_lduh_sp32, tldo_lduh1_sp32, tldo_ldsh1_sp32, tldo_lduh_sp64, - tldo_lduh1_sp64, tldo_lduh2_sp64, tldo_ldsh1_sp64, tldo_ldsh2_sp64, - tldo_lduw_sp32, tldo_lduw_sp64, tldo_lduw1_sp64, tldo_ldsw1_sp64, - tldo_ldx_sp64, tldo_stb_sp32, tldo_stb_sp64, tldo_sth_sp32, - tldo_sth_sp64, tldo_stw_sp32, tldo_stw_sp64, tldo_stx_sp64): New - insns. - * config/sparc/sparc-protos.h (legitimate_constant_p, - constant_address_p, legitimate_pic_operand_p, legitimate_address_p, - legitimize_tls_address, legitimize_address, tls_symbolic_operand, - tls_call_delay, sparc_output_dwarf_dtprel): New prototypes. - * config/sparc/linux.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Define. - * config/sparc/linux64.h (TARGET_GNU_TLS, TARGET_SUN_TLS): Likewise. - * configure.in (sparc*-*-*): Add TLS check. - * configure: Rebuilt. - -2003-09-07 Eric Botcazou - - PR target/11689 - * config/i386/i386.c (memory_address_length): Fix computation when - the base is esp or ebp. - -2003-09-07 Mark Mitchell - - PR c++/11852 - * varasm.c (initializer_constant_valid_p): Correct logic for - CONSTRUCTORs. - -2003-09-07 Roger Sayle - - * expr.c (expand_operands): New function to expand an operand pair. - (expand_expr): Call expand_operands whenever we need to expand both - operands of a binary operator. - (do_store_flag): Likewise for operands of comparison operations. - -2003-09-07 Roger Sayle - - * combine.c (combine_simplify_rtx): Don't convert -(A*B) into - (-A)*B if we care about sign-dependent rounding. - -2003-09-07 Gabriel Dos Reis - - * c-pretty-print.h (pp_c_left_brace): Declare. - (pp_c_right_brace): Likewise. - * c-pretty-print.c (pp_c_left_brace): Now a function - (pp_c_right_brace): Likewise. - -2003-09-07 Jan Hubicka - - * cfgcleanup.c (try_simplify_condjump): Fix again the preivous patch. - -2003-09-07 Gabriel Dos Reis - - * diagnostic.c (warn_deprecated_use): Move to toplev.c - -2003-09-07 Gabriel Dos Reis - - * langhooks.c (lhd_print_error_function): Move from diagnostic.c. - * Makefile.in (langhooks.o): Depend on diagnostic.h - -2003-09-06 James E Wilson - - * loop.c (loop_regs_update): Delete else clause for PATTERN rtx and - simplify. - -2003-09-07 Kelley Cook - - * Makefile.in: Define $REMAKE to be $MAKE with LANGUAGES & BOOT_CFLAGS - and use it throughout. - -2003-09-07 Jan Hubicka - - * cfgcleanup.c (try_simplify_condjump): Fix my previous patch. - - * toplev.c (rest_of_decl_compilation): Do not finalize external - virables. - - * cgraph.c (cgraph_mark_reachable_node): Only enqueue finalized - functions. - (cgraph_varpool_finalize_decl): Notice global symbol when needed. - -2003-09-06 Jan Hubicka - - PR target/12070 - * calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments. - - PR opt/12082 - * cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning. - -2003-09-06 Gabriel Dos Reis - - * diagnostic.c (announce_function): Move to toplev.c. - -2003-09-06 Zdenek Dvorak - - * gcse.c (expr_equiv_p): Don't consider anything to be equal to - volatile mem. - -2003-09-06 Kaveh R. Ghazi - - * ggc-common.c (init_ggc_heuristics): Don't use the heuristics - when gc checking is enabled. - -2003-09-06 Steven Bosscher - - PR c/9862 - * c-decl.c (c_expand_body_1): Move return warning from here... - (finish_function): ...to here. - -2003-09-05 Geoffrey Keating - - * config/rs6000/darwin.h (PREFERRED_RELOAD_CLASS): Always return - a subset of the input class. - -2003-09-05 Kazu Hirata - - * config/i860/i860.c: Follow spelling conventions. - * config/i860/i860.h: Likewise. - * config/sh/sh.h: Likewise. - -2003-09-05 Nitin Yewale - - * config/h8300/h8300-protos.h: Declare h8300_hard_regno_rename_ok - * config/h8300/h8300.h (HARD_REGNO_RENAME_OK): New. - * config/h8300/h8300.c (h8300_hard_regno_rename_ok): New. - -2003-09-05 Roger Sayle - Richard Henderson - - PR optimization/1823 - * expmed.c (expand_divmod ): Use an unsigned - multiplication to implement division by constant integer. - -2003-09-05 Jan Hubicka - - * opts.c (decode_options): Enable unit-at-a-time at -O2. - * params.def (max-inline-insns-single): Set to 500 - (max-inline-insns-auto): Set to 150 - * invoke.texi (max-inline-insns-single, max-inline-insns-auto): Update. - -2003-09-04 Richard Henderson - - * cgraph.c (cgraph_mark_reachable_node): Split out from ... - (cgraph_mark_needed_node): Remove needed argument. - * cgraph.h: Update to match. - * cgraphunit.c (decide_is_function_needed): Split out from ... - (cgraph_finalize_function): Reorg. Avoid deferred_inline_function - if we generated the function. - (record_call_1): Update for cgraph_mark_reachable_node. - * varasm.c (mark_referenced): Likewise. - * objc/objc-act.c (mark_referenced_methods): Likewise. - -2003-09-04 DJ Delorie - - * targhooks.c: Add comment explaining the migration process. - -2003-09-04 Eric Christopher - - * config/frv/t-frv: Fix path for frv-abi.h. - * config/frv/frv-asm.h: Fix string concatenation. - -2003-09-04 DJ Delorie - - * builtins.c (apply_args_size): Guard against a NULL cfun. - (expand_builtin_apply_args_1): Likewise. - (expand_builtin_apply): Likewise. - Fixes PR bootstrap/12172. - -2003-09-04 Rainer Orth - - * configure.in (gcc_cv_as_ix86_cmov_sun_syntax): Check if - assembler supports Sun syntax for cmov. - * configure: Regenerate. - * config.in: Likewise. - * config/i386/i386.c: Rename CMOV_SUN_AS_SYNTAX to - HAVE_AS_IX86_CMOV_SUN_SYNTAX. - * config/i386/sol2.h (CMOV_SUN_AS_SYNTAX): Remove. - Fixes PR target/12101. - -2003-09-04 Matt Austern - - * c-common.c (fname_as_string): Use lang_hooks.decl_printable_name - with verbosity 0, instead of DECL_NAME, for human-readable string. - -2003-09-04 Eric Christopher - - * targhooks.c (default_return_in_memory): Allow - unconverted ports. - -2003-09-04 Eric Christopher - - * targhooks.c (default_return_in_memory): Fix typo - in last checkin. - -2003-09-04 Eric Christopher - - * targhooks.c (default_return_in_memory): Fix default - definition. - -2003-09-04 Bernardo Innocenti - - * config/m68k/m68k.c (m68k_coff_asm_named_section): Restore - deleted function. - * config/m68k/coff.h (M68K_TARGET_COFF): Add flag used to - enable coff-only code in m68k.c. - -2003-09-04 Nick Clifton - - * config.gcc: Add v850e1 target. Allow --with-cpu to accept - v850e1. - * config/v850/v850.h: Accept v850e1 as a default CPU. - Accept -mv850e1 as a command line option. - * doc/invoke.texi: Document new -mv850e1 command line switch. - * config/v850/t-v850: Treat -mv850e1 as a multilib alias for - -mv850e. - -2003-09-04 Nick Clifton - - * config.gcc (v850e-*-*): Use t-v850e makefile fragment. - * config/v850/t-v850: Only produce one extra multilib - for - the v850e. - * config/v850/t-v850e: New file: Only produce one extra - multilib - for the v850. - -2003-09-04 Jakub Jelinek - - * config/ia64/libgcc-ia64.ver: Export _Unwind_GetBSP@@GCC_3.3.2. - * config/ia64/unwind-ia64.c (_Unwind_GetBSP): New function. - * unwind.h (_Unwind_GetBSP): New prototype. - * libgcc-std.ver: Add empty GCC_3.3.2 version. - * mkmap-symver.awk: For symbol versions with no exported symbols, - don't put anything into version script, just change all symbol - versions which inherit from it to inherit from its ancestor. - -2003-09-04 Eric Christopher - - * config/mips/mips.c (mips_expand_prologue): Convert to - calls.struct_value_rtx hook. - (reg_or_const_float_1_operand): New. - * config/mips/mips.h: Update Comments. - (mips_arg): Add reg_or_const_float_1_operand. - * config/mips/mips.md (divdf3); Convert to expander. - (divsf3): Ditto. - (*divdf3): New pattern. - (*divsf3): Ditto. - -2003-09-04 Jan Hubicka - - * toplev.c (wrapup_global_declarations): Fix final pass in - unit-at-atime mode. - -2003-09-04 Mark Mitchell - - * doc/extend.texi: Document removal of cast-as-lvalue extension in - C++. - -2003-09-04 Nicolas Roche - - * gcc.c (process_command): Fix typo. - -2003-09-03 David O'Brien - - optimization/11980 - * config/i386/freebsd.h (SIZE_TYPE): Support TARGET_64BIT. - (PTRDIFF_TYPE): Likewise. - (WCHAR_TYPE_SIZE): Likewise. - -2003-09-03 DJ Delorie - - * targhooks.c: New file. - * targhooks.h: New file. - * Makefile.in: Add targhooks.o support. - (function.o): Depend on$(TARGET_H). - (stmt.o): Likewise. - (combine.o): Depend on $(TREE_H) and $(TARGET_H). - * builtins.c (apply_args_size, expand_builtin_apply_args_1, - expand_builtin_apply): Convert to calls.struct_value_rtx hook. - (expand_builtin_saveregs): Convert to - calls.expand_builtin_saveregs hook. - * c-decl.c (start_decl): Handle new calls.promote_prototypes hook - here, instead of ... - (get_parm_info) ... here. - (store_parm_decls_oldstyle): Convert to calls.promote_prototypes - hook. - (finish_function): Handle calls.promote_prototypes hook here too. - * c-typeck.c (convert_arguments): Convert to - calls.promote_prototypes hook. - (c_convert_parm_for_inlining): Likewise. - * calls.c (initialize_argument_information): Convert to - calls.promote_function_args hook. - (expand_call): Convert to calls.struct_value_rtx, - calls.strict_argument_naming, - calls.pretend_outgoing_varargs_named, and - calls.promote_function_return hooks. Pass fndecl to - aggregate_value_p. Initialize CUMULATIVE_ARGS before calling - hooks, so they can use that. - (emit_library_call_value_1): Likewise. - * combine.c (setup_incoming_promotions): Convert to - calls.promote_function_args hook. - * emit-rtl.c: Convert to calls.struct_value_rtx hook. - * expr.c (expand_assignment): Pass call to aggregate_value_p. - (expand_expr): Likewise. - * expr.h: Remove support for SETUP_INCOMING_VARARGS, - STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, - RETURN_IN_MEMORY macro defaults. - * final.c (profile_function): Convert to calls.struct_value_rtx - hook. - * function.c (aggregate_value_p): Accept function type tree as - second parameter; try to deduce fntype from it. Convert to - calls.return_in_memory hook. - (assign_parms): Convert to calls.setup_incoming_varargs, - calls.strict_argument_naming, calls.promote_function_args, - calls.pretend_outgoing_varargs_named hooks. Pass fndecl to - aggregate_value_p. - (expand_function_start): Likewise. Convert to - calls.struct_value_rtx hook. - (expand_function_end): Convert to calls.promote_function_return hook. - (allocate_struct_function): Pass fndecl to aggregate_value_p. - * hard-reg-set.h: Update comments to new hook names. - * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. - * reg-stack.c (stack_result): Likewise. - * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. - * stmt.c (expand_value_return): Convert to - calls.promote_function_return hook. - * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, - TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, - TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, - TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, - TARGET_STRICT_ARGUMENT_NAMING, - TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. - * target.h: Likewise. - * tree.h (aggregate_value_p): Also takes a tree to deduce function - attributes from (for target hooks). - * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, - PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, - STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, - EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, - STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert - to hooks. - - * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function - to aggregate_value_p. - * config/arm/arm.c (arm_init_cumulative_args, - arm_output_mi_thunk): Likewise. - * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): - Likewise. - * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, - mips_can_use_return_insn): Likewise. - * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. - * config/s390/s390.c (s390_output_mi_thunk): Likewise. - * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to - aggregate_value_p. - * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass - function to aggregate_value_p. - * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to - aggregate_value_p. - - * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. - (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, - sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c - (sh_handle_renesas_attribute, sh_promote_prototypes, - sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, - sh_setup_incoming_varargs, sh_strict_argument_naming, - sh_pretend_outgoing_varargs_named): New decls. - (targetm): Add new hooks. - (calc_live_regs): Save MACL and MACH if the function has the - renesas attribute. - (sh_expand_prologue): Support renesas attribute. - (sh_builtin_saveregs): Make static. - (sh_build_va_list): Support renesas attribute. - (sh_va_start): Likewise. - (sh_va_arg): Likewise. - (sh_promote_prototypes): New. - (sh_function_arg): New, moved from sh.h. Support renesas - attribute. - (sh_function_arg_advance): Likewise. - (sh_return_in_memory): Likewise. - (sh_strict_argument_naming): Likewise. - (sh_pretend_outgoing_varargs_named): Likewise. - (sh_struct_value_rtx): New. - (sh_attribute): Add renesas attribute. - (sh_handle_renesas_attribute): New. - (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. - (sh_ms_bitfield_layout_p): Support renesas attribute also. - (sh_output_mi_thunk): Pass function to aggregate_value_p. * - config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for - -mhitachi. - (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to - target hooks. - (sh_args): Add renesas_abi flag. - (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. - (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. - (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the - stack for the renesas abi. - (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, - SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, - PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set - call cookie to indicate renesas calls. - -2003-09-03 Mostafa Hagog - - * gcse.c (replace_one_set): New function. - (pre_insert_copy_insn): Change the order of copying - to make copy propagation discover additional PRE opportunities. - -2003-09-03 Roger Sayle - - PR optimization/11700. - * simplify-rtx.c (simplify_subreg): Check that the subreg offset - of a hard register is representable before trying to simplify it - using subreg_hard_regno. - -2003-09-04 Rainer Orth - - * configure.in (gcc_cv_ld_hidden): Disable unless using GNU ld. - * configure: Regenerate. - -2003-09-04 Rainer Orth - - * intl.h (N_): Remove parentheses. - -2003-09-03 Bernardo Innocenti - - * config.gcc (m68k-*-linux*): Remove definition of LINUX_DEFAULT_ELF. - * config/i370/linux.h (LINUX_DEFAULT_ELF): Remove unconditional - definition and code blocks compiled when not defined. - * config/i386/linux.h (LINUX_DEFAULT_ELF): Likewise. - * config/i386/linux64.h (LINUX_DEFAULT_ELF): Likewise. - * config/sparc/linux.h: (LINUX_DEFAULT_ELF): Likewise. - * config/sparc/linux64.h: (LINUX_DEFAULT_ELF): Likewise. - -2003-09-03 Jeff Sturm - - * cgraphunit.c (visited_nodes): New static variable. - (record_call_1): Use walk_tree with visited_nodes. - (cgraph_create_edges): Use walk_tree with visited_nodes. - Setup/teardown visited_nodes hashtable. - -2003-09-03 Roger Sayle - - * toplev.c (flag_rounding_math): New global variable. - (f_options): Add to the list of language independent options. - * flags.h (flag_rounding_math): Prototype here. - (HONOR_SIGN_DEPENDENT_ROUNDING): Use flag_rounding_math instead. - * common.opt (frounding-math): New common command line option. - * opts.c (common_handle_option): Handle OPT_frounding_math. - (set_fast_math_flags): -ffast-math clears flag_rounding_math. - - * doc/invoke.texi: Document this new command line option. - -2003-09-03 Rainer Orth - - * config/sol2.h (NO_IMPLICIT_EXTERN_C): Update comment. - -2003-09-03 Jan Hubicka - - * Makefile.in (c-objc-common.o): Kill gt-c-objc-common.h dependency. - * c-decl.c (finish_function): Kill arguments, always use cgraph path. - * c-objc-common.c: Kill include of gt-c-objc-common.h - (expand_deferred_fns, deffer_fn): Kill function. - (deferred_fns): Kill variable. - (finish_cdtor): Update finish_function call. - (c_objc_common_finish_file): Always call cgraph code. - * c-parse.c: Regenerate. - * c-parse.y: Regenerate. - * c-tree.h (finish_function): Update prototype. - * objc-acct.c (build_module_descriptor, finish_method_def): - Update call of finish_function. - * cgraphunit.c (cgraph_default_inline_p, cgraph_analyze_function): Add - forward prototype. - (cgraph_finalize_function): In non-unit-at-a-time mode analyze the - function and assemble it if needed. - (cgraph_finalize_compilation_unit): Do nothing in non-unit-at-a-time - mode. - (cgraph_optimize): Likewise. - (cgraph_expand_function): In non-unit-at-a-time mode keep function body - even when it has no inline callees. - * c-parse.in: Update calls to finish_function. - -2003-09-03 Nick Clifton - - * config/arm/arm.h: Handle TARGET_CPU_iwmmxt. - Use #error to generate the message if TARGET_DEFAULT is not - recognised. - -2003-09-03 Richard Sandiford - - * config/mips/mips.h (MASK_UNUSED1): Remove. - (MASK_XGOT, TARGET_XGOT): Define. - (TARGET_SWITCHES): Add an entry for -mxgot. - (ASM_SPEC): Map -mxgot to -xgot. - * config/mips/mips.c (mips_symbol_insns): Use TARGET_XGOT to decide - whether we're using a big-GOT sequences. - (mips_legitimize_const_move, mips_expand_call): Likewise. - (override_options): Revert 2003-01-09 change. - * doc/invoke.texi: Document -mxgot. - -2003-09-02 Jason Merrill - - * config/sol2.h (NO_IMPLICIT_EXTERN_C): Define here. - * config/sparc/sol2.h: Not here. - -2003-09-02 Roger Sayle - - * expr.c (expand_expr): The code following both_summands performs - the same task as simplify_gen_binary. Replace all gotos to - both_summands with a call to simplify_gen_binary and delete the - now unused label. - -2003-09-02 Jason Merrill - - PR c++/7327 - * config/sparc/sol2.h (NO_IMPLICIT_EXTERN_C): Define. - -2003-09-02 Jeff Sturm - - * cgraphunit.c (record_call_1): Use walk_tree_without_duplicates. - (cgraph_optimize_function): Set current_function_decl to the - fndecl we're integrating from. - -2003-09-02 Kaveh R. Ghazi - - * builtins.def: Break out _Complex math functions into their - own category. - -2003-09-02 Andreas Jaeger - - * langhooks-def.h (LANG_HOOKS_RTL_EXPAND_STMT): Cast properly. - -2003-09-02 Josef Zlomek - - * cfgbuild.c (compute_outgoing_frequencies): Use NOTE instead of - finding the note again. - -2003-09-02 Nathanael Nerode - - * config.gcc: Remove host-specific rewrites of target_alias. - -2003-09-01 Mark Mitchell - - * Makefile.in (genprogs): Fix typo. - - * Makefile.in (gencheck.o): Remove build commands. - (dummy-conditions.o): Likewise. - (read-rtl.o): Likewise. - (gensupport.o): Likewise. - (genconfig$(build_exeext)): Remove rule. - (genconfig.o): Remove build commands. - (genflags$(build_exeext)): Remove rule. - (genflags.o): Remove build commands. - (gencodes$(build_exeext)): Remove rule. - (gencodes.o): Remove build commands. - (genconstants.o): Remove build commands. - (genemit$(build_exeext)): Remove rule. - (genemit.o): Remove build commands. - (genrecog$(build_exeext)): Remove rule. - (genrecog.o): Remove build commands. - (genextract$(build_exeext)): Remove rule. - (genextract.o): Remove build commands. - (genpeep$(build_exeext)): Remove rule. - (genpeep.o): Remove build commands. - (genattr$(build_exeext)): Remove rule. - (genattr.o): Remove build commands. - (genprognames): New variable. - (genprogs): Likewise. - (genobjs): Likewise. - (genprogs): New rule. - (genobjs): Likewise. - (genattrtab.o): Remove build commands. - (genautomata.o): Likewise. - (genoutput$(build_exeext)): Remove rule. - (genoutput.o): Remove build commands. - (gengenrtl.o): Likewise. - (genpreds.o): Likewise. - (gengtype.o): Likewise. - (genconditions.o): Likewise. - (gen-protos.o): Likewise. - (scan.o): Likewise. - (fix-header.o): Likewise. - (scan-decls.o): Likewise. - (check-g++): Combine with other check targets. - (check-gcc): Likewise. - (check-g77): Likewise. - (check-objc): Likewise. - -2003-09-01 Nathanael Nerode - - * config.gcc: Remove host-specific stuff which is unused here - since the introduction of config.host. - - * doc/fragments.texi: Mention config.host. - * doc/sourcebuild.texi: Mention config.host. Give brief descriptions - of config.build, config.host, and config.gcc. - -2003-09-01 Zack Weinberg - - * c-decl.c (pushdecl): Don't put variables on - C_TYPE_INCOMPLETE_VARS of a type unless that type is itself - incomplete. - -2003-09-01 Nathanael Nerode - - * config.host: New file. - * config.gcc: Remove some host-specific stuff and some - logic needed only for repeated invocation. - * configure.in: Use config.host. - * configure: Regenerate. - -2003-09-01 Josef Zlomek - - * c-typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR. - * convert.c (convert_to_integer): Kill BIT_ANDTC_EXPR. - * fold-const.c (int_const_binop): Kill BIT_ANDTC_EXPR. - (fold): Kill BIT_ANDTC_EXPR and label bit_and. - * tree.def (BIT_ANDTC_EXPR): Kill. - -2003-08-31 Nathanael Nerode - - * configure.in: Remove uses of "for x in .. ${foo}" idiom. - * configure: Regenerate. - - * config.gcc: Remove references to install_headers_dir, now unused - since introduction of config.build. - * config.gcc (i860-*-sysv4*): Don't set unused USG, SVR3 defines. - - * doc/fragments.texi, doc/sourcebuild.texi: Mention new file - config.build. - - * config.build: New file. - * config.gcc: Remove some build-specific stuff. - * configure.in: Use config.build. - * configure: Regnerate. - -2003-08-31 Steven Bosscher - Roger Sayle - - PR middle-end/11823 - * stmt.c (expand_end_case_type): Only use jump tables for dense - switch statements when optimizing for size. - -2003-08-31 Olivier Hainque - - * builtins.c (expand_builtin_setjmp): Use emit_jump to jump around - the != 0 case, which ensures pending stack adjustments are flushed. - -2003-08-30 Zack Weinberg - - * configure.frag: Delete file. - * configure.in: Rename the substitution variables - dep_host_xmake_file and dep_tmake_file to xmake_file and - tmake_file respectively. Do not expand $srcdir in the - value of these; leave that for Make. Introduce a new - substitution varaible, all_lang_makefrags, which lists - subdirectory Make-lang.in files; exclude these from - all_lang_makefiles, which is now only for subdirectory - outputs. Do not invoke configure.frag. Do not set nor - AC_SUBST_FILE target_overrides, host_overrides, or - language_fragments. Create build subdirectories in - config.status extra commands. - * configure: Regenerate. - * Makefile.in: Update substitutions to match changes to - configure. Use include directives instead of @-insertions - to read in host, target, and language fragments. - (Makefile rule): Do not invoke configure.frag. Do not copy - config.status to config.run before executing it. Set - CONFIG_HEADERS and CONFIG_FILES so that only Makefile gets - regenerated. - (cstamp-h rule): Set CONFIG_FILES as well as CONFIG_HEADERS. - -2003-08-30 Zack Weinberg - - * c-tree.h: Delete COMPARE_DIFFERENT_TU from enumeration. - * c-typeck.c (same_translation_unit_p): New function. - (comptypes): Use it instead of flags parameter to identify - structure types from different translation units. - * c-decl.c (duplicate_decls): Always call comptypes with - COMPTYPE_STRICT flags argument. - (c_reset_state): Set BLOCK_SUPERCONTEXT of the block formed - to file_scope_decl. - -2003-08-30 Zack Weinberg - - * c-tree.h (C_TYPE_INCOMPLETE_VARS): New macro. - * c-decl.c (struct c_scope): Remove "incomplete" field. - (pushdecl): Attach variables with incomplete types to - the TYPE_MAIN_VARIANT of the incomplete type in question. - (finish_struct): Look at C_TYPE_INCOMPLETE_VARS for variables - to complete, not at current_scope->incomplete. All such - variables do need completion. - -2003-08-30 Richard Earnshaw - Nicolas Pitre - - * arm/lib1funcs.asm (RETCOND): Delete. - (RETLDM): New assembler macro. Use it for returning with ldm/ldr. - (ARM_LDIV0, THUMB_LDIV0): Collapse multiple definitions. - (__ARM_ARCH__): Move here from ieee754-?f.S. - (RET, RETc): Clean up definitions. - (DIV_FUNC_END): Renamed from FUNC_END. All uses changed. - (FUNC_END): New macro that marks the end of any function. - (ARM_FUNC_START): New macro that allows an assembler routine to be - implemented in ARM code even if a Thumb-only build. - Unconditionally include ieee754-?f.S. - * arm/ieee754-df.S: Delete macros moved to lib1funcs.asm. - Mark ends of functions. - Split into separate conditionally-compiled units. - Use RETLDM to return from routines. - * arm/ieee754-sf.S: Similarly. - * t-arm-elf (LIB1ASMFUNCS): Remove _ieee754_dp and _ieee754_sp. - Add _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi - _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 - _fixsfsi and _fixunssfsi. - - * arm/ieee754-df.S (__muldf3): Fix bug when result of a - multiplication underflows to zero. - (__adddf3): Fix bug when using VFP ordering on little-endian - processors. - (__fixdfsi): Use rrx to extract the carry into a register instead of - MRS instruction. Optimize later use of result. - * arm/ieee754-sf.S (__fixsfsi): Likewise. - (__fixunssfsi): Use a better sequence for handling negative-or-zero. - -2003-08-29 Richard Henderson - - * tree-optimize.c: New file. - * Makefile.in (OBJS-archive): Add tree-optimize.o. - (tree-optimize.o): New. - * c-decl.c (store_parm_decls): Use allocate_struct_function. - (finish_function): Don't free_after_parsing or free_after_compilation. - (set_save_expr_context): Move to tree-optimize.c. - (c_expand_body_1): Use tree_rest_of_compilation. - * c-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): New. - * objc/objc-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): New. - * c-objc-common.c (expand_deferred_fns): Don't emit unused inlines; - iterate until closure. - * langhooks-def.h (LANG_HOOKS_RTL_EXPAND_START, - LANG_HOOKS_RTL_EXPAND_STMT, LANG_HOOKS_RTL_EXPAND_END): New. - (LANG_HOOKS_RTL_EXPAND_INITIALIZER): New. - * langhooks.h (struct lang_hooks_for_rtl_expansion): New. - * toplev.h (tree_rest_of_compilation): Declare it. - -2003-08-29 Richard Henderson - - * function.h (struct function): Add rtl_inline_init, saved_for_inline. - * integrate.c (save_for_inline): Set saved_for_inline. - * c-semantics.c (genrtl_scope_stmt): Check it. - * toplev.c (wrapup_global_declarations): Check it. - (rest_of_handle_inlining): Set and check rtl_inline_init. - (rest_of_compilation): Remove out of date comment. - -2003-08-29 Richard Henderson - - * function.c (allocate_struct_function): New, split out of ... - (prepare_function_start, init_function_start): ... here. - * expr.c (init_expr): Use ggc_alloc_cleared. - * stmt.c (init_stmt_for_function): Likewise. - * tree.h (allocate_struct_function): Declare. - -2003-08-29 Nathanael Nerode - - * config.gcc: Don't use negated character class in shell case - clause. - -2003-08-29 Richard Henderson - - * function.h (struct function): Move function_frequency and - max_jumptable_ents before start of bit field members. - -2003-08-29 Richard Henderson - - * builtins.c (expand_builtin_constant_p): Check cse_not_expected here, - (fold_builtin_constant_p) ... not here. - -2003-08-29 Richard Henderson - - * c-tree.h (C_DECL_FILE_SCOPE): Move ... - * tree.h (DECL_FILE_SCOPE_P): ... here, and rename. - * c-decl.c, c-objc-common.c, c-typeck.c: Update to match. - -2003-08-29 Kaveh R. Ghazi - - * builtins.def: Fix typos. - (ATTR_MATHFN_FPROUNDING_STORE): New macro. - (BUILT_IN_FREXP, BUILT_IN_FREXPF, BUILT_IN_FREXPL, BUILT_IN_MODF, - BUILT_IN_MODFF, BUILT_IN_MODFL, BUILT_IN_REMQUO, BUILT_IN_REMQUOF, - BUILT_IN_REMQUOL, BUILT_IN_SINCOS, BUILT_IN_SINCOSF, - BUILT_IN_SINCOSL): Use ATTR_MATHFN_FPROUNDING_STORE. - - * builtins.def (BUILT_IN_ERFC, BUILT_IN_ERFCF, BUILT_IN_ERFCL): - Use ATTR_MATHFN_FPROUNDING_ERRNO. - -2003-08-29 Nathanael Nerode - - * config.gcc (i386-*-vsta): Fix obvious bogosity. - - * fixinc/inclhack.def: Remove special cases for unsupported - PTX 1 and PTX 2 (including i[34567]86-sequent-sysv3). - * fixinc/fixincl.x: Regenerate. - -2003-08-29 Mark Mitchell - - * Makefile.in (cpp.info): Just state dependencies. - (gcc.info): Likewise. - (gccint.info): Likewise. - (gccinstall.info): Likewise. - (cppinternals.info): Likewise. - (cpp.dvi): Likewise. - (gcc.dvi): Likewise. - (gccint.dvi): Likewise. - (gccinstall.dvi): Likewise. - (cppinternals.dvi): Likewise. - (gcov.1): Likewise. - (cpp.1): Likewise. - (gcc.1): Likewise. - (gfdl.7): Likewise. - (gpl.7): Likewise. - (fsf-funding.7): Likewise. - ($(objdir)/%.info): New pattern rule. - (%.dvi): Likewise. - -2003-08-29 Kelley Cook - - * Makefile.in (restage1): Pass BOOT_CFLAGS to recursive make. - (restage2): Likewise. - (restage3): Likewise. - (restage4): Likewise. - (restageprofile): Likewise. - (restagefeedback): Likewise. - (bubblestrap): Likewise. - -2003-08-29 Nathanael Nerode - - * config.gcc: Narrow unsupported target match to avoid clobbering - i?86-sequent-sysv4*. - -2003-08-29 Kaveh R. Ghazi - - * builtins.c (mathfn_built_in): Handle new math builtins. - -2003-08-28 Per Bothner - - Fix (hopefully temporary) for breakage caused by my 08-21 patch. - * cpplex.c (_cpp_get_fresh_line): Check for null buffer. - (_cpp_lex_buffer): Likewise. - * cpptrad.c (_cpp_read_logical_line_trad): Likewise. - -2003-08-28 Ulrich Weigand - - * config/s390/s390.md ("*mulsi3_sign"): New insn. - ("mulsidi3" expander, "mulsi_6432" insn): Remove, replace by ... - ("mulsidi3"): ... this new insn. - ("umulsidi3"): New insn. - ("divmoddi3", "divmodtidi3", "divmodtisi3"): Simplify by using - mixed-mode matching constraints. - ("udivmodsi4", "udivmoddisi3"): New insns. - ("udivsi3", "umodsi3"): Use only in ESA/390 mode. - -2003-08-28 Kaveh R. Ghazi - - * builtin-types.def (BT_INT_PTR, BT_FLOAT_PTR, BT_DOUBLE_PTR, - BT_LONGDOUBLE_PTR, BT_FN_FLOAT_FLOAT_FLOATPTR, - BT_FN_DOUBLE_DOUBLE_DOUBLEPTR, - BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLEPTR, - BT_FN_FLOAT_FLOAT_INTPTR, BT_FN_DOUBLE_DOUBLE_INTPTR, - BT_FN_LONGDOUBLE_LONGDOUBLE_INTPTR, - BT_FN_FLOAT_FLOAT_FLOAT_INTPTR, BT_FN_DOUBLE_DOUBLE_DOUBLE_INTPTR, - BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE_INTPTR, - BT_FN_VOID_FLOAT_FLOATPTR_FLOATPTR, - BT_FN_VOID_DOUBLE_DOUBLEPTR_DOUBLEPTR, - BT_FN_VOID_LONGDOUBLE_LONGDOUBLEPTR_LONGDOUBLEPTR): New. - * builtins.def (BUILT_IN_FREXP, BUILT_IN_FREXPF, BUILT_IN_FREXPL, - BUILT_IN_MODF, BUILT_IN_MODFF, BUILT_IN_MODFL, BUILT_IN_REMQUO, - BUILT_IN_REMQUOF, BUILT_IN_REMQUOL, BUILT_IN_SINCOS, - BUILT_IN_SINCOSF, BUILT_IN_SINCOSL): New. - * tree.c: Assign new type_nodes. - * tree.h (tree_index): Add TI_FLOAT_PTR_TYPE, TI_DOUBLE_PTR_TYPE, - TI_LONG_DOUBLE_PTR_TYPE, TI_INTEGER_PTR_TYPE. - (float_ptr_type_node, double_ptr_type_node, - long_double_ptr_type_node, integer_ptr_type_node): New type_nodes. - - * doc/extend.texi: Document new builtins. - -2003-08-28 Kaveh R. Ghazi - - * builtin-types.def (BT_FN_FLOAT_INT_FLOAT, - BT_FN_DOUBLE_INT_DOUBLE, BT_FN_LONGDOUBLE_INT_LONGDOUBLE): New. - - * builtins.def (BUILT_IN_ERF, BUILT_IN_ERFC, BUILT_IN_ERFCF, - BUILT_IN_ERFCL, BUILT_IN_ERFF, BUILT_IN_ERFL, BUILT_IN_GAMMA, - BUILT_IN_GAMMAF, BUILT_IN_GAMMAL, BUILT_IN_J0, BUILT_IN_J0F, - BUILT_IN_J0L, BUILT_IN_J1, BUILT_IN_J1F, BUILT_IN_J1L, - BUILT_IN_JN, BUILT_IN_JNF, BUILT_IN_JNL, BUILT_IN_LGAMMA, - BUILT_IN_LGAMMAF, BUILT_IN_LGAMMAL, BUILT_IN_SIGNIFICAND, - BUILT_IN_SIGNIFICANDF, BUILT_IN_SIGNIFICANDL, BUILT_IN_TGAMMA, - BUILT_IN_TGAMMAF, BUILT_IN_TGAMMAL, BUILT_IN_Y0, BUILT_IN_Y0F, - BUILT_IN_Y0L, BUILT_IN_Y1, BUILT_IN_Y1F, BUILT_IN_Y1L, - BUILT_IN_YN, BUILT_IN_YNF, BUILT_IN_YNL): New. - - * doc/extend.texi: Document new builtins. - -2003-08-28 Nathanael Nerode - - * fixinc/mkfixinc.sh: Remove special case code for unsupported - variants of i?86, powerpcle, and thumb. - * fixinc/mkfixinc.sh: Remove special case code for unsupported - arm and hppa variants. - -2003-08-28 Kaveh R. Ghazi - - * builtin-types.def (BT_FN_INT_FLOAT, BT_FN_INT_DOUBLE, - BT_FN_INT_LONGDOUBLE, BT_FN_LONG_FLOAT, BT_FN_LONG_DOUBLE, - BT_FN_LONG_LONGDOUBLE, BT_FN_LONGLONG_FLOAT, - BT_FN_LONGLONG_DOUBLE, BT_FN_LONGLONG_LONGDOUBLE, - BT_FN_FLOAT_FLOAT_LONGDOUBLE, BT_FN_DOUBLE_DOUBLE_LONGDOUBLE, - BT_FN_FLOAT_FLOAT_INT, BT_FN_DOUBLE_DOUBLE_INT, - BT_FN_LONGDOUBLE_LONGDOUBLE_INT, BT_FN_FLOAT_FLOAT_LONG, - BT_FN_DOUBLE_DOUBLE_LONG, BT_FN_LONGDOUBLE_LONGDOUBLE_LONG, - BT_FN_FLOAT_FLOAT_FLOAT_FLOAT, BT_FN_DOUBLE_DOUBLE_DOUBLE_DOUBLE, - BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE): New. - - * builtins.def (BUILT_IN_ACOS, BUILT_IN_ACOSF, BUILT_IN_ACOSH, - BUILT_IN_ACOSHF, BUILT_IN_ACOSHL, BUILT_IN_ACOSL, BUILT_IN_ASIN, - BUILT_IN_ASINF, BUILT_IN_ASINH, BUILT_IN_ASINHF, BUILT_IN_ASINHL, - BUILT_IN_ASINL, BUILT_IN_ATANH, BUILT_IN_ATANHF, BUILT_IN_ATANHL, - BUILT_IN_CBRT, BUILT_IN_CBRTF, BUILT_IN_CBRTL, BUILT_IN_COPYSIGN, - BUILT_IN_COPYSIGNF, BUILT_IN_COPYSIGNL, BUILT_IN_COSH, - BUILT_IN_COSHF, BUILT_IN_COSHL, BUILT_IN_DREM, BUILT_IN_DREMF, - BUILT_IN_DREML, BUILT_IN_EXP10, BUILT_IN_EXP10F, BUILT_IN_EXP10L, - BUILT_IN_EXP2, BUILT_IN_EXP2F, BUILT_IN_EXP2L, BUILT_IN_EXPM1, - BUILT_IN_EXPM1F, BUILT_IN_EXPM1L, BUILT_IN_FDIM, BUILT_IN_FDIMF, - BUILT_IN_FDIML, BUILT_IN_FMA, BUILT_IN_FMAF, BUILT_IN_FMAL, - BUILT_IN_FMAX, BUILT_IN_FMAXF, BUILT_IN_FMAXL, BUILT_IN_FMIN, - BUILT_IN_FMINF, BUILT_IN_FMINL, BUILT_IN_HYPOT, BUILT_IN_HYPOTF, - BUILT_IN_HYPOTL, BUILT_IN_ILOGB, BUILT_IN_ILOGBF, BUILT_IN_ILOGBL, - BUILT_IN_LDEXP, BUILT_IN_LDEXPF, BUILT_IN_LDEXPL, BUILT_IN_LLRINT, - BUILT_IN_LLRINTF, BUILT_IN_LLRINTL, BUILT_IN_LLROUND, - BUILT_IN_LLROUNDF, BUILT_IN_LLROUNDL, BUILT_IN_LOG10, - BUILT_IN_LOG10F, BUILT_IN_LOG10L, BUILT_IN_LOG1P, BUILT_IN_LOG1PF, - BUILT_IN_LOG1PL, BUILT_IN_LOG2, BUILT_IN_LOG2F, BUILT_IN_LOG2L, - BUILT_IN_LOGB, BUILT_IN_LOGBF, BUILT_IN_LOGBL, BUILT_IN_LRINT, - BUILT_IN_LRINTF, BUILT_IN_LRINTL, BUILT_IN_LROUND, - BUILT_IN_LROUNDF, BUILT_IN_LROUNDL, BUILT_IN_NEXTAFTER, - BUILT_IN_NEXTAFTERF, BUILT_IN_NEXTAFTERL, BUILT_IN_NEXTTOWARD, - BUILT_IN_NEXTTOWARDF, BUILT_IN_NEXTTOWARDL, BUILT_IN_POW10, - BUILT_IN_POW10F, BUILT_IN_POW10L, BUILT_IN_REMAINDER, - BUILT_IN_REMAINDERF, BUILT_IN_REMAINDERL, BUILT_IN_RINT, - BUILT_IN_RINTF, BUILT_IN_RINTL, BUILT_IN_SCALB, BUILT_IN_SCALBF, - BUILT_IN_SCALBL, BUILT_IN_SCALBLN, BUILT_IN_SCALBLNF, - BUILT_IN_SCALBLNL, BUILT_IN_SCALBN, BUILT_IN_SCALBNF, - BUILT_IN_SCALBNL, BUILT_IN_SINH, BUILT_IN_SINHF, BUILT_IN_SINHL, - BUILT_IN_TANH, BUILT_IN_TANHF, BUILT_IN_TANHL): New. - - * doc/extend.texi: Document new builtins. - -2003-08-28 Ulrich Weigand - - * config/s390/s390.c (legitmate_constant_p): Use LARL on - zSeries machines even in 31-bit addressing mode. - (legitimate_reload_constant_p): Likewise. - (legitimize_pic_address): Likewise. - (legitimize_tls_address): Likewise. - (s390_split_branches): Likewise. - (s390_dump_pool): Likewise. - (s390_mainpool_finish): Likewise. - (s390_chunkify_start): Likewise. - (s390_select_rtx_section): Likewise. - * config/s390/s390.md ("doloop_si"): Likewise. - ("pool_start_31", "pool_end_31"): Likewise. - ("pool_start_64", "pool_end_64"): Likewise. - ("main_base_31_small", "main_base_31_large"): Likewise. - ("main_base_64"): Likewise. - ("reload_base_31", "reload_base_64"): Likewise. - ("*movsi_larl"): New insn. - ("cjump", "icjump"): Use long branches on zSeries machines. - ("jump"): Likewise. - ("call"): Use BRASL on zSeries machines. - ("call_value", "call_value_tls"): Likewise. - ("brasl", "bras", "basr_64", "basr_31", "bas_64", "bas_31"): Remove - and replace by ... - ("*bras", "*brasl", "*basr") ... these new insns. - ("brasl_r", "bras_r", "basr_64_r", "basr_31_r", "bas_64_r", - "bas_31_r"): Remove and replace by ... - ("*bras_r", "*brasl_r", "*basr_r") ... these new insns. - ("brasl_tls", "bras_tls", "basr_64_tls", "basr_31_tls", - "bas_64_tls", "bas_31_tls"): Remove and replace by ... - ("*bras_tls", "*brasl_tls", "*basr_tls") ... these new insns. - ("*return_si", "*return_di"): Remove and replace by ... - ("*return"): ... this new insn. - ("rotlsi3"): Allow on zSeries machines. - - * config/s390/s390.c (legitimize_reload_constant_p): Use - LL/LH type instructions in z/Architecture mode. - * config/s390/s390.md ("*movsi_lli"): Likewise. - ("*andsi3_ni", "*andhi3_ni", "*andqi3_ni"): Likewise. - ("*iorsi3_ni", "*iorhi3_ni", "*iorqi3_ni"): Likewise. - ("*extendqisi2"): Use LB in z/Architecture mode. - ("*zero_extendqisi2_64", "*zero_extendqisi2_31"): Use LLGC in - z/Architecture mode. - ("zero_extendqihi2", "*zero_extendqihi2_64", "*zero_extendqihi2_31"): - Likewise. - - * config/s390/s390.md ("*tmdi_ext"): Allow in both 64-bit - and 31-bit mode. - ("ptr_extend"): Allow only in 64-bit mode. - -2003-08-27 Daniel Jacobowitz - - * gcc.c (STANDARD_EXEC_PREFIX, STANDARD_STARTFILE_PREFIX) - (TOOLDIR_BASE_PREFIX, STANDARD_BINDIR_PREFIX): Remove unnecessary - definitions. - (main): Only use standard_startfile_prefix if native. - * doc/tm.texi (STANDARD_STARTFILE_PREFIX): Update. - -2003-08-27 Per Bothner - - * cpperror.c (print_location): Don't check for !pfile->buffer. That - test fails following my 08-21 change, and it seems unnecessary anyway. - (cpp_error): Likewise. - -2003-08-27 Jason Merrill - - * real.c (do_multiply): Initialize with memset. - -2003-08-27 Zdenek Dvorak - - * gcov.c (typedef struct arc_info): New field cs_count. - (accumulate_line_counts): Find cycles correctly. - -2003-08-27 Ulrich Weigand - - * config/s390/s390.c (struct machine_function): Remove member - literal_pool_label. - (s390_optimize_prolog): Replace TEMP_REG argument with - TEMP_USED and BASE_USED. Do not check get_pool_size (). - (general_s_operand): Accept all immediates before reload if - ALLOW_IMMEDIATE. If not ALLOW_IMMEDIATE, reject literal pool - references. - (s390_output_symbolic_const): Remove UNSPEC_LTREL_OFFSET handling. - (find_constant_pool_ref): Ignore UNSPECV_POOL_ENTRY insns. - (s390_alloc_pool): New function. - (s390_new_pool): Call it. - (s390_dump_pool): Add REMOTE_LABEL argument. - (s390_chunkify_start): Add BASE_REG argument. Do not check - get_pool_size (). - (s390_chunkify_finish): Add BASE_REG argument. Adapt - s390_dump_pool call. - (s390_pool_count, s390_nr_constants): Remove. - (s390_output_constant_pool): Remove. - (s390_mainpool_start): New function. - (s390_mainpool_finish): New function. - (s390_mainpool_cancel): New function. - (s390_reorg): Implement main literal pool handling. - (s390_emit_prologue): Emit main_pool placeholder instead of - literal_pool_31 / literal_pool_64 insns. - * config/s390/s390.h (s390_pool_count, s390_nr_constants): Remove. - (ASM_OUTPUT_POOL_PROLOGUE, ASM_OUTPUT_SPECIAL_POOL_ENTRY): Remove. - * config/s390/s390.md (UNSPEC_MAIN_BASE): New symbolic constant. - ("main_base_31_small", "main_base_31_large"): New insns. - ("main_base_64", "main_pool"): New insns. - ("literal_pool_31", "literal_pool_64"): Remove. - -2003-08-27 Nathanael Nerode - - * fixinc/inclhack.def (ptx_netswap): New disabled fix, ported from - fixinc.ptx. - * fixinc/inclhack.def (undefine_null): Don't generate \r characters. - Prettify a little. - * fixinc/fixincl.x: Regenerate. - -2003-08-27 Richard Earnshaw - - * lib1funcs.asm (L_ieee754_sp): New. Include ieee754-sf.S. - (L_ieee754_dp): New. Include ieee754-df.S. - * arm/ieee754-sf.S: Rework to allow interworking, calling from Thumb, - and compilation in apcs-26 mode. - * arm/ieee754-df.S: Likewise. - * t-arm-elf (DPBIT, FPBIT, fp-bit.c dp-bit.c): Delete rules - (LIB1ASMFUNCS): Add _ieee754_sp and _ieee754_dp targets. - -2003-08-27 Nicolas Pitre - - * arm/ieee754-sf.S: New. - * arm/ieee754-df.S: New. - -2003-08-27 Jakub Jelinek - - * builtins.c (expand_builtin_expect_jump): Save pending_stack_adjust - and restore it if returning NULL. - -2003-08-27 Richard Sandiford - - * calls.c (initialize_argument_information): If an argument has no - stack space associated with it, and BLOCK_REG_PADDING is defined, - use it to decide at which end the argument should be padded. - * function.c (assign_parms): Allocate BLKmode stack slots. - * config/mips/mips-protos.h (mips_pad_arg_upward): Declare. - (mips_pad_reg_upward): Declare. - * config/mips/mips.h (PAD_VARARGS_DOWN): Use FUNCTION_ARG_PADDING. - (CUMULATIVE_ARGS): Remove num_adjusts and adjusts. - (FUNCTION_ARG_PADDING): Use mips_pad_arg_upward. - (BLOCK_REG_PADDING): Use mips_pad_reg_upward. - * config/mips/mips.c (struct mips_arg_info): Remove struct_p. - (mips_expand_call): Remove code for generating structure shifts. - (mips_arg_info): Don't set struct_p. Don't set fpr_p for non-float - types unless using the EABI. - (function_arg_advance): Don't generate shift instructions. - (function_arg): Don't return them. Don't short-circuit the - check for double structure chunks for DFmode arguments. - (mips_pad_arg_upward, mips_pad_reg_upward): New functions. - (mips_expand_prologue): Remove code to emit structure shifts. - * config/mips/irix6-libc-compat.c: Remove workarounds for buggy - structure passing (inet_ntoa, inet_lnaof, inet_netof). Update - comments to say that only structure returns are a problem. - -2003-08-26 Nathanael Nerode - - * fixinc/tests/base/string.h, fixinc/tests/base/sys/regset.h: - Fix to match produced versions. - * fixinc/inclhack.def (longlong_t): New disabled test, ported - from fixinc.svr4. - * fixinc/inclhack.def (ptx_pwd_h): New disabled fix, ported - from fixinc.ptx. - * fixinc/inclhack.def (ptx_sys_mc_param_h): New disabled fix, - ported from fixinc.ptx. - -2003-08-26 Per Bothner - - * cpplib.h (struct cpp_token): Change type of field line to fileline. - (cpp_error_with_line): Use fileline for appropriate parameter. - * cpphash.h (struct cpp_macro): Change type of field line to fileline. - (struct cpp_reader): Likewise for fields line and directive_line. - (_cpp_begin_message): Use fileline for appropriate parameter. - * cpperror.c (print_location, _cpp_begin_message, cpp_error_with_line, - cpp_error): Use fileline for appropriate parameters and variables. - (print_location): New local lin, since it is not a fileline. - -2003-08-26 Roger Sayle - - PR middle-end/12002 - * tree.h (SCALAR_FLOAT_TYPE_P, COMPLEX_FLOAT_TYPE_P): New macros. - (FLOAT_TYPE_P): Define in terms of these two new macros. - * fold-const.c (fold ): Don't convert x+x into x*2.0 - for complex floating point types. - -2003-08-26 Ulrich Weigand - - * config/s390/s390.c (emit_prologue): Don't check literal pool size. - * config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Call - s390_output_pool_entry. - -2003-08-26 Nathanael Nerode - - * fixinc/inclhack.def (svr4_preproc_lint_on, - svr4_preproc_lint_off, svr4_preproc_machine): New disabled - fixes, ported from fixinc.svr4. - -2003-08-26 Mark Mitchell - - * doc/install.texi (Prerequisites): Mention GNU make requirement. - - * Makefile.in (AR_FOR_TARGET): Export it. - (AR_CREATE_FOR_TARGET): Likewise. - (AR_FLAGS_FOR_TARGET): Likewise. - (AR_EXTRACT_FOR_TARGET): Likewise. - (AWK): Likewise. - (BUILD_PREFIX): Likewise. - (BUILD_PREFIX_1): Likewise. - (DESTDIR): Likewise. - (GCC_FOR_TARGET): Likewise. - (INCLUDES): Likewise. - (INSTALL_DATA): Likewise. - (LIB1ASMSRC): Likewise. - (LIBGCC2_CFLAGS): Likewise. - (MACHMODE_H): Likewise. - (NM_FOR_TARGET): Likewise. - (RANLIB_FOR_TARGET): Likewise. - (libsubdir): Likewise. - (slibdir): Likewise. - (ORDINARY_FLAGS_TO_PASS): Remove stuff that we're - exporting. - (libgcc.a): Don't pass them here. - (stmp-multilib): Or here. - (install-libgcc): Or here. - (install-multilib): Or here. - (POSTSTAGE1_FLAGS_TO_PASS): Or here. - (stage1_build): Or here. - -2003-08-26 Andreas Krebbel - - * config/s390/s390.md ("*llgt_sisi", "*llgt_sisi_split", "*llgt_didi", - "*llgt_didi_split", "*llgt_sidi", "*llgt_sidi_split"): New insns. - -2003-08-26 Andreas Krebbel - - * config/s390/s390.md ("*fmadddf", "*fmsubdf", - "*fmaddsf", "*fmsubsf"): New insns. - -2003-08-26 Roger Sayle - - * fold-const.c (fold ): Optimize (C1/X)*C2 into - (C1*C2)/X when unsafe math optimizations are allowed. - (fold ): Optimize C1/(X*C2) into (C1/C2)/X with unsafe - math optimizations. Minor code clean-ups. Recursively call - fold when constructing sub-expressions. - -2003-08-26 Roger Sayle - - * builtins.c (fold_builtin_bitop): New function to perform constant - folding of ffs, clz, ctz, popcount and parity builtin functions - and their long and long long variants (such as ffsl and ffsll). - (fold_builtin): fold_builtin_bitop when appropriate. - * simplify-rtx.c (simplify_unary_operation): Honor both - CLZ_DEFINED_VALUE_AT_ZERO and CTZ_DEFINED_VALUE_AT_ZERO when - evaluating clz and ctz at compile-time, for operands wider - than HOST_WIDE_INT. - -2003-08-26 Nathan Sidwell - - * builtins.c (build_function_call_expr): Don't set - TREE_SIDE_EFFECTS here. - * expr.c (emit_block_move_via_libcall): Likewise. - (clear_storage_via_libcall): Likewise. - * tree.c (build): Set TREE_SIDE_EFFECTS for non-const, non-pure - CALL_EXPRs. - - * gcse.c (is_too_expensive): New function. - (gcse_main, delete_null_pointer_checks, bypass_jumps): Use it. - -2003-08-25 Zack Weinberg - - * config.gcc (hppa*-*-hpux11*, ia64*-*-hpux*): Remove - commented-out logic to use DCE threads (if present), add - support for POSIX threads. - * config/ia64/hpux.h: Define CPP_SPEC to set appropriate - #defines for -pthread. Add -lpthread to LIB_SPEC when - -pthread. In both cases take -mt as a synonym for -pthread - for acc compatibility. - Define GTHREAD_USE_WEAK to 0. - * config/pa/pa-hpux11.h: Likewise for CPP_SPEC and LIB_SPEC. - Remove old logic for DCE threads from LIB_SPEC. - * config/pa/pa64-hpux.h: Define GTHREAD_USE_WEAK to 0. - -2003-08-25 Roger Sayle - - * builtins.c (expand_builtin_mathfn): Rearrange so that we only - return 0 for invalid argument types. Instead drop through to a - call of expand_call at the bottom of function. If op is SQRT, - try attaching a SQRT rtx as the REQ_EQUAL note of the libcall. - -2003-08-25 Richard Henderson - - * config/ia64/ia64.c (ia64_expand_tls_address): Properly truncate - result when op0 is SImode. - -2003-08-25 Nathanael Nerode - - * fixinc/inclhack.def (svr4_sighandler_type): New fix, ported - from fixinc.svr4. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/sys/signal.h: Regenerate. - -2003-08-25 Ulrich Weigand - - * combine.c (simplify_comparison): Re-enable widening of comparisons - with non-paradoxical subregs of non-REG expressions. - -2003-08-25 Ulrich Weigand - - * combine.c (distribute_notes): Handle REG_ALWAYS_RETURN. - -2003-08-25 Ulrich Weigand - - * combine.c (combine_simplify_rtx): Fix RTL sharing bug. - -2003-08-25 Gabriel Dos Reis - - * pretty-print.h (pp_maybe_newline_and_indent): New macro. - * c-pretty-print.h (c_pretty_printer): Now typedef to the - structure. Be consistent with pretty-print.h abd cxx-pretty-print.h - (struct c_pretty_print_info): Document. Add new fields. - (pp_type_specifier_seq): Rename from pp_c_type_specifier. - (pp_direct_abstract_declarator): New macro. - (pp_ptr_operator): Likewise. - (pp_simple_type_specifier): Likewise. - (pp_expression): Likewise. - (pp_parameter_list): Rename from pp_parameter_declaration. - * c-pretty-print.c (pp_c_whitespace): Now a function. - (pp_c_left_paren): Likewise. - (pp_c_right_paren): Likewise. - (pp_c_dot): Likewise. - (pp_c_ampersand): Likewise. - (pp_c_arrow): Likewise. - (pp_c_semicolon): Likewise. - (pp_c_type_cast): New function. - (pp_c_space_for_pointer_operator): Likewise. - (pp_c_call_argument_list): Likewise. - (pp_c_cv_qualifier): Adjust prototype. - (pp_c_type_qualifier_list): Likewise. - (pp_c_pointer): Likewise. Handle REFERENCE_TYPE here. - (pp_c_type_specifier): Rename from pp_c_simple_type_specifier. - Adjust to follow standard grammar. - (pp_c_specifier_qualifier_list): Adjusr prototype. Handle - REFERENCE_TYPE. Tidy. - (pp_c_parameter_type_list): Adjust prototype. Tidy. - (pp_c_parameter_declaration): Remove. - (pp_c_abstract_declarator): Adjust prototype. - (pp_c_direct_abstract_declarator): Likewise. - (pp_c_type_id): Likewise. - (pp_c_storage_class_specifier): Likewise. - (pp_c_function_specifier): Likewise. - (pp_c_declaration_specifiers): Likewise. - (pp_c_direct_declarator): Likewise. - (pp_c_declarator): Likewise. - (pp_c_declarator): Likewise. - (pp_c_declaration): Likewise. - (pp_c_attributes): Likewise. Tidy. - (pp_c_function_definition): Adjust prototype. - (pp_c_char): Likewise. - (pp_c_string_literal): Likewise. - (pp_c_integer_constant): Likewise. - (pp_c_character_constant): Likewise. - (pp_c_bool_constant): Likewise. - (pp_c_enumeration_constant): Likewise. - (pp_c_floating_constant): Likewise. - (pp_c_constant): Likewise. - (pp_c_identifier): Likewise. - (pp_c_primary_expression): Likewise. Remove TARGET_EXPR case. Tidy. - (pp_c_initializer): Adjust prototype. - (pp_c_init_declarator): Likewise. - (pp_c_initializer_list): Likewise. - (pp_c_id_expression): Likewise. - (pp_c_postfix_expression): Likewise. - (pp_c_expression_list): Likewise. - (pp_c_unary_expression): Likewise. - (pp_c_cast_expression): Likewise. - (pp_c_multiplicative_expression): Likewise. - (pp_c_additive_expression): Likewise. - (pp_c_shift_expression): Likewise. - (pp_c_relational_expression): Likewise. - (pp_c_equality_expression): Likewise. - (pp_c_and_expression): Likewise. - (pp_c_exclusive_or_expression): Likewise. - (pp_c_inclusive_or_expression): Likewise. - (pp_c_logical_and_expression): Likewise. - (pp_c_logical_or_expression): Likewise. - (pp_c_conditional_expression): Likewise. - (pp_c_assignment_expression): Likewise. - (pp_c_expression): Likewise. Tidy. - (pp_c_statement): Likewise. Document. - (pp_c_pretty_printer_init): Adjust prototype. Tidy. - - * c-lang.c (c_initialize_diagnostics): Update. - * c-common.h (strip_pointer_operator): Declare. - * c-common.c (strip_pointer_operator): Define. - -2003-08-25 Mark Mitchell - - PR c++/8795 - * tree.h (build_method_type_directly): Declare. - * c-common.c (handle_vector_size_attributes): Handle METHOD_TYPEs. - (vector_size_helper): Likewise. - * tree.c (build_method_type_directly): New function. - (build_method_type): Use it. - -2003-08-24 Richard Henderson - - * config/i386.i386.c (ix86_return_in_memory): Reformat. Return true - for 16-byte vector modes if sse not enabled; warn for abi change. - (ix86_value_regno): Only return xmm0 for 16-byte vector types. - -2003-08-24 Kazu Hirata - - * rtlanal.c (may_trap_p): Simplify an integer comparison. - -2003-08-24 Nathanael Nerode - - * fixinc/inclhack.def (AAB_svr4_replace_byteorder): Enhance - comment. Enable for DYNIX/ptx systems (when they switch to - regular fixincludes). - * fixinc/fixincl.x: Regenerate. - -2003-08-23 Jason Eckhardt - - * config/i860/t-i860: New. - * config.gcc (i860-*-sysv4*): Add t-i860 to tmake_file. - -2003-08-23 Jakub Jelinek - - * c-decl.c (pushdecl): Only put decls which finish_struct will do - something about onto incomplete chain. - (finish_struct): If not removing type from incomplete - list, update prev. - -2003-08-20 Jan Hubicka - - PR target/11369 - * i386.c (ix86_expand_carry_flag_compare): Validate operand. - - PR target/11031 - * i386.c (const_0_to_3_operand, const_0_to_7_operand, - const_0_to_15_operand, const_0_to_255_operand): New predicates. - * i386.h (PREDICATE_CODES): Add these. - * i386.c (pinsrw and pextrw patterns): Use them. - - PR target/10984 - * i386.c (ix86_expand_binop_builtin): Behave sanely for VOIDmodes. - - PR target/8869 - * expr.c (convert_modes): Deal properly with integer to vector - constant conversion. - - PR target/8871 - * i386.md (zero_extendsidi2*): Add MMX and SSE alternatives. - -2003-08-23 Ulrich Weigand - - * config/s390/s390.h (LOAD_EXTEND_OP): Remove. - * config/s390/s390.md ("movhi"): New expander; old insn renamed to ... - ("*movhi"): ... this. - ("movqi", "*movqi"): Likewise. - ("movqi_64"): Remove. - ("*zero_extendhisi2_31"): Change predicate to s_operand. - -2003-08-23 Dale Johannesen - * calls.c (emit_library_call_value_1): Fix obvious errors in - arguments to emit_group_store. - -2003-08-23 Jason Eckhardt - - * calls.c (emit_library_call_value_1): Remove code related - to LIBGCC_NEEDS_DOUBLE. - * config/stormy16/stormy16.h: Remove mention of LIBGCC_NEEDS_DOUBLE. - * doc/tm.texi: Likewise. - * system.h: Poison the LIBGCC_NEEDS_DOUBLE macro. - -2003-08-23 Richard Sandiford - - * config/mips/linux64.h (STARTFILE_PREFIX_SPEC): Remove. - -2003-08-23 Richard Sandiford - - * config/mips/mips.c (mips_setup_incoming_varargs): Handle o32 and o64 - as well. Put memory references in the varargs alias set. - (mips_expand_prologue): Remove varargs handling from here. - -2003-08-23 Ulrich Weigand - - * config/s390/s390.c (s390_expand_movstr, s390_expand_clrstr, - s390_expand_cmpmem, s390_output_constant_pool, s390_build_va_list, - s390_function_profiler, s390_output_mi_thunk): Use ISO C syntax - for function pointer calls. - * config/s390/s390.md ("*negdi2_31"): Likewise. - -2003-08-23 Roger Sayle - - * combine.c (apply_distributive_law): Correct comment. - -2003-08-23 Jason Eckhardt - - * config/i860/i860.h: Remove comment mentioning LIBGCC_NEEDS_DOUBLE. - -2003-08-22 Jason Eckhardt - - * config/i860/i860.c (i860_build_va_list): Create the va_decl - declaration. Document the va_list structure. - (i860_va_start): Initialize the va_list structure. - (i860_va_arg): Rewrite completely. - * config/i860/i860.h (LIBGCC_NEEDS_DOUBLE): Don't define. - * config/i860/varargs.asm: Do not allocate or initialize - a va_list. Return the address of the register save area. - -2003-08-22 Kazu Hirata - - * config/iq2000/iq2000.c: Fix comment typos. - * config/iq2000/iq2000.md: Likewise. - -2003-08-22 Kazu Hirata - - * config/iq2000/iq2000.c: Follow spelling conventions. - * config/iq2000/iq2000.h: Likewise. - * config/mn10300/mn10300.c: Likewise. - -2003-08-22 Jason Eckhardt - - * config/i860/i860.c (output_move_double): Don't set latehalf - to zero for CONST_INT (since it could be, e.g., -1). - - * config/i860/i860.h (REMSI3_LIBCALL): Replace this macro... - (MODSI3_LIBCALL): ...with this one. - (UREMSI3_LIBCALL): Replace this macro... - (UMODSI3_LIBCALL): ...with this one. - -2003-08-22 Jason Eckhardt - - * config/i860/i860-protos.h (output_delay_insn): Remove prototype. - (output_delayed_branch): Remove prototype. - (single_insn_src_p): Remove prototype. - * config/i860/i860.c (single_insn_src_p): Remove function. - (output_delayed_branch): Remove function. - (output_delay_insn): Remove function. - (va_start): Remove unconditional test and dead code, re-format. - Fix coding style and spelling problems in various comments. - * config/i860/i860.md (UNSPECV_BLOCKAGE): Define constant... - (blockage pattern): ...and use it here. - (all define_peephole patterns related to delayed branches): Remove. - Fix coding style and spelling problems in various comments. - -2003-08-22 Jason Eckhardt - - * config/i860/i860.c: Replace all occurrences of 'GNU CC' with 'GCC'. - Remove all uses of the PARAMS macro. Remove superflous prototypes. - Convert all function definitions from traditional to ISO C90 syntax. - * config/i860/i860-protos.h: Replace all occurrences of 'GNU CC' - with 'GCC'. Remove all uses of the PARAMS macro. - * config/i860/i860.h: Replace all occurrences of 'GNU CC' with 'GCC'. - * config/i860/i860.md: Likewise. - * config/i860/sysv4.h: Likewise. - * config/i860/varargs.asm: Likewise. - -2003-08-22 Jason Eckhardt - - * config/i860/i860-protos.h (i860_va_start): Remove 'stdarg_p' - argument. - (tdesc_section): Add prototype. - Update copyright dates. - * config/i860/i860.c: Include coretypes.h, tm.h, and toplev.h. - (TARGET_ASM_FUNCTION_PROLOGUE): Move definition to end of file. - (TARGET_ASM_FUNCTION_EPILOGUE): Likewise. - (targetm): Likewise. - (i860_output_function_prologue): Substitute HOST_WIDE_INT_PRINT_DEC - for '%d' where necessary. - (i860_va_start): Remove 'stdarg_p' argument. Make conditional checks - on 'stdarg_p' unconditional. Divide current_function_args_info.ints - by UNITS_PER_WORD when referencing (likewise for .floats). - (I860_SVR4_VARARGS): Rename... - (I860_SVR4_VA_LIST): ...to this. - Call build() with 't' rather than 'field'. - (i860_rtx_costs): New function. - (TARGET_RTX_COSTS): Define. - (i860_internal_label): New function. - (TARGET_ASM_INTERNAL_LABEL): Define. - (i860_file_start): New function. - Update copyright dates. - * config/i860/i860.h (CPP_PREDEFINES): Remove. - (TARGET_CPU_CPP_BUILTINS): Define. - (EXPAND_BUILTIN_VA_START): Remove 'stdarg' argument. - (CONST_COSTS): Remove (and move code to i860_rtx_costs). - (ASM_FILE_START): Remove. - (ASM_FILE_START_1): Remove. - (ASM_GLOBALIZE_LABEL): Remove. - (ASM_OUTPUT_INTERNAL_LABEL): Remove. - (ASM_OUTPUT_CASE_LABEL): Replace call of ASM_OUTPUT_INTERNAL_LABEL - with targetm.asm_out.internal_label. - Update copyright dates. - * config/i860/sysv4.h (USER_LABEL_PREFIX): Define. - (CPP_PREDEFINES): Remove. - (TARGET_OS_CPP_BUILTINS): Define. - (GLOBAL_ASM_OP): Define. - (ASM_FILE_START): Remove. - (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define. - (TARGET_ASM_FILE_START): Define. - Update copyright dates. - -2003-08-22 Jason Eckhardt - - * gcc/config.gcc (i860-*-sysv4*): Add target. - * config/i860/i860-protos.h: New. - * config/i860/i860.c: New. - * config/i860/i860.h: New. - * config/i860/i860.md: New. - * config/i860/sysv4.h: New. - * config/i860/varargs.asm: New. - * config/i860/x-sysv4: New. - -2003-08-22 Jason Eckhardt - - * config/pa/pa.c: Replace 'GNU CC' with 'GCC'. - Remove all uses of PARAMS macro. - Convert all function definitions to ISO C90 syntax. - * config/pa/elf.h: Replace 'GNU CC' with 'GCC'. - * config/pa/fptr.c: Likewise. - * config/pa/lib2funcs.asm: Likewise. - * config/pa/long_double.h: Likewise. - * config/pa/milli64.S: Likewise. - * config/pa/pa-64.h: Likewise. - * config/pa/pa-hpux.h: Likewise. - * config/pa/pa-hpux10.h: Likewise. - * config/pa/pa-hpux11.h: Likewise. - * config/pa/pa-linux.h: Likewise. - * config/pa/pa-modes.def: Likewise. - * config/pa/pa-osf.h: Likewise. - * config/pa/pa-pro-end.h: Likewise. - * config/pa/pa.md: Likewise. - * config/pa/pa32-linux.h: Likewise. - * config/pa/pa64-linux.h: Likewise. - * config/pa/pa64-hpux.h: Likewise. - * config/pa/pa64-regs.h: Likewise. - * config/pa/quadlib.c: Likewise. - * config/pa/rtems.h: Likewise. - * config/pa/pa-protos.h: Replace 'GNU CC' with 'GCC' and remove - all uses of the PARAMS macro. - * config/pa/pa.h: Likewise. - * config/pa/som.h: Likewise. - - * config/iq2000/iq2000.c: Replace 'GNU CC' with 'GCC'. - Remove all uses of PARAMS macro. - Convert all function definitions to ISO C90 syntax. - * config/iq2000-protos.h: Replace 'GNU CC' with 'GCC'. - Remove all uses of PARAMS macro. - * config/iq2000.h: Remove all uses of PARAMS macro. - * config/iq2000/iq2000.md: Replace 'GNU CC' with 'GCC'. - -2003-08-23 Ulrich Weigand - - * config/s390/s390-protos.h (s390_output_pool_entry): Declare. - * config/s390/s390.c (gen_consttable): Remove. - (s390_dump_pool): Use UNSPECV_POOL_ENTRY for pool entry insns. - (s390_output_pool_entry): New function. - * config/s390/s390.md (UNSPECV_POOL_QI, UNSPECV_POOL_HI, - UNSPECV_POOL_SI, UNSPECV_POOL_DI, UNSPECV_POOL_TI, - UNSPECV_POOL_SF, UNSPECV_POOL_DF): Remove, replace by ... - (UNSPECV_POOL_ENTRY): ... this new constant. - ("consttable_qi", "consttable_hi", "consttable_si", "consttable_di", - "consttable_ti", "consttable_sf", "consttable_df"): Remove ... - ("*pool_entry"): ... and replace by this new insn. - ("literal_pool_31"): Do not emit anchor label if pool empty. - - * config/s390/s390.c (struct machine_function): Add save_return_addr_p. - (s390_optimize_prolog): Save RETURN_REGNUM if save_return_addr_p. - (s390_fixup_clobbered_return_reg): Remove. - (s390_reorg): Don't call s390_fixup_clobbered_return_reg. - (s390_return_addr_rtx): Always retrieve return address from save area - slot. Use save_return_addr_p to force slot to be filled. - (s390_emit_prologue): Remove has_hard_reg_initial_val test. - -2003-08-22 Chris Demetriou - - * config/mips/mips.h (MASK_FIX_SB1, TARGET_FIX_SB1): New defines. - (TARGET_SWITCHES): Add -mfix-sb1 and -mno-fix-sb1. - * config/mips/mips.md (divdf3, divsf3, sqrtdf2, sqrtsf2): Work - around SB-1 errata if TARGET_FIX_SB1 is set. - (recip.d insn, recip.s insn, rsqrt.d insn, rsqrt.s insn): Likewise. - * doc/invoke.texi: Document MIPS -mfix-sb1 and -mno-fix-sb1. - -2003-08-22 Roger Sayle - - * hashtable.c (ht_expand): Avoid calculating rehash for the common - case that the first probe hits an empty hash table slot. - -2003-08-22 Mark Mitchell - - * config/ia64/hpux.h (SUPPORTS_INIT_PRIORITY): Define to 0. - -2003-08-22 Mark Mitchell - - * config/ia64/ia64.md (*ptr_extend_plus_1): Rename to ... - (ptr_extend_plus_imm): ... this. - * config/ia64/ia64.c (addp4_optimize_ok): Do not disable addp4 - optimization in C++. - (ia64_output_mi_thunk): Support ILP32 mode. - -2003-08-22 Bernardo Innocenti - - * gcc/config/m68k/m68k.c (m68k_coff_asm_named_section): remove unused - function. - * gcc/config/m68k/m68k.c (-m68k_svr3_asm_out_constructor): likewise. - -2003-08-22 Kazu Hirata - - * config/i386/i386.c (const_int_1_operand): Simplify an - integer comparison. - -2003-08-22 Alan Modra - - * config/fp-bit.c: Specify config/ dir for include of fp-bit.h. - * config/rs6000/ppc64-fp.c: Likewise. - -2003-08-22 Kazu Hirata - - * cfgcleanup.c: Fix comment typos. - * emit-rtl.c: Likewise. - * optabs.c: Likewise. - * ra-build.c: Likewise. - * rtlanal.c: Likewise. - * tree.h: Likewise. - -2003-08-22 Kazu Hirata - - * c-decl.c: Fix comment formatting. - * cfgrtl.c: Likewise. - * combine.c: Likewise. - * convert.c: Likewise. - * dominance.c: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * expmed.c: Likewise. - * fold-const.c: Likewise. - * gcov.c: Likewise. - * genattrtab.c: Likewise. - * ggc-common.c: Likewise. - * mips-tfile.c: Likewise. - * regmove.c: Likewise. - -2003-08-22 Kazu Hirata - - * builtin-attrs.def: Fix comment formatting. - * c-pretty-print.c: Likewise. - * diagnostic.h: Likewise. - * langhooks.h: Likewise. - * recog.c: Likewise. - * simplify-rtx.c: Likewise. - * tree.def: Likewise. - -2003-08-22 Bernardo Innocenti - - * config/m68k/m68k-protos.h: Convert to ISO C90. - * config/m68k/m68k.c: Likewise. - -2003-08-21 Bernardo Innocenti - Paul Dale - Peter Barada - - * config/m68k/m68k.c (m68k_rtx_costs): Adjust mul/div costs for - ColdFire cores. - -2003-08-21 Zack Weinberg - - * Makefile.in (INCLUDES): Remove -I$(srcdir)/config. - * config.gcc (*-*-openbsd): Don't set tm_file. - (alpha*-*-openbsd, arm*-*-coff*, arm*-wince-pe*, - arm-*-pe*, avr-*-*, h8300-*-rtems*, h8300-*-elf*, - h8300-*-*, hppa*-*-osf*, hppa*-*-bsd*, hppa*-*-hpux*, - i370-*-opened*, i370-*-mvs*, i370-*-linux*, i?86-*-openbsd*, - i?86-*-lynxos, i?86-*-nto-qnx*, iq2000*-*-elf*, m68000-hp-hpux*, - m68k-hp-hpux*, m68k-*-aout*, m68k-*-coff*, m68020-*-elf*, - m68k-*-elf*, m68k*-*-netbsd*, m68k*-*-openbsd*, m68k-*-sysv4*, - m68k-*-linux*, m68k-*-rtems*, mcore-*-pe*, mips*-*-netbsd*, - mips*-*-openbsd*, rs6000-*-lynxos*, sh*-*-elf*, sh*-*-ka, - sh-*-rtemself, sparc-*-openbsd*, strongarm-*-pe, vax-*-openbsd*, - xscale-*-coff): Use explicit and complete lists of target headers - to include. Move definitions to tm_defines where appropriate. - (hppa*-*-openbsd*, powerpc-*-openbsd*): Comment out stanza for - not-yet-contributed configuration. - - * config/lynx.h, config/alpha/openbsd.h, config/arm/coff.h - * config/avr/avr.h, config/frv/frv.h, config/h8300/elf.h - * config/i370/linux.h, config/i370/mvs.h, config/i370/oe.h - * config/i386/nto.h, config/iq2000/iq2000.h, - * config/m68k/coff.h, config/m68k/hp310.h, config/m68k/hp320.h - * config/m68k/linux.h, config/m68k/m68k-aout.h - * config/m68k/m68k-none.h, config/m68k/m68kv4.h - * config/m68k/netbsd.h, config/m68k/openbsd.h - * config/m68k/sgs.h, config/mcore/mcore-pe.h, - * config/mips/netbsd.h, config/mips/openbsd.h, config/pa/pa.h, - * config/rs6000/lynx.h, config/sh/embed-elf.h, config/sparc/openbsd.h: - Remove includes of other target config headers, and - definitions of macros moved to tm_defines lists. Add #undefs - where now necessary to prevent redefinition warnings. - - * config/h8300/coff.h: New file split out of... - * config/h8300/elf.h: ...here. - * config/m68k/hp320base.h: New file split out of... - * config/m68k/hp320.h: ...here. - * config/rs6000/lynxbase.h: New file split out of... - * config/rs6000/lynx.h: ...here. - - * config/m68k/hp310g.h, config/m68k/hp320g.h, config/m68k/hpux7.h - * config/m68k/m68k-coff.h, config/mips/openbsd-be.h: Delete file. - - * config/sol2.h: Remove #if 0-ed #include of sys/mman.h. - * config/m68k/m68kelf.h: Remove commented out #include of m68k/sgs.h. - * config/mcore/mcore.h: Don't include hwint.h nor machmode.h. - Remove unnecessary #ifndef. - * config/s390/s390.h: Prefix #include of s390/fixdfdi.h - [under IN_LIBGCC2] with config/. - -2003-08-21 Per Bothner - - * cppfiles.c (stack_file): Correctly pass return_at_eof parameter - to cpp_push_buffer. - * cpplex.c (_cpp_get_fresh_line): Don't buffer->prev - handled - by return_at_eof check. Always call _cpp_pop_buffer at end. - -2003-08-21 Kazu Hirata - - PR target/11805 - * config/h8300/h8300.md (two anonymous patterns): Remove. - -2003-08-21 Richard Sandiford - - * config/mips/mips.h (MUST_PASS_IN_STACK): Remove BLKmode clause. - * config/mips/mips.c (function_arg_pass_by_reference): Never return - true for n32 & n64. - -2003-08-21 Josef Zlomek - - * fold-const.c (fold): Fix bug in (A & C) == D where D & ~C != 0 - and similarly in (A | C) == D where C & ~D != 0. - -2003-08-20 Geoffrey Keating - - PR 8180 - * configure.in: When testing with_libs and with_headers, treat - 'no' as unset. Based on a patch by Dan Kegel . - * configure: Regenerate. - -2003-08-20 Peter Barada - - * longlong.h (umul_ppmm): Add ColdFire support. - -2003-08-20 Peter Barada - Bernardo Innocenti - - * config/m68k/m68k-none.h: Introduce new ColdFire archs. - * config/m68k/m68k.h: Likewise. - * config/m68k/lb1sf68.asm: Rename __mcf5200__ to __mcoldfire__. - * config/m68k/coff.h: Rename TARGET_5200 to TARGET_COLDFIRE. - * config/m68k/linux.h: Likewise. - * config/m68k/m68k.c: Likewise. - * config/m68k/m68k.md: Likewise. - * config/m68k/m68kelf.h: Likewise. - * config/m68k/netbsd-elf.h: Likewise. - * config/m68k/t-m68kelf: Add multilib targets for new ColdFire archs. - -2003-08-20 Bernardo Innocenti - - * config/m68k/m68k.c: Strip away code depending on NO_ADDSUB_Q definition. - * config/m68k/m68k.md: Likewise. - -2003-08-20 Mark Mitchell - - PR java/11996 - Revert this change: - 2003-08-19 Mark Mitchell - * c-common.c (c_common_signed_or_unsigned_type): Correctly handle - types with precisions other than those given by native machine - modes. - -2003-08-20 Gunther Nikl - - * config/m68k/m68k.md (anonymous define_insn): remove obsolete code - selected by FSGLMUL_USE_S and FSGLDIV_USE_S - * config/m68k/m68k.c (output_move_himode): remove SGS_NO_LI check - * config/m68k/m68k.md (anonymous define_insn): Likewise - * config/m68k/m68k.md (anonymous define_insn): remove ISI_OV check - * config/m68k/m68k.c (standard_68881_constant_p): remove obsolete - code selected by NO_ASM_FMOVECR - -2003-08-20 Gunther Nikl - - * config/m68k/m68k.c (output_move_const_into_data_reg, - output_move_himode): unify MOTOROLA/MIT handling of moveq - * config/m68k/m68k.md (movsi_const0, anonymous define_insn): - Likewise - -2003-08-20 Gunther Nikl - - * config/m68k/m68k.c (m68k_output_function_prologue): use %U in - label name - * config/m68k/m68k.c (m68k_output_function_epilogue): replace - HOST_WIDE_INT_PRINT_DEC with %wd - -2003-08-20 Loren James Rittle - - * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Handle - redefine warning. - -2003-08-20 Roger Sayle - - PR middle-end/11984 - * fold-const.c (fold ): Check for integer constant - operands before calling tree_int_cst_lt when performing associative - transformations. - -2003-08-20 Jason Merrill - - * tree.h (IS_EXPR_CODE_CLASS): Also include 'r' and 's'. - (EXPR_CHECK): Don't check for 'r' or 's' if we're - checking IS_EXPR_CODE_CLASS. - * calls.c (calls_function_1): Likewise. - * fold-const.c (fold): Likewise. - * tree.c (iterative_hash_expr): Likewise. - * tree-inline.c (walk_tree, copy_tree_r): Likewise. - -2003-08-20 Gunther Nikl - - * config/m68k/m68k.c (m68k_output_mi_thunk): delete obsolete code - depending on MOTOROLA_BSR - * config/m68k/m68k.md (anonymous define_insn): Likewise - -2003-08-20 Jason Merrill - - * builtins.c (expand_builtin_mathfn): Use get_callee_fndecl. - (expand_builtin_mathfn2, expand_builtin, builtin_mathfn_code, - fold_trunc_transparent_mathfn, fold_builtin): Likewise. - * dojump.c (do_jump): Likewise. - * fold-const.c (operand_equal_p, fold): Likewise. - (tree_expr_nonnegative_p): Likewise. - - * stor-layout.c (do_type_align): Only copy DECL_USER_ALIGN from - TYPE_USER_ALIGN for FIELD_DECLs. - - * attribs.c (decl_attributes): Rebuild the function pointer type after - changing the target type. - * tree.c (get_qualified_type): Also check that the attributes match. - -2003-08-19 Matt Kraai - - * Makefile.in (STAGESTUFF): Move cc1obj$(exeext) from here ... - * objc/config-lang.in (stagestuff): ... to here. - -2003-08-19 Mark Mitchell - - PR c++/11946 - * convert.c (convert_to_integer): Use CONVERT_EXPR (instead of - NOP_EXPR) when necessary. - * c-common.c (c_common_signed_or_unsigned_type): Correctly handle - types with precisions other than those given by native machine - modes. - -2003-08-19 Geoffrey Keating - - * cpppch.c (cpp_valid_state): Re-add warning about PCH not used - because some macro is defined. - - * config/darwin.h (LINK_COMMAND_SPEC): Add -arch and -arch_only - options. - * config/i386/darwin.h (ASM_SPEC): New. - (SUBTARGET_EXTRA_SPECS): New. - * config/rs6000/darwin.h (ASM_SPEC): New. - (SUBTARGET_EXTRA_SPECS): New. - * configure.in: Don't set CROSS or SYSTEM_HEADER_DIR when building - a cross-compiler between two different processors on Darwin. - * configure: Regenerate. - -2003-08-19 Kazu Hirata - - * builtins.c: Fix comment typos. - * c-common.c: Likewise. - * c-decl.c: Likewise. - * c-pretty-print.c: Likewise. - * cfgbuild.c: Likewise. - * cfglayout.c: Likewise. - * cfgloopanal.c: Likewise. - * cgraphunit.c: Likewise. - * cppfiles.c: Likewise. - * dwarfout.c: Likewise. - * expr.c: Likewise. - * fold-const.c: Likewise. - * gcse.c: Likewise. - * ggc-page.c: Likewise. - * haifa-sched.c: Likewise. - * pretty-print.c: Likewise. - * tree.c: Likewise. - * tree.h: Likewise. - * value-prof.c: Likewise. - -2003-08-19 Kazu Hirata - - * c-decl.c: Follow spelling conventions. - * cppfiles.c: Likewise. - -2003-08-19 Kazu Hirata - - * c-common.c: Fix comment formatting. - * c-common.h: Likewise. - * c-decl.c: Likewise. - * cppinit.c: Likewise. - * cpplib.h: Likewise. - * emit-rtl.c: Likewise. - * input.h: Likewise. - * line-map.h: Likewise. - * opts.c: Likewise. - * opts.h: Likewise. - * simplify-rtx.c: Likewise. - -2003-08-19 Daniel Jacobowitz - - * unwind-c.c: Add libgcc-style exception. - * unwind-dw2.c: Likewise. - * unwind-pe.h: Likewise. - * unwind-sjlj.c: Likewise. - * unwind.inc: Likewise. - -2003-08-19 Andrew Pinski - - PR c/5582 PR c++/10538 - * langhooks-def.h (lhd_decl_uninit): Declare. - (LANG_HOOKS_DECL_UNINIT): New macro. - (LANG_HOOKS_INITIALIZER): Adjust. - * langhooks.h (struct lang_hooks): Add new field - decl_uninit. - * langhooks.c (lhd_decl_uninit): Define. - * c-common.c (c_decl_uninit_1): New function. - (c_decl_uninit): New function. - (warn_init_self): Define. - * c-common.h (c_decl_uninit): Declare. - (warn_init_self): Declare. - * c.opt: Introduce -Winit-self. - * c-opts.c (c_common_handle_options): Set warn_init_self. - * c-lang.c (LANG_HOOKS_DECL_UNINIT): Define. - * objc/objc-lang.c (LANG_HOOKS_DECL_UNINIT): Define. - * function.c (uninitialized_vars_warning): Call the language hook. - * doc/invoke.texi: Document -Winit-self. - -2003-08-19 Chris Demetriou - - * config/mips/mips.md: Adjust SI-mode "trap_if" instruction - to use better predicates and constraints. Define new - instruction to handle "trap_if" with DI-mode arguments. - (conditional_trap): FAIL if trap code is not 0. - -2003-08-19 Andrew Pinski - - * config/i386/i386.c (legitimate_pic_address_disp_p): Change the - strstr with $pb to a strcompare with "" - (ix86_output_addr_diff_elt): Output the real pic base. - -2003-08-19 Gabriel Dos Reis - - * langhooks-def.h (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling. - (LANG_HOOKS_INITIALIZER): Correct. - * c-lang.c: Likewise. - -2003-08-19 Jan Hubicka - - * cgraph.c (cgraph_mark_needed_node): Call notice_global_symbol. - (cgraph_varpool_mark_needed_node): Likewise. - * cgraph.h (notice_global_symbol): Declare - * varasm.c (notice_global_symbol): Break out from ... - (assemble_start_function): ... here; update for variables. - (assemble_variable): Use notice_global_symbol. - -2003-08-19 Richard Sandiford - - * config/mips/mips.c (mips_va_arg): If EABI_FLOAT_VARARGS_P, - expect SFmode and DFmode arguments to be passed in FPRs, - regardless of the underlying type. - -2003-08-19 Richard Sandiford - - PR target/11924 - * config/mips/mips.c (INTERNAL_SYMBOL_P): New macro. - (mips_classify_symbol, m16_usym8_4, m16_usym5_4): Use it. - -2003-08-18 Matt Kraai - - PR c/11207 - * c-typeck.c (set_init_index): Check for negative index. - -2003-08-18 Bob Wilson - - * config/xtensa/crti.asm (_init, _fini): Add alternate code for new - call0 ABI. - * config/xtensa/crtn.asm (_init, _fini): Likewise. - * config/xtensa/lib1funcs.asm (__mulsi3, __udivsi3, __divsi3, - __umodsi3, __modsi3): Likewise. - * config/xtensa/t-xtensa (crti.o, crtn.o): Add $(GCC_CFLAGS) and - $(INCLUDES). - -2003-08-18 Aldy Hernandez - - * config/rs6000/spe.md ("*nabssf2_gpr"): New. - -2003-08-18 Richard Sandiford - - * config/mips/mips.md: Quote C code in braces. Remove use of - fake const0_rtx operands. Remove double backslashes. Use \;. - Remove workarounds for bogus warnings. - -2003-08-18 Richard Sandiford - - * config/mips/mips.md (muldf3, mulsf3): Don't call a gen_* function. - (muldf3_internal, muldf3_r4300): Select based on TARGET_4300_MUL_FIX - rather than TARGET_MIPS4300. - (mulsf3_internal, mulsf3_r4300): Likewise. - -2003-08-18 Richard Sandiford - - * config/mips/mips.md: Renumber unspecs. Clean up comments. - -2003-08-17 Roger Sayle - - * simplify-rtx.c (associative_constant_p): New function to test - whether an RTX expression is an immediate constant. - (simplify_associative_operation): New function to perform some - reassociation optimizations of associative binary expressions. - (simplify_binary_operation): Use simplify_associative_operation - to simplify PLUS, MULT, AND, IOR, XOR, SMIN, SMAX, UMIN and UMAX. - Floating point expressions are only reassociated when unsafe - math optimizations are permitted. - -2003-08-17 Andreas Jaeger - - * config/alpha/alpha.md: Remove usage of PARAMS. - - * config/i386/cygwin.h: Convert K&R prototypes to ISO C90. - * config/i386/i386-interix.h: Likewise. - * config/i386/winnt.c: Likewise. - * config/i386/cygming.h: Likewise. - * config/i386/cygwin2.c: Likewise. - * config/darwin.c: Likewise. - * config/darwin-c.c: Likewise. - * config/darwin-protos.h: Likewise. - * config/darwin.h: Likewise. - * config/s390/s390-protos.h: Likewise. - * config/s390/s390.c: Likewise. - * config/ia64/ia64.c: Likewse - * config/ia64/ia64-protos.h: Likewise. - * config/ia64/ia64-c.c: Likewise. - -2003-08-16 Kaveh R. Ghazi - - * config/sparc/sparc.c: Convert to ISO C. - - * config/sparc/sparc-protos.h: Don't use the PARAMS macro. - * config/sparc/sparc.c: Likewise. - -2003-08-16 Nathan Sidwell - - PR c++/11512 - * stmt.c (expand_expr_stmt_value): Don't warn about any void - typed expression. - -2003-08-16 Jan Hubicka - - * i386.c (ix86_fntype_regparm): Rename from ... - (ix86_function_regparm): ... this one; add fastcall and local - functions. - (ix86_function_ok_for_sibcall): Update. - (ix86_return_pops_args): Likewise. - (init_cumulative_args): Likewise. - (x86_can_output_mi_thunk): Likewise. - (function_arg): Fix formating. - (x86_this_parameter): Fix fastcall. - (x86_output_mi_thunk): Likewise. - - * cgraph.c (cgraph_mark_needed_node): Do not mark functions without - body as reachable; mark nested functions as needed too. - (dump_cgraph): Do not output global.calls. - * cgraph.h (cgraph_global_info): Kill. - * cgraphunit.c (cgraph_finalize_function): Enqueue needed functions. - (record_call_1): Speedup. - (cgraph_analyze_function): Break out from ...; compute inlining - parameters. - (cgraph_finalize_compilation_unit): ... here. - (cgraph_mark_inline): Kill computation of calls. - (cgraph_decide_inlining): Do not compute most of initial values. - -2003-08-14 Roger Sayle - - * fold-const.c (negate_expr_p): MULT_EXPRs and RDIV_EXPRs are easy - to negate if either operand is easy to negate, if we don't care - about sign-dependent rounding. - (negate_expr): Make the logic to negate a REAL_CST explicit. - Attempt to negate a MULT_EXPR or RDIV_EXPR by negating an operand - that's easy to negate, if we don't honor sign-dependent rounding. - (fold ): Optimize -A * B as A * -B if B is easy to - negate, and the symmetric A * -B as -A * B if A is easy to negate. - (fold ): Likewise, optimize -A/B and C/-D as A/-B and - -C/D if B and C are cheap to negate. Add an explicit rule to - optimize X/-1.0 as -X when we don't care about signaling NaNs. - -2003-08-14 Zack Weinberg - - * Makefile.in (tm_file): Rename tm_include_list. - (tm_p_file): Rename tm_p_include_list. - (build_xm_file): Rename build_xm_include_list. - (host_xm_file): Rename host_xm_include_list. - (xm_file): Rename xm_include_list. - (xm_file_list): Add to be substituted. - (cs-config.h, cs-bconfig.h, cs-tconfig.h, cs-tm.h, cs-tm_p.h): - Update to match. - (bt-load.o): Add missing dependency on $(TM_H). - * configure.in: Prefix value of EXTRA_MODES_FILE with config/. - For each of tm_file, tm_p_file, xm_file, host_xm_file, and - build_xm_file, generate both *_file_list and *_include_list - values from it. (xm_file_list was formerly not being generated.) - In *_include_list, prefix the names of all headers found in - $(srcdir)/config with config/. In each loop, consider only - the special case files that can actually appear in that list. - AC_SUBST all *_file_list and all *_include_list variables; do - not AC_SUBST the plain *_file variables. - * configure: Regenerate. - -2003-08-14 Zdenek Dvorak - - * cfg.c (dump_edge_info): Add name of loop_exit edge flag. - -2003-08-14 John David Anglin - - * pa.c (pa_adjust_insn_length): Delete adjustment for delay slot in - direct calls. - (attr_length_call): Include it here. Improve length estimate for - local calls. - (output_call): Use targetm.binds_local_p. - -2003-08-14 Kaveh R. Ghazi - - * builtins.c (CASE_MATHFN): New helper macro. - (mathfn_built_in): Simplify and sort. - - * protoize.c (substr): Delete, callers changed to `strstr'. - -2003-08-13 Zack Weinberg - - * config.gcc (iq2000*-*-elf*): Don't set xm_file. - * config/iq2000/xm-iq2000.h: Delete file. - -2003-08-13 Geoffrey Keating - - * gengtype.c (walk_type): Process a subobject before processing - the pointer that points to the subobject. - -2003-08-13 Per Bothner - - * regclass.c (init_reg_modes): Make non-static. - Rename to init_reg_modes_once per new naming convention. - (init_regs): Don't call init_reg_modes here. - * emit-rtl.c (init_emit_once): Call init_reg_modes_once here instead. - * rtl.h (init_reg_modes_once): New declaration. - * toplev.c (backend_init): Call init_regs after init_emit_once. - -2003-08-13 Kaz Kojima - - * config/sh/linux.h (DBX_REGISTER_NUMBER): Define so to map a - special index for MD_FALLBACK_FRAME_STATE_FOR to itself. - -2003-08-13 J"orn Rennecke - - * sh.c (sh_get_pr_initial_val): Always wrap in unspec for TARGET_SH1. - * sh.md (load_ra): Change insn predicate to TARGET_SH1. - -2003-08-13 Dale Johannesen - - * config/rs6000/rs6000.md (ctrsi, ctrdi): Reenable - handling of decrement-and-branch farther than 32 bits. - -2003-08-12 Kelley Cook - - * configure.in (make_compare_target): Move test to ... - * aclocal.m4 (gcc_AC_PROG_CMP_IGNORE_INITIAL): here. - * configure: Regenerate. - -2003-08-12 Richard Sandiford - - * config/mips/iris6.h: Convert to C90 prototypes. - * config/mips/irix6-libc-compat.c: Likewise. - * config/mips/mips-protos.h: Likewise. - * config/mips/mips.c: Likewise. - -2003-08-12 Nathanael Nerode - - fixinc/inclhack.def (svr4_krnl): Rename from svr4_kernel. Enable - for selected machines. Comment heavily. - fixinc/fixincl.x: Rebuild. - fixinc/tests/base/fs/rfs/rf_cache.h: New file. - -2003-08-12 Richard Sandiford - - * config/mips/mips.h: Tweak various comments. - * config/mips/mips.c: Likewise. - -2003-08-11 James E Wilson - - PR optimization/11319 - PR target/10021 - * alias.c (find_base_value, case REG): Return 0 not src if no base - found. - -2003-08-11 Kaveh R. Ghazi - - * gcse.c (gmalloc): Fix last change. - -2003-08-11 Roger Sayle - - * simplify-rtx.c (simplify_binary_operation): Replace calls to - gen_rtx_NEG and gen_rtx_NOT with calls to simplify_gen_unary, - and calls to gen_rtx_PLUS, gen_rtx_MULT, gen_rtx_LSHIFTRT, - gen_rtx_ASHIFT and gen_rtx_AND with calls to simplify_gen_binary. - -2003-08-11 Roger Sayle - - * expr.c (expand_expr): If an ABS_EXPR has a complex type, abort. - * c-typeck.c (build_unary_op): COMPLEX_TYPE is not a valid - typecode for an ABS_EXPR. - - * doc/c-tree.texi: Document ABS_EXPR. - -2003-08-11 Roger Sayle - - * fold-const.c (fold): Optimize any associative floating point - operator with -funsafe-math-optimizations, not just MULT_EXPR. - -2003-08-11 Kaz Kojima - - * config/sh/lib1funcs.asm (__udivdi3): Add .type and .size - information in SHmedia case too. - (__divdi3, __umoddi3, __moddi3, __init_trampoline, __ic_invalidate): - Likewise. - (__set_fpscr): Use an access via GOT for PIC case. - -2003-08-11 Kelley Cook - - * configure.in (intermodule): Make switch test more portable. - * configure: Regenerate. - -2003-08-11 Kelley Cook - - * Makefile.in (cleanstrap): Pass BOOT_CFLAGS to bootstrap. - (restrap): Likewise. - -2003-08-11 Kaveh R. Ghazi - - * gcse.c (gmalloc): Argument is a size_t. Add ATTRIBUTE_MALLOC. - (grealloc): Size argument is a size_t. - (gcalloc): New function. Use throughout in lieu of - gmalloc/memset. - - * config/avr/avr.c (avr_init_once): Use xcalloc in lieu of - xmalloc/memset. - * config/ia64/ia64.c (ia64_reorg): Likewise. - * conflict.c (conflict_graph_new): Likewise. - * fixinc/fixincl.c (run_compiles): Likewise. - * genattrtab.c (optimize_attrs): Likewise. - * genrecog.c (new_decision): Likewise. - * haifa-sched.c (schedule_block): Likewise. - * hashtable.c (ht_create): Likewise. - -2003-08-11 Bob Wilson - - * config/xtensa/lib2funcs.S: Fix whitespace. - * config/xtensa/xtensa.md (all insns and expanders): Use brace block - syntax where appropriate. Remove unnecessary backslash escapes. - Reformat comments and fix some code formatting. - (extendqisi2): Rearrange conditional. - (*btrue, *bfalse, *ubtrue, *ubfalse, *bittrue, *bitfalse, *masktrue, - *maskfalse, movsicc_internal0, movsfcc_internal0): Call abort instead - of fatal_insn. - -2003-08-11 Richard Sandiford - - * config/mips/mips.c: Various formatting fixes. - (override_options): Resync -mtune handling with gas. - (mips_issue_rate): Rearrange like mips_use_dfa_pipeline_interface. - * config/mips/mips.h: More formatting fixes. - (mips_abi): Move declaration. - * config/mips/mips.md (exception_receiver): Add mode to - unspec_volatile. - -2003-08-11 Aldy Hernandez - - * config/rs6000/rs6000.c (spe_init_builtins): Handle evsplati and - evsplatfi here. - (bdesc_1arg): Remove evsplati and evsplatfi. - -2003-08-11 J"orn Rennecke - - * dwarf2asm.c (dw2_output_indirect_constant_1): Take user_label_prefix - into account. - -2003-08-10 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strcat): Optimize constant strings. - -2003-08-10 Gabriel Dos Reis - - * pretty-print.c (pp_base_indent): Rename from pp_indent. - * c-pretty-print.h (pp_c_pretty_print_flag)s: New datatype. - (struct c_pretty_print_info): Add more fields. - (pp_c_left_paren): Move to c-pretty-print.c. - (pp_c_right_paren): Likewise. - (pp_c_left_brace): Likewise. - (pp_c_right_brace): Likewise. - (pp_c_left_bracket): Likewise. - (pp_c_right_bracket): Likewise. - (pp_c_declarator): Declare. - (pp_c_direct_declarator): Likewise. - (pp_c_specifier_qualifier_list): Likewise. - (pp_c_type_id): Likewise. - * c-pretty-print.c (pp_c_cv_qualifier): Change prootype. Rework.. - (pp_c_type_qualifier_list): New. - (pp_c_pointer): Likewise. - (pp_c_parameter_type_list): Likewise. - (pp_c_function_definition): Likewise. - (pp_c_id_expression): Likewise. - (pp_c_simple_type_specifier): Tidy. - (pp_c_unary_expression): Likewise. - (pp_c_expression): Likewise. - (pp_c_pretty_printer_init): Likewise. - (pp_c_specifier_qualifier_list): Rework.. - (pp_c_abstract_declarator): Likewise. - (pp_c_postfix_expression): Likewise. - (pp_c_primary_expression): Likewise. - (pp_c_cast_expression): Likewise. - (pp_c_direct_abstract_declarator): Likewise. - (pp_c_storage_class_specifier): Likewise. - (pp_c_function_specifier): Likewise. - (pp_c_declaration_specifiers): Likewise. - (pp_c_direct_declarator): Likewise. - (pp_c_declarator): Likewise. - (pp_c_declaration): Likewise. - (pp_c_statement): Likewise. - (pp_c_integer_constant): Rename from pp_c_integer_literal. - (pp_c_character_constant): Rename from pp_c_character_literal. - (pp_c_bool_constant): Rename from pp_c_bool_literal. - (pp_c_enumeration_constant): Rename from pp_c_enumerator. - (pp_c_floating_constant): Rename from pp_c_real_literal. - (pp_c_constant): Rename from pp_c_literal. - * c-lang.c: Include diagnostic.h and c-pretty-print.h - (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. - (c_initialize_diagnostics): New. - * Makefile.in (c-lang.o): Update dependency. - -2003-08-10 Nathan Sidwell - - * c-typeck.c (digest_init): Add conversion for VECTOR_TYPEs. - -2003-08-10 Richard Sandiford - - * config/mips/mips.c (mips_no_mips16_string): Remove. - (override_options): Don't handle -mips16 as part of -mipsN. - * config/mips/mips.h (mips_no_mips16_string): Remove declaration. - (TARGET_SWITCHES): Add -mips16 and -mno-mips16 entries. - (TARGET_OPTIONS): Remove -mno-mips16. - -2003-08-10 Richard Sandiford - - * config/mips/mips-protos.h (coprocessor_operand): Remove declaration. - (coprocessor2_operand): Likewise. - * config/mips/mips.c (STAB_CODE_TYPE): Remove. - (lookup_name): Remove declaration. - (abort_with_insn): Remove. Replace all uses with fatal_insn. - (mips16, mips_abicalls): Remove. - (mips_char_to_class): Remove initialiser: all entries are NO_REGS. - (arith32_operand, large_int, true_reg_or_0_operand): Remove. - (coprocessor_operand, coprocessor2_operand): Remove. - (override_options): Don't set mips16 or mips_abicalls. - (print_operand): Don't expect SIGN_EXTEND operands. - (mips_secondary_reload_class): Likewise. - (mips_output_conditional_branch): Remove disabled long-branch code. - * config/mips/mips.h (call_used_regs): Remove declaration. - (may_call_alloca): Likewise. - (mips_cpu_attr, mips_abicalls_type, mips_abicalls_attr): Remove. - (mips_abicalls, mips16): Remove declarations. - (ASM_FINAL_SPEC, LIB_SPEC): Remove. - (CC1_SPEC): Remove outdated comment. - (MIPS_VERSION, MACHINE_TYPE): Remove. - (TARGET_VERSION_INTERNAL, TARGET_VERSION): Remove. - (PC_REGNUM, STACK_POINTER_OFFSET): Remove disabled definitions. - (STRUCT_VALUE_RETURN_REGNUM, STACK_DYNAMIC_OFFSET): Likewise. - (PUSH_ROUNDING): Likewise. - (ASSEMBLER_SCRATCH_REGNUM): Remove. - * config/mips/mips.md: Replace mips_cpu_attr with mips_tune - and mips16 with TARGET_MIPS16. - -2003-08-09 Per Bothner - - * cppinit.c (cpp_read_main_file): Split out source-independent - initialization to separate function ... - (cpp_post_options): New function. - * cppfiles.c (cpp_stack_file): Rename public name to ... - (_cpp_stack_file): New internal function name. - * cpplib.h: Update accordingly. - * cppinit.c: (cpp_create_reader): Initialize cpp_readers line here. - (cpp_read_main_file): Don't initialize line here. - * c-opts.c (c_common_post_options): Call cpp_post_options. - (c_common_parse_file): Call cpp_read_main_file, not cpp_stack_file. - * fix-header.c (read_scan_file): Call cpp_post_options. - -2003-08-09 Per Bothner - - * c-decl.c (SCOPE_LIST_APPEND): Remove bogus line continuation. - -2003-08-09 John David Anglin - - * pa.c (pa_asm_output_mi_thunk): Fix typo. - -2003-08-09 Neil Booth - - PR preprocessor/11839 - * cppfiles.c (open_file): Handle ENOTDIR. - -2003-08-09 Richard Sandiford - - PR target/11699 - * config/mips/mips.c (override_options): Reject -mabi=eabi -mabicalls. - -2003-08-08 John David Anglin - - * pa.md (extzv, extv, insv): Fix operand limit checks. Fail if - source/destination is not a register operand. - -2003-08-08 Richard Henderson - - PR target/11535 - * config/ia64/ia64.c (ia64_initial_elimination_offset): Remove - RETURN_ADDRESS_POINTER_REGNUM. - (ia64_expand_prologue): Don't frob it. - (ia64_output_function_epilogue): Likewise. - (ia64_return_addr_rtx): New. - (ia64_split_return_addr_rtx): New. - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.h (FIRST_PSEUDO_REGISTER): Decrement. - (RETURN_ADDRESS_POINTER_REGNUM): Remove. - (GENERAL_REGNO_P): Don't check it. - (AR_*_REGNUM): Renumber. - (FIXED_REGISTERS): Remove RETURN_ADDRESS_POINTER_REGNUM. - (CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS): Likewise. - (REG_ALLOC_ORDER, REG_CLASS_CONTENTS): Likewise. - (ELIMINABLE_REGS, REGISTER_NAMES): Likewise. - (RETURN_ADDR_RTX): Use ia64_return_addr_rtx. - * config/ia64/ia64.md (UNSPEC_RET_ADDR): New. - (movdi_ret_addr): New. - -2003-08-08 Geoffrey Keating - - * config.gcc (powerpc-*-darwin*): Don't build a soft-float multilib. - -2003-08-08 Roger Sayle - - * tree.h (get_identifier) Define a macro form of get_identifier - that calls get_identifier_with_length when the string is constant. - (get_identifier_with_length): Change type of second argument to - size_t in prototype. - * stringpool.c (get_identifier): Undefine the macro before giving - the function definition. - (get_identifier_with_length): Change type of second argument to - size_t in function definition. - * hashtable.c (calc_hash): Change type of second argument to size_t. - (ht_lookup): Change type of third argument to size_t. Reorganize - to speed-up the cases where the hash table slot is empty, or the - first probe matches (i.e. there isn't a collision). - * hashtable.h (ht_lookup): Adjust function prototype. - -2003-08-08 Bernardo Innocenti - - PR target/9697 - PR target/11777 - * longlong.h (count_leading_zeros): Exclude on __mcpu32__. - -2003-08-08 Neil Booth - - * common.opt: Add debug switches. - * flags.h (use_gnu_debug_info_extensions): Boolify. - * opts.c (write_symbols, debug_info_level, - use_gnu_debug_info_extensions): Move from toplev.c. - (set_debug_level): New. - (common_handle_options): Handle debug switches. - (print_help): Display target options directly. - * toplev.c (debug_hooks): Don't initialize. - (write_symbols, debug_info_level, - use_gnu_debug_info_extensions): Move to opts.c. - (debug_args, display_help, decode_g_option): Remove. - (process_options): Set no debug if level zero here, - and no-debug-hooks. Error here if impossible debug format selected. - * toplev.h (display_help, decode_g_option): Remove. - -2003-08-08 Richard Sandiford - - * tree.c (get_file_function_name_long): Fix size of alloca() area. - -2003-08-08 Kelley Cook - - * configure.in (gcc_cv_prog_cmp_skip): Flipflop make_compare_target - and gcc_cv_prog_cmp_skip. - * configure: Regenerate. - -2003-08-08 Stan Cox - - * config/iq2000: New port. - * config.gcc (iq2000-*-elf): Added. - * doc/install.texi (Specific): Add iq2000 description. - -2003-08-08 Andreas Schwab - - * configure.in (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Fix quoting - and insert missing empty argument. - * configure: Regenerate. - -2003-08-07 John David Anglin - - * pa.c (update_total_code_bytes): Use new macro IN_NAMED_SECTION_P. - (attr_length_millicode_call): Likewise. - (attr_length_call): Likewise. Revise some maximum insn lengths. - (attr_length_indirect_call): Likewise. - (output_call): Fix thinko that added extra nop. - * pa.h (IN_NAMED_SECTION_P): Define. - - PR c++/11712 - * pa-hpux.h, pa-hpux10.h, pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Define - __STDC_EXT__ when using C++ dialect. - -2003-08-07 J"orn Rennecke - - * sh.c (calc_live_regs): If the return address pointer is live, - force pr live. - (sh5_schedule_saves): Exclude PR_MEDIA_REG from being a temp register - for saves / restores. - (sh_expand_epilogue): If sh_media_register_for_return returns a - register number, flag the instructions that restores PR_MEDIA_REG - as possibly dead. - Remove dead update of offset. - (sh_get_pr_initial_val): Use UNSPEC_RA if we don't know yet if - we can use the result of get_hard_reg_initial_val. - * sh.md (UNSPEC_RA): New constant. - (movsi_i_lowpart+1): Changed into a define_insn_and_split, named: - (load_ra). Handle UNSPEC_RA. - (sibcall_media): Use PR_MEDIA_REG. - - * sh.h (CALL_USED_REGISTERS): Include PR_REG and PR_MEDIA_REG. - * sh.c (calc_live_regs): Use sh_pr_n_sets to determine if pr - needs saving on SHmedia. - -2003-08-07 Ulrich Weigand - - * config/s390/s390.md: Replace all occurrences of \\t with \t. - -2003-08-07 Richard Sandiford - - * local-alloc.c (combine_regs): Fix comment typo. - -2003-08-06 Zack Weinberg - - * c-decl.c (builtin_decls): Replace with first_builtin_decl - and last_builtin_decl. - (c_init_decl_processing): Initialize both. - (c_reset_state): Iterate from first_builtin_decl to - last_builtin_decl inclusive to reintroduce builtins. - -2003-08-06 David Mosberger - - * doc/extend.texi (Function Attributes): Document the IA-64 version - of the "model" attribute. - - * config/ia64/ia64.h (SYMBOL_FLAG_SMALL_ADDR): New macro. - (SYMBOL_REF_SMALL_ADDR_P): Ditto. - (PREDICATE_CODES): Mention "small_addr_symbolic_operand". - - * config/ia64/ia64.c (ia64_handle_model_attribute): New function. - (ia64_encode_section_info): Likewise. - (ia64_attribute_table): Add "model" attribute. - (TARGET_ENCODE_SECTION_INFO): Define. - (small_addr_symbolic_operand): New function. - (got_symbolic_operand): Return 0 for a symbolref to an object - in the small address area. - (enum ia64_addr_area): New type. - (small_ident1): New variable. - (small_ident2): Likewise. - (init_idents): New function. - (ia64_get_addr_area): Likewise. - (ia64_encode_addr_area): Likewise. - (ia64_encode_section_info): Likewise. - (ia64_expand_load_address): For symbolic references to objects in - the small-address-area, load the address via gen_rtx_SET() (which, - eventually, will expand into "addl"). - -2003-08-06 Per Bothner - - * line-map.h (fileline): New typedef. - (struct line_map, linemap_add, linemap_lookup): Use it. - * input.h (struct location_s): Comment notes that long-term we want - to replace it by fileline. - -2003-08-06 J"orn Rennecke - - Fix SHcompact exception handling: - * sh.c (sh_get_pr_initial_val): If PR is or miight be clobbered - by the prologue, return a MEM with return_address_pointer_rtx - as address. - * sh.h (HARD_REGNO_MODE_OK): PR is OK for SImode. - (RETURN_ADDR_OFFSET): Don't define. - (SH_DBX_REGISTER_NUMBER): Use SHmedia numbers for SHmedia - registers that are visible in compact mode. Show that SHmedia - registers still exist in compact mode, even if there are not - readily accessible. - (ASM_PREFERRED_EH_DATA_FORMAT): Supply DW_EH_PE_indirect - if GLOBAL. Use DW_EH_PE_textrel (nominally) for CODE, - and DW_EH_PE_pcrel for pic data. - (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): If DW_EH_PE_textrel, - set SYMBOL_FLAG_FUNCTION in symbol, and actually use - DW_EH_PE_pcrel / DW_EH_PE_absptr encoding. - (ALLOCATE_INITIAL_VALUE): Put PR on stack if prologue clobbers it. - * sh.md (movsi_media-1): New splitter. - -2003-08-06 Graeme Peterson - - * config/i386/nto.h: New. - * config/i386/t-nto: New. - * config.gcc (i[34567]86-*-nto-qnx*): New. - -2003-08-06 Phil Edwards - - * doc/install.texi (*-*-solaris2*): Refine configure instructions. - -2003-08-06 Alan Modra - - * calls.c (load_register_parameters): Arrange for call_fusage to - report the whole register as used when shifting to the msb. - -2003-08-05 Roger Sayle - - * builtins.c (expand_builtin): When not optimizing, call the library - function for all builtins that have library functions (except alloca). - -2003-08-05 Alexandre Oliva - - * c.opt: Introduce -fworking-directory. - * doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it. - * c-common.h (flag_working_directory): Declare. - * c-common.c (flag_working_directory): Define. - * c-opts.c (c_common_handle_options): Set it. - (sanitize_cpp_opts): Set... - * cpplib.h (struct cpp_options): ... working_directory option. - (struct cpp_callbacks): Add dir_change. - * cppinit.c (read_original_filename): Call... - (read_original_directory): New. Look for # 1 "directory//" - and process it. - (cpp_read_main_file): Call dir_change callback if working_directory - option is set. - * gcc.c (cpp_unique_options): Pass -g*. - * c-lex.c (cb_dir_change): New. - (init_c_lex): Set dir_change callback. - * toplev.c (src_pwd): New static variable. - (set_src_pwd, get_src_pwd): New functions. - * toplev.h (get_src_pwd, set_src_pwd): Declare. - * dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd(). - * dwarf2out.c (gen_compile_unit_die): Likewise. - * dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise. - -2003-08-05 Gabriel Dos Reis - - * pretty-print.h (pp_set_line_maximum_length): Make macro. - (pp_set_prefix): Likewise. - (pp_destroy_prefix): Likewise. - (pp_remaining_character_count_for_line): Likewise. - (pp_clear_output_area): Likewise. - (pp_formatted_text): Likewise. - (pp_last_position_in_text): Likewise. - (pp_emit_prefix): Likewise. - (pp_append_text): Likewise. - (pp_flush): Likewise. - (pp_format_text): Likewise. - (pp_format_verbatim): Likewise. - (pp_tree_identifier): Tidy. - * pretty-print.c (pp_base_format_text): Rename from pp_format_text. - (pp_base_format_verbatim): Rename from pp_format_verbatim. - (pp_base_flush): Rename from pp_flush. - (pp_base_set_line_maximum_length): Rename from - pp_set_line_maximum_length. - (pp_base_clear_output_area): Rename from pp_clear_output_area. - (pp_base_set_prefix): Rename from pp_set_prefix. - (pp_base_destroy_prefix): Rename from pp_destroy_prefix. - (pp_base_emit_prefix): Rename from pp_emit_prefix. - (pp_base_append_text): Rename from pp_append_text. - (pp_base_formatted_text): Rename from pp_formatted_text. - (pp_base_last_position_in_text): Rename from pp_last_position_in_text. - (pp_base_remaining_character_count_for_line): Rename from - pp_remaining_character_count_for_line. - * diagnostic.h (diagnostic_format_decoder): Tidy. - (diagnostic_flush_buffer): Likewise. - * c-pretty-print.h: (pp_c_string_literal): Declare. - (pp_c_real_literal): Likewise. - (pp_c_integer_literal): Likewise. - * c-pretty-print.c (pp_c_char): Use pp_string in lieu of - pp_identifier. - (pp_c_character_literal): Tidy. - (pp_c_string_literal): Make public. - (pp_c_bool_literal): Likewise. - (pp_c_integer_literal): Likewise. - (pp_c_real_literal): Likewise. - - * Makefile.in (C_PRETTY_PRINT_H): New variable. - (c-pretty-print.o): Update dependence. - -2003-08-05 Chris Demetriou - - * config/mips/mips.md (fix_truncdfsi2_macro): Properly restore - ".set nomacro" state. - (fix_truncsfsi2_macro): Likewise. - -2003-08-05 Steven Bosscher - - * tree.h (DID_INLINE_FUNC): Remove macro. - (DECL_DECLARED_INLINE_P): Move from c-tree.h and cp/cp-tree.h, - add tree check for FUNCTION_DECL. - (DECL_ESTIMATED_INSNS): Move from c-common.h and java/java-tree.h. - (struct tree_decl): Rename inlined_function_flag to - declared_inline_flag. - * c-common.h (c_lang_decl): Remove. - (DECL_ESTIMATED_INSNS): Remove. - * c-tree.h (struct lang_decl): Don't include c_lang_decl. - (DECL_DECLARED_INLINE_P): Remove. - * c-decl.c (grokdeclarator): Update comment. With -finline-functions, - do not reset DECL_DECLARED_INLINE_P. Don't use DID_INLINE_FUNC. - (finish_function): Make uninlinable a bool. Fixup call to - tree_inlinable_function_p() and fix some code style issues. - * cgraph.h (disgread_inline_limits): Fix spelling: `disregard'. - * cgraph.c (dump_cgraph): Likewise. - * cgraphunit.c (cgraph_decide_inlining): Likewise - (cgraph_finalize_compilation_unit): Likewise. - Also update call to tree_inlinable_function_p(). - (cgraph_default_inline_p): Don't use DID_INLINE_FUNC. Instead - look at DECL_DECLARED_INLINE and reverse logic. - * print-tree.c (print_node): Likewise. - * toplev.c (rest_of_handle_inlining): Don't use DID_INLINE_FUNC. - * tree-inline.h (tree_inlinable_function_p): Make a bool. Update - prototype. - * tree-inline.c (inlinable_function_p): Split up in this function to - check for basic inlining inhibiting conditions, and new - limits_allow_inlining() function. Warn if inlining is impossible - because the inline candidate calls alloca or uses sjlj exceptions. - (limits_allow_inlining): this new function to check if the inlining - limits are satisfied. Throttle from currfn_max_inline_insns, not from - MAX_INLINE_INSNS_SINGLE. The latter only makes sense if - MAX_INLINE_INSNS_AUTO and MAX_INLINE_INSNS_SINGLE are equal. - Update prototypes. - (tree_inlinable_function_p): Make a bool. Update call to - inlinable_function_p - (expand_call_inline): Use limits_allow_inlining() when not in - unit-at-a-time mode to decide on inlining. Don't use DID_INLINE_FUNC, - instead see if the function was declared `inline'. - -2003-08-05 Josef Zlomek - - * gcse.c (try_replace_reg): Fix updating of note. - -2003-08-04 Roger Sayle - - PR middle-end/11771 - * fold-const.c (negate_expr_p ): Change to match the - logic in negate_expr, i.e. we don't invert (A-B) for floating - point types unless flag_unsafe_math_optimizations. - -2003-08-04 Roger Sayle - - * fold-const.c (fold ): Transform x+x into x*2.0. - Optimize x*c+x and x+x*c into x*(c+1) and x*c1+x*c2 into x*(c1+c2) - for floating point expressions with -ffast-math. - (fold ): Don't transform x*2.0 into x+x. - * expmed.c (expand_mult): Wrap long line. Expand x*2.0 as x+x. - -2003-08-04 Roger Sayle - - * c-common.c (flag_noniso_default_format_attributes): Delete. - (built_in_attribute): Don't define/undefine DEF_FN_ATTR. - (c_attrs_initialized): Delete. - (c_common_nodes_and_builtins): Don't test c_attrs_initialized, - always call c_init_attributes. - (c_init_attributes): Don't define/undefine DEF_FN_ATTR. Don't - set c_attrs_initialized when done. - (c_common_insert_default_attributes): Delete. - * c-common.h (flag_noniso_default_format_attributes): Delete. - (c_coomon_insert_default_attributes): Delete prototype. - * c-opts.c (set_std_c89, set_std_c99, set_std_cxx98): Dont set - flag_noniso_default_format_attributes. - - * c-decl.c (c_insert_default_attributes): Delete. - * c-tree.h (c_insert_default_attributes): Delete prototype. - - * attribs.c (decl_attributes): Don't call insert_default_attributes - langhook. Update function description comment. - * langhooks.h (lang_hooks): Remove insert_default_attributes field. - * langhooks-def.h (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Delete. - * c-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. - * system.h: Poison LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES macro. - - * objc/objc-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't - define. - -2003-08-04 Richard Sandiford - - * config/mips/mips.c (override_options): Disable -G on targets that - have no .section support. - (mips_select_section): Use default_select_section for such targets. - -2003-08-04 Nathanael Nerode - - * fixinc/inclhack.def (svr4_undeclared_getrnge): Introduce and enable. - * fixinc/inclhack.def (static_getrnge): Remove disabled hack. - * fixinc/fixincl.x: Rebuild. - * fixinc/tests/base/regexp.h: New test. - -2003-08-04 Alexandre Oliva - - * c-ppoutput.c (cb_line_change): Don't skip line changing while - parsing macro arguments in the top-level context. - -2003-08-04 Neil Booth - - * config.in: Remove HAVE_LSTAT. - * configure, configure.in: Don't test for lstat. - -2003-08-03 Gabriel Dos Reis - - * opts.c (decode_options): Do language-specific initialization for - the global diagnostic context. - * langhooks-def.h (lhd_initialize_diagnostics): Declare. - (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): New macro. - (LANG_HOOKS_INITIALIZER): Adjust. - * langhooks.h (struct lang_hooks): Add new field - initialize_diagnostics. - * langhooks.c (lhd_initialize_diagnostics): Define. - -2003-08-03 Gabriel Dos Reis - - * pretty-print.h: Adjust macro definitions. - * pretty-print.c (pp_newline): Rename to pp_base_newline. - (pp_character): Rename to pp_base_character. - (pp_string): Rename to pp_base_string. - * c-pretty-print.c (pp_buffer): Move to pretty-print.h - (pp_newline): Likewise. Adjust. - (pp_c_char): Adjust. - -2003-08-03 Kaveh R. Ghazi - - * builtins.def (BUILT_IN_ABS, BUILT_IN_IMAXABS, BUILT_IN_LABS, - BUILT_IN_LLABS): Move to miscellaneous section. - -2003-08-03 Neil Booth - - PR preprocessor/11534 - * cppexp.c (parse_defined): Warn only if -pedantic. - -2003-08-03 Neil Booth - - * cppfiles.c (stack_file): Use file path. - -2003-08-02 Roger Sayle - - * builtin-types.def (BT_SSIZE): New primitive type. - (BT_FN_INT_PTR_CONST_STRING_VALIST_ARG, - BT_FN_STRING_CONST_STRING_CONST_STRING_INT, - BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR, - BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR): New function types. - * builtins.def (BUILT_IN_DCGETTEXT, BUILT_IN_DGETTEXT, - BUILT_IN_FSCANF, BUILT_IN_GETTEXT, BUILT_IN_STRFMON, - BUILT_IN_STRFTIME, BUILT_IN_VFPRINTF, BUILT_IN_VFSCANF): New builtins. - * builtin-attrs.def: Remove DEF_FN_ATTR construct and the last - few functions that define default attributes using it. - * c-common.c (c_common_insert_default_attributes): Do nothing. - - * doc/extend.texi: Document these "new" builtins. - -2003-08-02 Kaz Kojima - - * config/sh/linux.h (SUBTARGET_LINK_SPEC): Don't set rpath. - (LIB_SPEC): Set -lpthread always when -pthread set. Set -lieee - when -mieee-fp set and -shared not set. - (SH_FALLBACK_FRAME_FLOAT_STATE): Don't define for SH5. - -2003-08-02 Neil Booth - - * cppfiles.c (struct _cpp_file): Rename once_only_next to - next_file. Remove import and pragma_once, add once_only. - (find_file): Add new file structures to the all_files list. - (should_stack_file): Mark #import-ed files once-only, and - don't stack them if the file has already been stacked. - (_cp_mark_file_once_only): Simplify. - * cpphash.h (struct cpp_reader): Rename once_only_files - to all_files. Rename saw_pragma_once to seen_once_only. - (_cpp_mark_file_once_only): Update prototype. - * cpplib.c (do_pragma_once): Update. - -2003-08-02 Neil Booth - - * cppfiles.c (ENOTDIR): Remove. - (open_file_in_dir): Rename find_file_in_dir. Handle errors - other than ENOENT here. - (once_only_file_p): Rename should_stack_file. - (find_file, open_file_failed, read_file_guts): Report errors - with full path name. - (read_file): Move pch handling to should_stack_file. - (should_stack_file): Handle PCH and once-only issues, and - reading the file. - (stack_file): Don't do file reads. - -2003-08-02 Zdenek Dvorak - - * libgcov.c (gcov_exit): Cleanup and fix. - * profile.c (compute_value_histograms): Don't try to read profiles - that are not present. - -2003-08-02 Kaveh R. Ghazi - - * builtins.def: Categorize. - - * builtins.def (BUILT_IN_CABS, BUILT_IN_CABSF, BUILT_IN_CABSL): - Mind fp rounding. - (BUILT_IN_FFSL): Use DEF_EXT_LIB_BUILTIN. - -2003-08-02 Andreas Tobler - - * config.gcc: Enable posix threads by default on darwin. - -2003-08-01 Jakub Jelinek - - * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION notes - even if nehedges1 is 0. - -2003-08-01 Nathanael Nerode - - * fixinc/fixfixes.c, fixinc/fixlib.c, fixinc/fixlib.h, - fixinc/fixtests.c, fixinc/procopen.c, fixinc/server.c, - fixinc/server.h, fixinc/fixincl.c: ANSIfy function prototypes - and defintions. - - * fixinc/inclhack.def (broken_cabs): Make matching more generous. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/math.h: Regenerate to match test_text change. - -2003-08-01 Rainer Orth - - * ggc-common.c (gt_pch_restore): Case MAP_FAILED to void *. - -2003-08-01 Richard Kenner - - * except.c (sjlj_emit_dispatch_table): Use ptr_mode, not Pmode, - for accesses to exc_ptr. - -2003-08-01 Geoffrey Keating - - * doc/sourcebuild.texi (Front End Directory): Don't make references - to libsubdir, it's not part of the interface to frontends. - * doc/install.texi (Configuration): Help users read faster by saying - that GCC's configure options are the standard autoconf ones. - Mention --libdir. Update the default rules for finding the - assembler. Don't use libsubdir since we haven't said what it means. - (Specific): In the Solaris 7 notes, update the place to put the - assembler. - * doc/invoke.texi: Update lib/gcc-lib to lib/gcc. - * doc/cpp.texi (Search Path): Actually, the search path - depends on libdir, which can relocate with cpp. - * doc/tm.texi (Driver): Don't document STANDARD_EXEC_PREFIX, it's - now a private interface between the Makefile and the driver. - -2003-08-01 Richard Henderson - - * system.h: Poison ASM_SIMPLIFY_DWARF_ADDR. - - * varasm.c (lookup_constant_def): New function. - * rtl.h (lookup_constant_def): Declare it. - * dwarf2out.c (loc_descriptor_from_tree): Use it. - Use targetm.delegitimize_address, not ASM_SIMPLIFY_DWARF_ADDR. - -2003-08-01 Zack Weinberg - - * c-decl.c (gettags, pushdecl_function_level): Delete. - (last_function_parm_vars): Rename last_function_parm_others. - (current_function_parm_vars): Rename current_function_parm_others. - (struct c_scope): Rewrite comment explaining this data structure. - Add names_last, blocks_last, parms_last fields. Rename - incomplete_list to incomplete. - (SCOPE_LIST_APPEND, SCOPE_LIST_CONCAT): New macros. - (poplevel): Ignore second argument. No need to nreverse - anything. Restructure such that each list is processed - exactly once. Use 'const location_t *locus' syntactic sugar - variable where useful. Issue unused variable warnings - ourselves, do not rely on function.c. - (insert_block, pushdecl, bind_label): Use SCOPE_LIST_APPEND. - (pushdecl_top_level): Likewise. Don't call duplicate_decls. - (implicitly_declare): decl cannot be error_mark_node. - (undeclared_variable): Manipulate scope structure directly. - (c_make_fname_decl): Likewise. - (getdecls, c_init_decl_processing): Fix comment. - (mark_forward_parm_decls): Use SCOPE_LIST_CONCAT. No need - for 'last' variable. - (grokparms): No need to nreverse parms list. - (store_parm_decls_newstyle): Set up the parms_last and - names_last fields of the new scope too. - (store_parm_decls_oldstyle): Can assume DECL_WEAK is not set - on parms to begin with; check this under ENABLE_CHECKING. Set - up parms_last. - (check_for_loop_decls): Refer directly to current_scope->tags. - Use consistent quote style in diagnostics. - (c_write_global_declarations): The names list is not backward. - - * c-common.h: Don't prototype gettags. - * c-parse.in: Call poplevel with second argument 0 always. - -2003-08-01 Kaveh R. Ghazi - - * builtins.def: Resort builtins. - -2003-08-01 Kaveh R. Ghazi - - * builtins.def (DEF_GCC_BUILTIN, DEF_LIB_BUILTIN, - DEF_EXT_LIB_BUILTIN, DEF_C99_BUILTIN, DEF_C99_C90RES_BUILTIN): - Prepend "__builtin_" onto NAME with string concatenation. Remove - explicit "__builtin_" from each macro call. - - Reformat entire file. - -2003-08-01 Kaveh R. Ghazi - - * builtins.def (ATTR_MATHFN_ERRNO, ATTR_MATHFN_FPROUNDING, - ATTR_MATHFN_FPROUNDING_ERRNO): New macros. Use throughout. - -2003-08-01 Andreas Krebbel - - * config/s390/s390.c (s390_select_ccmode): Do not attempt to use CCL, - CCL1, or CCL2 modes with floating point operations. - - * config/s390/s390.md ("*addsf3_cc", "*addsf3_cconly", "*adddf3_cc", - "*adddf3_cconly", "*subsf3_cc", "*subsf3_cconly", "*subdf3_cc", - "*subdf3_cconly"): New insns. - ("*negabssi2", "*negabsdi2", "*negabsdf2", "*negabssf2"): Likewise. - -2003-08-01 Neil Booth - - * Makefile.in: Refine dependencies. - * c-opts.c (c_common_handle_option): Do nothing for -Wimport. - * c.opt: Update help for -Wimport. - * cppfiles.c: Include hashtab.h. Update comments. - (stack_file): Read the file before updating dependencies. - (once_only_file_p): Be smarter about marking once-only files. - (_cpp_mark_file_once_only): Correct the check for existence on - the list. - (open_file_failed): Use name not path, which is NULL. - * cpphash.h: Don't include hashtab.h. - (struct _cpp_file): Remove. - (struct cpp_reader): Update. - * cppinit.c (cpp_create_reader): Don't initialize warn_import. - * cpplib.h (struct cpp_options): Remove warn_import. - (cpp_simplify_path): Remove. - -2003-08-01 Nathan Sidwell - - PR c++/11295 - * doc/extend.texi (Statement Expressions): Document C++ semantics. - -2003-07-31 SUGIOKA Toshinobu - - * config.gcc (sh-*-linux*): Do not override sh/t-linux with sh/t-le. - -2003-07-31 Kaveh R. Ghazi - - * builtin-types.def: Use `LONGDOUBLE' instead of `LONG_DOUBLE' - throughout. - * builtins.def: Likewise. - -2003-07-31 Jason Merrill - - * Makefile.in (bubblestrap): Don't require a previous full - bootstrap. - - * expr.c (mostly_zeros_p): No longer static. - * tree.h: Declare it. - * stmt.c (resolve_asm_operand_names): Don't copy the pattern - unless we need to do substitutions. - -2003-07-31 Roger Sayle - - * fold-const.c (fold ): Optimize both x*pow(x,c) and - pow(x,c)*x as pow(x,c+1) for constant values c. Optimize x*x - as pow(x,2.0) when the latter will be expanded back into x*x. - (fold ): Optimize pow(x,c)/x as pow(x,c-1). - * builtins.c (expand_builtin_pow): Ignore flag_errno_math as - pow can never set errno when used with an integer exponent. - Always use expand_powi when exponent is -1, 0, 1 or 2. - (fold_builtin): Don't rewrite pow(x,2.0) as x*x nor pow(x,-2.0) - as 1.0/(x*x). This avoids unbounded recursion as we now prefer - the pow forms of these expressions. - -2003-07-31 Geoffrey Keating - - * Makefile.in (libexecdir): New. - (libsubdir): Use gcc instead of gcc-lib. - (libexecsubdir): New. - (ORDINARY_FLAGS_TO_PASS): Add libexecsubdir. - (DRIVER_DEFINES): Add STANDARD_LIBEXEC_PREFIX, use gcc instead of - gcc-lib. - (installdirs): Make libexecsubdir. - (install-common): Put executables in libexecsubdir. - (itoolsdir): Use libexecsubdir. - (itoolsdatadir): New. - (install-mkheaders): Separate data files and executables. - (install-collect2): Put executables in libexecsubdir. - (uninstall): Remove libexecsubdir. - * mkheaders.in: Update for new arrangement of files. - (libexecdir): New. - (libexecsubdir): New. - (itoolsdir): Use libexecsubdir. - (itoolsdatadir): New. - * gcc.c (gcc_libexec_prefix): New. - (STANDARD_LIBEXEC_PREFIX): Use gcc instead of gcc-lib. - (standard_exec_prefix_1): Use libexec. - (standard_exec_prefix_2): New. - (standard_libexec_prefix): New. - (process_command): Update for new arrangement of files. Compute - gcc_libexec_prefix. Update for change from gcc-lib to gcc. - -2003-07-31 Nathanael Nerode - - * inclhack.def (stdio_va_list): Avoid bogus replacement which - triggers on Interix. - * fixincl.x: Regenerate. - -2003-07-31 Jakub Jelinek - - * config/i386/i386.c (legitimate_pic_address_disp_p): Disallow TLS - SYMBOL_REFs not inside UNSPEC even in PLUS rtx. - -2003-07-31 Richard Kenner - - * dwarf2out.c (loc_descriptor_from_tree, case CONSTRUCTOR): New case. - -2003-07-31 Per Bothner - - * opts.c (in_fnames, num_in_fnames): Moved here from c-opts. - (add_input_filename): New function. - (handle_options): Call add_input_filename directly instead of - with a lang hook. - * opts.h (in_fnames, num_in_fnames): Moved here. - (add_input_filename): Declare. - * c-decl.c: Need to #include opts.h. - * Makefile.in (c-decl.o): Also depends on opts.h. - * c-opts.c (in_fnames, num_in_fnames): Moved to opts.c. - (c_common_handle_filename): Replaced by add_input_filename. - * c-common.h (in_fnames, num_in_fnames, c_common_handle_filename): - Remove. - * langhooks.h (struct lang_hooks): Remove handle_filename hook. - * langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME): Remove macro. - (LANG_HOOKS_INITIALIZER): Remove use of LANG_HOOKS_HANDLE_FILENAME. - * c-lang.c (LANG_HOOKS_HANDLE_FILENAME): Remove macro. - -2003-07-31 Zdenek Dvorak - - * combine.c (try_combine): Set JUMP_LABEL for newly created - unconditional jump. - -2003-07-31 Zdenek Dvorak - - * fold-const.c (fold): Fold some comparisons of bit operations. - -2003-07-31 Jan Hubicka - - * cgraph.c (create_edge): Fix typo. - * i386.c (pic_symbolic_operand): Reorder tests. - -2003-07-31 Nathan Sidwell - - * doc/gcov.texi (Invoking Gcov): Describe output name mangling - more fully. - (Gcov Data Files): Update. - -2003-07-31 Rainer Orth - - * config.gcc (alpha*-dec-osf[45]*): Enable POSIX thread support by - default. - - * gthr-posix.c: New file. - * gthr-posix.h: Define _REENTRANT if missing. - Make _LIBOBJC #pragma weak visible with _LIBOBJC_WEAK. - - * config/alpha/t-osf4 (SHLIB_LINK): Hide dummy functions provided - by gthr-posix.o. - * config/alpha/t-osf-pthread: New file. - - * fixinc/inclhack.def (alpha_pthread): New fix. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: New testcase. - - * doc/install.texi (alpha*-dec-osf*): Remove --enable-threads - warning. - Fixes PR bootstrap/9330. - -2003-07-31 Rainer Orth - - * configure.in (gcc_cv_ld_hidden): Also disable on mips-sgi-irix5* - without GNU ld. - Update comment. - * configure: Regenerate. - -2003-07-31 Vladimir Makarov - - * sched-deps.c (sched_analyze_2): Prevent interblock move of CC0 - setter. - -2003-07-30 Roger Sayle - - * builtins.def: Alphabetize. - -2003-07-30 Matt Kraai - - * doc/c-tree.texi: Normalize spellings of "lowercase" and - "uppercase". - * doc/cpp.texi: Likewise. - * doc/md.texi: Likewise. - * doc/rtl.texi: Likewise. - * doc/tm.texi: Likewise. - -2003-07-30 Matt Kraai - - * objc/Make-lang.in (objc.stage1, objc.stage2, objc.stage3) - (objc.stage4, objc.stageprofile, objc.stagefeedback): Remove moves - of cc1obj. - -2003-07-30 Chris Demetriou - - * config/mips/mips.h (SIZE_TYPE, PTRDIFF_TYPE): Undef these - macros before defining them. - -2003-07-31 Ulrich Weigand - - * config/s390/s390.md (UNSPEC_ROUND, UNSPEC_SETHIGH, - UNSPECV_BLOCKAGE): New constants. - ("*sethighqisi", "*sethighhisi", "*sethiqidi_64", "*sethiqidi_31", - "*extractqi", "*extracthi", "*extendqidi2" splitter, "*extendqisi2" - splitter, "fix_truncdfdi2_ieee", "fix_truncdfsi2_ieee", - "fix_truncsfdi2", "fix_truncsfsi2", "blockage"): Use them. - - (all insns and expanders): Write output control string as brace block - where appropriate. Remove \-escapes for doublequote characters. - -2003-07-31 Jan Hubicka - - * gcse.c (insert_store): Fix typo in previous patch. - -2003-07-30 Neil Booth - - * cppfiles.c (stack_file, open_file_failed): Use path for deps. - -2003-07-30 Andi Kleen - - * loop.c (check_dbra_loop): Allow LTU in the loop condition. - -2003-07-30 Zdenek Dvorak - - * combine.c (distribute_notes): Cancel REG_VALUE_PROFILE notes. - * gcov-io.h (GCOV_FIRST_VALUE_COUNTER, GCOV_LAST_VALUE_COUNTER, - GCOV_N_VALUE_COUNTERS): New. - * profile.c (compute_value_histograms): New static function. - (branch_prob): Read back the value histograms. - * rtl.c (reg_note_name): Add name for REG_VALUE_PROFILE note. - * rtl.h (enum reg_note): Add REG_VALUE_PROFILE note. - * value-prof.c: Add comment on reading the profile. - * value-prof.h (COUNTER_FOR_HIST_TYPE, HIST_TYPE_FOR_COUNTER): New. - * doc/invoke.texi (-fprofile-values): Document behavior with - -fbranch-probabilities. - -2003-07-30 David Edelsohn - - * longlong.h (PowerPC umul_ppmm): Do not test __vxworks__. - -2003-07-30 Ulrich Weigand - - * config/s390/s390.h (EH_RETURN_HANDLER_RTX): Compute offset - symbolically. - -2003-07-30 Jan Hubicka - - * gcse.c (insert_store): Ignore fake edges. - - * c-common.c (flag_vtable_gc): Kill. - * c-common.g (flag_vtable_gc): Kill. - * c-opts (c_common_handle_option): Kill. - * c.opt (fvtable-gc): Kill. - * final.c (final_scan_insn): Do not call assemble_vtable_entry. - * output.h (assemble_vtable_entry, assemble_vtable_inherit): Kill. - * varasm.c (assemble_vtable_entry, assemble_vtable_inherit): Kill. - - * invoke.texi (-ftable-gc): Kill documentation. - - * tree-inline.c (inlinable_function_p): Don't set DECL_UNINLINABLE - just because function body is missing. - - * i386.c (pic_symbolic_operand): Properly detect RIP relative unspecs. - -2003-07-30 Ranjit Mathew - - * unwind-sjlj.c: Fix typo in file description. - -2003-07-30 Alan Modra - - * calls.c (load_register_parameters): When shifting reg sized values - to the msb, move the value to a reg first. - -2003-07-29 Geoffrey Keating - - * cppfiles.c (stack_file): Leave filename as "" rather than "". - * line-map.h (linemap_add): Update comments. - * line-map.c (linemap_add): Update comments, interpret zero-length - filename as "". - -2003-07-29 Nathanael Nerode - - * mkinstalldirs: Import autoconf 2.57 / automake 1.7 version. - -2003-07-29 Zack Weinberg - - * c-decl.c (last_function_parm_vars, current_function_parm_vars): - New static variables. - (struct c_scope): Add parms and warned_forward_parm_decls - fields; remove parm_order. - (storedecls, storetags): Delete. - (poplevel): Also clear bindings on the parms chain. - (pushdecl): Handle forward declarations of parameters, and - chain PARM_DECLs on the parms list, not the names list. - (lookup_name_current_level): Check for PARM_DECLs on the parms - list too. - (push_parm_decl): Don't update parm_order. - (clear_parm_order): Rename mark_forward_parm_decls. Issue the - warning, only once per parameter list, and set TREE_ASM_WRITTEN - on the decls here. Then move the forward decls to the names list. - (grokparms): Set last_function_parm_vars. - (get_parm_info): Don't use gettags or getdecls. No need to - extract non-parms from the parms list, or reorganize the parms - list. Feed nonparms back in the TREE_TYPE of the list node - returned. Issue only one error per parameter list for "void" - appearing more than once in said parameter list. Collapse - parmlist_tags_warning into this function to avoid double scan - of tags list. - (start_function): Set current_function_parm_vars. - (store_parm_decls_newstyle): Bypass pushdecl, manipulate scope - directly. Get non-parms from current_function_parm_vars; no - need to extract them from the parms chain. Properly bind tags - in the new scope. - (store_parm_decls_oldstyle): No need to extract non-parameters - from the parms chain, nor to store them back afterward. Move - declaration to top of function, restructure code reordering - DECL_ARGUMENTS. - (store_parm_decls): No need to save and restore warn_shadow. - * c-parse.in: Don't call parmlist_tags_warning nor - clear_parm_order. Call mark_forward_parm_decls when forward - parm decls are encountered. - * c-tree.h: Prototype mark_forward_parm_decls; not - clear_parm_order or parmlist_tags_warning. - -2003-07-29 Geoffrey Keating - - * c-common.c (allow_pch): Remove. - * c-common.h (allow_pch): Remove. - (c_common_no_more_pch): Declare. - * c-lex.c (c_lex): Call c_common_no_more_pch when appropriate. - * c-pch.c: Include hosthooks.h. - (c_common_valid_pch): Don't check allow_pch. - (c_common_read_pch): Clear valid_pch to prevent reading PCH files. - (c_common_no_more_pch): New. - * ggc-common.c: Include hosthooks.h. - (gt_pch_save): Call gt_pch_get_address. - (gt_pch_restore): Call gt_pch_use_address. - * hooks.c (hook_voidp_size_t_null): New. - (hook_bool_voidp_size_t_false): New. - * hooks.h (hook_voidp_size_t_null): New. - (hook_bool_voidp_size_t_false): New. - * hosthooks-def.h (HOST_HOOKS_GT_PCH_GET_ADDRESS): New. - (HOST_HOOKS_GT_PCH_USE_ADDRESS): New. - (HOST_HOOKS_INITIALIZER): Add HOST_HOOKS_GT_PCH_GET_ADDRESS, - HOST_HOOKS_GT_PCH_USE_ADDRESS. - * hosthooks.h (struct host_hooks): Add gt_pch_get_address, - gt_pch_use_address. - * doc/hostconfig.texi (Host Common): Document - HOST_HOOKS_GT_PCH_GET_ADDRESS, HOST_HOOKS_GT_PCH_USE_ADDRESS. - * Makefile.in (c-pch.o): Depend on hosthooks.h. - (ggc-common.o): Likewise. - - * config/rs6000/host-darwin.c (HOST_HOOKS_GT_PCH_GET_ADDRESS): Define. - (HOST_HOOKS_GT_PCH_USE_ADDRESS): Define. - (pch_address_space): New. - (darwin_rs6000_gt_pch_get_address): New. - (darwin_rs6000_gt_pch_use_address): New. - -2003-07-29 Neil Booth - - PR preprocessor/11569 - PR preprocessor/11649 - * Makefile.in (LIBCPP_DEPS): Add HASHTAB_H. - * cppfiles.c: Completely rewritten. - * c-incpath.c (free_path, remove_duplicates, heads, tails, add_path): - struct cpp_path is now struct cpp_dir. - (remove_duplicates): Don't simplify path names. - * c-opts.c (c_common_parse_file): cpp_read_next_file renamed - cpp_stack_file. - * cpphash.h: Include hashtab.h. - (_cpp_file): Declare. - (struct cpp_buffer): struct include_file is now struct _cpp_file, - and struct cpp_path is now struct cpp_dir. Rename members. - (struct cpp_reader): Similarly. New members once_only_files, - file_hash, file_hash_entries, quote_ignores_source_dir, - no_search_path, saw_pragma_once. Remove all_include_files and - max_include_len. Make some members bool. - (_cpp_mark_only_only): Renamed from _cpp_never_reread. - (_cpp_stack_file): Renamed from _cpp_read_file. - (_cpp_stack_include): Renamed from _cpp_execute_include. - (_cpp_init_files): Renamed from _cpp_init_includes. - (_cpp_cleanup_files): Renamed from _cpp_cleanup_includes. - * cppinit.c (cpp_create_reader): Initialize no_search_path. Update. - (cpp_read_next_file): Rename and move to cppfiles.c. - (cpp_read_main_file): Update. - * cpplib.c (run_directive): Update for renamed members. - (do_include_common, _cpp_pop_buffer): Update. - (do_import): Undeprecate #import. - (do_pragma_once): Undeprecate. Use _cpp_mark_file_once_only. - * cpplib.h: Remove file_name_map_list. - (cpp_options): Remove map_list. - (cpp_dir): Rename from cpp_path. New datatype for name_map. - (cpp_set_include_chains, cpp_stack_file, cpp_included): Update. - -2003-07-29 Phil Edwards - - * Makefile.in: Make stamp-objdir safe for parallel builds. - -2003-07-29 Phil Edwards - - * Makefile.in (stmp-docobjdir): New target; ensure $docobjdir exists. - (info): Depend on stmp-docobjdir. - -2003-07-29 Rainer Orth - - * configure: Regenerate. - -2003-07-29 Jan Hubicka - - PR C++/11131 - * tree-inline.c (expand_call_inline): Always call inlinable_function_p - in !unit-at-a-time mode. - -2003-07-28 Geoffrey Keating - - * c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect - main function. - -2003-07-28 Mark Mitchell - - PR c++/11667 - * c-common.c (shorten_compare): Take into account differences - between C and C++ representation for enumeration types. - * tree.h (set_min_and_max_values_for_integral_type): Declare. - * stor-layout.c (set_min_and_max_values_for_integral_type): New - function, broken out from ... - (fixup_signed_type): ... here and ... - (fixup_unsigned_type): ... here. - -2003-07-28 Zack Weinberg - - * c-decl.c: Update commentary, adjust blank lines throughout. - (struct c_scope): Fix indentation. Reorder members so - outer-context pointers come first, booleans last. - (duplicate_decls, define_label): Use a 'locus' variable for - diagnostic locations in a few more places. - (warn_if_shadowing): Un-split a conditional that fits on one line. - (c_init_decl_processing): No need to clear current_scope and - current_function_scope. - (start_decl): Merge if/else if statements with same action. - (push_parm_decl): Rename old_immediate_size_expand to use - save_foo convention; save/restore around entire function. - (grokdeclarator): Remove unnecessary braces. - -2003-07-28 Hans-Peter Nilsson - Michael Culbertson - - * c-parse.in (lineno_stmt_decl_or_labels_ending_decl): Also warn - when warn_declaration_after_statement. Call pedwarn_c90, not - pedwarn. Correct message: it's "ISO C90", not "ISO C89". - * c-common.c (warn_declaration_after_statement): Define. - * c-common.h (warn_declaration_after_statement): Declare. - * c.opt (Wdeclaration-after-statement): New. - * c-errors.c (pedwarn_c90): New function. - * c-opts.c (c_common_handle_option) : New. - * c-tree.h (pedwarn_c90): Declare. - * doc/invoke.texi (Option Summary): Document - -Wdeclaration-after-statement. - (Warning Options): Ditto. - -2003-07-28 Jan Hubicka - - * i386.md (memory attribute) Avoid accessing uninitialized memory - for ishift1 type instructions. - -2003-07-28 Jakub Jelinek - - * configure.in (--enable-checking): Add fold category. - (ENABLE_FOLD_CHECKING): Define if requested. - * configure: Rebuilt. - * config.in: Rebuilt. - * doc/install.texi: Document it. - * fold-const.c: Include md5.h. - [ENABLE_FOLD_CHECKING] (fold): Define to fold_1. - [ENABLE_FOLD_CHECKING] (fold, fold_checksum_tree, fold_check_failed, - print_fold_checksum): New functions. - - * fold-const.c (fold): Never modify argument passed to fold, instead - change a copy and return it. - * convert.c (convert_to_integer): Likewise. - -2003-07-27 Nathanael Nerode - - * fixinc/fixinc.svr4: Remove dead code. Remove now-unnecessary - cleanup of junk after #else and #endif directives. Collapse repeated - clauses into for statment. - - * fixinc/fixincl.sh: GNU C -> GCC. Add usage comment. - -2003-07-27 Zack Weinberg - - * c-decl.c (struct c_scope): Remove keep_if_subblocks field. - (keep_next_if_subblocks): Rename next_is_function_body. - (pushlevel): Adjust commentary. Always set ->keep on the - outermost level of a function. Don't set ->keep_if_subblocks. - (poplevel): Adjust commentary. Don't look at ->keep_if_subblocks. - (store_parm_decls): Adjust to match. - (finish_function): Adjust to match. - Call poplevel with all three arguments zero. - - * c-decl.c (store_parm_decls_newstyle, store_parm_decls_oldstyle): - New functions split out of store_parm_decls. - Avoid unnecessary work. Use local variables consistently. - (store_parm_decls): Likewise. - - (finish_function): No need to set functionbody flag on call to - poplevel. - (struct language_function): Remove scope field. - (c_push_function_context, c_pop_function_context): No need to - save and restore current_scope. - -2003-07-27 Nathan Sidwell - - * doc/extend.texi (Deprecated Features): Implicit typename is - gone. Default args on types is going. - -2003-07-26 J"orn Rennecke - - * Makefile.in (ifcvt.o): Depend on target.h - * ifcvt.c (target.h): Include. - (if_convert): Don't call mark_loop_exit_edges if we can't - modify jumps. - -2003-07-26 Gerald Pfeifer - - * doc/install.texi (Testing): Adjust required versions of DejaGnu. - -2003-07-26 Richard Henderson - - PR inline-asm/11676 - * cse.c (count_reg_usage): Handle asm_operands properly. - -2003-07-26 Roger Sayle - - * builtins.def (DEF_FALLBACK_BUILTIN): Delete. - (DEF_EXT_FALLBACK_BUILTIN): Delete. - (BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Declare using - the regular DEF_EXT_LIB_BUILTIN macro. - (BUILT_IN_FPUTC, BUILT_IN_FPUTS, BUILT_IN_FWRITE): Declare using - the regular DEF_LIB_BUILTIN macro. - (BUILT_IN_PUTCHAR_UNLOCKED, BUILT_IN_PUTS_UNLOCKED, - BUILT_IN_FPUTC_UNLOCKED, BUILT_IN_FPUTS_UNLOCKED, - BUILT_IN_FWRITE_UNLOCKED): Declare using the regular - DEF_EXT_LIB_BUILTIN macro. - - * c-decl.c (duplicate_decls): Remove code to handle builtin - functions prototyped without an argument list. - -2003-07-26 Danny Smith - - * config/i386/winnt.c: Revert 2003-07-08 change. - (i386_pe_section_type_flags): Remove error_with_decl here too. - -2003-07-26 Gabriel Dos Reis - - * config/arm/pe.c (arm_mark_dllimport): Don't use xxx_with_decl. - * config/mcore/mcore.c (mcore_mark_dllimport): Likewise. - * config/v850/v850.c (v850_handle_data_area_attribute): Likewise. - (v850_handle_data_area_attribute): Likewise. - -2003-07-26 Geoffrey Keating - - * varasm.c (output_constant_def_contents): Use - ASM_DECLARE_CONSTANT_NAME if defined. - * doc/tm.texi (Label Output): Document ASM_DECLARE_CONSTANT_NAME. - * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Ensure zero-sized - objects get at least one byte to prevent assembler problems. - (ASM_DECLARE_CONSTANT_NAME): New. - - * Makefile.in (libbackend.o): Remove options_.h. - (mostlyclean): Likewise. - - * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Don't - insert a label at the end of an function under Mach-O. - - * c-decl.c (c_static_assembler_name): Remove TREE_STATIC test. - -2003-07-25 Aldy Hernandez - - * config/rs6000/rs6000.c (is_ev64_opaque_type): Only check pointer - equality. - (spe_init_builtins): Declare __ev64_opaque__ as a builtin type. - - * config/rs6000/spe.h: Remove __ev64_opaque__ definition. - -2003-07-25 Gabriel Dos Reis - - * doc/passes.texi (Passes): Mention pretty-printing and - diagnostic files. - -2003-07-25 Nathan Sidwell - - * doc/extend.texi (Function Attributes): GNU C++ does now allow - unused parameter decls. - (Attribute Syntax): GNU C++ does not allow label attributes to be - after the ':'. - -2003-07-25 Gabriel Dos Reis - - * objc/objc-act.c (objc_check_decl): Don't use xxx_with_decl. - (objc_declare_class): Likewise. - (error_with_ivar): Likewise. - (start_class): Likewise. - (warn_with_method): Likewise. - -2003-07-25 Gabriel Dos Reis - - Remove pedwarn_with_decl, warning_with_decl and error_with_decl - from GCC. - * calls.c (try_to_integrate): Don't use xxx_with_decl. - (expand_call): Likewise. - * dwarfout.c (output_reg_number): Likewise. - * expr.c (expand_expr): Likewise. - * function.c (assign_temp): Likewise. - (uninitialized_vars_warning): Likewise. - (setjmp_args_warning): Likewise. - (expand_function_end): Likewise. - * stmt.c (fixup_gotos): Likewise. - (warn_about_unused_variables): Likewise. - (expand_end_bindings): Likewise. - * stor-layout.c (layout_decl): Likewise. - (place_field): Likewise. - * toplev.c (check_global_declarations): Likewise. - (rest_of_handle_inlining): Likewise. - (default_tree_printer): New function. - (general_init): Initialize diagnostic machinery before routing - signals to the ICE machinery. Set default tree printer. - * toplev.h (pedwarn_with_decl): Remove declaration. - (warning_with_decl): Likewise. - (error_with_decl): Likewise. - (pedwarn): Remove attribute for the time being. - * tree-inline.c (expand_call_inline): Don't use xxx_with_decl. - * varasm.c (named_section): Likewise. - (make_decl_rtl): Likewise. - (assemble_variable): Likewise. - (merge_weak): Likewise. - (declare_weak): Likewise. - - * diagnostic.h: Move non-diagnostic stuff into pretty-print.h. - * diagnostic.c: Move non-diagnostic stuff into pretty-print.c. - (format_with_decl): Remove. - (diagnostic_for_decl): Likewise. - (pedwarn_with_decl): Likewise. - (warning_with_decl): Likewise. - (error_with_decl): Likewise. - (diagnostic_initialize): Adjust. - (diagnostic_count_diagnostic): Likewise. - (announce_function): Likewise. - (lhd_print_error_function): Likewise. - (diagnostic_report_current_module): Likewise. - (default_diagnostic_starter): Likewise. - (diagnostic_report_diagnostic): Likewise. - (default_diagnostic_finalizer): Likewise. - (verbatim): Likewise. - (error): Likewise. - (warning): Likewise. - * opts.c (common_handle_option): Likewise. - * pretty-print.c: New file. - * c-pretty-print.h (pp_base): Override. - * c-pretty-print.c: Adjust use of macros throughout. - (pp_buffer): New macro. - (pp_newline): Likewise. - * c-objc-common.c (c_tree_printer): Adjust prototype. Tidy. - * Makefile.in (DIAGNOSTIC_H): New variable. - (c-errors.o): Use it. - (c-objc-common.o): Likewise. - (c-common.o): Likewise. - (c-opts.o): Likewise. - (c-format.o): Likewise. - (diagnostic.o): Likewise. - (opts.o): Likewise. - (toplev.o): Likewise. - (rtl-error.o): Likewise. - (dwarf2out.o): Likewise. - (jump.o): Likewise. - (pretty-print.o): New rule. - -2003-07-24 Roger Sayle - - * builtins.def (BUILT_IN_PRINTF, BUILT_IN_FPRINTF): Changed from - front-end builtins to normal builtins, using DEF_LIB_BUILTIN. - (BUILT_IN_PRINTF_UNLOCKED, BUILT_IN_FPRINTF_UNLOCKED): Changed - from front-end to normal builtins, using DEF_EXT_LIB_BUILTIN. - (DEF_FRONT_END_LIB_BUILTIN): Delete. - (DEF_EXT_FRONT_END_LIB_BUILTIN): Delete. - (BUILT_IN_FWRITE_UNLOCKED): Wrap long line. - - * builtins.c (build_string_literal): New function to construct - a char* pointer to a string literal. - (expand_builtin_fputs): Change 2nd argument from "int ignore" to - "rtx target" to be consistent with other expand_builtin_* functions. - Change 3rd argument from "int unlocked" to "bool unlocked". - (expand_builtin_printf): Rewrite of c_expand_builtin_printf from - c-common.c to avoid front-end dependencies. Optimize printf("") - as a no-op when the result isn't required. Handle embedded NULs - in format string. - (expand_builtin_fprintf): A rewrite of c_expand_builtin_fprintf - from c-common.c to avoid front-end dependencies. Likewise, optimize - fprintf(fp,"") as a no-op when the result isn't required, evaluating - fp for side-effects. Handle embedded NULs in format string. - (expand_builtin_sprintf): Fix typo. - (expand_builtin): Don't expand BUILT_IN_FPRINT{,_UNLOCKED} when not - optimizing. Adjust calls of expand_builtin_fputs to match the API - change. Expand BUILT_IN_PRINTF and BUILT_IN_PRINTF_UNLOCKED using - expand_builtin_printf. Likewise, expand BUILT_IN_FPRINTF_UNLOCKED - and BUILT_IN_FPRINTF using expand_builtin_fprintf. - - * c-common.c (is_valid_printf_arglist): Delete. - (c_expand_builtin): Delete. - (c_expand_builtin_printf): Moved to builtins.c. Delete. - (c_expand_builtin_fprintf): Moved to builtins.c. Delete. - (c_expand_expr): No longer treat CALL_EXPRs specially. - (CALLED_AS_BUILT_IN): Delete. - -2003-07-24 Zdenek Dvorak - - PR optimization/11631 - * gcse.c (store_motion): Connect infinite loops to exit. - -2003-07-24 Jason Merrill - - * tree.h (boolean_type_node): Move from C/C++/Java frontends. - (boolean_true_node, boolean_false_node): Likewise. - (enum tree_index): Add TI_BOOLEAN_{TYPE,FALSE,TRUE}. - * tree.c (build_common_tree_nodes): Init boolean_type_node. - (build_common_tree_nodes_2): Init boolean_{true,false}_node. - * stor-layout.c (set_sizetype): Handle an early BOOLEAN_TYPE. - * c-common.h (truthvalue_type_node): Renamed from boolean_type_node. - (truthvalue_true_node): Renamed from boolean_true_node. - (truthvalue_false_node): Renamed from boolean_false_node. - * c-decl.c: Just set truthvalue_* to integer_*. - * c-*.[ch]: s/boolean/truthvalue/. s/c_bool/boolean/. - -2003-07-24 Roger Sayle - - * c-decl.c (match_builtin_function_types): New subroutine of - duplicate_decls to test whether a redeclaration of a builtin - function is suitably close, i.e. the return type and all of - the argument types have the same modes as the builtin expects. - (duplicate_decls): Fuzzy type matching for builtin functions - moved to match_builtin_function_types. - -2003-07-24 Zdenek Dvorak - - * cfgloopmanip.c (duplicate_loop_to_header_edge): Update irreducible - flag correctly. - -2003-07-24 Zack Weinberg - - * c-decl.c: Search-and-replace change 'binding level' to - 'scope' in commentary. - (struct binding_level): Now struct c_scope. - (current_binding_level): Now current_scope. - (free_binding_level): Now scope_freelist. - (current_function_level): Now current_function_scope. - (global_binding_level): Now global_scope. - (make_binding_level): Now make_scope. - (pop_binding_level): Now pop_scope. - -2003-07-24 Rainer Orth - - * configure.in (libgcc_visibility): Add missing whitespace. - -2003-07-24 Richard Henderson - - * libgcc-std.ver (GCC_3.3.1): Export __gcc_personality_sj0, - __gcc_personality_v0. - -2003-07-24 Rainer Orth - - * Makefile.in: Replace pwd by ${PWD_COMMAND}. - -2003-07-24 Nathan Sidwell - - * doc/invoke.texi (-fprofile-arcs, -ftest-coverage): Update - documentation missed from my 2003-07-09 patch. - -2003-07-24 Nathanael Nerode - - * aclocal.m4 (_gcc_COMPUTE_GAS_VERSION): Set patch level to 0 if - it's not provided. - * configure: Rebuild. - -2003-07-24 Steven Bosscher - - PR c/10602 - * c-typeck.c (type_lists_compatible_p): Do not compare - arguments if one of them is an error_mark_node - -2003-07-24 Alan Modra - - * config/rs6000/rs6000.c (rs6000_emit_prologue): Save fp regs inline - if current_function_calls_eh_return. - -2003-07-23 Mark Mitchell - - * doc/c-tree.texi (OFFSET_TYPE): Update description. - -2003-07-23 Bob Wilson - - * config/xtensa/crti.asm (_init, _fini): Increase frame size to 64. - * config/xtensa/lib1funcs.asm (__mulsi3, __udivsi3, __divsi3, - __umodsi3, __modsi3): Increase frame size to 32. - -2003-07-23 Geoffrey Keating - - * config/rs6000/host-darwin.c: ANSIfy, update comment for sigaltstack - prototype. - -2003-07-23 Mark Mitchell - - * doc/c-tree.texi (Types): Update documentation for OFFSET_TYPE. - - PR optimization/10679 - * tree-inline.c (inlinable_function_p): Honor MIN_INLINE_INSNS. - -2003-07-23 John David Anglin - - PR target/11607 and PR target/11516 - * pa.md (extzv, extv, insv): Revert latter half of last patch. - -2003-07-22 Mark Mitchell - - * fold-const.c (force_fit_type): Handle OFFSET_TYPE. - * varasam.c (output_constant): Likewise. - -2003-07-22 Kazu Hirata - - * alias.c: Fix comment formatting. - * c-common.c: Likewise. - * c-decl.c: Likewise. - * c-opts.c: Likewise. - * combine.c: Likewise. - * cpplib.c: Likewise. - * diagnostic.c: Likewise. - * dojump.c: Likewise. - * final.c: Likewise. - * fold-const.c: Likewise. - * gcc.c: Likewise. - * gcse.c: Likewise. - * ggc-page.c: Likewise. - * jump.c: Likewise. - * loop.c: Likewise. - * mips-tfile.c: Likewise. - * recog.c: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * tree.c: Likewise. - * tree.h: Likewise. - -2003-07-22 Per Bothner - - * line-map.c (add_line_map): Handle invalid LEAVE request. - Fixes PR preprocessor/11361. - -2003-07-22 Per Bothner - - * diagnostic.c.(diagnostic_report_current_module): Update to match - 2003-06-05 changes to push_srcloc and pop_srcloc. - -2003-07-22 Wolfgang Bangerth - - * doc/trouble.texi: Better document two-stage name lookup. - -2003-07-22 Eric Christopher - - * config/s390.c (s390_valid_pointer_mode): New. - (TARGET_VALID_POINTER_MODE): Use. - (s390_emit_prologue): Add tpf profiling hooks. - (s390_emit_epilogue): Ditto. - * config/s390.h (MASK_TPF): New. - (TARGET_TPF): Use. - (POINTERS_EXTEND_UNSIGNED): Define. - * config/s390.md (ptr_extend): New pattern. - -2003-07-22 Zack Weinberg - - * hashtable.c (approx_sqrt): Make static. - * hashtable.h: Don't prototype approx_sqrt. - * line-map.c (init_line_maps): Rename linemap_init. - (free_line_maps): Rename linemap_free. - (add_line_map): Rename linemap_add. - (lookup_line): Rename linemap_lookup. - (print_containing_files): Rename linemap_print_containing_files. - * linemap.h: Update to match. - - * cpperror.c, cppinit.c, cpplib.c, cppmacro.c: Update calls to - linemap routines to use new names. - -2003-07-16 Nathan Sidwell - - * c-common.c (handle_packed_attribute): Don't pack a struct via a - typedef. Propagate packedness from a main variant. - -2003-07-22 Nathanael Nerode - - * Makefile.in (install-common): Add dependency on installdirs. - -2003-07-21 Alexandre Oliva - - * c-common.c (c_common_type_for_mode): Return integer types for - pointer modes. - -2003-07-22 Geoffrey Keating - - * c-decl.c (start_decl): Don't call maybe_apply_pragma_weak here. - (finish_decl): Call maybe_apply_pragma_weak here. - (grokdeclarator): Check that DECL_ASSEMBLER_NAME isn't set before - TREE_PUBLIC and TREE_STATIC are decided. - (start_function): Move call to maybe_apply_pragma_weak. Check that - DECL_ASSEMBLER_NAME isn't set too early. - - * cpplex.c (_cpp_process_line_notes): Mention option name in - trigraphs warning. - -2003-07-22 Kazu Hirata - - * combine.c (if_then_else_cond): Simplify the comparison of - rtx against -1, 0, and 1. - * loop.c (check_dbra_loop): Likewise. - * optabs.c (emit_conditional_move): Likewise. - (emit_conditional_add): Likewise. - * config/i386/i386.md (*movsi_or): Likewise. - (*movdi_or_rex6): Likewise. - -2003-07-22 Jan Hubicka - - * cgraphunit.c (cgraph_finalize_compilation_unit): Remove redundant if. - -2003-07-21 Neil Booth - - * cppfiles.c (open_file_pch): Don't put unused entries in the - splay tree. Remove dead code. - -2003-07-21 Geoffrey Keating - - * c-common.h (num_in_fnames): Declare. - (c_static_assembler_name): Move from here... - * c-tree.h (c_static_assembler_name): ... to here. - * c-opts.c: Don't include langhooks-def.h. - (c_static_assembler_name): Move to c-decl.c. - (num_in_fnames): Make externally visible. - * c-decl.c: Include langhooks-def.h. - (c_static_assembler_name): Move from c-opts.c. - * Makefile.in (c-decl.o): Add $(LANGHOOKS_DEF_H). - (c-opts.o): Remove $(LANGHOOKS_DEF_H). - - * c-pragma.c (maybe_apply_pragma_weak): Don't get DECL_ASSEMBLER_NAME - when it's not needed. - -2003-07-21 Jakub Jelinek - - * config/rs6000/rs6000.h (machine_function): Add ra_need_lr. - * config/rs6000/rs6000.c (rs6000_return_addr): Set it. - (rs6000_emit_prologue): Save FPRs inline if set. - -2003-07-21 H.J. Lu - - * config/ia64/ia64.md (prefetch): Support predicate. - -2003-07-21 Josef Zlomek - - * cfgcleanup.c (merge_blocks_move_successor_nojumps): Use tablejump_p. - * rtlanal.c (tablejump_p): Use next_active_insn for finding the jump - table. - -2003-07-17 Eric Botcazou - - PR optimization/11536 - * unroll.c (loop_iterations): Do not replace a register holding - the final value by its equivalent before the loop if it is not - invariant. - -2003-07-21 Dave Fluri - - * doc/extend.texi: Fixes to spelling, grammar, and diction. - -2003-07-21 Ben Elliston - - * doc/invoke.texi (Optimize Options): Replace "it's" with "its". - (V850 Options): Spelling fixes. - -2003-07-20 Lisa M. Goldstein - - * doc/invoke.texi: Fixes to style, grammar and diction. - -2003-07-20 Roger Sayle - - * builtins.def (BUILT_IN_ALLOCA): Remove "#if SMALL_STACK" form. - * system.h (SMALL_STACK): Poison obsolete target macro. - * doc/tm.texi (SMALL_STACK): Remove target macro documentation. - -2003-07-20 Phil Edwards - - * configure.in: Cache the results of testing for cmp's capabilities. - * configure: Regenerate. - -2003-07-20 Mark Mitchell - - PR debug/11279 - * dwarf2out.c (gen_enumeration_type_die): Remember that - enumerators can be unsigned. - -2003-07-19 Zack Weinberg - - * c-decl.c (named_labels, shadowed_labels, label_level_chain) - (push_label_level, pop_label_level): Kill. - (struct binding_level): Rename level_chain to outer. - Add outer_function field. Change parm_flag, function_body, - keep, keep_if_subblocks to 1-bit bitfields of type bool. - (current_function_level): New variable. - (keep_next_level_flag, keep_next_if_subblocks): Change type to bool. - (keep_next_level, declare_parm_level, warn_if_shadowing): - Update to match. - (struct language_function): Kill named_labels, shadowed_labels fields. - (c_init_decl_processing, start_function, c_push__function_context) - (c_pop_function_context): No need to muck with named_labels nor - shadowed_labels. - - (make_binding_level): No need to clear the structure here. - (pop_binding_level): Always operate on current_binding_level. - Update current_function_level if necessary. - (pushlevel): Don't clear named_labels. Update current_function_level - if necessary. Use "true" and "false" where appropriate. - (poplevel): Diagnose labels defined but not used, or vice - versa, and clear out label-meanings leaving scope, while - walking down the decls list, for all binding levels. - Handle LABEL_DECLs appearing in the shadowed list. - pop_binding_level takes no arguments. - (pushdecl_function_level): Use current_function_level. - - (make_label, bind_label): New static functions. - (declare_label): New exported function. - (lookup_label, define_label): Rewritten for new data structure. - (shadow_label): Kill. - - * c-tree.h: Prototype declare_label; don't prototype - push_label_level, pop_label_level, nor shadow_label. - * c-parse.in: Remove all calls to push_label_level and - pop_label_level. Use declare_label for __label__ decls. - - * doc/extend.texi: Clarify that __label__ can be used to - declare labels with local scope in any nested block, not - just statement expressions. Cross-reference nested functions - section from local labels section. - -2003-07-19 Zdenek Dvorak - - * sched-rgn.c (find_rgns): Initialize current_edge correctly. - -2003-07-19 Phil Edwards - - * doc/makefile.texi (restrap, profiledbootstrap): Document targets. - -2003-07-19 Kaveh R. Ghazi - - * fixinc/fixfixes.c fixinc/fixincl.c fixinc/fixlib.c - fixinc/server.c objc/objc-act.c: Remove unnecessary casts. - -2003-07-19 Ulrich Weigand - - * config/s390/s390.c (legitimize_pic_address): Access local symbols - relative to the GOT instead of relative to the literal pool base. - (s390_output_symbolic_const): Handle new GOT-relative accesses. - * config/s390/s390.md ("call"): Access local functions and PLT stubs - relative to the GOT instead of relative to the literal pool base. - ("call_value"): Likewise. - ("call_value_tls"): Likewise. - - * config/s390/s390.c (s390_chunkify_start): Remove pool anchor - reloading. Support LTREL_BASE / LTREL_OFFSET construct. - (s390_chunkify_finish): Likewise. - (s390_chunkify_cancel): Likewise. - (s390_reorg): Adapt caller. - (find_base_register_in_addr, - find_base_register_ref, replace_base_register_ref): Delete. - (find_ltrel_base, replace_ltrel_base): New functions. - (find_constant_pool_ref): Handle LTREL_BASE unspecs. - (s390_decompose_address): Handle LTREL_BASE unspecs. Optimize - base vs. index register usage. - (struct constant_pool): Remove 'anchor'. - (s390_add_anchor): Delete. - (s390_dump_pool): Remove anchor handling. - * config/s390/s390.md ("reload_anchor"): Remove. - - * config/s390/s390.c (s390_split_branches): Use LTREL_BASE/OFFSET. - (s390_load_got): New function. Use LTREL_BASE/OFFSET. - (s390_emit_prologue): Use it. - * config/s390/s390.md ("builtin_longjmp", "builtin_setjmp_setup", - "builtin_setjmp_receiver"): Cleanup. Use s390_load_got. Do not - hard-code register 14. - * config/s390/s390-protos.h (s390_load_got): Declare. - - * config/s390/s390.c (NR_C_MODES, constant_modes, gen_consttable): - Support TImode constants. - * config/s390/s390.md ("consttable_ti"): New. - ("consttable_si", "consttable_di"): Handle TLS symbols correctly. - - * config/s390/s390.md (UNSPEC_LTREL_OFFSET, UNSPEC_LTREL_BASE, - UNSPEC_GOTENT, UNSPEC_GOT, UNSPEC_GOTOFF, UNSPEC_PLT, UNSPEC_PLTOFF, - UNSPEC_RELOAD_BASE, UNSPECV_POOL, UNSPECV_POOL_START, UNSPECV_POOL_END, - UNSPECV_POOL_QI, UNSPECV_POOL_HI, UNSPECV_POOL_SI, UNSPECV_POOL_DI, - UNSPECV_POOL_TI, UNSPECV_POOL_SF, UNSPECV_POOL_DF, UNSPECV_MAIN_POOL): - New symbolic constants. - ("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_31", "reload_base_64", - "pool", "literal_pool_31", "literal_pool_64"): Cleanup. Use - symbolic UNSPEC values. - * config/s390/s390.c (larl_operand, s390_short_displacement, - bras_sym_operand, s390_cannot_force_const_mem, - s390_delegitimize_address, s390_decompose_address, - legitimize_pic_address, s390_output_symbolic_const, - s390_function_profiler): Use symbolic UNSPEC values. - -2003-07-19 Kaveh R. Ghazi - - * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c - c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in - c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c - collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c - cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c - cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c - dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c - fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c - gcse.c genattr.c genattrtab.c genautomata.c genconditions.c - genemit.c genextract.c genoutput.c genrecog.c gensupport.c - ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c - integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c - loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c - postreload.c prefix.c print-tree.c protoize.c ra-build.c - ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c - regmove.c regrename.c reload.c reload1.c reorg.c resource.c - sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c - simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c - tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c - varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary - casts. - -2003-07-19 Gabriel Dos Reis - - * c-pragma.c (apply_pragma_weak): Don't use warning_with_decl. - * toplev.h (warning): Remove attribute. - -2003-07-19 Gabriel Dos Reis - - * c-decl.c (c_finish_incomplete_decl): Don't use xxx_with_decl. - (pop_label_level): Likewise. - (duplicate_decls): Likewise. - (implicitly_declare): Likewise. - (shadow_label): Likewise. - (start_decl): Likewise. - (finish_decl): Likewise. - (grokdeclarator): Likewise. - (get_parm_info): Likewise. - (detect_field_duplicates): Likewise. - (finish_struct): Likewise. - (start_function): Likewise. - (store_parm_decls): Likewise. - (finish_function): Likewise. - (c_expand_body_1): Likewise. - (check_for_loop_decls): Likewise. - (merge_translation_unit_decls): Likewise. - -2003-07-19 Neil Booth - - * common.opt: Document --param. - * opts.c (columns, undocumented_msg): New. - (print_help): Get number of columns from environment. Print - --param help. Tweak newline handling. - (print_param_help): New. - (print_filtered_help): Better handling of duplicates. Complain - about undocumented switches. - (print_switch): New. - (wrap_help): Improve wrapping, use COLUMNS. - * opts.sh: Ignore comments in records. - * params.def: Fix typos and remove trailing periods. - * toplev.c (display_help): Don't dump --param help. - * doc/sourcebuild.texi: Update. - -2003-07-18 Richard Henderson - - PR target/11556 - * optabs.c (prepare_operand): Fail gracefully instead of abort - if the predicate doesn't satisfy. - (gen_cond_trap): Allow prepare_operand to fail. - -2003-07-19 Gabriel Dos Reis - - * c-common.c: Don't undefine GCC_DIAG_STYLE. - (fname_decl): Don't use xxx_with_decl. - (c_add_case_label): Likewise. - (handle_section_attribute): Likewise. - (handle_alias_attribute): Likewise. - (handle_no_instrument_function_attribute): Likewise. - (handle_no_limit_stack_attribute): Likewise. - * c-objc-common.c (c_tree_printer): Print IDENTIFIER_NODEs. - * c-format.c (gcc_cdiag_char_table): Add '%E' format-specifier. - -2003-07-19 Zdenek Dvorak - - * Makefile.in (ifcvt.o): Add cfgloop.h. - * basic-block.h (EDGE_LOOP_EXIT): New flag. - * cfgrtl.c (rtl_verify_flow_info_1): Handle it correctly. - * ifcvt.c: Include cfgloop.h. - (mark_loop_exit_edges): New static function. - (if_convert): Call it. - (find_if_header): Ignore branches out of loops. - -2003-07-18 Kazu Hirata - - * combine.c (simplify_comparison): Don't share rtx when converting - (ne (and (not X) 1) 0) to (eq (and X 1) 0). - -2003-07-18 David Edelsohn - - * config/rs6000/aix.h (AGGREGATE_PADDING_FIXED): Define. - (AGGREGATES_PAD_UPWARD_ALWAYS): Define. - (MUST_PASS_IN_STACK): Define. - (BLOCK_REG_PADDING): Define. - -2003-07-18 Richard Henderson - - * cfgrtl.c (force_nonfallthru_and_redirect): Use tablejump_p - to skip the addr_vec. - -2003-07-18 Alexandre Oliva - - * combine.c (combinable_i3pat): Don't forbid occurrences of - i2dest or i1dest in inner_dest if inner_dest is a mem. - -2003-07-18 Jan Hubicka - - * cgraph.c (cgraph_remove_node): Clear the hash table slot. - -2003-07-17 Jakub Jelinek - - PR target/11087 - * loop.c (basic_induction_var): Check if convert_modes emitted any - instructions. Remove them and return 0 if so. - -2003-07-18 Eric Botcazou - - PR optimization/11083 - * toplev.c (rest_of_handle_addresof): Rename into - rest_of_handle_addressof. Delete unreachable blocks - if dead edges were purged after the addressof pass. - -2003-07-18 Neil Booth - - * Makefile.in, configure, configure.in: Remove handling of - lang-options.h and options_.h. - * toplev.c (struct lang_opt, documented_lang_options): Remove. - (display_help): Don't use documented_lang_options. - -2003-07-17 Zack Weinberg - - * c-decl.c (pushdecl_function_level): Make static, return nothing. - (kept_level_p): Fold into poplevel. - (undeclared_variable): Moved here from c-typeck.c. Export. - * c-tree.h (KEEP_YES, KEEP_NO, KEEP_MAYBE): New #defines. - (undeclared_variable): Prototype here. Don't prototype - kept_level_p nor pushdecl_function_level. - * c-parse.in: Change first argument to poplevel from - "kept_level_p()" to "KEEP_MAYBE". - * c-typeck.c (undeclared_variable): Moved to c-decl.c. - -2003-07-17 Roger Sayle - - * simplify-rtx.c (simplify_rtx): Use simplify_gen_binary to swap - commutative operands instead of modifying the RTL in-place. - -2003-07-17 Mark Mitchell - - PR optimization/11557 - * calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK - unless we know which function is being called. - -2003-07-17 Roger Sayle - - * cse.c (fold_rtx): Use swap_commutative_operands_p to determine - whether to reorder the operands of a commutative binary operator. - -2003-07-17 Roger Sayle - - * fold-const.c (const_binop): Avoid performing the FP operation at - compile-time, if either operand is NaN and we honor signaling NaNs, - or if we're dividing by zero and either flag_trapping_math is set - or the desired mode doesn't support infinities. - (fold_initializer): New function to fold an expression ignoring any - potential run-time exceptions or traps. - * tree.h (fold_initializer): Prototype here. - * c-typeck.c (build_binary_op): Move to the end of the file so - that intializer_stack is in scope. If constructing an initializer, - i.e. when initializer_stack is not NULL, use fold_initializer to - fold expressions. - * simplify-rtx.c (simplify_binary_operation): Likewise, avoid - performing FP operations at compile-time, if they would raise an - exception at run-time. - -2003-07-17 Geoffrey Keating - - PR 11498 - * Makefile.in (c-opts.o): Add $(LANGHOOKS_DEF_H). - (langhooks.o): Add $(GGC_H), gt-langhooks.h. - (GTFILES): Add langhooks.c. - (gt-langhooks.h): New. - * c-common.h (c_static_assembler_name): Prototype. - * c-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Define. - * objc/objc-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Define. - * c-opts.c: Include langhooks-def.h. - (c_static_assembler_name): New. - * langhooks.c: Include ggc.h. Include gt-langhooks.h. - (var_labelno): New. - (lhd_set_decl_assembler_name): Give static objects with context - unique names. - * varasm.c (var_labelno): Delete. - (make_decl_rtl): Don't change the assembler name once it's set. - - * c-opts.c (this_input_filename): New. - (finish_options): Take new parameter, name of file being compiled. - Update callers. Set this_input_filename. - (push_command_line_include): Use this_input_filename not - main_input_filename. - -2003-07-17 Neil Booth - - * Makefile.in: Depend .pot generation on options.c. - * po/exgettext: Add an extra_files variable containing additional - files to scan. - -2003-07-17 Zack Weinberg - - * objc/objc-lang.c: Override LANG_HOOKS_WRITE_GLOBALS to - c_write_global_declarations. - - * c-decl.c: Fix typos in several comments. Remove all - #if 0 blocks; reindent as needed. Remove unused argument - to declare_parm_level; all callers changed. - * c-parse.in: Update calls to declare_parm_level. Avoid - issuing a double warning in some circumstances. - * c-typeck.c: Update calls to declare_parm_level. - * c-tree.h: Update prototype of declare_parm_level. - - * c-pragma.c (apply_pragma_weak): Don't complain about a - redundant #pragma weak. - - * objc/objc-act.c (forward_declare_categories, - build_selector_reference_decl, build_class_reference_decl, - build_objc_string_decl, synth_forward_declarations, - build_protocol_reference): Set TREE_PUBLIC on synthetic - forward decl to 0, consistent with eventual definition. - Correct comments to match. - - * fixinc/inclhack.def (solaris_mutex_init_2): Escape braces - in regexp that don't form a range expression. - * fixinc/fixincl.def: Regenerate. - -2003-07-17 Richard Henderson - - PR target/10907 - * config/ia64/ia64.c (ia64_epilogue_uses): GP is live at end - even with !TARGET_CONST_GP. - (ia64_function_ok_for_sibcall): Reject non-local functions. - -2003-07-17 Steven Bosscher - - * c-common.c (c_estimate_num_insns_1): Don't handle - METHOD_CALL_EXPR. - * expr.c (safe_from_p): Likewise. - * gengtype.c (adjust_field_tree_exp): Likewise. - * stmt.c (warn_if_unused_value): Likewise - * tree.c (first_rtl_op): Likewise. - * tree.def: Don't define METHOD_CALL_EXPR. - * java/lang.c (java_estimate_num_insns_1): Don't handle - METHOD_CALL_EXPR. - -2003-07-17 Eric Botcazou - - PR other/11466 - * doc/invoke.texi (SPARC Options): Document "-mlittle-endian" - and its restrictions for the SPARC64 port. - Move the entry of "-mimpure-text" before that of "-mv8". - -2003-07-17 Eric Botcazou - Phil Edwards - - * doc/install.texi (*-*-solaris2*): Document the step-by-step - procedure to bootstrap and install. - Document the preference for the legacy Sun tools in /usr/bin - over the POSIX tools in /usr/xpg4/bin for the build process. - -2003-07-17 Neil Booth - - * c.opt: Document Uncodumented; use it. Document ObjC options. - * opts.c (print_filtered_help): Skip undocumented switches. - * opts.h (CL_UNDOCUMENTED): New. - * opts.sh: Handle Undocumented. - * toplev.c (documented_lang_options): Prevent its becoming empty. -objc: - * lang-options.h: Remove. - -2003-07-16 Ulrich Weigand - - * loop.c (check_ext_dependent_givs): Pass const struct loop * - instead of struct loop_info * as argument. Accept BIVs with - increment +/- 1 provided there is a friendly exit test against - a loop-invariant value. - (strength_reduce): Adapt call to check_ext_dependent_givs. - -2003-07-16 J"orn Rennecke - Con Bradley - - * sh-protos.h (sh_get_pr_initial_val): Declare. - * sh.c (regno_reg_class): Make its elements type enum reg_class. - (output_stack_adjust): Remove emit_fn argument. Add epilogue_p - and live_regs_mask arguments. Changed all callers. - (save_schedule_s): New structure. - (save_schedule): New typedef. - (scavenge_reg, sh5_schedule_saves, sh5_schedule_saves): New functions. - (calc_live_regs): For TARGET_SHMEDIA, use leaf_function_p. - In interrupts handlers, also save registers that are usually - partially saved, and make sure there is at least one general purpose - register saved if a target register needs saving. - Add casts in comparisons to avoid warnings. - (sh_media_register_for_return): return -1 for interrupt handlers. - (MAX_SAVED_REGS, MAX_TEMPS): New defines. - (sh_expand_prologue): Use sh5_schedule_saves. Check that any temp - registers used are available. - Set RTX_FRAME_RELATED_P where appropriate. - Add an REG_FRAME_RELATED_EXPR for r0 + offset addressing. - (sh_expand_epilogue, sh_set_return_address): Use sh5_schedule_saves. - (initial_elimination_offset): Likewise. - * sh.h (DWARF_CIE_DATA_ALIGNMENT): Set to -4. - (LOCAL_ALIGNMENT, GENERAL_REGISTER_P): Add casts to avoid warnings. - (FP_REGISTER_P): Add casts to fix broken handling of unsigned REGNO. - (XD_REGISTER_P, TARGET_REGISTER_P): Likewise. - (HARD_REGNO_CALL_PART_CLOBBERED): Also yield nonzero for r15, - and for target registers. - (RETURN_IN_MEMORY): Add parentheses to avoid warnings. - (regno_reg_class): Make its elements type enum reg_class. - (CONSTRAINT_LEN): Don't use isdigit. - (FUNCTION_ARG_REGNO_P): Add casts to avoid warnings. - (FUNCTION_ARG): Add parentheses to avoid warnings. - (RETURN_ADDR_RTX): Use sh_get_pr_initial_val. - (RETURN_ADDR_OFFSET): Define to -1 for TARGET_SH5. - (SH_DBX_REGISTER_NUMBER): Add casts to avoid warnings. - (EH_RETURN_DATA_REGNO): Use unsigned constants to avoid warnings. - * sh.md (xordi3+1): Remove unused variable regno. - (return_media): Check that tr0 is available before using it. - -2003-07-16 Neil Booth - - * c.opt: Document more options. - -2003-07-16 Roger Sayle - - * combine.c (subst): Also handle (subreg (const_double ...)) case - if created by a substitution, by using the original inner mode. - -2003-07-16 Roger Sayle - - * simplify-rtx.c (simplify_replace_rtx): Convert constant comparisons - to MODE_FLOAT constants if FLOAT_STORE_FLAG_VALUE is defined. - (simplify_rtx): Likewise. Simplify (lo_sum (high X) X) as X. - -2003-07-16 Andrew Pinski - - * doc/install.texi (--without-headers): New. - - Partial Fix PR/10129 - * config/darwin.c (machopic_function_base_name): Only Return "". - (machopic_output_function_base_name): New; print the true pic label. - (machopic_classify_ident): Pic Base is always a defined data. - * config/darwin.h (ASM_OUTPUT_LABELREF): Support the pic base label. - * config/darwin-proto.h (machopic_output_function_base_name): Prototype. - - * gcse.c (gcse_constant_p): COMPARE of the same registers is a constant - if they are not floating point registers. - - PR c/10962 - * ggc.h: Add header guards. - * c-decl.c (finish_struct): Sort fields if - number greater than 15 and there are no - anonymous structs/unions. - * c-common.h: Include ggc.h. - (sorted_fields_type): New struct. - (field_decl_cmp): New prototype. - (resort_sorted_fields): New prototype. - (DECL_DECLARES_TYPE_NON_TEMPLATE_P): New macro. - * c-tree.h: (lang_type): Use pointer to sorted_fields_type - as s, removing other fields. - * c-typeck.c (lookup_field): Use s in lang_type. - These were mostly moved from cp/class.c: - * c-common.c (field_decl_cmp): New static function. - (field_decl_cmp): New function. - (resort_sorted_fields): New function. - -2003-07-16 Geoffrey Keating - - * config/darwin.c (machopic_select_section): Use decl_readonly_section - to do most of the work. - -2003-07-16 Hans-Peter Nilsson - - * config/mmix/mmix-protos.h: Convert prototypes to ISO C90. - * config/mmix/mmix.c: Convert functions to ISO C90. - (mmix_eh_return_handler_rtx, mmix_output_shifted_value): Tweak - formatting. - (mmix_get_hard_reg_initial_val): Tweak section head comment. - -2003-07-16 J"orn Rennecke - - * c-pragma.h (HANDLE_PRAGMA_WEAK): Always define to SUPPORTS_WEAK. - -2003-07-16 Jakub Jelinek - - * unwind-dw2.c (MD_FROB_UPDATE_CONTEXT): Define. - (uw_update_context_1): Use it. - * config/rs6000/rs6000.c (insn_after_throw): Remove. - (rs6000_aix_emit_builtin_unwind_init): Save $r2 to its location - in parent frame if _Unwind_* called directly instead of through - .plt. - (rs6000_emit_eh_toc_restore): Remove. - (rs6000_emit_prologue): Update stack pointer before doing any saving - if current_function_calls_eh_return. Generate unwind info for $r2. - (rs6000_emit_epilogue): Restore stack pointer after doing all - restoring if current_function_calls_eh_return. Restore $r2. - * config/rs6000/rs6000-protos.h (rs6000_emit_eh_toc_restore): Remove. - * config/rs6000/rs6000.md (eh_return): Remove call to - rs6000_emit_eh_toc_restore. - * config/rs6000/linux64.h (MD_FROB_UPDATE_CONTEXT): Define. - * config/rs6000/aix.h (MD_FROB_UPDATE_CONTEXT): Define. - -2003-07-15 Jakub Jelinek - - * expr.c (emit_block_move): Don't move anything if size is const 0. - (clear_storage): Test against const0_rtx instead of comparing INTVAL - against 0. - -2003-07-15 David S. Miller - - * config/sparc/sparc.c (sparc_nonflat_function_epilogue): Only - emit nop if the last real insn is CALL_INSN. - -2003-07-16 Danny Smith - - * config/i386/xm-mingw32.h (HOST_BIT_BUCKET): Define - as "nul". - * config/i386/xm-mingw32.h: Change GNU CC to GCC. - -2003-07-16 Danny Smith - - * config/i386/winnt.c (associated_type): Artificial methods are not - affected by the import/export status of their class unless they are - COMDAT. - (i386_pe_dllimport_p): Do not mark artificial methods as dllimport. - - * config/i386/winnt.c: Fix GCC copyright comment. - -2003-07-16 Gabriel Dos Reis - - PR c++/11531 - * diagnostic.c (diagnostic_report_diagnostic): Don't ICE if we're - not recursing on hard error. - (diagnostic_for_decl): Likewise. - * diagnostic.def: Rearrange. - -2003-07-15 J"orn Rennecke - - * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): - If DWARF_FRAME_RETURN_COLUMN doesn't have a register mode, use Pmode. - -2003-07-15 J"orn Rennecke - Richard Henderson - - * unwind-dw2.c (_Unwind_GetGR): Use dwarf_reg_size_table - to decide if to access a _Unwind_Ptr or a _Unwind_Word. - (_Unwind_SetGR): Likewise. - (_Unwind_GetPtr, _Unwind_SetSpColumn): New functions. - (Unwind_SpTmp): New typedef. - (uw_update_context_1): Use _Unwind_SetSpColumn and _Unwind_GetPtr. - (uw_update_context): Use _Unwind_GetPtr. - (init_dwarf_reg_size_table): Move above uw_init_context_1. - (uw_init_context_1): Initialize dwarf_reg_size_table if necessary. - Use _Unwind_SetSpColumn. - (uw_install_context_1): Don't initialize dwarf_reg_size_table. - Use _Unwind_GetPtr. - -2003-07-15 Neil Booth - - * c.opt: Document more options. - * toplev.c (documented_lang_options): Remove all local help strings. - -2003-07-15 Mark Mitchell - - PR debug/11473 - * dbxout.c (dbxout_type): Use TYPE_SIZE to determine the sizes of - base classes. - -2003-07-15 Kazu Hirata - - PR target/10795 - * config/i386/i386.c (ix86_expand_carry_flag_compare): Don't - swap comparison operands if doing so would generate an - unrecognizable insn. - -2003-07-15 Eric Botcazou - - PR optimization/11320 - * sched-int.h (struct deps) [reg_conditional_sets]: New field. - (struct sched_info) [compute_jump_reg_dependencies]: New prototype. - * sched-deps.c (sched_analyze_insn) [JUMP_INSN]: Update call to - current_sched_info->compute_jump_reg_dependencies. Record which - registers are used and which registers are set by the jump. - Clear deps->reg_conditional_sets after a barrier. - Set deps->reg_conditional_sets if the insn is a COND_EXEC. - Clear deps->reg_conditional_sets if the insn is not a COND_EXEC. - (init_deps): Initialize reg_conditional_sets. - (free_deps): Clear reg_conditional_sets. - * sched-ebb.c (compute_jump_reg_dependencies): New prototype. - Mark registers live on entry of the fallthrough block and conditionally - set as set by the jump. Mark registers live on entry of non-fallthrough - blocks as used by the jump. - * sched-rgn.c (compute_jump_reg_dependencies): New prototype. - Mark new parameters as unused. - -2003-07-15 Richard Sandiford - - * doc/invoke.texi: Resync MIPS -march documentation. - -2003-07-15 Richard Sandiford - - * config/mips/mips.h (PROCESSOR_R9000): New processor_type. - (TARGET_MIPS9000, TUNE_MIPS9000): New macros. - (GENERATE_MULT3_SI): True for TARGET_MIPS9000. - * config/mips/mips.c (mips_cpu_info_table): Add rm9000 entry. - (mips_rtx_costs): Adjust integer multiplication costs for the rm9000. - (mips_issue_rate): Handle PROCESSOR_R9000. - (mips_use_dfa_pipeline_interface): Likewise. - * config/mips/9000.md: New file. - * config/mips/mips.md: Include it. - (define_attr cpu): Add r9000. - (mulsi3_mult3): Use "mul" for rm9000 code. - -2003-07-15 Stan Cox - - * config/mips/mips.h (PROCESSOR_R7000): New processor_type. - (TARGET_MIPS7000, TUNE_MIPS7000): New macros. - (GENERATE_MULT3_SI): True for TARGET_MIPS7000. - * config/mips/mips.c (mips_cpu_info_table): Add rm7000 entry. - (mips_rtx_costs): Adjust integer multiplication costs for the rm7000. - (mips_issue_rate): Handle PROCESSOR_R7000. - (mips_use_dfa_pipeline_interface): Likewise. - * config/mips/7000.md: New file. - * config/mips/mips.md: Include it. - (define_attr cpu): Add r7000. - (mulsi3_mult3): Use "mul" for rm7000 code. - -2003-07-15 Richard Sandiford - - * config/mips/mips.md (define_attr type): Add condmove. Use it for - the conditional move patterns. - * config/mips/5400.md (ir_vr54_move): Rename to ir_vr54_condmove. - Check for condmove type. - (ir_vr54_arith): Add move type. - * config/mips/5500.md (ir_vr55_move, ir_vr55_arith): Likewise. - * config/mips/sr71k.md (ir_sr70_move, ir_sr70_arith): Likewise. - -2003-07-15 Neil Booth - - * c-opts.c (print_help): Remove. - (c_common_handle_option): Don't handle --help. - * c.opt: Document some options. - (--help): Remove. - * opts.c (print_filtered_help): New. - (print_help): Use it. - -2003-07-14 Geoffrey Keating - - * c-common.c (c_common_type_for_mode): Handle V4DFmode. - * tree.c: (build_common_tree_nodes_2): Likewise. - * tree.h (enum tree_index): Add TI_V4DF_TYPE. - (V4DF_type_node): New. - - * c-opts.c (push_command_line_include): Don't free deferred_opts, - we'll need it. - (finish_options): Reset init_cursor. - -2003-07-15 Kazu Hirata - - * expr.c (expand_assignment): Remove an unused argument - SUGGEST_REG. - * expr.h: Update the prototype. - * function.c: Update the callers. - * stmt.c: Likewise. - -2003-07-14 Mark Mitchell - - PR debug/11098 - * integrate.c (copy_decl_for_inlining): Do not mark copied decls - as DECL_ABSTRACT. - -2003-07-14 Nathanael Nerode - - * fixinc/inclhack.def (avoid_bool_define, avoid_bool_type): Bypass - with __cplusplus, not "we must use the C++ compiler's type" - * fixinc/inclhack.def (void_null): Note that Interix needs this. - * fixinc/fixincl.x: Regenerate. - -2003-07-14 Geoffrey Keating - - * unwind-dw2-fde-darwin.c (live_image_destructor): Get seen_objects - and unseen_objects from the global data before calling - __deregister_frame_info_bases. - (examine_objects): Insert objects into the seen_objects list, - not unseen_objects. - (_Unwind_Find_FDE): Always unlock the global object lists, even if - we couldn't allocate a data structure to put in it. - - * objc/objc-act.h (CLASS_SUPER_NAME): Add a little typechecking. - (TYPE_PROTOCOL_LIST): Share use of type.context with C frontend. - (SET_TYPE_PROTOCOL_LIST): New. - * objc/objc-act.c (get_static_reference): Use SET_TYPE_PROTOCOL_LIST. - (get_object_reference): Likewise. - -2003-07-14 Jan Hubicka - - * cfglayout.c (locator_file): Break out from .... - (insn_file): ... here. - (locator_line): Break out from .... - (insn_line): ... here. - * rtl.h (locator_file, locator_line): Declare. - (final_start_function): Set proper line/file info. - -2003-07-14 Gabriel Dos Reis - - * c-pretty-print.c (pp_c_unary_expression): A CONVERT_EXPR is - handled by pp_c_cast_expression. - -2003-07-14 Richard Sandiford - - * config/mips/mips.c (mips_expand_prologue): Use a single insn to - allocate 32768 bytes of stack. Use addition rather than subtraction - when a single insn is enough. - * config/mips/mips.md: Remove insns and splitters for subtracting - constants. - (subsi3): Only accept register operands. - (subsi3_internal): Likewise. Use for TARGET_MIPS16 as well. - (subdi3_internal_3, subsi3_internal_2): Likewise. - (casesi): Use expand_binop to subtract the lower bound. - -2003-07-14 Richard Sandiford - - * config/mips/mips.c (mips_in_small_data_p): Don't handle - TARGET_MIPS16 specially. - -2003-07-14 Richard Sandiford - - * config/mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Use - mips_output_aligned_bss. - * config/mips/linux.h: Likewise. - * config/mips/mips-protos.h (mips_output_aligned_bss): Declare. - * config/mips/mips.c (mips_output_aligned_bss): New function. - - * config/mips/elf.h (DBX_DEBUGGING_INFO): Delete. - * config/mips/elf64.h: Likewise. - - * config/mips/elf.h (ASM_DECLARE_OBJECT_NAME): Use - mips_declare_object_name. - (ASM_FINISH_DECLARE_OBJECT): Likewise mips_finish_declare_object. - * config/mips/elf64.h: As for elf.h. - * config/mips/iris6.h: Likewise. - * config/mips/linux.h (ASM_DECLARE_OBJECT_NAME): As for elf.h. - * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Remove unnecessary - do...while (0) block. - * config/mips/mips-protos.h (mips_declare_object_name): Declare. - (mips_finish_declare_object): Declare. - * config/mips/mips.c (mips_declare_object_name): New function. - (mips_finish_declare_object): New function. - - * config/mips/elf.h (SBSS_SECTION_ASM_OP): Delete. - * config/mips/linux.h: Likewise. - - * config/mips/mips.c (inside_function): Delete. - (file_in_function_warning, ignore_line_number): Delete. - (mips_output_filename): Don't warn about changing filenames within - a function. - (mips_output_lineno): Update accordingly. - (mips_output_function_prologue): Don't reset the deleted variables. - * config/mips/mips.h (inside_function): Delete. - (file_in_function_warning, ignore_line_number): Delete. - - * config/mips/elf.h (OBJECT_FORMAT_COFF, EXTENDED_COFF): Remove undefs. - * config/mips/elf64.h: Likewise. - * config/mips/openbsd.h: Likewise. - * config/mips/iris5.h (OBJECT_FORMAT_COFF): Remove undefs. - * config/mips/linux.h: Likewise. - * config/mips/mips.h (OBJECT_FORMAT_COFF, EXTENDED_COFF): Delete. - (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB, MIPS_UNMARK_STAB): Delete. - - * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Add mips/sdb.h - to the list of include files when using gas. - (mips*el-*-openbsd*, mips*-*-openbsd*): Add mips/sdb.h unconditionally. - * config/mips/elf.h: Remove #undef SDB_DEBUGGING_INFO. - * config/mips/elf64.h: Likewise. - * config/mips/iris5.h: Likewise. - * config/mips/linux.h: Likewise. - * config/mips/iris5gas.h (SDB_DEBUGGING_INFO): Remove definition. - * config/mips/mips.h (PREFERRED_DEBUGGING_TYPE): Likewise. - (SDB_DEBUGGING_INFO, sdb*, SDB_ALLOW_*, PUT_SDB*): Move to... - * config/mips/sdb.h: ...this new file. - -2003-07-14 Douglas Rupp - - * fixinc/server.c (server_setup): Don't use non-POSIX NULL first - argument to getcwd; use fixed buffer instead. - -2003-07-14 Nathanael Nerode - - * fixinc/mkfixinc.sh: Treat OpenBSD normally. - * fixinc/fixinc.wrap: Delete. - -2003-07-14 Dan Nicolaescu - - * ggc-page.c (extra_order_size_table): Insns have 9 slots. Regs - don't have 2. - -2003-07-14 Dan Nicolaescu - - * ggc-page.c (struct globals): Add new fields to keep track of the - total allocated memory and overhead. - (ggc_print_statistics): Print them. - (ggc_alloc): Keep track of the total allocated memory and the - overhead. - - * tree.c (dump_tree_statistics): Increase spacing. - (enum tree_node_kind): Move to ... - * tree.h (enum tree_node_kind): ... here. - (tree_node_counts, tree_node_sizes): Declare. - -2003-07-14 James A. Morrison - - * doc/include/texinfo.tex: Upgrade to texinfo 4.6. - -2003-07-14 Franz Sirl - - PR optimization/11440 - * gcse.c (try_replace_reg): Don't attach notes to ZERO_EXTRACT or - SIGN_EXTRACT SETs. - -2003-07-14 Alan Modra - - * doc/tm.texi (BLOCK_REG_PADDING): Describe. - * expr.h (struct locate_and_pad_arg_data): Add where_pad. - (emit_group_load, emit_group_store): Adjust declarations. - Remove most occurrences of #ifdef TREE_CODE. - * expr.c (emit_group_load): Add "type" param, and use - BLOCK_REG_PADDING to determine need for a shift. Optimize non- - aligned accesses if !SLOW_UNALIGNED_ACCESS. - (emit_group_store): Likewise. - (emit_push_insn, expand_assignment, store_expr, expand_expr): Adjust - emit_group_load and emit_group_store calls. - * calls.c (store_unaligned_arguments_into_pseudos): Tidy. Use - BLOCK_REG_PADDING to determine whether we need endian_correction. - (load_register_parameters): Localize vars. Handle shifting of - small values to the correct end of regs. Adjust emit_group_load - call. - (expand_call, emit_library_call_value_1): Adjust emit_group_load - and emit_group_store calls. - * function.c (assign_parms): Set mem alignment for stack slots. - Adjust emit_group_store call. Store values at the "wrong" end - of regs to the stack. Use BLOCK_REG_PADDING. - (locate_and_pad_parm): Save where_pad. - (expand_function_end): Adjust emit_group_load call. - * stmt.c (expand_value_return): Adjust emit_group_load call. - * Makefile.in (calls.o): Depend on $(OPTABS_H). - * config/rs6000/linux64.h (TARGET_LITTLE_ENDIAN): Redefine as 0. - (AGGREGATE_PADDING_FIXED, AGGREGATES_PAD_UPWARD_ALWAYS): Define. - (MUST_PASS_IN_STACK): Define. - (BLOCK_REG_PADDING): Define. - * config/rs6000/rs6000.h (struct rs6000_args): Remove orig_nargs. - (PAD_VARARGS_DOWN): Define in terms of FUNCTION_ARG_PADDING. - * config/rs6000/rs6000.c (init_cumulative_args): Don't set orig_nargs. - (function_arg_padding): !AGGREGATE_PADDING_FIXED compatibility code. - Act on AGGREGATES_PAD_UPWARD_ALWAYS. - -2003-07-13 Aaron W. LaFramboise - - * config/i386/gthr-win32.c (__GTHREAD_HIDE_WIN32API): Define to 1. - -2003-07-13 Richard Kenner - - * expr.c (expand_expr, case COMPONENT_REF): If reg, copy OP0 to MEM - both if OFFSET specified and if result BLKmode for ARRAY_RANGE_REF. - -2003-07-13 Nathanael Nerode - - PR other/11123 - * toplev.c: Don't cut off option names. - -2003-07-13 Andreas Jaeger - - * c-decl.c (link_hash_hash): Avoid warning about casting pointer - to integer of different size. - -2003-07-13 Kazu Hirata - - * combine.c (simplify_comparison): Convert (ne (and (not X) 1) 0) - to (eq (and X 1) 0). - -2003-07-13 Andreas Jaeger - - * config.gcc: Add pmmintrin.h for x86_64-*-*. - -2003-07-13 Zack Weinberg - - * Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H). - (hashtable.o, line-map.o, mkdeps.o): Likewise, from dependency - list. Move these all together down by cpplib. - - * cpplib.h: Don't refer to MAX_WCHAR_TYPE_SIZE when determining - definition of CPPCHAR_SIGNED_T. - - * cppcharset.c, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, cppinit.c - * cpplex.c, cpplib.c, cppmacro.c, cpppch.c, cpptrad.c, hashtable.c - * line-map.c, mkdeps.c: Don't include coretypes.h or tm.h. - - * cpphash.c (_cpp_init_hashtable): Don't use gcc_obstack_init. - * cppinit.c (cpp_create_reader): Likewise. - - * cpphash.h (scan_out_logical_line): Rename _cpp_scan_out_logical_line. - * cpptrad.c: Likewise. All callers changed. - * cpplib.c: All callers changed. - * c-ppoutput.c: Replace 'uchar' with 'unsigned char' throughout. - * hashtable.h: Define GTY(x) to nothing here too. - -2003-07-13 Richard Kenner - - * stor-layout.c (compute_record_mode): Remove very obsolete test - that forces BLKmode for records with fields crossing word boundary. - -2003-07-13 Zack Weinberg - - * Makefile.in: Remove orphan reference to acconfig.h. - -2003-07-13 Andreas Jaeger - - * cgraphunit.c: Convert prototypes to ISO C90. - -2003-07-13 Nathanael Nerode - - * fixinc/inclhack.def (avoid_wchar_t_type): Use __cplusplus bypass - (for OpenBSD). - * fixinc/fixincl.x: Rebuild. - -2003-07-12 Zack Weinberg - - * configure.in: Always define HAVE_AS_GOTOFF_IN_DATA for - i?86-*-*. Use correct name of cache variable. - * configure: Regenerate. - -2003-07-12 Kazu Hirata - - * config/alpha/alpha.c: Fix comment typos. - * config/alpha/alpha.md: Likewise. - * config/arm/arm.c: Likewise. - * config/arm/arm.md: Likewise. - * config/arm/lib1funcs.asm: Likewise. - * config/avr/avr.md: Likewise. - * config/arm/README-interworking: Fix typos. - -2003-07-12 Kazu Hirata - - * c-format.c: Fix comment formatting. - * c-typeck.c: Likewise. - * coverage.c: Likewise. - * cppcharset.c: Likewise. - * cpplib.c: Likewise. - * dbxout.c: Likewise. - * gcov-io.h: Likewise. - * toplev.c: Likewise. - -2003-07-12 Nathanael Nerode - - * fixinc/inclhack.def (alpha_sbrk): Note that OpenBSD needs this - fix. - -2003-07-12 Zack Weinberg - - * aclocal.m4 (gcc_AC_CHECK_TYPE): Clone of AC_CHECK_TYPE, - uses three-argument AC_DEFINE so no acconfig.h entries are - needed. - (_gcc_COMPUTE_GAS_VERSION): Also provide gcc_cv_gas_vers - which contains the GAS version number as a scaled integer. - (gcc_GAS_VERSION_GTE_IFELSE): Use gcc_cv_gas_vers. Add - ability to check for ELF assembler. - (gcc_GAS_CHECK_FEATURE): New macro. - * configure.in: Use gcc_AC_CHECK_TYPE. Rewrite all - assembler feature checks using gcc_GAS_CHECK_FEATURE. - Use three-argument AC_DEFINE everywhere. - * acconfig.h: Deleted. - * config.in, configure: Regenerate. - -2003-07-12 Nathanael Nerode - - * fixinc/inclhack.def (struct_sockaddr): Avoid "fixing" sockaddr_in - (on OpenBSD). - * fixinc/fixincl.x: Regenerate. - - * fixinc/inclhack.def (gnu_types): Improve comment. - -2003-07-12 Andreas Jaeger - - * fp-test.c (main): Use ISO C90 prototype. - - * version.c: Remove unneded include of ansidecl.h. - - * cgraph.h: Convert prototypes to ISO C90. - * cgraph.c: Likewise. - * fix-header.c: Likewise. - * ra.h: Likewise. - * protoize.c: Likewise. - -2003-07-12 Jan Hubicka - - * cgraphunit.c (cgraph_inlined_into, cgraph_inlined_calees): Fix - warning. - -2003-07-12 Jan Hubicka - Gerald Pfeifer - - * cgraph.c (cgraph_max_uid): New global variable. - (cgraph_node): Set uid field. - (create_edge): Keep inline flags consistent. - (dump_cgraph): Dump more info. - * cgraph.h (struct cgraph_local_info): Remove inline_many and - can_inline_once; add inlinable, disgread_inline_limits, and self_insn - (struct cgraph_global_info): Add insns, calls, cloned_times, - will_be_output. - (struct cgraph_node): Add uid. - (struct cgraph_edge): Add inline_call. - (cgraph_max_uid, cgraph_inline_p): Declare. - * cgraph.c: Include params.h and fibheap.h - (cgraph_mark_functions_to_inline_once): Kill. - (INSNS_PER_CALL): New constant. - (ncalls_inlined, nfunctions_inlined, initial_insns, overall_insns): New - static variables. - (cgraph_finalize_function): Do not analyze inlining. - (cgraph_finalize_compilation_unit): Set inlining attributes. - (cgraph_mark_functions_to_output): More consistency checks. - (cgraph_optimize_function): Set current_function_decl to NULL. - (cgraph_expand_function): Use new inline flags. - (cgraph_postorder): Expand from cgraph_expand_functions. - (INLINED_TIMES, SET_INLINED_TIMES): New macros. - (cgraph_inlined_into, cgraph_inlined_callees, - cgraph_estimate_size_after_inlining, cgraph_estimate_growth, - cgraph_mark_inline, cgraph_check_inline_limits, - cgraph_default_inline_p, cgraph_decide_inling_of_small_functions, - cgraph_decide_inlining, cgraph_inline_p): New functions. - * params.def (PARAM_LARGE_FUNCTION_INSNS, PARAM_LARGE_FUNCTION_GROWTH, - PARAM_INLINE_UNIT_GROWTH): New parameters. - * tree-inline.c (struct inline_data): New field current_decl. - (expand_call_inline): Avoid forward declarations; use - inlinable_function_p. - (optimize_inline_calls): Set id.current_decl. - -2003-07-11 Andrew Pinski - - * configure.in: Remove wrongly added definition of - local_prefix. - * configure: Regenerate. - -2003-07-11 Dan Nicolaescu - - * rtl.def (NOTE): Do not use padding. - -2003-07-11 Dara Hazeghi - - * doc/install.tex: Update required binutils for i?86-*-linux* - -2003-07-11 Richard Henderson - - * Makefile.in (stage1_build): Force OBJS-onestep=OBJS. - -2003-07-11 Mark Mitchell - - * varasm.c (make_decl_rtl): Treat decls with a DECL_CONTEXT of - TRANSLATION_UNIT_DECL as top_level. - -2003-07-11 Jakub Jelinek - - * optabs.c (prepare_cmp_insn): Try cmpmemM first if it exists, - then fall back to cmpstrM. - * builtins.c (expand_builtin_memcmp): Likewise. - * config/s390/s390-protos.h (s390_expand_cmpstr): Rename to... - (s390_expand_cmpmem): ... this. - * config/s390/s390.md (cmpmemdi, cmpmemsi, cmpmem_short_64, - cmpmem_short_31, cmpmem_long_64, cmpmem_long_31): Renamed - from cmpstr* patterns. Rename call to s390_expand_cmpstr - to s390_expand_cmpmem. - * config/s390/s390.c (s390_expand_cmpstr): Rename to... - (s390_expand_cmpstr): ... this. Rename cmpstr* instructions - to cmpmem*. - * config/i370/i370.md (cmpmemsi, cmpmemsi_1): Renamed from - cmpstr* patterns. - * doc/md.texi (cmpstrM): Describe as String compare insn, not - Block compare insn. - (cmpmemM): Add. - -2003-07-11 Loren James Rittle - - * config/i386/freebsd.h (SET_ASM_OP): Remove. - (SUBTARGET_OVERRIDE_OPTIONS): Handle TARGET_64BIT case. - (ASM_COMMENT_START, ASM_APP_ON, ASM_APP_OFF, DBX_REGISTER_NUMBER - MCOUNT_NAME, SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE_SIZE): Whitespace. - -2003-07-11 Richard Henderson - - * function.c (assign_parms): Don't recombine complex args if - fnargs is unchanged from orig_fnargs. - (split_complex_args): Return args without complex before copying. - Re-layout the modified parameters. - -2003-07-11 J"orn Rennecke - - * regclass.c (choose_hard_reg_mode): Add third argument. - Changed all callers. - * rtl.h (choose_hard_reg_mode): Update declaration. - * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): - Take HARD_REGNO_CALL_PART_CLOBBERED into account. - -2003-07-11 Geoffrey Keating - - * c-decl.c (finish_decl): Handle 'used' here... - * cgraphunit.c (cgraph_finalize_function): ... and here ... - * c-common.c: (handle_used_attribute): ... not here. - - * configure.in (onstep): Support --enable-intermodule. - * Makefile.in (OBJS-common): New. - (OBJS-md): New. - (OBJS-archive): New. - (OBJS): Build from OBJS-common, OBJS-md, OBJS-archive. - (OBJS-onestep): New. - (libbackend.a): Support @onestep@. - (libbackend.o): New. - * configure: Regenerate. - - * c-common.h (c_reset_state): New prototype. - (c_parse_file): New prototype. - (finish_file): Move prototype from c-tree.h. - * c-decl.c: Include . - (builtin_decls): New. - (current_file_decl): New. - (duplicate_decls): Add extra parameter. Change all callers. Don't - output duplicate common symbols. - (link_hash_hash): New. - (link_hash_eq): New. - (poplevel): Handle popping of the top level. - (warn_if_shadowing): Handle TRANSLATION_UNIT_DECL. - (pushdecl): Set DECL_CONTEXT to TRANSLATION_UNIT_DECL if appropriate. - (pushdecl_top_level): Likewise. - (redeclaration_error_message): Handle TRANSLATION_UNIT_DECL. - (c_init_decl_processing): Create TRANSLATION_UNIT_DECL. - (finish_decl): Handle TRANSLATION_UNIT_DECL. - (merge_translation_unit_decls): New. - (c_write_global_declarations): New. - (c_reset_state): New. - (implicitly_declare): Handle TRANSLATION_UNIT_DECL. - * c-lang.c (LANG_HOOKS_WRITE_GLOBALS): New. - * c-objc-common.c (c_cannot_inline_tree_fn): Handle - TRANSLATION_UNIT_DECL. - (c_objc_common_finish_file): Call merge_translation_unit_decls. - * c-opts.c (in_fnames): Rename from in_fname. - (c_common_decode_option): Handle multiple input filenames. - (c_common_post_options): Likewise. - (c_common_parse_file): Likewise; also, call c_parse_file rather than - yyparse. - * c-parse.in: Move cleanup code to c_parse_file. - (free_parser_stacks): Move contents to c_parse_file. - (c_parse_file): New. - * c-tree.h (union lang_tree_node): Chain along TYPE_NEXT_VARIANT - for integer types. - (C_DECL_FILE_SCOPE): New. - (finish_file): Move prototype to c-common.h. - (merge_translation_unit_decls): New prototype. - (comptypes): Add extra parameter to prototype. - (c_write_global_declarations): New prototype. - * c-typeck.c (tagged_types_tu_compatible_p): New. - (function_types_compatible_p): Add extra parameter, change all callers. - (type_lists_compatible_p): Likewise. - (comptypes): Likewise. - (struct tagged_tu_seen): New. - (tagged_tu_seen_base): New. - (build_unary_op): Handle TRANSLATION_UNIT_DECL. - (c_mark_addressable): Remove #if 0 code. - * calls.c (special_function_p): Handle TRANSLATION_UNIT_DECL, add - comment explaining why it shouldn't have to. - * cgraph.h (struct cgraph_node): Add chain_next and chain_prev GTY - options. - * cppinit.c (cpp_read_next_file): New. - (cpp_read_main_file): Use it. - * cpplib.c (undefine_macros): New. - (cpp_undef_all): New. - * cpplib.h (cpp_read_next_file): Prototype. - (cpp_undef_all): Prototype. - * langhooks-def.h (write_global_declarations): Remove prototype. - * toplev.h (write_global_declarations): Add prototype. - * tree.c (decl_type_context): Use switch statement, handle - TRANSLATION_UNIT_DECL. - * tree.def: Update documentation for TRANSLATION_UNIT_DECL. - (TRANSLATION_UNIT_DECL): New kind of tree. - * tree.h: Update documentation for TRANSLATION_UNIT_DECL. - * Makefile.in (c-decl.o): Add $(HASHTAB_H) to dependencies. - * doc/invoke.texi: Make attempt to document new functionality. - - 2003-05-19 Per Bothner - - * gcc.c (combine_inputs): New. - (process_command): Set combine_inputs. - (do_spec_1): Handle combine_inputs. - (main): Likewise. - -2003-07-10 James E Wilson - - PR optimization/9745 - * loop.c (loop_iv_add_mult_emit_before): Call loop_regs_update before - loop_insn_emit_before. - (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. - -2003-07-10 Zack Weinberg - - * cppcharset.c: Fix comment. - (iconv_close [!HAVE_ICONV]): #define to (void)0 to prevent warning. - (EILSEQ): #define to EINVAL if not already defined. - (convert_using_iconv): #if out when !HAVE_ICONV. - (init_iconv_desc): Handle !HAVE_ICONV here... - (cpp_init_iconv): ...not here. - -2003-07-11 Neil Booth - - * common.opt: More --help messages. - * opts.c (print_help): Use puts(). - * toplev.c (f_options): Remove help text. - (display_help): Don't dump f_options. - -2003-07-11 Nathanael Nerode - - * fixinc/mkfixinc.sh: Drop reference to unsupported alpha-*-interix*. - Move i?86-*-interix* to the don't-fix list. - * fixinc/fixinc.interix: Delete with extreme prejudice. - -2003-07-10 Dara Hazeghi - - PR bootstrap/10758 - * doc/install.texi: Document requirements for ia64-*-hpux* target. - -2003-07-10 Roger Sayle - - * config/ia64/hpux.h (TARGET_C99_FUNCTIONS): Define. - -2003-07-10 Zack Weinberg - - * cppcharset.c (one_utf8_to_cppchar, one_cppchar_to_utf8, - one_utf8_to_utf32, one_utf32_to_utf8, one_utf8_to_utf16, - one_utf16_to_utf8, conversion_loop, convert_utf8_utf16, - convert_utf8_utf32, convert_utf16_utf8, convert_utf32_utf8, - convert_no_conversion, convert_using_iconv): New functions. - (APPLY_CONVERSION): New macro. - (struct conversion, conversion_tab): New data structure. - (init_iconv_desc): Check conversion_tab for a custom conversion - primitive before trying to use iconv. - (convert_cset): Deleted. - (cpp_init_iconv): Use UTF- terminology, not UCS-. - (_cpp_destroy_iconv): Update to match. - (_cpp_valid_ucn): We don't need iconv to implement UCNs. - (convert_ucn): Use one_cppchar_to_utf8 and APPLY_CONVERSION. - (convert_escape, cpp_interpret_string): Use APPLY_CONVERSION. - (_cpp_interpret_string_notranslate): New function, moved here - from cpplib.c. - - * cpphash.h (convert_f, struct cset_converter): New types. - (struct cpp_reader): narrow_cset_desc and wide_cset_desc - are now struct cset_converter, not bare iconv_t. - Update prototypes. - * cpplib.c (interpret_string_notranslate): Moved to cppcharset.c; - all callers changed. - -2003-07-10 Kelley Cook - - * Makefile.in (options.h): Depend on Makefile. Add move-if-change - to opts.sh command line. - * opts.sh: Write to temporary files with a move-if-change at the end. - -2003-07-10 Denis Chertykov - Richard Kenner - - * combine.c (gen_binary): Handle the CLOBBER rtx and - don't build a binary operation with it. - -2003-07-10 Zdenek Dvorak - - * gcse.c (load_kills_store, find_loads, store_killed_in_insn, - store_killed_after, store_killed_before): Keep track of the correct - dependency function to use. - -2003-07-10 Steven Bosscher - * toplev.c (do_compile): Don't try to open dump files before - lang_dependent_init initializes dump_base_name. - -2003-07-10 Kaveh R. Ghazi - - * config/arm/arm.c (arm_init_iwmmxt_builtins, arm_expand_builtin): - Use ARRAY_SIZE. - * config/frv/frv.c (frv_expand_builtin): Likewise. - * config/sh/sh.c (sh_media_init_builtins): Likewise. - -2003-07-09 Mark Mitchell - - PR c++/10032 - * doc/invoke.texi (C++ Dialect Options): Change documentation of - -fpermissive. - -2003-07-10 J"orn Rennecke - - * tm.texi (RETURN_ADDR_OFFSET): Document. - -2003-07-10 Nathan Sidwell - - * gcov-io.h: Update documentation. - (GCOV_UNSIGNED2STRING): New. - (GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH, - GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH, - GCOV_TAG_SUMMARY_LENGTH): Adjust. - (GCOV_TAG_BLOCKS_NUM, GCOV_TAG_ARCS_NUM, - GCOV_TAG_COUNTER_NUM): New. - (GCOV_BLOCK_SIZE): Number of words. - (gcov_var): Adjust buffer type. - * gcov-io.c (gcov_write_bytes, gcov_read_bytes): Rename to ... - (gcov_write_words, gcov_read_words): ... here. Take a 4-byte word - count, not byte count. - (gcov_open): Adjust overread init. - (gcov_allocate, gcov_write_unsigned, gcov_write_counter, - gcov_write_string, gcov_write_tag, gcov_write_length, - gcov_write_tag_length): Adjust. - (gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust. - (gcov_sync, gcov_seek): Adjust. - * gcov-dump.c (print_usage): Show gcc version only. - (dump_file): Use GCOV_UNSIGNED2STRING. - (tag_blocks, tag_arcs, tag_counters): Use GCOV_TAG_*_NUM macros. - * gcov.c (print_version): Show gcc version only. - (read_graph_file): Use GCOV_UNSIGNED2STRING. Use - GCOV_TAG_*_NUM macros. - (read_count_file): Use GCOV_UNSIGNED2STRING. Use - GCOV_TAG_COUNTER_LENGTH. - * coverage.c (read_counts_file): Use GCOV_UNSIGNED2STRING. - Use GCOV_TAG_COUNTER_NUM. - * libgcov.c (gcov_version): Use GCOV_UNSIGNED2STRING. - (__gcov_merge_single, __gcov_merge_delta): Use GCOV_CHECK. - -2003-07-10 Andreas Schwab - - * gcov-dump.c (dump_file): Fix missing address operator. - -2003-07-10 Kazu Hirata - - PR c/11449 - * fold-const.c (sign_bit_p): Return EXP if VAL is the sign bit - of HOST_WIDE_INT. - (fold_single_bit_test): If sign_bit_p() fails, assume that the - bit being tested is not a sign bit. - -2003-07-10 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-07-10 Alexandre Oliva - - 2001-12-13 Alexandre Oliva - * config/mn10300/linux.h (LINK_SPEC): Rename the dynamic linker - from ld-linux.so.2 to ld.so.1. - 2001-11-18 Alexandre Oliva - * config/mn10300/linux.h (LINK_SPEC): -lpthread, not -lthread. - * config/mn10300/linux.h (LINK_SPEC): Don't handle -Wl,-rpath - nor -Wl,-rpath-link. - (LIB_SPEC): Add -rpath-link if !static. - 2001-08-22 Alexandre Oliva - * config/mn10300/mn10300.c (mn10300_protect_label): New - variable. - * config/mn10300/linux.h (PRINT_OPERAND, - PRINT_OPERAND_ADDRESS): Set it during their execution. - (ASM_OUTPUT_LABELREF): Output `+' before symbol name if - mn10300_protect_label is set. - * config/mn10300/linux.h (LINK_SPEC): Recognize -Wl,-rpath and - -Wl,-rpath-link. - (LIB_SPEC, STARTFILE_SPEC): Define. - 2001-05-11 Alexandre Oliva - * config/mn10300/t-linux (dp-bit.c, fp-bit.c): Don't define - FLOAT_BIT_ORDER_MISMATCH. - 2001-05-09 Alexandre Oliva - * config.gcc (am33_2.0-*-linux*): Added. - * config/mn10300/linux.h: New. - * config/mn10300/t-linux: New. - -2003-07-10 Andreas Jaeger - - * fold-const.c: Properly wrap prototypes. - -2003-07-09 Alexandre Oliva - - 2003-06-16 Alexandre Oliva - * config/mn10300/mn10300.c (mn10300_unspec_int_label_counter): - Moved from... - * config/mn10300/mn10300.md (GOTaddr2picreg): ... here. - * config/mn10300/mn10300.h: GTY-declare it. - 2003-06-11 Alexandre Oliva - * config/mn10300/mn10300.c (mn10300_encode_section_info): Fix - prototype. Use incoming RTL argument. - 2002-12-12 Alexandre Oliva - * config/mn10300/mn10300.md (int_label): Move C statements... - (GOTaddr2picreg): ... here. - 2002-08-15 Alexandre Oliva - * config/mn10300/mn10300.h (ENCODE_SECTION_INFO): Move... - * config/mn10300/mn10300.c (mn10300_encode_section_info): - ... here. New function. - (TARGET_ENCODE_SECTION_INFO): Define to it. - 2001-11-04 Alexandre Oliva - * config/mn10300/mn10300.md (builtin_setjmp_receiver): Fix typo in - pattern name. - (mn10300_loadPC): Define as insn splittable after reload. - 2001-05-13 Alexandre Oliva - * config/sh/mn10300.h (JUMP_TABLES_IN_TEXT_SECTION): Let them - be defined in .rodata even in PIC, now that the assembler - supports that. - 2001-05-09 Alexandre Oliva - * config/mn10300/mn10300.h (GOT_SYMBOL_NAME): Don't let the - symbol take an underscore prefix. - 2001-04-14 Alexandre Oliva - * config/mn10300/mn10300-protos.h (legitimate_pic_operand_p, - legitimize_pic_address): Declare. - * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): Mark - the PIC register as fixed. - (EXTRA_CONSTRAINT): Match UNSPEC_PLT and UNSPEC_PIC for 'S'. - (GO_IF_LEGITIMATE_ADDRESS): Require legitimate_pic_operand for - PIC. - (LEGITIMATE_PIC_OPERAND_P): Define. - (PIC_OFFSET_TABLE_REGNUM): Define. - (GOT_SYMBOL_NAME): Define. - (SYMBOLIC_CONST_P): Define. - (ENCODE_SECTION_INFO): Use SYMBOL_REF_FLAG to mark local - symbols. - (MN10300_GLOBAL_P): Test it. - (OUTPUT_ADDR_CONST_EXTRA): Handle PIC-related unspecs. - (JUMP_TABLES_IN_TEXT_SECTION): Enable for PIC. - * config/mn10300/mn10300.c (print_operand): Handle unspec. - (expand_prologue): Set PIC register. - (call_address_operand): Don't match SYMBOL_REFs in PIC. - (legitimize_address): Call legitimize_pic_address. - (legitimize_pic_address): New fn. - (legitimate_pic_operand_p): New fn. - * config/mn10300/mn10300.md (PIC_REG, SP_REG): New constants. - (UNSPEC_INT_LABEL, UNSPEC_PIC, UNSPEC_GOT, UNSPEC_GOTOFF, - UNSPEC_PLT): New constants. - (pop_pic_reg): New insn. - (movsi): Adjust non-PIC addresses. - (builtin_setjmp_receiver): Restore the PIC register. - (casesi): New insn. - (call): Adjust non-PIC addresses. - (int_label, GOTaddr2picreg): New expands. - (am33_loadPC): New insn. - (mn10300_loadPC): New expand. - (call_next_insn): New insn. - (add_GOT_to_pic_reg): New expand. - (symGOT2reg, symGOT2reg_i): New expands. - (symGOTOFF2reg, symGOTOFF2reg_i): New expands. - (sym2PIC, sym2PLT): New expands. - -2003-07-09 Alexandre Oliva - - * config/mn10300/mn10300.h (PREDICATE_CODES): Define. - 2001-05-01 Alexandre Oliva - * config/mn10300/mn10300.md (sqrtsf2): flag_fast_math was renamed - to flag_unsafe_math_optimizations. - 2001-04-14 Alexandre Oliva - * config/mn10300/mn10300.c (expand_prologue): Mark - FP-register-saving insns as frame-related. - 2001-02-13 Alexandre Oliva - * config/mn10300/mn10300.c - (mn10300_get_live_callee_saved_regs): Don't search past - LAST_EXTENDED_REGNUM. - (mn10300_gen_multiple_store, store_multiple_operation): Likewise. - * config/mn10300/mn10300.md: Remove excessive line breaks from - `@' output patterns that were accounted as additional - alternatives. - * config/mn10300/mn10300.md, config/mn10300/mn10300.c: - Re-introduce changes accidentally removed in Richard Sandiford's - 2000-12-05's patch. - * config/mn10300/t-mn10300 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): - Re-instate am33-2 lost in merge from net GCC. - 2000-08-26 Alexandre Oliva - * config/mn10300/mn10300.h (DBX_REGISTER_NUMBER): Added - floating-point registers. - 2000-08-07 Alexandre Oliva - * config/mn10300/mn10300.md (movdf): Revert some am33-specific - pessimizations that had gone in on 2000-05-08. - 2000-06-28 Graham Stott - * config/mn10300/mn10300.h (REG_CLASS_CONTENTS): Fix typo. - 2000-06-22 Graham Stott - * config/mn10300/mn10300.md (movqi): Use nonimmediate_operand for - operand 0. - * (movhi): Likewise. - * (movsi): Likewise. - * (movsf): Likewise. - * (movdi): Likewise. - * (movdf): Likewise. - 2000-05-24 Alexandre Oliva - * config/mn10300/mn10300.c (fp_regs_to_save): New function. - (can_use_return_insn, initial_offset): Add fp_regs_to_save. - (expand_prologue, expand_epilogue): Save and restore FP regs. - 2000-05-20 Alexandre Oliva - * config/mn10300/mn10300.md (movdi, movdf): 64-bit clean-up. - 2000-05-13 Alexandre Oliva - * config/mn10300/mn10300.md (abssf2, negsf2, rsqrtsf2, addsf3, - subsf3, mulsf3, divsf3, fmaddsf4, fmsubsf4, fnmaddsf4, fnmsubsf4): - Do not clobber cc0. - 2000-05-12 Alexandre Oliva - * config/mn10300/mn10300.md (abssf2, negsf2, rsqrtsf2): - Discourage the two-argument, longer opcodes. - (addsf3, subsf3, mulsf3, divsf3): Likewise for three-argument - ones. - * config/mn10300/mn10300.h (struct mn10300_cc_status_mdep): New. - (CC_STATUS_MDEP, CC_STATUS_MDEP_INIT): Define. - * config/mn10300/mn10300.md (cmpsf): New pattern. - (branch): Test mdep.fpCC and output fbCC. - * config/mn10300/mn10300.c (print_operand): Output conditions. - (notice_cc_update): Recognize fcmp and set mdep.fpCC. - 2000-05-10 Alexandre Oliva - * config/mn10300/mn10300.md (movsf, movdf, addsf3, subsf3, - mulsf3, divsf3): Use the `F' constraint for FP values. - * config/mn10300/mn10300.c (const_1f_operand): New function. - * config/mn10300/mn10300-protos.h (const_1f_operand): Declare. - * config/mn10300/mn10300.md (sqrtsf2): New expand. - (rsqrtsf2): New insn. - 2000-05-09 Alexandre Oliva - * config/mn10300/mn10300.md (movdf): Oops, I missed it in my - previous check-in. - 2000-05-08 Alexandre Oliva - * config/mn10300/mn10300.md (abssf2, negdf2): On - TARGET_AM33_2, expand to... - (abssf2_am33_2, negdf2_am33_2): New insns. - (addsf3, subsf3, mulsf3, divsf3): Likewise. - (fmaddsf4, fmsubsf4, fnmaddsf4, fnmsubsf4): Likewise. - * config/mn10300/mn10300.md (movqi, movhi, movsi, movsf, - movdi, movdf): Added FP regs. - * invoke.texi (-mam33-2, -mno-am33-2): Document. - 2000-04-29 Alexandre Oliva - * config/mn10300/mn10300.h (FIRST_FP_REGNUM, LAST_FP_REGNUM): - New macros. - (REGNO_AM33_2_FP_P): Renamed to... - (REGNO_FP_P): Redefine in terms of FIRST_* and LAST_*. - (CONDITIONAL_REGISTER_USAGE, REGNO_REG_CLASS): Likewise. - 2000-04-27 Alexandre Oliva - * config/mn10300/mn10300.h (REG_CLASS_CONTENTS): Remove FP - regs from GENERAL_REGS. - 2000-04-27 Alexandre Oliva - * config/mn10300/mn10300.h (REGNO_AM33_2_FP_P): New macro. - * config/mn10300/mn10300.c (mn10300_address_cost): Added FP_REGS. - * config/mn10300/mn10300.h (REGISTER_MOVE_COST): Added FP_REGS. - 2000-04-23 Alexandre Oliva - * config/mn10300/mn10300.h (CLASS_CANNOT_CHANGE_SIZE): Defined - as FP_REGS. - 2000-04-21 Alexandre Oliva - * config/mn10300/mn10300.h (OK_FOR_Q): New macro. - (EXTRA_CONSTRAINT): Added OK_FOR_Q. - * config/mn10300/mn10300.c (secondary_reload_class): Adjust. - * config/mn10300/mn10300.c (print_operand): Support `D' for doubles. - * config/mn10300/mn10300.h (FIRST_PSEUDO_REGISTER): Adjust. - (FIXED_REGISTERS, CALL_USED_REGISTERS, REG_ALLOC_ORDER): Added - AM33/2.0 floating-point registers. - (CONDITIONAL_REGISTER_USAGE): Adjust. - (enum reg_class, REG_CLASS_NAMES): Added FP_REGS and FP_ACC_REGS. - (REG_CLASS_CONTENTS, REGNO_REG_CLASS): Adjust. - (REG_CLASS_FROM_LETTER): Added `f' and `A'. - (REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): Adjust. - * config/mn10300/t-mn10300 (MULTILIB_OPTIONS): Added am33-2. - (MULTILIB_DIRNAMES): Likewise. - * config/mn10300/mn10300.h (CPP_SPEC): Define `__AM33__=2' and - `__AM33_2__' when `-mam33-2' is given. - (TARGET_AM33_2): Define. - (TARGET_SWITCHES): Adjust. - * config/mn10300/mn10300.c (asm_file_start): Print `.am33_2' - when appropriate. - -2003-07-09 Matt Kraai - - * doc/install.texi: Add missing @. - -2003-07-09 Bob Wilson - - * config/xtensa/xtensa.h (CRT_CALL_STATIC_FUNCTION): Define. - -2003-07-09 Aldy Hernandez - - PR/11144 - * config/i386/i386.c (ix86_function_arg_boundary): Remove abort. - -2003-07-09 Nathanael Nerode - - PR bootstrap/11043 - * config/arc/t-arc: Replace bogus references to "x-crtinit.o", - "x-crtfini.o" with "crtinit.o", "crtfini.o". - - * fixinc/inclhack.def (limits_ifndefs): Add select test. - * fixinc/fixincl.x: Rebuild. - - * fixinc/inclhack.def (math_exception): Improve bypass and comment. - * fixinc/fixincl.x: Rebuild. - -2003-07-09 Hans-Peter Nilsson - - * doc/install.texi (Configuration): Document the valgrind option - to --enable-checking. - -2003-07-09 Jan Hubicka - - * objc-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. - -2003-07-09 Rainer Orth - - * c-lex.c (cb_ident): Cast cstr.text to const char *. - -2003-07-09 Nathan Sidwell - - * gcov-io.h: Update documentation. - (GCOV_GRAPH_SUFFIX, GCOV_GRAPH_MAGIC): Rename to GCOV_NOTE_SUFFIX, - GCOV_NOTE_MAGIC. - (GCOV_DATA_SUFFIX, GCOV_NOTE_SUFFIX): Update. - (GCOV_DATA_MAGIC, GCOV_NOTE_MAGIC): Make non-palindromic. - (struct gcov_var): Change buffer's type. Add endian flag. - (gcov_open): Remove mode in libgcov. - (gcov_magic): Prototype. - * gcov-io.c (from_file): New. - (gcov_open): Clear endian flag. - (gcov_magic): New. - (gcov_write_bytes, gcov_read_bytes): Return gcov_unsigned_t - pointers. - (gcov_write_unsigned, gcov_write_counter, gcov_write_string, - gcov_write_tag, gcov_write_length, gcov_write_tag_length): Update. - (gcov_read_unsigned, gcov_read_counter, gcov_read_string): Update. - * gcov-iov.c (main): Correct cast. - * coverage.c (read_counts_file): Use gcov_magic. Remove endianness - conversion. - (gcov_begin_output): Use GCOV_NOTE_MAGIC. - (coverage_init): Use GCOV_NOTE_SUFFIX. - * libgcov.c (gcov_version_mismatch): Remove endianness conversion. - Rename to gcov_version, and return flag. - (gcov_exit): Use gcov_version. - (__gcov_init): Use gcov_version. - * Makefile.in (coverageexts): Update. - * gcov.c (print_version): Remove endianness conversion. - (create_file_names): Use GCOV_NOTE_SUFFIX. - (read_graph_file): Use gcov_magic. - (read_count_file): Likewise. - * gcov-dump.c (dump_file): Remove endianness conversion, use - gcov_magic. - -2003-07-09 Nathan Sidwell - - * configure.in (BUILD_PREFIX, BUILD_PREFIX_1): Set if enable - coverage is on. - * configure: Regenerated. - * Makefile.in (ALL_CFLAGS): Correct its comment. - -2003-07-08 Mark Mitchell - - * fold-const.c (make_range): Do not access operand 1 for a - zero-operand operator. - -2003-07-09 Neil Booth - - * toplev.c (warn_dummy, W_options): Die. - (display_help): Don't print W_options. - * common.opt: Add W_options help from toplev.c. - -2003-07-09 Andreas Jaeger - - * opts.c (wrap_help): Only pass int arguments as arguments to - printf's '*' modifier. Change argument of function. - -2003-07-08 Matt Kraai - - * doc/invoke.texi: Fix misspelling of "@item". - -2003-07-08 Kazu Hirata - - * config/i386/i386.md: Remove an old comment about - NOTICE_UPDATE_CC. - -2003-07-09 Jan Hubicka - - * cgraph.c (cgraph_node_name): New function. - (dump_cgraph): Use it. - * cgraph.h (cgraph_dump_file): Declare. - (cgraph_node_name): Declare. - * cgraphunit.c: Include timevar.h - (cgraph_finalize_compilation_unit): Use timevar; reorganize dumps. - (cgraph_optimize_function): Use TV_INTEGRATION. - (cgraph_mark_local_functions): reorganize dumps. - (cgraph_mark_functions_to_inline_once): Likewise. - (cgraph_optimize): Likewise; use timevar. - * timevar.def (TV_CGRAPH, TV_CGRAPHOPT): New. - * toplev.c (dump_file_index): Add DFI_cgraph. - (dump_file_info): Likewise. - (cgraph_dump_file): New global variable. - (do_compile): Open and close cgraph dump. - * invoke.texi (-d): Document new flag; renumber. - -2003-07-08 Roger Sayle - - PR c/11370 - * calls.c (emit_call_1): Don't bother popping the arguments off of - the stack after a noreturn function call; The adjustment is dead. - (expand_call): Likewise. - -2003-07-08 Geoffrey Keating - - * expr.c (MOVE_MAX_PIECES): Move from here... - * defaults.h (MOVE_MAX_PIECES): ... to here. - -2003-07-08 Matt Kraai - - * Makefile.in (stage1-start): Handle an empty SUBDIRS. - -2003-07-08 Kaveh R. Ghazi - - * genattr.c (internal_dfa_insn_code): Don't prototype. - * genattrtab.c (attr_desc): Add `static_p' field. - (expand_units): Make blockage range and ready cost functions - static. - (write_attr_get): Don't add extern prototypes in C file. Mark - static functions as appropriate. - (find_attr, make_internal_attr): Initialize static_p. - * genattrtab.h (ATTR_STATIC): New macro. - * genautomata.c (output_internal_reset_func): Mark output function - as inline. - (make_internal_dfa_insn_code_attr): Mark output function as static. - -2003-07-08 Kaveh R. Ghazi - - * genattrtab.h: Add new macros for attr `special' flags. - * genattrtab.c (attr_desc): Reorder/resize fields better. - Use attr `special' macros in all calls to make_internal_attr. - * genautomata.c: Likewise. - -2003-07-09 Jan Hubicka - - * c-common.c (c_estimate_num_insns_1): New static function. - (c_estimate_num_insns): New global function. - * c-common.h (DECL_NUM_STMTS): Rename to... - (DECL_ESTIMATED_INSNS): ... this. - (c_estimate_num_insns): Declare. - * c-decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS. - * c-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. - * c-semantics.c (add_stmt): Do not account statements. - * langhooks-def.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): - New. - * langhooks.h (lang_hooks_for_tree_inlining): Add - estimate_num_insns - * params.def (max-inline-insns-auto, max-inline-insns-auto): set - to 100. - (max-inline-insns): set to 300. - (min-inline-insns): set to 10. - * tree-inline.c (struct inline_data): Rename inlined_stmts to - inlined-insns. - (INSNS_PER_STMT): Kill. - (inlinable_function_p): Compute and store body size. - (expand_call_inline): Likewise. - (optimize_inline_calls): Likewise. - -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 Danny Smith - - PR bootstrap/11455 - * config/i386/winnt.c: Replace use of error(), warning() with - error_with_decl(), warning_with_decl(), throughout. - -2003-07-08 Neil Booth - - * opts.c (wrap_help): Use unsigned int, not size_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 Zack Weinberg - - * Makefile.in (fixinc.sh): Remove gnu-regex.[ch] from dependencies. - * fixinc/Makefile.in: Remove all references to gnu-regex.[och]. - * fixinc/fixfixes.c, fixinc/fixincl.c, fixinc/fixlib.c - * fixinc/fixtests.c: Use xregexec not regexec, xregcomp not regcomp. - * fixinc/fixlib.h: Include xregex.h not gnu-regex.h. - * fixinc/inclhack.def (hpux10_cpp_pow_inline, hpux11_cpp_pow_inline): - Escape { and } characters which are not part of range expressions. - * fixinc/fixincl.x: Regenerate. - * fixinc/gnu-regex.c, fixinc/gnu-regex.h: Delete file. - -2003-07-08 Steven Bosscher - - PR c/1687 - * tree-inline.c (find_alloca_call): Use - walk_tree_without_duplicates, instead of walk_tree. - (find_builtin_longjmp_call): Likewise. - * c-objc-common.c (c_cannot_inline_fn): Likewise. - * c-semantics.c (find_reachable_label): Likewise. - -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. - -2003-07-08 Chris Demetriou - - * Makefile.in (install-po): Cope with empty CATALOGS. - -2003-07-08 Richard Sandiford - - * config/mips/elf64.h (TARGET_ASM_UNIQUE_SECTION): Delete. - (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete. - (SECTION_FUNCTION_TEMPLATE): Delete. - * config/mips/elf.h: As for elf64.h. - (ASM_OUTPUT_ALIGNED_BSS): Use named_section rather than sbss_section. - * config/mips/linux.h: As for elf.h - * config/mips/iris6gld.h (TARGET_ASM_UNIQUE_SECTION): Delete. - * config/mips/iris6.h (EXTRA_SECTIONS): Delete. - (EXTRA_SECTION_FUNCTIONS): Remove sdata_section. Remove the handling - of in_sdata from current_section_name and current_section_flags. - * config/mips/iris6gld.h (TARGET_ASM_UNIQUE_SECTION): Delete. - * config/mips/mips.h (sdata_section, sbss_section): Remove prototypes. - (MASK_GP_OPT, TARGET_GP_OPT): Delete. - (MASK_NO_FUSED_MADD): Use MASK_GP_OPT's old value. - (TARGET_SWITCHES): Neuter gpOPT, gpopt, no-gpOPT and no-gpopt. - (SMALL_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove. - * config/mips/mips.c (TARGET_IN_SMALL_DATA_P): Override. - (TARGET_SECTION_TYPE_FLAGS): Override if TARGET_IRIX6. - (mips_classify_symbol): Use SYMBOL_REF_SMALL_P. - (override_options): Remove setting of MASK_GPOPT. - (mips_output_external): Use mips_in_small_data_p to check whether a - symbol needs an .extern directive. Don't emit such directives for - TARGET_EXPLICIT_RELOCS. - (mips_declare_object): Update accordingly. - (mips_select_rtx_section): Call named_section rather than - SMALL_DATA_SECTION. - (mips_select_section): Use default_elf_section_section for everything - except .text string constants. - (mips_in_small_data_p): New function. - (mips_encode_section_info): Remove small data handling. - (mips_unique_section): Delete. - (iris6_section_type_flags): New function. - * doc/tm.texi: Remove documentation of -mgpopt and -mhalf-pic. - -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 Zack Weinberg - - * system.h: Poison MAP_CHARACTER. - * config/i370/i370-protos.h (mvs_map_char): Delete. - * config/i370/i370.c (ascebc, ebcasc, mvs_map_char): Delete. - * config/i370/i370.h (MAP_CHARACTER): Delete definition. - (ASM_OUTPUT_ASCII): Don't use MAP_CHARACTER. - -2003-07-08 Danny Smith - - * toplev.c (randomize): Correct call to time(). - -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-08 Kazu Hirata - - * doc/md.texi: Fix the description of addmodecc. - -2003-07-07 Zack Weinberg - - * Makefile.in (top_builddir): Set to "..", not ".". - (INTLLIBS, INTLDEPS): Delete. - (LIBINTL, LIBINTL_DEP, LIBICONV_DEP): New variables to be substituted. - (LIBDEPS): Add $(LIBICONV_DEP). - (LIBS): Take out $(INTLLIBS), add $(LIBINTL) and $(LIBICONV). - (INCLUDES): Replace -I../intl with @INCINTL@. - ($(top_builddir)/intl/libintl.a): Delete rule. - (stage2-start, stage3-start, stage4-start, stageprofile-start, - stagefeedback-start): Use $$ for variable to be evaluated by - shell, not make. - * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, - HAVE_LC_MESSAGES, HAVE_STPCPY): Delete. - * aclocal.m4: sinclude ../config/progtest.m4. Add - contents of lcmessage.m4 from gettext distro. - * configure.in: Check for wchar.h and setlocale. Set - LIBICONV_DEP to the empty string and substitute it. - Call AM_LC_MESSAGES. Delete AC_ARG_ENABLE for --enable-nls; - this is handled elsewhere. Use ZW_GNU_GETTEXT_SISTER_DIR, - not CY_GNU_GETTEXT. Clear $LIBICONV if its text is included - in $LIBINTL, to avoid linking it twice. - * configure, config.in: Regenerate. - -2003-07-08 Nathanael Nerode - - * fixinc/mkfixinc.sh: Remove winnt support. - * fixinc/fixinc.winnt: Delete with extreme prejudice. - -2003-07-08 Neil Booth - - * Makefile.in: Update. - * c-opts.c (c_common_handle_option): opt_text now contains the '-'. - * c.opt: Update documentation. - * common.opt: Add some help text. - * opts.c: Include intl.h. - (wrap_help, print_help): New. - (find_opt, handle_option, common_handle_option): opt_text now - contains the '-'. Use print_help to output help. - * opts.h (struct cl_option): New member "help". - * opts.sh: Update to handle help text output and to prepend - options with '-'. - * toplev.c (display_help): Remove some help text. - -2003-07-07 David Edelsohn - Fariborz Jahanian - - * configure.in: Test for PowerPC mfcr field support in assembler. - * config.in, configure: Regenderated. - - * config/rs6000/power4.md: Add mfcrf reservation. - * config/rs6000/rs6000-protos.h (mfcr_operation): Declare. - * config/rs6000/rs6000.c (mfcr_operation): Define. - (print_operand): Add 'Q' case for mfcrf. - * config/rs6000/rs6000.h (TARGET_MFCRF): New. - * config/rs6000/rs6000.md (attribute "type"): Add mfcrf. - (movcc_internal1): Emit optional field operand for mfcr and set - "type" attribute appropriately. - (mfcr SCC): Likewise. - (movesi_from_cr_one): New. - -2003-07-07 Roger Sayle - - * config/i386/i386.md: Correct check-in of incorrect version. - -2003-07-07 Kaveh R. Ghazi - - * bitmap.c (debug_bitmap_file): Merge uses of HOST_PTR_PRINTF with - adjacent stdio calls. - * c-decl.c (c_print_identifier): Likewise. - * mips-tfile.c (write_varray, write_object, allocate_cluster): Likewise. - * print-rtl.c (print_rtx): Likewise. - * print-tree.c (print_node_brief, print_node): Likewise. - * system.h (HOST_PTR_PRINTF): Ensure we have a literal string. - - * configure.in (AC_COMPILE_CHECK_SIZEOF): Check for `void *'. - * config.in, configure: Regenerated. - -2003-07-07 Roger Sayle - - PR target/10979 - * config/i386/i386.md (atan2df3, atan2sf3, atan2xf3, atan2tf3): - Changed to define_expand patterns that copy operand[1] to prevent - it from being clobbered before emitting an atan2?f3_1 insn. - (atan2df3_1, atan2sf3_1, atan2xf_1, atan2tf3_1): New define_insn - patterns that actually specify the behaviour of x87's FPATAN. - -2003-07-07 Jakub Jelinek - - * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Remove bogus - clearing of SYMBOL_FLAG_LOCAL bit. - If vcall_offset fits into signed 16-bit immediate, use - one instruction for both addition and load. - -2003-07-07 Neil Booth - - * opts.c (common_handle_option): Correct handling of the - -falign- switches that do and don't take an argument. - -2003-07-07 Kazu Hirata - - * config/h8300/h8300.md (pushqi1_h8300hs): Revert my patch - today. - (pushhi1_h8300hs): Likewise. - -2003-07-07 Andreas Jaeger - - * genextract.c: Convert remaining prototypes to ISO C90. - - * cpplex.c (_cpp_free_buff): Convert prototype to ISO C90. - * fold-const.c (fold_single_bit_test): Likewise. - * diagnostic.c (default_diagnostic_finalizer): Likewise. - * cfgrtl.c (rtl_redirect_edge_and_branch): Likewise. - - * gengtype.c (write_array): Generate ISO C90 prototypes. - - * genflags.c (gen_proto): Generate ISO C90 prototypes. - -2003-07-07 Roger Sayle - - PR optimization/11059 - * expr.c (can_store_by_pieces): Return true if length is zero. - (store_by_pieces): If length is zero and endp is two, abort, - othwerise, if length is zero and endp is not two, return "to". - (clear_by_pieces): Do nothing if length is zero. - (clear_storage): Do nothing if length is zero. - (store_constructor): Simplify code when size is zero, or the - target has already been cleared. This avoids emitting a - blockage instruction when initializing empty structures. - -2003-07-07 Andreas Jaeger - - * mips-tfile.c: Convert prototypes to ISO C90. - * mips-tdump.c: Convert prototypes to ISO C90. - -2003-07-07 Nathan Sidwell - - * rtl.h (emit_line_note): Take a location_t. - (emit_line_note_force): Remove. - (set_file_and_line_for_statement): Take a location_t. - * tree.g (emit_line_note): Take a location_t. - * emit-rtl.c (emit_line_note): Take a location_t. - (emit_line_note_force): Remove. - * function.c (init_function_start): Adjust emit_line_note call. - (expand_function_end): Use force_next_line_note, not - emit_line_note_force. - * c-parse.in (maybe_type_qual): Adjust emit_line_note calls. - * c-semantics.c (genrtl_do_pushlevel, genrtl_goto_stmt, - genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, - genrtl_while_stmt, genrtl_do_stmt_1, genrtl_return_stmt, - genrtl_for_stmt, genrtl_break_stmt, genrtl_continue_stmt, - genrtl_continue_stmt, genrtl_switch_stmt, - genrtl_asm_stmt): Likewise. - * expr.c (expand_expr): Likewise. - * integrate.c (expand_inline_function): Likewise. - * stmt.c (set_file_and_line_for_stmt): Take a location_t. - (expand_decl_init): Adjust emit_line_note call. - -2003-07-07 Dale Johannesen - - * config/rs6000/darwin-tramp.asm: Fix trampolines. PR 10900. - -2003-07-07 Andreas Jaeger - - * config/i386/i386-protos.h: Convert prototypes to ISO C90. - * config/i386/i386.c: Likewise. - -2003-07-07 Kazu Hirata - - * config/h8300/h8300.md: Use gen_int_mode instead of - GEN_INT (trunc_int_for_mode (...)). - -2003-07-07 Kazu Hirata - - * config/h8300/h8300.md (pushqi1_h8300hs): Optimize by pushing - 2 bytes and then subtract 2 from the stack pointer. - (pushhi1_h8300hs): Likewise. - -2003-07-07 Nathan Sidwell - - * configure.in (enable_coverage): Remove -DSELF_COVERAGE, add - -frandom-seed. - * configure: Regenerated. - * Makefile.in: Remove extraneous comment. - * toplev.c (randomize): Protect against potential multiple calls. - * doc/invoke.texi (-frandom-seed): Document use for in coverage - files. - -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-07 Andrew Pinski - - * cppcharset.c (ICONV_CONST): Define iff !HAVE_ICONV. - (convert_cset): Change inbuf to type ICONV_CONST char. - * Makefile.in (LIBS): Add LIBICONV. - - * 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-06 Art Haas - - * f/global.c (ffeglobal_type_string_): Fix obsolete GCC array - initializer syntax. - -2003-07-06 James E Wilson - - PR optimization/9812 - * rtl.h (mem_for_const_double): Delete prototype. - * varasm.c (mem_for_const_double): Delete function. - * config/m68k/hp320.h, config/m68k/linux.h, config/m68k/m68kelf.h, - config/m68k/m68kv4.h, config/m68k/netbsd-elf.h - (LEGITIMATE_PIC_OPERAND_P): Delete duplicate definitions. - * config/m68k/m68k.h (LEGITIMATE_CONSTANT_P): Disallow XFmode. - (LEGITIMATE_PIC_OPERAND_P): Delete CONST_DOUBLE tests. - * config/m68k/m68k.md (movxf): Add reload_in_progress guard. Add - comment about confused support for XFmode constants. - -2003-07-07 Jan Hubicka - - * cfglayout.c (fixup_reorder_chain): Call delete_dead_jumptables. - -2003-07-06 Kazu Hirata - - * config/h8300/h8300.c: Fix comment typos. - * config/h8300/h8300.md: Likewise. - * config/i386/athlon.md: Likewise. - * config/i386/i386.c: Likewise. - * config/i386/pentium.md: Likewise. - * config/ia64/ia64.c: Likewise. - * config/ia64/itanium1.md: Likewise. - * config/ia64/itanium2.md: Likewise. - * config/m32r/m32r.md: Likewise. - * config/m68hc11/m68hc11.c: Likewise. - * config/mcore/mcore.c: Likewise. - * config/mips/sr71k.md: Likewise. - * config/mips/t-iris5-as: Likewise. - * config/mmix/mmix.h: Likewise. - * config/ns32k/ns32k.h: Likewise. - * config/ns32k/NOTES: Fix a typo. - -2003-07-06 Andreas Jaeger - - * stmt.c: Convert remaining prototypes to ISO C90. - * cfglayout.c: Likewise. - * dbxout.c: Likewise. - * gcc.c: Likewise. - * genemit.c: Likewise. - - * basic-block.h: Convert prototypes to ISO C90. - * c-parse.in: Likewise. - * c-pragma.h: Likewise. - * c-typeck.c: Likewise. - * cfghooks.h: Likewise. - * cfgloopanal.c: Likewise. - * dbxout.h: Likewise. - * debug.h: Likewise. - * dwarf2asm.h: Likewise. - * gcov.c: Likewise. - * gengtype-lex.l: Likewise. - * sched-int.h: Likewise. - * timevar.c: Likewise. - -2003-07-06 Neil Booth - - * c-common.h (c_comon_handle_filename, - c_common_missing_arguement): New. - * c-lang.c (LANG_HOOKS_HANDLE_FILENAME, - LANG_HOOKS_MISSING_ARGUMENT): New. - * c-opts.c (missing_arg): Rename c_common_missing_argument, - update to be an appropriate langhook. - (c_common_handle_option): Don't handle filenames. - (c_common_handle_filename): New. - * hooks.c (hook_void_constcharptr, - hook_bool_constcharptr_size_t_false): New. - * hooks.h (hook_void_constcharptr, - hook_bool_constcharptr_size_t_false): New. - * langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME, - LANG_HOOKS_MISSING_ARGUMENT): New. - (LANG_HOOKS_INITIALIZER): Update. - * langhooks.h (struct lang_hooks): Add handle_filename and - missing_argument. - * opts.c (handle_option): Don't handle filenames here, but ... - (handle_options): ... here. - (common_handle_option): Don't handle missing arguments here. - * objc/objc-lang.c (LANG_HOOKS_HANDLE_FILENAME, - LANG_HOOKS_MISSING_ARGUMENT): New. - -2003-07-06 Neil Booth - - * Makfile.in: Remove traces of mbchar. - * c-parse.in (MULTIBYTE_CHARS): Remove. - * config.in (MULTIBYTE_CHARS): Remove. - * configure: Remove --enable-mbchar. - * configure.in: Remove --enable-mbchar. - * mbchar.c, mbchar.h: Remove. - * system.h: Poison MULTIBYTE_CHARS. - * config/linux-aout.h (MULTIBYTE_CHARS): Remove. - * config/linux.h (MULTIBYTE_CHARS): Remove. - * config/svr4.h (MULTIBYTE_CHARS): Remove. - * config/sparc/linux.h (MULTIBYTE_CHARS): Remove. - -2003-07-06 Andreas Jaeger - - * varray.c (varray_check_failed): Fix typo. - - * unroll.c: Convert prototypes to ISO C90. - * varasm.c: Likewise. - * varray.c: Likewise. - * varray.h: Likewise. - * vmsdbgout.c: Likewise. - * xcoffout.c: Likewise. - * xcoffout.h: Likewise. - -2003-07-06 Nathan Sidwell - - * gcov-io.h: Add a local time stamp. - (struct gcov_info): Add stamp field. - (gcov_truncate): New. - * coverage.c (read_counts_file): Skip the stamp. - (coverage_begin_output): Write the stamp. - (build_gcov_info): Declare and init the stamp. - (coverage_finish): Only unlink data file, if stamp is zero. - * gcov-dump.c (dump_file): Dump the stamp. - * gcov.c (bbg_stamp): New. - (release_structures): Clear bbg_stamp. - (read_graph_file): Read stamp. - (read_count_file): Check stamp. - * libgcov.c (gcov_exit): Check stamp and truncate if needed. - -2003-07-06 Nathan Sidwell - - * tree.h (default_flag_random_seed): Remove. - * toplev.h (local_tick): Declare. - * tree.c (flag_random_seed, default_flag_random_seed): Move to - toplev.c. - (append_random_chars): Don't call default_flag_random_seed. - * toplev.c (flag_random_seed): Define here. Set local_tick. - (local_tick): Define. - (randomize): New, moved from tree.c. - (print_switch_values): Adjust. - (toplev_main): Call randomize. - -2003-07-06 Nathan Sidwell - - * tree.h (crc32_string): Declare. - * tree.c (append_random_chars): Remove. - (crc32_string): New. - (get_file_function_name_long): Use crc32_string here. - -2003-07-06 Andreas Jaeger - - * gcc.c: Convert prototypes to ISO C90. - * gcc.h: Likewise. - * gcov-dump.c: Likewise. - * gcov-iov.c: Likewise. - * gcse.c: Likewise. - * genattrtab.h: Likewise. - * ggc.h: Likewise. - * global.c: Likewise. - * graph.c: Likewise. - * graph.h: Likewise. - * hosthooks.h: Likewise. - * hooks.h: Likewise. - * hooks.c: Likewise. - * hashtable.h: Likewise. - * hashtable.c: Likewise. - * haifa-sched.c: Likewise. - * integrate.h: Likewise. - * integrate.c: Likewise. - * input.h: Likewise. - * ifcvt.c: Likewise. - * jump.c: Likewise. - * langhooks-def.h: Likewise. Add extern to prototypes. - * langhooks.c: Likewise. - * langhooks.h: Likewise. - * lcm.c: Likewise. - * local-alloc.c: Likewise. - * loop-init.c: Likewise. - * loop-unroll.c: Likewise. - * loop-unswitch.c: Likewise. - * loop.c: Likewise. - * loop.h: Likewise. Add extern to prototypes. - * machmode.h: Likewise. - * main.c: Likewise. - * mbchar.c: Likewise. - * mbchar.h: Likewise. - * mkdeps.c: Likewise. - * mkdeps.h: Likewise. - * optabs.c: Likewise. - * optabs.h: Likewise. - * output.h: Likewise. - * gccspec.c: Likwise. - * postreload.c: Likewise. - * prefix.c: Likewise. - * prefix.h: Likewise. - * print-rtl.c: Likewise. - * print-tree.c: Likewise. - * profile.c: Likewise. - * read-rtl.c: Likewise. - * real.c: Likewise. - * real.h: Likewise. - * recog.c: Likewise. - * recog.h: Likewise. - * reg-stack.c: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * regrename.c: Likewise. - * regs.h: Likewise. - * reload.c: Likewise. - * reload.h: Likewise. - * reload1.c: Likewise. - * reorg.c: Likewise. - * resource.c: Likewise. - * resource.h: Likewise. - * rtl-error.c: Likewise. - * rtl.c: Likewise. - * rtl.h: Likewise. - * rtlanal.c: Likewise. - * sbitmap.c: Likewise. - * sbitmap.h: Likewise. - * scan-decls.c: Likewise. - * scan.c: Likewise. - * sched-deps.c: Likewise. - * sched-ebb.c: Likewise. - * sched-int.h: Likewise. - * sched-rgn.c: Likewise. - * sched-vis.c: Likewise. - * sibcall.c: Likewise. - * simplify-rtx.c: Likewise. - * sreal.c: Likewise. - * sreal.h: Likewise. - * ssa-ccp.c: Likewise. - * ssa-dce.c: Likewise. - * ssa.c: Likewise. - * ssa.h: Likewise. - * stack.h: Likewise. - * stmt.c: Likewise. - * stor-layout.c: Likewise. - * stringpool.c: Likewise. - * target.h: Likewise. - * timevar.c: Likewise. - * timevar.h: Likewise. - * tlink.c: Likewise. - * tracer.c: Likewise. - * tree-inline.c: Likewise. - * tree-inline.h: Likewise. - * tree.c: Likewise. - * tree.h: Likewise. - -2003-07-05 Kazu Hirata - - * combine.c (nonzero_bits1): Fix a warning. - -2003-07-05 Kazu Hirata - - * config/h8300/h8300.c (compute_mov_length): Correct the - length of loading CONST0_RTX (SFmode). - -2003-07-05 Nathan Sidwell - - * toplev.c (output_clean_symbol_name): Remove. - * toplev.h (output_clean_symbol_name): Remove. - * config/alpha/alpha.c (unicosmk_output_module_name): Use - lbasename & clean_symbol_name. - -2003-07-05 Kazu Hirata - - * ggc.h: Follow spelling conventions. - * config/i386/i386.c: Likewise. - * config/i386/winnt.c: Likewise. - * config/rs6000/rs6000.c: Likewise. - -2003-07-05 Kazu Hirata - - * bt-load.c: Fix comment typos. - * c-incpath.c: Likewise. - * cfg.c: Likewise. - * cfgcleanup.c: Likewise. - * cfgloop.h: Likewise. - * cfgloopmanip.c: Likewise. - * cfgrtl.c: Likewise. - * diagnostic.h: Likewise. - * dwarfout.c: Likewise. - * emit-rtl.c: Likewise. - * et-forest.c: Likewise. - * et-forest.h: Likewise. - * expr.c: Likewise. - * gcse.c: Likewise. - * genattr.c: Likewise. - * jump.c: Likewise. - * langhooks.h: Likewise. - * local-alloc.c: Likewise. - * loop-unroll.c: Likewise. - * loop-unswitch.c: Likewise. - * ra-build.c: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * rtl.def: Likewise. - * rtlanal.c: Likewise. - * sched-ebb.c: Likewise. - * sched-rgn.c: Likewise. - * simplify-rtx.c: Likewise. - * ssa.c: Likewise. - * tracer.c: Likewise. - * tree.c: Likewise. - -2003-07-05 Zack Weinberg - - * cppcharset.c: Use the correct return type for the fallback iconv - macro. - -2003-07-05 Zdenek Dvorak - - Blame to Jan Hubicka - * cfglayout.c (record_effective_endpoints): Split insns before - first basic block correctly. - -2003-07-05 Richard Kenner - - * expr.c (expand_expr, case COMPONENT_REF): When seeing if should use - bitfield operations, use STRICT_ALIGNMENT, not SLOW_UNALIGNED_ACCESS - if EXPAND_CONST_ADDRESS or EXPAND_INITIALIZER. - -2003-07-05 Andreas Jaeger - - * genattrtab.c (write_attr_get): Revert part of last patch to - always write out a prototype. - - * genemit.c (gen_split): Readd lost unused attributes in last - patch. - -2003-07-05 Zdenek Dvorak - - * cfgloopmanip.c (force_single_succ_latches): Force latch to be - different from header. - -2003-07-05 Andreas Schwab - - * config/m68k/m68k.c: Remove code protected by CRDS. - * config/m68k/m68k.md: Likewise. - -2003-07-05 Neil Booth - - PR driver/11417 - * c-opts.c (permit_fortran_options): New. - (c_common_init_options): Accept fortran front end options if - it looks like we might be preprocessing Fortran. - (c_common_handle_option): Don't reject switch if permit_fotran_options. - -2003-07-05 Kaveh R. Ghazi - - * genattr.c (internal_dfa_insn_code): Output prototype. - * genattrtab.c: Don't output unnecessary decls, output in ISO C. - * genautomata.c: Likewise. - * genconditions.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * gengenrtl.c: Likewise. - * gengtype.c: Likewise. - * genopinit.c: Likewise. - * genoutput.c: Likewise. - * genpeep.c: Likewise. - * genrecog.c: Likewise. - -2003-07-04 Zack Weinberg - - * cpplib.h (CPP_AT_NAME, CPP_OBJC_STRING): New token types. - (struct cpp_options): Add narrow_charset, wide_charset, - bytes_big_endian fields. Remove EBCDIC field. - (cpp_init_iconv, cpp_interpret_string): New external interfaces. - - * cpphash.h: Include if we have it, otherwise - provide a dummy definition of iconv_t. - (struct cpp_reader): Add narrow_cset_desc and wide_cset_desc fields. - (_cpp_valid_ucn): Update prototype. - (_cpp_destroy_iconv): New prototype. - - * doc/cpp.texi: Document character set handling. - * doc/cppopts.texi: Document -fexec-charset= and -fexec-wide-charset=. - * doc/extend.texi: Delete entire section on multiline strings. - Rewrite section on __FUNCTION__ etc now that these are - variables in C. - - * cppucnid.tab, cppucnid.pl: New files. - * cppucnid.h: New generated file. - * cppcharset.c: Include cppucnid.h. Lots of commentary added. - (iconv_open, iconv, iconv_close): Provide dummy definitions - if !HAVE_ICONV. - (SOURCE_CHARSET, struct strbuf, init_iconv_desc, cpp_init_iconv, - _cpp_destroy_iconv, convert_cset, width_to_mask, convert_ucn, - emit_numeric_escape, convert_hex, convert_oct, convert_escape, - cpp_interpret_string, narrow_str_to_charconst, - wide_str_to_charconst): New. - (ucn_valid_in_identifier): Use a binary search through the - ucnranges table defined in cppucnid.h, not a long chain of if - statements. - (_cpp_valid_ucn): Add a limit pointer. Downgrade "universal - character names are only valid in C++ and C99" to a warning. - Issue the "meaning of \[uU] is different in traditional C" - warning here. Take care not to let iconv see an invalid UCS - value if we get a malformed UCN. Issue an error if we don't - have iconv. - (cpp_interpret_charconst): Moved here from cpplex.c. Use - cpp_interpret_string to do the heavy lifting. - - * cppinit.c (cpp_create_reader): Initialize bytes_big_endian, - narrow_charset, wide_charset fields of options structure. - (cpp_destroy): Call _cpp_destroy_iconv. - * cpplex.c (forms_identifier_p): Adjust call to _cpp_valid_ucn. - (maybe_read_ucn, hex_digit_value, cpp_parse_escape): Delete. - (cpp_interpret_charconst): Moved to cppcharset.c. - * cpplib.c (dequote_string): Delete. - (interpret_string_notranslate): New. - (do_line, do_linemarker): Use interpret_string_notranslate. - - * Makefile.in (cppcharset.o): Depend on cppucnid.h. - - * c-common.c (fname_string, combine_strings): Delete. - * c-common.h (fname_string, combine_strings): Delete prototypes. - * c-lex.c (ignore_escape_flag): Delete. - (cb_ident): Use cpp_interpret_string, not lex_string. - (get_nonpadding_token): New function. - (c_lex): Handle Objective-C @-prefixed identifiers and strings here. - Adjust calls to lex_string. Don't write *value twice. - (lex_string): Now handles string constant concatenation. - Most of the work handed off to cpp_interpret_string. - Call fix_string_type here. - * c-parse.in (STRING_FUNC_NAME, VAR_FUNC_NAME): Replace with - FUNC_NAME, throughout. - (OBJC_STRING): New token type. - (primary:STRING): No need to call fix_string_type here. - (primary:objc_string): Make that OBJC_STRING. - (objc_string nonterminal): Delete. - (yylexname): Delete code to handle fake string constants. - (yylexstring): Delete entirely. - (_yylex): Handle CPP_AT_NAME and CPP_OBJC_STRING. No need - to handle CPP_ATSIGN. - - * c.opt (-fexec-charset=, -fwide-exec-charset=): New options. - * c-opts.c (missing_arg, c_common_handle_option): Handle - OPT_fexec_charset_ and OPT_fwide_exec_charset_. - (c_common_init): Set cpp_opts->bytes_big_endian, not - cpp_opts->EBCDIC. Call cpp_init_iconv. - (print_help): Document -fexec-charset= and -fexec-wide-charset=. - (TARGET_EBCDIC): Delete default definition. - - * objc/objc-act.c (build_objc_string_object): No need to - handle string constant concatenation. - -2003-07-04 Kazu Hirata - - * doc/install.texi: Fix typos. - * doc/invoke.texi: Likewise. - * doc/tm.texi: Likewise. - -2003-07-04 Kazu Hirata - - * config/pa/fptr.c: Fix comment typos. - * config/pa/pa-64.h: Likewise. - * config/pa/pa.c: Likewise. - * config/pa/pa.h: Likewise. - * config/rs6000/603.md: Likewise. - * config/rs6000/7xx.md: Likewise. - * config/rs6000/darwin.h: Likewise. - * config/rs6000/freebsd.h: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/rs6000/rs6000.md: Likewise. - * config/rs6000/spe.h: Likewise. - -2003-07-04 Ulrich Weigand - - * config/s390/2064.md: Change GNU CC to GCC. - * config/s390/2084.md: Likewise. - * config/s390/fixdfdi.h: Likewise. - * config/s390/linux.h: Likewise. - * config/s390/s390-modes.def: Likewise. - * config/s390/s390-protos.h: Likewise. - * config/s390/s390.c: Likewise. - * config/s390/s390.h: Likewise. - * config/s390/s390.md: Likewise. - * config/s390/s390x.h: Likewise. - -2003-07-04 Jeff Law - - PR c/11428 - * expr.c (do_store_flag): Pass in the correct result type - when calling fold_single_bit_test. - * fold-const.c (fold_single_bit_test): Use result_type for the - result when folding a sign bit test. - -2003-07-04 Neil Booth - - * opts.c (common_handle_options): Negate sense of -falign- switches. - -2003-07-04 H.J. Lu - - * Makefile.in: Replace PWD with PWD_COMMAND. - -2003-07-04 Zdenek Dvorak - - * cfgloopanal.c (count_strange_loop_iterations): New static function. - (constant_iterations, count_loop_iterations, simple_loop_exit_p): - Handle strange loops. - -2003-07-04 Toon Moene - - * install.texi: Even the g77 manpage is derived from - the full g77 manual. - -2003-07-04 Zack Weinberg - - * ABOUT-NLS: Delete. - * intl: Delete entire directory. - * aclocal.m4: Include ../config/gettext.m4. Delete - AC_ISC_POSIX, AM_LANGINFO_CODESET, jm_GLIBC21, AM_LC_MESSAGES, - AM_PATH_PROG_WITH_TEST, AM_WITH_NLS, and AM_GNU_GETTEXT. - * configure.in: Use CY_GNU_GETTEXT, not AM_GNU_GETTEXT. - Remove intl/Makefile from all_outputs. - * configure, config.in: Regenerate. - * Makefile.in: Expunge all references to intl subdirectory. - Add -I../intl to INCLUDES. - * intl.h: Include libintl.h if and only if ENABLE_NLS is defined. - -2003-07-04 Roger Sayle - - * config/rs6000/aix51.h (TARGET_C99_FUNCTIONS): Define. - * config/rs6000/aix52.h (TARGET_C99_FUNCTIONS): Likewise. - -2003-07-04 Danny Smith - - PR c++/5287, PR c++/7910, PR c++/11021 - * config/i386/winnt.c (ix86_handle_dll_attribute): Don't add - dllimport attribute if function is defined at declaration, but - report error instead. Likewise for dllimport'd variable - definitions. Set implicit TREE_PUBLIC for dllimport'd variables - declared within functions, Report error if dllimport or dllexport - symbol is not global. - (i386_pe_dllimport_p): Ignore dllimport attribute of functions - if defined after declaration or if inlined. Don't allow definition - of static data members of C++ classes. Don't dllimport virtual - methods. - (i386_pe_mark_dllexport): Warn about inconsistent dll attributes. - (i386_pe_mark_dllimport): Remove unnecessary checks. - (i386_pe_encode_section_info): Warn if the dllimport attribute - and symbol prefix have been instantiated and then overridden. - - * doc/extend.texi: Document dllimport and dllexport attributes. - - * config/i386/winnt.c (i386_pe_output_labelref): Fix indents. - -2003-07-03 Uwe Stieber - - * config/kaos.h (CPP_PREDEFINES): Delete. - (TARGET_OS_CPP_BUILTINS): New. - -2003-07-03 Kaveh R. Ghazi - - * c-aux-info.c: Include toplev.h after c-tree.h. - * c-common.c: Likewise. - (GCC_DIAG_STYLE): Undef. - * c-semantics.c (GCC_DIAG_STYLE): Define. - * c-tree.h (GCC_DIAG_STYLE): Likewise. - * diagnostic.h (inform): Move prototype to toplev.h. - * jump.c: Include diagnostic.h before toplev.h. - * toplev.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG): Define. - (warning, error, fatal_error, pedwarn, sorry, inform, - error_for_asm, warning_for_asm): Mark with ATTRIBUTE_GCC_CXXDIAG. - -2003-07-03 Zdenek Dvorak - - * cfglayout.c (cfg_layout_duplicate_bb): Do not update frequencies - at all if edge is not specified. - (can_copy_bbs_p, copy_bbs): New. - * cfglayout.h (can_copy_bbs_p, copy_bbs): Declare. - * cfgloop.c (get_loop_body): Comment more precisely. - * cfgloopmanip.c (copy_bbs, record_exit_edges): Removed. - (scale_bbs_frequencies): Fix comment typo. - (can_duplicate_loop_p): Use can_copy_bbs_p. - (duplicate_loop_to_header_edge): Simplify by using copy_bbs. - -2003-07-03 Devang Patel - - * c-opts.c (c_common_parse_file): Remove extra - debug_hooks->start_source_file call. - -2003-07-03 Roger Sayle - - * real.c (real_trunc, real_floor, real_ceil): New functions - to implement trunc, floor and ceil respectively. - * real.h (real_trunc, real_floor, real_ceil): Prototype here. - * builtins.c (integer_valued_real_p): New function to test if - a floating point expression has an integer valued result. - (fold_trunc_transparent_mathfn): Optimize foo(foo(x)) as - foo(x) where foo is an integer rounding function. Similarly, - optimize foo(bar(x)) as bar(x), and foo((double)(int)x) as - (double)(int)x when both foo and bar are integer rounding - functions and we don't need to honor errno. - (fold_builtin_trunc, fold_builtin_floor, fold_builtin_ceil): - New functions to fold trunc, floor and ceil. - (fold_builtin): Use fold_builtin_trunc to fold BUILT_IN_TRUNC*, - fold_builtin_floor to fold BUILT_IN_FLOOR* and fold_builtin_ceil - to fold BUILT_IN_CEIL*. - * fold-const.c (tree_expr_nonnegative_p): Handle FLOAT_EXPR and - the remaining integer rounding functions. - -2003-07-03 Eric Botcazou - - * config/sparc/sparc.c (function_arg_partial_nregs): Use - SPARC_INT_ARG_MAX to determine where to split unnamed - complex FP arguments. - -2003-07-03 Jan Hubicka - - * basic-block.h (create_basic_block, merge_blocks_nomove): Kill. - * cfgcleanup.c (merge_blocks): Rename to merge_blocks_move. - (merge_blocks_move_predecessor_nojumps, - merge_blocks_move_successor_nojumps): Use merge_blocks. - (try_optimize_cfg): Use merge_blocks_move. - * cfgrtl.c (create_basic_block): Rename to rtl_create_basic_block. - (merge_blocks_nomove): Rename to rtl_merge_blocks. - (cfg_layout_create_basic_block): New. - (rtl_can_merge_blocks): New. - (cfg_layout_split_block): Do not alloc aux by hand. - * cfghooks.h (cfg_hooks): Add create_basic_block, can_merge_blocks_p, - merge_blocks. - (create_basic_block, can_merge_blocks_p, merge_blocks): New macros. - * cfglayout.c (cfg_layout_duplicate_bb): Do not allocate aux by hand. - * cfgloopmanip.c (loop_split_edge_with): Likewise. - * ifcvt.c (merge_if_block): Use merge_blocks_nomove. - - * basic-block.h (basic_block_def): Add field 'rbi'. - * bb-reorder.c (find_traces, rotate_loop, mark_bb_visited, - find_traces_1_round, copy_bb, connect_traces): Update use of rbi. - * cfg.c (entry_exit_blocks): Add new field. - * cfglayout.c: Include alloc-pool.h; - (cfg_layout_pool): New. - (record_effective_endpoints, fixup_reorder_chain, - fixup_fallthru_exit_predecessor, cfg_layout_duplicate_bb): Update use - of rbi. - (cfg_layout_initialize_rbi): New function. - (cfg_layout_initialize): Use it. - (cfg_layout_finalize): Clear rbi fields. - * cfglayout.h (RBI): Kill. - (cfg_layout_initialize_rbi): Declare. - * cfgloopmanip.c (copy_bbs): Use rbi. - (record_exit_edges): Likewise. - (duplicate_loop_to_header_edge): Likewise. - * cfgrtl.c (cfg_layout_create_basic_block): Use - cfg_layout_initialize_rbi. - (cfg_layout_split_block): Use rbi. - (cfg_layout_delete_block): Likewise. - * loop-init.c (loop_optimizer_finalize): Likewise. - * loop-unswitch.c (unswitch_loop): Likewise. - * tracer.c (seen, tail_duplicate, layout_superblocks): Likewise. - - * cfgrtl.c: Update comments. - (try_redirect_by_replacing_jump): New argument. - (redirect_branch_edge): Break out from ... - (rtl_redirect_edge_and_branch): ... this one. - (update_cfg_after_block_merging): Break out from ... - (rtl_merge_blocks): ... this one. - (cfg_layout_split_edge): New. - (cfg_layout_merge_blocks): New. - (cfg_layout_can_merge_blocks_p): New. - (cfg_layout_redirect_edge_and_branch): Reorganize. - (cfg_layout_rtl_cfg_hooks): Fill in. - (cfg_layout_delete_block): Kill barriers. - * cfganal.c (can_fallthru): Deal with exit blocks - * cfglayout.c (cfg_layout_function_header): New function - (record_effective_endpoints): Record function header. - (fixup_reorder_chain): Fixup dead jumptables; place header - - * basic-block.h (CLEANUP_CFGLAYOUT): New flag. - * bb-reorder.c (cfg_layout_initialize): Update call. - * cfgcleanup.c (try_optimize_cfg): Supress optimizations of fallthru - edges in cfglayout mode. - * cfglayout.c (cleanup_unconditional_jumps): Kill. - (cfg_layout_initialize): Kill agrument loops; use cfgcleanup. - * cfglayout.h (cfg_layout_initialize): Update prototype. - * cfgloop.h (CP_INSIDE_CFGLAYOUT): Kill. - * cfgloopmanip.c (loop_split_edge_with): Use split_edge. - * flow.c (propagate_block): Do not crash when basic block ends - by first insn in the chain. - * loop-init.c (loop_optimizer_init): First enter cfglayout mode; later - do loop discovery. - * tracer.c (tracer): Update call of cfg_layout_initialize. - -2003-07-03 Kaveh R. Ghazi - - * Makefile.in: Use dependency variables in lieu of explicit - files throughout. - -2003-07-03 Steven Bosscher - - * rtl.h (ECF_*, flags_from_decl_or_type): Move from here... - * tree.h: ...to here. - -2003-07-03 Kazu Hirata - - * config/s390/2064.md: Fix comment typos. - * config/s390/2084.md: Likewise. - * config/s390/s390.c: Likewise. - * config/s390/s390.md: Likewise. - * config/sh/sh.c: Likewise. - * config/sh/sh.h: Likewise. - * config/sh/sh.md: 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/stormy16/stormy-abi: Fix a typo. - -2003-07-03 Kelley Cook - - * Makefile.in (ifcvt.o): Depend on OPTABS_H. - -2003-07-03 Kaveh R. Ghazi - - * config/mips/mips.h (save_argv): Delete. - -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 Kazu Hirata - - * config/m32r/m32r.c: Fix comment typos. - * config/m68hc11/m68hc11.c: Likewise. - * config/m68hc11/m68hc11.h: Likewise. - * config/m68k/m68k.c: Likewise. - * config/mcore/mcore.c: Likewise. - * config/mcore/mcore.h: Likewise. - * config/mcore/mcore.md: Likewise. - * config/mips/mips.c: Likewise. - * config/mips/mips.h: Likewise. - * config/mips/mips.md: Likewise. - * config/mips/netbsd.h: Likewise. - * config/mn10300/mn10300.c: Likewise. - -2003-07-03 Andreas Schwab - - * dbxout.c (pending_bincls): Move decl down inside - DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO section. - -2003-07-02 Nathan Sidwell - - * rtl.h (NOTE_DATA): Refer to whole union. - * emit-rtl.c (emit_note): Use memset to clear NOTE_DATA. - -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-02 Jeff Law - - * expr.c (do_store_flag): Remove special case folding for - single bit tests. Instead call back into the commonized folder - routine. - * fold-const.c (fold_single_bit_test): New function, mostly - extracted from do_store_flag, with an additional case extracted - from fold. - (fold): Call fold_single_bit_test appropriately. - * tree.h (fold_single_bit_test): Prototype. - -2003-07-02 Zack Weinberg - - * system.h: Include filenames.h. - (IS_DIR_SEPARATOR, IS_ABSOLUTE_PATHNAME): Don't define. - (DIR_SEPARATOR, DIR_SEPARATOR_2): If not already defined, - define based on HAVE_DOS_BASED_FILE_SYSTEM. - * config/i386/xm-cygwin.h, config/i386/xm-djgpp.h - * config/i386/xm-mingw32.h: Don't define - HAVE_DOS_BASED_FILE_SYSTEM, - DIR_SEPARATOR, or DIR_SEPARATOR_2. - * doc/hostconfig.texi: Update to match. - - * cppfiles.c, gcc.c, gensupport.c, protoize.c, - config/i386/cygwin.h: - Use IS_ABSOLUTE_PATH throughout. - * gcc.c (DIR_UP): Delete, unused. - * protoize.c (IS_SAME_PATH): Define in terms of - FILENAME_CMP. - (is_abspath): Delete. - -2003-07-02 Kazu Hirata - - * config/i386/emmintrin.h: Fix comment typos. - * config/i386/i386.c: Likewise. - * config/i386/i386.h: Likewise. - * config/i386/sco5.h: Likewise. - * config/ia64/ia64.c: Likewise. - * config/ia64/itanium2.md: Likewise. - -2003-07-02 H.J. Lu - - * dbxout.c (pending_bincls): Replace DBX_USE_BINCLS with - DBX_USE_BINCL. - (emit_bincl_stab): Same. - (emit_pending_bincls): Same. - -2003-07-02 Kazu Hirata - - * config/h8300/h8300.c (compute_mov_length): Fix the length of - loading CONST0_RTX (SFmode). - * config/h8300/h8300.h (CONST_DOUBLE_OK_FOR_LETTER_P): Change - 'G' to CONST0_RTX (SFmode). - * config/h8300/h8300.md (movsf_h8300): Change the first - constraint to 'G'. - (movsf_h8300h): Likewise. - -2003-07-02 Neil Booth - - * c-common.h (c_common_init_options): New prototype. - * c-opts.c (deferred_size): Remove. - (defer_opt): Array is now pre-allocated. - (c_common_init_options): Pre-allocate deferred_opts. Make - lang_flags unsigned. - (push_command_line_options): Free deferred_opts. - * hooks.c (hook_uint_uint_constcharptrptr_0): New. - * hooks.h (hook_uint_uint_constcharptrptr_0): New. - * langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): Update. - * langhooks.h (struct lang_hooks): New prototype for init_options. - * main.c (main): Cast argv. - * opts.c (handle_option, handle_options): Update prototypes. - (decode_options): save_argc, save_argv are not global. Constify. - * opts.h (decode_options): New prototype. - * toplev.c (general_init): New protoype. - (save_argv): Make static. - (save_argc): Remove. - (print_switch_values, general_init): Constify. - (toplev_main): Save argv. - * toplev.h (toplev_main): Update prototype. - (save_argc, save_argv): Remove. - -2003-07-02 David Edelsohn - - * dbxout.c (pending_bincls): Guard with DBX_USE_BINCLS. - (emit_bincl_stab): Same. - (emit_pending_bincls): Same. - -2003-07-02 Nathan Sidwell - - PR c++/11072 - * ginclude/stddef.h (offsetof): Remove cast to 'char &'. Explain why. - -2003-07-02 Andreas Schwab - - * dbxout.c (pending_bincls): Only define if DBX_DEBUGGING_INFO. - -2003-07-02 Eric Botcazou - - PR optimization/11210 - * expr.c (handled_component_p) [NOP_EXPR]: Add ??? note - about the behaviour with regard to bitfields. - * fold-const (decode_field_reference): Record outermost type in - case the expression is a NOP. Strip all NOPs. Set the signedness - to that of the outermost type (if any) when the bitsize is equal - to the size of the type. - -2003-07-02 Richard Sandiford - - * config/mips/mips.md (addsi3): Remove workaround for adds of -32768. - (addsi3_internal, adddi3, adddi3_internal_2): Likewise. - (adddi3_internal_3, addsi3_internal_2): Likewise. - -2003-07-02 Richard Sandiford - - * config/mips/mips.c (machine_function): Add new fields: - ignore_hazard_length_p and all_noreorder_p. - (mips_flag_delayed_branch): New variable. - (override_options): Treat '/' as an operand punctuation character. - Set up mips_flag_delayed_branch. - (print_operand): Handle '/'. - (mips_output_function_prologue): Put the whole function in - .set noreorder and .set nomacro if all_noreorder_p is true. - (mips_output_function_epilogue): End the noreorder/nomacro sequence. - (mips16_optimize_gp): Remove "first insn" parameter. - (mips16_lay_out_constants): New function, split out from mips_reorg. - (mips_avoid_hazard, mips_avoid_hazards): New functions. - (mips_reorg): For mips16 code, call mips16_lay_out_constant - and (optionally) mips16_optimize. If TARGET_EXPLICIT_RELOCS, - do delayed-branch scheduling followed by hazard detection. - (mips_adjust_insn_length): Only account for hazards if - !ignore_hazard_length_p. - (mips_output_load_label): Add a nop to the o32 sequence if - the target suffers from load delays. - (mips_output_conditional_branch): Add %/ to the end of branches. - (mips_output_division): Fill the branch delay slot with %#. - * config/mips/mips.md: Remove redundant '%*' from mips16 branch - instructions. End all other %* branches with %/. - (ffssi2, ffsdi2): Fix lengths. - (truncdisi2, truncdihi2, truncdiqi2): Add store attributes. - (fix_truncdfsi2_macro): Turn off .set nomacro if appropriate. - (fix_truncsfsi2_macro): Likewise. - (mov_lwl): Set hazard to "none". - (ashldi3_internal): Fill the branch delay slot with %#. - (ashrdi3_internal, lshrdi3_internal): Likewise. - (exception_receiver): Explicitly set $28. - (hazard_nop): New pattern. - -2003-07-02 Jan Hubicka - - * cgraphunit.c (cgraph_finalize_unit): Set current_function_decl - before calling tree_inlinable_function_p. - -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-02 Rainer Orth - - * config/mips/iris5.h (SET_FILE_NUMBER): Moved here from iris3.h. - Undef before redefinition. - (LABEL_AFTER_LOC): Likewise. - (DEFAULT_SIGNED_CHAR): Likewise. - (ASM_OUTPUT_ASCII): Moved here from iris4.h. - Fix IRIX spelling. - - * config/mips/iris3.h: Remove, unused. - * config/mips/iris4.h: Likewise. - - * config/mips/mips.h (STACK_ARGS_ADJUST): Remove, unused. - - * config/mips/iris5.h (TARGET_DEFAULT): Move ... - * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): ... here to - target_cpu_default. - - * config/mips/iris5.h: Move explicit includes ... - * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): ... here. - - * config/mips/iris6.h (MIPS_ISA_DEFAULT, MIPS_ABI_DEFAULT): Move ... - * config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here to - tm_defines. - - * config/mips/iris6.h (TARGET_DEFAULT): Move ... - * config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here to - target_cpu_default. - - * config/mips/iris6.h: Fix IRIX spelling. - (MULTILIB_DEFAULTS): Undef before redefinition. - - * config/mips/iris6.h: Move explicit includes ... - * config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here. - -2003-07-02 Jan Hubicka - - * cgraph.c (cgraph_mark_needed_node, cgraph_varpool_mark_needed_node, - cgraph_varpool_finalize_decl, cgraph_varpool_assemble_pending_decls): - Use next_needed field instead of aux to maintain the queue. - * cgraph.h (cgraph_node): Add next_needed. - (cgraph_varpool_node): Add next_needed; remove aux. - * cgraphunit.c (cgraph_finalize_compilation_unit): Use next_needed. - -2003-07-02 Jan Hubicka - - * cgraphunit.c (cgraph_finalize_function): Set finalized. - (cgraph_finalize_function): Do not examine inlinablility. - (cgraph_finalize_compilation_unit): Do it here. - * cgraph.h (cgraph_local_info): Add finalized field. - -2003-07-02 Rainer Orth - - * ggc-common.c (gt_pch_save): Cast MAP_FAILED to void *. - (gt_pch_restore): Likewise. - -2003-07-01 Kazu Hirata - - * config/alpha/alpha.c: Fix comment typos. - * config/alpha/elf.h: Likewise. - * config/arm/arm.c: Likewise. - * config/arm/arm.h: Likewise. - * config/arm/arm.md: Likewise. - * config/arm/t-arm-coff: Likewise. - * config/arm/t-strongarm-pe: Likewise. - * config/arm/xscale-elf.h: Likewise. - * config/avr/avr.h: Likewise. - -2003-07-01 Jeff Law - - * stmt.c (any_pending_cleanups): Remove another redundant test. - -2003-07-01 David Edelsohn - J"orn Rennecke - - * config/rs6000/rs6000.md (ctr{s,d}i_internal?): Add earlyclobber - for MEM case. - -2003-07-01 Devang Patel - - * dbxout.c (DBXOUT_DECR_NESTING): Emit pending bincls, if required. - (binclstatus): New. - (struct dbx_file): New members - bincl_status, pending_bincl_name and - prev. - (pending_bincls): New. - (dbxout_init): Initialize new dbx_file members. - (dbxout_start_source_file): Same. - (emit_bincl_stab): New function. - (emit_pending_bincls): Same. - (emit_pending_bincls_if_required): Same. - (dbxout_end_source_file): Emit EINCL stab only if BINCL is already - processed. - (dbxout_begin_block): Emit pending BINCL stabs. - (dbxout_end_block): Same. - (dbxout_function_decl): Same. - (dbxout_continue): Same. - (dbxout_type): Same. - (dbxout_class_name_qualifiers): Same. - (dbxout_symbol): Same. - (dbxout_symbol_location): Same. - (dbxout_parms): Same. - -2003-07-01 Kaveh R. Ghazi - - * c-semantics.c (genrtl_case_label): Fix format specifier bug. - * cfgrtl.c (rtl_verify_flow_info_1): Likewise. - -2003-07-01 Andreas Jaeger - - * fold-const.c: Convert prototypes to ISO C90. - * function.c: Likewise. - * function.h: Likewise. - -2003-07-01 Kazu Hirata - - * doc/contrib.texi: Fix typos. - * doc/invoke.texi: Likewise. - * doc/passes.texi: Likewise. - * doc/sourcebuild.texi: Likewise. - * doc/tm.texi: Likewise. - -2003-07-01 Kazu Hirata - - * basic-block.h: Fix comment typos. - * bb-reorder.c: Likewise. - * c-format.c: Likewise. - * cfgcleanup.c: Likewise. - * cfghooks.h: Likewise. - * cfgloop.c: Likewise. - * cfgloopmanip.c: Likewise. - * cfgrtl.c: Likewise. - * cgraph.h: Likewise. - * cgraphunit.c: Likewise. - * combine.c: Likewise. - * convert.c: Likewise. - * dbxout.c: Likewise. - * df.c: Likewise. - * df.h: Likewise. - * diagnostic.c: Likewise. - * dwarf2out.c: Likewise. - * et-forest.h: Likewise. - * flow.c: Likewise. - * fold-const.c: Likewise. - * function.h: Likewise. - * gcov-io.h: Likewise. - * gcov.c: Likewise. - * gcse.c: Likewise. - * genautomata.c: Likewise. - * ggc-common.c: Likewise. - * ggc-page.c: Likewise. - * loop-unroll.c: Likewise. - * loop-unswitch.c: Likewise. - * loop.c: Likewise. - * mips-tfile.c: Likewise. - * optabs.c: Likewise. - * ra-build.c: Likewise. - * ra-colorize.c: Likewise. - * ra-rewrite.c: Likewise. - * ra.h: Likewise. - * regmove.c: Likewise. - * reload.c: Likewise. - * rtlanal.c: Likewise. - * sched-ebb.c: Likewise. - * sched-int.h: Likewise. - * sched-vis.c: Likewise. - * sreal.c: Likewise. - * ssa-ccp.c: Likewise. - * ssa.c: Likewise. - * toplev.c: Likewise. - * tree-inline.c: Likewise. - * value-prof.c: Likewise. - * value-prof.h: Likewise. - -2003-07-01 Nathan Sidwell - - * rtl.h (emit_line_note_after): Remove. - (emit_note_copy_after, emit_note_copy): New. - * emit-rtl.c (reorder_insns_with_line_notes): Replace - emit_line_note_after with emit_note_copy_after. - (emit_insn_after_with_line_notes): Likewise. - (emit_line_note_after): Kill. - (emit_note_copy_after): New. - (emit_note_copy): New. - * function.c (emit_return_into_block): Use emit_note_copy_after. - (thread_prologue_and_epilogue_insns): Likewise. - * integrate.c (expand_inline_function): Use emit_note_copy. - (copy_insn_list): Likewise. - * unroll.c (copy_loop_body): Likewise. - * cfglayout.c (duplicate_insn_chain): Likewise. - -2003-07-01 Nathan Sidwell - - * c-tree.h (define_label): Replace filename and lineno arguments - with a location_t. - * c-decl.c (poplevel): Adjust define_label call. - (pop_label_level): Likewise. - (define_label): Replace filename and lineno arguments with a - location_t. - (store_parm_decls): Use DECL_SOURCE_LOCATION. - * c-parse.in (label): Adjust define_label call. - -2003-07-01 Neil Booth - - * config/sol2.h, config/alpha/alpha.h, config/alpha/linux.h, - config/i386/i386-interix.h, config/ia64/hpux.h, config/mips/iris6.h, - config/mips/linux.h, config/mips/mips.h, config/pa/pa-hpux.h, - config/pa/pa-hpux10.h, config/pa/pa-hpux11.h, config/pa/pa-pro-end.h, - config/pa/pa.h, config/pa/rtems.h: Use c_dialect_ macros. - -2003-07-01 Andreas Jaeger - - * final.c: Convert prototypes to ISO C90. - * flow.c: Likewise. - * flags.h: Likewise. - * gcov-io.c: Likewise. - * gcov-io.h: Likewise. - -See ChangeLog.9 for earlier changes. diff --git a/contrib/gcc/ChangeLog.2 b/contrib/gcc/ChangeLog.2 deleted file mode 100644 index 39b4f3a..0000000 --- a/contrib/gcc/ChangeLog.2 +++ /dev/null @@ -1,14469 +0,0 @@ -Fri Dec 31 19:10:31 1999 Richard Kenner - - * function.c (update_temp_slot_address): Handle case where sum of - temporary address plus offset in register is a valid address. - -1999-12-30 Herman A.J. ten Brugge - - * genrecog.c (change_state) Corrected typo. - -1999-12-30 Kaveh R. Ghazi - - * system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free, - getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc, - strerror, getrlimit, setrlimit, abort): Add prototype arguments. - -1999-12-30 Bernd Schmidt - - * i386.c (ix86_expand_fp_compare): In non-sahf non-TARGET_IEEE - case, expand GT comparisons correctly. Fix a comment before this - part of the code. - -1999-12-30 Gabriel Dos Reis - - * dwarfout.c: Include "frame.h" - * dwarf2out.c: Likewise. - * Makefile.in (dwarfout.o): Depend on frame.h - (dwarf2out.o): Likewise. - -1999-12-29 "Martin v. Loewis" - - Restore i386 binary compatibility in Dwarf EH info. - * config/i386/i386.h (DWARF_FRAME_REGISTERS): Define as 17, the old - value of FIRST_PSEUDO_REGISTER. - * frame.h (DWARF_FRAME_REGISTERS): Default to FIRST_PSEUDO_REGISTER. - (struct frame_state): Use DWARF_FRAME_REGISTERS. - * dwarfout.c (output_reg_number): Ditto. - * dwarf2out.c (reg_number, expand_builtin_init_dwarf_reg_sizes): Ditto. - (DWARF_FRAME_RETURN_COLUMN): Default to DWARF_FRAME_REGISTERS. - -1999-12-29 Bruce Korb - - * fixinc/fixincl.c(wait_for_pid): sometimes a WSTOPSIG of zero is OK - * fixinc/fixincl.tpl(TEST_CT): Just do the existence test once - (_RE_CT): not needed - * fixinc/fixlib.c(is_cxx_header): moved from fixtests.c - rewritten to scan the file text once only - "template<..." test added - * fixinc/fixlib.h(apply_fix_p_t): moved from fixtests.c - (is_cxx_header): declaration added - * fixinc/fixtests.c(is_cxx_header): removed - (apply_fix_p_t): removed - (double_slash_test): is_cxx_header is only called once now - * fixinc/hackshell.tpl: indexing the fixes is now done under DEBUG - * fixinc/inclhack.def(FIXINC_DEBUG): added for testing DEBUG state - within the templates. - The borken spelling of "broken" was fixed. - * fixinc/inclhack.tpl: The $VERBOSE level is used on various messages - The default level depends on FIXINC_DEBUG. - -1999-12-29 Kaveh R. Ghazi - - * crtstuff.c: If !inhibit_libc, include stdlib.h/unistd.h. - Otherwise provide a declaration for atexit. - (init_dummy): Make sure dummy call to atexit is nevertheless - called with correct number of args. - - * frame.c: Update comments referring to other files. - - * libgcc2.c: Likewise. - -1999-12-29 Kaveh R. Ghazi - - * cse.c (free_element, get_element): Remove unused prototypes. - - * fold-const.c (extract_muldiv): Initialize variables `op0' and - `op1'. - - * jump.c (invert_exp): Add explicit braces to avoid ambiguous - `else' clauses. - -Wed Dec 29 12:44:54 1999 Donald Lindsay - - * configure.in,configure: case arm for mn10200-*-* now sets - float_format=i32 so that float.h will correctly claim "double" - to be 32 bits. Ran autoconf to generate configure from .in file. - -Wed Dec 29 10:53:21 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (conditional zero): If op1 is a register, force it into - the same register as op0. - -1999-12-28 Mark Mitchell - - * tree.h (BINFO_BASETYPES): Improve documentation. - -1999-12-28 Kaveh R. Ghazi - - * configure.in (--enable-checking): Use a more portable `for' - loop syntax. - -1999-12-28 Kaveh R. Ghazi - - * configure.in (AC_DECL_SYS_SIGLIST, xm-siglist.h, - arm/xm-netbsd.h, NO_SYS_SIGLIST): Don't use. - - * xm-siglist.h, arm/xm-netbsd.h, mips/xm-news.h, mips/xm-sysv4.h: - Delete files. - - * gcc.texi (NO_SYS_SIGLIST, sys_siglist, SYS_SIGLIST_DECLARED): - Delete descriptions. - - * i386/osf1elf.h, i386/xm-cygwin.h, i386/xm-mingw32.h, m68k/3b1.h, - m68k/a-ux.h, m68k/dpx2.h, m68k/plexus.h, m68k/xm-hp320.h, - m88k/xm-m88k.h, mips/x-sni-svr4, pa/xm-pa.h, pa/xm-pahpux.h, - pa/xm-papro.h, we32k/xm-we32k.h, winnt/xm-winnt.h, xm-interix.h, - xm-svr4.h: Remove all instances of sys_siglist handling. - -1999-12-27 Jakub Jelinek - - * config/sparc/sparc.md (cmp_zero_qi, - cmp_zero_extendqisi2_andcc_set, cmp_zero_qi_sp64, - cmp_zero_extendqidi2_andcc_set): New patterns. - -1999-12-28 Manfred Hollstein - - * m68k/t-mot3300-gald (CROSS_LIBGCC1): Define to libgcc1-asm.a. - (LIB1ASMSRC, LIB1ASMFUNCS, LIB2FUNCS_EXTRA): Define. - (fpgnulib.c, xfgnulib.c): Add rules. - * m68k/t-mot3300-gas: Likewise. - -1999-12-27 Ian Lance Taylor - - * configure.in: Avoid [[ by using test and changequote. Add - changequote required by 1999-12-14 change. - * configure: Rebuild. - -1999-12-27 Clinton Popetz - - * config/mips/mips.h: Fix typo from 12/17/99 libgcc2 fix. - -1999-12-27 Christophe Jaillet - - * alias.c (nonlocal_reference_p): Add else for disjoint ifs. - * flow.c (find_use_as_address): Likewise. - * function.c (fixup_var_refs_1): Likewise. - (walk_fixup_memory_subreg, fixup_stack_1): Likewise. - * jump.c (invert_exp, redirect_exp): Likewise. - * loop.c (replace_call_address): Likewise. - (count_nonfixed_reads): Likewise. - * rtlanal.c (modified_between_p): Likewise. - (modified_in_p, volatile_insn_p, volatile_refs_p): Likewise. - (side_effects_p, replace_regs, jmp_uses_reg_or_mem): Likewise. - * unroll.c (remap_split_bivs): Likewise. - -1999-12-27 Kaveh R. Ghazi - - * diagnostic.c (v_message_with_decl): Use .* format specifier - instead of building the format specifier width manually. - - * system.h (strsignal): Don't check HAVE_STRSIGNAL when - determining whether to provide a prototype. Remove the - sys_siglist clause in the conditional. - -1999-12-23 Martin v. Löwis - - * fold-const.c (operand_equal_p): Use memcmp to compare string - constants. - Suggested by D. J. Bernstein - -1999-12-17 Jakub Jelinek - - * config/h8300/h8300.h (TARGET_H8300H, TARGET_H8300S): Make sure - UNITS_PER_WORD and BITS_PER_WORD are compile time constants when - compiling libgcc2. - * config/mips/mips.h (TARGET_64BIT): Likewise. - * config/rs6000/rs6000.h (TARGET_POWERPC64): Likewise. - * libgcc2.c: Use {,U}{HW,W,DW}type and DWunion everywhere instead - of {SI,DI}type and DIunion. Define these types to QI/HI modes on - dsps. Give routines proper names if SI/DI modes are not used. - * longlong.h: Use DWunion instead of DIunion. - -1999-12-26 Zack Weinberg - - * acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING, - GC_CHECKING, GC_ALWAYS_COLLECT. - * configure.in: Allow --enable-checking with an argument - listing check modes to enable. - * config.in, configure: Rebuilt. - * ggc-page.c, ggc-simple.c: Define GGC_POISON (and - GGC_ALWAYS_VERIFY for ggc-simple.c) only if - ENABLE_GC_CHECKING. Define GGC_ALWAYS_COLLECT only if - ENABLE_GC_ALWAYS_COLLECT. - * rtl.h, rtl.c: Change ENABLE_CHECKING to ENABLE_RTL_CHECKING - throughout. - * tree.h, tree.c: Change ENABLE_CHECKING to - ENABLE_TREE_CHECKING throughout. - -Sun Dec 26 07:48:20 1999 Richard Kenner - - * fold-const.c (fold_truthop): Properly check for FP RHS. - -1999-12-24 Mark Mitchell - - * toplev.h (note_deferall_of_defined_inline_function): Declare. - * toplev.c (note_deferral_of_defined_inline_function): New - function, split out from ... - (rest_of_compilation): ... here. Use it. - -Fri Dec 24 12:34:26 1999 Richard Kenner - - * expr.c (store_constructor): Don't call clear_storage if size is - variable. - -1999-12-24 Kaveh R. Ghazi - - * Makefile.in (toplev.o): Depend on loop.h. - - * dwarfout.c: Include tm_p.h. - - * emit-rtl.c (restore_emit_status): Mark parameter with - ATTRIBUTE_UNUSED. - - * final.c (final_scan_insn): Likewise. - - * flow.c (flow_nodes_print, flow_exits_print, flow_loops_cfg_dump, - flow_loop_nested_p, flow_loop_exits_find, flow_loop_nodes_find, - flow_depth_first_order_compute, flow_loop_pre_header_find, - flow_loop_tree_node_add, flow_loops_tree_build, - flow_loop_level_compute, flow_loops_level_compute, - flow_loop_outside_edge_p): Add prototypes. - (recompute_reg_usage): Mark parameters with ATTRIBUTE_UNUSED. - - * ggc-callbacks.c (lang_mark_tree, lang_mark_false_label_stack): - Mark with ATTRIBUTE_NORETURN. - - * hash.c (hash_newfunc): Mark parameter with ATTRIBUTE_UNUSED. - - * local-alloc.c (no_conflict_p): Likewise. - - * loop.c (insert_bct): Hide definitions of variables with hidden - usage. - (note_reg_stored): Mark parameter with ATTRIBUTE_UNUSED. - - * regclass.c (memory_move_secondary_cost): Mark variable `mem' - with ATTRIBUTE_UNUSED. - (record_reg_classes): Mark parameter with ATTRIBUTE_UNUSED. - (reg_scan): Likewise. - - * reload.c (find_reloads): Remove unused variables `changed'. - - * reload1.c (reload_reg_class_lower): Don't unnecessarily cast - away const-ness. - (allocate_reload_reg): Mark parameter with ATTRIBUTE_UNUSED. - Remove unused variable `insn'. - - * toplev.c: Include loop.h. - (report_file_and_line): Remove unnecessary prototype. - - * tree.c (build_block): Mark parameter with ATTRIBUTE_UNUSED. - - * unroll.c (biv_total_increment): Likewise. - -Thu Dec 23 23:15:22 1999 J"orn Rennecke - - * reload1.c (emit_input_reload_insns): Restore old behavior - wrt. 'special' reloads. - -1999-12-23 Zack Weinberg - - * Makefile.in (ggc-simple.c, ggc-page.c): Don't depend on - hash.h. (cse.c): Don't depend on hashtab.h. - - * cse.c: Don't include hashtab.h. - (hash_cse_reg_info, cse_reg_info_equal_p): Delete prototypes - of dead functions. - * ggc-simple.c: Don't include hash.h. - -1999-12-22 Jason Merrill - - * dwarf2out.c (add_abstract_origin_attribute): Call - gen_abstract_function on our function context. - -Thu Dec 23 03:57:10 1999 Hans-Peter Nilsson - - * Makefile.in (INTEGRATE_H): Fix typo: INTEGRATE_H, not INTREGRATE_H. - -1999-12-23 Michael Hayes - - * config/c4x/c4x.c (c4x_address_cost): Add statement to default - case in switch. - -1999-12-22 Michael Hayes - - * config/c4x/c4x.md (*addqi3_noclobber_reload): Change operand 0 - constraints to "a!r". - -1999-12-21 Mark Mitchell - - * Makefile.in (calls.o): Depend on function.h. - (alias.o): Likewise. - -1999-12-21 Bernd Schmidt - - * reload1.c (emit_reload_insns): Break out code and variables into... - (input_reload_insns, other_input_address_reload_insns, - other_input_reload_insns, input_address_reload_insns, - inpaddr_address_reload_insns, output_reload_insns, - output_address_reload_insns, outaddr_address_reload_insns, - operand_reload_insns, other_operand_reload_insns, - other_output_reload_insns): ... new static variables, and... - (emit_input_reload_insns, emit_output_reload_insns, do_input_reload, - do_output_reload): ... new functions. - -Tue Dec 21 07:06:36 1999 Richard Kenner - - * pa.h (FUNCTION_ARG_BOUNDARY): Never return 0. - -1999-12-21 Michael Hayes - - * md.texi: Add c4x constraints documentation. - -1999-12-21 Martin v. Löwis - - * config/i386/dgux.c (struct option): Rename to - lang_independent_option. - (struct m_options): Add description field. - (output_options): Rename option type, add sep declaration, output - ix86_cpu_string and ix86_arch_string only if set. - (output_file_start): Rename option type. - -Mon Dec 20 23:15:36 1999 Mike Stump - - * Makefile.in (crtbegin.o, crtend.o, s-crtS): Depend on - stmp-int-hdrs. - (libgcc2.a): Similarly. - -Mon Dec 20 23:06:47 1999 David Edelsohn - - * longlong.h (_ARCH_PPC): Only protect add_ssaaaa and sub_ddmmss - with W_TYPE_SIZE == 32. Do not fall through to POWER architecture - for umul_ppmm and smul_ppmm if !_ARCH_PPC and !_ARCH_POWER. - -Mon Dec 20 23:02:03 1999 Jeffrey A Law (law@cygnus.com) - - * fold-const.c (real_hex_to_f): Remove unused "isldouble" variable. - Remove redundant initialization of "frexpon" and "expon". - -Mon Dec 20 15:00:04 1999 Richard Kenner - - * tree.c (real_value_from_int_cst): Clear REAL_VALUE_TYPE object first. - - * expr.c (store_constructor): New argument SIZE; pass to clear_storage. - (store_constructor_field, expand_expr): Pass new arg. - -1999-12-20 Mark Mitchell - - * Makefile.in (explow.o): Depend on function.h. - - * stor-layout.c (set_sizetype): Fix typo. - -1999-12-20 Bernd Schmidt - - * function.c (cfun): Renamed from current_function. All users - changed. - * function.h (cfun): Rename declaration as well. - - * reload.h (struct insn_chain): Change live_throughout and dead_or_set - to be of type regset_head, not regset. All users changed by adding - address operator. - * reload1.c (new_insn_chain): Don't allocate regsets, just clear them. - -1999-12-20 Michael Hayes - - * config/c4x/rtems.h: New file. - -1999-12-19 Bernd Schmidt - - * reload1.c (spill_failure): Take class of failed reload as argument - and print it. Caller changed. - -Sun Dec 19 07:50:42 1999 Richard Kenner - - * rs6000.h (SUBTARGET_DEFAULT): New macro. - (TARGET_SWITCHES): Allow subtargets to default switches. - * rs6000/vxppc.h (SUBTARGET_DEFAULT): New macro. - -1999-12-18 Mark Mitchell - - * crtstuff.c (__do_global_ctors_aux): Do not call __cxa_finalize - in a main program. - -Sat Dec 18 20:42:43 1999 Richard Henderson - - * cccp.c (main): Define __STDC_VERSION__ as necessary. - * cppinit.c (cpp_handle_option): Likewise. - - * ginclude/stdarg.h (va_copy): Use __STDC_VERSION__ to - determine when to define. - -Sat Dec 18 20:34:00 1999 Richard Henderson - - * alpha.c (alpha_emit_conditional_move): If TARGET_FIX, handle - cmove with mismatched test and data modes. - -Sat Dec 18 20:30:15 1999 Richard Henderson - - * c-typeck.c (c_expand_start_case): Don't warn for long switch - in system headers. - -Sat Dec 18 16:28:43 1999 Richard Kenner - - * alias.c: Minor reformatting. - * flow.c: Likewise. - * regs.h: Likewise. - * stor-layout.c: Likewise. - * fold-const.c: Likewise. - (OVERFLOW_SUM_SIGN): Renamed from overflow_sum_sign. - (struct cb_args, const_binop_1, const_binop): Pass type of arg, - not arg itself. - (size_int_wide): Cache nodes even if garbage collecting. - (twoval_comparison_p): Reenable SAVE_EXPR case if operand - of SAVE_EXPR has no side effects. - * cse.c: Move a comment. - * tree.c: Minor reformatting. - (int_size_in_bytes): Return -1 if constant overflows. - -Sat Dec 18 18:30:20 1999 J"orn Rennecke - - * unroll.c (copy_loop_body): Don't treat a REG like a PLUS. - -1999-12-18 10:42 -0800 Zack Weinberg - - * objc/objc-parse.c: Regenerate. This file must be rebuilt - after any change to c-parse.in, even if objc-parse.y didn't - change. Oops. - -1999-12-18 David S. Miller - - * toplev.c (rest_of_compilation): Restore BLOCK tree - reconstruction and branch shortening changes lost in - December 18th change. - -Sat Dec 18 05:29:29 1999 Scott Bambrough - - * config/arm/linux-elf.h: Change all instances of - ARM_FLAG_SHORT_BYTES to ARM_FLAG_MMU_TRAPS. - * config/arm/uclinux-elf.h: Likewise. - -1999-12-18 Gabriel Dos Reis - - * toplev.c (notice, vmessage, v_message_with_file_and_line, - v_message_with_decl, file_and_line_for_asm, - v_error_with_file_and_line, v_error_with_decl, v_error_for_asm, - verror, vfatal, v_warning_with_file_and_line, v_warning_with_decl, - v_warning_for_asm, vwarning, vpedwarn, v_pedwarn_with_decl, - v_pedwarn_with_file_and_line, vsorry, vnotice, count_error, - pfatal_with_name, fatal_io_error, need_error_newline, - last_error_function, last_error_tick, announce_function, - default_print_error_function, print_error_function, - report_error_function, fnotice, error_with_file_and_line, - error_with_decl, error_for_asm, error, set_fatal_function, fatal, - _fatal_insn, _fatal_insn_not_found, warning_with_file_and_line, - warning_with_decl, warning_for_asm, warning, pedwarn, - pedwarn_with_decl, pedwarn_with_file_and_line, sorry): Move to - diagnostic.c - (compile_file): Use fnotice instead of notice. Adjust call. - - * diagnostic.c: New file. - - * Makefile.in (OBJS): Include diagnostic.o - (diagnostic.o): Define dependence. - -1999-12-18 Michael Hayes - - * config/c4x/c4x.h (ASM_OUTPUT_XXX): Wrap in do-while(0). - Tweak formatting. - -1999-12-18 Michael Hayes - - * config/c4x/c4x.md (rpts_top, rptb_top): Add clobbers for rs and re. - -1999-12-17 13:21 -0800 Zack Weinberg - - * fixtests.c (is_cxx_header): New fn, split out of - double_slash_test. - (else_endif_label): Allow "#endif // comment" in C++ headers, - as determined by is_cxx_header. - * fixfixes.c (else_endif_label_fix): Update comment. - * fixincl.c: Don't output VERB_PROGRESS lines if stdout is not - a tty. - * genfixes: Correct double thinko in commandline parsing. - * hackshell.tpl: Generate correct sh syntax for bypass - entries. - - * inclhack.def (all): Whenever an inserted preprocessor - conditional is split over multiple lines, use double - backslashes in this file so the fixed header will be readable. - - (AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h - and add bypass entry for correct version of this header. - (AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h. - (AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h. - - (hpux8_bogus_inlines): New fix, split from... - (ultrix_atof_param) ... here. - (math_expression): Add bypass entry keyed to glibc comment - indicating the problem has been dealt with; disable - unnecessary sed operations; update commentary. - (math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max, - add select and bypass entries, simplify shell operation. - (math_huge_val_ifndef): Split from math_gcc_ifndefs. - - (ip_missing_semi, rs6000_param, tinfo_cplusplus, - ultrix_atof_param): Add select entry. - (stdio_va_list, sunos_mather_decl): Add bypass entry. - (systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the - comments with the fixes they describe. - - * c-parse.in (string action): Do not warn about ANSI string - concatenation in system headers. Affects C parser only. - * c-parse.y, c-parse.c, c-parse.h: Rebuild. - -1999-12-16 Jakub Jelinek - - * config/sparc/sparc.h (TARGET_ARCH32): Exchange ifdefs so that if - compiling libgcc2 the macro depends always on arch cpp defines. - -Fri Dec 17 10:34:16 1999 Richard Earnshaw - - * loop.c (insert_loop_mem): Don't record MEMs from inside - EXPR_LISTs. - -Fri Dec 17 12:08:11 MET 1999 Jan Hubicka - - * regclass.c (regclass): Do not use flowgraph when not optimizing. - - * gcse.c (try_replace_reg): Do replacements in REG_EQUAL/REG_EQUIV - notes too, create one when replacement failed, attempt to simplify - resulting notes. - (cprop_insn): Propagate even to registers mentioned only in REG_EQUAL - or REG_EQUIV notes. - -1999-12-16 Mark Mitchell - - * crtstuff.c (__dso_handle): Declare. - (__cxa_finalize): Likewise. - (do_global_dtors_aux): Call __cxa_finalize if __dso_handle is - non-NULL. - - * invoke.texi: Document -fuse-cxa-atexit. - - * tree.h (ptr_type_node): Document. - (const_ptr_type_node): Likewise. - -Fri Dec 17 01:32:38 MET 1999 Jan Hubicka - - * regmove.c (optimize_reg_copy_1): Ignore LOOP notes. - (optimize_reg_copy_2): Likewise. - (optimize_reg_copy_3): Likewise. - (fixup_match_2): Likewise. - (regmove_optimize): Likewise. - (fixup_match_1): Liekwise. - - * i386.md (HI to SImode promoting splitters): Rewrite. - (pushsf mem peep2): New. - (testhi to andhi peep2): Remove. - * i386.h (x86_promote_QImode): New. - (TARGET_PROMOTE_QImode): New. - (PREDICATE_CODES): Add promotable_binary_operator. - * i386.c (x86_promote_QImode0: New. - (promotable_binary_operator): New. - * i386-protos.h (promotable_binary_operator): New. - - * i386.md (test?i_1): Use "nonmemory_operand" predicate, simplify - condition. - (one_cmpl?i*): Pass "NOT" to unary_operator_ok. - -1999-12-16 Mark Mitchell - - * Makefile.in (INTREGRATE_H): Rename to INTEGRATE_H. - * function.c (insert_block_after_note): Remove. - (retrofit_block): Likewise. - (identify_blocks): Fix indentation. - (reorder_blocks): Don't NULL out NOTE_SOURCE_FILE for a - NOTE_INSN_BLOCK_BEG or NOTE_INSN_BLOCK_END. - * function.h (insert_block_after_note): Remove prototype. - (retrofit_block): Likewise. - * integrate.c (expand_inline_function): Don't call - find_loop_tree_blocks. Use expand_start_bindings_and_block, not - just expand_start_bindings. Use the block_map to remap old - NOTE_BLOCKs to new ones. - (integrate_decl_tree): Keep track of remapped blocks. - * integrate.h (struct inline_remap): Add block_map. - * stmt.c (expand_fixup): Don't try to retrofit_blocks. Just set - NOTE_BLOCK on the notes. - (expand_start_bindings): Rename to ... - (expand_start_bindings_and_block): Add parameter. Set NOTE_BLOCK. - (expand_end_bindings): Set NOTE_BLOCK. - * toplev.c (rest_of_compilation): In function-at-a-time-mode, - reconstruct the BLOCK tree. - * tree.h (expand_start_bindings): Macroize. Call ... - (expand_start_bindings_and_block): New function. - -1999-12-16 Jakub Jelinek - - * config/sparc/sparc.c (print_operand): Cast fprintf arguments - to match the format. - -1999-12-16 David S. Miller - - * expr.c (emit_move_insn_1): Only emit clobbers if one of - the outputs is a SUBREG. - * rtlanal.c (reg_overlap_mentioned_p): Revert December 15th - change. - - * config/sparc/sparc.c (epilogue_renumber): Add default case - to switch stmt. - -Thu Dec 16 11:33:57 MET 1999 Jan Hubicka - - * toplev.c (rest_of_compilation): Run branch shortening after - reg-stack. - - * regclass.c (loop_depth): Remove - (scan_one_insn): Do not handle LOOP_NOTE insns. - (regclass): Go through basic blocks and set loop_cost - -Thu Dec 16 02:56:25 1999 Zack Weinberg - - * tree.h (DECL_FROM_INLINE): Check DECL_ABSTRACT_ORIGIN too. - -Thu Dec 16 10:43:35 MET 1999 Jan Hubicka - - * i386.md (movqi): Use "nonimmediate_operand" for output operand. - (movstrictqi, movdi, movsf, movdf, movxf): Likewise. - (adddi, addqi, addhi, subdi, subqi, subhi, ffs): Likewise. - -Thu Dec 16 02:41:26 1999 Richard Henderson (rth@cygnus.com) - - * loop.c (insert_loop_mem): Ignore memory clobbers. - - * combine.c (simplify_comparison): Reduce (OP (MINUS A B) 0) - to (OP A B). - -Thu Dec 16 02:26:11 1999 Jeffrey A Law (law@cygnus.com) - - * profile.c: Remove redundant #include "output.h". - - * h8300.md (HImode preinc peephole): Fix typo. - -1999-12-15 Jason Merrill - - * function.c (retrofit_block): Abort if we don't find a suitable insn. - (insert_block_after_note): Abort if we don't have a previous block. - Remove FN parameter. - * function.h: Adjust. - -1999-12-15 Mark Mitchell - - * builtins.c (expand_builtin_mathfn): Make sure not to expand the - argument more than once. - -1999-12-15 Jason Merrill - - * stmt.c (expand_decl): Expand upper bound of a dynamic array. - -1999-12-15 Jakub Jelinek - - * expr.c (emit_group_load): Use dst mode if src is VOIDmode. - -Wed Dec 15 16:11:55 MET 1999 Jan Hubicka - - * function.c (PREFERRED_STACK_BOUDNARY): Provide default value. - (assign_stack_local_1): Limit alignment to PREFERRED_STACK_BOUNDARY, - update stack_alignment_needed. - (prepare_function_start): Initialize stack_alignment_needed - * function.h (struct function): Add field stack_alignment_needed. - -Wed Dec 15 14:55:24 1999 J"orn Rennecke - - * caller-save.c (insert_one_insn): Returns struct insn_chain *. - Handle live_throughout / dead_or_set instead of live_before / - live_after. - (save_call_clobbered_regs): Get register livenessinformation from - chain->live_throughout. - (add_stored_regs): New function. - (insert_restore, insert_save): Add restored / saved registers to - dead_or_set. - * global.c (reg_dies): New parameter chain. - (reg_becomes_live): Third parameter is regs_set now. - Changed all callers. - (reg_dies): New parameter chain. Changed all callers. - (build_insn_chain): Set live_throughout instead of - live_before / live_after. - * reload.h (struct insn_chain): Replace members live_before / - live_after with live_throughout / dead_or_set. - * reload1.c (new_insn_chain): Handle live_throughout / dead_or_set - instead of live_before / live_after. - (maybe_fix_stack_asms, find_reload_regs, finish_spills): Likewise. - (order_regs_for_reload, find_reg, finish_spills): Likewise. - (choose_reload_regs_init): Likewise. - * stupid.c (current_chain, find_clobbered_regs): Delete. - (stupid_life_analysis): Set chain->live_throughout chain->dead_or_set - instead of chain->live_before / chain->live_after. - (mark_hard_ref): New function. - (stupid_mark_refs): Call mark_hard_ref. Clear chain->live_throughout. - -1999-12-15 David S. Miller - - * rtlanal.c (reg_overlap_mentioned_p): Handle CONCAT. - -Wed Dec 15 15:05:30 MET 1999 Jan Hubicka - - * flow.c (calculate_loop_depth): Make global, remove prototype, - rewrite to use new loop infrastructure. - (find_basic_block): Remove calculate_loop_depth call. - * toplev.c (rest_of_compilation): Call find_basic_block. - * output.h (calculate_loop_depth): Declare. - - * flow.c (dump_flow_info): Dump loop_depth. - (flow_loops_nodes_find): Increase loop_depth for basic block in the - body. - (flow_loops_find): Initialize the loop_depth for each basic block. - -1999-12-15 Jason Merrill - - * tree.c (decl_function_context): Handle virtual functions. - - * tlink.c (scan_linker_output): Don't look in demangled name when - looking for linker output keywords. - - * dwarfout.c (output_type): We can defer namespace-scope classes. - -Wed Dec 15 01:23:29 1999 Jeffrey A Law (law@cygnus.com) - - * regclass.c (record_reg_classes): Update comment for merging - register class preferences in reg->reg copies. Tighten conditions - for merging register class preferences in reg->reg copies. - -Wed Dec 15 02:19:32 1999 David Edelsohn - - * rs6000.md (tablejumpdi): Generate DImode LABEL_REF. - -1999-12-14 Geoff Keating - - * config/m68k/m68020-elf.h (ENDFILE_SPEC): Delete. - (INIT_SECTION_ASM_OP): Delete. - (FINI_SECTION_ASM_OP): Delete. - (STARTFILE_SPEC): Define to hold just crtbegin.o. - -1999-12-14 Jason Merrill - - * dwarf2out.c (add_abstract_origin_attribute): Do call abort if - the abstract origin wasn't emitted. - - * dwarf2out.c (class_scope_p): New fn. - (gen_subprogram_die): Use it. - (gen_variable_die): Use it. Tweak logic. - (gen_struct_or_union_type_die): Check context_die to determine - if we're function-local. - (dwarf2out_decl): Check DECL_BUILT_IN, not DECL_FUNCTION_CODE. - -1999-12-14 Bernd Schmidt - - * loop.c (check_dbra_loop): Can't reverse a biv that has - maybe_multiple set. - -1999-12-14 Nick Clifton - - * config/arm/arm.c: Add support for -mcpu=arm720 command line - switch. - -Tue Dec 14 18:13:32 1999 J"orn Rennecke - - * loop.c (strength_reduce): Fix sign of giv lifetime calculation - for givs made from biv increments. - -Tue Dec 14 08:11:27 1999 Richard Henderson - - * configure.in (alpha-osf, alpha-linux): Handle ev6[78]. - * alpha.c (override_options): Recognize -mcpu=ev67. - * alpha.h (CPP_CPU_EV67_SPEC): New. - (CPP_CPU_DEFAULT_SPEC): Examine TARGET_CPU_DEFAULT to use it. - (EXTRA_SPECS): Update. - -Tue Dec 14 08:04:28 1999 Richard Henderson - - * cppp.c (main): Set trigraphs and __STRICT_ANSI__ as - appropriate for -lang-c89 and -std=*. - * cppinit.c (cpp_handle_option): Likewise. - (new_pending_define): New, split out from cpp_handle_option. - * gcc.c (default_compilers): Don't define __STRICT_ANSI__ - or enable trigraphs for -ansi/-std=*. - - * ginclude/stdarg.h (__va_copy): New. - (va_copy): Don't define for C89. - -Tue Dec 14 08:37:27 CST 1999 Clinton Popetz - - * config/arm/arm.md (mulsidi3adddi, umulsidi3adddi): New patterns - for long long multiply-accumulate. - -Tue Dec 14 13:51:38 MET 1999 Jan Hubicka - - * regclass.c (scan_one_insn): Set loop_cost to 1 when - optimizing for size. - -1999-12-14 Bernd Schmidt - - * reload1.c (reload): Can't avoid select_reload_regs/finish_spills - if something changed. Back out that part of yesterday's changes. - - * loop.c (loop_max_reg): New static variable. - (loop_optimize): Initialize it. Eliminate one unnecessary call to - max_reg_num. - (scan_loop): Call reg_scan_update whenever we may have added new - registers, and update loop_max_reg. - -Tue Dec 14 12:07:29 MET 1999 Jan Hubicka - - * regclass.c (record_reg_classes): Do not do the copying preferrencing - when source does not die. - - * regclass.c (record_reg_classes): Handle INOUT operands properly. - -1999-12-14 Jakub Jelinek - - * config/sparc/linux64.h (TARGET_LIVE_G0, - TARGET_BROKEN_SAVERESTORE): Don't support weird SPARC - variants on Linux. - * config/sparc/linux.h (TARGET_LIVE_G0, - TARGET_BROKEN_SAVERESTORE): Likewise. - * config/sparc/linux-aout.h (TARGET_LIVE_G0, - TARGET_BROKEN_SAVERESTORE): Likewise. - - * config/sparc/sparc.h (SPARC_DEFAULT_CMODEL): Default to CM_32. - (CONDITIONAL_REGISTER_USAGE): For block profiling fix %g4 on sparc64, - not %g2. - (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Use %g4 instead of %g2 - as sparc64 block profiling register. - * config/sparc/sparc.c (sparc_override_options): Allow block - profiling with -m32. - (sparc_block_profiler): Use %g4 instead of %g2 as sparc64 block - profiling register. - * config/sparc/linux64.h (MACHINE_STATE_*): Only provide these - macros on TARGET_ARCH32. sparc.h has macros good enough for sparc64. - * config/sparc/sol2.h (MACHINE_STATE_*): Likewise. - - * config/sparc/xm-sp64.h: Avoid using __sparc_v9__ when testing - for sparc64. - * config/sparc/sparc.h: Likewise. - * config/sparc/xm-sysv4-64.h: Likewise. - * config/float-sparc.h: Likewise. - * glimits.h: Likewise. - * longlong.h: Likewise. - - * config/sparc/linux64.h (DEFAULT_VTABLE_THUNKS): Define to 1. - (ASM_IDENTIFY_GCC): Remove. - -1999-12-14 Bernd Schmidt - - * combine.c (combine_simplify_rtx): Don't make shared rtl. - (simplify_logical): Likewise. - -1999-12-14 Mumit Khan - - * cccp.c (INO_T_EQ): Disable inode-based optimization for Cygwin. - * cppfiles.c (INO_T_EQ): Likewise. - -1999-12-14 Mumit Khan - - * i386/crtdll.h (STARTFILE_SPEC): Add -pg profiling support. - * i386/mingw32.h (LIB_SPEC): Likewise. - (STARTFILE_SPEC): Likewise. - * i386/uwin.h (LIB_SPEC): Likewise. - (STARTFILE_SPEC): Likewise. - - * i386/mingw32.h (SUBTARGET_PROLOGUE): Override Cygwin definition. - * i386/uwin.h (SUBTARGET_PROLOGUE): Likewise. - -Mon Dec 13 20:25:29 1999 Jeffrey A Law (law@cygnus.com) - - * combine.c (combine_simplify_rtx): Fix order of checks for - (ashiftrt foo C) -> (lt foo (const_int 0)) simplification. - -1999-12-13 Clinton Popetz - - * config/arm/arm.md (*mulsidi3adddi, *umulsidi3adddi) Backed out - 12/10/99 change, reapplied to merged-arm-thumb-backend-branch. - -1999-12-10 Bernd Schmidt - - * hard-reg-set.h (inv_reg_alloc_order): Declare if REG_ALLOC_ORDER is - defined. - * regclass.c (inv_reg_alloc_order): New array. - (regclass_init): If REG_ALLOC_ORDER is defined, initialize it. - - * reload.h (struct insn_chain): Delete fields group_size, group_mode, - counted_for_groups, counted_for_nongroups. Add fields rld and - n_reloads. - * reload.c (push_secondary_reload): Don't set nongroup field of - new reloads. - (push_reload): Likewise. - (find_reloads): Delete code to compute nongroup fields. - * reload1.c (reload_insn_firstobj): New static variable. - (pseudos_counted, spilled_pseudos): Now of type regset_head. All - users changed. - (calculate_needs, find_tworeg_group, find_group, possible_group_p, - count_possible_groups, modes_equiv_for_class_p, new_spill_reg, - dump_needs, maybe_mark_pseudo_spilled, hard_reg_use_compare): Delete - functions. - (count_pseudo, select_reload_regs, copy_reloads, find_reg): New - functions. - (struct hard_reg_n_uses): Deleted. - (potential_reload_regs): Deleted. - (init_reload): Initialize spilled_pseudos and pseudos_counted. - (reload): Don't try to allocate reload registers if we already know - we have to make another pass. Call select_reload_regs. Free memory - starting with reload_firstobj when starting another pass. - Don't allocate spilled_pseudos. - (calculate_needs_all_insns): Call copy_reloads for an insn that - needs reloads; don't call calculate_needs. - (spill_cost): New static array. - (used_spill_regs_local): New static variable. - (order_regs_for_reload): Rewrite to lose hard_reg_n_uses and the code - to compute potential_reload_regs. - (find_reload_regs): Completely rewritten to use find_reg. - (allocate_reload_reg): Don't test counted_for_groups or - counted_for_nongroups. Lose NOERROR arg and code to give an error; - all cllers changed. - (choose_reload_regs): Add fallback code that uses the existing - register allocation from find_reload_regs. - -Mon Dec 13 00:54:14 1999 Philippe De Muyter - - * flow.c (create_edge_list): Cast xmalloc return value. - -Mon Dec 13 00:47:58 1999 Jeffrey A Law (law@cygnus.com) - - * doprnt.c: Remove incorrect comment closure. - - * cse.c: Fix a few minor whitespace goofs. - -1999-12-13 Don Bowman - - * mips/vxworks.h: Fix problem with comment termination. - (EXTRA_SECTIONS): Add in_sbss. - (EXTRA_SECTION_FUNCTIONS): Corresponding changes. - -1999-12-12 David S. Miller - - * cse.c (struct cse_reg_info): Add hash_next member, - reorder rest of struct for better packing on 64-bit - hosts. - (cse_reg_info_tree): Kill. - (REGHASH_SHIFT, REGHASH_SIZE, REGHASH_MASK, reg_hash, - REGHASH_FN): New custom pow2 hash mechanism. - (NBUCKETS): Kill. - (HASH_SHIFT, HASH_SIZE, HASH_MASK, HASH, table): Rework to - use a pow2 hash table. - (get_cse_reg_info): Rework to use new REGHASH. - (new_basic_block): Likewise, use HASH_SIZE, and inline - free_element call. - (remove_from_table): Rework to use HASH_SIZE/HASH_MASK, - and inline free_element call. - (lookup_as_function, insert, flush_hash_table, invalidate, - remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, - invalidate_for_call, use_related_value, find_comparison_args, - fold_rtx, equiv_constant, cse_insn, invalidate_memory): Likewise. - (hash_cse_reg_info, cse_reg_info_equal_p, free_element, - get_element): Kill. - -Sun Dec 12 21:31:44 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_basic_block): Free qty_table consistently. - -1999-12-12 David S. Miller - Jakub Jelinek - - * config/sparc/sparc.md (movtf reg/reg split): Don't generate - SUBREGs by hand, gen the appropriate hard reg directly. - (movtf reg/mem split): Likewise and alter_subreg on destination - if necessary. - (movtf mem/reg split): Similarly. - (movdf_cc_sp64): Rename from hidden pattern. - (movtf_cc_hq_sp64): Renamed from movtf_cc_sp64. - (movtf_cc_sp64, following split): New pattern and splitter. - (movdf_cc_reg_sp64): Rename from hidden pattern. - (movtf_cc_reg_hq_sp64): Renamed from movtf_cc_reg_sp64, require - TARGET_HARD_QUAD. - (movtf_cc_reg_sp64, following split): New pattern and splitter. - -1999-12-12 Stephen L Moshier - - * loop.c (load_mems): Don't hoist written floating point mem - if -ffloat-store. - -1999-12-12 Mark Mitchell - - * except.h (struct eh_queue): Add `next' pointer. - (struct eh_status): Make x_ehqueue a pointer. - (push_ehqueue): Declare. - (pop_ehqueue): Likewise. - * except.c (expand_eh_region_end): Adjust now that ehqueue is a - pointer. - (expand_fixup_region_end): Likewise. - (expand_leftover_cleanups): Likewise. - (push_ehqueue): Define. - (pop_ehqueue): Likewise. - (emit_cleanup_handler): Use push_ehqueue and pop_ehqueue rather - than doing it inline. - (expand_start_all_catch): Adjust now that ehqueue is a - pointer. - (mark_eh_queue): Mark all level of the queue. - (mark_eh_status): Adjust now that ehqueue is a - pointer. - (init_eh_for_function): Allocate ehqueue. - (free_eh_status): Free it. - * stmt.c (expand_cleanups): Save the ehqueue around the cleanup - expansion for a fixup. - -1999-12-12 Kaveh R. Ghazi - - * gthr-single.h (__gthread_active_p): Add prototype arguments. - - * libgcc2.c (__udivmoddi4): Remove unnecessary decls. - (__dummy, __builtin_saveregs, __bb_exit_trace_func, __bb_init_prg, - __bb_trace_func, __bb_trace_func_ret, __bb_trace_ret, - function_ptr, getpagesize, __enable_execute_stack, - __enable_execute_stack, __clear_insn_cache, - __enable_execute_stack, __do_global_dtors, __do_global_ctors, - _cleanup, _exit, __default_terminate, __terminate_func, - __terminate, __empty, __throw, new_eh_context, - eh_context_initialize, eh_context_static, eh_context_specific, - get_eh_context, __get_eh_context, __get_eh_info, - init_reg_size_table, eh_threads_initialize, - __get_dynamic_handler_chain, __sjthrow, __sjpopnthrow, - __unwinding_cleanup, throw_helper, __throw, __rethrow, - __pure_virtual): Add prototype arguments. - (__bb_exit_func): Cast a sizeof to long when comparing against one. - Cast a signed value to unsigned long when comparing against one. - (new_eh_context): Wrap in _GTHREADS macro. - (__sjthrow, __sjpopnthrow): Initialize variable `cleanup' at - declaration. - (in_reg_window): Mark parameters with __attribute__ ((__unused__)). - (throw_helper): Initialize variables `handler_p' and `pc_p'. - -1999-12-11 Kaveh R. Ghazi - - * combine.c (record_promoted_value): Remove unused variable - `links2'. - - * emit-rtl.c (renumber_insns): Likewise for `old_max_uid'. - - * global.c (record_conflicts): Likewise for `j'. - - * genoutput.c (output_insn_data): Don't unnecessarily cast away - const-ness. - -1999-12-11 Kaveh R. Ghazi - - * i386-protos.h (output_387_binary_op, output_fix_trunc, - output_fp_compare): Constify a char*. - - * i386.c (ix86_split_to_parts, ix86_safe_length_prefix): Add - static prototypes. - (override_options, ix86_comp_type_attributes, print_operand, - output_387_binary_op, output_fix_trunc, output_fp_compare): - Constify a char*. - (ix86_sched_reorder): Mark parameter `clock_var' with - ATTRIBUTE_UNUSED. - - * i386.h (DEBUG_PRINT_REG): Constify a char*. - -Fri Dec 10 16:12:13 1999 Alexandre Petit-Bianco - - * tree.def (EXPR_WITH_FILE_LOCATION): Temporarily add a third - operand, for use in the Java front-end. - -1999-12-10 Ben Collins - - * configure.in: Fix typo for "-64" in 64bit as check. - * configure: Rebuilt. - -1999-12-10 Jakub Jelinek - - * longlong.h (__sparc_v9__): Use %rDIGIT instead of %DIGIT where - appropriate. - -1999-12-10 Kaveh R. Ghazi - - * c-parse.in (string): With -Wtraditional, warn if ANSI string - concatenation is utilized. - - * invoke.texi (-Wtraditional): Document it. - -1999-12-10 Kaveh R. Ghazi - - * flow.c (flow_loops_dump): Avoid ANSI string concatenation. - Cast a ptrdiff_t to long and pass it to printf with %ld. - -1999-12-10 Geoff Keating - - * config/m68k/m68k.h (CONDITIONAL_REGISTER_USAGE): If we have no - 68881, we have no 68881 registers at all. - (HARD_REGNO_MODE_OK): It is always OK to put a MODE_FLOAT - value in a 68881 register if it is available. - -1999-12-10 Clinton Popetz - - * config/arm/arm.md (*mulsidi3adddi, *umulsidi3adddi): New patterns - for long long multiply-accumulate. - -1999-12-10 Bernd Schmidt - - * loop.c (insert_loop_mem): Undo last change. - -1999-12-10 David S. Miller - - * config/sparc/sparc.c (fp_sethi_p, fp_mov_p, fp_high_losum_p): - New functions. - * config/sparc/sparc-protos.h: Add them. - * config/sparc/sparc.h: Add them to PREDICATE_CODES. - (EXTRA_CONSTRAINT_BASE): New macro, handling Q, R, and S - constraints which use those helpers. - (EXTRA_CONSTRAINT): Use this new macro. - * md.texi: Update sparc target constraints documentation. - * config/sparc/sparc.md (clear_sf, clear_sfp, movsf_const_intreg, - movsf_const_high, movsf_const_lo, movsf_insn): Delete. - (movsf_insn_novis_liveg0, movsf_insn_novis_noliveg0, - movsf_insn_vis, movsf_lo_sum, movsf_high): New patterns. - (movsf high/lo_sum split): Rework for new patterns. - (movsf expander): Allow storing fp_zero to memory if ! live_g0. - -1999-12-09 Gavin Romig-Koch - - * c-common.c (c_common_nodes_and_builtins): - Create __builtin_ptrdiff_t and __builtin_size_t. - -Thu Dec 9 18:05:48 1999 Jeffrey A Law (law@cygnus.com) - - * pa/elf.h (MAX_OFILE_ALIGNMENT): Define. - -Fri Dec 10 00:53:10 1999 J"orn Rennecke - - * regclass.c (globalize_reg): Re-instate test that allows - fixed registers to be declared as a variable even after functions - are defined. - -Fri Dec 10 00:52:13 MET 1999 Jan Hubicka - - * i386.md (cpu attribute): Add "athlon". - (athlon_decode): New attribute. - (Athlon scheduling units definitions): New. - (fcmp and shld patterns): Set athlon_decode to "vector". - * i386.c (athlon_cost): New. - (m_ATHLON): New. - (x86_use_leave, x86_push_memory, x86_movx, x86_cmove, x86_deep_branch, - x86_use_sahf): Set for Athlon. - (x86_use_fiop): Unset for Athlon. - (override_options): Define Athlon alignments and "athlon" name. - (x86_adjust_cost): Penalize AGI and delayed latencies for Athlon. - * i386.h (TARGET_ATHLON): New. - (enum processor_type): Add PROCESSOR_ATHLON. - (TARGET_CPU_DEFAULT_SPEC): Set to "-D__tune_athlon__" - for CPU_DEFAULT==5 - (TARGET_CPP_CPU_SPECS): Set -D__tune_athlon__ for Athlon. - -1999-12-09 Andreas Jaeger - - * loop.c (record_biv): Declare parameter as int. - - * config/i386/i386-protos.h: Declare long_memory_operand. - -1999-12-09 Mark Mitchell - - * tree.c (copy_node): Do zero the TREE_CHAIN, even for an - EXPR_WITH_FILE_LOCATION. - -Thu Dec 9 11:36:24 MET 1999 Jan Hubicka - - * i386.md (neg??, abs?f, one_cmpl?i): Use nonimmediate_operand - in expander. - - * flow.c (recompute_reg_usage): Use basic block info to get loop_depth. - - * combine.c (try_combine, distribute_notes): Remove REG_N_REFS - updating code. - -1999-12-09 Jakub Jelinek - - * config/sparc/linux64.h (TARGET_DEFAULT): Make -mapp-regs - default on linux64 again. - * config/sparc/t-linux64: Add mno-app-regs and non-medlow code - models for multilibing. - * genmultilib: Accept | as alternative separator within a set in - MULTILIB_OPTIONS. - - * config/sparc/sparc.h (PROMOTE_FOR_CALL_ONLY): Define. - - * calls.c (precompute_arguments): Make sure initial_value contains - value pseudo which CSE expects. - * cse.c (struct set): New entry orig_src. - (cse_insn): Set it early on entry, use it for libcall EQUIV note - replacement. - -Wed Dec 8 22:24:15 1999 Richard Henderson - - * flow.c (count_basic_blocks): Don't add (use (const_int 0)) insns. - -1999-12-08 Bernd Schmidt - - * loop.c (insert_loop_mem): Don't hoist volatile mems out of loops. - -1999-12-08 Jakub Jelinek - - * config/sparc/sparc.c (ultra_cmove_results_ready_p, - ultra_fpmode_conflict_exists, ultra_flush_pipeline): Typo fix. - - * config/sparc/sparc.h (SPARC_SETHI_P): Don't look at topmost 32 bits - if TARGET_ARCH32. - - * longlong.h: Merge in changes from glibc. - Also don't clobber %g2 register in 32bit SPARC assembly, so that - -mno-app-regs libgcc can be compiled. - * libgcc2.c: Add defines so that the updated longlong.h - can be used in libgcc2.a. Also, make sure on most architectures - (at least on all which have optimized code in longlong.h defined - for) {SI,W}_TYPE_SIZE is suitable for preprocessor tests. - -1999-12-08 Alexandre Oliva - - * config/sparc/sol2-64.h: Same as sol2-sld-64.h, except that - `-m EMULATION' is added to non-default LINK_ARCH_SPECs. - * configure.in: Use sol2-64.h instead of sol2-sld-64.h if linker - is GNU ld. - * configure: Rebuilt. - -Wed Dec 8 03:45:40 1999 Richard Henderson - - * alpha.c (secondary_reload_class): For !BWX, sub-simode - outputs require a register. - -1999-12-08 Brendan Kehoe - - * Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS): Add _sf_to_usi - _df_to_usi. Required by some targets, so US_SOFTWARE_GOFAST calls to - functions like dptoul will be resolved. - (libgcc2.a): Make sure that the object files from DPBIT are named - differently (prefix `_dp') from those that would be coming from - FPBIT. - -1999-12-08 Alexandre Oliva , Jakub Jelinek - - * configure.in: When target is sparc* and tm_file contains 64, - test for 64bit support in assembler. If not supported, remove - sparc/t-sol2-64 from target-dependent Makefile fragments. - (AS_SPARC64_FLAG): Define to the assembler flag for 64bit. - (HAVE_AS_OFFSETABLE_LO10): Rework test to use these flags. - (HAVE_AS_REGISTER_PSEUDO_OP): Use config.cache. - * acconfig.h (AS_SPARC64_FLAG): Added. - * configure, config.in: Rebuilt. - * config/sparc/sol2-sld-64.h: Same as sol2.h, if without 64bit - support. Use AS_SPARC64_FLAG. - -1999-12-07 Jakub Jelinek - - * config/sparc/sparc.c (hard_32bit_mode_classes): Mark registers - suitable for holding OFmode values so that gcc works with complex - quad long doubles. - (hard_64bit_mode_classes): Likewise. - - * config/sparc/sparc.md (sethi_di_medlow_embmedany_pic): Fix pattern - so that it is actually matched. - (sethi_di_medlow): Likewise. - - * config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Consider TFmode 0.0L - as legitimate constant if -mvis. - * config/sparc/sparc.md (movtf): Likewise. - (clear_sf): Use const_double_operand. - (clear_sfp, clear_dfp, clear_tf, clear_tfp): New patterns. - - * config/sparc/sparc.c (sparc_emit_float_lib_cmp): New function. - * config/sparc/sparc-protos.h (sparc_emit_float_lib_cmp): Prototype. - * config/sparc/sparc.h (*_LIBCALL): Only use for _Q_* - routines, _Qp_* cannot be handled like that now. - (INIT_TARGET_OPTABS): Likewise. - * config/sparc/sparc.md (cmptf): Accept soft float ARCH64. - (seq, sne, sgt, sge, slt, sle, beq, bne, bgt, bge, blt, ble): Call - sparc_emit_float_lib_cmp if ARCH64 and soft float. - (extendsftf2, extenddftf2, trunctfsf2, trunctfdf2, floatsitf2, - floatditf2, fix_trunctfsi2, fix_trunctfdi2, addtf3, subtf3, multf3, - divtf3, sqrttf3): New expanders. - (extendsftf2_hq, extenddftf2_hq, trunctfsf2_hq, trunctfdf2_hq, - floatsitf2_hq, floatditf2_hq, fix_trunctfsi2_hq, fix_trunctfdi2_hq, - addtf3_hq, subtf3_hq, multf3_hq, divtf3_hq, sqrttf3_hq): Rename from - non-_hq patterns. - - * configure.in (sparc64-*-linux*): Use posix threads if enabled. - * configure: Rebuilt. - * config/sparc/linux64.h: Default to -mcpu=ultrasparc if no - -mcpu is given and we're doing 64bit compiles. - -Tue Dec 7 19:22:06 1999 Richard Henderson - - * loop.h (struct induction): Add multi_insn_incr. - * loop.c (basic_induction_var): New multi_insn_incr argument. - Set it if we search back through previous insns for the biv. - (record_biv): New multi_insn_incr argument; fill in struct induction. - (strength_reduce): Discard an iv with multiple bivs, any of - which require multiple insns to increment. - -1999-12-07 Martin v. Löwis - - * invoke.texi (C Dialect Options): Remove -flang-c9x, add -std - documentation. - -1999-12-06 David S. Miller - - * combine.c (check_promoted_subreg): Do not conditionalize this upon - PROMOTE_FUNCTION_RETURN. - -Mon Dec 6 15:12:14 1999 Jim Wilson - - * regmove.c (optimize_reg_copy_1): If no REG_DEAD note, check for - and handle REG_UNUSED note on insn. - - * combine.c (force_to_mode, case LSHIFTRT): New local inner_mask. Set - inner_mask instead of mask. - -1999-12-06 Brendan Kehoe - - * dwarf2out.c (field_byte_offset): As with dwarfout.c, size can be - zero if there was an error. - -1999-12-06 Jakub Jelinek - - * config/sparc/sparc.md (return_losum_di): Fix typo in asm - output string. - - * longlong.h: Fix clobbers in SPARC asm statements. - - * config/sparc/sparc.c (input_operand): Allow HImode and QImode - valid sethi operations when TARGET_ARCH64. - - * calls.c (save_fixed_argument_area): If save_mode is BLKmode, - always use move_by_pieces to avoid infinite recursion. - (restore_fixed_argument_area): Likewise. - - * combine.c (check_promoted_subreg, record_promoted_value): New - functions. - (combine_instructions): Use them to retain nonzero and sign bit - information after SUBREGs are eliminated by optimizations in - this pass if PROMOTE_FUNCTION_RETURN. - - * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Document - .register declaration. Don't use variables with __ prefixes. - -Mon Dec 6 12:24:52 1999 Richard Kenner - - * fold-const.c (optimize_bit_field_compare): Only use one mode - for both RHS and LHS in non-constant case. - -1999-12-06 Nathan Sidwell - - * frame.c (start_fde_sort): Only allocate erratic array, if - linear one was allocated. Return allocated flag. - (fde_insert): Only insert, if there's a valid array. - (fde_end_sort): Split, sort and merge if linear and erratic - arrays exist, else just sort linear one. - (search_fdes): New function. Linear search through original fde - structure. - (frame_init): Permit multiple initializations. Cope with - memory shortages. - (find_fde): Fallback on linear search, if failed to sort array. - (__deregister_frame_info): Only free sorted array, if we - allocated it. - -1999-12-06 Jakub Jelinek - - * config/sparc/sparc.h (MUST_PASS_IN_STACK): New macro. - -1999-12-05 Jakub Jelinek - - * config/sparc/sparc.c (sparc64_initialize_trampoline): Use gen_flushdi. - -1999-12-05 Mark Mitchell - - * tree.h (special_function_p): Declare. - * calls.c (special_function_p): Make it global. Don't take `name' - as a parameter. Fix typo in 1999-11-28 change. - (expand_cal): Adjust. - -1999-12-04 Mark Mitchell - - * tree.def (EXPR_WITH_FILE_LOCATION): Fix comment formatting. - * tree.h (EXPR_WFL_FILENAME): Define in terms of - EXPR_WFL_FILENAME_NODE. - (EXPR_WFL_FILENAME_NODE): Use the second operand slot rather than - the TREE_CHAIN. - * print-tree.c (print_note): Print TREE_PRIVATE and - TREE_PROTECTED. - - * dwarf2out.c (add_abstract_origin_attribute): Don't abort when - the original die cannot be found. - - * varray.h (varray_head_tag): Add elements_used. - (VARRAY_PUSH): New macro. - (VARRAY_POP): Likewise. - (VARRAY_TOP): Likewise. - Add variants of VARRAY_PUSH and VARRAY_POP for all varray element - types. - * varray.c (varray_init): Initialize elements_used. - * Makefile.in (BASIC_BLOCK_H): Add varray.h. - (INTEGRATE_H): New variable. - (integrate.o): Depend on INTEGRATE_H. - (unroll.o): Likewise. - - * function.h (insert_block_after_note): Declare. - * function.c (insert_block_after_note): Split out from ... - (retrofit_block): ... here. - - * stmt.c (expand_fixup): Fix typo in comment. - -Sat Dec 4 14:13:38 MET 1999 Jan Hubicka - - * regmove.c (copy_src_to_dest): Remove loop_depth parameter. - (optimize_reg_copy_1): Remove REG_N_REFS updating code. - (optimize_reg_copy_2, copy_src_to_dest, fixup_match_2): Likewise. - (regmove_optimize, fixup_match_1): Likewise. - -1999-12-05 Michael Hayes - - * flow.c (flow_loops_dump): Add missing argument when calling - flow_loop_nested_p. - -1999-12-04 Geoffrey Keating - Greg McGary - - * c-common.c (enum attrs): Add A_NO_LIMIT_STACK. - (init_attributes): Add A_NO_LIMIT_STACK. - (decl_attributes): Handle A_NO_LIMIT_STACK. - * c-decl.c (duplicate_decls): Handle DECL_NO_LIMIT_STACK. - * explow.c (allocate_dynamic_stack_space) [!HAVE_allocate_stack]: - Handle stack bounds checking. - * flags.h (flag_stack_check): Use the word 'probe' rather than - 'check', because the flag doesn't actually cause any checking to - be done. - * function.c (expand_function_start): Set - current_function_limit_stack. - * function.h (struct function): Add limit_stack. - (current_function_limit_stack): Define. - * invoke.texi (Code Gen Options): Document new options. - * rtl.h: Declare stack_limit_rtx. - * toplev.c (stack_limit_rtx): New variable. - (decode_f_option): Handle new options -fstack-limit-register=REG, - -fstack-limit-symbol=IDENT, -fno-stack-limit. - (main): Add stack_limit_rtx as GC root. - * tree.h (DECL_NO_LIMIT_STACK): New macro. - (struct tree_decl): New member no_limit_stack. - - * config/rs6000/rs6000.c (rs6000_allocate_stack_space): Handle - stack_limit_rtx. - * config/rs6000/rs6000.md (allocate_stack): Handle stack_limit_rtx. - (conditional_trap+1): Get new mnemonic correct. - (conditional_trap+2): New pattern for DImode traps. - - * config/m68k/m68k.c (output_function_prologue): Handle - stack_limit_rtx. - * config/m68k/m68k.md (trap): New insn. - (conditional_trap): New insn. - * md.texi (Standard Names): Document `trap' and - `conditional_trap'. - * optabs.c (gen_cond_trap): Use start_sequence()/end_sequence() - so a cc0 setter doesn't get emitted at some random place in the - function. - - * config/i960/i960.md (trap): New insn. - (conditional_trap): New expander. - (conditional_trap+1, conditional_trap+2): New insns for signed - and unsigned cases. - * config/i960/i960.c (i960_function_prologue): Use - STARTING_FRAME_OFFSET. Handle stack_limit_rtx. - -Thu Dec 2 21:22:45 1999 Greg McGary - Geoffrey Keating - - * flags.h (warn_padded, warn_packed): Add global var decls. - * toplev.c (warn_padded, warn_packed): Add global var defns. - (W_options): Add warnings `-Wpacked' and `-Wpadded'. - * stor-layout.c (layout_record): Add local variable `type' - to hold often-used TREE_TYPE (field). Add local variable - `unpacked_align' to hold alignment that would be in force - if no `packed' attribute were present. Warn if `packed' attribute - is unnecessary, or even harmful. Warn when gcc inserts padding - to satisfy alignment requirements of members. Use NULL_TREE - when checking whether var_size is set. - * invoke.texi: Document new flags. - -1999-12-03 Nathan Sidwell - - * frame.c (fde_split): Reimplement to avoid variable sized array. - -Thu Dec 2 18:59:48 1999 J"orn Rennecke - - * combine.c (try_combine): Before fixing up LOG_LINKS for the - i3_subst_into_i2 case, check that GET_CODE (PATTERN (i2)) == PARALLEL. - -1999-12-02 Gavin Romig-Koch - - * invoke.texi: Document the mips option -mno-crt0 - -1999-12-02 Mike Karr - - * cccp.c (argdata): Added free_ptr member. - (macroexpand): Initialize free_ptr of each argument. When an - argument's buffers are freed, if the argument's free_ptr corresponds - to a buffer on the input stack, then return the free_ptr to that stack - frame, otherwise, free it. - (macarg): If an argument begins and ends on the same input stack level, - then transfer the free_ptr of that buffer to the argument in case - the stack is popped during the processing of a subsequent argument. - -1999-12-02 Bernd Schmidt - - * loop.c (note_reg_stored): New function. - (struct note_reg_stored_arg): New structure. - (try_copy_prop): Change to be more conservative; only replace within - one extended basic block and stop replacing if a store to the - replacement reg is seen. - -1999-12-02 Nick Clifton - - * config/fp-bit.c: Initialize all fields of the NAN - constants. - - * c-lex.c (check_newline): Pass pragma_getc and pragma_ungetc - to HANDLE_PRAGMA. - -Wed Dec 1 18:16:38 1999 Jan Hubicka - - * i386.md (extend?f?f2): Force the input into a register, not - the output. - -1999-12-01 Jakub Jelinek - - * config/sparc/sparc.md (movsf_const_intreg): Add constraints for - regclass' sake. - (movdf_const_intreg_sp32): Likewise. Prefer the memory load - alternative because setting up 64bit constant is usually costly, - especially when reload is in progress or completed. - (movdf_const_intreg_sp64): Likewise. - (movdf_const_intreg split): Fix building up constants when - HOST_BITS_PER_WIDE_INT is 64 yet long is 32bit. - -Wed Dec 1 16:51:22 1999 Jeffrey A Law (law@cygnus.com) - - * combine.c (if_then_else_cond): Use const_true_rtx instead of - const1_rtx for return values in EQ/NE comparison against (const_int 0) - case. - - * mn10300.c (REG_SAVE_BYTES): Allocate space for AM33 registers. - (asm_file_start): Emit .am33 into assembly file when compiling for - the AM33. - (print_operand_address): Handle POST_INC addresses. - (can_use_return_insn, initial_offset): Check AM33 registers too. - (expand_prologue): Check & save AM33 registers too. - (expand_epilogue): Similarly. - (secondary_reload_class): Handle AM33 specific secondary reloads. - (output_tst): Emit efficient code for the AM33 too. - * mn10300.h (CPP_SPEC, TARGET_AM33): Define. - (TARGET_SWITCHES): Add -mam33 switch. - (FIRST_PSEUDO_REGISTER): Handle new AM33 registers. - (FIXED_REGISTERS, CALL_USED_REGISTERS): Likewise. - (REG_ALLOC_ORDER, CONDITIONAL_REGISTER_USAGE): Likewise. - (HARD_REGNO_MODE_OK, MODES_TIEABLE_P): Likewise. - (enum reg_class, REG_CLASS_NAMES): Likewise. - (REG_CLASS_CONTENTS, REGNO_REG_CLASS): Likewise. - (INDEX_REG_CLASS, REG_CLASS_FROM_LETTER): Likewise. - (REGNO_OK_FOR_INDEX_P, PREFERRED_RELOAD_CLASS): Likewise. - (PREFERRED_OUTPUT_RELOAD_CLASS, LIMIT_RELOAD_CLASS): Likewise. - (REGISTER_MOVE_COST, REGISTER_NAMES): Likewise. - (HAVE_POST_INCREMENT): Define. - (GO_IF_LEGITIMATE_ADDRESS): Allow POST_INC addresses for the AM33. - (GO_IF_MODE_DEPENDENT_ADDRESS): POST_INC is a mode dependent address. - * mn10300.md (movqi, movhi, addsi, subsi): Add AM33 variants. - (mulsi, andsi, iorsi, xorsi, notsi): Likewise. - (ashiftsi, lshiftrtsi, ashiftrtsi): Likewise. - (zero_extend to SI from QI/HI): Likewise. - (sign_extend to SI from QI/HI): Likewise. - (mulsidi3, umulsidi3): New patterns for the AM33. - (tstsi with zero extension from QI/HI): Add AM33 variants. - (movsi, movsf, movdi, movdf): Generate efficient code for the AM33 too. - (return_internal_regs, store_movm): Handle new AM33 registers. - * t-mn10300 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Define. - (LIBGCC, INSTALL_LIBGCC): Likewise. - * invoke.texi: Document new flags. - -Fri Nov 26 10:59:12 CET 1999 Jan Hubicka - - * i386.md (addsi3_cc): Add "binary_operator_ok" to the condition. - (addsi3_carry): Likewise. - (sbbsi3_cc): Add "binary_operator_ok" to the condition. - (sbbsi3_carry): Likewise. - (mulsi3): Rewrite to expander, ensure that only one operand is memory. - (mulhi3): Likewise. - (test?i_1): Ensure that only one operand is memory. - (conditional move patterns): likewise. - (shift and rotate patterns): Rewrite to expander, add - "binary_operator_ok" to the condition. - - * i386.md (QImode patterns): Remove '*' before the 'r' constraints. - * i386.h (procesor_costs): Add movzbl_load field. - (HARD_REGNO_MODE_OK): Accept QImode on non PARTIAL_REGISTER_STALL in - non-Q registers, accept DImode registers anywhere. - (Q_CLASS_P): New. - (MEMORY_MOVE_COST): Calculate QImode moves correctly. - * i386.c (*_cost): Set value for movxbl_load field. - - * (addsi): New add to lea splitter. - (ashlsi): Likewise. - (lea to add/shift peep2): New. - -1999-12-01 Mark Salter - - * config/mips/elf.h (STARTFILE_SPEC): Add no-crt0. - * config/mips/elf64.h (STARTFILE_SPEC): Add no-crt0. - * config/mips/mips.h (TARGET_SWITCHES): Add no-crt0. - -Tue Nov 30 15:20:52 MET 1999 Jan Hubicka - - * i386.c (ix86_expand_move): Never add clobbers to move patterns. - * i386.md (movsi_xor): New. - (movsi_or): New. - (movsi_1, movhi_1, movqi_1): Remove. - (movsi_2): Rename to movsi_1. - (movhi_2): Rename to movhi_1. - (movqi_2): Rename to movqi_1. - (movdi_1): Remove; remove splitter. - (movdi_2): Rename to movdi_1. - (divmodsi4 splitter): Do not emit clobbers for move patterns. - (long move peep2): Do not create QI or HI mode mov0s - (mov -1,reg -> or peep2s): Enable again, rewrite to single peephole. - - * i386.md (zero_extend?i?i2): Rewrite to expanders; new patterns, - rewrite splitters. - - * i386.md (neg?f2_if): Split "r" and "f" to separate alternatives. - (abs?f2_if): Likewise. - -1999-11-30 Alex Samuel - - * ggc.h (ggc_test_and_set_mark): New macro. - (ggc_mark_rtx): Use ggc_test_and_set_mark. - (ggc_mark_tree): Likewise. - (ggc_mark_rtvec): Likewise. - * ggc-common.c (ggc_mark_rtx_children): Reduce recursion. - -1999-11-30 Jason Merrill - - * dwarf2out.c (scope_die_for): Only handle types. Only search for - containing types. - (decl_scope_table): Just an array of trees now. - (push_decl_scope): Simplify. - (dwarf2out_init): Adjust. - (local_scope_p): New fn. - (gen_inlined_enumeration_type_die): Don't call scope_die_for. - (gen_inlined_union_type_die, gen_inlined_structure_type_die): Likewise. - (gen_typedef_die): Likewise. - (gen_lexical_block_die): Don't call push/pop_decl_scope. - (gen_inlined_subroutine_die): Likewise. - (gen_abstract_function): Set current_function_decl temporarily. - (gen_subprogram_die): Don't check DECL_ABSTRACT to set declaration. - Handle block extern declarations. Don't call push/pop_decl_scope. - (gen_decl_die): Fix logic for block externs. - -1999-11-30 Kaveh R. Ghazi - - * calls.c (special_function_p): Remove `realloc' and add `strdup' - to the list of functions which have attribute malloc by default. - -1999-11-30 Kaveh R. Ghazi - - * c-lex.c (yylex): With -Wtraditional, when the ANSI type of an - integer constant does not match the traditional type, limit the - warnings to cases where the base of the type is ten. - - * invoke.texi (-Wtraditional): Document it. - -Tue Nov 30 15:18:35 1999 Franz Sirl - - * combine.c (try_combine): Only pass SET or CLOBBER to SET_DEST - * rs6000.md: Only access a CONST_INT with INTVAL - -Tue Nov 30 14:21:00 1999 Richard Henderson - - * lcm.c (compute_laterin): Cast bb->aux to size_t not int. - (compute_nearerout): Likewise. - * ggc-page.c (ggc_page_print_statistics): Explicitly cast - size_t to unsigned long for formatting. - -1999-11-30 Jakub Jelinek - - * config/sparc/sparc.h (FIXED_REGISTERS, CONDITIONAL_REGISTER_USAGE): - Allow the user to override call-used/fixed state of %g2-5 - registers from the command line (with the exception of %g4 for - embedded model). - (REG_LEAF_ALLOC_ORDER): Move %g1 and %g4-7 registers to front, so that - there is a higher chance of having a leaf function. - (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Provide separate macros - for ARCH64 which has %ccr register. - * config/sparc/sparc.md (return_losum_si, return_losum_di): New - patterns. - * config/sparc/sparc.c (eligible_for_epilogue_delay): For the return - insn accept into delay slot any insn which does not use %[ol] - registers. Accept some LO_SUM and shift left by 1 for the normal - restore case. - (output_function_epilogue): Likewise. - (epilogue_renumber): Added argument which inhibits any renumbering - and just tests if the rtx does not use any %[ol] registers. - (output_return): Reflect above change. - -1999-11-30 Jakub Jelinek - - * config/sparc/sparc.c (sparc_va_arg): Fix sparc64 va_arg - aggregate passing for sizes <= 16 bytes. - -1999-11-30 Bernd Schmidt - - * cse.c (FIXED_REGNO_P): Delete tests for OVERLAPPING_REGNO_P. - * global.c (global_alloc): Delete [OVERLAPPING_REGNO_P] code. - * reload.c (find_dummy_reload): Likewise. - (find_equiv_reg): Likewise; also for INSN_CLOBBERS_REGNO_P. - * reload1.c (reload_as_needed): Likewise. - * stupid.c (stupid_find_reg): Likewise. - * tm.texi (Obsolete Register Macros): Delete section. - * gmicro.h: Remove all traces of the two macros. - * i386.h: Likewise. - * m88k.h: Likewise. - * mips.h: Likewise. - -1999-11-30 Brendan Kehoe - - * sparc.h (MASK_FASTER_STRUCTS, TARGET_FASTER_STRUCTS): Define. - (TARGET_SWITCHES): Add -mfaster-structs/-mno-faster-structs flags. - (ROUND_TYPE_ALIGN): Use better value if -mfaster-structs. - * sparc.md (sparclite86x_branch, sparclite86x_shift): New function - units for the sparclite86x chip. - (flush): Revert October 14th change; add SImode specifically. - (flushdi): Copy of flush, but DImode, to avoid genrecog warnings. - * invoke.texi: Document it. - -Tue Nov 30 14:58:14 1999 Nick Clifton - - * config/mn10200/mn10200.h (PREDICATE_CODES): Add - psimode_truncation_operand. - - * config/mn10200/mn10200.c (psimode_truncation_operand): New - function. Return true if the operand is either a MEM valid - for a PSImode address or not a MEM at all. - - * config/mn10200/mn10200.md (truncsipsi2): Use - psimode_truncation_operand. - -1999-11-30 Michael Hayes - - * flow.c (flow_nodes_print, flow_loops_cfg_dump): New functions. - (flow_loop_nested_p, flow_loops_dump, flow_loops_free): Likewise. - (flow_loop_exits_find, flow_loop_nodes_find): Likewise. - (flow_depth_first_order_compute, flow_loop_pre_header_find): Likewise. - (flow_loop_tree_node_add, flow_loops_tree_build): Likewise. - (flow_loop_level_compute, low_loops_level_compute): Likewise. - (flow_loops_find, flow_loop_outside_edge_p): Likewise. - * basic-block.h: Protect from multiple inclusion. - (flow_loops_find, flow_loops_free, flow_loop_dump): Add protoypes. - (struct loops, struct loop): Define structures. - * sbitmap.c (sbitmap_a_subset_b_p): New function. - * sbitmap.h: Protect from multiple inclusion. - (sbitmap_a_subset_b_p): Add prototype. - * Makefile.in (LOOP_H): New macro. - (stmt.o, integrate.o, loop.o, unroll.o): Replace loop.h with LOOP_H. - -Tue Nov 30 01:34:47 1999 Philippe De Muyter - - * cppinit.c (CAT): The argument list of this macro may not contain - spaces ! - -1999-11-29 David S. Miller - - Move quantity tables and register equivalence chains into - per-qty and per-register structure arrays respectively. - * cse.c (qty_first_reg, qty_last_reg, qty_mode, qty_const, - qty_const_insn, qty_comparison_code, qty_comparison_const, - qty_comparison_qty): Delete, replace with... - (qty_table): this structure table. - (reg_next_eqv, reg_prev_eqv): Delete, replace with... - (reg_eqv_table): this structure table. - (make_new_qty): Add argument MODE. Caller updated. - Update to use qty_table and reg_eqv_table. - (make_regs_eqv, delete_reg_equiv, insert_regs, - insert, exp_equiv_p, cse_rtx_varies_p, canon_reg, - fold_rtx, equiv_constant, record_jump_cond, cse_insn, - cse_process_notes, cse_main, cse_basic_block): Likewise. - -Mon Nov 29 16:56:42 1999 Richard Kenner - - * fold-const.c (extract_muldiv, case {MIN,MAX}_EXPR): Reverse - operation if C is negative. - (extract_muldiv, case SAVE_EXPR): Supresss if arg has side effects. - (extract_muldiv, case {PLUS,MINUS}_EXPR): Don't apply distributive - law for some divisions if constant is negative and change other - divisions to the opposite rounding. - - * expr.c (store_constructor_field): If bit position is not multiple - of alignment of TARGET's mode, use BLKmode. - - * expr.c (expand_expr_unaligned): Add more code from full case - that is needed when OP0 is in a register. - -Mon Nov 29 18:09:39 1999 J"orn Rennecke - - * dwarfout.c (field_byte_offset): Size can be zero if there was - an error. - -1999-11-29 Bernd Schmidt - - * fold-const.c (split_tree): Delete unused vars ORIG_IN and TYPE. - (associate_trees): Delete unused var TEM. - (extract_muldiv): Delete unused var CANCEL_P. - - * fold-const.c [TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT] - (target_isinf, target_isnan, target_negative): Add return types to - function definitions. - -1999-11-29 Bruce Korb - - * fixinc/fixincl.c(process): don't skip GLIBC files any more. - * fixinc/hackshell.tpl: ditto - * fixinc/fixtests.c(double_slash_test): more C++ header testing - * fixinc/inclhack.def(AAB_fd_zero_glibc*): corrected spelling of mach - -1999-11-29 Bernd Schmidt - - * reload.c (push_reload): When looking for a register to put into - reg_rtx, make sure all hard regs in a multi-reg register are in the - right class and nonfixed. - - * haifa-sched.c (reg_last_uses, reg_last_sets, reg_last_clobbers, - pending_read_insns, pending_write_insns, pending_read_mems, - pending_write_mems, pending_list_length, last_pending_memory_flush, - last_function_call, sched_before_next_call): Move static variables - into a structure. - (bb_ prefixed versions): Replace with single array bb_deps. - (struct deps): New structure. - (add_insn_mem_dependence, flush_pending_lists, sched_analyze_1, - sched_analyze_2, sched_analyze_insn, sched_analyze): Accept new - argument of type "struct deps *"; use that instead of global - variables. All callers changed. - (init_rgn_data_dependencies): Delete function. - (init_rtx_vector): Delete function. - (init_deps): New function. - - (free_pending_lists): Simplify, we always use the bb_deps array even - if only one basic block. - (compute_block_backward_dependences): Likewise. - (schedule_region): Likewise. - - (propagate_deps): New function, broken out of - compute_block_backward_dependences. - (compute_block_backward_dependences): Use it. - - * alpha.md: Delete useless patterns that tried to work around - register elimination problems. - - * unroll.c (loop_iterations): Don't abort if iteration variable - was made by loop. - - From Joern Rennecke: - * reload1.c (reloads_conflict): Reverse test comparing operand - numbers when testing for conflict between output/outaddr reloads. - -1999-11-29 David S. Miller - - * config/sparc/sparc.c (init_cumulative_args): Fix type of third - arg. - * config/sparc/sparc-protos.h: Update proto, move into RTX_CODE. - -1999-11-28 Robert Lipe - - * i386/sco5.h (FINI_SECTION_ASM_OP_COFF): Move destructor fn - table from .fini into .dtor. - -1999-11-28 Anthony Green - - * tree.h (struct tree_decl): Add malloc_flag. - (DECL_IS_MALLOC): Define. - * c-common.c (attrs): Add A_MALLOC attribute. - (init_attributes): Add this attribute to the table. - (decl_attributes): Handle malloc attribute. - * calls.c (special_function_p): Check for the malloc attribute. - * extend.texi (Function Attributes): Document malloc attribute. - -Sun Nov 28 13:21:00 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (reload shift-add patterns): Remove. - -1999-11-28 Herman A.J. ten Brugge - - * reorg.c (dbr_schedule) Print more statistics. Corrected - problem when printing info when 3 delay slots are filled. - -1999-11-28 Jakub Jelinek - - * combine.c (setup_incoming_promotions): Pass an outgoing - regno to FUNCTION_ARG_REGNO_P which it expects. - -1999-11-28 Andreas Jaeger - - * mips/linux.h (CPP_PREDEFINES): Undefine before redefining. - -Sun Nov 28 00:48:15 1999 Philippe De Muyter - - * cccp.c (do_include): Avoid initialization of automatic variable. - - * integrate.c (mark_stores): Function definition made void, to match - previous declaration. - * regclass.c (dump_regclass): Ditto. - * Makefile.in (WARN_CFLAGS): Macro augmented by `-Wtraditional'. - -Sat Nov 27 08:38:26 1999 Richard Kenner - - * expr.c (store_constructor): Use EXACT_DIV_EXPR when dividend is - known to be multiple of divisor. - - * expr.c (store_constructor): Don't clobber TARGET if CLEARED. - - * combine.c (try_combine): Add code to try to merge a set of a - two-word pseudo to a constant with a setting of one of those words - to a constant. - - * fold-const.c (negate_expr, associate_trees, extract_muldiv): New. - (split_tree): Completely rework to make more general. - (make_range, fold): Call negate_expr. - (fold, case NEGATE_EXPR): Simplify -(a-b) is -ffast-math. - (fold, associate): Call new split_tree and associate_trees. - (fold, case MULT_EXPR, case *_{DIV,MOD}_EXPR): Call extract_muldiv. - -1999-11-26 Bernd Schmidt - - * loop.c (try_copy_prop): Avoid GNU C extension. - -1999-11-25 Mark Mitchell - - * except.c (init_eh_for_function): Still zero eh_return_context, - eh_return_stack_adjust, and eh_return_handler. - - * except.h (eh_status): Adjust documentation for x_protect_list. - (begin_protect_partials): New function. - * except.c (enqueue_eh_entry): Fix formatting. - (get_first_handler): Add consistency check. - (add_partial_entry): Adjust usage of protect_list. - (emit_cleanup_handler): Save and restore ehqueue. - (expand_start_all_catch): Add comment. - (begin_protect_partials): New function. - (end_protect_partials): Adjust usage of protect_list. - (init_eh_for_function): Use xcalloc. - -1999-11-25 Kaveh R. Ghazi - - * c-common.c (check_format_info): Don't call a variadic function - with a non-literal format string. - - * c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise. - - * c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else, - pedantic_lvalue_warning, error_init, pedwarn_init, warning_init): - Likewise. - - * cccp.c (check_macro_name, do_xifdef, vwarning_with_line): - Likewise. - - * collect2.c (collect_wait): Likewise. - - * dbxout.c (dbxout_type): Likewise. - - * gcc.c (do_spec_1): Likewise. - - * genemit.c (gen_insn, gen_expand): Likewise. - - * genrecog.c (write_switch, write_subroutine): Likewise. - - * mips-tfile.c (catch_signal, botch): Likewise. - - * print-rtl.c (print_rtx): Likewise. - - * toplev.c (default_print_error_function, report_error_function, - _fatal_insn): Likewise. - -1999-11-25 Mark Mitchell - - * tree.c (unsave_expr_now): Handle NULL_TREE as input. - -Wed Nov 24 17:08:09 MET 1999 Jan Hubicka - - * reg-stack.c (subst_stack_regs_pat): Swap operands in commutative - operations when needed. - * i386.md (fop_?f_comm): New. - (fop_?f_1): Do not accept commutative operands. - -1999-11-25 Andreas Jaeger - - * config/mips/mips.md (casesi_internal): Add missing brace. - -1999-11-25 Jason Merrill - - * dwarf2out.c (pend_type, output_pending_types_for_scope): Lose. - (splice_child_die): Handle moving a child DIE from the declaration - DIE of a class to its specification. - (gen_struct_or_union_type_die): Use 'complete' consistently. - (gen_decl_die): Generate the virtual context DIE first. - Use decl_ultimate_origin instead of DECL_ABSTRACT_ORIGIN. - -1999-11-24 Gavin Romig-Koch - - * config/mips/mips.md (call_value_multiple_interanal1): New. - -1999-11-24 Jason Merrill - - * dwarf2out.c (free_AT, free_die): New fns. - (remove_children): Call them. - (output_line_info): Disable removal of duplicate notes. - - Generate minimal debug info for types with TYPE_DECL_SUPPRESS_INFO set. - * dwarf2out.c (gen_struct_or_union_type_die): TYPE_DECL_SUPPRESS_INFO - means pretend the type isn't defined. - Don't defer emitting types. - (gen_type_die_for_member): New fn. - (gen_decl_die): Call it. - (splice_child_die): New fn. - (gen_member_die): Call it rather than generate duplicate dies. - - Defer emitting information for the abstract instance of an inline - until we either inline it or emit an out-of-line copy. - * dwarf2out.c (decl_ultimate_origin): Ignore DECL_ABSTRACT_ORIGIN - from output_inline_function if DECL_ABSTRACT is also set. - (block_ultimate_origin): Likewise. - (gen_abstract_function): New fn. - (gen_decl_die, gen_inlined_subroutine_die): Call it. - (gen_subprogram_die): An abstract instance is not a declaration - just because it doesn't match current_function_decl. Don't abort - because DECL_DEFER_OUTPUT isn't set. Do abort if a declaration - has an abstract origin. - * toplev.c (rest_of_compilation): Don't emit dwarf2 info for the - abstract instance here. - -Wed Nov 24 18:39:18 1999 Andrew Haley - - * config/sh/sh.h (SECONDARY_OUTPUT_RELOAD_CLASS): Add the case - where we need to reload fpul from a system register. - -1999-11-24 Andreas Jaeger - - * config/mips/linux.h (CPP_PREDEFINES): Added. - (LINK_SPEC): Remove -Y since this is only needed on sparc. - -1999-11-24 Andreas Jaeger - - * config/mips/linux.h (TARGET_VERSION): Added. - (HANDLE_SYSV_PRAGMA): Added. - (DEFAULT_VTABLE_THUNKS): Added. - -Wed Nov 24 14:12:15 MET 1999 Jan Hubicka - - * local-alloc.c (qty): New structure and static variable. - (qty_phys_reg): Remove, all references changed to qty. - (qty_n_refs): Likewise. - (qty_min_class): Likewise. - (qty_birth): Likewise. - (qty_death): Likewise. - (qty_size): Likewise. - (qty_mode): Likewise. - (qty_n_calls_crossed): Likewise. - (qty_alternate_class): Likewise. - (qty_changes_size): Likewise. - (qty_first_reg): Likewise. - (alloc_qty): Rename variable QTY to QTYNO. - (finf_free_reg): Likewise. - (local_alloc): Allocate qty, do not allocate the removed variables. - -Wed Nov 24 17:26:05 1999 Geoffrey Keating - - * config/mips/mips.h (ASM_SPEC): Don't pass -G to the assembler - when -membedded-pic is passed. - - * config/mips/mips.md (casesi): Handle 64-bit case too. - (casesi_internal_di): New insn. - - * config/mips/mips.c (embedded_pic_offset): Always make the - embedded-pic subtractions relative to the name of the current - function by use of the magic string "..CURRENT_FUNCTION". - * config/mips/mips.h (ASM_OUTPUT_LABELREF): Make the magic happen. - -1999-11-24 Geoffrey Keating - - * config/mips/mips.md (div_trap_normal): Don't ask for the REGNO - of (const_int 0), when what we really care about is - whether it's a zero constant anyway. - (div_trap_mips16): Likewise. - -1999-11-23 Mark Mitchell - - * loop.c (loop_optimize): Always find_loop_tree_blocks and - unroll_block_trees when generating debuggable code. - - * tree.h (unsave_expr_1): New function. - (lang_unsave): New variable. - (get_callee_fndecl): New function. - * tree.c (unsave_expr_now_r): New function. - (lang_unsave): Define. - (unsave_expr_1): Likewise. - (unsave_expr_now_r): Split out from unsave_expr_now. - (unsave_expr_now): Call lang_unsave if it is non-NULL. Otherwise, - call unsave_expr_now_r. - (get_callee_fndecl): Define. - - * Makefile.in (gencheck): Don't depend on lang_tree_files. - (gencheck.o): Do depend on lang_tree_files. - - * integrate.h (copy_decl_for_inlining): New declaration. - * integrate.c (copy_and_set_decl_abstract_origin): Remove. - (copy_decl_for_inlining): New function. - (integrate_parm_decls): Use it. - (integrate_decl_tree): Likewise. - -1999-11-23 Gavin Romig-Koch - - * config/mips/mips.h (ISA_HAS_FP4,ISA_HAS_CONDMOVE,ISA_HAS_8CC): Split - the second two from the first. - (CONDITIONAL_REGISTER_USAGE): Use ISA_HAS_8CC rather than ISA_HAS_FP4. - * config/mips/mips.md (movcc,reload_incc,reload_outcc, - conditional move): Use ISA_HAS_CONDMOVE or ISA_HAS_8CC rather than - ISA_HAS_FP4. - * config/mips/mips.c (mips_move_1word,gen_conditional_branch, - override_options): Use ISA_HAS_CONDMOVE or ISA_HAS_8CC rather than - ISA_HAS_FP4. - -Tue Nov 23 11:15:04 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (call_internal_symref, call_value_internal_symref): No mode - needed on the address operand. - * pa.c (call_operand_address): Check for the correct mode. - -1999-11-23 Bernd Schmidt - - * loop.c: Include "basic-block.h". - (try_copy_prop, replace_loop_reg): New functions. - (load_mems): Detect registers that just hold copies of the hoisted - mem, and call try_copy_prop to eliminate them. - * Makefile.in (loop.o): Update dependencies. - -Tue Nov 23 01:03:29 1999 Hans-Peter Nilsson - - * Makefile.in (gencheck.o): Depend on gencheck.h. - (insn-emit.o): Depend on flags.h, hard-reg-set.h and resource.h. - (insn-peep.o): Depend on except.h and function.h. - (insn-attrtab.o): Depend on RECOG_H. - (insn-output.o): Depend on toplev.h and flags.h. - (gengenrtl.o): Depend on real.h. - (gen-protos.o): Depend on cpplib.h and cpphash.h. - Unify all dependencies to be on RECOG_H rather than recog.h. - -Tue Nov 23 00:57:10 1999 Rainer Orth - - From Casper H.S. Dik on comp.unix.solaris, 23 Oct 1998: - * configure.in: Try building a bi-arch 32/64-bit compiler on - sparc-*-solaris2.7 and higher. - * configure: Rebuild. - -Mon Nov 22 23:09:44 1999 David O'Brien - - * config/freebsd.h: New, FreeBSD architecture independent file. - * config/i386/freebsd-elf.h: removed FreeBSD architecturally - independent pieces. - * config/i386/freebsd.h: include i386/perform.h via tm.h rather than - directly by i386/freebsd.h. - * configure.in (*-*-freebsdelf): Include new FreeBSD architecturally - independent configuration file. - (*-*-freebsdelf): Include i386/perform.h via tm.h rather than - directly by i386/freebsd.h. - * configure: Rebuilt. - - * xm-i386.h: Define `__i386__' if not defined, rather than `i386' - which is in the user's namespace. - * libgcc2.c: Look for the ANSI-C approved `__i386__' symbol, vs. - `i386' which is not in our namespace. - -Mon Nov 22 22:58:01 1999 "R. Kelley Cook" - - * invoke.texi (ARM Options): Add in -mno-alignment-traps - -1999-11-22 Jason Merrill - - * dwarf2out.c (die_struct): Remove die_attr_last and die_child_last. - (add_dwarf_attr, add_child_die): Just push onto the front. - (reverse_die_lists): New fn. - (add_sibling_attributes): Use it. - (push_decl_scope): Reorganize. - (add_name_and_src_coords_attributes): Don't set file and line for - an artificial decl. - (gen_subprogram_die): An artificial function doesn't need to match - file and line. - (gen_compile_unit_die): Return the generated die. Only add - AT_comp_dir if the filename is relative. - (remove_AT): Simplify loop. Also free string values. - (output_die): A DIE ref can't be null. - (output_value_format, value_format): Take a dw_attr_ref. - (dwarf_last_decl, is_extern_subr_die, sibling_offset): Remove. - (AT_class, AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, AT_loc, - AT_addr, AT_lbl): New fns. - (various): Use them. - (various): Constify. - -Mon Nov 22 23:53:50 1999 J"orn Rennecke - - * combine.c (combine_simplify_rtx): When handling a SUBREG, - take SUBREG_WORD into account. - (if_then_else_cond): Likewise. - -1999-11-22 Jason Merrill - - * gmon.c, i386/gmon-sol2.c, sparc/gmon-sol2.c: Remove advertising - clause from BSD license, pursuant with - - ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change - -1999-11-22 Bernd Schmidt - - * loop.c (load_mems): Reformat slightly. - * basic-block.h (regset_head): New typedef. - (INIT_REG_SET): New macro. - -1999-11-22 Bruce Korb - - * emit-rtl.c (gen_sequence): Only return the pattern of an insn if - its code is INSN and it has no notes. - -1999-11-22 Andrew Haley - - * varasm.c (function_defined): Remove. - (make_function_rtl): Don't set function_defined. - (make_decl_rtl): Remove global register warning. - * regclass.c (no_global_reg_vars): New variable. - (globalize_reg): Warn if function has already been defined. - (regclass_init): Set no_global_reg_vars. - -Mon Nov 22 14:42:22 MET 1999 Jan Hubicka - - * regclass.c (reg_pref): New structure and static variable - (prefclass): Delete. - (altclass): Delete. - (all uses of prefclass and altclass): Use reg_pref instead. - -1999-11-21 Nick Clifton - - * invoke.texi (ARM Options): Replace -mshort-load-bytes with - -malignment-traps. - (arm.h): Replace -mshort-load-bytes with -malignment-traps. - (arm.c): Replace TARGET_SHORT_BY_BYTES with TARGET_MMU_TRAPS. - (arm.md): Replace TARGET_SHORT_BY_BYTES with TARGET_MMU_TRAPS. - -Sun Nov 21 17:11:13 1999 Geoffrey Keating - - * varasm.c (output_constructor): Solve problem with long long - bitfields, even on BYTES_BIG_ENDIAN machines (testcase 991118-1). - -Fri Nov 19 05:48:45 CET 1999 Jan Hubicka - - * global.c (allocno): New structure and static variable. - (allocno_reg): Remove, all references replaced by allocno. - (allocno_size): Likewise. - (hard_reg_conflicts): Likewise. - (hard_reg_preferences): Likewise. - (hard_reg_copy_preferences): Likewise. - (hard_reg_full_preferences): Likewise. - (regs_someone_prefers): Likewise. - (allocno_calls_crossed): Likewise. - (allocno_n_refs): Likewise. - (allocno_live_length): Likewise. - (find_reg): Rename ALLOCNO to NUM. - - * regclass.c (may_move_in_cost): Rename from may_move_cost, all - references updated. - (may_move_out_cost): New variable. - (init_reg_sets_1): Initialize may_move_out_cost. - (record_reg_classes): Use may_move_out_cost. - - * regclass.c (dump_regclass): New function. - (regclass): New parameter DUMP, call DUMP_REGCLASS. - * toplev.c (rest_of_compilation): Open lreg dump file before regclass, - pass rtl_dump_file to regclass. - * rtl.h (regclass): Update prototype. - -Fri Nov 19 06:32:19 CET 1999 Jan Hubicka - - * i386.md (neg, not and abs patterns): Revmap to use - ix86_expand_unary_operator and ix86_unary_operator_ok. - (add?f and sub?f expanders): Force operand 1 to register. - * i386.c (ix86_expand_unary_operator): Rewrite. - (ix86_unary_operator_ok): Ensure that memory operands - match real opcode. - (ix86_binary_operator_ok): Do not allow operand 1 to - come into memory and operand 0 not. - (ix86_expand_binary_operator): Ensure that - src1 is not non-matching memory. - - * i386.md (negs?2): Rewrite to expanders, new patterns and splitters - to support integer registers and memory. - (abss?2_integer): Likewise. - - * i386.h (enum reg_class): Add FLOAT_INT_REGS. - (REG_CLASS_NAMES): Likewise. - (REG_CLASS_CONTENTS): Define FLOAT_INT_REGS as union of FLOAT_REGS - and GENERAL_REGS. - * i386.md (pushsf): Do not preferre FLOAT_REGS over GENERAL_REGS. - (movsf): Likewise; unify 4th and 5th alternative. - (pushdf): Likewise. - (movdf_1): Likewise; rename to movdf_integer. - (pushxf): Likewise; rename to pushxf_integer; fix output template; - remove redundant splitter. - (movxf_1): Likewise; rename to movxf_integer; fix splitter's condition. - (movdf_nointeger): New. - (movxf_nointeger): New. - (pushxf_nointeger): New. - - * i386.md (extend?f?f): Split to expander and pattern, refuse two - memory operands in patterns. - (fop*): Refuse two memory operands. - - * i386.md (ashrsi3_31): Allow cltd when optimizing for size even - on !TARGET_USE_CLTD CPUs. - -Fri Nov 19 10:41:15 GMT 1999 Nathan Sidwell - - * extend.texi: Document C++ restricted pointers and references. - -1999-11-19 Bernd Schmidt - - * cse.c (addr_affects_sp): No longer conditional on AUTO_INC_DEC. - (invalidate_skipped_set): Call it unconditionally. - (cse_set_around_loop): Likewise. - -Thu Nov 18 17:29:34 MST 1999 Diego Novillo - - * rtl.texi (mem): Add documentation for alias-set argument - to RTX `mem'. - -Fri Nov 18 13:39:22 CET 1999 Jan Hubicka - - * i386.h (struct_processor_costs): New fields int_load, int_store, - fp_move, fp_load and fp_store - (REGISTER_MOVE_COST): Fix comment, calculate exactly the cost of - fp->int moves - (MEMORY_MOVE_COST): New macro. - * i386.c (386_cost): Define new fields. - (i486_cost): Likewise. - (pentium_cost): Likewise. - (pentiumpro_cost): Likewise. - (k6_cost): Likewise. - -Fri Nov 19 11:11:55 1999 Greg McGary - Geoffrey Keating - - * config/m68k/m68kelf.h: Suppress '/* within comment' warning. - - * config/m68k/m68k.h (MASK_PCREL): Don't use same value as - MASK_ALIGN_INT. - - * config/m68k/m68k.h (MASK_NO_STRICT_ALIGNMENT): New macro. - (TARGET_STRICT_ALIGNMENT): New macro. - (TARGET_SWITCHES): Add "strict-align" and "no-strict-align". - (STRICT_ALIGNMENT): Depend on TARGET_STRICT_ALIGNMENT. - * invoke.texi (M680x0 Options): Document -mstrict-align. - -Thu Nov 18 11:10:03 1999 Jan Hubicka - Richard Henderson - - * i386-protos.h (split_xf, ix86_split_movdi): Remove. - (ix86_split_long_move): Declare. - * i386.c (split_xf, ix86_split_movdi): Remove. - (ix86_split_to_parts, ix86_split_long_move): New. - * i386.md (dimode move splitters): Use ix86_split_long_move. - (dfmode move splitters): Likewise. - (xfmode move splitters): Likewise. - (movsf_1): Allow F->r. - (movdf_1, movxf_1): Allow F->ro. - -1999-11-17 Mark Mitchell - - * except.h (struct eh_entry): Add goto_entry_p. - (eh_region_from_symbol): Remove prototype. - * except.c (find_func_region_from_symbol): New function. - (emit_cleanup_handler): Likewise. - (eh_region_from_symbol): Make it static. - (add_new_handler): Verify the argument. - (find_func_region): Update comment. - (expand_eh_region_end): Expand handlers here, rater than waiting - until expand_leftover_cleanups or start_all_catch. - (expand_leftover_cleanups): Don't expand here. - (expand_start_all_catch): Or here. - (expand_rethrow): Check the return value from find_func_region. - * function.c (expand_function_end): Emit the catch_clauses. - -1999-11-18 Gavin Romig-Koch - - * integrate.c (expand_inline_function): Add necessary check for NULL. - -1999-11-18 Nick Clifton - - * toplev.c (main): Correctly detect an unrecognized option. - - * cppinit.c (cpp_handle_option): Do not claim to have consumed - a -f option if it has not been recognized. - -Thu Nov 18 00:59:11 1999 Michael Gschwind - - * basic-block.h (update_life_extent): Remove trailing comma on - enumeration type list. - -1999-11-18 Herman A.J. ten Brugge - - * varasm.c (output_constructor) Solved problem with long long - bitfields. Corrected calculating this_time and shift. Also - corrected calculating mask when BITS_PER_UNIT == 32 (c4x). - -Wed Nov 17 23:46:14 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (split_edge): Take looping structure into account when - determining where to put the new block note. - -Wed Nov 17 20:42:43 1999 Jeff Holcomb - - * Makefile.in (ggc-none.o): Provide host specific version if - needed. - -Wed Nov 17 16:51:23 1999 Richard Henderson - - * cse.c (delete_trivially_dead_insns): Identify no-op insns - containing subregs too. - -Wed Nov 17 17:39:48 MST 1999 Diego Novillo - - * invoke.texi: Add documentation for -muninit-const-in-rodata. - * config/mips/mips.h (MASK_UNINIT_CONST_IN_RODATA): Define. - (TARGET_UNINIT_CONST_IN_RODATA): Define. - (text_section): Add switches -munint-const-in-rodata and - -mno-uninit-const-in-rodata. - (ASM_OUTPUT_COMMON): Remove. - (ASM_OUTPUT_ALIGNED_DECL_COMMON): Define. Check if uninitialized - const objects should be placed in read-only data. Otherwise declare - them in common. - -Wed Nov 17 16:38:32 1999 Richard Henderson - - * jump.c (jump_optimize_1): Revert last change. - -Wed Nov 17 15:18:30 1999 Richard Henderson - - * jump.c (jump_optimize_1): Don't try to duplicate the loop exit - test if optimizing for size. - -1999-11-17 Mark Mitchell - - * Makefile.in (toplev.o): Depend on except.h. - (dwarf2out.o,loop.o,flow.o,haifa-sched.o): Likewise. - -Mon Nov 15 22:45:39 CET 1999 Jan Hubicka - - * i386.md (divmodsi4): Rewrite to expander. - (*divmodsi4_nocltd): New. - (*divmodsi4_cltd): New. - (divmodsi4 splitter): Handle the case when input comes in edx. - (udivmodhi4): Do not use constraints in exander. - (ashrsi3_31): Conditionize by TARGET_USE_CLTD. - -1999-11-17 Jason Merrill - - * dwarf2out.c (push_decl_scope): Still use decl_scope_depth - 1 - for the common case. - -1999-11-16 Jakub Jelinek - - * explow.c (hard_function_value): Add outgoing argument. - * expr.h (hard_function_value): Declare it. - * calls.c (expand_call, emit_library_call_value): Update callers. - * function.c (aggregate_value_p): Ditto. - (diddle_return_value): Must look at the outgoing registers - on archs with register windows. - -Mon Nov 15 20:46:45 1999 Richard Henderson - - * alpha.c (alpha_build_va_list): Use make_lang_type and - initialize TYPE_NAME for the va_list record. - - * flow.c (calculate_global_regs_live): Zero bb->aux to begin. - - * ggc-common.c (ggc_print_statistics): Cast size_t to unsigned long - for printing. - * ggc.h (struct ggc_statistics): Rearrange elements for better - packing on 64-bit hosts. - * lcm.c (compute_laterin): Store a size_t not an int in bb->aux. - (compute_nearerout): Likewise. - -Tue Nov 16 14:37:52 1999 Geoffrey Keating - - * config/rs6000/rs6000.c (first_reg_to_save): Save - PIC_OFFSET_TABLE_REGNUM when -fpic even though it is fixed. - -1999-11-15 Jason Merrill - - * dwarf2out.c (scope_die_for): Don't rely on the decl_scope_table - notion of nesting to find the DIE for a type or function. - DIEs can go in limbo even if we got a context_die. - (push_decl_scope): Our context doesn't need to be in decl_scope_table. - (gen_struct_or_union_type_die): Don't use TREE_PERMANENT to test - for local type. - (gen_decl_die): Ignore NAMESPACE_DECLs for now. - (gen_type_die): Writing out the context doesn't cause member class - template instantiations to be written out as well. - -Mon Nov 15 15:33:18 1999 Richard Henderson - - * rs6000.h (ASM_OUTPUT_DEF): New. - Based on proposed addition from David Edelsohn. - -1999-11-15 Robert Lipe - Bruce Korb - - * fixinc/inclhack.def - (AAB_svr4_replace_byteorder): added. Takes advantage of GCC features - (unixware7_byteorder_fix): added. Removes conflicts for new defs - in net/inet.h. - (svr5_mach_defines): added. Like svr4_mach_defines, with new syntax - (svr4_endian): enabled with SVR5 - (svr4_mkdev): simplified syntax and enabled with SVR5 - -Sun Nov 14 18:49:37 1999 David O'Brien - - * configure.in: Handle libgcc2 threads support on FreeBSD platforms. - * configure: Rebuilt. - * config/t-freebsd-thread: New file. - -Sun Nov 14 23:11:05 1999 Jeffrey A Law (law@cygnus.com) - - * i386.c (ix86_decompose_address): Verify the base is a REG - before trying to examine its register number. - - * basic-block.h: Remove all #defines and prototypes related to - integer lists. - (free_bb_mem, compute_preds_succs): Remove prototype. - * rtl.h (free_bb_mem): Remove prototype. - * flow.c (alloc_int_list_node); Remove function. - (add_inst_list_node, free_int_list, add_pred_succ): Likewise. - (compute_preds_succs, free_bb_mem): Likewise. - * gcse.c (gcse_main): Do not call free_bb_mem anymore. - * toplev.c (rest_of_compilation): Likewise. - * haifa-sched.c (build_control_flow): Use flow generated edge - list to build the haifa specific edge list. - (find_rgns): Use new CFG data structures instead of pred/succ lists. - (schedule_insns): Do not build pred/succ lists anymore. Instead - build the edge table. - - * basic-block.h (dump_bb_data): Remove declaration. - * flow.c (dump_bb_data): Remove function. - * sbitmap.c (sbitmap_intersect_of_predsucc): Delete function. - (sbitmap_union_of_predsucc): Likewise. - - * gcse.c (delete_null_pointer_checks_1): Kill unused s_preds - argument. All callers changed. - (delete_null_pointer_checks_1): No longer need to compute the - pred/succ lists. - - * gcse.c (pre_expr_reaches_here_p): Kill CHECK_PRE_COM argument. - All callers changed. - (pre_expr_reaches_here_p_work): Likewise. - (pre_edge_insert): No longer call pre_expr_reaches_here_p. - * lcm.c (compute_laterin): Fix initialization of LATER. - (compute_nearerout): Similarly for NEARER. - -Sun Nov 14 12:41:57 1999 Bernd Schmidt - - * cse.c (set_nonvarying_address_components): Delete unused function. - (refers_to_p): Likewise. - -Fri Nov 12 20:53:22 1999 Jeffrey A Law (law@cygnus.com) - - * function.c (diddle_return_value): Set REG_FUNCTION_VALUE_P as - needed. - -Sat Nov 13 16:20:09 1999 Michael Hayes - - * defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Wrap macro - definition in do while (0). - -Fri Nov 12 16:26:25 1999 Jim Wilson - - * stmt.c (pushcase, pushcase_range): Partially revert Oct 28 change. - -Fri Nov 12 12:43:49 1999 Richard Henderson - - * unroll.c (unroll_loop): Make temp an unsigned HOST_WIDE_INT. - -Fri Nov 12 15:14:19 1999 Vladimir Makarov - - * i960.h (CAN_DEBUG_WITHOUT_FP): Don't define it. - (FRAME_POINTER_REQUIRED): Don't worry about nonlocal goto. - (ELIMINABLE_REGS, CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET): New. - (INITIAL_FRAME_POINTER_OFFSET): Remove it. - - * i960.c (i960_function_prologue): Don't allocate space for g8-g11 - saved on the stack. Output more accurate stack frame statistics - into assembler file. - -1999-11-12 11:47 -0800 Zack Weinberg - - * genextract.c (record_insn_name): New function. - (get_insn_name): No longer a stub. - (main): Call record_insn_name for each insn. After each label - written, print the insn name in a comment. - -Fri Nov 12 13:45:02 1999 Kaveh R. Ghazi - - * output.h (const_section, init_section, fini_section): Add - prototypes. - - * alpha/elf.h (const_section): Delete declaration. - - * svr4.h (const_section): Likewise. - -Fri Nov 12 08:54:22 1999 Mark Mitchell - - * tree.h (SAVE_EXPR_PERSISTENT_P): New macro. - * tree.c (array_type_nelts): Don't handle SAVE_EXPRs specially. - (unsave_expr_now): Don't unsave SAVE_EXPR_PERSISTENT_P - expressions. - * stor-layout.c (variable_size): Set SAVE_EXPR_PERSISTENT_P on - variable-sized array bounds. - -Fri Nov 12 08:04:45 1999 Catherine Moore - - * defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Use - ASM_OUTPUT_LABEL. - -Fri Nov 12 13:31:54 1999 Bernd Schmidt - - * config/arm/arm.h (LEGITIMIZE_RELOAD_ADDRESS): Treat QImode - addresses the same way GO_IF_LEGITIMATE_INDEX does. - -Fri Nov 12 12:36:04 1999 Bernd Schmidt - - * cse.c (hash_arg_in_struct): Delete. - (struct table_elt): Delete elt in_struct. - (struct set): Delete elt src_in_struct. - (merge_equiv_classes): Don't set either hash_arg_in_struct or - the corresponding in_struct elts. - (canon_hash): Likewise. - (safe_hash): Likewise. - (find_best_addr): Likewise. - (record_jump_cond): Likewise. - (cse_insn): Likewise. - -Thu Nov 11 19:45:24 1999 Jim Wilson - - * loop.c (invariant_p, case MEM): Put MEM_VOLATILE_P check back. - - * dbxout.c (dbxout_type, case INTEGER_TYPE): Handle too large - unsigned types. - -Thu Nov 11 18:54:24 1999 Jeffrey A Law (law@cygnus.com) - - * function.c (diddle_return_value): Put back check that the DECL_RTL - for the function is a register. - - * function.c (diddle_return_value): Use hard_function_value to - get an rtx suitable for use in the USE/CLOBBER insn. - - * global.c (global_conflicts): Update comments. - (record_conflicts): No need to record conflicts between pseudos here. - -1999-11-11 Bruce Korb - - * fixinc/fixincl.c: Added verbose levels for status messages - -Thu Nov 11 13:23:04 1999 Bernd Schmidt - - * jump.c (jump_optimize_1): Avoid passing an rtx that is not an - operand as argument to expand_and or expand_binop. - -Thu Nov 11 02:21:16 1999 Rodney Brown - - * xcoffout.c (xcoffout_source_file): Change ggc_add_root to - gcc_add_string_root. - -Wed Nov 10 21:24:19 1999 Jason Eckhardt - - * config/pa/pa.h (MASK_RETURN_ADDR): Change 0xfffffffc to -4. - -Wed Nov 10 15:56:16 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (compute_flow_dominators): Initially put all blocks on - the worklist. - * lcm.c (compute_antinout_edge, compute_available): Similarly. - * gcse.c (compute_cprop_avinout): Remove. - (compute_cprop_data): Use compute_available. - (delete_null_pointer_checks_1): Use compute_available. - - * basic-block.h (compute_available): Returns a void now. - * gcse.c (one_classic_gcse_pass): Do not expect compute_available - to return a value anymore. - * lcm.c (compute_available, compute_antinout_edge): Revamp to use - worklists. Fix boundary cases. Compute maximal solutions. - (compute_laterin, compute_nearerout): Similarly. - - * dwarf2out.c (add_AT_location_description): Allow - (mem (plus (pseudo) (...)) too. - -Wed Nov 10 10:52:42 1999 Tom Tromey - - * gcc.c (do_spec_1): Support text between `%u' and `%O'. - -Wed Nov 10 12:43:21 1999 Philippe De Muyter - Kaveh R. Ghazi - - * cppinit.c: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. - - * gansidecl.h: Likewise. - - * rtl.c: Likewise. - - * rtl.h: Likewise. - - * toplev.h: Likewise. - - * tree.c: Likewise. - - * tree.h: Likewise. - - * varray.c: Likewise. - - * varray.h: Likewise. - -Wed Nov 10 10:57:22 1999 Clinton Popetz - - * gcov.c (struct arcdata): Add hits and total, remove prob. - (output_branch_counts): New. - (process_args): Set output_branch_counts if -c. - (calculate_branch_probs): Store hits and total instead of - percentage. - (output_data): Emit counts if output_branch_counts is true. - * gcov.texi (Invoking Gcov): Document -c switch.. - -Wed Nov 10 01:10:41 1999 Philippe De Muyter - - * genoutput.c (output_insn_data): Cast `INSN_OUTPUT_FORMAT_MULTI' and - `INSN_OUTPUT_FORMAT_FUNCTION' to `PTR'-type. - -Wed Nov 10 00:51:41 1999 Hans-Peter Nilsson - - * invoke.texi (C Dialect Options): Add missing builtins from - c-common.c to list. - * extend.texi (Other Builtins): Copy to this list. - -Wed Nov 10 04:58:09 1999 Alexandre Oliva - - * Makefile.in (recog.o): Use BASIC_BLOCK_H macro. - (print-rtl.o, $(HOST_PREFIX_1)print-rtl.o): Likewise. Remove - redundant bitmap.h. - -Wed Nov 10 00:02:53 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (compute_flow_dominators): No longer treat basic block 0 - or (n_basic_blocks - 1) specially. Clear the AUX field before - starting computation of doms/pdoms. Fix initial state for pdoms. - -Wed Nov 10 03:58:08 1999 Alexandre Oliva - - * Makefile.in ($(HOST_PREFIX_1)rtl.o): Update dependencies to - match rtl.o's: added ggc.h and toplev.h - ($(HOST_PREFIX_1)print-rtl.o): Likewise: added system.h. - ($(HOST_PREFIX_1)rtlanal.o): Likewise: added system.h. - ($(HOST_PREFIX_1)obstack.o): Likewise: added $(CONFIG_H). - -Tue Nov 9 10:30:08 1999 Tom Tromey - - * config/i386/xm-djgpp.h (HAVE_DOS_BASED_FILE_SYSTEM): Renamed - from HAVE_DOS_BASED_FILESYSTEM. - * gcc.c (find_a_file): Use HAVE_DOS_BASED_FILE_SYSTEM, not - HAVE_DOS_BASED_FILESYSTEM. - (main): Likewise. - (split_directories): Only special-case DOS file names if - HAVE_DOS_BASED_FILE_SYSTEM is defined. Use IS_DIR_SEPARATOR - instead of explicit tests. Conditionalize on !VMS. - (make_relative_prefix): Use IS_DIR_SEPARATOR instead of explicit - tests. Conditionalize on !VMS. - (process_command): Only use make_relative_prefix if !VMS. - (free_split_directories): Conditionalize on !VMS. - (DIR_UP): Conditionalize on !VMS. - -Wed Jun 9 16:57:11 1999 Mumit Khan - - * gcc.c (STANDARD_BINDIR_PREFIX): Provide default. - -Fri Feb 5 14:22:01 1999 Mumit Khan - - * gcc.c (make_relative_prefix): Handle the HAVE_EXECUTABLE_SUFFIX - case. - -Mon Nov 8 14:16:57 1999 Michael Meissner - - * invoke.texi (Environment Variables): Document relative path - lookup. - * gcc.c (DIR_UP): If not defined, define as "..". - (standard_bindir_prefix): New static, holds target location to - install binaries. - (split_directories): New function to split a filename into - component directories. - (free_split_directories): New function, release memory allocated - by split_directories. - (make_relative_prefix): New function, make a relative pathname if - the compiler is not in the expected location. - (process_command): If GCC_EXEC_PREFIX was not specified, see if we - can figure out an appropriate prefix from argv[0]. - * Makefile.in (DRIVER_DEFINES): Use unlibsubdir in definition of - STANDARD_STARTFILE_PREFIX and TOOLDIR_BASE_PREFIX. Define - STANDARD_BINDIR_PREFIX. - -Wed Nov 10 11:47:54 1999 Michael Hayes - - * config/c4x/c4x-protos.h: New file. Prototypes for functions defined - in c4x.c. - * config/c4x/c4x.h: Moved prototypes to c4x.h. - * config/c4x/c4x.c (c4x_preferred_reload_class, c4x_limit_reload_class, - c4x_secondary_memory_needed) Delete. - (fp_zero_operand): Add mode argument. - -Thu Nov 4 15:52:35 1999 Andrew Haley - - * reload1.c (reload_reg_free_for_value_p): Don't use a register - that is in reload_reg_used. - -Tue Nov 9 16:43:00 1999 Nick Clifton - - * config/arm/arm-protos.h: New file: Prototypes for functions - defined in arm.c and pe.c. - * config/arm/arm.h: Fix compile time warnings. - * config/arm/arm.c: Fix compile time warnings. - * config/arm/pe.h: Fix compile time warnings. - * config/arm/aout.h: Fix compile time warnings. - -Tue Nov 9 14:55:44 1999 Nick Clifton - - * config/m32r/m32r-protos.h: New file: Prototypes for functions - defined in m32r.c - - * config/m32r/m32r.h: Move prototypes to m32r-protos.h - Add support for subtargets. - Add prototypes for new predicates. - Add scheduling macros. - - * config/m32r/m32r.c: Fix compile time warnings. - (int8_operand): New predicate function. - (reg_or_cmp_int16_operand): New predicate function. - (extend_operand): New predicate function. - (m32r_adjust_code): New scheduling function. - (m32r_adjust_priority): New scheduling function. - (m32r_sched_init): New scheduling function. - (m32r_sched_reorder): New scheduling function. - (m32r_sched_variable_issue): New scheduling function. - (direct_return): New codegen function. - (m32r_not_same_reg): New rtl testsing function. - - * config/m32r/m32r.md: Fix compile time warnings. - Add support for pre decrement and post increment memory - references. - Add S patterns. - Add fabs patterns. - -Mon Nov 8 22:20:13 1999 J"orn Rennecke - - * global.c (EXECUTE_IF_CONFLICT): Don't define. - (prune_preferences): Use EXECUTE_IF_SET_IN_ALLOCNO_SET instead. - (find_reg): Likewise. - -Mon Nov 8 13:16:46 1999 Jason Eckhardt - - * config/pa/pa.md (fmpynfadd,{sgl,dbl} insns): Use %fr0 rather than 0 - to avoid assembler errors. - -Mon Nov 8 15:38:41 1999 Nick Clifton - - * config/v850/v850-protos.h: New file: Prototypes for functions - defined in v850.c - * config/v850/v850.h: Move prototypes to v850-protos.h - * config/v850/v850.c: Move prototypes to v850-protos.h - * config/v850/v850.md: Fix compile time warnings. - - * config/fr30/fr30-protos.h: New file: Prototypes for functions - defined in fr30.c - * config/fr30/fr30.h: Move prototypes to fr30-protos.h - * config/fr30/fr30.c: Fix compile time warnings. - * config/fr30/fr30.md: Fix compile time warnings. - -Mon Nov 8 07:25:37 1999 Mark Mitchell - - * tree.h (get_containing_scope): Declare it. - * tree.c (get_containing_scope): New fucntion. - (decl_function_context): Use it. - * toplev.c (rest_of_compilation): Use get_containing_scope. - -aMon Nov 8 03:03:07 1999 Alexandre Oliva - - * Makefile.in (rtl.o): Depend on toplev.h. - -Sun Nov 7 20:55:14 1999 Mark Mitchell - - * cse.c (delete_trivially_dead_insns): Replace alloca with - xmalloc/xcalloc. - * except.c (update_rethrow_references): Likewise. - (init_eh_nesting_info): Likewise. - * function.c (identify_blocks): Likewise. - * gcse.c (dump_hash_table): Likewise. - * graph.c (print_rtl_graph_with_bb): Likewise. - * loop.c (combine_movables): Likewise. - (move_movables): Likewise. - (count_loop_regs_set): Likewise. - (strength_reduce): Likewise. - * profile.c (compute_branch_probabilities): New function, split - out from ... - (branch_prob): Here. Replace alloca with xmalloc/xcalloc. - * regclass.c (regclass): Likewise. - * regmove.c (regmove_optimize): Likewise. - * toplev.c (compile_file): Likewise. - (main): Don't mess with the stack rlimit. - -Sun Nov 7 19:41:17 1999 Catherine Moore - - * config/elfos.h (ASM_DECLARE_FUNCTION_NAME): Conditionally define. - (ASM_DECLARE_FUNCTION_SIZE): Conditionally define. - -Sun Nov 7 10:23:28 1999 Mark P. Mitchell - - * integrate.c (save_for_inline_nocopy): Clear in_nonparm_insns. - -Sun Nov 7 02:58:48 1999 Jeffrey A Law (law@cygnus.com) - - * global.c (EXECUTE_IF_CONFLICT): Undo Robert's change. - (EXECUTE_IF_SET_IN_ALLOCNO_SET): Put curleys around CODE in - macro expansion. - -Sat Nov 6 23:48:30 1999 Robert Lipe (robertlipe@usa.net) - - * global.c (EXECUTE_IF_CONFLICT): Correct quoting typo. - -Sat Nov 6 17:34:39 1999 Jeffrey A Law (law@cygnus.com) - - * gcse.c (post_dominators): Kill. - (alloc_code_hoist_mem, free_code_hoist_mem); Kill post_dominators. - (compute_code_hoist_data): Use compute_flow_dominators. Do not - pass in a pdom array since we do not need pdoms. - * haifa-sched.c (schedule_insns): Similarly. - * flow.c (compute_dominators): Remove dead function. - (compute_flow_dominators): Do not compute doms or pdoms if the - caller does not request them. Split up loop to build doms and - pdoms. Use a worklist to compute doms and pdoms. - * basic-block.h (compute_dominators): Remove prototype. - -Sat Nov 6 11:38:39 1999 Richard Henderson - - * haifa-sched.c (struct haifa_insn_data, h_i_d): New. - (insn_luid, insn_priority, insn_costs, insn_units): Remove. - (insn_reg_weight, insn_depend, insn_dep_count): Remove. - (insn_blockage, insn_ref_count, line_note, insn_tick): Remove. - (cant_move, fed_by_spec_load, is_load_insn): Remove. - (schedule_region): Remove unused variable. - (schedule_insns): Allocate h_i_d, and not all the separate arrays. - -Sat Nov 6 10:00:34 1999 Mark Mitchell - - * local-alloc.c (local_alloc): Use xmalloc/xcalloc, not alloca. - (update_equiv_regs): Likewise. - (block_alloc): Likewise. - * reg-stack.c (reg_to_stack): Likewise. - (convert_regs_2): Likewise. - * reload1.c (reload_as_needed): Likewise. - -Sat Nov 6 09:57:59 1999 Mark Mitchell - - * Makefile.in (dbxout.o): Depend on ggc.h. - (dwarf2out.o): Likewise. - (xcoffout.o): Likewise. - * dbxout.c: Include ggc.h. - (dbxout_init): Register lastfile as a root. - * dwarf2out.c: Include ggc.h. - (dwarf2out_line): Register lastfile as a root. - * xcoffout.c: Include ggc.h. - (xcoffout_source_line): Register xcoff_lastfile as a root. - -Sat Nov 6 09:52:09 1999 Richard Henderson - - * i386.md (movdf_1, movxf_1): Earlyclobber general regs destination. - -Sat Nov 6 07:48:59 1999 Catherine Moore - - * config/svr4.h (ASM_DECLARE_FUNCTION): Check if already - defined. - (ASM_DECLARE_FUNCTION_SIZE): Likewise. - -Fri Nov 5 18:33:39 1999 J"orn Rennecke - - * global.c (EXECUTE_IF_SET_IN_ALLOCNO_SET): New macro. - (EXECUTE_IF_CONFLICT): Likewise. - (ALLOCNO_LIVE_P): Avoid signed division. - (SET_ALLOCNO_LIVE, CLEAR_ALLOCNO_LIVE): Likewise. - (prune_preferences, find_reg): Use EXECUTE_IF_CONFLICT. - (record_one_conflict): Use EXECUTE_IF_SET_IN_ALLOCNO_SET. - -Fri Nov 5 12:04:02 1999 Richard Henderson - - * haifa-sched.c (schedule_block): Don't crash if there's no - next insn for an interblock movement. - (add_branch_dependences): Don't allow clobber insns to move either. - -Fri Nov 5 10:18:11 1999 Richard Henderson - - * i386.c (split_xf): New. - * i386-protos.h: Declare it. - * i386.md (movxf_1): Add general regs alternatives. - (movxf_1+1): New splitter for same. - -Fri Nov 5 12:05:52 1999 Nick Clifton - - * function.c (purge_addressof_1): Add missing return values. - -Fri Nov 5 10:07:25 1999 Nick Clifton - - * function.c (is_addressof): New function. Returns true if - the given piece of RTL is an ADDRESSOF. - (purge_addressof_1): Make boolean. Return false if the - ADDRESSOFs could not be purged. - (purge_addressof): If ADDRESSOFs could not be purged from the - notes attached to an insn, remove the offending note(s), - unless they are attached to a libcall. - -1999-11-05 Andreas Jaeger - - * genoutput.c (null_operand =): Initialize all fields. - - * errors.h: Add extern to prototypes. - -Fri Nov 5 01:44:09 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (m68k-next-nextstep4): Handle Openstep 4.2. - * configure: Rebuilt. - -Fri Nov 5 01:24:37 1999 J"orn Rennecke - - * global.c (CONFLICTP, SET_CONFLICT): Avoid signed division. - (mirror_conflicts): New function. - (global_alloc): Call it. - (expand_preferences): Remove redundant CONFLICTP test. - (find_reg, dump_conflicts): Likewise. - (prune_preferences): Process conflicts one word at a time. - -Fri Nov 5 01:05:21 1999 Richard Henderson - - * global.c (build_insn_chain): Use EXECUTE_IF_SET_IN_BITMAP - instead of an explicit loop. - -Thu Nov 4 23:07:14 1999 Jim Wilson - - * cse.c (cse_insn): Revert Oct 31 change. When computing src_elt, - if REG_RETVAL check succeeds, then put classp in src_elt. - -Thu Nov 4 23:48:14 1999 Jeffrey A Law (law@cygnus.com) - - * function.c (pad_to_arg_alignment): Only update argument_pad - if the argument's alignment is greater than STACK_BOUNDARY. - -Thu Nov 4 16:44:53 1999 Richard Henderson - - * bitmap.h (BITMAP_XFREE): New. - * flow.c (life_analysis): Use it. - (life_analysis_1): Free blocks. - - * combine.c (undo_commit): New. - (try_combine): Use it. Don't zap undobuf.undos. - (combine_instructions): Don't zap undobuf.undos; free the - undobuf.frees list. - - * local-alloc.c (local_alloc): Free qty_phys_num_sugg. - - * stmt.c (cost_table_): New. - (estimate_case_costs): Use it instead of xmalloc. - - * toplev.c (compile_file): Reuse dumpname memory instead - of strdup'ing it. - -Thu Nov 4 16:36:44 1999 Richard Henderson - - * reg-stack.c (convert_regs_1): Initialize target_stack->top - after verifying an EH edge. - - * haifa-sched.c (init_rgn_data_dependences): Correctly - size bb_pending_lists_length when zeroing. - -Thu Nov 4 16:36:36 1999 Richard Henderson - - * function.c (diddle_return_value): New. - (expand_function_end): Use it. - * stmt.c (expand_null_return): Likewise. - (expand_value_return): Likewise. - - * reg-stack.c (subst_stack_regs_pat): Handle clobbers at top-level. - - * reload1.c (reload): Don't remove return value clobbers. - -Thu Nov 4 13:33:46 1999 Richard Henderson - - * rtl.c (read_rtx): Use fatal_with_file_and_line not fatal. - -Thu Nov 4 12:49:52 1999 Richard Henderson - - * cse.c (cse_main): Use xmalloc, not alloca. - (cse_basic_block): Likewise. - * local-alloc.c (local_alloc): Likewise. - -Thu Nov 4 14:22:12 1999 David Billinghurst - Alexandre Oliva - - * rtl.c: Include toplev.h. - (fatal): Remove declaration. - -Thu Nov 4 06:39:47 1999 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (schedule_block): Fix thinko. - -1999-11-03 James McKelvey - - * fixinc/fixincl.c(create_file): Allow for systems that do not have - S_IR* defined values - -1999-11-03 Philippe De Muyter - - * fixlib.c (load_file_data): Do not call `realloc' with a NULL pointer; - call `malloc' instead. - -Wed Nov 3 23:05:14 1999 Mark Mitchell - - * flags.h (flag_renumber_insns): Declare. - * emit-rtl.c (renumber_insns): Check flag_renumber_insns. Print - renumbering table. - * rtl.h (renumber_insns): Change prototype. - * toplev.c (flag_renumber_insns): Define. - (rest_of_compilation): Pass rtl_dump_file to flag_renumber_insns. - -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. - * config/sparc/sparc.c: Account for fpsqrt{s,d} changes. - -Wed Nov 3 15:11:27 1999 Matteo Frigo - - * config/sparc/sparc.md: Adjust FADD/FMUL result latencies to - 3 on UltraSPARC. - * config/sparc/sparc.c (ultra_schedule_insn): Insert launched - insn into ready list, do not use just a raw swap. - -Wed Nov 3 14:51:59 1999 Mark P. Mitchell - - * rtl.h (renumber_insns): New function. - (remove_unnecessary_notes): Likewise. - * emit-rtl.c (renumber_insns): Define. - (remove_unnecessary_notes): Likewise. - * toplev.c (rest_of_compilation): Remove dead code. - Use renumber_insns and remove_unnecessary_notes. - - * gcse.c (struct null_pointer_info): New type. - (get_bitmap_width): New function. - (current_block): Remove. - (nonnull_local): Likewise. - (nonnull_killed): Likewise. - (invalidate_nonnull_info): Take a null_pointer_info as input. - (delete_null_pointer_checks_1): New function. - (delete_null_pointer_checks): Use it. - - * haifa-sched.c (find_rgns): Replace uses of alloca with xmalloc. - (split_edges): Likewise. - (schedule_block): Likewise. - (compute_block_backward_dependencies): Likewise. - (schedule_region): Likewise. - (schedule_insns): Likewise. - -Wed Nov 3 15:40:23 1999 Catherine Moore - - * defaults.h (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Provide default. - * emit-rtl.c (gen_label_rtx): Support LABEL_ALTERNATE_NAME. - * final.c (final_scan_insn): Emit LABEL_ALTERNATE_NAME. - * ggc-common.c (ggc_mark_rtx_children): Mark LABEL_ALTERNATE_NAME. - * jump.c (delete_unreferenced_labels): Don't delete if - LABEL_ALTERNATE_NAME is set. - * print-rtl.c (print_rtx): Dump alternate name. - * rtl.def (CODE_LABEL): Change format to "iuuis00s". - * rtl.h (LABEL_ALTERNATE_NAME): Define. - * rtl.texi (LABEL_ALTERNATE_NAME): Document. - * tm.texi (ASM_OUTPUT_ALTERNATE_LABEL_NAME): Document. - -Wed Nov 3 15:39:19 1999 Kaveh R. Ghazi - - * fix-header.c (recognized_extern, recognized_function): Constify - a char*. - - * lcm.c (compute_laterin): Remove unused variable `temp_bitmap'. - (pre_edge_lcm): Mark parameter `file' with ATTRIBUTE_UNUSED. - (compute_available): Remove unused variable `last'. - (compute_nearerout): Remove unused variable `temp_bitmap'. - (pre_edge_rev_lcm): Mark parameter `file' with ATTRIBUTE_UNUSED. - Remove unused variable `x'. - - * scan.h (recognized_function, recognized_extern): Constify a - char*. - - * simplify-rtx.c (simplify_rtx): Remove unused variable `new'. - -Wed Nov 3 10:40:53 1999 Franz Sirl - - * varasm.c (decode_rtx_const): Use XSTR to access the string - of a SYMBOL_REF. - -Wed Nov 3 10:10:58 1999 Richard Henderson - - * c-decl.c (duplicate_decls): Copy DECL_MODE too. - -Wed Nov 3 12:12:59 1999 Bernd Schmidt - - * reload1.c (eliminate_regs_in_insn): If copying insn, also copy notes. - -Wed Nov 3 03:26:28 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (ireg_operand): New function. - * pa.h (PREDICATE_CODES): Handle ireg_operand. - * pa.md (parallel_addb, parallel_movb): Use ireg_operand. - Fix out of date comment. - - * pa.md (negdi2): Turn into expander + anonymous pattern. - - * reload.c (find_reloads): Fix typos in recent change. - - * dwarf2out.c: Do not include ctype.h. - -Tue Nov 2 21:53:44 1999 Richard Kenner - - * regclass.c (record_reg_classes): Always use may_move_cost when - seeing how operand fits with various register classes. - -Tue Nov 2 15:38:17 1999 Richard Henderson - - * resource.c: Revert Oct 26 20:42 and Oct 27 00:56 changes. - * toplev.c: Revert Nov 1 13:22 change. - -Tue Nov 2 14:21:37 1999 Jason Eckhardt - - * config/pa/pa.md (height reduction patterns): Add checks for - overlapping operands to avoid semantic-destroying splits for - height reduction patterns. - -Tue Nov 2 15:27:31 1999 Alexandre Oliva - - * configure.in (m68k-hp-hpux*, xm_alloca.h): The underscore should - have been an hyphen, fixed. - * configure: Rebuilt. - -Tue Nov 2 17:04:36 1999 Nick Clifton - - * config/arm/tpe.h: Add prototypes for exported functions. - * config/arm/pe.c: Fix compile time warnings. - * config/arm/semi.h: Fix compile time warnings. - * config/arm/arm.c: Fix compile time warnings. - * config/arm/arm.h: Fix compile time warnings. - * config/arm/arm.md: Fix compile time warnings. - * config/arm/thumb.c: Fix compile time warnings. - * config/arm/thumb.h: Fix compile time warnings. - * config/arm/thumb.md: Fix compile time warnings. - -Tue Nov 2 04:10:24 1999 Jan Hubicka - - * jump.c (jump_optimize_1): Swap the incscc and the conditional mode - detection code - - * unroll.c (unroll_loop): Remove LOOP notes when loop is - completely unrolled. - -Tue Nov 2 16:57:22 1999 Bernd Schmidt - - * cse.c (simplify_plus_minus, check_fold_const): Delete declarations. - -Tue Nov 2 09:43:00 1999 Catherine Moore - - * Makefile.in (genattrtab): Don't use (HOST_RTLANAL). - * rtl.h (rtx_equal_p): Move prototype. - * rtl.c (rtx_equal_function_value_matters): Move from - rtlanal.c - (rtx_equal_p): Likewise. - * rtlanal.c (rtx_equal_function_value_matters): Delete. - (rtx_equal_p): Likewise. - -Mon Nov 1 23:21:17 1999 Jason Merrill - - * libgcc2.c (__do_global_dtors): Only do EH frame stuff if - ! HAS_INIT_SECTION. - -Mon Nov 1 23:37:38 1999 Jeffrey A Law (law@cygnus.com) - - * gcc.1 (PA options): Remove obsolete -mshared-libs options. - - * pa.h (ADDR_VEC_ALIGN): Define. - - * jump.c (jump_optimize_1): Also move LOOP_VTOP and LOOP_CONT - notes when presented with "if (foo) break; end_of_loop" and - the break sequence gets moved out of the loop. - - * unroll.c (unroll_loop): Allocate memory for MAP using xcalloc. - Remove explicit zero initializations of entries within MAP. - -Mon Nov 1 18:09:14 1999 Richard Henderson - - * reg-stack.c (convert_regs_1): Handle EH edges specially. - -Mon Nov 1 15:41:01 1999 Mark P. Mitchell - - * bitmap.h (BITMAP_XMALLOC): New macro. - * flow.c (CLEAN_ALLOCA): Remove. - (delete_unreachable_blocks): Use xmalloc/xcalloc instead of alloca. - (life_analysis): Likewise. - (update_life_info): Don't use CLEAN_ALLOCA. - (life_analysis_1): Use xmalloc/xcalloc instead of alloca. - (calculate_global_regs_live): Likewise. - (print_rtl_with_bb): Likewise. - (verify_flow_info): Likewise. - * global.c (global_alloc): Likewise. - (global_conflicts): Likewise. - * integrate.c (save_for_inline_nocopy): Likewise. - (expand_inline_function): Likewise. - * jump.c (jump_optimize_1): Likewise. - (duplicate_loop_exit_test): Likewise. - (thread_jumps): Likewise. - * loop.c (loop_optimize): Likewise. - (combine_givs): Likewise. - (recombine_givs): Likewise. - * reorg.c (dbr_schedule): Likewise. - * unroll.c (unroll_loop): Likewise. - - * combine.c (combine_instructions): Use xmalloc instead of alloca. - -Mon Nov 1 13:22:30 1999 Richard Henderson - - * toplev.c (rest_of_compilation): Don't optimize the CFG - when rebuilding, just before dbr. - -Mon Nov 1 14:35:50 1999 Kaveh R. Ghazi - - * output.h (assemble_end_function, assemble_destructor, - assemble_constructor, assemble_gc_entry, assemble_global, - assemble_label, output_constant_pool) Constify a char*. - - * varasm.c (assemble_destructor, assemble_constructor, - assemble_gc_entry, assemble_end_function, assemble_global, - assemble_label, output_constant_pool): Likewise. - -Mon Nov 1 14:22:51 1999 Nick Clifton - - * config/arm/thumb.c (thumb_expand_prologue): Add comments - explaining what is goin on in this function. - -Mon Nov 1 08:03:15 1999 Richard Kenner - - * regclass.c (record_reg_classes): In matching case, recompute - costs since the direction of movement is different. - -Sun Oct 31 21:59:34 MST 1999 Diego Novillo - - * resource.c (mark_target_live_regs): For unconditional branches, - the resources found at the branch target should be added to the - resources found so far, not intersected. - -Sun Oct 31 15:48:49 1999 Philippe De Muyter - - * fixinc/fixtests.c, fixinc/fixfixes.c : Keep `#' in first column for - old cpp's. - * fixinc/fixincl.c (fcntl.h) : Do not include this file twice. - (sys/mman.h): Include this file only if #HAVE_MMAP. - (run_compiles): Initialize `esac_fmt' with one old KR string, not - with automatically concatenated ANSI strings. - -Sun Oct 31 23:57:07 1999 Mark Mitchell - - * ggc-page.c (struct page_entry): Remove save_num_free_objects. - (DIV_ROUND_UP): Robustify. - (ggc_recalculate_in_use_p): New function. - (release_pages): Don't inline it. - (ggc_alloc_obj): Don't refuse to allocate objects on pages for - outer contexts. - (ggc_pop_context): Use ggc_recalculate_in_use_p. - (clear_marks): Always save in_use_p. - (sweep_pages): Use ggc_recalculate_in_use_p. - (ggc_page_print_statistics): Avoid signed/unsigned comparisons. - Release pages before counting statistics. - -Sun Oct 31 23:42:37 1999 Mark Mitchell - - * toplev.c (rest_of_compilation): Fix thinko in this change: - - Fri Oct 29 15:25:07 1999 Arnaud Charlet - - (rest_of_compilation): If inside an inlined external function, - pretend we are just being declared. - -Sun Oct 31 23:03:25 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (calculate_global_regs_live): Fix thinko. - - * integrate.c (expand_inline_function): Fix bugs in previous - change from Oct 28, 1999. - -Sun Oct 31 20:27:45 1999 Mark Mitchell - - * stmt.c (expand_value_return): Fix typo in this change: - - Thu Oct 28 18:06:50 1999 Richard Kenner - (expand_value_return): Correctly convert VAL when promoting function - return; support RETURN_REG being a PARALLEL. - -Sun Oct 31 20:25:42 1999 Mark P. Mitchell - - * expr.c (readonly_fields_p): Ignore everything except FIELD_DECLs. - -Sun Oct 31 20:42:17 1999 Kaveh R. Ghazi - - * hard-reg-set.h (reg_names): Constify a char*. - - * regclass.c (reg_names): Likewise. - - * regs.h (reg_names): Likewise - - * a29k/a29k.c (reg_names): Delete declaration. - - * a29k/a29k.h (CONDITIONAL_REGISTER_USAGE): Constify a char*. - - * arc/arc.c (arc_save_restore, arc_output_function_prologue, - arc_output_function_epilogue): Likewise. - - * elxsi/elxsi.c (reg_names): Likewise. - - * gmicro/gmicro.h (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Likewise. - - * m32r/m32r.c (m32r_output_function_epilogue, emit_cond_move): - Likewise. - - * m88k/m88k.c (output_function_profiler): Likewise. - - * sparc/sparc.c (sparc_flat_output_function_prologue, - sparc_flat_output_function_epilogue): Likewise. - -Sun Oct 31 13:32:15 CET 1999 Marc Lehmann - - * toplev.c (rest_of_compilation): Separate the setjmp/vfork clobber - warning from -Wuninitialized and put it under -W. - * function.c (uninitialized_vars_warning): Warn only when the - corresponding flag is set. - -Sun Oct 31 01:53:30 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_insn): If an insn has only a single set, SRC_EQV - is nonzero and the single set does not have an elt, then assign - it an elt. - - * simplify-rtx.c: New file. - * Makefile.in (OBJS): Add simplify-rtx.o - (simplify-rtx.o): Add dependencies. - * rtl.h (simplify_gen_binary, simplify_rtx): Add prototypes. - * cse.c: Use simplify_gen_binary intead of cse_gen_binary. - (cse_gen_binary, simplify_unary_operation): Delete. - (simplify_binary_operation, simplify_plus_minus): Likewise. - (check_fold_consts, simplify_relation_operation): Likewise. - (simplify_ternary_operation): Likewise. - (delete_trivially_dead_insns): Simplify the contents of the - REG_EQUAL note before trying to substitute it into the source - of the reg-reg copy at the end of a libcall sequence. - - * combine.c (combine_simplify_rtx): Renamed from simplify_rtx. All - references/callers changed. - - * mn10200.c (mn10200_va_arg): Force the return value into a - register. - - * fr30.h (EXTRA_CC_NAMES): Remove obsolete macro. - - * cccp.c (macroexpand): Avoid out of range accesses for omitted - arguments. - -Sat Oct 30 22:42:50 1999 Stephen L Moshier - - * c-lex.c (yylex): Accept 'f' in mantissa of hex float constant. - -Sat Oct 30 22:19:26 1999 Jeffrey A Law (law@cygnus.com) - - * fold-const.c (fold): Fix thinko when optimizing comparisons - against -0.0. - -Sat Oct 30 21:32:17 1999 David Starner - - * gcc.texi (Passes): Update front-end files to their current - location. - -Sat Oct 30 14:41:40 1999 Richard Henderson - - * alpha.h (SECONDARY_INPUT_RELOAD_CLASS): Call secondary_reload_class. - (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. - (PREDICATE_CODES): Add addition_operation. - * alpha-protos.h (addition_operation): Declare. - (secondary_reload_class): Likewise. - * alpha.c (addition_operation): New. - (secondary_reload_class): New, from old SECONDARY_INPUT_RELOAD_CLASS. - * alpha.md (adddi3): Turn into expander. - (*lda, *adddi_2): New. - (movsf, movdf patterns): Don't preference integer regs. - (movsi, movdi patterns): Don't preference fp regs. - -Sat Oct 30 14:38:22 1999 Richard Henderson - - * genrecog.c (write_switch): Check for duplicate CODE cases. - -Sat Oct 30 14:31:48 1999 Richard Henderson - - * ggc-common.c: Update pre-function commentary. - * ggc-page.c: Likewise. - (poison): Remove. - (poison_pages): Use memset directly. - (ggc_alloc_obj): Likewise. Use a different pattern than poison_pages. - (ggc_collect): Poison before sweeping. - * ggc-simple.c: Update pre-function commentary. - (ggc_alloc_obj): Poison nonzeroed memory. - -Sat Oct 30 14:28:52 1999 Mark Mitchell - - * ggc-common.c (ggc_print_statistics): Make arguments to fprintf - match format string, even on 64-bit hosts. - * gcc-page.c (ggc_page_print_statistics): Likewise. - -Sat Oct 30 14:38:04 1999 Catherine Moore - - * config/i386/i386.c (ix86_cpu): Revert last patch. - * config/i386/i386.h (ix86_cpu): Ditto. - -Fri Oct 29 17:00:42 1999 Jim Wilson - - * stor-layout.c (layout_type): When compute TYPE_SIZE_UNIT from - TYPE_SIZE, convert type of result to sizetype. - -Fri Oct 29 14:34:17 1999 Richard Henderson - - * flow.c (count_or_remove_death_notes): Equate NULL with the - universal set. - - * jump.c, reg-stack.c, toplev.c: Revert Oct 27 change. - * toplev.c (rest_of_compilation): Rebuild CFG immediately before - dbr_schedule. - - * i386.c (pic_label_no): Delete. - (ix86_attr_length_default): Don't use single_set to peek - inside a parallel. - - * recog.c (peephole2_optimize): Allow recog_next_insn to index - the first insn after bb->end. - * i386.md (push mem peeps): Scratch is live after evaluation - of the memory. - (cmp mem peep): Similarly. - -Fri Oct 29 11:50:11 1999 Catherine Moore - - * calls.c (emit_library_call_value): Fix declaration of alignment_pad. - * function.c (pad_to_arg_alignment): Add missing braces. - -Fri Oct 29 13:53:48 1999 Kaveh R. Ghazi - - * alpha/alpha-protos.h (literal_section): Add prototype. - (alpha_need_linkage, alpha_start_function,alpha_end_function): - Constify a char*. - - * alpha/alpha.c (alpha_ra_ever_killed, set_frame_related_p): Add - prototype. - (alpha_start_function, alpha_end_function, float_strings, - alpha_need_linkage): Constify a char* - - * alpha/alpha.h (ASM_OUTPUT_ASCII, ASM_OUTPUT_MI_THUNK): Likewise. - - * alpha/alpha32.h (ASM_OUTPUT_MI_THUNK): Likewise. - - * alpha/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * alpha/vms.h (ASM_OUTPUT_SECTION_NAME): Likewise. - -Fri Oct 29 13:49:39 1999 Kaveh R. Ghazi - - * flow.c (debug_flow_info): Add prototype. - - * gcc.c (main): Likewise. - - * gcse.c (expr_reaches_here_p_work, pre_expr_reaches_here_p_work): - Likewise. - - * reload1.c (failed_reload, set_reload_reg): Likewise. - - * mips-tfile.c (main): Likewise. - (pfatal_with_name, fancy_abort, botch, fatal, catch_signal): Mark - with ATTRIBUTE_NORETURN. - -Fri Oct 29 18:16:03 1999 Andrew Haley - - * config/i386/i386.h (ENCODE_SECTION_INFO): Don't do anything if - DECL is not a memory ref. - -Fri Oct 29 09:05:34 1999 Catherine Moore - - * config/i386/i386.h (ix86_cpu): Remove extern attribute. - * config/i386/i386.c (ix86_cpu): Add extern attribute. - -Fri Oct 29 16:30:04 1999 Andrew Haley - - * config/mips/elf.h: remove NAME__MAIN and SYMBOL__MAIN. - * config/mips/elf64.h: ditto. - -Fri Oct 29 08:03:57 1999 Catherine Moore - - * expr.c (emit_push_insn): New argument alignment_pad. - Update all callers. Adjust stack pointer based on alignment pad. - * function.c (pad_to_arg_alignment): New argument alignment_pad. - Update all callers. Track alignment_pad if boundary > PARM_BOUNDARY. - (locate_and_pad_parm): New argument alignment_pad. Update all - callers. - * expr.h (emit_push_insn): Update prototype. - (locate_and_pad_parm): Update prototype. - * calls.c (arg_data): Add new field alignment_pad. - (initialize_argument_information): Initialize alignment_pad. - -Fri Oct 29 02:51:35 1999 Mark Mitchell - - * except.c (free_eh_nesting_info): Free the info itself. - * function.c (free_after_compilation): Don't free NULL. - * gcse.c (alloc_pre_mem): Free the temp_bitmap, too. - (pre_edge_insert): Free inserted. - * stmt.c (free_stmt_status): Don't free NULL. - -Fri Oct 29 15:25:07 1999 Arnaud Charlet - - * gcov.c (DIR_SEPARATOR): Provide default. - (output_data): Add test for MS-DOS format absolute filename. - (fancy_abort): Correct program name. - (open_files): Open all files in binary mode. - * libgcc2.c (__bb_exit_func): Likewise. - - * profile.c (init_branch_prob): Specify binary when opening files. - - * flags.h (flag_unwind_tables): New decl. - * toplev.c (flag_unwind_table): New definition. - (f_options): Add -funwind-tables. - (decode_g_option): Clarify warning when unknown -g option is given. - (rest_of_compilation): If inside an inlined external function, - pretend we are just being declared. - - * dwarf2out.c (dwarf2out_do_frame): Check -funwind_tables. - (dwarf2out_frame_finish): Likewise. - -Fri Oct 29 07:44:26 1999 Vasco Pedro - - * fold-const.c (merge_ranges): If not in0, but in1, handle - upper bounds equal like subset case. - -Thu Oct 28 19:22:24 1999 Douglas Rupp - - * dbxout.c (dbxout_parms): Generate a second stabs line for parameters - passed in a register but moved to the stack. - -Thu Oct 28 19:12:57 1999 Sam Tardieu - - * gcc.c (pass_exit_codes, greatest_status): New variables. - (struct option_map): Add entry for "--pass-exit-codes". - (execute): Update greatest_status if error. - (display_help): Add documentation for -pass-exit-codes. - (process_command): Handle -pass-exit-codes. - (main): Look at pass_exit_codes and greatest_status on call to exit. - -Thu Oct 28 18:06:50 1999 Richard Kenner - - * reload.c (find_reloads): Refine test for no input reload - case to not includes reloads emitted after insn. - - * function.c (find_temp_slots_from_address): Handle sum involving - a register that points to a temp slot. - (update_temp_slot_address): Make recursive call if both old and - new are PLUS with a common operand. - * calls.c (expand_call): Mark temp slot for result as having - address taken. - - * rtlanal.c (reg_referenced_p, case IF_THEN_ELSE): New case. - - * gcc.c (process_command): Add standard_exec_prefix with "GCC" - component as well as "BINUTILS". - - * integrate.h (copy_rtx_and_substitute): New arg, FOR_LHS. - * integrate.c (copy_rtx_and_substitute): Likewise. - (expand_inline_function, integrate_parm_decls, integrate_decl_tree): - All callers changed. - * unroll.c (inital_reg_note_copy, copy_loop_body): Likewise. - - * dbxout.c (dbxout_type, case INTEGER_TYPE_NODE): If can use - gdb extensions, write size of type; also be more consistent - in using references when this is a subtype. - - * pa.md (extv, extzv, insv): Use define_expand to reject constant - that is out of range. - - * loop.c (unknown_constant_address_altered): New variable. - (prescan_loop): Initialize it. - (note_addr_stored): Set it for RTX_UNCHANGING_P MEM. - (invariant_p, case MEM): Remove handling for volatile and readonly; - check new variable if readonly. - (check_dbra_loop): Chdeck unknown_constant_address_altered. - - * cse.c (canon_hash, case MEM): Do not record if BLKmode. - (addr_affects_sp_p): Removed from note_mem_written and only - define #ifdef AUTO_INC_DEC. - - * alpha.c (input_operand, case ADDRESSOF): Treat as REG. - - * regclass.c (record_reg_classes): Properly handle register move - directions. - - * varasm.c (initializer_constant_valid_p, case MINUS_EXPR): - Don't think valid if both operands are invalid. - (struct constant_descriptor): New field RTL. - (mark_const_hash_entry): Mark it. - (record_constant{,_rtx}): Initialize it. - (output_constant_def): Allocate RTL in permanent obstack and - save in table. - ({record,compare}_constant_1): Modes must match for - CONSTRUCTOR of ARRAY_TYPE. - - * c-common.h (initializer_constant_valid_p): Delete decl from here. - * output.h (initializer_constant_valid_p): Move decl to here. - * c-common.c (initializer_constant_valid_p): Delete function from here. - * varasm.c (initializer_constant_valid_p): Move function to here. - - * tree.h (STRIP_SIGN_NOPS): New macro. - * fold-const.c (optimize_minmax_comparison): New function. - (invert_truthvalue, case WITH_RECORD_EXPR): New case. - (fold): Use STRIP_SIGN_NOPS instead of STRIP_TYPE_NOPS. - (fold, case EQ_EXPR): Call optimize_minmax_comparison and add - cases with ABS_EXPR, NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR, and - widening conversions. - (fold, case LE_EXPR): Rework changing unsigned to signed comparisons - to look at size of mode, not precision of type; also add missing cases. - (optimize_bit_field_compare, decode_field_reference): Don't try to - optimize COMPONENT_REF of a PLACEHOLDER_EXPR. - - * dwarf2out.c (ctype.h): Include. - (dwarf2out_set_demangle_name_func): New function. - (size_of_line_info): Deleted. - (output_line_info): Compute size of line info table from difference - of labels. - (base_type_die, add_name_attribute): Call demangle function, if any. - (field_byte_offset): Use bits per word for variable length fields. - (gen_array_type_die): Add array name. - (gen_subprogram_die): Ignore DECL_INLINE if -fno-inline. - (dwarf2out_add_library_unit_info): New function. - - * explow.c (set_stack_check_libfunc): New function. - (stack_check_libfunc): New static variable. - (probe_stack_range): Allow front-end to set up a libfunc to call. - - * combine.c (simplify_comparison): When making comparison in wider - mode, check for having commuted an AND and a SUBREG. - (contains_muldiv): New function. - (try_combine): Call it when dividing a PARALLEL. - (simplify_rtx, case TRUNCATE): Don't remove for umulsi3_highpart. - (simplify_comparison, case ASHIFTRT): Recognize sign-extension of - a PLUS. - (record_value_for_reg): If TEM is a binary operation with two CLOBBERs, - use one of the CLOBBERs instead. - (if_then_else_cond): If comparing against zero, just return thing - being compared. - - * optabs.c (expand_abs): If machine has MAX, ABS (x) is MAX (x, -x). - Don't generate shifts and subtract if have conditional arithmetic. - - * rtl.h (delete_barrier): New declaration. - * jump.c (jump_optimize): Set up to handle conditional call. - In conditional arithmetic case, handle CALL_INSN followed by a BARRIER. - (delete_barrier): New function. - - * rtl.c (read_rtx): Call fatal if bad RTL code; check for bad mode. - - * recog.c (nonmemory_operand): Accept ADDRESSOF. - - * tree.c (build_type_attribute_variant): Push to obstack of - ttype around type_hash_canon call. - - * expr.c (placeholder_list): Move decl to file scope. - (expand_expr): Don't force access to volatile just because its - address is taken. - If ignoring reference operations, just expand the operands. - (expand_expr, case COMPONENT_REF): Propagate - EXPAND_CONST_ADDRESS to recursive call when expanding inner. - Refine test for using bitfield operations vs pointer punning. - (expand_expr, case CONVERT_EXPR): If converting to - BLKmode UNION_TYPE from BLKmode, just return inner object. - Use proper mode in store_field call. - Properly set sizes of object to store and total size in store_field - call for convert to union. - (expand_expr, case ARRAY_REF): If OP0 is in a register, put it in - memory (like for ADDR_EXPR). Also, don't put constant in register if - we'll want it in memory. - (readonly_fields_p): New function. - (expand_expr, case INDIRECT_REF): Call it if LHS. - (expand_assignment): Handle a RESULT_DECL where - DECL_RTL is a PARALLEL. - (do_jump, case WITH_RECORD_EXPR): New case. - (get_inner_reference): Always go inside a CONVERT_EXPR - and NOP_EXPR if both modes are the same. - (store_field): Use bitfield operations if size of bitsize is not same - as size of RHS's type. - Check for bitpos not a multiple of alignment in BLKmode case. - Do block move in largest possible alignment. - (store_constructor): Set BITSIZE to -1 for variable size and properly - in case of array of BLKmode. - (expand_expr_unaligned): New function. - (do_compare_and_jump): Call it. - - * mips/iris5.h (SWITCHES_NEED_SPACES): New macro. - * collect2.c (main): Only allow -ofoo if SWITCHES_NEED_SPACES - does not include 'o'. - - * function.c (instantiate_virtual_regs_1, case SET): Handle case where - both SET_DEST and SET_SRC reference a virtual register. - (gen_mem_addressof): Copy RTX_UNCHANGING_P from new REG to old REG. - - * integrate.c (expand_inline_function): Handle case of setting - virtual stack vars register (from built in setjmp); when parameter - lives in memory, expand virtual_{stack_vars,incoming_args}_rtx early. - (subst_constant): Add new parm, MEMONLY. - (expand_inline_function, integrate_parm_decls): Pass new parm. - (integrate_decl_tree): Likewise. - (copy_rtx_and_substitute, case MEM): Do copy RTX_UNCHANGING_P. - (try_constants): Call subst_constants twice, with MEMONLY 0 and 1. - (copy_rtx_and_substitute, case SET): Add explicit calls to - copy_rtx_and_substitute for both sides. - - * stmt.c (expand_asm_operands): Don't use TREE_STRING_LENGTH for - constraints. - (pushcase{,_range}): Convert to NOMINAL_TYPE after checking for - within INDEX_TYPE, instead of before. - (fixup_gotos): Use f->target_rtl, not the next insn, - since latter may be from a later fixup. - (expand_value_return): Correctly convert VAL when promoting function - return; support RETURN_REG being a PARALLEL. - (expand_return): When checking for result in regs and having - cleanup, consider PARALLEL in DECL_RTL as being in regs. - -1999-10-28 21:27 -0700 Zack Weinberg - - * cpplib.h (struct cpp_buffer: fname, nominal_fname, - last_nominal_fname): Mark const. - (struct include_hash: name, nshort, control_macro): Mark - const. - (struct macrodef: symnam): Mark const. - (struct if_stack: fname): Mark const. - (is_idchar, is_idstart, is_hor_space, trigraph_table): Delete. - (IStable): New character-syntax array which encompasses all - the old is_foo arrays. - (is_idchar, is_numchar, is_idstart, is_numstart, is_hspace, - is_space): New macros for interrogating IStable. - (check_macro_name): Kill last argument. All callers changed. - - * cppinit.c (initialize_char_syntax): Delete. - (is_idchar, is_idstart, is_hor_space, is_space, - trigraph_table): Delete. - (IStable): New. Initialize with clever macros to avoid - information duplication. - (builtin_array): Table of builtins to get rid of explicit list - in initialize_builtins. - (initialize_builtins): Use builtins_array. - (cpp_start_read): Call init_IStable, and set IStable['$'] if - opts->dollars_in_ident. - - * cppexp.c: Change all refs to is_xyz[] arrays to use new - is_xyz() macros. - (cpp_parse_expr): Avoid 'format string is not constant' - warning. Use ISGRAPH to identify printable chars. - * cppfiles.c: Change all refs to is_xyz[] arrays to use new - is_xyz() macros. - (read_and_prescan): Map trigraphs to chars with open-coded - if-else-if-... sequence, not a lookup table. - * cpphash.c: Change all refs to is_xyz[] arrays to use new - is_xyz() macros. - * cpplib.c: Change all refs to is_xyz[] arrays to use new - is_xyz() macros. Kill SKIP_ALL_WHITE_SPACE (unused). - (check_macro_name): Remove ability to report an invalid - assertion name, which is never used. - (do_line): Constify a couple of char *'s. - * cppmain.c (main): Call cpp_cleanup before returning. - -Thu Oct 28 21:16:35 1999 Mark Mitchell - - * ggc.h (struct ggc_statistics): New type. - (ggc_get_size): New function. - (ggc_print_statistics): Likewise. - * ggc-common.c (ggc_stats): New variable. - (ggc_mark_rtx_children): Keep statistics. - (ggc_mark_tree_children): Likewise. - (ggc_print_statistics): New function. - * ggc-page.c (struct globals): Add bytes_mapped field. - (alloc_anon): Update it. - (release_pages): Likewise. - (ggc_get_size): New function. - (ggc_page_print_statistics): New function. - * ggc-simple.c (ggc_get_size): New function. - -Fri Oct 29 06:32:44 1999 Geoffrey Keating - - * flow.c (propagate_block): When the last reference to a label - before an ADDR_VEC is deleted because the reference is a dead - store, delete the ADDR_VEC. - -Thu Oct 28 12:28:50 1999 Richard Henderson - - * resource.c (find_free_register): Don't use the frame pointer - if frame_pointer_needed. - -Thu Oct 28 10:02:00 1999 Jim Wilson - - * config/mips/mips.c (mips_va_arg): Delete gen_jump as emit_jump arg. - (function_arg_pass_by_reference): Check for a NULL pointer in cum. - - * config/i960/i960.c (i960_va_start): New locals base, num. - Use INDIRECT_REF instead of ARRAY_REF on valist. - (i960_va_arg): Use INDIRECT_REF instead of ARRAY_REF on valist. - -Thu Oct 28 09:45:48 1999 Mark Mitchell - - * gcse.c (delete_null_pointer_checks): Fix typo in previous change. - -Thu Oct 28 03:37:50 1999 Peter Gerwinski - - * tree.def (PLACEHOLDER_EXPR): Update comments. - -Thu Oct 28 06:47:32 1999 Kaveh R. Ghazi - - * c-common.c (check_format_info): Avoid non-literal format string - warnings when `first_arg_num' is zero. - -Thu Oct 28 12:28:48 1999 Bernd Schmidt - - * rtl.texi: Delete explicit Prev, Up and Next entries in "@node"s. - -Thu Oct 28 11:05:13 1999 Richard Earnshaw - - * arm.md (casesi_insn): Add a clobber of the condition code - register. - -Mon Oct 18 21:16:06 1999 Fred Fish - - * tm.texi (CC1PLUS_SPEC): Make it clear in the docs that CC1_SPEC is - used by both cc1 and cc1plus. - -Thu Oct 28 10:00:48 1999 Nick Clifton - - * config/arm/arm.c: Initialize arm_structure_size_boundary to - DEFAULT_STRUCTURE_SIZE_BOUNDARY. - * config/arm/arm.h (DEFAULT_STRUCTURE_SIZE_BOUNDARY): Define - to the value 32 if it has not already been defined. - * config/arm/netbsd.h (DEFAULT_STRUCTURE_SIZE_BOUNDARY): - Override definition in arm.h with a value of 8. - -Thu Oct 28 03:12:02 1999 David Starner - - * c-pragma.c (push_alignment): Don't check the return value - of xmalloc. - -Thu Oct 28 03:08:38 1999 Matteo Frigo - - * sparc.h (ADJUST_COST): Fix thinko. - -Thu Oct 28 02:44:03 1999 Glen Nakamura - - * cccp.c (rescan): Fixed obp pointer handling around call to - check_expand subroutine. - -Thu Oct 28 02:15:22 1999 Jeffrey A Law (law@cygnus.com) - - * gcse.c (delete_null_pointer_checks): Only record non-null info - for pseudos when examining stores. - - * arm.md (adddi3, adddi_sesidi_di, adddi_sesidi_di): Add - splitters for these patterns. Use "#" for output templates. - (addsi3_carryin_shift): New pattern. - -Thu Oct 28 10:20:02 1999 Geoffrey Keating - - * config/rs6000/rs6000.md (movsf): Don't convert a SUBREG - of the function return register into a plain REG until - after function inlining is done. - -Wed Oct 27 15:21:46 1999 Richard Henderson - - * jump.c (jump_optimize_1): If we did cross-jumping, and - the data will matter, rebuild the CFG. - * reg-stack.c (reg_to_stack): Only (re)build the CFG if - not optimizing. Don't run shorten_branches. - * toplev.c (rest_of_compilation): Run shorten_branches after - reg_to_stack. - -Wed Oct 27 12:33:40 1999 Mark Mitchell - - * rtl.h (note_stores): Add additional parameter. - * rtlanal.c (reg_set_p_1): Take additional parameter. - (reg_set_last_1): Likewise. - (reg_set_p): Adjust call to note_stores. - (reg_set_last): Likewise. - (note_stores): Pass data parameter to worker function. - * alias.c (record_set): Take additional parameter. - (init_alias_analysis): Pass it. - * caller-save.c (mark_set_regs): Take additional parameter. - (save_call_clobbered_regs): Pass NULL to note_stores. - * combine.c (set_nonzero_bits_and_sign_copies): Take additional - parameter. - (record_dead_and_set_regs_1): Likewise. - (reg_dead_at_p_1): Likewise. - (combine_instructions): Adjust calls to note_stores. - (try_combine): Likewise. - (record_dead_insn): Remove. - (record_dead_and_set_regs): Adjust calls to note_stores. - (reg_dead_at_p): Likewise. - * cse.c (invalidate_skipped_set): Take additional parameter. - (cse_check_loop_start): Likewise. - (cse_check_loop_start_value): Remove. - (cse_set_around_loop): Adjust calls to note_stores. - * flow.c (notice_stack_pointer_modification): Take additional - parameter. Remove duplicate declaration. - (record_volatile_insns): Adjust calls to note_stores. - * gcse.c (record_set_info): Take additional parameter. - (record_last_set_info): Likewise. - (invalidate_nonnull_info): Likewise. - (record_set_insn): Remove. - (compute_sets): Adjust calls to note_stores. - (last_set_insn): Remove. - (compute_hash_table): Adjust calls to note_stores. - (insert_insn_end_bb): Likewise. - (delete_null_pointer_checks): Likewise. - * global.c (mark_reg_store): Take additional parameter. - (mark_reg_clobber): Likewise. - (reg_becomes_live): Likewise. - (global_conflicts): Adjust calls to note_stores. - (build_insn_chain): Likewise. - * integrate.c (note_modified_parmregs): Take additional parameter. - (mark_stores): Likewise. Make it static. - (save_for_inline_nocopy): Adjust calls to note_stores. - (try_constants): Likewise. - * integrate.h (mark_stores): Remove declaration. - * jump.c (mark_modified_reg): Take additional parameter. - (thread_jumps): Adjust calls to note_stores. - * local-alloc.c (validate_equiv_mem_from_store): Take additional - parameter. - (no_equiv): Likewise. - (reg_is_set): Likewise. - (validate_equiv_mem): Adjust calls to note_stores. - (update_equiv_regs): Likewise. - (block_alloc): Likewise. - * loop.c (note_set_pseudo_multiple_uses_retval): Remove. - (note_addr_stored): Take additional parameter. - (note_set_pseudo_multiple_uses): Likewise. - (record_initial): Likewise. - (prescan_loop): Adjust calls to note_stores. - (strength_reduce): Likewise. - (check_dbra_loop): Likewise. - * regmove.c (flags_set_1): Take additional parameter. - (mark_flags_life_zones): Adjust calls to note_stores. - * reload1.c (mark_not_eliminable): Take additional parameter. - (forget_old_reloads_1): Likewise. - (reload_cse_invalidate_rtx): Likewise. - (reload_cse_check_clobber): Likewise. - (reload_combine_note_store): Likewise. - (move2add_note_store): Likewise. - (reload): Adjust calls to note_stores. - (reload_as_needed): Likewise. - (emit_reload_insns): Likewise. - (reload_cse_regs_1): Likewise. - (reload_cse_record_set): Adjust calls to reload_cse_invalidate_rtx. - (reload_combine): Adjust calls to note_stores. - * resource.c (update_live_status): Take additional parameter. - (mark_target_live_regs): Adjust calls to note_stores. - * stupid.c (find_clobbered_regs): Take additional parameter. - (stupid_life_analysis): Adjust calls to note_stores. - -Wed Oct 27 19:26:12 1999 Nick Clifton - - * config/arm/coff.h (STRUCTURE_SIZE_BOUNDARY): Delete - definition. - - * config/arm/elf.h (STRUCTURE_SIZE_BOUNDARY): Delete - definition. - - * config/arm/arm.h (STRUCTURE_SIZE_BOUNDARY): Define in terms - of the variable arm_structure_size_boundary. - -Wed Oct 27 02:05:58 1999 Mark P. Mitchell - - * alias.c (init_alias_analysis): Allocate reg_known_value and - reg_known_equiv_p on the heap. Likewise for new_reg_base_value - and reg_seen. - (end_alias_analysis): Free reg_known_value and reg_known_equiv_p. - * cse.c (cse_main): Call end_alias_analysis. - * haifa-sched.c (schedule_insns): Likewise. - * local-alloc. (update_equiv_regs): Likewise. - * reload1.c (reload_cse_regs): Likewise. - -Wed Oct 27 01:49:17 1999 Rainer Orth - - * sparc/sparc.c (sparc_override_options): Clear MASK_FPU_SET. - * sparc/sparc.h (TARGET_SWITCHES): Add "fpu" entry for reverse - mapping from MASK_FPU. - -Wed Oct 27 01:42:26 1999 Scott Christley - - * sparc.md (call): Don't bound structure return size to 0xfff. - -Wed Oct 27 00:56:59 1999 Richard Henderson - - * resource.c (mark_target_live_regs): Check that the target - insn wasn't created after compute_bb_for_insn. - -Tue Oct 26 23:15:03 1999 Mark Mitchell - - * ggc-page.c (poison_pages): Don't be overzealous. - -Tue Oct 26 23:29:18 1999 Jeffrey A Law (law@cygnus.com) - - * alias.c: Update comments for ADDRESS. - (nonlocal_reference_p): Look inside the ADDRESS to determine if - it is a local memory reference. - - * c-typeck.c (build_function_call): Check that the built-in - function is of class BUILT_IN_NORMAL before trying to recongize - it as BUILT_IN_ABS. - * calls.c (calls_function_1): Similarly for BUILT_IN_ALLOCA. - * stmt.c (expand_end_cae): Similarly for BUILT_IN_CLASSIFY_TYPE. - -Wed Oct 27 00:14:13 1999 Robert Lipe - - * gcse.c (expr_reaches_here_p): Use xcalloc and explit free instead - of alloca. - (pre_gcse): Likewise. - (hoist_expr_reaches_here_p): Likewise. - (hoist_code): Likewise. - (pre_expr_reaches_here_p): Replace alloca with xcalloc. Move core - code to ... - (pre_expr_reaches_here_p_work): ... here. - (expr_reaches_here_p): Replace alloca with xcalloc. Move core - code to ... - (expr_reaches_here_p_work): ... here. - -Tue Oct 26 20:42:45 1999 Richard Henderson - - * resource.c (find_basic_block): Delete. - (mark_target_live_regs, incr_ticks_for_insn): Use BLOCK_NUM instead. - (init_resource_info): Call compute_bb_for_insn. - -Tue Oct 26 20:21:02 1999 Richard Henderson - - * flow.c (merge_blocks_move_predecessor_nojumps): Cope - with already adjacent blocks, but no fallthru. - (merge_blocks_move_successor_nojumps): Simplify. - (debug_flow_info): New. - - * toplev.c (rest_of_compilation): Open jump1 dump file before - jump and close after, as opposed to just using dump_rtl. - -Wed Oct 27 03:09:23 1999 J"orn Rennecke - - * reload.h (earlyclobber_operand_p): Declare. - * reload.c (earlyclobber_operand_p): Don't declare. No longer static. - * reload1.c (reload_reg_free_for_value_p): RELOAD_OTHER reloads with - an earlyclobbered output conflict with RELOAD_INPUT reloads - handle - case where the RELOAD_OTHER reload is new. Use earlyclobber_operand_p. - -Tue Oct 26 18:23:38 1999 Jan Hubicka - Richard Henderson - - * emit-rtl.c (emit_block_insn_before): New. - (emit_block_insn_after): New. - * basic-block.h: Declare them. - - * bitmap.h: Protect from multiple inclusion. - - * recog.c (scratch_operand): Handle VOIDmode correctly. - - * rtl.h (JUMP_CROSS_JUMP_DEATH_MATTERS): New. - - * builtins.c (expand_builtin_apply_args_1): Remove STACK_REGS hack. - * function.c (assign_parms): Likewise. - * global.c (global_conflicts): Clarify STACK_REGS commentary. - - * reg-stack.c (max_uid): Remove. - (blocks, block_begin, block_end, block_drops_in): Remove. - (block_stack_in, block_out_reg_set, block_number): Remove. - (struct block_info_def, BLOCK_INFO): New. - (enum emit_where): New. - (current_block): New. - (BLOCK_NUM): Remove. - (mark_regs_pat, record_label_references): Remove. - (record_reg_life_pat, record_reg_life, find_blocks): Remove. - (nan): New. - (goto_block_pat, print_blocks, dump_stack_info): Remove. - (reg_to_stack): Simplified test for existence of fp code. Use - flow.c code. Call shorten_branches after cross-jump opt. - (check_asm_stack_operands): Renamed from record_asm_reg_life. - Return false if the asm doesn't use stack regs. Don't do life - analysis on the asm. - (emit_pop_insn): Replace function pointer arg `when' with - enum `where'. Update all callers. - (change_stack): Likewise. Update basic block end. - (emit_swap_insn): Use current_block->head to limit reverse search - for start of block. Use emit_block_insn_after. - (subst_stack_regs_pat): Handle USE and CLOBBER patterns. - (subst_asm_stack_regs): Use check_asm_stack_operands. Use direct - structure assignment instead of bcopy. - (print_stack): New. - (convert_regs_entry, convert_regs_exit): New. - (convert_regs_1, convert_regs_2): Split out from convert_regs. - Work on basic blocks and the CFG. - (convert_regs): Use them. - - * i386.c (output_fix_trunc): Remove code for DImode input operand - not at top-of-stack. - * i386.c (fix_truncdfdi2, fix_truncsfdi2): Use scratch with - appropriate mode. - (fix_truncdi_1): Allow any mode scratch. - -Tue Oct 26 13:30:35 1999 Richard Henderson - - * alpha.h (TARGET_MEM_FUNCTIONS): Define here. - * linux.h, netbsd.h, vms.h: Not here. - -1999-10-26 Gavin Romig-Koch - - * config/mips/mips.h (ISA_HAS_64BIT_REGS,ISA_HAS_BRANCHLIKELY, - ISA_HAS_FP4,ISA_HAS_CONDMOVE): New. - (GENERATE_BRANCHLIKELY,HAVE_SQRT_P, - CONDITIONAL_REGISTER_USEAGE): Use them. - * config/mips/mips.c (mips_move_1word,mips_move_2words, - gen_conditional_branch,override_options) : Use them. - * config/mips/mips.md : Use them. - -Tue Oct 26 13:09:23 1999 Richard Henderson - - * i386.md (zero_extendqihi2): Use SImode register name with andl. - -Tue Oct 26 12:35:38 1999 Richard Henderson - - * integrate.c (function_cannot_inline_p): Don't allow inlining - if setjmp is used. - -Tue Oct 26 14:10:23 1999 Kaveh R. Ghazi - - * c-parse.in (cast_expr): Constify. - - * cccp.c (special_symbol): Likewise. - - * cse.c (hash_cse_reg_info, cse_reg_info_equal_p): Likewise. - - * dwarf2out.c (base_type_die): Likewise. - - * global.c (allocno_compare): Likewise. - - * local-alloc.c (qty_compare_1, qty_sugg_compare_1): Likewise. - - * regclass.c (fix_register): Likewise. - - * rtl.h (fix_register): Likewise. - - * stupid.c (stupid_reg_compare): Likewise. - - * toplev.c (decode_f_option): Likewise. - - * tree.c (build_complex_type): Likewise. - -Tue Oct 26 18:35:25 1999 Richard Earnshaw - - * output.h: Don't unnecessarily conditionalize prototypes on TREE_CODE. - -Tue Oct 26 15:42:56 1999 Bernd Schmidt - - * reload.c (find_reloads): Compute mode and nregs fields of all - reloads. - * reload1.c (calculate_needs_all_insns): Simplify a bit. - (calculate_needs): Use precomputed mode/nregs values. - (allocate_reload_reg): Likewise. - Break out two... - (failed_reload, set_reload_reg): ... new functions. - (choose_reload_regs_init): New function, mostly broken out from... - (choose_reload_regs): ... here. Lose all the save_xxx nonsense. - Also lose one #if 0 block. - -Tue Oct 26 02:48:32 1999 Marc Espie - - * Makefile.in (AR_FOR_TARGET, RANLIB_FOR_TARGET): Fix target name - substitution. - -Tue Oct 26 01:27:32 1999 Mark Mitchell - - * tree.h (BLOCK_TYPE_TAGS): Remove. - (BLOCK_END_NOTE): Likewise. - (BLOCK_LIVE_RANGE_FLAG): Likewise. - (BLOCK_LIVE_RANGE_START): Likewise. - (BLOCK_LIVE_RANGE_END): Likewise. - (tree_block): Remove live_range_flag, live_range_var_flag, and - type_tags. Remove end_note, live_range_start, and live_range_end. - (remember_end_note): Remove prototype. - * tree.c (build_block): Don't set BLOCK_TYPE_TAGS. - * c-decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call - remember_end_note. - * ggc-common.c (ggc_mark_tree_children): Don't mark - BLOCK_TYPE_TAGS or BLOCK_END_NOTE. - * integrate.c (adjust_copied_decl_tree): Remove. - * print-tree.c (print_node): Don't print BLOCK_TYPE_TAGS. - * stmt.c (last_block_end_note): Remove. - (init_stmt): Don't add a GC root for it. - (expand_fixup): Don't set it. - (remember_end_note): Remove. - (expand_end_bindings): Don't set last_block_end_note. - -Tue Oct 26 00:41:54 1999 Bernd Schmidt - - * reload1.c (reload_reg_free_for_value_p): Show - RELOAD_FOR_OTHER_ADDRESS reloads can conflict with RELOAD_OTHER - reloads. - -Mon Oct 25 23:54:45 1999 Geoff Keating - - * expmed.c (extract_bit_field): Allow for the case of non-integer - objects that are smaller than a word (like SFmode on a 64-bit - machine). - - * loop.c (basic_induction_var): A non-integer variable which is - being set by a paradoxical subreg is probably not a biv. - -1999-10-25 Herman A.J. ten Brugge - - * prefix.c (translate_name) Check for empty prefix string. - -Mon Oct 25 23:10:45 1999 Andreas Schwab - - * Makefile.in (CPP_CROSS_NAME): New variable. - (install-cpp): Use it instead of CPP_INSTALL_NAME for the cross - xcpp. - (uninstall-cpp): Use CPP_INSTALL_NAME and CPP_CROSS_NAME for the - names of the files to be uninstalled. - -Mon Oct 25 23:03:09 1999 Jeffrey A Law (law@cygnus.com) - - * collect2.c (IS_DIR_SEPARATOR): Define. - (prefix_from_string): Use IS_DIR_SEPARATOR and DIR_SEPARATOR. - - * som.h (ASM_DECLARE_FUNCTION_NAME): Set PRIV_LEV for static - functions too. - - * haifa-sched.c (add_dependence): Update the true dependency - cache the first time we add a true dependence to the LOG_LINKS chain. - -Mon Oct 25 22:27:40 1999 Jim Kingdon - - * fold-const.c (fold): Fix comment. - -Mon Oct 25 22:49:34 1999 Kaveh R. Ghazi - - * dbxout.c (lastfile, cwd, dbxout_type_method_1, - dbxout_symbol_location, dbxout_symbol_name, dbxout_init, - dbxout_start_new_source_file, dbxout_source_file, - dbxout_source_line, dbxout_finish, dbxout_type_fields, - dbxout_type_methods, dbxout_symbol, dbxout_prepare_symbol): - Constify a char*. - (dbxout_types, dbxout_args, dbxout_symbol): Delete prototypes. - (dbxout_symbol): Mark parameter `local' with ATTRIBUTE_UNUSED. - (dbxout_block): Initialize variable `blocknum'. - - * dbxout.h (dbxout_init, dbxout_finish, - dbxout_start_new_source_file, dbxout_source_file, dbxout_types, - dbxout_args, dbxout_source_line): Constify a char*. - - * dwarfout.c (dwarf_tag_name, dwarf_attr_name, - dwarf_stack_op_name, dwarf_typemod_name, dwarf_fmt_byte_name, - dwarf_fund_type_name, name_attribute, stmt_list_attribute, - low_pc_attribute, high_pc_attribute, body_begin_attribute, - body_end_attribute, comp_dir_attribute, sf_names_attribute, - src_info_attribute, mac_info_attribute, producer_attribute, - lookup_filename, generate_macinfo_entry, fundamental_type_code, - dwarfout_line, dwarfout_start_new_source_file, dwarfout_define, - dwarfout_undef): Constify a char*. - (add_incomplete_type, retry_incomplete_types): Add prototypes. - - * dwarfout.h (dwarfout_define, dwarfout_undef, - dwarfout_start_new_source_file, dwarfout_line): Constify a char*. - -1999-10-25 Gavin Romig-Koch - - * config/mips/mips.h (MIPS_ISA_DEFAULT): Insure it's defined. - (MULTILIB_ISA_DEFAULT): New. - (MULTILIB_DEFAULTS): Use it. - * config/mips/mips.c (): Remove the now unnecessary definition - of MIPS_ISA_DEFAULT. - * config/mips/elf64.h (MULTILIB_DEFAULTS): Remove the now - unnecessary definition. - -Mon Oct 25 22:08:35 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.md (pic_load_addr): Add constraints to operand 1. - -1999-10-25 Bruce Korb - - * fixinc/genfixes: Provide a means for specifying -D options to - AutoGen - -Mon Oct 25 00:42:35 1999 Jeffrey A Law (law@cygnus.com) - - * arm.c (arm_override_options): Correct initialization of - arm_fast_multiply, arm_arch4, arm_arch5, arm_ld_sched, - arm_is_strong, and arm_is_6_or_7. - - * loop.c (note_set_pseudo_multiple_uses_retval): New variable. - (note_set_pseudo_multiple_uses): New function. - (check_dbra_loop): Use not_set_pseudo_multiple_uses to determine - if a pseudo set in the loop exit is used elsewhere. - -Sun Oct 24 20:52:40 1999 Mark Mitchell - - * i386.md (mulsi3): Tweak to work with SCO OSR5 COFF assembler. - -Sun Oct 24 21:02:46 1999 Richard Henderson - - * i386.md (*lea_0): Collapse addsi_0, addsi_lea_[123] into - a single load-address pattern. - -Sun Oct 24 19:33:24 1999 Mark P. Mitchell - - * haifa-sched.c (schedule_insns): Don't assign LUIDs differently - depending on whether or not line-number notes are present. - -Sun Oct 24 20:29:59 1999 Kaveh R. Ghazi - - * cccp.c (progname, file_buf, default_include, include_file, - macrodef, definition, hashval, wchar_type, user_label_prefix, - directive, out_fname, if_stack, safe_write, index0, get_lintcmd, - expand_to_temp_buffer, is_system_include, base_name, - absolute_filename, read_name_map, open_include_file, - record_control_macro, check_precompiled, check_preconditions, - pcfinclude, pass_thru_directive, create_definition, - check_macro_name, comp_def_part, collect_expansion, - check_assertion, read_token_list, assertion_install, - assertion_lookup, eval_if_expression, conditional_skip, - validate_else, skip_quoted_string, quote_string, macarg1, - error_from_errno, install, lookup, hashf, dump_defn_1, - perror_with_name, pfatal_with_name, main, trigraph_pcp, - check_white_space, rescan, handle_directive, monthnames, - special_symbol, do_include, remap_include_file, write_output, - arglist, do_assert, do_unassert, do_line, do_error, do_once, - do_ident, do_sccs, do_xifdef, skip_if_group, - output_line_directive, macroexpand, macarg, change_newlines, - initialize_builtins, make_definition): Constify a char*. - - * pcp.h (stringdef): Likewise. - -Sun Oct 24 13:29:28 1999 Richard Henderson - - * unroll.c (copy_loop_body): Examine SET_DEST of single_set - not of pattern. - -Sun Oct 24 13:14:20 1999 Graham - Richard Henderson - - * alias.c: Include ggc.h. - (reg_base_value, new_reg_base_value, reg_base_value_size): Make static. - (record_set): Verify enough room in reg_base_value. - (init_alias_analysis): Allocate reg_base_value with xcalloc. - Register it as a GC root. - (end_alias_analysis): Free reg_base_value. Remove it as a GC root. - * Makefile.in (alias.o): Depend on ggc.h. - - * unroll.c (unroll_loop): Verify the insn before a barrier - is a JUMP_INSN before checking JUMP_LABEL. - -Sun Oct 24 15:46:44 1999 Kaveh R. Ghazi - - * mips/bsd-5.h (ASM_OUTPUT_ASCII): Constify a char*. - * mips/iris4.h (ASM_OUTPUT_ASCII): Likewise. - * mips/mips-5.h (ASM_OUTPUT_ASCII): Likewise. - * mips/mips.h (ASM_OUTPUT_ASCII): Likewise. - * mips/svr3-5.h (ASM_OUTPUT_ASCII): Likewise. - * mips/svr4-5.h (ASM_OUTPUT_ASCII): Likewise. - -Sun Oct 24 15:35:43 1999 Kaveh R. Ghazi - - * output.h (ctors_section, dtors_section, bss_section): Prototype. - - * alpha/alpha-interix.h (text_section): Delete prototype. - * alpha/elf.h (text_section): Likewise. - * arm/linux-elf.h (text_section): Likewise. - * arm/linux-telf.h (text_section): Likewise. - * c4x/c4x.h (text_section): Likewise. - * dsp16xx/dsp16xx.h (bss_section): Likewise. - * elfos.h (text_section): Likewise. - * i386/aix386ng.h (text_section): Likewise. - * i386/i386-interix.h (text_section): Likewise. - * i386/sco5.h (text_section): Likewise. - * i386/svr3gas.h (text_section): Likewise. - * nextstep.h (text_section): Likewise. - * psos.h (text_section): Likewise. - * ptx4.h (text_section): Likewise. - * svr3.h (text_section): Likewise. - * svr4.h (text_section, ctors_section, dtors_section): Likewise. - -Sun Oct 24 15:20:59 1999 Kaveh R. Ghazi - - * final.c (peephole): Delete prototype. - - * gcse.c (process_insert_insn, pre_edge_insert): Add prototypes. - (pre_insert_copies): Remove unused variable `bb'. - - * genrecog.c (debug_decision_0, debug_decision_list, main): Add - prototypes. - - * output.h (peephole): Add prototype. - -Sun Oct 24 11:35:30 1999 Mark P. Mitchell - - * config/mips/iris6.h (SUBTARGET_ASM_OPTIMIZING_SPEC): Define to - -O0. - -Sat Oct 23 21:13:00 1999 Mark Mitchell - - * integrate.c (integrate_decl_tree): Tweak setting of DECL_CONTEXT - for inlined declarations. - -Fri Oct 22 18:05:43 1999 Jeffrey A Law (law@cygnus.com) - - * arm.c (logical_binary_operator): New fucntion. - * arm.h (logical_binary_operator): Declare it. - (PREDICATE_CODES): Handle logical_binary_operator. - * arm.md (anddi3, anddi_zesidi_di, anddi_sesdi_di): Use "#" for - output constraints. Add appropriate splitters. - (anddi_notdi_di, anddi_notzesidi_di, anddi_notsesidi_di): Likewise. - (iordi3, iordi_zesidi_di, iordi_sesidi_di): Likewise. - (xordi3, xordi_zesidi_di, xordi_sesidi_di): Likewise. - -Fri Oct 22 23:46:50 1999 Bernd Schmidt - - * genoutput.c (struct operand_data): New elt eliminable. - (output_operand_data): Write it. - (scan_operands): Set it for MATCH_OPERAND, clear for other matchers. - (compare_operands): Take it into account. - * recog.h (struct insn_operand_data): New elt eliminable. - * reload1.c (check_eliminable_occurrences, elimination_effects): New - functions. - (old_asm_operands_vec, new_asm_operands_vec): Delete. - (eliminate_regs): Move code that detects changes to elimination - target regs into new function elimination_effects. - Delete one #if 0 block. - Abort for USE, CLOBBER, ASM_OPERANDS and SET. - (eliminate_regs_in_insn): Return immediately for USEs, CLOBBERs, - ADDR_VECs, ADDR_DIFF_VECs and ASM_INPUTs. - Only call eliminate_regs for real operands of the insn, not for parts - of its structure or parts matched by things like match_operator. - Use elimination_effects and check_eliminable_occurrences. Use - copy_insn to duplicate the pattern when not in the final pass. - -Fri Oct 22 09:03:44 1999 Mark Mitchell - - * i386.md: Add missing `y' modifiers to uses of fst, fstp, fld, - and fld. - -1999-10-22 Bruce Korb - - * fixinc/README: document the "mach" machine matching test - * fixinc/fixfixes.c: Implement the #else/#endif label fix - * fixinc/fixtests.c: Implement the #else/#endif label test - * fixinc/inclhack.def: utilize these tests and fixes - * fixinc/inclhack.sh: regen - * fixinc/fixincl.x: regen - * fixinc/fixincl.sh: regen - -Thu Oct 21 20:37:19 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (cse.o): Depend on hashtab.h, not splay-tree.h. Also - depend on ggc.h. - -Thu Oct 21 20:30:19 1999 Matthias Klose - - * gcc.1: Document exit codes. - -Thu Oct 21 12:49:05 1999 Kaveh R. Ghazi - - * calls.c: Include tm_p.h later, so everything we need is defined. - * expr.c: Likewise. - * function.c: Likewise. - - * except.c: Include tm_p.h. - - * sparc.c: Likewise. - (dwarf2out_cfi_label): Don't prototype. - (check_return_regs, epilogue_renumber, - ultra_cmove_results_ready_p, ultra_fpmode_conflict_exists, - ultra_find_type, ultra_build_types_avail, ultra_flush_pipeline, - ultra_rescan_pipeline_state, set_extends, ultra_code_from_mask, - ultra_schedule_insn): Add static prototype. - (data_segment_operand, text_segment_operand): Call itself with the - proper number of arguments. - (sparc_flat_save_restore, sparc_v8plus_shift): Constify a char*. - - * sparc.h: Move all declarations to sparc-protos.h. - (SELECT_RTX_SECTION): Pass a missing MODE argument to - symbolic_operand. - - * sparc/sysv4.h (SELECT_RTX_SECTION): Likewise. - - * config/svr4.h (text_section, ctors_section, dtors_section): Add - Prototypes. - (ASM_OUTPUT_SECTION_NAME, UNIQUE_SECTION, - ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING, - ASM_OUTPUT_ASCII): Constify a char*. - - * sparc-protos.h: New file for sparc prototypes. - -Thu Oct 21 12:23:40 1999 Kaveh R. Ghazi - - * function.c (record_insns, contains): Always declare and define. - (record_insns): Mark with ATTRIBUTE_UNUSED. - -Thu Oct 21 13:03:49 1999 Jonathan Larmour - - * config/arm/telf.h (ASM_OUTPUT_SECTION_NAME): Add %nobits option - to .section when outputting a .bss section to deal with multiple - .bss input sections (as happens with -fdata-sections) - Also output %progbits, not @progbits so the assembler doesn't treat as - a comment. - * config/arm/unknown-elf.h (ASM_OUTPUT_SECTION_NAME): Likewise - - * config/arm/lib1funcs.asm (_call_via_rX): Allow compilation of - thumb parts even when building with non-thumb CPUs, by forcing - thumb mode. - -Wed Oct 20 22:57:58 1999 Jeffrey A Law (law@cygnus.com) - - * sparc.md (movsf_const_intreg): If splitting, length must be > 1. - (movdf_const_intreg_sp64): Similarly. - - * local-alloc.c (update_equiv_regs): Check the correct insn - for pre-existing REG_EQUIV notes. - -Wed Oct 20 20:41:46 1999 Mark Mitchell - - * cse.c (cse_end_of_basic_block): Don't return the end of a basic - block reached by a branch if we're not going to actually process - this block. - -Wed Oct 20 15:18:42 1999 Jim Wilson - - * integrate.c (integrate_decl_tree): Set DECL_CONTEXT to 0 if this is - a local extern function declaration. - -Wed Oct 20 13:56:01 1999 Richard Henderson - - * i386.c (ix86_expand_prologue): Properly wrap USE around - reg for CALL_INSN_FUNCTION_USAGE. - -Thu Oct 14 18:51:37 1999 Andrew Haley - - * config/mips/mips.md (movdf_internal1a): Allow floating-point - move between GP_REGs. - -Wed Oct 20 15:36:11 1999 Andrew Haley - - * config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Take account of - the mode size when finding out if an offset is legal. - -Wed Oct 20 06:26:58 1999 Richard Henderson - - * basic-block.h (PROP_*): Move constants from ... - * flow.c: ... here. - (compute_bb_for_insn): Free the array before reallocating. - (update_life_info): New arg PROP_FLAGS; pass on to propagate_block. - (allocate_reg_life_data): Reset all reg variables collected by - propagate_block. - (get_block_head_tail): Don't convert from bb to block. - (get_bb_head_tail): New. Update all callers of get_block_head_tail. - (find_insn_reg_weight): Take block not bb. - (schedule_block): Don't set block num for moved insns. - (schedule_region): Don't update_life_info or find_insn_reg_weight. - (schedule_insns): Do it here instead. - * combine.c (combine_instructions): Invoke compute_bb_for_insn - before update_life_info. - * recog.c (split_all_insns, peephole2_optimize): Update for - new arg to update_life_info. - * rtlanal.c (remove_note): Cope with NULL note. - * toplev.c (rest_of_compilation): Don't invoke recompute_reg_usage - if we did sched1. - -Wed Oct 20 10:46:41 1999 Richard Earnshaw (rearnsha@arm.com) - - * jump.c (jump_optimize_1): More accurately detect casesi insns. - - * flow.c (merge_blocks_move_predecessor_nojumps): Re-order the basic - block records so that merge_blocks_nomove will clean up correctly. - (split_edge): Handle casesi insns. - - * gcc-page.c: Try MAP_ANON if we don't have MAP_ANONYMOUS. - -Tue Oct 19 23:43:50 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (call, call_value): Do not emit a blockage after restoring - the PIC register. - -Tue Oct 19 17:22:39 1999 Mark Mitchell - - * c-typeck.c (c_expand_asm_operands): Fix typo. - -Tue Oct 19 18:42:58 1999 Bernd Schmidt - - * arm.c (fpu_rhs_operand): Verify modes. - (fpu_add_operand): Likewise. - (di_operand): Likewise. - (soft_df_operand): Likewise. - -Tue Oct 19 15:26:11 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (arm_return_in_memory): APCS rules state that the elements - of a structure returned in a register must be 'integer-like'. - -1999-10-19 Bruce Korb - - * fixinc/Makefile.in: Change the generation rules to run `genfixes' - in the source tree when the generated targets are out of date - * fixinc/genfixes: Alter it to run individual fixes for make. - * fixinc/README: rewrite - * fixinc/inclhack.def: moved initial comments to README - -Tue Oct 19 14:01:34 1999 Nick Clifton - - * toplev.c (main): Do not generate an error message if an - unrecognized command line switch is recognizable by another - language. If extra_warnings are enabled, then generate a - warning message instead. - -Tue Oct 19 11:41:12 1999 Mumit Khan - - * c-pragma.h (PRAGMA_INSERT_ATTRIBUTES): Delete macro. - (insert_pack_attributes): Delete prototype. - - * c-pragma.c (default_alignment): New static variable. - (push_alignment): Initialize to current effective alignment. - (pop_alignment): Use to set new alignment. - (insert_pack_attributes): Delete function. - (handle_pragma_token): Set default_alignment as well each time - a #pragma pack() is encountered. - -Tue Oct 19 02:03:00 1999 Jeffrey A Law (law@cygnus.com) - - * reg-stack.c (stack_result): Aggregates are not returned in - stack registers. - -Tue Oct 19 01:26:48 1999 Alasdair Baird - - * fold-const.c (fold): Fix thinko in x+(-0) -> x transformation. - -Mon Oct 18 15:19:41 1999 Richard Henderson - - * basic-block.h (set_block_num): Declare. - * flow.c (update_life_info): Don't call compute_bb_for_insn - or free_basic_block_vars. - * haifa-sched.c (remove_dependence): Conditionalize on HAVE_cc0. - (insn_orig_block): Remove. - (INSN_BLOCK): Remove. Update all callers to use BLOCK_NUM. - (schedule_block): Keep BLOCK_NUM up-to-date. - (schedule_insns): Use compute_bb_for_insn. - * recog.c (split_all_insns): Likewise. - (peephole2_optimize): Likewise. - -Mon Oct 18 18:50:51 1999 Andreas Schwab - - * config/m68k/m68k.h (INITIAL_FRAME_POINTER_OFFSET): Add one word - if the pic register is used. - -Mon Oct 18 02:38:46 1999 Bernd Schmidt - - * c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT. - (finish_decl): Duplicate test for TREE_ASM_WRITTEN in else branch of - if that tests TREE_PERMANENT. - -Mon Oct 18 01:41:35 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (invalidate_for_call): Do not remove memory references from - the table here. It's handled elsewhere. - - * haifa-sched.c (add_dependence): Protect references to the - true dependency cache with #ifdef INSN_SCHEDULING. - (remove_dependence): Similarly. - - * mn10200.md (outline_epilogue_jump): Embed a (return) to indicate - to the cfg code that this is a return instruction. - * mn10300.md (return_internal): Similarly. - - * combine.c (get_last_value): If the last set of a register - is after subst_low_cuid, then we can not use it to determine - the register's last value. - -Sun Oct 17 11:02:52 1999 Mark Mitchell - - * Makefile.in: Back out previous change. - -Sun Oct 17 15:22:50 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (move_operand): Reject (lo_sum (reg) (unspec ...)). - - * haifa-sched.c (add_dependence): Only check/update the cache - if it exists. - (remove_dependence): Likewise. - (schedule_insns): Only create the true_dependency_cache if the - average number of instructions in a basic block is very large. - -Sun Oct 17 11:02:52 1999 Mark Mitchell - - * Makefile.in (ggc-common.o): Depend on genrtl.h. - (ggc-simple.o): Likewise. - (ggc-page.o): Likewise. - -Sun Oct 17 02:09:50 1999 Andrew MacLeod - - * basic-block.h (pre_edge_lcm, pre_edge_rev_lcm, compute_available): - Prototype for exported functions. - (pre_lcm, pre_rev_lcm): Remove prototypes. - * gcse.c (compute_ae_kill): Add ae_gen and ae_kill as parameters. - (compute_available): Move to lcm.c, and change parameter order. - (one_classic_gcse_pass): Call compute_ae_kill with parameters. - (pre_insert, s_preds, s_succs, num_preds, num_succs): Delete. - (gcse_main): No longer call compute_preds_succs. Rebuild the - set table after reach pre pass. - (pre_insert_map, pre_delete_map, edge_list): New. - (alloc_pre_mem): Allocate edge vectors. - (free_pre_mem): Delete edge vectors. - (compute_pre_data): Call new edge based lcm routines. - (process_insert_insn): New function. - (insert_insn_end_bb): Use it. - (pre_edge_insert): New function. - (pre_insert_copy_insn): Formatting fixes. Update BLOCK_END as - needed. - (pre_insert_copies): Revamp using new edge based lcm outputs. - (pre_delete): Likewise. - (one_pre_gcse_pass): Insert & remove fake edges to the exit - block. - (compute_code_hoist_vbeinout): New new edge based routines. - * lcm.c: Remove all the old LCM functions. Replace with new ones - that work with the new cfg datastructures and work with edges - instead of blocks. - -Sun Oct 17 00:44:17 1999 Bernd Schmidt - - * reload.h (struct reload): Add new fields "mode" and "nregs". - * reload1.c: Change all occurrences of reload_mode and reload_nregs - to reference the "mode" and "nregs" field within struct reload. - -Sat Oct 16 21:50:28 1999 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (true_dependency_cache): New. - (add_dependence): Use the true dependency cache to avoid expensive - walks down the LOG_LINKS dependency list. Add entries to the - cache as necessary. - (remove_dependence): Remove entries from the true dependency cache - as needed. - (schedule_insns): Allocate and initialize and free the true - dependency cache. - - * haifa-sched.c (schedule_insns): Do not remove inter-block - dependencies anymore. - -Sat Oct 16 11:19:52 1999 Richard Henderson - - * i386/t-cygwin (winnt.o): Depend on RTL_H and TREE_H. - * i386/t-winnt: Likewise. - -Sat Oct 16 11:11:54 1999 Richard Henderson - - * ggc-page.c (init_ggc): Work around SunOS unaligned mmap bug. - -1999-10-16 Manfred Hollstein - - * Makefile.in (LANGUAGES): Omit "proto". - (clean): Remove stale comment about removing unprotoize.c. - -Sat Oct 16 11:29:14 1999 Kaveh R. Ghazi - - * protoize.c (safe_read, safe_write): Avoid the gcc extension of - using arithmetic on void pointers. - -Sat Oct 16 02:48:22 1999 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (compute_block_forward_dependencies): Only check - for notes, deleted insns and duplicates if ENABLE_CHECKING is defined. - -Sat Oct 16 00:07:01 1999 Richard Henderson - - * gcse.c (hash_expr_1): Add in MEM_ALIAS_SET. - (expr_equiv_p): Reject memories with different alias sets. - -Fri Oct 15 15:17:29 1999 Greg McGary - - * flags.h (flag_bounds_check, flag_bounded_pointers): New extern decls. - * toplev.c (flag_bounds_check, flag_bounded_pointers): New flags. - (f_options): Add "bounded-pointers" and "bounds-check" entries. - * c-lang.c (lang_init_options): Set flag_bounds_check as "unspecified". - (lang_init): Set default for flag_bounds_check if still "unspecified". - -Sat Oct 16 13:42:29 1999 Michael Hayes - - * config/c4x/c4x.md (HF mode patterns): Add missing modes. - -Sat Oct 16 13:37:46 1999 Michael Hayes - - * config/c4x/c4x.md (movstrqi_small): Utilize parallel move - instructions. - -Sat Oct 16 13:26:47 1999 Michael Hayes - - * config/c4x/c4x.md (*db_noclobber, - *decrement_and_branch_until_zero_noclobber): New patterns and - associated splitters. - -Sat Oct 16 13:13:15 1999 Michael Hayes - - * config/c4x/c4x.md (parallel instruction patterns): Rework - constraints to keep reload happy. - -Sat Oct 16 13:03:16 1999 Michael Hayes - - * config/c4x/c4x.md (*absqi2_noclobber, *negqi2_noclobber, - *one_cmplqi2_noclobber, *subqi3_noclobber, *andqi3_255_noclobber, - *andqi3_65535_noclobber, *andnqi3_noclobber, *xorqi3_noclobber): - Add new patterns and associated post-reload splitters. - -Sat Oct 16 12:42:12 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_emit_libcall): Use ggc_alloc_string. - -Sat Oct 16 12:34:44 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_rptb_insert): Emit rpts_top pattern - if appropriate. - * config/c4x/c4x.md (rpts_top): New pattern and splitter. - -Sat Oct 16 12:26:30 1999 Michael Hayes - - * config/c4x/c4x.c (src_operand): Check SYMBOL_REF and LABEL_REF - memory mode. - -Fri Oct 15 17:02:09 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (move_operand): Rely on memory_address_p to determine the - validity of non-indexed memory addresses. - * pa.h (GO_IF_LEGITIMATE_ADDRESS): Allow LO_SUM with a symbolic - operand in DFmode and SFmode when generating PA2.0 code. - -Fri Oct 15 14:25:19 1999 Richard Henderson - - * print-rtl.c (print_rtx): Limit last 'u' change to LABEL_REF. - -Fri Oct 15 13:48:45 1999 Richard Henderson - - * mips.c (function_prologue): Fix argument types. - * mips.md (casesi): Use emit_jump_insn for casesi_internal. - (casesi_internal): Write to the scratch register. - -1999-10-15 11:16 -0700 Zack Weinberg - - * cppexp.c (cpp_parse_escape): Make static. Change second arg - to U_CHAR **. - (parse_charconst): Delete unnecessary cast when calling - cpp_parse_escape. - (cpplib.h): Kill prototype of cpp_parse_escape. - -Fri Oct 15 11:02:46 1999 Richard Henderson - - Based on patch from Michael Gschwind : - * unroll.c (unroll_loop): Cast return value of alloca. - * i370/i370.c: Include function.h and toplev.h. - (i370_label_scan): Remove c++ commented abort. - * i370/i370.h (HANDLE_PRAGMA): Takes three arguments. - (ASM_OUTPUT_LABELREF): Fix TOUPPER/else broken 16 Sept. - * i370/xm-i370.h (HOST_BITS_PER_LONGLONG): Define. - * i370/xm-mvs.h, i370/xm-oe.h: Likewise. - -Fri Oct 15 03:01:01 1999 Loren Rittle - - * config/t-freebsd: Do not override USER_H. - * ginclude/stddef.h: Generalize check for _MACHINE_ANSI_H_. - -Fri Oct 15 02:37:28 1999 Alastair J. Houghton - Mumit Khan - - * c-parse.in (component_decl): Support anonymous struct/union. - (%expect): Update. - * c-parse.y: Regenerate. - * c-parse.c: Likewise. - * objc/objc-parse.y: Likewise. - * objc/objc-parse.c: Likewise. - * c-decl.c (finish_struct): Don't sort the fields. - (field_decl_cmp): Delete unused function. - -Fri Oct 15 01:20:52 1999 Richard Henderson - - * sparc.md (movsf_const_intreg): Revert last constraint change. - (movdf_const_intreg_sp32): Likewise. - -Fri Oct 15 01:47:51 1999 Vladimir Makarov - - * cse.c: Include hashtab.h instead of splay-tree.h - (struct cse_reg_info): No longer use variant union. Add new - field "regno". All references changed to avoid union. - (cse_reg_info_used_list, cse_reg_info_used_list_end): New variables. - (free_cse_reg_info): Remove. - (hash_cse_reg_info, cse_reg_info_equal_p): New functions. - (get_cse_reg_info): Revamp to use expandable hash tables instead - of splay trees. Initialize new fields in cse_reg_info structure. - (new_basic_block): Similarly. - -Thu Oct 14 23:51:56 1999 Richard Henderson - - * genrecog.c (message_with_line): Prototype. - (validate_pattern): Pass along the set for the dest, not a flag. - Fix non-lvalue message. Don't warn for VOIDmode SET_DEST of CALL. - Check for PC/CC0 as sources. - (nodes_identical): Check for children position match before - allowing the combination. - - * rtl.c (read_rtx): Track line number across \\\n. - -Thu Oct 14 23:50:25 1999 Richard Henderson - - * mips.h (SPECIAL_MODE_PREDICATES): New. - * mips.md (*) Use nonimmediate_operand not general_operand for outputs. - (movdi+1, movsi+1): Add output reload constraint. - (casesi_internal): Likewise. Fix commentary. - (return_internal): Use pmode_register_operand. - -Thu Oct 14 23:19:34 1999 Richard Henderson - - * 1750a.md (movstrqi): Add missing output reload constraint. - (call_value): Likewise. - * a29k.md (cpxxx patterns): Add missing match_operator mode. - (jmpfdec): Add missing inout reload constraint. - * elxsi.md (addsi patterns): Add missing output reload constraint. - (move from sp): Use @ alternates. - (call_value): No constraint on output. - * fr30.md (movsi_pop): Add missing output reload constraint. - (movsf_constant_store): Likewise. - (splits): Remove constraints. - (subsi3): Add missing mode. - * i370.md (cmpstrsi+1): Add missing output reload constraint. - (call_value): Likewise. - * i960.md (cmpinc/cmpdec patterns): Add inout reload constraints. - * m32r.h (PREDICATE_CODES): Add seth_add3_operand. - * m32r.md (movsicc_internal): Add output reload constraint. - (movstrsi_internal): Add inout reload constraints. - * m88k.h (reg_names): Don't declare. - (SPECIAL_MODE_PREDICATES): New. - * m88k.md (*): Use register_operand not reg_or_0_operand - on destinations. - * mn10200.h (PREDICATE_CODES): New. - * ns32k.md (ffs pattern): Add output reload constraint. - * pdp11.md (sob pattern): Add inout reload constraint. - * sh.md (splits): Remove constraints. - (indirect_jump_scratch, fpu_switch): Add output reload constraint. - * v850.md (pattern_is_ok_for_epilogue): Likewise. - * vax.md (jgequ pattern): Add inout reload constraint. - -Fri Oct 15 00:05:00 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (djgpp): Revert previous patch. - * configure: Rebuit. - * config/i386/djgpp.h: Revert previous patch. - -Fri Oct 15 00:00:24 1999 Loren J. Rittle - - * fixinc/inclhack.def: Restore patch lost during last merge of - "no_bogosity" branch. - * fixinc/inclhack.sh, fixinc/fixincl.x: Rebuilt. - -Thu Oct 14 23:57:56 1999 Gavin Romig-Koch - - * fixincludes: Add a HPUX 11 fix for inttypes.h. - * fixinc/inclhack.def: Same. - * fixinc/inclhack.sh, fixinc/fixincl.sh, fixinc/fixincl.x: Regenerate. - -Thu Oct 14 22:51:55 1999 Richard Henderson - - * alpha.h (GO_IF_LEGITIMATE_SIMPLE_ADDRESS): Accept ADDRESSOF - as the base of a PLUS. - -Fri Oct 15 18:36:07 1999 Michael Hayes - - * config/c4x/c4x.md: Define mode for remaining unspec operators. - * config/c4x/c4x.c (dst_operand): Use nonimmediate_operand. - -Thu Oct 14 22:14:23 1999 Richard Henderson - - * pa.md (post_stw+1): Use pmode_register_operand. - (dcacheflush, icacheflush): Likewise. - - * i386.md (movstricthi_1): Allow r/r. - -Thu Oct 14 19:44:08 1999 Jan Hubicka - - * fold-const.c (fold): Convert (or (not arg0) (not arg1)) - to (not (and (arg0) (arg1))). Similary for and. - - * fold-const.c (fold): Move bit_rotate code to the EXPR_PLUS case, - fallthrough to associate code. - Convert XOR to OR in code like (a&c1)^(a&c2) where c1 and c2 don't have - bits in common. - - * combine.c (simplify_logical): Convert XOR to IOR if operands have - no bits in common; remove XOR to ROTATE conversion. - -Fri Oct 15 17:40:11 1999 Michael Hayes - - * config/c4x/c4x.h (c4x_va_start, c4x_va_arg): Declare. - -Fri Oct 15 17:27:17 1999 Michael Hayes - - * config/c4x/c4x.c (dst_operand): New. - (PREDICATE_CODES): Update. - * config/c4x/c4x.h (dst_operand): Declare it. - * config/c4x/c4x.md: Define mode for each unspec usage. - (move patterns): Use dst_operand predicate instead of src_operand. - (movqi_update, movqf_update): Delete. - -Thu Oct 14 18:48:54 1999 Richard Henderson - - * recog.c (pmode_register_operand): New. - * recog.h: Declare it. - * genrecog.c (pred_codes): Likewise. - (special_mode_pred_table): Likewise. - (validate_pattern): Don't warn no mode for address_operand. - - * print-rtl.c (print_rtx) [LABEL_REF]: Only do full subexpression - if the operand is not insn-like. - -Thu Oct 14 19:38:42 1999 Jeffrey A Law (law@cygnus.com) - Sylvian Pion - - * fold-const.c (fold): Handle more simplifications allowed by IEEE. - -Thu Oct 14 17:30:14 1999 Richard Henderson - - * sparc.md (*): Use {nonimmediate,register}_operand as appropriate - instead of general_operand in a SET_DEST. Use const_double_operand - instead of an explicit test against CONST_DOUBLE. - (movsf_const_lo): Add missing register mode. - (goto_handler_and_restore): Add auxiliary test for Pmode. - (flush): Adjust to use address_operand. - (return_sf_no_fpu): Add missing output constraint. - -Thu Oct 14 17:21:26 1999 Richard Henderson - - * rs6000.md (call_value_indirect_aix32): Use wildcard match_operand - for call return value. - (call_value_indirect_aix64, call_value_indirect_nt): Likewise. - -Thu Oct 14 13:54:25 1999 Jason Merrill - - * toplev.c (main): Only warn about options for other languages. - * collect2.c (main): Pass -w to sub-gcc. - -Thu Oct 14 16:27:50 1999 Richard Henderson - - * flow.c (propagate_block): Add call-clobbered registers to - significant too. - - * flow.c (propagate_block): Use free_EXPR_LIST_list instead of - zapping mem_set_list. - (invalidate_mems_from_autoinc): Use free_EXPR_LIST_node. - (mark_set_1, mark_used_regs): Likewise. - -Thu Oct 14 10:51:49 1999 Richard Henderson - - * m68k.md (zero_extendsidi2): Add missing output reload constraint. - -Wed Oct 13 00:09:18 1999 Gerald Pfeifer - - * invoke.texi: Label -Wbad-function-cast, -Wmissing-prototypes, - -Wnested-externs, -Wstrict-prototypes, and -Wtraditional as C only - options. Also add a new item "C-only Warning Options" to the - option summary. - -1999-10-14 Gavin Romig-Koch - - * libgcc2.c (__do_global_dtors): Protect __deregister_frame_info - from multiple calls. - -Thu Oct 14 04:54:54 1999 Richard Henderson - - * i386.md (call value patterns): Move to the end of the file. - (prologue_set_got, prologue_get_pc): Use register_operand for op 0. - -1999-10-14 Mark Elbrecht - - * configure.in (djgpp configuration): Define extra_objects.. - * configure: Rebuilt. - * config/i386/djgpp.h (CTORS_SECTION_ASM_OP): Define. - (DTORS_SECTION_ASM_OP): Define. - (INIT_SECTION_ASM_OP): Define. - (FINI_SECTION_ASM_OP): Define. - (DATA_SECTION_ASM_OP): Define. - (TEXT_SECTION_ASM_OP): Define. - (EH_FRAME_SECTION_ASM_OP): Define. - (LINK_COMMAND_SPEC): Remove -Tdjgpp.djl. - (STARTFILE_SPEC): Add crtbegin.o. - (ENDFILE_SPEC): Define and add crtend.o. Move argument -Tdjgpp.djl - to here from LINK_COMMAND_SPEC. - (DO_GLOBAL_CTORS_BODY): Define. - (CRTSTUFF_USE_FINI_SECTION): Define - (HAS_INIT_SECTION): Delete. - -Thu Oct 14 05:08:14 1999 Andreas Schwab - - * Makefile.in (all.cross): Depend on xcpp$(exeext). - -Thu Oct 14 04:00:40 1999 Richard Henderson - - * pa.h (PREDICATE_CODES): New. - - * genrecog.c (validate_pattern): Condense the destination - non-lvalue message. - -Thu Oct 14 03:23:08 1999 Richard Henderson - - * alpha.md (call-1): Supply missing mode for operator. - (*): Add missing output reload constraints. Remove constraints - from define_splits. - - * i386.h (SPECIAL_MODE_PREDICATES): New. - * i386.md (movstricthi_1): Use nonimmediate_operand for op 0. - (movqi_1, movdi_1, movdi_2, some splits): Likewise. - (addsi_lea_3): Add missing mode for op 3. - (prologue_set_got, prologue_get_pc): Add missing modes. - (*) Add missing output reload constraints. - -Thu Oct 14 03:59:57 1999 Stephane Carrez - - * stor-layout.c (layout_union): Use HOST_WIDE_INT for const_size; - check for member bit-size overflow and use var_size if it occurs. - (layout_record): Use bitsize_int() to define the type size in bits. - Likewise for computation and assignment to DECL_FIELD_BITPOS. - (layout_decl): Likewise when assigning to DECL_SIZE. - -Thu Oct 14 02:57:05 1999 Richard Henderson - - * genrecog.c (validate_pattern): Typo last change. Verify - that output operands have output reloads. - -Thu Oct 14 01:49:54 1999 Richard Henderson - - * genrecog.c (special_mode_pred_table): New. - (NUM_SPECIAL_MODE_PREDS): New. - (find_operand): New. - (validate_pattern): New argument `insn'. Warn for assignment to - any predicate accepting non-lvalues. Conditionally warn for - match_operand without a mode. Try much harder to match source - and destination modes on a set. - * tm.texi (SPECIAL_MODE_PREDICATES): Document. - -Thu Oct 14 02:54:13 1999 Jeffrey A Law (law@cygnus.com) - - * fold-const.c (fold): Detect rotates built from BIT_XOR_EXPRs. - -Thu Oct 14 02:18:19 1999 Marc Espie - - * combine.c (simplify_logical): Recognize xor pattern that encodes - rotation. - -Wed Oct 13 23:23:45 1999 Franz Sirl - - * rs6000.c (expand_block_move): Use INTVAL, not XINT to access - alignment. - -Wed Oct 13 21:47:18 1999 Richard Henderson - - * ggc-page.c (MAP_FAILED): Provide default. - -Wed Oct 13 21:41:59 1999 Richard Henderson - - * sparc.c (symbolic_operand): Verify mode; don't accept CONST_DOUBLE. - * sparc.h (PREDICATE_CODES): Update. - -Wed Oct 13 21:18:17 1999 Richard Henderson - - * alpha.c (some_ni_operand): New. - * alpha-protos.h: Declare it. - * alpha.h (PREDICATE_CODES): Update. - * alpha.md (sXaddq reload insns): Use some_ni_operand - for SET_DEST instead of some_operand. - -Wed Oct 13 21:04:45 1999 Richard Henderson - Jim Wilson - - * genrecog.c (maybe_both_true_2): Don't compare modes of - two DT_pred tests. - (process_tree): Elide peephole2_insns. Invoke simplify_tests - after find_afterward. - (debug_decision_1): Dump next and afterward codes. - -Wed Oct 13 20:35:16 1999 Richard Henderson - - * rtl.c (dump_and_abort): Remove. - (fatal_with_file_and_line): New. - (fatal_expected_char): New. - (read_rtx_lineno, read_rtx_filename): New. - (read_skip_spaces): Track line number. - (read_name): Use fatal_with_file_and_line. - (read_rtx): Use fatal_expected_char. Track line number. - * rtl.h (read_rtx_filename, read_rtx_lineno): Declare. - - * print-rtl.c (print_rtx): Don't special case LABEL_REF argument - if it isn't a CODE_LABEL. - - * genattr.c (main): Set read_rtx_filename. - * genattrtab.c (main): Likewise. - * gencodes.c (main): Likewise. - * genconfig.c (main): Likewise. - * genemit.c (main): Likewise. - * genextract.c (main): Likewise. - * genflags.c (main): Likewise. - * genopinit.c (main): Likewise. - * genoutput.c (main): Likewise. - * genpeep.c (main): Likewise. - - * genrecog.c (decision_test.u.insn): Add `lineno'. - (pattern_lineno, error_count): New variables. - (message_with_line): New. - (add_to_sequence): Break out checking code to ... - (validate_pattern): ... here. Detect SET_DEST matching CONST_INT. - (merge_insn): Use message_with_line. - (make_insn_sequence): Use validate_pattern. Record insn lineno. - (main): Set read_rtx_filename, pattern_lineno. Exit early on error. - -Wed Oct 13 22:01:35 1999 J"orn Rennecke - - * expr.c (store_constructor): Clear union if constructor is empty. - -Wed Oct 13 15:19:04 1999 Jim Wilson - - * config/rs6000/sysv4.h (CC1_SPEC): Fix errors from Jan 19 change. - Add !endian checks. Change %{...} to %(...). - -Wed Oct 13 13:30:34 1999 Richard Henderson - - * i386.md (*addsi3_cc): Renamed from addcsi3. - (*addsi3_carry): Renamed from addxsi3. - (*subsi3_cc): Renamed from subcsi3. - (*subsi3_carry): Renamed from subxsi3. - (*xorqi_cc_1): Renamed from xorcqi_1. - (xorqi_cc_ext_1): Renamed from xorcqi_ext_1. - * i386.c (ix86_expand_fp_compare): Update for xorqi_cc_ext_1. - -Wed Oct 13 13:10:46 1999 Richard Henderson - - * Makefile.in (ggc-common.o): Depend on RTL_H not RTL_BASE_H. - (ggc-simple.o, ggc-page.o, ggc-none.o, ggc-callbacks.o): Likewise. - -1999-10-13 Brendan Kehoe - - * regmove.c (optimize_reg_copy_3): Make sure P is non-nil as we - climb up the chain of insns. - -Wed Oct 13 10:20:58 1999 Richard Henderson - - * genrecog.c (write_subroutine): Careful for null trees. - (process_tree): Don't elide empty functions. - -Wed Oct 13 10:07:54 1999 Richard Henderson - - * Makefile.in (genrtl.o): Depend on ggc.h. - * configure.in (valloc): Probe for it. - (with-gc): Use ggc-page if valloc present. - * ggc-common.c (ggc_mark_rtx_children): Use ggc_mark_if_gcable. - (ggc_mark_rtvec_children): New from corpse of ggc_mark_rtvec. - (ggc_alloc_string): Moved from ggc-page.c. - * ggc-none.c (ggc_alloc_obj): New. - (ggc_alloc_rtx, ggc_alloc_rtvec): Remove. - * ggc-page.c (sys/mman.h): Only include if HAVE_MMAP. - (struct globals): Likewise for dev_zero_fd. - (init_ggc): Likewise for it's initialization. - (ggc_allocated_p): Move careful dereference from ... - (ggc_lookup_page_table): ... here. Delete. - (lookup_page_table_entry): Don't use ggc_lookup_page_table. - (alloc_anon): Use valloc if no mmap. - (release_pages): Use free if using valloc. - (ggc_alloc_obj): Renamed from alloc_obj. - (ggc_set_mark): Renamed from mark_obj. - (ggc_mark_if_gcable): Renamed from ggc_mark_string_if_gcable. - (ggc_alloc_rtx, ggc_alloc_rtvec): Delete. - (ggc_alloc_tree, ggc_alloc_string, ggc_alloc): Delete. - (ggc_set_mark_rtx, ggc_set_mark_rtvec): Delete. - (ggc_set_mark_tree, ggc_mark_string, ggc_mark): Delete. - (ggc_collect): Use fp printing instead of our own rounding. - * ggc-simple.c (IS_MARKED, IGNORE_MARK): Delete. - (GGC_STRING_MAGIC, GGC_STRING_MAGIC_MARK): Delete. - (GGC_ANY_MAGIC, GGC_ANY_MAGIC_MARK): Delete. - (struct ggc_rtx, struct ggc_rtvec, struct ggc_tree): Delete. - (struct ggc_string, struct ggc_any): Delete. - (offsetof): Provide default definition. - (GGC_BALANCE, GGC_ALWAYS_COLLECT, GGC_ALWAYS_VERIFY): New. - (PTR_KEY): New. - (struct ggc_mem): New, from corpse of ggc_any. - (struct ggc_status): Delete. - (ggc_chain, ggc_allocated_strings, ggc_strings_used): Delete. - (n_rtxs_collected, n_vecs_collected, n_trees_collected): Delete. - (n_strings_collected, n_anys_collected): Delete. - (ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Delete. - (ggc_alloc_string, ggc_alloc): Delete. - (ggc_free_rtx, ggc_free_rtvec, ggc_free_tree): Delete. - (ggc_free_string, ggc_free_any): Delete. - (ggc_set_mark_rtx, ggc_set_mark_rtvec, ggc_set_mark_tree): Delete. - (ggc_compare_addresses, ggc_mark_string): Delete. - (ggc_mark_string_if_gcable, ggc_mark): Delete. - (search_data): Delete. - (struct globals): New. - (GGC_MIN_EXPAND_FOR_GC, GGC_MIN_LAST_ALLOCATED): New. - (tree_insert, tree_lookup): New. - (ggc_alloc_obj, ggc_set_mark, ggc_mark_if_gcable): New. - (clear_marks, sweep_objs): New. - (ggc_collect): Gut. Use clear_marks, sweep_objs. - (init_ggc): Set allocated_last_gc. - (ggc_push_context): Gut. Use G.context. - (ggc_pop_context): Likewise. - (ggc_pop_context_1): New. - (debug_ggc_tree): New. - (debug_ggc_balance, tally_leaves): New. - * ggc.h (ggc_mark_rtvec, ggc_mark_string, ggc_mark): Remove decl. - (ggc_mark_string_if_gcable): Remove decl. - (ggc_mark_rtx, ggc_mark_tree): Use ggc_set_mark. - (ggc_mark_rtvec_children): New. - (ggc_mark_rtvec, ggc_mark_string, ggc_mark): New. - (ggc_mark_if_gcable): New decl. - (ggc_alloc_rtx, ggc_alloc_rtvec): Remove decl. - (ggc_alloc_tree, ggc_alloc): Likewise. - (ggc_set_mark_rtx, ggc_set_mark_rtvec, ggc_set_mark_tree): Likewise. - (ggc_alloc_obj): New decl. - (ggc_alloc_rtx, ggc_alloc_rtvec): New macros. - (ggc_alloc_tree, ggc_alloc): Likewise. - (ggc_set_mark): New decl. - * rtl.h (struct rtx_def): Remove gc_mark. - (struct rtvec_def): Likewise. - * tree.h (struct tree_common): Likewise. - -Wed Oct 13 01:44:29 1999 Carol LePage - - * configure.in (sparc-hal-solaris2*): Fix xm_file, xm_defines, - float_format and thread_file definitions. - * configure: Rebuilt. - -Wed Oct 13 09:25:03 1999 Niels Möller - - * extend.texi (Function Names): Document types of function names. - -Wed Oct 13 00:45:04 1999 Bernd Schmidt - - * reload1.c (reload_reg_free_for_value_p): RELOAD_OTHER reloads with - an earlyclobbered output conflict with RELOAD_INPUT reloads. - -Tue Oct 12 23:28:28 1999 J"orn Rennecke - - * sh.h (BOOL_TYPE_SIZE): Don't use INT_TYPE_SIZE / CHAR_TYPE_SIZE. - -Tue Oct 12 23:19:32 1999 J"orn Rennecke - - * sh.h (REGISTER_MOVE_COST): Change PR_REG to PR_REGS. - -Tue Oct 12 17:09:38 1999 David Edelsohn - - * collect2.c (main): Do prelimnary link on AIX if rflag. - -Tue Oct 12 09:45:19 1999 Jonathan Larmour - - * config/rs6000/eabi-ctors.c (__do_global_ctors): Run through - __CTOR_LIST__ in opposite order, which is the correct order for sorted - constructors. - (__do_global_dtors): similarly for __DTOR_LIST__. - -Fri Oct 8 19:46:03 1999 J"orn Rennecke - Diego Novillo - - * config/sh/sh.h (REGISTER_MOVE_COST): Handle moves from T_REGS to - FPUL_REGS. - -Tue Oct 12 07:38:41 1999 Bruce Korb - - * fixincl/*: Merged "no_bogosity" branch - * fixincl/fixlib.h: protect against doubly defining t_bool - * fixincl/server.h: protect against doubly defining t_bool - -Mon Oct 11 20:18:41 1999 Jim Wilson - - * genoutput.c: Include toplev.h. - -Mon Oct 11 18:56:14 1999 Jim Wilson - - * config/sparc/liteelf.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP): - Undef. - * configure.in (sparclite-*-elf, sparc86x-*-elf): Don't use libgloss.h. - * configure: Regenerate. - -Mon Oct 11 16:07:49 1999 Richard Henderson - - * gcse.c (delete_null_pointer_checks): Returns void. - -Mon Oct 11 20:31:51 1999 Bernd Schmidt - - * rtl.c (copy_rtx): Don't use accessor macros to copy fields. - * emit-rtl.c (copy_insn_1): Likewise. - -Mon Oct 11 13:29:06 1999 Geoffrey Keating - - * config/mips/mips.c (mips_build_va_list): Correct - TREE_CHAIN setting when hard-float. - (mips_va_start): Use corrected setting. - (mips_va_arg): Likewise. Also pass a tree to build of - POSTINCREMENT_EXPR rather than a naked 'int'. - -Sun Oct 10 18:27:27 1999 Mark Mitchell - - * ggc.h (ggc_push_context): Fix comment. - (ggc_pop_context): Likewise. - (mark_string_if_gcable): Likewise. - * ggc-common.c (ggc_mark_rtx_children): Use - ggc_mark_string_if_gcable. - * ggc-page.c (ggc_lookup_page_table): New function. - (ggc_allocated_p): Likewise. - (mark_obj): Fix formatting. - (ggc_mark_string_if_gcable): New function. - * ggc-simple.c (ggc_allocated_strings): New variable. - (ggc_strings_used): Likewise. - (ggc_compare_addresses): New function. - (ggc_pop_context): Pop the `any' memory too. - (ggc_mark_string_if_gcable): New function. - (ggc_collect): Initialize and tear down ggc_allocated_strings. - -Sun Oct 10 20:05:21 1999 David Edelsohn - - * rs6000.md (movstrsi_?reg): Use preferred rD/rS = r5 form. - (scc patterns): Disable most SImode variants if TARGET_POWERPC64. - * rs6000.c (expand_block_move): Match movstrsi_?reg register - changes. - -Sun Oct 10 16:37:01 1999 Richard Henderson - - * haifa-sched.c (sched_reg_n_calls_crossed): Delete. - (sched_reg_live_length, sched_reg_basic_block): Delete. - (current_block_num, bb_live_regs, old_live_regs): Delete. - (dead_notes, struct sometimes): Delete. - (sched_note_set, birthing_insn_p): Delete. - (adjust_priority): Gut useless reg lifetime code. - (create_reg_dead_note, attach_deaths): Delete. - (attach_deaths_insn, new_sometimes_live): Delete. - (finish_sometimes_live): Delete. - (find_pre_sched_live, find_post_sched_live): Delete. - (update_reg_usage): Delete. - (find_insn_reg_weight): New, from corpse of find_pre_sched_live. - (schedule_insns): Delete reg lifetime code. - (sched_analyze): Use REG_SAVE_NOTE to stuff NOTE_INSN notes away. - (unlink_other_notes): Adjust REG_NOTE commentary. - (reemit_notes): Use REG_SAVE_NOTE. - (schedule_block): Likewise. - (schedule_region): Allocate bitmap of blocks in region. Use - count_or_remove_death_notes. Use update_life_info. - - * rtl.h (REG_SAVE_NOTE): New. - * rtl.c (reg_note_name): Update. - -Sun Oct 10 16:14:16 1999 Richard Henderson - - * combine.c (refresh_blocks, need_refresh): New. - (combine_instructions): Allocate refresh_blocks. Invoke - update_life_info if needed. - (distribute_notes): Mark refresh_blocks instead of installing - USE insns. - * flow.c (update_life_info): Remove notes if GLOBAL_RM_NOTES. - * basic_block.h (enum update_life_extent): Add GLOBAL_RM_NOTES. - - * Makefile.in (recog.o): Depend on basic-block.h. - -Sun Oct 10 12:03:21 1999 Richard Henderson - - * genrecog.c (add_to_sequence): Thinko last change: delete - shadowing allow_const_int variable. - -Sun Oct 10 08:40:00 1999 Kaveh R. Ghazi - - * cppinit.c: Use HAVE_GCC_VERSION instead of explicitly testing - __GNUC__ and __GNUC_MINOR__. - - * gansidecl.h: Likewise. - - * rtl.c: Likewise. - - * rtl.h: Likewise. - - * toplev.h: Likewise. - - * tree.c: Likewise. - - * tree.h: Likewise. - - * varray.c: Likewise. - - * varray.h: Likewise. - -Sun Oct 10 13:28:48 1999 Bernd Schmidt - - * loop.c (find_and_verify_loops): When looking for a BARRIER, don't - use one before a jump table. - - * rtl.def (ADDRESS): Change documentation to match reality. - * md.texi: Don't document it. - * gmicro.md (load address pattern): Use 'p' constraint, delete use - of ADDRESS rtx. - - * emit-rtl.c (copy_insn_1): Make format_ptr a const char *. - -Sun Oct 10 02:41:41 1999 Richard Henderson - - * genrecog.c (add_to_sequence): Move allow_const_int test outside - known predicate block; default allow_const_int true. - (debug_decision_list): New. - -Sun Oct 10 00:43:08 1999 Richard Henderson - - * i386.h (CC1_SPEC): Typo -- use cc1_cpu. - -Sat Oct 9 23:26:55 1999 Jeffrey A Law (law@cygnus.com) - - * gcse.c (gcse_main): Avoid global optimizations if we have a - large number of basic blocks and the ratio of edges to blocks - is high. - (delete_null_pointer_checks): Likewise. - -Sat Oct 9 23:16:01 1999 Ken Raeburn - - * c-common.c (check_format_info): Warn if format string isn't a - string literal. - -Sat Oct 9 23:04:02 1999 Jonathan Larmour - - * configure.in (arm*-*-*): Don't let autoconf remove brackets - * configure: regenerate - -Sat Oct 9 13:15:53 1999 Richard Henderson - - * alpha.md (extendsidi2): Turn into a splitter. Allow f/f. - If TARGET_FIX, allow r/f. Remove cvtlq unspec pattern. - (peepholes): Re-enable. - -Sat Oct 9 12:18:16 1999 Richard Henderson - - * Makefile.in (flow.o): Depend on TREE_H. - * basic-block.h (REG_SET_EQUAL_P): New. - (XOR_REG_SET): New. - (n_edges): Declare. - (free_regset_vector): Remove declaration. - (flow_delete_insn_chain): Declare. - (enum update_life_extent): New. - (update_life_info, count_or_remove_death_notes): Declare. - * combine.c (distribute_notes) [REG_DEAD]: Stop search at bb->head. - Verify register live at bb->global_live_at_start before adding USE. - * flow.c (HAVE_epilogue, HAVE_prologue): Provide default. - (CLEAN_ALLOCA): New. - (n_edges): New. - (PROP_*): New flags. - (find_basic_blocks_1): Use alloc_EXPR_LIST. - (clear_edges): Zero n_edges. - (make_edge): Increment n_edges. - (split_edge): Don't allocate bb->local_set. Increment n_edges. - (flow_delete_insn_chain): Export. - (delete_block): Decrement n_edges. - (merge_blocks_nomove): Likewise. - (life_analysis): Give life_analysis_1 PROP flags. - (verify_wide_reg_1, verify_wide_reg): New. - (verify_local_live_at_start): New. - (update_life_info): Rewrite to call into propagate_block. - (mark_reg): New. - (mark_regs_live_at_end): After reload, if epilogue as rtl, - always mark stack pointer. Conditionally mark PIC register. - After reload, mark call-saved registers, return regsiters. - (life_analysis_1): Accept PROP flags not remove_dead_code. - Call mark_regs_live_at_end before zeroing regs_ever_live. - Use calculate_global_regs_live. Copy global_live_at_end before - calling final propagate_block. Zero reg_next_use on exit. - (calculate_global_regs_live): New. - (allocate_bb_life_data): Don't allocate bb->local_set. - (init_regset_vector, free_regset_vector): Remove. - (propagate_block): Accept FLAGS not FINAL or REMOVE_DEAD_CODE. - Test flags before every operation. Warn if prologue/epilogue insn - would have been deleted. - (mark_set_regs, mark_set_1): Accept and use FLAGS. - Use alloc_EXPR_LIST. - (mark_used_regs): Accept and use FLAGS, not FINAL. - Remove special handling for RETURN. - (try_pre_increment): Use alloc_EXPR_LIST. - (dump_flow_info): Dump n_edges. - (unlink_insn_chain, split_hard_reg_notes): Remove. - (maybe_add_dead_note, maybe_add_dead_note_use): Remove. - (find_insn_with_note, new_insn_dead_notes): Remove. - (update_n_sets, sets_reg_or_subreg_1, sets_reg_or_subreg): Remove. - (maybe_remove_dead_notes, prepend_reg_notes): Remove. - (replace_insns): Remove. - (count_or_remove_death_notes): New. - (verify_flow_info): Abort on error after all checks. - (remove_edge): Decrement n_edges. - (remove_fake_edges): Tweak format. - * haifa-sched.c (schedule_insns): Use split_all_insns. - * output.h (update_life_info): Remove declaration. - * recog.c (split_all_insns): From the corpse of split_block_insns, - do the whole function block by block. Use update_life_info. - (recog_last_allowed_insn): New. - (recog_next_insn): Mind it. - (peephole2_optimize): Set it. Walk backwards through blocks. - Use update_life_info. - * rtl.h (update_flow_info, replace_insns): Remove declarations. - (split_all_insns): Declare. - * toplev.c (rest_of_compilation): Thread prologue before flow2. - Use split_all_insns. - - * i386.md (or -1 peep2s): Disable. - -Fri Oct 8 17:49:08 1999 Richard Henderson - - * config/mips/mips.md (movstrsi+[123]) : Combine these into - a single pattern. Scrap the 'd' versions as unnecessary. - - * config/mips/mips.md (tablejump_internal3,tablejump_mips161, - tablejump_mips162,tablejump_internal4): The operands to a - label_ref must be VOIDmode. - -Fri Oct 8 16:12:42 1999 Kaveh R. Ghazi - - * configure.in (c-mbchar): Append, don't overwrite, `extra_c_flags'. - -Fri Oct 8 11:58:34 1999 Richard Henderson - - * mips.c (mips_va_arg) [EABI]: Return addr_rtx. - -Fri Oct 8 11:58:34 1999 Richard Henderson - - * lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the - cache every function if ggc_p. - -Fri Oct 8 18:46:11 1999 Bernd Schmidt - - * jump.c (duplicate_loop_exit_test): Use copy_insn/copy_insn_1 - instead of copy_rtx. Accept sequences that contain asm statements. - * emit-rtl.c (copy_insn_1, copy_insn): New functions. - (copy_insn_scratch_in, copy_insn_scratch_out, copy_insn_n_scratches, - orig_asm_operands_vector, copy_asm_operands_vector, - orig_asm_constraints_vecotr, copy_asm_constraints_vector): New static - variables. - * rtl.h (copy_insn, copy_insn_1): Declare. - -Fri Oct 8 13:08:12 1999 Kaveh R. Ghazi - - * Makefile.in (insn-recog.o): Depend on hard-reg-set.h and resource.h. - - * alpha.h (ASM_OUTPUT_MI_THUNK): Pass the correct number of - arguments to `current_file_function_operand'. - - * genrecog.c: Include hard-reg-set.h and resource.h in the - generated output file. - - * real.c: Include tm_p.h. - -Fri Oct 8 18:46:11 1999 Bernd Schmidt - - * i386.md (prologue_allocate_stack): Add '=' constraint letter on - output operand. - -Thu Oct 7 23:06:50 1999 Richard Henderson - - * rs6000.md (fix_truncdfsi2_internal+1): Emit a clobber - before the fctiwz insn. - -Thu Oct 7 22:53:00 1999 Franz Sirl - Mark Mitchell - - * tree.c (make_lang_type_fn): New function pointer. - (make_lang_type): Call it. - * tree.h (make_lang_type): Declare. - (make_lang_type_fn): Likewise. - * rs6000.c (rs6000_build_va_list): Use make_lang_type. - -Thu Oct 7 00:36:17 1999 Diego Novillo - - * config/rs6000/rs6000.c (secondary_reload_class): For TARGET_ELF - make sure that HIGH instructions are copied into BASE_REGS. - -Thu Oct 7 17:02:34 1999 Jason Merrill - - * expr.c (expand_expr, TARGET_EXPR): Set TREE_USED sooner. - -Thu Oct 7 17:01:58 1999 Greg McGary - - * c-decl.c (finish_struct): Use simpler method of - removing elements of a singly-linked list. - -Thu Oct 7 15:23:28 1999 Michael Meissner - - * alpha.md (peephole2's): Comment out peephole2's that generate - buggy code. - -Thu Oct 7 12:00:53 1999 Richard Henderson - - * genrecog.c (add_to_sequence): Disable mode check for - wildcard matches. - -Thu Oct 7 20:14:16 1999 Bernd Schmidt - - * ggc-simple.c (init_ggc): Set empty_string. - -Thu Oct 7 01:13:15 1999 Richard Henderson - - * configure.in: Detect mmap. Add --with-gc=foo to select - garbage collector; default to page if mmap available. - * Makefile.in (GGC): Substitute. - -Wed Oct 6 23:56:30 1999 Richard Henderson - - * c-decl.c (ggc_p): Enable. - -Wed Oct 6 17:17:08 1999 Kaveh R. Ghazi - - * flow.c (verify_flow_info): Make it extern & unconditionally define. - -1999-10-06 Brendan Kehoe - - * sparc/sp86x-elf.h (SUBTARGET_SWITCHES): Add missing doc - string for little-endian-data. - -Wed Oct 6 16:10:35 1999 Michael Meissner - - * varray.h (VARRAY_CHECK): Fix up appropriate revision check, in - case somebody tries to compile --enable-checking code with gcc - 1.34 or such. - -Wed Oct 6 12:22:50 1999 Richard Henderson - - * genrecog.c (add_to_sequence): Verify operand to label_ref is - VOIDmode. - -Wed Oct 6 10:21:15 1999 Richard Henderson - - * genconfig.c (main): Disable HAVE_conditional_arithmetic. - * jump.c (jump_optimize_1): Document why. - -Wed Oct 6 10:41:56 1999 Kaveh R. Ghazi - - * collect2.c (scan_prog_file, scan_libraries): Prototype function - pointers and casts for `int_handler' and `quit_handler'. - - * flow.c (verify_flow_info, split_hard_reg_notes, - find_insn_with_note, sets_reg_or_subreg_1, prepend_reg_notes, - remove_edge, remove_fake_successors): Add static prototypes. - (verify_flow_info): Wrap with macro ENABLE_CHECKING. - (mark_set_1): Initialize variable `regno'. - (unlink_insn_chain): Likewise for variable `curr'. - (remove_fake_edges): Remove unused variables `e', `tmp' and `last'. - - * loop.c (strength_reduce): Initialize variable - `unrolled_insn_copies'. - (cmp_combine_givs_stats, cmp_recombine_givs_stats): Add static - prototypes. Change these functions to take const PTR parameters - to avoid prototype conflict when used as the comparson argument - for qsort. - (check_dbra_loop): Initialize variable `comparison_val'. - - * reload.c (debug_reload_to_stream, debug_reload): Add prototypes. - (get_secondary_mem): Mark parameter `x' with ATTRIBUTE_UNUSED. - (find_valid_class): Initialize variable `best_class'. - (find_reloads): Call memcpy, not bcopy. - - * reload1.c (gen_mode_int, dump_needs): Add prototypes. - (hard_reg_use_compare): Don't needlessly cast away const. - (reload_reg_class_lower): Likewise. - (choose_reload_regs): Initialize variable `regno'. - -Tue Oct 5 16:34:12 1999 Paul Burchard - - * ggc-page.c (GGC_ALWAYS_COLLECT): Fix typo when undef'ing. - -Tue Oct 5 16:14:40 1999 Michael Meissner - - * libgcc1-test.c (toplevel): Include stddef.h to get size_t. - ({,d}discard): Add forward declarations. Declare parameter as - unused. - (main_without_main): Explicitly declare return type to be int. - (memcpy): Properly declare. - - * libgcc2.c (toplevel): If inhibit_libc is defined and not - building the trampoline support, declare malloc, free, and - atexit. - (__clear_cache): Mark arguments as potentially unused. - - * frame.c (toplevel): If inhibit_libc is defined, declare - malloc and free. - -Tue Oct 5 12:00:32 1999 Richard Henderson - - * flow.c (make_edge): Accept an optional 2D bitmap in which - to cache edge existence. Update all callers. - (make_label_edge, make_eh_edge): Pass through the edge cache. - (make_edges): Provide the cache. - -Tue Oct 5 12:16:49 1999 Kaveh R. Ghazi - - * mbchar.c (literal_codeset, local_mbtowc, local_mblen): Constify - a char*. - (local_mbtowc): Change the type of variable `i' from int to size_t. - - * mbchar.h (ISSJIS1, ISSJIS2): Use parens around && within ||. - (local_mbtowc, local_mblen, literal_codeset): Constify a char*. - -Tue Oct 5 11:34:52 1999 Michael Meissner - - * ggc-common.c (toplevel): Reorder includes, so that ggc.h comes - after other includes that define the appropriate types. Include - tm_p.h for getting user prototypes. - * ggc-callbacks.c (toplevel): Ditto. - * ggc-none.c (toplevel): Ditto. - * gcc-page.c (toplevel): Ditto. - * ggc-simple.c (toplevel): Ditto. - -Mon Oct 4 16:48:16 1999 Diego Novillo - Jonathan Larmour - - * config/mips/mips.c (mips_move_2words): Split doubles if - ISA >= 3, !TARGET_64BIT, and destination is not an FP register. - -Mon Oct 4 21:47:31 1999 Richard Henderson - - * genrecog.c (struct decision_test): New. - (struct decision): Remove test-related members, sort the rest by size. - (IS_SPLIT): Simplify. - (new_decision, new_decision_test): New. - (add_to_sequence): Use them. No special handling for args of - non-MATCH codes. - (maybe_both_true): Renamed from not_both_true; return sense changed. - (maybe_both_true_1, maybe_both_true_2): New. Broken out - of maybe_both_true and adjusted for decision_test. - (position_merit): Remove. - (nodes_identical, nodes_identical_1): New, broken out of merge_trees. - (merge_accept_insn): New, broken out of merge_trees. - (merge_trees): Use them. No special case for c_test; no node - splitting; use test type instead of position_merit. - (factor_tests): New. - (simplify_tests): New. - (break_out_subroutines): Don't write code now. - (find_afterward): New. - (write_afterward, write_switch, write_cond): New. - (write_action, is_unconditional): New. - (write_node): New. Use them. - (write_tree_1): Rewrite. Use the new functions above. - (write_tree): Remove afterward processing. - (write_subroutine): Simplify function variant emission. - (write_subroutines): New. - (same_codes, clear_codes): Remove. - (same_modes, clear_modes): Remove. - (write_header): New, broken out of main. - (make_insn_sequence): Use new_decision and new_decision_test. - (process_tree): New, broken out of main. - (main): Adjust for merge_trees interface change. - Don't #define operands in the output file. - (record_insn_name): New, broken out of make_insn_sequence. - (debug_decision_2, debug_decision_1, debug_decision_0): New. - (debug_decision): New. - -1999-10-04 21:58 -0700 Zack Weinberg - - * resource.c (find_free_register): Mark class_str argument const. - * resource.h: Update prototype to match. - - * i386.h (PREDICATE_CODES): Add entry for long_memory_operand. - * i386.md: Give all anonymous insns names. - -Mon Oct 4 21:12:02 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (merge_blocks): Avoid assing BASIC_BLOCK for non-existent - blocks. - -Mon Oct 4 21:01:39 1999 Richard Henderson - - * toplev.c (dbr_sched_time): Unconditional. - (peephole2_time): New. - (compile_file): Add pass numbers to all of the dump file suffixes. - Dump peephole2_time. Don't dump times for non-applicable passes. - (rest_of_compilation): Add pass numbers to dump file suffixes. - Conditionalize calls to the scheduler. - * invoke.texi: Update. - -Mon Oct 4 20:25:13 1999 Anthony Green - - * flow.c (make_edges): Fix insn iteration. - (find_basic_blocks): Assign NULL_RTX, not 0, to rtx. - (find_basic_blocks_1): Fix spelling mistake. - -Mon Oct 4 16:56:11 1999 Richard Henderson - - * tree.c (build1): Set TREE_SIDE_EFFECTS for expressions that - always have side-effects. Use memset not bzero. - (make_node): Likewise. - -Mon Oct 4 16:22:20 1999 Mark Mitchell - - * stmt.c (expand_anon_union_decl): When any of the elements of the - union is addressable, so is the entire union. - -Mon Oct 4 11:38:33 1999 Richard Henderson - - * sbitmap.c (sbitmap_ones): Don't set too many bits. - - * bitmap.h (enum bitmap_bits): Add BITMAP_XOR. - * bitmap.c (bitmap_operation): Return true iff TO changed. - (bitmap_equal_p): New. - (bitmap_bit_p): Tidy arithmetic. - (debug_bitmap_file): Likewise. - -Mon Oct 4 11:28:37 1999 Richard Henderson - - * toplev.c (rest_of_compilation): Turn on cse_not_expected - before cse2 instead of after. - -Mon Oct 4 09:55:17 1999 Stan Cox - - * mips.h (GO_IF_LEGITIMATE_ADDRESS): Let leasi/liadi handle large - register offsets. - -Mon Oct 4 08:54:12 1999 Alexandre Oliva - - * cppinit.c (is_idchar initializer): Loosen tests to accept - gcc 2.>6 and >2. - -Mon Oct 4 02:31:20 1999 Mark Mitchell - - * mips.md: Define conditional move patterns for floating point - operands and DI mode conditions. - -Mon Oct 4 02:12:41 1999 Mark Mitchell - - * tree.c (make_node): Set TREE_SIDE_EFFECTS for expressions that - always have side-effects. - -Sun Oct 3 14:14:16 1999 Jeffrey A Law (law@cygnus.com) - - * mn10200.c (asm_file_start): Fix typo. - - * cppinit.c (is_idchar initializer): Tighten tests for when - to put the table into initialized memory. - - * ggc-none.c (ggc_alloc_rtvec): An rtvec is an array of rtx, - not an array of rtunion. - * gcc-page.c (ggc_alloc_rtvec): Similarly. - * gcc-simple (ggc_free_rtvec): Similarly. - - * genattrtab.c (simplify_cond): Make TESTS an array of rtxs, instead - of rtunions. - - * mbchar.h: Add missing #endif. - - * t-fr30 (LIB2FUNCS_EXTRA): Remove definition. - (FPBIT, DPBIT): Define. - -Sun Oct 3 12:44:05 1999 Kaveh R. Ghazi - - * print-tree.c (print_node, indent_to): Remove redundant prototypes. - - * profile.c (instrument_arcs, output_gcov_string, - tablejump_entry_p): Add static prototypes. - (output_gcov_string): Constify a char*. - - * regmove.c (replacement_quality, fixup_match_2): Add static - prototypes. - - * resource.h (reg_dead_p): Add extern prototype. - - * rtl.c (trim_filename): Add static prototype. - - * scan-decls.c (skip_to_closing_brace): Likewise. - - * stmt.c (expand_decl_cleanup_no_eh): Hide definition. - (expand_end_case): Initialize variable `range'. - (emit_case_nodes): Remove unused prototype `rtx_fn'. - - * varasm.c (asm_emit_uninitialised): Add static prototype. - (asm_emit_uninitialised, assemble_variable): Mark parameter with - ATTRIBUTE_UNUSED. - -Sun Oct 3 12:24:52 1999 Kaveh R. Ghazi - - * cpplib.c (if_directive_nameo): Add static prototype. - - * cse.c (cse_insn): Remove unused variable `p'. - - * except.c (create_rethrow_ref, push_entry, - receive_exception_label, new_eh_region_entry, find_func_region, - clear_function_eh_region, process_nestinfo): Add static prototypes. - (get_reg_for_handler): Hide definition. - (process_nestinfo): Initialize variable `extra_handlers'. - - * expr.h (expand_builtin_longjmp): Add extern prototype. - - * final.c (final_addr_vec_align, align_fuzz): Add static prototypes. - - * function.c (prepare_function_start): Likewise. - (pop_function_context_from): Mark parameter `context' with - ATTRIBUTE_UNUSED. - (push_temp_slots_for_block, flush_addressof): Hide definition. - - * gcov.c (init_arc, reverse_arcs, create_program_flow_graph, - solve_program_flow_graph, calculate_branch_probs, - function_summary, main, fancy_abort): Add prototypes. - - * gen-protos.c (add_hash, parse_fn_proto, main): Likewise. - (add_hash): Constify a char*. - - * ggc-common.c (ggc_mark_rtx_ptr, ggc_mark_tree_ptr, - ggc_mark_tree_varray_ptr, ggc_mark_tree_hash_table_ptr, - ggc_mark_string_ptr, ggc_mark_tree_hash_table_entry): Add prototypes. - - * integrate.c (expand_inline_function_eh_labelmap): Likewise. - - * lists.c (free_list, zap_lists): Likewise. - -Sun Oct 3 12:05:28 1999 Kaveh R. Ghazi - - * alias.c (nonlocal_reference_p): Add static prototype. - - * bitmap.c (bitmap_element_allocate): Prototype args in function - pointer cast. - - * builtins.c (stabilize_va_list): Add static prototype. - (expand_builtin_va_arg): Constify a char*. - - * c-lex.c (getch, put_back, extend_token_buffer_to, - read_line_number, token_getch, token_put_back): Add static - prototypes. - - * c-parse.gperf (hash, is_reserved_word): Likewise. - - * cccp.c (is_dir_separator): Likewise. - -Sat Oct 2 16:07:56 1999 Kaveh R. Ghazi - - * graph.h: New file to prototype functions exported by graph.c. - - * Makefile.in (graph.o, toplev.o): Depend on graph.h. - - * graph.c: Include graph.h. - - * toplev.c: Likewise. Remove redundant prototypes. - -Sat Oct 2 11:28:33 1999 Krister Walfridsson - - * invoke.texi: Removed duplicated description for -Q. - -Sat Oct 2 11:16:00 1999 Jim Kingdon - - * extend.texi: Grammar fix in __extension__ text. - -Sat Oct 2 11:06:31 1999 Richard Henderson - - * md.texi (define_peephole2): New section. - -Sat Oct 2 10:57:56 1999 Jan Hubicka - - * i386.md (mov?i patterns): Fix handling of TARGET_USE_MOV0 - (mov $-1 to or peepholer): Enable for pentium when optimizing for - speed. - -Sat Oct 2 10:55:25 1999 Jan Hubicka - - * builtins.c (expand_builtin_strlen): Fix best mode searching loop. - -Sat Oct 2 10:53:22 1999 Jan Hubicka - - * i386.md (ffs expander): Emit Pentium friendly code for - TARGET_PENTIUM. - -Sat Oct 2 02:48:21 1999 Mark P. Mitchell - - * tree.c (build): Don't look at TREE_SIDE_EFFECTS or TREE_RAISES - for non-trees. - (build1): Likewise. - -Fri Oct 1 18:01:11 1999 Bernd Schmidt - - * i386elf.h (TARGET_DEFAULT): Use symbolic constants. - -Fri Oct 1 12:42:53 1999 Andreas Schwab - - * config/m68k/m68k.c (use_return_insn): Return false if the pic - register is in use. - -Fri Oct 1 10:56:06 1999 Bernd Schmidt - - * md.texi (No Constraints): Delete section. - * Makefile.in (genattrtab.o): Don't depend on "insn-config.h". - * final.c (final_scan_insn): We always have register constraints. - * genattrtab.c: Don't include "insn-config.h". - (write_attr_case): We always have register constraints. - * genconfig.c (register_constraint_flag): Delete. - (walk_insn_part): Don't check whether we have register constraints. - (main): Don't write out "#define REGISTER_CONSTRAINTS". - * genoutput.c (have_constraints): Delete. - (main): Don't set it. - (output_operand_data): We always have constraints. - (scan_operands): Likewise. - (compare_operands): Likewise. - * local-alloc.c (block_alloc): We always have constraints. - (requires_inout): Always compile this function. - * recog.c (extract_insn): We always have constraints. - (constrain_operands, reg_fits_class_p): Always compile these - functions. - * recog.h (struct recog_data): Delete non-REGISTER_CONSTRAINTS - fields. - (struct insn_operand_data): Likewise. - * regclass.c (regclass): We always have constraints. - (record_reg_classes, copy_cost, record_address_regs, - auto_inc_dec_reg_p): Always compile these functions. - * regmove.c (regmove_optimize): We always have constraints. - * reload.c (find_reloads): Likewise. - * reload1.c (reload): Likewise. - (reload_cse_simplify_operands): Likewise. - * i860.c (output_delay_insn): Likewise. - -Thu Sep 30 23:04:41 1999 Mark P. Mitchell - - * iris6.h (BUILD_VA_LIST_TYPE): Define. - -Thu Sep 30 18:44:50 1999 Franz Sirl - - * rs6000.c (rs6000_build_va_list): Create a TYPE_DECL node - for the va_list record. - -Thu Sep 30 18:34:54 1999 Jan Hubicka - - * i386.c (ix86_adjust_cost): Ignore false ebp dependencies in - prologues. - -Thu Sep 30 18:31:36 1999 Jan Hubicka - - * alias.c: Include insn-flags.h. - * Makefile.in (alias.o): Update. - -Thu Sep 30 18:21:30 1999 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Convert LEU and GTU comparisons - to LTU and GEU. Handle more cases using sbb. - -Thu Sep 30 18:18:39 1999 Jan Hubicka - - * i386.md (truncatexfdf splitters): Do not use subreg. - (fop XFmode patterns): Fix mode in operand testing. - -Thu Sep 30 18:04:13 1999 Richard Henderson - - * jump.c (jump_optimize_1): Amend last change to test only the - form of the operand, not the insn. - - * jump.c (jump_optimize_1) [conditional_move]: Use general_operand - not register_operand to determine when B may need preloading. - -Thu Sep 30 17:39:16 1999 Richard Henderson - - * alpha.md (*): Use nonimmediate not general_operand for SET_DEST. - (ffsdi2, extxl, insxh, mskxh): Add missing DImode to SET_SRC. - (call-value patterns): Move to end of file. - (*): Remove mode from label_ref in (pc) context. - (movstrqi): Use memory not general_operand for BLKmode operands. - (prologue_stack_probe_loop, builtin_longjmp): Add missing mode - to register_operand operands. - (peep2 patterns): Convert from commented-out peephole patterns. - -Thu Sep 30 14:39:17 1999 Bernd Schmidt - - * tree.h (enum built_in_function): Rename BUILT_IN_DWARF_REG_SIZE - to BUILT_IN_INIT_DWARF_REG_SIZES. - * builtins.c (expand_builtins, case BUILT_IN_INIT_DWARF_REG_SIZES): - Renamed from BUILT_IN_DWARF_REG_SIZE; call - expand_builtin_init_dwarf_reg_sizes. - * c-decl.c (init_decl_processing): Replace __builtin_dwarf_reg_size - with __builtin_init_dwarf_reg_size_table. - * dwarf2out.c (struct reg_size_range): Delete. - (expand_builtin_init_dwarf_reg_sizes): New function. - (expand_builtin_dwarf_reg_size): Delete. - * except.h (expand_builtin_init_dwarf_reg_sizes): Declare. - (expand_builtin_dwarf_reg_size): Don't declare. - * libgcc2.c (dwarf_reg_size_table_initialized): New. - (dwarf_reg_size_table): New. - (init_reg_size_table): New function. - (copy_reg): Use dwarf_reg_size_table. - (eh_context_initialize): Make sure dwarf_reg_size_table is initialized - before use. - -Thu Sep 30 05:40:34 1999 Richard Earnshaw - - * c-lang.c (finish_file case ndef ASM_OUTPUT_{CON,DE}STRUCTOR): - Correctly build argument list to constructor and destructor functions. - -Thu Sep 30 00:13:27 1999 Dirk Zoller - - * c-tree.h (warn_float_equal): Declare. - * c-decl.c (warn_float_equal): Define. - (c_decode_option): Recognize -W[no-]float-equal. - * c-typeck.c (build_binary_op): Conditionally warn - about equality tests of floating point types. - * toplev.c (documented_lan_options): Add -W[no-]float-equal. - * invoke.texi: Add docs for -Wfloat-equal warning. - -Wed Sep 29 23:43:39 1999 Jeffrey A Law (law@cygnus.com) - - * h8300.h (INIT_TARGET_OPTABS): Use init_one_optab instead of - generating RTL directly. - * mips.h (INIT_TARGET_OPTABS): Likewise. - * mn10200.h (INIT_TARGET_OPTABS): Likewise. - - * expr.h (init_mov_optab): Delete declaration - - * h8300.c (WORD_REG_USED): Update to avoid useless register - saves in interrupt functions and functions which never return. - - * cse.c (struct set): Delete inner_dest_loc field. - (cse_insn): Remove assignments to inner_dest_loc field. - -Wed Sep 29 16:06:20 1999 Richard Henderson - - * ggc-page.c: Don't include etc taken care of - by "system.h". Include afterward. - -Wed Sep 29 16:05:18 1999 Richard Henderson - - * rs6000.c (rs6000_encode_section_info): If ggc_p, use - ggc_alloc_string. - -Tue Sep 28 16:45:40 1999 David Edelsohn - - * xcoffout.c (xcoffout_declare_function): Add documentation. - * rs6000.c (num_insns_constant_wide): Use TARGET_POWERPC64 not - TARGET_64BIT. Compare constant to -1, not bit pattern. - (easy_fp_constant): Use TARGET_POWERPC64 not TARGET_64BIT. - (expand_block_move): Allow 8 DImode loads for PowerPC64. Fix - gen_movsi typos. - -Tue Sep 28 16:43:14 1999 Nick Clifton - - * dwarf2out.c (add_abstract_origin_attribute): Abort if - origin_die is NULL. - (gen_inlined_enumeration_type_die): Do not abort if the type has - not been writeen out. - (gen_inlined_structure_type_die): Do not abort if the type has - not been writeen out. - (gen_inlined_union_type_die): Do not abort if the type has - not been writeen out. - (gen_tagged_type_instantiation_die): Do not abort if the type - has not been written out. - -Tue Sep 28 14:33:47 1999 Bernd Schmidt - - * c-decl.c (init_decl_processing): If MD_INIT_BUILTINS is defined, - call it. - * reg-stack.c (straighten_stack): Copy hard reg set with - COPY_HARD_REG_SET. - -Tue Sep 28 01:11:05 1999 Richard Henderson - - * builtins.c (stabilize_va_list): Stabilize array type va_list - to a pointer type, not the base record type. - (expand_builtin_va_copy): Dereference the pointers explicitly; - use the correct size for the copy. - - * rs6000.c (rs6000_va_start): Dereference valist to get to the record. - (rs6000_va_arg): Likewise. - -Mon Sep 27 23:27:21 1999 Richard Henderson - - * rtl.h (struct rtx_def): Move gc_mark to align mode field. - -Mon Sep 27 23:20:29 1999 Mark Mitchell - - * tree.h (struct tree_decl): Use `bclass', not `class', in name of - field. - (DECL_BUILT_IN_CLASS): Adjust accordingly. - -Mon Sep 27 23:03:16 1999 Richard Henderson - - * ggc-page.c (GGC_MIN_LAST_ALLOCATED): New. - (init_ggc): Use it instead of a constant. - (ggc_collect): Bound allocated_last_gc by it. - -Mon Sep 27 19:06:04 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/fixinc.irix (stdio.h): Hack stdio.h to avoid problems - with va_list. - -Mon Sep 27 19:40:17 CEST 1999 Marc Espie - - * configure.in (mips*el-*-openbsd*): Don't duplicate default settings. - (mips*-*-openbsd*): Let big endian configuration be a fragment. - * configure: Regen. - * config/mips/openbsd.h: New, OpenBSD little endian target. - * config/mips/openbsd-be.h: New, OpenBSD big endian target fragment. - * config/mips/xm-openbsd.h: New, OpenBSD host. - -Mon Sep 27 10:28:48 1999 Andreas Schwab - - * config/m68k/m68k.c (output_function_prologue, - output_function_epilogue): Use - current_function_uses_pic_offset_table instead of regs_ever_live - to decide whether to save/restore pic register. - (legitimize_pic_address): Don't modify regs_ever_live any more. - -Sun Sep 26 10:55:36 1999 Mark Mitchell - - * function.h (struct function): Add x_dont_save_pending_sizes_p. - * stor-layout.c (variable_size): Don't add sizes to the pending - sizes list if x_dont_save_pending_sizes_p is set. - -Sun Sep 26 16:36:52 1999 Robert Lipe (robertlipe@usa.net) - - * config/i386/dgux.h (SELECT_RTX_SECTION): Provide dummy argument - for symbolic_operand(). - * config/i386/sco5.h (SELECT_RTX_SECTION): Likewise. - -Sun Sep 26 07:37:11 1999 Kaveh R. Ghazi - - * combine.c (gen_rtx_combine): Add missing call to va_end(). - - * final.c (asm_fprintf): Likewise. - - * genattrtab.c (attr_rtx): Likewise. - -Sat Sep 25 13:11:07 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c: Update comments. - (cse_insn): When converting a conditional/computed jump into - an unconditional jump, always make sure a BARRIER immediately - follows the converted jump. Do not delete unreachable code. - (cse_basic_block): Do not delete unreachable code. - * toplev.c (rest_of_compilation): Move call to - delete_trivially_dead_insns after the conditional call to - jump_optimize. - -Sat Sep 25 09:03:17 1999 Kaveh R. Ghazi - - * collect2.c (make_temp_file): Don't prototype. - - * gcc.c (make_temp_file): Likewise. - - * mips.c (mips_make_temp_file): Renamed from `make_temp_file'. - -Sat Sep 25 13:42:15 1999 Nick Clifton - - * varasm.c (asm_emit_uninitialised): New function: Generate - the assembler statements necessary to declare an uninitialized - variable. - (ASM_EMIT_LOCAL): New macro: Emit a local, uninitialized - variable. - (ASM_EMIT_BSS): New macro: Emit an entry in the bss section. - (ASM_EMIT_COMMON): New macro: Emit an entry in the common - section. - (assemble_variable): Use asm_emit_uninitialised to emit an - uninitialized variable. - -Fri Sep 24 17:10:56 1999 Nick Clifton - - * combine.c (simplify_comparison): Cope with downshifting a 32 bit - constant on a 64 bit host. Patch supplied by Geoffrey Keating - . - -Fri Sep 24 10:48:10 1999 Bernd Schmidt - - * builtins.c (expand_builtin): Use MD_EXPAND_BUILTIN if defined. - * c-common.h (builtin_function): Don't declare. - - * c-decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than - DECL_BUILT_IN. - (pushdecl): Likewise. - (finish_decl): Likewise. - (builtin_function): New arg CLASS. Arg FUNCTION_CODE now of type - int. All callers changed. - Set the builtin's DECL_BUILT_IN_CLASS. - * tree.h (enum built_in_class): New. - (enum built_in_function): Delete NOT_BUILT_IN. - (DECL_FUNCTION_CODE): The corresponding field in tree_decl is now - in a union. - (DECL_SET_FUNCTION_CODE): Likewise. - (DECL_BUILT_IN_CLASS): New macro. - (DECL_BUILT_IN): Use DECL_BUILT_IN_CLASS. - (struct tree_decl): Split builtin function code field into a - struct. - (builtin_function): Declare. - -Fri Sep 24 01:45:05 1999 Mark Mitchell - - * optabs.c (init_traps): Fix typo in last change. - -Fri Sep 24 01:10:11 1999 Mark Mitchell - - * toplev.c (rest_of_decl_compilation): Update comment. - -Fri Sep 24 11:57:06 1999 Geoffrey Keating - - * config/mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Put the symbol - in .sbss if appropriate. - (EXTRA_SECTION_FUNCTIONS): Add sbss. - (SBSS_SECTION_ASM_OP): New macro. - * config/mips/linux.h (EXTRA_SECTION_FUNCTIONS): Add sbss. - (EXTRA_SECTIONS): Add in_sbss. - * config/mips/mips.h: Prototype sbss_section. - -Thu Sep 23 18:18:55 1999 Mark Mitchell - - * stmt.c (expand_start_bindings): Don't allow cleanup instructions - to disappear. - -Thu Sep 23 18:07:01 1999 Mark Mitchell - - * optabs.c (init_traps): Register trap_rtx as a GC root. - -Thu Sep 23 17:41:47 1999 Alexandre Oliva - - * config/mips/mips.c (function_arg_pass_by_reference): Define - unconditionally, since it's called unconditionally. - -Thu Sep 23 13:40:02 1999 Jason Merrill - - * toplev.c (documented_lang_options): Add -fshort-wchar. - * c-decl.c (c_decode_option): Likewise. - (init_decl_processing): If -fshort-wchar, use 'short unsigned int' - for wchar_t. - * c-common.c, c-lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node. - * gcc.c (default_compilers): If -fshort-wchar, - override __WCHAR_TYPE__. - * tm.texi (C Dialect Options): Add -fshort-wchar. - - * dwarf2out.c (output_aranges): Use DW_AT_location to find the - symbol for a variable. - - * cpplib.h (CPP_PREPROCESSED): New macro. - * cpplib.c (handle_directive): Don't complain about `# NUMBER' if - we're seeing this input for a second time. - -Thu Sep 23 12:54:49 1999 Alex Samuel - - * emit-rtl.c (init_emit_once): Initialize modes first. - -Sun Sep 19 01:23:23 1999 Alex Samuel - - * config/i386/i386.c (pic_label_name): Change to char pointer. - (global_offset_table): New variable. - (load_pic_register): Fill global_offset_table if it hasn't - already been done. Allocate pic_label_name dynamically. - * ggc.h (empty_string): New variable. - * ggc-simple.c (empty_string): Likewise. - (init_ggc): Allocate empty_string and add as root. - * stmt.c (digit_strings): New variable. - (init_stmt): Add last_block_end_note as root. Allocate and - initialize digit_strings. - (expand_asm_operands): Use empty_string instead of string - constant. Use digit_strings instead of string constants. - * profile.c (init_arc_profiler): Allocate string with - ggc_alloc_string instead of xmalloc. - (output_func_start_profiler): Likewise. - * c-typeck.c (digest_init): Check if init is error_mark_node. - -Thu Sep 23 12:59:14 1999 Alex Samuel - Richard Henderson - - * ggc-page.c: New file. - * Makefile.in (ggc-page.o): New. - -Thu Sep 23 13:55:21 1999 Jeffrey A Law (law@cygnus.com) - - * invoke.texi: Document -fdelete-null-pointer-checks - * toplev.c (flag_delete_null_pointer_checks): New. - (f_options): Add entry for -fdelete-null-pointer-checks. - (rest_of_compilation): Conditionalize null pointer check - elimination on flag_delete_null_pointer_checks. - (main): If -O2 or greater, enable -fdelete-null-pointer-checks - -1999-09-23 10:56 -0700 Zack Weinberg - - * iso646.h, stdarg.h, stdbool.h, stddef.h, varargs.h: Add - copyright notice and special exception to GPL. - -Thu Sep 23 13:40:23 1999 Kaveh R. Ghazi - - * abi64.h (mips_function_value): Add prototype arguments. - - * mips-protos.h: New file with mips prototypes. - - * mips.c: Include "tm_p.h". - (mktemp, lookup_name): Add prototype arguments. - (extern_list, string_constant, mips_fill_delay_slot, - mips_output_external, mips_output_external_libcall, - mips_output_filename, mips_declare_object, function_prologue, - mips_expand_prologue, function_epilogue, mips16_constant, - build_mips16_function_stub, mips_output_conditional_branch): - Constify a char*. - (mips_va_start): Remove unused variable `u'. - (mips_va_arg): Cast value to unsigned when comparing against one. - (trace): Delete. - (save_restore_insns, mips_expand_prologue): Add missing arg in - call to `large_int'. - - * mips.h: Move prototypes to mips-protos.h. - (data_section, memory_address_p, rdata_section, - readonly_data_section, simple_epilogue_p, text_section): Delete - prototypes delcared elsewhere. - (mips_epilogue_delay_slots, print_options): Delete unused decls. - (trace): Delete. - (GO_PRINTF, GO_PRINTF2): Call fprintf, not trace. - - * mips.md: Delete extra args in call to `mips_move_2words'. - - * xm-iris6.h (alloca): Add prototype argument. - - * genpeep.c: Include "tm_p.h" in generated output file. - -Thu Sep 23 10:36:55 EDT 1999 Andrew MacLeod - - * basic-block.h (find_edge_index): Change parameters. - * flow.c (verify_edge_list): Pass basic_block parameters to - find_edge_index instead of integers. - -Thu Sep 23 15:54:12 1999 Nick Clifton - - * combine.c (simplify_comparison): Use an unsigned shift to adjust - the constant. - -Thu Sep 23 08:46:21 1999 Guy Harris - - * gcc.1: Fix a formatting error. - -Wed Sep 22 16:10:21 1999 Martin v. Löwis - - * install.texi (Configurations): Remove pyramid. Add fr30, i686, - i786, mn10200, mn10300, pdp11, v850. - -Thu Sep 23 07:37:13 1999 Dan Nicolaescu - - * libgcc2.c (num_digits): Add prototype with - __attribute__((const)). - (__terminate): Add prototype. - -Thu Sep 23 05:32:06 1999 Richard Henderson - - * builtins.c, dbxout.c, varasm.c: Include tm_p.h. - - * alpha/alpha.c (print_operand): Fix type of `code'. - (alpha_output_filename): Constify. - * alpha/alpha.h: Move all function declarations ... - * alpha/alpha-protos.h: ... here. New file. - * alpha/elf.h (CONST_SECTION_FUNCTION): Prototype the function. - (SECTION_FUNCTION_TEMPLATE): Likewise. - -Thu Sep 23 11:15:36 1999 Bernd Schmidt - - * expmed.c (do_cmp_and_jump): Pass ccp_jump to can_compare_p. - * expr.c (expand_expr): Likewise. - (do_jump): Likewise. - (do_store_flag): Pass ccp_store_flag to can_compare_p. - * expr.h (enum optab_index): Add cbranch, cmov, cstore optabs and - accessor macros. - (enum can_compare_purpose): New. - (can_compare_p): Adjust prototype. - (prepare_cmp_insn, prepare_operand): Declare. - * genopinit.c (optabs): Add cbranch_optab, cmov_optab, cstore_optab. - * optabs.c (cmp_available_p): Deleted. - (expand_abs): Pass ccp_jump to can_compare_p. - (can_compare_p): New arg PURPOSE. Check for combined optabs. - (prepare_cmp_insn): No longer static. Add arg PURPOSE. - Call can_compare_p rather than cmp_available_p. - (prepare_operand): No longer static. - (emit_cmp_and_jump_insn): Check for and use cbranch patterns. - (emit_cmp_and_jump_insns): Pass ccp_jump to prepare_cmp_insn. - (expand_float): Fix a slightly broken emit_cmp_insn/emit_jump_insn - sequence to use emit_cmp_and_jump_insns. - (init_optabs): Initialize cbranch_optab, cmov_optab, cstore_optab. - -Wed Sep 22 17:58:01 1999 Stan Cox - - * mips.h (GO_IF_LEGITIMATE_ADDRESS): Don't accept large - register offsets; let LEGITIMIZE_ADDRESS load it into a register. - (LEGITIMIZE_ADDRESS): Use plus_constant to avoid - (plus (reg) (const_int 0)) - * mips.md (call_internal3c): New pattern for -mips16 -mlong-calls. - -Wed Sep 22 17:55:31 1999 David Edelsohn - - * rs6000.c (expand_block_move): DImode loads and stores require - word-aligned displacements. Increment address registers with - adddi3 on 64-bit platform. Use TARGET_POWERPC64 not TARGET_64BIT. - -Wed Sep 22 17:35:55 1999 Michael Meissner - - * dwarf2out.c (base_type_die): Use the name __unknown__ if there - is no name for the base type, rather than segfault. If we are - writing out a complex integer type, use DW_ATE_lo_user. - - * expr.c (emit_move_insn_1): If we are copying a complex that fits - in one word or less (complex char, complex short, or on 64 bit - systems complex float) to/from a hard register, copy it through - memory instead of dying in gen_{real,imag}part. If we have a - short complex type, prevent inlining since it allocates stack - memory. - - * tree.c (build_complex_type): If we are writing dwarf2 output, - generate a name for complex integer types. - -Wed Sep 22 11:34:08 EDT 1999 Andrew MacLeod - - * basic-block.h (add_noreturn_fake_exit_edges): Use correct name. - * flow.c (remove_edge): Remove extra whitespace. - (remove_fake_edges): Fix comment. - (add_noreturn_fake_exit_edges): Use the correct name. - -Wed Sep 22 16:12:40 BST 1999 Nathan Sidwell - - * Makefile.in (INTL_MOSTLYCLEAN, INTL_CLEAN): New variables. - (mostlyclean): Depend on INTL_MOSTLYCLEAN. - (clean): Depend on INTL_CLEAN. - (maintainer-clean): Adjust. - -Wed Sep 22 10:18:56 1999 Kaveh R. Ghazi - - * configure.in (AC_PREREQ): Bump to 2.13. - (AC_C_STRINGIZE): Call this instead of using a custom macro. - - * gansidecl.h (HAVE_STRINGIZE): Define, if stage2 gcc && __STDC__. - - * system.h (HAVE_STRINGIZE): Test this instead of HAVE_CPP_STRINGIFY. - - * acconfig.h (HAVE_CPP_STRINGIFY): Delete. - - * alpha/xm-vms.h (HAVE_CPP_STRINGIFY): Delete. - (HAVE_STRINGIZE): Define. - -Wed Sep 22 06:25:15 1999 Jim Kingdon - - * c-parse.in: save and restore warn_pointer_arith on __extension__ - along with pedantic. - (SAVE_WARN_FLAGS, RESTORE_WARN_FLAGS): Added. - Set the type of extension to itype rather than $1 kludge. - * extend.texi (Alternate Keywords): Adjust documentation. - * c-parse.c, c-parse.y, objc-parse.c, objc-parse.y: Rebuilt. - -Wed Sep 22 06:06:57 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c, pa.h, pa.md: Support multiple assembler dialects in - most assembler templates. - - * pa.c (hppa_legitimize_address): Handle full offsets for PA2.0 - FP loads and stores. - (following_call): Always return zero for the PA8000. - * pa.h (GO_IF_LEGITIMATE_ADDRESS): Handle full offsets for PA2.0 - FP loads and stores. - (LEGITIMIZE_RELOAD_ADDRESS): Similarly. - - * pa.h (BRANCH_COST): Define. - - * pa.md (return, return_internal): Use bve for PA2.0. - - * pa.md (fused multiply): Add variants which reduce height for the - fused multiply, but which still generate 2 insns. - (fnegabs): Similarly. - - * pa.md (subsi3): Turn into an expander. Create two anonymous - patterns. One for PA2.0 one for PA1.x. Use mtsarcm for PA2.0. - * pa.h (EXTRA_CONSTRAINT): Handle 'S'. - - * pa.md (floatunssisf2, floatunssidf2): Generate different RTL - for TARGET_PA_20. - (floatunssidf2_pa20, floatunssisf2_pa20): New patterns for PA2.0 - code generation. - (floatunsdisf2, floatunsdidf2, fixuns_truncsfsi2): Likewise. - (fixuns_truncdfsi2, fixuns_truncsfdi2, fixuns_truncdfsi2): Likewise. - - * regclass.c (init_regs): Add "top_of_stack" as a garbage - collection root. - - * flow.c (record_active_eh_regions): Terminate loop after finding - the last insn in the last basic block. - -Wed Sep 22 20:25:00 1999 Michael Hayes - - * config/c4x/c4x.md: Delete parallel instruction peepholes. - -Wed Sep 22 19:59:19 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_add_gc_roots): Add tree roots. - -Wed Sep 22 19:56:25 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_process_after_reload): Rework machdep insn - splitting to not use output template. - -Wed Sep 22 19:50:12 1999 Michael Hayes - - * config/c4x/c4x.h (EXPAND_BUILTIN_VA_START): Call c4x_va_start. - * config/c4x/c4x.c (c4x_va_start): New function. - -Tue Sep 21 18:40:01 1999 Jan Hubicka - - * genrecog.c (not_both_true): Handle correctly cases when called for - tests with different positions in the insn. - -Tue Sep 21 18:29:11 1999 Kaveh R. Ghazi - - * machmode.h (HOST_PTR_PRINTF): Move from here ... - - * system.h (HOST_PTR_PRINTF): ... to here. - - * mips-tfile.c: Don't include machmode.h. - - * Makefile.in (MACHMODE_H): New variable. Update to use it. - (mips-tfile.o): Don't depend on machmode.h. - -Tue Sep 21 18:27:34 1999 Kaveh R. Ghazi - - * haifa-sched.c (sched_analyze): Rename local variable `region' to - avoid conflicts with typedef struct `region' at the top level scope. - -Tue Sep 21 14:14:50 1999 Richard Henderson - - * basic-block.h (basic_block): Add eh_beg, eh_end. - * flow.c (entry_exit_blocks): Update. - (find_basic_blocks): Don't allocate bb_eh_end, or pass it around. - Call new functions. - (find_basic_blocks_1): Don't record eh_list at each bb. Use - lists.c functions to allocate insn lists. - (make_edges): Use eh_beg+eh_end, not the lists. Split out EH - edge creation ... - (make_eh_edge): ... here. New. - (move_stray_eh_region_notes): New. - (record_active_eh_regions): New. - (delete_unreachable_blocks): Split out block merging ... - (try_merge_blocks): ... here. New. - (merge_blocks_move_predecessor_nojumps): Remove edge arg. - Dump debugging data. - (merge_blocks_move_successor_nojumps): Likewise. - (merge_blocks): Use eh_beg+eh_end to validate block movement. - -Tue Sep 21 11:15:03 1999 Martin v. Löwis - - * extend.texi (Bound member functions): Document unbound pmf - conversion. - -Tue Sep 21 14:55:11 EDT 1999 Andrew MacLeod - - * flow.c (split_edge): Handle insertion on a fallthrough edge which - has the EXIT_BLOCK as a dest. - -Tue Sep 21 14:51:23 EDT 1999 Andrew MacLeod - - * flow.c (remove_edge): New function to remove an edge from the - flow graph. - (remove_fake_successors): New function to remove fake successor edges. - (remove_fake_edges): New function to remove all fake edges from the - flow graph. - (add_fake_exit_edges): New function to add fake edges from all blocks - with no successors to the exit block. - * basic-block.h (remove_fake_edges, add_fake_exit_edges): Add - prototypes for new functions. - -Tue Sep 21 14:49:53 EDT 1999 Andrew MacLeod - - * config/mips/elf64.h (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): - Use Pmode to determine whether to output .dword or .word. - -Tue Sep 21 11:04:34 1999 Alex Samuel - - * tree.c (built_in_filename): New variable. - (BUILT_IN_FILENAME): New macro. - (init_tree_codes): Allocate built_in_filename. - (make_node): Use built_in_filename instead of string constant. - -Tue Sep 21 14:13:27 1999 Nick Clifton - - * configure.in: Add fr30 target. - * configure: Regenerate. - * config/fr30: New directory. - * config/fr30/crti.asm: New file. - * config/fr30/fr30.c: New file. - * config/fr30/crtn.asm: New file. - * config/fr30/fr30.h: New file. - * config/fr30/fr30.md: New file. - * config/fr30/lib1funcs.asm: New file. - * config/fr30/t-fr30: New file. - * config/fr30/xm-fr30.h: New file. - -Tue Sep 21 06:45:31 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (merge_blocks_move_successor_nojumps): Delete the - BARRIER at the end of the successor, not the BARRIER before - the successor. - - * pa.c (pa_add_gc_roots): Fix thinko in last change. - -Tue Sep 21 05:29:17 1999 Richard Earnshaw (rearnsha@arm.com) - - * stmt.c (any_pending_cleanups): Don't crash when - current_function->stmt is unset. - -Tue Sep 21 00:59:49 1999 Alexandre Oliva - - * emit-rtl.c (init_emit_once): Initialize const_int_rtx before - other initializations that may use it for relative offsets. - -Mon Sep 20 21:43:25 1999 Alexandre Oliva - - * config/i386/sol2.h (PREFERRED_DEBUGGING_TYPE): Use stabs. - (ASM_SPEC): Moved from sol2dbg.h. Added work-around for gas. - * config/i386/sol2dbg.h: Removed. - * config/i386/sol2gas.h: New file, to enable gas work-around. - * configure.in: Use i386/sol2gas.h on Solaris/x86 --with-gas. - Don't use sol2dbg.h. - * configure: Rebuilt. - -Mon Sep 20 13:29:41 1999 Mark Mitchell - - * invoke.texi (-fthis-is-variable): Remove documentation. - -Mon Sep 20 12:59:16 1999 Richard Henderson - - * basic-block.h (compute_bb_for_insn): Declare. - * flow.c (compute_bb_for_insn): Export. Don't accept the varray - to use; set size of basic_block_for_insn directly. - (find_basic_blocks): Update. - -Mon Sep 20 15:11:54 1999 Kaveh R. Ghazi - - * flow.c (verify_flow_info): Fix typo, "abort;" -> "abort ();". - -Mon Sep 20 14:56:34 1999 Kaveh R. Ghazi - - * crtstuff.c (ON_EXIT): Delete empty macro definition. - (__do_global_ctors_aux): Call atexit(), not ON_EXIT(). - -Mon Sep 20 15:25:35 1999 Nick Clifton - - * c-decl.c (c_decode_option): Extend comment. - -Mon Sep 20 14:43:37 1999 Nick Clifton - - * toplev.c (progname): Make 'const char *' - (flag_print_mem): Move out of main. - (version_flag): Move out of main. - (filename): Move out of main. - (debug_args): Remove g prefix from options. - (documented_lang_options): Remove cpplib specific options. - (display_help): Add g prefix to debug options. - (check_lang_option): Delete this function. - (decode_d_option): New function: Decode -d... option. - (decode_f_option): New function: Decode -f... option. - (decode_W_option): New function: Decode -W... option. - (decode_g_option): New function: Decode -g... option. - (independent_decode_option): New function: Decode a language - independent command line option. - (main): Invoke lang_decode_option and then - independent_decode_option on each command line option in - turn. - -Mon Sep 20 05:41:36 1999 Jeffrey A Law (law@cygnus.com) - - Revert this change. Gavin's patch to operand_equal_p is a better fix. - * fold-const.c (fold_range_test): Do not try to fold the range - test if the rhs or lhs has side effects. - - * basic-block.h (compute_flow_dominators): Declare. - - * gcse.c (alloc_code_hoist_mem): New function. - (free_code_hoist_mem, compute_code_hoist_vbeinout): Likewise. - (compute_code_hoist_data, hoist_expr_reaches_here_p): Likewise. - (hoist_code, one_code_hoisting_pass): Likewise. - (gcse_main): If optimizing for size, then hoist expressions - computed in multiple dominated basic blocks. - - * gcse.c (invalid_nonnull_info): New function. - (delete_null_pointer_checks): Likewise. - * rtl.h (delete_null_pointer_checks): Declare. - * toplev.c (rest_of_compilation): Call delete_null_pointer_checks. - - * flow.c (merge_blocks_move_predecessor_nojumps): New function. - (merge-blocks_move_successor_nojumps): Likewise. - (merge_blocks): Allow merging of some blocks, even if it requires - physical movement of the blocks, but not if it requires new jumps. - - * bitmap.c (debug_bitmap_file): Renmaed from bitmap_debug_file. - Callers and prototype changed. - * bitmap.h: Fix debug_bitmap and debug_bitmap_file prototypes. - -Mon Sep 20 06:56:32 1999 Alexandre Oliva - - * config/sparc/sol2.h (LINK_SPEC): Avoid the duplication of - -YP when both -p and -pg are present. From i386/sol2.h. - -Mon Sep 20 10:49:05 1999 Bernd Schmidt - - * Makefile.in (distclean): Delete tm_p.h. - * configure.in: Create a new file, "tm_p.h", from a list in - "tm_p_file". For ix86 systems, set up "tm_p_file" to include - "i386/i386-protos.h". - - * alias.c: Include "tm_p.h". - * c-typeck.c: Likewise. - * calls.c: Likewise. - * cse.c: Likewise. - * emit-rtl.c: Likewise. - * explow.c: Likewise. - * expmed.c: Likewise. - * expr.c: Likewise. - * final.c: Likewise. - * flow.c: Likewise. - * fold-const.c: Likewise. - * function.c: Likewise. - * gcse.c: Likewise. - * global.c: Likewise. - * haifa-sched.c: Likewise. - * integrate.c: Likewise. - * jump.c: Likewise. - * local-alloc.c: Likewise. - * loop.c: Likewise. - * optabs.c: Likewise. - * recog.c: Likewise. - * reg-stack.c: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * reload.c: Likewise. - * reload1.c: Likewise. - * reorg.c: Likewise. - * resource.c: Likewise. - * stmt.c: Likewise. - * stor-layout.c: Likewise. - * toplev.c: Likewise. - * tree.c: Likewise. - * unroll.c: Likewise. - * genattrtab.c (main): Make generated file include "tm_p.h". - * genemit.c (main): Likewise. - * genoutput.c (main): Likewise. - * genrecog.c (main): Likewise. - - * i386.h: Delete all prototypes. - * i386.c: Include "tm_p.h". - (ix86_attr_length_default): Call constant_call_address_operand - with correct number of arguments. - * i386-protos.h: New file. - * i386.md (unnamed patterns): Call constant_call_address_operand - with correct number of arguments. - (exception_receiver): Call load_pic_register with correct number - of arguments. - -Sun Sep 19 14:18:39 1999 Richard Henderson - - * c-pragma.c (mark_align_stack): Dereference the void* properly. - -Sun Sep 19 09:03:40 1999 Mark Mitchell - - * rtl.h (insns_safe_to_move_p): New function. - * loop.c (find_and_verify_loops): Use it. - * rtlanal.c (insns_safe_to_move_p): Define it. - -Sun Sep 19 02:54:33 1999 Richard Henderson - - * c-pragma.c: Include ggc.h. - * Makefile.in (c-pragma.o): Update. - -Sat Sep 18 16:01:18 1999 Alexandre Oliva - - * config/i386/sol2.h (CPP_SPEC): Support -[p]threads - (LIB_SPEC): Likewise. - (LINK_SPEC): Do not assert -z text with -shared -mimpure-text. - Reindent -YP/-p/-pg. - Copied from config/sparc/sol2.h. - -Sat Sep 18 11:52:43 1999 Richard Henderson - - * c-pragma.c (mark_align_stack): New. - (init_pragma): New. - * c-pragma.h (init_pragma): Declare it. - * c-lex.c (init_parse): Call it. - -Sat Sep 18 15:20:38 1999 Alexandre Oliva - - * configure.in: Pick up thread library on Solaris/x86 just - like on Solaris/sparc. - * configure: Rebuilt. - -Sat Sep 18 11:15:58 1999 Alex Samuel - - * rtl.h (global_rtx_index): New enum. - (global_rtl): Change to array of rtx. - (pc_rtx, cc0_rtx): Redefine accordingly. - (cc0_rtx, stack_pointer_rtx, frame_pointer_rtx): Likewise. - (hard_frame_pointer_rtx, arg_pointer_rtx): Likewise. - (virtual_incoming_args_rtx, virtual_stack_vars_rtx): Likewise. - (virtual_outgoing_args_rtx, virtual_cfa): Likewise. - (const_int_rtx): Change to array of rtx. - (const0_rtx, const1_rtx, const2_rtx, constm1_rtx): Redefine - accordingly. - * emit-rtl.c (global_rtl): Change to array of rtx. - (const_int_rtx): Change to aray of rtx. - (gen_rtx_CONST_INT): Redefine accordingly. - (init_emit_once): Allocate and initialize global_rtl. Likewise - for const_int_rtx. Add both as GC roots. - * genattrtab.c (global_rtl): Update declaration. - -1999-09-17 Ulrich Drepper - - * Makefile (USER_H): Add iso646.h back. - -Sat Sep 18 01:07:21 1999 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (sched_analyze): Use free_INSN_LIST_list instead of - zapping the LOG_LINKS of sched_before_next_call. - - * pa.h (INSN_SETS_ARE_DELAYED): Delete. - * pa.c (insn_refs_are_delayed): Renamed from - insn_sets_and_refs_are_delayed. - -Fri Sep 17 15:19:01 1999 Mark Mitchell - - * functiion.h (struct function): Add x_whole_function_mode_p. - (retrofit_block): Declare. - * function.c (retrofit_block): New function. - (identify_blocks): Add assertions. Allow an incomplete set of - block notes if we're still generating code for the function. - * integrate.c: Include loop.h. - (expand_inline_function): Call find_loop_tree_blocks to map block - notes to blocks when in whole-function mode. Use retrofit_block - to insert new BLOCKs for the inlined function, rather than - insert_block. - * stmt.c (expand_fixup): Likewise. Don't use pushlevel/polevel. - * Makefile.in (integrate.o): Depend on loop.h. - -Fri Sep 17 15:11:20 1999 Mark Mitchell - - * tree.h (warn_about_unused_variables): Declare. - * stmt.c (warn_about_unused_variables): New function, split out - from ... - (expand_end_bindings): Here. - -Fri Sep 17 15:07:37 1999 Mark Mitchell - - * stmt.c (preserve_subexpressions_p): Don't crash when - current_function->stmt is unset. - -Fri Sep 17 15:03:16 1999 Mark Mitchell - - * stmt.c (expand_start_bindings): Allow callers to pass a flag - indicating that no NOTE_INSN_BLOCK_BEG note is required. - (expand_start_target_temps): Use it. - * except.c (expand_eh_region_start_for_decl): Likewise. - * expr.c (expand_expr): Likewise. - -Fri Sep 17 15:05:27 1999 Gavin Romig-Koch - - * fold-const.c (operand_equal_p): Pay attention to side effects. - -Fri Sep 17 11:14:17 1999 Jason Merrill - - * libgcc2.c (L_exit): Check for ON_EXIT, not HAVE_ON_EXIT. - * sparc/sunos4.h (HAVE_ON_EXIT): Remove. - - * tlink.c (scan_linker_output): Look for keywords before accepting - a mangled name in quotes. - -Thu Sep 16 16:47:08 1999 Richard Henderson - - * alpha/alpha-interix.h (DWARF2_UNWIND_INFO): Define to zero. - * alpha/osf2or3.h (DWARF2_UNWIND_INFO): Likewise. - -Thu Sep 16 16:35:41 1999 Richard Henderson - - * alpha.md: Revert Thu Nov 26 change that came in through the - last gcc2 merge: reinstate (plus (plus ...)) reload patterns. - Avoid earlyclobber when possible. - -Thu Sep 16 18:44:48 1999 Kaveh R. Ghazi - - * libgcc2.c (__do_global_ctors): Call atexit with one arg. - - * sparc/sunos4.h (on_exit): Wrap prototype parameters in PARAMS(). - Define HAVE_ON_EXIT. - -Thu Sep 16 18:06:35 1999 Kaveh R. Ghazi - - * system.h (CTYPE_CONV, TOUPPER, TOLOWER): New macros. Use - CTYPE_CONV in all ctype macros. - - * cccp.c (initialize_char_syntax): Use uppercase ctype macro - from system.h. - - * cexp.y (initialize_random_junk): Likewise. - - * c4x.c (c4x_interrupt_function_p, c4x_handle_pragma): Likewise. - - * i370.c (handle_pragma): Likewise. - - * i370.h (ASM_OUTPUT_LABELREF, ASM_OUTPUT_ASCII): Likewise. - - * v850.c (override_options): Likewise. - - * doprint.c (_doprnt): Likewise. - - * fixinc/fixincl.c (main, quoted_file_exists, extract_quoted_files): - Likewise. - - * fixinc/server.c (load_data): Likewise. - - * fold-const.c (real_hex_to_f): Likewise. - - * genattr.c (write_upcase, gen_attr): Likewise. - - * genattrtab.c (convert_const_symbol_ref, evaluate_eq_attr, - write_upcase): Likewise. - - * genemit.c (print_code): Likewise. - - * genopinit.c (gen_insn): Likewise. - - * genpeep.c (print_code): Likewise. - - * genrecog.c (print_code): Likewise. - - * optabs.c (init_libfuncs): Likewise. - -Thu Sep 16 14:03:32 1999 Mark Mitchell - - * haifa-sched.c (sched_analyze): Keep the list of notes organized - in pairs. - (reemit_notes): Likewise. - -Thu Sep 16 11:50:52 1999 Alex Samuel - - * ggc.h (ggc_root): Move to ggc-common.c. - (roots): Remove. - (ggc_mark_rtx, ggc_mark_tree): Change to macro. - (ggc_mark_rtvec, ggc_mark_tree_varray): Declare extern. - (ggc_mark_tree_hash_table, ggc_mark_string, ggc_mark): Likewise. - (ggc_mark_roots, ggc_mark_rtx_children, ggc_mark_tree_children): New. - * ggc-common.c (ggc_root): Move from ggc.h. - (roots): Declare, static. - (ggc_mark_rtx, ggc_mark_tree): Renamed to... - (ggc_mark_rtx_children, ggc_mark_tree_children): Don't check for - null or check/set mark bit. - (ggc_mark_roots): New. - * ggc-simple.c (ggc_collect): Call ggc_mark_roots. - -Thu Sep 16 11:37:32 1999 Richard Henderson - - * m32r.c: Include toplev.h. - (*): Add ATTRIBUTE_UNUSED as needed to arguments. - (gen_compare): Rename swap_p to must_swap to match uses. - Add default abort case. - (m32r_output_function_epilogue): Remove unused variables. - (m32r_print_operand): Use HOST_WIDE_INT_PRINT_HEX. - * m32r.h (PROTO, STDIO_PROTO): Rename XPROTO; unconditionally - define to empty parameter list. Update all uses. - (predicate decls): Use enum machine_mode not int. - * m32r.md (movsi): Call abort, not fatal_insn. - (zero_branch_insn, rev_zero_branch_insn): Add default abort case. - -1999-09-14 Andrew Haley - - * config/mips/mips.md (movsi_usw): if operand 1 is const_int 0, - use $0 instead of 0. - -Thu Sep 16 10:53:36 1999 Bernd Schmidt - - * reload1.c (order_regs_for_reload): Move hard_reg_n_uses - computation out of loop over hard regs. - -Wed Sep 15 21:37:06 1999 Mark Mitchell - - * function.c (identify_blocks): Don't shadow a variable in an - outer scope. - * integrate.c (integrate_decl_tree): Don't use pushlevel, - pushdecl, or poplevel to build up the new BLOCK tree. - (expand_inline_function): Likewise. - (integrate_parm_decls): Likewise. - -Wed Sep 15 21:20:38 1999 Mark Mitchell - - * c-typeck.c (qualify_type): Merge qualifiers from both types. - -1999-09-15 Brad Lucier - - * toplev.c: Allow -f[no-]math-errno to set (clear) flag_errno_math - * invoke.texi: Document this change. - -Wed Sep 15 17:56:00 1999 Richard Henderson - - * emit-rtl.c (free_emit_status): Don't check DECL_DEFER_OUTPUT. - Free the struct. - (mark_emit_status): Renamed from mark_emit_state. - * except.c (mark_eh_status): Renamed from mark_eh_state. - Check not null before marking. - (free_eh_status): New. - * expr.c (mark_expr_status, free_expr_status): New. - * function.c (free_machine_status): New. - (free_after_parsing): New. - (free_after_compilation): Move bits to free_after_parsing; call - free_eh_status, free_expr_status; zero the marked members of the - function state. - (prepare_function_start): No can_garbage_collect. - Call init_eh_for_function. - (expand_dummy_function_end): Free up current_function state. - (mark_function_status): Renamed from mark_function_state. - (mark_function_chain): No can_garbage_collect. Call mark_expr_status. - * function.h (struct function): No can_garbage_collect. - (free_machine_status, free_after_parsing): Declare. - (free_eh_status, free_expr_status): Declare. - * ggc.h (mark_expr_status): Declare. - * stmt.c (free_stmt_status): Free the struct. - (mark_stmt_status): Renamed from mark_stmt_state. - (init_stmt): Don't call init_eh. - (init_stmt_for_function): Don't call init_eh_for_function. - * toplev.c (compile_file): Call init_eh. - (rest_of_compilation): Free basic block info before ggc_collect. - Call free_after_parsing; conditionally call free_after_compilation. - * varasm.c (mark_varasm_status): Renamed from mark_varasm_state. - Check not null before marking. - (free_varasm_status): Don't check DECL_DEFER_OUTPUT. Free the struct. - -Wed Sep 15 17:53:16 1999 Richard Henderson - - * c-lex.c (yylex): Initialize warn. - -Wed Sep 15 18:35:38 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (emit_move_sequence): Properly set the mode of the scratch - register when performing secondary reloads for the SAR register. - -Wed Sep 15 15:51:52 1999 Mark Mitchell - - * rtl.h (NOTE_BLOCK_NUMBER): Replace with ... - (NOTE_BLOCK): New macro. - (NOTE_BLOCK_LIVE_RANGE_BLOCK): Remove. - * function.h (identify_blocks): Change prototype. - * function.c (identify_blocks): Simplify. - (reorder_blocks): Likewise. - * ggc-common.c (ggc_mark_rtx): Mark the BLOCK associated with a - NOTE_INSN_BLOCK_{BEG,END}. - * haifa-sched.c (sched_analyze): Don't put NOTE_BLOCK_NUMBER on - the list of saved notes if the note isn't a - NOTE_INSN_BLOCK_{BEG,END}. - (move_insn1): Use NOTE_EH_HANDLER in comment, rather than - NOTE_BLOCK_NUMBER. - (reemit_notes): Adjust recreation of notes to reflect new saved - note structure. - * print-rtl.c (print_rtx): Print the address of the BLOCK when - printing a block note. - * stmt.c (block_vector): Remove. - (find_loop_tree_blocks): Simplify. - (unroll_block_trees): Likewise. - * tree.h (reorder_block): Change prototype. - -Wed Sep 15 14:39:35 1999 Jason Merrill - - * gbl-ctors.h: Lose HAVE_ATEXIT. Don't define ON_EXIT. - * libgcc2.c: Lose obsolete defn of WEAK_ALIAS. - (__bb_init_func, __bb_init_prg): Use atexit instead of ON_EXIT. - (__do_global_dtors): Likewise. Don't mess with _exit_dummy_decl. - (atexit, exit): Simplify. - * tm.texi: Document NEED_ATEXIT and ON_EXIT. Remove HAVE_ATEXIT. - * config/lots: Remove defns of HAVE_ATEXIT. - -Wed Sep 15 10:25:12 1999 Mark Mitchell - - * calls.c (precompute_arguments): Fix typo in comment. - * expr.c (preexpand_calls): Don't preexpand the cleanup in a - TARGET_EXPR. - -Wed Sep 15 09:59:59 1999 Mark Mitchell - - * dsp16xx.c (override_options): Fix typos in GC root registration. - -Wed Sep 15 15:23:28 1999 Philip Blundell - - * config/arm/linux-elf.h (MAKE_DECL_ONE_ONLY): Copy definition - from config/svr4.h. - (UNIQUE_SECTION_P, UNIQUE_SECTION): Likewise. - (FUNCTION_PROFILER): Redefine appropriately for Linux. - (CC1_SPEC): Likewise. - -Wed Sep 15 10:09:48 1999 Kaveh R. Ghazi - - * genattr.c (main): Add extern prototype. Call return, not exit. - * genattrtab.c (main): Likewise. - * gencheck.c (main): Likewise. - * gencodes.c (main): Likewise. - * genconfig.c (main): Likewise. - * genemit.c (main): Likewise. - * genextract.c (main): Likewise. - * genflags.c (main): Likewise. - * gengenrtl.c (main): Likewise. - * genopinit.c (main): Likewise. - * genoutput.c (main): Likewise. - * genpeep.c (main): Likewise. - * genrecog.c (main): Likewise. - - * genattr.c (get_insn_name): Mark parameter with ATTRIBUTE_UNUSED. - * genattrtab.c (get_insn_name): Likewise. - * gencodes.c (get_insn_name): Likewise. - * genconfig.c (get_insn_name): Likewise. - * genemit.c (get_insn_name): Likewise. - * genextract.c (get_insn_name): Likewise. - * genflags.c (get_insn_name): Likewise. - * genopinit.c (get_insn_name): Likewise. - * genpeep.c (get_insn_name): Likewise. - - * gencheck.c (usage): Add static prototype. - * genextract.c (print_path): Constify a char*. - * genopinit.c (optabs): Likewise. - * genoutput.c (operand_data, data, output_predicate_decls, - compare_operands): Likewise. - * genrecog.c (write_tree): Add default case in switch. - -Wed Sep 15 09:59:16 1999 Kaveh R. Ghazi - - * rtl.h (get_insn_name, print_rtl_with_bb): Add prototypes. - - * print-rtl.c (get_insn_name): Remove prototype. - - * toplev.h (progname): Declare const. - - * toplev.c (init_decl_processing, init_obstacks, init_tree_codes, - init_regs, init_optabs, init_stmt, init_reg_sets, dump_flow_info, - dump_sched_info, dump_local_alloc, regset_release_memory, - print_rtl, print_rtl_with_bb, rest_of_decl_compilation, - error_with_file_and_line, error_with_decl, error_for_asm, error, - fatal, warning_with_file_and_line, warning_with_decl, warning, - pedwarn, pedwarn_with_decl, pedwarn_with_file_and_line, sorry): - Remove redundant prototypes. - - (notice, check_lang_option, report_file_and_line, vnotice, - mark_file_stack): Add static prototype. - (set_fatal_function): Add prototype. - (vnotice, report_file_and_line, set_fatal_function, - check_lang_option): Constify a char*. - (main): Prototype. Call return, not exit. - -Wed Sep 15 09:50:18 1999 Kaveh R. Ghazi - - * aclocal.m4 (AC_GCC_C_LONG_DOUBLE): New macro. - - * configure.in (AC_GCC_C_LONG_DOUBLE): Call it. - - * gansidecl.h (HAVE_LONG_DOUBLE): Define if gcc for stage2. - - * ggc-simple.c (HAVE_LONG_DOUBLE): Test before using long double. - -Wed Sep 15 11:04:43 1999 Bernd Schmidt - - * function.c (assign_parms): Delete arg SECOND_TIME. Don't test it, - behave as if it's zero in all cases. - (expand_function_start): Adjust call to assign_parms. - * tree.h (assign_parms): Adjust prototype. - * objc/objc-act.c (hack_method_prototype): Adjust call to - assign_parms. - -Tue Sep 14 21:47:06 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (FIXED_BASE_PLUS_P): Do not consider referneces to - arg_pointer_rtx fixed if the argument pointer register is - not fixed. - (NONZERO_BASE_PLUS_P): Likewise. - -Tue Sep 14 20:26:02 1999 Richard Henderson - - * rtl.def (match_insn, match_insn2): Remove match_insn; rename - match_insn2 to match_insn. - * genrecog.c (add_to_sequence): Rename MATCH_INSN2. - -Tue Sep 14 20:10:29 1999 Richard Henderson - - * Makefile.in (USER_H): Remove va-foo.h. - - * ginclude/{va-alpha.h,va-arc.h,va-c4x.h,va-clipper.h,va-h8300.h, - va-i860.h,va-i960.h,va-m32r.h,va-m88k.h,va-mips.h,va-mn10200.h, - va-mn10300.h,va-pa.h,va-ppc.h,va-pyr.h,va-sh.h,va-sparc.h, - va-spur.h,va-v850.h}: Remove. - -Tue Sep 14 19:43:16 1999 Richard Henderson - - * sparc/sparc.md (eligible_for_return_delay): New attribute. - (in_return_delay): Use it instead of match_insn. - -Tue Sep 14 23:05:37 1999 Alexandre Oliva - - * config/alpha/va_list.h (va-alpha.h): Do not include. - (__gnuc_va_list): Typedef as in varargs.h. - -Tue Sep 14 18:14:03 1999 Richard Henderson - - * ggc-common.c (ggc_mark_tree): Mark DECL_SOURCE_FILE and - DECL_LIVE_RANGE_RTL. - -Tue Sep 14 16:47:08 1999 Mark Mitchell - - * except.c (expand_eh_region_start_for_decl): Use NOTE_EH_HANDLER, - not NOTE_BLOCK_NUMBER. - (expand_eh_region_end): Likewise. - (find_exception_handler_labels): Likewise. - (scan_region): Likewise. - (exception_optimize): Likewise. - (update_rethrow_references): Likewise. - (set_insn_eh_region): Likewise. - * final.c (final_scan_insn): Likewise. - * flow.c (make_edges): Likewise. - * integrate.c (expand_inline_function): Likewise. - * print-rtl.c (print_rtx): Likewise. - -Tue Sep 14 16:30:16 1999 Richard Henderson - - * ginclude/stdarg.h, ginclude/varargs.h: Implement in - terms of builtin functions and types. - - * mips.c (mips_build_va_list): New. - (mips_va_start, mips_va_arg): New. - * mips.h (BUILD_VA_LIST_TYPE): New. - (EXPAND_BUILTIN_VA_START, EXPAND_BUILTIN_VA_ARG): New. - - * sh.c (sh_builtin_saveregs): Use get_varargs_alias_set. - (sh_build_va_list, sh_va_start, sh_va_arg): New. - * sh.h (BUILD_VA_LIST_TYPE): New. - (EXPAND_BUILTIN_VA_START, EXPAND_BUILTIN_VA_ARG): New. - -Tue Sep 14 16:20:24 1999 Richard Henderson - - * recog.h (struct recog_data): Make dup_num, operand_address_p, - n_operands, n_dups, n_alternatives `char' instead of `unsigned char'. - (struct insn_data): Likewise with n_operands, n_dups, - n_alternatives, output_format. - * regclass.c (scan_one_insn): Cast n_operands to int before - arithmetic inside comparison. - -Tue Sep 14 15:13:36 1999 Richard Henderson - - * toplev.c (compile_function): Unconditionally emit nop. - -Tue Sep 14 14:41:47 1999 Kaveh R. Ghazi - - * haifa-sched.c (actual_hazard): Move declaration of variable - `this_cost' into the scope where it is used. - -Tue Sep 14 14:14:28 1999 Kaveh R. Ghazi - - * c-pragma.c (handle_pragma_token): Wrap variables `name' and - `value' in HANDLE_PRAGMA_WEAK. Wrap variable `align' in - HANDLE_PRAGMA_PACK||HANDLE_PRAGMA_PACK_PUSH_POP. - - * genrecog.c (make_insn_sequence): Call memset, not bzero. - - * jump.c (find_insert_position): Don't declare or define unless - !HAVE_conditional_arithmetic. - (returnjump_p_1, delete_prior_computation): Add static prototypes. - - * mips-tdump.c (fatal, fancy_abort, main): Add extern prototypes. - - * recog.c (offsettable_address_p): Prototype function pointer. - (preprocess_constraints): Call memset, not bzero. - - * tree.c (tree_node_kind_names): Constify a char*. Make static. - (gcc_obstack_init): Don't declare. - (fix_sizetype): Add static prototype. - (gcc_obstack_init): Use prototype casts in call to _obstack_begin. - (tree_cons): Call memset, not bzero. - - * varasm.c (remove_from_pending_weak_list): Wrap declaration and - definition in macro ASM_WEAKEN_LABEL. - (mark_const_hash_entry): Add static prototype. - -Tue Sep 14 12:22:50 1999 Kaveh R. Ghazi - - * c-lex.c (handle_generic_pragma): Remove unused variable `c'. - - * unroll.c (find_common_reg_term, subtract_reg_term, - loop_find_equiv_value): Add static prototypes. - (unroll_loop): Wrap variable `prev' in macro HAVE_cc0. - (copy_loop_body): Remove unreachable break statement. - - * sparc.c (sparc_va_arg): Remove unused variable `tmp'. - - * sparc.h (sparc_va_start, sparc_va_arg): Add extern prototypes. - -Tue Sep 14 15:28:00 1999 Bernd Schmidt - - Undo some changes from the gcc2 merge: - * rtl.def (CONSTANT_P_RTX): Fix the comment for this rtx code. - * emit-rtl.c (gen_rtx_REG): Don't test special reg rtx's for null - pointers. - - Undo this change: - Sat Oct 3 07:20:28 1998 Stephen L Moshier - * emit-rtl.c (gen_lowpart_common): Disable optimization of - initialized float-int union if the value is a NaN. - -Tue Sep 14 04:03:44 1999 Mumit Khan - - * gthr-win32.h: New file. - - * i386/winnt.c (i386_pe_valid_decl_attribute_p): Recognize - shared as a valid attribute. - * i386/cygwin.h (ASM_OUTPUT_SECTION): Handle shared attribute. - * extend.texi: Document `shared' variable attribute. - -Tue Sep 14 04:01:46 1999 Loren Rittle - - * configure.in: Handle --enable-threads on FreeBSD. - * configure: Rebuit. - -Tue Sep 14 03:58:44 1999 Andreas Jaeger - - * configure.in: Add crtbeginS.o, crtendS.o for mips-linux; add - thread support. - * configure: Rebuilt. - -Tue Sep 14 03:47:23 1999 Joel Sherrill - Charles-Antoine Gauthier - Rosimildo DaSilva - - * configure.in (m68k-*-rtemscoff*): Added. - * configure.in (mips64orion-*-rtems*): Converted to ELF. - * configure.in (sparc-*-rtemsaout*): Added as alias for old - sparc-rtems configuration. - * configure.in (sparc-*-rtemself*): Added. - * configure.in (sparc-*-rtems*): Now ELF not a.out. - * config/i386/rtems.h: Added comment. - * config/sparc/rtemself.h: New file. - - * configure.in (m68k-rtemself): Added. - * config/elfos.h: Added ifndef wrapper for DWARF2_DEBUGGING_INFO - and DWARF_DEBUGGING_INFO. - * config/m68k/crti.s: New file. - * config/m68k/crtn.s: New file. - * config/m68k/t-crtstuff: New file. - * config/m68k/rtemself.h: New file. - - * configure.in (i[[34567]]86-*-rtemself*): Now uses crtstuff for - global ctor/dtor and C++ exception handling. - * config/i386/rtemself.h: Now uses crtstuff (crti.o + crtbegin.o) - for STARTFILE_SPEC and crtstuff (crtend.o + crtn.o) for - ENDFILE_SPEC. - * config/i386/t-rtems-i386: New File. - -Tue Sep 14 09:47:41 1999 Andreas Schwab - - * stmt.c (expand_end_case): Return right away if the case stack is - empty. - -Tue Sep 14 01:47:19 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (version.c): Remove rule incorrectly brought in from - the gcc2 merge. - -Tue Sep 14 01:42:27 1999 Marc Espie - - * Makefile.in: Prepend $(SHELL) to move-if-change calls. - * msdos/top.sed: Take into account a prepended $(SHELL) to - move-if-change. - * winnt/config-nt.sed: Likewise. Kill bogus substitution. - - * objc/Make-lang.in: Prepend $(SHELL) to move-if-change calls. - -Tue Sep 14 01:38:52 1999 J"orn Rennecke - - * regmove.c (fixup_match_1): Don't change an unchanging register. - (stable_but_for_p): Renamed to: - (stable_and_no_regs_but_for_p). Reject unchanging registers too. - Changed all callers. - -Tue Sep 14 01:33:15 1999 Andreas Schwab - - * loop.c (strength_reduce): Don't call reg_used_between_p if the - insn from BL2 is after the insn from BL. - -Mon Sep 13 21:06:01 1999 Richard Henderson - - * recog.h (INSN_OUTPUT_FORMAT_*): New. - (struct insn_data): Merge `template' and `outfun' into `output'. - Add `output_format'. - * genoutput.c (INSN_OUTPUT_FORMAT_*): New. - (struct data): Remove `outfun'; add `output_format'. - (name_for_index): Remove declaration. - (output_insn_data): Handle output formats. - (process_template): Emit the bare array for @. - (gen_expand, gen_split): Set output_format to NONE. - * output.h (get_insn_template): Declare. - * final.c (get_insn_template): New. - (final_scan_insn): Use it. - * toplev.c (compile_file): Likewise. - - * c4x/c4x.c (c4x_process_after_reload): Likewise. - * i860/i860.c (output_delayed_branch): Likewise. - (output_delay_insn): Likewise. - -1999-09-13 Alexandre Oliva - - * rtl.c (obstack_alloc_rtx): Removed. - -1999-09-13 17:03 -0700 Zack Weinberg - - * config/gmicro/gmicro.md: Disable move DF->DI anonymous pattern. - -Mon Sep 13 15:21:46 1999 Richard Henderson - - * i386.c (call_insn_operand): Reject const_int. - (expander_call_insn_operand): Use call_insn_operand. - -Mon Sep 13 17:44:28 1999 Kaveh R. Ghazi - - * gcc.c (getrusage): Wrap prototype arguments in PROTO(). - -1999-09-13 12:18 -0700 Zack Weinberg - - * config/i370/i370.md (mulsi, divsi, modsi anonymous insns): - Use DImode operation. - -1999-09-13 12:13 -0700 Zack Weinberg - - * gcc.c: Include sys/resource.h. - (report_times): New flag. - (execute): If report_times is set, calculate and report the - CPU time consumed by each subprocess. - - (rus, prus): New globals. - (option_map): Add --time. - (display_help): Document -time. - (process_command): Set report_times if -time is given. - Turn off -pipe if -time is given. - - * invoke.texi: Document new option -time. - - * configure.in: Check for getrusage. Check if we have to - prototype getrusage. - * acconfig.h: Add NEED_DECLARATION_GETRUSAGE. - * configure: Regenerate. - * config.in: Regenerate. - -Mon Sep 13 12:57:06 1999 Dave Brolley - - * cppinit.c (append_include_chain): Initialize 'next' and 'alloc' - fields. - -Mon Sep 13 10:01:33 1999 Nick Clifton - - * config/fp-bit.c: Define L_thenan_sf or L_thenan_df (as - appropriate) if FINE_GRAINED_LIBRARIES is not defined. - (nan): Return _thenan_sf or _thenan_df as appropriate. - (L_thenan_sf): Define _thenan_sf. - (L_thenan_df): Define _thenan_df. - - * Makefile.in (FPBIT_FUNCS): Add _thenan_sf. - (DPBIT_FUNCS): Add _thenan_df. - -Mon Sep 13 09:38:53 1999 Andreas Schwab - - * tree.c (fix_sizetype): Exchange the types for TYPE_SIZE and - TYPE_SIZE_UNIT. - -Sun Sep 12 23:28:20 1999 Kaveh R. Ghazi - - * Makefile.in (gcc.o, gccspec.o, cppspec.o): Depend on gcc.h. - - * gcc.h: New file. - (lang_specific_driver): Don't take a function pointer parameter. - All callers changed. - - * gcc.c: Include gcc.h. - (do_spec, fancy_abort,lang_specific_driver,lang_specific_pre_link, - lang_specific_extra_outfiles, fatal): Don't declare. - (multilib_defaults_raw): Constify. - (read_specs): Call memset, rather than bzero. - (main): Call return, not exit. - (lookup_compiler): Call memcpy, not bcopy. - (fatal): Make extern. - - * cppspec.c: Include gcc.h. - (lang_specific_driver): Initialize variable `quote'. Constify a - char*. All calls to the function pointer parameter now - explicitly call `fatal'. - - * gccspec.c (lang_specific_driver): Include gcc.h. - -Sun Sep 12 19:52:10 1999 Richard Earnshaw - - * arm.c (note_invalid_constants): Use recog_data.operand_type - for recog_op_type. - -Sun Sep 12 15:53:20 1999 Bernd Schmidt - - * tree.h (build_common_tree_nodes, build_common_tree_nodes_2): - Declare. - - * reload.h (reload_in, reload_out, reload_in_reg, reload_out_reg, - reload_reg_class, reload_inmode, reload_outmode, reload_optional, - reload_nongroup, reload_inc, reload_opnum, reload_secondary_p, - reload_secondary_in_reload, reload_secondary_out_reload, - reload_secondary_in_icode, reload_secondary_out_icode, - reload_reg_rtx, reload_when_needed): Delete declarations. - (struct reload): New structure. - (rld): Declare new array. - * reload.c (reload_in, reload_out, reload_in_reg, reload_out_reg, - reload_reg_class, reload_inmode, reload_outmode, reload_optional, - reload_nongroup, reload_inc, reload_opnum, reload_secondary_p, - reload_secondary_in_reload, reload_secondary_out_reload, - reload_secondary_in_icode, reload_secondary_out_icode, - reload_reg_rtx, reload_when_needed): Delete definitions. - (rld): New array. - (whole file): Replace uses of the deleted arrays with uses of rld. - * reload1.c (whole file): Replace uses of the deleted arrays with - uses of rld. - (choose_reload_regs): Copy in/out of save_reload_reg_rtx with - explicit loops, not with bcopy. - -Sun Sep 12 05:00:24 1999 Richard Henderson - - * recog.h (insn_template, insn_outfun, insn_n_operands, insn_n_dups, - insn_n_alternatives, insn_operand_constraint, insn_operand_address_p, - insn_operand_mode, insn_operand_strict_low, insn_operand_predicate, - insn_name): Delete and consolidate into new structures. - (insn_operand_predicate_fn): New. - (insn_output_fn): New. - (insn_gen_fn): New. - (struct insn_operand_data): New. - (struct insn_data): New. - (insn_data): New. - (OUT_FCN): Update for insn_data change. - * builtins.c (expand_builtin_strlen): Likewise. - (expand_builtin_memcmp): Likewise. - * combine.c (make_extraction, simplify_comparison): Likewise. - * cse.c (canon_reg, cse_insn): Likewise. - * explow.c (allocate_dynamic_stack_space, probe_stack_range): Likewise. - * expmed.c (store_bit_field, extract_bit_field): Likewise. - (emit_store_flag): Likewise. - * expr.c (convert_move, emit_block_move): Likewise. - (clear_storage, emit_push_insn, expand_increment): Likewise. - (do_store_flag): Likewise. - * expr.h (GEN_FCN): Likewise. - (insn_gen_function): Die. - * final.c (final_scan_insn): Update for insn_data change. - (output_asm_name): Likewise. - * function.c (fixup_var_refs_1): Likewise. - * loop.c (check_dbra_loop): Likewise. - * optabs.c (expand_binop, expand_twoval_binop): Likewise. - (expand_unop, expand_complex_abs, emit_unop_insn): Likewise. - (prepare_cmp_insn, prepare_operand, emit_indirect_jump): Likewise. - (emit_conditional_move, gen_add2_insn, gen_sub2_insn): Likewise. - * recog.c (validate_replace_rtx_1, extract_insn): Likewise. - * regmove.c (gen_add3_insn): Likewise. - * reload.c (push_secondary_reload, combine_reloads): Likewise. - (find_reloads, find_reloads_address_1): Likewise. - (debug_reload_to_stream): Likewise. - * reload1.c (emit_reload_insns, gen_reload): Likewise. - * stmt.c (expand_end_case): Likewise. - * toplev.c (compile_file): Likewise. - - * c4x/c4x.c (c4x_process_after_reload): Likewise. - * i860/i860.c (output_delayed_branch, output_delay_insn): Likewise. - - * print-rtl.c (insn_name_ptr): Remove declaration. - (get_insn_name): Declare. - (print_rtx): Use it. - * genoutput.c (insn_name_ptr): Remove. - (next_operand_number): New. - (struct operand_data): New. - (null_operand, odata, odata_end): New. - (struct data): Use struct operand_data. - (idata, idata_end): Renamed from insn_data and end_of_insn_data. - (get_insn_name): Renamed from name_for_index. - (output_prologue): Define NO_MD_PROTOTYPES. - (output_predicate_decls): Break out from output_epilogue. - Iterate over the operands list. - (output_operand_data): Break out from output_epilogue. Emit - just the operands list. - (output_insn_data): Break out from output_epilogue. Emit just - the insn data. - (output_epilogue): Remove. - (output_get_insn_name): New. - (constraints, op_n_alternatives, predicates, address_p): Die. - (modes, strict_low, seen): Die. - (scan_operands): Take new param `d' instead of writing to - seven global variables. - (compare_operands): New. - (place_operands): New. - (validate_insn_alternatives): Update for struct data change. - (gen_insn): Don't zero or copy 7 global arrays. Update for - scan_operands; call place_operands. - (gen_peephole, gen_expand, gen_split): Likewise. - (main): Update for new output routines. - - * genattr.c (insn_name_ptr): Remove. - (get_insn_name): New function. - * genattrtab.c, gencodes.c, genconfig.c, genemit.c: Likewise. - * genextract.c, genflags.c, genopinit.c, genpeep.c: Likewise. - * genrecog.c: Likewise. - - * alpha.md (adddi3): Make `pattern' array static. - -Sun Sep 12 22:05:21 1999 Michael Hayes - - * config/c4x/c4x.h (c4x_rpts_cycles_string, - c4x_cpu_version_string): Constify char *. - * config/c4x/c4x.c (c4x_rpts_cycles_string, - c4x_cpu_version_string): Likewise. - -Sat Sep 11 23:28:33 1999 Richard Henderson - - * tree.c (save_tree_status): Revert 10 Sep change. - (restore_tree_status): Likewise. Call obstack_free with NULL - before freeing the obstack proper. - -Sat Sep 11 23:23:46 1999 Richard Henderson - - * cse.c (cse_main): If gc'ing, collect around cse_basic_block. - - * ggc-simple.c (ggc_pop_context): Fold outstanding bytes into - surrounding context. - -Sat Sep 11 19:52:43 1999 Mark Mitchell - - * tree.c (type_hash_canon): Put all types in the hash-table, when - GC'ing. - -Sat Sep 11 18:37:04 1999 Richard Henderson - - * recog.h (struct recog_data, recog_data): New. - (recog_foo variables): Kill. - * recog.c (recog_operand, recog_operand_loc): Kill. - (recog_dup_loc, recog_dup_num, recog_n_operands): Kill. - (recog_n_dups, recog_n_alternatives, recog_operand_mode): Kill. - (recog_constraints, recog_op_type, recog_operand_address_p): Kill. - (recog_data): Define. - (extract_insn): Update all recog_foo references to use recog_data. - (preprocess_constraints, constrain_operands): Likewise. - * final.c (final_scan_insn, cleanup_subreg_operands): Likewise. - * genattrtab.c (main): Likewise. - * genextract.c (main): Likewise. - * genoutput.c: Likewise. - * genrecog.c (write_subroutine, main): Likewise. - * local-alloc.c (block_alloc): Likewise. - * reg-stack.c (record_asm_reg_life, subst_asm_stack_regs): Likewise. - * regclass.c (scan_one_insn, record_reg_classes): Likewise. - * regmove.c (regmove_optimize, find_matches, fixup_match_1): Likewise. - * reload.c (find_reloads, find_reloads_toplev): Likewise. - * reload1.c (maybe_fix_stack_asms, eliminate_regs_in_insn): Likewise. - (reload_cse_simplify_operands): Likewise. - - * arc/arc.c (arc_final_prescan_insn): Likewise. - * arm/arm.c (note_invalid_constants, arm_final_prescan_insn): Likewise. - * h8300/h8300.c (notice_update_cc): Likewise. - * i386/i386.c (ix86_attr_length_default, ix86_agi_dependant): Likewise. - * i860/i860.c (output_delayed_branch, output_delay_insn): Likewise. - * mn10200/mn10200.c (notice_update_cc): Likewise. - * mn10300/mn10300.c (notice_update_cc): Likewise. - * romp/romp.c (update_cc): Likewise. - * sparc/sparc.c (check_pic): Likewise. - * v850/v850.c (notice_update_cc): Likewise. - - * genemit.c (main): Don't declare recog_operand. - -Sat Sep 11 12:41:55 1999 Alex Samuel - - * ggc.h (rtvec_def): Forward declare. - (tree_node): Likewise. - (ggc_root): Define. - (roots): Declare. - (ggc_set_mark_rtx): Add prototype. - (ggc_set_mark_rtvec): Likewise. - (ggc_set_mark_tree): Likewise. - * ggc-simple.c (ggc_root): Don't define. - (roots): Don't declare. - (ggc_mark_rtx): Remove. - (ggc_mark_rtvec): Likewise. - (ggc_mark_tree): Likewise. - (ggc_mark_varray): Likewise. - (ggc_mark_tree_hash_table_entry): Likewise. - (ggc_mark_tree_hash_table): Likewise. - (ggc_set_mart_rtx): New function. - (ggc_set_mark_rtvec): Likewise. - (ggc_set_mark_tree): Likewise. - (ggc_add_root): Remove. - (ggc_add_rtx_root): Likewise. - (ggc_remove_tree_root): Likewise. - (ggc_add_string_root): Likewise. - (ggc_add_tree_varray_root): Likewise. - (ggc_add_tree_hash_table_root): Likewise. - (ggc_del_root): Likewise. - (ggc_mark_rtx_ptr): Likewise. - (ggc_mark_tree_ptr): Likewise. - (ggc_mark_string_ptr): Likewise. - (ggc_mark_tree_varray_ptr): Likewise. - (ggc_mark_tree_hash_table_ptr): Likewise. - * ggc-common.c: New file. - * Makefile.in (OBJS): Add ggc-common.o. - (ggc-common.o): List dependencies. - -1999-09-10 22:37 -0700 Zack Weinberg - - * cppalloc.c (xstrdup): Use memcpy. - * cpperror.c (cpp_print_containing_files): Don't use - cpp_notice. - * cpplib.c (conditional_skip): Set temp->lineno. - (do_endif): Make error message less obscure. - (if_directive_name): New function. - (cpp_get_token [case EOF]): Unwind the if stack and generate - error messages for each unterminated conditional in this file. - (parse_string): Do not behave differently if -traditional. - -Fri Sep 10 14:04:07 1999 Richard Henderson - - * builtins.c (expand_builtin_va_arg): Cope with an array-type - va_list decomposing to pointer-type. - * rs6000.c (rs6000_va_start) Unwrap the ARRAY_TYPE to get at fields. - (rs6000_va_arg): Likewise. - -Fri Sep 10 13:21:21 1999 Jim Wilson - - * except.c (start_dynamic_handler): Compute size using - STACK_SAVEAREA_MODE. - -Fri Sep 10 16:01:23 1999 Kaveh R. Ghazi - - * protoize.c: Remove various __STDC__ and POSIX hacks. Don't - include directory headers. Don't define strrchr. Don't provide - my_* replacement functions. Prefer PTR over `pointer_type'. - Don't prototype system functions. Don't redefine getopt. - - (shortpath, fancy_abort, notice, savestring, dupnstr, substr, - safe_read, safe_write, save_pointers, restore_pointers, - is_id_char, in_system_include_dir, directory_specified_p, - file_excluded_p, unexpand_if_needed, abspath, check_aux_info, - find_corresponding_lparen, referenced_file_is_newer, - save_def_or_dec, munge_compile_params, gen_aux_info_file, - process_aux_info_file, identify_lineno, check_source, - seek_to_line, forward_to_next_token_char, output_bytes, - output_string, output_up_to, other_variable_style_function, - find_rightmost_formals_list, do_cleaning, careful_find_l_paren, - do_processing, is_syscalls_file, rename_c_file, find_extern_def, - find_static_definition, connect_defs_and_decs, add_local_decl, - add_global_decls, needs_to_be_converted, visit_each_hash_node, - add_symbol, lookup, free_def_dec, find_file, reverse_def_dec_list, - edit_fn_declaration, edit_formals_lists, edit_fn_definition, - scan_for_missed_items, edit_file, string_list_cons): Add static - prototypes. - (standard_exec_prefix, target_machine, target_version, - default_syscalls_dir, string_list, string_list_cons, find_file, - do_cleaning): Constify a char*. - (safe_read, safe_write): Use PTR, not a char*. - (is_id_char): Take an int, not a char. - (main): Add prototype. Call return, not exit. - -Fri Sep 10 16:48:26 1999 Andrew Haley - - * tree.c (type_hash_lookup): Check for equal TYPE_ALIGN fields - when comparing types. - -Fri Sep 10 08:43:32 1999 Richard Henderson - - * loop.c (basic_induction_var): Typo NULL_RTX -> NULL. - (strength_reduce): Release the varrays from the no-bivs early exit. - - * reload1.c (order_regs_for_reload): Init hard_reg_n_uses before - the loop over the registers. - - * tree.c (save_tree_status): Set maybepermanent_firstobj NULL - for a new obstack. - (restore_tree_status): Check that instead when freeing the obstack. - -Wed Sep 8 16:12:04 1999 Andrew Haley - - * alias.c (rtx_equal_for_memref_p): Allow CONST_DOUBLEs to be used - as pointers. - -Fri Sep 10 11:58:55 1999 Bernd Schmidt - - * i386.md (ashlqi3): For NON_QI_REG_P regs, use sall. Fix some - operand size modifiers. - -Fri Sep 10 10:32:32 1999 Bernd Schmidt - - * c-common.c (c_common_nodes_and_builtins): Don't build - va_list_type_node. - * c-common.h (enum c_tree_index and related accesor macros): Remove - everything now declared in tree.h. - * c-decl.c (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, - LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, WCHAR_UNSIGNED, FLOAT_TYPE_SIZE, - DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't provide defaults. - (error_mark_node, void_type_node, char_type_node, integer_type_node, - unsigned_type_node, ptr_type_node, va_list_type_node, - integer_zero_node, null_pointer_node, integer_one_node): Delete. - (init_decl_processing): Call build_common_tree_nodes and - build_common_tree_nodes_2 instead of building their nodes here. - Don't add roots for these nodes. - * stor-layout.c (size_zero_node, size_one_node): Delete. - (set_sizetype): Make a new node for bitsizetype each time. - * tree.c (global_trees): New variable. - (init_obstacks): Add a gc root for it. - (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, - LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, - DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Provide defaults. - (build_common_tree_nodes): New function. - (fix_sizetype): New function. - (build_common_tree_nodes_2): New function. - * tree.h (enum tree_index): New. - (global_trees): Declare. - Add accessor macros for all nodes now moved to global_trees. - Delete their declarations. - -Thu Sep 9 20:15:46 1999 Richard Henderson - - * c-decl.c (finish_function): When processing a nested function, - push and pop GC context around rest_of_compilation. - -Thu Sep 9 16:42:06 1999 Richard Henderson - - * i386.c (override_options): Remove ppro, pentium2, and p2 as aliases. - Default ix86_arch to PROCESSOR_I386. - * i386.h (CC1_CPU_SPEC): Don't add -march=foo. Remove -mno-foo. - (CPP_486_SPEC, CPP_586_SPEC, CPP_686_SPEC): Delete. - (CPP_CPU_DEFAULT_SPEC): Define to __tune_foo__. - (CC1_CPU_SPEC): Make -march=foo define __foo__, and provide - __tune_foo__ if no -mcpu. Make -mcpu=bar define __tune_bar__. - (EXTRA_SPECS): Remove deleted specs. - -Thu Sep 9 16:03:06 1999 Richard Henderson - - * function.c (assign_stack_local_1): Allocate from - function->x_frame_offset, not frame_offset. - -Thu Sep 9 14:36:31 1999 Mark Mitchell - - * ggc.h (lang_cleanup_tree): Remove. - * gcc-simple.c (ggc_free_tree): Don't call lang_cleanup_tree. - * ggc-callbacks.c (lang_cleanup_tree): Remove. - - * c-decl.c (finish_struct): Use ggc_alloc to allocate - TYPE_LANG_SPECIFIC when garbage collecting. - (lang_mark_tree): Mark TYPE_LANG_SPECIFIC. - (lang_cleanup_tree): Remove. - -Thu Sep 9 14:23:02 1999 Jason Merrill - - * defaults.h (EH_FRAME_SECTION, EH_FRAME_SECTION_ASM_OP): Define here. - * crtstuff.c: Not here. - * dwarf2out.c: Or here. - * libgcc2.c (__do_global_ctors, __do_global_dtors): Handle EH frame - info. - -Thu Sep 9 09:40:58 1999 Mark Mitchell - - * function.h (free_after_compilation): Remove decl parameter. - (free_varasm_status0: Likewise. - (free_emit_status): Likewise. - (free_stmt_status): Likewise. - (free_after_compilation): Likewise. - (init_lang_status): New variable. - (free_lang_status): Likewise. - * emit-rtl.c (free_emit_status): Make decl parameter implicit. - * function.c (init_lang_status): New variable. - (free_lang_status): Likewise. - (push_function_context_to): Don't set function::decl here. - (free_after_copmilation): Make decl parameter implicit. Call - free_lang_status if defined. - (prepare_function_start): Call init_lang_status if defined. - (init_function_start): Set function::decl here. - * profile.c (output_func_start_profiler): Don't call pushdecl - until we've actually started the function. - * stmt.c (free_stmt_status): Make decl parameter implicit. - * toplev.c (rest_of_compilation): Don't pass decl to - free_after_compilation. - * varasm.c (free_varasm_status): Likewise. - -Thu Sep 9 17:23:19 1999 Bernd Schmidt - - * except.c (call_get_eh_context): Add root when allocating static - tree variable. - -Thu Sep 9 15:24:59 BST 1999 Richard Earnshaw - - * arm.c: Include "ggc.h". - (arm_add_gc_roots): New function. - (arm_override_options): Call it. - (aof_pic_entry): Add a GC root for aof_pic_label when it's allocated. - - * arm.md (define_asm_attributes): Add a pool_range attribute. - -Thu Sep 9 12:32:57 BST 1999 Nathan Sidwell - - * extend.texi (Volatiles): New node. - -Thu Sep 9 03:37:31 1999 Richard Henderson - - * ggc-simple.c (IS_MARKED, IGNORE_MARK): New. - (GGC_ANY_MAGIC, GGC_ANY_MAGIC_MARK): New. - (struct ggc_any): Replace `mark' with `magic_mark'. - (ggc_alloc_string): Use memcpy, not bcopy. - (ggc_alloc_any): Set magic_mark. Update bytes_alloced_since_gc. - (ggc_free_{rtx,rtvec,tree,string}): Mark inline. - (ggc_free_any): New. - (ggc_mark_string): Use IGNORE_MARK. Calc back to struct gcc_string. - (ggc_mark): Use IGNORE_MARK. Abort if magic doesn't match. - (ggc_collect): Re-enable collection avoidance. Use GGC_ANY_MARK. - Use IS_MARKED. Use ggc_free_any. - -1999-09-09 Scott Bambrough - - * config/arm/linux-elf.h: define NO_IMPLICIT_EXTERN_C - -Thu Sep 9 01:55:21 1999 Richard Henderson - - * toplev.c (main): Always init_ggc. - -Wed Sep 8 23:53:22 1999 Richard Henderson - - * except.c (find_all_handler_type_matches): Free the list if - we found no matches. - - * combine.c (SUBST): Break out to a real function do_SUBST. - (SUBST_INT): Likewise. - * gcse.c (free_pre_mem): Free `temp_bitmap'. - (pre_insert): Free `inserted'. - * loop.c (basic_induction_var): Always set `location'. - - * function.c (expand_function_end): Add initial_trampoline as a root. - * rtl.h (init_varasm_once): Declare. - * toplev.c (compile_file): Call it. - * ggc-simple.c (ggc_mark_string_ptr): New. - (ggc_add_string_root): New. - (ggc_collect): Disable collection avoidance temporarily. - * ggc.h (ggc_add_string_root): Declare. - * except.c (create_rethrow_ref): Use ggc_alloc_string. - * optabs.c (init_libfuncs): Likewise. - * varasm.c (named_section): Use ggc_alloc_string. - (make_function_rtl): Likewise. - (make_decl_rtl): Likewise. - (assemble_static_space): Likewise. - (assemble_trampoline_template): Likewise. - (output_constant_def): Likewise. - (force_const_mem): Likewise. - (mark_const_hash_entry): New. - (mark_pool_sym_hash_table): New. - (mark_varasm_state): Use it. - (init_varasm_once): New. - - * expr.h (init_one_libfunc): Declare. - * optabs.c (init_one_libfunc): New. - (init_optabs): Use it. - * config/gofast.h: Likewise. - * config/sparc/sol2.h (INIT_SUBTARGET_OPTABS): Likewise. - * config/sparc/sparc.h (INIT_TARGET_OPTABS): Likewise. - -Thu Sep 9 13:46:06 1999 Geoffrey Keating - - * Makefile.in (cppexp.o): Depend on cpphash.h. - * cppexp.c (cpp_lex): Handle `defined (xxx)' for poisoned xxx. - Include cpphash.h. - * cpphash.c (special_symbol): Handle plain `xxx' for poisoned xxx. - * cpplib.c (do_define): Generalize to handle poisoned definitions, - redefining poisoned identifiers, etc. - (do_undef): Don't allow poisoned identifiers to be undefined. - (do_pragma): Add #pragma poison. - (do_xifdef): Handle `#ifdef xxx' for poisoned xxx. - - * cccp.c: Add T_POISON node type. - (special_symbol): Handle `defined(xxx)' and plain `xxx' for - poisoned xxx. - (do_define): Generalize to handle poisoned definitions, - redefining poisoned identifiers, etc. - (do_undef): Don't allow poisoned identifiers to be undefined. - (do_pragma): Add #pragma poison. - (do_xifdef): Handle `#ifdef xxx' for poisoned xxx. - - * c-pragma.c (handle_pragma_token): Ignore #pragma poison. - * c-pragma.h: Add ps_poison state. We now always have generic - pragmas. - -Wed Sep 8 20:30:42 1999 Mark Mitchell - - * ggc.h (ggc_alloc): New function. - (ggc_mark): Likewise. - * ggc-simple.c (ggc_any): New structure. - (ggc_status): Add anys. - (n_anys_collected): New variable. - (ggc_alloc): Define. - (ggc_mark): Likewise. - (ggc_collect): Collect the anys. - -Wed Sep 8 20:15:14 1999 Kaveh R. Ghazi - - * c-decl.c (mark_binding_level): Make static to match prototype. - -Wed Sep 8 16:41:27 1999 Richard Henderson - - * flow.c (new_insn_dead_notes): Don't early out for preexisting regs. - -Wed Sep 8 16:07:52 1999 Richard Henderson - - * gengenrtl.c (CONST_DOUBLE_FORMAT): Take the size REAL_ARITHMETIC - will use into account. Expand the max width to 5. - * rtl.c: Likewise. - -Wed Sep 8 16:01:14 1999 Richard Henderson - - * ggc-simple.c (ggc_free_rtx): Poison the correct amount - for the rtx length. - -Wed Sep 8 15:23:54 1999 Richard Henderson - - * alpha.md (call value patterns): Remove the result predicates. - -Wed Sep 8 13:35:38 1999 Richard Henderson - - * Makefile.in (stmp-fixinc): Remove extraneous exit 1 from - last change. - -Wed Sep 8 15:32:16 1999 Kaveh R. Ghazi - - * system.h (sbrk, malloc, calloc, realloc): Backup prototypes - changed from extern char *, to extern PTR. Also fix typo in - NEED_DECLARATION_REALLOC test. - - * mips-tdump.c (malloc, calloc, realloc): Don't prototype. - -Wed Sep 8 11:40:47 1999 Kaveh R. Ghazi - - * gansidecl.h (__attribute__, ATTRIBUTE_UNUSED_LABEL, - ATTRIBUTE_UNUSED, ATTRIBUTE_NORETURN, ATTRIBUTE_PRINTF, - ATTRIBUTE_PRINTF_1, ATTRIBUTE_PRINTF_2, ATTRIBUTE_PRINTF_3, - ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5, GENERIC_PTR): Delete. - - * c-decl.c (field_decl_cmp): Use PTR instead of GENERIC_PTR. - - * cccp.c (pcfinclude): Likewise. - - * global.c (allocno_compare): Likewise. - - * haifa-sched.c (rank_for_schedule): Likewise. - - * local-alloc.c (qty_sugg_compare_1, qty_compare_1): Likewise. - - * reload1.c (hard_reg_use_compare, reload_reg_class_lower): Likewise. - - * stupid.c (stupid_reg_compare): Likewise. - - * tree.c (_obstack_allocated_p): Likewise. - - * varray.h (varray_data_tag, VARRAY_GENERIC_PTR_INIT): Likewise. - -1999-09-08 Bruce Korb autogen@linuxbox.com - - * Makefile.in: Give the hapless gperf user a hint about - why "gperf -F" fails. - -Wed Sep 8 04:43:22 1999 Richard Henderson - - * lists.c: Include ggc.h. - (zap_lists): New. - (init_EXPR_INSN_LIST_cache): Install it. - - * ggc-simple.c (init_ggc): Absorb the old init. - (ggc_push_context): Use xcalloc. - (ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Likewise. - (ggc_collect): Add [rvts] tags to the collection stats. - -Wed Sep 8 11:14:25 1999 Andreas Schwab - - * cccp.c (main): Fix handling of -include and -imacros options. - -Wed Sep 8 02:23:08 1999 Jeffrey A Law (law@cygnus.com) - - * cpplib.c (cpp_push_buffer): Fix order of arguments. - -Wed Sep 8 04:44:09 1999 Alexandre Oliva - - * rtl.h (obstack_alloc_rtx): Removed, it's now static in - genrtl.c. - -Wed Sep 8 00:33:43 1999 Alasdair Baird - - * flow.c (insn_dead_p): Use XEXP rather than SUBREG_REG. - * haifa-sched.c (sched_analyze_1): Use XEXP rather than SUBREG_REG - and SET_DEST. Update comment. - -Wed Sep 8 18:55:17 1999 Michael Hayes - - * config/c4x/c4x.c: Include ggc.h. - (c4x_add_gc_roots): New function. - (c4x_override_options): Call c4x_add_gc_roots. - -Wed Sep 8 00:00:16 1999 Richard Henderson - - * defaults.h (TARGET_ESC): Move ... - * system.h: ... here, where Linas had it in the first place. Silly me. - -Tue Sep 7 23:46:35 1999 Linas Vepstas - - * c-common.c: Use ISGRAPH, ISLOWER, toupper. - * c-lex.c, cccp.c, cexp.c, cexp.y, cppexp.c, dwarf2out.c, genattr.c, - genattrtab.c, genemit.c, genextract.c, genpeep.c, tree.c: Likewise. - * system.h (IN_CTYPE_DOMAIN): Define to 1 if HOST_EBCDIC. - * defaults.h (TARGET_ESC): Add default. - -Tue Sep 7 23:36:59 1999 Linas Vepstas - - * configure.in: add i370-*-openedition, i370-*-mvs and - i370-*-linux targets - -Tue Sep 7 23:31:53 1999 Mark Mitchell - - * dsp16xxx.c: Include ggc.h - (override_options): Mark GC roots. - * mn10200.c: Include ggc.h. - (asm_file_start): Mark GC roots. - * tahoe.c: Include ggc.h. - (extensible_operand): Mark GC roots. - -Tue Sep 7 23:23:15 1999 Linas Vepstas - - * README: Add section discussing status of ELF ABI. - * i370.c: Fix misc spelling mistakes. - (i370_label_scan): Updated notes, exception handling. - (i370_function_prolog): Simplify ELF stack handling. - * i370.h: (FIXED_REGISTERS): Free up r12 for ELF. - (STACK_GROWS_DOWNWARD): ELF stack grows down. - (ASM_DECLARE_FUNCTION_NAME): Fix crazy malloc size. - * i370.md: (movdi): Add notes. - (floatsidf2): Use stack not rtca for scratch float area. - (iorsi3): Correct operand constraints. - * x-oe: Restore TAROUTOPTS which are used by pax. - -Tue Sep 7 22:39:18 1999 Mark Mitchell - - * rs6000.c: Include ggc.h. - (rs6000_add_gc_roots): New function. - (override_options): Call it. - -Tue Sep 7 22:09:03 1999 Richard Henderson - - * alpha.h (alpha_compare): New. - (alpha_compare_op0, alpha_compare_op1, alpha_compare_fp_p): Remove. - * alpha.c: Likewise for the definitions. - (alpha_emit_conditional_branch): Update for alpha_compare. - (alpha_emit_conditional_move): Likewise. - * alpha.md (cmpdf, cmpdi): Likewise. - (setcc patterns): Likewise. Zero alpha_compare after use. - (sne): Optimize (x != 0) into (0U < x). - -Tue Sep 7 21:55:02 1999 Richard Henderson - - * alpha.h (alpha_eh_epilogue_sp_ofs): Remove. - (struct machine_function): Declare; add eh_epilogue_sp_ofs. - (INIT_EXPANDERS): Remove. - * alpha.c: Include ggc.h. - (alpha_eh_epilogue_sp_ofs, alpha_return_addr_rtx): Remove. - (alpha_init_machine_status, alpha_mark_machine_status): New. - (override_options): Install them. - (struct machine_function): Moved to alpha.h. - (alpha_save_machine_status, alpha_restore_machine_status): Remove. - (alpha_init_expanders): Remove. - (alpha_return_addr): Adjust to use current_function->machine. - (alpha_ra_ever_killed): Likewise. - (alpha_expand_epilogue): Likewise. - * alpha.md (eh_epilogue): Likewise. - -Wed Sep 8 14:34:42 1999 Ian Piumarta - Melissa O'Neill - Geoffrey Keating - - * config/rs6000/rs6000.c (first_reg_to_save): Don't save fixed or - call-used registers (call-saved registers must still be contiguous - and end with r31, of course). - -Tue Sep 7 21:41:38 1999 Richard Henderson - - * c-typeck.c (type_lists_compatible_p): Use simple_type_promotes_to. - (self_promoting_type_p): Delete. - (self_promoting_args_p): Move ... - * c-common.c: ... here. - (c_common_nodes_and_builtins): Initialize lang_type_promotes_to. - (simple_type_promotes_to): New. - * builtins.c (lang_type_promotes_to): New. - (expand_builtin_va_arg): Use it to give diagnostic for illegal types. - * c-tree.h (C_PROMOTING_INTEGER_TYPE_P): Move ... - * c-common.h: ... here. - (self_promoting_args_p, simple_type_promotes_to): Declare. - * c-decl.c (duplicate_decls): Use simple_type_promotes_to. - (grokdeclarator): Likewise. - * tree.h (lang_type_promotes_to): Declare. - -Tue Sep 7 17:15:21 1999 Mark Mitchell - - Add some machine-dependent GC roots. - * sparc.c: Include ggc.h. - (sparc_add_gc_roots): New function. - (mark_ultrasparc_pipeline_state): Likewise. - (override_options): Call sparc_add_gc_roots. - * pa.c: Include ggc.h. - (pa_add_gc_roots): New function. - (mark_deferred_plabels): Likewise. - (override_options): Call pa_add_gc_roots. - * mips.c: Include ggc.h. - (mips_add_gc_roots): New function. - (override_options): Use it. - -Tue Sep 7 11:39:41 1999 Kaveh R. Ghazi - - * cpperror.c (cpp_file_line_for_message): Constify a char*. - - * cppexp.c (parse_number, parse_charconst, cpp_lex, - cpp_parse_expr): Add static prototypes. - (parse_charconst): Don't cast away const-ness. - (token): Constify a char*. - - * cppfiles.c (file_name_list, include_hash, find_include_file, - finclude, initialize_input_buffer): Constify a char*. - (file_cleanup, find_position): Add static prototypes. - - * cpphash.c (macro_cleanup, macarg, timestamp, special_symbol, - collect_expansion): Add static prototypes. - (cpp_install, create_definition, monthnames): Constify a char*. - - * cpphash.h (cpp_install): Likewise. - - * cppinit.c (known_suffixes, default_include, - dump_special_to_buffer, NAME, cpp_start_read, cpp_finish): Likewise. - (base_name, dump_special_to_buffer, initialize_dependency_output): - Add static prototypes. - - * cpplib.c (my_strerror): Constify a char*. - (null_underflow, null_cleanup, skip_comment, copy_comment, - copy_rest_of_line, handle_directive, pass_thru_directive, - get_directive_token, read_line_number, cpp_print_file_and_line, - v_cpp_error, v_cpp_warning, v_cpp_error_with_line, - v_cpp_warning_with_line, detect_if_not_defined, - consider_directive_while_skipping): Add static prototypes. - (pass_thru_directive, check_macro_name, cpp_expand_to_buffer, - cpp_pedwarn_with_file_and_line): Constify a char*. - - * cpplib.h (cpp_options, include_hash, progname, definition, - cpp_pedwarn_with_file_and_line, cpp_expand_to_buffer, - check_macro_name, cpp_pfatal_with_name, cpp_file_line_for_message, - find_include_file, deps_output, include_hash): Constify a char*. - - * cppmain.c (progname): Constify. - (main): Add prototype. Use return, not exit. - - * fix-header.c (fatal, add_symbols, lookup_std_proto, write_lbrac, - recognized_macro, check_macro_names, read_scan_file, write_rbrac, - inf_skip_spaces, inf_read_upto, inf_scan_ident, inf_scan_ident, - check_protection): Add static prototype. - (xfree): Remove. - (progname, recognized_macrom, recognized_extern): Constify a char*. - (main): Add prototype. - - * gen-protos.c (progname): Constify a char*. - -Tue Sep 7 00:47:52 1999 Mark Mitchell - - * emit-rtl.c (free_emit_status): Take decl as a parameter. - (init_emit_once): Add more GC roots. - * except.c (mark_func_eh_entry): New function. - (mark_eh_node): Mark false_label and rethrow_label. - (init_eh): Add more GC roots. - * function.c (free_after_compilation): Take decl as a parameter. - Call free_stmt_status. - (mark_function_state): Don't assume x_parm_reg_stack_loc is - non-NULL. - * function.h (free_after_compilation): Change prototype. - (free_varasm_status): Likewise. - (free_emit_status): Likewise. - (free_stmt_status): New function. - * ggc-simple.c (rtx, vecs, trees, strings, bytes_alloced_since_gc): - Remove, replacing with ... - (ggc_status): New structure. - (ggc_chain): New variable. - (init_gcc): Define. - (ggc_push_context): New function. - (ggc_pop_context): Likewise. - (ggc_alloc_rtx): Adjust for use of ggc_chain. - (ggc_alloc_rtvec): Likewise. - (ggc_alloc_tree): Likewise. - (ggc_alloc_string): Likewise. - (ggc_mark_rtx): Mark NOTE_SOURCE_FILE and NOTE_RANGE_INFO. - (ggc_mark_tree): Give language-dependent code a chance to mark - `x' nodes. - (ggc_mark_tree_varray): Handle empty arrays. - (ggc_collect): Adjust for use of ggc_chain. Clear - bytes_alloced_since_last_gc. - * ggc.h (ggc_pop_context): New function. - (ggc_push_context): Likewise. - * print-tree.c (print_node): Don't print obstacks when GC'ing. - * stmt.c (free_stmt_status): New function. - (init_stmt_for_function): Clear last_expr_value. - * toplev.c (rest_of_compilation): Always call free_after_compilation. - Conditionalize call to ggc_collect. - (main): Call init_ggc. - * tree.c (push_obstacks): Do the push, even when GC'ing. - (push_obstacks_nochange): Likewise. - (pop_obstacks): Liekwise. - * varasm.c (free_varasm_status): Take decl as a parameter. - -Tue Sep 7 08:15:49 1999 Gavin Romig-Koch - - * config/mips/mips.h (MULTILIB_ENDIAN_DEFAULT) : New macro. - (MULTILIB_ENDIAN_DEFAULT) : Use the new macro. - * config/mips/elf64.h (MULTILIB_DEFAULTS) : Use the new macro. - * config/mips/r3900.h (MULTILIB_DEFAULTS) : Use the new macro. - -Tue Sep 7 03:42:45 1999 Mark Klein (mklein@dis.com) - - * pa/x-pa-mpeix: New file for the MPE port. - - * pa/quadlib.asm: New file for long double support. - - * configure.in: Add hppa1.0-*-mpeix for MPE port. - * configure: Rebuilt. - -Tue Sep 7 10:08:40 1999 Andreas Schwab - - * final.c (shorten_branches): Fix last change. - -Tue Sep 7 00:30:32 1999 Jeffrey A Law (law@cygnus.com) - - * pa.h (ASM_OUTPUT_DOUBLE_INT): Delete. - -Mon Sep 6 22:44:47 1999 Jeffrey A Law (law@cygnus.com) - - * Merge from gcc2 snapshot Jan 9, 1999. See FSFChangeLog for - details. - -Mon Sep 6 22:31:28 1999 Kaveh R. Ghazi - - * c-aux-info.c (concat): Don't define. - - * cccp.c (my_strerror): Likewise. All callers changed to use - xstrerror instead. - (do_include): Call xstrdup, not xmalloc/strcpy. - (grow_outbuf): Don't check if xrealloc returns NULL, it can't. - (xmalloc, xrealloc, xcalloc, xstrdup): Don't define. - - * collect2.c (my_strsignal): Likewise. All callers changed to use - strsignal instead. - (locatelib): Call xstrdup, not xmalloc/strcpy. - - * 1750a.h (ASM_OUTPUT_INTERNAL_LABEL): Call xmalloc, not malloc. - - * dsp16xx.c (override_options): Call xstrdup, not xmalloc/strcpy. - - * i370.h (ASM_DECLARE_FUNCTION_NAME): Call xmalloc, not malloc. - - * mips.c (build_mips16_call_stub): Call xstrdup, not xmalloc/strcpy. - - * cppinit.c (cpp_options_init): Call xcalloc, not xmalloc/bzero. - - * dwarfout.c (dwarfout_init): Call concat, not xmalloc/strcpy/... - - * except.c (new_eh_region_entry): Call xmalloc/xrealloc, not - malloc/realloc. - (find_all_handler_type_matches): Likewise. Don't check return - value. - (get_new_handler, init_insn_eh_region, process_nestinfo): Call - xmalloc, not malloc. - (init_eh_nesting_info): Likewise. Call xcalloc, not xmalloc/bzero. - - * gcc.c (xstrerror, xmalloc, xrealloc): Don't define. - (init_spec): Call xcalloc, not xmalloc/bzero. - (set_spec): Call xstrdup, not save_string. - (record_temp_file): Call xstrdup, not xmalloc/strcpy. - (find_a_file): Call xstrdup, not xmalloc/strcpy. - (process_command): Call xstrdup, not save_string. - (main): Call xcalloc, not xmalloc/bzero. - - * gcov.c (xmalloc): Don't define. - (create_program_flow_graph): Call xcalloc, not xmalloc/bzero. - (scan_for_source_files): Call xstrdup, not xmalloc/strcpy. - (output_data): Call xcalloc, not xmalloc/bzero. - - * haifa-sched.c (schedule_insns): Call xcalloc, not xmalloc/bzero. - - * mips-tdump.c (xmalloc): Don't define. - (print_symbol): Call xmalloc, not malloc. - (read_tfile): Call xcalloc, not calloc. - - * mips-tfile.c (xfree, my_strsignal, xmalloc, xcalloc, xrealloc): - Don't define. All callers of xfree/my_strsignal changed to use - free/strsignal instead. - (allocate_cluster): Call xcalloc, not calloc. - - * objc/objc-act.c (lang_init): Call concat, not xmalloc/strcpy/... - Fix memory leak, free allocated memory. - - * prefix.c (translate_name): Call xstrdup, not save_string. - (update_path): Likewise. - - * profile.c (branch_prob): Call xstrdup, not xmalloc/strcpy. - - * protoize.c (xstrerror, xmalloc, xrealloc, xfree, savestring2): - Don't define. Callers of xfree/savestring2 changed to use - free/concat instead. - - * reload1.c (reload): Call xcalloc, not xmalloc/bzero. - (init_elim_table): Likewise. - - * resource.c (init_resource_info): Likewise. - - * stupid.c (stupid_life_analysis): Likewise. - - * toplev.c (xmalloc, xcalloc, xrealloc, xstrdup): Don't define. - (open_dump_file): Call concat, not xmalloc/strcpy/... - (clean_dump_file): Likewise. - (compile_file): Call xstrdup, not xmalloc/strcpy. - -Mon Sep 6 15:04:55 1999 Richard Henderson - - * v850.h (EXPAND_BUILTIN_VA_ARG): New. - * v850.c (v850_va_arg): New. - -Tue Sep 7 09:36:01 1999 Michael Hayes - - * haifa-sched.c: Tidy comments. - -Mon Sep 6 14:30:13 1999 Bernd Schmidt - - * Makefile.in (C_AND_OBJC_OBJS): Remove ggc-callbacks.o. - (c-parse.o, c-decl.o, c-lang.o, c-lex.o, c-common.o, - $(out_object_file)): Depend on ggc.h. - * c-common.c: Include "ggc.h". - (combine_strings): If doing GC, use ggc_alloc_string. - * c-decl.c: Include "ggc.h". - (ggc_p): Define with value 0. - (mark_binding_level): New function. - (init_decl_processing): Add GC roots. - (mark_c_function_context): New function. - (lang_mark_false_label_stack): New function. - (lang_mark_tree): New function. - (lang_cleanup_tree): New function. - * c-lang.c: Include "ggc.h". - (lang_init): Call c_parse_init. - * c-lex.c: Include "ggc.h". - (check_linenum): If doing GC, don't copy filenames to permanent - obstack. - * c-parse.in: Include "ggc.h". - (c_parse_init): New function. - * c-tree.h (c_parse_init, mark_c_function_context): Declare. - * objc/Make-lang.in (objc-parse.o): Depend on ggc.h. - - * except.c (mark_eh_state): Mark more state. - * function.c (mark_function_state): Likewise. - * ggc-simple.c (ggc_alloc_rtvec): Bring in sync with non-gc version. - (ggc_alloc_string) [GGC_DUMP]: Fix typo. - * toplev.c (mark_file_stack): New function. - (compile_file): If doing GC, use ggc_alloc_string on input filename. - (main): Add root for input_file_stack. - - * i386.c: Include "ggc.h". - (ix86_mark_machine_status): New function. - (override_options): Set mark_machine_status. - -Mon Sep 6 15:26:23 1999 Bernd Schmidt - - * tree.c (copy_node): Copy node contents also if doing GC. - -Mon Sep 6 08:42:06 1999 Alexandre Oliva - - * collect2.c (scan_libraries): Fix double-thinko :-). - -Mon Sep 6 02:42:36 1999 Jeffrey A Law (law@cygnus.com) - - * collect2.c (scan_libraries): Fix thinko. - - * cse.c (delete_trivially_dead_insns): Do not skip the last - insn if it is a real insn. - -Sun Sep 5 18:57:42 1999 Mark Mitchell - - * Makefile.in (ggc-simple.o): Depend on hash.h. - * ggc.h (ggc_add_tree_hash_table_root): Declare. - (ggc_mark_tree_varray): Likewise. - (ggc_mark_tree_hash_table): Likewise. - * ggc-simple.c: Include hash.h. - (ggc_mark_tree_hash_table_ptr): New function. - (ggc_mark_tree_hash_table_entry): Likewise. - (ggc_mark_tree_hash_table): Likewise. - (ggc_add_tree_hash_table_root): Likewise. - * varray.h (const_equiv_data): Use struct rtx_def *, rather than - rtx, when defining fields. - -Sun Sep 5 18:57:42 1999 Bernd Schmidt - - * profile.c (output_func_start_profiler): Remove apparently - nonsensical call to start_sequence. - -Sun Sep 5 17:34:33 1999 Richard Henderson - - * clipper/clipper.c (clipper_va_start): Fix typos. - - * pyr/pyr.c (pyr_build_va_list, pyr_va_start, pyr_va_arg): New stubs. - * spur/spur.c (spur_build_va_list, spur_va_start): New stubs. - (spur_va_arg): New stub. - - * configure.in: Comment out pyramid. - -Sun Sep 5 19:11:01 1999 Michael Meissner - - * i386.h (MASK_{DEBUG_{ADDR,ARG},INTEL_SYNTAX}): Move so these - don't conflict with the bits that win32, cygwin, and dgux - defines. - -Sun Sep 5 09:31:56 1999 Richard Henderson - Bernd Schmidt - - * integrate.c (function_cannot_inline_p): Do not inline - functions with forced labels. - -Sun Sep 5 00:35:17 1999 Richard Henderson - Bernd Schmidt - Mark Mitchell - - * Makefile.in (ggc-simple.o): Depend on varray.h. - (rtl.o): Depend on ggc.h. - (genattrtab.o): Depend on ggc.h. - (print-tree.o): Likewise. - (fold-const.o): Likewise. - * emit-rtl.c (sequence_element_free_list): Remove, and all references. - (make_insn_raw): Don't cache insns when GC'ing. - (emit_insn_before): Likewise. - (emit_insn_after): Likewise. - (emit_insn): Likewise. - (start_sequence): Use xmalloc to allocate the sequence_stack. - (end_sequence): Add free to free it. - (gen_sequence): Don't cache insns when GC'ing. - (clear_emit_caches): Don't use sequence_element_free_list. - (init_emit): Use xcalloc, not xmalloc+bzero. - * fold-const.c (size_int_wide): Kill the cache, when GC'ing. - * function.c (pop_function_context_from): Use free to free the - fixup_var_refs_queue. - (put_reg_into_stack): Allocate it with xmalloc. - * genattrtab.c: Include ggc.h. - (operate_exp): Don't use obstack_free when GC'ing. - (simplify_cond): Likewise. - (simplify_text_exp): Likewise. - (optimize_attrs): Likewise. - * gengenrtl.c (gendef): Use ggc_alloc_rtx to allocate RTL, when - GC'ing. - (gencode): Generate a #include for ggc.h. - * ggc-callbacks.c (ggc_p): Define it to zero. - * ggc-none.c (ggc_p): Likewise. - * ggc-simple.c: Include varray.h. - (ggc_mark_tree_varray): New function. - (ggc_add_tree_varray_root): Likewise. - (ggc_mark_tree_varray_ptr): Likewise. - * ggc.h (ggc_p): Declare. - (varray_head_tag): Likewise. - (ggc_add_tree_varray_root): Declare. - * print-tree.c (print_node): Don't check for TREE_PERMANENT - inconsistencies when GC'ing. - * rtl.c: Include ggc.h. - (rtvec_alloc): Use ggc_alloc_rtvec when GC'ing. - (rtx_alloc): Use ggc_alloc_rtx when GC'ing. - (rtx_free): Don't call obstack_free when GC'ing. - * toplev.c (rest_of_compilation): Call ggc_collect after every - pass, if GC'ing. - * tree.c (push_obstacks): Do nothing, if GC'ing. - (pop_obstacks_nochange): Likewise. - (pop_obstacks): Likewise. - (make_node): Use ggc_alloc_tree when GC'ing. - (copy_node): Likewise. - (get_identifier): Use ggc_alloc_string when GC'ing. - (build_string): Likewise. - (make_tree_vec): Use ggc_alloc_tree when GC'ing. - (tree_cons): Likewise. - (build1): Likewise. - (type_hash_canon): Don't call obstack_free when GC'ing. - -Sat Sep 4 21:52:32 1999 Richard Henderson - - * haifa-sched.c (schedule_block): Use next_nonnote_insn instead - of NEXT_INSN when examining speculative insns for SCHED_GROUP_P. - -Sat Sep 4 20:40:19 1999 Richard Henderson - Bernd Schmidt - Mark Mitchell - - * Makefile.in (stor-layout.o): Depend on ggc.h. - (expr.o): Depend on ggc.h. - (profile.o): Depend on ggc.h. - (stor-layout.o): Depend on ggc.h. - * emit-rtl.c (init_emit_once): Add gc roots. - * expr.c: Include ggc.h. - (emit_block_move): Add gc roots. - (clear_storage): Likewise. - * expr.h (init_stor_layout_once): New function. - * profile.c: Include ggc.h. - (init_arc_profiler): profiler_label is a root. - * scan.c (make_sstring_space): Trust xrealloc to function - correctly with first parameter NULL. - * stor-layout.c: Include ggc.h. - (set_sizetype): Add gc root. - (init_stor_layout_once): New function. - * toplev.c (compile_file): Call it. - -Sat Sep 4 19:26:25 1999 Richard Henderson - Bernd Schmidt - Mark Mitchell - - * Makefile.in (tree.o): Depend on ggc.h. - (varasm.o): Likewise. - (function.o): Likewise. - (stmt.o): Likewise. - (except.o): Likewise. - (optabs.o): Likewise. - (emit-rtl.o): Likewise. - * emit-rtl.c: Include ggc.h. - (sequence_element_free_list): Remove, and all references. - (mark_sequence): New functions. - (mark_emit_state): New function. - * except.c: Include ggc.h. - (mark_eh_node, mark_eh_stack, mark_eh_queue): New functions. - (mark_tree_label_node): New functions. - (mark_eh_state): New function. - * function.c: Include ggc.h. - (mark_temp_slot, mark_function_chain): New functions. - (mark_function_state): New function. - (init_function_once): New function. - * function.h (init_function_once): New function. - * ggc-callbacks.c (lang_mark_false_label_stack): New function. - * ggc.h (label_node): Declare. - (eh_status, emit_status, stmt_status, varasm_status): Likewise. - (lang_mark_false_label_stack): New function. - (mark_temp_slot): Remove declaration. - (mark_function_chain): Likewise. - (mark_eh_state): Adjust prototype. - (mark_stmt_state, mark_emit_state, mark_varasm_state, mark_optab): - Likewise. - * optabs.c: Include ggc.h. - (mark_optab): New function. - (init_optabs): Add gc roots. - * stmt.c: Include ggc.h. - (mark_cond_nesting, mark_loop_nesting): New functions. - (mark_block_nesting, mark_case_nesting, mark_goto_fixup): Likewise. - (mark_stmt_state): New function. - * toplev.c (compile_file): Call init_function_once. - * tree.c: Include ggc.h. - (type_hash): Move declaration earlier in file. - (TYPE_HASH_SIZE, type_hash_table): Likewise. - (init_obstacks): Add gc roots. - (mark_type_hash): New function. - * varasm.c: Include ggc.h. - (mark_pool_constant): New function. - (mark_varasm_state): New function. - -Sat Sep 4 22:28:56 1999 Kaveh R. Ghazi - - * ggc-simple.c (ggc_root, ggc_collect): Wrap prototype with PROTO. - -Sat Sep 4 18:01:45 1999 Bernd Schmidt - - * c-decl.c (struct language_function): Renamed from struct c_function. - Delete elt NEXT. - (c_function_chain): Delete. - (push_c_function_context): New arg F. Don't warn about nested - functions here. Fill LANGUAGE elt of F. Delete code to update - c_function_chain. Don't call push_function_context. - (pop_c_function_context): New arg F. Restore from there instead of - from c_function_chain. Don't call pop_function_context. Clear out - LANGUAGE field of F when done. - * c-lang.c: Include "function.h" - (lang_init): Initialize save_lang_status and restore_lang_status. - * c-parse.in (nested_function, nested_function_notype): Warn about - nested functions. Call push_function_context/pop_function_context - instead of the _c_ variants. - * c-tree.h (push_c_function_context, pop_c_function_context): Update - prototype. - * Makefile.in (c-lang.o): Update dependencies. - - * emit-rtl.c (init_emit): Use xmalloc to allocate regno_reg_rtx, - regno_pointer_flag, regno_pointer_align. - (gen_reg_rtx): Use xrealloc to enlarge them. - (free_emit_status): New function. - * function.c (mark_machine_status, mark_lang_status): New variables. - (assign_stack_local_1): Renamed from assign_outer_stack_local. Merge - in some bits from assign_stack_local. All callers changed to use new - name. - (assign_stack_local): Just call assign_stack_local_1. - (free_after_compilation): New function. - (put_reg_into_stack): Simplify to always call assign_stack_local_1. - (trampoline_address): Likewise. - (assign_parms): Use xcalloc/xrealloc to allocate parm_reg_stack_loc. - (prepare_function_start): Explicitly clear some more variables. - * function.h (struct function): New elt can_garbage_collect. - (mark_machine_status, mark_lang_status): Declare variables. - (free_after_compilation, free_emit_status, free_varasm_status, - init_varasm_status): Declare functions. - * toplev.c (rest_of_compilation): Call free_after_compilation when - done with the current function. - * varasm.c (free_varasm_status): New function. - -Sat Sep 4 17:15:13 1999 Richard Henderson - - * sparc.h (EXPAND_BUILTIN_VA_START): Define. - (EXPAND_BUILTIN_VA_ARG): Define. - * sparc.c (sparc_va_start): New. - (sparc_va_arg): New. - -Sun Sep 5 11:11:59 1999 Michael Hayes - - * config/c4x/c4x.h (DBR_OUTPUT_SEQEND): Use XVECEXP not XEXPs. - -Sun Sep 5 10:13:19 1999 Michael Hayes - - * config/c4x/c4x.h (CALLER_SAVE_PROFITABLE): Disable. - -Sat Sep 4 13:44:01 1999 Mark Mitchell - - * Makefile.in (C_AND_C_OBJS): Add gcc-callbacks.o. - (OBJS): Add $(GGC). - (ggc-callbacks.o): New target. - * ggc-callbacks.c: New file. - -Sat Sep 4 22:53:13 1999 Bernd Schmidt - - * expr.h: Collapse individual optab and libfunc vars to arrays. - (optab_index, libfunc_index): New enumerations. - (optab_table, libfunc_table): New arrays. - Add accessor macros for both. - - * optabs.c (optab_table, libfunc_table): New. - Delete declarations for individual optab and libfunc vars. - -Sat Sep 4 12:57:17 1999 Richard Henderson - - * i386/sco5.h (RETURN_POPS_ARGS): Name change ix86_return_pops_args. - -Sat Sep 4 11:19:52 1999 Richard Henderson - - * Makefile.in (GGC, GGC_LIB): New. - (HOST_RTL): Include ggc-none.o. - (ggc-simple.o): New target. - (ggc-none.o): Likewise. - * tree.h (tree_common): Add gc_mark. - * rtl.h (struct rtx_def): Steal a bit from code to make gc_mark. - (struct rtvec_def): Add gc_mark. - * emit-rtl.c (global_rtl): Update static initializers to contain - enough initializers. - * ggc.h, ggc-none.c, ggc-simple.c: New files. - * toplev.c (gc_time): New variable. - (all_time): New variable. - (compile_file): Print gc time. - (print_time): Calculate percentage of the whole. - -Sat Sep 4 13:11:01 1999 Bernd Schmidt - - Change obstack memory management and varasm constant pool handling so - that nested functions are treated like any other functions. - * function.c (init_machine_status): New variable. - (push_function_context_to): Set contains_functions for the outer - function. Don't call save_varasm_status. - (pop_function_context_from): Don't call restore_varasm_status. Don't - set current_function_contains_functions. - (prepare_function_start): Call init_varasm_status rather than - init_const_rtx_hash_table. Call (*init_machine_status) if the pointer - is non-null. - * function.h (struct function) Add field varasm. Delete fields - inline_obstacks, inl_emit, const_rtx_hash_table, first_pool, - last_pool, const_rtx_sym_hash_table, pool_offset, const_double_chain. - (init_machine_status): Declare. - (save_varasm_status, restore_varasm_status): Delete declarations. - (save_tree_status, restore_tree_status): Delete last argument. - * integrate.c (initialize_for_inline): Lose arg COPY. Delete copying - code. All callers changed. - (copy_decl_list, copy_decl_tree, copy_decl_rtls, copy_for_inline, - save_constants_in_decl_trees, restore_constants, save_constants, - save_for_inline_eh_labelmap, save_for_inline_copying): Delete - functions. - (inlining): New variable. - (reg_map, label_map, insn_map, orig_asm_operands_vector, - copy_asm_operands_vector, copy_asm_constraints_vector): Delete - variables. - (save_for_inline_nocopy): Don't save constants. - Don't set inl_emit field in current_function. - (expand_inline_function): Use emit field, not inl_emit, of the inlined - function. Set new variable inlining before - calling copy_rtx_and_substitute. - (copy_rtx_and_substitute): In MEM and SYMBOL_REF cases, handle - constant pool references if inlining is nonzero. - Delete ADDRESS and (most of the) CONST cases. - (output_inline_function): Save and restore current_function/ - current_function_decl. Delete restore_constants code. Don't call - init_const_rtx_hash_table. - * output.h (init_const_rtx_hash_table): Don't declare. - * rtl.h (struct function): Declare. - (get_pool_constant_for_function, get_pool_mode_for_function): Declare. - * toplev.c (rest_of_compilation): Don't treat nested functions or - functions containing them specially. Delete all code to deal with - save_for_inline_copying. - * tree.c (toplev_inline_obstacks, extra_inline_obstacks, - inline_obstacks): Delete variables. - (save_tree_status): Lose arg CONTEXT. All callers changed. - Simply allocate a new function_maybepermanent_obstack for the new - function, delete all the special cases. - Don't save inline_obstacks. - (restore_tree_status): Lose arg CONTEXT. All callers changed. - Delete special handling for function_maybepermanent_obstack; simply - free it if empty. - Don't restore inline_obstacks. - (permanent_allocation): Delete code that frees inline_obstacks. - (print_inline_obstack_statistics): Delete function. - (dump_tree_statistics): Don't call it. - * varasm.c (struct varasm_status): New. - (const_rtx_hash_table, const_rtx_sym_hash_table, first_pool, - last_pool, pool_offset, const_double_chain): Delete global - variables, replace with accessor macros. - (immed_double_const): Don't walk const_double_chain outside a - function, but don't treat nested functions specially anymore. - (immed_real_const_1): Likewise. - (clear_const_double_mem): Don't treat nested functions specially. - (init_const_rtx_hash_table): Deleted, code moved to init_varasm_status. - (save_varasm_status, restore_varasm_status): Delete functions. - (init_varasm_status): New function. - (force_const_mem): Don't treat nested functions specially. - (find_pool_constant): Accept new arg F, search for constants in - that function's pool rather than the current one. All callers - changed. - (get_pool_constant_for_function, get_pool_mode_for_function): New - functions. - - * i386.c (init_386_machine_status): New function, mostly from - clear_386_stack_locals. - (struct machine_functions): Rename element names to avoid name - clashes. - (pic_label_rtx, pic_label_name, i386_stack_locals): New accessor - macros, replacing global variables. - (clear_386_stack_locals, save_386_machine_status, - restore_386_machine_status): Delete functions. - (override_options): Initialize init_machine_status. - * i386.h (INIT_EXPANDERS): Delete macro. - (save_386_machine_status, restore_386_machine_status, - clear_386_stack_locals): Delete declarations. - -Sat Sep 4 16:56:28 1999 Michael Hayes - - * config/c4x/c4x.md (rptb_init): Renamed from *rptb_init. - (doloop_begin): Simplify pattern and use emit_jump_insn. - (doloop_end): Simplify pattern, switch operand order, - and use emit_jump_insn. - -Fri Sep 3 19:02:38 1999 Bernd Schmidt - - * function.h (struct function): Add new element LANGUAGE. - (save_lang_status): Declare new variable. - (restore_lang_status): Likewise. - * function.c (save_lang_status): Define. - (restore_lang_status): Likewise. - (push_function_context_to): Call language-specific save function. - (pop_function_context_from): Call language-specific restore function. - -Fri Sep 3 01:16:18 1999 Alasdair Baird - - * i386.md (movsf_1): Check REG_P before use of REGNO. - (movdf_1): Likewise. - (movxf_1): Likewise. - (extendsfdf2): Likewise. - (extendsfxf2): Likewise. - (extenddfxf2): Likewise. - -Sat Sep 4 11:37:15 1999 Michael Hayes - - * config/c4x/c4x.c (c4x_emit_move_sequence): Do not force large - constants into memory. - (c4x_shiftable_constant): New function. - * config/c4x/c4x.c (LEGITIMATE_CONSTANT_P): Allow any CONST_INT. - (c4x_shiftable_constant): Declare. - * config/c4x/c4x.md (loadqi_big_constant, loadhi_big_constant, - ashlqi3_noclobber): Add new patterns and associated splitters. - -Fri Sep 3 16:22:17 1999 Richard Henderson - - * dbxout.c (dbxout_init): Use xcalloc instead of xmalloc+bzero. - * dwarf2out.c (dwarf2out_frame_init): Likewise. - * final.c (shorten_branches): Likewise. - * global.c (global_alloc): Likewise. - * haifa-sched.c (build_control_flow): Likewise. - * stmt.c (check_for_full_enumeration_handling): Likewise. - (estimate_case_costs): Likewise. - -Fri Sep 3 15:49:56 1999 Mark Mitchell - - * rtl.h (RTL_CHECKC2): Fix typo in last change. - -Fri Sep 3 15:13:34 1999 Richard Henderson - - * flow.c (propagate_block): Use XEXP not SET_DEST for a USE. - (recompute_reg_usage): Likewise. - * rtlanal.c (find_regno_fusage): Likewise. - - * rtl.c (rtl_check_failed_code1): New function. - (rtl_check_failed_code2): New. - * rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args. - (RTL_CHECKC1, RTL_CHECKC2): New. - (XC*): New accessor macros. - (NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them. - (ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise. - (CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise. - (ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise. - (TRAP_*, RANGE_INFO_*): Likewise. - -Fri Sep 3 15:10:20 1999 Kaveh R. Ghazi - - * Makefile.in (tlink.o): Don't depend on toplev.h. - - * collect2.c (c_file, o_file, export_file, import_file, ldout, - output_file, nm_file_name, ldd_file_name, strip_file_name, - c_file_name, prefix_list, libexts, is_ctor_dtor, find_a_file, - add_prefix, prefix_from_env, prefix_from_string, do_wait, - fork_execute, maybe_unlink, add_to_list, - extract_init_priority, write_list, dump_list, - dump_prefix_list, write_list_with_asm, write_c_file, - write_c_file_stat, write_c_file_glob, scan_prog_file, - scan_libraries, is_in_list, resolve_lib_name, use_import_list, - ignore_library, extract_string, notice, dump_file, target_machine, - collect_wait, collect_execute, libname, locatelib, aix_std_libs, - read_file, print_load_command): Constify a char*. - (fdopen, error, fatal, fatal_perror): Don't prototype. - (my_strerror): Remove. All callers use xstrerror instead. - (xcalloc, xmalloc, xrealloc, xstrdup, putenv): Remove definitions. - (main): Add prototype. Constify lots of char* ptrs. Change calls - to xcalloc/strcpy/strcat/... to one call to concat. - (main, scan_prog_file, scan_libraries): Use an intermediate - `const char **' to build an argv array. - (mapfile, libselect, libcompare, locatelib): Add prototypes. - - * collect2.h (collect_execute, collect_wait, dump_file, - file_exists): Constify a char*. - (ldout, c_file_name, temporary_obstack, permanent_obstack, - temporary_firstobj, vflag, debug): Add extern declarations. - (fancy_abort, error, notice, fatal, fatal_perror): Add prototypes. - - * tlink.c: Don't include toplev.h. - (vflag, debug, ldout, c_file_name, temporary_obstack, - permanent_obstack, temporary_firstobj): Don't declare. - (tlink_execute, frob_extension, symbol_hash_lookup, - file_hash_lookup, demangled_hash_lookup, tlink_init, freadsym, - recompile_files, read_repo_files, demangle_new_symbols, - scan_linker_output): Constify a char*. - (symbol_hash_newfunc, file_hash_newfunc, demangled_hash_newfunc, - do_tlink): Mark parameters with ATTRIBUTE_UNUSED. - -Fri Sep 3 18:09:24 1999 Andrew Haley - - * config/m68k/m68kelf.h: Set USE_GAS; this makes gcc generate jbsr - (relative) rather than jsr (absolute) subroutine call insns. - * config/m68k/m68k-coff.h: Ditto. - -Fri Sep 3 17:24:31 1999 Richard Earnshaw - - * arm.c (note_invalid_constants): No need to ignore ASMs, we can - now rework these too. - (arm_reorg): If an insn can't reach the end of the current pool, - ensure that we emit that pool before the insn. - -Fri Sep 3 09:14:32 1999 Marc Espie - - * tlink.c (scan_linker_output): Skip the initial underscore in - a mangled name if appropriate. - -Fri Sep 3 01:28:33 1999 Kaveh R. Ghazi - - * objc/objc-act.c (objc_tree_code_type, objc_tree_code_length, - objc_tree_code_name, synth_id_with_class_suffix, warn_with_method, - error_with_ivar, gen_declarator, create_builtin_decl, - my_build_string, generate_descriptor_table, generate_ivars_list, - generate_dispatch_table, check_protocols, TAG_GETCLASS, - TAG_GETMETACLASS, TAG_MSGSEND, TAG_MSGSENDSUPER, TAG_EXECCLASS, - dump_base_name, lang_decode_option, build_encode_expr, - start_class, finish_class, encode_pointer, really_start_method, - gen_declaration, dump_interface, handle_class_ref, handle_impent): - Constify. - (objc_demangle, objc_printable_name, generate_struct_by_value_array): - Add static prototypes. - (build_objc_string_decl, build_selector_reference_decl, - encode_bitfield, build_class_reference_decl): Remove unused - parameter, all callers changed. - (maybe_objc_method_name): Mark with ATTRIBUTE_UNUSED. - (objc_printable_name): Likewise. Change second parameter to type int. - (init_objc): Use memcpy, not bcopy, to avoid casts. - -Thu Sep 2 21:49:52 1999 Richard Henderson - - * reload1.c (eliminate_regs_in_insn): Avoid eliminating the - reg notes on a deleted insn. - * gcse.c (hash_expr_1): Use XWINT on a CONST_DOUBLE. - -Thu Sep 2 20:18:12 1999 Jeffrey A Law (law@cygnus.com) - - * i386.c (ix86_attr_length_default): Handle TYPE_FXCH. - -Thu Sep 2 22:00:08 1999 J"orn Rennecke - - * stmt.c (expand_asm_operands): Fix index into inout_mode when - reading it. - -Thu Sep 2 13:00:48 1999 Richard Henderson - - * stmt.c (expand_asm_operands): Invoke MD_ASM_CLOBBERS if present. - * tm.texi (MD_ASM_CLOBBERS): Document it. - -Thu Sep 2 10:22:40 1999 Richard Henderson - - * dwarf2out.c (dwarf2out_line): Constify `lastfile'. - * except.c (expand_rethrow): Remove unused variable. - * expr.c (do_jump_by_parts_greater_rtx): Likewise. - * flow.c (replace_insns): Likewise. - (create_edge_list, verify_edge_list): Likewise. - * gcse.c (cprop_cc0_jump): Protect declaration with HAVE_cc0. - - * genemit.c (gen_expand): Only emit `operands[N]' decl if there - is special code to run. - (main): Don't define operands to emit_operand. - * genrecog.c (main): Don't emit an empty peephole2_insn function. - - * rtl.h (NOTE_BASIC_BLOCK): Use X0BBDEF. - - * alpha/alpha.h (normal_memory_operand): Declare. - (reg_no_subreg_operand): Declare. - * alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Use HOST_WIDE_INT_PRINT_DEC. - -Thu Sep 2 10:19:20 1999 Richard Henderson - - * c-parse.in (compstmt_primary_start): New, broken out of first - part of compstmt handling in primary. - (primary): Use it. Add an error clause. - (compstmt_nostart): Renamed from compstmt; remove all - initial invocations of compstmt_start. - (compstmt): New. - -Thu Sep 2 01:35:50 1999 Marc Espie - - * protoize.c (gen_aux_info_file): Let pexecute call choose_temp_base if - needed. - -Thu Sep 2 00:43:59 1999 Finn Hakansson - - * combine.c (simplify_shift_const): Remove extra semicolon. - * dwarf2out.c (remove_AT): Likewise. - * expmed.c (expand_mult): Likewise. - * gcov.c (create_program_flow_graph): Likewise. - * reorg.c (mostly_true_jump): Likewise. - -Thu Sep 2 00:06:43 1999 Jeffrey A Law (law@cygnus.com) - - * fold-const.c (fold_range_test): Do not try to fold the range - test if the rhs or lhs has side effects. - - * combine.c (simplify_rtx): Recognize another case of a synthesized - sign extension. - - * varasm.c (mark_constant_pool): When marking indirect references, - only look at SYMBOL_REFs. - - * except.c (expand_fixup_region_end): Do not peek at - INSN_UID (node->entry->outer_context) for flag_new_exceptions. - -Thu Sep 2 13:52:53 1999 Geoffrey Keating - - * flags.h: New variables align_loops, align_loops_log, - align_jumps, align_jumps_log, align_labels, align_labels_log, - align_functions, align_functions_log. - * toplev.c: Define them. - (f_options): Handle -falign-* when they have no argument. - (main): Add logic to set variables for -falign-functions, - -falign-jumps, -falign-labels, -falign-loops. - Make it -fsched-verbose= and -finline-limit=. - (display_help): Change help to match options. - * final.c (LABEL_ALIGN): Default to align_labels_log. - (LABEL_ALIGN_MAX_SKIP): Default to align_labels-1. - (LOOP_ALIGN): Default to align_loops_log. - (LOOP_ALIGN_MAX_SKIP): Default to align_loops-1. - (LABEL_ALIGN_AFTER_BARRIER): Default to align_jumps_log. - (LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to align_jumps-1. - * varasm.c (assemble_start_function): Handle align_functions. - - * config/sparc/sparc.h: Don't declare sparc_align_*. - Don't provide LABEL_ALIGN_AFTER_BARRIER or LOOP_ALIGN. - (DEFAULT_SPARC_ALIGN_FUNCS): Delete; take functionality into - sparc.c. - (FUNCTION_BOUNDARY): Fix incorrect use---it's not just a request, - it's a promise. - * config/sparc/sparc.c: Delete sparc_align_loops, - sparc_align_jumps, sparc_align_funcs and the corresponding string - variables. - (sparc_override_options): Default align_functions on ultrasparc. - Delete -malign-* handling. - - * config/mips/mips.c (override_options): On 64-bit targets, - try to align code to 64-bit boundaries. - (print_operand): New substitution, %~, - which aligns labels to align_labels_log. - * config/mips/mips.md (div_trap_normal): Use %~. - (div_trap_mips16): Likewise. - (abssi): Likewise. - (absdi2): Likewise. - (ffssi2): Likewise. - (ffsdi2): Likewise. - (ashldi3_internal): Likewise. - (ashrdi3_internal): Likewise. - (lshrdi3_internal): Likewise. - (casesi_internal): Likewise. - -Wed Sep 1 21:13:48 1999 Richard Henderson - - Merge new ia32 backend from the branch! - - * i386.h, i386.c, i386.md, reg-stack.c, i386/unix.h: Many changes. - See ChangeLog.P2 on new_ia32_branch for details. - - * rtl.h (stack_regs_mentioned_p): Delete prototype. - * i386/cygwin.h (SUBTARGET_PROLOGUE): No more do_rtl. - * i386/win32.h (SUBTARGET_PROLOGUE): Likewise. - * i386/gas.h (ASM_FILE_START): Define. - * i386/winnt.c (i386_pe_valid_decl_attribute_p): Update - for name change of ix86_valid_decl_attribute_p. - (i386_pe_valid_type_attribute_p): Similarly. - -Wed Sep 1 18:21:23 1999 Richard Henderson - - * emit-rtl.c (init_emit_once): Don't use GET_MODE_WIDER_MODE - to step through CC modes. - -Wed Sep 1 20:18:06 1999 J"orn Rennecke - - * regmove.c (fixup_match_1): Don't move INSN in front of P if - it would end up in the shadow of a live flags regsiter. - -Wed Sep 1 11:32:00 1999 Bernd Schmidt - - * reload1.c: Fix many indentation problems. - * reload.c: Likewise. - -Tue Aug 31 22:08:03 1999 Marc Espie - - * alias.c (non_local_reference_p): Constify fmt. - -Tue Aug 31 23:19:35 1999 Michael Meissner - - * config/i386/xm-cygwin.h (HAVE_DOS_BASED_FILE_SYSTEM): Define. - -Tue Aug 31 16:44:52 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (delete_trivially_dead_insns): Do not delete stores to - the internal_arg_pointer. - -Tue Aug 31 13:35:42 1999 Richard Henderson - - Merge peephole2 from new_ia32_branch: - * Makefile.in (STAGESTUFF): Add *.peephole2. - (mostlyclean): Likewise. - (recog.o): Depend on resource.h. - - * final.c (peephole): Conditionalize decl on HAVE_peephole. - (final_scan_insn): Likewise for the invocation of peephole. - * genconfig.c (main): Look for peephole and peephole2 patterns. - Emit HAVE_peephole* accordingly. - * genpeep.c (main): Conditionalize entire output on HAVE_peephole. - * flags.h (flag_peephole2): Declare. - * toplev.c: New pass peephole2. New flag -fpeephole2. - - * genattrtab.c (main): Count DEFINE_PEEPHOLE2. - * gencodes.c (main): Likewise. - * genextract.c (main): Likewise. - * genoutput.c (main): Likewise. - * genemit.c (max_operand_1): Look for the max scratch operand. - (gen_rtx_scratch): New. - (gen_exp): Use it, and pass on new arg subroutine_type. - (gen_expand): Take max scratch into account. - (gen_split): Emit peephole2 functions. - (output_peephole2_scratch): New. - (main): Include hard-reg-set.h and resource.h. Handle peephole2. - * genrecog.c (routine_type): Add PEEPHOLE2. - (IS_SPLIT): New. - (make_insn_sequence): Match outer parallel for peep2. Discard - top level scratches and dups. - (add_to_sequence): New args insn_type and top. Update all callers. - Handle toplevel peep2 matching insns. - (write_subroutine): Handle peep2. - (write_tree_1): Likewise. - (write_tree): Likewise. - (main): Likewise. - (change_state): New arg afterward. Update all callers. - Handle matching separate insns. - * recog.c (recog_next_insn): New. - (peephole2_optimize): New. - * rtl.def (DEFINE_PEEPHOLE2): New. - * resource.c (find_free_register): New argument last_insn. Use it - to find a register available through the entire span. - * resource.h (find_free_register): Update prototype. - -Tue Aug 31 11:51:06 1999 Jim Kingdon - - * i386.c (output_strlen_unroll): Don't write xops[7] - label if it wasn't set. - -1999-08-31 12:44 -0700 Zack Weinberg - - * cpplib.c (struct directive): Const-ify name pointer and - function pointer prototype. - (validate_else, do_define, do_line, do_include, do_undef, - do_error, do_pragma, do_ident, do_if, do_xifdef, do_else, - do_elif, do_endif, do_sccs, do_assert, do_unassert, - do_warning): Const-ify second arg. - (directive_table): Mark const. Reorder entries by frequency - of usage, record statistics. - -1999-08-31 12:20 -0700 Zack Weinberg - - * rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and - bounds- check RTL accesses if --enable-checking. - (RTVEC_ELT): Bounds check if --enable-checking. - (XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, - XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate. - (XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and - GET_NUM_ELEM. - (X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE, - X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes. - - (ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS. - (NOTE_SOURCE_FILE): Use X0STR. - (NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES, - MEM_ALIAS_SET): Use X0INT. - (NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK, - JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN): - Use X0EXP. - * real.h (CONST_DOUBLE_CHAIN): Use X0EXP. - * rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT. - (rtl_check_failed_bounds, rtl_check_failed_type1, - rtl_check_failed_type2, rtvec_check_failed_bounds): New - functions. - (fancy_abort): Fix comment. - - * cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT. - (cse_insn): Decrement LABEL_NUSES for jump target before - deleting jump insn. - * emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1. - * final.c (alter_subreg): Compute regno before changing x to - REG; set REGNO(x) after changing it. - * flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION - notes containing CONST_INTs. - (delete_eh_regions): Use NOTE_EH_HANDLER. - * function.c (put_reg_into_stack): Make reg a MEM before - initializing it. - (fixup_var_refs_insns): Save REG_NOTES (insn) in case we - delete insn. - (gen_mem_addressof): Make reg a MEM before initializing it. - * integrate.c (copy_rtx_and_substitute): Copy '0' slots with - X0WINT. - * local-alloc.c (update_equiv_regs): Zap REG_NOTES before - deleting an insn, not after. - (block_alloc): Only look at PATTERN(insn) if we have to, and - only if it's format class 'i'. - * loop.c (check_dbra_loop): Check bl->biv->add_val is a - CONST_INT before using its INTVAL. - * print-rtl.c (print_rtx): Use X0STR. - * regmove.c (fixup_match_1): Don't look at PATTERN of - non-class-'i' insn chain elements. - * reload.c (loc_mentioned_in_p): Take address of - in->fld[1].rtx directly. - * reload1.c (reload): Change reg to a MEM before initializing - it. - * varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which - have no names. - * config/i386/i386.md (decrement_and_branch_if_zero): Fix typo. - -Fri Aug 20 13:43:41 1999 Andrew Haley - - * config/mips/mips.c (machine_dependent_reorg): Force a - barrier to output the local constant pool if a barrier hasn't - been found at a natural point in the instruction stream. - -Mon Aug 30 22:04:36 1999 Kaveh R. Ghazi - - * c-parse.in (language_string): Constify. - - * dwarf2out.c (language_string): Remove declaration. - - * dwarfout.c (language_string): Likewise. - - * toplev.c (language_string, init_parse, finish_parse): Likewise. - - * tree.h (language_string, init_parse, finish_parse): Declare. - - * i386/sun386.h (language_string): Remove declaration. - - * mips.h (language_string): Likewise. - - * nextstep.h (language_string): Likewise. - - * nextstep21.h (language_string): Likewise. - - * rs6000.c (language_string): Likewise. - -Mon Aug 30 20:56:08 1999 Kaveh R. Ghazi - - * Makefile.in (OBJS, PROTO_OBJS): Remove getpwd.o. - (getpwd.o): Remove target. - - * getpwd.c: Delete file. Its in libiberty now. - - * dbxout.c (getpwd): Don't prototype. - * dwarf2out.c (getpwd): Likewise - * dwarfout.c (getpwd): Likewise - * final.c (getpwd): Likewise. - * protoize.c (getpwd): Likewise. - -Mon Aug 30 20:21:34 1999 Kaveh R. Ghazi - - * cse.c: (fold_rtx): Cast to HOST_WIDE_INT in left shift. - -Mon Aug 30 16:07:49 1999 Richard Henderson - - * flow.c (new_insn_dead_notes): Use sets_reg_or_subreg not - mark_set_resources. - -Mon Aug 30 12:23:53 1999 Jim Wilson - - * fixinc/Makefile.in (subdir): New. - (fixincl.x, inclhack.sh, fixincl.sh): Use cp instead of $(CP). - (Makefile): New. - -Mon Aug 30 01:02:09 1999 Jeffrey A Law (law@cygnus.com) - - * emit-rtl.c (copy_rtx_if_shared): A MEM which references - virtual_stack_vars_rtx or virtual_incoming_args_rtx can not - be shared. - - * invoke.texi: Fix typo. - - * dwarf2out.c (mem_loc_descriptor): New argument MODE. All callers - changed. Handle autoincrement addressing modes. - - * integrate.c (copy_rtx_and_substitute): Handle internal_arg_pointer - just like we would the virtual incoming args register when - integrating. - -Sun Aug 29 23:17:54 1999 David Edelsohn - - * rs6000.h (ASM_FILE_START): Specify complete filename, including - path, in .file directive. - -Sun Aug 29 05:06:43 1999 Russ Allbery - - * gcc.texi (External Bugs): Remove obsolete note about Perl on - SunOS. - -1999-08-29 08:38 -0700 Zack Weinberg - - * stdbool.h: Make the typedef name _Bool, with bool a #defined - alias. - -Sun Aug 29 09:36:50 1999 Kaveh R. Ghazi - - * tree.c (tree_code_name): Constify a char*. - - * tree.h (tree_code_name, decl_printable_name): Likewise. - - * function.h (struct function): Likewise. - - * toplev.c (decl_name, decl_printable_name): Likewise. - - * vax/vms.h (MAYBE_VMS_FUNCTION_PROLOGUE): Likewise. - - * objc/objc-act.c (decl_printable_name): Remove redundant prototype. - (init_objc): Remove function pointer cast. - -Sun Aug 29 05:01:17 1999 John David Anglin - - * pa.md (interspace_jump): New pattern. - (builtin_longjmp): New expander. - -1999-08-29 Bernd Schmidt - - * fp-bit.c (add, sub, multiply, divide, compare, _eq_f2, _ne_f2, - _gt_f2, _ge_f2, _lt_f2, _le_f2, float_to_si, float_to_usi, negate, - sf_to_df, df_to_sf): Fix potential problem with alias analysis. - -Sun Aug 29 04:30:52 1999 John Wehle (john@feith.com) - - * jump.c (delete_prior_computation): Also check calls - to constant functions. Don't bother checking for a - REG_UNUSED note before adding it. - (delete_computation): Handle multi-word hard registers - when synthesizing missing REG_DEAD notes for a register - which is both set and used by an insn. - -1999-08-29 Michael Hayes - - * loop.c (this_loop_info): New variable. - (loop_has_call, loop_has_volatile, loop_has_tablejump, - loop_continue, loops_enclosed): Replace with fields in this_loop_info. - All uses updated. - (prescan_loop, strength_reduce): New argument loop_info. All callers - updated. - (scan_loop): New variable loop_info, initialize to address of - this_loop_info. - (prescan_loop): Set loop_info->vtop if find NOTE_INSN_LOOP_VTOP. - Delete variable loop_has_multiple_exit targets and replace with - field in this_loop_info. - (find_and_verify_loops): Rename this_loop to this_loop_num. - (strength_reduce): Delete loop_iteration_info. Replace variable - loop_info with function argument of same name. - (insert_bct): Rework test for loop being completely unrolled. - - * loop.h (struct loop_info): New fields num, loops_enclosed, - has_call, has_volatile, has_tablejump, has_multiple_exit_targets, - has_indirect_jump, and cont. Redefine use of unroll_number. - (loop_unroll_number): Delete. - - * unroll.c (unroll_loop): Store loop unroll count in unroll_number - field of loop_info. - (loop_iterations): Delete variable vtop and instead use - loop_info->vtop computed in prescan_loop. - -Sun Aug 29 03:27:23 1999 Scott Weikart - - * fix-header.c (main): Do not pass a null pointer to strcmp. - -Sun Aug 29 03:18:48 1999 William Bader (william@nscs.fast.net) - - * configure.in (i[34567]86-*-sco3.2v4*): Target does not truncate - filenames. - * configure: Rebuilt. - -Sat Aug 28 19:36:05 1999 Jeffrey A Law (law@cygnus.com) - - * jump.c (jump_optimize_1): Do not delete assignments to - internal_arg_pointer. - * cse.c (delete_trivially_dead_insns): Always consider a set of - the internal_arg_pointer live. - -Sat Aug 28 16:24:31 1999 Richard Henderson - - * flow.c (flow_delete_insn_chain): Rename from delete_insn_chain. - (update_life_info) [REG_WAS_0]: Search the original insns rather - than the new insns for the note. Fix typos finding note_dest. - If no dest found, discard the note rather than abort. - [REG_NOALIAS]: Handle as REG_NO_CONFLICT. - (replace_insns): Remove the old insn list after update_life_info - not before. - -Sat Aug 28 16:20:12 1999 Richard Henderson - - * haifa-sched.c (sched_analyze): Clear LOG_LINKS before calling - sched_analyze_insn. - (sched_analyze_1): Let add_dependence care for not adding dups. - (sched_analyze_2): Likewise. - (add_branch_dependences): Likewise. - -Sat Aug 28 15:58:16 1999 Mumit Khan - - * i386/winnt.c (export_list): New type. - (exports_head): Rename to - (export_head): this. - (i386_pe_record_exported_symbol): Add is_data flag. - (i386_pe_asm_file_end): Emit directive for exported variables. - * i386/cygwin.h (i386_pe_record_exported_symbol): Update - prototype. - * i386/cygwin.h (ASM_OUTPUT_COMMON): Specify symbol type. - (ASM_DECLARE_OBJECT_NAME): Likewise. - (ASM_DECLARE_FUNCTION_NAME): Likewise. - * i386/uwin.h (ASM_DECLARE_FUNCTION_NAME): Likewise. - -Fri Aug 27 15:35:24 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (fold_rtx): Work around bug in Sun V5.0 compilers. - - * pa.c (emit_move_sequence): Do not stop on SUBREG_WORD of an - operand. - -Fri Aug 27 14:01:19 1999 Marc Espie - - * config/openbsd.h: Define SET_ASM_OP. - * tm.texi: cross-reference SET_ASM_OP in the index. - -1999-08-27 13:27 -0700 Zack Weinberg - - * rtl.c: Define CONST_DOUBLE_FORMAT to the appropriate format - for a CONST_DOUBLE, at compile time. Initialize rtx_length - and class_narrowest_mode at compile time. Kill init_rtl. - Mark rtx_length, mode_class, mode_size, mode_unit_size, - mode_wider_mode, mode_mask_array, class_narrowest_mode, and - rtx_format as const. Kill all references to EXTRA_CC_MODES or - EXTRA_CC_NAMES. - * rtl.def (CONST_DOUBLE): Use CONST_DOUBLE_FORMAT macro for - format. - * rtl.h: Declare rtx_length and rtx_format as const. - * machmode.def: Define CC(). Use CC() to define CCmode. If - EXTRA_CC_MODES is defined, expand it here. - * machmode.h: Declare mode_class, mode_size, mode_unit_size, - mode_wider_mode, mode_mask_array, and class_narrowest_mode as - const. Kill all references to EXTRA_CC_MODES. - - * toplev.c: Don't prototype or call init_rtl. - * optabs.c: Don't call init_mov_optab. - * genemit.c: Don't generate init_mov_optab. Don't call - init_rtl. - * gengenrtl.c: Duplicate calculation of CONST_DOUBLE_FORMAT - here. - * genattr.c, genattrtab.c, gencodes.c, genconfig.c, - genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c, - genrecog.c: Don't call init_rtl. - - * arc.h, arm.h, c4x.h, i386.h, i960.h, m88k.h, pa.h, pdp11.h, - rs6000.h, sparc.h: Don't define EXTRA_CC_NAMES. Use CC() in - definition of EXTRA_CC_MODES. - - * md.texi: Kill ref to EXTRA_CC_NAMES. - * tm.texi: Document new way to define EXTRA_CC_MODES. - - * genrecog.c: Do not look up the name of a define_split. - (Unrelated bugfix.) - -Fri Aug 27 17:03:42 1999 Nick Clifton - - * config/v850/v850.md: Fix typo introduced by previous delta. - -Fri Aug 27 09:48:59 1999 Kaveh R. Ghazi - - * gcc.c (fatal): Make definition static to match prototype. - -Fri Aug 27 10:33:35 1999 Bernd Schmidt - - * combine.c (get_last_value): Don't look for earlier sets if the last - known set is somewhere in between the insns being combined. - -Fri Aug 27 10:03:12 BST 1999 Nathan Sidwell - - * configure.in: Don't use shell ! to negate exit codes - * configure: Regenerate - -Fri Aug 27 09:36:17 1999 Andreas Schwab - - * function.c (assign_stack_temp_for_type): Fix change of Mar 5 for - the fact that ALIGN is measured in bits, not bytes. - -1999-08-27 00:27 -0700 Zack Weinberg - - * errors.c: New file; defines functions error, warning, and - fatal, variables have_error and progname. - * errors.h: New file; prototypes and decls for stuff in errors.c. - - * Makefile: Add rules to build errors.o and - $(HOST_PREFIX)errors.o. Link genconfig, gencodes, genemit, - genopinit, genrecog, genextract, genpeep, genattr, and - genoutput with errors.o. Add errors.h to deps of genconfig.o, - gencodes.o, genemit.o, genopinit.o, genrecog.o, genextract.o, - genpeep.o, genattr.o, and genoutput.o. - - * genconfig.c, gencodes.c, genemit.c, genopinit.c, genrecog.c, - genextract.c, genpeep.c, genattr.c: Include errors.h. Don't - define or prototype fatal. Set progname at beginning of main. - * genoutput.c: Likewise, and don't define or prototype error - either. - - * c-typeck.c (c_expand_start_case): Return immediately if exp - is an ERROR_MARK. - * fold-const.c (operand_equal_p): Return immediately if arg1 - or arg0 are ERROR_MARKs. - * stor-layout.c (layout_type [case RECORD_TYPE]): Ignore - fields of type ERROR_MARK when calculating if the record can - go in a register. - -Fri Aug 27 01:03:48 1999 Jim Kingdon - with much help from Jeffrey A Law and Richard Henderson - - * i386.md: In the 6 insns which call output_fix_trunc, - earlyclobber operands[0]. - -Fri Aug 27 01:01:51 1999 Philip Blundell - - * jump.c (duplicate_loop_exit_test): Call reg_scan_update after - creating new registers. - -1999-08-26 23:09 -0700 Zack Weinberg - - * i386.h: Declare ix86_cpu_string, ix86_arch_string, - i386_reg_alloc_order, i386_regparm_string, - i386_align_loops_string, i386_align_jumps_string, - i386_align_funcs_string, i386_preferred_stack_boundary_string, - and i386_branch_cost_string as type "const char *". - * i386.c: Define all above strings as type "const char *". - -Thu Aug 26 20:36:30 1999 Jim Wilson - - * dwarf2out.c (output_aranges): Check DWARF_OFFSET_SIZE not PTR_SIZE - when emitting alignment padding. Emit padding byte of 0 instead of 4. - -Thu Aug 26 18:11:20 1999 Mark Mitchell - - * tree.c (array_type_nelts): Don't create RTL_EXPRs from - SAVE_EXPRs unless the SAVE_EXPRs have already been expanded. - -Thu Aug 26 19:33:23 1999 Jim Wilson - - * dwarf2out.c (DWARF2_ASM_LINE_DEBUG_INFO): Add default definition. - (debug_dwarf): Add DWARF2_ASM_LINE_DEBUG_INFO support. - (dwarf2out_line, dwarf2out_finish): Likewise. - * tm.texi (DWARF2_ASM_LINE_DEBUG_INFO): Add documentation. - -Thu Aug 26 16:10:56 1999 Gavin Romig-Koch - - * tree.c (lang_unsave_expr_now) : Correct return type. - * tree.h (lang_unsave_expr_now) : Same. - -Thu Aug 26 13:12:29 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (cint_ok_for_move): Use CONST_INT_OK_FOR_LETTER_P macros - instead of duplicating code. - -Thu Aug 26 18:32:32 1999 Bernd Schmidt - - * gcse.c (hash_scan_insn): Don't scan obvious no-ops. - -1999-08-26 09:42 -0700 Zack Weinberg - - * tree.h: fancy_abort always takes three args. - * resource.c: Move include of system.h before toplev.h. - -Thu Aug 26 09:46:16 1999 Nick Clifton - - * dwarf2out.c (mem_loc_descriptor): Accept LABEL_REFs as well - as SYMBOL_REFs. - -1999-08-25 22:10 -0700 Zack Weinberg - - * system.h: Don't redefine abort or trim_filename. - * rtl.h: Define abort to fancy_abort (__FILE__, __LINE__, 0) - or fancy_abort (__FILE__, __LINE__, __FUNCTION__) depending on - whether or not __FUNCTION__ is available. - * tree.h: Duplicate rtl.h's definition of abort, for files - that don't include rtl.h. Delete all code to perform type - checking with a compiler other than GCC. - * varray.h: Delete all code to perform type checking with a - compiler other than GCC. Make VARRAY_CHECK() always evaluate - its arguments exactly once, using a statement expression. - Adjust the VARRAY_ accessor macros to match. - * toplev.h (fatal_insn, fatal_insn_not_found): Kill. - (_fatal_insn, _fatal_insn_not_found): New fns, take info on - caller's location. Define fatal_insn and fatal_insn_not_found - as macros that use _fatal_insn and _fatal_insn_not_found. - (fancy_abort, trim_filename): Kill prototypes. - - * rtl.c (trim_filename): Move here from toplev.c. - (fancy_abort): New function. - (DIR_SEPARATOR): Provide default definition. - * tree.c (tree_check_failed, tree_class_check_failed): Go - through fancy_abort. - (tree_check, tree_class_check, cst_or_constructor_check, - expr_check): Delete. - * varray.c (varray_check_failed): New function. - * toplev.c (fatal_insn, fatal_insn_not_found): Replace with - _fatal_insn and _fatal_insn_not_found. Go through - fancy_abort. - (trim_filename, fancy_abort): Delete. - - * builtins.c (expand_builtin_args_info): Report ICE with abort. - * except.c (start_catch_handler): Report ICE with error/abort - combo. - * final.c (output_operand_lossage): Likewise. - * flow.c (verify_flow_info): Likewise. - - * gcc.c: Prototype fatal. - * gengenrtl.c: Undef abort after including rtl.h not system.h. - * genattr.c, genattrtab.c, genemit.c, genextract.c, - genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c: - Don't define fancy_abort. - -Wed Aug 25 17:56:59 1999 Richard Henderson - - * optabs.c (emit_cmp_and_jump_insns): Be more thorough in - canonization. - -Wed Aug 25 15:35:55 1999 Richard Henderson - - * m88k.h (VERSION_INFO2): Kill. - (VERSION_STRING): Kill. - (TM_RCS_ID): Kill. - (VERSION_INFO1): Tidy. - (TARGET_VERSION): Update. - * m88k/dgux.h (VERSION_INFO2): Kill. - (ASM_FIRST_LINE): Adjust for death of VERSION_STRING. - * m88k/luna.h (VERSION_INFO1): Tidy. - * m88k/sysv4.h (VERSION_INFO1): Likewise. - * m88k.c (out_rcs_id, tm_rcs_id): Kill. - (output_file_start): Adjust for death of VERSION_STRING. - -1999-08-25 13:51 -0700 Jim Meyering - - * cpplib.c (detect_if_not_defined): New function. - (do_if): Use it to detect potential once-only headers. - -Wed Aug 25 14:00:18 1999 Jason Merrill - - * c-common.c (combine_strings): Always set TREE_CONSTANT. - -Wed Aug 25 15:27:22 1999 Gavin Romig-Koch - - * combine.c (nonzero_bits) : Allow single-ly set registers to be - anywere in the function only if they are pseudos and set before - being used (not live at the start of the function). - (num_sign_bit_copies) : Same. - (get_last_value_validate) : Same. - (get_last_value) : Same. - -Wed Aug 25 11:13:29 1999 Richard Henderson - - * loop.c (express_from): Try harder to unify (* c N) and (* c M) - where N and M are constant and N is an integer multiple of M. - -Wed Aug 25 13:55:47 EDT 1999 Andrew MacLeod - - * sbitmap.h (sbitmap_intersection_of_succs): Add prototype. - (sbitmap_intersection_of_preds, sbitmap_union_of_succs, - sbitmap_union_of_preds): Add prototypes. - * sbitmap.c (sbitmap_intersection_of_succs): New function to compute - the intersection of successors with the new flow graph structures. - (sbitmap_intersection_of_preds): New function to compute the - intersection of predecessors with the new flow graph structures. - (sbitmap_union_of_succs): New function to compute the union of - successors with the new flow graph structures. - (sbitmap_union_of_preds): New function to compute the union of - predecessors with the new flow graph structures. - * gcse.c (compute_rdm, compute_available): Use new sbitmap routines. - (expr_reaches_here_p): Use edge and basic_block structures instead - of s_preds and s_succs. - (compute_cprop_avinout): Use new sbitmap routines. - (pre_expr_reaches_here_p): Use edge and basic_block structures instead - of s_preds and s_succs. - * flow.c (compute_flow_dominators): Compute dominators using - edges and basic blocks instead of s_preds and s_succs. - -Wed Aug 25 13:41:47 EDT 1999 Andrew MacLeod - - * lists.c (unused_insn_list, unused_expr_list): New file for - maintaining various types of lists. New statics for maintaining a - cache of available INSN_LIST and EXPR_LIST nodes. - (free_list): Static function for freeing a list of INSN/EXPR nodes. - (alloc_INSN_LIST): Function to get a free INSN_LIST node. - (alloc_EXPR_LIST): Function to get a free EXPR_LIST node. - (init_EXPR_INSN_LIST_cache): Initialize the cache lists. - (free_EXPR_LIST_list): Free an entire list of EXPR_LIST nodes. - (free_INSN_LIST_list): Free an entire list of INSN_LIST nodes. - (free_EXPR_LIST_node): Free an individual EXPR_LIST node. - (free_INSN_LIST_node): Free an individual INSN_LIST node. - * haifa-sched.c (unused_insn_list, unused_expr_list): Moved to flow.c - (free_list, alloc_INSN_LIST, alloc_EXPR_LIST): Moved to flow.c - (remove_dependence, free_pending_lists): Use new global routines. - (flush_pending_lists, sched_analyze_insn): Use new global routines. - (sched_analyze, compute_block_backward_dependences): Use new routines. - (sched_analyze_1, sched_analyze_2): Use new routines. - (schedule_insns): Use new global routines. - * rtl.h (init_EXPR_INSN_LIST_cache, free_EXPR_LIST_list): Add function - prototypes. - (free_INSN_LIST_list, free_EXPR_LIST_node): Add prototypes. - (free_INSN_LIST_node, alloc_INSN_LIST, alloc_EXPR_LIST): Add function - prototypes. - * toplev.c (rest_of_compilation): Initialize node cache. - * Makefile.in (OBJS): Add lists.o to list of object files. - (lists.o): Add dependencies. - -Wed Aug 25 17:31:56 1999 Nick Clifton - - * config/v850/v850.md: Fix compile time warning messages. - * config/v850/v850.c: Fix compile time warning messages. - * config/v850/v850.h: Fix compile time warning messages. - -Wed Aug 25 09:44:43 1999 Kaveh R. Ghazi - - * genattr.c (gen_attr): Add prototype arguments for get_attr_*(). - Remove unused prototype for `init_lengths'. - -Wed Aug 25 09:32:31 1999 Kaveh R. Ghazi - - * calls.c (emit_call_1): Mark parameter `stack_size' with - ATTRIBUTE_UNUSED. - (expand_call): Initialize variable `insn'. - (emit_library_call): Likewise for variable `high_to_save'. - (emit_library_call_value): Likewise. - (store_one_arg): Likewise for variables `lower_bound' and - `upper_bound'. - - * combine.c (try_combine): Likewise for variables `i2_code_number' - and `other_code_number'. - (find_split_point): Likewise for variables `pos', `unsignedp' and - `inner'. - (simplify_if_then_else): Likewise for variables `op' and `c1'. - (simplify_and_const_int): Remove unused variable `width'. - (merge_outer_ops): Likewise. - - * cse.c (simplify_binary_operation): Cast an INTVAL() to `unsigned - HOST_WIDE_INT' when comparing against one. - (simplify_relational_operation): Likewise. - (cse_insn): Initialize variables `src_eqv_volatile', - `src_eqv_in_memory', `src_eqv_in_struct', `src_eqv_hash' and `sets'. - - * final.c (init_final): Constify parameter `filename'. - (final_start_function): Mark parameter `optimize' with - ATTRIBUTE_UNUSED. - (profile_function): Likewise for parameters `first' and `optimize'. - (output_source_line): Likewise for parameter `file'. - - * integrate.c (subst_constants): Cast a value to `size_t' when - comparing against one. - (mark_stores): Initialize variable `mode'. Cast a value to - `size_t' when comparing against one. - - * integrate.h (MAYBE_EXTEND_CONST_EQUIV_VARRAY): Likewise. - - * loop.c (move_movables): Initialize variable `first'. - (strength_reduce): Likewise for variable `increment'. - (check_dbra_loop): Likewise for variable `comparison_val'. Cast a - value to `size_t' when comparing against one. - (load_mems): Initialize variable `end_label'. - - * output.h (init_final): Constify parameter. - - * reload.c (decompose): Initialize variable `base'. - - * reload1.c (reload): Likewise for variable `is_scalar'. - (spill_hard_reg): Mark parameter `dumpfile' with ATTRIBUTE_UNUSED. - (choose_reload_regs): Initialize variable `mode'. - (emit_reload_insns): Likewise for variable `store_insn'. - (reload_cse_noop_set_p): Mark parameter `insn' with - ATTRIBUTE_UNUSED. - (reload_combine): Initialize variable `set'. - - * unroll.c (unroll_loop): Likewise for variable `local_label'. - (copy_loop_body): Cast a value to `size_t' when comparing against - one. - - * varasm.c (assemble_variable): Initialize variable `size_tree'. - (const_hash): Add an `else abort()' in an if-else-if-else sequence. - (remove_from_pending_weak_list): Mark parameter `name' with - ATTRIBUTE_UNUSED. - -Wed Aug 25 11:18:39 1999 Bernd Schmidt - - * toplev.c (rest_of_compilation): Use decl_printable_name when opening - gcse dump file. - -Wed Aug 25 10:57:12 1999 Nick Clifton - - * config/arm/telf.h (ASM_WEAKEN_LABEL): Define. - (ASM_DECLARE_FUNCTION_NAME): Define. - (TYPE_ASM_OP, SIZE_ASM_OP, TYPE_OPERAND_FORMAT, - ASM_DECLARE_RESULT, ASM_DECLARE_OBJECT_NAME, - ASM_FINISH_DECLARE_OBJECT, ASM_DECLARE_FUNCTION_SIZE): Define if - not already defined. - -Wed Aug 25 01:36:11 1999 John David Anglin - - * calls.c (emit_call_1): Use call_pop/call_value_pop for all values - of n_popped when call/call_value are not defined. - -Wed Aug 25 01:25:14 1999 Jeffrey A Law (law@cygnus.com) - - * tm.texi: GNU CC -> GCC conversion. - (CC1_SPEC): Indicate it is used for all language front ends. - -Tue Aug 24 23:43:03 1999 Mark Mitchell - - * flow.c (delete_block): Spell NOTE_INSN_EH_REGION_BEG and - NOTE_INSN_EH_REGION_END correctly. - -Tue Aug 24 23:26:44 1999 Michael Tiemann - Jeff Law - - * loop.c (strength_reduce): Automatically unroll loops if the - unrolled loop size is smaller than the rolled loop size. - - * loop.c (insert_bct): Replace use of sdiv_optab with asr_optab - and delete comment that code should be rewritten. - -Tue Aug 24 22:56:35 1999 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (find_rgns): Mark a block found during the DFS search - as reachable. - - * haifa-sched.c (get_visual_tbl_length): Fix off-by-one error. - -Tue Aug 24 22:41:06 1999 Mumit Khan - - * fixinc/mkfixinc.sh: Don't fix uwin headers. - * i386/uwin.h (MD_STARTFILE_PREFIX): Define. - (LINK_SPEC): Add -u _main when building executables. - (ASM_DECLARE_FUNCTION): Update from Cygwin. - (ASM_FILE_END): Use the default for ix86-pe. - * i386/xm-uwin.h (HAVE_BCOPY): Undefine. - -Tue Aug 24 20:49:47 1999 Art Haas - - * final.c (output_addr_const): Handle case where ASM_OPEN_PAREN - and ASM_CLOSE_PAREN are empty strings. - -Wed Aug 25 12:46:22 1999 Fred Fish - Geoffrey Keating - - * Makefile.in (PREPROCESSOR_DEFINES): New macro. - (protoize.o): Use PREPROCESSOR_DEFINES and DRIVER_DEFINES. - (unprotoize.o): Ditto. - (test-protoize-simple): Don't define STD_PROTO_DIR. - * protoize.c: Use PARAMS rather than PROTO. Minor whitespace - changes to make 'test-protoize-simple' pass. - (STD_PROTO_DIR): Remove define. - (STANDARD_EXEC_PREFIX): Supply default define. - (standard_exec_prefix): New variable, init to STANDARD_EXEC_PREFIX. - (target_machine): New variable, init to DEFAULT_TARGET_MACHINE. - (target_version): New variable, init to DEFAULT_TARGET_VERSION. - (GET_ENV_PATH_LIST): New macro. - (default_syscalls_dir): No longer initialized to STD_PROTO_DIR. - (do_processing): Initialize default_syscalls_dir using new - macros. Use it to initialize syscalls_absolute_filename. - -Tue Aug 24 16:58:15 1999 Richard Henderson - - * jump.c (jump_optimize_1): Do cmov opt on any single-set; force - B into a register before emit_conditional_move. - -Tue Aug 24 15:37:03 1999 Richard Henderson - - * fold-const.c (fold): Reassociate (+ (+ (* a b) c) (* d e)) - as (+ (+ (* a b) (* d e)) c). Factor a common power-of-two - multiplicand out of (+ (* a b) (* c d)). - -Tue Aug 24 11:46:10 1999 Bob Manson - Richard Henderson - - * haifa-sched.c (split_hard_reg_notes): Move to flow.c - (new_insn_dead_notes): Likewise. - (update_n_sets): Likewise. - (update_flow_info): Move to flow.c, renamed to update_life_info; - extend to handle multiple source insns. - * flow.c: Include resource.h - (unlink_insn_chain): New. - (split_hard_reg_notes): New. - (maybe_add_dead_note): New. - (maybe_add_dead_note_use): New. - (find_insn_with_note): New. - (new_insn_dead_notes): New. - (update_n_sets): New. - (sets_reg_or_subreg_1, sets_reg_or_subreg): New. - (maybe_remove_dead_notes): New. - (update_life_info): New. - (prepend_reg_notes): New. - (replace_insns): New. - * output.h (update_life_info): Declare. - * recog.c (split_block_insns): Use update_life_info. - * resource.c (find_free_register): Use reg_alloc_order, don't use - fixed regs, make sure the mode is supported, don't use new regs. - (reg_dead_p): New. - * rtl.h (replace_insns): Declare. - -Tue Aug 24 13:48:39 1999 Nathan Sidwell - - * expr.c (expand_expr): Cope with COND_EXPRs with one - non-returning branch. - -Mon Aug 23 22:28:16 1999 Mark Mitchell - - * expr.c (store_expr): Always pass down the target, even when not - doing CSE. - -1999-08-24 Nick Clifton - - * configure.in: Define target_cpu_default for v850 targets. - * configure: Regenerate - - * config/v850/v850.h (TARGET_CPU_generic): Define. - (GO_IF_LEGITIMATE_ADDRESS): Insist that SImode and larger constant - addresses are 4 byte aligned. - - * config/v850/v850.c (print_operand): Cope with 'R' format DFmode - addresses. - -Tue Aug 24 09:32:07 1999 Kaveh R. Ghazi - - * genattr.c (function_unit_desc): Constify a char*. Add prototype. - (main): Add prototypes. - - * genattrtab.c (substitute_address, write_const_num_delay_slots, - attr_eq, attr_numeral, attr_equal_p, attr_copy_rtx): Prototype. - (write_attr_get): Emit prototypes along with function definition. - (write_eligible_delay): Mark a parameter with ATTRIBUTE_UNUSED. - (write_complex_function): Emit static prototype along with - function definition. - - * genemit.c (gen_split): Emit prototypes along with function - definition. - - * genoutput.c (output_epilogue): Add prototype to `insn_outfun'. - Likewise for predicates and `insn_operand_predicate'. - (process_template): Emit static prototype along with function - definition. - - * genrecog.c (make_insn_sequence): Constify a char*. Add - prototypes for get_split_*(). - (write_subroutine): Emit prototypes along with function - definition. - -Tue Aug 24 12:35:20 1999 Bernd Schmidt - - * gcse.c (find_avail_set): Follow chains of register-register copies. - Use oprs_not_set_p to guarantee that the returned value can be - substituted. - (cprop_insn): Don't verify the return value of find_avail_set with - oprs_not_set_p. - - * gcse.c (cprop_jump): New function, broken out of cprop_insn. - (cprop_cc0_jump): New function. - (cprop_insn): Break out new function cprop_jump and use it. - Also use cprop_cc0_jump for machines with CC0. - (cprop): Don't crash if cprop_insn turned the insn into a NOTE. - - * tree.h (current_function_calls_setjmp, - current_function_calls_longjmp): Delete declarations. - * dsp16xx.c: Include "function.h". - * elxsi.c: Likewise. - * gmicro.c: Likewise. - * h8300.c: Likewise. - * i370.c: Likewise. - * m32r.c: Likewise. - * mn10200.c: Likewise. - * mn10300.c: Likewise. - * ns32k.c: Likewise. - * spur.c: Likewise. - * v850.c: Likewise. - - * rtl.h (rtx_equal_function_value_matters): Declare. - * toplev.c (rtx_equal_function_value_matters): Don't declare. - * cse.c: Likewise. - * function.c: Likewise. - * emit-rtl.c: Likewise. - -Tue Aug 24 02:47:44 1999 Jeffrey A Law (law@cygnus.com) - - * expr.c (convert_move): Fix arguments to TRULY_NOOP_TRUNCATION - call. - -1999-08-24 Herman A.J. ten Brugge - - * jump.c (delete_barrier_successors) Match (set (pc) (pc)) insn - exactly. - -Mon Aug 23 23:35:52 1999 Matthias Klose - - * cpp.texi: Add a node documenting macro varargs (copied - from extend.texi). - -1999-08-23 22:23 -0700 Zack Weinberg - - * cppspec.c: Put a null pointer at the end of the new argv. - -Mon Aug 23 21:23:24 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in: Remove code to select/de-select the haifa - scheduler. Every scheduled port gets haifa now. - * configure: Rebuilt. - * flags.h, genattrtab.c, rtl.h, toplev.c: Remove HAIFA ifdefs. - * sched.c Deleted. - * Makefile.in: Corresponding changes. - -Mon Aug 23 16:04:13 1999 Bernd Schmidt - - * optabs.c (prepare_cmp_insn): Turn COMPARISON arg into a pointer. - All callers changed. - (prepare_float_lib_cmp): Likewise. - Use FLOAT_LIB_COMPARE_RETURNS_BOOL. - * expr.h (emit_float_lib_cmp): Delete declaration. - * tm.texi (FLOAT_LIB_COMPARE_RETURNS_BOOL): Document. - * sparc.h (FLOAT_LIB_COMPARE_RETURNS_BOOL): Define. - * sparc.md (bcc and scc patterns): Don't handle TFmode comparisons - specially. - (cmptf): Now conditional on TARGET_HARD_QUAD. - -Fri Aug 20 17:52:27 1999 Jim Wilson - - * resource.c (mark_target_live_regs): Use - PIC_OFFSET_TABLE_REG_CALL_CLOBBERED. - -Fri Aug 20 19:07:55 1999 Kaveh R. Ghazi - - * rtl.c (rtx_class, note_insn_name, reg_note_name): Constify. - - * rtl.h (rtx_class, reg_note_name, note_insn_name): Likewise. - - * genopinit.c (gen_insn): Use accessor macro, not `rtx_class'. - -Fri Aug 20 18:53:43 1999 Kaveh R. Ghazi - - * rtl.h (rtx_format): Constify a char*. - - * rtl.c (rtx_format): Likewise. - (copy_rtx, copy_most_rtx, read_rtx): Likewise. - (init_rtl): Use accessor macro, not `rtx_format'. - - * alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a - char*. - - * caller-save.c (mark_referenced_regs): Likewise. - - * combine.c (subst, make_compound_operation, known_cond, - gen_rtx_combine, update_table_tick, get_last_value_validate, - use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise. - - * cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p, - refers_to_p, canon_reg, fold_rtx, cse_process_notes, - count_reg_usage): Likewise. - - * emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags): - Likewise. - - * final.c (leaf_renumber_regs_insn): Likewise. - - * flow.c (mark_used_regs, find_use_as_address, dump_flow_info, - dump_edge_info, count_reg_references): Likewise. - - * function.c (fixup_var_refs_1, walk_fixup_memory_subreg, - fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1): - Likewise. - - * gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p, - oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs, - add_label_notes): Likewise. - - * genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask, - clear_struct_flag, count_sub_rtxs, count_alternatives, - compares_alternatives_p, contained_in_p, walk_attr_value, - write_expr_attr_cache): Likewise. - - * genconfig.c (walk_insn_part): Likewise. - - * genemit.c (max_operand_1, gen_exp): Likewise. - - * genextract.c (walk_rtx): Likewise. - - * genflags.c (num_operands): Likewise. - - * genoutput.c (scan_operands): Likewise. - - * genpeep.c (match_rtx): Likewise. - - * genrecog.c (add_to_sequence): Likewise. - - * haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths): - Likewise. - - * integrate.c (save_constants, copy_for_inline, - copy_rtx_and_substitute, subst_constants, restore_constants): - Likewise. - - * jump.c (mark_jump_label, invert_exp, redirect_exp, - rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise. - - * local-alloc.c (contains_replace_regs, memref_referenced_p): - Likewise. - - * loop.c (record_excess_regs, rtx_equal_for_loop_p, - add_label_notes, replace_call_address, count_nonfixed_reads, - invariant_p, find_single_use_in_loop, find_mem_givs, - find_life_end, maybe_eliminate_biv_1, update_reg_last_use): - Likewise. - - * print-rtl.c (reg_names, print_rtx): Likewise. - - * recog.c (validate_replace_rtx_1, find_single_use_1): Likewise. - - * reg-stack.c (stack_regs_mentioned_p, record_label_references, - record_reg_life_pat, swap_rtx_condition, goto_block_pat, - print_blocks): Likewise. - - * regclass.c (fix_register, record_address_regs, - reg_scan_mark_refs): Likewise. - - * regmove.c (stable_but_for_p): Likewise. - - * reload.c (loc_mentioned_in_p, operands_match_p, - find_reloads_toplevsubst_reg_equivs, find_reloads_address_1, - copy_replacements, refers_to_regno_for_reload_p, - refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p, - reload_when_needed_name, reg_class_names, debug_reload_to_stream): - Likewise. - - * reload1.c (eliminate_regs, scan_paradoxical_subregs, - delete_address_reloads_1, count_occurrences, - reload_cse_mem_conflict_p, reload_combine_note_use, - add_auto_inc_notes): Likewise. - - * resource.c (mark_referenced_resources, mark_set_resources): - Likewise. - - * rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p, - reg_mentioned_p, regs_set_between_p, modified_between_p, - modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p, - rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p, - may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs, - jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise. - - * sched.c (sched_analyze_2, attach_deaths): Likewise. - - * stupid.c (stupid_mark_refs): Likewise. - - * unroll.c (remap_split_bivs): Likewise. - - * varasm.c (mark_constants): Likewise. - - * a29k/a29k.c (uses_local_reg_p): Likewise. - - * alpha/alpha.c (summarize_insn): Likewise. - - * arm/arm.c (symbol_mentioned_p, label_mentioned_p, - eliminate_lr2ip): Likewise. - - * arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise. - - * i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx, - reg_mentioned_in_mem): Likewise. - - * ns32k/ns32k.c (global_symbolic_reference_mentioned_p, - symbolic_reference_mentioned_p): Likewise. - - * romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise. - - * sh/sh.c (regs_used, mark_use): Likewise. - - * vax/vax.c (vax_rtx_cost): Likewise. - -Fri Aug 20 18:38:43 1999 Kaveh R. Ghazi - - * machmode.h (mode_name): Constify a char*. - - * rtl.c (mode_name): Likewise. - - * genopinit.c (gen_insn): Use accessor macro, not `mode_name'. - - * optabs.c (init_libfuncs): Constify a char*. - - * print-tree.c (mode_name): Remove redundant declaration. - (print_node): Use accessor macro, not `mode_name'. - - * reload1.c (dump_needs): Constify a char*. Use accessor macro, - not `mode_name'. - (new_spill_reg): Constify a char*. - - * tree.c (mode_name): Remove redundant declaration. - -Fri Aug 20 18:31:26 1999 Kaveh R. Ghazi - - * rtl.c (rtx_name): Constify a char*. - - * rtl.h (rtx_name, fix_sched_param): Likewise. - - * gmicro/gmicro.c (rtx_name): Remove redundant declaration. - (mypr): Use accessor macro, not `rtx_name'. - - * genemit.c (print_code): Constify a char*. - - * genopinit.c (gen_insn): Use accessor macro, not `rtx_name'. - - * genpeep.c (print_code): Constify a char*. - - * genrecog.c (print_code): Likewise. - - * graph.c (start_fct, start_bb, node_data, draw_edge, end_fct, - end_bb): Add static prototype. - (draw_edge): Constify a char*. - (end_bb): Remove unused parameter. - - * haifa-sched.c (fix_sched_param, safe_concat, print_exp - print_block_visualization): Constify a char*. - -Fri Aug 20 15:02:10 1999 Mark Mitchell - - * c-common.c (c_get_alias_set): Update comment. - -1999-08-20 Andreas Jaeger - - * linux.h (LIB_SPEC): Added. - -Fri Aug 20 22:32:17 1999 Michael Hayes - - * config/c4x/c4x.h (STARTFILE_SPEC): Don't def. - -1999-08-19 18:43 -0700 Zack Weinberg - - * tree.c (expr_check): Fix typo in last change. - -1999-08-19 14:44 -0700 Zack Weinberg - - * rtl.def (NOTE): Change format to "iuu0n". - (ADDR_DIFF_VEC): Change format to "eEee0". - (ADDRESSOF): Change format to "eit". - - * rtl.h (rtvec): Make "elem" an array of rtx, not rtunion. - (RTVEC_ELT): Change to match. - (XVECEXP): Use XVEC and RTVEC_ELT. - (INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER, - ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT. - (PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES, - CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST, - TRAP_CONDITION, TRAP_CODE): Use XEXP. - (INTVAL): Use XWINT. - (ADDRESSOF_DECL): Use XTREE. - (SET_ADDRESSOF_DECL): Delete. - (NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL, - NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill. These have been - ifdefed out since 2.6 at least. - (gen_rtvec_vv): Delete prototype. - - * rtl.h (rtvec_alloc): rt->elem is now an array of rtx, - not rtunion. - (copy_most_rtx): Handle 't' format letter. - * emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx. - (gen_rtvec_vv): Delete function. All callers changed to use - gen_rtvec_v instead. - * print-rtl.c (print_rtx): Move special casing of NOTEs to - the '0' format letter. - - * function.c (gen_mem_addressof): Don't use - SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF - instead. - * integrate.c (copy_rtx_and_substitute): Likewise. - Copy 't' slots with XTREE. - (subst_constants): Treat 't' slots like '[swi]' slots. - * cse.c (canon_hash, exp_equiv_p): Treat 't' slots like '0' slots. - * jump.c (rtx_equal_for_thread_p): Likewise. - * rtlanal.c (rtx_equal_p): Likewise. - * stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes - only four arguments. - * gengenrtl.c (type_from_format): Provide correct types for - 'b' and 't' slots. - - - * tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK): - If a recent gcc is in use (always in stage2 and beyond), use - statement expressions, so we don't make a function call unless - the check fails. Evaluate arguments exactly once. - (CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1, - TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1): - Delete. - (CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that - they evaluate their arguments exactly once, irrespective of - the compiler in use. - - * tree.c [ENABLE_CHECKING]: Define whichever set of functions - is used by the currently-enabled check macros. This is: - (tree_check_failed, tree_class_check_failed): For gcc. - (tree_check, tree_class_check, cst_or_constructor_check, - expr_check): For other compilers. - - * gencheck.c: Do not define any *_CHECK1 macros. - -Thu Aug 19 14:42:38 1999 Mike Stump - Mark Mitchell - - * c-common.c (c_get_alias_set): Fix support for pointers and - references. - -Thu Aug 19 11:51:22 EDT 1999 John Wehle (john@feith.com) - - * alias.c: Include tree.h. - (nonlocal_reference_p, mark_constant_function): New functions. - * flow.c (life_analysis): Call mark_constant_function. - * rtl.h (mark_constant_function): Declare it. - -Thu Aug 19 15:02:01 1999 Nick Clifton - - * config/rs6000/rs6000.c (rs6000_override_options): Fix test for - unrecognizable switches. - -Wed Aug 18 23:31:57 1999 J"orn Rennecke - - * loop.c (recombine_givs): Set ix field after sorting. - (recombine_givs): Remove bogus index / giv lockstep looping. - -Wed Aug 18 18:20:40 1999 Bernd Schmidt - - * expmed.c (emit_store_flag): If UNSIGNEDP, call unsigned_condition - on CODE. - (emit_store_flag_force): Use do_compare_rtx_and_jump. - (do_cmp_and_jump): Formatting fixes. - * expr.c (do_compare_and_jump): Renamed from compare; changed to call - do_compare_rtx_and_jump instead of compare_from_rtx. - (do_compare_rtx_and_jump): New function; mostly copied from - compare_from_rtx. - (do_jump_for_compare): Delete. - (expand_expr): Use do_compare_rtx_and_jump when handling MAX_EXPR and - MIN_EXPR. - (do_jump): Use do_compare_and_jump or do_compare_rtx_and_jump instead - of compare/do_jump_for_compare pairs. - (do_jump_by_parts_greater): Use do_jump_by_parts_greater_rtx. - (do_jump_by_parts_greater_rtx): Use do_compare_rtx_and_jump instead of - compare_from_rtx/do_jump_for_compare pairs. - (do_jump_by_parts_equality): Likewise. - (do_jump_by_parts_equality_rtx): Likewise. - * expr.h (do_compare_rtx_and_jump): Declare. - * optabs.c (prepare_cmp_insn): New function, contains most of the code - that used to be in emit_cmp_insn. - (cmp_available_p): New function. - (prepare_operand): New function. - (emit_cmp_and_jump_insn_1): New function, contains some code that used - to be in emit_cmp_insn. - (prepare_float_lib_cmp): Renamed from emit_float_lib_cmp; change some - parameters to be pointers; don't emit final compare but modify some of - the values pointed to by the args so the caller can perform the - correct comparison. - (expand_binop): Call emit_store_flag_force with signed forms of - comparison code. - (expand_abs): Use do_compare_rtx_and_jump instead of compare_from_rtx/ - emit_jump_insn pair. - (emit_cmp_and_jump_insn): Use prepare_cmp_insn and - emit_cmp_and_jump_insn_1. Call emit_queue. - (emit_cmp_insn): Just call emit_cmp_and_jump_insns with zero for LABEL - arg. - * flow.c (tidy_fallthru_edge): If HAVE_cc0, verify insn before a - jump sets cc0 before deleting it. - * integrate.c (expand_inline_function): Likewise. - * unroll.c (unroll_loop): Similar changes in several places. - (copy_loop_body): If HAVE_cc0, verify insn before a jump sets cc0 - before deleting it. - -Wed Aug 18 06:37:44 1999 Bernd Schmidt - - * Makefile.in (insn-recog.o): Update dependencies. - * genrecog.c (main): Make generated file include "function.h". - -Sat Aug 14 00:54:57 1999 Geoffrey Keating - - * cse.c (cse_insn): Call never_reached_warning when a jump is - changed to be unconditional. - * flags.h: Declare warn_notreached. - * flow.c (delete_block): Call never_reached_warning when - a block is deleted. - * jump.c (delete_barrier_successors): Call never_reached_warning - when we delete everything after a BARRIER. - (never_reached_warning): New function. - * rtl.h: Declare never_reached_warning. - * toplev.c (warn_notreached): New variable. - (lang_independent_options): Set warn_notreached - when -Wunreachable-code. - (compile_file): We need line numbers for -Wunreachable-code. - -Tue Aug 17 22:06:11 1999 Jan Hubicka - - * haifa-sched.c (insn_unit): Fix typo on out of range test. - * sched.c (insn_unit): Likewise. - -Tue Aug 17 21:57:23 1999 Andreas Schwab - - * combine.c (distribute_notes): Handle REG_EH_RETHROW. - -Tue Aug 17 17:39:43 EDT 1999 Andrew MacLeod - - * flow.c (create_edge_list): Use xmalloc, not malloc. - -Tue Aug 17 01:40:54 1999 Loren Rittle - - * fixinc/inclhack.def (no_double_slash): Do not trash single-line - C-style comments. Do not lose the character before double slash. - -Mon Aug 16 18:08:22 EDT 1999 Andrew MacLeod - - * basic-block.h (struct edge_list): Stucture to maintain a vector - of edges. - (EDGE_INDEX_NO_EDGE, EDGE_INDEX, INDEX_EDGE_PRED_BB, INDEX_EDGE_SUCC_BB, - INDEX_EDGE, NUM_EDGES): New Macros for accessing edge list. - (create_edge_list, free_edge-List, print_edge_list, verify_edge_list): - New function prototypes. - * flow.c (create_edge_list): Function to create an edge list. - (free_edge_list): Discards memory used by an edge list. - (print_edge_list): Debug output showing an edge list. - (verify_edge_list): Internal consistency check for an edge list. - (find_edge_index): Function to find an edge index for a pred and succ. - -Mon Aug 16 11:56:36 1999 Mark Mitchell - - * tree.c (type_hash_add): Use permalloc to allocate nodes in the - hashtable. - -Mon Aug 16 17:04:15 1999 Jorn Rennecke - - * mips.h (CLASS_CANNOT_CHANGE_SIZE): Define. - -Fri Aug 13 15:20:43 1999 Gerald Pfeifer - - * config/i386/freebsd.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. - -Fri Aug 13 10:21:28 1999 Nick Clifton - - * toplev.c (rest_of_compilation): Allow machine dependent - reorganization pass to place information into the RTL dump - file if it so wishes. - -Sun Aug 15 12:41:21 1999 Jim Wilson - - * explow.c (hard_function_value): Use VOIDmode instead of - MAX_MACHINE_MODE. - * stmt.c (expand_return): Likewise. - * stor-layout.c (get_best_mode): Likewise. - - * genemit.c (gen_expand): If next is MATCH_PAR_DUP, then output - emit call instead of emit_insn call. - -Sat Aug 14 15:04:06 1999 Mumit Khan - - * configure.in: Handle --disable/enable-win32-registry. - * install.texi: Document --disable/enable-win32-registry. - * acconfig.h (ENABLE_WIN32_REGISTRY): New macro. - (WIN32_REGISTRY_KEY): New macro. - * prefix.c: Use to enable/disable win32-specific code. - (lookup_key): Use versioned key. - * configure: Regenerate. - * config.in: Likewise. - -Fri Aug 13 17:41:55 1999 Jason Merrill - - * cpplib.c (read_line_number): New fn, split out of... - (do_line): Here. - -Fri Aug 13 14:18:27 1999 Gavin Romig-Koch - - tree.c (lang_unsave_expr_now) : New. - (unsave_expr_now): Call lang_unsave_expr_now. - tree.h (lang_unsave_expr_now) : New. - -Fri Aug 13 00:49:46 1999 Jason Merrill - - * toplev.c (flag_new_exceptions): On by default. - -1999-08-13 Michael Meissner - - * Makefile.in (GCC_FOR_TARGET): Move -B./ after the tooldir -B. - -Fri Aug 13 01:29:57 1999 Alexandre Oliva - - * dwarfout.c (fundamental_type_code): Return FT_boolean for - INTEGER_TYPE with precision==1, it's __java_boolean. - -Thu Aug 12 23:51:04 1999 J"orn Rennecke - - * global.c (prune_preferences): Move some invariants out of the - inner loop. - -Thu Aug 12 15:30:29 1999 Jesse Perry (jap@unx.dec.com) - - * configure.in (alpha*-dec-osf*): Add osf5. - -Sun Aug 1 22:24:03 1999 Philip Blundell - - * configure.in: Rework handling of ARM GNU/Linux slightly. - (arm*-*-linux-gnuoldld): New target. - * configure: Regenerate. - * install.texi (Configurations): Add arm-*-linux-gnu{oldld} and - arm-*-elf. Mention that arm-*-linux-gnuaout is obsolete. - * config/arm/linux-oldld.h: New file. - * config/arm/linux-elf26.h: Don't include linux-elf.h. - (TARGET_DEFAULT, SUBTARGET_LINK_SPEC, SUBTARGET_EXTRA_ASM_SPEC): - Don't define. - * config/arm/linux-elf.h (ASM_SPEC): Define. - (TARGET_DEFAULT, SUBTARGET_EXTRA_LINK_SPEC, - SUBTARGET_EXTRA_ASM_SPEC, CPP_APCS_PC_DEFAULT): Add definitions - for 26-bit APCS and old linker. - (CPP_PREDEFINES): Define `__arm__'; don't define `arm' or - `arm_elf'. - (FP_DEFAULT): Define to FP_SOFT3 for all machines. - * config/arm/linux-aout.h (CPP_PREDEFINES): Define `__arm__'; - don't define `arm' or `arm_elf'. - * config/arm/t-linux (EXTRA_MULTILIB_PARTS, MULTILIB_OPTIONS, - MULTILIB_DIRNAMES): Define. Fix typo in comment. - -Thu Aug 12 10:14:47 1999 Andreas Schwab - - * rtl.texi: Fix typo. - -Wed Aug 11 23:50:57 1999 Jason Merrill - - * invoke.texi (C++ Dialect Options): Add -fms-extensions. - -Wed Aug 11 12:59:37 1999 Mark Mitchell - - * extend.texi (C++ Signatures): Remove node. - * invoke.texi: Remove discussion of -fhandle-signatures, - signature, sigof, __signature__, and __sigof__. - -Wed Aug 11 03:38:25 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (JAVAGC): Removed. - -Wed Aug 11 02:13:26 1999 Mumit Khan - - * i386/cygwin.h (ASM_OUTPUT_ALIGNED_BSS): Define. - -1999-08-11 Mark Elbrecht - - * i386/djgpp.h (ASM_OUTPUT_ALIGNED_BSS): Define. - -1999-08-11 Richard Earnshaw (rearnsha@arm.com) - - * emit-rtl.c (mark_reg_pointer): Don't increase the alignment of - a register that is already known to be a pointer. - -1999-08-11 Bruce Korb - - * fixinc/inclhack.tpl: Only install assert.h conditionally. - * fixinc/inclhack.sh: Regenerated. - * fixinc/fixincl.sh: Regenerated. - -Wed Aug 11 00:34:22 1999 Joe Buck - - * invoke.texi: s/GNU CC/GCC/ for consistency with gcc.texi. - Fix documentation of -ansi flag to describe its C++ behavior. - Remove bogus reference to GCC 2.9. - -Tue Aug 10 17:19:02 1999 Jim Wilson - - * config/sh/sh.c (machine_dependent_reorg): Only call PUT_MODE on - note if it is non-NULL. - -Tue Aug 10 10:47:42 EDT 1999 Andrew MacLeod - - * except.h (eh_nesting_info): Add new structure definition. - (init_eh_nesting_info, free_eh_nesting_info): Add function prototypes. - (reachable_handlers, update_rethrow_references): Add function - prototypes. - * rtl.h (struct rtvec_def): Update comments. REG_EH_RETHROW takes - a rethrow symbol instead of an integer exception region number. - * flow.c (Make_edges): Use new exception nesting routines to determine - which handlers are reachable from a CALL or asynchronous insn. - Don't add an edge for calls with a REG_EH_REGION of -1 to non-local - goto receivers. - (delete_eh_regions): Update rethrow labels, and don't delete - regions which are the target of a rethrow. - * except.c (struct func_eh_entry): Add rethrow_ref field, now we can - avoid overloading the SYMBOL_REF_USED flag. - (rethrow_symbol_map): Use new rethrow_ref field. - (rethrow_used): Use new rethrow_ref field. - (expand_rethrow): REG_EH_RETHROW now has a SYMBOL_REF instead - of an integer. Fix formatting. - (output_exception_table_entry): Use new rethrow_ref field. - (can_throw): Check for EH_REGION_NOTE before deciding - whether a CALL can throw or not. - (scan_region): Call rethrow_used() instead of accessing data structure. - (update_rethrow_references): New function to make sure only regions - which are still targets of a rethrow are flagged as such. - (process_nestinfo): New static function to initialize a handler - list for a specific region. - (init_eh_nesting_info): New function to allocate and initialize - the list of all EH handlers reachable from all regions. - (reachable_handlers): New function to retrieve the list of handlers - reachable from a specific region and insn. - (free_eh_nesting_info): New function to dispose of a list of - reachable handlers. - -Tue Aug 10 10:39:31 EDT 1999 Andrew MacLeod - - * flow.c (split_edge): Set JUMP_LABEL field. - (commit_one_edge_insertion): Set head correctly for insert_before. - When inserting insns, update insn block numbers if allocated. - -Tue Aug 10 09:26:07 1999 Kaveh R. Ghazi - - * dwarf2out.c (dwarf2out_frame_debug_expr, add_incomplete_type, - retry_incomplete_types): Add static prototype. - (stripattributes, dwarf_cfi_name, ASM_OUTPUT_DWARF_STRING, - dwarf_tag_name, dwarf_attr_name, dwarf_form_name, - dwarf_stack_op_name, dwarf_type_encoding_name, add_AT_string, - dwarf2_name, add_name_attribute, lookup_filename, dwarf2out_line, - dwarf2out_start_source_file, dwarf2out_define, dwarf2out_undef): - Constify a char*. - - * dwarf2out.h (dwarf2out_define, dwarf2out_undef, - dwarf2out_start_source_file, dwarf2out_line): Likewise. - -Tue Aug 10 09:21:46 1999 Kaveh R. Ghazi - - * output.h (assemble_name): Constify a char*. - - * varasm.c (UNIQUE_SECTION, assemble_start_function, - assemble_variable, assemble_name): Likewise. - - * dwarf2out.c (ASM_NAME_TO_STRING): Likewise. - - * arm/pe.c (arm_pe_unique_section): Likewise. - - * i386/cygwin.h (STRIP_NAME_ENCODING): Likewise. - - * i386/i386-interix.h (STRIP_NAME_ENCODING): Likewise. - - * i386/interix.c (i386_pe_unique_section): Likewise. - - * i386/win32.h (STRIP_NAME_ENCODING): Likewise. - - * i386/winnt.c (i386_pe_unique_section): Likewise. - - * m32r/m32r.h (ASM_OUTPUT_LABELREF): Likewise. - - * mn10200/mn10200.h (ASM_OUTPUT_LABELREF): Likewise. - - * mn10300/mn10300.h (ASM_OUTPUT_LABELREF): Likewise. - - * pa/pa.c (output_call): Likewise. - - * pa/pa.h (ASM_OUTPUT_MI_THUNK): Likewise. - - * pa/som.h (ASM_OUTPUT_FUNCTION_PREFIX): Likewise. - - * rs6000/rs6000.c (rs6000_output_load_toc_table, output_toc): - Likewise. - - * rs6000/rs6000.h (RS6000_OUTPUT_BASENAME, STRIP_NAME_ENCODING): - Likewise. - - * rs6000/sol2.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - - * rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_INT, - STRIP_NAME_ENCODING, ASM_OUTPUT_LABELREF): Likewise. - - * v850/v850.h (ASM_OUTPUT_LABELREF): Likewise. - -Mon Aug 9 19:54:05 1999 Kaveh R. Ghazi - - * real.c (GET_REAL, PUT_REAL): Use memcpy instead of bcopy. - -Mon Aug 9 19:36:00 1999 Kaveh R. Ghazi - - * tree.h (lang_identify): Constify a char*. - (print_error_function): Add extern prototype. Constify a char*. - - * c-lang.c (lang_identify): Constify a char*. - - * objc/objc-act.c (lang_identify): Constify a char*. - -Mon Aug 9 16:21:53 1999 Bernd Schmidt - - * genpeep.c (main): Make generated file include "function.h". - * arm.c (function_really_clobbers_lr): Delete INLINE_HEADER case. - -Mon Aug 9 10:08:50 1999 Bernd Schmidt - - * Makefile.in: Update dependencies. - * alias.c: Include "function.h" - * c-decl.c: Likewise. - * caller-save.c: Likewise. - * calls.c: Likewise. - * combine.c: Likewise. - * cse.c: Likewise. - * explow.c: Likewise. - * final.c: Likewise. - * global.c: Likewise. - * graph.c: Likewise. - * local-alloc.c: Likewise. - * loop.c: Likewise. - * optabs.c: Likewise. - * profile.c: Likewise. - * recog.c: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * reload.c: Likewise. - * reorg.c: Likewise. - * resource.c: Likewise. - * sched.c: Likewise. - * stupid.c: Likewise. - * config/1750a/1750a.c: Likewise. - * config/a29k/a29k.c: Likewise. - * config/arc/arc.c: Likewise. - * config/arm/arm.c: Likewise. - * config/arm/thumb.c: Likewise. - * config/c4x/c4x.c: Likewise. - * config/clipper/clipper.c: Likewise. - * config/convex/convex.c: Likewise. - * config/fx80/fx80.c: Likewise. - * config/i860/i860.c: Likewise. - * config/m68k/m68k.c: Likewise. - * config/m88k/m88k.c: Likewise. - * config/mips/mips.c: Likewise. - * config/pdp11/pdp11.c: Likewise. - * config/pyr/pyr.c: Likewise. - * config/romp/romp.c: Likewise. - * config/sh/sh.c: Likewise. - * config/tahoe/tahoe.c: Likewise. - * config/vax/vax.c: Likewise. - * config/we32k/we32k.c: Likewise. - * config/sparc/sparc.c: Include "function.h". - (mem_min_alignment): Test current_function rather than - regno_pointer_align. - * config/pa/pa.c: Likewise. - (compute_frame_size): Delete declaration of - current_function_outgoing_args_size. - * config/arc/arc.h (current_function_varargs): Delete declaration. - * config/elxsi/elxsi.h (current_function_calls_alloca): Delete - declaration. - * config/i370/i370.h (current_function_outgoing_args_size): Delete - declaration. - * config/i386/i386.h (FINALIZE_PIC): Delete declaration of - current_function_uses_pic_offset_table. - * config/m68k/a-ux.h (FUNCTION_EXTRA_EPILOGUE): Delete declaration - of current_function_returns_pointer. - * config/m68k/altos3068.h (FUNCTION_EXTRA_EPILOGUE): Likewise. - * config/m68k/linux.h (FUNCTION_EXTRA_EPILOGUE): Likewise. - * config/m68k/m68kv4.h (FUNCTION_EXTRA_EPILOGUE): Likewise. - * config/m68k/mot3300.h (FUNCTION_EXTRA_EPILOGUE): Likewise. - * config/m68k/pbb.h (FUNCTION_EXTRA_EPILOGUE): Likewise. - * config/m68k/tower-as.h (FUNCTION_EXTRA_EPILOGUE): Likewise. - * config/m88k/m88k.c: Include "function.h" - (call_used_regs, current_function_pretend_args_size, - current_function_outgoing_args_size, frame_pointer_needed): Delete - declarations. - * config/m88k/m88k.h (current_function_pretend_args_size): Delete - declaration. - * config/mips/mips.h (current_function_calls_alloca): Delete - declaration. - * config/mn10200/mn10200.h (current_function_needs_context, - rtx_equal_function_value_matters): Delete declarations. - * config/ns32k/ns32k (current_function_uses_pic_offset_table, - flag_pic): Delete declarations. - * config/pa/pa.h (current_function_pretend_args_size, - current_function_decl): Delete declarations. - * config/pa/som.h (current_function_varargs): Delete declaration. - * config/pdp11/pdp11.h (current_function_pretend_args_size): Delete - declaration. - * config/pyr/pyr.h (current_function_pretend_args_size, - current_function_args_size, current_function_calls_alloca): Delete - declarations. - * config/sh/sh.h (current_function_varargs): Delete declaration. - * config/sparc/sparc.h (current_function_outgoing_args_size, - current_function_calls_alloca, current_function_decl): Delete - declarations. - * config/spur/spur.h (current_function_pretend_args_size, - current_function_calls_alloca): Delete declarations. - * config/v850/v850.c (current_function_outgoing_args_size): Delete - declaration. - * config/vax/vms.h (current_function_name): Delete declaration. - * gcse.c: Include "function.h". - (current_function_name, current_function_calls_setjmp): Delete - declarations. - * haifa-sched.c: Include "function.h". - (forced_labels): Delete declaration. - * jump.c: Likewise. - * reg-stack.c: Likewise. - * reload1.c: Likewise. - * genemit.c (main): Make generated file include function.h. - * genoutput.c (output_prologue): Likewise. - - * builtins.c (saveregs_value, apply_args_value): Delete variables. - * emit-rtl.c (reg_rtx_no, first_label_num, first_insn, last_insn, - sequence_rtl_expr, cur_insn_uid, last_linenum, last_filename, - regno_pointer_flag, regno_pointer_flag_length, regno_pointer_align, - regno_reg_rtx, sequence_stack): Delete variables. Add accessor - macros for some of them. - (emit_filename, emit_lineno): Delete declarations. - (gen_reg_rtx): Use memset/memcpy instead of bzero/bcopy. Access - regno_pointer_* variables through current_function. - (gen_inline_header_rtx): Delete function. - (save_emit_status): Delete function. - (set_new_last_label_num): New function. - (clear_emit_caches): New function. - (restore_emit_status): Just clear last_labelnum and call - clear_emit_caches. - (get_last_insn_anywhere): Variable sequence_stack is now accessed - through macro seq_stack. - (add_insn_after): Likewise. - (add_insn_before): Likewise. - (remove_insn): Likewise. - (pop_topmost_sequence): Likewise. - (in_sequence_p): Likewise. - (start_sequence_for_rtl_expr): Likewise. - (start_sequence): Likewise, and likewise for - sequence_rtl_expr/seq_rtl_expr. - (push_topmost_sequence): Likewise. - (end_sequence): Likewise. - (init_virtual_regs): Now takes a "struct emit_status *" argument. - All callers changed. Store into that pointer instead of globals. - (init_emit): Allocate emit elt of current_function. - Changes for sequence_rtl_expr/sequence_stack renaming. - Call clear_emit_caches instead of doing it in-line. - Access regno_pointer_* variables through current_function. - (init_emit_once) Don't clear sequence_stack. - - * expr.c (pending_stack_adjust, inhibit_defer_pop, pending_chain): - Delete variables. - (arg_pointer_save_area): Delete declaration. - (finish_expr_for_function): Renamed from init_queue; no longer static. - (init_expr): Don't call init_queue. - (save_expr_status, restore_expr_status): Delete functions. - (expand_expr): Changes to reflect new layout of struct function. - Don't access current_function_check_memory_usage when current_function - is 0. - * expr.h (forced_labels, save_expr_regs, saveregs_value, - apply_args_value, current_function_calls_alloca, inhibit_defer_pop, - current_function_outgoing_args_size, current_function_arg_offset_rtx, - current_function_uses_const_pool, function_call_count, - current_function_uses_pic_offset_table, nonlocal_labels, - current_function_internal_arg_pointer, nonlocal_goto_stack_level, - current_function_check_memory_usage, nonlocal_goto_handler_slots, - pending_stack_adjust, target_temp_slot_level, temp_slot_level): Delete - declarations. - (finish_expr_for_function): Declare. - * flags.h (current_function_has_nonlocal_label, - current_function_has_nonlocal_goto, current_function_is_thunk, - current_function_has_computed_jump): Delete declarations. - * flow.c (forced_labels): Delete declaration. - * function.c (current_function_pops_args, - current_function_returns_struct, current_function_returns_pcc_struct, - current_function_needs_context, current_function_calls_setjmp, - current_function_calls_longjmp, current_function_has_nonlocal_label, - current_function_has_nonlocal_goto, current_function_is_thunk, - current_function_has_computed_jump, current_function_calls_alloca, - current_function_contains_functions, current_function_returns_pointer, - current_function_epilogue_delay_list, current_function_args_size, - current_function_pretend_args_size, current_function_arg_offset_rtx, - current_function_outgoing_args_size, current_function_varargs, - current_function_stdarg, current_function_args_info, cleanup_label, - current_function_name, current_function_uses_const_pool, - current_function_instrument_entry_exit, current_function_return_rtx, - current_function_uses_pic_offset_table, nonlocal_labels, - current_function_internal_arg_pointer, current_function_cannot_inline, - current_function_check_memory_usage, function_call_count, - nonlocal_goto_handler_slots, nonlocal_goto_handler_labels, - nonlocal_goto_stack_level, return_label, save_expr_regs, - stack_slot_list, rtl_expr_chain, tail_recursion_label, temp_slots, - tail_recursion_reentry, arg_pointer_save_area, frame_offset, - context_display, trampoline_list, parm_birth_insn, invalid_stack_slot, - last_parm_insn, max_parm_reg, parm_reg_stack_loc, sequence_rtl_expr, - temp_slot_level, var_temp_slot_level, target_temp_slot_level): - Delete variables. - (push_function_context_to): Don't save them. Don't call - save_storage_status, save_emit_status or save_expr_status. - (pop_function_context_from): Don't restore them. Don't call - restore_storage_status or restore_expr_status. - (get_func_frame_size): New function. - (get_frame_size): Use it. - (assign_outer_stack_local): Reflect some member name changes in struct - function. - (put_reg_into_stack): Likewise. - (assign_stack_temp_for_type): sequence_rtl_expr was renamed to - seq_rtl_expr. - (fixup_var_refs): Likewise. - (fix_lexical_addr): Likewise. - (trampoline_address): Likewise. - (prepare_function_start): Clear field inlinable of current_function. - (init_function_for_compilation): New function. - (expand_dummy_function_end): New function. - (expand_function_end): Call finish_expr_for_function. - * function.h (struct emit_status): New; fields moved here from struct - function and from global variables. Add accessor macros for some of - the fields. - (struct expr_status): Likewise. - (REGNO_POINTER_ALIGN, REGNO_POINTER_FLAG): Moved here from regs.h. - (struct function): Add fields expr and emit, inlinable, inl_emit, - original_arg_vector, original_decl_initial, inl_last_parm_insn, - inl_max_label_num. Add many comments. - Add accessor macros for all elts of struct function that no longer - have a global variable. - (cleanup_label, return_label, frame_offset, tail_recursion_label, - tail_recursion_reentry, arg_pointer_save_area, rtl_expr_chain, - stack_slot_list): Delete declarations. - (get_func_frame_size): Declare. - (save_expr_status, restore_expr_status, save_emit_status, - save_storage_status, restore_storage_status): Delete declarations. - (init_virtual_regs): Declare. - * output.h (current_function_pops_args, - current_function_returns_struct, current_function_returns_pcc_struct, - current_function_needs_context, current_function_calls_setjmp, - current_function_calls_longjmp, current_function_calls_alloca, - current_function_has_nonlocal_label, current_function_varargs, - current_function_has_computed_jump, current_function_returns_pointer, - current_function_contains_functions, current_function_args_size, - current_function_pretend_args_size, current_function_stdarg, - current_function_outgoing_args_size, current_function_args_info, - current_function_name, current_function_return_rtx, - current_function_epilogue_delay_list, - current_function_uses_const_pool, current_function_cannot_inline): - Delete declarations. - * regs.h (reg_rtx_no, regno_pointer_flag, regno_pointer_flag_length, - regno_reg_rtx): Delete declaration. - (REGNO_POINTER_FLAG): Delete macro. - * stmt.c (expand_goto): Changes to reflect that some fields in struct - function were renamed. - * stor-layout.c (save_storage_status, restore_storage_status): Delete - functions. - * toplev.c: Include "function.h". - (current_function_decl): Delete declaration. - (compile_file): Call init_dummy_function_start and - expand_dummy_function_end around some initializations that need to - emit rtl. - (rest_of_compilation): Use DECL_SAVED_INSNS properly. - Call init_function_for_compilation. - * unroll.c: Include "function.h" - (unroll_loop): Access regno_pointer_* variables through - current_function. - - * tree.h (struct tree_decl): Add elt f to saved_insns member. - (DECL_SAVED_INSNS): use it. - (expand_dummy_function_end): Declare. - (init_function_for_compilation): Declare. - * calls.c (calls_function_1): Change use of DECL_SAVED_INSNS now - that it's no longer an INLINE_HEADER. - (expand_call): Likewise. - * integrate.c (finish_inline): Delete function. - (max_parm_reg, parm_reg_stack_loc): Delete declarations. - (initialize_for_inline): Delete min_labelno, max_labelno and max_reg - args. Don't generate an INLINE_HEADER rtx, just return the arg - vector. All callers changed. - (save_for_inline_copying): Create a duplicate struct emit_status to - hold the emit state for compiling the current function. Use this and - the other new fields in struct function that are for integration - instead of an INLINE_HEADER. - Use memcpy instead of bcopy. - Store the current struct function in DECL_SAVED_INSNS of fndecl. - (save_for_inline_nocopy): Similar changes, except no new emit_status - is needed here. - (expand_inline_function): Get information from function structure, - not from an inline header rtx. - (output_inline_function): Lose code to extract the necessary - information from an inline header; simply put back the function - structure into current_function. Clear its inlinable elt. - * rtl.def (INLINE_HEADER): Delete. - * rtl.h: Delete all accessors for an INLINE_HEADER. - (gen_inline_header_rtx): Delete declaration. - (regno_reg_rtx, regno_pointer_align, nonlocal_goto_handler_labels): - Delete declarations. - (REGNO_POINTER_ALIGN): Delete. - (clear_emit_caches): Declare. - (set_new_last_label_num): Declare. - -Mon Aug 9 01:52:24 1999 Jason Merrill - - * print-tree.c (print_node): Print base for OFFSET_TYPEs. - - * except.c (expand_eh_region_start_for_decl): Always start a new block. - * stmt.c (is_eh_region): Make sure current_function is present, too. - -Mon Aug 9 01:15:24 1999 Jeffrey A Law (law@cygnus.com) - - * pa.h (HARD_REGNO_MODE_OK): Correctly handle FPregs, even when - for 64bit PA targets. - - * pa.h (SELECT_SECTION): Define. - * som.h (SELECT_SECTION): Delete. - -Sun Aug 8 15:13:20 1999 Kaveh R. Ghazi - - * alias.c (init_alias_analysis): Wrap call to - `prologue_epilogue_contains' within HAVE_prologue||HAVE_epilogue. - -1999-08-07 Bruce Korb - - * fixinc/inclhack.def(irix_asm_apostrophe): IRIX 5.2's - contains an asm comment with an apostrophe - * fixinc/inclhack.sh: regen - * fixinc/fixincl.x: regen - -Sat Aug 7 19:37:07 1999 Richard Henderson - - * function.c (init_function_start): Clear prologue & epilogue. - (prologue_epilogue_contains): New function. - * alias.c (init_alias_analysis): Use it. - * rtl.h (prologue_epilogue_contains): Declare it. - -Sat Aug 7 19:32:16 1999 Richard Henderson - - * jump.c (onlyjump_p): New function. - * rtl.h: Declare it. - * flow.c (delete_unreachable_blocks): Use onlyjump_p instead - of condjump_p in calling tidy_fallthru_edge and merge_blocks. - -Sat Aug 7 17:09:36 1999 Richard Henderson - - * global.c (build_insn_chain): Use EXECUTE_IF_SET_IN_REG_SET - to invert loops. Simplify block scanning. - -Sat Aug 7 02:11:13 1999 Bernd Schmidt - - * gcse.c (hash_scan_set): Treat SYMBOL_REFs like CONST_INTs. - (cprop_insn): Treat SYMBOL_REFs like CONST_INTs. - -1999-08-07 Jonathan Larmour - - * config/sparc/liteelf.h: New file to support sparclite-elf target - * config/sparc/t-sp86x: New file to support sparc86x targets - * config/sparc/sp86x-aout.h: New file to support sparc86x-aout target - * config/sparc/sp86x-elf.h: New file to support sparc86x-elf target - * configure.in: Support above target triplets - * configure: Regenerated - -Sat Aug 7 01:39:27 1999 Philippe De Muyter - - * fixinc/server.c (server_setup): Do not prefix function used as - parameter with `&'. - -Sat Aug 7 00:21:20 1999 Richard Henderson - - * alpha.md (movhi and movqi patterns): Correct predicate for !BWX. - Remove fp reg alternatives. - -Sat Aug 7 00:06:54 1999 Jeffrey A Law (law@cygnus.com) - - * Makefiin (TAROUTOPTS): Kill. - (install-headers-tar): Use "xpf" for tar headerfile extraction - * i370/x-oe (TAROUTOPTS): Delete. - * m68k/x-apollo68 (TAROUTOPTS): Delete. - * m68k/x-hp320 (TAROUTOPTS): Delete. - * m68k/x-hp320g (TAROUTOPTS): Delete. - * gcc.texi: Update bug reporting text. - -1999-08-6 Herman A.J. ten Brugge - - * reg-stack.c (change_stack) Fixed problem with negative array index. - -Fri Aug 6 23:08:44 1999 Jeffrey A Law (law@cygnus.com) - - * extend.texi, install.texi: Fix spelling mistakes. - - * Makefile.in (PREMADE_ATTRTAB_MD, PREMADE_ATTRTAB): Delete. - (s-attrtab); No longer try to use pre-made insn-attrtab file. - * mips/t-bsd: Delete references to obsolete PREMADE_ATTRTAB and - PREMADE_ATTRTAB_MD. - * mips/t-ecoff: Likewise. - * mips/t-elf: Likewise. - * mips/t-mips: Likewise. - * mips/t-osfrose: Likewise. - * mips/t-r3900: Likewise. - * mips/t-svr3: Likewise. - * mips/t-svr4: Likewise. - * mips/t-ultrix: Likewise. - - * gcc.texi: Document recommend means to provide software floating - point libraries in libgcc.a - -1999-08-06 Jason Merrill - - * c-lex.c (yylex): We can have a number with no digits. - -Fri Aug 6 16:53:55 EDT 1999 John Wehle (john@feith.com) - - * jump.c (delete_prior_computation): New function, broken - out of delete_computation. Check for side effects with - side_effects_p instead of FIND_REG_INC_NOTE. Handle - multi-word hard registers. - (delete_computation): Use it. Check for side effects with - side_effects_p instead of FIND_REG_INC_NOTE. Synthesize a - missing REG_DEAD note for a register which is both set and - used by an insn. - -Fri Aug 6 11:05:29 1999 Jeffrey A Law (law@cygnus.com) - - * elf.h (TEXT_SPACE_P, FUNCTION_NAME_P): Delete. - (ASM_GLOBALIZE_LABEL, ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT): Likewise. - (ASM_FILE_START): Import _mcount with the right type. - (ASM_DECLARE_FUNCTION_NAME): Define. - (ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL): Define. - * pa.c (output_function_prologue): Always emit the function's label - here. - * pa.h (TEXT_SPACE_P): Define. - (FUNCTION_NAME_P, ENCODE_SECTION_INFO, STRIP_NAME_ENCODING): Likewise. - (ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT, ASM_GLOBALIZE_LABEL): Likewise. - * som.h (TEXT_SPACE_P): Delete. - (FUNCTION_NAME_P, ENCODE_SECTION_INFO, STRIP_NAME_ENCODING): Likewise. - (ASM_GLOBALIZE_LABEL, ASM_OUTPUT_INT): Likewise. - -Thu Aug 5 19:29:39 1999 Jim Wilson - - * expr.c (emit_group_load): Allow src to be a CONCAT. - -Thu Aug 5 22:27:15 1999 J"orn Rennecke - - * config/sh/lib1funcs.asm (___movstrSI0): Change or r0,r0,r0 to nop. - (___mulsi3): Use '!' comment character. - -Thu Aug 5 13:34:14 1999 Bernd Schmidt - - * reload1.c (maybe_fix_stack_asms): Also declare P as "const char *". - -Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com) - - * gcc.c: Update URLs and mail addresses. - * gcc.texi: Likewise. - -Thu Aug 5 01:14:13 1999 Daniel Jacobowitz - - * rs6000.c (current_file_function_operand): Return zero for - weak functions. - (rs6000_encode_section_info): Do not set SYMBOL_REF_FLAG for - weak symbols. - * rs6000.h (ENCODE_SECTION_NIFO): Do not set SYMBOL_REF_FLAG - for weak symbols. - -Thu Aug 5 00:56:30 1999 Geoffrey Keating - - * rs6000.c (rs6000_stack_info): For ABI_V4/ABI_SOLARIS -fpic, always - allocate space in the stack frame for the PIC register. - -Thu Aug 5 00:20:47 1999 Jeffrey A Law (law@cygnus.com) - - * m68k.md (xordi3, anddi3): These patterns are not available on - the coldfire. - -Wed Aug 4 23:39:20 1999 Mark Mitchell - - * real.c (GET_REAL): Don't violate ANSI/ISO aliasing rules. - (PUT_REAL): Likewise. - -Wed Aug 4 20:45:04 1999 J"orn Rennecke - - * final.c (shorten_branches): Don't add an alignment for loops - that have no label inside. - -Wed Aug 4 16:39:24 1999 Kaveh R. Ghazi - - * builtins.c (expand_builtin_memcmp, expand_builtin_strcmp): Wrap - prototypes in macro HAVE_cmpstrsi. - - * cpplib.c (cpp_get_token): Remove unused label `op3'. - - * emit-rtl.c (operand_subword): Remove unused variable - `bits_per_word'. - - * rtl.c (shallow_copy_rtx): Remove unused variable `format_ptr'. - - * tree.c (chainon): Wrap variable `t2' in macro ENABLE_CHECKING. - -Wed Aug 4 13:29:23 1999 Zack Weinberg - - * cpphash.c (macroexpand): Delete leading whitespace when arg - is concatenated before. - (unsafe_chars): Correct test for whether + and - can extend a - token. - - * cppinit.c (cpp_start_read): Do dependencies for - -include/-imacros files also. - - * cpplib.c (cpp_scan_buffer): In no-output mode, don't bother - tokenizing non-directive lines. - (cpp_expand_to_buffer): Temporarily disable no-output mode. - * cppmain.c: In no-output mode, just call cpp_scan_buffer for - the input file. - -Wed Aug 4 12:53:44 1999 Jason Merrill - - * expr.c (expand_expr, case PLUS_EXPR): Fix parallel case, too. - - * c-lex.c: Sync with C++ frontend. - (linemode): New variable. - (parse_float): imag, conversion_errno, and type are output only. - (yylex): Adjust. Move initial '.' case into main switch. - Use linemode. - (handle_generic_pragma): Just deal with tokens. - (readescape): Use ISXDIGIT and ISGRAPH. - * c-parse.in: Add END_OF_LINE token. - - * c-lex.c (lang_init): Generalize. - (nextchar): Remove. Replace uses with UNGETC. - (skip_white_space): Handle linemode here. Optimize for cpplib. - (skip_white_space_on_line): Remove. - (extend_token_buffer_to): New fn. - (extend_token_buffer): Use it. - (read_line_number, check_newline): Just deal with tokens. - (token_getch, token_put_back): New fns. - (yylex): Use them. More cpplib optimizations. Simplify. - -Wed Aug 4 12:53:44 1999 Michael Tiemann - Jason Merrill - - * c-lex.c (init_parse): Set cpp_token to CPP_DIRECTIVE. - (consume_string): Make this smart about USE_CPPLIB. - (check_newline): Rewrite to be intelligent about USE_CPPLIB. - (yylex): Rewrite to be intelligent about USE_CPPLIB. - Also, clean up cases where we redundantly set token_buffer[0]. - (read_line_number): New fn. - (ignore_escape_flag): New variable. - -Wed Aug 4 13:12:17 1999 Jeffrey A Law (law@cygnus.com) - - * a29k/t-a29kbare: Fix some comments. - (LIB2FUNCS_EXTRA): Remove fp-bit.c and dp-bit.c - (FPBIT, DPBIT): Define. - * a29k/t-vx29k: Likewise. - * arc/t-arc: Likewise. - * arm/t-arm-elf: Likewise. - * arm/t-bare: Likewise. - * arm/t-pe: Likewise. - * arm/t-pe-thumb: Likewise. - * arm/t-semi: Likewise. - * arm/t-thumb: Likewise. - * arm/t-thumb-elf: Likewise. - * arm/t-thumb-linux: Likewise. - * h8300/t-h8300: Likewise. - * i960/t-i960: Likewise. - * i960/t-vxworks960: Likewise. - * m32r/t-m32r: Likewise. - * mips/t-ecoff: Likewise. - * mips/t-elf: Likewise. - * mips/t-r3900: Likewise. - * pa/t-pro: Likewise. - * rs6000/t-aix43: Likewise. - * rs6000/t-beos: Likewise. - * rs6000/t-newas: Likewise. - * rs6000/t-ppccomm: Likewise. - * rs6000/t-rs6000: Likewise. - * rs6000/t-winnt: Likewise. - * rs6000/t-xnewas: Likewise. - * rs6000/t-xrs6000: Likewise. - * sh/t-sh: Likewise. - * sparc/t-elf: Likewise. - * sparc/t-sparcbare: Likewise. - * sparc/t-sparclite: Likewise. - * sparc/t-splet: Likewise. - * v850/t-v850: Likewise. - * mn10200/t-mn10200: Fix comments. - * mn10300/t-mn10300: Likewise. - - * pa.md (divsi3, udivsi3, modsi3, umodsi3 expanders): Clobber a new - dummy operand. Allocate a new pseudo for the dummy operand. - (divsi3, udivsi3, modis3, umodsi3 patterns): Corresponding changes. - - * pa.md (movqi, movhi patterns): Do not expose FP regs to regclass. - -Wed Aug 4 11:53:55 1999 Tom Tromey - - * configure: Rebuilt. - * configure.in: Removed --enable-java-gc option and JAVAGC subst. - -Wed Aug 4 09:06:14 1999 Richard Earnshaw (rearnsha@arm.com) - - * recog.c (preproces_constraints): Zero recog_op_alt before - processing the constraints. - - * arm.c (typedef minipool_node): Renamed from pool_node. - (minipool_vector, minipool_size, minipool_vector_label): Similarly. - (add_minipool_constant): New function. - (dump_minipool): New function. - (find_barrier): Remove special case for getting the insn size of - an insn that references the constant pool. - (minipool_fixup): New structure. - (push_minipool_barrier): New function. - (push_minipool_fix): New function. - (note_invalid_constants): New function. - (add_pool_constant, dump_table, fixit, broken_move): Delete. - (arm_reorg): Rewrite code to fix up the constant pool into a - series of mini-pools embedded in the insn stream. - (arm_output_epilogue): New function, made mainly from the body - of output_func_epilogue. - (output_func_epilogue): Move insn generation part of epilogue code - to arm_output_epilogue. - * arm.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Delete. - * arm.md (pool_range): New attribute. - (zero_extendqidi2): Add attribute pool_range. - (zero_extend_hisi_insn, load_extendqisi, extendhisi_insn, - extendqihi_insn, extendqisi_insn, movdi, movsi_insn, pic_load_addr, - pic_load_addr_based_insn, movhi_insn_arch4, movhi_insn_littleend, - movhi_insn_bigend, loadhi_si_bigend, movsf_hard_insn, movsf_soft_insn, - movdf_hard_insn, movdf_soft_insn, movxf_hard_insn): Likewise. - (epilogue): New expand. - (epilogue_insn): New insn. Call arm_output_epilogue. - - * arm.c (arm_poke_function_name): Undo change of July 17. Tidy up. - * arm.h (TARGET_SWITCHES): Add missing doc string for TARGET_DEFAULT. - -Mon Aug 2 19:18:44 1999 Jason Merrill - - * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. - -1999-08-04 Mark Elbrecht - - * config/i386/djgpp.h (BSS_SECTION_ASM_OP): Define. - -Wed Aug 4 02:15:32 1999 Richard Henderson - - * jump.c (delete_insn): Delete the addr_vec when deleting a tablejump. - -Wed Aug 4 01:48:08 1999 Jim Kingdon - - * global.c: Fix comment. - -Wed Aug 4 01:43:01 1999 Ian Lance Taylor - - * gcc.c (access_check): New static function. - (find_a_file): Use it when searching a directory list. - * collect2.c (find_a_file): Don't accept directories found when - searching a directory list. - -Wed Aug 4 01:40:43 1999 Philippe De Muyter - - * tlink.c (symbol_hash_lookup): Do not prefix functions used as - function parameters with `&'. - (file_hash_lookup, demangled_hash_lookup, tlink_init): Ditto. - -Wed Aug 4 01:08:44 1999 Jeffrey A Law (law@cygnus.com) - - * flow.c (delete_unreachable_blocks): Do not call merge_blocks - or tidy_fallthru_edge if the last insn in the block is not - an unconditional jump or a simple conditional jump. - -Tue Aug 3 20:21:20 1999 J"orn Rennecke - - * Makefile.in (c-decl.o): Depends on defaults.h. - -Tue Aug 3 14:14:52 1999 Jeffrey A Law (law@cygnus.com) - - * pa.h (HARD_REGNO_NREGS): FP registers are always 4 bytes wide for - PA1.1 and above. - (CLASS_MAX_NREGS): Likewise. - -Tue Aug 3 03:51:20 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_insn): Fix dumb thinko in last change. - -Tue Aug 3 10:36:13 1999 Bernd Schmidt - - * reload1.c (maybe_fix_stack_asms): Declare CONSTRAINTS as - "const char *". - -Mon Aug 2 23:45:45 1999 Hans-Peter Nilsson - - * dwarf2out.c (add_location_or_const_value_attribute): Correct - test for sizes of passed and declared parameter types. - -Tue Aug 3 00:03:41 1999 Kaveh R. Ghazi - - * fixincludes: Fix the return type of bsearch, char* -> void*. - - * fixinc/inclhack.def: Likewise. - -Mon Aug 2 18:29:32 1999 Mark Mitchell - - * invoke.texi (-fdump-translation-unit): New option. - -Mon Aug 2 17:54:19 1999 Richard Henderson - - * expr.h (PROMOTE_PROTOTYPES): Move ... - * defaults.h: ... to here. - * c-decl.c: Include defaults.h instead of expr.h. - * c-typeck.c: Include defaults.h. - -Mon Aug 2 17:10:24 1999 Mark Mitchell - - * toplev.h (errorcount): Declare. - (warningcount): Likewise. - (sorrycount): Likewise. - * c-lex.c (errorcount): Don't declare. - * dwarf2out.c (errorcount): Don't declare. - -Mon Aug 2 17:02:08 1999 Jason Merrill - - * config/libgloss.h: Add a note discouraging use with ELF. - * configure.in: Don't use libgloss.h for ELF targets. - Always use_collect2 on a.out targets. - -Mon Aug 2 16:27:42 1999 Jim Wilson - - * combine.c (force_to_mode, case LSHIFTRT): Add goto shiftrt. - (force_to_mode, case ASHIFTRT): Add shiftrt label. - -Tue Aug 3 00:45:02 1999 J"orn Rennecke - - * loop.c (strength_reduce): When doing biv->giv conversion, update - reg note of NEXT->insn. - -1999-08-02 Jakub Jelinek - - * real.c (PUT_REAL): Clear unused bytes if long double is IEEE quad. - -1999-08-02 Jakub Jelinek - - * c-decl.c (get_parm_info, store_parm_decls): Change all uses of - PROMOTE_PROTOTYPES, so that it tests it as a C expression. - Ensure expr.h is included. - * c-typecheck.c (convert_arguments): Ditto. - - * expr.h: Supply default for PROMOTE_PROTOTYPES (0). - - * config/arc/arc.h: Define PROMOTE_PROTOTYPES to 1. - * config/convex/convex.h: Ditto. - * config/dsp16xx/dsp16xx.h: Ditto. - * config/fx80/fx80.h: Ditto. - * config/gmicro/gmicro.h: Ditto. - * config/i370/i370.h: Ditto. - * config/i386/i386.h: Ditto. - * config/m32r/m32r.h: Ditto. - * config/m68k/m68k.h: Ditto. - * config/m88k/m88k.h: Ditto. - * config/mips/mips.h: Ditto. - * config/pa/pa.h: Ditto. - * config/pyr/pyr.h: Ditto. - * config/tahoe/tahoe.h: Ditto. - * config/we32k/we32k.h: Ditto. - - * config/sparc/sparc.h: Define PROMOTE_PROTOTYPES - based on arch size. - - * config/i1750a/i1750a.h: Define PROMOTE_PROTOTYPES to 0. - - * config/i860/paragon.h: Remove PROMOTE_PROTOTYPES - from comment. - - * tm.texi: Document new usage of PROMOTE_PROTOTYPES. - -1999-08-02 Richard Henderson - - * m32r.c (m32r_setup_incoming_varargs): Use get_varargs_alias_set - for the register spill block. - (m32r_va_arg): New. - * m32r.h (EXPAND_BUILTIN_VA_ARG): New. - (EXPAND_BUILTIN_SAVEREGS): Delete #if 0 code. - - * m32r.h (INT8_P): Don't short-cut test with (unsigned). - (INT16_P, CMP_INT16_P, UINT16_P): Likewise. - (UPPER16_P, UINT24_P, INT32_P, UINT5_P): Likewise. - -1999-08-02 Jakub Jelinek - - * config/sparc/linux.h: Define WCHAR_TYPE as "int" and undef - MAX_WCHAR_TYPE defined in sparc.h. - * config/sparc/linuxaout.h: Likewise. - * config/sparc/linux64.h: Likewise. - Also default to -mvis if CPU is UltraSPARC. - -1999-08-02 Jakub Jelinek - - * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): New macro. - (RTX_OK_FOR_OLO10): Likewise. - (GO_IF_LEGITIMATE_ADDRESS): If assembler supports offsetable - %lo(), allow it in addresses... - (PRINT_OPERAND_ADDRESS): ... and print it appropriately. - * config/sparc/sparc.md (sethi_di_medlow_embmedany_pic): sethi %lo() - does not make sense. - * config/sparc/sparc.c (sparc_hard_reg_printed): New array. - (sparc_output_scratch_registers): New function. - (output_function_prologue, sparc_flat_output_function_prologue): Use - it. - * varasm.c (make_decl_rtl): Use ASM_DECLARE_REGISTER_GLOBAL if - defined. - * tm.texi (ASM_DECLARE_REGISTER_GLOBAL): Document it. - * configure.in: Add check for .register pseudo-op support in as and - check for offsetable %lo(). - * acconfig.h: Add templates for the above checks. - * configure: Regenerate. - -1999-08-02 Richard Henderson - - * sparc/linux64.h (TARGET_DEFAULT): Remove MASK_APP_REGS. - * sparc/sol2-sld-64.h (TARGET_DEFAULT): Likewise. - * sparc/sol2.h (TARGET_DEFAULT): Likewise. - -Mon Aug 2 23:46:45 1999 J"orn Rennecke - - * loop.c (strength_reduce): When doing biv->giv conversion, fix up - reg_biv_class. - -1999-08-02 Jakub Jelinek - - * config/float-sparc.h: New file. - * configure.in: Use float_format=sparc for sparc-*-linux-gnulibc1, - sparc-*-linux-gnu and sparc64-*-linux*. - -1999-08-02 Franz Sirl - - * rs6000.c (rs6000_va_list): Type is an array. - (rs6000_va_start): Don't doubly adjust for varargs. - (rs6000_va_arg): Evaluate long long GPR adjustment. - -Mon Aug 2 16:15:57 1999 David Edelsohn - - * rs6000/aix43.h (SUBTARGET_SWITCHES): Use -m64 and -m32 instead of - -maix64 and -maix32. - (ASM_SPEC, ASM_CPU_SPEC, CPP_SPEC, CPP_CPU_SPEC, LIB_SPEC, - LINK_SPEC): Change appropriately. - * rs6000/rs6000.c (short_cint_operand): Use CONST_OK_FOR_LETTER_P. - (u_short_cint_operand): Likewise. - * rs6000/rs6000.md (movdi splitters): Add TARGET_POWERPC64 support - for 64-bit hosts. - * rs6000/t-aix43 (MULTILIB): Change to -m64. - - * invoke.texi (RS/6000 Submodel): Document 64-bit processor options. - -Mon Aug 2 16:15:57 1999 Geoff Keating - - * rs6000/rs6000.c (num_insns_constant_wide): Correct - for type promotion. - (add_operand): Get test correct for 64-bit HOST_WIDE_INT. - (non_add_cint_operand): Likewise. - (logical_operand): Likewise. - (non_logical_cint_operand): Likewise. - (print_operand): Correct printf()s for 64-bit HOST_WIDE_INT. - (print_operand_address): Correct printf() for 64-bit HOST_WIDE_INT. - (rs6000_select_rtx_section): Suppress warning. - (small_data_operand): Suppress warning. - (rs6000_got_register): Suppress warning. - * rs6000/rs6000.md (andsi3): HOST_WIDE_INT is a signed - type, so `J' is generally the wrong constraint for a SImode value; - use `L' instead. - (andsi3_internal2): Likewise. - (andsi3_internal3): Likewise. - (iorsi3_internal1): Likewise. - (xorsi3_internal1): Likewise. - (movsi): Likewise. - (movsf_softfloat): Likewise. - (scc insns): Likewise. - (movsi+2): Preserve sign bits of SImode constant. - (floatsidf2_internal+1): Sign-extend SImode constant correctly. - (movdf+1): Sign-extend properly. - (movdi_32+1): Sign-extend properly. - (scc insns): Sign-extend properly. - - * md.texi (RS/6000 EXTRA_CONSTRAINTS): Update documentation for J, - K, L, and T. - -1999-08-02 Richard Henderson - - * alpha.c (override_options): Move ev6 alpha_tp frobbing out of - -mcpu parsing code. - (print_operand): Notice alpha_fptm not alpha_tp for sw completion. - * alpha.md (all fp insns): Likewise. - -1999-08-02 Nick Clifton - - * config/v850/v850.h (STRICT_ALIGNMENT): Only define if not - already defined. - -Mon Aug 2 03:38:33 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (legitimize_pic_address): Clarify comments. Do not call the - pic_load_label generator directly. - * pa.md (pic_load_label): Clarify comments. Remove modes on operands. - No longer a named pattern. - -Mon Aug 2 09:38:10 1999 Nick Clifton - - * explow.c (force_reg): Call force_operand if X does not - satisfy general_operand. - -Mon Aug 2 01:34:22 1999 Jeffrey A Law (law@cygnus.com) - - * fix-header.c (main): When testing for CONTINUED, use string - equality, not pointer equality. - -Mon Aug 2 01:27:24 1999 Dan Nicolaescu - - * sparc.c (sparc_block_profiler): Use the %g2 register, not %o0. - -Sun Aug 1 22:46:42 1999 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_insn): Fix loop which deletes insns after a jump - that has become an unconditional jump. - - * m68k.c (output_function_prologue): Fix typo in CPU32 case. - (output_function_epilogue): Similarly. - -Sun Aug 1 20:14:00 1999 Bernd Schmidt - - * tree.h (init_dummy_function_start): Declare. - -Sun Aug 1 12:55:31 1999 Bernd Schmidt - - * stmt.c (emit_filename, emit_lineno, expr_stmts_for_value, - last_expr_type, last_expr_value, block_start_count, block_stack, - stack_block_stack, cond_stack, loop_stack, case_stack, nesting_stack, - nesting_depth, goto_fixup_chain): Delete global vars; now allocated - dynamically in stmt elt of struct function for each function. - (struct nesting): Rename function_call_count elt to n_function_calls, - target_temp_slot_level to block_target_temp_slot_level. All users - changed. - (struct stmt_status): New structure definition. - Add many accessor macros for stmt_status elements which previously - were global variables. - (init_stmt_for_function): Allocate stmt elt for current_function. - Reflect that block_start_count was renamed to - current_block_start_count. - (save_stmt_status, restore_stmt_status): Delete functions. - (preserve_subexpressions_p): Don't access loop_stack when outside - a function. - (expand_start_bindings): Reflect that block_start_count was renamed to - current_block_start_count. - (expand_fixup): Likewise. - (expand_decl): Don't access block_stack when outside a function. - (expand_decl_cleanup): Likewise. - (expand_dcc_cleanup): Likewise. - (expand_dhc_cleanup): Likewise. - (expand_anon_union_decl): Likewise. - (set_file_and_line_for_stmt): New function. - (in_control_zone_p): New function. - - * function.h (struct function): Add new elt stmt. - Delete elts block_stack, stack_block_stack, cond_stack, loop_stack, - case_stack, nesting_stack, nesting_depth, block_start_count, - last_expr_type, last_expr_value, expr_stmts_for_value, emit_filename, - emit_lineno, goto_fixup_chain. - (save_eh_status, restore_eh_status, save_stmt_status, - restore_stmt_status): Delete declarations. - * function.c (push_function_context_to): Don't call save_stmt_status. - (pop_function_context_to): Don't call restore_stmt_status. - * tree.h (in_control_zone_p): Declare. - * rtl.h (set_file_and_line_for_stmt): Declare. - - * emit-rtl.c (emit_line_note): Don't set emit_filename/emit_lineno; - call set_file_and_line_for_stmt. - -Thu Jul 31 12:34:45 1999 Joe Buck - - * gcc.texi: Use terms "GNU Compiler Collection" and "GCC". - Also update copyright. - -Sat Jul 31 11:10:07 1999 Bernd Schmidt - - * c-pragma.c: Don't include "except.h". - * emit-rtl.c: Likewise. - * stor-layout.c: Likewise. - * tree.c: Likewise. - * varasm.c: Likewise. - - * flow.c: Include "function.h". - * tree.h (init_dummy_function_start): Declare new function. - - * except.h (struct eh_status): New structure. - (struct label_node, struct eh_entry): Declare even if tree.h hasn't - been included. - (eh_return_stub_label, ehstack, catchstack, ehqueue, - catch_clauses, false_label_stack, caught_return_label_stack, - protect_list, current_function_ehc): Add accessor macros for the - corresponding fields in current_function->eh; delete declarations - for all items that used to be declared here. - * except.c (eh_return_stub_label, ehstack, catchstack, ehqueue, - catch_clauses, false_label_stack, caught_return_label_stack, - protect_list, current_function_ehc): Delete variables. - (init_eh_for_function): Allocate current_function->eh. - (save_eh_status, restore_eh_status): Delete functions. - - * function.h (struct function): Add fields next_global and eh. - Delete all exception handling related fields. - * function.c (current_function): New variable. - (all_functions): New variable. - (push_function_context_to): Don't allocate a struct function, - use current_function instead. Call init_dummy_function_start when - outside a function. Clear current_function before returning. - (pop_function_context_from): Restore current_function. - Don't free the restored struct function. - (prepare_function_start): New function. - (init_dummy_function_start): New function. - (init_function_start): Break out some code into prepare_function_start - and call it here. - - * stmt.c (save_stmt_status): Don't call save_eh_status. - (restore_stmt_status): Don't call restore_eh_status. - - * Makefile.in: Update dependencies. - -Sat Jul 31 04:10:01 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (compute_frame_size): Use STARTINg_FRAME_OFFSET instead - of depending on a magic constant value. Update comments. - (hppa_expand_prologue): Similarly. - - * pa.md (reload_indi, reload_outdi): Allow any register for the - original reload register. - -Fri Jul 30 19:41:35 1999 Jim Wilson - - * cccp.c (print_help): Change marcos to macros. - -1999-07-30 Richard Henderson - - * c-typeck.c (initializer_constant_valid_p): Move ... - * c-common.c (initializer_constant_valid_p): ... here. Use - FOO_TYPE_P instead of tests against TREE_CODE. Allow subtraction - of label addresses. - * c-common.h (initializer_constant_valid_p): Declare. - * c-tree.h (initializer_constant_valid_p): Remove. - -Fri Jul 30 16:33:42 1999 Mathias Froehlich - - * config/i386/sol2-c1.asm: Align the stack. - * config/i386/sol2-gc1.asm: Likewise. - -1999-07-30 Vladimir Makarov - - * config/sparc/sparc.h (ASM_CPU32_DEFAULT_SPEC): Change -Av8 onto - -Asparclite for sparc86x. - (CPP_CPU32_DEFAULT_SPEC, CPP_CPU_SPEC): Remove -D__sparc_v8__ for - sparc86x. - (ASM_CPU_SPEC): Use -Asparclite for sparc86x. - -Fri Jul 30 14:53:56 1999 Jakub Jelinek - - * config/sparc/linux64.h (CC1_SPEC): Preserve CPU specified by - the user if using the non-default arch size in BI_ARCH configuration. - * config/sparc/sol2-sld-64.h (CC1_SPEC): Ditto. - - * config/sparc/sparc.md (cmp_mul_set, cmp_udiv_cc_set): - Fix patterns so that they actually match. - (cmp_sdiv_cc_set): Ditto, also don't require g0 to be zero. - (mulsidi3_sp64, const_mulsidi3_sp64): New patterns. - (const_mulsidi3_sp32): Renamed from const_mulsidi3, only on - TARGET_HARD_MUL32. - (mulsidi3): Reflect this in the expand. - (smulsi3_highpart): Only on TARGET_ARCH32. - (umulsidi3_sp64, const_umulsidi3_sp64): New patterns. - (const_umulsidi3_sp32): Renamed from const_umulsidi3. - (umulsidi3): Reflect this in the expand. - (umulsi3_highpart): Only on TARGET_ARCH32. - (divsi3_sp32): Renamed from divsi3, only on TARGET_ARCH32, - don't require g0 to be zero. - (udivsi3_sp32): Renamed from udivsi3, only on TARGET_ARCH32. - ({,u}divsi3): New expands. - ({,u}divsi3_sp64): New patterns. - (after lshrdi3_v8plus): Four new patterns to help combiner - optimizing nested mixed mode shifts. - - * config/sparc/sparc.c (sparc_override_options): Use deprecated - v8 instructions if optimizing for UltraSPARC I, II, IIi, as it - speed things up. Don't use them by default on plain v9 in 64bit - mode, according to what SPAMv9 sais. - - * config/sparc/sparc.h: Fix comments, e.g. Linux already preserves - top 32 bits of %[og][0-7] in signal handlers. - Also, TARGET_HARD_MUL32 now is only true for TARGET_ARCH32. - -Fri Jul 30 03:00:41 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (zvdep_imm32): Renamed from zvdep_imm. - (ashlsi3): Corresponding changes. - - * pa.c (compute_zdepwi_operands): Renamed from compute_zdepi_operands. - -Thu Jul 29 18:37:13 1999 Jeffrey A Law (law@cygnus.com) - - * pa.h (FIRST_PARM_CALLER_OFFSET): Delete. - -Thu Jul 29 19:01:58 1999 Bernd Schmidt - - * arm.h (Hint): Delete macro. - Substitute HOST_WIDE_INT for Hint in some prototypes. - * arm.c: Substitute HOST_WIDE_INT for Hint in one prototype. - -Thu Jul 29 09:21:42 1999 Nick Clifton - - * builtins.c (expand_builtin_setjmp): Use force_operand to - make sure that the buffer address is in a suitable form to be - passed to force_reg. - -Wed Jul 28 12:50:48 1999 Geoff Keating - - * config/mips/mips.c: system.h handles MIN and MAX, don't undefine - them here. - -Wed Jul 28 13:18:35 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (indirect_jump): Remove mode from match_operand. Verify - proper mode in the condition string. - (icacheflush, dcacheflush): Remove modes from match_operands. - - * pa.c (emit_move_sequence): Always convert scratch_reg to the - proper mode before using it. - - * pa.md (adddi3, subdi3): Turn into a define_expand/define_insn - pair. - - * pa.c (store_reg): Do not call add_high_const generator directly. - (load_reg, set_reg_plus_d): Likewise. - * pa.md (add_high_const): No longer a named pattern. - - * pa.c (legitimize_address): Consistently use Pmode rather than - SImode. Do not call gen_pic2_highpart directly anymore. - * pa.md (pic2_highpart): No longer a named pattern. - (pic2_lo_sum): Similarly. Reformat to make more readable. - - * pa.md (call, call_value): Use "word_mode" instead of "SImode" as - needed. - - * README: Update. - -Wed Jul 28 11:28:04 1999 Franz Sirl - - * builtins.c (expand_builtin): Typo in call to expand_builtin_ffs. - -Wed Jul 28 11:23:48 1999 Richard Henderson - - * pa.c (hppa_builtin_saveregs): Use get_varargs_alias_set - and tag the spill mems. - (hppa_va_start): New. - (hppa_va_arg): New. - * pa.h (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - -Wed Jul 28 11:22:21 1999 Richard Henderson - - * mn10300.c (mn10300_builtin_saveregs): Use get_varargs_alias_set - and tag the spill mems. - (mn10300_va_start): New. - (mn10300_va_arg): New. - * mn10300.h (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - -Wed Jul 28 11:20:19 1999 Richard Henderson - - * mn10200.c (mn10200_va_arg): New. - * mn10200.h (EXPAND_BUILTIN_VA_ARG): New. - -Wed Jul 28 11:19:06 1999 Richard Henderson - - * builtins.c (std_expand_builtin_va_arg): Use int_size_in_bytes - rather than play with TREE_INT_CST_LOW. - -1999-07-27 Philip Blundell - - * config/arm/telf.h: Include dbxelf.h. - (CPP_PREDEFINES): Only define if not already defined. - (ASM_IDENTIFY_GCC): Likewise. - (SUBTARGET_EXTRA_SECTIONS): Likewise. - (SUBTARGET_EXTRA_SECTION_FUNCTIONS): Likewise. - * config/arm/thumb.h (LINK_SPEC): Only define if not already - defined. - (DBX_DEBUGGING_INFO): Don't define. - * config/arm/linux-telf.h: New file. - * config/arm/linux-tgas.h: New file. - * config/arm/t-thumb-linux: New file. - * config/arm/uclinux-elf.h: New file. - * config/arm/uclinux-telf.h: New file. - * configure.in (arm-*-uclinux, thumb-*-linux-gnu, - thumb-*-uclinux): New targets. - * configure: Regenerate. - -Tue Jul 27 23:20:21 1999 Jeffrey A Law (law@cygnus.com) - - * pa.md (post_store, pre_load): New expanders. - (post_stwm, pre_ldwm): Renamed to post_stw and pre_ldw respectively. - (post_ldwm, pre_stwm): Make these unnamed patterns since we never - need to directly generate RTL for them. - * pa.c (hppa_expand_prologue, hppa_expand_epilogue): Corresponding - changes. - -Tue Jul 27 16:05:52 1999 David Edelsohn - - * aix43.h (ASM_CPU_SPEC, CPP_CPU_SPEC): Add rs64a and PPC630. - * rs6000.c (processor_target_table): Add powerpc64, rs64a, and PPC630. - (rs6000_cpu): Choose between 32-bit and 64-bit default processors. - (secndary_reload_class): Make TARGET_ELF conditional compile. - (print_operand_address): Similar. - (output_toc): Print all values as hex. - (get_issue_rate): Rearrange and add RS64A and PPC630. - * rs6000.h (processor_type): Add RS64A and PPC630. - (PROCESSOR_POWERPC64): New. - (PROMOTE_MODE): Use word_mode. - (RTX_COSTS): Add RS64A and PPC630. - * rs6000.md (scheduling information): Add lmul and ldiv - representing 64-bit integer multiply and divide. Add rs64a and - PPC630 information. - (ashldi3): Add support for "rldic" instruction. - * sysv4.h (PROCESSOR_DEFAULT): Change to PROCESSOR_750. - -Tue Jul 27 15:31:53 1999 Vladimir Makarov - - * config/sparc/sparc.c (sparc_override_options): Enable SPARCLITE - instead of V8 for sparclite86x in cpu_table. - -Tue Jul 27 17:49:42 1999 Bernd Schmidt - - * config/arm/coff.h (ASM_FILE_START): If generating SDB output, call - output_file_directive. - -Tue Jul 27 03:15:33 1999 Jason Merrill - - * expr.c (expand_expr, case PLUS_EXPR): Get the mode from the - tree for op1, not the rtl. - -Tue Jul 27 00:18:34 1999 Richard Henderson - - * m88k.c (m88k_builtin_saveregs): Break out the constructor code - to m88k_va_start, leaving only the register spill. - (m88k_build_va_list): New. - (m88k_va_start): New. - (m88k_va_arg): New. - * m88k.h (BUILD_VA_LIST_TYPE): New. - (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - -Mon Jul 26 19:07:11 1999 Geoff Keating - - * config/rs6000/rs6000.c (rs6000_expand_builtin_saveregs): - Rename from expand_builtin_saveregs. - * config/rs6000/rs6000.h (EXPAND_BUILTIN_SAVEREGS): Change caller. - -Mon Jul 26 22:52:47 1999 Richard Henderson - - * i960.c (i960_setup_incoming_varargs): Use get_varargs_alias_set - for the register spill block. - (i960_build_va_list): New. - (i960_va_start): New. - (i960_va_arg): New. - * i960.h (BUILD_VA_LIST_TYPE): New. - (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - * i960.md (store_multiple): Use change_address on individual mems. - -Mon Jul 26 22:43:12 1999 Richard Henderson - - * builtins.c (stabilize_va_list): Don't INDIRECT_REF through - an ARRAY_TYPE. - (std_expand_builtin_va_start): Back out one word if !stdarg_p. - (expand_builtin_va_end): Evaluate arg for side effects. - * c-common.c (c_common_nodes_and_builtins): Construct a - va_list_arg_type_node to handle array decomposition to pointer. - -Mon Jul 26 18:51:34 1999 Richard Henderson - - * except.c (st_dynamic_cleanup): Use force_operand on the - buffer's address. - -Mon Jul 26 16:43:26 1999 Richard Henderson - - * c4x.h (EXPAND_BUILTIN_VA_ARG): New. - * c4x.c (c4x_va_arg): New. - -Mon Jul 26 12:30:09 1999 Jason Merrill - - * cpplib.c (cpp_get_token): Don't return a CPP_POP if the buffer - has manual_pop set. - -1999-07-26 Nathan Sidwell - - * eh-common.h (__eh_matcher): Prototype correctly. - -Mon Jul 26 17:24:51 1999 Philip Blundell - - * config/arm/thumb.h (THUMB_FLAG_SINGLE_PIC_BASE): Define. - (TARGET_SINGLE_PIC_BASE): Likewise. - (GOT_PCREL, NEED_GOT_RELOC, NEED_PLT_RELOC): Provide default - definitions. - (TARGET_CALLEE_INTERWORKING): Fix typo in comment. - (TARGET_SWITCHES): Add -m{no-}single-pic-base. - (TARGET_OPTIONS): Add -mpic-register=N. - (OUTPUT_INT_ADDR_CONST): New macro. - (INDEX_REGISTER_RTX_P, PIC_OFFSET_TABLE_REGNUM, FINALIZE_PIC, - LEGITIMATE_PIC_OPERAND_P): Likewise. - (LEGITIMIZE_ADDRESS, GOT_IF_LEGITIMATE_ADDRESS): Support PIC. - (ASM_OUTPUT_INT): Use OUTPUT_INT_ADDR_CONST rather than calling - output_addr_const directly. - (PRINT_OPERAND_PUNCT_VALID_P): Accept `|' for compatibility with - ARM port. - (thumb_pic_register, thumb_pic_register_string): Declare. - - * config/arm/thumb.c (symbol_mentioned_p): New function: Imported - from arm.c. - (label_mentioned_p): New function: Imported from arm.c. - (legitimize_pic_address): New function: Imported from arm.c. - (is_pic):New function: Imported from arm.c. - (thumb_finalize_pic):New function: Imported from arm.c. - (add_constant): Cope with PIC constants. - (fixit): Cope with PIC constants. - (output_return): Do not treat the PIC register as live if - TARGET_SINGLE_PIC_BASE is true. - (thumb_function_prologue): Do not treat the PIC register as live if - TARGET_SINGLE_PIC_BASE is true. - (thumb_expand_prologue): Do not treat the PIC register as live if - TARGET_SINGLE_PIC_BASE is true. - (thumb_unexpand_epilogue): Do not treat the PIC register as live if - TARGET_SINGLE_PIC_BASE is true. - (thumb_print_operand): Accept '|'. - (thumb_override_options): Process PIC options. - - * config/arm/thumb.md (movsi): Support PIC. - (call_insn): Change "i" constraint to "X". - (call_value_insn): Likewise. - (consttable_4, consttable_8, consttable_end): Set and clear - "making_const_table" as appropriate. - (pic_load_addr, pic_add_dot_plus_four): New insns. - - * invoke.texi (Thumb Options): Fix spelling. Document new - options -msingle-pic-base and -mpic-register=. - -1999-07-26 Andrew Haley - - * config/m32r/initfini.c (__init): Use a full word immediate for - __fini: this allows it to be placed in any memory region. - - * config/m32r/t-m32r: Compile crtinit.o and crtfini.o for - -mmodel=medium. This is OK for all memory models. - -Mon Jul 26 11:58:46 1999 Nick Clifton - - * config/arm/arm.c: Replace %R%s in asm_fprintf strings with %r. - * config/arm/arm.h: Replace %R%s in asm_fprintf strings with %r. - -Mon Jul 26 10:23:36 1999 Nick Clifton - - * final.c (asm_fprintf): Accept ASM_FPRINTF_EXTENSIONS, if - defined. - - * tm.texi: Document ASM_FPRINTF_EXTENSIONS. - -Sun Jul 25 23:51:59 1999 Richard Henderson - - * i860.h (EXPAND_BUILTIN_SAVEREGS): New. - (BUILD_VA_LIST_TYPE): New. - (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - * i860.c (output_delayed_branch): Disable. - (output_delay_insn): Likewise. - (i860_saveregs): New. - (i860_build_va_list): New. - (i860_va_start): New. - (i860_va_arg): New. - * i860.md: Disable all peepholes using output_delayed_branch. - * i860/sysv4.h (I860_SVR4_VA_LIST): New. - -Sun Jul 25 23:44:13 1999 Richard Henderson - - * clipper.h (EXPAND_BUILTIN_SAVEREGS): Remove argument. - (BUILD_VA_LIST_TYPE): New. - (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - * clipper.c (clipper_builtin_saveregs): Only dump registers. - Return the address of the save area. - (clipper_build_va_list): New. - (clipper_va_start): New. - (clipper_va_arg): New. - -Sun Jul 25 22:56:47 1999 Richard Henderson - - * arc.h (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - * arc.c (arc_setup_incoming_varargs): Set alias set of - varargs save area. - (arc_va_start): New. - (arc_va_arg): New. - -Sun Jul 25 22:45:55 1999 Richard Henderson - - * alpha.h (EXPAND_BUILTIN_SAVEREGS): Delete. - (BUILD_VA_LIST_TYPE): New. - (EXPAND_BUILTIN_VA_START): New. - (EXPAND_BUILTIN_VA_ARG): New. - * alpha.c (alpha_builtin_saveregs): Delete. - (alpha_build_va_list): New. - (alpha_va_start): New. - (alpha_va_arg): New. - -Sun Jul 25 21:40:33 1999 Jeffrey A Law (law@cygnus.com) - - * config/svr4.h (CTORS_SECTION_ASM_OP): Do not emit directives in - column zero. - (DTORS_SECTION_ASM_OP, INIT_SECTION_ASM_OP): Likewise. - (FINI_SECTION_ASM_OP, ASM_OUTPUT_SECTION_NAME): Likewise. - - * gcc.texi: More changes related to list conversion. - * invoke.texi: Likewise. - -Sun Jul 25 18:15:39 1999 Richard Henderson - - * builtins.c (expand_builtin_saveregs): Remove static, remove exp - and ignore arguments, bail if no EXPAND_BUILTIN_SAVEREGS. - (expand_builtin_next_arg): Accept ARGLIST not EXP. - (stabilize_va_list): New function. - (std_expand_builtin_va_start): New function. - (expand_builtin_va_start): New function. - (get_varargs_alias_set): New function. - (std_expand_builtin_va_arg): New function. - (expand_builtin_va_arg): New function. - (expand_builtin_va_end): New function. - (expand_builtin_va_copy): New function. - (expand_builtin): Call them. - * c-common.c (c_common_nodes_and_builtins): Build __builtin_va_list, - __builtin_{varargs_start,stdarg_start,end,copy}. - (build_va_arg): New function. - * c-common.h (CTI_PTR_TYPE, ptr_type_node): Delete. - (build_va_arg): Declare. - * c-decl.c (ptr_type_node, va_list_type_node): New. - * c-parse.gperf (__builtin_va_arg): New. - * c-parse.in (VA_ARG): New token. - (unary_expr): Recognize it. - * expr.c (expand_expr): Expand VA_ARG_EXPR. - * expr.h (std_expand_builtin_va_start): Declare. - (std_expand_builtin_va_arg): Declare. - (expand_builtin_va_arg): Declare. - (get_varargs_alias_set): Declare. - * tree.def (VA_ARG_EXPR): New. - * tree.h (BUILT_IN_VARARGS_START): New. - (BUILT_IN_STDARG_START, BUILT_IN_VA_END): New. - (ptr_type_node, va_list_type_node): Declare. - * tm.texi (EXPAND_BUILTIN_SAVEREGS): Kill unused ARGLIST argument. - * m32r.h (EXPAND_BUILTIN_SAVEREGS): Likewise. - * m88k.h, m88k.c: Likewise. - * mn10300.h, mn10300.c: Likewise. - * pa.h, pa.c: Likewise. - * rs6000.h, rs6000.c: Likewise. - * sh.h, sh.c: Likewise. - * sparc.h, sparc.c: Likewise. - - * emit-rtl.c (operand_subword): Copy alias set. - (change_address): Likewise. - -Sun Jul 25 15:04:37 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (compute_frame_size): Scan all the used callee saved registers, - not just the first one. - -Fri Jul 23 14:09:58 1999 Philip Blundell - - * config/arm/arm.h (TARGET_SWITCHES): Add - -m{no-}single-pic-base. Correct help string for -mshort-load-words. - (TARGET_OPTIONS): Add -mpic-register=. - (ARM_FLAG_SINGLE_PIC_BASE, TARGET_SINGLE_PIC_BASE): Define. - (arm_pic_register_string): Declare. - (NEED_PLT_GOT): Delete, replace with ... - (NEED_GOT_RELOC, NEED_PLT_RELOC): ... these. New macros. - (OUTPUT_INT_ADDR_CONST): Replace NEED_PLT_GOT with NEED_GOT_RELOC. - (ASM_OUTPUT_MI_THUNK): Replace NEED_PLT_GOT with NEED_PLT_RELOC. - * config/arm/arm.c (arm_override_options): Add new option - -mpic-register=N. - (arm_pic_register_string): New variable. - (arm_finalize_pic): Respect TARGET_SINGLE_PIC_BASE. - (output_func_prologue): If TARGET_SINGLE_PIC_BASE, treat the PIC - register as never live. Use NEED_PLT_RELOC not NEED_PLT_GOT. - (output_return_instruction): Likewise. - * config/arm/elf.h (NEED_PLT_GOT): Delete, replace with ... - (NEED_GOT_RELOC, NEED_PLT_RELOC): ... these. Define to flag_pic. - * config/arm/arm.md: Use NEED_PLT_RELOC in place of NEED_PLT_GOT. - - * invoke.texi (ARM Options): Fix spelling. Remove duplicate - mention of -msched-prolog. Document new options -msingle-pic-base - and -mpic-register=. - -Thu Jul 22 18:23:56 1999 Richard Henderson - - * haifa-sched.c (reemit_notes): Tidy. - * sched.c (reemit_notes): Duplicate 1998-08-31 patch to - haifa's routine. - -Thu Jul 22 18:21:04 1999 Richard Henderson - - * explow.c (trunc_int_for_mode): New function. - (plus_constant_wide): Use it. - * combine.c (simplify_and_const_int): Likewise. - (merge_outer_ops): Likewise. - (simplify_shift_const): Likewise. - * cse.c (simplify_unary_operation): Likewise. - (simplify_binary_operation): Likewise. - * emit-rtl.c (operand_subword): Likewise. - * rtl.h: Declare it. - -Thu Jul 22 14:34:59 1999 Bernd Schmidt - - * config/arm/arm.c (arm_print_operand): Fix typo in 'M' case - (use NUM_REGS instead of NUM_INTS). - -Thu Jul 22 11:25:20 1999 Bernd Schmidt - - * builtins.c: New file. - * expr.c (saveregs_value, apply_args_value): Delete definition, - moved into builtins.c. - (string_constant): No longer static. - (get_pointer_alignment, c_strlen, get_memory_rtx, expand_builtin, - apply_args_size, apply_result_size, result_vector, - expand_builtin_apply_args, expand_builtin_apply, - expand_builtin_return): Delete functions, moved into builtins.c. - (INCOMING_REGNO, OUTGOING_REGNO): Delete unused macros. - * expr.h (saveregs_value, apply_args_value): Declare variables. - (expand_builtin, string_constant): Declare functions. - * Makefile.in: Update to build builtin.o. - -Wed Jul 21 00:46:58 1999 Mark P. Mitchell - - * defaults.h (DWARF2_GENERATE_TEXT_SECTION_LABEL): New macro. - * tm.texi (DWARF2_GENERATE_TEXT_SECTION_LABEL): Define it. - * dwarf2out.c (dwarf2out_init): Don't output a label to mark the - start of the text section if DWARF2_GENERATE_TEXT_SECTION_LABEL is - false. - * config/mips/iris6.h (DWARF2_GENERATE_TEXT_SECTION_LABEL): - Define to zero. - -1999-07-21 Michael Meissner - - * print-rtl.c (print_rtx): Print the names of the virtual - registers. - -Wed Jul 21 16:00:32 1999 Nick Clifton - - * config/arm/arm.h (INITIAL_ELIMINATION_OFFSET): Fix typo - introduced in previous delta. - -Wed Jul 21 14:30:51 1999 Bernd Schmidt - - * c-lang.c (finish_file): Rename void_list_node to void_list_node_1 - to avoid name clash. - -Wed Jul 21 08:39:22 1999 Gavin Romig-Koch - - * c-lex.c (yylex) : Correct the test for overflow when lexing - integer literals. - -Tue Jul 20 18:02:42 1999 Richard Henderson - - * haifa-sched.c (insn_cost): FREE implies cost 0 and vice versa. - (adjust_priority): Always call ADJUST_PRIORITY. - (schedule_insn): Only put insns into the ready at cost 0. - (schedule_block): Remove redundant initial sort. Give clock_var - and can_issue_more to MD_SCHED_REORDER. Requeue if hazard cost - is not 0. - * tm.texi (MD_SCHED_REORDER): Update docs. - - * sparc.h (MD_SCHED_REORDER): Update. Set CAN_ISSUE_MORE. - * sparc.c (ultra_reorder_called_this_block): Delete. - (ultrasparc_sched_init): Don't set it. - (ultrasparc_sched_reorder): Don't check it. - -Tue Jul 20 17:07:54 1999 Richard Henderson - - * rs6000.h (struct rs6000_args): Add sysv_gregno. - * rs6000.c (init_cumulative_args): Init sysv_gregno. - (function_arg_boundary): Align DFmode. - (function_arg_advance): Restructure for ABI_V4; use sysv_gregno - to get fp reg and stack overflow correct. - (function_arg): Likewise. - (function_arg_pass_by_reference): True for TFmode for ABI_V4. - (setup_incoming_varargs): Restructure for ABI_V4; use - function_arg_advance to skip final named argument. - (expand_builtin_saveregs): Properly unskip the last integer arg - when doing varargs. Adjust overflow location calculation. - - * ginclude/va-ppc.h (struct __va_list_tag): Make gpr and fpr - explicitly unsigned. - (__VA_FP_REGSAVE): Use new OFS argument instead of AP->fpr directly. - (__VA_GP_REGSAVE): Similarly. - (__va_longlong_p): Delete. - (__va_arg_type_violation): New declaration. - (va_arg): Restructure. Flag promotion errors. Align double. - TFmode passed by reference. - - * rs6000.md (movdi_32+1): Use GEN_INT after arithmetic - in the HOST_BITS_PER_WIDE_INT > 32 case. - -Tue Jul 20 12:37:30 1999 Hans-Peter Nilsson - - * dwarf2out.c (output_abbrev_section): Terminate with a zero. - -Tue Jul 20 12:12:27 1999 Jason Merrill - - * gcc.c (default_compilers, cpp-output): Pass -fpreprocessed. - * toplev.c (documented_lang_options): Add -fpreprocessed. - * cpplib.h (struct cpp_buffer): Add preprocessed. - * cppinit.c (cpp_handle_option): Handle -fpreprocessed. - (cpp_start_read): Don't expand macros or emit an initial #line - directive if -fpreprocessed. - -Tue Jul 20 12:12:09 1999 Michael Tiemann - - * cpplib.h (struct cpp_buffer): Added manual_pop for - better C++ tokenization. - * cpplib.c (cpp_get_token): Return CPP_EOF if manual_pop. - Also, support C++ tokenization for ->*, .*, ? operators. - * c-common.c (cpp_token): Make non-static. - -Tue Jul 20 11:24:19 1999 Bernd Schmidt - - * c-common.h: New file. - * c-common.c (permanent_obstack): Delete unused declaration. - (c_global_trees): New array. - (c_common_nodes_and_builtins): New function; split off common code - from init_decl_processing in both c-decl.c and cp/decl.c. - * c-tree.h: Delete lots of declarations of tree nodes; replaced by - c_global_trees and accessor macros defined in c-common.h. - Include c-common.h. - * c-decl.c: Delete definitions for tree nodes that were replaced by - c_global_trees. - (init_decl_processing): Build void_list_node. - Call c_common_nodes_and_builtins; delete code to generate the common - builtins here. - * objc/objc-act.c (build_module_descriptor): Rename variable - void_list_node to avoid clash with c-common.h. - - * Makefile.in: Update dependencies. - * objc/Make-lang.in: Likewise. - -Mon Jul 19 14:22:18 1999 Mark P. Mitchell - - * config/mips/iris6gld.h (MAKE_DECL_ONE_ONLY): Define. - (UNIQUE_SECTION_P): Likewise. - (UNIQUE_SECTION): Likewise. - -1999-07-19 Linas Vepstas - - * config/i370/README: New file. - * config/i370/linux.h: New file. - * config/i370/mvs.h: New file. - * config/i370/oe.h: New file. - * config/i370/t-linux: New file. - * config/i370/t-mvs: New file. - * config/i370/t-oe: New file. - * config/i370/x-oe: New file. - * config/i370/xm-linux.h: New file. - * config/i370/xm-mvs.h: New file. - * config/i370/xm-oe.h: New file. - - * i370.c (label_node_t): Add first_ref_page, label_addr, - label_first_ref, label_last_ref members. - (mvs_need_base_reload): Renamed from mvs_label_emitted. - (MAX_MVS_LABEL_SIZE): Define. - (MAX_LONG_LABEL_SIZE): Define. - (alias_node_t, alias_anchor, alias_number): New. - (mvs_function_table): Reorder for EBCDIC. - (ascebc, ebcasc): Unconditionally define. - (i370_branch_dest, i370_branch_length): New functions. - (i370_short_branch, i370_label_scan): New functions. - (mvs_get_label): Renamed from mvs_add_label. Search for - an existing label before creating a new one. - (mvs_add_label): New function. - (mvs_get_label_page): New function. - (mvs_free_label_list): Renamed from mvs_free_label. Iterate - over the entire list. - (mvs_check_page) [TARGET_HLASM]: Use BASR not BALR. - (mvs_check_page) [TARGET_ELF_ABI]: New function. - (mvs_add_alias, mvs_need_alias): New functions. - (mvs_get_alias, mvs_check_alias): New functions. - (handle_pragma): New function. - (mvs_function_check): New function. - (unsigned_jump_follows_p): Search harder. - (i370_function_prolog) [TARGET_HLASM]: Handle LE370. Scan labels. - (i370_function_prolog) [TARGET_ELF_ABI]: New function. - * i370.h (TARGET_VERSION): Delete. - (CPP_SPEC, CPP_PREDEFINES): Delete. - (mvs_label_emitted): Delete. - (TARGET_EBCDIC): Delete. - (MAP_CHARACTER): Define only if TARGET_EBCDIC. - (HANDLE_PRAGMA): Define. - (HARD_REGNO_NREGS): Handle complex modes. - (HARD_REGNO_MODE_OK): Likewise. - (CLASS_MAX_NREGS): Likewise. - (RET_REG): Likewise. - (EXTRA_CONSTRAINT): Define. - (RETURN_IN_MEMORY): True for DImode. - (TRAMPOLINE_TEMPLATE): Use gen_rtx instead of GEN_INT. - (FUNCTION_PROFILER): Delete. - (COUNT_REGS): Fail if REG_P but not REG_OK_FOR_BASE_P. - (NOTICE_UPDATE_CC): Correct handling of MULT, DIV, logicals and shifts. - (TARGET_ESC, TARGET_BELL): Conditionally define for TARGET_EBCDIC. - (TARGET_BS, TARGET_TAB, TARGET_NEWLINE): Likewise. - (TARGET_VT, TARGET_FF, TARGET_CR): Likewise. - (ASM_FILE_START): Add "RMODE ANY". - (ASM_OUTPUT_EXTERNAL): Check for aliases. - (ASM_GLOBALIZE_LABEL): Likewise. - (ASM_OUTPUT_LABELREF): Likewise. - (ASM_OUTPUT_COMMON): Likewise. - (PRINT_OPERAND): Handle 'K', 'W', default. - (PRINT_OPERAND_ADDRESS): New. - (Lots of defines): Add support for TARGET_ELF_ABI. - * i370.md (attr length): New. Define for all patterns. - (*): Lots of tweeks to assembly output and constraints. - -Mon Jul 19 15:09:29 1999 David Edelsohn - - * rs6000.md (arithmetic, logical, and shift Rc combiner patterns): - Disable patterns performing SImode comparisons with SImode values - if TARGET_POWERPC64 and instruction does not sign-extend or does - not mask to narrower than SImode, i.e. where bit 31 and bit 63 may - differ for signed quantities. - (indirect_jump): Add expander to choose RTL based on TARGET_64BIT. - (tablejump): Patterns contingent on TARGET_64BIT not TARGET_POWERPC64. - (decrement_and_branch_on_count): Add 64-bit variant. - -Mon Jul 19 09:36:27 1999 Bernd Schmidt - - * final.c (output_asm_insn): When searching for the matching string - for a given dialect, don't run past the end of the list of - alternatives if there are fewer alternatives in the template than - dialects. - -1999-07-17 Alexandre Oliva - - * gcc.texi: Update e-mail addresses and URLs to gcc.gnu.org. - Removed paragraph about compression of files and size limitation, - duplicated in the FAQ. Use gcc-patches for posting patches. - * gcc.c (main): Updated URL with bug reporting instructions to - gcc.gnu.org. Removed e-mail address. - * system.h (abort): Likewise. - -1999-07-17 Kaveh R. Ghazi - - * Makefile.in (stmp-multilib-sub): Make the files extracted - from $(LIBGCC1) writable. - -Sat Jul 17 14:25:46 1999 Nick Clifton - - * config/arm/aout.h: Reformat for improved readability. - - * config/arm/arm.h: Reformat for improved readability. - Replace uses of fprintf with asm_fprintf where appropriate. - (ARM_DECLARE_FUNCTION_NAME): New macro: Perform any generic ARM - function declaration assembler actions. - (NUM_INTS): New macro: Convert from bytes to words. - (NUM_REGS): New macro: Compute number of registers required to - hold a quanitity of tyep MODE. - (NUM_REGS2): New macro: Like NUM_REGS but also copes with BLKmode - types. - (NUM_ARG_REGS): New macro: The number of argument registers - available. - (ARG_REGISTER): New macro: Compute the register number of the Nth - argument register. - (LAST_ARG_REGNUM): New macro: The number of the last argument - register. - (SP_REGNUM): New macro: Register number of the stack pointer. - (FP_REGNUM): New macro: Register number of the frame pointer. - (FUNCTION_ARG, FUNCTION_ARG_PARTIAL_NREGS, INIT_CUMULATIVE_AGS, - FUNCTION_ARG_ADVANCE, SETUP_INCOMING_VARARGS): Change - CUMULATIVE_ARGS so that it counts registers not bytes. - - * config/arm/arm.c: Rename TARGET_THUMB_INTERWORK to - TARGET_INTERWORK. - Replace uses of fprintf with asm_fprintf where appropriate. - (output_ascii_pseudo_op): Replace with version from thumb.c - - * config/arm/coff.h (ASM_FILE_START): Emit ASM_APP_OFF. - - * config/arm/elf.h (CPP_PREDEFINES): Replace with - SUBTARGET_CPP_SPEC. - (ASM_DECLARE_FUNCTION_NAME): Use ARM_DECLARE_FUNCTION_NAME. - (ASM_FILE_START): Emit ASM_APP_OFF. - -Fri Jul 16 13:48:09 1999 Jeffrey A Law (law@cygnus.com) - - * pa.c (compute_frame_size): Round frame according to - STACK_BOUNDARY rather than a hardwired value. - - * pa.h (POINTER_SIZE, PARM_BOUNDARY): Define in terms of BITS_PER_WORD. - - * configure.in (hppa*-*-hpux11*): Use symbolic MASK_PA_11 instead - of "1". - * configure: Rebuilt. - - * configure.in (hppa*-*-linux*): New configuration. - * configure: Rebuilt. - * pa.h (MAX_OFILE_ALIGNMENT): Delete. - * pa/som.h (MAX_OFILE_ALIGNMENT): Define. - * pa/pa-linux.h: New file. - * pa/t-linux: New file. - * pa/xm-linux.h: New file. - - * pa.c (hppa_legitimize_address): Change references from SImode to - either Pmode or word_mode as appropriate. - (emit_move_sequence, store_reg, load_reg): Likewise. - (set_reg_plus_d, hppa_expand_prologue): Likewise. - (output_mul_insn): Likewise. - * pa.h (PROMOTE_MODE): Likewise. - (INITIALZE_TRAMPOLINE): Likewise. - (Pmode): Define to word_mode. - - * pa.c (compute_frame_size): Use UNITS_PER_WORD instead of hardwired - value of 4. Allocate 8 bytes for each FP register save. - (hppa_expand_epilogue): Use UNITS_PER_WORD instead of harwarewired - value of 4. - (hppa_expand_prologue): Likewise. - * pa.h (PROMOTE_MODE): Likewise. - (HARD_REGNO_MODE_OK, FUNCTION_ARG_SIZE): Likewise. - (FUNCTION_ARG_BOUNDARY): Likewise. - - * invoke.texi (HPPA Options): Remove -mspace/-mno-space. - - * pa.c (out_of_line_prologue_epilogue): Delete. - (override_options): Remove -mspace related code. - (hppa_expand_prologue, hppa_expand_epilogue): Likewise. - (compute_frame_size): Only allocate space for register that - actually need to be saved. - * pa.h (MASK_SPACE, TARGET_SPACE): Delete. - (TARGET_SWITCHES): Remove -mspace, -mno-space - * pa/t-pa (LIB2FUNCS_EXTRA): Remove ee.asm and ee_fp.asm - * pa/t-pro (LIB2FUNCS_EXTRA): Likewise. Remove -mspace multilib. - * pa/ee.asm, pa/ee_fp.asm: Delete. - - * pa/elf.h (ASM_OUTPUT_DOUBLE_INT): Define. - - * config/svr4.h (CONST_SECTION_ASM_OP): Do not emit assembler - directive in column zero. - -Fri Jul 16 01:39:57 1999 Jeffrey A Law (law@cygnus.com) - - * m68k.c (output_function_prologue): Fix computation of save mask - when generating PIC code. - -Thu Jul 15 15:40:09 1999 Jim Wilson - - * tree.c (build_type_attribute_variant): Move current_obstack restore - after build_qualified_type call. - -1999-07-15 Mark Mitchell - - * configure.in: Use t-iris6, even with GNU LD. - * config/mips/iris6gld.h: Fix typo in linker spec. - * config/mips/t-iris6gld: Remove. - -Thu Jul 15 15:15:43 1999 David Edelsohn - - * rs6000.md (insv, extzv): Remove SImode dependence in named - patterns. Explicitly generate DImode RTL if PowerPC64 and - operand is DImode. - (insvdi): Reverse start and size in instruction template. - -1999-07-12 Joseph S. Myers - - * invoke.texi: Typo fixes. - -Wed Jul 14 23:28:06 1999 Jeffrey A Law (law@cygnus.com) - - * emit-rtl.c (gen_realpart): Issue an error for cases GCC can not - handle at this time instead of silently generating incorrect code. - (gen_imagpart): Likewise. - - * reload.c (find_reloads): Emit a USE for a pseudo register without - a hard register if we could not create an optional reload for the - pseudo. - -Wed Jul 14 23:45:48 1999 J"orn Rennecke - - * c-typeck.c (output_init_element, process_init_element): - When advancing constructor_unfilled_fields for a RECORD_TYPE, - check for nameless bit fields. - -Wed Jul 14 01:57:39 1999 Richard Henderson - - * regclass.c (scan_one_insn): Notice subregs that change the - size of their operand. - (record_reg_classes): Use that to obey CLASS_CANNOT_CHANGE_SIZE. - -Wed Jul 14 01:41:42 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (alpha*-*-*): Include alpha/t-ieee. - * configure: Rebuilt. - * alpha/t-ieee: New file. - -Tue Jul 13 10:45:58 1999 Jeffrey A Law (law@cygnus.com) - - * rs6000.c (find_addr_reg): Do not select r0 as an address - register. - -Tue Jul 13 00:46:18 1999 Philippe De Muyter - - * m68k/x-mot3300 (XCFLAGS): List of big files now includes `cse.o'. - -Mon Jul 12 14:29:15 1999 Jeffrey A Law (law@cygnus.com) - - * rs6000.md (movsf): Do not force easy FP constants into memory. - - * expr.c (expand_expr, case PLUS_EXPR): Pass constants through - immed_double_const to ensure they are properly truncated then - sign extended. - -Mon Jul 12 10:40:01 1999 Vladimir Makarov - - * config/arm/thumb.c (thumb_reorg): Call replace_symbols_in_block - always unless NO_DEBUG is used. Compile this code - unconditionally. - (replace_symbols_in_block): Compile it unconditionally. - -Sun Jul 11 12:32:32 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (i?86-*-elf*): New target. - * configure: Rebuilt. - * i386/i386elf.h, i386/t-i386elf: New files. - -Fri Jul 9 22:39:44 1999 Jason Merrill - - * toplev.c (main): Don't complain about saying -gdwarf. - (rest_of_compilation): Remove redundant code. - -Fri Jul 9 19:08:55 1999 Jim Wilson - - * unroll.c (unroll_loops): Don't delete named CODE_LABELs. - -Fri Jul 9 18:54:18 1999 Felix Lee - - * config/i960/i960.c (ret_label): Change asm label from "LR:" to - "Li960R:", to avoid name clash. - -Fri Jul 9 10:48:28 1999 Bernd Schmidt - - * loop.c (check_dbra_loop): When reversing a loop, delete all - REG_EQUAL notes referencing the reversed biv except those which are - for a giv based on it. - -Fri Jul 9 03:51:52 1999 Jeffrey A Law (law@cygnus.com) - - * version.c: Drop "gcc-" prefix from version #. - -Thu Jul 8 18:06:30 1999 Jason Merrill - - * dwarf2out.c (dwarf2out_line): Emit a line number comment after - the label if we're being verbose. - -Thu Jul 8 14:18:46 1999 Richard Henderson - - * m68k.c (output_function_prologue): Add pic register to mask - if live and flag_pic. - (output_function_epilogue): Likewise. - -Thu Jul 8 12:55:12 1999 Jeffrey A Law (law@cygnus.com) - - * dbxelf.h (ASM_OUTPUT_SOURCE_LINE): Do not put assembler - directives in column zero. - - * pa/elf.h (ASM_FILE_START): Define. - * pa/som.h (ASM_FILE_START): Include .level directives. - * pa/hpux10.h (ASM_FILE_START): Delete. - * pa/hpux11.h (ASM_FILE_START): Delete. - - * pa/elf.h (BSS_SECTION_ASM_OP): Use .section .bss. - -Thu Jul 8 18:03:19 1999 J"orn Rennecke - - * reload1.c (choose_reload_regs): Never call remove_address_replacements - when reload_out equals reload_in. - -Thu Jul 8 16:50:14 1999 Nick Clifton - - * invoke.texi (Spec Files): New node: Describe the contents of - spec files. - -Thu Jul 8 10:28:25 1999 Craig Burley - - * invoke.texi (DEC Alpha Options): Put @end table at - beginning of line, to avoid confusing texi2html. - -Thu Jul 8 09:22:06 1999 Nick Clifton - - * config/arm/elf.h (ASM_OUTPUT_INTERNAL_LABEL): Fixed typo - introduced in previous delta. - -Wed Jul 7 02:00:04 1999 Franz Sirl - - * reload1.c (gen_reload): When synthesizing a 3 operand add - sequence, improve test for when to reload OP1 into the reload - register instead of OP0. - -Wed Jul 7 01:38:03 1999 Jim Wilson - - * unroll.c (unroll_loop): Don't delete NOTE_INSN_DELETED_LABEL notes. - -1999-07-07 Manfred Hollstein - - * m88k/dguxbcs.h (CPP_SPEC): Add missing \ in multi-line - string literal. - -Wed Jul 7 01:16:43 1999 Richard Henderson - - * ginclude/varargs.h (__builtin_va_alist_t): New typedef. - (va_dcl): Use __builtin_va_alist_t. - -Wed Jul 7 01:14:42 1999 Jason Merrill - - * dwarf2out.c (gen_struct_or_union_type_die): Only remember types - on the permanent_obstack. - * dwarfout.c (output_type): Likewise. - -Tue Jul 6 15:25:32 1999 Gavin Romig-Koch - - * c-common.c (unsigned_type,signed_type,signed_or_unsigned_type) : - Merged from c-typeck.c and cp/typeck.c. - * c-typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : - Merged into c-common. - -Tue Jul 6 13:06:01 1999 Dave Brolley - - * c-lex.c (errorcount): Declare it. - (finish_parse): Update errorcount when using CPPLIB. - -1999-07-06 Bruce Korb - - * fixinc/inclhack.def(end_else_label): Double the backslash so - sed gets a chance to see it. - * fixinc/inclhack.sh: regen - * fixinc/fixincl.x: regen - -Fri Jul 2 18:49:51 1999 Nick Clifton - - Add framework to support armv5 architecture when it becomes - available: - - * config/arm/arm.c (FL_ARCH5): New processor capability flag. - (arm_arch5): New variable. - (all_architectures): Add armv5 line. - * config/arm/arm.h (CPP_CPU_ARCH_SPEC): Define __ARM_ARCH_5__ if - -march=armv5 is specified on the command line. - (arm_arch5): Export this variable. - * invoke.texi: Document new string accepted by -march= switch for - ARM ports. - - * config/arm/arm.h: Replace use of constant 12 as a register - number with IP_REGNUM. Similarly 14 and LR_REGNUM. - * config/arm/arm.c: Replace use of constant 12 as a register - number with IP_REGNUM. Similarly 14 and LR_REGNUM. - - * config/arm/elf.h: Tidy up. - * config/arm/coff.h: Tidy up. - -Thu Jul 1 19:08:13 1999 Mark P. Mitchell - - * gcc/configure.in (mips-sgi-irix6*): Handle --with-gnu-ld. - * gcc/config/mips/t-iris6gld: New file. - * gcc/config/mips/iris6gld.h: Likewise. - -Fri Jul 2 13:23:39 1999 Gavin Romig-Koch - - * c-decl.c (widest_integer_literal_type_node, - widest_unsigned_literal_type) : New. - (init_decl_processing): Handle/use the two new types. - * c-common.c (type_for_size,type_for_mode) : Same. - * c-lex.c (yylex) : Same. - * c-typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : - Same. - * c-tree.h (widest_integer_literal_type_node, - widest_unsigned_literal_type) : New. - -Fri Jul 2 03:05:44 1999 Jeffrey A Law (law@cygnus.com) - - * dwarfout.c (field_byte_offset): Correctly compute the object's - byte offset for the first bit of a field which crosses an alignment - boundary on a !BYTES_BIG_ENDIAN target. - -Fri Jul 2 01:36:36 1999 Robert Lipe - - * fixinc.svr4: Fix by deleting protos for htons and - ntohs. - -Fri Jul 2 00:46:47 1999 Richard Henderson - Jeff Law - - * ginclude/varargs.h (va_dcl): Use word_mode for type of - __builtin_va_list. - - * except.c: Include intl.h. - (expand_eh_return): Set current_function_cannot_inline. - (save_eh_status, restore_eh_status): Twiddle eh_return_stub_label. - * function.h (struct function): Add eh_return_stub_label. - * flow.c (delete_unreachable_blocks): Don't merge across EH edges. - * Makefile.in (except.o): Depend on intl.h. - -Fri Jul 2 00:04:23 1999 David Edelsohn - - * rs6000.md (movdf_hardfloat32): Handle PRE_INC and PRE_DEC the - same as offsettable in cases 1 and 2. - -Thu Jul 1 20:54:10 1999 Richard Henderson - - * alpha.md (extqh): Define as 64-((R&7)*8) instead of 56-(((R-1)&7)*8). - (extlh, extwh): Likewise. - -Thu Jul 1 11:05:25 1999 Gavin Romig-Koch - - * c-lex.c (yylex): Improve 'integer constant out of range' messages. - -Wed Jun 30 16:51:41 1999 Nick Clifton - - * configure.in: Add arm-pe and thumb-pe targets. - * configure: Regenerate. - - * thumb.c (arm_naked_function_p): New function: Determines if - a function is naked (has no gcc generated prologue/epilogue). - (is_called_in_ARM_mode): Return true if the func has the - interfacearm attribute. - (output_return): Do not generate a return for naked functions. - (thumb_function_prologue): Do not generate a prologue for - naked functions. - (thumb_expand_prologue): Do not generate a prologue for naked - functions. - (thumb_expand_epilogue): Do not generate an epilogue for naked - functions. - (arm_valid_machine_decl_attribute): New function, copied from - arm.c: Permit naked and interfacearm attributes. - - * config/arm/pe.c: New file: Support code for arm-pe target. - * config/arm/pe.h: New file: Header file for arm-pe target. - * config/arm/tpe.h: New file: Header file for thumb-pe target. - * config/arm/t-thumb-pe: New file: Makefile fragment for - thumb-pe target. - -1999-07-01 Mark Kettenis - - * config/i386/gnu.h (CPP_SPEC): Define __PIC__ and __pic__ if - -fPIC or -fpic is specified. - -Wed Jun 30 03:31:54 1999 Jeffrey A Law (law@cygnus.com) - - * expr.c (emit_block_move): Use copy_to_mode_reg for - !TARGET_MEM_FUNCTIONS case too. - - * configure.in (hppa*-*-*): Add som.h or elf.h to tm_file as - appropriate. - * configure: Rebuilt. - (hppa1.1-*-pro*, hppa1.1-*-rtems*): Define target_cpu_default. - * pa.h: Include dbxelf.h. Delete various dbx/stabs related - definitions made redundant by dbxelf.h inclusion. Delete - lots of definitions related to assembly output that are - specific to the SOM object format. - * pa.c (output_function_prologue): Do not emit the function's - name for OBJ_ELF. - * pa-pro-end.h (STARTFILE_SPEC): Undefine before redefining. - * pa-pro.h: Deleted. - * som.h: New file with SOM specific definitions. - * elf.h: New file with ELF specific definitions. - - * elfos.h (const_section): Output a tab before assembler directives. - (ctors_section, dtors_section): Likewise. - (ASM_OUTPUT_SECTION_NAME): Likewise. - - * pa/pa1.h: Delete unused file. - -Tue Jun 29 01:37:53 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (hppa*-hp-hpux11*): New configuration. - * configure: Rebuilt. - * pa/pa-hpux11.h: New file. - * pa.h (CPP_SPEC): Conditionally add -D__STDC_EXT__ to the cpp - command line. - - * mips.md (leasi, leadi): New patterns. - - * expr.c (emit_block_move): Properly handle case where one of the - block move arguments has a queued increment or decrement. - (clear_storage): Similarly. Fix formatting goof. - -1999-06-28 "David O'Brien" - - * fixinc/inclhack.def(stdio_va_list): This patch Removes a - semicolon from the BSD VA_LIST replacement expression. - - * fixinc/inclhack.sh: regen - * fixinc/fixincl.x: regen - - * fixinc/mkfixinc.sh: Have `i[34567]86-*-freebsd*' machines - now use the fixincl program. - -Mon Jun 28 05:28:12 1999 Jeffrey A Law (law@cygnus.com) - - * m68k.h (CONDITIONAL_REGISTER_USAGE): Define for !SUN_FPA - case. Also make the PIC register call_used. - - * m68k.h (FINALIZE_PIC): Delete. - * m68k.c (finalize_pic): Delete. - -Mon Jun 28 05:16:35 1999 Richard Henderson - - * m68k.h (PREFERRED_RELOAD_CLASS): Don't force any FP const_doubles - to memory. - -Mon Jun 28 04:07:27 1999 David Edelsohn - - * expmed.c (expand_divmod): Ensure unsigned value fits in reg_note. - -Sun Jun 27 02:39:08 1999 Richard Henderson - - * jump.c (jump_optimize_1): Validate the cmov copy to a temporary. - -Sat Jun 26 17:18:18 1999 David Edelsohn - - * rs6000.c (print_operand, case 'L'): Use plus_constant_for_output. - -Fri Jun 25 11:33:24 1999 Richard Henderson - - * alpha.c (override_options): Add -mcpu=ev45 as an alias for ev4. - -Fri Jun 25 13:41:25 1999 David Edelsohn - - * rs6000.c (output_toc): Always use hex values for floating-point - constants. Store single-precision values in upper-half of TOC - entry in 64-bit mode. - * rs6000.md (floatsidf2, floatunssidf2): Add !TARGET_POWERPC64 - to final constraints. - (fix_truncdfsi2 splitter): Change pattern matching fctiwz. - (fctiwz): Improve accuracy of RTL for pattern. - -Fri Jun 25 11:26:38 1999 Gavin Romig-Koch - - * expr.c (expand_expr): Allow RTL_EXPR's through the - MAX_INTEGER_COMPUTATION_MODE checks. - -Fri Jun 25 06:06:37 1999 Richard Henderson - - * alpha.h (MASK_SUPPORT_ARCH, MASK_CPU_EV5, MASK_CPU_EV6): Define - such that MASK_SUPPORT_ARCH is not negative. - -Fri Jun 25 05:35:44 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c (verify_dominator): Properly handle ADDR_VEC and - ADDR_DIFF_VEC insns that appear inside loops. - -Thu Jun 24 22:54:05 1999 David Edelsohn - Jeff Law - - * rs6000.md (movdf_hardfloat32): Revert previous patch. - Handle LO_SUM the same as offsettable in cases 1 and 2. - * rs6000.c (find_addr_reg): Revert previous patch. - -Thu Jun 24 22:43:12 1999 Philippe De Muyter - - * system.h (strstr): New external function declaration. - * acconfig.h (NEED_DECLARATION_STRSTR): New define slot. - * configure.in (GCC_NEED_DECLARATIONS): Check for strstr. - * config.in, configure: Rebuilt. - -1999-06-24 Tom Tromey - - * gcc.c (main): Read user-specified specs files after computing - additional startfile_prefixes. - -Thu Jun 24 15:00:47 1999 Mark Mitchell - - Revert these two patches: - - Thu Jun 17 21:34:24 1999 J"orn Rennecke - * loop.c (strength_reduce): When doing biv->giv conversion, update - reg note of NEXT->insn. - - Thu Jun 17 17:22:07 1999 J"orn Rennecke - * loop.c (strength_reduce): When doing biv->giv conversion, fix up - reg_biv_class. - (recombine_givs): Set ix field after sorting. - -Wed Jun 23 21:26:00 1999 J"orn Rennecke - - * rtlanal.c (reg_referenced_p): Use reg_overlap_mentioned_p - for the parts of an UNSPEC / UNSPEC_VOLATILE. - -1999-06-23 Bruce Korb - - *fixinc/inclhack.def: Add fix development commentary - (read_ret_type): reactivate and add selection clause - (zzz_*): tweak output file name to match what is used in hackshell.tpl - *fixinc/{fixincl.x|inclhack.sh}: regen - -Wed Jun 23 00:48:21 1999 Jason Merrill - - * expr.c (expand_expr): STRIP_NOPS before checking against - MAX_INTEGER_COMPUTATION_MODE - (check_max_integer_computation_mode): Likewise. - -Tue Jun 22 20:23:43 1999 Jim Wilson - - * md.texi (smul@var{m}3_highpart): Add missing 's' prefix. - -1999-06-22 Jim Wilson - - * expr.c (store_expr): When target is a promoted subreg, return a - promoted subreg as a result. - -Tue Jun 22 17:14:58 1999 Michael Meissner - - * dwarf2out.c (dwarf2out_frame_debug_expr): Reformat to match GNU - coding standards. - (dwarf2out_define): Mark unused parameters appropriately. - (gen_unspecified_parameters_die): Ditto. - (gen_subprogram_die): Fix signed/unsigned warnings. - (gen_variable_die): Ditto. - -1999-06-22 Bruce Korb - - * fixinc/inclhack.def(end_else_label): combined else_label - and endif_label and fixed the sed expression. - *fixinc/{fixincl.x|inclhack.sh}: regen - -Tue Jun 22 01:58:18 1999 Jeffrey A Law (law@cygnus.com) - - * rs6000.md (movdf_hardfloat32): Use %X instead of always emitting - 'x' when handling non-offsettable addresses - -Tue Jun 22 00:20:05 1999 Richard Earnshaw (rearnsha@arm.com) - - * final.c (shorten_branches): Don't try to split an insn that has - been deleted. - -Mon Jun 21 12:47:39 1999 Mark Mitchell - - * config/mips/mips.c (symbolic_expression_p): New function. - (mips_select_rtx_section): Put symbolic expressions in the - data section, not the read-only data section. - -Mon Jun 21 22:13:06 1999 Jeffrey A Law (law@cygnus.com) - - * rs6000.md (find_addr_reg): Handle LO_SUM addresses. - -Mon Jun 21 20:10:42 1999 Richard Henderson - - * collect2.c (main): Log frame table count. - (GCC_OK_SYMBOL) [ECOFF]: Accept stGlobal. - (scan_prog_file) [COFF]: Handle frame tables. - - * alpha/alpha.h (UNALIGNED_SHORT_ASM_OP): Define. - (UNALIGNED_INT_ASM_OP, UNALIGNED_DOUBLE_INT_ASM_OP): Define. - * alpha/elf.h: Undef them again. - * alpha/vms.h: Remove their definitions. - -Tue Jun 22 03:17:53 1999 J"orn Rennecke - - * sh.c (machine_dependent_reorg): When fixing up fp pcloads, - remove the clobber of r0 and change the REG_UNUSED note to - REG_INC. - -1999-06-21 Jakub Jelinek - - * real.c (ereal_from_double): Fix for 64-bit big endian hosts. - * emit-rtl.c (gen_lowpart_common): Add case for hosts where double - fits in HOST_WIDE_INT and one uses union to access a long constant - as double. - -Mon Jun 21 17:18:25 1999 Richard Henderson - - * sparc.c (sparc_override_options): Don't allow profiling for - code models other than medlow. - (sparc_function_profiler): New function from old FUNCTION_PROFILER - macro. Use ASM_GENERATE_INTERNAL_LABEL and MCOUNT_FUNCTION. - (sparc_function_block_profiler): Likewise. Use user_label_prefix. - (sparc_block_profiler): Likewise. - (sparc_function_block_profiler_exit): Likewise. - * sparc.h (FUNCTION_PROFILER): Call new sparc.c function. - (FUNCTION_BLOCK_PROFILER): Likewise. - (BLOCK_PROFILER): Likewise. - (FUNCTION_BLOCK_PROFILER_EXIT): Likewise. - (MCOUNT_FUNCTION): New. - * sparc/pbd.h (FUNCTION_PROFILER): Delete. - (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Delete. - * sparc/sun4o3.h (FUNCTION_PROFILER): Delete. - (MCOUNT_FUNCTION): New. - * sparc/sysv4.h (FUNCTION_BLOCK_PROFILER): Delete. - (BLOCK_PROFILER): Delete. - (MCOUNT_FUNCTION): New. - -Mon Jun 21 14:11:29 1999 David Edelsohn - - * rs6000.md (movdf_hardfloat32): Fix typo in case 2. - -Mon Jun 21 12:27:17 1999 Vladimir Makarov - - * config/mips/elf.h (BSS_SECTION_ASM_OP, ASM_OUTPUT_ALIGNED_BSS): - Add the macros. - - * config/m68k/m68kelf.h (BSS_SECTION_ASM_OP, ASM_OUTPUT_ALIGNED_BSS): - Ditto. - - * config/sh/sh.h (BSS_SECTION_ASM_OP, ASM_OUTPUT_ALIGNED_BSS): - Ditto. - - * config/arm/telf.h (BSS_SECTION_ASM_OP, ASM_OUTPUT_ALIGNED_BSS): - Ditto. - -Mon Jun 21 14:58:42 1999 Nick Clifton - - * config/arm/arm.h: Add cpp support for ARM920 and ARM920T cpu - types. - -Mon Jun 21 06:22:21 1999 Mark Elbrecht - - * i386/djgpp.h (LIB_SPEC): New. - (STARTFILE_SPEC): New. - - * i386/xm-djgpp.h (NO_SYS_SIGLIST): Deleted. Now obsolete. - -Mon Jun 21 06:19:33 1999 Philippe De Muyter - - * fixinc/Makefile.in (gnu-regex.o): Do not define STDC_HEADERS in - compiler flags. - - * system.h (WSTOPSIG): New macro. - -Mon Jun 21 05:33:15 1999 Mumit Khan - - * c-pragma.c (push_alignment): Don't ignore alignments greater than - 4 bytes. - (insert_pack_attributes): Take into account member natural - alignment. - - * i386/winnt.c (exports_head): New static variable. - (i386_pe_record_exported_symbol): New function. - (i386_pe_asm_file_end): Use. - * i386/cygwin.h (ASM_OUTPUT_COMMON): Record the exported - symbols to be emitted at end of assembly. - (ASM_DECLARE_OBJECT_NAME): Likewise. - (ASM_DECLARE_FUNCTION_NAME): Likewise. - - * i386/uwin.h (CPP_SPEC): Use -idirafter instead -iprefix and - -iwithprefix. - -Mon Jun 21 04:44:31 1999 Jeffrey A Law (law@cygnus.com) - - * sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Fix paren error introduced - in last change. - -Sun Jun 20 17:27:20 1999 Richard Henderson - - * haifa-sched.c (sched_analyze_1): Use free_list instead of - zapping reg_last_uses directly. - (sched_analyze_2, sched_analyze_insn): Likewise. - (sched_analyze): Likewise. Don't clear reg_last_uses on calls. - -Sun Jun 20 16:57:29 1999 David Edelsohn - - * rs6000.md (movdf_hardfloat32): Use worst case insn length - attributes for cases 1 and 2. - -Sat Jun 19 22:52:55 1999 Richard Henderson - - * haifa-sched.c (sched_analyze): Mark call-user regs as clobbered - instead of set. - -Sat Jun 19 05:40:07 1999 Philip Blundell - - * arm.c (arm_reload_in_hi): Invert sense of test on BYTES_BIG_ENDIAN. - -Sat Jun 19 05:25:05 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (CONDITIONAL_REGISTER_USAGE): If flag_pic, never use - PIC_OFFSET_TABLE_REGNUM for general alloaction. - (INITIAL_ELIMINATION_OFFSET): Count the fact that the PIC register - must be stacked if it is used for PIC accesses. - * arm.c (use_return_insn): Handle PIC register specially. - (output_return_instruction): Likewise. - (output_func_{prologue,epilogue}): Likewise. - (output_expand_prologue): Likewise. - - * arm.md (*adddf_esfdf_df): Renamed from *adddf_df_esfdf. - (*strsi_predec): Renamed from *strqi_predec. - (*loadsi_shiftpreinc): Renamed from *loadqi_shiftpreinc. - (*loadsi_shiftpredec): Renamed from *loadqi_shiftpredec. - - * arm.c (arm_override_options): Remove warning about PIC code - not being supported. - -Fri Jun 18 23:47:06 1999 David Edelsohn - - * rs6000.c (find_addr_reg): New function. - * rs6000.h (find_addr_reg): Declare. - (offsettable_addr_operand): Delete. - * rs6000.md (movdf_hardfloat32): Handle non-offsettable loads - from and stores to GPRs. - -Fri Jun 18 15:44:18 1999 Richard Henderson - - * alpha.c (alpha_expand_block_move): Use get_insns rather than - gen_sequence as argument to emit_no_conflict_block. - -Fri Jun 18 07:02 1999 Bruce Korb - - * fixinc/mkfixinc.sh: enable the fixincl program for DG/UX - * fixinc/inclhack.def(dgux_int_varargs): script must end with \n - *fixinc/fixincl.x: regen - *fixinc/inclhack.sh: regen - -Thu Jun 17 15:06:10 PDT 1999 Don Lindsay - - * added support for -mpcrel (PC relative addressing for m68k) - based on code done by Michael Tiemann . - * invoke.texi (m68000 options): Add documentation for -mpcrel flag. - * m68k.c (print_operand_address): Handle 32-bit PIC case. - (comments for general_src_operand): Add some explanation - about EXTRA_CONSTRAINTS. - (OVERRIDE_OPTIONS): Enable -fPIC in combination with -mpcrel. - * m68kelf.h (OVERRIDE_OPTIONS): Ditto. - (LEGITIMATE_PIC_OPERAND_P): Fix typo. - (LEGITIMATE_PIC_OPERAND_P): Re-derive from m68k.h case. - * m68k.h (LEGITIMATE_PIC_OPERAND_P): Fix delete-o. - (INDIRECTABLE_1_ADDRESS): Delete spurious '/' at end of macro. - (OVERRIDE_OPTIONS): Change behavior so that -mpcrel implies -fpic - if not already set. - (OVERRIDE_OPTIONS): Merge in changes from m68k.h. - * m68k.h (TARGET_PCREL): New target flag. - (TARGET_SWITCHES): Add "pcrel" as a recognized switch. - (OVERRIDE_OPTIONS): Add checks for -mpcrel. - (LEGITIMATE_PIC_OPERAND_P): Don't normally accept anything that - contains a SYMBOL_REF. Relax this constraint during reload, since - we want to use the predicates, not reload's built-in concept of a - valid memory address, to control what insns need reloading. - (EXTRA_CONSTRAINT): Define constraints to accept pc-relative - operands (essentially 'g', 'm', and 's' under normal circumstances). - * m68k.c (print_operand): Cause printing of pc-relative addresses - to include pc register. - (print_operand_address): Ditto. - (general_src_operand): Accept operands that are not only - general_operands, but are also valid when used as a pc-relative - source. - (nonimmediate_src_operand): Similar, for nonimmediate_operands. - (memory_src_operand): Similar, for memory_operands. - (pcrel_address): New predicate to accept the special case of a - pc-relative address. - * m68k.md (many patterns): Rewrite common SImode, HImode, and - QImode insns to accept *_src_operand instead of *_operand where - pc-relative operands can fit. For example, a pc-relative operand - can be used as a memory source operand for addsi3, but not as a - memory destination. - * hp320.h linux.h m68kv4.h (LEGITIMATE_PIC_OPERAND_P) as in m68k.h. - -Fri Jun 18 09:11:07 1999 Nick Clifton - - * config/arm/telf.h (ASM_OUTPUT_DEF_FROM_DECLS): New Marco: USe - .thumb_set pseudo op to mark aliases of thumb functions. - -Wed Jun 16 18:19:13 1999 Nick Clifton - - * varasm.c (assemble_alias): Use ASM_OUTPUT_DEF_FROM_DECLS in - preference to ASM_OUTPUT_DEF, if it is defined. - - * tm.texi: Document new, optional target macro - ASM_OUTPUT_DEF_FROM_DECLS. - -Thu Jun 17 15:07 1999 Bruce Korb - - * fixincludes: ISCNTL patch - * fixinc/inclhack.def (ioctl_fix_ctrl): Fix the definition of [_]*ISCTRL(). - (dgux_int_varargs): new for DG/UX - * fixinc/{fixincl.x,inclhack.sh}: Regenerated. - -Thu Jun 17 21:34:24 1999 Jeff Law - - * invoke.texi (ia32 options): Fix typo. - -Thu Jun 17 21:34:24 1999 J"orn Rennecke - - * loop.c (strength_reduce): When doing biv->giv conversion, update - reg note of NEXT->insn. - -Thu Jun 17 14:25:08 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c (move_movables): Note issues with replacing REGs with - SUBREGs. - * mips.h (GO_IF_LEGITIMATE_ADDRESS): Handle SUBREGs properly. - -Thu Jun 17 13:28:30 1999 David O'Brien - - * i386/freebsd-elf.h (LINK_SPEC): Fix typo. - - * i386/freebsd-elf.h (FUNCTION_PROFILER): labels are not needed and - the reference to `mcount' was not correct for the ELF on FreeBSD. - -Thu Jun 17 17:22:07 1999 J"orn Rennecke - - * loop.c (strength_reduce): When doing biv->giv conversion, fix up - reg_biv_class. - - (recombine_givs): Set ix field after sorting. - -Thu Jun 17 02:54:30 1999 Jeffrey A Law (law@cygnus.com) - - * emit-rtl.c (operand_subword): Tighten checks for when it is safe - to safe to extract a subword out of a REG. - -Thu Jun 17 01:45:24 1999 J"orn Rennecke - - * sh.md (mulsi3): Don't add a no-op move at the end. - -Wed Jun 16 20:29:00 1999 J"orn Rennecke - - * cse.c (cse_insn): Don't put hard register source into tables for - the last insn of a libcall. - -Wed Jun 16 19:44:33 1999 J"orn Rennecke - - * loop.c (strength_reduce): Insert sets of derived givs at every - biv increment, even if it's the only one. - -Wed Jun 16 10:33:02 1999 Jason Merrill - - * dwarfout.c (add_incomplete_type): New fn. - (output_type): Call it. - (retry_incomplete_types): New fn. - (dwarfout_finish): Call it. - - From Eric Raskin : - (output_type): Output types for bases. - -Tue Jun 15 12:51:23 1999 Alexandre Oliva - - * mips.c (mips_output_conditional_branch): Add `break' - between `default' label and `close braces'. - -Tue Jun 15 01:55:20 1999 David O'Brien - - * i386/freebsd-elf.h (LINK_SPEC): clean up the linking library - specifications and make it realistic. - (LIB_SPEC): Likewise. - -Mon Jun 14 15:38:43 1999 Jim Wilson - - * config/mips/mips.c (mips_secondary_reload_class): Check for - (PLUS (SP) (REG)) and return appropriate register class. - * config/mips/mips.md (reload_insi): Delete predicate for operand 1. - Handle (PLUS (SP) (REG)). - (tablejump): In mips16 code, use emit_insn instead of emit_jump_insn. - (tablejump_mips161, tablejump_mips162): Use emit_jump_insn instead - of emit_insn for tablejump. - -Mon Jun 14 17:26:40 1999 David Edelsohn - - * rs6000.c (output_prolog): RS6000_CALL_GLUE must be - asm_fprintf format string by itself. - (output_function_profiler): Likewise. - -Mon Jun 14 12:57:38 1999 David Mosberger - - * combine.c (simplify_logical, case AND): Only call - simplify_and_const_int if the mode is no wider than HOST_WIDE_INT - or the constant is positive. - -Mon Jun 14 11:43:41 1999 Nick Clifton - - * configure.in: Fix typo in rs6000-ibm-aix4 case. - * configure: Regenerate. - -Mon Jun 14 03:55:40 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (rs6000-ibm-aix4.3*, powerpc-ibm-aix4.3*): Do not - require a sub-version #. - * configure: Rebuilt. - -1999-06-14 Robert Lipe (robertlipe@usa.net) - - * svr4.h (DWARF2_DEBUGGING_INFO): Check for redefinition. - -Mon Jun 14 10:30:52 BST 1999 Nathan Sidwell - - * c-typeck.c (process_init_element): Detect excess elements in - char array initializer. - -1999-06-14 Andreas Jaeger - - * gcc.texi: Mention gcc 2.96 instead of egcs 1.00. - -Sat Jun 12 22:29:48 EDT 1999 Jerry Quinn - - * invoke.texi (Option Summary): Add -fpermissive flag. - -Sat Jun 12 03:40:42 1999 Jeffrey A Law (law@cygnus.com) - - * sparc.h (LEGITIMIZE_RELOAD_ADDRESS): Do nothing with operands - that require PIC code sequences. - -Wed Jun 9 16:29:01 1999 Nick Clifton - - * configure.in: Add new target: thumb-elf. - * configure: Regenerate. - * config/arm/t-thumb-elf: New file: Makefile fragment for - thumb-elf build. - * config/arm/telf.h: New file: Header file for thumb-elf - build. - -Fri Jun 11 03:17:51 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (libgcc2): Pass MAYBE_USE_COLLECT2 as an argument. - * libgcc2.c (__CTOR_LIST, __DTOR_LIST); Do not provide - initializers is some circumstances. - - * fixinc/inclhack.def (endif_label): Add additional selector for - more bogus stuff after #endif statements. - * fixinc/inclhack.sh, fixinc/fixincl.x: Rebuilt. - -Thu Jun 10 20:44:36 1999 Mumit Khan - - * i386/cygwin.h (SET_ASM_OP): Define. - -Thu Jun 10 20:37:57 1999 Mumit Khan - - * reg-stack.c (stack_reg_life_analysis): Find all the RETURN insns. - -Thu Jun 10 19:23:00 1999 J"orn Rennecke - - * sh.h (TARGET_HARWARD, TARGET_HARVARD): Changed the former to the - latter. - - * sh.md (ic_invalidate_line_i): Remove second alternative. - -Thu Jun 10 06:55 1999 Bruce Korb - - *fixinc/inclhack.def(sun_auth_proto): We do not know how to - test for the presence of valid prototypes. Delete bypass expr. - (ioctl_fix_ctrl): Correct the selection expression. - (no_double_slash): Correct quoting rules - *fixinc/fixincl.x: regen - *fixinc/inclhack.sh: regen - -Thu Jun 10 15:08:15 1999 Nick Clifton - - * config/arm/arm.c (struct all_cores): Add ARM920 and ARM920t. - -Wed Jun 9 15:57:57 1999 Franz Sirl - - * rs6000.md (movsi_got_internal_mem): Delete. - * rs6000.h (CONDITIONAL_REGISTER_USAGE): Mark PIC_OFFSET_TABLE_REGNUM. - (GOT_TOC_REGNUM): Delete. - (PIC_OFFSET_TABLE_REGNUM): Define. - (FINALIZE_PIC): Disable. - * rs6000.c (rs6000_got_register): New code for fixed pic register. - (rs6000_replace_regno): Delete. - (rs6000_finalize_pic): Likewise. - (output_prolog): Handle PIC_OFFSET_TABLE_REGNUM. - -Wed Jun 9 19:44:26 1999 J"orn Rennecke - - * loop.c (loop_insn_first_p): Don't compare LUIDs when P - is a note; use <= for the compare; advance P while it is - a NOTE. - -Wed Jun 9 13:12:24 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/inclhack.def (no_double_slash): Fix quoting for test. - * fixinc/inclhack.sh, fixinc/fixincl.x, fixinc/fixincl.sh; Rebuilt. - - * varasm.c (remove_from_pending_weak_list): Verify t->name - is non-NULL before passing it to strcmp. - -Wed Jun 9 06:50 1999 Bruce Korb - - *fixinc/inclhack.def(sun_auth_proto): bypass the patch if - the typed arguments are not part of a comment - (ioctl_fix_ctrl): Added a purpose comment - *fixinc/fixincl.x: regenerate - *fixinc/inclhack.sh: regenerate - -Wed Jun 9 22:57:02 1999 Michael Hayes - - * invoke.texi: Add C4x invocation docs. - -Wed Jun 9 22:34:38 1999 Michael Hayes - - * config/c4x/c4x.h (TARGET_EXPOSE_LDP, LEGITIMIZE_RELOAD_ADDRESS): - Define new macros. - * config/c4x/c4x.c (c4x_emit_move_sequence, src_operand): Use - TARGET_EXPOSE_LDP. - (c4x_legitimize_reload_address): New function. - * config/c4x/c4x.md: Update docs. - -Wed Jun 9 04:14:48 1999 Jeffrey A Law (law@cygnus.com) - - * fixincludes: Avoid removing '.'. - * fixinc/fixinc.svr4: Likewise. - * fixinc/fixinc.winnt: Likewise. - * fixinc/inclhack.tpl: Likewise. - * fixinc/fixincl.sh, fixinc/inclhack.sh: Rebuilt. - -1999-06-09 Kaveh R. Ghazi - - * fixinc/inclhack.def (sun_catmacro): Escape parens in the select - pattern. - * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt. - -Wed Jun 9 03:10:34 1999 Mumit Khan - - * c-pragma.c (handle_pragma_token): Handle `#pragma pack()' - correctly. - -Tue Jun 8 13:06:15 1999 Jim Wilson - - * configure.in (rs6000-ibm-aix4.[12]*): Change rx6000 to rs6000. - * configure: Regenerate. - -Tue Jun 8 05:47:48 1999 Richard Earnshaw (rearnsha@arm.com) - - * optabs.c (expand_cmplxdiv_wide): Use expand_abs to get the absolute - values. - -Mon Jun 7 22:30:37 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/inclhack.def (avoid_bool): Also catch - "typedef [unsigned] int bool". - * fixinc/inclhack.sh, fixinc/fixincl.x, fixinc/fixincl.sh: Rebuilt. - - * m68k/x-hp3bsd44: Delete obsolete and incorrect file. - * configure.in (m68k-hp-bsd4.4): No longer use x-hp3bsd44. - * configure: Rebuilt. - -Mon Jun 7 22:05:03 1999 Mark Kettenis - - * config/i386/gnu.h: Include right after , - such that we can override its definitions if necessary. - (CPP_SPEC): New define. Support processor specific predefines via - %(cpp_cpu). - (CC1_SPEC): New define. Support processor specific compiler - options via %(cc1_cpu). - (STARTFILE_SPEC): New define. Use crt0.o instead of crt1.o for - -static. - -1999-06-07 Kaveh R. Ghazi - - * fixinc/inclhack.def (math_gcc_ifndefs): Insert whitespace - between sed's -e flag, and the open-quote following it. - * fixinc/fixincl.x, fixinc/fixincl.sh: Rebuilt. - -Mon Jun 7 20:34:20 1999 Robert Lipe - Jeffrey A Law (law@cygnus.com) - - * varasm.c (assemble_start_function): Remove the function - from the pending weak decls list when we define a function. - (assemble_variable): Similarly for variables. - (weak_finish): Ignore items on the list with a NULL name. - (remove_from_ending_weak_list); New function to "remove" an item - from the pending weak declarations list. - -Mon Jun 7 19:27:07 1999 Jerry Quinn - - * pa.md (fmpyfadd, fmpynfadd, fnegabs): New patterns. - -Mon Jun 7 14:07:39 1999 Dave Brolley - - * c-lex.c (GETC): Redefine to call getch. - (UNGETC): Redefine to call put_back. - (putback_buffer): New structure type. - (putback): New static structure. - (getch): New function. - (put_back): New function. - (yylex): Replace unused bytes from bad multibyte character. - -Mon Jun 7 13:33:39 1999 Dave Brolley - - * cpplib.c (do_define): Cast `alloca' return value. - (do_include, do_undef, do_pragma): Likewise. - * cpphash.c (dump_definition): Cast `xstrdup' and `alloca' return - values. - * cppfiles.c (initialize_input_buffer): Cast `xmalloc' return values. - * gcc/cppspec.c (lang_specific_driver): Cast xmalloc return value. - -Sun Jun 6 11:58:34 1999 Jakub Jelinek - - * sparc.md (abstf2): This should be an expand. - (split after abstf2_notv9): Fix mode. - (abstf2_hq_v9): New pattern. - (abstf2_v9): Only use when no hard quad. - (absdf2_v9): Fix if target is not the same as source. - (ashrsi3_extend, ashrsi3_extend2, lshrsi3_extend, lshrsi3_extend2): - Add correct output constraints. - -Sat Jun 5 17:04:16 1999 Craig Burley - - From Dave Love to egcs-patches on 20 May 1999 17:38:38 +0100: - * invoke.texi: Clarify text vis-a-vis Intel CPUs. - -Sat Jun 5 12:11:24 1999 Mark Mitchell - - * mips.h (mips_output_conditional_branch): New function. - (mips_adjust_insn_length): Likewise. - (ASSEMBLER_SCRATCH_REGNUM): New macro. - (ADJUST_INSN_LENGTH): Likewise. - * mips.c (print_operand): Add `F' and `W' for floating-point - comparison opcodes. - (machine_dependent_reorg): Adjust MIPS16 code; instruction-lengths - are now in bytes. - (mips_adjust_insn_length): New function. - (mips_output_conditional_branch): New function. - * mips.md (length): Adjust attribute definition to handle - conditional branches. Change lengths to bytes, rather than - instructions throughout. Remove length attribute from - instructions whose length is four bytes, and rely on the default - instead. - (dslot): Fix typo in comment. - Reword conditional branch patterns to use - mips_output_conditional_branch. - -Fri Jun 4 13:30:27 1999 Rainer Orth - - * alpha/osf.h (CPP_SUBTARGET_SPEC): Handle -threads. - (LIB_SPEC): Likewise. - Link with -lprof1_r for -g/-pg. - -1999-06-04 Andreas Schwab - - * loop.c (check_dbra_loop): Fix change of Jan 19. - -Fri Jun 4 00:12:40 1999 Marc Espie - - * freebsd-elf.h (SWITCH_TAKES_ARG): Redefine, not define. - (STARTFILE_SPEC): Define, override the svr4.h version. - (ENDFILE_SPEC): Likewise. - -Thu Jun 3 23:58:55 1999 Jeffrey A Law (law@cygnus.com) - - * fixinc/inclhack.def (limits_ifndefs): Also apply to sys/limits.h - * fixinc/fixincl.x: Regenerated. - * fixinc/inclhack.sh: Regenerated. - -Fri Jun 4 05:42:23 1999 J"orn Rennecke - - * sh.c (barrier_align): Don't return early for normal branch/barrier - when optimizing for SH2. - -Thu Jun 3 22:27:50 1999 Robert Lipe - - * i386/udk.h (LINK_SPEC): Correct linker search path for - system libraries. - -Fri Jun 4 03:20:40 1999 J"orn Rennecke - - * sh.c (fixup_addr_diff_vecs): Emit braf reference label. - (braf_label_ref_operand): Delete. - * sh.h (PREDICATE_CODES): Remove braf_label_ref_operand. - * sh.md (casesi_jump_2): Operand1 is now the inside of a - label_ref, and has no predicate. - The pattern has a predicate to guard against invalid substitutions. - (dummy_jump): Delete. - (casesi): Update use of casesi_jump_2. - -Thu Jun 3 07:48 1999 Bruce Korb - - *fixinc/inclhack.def(Io_Def_Quotes): corrected sed expression - *fixinc/fixincl.x: regenerate - *fixinc/inclhack.sh: regenerate - -Thu Jun 3 02:15:07 1999 Jason Merrill - - * dwarf2out.c (add_incomplete_type): New fn. - (gen_struct_or_union_type_die): Call it. - (retry_incomplete_types): New fn. - (dwarf2out_finish): Call it. - -Thu Jun 3 01:19:03 1999 Jeffrey A Law (law@cygnus.com) - - * gcse.c (insert_insn_end_bb): Correct placement of insns when the - current block starts with a CODE_LABEL and ends with a CALL and - we can not find all the argument setup instructions for the CALL. - -Wed Jun 2 15:44:15 1999 Mark Mitchell - - Revert this change: - * fold-const.c (fold): STRIP_NOPS when deciding whether or not - something is a candidate for optimize_bit_field_compare. - -Wed Jun 2 21:53:05 1999 J"orn Rennecke - - * sh.h (CONST_OK_FOR_I, CONST_OK_FOR_L): Cast VALUE to HOST_WIDE_INT. - -Wed Jun 2 12:25:55 1999 Richard Henderson - - * alpha.c (override_options): Thinko in last patch. - - * alpha/osf.h (CPP_SUBTARGET_SPEC): Define. - (LIB_SPEC): Recognize -pthread. - -Wed Jun 2 08:42:55 1999 Nick Clifton - - * config/arm/tcoff.h (USER_LABEL_PREFIX): Synchronize with - definition in config/arm/coff.h - * config/arm/coff.h: Add comment about USER_LABEL_PREFIX. - -Wed Jun 2 07:07 1999 Bruce Korb - - * fixinc/fixincl.c(global def): Add FD_SHELL_SCRIPT to mark - fixes that need "file=xxx\n" prepended before invocation - (start_fixer - new): starting the fixer process is complex enough - to warrent its own routine. It prepends the "file=xxx\n" stuff. - (process): uses the new routine; omit usage of putenv() - * fixinc/fixincl.tpl: mark shell scripts with FD_SHELL_SCRIPT - * fixinc/fixincl.x: regenerate - -Wed Jun 2 02:29:07 1999 Jeffrey A Law (law@cygnus.com) - - * README, configure.in, gcc.1, gcc.texi: Update name (egcs -> gcc) - and version #s (1.1 -> 2.96) as needed. - * README.g77: Kill way out of date file in the toplevel directory. - -Wed Jun 2 00:52:34 1999 David O'Brien - - * configure.in (i[34567]86-*-freebsdelf): Don't include linux.h, - i386/freebsd-elf.h no longer requires it. Instead include svr4.h. - * configure: Rebuilt. - * i386/freebsd-elf.h (DEFAULT_VTABLE_THUNKS): Define. - (ASM_COMMENT_START, ASM_APP_ON, ASM_APP_OFF, SET_ASM_OP): Likewise. - (PREFERRED_DEBUGGING_TYPE, WCHAR_UNSIGNED): Likewise. - (SWITCH_TAKES_ARG): Likewise. - * i386/freebsd.h: Remove FREEBSD_NATIVE support. - * config/t-freebsd: Moved from config/i386/ so it can used for all - FreeBSD targets. - -Mon May 31 02:22:55 1999 Philippe De Muyter - - * m68k/x-mot3300 (XCFLAGS): Fixed to match stb.o, not f/stb.o. - -Wed Jun 2 00:08:34 1999 Robert Lipe - - * configure.in (i[34567]86-*-udk*): Install headers with cpio. - * configure: Rebuilt. - -Tue Jun 1 19:06:22 1999 David Edelsohn - - * rs6000/aix41.h (RS6000_CALL_GLUE): Define. - * rs6000/aix43.h (RS6000_CALL_GLUE): Likewise. - * rs6000/rs6000.c (rs6000_file_start): Use putc. - (rs6000_output_load_toc_table): Same. - (output_prolog, output_mi_thunk): Same. - * rs6000/rs6000.h (SELECT_SECTION): Formatting. - (ASM_GLOBALIZE_LABEL): Use putc. - -Mon May 31 15:23:23 1999 Richard Henderson - - * alpha.md (reload_*_help): New patterns and splitters. - (reload_*): Use them. - (mov[qh]i): Likewise. - -Mon May 31 11:48:07 1999 Mark Mitchell - - * cccp.c (handle_directive): Handle backslash-newlines in quoted - strings correctly. - -Mon May 31 09:36:11 1999 Cort Dougan - - * rs6000/linux.h (LINK_SPEC): Use emulation elf32ppclinux. - -Mon May 31 11:40:20 EDT 1999 John Wehle (john@feith.com) - - * flow.c (mark_regs_live_at_end, insn_dead_p, - mark_set_1, mark_used_regs): Only give FRAME_POINTER_REGNUM - and HARD_FRAME_POINTER_REGNUM special treatment if reload - hasn't run or the frame pointer is needed. - * haifa-sched.c (attach_deaths): Likewise. - * sched.c (attach_deaths): Likewise. - -Mon May 31 00:46:17 1999 Jeffrey A Law (law@cygnus.com) - - * jump.c (jump_optimize_1): Only set CAN_REACH_END if - calculate_can_reach_end returns nonzero. - - * configure.in (native gas tests): Search for an assembler in the - same manner that the installed compiler will. - * configure: Rebuilt. - * tm.texi (MD_EXEC_PREFIX): Note need to update configure.in too. - - * alias.c (find_base_term): Improve handling of addresses - constructed from binary operations. - -Sun May 30 14:29:17 1999 Eric Raskin (ehr@listworks.com) - - * dgux.h (STARTFILE_SPEC): Fix incorrectly matched curly-braces. - -Sun May 30 14:19:13 1999 Jeffrey A Law (law@cygnus.com) - - * function.h (cleanup_label, frame_offset): Declare. - (tail_recursion_label, tail_recursion_reentry): Likewise. - (arg_pointer_save_area, rtl_expr_chain): Likewise. - * stmt.c (cleanup_label, frame_offset): Delete extern declarations. - (tail_recursion_label, tail_recursion_reentry): Likewise. - (arg_pointer_save_area, rtl_expr_chain): Likewise. - -Sat May 29 19:08:10 1999 Philip Blundell - - * config/arm/aout.h (ASM_OUTPUT_ALIGN): Only define if not already - defined. - * config/arm/elf.h (ASM_OUTPUT_ALIGN): Define. - (MAX_OFILE_ALIGNMENT): Define. - -Fri May 28 21:40 1999 Robert Lipe - - * fixincl.c: Replace local include scheme with #includes of - gansidecl.h and system.h. - * procopen.c: Likewise. - * server.c: Likewise. - -Fri May 28 03:47:03 1999 Eric Raskin (ehr@listworks.com) - - * i386/t-dgux (EXTRA_PARTS): Add crti.o - (crti.o): Add build rule and dependencies. - * fixinc/fixinc.dgux: Use modified _int_varargs.h - -Fri May 28 03:41:02 1999 Franz Sirl - - * rs6000/sysv4.h (CC1_SPEC): Add support for -profile - (LIB_LINUX_SPEC): Likewise. - (LIB_LINUX_SPEC): Add support for -pthread - (CPP_OS_LINUX_SPEC): Likewise. - (CPP_SYSV_SPEC): Avoid redefinitions if both -fpic and -fPIC are - specified. - -Thu May 27 13:04:52 1999 H.J. Lu (hjl@gnu.org) - - * i386.c (output_fp_cc0_set): Don't check the JUMP_INSN code for - conditional move. - (notice_update_cc, output_float_compare): Enable TARGET_CMOVE support. - (output_float_compare, output_fp_cc0_set): Fix the FLOAT comparison - for IEEE math and CC_FCOMI. - (put_jump_code): No IEEE if CC_FCOMI is set. - -1999-05-27 Andreas Schwab - - * fold-const.c (fold_truthop): Make the field reference unsigned - when converting a single bit compare. - -Thu May 27 02:40:48 1999 J"orn Rennecke - - * loop.c (strength_reduce): Don't do biv->giv conversion on constants. - -Thu May 27 02:09:27 1999 Jeffrey A Law (law@cygnus.com) - - * varasm.c (STRIP_NAME_ENCODING): Remove default definition. - * output.h (STRIP_NAME_ENCODING): Strip '*' like the old varasm - version did. - - * reload.c (push_reload): Do not call remove_address_replacements - when presented with identical optional reloads. - -Wed May 26 14:18:05 1999 Richard Henderson - - * alpha.h (MASK_FIX, TARGET_FIX): New. - (MASK_*): Reorganize constants. - (CPP_AM_FIX_SPEC): New. - (TARGET_SWITCHES): Add FIX. - (EXTRA_SPECS): Likewise. - (CPP_CPU_EV6_SPEC): Use FIX, not CIX. - (SECONDARY_MEMORY_NEEDED): Likewise. - (REGISTER_MOVE_COST): Likewise. - * alpha.c (override_options): Add FIX support. Always use - ALPHA_TP_PROG for ev6. - * alpha.md (sqrt and mov[sd]i patterns): Use FIX, not CIX. - * alpha/elf.h (ASM_FILE_START): Look at FIX too. - * configure.in (target_cpu_default2) [ev6]: Use FIX, not CIX. - -Wed May 26 09:53:05 1999 Mark Mitchell - - * fold-const.c (fold): STRIP_NOPS when deciding whether or not - something is a candidate for optimize_bit_field_compare. - -Wed May 26 09:40:02 1999 Mark Mitchell - - * gcc.texi (Passes): Document branch-shortening. - * invoke.texi (Debugging Options): Document the fact that `-dp' - outputs length information for instructions. - -Wed May 26 08:49:31 1999 Nick Clifton - - * flow.c: Revert previous delta. - -Wed May 26 06:05:10 1999 Nick Clifton - - * flow.c (insn_dead_p): Check against frame_pointer_rtx not - FRAME_POINTER_REGNUM. - (mark_set_1): Ditto. - (mark_used_regs): Ditto. - -Wed May 26 02:19:31 1999 Philip Blundell - - * arm.h (NEED_PLT_GOT): Fix mistake in last change. - (GOT_PCREL): New macro. Define to 1 if not already defined. - * arm/elf.h (GOT_PCREL): Define to 0. - * arm.c (arm_finalize_pic): Take into account the setting of - GOT_PCREL. - -Tue May 25 14:06:06 1999 Jeffrey A Law (law@cygnus.com) - - * output.h (STRIP_NAME_ENCODING): Provide default definition. - * dwarf2out.c (ASM_NAME_TO_STRING): Use STRIP_NAME_ENCODING. - - * flow.c (mark_set_1): Do not record BLKmode stores as dead - store elimination candidates. - -Tue May 25 08:55:57 1999 Gavin Romig-Koch - - * config/mips/mips.h (ASM_OUTPUT_DOUBLE_INT) : Use 'dword' if - TARGET_GAS. - -Mon May 24 20:30:08 1999 Jim Wilson - - * configure.in (rs6000-ibm-aix4.[12]*): Delete use of aix41-gld.h. - Add use of x-aix41-gld. - -Mon May 24 16:44:09 1999 Jakub Jelinek - - * sparc/linux64.h (ASM_OUTPUT_CONSTRUCTOR): Define. - (ASM_OUTPUT_DESTRUCTOR): Define. - -Mon May 24 14:35:24 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c (strength_reduce): Do not clear NOT_EVERY_ITERATION at the - last CODE_LABEL in a loop if we have previously passed a jump - to the top of the loop. - -Mon May 24 07:56:29 1999 Nick Clifton - - * config/arm/arm.h (OUTPUT_INT_ADDR_CONST): Fix blunder made when - applying Philip's patch. - -Mon May 24 01:02:12 1999 Mark Mitchell - - * stmt.c (expand_end_bindings): Ignore any elements of VARS that - are not VAR_DECLs. - -Sun May 23 20:31:16 1999 Jeffrey A Law (law@cygnus.com) - - * loop.c (strength_reduce): Grow reg_single_usage as needed. - -Sun May 23 10:13:20 1999 David O'Brien - - * i386/freebsd-elf.h (LINK_SPEC): Change -static to -Bstatic. - Also remove a useless comment. - -Sun May 23 10:05:23 1999 Jerry Quinn - - * pa.md (negdf2,negsf2): Use fneg instead of fsub on pa 2.0. - -Sat May 22 21:02:06 1999 David Edelsohn - - * collect2.c (main): Only generate import or export file and add - to link arguments if non-empty. Use xmalloc not alloca. - (write_{export,import}_file): Delete. - (write_aix_file): New function. - (locatelib): Use xmalloc not malloc. - (GCC_OK_SYMBOL): Do not check type if aix64. - -Sat May 22 09:35:51 1999 Philip Blundell - - Based on patch by Scott Bambrough and Pat Beirne: - * config/arm/arm.c (making_const_table): New variable. - * config/arm/arm.h (making_const_table): Declare. - (OUTPUT_INT_ADDR_CONST): Mark symbols as position independent if - appropriate. - * config/arm/arm.md (consttable_4, consttable_8, consttable_end): - Keep track of when we are building the constant table. - -Sat May 22 09:34:22 1999 Philip Blundell - - * config/arm/arm.c (arm_override_options): Fix erroneous warning - message. - -Sat May 22 09:06:33 1999 Nick Clifton - - * config/arm/arm.h (NEED_PLT_GOT): Only define if not already - defined. - -Sat May 22 07:17:05 1999 Nick Clifton - - * tm.texi (FUNCTION_ARG): Correct description of a stack element - in a PARALLEL. - -Sat May 22 01:27:49 1999 Mark Mitchell - - * expr.h (lang_expand_constant): Guard with #ifdef TREE_CODE. - -Fri May 21 21:19:02 1999 Franz Sirl - - * rs6000.c (output_mi_thunk): Enable full support again. - -Fri May 21 20:09:52 1999 J"orn Rennecke - - * sh.h (BRANCH_COST): Define. - -Thu May 20 10:00:42 1999 Stephen L Moshier - - * Makefile.in (GCC_FOR_TARGET): Add -I$(build_tooldir)/include. - -Thu May 20 09:58:57 1999 Jan Hubicka - - * function.c (assign_stack_local): Align stack slot properly. - (assign_outer_stack_local): Likewise. - -Thu May 20 10:38:43 1999 Mark Mitchell - - * expr.h (lang_expand_constant): Declare. - * toplev.c (lang_expand_constant): Define it. - * varasm.c (output_constant): Use it. - -Thu May 20 11:28:53 1999 Kaveh R. Ghazi - - * optabs.c (expand_cmplxdiv_straight, expand_cmplxdiv_wide): - Change function definitions to K&R style. - -Thu May 20 08:16:39 1999 Bruce Korb - - * fixinc/fixincl.c: We must not ignore SIGCLD now. - -Thu May 20 07:06:39 1999 Alexandre Oliva - - * fixinc/Makefile.in(gnu-regex.o): add $(INCLUDES) to compile options - * fixinc/fixincl.c(wait_for_pid): K&R-ify arguments - (several places): omit static initialization - (process): use single fd, since only the read fd is used - * fixinc/gnu-regex.c: define 'const' away, if not supported - * fixinc/procopen.c(several places): omit static initialization - * fixinc/server.c: define 'volitile' away, if not supported - -1999-05-20 Andreas Schwab - - * config/dbxcoff.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Use - asm_fprintf and %L to generate the label name. - * config/dbxelf.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Likewise. - (ASM_OUTPUT_SOURCE_LINE): Correct generation of internal labels. - -Thu May 20 01:40:55 1999 Jeffrey A Law (law@cygnus.com) - - * jump.c (can_reverse_comparison_p): Do not abort if the comparison - insn for a conditional jump can not be found. - -Wed May 19 23:58:58 1999 Jeffrey A Law (law@cygnus.com) - - * mips.h (ENCODE_SECTION_INFO): Do not perform GP optimizations - on variables in specific sections other than .sbss and .sdata. - -Wed May 19 03:56:56 1999 Mark Mitchell - - * stmt.c (expand_return): Call start_cleanup_deferral and - end_cleanup_deferral around conditional code. - -Wed May 19 08:40:08 1999 Bruce Korb - - * fixinc/fixincl.tpl: Avoid depending on ANSI C features for - filename lists. Utilizes new "krstr" AutoGen function. - * fixinc/fixincl.x: Rebuilt. - -Wed May 19 02:47:11 1999 Jan Hubicka (hubicka@freesoft.cz) - - * i386.c (output_float_compare): Avoid GNU-C extensions. - -Wed May 19 00:34:40 1999 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump to distinguish mainline tree from the - gcc-2.95 branch. - -See ChangeLog.1 for earlier changes. diff --git a/contrib/gcc/ChangeLog.3 b/contrib/gcc/ChangeLog.3 deleted file mode 100644 index 52df960..0000000 --- a/contrib/gcc/ChangeLog.3 +++ /dev/null @@ -1,16860 +0,0 @@ -2000-06-30 Mark Mitchell - - * Makefile.in (c-common.o): Don't depend on c-tree.h or c-lex.h. - * c-common.c (ridpointers): Declare. - * c-common.h (enum rid): Declare. - (NORID): Likewise. - (ridpointers): Likewise. - * c-lex.c (ridpointers): Don't declare. - (init_lex): Initialize ridpointers. - * c-lex.h (enum rid): Don't declare. - (NORID): Likewise. - (RID_FIRST_MODIFIER): Likewise. - (ridpointers): Likewise. - -2000-06-30 J. David Anglin - - * pa/som.h (ASM_WEAKEN_LABEL): Export weak data symbols so that they - have global scope. - -2000-06-30 Martin von Loewis - - * invoke.texi (-Wreturn-type): In C++, a missing return type is - always an error. - -2000-06-30 Catherine Moore - - * c-common.c (decl_attributes): Differentiate between - types and type decls for alignment. - -2000-06-30 Nathan Sidwell - - * cpp.texi: Document #pragma GCC dependency - * cppfiles.c (open_include_file): Set date to unknown. - (_cpp_compare_file_date): New function. - (read_include_file): Set file date. - * cpphash.h (struct include_file): Add date member. - (_cpp_compare_file_date): Prototype. - * cpplib.c (parse_include): Add trail parameter. Adjust. - (do_include): Adjust parse_include call. - (do_import): Likewise. - (do_include_next): Likewise. - (gcc_pragmas): Add dependency pragma. - (do_pragma_dependency): New pragma. - -2000-06-29 Jason Merrill - - * dwarf2out.c (output_loc_operands): Don't abort on codes that have - no operands. - -2000-06-29 Jim Wilson - - * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS): Return NO_REGS for - a volatile mem and FR_REGS. - -2000-06-29 Mark Mitchell - - * c-common.c: Include c-common.h, not c-lex.h or c-tree.h. - * c-common.h (flag_const_strings): Declare. - (warn_format): Likewise. - (flag_traditional): Likewise. - (flag_isoc99): Likewise. - (warn_parentheses): Likewise. - (warn_conversion): Likewise. - (C_TYPE_OBJECT_P): Likewise. - (C_TYPE_INCOMPLETE_P): Likewise. - (C_TYPE_FUNCTION_P): Likewise. - (C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise. - (C_EXP_ORIGINAL_CODE): Likewise. - (build_unary_op): Likewise. - (build_binary_op): Likewise. - (lvalue_p): Likewise. - (default_conversion): Likewise. - (common_type): Likewise. - * c-tree.h (C_TYPE_OBJECT_P): Remove. - (C_TYPE_INCOMPLETE_P): Likewise. - (C_TYPE_FUNCTION_P): Likewise. - (C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise. - (C_EXP_ORIGINAL_CODE): Likewise. - (common_type): Likewise. - (default_conversion): Likewise. - (build_binary_op): Likewise. - (build_unary_op): Likewise. - (lvalue_p): Likewise. - (flag_const_strings): Likewise. - (warn_format): Likewise. - (warn_conversion): Likewise. - (flag_traditional): Likewise. - (flag_isoc99): Likewise. - (warn_parentheses): Likewise. - -2000-06-29 James E. Wilson - - * config/ia64/linux.h (LINK_SPEC): Change so.1 to so.2. - - * config/ia64/ia64.h (MODES_TIEABLE_P): Only tie if mode class is the - same. Only tie XFmode with XFmode. - -2000-06-29 Zack Weinberg - - * c-decl.c, timevar.c, tlink.c: Include intl.h. - * Makefile.in: Update deps. - -2000-06-29 Andrew Haley - - * toplev.c (main): On an IA-64, make flag_unwind_tables defauit - to true. - -2000-06-29 Andrew Haley - - * config/ia64/linux.h (JMP_BUF_SIZE): Size is in Pmode units, not - bytes: remove the multiply by 8. - -2000-06-29 Philipp Thomas - - * rtl.c : Revert NLS changes. - * gcc.c : Fix bug in display_help introced by my last changes. - -Wed Jun 28 21:09:33 2000 Raja R Harinath - - * dbxout.c (dbxout_symbol, case RESULT_DECL, VAR_DECL): Use - DECL_CONTEXT, not DECL_FIELD_CONTEXT. - -2000-06-29 Michael Hayes - - * flow.c (flow_depth_first_order_compute): Fix algorithm. - -2000-06-28 Philipp Thomas - - * c-decl.c : Mark strings for translation. - (parmlist_tags_warning): Use distinct messages instead - of conditional expressions. - * diagnostic.c (v_message_with_decl): Mark string for translation. - * gcc.c: Mark messages for translation. - (display_help): Combine messages into one string where necessary. - * mips-tfile: Add intl.h. Mark messages for translation. - * rtl.c (fatal_with_file_and_line): Modify function for NLS. Mark - messages for translation. - * timevar.c: Mark messages for translation. - * tlink.c: Likewise. - * toplev.c: Likewise. - -Wed Jun 28 15:39:26 2000 Donn Terry (donnte@microsoft.com) - - * i386-interix.h (STRIP_NAME_ENCODING): Declare _new_name properly. - - * alpha/alpha-interix.h: Delete redundant -Asystem(interix), - use -isystem instead of -idirafter. - * i386/i386-interix.h: Likewise. - -2000-06-28 Jason Merrill - - * dwarf2out.c (output_loc_operands): Don't support >1 byte output - unless DWARF2_DEBUGGING_INFO is defined. - (ASM_OUTPUT_DWARF_*): Wrap normal output defs with #ifndefs. - -2000-06-28 Richard Henderson - - * config/alpha/alpha.c (summarize_insn): Ignore SCRATCH. - -2000-06-28 Jakub Jelinek - - * cpplex.c (output_line_command): Output correct #line if a header - is including itself and is not protected against multiple inclusion. - -2000-06-28 Zack Weinberg - - * cppfiles.c (open_include_file): If open(2) returns EMFILE or - ENFILE, close all cached file descriptors and try again. - (_cpp_execute_include): Keep a count of the number of times - each header is included. - (close_cached_fd): New function. - * cpphash.h (struct include_file): Rename before to - include_count; all users updated. Make include_count and sysp - unsigned short. - * cppinit.c (cpp_finish): If -H, report headers that could use - reinclude guards. - (report_missing_guard): New function. - -Wed Jun 28 14:46:58 MET DST 2000 Jan Hubicka - - * i386.md (prologue_set_got): Set length_immediate field. - (testqi_ccno_1): Add missing '@' character. - -2000-06-27 Jason Merrill - - * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Use - DWARF_FRAME_REGNUM. - -2000-06-27 Andrew Macleod - - * dwarf2out.c (ASM_OUTPUT_DWARF_DATA2): Provide default when no - unsigned macros available. - -2000-06-27 Richard Henderson - - * config/ia64/ia64.c (emit_insn_group_barriers): Special case - epilogue_deallocate_stack. - - * config/ia64/ia64.c (ia64_print_operand) [case D]: Emit - completers for UNORDERED and ORDERED as well. - * config/ia64/ia64.md (bunordered, bordered): New. - (sunordered, sordered): New. - -Tue Jun 27 12:14:12 MET DST 2000 Jan Hubicka - - * genattrtab.c (write_attr_value): Do not abort for CONST_INT operands. - * i386.c (ix86_attr_length_default): Kill. - (ix86_attr_length_immediate_default, ix86_attr_length_address_default): - New. - * i386-protos.h (ix86_attr_length_default): Kill - (ix86_attr_length_immediate_default, ix86_attr_length_address_default): - Add prototype - * i386.md (attribute type): Add "test". - (attribute length_prefix): Kill. - (attribute length_opcode): Kill. - (attribute i387, mode, length_immediate, length_address, prefix_data16, - prefix_rep, prefix_0f, modrm): New. - (attribute length): Compute using the new attributes. - (attribute pent_prefix): New. - (attribute pent_pair): Compute using pent_prefix. - (all insn patterns): Set mode,modrm and immediate_length attributes where - needed. - (cmpsi patterns): Compute sizes properly for test instruction. - (movsi, movhi patterns): Compute sizes properly for eax shortcuts. - (movstricthi_xor, movstrictqi_xor): New patterns. - (andsi/andhi): Use splitters to generate xor instructions. - (xorqi_ext_1): New pattern. - (movstricthi->movstricthi_xor peep2): New. - -Tue Jun 27 12:03:03 MET DST 2000 Jan Hubicka - - * i386.md (addqi_low_1): Remove. - -2000-06-27 Philipp Thomas - - * 1750a.h: Mark help strings for options/switches for translation. - * a29k.h: Likewise. - * alpha.h: Likewise. - * arm.h: Likewise. - * pe.h: Likewise. - * riscix.h: Likewise. - * c4x.h: Likewise. - * clipper.h: Likewise. - * convex.h: Likewise. - * elxsi.h: Likewise. - * fr30.h: Likewise. - * fx80.h: Likewise. - * h8300.h: Likewise. - * i370.h: Likewise. - * cygwin.h: Likewise. - * dgux.h: Likewise. - * djgpp.h: Likewise. - * i386.h: Likewise. - * osf1elf.h: Likewise. - * osfrose.h: Likewise. - * sco5.h: Likewise. - * win32.h: Likewise. - * i860.h: Likewise. - * paragon.h: Likewise. - * i960.h: Likewise. - * ia64.h: Likewise. - * m32r.h: Likewise. - * mcore.h: Likewise. - * mips.h: Likewise. - * mn10300.h: Likewise. - * ns32k.h: Likewise. - * pdp11.h: Likewise. - * pj.h: Likewise. - * aix.h: Likewise. - * aix41.h: Likewise. - * aix43.h: Likewise. - * beos.h: Likewise. - * rs6000.h: Likewise. - * sysv4.h: Likewise. - * linux.h: Likewise. - * linux64.h: Likewise. - * sp64-elf.h: Likewise. - * sparc.h: Likewise. - * splet.h: Likewise. - * v850.h: Likewise. - * convex.h (TARGET_SWITCHES): Provide descriptions and mark them - for translation. - * sp86x-aout.h: Remove bogus first definition of SUBTARGET_SWITCHES. - Properly document option and mark for translation. - * sp86x-elf.h: Likewise. - -2000-06-27 Bernd Schmidt - - Add MMX and SSE registers to i386 machine description. - * i386-protos.h (ix86_constant_alignment, ix86_data_alignment, - ix86_local_alignment): Declare. - - * i386.h (TARGET_MMX, TARGET_SSE): New. - (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS, CALL_USED_REGISTERS, - REG_ALLOC_ORDER, HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, - REG_CLASS_NAMES, REG_CLASS_CONTENTS,REG_CLASS_FROM_LETTER, - enum reg_class, HI_REGISTER_NAMES): Added MMX/SSE registers. - (FIRST_SSE_REG, LAST_SSE_REG, SSE_REGNO_P): New. - (FIRST_MMX_REG, LAST_MMX_REG, MMX_REGNO_P, MMX_REG_P): New macros. - (RETURN_IN_MEMORY): Handle MMX/SSE. - (REG_PARM_STACK_SPACE): Added so the first three TImode parameters - also get stack space. - (MUST_PASS_IN_STACK): Added TImode to the default definition. - (CUMULATIVE_ARGS): Added sse_nregs, sse_regno and sse_words. - (MMX_REGISTER_NAMES): New. - (ALIGN_MODE_128): New macro. - (CONSTANT_ALIGNMENT): Code moved out-of-line; just call the function. - (DATA_ALIGNMENT): Likewise. - (LOCAL_ALIGNMENT): Likewise. - (CONDITIONAL_REGISTER_USAGE): Make MMX/SSE regs fixed if not - TARGET_MMX/TARGET_SSE. - (VALID_SSE_REG_MODE, VALID_MMX_REG_MODE): New macros. - (REG_CLASS_FROM_LETTER): 'y' for MMX regs. - (SECONDARY_MEMORY_NEEDED): Be conservative about copying between - SSE/MMX regs and something else. - (CLASS_MAX_NREGS): 1 for SSE and MMX regs. - (REGISTER_MOVE_COST): 10 if trying to move between MMX and SSE regs, - 3 if moving between MMX regs and something else. - - * i386.c (reg_class): Add SSE_REGS, MMX_REGS. - (regclass_map): Add MMX/SSE registers. - (print_operand): Add code to print XMMWORD as appropriate. - (ix86_split_movdi): Abort for MMX regs. - (init_cumulative_args): Also allow SSE_REGS - (function_arg_advance, function_arg): Likewise - (print_reg): Support 'm'. Add case for TImode. - (override_options): TARGET_SSE implies TARGET_MMX. - (ix86_constant_alignment, ix86_data_alignment, ix86_local_alignment): - New functions. - - * config/i386/unix.h (VALUE_REGNO): VECTOR_MODE values go to - FIRST_SSE_REG. - * config/i386/ptx4-i.h (RETURN_IN_MEMORY): Return MMX values in - memory. - * config/i386/sysv4.h (RETURN_IN_MEMORY): Likewise. - * config/i386/i386elf.h (RETURN_IN_MEMORY): Likewise. - -2000-06-26 Geoff Keating - - * ssa.c (struct rename_set_data): Change the name of field - 'set_dest' to 'old_reg'. Add comments. - (struct rename_context): Change the name of 'set_data' to - 'new_renames'. Add new field 'done_renames'. - (create_delayed_rename): New function. - (apply_delayed_renames): New function. - (rename_insn_1): Use the new functions. Handle CLOBBERS. Handle - SUBREGs and similar by emitting a move. - (new_registers_for_updates): Delete, functionality moved to - apply_delayed_renames. - (rename_block): Handle moves emitted by rename_insn_1 by putting - them into a SEQUENCE with the original insn. Add sanity checks - and comments. - (rename_equivalent_regs_in_insn): Don't handle SUBREGs specially. - (rename_equivalent_regs): Expand SEQUENCEs out to individual insns. - -2000-06-26 Andrew Macleod - Jason Merrill - - * dwarf2.h (enum dwarf_call_frame_info): Add - DW_CFA_def_cfa_expression. - * dwarf2out.c (union dw_cfi_oprnd_struct): Add a pointer to a - dw_loc_descr_struct entry. - (struct cfa_loc): New structure to track a CFA location. - (lookup_cfa): Take a cfa_loc parameter instead of a reg and an offset. - (lookup_cfa_1): Take a cfa_loc parameter instead of a reg and an - offset, plus handle DW_CFA_def_cfa_expression. - (def_cfa_1): Use to be dwarf2out_def_cfa, only now it uses a - cfa_loc record. - (dwarf2out_def_cfa): Entry point maintained for compatibility. - (dwarf_cfi_name): Add DW_CFA_def_cfa_expression. - (cfa_reg, cfa_offset): Replace with cfa_loc record 'cfa'. - (cfa_store_reg, cfa_store_offset): Replace with cfa_loc 'cfa_store'. - (initial_return_save, dwarf2out_stack_adjust): Use cfa.reg, not - cfa_reg. - (dwarf2out_frame_debug_expr): Use new cfa_loc records. Recognize rtl - sequences for the new DW_CFA_def_cfa_expression record. - (dwarf2out_frame_debug): Use new variables/fields.A - (output_cfi): Handle DW_CFA_def_cfa_expression. - (output_cfa_loc): New function to generate a CFI record for - DW_CFA_def_cfa_expression. - (get_cfa_from_loc_descr): New function to get a cfa_loc record from - a dw_loc_descr sequeunce. - (build_loc_descr): Build a dw_loc_descr from a cfa_loc record. - (dwarf_stack_op_name, new_loc_descr, add_loc_descr, size_of_loc_descr, - size_of_locs, output_loc_operands, output_loc_sequence): Move into - unwind info section. - * frame.h (frame_state): Add base_offset and indirect fields. - * frame-dwarf2.c (decode_stack_op): New function to interpret a - dw_loc_descr operation. - (execute_cfa_insn): Add support for DW_CFA_def_cfa_expression. - (struct frame_state): Add base offset and indirect fields. - * libgcc2.c (next_stack_level): Support indirect loading for CFA. - -2000-06-26 Joseph S. Myers - - * c-decl.c (grokdeclarator): Don't warn about `long long' in C99. - Make warnings about implicit int be pedwarns in C99. Don't warn - about duplicate type qualifiers in C99. - (start_function): Make warning about implict int return type be a - pedwarn in C99. - * c-lex.c (yylex): Don't warn about `long long' in C99. - * c-typeck.c (c_expand_return): In C99, always pedwarn about - `return' with no value in function returning non-void. - -2000-06-26 Richard Henderson - - * c-typeck.c (pedwarn_c99): New. - * diagnostic.c (verror, vwarning, vpedwarn): Export. - * toplev.h: Prototype them. - -2000-06-26 J. David Anglin - - * c-typeck.c (digest_init): Return error_mark_node node when - TREE_TYPE (init) == error_mark_node. - -2000-06-26 Philipp Thomas - - * aclocal.m4 (AM_WITH_NLS): Don't set MSGFMT or GMSGFMT to no, - test for msgfmt without path instead. - * configure: Rebuilt. - -2000-06-25 Theodore Papadopoulo - - * gengenrtl.c (special_rtx): Fix typo in comment. - -2000-06-26 Michael Hayes - - * mklibgcc.in (LIB2FUNCS): Add missing space. - -2000-06-24 Bernd Schmidt - - * tree.h (enum tree_index): Add vector type nodes. - Add accessor macros for them. - (TYPE_REPRESENATION_TYPE): New macro. - * tree.c (build_common_tree_nodes_2): Build these nodes. - (finish_vector_type): New function. - * c-common.c (type_for_mode): Handle vector modes. - * tm.texi (VECTOR_MODE_SUPPORTED_P): Document. - - * dbxout.c (dbxout_type): Handle VECTOR_TYPEs. - * dwarf.h (enum dwarf_fundamental_type): Add 128 bit integers. - * dwarf2out.c (lookup_type_die): Handle VECTOR_TYPEs. - (gen_type_die): Likewise. - * dwarfout.c (dwarf_fund_type_name): Handle 128 bit integers. - (fundamental_type_code): Likewise. - (type_is_fundamental): VECTOR_TYPEs aren't. - (output_type): Handle VECTOR_TYPEs. - -2000-06-25 Kazu Hirata - - * config/arm.c: Fix a comment typo. - * config/arm.h: Likewise. - -2000-06-25 Philipp Thomas - - * aclocal.m4 (AM_WITH_NLS): Set create_catalogs=no if no catalog - compiler found. - AM_GNU_GETTEXT: Don't set CATALOGS if create_catalogs=no. - * configure: Rebuilt. - -2000-06-25 John David Anglin - - * config/vax/vax.h (TARGET_SWITCHES): Provide descriptions. - -2000-06-25 Herman A.J. ten Brugge - - * mklibgcc.in: Prefer LIB1ASMFUNCS over LIB2FUNCS when generating - libgcc.a. - -2000-06-24 Marc Espie - - * collect2.c (resolve_lib_name): Move '/' check out of loop. - -2000-06-24 Dirk Duellmann - - * ginclude/stddef.h (NULL): define for non-gnu C++ parsers as 0. - -2000-06-24 Jakub Jelinek - - * stmt.c (expand_decl_cleanup): Emit a dummy insn after - last_unconditional_cleanup. - -2000-06-24 Bernd Schmidt - - * tree.def (VECTOR_TYPE): New node type. - * tree.h: Adjust some comments to reflect addition of vector types. - (TYPE_VECTOR_SUBPARTS): New macro. - * stor-layout.c (layout_type): Handle VECTOR_TYPE. - * c-convert.c (convert): Likewise. - * convert.c (convert_to_integer): Handle vector modes. - (convert_to_vector): New function. - * convert.h (convert_to_vector): Declare. - * expr.c (convert_move): Handle vector modes. - * expmed.c (extract_bit_field): Don't abort for vector modes. - -2000-06-24 Marek Michalkiewicz - - * config/avr/avr-protos.h (avr_hard_regno_mode_ok): New prototype. - * config/avr/avr.c (out_adj_frame_ptr, out_set_stack_ptr): - New functions, common code moved from function_{prologue,epilogue} - and extended to support the -mtiny-stack option. - (function_prologue, function_epilogue): Use them. - Use lo8/hi8 consistently for asm output readability. - (avr_hard_regno_mode_ok): New function. - * config/avr/avr.h (TARGET_SWITCHES): Fix typo. Add -mtiny-stack. - (UNITS_PER_WORD): Define as 4 (not 1) when compiling libgcc2.c. - (HARD_REGNO_MODE_OK): Call the avr_hard_regno_mode_ok function. - * config/avr/avr.md (*mov_sp_r): Add support for -mtiny-stack. - Write SPH before SPL. - (*movqi): No need to disable interrupts for just one "out" - in alternative 5. Change length attribute from 4 to 1. - * config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__): - Write SPH before SPL. - -2000-06-24 Bernd Schmidt - - * rtl.texi (Vector Operations): New node. - (Arithmetic): Add ss_plus, us_plus, ss_minus, us_minus. - (Conversions): Add ss_truncate, us_truncate. - * rtl.def (VEC_MERGE, VEC_SELECT, VEC_CONCAT, VEC_REORDER, - VEC_CONST, VEC_DUPLICATE, SS_PLUS, SS_MINUS, SS_TRUNCATE, - US_TRUNCATE): New rtx codes. - * machmode.def: Add vector modes. - * machmode.h (enum mode_class): Add MODE_VECTOR_INT and - MODE_VECTOR_FLOAT. - (INTEGER_MODE_P): Check for MODE_VECTOR_INT. - (FLOAT_MODE_P): Check for MODE_VECTOR_FLOAT. - (VECTOR_MODE_P): New. - -2000-06-24 Nathan Sidwell - - * cpp.texi: Clarify #pragma GCC namespace. - -2000-06-24 Philipp Thomas - - * aclocal.m4(AM_GNU_GETTEXT): If LINGUAS isn't set, build - all catalogs specified in ALL_LINGUAS. - * configure: Rebuilt. - -2000-06-23 Jakub Jelinek - - * config/sparc/sparc.md (reload_outdi+1): Handle - HOST_BITS_PER_WIDE_INT == 64 case correctly. - (adddi3_insn_sp32+1, adddi3_insn_sp32+2, andsi3+2): Likewise. - -2000-06-23 Geoffrey Keating - - * alias.c (fixed_scalar_and_varying_struct_p): Don't examine - struct vs. scalar-ness when -fno-strict-aliasing. - -2000-06-23 Nathan Sidwell - - * cpplib.c (struct pragma_entry): New structure. - (pragma_dispatch): Pragma dispatcher. - (top_pragmas, gcc_pragmas): New static variables. - (do_pragma): Use pragma_dispatch. - (do_pragma_gcc): New pragma handler. - * cpp.texi: Update. - -2000-06-23 Jakub Jelinek - - * calls.c (compute_argument_addresses): Force stack slots into - alias set 0. - * expr.c (emit_push_insn): Force pushes into alias set 0. - -2000-06-23 Richard Henderson - - * config/ia64/ia64.md (pred_rel_mutex): Only take one register. - * config/ia64/ia64.c (emit_predicate_relation_info): Adjust to match. - -2000-06-22 Jason Merrill - - * toplev.c (compile_file): Always call timevar_print. - * Makefile.in (calls.o): Depend on TIMEVAR_H. - -2000-06-22 Nathan Sidwell - - * varasm.c (constant_descriptor): Make contents unsigned char. - (mark_const_hash_entry): Adjust. - (const_hash): Just hash the code of unknown nodes. - (compare_constant_1): Adjust for unsigned char. - Use language specific expander on unknown nodes. - (record_constant_1): Likewise. - -2000-06-21 Zack Weinberg - - * cppfiles.c (cpp_make_system_header): New function. - * cpplib.h: Prototype it. - * cpplib.c (do_line, do_pragma_system_header): Use it. - * fix-header.c (read_scan_file): Use it. - - * fix-header.c (check_macro_names): Cast second arg of - cpp_defined to const unsigned char *. - (read_scan_file): Make getchar_call const unsigned char. - -2000-06-21 Zack Weinberg - - * cppfiles.c: Include splay-tree.h, not hashtab.h. - (redundant_include_p, make_IHASH, hash_IHASH, eq_IHASH): Delete. - (destroy_include_file_node): New. - (_cpp_init_include_hash): Rename _cpp_init_include_table. - Create a splay tree, not a hash table. - (open_include_file): Look up the path in the include table, - do the multiple include optimization here, etc. - (cpp_included): Walk the path. - (find_include_file): Just walk the path calling - open_include_file, or call it directly for an absolute path. - (_cpp_fake_ihash): Rename _cpp_fake_include and update for new - scheme. - (read_include_file): Update for new scheme. Don't close the - file unless reading fails. - (_cpp_execute_include, cpp_read_file): Tweak for new scheme. - - * cpphash.h (struct ihash, NEVER_REINCLUDE): Delete. - (struct include_file): New. - (NEVER_REREAD, DO_NOT_REREAD, CPP_IN_SYSTEM_HEADER): New - macros. - (CPP_PEDANTIC, CPP_WTRADITIONAL): Update. - Update prototypes. - - * cppinit.c: Include splay-tree.h. - (cpp_reader_init, cpp_cleanup): Update. - - * cpplib.h (struct cpp_buffer): Change ihash field to - 'struct include_file *inc'. Remove system_header_p. - (struct cpp_reader): Change all_include_files to a - struct splay_tree_s *. - - * cpplex.c: Update all references to cpp_buffer->ihash and/or - cpp_buffer->system_header_p. - (cpp_pop_buffer): Close file here, only if DO_NOT_REREAD. - - * Makefile.in (SPLAY_TREE_H): New macro. - (cppfiles.o, cppinit.o): Update dependencies. - -Wed Jun 21 11:05:48 2000 Martin Buchholz - - * invoke.texi (g++): "g++" is not a script anymore. - -2000-06-20 J. David Anglin - - * function.c (round_down): Delete obsolete prototype. - - * pa.h (CPP_SPEC): Add whitespace after -D__STDC_EXT__. - -2000-06-20 Zack Weinberg - - * configure.in: Use 'test a = b' not 'test a == b'. - * configure: Regen. - - * Makefile.in (fix-header): Link with $(LIBS) not $(HOST_LIBS). - - * Makefile.in: Remove all references to HOST_INTLLIBS. - - * cpplex.c (parse_name): Don't warn about $ in identifiers if - skipping. - -2000-06-20 Philipp Thomas - - * config/pa/pa.h(TARGET_SWITCHES): Require binutils 2.10 or later - for PA 2.0. - -Mon Jun 19 23:26:40 2000 J"orn Rennecke - - * Take REG_INC notes into account. - -2000-06-19 Zack Weinberg - - * c-parse.in (undeclared_variable_notice): Moved to c-typeck.c. - (primary: IDENTIFIER): Just call build_external_ref. - * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: - Regenerate. - * c-lex.c (lastiddecl): Remove. - (yylex): Replace all instances of lastiddecl with local - variables. - - * c-typeck.c (build_external_ref): New function. Treat decls - with C_DECL_ANTICIPATED mostly the same as nonexistent decls. - Look up the decl from the id here. Call lookup_objc_ivar. - * c-lang.c (lookup_objc_ivar): Stub. - * objc/objc-act.c (lookup_objc_ivar): New function. - - * c-tree.h: Prototype lookup_objc_ivar and build_external_ref. - * c-lex.h: Don't declare lastiddecl. - -2000-06-19 Benjamin Chelf - - * c-common.h (IF_COND): Added documentation. - (THEN_CLAUSE): Likewise. - (ELSE_CLAUSE): Likewise. - (WHILE_COND): Likewise. - (WHILE_BODY): Likewise. - (DO_COND): Likewise. - (DO_BODY): Likewise. - (RETURN_EXPR): Likewise. - (EXPR_STMT_EXPR): Likewise. - (FOR_INIT_STMT): Likewise. - (FOR_COND): Likewise. - (FOR_EXPR): Likewise. - (FOR_BODY): Likewise. - (SWITCH_COND): Likewise. - (SWITCH_BODY): Likewise. - (CASE_LOW): Likewise. - (CASE_HIGH): Likewise. - (GOTO_DESTINATION): Likewise. - (COMPOUND_BODY): Likewise. - (ASM_CV_QUAL): Likewise. - (ASM_STRING): Likewise. - (ASM_OUTPUTS): Likewise. - (ASM_INPUTS): Likewise. - (ASM_CLOBBERS): Likewise. - (DECL_STMT_DECL): Likewise. - (STMT_EXPR_STMT): Likewise. - (LABEL_STMT_LABEL): Likewise. - - * c-common.def: Added documenetion for SRCLOC, EXPR_STMT, - COMPOUND_STMT, DECL_STMT, IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT, - RETURN_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, - LABEL_STMT, ASM_STMT, SCOPE_STMT, CASE_LABEL, STMT_EXPR. - -2000-06-19 Kaveh R. Ghazi - - * configure.in (--enable-checking): Update --help doc to reflect - new defaults. Ensure $ac_save_IFS is set before $IFS is changed. - -Sun Jun 18 21:42:15 2000 Richard Kenner - - * gcse.c (insert_insn_end_bb): Always put after NOTE_INSN_BASIC_BLOCK. - - * function.c (put_var_into_stack): Don't reference DECL_ fields - if input is a SAVE_EXPR. - Use set_mem_attributes in COMPLEX case. - -2000-06-18 Richard Henderson - - * config/ia64/ia64-protos.h (process_for_unwind_directive): Declare. - (ia64_file_start): Declare. - * config/ia64/ia64.h (ADDL_REGNO_P): Don't compare unsigned against 0. - (GR_REGNO_P): Likewise. - * config/ia64/ia64.c: Many prototypes. - (ia64_reg_numbers): Constify. - (ia64_input_reg_names, ia64_local_reg_names): Likewise. - (ia64_section_threshold): Make unsigned. - (ia64_print_operand): Constify. - (fix_range): Constify. - (ia64_init_builtins): Don't compare signed vs unsigned. - (ia64_expand_builtin): Likewise. - - * config/ia64/ia64.h (EXTRA_CONSTRAINT): New. - (CONSTRAINT_OK_FOR_Q): New. - * config/ia64/ia64.md (movdi_internal): Use Q for fp<->mem. - (movsf_internal, movdf_internal): Likewise. - (cmovdi_internal): Rewrite so that constraints and predicates match; - simplify splitters. - (cmovsi_internal): Likewise. - - * config/ia64/ia64.h (ASM_SPEC): Add -x for gas. - (ASM_FILE_START): New. - * config/ia64/ia64.c (ia64_file_start): New. - (rtx_needs_barrier): Handle pred.rel.mutex. - (emit_predicate_relation_info): New. - * config/ia64/ia64.md (pred_rel_mutex): New. - * config/ia64/linux.h (ASM_SPEC): Define. - * config/ia64/sysv4.h (ASM_FILE_START): Define. - - * config/ia64/ia64.c (ia64_encode_section_info): Fix thinko - filtering global register variables. - -2000-06-18 Kaveh R. Ghazi - - * c-common.c (add_c_tree_codes): Fix definition for traditional C. - -2000-06-17 Michael Meissner - - * gcc.c (do_spec_1, '%v3' case): Do not abort if patch level is - not present and there is a field after a '-'. - -2000-06-17 Bruce Korb - - * fixinc/check.tpl: finish the implementation of multiple tests - for a single fix - * fixinc/inclhack.def(ctrl_quotes_def): add a second test - (io_quotes_def): add a second test - (various): reorder `files' so that "limits.h" is never first - * fixinc/tests/base/*: update the testing output - -Sat Jun 17 10:33:59 2000 Richard Kenner - - * gcc.texi: Remove reference to stupid.c. - -2000-06-16 Benjamin Chelf - - * c-common.c (c_tree_code_type): New array. - (c_tree_code_length): Likewise. - (c_tree_code_name): Likewise. - (add_c_tree_codes): New function. - - * c-common.h (add_c_tree_codes): Declare. - (enum c_tree_code): New enum. - - * c-lex.c (init_parse): Added call to add_c_tree_codes. - -2000-06-16 Kaveh R. Ghazi - - * fixinc/inclhack.def (ctrl_quotes_def, io_quotes_def): Modify - select pattern to also match macro defs with only one argument. - -Thu Jun 15 18:56:12 2000 Jeffrey A Law (law@cygnus.com) - - * i386.md: Create new [right,left] rotate and right shift - patterns to optimize shift by 1 bit for certain ia32 processors. - Update patterns which perform left shifts to optimize shift by - 1 bit for certain ia32 processors. - * i386.c (const_int_1_operand): New predicate. - * i386.h (PREDICATE_CODES): Handle const_int_1_operand. - * i386-protos.h (const_int_1_operand): Prototype. - -Wed Jun 14 23:46:26 2000 J"orn Rennecke - - * mips.c (machine_dependent_reorg): Fix braces for nested if. - -2000-06-14 Geoff Keating - - * rs6000.c (toc_hash_eq): Use CODE_LABEL_NUMBER to compare - LABEL_REFs. - -2000-06-14 Richard Henderson - - * conflict.c (conflict_graph_compute): Don't look for REG_INC. - - * config/ia64/ia64.c (ia64_setup_incoming_varargs): Don't emit - auto-inc code. - - * print-rtl.c (print_rtx): Emit space before mem alias set. - -2000-06-14 David Edelsohn - - * rs6000.c (expand_block_move): Fix typo in earlier change. - (print_operand): Remove unused variables neg and op. - (toc_hash_mark_entry): Fix prototype. - -2000-06-14 Benjamin Chelf - - * c-common.h (IF_COND): Moved here from cp/cp-tree.h. - (THEN_CLAUSE): Likewise. - (ELSE_CLAUSE): Likewise. - (WHILE_COND): Likewise. - (WHILE_BODY): Likewise. - (DO_COND): Likewise. - (DO_BODY): Likewise. - (RETURN_EXPR): Likewise. - (EXPR_STMT_EXPR): Likewise. - (FOR_INIT_STMT): Likewise. - (FOR_COND): Likewise. - (FOR_EXPR): Likewise. - (FOR_BODY): Likewise. - (SWITCH_COND): Likewise. - (SWITCH_BODY): Likewise. - (CASE_LOW): Likewise. - (CASE_HIGH): Likewise. - (GOTO_DESTINATION): Likewise. - (COMPOUND_BODY): Likewise. - (ASM_CV_QUAL): Likewise. - (ASM_STRING): Likewise. - (ASM_OUTPUTS): Likewise. - (ASM_INPUTS): Likewise. - (ASM_CLOBBERS): Likewise. - (DECL_STMT_DECL): Likewise. - (STMT_EXPR_STMT): Likewise. - (LABEL_STMT_LABEL): Likewise. - (SCOPE_BEGIN_P): Likewise. - (SCOPE_END_P): Likewise. - (SCOPE_STMT_BLOCK): Likewise. - (SCOPE_NULLIFIED_P): Likewise. - (SCOPE_NO_CLEANUPS_P): Likewise. - (SCOPE_PARTIAL_P): Likewise. - (ASM_VOLATILE_P): Likewise. - (STMT_LINENO): Likewise. - (STMT_LINENO_FOR_FN_P): Likewise. - - * c-common.def: New file. Added SRCLOC, SIZEOF_EXPR, ARROW_EXPR, - ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, - FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, - CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, - SCOPE_STMT, CASE_LABEL, STMT_EXPR. - - * gencheck.c (tree_codes[]): Added '#include "c-common.def"'. - -2000-06-14 David O'Brien - - * gcc.c (main): Quiet compiler warnings. argv is assumed to be - writable in parts of the GCC code. - - * config/elfos.h (ASM_GENERATE_INTERNAL_LABEL): Make printf - specification match cast. - -Wed Jun 14 09:25:57 2000 Jeffrey A Law (law@cygnus.com) - - * configure.in: Revert AC_TYPE_GETGROUPS patch from June 13. - * configure, config.in: Rebuilt. - * sys-protos.h: Similarly. - -Wed Jun 14 03:39:58 EDT 2000 John Wehle (john@feith.com) - - * ifcvt.c (EDGE_COMPLEX): Move definition ... - * basic-block.h (EDGE_COMPLEX): ... here. - - * loop.c (check_dbra_loop): Specify the register when - generating REG_NONNEG notes and don't generate duplicates. - -2000-06-13 Jakub Jelinek - - * tree.h (TYPE_USER_ALIGN, DECL_USER_ALIGN): Define. - (struct tree_type, struct tree_decl): Add user_align member. - * stor-layout.c (layout_decl): Set DECL_USER_ALIGN. - (place_union_field): If BIGGEST_FIELD_ALIGNMENT is defined - and DECL_USER_ALIGN 0, cap alignment to this value. - (place_field): Likewise. - (finalize_type_size): Set TYPE_USER_ALIGN. - (layout_type): Likewise. - (initialize_sizetypes): Likewise. - * c-common.c (decl_attributes): Set TYPE_USER_ALIGN resp. - DECL_USER_ALIGN to 1. - * c-decl.c (duplicate_decls): Set DECL_USER_ALIGN. - (xfer_tag): Set TYPE_USER_ALIGN. - (finish_struct): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN. - (finish_enum): Likewise. - * stmt.c (expand_decl): Set DECL_USER_ALIGN. - (expand_anon_union_decl): Likewise. - * tree.c (make_node): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN. - (build_index_type): Set TYPE_USER_ALIGN. - (build_range_type): Likewise. - (build_common_tree_nodes_2): Likewise. - * tm.texi (BIGGEST_FIELD_ALIGNMENT): Document the changed meaning. - -2000-06-13 Andreas Jaeger - - * configure.in: Use --enable-checking=misc,tree,gc by default if - no --enable-checking option is given and for - --enable-checking=yes. - * configure: Rebuilt. - -2000-06-13 Richard Henderson - - * libgcc2.c (ia64_throw_helper): Use __builtin_return_address. - (__throw): Don't pass the address of a label. - - * config/ia64/ia64.c (ia64_compute_frame_size): Use - current_function_is_leaf. - (ia64_expand_prologue): Likewise. Modify return_address_pointer_rtx - instead of reg_names[RETURN_ADDRESS_REGNUM]. - (ia64_init_machine_status): Reset return_address_pointer_rtx. - * config/ia64/ia64.h (RETURN_ADDRESS_POINTER_REGNUM): Rename - from RETURN_ADDRESS_REGNUM. Update all uses. - (RETURN_ADDR_RTX): Use return_address_pointer_rtx; return - zero instead of null on failure. - (ELIMINABLE_REGS): Add ra->b0 elimination. - (CAN_ELIMINATE): Update accordingly. - (INITIAL_ELIMINATION_OFFSET): Likewise. - (REGISTER_NAMES): Use an illegal assembler name for - RETURN_ADDRESS_POINTER_REGNUM. - -2000-06-13 Richard Henderson - - * config/ia64/ia64.h (enum reg_class): Remove FR_INT_REGS, FR_FP_REGS, - GR_AND_FR_INT_REGS, GR_AND_FR_FP_REGS. - (REG_CLASS_NAMES): Likewise. - (REG_CLASS_CONTENTS): Likewise. - (FR_FP_REGNO_P, FR_INT_REGNO_P): Remove. - (HARD_REGNO_MODE_OK): Remove references to them. - (REGNO_REG_CLASS): Likewise. - (REG_CLASS_FROM_LETTER): Likewise. - (CLASS_MAX_NREGS): Likewise. - (REGISTER_MOVE_COST): Likewise. - * config/ia64/ia64.c (ia64_secondary_reload_class): Likewise. - * config/ia64/ia64.md (*): Replace "e" constraints with "f". - (movqi_internal): Special case moves from zero. - (movhi_internal, movsi_internal): Likewise. - (movdi_internal): Likewise. Fill out "f" constraints. - (movsf_internal): Fill out "r" constraints. - (movdf_internal): Likewise. - -2000-06-13 Richard Henderson - - * flow.c (insn_dead_p): Keep sets to PIC_OFFSET_TABLE_REGNUM - alive before reload. - - * haifa-sched.c (struct deps): Add in_post_call_group_p. - (add_dependence): Handle notes between SCHED_GROUP_P insns. - (remove_dependence): Always define. - (set_sched_group_p): New. - (sched_analyze_2): Use it. - (sched_analyze_insn): Don't special-case naked uses. Look for - and extend in_post_call_group_p. - (sched_analyze): Clear stale SCHED_GROUP_P. Set in_post_call_group_p. - (init_deps): Clear in_post_call_group_p. - -2000-06-13 Richard Henderson - - * combine.c (subst): Use CLASS_CANNOT_CHANGE_MODE and - CLASS_CANNOT_CHANGE_MODE_P instead of CLASS_CANNOT_CHANGE_SIZE - and hard-coded tests. - (simplify_set): Likewise. - (gen_lowpart_for_combine): Likewise. - * emit-rtl.c (gen_lowpart_common): Likewise. - * global.c (find_reg): Likewise. - * local-alloc.c (find_free_reg): Likewise. - * recog.c (register_operand): Likewise. - * regclass.c (init_reg_sets_1): Likewise. - (record_operand_costs, regclass): Likewise. - * reload.c (push_reload): Likewise. - * reload1.c (choose_reload_regs): Likewise. - * flow.c (mark_used_regs): Conditionally set REG_CHANGES_MODE. - * local-alloc.c (struct qty): Rename changes_size to changes_mode. - Update all references. - * regs.h (struct reg_info_def): Likewise. - (REG_CHANGES_MODE): Rename from REG_CHANGES_SIZE. - * tm.texi (CLASS_CANNOT_CHANGE_MODE): Document. - (CLASS_CANNOT_CHANGE_MODE_P): Likewise. - - * config/alpha/alpha.h (CLASS_CANNOT_CHANGE_MODE): Rename. - (CLASS_CANNOT_CHANGE_MODE_P): New. - * config/mips/mips.h: Likewise. - * config/pa/pa32-regs.h: Likewise. - * config/pa/pa64-regs.h: Likewise. - * config/rs6000/rs6000.h: Likewise. - * config/sh/sh.h: Likewise. - * config/ia64/ia64.h (CLASS_CANNOT_CHANGE_MODE): New. - (CLASS_CANNOT_CHANGE_MODE_P): New. - * config/avr/avr.h (CLASS_CANNOT_CHANGE_SIZE): Remove dead code. - * config/d30v/d30v.h: Likewise. - -2000-06-13 J. David Anglin - - * configure.in: Add AC_TYPE_GETGROUPS test. - * sys-protos.h: Use GETGROUPS_T * for second arg of getgroups. - * configure: Rebuilt. - * config.in: Rebuilt. - -2000-06-13 Richard Henderson - - * explow.c (set_mem_attributes): Do nothing for NULL type. - -Tue Jun 13 14:45:10 2000 Jeffrey A Law (law@cygnus.com) - - * config/m68k/openbsd.h (ASM_SPEC): pass down options to assembler - correctly. - -2000-06-13 James E. Wilson - - * config/ia64/ia64.md (movxf_internal): Add missing "e" to ldf/stf. - -Tue Jun 13 14:05:35 2000 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (gensupport.o): Remove bogus $(HOST_PREFIX) reference. - -2000-06-13 Philipp Thomas - - * configure.in(ALL_LINGUAS): Changed en_UK to en_GB. - * configure: Rebuilt. - -2000-06-07 David O'Brien - - * configure.in: Adjust FreeBSD bits to match changes to config.guess. - We now default to ELF for the i386, and a.out is the special case. - * configure: Rebuilt. - -Tue Jun 13 10:05:30 2000 Hans-Peter Nilsson - - * final.c (final_scan_insn): Delete notes between cc0 setter and - user when restarting from setter. - -2000-06-13 J. David Anglin - - * vax.h (INDEX_TERM_P): Define evaluation order of &&'s in || and - cast to squelch signed/unsigned warnings. - -2000-06-13 Zack Weinberg - - * cpplib.c (handle_directive): Print non-NUL-terminated string - with %.*s. - -2000-06-12 Michael Meissner - - * ifcvt.c (dead_or_predicable): Don't do conditional execution - path if the machine needs extra support to do conditional - execution. - -Mon Jun 12 17:04:17 2000 Jeffrey A Law (law@cygnus.com) - - * print-rtl.c (print_rtx, case MEM): Use HOST_WIDE_INT_PRINT_DEC - to print the alias set. - * print-tree.c (print_node, DECL_* nodes and case 't'): Similarly. - -2000-06-12 J. David Anglin - - * config/float-vax.h: Add GFLOAT defines. - -Mon Jun 12 9:44:00 2000 Mark Klein - - * configure.in: Update tm dependencies for MPE. - * configure: Rebuilt. - -2000-06-12 H.J. Lu - - * gengenrtl.c (obstack_alloc_rtx): Correct the allocated size. - -2000-06-12 David Edelsohn - - * aix41.h (SUBTARGET_SWITCHES): Delete threads. - (CPP_SPEC): Change mthreads to pthread. - (LIB_SPEC): Likewise. - (STARTFILE_SPEC): Likewise. - * aix43.h (SUBTARGET_SWITCHES): Delete threads. - (CPP_SPEC): Change mthreads to pthread. - (LIB_SPEC): Likewise. - (STARTFILE_SPEC): Likewise. - * rs6000-protos.h (reg_or_arith_cint_operand): New. - * rs6000.c (reg_or_arith_cint_operand): New. - (num_insns_constant_wide): Decorate unsigned constant. - * rs6000.h (PREDICATE_CODES): Add reg_or_arith_cint_operand. - * rs6000.md (addsi3): Use new predicate. - (subsi3, adddi3, subdi3): Likewise. - -2000-06-12 Mark Mitchell - - * c-common.c (lang_get_alias_set): Fix typo. - -2000-06-12 Richard Earnshaw - - * flow.c (mark_used_regs): Revert last change. - (life_analysis): Remove PROP_AUTOINC if running after reload. - (propagate_one_insn): PROP_AUTOINC is always off after reload. - -2000-06-11 Richard Earnshaw - - * flow.c (mark_used_regs): Don't call find_auto_inc after reload - has run. - -2000-06-11 Kaveh R. Ghazi - - * bb-reorder.c (build_scope_forest): Initialize variable - `curr_scope'. - - * calls.c (expand_call): Likewise for variables - `save_pending_stack_adjust' and `save_stack_pointer_delta'. - - * i386.c (function_arg_advance, function_arg): Cast to avoid - signed/unsigned warnings. - - * i386.h (MEMORY_MOVE_COST): Likewise. - - * ifcvt.c (cond_exec_process_if_block): Initialize variables - `else_start' and `else_end'. - - * libgcc2.h (__eh_alloc, __eh_free): Prototype. - - * regrename.c (rr_replace_reg): Initialize variable `dest_subregno'. - -2000-06-10 Mark Mitchell - - * Makefile.in (libintl.a): Depend on intl.all. - -2000-06-09 H.J. Lu (hjl@gnu.org) - - * Makefile.in (c-parse.o): Also depend on output.h. - -2000-06-09 Rodney Brown - - * mcore-protos.h: discards const warning removal. - * mcore.c: discards const warning removal. - -2000-06-09 Kazu Hirata - - * config/h8300/lib1funcs.asm: Declare the machine architecture at - the beginning of the file. - -2000-06-09 J. David Anglin - - * real.h: Add prototype for ldexp. - -2000-06-09 Zack Weinberg - - * ggc-none.c, ggc-simple.c, ggc-page.c (ggc_alloc_obj): Rename - it ggc_alloc, drop second argument, never clear returned memory. - * ggc-common.c (ggc_alloc_string): Use ggc_alloc. - (ggc_alloc_cleared): New. - * ggc.h: Prototype ggc_alloc and ggc_alloc_cleared, not - ggc_alloc_obj. Remove ggc_alloc macro. - (ggc_alloc_rtx, ggc_alloc_rtvec, ggc_alloc_tree): Use ggc_alloc. - - * rtl.c (rtvec_alloc): Clear the vector always. - (rtx_alloc): Clear the first word always. Remove dirty - obstack tricks (this routine is no longer a bottleneck). - * tree.c (make_node): Clear the new node always. - (make_tree_vec): Likewise. - (tree_cons): Clear the common structure always. - (build1): Likewise; also, clear TREE_COMPLEXITY. - * gengenrtl.c: Use puts wherever possible. Remove extra - newlines. - (gendef): Clear the first word of an RTX in the generator - function, irrespective of ggc_p. Initialize '0' slots to - NULL. - (genlegend): Don't generate obstack_alloc_rtx routine, just a - thin wrapper macro around obstack_alloc. - - * stmt.c (expand_fixup): Use ggc_alloc. - * c-typeck.c (add_pending_init): Use ggc_alloc. - * emit-rtl.c (init_emit_once): Clear CONST_DOUBLE_CHAIN(tem). - * varasm.c (immed_double_const): Set CONST_DOUBLE_MEM(r) to - const0_rtx when it is created. - (immed_real_const_1): Set CONST_DOUBLE_CHAIN(r) to NULL_RTX if - we are not in a function. - - * tree.c (tree_class_check_failed): Make second arg an int. - * tree.h: Update prototype. - -2000-06-09 Geoff Keating - - * tree.h (VOID_TYPE_P): Don't look at the TYPE_MAIN_VARIANT - of an error_mark_node. - -Fri Jun 9 20:35:13 2000 Denis Chertykov - - * config/avr/avr.c (asm_output_section_name): bugfix. - -2000-06-09 Jason Merrill - - * timevar.def: Add TV_EXPAND. - * timevar.c (timevar_print): Update timing information. - * calls.c (try_to_integrate): Push to TV_INTEGRATION for inlining. - - * stmt.c (expand_return): Check for error_mark_node. - -2000-06-09 Kaveh R. Ghazi - - * configure.in: Also avoid wrapping auto-build.h with IN_GCC. - - * scan-types.sh (VALUE) Wrap use with double quotes to protect - variable against filename expansion when it contains "char *". - - * system.h (SSIZE_MAX): Delete backup definition. - - * cppfiles.c (read_include_file): Use INTTYPE_MAXIMUM(ssize_t) - instead of SSIZE_MAX. - -2000-06-09 Jakub Jelinek - - * configure.in: Check whether gas supports -relax. - * configure, config.in: Rebuilt. - * config/sparc/sparc.h (ASM_RELAX_SPEC): Define. - (EXTRA_SPECS): Add asm_relax. - (ASM_SPEC): Add %(asm_relax). - (TARGET_SWITCHES): Add -mrelax and -mno-relax. - * config/sparc/linux64.h (LINK_ARCH_SPEC): Rename to LINK_SPEC. - (LINK_SPEC): Pass -relax to linker unless -mno-relax or -r. - (ASM_SPEC): Add %(asm_relax). - * config/sparc/linux.h (LINK_SPEC, ASM_SPEC): Likewise. - * config/sparc/sparc.c (output_sibcall): If HAVE_AS_RELAX_OPTION, - never use sethi/jmpl for leaf tail calls. Use or with rs2 %g0 - instead of mov, so that gas can further optimize it. - -2000-06-08 James E. Wilson - - * dwarf2out.c (size_of_die, case dw_val_class_const): Use - size_of_sleb128. - (value_format, case dw_val_class_const): Use sdata format. - (output_die): Call output_sleb128. - -2000-06-08 James E. Wilson - - * dwarf2out.c (ASM_OUTPUT_DWARF_DATA8): Add new macro that uses - UNALIGNED_DOUBLE_INT_ASM_OP. Rename old macro to - ASM_OUTPUT_DWARF_CONST_DOUBLE. - (output_die, case dw_val_class_unsigned_const): Correct call to - ASM_OUTPUT_DWARF_DATA8. - (output_die, case dw_val_class_long_long): Use - ASM_OUTPUT_DWARF_CONST_DOUBLE. - * tree.c (host_integerp): Accept unsigned HOST_WIDE_INT values when - pos is zero. - - * config/ia64/ia64-protos.h (ia64_output_end_prologue): Add. - (output_function_prologue): Fix mispelling. - (output_function_prologue, output_function_epilogue): Reorder to - match ia64.c definition order. - * config/ia64/ia64.c (ia64_expand_prologue): Add comment. - (ia64_expand_epilogue): Set RTX_FRAME_RELATED_P on stack restore insns. - Use r3 instead of r2 for large stack restores. - (ia64_output_end_prologue): New function. - (process_set): Emit ".restore sp" for epilogue stack restores. - * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Define. - -2000-06-08 Jakub Jelinek - - * dbxout.c (dbxout_type_fields): Don't segfault on fields with - incomplete types. - -2000-06-08 Nathan Sidwell - - * frame.c (end_fde_sort): Remove extraneous erratic array test. - -2000-06-08 Denis Perchine - - * frame.c (start_fde_sort): Don't malloc (0). - -2000-06-07 Zack Weinberg - - * c-decl.c (pushdecl): Do not call COMPLETE_TYPE_P on - error_mark_node. - * print-tree.c (print_node): The transparent_union_flag means - different things for unions and arrays. Do not inspect it - with TYPE_TRANSPARENT_UNION. - -2000-06-06 Jakub Jelinek - - * cpplib.c (do_ifdef, do_ifndef): Don't segfault if parse_ifdef - returned NULL. - -Wed Jun 7 20:34:33 2000 Denis Chertykov - - * config/avr/avr.c (asm_output_section_name): output section - attributes. - * config/avr/libgcc.S (.text.libgcc): declare section attributes. - -2000-06-06 James E. Wilson - - * frame.h (struct unwind_info_ptr): Collapse version, flags, and length - fields into header field. - (IA64_UNW_HDR_LENGTH, IA64_UNW_HDR_FLAGS, IA64_UNW_HDR_VERSION): New - macros to access length, flags, and version info from header field. - * config/ia64/crtbegin.asm (__do_frame_setup_aux): Delete here. - * config/ia64/crtend.asm (__do_frame_setup_aux): Add here. - (__do_global_ctors_aux): Fix caller. - * config/ia64/frame-ia64.c (get_unwind_record): Change parameter - prologue_flag to header. Pass to read_P_record. - (read_P_record): New argument header. Implement P4 format. - Multiply P7_T_SIZE by 16. - (execute_one_ia64_descriptor): New static local region_header. Pass to - get_unwind_record. Copy r to region_header if r is a header record. - (print_all_records): Likewise. - (__build_ia64_frame_state): Use IA64_UNW_HDR_LENGTH. - (__get_personality, __get_except_table): Likewise. - * config/ia64/ia64.c (process_set): Do not divide offsets by 4. - -2000-06-06 Philipp Thomas - - * configure.in (AC_C_INLINE): Added. - * aclocal.m4 (AM_WITH_NLS): Enable --with-included-gettext by default. - * configure: Regenerate. - -2000-06-06 Mark Mitchell - - * c-common.h (c_language_kind): New type. - (c_language): New variab.e - * c-common.c (lang_get_alias_set): Don't put structures in - nonzero alias sets in C++. - * c-decl.c (c_language): Define it. - * c-lex.c (doing_objc_thang): Remove. - * c-tree.h (doing_objc_thang): Make it a macro. - * objc/objc-act.c (lang_decode_option): Set c_language, not - doing_objc_thang. - -2000-06-06 Gabriel Dos Reis - - * diagnostic.c (output_maximum_width): Remove. - (doing_line_wrapping): Tweak. - (diagnostic_buffer): New object. - (global_output_buffer): New object. - (output_destroy_prefix): New function. - (default_initialize_buffer): Likewise. - (reshape_diagnostic_buffer): Likewise. - (initialize_diagnostics): Likewise. - (output_clear): Tweak. - (line_wrapper_printf): Adjust call to init_output_buffer. - (vline_wrapper_message_with_location): Likewise. Use - output_destroy_prefix. - (v_message_with_decl): Likewise. - - * diagnostic.h (struct output_buffer): Constify prefix. - (init_output_buffer, output_get_prefix): Constify. - (diagnostic_message_length_per_line): Likewise. - (reshape_diagnostic_buffer): Declare. - (default_initialize_buffer): Declare. - (initialize_diagnostics): Declare. - (diagnostic_buffer): Declare new obbject. - - * toplev.c: #include diagnostic.h - (display_help): Document diagnostic formatting options. - (decode_f_option): Handle diagnostic formatting options. - (main): Setup initialization for diagnostic messages outputter. - - * toplev.h (set_message_length): Remove. - - * Makefile.in (toplev.o): Depends upon diagnostic.h - - * invoke.texi : Document diagnostics formatting options. - -Tue Jun 6 19:25:32 2000 Philippe De Muyter - - * configure.in (Make the links): Typo fix : the file that must be - included without #ifdef IN_GCC is `auto-host.h', not `auto-config.h'. - * configure: File rebuilt. - -2000-06-06 Nathan Sidwell - - * eh-common.h (EH_ALLOC_SIZE, EH_ALLOC_ALIGN): New #defines. - (eh_context): Add alloc_mask and alloc_buffer emergency fallback - space. - * libgcc2.c (__eh_alloc): Moved from cp/exception.cc. Fallback on - emergency eh_context buffer, if malloc fails. - (__eh_free): Moved from cp/exception.cc. Release to emergency - eh_context buffer, if appropriate. - -2000-06-06 Jason Merrill - - * expr.c (store_expr): Fix typo. - -2000-06-06 Kaveh R. Ghazi - - * m68k.c (legitimize_pic_address): Move prototype ... - - * m68k-protos.h (legitimize_pic_address): ... here. - - * m68k.md (legitimize_pic_address): Delete prototypes. - (untyped_call): Invoke GEN_CALL(), not gen_call(). - - * nextstep.c: Include system.h and toplev.h. - (get_directive_line): Don't prototype. - (handle_pragma): Mark parameters with ATTRIBUTE_UNUSED and constify. - - * nextstep.h (handle_pragma): Prototype. - (SECTION_FUNCTION): Prototype FUNCTION(). Move prototype of - objc_section_init ... - (EXTRA_SECTION_FUNCTIONS): ... here. - -Tue Jun 6 08:17:26 2000 Richard Kenner - - * sdbout.c (struct sdb_file): NAME now const. - (sdbout_init): input_file_name now const. - (sdbout_start_new_source_file): FILENAME now const. - * sdbout.c (sdbout_init, sdbout_start_new_source_file): Reflect above. - -2000-06-06 Gabriel Dos Reis - - * c-typeck.c (build_conditional_expr): Handle complex data types. - -2000-06-05 Jason Merrill - - * explow.c (maybe_set_unchanging): New function, broken out from... - (set_mem_attributes): Here. - * expr.h: Declare it. - * stmt.c (expand_decl): Call it. - -2000-06-05 Richard Henderson - - * reload1.c (choose_reload_regs): Mind CLASS_CANNOT_CHANGE_SIZE - while looking for a register to inherit from. - -2000-06-05 Jason Merrill - - * Makefile.in (libgcc.ready): Lose. - (libgcc.mk): Just use mv, not move-if-change. - (LIBGCC_DEPS): New macro. - (libgcc.a): Use it. - (stmp-multilib): Likewise. - * mklibgcc.in (stmp-dirs): New target. Make everything depend on - it rather than the directories themselves. - (LIB2ADD): Depend on the list file rather than 'force'. - - * fold-const.c (fold, case COND_EXPR): Elide conversion between - cv-qualified versions of types. - -Mon Jun 5 14:06:18 2000 Richard Kenner - - * config/sparc/sparc.c (short_branch): Correct error in range - computation. - -2000-06-05 J. David Anglin - - * fixinc/inclhack.def: New include hacks for ultrix. - * (nested_ultrix): Replaced by ultrix_nested_svc. - * (ultrix_atof_param): test_text string added. - * (ultrix_ifdef): Modified select string. - -2000-06-05 Zack Weinberg - - * objc/objc-act.c (generate_method_descriptors): Register - objc_method_prototype_template as a GC root. - (comp_method_with_proto): Register function_type as a GC root. - (comp_proto_with_proto): Replace function_type1 and - function_type2 with a two-element array; register it as a GC root. - - (generate_protocols, build_protocol_initializer, - generate_protocol_list, build_category_initializer, - build_shared_structure_initializer): Do not cache cast_type - and/or cast_type2. - -2000-06-05 J. David Anglin - - * function.c (assign_parms): Add missing argument to set_mem_attributes - call. - -2000-06-05 Nathan Sidwell - - * tree.h (VOID_TYPE_P): New macro. - (COMPLETE_OR_VOID_TYPE_P): Use VOID_TYPE_P. - * c-decl.c (grokdeclarator): Use VOID_TYPE_P. - (get_parm_info): Likewise. - (store_parm_decls): Likewise. - (combine_parm_decls): Likewise. - (finish_function): Likewise. - * c-typeck.c (build_function_call): Likewise. - (build_binary_op): Likewise. - (build_conditional_expr): Likewise. - (internal_build_compound_expr): Likewise. - (convert_for_assignment): Likewise. - * stmt.c (expend_expr_stmt): Likewise. - (warn_if_unused_value): Likewise. - (expand_return): Likewise. - * c-parse.in (primary): Likewise. - * c-parse.y, c-parse.c, c-parse.h: Regenerate. - * objc/objc-parse.y, objc/objc-parse.c: Regenerate. - -Mon Jun 5 06:46:28 2000 Richard Kenner - - * alias.c (get_alias_set): If compnent is addressable, use alias - set of component. - * c-decl.c (init_decl_processing): Don't call record_component_aliases. - (grokdeclarator): Likewise. - * c-typeck.c (common_type): Likewise. - -2000-06-04 Alex Samuel - - * Makefile.in (OBJS): Remove dyn_string.o - (dyn-string.o): Delete rule. - * dyn-string.c: Delete file - * dyn-string.h: Likewise. - -2000-06-04 Kaveh R. Ghazi - - * Makefile.in (intl.*): Honor nonzero exit codes in the intl - subdir. - -2000-06-03 Geoff Keating - - * alias.c (record_component_aliases): Don't inspect - DECL_NONADDRESSABLE_P of non-FIELD_DECL components of structures. - -Sat Jun 3 19:05:30 2000 Michael Meissner - - * ifcvt.c (process_insns): If IFCVT_MODIFY_INSN is defined, call - it with the pattern to do machine dependent work. - (cond_exec_process_if_block): If IFCVT_MODIFY_TESTS is defined, - use it to modify the true/false tests used in conditional - execution. If IFCVT_MODIFY_FINAL and IFCVT_MODIFY_CANCEL are - defined, invoke them if the conversion to conditional execution - was successful or not. - - * tm.texi (IFCVT_MODIFY_TESTS): Document. - (IFCVT_MODIFY_INSN): Ditto. - (IFCVT_MODIFY_FINAL): Ditto. - (IFCVT_MODIFY_CANCEL): Ditto. - -Sat Jun 3 15:26:13 2000 Matt Kraai - - * toplev.c (main): Fix misspellings of possibility and language. - -2000-06-03 Richard Henderson - - * alias.c (record_alias_subset): Initialize has_zero_child in the - superset. - -2000-06-03 Richard Earnshaw (rearnsha@arm.com) - - * arm.md (untyped_call): Use GEN_CALL macro. - -2000-06-02 Pekka Nikander - - * Makefile.in: Use $(MAKE) not "make" - -Fri Jun 2 19:31:03 2000 Richard Kenner - - * alias.c (struct alias_set_entry): New field has_zero_child. - (mem_in_disjoint_alias_sets_p): Return 0 if set in either ase. - (get_alias_set): If language-dependent routine set TYPE_ALIAS_SET, - do nothing. - Call record_component_aliases for aggregate types. - (record_alias_subset): Set has_zero_child. - (record_component_aliases, case ARRAY_TYPE): Do nothing if - TYPE_NONALIASES_COMPONENT. - (record_component_aliases, case RECORD_TYPE): Test - DECL_NONADDRESSABLE_P. - * c-decl.c (grokdeclarator): Set DECL_NONADDRESSABLE_P instead - of TREE_ADDRESSABLE. - * calls.c (initialize_argument_information): Only test - TYPE_TRANSPARENT_UNION for UNION_TYPE. - * function.c (assign_parms): Likewise. - * integrate.c (function_cannot_inline_p): Likewise. - * stor-layout.c (finish_record_layout): Don't call - record_component_aliases. - * tree.h (struct tree_int_cst): Use struct tree_common. - (struct tree_real_cst, struct tree_string): Likewise. - (struct tree_complex, struct tree_identifier): Likewise. - (struct tree_list, struct tree_vec, struct tree_exp): Likewise. - (struct tree_block, struct tree_type, struct tree_decl): Likewise. - (TYPE_TRANSPARENT_UNION): Use UNION_TYPE_CHECK. - (TYPE_NONALIASES_COMPONENT): New macro. - (TYPE_AMBIENT_BOUNDEDNESS): Use FUNCTION_TYPE_CHECK. - (DECL_NONADDRESSABLE_P): New macro. - (struct tree_decl): Reorder bits for clarity of how many left; - add non_adressable. - -2000-06-02 Jason Merrill - - * Makefile.in (libgcc.a): Also depend on $(LIB2ADD). - * mklibgcc.in (force): New target. - Make LIB2ADD stuff depend on it. - -2000-06-02 Richard Henderson - - * alias.c (lang_get_alias_set): Remove. - (get_alias_set): Call it directly, not indirectly. - * c-common.c (lang_get_alias_set): Rename from c_get_alias_set. - * c-common.h (c_get_alias_set): Don't declare. - * c-decl.c (init_decl_processing): Don't set lang_get_alias_set. - * expr.h (lang_get_alias_set): Declare as function, not pointer. - -2000-06-02 Bruce Korb - - * fixinc/server.c(sig_handler): resume closing server on SIGPIPE - (server_setup): define the server's master pid - (close_server): actually do the deed IFF we are the server's master - -2000-06-02 Jakub Jelinek - - * c-common.c (c_get_alias_set): Check whether signed_type did not - return its argument before calling get_alias_set on the result. - -2000-06-02 Andrew MacLeod - - * expr.c (emit_group_load): Fix typo, GET_MODE not GET_CODE. - -Fri Jun 2 00:22:52 2000 J"orn Rennecke - - * sh.h (CPP_SPEC): Add -D__NOMACSAVE__ for -mnomacsave. - (CONDITIONAL_REGISTER_USAGE): Mac registers are call used - for TARGET_NOMACSAVE. - (NOMACSAVE_BIT): Define. - (TARGET_NOMACSAVE): Define. - (TARGET_SWITCHES): Add "nomacsave". - -2000-06-02 Toshiyasu Morita - - * sh.md (untyped_call): Remove excess parameters - -2000-06-01 Loren J. Rittle - - * fixinc/inclhack.def (osf_namespace_a): Relax expression to - match that used before the conversion to c_fix style. - * fixinc/fixincl.x: regenerate - -2000-06-01 Stan Cox - - * varray.h (VARRAY_PUSH_GENERIC_PTR, VARRAY_PUSH_CHAR_PTR): Fix - macro argument typo. - -2000-06-01 Zack Weinberg - - * cpplex.c (maybe_macroexpand): Use CPP_WTRADITIONAL. Improve - error message. - * cpplib.c (parse_include): Remove support for VAX-C - "#include starlet" misfeature. - -2000-05-31 Laurynas Biveinis - - * cppfiles.c: conditionally define O_BINARY. - (open_include_file): pass O_BINARY to open(). - -2000-06-01 Richard Henderson - - * i960.c (i960_br_predict_opcode): Remove. - (i960_print_operand) [+]: Emit branch prediction hints. - (i960_function_arg): Return early for VOIDmode. - (i960_round_align): Return early for incomplete types. - * i960.h (PRINT_OPERAND_PUNCT_VALID_P): New. - * i960.md (all conditional branches): Add "%+". - -Thu Jun 1 12:24:21 2000 Richard Kenner - - * alias.c (get_alias_set): Don't call language-specific routine more - than is needed and clean up code a bit. - * c-common.c (c_get_alias_set): All references whose type - is char get alias set 0, but character types need not. - * varasm.c (make_function_rtl): Don't call set_mem_attributes. - (make_decl_rtl): Don't call it for FUNCTION_DECL. - -2000-06-01 Bruce Korb - - * fixinc/tests/base/...: new base result files - -Thu Jun 1 09:37:35 2000 Clinton Popetz - - * config/i386/i386.c (ix86_use_fcomi_compare): Make global. - * config/i386/i386-protos.h (ix86_use_fcomi_compare): Declare. - * config/i386/i386.md (*fp_jcc_3, *fp_jcc_4): Disable if we - will use FCOMI. - -2000-06-01 Richard Henderson - - * Makefile.in (c-decl.o): Depend on $(EXPR_H), not expr.h. - - * c-decl.c (init_decl_processing): Set lang_get_alias_set first thing. - -2000-05-31 Richard Henderson - - * config/ia64/ia64.c (sdata_symbolic_operand): Consider small - CONSTANT_POOL_ADDRESS_P addresses for .sdata. - * config/ia64/sysv4.h (SELECT_RTX_SECTION): New. - -2000-05-31 Richard Henderson - - * config/ia64/ia64-protos.h (ia64_expand_prediction): Remove. - * config/ia64/ia64.c (ia64_expand_prediction): Move code ... - (ia64_print_operand) [+]: ... here. Use current_output_insn. - * config/ia64/ia64.h (PRINT_OPERAND_PUNCT_VALID_P): New. - * config/ia64/ia64.md (all branch/call patterns): Use %+. - -2000-05-31 Richard Henderson - - * ifcvt.c (cond_exec_process_insns): Don't ever ignore clobbers. - -2000-05-31 Richard Henderson - - * ifcvt.c (merge_if_block): Be prepared for JOIN to have no - remaining edges. - (find_if_block): Allow THEN with no outgoing edges. - * flow.c (merge_blocks_nomove): Remove a barrier not following - a jump as well. - -2000-05-31 Richard Henderson - - * flow.c (propagate_block): Move initialization of mem_set_list ... - (init_propagate_block_info): ... here. Also track blocks with - no successors; don't scan insns if ! PROP_SCAN_DEAD_CODE. - -2000-05-31 Richard Henderson - - * jump.c (jump_optimize_1): Revert 05-18 change. - -2000-05-31 Mark Mitchell - - * invoke.texi: Remove documentation for -fguiding-decls. - -2000-05-31 Richard Henderson - - * configure.in: Fix typo last change. - -2000-05-31 Philipp Thomas - - * configure.in (enable-nls): Enable if build == host, i.e. when - not building a canadian cross compiler. - (enable-maintainer-mode): Added for use with i18n. - * aclocal.m4 (AM_GNU_GETTEXT): Only build catalogs that are a - cross section of ALL_LINGUAS and LINGUAS. - * configure: Rebuild. - -2000-05-31 Bruce Korb - - * fixinc/check.tpl: rework to use test result tree - * fixinc/Makefile.in: change invocation of check script - * fixinc/check.diff: No longer needed - * fixinc/fixincl.x: regenerate - * fixinc/inclhack.def: add new tests - * fixinc/tests/base/arch/i960/archI960.h: New test result - * fixinc/tests/base/curses.h: modified test result - * fixinc/tests/base/stdio.h: ditto - * fixinc/tests/base/time.h: ditto - * fixinc/tests/base/sys/asm.h: ditto - * fixinc/tests/base/sys/stat.h: ditto - * fixinc/tests/base/sys/wait.h: ditto - -Wed May 31 13:17:20 2000 Philippe De Muyter - - * except.c (clear_function_eh_region): Do not free NULL. - -Wed May 31 08:07:52 2000 Richard Kenner - - * Makefile.in (c-decl.o): Depend on rtl.h and expr.h. - * alias.c (struct alias_entry): alias_set is HOST_WIDE_INT. - (REG_BASE_VALUE): Remove unneeded cast to unsigned. - (get_alias_set_entry): ALIAS_SET arg is HOST_WIDE_INT. - (find_base_decl): New function, from c_find_base_decl in c-common.c. - (new_alias_set): Moved from tree.c; return is HOST_WIDE_INT. - (get_alias_set): Likewise. - Major rework to do more things and allow language-specific code - to just handle special-cases. - (record_alias_subset): Args are HOST_WIDE_INT. - (record_component_alias): Local vars are HOST_WIDE_INT. - Don't handle COMPLEX_EXPR. - (get_varargs_alias_set): Moved from builtins.c. - (get_frame_alias_set): New function. - * builtins.c (expand_builtin_return_address): Use frame alias set. - (expand_builtin_setjmp, expand_builtin_longjmp): Use alias set - for setjmp buffer. - (get_memory_rtx): Rework to use set_mem_attributes. - (get_varargs_alias_set): Deleted from here. - * c-common.c (c_apply_type_quals_to_decl): Alias sets now HOST_WIDE_INT. - (c_find_base_decl): Deleted from here. - (c_get_alias_set): Remove many cases and rework to just handle - C-specific cases. - * c-common.h (c_get_alias_set): Returns HOST_WIDE_INT. - * c-decl.c (rtl.h, expr.h): Now included. - (init_decl_processing): Call record_component_aliases on array types. - (grokdeclarator): Likewise. - Set TREE_ADDRESSABLE for all fields that are not bitfields. - * c-typeck.c (common_type): Call record_component_aliases for array. - * caller-save.c (setup_save_areas): Rework register loop for unsigned. - Set all save areas to the frame alias set. - * calls.c (initialie_argument_information): Call set_mem_attributes. - (compute_argument_addresses, expand_call): Likewise. - * explow.c (set_mem_attributes): New function. - (stabilize): Use MEM_COPY_ATTRIBUTES and force_reg. - * expr.c (struct move_by_pieces): Remove {to,from}_{struct,readonly}. - LEN and OFFSET now HOST_WIDE_INT. - (clear_by_pieces): Similar changes. - (move_by_pieces): LEN now HOST_WIDE_INT; don't set deleted fields. - (move_by_pieces_ninsns): Now returns unsigned HOST_WIDE_INT. - (move_by_pieces_1): Don't use deleted fields, use MEM_COPY_ATTRIBUTES. - (clear_by_pieces_1): Likewise. - (emit_push_insn): Call set_mem_attributes. - (expand_expr, case INDIRECT_REF): Likewise. - (expand_expr, case VAR_DECL): Call change_address. - * expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE): Use host_integerp and - tree_low_cst. - (get_varargs_alias_set, get_frame_alias_set): New decls. - (record_base_value, record_alias_subset, lang_get_alias_set): Likewise. - (new_alias_set, set_mem_attributes): Likewse. - * function.c (struct temp_slot): ALIAS_SET is HOST_WIDE_INT. - (assign_stack_temp_for_type): Likewise. - Can split slot even if alias set since can copy. - Set MEM_ALIAS_SET and MEM_SET_IN_STRUCT_P. - (assign_temp): Use host_integerp and tree_low_cst. - (put_var_into_stack): Properly handle SAVE_EXPR. - (put_addressof_into_stack): Likewise. - (assign_parms): Call set_mem_attributes. - Delete #if 0 code. - (fix_lexical_address): Put reference to chain into frame alias set. - (expand_function_start): Call set_mem_attributes. - * integrate.c (expand_inline_function): Likewise. - * recog.c (adj_offsettable_operand): Use MEM_COPY_ATTRIBUTES. - * regmove.c (try_apply_stack_adjustment): Likewise. - * reload.c (push_reload, make_memloc): Likewise. - * reload1.c (alter_reg): Make alias sets for spilled pseudos. - * rtl.def (MEM): Update comment. - * rtl.h (MEM_ALIAS_SET): Now uses XCWINT. - (move_by_pieces): Change length to HOST_WIDE_INT. - (record_base_value, record_alias_subset): Delete from here. - * stmt.c (expand_decl): Call set_mem_attributes. - * stor-layout.c (finish_record_layout): Call record_component_aliases.i - * toplev.c (compile_file): Call init_alias_once earlier. - * tree.c (lang_get_alias_set, get_alias_set, new_alias_set): Deleted - from here: now in alias.c. - * tree.h (struct tree_type): alias_set is HOST_WIDE_INT. - (struct tree_decl): Likewise. - (get_alias_set, new_alias_set, lang_get_alias_set): Deleted from here. - * varasm.c (make_function_rtl, make_decl_rtl): Call set_mem_attributes. - (output_constant_def, force_const_mem): Likewise. - - * flow.c (propagate_block): If block has no successors, stores to - frame are dead if not used. - -2000-05-31 Nathan Sidwell - - * stmt (expand_end_case): Reorder conversion sequence for jump - table to avoid extra truncations. - -Wed May 31 01:31:42 2000 Jeffrey A Law (law@cygnus.com) - - * ifcvt.c (cond_exec_process_if_block): Do nothing if the last insn - in the block is more than just a simple conditional branch. - (noce_process_if_block): Similarly. - -Tue May 30 22:25:57 2000 Alexandre Oliva - - * optabs.c (prepare_float_lib_cmp): Protect *px and *py from - queue. - -2000-05-30 Michael Meissner - - * dwarf2out.c (dwarf2out_frame_debug_expr): Ignore HIGH - instructions. Treat LO_SUM operations as loading the full integer - constant. - -2000-05-30 Richard Henderson - - * combine.c (get_pos_from_mask): Test exact_log2 result as signed. - -2000-05-30 Richard Henderson - - * bb-reorder.c (emit_jump_to_block_after): Protect use of HAVE_return. - -2000-05-30 Bruce Korb - - * fixinc/tests/*: Added expected result files for fixinc's make check - * fixinc/fixfixes(char_macro_*_fix): Restore original algorithm - -2000-05-30 Richard Henderson - - * config/alpha/alpha.md (*setne_internal): Use match_operator - instead of working down from insn. - -2000-05-30 Kaveh R. Ghazi - - * invoke.texi (-Wtraditional): Update WRT function macros. - -Tue May 30 09:57:32 2000 Philippe De Muyter - - * except.c (free_exception_table): Do not free NULL. - -2000-05-29 Zack Weinberg - - * cpplib.c (do_if): Don't save and restore only_seen_white here. - * cppexp.c (_cpp_parse_expr): Save and restore only_seen_white - and skipping here. - -2000-05-29 Richard Earnshaw (rearnsha@arm.com) - - * flow.c (mark_used_reg): If a register is unconditionally live, - remove any conditional death information. - -2000-05-29 Richard Henderson - - * final.c (current_output_insn): New. - (final_scan_insn): Set it. - * output.h: Declare it. - -2000-05-29 Richard Henderson - - * stor-layout.c (finalize_record_size): Fix typo. - - * jump.c (redirect_jump): Don't emit NOTE_INSN_FUNCTION_END - if nlabel is null. - -2000-05-29 Zack Weinberg - - * cpplib.h (cpp_reader): Remove if_stack. Change - potential_control_macro to a cpp_hashnode *. Add skipping flag. - * cpphash.h (struct ihash): Change control_macro to a - cpp_hashnode * and shorten name to cmacro. - Add NEVER_REINCLUDE constant. - - * cppfiles.c (redundant_include_p): Drop cpp_reader argument. - Examine the cmacro node directly, no need to call cpp_defined. - (_cpp_execute_include, read_include_file): Set cmacro to - NEVER_REINCLUDE, not U"". - * cpplex.c (cpp_push_buffer): Don't set new->if_stack. - (cpp_get_token): If pfile->skipping is true, discard text and - keep scanning until we hit a directive; don't expand macros. - - * cpplib.c (struct if_stack): Remove if_succeeded, add - was_skipping. Change control_macro to a cpp_hashnode * and - shorten name to cmacro. Remove typedef IF_STACK. - (parse_ifdef), detect_if_not_defined): Return a cpp_hashnode *. - (conditional_skip, skip_if_group, - consider_directive_while_skipping): Delete. - (push_conditional): New. - (_cpp_handle_directive): Don't process directives other than - conditionals if we are skipping. - - (do_ifdef, do_ifndef, do_if, do_else, do_elif, do_endif): - Update to new scheme. - (validate_else): Skip rest of line here, unconditionally. - (_cpp_unwind_if_stack): The stack is per-buffer. Force - pfile->skipping off. - - (all): Remove `scare quotes' from error messages. - -2000-05-29 Richard Henderson - - * function.c (emit_return_into_block): New line_note arg; emit it. - (thread_prologue_and_epilogue_insns): Attempt to locate a line note - for the close brace to accompany HAVE_return. Move all line notes - following the epilogue to before the NOTE_INSN_EPILOGUE_BEG. - -2000-05-29 Richard Henderson - - * longlong.h [__alpha] (count_leading_zeros): New. - (count_trailing_zeros): New. - (COUNT_LEADING_ZEROS_0): New. - - * config/alpha/alpha.c (alpha_zero_comparison_operator): New. - (alpha_split_conditional_move): New. - * config/alpha/alpha-protos.h: Prototype them. - * config/alpha/alpha.h (PREDICATE_CODES): Update. - (CPP_CPU_DEFAULT_SPEC): Fix typo for EV67. - * config/alpha/alpha.md: Update ffs cix commentary. - (*ze_and_ne): New. - (*nabssf2, *nabsdf2): New. - (*mov[qhsd]icc_internal): Use add_operand. - (if_then_else constant splitters): New. - (*cmp_sadd_di, *cmp_sadd_si, *cmp_sadd_sidi): New. - (*cmp_ssub_di, *cmp_ssub_si, *cmp_ssub_sidi): New. - -2000-05-29 Richard Henderson - - * combine.c (force_to_mode) [MINUS]: Convert subtraction from - a constant to NEG or NOT when conditions allow. - - * combine.c (combine_simplify_rtx): Don't create an if_then_else - unless both args are general_operand. Don't canonicalize plus - to ior unless it helps. - - * toplev.c (rest_of_compilation): Set no_new_pseudos after flow1; - instead track register_life_up_to_date. Toggle no_new_pseudos - around if_convert. - -2000-05-28 Geoff Keating - - * config/rs6000/rs6000.c (output_cbranch): Escape '%' characters - so output_operand doesn't see them. - -Sun May 28 18:37:07 2000 Clinton Popetz - - * lcm.c (make_preds_opaque): Fix comment. - (optimize_mode_switching): Use NORMAL_MODE instead of - MODE_USES_IN_EXIT_BLOCK. Change leftover instance of - FP_MODE_NONE to no_mode. Rename MODE_AT_ENTRY to NORMAL_MODE. - Handle insertions before an existing NOTE_INSN_BASIC_BLOCK. - * tm.texi (OPTIMIZE_MODE_SWITCHING): Refer to NORMAL_MODE. - (MODE_USES_IN_EXIT_BLOCK): Delete. - (MODE_AT_ENTRY) Rename to NORMAL_MODE. - * sh.h (MODE_USES_IN_EXIT_BLOCK): Delete. - (MODE_AT_ENTRY): Rename to NORMAL_MODE. - (MODE_NEEDED): Don't look for USE. - (EPILOGUE_USES): Define. - -Sun May 28 23:26:59 2000 Philippe De Muyter - - * mklibgcc.in (all): Variable initialized to `libgcc'. - -2000-05-28 Gabriel Dos Reis - - * toplev.h (skip_leading_substring): New macro. - * toplev.c (decode_f_option): Use skip_leading_substring instead - of strncmp. - (decode_W_option): Likewise. - -2000-05-28 Nick Clifton - - * tm.texi (CONDITIONAL_REGISTER_USAGE): Document that it can - modify reg_names. - -2000-05-28 Richard Henderson - - * regclass.c (record_operand_costs): Protect reg_changes_size - with CLASS_CANNOT_CHANGE_SIZE. - - * loop.c (instrument_loop_bct): Set JUMP_LABEL on the new insn. - -2000-05-28 Richard Henderson - - * function.c (diddle_return_value): A pcc-style struct return - returns a pointer. - -2000-05-27 Zack Weinberg - - * cppfiles.c: Read files in, using mmap if possible, then - prescan them separately. - (read_file, read_with_read): New functions. - * cpplex.c: Don't define UCHAR_MAX. - (_cpp_read_and_prescan): Rename to _cpp_prescan. Don't read - the file here. - - * cppinit.c (handle_option): Automatically define __cplusplus, - __OBJC__, __ASEEMBLER__, _LANGUAGE_FORTRAN here when we see - the respective -lang switch. - - * cpphash.h (enum node_type, struct hashnode, _cpp_lookup - prototype): Move to... - * cpplib.h: ... here. Rename struct hashnode to struct - cpp_hashnode and give it a typedef. Rename _cpp_lookup to - cpp_lookup. Add 'fe_value' slot, a union tree_node *. - -2000-05-27 Geoffrey Keating - - * config/rs6000/rs6000.md (movsi): Constify 'name'. - - * regclass.c [CLASS_CANNOT_CHANGE_SIZE] - (class_can_change_size): New variable. - (reg_changes_size): New variable. - (init_reg_sets_1): Initialize class_can_change_size. - (record_operand_costs): Remove subreg_changes_size. - Don't pass it around. Instead update reg_changes_size. - (regclass): Initialize and free reg_changes_size. If a register - changes size, don't preference it to a class that contains - registers that can't change size. - (record_reg_classes): Don't look at subreg_changes_size. - -2000-05-27 Richard Henderson - - * print-rtl.c (reg_names): Remove const. - * regclass.c (reg_names): Likewise. - * regs.h (reg_names): Likewise. - * hard-reg-set.h (reg_names): Likewise. - -2000-05-27 Richard Henderson - - * config/rs6000/rs6000.md (untyped_call): Use GEN_CALL. - -2000-05-27 Richard Henderson - - * config/alpha/alpha.c (alpha_does_function_need_gp): Test - TARGET_PROFILING_NEEDS_GP in the if, instead of with an ifdef. - (alpha_expand_prologue): Emit prologue_mcount if needed. - * config/alpha/alpha.h (TARGET_PROFILING_NEEDS_GP): Default to 0. - * config/alpha/alpha.md (prologue_mcount): New. - * config/alpha/linux.h (FUNCTION_PROFILER): Remove. - (TARGET_PROFILING_NEEDS_GP): Undef before redefining. - * config/alpha/netbsd.h: Likewise. - -2000-05-27 Richard Henderson - - * config/alpha/elf.h (SELECT_SECTION): Mirror Kenner's May 19 - change to config/elfos.h. - -2000-05-27 Richard Henderson - - * Makefile.in (resource.o): Depend on except.h. - * except.h (output_exception_table_data): Prototype. - * genconfig.c (gen_peephole2): Prototype. - * genemit.c (main): Include ggc.h. - * genoutput.c: Revert parts of last change: include errors.h - (main): Set progname. - * recog.c: Include hard-reg-set.h before recog.h. - * resource.c: Include except.h. - - * config/alpha/alpha-protos.h (alpha_arg_info_reg_val): Protect - with RTX_CODE. - (alpha_write_linkage): Protect with BUFSIZ. - (alpha_need_linkage): Update prototype. - * config/alpha/alpha.c (function_arg): Move VMS code here. - (alpha_links_base): Remove. - (alpha_links): New. - (mark_alpha_links_node, mark_alpha_links): New. - (alpha_write_one_linkage): New. - (alpha_need_linkage): Use a splay tree. Build the linkage symbol. - (alpha_write_linkage): Use splay_tree_foreach. - * config/alpha/alpha.md (call_vms): Use alpha_need_linkage - to get the linkage symbol. - (call_value_vms): Likewise. - * config/alpha/elf.h (output_file_directive): Remove decl. - (ctors_section, dtors_section): Prototype. - (sbss_section, sdata_section): Prototype. - * config/alpha/vms.h (FUNCTION_ARG): Remove. - (readonly_section, link_section, literals_section): Prototype. - (ctors_section, dtors_section): Prototype. - (vms_valid_decl_attribute_p): Remove decl. - (alpha_arg_type, alpha_arg_info_reg_val): Likewise. - -2000-05-27 Geoff Keating - - * reload.c (get_secondary_mem): Don't widen floating-point modes. - - * combine.c (subst): Honor CLASS_CANNOT_CHANGE_SIZE when - substituting the REG in a (subreg:X (reg:Y ...)). - -2000-05-28 Neil Booth - - * cpplex.c (_cpp_lex_line): Merge vertical space. Flag - first token of a line BOL. Update EOF code for this. - Remove illegal directive check - it appears in the (not - yet committed) caller. - * cpplib.h (BOL): New flag. - -2000-05-28 Neil Booth - - * cpplex.c (_cpp_init_toklist): No comment space to initialize. - (_cpp_free_toklist): No comment space to free. - (expand_comment_space): Remove. - (save_comment_space): Place the comment in the current token and - not in a separate comment space. - (_cpp_lex_line): Save comments during plain code and #define - directives only. - * cpplib.h (struct _cpp_toklist): Remove comment space. - -2000-05-28 Neil Booth - - * cppexp.c (parse_assertion): Supply extra argument to - _cpp_init_toklist. - * cpplib.c (do_assert, do_unassert): Similarly. - * cpphash.h (_cpp_init_toklist) Update. - (_cpp_expand_token_space): New. - (DUMMY_TOKEN, NO_DUMMY_TOKEN): New. - * cpplex.c (_cpp_init_toklist): New argument. - (parse_string2): New argument multiline_ok. - (spell_token): Take a const cpp_token *. - (INIT_NAME): Replace with INIT_TOKEN_NAME. Update tokens_used. - (SPELL_ macros): Replace with enum. - (expand_token_space): Replace with _cpp_expand_token_space. - Take COUNT argument. - (IS_DIRECTIVE): Update. - (_cpp_lex_line): Update token structure before parsing number. - Don't assume start at beginning of token list. - (save_comment): Use INIT_TOKEN_NAME. - -2000-05-27 Zack Weinberg - - * configure.in (stage1_warn_cflags): Add -Wstrict-prototypes - -Wmissing-prototypes. - * configure: Regenerate. - * gcc.texi: Remove explanation of MD_CALL_PROTOTYPES. - - * builtins.c, calls.c: Change all instances of gen_call_* or - gen_sibcall_* to GEN_CALL_* and GEN_SIBCALL_*. - * calls.c (struct_value_size_rtx): Separate definition from - initialization to avoid unused variable warning. - - * genflags.c (gen_macro): New function. - (gen_proto): Call it for gen_call_* and gen_sibcall_*. - (gen_nonproto): Delete. - (gen_insn): Put all insns on the same obstack. - (main): Generate prototypes for everything unconditionally. - - * configure.in: Add AC_CHECK_TYPE(ssize_t). Remove commented - out check for wchar_t. - * acconfig.h: Add template for ssize_t. Remove @TOP@. - * system.h: Add infrastructure for defining missing - TYPE_MAX/TYPE_MIN macros. Use it to provide fallback - definitions of UCHAR_MAX and SSIZE_MAX. - * configure: Regenerate. - * config.in: Regenerate. - - * Makefile.in (libgcc2.ready): Rename to libgcc.ready. - Depend on $(LANGUAGES) as well as $(GCC_PATCHES) and fixed - headers. - (clean): No need to delete libgcc1.a, libgcc1-asm.a, - libgcc2.a, or libgcc1.null. - -2000-05-27 Richard Henderson - - * Makefile.in (recog.o): Don't depend on resource.h. - * recog.c: Don't include resource.h. - (recog_last_allowed_insn): Remove. - (recog_next_insn): Remove. - (struct peep2_insn_data): New. - (peep2_insn_data, peep2_current): New. - (peep2_next_insn): New. - (peep2_regno_dead_p, peep2_reg_dead_p): New. - (peep2_find_free_register): New. - (peephole2_optimize): Track life information by insn as we go. - * recog.h: Update declarations. - * resource.c (find_free_register, reg_dead_p): Remove. - * resource.h: Remove their declarations. - * toplev.c: Include hard-reg-set.h before recog.h. - - * genconfig.c (max_insns_per_peep2): New. - (gen_peephole2): New. - (main): Call it. - * genemit.c (output_peephole2_scratches): Generate calls to - peep2_find_free_register; adjust surrounding code. - (main): Have insn-emit.c include hard-reg-set.h before recog.h. - * genrecog.c (change_state): Don't track last_insn. - (write_action): Write into *_pmatch_len before accepting. - (write_tree): Adjust peephole2_insns and subroutines to match. - - * config/i386/i386.md (all peepholes): Use peep2_regno_dead_p. - - * config/alpha/alpha.c (hard_fp_register_operand): Mind the mode. - (hard_int_register_operand): New. - * config/alpha/alpha-protos.h: Declare it. - * config/alpha/alpha.h (PREDICATE_CODES): Update. - * config/alpha/alpha.md (peep2 patterns): Use hard_int_register_operand - as needed; use peep2_reg_dead_p instead of dead_or_set_p. - -2000-05-27 Richard Henderson - - * function.c (thread_prologue_epilogue_insns): Don't move the - line note at the head of the chain. Only force a lineno note - before the end of block 0. - -2000-05-27 Richard Henderson - - * gensupport.c (collect_insn_data): Record the maximum number - of alternatives, not the last seen. - - * genoutput.c: Don't include errors.h. - (struct data): Add lineno member. - (have_error): New. - (scan_operands): Use message_with_line instead of error. - (validate_insn_alternatives): Likewise. - (gen_insn): Accept and store the pattern's line number. - (gen_peephole, gen_expand, gen_split): Likewise. - (main): Don't set progname. Pass line_no to gen_foo. - -2000-05-27 Richard Henderson - - * config/d30v/d30v.c (d30v_print_operand): Handle ':'. - * config/d30v/d30v.h (PRINT_OPERAND_PUNCT_VALID_P): Accept ':'. - * config/d30v/d30v.md (attr predicable): New. - (all insn patterns): Mark non-predicable patterns; use %: on the rest. - (andsi3*): Unify into one pattern. - (iorsi3*, xorsi3*): Likewise. - (peephole2 patterns): Use peep2_reg_dead_p; verify not a - conditional return. - (old cond_exec patterns): Remove. - (define_cond_exec): New. - -Sat May 27 11:01:27 2000 Richard Kenner - - * tree.h (TREE_CODE_LENGTH): New macro. - * c-common.c (c_find_base_decl): Use it. - * expr.c (safe_from_p): Likewise. - * print-tree.c (print_node): Likewise. - * tree.c (make_node, copy_node, get_identifier): Likewie. - (first_rtl_op, contains_placeholder_p, substitute_in_expr): Likewise. - (build, build_nt, build_parse_node, simple_cst_equal): Likewise. - * fold-const.c (make_range): Likewise. - (fold): Likewise; also use first_rtl_op. - * c-iterate.c (collect_iterators): Use first_rtl_op. - * calls.c (calls_function_1): Likewise; also rename TYPE to CLASS. - Use IS_EXPR_CODE_CLASS. - (preexpand_calls): Likewise. - * ggc-common.c (ggc_mark_trees): Rework to use first_rtl_op - and TREE_CODE_LENGTH. - * stmt.c (warn_if_unused_value): If no operands, no unused value. - -2000-05-26 Geoffrey Keating - - * config/rs6000/rs6000.md (movsi_internal1): Use '%a1' rather - than '%1(%*)'. - (movdi_internal64): Likewise. - - * config/rs6000/rs6000.md: Correct order of operands for DImode - boolean patterns. - - * config/rs6000/rs6000.c (boolean_or_operator): New function. - * config/rs6000/rs6000-protos.h (boolean_or_operator): Prototype it. - * config/rs6000/rs6000.h (PREDICATE_CODES): Add boolean_or_operator. - * config/rs6000/rs6000.md: Use boolean_or_operator instead of - boolean_operator for the boolean patterns without NOTs. - - * config/rs6000/rs6000.c (reg_or_logical_cint_operand): Rename - from reg_or_u_cint_operand. Change comment and behavior. - (logical_operand): Clean up, add assertion. - (non_logical_cint_operand): Also check for - reg_or_logical_cint_operand. - * config/rs6000/rs6000.h (PREDICATE_CODES): Update. - * config/rs6000/rs6000.md (iorsi3): Use reg_or_logical_cint_operand - in the expander. - (xorsi3): Likewise. - (iordi3): Likewise. - (xordi3): Likewise. - -2000-05-26 Mark Mitchell - - * tree.h (struct record_layout_info): Rename to (struct - record_layout_info_s). - * stor-layout.c (start_record_layout): Replace - `record_layout_info' with `record_layout_info_s'. - -2000-05-26 Richard Earnshaw - - * flow.c (find_label_refs): New function. - (find_basic_blocks_1): Call it for each alternative of a call - placeholder. - -2000-05-26 Richard Earnshaw - - * ifcvt.c (cond_exec_get_condition): Set test_if to the SET_SRC - of get_pc. - -2000-05-25 Richard Henderson - - * config/alpha/alpha.c (alpha_comparison_operator): Don't be - so strict about DImode. - (alpha_swapped_comparison_operator): Likewise. - * config/alpha/alpha.md (*setne_internal): Name it. Allow - any integer output mode. - (*setcc_internal): Likewise. - (*setcc_swapped_internal): Likewise. - (*movdicc_internal, *movdicc_lbc, *movdicc_lbs): Name them. - (*mov[qhs]icc_internal): New. - (*mov[qhs]icc_lbc, *mov[qhs]icc_lbs): New. - -2000-05-25 J. David Anglin - - * vax.h (CPP_SPEC): Define __GFLOAT and GFLOAT when -mg is specified. - -2000-05-25 Richard Henderson - - * bb-reorder.c (reorder_block_def): Reorder elements for size. - Remove add_jump; add next; replace flags with visited. - (rbd_init): Remove. - (REORDER_BLOCK_HEAD, REORDER_BLOCK_VISITED): Remove. - (REORDER_BLOCK_FLAGS, REORDER_BLOCK_INDEX): Remove. - (REORDER_BLOCK_ADD_JUMP, REORDER_BLOCK_EFF_HEAD): Remove. - (REORDER_BLOCK_EFF_END, REORDER_BLOCK_SCOPE): Remove. - (RBI): New. - (reorder_index, reorder_last_visited): Remove. - (skip_insns_after_block): Rewrite to use a switch. - (get_common_dest): Remove. - (chain_reorder_blocks): Remove. - (record_effective_endpoints): Split out from reorder_basic_blocks. - (make_reorder_chain): Likewise. Loop until all blocks are placed. - (make_reorder_chain_1): Renamed from old make_reorder_chain. - Only construct the reorder chain, do not move insns. Try harder - to tail recurse. - (label_for_bb, emit_jump_to_block_after): New. - (fixup_reorder_chain): Use them. Do bulk block movement. Examine - and adjust the jump insns appropriately. Fixup basic_block_info. - (verify_insn_chain): Always define. - (relate_bbs_with_scopes): Call xmalloc, not xcalloc. Fix thinko - in allocation size. - (make_new_scope): Don't write zeros to calloc'd space. - (build_scope_forest): Rely on xrealloc to DTRT. - (reorder_basic_blocks): Don't build loop nest. Don't fail if - profile_arc_flag. Streamline EH test. - - * flow.c (redirect_edge_succ, redirect_edge_pred): New. - * basic-block.h: Declare them. - -2000-05-25 Alexandre Oliva - - * emit-rtl.c (reset_used_decls): New function. - (unshare_all_rtl_again): Call it. - -2000-05-25 Zack Weinberg - - * cpplex.c (maybe_macroexpand): Warn about function-like - macros used in non-function context, if -Wtraditional. - -2000-05-25 Mark Mitchell - - * recog.c (peephole2_optimize): Use INSN_P. - -2000-05-25 Richard Henderson - - * ifcvt.c (seq_contains_jump): New. - (noce_try_store_flag_constants): Use it to fail conversion. - (noce_try_store_flag_inc, noce_try_store_flag_mask): Likewise. - -2000-05-25 Mark Mitchell - - * except.h (can_throw): Declare it. - * except.c (can_throw): Give it external linkage. - * resource.c (find_dead_or_set_registers): Use can_throw. - -2000-05-25 Richard Henderson - - * flow.c (mark_set_1): Don't record conditionally dead memory. - -2000-05-25 Jan Hubicka - - * combine.c (try_combine): Use any_condjump_p, any_uncondjump_p - and pc_set at the place of simplejump_p and condjump_p. - * cse.c (record_jump_equiv): Likewise. - * emit-rtl.c (emit): Likewise. - * explow.c (find_next_ref): Likewise. - * flow.c (tidy_fallthru_edge): Likewise. - (init_propagate_block_info): Likewise. - * gcse.c (delete_null_pointer_checks): Likewise. - * ifcvt.c (cond_exec_get_condition, noce_get_condition, - dead_or_predicable): Likewise. - * integrate.c (copy_insn_list): Likewise. - * loop.c (scan_loop, verify_dominator, find_and_verify_loops, - for_each_insn_in_loop, check_dbra_loop, get_condition, - insert_bct, load_mems): Likewise. - * resource.c (find_dead_or_set_registers): Likewise. - * sibcalls.c (simplejump_p): Likewise. - * unroll.c (copy_loop_body, reg_dead_after_loop): Likewise. - -2000-05-25 David Edelsohn - - * rs6000.c (expand_block_move): Add 64-bit PowerPC doubleword move - to STRING case. Use doubleword STRING move for TARGET_POWERPC64 - when unaligned. - * rs6000.h (CONST_OK_FOR_LETTER_P, 'J'): unsigned HOST_WIDE_INT. - (RETURN_ADDR_RTX): Use COUNT and FRAME, not count and frame. - (LEGITIMIZE_RELOAD_ADDRESS): unsigned HOST_WIDE_INT high. - * rs6000.md: Name various internal patterns. - -2000-05-25 Jan Hubicka - - * jump.c (invert_exp_1): Remove first argument, use pc_set - to get the expression. - (redirect_exp): Make static; redirect only the pc_set expression, - remove first argument. - (invert_exp): Remove first argument, make static. - (jump_optimize): Use any_condjump_p, any_uncondjump_p and - any_onlyjump at most places where we originaly did condjump_p - and simplejump_p. - (jump_back_p, follow_jumps, thread_jumps): Likewise. - (delete_barrier_succesors): Use pc_set. - (invert_jump_1, invert_jump, redirect_jump_1, redirect_jump): Update - calls of invert_exp and redirect_exp. - * rtl.h (redirect_exp, invert_exp): Remove. - * unroll.c (copy_loop_body): Use invert_jump and redirect_jump. - -2000-05-25 Richard Henderson - - * stmt.c (expand_end_bindings): Fix thinko last change. - -2000-05-25 Andrew MacLeod - Andrew Haley - - * except.c (func_eh_entry): Add emitted field. - (new_eh_region_entry): Set emitted field to 0; - (output_exception_table_entry): Only emit previously un-emitted data, - and send it to the eh_data section. - (output_exception_table): Break out common parts. Output - exception table for entire compilation unit to eh_data section. - (output_exception_table_data): Common parts of output_exception_table. - Send output to eh_data section. - (output_function_exception_table): Output exception table data for - a single function to eh_data section. - (free_exception_table): New external to free the table. - * except.h (free_exception_table): Add prototype. - (output_function_exception_table): Add prototype. - * final.c (final_end_function): Output function exception table - for IA64_UNWIND_INFO. - (final_scan_insn): Emit any unwind directives for an insn. - - * frame-dwarf2.c: New file containing all DWARF 2 specific code - from frame.c. - * frame.c: Remove all DWARF 2 specific code. - * config/ia64/frame-ia64.c: New file. - (gthread_stuff): Make all gthread available with - IA64_UNWIND_INFO. - (dwarf_fde): Define an IA64 struct for dwarf_fde. - (__register_frame_info, __register_frame): Move to common area of file. - (__register_frame_info_table, __register_frame_table): Move to common i - area. - (__deregister_frame_info, __deregister_frame): Move to common area. - (__frame_init, find_fde): New versions for IA64_UNWIND_INFO. - (read_uleb128): New version for ia64. - (get_unwind_record): Read the next IA-64 unwind record. - (read_R_record): Read a region header record. - (process_a_b_reg_code): X record helper. - (read_X_record): Read an X format record. - (read_B_record): Read a B format record. - (P3_record_types): List of record types matching the P3 format. - (P7_record_types): List of record types matching the P7 format. - (P8_record_types): List of record types matching the P8 format. - (read_P_record): Read a P format record. - (init_ia64_reg_loc): Set default fields for a register. - (init_ia64_unwind_frame): Set defaults for all register records. - (execute_one_ia64_descriptor): Execute one descriptor record. - (rse_address_add): Calculate the position of a local reg in memory. - (normalize_reg_loc): Turn a location descriptor into a memory address. - (maybe_normalize_reg_loc): Only normalize a descriptor if it falls - within a specified PC offset range. - (get_real_reg_value): Given a register location, retrieve its value. - (set_real_reg_value): Change the value of a register location. - (copy_reg_value): Copy reg values, if needed. - (copy_saved_reg_state): Copy all registers that need to be copied. - (process_state_between): Normalize all frame register records that - fall within the specified PC range. - (frame_translate): Take a processed frame description, and turn - everything into addresses. - (build_ia64_frame_state ): Find and create frame state record for a PC. - (get_personality): Get the personality routine for a given frame. - (get_except_table): Get the exception table for a given frame. - (record_name): Unwind record names for debugging. - (print_record): Print and unwind record. - (print_all_records): Print an entire unwind image. - (__ia64_backtrace): Print a backtrace. - (ia64_backtrace_helper): New function. - (__register_frame_info_aux): New function. - * config/ia64/crtend.asm (__do_frame_setup_aux): New function. - - * frame.h (enum unw_record_type): New unwind record types. - (struct unw_p_record, unw_b_record, unw_x_record) : New unwind records. - (struct unw_r_record, unwind_record): New unwind record structs. - (struct unwind_info_ptr): Unwind information layout. - (IA64_UNW_LOC_TYPE_*): Macros for different types for location - descriptors. - (struct ia64_reg_loc): Register location description. - (struct ia64_frame_state): Location of all registers in a frame. - (struct object): Add pc_base and fde_end for IA64_UNWIND_INFO. - * libgcc2.c (__ia64_personality_v1): Personality routine. - (__calc_caller_bsp): Calculate the bsp register for the caller's - frame. - (ia64_throw_helper): Figure out who to return to and set up the - registers. - (__throw): Throw routine. - - * output.h (assemble_eh_align, assemble_eh_label): New functions - to generate EH info where we want it. - (assemble_eh_integer): New function. - * toplev.c (compile_file): Output module level exception table for - non-ia64 targets. - (main): Set exceptions_via_longjump and flag_new_exceptions based - on IA64_UNWIND_INFO too. - - * varasm.c (assemble_eh_label): Generate a label via - ASM_OUTPUT_EH_LABEL if it has been specified. - (assemble_eh_align): Generate an alignment directive via - ASM_OUTPUT_EH_ALIGN if it has been specified. - (assemble_eh_label): Generate an integer value via - ASM_OUTPUT_EH_type if they have been specified. - * config/ia64/ia64.c (rtx_needs_barrier): Add flushrs. - (ia64_init_builtins): Add __builtin_ia64_bsp - and __builtin_ia64_flushrs. - (ia64_expand_builtin): Add IA64_BUILTIN_BSP and - IA64_BUILTIN_FLUSHRS. - * config/ia64/ia64.h (ia64_builtins): Add IA64_BUILTIN_BSP and - IA64_BUILTIN_FLUSHRS. - - * config/ia64/ia64.md (flushrs): New insn to flush the register - stack. Add to unspec list. - - * config/ia64/crtbegin.asm (frame_object): Change size. - (__do_frame_setup_aux): New function. - * config/ia64/crtend.asm: call __do_frame_setup_aux. - * config/ia64/t-ia64 (LIB2ADDEH): Add. - * Makefile.in (LIB2ADDEH): Add. - (LIB2ADD): Use LIB2ADDEH. - -2000-05-24 Richard Henderson - - * recog.c (offsettable_address_p): If mode size is zero, assume - BIGGEST_ALIGNMENT. - -2000-05-24 J. David Anglin - - * configure.in: Check for -Wno-long-long option support and improve - handling of warning CFLAGS for stages 1 and 2. - * Makefile.in (WARN_CFLAGS): Move definition to configure.in. - * configure: Regenerate. - -Wed May 24 19:37:53 2000 Jeffrey A Law (law@cygnus.com) - - * gcc.texi: Remove contributor list. Instead include contrib.texi. - * contrib.texi: New file. - -Thu May 25 02:27:22 2000 J"orn Rennecke - - * loop.c (basic_induction_var): Avoid double recording of an increment. - -Thu May 25 02:19:27 2000 J"orn Rennecke - - * Back out this patch: - Tue Dec 7 19:22:06 1999 Richard Henderson - * loop.h (struct induction): Add multi_insn_incr. - * loop.c (basic_induction_var): New multi_insn_incr argument. - Set it if we search back through previous insns for the biv. - (record_biv): New multi_insn_incr argument; fill in struct induction. - (strength_reduce): Discard an iv with multiple bivs, any of - which require multiple insns to increment. - - * loop.c (check_insn_for_bivs): Remove bits copied from above patch. - -Thu May 25 02:09:10 2000 J"orn Rennecke - - * rtl.h (loc_mentioned_in_p): Declare. - * reload.c (loc_mentioned_in_p): Moved from here... - * rtlanal.c (loc_mentioned_in_p): to here. No longer static. - Fix loop increment for 'E' handling. - * loop.c (strength_reduce): When doing biv->giv conversion, - take multi-insn biv increments into account. - -2000-05-24 Jason Merrill - - * stmt.c (expand_end_bindings): Look through NOTEs to find a - BARRIER. - -2000-05-24 Mark Mitchell - - * calls.c (expand_call): Handle cleanups in tail-recursion - arguments analogously to cleanups in sibling calls. - -2000-05-24 Kaveh R. Ghazi - - * simplify-rtx.c: Rename macro SIGN_EXTEND to HWI_SIGN_EXTEND. - All callers changed. - -2000-05-24 Alexandre Oliva - - * expr.c (expand_assignment, store_expr, expand_expr, - expand_expr_unaligned): Set in_check_memory_usage while emitting - chkr_check_addr libcall. - -2000-05-24 Nick Clifton - - * fold-const.c (extract_muldiv): When constructing a - multiplier/divisor, do not expect const_binop to correctly - determine if overflow has occurred, so check explicitly. - -2000-05-24 Alexandre Oliva - - * c-decl.c (build_enumerator): Don't modify the value's type, - convert it. - -2000-05-24 Andreas Jaeger - - * mips.h (LINKER_ENDIAN_SPEC): Pass -EL to linker by default. - -2000-05-24 Eric Christopher - - * configure.in: Redefine inhibit_libc conditions. - * libgcc2.c: Remove inhibit_libc conditional define. - * configure: Regenerate. - -2000-05-24 Phil Edwards - - * configure.in: For --enable-languages=LIST, check for empty LIST. - * configure: Regenerate. - -2000-05-24 Lars Brinkhoff - - * pdp11.h (STACK_BOUNDARY): Define. - -2000-05-24 Jakub Jelinek - - * ifcvt.c (if_convert): Update life info globally. - -2000-05-24 Alexandre Oliva - - * emit-rtl.c (unshare_all_decls): New function. - (unshare_all_rtl): Call it. - -2000-05-23 Nick Clifton - - * configure.in: Treat 'strongarm' as if it were 'arm' when - determining cpu type. - - * configure: Regenerate. - - * config/arm/arm.c: Change 'char *' to 'const char *' for cases - where constant strings are involved. - - * config/arm/arm.h (arm_condition_codes): Change type to 'const - char *'. - - * config/arm/arm-protos.h: Change 'char *' to 'const char *' for - cases where constant strings are involved. - -Tue May 23 15:08:31 2000 Clinton Popetz - - * config/sh/sh.c (gen_far_branch, split_branches): Update - to reflect new prototypes for redirect_jump and invert_jump. - (sh_insn_length_adjustment): Get rid of const warnings. - -2000-05-23 Kazu Hirata - - * invoke.texi (Options for Debugging Your Program or GCC): Update - the names of dump files. - -Tue May 23 13:58:52 2000 Philippe De Muyter - - * configure.in (NO_MINUS_C_MINUS_O): Fix thinko in previous fix. - * configure: Regenerated. - -2000-05-23 Zack Weinberg - - * simplify-rtx.c (SIGN_EXTEND): New macro. - (simplify_unary_operation, simplify_binary_operation, - simplify_relational_operation): Use SIGN_EXTEND. Make low - halves of (low, high) pairs unsigned if they weren't already. - (simplify_ternary_operation): Cast INTVAL to unsigned before - comparing to a MODE_BITSIZE. - -2000-05-23 Kaveh R. Ghazi - - * aclocal.m4 (gcc_AC_CHECK_DECL, gcc_AC_CHECK_DECLS): New macros - rewritten from the internals of gcc_AC_NEED_DECLARATION{S}. - - * configure.in (gcc_AC_CHECK_DECLS): Call this instead of - gcc_AC_NEED_DECLARATIONS. - - * dwarfout.c: Don't prototype time(). - - * gcc.c: Check HAVE_DECL_* instead of NEED_DECLARATION_*. - - * system.h: Likewise. - - * toplev.c: Likewise. - -2000-05-23 Zack Weinberg - - * c-decl.c (pushdecl): Invert sense of test for non-global types. - -Tue May 23 18:11:42 2000 J"orn Rennecke - - * reload1.c (reload_cse_move2add): Honor TRULY_NOOP_TRUNCATION. - -2000-05-23 Jonathan Larmour - - * config/mips/elf64.h (CTOR_LISTS_DEFINED_EXTERNALLY): Define - -Tue May 23 06:50:29 2000 Richard Kenner - - * config/alpha/alpha.c: Remove #ifdef HAIFA since now only scheduler. - (alpha_start_function): Never write ..ng label if VMS or NT. - (alpha_align_insns): Remove GP_IN_USE arg. - Alignment now unsigned. - (alpha_reorg): Don't pass GP_IN_USE arg to alpha_align_insns. - * config/alpha/alpha.md (prologue_ldgp): Split into one define_expand - and two define_insn's. - -2000-05-22 Richard Henderson - - * combine.c (simplify_comparison): Use trunc_int_for_mode. - -2000-05-22 Richard Henderson - - * stor-layout.c (place_field): Change rli->size to rli->offset. - -2000-05-22 Richard Henderson - - * function.c (thread_prologue_and_epilogue_insns): Make sure - existing line number notes appear after the prologue. - -Mon May 22 21:49:00 2000 Richard Kenner - - * config/alpha/alpha.c (alpha_fnname): New static variable. - (print_operand, case '~'): New case. - (alpha_expand_prologue): Emit prologue_ldgp insn if needed. - (alpha_start_function): Set alpha_fnname. - Write "ng" label if no ldgp; don't write ldgp insn. - * config/alpha/alpha.h (PRINT_OPERAND_PUNCT_VALID_P): New case '~'. - * config/alpha/alpha.md (prologue_ldgp): New define_insn. - -Mon May 22 11:30:48 2000 Clinton Popetz - - * jump.c (jump_optimize_1): Don't increment LABEL_NUSES - on deleted labels. - -2000-05-22 Zack Weinberg - - * varasm.c (eh_frame_section): Revert change to argument list. - -Mon May 22 13:14:03 2000 Richard Kenner - - * optabs.c (can_extend_p): Allow unsignedp to have any nonzero value. - (gen_extend_insn, can_fix_p, can_float_p): Likewise. - - * final.c (final_scan_insn, case NOTE_INSN_FUNCTION_BEG): Remove - dangling "else" that causes "break" to be conditional. - Also remove unneeded code at start. - -Mon May 22 17:31:35 2000 Philippe De Muyter - - * m68k/m68k.h (STORE_FLAG_VALUE): Macro set to (-1), not -1. - * fx80/fx80.h, i370/i370.h, m88k/m88k.h (STORE_FLAG_VALUE): Ditto. - * gmicro/gmicro.h, we32k/we32k.h (STORE_FLAG_VALUE): Ditto. - -2000-05-22 Jakub Jelinek - - * config/sparc/sparc.md (movdf_insn_v9only_vis): fzero has - just one argument. - -Mon May 22 06:57:49 2000 Richard Kenner - - * alias.c (record_component_aliases): New function. - * tree.h: Clean up some declarations and comments. - (record_component_aliases): New declaration. - * tree.c (get_alias_set): If type and has alias set, use it. - -2000-05-22 Richard Henderson - - * simplify-rtx.c (simplify_ternary_operation): Try to simplify - IF_THEN_ELSE to a setcc form. - * jump.c (can_reverse_comparison_p): Be prepared for insn null. - -2000-05-21 Kaveh R. Ghazi - - * fixinc/inclhack.def (sun_malloc): Handle `calloc'. - (sun_malloc, sysz_stdtypes_for_sun): Add test_text. - -Sun May 21 16:42:31 2000 Richard Kenner - - * combine.c (try_combine): Handle i3_subst_into_i2 case when I2 is - not a PARALLEL. - -2000-05-20 Alexandre Oliva - - * config/mn10300/mn10300.md (movdi, movdf): 64-bit clean-up. - * config/mn10300/mn10300.c (print_operand): Likewise. - - * final.c (split_double): Right shift of negative values is not - portable. - - * ifcvt.c (if_convert): Scan and kill dead code. - - * emit-rtl.c (unshare_all_rtl): Store the copied rtx. - -2000-05-20 Zack Weinberg - - * diagnostic.c: Eliminate implicit int. - * except.c, gcc.c: Add static prototypes. - * final.c (final_end_function): Mark file arg ATTRIBUTE_UNUSED. - * gensupport.c (process_rtx): Use XVEC to initialize vector - slot of 'split'. - - * print-rtl.c: If DEBUG_REGISTER_NAMES, define static - debug_reg_names instead of static reg_names. If not, define - global reg_names. - * regclass.c: Don't define global reg_names unless - DEBUG_REGISTER_NAMES is defined. - - * reload1.c (order_regs_for_reload): Remove unused variable. - * varasm.c: Include output.h after defaults.h. Define - eh_frame_section as function of no args, not of unspecified args. - - * gcc.c: Constify argbuf; arguments to store_arg, - process_command, main; elements of struct command and struct - switchstr; local variables in execute, process_command, main. - -2000-05-20 Bruce Korb - - * fixinc/inclhack.def: many applications of c_fix=format + tests - * fixinc/check.diff: regenerated - * fixinc/fixincl.x: regenerated - -Sat May 20 09:30:55 2000 Richard Kenner - - * alias.c: Clarify some comments. - (record_base_value): REGNO is unsigned. - * rtl.h (record_base_value): Likewise. - - * alias.c (aliases_everything_p): Don't special-case QImode here. - * c-common.c (c_get_alias_set): Do it here. - Handle BIT_FIELD_REF by getting alias info for arg. - Use POINTER_TYPE_P. - -2000-05-20 Alexandre Oliva - - * mklibgcc.in: Restore rule to create ${dir}. - -Sat May 20 08:45:41 2000 H.J. Lu - - * Makefile.in (libgcc.mk): Depend on xgcc$(exeext) for - GCC_FOR_TARGET used by MULTILIBS. - * mklibgcc.in: Make sure each .o file depends on the - directory it will be in. - Make the multilib directory depends libgcc. - -Sat May 20 08:29:28 2000 H.J. Lu - - * Makefile.in (bootstrap): Unset LANG_LIB2FUNCS for stage 1. - -Sat May 20 07:27:35 2000 Alexandre Oliva - - * fold-const.c (make_range): Handle degenerated intervals. - Fixes c-torture/execute/991221-1.c - -Fri May 19 18:16:31 2000 Richard Kenner - - * cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0. - * reload.c (find_equiv_reg): Likewise. - * alias.c (init_alias_analysis): Likewise. - Only call prologue_epilogue_contains on insns. - * basic-block.h (REG_SET_TO_HARD_REG_SET): Call new function. - * bb-reorder.c (hard-reg-set.h): Include earlier. - * haifa-sched.c (hard-reg-set.h): Likewise. - * ifcvt.c (hard-reg-set.h): Likewise. - * local-alloc.c (hard-reg-set.h): Likewise. - * loop.c (hard-reg-set.h): Likewise. - * predict.c (hard-reg-set.h): Likewise. - * regrename.c (hard-reg-set.h): Likewise. - * flow.c (hard-reg-set.h): Likewise. - (reg_set_to_hard_reg_set): New function. - * bitmap.c (regs.h, basic-block.h): No longer include. - (bitmap.h): Now include. - * conflict.c (hard-reg-set.h): Include. - * profile.c (hard-reg-set.h): Likewise. - * print-rtl.c (hard-reg-set.h): Likewise. - * sbitmap.c (hard-reg-set.h): Likewise. - * toplev.c (hard-reg-set.h): Likewise. - * unroll.c (hard-reg-set.h, basic-block.h): Likewise. - * hard-reg-set.h (reg_names): Now constant. - * regs.h (reg_names): Likewise. - * regclass.c (reg_names): Likewise. - * loop.h (basic-block.h): No longer include. - (bitmap.h): Now include. - * reload1.c (order_regs_for_reload): Avoid loop over reg sets. - * Makefile.in (LOOP_H, sbitmap.o, profile.o): Reflect above changes. - (toplev.o, print-rtl.o, conflict.o, unroll.o, bitmap.o): Likewise. - -2000-05-19 Jan Hubicka - Richard Henderson - - * basic-block.h (struct edge_def): New field "count". - (struct basic_block_def): Likewise. - * flow.c (entry_exit_blocks): Add count fileds. - (split_edge): Keep count information up-to-date. - (dump_edge_info, dump_flow_info): Dump count fields. - - * final.c (count_instrumented_edges): Rename to edge from arc. - (end_final): Update users. - * profile.c: Include expr.h, basic-block.h. - (struct adj_list, ARC_TARGET, ARC_SOURCE, ARC_COUNT): Kill. - (struct bb_info, label_to_bb, label_to_bb_size, bb_graph): Kill. - (ignore_next_note, return_label_execution_count): Kill. - (bbg_file_name, da_file_name): Kill. - (edge_info, bb_info): New structures. - (EDGE_INFO, BB_INFO, GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): New macros. - (count_instrumented_edges, total_num_edges): Rename to edge from arc. - (total_num_edges_instrumented): Likewise. - (init_arc, expand_spanning_tree): Kill. - (fill_spanning_tree, tablejump_entry_p): Kill. - (instrument_edges): Rewrite from instrument_arcs to use - commit_edge_insertions infrastructure. - (compute_branch_probabilities): Remove arguments; rewrite for - CFG infrastructure; use rtl_dump_file directly. - (branch_prob, find_spanning_tree): Likewise. - (union_groups, find_group): New. - (init_branch_prob): Make bbg_file_name and da_file_name local. - (end_branch_prob): Use rtl_dump_file directly. - (init_edge_profiler): Rename to edge from arc. - (output_arc_profiler): Kill. - (gen_edge_profiler): New. - (output_func_start_profiler): Turn off profiling. Make the - constructor static when we can. - * rtl.h (branch_prob, end_branch_prob): Update prototypes. - - * toplev.c (DFI_flow): Remove. - (DFI_cfg, DFI_life): New. - (dump_file): Update accordingly. - (compile_file): Call end_branch_prob if profile_arc_flag too. - (rest_of_compilation): Move flow1 cfg creation to DFI_cfg. Do edge - profiling after the CFG is built. Move flow1 life analysis to - DFI_life. Always estimate remaining probabilities. - -2000-05-19 Richard Henderson - - * ifcvt.c (find_if_case_2): Don't allow THEN to be EXIT. - - * flow.c (make_edges): The sibling call edge to exit is abnormal. - -2000-05-19 Richard Henderson - - * jump.c (redirect_jump): Add delete_unused argument. Don't - remove labels and code following when LABEL_NUSES goes to zero. - (invert_jump): Likewise. - (jump_optimize_1): Fix redirect/invert arguments. - (do_cross_jump, thread_jumps): Likewise. - * flow.c (split_edge): Likewise. - * reorg.c (optimize_skip): Likewise. - (reorg_redirect_jump, relax_delay_slots, dbr_schedule): Likewise. - * profile.c (instrument_arcs): Likewise. - * loop.c (find_and_verify_loops): Likewise. Fix indentation. - * rtl.h: Update prototypes. - -Fri May 19 12:05:13 2000 Clinton Popetz - - * ssa.c (convert_from_ssa): Tell life_analysis we need death - notes. - (make_regs_equivalent_over_bad_edges): Only look at abnormal - critical edges. - -2000-05-19 Zack Weinberg - - * cpphash.c (funlike_macroexpand): Make sure not to walk p1 - past l1 when deleting whitespace and markers. - - * cpplex.c (_cpp_scan_until): Clear AUX field of tokens. - * cpplib.c (do_unassert): Put the list to compare against on - the stack. - -2000-05-19 Bruce Korb - - * fixinc/README: cleaned up old documentation - * fixinc/check.diff: regenerated & verified on OSR5 on ix86 - * fixinc/check.tpl: compute the list of needed directories - emit "#if defined(name)" because of conflict - omit machine name differences from output differences - * fixinc/inclhack.def( m88k_multi_incl ): Use `wrap' function - (machine_name): change test text to use `sed' markers - * fixinc/fixincl.x: regen - -Fri May 19 06:49:35 2000 Richard Kenner - - * config/elfos.h (SELECT_SECTION): Don't access DECL_INITIAL of - a CONSTRUCTOR. - -2000-05-18 Chris Demetriou - - * gcc.texi (MULTILIB_EXCEPTIONS): Correct example and update - it to match the current practice. - -2000-05-18 Mark Mitchell - - * Makefile.in (STAGESTUFF): Fix typo in spelling of s-under. - -2000-05-18 Richard Henderson - - * rtlanal.c (insn_dependant_p, insn_dependant_p_1): New. - * rtl.h (insn_dependant_p): Declare it. - * loop.c (strength_reduce): Use it. - -2000-05-18 Alexandre Oliva - - * config/mn10300/mn10300.c (expand_prologue, expand_epilogue): - 16-bit and 64-bit clean-up. - -2000-05-18 Mark Elbrecht - - * configure.in (*-pc-msdosdjgpp): Set float_format to none. - * configure: Rebuilt. - -2000-05-18 Zack Weinberg - - * genopinit.c: Use $ for escape sequences in optab patterns. - Remove backslashes from optab patterns. Change $A, $B, $C to - expand to (int) whatever instead of just whatever; remove - explicit (int) from all optab patterns. - - * gensupport.c (xmalloc, xrealloc, xstrdup): Provide. - * genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c, - genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c, - genrecog.c: Remove private copies of xmalloc, xrealloc, and - xstrdup. - -2000-05-18 Richard Henderson - - * jump.c (jump_optimize_1): Base minimum insn count during - find_cross_jump on BRANCH_COST. - -2000-05-18 Jakub Jelinek - - * print-rtl.c (print_rtx): Only print note line number as string - if between NOTE_INSN_BIAS and NOTE_INSN_MAX. - * final.c (final_scan_insn): Do nothing for note line number 0. - -2000-05-18 Jakub Jelinek - - * gcc-common.c (ggc_mark_rtx_children): Mark NOTE_EXPECTED_VALUE - from NOTE_INSN_EXPECTED_VALUE notes and NOTE_SOURCE_FILE from - NOTE_INSN_DELETED_LABEL. - -2000-05-18 Nick Clifton - - * config/arm/unknown-elf.h (UNIQUE_SECTION): Place constant, - uninitialized data in .rodata not .bss, and do not interpret an - error in the initialisation value as meaning that the variable - should be placed in the .bss section. - -Thu May 18 12:10:18 2000 Philippe De Muyter - - * configure.in (NO_MINUS_C_MINUS_O): Test `$ac_cv_prog_cc_${ac_cc}_c_o', - not `$ac_cv_prog_cc_cc_c_o'. - * configure: Regenerated. - -2000-05-18 Chris Demetriou - Richard Henderson - - * c-common.h (enum c_tree_index): Add g77 type entries. - (g77_integer_type_node, g77_uinteger_type_node): New. - (g77_longint_type_node, g77_ulongint_type_node): New. - * c-decl.c (init_decl_processing): Initialize them. - -2000-05-18 Richard Henderson - - * config/h8300/h8300.md (subs patterns): Use %G to negate. - - * config/h8300/h8300.c (ok_for_bclr): Take a HOST_WIDE_INT. - (small_power_of_two): Likewise; use exact_log2. - (adds_subs_operand, one_insn_adds_subs_operand): Remove. - (output_adds_subs): Remove. - (two_insn_adds_subs_operand): New. - (split_adds_subs): New. - * config/h8300/h8300-protos.h: Update. - * config/h8300/h8300.h (CONST_OK_FOR_J): Cast to uns HOST_WIDE_INT. - (CONST_OK_FOR_L): Match strict adds operands. - (CONST_OK_FOR_N): Match struct subs operands. - * config/h8300/h8300.md (adds_subs insns): Remove. - (addhi patterns): Output adds/subs directly. - (addsi_h8300h): Likewise. - (addhi/addsi splitters): New. Decompose two_insn_adds_subs_operand. - -2000-05-18 Zack Weinberg - - * cppexp.c (parse_assertion): New. - (lex): Call it for CPP_HASH. Remove CPP_ASSERTION case. - (_cpp_parse_expr): Remove case '#'. Don't set - parsing_if_directive. - * cpphash.c (collect_objlike_expansion, - collect_funlike_expansion, collect_params, - _cpp_create_definition): The list no longer has a trailing - VSPACE token. - * cpphash.h (enum node_type): Add T_ASSERTION. - (struct hashnode): Remove aschain, add pred. - (struct predicate): New. - Update prototypes. - - * cpplex.c (expand_token_space): Handle both offset and - nonoffset lists. - (init_token_list, _cpp_free_token_list, _cpp_parse_assertion): Delete. - (_cpp_init_toklist, _cpp_clear_toklist, _cpp_free_toklist, - _cpp_slice_toklist, _cpp_squeeze_toklist, _cpp_equiv_tokens, - _cpp_equiv_toklists): New. - (_cpp_scan_line): Rename to _cpp_scan_until; add ability to - stop at any single-character token, not just newline. - (_cpp_lex_token): Remove special cases for #define and #if. - (cpp_get_token): Expect # as a separate token type. Remove - DIRECTIVE case. - (_cpp_get_directive_token): Remove DIRECTIVE case. - (_cpp_lex_line, _cpp_lex_file, _cpp_init_input_buffer): Update. - - * cpplib.c (_cpp_check_directive): Set dirno and - SYNTAX_INCLUDE bit of flags, not dir_handler and dir_flags. - (_cpp_handle_directive): Run # through the same logic - as normal directives. - (do_define): Don't set parsing_define_directive. Use - _cpp_scan_until. The list does not have a VSPACE at the end. - (do_if): Save, clear, and restore only_seen_white around - _cpp_parse_expr. - (skip_if_group): s/CPP_DIRECTIVE/CPP_HASH/ - (do_assert, do_unassert): Rewrite. - - * cpplib.h (TTYPE_TABLE): Remove CPP_ASSERTION. - (LIST_OFFSET): New flag. - (struct cpp_toklist): Replace dir_handler and dir_flags with - dirno and flags. - (struct cpp_reader): Remove parsing_if_directive and - parsing_define_directive. - -2000-05-18 Kaveh R. Ghazi - - * fixinc/inclhack.def (broken_cabs): Update fix to handle comments - following the cabs decl which terminate on the following line. - Add the corresponding test_text case. - -2000-05-18 Neil Booth - - * cppinit.c (cpp_reader_init): Initialize col_adjust and - default tab stop size. - (no_num, OPT_ftabstop): New. - (handle_option): Handle "ftabstop=" command-line option. - (print_help): Document it. - * cpplex.c (COLUMN): Remove. - (handle_newline): Reset col_adjust. - (skip_whitespace): Update col_adjust as tabs encountered. - (_cpp_lex_line): Update to use col_adjust. Call - skip_whitespace for all whitespace. - * cpplib.h (struct cpp_options): New member tabstop. - (struct cpp_reader): New member col_adjust. - (CPP_BUF_COL): Update. - (CPP_BUF_COLUMN): New. - * cpp.texi: Document "-ftabstop=" command line option. - -Wed May 17 18:19:41 2000 Philippe De Muyter - - * configure.in (NO_MINUS_C_MINUS_O): Macro made availabe for AC_OUTPUT - files. - * configure: Rebuilt. - -Wed May 17 18:06:12 2000 John David Anglin - - * mklibgcc.in Add missing -DL$name when compiling modules in libgcc1.c. - - * tree.c (build_common_tree_nodes): Do not build TI nodes unless - HOST_BITS_PER_WIDE_INT is >= 64. - -2000-05-17 Richard Henderson - - * jump.c (jump_optimize_1): Remove inactive but real insns - in jump-to-next-insn optimization. - -2000-05-17 Richard Henderson - - * toplev.c (rest_of_compilation): Don't call optimize_mode_switching - unless OPTIMIZE_MODE_SWITCHING. Conditionally set no_new_pseudos. - Don't call recompute_reg_usage if no_new_pseudos is true. - * lcm.c (optimize_mode_switching): Move ifdefs outside function. - Return true if we did work; update global life information. - * basic-block.h (optimize_mode_switching): Update decl. - -2000-05-17 Neil Booth - - * cpplex.c (expand_name_space): Don't use ptrdiff_t. - -2000-05-17 Zack Weinberg - - * cpplib.c: New feature, #pragma system_header. - * cpp.texi: Document special treatment of system headers, and - the various mechanisms to get a header that special treatment. - -2000-05-17 Kaveh R. Ghazi - - * system.h (offsetof): Define at the very end, to ensure we prefer - the platform's definition if available. - -2000-05-16 Bruce Korb - - * fixinc/fixincl.c: improve the debug displays, ignore SIGPIPE - * fixinc/server.c: likewise - * fixinc/fixfixes.c( char_macro_def_fix ): fix regex - + #ifdef debugging code + use #def constant for - sub-pattern count - * fixinc/inclhack.def( hpux11_fabsf ): Keep HP-UX 11 from stomping - on C++ math namespace - -2000-05-17 Kaveh R. Ghazi - - * fixinc/fixfixes.c (char_macro_use_fix, char_macro_def_fix): - Don't check the return value of sprintf. Use asprintf to avoid - buffer overflows. - -Wed May 17 17:27:44 2000 Andrew Cagney - - * flags.h (warn_unused_function, warn_unused_label, - warn_unused_parameter, warn_unused_variable, warn_unused_value): - Replace ``warn_unused''. - (set_Wunused): Add declaration. - * toplev.c (set_Wunused): New function. - (warn_unused_function, warn_unused_label, warn_unused_parameter, - warn_unused_variable, warn_unused_value): New variables. - (W_options): Add -Wunused-function, -Wunused-function, - -Wunused-label, -Wunused-parameter, -Wunused-variable and - -Wunused-value. Delete -Wunused. Handled in decode_W_option. - - * toplev.c (decode_W_option): Update -Wunused flags by calling - set_Wunused. - * c-decl.c (c_decode_option): Ditto for -Wall. - - * stmt.c (expand_expr_stmt, expand_expr_stmt, - warn_about_unused_variables): Replace warn_unused with more - explicit warn_unused_value et.al. - * function.c (expand_function_end): Ditto. - * c-typeck.c (internal_build_compound_expr, - internal_build_compound_expr): Ditto. - * c-decl.c (poplevel, pop_label_level): Ditto. - * toplev.c (check_global_declarations): Replace warn_unused with - check for either warn_unused_function or warn_unused_variable. - - * gcc.1, invoke.texi (Warning Options): Document - -Wunused-function, -Wunused-function, -Wunused-label, - -Wunused-parameter, -Wunused-variable and -Wunused-value options. - -Wed May 17 10:28:12 2000 Philippe De Muyter - - * mklibgcc.in (building libgcc1) [Xlibgcc1.a]: Find libgcc1.c in - $(srcdir), not in the current directory. - -2000-05-16 Richard Henderson - - * config/ia64/crtbegin.asm (__dso_handle): Mark hidden if the - assembler supports it. - (.fini, .init): Use a gp-relative indirect call. - (__do_global_dtors_aux): Preserve the gp; rebundle. - (__do_frame_setup): Likewise. - * config/ia64/crtend.asm (.IA_64.unwind): Don't terminate with -1. - (.init): Use a gp-relative indirect call. - (__do_global_ctors_aux): Preserve the gp. - -2000-05-16 Richard Henderson - - * flow.c (commit_one_edge_insertion): Be prepared for a return - insn to be inserted on the edge with a normal jump. - * jump.c (jump_optimize_1): Don't look to create return isns. - - * flow.c (flow_delete_insn): Don't adjust reference count of notes. - * jump.c (jump_optimize_1): Likewise. - (returnjump_p): Verify the argument is a JUMP_INSN. - * rtl.def (NOTE): Add 5th element for NOTE_INSN_DELETED_LABEL. - -2000-05-16 Nick Clifton - - * config/m32r/m32r.c (small_insn_p): Use INSN_P() to replace - GET_RTX_CLASS (GET_CODE ()) == 'i'. - (large_insn_p): Ditto. - (m32r_is_insn): New function: Return true if the insn contains - an executable instruction. - (m32r_adjust_insn): Use m32r_is_insn. - (m32r_sched_reorder): Use m32r_is_insn. - (m32r_sched_variable_issue): Use m32r_is_insn. - -2000-05-16 Franz Sirl - - * rs6000/rs6000.c (rs6000_select_section): Treat CONSTRUCTOR like - VAR_DECL. - - * rs6000/sysv4.h (ASM_OUTPUT_DWARF_ADDR): Delete unused variable. - - * rs6000/sysv4.h (CPP_OS_LINUX_SPEC): Define __unix and __linux - according to given options. - -Tue May 16 12:17:31 2000 Jeffrey A Law (law@cygnus.com) - - * mn10200.h (PREFERRED_RELOAD_CLASS): Do not prefer DATA_REGS - if X has VOIDmode either. - (LIMIT_RELOAD_CLASS): Similarly. - - * mn10200.md (indirect_jump, tablejump): Use "register_operand", - not "general_operand" to match the processor's capabilities. - -2000-05-16 Bruce Korb - - * fixinc/README: corrected return address - * fixinc/check.diff: regenerate, now that test works - * fixinc/fixfixes.c(format_fix,format_write): reformatted - (char_macro_def_fix,char_macro_use_fix): corrected and - rewrote to use regex to parse the text - * fixinc/inclhack.def: more testing - * fixinc/fixincl.x: regenerated - - * fixinc/inclhack.def: added several "test_text" attributes - changed several fixes to use `c_fix = format' - re-alphabetized the fixes - - * fixinc/check.diff: regenerate - * fixinc/fixincl.x: regenerate - * fixinc/check.tpl: added `sparc' and `netinet' to the list - of created dirs - - -2000-05-16 Alexandre Oliva - - * config/mn10300/mn10300.h (ASM_OUTPUT_DWARF2_ADDR_CONST): Remove. - -2000-05-15 Richard Henderson - - * toplev.c (rest_of_compilation): Run full jump pass before - find_basic_blocks of flow2. - -2000-05-15 Richard Henderson - - * jump.c: Fix typos and clarify commentary from last change. - (any_condjump_p): Verify SET_SRC is an IF_THEN_ELSE. - (safe_to_remove_jump_p): Remove. - (condjump_label): Use pc_set. - -2000-05-15 Richard Henderson - - * ifcvt.c (cond_exec_process_insns): Drop USE and CLOBBER insns - that get in the way after reload. - (cond_exec_process_if_block): Skip a label heading THEN block. - -2000-05-15 Richard Henderson - - * varasm.c (output_constant_pool): Abort instead of converting - (improperly) deleted labels to zero. - -2000-05-16 Neil Booth - - * cpplex.c (parse_string2): Update comment. - (cpp_lex_line): No special assertion treatment for '('. - * cpplib.c (DIRECTIVE_TABLE): Remove SYNTAX_ASSERT. - * cpplib.h (SYNTAX_ASSERT): Remove. - -Mon May 15 21:45:36 MET DST 2000 Jan Hubicka - - * jump.c (condjump_p): Mark as depreached. - (any_condump_p): New. - (any_uncondump_p): New. - (pc_set): New. - (safe_to_remove_jump_p): New. - * rtl.h (any_condump_p, any_uncondjump_p, pc_set - safe_to_remove_jump_p): Declare. - -Mon May 15 21:07:20 MET DST 2000 Jan Hubicka - - * calls.c: Re-install both patches reverted by last patch. - (struct arg_data): New field tail_call_reg. - (initialize_argument_information): Initialize tail_call_reg - (load_register_parameters): New argument flags, use - tail_call_reg when emiting tail call sequence. - (expand_call): Update call of load_register_parameters; - copy unadjusted_args_size to adjusted_args_size. - -Mon May 15 19:01:42 MET DST 2000 Jan Hubicka - - * loop.c (scan_loop, strength_reduce, loop_optimize): Change unroll_p - and bct_p parameters to flags. - * loop.h (LOOP_UNROLL, LOOP_BCT): New constants. - * rtl.h (loop_optimize): Update prototype. - * toplev.c (rest_of_compilation): Update call of loop_optimize. - -2000-05-15 Jakub Jelinek - - * calls.c (expand_call): Move expand_start_target_temps call after - start_sequence(). - -2000-05-15 Neil Booth - - * cpphash.c (trad_stringify, warn_trad_stringify, - collect_params): Make some pointers pointers to const. - * cpplex.c (auto_expand_name_space) Guaranteed to always - expand by at least one character. - (SPELL_CHAR, SPELL_NONE): Temporarily reverse order. - (struct token_spelling): Use const U_CHAR * rather than PTR. - (expand_name_space): Fix up token pointers if name space - is moved when expanding. - (INIT_NAME, cpp_scan_line, parse_name, parse_number, - parse_string2, save_comment, spell_token, cpp_output_list): - Update so the routines handle tokens with a direct pointer to - their text, rather than an offset into the token's list's namebuf. - (_cpp_lex_line): Rearrange for clarity. - - * cpplib.c (_cpp_check_directive): Similarly. - (do_define): Make SYM a pointer to const. - * cpplib.h (struct cpp_name): Replace offset with direct pointer. - (CPP_INT, CPP_FLOAT): Spelling type should be SPELL_IDENT. - (TOK_OFFSET): Delete. - (TOK_NAME): Update. - -2000-05-14 Geoffrey Keating - - * config/rs6000/rs6000.h (RETURN_ADDRESS_OFFSET): Correct for - 64-bit ABI. - - * config/rs6000/rs6000.c (logical_operand): Rewrite to take MODE - into account. - (logical_u_operand): Delete. - (non_logical_cint_operand): Rewrite to take MODE into account. - (non_logical_u_cint_operand): Delete. - (boolean_operator): New function. - (print_operand): Add new %q operand. - * config/rs6000/rs6000.h (PREDICATE_CODES): Add boolean_operator, - remove logical_u_operand and non_logical_u_cint_operand, - update logical_operand and non_logical_cint_operand. - * config/rs6000/rs6000.md: Rewrite the patterns for performing - logical operations to use %q. - - * config/rs6000/rs6000.md (movsi): Don't modify RTL in-place. - (movdi): Make similar to movsi. - * config/rs6000/rs6000.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): There - is no such thing as a DImode CONST_DOUBLE. - * config/rs6000/rs6000.c (output_toc): Likewise. - - * config/rs6000/rs6000.c (output_cbranch): Don't output prediction - codes when old mnemonics are in use. Print register names - for cc registers when requested. - - * optabs.c (expand_float): Don't allow mode widening that causes - double rounding. - - * invoke.texi (RS/6000 and PowerPC Options): Update -m64/-m32 - flags to their current names -maix64 and -maix32. - -2000-05-14 Bruce Korb - - * fixinc/fixfixes.c(wrap_fix): new fix - inserts text before - and/or after current text of file - * fixinc/fixlib.c(must_malloc): - * fixinc/fixlib.h(must_malloc): + reformatting - * fixinc/inclhack.def: replace the "1i" and "$a" sed commands - with usages of ``c_fix = wrap;'' - Add several tests and use the ``c_fix = format'' fixer more. - * fixinc/fixincl.x: regen - * fixinc/check.diff: regen - * fixinc/check.tpl: emit the associated header with the missing - test message - -Sun May 14 17:58:59 2000 Hans-Peter Nilsson - - * mklibgcc.in (building libgcc1) [Xlibgcc1.a]: Do not use unset - variables $src and $dst. - -2000-05-13 Gabriel Dos Reis - - * diagnostic.h (DIAGNOSTICS_SHOW_PREFIX_ONCE): New macro. - (DIAGNOSTICS_SHOW_PREFIX_NEVER): Likewise. - (DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE): Likewise. - (struct output_buffer: emitted_prefix_p, prefixing_rule): New - fields. - (set_message_prefixing_rule): Declare. - - * diagnostic.c: (current_prefixing_rule): New variable. - (set_message_prefixing_rule): Define. - (output_set_prefix): Adjust buffer->emitted_prefix_p. - (init_output_buffer): Adjust Initialization. - (output_emit_prefix): Rewrite. Take prefixing rules into account. - -Sat May 13 11:05:47 2000 Philippe De Muyter - - * ifcvt.c (if_convert): Do not free NULL. - -2000-05-12 H.J. Lu (hjl@gnu.org) - - * gthr-dce.h: Add support for libobjc. - * gthr-posix.h: Likewise. - * gthr-solaris.h: Likewise. - * gthr-vxworks.h: Likewise. - * gthr-single.h: Likewise. - * gthr-win32.h: Likewise. - -2000-05-12 Nick Clifton - - * config/fr30/fr30.c (fr30_move_double): New function: Emit code - to move a double word value. - (di_operand): New function: Return true if the operand is suitbale - for a double word move operation. - (nonimmediate_di_operand): New function: Return true if the - operand is a DImode register or MEM. - - * config/fr30/fr30.h (PREDICATE_CODES): Add di_operand and - nonimmediate_di_operand. - - * config/fr30/fr30-protos.h Add fr30_move_double, di_operand, and - nonimmediate_di_operand. - - * config/fr30/fr30.md (movdi): New pattern. Required because - other patterns generate DImode results. - (movdi_insn): New pattern. - -2000-05-12 Richard Henderson - - * config/alpha/alpha.c (struct shadow_summary): Define - bitfields as type unsigned int. - -Sat May 13 00:09:59 2000 Denis Chertykov - - * config/avr/t-avr: Added definition of FLOAT while generates - fp-bit.c - - * config/avr/avr.md: `NEXT_INSN (insn)' substituted to `insn' in - peepholes for tst+jump = sbrs/sbrc optimization. - -Fry May 12 20:03:00 CEST 2000 Jan Hubicka - - * expr.c (emit_push_insn): Do not adjust stack pointer when - preallocating. - -Fri May 12 19:03:58 2000 Philippe De Muyter - - * ggc-simple.c (offsetof): Macro fallback definition moved from here .. - * system.h (offsetof): ... to here. - -2000-05-12 Richard Henderson - - * Makefile.in (final.o): Depend on BASIC_BLOCK_H. - * final.c (final_end_function): Use app_disable. Rearrange note - handling into a switch. Emit deleted labels. - (output_asm_label): Generate label strings for deleted labels. - * flow.c (tail_recursion_label_list): New. - (find_basic_blocks_1): Set label_value_list directly. Collect list - of tail recursion labels from call_placeholders. Don't add deleted - labels to the label value list. - (cleanup_cfg): Use free_EXPR_LIST_list. - (flow_delete_insn_chain): Turn non-removable labels into notes. - (flow_delete_block): Don't disable deleting the block because of - a non-removable label. - (tail_recursion_label_p): New. - (merge_blocks_move_predecessor_nojumps): Don't disable the merge - because of a label. - (merge_blocks_move_successor_nojumps): Likewise. Also move a - jump table. - (merge_blocks): Disable a merge because of tail recursion labels. - * ifcvt.c (merge_if_block): Don't disable a merge because of a label. - Use a more accurate measure of not merging the join block. - (find_if_block): Don't disable conversion because of a label. - (find_if_case_1, find_if_case_2): Likewise. - * jump.c (duplicate_loop_exit_test): Preserve the kind of list - element when copying. - (squeeze_notes): Also leave EH notes. - (mark_jump_label): Ignore deleted labels. Use an INSN_LIST for - REG_LABEL notes. - (delete_insn): Preserve LABEL_NAME in NOTE_SOURCE_FILE when - deleting a label. - * print-rtl.c (print_rtx): Print NOTE_SOURCE_FILE for - NOTE_INSN_DELETED_LABEL. Print `[# deleted]' for a label_ref - referring to a deleted label. Convert tail handling to a switch. - * rtl.def (CODE_LABEL): Rearrange elements to be compatible with NOTE - for NOTE_INSN_DELETED_LABEL. - (NOTE): Fix commentary. - * rtl.h (REG_LABEL): Update commentary wrt INSN_LIST. - (REG_CC_SETTER, REG_CC_USER, REG_LIBCALL): Likewise. - (CODE_LABEL_NUMBER, LABEL_NAME): Update index. - (LABEL_NUSES, LABEL_REFS): Likewise. - * unroll.c (copy_loop_body): Don't copy NOTE_INSN_DELETED_LABEL. - -2000-05-12 Bruce Korb - - * fixinc/fixfixes.c(format_write): buglet & relaxed rules - * fixinc/check.diff: updated - * fixinc/inclhack.def: corrected & added some test_text-s - * fixinc/genfixes: removed unneeded options to autogen invocation - * fixinc/fixincl.tpl: Specified the output file - * fixinc/fixfixes.c: visual appearance - * fixinc/fixincl.x: regenerate - -2000-05-12 Zack Weinberg - - * fixinc/fixfixes.c (IO_use_fix, IO_defn_fix, CTRL_use_fix, - CTRL_defn_fix): Delete. - (fix_char_macro_defines, fix_char_macro_uses): Rename to - char_macro_def_fix and char_macro_use_fix, respectively. Put - them into the FIXUP_TABLE. Get the string to search for from - a c_fix_arg. - - (format_write): New function. - (format_fix): Use it. - - (FIX_PROC_HEAD): Constify text parameter. - (machine_name_fix): Constify all char *s. - * fixtests.c (skip_quote): Remove double static. - - * inclhack.def (io_def_quotes, io_use_quotes, ctrl_def_quotes, - ctrl_use_quotes): Update for new scheme. - * fixincl.x: Regenerate. - -2000-05-12 Alexandre Oliva - - * config/mn10300/mn10300.h (PREFERRED_DEBUGGING_TYPE): Redefine as - DWARF2_DEBUG. - (DWARF2_ASM_LINE_DEBUG_INFO): Define. - (ASM_OUTPUT_DWARF2_ADDR_CONST): Define. - -2000-05-11 Robert Lipe - - * fixinc/inclhack.def (hpux8_bogus_inlines): Delete bypass for SCO. - * fixincl.x: Regenerate. - -2000-05-11 Richard Henderson - - * calls.c: Revert both 05-09 patches. - -2000-05-11 Alexandre Oliva - - * config/mn10300/mn10300.c (print_operand): Print FP constants in - hexadecimal. - * config/mn10300/mn10300.md (movsf, movdf): Use the `F' constraint - for FP values. - - * mklibgcc.in (EQ): Define it to an equal sign in the Makefile, - and replace any occurrences of `=' in multilib dirs with `$(EQ)'. - -2000-05-11 Jason Merrill - - * fixinc/fixincl.c (run_compiles): Don't crash on null pz_machine. - -2000-05-11 Zack Weinberg - - * fixinc/fixfixes.c, fixinc/fixtests.c: Update commentary. - -Thu May 11 22:28:05 2000 Denis Chertykov - - * config/avr/avr-protos.c (jump_over_one_insn_p): New declaration. - * config/avr/avr.c (jump_over_one_insn_p): New function. - * config/avr/avr.md: New peepholes added. Output test and - conditional jump to "sbrc" or "sbrs" command. - -2000-05-11 Mark Elbrecht - - * cppmain.c (main): Use IS_DIR_SEPARATOR. - -2000-05-11 Jakub Jelinek - - * except.c (find_exception_handler_labels_1): New function. - (find_exception_handler_labels): Split into two functions, dive - into CALL_PLACEHOLDERs when looking for exception handler labels. - -2000-05-11 Stan Cox - - * regrename.c (replace_reg_in_block): Improve REG_DEAD handling. - * timevar.def (TV_RENAME_REGISTERS): Move before TV_SCHED2. - * toplev.c (rest_of_compilation): Call regrename_optimize before sched2. - -2000-05-11 Bruce Korb - - * fixinc/fixfixes.c (double_slash_fix): obsolete - (else_endif_label_fix): obsolete - (format_fix): new, unused as yet - (main): obsolete - * fixinc/fixlib.h: added fix description struct for use by format_fix - * fixinc/fixincl.c: removed the struct & test for SIGIOT befure using - * fixinc/Makefile.in: compile fixfixes.c and fixtests.c as separate - modules. Removed the vestiges of the script version. - Added support for "make check". - * fixinc/check.diff: base diff file (needs work!!) - * fixinc/check.tpl: quiet the fixup output - * fixinc/fixtests.c (main): obsolete - * fixinc/fixincl.sh: don't bother copying fixincl to .. - * fixinc/fixincl.tpl: provide for arguments to c_fix routines - -Thu May 11 11:57:02 MET DST 2000 Jan Hubicka - - * toplev.c (rest_of_compilation): Remove dead code after - combine. - -2000-05-11 Zack Weinberg - - * cpphash.c (collect_funlike_expansion): Make "# is not - followed by a macro argument name" a pedwarn, not an error. - Preserve the # in the output. Suppress the warning if lang_asm. - -Thu May 11 01:19:31 2000 Jeffrey A Law (law@cygnus.com) - - * configure.in (hppa*64*-*-hpux11*): New target for PA64 support. - * configure: Rebuilt. - -2000-05-10 Laurynas Biveinis - - * i386/xm-djgpp.h (XREF_FILE_NAME): Add mising brace. - -2000-05-10 Kazu Hirata - - * combine.c (try_combine): Fix a typo. - -Wed May 10 21:31:44 2000 Jim Wilson - - * config/ia64/ia64.md (insv): Add comment. - -2000-05-10 Richard Henderson - - * Makefile.in (libgcc.a, stmp-multilib): Depend on FPBIT and DPBIT. - * mklibgcc.in: Rewrite to not use functions. Don't shortcut - dependencies on FPBIT and DPBIT. - -2000-05-10 Nick Clifton - - * flow.c (find_auto_inc): Do not bias REG_N_REFS by loop_depth - when optimising for size. - (mark_used_regs:) Ditto. - (try_pre_increment_1): Ditto. - -2000-05-10 Zack Weinberg - - * cppexp.c (lex): Use %.*s to print non-NUL-terminated string. - Make error message friendlier. - - * cpphash.h (struct hashnode): Use struct hack for name - member. - * cpphash.c (struct hashdummy): New. - (eq_HASHNODE): Second argument is a hashdummy, not a HASHNODE. - (make_HASHNODE): No need to set ->name pointer. Correct - setting of p. - (cpp_lookup): Make 'dummy' a struct hashdummy. Tidy up a bit. - -2000-05-10 Richard Henderson - - * flow.c (find_basic_blocks_1): Remove any spare bb_note - after completion. - -2000-05-10 Bruce Korb - - * fixinc/gnu-regex.c: reg_syntax_t re_syntax_options must be static - -2000-05-10 Eric Schweitz - - * dwarfout.c (dwarfout_finish): Call retry_incomplete_types - after we enter .debug. - -2000-05-10 Jason Merrill - - * dwarf2out.c (gen_subprogram_die): Fixup die_parent for the - abstract instance of a nested inline function. - - * stor-layout.c (finish_record_layout): finalize_type_size - before laying out the pending_statics. - -Wed 10 May 09:36:47 2000 Neil Booth - - * cpplex.c (spell_token): New function. - (spell_string, spell_comment, spell_name): fold into - spell_token. - (I, S): Add macros. - (E, H): Remove macros. - (save_comment): Save comment opening characters too. - (_cpp_lex_file): Update to use spell_token. Tidy up comment - handling. - * cpplib.h (I, S): Add macros. - (E, H): Remove macros. - (TTYPE_TABLE): Update entries for new speller. - (SYNTAX_ASSERT): Remove. - -Wed 10 May 09:08:30 2000 Neil Booth - - * cpplex.c (_cpp_lex_line): Maintain PREV_WHITESPACE flag - when removing escaped newlines. Reverse sense of test for - escaped newline. - -2000-05-09 Richard Henderson - - * flow.c (find_basic_blocks_1): Do not delete the first - bb_note we run across. - (create_basic_block): Use reorder_insns to move an existing - bb_note to the correct place. - -2000-05-09 Richard Henderson - - * calls.c (expand_call): Increment currently_expanding_call - before calling optimize_tail_recursion. - -Tue May 9 18:54:16 2000 Richard Kenner - - * reload1.c (reload_combine): Fix errors in last change. - -2000-05-09 Zack Weinberg - - * gcc.c (used_arg): Skip over a semicolon at the end of the - split-up loop; don't break out of it. - - * Makefile.in (WARN_CFLAGS): Add -Wwrite-strings. - (tree.o): Depend on output.h. - - * c-decl.c (pending_invalid_xref_file, - current_function_prototype_file): Constify. - (pushdecl): Constify a local char *. - (define_label): Constify filename parameter. - * c-lex.c (init_parse): Constify parameter and return value. - * c-typeck.c (c_expand_asm_operands): Constify filename parameter. - * c-tree.h: Update prototypes. - * c-parse.in: Constify filename member of %union, and if_stmt_file. - * c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y, - objc/objc-parse.c: Regenerate. - - * dwarfout.c (dwarfout_init): Constify main_input_filename parameter. - * dwarfout.h: Update prototypes. - * expr.c (expand_expr): Constify a local char *. - * flags.h: Constify main_input_filename. - * function.c (expand_function_end): Constify filename parameter. - * genrecog.c (make_insn_sequence): Use a character array for - c_test_pos. - (main): Remove unused variables. - * input.h: Constify input_filename, main_input_filename, and - file_stack.name. Update prototypes. - * output.h: Declare first_global_object_name and - weak_global_object_name here, as const char *. - * stmt.c (expand_asm_operands): Constify filename parameter. - * toplev.c (compile_file, push_srcloc, debug_start_source_file): - Constify filename parameter. - (input_filename, main_input_filename): Constify. - * toplev.h: Update prototypes. - * tree.c: Include output.h. Don't declare - first_global_object_name or weak_global_object_name. Clean up string - bashing in get_file_function_name_long. - * tree.h (struct tree_decl): Constify filename member. - (input_filename): Constify. - Update prototypes. - * varasm.c (first_global_object_name, weak_global_object_name): - Constify. - (assemble_start_function, assemble_variable): Clean up string bashing. - - * gcc.c: Constify all spec-related strings initialized, - transitively, from string constants. Constify all strings - and string variables related to multilibs. - (set_spec, read_specs): Cast argument to free to PTR. - (used_arg): Do not modify multilib_matches. Use strncmp plus - length comparison to compare multilib switches. - * genmultilib: Constify everything declared in multilib.h. - -Tue May 9 22:28:03 2000 Denis Chertykov - - * flow.c (flow_delete_insn): Use INSN_DELETED_P for marking insn - as deleted. - -Tue May 9 20:52:43 2000 Denis Chertykov - - * config/avr/avr-protos.h (extra_constraint): change a type of - second argument from char to int to avoid warnings. - (asm_output_byte): Likewise. - - * config/avr/avr.c (MAX_LD_OFFSET) New macro. - (initial_elimination_offset): Handle elimination from - FRAME_POINTER_REGNUM to STACK_POINTER_REGNUM. - (legitimate_address_p): Use MAX_LD_OFFSET. - (legitimize_address): Likewise. - (out_movqi_r_mr): Likewise. - (out_movhi_r_mr): Likewise, use `fatal_insn' instead of `fatal'. - (out_movsi_r_mr): Use MAX_LD_OFFSET. - (out_movsi_mr_r): Likewise. - (out_movqi_mr_r): Likewise. - (out_movhi_mr_r): Likewise. - (notice_update_cc): Correct CC for the ashrqi3 with the shift - count as CONST_INT != 6. - (ashlqi3_out): Coding style modifications. Run `fatal_insn' if - shift count is a CONSTANT_P, but not a CONST_INT. - (ashlhi3_out): Coding style modifications. - (ashlsi3_out): Likewise. - (ashrhi3_out): Likewise. - (ashrsi3_out): Likewise. - (lshrhi3_out): Likewise. - (lshrsi3_out): Likewise. - (ashrqi3_out): Generate shift for any known constant count without - scratch register. Run `fatal_insn' if shift count is a CONSTANT_P, - but not a CONST_INT. - (lshrqi3_out): Coding style modifications. Run `fatal_insn' if - shift count is a CONSTANT_P, but not a CONST_INT. - (extra_constraint): change a type of - second argument from char to int to avoid warnings. - (asm_output_byte): Likewise. - (asm_file_end): Output size generated commands count as a hex - number too. - - * config/avr/avr.h (RETURN_ADDR_RTX): New macro. - - * config/avr/avr.md (addhi3): Fragment commented by &&0 is - removed. - (ashlqi3): Values of "length" attribute changed. Shift count - uses constraints 'n' instead of 'i'. - (ashrqi3): Likewise. Values of "cc" attribute changed. Generate - shifts without clobber register. - (lshrqi3): Shift count uses constraints 'n' instead of 'i'. - (call_insn): Correct test for which_alternative == 1 (was 0). - (call_value_insn): Likewise. - - * config/avr/t-avr: Remove definition of FLOAT while generates - fp-bit.c - -2000-05-09 Bruce Korb - - * fixinc/check.tpl: Template for checking fixes - * fixinc/inclhack.def: Added 'test_text' for many fixes - disable hpux8_bogus_inlines on SCO - * fixinc/fixinc.sco: Oh, yes, we don't need this any more. - -Tue May 9 16:30:27 MET DST 2000 Jan Hubicka - - * calls.c (expand_call): Reorganize somewhat in order - to avoid unnecesary recalculation inside loop and make - tail call failure code cleaner. - -Tue May 9 06:30:20 2000 Richard Kenner - - * alias.c (nonlocal_reference_p): Minor reformatting. - * reload.c (find_equiv_reg): Simplify logic for - CALL_INSN_FUNCTION_USAGE since can't have SUBREG or pseudos and - some some reformatting. - * reload1.c (reload_combine): Don't assume everything in - CALL_INSN_FUNCTION_USAGE is a REG and clean up code a bit. - -2000-05-08 Richard Henderson - - * final.c (current_insn_predicate): New. - (final_scan_insn): Set it. - * output.h (current_insn_predicate): Declare. - - * ifcvt.c (cond_exec_process_insns): New argument prob_val. - Attach it to call insns. - (cond_exec_process_if_block): Track probability for true and - false branches. - (dead_or_predicable): Likewise. - - * predict.c (PROB_NEVER, PROB_VERY_UNLIKELY): New. - (PROB_UNLIKELY, PROB_EVEN, PROB_LIKELY): New. - (PROB_VERY_LIKELY, PROB_ALWAYS): New. - (estimate_probability, expected_value_to_br_prob): Use them. - - * config/ia64/ia64-protos.h (ia64_expand_prediction): Declare. - * config/ia64/ia64.c (ia64_print_operand_address): Handle 'j'. - (ia64_expand_prediction): New. - (emit_insn_group_barriers): Don't look at notes. Emit barriers - as needed after calls. - (ia64_epilogue_uses): Mark b0 used. - * config/ia64/ia64.md (beq_true, beq_false): Remove. - (bne_true, bne_false): Remove. - (eq_return, eq_not_return, ne_return, ne_not_return): Remove. - (br_true, br_false): New. Use predicate_operator and - ia64_expand_prediction. - (return_true, return_false): Likewise. - (call_internal): Use ia64_expand_prediction. Don't emit stop bit. - (call_internal1, call_value_internal): Likewise. - (call_value_internal1, call_multiple_values_internal1): Likewise. - - * config/ia64/ia64.c (ia64_direct_return): Require frame size zero. - - * config/ia64/ia64.md (extendsfdf2): Split only after reload. - -2000-05-08 Richard Henderson - - * rtlanal.c (may_trap_p): Consider old-style and volatile - asms to trap. - -Mon May 8 17:16:48 2000 Jim Wilson - - * config/ia64/ia64.h (RETURN_ADDR_RTX): Use COUNT not count. - -2000-05-08 Richard Henderson - - * config/ia64/ia64.h (predicate_operator): Declare. - - * config/ia64/ia64.md (extendsfdf2): Split the nop case out - of existence. - - * gensupport.c (process_rtx): Copy and post-process each member - of the define_insn rtvec individually. - -Mon 8 May 22:17:35 2000 Neil Booth - - * cpplex.c (spell_token): New function. - (TOKEN_LEN): Add 1 for whitespace. - (_cpp_lex_file): Update to use spell_token. - * cpplib.h (E): Remove. - (TTYPE_TABLE): Update CPP_VSPACE entry. - -2000-05-08 Richard Henderson - - * flow.c (init_propagate_block_info): Watch out for conditional - branch to next instruction, and thus one outgoing edge. - - * config/ia64/ia64.c (ia64_encode_section_info): Exit early - for global register variables; don't special case __[CD]TOR_LIST__; - mind ggc_p for string allocation. - -2000-05-08 Nick Clifton - - * config/i386/i386.h (ELIMINABLE_REGS): Fix comment. - -2000-05-08 Bruce Korb - - * fixinc/mkfixinc.sh: fixinc.sco is no longer used - i?86-*-msdosdjgpp* no longer uses fixincludes - * fixinc/genfixes: inclhack.sh and fixincl.sh are no longer generated - * fixinc/inclhack.sh: deleted - * fixinc/hackshell.tpl: deleted - * fixinc/inclhack.tpl: deleted - * fixinc/Makefile.in: Remove dependencies on above - * fixinc/fixincl.sh: "DO NOT EDIT" text modified - -2000-05-08 Andreas Jaeger - - * config/mips/linux.h: Remove undefines which disabled .ctor/.dtor - support. - -2000-05-07 Zack Weinberg - - * Makefile.in (LOOSE_CFLAGS): Add /g modifiers to both sed - substitutions. - -Sun 7 May 08:43:53 2000 Neil Booth - - * cpplex.c: Move new lexer definitions and prototypes - to top. Conditional include these and the code if - NEW_LEXER is defined. Rename functions whose names - clash if this code included. - -Sun May 7 00:54:57 EDT 2000 John Wehle (john@feith.com) - - * rtl.def (COND_EXEC): Clarify. - - * i386.md (extendsidi2): Clobber (reg:CC 17) in the - same fashion as zero_extendsidi2. - -2000-05-06 Richard Henderson - - * config/ia64/ia64.c (predicate_operator): New. - (ia64_print_operand): Handle 'J'. - (rtx_needs_barrier): Handle COND_EXEC. - * config/ia64/ia64.h (BRANCH_COST): Define. - (PREDICATE_CODES): Update. - * config/ia64/ia64.md: Document used unspec values. - (attr predicable): New. - (movxf, movxf_internal): New. - (extendsfdf2): Don't comment out nop. - (floatdidf2): Remove. - (truncxfsf2, truncxfdf2, floatdixf2): New. - (abssi2, absdi2): Put the neg in the "true" slot. - (conditional branch instructions): Mark not predicable. - (cmov*_internal): Use predicate_operator. Split to cond_exec. - (abs*_internal): Likewise. - (alloc, set_bsp): Mark not predicable. - (barrier, insn_group_barrier, flush_cache): Likewise. - (define_cond_exec): New. - -2000-05-06 Richard Henderson - - * c-decl.c: Include "tm_p.h". - - * config/ia64/ia64-protos.h: Rearrange decls to reduce ifdef madness. - (fetchadd_operand, ia64_expand_fetch_and_op): Declare. - (ia64_expand_op_and_fetch): Declare. - * config/ia64/ia64.c: Include "toplev.h". Kill trailing whitespace. - (setjmp_operand): Constify variables for XSTR. - (ia64_encode_section_info): Likewise. - (ia64_print_operand): Use %d for exact_log2; cast 32-bit printed - values to int. - (ia64_asm_output_external): Constify name. - (process_set): Use HOST_WIDE_INT_PRINT_DEC for frame size. - (process_for_unwind_directive): Provide switch default. - (ia64_expand_compare_and_swap): Remove unused variables. - (ia64_expand_builtin): Likewise. - * config/ia64/ia64.h (ASM_OUTPUT_BYTE): Mask and cast value to int - for printing. - - * config/ia64/ia64.c (sdata_symbolic_operand): Mark unused args. - (symbolic_operand, function_operand, setjmp_operand): Likewise. - (shift_count_operand, shift_32bit_count_operand): Likewise. - (shladd_operand, fetchadd_operand, ia64_function_prologue): Likewise. - (ia64_function_epilogue, ia64_setup_incoming_varargs): Likewise. - (ia64_function_arg_partial_nregs, ia64_function_value): Likewise. - (ia64_print_operand_address, ia64_secondary_reload_class): Likewise. - (ia64_expand_builtin): Likewise. - (call_multiple_values_operation): Make dest_regno unsigned. - -2000-05-06 Richard Henderson - - * rtl.def (DEFINE_COND_EXEC): New. - * md.texi: Document it. - - * gensupport.c (input_file): Remove. - (struct queue_elem): Add lineno. - (rtx_ready_queue): Remove. - (errors): New. - (predicable_default): New. - (predicable_true, predicable_false): New. - (define_attr_queue, define_attr_tail): New. - (define_insn_queue, define_insn_tail): New. - (define_cond_exec_queue, define_cond_exec_tail): New. - (other_queue, other_tail): New. - (queue_pattern): New. - (process_rtx): Add patterns to the appropriate queues. - (is_predicable, identify_predicable_attribute): New. - (n_alternatives, collect_insn_data): New. - (alter_predicate_for_insn, alter_test_for_insn): New. - (shift_output_template, alter_output_for_insn): New. - (process_one_cond_exec, process_define_cond_exec): New. - (init_md_reader): Read the entire file. Process define_cond_exec. - (read_md_rtx): Return elements from the queues. - -2000-05-06 Richard Henderson - - * flow.c (mark_set_1): Don't update conditional life info - if the register is not_dead. - -2000-05-06 Zack Weinberg - - * Makefile.in (STAGESTUFF): Add genrtl.c and genrtl.h. - (mostlyclean): Also delete fixincl, fixinc.sh, and - specs.ready, and make clean in the fixinc subdir. - -2000-05-06 Richard Henderson - - * Makefile.in (gensupport.o): Compile for the host. - (host-prefix gensuuprt.o): Remove. - (genflags.o): Depend on gensupport.h and OBSTACK_H. - (genattrtab.o): Likewise. - (gencodes.o): Depend on gensupport.h. - (genemit.o, genopinit.o, genrecog.o, genextract.o): Likewise. - (genpeep.o, genattr.o, genoutput.o): Likewise. - - * gensupport.c (obstack, rtl_obstack): New. - (init_md_reader): Initialize rtl_obstack. - * gensupport.h (rtl_obstack): Declare. - (message_with_line): Declare. - - * genattr.c: Remove all traces of obstack manipulation. - * gencodes.c, genconfig.c, genemit.c, genextract.c: Likewise. - * genopinit.c, genoutput.c, genpeep.c, genrecog.c: Likewise. - - * genattrtab.c (obstack, rtl_obstack): Remove. - (main): Don't init rtl_obstack. - * genflags.c: Likewise. - - * genrecog.c (message_with_line): Move ... - * gensupport.c: ... here. - -2000-05-06 Richard Henderson - - * c-typeck.c (build_c_cast): Remove dead code. - -2000-05-06 Richard Henderson - - * flow.c (split_edge): Don't allocate global_live_at_start for - the new block unless the old blocks had them as well. - - * flow.c (mark_set_1): Respect not_dead when updating reg_live. - - * ifcvt.c (noce_process_if_block): Don't use an insn_b from - test_bb if a or b uses x. - -2000-05-06 Zack Weinberg - - * cpphash.h: Remove conditional #define of __extension__. - * rtl.h: Add __extension__ to RTL_CHECK1, RTL_CHECK2, - RTL_CHECKC1, RTL_CHECKC2, and RTVEC_ELT macros - (ENABLE_RTL_CHECKING only). - * tree.h: Add __extension__ to TREE_CHECK, TREE_CLASS_CHECK, - CST_OR_CONSTRUCTOR_CHECK, and EXPR_CHECK macros - (ENABLE_TREE_CHECKING only). - * varray.h: Add __extension__ to VARRAY_CHECK macro - (ENABLE_CHECKING only). - -2000-05-06 Richard Earnshaw (reanrsha@arm.com) - - Use new tail-calling mechanism on ARM. - * arm.md (sibcall, sibcall_value): New expands. - (sibcall_insn, sibcall_value_insn, sibcall_epilogue): New insns. - (tailcalling peepholes): Delete. - (push_multi): Simplify. - * arm.c (lr_save_eliminated): Delete definition. - (pattern_really_clobbers_lr, function_really_clobbers_lr): Delete. - (output_return_instruction): Remove checks on lr_save_eliminated. - (output_arm_prologue): Remove old tail-calling code. - (arm_output_epilogue): New parameter, really_return. All callers - changed. Handle tail-calling epilogues. - * arm.h (lr_save_eliminated): Delete declaration. - (frame_pointer_needed): Delete declaration. - * arm-protos.h (arm_output_epilogue): Adjust prototype. - - * arm.md (is_thumb): Examine symbol thumb_code, not expression - TARGET_ARM. - * arm.c (thumb_code): Define it. - (arm_override_options): Set it. - * arm.h (thumb_code): Declare it. - -2000-05-06 Richard Earnshaw (reanrsha@arm.com) - - * arm-protos.h (arm_dllexport_name_p, arm_dllimport_name_p): Constify. - -2000-05-06 Richard Earnshaw (reanrsha@arm.com) - - * arm.c (arm_gen_load_multiple, arm_gen_store_mulitple): Don't add - bogus clobber to insns. - (load_multiple_operation, store_mulitple_operation): Don't check - for it. - * arm.md (ldmsi_postinc, stmsi_postinc): Adjust accordingly. - - * arm.md (and_scc, ior_scc): Add missing mode. - - * arm.md (call_value_symbol): Remove predicate from op2. - - * arm.h (SPECIAL_MODE_PREDICATES): Define. - -Sat May 6 06:25:56 2000 Richard Kenner - - * expr.c (get_subtarget): New function. - (force_operand, expand_expr, do_store_flag): Use it. - - * toplev.c (compile_file): Don't take strlen of NAME if null. - -2000-05-06 David Edelsohn - - * xcoffout.c (xcoff_current_include_file, - xcoff_current_function_file, xcoff_lastfile): Constify char *. - (xcoffout_source_file, xcoffout_source_line): Make filename 'const - char *'. - (xcoffout_declare_function): Make name 'const char *'. - (xcoffout_end_epilogue): Make fname 'const char *' - * xcoffout.h (xcoff_current_include_file, xcoff_lastfile, - xcoffout_declare_function, xcoffout_source_line): Match above. - - * aix43.h (SUBTARGET_OVERRIDE_OPTIONS): -mpowerpc64 without - -maix64 is error. - * rs6000.c (print_operand): Fix lossage typo. - (output_cbranch): Remove "cr" decoration for now. - * rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Make alias 'const char *'. - -Sat May 6 06:55:32 2000 Denis Chertykov - - * config/avr/avr.c (out_shift_with_cnt): Bugfix for shift by - constant count. - -2000-05-05 Bruce Korb - - * fixinc/genfixes: Improve the matching for make target names - -2000-05-05 Catherine Moore - - * c-common.c (decl_attributes): For TYPE_DECLs attach the - attribute to the decl. - * c-decl.c (pushdecl): Propagate the USED attribute to the - type copy. - -2000-05-05 Richard Henderson - - * rtlanal.c (reg_overlap_mentioned_p): Treat parallels in the - same way emit_group_load does. - -2000-05-05 Mark Elbrecht - - * gcc.c (set_input) [HAVE_DOS_STYLE_FILE_SYSTEM]: Skip drive name. - - * toplev.c (output_file_directive): Use IS_DIR_SEPARATOR. - (main): Likewise. - -2000-05-05 Rodney Brown - - * pa.h (FUNCTION_ARG_ADVANCE): Warning removal. - -Fri May 5 10:29:21 2000 Marc Espie - - * config/openbsd.h (LINK_SPEC): pass correct flags to ld - to support -shared, on platforms with dynamic libraries. - -Fri May 5 10:27:06 2000 Philippe De Muyter - - * system.h (S_ISBLK): Provide fallback definition. - -2000-05-05 Geoff Berry - - * extend.texi (Extended Asm): Document inability to give asm - statements access to condition codes. - -2000-05-05 Marek Michalkiewicz - - * varasm.c (asm_emit_uninitialised): Use 0, not NULL - as arg 2 of UNIQUE_SECTION. - -Fri May 5 10:11:41 2000 Jeffrey A Law (law@cygnus.com) - - * predict.c: Remove May 4 change. - * bb-reorder.c (make_reorder_chain): Do not perform block movement - if we have predicted the branch at 50-50 probability. - -2000-05-05 Richard Henderson - - * flow.c (init_propagate_block_info): Fix merge error - in HAVE_conditional_execution code. - -Fri May 5 07:43:50 2000 Denis Chertykov - - * config/avr/avr.c (out_shift_with_cnt): Genetare a more optimal - shift cycle for unknown shift count. Also generates dec + brpl. - (ashlqi3_out): Don't generate dec + brpl which now generates by - `out_shift_with_cnt'. - (ashlhi3_out): Likewise. - (ashlsi3_out): Likewise. - (ashrqi3_out): Likewise. - (ashrhi3_out): Likewise. - (ashrsi3_out): Likewise. - (lshrqi3_out): Likewise. - (lshrhi3_out): Likewise. - (lshrsi3_out): Likewise. - -2000-05-04 Mark Elbrecht - - * gcc.c (free_split_directories): Correct typo in explanation - of make_relative_prefix. - -2000-05-04 Geoff Keating - - * config/rs6000/rs6000.h (PREDICATE_CODES): Add floating-point - comparison codes to branch_comparison_operator. - -2000-05-04 Richard Henderson - - * ifcvt.c (noce_process_if_block): Always reset X in the A == B case. - -2000-05-04 Richard Henderson - - * Makefile.in (FPBIT_FUNCS): Remove _df_to_usi. - (DPBIT_FUNCS): Remove _sf_to_usi. - (stmp-multilib): Pass LIB1ASMSRC to libgcc.mk. - - * ifcvt.c (noce_process_if_block): Fail if A or B modified - between condition and jump. - - * libgcc2.c (near eh_context_specific): Comment #endif string. - * longlong.h: Don't use strings with embedded newlines. - -2000-05-04 Geoff Keating - - * config/rs6000/rs6000-protos.h: Add output_cbranch. - * config/rs6000/rs6000.c (ccr_bit_negated_p): Delete. - (print_operand): Delete %t and %T codes. - (output_cbranch): New function. Support branch prediction. - * config/rs6000/rs6000.md: Use output_cbranch for - conditional branches and returns. - -2000-05-04 Jason Merrill - - * simplify-rtx.c (simplify_ternary_operation): Cast to unsigned. - * stor-layout.c (place_field): Likewise. - * integrate.h (struct inline_remap): Make regno_pointer_align unsigned. - * expr.c (store_expr): Make align unsigned. - * explow.c (plus_constant_wide): Make low words unsigned. - * expmed.c (choose_multiplier): Likewise. - * fold-const.c (fold): Likewise. - * tree.h (build_int_2): Likewise. - * tree.c (build_int_2_wide, tree_int_cst_msb): Likewise. - * emit-rtl.c (gen_reg_rtx): Add cast to unsigned char*. - (init_emit): Change cast to unsigned char*. - * varasm.c (compare_constant_1): Add cast to char*. - * gcse.c (delete_null_pointer_checks): Change cast to unsigned int*. - * reload1.c (reload): Likewise. - - * rtl.h (MEM_SET_IN_STRUCT_P): Use do { } while (0). - -Thu May 4 14:37:23 2000 Jeffrey A Law (law@cygnus.com) - - * predict.c (estimate_probability): If no prediction was found, then - predict the successor that is the next physical block (if such a - successor exists). - -2000-05-04 Richard Henderson - - * config/alpha/t-alpha (LIB2FUNCS_EXTRA): Use qrrnd.asm in place. - -2000-05-04 Kaveh R. Ghazi - - * system.h: Don't wrap with HAVE_SYS_TYPES_H. - -2000-05-04 Mumit Khan - - * i386/cygwin.h (CPP_PREDEFINES): Don't define __STDC__. Move - attribute macros from here ... - (CPP_SPEC): to here. - * i386/mingw32.h (CPP_PREDEFINES): Likewise. - (CPP_SPEC): Likewise. - * i386/crtdll.h (CPP_PREDEFINES): Delete attribute macros. - - * Makefile.in ($(HOST_PREFIX_1)gensupport.o): Add build rule. - (libgcc.a): Pass LIB1ASMSRC to libgcc.mk. - -2000-05-04 Kaveh R. Ghazi - - * bb-reorder.c (get_next_bb_note, get_prev_bb_note): Prototype. - - * diagnostic (vbuild_message_string, build_message_string, - build_location_prefix, output_get_prefix, init_output_buffer, - output_notice, vline_wrapper_message_with_location, - v_message_with_decl, default_print_error_function): De-constify. - (set_real_maximum_length): Prototype. - - * diagnostic.h (struct output_buffer, init_output_buffer, - output_get_prefix, output_set_prefix): De-constify. - - * function.c (init_function_start): Constify. - - * gensupport.c (remove_constraints, process_rtx): Prototype. - - * gthr-posix.h: Indent uses of #pragma. - - * objc/objc-act.c (ggc_mark_imp_list, ggc_mark_hash_table): - Prototype. - - * predict.c (find_expected_value): Delete prototype. - (expected_value_to_br_prob): Initialize variable `ev_reg'. - - * sbitmap.h (debug_sbitmap): Prototype. - - * ssa.c (compute_coalesced_reg_partition): Prototype. - - * stor-layout.c (debug_rli): Prototype. - - * tree.h (round_down): Prototype. - (init_function_start): Constify. - -2000-05-04 Zack Weinberg - - * cpphash.h: #define __extension__ away if GCC_VERSION < 2095 - (overly conservative). Change extern inline wrappers to - static inline, define them always, use PARAMS properly. - * cpplex.c (_cpp_get_directive_token): Don't issue pedantic - whitespace warnings for \f and \v at the beginning of a line. - -Thu May 4 10:03:50 2000 Jeffrey A Law (law@cygnus.com) - - * haifa-sched.c (schedule_insns): Free the flow edge list when it - is no longer needed - -2000-05-04 Bruce Korb - - * fixincl/inclhack.def: added broken_cabs - - Remove `extern double cabs' declarations from math.h - * fixincl/inclhack.sh: regen - * fixincl/fixincl.x: regen - * fixincl/fixincl.c: Remove BOGOSITY code - * fixincl/mkfixinc.sh: Remove code for installing "shell" version - -Thu May 4 09:45:12 2000 Richard Kenner - - * rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and - MEM_ALIAS_SET. - * alias.c (canon_rtx): Don't copy RTX_UNCHANGING_P or MEM_ALIAS_SET - when calling MEM_COPY_ATTRIBUTES. - * emit-rtl.c (operand_subword, change_address): Likewise. - * explow.c (stabilize): Likewise. - * expr.c (protect_from_queue, emit_move_insn_1): Likewise. - * integrate.c (copy_rtx_and_substitute): Likewise. - * combine.c (combine_simplify_rtx): Don't copy RTX_UNCHANGING_P - when calling MEM_COPY_ATTRIBUTES. - (make_extraction, simplify_shift_const, gen_lowpart_for_combine): - Likewise. - * cse.c (gen_lowpart_if_possible): Likewise. - * function.c (fixup_var_refs_1, purge_addressof_1): Likewise. - * optabs.c (gen_move_insn): Likewise. - * recog.c (validate_replace_rtx_1): Likewise. - * simplify-rtx.c (add_mem_for_addr): Likewise. - * stmt.c (expand_anon_union_decl): Likewise. - * config/arm/arm.md: Likewise. - * config/h8300/h7300.c (fix_bit_operand): Likewise. - * config/m88k/m88k.c (legitimize_address, block_move_loop): Likewise. - (block_move_no_loop, block_move_sequence): Likewise. - * config/rs6000/rs6000.c (expand_block_move_mem): Likewise. - * config/alpha/alpha.c (get_aligned_mem): Likewise. - Clear MEM_ALIAS_SET. - * final.c (alter_subreg): Don't copy MEM_ALIAS_SET when calling - MEM_COPY_ATTRIBUTES. - -2000-05-03 Robert Lipe - - * configure.in (i[34567]86-*-isc*) [tmake_file]: Add t-i386bare - to suppress libgcc1. - (i[34567]86-*-sco3.2v5*) Likewise. - (i[34567]86-*-sco3.2v4*) Likewise. - (i[34567]86-*-sco) Likewise. - (i[34567]86-*-solaris2) Likewise. - (i[34567]86-*-sysv5*) Likewise. - (i[34567]86-*-sysv4*) Likewise. - (i[34567]86-*-udk*) Likewise. - (i[34567]86-*-sysv*) Likewise. - -2000-05-03 Zack Weinberg - - * cpphash.h (U): New define, to correct type of string constants. - (ustrcmp, ustrncmp, ustrlen, uxstrdup, ustrchr): New wrapper - routines, to do casts when passing unsigned strings to libc. - * cppexp.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c: Use them. - - * cppfiles.c (_cpp_execute_include): Make filename an U_CHAR *. - * cpphash.c (_cpp_quote_string): Make string an U_CHAR *. - * cppinit.c (dump_special_to_buffer): Make macro name an U_CHAR *. - * cpplex.c (parse_ifdef, parse_include, validate_else): Make - second argument an U_CHAR *. - - * cppinit.c (builtin_array): Make name and value U_CHAR *, add - length field, clean up initializer. - (ISTABLE): Add __extension__ to designated- - initializers version. - * cpplex.c (CHARTAB): Likewise. - - * mbchar.c: Add dummy external declaration to the !MULTIBYTE_CHARS - case so the file won't be empty. - -Wed May 3 21:01:46 2000 Jason Eckhardt - - * bb-reorder.c (struct reorder_block_def): Member succ removed. - (REORDER_BLOCK_SUCC): Removed. - (enum reorder_skip_type): Removed. - (skip_insns_between_block): Renamed to skip_insns_after_block. - Removed second argument. Removed dead code and cleaned up. - (make_reorder_chain): Removed use of REORDER_BLOCK_SUCC. - (reorder_basic_blocks): Remove use of REORDER_SKIP_AFTER. Removed - second parameter to skip_insns_after_block. - -Wed May 3 13:29:54 2000 Richard Kenner - - * tree.c (staticp, case LABEL_DECL): New case. - -2000-05-03 Richard Henderson - - * Makefile.in (start.encap): Do not depend on LIBGCC1. - - * mklibgcc1.in: Fix typo last change. - -2000-05-03 Jason Merrill - - * Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long. - (LOOSE_CFLAGS): New: CFLAGS without -pedantic and -Wtraditional. - (GCC_CFLAGS): Use it. - (LANG_FLAGS_TO_PASS): New: SUBDIR_FLAGS_TO_PASS with LOOSE_CFLAGS. - * cp/Make-lang.in, java/Make-lang.in, f/Make-lang.in, ch/Make-lang.in, - objc/Make-lang.in: Use it. - -2000-05-03 Jason R Thorpe - - * config/i386/i386.md (lshrqi2_cmpno): Use q not r in constraint. - -2000-05-03 Richard Henderson - - * mklibgcc.in: Restrict OLDCC=GCC test to native. Equate - LIBGCC1 empty with libgcc1.null. - -Wed May 3 12:55:46 2000 Jim Wilson - - * fold-const.c (extract_muldiv, case MAX_EXPR): Don't allow signedness - change. - -2000-05-03 Greg McGary - - * tree.h (tree_common): Add bounded_flag member. Remove - inaccurate comment about number of remaining bits. - (BOUNDED_INDIRECT_TYPE_P, BOUNDED_POINTER_TYPE_P, - BOUNDED_REFERENCE_TYPE_P, MAYBE_BOUNDED_INDIRECT_TYPE_P, - MAYBE_BOUNDED_POINTER_TYPE_P, MAYBE_BOUNDED_REFERENCE_TYPE_P, - TREE_BOUNDED, TYPE_MAIN_VARIANTS_PHYSICALLY_EQUAL_P, - TYPE_MAIN_PHYSICAL_VARIANT, TYPE_BOUNDED): New macros. - (TYPE_QUAL_BOUNDED): New constant. - (TYPE_QUALS): Handle bounded qualifier. - (TREE_EXPR_QUALS, TREE_FUNC_QUALS): New macros. - (TYPE_BOUNDED_VALUE, TYPE_BOUNDED_BASE, TYPE_BOUNDED_EXTENT, - TYPE_BOUNDED_SUBTYPE, TYPE_UNBOUNDED_VARIANT, TYPE_POINTER_DEPTH, - TYPE_AMBIENT_BOUNDEDNESS): New macros. - (MAX_POINTER_DEPTH, VA_LIST_POINTER_DEPTH): New constants. - (tree_type): Add pointer_depth member. Remove - inaccurate comment about number of remaining bits. - (DECL_POINTER_DEPTH): Add macro. - (tree_decl): Add pointer_depth member. - -Wed May 3 22:52:53 2000 Denis Chertykov - - * config/avr/avr-protos.h (test_hard_reg_class): Declared. - * config/avr/avr.c (ashrhi3_out): optimized shift by 15. - (lshrhi3_out): Likewise. - (ashrsi3_out): bugfix in shift by 8. - (test_hard_reg_class): New function. - * config/avr/avr.md: Bugfix inside conditions in peepholes. - (ashlhi3): removed define_expand of this pattern. - (*ashlhi3_insn): renamed to ashlhi3. - (ashlsi3): removed define_expand of this pattern. - (*ashlsi3_insn): renamed to ashlsi3. - (ashrqi3): removed define_expand of this pattern. - (*ashrqi3_insn): renamed to ashrqi3. - (ashrhi3): removed define_expand of this pattern. - (*ashrhi3_insn): renamed to ashrhi3. - (ashrsi3): removed define_expand of this pattern. - (*ashrsi3_insn): renamed to ashrsi3. - (lshrhi3): removed define_expand of this pattern. - (*lshrhi3_insn): renamed to lshrhi3. - (lshrsi3): removed define_expand of this pattern. - (*lshrsi3_insn): renamed to lshrsi3. - -2000-05-03 Rodney Brown - - * config/mcore/mcore.c: Replacing inclusion of "stdio,h" with - inclusion of "system.h". - -Wed May 3 11:43:53 2000 Jim Wilson - - * config/ia64/ia64.c (ia64_encode_section_info): Add check for - TREE_ASM_WRITTEN. - -2000-05-03 David Mosberger - - * config/ia64/ia64.c (ia64_override_options): Force -mconstant-gp - if -mauto-pic is on. - (ia64_epilogue_uses): Mark "gp" (r1) as used by the epilogue if - -mconstant-gp is in effect and function-descriptors are being used - to make indirect calls. - * config/ia64/ia64.h (MASK_CONST_GP): New macro. - (MASK_AUTO_PIC): Ditto. - (TARGET_CONST_GP): Ditto. - (TARGET_AUTO_PIC): Ditto. - (TARGET_SWITCHES): Add -mconstant-gp and -mauto-pic options. - (ASM_OUTPUT_DOUBLE_INT): Don't generate @fptr() if -mauto-pic or - -mno-pic is in effect. - (ASM_OUTPUT_XDATA_DOUBLE_INT): Ditto. - * config/ia64/ia64.md (movdi): Use gen_load_gprel64() if - -mauto-pic is in effect. - (gprel64_offset): New pattern. - (load_gprel64): Ditto. - (call): Handle -mauto-pic like -mno-pic (don't use fptr). If - -mconstant-gp is in effect, no need to preserve gp around direct - calls. - (call_value): Ditto. - * config/ia64/linux.h (PROFILE_BEFORE_PROLOGUE): Define. - (FUNCTION_PROFILER): Define. - * config/ia64/sysv4.h (ASM_OUTPUT_CONSTRUCTOR): Don't generate - @fptr() directive when -mno-pic or -mauto-pic is in effect. - (ASM_OUTPUT_DESTRUCTOR): Ditto. - -2000-05-03 Richard Henderson - - * Makefile.in (STAGESTUFF): Add libgcc libgcc.mk. - (libgcc1.null, libgcc1.cross, libgcc1.a): Remove targets. - (libgcc1-asm.a, libgcc1.S, libgcc2.a): Remove targets. - (mklibgcc, libgcc.mk): New targets. - (libgcc.a): Use libgcc.mk. - (stmp-multilib): Likewise. - (stmp-multilib-sub): Remove. - (mostlyclean): Don't delete libgcc2 temp files. - * configure.in (AC_PROG_CC_C_O): Add. - (NO_MINUS_C_MINUS_O): Substitute it. - (all_outputs): Add mklibgcc. - * mklibgcc.in: New file. - -2000-05-03 Jason Merrill - - * cppexp.c (op_t): Make an int. - - * rtlanal.c (dead_or_set_regno_p): Remove unused variable. - - * varasm.c (initializer_constant_valid_p): Fix parenthesis. - - * gensupport.c (process_rtx): Fix macros used. - -2000-05-03 Richard Henderson - - * flow.c (propagate_one_insn): Also don't PROP_REG_INFO for - call-clobbered registers of a call. - -Wed May 3 12:40:53 2000 Clinton Popetz - - * gensupport.c: New file. - * gensupport.h: New file. - * Makefile.in (HOST_RTL): Depend on gensupport. - (gensupport.o) New rule. - * genattr.c: Use gensupport for reading .md files. - * genattrtab.c: Ditto. - * gencodes.c: Ditto. - * genconfig.c: Ditto. - * genemit.c: Ditto. - * genextract.c: Ditto. - * genflags.c: Ditto. - * genopinit.c: Ditto. - * genoutput.c: Ditto. - * genpeep.c: Ditto. - * genrecog.c: Ditto. - * rtl.def (define_insn_and_split): New DEF_RTL_EXPR. - * md.texi (Insn Splitting): Document define_insn_and_split. - -Tue May 2 00:20:30 2000 Jason Eckhardt - - * flow.c (verify_flow_info): Added two more sanity checks. The - first checks that the blocks are numbered consecutively. The second - checks that n_basic_blocks is actually equal to the number of - basic blocks in the insn chain. - -2000-05-03 Zack Weinberg - - * cpplib.h: Add accessor macros for token lists. - * cpplib.c, cpphash.c, cpplex.c: Use them. - -Wed May 3 09:29:17 2000 Richard Kenner - - * expr.c (expand_expr, case COMPONENT_REF): Don't check for checking - memory usage if not in a function. - * varasm.c (initializer_constant_valid_p, case ADDR_EXPR): Only - return address if static. - -Wed May 3 13:14:49 MET DST 2000 Jan Hubicka - - * ifcvt.c (noce_try_cmove_arith): Use may_trap_p to thest - whether address may trap. - -Tue May 2 23:38:37 2000 Jason Eckhardt - - * bb-reorder (chain_reorder_blocks): Changed code to test for - EDGE_FALLTHRU rather than making erroneous assumption that the - first outgoing edge is the fall-through edge. - -Tue May 2 18:20:31 2000 Donald Lindsay - - * config/mips/mips.c (mips_build_va_list,mips_va_start,mips_va_arg): new - ABI for varargs, across all MIPS. This is incompatible because the - va_list (__builtin_va_list) structure is different, so a compilation - unit passing a va_list and a compilation unit being passed one, should - both be compiled with the same ABI. (The old structure had two - pointers, now it has three.) - -Tue May 2 19:18:43 2000 Jason Eckhardt - - * bb-reorder.c (struct reorder_block_def): Remove members end, - block_begin, and block_end. - (REORDER_BLOCK_OLD_END): Delete. - (REORDER_BLOCK_BEGIN): Delete. - (REORDER_BLOCK_END): Delete. - (chain_reorder_blocks): Remove dead code. - -Tue May 2 17:06:53 2000 Jason Eckhardt - - * bb-reorder.c (remove_scope_notes): Check for both types of scope - notes as the end of a basic block before deleting. - -2000-05-02 Mumit Khan - - * final.c (final_start_function): Fix spelling of "necessary". - -2000-05-02 Jason Merrill - - * toplev.c (debug_ignore_block): Return int. - * dwarf2out.c (dwarf2out_ignore_block): Likewise. - * toplev.h, dwarf2out.h: Adjust. - * emit-rtl.c (remove_unnecessary_notes): Test return value. - - * emit-rtl.c (remove_unnecessary_notes): Fix spelling of "necessary". - * toplev.c, final.c, rtl.h: Adjust. - -2000-05-02 Zack Weinberg - - * aclocal.m4 (gcc_AC_CHECK_PROG_VER): New macro. - * configure.in: Look for makeinfo in the unified tree, then - for a system makeinfo which is sufficiently new. - * Makefile.in: If configure says makeinfo is too old, don't - build or install Info documentation. - -2000-05-02 Zack Weinberg - - * cpphash.c (collect_params): Fix off-by-one error. - (dump_hash_helper): Dump all four macro nodetypes. - -2000-05-02 Jakub Jelinek - - * cpphash.c (trad_stringify): Adjust p after stringification as - well. - -2000-05-02 Zack Weinberg - - * cpplib.h (CPP_POP, parse_cleanup_t): Delete. - (cpp_buffer): Remove cleanup, seen_eof, manual_pop members. - - * cppfiles.c (file_cleanup): Delete. - * cpphash.c (macro_cleanup): Delete. - (collect_objlike_expansion, collect_funlike_expansion, - macarg, scan_arguments): Remove CPP_POP case. - - * cpplex.c (null_cleanup): Delete. - (cpp_pop_buffer): Do the work that was done in the cleanups - here. Call _cpp_unwind_if_stack from here. - (_cpp_expand_to_buffer, cpp_scan_buffer_nooutput, - cpp_scan_buffer): Run until we see CPP_EOF and the top of - stack is the buffer _below_ the one we stacked. - (cpp_get_token): Always pop an exhausted buffer. Return - CPP_EOF unless it's a macro buffer. Don't call _cpp_handle_eof. - * cpplib.c (skip_if_group): Don't call cpp_get_token to - increment the line number. - (_cpp_handle_eof): Rename to _cpp_unwind_if_stack. - - * fix-header.c (read_scan_file) [parsing getchar()]: Run until - we see CPP_EOF and the top of stack is the buffer _below_ the - one we stacked. - * scan-decls.c: Likewise. - -2000-05-02 Andrew Haley - - * config/ia64/ia64.c (ia64_encode_section_info): Handle the case - where this function is called for the second time on a decl that - has had its section info changed in such a way as to move it out - of small data/bss. - * config/ia64/ia64.h (REDO_SECTION_INFO_P): New definition. - -2000-05-01 Richard Henderson - - * ifcvt.c (dead_or_predicable): Set merge_bb->end to the insn before - the sequence we're moving, not to merge_bb->head. - -2000-05-01 Richard Henderson - - * configure.in (alpha*-*-linux-gnulibc1*) [tmake_file]: Remove - reference to alpha/t-linux. - (alpha*-*-linux-gnu*): Likewise. - * configure: Rebuild. - - * calls.c (expand_call): Don't emit reg notes for a sibcall. - - * flow.c (calculate_global_regs_live): Skip for_each_successor_phi - if not in SSA form. - - * ifcvt.c (if_convert): Only verify_flow_info if ENABLE_CHECKING. - -2000-05-01 Jason Merrill - - * integrate.c (copy_decl_for_inlining): Copy TREE_READONLY and - TREE_THIS_VOLATILE. - -2000-05-01 Richard Henderson - - * ifcvt.c (noce_emit_cmove): Conditionally compile call to - emit_conditional_move. - -2000-05-01 Jakub Jelinek - - * config/ia64/linux.h (LINK_SPEC): Use /lib/ld-linux-ia64.so.1 - as the dynamic linker. - -2000-05-01 Zack Weinberg - - * cppfiles.c (open_include_file): Open file in blocking mode. - (read_include_file): Don't fcntl(fd, F_SETFL, 0) anymore. - Only exclude block devices and directories. - - * cpphash.c (_cpp_make_hashnode): Rename make_HASHNODE, now - static. Allocate the hashnode and its string in the same - block of memory. - (del_HASHNODE): Don't free h->name. - (_cpp_lookup): If there is no entry for this string, create - one, of type T_VOID. - (_cpp_lookup_slot): Delete. - * cpphash.h: Update prototypes. - - * cpplex.c (maybe_macroexpand): Check for hp->type == T_VOID, - not hp == NULL. - * cpplib.c (do_define, do_undef, do_pragma_poison, do_assert, - do_unassert, cpp_defined): Use _cpp_lookup. Don't create a - node here, just fill in the value field properly. "Delete" - entries by setting the value field to T_VOID. Check for - hp->type == T_VOID, not hp == NULL. - - * Makefile.in (cpplib.o): Don't depend on $(HASHTAB_H). - * cpperror.c, cppexp.c, cpplex.c, cpplib.c: Don't include - hashtab.h. - -2000-05-01 Alexandre Oliva - - * config/mn10300/mn10300.c (print_operand_address): Do not add - zero to SP. - - * config/mn10300/mn10300.c (expand_epilogue): If SP is to be - adjusted by less than 256 bytes, use ret regardless of having any - callee-saved register to restore. - -2000-05-01 Laurynas Biveinis - - * tm.texi (TARGET_HAS_F_SETFLKW): Fix typo. - -2000-05-01 Mark Elbrecht - - * config/i386/djgpp.h (INT_ASM_OP): Define. - (CPP_PREDEFINES): Rename MSDOS to __MSDOS__. - (ASM_WEAKEN_LABEL): Define. - (MASK_BNU210): Define. - (SUBTARGET_SWITCHES): Define. - (SUPPORTS_WEAK, SUPPORTS_ONE_ONLY): Define. - (MAKE_DECL_ONE_ONLY): Define. - (UNIQUE_SECTION_P, UNIQUE_SECTION): Define. - -2000-05-01 Mumit Khan - - * i386/cygwin.h (INT_ASM_OP): Define. - -Mon May 1 18:20:06 2000 Denis Chertykov - - * config/avr/avr.c (address_cost): renamed to avr_address_cost. - * config/avr/avr.h (ADDRESS_COST): use avr_address_cost. - -Mon May 1 17:50:44 2000 Denis Chertykov - - * config/avr/avr.c (asm_file_start): output 0 as r0 and 1 as r1 in - __tmp_reg__ and __zero_reg__ initialization. - -2000-04-30 Richard Henderson - - * flow.c (propagate_one_insn): Mark sets even when the insn is dead. - - * ifcvt.c (noce_process_if_block): Fail the conversion if X is - referenced bewteen the condition and the jump. Don't delete - anything but the jump. - -Sun Apr 30 22:48:24 2000 Jason Eckhardt - - * bb-reorder.c (scope_def): New struct. - (scope_forest_info): New struct. - (struct reorder_block_def): New member "scope". - (REORDER_BLOCK_SCOPE): New macro. - (relate_bbs_with_scopes): New function and prototype. - (make_new_scope): Likewise. - (build_scope_forest): Likewise. - (remove_scope_notes): Likewise. - (insert_intra_1): Likewise. - (insert_intra_bb_scope_notes): Likewise. - (insert_inter_bb_scope_notes): Likewise. - (rebuild_scope_notes): Likewise. - (free_scope_forest_1): Likewise. - (free_scope_forest): Likewise. - (dump_scope_forest): Likewise. - (dump_scope_forest_1): Likewise. - (chain_reorder_blocks): Set REORDER_BLOCK_SCOPE for new block. - Update REORDER_BLOCK_EFF_HEAD and REORDER_BLOCK_EFF_END for new - block. - (reorder_basic_blocks): Added calls to build_scope_scope_forest - and remove_scope_notes before reordering is done. Added calls to - rebuild_scope_notes, free_scope_forest, and reorder_blocks after - after reordering is done. - -2000-40-30 Bruce Korb - - * fixinc/inclhack.def: Added definitions needed by OSR5, - removed two stale entries (defined away with OLD_CPP). - * fixinc/inclhack.sh: regen - * fixinc/fixincl.x: regen - -2000-04-30 Richard Henderson - - * ifcvt.c (dead_or_predicable): Manually squeeze non-movable notes - from the last insn in the sequence. - -2000-04-30 Zack Weinberg - - * cpplex.c (cpp_idcmp): New function. - * cpplib.h: Prototype it. - * scan_decls.c (scan_decls): Use it to inspect token names. - * fix-header.c (read_scan_file): Likewise. Set system_header_p on - the file being run through the preprocessor. - (check_macro_names): Provide length of token to cpp_defined. - - * Makefile.in: Remove stale warning message. - - * cppfiles.c (redundant_include_p): Provide length of token to - cpp_defined. - * cpphash.c (_cpp_make_hashnode, _cpp_lookup_slot): Hash - values are unsigned int. - (_cpp_lookup, _cpp_lookup_slot): Do not calculate the length. - (_cpp_lookup_slot): Do not calculate the hash, either. - * cpphash.h: Update prototypes. - * cpplib.c (do_define, do_undef, do_pragma_poison, do_assert): - Hashes are unsigned int. Calculate hash here, pass by value - to _cpp_lookup_slot. - -2000-04-30 Bernd Schmidt - - * simplify-rtx.c (check_value_useless): Delete function. - (discard_useless_locs): Don't call it; manage N_USELES_VALUES counter - by hand. - (cselib_invalidate_regno): Likewise. - (cselib_invalidate_mem_1): Likewise. - (references_value_p): Recognize useless values by the fact that they - have no locations. - (discard_useless_values): Likewise. - (cselib_record_set): This may turn a useless value - into a useful one. - -2000-04-30 Richard Henderson - - * config/d30v: New port. - - * configure.in (d30v-*): Set fp format. - * configure: Rebuild. - -2000-04-30 Richard Henderson - - * ifcvt.c: New file. - * Makefile.in (OBJS): Add it. - (ifcvt.o): New target. - * jump.c (jump_optimize_1): Remove all code related to if-conversion, - and conditional arithmetic. - (find_insert_position): Remove. - * timevar.def (TV_IFCVT, TV_IFCVT2): New. - * toplev.c (DFI_ce, DFI_ce2): New. - (dump_file): Add ce and ce2 dumps. - (rest_of_compilation): Run if_convert a couple o times. Set - cse_not_expected after cse2. Don't set no_new_pseudos until - after sched1 or recompute_reg_usage. - -2000-04-30 Richard Henderson - - * config/alpha/t-crtbe (crtbegin.o): Add "-I.". - (crtend.o, crtbeginS.o, crtendS.o): Likewise. - -2000-04-30 Richard Henderson - - * flow.c (struct reg_cond_life_info): New. - (struct propagate_block_info): Add reg_cond_dead and reg_cond_reg. - (init_propagate_block_info): Initialize them. - (free_propagate_block_info): Destruct them. - (mark_set_1): Consider conditional life before killing a register. - (mark_regno_cond_dead): New. - (free_reg_cond_life_info): New. - (flush_reg_cond_reg_1, flush_reg_cond_reg): New. - (ior_reg_cond, not_reg_cond, nand_reg_cond): New. - (mark_used_reg): Record conditional life. - - * haifa-sched.c (schedule_insns): Disable death counting - sanity check for HAVE_conditional_execution. - -2000-04-30 Richard Henderson - - * Makefile.in (TIMEVAR_H): New. - (ggc-simple.o, ggc-page.o, toplev.o, timevar.o): Use it. - (timevar.h): Remove rule. - -2000-04-29 Richard Henderson - - * config/alpha/crtend.asm: Use C comments instead of #. - * config/alpha/crtbegin.asm: Likewise. Mark __dso_handle hidden. - - * config/alpha/elf.h (SELECT_SECTION): Treat CONSTRUCTOR like VAR_DECL. - -2000-04-29 Zack Weinberg - - * cpphash.h (enum node_type: Take out T_MCONST. - (union hashval): Move into struct hashnode. - (struct hashnode): Pack tighter. Remove file, line, col - members. - * cpphash.c: Constify most of the macro-definition structures. - (struct definition): Replace by struct object_defn - and struct funct_defn. Put file, line, column information - here. All users updated to match. - (_cpp_create_definition, _cpp_macroexpand): Remove special - case for #define WORD OTHERWORD. - * cpplib.c (do_undef): Remove T_MCONST case. - - * cpphash.h: Move struct reflist, struct definition, and the - DEFINITION typedef to cpphash.c. Use 'struct definition *' in - union hashval. _cpp_free_definition takes a HASHNODE pointer. - * cpphash.c (_cpp_free_definition): Free data pointed to by - MCONST, XCONST, MACRO, and FMACRO nodes properly. - (_cpp_create_definition, del_HASHNODE): Just call - _cpp_free_definition to clear out a hashnode. - * cpplib.c (do_pragma_poison): Likewise. - -Sat Apr 29 12:25:17 2000 Alexandre Oliva - - * config/mn10300/mn10300.h (FIRST_DATA_REGNUM, - LAST_DATA_REGNUM, FIRST_ADDRESS_REGNUM, LAST_ADDRESS_REGNUM, - FIRST_EXTENDED_REGNUM, LAST_EXTENDED_REGNUM): New macros. - (REGNO_SP_P): Redefine in terms of STACK_POINTER_REGNUM. - (REGNO_DATA_P, REGNO_ADDRESS_P, REGNO_EXTENDED_P, - REGNO_AM33_P): Redefine in terms of the new macros. - (CONDITIONAL_REGISTER_USAGE, REGNO_REG_CLASS): Likewise. - (FUNCTION_VALUE, LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P, - STRUCT_VALUE): Likewise. - (STACK_POINTER_REGNUM, FRAME_POINTER_REGNUM, - ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Likewise. Moved. - -Sat Apr 29 01:18:45 MET DST 2000 Jan Hubicka - - * regmove.c (struct record_stack_memrefs_data): New. - (record_stack_memrefs): New function. - (combine_stack_adjustments_for_block): Use it. - -Sat Apr 29 01:15:27 MET DST 2000 Jan Hubicka - - * calls.c (calls_function_1): Properly handle TREE_LIST expressions; - use special_function_p to detect alloca. - -Fri Apr 28 16:30:33 2000 Marc Espie - - * gcc.texi: Fixes for makeinfo 4.0 --html. - -2000-04-28 Zack Weinberg - - * pcp.h: Delete file. - -2000-04-28 Kazu Hirata - - * h8300.c (function_epilogue): Clean up flags when the last insn - in a function is a barrier. - -2000-04-28 Chris Demetriou - - * configure.in (sparc-hal-solaris2*): protect [] glob from - my expansion. - (mips*-*-ecoff*, mips*-*-elf*, mips*-*-*): use MASK_ defines - rather than hard-coded constants in target_cpu_default2. - * configure: Regenerate. - -2000-04-28 Jason Merrill - - * tree.c (get_callee_fndecl): Extract the initial value from - a readonly decl. - -2000-04-28 Richard Henderson - - * varasm.c (record_constant_1): Record the CODE_LABEL when - taking the address of a LABEL_REF. - -2000-04-28 Richard Henderson - Jan Hubicka - - * calls.c (combine_pending_stack_adjustment_and_call): Return the - adjustment; don't do the stack adjust. - (expand_call): Call compute_argument_block_size right before - allocating the block; update comment; don't do alignment sanity - checking for sibling call; use args_size instead of - unadjusted_args_size before args_size is adjusted. Use - combine_pending_stack_adjustment_and_call to compute stack adjust - for must_preallocate case. - - * expr.c (push_block): Remove shadow `temp' in inner scope. - -2000-04-28 Jason Merrill - - * toplev.c (rest_of_compilation): Call - note_deferral_of_defined_inline_function even if the function - can't be inlined. - -2000-04-28 Scott Bambrough - - * cpplex.c (_cpp_scan_line): Fix buffer overwrite. - -2000-04-28 Richard Henderson - - * toplev.c (rest_of_type_compilation): Fix sdb TIMEVAR typo. - -2000-04-28 Kaveh R. Ghazi - - * timevar.c (init_timevar): DeANSIfy function definition. - -2000-04-27 Alex Samuel - - * Makefile.in (timevar.o): Depend on flags.h. - * timevar.c (unused_stack_instances): New variable. - (timevar_push): Take a timevar_stack_def from - unused_stack_instances if available. - (timevar_pop): Push the popped timevar_stack_def onto - unused_stack_instances. - (TIMEVAR_ENABLE): New macro. - (timevar_def): Make standalone a 1-bit field. Add field used. - (get_time): Rename parameter to now. Return after clearing it if - not TIMEVAR_ENABLE. - (init_timevar): Do nothing if not TIMEVAR_ENABLE. - (timevar_pop): Likewise. - (timevar_stop): Likewise. - (timevar_push): Likewise. Mark the timing variable as used. - (timevar_start): Likewise. - (timevar_print): Do nothing if not TIMEVAR_ENABLE. Don't print - timevars that were never used. - -2000-04-27 Mark Mitchell - - * c-common.c (c_apply_type_quals_to_decl): REFERENCE_TYPES are - always TREE_READONLY. - -2000-04-27 Ulrich Drepper - - * i386.h (FUNCTION_BLOCK_PROFILER_EXIT): Generate mem reference - for call instruction with mode QImode. - -2000-04-27 Alex Samuel - - * Makefile.in (OBJS): Add timevar.o. - (toplev.o): Depend on timevar.h. - (ggc-simple.o): Likewise. - (ggc-page.o): Likewise. - (timevar.o): New rule. - (timevar.h): New rule. - - * timevar.h: New file. - * timevar.c: Likewise. - * timevar.def: Likewise. - - * toplev.h (gc_time, parse_time, varconst_time): Remove. - * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR - throughout. - (TIMEVAR): Remove macro. - (gc_time, parse_time, varconst_time, integration_time, jump_time, - cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, - flow_time, combine_time, regmove_time, sched_time, - local_alloc_time, global_alloc_time, flow2_time, peephole2_time, - sched2_time, dbr_sched_time, reorder_blocks_time, - rename_registers_time, shorten_branch_time, stack_reg_time, - to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, - all_time): Remove. - (compile_file): Don't initialize time variables. Call - init_timevar and start TV_TOTAL timer. Call timevar_print instead - of many calls to print_time. - (rest_of_compilation): Add timing for reload_cse_regs. - (get_run_time): Removed to timevar.c. - (print_time): Likewise. - (get_run_time): Implement using TV_TOTAL time variable. - (print_time): Get total run time from get_run_time. - * ggc-page.c (ggc_collect): Push and pop TV_GC instead of - computing elapsed time explicitly. - * ggc-simple.c (ggc_collect): Likewise. - (gc_time): Remove declaration. - -2000-04-27 Mark Mitchell - - * calls.c (combine_pending_stack_adjustment_and_call): New function. - (expand_call): Use it. - -2000-04-27 Jan Hubicka - - * flow.c (mark_set_1): Handle MEMs in ZERO_EXTRACT/SIGN_EXTRACT - fields. - -Thu Apr 27 12:47:00 2000 Alexandre Oliva - - * config/mn10300/mn10300.md (movhi): Simplify. Prefer data - registers. - -Thu Apr 27 17:33:05 MET DST 2000 Jan Hubicka - - * function.c (epilogue_done): Pass whole insn to record_insns. - -Thu Apr 27 16:55:28 MET DST 2000 Jan Hubicka - - * cse.c (CSE_ADDRESS_COST): Remove. - (find_best_addr): Add new parameter "MODE", use address_cost instead - of CSE_ADDRESS_COST - (address_cost): New. - (fold_rtx): Update call of find_best_addr. - * rtl.h (address_cost): Declare. - * loop.c (general_induction_var): Add new parameter "MODE", use - address_cost instead of ADDRESS_COST - (init_loop): Use address_cost instead of ADDRESS_COST. - (check_insn_for_givs): Update call of general_induction_var. - (find_mem_givs): Likewise. - (consec_sets_giv): Likewise. - * config/i386/i386.h (ADDRESS_COST): Call ix86_address_cost. - * i386.c (ix86_address_cost): New. - * i386-protos.h (ix86_address_cost): Declare. - -Thu Apr 27 11:45:16 2000 Alexandre Oliva - - * config/mn10300/mn10300.md (movqi): Simplify. Prefer data - registers. - -Thu Apr 27 16:11:00 MET DST 2000 Jan Hubicka - - * expr.c (store_expr): Use clear_storage instead of direct memset - libcall. - -Thu Apr 27 10:36:51 2000 Alexandre Oliva - - * config/mn10300/mn10300.c (mn10300_address_cost): Test - ASHIFT, AND and LABEL_REF. - -Thu Apr 27 15:08:46 MET DST 2000 Jan Hubicka - - * invoke.texi (-foptimize-sibling-calls): Fix. - -Thu Apr 27 14:54:22 MET DST 2000 Jan Hubicka - - * loop.c (load_mems) Don't use hard registers for the hoisting. - - * unroll.c (unroll_loop): Avoid overflow in the n_iterations - calculation; rename const_equiv array in the preconditioning code - from loop_unroll to loop_unroll_precondition - -2000-04-27 Richard Henderson - - * flow.c (struct propagate_block_info): Remove new_dead, new_live; - add new_set. - (propagate_one_insn): Clear it. Don't update reg_live here. - (init_propagate_block_info): Update for pbi member changes. - (free_propagate_block_info): Likewise. - (mark_set_1): Know that zero_extract, sign_extract, and - strict_low_part don't kill their argument. Alter hard subregs. - Update new_set for non-CLOBBER sets. Update reg_live. - (find_auto_inc): Update reg_live, not new_dead. - (mark_used_reg): Update reg_live, not new_live. Examine new_set - to determine if the reg in question was set this insn. Only update - reg info with PROP_REG_INFO. - -2000-04-26 Richard Henderson - - * flow.c (allocate_reg_life_data): Set max_regno here ... - (life_analysis): ... not here. - - * flow.c (calculate_global_regs_live): Force stack pointer - live at end. - -2000-04-26 Richard Henderson - - * jump.c (redirect_exp_1): Rework from old redirect_exp. Never - commit change group changes. - (invert_exp_1): Similarly. - (redirect_exp, invert_exp): Use them. - (redirect_jump_1): New. - (invert_jump_1): New. - (jump_optimize_1): Remove code subsumed by condexec.c. - * rtl.h (invert_jump_1, redirect_jump_1): Declare. - -2000-04-26 Richard Henderson - - * rtlanal.c (dead_or_set_regno_p): Use find_regno_note. - - * genconfig.c (main): Set all HAVE_foo to 1. - - * graph.c (node_data): Use GET_NOTE_INSN_NAME instead of local array. - -2000-04-26 Alex Samuel - - * invoke.texi: Document -fssa flag. - -2000-04-26 Richard Henderson - - * flow.c (count_reg_sets_1): Remove. - (count_reg_sets, count_reg_references): Remove. - (recompute_reg_usage): Implement with update_life_info. - Reallocate life data. - -2000-04-26 Richard Henderson - - * flow.c (update_life_info): Consider blocks null to mean the - universal set. - (calculate_global_regs_live): Likewise. - (life_analysis): Do that instead of collecting all_blocks. - -2000-04-26 Richard Henderson - - * flow.c (tidy_fallthru_edge): Don't delete the jump when it's - a still-valid conditional jump. - -2000-04-26 Richard Henderson - - * jump.c (invert_jump): Always invert REG_BR_PROB. Do it correctly. - - * bb-reorder.c (reorder_basic_blocks): Don't run estimate_probability. - * flow.c (calculate_loop_depth): Remove. - * output.h (calculate_loop_depth): Don't declare. - * toplev.c (rest_of_compilation): Expand calculate_loop_depth - inline; run estimate_probability at the same time. - -2000-04-26 Neil Booth - - * cpplib.h: "~=" is not a single pp-token. - * cpplex.c: Correct commentary. - -2000-04-26 Richard Henderson - - * flow.c (mark_set_1): New arguments code and flags; update all - callers. Track regno_first and regno_last; do HARD_REGNO_NREGS - test in one place. Tidy flags tests. Don't bias REG_N_REFS by - loop_depth when optimizing for size. Do new_dead update after - emitting REG_UNUSED notes. Merge mark_set_reg code. - (mark_set_reg): Remove. - (propagate_one_insn): Use mark_set_1 for call-clobbered registers; - arrange to not emit REG_UNUSED notes. - -2000-04-26 Richard Henderson - - * flow.c (find_auto_inc): Use pbi->bb instead of BLOCK_FOR_INSN. - * ssa.c (convert_from_ssa): Don't run compute_bb_for_insn. - -2000-04-26 Richard Henderson - - * flow.c (propagate_one_insn): Break out from propagate_block. - (init_propagate_block_info): Likewise. - (free_propagate_block_info): Likewise. - (propagate_block): Use them. Export. - * basic-block.h: Declare them all. - -2000-04-26 Richard Henderson - - * basic-block.h (life_analysis): Declare here ... - * output.h: ... not here. - * flow.c (life_analysis): Remove nregs parameter; replace - remove_dead_code with flags. Remove ssa dead code check. - Only init alias analysis if we'll use it. - * reg-stack.c (reg_to_stack): Update life_analysis arguments. - * ssa.c (convert_to_ssa): Likewise. - (convert_from_ssa): Likewise. - * toplev.c (rest_of_compilation): Likewise. - -2000-04-26 Richard Henderson - - * flow.c (flow_delete_block): Rename from delete_block. Export. - * basic-block.h (flow_delete_block): Declare. - -2000-04-26 David S. Miller - - * optabs.c (emit_libcall_block): Verify insns with INSN_P before - taking a PATTERN of it. - -2000-04-26 - - * cpplex.c (spell_other, spell_char): Remove. - (SPELL_CHAR): New. - (token_spelling, trigraph_map): Use unsigned chars. - (_cpp_lex_line): Tidy up the switch statement. - * cpplib.h: Implement spell_char with spell_string. - (C): New. - -2000-04-26 - - * pa/pa32-regs.h (HARD_REGNO_MODE_OK): Warning removal. - * pa/pa64-regs.h (HARD_REGNO_MODE_OK): Warning removal. - -2000-04-26 Kaveh R. Ghazi - - * dwarf2out.c (dw_cfi_oprnd_struct, dw_fde_struct, add_fde_cfi, - reg_save, dwarf2out_frame_debug_expr, dwarf2out_def_cfa, - dwarf2out_window_save, dwarf2out_args_size, dwarf2out_reg_save, - dwarf2out_return_save, dwarf2out_return_reg, - dwarf2out_stack_adjust, dwarf2out_frame_debug, primary_filename, - add_AT_lbl_id, add_AT_lbl_offset, type_tag, decl_start_label, - gen_compile_unit_die, dwarf2out_init): Constify a char*. - - * dwarf2out.h (dwarf2out_init): Likewise. - - * dwarfout.c (filename_entry, primary_filename, last_filename, - type_tag, output_compile_unit_die, dwarfout_init): Likewise. - - * tree.h (dwarf2out_def_cfa, dwarf2out_window_save, - dwarf2out_args_size, dwarf2out_reg_save, dwarf2out_return_save, - dwarf2out_return_reg): Likewise. - -2000-04-26 Andreas Jaeger - - * extend.texi (Function Attributes): Fix description of pure - attribute. - -2000-04-26 Jason Merrill - - * integrate.c (output_inline_function): Do clear DECL_DEFER_OUTPUT - before calling rest_of_compilation. - -2000-04-26 Andreas Jaeger - - * config/mips/linux.h: Remove erroneous commit of #if 0/#endif in - last patch. - -2000-04-25 Richard Henderson - - * cse.c (cse_insn): Emit barrier after unconditional jump. - - * calls.c (expand_call): Disable tail call generation once - rtx_equal_function_value_matters is false. - - * reg-stack.c (convert_regs_1): Treat EDGE_ABNORMAL_CALL edges - like EDGE_EH edges. - -2000-04-25 Jason Merrill - - * dwarf2out.c (add_bound_info): Don't crash on an unexpanded SAVE_EXPR. - - * dwarfout.c (output_decl): Ignore NAMESPACE_DECLs. - - * dwarf2out.c (gen_subprogram_die): The class-scope declaration DIE - is the primary DIE for a member function. - (gen_decl_die): Call set_decl_origin_self here. - * dwarfout.c (output_decl): And here. - * integrate.c (output_inline_function): Not here. - Don't clear DECL_INLINE until after calling rest_of_compilation. - (set_decl_origin_self): No longer static. - * tree.h: Add prototype. - * toplev.c (note_deferral_of_defined_inline_function): Only write - out abstract instance for actual inlines. - -2000-04-25 Alexandre Oliva - - * config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Return - EXTENDED_REGS only if TARGET_AM33. - * config/mn10300/mn10300.md (movsi, addsi): Avoid exposing - SP_REGS to register allocation and reloading unless absolutely - necessary. - (movsi3): Remove special-case of adding non-constants to SP. - -2000-04-25 Kaveh R. Ghazi - - * aclocal.m4 (gcc_AC_NEED_DECLARATION): This macro now requires - INCLUDES to search and does not provide any of its own. Also it - now accepts optional ACTION-IF-NEEDED and ACTION-IF-NOT-NEEDED - parameters. Also it does not call AC_DEFINE. - (gcc_AC_NEED_DECLARATIONS): Likewise. Also this macro now calls - AC_DEFINE and provides for automatic entries for autoheader. - (gcc_AC_FUNC_PRINTF_PTR): Cleanup C code in test. - - * configure.in (gcc_AC_NEED_DECLARATIONS): Save and restore CFLAGS - so we can pass -I flags and include gansidecl.h/system.h in this - test. - - * acconfig.h: Delete all NEED_DECLARATION_* entries. - -2000-04-25 Kaveh R. Ghazi - - * acconfig.h (ENABLE_STD_NAMESPACE, ENABLE_CHECKING, - ENABLE_TREE_CHECKING, ENABLE_RTL_CHECKING, ENABLE_GC_CHECKING, - ENABLE_GC_ALWAYS_COLLECT): Delete entries. - - * configure.in (ENABLE_STD_NAMESPACE, ENABLE_CHECKING, - ENABLE_TREE_CHECKING, ENABLE_RTL_CHECKING, ENABLE_GC_CHECKING, - ENABLE_GC_ALWAYS_COLLECT): Use three argument form of AC_DEFINE - for these macros. Clean up spacing and linewraps. - -2000-04-26 Jason Merrill - - * calls.c (expand_call): Use get_callee_fndecl. - - * print-tree.c (print_node): Print the chain of an _EXPR. - -Tue Apr 25 16:16:04 2000 Andrew MacLeod - Jim Wilson - Andrew Haley - - * config/ia64/crtbegin.asm: Add IA-64 unwind support. Correct alloc - and gp save/restore problems. - * config/ia64/crtend.asm: Add IA-64 unwind support. - * config/ia64/ia64.c (ia64_compute_frame_size): Don't include pr_size - in fr_pad_size calculation. - (save_restore_insns): Move PR save area. Correct uses of - RTX_FRAME_RELATED_P. - (ia64_expand_prologue): Mark alloc with RTX_FRAME_RELATED_P. - (ia64_expand_epilogue): Add eh_epilogue support. - (ia64_function_prologue): Emit .prologue directive. - (ia64_init_machine_status, ia64_mark_machine_status): New functions. - (ia64_override_options): Set init_machine_status and - mark_machine_status. - (rtx_needs_barrier): Handle bsp reads and writes. - (spill_offset, sp_offset, spill_offset_emitted, tmp_reg, tmp_saved): - New static variables. - (process_set, process_for_unwind_directive): New functions. - * config/ia64/ia64.h (ASM_OUTPUT_XDATA_CHAR, ASM_OUTPUT_XDATA_SHORT, - ASM_OUTPUT_XDATA_INT, ASM_OUTPUT_XDATA_DOUBLE_INT, ASM_OUTPUT_EH_CHAR, - ASM_OUTPUT_EH_SHORT, ASM_OUTPUT_EH_INT, ASM_OUTPUT_EH_DOUBLE_INT): New - macros. - (EH_FRAME_SECTION_ASM_OP): Define to IA_64.unwind section. - (IA64_UNWIND_INFO, HANDLER_SECTION, IA64_UNWIND_EMIT): Define. - (struct machine_function): Define. - * config/ia64/ia64.md (bsp_value, set_bsp, eh_epilogue): New patterns. - -2000-04-25 Bruce Korb - - * fixinc/Makefile.in: make the removal of old programs more - robust - * fixinc/mkfixinc.sh: use the two new targets in the Makefile: - install-bin and install-sh - -2000-04-25 Nick Clifton - - * integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): If not - defined, define to return zero. - (function_cannot_inline_p): If a function has any target - specific attributes, then use the macro - FUNCTION_ATTRIBUTE_INLINABLE_P to allow the target to decide - whether it can be inlined. If it cannot, issue a suitable - explanation. - - * tm.texi: Add a new node 'Inlining' to document the new macro - FUNCTION_ATTRIBUTE_INLINABLE_P. - -2000-04-25 Zack Weinberg - - * cpplib.h (struct cpp_buffer): Add 'mapped' flag; fix - commentary. - -2000-04-25 Neil Booth - - Restore previous patch, plus the following fixes: - - * cpphash.c (_cpp_create_definition): Test PREV_WHITESPACE in - flags, not CPP_OPEN_PAREN. - * cpplex.c (expand_token_space, init_token_list, - cpp_free_token_list): Put the dummy token at list->tokens[-1]. - (_cpp_lex_line, _cpp_lex_file): token list is 0-based. - -Tue Apr 25 14:06:40 2000 Alexandre Oliva - - * config/i386/freebsd.h (INT_ASM_OP): Define. - -Tue Apr 25 14:51:07 MET DST 2000 Jan Hubicka - - * loop.c (strength_reduce): Fix typo in the last checkin. - -Tue Apr 25 07:33:12 2000 Richard Kenner - - * stor-layout.c (finalize_record_size): Simplify to use existing - functions. - (compute_record_mode): No longer static. - * tree.h (compute_record_mode): New declaration. - -2000-04-25 Neil Booth - - * Revert my patch below until cause of build failures - determined. - -2000-04-25 Richard Henderson - - * combine.c (combine_instructions): Add missing argument - to try_combine. - - * toplev.c (rest_of_compilation): Delay sibcall optimization - until after emit_eh_context. - -2000-04-24 Nick Clifton - - * combine.c (combine_instructions): Do not try to combine a - sequence of insns when the second insn has been replaced by a - note. - -Mon Apr 24 17:34:18 2000 Mumit Khan - - * gcc.c (load_specs): New static function. - (read_specs): Use it. - - * gcc.c (lookup_compiler): Make multiple passes for case - insensitive filesystems. - -2000-04-24 Neil Booth - - * cpphash.c: replace HSPACE_BEFORE with PREV_WHITESPACE. - * cpphash.h (_cpp_check_directive): new. - * cpplex.c (handle_newline, cpp_free_token_list, - init_trigraph_map, trigraph_ok, trigraph_replace, - backslash_start, skip_block_comment, skip_line_comment, - skip_whitespace, parse_name, parse_number, parse_string, - copy_comment, _cpp_lex_line, spell_char, spell_string, - spell_comment, spell_name, spell_other, _cpp_lex_file, - _cpp_output_list): new. - (expand_name_space): take length argument. - (init_token_list): add comment list initialisation. - (cpp_scan_line): use auto_expand_name_space. PREV_WHITESPACE - instead of HSPACE_BEFORE. - - * cpplib.c (_cpp_check_directive): new - * cpplib.h (cpp_name, PREV_WHITESPACE, PREV_COMMENT, - DIGRAPH, UNSIGNED_INT, TOK_NAME): new. - (HSPACE_BEFORE): delete. - (TTYPE_TABLE): rearrange. - (struct cpp_toklist): update. - -2000-04-24 Kaveh R. Ghazi - - * aclocal.m4 (gcc_AC_HEADER_STRING, gcc_AC_FUNC_PRINTF_PTR, - gcc_AC_C_VOLATILE, gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG): Use the three - argument form of AC_DEFINE. - - * configure.in (DEFAULT_LINKER, DEFAULT_ASSEMBLER, - HAVE_INTTYPES_H, PACKAGE, VERSION, ENABLE_WIN32_REGISTRY, - WIN32_REGISTRY_KEY, HAVE_GAS_SUBSECTION_ORDERING, HAVE_GAS_WEAK, - HAVE_GAS_HIDDEN, HAVE_AS_REGISTER_PSEUDO_OP, AS_SPARC64_FLAG, - HAVE_AS_OFFSETABLE_LO10, ENABLE_NEW_GXX_ABI): Likewise. - - * acconfig.h: Delete stubs made redundant by 3-arg AC_DEFINE. - -2000-04-24 Kaveh R. Ghazi - - * Makefile.in (GCC_FOR_TARGET, GCC_CFLAGS, LIBGCC2_INCLUDES, - deduced.h): Use -isystem, not -I, for including system headers. - -2000-04-24 Nick Clifton - - * config/fr30/fr30.md (addsi3): Do not use small add instruction if - the source register is the frame pointer or arg pointer. - (addsi3_small_int): Disallow if source register is the frame - pointer or arg pointer. - -2000-04-24 Kaveh R. Ghazi - - * configure.in (ENUM_BITFIELDS_ARE_UNSIGNED): Delete redundant - call to AC_MSG_RESULT. - -2000-04-24 Martin v. Löwis - - * invoke.texi: Correct grammatical errors, document - -fno-gnu-keywords as identical to -fno-asm for C++. - -2000-04-24 Kaveh R. Ghazi - - * aclocal.m4: (GCC_HEADER_STRING, GCC_NEED_DECLARATION, - GCC_NEED_DECLARATIONS, GCC_FUNC_VFPRINTF_DOPRNT, - GCC_FUNC_PRINTF_PTR, GCC_PROG_LN_S, GCC_PROG_LN, GCC_C_VOLATILE, - AC_GCC_C_LONG_DOUBLE, GCC_FUNC_MKDIR_TAKES_ONE_ARG, - EGCS_PROG_INSTALL): Rename autoconf macros with prefix gcc_AC_. - - * configure.in (AC_GCC_C_LONG_DOUBLE, GCC_PROG_LN, GCC_PROG_LN_S, - GCC_C_VOLATILE, EGCS_PROG_INSTALL, GCC_HEADER_STRING, - GCC_FUNC_VFPRINTF_DOPRNT, GCC_FUNC_PRINTF_PTR, - GCC_NEED_DECLARATIONS, GCC_FUNC_MKDIR_TAKES_ONE_ARG): Invoke with - new macros names. - -2000-04-24 Mumit Khan - - * c-pragma.c (push_alignment): Use BITS_PER_UNIT macro. - (pop_alignment): Likewise. - (handle_pragma_token): Likewise. - -2000-04-24 Robert Lipe - - * tree.h (tree_decl): Member `mode' now ENUM_BITFIELD. - -2000-04-24 Hiroyuki Machida - - * combine.c (try_combine): Update reg_nonzero_bits of - newi2pat before newpat. - -Mon Apr 24 10:19:48 MET DST 2000 Jan Hubicka - - * loop.c (strength_reduce): Simplify test to INSN_P. - (record_giv): Attempt to simplify the add value, use CONSTANT_P - expressions instead of CONST_INT. - (express_from_1): Likewise. - -2000-04-24 Mark Mitchell - - * regs.h (reg_n_max): Don't declare. - * flow.c (reg_n_max): Don't define. - * regclass.c (renumber): Don't initialize to zero. - (regno_allocated): Likewise. - (reg_n_max): Define. - (allocate_reg_info): Don't initialize unnecessarily. - -Mon Apr 24 00:21:36 2000 Jeffrey A Law (law@cygnus.com) - - * genattrtab.c (find_attr): Initialize unsigned_p, func_units_p - and blockage_p in the newly allocated attribute. - -Sun Apr 23 20:16:49 2000 Alexandre Oliva - - * config/mn10300/mn10300.md (addsi): `inc4' on address - registers does not modify cc, but `inc' on an extended - register does. - -Sun Apr 23 16:24:35 2000 Denis Chertykov - - * reload.c (find_equiv_reg): Checks all valueno regs - as a reload_reg_p regs. - -2000-04-23 Zack Weinberg - - * cpphash.c (collect_objlike_expansion): Add sanity check. - (special_symbol): Remove case T_CONST, T_XCONST, T_MCONST. If - the buffer is the empty string, return. Mark __DATE__ and - __TIME__ as XCONST nodes, not MCONST. - (_cpp_macroexpand): Avoid pushing an empty buffer. - (funlike_macroexpand): Don't pop token_buffer here. - -Sun Apr 23 18:37:53 2000 Alexandre Oliva - - * config/mn10300/mn10300.h (REGNO_IN_RANGE_P): New macro. - (REGNO_DATA_P, REGNO_ADDRESS_P, REGNO_SP_P): New macros. - (REGNO_EXTENDED_P, REGNO_AM33_P): New macros. - (REGNO_OK_FOR_BASE_P): Define in terms of them. - (REGNO_OK_FOR_BIT_BASE_P, REGNO_OK_FOR_INDEX_P): Likewise. - (REG_OK_FOR_BASE_P): Define in terms of the REGNO macro. - (REG_OK_FOR_BIT_BASE_P, REG_OK_FOR_INDEX_P): Likewise. - -Sun Apr 23 22:23:08 MET DST 2000 Jan Hubicka - - * loop.c (simplify_giv_expr): Be more agressive on simplifying - constant MULT givs. - -2000-04-23 Zack Weinberg - - * cpphash.h (struct definition): Move file, line, col members... - (struct hashnode): ... here. Also add 'disabled' flag. - (enum node_type): Add T_VOID, T_XCONST, T_FMACRO, and - T_IDENTITY. Remove T_DISABLED. - Update prototypes. - - * cpphash.c (_cpp_dump_definition): Split out dump_DEFINITION. - (collect_expansion): Split into collect_objlike_expansion and - collect_funlike_expansion. - (_cpp_macroexpand): Split out scan_arguments, stringify, and - funlike_macroexpand. - (_cpp_compare_defs): Rename compare_defs, make static. - (_cpp_make_hashnode): Initialize hp->disabled. - (macro_cleanup): Adjust for new token types. Clear - m->disabled. - (_cpp_create_definition): Move code here to determine what - sort of macro it is, and code to check for redefinitions, from - do_define. Implement a few simple cases without creating a - full DEFINITION. - (_cpp_macroexpand, special_symbol, _cpp_dump_definition): - Handle the simple cases. - (push_macro_expansion): Set buf->has_escapes and hp->disabled - here. - - * cppinit.c (builtin_array): Change MCONST to XCONST - everywhere. - * cpplex.c (maybe_macroexpand): Handle IDENTITY macros here; - fix check for disabled and function-like macros. - * cpplib.c (do_define): Move most logic to - _cpp_create_definition. - (do_undef): Handle new special token types. - -Sun Apr 23 14:27:44 MET DST 2000 Jan Hubicka - - * loop.c (maybe_eliminate_biv_1): Use GET_CODE (x) == CONST_INT instead - of CONSTANT_P for mult_val; always use validate_change to update insn. - -2000-04-22 Zack Weinberg - - * cpphash.c (trad_stringify, add_pat): New functions. - (collect_expansion): Restore support for -traditional syntax. - Use trad_stringify and add_pat. - (_cpp_macroexpand): Restore support for -traditional semantics. - * cpplex.c (_cpp_scan_line): Don't change space_before if we - get a COMMENT token. - (_cpp_lex_token): Provide COMMENT tokens to caller if - traditional and parsing_define_directive. - (skip_comment): Warn about // comments if -Wtraditional. - * cpplib.c (do_define): Fix typo. Create EMPTY nodes with - proper node type. - (do_undef): Don't warn about undefining EMPTY nodes. - -Sat Apr 22 22:35:38 MET DST 2000 Jan Hubicka - - * loop.c (strength_reduce): Fix biv removal code. - -2000-04-22 Richard Henderson - - * predict.c (estimate_probability): Examine both sides of - a branch for no exits. Use 90% not 50% for predict taken. - Reorg for one copy of note generation code. - -2000-04-22 Richard Henderson - - * flow.c (mark_used_reg): Hack around rs6000 eliminable pic reg. - -2000-04-22 Richard Henderson - - * diagnostic.c (init_output_buffer): Don't initialize format_args. - (output_clear): Likewise. - (output_printf): Use va_copy. - (vline_wrapper_message_with_location): Likewise. - (v_message_with_decl): Likewise. - (line_wrapper_printf): VA_START infor buffer.format_args directly. - * system.h (va_copy): Provide default implementation. - -2000-04-22 Richard Henderson - - * predict.c (expected_value_to_br_prob): Don't bomb if op1 of - the collected condition is not a constant. - -2000-04-22 Gabriel Dos Reis - - * diagnostic.h: New file. - - * Makefile.in (diagnostic.o): Depends on diagnostic.h - - * diagnostic.c: Tweak. Rationalize the output logic. Adjust - various function prototypes. - (diagnostic.h): #include. - (struct output_buffer): Move into diagnostic.h. - (get_output_prefix): Rename to output_get_prefix. Export. - (init_output_buffer): Export. Break out. Adjust initialization. - (output_space_left, output_append): Export. - (output_newline): Rename to output_add_newline. Export. - (output_clear): Nullify additional output_buffer fields. - (output_puts): Rename to output_add_string. Export. - (dump_output): Rename to output_flush_on. Export. - (build_location_prefix): Constify return-type. - (emit_output_prefix): Rename to output_emit_prefix. Export. - (set_real_maximum_length): New function. - (output_set_maximum_length): Ditto - (output_clear): Ditto. - (output_add_character): Ditto. - (output_add_integer): Ditto. - (output_add_space): Ditto. - (output_format): Ditto. - (output_printf): Adjust buffer initialization. - (vline_wrapper_message_with_location): Ditto. - (v_message_with_decl): Ditto. Adjust call to output_puts - and get_output_prefix. - (default_print_error_function): Adjust buffer initialization. - -Sat Apr 22 06:45:04 2000 Richard Kenner - - * expr.c (preexpand_calls, case CALL_EXPR): Don't look at TYPE_SIZE - of VOID_TYPE. - -Fri Apr 21 18:33:09 2000 Alexandre Oliva - - * config/mn10300/mn10300.h (REGNO_REG_CLASS): Use NO_REGS instead - of explicit 0. - -Fri Apr 21 18:30:00 2000 Alexandre Oliva - - * config/mn10300/mn10300.h (REGISTER_MOVE_COST): Provide more - accurate data about SP moves. - -Fri Apr 21 18:28:28 2000 Alexandre Oliva - - * config/mn10300/mn10300.h (ADDITIONAL_REGISTER_NAMES): Added - aliases to AM33 registers. - -Fri Apr 21 18:26:17 2000 Alexandre Oliva - - * config/mn10300/mn10300.h (REG_CLASS_CONTENTS): Added register 16 - to all EXTENDED bitmaps. - -Fri Apr 21 18:17:12 2000 Alexandre Oliva - - * config/mn10300/mn10300-protos.h (mn10300_address_cost): Declare. - * config/mn10300/mn10300.h (ADDRESS_COST): New macro. - * config/mn10300/mn10300.c (mn10300_address_cost): New function. - -Fri Apr 21 18:11:56 2000 Alexandre Oliva - - * config/mn10300/mn10300.md (movdi, movdf): Do not use `movu' when - the operand is not constant. - -Fri Apr 21 14:58:29 2000 Denis Chertykov - - * reload.c (find_equiv_reg): Checks all valueno and regno regs - as a call-clobbered regs. - -Fri Apr 21 13:30:26 2000 Richard Kenner - - * rtl.c: Use NOTE_INSN_REPEATED_LINE_NUMBER and NOTE_INSN_RANGE_BEG. - * rtl.h: Likewise. - * rtl.def: Update comment. - * function.c (expand_function): Use NOTE_INSN_REPEATED_LINE_NUMBER. - * integrate.c (expand_inline_function): Likewise. - * profile.c (branch_prob): Likewise. - * ggc-common.c (ggc_mark_rtx_children): Use NOTE_INSN_RANGE_BEG. - * print-rtl.c (print_rtx): Likewise. - * haifa-sched.c (sched_analyze, unlink_other_notes): Likewise. - (reemit_notes): Likewise; also use enum insn_note. - - * stor-layout.c (layout_decl): Only set DECL_MODE if not already set. - (place_field): Properly compute know and actual alignment. - - * gengenrtl.c (gencode): Write obstack_alloc_rtx function start - in proper format. - - * cse.c (cse_insn): In (set REG0 REG1) case, remove a REG_EQUAL - note for REG1. - -2000-04-21 Zack Weinberg - - * cpphash.c (struct arg, struct arglist): Const-ify strings. - (warn_trad_stringify, duplicate_arg_p): New helper functions. - (collect_expansion): Rewrite to scan over a token list. - Remove -traditional support. - (collect_formal_parameters): Rename to collect_params; rewrite - to scan over a token list. - (_cpp_create_definition): Adjust to scan a token list. - (_cpp_macroexpand): Remove -traditional support. - (_cpp_compare_defs): Whitespace is now canonicalized. - (comp_def_part): Delete function. - - * cpphash.h: Update prototypes. - * cpplex.c (init_token_list): Don't set lineno if there is no - buffer. - (pedantic_whitespace): New function. - (_cpp_scan_line): Mark tokens that had hspace before. Don't - consume a newline. Use pedantic_whitespace. - (_cpp_lex_token): Remove support for -traditional macros. - (_cpp_get_define_token): Delete. - (_cpp_get_directive_token): Do the real work here. Use - pedantic_whitespace. - (_cpp_init_input_buffer): Initialize pfile->directbuf. - - * cpplib.c (get_macro_name): Delete. - (do_define): Read the entire line into pfile->directbuf, then - feed the token list to _cpp_create_definition. - * cpplib.h (HSPACE_BEFORE): new define. - (struct cpp_reader): Add a toklist member, "directbuf". - - * predict.c (estimate_probability): New heuristic: if a jump - branches around a block with no successors, predict it taken. - Disentangle control flow. - -2000-04-20 Richard Henderson - - * loop.c (emit_iv_add_mult): Revert last change. - -2000-04-20 Zack Weinberg - - * cpplib.h (enum cpp_ttype): Add token types for all - punctuators. Distinguish pp-numbers from valid C numbers. - Give some tokens better names. Initialize from macro. - (struct cpp_name, cpp_token, cpp_toklist): New data - structures. - Update prototypes. - * cpplex.c (bump_column, expand_name_space, - expand_token_space, init_token_list, cpp_output_list, - _cpp_scan_line): New functions. - (output_line_command): Add third argument, new line number. - * cpphash.h: Update prototypes. - * cppexp.c, cpphash.c, cpplib.c, scan-decls.c: Update for new - token names. - -2000-04-20 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_floatuns): Emit missing barrier. - -2000-04-20 Zack Weinberg - - * c-common.c (decl_attributes) [A_ALIAS]: Set TREE_USED on the - object pointed to. - -Thu Apr 20 14:19:18 MET DST 2000 Jan Hubicka - - * loop.c (emit_iv_add_mult): Simplify it's input and emit - REG_EQUAL note explaining the calculated value. - - * calls.c (expand_call): Avoid unnecesary precalculation - and outgoing parameters space guarding for sibling calls. - (store_one_arg): Likewise. - -Thu Apr 20 08:01:07 2000 Richard Kenner - - * toplev.c (enum dump_file_index, dump_file): Add DFI_sibling. - (rest_of_compilation): Write sibling dump file and account - for time as jump time. - * invoke.texi: Update documentation on dump flags. - -2000-04-19 Marek Michalkiewicz - - * avr.c: #include "system.h" instead of and . - -2000-04-19 Zack Weinberg - - * cpphash.c (special_symbol): Represent an empty macro with - "\r \r " not just "\r ". - (_cpp_macroexpand): Correct condition for the foo ( ) special - case. - (unsafe_chars): Handle EOF as second argument. - (push_macro_expansion): Simplify test for removing escape at - end. Do not trim both escapes if there is no text in between. - -2000-04-19 Jim Blandy - - * dwarf2out.c (DWARF2_ADDR_SIZE): New macro. Use it instead - of PTR_SIZE, when appropriate. - -2000-04-19 Mark Mitchell - - * system.h (ONLY_INT_FIELDS): Make sure it is defined. - (USE_ENUM_BITFIELDS): Fix typo. - -Wed Apr 19 12:14:55 2000 Richard Kenner - - * stor-layout.c (place_field): Set rli->offset_align properly. - -2000-04-19 Kaveh R. Ghazi - - * mips.h (BITS_PER_WORD, UNITS_PER_WORD, UNITS_PER_FPREG, - INT_TYPE_SIZE, LONG_TYPE_SIZE, POINTER_SIZE, POINTER_BOUNDARY, - PARM_BOUNDARY): Remove unnecessary casts. - -Wed Apr 19 12:02:37 MET DST 2000 Jan Hubicka - - * calls.c (precompute_arguments): Remove must_preallocate and - args_size calls. - (expand_call): Update call of precompute_arguments. - - * loop.c (check_insn_for_bivs, for_every_insn_in_loop, - check_insn_for_givs): Break out from ... - (strength_reduce) ... here; use for_every_insn_in_loop to call - check_insn_for_givs. - * loop.h (for_every_insn_in_loop): Declare. - (loop_insn_callback): New type. - -2000-04-18 Zack Weinberg - - * cpplib.c (do_pragma_poison): Strings in the token buffer are - not nul-terminated. - -Tue Apr 18 16:04:12 2000 Jim Wilson - - * config/ia64/sysv4.h (SELECT_SECTION): Use data_section if - flag_pic and RELOC. - -2000-04-18 Zack Weinberg - - * cccp.c, cexp.y, cexp.c, cccp.1: Removed. - - * configure.in: Delete --disable-cpplib option and all - references to cpp_main. - * configure: Regenerate. - * Makefile.in: Remove all references to CCCP, CCCP_OBJS, - @cpp_main@, cccp.c, cexp.c, cexp.y, cexp.output, cexp.o, - cccp.o, cccp, or cppmain. Link cppmain.o straight to - cpp$(exeext). Add --no-headers to makeinfo command line when - generating INSTALL. Install and uninstall cpp.1 manpage, not - cccp.1. - * install.texi: Delete all references to cexp.y/cexp.c. - Delete ancient instructions for compiling GCC on 3b1. - * INSTALL: Regenerate. - - * cppfiles.c, cpplib.h, jump.c, protoize.c, c-lex.c, mips/t-ecoff, - mips/t-elf, mips/t-r3900: Remove references to cccp.c. - * convex.h, fx80.h, m68k.h, pdp11.h: Remove references to - cexp.c/cexp.y. - * xm-linux.h, xm-os2.h, romp.h: Remove definition of BSTRING, - which is no longer tested anywhere. - - * cppinit.c (handle_option): Don't run error message through - gettext twice. - -Tue Apr 18 14:16:47 2000 Richard Kenner - - * conflict.c (conflict_graph_add): Pass enum type to htab_find_slot. - * cpperror.c (hashtab.h): Now include. - * cppexp.c (hashtab.h): Likewise. - * cpplex.c (hashtab.h): Likewise. - * cppfiles.c (hashtab.h): Likewise. - (find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type - to htab_find_slot_with_hash. - * cpphash.c (hashtab.h): Now include. - (_cpp_lookup_slot): INSERT is now enum insert_option. - * cpphash.h (_cpp_lookup_slot): Likewise. - * cppinit.c (hashtab.h): Include earlier. - (initialize_builtins): Pass enum to htab_find_slot. - * cpplib.c (hashtab.h): Now include. - (do_define, do_undef): Pass enum type to _cpp_lookup_slot. - (do_pragma_poison, do_assert): Likewise. - * emit-rtl.c (gen_rtx_CONST_INT): Pass enum to - htab_find_slot_with_hash. - * simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise. - * tree.c (type_hash_add): Likewise. - (build1): Minor cleanup. - - * ggc-common.c: Add missing blanks. - * print-tree.c (print_node): Print DECL_OFFSET_ALIGN. - * tree.h (DECL_OFFSET_ALIGN): Fix typo in comment. - - * stmt.c (mark_case_node): New function. - (mark_case_nesting): Call it. - - * expmed.c (emit_store_flag): If comparing two-word integer - with zero, can optimize NE, EQ, GE, and LT. - - * c-decl.c (mark_binding_level): Use 'for' instead of `while'. - * conflict.c: Minor cleanups. - * optabs.c: Add blank line - * simplify-rtx.c: Minor cleanups. - -2000-04-18 Stan Cox - - * gengenrtl.c (genlegend): Fix misspelling. - -2000-04-18 Robert Lipe - - * configure.in (ENUM_BITFIELDS_ARE_UNSIGNED): Added. Check that - bitfields of the host compiler are not signed quantities. - * config.in: Regenerate. - * configure: Regenerate. - * system.h (USE_ENUM_BITFIELDS): Added. - (ENUM_BITFIELDS): Added. - * rtl.h (rtx_def): Members `code', `mode', now ENUM_BITFIELD. - (SHORT_ENUM_BUG): Deleted. - * tree.h (tree_common): Members `code', `mode', `built_in_class', - now ENUM_BITFIELD. - * config/i386/xm-sco.h (ONLY_INT_FIELDS): Deleted. - (CODE_FIELD_BUG): Likewise. - * config/m68k/x-apollo68 (CC): Deleted SHORT_ENUM_BUG. - (OLD_CC): Likewise. - * config/m68k/x-ccur (X_CFLAGS): Likewise. - -2000-04-18 Mark Mitchell - - * cpplex.c (_cpp_lex_token): Don't call CPP_BUMP_LINE when the - mark is active. - -2000-04-17 Zack Weinberg - - * cppexp.c (lex): Don't assume tokens are NUL terminated. - * cpplib.c (do_include, do_import, do_include_next, - read_line_number, detect_if_not_defined): Likewise. - * cpphash.c (collect_expansion): Likewise. - (special_symbol, _cpp_macroexpand): Check return from - cpp_file_buffer. - * cpphash.h (CPP_NUL_TERMINATE, CPP_NUL_TERMINATE_Q): Delete - macros. Delete all uses. - - * gcc.dg/cpp-mi.c: Add two more test cases. - * gcc.dg/cpp-mind.h, gcc.dg/cpp-mindp.h: New files. - -2000-04-17 Richard Henderson - - * bb-reorder.c (fixup_reorder_chain): Don't look up new block again. - (reorder_basic_blocks): If no epilogue in rtl, force last block last. - -2000-04-17 Mark Mitchell - - * function.c (expand_function_start): Use hard_function_value to - compute the RTL to use for DECL_RESULT. - -Mon Apr 17 23:35:29 MET DST 2000 Jan Hubicka - - * i386.c (athlon_cost): Fix lea, divide and XFmode move costs. - (x86_integer_DFmode_moves, x86_partial_reg_dependency, - x86_memory_mismatch_stall): New global variables. - (ix86_adjust_cost): Handle MEMORY_BOTH on places MEMORY_STORE was only - alloved; fix load penalties for Athlon. - * i386.h (x86_integer_DFmode_moves, x86_partial_reg_dependency, - x86_memory_mismatch_stall): Declare. - (TARGET_INTEGER_DFMODE_MOVES, TARGET_PARTIAL_REG_DEPENDENCY, - TARGET_MEMORY_MISMATCH_STALL): New. - * i386.md (athlon scheduling parameters): Fix latencies according to - Athlon Optimization Manual. - (sahf, xchg, fldcw, leave instruction patterns): Set athlon_decode to - vector. - (fsqrt instruction patterns): Set athlon_decode to direct. - (movhi_1): Promote for TARGET_PARTIAL_REG_DEPENDENCY and for - PARTIAL_REGISTER_STALL with !TARGET_HIMODE_MATH machines. - (movqi_1): Handle promoting correctly for TARGET_PARTIAL_REG_DEPENDENCY - and TARGET_PARTIAL_REGISTER_STALL machines. - (pushdf_nointeger): New pattern. - (pushdf_integer): Rename from pushdf. - (movdf_nointger): Enable for !TARGET_INTEGER_DFMODE_MOVES machines. - (movdf_intger): Disable for !TARGET_INTEGER_DFMODE_MOVES machines. - -2000-04-17 Richard Henderson - - * loop.c (canonicalize_condition): Add WANT_REG argument. - Stop the search if we match it. - * expr.h (canonicalize_condition): Update decl. - * predict.c (expected_value_to_br_prob): Use it. Track last - expected value note. - (find_expected_value): Remove. - - * reorg.c (mostly_true_jump): Always use BR_PROB if present. - -2000-04-17 Zack Weinberg - - * aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE([AC_FUNC_MMAP]). - (AC_FUNC_MMAP_FILE): New macro, tests read-only private map of - a plain file. - * configure.in: Call AC_FUNC_MMAP_FILE. - * configure: Regenerate. - * config.in: Regenerate. - - * intl/loadmsgcat.c: Test HAVE_MMAP_FILE not HAVE_MMAP. - * fixinc/fixincl.c: Likewise. - -2000-04-17 Richard Henderson - - * builtins.c (expand_builtin_expect): New. - (expand_builtin): Call it. - * builtins.def (BUILT_IN_EXPECT): New. - * c-common.c (c_common_nodes_and_builtins): Declare __builtin_expect. - * extend.texi: Document it. - - * predict.c (expected_value_to_br_prob): New. - (find_expected_value): New. - * basic-block.h (expected_value_to_br_prob): Declare. - * toplev.c (rest_of_compilation): Invoke it. - - * rtl.h (NOTE_EXPECTED_VALUE): New. - (NOTE_INSN_EXPECTED_VALUE): New. - * rtl.c (note_insn_name): Update. - * print-rtl.c (print_rtx): Reorg NOTE_LINE_NUMBER special - cases; handle NOTE_INSN_EXPECTED_VALUE. - -2000-04-17 Jakub Jelinek - - * config/sparc/sparc.c (eligible_for_sibcall_delay): Cannot use - leaf sibcall delay slot if flag_pic. - (output_sibcall): Always emit call for leaf sibcall if flag_pic. - -2000-04-17 Kaveh R. Ghazi - - * Makefile.in (stmp-fixproto): Acknowledge errors in fixproto. - - * fixproto: If fix-header fails, exit with an error. - -Mon Apr 17 14:59:36 MET DST 2000 Jan Hubicka - - * cse.c (struct check_dependence_data): New. - (check_dependence): New function. - (invalidate): Use check_depdenence. - -2000-04-16 Mark Mitchell - - * dwarf2out.c (DWARF_CIE_DATA_ALIGNMENT): Adjust, now that - UNITS_PER_WORD is unsigned. - - * tree.h (struct tree_common): Remove misleading comment. - -2000-04-16 Dave Pitts - - * Makefile.in ($(srcdir)/c-parse.y: c-parse.in): Enclose the whole - message in quotes. Otherwise, IBM's make program treats the '#' as the - start of a comment and ignores the remainder of the line. - - * c-lex.c (yylex): Change for EBCDIC, lower case characters precede - upper case. - * cccp.c (initialize_char_syntax): Allow for holes in EBCDIC. - * cexp.y (initialize_random_junk): Likewise. - * cppfiles.c (find_include_file): Cast alloca return value. - * cppinit.c (initialize_standard_includes): Likewise. - * cpplib.c (cpp_define, cpp_undef): Likewise. - * defaults.h (ASM_OUTPUT_ASCII): Use ISPRINT. - * final.c (output_asm_insn): Allow for holes in EBCDIC. - * fold-const.c (CHARMASK): New. - (real_hex_to_f): Use it. - * real.c (CHARMASK): New. - (etoasc, asctoeg): Use it. - (asctoeg): EBCDIC lower case characters precede upper case. - - * i370.c (mvs_add_label): Change spacing for coding conventions. - * i370.h (ASM_OUTPUT_CASE_LABEL): Change to the data CSECT for the - outputting case vectors. - (ASM_OUTPUT_CASE_END): New, put assembler back into code CSECT. - (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Remove page check, - since vector in in the data CSECT. - (ASM_OUTPUT_REG_POP, ASM_OUTPUT_REG_PUSH): Restore to correct operation. - * i370.md (Many patterns): Put the length in the XL directives. - (movdi): Put back STM and MVC in definition. - (floatsidf2): Correct TARGET_ELF_ABI pattern and add back the LE370 - pattern using the TCA. - * oe.h (CPP_SPEC): Added to allow trigraphs. - * xm-oe.h (HOST_BITS_PER_LONGLONG): Change to 32. IBM's compiler does - not support the "long long" type. - -2000-04-16 Mark Mitchell - - * config/mips/mips-protos.h (mips_legitimate_address_p): New - function. - (mips_reg_mode_ok_for_base_p): Likewise. - * config/mips/mips.h (REG_OK_STRICT_P): Don't define. - (REG_OK_FOR_INDEX_P): Define unconditionally. - (REG_MODE_OK_FOR_BASE_P): Use mips_reg_mode_ok_for_base_p. - (GO_IF_LEGITIMATE_ADDRESS): Use mips_legitimate_address_p. - * config/mips/mips.c (mips16_simple_memory_operand): Adjust now - that GET_MODE_SIZE is unsigned. - (mips_reg_mode_ok_for_base_p): Define. - (mips_legitimate_address_p): Likewise. Adjust now - that GET_MODE_SIZE is unsigned. - (block_move_loop): Make the number of bytes unsigned. - (expand_block_move): Likewise. - (function_arg): Make the loop counter unsigned to match the - boundary condition. - -2000-04-16 Richard Henderson - - * rtl.h (enum insn_note): New enumeration. Subsume - NOTE_INSN_DELETED and friends. - (GET_NOTE_INSN_NAME): Adjust index by NOTE_INSN_BIAS. - * rtl.c (note_insn_name): Tweak string order. - -2000-04-15 Zack Weinberg - - * cpplex.c (_cpp_read_and_prescan): Enlarge len by setting it - to offset * 2. - - * cpplex.c (output_line_command): Remove debugging prints. - (cpp_output_tokens): Don't write out a zero-length buffer or - try to see if it has a newline in it. - (_cpp_expand_to_buffer): Copy the source buffer before pushing. - (_cpp_read_and_prescan): Move shift-down of pushback bytes to - the end of the loop. Use memmove. Don't read past the end of - the buffer. Remove trailing newlines from error messages. - -2004-04-16 Neil Booth - - * cpphash.h (SYNTAX_INCLUDE, SYNTAX_ASSERT, directive_handler): new. - * cpplib.c: Add new syntax flags to directive table, and - supporting macros. - -2000-04-15 Ulrich Drepper - - * i386.c (ix86_expand_epilogue): Yes, the x86 can pop 64k at once - using ret $N. - -2000-04-15 David Edelsohn - - * toplev.c (display_help): Prefix "f" to "sched-verbose=". - * haifa-sched.c: Update -fsched-verbose comments to use "=". - -Sat Apr 15 10:59:19 2000 Richard Kenner - - * Makefile.in (ggc-page.o): Now includes toplev.h. - * ggc-page.c (toplev.h): Now included. - (gc_time): Remove declaration. - (ggc_collect): TIME now long. - * toplev.c (parse_time, varasm_time, gc_time): Still global; all - others static. - * toplev.h (gc_time, parse_time, gc_time): New declarations. - - * toplev.c: Make *_time variable long to reduce chance of overflow. - (TIMEVAR): Likewise for `otime'. - (print_time): Arg is now long; compute percentage in FP and round. - * toplev.h (print_time): Arg is long. - - * tree.c: Minor whitespace changes. - - * configure.in (alpha*-*-*): Add config/alpha/t-alpha. - * configure: Rebuilt. - * libgcc2.c (__fixunstfDI): Renamed from __fixunstfdi. - (__fixunsxfDI): Renamed from __fixunsxfdi. - (__fixunsdfDI): Renamed from __fixunsdfdi. - (__fixunssfDI): Renamed from __fixunssfdi. - (__floatdisf): Use proper type in REP_BIT macro. - (__fixunsxfSI): Renamed from __fixunsxfsi. - (__fixunsdfSI): Renamed from __fixunsdfsi. - (__fixunssfSI): Renamed from __fixunssfsi. - * libgcc2.h: Add cases for MIN_UNITS_PER_WORD > 4. - Change location of macros and upper-case some names as above. - * longlong.h ([alpha]): Use PARAMS, not __P in decl of __udiv__qrnnd. - * config/alpha/t-alpha, config/alpha/qrnnd.asm: New files. - - * varasm.c (assemble_variable): Add cast to remove warning. - (immed_real_const_1): Only use CONST[01]_RTX if not in nested function. - - * flow.c (count_basic_blocks, find_basic_blocks_1): Remove last change. - * optabs.c (emit_libcall_block): If have REG_EH_REGION, update - region number to -1. - -2000-04-15 Richard Earnshaw (rearnsah@arm.com) - - * emit-rtl.c (unshare_all_rtl_again): Unmark everything, then - call unshare_all_rtl. - - * arm.md (movhi): REGNO_POINTER_ALIGN is now bits. - -Fri Apr 14 16:58:45 2000 Jim Wilson - - * config/ia64/lib1funcs.asm (__divdi3, __moddi3, __udivdi3, __umoddi3): - Use .s1 not .s0 for all FP instructions. - -2000-04-14 Zack Weinberg - - * cpplex.c (cpp_output_tokens, cpp_scan_buffer_nooutput): New public - interfaces. - (safe_fwrite, output_line_command): New static functions. - (cpp_expand_to_buffer): Now private to cpplib. - (cpp_scan_buffer): Take a printer. - - * cpphash.h: Update prototypes. - * cpplib.h: Update prototypes. - (cpp_printer): New. - (cpp_buffer): Remove last_nominal_fname. - (cpp_reader): Remove lineno. - - * cppmain.c: Use a cpp_printer. - * fix-header.c: No need to inhibit line commands. Call - cpp_start_read with no printer. - - * cpperror.c (cpp_notice_from_errno): Provide default name. - * cppfiles.c (make_IHASH, _cpp_fake_ihash): New functions. - (find_include_file, cpp_read_file): Use make_IHASH. - (file_cleanup): Set control_macro and clear - input_stack_listing_current here. - (_cpp_execute_include): Don't output entering-file marker. - * cpphash.c (special_symbol): Look for the line number in the - buffer, not the reader. - (_cpp_macroexpand): No need to disable line commands. - (_cpp_dump_definition): No need to generate line commands. - (dump_hash_helper): Remove excess newline from output. - * cppinit.c (dump_special_to_buffer): No need to generate line - commands. - (cpp_printer_init): New. - (cpp_start_read): Take a printer, and start it up if it's not - NULL. No need to generate line commands. - (cpp_finish): Expect no buffers stacked at all. Take a - printer argument, and flush the output buffer if it's not - NULL. - * cpplex.c (_cpp_lex_token): Return EOF if there's no buffer. - Don't put two hashes at the beginning of an assertion. - (cpp_get_token): Don't increment pfile->lineno or emit line - commands here. Return EOF if there's no buffer when we get - EOF. - * cpplib.c (do_define, skip_if_group): - No need to disable line commands. - (_cpp_output_line_command): Delete function. - (do_line): Don't emit line commands here, but set things up so - they will be emitted if necessary. Use _cpp_fake_ihash to - make unique nominal_fnames if necessary. - (do_elif, do_else, _cpp_handle_eof): Call cpp_error_with_line - with 0 for column, not -1. - (_cpp_handle_eof): Don't set the control macro here. Don't - clear input_stack_listing_current here. Don't emit line - commands. - -2000-04-14 Geoff Keating - - * config/rs6000/sysv4.h (LINK_START_SOLARIS_SPEC): Define to empty - always, use the default SVR4 start address. - - * config/rs6000/linux.h (LINK_SPEC): Don't define. - (LINK_SHLIB_SPEC): Define. - (LINK_START_DEFAULT_SPEC): Define. - (LINK_OS_DEFAULT_SPEC): Define. - - * config/rs6000/sysv4.h (ENDFILE_SPEC): Use the %(endfile_*) macros. - - * config/rs6000/eabi.asm (__eabi): Call __init rather than - __do_global_ctors to handle constructors. - * config/rs6000/sysv4.h (STARTFILE_ADS_SPEC): Use crtbegin. - (STARTFILE_YELLOWKNIFE_SPEC): Likewise. - (STARTFILE_MVME_SPEC): Likewise. - (STARTFILE_SIM_SPEC): Likewise. - (ENDFILE_ADS_SPEC): Use crtend. - (ENDFILE_YELLOWKNIFE_SPEC): Likewise. - (ENDFILE_MVME_SPEC): Likewise. - (ENDFILE_SIM_SPEC): Likewise. - (STARTFILE_SOLARIS_SPEC): Use crtbegin/crtbeginS. - (ENDFILE_SOLARIS_SPEC): Use crtend/crtendS. - (STARTFILE_LINUX_SPEC): Use crtbeginS for shared objects. - (ENDFILE_LINUX_SPEC): Use crtendS for shared objects. - * config/rs6000/t-ppccomm (LIB2FUNCS_EXTRA): Don't build eabi-ctors.o. - (EXTRA_MULTILIB_PARTS): Build crtbeginS/crtendS. - (CRTSTUFF_T_CFLAGS_S): Define. - * config/rs6000/eabi-ctors.c: Delete. - - * config/rs6000/eabi-ci.asm (__init): Align stack to 16-byte - boundary. - (__fini): Likewise. - * config/rs6000/eabi-cn.asm (__init): Allow for 16-byte stack frame. - boundary. - (__fini): Likewise. - -Fri Apr 14 16:09:02 2000 Jim Wilson - - * combine.c (force_to_mode, case LSHIFTRT): Check that shift shift - plus mask size is smaller or equal to the mode size. - -Fri Apr 14 18:07:30 2000 Richard Kenner - - * print-rtl.c (print_rtx, case NOTE): Don't blow up if NOTE_BASIC_BLOCK - not yet set. - - * expr.c (reload.h): Now included. - (emit_block_move): Set volatile_ok when checking for movstr. - (emit_move_1): Check for replacements in addresses in multi-word case. - * Makefile.in (expr.o): Now includes reload.h. - - * flow.c (count_basic_blocks): Remove unused var PREV_CALL. - Never have a LIBCALL end a basic block. - (find_basic_blocks_1): Likewise. - Reorganize CALL_INSN cases. - - * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP): Revert last change. - -Fri Apr 14 10:54:22 2000 Jim Wilson - - * config/ia64/lib1funcs.asm (__ia64_nonlocal_goto): Drop obsolete - completers from mov.ret instruction. - -2000-04-14 Richard Henderson - - * fold-const.c (extract_muldiv): Don't distribute and widen - multiply across plus for non-sizetype unsigned types. - -2000-04-14 Richard Henderson - - * flow.c (find_auto_inc): Don't autoinc eliminable registers. - If the original source is dead in the incr insn, it's dead now. - -Fri Apr 14 07:40:32 2000 Richard Kenner - - * stor-layout.c (layout_decl): Properly compare KNOWN_ALIGN to - see if DECL_BIT_FIELD needs to still be set. - - * tree.h (struct tree_type): Make PRECISION 9 bits and MODE 7. - - * dbxout.c (dbxout_type, case INTEGER_TYPE): Don't call - print_int_cst_octal with something that's not an INTEGER_CST. - - * config/alpha/alpha.c (alpha_emit_floatuns): Ensure we pass a REG - and not a SUBREG to a FLOAT rtl. - -Thu Apr 13 19:39:56 2000 Clinton Popetz - - * emit-rtl.c (try_split): Avoid infinite loop if the split - results in a sequence that contains the original insn. - -2000-04-13 Andreas Jaeger - - * config/mips/mips.c (expand_block_move): Pass alignment - argument to move_by_pieces in bits, not bytes. - - * config/mips/linux.h (CPP_PREDEFINES): Also define __PIC__ and - __pic__ for little endian. - -2000-04-13 Andreas Jaeger - - * config/i386/i386-protos.h: Add prototype for - uno_comparison_operator. - -Thu Apr 13 15:55:08 MET DST 2000 Jan Hubicka - - * alias.c (nonlocal_reference_p): Take care of CALL_INSNS's fusage. - * calls.c (ECF_PURE): New flag. - (emit_call_1): Handle ECF_PURE calls. - (initialize_argument_information): Unset ECF_PURE flag too. - (precompute_arguments): Precompute for ECF_PURE too. - (expand_call): Handle ECF_PURE calls too. - (emit_library_call_value_1): Rename no_queue argument to fn_type, - accept value of 2 as pure function. - (emit_library_call_value, emit_library_call): Rename no_queue argument - to fn_type. - * optabs.c (prepare_cmp_insn): Pass fn_type 2 to memcmp call. - - * tree.h (DECL_IS_PURE): New macro. - (struct tree_decl): Add pure_flag. - * c-common.c (enum attrs): Add attribute "pure". - (init_attributes): Initialize attribute "pure" - (decl_attributes): Handle attribute "pure". - * extend.texi (Attribute "pure"): Document. - * calls.c (expand_call): Add (mem:BLK (scratch)) to "equal from" - in pure function. - (flags_from_decl_or_type): Support attribute "pure". - -2000-04-13 Jason Merrill - - * cpplex.c (_cpp_lex_token): Handle digraphs. Don't null-terminate - the token except for numbers and identifiers. - -Thu Apr 13 00:09:16 EDT 2000 John Wehle (john@feith.com) - - * i386.c (ix86_expand_binary_operator, - ix86_expand_unary_operator): Check no_new_pseudos - instead of reload_in_progress and reload_completed. - (ix86_split_ashldi, ix86_split_ashrdi, - ix86_split_lshrdi): Check no_new_pseudos instead - of reload_completed. - -2000-04-12 Jeffrey A Law (law@cygnus.com) - - * function.c (purge_addressof): Unshare any shared rtl created by - purge_addressof and its children. - -2000-04-12 Mark Mitchell - - * function.c (aggregate_value_p): VOID_TYPE nodes are never - aggregates. - -2000-04-05 Andreas Jaeger - - * config/mips/linux.h (SUBTARGET_ASM_SPEC): Use proper flags if - not compiling PIC code, add flags for mabi=64. - (SUBTARGET_CPP_SIZE_SPEC): New. - (SUBTARGET_CPP_SPEC): New. - (CPP_PREDEFINES): Define __PIC__ and __pic__. PIC code is default - for MIPS/Linux and lots of code needs these defines. - -Wed Apr 12 22:44:11 2000 Hans-Peter Nilsson - - * reorg.c (fill_slots_from_thread): Check side_effects_p when - trying the "opposite arithmetic" approach. - -Wed Apr 12 20:51:20 2000 J"orn Rennecke - - * sh.h (STRUCT_VALUE): Just 0 for TARGET_HITACHI. - (struct sh_args): Add new field force_mem. - (INIT_CUMULATIVE_ARGS): Initialize it. - (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Act on it. - -Wed Apr 12 17:20:41 MET DST 2000 Jan Hubicka - - * calls.c (expand_call): Do not reverse args in "equal from" field. - (emit_library_call_value_1): Emit_libcall_block for const and pure - function. - -Wed Apr 12 16:00:25 2000 J"orn Rennecke - - * reload1.c (reload_combine): Don't enable optimization for fixed - registers when encountering a BARRIER. - -Wed Apr 12 15:54:11 MET DST 2000 Jan Hubicka - - * builtins.c (expand_builtin_memcmp): Do expansion even with - !HAVE_cmpstrsi, do libcall when gen_strcmpsi fails. - - * calls.c (expand_call): Do NO_DEFER_POP unconditionally once - stack is properly aligned; add sanity checking for aligned - stack pointer. - (expand_library_call_value_1): Add sanity checking for aligned - stack pointer. - -Wed Apr 12 07:51:54 2000 Catherine Moore - - * calls.c (emit_library_call_value_1): Change 3rd arg to - locate_and_pad_parm to disregard the setting of partial. - -Wed Apr 12 08:47:38 2000 Richard Kenner - - * tree.c (unsave_expr_now_r, unsafe_for_reeval): Properly do TREE_LIST. - - * print-rtl.c (print_rtx): For CALL_PLACEHOLDER, output the - CALL_INSN from the normal case. - -Fri Apr 7 12:23:04 MET DST 2000 Jan Hubicka - - * i386.c (x86_sub_esp_4, x86_sub_esp_8, x86_add_esp_4, x86_add_esp_8): - New global variables. - (ix86_emit_epilogue_adjustment): Do not attempt to use pop for the - adjustment. - * i386.h (x86_sub_esp_4, x86_sub_esp_8, x86_add_esp_4, x86_add_esp_8): - Declare, - (TARGET_SUB_ESP_4, TARGET_SUB_ESP_8, TARGET_ADD_ESP_4, - TARGET_ADD_ESP_8): New macros. - * i386.md: Add peep2s to convert esp adjustments to push and pop - instructions. - (pushsi_prologue, popsi_epilogue): New patterns. - -2000-04-12 Jakub Jelinek - - * real.c (toe64): Remove stale #endif from the last change. - -2000-04-12 Stephen L Moshier - - * real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Comment. - * real.c (toe64): Revert previous change. - -2000-04-12 Jakub Jelinek - - * objc/objc-act.c: Include ggc.h. - (objc_tree_index, objc_global_trees): Convert most of the - static tree variables into a static array with previous names - as defines. - (objc_ellipsis_node): New variable. - (lang_init): Call objc_act_parse_init and c_parse_init. - Create objc_ellipsis_node. - (build_selector_translation_table): Use objc_ellipsis_node instead - of (tree)1. - (hack_method_prototype): Likewise. - (get_arg_type_list): Likewise. - (start_method_def): Likewise. - (continue_method_def): Likewise. - (gen_method_decl): Likewise. - (ggc_mark_imp_list): New function. - (ggc_mark_hash_table): New function. - (objc_act_parse_init): New function. - * objc/objc-act.h (objc_ellipsis_node): Add extern variable. - * c-parse.in (c_parse_init): For objc add roots of objc specific - local tree variables. - * objc/objc-parse.y: Rebuilt. - * objc/objc-parse.c: Rebuilt. - (opt_parm_list): Use objc_ellipsis_node instead of (tree)1. - -Wed Apr 12 01:00:44 EDT 2000 John Wehle (john@feith.com) - - * cse.c (delete_trivially_dead_insns): Also delete insns - that copy a register to itself where the destination is - a strict_low_part. - -2000-04-11 Richard Henderson - - * flow.c (struct propagate_block_info): Add new_dead, new_live. - (propagate_block): Initialize them. Use them in parallel instead - of one tmp variable, ie revert much of the 0408 and 0407 functional - changes, but keep the structural changes. - (mark_set_regs): Take new_dead from propagate_block_info instead. - (mark_set_1, mark_set_reg): Likewise. - (mark_used_regs): Likewise with new_live. - (mark_used_reg): Likewise. Revert 0408 change. - -2000-04-11 Nick Clifton - - * config/arm/arm.h: (INCOMING_RETURN_ADDR_RTX): Remove Dwarf2 - restriction. - (DWARF_FRAME_RETURN_COLUMN): Remove Dwarf2 restriction. - -2000-04-11 Alexandre Oliva - - * config/elfos.h (SELECT_SECTION): Decide whether to use a data or - const section to output a CONSTRUCTOR based on the same conditions - used for VAR_DECLs. - -Tue Apr 11 09:55:59 2000 Jeffrey A Law (law@cygnus.com) - - * pa/long-double.h (FIX_TRUNCTFSI2_LIBCALL): Tweak for PA64. - * pa/pa-protos.h (output_call): Add additional argument indicating - if the call is a sibling/tail call. - (compute_zdepdi_operands, output_64bit_and): Prototype new functions. - (compute_64bit_ior, cmpib_comparison_operator): Likewise. - (function_arg, function_arg_partial_nregs): Likewise - * pa/pa.c (override_options): Always set flag_pic for TARGET_64BIT. - (emit_move_sequence): Zero extend certain constants as needed - for TARGET_64BIT. - (compute_zdepdi_operands, output_64bit_and): New functions. - (output_64bit_ior, function_arg): Likewise. - (cmpib_comparison_operator, function_arg_partial_nregs): Likewise. - (compute_frame_size, hppa_expand_prologue): Handle TARGET_64BIT. - (hppa_expand_epilogue, return_addr_rtx, hppa_va_arg): Likewise. - (hppa_builtin_saveregs, output_cbranch, output_bb): Likewise. - (output_bvb): Likewise. - (output_millicode_call): Return pointer is in %r2 for TARGET_64BIT. - (output_call): New argument 'sibcall'. Generate sibcall sequences - as needed. - (print_operand); Handle cases 'Q', 'p', and 'z' for TARGET_64BIT. For - (ouput_arg_descriptor): Do not emit argument descriptors for - TARGET_64BIT. - * pa/pa.h (TARGET_PA_11, TARGET_PA_20): Only define if not already - defined. - (TARGET_64BIT, PROMOTE_FUNCTION_RETURN): Define. - (FUNCTION_OK_FOR_SIBALL): Define. - (CPP_PA10_SPEC, CPP_PA11_SPEC, CPP_PA20_SPEC): Define. - (CPP_CPU_DEFAULT_SPEC, SUBTARGET_EXTRA_SPECS, EXTRA_SPECS): Likewise. - (CPP_SPEC): Use new spec infrastructure. - (BITS_PER_WORD, UNITS_PER_WORD): Handle TARGET_64BIT. - (STACK_BOUNDARY, FUNCTION_BOUNDARY, PIC_OFFSET_TABLE_REGNUM): Likewise. - (RETURN_IN_MEMORY, EXTRA_CONSTRAINT, FIRST_PARM_OFFSET): Likewise. - (REG_PARM_STACK_SPACE, STACK_POINTER_OFFSET): Likewise. - (STACK_DYNAMIC_OFFSET, FUNCTION_VALUE): Likewise. - (FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_CALLEE_COPIES): Likewise. - (TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE): Likewise. - (INITIALIZE_TRAMPOLINE, LEGITIMATE_CONSTANT_P): Likewise. - (CONST_OK_FOR_LETTER_P, MOVE_RATIO): Likewise. - (FUNCTION_ARG); Call out to C code. - (FUNCTION_ARG_PARTIAL_NREGS): Likewise. - (MAX_BITS_PER_WORD, MAX_LONG_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): Define. - (MIN_UNITS_PER_WORD): Likewise. - * pa/pa.md (cmpdi): New expander. - (scc patterns, movstrsi): Not available for TARGET_64BIT. - (64bit conditional arithmetic): New patterns. - (absdi2, smindi3, umindi3, smaxdi3, umaxdi3): New patterns. - (movsicc): Not available if modes on all the operands to not match. - (movdicc): New expander and associated patterns. - (64bit branches): New patterns. - (pre_load, post_store): Generate appropriate code for TARGET_64BIT. - (pre_ldd, post_std): New patterns. - (64bit addil, load low part): New patterns. - (special movsf constant): Not available for TARGET_64BIT. - (movsf, movdf expanders): Force constants into memory. - (32bit movdf/movdi patterns): Disable for TARGET_64BIT. - (64bit movdf/movdi patterns): New patterns. - (zero_extendqidi2, zero_extendhidi2, zero_extendsidi2): New patterns - for TARGET_64BIT. - (extendqidi2, extendhidi2, extendsidi2): Similarly. - (adddi3 expander): Allow "arith_operand" for second input. - (32bit adddi3, subdi3, uaddcm): Disable for TARGET_64BIT. - (64bit adddi3, subsi3, uaddcm): New patterns for TARGET_64BIT. - (mulsi3 expander): Revamp slightly so it supports TARGET_64BIT too. - (muldi3): New expander for TARGET_64BIT. - (divsi3, udivsi3, modsi3, umodsi3): Fourth operand must be (reg:SI 2) - for TARGET_64BIT. - (32bit anddi3, iordi3, xordi3, andcm, negdi2, uaddcm): Disable - patterns for TARGET_64BIT. - (64bit anddi3, iordi3, xordi3, andcm, negdi2, uaddcm, shadd): New - patterns for TARGET_64BIT. - (64bit bit insertion/extractions): New patterns for TARGET_64BIT. - (64bit shifts/rotates): New patterns/expanders for TARGET_64BIT. - (sibcall_epilogue): New expander. - (casesi): Tweak for TARGET_64BIT. - (call expanders): Set & use the outgoing argument pointer. Use the - 64bit call patterns as needed. Add additional arg to output_call. - (call_internal_reg_64bit, call_value_internal_reg_64bit): New pattern. - (sibcall, sibcall_internal_symref): New expanders. - (sibcall_value, sibcall_value_internal_symref - (interspace_jump): Turn into an expander + matching patterns. - (canonicalize_funcptr_for_compare): Not needed for TARGET_64BIT. - * pa/pa64-regs.h: Eliminate trigraph sequences. - * pa/pa64-start.h (TARGET_PA_20): Fix typo. - -2000-04-11 Zack Weinberg - - * cppexp.c, cpphash.c, cpphash.h, cpplex.c, cpplib.c, - cpplib.h, cppmain.c, fix-header.c, scan-decls.c: Replace - cpp_token with cpp_ttype everywhere. - * cpperror.c, cpphash.c, cpplex.c, cpplib.c, scan-decls.c: - Replace cpp_buf_line_and_col with CPP_BUF_LINE and/or - CPP_BUF_COL. Line and column numbers are unsigned int, not - long. - * cpplex.c (cpp_buf_line_and_col): Delete. - * cpplib.h (struct cpp_buffer, struct cpp_reader): Change - 'long lineno' to 'unsigned int lineno'. - (CPP_BUF_LINE, CPP_BUF_COL): New macros. - -2000-04-11 Martin v. Löwis - - * extend.texi: ISO C99 is not a draft anymore. - * invoke.texi: ISO C++ is not a draft anymore. - * cpp.texi: __cplusplus is required by the ISO standard. - - * extend.texi (-fthis-is-variable): Undocument. - * flags.h (warn_template_debugging): Remove declaration. - * gcc.1 (-fall-virtual, -fenum-int-equiv, -fthis-is-variable, - -Wenum-clash, -Wtemplate-debugging): Undocument. - -2000-04-10 Nick Clifton - - * config/arm/arm.h (HOST_INT): New macro: Declare a HOST_WIDE_INT - integer. - (HOST_UINT): New macro: Declare an unsigned HOST_WIDE_INT - integer. - (ARM_SIGN_EXTEND): Use HOST_UINT. - (STRIP_NAME_ENCODING): Prevent warnings about redefinitions. - (ASM_OUTPUT_LABELREF): Prevent warnings about redefinitions. - (INCOMING_RETURN_ADDR_RTX): Only define if Dwarf2 is supported. - (DWARF_FRAME_RETURN_COLUMN): Only define if Dwarf2 is supported. - - * config/arm/arm.c: (const_ok_for_arm): Use HOST_UINT. - (arm_gen_constant): Use HOST_UINT. - (arm_canonicalize_constant): Use HOST_UINT. - (arm_reload_in_hi): Use HOST_UINT. - (arm_reload_out_hi): Use HOST_UINT. - (output_multi_immediate): Use HOST_UINT. - (int_log2): Use HOST_UINT. - (arm_poke_function_name): Use HOST_UINT. - (arm_output_epilogue): Use arm_volatile_func(). - (output_thumb_prologue): Use arm_strip_name_encoding(). - -Mon Apr 10 15:40:59 2000 Richard Kenner - - * sbitmap.c (sbitmap_a_subset_b_p): Rework loop to avoid potential - of sequence point problems. - -2000-04-10 Nathan Sidwell - - * rtl.def (ASHIFT, ROTATE, ASHIFTRT, LSHIFTRT, ROTATERT): - Recomment. - * tree.def (LSHIFT_EXPR, RSHIFT_EXPR): Recomment. - -Mon Apr 10 07:21:13 2000 Richard Kenner - - * sbitmap.h: Whitespace changes and use upper-case macro args. - (struct simple_bitmap_def): All sizes now unsigned. - (EXECUTE_IF_SET_IN_SBITMAP): Internal vars now _X instead of X_. - * sbitmap.c (sbitmap_alloc): N_ELMS now unsigned; also local vars. - (sbitmap_vector_alloc): Parms and local vars now unsigned. - (sbitmap_zero): Cast bzero arg to PTR. - (sbitmap_vector_zero, sbitmap_vector_one): Parm and Local var unsigned. - (sbitmap_union_of_diffs): Change loop index to unsigned and rework - loop to make structure clearer. - (sbitmap_not, sbitmap_difference, sbitmap_a_and_b): Likewise. - (sbitmap_a_or_b, sbitmap_a_subset_b_p, sbitmap_a_or_b_and_c): Likewise. - (sbitmap_a_and_b_or_c): Likewise. - (sbitmap_intersection_of_succs): Minor cleanups. - (sbitmap_intersection_of_preds, sbitmap_union_of_succs): Likewise. - (sbitmap_union_of_preds): Likewise. - (sbitmap_first_set_bit, dump_sbitmap): Local variables now unsigned. - (debug_sbitmap): New function. - - * c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE. - * c-typeck.c (convert_for_assignment): Likewise. - - * expmed.c (init_expmed): Don't free objects we make. - * emit-rtl.c (gen_rtx_CONST_INT, init_emit_once): Minor cleanups. - - * expr.c (get_inner_reference): Correct some WITH_RECORD_EXPR cases. - (expand_expr, case CONVERT_EXPR): Pass proper alignment to store_field. - - * gcse.c (expr_hash_table_size): Now unsigned. - (compute_ae_gen): Local variable `i' now unsigned. - (compute_ae_kill, pre_insert_copies, pre_delete, pre_gcse): Likewise. - (compute_transout, hoist_code): Likewise. - (compute_local_properties): Likewise, also hash_table_size. - (alloc_expr_hash_table): N_INSNS now unsigned. - (delete_null_pointer_checks): Mark arg F as unused. - - * regrename.c: Minor cleanups, including chang some variables - to unsigned int. - -2000-04-10 Neil Booth - - * cpplex.c (skip_block_comment): Use pointer arithmetic rather - than GETC (). - * cpphash.h: (CPP_BUMP_BUFFER_LINE_CUR, CPP_BUMP_LINE_CUR): New. - -2000-04-10 Martin v. Löwis - - * invoke.texi (-fno-gnu-keywords): Remove classof, headof, - __classof__, and __headof__ from the list of gnu keywords. - (-ansi): Remove -foperator-names from list of implied options. - Do not call it ANSI C++. - (-foperator-names): Document as -fno-operator-names. - -2000-04-09 Zack Weinberg - - * cpphash.c (timestamp): Delete. - (del_HASHNODE): If type is T_MCONST, free value.cpval. - (special_symbol): Remove unnecessary braces. Remove - T_VERSION. Treat T_STDC like T_CONST unless - STDC_0_IN_SYSTEM_HEADERS. Render both __DATE__ and __TIME__ - when one is encountered, then convert them into T_MCONST - nodes. - * cppinit.c (builtin_array): version_string is T_MCONST. - __STDC__ has a "1" in its cpval. Don't have a terminator - entry. Clean up which entries are dumped. - (initialize_builtins): Only __STDC__ gets the special - -traditional treatment. Count the length of builtin_array. - Render version_string here. - * cpphash.h: Remove T_VERSION. Add T_MCONST. - * cpplib.h (struct cpp_reader): Remove timebuf. - -2000-04-09 Richard Henderson - - * genrecog.c (pred): Update comparison_operator for the unordered - operators. - - * config/i386/i386.c (no_comparison_operator): Disallow unordered - operators. - (fcmov_comparison_operator): Allow UNORDERED/ORDERED. - (uno_comparison_operator): New. - (put_condition_code): Handle UNORDERED/ORDERED. - (unsigned_comparison): Likewise. - (ix86_fp_compare_mode): Broken out of ix86_expand_fp_compare. - (ix86_use_fcomi_compare, ix86_prepare_fp_compare_args): Likewise. - (ix86_expand_fp_compare): Use them. Take scratch as argument, - update all callers. Handle all 8 unordered operators. - (ix86_expand_setcc): Lose the unordered argument, update all callers. - (ix86_expand_branch): Likewise. Don't fully expand fp branches. - * config/i386/i386.h (PREDICATE_CODES): Update. - * config/i386/i386-protos.h (ix86_expand_fp_compare): Declare. - (ix86_expand_branch, ix86_expand_setcc): Update. - * config/i386/i386.md (sunordered, sordered): New. - (suneq, sunge, sungt, sunle, sunlt, sltgt): New. - (bunordered, bordered): New. - (buneq, bunge, bungt, bunle, bunlt, bltgt): New. - (*fp_jcc_1, *fp_jcc_2, *fp_jcc_3, *fp_jcc_4): New. - (*fp_jcc_5, *fp_jcc_6, and splitters): New. - -2000-04-09 Philip Blundell - - * config/arm/arm.h (ARM_NAME_ENCODING_LENGTHS): Strip `*' too. - -Sun Apr 9 15:16:14 EDT 2000 John Wehle (john@feith.com) - - * i386.md (fix_truncsfhi2, fix_truncdfhi2, - fix_truncxfhi2): New patterns. - * i386.c (output_fix_trunc): Handle converting to HImode. - -2000-04-08 Alex Samuel - - * ssa.c (convert_to_ssa): Eliminate dead code when calling - life_analysis. - (convert_from_ssa): Call compute_bb_for_insn before life_analysis. - (for_each_successor_phi): Change parameter to basic_block. - (coalesce_regs_in_successor_phi_nodes): Likewise. - (coalesce_regs_in_copies): Likewise. - (compute_coalesced_reg_partition): Use basic_block instead of index. - * rtl.h (convert_to_ssa): Delete. - (convert_from_ssa): Likewise. - (successor_phi_fn): Likewise. - (for_each_successor_phi): Likewise. - (in_ssa_form): Likewise. - * basic-block.h (convert_to_ssa): Moved from rtl.h. - (convert_from_ssa): Likewise. - (successor_phi_fn): Likewise. - (in_ssa_form): Likewise. - (for_each_successor_phi): Likewise. Change parameter to basic_block. - * flow.c (calculate_global_regs_live): Pass a basic_block to - for_each_successor_phi. - -2000-04-08 Richard Henderson - - * flow.c (mark_used_reg): Use reg_set_p to determine if a register - was modified in the current insn. - -2000-04-08 Richard Earnshaw (rearnsha@arm.com) - - * arm/thumb.md: Delete. - * arm/thumb-protos.h: Delete. - -2000-04-08 Richard Earnshaw (rearnsha@arm.com) - - Merge changes from merged-arm-thumb-backend-branch onto trunk. - - 2000-04-08 Richard Earnshaw (rearnsha@arm.com) - - * Merge trunk code from tag merged-arm-thumb-backend-merge_20000408 - into branch. - - * arm.md (nop): Use the standard RTL expression. Don't code as a - define_expand. - (*arm_nop, *thumb_nop): Delete. - - * arm.c (const_ok_for_arm): Don't use ANSI extensions for defining - constants. Use casts instead. - (arm_gen_constant, arm_rtx_costs, arm_reload_in_hi, arm_reload_out_hi, - output_multi_immediate, arm_poke_function_name): Likewise. - * arm.h (ARM_LEGITIIMIZE_RELOAD_ADDRESS, ARM_SIGN_EXTEND, - MASK_RETURN_ADDDR): Likewise. - - 2000-03-31 Richard Earnshaw (rearnsha@arm.com) - - * Merge trunk code from tag merged-arm-thumb-backend-merge_20000325 - into branch. - - * arm.md (eh_epilogue): New function. - * arm.h (struct machine_function): Move to here ... - * arm.c: ... from here. - (arm_output_epilogue): Support epilogues for __builtin_eh_return. - (thumb_exit): Extra parameter eh_ofs. All callers changed. - Handle epilogues for __builtin_eh_return. Make bit-fields unsigned. - - 2000-03-30 Nick Clifton - - * config/arm/semi.h (ASM_SPEC): Restore definition. - (SUBTARGET_EXTRA_ASM_SPEC): Define if not already defined. - - * config/arm/elf.h (ASM_SPEC): Restore definition. - (SUBTARGET_EXTRA_ASM_SPEC): Define if not already defined. - - * config/arm/arm.h (ASM_SPEC): Remove definition. - (SUBTARGET_EXTRA_ASM_SPEC): Remove definition. - - 2000-03-26 Bernd Schmidt - - * config/arm/arm.c: Disable -fschedule-insns for Thumb. - - 2000-03-24 Nick Clifton - - Various formating tidyups, elimination of compile time - warnings and synchronisation with internal sources: - - * config/arm/arm-protos.h (assemble_align): Add prototype. - (gen_rotated_half_load): Rename to arm_gen_rotated_half_load. - (gen_comapre_reg): Rename to arm_gen_compare_reg. - (arm_return_addr_rtx): Rename to arm_return_addr. - - * config/arm/arm.c: Include except.h. - Define shorter typenames for strict minipool_node and struct - minipool_fix. - (arm_return_in_memory): For WinCE return all structures <= 32 bits - in memory. - (gen_rotated_half_load): Rename to arm_gen_rotated_half_load. - (gen_comapre_reg): Rename to arm_gen_compare_reg. - - * config/arm/arm.h (SUBTARGET_EXTRA_ASM_SPEC): Define if not - already defined. - (ASM_SPEC): Define if not already defined. - (ASM_OUTPUT_DEF_FROM_DECLS): Define. - - * config/arm/arm.md: Rename references to gen_rotated_half_load to - arm_gen_rotated_half_load, and references to gen_comapre_reg to - arm_gen_compare_reg. - (indirect_jump): Only accept register operands. - (load_indirect_jump): Keep this pattern since combine can generate - it. - - * config/arm/coff.h: Include aout.h. - (MULTILIB_DEFAULTS): Only define if not already defined. - - * config/arm/elf.h (ASM_OUTPUT_DEF_FROM_DECLS): Move definition - into arm.h (so that COFF ports can support thumb based aliases). - (ASM_SPEC): Move definition into arm.h - - * config/arm/linux-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Remove - redundant apcs spec. - (ASM_SPEC): Move definition to arm.h - - * config/arm/semi.h (ASM_SPEC): Move definition to arm.h - - * config/arm/unknown-elf.h (ASM_OUTPUT_SECTION_NAME): Add support - for entries in the .bss section - - 2000-03-23 Nick Clifton - - * config/arm/arm.h (THUMB_INITIAL_ELIMINATION_OFFSET): Pass 0 - to thumb_far_jump_used_p. - - * config/arm/arm-protos.h (thumb_far_jump_used_p): Take a - single integer parameter. - - * config/arm/arm.c (struct machine_function): Add two new - fields, 'far_jump_used' and 'arg_pointer_live'. - (thumb_far_jump_used_p): Once the decision has been made that - far jumps might be used, always return true. - If being called from the initial elimination offset macro then - do not bother to perform the test if the arg pointer is not - being used. - (thumb_unexpand_epilogue): Pass 1 to thumb_far_jump_used_p(). - (output_thumb_prologue): Pass 1 to thumb_far_jump_used_p(). - - 2000-03-23 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (output_return_instruction): Handle more cases where we can - return from a function with an ldr instruction. - (arm_output_epilogue): Likewise. - - * arm.c (thumb_expand_prologue): Don't clobber the frame pointer - if we need to push a large stack frame and there are no callee-saved - registers. - - * arm.c (arm_debugger_arg_offset): An offset of 0 is also valid - in ARM code if the frame pointer has been eliminated. - - * arm.md (epilogue, *epilogue_insns, consttable_*, align_4): Renumber - unspec_volatile arguments to avoid duplicates. - (consttable_1, consttable_2): Fixes for big-endian mode. - - * arm.md (all ARM-mode load insns): Add neg_pool_range attribute - as appropriate. - - Re-write constant pool code. - * arm.c (minipool_node, minipool_fix): New types. - (minifix): Delete type. - (arm_add_minipool_constant): Delete. - (arm_compute_minipool_offsets, arm_find_barrier, - arm_find_minipool_constant, fixup_compare, sort_fixups): Likewise. - (get_jump_table_size): Now returns HOST_WIDE_INT. - (move_minipool_fix_forward_ref, add_minipool_forward_ref): New - functions. - (move_minipool_fix_backward_ref, add_minipool_backward_ref): Likewise. - (assign_minipool_offsets, arm_print_value): Likewise. - (dump_minipool): Rewrite. - (arm_barrier_cost): New function. - (create_fix_barrier): New function. - (push_minipool_barrier): New function. - (push_minipool_fix): Record additional information about the fixup - required. - (note_invalid_constants): Remove push for (UNSPEC 3). Don't - check the mode of what needs fixing. - (arm_reorg): Rewrite. - - 2000-03-08 Nick Clifton - - * config/arm/arm.md (indirect_jump): Force constant addresses into - a register. - - 2000-03-01 Bernd Schmidt - - * config/arm/arm.md: Add splitter to turn SF moves into SI moves. - - 2000-02-24 Nick Clifton - - * config/arm/arm.c (thumb_expand_prologue): Make sure that stack - adjust is word aligned. - (thumb_expand_epilogue): Make sure that stack adjust is word - aligned. - - * config/arm/elf.h (ASM_FILE_START): Fix type of version string. - - 2000-02-24 Bernd Schmidt - - * config/arm/arm.h (THUMB_GO_IF_LEGITIMATE_ADDRESS): Allow frame - pointer relative addresses. - - 2000-02-10 Richard Earnshaw - - * arm.c (find_barrier): Find the last barrier within the allowed - range. - - 2000-02-09 Nick Clifton - - * config/arm/arm-protos.h: Replace PROTO with PARAMS. - - 2000-02-09 Nick Clifton - - * config/arm/linux-elf.h (FUNCTION_PROFILER): Rename to - ARM_FUNCTION_PROFILER. - - * config/arm/netbsd.h (FUNCTION_PROFILER): Rename to - ARM_FUNCTION_PROFILER. - - * config/arm/linux-oldld.h: Imported from mainline sources. - - 2000-02-07 Nick Clifton - - * config/arm/lib1funcs.asm: Merge in thumb functions from - lib1thumb.asm. - - * config/arm/lib1thumb.asm: Delete. - - 2000-02-04 Nick Clifton - - * config/arm/arm.c: Sychronised with current Red hat local - sources. - * config/arm/arm.h: Ditto. - * config/arm/arm-protos.h: Ditto. - - 2000-02-02 Bernd Schmidt - - * arm.c (soft_df_operand): Reject SUBREGs containing a constant. - - * arm.c (arm_gen_movstrqi): Generate halfword stores rather than two - byte stores. - - 2000-02-02 Nick Clifton - - * config/arm/thumb.c (thumb_exit): Additional fix for same bug. - - * config/arm/arm.md (epilogue): Fix rtl checking abort because - (return) was emited using an emit_insn() call. - - 2000-01-31 Nick Clifton - - * config/arm/arm.c (output_thumb_prologue): Fix bug generating - thumb stack frame. - (thumb_exit): Move frame pointer back into hard frame pointer - register if backtracing is being used. - - 2000-01-13 Richard Earnshaw (rearnsha@arm.com) - - * Merge trunk code from tag merged-arm-thumb-backend-merge_20000113 - into branch. - - 1999-12-15 Bernd Schmidt - - * config/arm/arm.md (neg_pool_offset): Provide default for new - attribute. - (arm_movsi_insn): Add neg_pool_offset attribute. - * config/arm/arm.c (arm_find_barrier): Replace arg FIX with an - rtx for the insn that starts the scan and an unsigned long for its - address. Add MIN_OFFSET and PINSERTED args. All callers changed. - Change scan to ignore insns before MIN_OFFSET. Store size of inserted - instructions in *PINSERTED. - (struct minipool_fixup): Add MIN_ADDRESS elt. - (sort_fixups): Compute it. - (arm_reorg): Changes to support inserting pools before the insn to be - fixed up. - - 1999-12-08 Bernd Schmidt - - * config/arm/elf.h (MULTILIB_DEFAULTS): Add "marm". - * config/arm/linux-elf.h (MULTILIB_DEFAULTS): Add "marm". - * config/arm/coff.h (MULTILIB_DEFAULTS): Add "marm". - - Wed Nov 3 10:04:07 1999 Nick Clifton - - * config/arm/semi.h (TARGET_VERSION): Do not define if already - defined. - (TARGET_DEFAULT): Do not define if already defined. - - Tue Nov 2 10:37:25 1999 Nick Clifton - - * config/arm/arm.md (anddi3): Allow disjoint source operands. - (iordi3): Allow disjoint source operands. - (xordi3): Allow disjoint source operands. - (negdi2): Permit construction for ARM and Thumb. - (arm_negdi2): Renamed version of old negdi2 pattern. - (thumb_negdi2): New pattern: Only permit non-overlapping - source and destination. - - Fri Oct 29 18:52:38 1999 Nick Clifton - - * config/arm/arm.c (thumb_expand_prologue): Emit a USE of the - scratch low register so that it will not be deleted. - - Fri Oct 29 15:23:48 1999 Nick Clifton - - * config/arm/pe.h (ARM_PE): Define. - - * config/arm/arm.c (arm_valid_machine_decl_attribute): Allow - interfacearm attribute if this is a PE toolchain. - (output_return_instruction): Do not emit anything if the function - has the naked attribute set. - (is_called_in_ARM_mode): If the function has the interfacearm - attribute then return true. - (thumb_expand_prologue): Do not generate a prologue for naked - functions. - (thumb_expand_epilogue): Do not generate an epilogie for a naked - function. - (output_thumb_prologue): Do not bother if the function is naked. - Strip PE encoding from function name before emitting. - - Thu Oct 28 11:05:13 1999 Richard Earnshaw - - * arm.md (pic_load_addr): Fix constraints. - - * arm.md (casesi_insn): Fix mis-applied patch. - - * arm.md ("core" function unit): Add rules for single- and - multi-cycle insns. - (All TARGET_THUMB patterns): Add "type" attribute information - where needed. - * arm.c (arm_adjust_cost): Reduce the cost of a data dependency if - the following insn is a CALL. - - * arm.c (thumb_expand_epilogue): Add a use of the adjusted stack - pointer. - * arm.h (CONDITIONAL_REGISTER_USAGE): Nail down the - ARM_HARD_FRAME_POINTER_REGNUM when TARGET_APCS_FRAME. - (FRAME_POINTER_REQUIRED): Only check TARGET_APCS_FRAME if TARGET_ARM. - - Wed Oct 27 14:40:48 1999 Nick Clifton - - * config/arm/linux-gas.h: oops - this file was missed out when the - branch was created... - - Tue Oct 26 17:07:38 1999 Richard Earnshaw - - * thumb.c: Deleted. Move contents to ... - * arm.c: ... here. - * t-arm-aout, t-arm-coff, t-arm-elf, t-linux, t-netbsd, t-semi: Remove - rule for thumb.o - * configure.in (arm*-*-*): Remove thumb.o from extra_objs list. - * configure: Regen. - - * arm-protos.h: Use RTX_CODE and tidy up long lines. Don't - declare a prototype for asm_output_align(); - - * arm.c (thumb_condition_code): Delete. - (arm_print_operand): Always use arm_condition_code array. - - * arm.c (thumb_return_addr_rtx): Delete. - (arm_save_machine_status, arm_restore_machine_status): Delete. - (arm_init_machine_status, arm_mark_machine_status): New functions. - (arm_init_expanders): Update accordingly. - (arm_return_addr): Renamed from arm_return_addr_rtx. Rewrite. - (thumb_expand_prologue): Delete code referencing thumb_return_addr_rtx. - * arm.h (RETURN_ADDR_RTX): Call arm_return_addr(). - - Tue Oct 26 13:24:16 1999 Nick Clifton - - * configure.in : Fix arm-*-aout target to use new t-arm-aout - script. - * config/arm/t-arm-aout: New file: Makefile script for arm-*-aout - targets. - - Tue Oct 26 11:27:12 1999 Nick Clifton - - * config/arm/thumb.c (output_thumb_prologue): Fix bug creating - stack backtrace structure. - - * config/arm/arm-protos.h: Add prototypes for functions defined in - arm/pe.h. - - * config/arm/arm.c (arm_override_options): Fix selection of - attributes of default processor. - - * config/arm/coff.h: Delete needless #include. - - * config/arm/pe.c: Delete unused code. - - * config/arm/pe.h (CPP_DEFINES): Delete - (SUBTARGET_CPP_SPEC): Define. - (ASM_DECLARE_FUNCTION_NAME): Use ARM_DECLARE_FUNCTION_NAME. - - * config/arm/t-pe: Add -DInhibit_libc to allof libgcc.a to build. - - Mon Oct 25 15:42:09 1999 Richard Earnshaw (rearnsha@arm.com) - - * arm.h (TARGET_APCS_FRAME): Renamed from TARGET_APCS -- all uses - updated. - (CAN_DEBUG_WITHOUT_FP): Define. - (FIXED_REGISTERS): Make r11 call-saved. - (CALL_USED_REGISTERS): Likewise. - (CONDITIONAL_REGISTER_USAGE): Fix r11 if TARGET_APCS_FRAME. - (FRAME_POINTER_REQUIRED): Correct logic for determining when a - frame-pointer is required. - (TARGET_DEFAULT): Make default setting include ARM_FLAG_APCS_FRAME. - * arm.c (arm_override_options): Warn about -mno-apcs-frame and -g - if the target normally needs a stack frame in non-leaf functions. - (use_return_insn): Correct logic for determining when a return - instruction can be used. - (output_return_instruction): Handle the frame-pointer register as - a normal register when not TARGET_APCS_FRAME. - (arm_output_prologue): Likewise. - (arm_output_epilogue): Likewise. - (output_func_epilogue): Likewise. - (arm_expand_prologue): Likewise. - * netbsd.h semi.h (TARGET_DEFAULT): Add ARM_FLAG_APCS_FRAME. - - * arm.c (use_return_insn): No need to check floating point regs if - TARGET_SOFT_FLOAT. - (arm_find_minipool_constant): Correct typo; use GET_CODE to get - the code of value stored in the minipool array. - (arm_add_minipool_constant): Likewise. - -2000-04-08 Kaveh R. Ghazi - - * basic-block.h (conflict_graph_enum_fn): K&R fix. - -2000-04-08 Kaveh R. Ghazi - - * tree.c (tree_expr_nonnegative_p): New function. - - * tree.h (tree_expr_nonnegative_p): Declare. - - * c-typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to - elide some sign_compare warnings. - (build_conditional_expr): Likewise. - -Sat Apr 8 00:21:51 EDT 2000 John Wehle (john@feith.com) - - * i386.md (ashrsi3, ashrhi3, ashrqi3): Fix typo. - - * i386.md (floathisf2, floathidf2, floathixf2): New patterns. - * i386.c (print_operand): Use the proper suffix for a 387 HImode - operand. Abort if a 387 operand has an unsupported size. - -2000-04-08 Neil Booth - - * cppexp.c (parse_charconst): Null does not end character - constants. - * cppinit.c (ISTABLE): Null character handled as whitespace. - * cpplex.c (null_warning): new function. - (skip_string): Emit warning if nulls encountered. - (_cpp_skip_hspace): Emit warning if nulls encountered. - (_cpp_lex_token): Emit warning if nulls encountered. Drop - them. - * cpp.texi: Update. - -2000-04-07 Richard Henderson - - * flow.c (loop_depth): Remove. - (reg_next_use, cc0_live, mem_set_list): Replace with ... - (struct propagate_block_info): New. - (life_analysis): Don't allocate reg_next_use. - (propagate_block_delete_insn): Break out of propagate_block. - Use flow_delete_insn to unlink rather than use NOTE_INSN_DELETED. - (propagate_block_delete_libcall): Likewise. - (propagate_block): Create a propagate_block_info struct to pass - to subroutines. Allocate one not two temporary regsets. Don't - clobber memory for const calls. Look for clobbers in - CALL_INSN_FUNCTION_USAGE. - (mark_set_regs): Recognize COND_EXEC. - (mark_set_reg): Break out of mark_set_1. - (mark_used_reg): Break out of mark_used_regs. - (mark_used_regs): Recognize COND_EXEC. - (insn_dead_p): Use propagate_block_info struct. - (libcall_dead_p, invalidate_mems_from_autoinc): Likewise. - (find_auto_inc, try_pre_increment_1): Likewise. - (print_rtl_with_bb): Dump regs live at end too. - (count_reg_sets_1): Pass in loop_depth. - (count_reg_sets, count_reg_references): Likewise. - (recompute_reg_usage): Provide it. - -2000-04-07 Richard Henderson - - * Makefile.in (conflict.o): Depend on $(RTL_H) and $(BASIC_BLOCK_H) - not the raw files. - -2000-04-07 Zack Weinberg - - * cpplib.c (do_elif): Skip the rest of the line if we're - not going to bother evaluating it. - (skip_if_group): Clear pfile->only_seen_white. Reorder loop - to avoid pointless calls to the lexer. - -Fri Apr 7 11:50:54 2000 Jim Wilson - - * config/ia64/ia64.c: Delete stdio.h and ctype.h includes. - -2000-04-07 Jason Merrill - - * calls.c (expand_call): emit_queue if we're trying a sibcall. - -2000-04-07 Jakub Jelinek - - * config/sparc/t-linux64 (tcrtbeginS.o, tcrtendS.o): Remove. - -2000-04-06 Geoff Keating - - * Makefile.in: Build crtbeginS and crtendS like crtbegin and - crtend so they can be multilibbed. - (STAGESTUFF): Remove s-crt and s-crtS. - -2000-04-07 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_conditional_move): Fail - if we discover we need a pseudo and no_new_pseudos is true. - * config/alpha/alpha.md (ne:DI insn): New. - (trunctfsf2, sne): Emit NE instead of non-canonical LTU. - -2000-04-07 Richard Henderson - - * rtl.def (COND_EXEC): New. - * rtl.h (COND_EXEC_TEST, COND_EXEC_CODE): New. - * tm.texi (MAX_CONDITIONAL_EXECUTE): Document. - - * genconfig.c (have_cond_arith_flag): Remove. - (have_cond_exec_flag): New. - (walk_insn_part): Detect COND_EXEC, not arithmetic in IF_THEN_ELSE. - (main): Print HAVE_conditional_execution. - - * haifa-sched.c (haifa_classify_insn): Recognize COND_EXEC. - (sched_analyze_insn, print_pattern): Likewise. - * reload.c (find_equiv_reg): Likewise. - * rtlanal.c (reg_referenced_p): Likewise. - (note_stores, dead_or_set_regno_p): Likewise. - (reg_overlap_mentioned_p): Rewrite to use a switch. - - * ggc.h (struct rtx_def): Forward declare. - - * print-rtl.c (debug_rtx_range): New. - * rtl.h (debug_rtx_range): Declare. - - * varray.h (VARRAY_ACTIVE_SIZE, VARRAY_POP_ALL): New. - - * gcse.c (gcse_main): Don't rebuild the CFG here. - (delete_null_pointer_checks): Likewise. - * ssa.c (convert_to_ssa): Likewise. - * toplev.c (rest_of_compilation): Do it here instead. Combine - sequential calls to TIMEVAR. Consistently use `insns' instead of - `get_insns()'. Always split insns after reload when optimizing. - - * basic-block.h (merge_blocks_nomove): Declare. - (tidy_fallthru_edge): Declare. - * flow.c (merge_blocks_nomove): Document as merging into previous - blocks. Remove cruft from between blocks; remove all edges out of A. - (tidy_fallthru_edge): Export. - -2000-04-06 Alex Samuel - - * ssa.c (compute_conservative_reg_partition): Declare with - void arguments. - * toplev.c (clean_dump_file): Remove previously-deleted function - inadvertantly merged back in. - * conflict.c (conflict_graph_add): Use a single call to - htab_find_slot to look up and insert. - -2000-04-06 Richard Henderson - - * genrecog.c (*): Rename _last_insn to last_insn. - (make_insn_sequence): Set the position of the peephole2 C test - to be at the last insn. - -2000-04-06 Richard Henderson - - * flow.c (compute_flow_dominators): Free worklist. - -2000-04-06 Michael Matz - - * flow.c (compute_flow_dominators): Process blocks FIFO not LIFO. - -2000-04-06 Alex Samuel - - * rtl.h (INSN_P): New macro. - (successor_phi_fn): New typedef. - (for_each_successor_phi): New prototype. - (in_ssa_form): New variable. - (PHI_NODE_P): Likewise. - * flow.c (calculate_global_regs_live): Add to new_live_at_end from - phi nodes in successors. - (mark_used_regs): Add PHI case. - (set_phi_alternative_reg): New function. - (life_analysis): Assert that dead code elimination is not selected - when in SSA form. - * toplev.c (to_ssa_time): New variable. - (from_ssa_time): Likewise. - (compile_file): Zero to_ssa_time and from_ssa_time. - Print time to convert to and from SSA. - (rest_of_compilation): Time convert_to_ssa and convert_from_ssa. - (print_time): Compute percent fraction as integer. - * ssa.c (PHI_NODE_P): Moved to rtl.h. - (convert_to_ssa): Check if we're already in SSA. - Don't eliminate dead code in life_analysis. - Rerun flow and life analysis at bottom. - (eliminate_phi): Use canonical regnos when adding nodes. - (mark_reg_in_phi): New function. - (mark_phi_and_copy_regs): Likewise. - (convert_from_ssa): Rerun life analysis at top. - Use coalesced partition. - Check for removing a phi node at the end of the block. - (compute_coalesced_reg_partition): New function. - (coalesce_regs_in_copies): Likewise. - (coalesce_reg_in_phi): Likewise. - (coalesce_regs_in_successor_phi_nodes): Likewise. - (for_each_successor_phi): Likewise. - (rename_context): New struct. - (rename_block): Use a rename_context with rename_insn_1. When - renaming sets of a subreg, emit a copy of the entire reg first. - (rename_insn_1): Treat data as a rename_context *. Save current - insn in set_data. - (rename_set_data): Add field set_insn. - * Makefile.in (HASHTAB_H): Move up in file. - (OBSTACK_H): New macro. - (collect2.o): Use OBSTACK_H in dependencies. - (sdbout.o): Likewise. - (emit-rtl.o): Likewise. - (simplify-rtx.o): Likewise. - (fix-header.o): Likewise. - (OBJS): Add conflict.o. - (conflict.o): New rule. - * basic-block.h: Include partition.h. - (conflict_graph): New typedef. - (conflict_graph_enum_fn): Likewise. - (conflict_graph_new): New prototype. - (conflict_graph_delete): Likewise. - (conflict_graph_add): Likewise. - (conflict_graph_conflict_p): Likewise. - (conflict_graph_enum): Likewise. - (conflict_graph_merge_regs): Likewise. - (conflict_graph_print): Likewise. - (conflict_graph_compute): Likewise. - * conflict.c: New file. - -2000-04-06 Jason Merrill - - * tlink.c (read_repo_files): Don't look for .rpo info for - linker flags. - -Thu Apr 6 20:39:26 2000 J"orn Rennecke - - * sh.h (STRUCT_VALUE, RETURN_IN_MEMORY): Define. - -Thu Apr 6 19:34:08 2000 J"orn Rennecke - - * config/sh/lib1funcs.asm (___udivsi3_i4): - ( __SH4_SINGLE__ / __SH4_SINGLE_ONLY__ variant): value for fpscr - only depends on FMOVD_WORKS. - -Thu Apr 6 19:11:47 2000 J"orn Rennecke - - * config/sh/lib1funcs.asm (___udivsi3_i4): When using fmovd, - make double constant 8-byte aligned. - -2000-04-06 Jakub Jelinek - - * config/sparc/sparc.md (movtf_insn_sp32, movtf_insn_vis_sp32, - movtf_no_e_insn_sp32, movtf_insn_hq_sp64, movtf_insn_hq_vis_sp64, - movtf_no_e_insn_sp64): Accept loading 0.0 into GENERAL_REGS. - (movtf_insn_sp64, movtf_insn_vis_sp64): Likewise. - Accept storing GENERAL_REGS into offsetable memory. - * config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Don't allow - building a TFmode constant other than 0.0L into GENERAL_REGS. - -2000-04-06 Clinton Popetz - - * regrename.c (regrename_optimize): Handle no REG_ALLOC_ORDER. - -2000-04-06 Zack Weinberg - - * cpphash.c (CPP_IS_MACRO_BUFFER, FORWARD, PEEKC): Delete. - (macro_cleanup): No need to cast pbuf->macro. - (collect_expansion): Use _cpp_get_define_token. Goto done if - it returns VSPACE. Remove check for trailing space after - CPP_COMMENT. - (_cpp_create_definition): Don't diddle flags here. Return - directly on error. - (unsafe_chars): Handle c1 being EOF. - (push_macro_expansion): Use unsafe_chars for both accidental-paste - checks. Don't push the buffer till after we're done with - them. - * cpplex.c (PEEKBUF, GETBUF, FORWARDBUF): New. - (PEEKN, FORWARD, GETC, PEEKC): Use them. - (cpp_push_buffer): Don't set new->alimit. Set new->mark - appropriately. - (_cpp_parse_assertion): Don't NUL terminate. - (_cpp_lex_token): Fix -traditional macro handling. Don't skip - hspace before calling _cpp_parse_assertion. Remove all sets - of only_seen_white. Treat '\f' as hspace. Don't do anything - special with '\n' here. - (maybe_macroexpand): Handle T_EMPTY hash entries without - pushing a buffer at all. - (cpp_get_token): Handle clearing only_seen_white here. Handle - incrementing the line number here. Clear - potential_control_macro as well as only_seen_white, if - appropriate. - (cpp_get_non_space_token): Don't eat CPP_POP tokens. - (_cpp_get_define_token): New function, basically like - _cpp_get_directive_token was but doesn't eat horizontal space. - Don't do anything with only_seen_white here. - (_cpp_get_directive_token): Just call _cpp_get_define_token - repeatedly till it returns non-hspace. - - * cpplib.c (PEEKN, FORWARD, GETC, PEEKC): Delete. - (conditional_skip, skip_if_group): Return int. - (DIRECTIVE_TABLE): Change origin of all conditional directives - to "COND". - (TRAD_DIRECT_P): New macro. - (_cpp_handle_directive): Use _cpp_get_directive_token. Issue - an error for a bogus directive, unless -lang-asm. Use - TRAD_DIRECT_P. Loop calling handler functions till one returns - zero. - (get_macro_name): Don't diddle flags here. - (do_define): Diddle flags here. Use _cpp_get_directive_token. - Create T_EMPTY nodes for #define macro /* nothing */. - (do_undef): Don't copy the name. Use _cpp_get_directive_token. - Use hp->name when calling pass_thru_directive. - (do_if, do_else, do_elif, do_ifdef, do_ifndef, conditional_skip): - Return the result of conditional_skip and/or skip_if_group. - Don't call _cpp_output_line_command. - (consider_directive_while_skipping): Use _cpp_get_directive_token. - Issue -Wtraditional warnings as appropriate. Don't complain - about unrecognized directives. If we are to stop skipping, - return the number of the directive that ended the skip. - (skip_if_group): Use _cpp_get_directive_token. Turn off macro - expansion and line commands while skipping. Return the result - of consider_directive_while_skipping, if nonzero. - (do_endif): Just set potential_control_macro here. - (validate_else): Use _cpp_get_directive_token. - (do_assert, do_unassert): Don't save pointers into the - token_buffer across calls to the lexer. Use - _cpp_get_directive_token. - - * cpplib.h (cpp_buffer): Remove alimit and colno. Make mark a - pointer, not an offset. Replace 'data', which was a generic - pointer, with 'macro', which points to a struct hashnode. - (cpp_reader): Add 'potential_control_macro' pointer. - * cpphash.h (T_UNUSED): Replace with T_EMPTY. - (CPP_BUF_GET, CPP_FORWARD): Delete. - (CPP_IN_COLUMN_1, ADJACENT_TO_MARK): New macros. - (CPP_IS_MACRO_BUFFER, CPP_SET_BUF_MARK, CPP_GOTO_BUF_MARK, - ACTIVE_MARK_P): Update. - (_cpp_get_define_token): New internal function. - * cppfiles.c (read_include_file): Don't set fp->alimit or fp->colno. - -2000-04-05 Benjamin Kosnik - - * configure.in: And here. - * configure: Regenerate. - * acconfig.h: Add ENABLE_STD_NAMESPACE to set flag_honor_std if - --enable-libstdcxx-v3 is passed at configure time. - * config.h.in: Regenerate. - -2000-04-05 Mark Mitchell - - * final.c (final): Use xcalloc to allocate line_note_exists. - * function.c (free_after_compilation): Free the temp_slots. - (assign_stack_temp_for_type): Use xmalloc to allocate temp_slots. - (combine_temp_slot): Free temp_slots when they get combined. - (purge_addressof): Fix typo in comment. - * stmt.c (mark_goto_fixup): Mark the fixup itself. - (expand_fixup): Allocate the fixup with ggc_alloc_obj. - - * ggc.h: Include varray.h. - (ggc_pending_trees): Declare. - (ggc_mark_tree_children): Remove declaration. - (ggc_mark_tree): Just push unmarked trees on ggc_pending_trees. - * ggc-common.c (ggc_pending_trees): New variable. - (ggc_mark_roots): Call ggc_mark_trees. - (ggc_mark_tree_children): Rename to ggc_mark_trees. Process all - the ggc_pending_trees. - * Makefile.in (GGC_H): New variable. Use it throughout in place - of ggc.h. - -Thu Apr 6 00:30:50 2000 J"orn Rennecke - - * sh.h (FUNCTION_ARG_PARTIAL_NREGS): Accommodate an unsigned - GET_MODE_SIZE. - -Wed Apr 5 23:17:10 2000 J"orn Rennecke - - * sh.c (sh_insn_length_adjustment): New function. - * sh-protos.h (sh_insn_length_adjustment): Declare. - * sh.h (ADJUST_INSN_LENGTH): Use it. - -Wed Apr 5 12:35:18 2000 Hans-Peter Nilsson - - * optabs.c (emit_libcall_block): Remove spurious REG_EQUAL notes - from the insn where REG_RETVAL is added. - (emit_no_conflict_block): Ditto. - - * md.texi (Standard Names): Clarify when movX is needed. - - * combine.c (simplify_comparison) [MINUS]: Do not replace - all (op (minus A B) 0) with (op A B). - -Wed Apr 5 18:03:31 2000 Toshiyasu Morita (toshi.morita@sega.com) - J"orn Rennecke - - * sh.md (block_lump_real_i4): Add missing clobber of T_REG - (block_lump_real): Likewise. - -2000-04-05 Chris Demetriou - - * mips.h (MASK_DEBUG_A, MASK_DEBUG_B, MASK_DEBUG_C): Zero the - remaining nonzero debugging masks. - -Wed Apr 5 09:44:07 2000 Jeffrey A Law (law@cygnus.com) - - * basic-block.h (verify_flow_info): Declare. - (flow_loop_outside_edge_p): Declare. - * flow.c (verify_flow_info): Remove declaration. - (clear_log_links, flow_loop_outside_edge_p): Likewise. - -Wed Apr 5 09:34:26 2000 Philippe De Muyter - - * m68k/m68k-protos.h (finalize_pic): Turn prototype off using `#if 0', - not C++ comments. - -2000-04-05 Jakub Jelinek - - * config/sparc/sparc.md (snedi_zero+1, neg_snedi_zero+1, - snedi_zero_trunc+1, seqdi_zero+1, neg_seqdi_zero+1, - seqdi_zero_trunc+1): Allow splits only if registers are - different. - -2000-04-04 Ulrich Drepper - - * acconfig.h: Add HAVE_GAS_HIDDEN. - * config.in: Regenerated. - * configure.in: Add test for .hidden pseudo-op in gas. - * configure: Regenerated. - * crtstuff.c: Include auto-host.h. - Emit additional .hidden pseudo-op for __dso_handle if the - assembler knows about it. - -2000-04-04 Philippe De Muyter - - * cpphash.c (_cpp_free_definition): Test argnames, not nargs >= 0, - before freeing argnames. - * cpplib.c (do_ifndef): Cast return value of xstrdup. - -2000-04-05 Michael Meissner - - * config/rs6000/rs6000.c (print_operand): Patch from Jonathan - Walton to make memory references with update - work wtih -mregnames. - -2000-04-04 Kaveh R. Ghazi - - * regrename.c (regno_first_use_in): Wrap prototype in PARAMS. - (regrename_optimize): Rename variables `def_uses' and - `ext_basic_blocks' to avoid conflicts with similarly named - typedefs in traditional C. - - * calls.c (initialize_argument_information): Fix typo in previous - change. - -2000-04-04 Richard Henderson - - * regrename.c (consider_available): Test fixed_regs not - PIC_OFFSET_TABLE_REGNUM. - -2000-04-04 Geoff Keating - - * config/rs6000/t-ppccomm (EXTRA_MULTILIB_PARTS): Add crtbegin, - crtend. - (CRTSTUFF_T_CFLAGS_S): Delete definition. - * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Always use crtbegin. - (ENDFILE_LINUX_SPEC): Always use crtend. - * configure.in (powerpc-*-linux-gnulibc1): Don't define extra_parts. - (powerpc-*-linux-gnu): Likewise. - * configure: Regenerate. - - * config/rs6000/eabi.h: Don't include sysv4.h. - (MULTILIB_DEFAULTS): Don't define. - * config/rs6000/eabiaix.h: Don't include eabi.h. - * config/rs6000/eabile.h: Delete. - * config/rs6000/eabilesim.h: Delete. - * config/rs6000/eabisim.h: Don't include eabi.h. - * config/rs6000/linux.h: Don't include sysv4.h. - (JUMP_TABLES_IN_TEXT_SECTION): Don't redefine. - (MULTILIB_DEFAULTS): Don't redefine. - * config/rs6000/rtems.h: Don't include eabi.h. - * config/rs6000/sol2.h: Don't include sysv4le.h. - * config/rs6000/sysv4le.h: Don't include sysv4.h. - * config/rs6000/t-ppc: Delete. - * config/rs6000/t-ppcgas: Correct comment. - * config/rs6000/t-ppcos: Correct comment. Don't build - multilibs for -fPIC, rather use -fPIC -mstrict-align - as default. - * config/rs6000/t-ppc: Delete. - * config/rs6000/vxppc.h: Don't include sysv4.h. - * config/rs6000/vxppcle.h: Delete. - * configure.in: Use multiple header files for p2pc ELF targets - powerpc-eabiaix, powerpc-eabisim, powerpc-rtems, powerpcle-eabi, - powerpcle-eabisim, powerpc-elf, powerpcle-elf, powerpc-linux-gnu, - powerpc-linux-gnulibc1, powerpc-sysv, powerpcle-sysv, - powerpc-vxworks, powerpcle-vxworks. Assume GAS functionality is - always available for these platforms. - -2000-04-04 Richard Henderson - - * calls.c (try_to_integrate): Initialize reg_parm_stack_space. - -2000-04-04 Stan Cox - - * Makefile.in: Add rules for regrename.o - * regrename.c: New file. - * rtl.h (regrename_optimize): Add prototype. - * toplev.c (rename_registers_dump, flag_rename_registers): New variables - (compile_file, decode_d_option): Add support for -frename-registers. - (rest_of_compilation): Call regrename_optimize. - * config/ia64/ia64.h (HARD_REGNO_RENAME_OK, RENAME_EXTENDED_BLOCKS): - New macros. - -2000-04-04 Martin v. Löwis - - * Makefile (gccbug): New target. - (doc): Depend on it. - * gcc.texi (Bugs): Link subnodes. - (gccbug): New node. - * gccbug.in (CATEGORIES): Remove gc, host, profiling, libgcc. - Document severities, priorities, and classes in bug form. - -2000-04-04 Zack Weinberg - - * cpplex.c (trigraph_map, speccase): Combine into single - table, chartab. - (NORMAL, NONTRI): New macros. - (_cpp_read_and_prescan): Change to use unified table. Use - is_hspace to test for whitespace. - - * dbxout.c (CONTIN): If it doesn't have to do anything, give it a - definition that doesn't provoke the "empty body in an - if-statement" warning. - -2000-04-04 Clinton Popetz - - * builtins.c (expand_builtin_strlen): Force the source to - be a memory address. - -2000-04-04 Kaveh R. Ghazi - - * cpplib.c (D): Adjust to call CONCAT2 macro without whitespace. - -Tue Apr 4 19:17:20 MET DST 2000 Jan Hubicka - - * calls.c (ECF_MALLOC, ECF_MAY_BE_ALLOCA, ECF_RETURNS_TWICE, - ECF_LONGJMP, ECF_FORK_OR_EXEC): New constants. - (ECF_IS_CONST): Rename to ECF_CONST. - (special_function_p): Make static, change interface. - (flags_from_decl_or_type, try_to_integrate): Break out from ... - (expand_call) ... here; convert number of variables to flags. - (emit_library_call_vlue_1): Likewise. - (setjmp_call_p): New function. - (initialize_argument_information): Accepts flags as argument; - return flags. - (precompute_arguments): Likewise. - * tree.h (special_function_p): Remove. - (setjmp_call_p): Add prototype. - -2000-04-04 Jakub Jelinek - - * config/sparc/sparc.h (RTX_OK_FOR_OFFSET_P): Leave minor margin - so that addresses are offsetable by up to 16 bytes. - (GO_IF_LEGITIMATE_ADDRESS): Don't allow REG+REG addresses for - non-optimizing TARGET_ARCH32 in DF or DI modes because it is not - offsetable. - - * config/sparc/sparc.md (movdi_insn_sp64_novis): New pattern. - (movdi_insn_sp64_vis): Renamed from movdi_insn_sp64. - (movsf): Don't force any constant to memory if target is integer - hard register. - Move fp_zero_operand check below the const0_rtx check. - (movtf): Likewise. Also allow fp_zero_operand for stores into - memory. - (movdf): Likewise. Also allow fp_zero_operand for stores into - memory and into integer hard registers. - (clear_df, clear_dfp, movdf_const_intreg_sp32, - movdf_const_intreg_sp64): Remove. - (movdf_insn_sp32, movdf_no_e_insn_sp32): Redo constraints and - conditions. - (movdf_no_e_insn_v9_sp32): New pattern. - (movdf_insn_v9only): Remove. - (movdf_insn_v9only_novis, movdf_insn_v9only_vis): New patterns. - (movdf_insn_sp64): Remove. - (movdf_insn_sp64_novis, movdf_insn_sp64_vis): New patterns. - (movdf_no_e_insn_sp64): Allow storing 0.0 into memory. - (following splits): Rewrite conditions. Add two new splits - for storing 0.0 into memory and registers. - (clear_tf, clear_tf+1, clear_tfp, clear_tfp+1): Remove. - (movtf_insn_sp32): Redo constraints and conditions. - (movtf_insn_vis_sp32): New pattern. - (movtf_no_e_insn_sp32): Redo constraints and conditions. - (movtf_insn_hq_sp64): Likewise. - (movtf_insn_hq_vis_sp64): New pattern. - (movtf_insn_sp64): Redo constraints and conditions. - (movtf_insn_vis_sp64): New pattern. - (movtf_no_e_insn_sp64): Redo constraints and conditions. - (movtf_no_e_insn_sp64+1): New split for storing 0.0L into registers - or memory. - * config/sparc/sparc.c (sparc_override_options): Assume v9 if either - -mvis or -m64 to take down the number of various reload patterns. - -Tue Apr 4 00:41:53 2000 Jeffrey A Law (law@cygnus.com) - - * pa/pa-64.h: New file. - * pa/pa64-regs.h: New file. - * pa/pa64-start.h: New file. - * pa/t-pa64: New file. - * pa/xm-pa64hpux.h: New file. - -2000-04-03 Kaveh R. Ghazi - - * sparc.c (output_restore_regs): Prototype. - (sparc_emit_float_lib_cmp): Constification. - - * emit-rtl.c (const_int_htab_hash, const_int_htab_eq): Likewise. - - * reload1.c (reload_cse_delete_noop_set, reload_cse_simplify): - Prototype. - - * simplify-rtx.c (entry_and_rtx_equal_p): Constification. - (get_value_hash, hash_rtx): Likewise. - - * ssa.c (compute_conservative_reg_partition): Prototype. - - * tree.c (mark_hash_entry): Prototype. - -2000-04-03 Zack Weinberg - - * bb-reorder.c (verify_insn_chain): #ifdef out unless ENABLE_CHECKING. - * i386.h (FUNCTION_ARG_REGNO_P): Remove unnecessary test for N >= 0. - * i386.md (call_value, call_value_pop): Remove unused variable 'addr'. - - * gcc.c (C specs): Pass -fno-show-column to the preprocessor. - * objc/lang-specs.h: Likewise. - -2000-04-03 Neil Booth - - * cppexp.c: wrap long lines. New macros CPP_ICE, SYNTAX_ERROR - and SYNTAX_ERROR2. Replace `' in messages with ''. - (op_to_str): Make re-entrant. - (_cpp_parse_expr): Implement new error macros. Use | rather - than || to logically or 2 boolean integers. Simply expression - checking we have a left operand iff needed. - -2000-04-03 Nick Clifton - - * Makefile.in (diagnostic.o): Depend upon diagnostic.c - -2000-04-03 Philip Blundell - - * config/arm/linux-elf.h (SUBTARGET_EXTRA_LINK_SPEC): Fix typos. - -2000-04-03 Felix Lee - - * fixinc/server.c (find_shell): New function. Avoid $SHELL. - (run_shell): Use it. - -2000-04-03 Jonathan Larmour - - * Makefile.in (stmp-int-hdrs): Make include subdir here... - (stmp-fixproto): ...rather than here. - -Mon Apr 3 00:50:06 2000 Jason Eckhardt - - * pa.c (print_operand): Compute 'base' only inside the code paths - that use it. - -2000-04-03 Geoffrey Keating - - * stor-layout.c (byte_from_pos): Use TRUNC_DIV_EXPR rather than - CEIL_DIV_EXPR. - -2000-04-03 Philipp Thomas - - * i386.h (TARGET_SWITCHES): Remove bogus empty strings, fix typo. - -Mon Apr 3 00:02:59 2000 Brad Lucier - - * Makefile.in (alias.o): Depend on $(TREE_H). - -2000-04-02 Zack Weinberg - - * cppinit.c (cpp_start_read): Turn off -Wtraditional if - processing C++. - * cpplib.c (_cpp_handle_directive): Improve warnings for - traditional C and indented directives. - - * enquire.c, gsyslimits.h, limity.h, config/convex/fixinc.convex, - fixinc/fixinc.irix, fixinc/fixinc.sco, fixinc/fixinc.wrap, - fixinc/inclhack.def: Indent the # of #include_next one space. - * cp/rtti.c: Un-indent #if and #endif. - - * cppexp.c (_cpp_parse_expr): If lex returns '#', it's a - syntax error, but an error has already been printed. - * cpplex.c (_cpp_parse_assertion): Give a more specific error - message when called with nothing remaining on the line. - (_cpp_lex_token): If _cpp_parse_assertion fails, return an - OTHER token, not an ASSERTION. - * cpplib.c (do_assert): When we create a 'base' node, clear - its aschain pointer. - -2000-04-02 Neil Booth - - * cppexp.c: New typedef op_t. struct operation and struct - token updated to use it. - (op_to_str): New function. - (_cpp_parse_expr): Error messages modified to use op_to_str. - -2000-04-02 Michael Hayes - - * config/c4x/c4x.c (c4x_function_arg): Check for void_type_node - before checking MUST_PASS_IN_STACK. - -2000-04-02 Neil Booth - - * cppexp.c: New FINISHED dummy token. Combine operator initial - flags and initial priority into a single constant. New - EQUALITY macro. New operator flag SHORT_CIRCUIT. - (_parse_cpp_expr): Implement new constants. Take left operand - checks out of reduction loop. Handle SHORT_CIRCUIT. End of - parse indicated by reducing FINISHED token. Remove new lines - from cpp_error messages. - -2000-04-01 Mark Mitchell - - * emit-rtl.c (gen_rtx_CONST_INT): Create cached CONST_INTs on the - permanent obstack. - -2000-04-01 Zack Weinberg - - * cpplib.c: Include symcat.h. Add 'origin' field to struct - directive. Add origin values to DIRECTIVE_TABLE. Generate - the strings and function names on the fly. Take the #sccs - entry out of the table if SCCS_DIRECTIVE is not defined. - (_cpp_handle_directive): Decide if the # was at the beginning - of the line here. Issue -pedantic warnings for extended - directives here. Warn about K+R directives with the # - indented, and C89/extended directives with the # not indented, - here. - (do_import, do_include_next, do_warning, do_ident, do_sccs, - do_assert, do_unassert): Don't issue pedantic warning here. - - * cpphash.h: Add CPP_WTRADITIONAL macro. - * cpplib.h (struct cpp_options): Rename warn_stringify to - warn_traditional; update comments. - * cppinit.c (handle_option): Set warn_traditional not - warn_stringify. - * cpphash.c: Replace CPP_OPTION (pfile, warn_stringify) with - CPP_WTRADITIONAL (pfile). - * cpplex.c (_cpp_lex_token): Don't decide if directives should - be ignored in -traditional mode here. - - * cpplex.c: Copy ISTABLE macros from cppinit.c, and adapt them - to initialize speccase[] and trigraph_map[]. Delete all - references to pfile->input_speccase. Always treat '?' as a - special character. Remove table-initialization code from - _cpp_init_input_buffer. - - * cpplib.h (struct cpp_reader): Remove input_speccase field. - * cppinit.c (cpp_cleanup): Don't free input_speccase. - -2000-04-01 Richard Henderson - - * Makefile.in (STAGESTUFF): Wildcard all debugging dumps at once. - (mostlyclean): Likewise. - - * toplev.c (rtl_dump, jump_opt_dump, etc): Remove. - (struct dump_file_info, enum dump_file_index, dump_file): New. - (open_dump_file): Take a dump_file_index not a suffix, and a decl - not a string. Clean out file if we haven't yet done so. Do nothing - if the dump isn't enabled. - (close_dump_file): Do nothing if the dump isn't open. Dump - graph data if requested. - (dump_rtl, clean_dump_file): Remove. - (compile_file): Don't clean the dump files. Only finalize .bp dump - if flag_test_coverage or flag_branch_probabilities. Only finalize - .combine dump if optimizing. Iterate over dump_file to finalize the - graph dumps. - (rest_of_compilation): Update for open_dump_file/close_dump_file. - Convert all uses of dump_rtl. - (decode_d_option): Iterate over dump_file to implement 'a' and to - locate pass-specific dumps. - -2000-04-01 Neil Booth - - * cppexp.c: Redefine priority constants. - (_cpp_parse_expr): Replace left and right priority scheme with - single priority logic. Move LOGICAL to same place as COMPARE. - Remove bogus check for multiple unary +/- operators. - -2000-04-01 Neil Booth - - * cppexp.c: (_cpp_parse_expr): Numerical constants are pushed - within the switch statement. Binary operations break out of - the switch naturally. '(' tokens handled by forcing - immediate shift. ')' handled by forcing immediate reduce to - the previous '('. New error messages. - -2000-03-31 Geoff Keating - - * config/rs6000/rs6000.c (print_operand): Don't use %l for 'low - part', it's already in use. Use %K instead. Add a return at the - end of what is now %K. - * config/rs6000/rs6000.md (elf_low): Use %K instead of %l. - -Sat Apr 1 02:05:29 MET DST 2000 Jan Hubicka - - * builtins.c (expand_builtin_apply): Pass proper parameters to - allocate_dynamic_stack_space. - * calls.c (emit_call_1): Do not adjust stack pointer for SIB, - update stack_pointer_delta; do not update arg_size_so_far. - (compute_argument_block_size): Use stack_delta instead of - stack_pointer_pending and arg_size_so_far. - (expand_call): Add sanity checking for stack_pointer_delta; - save and restore stack_pointer_delta for SIB, use - stack_pointer_delta for alignment; do not update arg_space_so_far. - (emit_library_call_value): Use stack_pointer_delta for alignment. - (store_one_arg): Do not update arg_space_so_far. - * explow.c (adjust_stack, anti_adjust_stack): Update - stack_pointer_delta. - (allocate_dynamic_stack_space): Add sanity checking for - stack_pointer_delta. - * expr.c (init_expr, clear_pending_stack_adjust): Clear - stack_pointer_delta. - (emit_push_insn): Update stack_pointer_delta. - * function.h (struct expr_status): Add x_stack_pointer_delta; - remove x_arg_space_so_far. - (arg_space_so_far): Remove. - (stack_pointer_delta): New macro. - -2000-03-31 Zack Weinberg - - * cpplib.h: Merge struct cpp_options into struct cpp_reader. - Reorder struct cpp_options and struct cpp_reader for better - packing. Replace CPP_OPTIONS macro with CPP_OPTION which - takes two args. Change all 'char' flags to 'unsigned char'. - Move show_column flag into struct cpp_options. Don't - prototype cpp_options_init. - * cpphash.h, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, - cppinit.c, cpplex.c, cpplib.c: - Replace CPP_OPTIONS (pfile)->whatever with - CPP_OPTION (pfile, whatever), and likewise for - opts = CPP_OPTIONS (pfile); ... opts->whatever; - - * cppinit.c (merge_include_chains): Take a cpp_reader *. - Extract CPP_OPTION (pfile, pending) and work with that - directly. - (cpp_options_init): Delete. - (cpp_reader_init): Turn on on-by-default options here. - Allocate the pending structure here. - (cl_options, enum opt_code): Define these from the same table, - kept in a large macro. Add -fshow-column and -fno-show-column - options. - - * cpperror.c (v_message): If show_column is off, don't print - the column number. - - * cppmain.c: Update for new interface. - * fix-header.c: Likewise. - -2000-03-30 Geoff Keating - - * config/rs6000/t-aix43 (AR_FLAGS_FOR_TARGET): Adjust for new - definition. - * Makefile.in (AR_FLAGS_FOR_TARGET): Is now the flags that - are passed to any invocation of AR_FOR_TARGET. - (AR_CREATE_FOR_TARGET): New macro. - (AR_EXTRACT_FOR_TARGET): New macro. - (ORDINARY_FLAGS_TO_PASS): Add AR_CREATE_FOR_TARGET, - AR_EXTRACT_FOR_TARGET. - (many places): Use AR_CREATE_FOR_TARGET, AR_EXTRACT_FOR_TARGET - in place of `$(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET)' and - `$(AR_FOR_TARGET) x'. Pass AR_CREATE_FOR_TARGET and - AR_EXTRACT_FOR_TARGET to sub-makes. - -2000-03-31 Neil Booth - - * cppexp.c: Delete SKIP_OPERAND. Correct priority - PAREN_INNER_PRIO. - (_cpp_parse_expr): Check for multiple unary +/- operators. - Correct priorities of ':' and '?'. Treat ')' as having a - value. Ensure conditional expression is not void. - -2000-03-31 Mark Mitchell - - * alias.c (canon_rtx): Make it global. - (rtx_equal_for_memref_p): CONST_INT equality is now pointer - equality. - * cse.c (struct table_elt): Add canon_exp. - (insert): Clear it. - (invalidate): Canonicalize expressions only once. - * rtl.h (canon_rtx): Declare. - -2000-03-30 Mark Mitchell - - * Makefile.in (emit-rtl.o): Depend on HASHTAB_H. - * alias.c (reg_known_value): Add comments. - (init_alias_analysis): Likewise. - * cse.c (exp_equiv_p): CONST_INTs are equal iff they have the same - address. - (cse_basic_block): Fix typo in comment. - * emit-rtl.c: Include hashtab.h. - (const_int_htab): New variable. - (const_int_htab_hash): New function. - (const_int_htab_eq): Likewise. - (rtx_htab_mark_1): Likewise. - (rtx_htab_mark): Likewise. - (gen_rtx_CONST_INT): Cache all CONST_INTs. - (unshare_all_rtx): Fix formatting. - (init_emit_once): Initialize const_int_htab. - * rtl.c (rtx_equal_p): CONST_INTs are equal iff they have the same - address. - * rtl.texi: Document the fact that all CONST_INTs with the same - value are shared. - -2000-03-30 Richard Henderson - - * alpha.h (FUNCTION_BOUNDARY): Reduce to 128 bits. - -2000-03-30 Zack Weinberg - - * configure.in: Comment out --enable-c-cpplib stanza. - * configure: Regenerate. - -Thu Mar 30 06:32:51 2000 Richard Kenner - - * expr.c (store_constructor): Properly compute displacement and - alignment when offset is variable. - - * expmed.c (store_bit_field, store_fixed_bit_field): Fix more - cases of alignment in bytes. - -Thu Mar 30 13:30:40 2000 Jeffrey A Law (law@cygnus.com) - - * c-parse.in (cast_expr): Move change from March 21 into c-parse.in - since it is used to generate c-parse.y. - * objc-parse.c, objc-parse.y: Regenerated. - - * function.c (expand_function_end): Pass alignment argument to - emit_block_move in bits, not bytes. - -Thu Mar 30 06:32:51 2000 Richard Kenner - - * expr.c (move_by_pieces_ninsns): Fix one more missing align - correction. - - * expmed.c (store_fixed_bit_field): STRUCT_ALIGN is in bits. - - * calls.c (expand_call): Pass bit alignment to mark_reg_pointer. - * explow.c (memory_address, allocate_dynamic_stack_space): Likewise. - * function.c (assign_parms): Likewise. - * integrate.c (expand_inline_function): Likewise. - * stmt.c (expand_decl): Likewise. - (copy_rtx_and_substitute): Likewise. - * expr.c (expand_expr, expand_expr_unaligned): Likewise. - (clear_by_pieces): Fix error in last change. - * emit-rtl.c (init_emit): Set known registers alignment in bits. - * function.h (regno_pointer_align): Now unsigned. - * config/arm/arm.c (alignable_memory_operand): REGNO_POINTER_ALIGN - is in bits. - * config/i386/i386.c (aligned_operand): Likewise. - * config/sparc/sparc.c (mem_min_alignment): Likewise. - * config/alpha/alpha.c (aligned_memory_operand): Likewise. - (unaligned_memory_operand): Likewise. - (alpha_expand_block_move, alpha_expand_block_clear): Likewise. - Also make alignments and sizes unsigned and some whitespace cleanup. - (alpha_va_start): Do nothing if VALIST's type is error_mark_node. - - * builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst. - (expand_builtin_apply): Pass alignment to emit_block_move in bits. - (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. - (expand_builtin_memset): Likewise, but to clear_storage. - * calls.c (save_fixed_argument_area): Likewise, to move_by_pieces. - (restore_fixed_argument_area): Likewise. - (store_unaligned_arguments_into_pseudos): Likewise, to store_bit_field. - (load_register_parameters): Likewise, to emit_group_load. - (expand_call): Likewise, to emit_group_store and emit_block_move. - (emit_library_call_value_1): Likewise, to emit_block_move. - (store_one_arg): Likewise, and to emit_push_insn. - * expmed.c (extract_bit_field): Alignment is in bits, not bytes. - (extract_fixed_bit_field, extract_split_bit_field): Likewise. - * expr.c (move_by_pieces, move_by_pieces_ninsns): Likewise. - (emit_block_move, emit_group_load, emit_group_store): Likewise. - (clear_by_pieces, clear_storage, emit_push_insn): Likewise. - (expand_assigment, store_expr, store_constructor_field): Likewise. - (expand_expr_unaligned, do_jump, do_compare_and_jump): Likewise. - (store_constructor, store_field, get_inner_reference): Likewise. - Use host_integerp and tree_low_cst; sizes and positions HOST_WIDE_INT. - (expand_expr, case COMPONENT_REF): Likewise. - (copy_blkmode_from_regs): Use UNSIGNED_HOST_WIDE_INT for sizes - and positions; reindent code. - * expr.h (emit_cmp_insn, emit_cmp_and_jump_insns): Alignment unsigned. - * function.c (purge_addressof_1): Pass bit align to store_bit_field. - (assign_parms): Likewise to emit_group_store. - * optabs.c (prepare_cmp_insn): Alignment is in bits. - (emit_cmp_and_jump_insns, emit_cmp_insn): Likewise, and also unsigned. - * stmt.c (expand_value_return): Pass align in bits to emit_group_load. - (expand_return): Likewise to {extract,store}_bit_field. - * stor-layout.c (get_mode_alignment): Minor cleanup. - * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Align is in bits. - * config/sh/sh.h (MOVE_BY_PIECES_P): Likewise. - -2000-03-29 Nick Clifton - - * config/arm/arm.h: Undo effects of previous delta: - (ASM_SPEC): Do not define. - (SUBTARGET_EXTRA_ASM_SPEC): Do not define. - - * config/arm/linux-elf.h: (SUBTARGET_EXTRA_ASM_SPEC) Fix - typo. - -2000-03-29 Zack Weinberg - - * cppinit.c (cpp_start_read): Call initialize_dependency_output - only after reading in the primary source file. - -2000-03-29 Geoff Keating - - * c-common.c (c_common_nodes_and_builtins): The first parameter to - __builtin_va_start and __builtin_va_copy is now either a 'va_list' - or a reference to a va_list. - * builtins.c (stabilize_va_list): Simplify now we don't have to - work around C array address decay. - * c-typeck.c (convert_for_assignment): Handle assignment to - a reference parameter by taking the address of the RHS. - * ginclude/stdarg.h (va_start): Don't take address of first parameter. - (va_copy): Likewise. - (__va_copy): Likewise. - * ginclude/varargs.h (va_start): Likewise. - (__va_copy): Likewise. - -Wed Mar 29 15:44:53 2000 Jeffrey A Law (law@cygnus.com) - - * i386/djgpp.h: Remove extraneous "+". - - * stmt.c (stmt_loop_nest_empty): Fix thinko in last change. - - * calls.c (expand_call): Fix typo in last change. - -2000-03-29 Jason Merrill - - * tree.c (unsave_expr_1): Don't mess with a TARGET_EXPR that hasn't - been expanded. - -Wed Mar 29 15:39:10 2000 Richard Kenner - - * stor-layout.c (bit_from_pos, byte_from_pos): New functions. - (pos_from_byte, pos_from_bit, normalize_offset): Likewise. - (normalize_rli, rli_size_so_far, rli_size_unit_so_far): Use them. - * tree.c (bit_position, byte_position): Likewise. - * tree.h: Declare new functions. - -2000-03-29 Nick Clifton - - * config/arm/arm.c: Minor formatting changes/ - * config/arm/arm.h (SUBTARGET_EXTRA_ASM_SPEC): Define if not - already defined. - (ASM_SPEC): Define if not already defined. - -2000-03-29 Zack Weinberg - - * cppfiles.c (cpp_read_file): Don't pass zero-length string to - _cpp_calc_hash. - -2000-03-29 Jakub Jelinek - - * dwarf2out.c (gen_enumeration_type_die): If enum has a negative - value, don't output it as unsigned. - -Wed Mar 29 10:53:49 2000 Jeffrey A Law (law@cygnus.com) - - * stmt.c (stmt_loop_nest_empty): Allow cfun->stmt to be NULL. - -2000-03-29 Kaveh R. Ghazi - - * c-common.c (c_common_nodes_and_builtins): Don't special case - cplus_mode when declaring builtin bzero/bcmp, always avoid - prototype arguments. - -2000-03-29 Bruce Korb - - * fixinc/mkfixinc.sh: Initially set the variable "fixincludes" - to a non-file - -Wed Mar 29 15:08:01 MET DST 2000 Jan Hubicka - - Convert ACCUMULATE_OUTGOING_ARGS to an expression. - * calls.c (PUSH_ARGS_REVERSED) Change to expression. - (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default value. - (struct arg_data): Remove #ifdef ACCUMULATE_OUTGOING_ARGS. - (save_fixed_argument_area, restore_fixed_argument_area): - conditionize by #ifdef REG_PARM_STACK_SPACE only. - (emit_call): Change #ifdefs on ACCUMULATE_OUTGOING_ARGS - to conditions, handle RETURN_POPS_ARGS on ACCUMULATE_OUTGOING_ARGS. - (precompute_register_parameters): Avoid #ifdefs on - ACCUMULATE_OUTGOING_ARGS and PUSH_ARGS_REVERSED. - (stire_one_args): Likewise. - (expand_call): Likewise; conditionize PUSH_ROUNDING code by PUSH_ARGS. - (emit_library_call_value_1): Likewise. - (compute_argument_block_size): Align to STACK_BOUNDARY only for - ACCUMULATE_OUTGOING_ARGS. - * combine.c (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Provide default - value. - (nonzero_bits): Conditionize PUSH_ROUNDING code by USE_PUSH. - (use_crosses_set_p): Likewise. - * all targets (ACCUMULATE_OUTGOING_ARGS define): Change to - #define ACCUMULATE_OUTGOING_ARGS 1. - * i386.c (ix86_compute_frame_size): Handle ACCUMULATE_OUTGOING_ARGS - frames. - * i386.h (MASK_NO_PUSH_ARGS, MASK_ACCUMULATE_OUTGOING_ARGS): New - constants. - (TARGET_PUSH_ARGS, TARGET_ACCUMULATE_OUTGOING_ARGS): New macros. - (TARGET_SWITCHES): Add push-args, no-push-args, - accumulate-outgoing-args and no-accumulate-outgoing-args. - (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): New macro. - * expr.c (ACCUMULATE_OUTGONG_ARGS, PUSH_ARGS): Provide default. - (push_block): Avoid ifdefs on ACCUMULATE_OUTGONG_ARGS - and PUSH_ROUNDING. - (emit_push_insn): Likewise. - * final.c (ACCUMULATE_OUTGOING_ARGS): Provide default. - (final_scan_insn): Avoid ifdefs on ACCUMULATE_OUTGOING_ARGS. - * function.c (ACCUMULATE_OUTGOING_ARGS): Provide default. - (STACK_DYNAMIC_OFFSET): Define correctly for both - ACCUMULATE_OUTGOING_ARGS and normal mode. - * invoke.texi (-mpush_args, -maccumulate-outgoing-args): Document. - * tm.texi (PUSH_ARGS): Document. - (ACCUMULATE_OUTGOING_ARGS, PUSH_ROUNDING): Update documentation. - -Wed Mar 29 11:51:13 MET DST 2000 Jan Hubicka - - * flags.h (flag_optimize_sibling_calls): Declare. - * calls.c (expand_call): Fail sibcall when - !flag_optimize_sibling_calls - * invoke.texi (flag_optimize_sibling_calls): Document. - * toplev.c (flag_optimize_sibling_calls): New global variable. - (f_options): Add flag_optimize_sibling_calls. - (rest_of_compilation): Conditionize - optimize_sibling_and_tail_recursive_calls by - flag_optimize_sibling_calls. - (main): Set flag_optimize_sibling_calls for -O2. - * stmt.c (expand_return): Conditionize tail recursion by - flag_optimize_sibling_calls. - -2000-03-29 Richard Henderson - - * config/i386/att.h (LOCAL_LABEL_PREFIX): Define. - (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Use it. - -2000-03-29 Nathan Sidwell - - * except.c (add_eh_table_entry): Mark type_info's as referenced. - -2000-03-29 Alexandre Oliva - - * config/rs6000/aix41.h (CPP_SPEC): Define _ANSI_C_SOURCE if -ansi - is given. - * config/rs6000/aix43.h (CPP_SPEC): Likewise. - * config/rs6000/rs6000.h (CPP_SPEC): Moved to... - * config/rs6000/aix.h: then modified likewise. - -2000-03-28 Richard Henderson - - * rtl.h: Redistribute enum reg_note documentation. - Kill trailing whitespace. - * rtl.c (reg_note_name): Adjust to match enum reg_note tweeks. - Kill trailing whitespace. - -2000-03-28 Zack Weinberg - - * cppfiles.c (hash_IHASH): Just return i->hash. - (cpp_included): Set dummy.hash using _cpp_calc_hash. Use - htab_find_with_hash. - (cpp_read_file): Likewise. - (find_include_file): Likewise. Properly initialize - ih->nshort. Share ih->name and ih->nshort if possible. - * cpphash.c (_cpp_calc_hash): New function. - (hash_HASHNODE): Just return h->hash. - (_cpp_lookup): Set dummy.hash using _cpp_calc_hash. Use - htab_find_with_hash. - * cpphash.h: Prototype _cpp_calc_hash. - * cppinit.c (initialize_builtins): Provide a valid hash - to _cpp_make_hashnode, using _cpp_calc_hash. - - * cpphash.c (collect_expansion): # is not a special character - in object-like macros. In -traditional mode, /**/ is not - token paste at the beginning or end of the line. - * cpplib.c (do_include, do_import, do_include_next): If - parse_include fails, return immediately. - -2000-03-28 Jason Merrill - - * config/arm/arm.md (return peepholes): Update to reflect the new - call insn patterns. - * config/arm/arm.c (arm_volatile_func): Also check - current_function_nothrow. - (output_return_instruction, output_func_prologue): Use it. - (arm_output_epilogue, arm_expand_prologue): Likewise. - -2000-03-27 Tom Tromey - - * gcc.c (handle_braces): In {x*...} case, break out of loop if - switch is found. - -Tue Mar 28 11:55:48 2000 Richard Kenner - - * expr.c (store_constructor): SIZE now signed. - For EXPR_SIZE, don't evaluate size; just needed if constant. - * fold-const.c (fold): Fix a number of cases when folded tree is - wrong type. - * function.c (flush_addressof): Reenable. - * tree.h (flush_addressof): Likewise. - * toplev.c (independent_decode_option): Look at strings_processed. - * config/alpha/alpha.h (MINIMUM_ATOMIC_ALIGNMENT): Cast to unsigned. - -Tue Mar 28 08:29:46 2000 Jan Hubicka - - * sibcall.c (identify_call_return_value): Find last call in the chain; - Allow stack adjustment after function call. - - * regmove.c (struct csa_memlist): Make mem field rtx *. - (record_one_stack_ref): Accept rtx * instead of rtx as parameter. - (try_apply_stack_adjustment): Replace whole MEM rtx. - (combine_stack_adjustments_for_block): Update calls - to record_one_stack_ref. - -2000-03-28 Neil Booth - - * cpplex.c (_cpp_read_and_prescan): Mark end of input buffer with - '\\' rather than a null character, so nulls are not special. Fix - "\\\n" handling in end-of-buffer conditions. Use trigraph map to - speed trigraph conversion. - (_cpp_init_input_buffer): Initialize trigraph map. - -2000-03-27 Alan Modra - - * config/i386/i386.c (output_387_binary_op): Correct intel - mode assembly output, and add spaces after commas in AT&T - output. Correct Unixware assembler comment. Document input - constraints. Comment fp operations. Reduce profligate buffer - size. Remove extraneous abort. Localize temp var. - (SYSV386_COMPAT): Define. Add !SYSV386_COMPAT code. - (output_fix_trunc): Add spaces after commas in assembly output. - -2000-03-27 Richard Henderson - - * i386-protos.h (ix86_match_ccmode): Declare. - * i386.c (ix86_match_ccmode): New. - (ix86_expand_fp_compare): Update for pattern renames. - (ix86_expand_strlensi_unroll_1): Likewise. - * i386.h (EXTRA_CC_MODES): Add CCZ. - (SELECT_CC_MODE): Use it for EQ/NE zero. - * i386.md (cmpsi_ccz_1): New. - (cmpqi_ccz_1): New. - (*testsi_ccz_1): New. - (testqi_ccz_1): New. - (cmpsi_ccno_1): Rename from cmpsi_0. - (testsi_ccno_1): Rename from testsi_1. - (testqi_ccno_1): Rename from testqi_1. - (*testqi_ext_ccz_0): Rename from testqi_ext_0. - (testqi_ext_ccno_0): Rename from *testqi_ext_1. - (*cmphi_0): Use ix86_match_ccmode. - (*cmpqi_ext_2, *addsi_2, *addhi_2, *addqi_2): Likewise. - (*subsi_2, *subhi_2, *subqi_2, *testhi_1): Likewise. - (*testqi_ext_1, *testqi_ext_2, *testqi_ext_3): Likewise. - (*andsi_2, *andhi_2, *andqi_2, *andqi_ext_0_cc): Likewise. - (*iorsi_2, *iorhi_2, *iorqi_2): Likewise. - (*xorsi_2, *xorhi_2, *xorqi_cc_1): Likewise. - (*one_cmplsi2_2, *one_cmplhi2_2, *one_cmplqi2_2): Likewise. - (*ashlsi3_cmpno, *ashlhi3_cmpno, *ashlqi3_cmpno): Likewise. - (*ashrsi3_cmpno, *ashrhi3_cmpno, *ashrqi3_cmpno): Likewise. - (*lshrsi3_cmpno, *lshrhi3_cmpno, *lshrqi3_cmpno): Likewise. - (appropriate peepholes): Likewise. - (*cmphi_1, *cmpqi_ccno_1, *cmpqi_1): Star out name. - (*subsi_3, *subhi_3, *subqi_3): Remove. - (*negdi2_1+1 splitter): Use CCZ for neg patterns. - (*negsi2_cmp, *neghi2_cmp, *negqi2_cmp): Remove. - (*negsi2_cmpz): Rename from *negsi2_cmpno, use CCZ. - (*neghi2_cmpz, *negqi2_cmpz): Similarly. - (x86_shift_adj_1): Use CCZ. - (*dbra_ge+1, *dbra_ge+2, ffssi2, ffssi_1): Likewise. - -2000-03-27 Stan Cox - - * resource.h (mark_resource_type): New. - * resource.c (find_dead_or_set_registers, mark_target_live_regs, - find_free_register): Use mark_resource_type. - (mark_set_resources): Change include_delayed_effects - to mark_resource_type. - * reorg.c (steal_delay_list_from_target, try_merge_delay_insns, - redundant_insn, fill_simple_delay_slots, fill_slots_from_thread): - Use mark_resource_type. - -2000-03-27 Richard Henderson - - * i386.md (call_pop_0, call_value_pop_0): New. - (call_pop_1): Remove constraint from unused arg. Support sibcalls. - (call_value_pop_1): Likewise. - (call_0, call_value_0): New. - (call_1, call_value_1): Remove constraint from unused arg. - -2000-03-27 Nick Clifton - - * invoke.texi (Spec Files): Document new spec % command created by - Tom Tromey's recent patch. - -2000-03-27 Jakub Jelinek - - * libgcc2.h (MIN_UNITS_PER_WORD): Define to UNITS_PER_WORD - if not defined. - -Mon Mar 27 06:04:22 2000 Richard Kenner - - * expr.c (expand_assignment): Fix typo in last change. - - * libgcc2.h: Use MIN_UNITS_PER_WORD, not UNITS_PER_WORD. - -Sun Mar 26 20:15:26 2000 Richard Kenner - - * c-convert.c (convert): Return if output or input type is ERROR_MARK. - * c-decl.c (duplicate_decls): Only look at DECL_BUILT_IN_NONANSI - and DECL_INLINE if FUNCTION_DECL. - (pushdecl, redeclaration_error_message): Likewise, for DECL_INLINE. - (store_parm_decls): Check for type of PARM_DECL being ERROR_MARK. - Use DECL_WEAK, not DECL_RESULT, to flag for already seen. - (combine_parm_decls): Likewise. - * ggc-common.c (gcc_mark_tree_children, case 'd'): Use DECL_RESULT_FLD. - * print-tree.c (print_node): Likewise. - Only test DECL_PACKED, DECL_INLINE, DECL_BIT_FIELD, and - DECL_TRANSPARENT_UNION on proper decl types. - Properly handly DECL_INCOMING_RTL and DECL_SAVED_INSNS. - * stor-layout.c (layout_decl): Only check DECL_PACKED and - DECL_BIT_FIELD of FIELD_DECL. - * tree.h (DECL_RESULT_FLD): New macro. - - * expr.c (expand_assignment): Add code to handle variable-sized - BLKmode case. - -2000-03-26 Richard Henderson - - * calls.c (expand_call): Pass parms not original exp to - optimize_tail_recursion. Mind return value instead of looking - for a barrier. - * stmt.c (optimize_tail_recursion): Take parameter list, not entire - call_expr. Move checks for call_expr and current_function_decl ... - (expand_return): ... here. - -2000-03-26 Tom Tromey - - * gcc.c (handle_braces): Recognize `%{ - - * jump.c (jump_optimize_1): Fix typo in elide optimizations - for minimal jump pass test. - -2000-03-26 Mark Mitchell - - * integrate.c (function_cannot_inline_p): Do inline functions that - return `void'. - -Sun Mar 26 11:37:55 2000 Richard Kenner - - * stor-layout.c (layout_type, set_sizetype): early_type_list is - now a list of TREE_LIST entries, not types. - * tree.c (build_common_tree_nodes_2): Eliminate dupliate type sets. - - * expmed.c (extract_bit_field): Ensure BITS_PER_WORD is signed in MAX. - * config/arm/pe.c (arm_pe_return_in_memory): Use host_integerp and - int_bit_position. - * config/mips/mips.c (function_arg): Likewise; also remove cast - and make variables unsigned or HOST_WIDE_INT and use tree_low_cst. - (mips_function_value): Use int_byte_position and make HOST_WIDE_INT. - * config/mips/abi64.h (SETUP_INCOMING_VARARGS): Offsets are unsigned. - * config/mips/mips.h (BITS_PER_WORD, UNITS_PER_WORD): Cast to unsigned. - (UNITS_PER_FPREG, INT_TYPE_SIZE, LONG_TYPE_SIZE): Likewise. - (POINTER_SIZE, POINTER_BOUNDARY,PARM_BOUNDARY): Likewise. - (GP_REG_P, FP_REG_P, MD_REG_P, ST_REG_P): Ensure subtraction signed. - (struct mips_arg): arg_number, arg_words, fp_arg_words, and - num_adjusts now unsigned. - (FUNCTION_ARG_BOUNDARY): Remove unneeded cast. - * config/sparc/sparc.c (struct function_arg_record_value_parms): - NREGS now unsigned. - (function_arg_record_value_1): STARTBITPOS arg now HOST_WIDE_INT - as is BITPOS variable; use host_integerp and int_bit_position. - (function_arg_record_value_2): Likewise. - (function_arg_record_value_3): Arg BITPOS now HOST_WIDE_INT. - Variable REGNO now unsigned. - (function_arg_record_value): NREGS now unsigned. - -2000-03-26 Bernd Schmidt - - * jump.c (mark_all_labels): Handle CALL_PLACEHOLDERs. - -Sat Mar 25 09:12:10 2000 Richard Kenner - - * Rework fields used to describe positions of bitfields and - modify sizes to be unsigned and use HOST_WIDE_INT. - * alias.c (reg_known_value_size): Now unsigned. - * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. - (really_start_incremental_init): Use bitsize_zero_node. - (push_init_level, pop_init_level, output_init_element): Likewise. - Use bitsize_unit_node and bitsize_one_node. - (output_pending_init_elements, process_init_element): Likewise. - * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. - (make_extraction): Position and length HOST_WIDE_INT and unsigned - HOST_WIDE_INT, respectively. - (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. - (num_sign_bit_copies): Returns unsigned. - BITWIDTH now unsigned; rework arithmetic. - Remove recursive call from arg to MAX. - (combine_instructions, init_reg_last_arrays): NREGS now unsigned. - (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): - REGNO now unsigned. - (set_nonzero_bit_and_sign_copies): NUM now unsigned. - (find_split_point, expand_compound_operation, make_extraction): LEN - now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. - (make_field_assignment): Likewise. - (combine_simplify_rtx): Add cast. - (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. - (force_to_mode): WIDTH now unsigned; add cast. - (if_then_else_cond): SIZE now unsigned. - (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. - (extended_count): Now returns unsigned. - (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. - Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. - (simplify_comparison): MODE_WIDTH now unsigned. - (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. - (mark_used_regs_combine): Likewise; rework arithmetic. - (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. - (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. - (record_promoted_value): REGNO now unsigned. - (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. - (get_last_value): REGNO now unsigned. - (use_crosses_set_p): REGNO and ENDREGNO now unsigned. - (reg_dead_regno, reg_dead_endregno): Now unsigned. - (remove_death): Arg REGNO now unsigned. - (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. - (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO - now unsigned. - * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. - * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. - (struct cse_reg_info): REGNO now unsigned. - (cached_regno): Now unsigned. - (REGNO_QTY_VALID_P): Add cast. - (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. - (remove_invalid_regs): Likewise. - (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned - as are variables END and I. - (get_cse_reg_info, insert): Likewise. - (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. - (canon_hash): Likewise. - (insert_regs, lookup_for_remove): REGNO now unsigned. - (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. - New variable RN. - * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. - * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. - * emit-rtl.c (subreg_realpart_p): Add cast. - (operand_subword): Arg I is now unsigned as is var PARTWORDS. - (operand_subword_force): Arg I is now unsigned. - * except.c (eh_regs): Variable I is now unsigned. - * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. - * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; - length is unsigned HOST_WIDE_INT; likewise for internal variables. - (store_split_bit_field, extract_fixed_bit_field): Likewise. - (extract_split_bit_field, store_bit_field, extract_bit_field): - Likewise. - * expr.c (store_constructor_fields, store_constructor, store_field): - Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. - (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. - (do_jump): Likewise. - (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): - MAX_SIZE is now unsigned. - (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. - (emit_group_store): Likewise. - (emit_move_insn): I now unsigned. - (store_constructor): Use host_integerp, tree_low_cst, and - bitsize_unit_node. - (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. - Rework all calculations to use trees and new fields. - * expr.h (promoted_input_arg): Regno now unsigned. - (store_bit_field, extract_bit_field): Adjust types of pos and size. - (mark_seen_cases): Arg is HOST_WIDE_INT. - * flow.c (verify_wide_reg_1): REGNO now unsigned. - * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; - precisions and alignments are unsigned. - (optimize_bit_field_compare, fold_truthop): Likewise. - (int_const_binop): Adjust threshold for size_int_type_wide call. - (fold_convert): Likewise. - (size_int_type_wide): Make table larger and fix thinko that only - had half of table used. - (all_ones_mask_p, fold): Precisions are unsigned. - * function.c (put_reg_info_stack): REGNO is unsigned. - (instantiate_decl): Size is HOST_WIDE_INT. - (instantiate_virtual_regs): I is unsigned. - (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. - (promoted_input_arg): REGNO is unsigned. - * function.h (struct function): x_max_parm_reg is now unsigned. - * gcse.c (max_gcse_regno): Now unsigned. - (struct null_pointer_info): min_reg and max_reg now unsigned. - (lookup_set, next_set): REGNO arg now unsigned. - (compute_hash_table): REGNO and I now unsigned. - (handle_avail_expr): regnum_for_replacing now unsigned. - (cprop_insn): REGNO now unsigned. - (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. - * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. - * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. - * hard-reg-set.h (reg_class_size): Now unsigned. - * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. - * jump.c (mark_modified_reg): I now unsigned; add cast. - (rtx_equal_for_thread_p): Add cast. - * loop.c (max_reg_before_loop): Now unsigned. - (struct_movable): REGNO now unsigned. - (try_copy_prop): REGNO arg unsigned. - (regs_match_p): XN and YN now unsigned. - (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. - (strength_reduce): Likewise; NREGS also unsigned. - (first_increment_giv, last_increment_giv unsigned): Now unsigned. - * loop.h (struct iv_class): REGNO now unsigned. - (max_reg_before_loop, first_increment_giv, last_increment_giv): - Now unsigned. - * machmode.h (mode_size, mode_unit_size): Now unsigned. - (mode_for_size, smallest_mode_for_size): Pass size as unsigned. - * optabs.c (expand_binop): I and NWORDS now unsigned. - (expand_unop): I now unsigned. - * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do - print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. - * real.c (significand_size): Now returns unsigned. - * real.h (significand_size): Likewise. - * regclass.c (reg_class_size): Now unsigned. - (choose_hard_reg_mode): Both operands now unsigned. - (record_reg_classes): REGNO and NR now unsigned. - (reg_scan): NREGS now unsigned. - (reg_scan_update): old_max_regno now unsigned. - (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. - * reload.c (find_valid_class): BEST_SIZE now unsigned. - (find_dummy_reload): REGNO, NWORDS, and I now unsigned. - (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. - Likewise for variable R. - (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, - as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. - (find_equiv_reg): Add casts. - (regno_clobbered_p): Arg REGNO now unsigned. - * reload.h (struct reload): NREGS now unsigned. - (refers_to_regno_for_reload_p): Regno args are unsigned. - (regno_clobbered_p): Likewise. - * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. - (compute_use_by_pseudos): REGNO now unsigned. - (find_reg): I and J now unsigned, new variable K, and change loop - variables accordingly; THIS_NREGS now unsigned. - (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. - (spill_hard_reg): REGNO arg now unsigned; add casts. - (forget_old_reloads_1): REGNO, NR, and I now unsigned. - (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. - (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, - END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. - (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. - (choose_reload_regs): MAX_GROUP_SIZE now unsigned. - (emit_reload_insns): REGNO now unsigned. - (reload_cse_move2add): Add cast. - (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO - and rework loop. - * resource.c (mark_referenced_resources, mark_set_resources): New - variable R; REGNO and LAST_REGNO now unsigned. - (mark_target_live_regs): J and REGNO now unsigned. - * rtl.c (mode_size, mode_unit_size): Now unsigned. - * rtl.h (union rtunion_def): New field rtuint. - (XCUINT): New macro. - (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. - (operand_subword, operand_subword_force): Word number is unsigned. - (choose_hard_reg_mode): Operands are unsigned. - (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. - (find_regno_note, find_regno_fusage, replace_regs): Likewise. - (regno_use_in, combine_instructions, remove_death): Likewise. - (reg_scan, reg_scan_update): Likewise. - (extended_count): Return is unsigned. - * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, - INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. - (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. - (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. - (reg_reg_last_1): FIRS and LAST now unsigned. - (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. - (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO - now unsigned. - (find_regno_note, regno_use_in): Arg REGNO now unsigned. - (find_regno_fusage): Likewise; also var REGNOTE now unsigned. - (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. - (replace_regs): Arg NREGS now unsigned. - * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. - * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. - (simplify_binary_operation): Likewise. - (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and - THIS_LAST now unsigned. - (cselib_record_set): Add cast. - * ssa.c (ssa_max_reg_num): Now unsigned. - (rename_block): REGNO now unsigned. - * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; - sizes now unsigned. - (all_cases_count): Just return -1 not -2. - COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. - Rework tests to use trees whenever possible. - Use host_integerp and tree_low_cst. - (mark_seen_cases): COUNT arg now HOST_WIDE_INT; - Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. - (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. - * stor-layout.c (mode_for_size): SIZE arg now unsigned. - (smallest_mode_for_size): Likewise. - (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. - KNOWN_ALIGN is now an alignment, so simplify code. - Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. - (start_record_layout): Renamed from new_record_layout_info. - Update to new fields. - (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): - New functions. - (place_union_field): Renamed from layout_union_field. - Update to use new fields in rli. - (place_field): Renamed from layout_field. - Major rewrite to use new fields in rli; pass alignment to layout_decl. - (finalize_record_size): Rework to use new fields in rli and handle - union. - (compute_record_mode): Rework to simplify and to use new DECL fields. - (finalize_type_size): Make rounding more consistent. - (finish_union_layout): Deleted. - (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. - (layout_type, case RECORD_TYPE): Call new function names. - (initialize_sizetypes): Set TYPE_IS_SIZETYPE. - (set_sizetype): Set TYPE_IS_SIZETYPE earlier. - (get_best_mode): UNIT is now unsigned; remove casts. - * tree.c (bit_position): Compute from new fields. - (byte_position, int_byte_position): New functions. - (print_type_hash_statistics): Cast to remove warning. - (build_range_type): Use host_integerp and tree_low_cst to try to hash. - (build_index_type): Likewise; make subtype of sizetype. - (build_index_2_type): Pass sizetype to build_range_type. - (build_common_tree_nodes): Use size_int and bitsize_int to - initialize nodes; add bitsize_{zero,one,unit}_node. - * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. - (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. - (DECL_PACKED, DECL_BIT_FIELD): Likewise. - (DECL_FIELD_BITPOS): Deleted. - (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. - (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. - (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. - (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. - (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. - (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. - (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. - (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. - (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. - (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. - (DECL_ALIGN): Adjust to new field in union. - (DECL_OFFSET_ALIGN): New field. - (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. - (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. - (union tree_decl): Add struct for both aligns. - (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. - (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. - (struct record_layout_info): Rework fields to have offset - alignment and byte and bit position. - (start_record_layout, place_field): Renamed from old names. - (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. - (byte_position, int_byte_position): Likewise. - (get_inner_reference): Change types of position and length. - * unroll.c (unroll_loop): New variable R; use for some loops. - MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. - (calculate_giv_inc): Arg REGNO now unsigned. - (copy_loop_body): REGNO and SRC_REGNO now unsigned. - * varasm.c (assemble_variable): Clean up handling of size using - host_integerp and tree_low_cst. - (decode_addr_const): Use byte, not bit, position. - (output_constructor): bitpos and offsets are HOST_WIDE_INT; - use tree_low_cst and int_bit_position. - * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. - -Fri Mar 24 20:13:49 2000 Jason Eckhardt - - * bb-reorder.c (REORDER_MOVED_BLOCK_END): Removed. - (reorder_block_def): New members eff_head and eff_end. - (REORDER_BLOCK_EFF_HEAD, REORDER_BLOCK_EFF_END): New macros. - (verify_insn_chain): New function. - (skip_insns_between_block): Add code to skip deleted insns. - Check for note before using. - (chain_reorder_blocks): Replace calls to skip_insns_between_block - with references to REORDER_BLOCK_EFF_HEAD and REORDER_BLOCK_EFF_END. - Check for note before using. - (make_reorder_chain): Use INTVAL rather than XINT to get REG_BR_PROB. - (fixup_reorder_chain): Restructure, clean up, defect removal. - (reorder_basic_blocks): Remove last_insn and references to it. - Moved insn chain verification code into a new function (see above). - Delete defective code that sets last insn. - Initialize REORDER_BLOCK_EFF_HEAD and REORDER_BLOCK_EFF_END for - all blocks. - -2000-03-25 Michael Hayes - - * config/c4x/c4x.h (CPP_SPEC): Remove erroneous space. - -2000-03-24 Richard Henderson - - * tree.c (lang_safe_for_unsave): Remove. - (unsafe_for_reeval): Transmute and rename from safe_for_unsave, - allowing for two levels of unsafeness. Remove lang hook. - * tree.h: Update declarations. - * calls.c (expand_call): Rename safe_for_reeval to try_tail_call. - Create temporary VAR_DECLs to protect very unsafe_for_reeval trees. - Always fail sibcalls when there are pending cleanups. - -2000-03-24 Geoff Keating - - * flow.c (propagate_block): When we delete an ADDR_VEC, - also delete the BARRIER following it if there is one. - -2000-03-24 Richard Henderson - - * builtins.c (expand_builtin_bzero): Convert `length' argument - to sizetype. - -2000-03-24 Jakub Jelinek - - * sibcall.c (skip_copy_to_return_value): Use OUTGOING_REGNO for - comparison if regno's are equal. - * calls.c (initialize_argument_informat): Add ecf_flags argument. - Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL. - (expand_call): Update caller. - Avoid making a sibling call if argument size of the callee is larger - than argument size of the caller. - Call hard_function_value with outgoing set if in sibcall pass. - Use FUNCTION_INCOMING_ARG if available and ECF_SIBCALL. - - * final.c (permitted_reg_in_leaf_functions, only_leaf_regs_used): - Change LEAF_REGISTERS from an array initializer to actual array - identifier. Move static global variable into the function. - (leaf_function_p): Allow SIBLING_CALL_P calls even outside of - sequences for leaf functions. - * global.c (global_alloc): Likewise. - * tm.texi (LEAF_REGISTERS): Update documentation. - - * config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Remove the ugly - TARGET_FLAT leaf disabling hack. - (LEAF_REGISTERS): Changed from an array initializer to actual array - identifier to avoid duplication and remove the above hack. - (FUNCTION_OK_FOR_SIBCALL): Define. - * config/sparc/sparc.md (sibcall): New attr type. Use it almost - always like call attribute. - (eligible_for_sibcall_delay): New attribute. - (sibcall): New delay type. - (sibcall, sibcall_value, sibcall_epilogue): New expands. - (sibcall_symbolic_sp32, sibcall_symbolic_sp64, - sibcall_value_symbolic_sp32, sibcall_value_symbolic_sp64): New insns. - * config/sparc/sparc.c (sparc_leaf_regs): New array. - (eligible_for_sibcall_delay, output_restore_regs, output_sibcall): - New functions. - (output_function_epilogue): Move part of the code into - output_restore_regs. - (ultra_code_from_mask, ultrasparc_sched_reorder): Handle - TYPE_SIBCALL. - * sparc-protos.h (output_sibcall, eligible_for_sibcall_delay): New - prototypes. - - * config/sparc/sparc.h (REVERSIBLE_CC_MODE): Revert Jan, 25 change - until infrastructure is finished. - -Fri Mar 24 13:49:45 2000 Jeffrey A Law (law@cygnus.com) - - * integrate.c (save_for_inline_nocopy): Clear in_nonparm_insns here. - (save_parm_insns): Not here. - -2000-03-24 Kaveh R. Ghazi - - * builtins.c (expand_builtin_bzero): New function. - (expand_builtin): Handle bzero. - - * builtins.def: Add BUILT_IN_BZERO. - - * c-common.c (c_common_nodes_and_builtins): Provide builtin - prototype & function for bzero. - -2000-03-23 Michael Meissner - - * config/alpha/alpha.md (TF floating point insns): Undo 2000-03-21 - change adding TARGET_FP to the TF floating point insns, except for - trunctfsf2, which generates direct calls to truncdfsf2. - -2000-03-23 Geoff Keating - - * config/rs6000/rs6000.h (ARG_POINTER_CFA_OFFSET): New definition, - try to protect against middle-end changes that break binary - compatibility. - (DWARF_FRAME_REGISTERS): New definition, likewise for backend. - -2000-03-24 Michael Hayes - - * config/c4x/c4x.md (load_immed_address): Add DP reg clobber. - -Thu Mar 23 17:10:48 2000 Richard Kenner - - * calls.c (expand_call): If TARGET is passed by reference and - is readonly, write a CLOBBER. - -2000-03-23 Kaveh R. Ghazi - - * builtins.c (expand_builtin): Handle bcmp. - - * builtins.def: Add BUILT_IN_BCMP. - - * c-common.c (c_common_nodes_and_builtins): Provide builtin - prototype & function for bcmp. - -Thu Mar 23 11:34:39 2000 Jim Wilson - - * config/ia64/ia64.c (rtx_needs_barrier, case UNSPEC): Move case 6... - (rtx_needs_barrier, case UNSPEC_VOLATILE): to here. - * config/ia64/ia64.md (pr_restore): Change UNSPEC to UNSPEC_VOLATILE. - -Thu Mar 23 16:04:40 2000 Andrew Haley - - * config/mips/mips.md (movdf_internal1a): Delete (set 'f', 'F') - alternative when using -fp64 -gp32. - -2000-03-22 Jason Merrill - - * config/rs6000/rs6000.h (DWARF_FRAME_RETURN_COLUMN): Define. - * config/alpha/alpha.h (DWARF_FRAME_RETURN_COLUMN): Define. - * config/sparc/sparc.h (DWARF_FRAME_RETURN_COLUMN): Define. - - * frame.h (frame_state): Revert last change. - * frame.c (execute_cfa_insn): Just don't record the save of a CFA reg. - * libgcc2.c (throw_helper): Revert last change. - -2000-03-22 Richard Henderson - - * stmt.c (expand_asm_operands): Don't promote the temporary. - -2000-03-22 Theodore Papadopoulo - - * builtin.c (get_pointer_alignment): Use DECL_P and TYPE_P macros. - * c-common.c (decl_attributes,check_format_info,truthvalue_conversion, - c_get_alias_set): Likewise. - * c-decl.c (duplicate_decls): Likewise. - * c-typeck.c (default_conversion,build_unary_op): Likewise. - * calls.c (initialize_argument_information): Likewise. - * dwarf2out.c (decl_class_context,add_abstract_origin_attribute): - Likewise. - * dwarfout.c (decl_class_context,output_type): Likewise. - * expr.c (get_inner_reference): Likewise. - * fold-const.c (simple_operand_p,fold): Likewise. - * function.c (aggregate_value_p): Likewise. - * stmt.c (expand_asm_operands): Likewise. - * varasm.c (named_section): Likewise. - -2000-03-22 Jason Merrill - - Implement dwarf2 exception handling for the ARM. - * config/arm/arm.h (INCOMING_RETURN_ADDR_RTX): Define. - (DWARF_FRAME_RETURN_COLUMN): Define. - * config/arm/arm.c (emit_multi_reg_push): Return rtx. Attach - REG_FRAME_RELATED_EXPR note. - (emit_sfm): Likewise. - (arm_expand_prologue): Set RTX_FRAME_RELATED_P on everything. - * dwarf2out.c (reg_save): Handle saving a register to itself. - (dwarf2out_frame_debug_expr): Handle an intermediate cfa reg. - * except.c (eh_regs): Don't use the static chain reg if it's - callee-saved. - * frame.h (frame_state): Add cfa_saved field. - * frame.c (execute_cfa_insn): Set it. - * libgcc2.c (throw_helper): Don't adjust sp if it's restored in - the epilogue. - * function.c (ARG_POINTER_CFA_OFFSET): Default to FIRST_PARM_OFFSET. - Now takes a parm. - (instantiate_virtual_regs): Adjust. - * tm.texi: Adjust. - * config/m68k/m68k.h (ARG_POINTER_CFA_OFFSET): Don't define. - * config/ns32k/ns32k.h (ARG_POINTER_CFA_OFFSET): Don't define. - * config/sparc/sparc.h (ARG_POINTER_CFA_OFFSET): Take a parm. - - * dwarf2out.c (reg_number): Refer to FIRST_PSEUDO_REGISTER. - (initial_return_save): Use DWARF_FRAME_REGNUM, not reg_number. - -2000-03-22 Kaveh R. Ghazi - - * builtins.def: New file. - - * Makefile.in (TREE_H): Depend on builtins.def. - - * builtins.c (built_in_names): Use builtins.def. - - * tree.h (built_in_function): Likewise. - -2000-03-22 Mark Mitchell - - * tree.c (size_in_bytes): Return size_zero_node, not - integer_zero_node. - -2000-03-22 Geoff Keating - - * config/fp-bit.c (pack_d): Correct the case when a denormal - is rounded up and stops being denormal. - -2000-03-21 Richard Henderson - - * config/alpha/alpha.c (function_arg): Check for void_type_node - before using MUST_PASS_IN_STACK. - -2000-03-21 Stephane Carrez - - * regmove.c (combine_stack_adjustments_for_block): Check that - the stack pointer is a valid memory address. - -Wed Mar 22 11:44:50 MET 2000 Jan Hubicka - - * calls.c: re-install Mar 16 emit_library_call merge. - -2000-03-21 Jakub Jelinek - - * config/sparc/sparc.c (mem_min_alignment): If not optimizing, - we cannot be sure that if reload_completed base register will - be properly aligned. - -2000-03-21 Richard Henderson - - * flow.c (delete_block): Fix typo last change. - -2000-03-21 Mark Mitchell - - * c-common.c (c_expand_expr_stmt): Use COMPLETE_TYPE_OR_VOID_P, - not COMPLETE_TYPE_P, to check the type of the expression. - -2000-03-21 Michael Meissner - - * config/alpha/alpha.md (floating point insns): Add TARGET_FP to - all floating point insns that just tested the macro - TARGET_HAS_XFLOATING_LIBS. - (movsf/movdf recognizers): Add separate insns if -mno-fp-regs is - used to only use the gprs. - -2000-03-21 Nathan Sidwell - - * tree.h (COMPLETE_TYPE_P): New macro. - (COMPLETE_OR_VOID_TYPE_P): New macro. - (COMPLETE_OR_UNBOUND_ARRAY_TYPE_P): New macro. - * stor-layout.c (layout_type, case VOID_TYPE): Don't set TYPE_SIZE. - * c-aux-info.c (gen_type): Use them. - * c-common.c (c_expand_expr_stmt): Likewise. - * c-decl.c (poplevel, pushdecl, start_decl, finish_decl, - grokdeclarator, grokparms, finish_struct, start_function, - store_parm_decls, combine_parm_decls): Likewise. - * c-parse.y (cast_expr): Likewise. - * c-typeck.c (require_complete_type, c_sizeof, c_sizeof_nowarn, - c_size_in_bytes, c_alignof, build_component_ref, - build_indirect_ref, build_array_ref, convert_arguments, - build_binary_op, pointer_diff, build_unary_op, digest_init: Likewise. - * calls.c (initialize_argument_information): Likewise. - * convert.c (convert_to_integer): Likewise. - * dbxout.c (dbxout_typedefs, dbxout_type, dbxout_symbol): Likewise. - * dwarfout.c (location_or_const_value_attribute, - output_enumeration_type_die, output_structure_type_die, - output_union_type_die, output_type): Likewise. - * expr.c (safe_from_p, expand_expr): Likewise. - * function.c (assign_parms): Likewise. - * sdbout.c (sdbout_symbol, sdbout_one_type): Likewise. - * tree.c (build_array_type, build_function_type, - build_method_type, build_offset_type, build_complex_type): Likewise. - * c-parse.c, c-parse.h: Regenerated. - -2000-03-21 Michael Hayes - - * config/c4x/rtems.h: Include config/rtems.h. - -Tue Mar 21 09:24:00 2000 Denis Chertykov - - * config/avr/avr.c (encode_section_info): sets SYMBOL_REF_FLAG if - decl is a FUNCTION_DECL - -Mon Mar 20 19:53:53 2000 Jim Wilson - - * config/ia64/ia64.c (ia64_expand_prologue): Don't abort if leaf - function uses output registers. Don't save RP for leaf functions. - Do save RP even if no epilogue. - * config/ia64/ia64.h (FIXED_REGISTERS): Unmark in/out registers. - (CALL_USED_REGISTERS): Unmark in registers. - (REG_ALLOC_ORDER): Move out regs up, to near the top. Move in regs up, - to near the middle. - -2000-03-20 Geoff Keating - - * config/rs6000/rs6000.md (bunordered): New expander. - (bordered): New expander. - (buneq): New expander. - (bunge): New expander. - (bungt): New expander. - (bunle): New expander. - (bunlt): New expander. - (bltgt): New expander. - - * config/rs6000/rs6000.c (ccr_bit): Handle unordered comparisons. - (ccr_bit_negated_p): New function. - (print_operand): For %C, generate appropriate cror for UNEQ, - UNLT, UNGT, and LTGT. For %T and %t, use ccr_bit_negated_p. - -2000-03-20 Andreas Jaeger - - * sdbout.c (sdbout_one_type): Add braces to avoid "ambigous else" - warning. - - * tree.h (safe_for_unsave): Prototype. - -2000-03-20 Richard Henderson - - * regmove.c (stack_memref_p): Fix typo, reorg for readability. - (combine_stack_adjustments_for_block): Don't allow sp references - in the side of a set we're not fixing up. - * toplev.c (rest_of_compilation): Run combine_stack_adjustments - after life_analysis. - -2000-03-20 Richard Henderson - - * calls.c (expand_call): Don't bother generating tail call - sequences if there are pending cleanups. Use - expand_start_target_temps/expand_end_target_temps to elide - cleanups created during sibcall expansion. - -2000-03-20 Geoff Keating - - * configure.in: Set $IFS to a value if it doesn't already have one - in the --enable-checking handling. - * configure: Regenerate. - -2000-03-20 Martin v. Löwis - - * c-parse.in (SAVE_WARN_FLAGS): Use size_int. - * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: - Regenerated. - -Mon Mar 20 11:43:15 MET 2000 Jan Hubicka - - * jump.c (delete_noop_moves): Remove code attempting to - combine stack adjustments. - -2000-03-19 Martin v. Löwis - - * emit-rtl.c (push_to_full_sequence, end_full_sequence): New functions. - * except.c (emit_cleanup_handler): Use them. - (expand_end_all_catch): Likewise. - * function.c (fixup_var_refs): Likewise. - (expand_function_end): Clear catch_clauses_last. - * rtl.h (push_to_full_sequence, end_full_sequence): Declare. - * except.h (struct eh_status): New field x_catch_clauses_last. - (catch_clauses_last): New define. - - * Makefile.in (tree.o): Depend on HASHTAB_H. - * tree.c: Include hashtab.h. - (struct type_hash): Remove next field. - (TYPE_HASH_SIZE): Remove. - (TYPE_HASH_INITIAL_SIZE): New define. - (type_hash_table): Change type to htab_t. - (type_hash_eq, type_hash_hash, print_type_hash_statistics, - mark_hash_entry): New functions. - (init_obstacks): Allocate type hash. - (type_hash_lookup): Use htab functions. - (type_hash_add, mark_type_hash): Likewise. - (dump_tree_statistics): Call print_type_hash_statistics. - -2000-03-19 Kaveh R. Ghazi - - * rs6000/t-aix41: New file. - - * configure.in ({rs6000,powerpc}-ibm-aix4.[12]*): Use it. - -Sun Mar 19 13:27:30 2000 Hans-Peter Nilsson - - * tm.texi (Driver): Fix typos and tweak entry for - INCLUDE_DEFAULTS. - Move misplaced STRUCT_FORCE_BLK entry ... - (Storage Layout): ... to here. - (Run-time Target): Recommend having TARGET_MASK_... helper macros. - -2000-03-19 Richard Henderson - - * flow.c (delete_block): Delete the addr_vec along with the block. - (flow_delete_insn): Decrement LABEL_NUSES when deleting insns that - reference labels. - - * fold-const.c (extract_muldiv): Apply type check for defined - overflow to multiply as well as divide. - - * stor-layout.c (layout_decl): Don't abort on any zero sized decl. - -2000-03-18 Mark Mitchell - - * emit-rtl.c (remove_unnecessary_notes): Check that all - NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes have an - associated NOTE_BLOCK. - * function.h (identify_blocks): Update comments. - (reorder_blocks): Declare. - * function.c (identify_blocks): Don't take paramters. - (reorder_blocks): Don't take parameters. - * loop.h (find_loop_tree_blocks): Remove. - (unroll_block_trees): Likewise. - * loop.c (loop_optimize): Don't call find_loop_tree_blocks. Use - reorder_blocks instead of unroll_block_trees.h - * sibcall.c (optimize_sibling_and_tail_recursive_calls): Likewise. - * stmt.c (find_loop_tree_blocks): Remove. - (unroll_block_trees): Likewise. - * toplev.c (rest_of_compilation): Don't call find_loop_tree_blocks - in whole-function mode. - * tree.h (reorder_blocks): Remove declaration. - - * expr.c: Include intl.h. - * Makefile.in (expr.o): Depend on intl.h. - -2000-03-18 Richard Henderson - - * expr.c (emit_move_insn_1): Clarify cannot_inline message. - -2000-03-18 Mark Mitchell - - * tree.h (tree_index): Remove enumerals for integer types. - (integer_type_kind): New type. - (integer_types): New variable. - (char_type_node): Adjust. - (signed_char_type_node): Likewise. - (unsigned_char_type_node): Likewise. - (short_integer_type_node): Likewise. - (short_unsigned_type_node): Likewise. - (integer_type_node): Likewise. - (unsigned_type_node): Likewise. - (long_integer_type_node): Likewise. - (long_unsigned_type_node): Likewise. - (long_long_integer_type_node): Likewise. - (long_long_unsigned_type_node): Likewise. - * tree.c (integer_types): New variable. - (init_obstacks): Register it as a root. - -Sat Mar 18 14:38:00 2000 Jason Eckhardt - - * bb-reorder.c (reorder_basic_blocks): Update PREV_INSN as well as - NEXT_INSN. Update last insn in chain. - -2000-03-17 Jason Merrill - - * dwarf2out.c (dwarf2out_decl): Don't emit anything for types - with TYPE_DECL_SUPPRESS_DEBUG set. - -2000-03-18 Richard Henderson - - * flow.c (make_edges): Use INTVAL to access REG_EH_REGION value. - -2000-03-18 Richard Henderson - - * i386.c (call_insn_operand): Always allow SYMBOL_REF, - care for HALF_PIC_P. - (expander_call_insn_operand): Remove. - (ix86_expand_epilogue): New arg `emit_return' to control return insn. - * i386.h (PREDICATE_CODES): Update. - * i386.md (all call expanders): Remove predicates, remove special - handling for half-pic. - (*call_1, *call_value_1): Handle SIBLING_CALL_P insns. - (*call_pop_pic2, *call_pic2, *call_value_pop_2, *call_value_2): Remove. - (sibcall_epilogue): New. - -2000-03-17 Richard Henderson - - * rtlanal.c (single_set): Reject if the parallel has anything - except SET or USE or CLOBBER. - -2000-03-17 Jeff Law - Richard Henderson - - * Makefile.in (OBJS): Add sibcall.o. - (sibcall.o): New. - * sibcall.c: New file. - * calls.c (FUNCTION_OK_FOR_SIBCALL): Provide default. - (ECF_IS_CONST, ECF_NOTHROW, ECF_SIBCALL): New. - (emit_call_1): Replace `is_const' and `nothrow' with `ecf_flags'. - Emit sibcall patterns when requested. Update all callers. - (expand_call): Generate CALL_PLACEHOLDER insns when tail call - elimination seems feasable. - * final.c (leaf_function_p): Sibling calls don't discount being - a leaf function. - * flow.c (HAVE_sibcall_epilogue): Provide default. - (find_basic_blocks_1): Sibling calls don't throw. - (make_edges): Make edge from sibling call to EXIT. - (propagate_block): Don't remove sibcall_epilogue insns. - * function.c (prologue, epilogue): Turn into varrays. Update all uses. - (sibcall_epilogue): New. - (fixup_var_refs): Scan CALL_PLACEHOLDER sub-sequences. - (identify_blocks_1): Likewise. Break out from ... - (identify_blocks): ... here. - (reorder_blocks_1): Scan CALL_PLACEHOLDER. Break out from ... - (reorder_blocks): ... here. - (init_function_for_compilation): Zap prologue/epilogue as varrays. - (record_insns): Extend a varray instead of mallocing new memory. - (contains): Read a varray not array of ints. - (sibcall_epilogue_contains): New. - (thread_prologue_and_epilogue_insns): Emit and record - sibcall_epilogue patterns. - (init_function_once): Allocate prologue/epilogue varrays. - * genflags.c (gen_insn): Treat sibcall patterns as calls. - * integrate.c (save_parm_insns): Recurse on CALL_PLACEHOLDER patterns. - Broken out from ... - (save_for_inline_nocopy): ... here. - (copy_insn_list): Recurse on CALL_PLACEHOLDER patterns. - Broken out from ... - (expand_inline_function): ... here. - (copy_rtx_and_substitute): Handle NOTE_INSN_DELETED_LABEL. - (subst_constants): Handle 'n' formats. - * jump.c (jump_optimize_minimal): New. - (jump_optimize_1): New arg `minimal'; update callers. Elide most - optimizations if it's set. - * rtl.c (copy_rtx): Do copy jump & call for insns. - * rtl.h (struct rtx_def): Document use of jump and call for insns. - (SIBLING_CALL_P): New. - (sibcall_use_t): New. - * toplev.c (rest_of_compilation): Do init_EXPR_INSN_LIST_cache earlier. - Invoke optimize_sibling_and_tail_recursive_calls. - * tree.c (lang_safe_for_unsave): New. - (safe_for_unsave): New. - * tree.h (lang_safe_for_unsave, safe_for_unsave): Declare. - - * alpha.h (FUNCTION_OK_FOR_SIBCALL): New. - * alpha.md (sibcall, sibcall_value, sibcall_epilogue): New. - (*sibcall_osf_1, *sibcall_value_osf_1): New. - -2000-03-17 Mark Mitchell - - * objc/objc-act.c (encode_method_prototype): Pass types, not - PARM_DECLs, to int_size_in_bytes. - -Fri Mar 17 11:51:34 2000 Jim Wilson - - * config/ia64/ia64.md (mix4right_3op): Swap %1 and %2 in template. - - * config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, - config/ia64/ia64.md, config/ia64/xm-ia64.h: Fix copyrights again. - -Fri Mar 17 08:09:14 2000 Richard Kenner - - * Clean up usages of TREE_INT_CST_LOW. - * c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst. - * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: - Regenerated. - * c-tree.h (min_precision): Move declaration to here. - * c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst. - (build_unary_op, add_pending_init): Use bit_position. - (pending_init_member, process_init_element): Likewise. - (really_start_incremental_init, push_init_level, pop_init_level): - Don't make copies of nodes or modify them in place, use consistent - types when tracking positions, and use tree routines computations. - (set_init_index, output_init_element): Likewise. - (output_pending_init_elements, process_init_element): Likewise. - * dbxout.c (dbxout_type_fields): Use bit_position, host_integerp, - tree_low_cst and int_bit_position; also minor cleanup. - (dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise. - (print_cst_octal): Precision is unsigned. - (dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst. - * dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT. - (simple_type_align_in_bits): Result is unsigned int. - Use tree_int_low_cst and host_integerp. - (simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT. - (field_byte_offset): Result is HOST_WIDE_INT. - Change types of internal variables so alignments are unsigned int, - offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT. - Use host_integerp, tree_low_cst, and int_bit_position. - (add_bit_offset_attribute): Likewise. - (add_data_member_location_attribute): Use tree_cst_low. - (add_bound_info): Use host_integerp, integer_zerop, and integer_onep. - (add_bit_size_attribute): Use tree_low_cst. - (add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise. - * dwarfout.c: Similar changes to dwarf2out.c. - * expr.c (expand_expr, case ARRAY_REF): Remove redundant code. - * genoutput.c (n_occurrences): Return -1 for null string. - (strip_whitespace): Accept null string and make into function. - (scan_operands): Reflect above changes. - * sdbout.c (plain_type_1): Use host_integerp and tree_low_cst. - (sdbout_field_types, sdbout_one_type): Likewise; also use bit_position. - * ssa.c (rename_registers): Add missing cast of arg to bzero. - * tree.c (int_size_in_bytes): Check for too big to represent. - (bit_position, int_bit_position, host_integerp, tree_low_cst): New fns. - * tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position): - New declarations. - (min_precision): Delete from here. - * varasm.c (decode_addr_const): Use host_integerp, bit_position, - and int_bit_position. - * objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT. - (encode_method_def): Likewise. - (build_ivar_list_initializer): Use int_bit_position. - (generate_shared_structures): Convert size. - (encode_type, encode_complete_bitfield): Use integer_zerop. - (encode_bitfield): Use tree_low_cst and int_bit_position. - -2000-03-17 Michael Hayes - - * config/c4x/c4x.h (CPP_SPEC): Fix typo. - -2000-03-17 Martin v. Löwis - - * call.c (special_function_p): It is only malloc if it returns - Pmode. - -2000-03-17 Michael Hayes - - * config/c4x/c4x.h (ASM_SPEC, CPP_SPEC, LINK_SPEC): Support C33. - (C33_FLAG, TARGET_C3X): Add macros. - (TARGET_SWITCHES): Add -m33 option. - * config/c4x/c4x.c (c4x_override_options): Test for TARGET_C33. - -2000-03-17 Michael Hayes - - * config/c4x/c4x.h (PARALLEL_INSN_FLAG): Add. - (PARALLEL_PACK_FLAG): Delete. - (TARGET_SWITCHES): Update. - (TARGET_PARALLEL): Use PARALLEL_INSN_FLAG. - -Thu Mar 16 18:52:32 2000 Richard Kenner - - * fold-const.c (fold): Fix a few cases when the returned result - is not of the same type as the input. - -2000-03-16 Nick Clifton - - * config/arm/arm.h (ASM_OUTPUT_MI_THUNK): Fix compile time - warning. - -2000-03-16 Kaveh R. Ghazi - - * libgcc2.h: Move prototypes above macros with the same name. - Wrap some function prototypes in the conditional which indicates - whether they are supported, i.e. "BITS_PER_UNIT == 8". - -2000-03-16 Richard Henderson - - * calls.c: Revert last two changes. - -2000-03-16 Bernd Schmidt - - * fp-bit.c (_unpack_d): If NO_DENORMALS is defined, anything that - has exponent 0 is a zero. - - * simplify-rtx.c (hash_rtx, case MEM/REG): Take into account that - HASH may already be nonzero. Add code/mode into hash value - immediately after repeat label. - (cselib_lookup): Don't leave the hash table in an inconsistent - state before a hash lookup operation. - -Thu Mar 16 17:03:10 MET 2000 Jan Hubicka - - * i386.md (all HI and QI mode non-move patterns): Conditionize - by TARGET_[HQ]IMODE_MATH. - * i386.h (x86_himode_math, x86_qimode_math, x86_promote_hi_regs, - x86_promote_qi_regs): Declare. - (TARGET_HIMODE_MATH, TARGET_QIMODE_MATH, TARGET_PROMOTE_HI_REGS, - TARGET_PROMOTE_QI_REGS): New macros. - (PROMOTE_MODE): New macro. - * i386.c (x86_himode_math, x86_qimode_math, x86_promote_hi_regs, - x86_promote_qi_regs): New global variables. - -Thu Mar 16 16:50:44 MET 2000 Jan Hubicka - - * calls.c (emit_library_call_value_1): Break out from ...; handle - VOIDmode function calls too. - (emit_library_call_value): ... here. - (emit_library_call): Implement by calling emit_library_call_value_1. - -Thu Mar 16 16:01:30 MET 2000 Jan Hubicka - - * calls.c (expand_call): Do sanity checking on arg_space_so_far. - Update arg_space_so_far on stack adjustments. - (emit_library_call, emit_library_call_value): Likewise; take into - account arg_space_so_far and pending_stack_adjust when calculcating - the boundary. - -Thu Mar 16 09:02:19 2000 Jason Eckhardt - - * flow.c: Move all basic block reordering code into its own file. - (create_basic_block): Externalize. - * bb-reorder.c: New file. Copy all basic block reordering code from - flow.c to this file. - (reorder_basic_blocks): Fix fencepost error in for-loop. - (reorder_basic_blocks): Remove braces from single statement for-loops. - * basic-block.h: Add declaration for create_basic_block. - * Makefile.in: Add rules for bb-reorder.o. - -2000-03-16 Neil Booth - - * cppinit.c (handle_option): Implement #unassert directive - as -A- command line option. - (print_help): Update. - * cpptexi.c: Update. - -Thu Mar 16 02:14:16 2000 Hans-Peter Nilsson - - * md.texi (Standard Names): Document `jump'. - -2000-03-15 Jason Merrill - - * calls.c (emit_call_1): Nothrow functions can still have nonlocal - gotos. - -2000-03-15 Geoff Keating - - Merge changes from newppc-branch onto trunk. - - 2000-03-15 Geoff Keating - - * rs6000.c (toc_hash_table): Update for new hash table functions. - (toc_hash_function): Likewise. - (toc_hash_eq): Likewise. - (toc_hash_mark_entry): Likewise. - (toc_hash_mark_table): Likewise. - (output_toc): Likewise. - (rs6000_add_gc_roots): Likewise. - - 2000-03-15 Alexandre Oliva - - * t-aix43 (AR_FOR_TARGET): Deleted. Moved `-X32_64'... - (AR_FLAGS_FOR_TARGET): here. New macro. - - 2000-03-05 Clinton Popetz - - * config/rs6000/rs6000.c (rs6000_fpmem_offset, rs6000_fpmem_size, - fpmem_operand) Delete. - (xer_operand) New. - (rs6000_reg_names, alt_reg_names): Change fpmem to xer. - (machine_function): Remove fpmem_size, fpmem_offset, save_toc_p. - (rs6000_save_machine_status, rs6000_restore_machine_status, - rs6000_init_expanders, rs6000_stack_info, debug_stack_info): Remove - references to above variables. - (gpc_reg_operand): Use XER_REGNO_P instead of FPMEM_REGNO_P. - * config/rs6000/rs6000.h (REG_ALLOC_ORDER, REGISTER_NAMES, - DEBUG_REGISTER_NAMES): Chagne fpmem to xer. - (FPMEM_REGNO_P, FPMEM_REGNUM): Delete. - (XER_REGNO_P, XER_REGNO): New. - (rs6000_stack): Remove fpmem_p, fpmem_offset, fpmem_size. - (PREDICATE_CODES): Change fpmem_operand to xer_operand. - (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK): Change FPMEM_REGNO_P to - XER_REGNO_P. - (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS, - REG_CLASS_FROM_LETTER, CLASS_MAX_NREGS): Change FPMEM_REGS to XER_REGS, and remove FLOAT_OR_FPMEM_REGS. - (CLASS_CANNOT_CHANGE_SIZE): Change to FLOAT_REGS. - - 2000-02-29 Franz Sirl - - * aix.h (FP_SAVE_INLINE, ASM_OUTPUT_INTERNAL_LABEL_PREFIX, - TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Move here... - * rs6000.h: from here. - - * rs6000-protos.h (rs6000_select_section): Provide prototype. - (rs6000_select_rtx_section): Likewise. - (rs6000_encode_section_info): Likewise. - (sdata_section): Likewise. - (sdata2_section): Likewise. - (sbss_section): Likewise. - * sysv4.h (rs6000_select_section): Delete prototype. - (rs6000_select_rtx_section): Likewise. - (rs6000_encode_section_info): Likewise. - (sdata_section): Likewise. - (sdata2_section): Likewise. - (sbss_section): Likewise. - (REG_SAVE_AREA): Delete definition duplicated in rs6000.h. - - * sysv4.h: Delete various unnecessary #undef's and put a comment - on the remaining ones. - Change various comments according to coding standard. - - 2000-02-29 Clinton Popetz - - * config/rs6000/rs6000.h (MQ_REGNO, CR0_REGNO, CR1_REGNO, CR2_REGNO, - CR3_REGNO, CR4_REGNO, MAX_CR_REGNO): Define. - (CR0_REGNO_P) Remove. - * config/rs6000/rs6000.c (gpc_reg_operand, and64_operand, and_operand, - setup_incoming_varargs, mtcrf_operation, print_operand, - rs6000_stack_info, rs6000_emit_prologue, rs6000_emit_epilogue): - Use the above macros. - - 2000-02-24 Clinton Popetz - - * config/rs6000/rs6000.md: Added a new alternative for each - pattern that had a 'x' alternative but no 'y' alternative. - Added a new split for each of the above patterns. - - 2000-02-18 Geoff Keating - - * aix41.h (ASM_CPU_SPEC): Delete. - (CPP_CPU_SPEC): Delete. - - * aix.h (RS6000_OUTPUT_BASENAME): Define. - (ASM_OUTPUT_LABEL): Define. - (ASM_GLOBALIZE_LABEL): Define. - (STRIP_NAME_ENCODING): Define. - * rs6000.h (RS6000_OUTPUT_BASENAME): Don't define. - (STRIP_NAME_ENCODING): Don't define. - (ASM_OUTPUT_LABEL): Don't define. - (ASM_GLOBALIZE_LABEL): Don't define. - * sysv4.h (ASM_DECLARE_FUNCTION_NAME): Use assemble_name to output - names, and ASM_OUTPUT_LABEL to output labels, rather than - asm_fprintf. - (ASM_OUTPUT_LABEL): Define. - (ASM_OUTPUT_INT): Use assemble_name. - (ASM_OUTPUT_DWARF_ADDR): Use assemble_name. - (STRIP_NAME_ENCODING): Don't undefine first. - (RS6000_OUTPUT_BASENAME): Make equivalent to assemble_name for - ELF. - (ASM_OUTPUT_LABELREF): Don't prepend underscores to labels - specified with 'asm' even with -fleading-underscore. - * rs6000.c (print_operand): Use assemble_name when !TARGET_AIX. - (output_epilog): Likewise. - (output_toc): Likewise. - * tramp.asm: Handle -fleading-underscore correctly. - - * rs6000.md (builtin_setjmp_receiver): Also run for -fPIC and - -mminimal-toc. - (nonlocal_goto_receiver): Delete. - * rs6000.h (DONT_ACCESS_GBLS_AFTER_EPILOGUE): Delete. - - * rs6000.h (ASM_OUTPUT_DEF): Don't define. - (SET_ASM_OP): Define. - * sysv4.h (ASM_OUTPUT_DEF): Don't undefine. - - * rs6000.h (ASM_OUTPUT_ADDR_VEC_ELT): Don't define. - (ASM_LONG): Define. - - * rs6000.c (rs6000_dll_import_ref): Delete, not used. - * rs6000-protos.h (rs6000_dll_import_ref): Delete. - - * rs6000.h: Add 'u' to more constants. - - 2000-02-18 David Edelsohn - - * rs6000.md (mfcr+shift): Delete PowerPC64 version. - - 2000-02-15 David Edelsohn - - * rs6000.c (reg_or_u_cint_operand): New function. - (logical_operand): Handle 64-bit hosts. - (logical_u_operand): New function. - (non_logical_cint_operand): Handle 64-bit hosts. - (non_logical_u_cint_operand): New function. - * rs6000.h (DATA_SECTION_ASM_OP): Add tab. - (PREDICATE_CODES): Define new functions. - * rs6000-protos.h: Declare new functions. - * rs6000.md (iordi3, xordi3): Constant int must be unsigned 32-bits. - (movdi_64): Bracket code intended for 64-bit hosts. Create - CONST_DOUBLE for 32-bit values. - (scc insns): Generate DImode compares. - (mfcr insns): Create DImode versions. - (sge matchers): New patterns. - - 2000-02-15 Gabriel Paubert - - * rs6000.md: Correct instructions length attributes and - constraints on unsigned compare instructions. - (*ne0): Disable for PowerPC64. - - 2000-02-11 Geoff Keating - - * rs6000.c (output_function_profiler): Use .long for a 32-bit - quantity, fix profile1.C test failure under -fPIC. - - * rs6000.c: Add 'u' to many constants to suppress warnings. - (constant_pool_expr_1): Make static. - (rs6000_emit_eh_toc_restore): Remove unused 'r2'. - * rs6000.h: Add 'u' to many constants to suppress warnings. - - * rs6000.c (rs6000_emit_load_toc_table): Use LCTOC..1 under AIX - for the start of the TOC, instead of LCTOC..0. - * aix.h (toc_section): Use LCTOC..1 under AIX for the start - of the TOC. - * rs6000.md (load_toc_aix_si): Use LCTOC..1. - (load_toc_aix_di): Use LCTOC..1. - - * rs6000.h (LEGITIMIZE_ADDRESS): Turn into a function. - * rs6000.c (rs6000_legitimize_address): New function from - LEGITIMIZE_ADDRESS. Only use create_TOC_reference on - symbols in the constant pool that really are TOC references. - (print_operand_address): For ELF, write TOC offsets under - -fPIC as subtractions in the insn. - (output_toc): For ELF, define symbols in TOC as normal labels, - to match RTL. - (create_TOC_reference): Use gen_rtx_PLUS rather than gen_rtx. - * rs6000-protos.h (rs6000_legitimize_address): Prototype. - (create_TOC_reference): Prototype only when RTX_CODE is defined. - * rs6000.md (movsi): Only use create_TOC_reference on - symbols in the constant pool that really are TOC references. - - * rs6000.h (MACHINE_DEPENDENT_REORG): Don't define. - * rs6000.c (rs6000_reorg): Delete. - * rs6000-protos.h (rs6000_reorg): Delete. - - 2000-02-09 Geoff Keating - - * rs6000.h (INCOMING_RETURN_ADDR_RTX): New macro. - - * aix.h (SETUP_FRAME_ADDRESSES): Define. - * rs6000.c [TARGET_AIX] (insn_after_throw): New static variable. - [TARGET_AIX] (rs6000_aix_emit_builtin_unwind_init): New function. - [TARGET_AIX] (rs6000_emit_eh_toc_restore): New function. - * rs6000-protos.h: Prototype rs6000_emit_eh_toc_restore, - rs6000_aix_emit_builtin_unwind_init. - * rs6000.md (eh_epilogue) [TARGET_AIX]: Call - rs6000_emit_eh_toc_restore on AIX. - (return_eh_si): Use r2. - (return_eh_di): Use r2. - - * aix43.h: Turn on HAS_INIT_SECTION and LD_INIT_SWITCH, - since we're breaking binary compatibility anyway. - - 2000-02-09 Clinton Popetz - - * config/rs6000/rs6000-protos.h: (get_TOC_alias_set, uses_TOC, - constant_pool_expr_p): Declare them. - (constant_pool_expr_p): Declare it. - * config/rs6000/rs6000.c (toc_label_name): Define. - (rs6000_override_options): Set toc_label_name. - (input_operand): Allow any TOC_RELATIVE_EXPR_P. - (get_TOC_alias_set, constant_pool_expr_p, constant_pool_expr_1, - uses_TOC): New functions. - (print_operand): Delete old '*' case. - (print_operand_address): Use LEGITIMATE_CONSTANT_POOL_ADDRESS_P, - and strip off rtl for TOC before calling output_addr_const. - (rs6000_emit_load_toc_table): Use toc_label_name. - * config/rs6000/rs6000.h (TARGET_SWITCHES): Make msched-prolog - the default. - (LEGITIMATE_CONSTANT_POOL_BASE_P): Delete. - (CONSTANT_POOL_EXPR_P, TOC_RELATIVE_EXPR_P): New macros. - (LEGITIMATE_CONSTANT_POOL_ADDRESS_P): Use CONSTANT_POOL_EXPR_P. - (LEGITIMIZE_ADDRESS, LEGITIMIZE_RELOAD_ADDRESS): Turn symbol_refs - into explicit TOC_REGISTER offsets. - (TOC_REGISTER): New macro. - * config/rs6000/rs6000.md (movsi, movdi): Emit rtl under - TARGET_TOC to reference TOC_REGISTER. - (load_toc_v4_PIC_1b): Add 4 to offset for toc reload. - * config/rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Call - uses_TOC before emitting label references. - - 2000-02-05 Geoff Keating - - * rs6000.md (stack_tie): Fix warning. - - * eabi-ctors.c: Use 'asm' names for the start/end variables, - to handle -fleading-underscore. - * sysv4.h (ASM_DECLARE_FUNCTION_NAME): Use asm_fprintf and %U. - (USER_LABEL_PREFIX): New macro. - (ASM_OUTPUT_INTERNAL_LABEL_PREFIX): Use asm_fprintf and %L. - (ASM_OUTPUT_LABELREF): Use asm_fprintf and %U. - * t-ppccomm (MULTILIB_MATCHES_SYSV): Note that call-sysv and - call-linux can use the same multilibs. - * t-ppcgas (MULTILIB_OPTIONS): Don't need to have separate call-sysv - and call-linux multilibs. Do multilib with -fleading-underscore. - (MULTILIB_DIRNAMES): Follow MULTILIB_OPTIONS change. - (MULTILIB_EXCEPTIONS): Remove call-linux exceptions. Add restrictions - to call-aix. - - * sysv4.h (CPP_SYSV_SPEC): Define _SOFT_FLOAT for all those CPUs that - have MASK_SOFT_FLOAT set. - (CPP_FLOAT_DEFAULT_SPEC): New macro. - (SUBTARGET_EXTRA_SPECS): Set `cpp_float_default' to the value of - CPP_FLOAT_DEFAULT_SPEC. - - * rs6000.c (ccr_bit): Add some consistency checks and a variable 'reg'. - * rs6000.md: Whitespace change. - * sysv4.h (LINK_TARGET_SPEC): Whitespace change. - * sysv4le.h (LINK_TARGET_SPEC): Whitespace change. - - 2000-02-05 Geoff Keating - - * rs6000.md (eh_epilogue): New expander. - (eh_reg_restore): New expand/split/insn combination. - (return_eh_si): New insn. - (return_eh_di): New insn. - - * eabi-ci.asm: Put a label at the start of the .eh_frame section. - * eabi-cn.asm: Put a zero at the end of the .eh_frame section. - * eabi-ctors.c (__do_global_ctors): Register this object's - frame. Clean up. Call atexit() after the constructors. - (__do_global_dtors): Deregister this object's frame. Clean up. - Allow for recursive calls to exit(). - * rs6000.c (fixuplabelno): New variable. - * sysv4.h (ASM_OUTPUT_INT): Don't do .fixup if not - TARGET_RELOCATABLE, it slows down exec() under linux. - (ASM_OUTPUT_DWARF_ADDR): Do .fixup if TARGET_RELOCATABLE. - - * aix.h (ASM_OUTPUT_DWARF_ADDR_VAR): New macro. - (ASM_OUTPUT_DWARF_DELTA_VAR): New macro. - (ASM_OUTPUT_DWARF_DELTA2): New macro. - (ASM_OUTPUT_DWARF_DELTA4): New macro. - (ASM_OUTPUT_DWARF_ADDR_DELTA): New macro. - (ASM_OUTPUT_DWARF_ADDR): New macro. - (ASM_OUTPUT_DWARF_DATA4): New macro. - (ASM_OUTPUT_DWARF_DATA2): New macro. - (ASM_OUTPUT_DWARF_OFFSET4): New macro. - (ASM_OUTPUT_DWARF_OFFSET): New macro. - (UNALIGNED_INT_ASM_OP): New macro, fake definition. - - 2000-02-03 Geoff Keating - - * rs6000.c (rs6000_sr_alias_set): New variable. - (rs6000_override_options): Initialize rs6000_sr_alias_set. - (rs6000_emit_stack_tie): New function. - (rs6000_emit_allocate_stack): Specify RTX_FRAME_RELATED_P - in a way that dwarf2out can understand. - (rs6000_frame_related): New function. - (rs6000_emit_prologue): Use rs6000_sr_alias_set. Specify - RTX_FRAME_RELATED_P in a way that dwarf2out can understand. - Use rs6000_emit_stack_tie when needed. - (rs6000_emit_epilogue): Use rs6000_sr_alias_set. Don't set - RTX_FRAME_RELATED_P. Use rs6000_emit_stack_tie when needed. - * rs6000.md (stack_tie): New insn. - (return_internal_si): Allow return value to be in the count - register. - (return_internal_di): Likewise. - - * rs6000.c (output_mi_thunk): Remove unused variable `sp'. - - 2000-02-03 Geoff Keating - - * sysv4.h (LOCAL_LABEL_PREFIX): Define, for the use of dbxelf.h. - - 2000-01-31 Geoff Keating - - * rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): New macro. - - * rs6000.md (stmw): Use the right POWER opcode. - (lmw): Likewise. - - 2000-01-31 Kaveh R. Ghazi - - * rs6000-protos.h: New file. - - * rs6000.c: Include tm_p.h. Fix compile time warnings. - - * rs6000.h: Move prototypes to rs6000-protos.h. Fix compile time - warnings. - - * sysv4.h: Likewise. - - 2000-01-28 Geoff Keating - - * ../../configure.in: Delete powerpcle-*-winnt* - and powerpcle-*-pe|powerpcle-*-cygwin*. - * ../../configure: Regenerated. - * cygwin.h: Delete. - * rs6000.h (OBJECT_WINDOWS_NT): Delete. - (TARGET_WINDOWS_NT): Delete. - (ABI_NT): Delete. - (CALL_NT_DLLIMPORT): Delete. - Delete NT-specific code. - * rs6000.md, rs6000.c, sysv4.h: Delete NT-specific code. - * win-nt.h: Delete. - * t-winnt: Delete. - * nt-ci.asm: Delete. - * nt-cn.asm: Delete. - * ntstack.asm: Delete. - - 2000-01-27 Franz Sirl - - * rs6000.h (SELECT_RTX_SECTION): Move to aix.h. - (ASM_FILE_START): Likewise. - (ASM_DECLARE_FUNCTION_NAME): Likewise. - (ASM_OUTPUT_LABELREF): Likewise. - (ASM_OUTPUT_SKIP): Likewise. - (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - (ASM_GENERATE_INTERNAL_LABEL): Likewise. - (ASM_OUTPUT_CASE_LABEL): Likewise. - (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - (ASM_OUTPUT_ASCII): Likewise. - - 2000-01-27 Clinton Popetz - - * rs6000.c (rs6000_emit_load_toc_table): Use "LCG" and - reload_toc_labelno for non-prologue TOC reloads. Also, don't - increment rs6000_pic_labelno here. - (rs6000_emit_prologue): Pass TRUE to rs6000_emit_load_toc_table, - and increment rs6000_pic_labelno here. - - 2000-01-24 Geoffrey Keating - - * rs6000.md (fctiwz): Use (set (reg) (unspec:DI [(fix:SI ...)])) - rather than (set (subreg:SI (reg)) (fix:SI ...)) so that register - allocation knows (reg) is dead before the insn. - - 2000-01-21 Geoff Keating - - * rs6000.md (movsi_to_cr): Correct typo in output template. - - 2000-01-19 Geoffrey Keating - - * rs6000.c (rs6000_pic_labelno): Always define. - (rs6000_pic_func_labelno): Delete. - (lmw_operation): Check for a zero base register, - which doesn't mean what we want. - (stmw_operation): New function. - (print_operand): Define new 'l' modifier. - (rs6000_stack_info): We must save all 64 bits of the registers - if TARGET_POWERPC64. - (rs6000_output_load_toc_table): Delete. - (rs6000_emit_load_toc_table): New function. - (rs6000_allocate_stack_space): Delete. - (rs6000_emit_allocate_stack): New function. - (rs6000_emit_prologue): New function. - (output_prolog): Use rs6000_emit_prologue. - (rs6000_emit_epilogue): Change a few variable names to be - more accurate. Restore all 64 bits of the registers if - TARGET_POWERPC64. Only restore the FP registers which were used - if they are being saved/restored one-at-a-time. - (output_mi_thunk): Delete inefficient code generation. - (output_function_profiler): Don't use rs6000_output_load_toc_table. - * rs6000.h: Declare rs6000_emit_load_toc_table, - rs6000_allocate_stack_space, stmw_operation. Don't declare - rs6000_output_load_toc_table. - * rs6000.md (elf_high): Allow register 0, but discourage it - heavily. - (elf_low): Support loading into register 0. - (load_toc_aix_si): New pattern. - (load_toc_aix_di): New pattern. - (load_toc_v4_pic_si): New pattern. - (load_toc_v4_pic_di): New pattern. - (load_toc_v4_PIC_1): New pattern. - (load_toc_v4_PIC_1b): New pattern. - (load_toc_v4_PIC_2): New pattern. - (builtin_setjmp_receiver): Use rs6000_emit_load_toc_table. - (nonlocal_goto_receiver): Use rs6000_emit_load_toc_table. - (prologue): New expander. - (movesi_from_cr): New pattern. - (stmw): New pattern. - (save_fpregs_si): New pattern. - (save_fpregs_di): New pattern. - - 2000-01-19 Geoff Keating - - * rs6000.md (movsi): Don't use force_reg when no_new_pseudos. - (movdi): Likewise. - (movhi): Likewise. - (movqi): Likewise. - - 2000-01-19 Geoff Keating - - * rs6000.md (movsi_got): 'unspec 8' returns a SImode result, - at present. - (movsi_got_internal): Likewise. - (movsi_got_internal+1): Likewise. - (set_sp): 'unspec 7' does a SImode clobber. - - 2000-01-19 Geoff Keating - - * rs6000.md (floatsidf2): Don't use the fpmem "register", just - allocate a stack temporary. - (floatsidf2_internal): Likewise. - (floatsidf2_internal+1): Likewise. Don't do bizzare hacks - with unspec. - (floatunssidf2): Don't use the fpmem "register", just - allocate a stack temporary. - (floatunssidf2_internal): Likewise. - (floatunssidf2_internal+1): Likewise. Don't do bizzare hacks - with unspec. - (floatsidf2_loadaddr): Delete. - (floatsidf2_store1): Delete. - (floatsidf2_store2): Delete. - (floatsidf2_load): Delete. - (fix_truncdfsi2): Don't use the fpmem "register", just - allocate a stack temporary. - (fix_truncdfsi2_internal_si): Delete. - (fix_truncdfsi2_internal_di): Delete. - (fix_truncdfsi2_internal): New insn. - (fix_truncdfsi2_internal+1): Don't use the fpmem "register". - (fix_truncdfsi2_store): Delete. - (fix_truncdfsi2_load): Delete. - (fctiwz): Produce gen_fctiwz. - - 2000-01-19 Geoffrey Keating - - * eabi.h (INVOKE__main): Define. - * rs6000.c (rs6000_stack_info): Don't handle call to NAME__MAIN - specially. - (rs6000_emit_prologue): Likewise. - * rs6000.h (struct rs6000_stack): Don't keep track of whether - this is the main program. - - 2000-01-19 Geoff Keating - - * rs6000.c (rs6000_va_arg): Delete some unused variables. - - 2000-01-19 Geoff Keating - - * rs6000.c (rs6000_va_arg): On AIX, padding for small arguments - goes after the argument. - - 2000-01-12 Geoff Keating - - * rs6000.md: Document 'unspec' values used. - (epilogue): New expander. - (movesi_to_cr_one): New expander. - (movesi_to_cr and following): New pattern. - (lmw): New pattern. - (return_internal_si): New pattern. - (return_internal_di): New pattern. - (return_and_restore_fpregs_si): New pattern. - (return_and_restore_fpregs_di): New pattern. - * rs6000.h: Declare new functions. - * rs6000.c (rs6000_stack_info): Use current_function_is_leaf - rather than rs6000_calls_p. - (rs6000_makes_calls): Delete. - (lmw_operation): New function. - (mtcrf_operation): New function. - (rs6000_emit_epilogue): New function. - (output_epilog): Call rs6000_emit_epilogue and final if - !TARGET_SCHED_PROLOG, instead of writing text unconditionally. - - 2000-01-12 Geoff Keating - - * aix43.h (SUBSUBTARGET_SWITCHES): Document switches. - * aix41.h (SUBSUBTARGET_SWITCHES): Document switches. - * aix.h (SUBTARGET_SWITCHES): Document switches. - * rs6000.h: (TARGET_SWITCHES): Don't print options twice. Make - sched-prolog and sched-epilog the same. Document all the - switches. - (TARGET_OPTIONS): No longer allow -mdebug-. - - 2000-01-12 Geoff Keating - - * rs6000.h (ASM_FILE_END): Move to aix.h. - (EXTRA_SECTIONS): Move to aix.h. - (READONLY_DATA_SECTION): Move to aix.h. - (EXTRA_SECTION_FUNCTIONS): Move to aix.h. - (SELECT_SECTION): Move to aix.h. - (JUMP_TABLES_IN_TEXT_SECTION): Move to aix.h. - (INT_REGNO_P): Use symbolic name for ARG_POINTER_REGNUM. - (LINK_REGISTER_REGNUM): New definition. - (RETURN_ADDR_RTX): Use symbolic name for LINK_REGISTER_REGNUM. - (SLOW_UNALIGNED_ACCESS): Define in a way suitable for both - AIX and SVR4. - * sysv4.h: Delete the code between the inclusion of rs6000.h - and svr4.h. - (DWARF_DEBUGGING_INFO): Don't define, it's defined in elfos.h. - (FP_ARG_MAX_REG): Move generic definition to rs6000.h. - (RS6000_REG_SAVE): Move generic definition to rs6000.h. - (RS6000_SAVE_AREA): Move generic definition to rs6000.h. - * rs6000.md (floatsidf2_loadaddr): The first arg here is Pmode. - (fix_truncdfsi2_internal): Rename to fix_truncdfsi2_internal_si. - (fix_truncdfsi2_internal_di): New pattern. - (fix_truncdfsi2_store): The second arg here is Pmode too. - (fix_truncdfsi2_load): The second arg here is Pmode too. - (tablejumpdi): Now that switch tables hold only SImode values, - gcc needs to know how to add them to the pc which is DImode. - * rs6000.c (rs6000_stack_info): Use symbolic name for - LINK_REGISTER_REGNUM. - (output_mi_thunk) [!TARGET_ELF]: Don't define sp, it's not used. - (output_toc): Delete unused variables s1 and s2. - (output_ascii): Use fputs not fprintf on a variable string. - - 2000-01-07 David Edelsohn - - * rs6000.c (processor_target_table): Add power3 as alias for 630. - * aix43.h: Revert Aug 2 change. - (HAS_INIT_SECTION): Define, not visible yet. - (LD_INIT_SWITCH): Define, not visible yet. - * t-aix43 (MULTILIB_OPTIONS): Revert Aug 2 change. - - 2000-01-04 Joel Sherrill (joel@OARcorp.com> - - * config/rs6000/rtems.h: Include config/rtems.h. - - 2000-01-04 David Edelsohn - - * rs6000.h (HANDLE_PRAGMA_PACK): Define. - (SLOW_UNALIGNED_ACCESS): Define. - (CASE_VECTOR_MODE): Always use 32-bit offsets. - (ASM_FILE_END): Generate 64-bit symbol in 64-bit mode. - (EXTRA_SECTOIN_FUNCTIONS): Indent .csect pseudo-op. - (toc_section): Likewise and .toc pseudo-op. - (ASM_DECLARE_FUNCTION): Likewise. Align text more strictly in - 64-bit mode. - (TEXT_SECTION_ASM_OP): Likewise. - (ASM_OUTPUT_ADD_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Always use - 32-bit offsets. - - 1999-12-17 Jakub Jelinek - - * config/rs6000/rs6000.h (TARGET_POWERPC64): Make sure - UNITS_PER_WORD and BITS_PER_WORD are compile time constants when - compiling libgcc2. - - 2000-01-06 Franz Sirl - - * rs6000.h: Move more stuff from here... - * aix.h: to here. - * sysv4.h: Cleanup accordingly. - * netware.h: Likewise - - 2000-01-05 Franz Sirl - - * rs6000.h: Continue cleanup. - * aix.h: Likewise. - * lynx.h: Likewise. - * netware.h: Likewise. - * sol2.h: Likewise. - * sysv4.h: Likewise. - * win-nt.h: Likewise. - - * rs6000.h (TARGET_SWITCHES): Add descriptions. - (TARGET_OPTIONS): Likewise. - - * sysv4.h (SUBTARGET_SWITCHES): Add descriptions. - (SUBTARGET_OPTIONS): Likewise. - - * rs6000.md: Fix compile time warnings. - - 2000-01-04 Geoff Keating - - vxworks patches from the Cygnus tree originally by - Michael Meissner and Vladimir Makarov - . - * sysv4.h (SUBTARGET_SWITCHES): Add vxworks. - (ENDFILE_SPEC): Likewise. - (LIB_VXWORKS_SPEC): New macro. - (STARTFILE_VXWORKS_SPEC): New macro. - (ENDFILE_VXWORKS_SPEC): New macro. - (LINK_START_VXWORKS_SPEC): New macro. - (LINK_OS_VXWORKS_SPEC): New macro. - (CPP_OS_VXWORKS_SPEC): New macro. - (SUBTARGET_EXTRA_SPECS): Add all the vxworks specs. - * vxppc.h: Rewrite to use proper configuration method. - * vxppcle.h: New file. - * ../../configure.in: Add powerpcle-wrs-vxworks*. - * ../../configure: Rebuilt. - - 2000-01-04 Geoff Keating - - Lots of changes to rs6000.h, sysv4.h, aix.h, - aix31.h, aix3newas.h, aix41.h, aix43.h, beos.h, - with the aim that rs6000.h is the first header - included and the others override it. - * aix.h: New file. - - * x-aix41-gld: Remove. - * x-aix43: Remove. - * x-aix41: Remove target-specific switches, and don't specify - -Wl,-bbigtoc as we don't need it any more. - * ../../configure.in: Use x-aix41 for ppc AIX 4.1 and above. - Use t-aix43 for AIX 4.3 and above. - * ../../configure: Regenerated. - - * rs6000.h (TARGET_SWITCHES): Add some initial prolog-scheduling - options, that don't do anything yet. - (MASK_SCHED_PROLOG): New macro. - (MASK_SCHED_EPILOG): New macro. - (TARGET_SCHED_PROLOG): New macro. - (TARGET_SCHED_EPILOG): New macro. - - 2000-01-04 Geoff Keating - - * rs6000.c: Correct comment, the `minimal' TOCs are actually - one per translation unit, not one per function. - (output_toc): Also do duplicate constant elimination - for per-translation-unit TOCs. - - * rs6000.md (nonlocal_goto_receiver): Put it back as before. Add - a comment explaining _exactly_ when this pattern gets used. - (builtin_setjmp_receiver): New pattern for better clarity. - (init_v4_pic): Move it into a section dealing with TOC registers. - - 1999-12-30 Geoff Keating - - * rs6000.c (toc_hash_table): New variable. - (rs6000_hash_constant): New function. - (toc_hash_function): New function. - (toc_hash_eq): New function. - (toc_hash_mark_entry): New function. - (toc_hash_mark_table): New function. - (output_toc): Don't output duplicate TOC entries in - a single file. - (rs6000_add_gc_roots): Add the hash table as a GC root. - * t-aix43: Move AR_FOR_TARGET and CLIB here from x-aix43, - where they clearly shouldn't be. This may need to be fixed - later when there is a GNU ar for AIX. - * x-aix43: Don't define CLIB or AR_FOR_TARGET. - Don't define BOOT_LDFLAGS as it is now not necessary. - - 1999-12-29 Geoff Keating - - * rs6000.c (rs6000_build_va_list): Use 'char *' rather than 'void *' - for va_list on AIX. Use unsigned_char_type_node rather than - constructing our own version on svr4. - - 1999-12-17 Geoff Keating - - * tramp.asm (__trampoline_size): Delete CYGNUS LOCAL comment, - since patently it's not. - - 1999-12-08 Geoff Keating - - * config/rs6000/rs6000.md (nonlocal_goto_receiver): Turn into - define_expand/define_insn pair, and handle restore of the - SVR4 -fpic register. - -Wed Mar 15 15:43:38 2000 Jeffrey A Law (law@cygnus.com) - - * acconfig.h (HAVE_GAS_WEAK): New define. - * configure.in (assembler weak support): Check for .weak support. - * config.in, configure: Rebuilt. - * pa/som.h (MAKE_DECL_ONE_ONLY, ASM_WEAKEN_LABEL): Only define if - HAVE_GAS_WEAK is defined. - -2000-03-15 Nick Clifton - - * config/arm/arm.c (arm_output_epilogue): Do not pass %c to - asm_fprintf(). - -2000-03-15 Zack Weinberg - - * cppfiles.c (open_include_file): New function. - (find_include_file, cpp_read_file): Use it. - -2000-03-15 Jason Merrill - - * cpphash.c (dump_hash_helper): Take the slot, not the element. - -Wed Mar 15 14:28:54 2000 Jason Eckhardt - - * flow.c (verify_flow_info): Check for unconditional return. - -Wed Mar 15 11:34:27 2000 Jim Wilson - - * config/ia64/ia64.md (restore_stack_nonlocal): New. - * config/ia64/lib1funcs.asm (__ia64_nonlocal_goto): Delete padding nop. - (__ia64_restore_stack_nonlocal): New. - * config/ia64/t-ia64 (LIB1ASMFUNCS): Add __restore_stack_nonlocal. - -2000-03-15 Alexandre Oliva - - * cpphash.c (collect_formal_parameters): Do not complain about - parameter names that just start with `__VA_ARGS__'. - -Wed Mar 15 13:26:58 MET 2000 Jan Hubicka - - * i386.md (movhi_1): Promote movw imm, reg to movl imm, reg and - movw reg, reg to movzwl reg, reg on PARTIAL_REGISTER_STALL machines. - * i386.c (pentiumpro_cost): Set mul cost to 4. - (x86_use_movx): Set for PPro. - -Wed Mar 15 13:07:05 MET 2000 Jan Hubicka - - * i386.md (ix86_compute_frame_size): stack_alignment_needed is - STACK_BOUNDARY for empty frames now. - -2000-03-14 Mark Mitchell - - * stor-layout.c (layout_union): Remove. - (layout_union_field): New function, split out from layout_union. - (finish_union_layout): Likewise. - (layout_field): Handle unions by calling layout_union_field. - (finish_record_layout): Handle unions. - (layout_type): Combine RECORD_TYPE, UNION_TYPE, and - QUAL_UNION_TYPE handling. - -Wed Feb 23 13:00:06 CET 2000 Jan Hubicka - - * flow.c (fixup_reorder_chain): Avoid double labels in the basic block; - end of basic block is jump_insn, not barrier; use create_basic_block - instead of creating basic block by hand. - -2000-03-14 Jason Eckhardt - - * flow.c (reorder_basic_blocks): Account for barriers when writing - over NEXT_INSN (last_bb->end). - (verify_flow_info): Add check for missing barriers. - -2000-03-14 Greg McGary - - * c-lex.h (enum rid): Add RID_BOUNDED & RID_UNBOUNDED. - * c-lex.c (init_lex): Handle RID_BOUNDED & RID_UNBOUNDED. - * c-parse.gperf (__bounded, __bounded__, __ptrbase, __ptrbase__, - __ptrextent, __ptrextent__, __ptrvalue, __ptrvalue__, - __unbounded, __unbounded__): New keywords. - * c-parse.in (PTR_VALUE PTR_BASE PTR_EXTENT): New tokens. - * c-parse.y, c-parse.c, c-parse.h: Regenerate. - * objc/objc-parse.y, objc/objc-parse.c: Regenerate. - -2000-03-14 Bernd Schmidt - - * cselib.h: New file. - * alias.c: Include "cselib.h". - (fixed_scalar_and_varying_struct_p): Accept the addresses of the - MEMs as two new arguments. - (get_addr): New static function. - (find_base_term): Handle VALUEs. - (memrefs_conflict_p): Likewise. - (true_dependence): Call get_addr on the addresses. - Call fixed_scalar_and_varying_struct_p with addresses that have been - passed through get_addr and canon_rtx. - (write_dependence_p): Move DIFFERENT_ALIAS_SETS_P test for consistency - with true_dependence. - Call get_addr on the addresses; don't call canon_rtx on the MEMs. - * loop.c: Include "cselib.h". - (load_mems): Process extended basic block that enters the loop with - cselib. Use that information to change initialization of the shadow - register so that a constant equivalence is seen by later passes. - * reload1.c: Include "cselib.h". - (reload_cse_invalidate_regno): Delete function. - (reload_cse_mem_conflict_p): Likewise. - (reload_cse_invalidate_mem): Likewise. - (reload_cse_invalidate_rtx): Likewise. - (reload_cse_regno_equal_p): Likewise. - (reload_cse_check_clobber): Likewise. - (reload_cse_record_set): Likewise. - (reg_values): Delete static variable. - (invalidate_regno_rtx): Likewise. - (reload_cse_delete_noop_set): New static function. - (reload_cse_simplify): New static function, broken out of - reload_cse_regs_1. - (reload_cse_noop_set_p): Delete unused argument INSN. - Just call rtx_equal_for_cselib_p on set source and destination. - (reload_cse_regs_1): Break out some code into reload_cse_simplify and - reload_cse_delete_noop_set. Delete code to keep track of values; use - cselib functions instead. Delete code to push/pop obstacks. - (reload_cse_simplify_set): Use cselib to find equivalent values. - Delete code to push/pop obstacks. - (reload_cse_simplify_operands): Likewise. - * rtl.def (VALUE): New rtx code. - * rtl.h (union rtunion_def): New elt rt_cselib. - (X0CSELIB, CSELIB_VAL_PTR): New macros. - * simplify_rtx.c: Include "ggc.h", "obstack.h", "cselib.h". - (new_elt_list, new_elt_loc_list, unchain_one_value, clear_table, - unchain_one_elt_list, unchain_one_elt_loc_list, check_useless_values, - discard_useless_locs, discard_useless_values, entry_and_rtx_equal_p, - hash_rtx, new_cselib_val, add_mem_for_addr, get_value_hash, - cselib_lookup_mem, cselib_subst_to_values, cselib_invalidate_regno, - cselib_mem_conflict_p, cselib_invalidate_mem, cselib_invalidate_rtx, - cselib_record_set, cselib_record_sets): New static functions. - (cselib_lookup, cselib_update_varray_sizes, cselib_init, - cselib_finish, cselib_process_insn, rtx_equal_for_cselib_p, - references_value_p): New functions. - (MAX_USELESS_VALUES, REG_VALUES): New macros. - (table, cselib_current_insn, next_unknown_value, cselib_nregs, - n_useless_values, reg_values, callmem, cselib_obstack, - cselib_startobj, empty_vals, empty_elt_lists, empty_elt_loc_lists): - New static variables. - * varray.h (union varray_data_tag): New elt te. - (VARRAY_ELT_LIST_INIT, VARRAY_ELT_LIST): New macros. - * Makefile.in (reload1.o, loop.o, simplify-rtx.o, alias.o): Update - dependencies. - -2000-03-14 Nick Clifton - - * gcc.c (do_spec_1): Catch the case where %* is used in a - substitution pattern, but it has not been initialized. - Issue a meaningful error message if an unrecognized operator - is encountered in a spec string. - -2000-03-14 Richard Earnshaw - - * function.c (prepare_function_start): Correctly initialize - cfun->stack_alignment_needed. - -2000-03-14 Zack Weinberg - - * cppfiles.c (find_include_file): Don't assume nshort is a - substring of name. - -Tue Mar 14 08:42:21 2000 Jeffrey A Law (law@cygnus.com) - - * configure.in (hppa configurations): Add pa32-regs.h to the - list of tm files as appropriate. - * configure: Rebuilt. - * pa.c (compute_frame_size): Remove explicit knowledge about FP - register numbering. - (hppa_expand_prologue, hppa_expand_epilogue): Likewise. - (fmpyaddoperands, fmpysuboperands): Likewise. - * pa.h: Remove various definitions which depend on knowing - how registers are numbered. - * pa32-regs.h: New file with PA32 register numbering specific - definitions. - -2000-03-14 Richard Henderson - - * regmove.c (combine_stack_adjustments): New. - (stack_memref_p, single_set_for_csa): New. - (free_csa_memlist, record_one_stack_memref): New. - (try_apply_stack_adjustment): New. - (combine_stack_adjustments_for_block): New. - * rtl.h (combine_stack_adjustments): Declare. - * toplev.c (rest_of_compilation): Call it. - - * i386.md: Revert 2000-01-16 change. - -2000-03-14 Martin v. Löwis - - * gccbug.in: Add web category, gcc specific classes. - -2000-03-14 Nathan Sidwell - - * stor-layout.c (finalize_record_size): Fix typo. - -2000-03-14 Stan Shebs - - * c-typeck.c (c_alignof): Error on incomplete types. - * extend.texi (Alignment): Document this. - -2000-03-13 Zack Weinberg - - * cppfiles.c: Include mkdeps.h. - (find_include_file, read_include_file): Remove _cpp_ prefix - from name, make static. - (_cpp_execute_include): New function, broken out of - do_include. - - * cpplib.c: Don't include mkdeps.h. - (struct directive): Remove type field. Reorder entries. The - function takes only one argument. - (struct if_stack): Make type field an int. - (directive_table): Rename to dtable. Generate it, the - prototypes of the directive handlers, and the enum for the - directive numbers, from a template macro. - (do_ifndef, do_include_next, do_import): New functions. - (do_define, do_include, do_endif, do_ifdef, do_if, do_else, - do_undef, do_line, do_elif, do_error, do_pragma, do_warning, - do_ident, do_assert, do_unassert, do_sccs): Take only one - argument. - (do_sccs): Define always, but alter behavior based on - SCCS_DIRECTIVE. - (_cpp_handle_directive, consider_directive_while_skipping): - Restructure for new directive table layout. - - (pass_thru_directive): Take a directive number, not a pointer - to a struct directive. - (parse_include): New function, broken out of do_include. - (do_include, do_import, do_include_next): Use parse_include - and _cpp_execute_include. - (do_elif, do_else): Test for T_ELSE specifically when checking - for #elif/#else after #else. - (parse_ifdef): New function, broken out of do_ifdef. - (validate_else): Expect a name arg without a leading #. - (if_directive_name): Delete. - (cpp_define, cpp_assert, cpp_undef, cpp_unassert): Call - directive handlers with only one argument. - - * cpphash.h: Update prototypes. - (enum node_type): Remove entries for directives. - * Makefile.in: Update dependencies. - - * cpphash.c (dump_hash_helper): Only dump nodes of type - T_MACRO. Emit a newline after each definition. - -2000-03-14 Martin v. Löwis - - * gccbug.in: New file. - * configure.in (all_outputs): Add gccbug. - * Makefile.in (install-common): Install gccbug. - (GCCBUG_INSTALL_NAME): New variable. - * configure: Rebuilt. - -2000-03-13 Jason Merrill - - * function.c (put_var_into_stack): Use type_for_mode to calculate - part_type. Use MEM_SET_IN_STRUCT_P. - * expr.c (store_field): Handle CONCAT. - (store_constructor): Use fields_length. - * tree.c (fields_length): New fn. - * tree.h: Declare it. - -2000-03-13 Zack Weinberg - - * Makefile.in (LIBCPP_OBJS): Add cpplex.o. - (cpplex.o): New target. - * po/POTFILES.in: Add cpplex.c. - - * cpplex.c (_cpp_grow_token_buffer, null_cleanup, - cpp_push_buffer, cpp_pop_buffer, cpp_scan_buffer, - cpp_expand_to_buffer, cpp_buf_line_and_col, cpp_file_buffer, - skip_block_comment, skip_line_comment, skip_comment, - copy_comment, _cpp_skip_hspace, _cpp_skip_rest_of_line, - _cpp_parse_name, skip_string, parse_string, - _cpp_parse_assertion, cpp_get_token, cpp_get_non_space_token, - _cpp_get_directive_token, find_position, - _cpp_read_and_prescan, _cpp_init_input_buffer): Move here. - (maybe_macroexpand, _cpp_lex_token): New functions. - - * cpplib.c (SKIP_WHITE_SPACE, eval_if_expr, parse_set_mark, - parse_goto_mark): Delete. - (_cpp_handle_eof): New function. - (_cpp_handle_directive): Rename from handle_directive. - (_cpp_output_line_command): Rename from output_line_command. - (do_if, do_elif): Call _cpp_parse_expr directly. - * cppfiles.c (_cpp_read_include_file): Don't call - init_input_buffer here. - * cpphash.c (quote_string): Move here, rename _cpp_quote_string. - * cppexp.c (_cpp_parse_expr): Diddle parsing_if_directive - here; pop the token_buffer and skip the rest of the line here. - * cppinit.c (cpp_start_read): Call _cpp_init_input_buffer - here. - - * cpphash.h (CPP_RESERVE, CPP_IS_MACRO_BUFFER, ACTIVE_MARK_P): - Define here. - (CPP_SET_BUF_MARK, CPP_GOTO_BUF_MARK, CPP_SET_MARK, - CPP_GOTO_MARK): New macros. - (_cpp_quote_string, _cpp_parse_name, _cpp_skip_rest_of_line, - _cpp_skip_hspace, _cpp_parse_assertion, _cpp_lex_token, - _cpp_read_and_prescan, _cpp_init_input_buffer, - _cpp_grow_token_buffer, _cpp_get_directive_token, - _cpp_handle_directive, _cpp_handle_eof, - _cpp_output_line_command): Prototype them here. - * cpplib.h (enum cpp_token): Add CPP_MACRO. - (CPP_RESERVE, get_directive_token, cpp_grow_buffer, - quote_string, output_line_command): Remove. - -2000-03-13 Bernd Schmidt - - * stmt.c (expand_end_case): RANGE may be signed, and when checking - whether it is too large we must also verify that it isn't negative. - -2000-03-13 Jakub Jelinek - - * config/sparc/sparc.md: Remove all traces of TARGET_LIVE_G0. - (movsi_zero_liveg0): Remove. - (movsf_insn_novis_liveg0): Remove. - (negsi2): Remove. - (negsi2_not_liveg0): Rename to negsi2. - (one_cmplsi2): Remove. - (one_cmplsi2_not_liveg0): Rename to one_cmplsi2. - (one_cmplsi2_liveg0): Remove. - * config/sparc/sparc.h (TARGET_LIVE_G0, TARGET_BROKEN_SAVERESTORE, - MASK_LIVE_G0, MASK_BROKEN_SAVERESTORE): Remove. - (CONDITIONAL_REGISTER_USAGE): Remove TARGET_LIVE_G0 if. - (PREDICATE_CODES): Remove zero_operand. - * config/sparc/sparc.c: Remove all traces of TARGET_LIVE_G0 and - TARGET_BROKEN_SAVERESTORE. - (zero_operand): Remove. - * config/sparc/splet.h (SUBTARGET_SWITCHES): Remove -mlive-g0, - -mno-live-g0, -mbroken-saverestore and -mno-broken-saverestore - options. - (SUBTARGET_OVERRIDE_OPTIONS): Remove. - * config/sparc/linux-aout.h (TARGET_LIVE_G0, - TARGET_BROKEN_SAVERESTORE): Remove. - * config/sparc/linux.h (TARGET_LIVE_G0, TARGET_BROKEN_SAVERESTORE): - Remove. - * config/sparc/linux64.h (TARGET_LIVE_G0, TARGET_BROKEN_SAVERESTORE): - Remove. - * config/sparc/sol2.h (TARGET_LIVE_G0, TARGET_BROKEN_SAVERESTORE): - Remove. - - * config/sparc/sparc.md (return_df_no_fpu): New pattern. - -2000-03-13 Zack Weinberg - - * cpplib.c (do_pragma_implementation): Fix off-by-one error - truncating a string. Don't assume tokens are nul terminated. - Problem noted by Andreas Jaeger - -2000-03-13 Jason Merrill - - * dwarf2out.c (add_name_and_src_coords_attributes): Only add - DW_AT_MIPS_linkage_name for TREE_PUBLIC decls. - (ASM_OUTPUT_DWARF_ADDR_CONST): Don't output trailing newline. - -2000-03-13 Richard Earnshaw - - * stor-layout.c (new_record_layout_info): Fix typo inside ifdef - STRUCTURE_SIZE_BOUNDARY. - -2000-03-13 Mark Mitchell - - * tree.h (record_layout_info_s): New structure. - (record_layout_info): New type. - (new_record_layout_info): New function. - (layout_field): Likewise. - (finish_record_layout): Likewise. - * stor-layout.c (layout_record): Remove. - (new_record_layout_info): New function. - (layout_field): New function, broken out from layout_record. - (finalize_record_size): Likewise. - (compute_record_mode): Likewise. - (finalize_type_size): New function, broken out from layout_type. - (finish_record_layout): Likewise. - (layout_type): Use them. - -2000-03-12 Zack Weinberg - - * cpphash.c: Don't include version.h. - (special_symbol) [case T_VERSION]: Look for the string in - hp->value.cpval; don't use version_string. - * cppinit.c (initialize_builtins): Set hp->value.cpval for - __VERSION__ to version_string. - * Makefile.in (cpphash.o): Update deps. - -2000-03-12 Zack Weinberg - - Convert cpplib to use libiberty/hashtab.c. - - * cpplib.h (struct cpp_reader): Make hashtab and - all_include_files of type 'struct htab *'. Delete HASHSIZE - and ALL_INCLUDE_HASHSIZE macros. - - * cpphash.h: Update prototypes. - (struct hashnode): Remove next, prev, and bucket_hdr members. - Make length a size_t. Add hash member. - (struct ihash): Remove next member. Add hash member. Make - name a flexible array member. - - * cppfiles.c: Include hashtab.h. - (include_hash): Delete. - (IHASHSIZE): New macro. - (hash_IHASH, eq_IHASH, _cpp_init_include_hash): New functions. - (cpp_included): Do the hash lookup here. - (_cpp_find_include_file): Rewrite. - (cpp_read_file): Put the "fake" hash entry into the hash - table. Honor the control_macro, if it turns out we've seen - the file before. Don't push the buffer here. - (_cpp_read_include_file): Push the buffer here. - (OMODES): New macro. Use it whenever we call open(2). - - * cpphash.c: Include hashtab.h. - (hash_HASHNODE, eq_HASHNODE, del_HASHNODE, dump_hash_helper, - _cpp_init_macro_hash, _cpp_dump_macro_hash, _cpp_make_hashnode, - _cpp_lookup_slot): New functions. - (HASHSIZE): new macro. - (hashf, _cpp_install, _cpp_delete_macro): Delete. - (_cpp_lookup): Use hashtab.h routines. - - * cppinit.c: Include hashtab.h. - (cpp_reader_init): Call _cpp_init_macro_hash and - _cpp_init_include_hash. Don't allocate hashtab directly. - (cpp_cleanup): Just call htab_delete on pfile->hashtab and - pfile->all_include_files. - (initialize_builtins): Use _cpp_make_hashnode and - htab_find_slot to add hash entries. - (cpp_finish): Just call _cpp_dump_macro_hash. - * cpplib.c: Include hashtab.h. - (do_define): Use _cpp_lookup_slot and _cpp_make_hashnode to - create hash entries. - (do_pragma_poison, do_assert): Likewise. - (do_include): Don't push the buffer here. Don't increment - system_include_depth unless _cpp_read_include_file succeeds. - (do_undef, do_unassert): Use _cpp_lookup_slot and htab_clear_slot - or htab_remove_elt. - (do_pragma_implementation): Use alloca to create copy. - - * Makefile.in: Update dependencies. - -2000-03-12 Kaveh R. Ghazi - - * cppinit.c (cl_directive_handler): More K&R fixing. - -Sat Mar 11 23:54:26 2000 Jim Wilson - - * config/ia64/ia64.c (ia64_compute_frame_size): Align size to - STACK_BOUNDARY. - * config/ia64/ia64.h (REGISTER_MOVE_COST): Add missing parentheses. - -2000-03-11 Kaveh R. Ghazi - - * cppinit.c (no_arg, no_ass, no_dir, no_fil, no_mac, no_pth): - Change from char[] to macros. - -2000-03-12 Neil Booth - - * cppinit.c (cpp_start_read): Update indirect function - call to K&R C. - -Sat Mar 11 16:18:12 2000 Jim Wilson - - * config/ia64/ia64.h (ADDITIONAL_REGISTER_NAMES): Fix typo in loc79 - entry. - - * config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, - config/ia64/ia64.md, config/ia64/xm-ia64.h: Fix copyright messages. - -2000-03-11 Neil Booth - - * cppinit.c (struct pending option): Replace undef with a - pointer to a directive handling routine. - (struct cpp_pending): Replace separate assert_ and define_ - lists with one directive_ list. - (new_pending_define): Rename new_pending_directive. Extra - argument is the directive's handling routine. - (handle_option): Update to use new_pending_directive. - -2000-03-11 Neil Booth - - * cppfiles.c (file_cleanup, _cpp_find_include_file, - remap_filename, _cpp_read_include_file, actual_directory, - hack_vms_include_specification): Replace bcopy(), index() etc - calls. Add casts to some allocations. Make some variables - pointers to const [unsigned] char. - * cpphash.c (_cpp_install, macro_cleanup, collect_expansion, - collect_formal_parameters): Similarly. - * cppinit.c (struct pending_option, append_include_chain, - cpp_options_init, cpp_reader_init, initialize_standard_includes, - cpp_start_read, new_pending_define, handle_option): Similarly. - * cpplib.c (cpp_define, copy_comment, do_define, do_include, - do_undef, do_error, do_warning, do_pragma, do_pragma_once, - do_pragma_implementation, detect_if_not_defined, - do_ifdef, skip_if_group, cpp_get_token, parse_string, - do_assert, do_unassert): Similarly. - * cpplib.h (cpp_buffer, cpp_options): Update types. Update - function prototypes. - * mkdeps.c (deps_add_target, deps_add_dep): cast allocations. - -2000-03-10 Richard Henderson - - * builtins.c (expand_builtin_strlen): Revert last change. - Use emit_insn_before if we're at the beginning of a sequence. - -2000-03-10 Jason Merrill - - * builtins.c (expand_builtin_strlen): Make sure that we have something - at the beginning of the sequence. - - * toplev.c (rest_of_compilation): Also set TREE_NOTHROW for - deferred inlines. - - * invoke.texi (C++ Dialect Options): Document -fno-enforce-eh-specs. - -2000-03-10 Richard Henderson - - * except.c (can_throw): Use INTVAL on a CONST_INT. - (reachable_handlers): Likewise. - * flow.c (count_basic_blocks, find_basic_blocks_1): Likewise. - -2000-03-10 Andreas Jaeger - - * config/mips/linux.h: Undefine MD_EXEC_PREFIX and - MD_STARTFILE_PREFIX since those are not needed on linux. - (ASM_FILE_START): New, from mips/gnu.h. - -2000-03-09 Richard Henderson - Alex Samuel and others - - * Makefile.in (ssa.o): New rule. - (OBJS): Add ssa.o. - (STAGESTUFF): Add *.ssa and *.ussa. - (mostlyclean): Delete *.ssa, *.ussa, */*.ssa, */*.ussa. - * rtl.def (PHI): New RTL expression. - * rtl.h (clear_log_links): New declaration. - (convert_to_ssa): Likewise. - (convert_from_ssa): Likewise. - * flow.c (split_edge): If the entry node falls through to the - split edge's source block, split the entry edge. - (clear_log_links): New function. - * toplev.c (ssa_dump): New variable. - (flag_ssa): Likewise. - (f_options): Add "ssa". - (compile_file): Create SSA dump files. - (rest_of_compilation): Go to and from SSA if enabled. - (decide_d_option): Handle -de for SSA dump files. - * ssa.c: New file. - -Thu Mar 9 20:01:38 2000 Jim Wilson - - * expr.c (expand_assignment): For a CALL_EXPR, special case PARM_DECL - same as VAR_DECL. - -2000-03-09 Benjamin Kosnik - - * config/alpha/linux.h (WCHAR_TYPE): Make consistent. - -Thu Mar 9 18:10:02 2000 Jeffrey A Law (law@cygnus.com) - - * config/pa/pa-hpux10.h (LIB_SPEC): Correct typo in !p case. - (MD_STARTFILE_PREFIX_1): New macro. - -2000-03-09 Robert Lipe - - * config/ia64/ia64.c: Include system.h. - -2000-03-09 Jason Merrill - - * except.c (nothrow_function_p): If -fno-exceptions, just return. - (init_eh_nesting_info): Likewise. - - * tree.h (struct tree_common): Rename raises_flag to nothrow_flag. - (TREE_NOTHROW): Rename from TREE_RAISES. - * toplev.c (rest_of_compilation): Set it. - * print-tree.c (print_node): Adjust. - * tree.c (stabilize_reference, build, build1): Don't set TREE_RAISES. - (stabilize_reference_1, get_unwidened, get_narrower): Likewise. - * calls.c (emit_call_1): Add 'nothrow' parm. Add - REG_EH_REGION note as appropriate. - (libfunc_nothrow): New fn. - (emit_library_call, emit_library_call_value): Use it. - (expand_call): Check TREE_NOTHROW. - - * varasm.c (make_decl_rtl): Skip initial '*' when setting - DECL_ASSEMBLER_NAME. - -2000-03-09 Andreas Jaeger - - * mips/linux.h (NO_IMPLICIT_EXTERN_C): Define. - (TARGET_MEM_FUNCTIONS): Define. - -2000-03-09 Jason Merrill - - * i386.c (ix86_valid_type_attribute_p): Use compare_tree_int. - - * except.c (can_throw): See through a SEQUENCE. - (nothrow_function_p): New fn. - * except.h: Declare it. - * function.c (current_function_nothrow): New var. - (prepare_function_start): Initialize it. - * output.h: Declare it. - * toplev.c (rest_of_compilation): Set it. - * dwarf2out.c (dwarf2out_begin_prologue): Use it. - -2000-03-09 Zack Weinberg - - * cpphash.c (collect_formal_parameters): strncmp returns 0 for - match. (cpp_compare_defs): Count the nul separator when - advancing over argument names. - -2000-03-09 Bernd Schmidt - - * recog.c (preprocess_constraints): Matching constraints affect - same alternative/different operand, not same operand/different - alternative. - - * reload1.c (eliminate_regs_in_insn): Handle additions of eliminable - register and a constant specially. - -2000-03-08 Kaveh R. Ghazi - - * libgcc2.h: New file. - * libgcc2.c: Move macros, typedefs and prototypes to libgcc2.h. - -Wed Mar 8 16:19:42 2000 Jim Wilson - - * configure.in (ia64*-*-elf*, ia64*-*-linux*): New. - * configure: Regenerate. - * config/ia64: New. - -2000-03-08 Zack Weinberg - - * Makefile.in (LIBCPP_DEPS): New macro. - (cpplib.o, cpphash.o, cpperror.o, cppexp.o, cppfiles.o): Use - it to declare deps. - * cpperror.c: Include cpphash.h. - * cppexp.c: Include cpphash.h. Remove MULTIBYTE_CHARS - dingleberry. - (lex): Don't use CPP_WARN_UNDEF. - (_cpp_parse_expr): Return an int, the truth value. - * cppfiles.c: Include cpphash.h. - (_cpp_merge_include_chains): Move to cppinit.c and make static. - * cppinit.c (include_defaults_array): Disentangle. - (cpp_cleanup): Don't free the if stack here. - (cpp_finish): Pop off all buffers, not just one. - * cpplib.c (eval_if_expr): Return int. - (do_xifdef): Rename do_ifdef. - (handle_directive): Don't use CPP_PREPROCESSED. - (cpp_get_token): Don't use CPP_C89. - * fix-header.c: Don't use CPP_OPTIONS. - - * cpplib.h: Move U_CHAR, enum node_type, struct - file_name_list, struct ihash, is_idchar, is_idstart, - is_numchar, is_numstart, is_hspace, is_space, CPP_BUF_PEEK, - CPP_BUF_GET, CPP_FORWARD, CPP_PUTS, CPP_PUTS_Q, CPP_PUTC, - CPP_PUTC_Q, CPP_NUL_TERMINATE, CPP_NUL_TERMINATE_Q, - CPP_BUMP_BUFFER_LINE, CPP_BUMP_LINE, CPP_PREV_BUFFER, - CPP_PRINT_DEPS, CPP_TRADITIONAL, CPP_PEDANTIC, and prototypes - of _cpp_simplify_pathname, _cpp_find_include_file, - _cpp_read_include_file, and _cpp_parse_expr to cpphash.h. - Move struct if_stack to cpplib.c. Move struct cpp_pending to - cppinit.c. - Change all uses of U_CHAR to be unsigned char instead. - Delete CPP_WARN_UNDEF, CPP_C89, and CPP_PREPROCESSED. - -2000-03-08 Jason Merrill - - * dwarf2out.c (dw_fde_struct): Add 'nothrow'. - (dwarf2out_begin_prologue): Set it. - (output_call_frame_info): Don't emit EH unwind info for leaves. - - * flow.c (count_basic_blocks, find_basic_blocks_1): A rethrow - can occur outside of an EH region. - * except.c: Correct comments about rethrow behavior. - (rethrow_symbol_map): Do nothing if !flag_new_exceptions. - -2000-03-08 Andrew MacLeod - - * flow.c (make_edges): Always call make_eh_edge for calls. - -2000-03-08 Zack Weinberg - - * cpplib.h (parse_underflow_t, CPP_NULL_BUFFER): Delete. - (struct cpp_buffer): Remove fname and underflow fields. - (struct cpp_reader): Remove get_token field. - (struct include_hash): Rename to struct ihash. Add typedef to - IHASH. - (struct if_stack): Remove fname field. - (IF_STACK_FRAME): Rename to IF_STACK. - - * cpperror.c (print_containing_files): Trust that there are no - macro buffers below the top file buffer. - * cppfiles.c: Replace all references to 'struct include_hash' - with 'IHASH'. Rename initialize_input_buffer to - init_input_buffer. Don't set or reference cpp_buffer->fname, - use buffer->ihash->name instead. - * cpphash.c (special_symbol): Use cpp_file_buffer. Use NULL - not CPP_NULL_BUFFER. - * cppinit.c: Use NULL not CPP_NULL_BUFFER, IF_STACK not - IF_STACK_FRAME, IHASH not struct include_hash. - * cpplib.c: Rename eval_if_expression to eval_if_expr. Remove - null_underflow. Use IF_STACK not IF_STACK_FRAME, IHASH not - struct include_hash, NULL not CPP_NULL_BUFFER. Remove all - references to cpp_buffer->fname (delete entirely, or use - ->ihash->name instead) and IF_STACK->fname. - (cpp_push_buffer): Don't set new->underflow. - (do_include): Use cpp_file_buffer. - - * cpphash.c (collect_formal_parameters): Remove duplicate - increment of argslen. Pedwarn in C99 mode if __VA_ARGS__ is - used as a macro argument name. Don't append "..." to namebuf - for varargs macros. After we're done scanning, go through - namebuf and make it NUL separated, not comma separated. - (_cpp_compare_defs): Remove register tag from variables. - Expect defn->argnames to be NUL separated. - (_cpp_dump_definition): Expect defn->argnames to be NUL - separated and in forward order. - * cpphash.h: Update documentation of argnames field. - -2000-03-08 Richard Henderson - - * builtins.c (expand_builtin_strlen): Be prepared for strlensi - to fail. Don't pre-expand the source operand. - - * i386.md (strlensi): Initialize eoschar and align before use. - -2000-03-08 Jason Merrill - - * expr.c (expand_expr, case ARRAY_REF): Still check for missing - CONSTRUCTOR element. - -2000-03-08 Gavin Romig-Koch - - * mips.c (mips_expand_prologue): If the last - named argument is the vararg marker "va_list", treat it as - an unnamed argument. - -2000-03-08 Clinton Popetz - - * dbxout.c (dbxout_parms): When correcting for promoted - big-endian parameters, use the mode of the DECL_RTL rather - than UNITS_PER_WORD. - -2000-03-08 Nathan Sidwell - - * c-common.h (make_fname_decl): Declare. - * c-common.c (make_fname_decl): Define. - (declare_hidden_char_array): Remove. - (declare_function_name): Use make_fname_decl. - * c-decl.c (c_make_fname_decl): New function. - (init_decl_processing): Set make_fname_decl. - -Tue Mar 7 23:50:31 2000 Jeffrey A Law (law@cygnus.com) - - * cccp.c (handle_directive): Initialize backslash_newlines_p. - -2000-03-07 Philipp Thomas - - * po/POTFILES.in: Remove cppalloc.c from file list. - -2000-03-07 Steve Chamberlain - - * pj.c (pj_expand_prologue): current_function->args_info is - now current_function_args_info. - - * pj.h (STORE_FLAG_VALUE, USER_LABEL_PREFIX, - LOCAL_LABEL_PREFIX, ASM_GENERATE_INTERNAL_LABEL, - ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_SKIP): Define. - -2000-03-08 Michael Hayes - - * config/c4x/c4x.h (PUT_SDB_TYPE): Define so that the type info is - output as hexadecimal rather than the default octal. - -2000-03-07 Zack Weinberg - - * cpphash.c (special_symbol): Fix thinko in previous commit. - -2000-03-07 Neil Booth - - * cppexp.c (struct operation, left_shift, right_shift, - cpp_parse_expr): Change some "char"s to "U_CHAR"s, and some - "int"s to "unsigned int"s. - * cpplib.c (detect_if_not_defined, do_assert, do_unassert): - Similarly. - * cpplib.h: Update for above. - * mkdeps.c (deps_init, deps_calc_target): Cast pointers - returned from allocations. - - * cppinit.c (opt_comp, parse_options): New functions. - (handle_option): Use parse_option to parse a single command - line option, that possibly takes an argument. - (cpp_handle_options): Sort the array of command line options on - first invocation (non-ASCII hosts only). - (print_help): Update. - -2000-03-07 Zack Weinberg - - * mkdeps.c (munge): Fix off-by-one bug and inconsistencies in - backslash counting loops. Problem noted by Matt Kraai . - - * cppfiles.c (_cpp_find_include_file): Make sure ih->name is - initialized. - * cppinit.c (cpp_cleanup): Free imp->nshort also. - - * cpperror.c (cpp_print_containing_files, - cpp_print_file_and_line, v_cpp_message): Rename to - print_containing_files, print_file_and_line, and v_message. - * cppexp.c (cpp_parse_expr, cpp_parse_escape, cpp_lex): Rename - to _cpp_parse_expr, parse_escape, and lex. - (parse_charconst): Remove broken multibyte support. - * cppfiles.c (include_hash): Make static. - (cpp_included): New function. - (merge_include_chains, find_include_file, finclude, - simplify_pathname): Rename to _cpp_merge_include_chains, - _cpp_find_include_file, _cpp_read_include_file, and - _cpp_simplify_pathname. - * cpphash.c (cpp_lookup, free_definition, delete_macro, - cpp_install, create_definition, macroexpand, compare_defs, - dump_definition): Rename to _cpp_lookup, _cpp_free_definition, - _cpp_delete_macro, _cpp_install, _cpp_create_definition, - _cpp_macroexpand, _cpp_compare_defs, and _cpp_dump_definition. - * cppinit.c (cpp_handle_option): Rename to handle_option, make - static. - * cpplib.c: Remove extern prototype of cpp_parse_expr. - - * cpphash.h: Update prototypes. - * cpplib.h: Likewise. Prototype _cpp_parse_expr here. - -2000-03-07 Andrew Haley - - * config/mips/mips.h (PTRDIFF_TYPE): Revert broken change; - PTRDIFF_TYPE should be based solely on Pmode. - (SIZE_TYPE): ditto. - -2000-03-07 Kaveh R. Ghazi - - * rtl.h (rtunion_def): Constify member `rtstr'. - (emit_line_note_after, emit_line_note, emit_line_note_force, - emit_note, decode_asm_operands): Constify. - - * cse.c (canon_hash): Likewise. - - * dbxout.c (dbxout_block): Likewise. - - * diagnostic.c (file_and_line_for_asm, v_error_for_asm, - v_warning_for_asm): Likewise. - - * dwarfout.c (function_start_label): Likewise. - - * emit-rtl.c (emit_line_note_after, emit_line_note, emit_note, - emit_line_note_force): Likewise. - - * final.c (last_filename, asm_insn_count, final_scan_insn, - output_source_line): Likewise. - - * function.h (struct emit_status): Likewise. - - * gcse.c (hash_expr_1): Likewise. - - * genattr.c (gen_attr, main): Likewise. - - * genattrtab.c (struct function_unit, current_alternative_string, - write_attr_valueq, n_comma_elts, next_comma_elt, attr_eq, - attr_numeral, check_attr_test, check_attr_value, - convert_set_attr_alternative, convert_set_attr, - compute_alternative_mask, simplify_by_exploding, gen_attr, - gen_unit): Likewise. - - * genflags.c (gen_insn): Likewise. - - * gengenrtl.c (type_from_format): Likewise. - - * genopinit.c (gen_insn): Likewise. - - * genoutput.c (n_occurrences, process_template, process_template): - Likewise. - - * ggc-page.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size): - Likewise. - - * ggc-simple.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size): - Likewise. - - * ggc.h (ggc_mark_string, ggc_mark, ggc_mark_if_gcable, - ggc_set_mark, ggc_get_size): Likewise. - - * objc/objc-act.c (build_module_descriptor, finish_objc): Likewise. - - * optabs.c (init_one_libfunc): Likewise. - - * output.h (assemble_start_function): Likewise. - - * recog.c (decode_asm_operands): Likewise. - - * toplev.c (rest_of_compilation): Likewise. - - * tree.h (emit_line_note_after, emit_line_note, - emit_line_note_force): Likewise. - - * varasm.c (asm_output_bss, asm_output_aligned_bss, - asm_emit_uninitialised, assemble_start_function, - assemble_variable, const_hash, compare_constant_1, - find_pool_constant, mark_constant_pool, assemble_alias): Likewise. - - * xcoffout.h (DBX_FINISH_SYMBOL): Likewise. - - * alpha/alpha.md (call_vms, call_value_vms): Likewise. - - * arm/aof.h (ASM_OUTPUT_ASCII): Likewise. - - * arm/aout.h (ASM_OUTPUT_ASCII): Likewise. - - * arm/arm-protos.h (output_ascii_pseudo_op, arm_dllexport_name_p, - arm_dllimport_name_p): Likewise. - - * arm/arm.c (arm_encode_call_attribute, output_ascii_pseudo_op): - Likewise. - - * arm/arm.h (ASM_OUTPUT_MI_THUNK): Likewise. - - * arm/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * arm/pe.c (arm_dllexport_name_p, arm_dllimport_name_p, - arm_mark_dllexport, arm_mark_dllimport, - arm_pe_encode_section_info): Likewise. - - * arm/telf.h (ASM_OUTPUT_DEF_FROM_DECLS, - ASM_FINISH_DECLARE_OBJECT): Likewise. - - * arm/thumb.c (thumb_function_prologue): Likewise. - - * arm/thumb.h (ASM_OUTPUT_ASCII): Likewise. - - * avr/avr.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * clipper/clix.h (ASM_OUTPUT_ASCII): Likewise. - - * fx80/fx80.h (ASM_OUTPUT_ASCII): Likewise. - - * i386/cygwin.h (ASM_OUTPUT_SECTION_NAME): Likewise. - - * i386/freebsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * i386/i386-interix.h (ASM_OUTPUT_LIMITED_STRING, - ASM_OUTPUT_ASCII, ASM_OUTPUT_SECTION_NAME): Likewise. - - * i386/i386-protos.h (asm_output_function_prefix): Likewise. - - * i386/i386.c (asm_output_function_prefix): Likewise. - - * i386/i386elf.h (ASM_OUTPUT_ASCII): Likewise. - - * i386/osfrose.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * i386/ptx4-i.h (ASM_OUTPUT_ASCII): Likewise. - - * i386/sco5.h (ASM_FINISH_DECLARE_OBJECT, - ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII, - ASM_OUTPUT_SECTION_NAME): Likewise. - - * i386/sysv4.h (ASM_OUTPUT_ASCII): Likewise. - - * i860/paragon.h (ASM_OUTPUT_ASCII): Likewise. - - * i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise. - - * m32r/m32r.c (m32r_encode_section_info): Likewise. - - * mcore-elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * mcore/mcore.c (mcore_encode_section_info): Likewise. - - * mips/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * mips/elf64.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * mips/iris6.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * mips/mips.h (ASM_OUTPUT_IDENT): Likewise. - - * mips/mips.md (movdi, movsi): Likewise. - - * mips/netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * openbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise. - - * ptx4.h (ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING, - ASM_OUTPUT_ASCII): Likewise. - - * rs6000/rs6000.c (rs6000_allocate_stack_space, output_epilog, - output_mi_thunk, output_toc): Likewise. - - * rs6000/rs6000.md (movsi): Likewise. - - * rs6000/sysv4.h (ASM_OUTPUT_INT, ASM_OUTPUT_SECTION_NAME): Likewise. - - * tahoe/harris.h (ASM_OUTPUT_ASCII): Likewise. - - * v850/v850.c (print_operand, print_operand_address, - v850_encode_data_area): Likewise. - -2000-03-07 Clinton Popetz - - * config/mips/mips.md (zero_extendsidi2): Always force operand - one to memory for mips16. - -Mon Mar 6 15:22:29 2000 Richard Kenner - - * tree.h (INT_CST_LT, INT_CST_LT_UNSIGNED): Remove unneeded casts. - (struct tree_int_cst): int_cst_low is now unsigned HOST_WIDE_INT. - (attribute_hash_list, type_hash_canon): hashcode is now unsigned. - (type_hash_lookup, type_hash_add, type_hash_list): Likewise. - (min_precision): Result is unsigned. - (add_double, neg_double, mul_double): Low word is unsigned. - (lshift_double, rshift_double, lrotate_double): Likewise. - (rrotate_double, div_and_round_double): Likewise. - (tree_floor_log2, compare_tree_int): New functions. - (preserve_rtl_expr_temps): New declaration. - * c-common.c (declare_hidden_char_array): Use compare_tree_int. - (decl_attributes): Use tree_log2 to find alignment. - Check for TREE_INT_CST_HIGH for format args. - (min_precision): Now unsigned. - Use tree_floor_log2. - (truthvalue_conversion): Delete long-disabled code. - * c-decl.c (finish_struct): Clean up tests on field width. - (finish_function): Use compare_tree_int. - * c-pragma.c (handle_pragma_token): Use tree_log2 for alignment. - * c-typeck.c (comptypes): Use tree_int_cst_equal. - (default_conversion, digest_init): Use compare_tree_int. - (build_binary_op): Use integer_all_onesp and compare_tree_int. - Fix type errors in forming masks. - * calls.c (initialize_argument_information): Use compare_tree_int. - * dbxout.c (dbxout_type): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. - * except.c (expand_eh_region_start_tree): Use compare_tree_int. - * expr.c (is_zeros_p, case INTEGER_CST): Use integer_zerop. - (store_field): Use compare_tree_int. - (expand_expr, case CONSTRUCTOR): Use TYPE_SIZE_UNIT. - (expand_expr, case ARRAY_REF): Use compare_tree_int. - (do_jump, case BIT_AND_EXPR): Use tree_floor_log2. - (do_store_flag): Use compare_tree_int. - * fold-const.c (encode, decode): Low part is always unsigned. - (force_fit_type, add_double, neg_double, mul_double): Likewise. - (lshift_double, rshift_double, lrotate_double): Likewise. - (rrotate_double, div_and_round_double, int_const_binop): Likewise. - (fold_convert): Use compare_tree_int. - (operand_equal_p, case INTEGER_CST): Use tree_int_cst_equal. - (invert_truthvalue, case INTEGER_CST): Likewise. - (fold): Use compare_tree_int; add casts for unsigned TREE_INT_CST_LOW. - * mkdeps.c (deps_dummy_targets): Make I unsigned. - * rtl.h (add_double, neg_double, mul_double): Low words are unsigned. - (lshift_double, rshift_double, lrotate_double, rrotate_double): - Likewise. - * stmt.c (expand_decl): Use compare_tree_int and mode_for_size_tree. - (expand_end_case): Use compare_tree_int. - (estimate_case_costs): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. - * stor-layout.c (mode_for_size_tree): Use compare_tree_int. - (layout_decl): Likewise. - (layout_record, layout_union): Make sizes unsigned. - (layout_type, case VOID_TYPE): TYPE_SIZE must be bitsizetype. - (layout_type, case QUAL_UNION_TYPE): Use compare_tree_int. - * tree.c (struct type_hash): hashcode is unsigned. - (build_type_attribute_variant, type_hash_list): Likewise. - (type_hash_lookup, type_hash_add, type_hash_canon): Likewise. - (attribute_hash_list, build_array_type, build_method_type): Likewise. - (build_complex_type): Likewise. - (real_value_from_int_cst): Remove unneeded casts. - (integer_all_onesp): Add casts. - (tree_floor_log2, compare_tree_int): New functions. - (build_index_type): Use tree_int_cst_sgn. - * varasm.c (assemble_variable): Use compare_tree_int. - -2000-03-06 Jason Merrill - - * cpphash.c (collect_expansion): Also catch ## at start of macro. - - * varasm.c (make_decl_rtl): Don't add a number to members of - local classes. - (make_function_rtl): Likewise. - -2000-03-06 Alexandre Oliva - - * gcse.c (compute_can_copy): Adjust if/else blocks from rth's - patch from 2000-01-28. - -2000-03-06 Clinton Popetz - - * config/sh/sh.c: (barrier_align): Handle a delay slot that is - filled with an insn from the jump target. - -2000-03-07 Michael Hayes - - * config/c4x/c4x-protos.h (c4x_global_name): Constify char *. - (c4x_external_ref): Likewise. - * config/c4x/c4x.c (struct name_list): Likewise. - -1999-12-16 Ben Collins - - * Makefile.in: Pass a new MULTILIB_EXCLUSIONS option as the sixth - argument to genmultilib. - * genmultilib: accept new MULTILIB_EXCLUSIONS option and output - the contents into the multilib.h header. - * gcc.c: Declare multilib_exclusions for the specs file. - (set_multilib_dir): Use it. - (print_multilib_info): Likewise. - * t-linux64: Declare arguments for new MULTILIB_EXCLUSIONS option - to pass to genmultilib. - -2000-03-06 Kaveh R. Ghazi - - * builtins.c (built_in_class_names, built_in_names): Constify a - char*. - - * gmon-sol2.c (monstartup, moncontrol): Cast ptrs to long, not - int. - (_mcleanup): Ensure value matches format specifier in sprintf. - - * cpphash.c (special_symbol): Don't needlessly cast away - const-ness. - - * cppinit.c (base_name): Delete unused prototype. - - * mkdeps.c (deps_init): Make definition K&R safe. - - * tree.h (built_in_class_names, built_in_names): Constify a - char*. - -2000-03-06 Jakub Jelinek - - * config/sparc/sparc.c (eligible_for_epilogue_delay): Accept - floating point instructions for epilogue delay. - - * config/sparc/sparc.h (ASM_ARCH64_SPEC): Pass -no-undeclared-regs - to gas if it supports .register pseudo. - - * real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Define to - LONG_DOUBLE_TYPE_SIZE if not defined. - Use MAX_LONG_DOUBLE_TYPE_SIZE instead of - LONG_DOUBLE_TYPE_SIZE in preprocessor if clauses. - * real.c: Likewise. - * gengenrtl.c: Likewise. - * print-rtl.c: Likewise. - * rtl.c: Likewise. - * config/sparc/sol2-sld-64.h (TARGET_DEFAULT): Set - MASK_LONG_DOUBLE_128. - * config/sparc/sol2.h (TARGET_DEFAULT): Likewise. - * config/sparc/sp64-elf.h (TARGET_DEFAULT): Likewise. - * config/sparc/linux64 (TARGET_DEFAULT): Likewise. - (SUBTARGET_SWITCHES): Define. - (CPP_ARCH32_SPEC): Define __LONG_DOUBLE_128__ if compiling - with -mlong-double-128. - (LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags. - (MAX_LONG_DOUBLE_TYPE_SIZE): Define. - (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros. - (CC1_SPEC): Include -mlong-double-{64,128} as needed. - * config/sparc/linux.h (SUBTARGET_SWITCHES): Define. - (CPP_SUBTARGET_SPEC): Define __LONG_DOUBLE_128__ if compiling - with -mlong-double-128. - (LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags. - (MAX_LONG_DOUBLE_TYPE_SIZE): Define. - (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros. - * config/sparc/sparc.h (MASK_LONG_DOUBLE_128, - TARGET_LONG_DOUBLE_128): Define. - * config/sparc/linux-aout.h (LONG_DOUBLE_TYPE_SIZE): Remove. - * config/sparc/sparc.c (sparc_override_options): Disallow 64bit - long double on TARGET_ARCH64. - -2000-03-06 Mark Mitchell - - * function.c (free_temps_for_rtl_expr): Don't free slots - that have been pushed into a higher level. - - Revert this patch: - 2000-03-05 Mark Mitchell - -2000-03-05 Mark Mitchell - - * basic-block.h (ALLOCA_REG_SET): Remove. - (INITIALIZE_REG_SET): New macro. - * flow.c (update_life_info): Use it. - (calculate_global_regs_live): Likewise. - (propagate_block): Likewise. - * global.c (build_insn_chain): Likewise. - * haifa-sched.c (schedule_region): Likewise. - -2000-03-05 Stephane Carrez - - * dwarf2out.c (UNALIGNED_WORD_ASM_OP): Support 2 bytes pointer. - (ASM_OUTPUT_DWARF_ADDR_CONST): Use UNALIGNED_WORD_ASM_OP. - (DWARF_ARANGES_PAD_SIZE): New define. - (output_aranges): Use it to pad the address range header. - (DWARF_ROUND): Fix for non power of 2 rounding. - -2000-03-05 Jason Merrill - - * mkdeps.c (deps_calc_target): Remove incorrect 'const'. - -2000-03-05 Mark Mitchell - - * tree.def (RTL_EXPR): Update documentation. - * tree.h (RTL_EXPR_HAS_NO_SCOPE): New macro. - * expr.c (expand_expr): Handle RTL_EXPR_HAS_NO_SCOPE. - * function.c (preserve_rtl_expr_temp): New function. - (preserve_rtl_expr_temps): Likewise. - (preserve_rtl_expr_result): Use it. - - Revert this patch: - 2000-03-04 Mark Mitchell - -2000-03-04 Thomas Schuster - - * regmove.c (copy_src_to_dest) Do not create src->dest move - for unchanging destination. - -2000-03-04 Mark Mitchell - - * function.h (struct sequence_stack): Remove rtl_expr. - (struct emit_staus): Likewise. - (seq_rtl_expr): Remove. - * tree.h (free_temps_for_rtl_expr): Don't declare. - (start_sequence_for_rtl_expr): Likewise. - * rtl.h (preserve_rtl_expr_result): Likewise. - * emit-rtl.c (start_sequence): Don't set sequence_rtl_expr. - (start_sequence_for_rtl_expr): Remove. - (push_topmost_sequence): Don't save sequence_rtl_expr. - (pop_topmost_sequence): Remove comment about not restoring it. - (end_sequence): Don't set seq_rtl_expr. - (init_emit): Don't initialize it. - (mark_sequence_stack): Don't mark it. - (mark_emit_status): Likewise. - * except.c (protect_with_terminate): Use - start_sequence_for_rtl_expr, not start_sequence. - * expr.c (expand_expr, case RTL_EXPR): Don't call - preserve_rtl_expr_result or free_temps_for_rtl_expr. - * function.c (assign_stack_temp_for_type): Don't set rtl_expr. - (preserve_rtl_expr_result): Remove. - (free_temps_for_rtl_expr): Likewise. - (pop_temp_slots): Likewise. - (mark_temp_slot): Don't mark the rtl_expr. - * stmt.c (expand_start_stmt_expr): Use start_sequence, not - start_sequence_for_rtl_expr. - -2000-03-04 Zack Weinberg - - * mkdeps.c, mkdeps.h: New files. - * po/POTFILES.in: Add them. - * Makefile.in (LIBCPP_OBJS): Add mkdeps.o. - (cpplib.o, cppinit.o): Depend on mkdeps.h. - (mkdeps.o): New target. - - * cppfiles.c: Delete deps_output. - * cppinit.c: Include mkdeps.h. Delete known_suffixes, - OBJECT_SUFFIX, and base_name. - (cpp_cleanup): Use deps_free. Free ihash->name when clearing - the include hash. - (initialize_dependency_output): Use deps_init, - deps_add_target, deps_calc_target, and deps_add_dep. Remove - all the unnecessary string bashing. - (cpp_finish): Use deps_write. Remove an unnecessary nesting - level. - * cpplib.c (do_include): Use deps_add_dep. - * cpplib.h (struct cpp_reader): Replace deps_buffer, - deps_allocated_size, deps_size, deps_column members with - single pointer to a struct deps. Delete prototype of - deps_output. - - * cppinit.c: Fix thinko in previous patch. - -Sat Mar 4 11:32:30 2000 Richard Kenner - - * machmode.h (mode_for_size, smallest_mode_for_size): SIZE now signed. - * stor-layout.c (mode_for_size, smallest_mode_for_size): Likewise. - (mode_for_size_tree): New function. - (layout_decl, layout_type): Call it and clean up BLKmode checks. - * tree.h (mode_for_size_tree): New declaration. - - * toplev.c (debug_ignore_block): Mark arg BLOCK as possibly unused. - -2000-03-04 Jason Merrill - - * stmt.c (is_body_block): Move... - * dwarfout.c, dwarf2out.c: ...from here. - * tree.h: Declare it. - * emit-rtl.c (remove_unnecessary_notes): Don't remove the body block. - * final.c (final_start_function): Do call remove_unnecessary_notes - when scheduling. - -2000-03-03 Zack Weinberg - - * config/vax/xm-vms.h: Define OBJECT_SUFFIX and EXECUTABLE_SUFFIX. - - * cpplib.h (_dollar_ok): New macro. - (is_idchar, is_idstart): Use it. - (IStable): Rename to _cpp_IStable. Declare it const if - gcc >=2.7 or C99. Delete all references to FAKE_CONST. - (is_idchar, is_idstart, is_numchar, is_numstart, is_hspace, - is_space): Update for renamed IStable. - - * cppinit.c: Delete all references to FAKE_CONST and CAT - macros. Define init_IStable as empty macro if gcc >=2.7 or - C99. Change TABLE() to ISTABLE and hardcode name of table. - (cpp_start_read): Don't change the IStable based on - dollars_in_ident. - - * cpphash.c (unsafe_chars): Add pfile argument. All callers - changed. Handle '$' for char1 correctly. - * cpplib.c (cpp_get_token): Use is_numchar when parsing numbers. - - * cppexp.c (tokentab2): Make const. - (cpp_lex): Make toktab const. - * cppinit.c (include_defaults_array): Make const. - (initialize_standard_includes): Make default_include const. - -2000-03-03 Jason Merrill - - * dwarf2out.c (dwarf2out_frame_debug): Add cast to silence warning. - (dwarf2out_decl): Functions can now have DECL_IGNORED_P. - (gen_decl_die): Likewise. - * dwarfout.c (dwarfout_file_scope_decl): Likewise. - (output_decl): Likewise. - - * varasm.c (make_function_rtl): If we change the name used in the - rtl, update DECL_ASSEMBLER_NAME accordingly. - (make_decl_rtl): Likewise. - - * toplev.c (rest_of_compilation): Tweak formatting. - - * toplev.c (rest_of_compilation): find_loop_tree_blocks before - remove_unnecessary_notes. - (debug_ignore_block): New fn. - * toplev.h: Declare it. - * emit-rtl.c (remove_unnecessary_notes): Call it. - * dwarf2out.c (dwarf2out_ignore_block): New fn. - * dwarf2out.h: Declare it. - * final.c (final_start_function): Don't call remove_unnecessary_notes - if we did insn scheduling. - -2000-03-03 Zack Weinberg - - * cppinit.c (cpp_handle_option): Set opts->pedantic directly. - * cpplib.h: Delete SET_CPP_PEDANTIC. - -Fri Mar 3 14:56:12 2000 Richard Kenner - - * expr.c (expand_expr, case COMPONENT_REF): Use bitfield case if - result is a RECORD_TYPE. - -2000-03-03 Jonathan Larmour - - * mips/elf.h (CTOR_LISTS_DEFINED_EXTERNALLY): Added. - -2000-03-03 Richard Henderson - - * alpha.c (alpha_emit_set_const_1): Re-order cases to prefer - addition over compliments over shifts. - -Fri Mar 3 12:49:28 2000 J"orn Rennecke - - * reload1.c (reload_combine_note_use): Handle return register USEs. - REG case: Handle multi-hard-register hard regs. - -Fri Mar 3 07:38:34 2000 Richard Kenner - - * md.texi: Document use of '*' in insn pattern name. - -2000-03-03 Jason Merrill - - * calls.c (special_function_p): operator new may not be malloc-like. - - * gcse.c (dump_hash_table): Really fix error in last change. - -2000-03-02 Denis Chertykov - - * avr.c (print_operand): Use print_operand_address instead of - output_addr_const. - * avr/libgcc.S: Cleanup code. - -2000-03-02 Richard Henderson - - * alpha.c (alpha_emit_set_const_1): Also try c + small constant. - -2000-03-02 Mark Mitchell - - * tree.h (TYPE_ALIGN_UNIT): New macro. - -2000-03-02 Clinton Popetz - - * i386.c: (constant_call_address_operand): Reject CONST_INT. - -2000-03-02 Jason Merrill - - * cpplib.h (CPP_PEDANTIC): Only true if system_header_p is not set - for the buffer. - (SET_CPP_PEDANTIC): New macro. - * cpplib.c (do_include): Don't bother checking system_header_p. - (do_warning, do_ident, do_assert, do_unassert): Likewise. - * cppinit.c (cpp_handle_option): Use SET_CPP_PEDANTIC. - - * function.h (struct expr_status): Add x_arg_space_so_far. - (arg_space_so_far): New macro. - * expr.c (init_expr): Initialize it. - * calls.c (emit_call_1): Reset it. - (compute_argument_block_size, expand_call): Use it. - (expand_call, store_one_arg): Increment it. - -Thu Mar 2 17:27:13 2000 Richard Kenner - - * varasm.c (output_constant): Strip off a CONVERT_EXPR to - a UNION_TYPE. - -2000-03-02 Zack Weinberg - - * cppfiles.c (cpp_read_file): New function. - - * cpphash.c (collect_expansion): Make sure to reset last_token - to NORM when we hit a string. Handle trailing whitespace - properly when the expansion is empty. - (create_definition): Disable line commands while parsing the - directive line. - (dump_definition): If pfile->lineno == 0, output a line - command ahead of the dump, and add a trailing newline. - - * cppinit.c (append_include_chain): Add fifth argument, which - indicates whether or not system headers are C++ aware. - (initialize_standard_includes): New function, - broken out of read_and_prescan. Pass 'cxx_aware' value from - the include_defaults_array on to append_include_chain. - (dump_special_to_buffer): Const-ify char array. - (builtin_array): Don't dump __BASE_FILE__. - (cpp_start_read): Use cpp_read_file. Reorder code for - clarity. Don't output line commands here for -D/-A/-U - switches. Don't call deps_output for files included with - -include or -imacros. - - * cpplib.c (do_define): Don't pay any attention to the second - argument. - (cpp_expand_to_buffer): Disable line commands while scanning. - (output_line_command): Work in the file buffer. - * cpplib.h: Remove no_record_file flag from struct cpp_reader. - Fix formatting of comments. Prototype cpp_read_file. - -Thu Mar 2 13:29:46 2000 Richard Kenner - - * c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink - reference the language-equivalent of sizetype. - * c-typeck.c (comptypes): Treat sizetype like its language equivalent. - * fold-const.c (size_binop, size_diffop): Put back checks. - * gcse.c (dump_hash_table): Fix minor error in last change. - * stor-layout.c (set_sizetype): Set TYPE_DOMAIN of sizetype. - Clear TYPE_{NEXT,MAIN}_VARIANT and TYPE_{POINTER,REFERENCE}_to of - all sizetypes. - -Thu Mar 2 12:48:45 MET 2000 Jan Hubicka - - * calls.c (expand_call) Do not attempt to combine stack adjustments - with inhibit_defer_pop set. - -2000-03-01 Mark Mitchell - - * stor-layout.c (layout_decl): Allow front-ends to explicitly set - the DECL_SIZE for a FIELD_DECL. - -2000-03-01 Bruce Korb - - * fixinc/inclhack.tpl: remove unused symlinks - * fixinc/README: GCC Maintainer info - * fixinc/inclhack.sh: regen - * fixinc/fixincl.sh: regen - -2000-03-01 Zack Weinberg - - * cpphash.c (collect_expansion): Trim trailing white space - from macro definitions, but don't go past the last insertion - point. - -Wed Mar 1 12:14:31 MET 2000 Jan Hubicka - - * i386.md (mulqi3): New pattern. - -2000-02-29 Zack Weinberg - - * cpplib.h (CPP_ASSERTION, CPP_STRINGIZE, CPP_TOKPASTE): New - token types. - (struct cpp_reader): Add parsing_if_directive and - parsing_define_directive flags. - (struct cpp_options): Remove output_conditionals flag. - (check_macro_name): Delete prototype. - - * cpphash.h (struct macrodef): Delete. - (struct reflist): Separate from struct definition. - (struct definition): Remove unused fields. Add column number. - (create_definition): Returns a DEFINITION *. Takes a - cpp_reader * and an int. - - * cpphash.c (SKIP_WHITE_SPACE): Delete. - (PEEKC): Copy defn from cpplib.c. - (rest_extension, REST_EXTENSION_LENGTH): Delete. - (struct arg): New. - (struct arglist): Simplify. - (collect_expansion): Rewrite. Get tokens by calling - cpp_get_token. Add more error checking. - (collect_formal_parameters): New function, broken out of - create_definition and reworked to use get_directive_token. - (create_definition): All real work is now in collect_expansion - and collect_formal_parameters. do_define handles finding the - macro name. Return a DEFINITION, not a MACRODEF. - (macroexpand): Replace bcopy with memcpy throughout. Replace - character-at-a-time copy loop with memcpy and pointer increments. - (compare-defs): d1->argnames / d2->argnames might be null. - - * cpplib.c (copy_rest_of_line): Delete function. - (skip_rest_of_line): Do all the work ourselves. - (skip_string): New function. - (parse_string): Use skip_string. - (get_macro_name): New function. - (check_macro_name): Delete. - (copy_comment): Use CPP_RESERVE and CPP_PUTC_Q. - (cpp_skip_hspace): Use CPP_BUMP_LINE. - (handle_directive): ICE if we're called on a macro buffer. - (do_define): Determine macro name and type (funlike/objlike) - here. Expunge all uses of MACRODEF. - (cpp_push_buffer): Set line_base to NULL. - (do_undef, read_line_number): Don't worry about getting a POP token. - (eval_if_expression): Set/reset parsing_if_directive around - cpp_parse_expr. Don't clear only_seen_white. - (skip_if_group): Remove output_conditionals logic. Use - skip_rest_of_line. - (cpp_get_token): Return ASSERTION, STRINGIZE, and TOKPASTE - tokens under appropriate conditions. - (cpp_unassert): Call do_unassert not do_assert. Oops. - - * cppexp.c (parse_defined): New function, break out of - cpp_lex. - (cpp_lex): We now get CPP_ASSERTION tokens and can check them - ourselves, with cpp_defined. - * cppinit.c (cpp_handle_option, print_help): Delete -ifoutput. - - * gcc.dg/20000209-2.c: Turn off -pedantic-errors. - * gcc.dg/strpaste-2.c: New. - -2000-02-29 Mark Mitchell - - * fold-const.c (size_binop): Don't asert inputs are the same and - have TYPE_IS_SIZETYPE set. - (size_diffop): Likewise. - -2000-02-29 Jason Merrill - - * dwarfout.c (output_block): Output abstract blocks even if they - don't have TREE_ASM_WRITTEN set. - - * calls.c (emit_library_call): Check for null REG. - -2000-03-01 Martin von Loewis - - * c-decl.c (current_function_decl): Move to toplev.c. - (init_decl_processing): Don't add current_function_decl as a ggc - root here. - * dbxout.c (dbxout_symbol): Change return type to int. - (dbxout_symbol_location, dbxout_syms): Likewise. - (dbxout_block): Don't emit LBRAC/RBRAC pairs for blocks without - any locals. Use current_function_func_begin_label if set. - * dbxout.h (dbxout_symbol, dbxout_syms): Change return type. - * dwarf2out.c (dwarf2out_begin_prologue): Set - current_function_func_begin_label. - * final.c (final_start_function): Reset it. - * toplev.c (current_function_decl): Define it here. - (current_function_func_begin_label): New variable. - (main): Add both as ggc roots. - * tree.h (current_function_func_begin_label): Declare. - -Tue Feb 29 14:07:04 2000 Richard Kenner - - * gcse.c: Cleanups throughout: mostly white-space, but also - some minor rearrangement of code. - -Tue Feb 29 10:45:59 2000 Jeffrey A Law (law@cygnus.com) - - * calls.c (emit_library_call): Do not abort if FUNCTION_ARG - returns a PARALLEL. Use emit_group_load and use_group_regs - as needed. - (emit_library_call_value): Similarly. - - * pa/t-pa: Use quadlib.c instead of quadlib.asm. - * pa/quadlib.asm: Remove. - * pa/quadlib.c: New file. - - * configure.in (hpux10, hpux11, PA32 mode): Use i128 float format. - * configure: Rebuilt. - -2000-02-29 Philip Blundell - - * config/arm/conix-elf.h: New file. - * configure.in (arm*-*-conix*): New configuration. - * configure: Regenerate. - -2000-02-28 Jason Merrill - - * dwarf2out.c (gen_block_die): Output abstract blocks even if they - don't have TREE_ASM_WRITTEN set. - -Mon Feb 28 21:07:59 2000 Richard Kenner - - * Eliminate DECL_FIELD_SIZE. - * builtins.c (built_in_class_names, built_in_names): New variables. - * c-decl.c (finish_struct): Set specified size in DECL_SIZE. - * expr.c (expand_expr, case COMPONENT_REF): Get field size from - DECL_SIZE, not DECL_FIELD_SIZE. - * print-tree.c (print_node): Remove code that prints extra blank - lines in some cases. - Properly handle inline and builtin function cases. - * stor-layout.c (layout_decl): Get specified size from DEC_SIZE. - * tree.h (built_in_class_named, built_in_names): New declarations. - (union tree_decl): Rename internal unions to u1 and u2 and change - some of their components. - Add new field built_in_class. - (DECL_ALIGN, DECL_INCOMING_RTL, DECL_SAVED_INSNS, DECL_FRAME_SIZE): - Reflect above changes. - (DECL_FUNCTION_CODE, DECL_BUILT_IN_CLASS): Likewise. - (DECL_SET_FUNCTION_CODE, DECL_FIELD_SIZE): Deleted. - * objc/objc-act.c (objc_copy_list): Use DECL_SIZE, not DECL_FIELD_SIZE. - (encode_field_decl): Likewise; also remove obsolete test for bitfield. - -2000-02-28 Dmitri Makarov - - * extend.texi: Document ARM's support for long/short calls. - - * invoke.texi: Document ARM's -mlong-calls command line switch. - - * config/arm/arm-protos.h (arm_is_longcall_p): Add prototype. - (arm_encode_call_attribute): Add prototype. - (arm_set_default_type_attribute): Add prototype. - (arm_strip_name_encoding): Add prototype. - - * config/arm/arm.c (arm_init_cumulative_args): replace - initialisation og 'long_calls' field with initialisation of - 'call_cookie' field. - (enum arm_pragma_enum): New enum. - (arm_pragma_long_calls): New static variable. - (arm_process_pragma): Also process "#pragma long_calls_off". - (arm_valid_type_attribute_p): Accept short_call attribute. - (arm_comp_type_attributes): Check long/short call attributes. - (arm_encode_call_attribute): New function: Encode long_call - or short_call attribute in function name. - (arm_set_default_type_attributes): New function: Assign - default attributes to newly defined type. - (current_file_function_operand): New function: Return true if - the symbol is a function which has already been compiled. - (arm_is_longcall_p): New function: Return true if the - indicated function should be called via a long call. - (arm_get_strip_length): New function. Returns number of - prefix characters to be stripped from a function's name. - (arm_strip_name_encoding): New function. Strip prefix characters - from a function's name. - - * config/arm/arm.h (CUMULATIVE_ARGS): Replace 'long_call' field - with 'call_cookie'. - (SHORT_CALL_FAG_CHAR): Define. - (LONG_CALL_FAG_CHAR): Define. - (ENCODED_SHORT_CALL_ATTR_P): Define. - (ENCODED_LONG_CALL_ATTR_P): Define. - (ARM_NAME_ENCODING_LENGTHS): Define. - (STRIP_NAME_ENCODING): Define. - (ASM_OUTPUT_LABELREF): Define, and use to strip name encoding. - (ARM_ENCODE_CALL_TYPE): Define. - (ENCODE_SECTION): Invoke ARM_ENCODE_CALL_TYPE. - (ARM_DECLARE_FUNCTION_SIZE): Define. - (SET_DEFAULT_TYPE_ATTRIBUTES): Define. - - * config/arm/arm.md (call): Call arm_is_longcall_p to decide - if a long call is needed. - (call_value): Ditto. - (call_symbol): Ditto. - - * config/arm/elf.h (ASM_DECLARE_FUNCTION_SIZE): Add invocation of - ARM_DECLARE_FUNCTION_SIZE. - - * config/arm/pe.h (ARM_PE_FLAG_CHAR): Define. - (SUBTARGET_NAME_ENCODING_LENGTHS): Define. - (ARM_STRIP_NAME_ENCODING): Undefine. - (STRIP_NAME_ENCODING): Undefine. - (ASM_OUTPUT_LABELREF): Use arm_strip_name_encoding. - (ASM_DECLARE_FUNCTION_NAME): Ditto. - (ASM_OUTPUT_COMMON): Ditto. - (ASM_DECLARE_OBJECT_NAME): Ditto. - - * config/arm/pe.c (arm_dllexport_name_p): Check for - ARM_PE_FLAG_CHAR. - (arm_dllimport_name_p): Ditto. - (arm_mark_dllexport): Use ARM_PE_FLAG_CHAR. - (arm_mark_dllimport): Ditto. - -Mon Feb 28 22:11:12 2000 J"orn Rennecke - - * sh.h (DWARF_LINE_MIN_INSTR_LENGTH): Define. - -2000-02-28 Mark Mitchell - - * xcoffout.c (xcoffout_begin_function): Fix typo in previous change. - -2000-02-28 Zack Weinberg - - * tm.texi: Document new target switch, NO_BUILTIN_WCHAR_TYPE. - * cppinit.c (builtin_array): Define __WCHAR_TYPE__ only if - NO_BUILTIN_WCHAR_TYPE is not defined. - (CPP_WCHAR_TYPE): Delete. - * cccp.c (main): Don't change wchar_type if cplusplus. - (special_symbol, initialize_builtins): Honor NO_BUILTIN_WCHAR_TYPE. - -2000-02-28 Nick Clifton - - * config/arm/arm-wince-pe.h (SIZE_TYPE): Define to "unsigned long". - -Mon Feb 28 14:21:15 2000 Catherine Moore - - * config/pa/som.h (MAKE_DECL_ONE_ONLY): Define. - (ASM_WEAKEN_LABEL): Define. - -Mon Feb 28 13:07:19 MET 2000 Jan Hubicka - - * expr.c (store_constructor): Do not emit USE. - * rtl.h (stupid_life_analysis): Remove. - -Mon Feb 28 07:03:27 2000 Richard Kenner - - * function.c (number_blocks): Reset next_block_index based on - what debugging format is used, not what is defined. - - * lcm.c: Minor reformatting throughout. - (reg_dies, reg_becomes_live): Properly handle multiple hard regs. - - * toplev.c (rest_of_compilation): Account for time in - optimize_mode_switching. - - * jump.c (jump_optimize_1): Don't call delete_barrier_successors - if only marking labels. - -Mon Feb 28 12:53:57 MET 2000 Jan Hubicka - - * calls.c (expand_call): Attempt to combine stack adjustments with - pending stack adjustments. - -Mon Feb 28 11:34:43 2000 J"orn Rennecke - - * loop.c (reg_in_basic_block_p): Don't abort when falling through - to the end of the function. - -2000-02-27 Mark Mitchell - - * emit-rtl.c (remove_unnecessary_notes): Remove notes for empty - blocks. - * final.c (next_block_index): Remove. - (max_block_depth): Likewise. - (pending_blocks): Likewise. - (init_final): Don't initialize them. - (final_start_function): Don't set next_block_index. Set up - BLOCK_NUMBER. - (final_scan_insn): Use BLOCK_NUMBER, not next_block_index. - * function.h (number_blocks): New function. - * function.c (get_block_vector): New function. - (identify_blocks): Use it. - (reorder_blocks): Set NOTE_BLOCK. - (number_blocks): New function. - * tree.def (BLOCK): Add documentation for TREE_ASM_WRITTEN flag. - * tree.h (BLOCK_NUMBER): New macro. - (tree_block): Add block_num field. - * dbxout.c (next_block_number): Remove. - (dbxout_init): Don't set it. - (dbxout_block): Only output blocks that have TREE_ASM_WRITTEN - set. Use BLOCK_NUMBER, rather than next_block_num, to determine - block numbers. - * toplev.c (rest_of_compilation): Always call - find_loop_tree_blocks. Fix indentation. - * dwarf2out.c (next_block_number): Remove. - (gen_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, - to determine block numbers. - (gen_inlined_subroutine_die): Likewise. - (gen_block_die): Only output blocks that have TREE_ASM_WRITTEN set. - (decls_for_scope): Don't increment next_block_number. - * dwarfout.c (next_block_number): Remove. - (output_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, - to determine block numbers. - (output_inlined_subroutine_die): Likewise. - (output_block): Only output blocks that have TREE_ASM_WRITTEN set. - (output_decls_for_scope): Don't increment next_block_number. - * sdbout.c (next_block_number): Remove. - (sdbout_block): Use BLOCK_NUMBER. - (sdbout_begin_block): Simplify. - * xcoffout.c (next_block_number): Remove. - (xcoffout_block): Use BLOCK_NUMBER, not next_block_number. - (xcoffout_begin_block): Don't set next_block_number. - (xcoffout_begin_function): Likewise. Use BLOCK_NUMBER, not - next_block_number. - -Sun Feb 27 16:40:33 2000 Richard Kenner - - * builtins.c (c_strlen): Use size_diffop and return ssizetype value. - (expand_builtin_strcpy): Pass correct type to size_binop. - (expand_builtin_strcmp): Likewise. - Clean up conditional structure. - * c-decl.c (init_decl_processing): Don't call set_sizetype twice. - (complete_array_type): Don't use size_binop for MAXINDEX. - * c-typeck.c (c_sizeof): Use size_one_node and TYPE_SIZE_UNIT. - (c_sizeof_nowarn, c_size_in_bytes): Likewise. - (c_alignof): Use size_one_node. - (build_unary_op): Pass arg of proper type to size_binop. - (really_start_incremental_init, push_init_level): Use sizetype for - constructor{,_bit,_unfilled}_index. - (pop_init_label, output_init_element): Likewise. - (output_pending_init_elements, process_init_element): Likewise. - * calls.c (compute_argument_block_size): Field VAR is ssizetype. - * expr.c (store_expr): Use size_int. - (store_constructor): Use proper types for size_binop args. - (get_inner_reference, expand_expr, case ARRAY_REF): Likewise. - (expand_expr_unaligned): Likewise. - (string_contant): Return object of sizetype. - * expr.h (SUB_PARM_SIZE): Call size_diffop and pass proper types. - (ARGS_SIZE_RTX): Call ARGS_SIZE_TREE. - (ARGS_SIZE_TREE): Pass proper types to size_binop. - * fold-const.c (int_const_binop): Refine when size_int is called. - (fold_convert): Likewise. - (size_int_wide): Rework to take KIND as arg, only take low order - bits, handle new sizetype_tab datatype, and chain entries in - size_table. - (size_int_type_wide): New function. - (size_binop): Validate types of arguments. - (ssize_binop): Deleted. - (size_diffop): New function. - (extract_muldiv): Only fold division into multiplication for sizetypes. - * function.c (assign_parms): Use size_diffop and make sure - VAR field is of ssizetype; also pass proper type to size_binop. - (locate_and_pad_parm, pad_to_arg_alignment): Likewise. - (round_down): Deleted from here. - * store-layout.c (sizetype_tab): Now an array. - (sizetype_set, early_root_list): New variables. - (variable_size): Use size_one_node. - (round_up): Pass proper type to size_binop. - (round_down): Moved to here and corrected as above. - (layout_record): Pass proper arg types to size_binop. - (layout_type): Likewise. - If sizetype_set is zero, record the type just laid out. - (make_unsigned_type): Don't call set_sizetype; - (make_signed_type): Likewise; also, call fixup_signed_type. - (initialize_sizetypes): New function. - (set_sizetype): Make copy of types, set TYPE_IS_SIZETYPE, and - set name of bitsizetype to "bit_size_type". - Fix up type of sizes of all types made before call. - * tm.texi (ROUND_TYPE_SIZE_UNIT): New macro. - * tree.c (fix_sizetype): Deleted. - (build_common_tree_nodes): Call initialize_sizetypes. - (build_common_tree_nodes_2): Don't call fix_sizetype. - * tree.h (TYPE_IS_SIZETYPE): New macro. - (initialize_sizetype): New declaration. - (enum size_type_kind): New type. - (struct sizetype_tab): Deleted. - (sizetype_tab): Now array; adjust sizetype macros. - (size_diffop, size_int_type_wide): New functions. - (size_int_wide): Change number of args and type; access macros changed. - (ssize_int, sbitsize_int): New macros. - * config/i960/i960.h (ROUND_TYPE_SIZE): Use size_int. - (ROUND_TYPE_SIZE_UNIT): New macro. - -2000-02-27 Zack Weinberg - - * c-lex.c (putback_buffer): Make 'buffer' an unsigned char *. - -Sun Feb 27 07:44:17 2000 Richard Kenner - - * gcov-io.h (__fetch_long, __store_long, __read_long, __write_long): - Mark as possibly unused. - - * cse.c (cse_insn): Delete dead code involving tablejump. - Pass CODE_LABEL, not LABEL_REF to gen_jump and reset INSN_CODE. - - * Makefile.in (libcpp.a): Start by deleting it. - -2000-02-27 Alexandre Oliva - - * cpplib.h (enum file_change_code): Added rename_file. - * cpplib.c (do_line): If a filename is given, set file_change to - rename_file. - (output_line_command): If file_change is rename_file, always - output a # directive with the file name. - - * cpplib.c (do_pragma): Accept #pragma without consecutive token. - -2000-02-26 Mark Mitchell - - * integrate.c (copy_decl_for_inlining): Preserve TREE_ADDRESSABLE - when copying a PARM_DECL or RESULT_DECL. - -2000-02-26 Kaveh R. Ghazi - - * fix-header.c (recognized_function): Also fix prototypes for - functions taking "void". - -2000-02-26 Geoff Keating - - * reload1.c (do_output_reload): Check reg_reloaded_valid before - looking at reg_reloaded_contents. - -2000-02-26 Zack Weinberg - - * Makefile.in (STMP_FIXINC): New toggle. - (LIBGCC2_DEPS): Delete all references. - (stmp-headers): Delete target. All references either deleted - or changed to stmp-int-headers. - (all.cross): Don't depend on stmp-headers or STMP_FIXPROTO. - (LIBCPP_OBJS): Take out cppalloc.o. - (cppalloc.o): Delete target. - (stmp-int-hdrs): Depend on $(STMP_FIXINC). - (gen-protos, fix-header): Link with libiberty.a. - * build-make: Don't change FIXINCLUDES. Override STMP_FIXINC - to empty. - - * configure.in: Remove refs to strerror. - * acconfig.h: Take out NEED_DECLARATION_STRERROR. - * system.h: Take out strerror stanza. - - * cpperror.c (my_strerror): Delete function. - (cpp_error_from_errno, cpp_notice_from_errno): Use xstrerror. - * cppmain.c (main): Call xmalloc_set_program_name first thing. - * cppalloc.c: Delete file. - * gen-protos.c: Don't provide xrealloc. - - * fixinc/fixincl.c, fixinc/fixlib.c, fixinc/procopen.c: Use - xstrerror throughout. - -2000-02-26 Bruce Korb - - * fixinc/inclhack.def (undefine_null): the bypass pattern needs to - match for DOS headers, too. - * fixinc/inclhack.sh,fixincl.x: Regenerate. - -2000-02-26 Geoff Keating - - * config/elfos.h (ASM_OUTPUT_LABELREF): Don't define. The default - is right for most ELF targets. - * config/ns32k/ns32k.h (ASM_OUTPUT_LABELREF): Don't define. - Let the default file use %U properly. - * config/sh/elf.h (ASM_OUTPUT_LABELREF): Don't define. Use the - default. - - * config/fp-bit.c (pack_d): Properly handle rounding of denormal - numbers. - -Sat Feb 26 09:39:16 2000 Richard Kenner - - * toplev.c (documented_lang_options): Correct spelling error. - (decode_d_option, decode_f_option, main): Likewise. - - * toplev.c (print_time): Avoid SIGFPE when all_time is zero. - - * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Use .set at - to tell assembler it is permitted to expand large constants. - -2000-02-25 Mumit Khan - - * protoize.c: (AUX_INFO_SUFFIX): New macro. - (aux_info_suffix): Use. - (SAVE_SUFFIX): New macro. - (save_suffix): Use. - (munge_compile_parms): Fix typo in NUL. DJGPP supports /dev/null. - (gen_aux_info_file): Use aux_info_suffix instead of ".X". - (edit_file): Handle 8.3 restriction for DOS/DJGPP filenames. - - * invoke.texi (Running Protoize): Update documentation. - -2000-02-25 Mark Elbrecht - - * i386/djgpp.h (CPP_PREDEFINES): Remove Unix defines. - -2000-02-25 John Wehle (john@feith.com) - - * rtlanal.c (find_last_value): Allow NULL_RTX for valid_to. - -2000-02-25 Anthony Green - - * toplev.c (rest_of_compilation): Rebuild jump labels if - combine_instructions has created a new direct jump. - * combine.c (try_combine): Add new_direct_jump_p argument. Set it - when appropriate. - (combine_instructions): Call try_combine with new argument. - Return non-null value when new direct jump instruction is created. - * rtl.h: combine_instructions returns an int. - -Fri Feb 25 19:49:08 2000 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_insn): Replace the PATTERN of the insn with an new - jump when changing a computed jump into a jump to a known - target. - -Fri Feb 25 19:22:44 2000 Graham Stott - - * resource.c (mark_referenced_resources): Changed use SET_DEST (...) - to XEXP (..., 0) on RTL nodes which are not SET or CLOBBER. - - * i386.md (define_expand "clrstrsi"): Fix typo. - -Fri Feb 25 18:49:39 2000 "K. Richard Pixley" - - * rtl.texi: Fix typo. - -Fri Feb 25 20:02:35 2000 J"orn Rennecke - - * sh.c (calc_live_regs): Multiply value assigned to *COUNT_PTR by - UNITS_PER_WORD. Change caller initial_elimination_offset. - (rounded_frame_size): Take into account that argument pushed has - changed. Fix TARGET_ALIGN_DOUBLE problem. - -2000-02-25 Geoff Keating - - * haifa-sched.c (schedule_block): Explain the real reason - we delete REG_SAVE_NOTEs on the first insn of a block. - Don't delete REG_SAVE_NOTES for NOTE_INSN_SETJMP. - -2000-02-24 Mark Mitchell - - * input.h (push_srcloc): New function. - (pop_srcloc): Likewise. - * toplev.c (push_srcloc): Define it. - (pop_srcloc): Likewise. - -2000-02-24 Richard Henderson - - * flow.c (life_analysis): When collecting reg info, clear - regs_ever_live. - -Thu Feb 24 22:06:52 2000 J"orn Rennecke - - Fix bug exposed by reload.c no longer rounding the frame - size to BIGGEST_ALIGNMENT: - * sh.c (rounded_frame_size): New function. - (sh_expand_prologue, sh_expand_epilogue): Use it. - (initial_elimination_offset): Likewise. - -Thu Feb 24 20:04:11 2000 J"orn Rennecke - - Fix breakage from 6th Feb thread_prologue_and_epilogue_insns change: - * sh-protos.h (sh_need_epilogue): Declare. - * sh.c (sh_need_epilogue_known): New static variable. - (sh_need_epilogue): New function. - (function_epilogue): Clear need_epilogue_known. - * sh.md (return): Split into expander / insn pattern. - Make the expander conditional on ! sh_need_epilogue (). - -2000-02-24 Nathan Sidwell - - * machmode.h (get_mode_alignment): Declare. - (GET_MODE_ALIGNMENT): Call it. - * stor-layout.c (get_mode_alignment): New function. Make - sure alignment is always power of 2. - -2000-02-23 Zack Weinberg - - * i386.h: Remove useless definition of "I386" and misleading - comment above it. - -2000-02-23 Zack Weinberg - - * tree.h (TREE_SET_PERMANENT): New macro. Document conditions - under which TREE_PERMANENT will be set. - * tree.c (make_node, copy_node, make_tree_vec, tree_cons, - build1): Use TREE_SET_PERMANENT. - * print-tree.c (print_node): Don't report value of - TREE_PERMANENT if ggc_p is true. - - * c-common.c (c_get_alias_set): Don't use TREE_PERMANENT to - decide whether to give a type a new alias set. - * objc/objc-act.c (build_objc_string_object): Never copy the string. - * tree.c (make_node): Set DECL_IN_SYSTEM_HEADER irrespective - of value of 'obstack'. - - -2000-02-24 Michael Hayes - - * config/c4x/c4x.c (c4x_process_after_reload): Split all insns. - -2000-02-23 Alexandre Oliva - - * cpplib.h (enum cpp_token): Added CPP_WCHAR and CPP_WSTRING. - * cpplib.c (cpp_get_token): Produce them. - * cppexp.c (cpp_lex): Handle them. - -2000-02-23 Nick Clifton - - * config/arm/arm.c (arm_comp_type_attributes): Simply and - comment tests on type attributes. - -Wed Feb 23 16:42:21 2000 J"orn Rennecke - - * final.c (shorten_branches): Make value passed to LOOP_ALIGN - conform to documentation. - * sh.h (LOOP_ALIGN): If aligning loops, call sh_loop_align - to check for special cases. - * sh-protos.h (sh_loop_align): Declare. - * sh.c (sh_loop_align): Define. - -2000-02-22 Andrew Haley - - * config/mips/mips.h (GAS_ASM_SPEC): Pass -mgp32/-mgp64 to gas. - (SIZE_TYPE): Is 32 bits when using -mgp32. - (PTRDIFF_TYPE): Ditto. - -Wed Feb 23 07:26:27 2000 Richard Kenner - - * diagnostic.c (init_output_buffer): Handle case of null PREFIX. - -2000-02-23 Zack Weinberg - - * config/i386/i386.h: If IN_TARGET_LIBS is defined, make - BIGGEST_FIELD_ALIGNMENT a constant. - -2000-02-21 Jason Merrill - - * dwarf2out.c (output_line_info): Put the marker for the end of - the line number info at the actual end. - (gen_struct_or_union_type_die): Use decl_function_context - to check for local classes. - * dwarfout.c (output_type): Likewise. - -Tue Feb 22 01:38:57 2000 Jeffrey A Law (law@cygnus.com) - - * pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Handle pass-by-reference - for arguments with a mode, but no type. - (FUNCTION_ARG_CALLEE_COPIES): Similarly. - * t-pa (LIB2FUNCS_EXTRA): Add quadlib.asm. - * pa/long_double.h: New file. - * configure.in (hpux10, hpux11 configurations): hpux10 and hpux11 - both have 128bit wide long doubles. - * configure: Rebuilt. - -2000-02-21 Kaveh R. Ghazi - - * defaults.h (ASM_OUTPUT_ASCII): Constify a char*. - - * flow.c (get_common_dest, chain_reorder_blocks, make_reorder_chain, - fixup_reorder_chain, skip_insns_between_block): Add static prototypes. - (life_analysis): Wrap variable `i' with macro ELIMINABLE_REGS. - - * haifa-sched.c (rank_for_schedule): Don't cast away const-ness. - - * integrate.c (compare_blocks, find_block): Likewise. - - * rtl.c (fatal_with_file_and_line): Add ATTRIBUTE_PRINTF_2. - - * rtl.h (set_file_and_line_for_stmt): Constify a char*. - - * stmt.c (stmt_status, set_file_and_line_for_stmt, - expand_asm_operands): Likewise. - -Mon Feb 21 17:06:27 2000 Jason Eckhardt - - * predict.c (estimate_probability): Added the pointer heuristic to - the collection of static branch predictors. - -2000-02-21 Catherine Moore - - * config/mips/mips.h (ASM_SPEC): Add -mfix700. - * invoke.texi (-mfix7000): Document. - -2000-02-21 Gabriel Dos Reis - - * diagnostic.c (init_output_buffer): Make it possible to output at - least 32 characters if we're given a too long prefix. - -2000-02-20 Mark Mitchell - - * varasm.c (initializer_constant_valid_p): Call - lang_expand_constant to simplify the constant. - -2000-02-20 Bruce Korb - - * fixinc/inclhack.def(stdio_va_list): - typedef needs to be disabled. - * fixinc/inclhack.sh: regen - * fixinc/fixincl.x: regen - -2000-02-20 Geoff Keating - - * print-rtl.c (print_rtx): Don't print addresses when - flag_dump_unnumbered. - -2000-02-20 Kaveh R. Ghazi - - * sparc.c (sparc_output_scratch_registers): Mark parameter with - ATTRIBUTE_UNUSED. - (sparc_va_arg, sparc_flat_output_function_prologue, - sparc_flat_output_function_epilogue): Cast value to unsigned in - comparison. - (sparc_emit_float_lib_cmp): Remove unused variable `cmp'. - - * sparc.md: Add default case in switch. - -2000-02-19 Richard Henderson - - * c-typeck.c (add_pending_init): Don't abort for multiple - fields at the same offset. - (pending_init_member): Test the correct member. - -2000-02-19 Herman A.J. ten Brugge - - * except.c (start_dynamic_handler) : Use TYPE_MODE (integer_type_node) - instead of SImode. - (start_catch_handler) : Same. - -2000-02-19 Brad Lucier (lucier@math.purdue.edu) - - * Makefile.in: Have flow.o depend on $(EXPR_H) - -Sat Feb 19 18:43:13 2000 Richard Kenner - - * c-common.c (decl_attributes): Set DECL_SIZE_UNIT. - * c-decl.c (duplicate_decls, finish_enum): Likewise. - (finish_decl): Remove -Wlarger-than code from here. - * flags.h (id_clash_len): Now int. - (larger_than_size): Now HOST_WIDE_INT. - * fold-const.c (size_int_wide): No more HIGH parm; NUMBER is signed. - Clean up checking to see if in table. - (make_bit_field_ref): Remove extra parm to bitsize_int. - * ggc-common.c (ggc_mark_tree_children): Mark DECL_SIZE_UNIT. - * print-tree.c (print_node): Print DECL_SIZE_UNIT and TYPE_SIZE_UNIT. - * stmt.c (expand_decl): Use DECL_SIZE_UNIT for stack checking size - and for computing size of decl. - * stor-layout.c (layout_decl): Set DECL_SIZE_UNIT. - Move -Wlarger-than code to here. - (layout_record): Remove extra arg to bitsize_int. - Set TYPE_BINFO_SIZE_UNIT. - (layout_union): Remove extra arg to bitsize_int. - Use proper type for size of QUAL_UNION. - (layout_type): Remove extra arg to bitsize_int. - * toplev.c (id_clash_len): Now int. - (larger_than_size): Now HOST_WIDE_INT. - (decode_W_option): Clean up id-clash and larger-than- cases. - * tree.c (get_identifier, maybe_get_identifier): Remove unneeded casts. - (expr_align, case FUNCTION_DECL): DECL_ALIGN is not defined. - * tree.h (BINFO_SIZE_UNIT, TYPE_BINFO_SIZE_UNIT, DECL_SIZE_UNIT): New. - (struct tree_decl): New field size_unit. - (size_int_wide): No HIGH operand; NUMBER is now signed. - (size_int_2): Deleted. - (size_int, bitsize_int): Don't use it and rework args. - * varasm.c (assemble_variable, output_constructor): Use DECL_SIZE_UNIT. - -Fri Feb 18 20:01:58 2000 Jeffrey A Law (law@cygnus.com) - - * pa/quadlib.asm (_U_QFgt, _U_Qfge): Fix flags for _U_Qfcmp call. - -2000-02-18 Geoff Keating - - * invoke.texi (Warning Options): Add an explanation of why - you might want the -Wfloat-equal flag. - -Fri Feb 18 20:08:57 2000 Richard Kenner - - * bitmap.c (bitmap_operation): Avoid using -1 for index since unsigned. - * cppinit.c (new_pending_define): Add cast to avoid warning. - * expmed.c (extract_bit_field): Likewise. - * flow.c (enum reorder_skip_type): New type. - (skip_insns_between_blcok): New it. - Rework to avoid warning about possibly undefined variable. - * function.c (assign_parms): Make thisparm_boundary unsigned. - * genrecog.c (write_switch): Cast XWINT result to int. - * lcm.c: Many static fcns and vars now #ifdef OPTIMIZE_MODE_SWITCHING. - * mips-tfile.c (init_file): Make two versions of FDR initializer: - one for MIPS and one for Alpha. - (get_tag, copy_object): Add casts to avoid warnings. - * optabs.c (init_one_libfunc): Cast NAME to (char *). - * reload.c (find_reloads): Make TYPE enum reload_type. - * sbitmap.c (dump_sbitmap): J is unsigned; don't use "1L". - * unroll.c (unroll_loop): Initialize UNROLL_NUMBER. - * varasm.c (compare_constant_1): Add cast to avoid warning. - * config/alpha/alpha.c (alpha_emit_xfloating_libcall): Cast FUNC - to (char *). - (alpha_expand_unaligned_load, alpha_expand_unaligned_store): - Cast switch operand of size to int. - (alpha_expand_epilogue): Always initialize fp_offset and sa_reg. - * config/alpha/alpha.h (INITIAL_ELIMINATION_OFFSET): Add abort - in unhandled case. - -2000-02-18 Nick Clifton - - * config/arm/elf.h (ASM_OUTPUT_ALIGN): Do not generate - anything for an alignment of zero. - - * config/arm/thumb.h (ASM_OUTPUT_ALIGN): Do not generate - anything for an alignment of zero. - -2000-02-18 Martin von Loewis - - * gcc.texi (Bug Reporting): Refer to bugs.html. - (Bug Lists): Likewise. - * system.h (GCCBUGURL): New preprocessor define. - * rtl.c (fancy_abort): Use it. - * gcc.c (main): Likewise. - -2000-02-18 Richard Henderson - - * flow.c (INSN_VOLATILE, SET_INSN_VOLATILE, uid_volatile): Remove. - (life_analysis_1): Subsume into ... - (life_analysis): ... here. Force PROP_REG_INFO off after reload. - Use update_life_info for the relaxation. - (update_life_info): Update REG_BASIC_BLOCK for registers live on - entry and regs_live_at_setjmp. - (set_noop_p): Simplify. - (notice_stack_pointer_modification_1): Renamed from s/_1//. - (record_volatile_insns): Split into ... - (delete_noop_moves): ... here, - (notice_stack_pointer_modification): ... here, - (insn_dead_p): ... and here. - (propagate_block): Don't query INSN_VOLATILE. - (mark_used_regs): Mind !PROP_REG_INFO. - * toplev.c (rest_of_compilation): Call mark_constant_function here, - not in life_analysis. - -Fri Feb 18 01:29:22 EST 2000 John Wehle (john@feith.com) - - * loop.c (canonicalize_condition): New function, - broken out of get_condition. - (get_condition): Use it. - * expr.h (canonicalize_condition): Prototype it. - - * tree.h (tree_int_cst_msb): Declare. - * tree.c (tree_int_cst_msb): New function. - -2000-02-17 Mark Mitchell - - * stmt.c (set_file_and_line_for_stmt): Don't crash if cfun->stmt - isn't set. - - * invoke.texi (-fmessage-length=n): Document. - -2000-02-17 Jason Merrill - - * bitmap.c (bitmap_operation): Don't leak bitmap elements. - -2000-02-17 Mark Mitchell - - * function.c (thread_prologue_and_epilogue_insns): Put a line note - after the prologue. - -2000-02-17 Nick Clifton - - * config/arm/thumb.c: Replace includes of system headers with - #include "system.h". - -2000-02-16 Richard Henderson - - * configure.in (alpha-linux*, alpha-netbsd) [extra_parts]: - Add crtbeginS.o and crtendS.o. - * alpha/elf.h (STARTFILE_SPEC): Use crtbeginS.o. - (ENDFILE_SPEC): Use crtendS.o. - * alpha/t-crtbe (crtbeginS.o, crtendS.o): New targets. - - * alpha/crtbegin.asm (__do_frame_takedown): Merge into ... - (__do_global_dtors_aux): ... here. Call __cxa_finalize if - shared and present. - (__dso_handle): New variable. - * alpha/crtend.asm (__do_global_ctors_aux): Remove runtime - bias to __CTOR_END__. - -2000-02-16 Richard Henderson - - * Makefile.in (s-crtS, crtbeginS, crtendS): Prefix usage with $(T). - -Wed Feb 16 21:40:04 2000 Hans-Peter Nilsson - - * longlong.h (__clz_tab): Declare as static to match definition. - -2000-02-16 Mark Elbrecht - - * i386/xm-djgpp.h (LIBSTDCXX): Delete. Moved to config/i386/djgpp.h. - (XREF_FILE_NAME): Define. - - * i386/djgpp.h (DATA_SECTION_ASM_OP): Define. - (EH_FRAME_SECTION_ASM_OP): Define. - (IDENT_ASM_OP): Define. - (TEXT_SECTION_ASM_OP): Define. - (CPP_SPEC): Define. - (CTORS_SECTION_ASM_OP): Define. - (CTOR_SECTION_FUNCTION): Use it. - (DTORS_SECTION_ASM_OP): Define. - (DTOR_SECTION_FUNCTION): Use it. - -2000-02-16 Zack Weinberg - - * reg-stack.c (emit_swap_insn): Do not put a new insn before a - NOTE_BASIC_BLOCK. - - * flow.c (dump_regset, debug_regset, dump_bb, debug_bb, - debug_bb_n): New functions. - (dump_flow_info, print_rtl_with_bb): Use dump_regset. - * basic-block.h: Prototype new functions. - -Wed Feb 16 21:07:53 2000 Denis Chertykov - - * configure.in: Add support for avr target. - * configure: Rebuilt. - - * invoke.texi: Add AVR invocation docs. - * install.texi: Add information about AVR. - * md.texi: Add AVR constraint letters description. - * extend.texi: Add description for AVR specific attributes. - -2000-02-16 Jason Merrill - - * fixinc/fixinc.svr4: Wrap byteorder.h with extern "C". - -2000-02-16 Nick Clifton - - * emit-rtl.c (emit_insn): Move RTL check into make_insn_raw. - (make_insn_raw): Move RTL check here. - -2000-02-16 Kaveh R. Ghazi - - * version.c: Include gansidecl.h and version.h. - - * version.h: Wrap entire file in macro __GCC_VERSION_H__. - - * configure.in (gcc_version): When setting, narrow search to - lines containing `version_string'. - - * Makefile.in (mainversion): Likewise. - (GCC_H): New variable. - (gcc.h): Delete target. - (gcc.o, gccspec.o, cppspec.o): Depend on $(GCC_H), not gcc.h. - (version.o): Depend on version.h. - (dbxout.o): Don't depend on gcc.h. - -Wed Feb 16 15:04:49 2000 Hans-Peter Nilsson - Michael Meissner - - * md.texi (Simple Constraints): Add item about whitespace. - * genoutput.c (strip_whitespace): New. - (scan_operands) [MATCH_OPERAND, MATCH_SCRATCH]: Call - strip_whitespace for constraints. - Test pointer using NULL, not 0. - -2000-02-16 Alexandre Oliva - - * cpplib.c (do_line): Pedwarn for #line > 32767. - - * c-lex.c (readescape): Warn about '\x', but do not reject it. - -2000-02-15 Jonathan Larmour - - * gcc.c (default_compilers): Add new __GNUC_PATCHLEVEL__ define - to default cpp spec. - (do_spec_1): Add support for %v3 spec used by __GNUC_PATCHLEVEL__. - * cpp.texi: Document __GNUC_PATCHLEVEL__. - * cpp.1: Likewise. - - * objc/lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to - default spec. - -2000-02-15 Denis Chertykov - - * configure.in: Add support for avr target. - -Wed Feb 16 03:21:43 2000 J"orn Rennecke - - * sh.h (OVERRIDE_OPTIONS): Don't set sh_addr_diff_vec_mode. - (sh_addr_diff_vec_mode): Don't declare. - * sh.c (sh_addr_diff_vec_mode): Delete. - -Wed Feb 16 01:27:52 2000 J"orn Rennecke - - * sh.md (mulsi3_highpart): Add REG_EQUAL note to last insn. - -Wed Feb 16 00:58:06 2000 J"orn Rennecke - - * sh.md (udivsi3_i1, divsi3_i1, umulhisi3_i, mulhisi3_i): Name. - (smulsi3_highpart_i): Name. - (udivsi3): Wrap emitted insns in REG_LIBCALL / REG_RETVAL notes. - (divsi3, mulhisi3, umulhisi3, mulsidi3, umulsidi3): Likewise. - (smulsi3_highpart, umulsi3_highpart): Likewise. - - (mulsidi3_i, umulsidi3_i): Make rtl describe operation - correctly independent of endianness. - (mulsidi3, umulsidi3): Now define_insn. Hide details that - confuse the optimizers. - (mulsidi3+1, umulsidi3+1): New define_split. - -Tue Feb 15 23:22:26 2000 Andrew Haley - - * config/sh/sh.md: Guard insn splits against illegal registers. - * config/sh/sh.h: Correct comment about macros. - -Tue Feb 15 22:30:36 2000 J"orn Rennecke - Andrew MacLeod - - * Makefile.in (lcm.o): Depend on insn-attr.h. - * basic-block.h (optimize_mode_switching): Declare. - * lcm.c (tm_p.h, insn-attr.h): #include. - (seginfo, bb_info): New structs. - (antic, transp, comp, delete, insert) : New file-scope static variables. - (new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions. - (reg_becomes_live, optimize_mode_switching): Likewise. - * tm.texi: Add description of mode switching macros. - * toplev.c (rest_of_compilation): Call optimize_mode_switching. - - * sh-protos.h (remove_dead_before_cse): Remove prototype. - (fldi_ok, fpscr_set_from_mem): New prototypes. - * sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set. - (CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS): - Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD). - (sh_flag_remove_dead_before_cse): Remove declaration. - (NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros. - (MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise. - (MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise. - * sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD). - (barrier_align): Allow for JUMP_INSNS containing a parallel. - (machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set. - (fldi_ok): New function. - (get_fpscr_rtx): Add fpscr_rtx as GC root. - (emit_sf_insn): Only generate fpu switches when optimize < 1. - (emit_df_insn): Likewise. - (expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete. - (sh_flag_remove_dead_before_cse): Delete. - (get_free_reg, fpscr_set_from_mem): New functions. - * sh.md (movdf, movsf): Remove no_new_pseudos code. - (return): Remove emit_fpscr_use / remove_dead_before_cse calls. - -2000-02-15 Loren Rittle - - * ginclude/stddef.h: Correct usage of _BSD_RUNE_T_ for FreeBSD. - -2000-02-15 Kaveh R. Ghazi - - * Makefile.in (TREE_H, collect2.o, gcc.h, mips-tfile.o, cccp.o, - cpphash.o, cppinit.o, protoize.o, unprotoize.o): Depend on version.h. - - * cccp.c: Include version.h and/or don't declare `version_string'. - * collect2.c: Likewise. - * alpha.c: Likewise. - * arm/aof.h: Likewise. - * arm/coff.h: Likewise. - * arm/elf.h: Likewise. - * arm/pe.h: Likewise. - * arm/tcoff.h: Likewise. - * arm/telf.h: Likewise. - * arm/tpe.h: Likewise. - * arm/vxarm.h: Likewise. - * convex/convex.c: Likewise. - * i386/dgux.c: Likewise. - * i386/sun386.h: Likewise. - * m88k/m88k.c: Likewise. - * mcore/mcore-pe.h: Likewise. - * mips/mips.h: Likewise. - * romp/romp.h: Likewise. - * sh/sh.c: Likewise. - * cpphash.c: Likewise. - * cppinit.c: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * gcc.c: Likewise. - * gcc.h: Likewise. - * mips-tfile.c: Likewise. - * protoize.c: Likewise. - * toplev.c: Likewise. - * tree.h: Likewise. - - * version.c (version_string): Constify a char*. - - * version.h: New file. - -2000-02-14 Nick Clifton - - * configure.in: Add mcore-elf and mcore-pe targets. - * configure: Regenerate. - - * NEWS: Add note that MCore port has been contributed. - - * invoke.texi: Document command line switches for MCore port. - * install.texi: Add MCore to list of supported targets. - -2000-02-14 Geoff Keating - - * collect2.c (main) [COLLECT_EXPORT_LIST]: If we have frames, - then we will need to import the frame handling functions. - (scan_prog_file) [COLLECT_EXPORT_LIST]: We will also need - to import the frames themselves. - -Mon Feb 14 13:31:01 2000 Stan Cox - Jason Eckhardt - - * basic_block.h: Added prototype for reorder_basic_blocks. - * toplev.c: Changes to add -freorder-blocks and graph dump after - block reordering is done. - * flow.c (reorder_block_def): New structure for use during block - reordering. - (REORDER_BLOCK_*): New macros to access members of above structure. - (skip_insns_between_block, get_common_dest, chain_reorder_blocks, - make_reorder_chain, fixup_reorder_chain, reorder_basic_blocks): New - functions for block reordering. - -Mon Feb 14 11:24:44 2000 Hans-Peter Nilsson - - * gcc.texi (Passes): Fix typo. - * md.texi (Standard Names): Ditto. - * tm.texi (Storage Layout): Ditto. - -2000-02-13 Zack Weinberg - - * cpplib.c (do_define): Only free the old definition if it - actually had one. - -2000-02-13 Neil Booth - - * cppfiles.c (read_and_prescan): When emitting deferred - newlines, test speccase[] again instead of checking each - possible whitespace character in turn. When we encounter \r, - look behind for \n first, then ahead. - -2000-02-13 Zack Weinberg - - * cse.c (cse_altered): New internal flag. - (cse_insn): Set it if we changed an insn. - (cse_main): Clear cse_altered before each basic block. - Only garbage collect if cse_altered is true afterward. - -Sun Feb 13 14:12:28 2000 Rainer Orth - - * sparc/sol2.h (LIB_SPEC): Link -ldl if profiling. - -Sun Feb 13 13:21:55 2000 Jeffrey A Law (law@cygnus.com) - - * combine.c (simplify_comparison): Fix typo. - -Sun Feb 13 12:57:52 2000 Neil Booth - - * prefix.c (concat, lookup_key): Use xmalloc and xrealloc - consistently. - -2000-02-13 Michael Hayes - - * flow.c (flow_loop_tree_node_add): Use better algorithm by passing - previously inserted node instead of root node. Caller changed. - -2000-02-13 Michael Hayes - - * basic-block.h (FLOW_LOOP_FIRST_BLOCK, FLOW_LOOP_LAST_BLOCK): Delete. - -2000-02-12 Kaveh R. Ghazi - - * crtstuff.c (__do_global_ctors_aux, __reg_frame_ctor, - __dereg_frame_dtor): Add prototype argument. - - * gthr-dce.h (__gthread_active_p, __gthread_once): Likewise. - - * gthr-posix.h (__gthread_active_p, __gthread_once): Likewise. - - * gthr-solaris.h (__gthread_active_p, __gthread_once): Likewise. - - * gthr-vxworks.h (__gthread_once): Likewise. - - * gthr-win32.h (__gthread_active_p, __gthread_once): Likewise. - -Sat Feb 12 01:44:26 MET 2000 Jan Hubicka - - * i386.c (ix86_emit_restore_regs_using_mov): Break out from ... - (ix86_expand_epilogue): ... here. Use mov instead of add to restore - stack pointer in functions w/o saved registers, output LEAVE more often - on TARGET_USE_LEAVE machines. - -2000-02-07 Dmitri Makarov & Bernd Schmidt - - * config/arm/arm.c (arm_init_cumulative_args); New function: - Initlaise the CUMULATIE_ARGS strcuture for a function - definition. - (arm_function_arg): New function: Determine where to place a - function's argument. Also handles deciding the function's - call cookie. - (current_file_function_operand): New function: Return true if - the symbol is a function which has already been compiled. - (arm_is_long_call_p): New function: Return true if the - indicated function should be called via a long call. - (arm_valid_type_attribute_p): New function: Return true if the - attribute is a valid, arm specific, attribute. - (arm_comp_type_attribute): New function: Return true if the - two types have compatible, arm specific, attributes. - - * config/arm/arm.h (CUMULATIVE_ARGS): Redefine to be a - structure. - (FUNCTION_ARG): Redefine to call arm_function_arg. - (FUNCTION_ARG_PARTIAL_NREGS): Redefine to use correct - structure field. - (INIT_CUMULATIVE_ARGS): Redefine to call - arm_init_cumulative_args. - (FUNCTION_ARG_ADVANCE): Redefine to use correct structure - field. - (SETUP_INCOMING_VARARGS): Redefine to use correct structure - field. - (ARM_MARK_NEARBY_FUNCTION): New macro: Mark already compiled - functions. - (ENCODE_SECTION): Add call to ARM_MARK_NEARBY_FUNCTION. - (VALID_MACHINE_TYPE_ATTRIBUTE): Define. - (COMP_TYPE_ATTRIBUTES): Define. - - * config/arm/arm.md (call): Call arm_is_long_call_p to decide - if a long call is needed. - (call_value): Call arm_is_long_call_p to decide if a long call - is needed. - (call_symbol): Call arm_is_long_call_p to decide if a long call - is needed. - - * config/arm/arm-protos.h: Add prototype for arm_is_long_call_p. - -2000-02-11 Denis Chertykov - - * README.AVR: New file with information about the avr ports. - * config/avr: New directory with avr port files. - -2000-02-11 Andreas Jaeger - - * fixinc/Makefile.in (FIXINC_DEFS): Remove unneeded @fixinc_defs@. - -2000-02-11 Zack Weinberg - - * cpphash.c: Fix formatting, update commentary. - (dump_definition): Take three separate arguments instead of a - MACRODEF structure argument. - * cpphash.h: Update prototype of dump_definition. - * cppinit.c (cpp_finish): Update call of dump_definition. - - * cpplib.c (do_define): Always create new hash entry with - T_MACRO type. Remove redundant check for redefinition of - poisoned identifier. Update call of dump_definition. - (do_undef): Don't call check_macro_name. Rename sym_length to - len. - (do_error, do_warning): Don't use copy_rest_of_line or - SKIP_WHITE_SPACE. - (do_warning): Don't use pedwarn for the actual warning, - only the notice about its not being in the standard. (Fixes - bug with #warning in system headers.) - (do_ident): Stricter argument checking - accept only a single - string after #ident. Also, macro-expand the line. - (do_xifdef): Use cpp_defined. De-obfuscate. - - (do_pragma): Split out specific pragma handling to separate - functions. Use get_directive_token. Update commentary. Do - not pass on #pragma once or #pragma poison to the front end. - (do_pragma_once, do_pragma_implementation, do_pragma_poison, - do_pragma_default): New. - -Feb 11 12:30:53 2000 Jeffrey A Law (law@cygnus.com) - - * jump.c (jump_optimize_1): The first operand in a relational - can be a CONST_INT. - * optabs.c (emit_conditional_move): Handle relationals which - have a known true/false result. - -2000-02-11 Geoff Keating - - * function.c (thread_prologue_and_epilogue_insns): Don't insert - a RETURN insn into a block which already ends with a jump. - -2000-02-11 Geoff Keating - - * haifa-sched.c (BUF_LEN): Increase a lot. - -2000-02-11 Nick Clifton - - * configure.in: Add tm_p_file specification for thumb targets. - * configure: Regenerate. - - * config/arm/thumb-protos.h: New file: Prototypes for exported - functions defined in thumb.c. - -2000-02-11 Robert Lipe - - * Makefile.in (bootstrap-lean): Remove additional files. - (bootstrap2-lean): Likewise. - (VOL_FILES): List of files for above. - -2000-02-11 Nathan Sidwell - - * cpphash.c (special_symbol): Remove spurious argument to - cpp_lookup. - -2000-02-11 Joel Sherrill (joel@OARcorp.com> - - * configure.in: (i*86-*-rtems*): Swapped elf and coff - stanzas. - * configure: Rebuilt. - -2000-02-11 Rodney Brown - - * pa-protos.h: Wrap function_arg_padding in TREE_CODE #ifdef. - -Fri Feb 11 02:59:05 2000 Jeffrey A Law (law@cygnus.com) - - * pa.c, pa.h: Remove trigraph sequences within comments. - -Fri Feb 11 02:51:56 2000 Pavel Roskin - - * invoke.texi (PPC Options): -mno-new-mnenomics -> -mold-mnemonics. - -Fri Feb 11 02:48:30 2000 Brad Lucier (lucier@math.purdue.edu) - - * sbitmap.h: Make SBITMAP_ELT_BITS unsigned. - -2000-02-11 Michael Hayes - - * config/c4x/c4x.c (fp_zero_operand): Check for CONST_DOUBLE. - -2000-02-11 Michael Hayes - - * config/c4x/c4x.h (ASM_GLOBALIZE_LABEL): Use c4x_global_label. - (ASM_OUTPUT_EXTERNAL): Use c4x_external_ref. - (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. - (ASM_FILE_END): Use c4x_file_end. - * config/c4x/c4x.c (c4x_global_label): New function. - (c4x_external_ref, c4x_file_end): Likewise. - - * config/c4x/c4x-protos.h (c4x_global_label): Add prototype. - (c4x_external_ref, c4x_end_file): Likewise. - -2000-02-10 Zack Weinberg - - * cppexp.c: Don't include cpphash.h. - (parse_charconst, cpp_lex): Use cpp_defined. - (cpp_lex): Use get_directive_token throughout. Remove - unnecessary cases from switch. Move assertion-handling code - down to OTHER case. - (cpp_parse_expr): If we see '+' or '-', check the context to - determine if they are unary or binary operators. Streamline - the jumps a bit. Do not call skip_rest_of_line. - - * cpplib.c: Make skip_rest_of_line and cpp_skip_hspace - static. Export get_directive_token. Update commentary. - (cpp_defined): New function. - (do_define): Remove reference to T_PCSTRING. Call - free_definition to release memory for old definition, when - redefining a macro. - (eval_if_expression): Set only_seen_white to 0 before calling - cpp_parse_expr. Call skip_rest_of_line after it returns. - (cpp_read_check_assertion): Don't preserve a pointer into the - token buffer across a call to cpp_get_token. - - * Makefile.in (cppexp.o): Don't depend on cpphash.h. - * cppfiles.c (redundant_include_p): Use cpp_defined. - * cpphash.c (free_definition): New function. - (delete_macro): Use it. Update commentary. - * cpphash.h: Typedef HASHNODE here. Prototype cpp_lookup and - free_definition. - * cpplib.h: Don't typedef HASHNODE here. Delete T_PCSTRING - from enum node_type. Prototype cpp_defined and get_directive_token. - Don't prototype cpp_lookup, skip_rest_of_line, or cpp_skip_hspace. - - * fix-header.c (check_macro_names): Use cpp_defined. - (read_scan_file): Set inhibit_warnings and inhibit_errors in - the options structure. - -2000-02-10 Franz Sirl - - * c-pragma.c (maximum_field_alignment): Remove duplicate declaration. - -2000-02-10 Jason Merrill - - * dwarf2out.c (add_abstract_origin_attribute): Check TREE_CODE (origin) - rather than die->die_tag. - -Thu Feb 10 16:26:49 2000 Richard Kenner - - * combine.c (make_extraction, force_to_mode): Avoid warning on - mixed-signedness conditionals. - (make_field_assignment, nonzero_bits): Likewise. - * expmed.c (store_fixed_bit_field): ALIGN arg now unsigned. - (store_split_bit_field, extract_split_bit_field): Likewise. - (extract_fixed_bit_field, store_bit_field, - * expr.c: Change alignment to be unsigned everywhere. - (move_by_pieces, store_constructor_field, store_constructor): - Alignment parm is unsigned. - (emit_block_move, emit_group_load, emit_group_store): Likewise. - (clear_storage, emit_push_insn, compare_from_rtx): Likewise. - (do_compare_rtx_and_jump): Likewise. - (move_by_pieces_ninsns, clear_by_pieces): Likewise. - Compare align with GET_MODE_ALIGNMENT. - (expand_expr_unaligned): Pointer to alignment is pointer to unsigned. - (get_inner_reference): Likewise. - (copy_blkmode_from_reg, emit_push_insn): Remove unneeded casts. - (expand_assignment): Local vars for alignment now unsigned. - (store_constructor, store_field, expand_expr, do_jump): Likewise. - (do_compare_and_jump): Likewise. - (store_field): Call new function expr_align. - * expr.h (emit_block_move, emit_group_load, emit_group_store): - Alignment arg now unsigned. - (clear_storage, emit_push_insn, compare_from_rtx): Likewise. - (do_compare_rtx_and_jump, store_bit_field): Likewise. - (extract_bit_field): Likewise. - * fold-const.c (add_double): Add cast to eliminate signedness warning. - * machmode.h (GET_MODE_ALIGNMENT): Result is unsigned. - (get_best_mode): Alignment arg is unsigned. - * rtl.h (move_by_pieces): Likewise. - * store-layout.c (maximum_field_alignment, set_alignment): - Now unsigned. - (layout_decl): Alignment arg is now unsigned. - Remove unneeded casts. - (layout_record, layout_union, layout_type): Remove unneeded casts. - Local alignment variables now unsigned. - (get_best_mode): Alignment arg now unsigned. - * tree.c (expr_align): New function. - * tree.h (expr_align): Likewise. - (maximum_field_alignment, set_alignment): Now unsigned. - (get_inner_reference): Alignment argument is now pointer to unsigned. - * varasm.c (assemble_variable): Add cast to eliminate warning. - -Thu Feb 10 12:56:47 2000 Jim Wilson - - * expmed.c (store_bit_field): If op0 and fieldmode are the same size, - then store directly into op0. - - * calls.c (expand_call): When emitting a NOTE_INSN_SETJMP, search for - the CALL_INSN, and emit the note immediately after it. - -2000-02-10 Nick Clifton - - * config/arm/thumb.md (epilogue): Include a (return) in the - generated insn, and emit it using emit_jump_insn not - emit_insn. - -Thu Feb 10 18:28:59 MET 2000 Jan Hubicka - - * function.c (assign_temp): Change zero-sized arrays to size 1. - * integrate.c (expand_inline_function): Do not update - stack_alignment_needed - * i386.c (compute_frame_size): Remove #ifdef PREFERRED_FRAME_BOUNDARY, - add some sanity checking, remove optimization for function with - zero frame size. - -2000-02-10 Kaveh R. Ghazi - - * flow.c (mark_regs_live_at_end): Delete unused variables. - - * ggc-page.c (ggc_page_print_statistics): bzero -> memset. - - * integrate.c (copy_rtx_and_substitute): Wrap variable `alignment' - in macro FRAME_GROWS_DOWNWARD. - - * stmt.c (expand_end_bindings): Delete unused variable. - - * unroll.c (iteration_info): Mark parameter `loop' with - ATTRIBUTE_UNUSED. - -2000-02-10 Alexandre Oliva - - * fixinc/server.c (load_data): Return NULL if the marker line is - not found. - (run_shell): If load_data returns NULL, retry the command once, in - a new shell. - - * configure: Rebuilt. - -2000-02-09 Bruce Korb - - * gcc/fixincludes: ** DELETED ** - * gcc/fixcpp: ** DELETED ** - * gcc/fixinc-nt.sed: ** DELETED ** - * gcc/just-fixinc: ** DELETED ** - * gcc/Makefile.in: Removed out-dated commentary - * gcc/configure.in: Removed fast-fixincludes disablement. - * MAINTAINERS(Ian Taylor) moved to "Write after approval" group. - -2000-02-09 Clinton Popetz - * function.c (thread_prologue_and_epilogue_insns): Uncomment - last change. - -2000-02-09 Richard Henderson - - * jump.c (delete_insn): Don't delete user labels at -O0. - -2000-02-09 Robert Lipe - - * Makefile.in (gen-protos): Don't depend on HOST_LIBDEPS. - Don't link with HOST_LIBS. - -2000-02-09 Zack Weinberg - - * configure.in: Correct --help text for --with-dwarf2. - Put tm-dwarf2.h after other tm files, if it's requested. - * configure: Regenerate. - * config/tm-dwarf2.h: #undef PREFERRED_DEBUGGING_TYPE before - defining it. - -2000-02-09 Zack Weinberg - - * cpplib.h: Provide HASHNODE typedef and forward decl of - struct hashnode only. Kill cpp_hashnode typedef. MACRODEF, - DEFINITION, struct hashnode, struct macrodef, struct - definition, scan_decls prototype, default defn of - INCLUDE_LEN_FUDGE moved elsewhere. - - * cpphash.h: MACRODEF, DEFINITION, struct macrodef, struct - definition, and struct hashnode moved here. Remove the unused - 'predefined' field from struct definition. Replace the 'args' - union with its sole member. All users updated (cpphash.c). - Delete HASHSTEP and MAKE_POS macros, and hashf prototype. Add - multiple include guard. - - * cpphash.c (hashf): Make static; use better algorithm; drop - HASHSIZE parameter; return an unsigned int. - (cpp_lookup): Drop HASH parameter. PFILE parameter is - used. Calculate HASHSIZE modulus here. - (cpp_install): Drop HASH parameter. Calculate HASHSIZE modulus - here. - (create_definition): Drop PREDEFINITION parameter. - * cpplib.c (do_define): Don't calculate a hash value here. - Don't pass (keyword == NULL) to create_definition. - - * scan.h: Prototype scan_decls here. - * cppfiles.c: Move INCLUDE_LEN_FUDGE default defn here. - * cppexp.c, cppfiles.c, cppinit.c, cpplib.c, fix-header.c: All - callers of cpp_lookup and cpp_install updated. - - * cpphash.c (macarg): Hoist all the flag diddling out of the - function... - (macroexpand): ... and out of the loop that calls macarg. - Skip over the initial paren before macro arguments with - cpp_get_non_space_token; point may be some distance before - that paren. Abort if it's not there. - - * cpplib.c (parse_clear_mark): Delete function. - (parse_set_mark, parse_goto_mark): Make static. - (ACTIVE_MARK_P): New macro. - (skip_block_comment, skip_line_comment): Do not bump the line - if ACTIVE_MARK_P is true. - (cpp_pop_buffer): The buffer to be popped may not have an - active mark. - (cpp_get_token): When looking for the initial paren before - macro arguments, only set a mark in a file buffer, Always - return to that mark before proceeding to call macroexpand or - return a NAME token. - - * cpplib.h: Remove prototypes of parse_set_mark, - parse_clear_mark, parse_goto_mark. - (struct cpp_options): Rename 'put_out_comments' to - 'discard_comments' and invert its sense. - * cppinit.c, cpphash.c, cpplib.c: All users of - put_out_comments changed to use discard_comments, with - opposite sense. - -2000-02-09 Clinton Popetz - - * function.c (thread_prologue_and_epilogue_insns): Don't delete - the edge from a block that both jumps and falls through to the - fallthru block. - -2000-02-09 Scott Bambrough - - * config/arm/arm.md (movsi): In PIC mode, make sure that a - constant source address is legitimate. - -2000-02-09 Philip Blundell - - * config/arm/arm.c (legitimize_pic_address): Handle LABEL_REF - correctly. - - * config/arm/arm.h (LEGITIMATE_CONSTANT_P): Allow anything when - generating PIC. - (LEGITIMATE_PIC_OPERAND): Disallow references to labels. - -2000-02-09 Zack Weinberg - - * cpplib.c (cpp_define, cpp_undef): Make sure the stacked buffer - ends with a newline and a NUL. Don't be so clever manipulating - strings. - -Wed Feb 9 14:18:08 MET 2000 Jan Hubicka - - * reload1.c (reload) Align stack frame to cfun->stack_alignment_needed, - not to BIGGEST_ALIGNMENT. - -2000-02-08 Geoff Keating - - * dwarf2.h (DW_CFA_GNU_negative_offset_extended): New constant. - * dwarf2out.c (dwarf_cfi_name): Print name of new constant. - (reg_save): Use DW_CFA_GNU_negative_offset_extended when needed. - (output_cfi): Handle output of DW_CFA_GNU_negative_offset_extended. - * frame.c (execute_cfa_insn): Handle - DW_CFA_GNU_negative_offset_extended. - -2000-02-08 Richard Henderson - - * flow.c (tidy_fallthru_edges): Split out from ... - (delete_unreachable_blocks): ... here. - (find_basic_blocks): Use it. - -Tue Feb 8 15:51:50 2000 Richard Kenner - - * stmt.c (expand_decl): Do set RTX_UNCHANGING_P for TREE_READONLY. - -2000-02-08 Zack Weinberg - - * Makefile.in (GEN_PROTOS_OBJS): Remove libcpp.a. - (gen_protos.o): Don't depend on cpplib.h or cpphash.h. - (fix-header.o): Don't depend on cpphash.h. - - * scan.c (hashstr): New function. - * scan.h: Prototype it. - * fix-header.c: Don't include cpphash.h. Use hashstr. - * gen-protos.c: Don't include cpphash.h or cpplib.h. Use - hashstr. Report hash table statistics. Add private - definition of xrealloc. - -2000-02-08 Kaveh R. Ghazi - - * i386.h (TARGET_SWITCHES): Fix typo in option name. - -2000-02-08 Clinton Popetz - - * function.c (thread_prologue_and_epilogue_insns): Don't replace - jumps with returns unless they are jumps to the fallthru block. - -Tue Feb 8 07:53:55 2000 Jan Hubicka - - * i386.md (addqi3_cc): Fix constraints. - -Tue Feb 8 01:39:45 2000 Hans-Peter Nilsson - - * function.c (emit_return_into_block): Wrap in #ifdef HAVE_return. - -2000-02-07 Mark Mitchell - - * cpplib.c (cpp_get_token): Call CPP_BUMP_LINE after reading a - carriage return after a macro name. - -2000-02-07 Fred Fish - - * i386/beos-elf.h: (ASM_IDENTIFY_GCC): Define to nothing - so the gcc2_compiled symbol doesn't confuse BeOS debuggers. - -2000-02-07 Zack Weinberg - - * cppfiles.c (deps_output): Count spacers in deps_column. - -2000-02-07 Neil Booth - - * cppinit.c (initialize_dependency_output): If there is no - suffix, don't try to look for known suffixes. Use strrchr. - (cpp_start_read): Remove duplicate initialization. - -Mon Feb 7 18:36:41 MET 2000 Jan Hubicka - - * calls.c (compute_argument_block_size): New argument - preferred_stack_boundary. - (expand_call): update cfun->preferred_stack_boundary, update call of - compute_argument_block_size - (emit_library_call): Increate cfun->preferred_stack_boundary - to PREFERRED_STACK_BOUNDARY - (emit_library_call_value): Likewise. - * explow.c (allocate_dynamic_stack_spave): Likewise. - * function.c (prepare_function_start): Set - cfun->preferred_stack_boundary - * function.h (struct function): Add preferred_stack_boundary field. - * integrate.c (expand_inline_function): Update - cfun->preferred_stack_boundary and cfun->stack_alignment_needed. - (copy_rtx_and_substitute): Align frame to stack_alignment_needed only. - * i386.c (compute_frame_size): Use cfun->preferred_stack_boundary. - -2000-02-06 Zack Weinberg - - * cpplib.c (my_strerror, cpp_error, cpp_error_with_line, - cpp_error_from_errno, cpp_warning, cpp_warning_with_line, - cpp_pedwarn, cpp_pedwarn_with_line, - cpp_pedwarn_with_file_and_line): Move to cpperror.c. - (cpp_print_file_and_line, v_cpp_error, v_cpp_warning, - v_cpp_error_with_line, v_cpp_warning_with_line, - cpp_message_from_errno, cpp_perror_with_name): Delete. - - * cpperror.c (cpp_print_containing_files): Take starting - buffer as argument. - (cpp_file_line_for_message): Rename to cpp_print_file_and_line. - (v_cpp_message): Now called directly by all entry points. - Remove -1 case. - (cpp_pfatal_with_name, cpp_message): Delete. - (cpp_notice_from_errno, cpp_ice): New functions. - (cpp_notice): Is now for reporting error conditions, just - without an associated file. - (cpp_error, cpp_error_with_line): Don't do anything if - opts->inhibit_errors is on. - (cpp_pedwarn_with_file_and_line): Take column argument also. - - * cpplib.h: Update prototypes of exported functions. - (struct cpp_options): Add inhibit_errors. - - * cppalloc.c, cppfiles.c: Use fprintf not cpp_notice for - non-error messages. Include intl.h. - - * cppinit.c, cppmain.c: Likewise. Also, use - cpp_notice_from_errno instead of cpp_perror_with_name or - cpp_pfatal_with_name, and cpp_notice instead of cpp_message. - - * cppexp.c, cpphash.c, cppinit.c, cpplib.c: Use cpp_ice to - report internal errors. - - * cpplib.c (do_define): Switch bcopy to memcpy. - Give cpp_pedwarn_with_file_and_line a dummy column argument. - - * cpplib.c (copy_rest_of_line): Revert previous change: don't - bail out early if we hit a line comment. - -2000-02-06 Richard Henderson - - * flow.c (flow_delete_insn, make_edge, remove_edge): Export. - * basic-block.h: Declare them. - * emit-rtl.h (active_insn_p): New. - (next_active_insn, prev_active_insn): Use it. - * rtl.h: Declare it. - * function.c (emit_return_into_block): New. - (thread_prologue_and_epilogue_insns): Insert return insns instead - of epilogues when possible. - * jump.c (jump_optimize_1): Remove code to insert a return insn - on the fallthru to the exit block. - - * i386.c (ix86_can_use_return_insn_p): Fail for large poped args - and for non-empty stack frames. - * i386.md (return): Expand to return-pop as needed. - -2000-02-06 Richard Henderson - - * simplify-rtx.c (simplify_relational_operation): Canonicalize - constant to op1 for testing. - -2000-02-06 Michael Hayes - - * config/c4x/c4x.md (*ldi_on_overflow): New pattern. - (fixuns_truncqfqi2): Use it. - -2000-02-06 Richard Henderson - - * i386.c (ix86_agi_dependant): Handle pro_epilogue_adjust_stack - as a TYPE_LEA insn. - - * i386.md (widening and peepholes): Mask the constant instead of - using gen_lowpart. - -2000-02-05 Zack Weinberg - - * cppfiles.c (read_and_prescan) [case SPECCASE_QUESTION]: Bump - input pointer before possibly branching off to the backslash - code. - * cpphash.c (macroexpand): Correctly delete \r escapes when - stringifying parameters. - * cpplib.c (copy_rest_of_line): Go directly to skip_block_comment - if we can; bail out early if we hit a line comment. - (handle_directive): Treat '# 123' in an .S file just like - '# '. Discard the shifted '#' if we hit '#\n'. - Return 1 for '# not_a_directive'. - (get_directive_token): Pop macro buffers here, so that - cpp_get_token can't sneakily move past a newline. - Add sanity checks. - (cpp_get_token): goto randomchar if handle_directive returns 0. - - * cppalloc.c: Update copyright. - * cpplib.c: Merge all the static function prototypes into one - block. - * cpplib.h: Remove #if 0 block. - - * cpperror.c: Remove #ifdef EMACS block. - * cppmain.c: Likewise. - * cpphash.c: Remove #if 0 blocks. - * cppinit.c: Remove #if 0 blocks, and the -lint option. - * cpplib.c: Remove #if 0 blocks and code referencing - pcp_inside_if or for_lint. Remove duplicate error message. - Fix error messages for #else after #else or #elif. Reformat. - Remove archaic TODO list. - * cpplib.h: Remove pcp_inside_if and for_lint flags. - -2000-02-05 Zack Weinberg - - * i386/osf1elf.h: Add missing backslash to multiline string. - -2000-02-05 Kaveh R. Ghazi - - * longlong.h [sparc] (udiv_qrnnd): Avoid stringifying macro arg. - -2000-02-05 Kaveh R. Ghazi - - * Makefile.in (c-common.o): Depend on $(EXPR_H). - - * c-common.c: Include expr.h. - - * c-pragma.c (mark_align_stack): Add prototype. - - * caller-save.c (add_stored_regs): Likewise. - - * combine.c (record_promoted_value): Likewise. - - * i386.c (ix86_sched_reorder_pentium, ix86_sched_reorder_ppro): - Likewise. - - * cppinit.c (new_pending_define): Likewise. - - * cpplib.c (skip_block_comment, skip_line_comment): Likewise. - - * dwarf2out.c (save_rtx, splice_child_die, reverse_die_lists, - AT_class, AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, AT_loc, - AT_addr, AT_lbl, get_AT_ref, free_AT, free_die, local_scope_p, - class_scope_p): Likewise. - - * dwarf2out.h (dwarf2out_set_demangle_name_func, - dwarf2out_add_library_unit_info): Likewise. - - * ggc.h (ggc_page_print_statistics): Likewise. - - * haifa-sched.c (propagate_deps): Likewise. - - * reg-stack.c (next_flags_user, record_label_references): Likewise. - - * rtl.h (set_stack_check_libfunc): Likewise. - - * toplev.h (set_fatal_function): Likewise. - - * toplev.c (set_fatal_function): Delete prototype. - - * diagnostic.c: Deconstify functions returning malloc'ed ptrs. - -2000-02-05 Geoff Keating - - * ginclude/ppc-asm.h (FUNC_START): Use USER_LABEL_PREFIX. - (FUNC_END): Likewise. - -2000-02-05 Michael Hayes - - * caller-save.c: Include tm_p.h. - -2000-02-05 Michael Hayes - - * Makefile.in (libgcc.a): Add $(LIBGCC1) to libgcc.a after $(LIBGCC2). - -2000-02-04 Neil Booth - - * cccp.c (main): Check 'dir' for a NULL pointer before passing - it to strcmp. - -2000-02-04 Zack Weinberg - - * recog.h: Remove NO_MD_PROTOTYPES ifdefs. - * genflags.c: Use the max_operand_1 logic from genemit.c to - calculate how many arguments gen_insn prototypes have. Remove - NO_MD_PROTOTYPES ifdefs from the generated file. - * genoutput.c: Don't define NO_MD_PROTOTYPES in the generated - file. Cast gen_insn initializers to insn_gen_fn. - * config/alpha/vms.h: Don't define NO_MD_PROTOTYPES. - * gcc.texi: Remove documentation of NO_MD_PROTOTYPES. - -2000-02-04 Kaveh R. Ghazi - - * fixinc/Makefile.in (HDR): Add machname.h. - (clean): Likewise. - -2000-02-05 Michael Hayes - - * config/c4x/c4x.h (c4x_compare_op0, c4x_compare_op1): Move ... - (c4x_regclass_map, c4x_caller_save_map, c4x_rpts_cycles): Ditto. - (c4x_cpu_version): Ditto. - * config/c4x/c4x-protos.h: ... here. - -2000-02-04 Jason Merrill - - * dwarf2out.c (add_abstract_origin_attribute): Don't call - gen_abstract_function on our context if we're a nested function. - -2000-02-05 Michael Hayes - - * config/c4x/c4x.md (fixuns_truncqfqi2): Rewrite. - * config/c4x/libgcc.S (ufix_truncqfhi2n): Fix. - -2000-02-04 Bruce Korb - - * fixinc/genfixes(machname.h): - Move the functionality from gen-machine.h into this file. - UNdef MN_NAME_PAT if there are no names to change. - Also, be a little kinder when AutoGen is not present. - - * fixinc/Makefile.in(machname.h): - Change the generation rule to use genfixes. - - * fixinc/fixfixes.c(machine_name): - machine_name_fix's functionality now dependent upon whether - MN_NAME_PAT is defined. - - * fixinc/fixtests.c(machine_name): - ditto. - - * fixinc/fixlib.c(mn_get_regexps): conditional on definition - of MN_NAME_PAT. - - * fixinc/fixlib.h(mn_get_regexps): - ditto - - * fixinc/gen-machine.h: DELETED - -2000-02-04 Jan Hubicka - Richard Henderson - - * i386.c (SAVE_REGS_FIRST): Remove. - (ix86_initial_elimination_offset): Handle only SAVE_REGS_FIRST mode. - (ix86_compute_frame_size): Likewise. - (ix86_expand_prologue): Likewise. Use pro_epilogue_adjust_stack. - (ix86_emit_restore_regs): Remove. - (ix86_emit_epilogue_esp_adjustment): Use pro_epilogue_adjust_stack - when a frame pointer is in use. - (ix86_expand_epilogue): Handle only SAVE_REGS_FIRST mode. Use mov - instead of pop to restore a register when profitable; emit leave - when profitable. - (ix86_attr_length_default): Handle pro_epilogue_adjust_stack - as a TYPE_LEA insn. - (ix86_adjust_cost): Handle pro_epilogue_adjust_stack as TYPE_ALU. - * i386.md (prologue_allocate_stack): Remove. - (epilogue_deallocate_stack): Remove. - (pro_epilogue_adjust_stack): New. - -2000-02-04 Richard Henderson - - * function.c (diddle_return_value): Rework to use a callback function. - Use current_function_return_rtx if it's been set up. - (do_clobber_return_reg, clobber_return_register): New. - (do_use_return_reg, use_return_register): New. - (expand_function_end): Use them. - * stmt.c (expand_null_return): Likewise. - * function.h: Declare them. - * flow.c (mark_regs_live_at_end): Use diddle_return_value. - (mark_reg): Change arguments as appropriate for callback. - * integrate.c (expand_inline_function): Revert 19 Jan change. - -Fri Feb 4 20:25:42 2000 Hans-Peter Nilsson - - * tm.texi (Values in Registers): Fix typo: "fo" "for". - (Misc): Say the scheduler, not the Haifa scheduler. - -2000-02-04 Clinton Popetz - - * jump.c (mark_jump_label): Add in_mem param, check SYMBOL_REFs - when in_mem is set. Update all callers. - -2000-02-04 Richard Henderson - - * i386/openbsd.h (INT_ASM_OP): Define. - -Fri Feb 4 10:51:30 2000 Hans-Peter Nilsson - - * tm.texi: Fix various typos. - -Thu Feb 3 17:17:32 2000 Steve Ellcey - - * config/pa/pa-hpux11.h (LIB_SPEC): Correct typo in !p case. - (MD_STARTFILE_PREFIX_1): New macro. - -Thu Feb 3 15:08:13 MET 2000 Jan Hubicka - - * i386.md (movstrsi, clrstrsi): Support variable sized copies, align - destination when needed. - (strmovsi, strsetsi): New expander. - (strmovsi_1, strsetsi_1): New pattern. - * i386.h (MASK_NO_ALIGN_STROP, MASK_INLINE_ALL_STROP, - TARGET_ALIGN_STRINGOPS, TARGET_INLINE_ALL_STRINGOPS): New macros. - (TARGET_SWITCHES) Add align-stringops and inline-all-stringops. - * invoke.texi (align-stringops, inline-all-stringops): Document. - -Wed Feb 2 23:04:47 2000 Krister Walfridsson - - * i386/netbsd.h (INT_ASM_OP): Define. - -2000-02-02 Zack Weinberg - - * cpplib.h (cpp_reader): Add new flag, no_directives. - * cpphash.c (macarg): Set it. - * cpplib.c (handle_directive): If no_directives is on and we - find a directive, issue an error and discard the line. - -Wed Feb 2 13:07:10 2000 Jim Wilson - - * config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Delete 'E' check for - FP constants. Add ! TARGET_FPU check for FP constants. - -2000-02-02 Clinton Popetz - - * flow.c (find_basic_blocks): Don't kill label_value_list - here. - (cleanup_cfg): Kill it here. - -Wed Feb 2 08:12:30 2000 Richard Kenner - - * expr.c (store_field): Ensure ALIGN is no stricter than the - alignment of EXP. - -2000-02-02 Richard Henderson - - * jump.c (delete_insn): Partially revert 19 Jan change; - don't convert unused code labels to notes at -O0. - -2000-02-02 Herman A.J. ten Brugge - - * toplev.c (rest_of_compilation): Run rebuild_jump_labels after - split_all_insns to recreate REG_LABEL notes for flow2 pass. - -2000-02-01 Richard Henderson - - * i386.c (general_no_elim_operand): New. - (nonmemory_no_elim_operand): New. - (ix86_expand_move): Copy eliminable operands before a push. - * i386-protos.h: Declare new functions. - * i386.h (CAN_ELIMINATE): Simplify. - (PREDICATE_CODES): Update. - * i386.md (push insns): Don't allow eliminable register operands. - -2000-02-01 Richard Henderson - - * flow.c (mark_regs_live_at_end): Follow expand_function_end and - replace BLKmode with DECL_RTL's mode. - -2000-02-01 Zack Weinberg - - * frame.c (find_fde): Convert for loop to do-while so compiler - sees it's always executed at least once. - * libgcc2.c (BBINBUFSIZE): Kill. - (__bb_init_prg): Use fgets. - (__bb_exit_trace_func): Don't paste strings. - * unroll.c (unroll_loop): Initialize unroll_type, not - unroll_number, and tweak logic to match. - - * i386.c (ix86_expand_int_movcc): Add explicit 'return 0' in - all failure paths. - (ix86_flags_dependant): Likewise. Disentangle control flow. - (ix86_sched_reorder): Break guts out to - ix86_sched_reorder_pentium and ix86_sched_reorder_ppro. - (ix86_sched_reorder_ppro): Initialize pair2 and insnp before - any possible use. - - * i386.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Don't - use string concatenation. Don't save and restore esi. - - * fixinc/Makefile.in (fixincl.sh): Don't depend on inclhack.def. - (machname.h): Remove script to separate file. Use two-step - sequence so target is not created if script fails. - * fixinc/gen-machname.h: New file. Handle case where no non-reserved - identifiers are defined. - * fixinc/fixlib.c (mn_get_regexps): Return a flag: if MN_NAME_PAT is - an empty string, machine_name doesn't need to do anything at - all. - (is_cxx_header): Add more cases to regexp. - * fixinc/fixlib.h: Update prototype. - * fixinc/fixtests.c, fixinc/fixfixes.c: Update callers of - mn_get_regexps. - * fixinc/fixincl.c: Define NO_BOGOSITY. - - * fixinc/inclhack.def (no_double_slash, else_endif_label): Ifdef out. - (hp_sysfile): Add missing comma. - (math_exception): Put the wrapper ifdefs at the beginning and - the end of the file. - * fixinc/fixincl.x, fixinc/inclhack.sh: Regenerate. - -2000-02-01 Richard Henderson - - * sparc.c (fp_zero_operand): Turn into a normal predicate. - Use CONST0_RTX. Update all callers. - * sparc.h, sparc-protos.h: Update accordingly. - * sparc.md (fp mov insns): Use fp_zero_operand directly - where applicable. - -Wed Feb 2 02:59:45 2000 Hans-Peter Nilsson - - * tm.texi (Values in Registers): Fix typo in HARD_REGNO_NREGS - example. - -2000-02-01 Kaveh R. Ghazi - - * Makefile.in (specs.ready): New target. - (fixinc.sh): Depend on `specs.ready' instead of `specs'. - -2000-02-01 Kaveh R. Ghazi - - * fixinc.irix: Use unique filenames for writing into /tmp, - * fixinc.ptx: Likewise. - * fixinc.sco: Likewise. - * fixinc.svr4: Likewise. - * fixinc.winnt: Likewise. - -2000-02-01 Kaveh R. Ghazi - - * tsystem.h: New file. - - * Makefile.in (libgcc2.a, stmp-multilib, crtbegin.o, crtend.o, - s-crtS): Depend on tsystem.h. - - * crtstuff.c: Include tsystem.h. - * frame.c: Likewise. - * libgcc2.c: Likewise. - -Tue Feb 1 19:53:27 CET 2000 Jan Hubicka - - * builtins.c (expand_builtin_memset): Expand for variable sized - lengths too. - -2000-02-01 David Billinghurst - - * config/mips/iris6.h (SUBTARGET_ASM_SPEC) : Default ISA based - on ABI. - -Tue Feb 1 00:57:40 2000 Hans-Peter Nilsson - - * dwarfout.c (SHORT_TYPE_SIZE): Correct default. - - * tm.texi (Type Layout): Correct entry for CHAR_TYPE_SIZE. - -2000-01-31 Chandra Chavva - - * combine.c (try_combine) [HAVE_cc0]: Trying to check the missed - case 3->2 combining (combining with splitting) in which 2 is CC0 - setter/user and 3 is user. The rest of cases 2->1 and 3->2 are - checked at the begining of the function with the aid of calling - function 'can_combine_p'. - -2000-01-31 Dave Brolley - - * cccp.c (struct argdata): Redeclare 'newlines' field as 'int'. - -2000-01-31 Jason Merrill - - * jump.c (redirect_jump): Move a NOTE_INSN_FUNCTION_END to the - new label. - -2000-01-31 Kaveh R. Ghazi - - * gansidecl.h (PROTO, VPROTO, PVPROTO): Delete macros. - - * sbitmap.h (sbitmap_first_set_bit, sbitmap_last_set_bit): - PROTO -> PARAMS. - -2000-01-30 Zack Weinberg - - * i386/386bsd.h, i386/beos-pe.h, i386/bsd386.h, i386/crtdll.h, - i386/cygwin.h, i386/dgux.h, i386/djgpp-rtems.h, i386/djgpp.h, - i386/freebsd.h, i386/gnu.h, i386/i386-aout.h, i386/i386-coff.h, - i386/i386-interix.h, i386/i386elf.h, i386/linux.h, i386/lynx-ng.h, - i386/lynx.h, i386/mach.h, i386/mingw32.h, i386/moss.h, - i386/netbsd.h, i386/next.h, i386/openbsd.h, i386/osf1elf.h, - i386/ptx4-i.h, i386/rtems.h, i386/rtemself.h, i386/sco.h, - i386/sequent.h, i386/sun.h, i386/sysv4.h, i386/uwin.h, i386/vsta.h, - i386/vxi386.h, i386/win-nt.h, i386/win32.h: - Remove -Di386 -Acpu(i386) -Amachine(i386) from CPP_PREDEFINES. - - * i386/osf1elf.h, i386/scodbx.h, i386/seq-sysv3.h, i386/sysv5.h: - Add %(cpp_cpu) to CPP_SPEC. - - * i386/osf1elf.h, i386/osfelf.h, i386/osfrose.h: - Add %(cc1_cpu) to CC1_SPEC. - -2000-01-28 Ulrich Drepper - - * c-decl.c (c_decode_option): Accept optional numeric argument to - -Wformat and set warn_format. - * c-common.c: Don't emit warning about non-constant printf format - string unless warn_format > 1. - -2000-01-30 Richard Henderson - - * alpha.md (return_internal): Allow after reload only. - -2000-01-30 Richard Henderson - - * i386.c (ix86_compute_frame_size): Omit padding1 if the - local frame size is zero. - -2000-01-30 Richard Henderson - - * alpha.c (alpha_expand_epilogue): Don't emit the return insn. - * alpha.h (EPILOGUE_USES): New. Mark $26 live. - * alpha.md (return): Turn into an expander. - (return_internal): Don't use $26. - (epilogue): Emit the return insn. - -2000-01-30 Richard Henderson - - * alpha.md (negtf2, abstf2): Fix word order thinko. - (extendsftf2): New. - (trunctfsf2): Avoid intermediate rounding errors. - -2000-01-30 Zack Weinberg - - * cppfiles.c (find_position): Drop 'colp' argument, return the - new line base. - (read_and_prescan): Adjust to match. Don't ever manipulate - line or line_base except via find_position. - -2000-01-29 Zack Weinberg - - * c-parse.in: Apply Ulrich's changes from c-parse.y. - * c-parse.y, objc/objc-parse.y, c-parse.c, objc/objc-parse.c: - Regenerate. - -2000-01-29 Zack Weinberg - - * cpperror.c (cpp_file_line_for_message): If 'line' is zero, - just print "". If 'filename' is null or an - empty string, print "" for the filename. - * cpplib.c (do_define): Don't print the 'location of the - previous definition' message if we're still parsing the - command line. - (cpp_pedwarn_with_file_and_line): Always call - cpp_file_line_for_message. - -2000-01-29 Mark Mitchell - - * flow.c (mark_regs_live_at_end): Fix typo. - -2000-01-28 Ulrich Drepper - - * c-common.c: Adjust variable names, comments, help strings to c99. - * c-lex.c: Likewise. - * c-parse.y: Likewise. - * c-tree.h: Likewise. - * cccp.c: Likewise. - * cpplib.h: Likewise. - * c-decl.c: Likewise. Recognize options with names "*99" as well. - * cppinit.c: Likewise. - -2000-01-29 Herman A.J. ten Brugge - - * c4x.h (INIT_TARGET_OPTABS): Add all missing local optab entries. - * c4x.c: Define the optab rtx values. - (c4x_add_gc_roots): Add the ggc roots for these optab rtx values. - (c4x_emit_libcall): Use new optab rtx values. - (c4x_emit_libcall3): Likewise. - (c4x_emit_libcall_mulhi): Likewise. - * c4x-protos.h: Add prototypes for optab rtx values and change - prototypes for above c4x_emit_libcall functions. - -2000-01-29 Herman A.J. ten Brugge - - * c4x.c (c4x_output_ascii): Restrict line length of output when TI - syntax is used. - (c4x_function_prologue): Use regnames intead of float_reg_names when - TI syntax is used. - (c4x_function_epilogue): Likewise. - (c4x_print_operand): Likewise. - * c4x.h (HOST_WIDE_INT_PRINT_HEX): Redefine. - * c4x.md (set_high): Disable for TARGET_TI. - -2000-01-29 Herman A.J. ten Brugge - - * c4x.h (PREFERRED_RELOAD_CLASS): Change to restrict the reloading - of framepointer + constant to ADDR_REGS class. - * c4x.md (addqi3, addqi3_noclobber_reload): Update. - * c4x.c (std_or_reg_operand): New function. - * c4x-protos.h (std_or_reg_operand): Prototype it. - -2000-01-29 Herman A.J. ten Brugge - - * t-c4x: Change qi,qf,di,df into si,sf,hi,hf to generate same - object names as libgcc2.c. - * libgcc.S: Use newly defined names. - -Fri Jan 7 19:48:04 CET 2000 Jan Hubicka - * sbitmap.c (sbitmap_first_set_bit, sbitmap_last_set_bit): New - function. - * sbitmap.h (sbitmap_first_set_bit, sbitmap_last_set_bit): Declare. - * basic_block.h (FLOW_LOOP_FIRST_BLOCK): New macro. - (FLOW_LOOP_LAST_BLOCK): Likewise. - -2000-01-21 Michael Hayes - - * basic-block.h (struct loop): New fields 'first' and 'last'. - * flow.c (flow_loops_find): Compute loop->first and loop->last. - (flow_loops_dump): Use loop->first to check for NOTE_INSN_LOOP_BEG - and loop->last to check for NOTE_INSN_LOOP_END. - -Fri Jan 28 10:57:58 2000 Jason Eckhardt - - * predict.c (estimate_probability): Use the new FIRST and LAST fields - of the loop descriptor rather than HEADER and LATCH. Also added - missing break statements as well making some coding style modifications - as suggested by Michael Hayes. - -2000-01-28 Richard Henderson - - * flow.c (find_basic_blocks): Remove do_cleanup argument. - Break out that code ... - (cleanup_cfg): ... here. - (commit_one_edge_insertion): Detect a return instruction being - emitted to an edge. Emit a barrier following; clear fallthru. - (commit_edge_insertions): Verify CFG consistency. - * function.c (expand_function_start): Kill unused variable. - (expand_function_end): Likewise. - (thread_prologue_and_epilogue_insns): Use insert_insn_on_edge - to insert the epilogue. - - * gcse.c (gcse_main): Adjust for find_basic_blocks change. - (delete_null_pointer_checks): Likewise. - * output.h: Likewise. - * reg-stack.c (reg_to_stack): Likewise. - * toplev.c (rest_of_compilation): Likewise. Run - thread_prologue_and_epilogue_insns after rebuilding the CFG. - -2000-01-28 Richard Henderson - - * Makefile.in (flow.o): Revert 24 Jan change. - * flow.c (mark_regs_live_at_end): Likewise. Force BLKmode - FUNCTION_VALUE result to DECL_RESULT's mode. - - * haifa-sched.c (schedule_insns): Don't recompute reg info - after reload. - -2000-01-28 Zack Weinberg - - * configure.in: Make --enable-cpplib the default. - * configure: Regenerate. - * gcc.dg/990119-1.c: No longer expected to fail. - -2000-01-28 Bernd Schmidt - - * jump.c (jump_optimize_1): Delete an optimization that is also done - by merge_blocks in flow. - -2000-01-28 Kaveh R. Ghazi - - * diagnostic.c (build_message_string, output_printf, - line_wrapper_printf): Add ATTRIBUTE_PRINTF_*. - (build_location_prefix): Fix non-literal format string. - -2000-01-27 Richard Henderson - - * alpha.md (trunctfsf2): New. - -2000-01-27 Andrew Hobson - - * configure.in (alpha-dec-osf5): Enable MASK_SUPPORT_ARCH. - -2000-01-27 Zack Weinberg - - * cppinit.c (cpp_handle_option): Recognize C++ comments under - -std=gnu89. - * cpplib.c (skip_block_comment, skip_line_comment): Split code - out of... - (skip_comment) ... here. Permit C++ comments in system - headers always. Warn about C++ comments in user code under - -std=gnu89 -pedantic. - (copy_comment): Use skip_comment. - (cpp_skip_hspace, cpp_get_token): skip_comment can no longer - return EOF. - (consider_directive_while_skipping, do_else, do_endif): Call - validate_else unconditionally. - (validate_else): Check CPP_PEDANTIC here. Accept non-comment - text after the conditional in a system header. - * cpplib.h (struct cpp_buffer): Add flag - warned_cplusplus_comments. - -2000-01-27 Geoffrey Keating - - * emit-rtl.c (unshare_all_rtl): Unshare virtual parameters too. - Use unshare_all_rtl_1. - (unshare_all_rtl_again): New function. - (unshare_all_rtl_1): New function split out of unshare_all_rtl. - - * function.c (purge_addressof_1): Use unshare_all_rtl_again - rather than resetting the 'used' flags ourself. - - * toplev.c (rest_of_compilation): Add current_function_decl - to the unshare_all_rtl call. - * tree.h: Prototype unshare_all_rtl. - * rtl.h: Prototype unshare_all_rtl_again here. - -2000-01-27 Geoffrey Keating - - * genoutput.c (output_prologue): Include ggc.h in generated - files. - * Makefile.in (insn-output.o): Depends on ggc.h. - -2000-01-27 Ian Dall - Hans-Peter Nilsson - - * ns32k/xm-ns32k.h (memcpy, memset, memcmp): Delete. - Remove redundant include of xm-ns32k.h. - * ns32k/xm-genix.h (memcpy, memset, memcmp): Add definitions. - Remove redundant include of xm-ns32k.h. - * ns32k/xm-netbsd.h (memcpy, memset, memcmp): No longer undefine. - Remove redundant include of xm-ns32k.h. - * ns32k/netbsd.h (TARGET_DEFAULT): Enable multiply-add instructions. - - * ns32k/ns32k.h: Update comment on multiply-add instructions. - (TARGET_SWITCHES): Add documentation strings. - (DWARF_FRAME_REGNUM): Override default definition. - (REG_CLASS_CONTENTS): Add comments. - (SUBSET_P): Format to reduce line length. - (SMALL_REGISTER_CLASSES): Make a run time option. - (GO_IF_NONINDEXED_ADDRESS): Reformat. - (GO_IF_LEGITIMATE_ADDRESS): Ensure that cfun is non NULL before - dereferencing it. Braces to avoid "ambiguous else" were misplaced. - (regclass_map): fix typo in comment. - * ns32k/ns32k.c: Add spaces before parentheses for consistant style. - Prefer gen_rtx_FOO(...) to gen_rtx(FOO,...). - (trace, reg_or_mem_operand): Delete, unused function. - (calc_address_cost): Small offsets are cheaper than large ones. - (expand_block_move): Generate more efficient code when bytes is a - known at compile time. - * ns32k/ns32k.md: Alternate constraints for multiply-add instructions. - (udivmodsi4, udivmodhi4, udivmodqi4): Use nonimmediate_operand - instead of reg_or_mem_operand. - - * ns32k/ns32k.md: Use nonimmediate_operand or stricter for outputs, - not general_operand. Similarly use "=rm" or stricter, not "=g". - For input operands, use stricter constraints than "g" if not - general_operand. Similarly use stricter predicate than - "general_operand" when stricter constraints than "g" are present, - except for matching constraints. - (movstrsi): Use "memory_operand" for operands 0 and 1. - (truncsiqi2, truncsihi2, trunchiqi2): Remove. - (udivmoddisi4_internal): Use nonimmediate_operand for operand 0, - not reg_or_mem_operand. - (udivmoddisi4): Ditto. - Use nonimmediate_operand for operand 1, not reg_or_mem_operand. - Use nonimmediate_operand for operand 3, not register_operand. - (udivmoddiqi4_internal): Use register_operand for operand 1, not - reg_or_mem_operand. - -2000-01-27 Fred Fish - - * gthr-posix.h: Fix typo; compatibily -> compatibility. - * gthr-single.h: Likewise. - * gthr-solaris.h: Likewise. - * gthr-vxworks.h: Likewise. - * gthr-win32.h: Likewise. - * gthr.h: Likewise. - -2000-01-27 Zack Weinberg - - * cppinit.c: Add " (cpplib)" to end of string printed by - -v / --version. - -2000-01-27 Richard Henderson - - * alpha.c (alpha_emit_conditional_move): Use VOIDmode when - testing for a signed comparison. - (alpha_emit_floatuns): New. - * alpha-protos.h: Declare it. - * alpha.md (floatunsdisf2, floatunsdidf2): New. - (extendsfdf2): Tidy. - -2000-01-27 Jakub Jelinek - - * config/sparc/linux64.h (CC1_SPEC): If compiling -m32 with -g but - no -g option specifying debugging format, default to -gstabs+. - -Wed Jan 26 22:19:14 1999 J"orn Rennecke - - * calls.c (special_function_p): New argument fork_or_exec. - (expand_call): When profile_arc_flag is set and the function - is in the fork_or_exec group, call __bb_fork_func first. - * libgcc2.c, _bb module (__bb_fork_func): New function. - (__bb_exit_func): If fcntl F_SETLKW is available, use it to lock - output file. - * config/svr4.h (TARGET_HAS_F_SETLKW): Define. - * tree.h (special_function_p): Update prototype. - -2000-01-26 Richard Henderson - - * alpha.c (alpha_split_tfmode_pair): New. - * alpha-protos.h: Declare it. - * alpha.md (abstf2, negtf2): New. - (movtf insn): Add input G constraint. - (movtf splitter): Use alpha_split_tfmode_pair. - -2000-01-26 Kaveh R. Ghazi - - * i386/cygwin.h: PROTO -> PARAMS. - -2000-01-26 Jakub Jelinek - - * config/sparc/sparc.c (sparc_emit_float_lib_cmp): Handle - TARGET_ARCH32 again. Handle ORDERED, UN* and LTGT comparisons - using _Qp_cmp/_Q_cmp and testing the return value. - (print_operand): Call reverse_condition_maybe_unordered if - we are handling CCFPmode or CCFPEmode. - Handle ORDERED, UN* and LTGT comparisons. - * config/sparc/sparc.md (cmptf): Use even on TARGET_ARCH32 - if not TARGET_HARD_QUAD. - (seq, sne, sgt, slt, sge, sle, beq, bne, bgt, blt, bge, ble, - bunordered, bordered, bungt, bunlt, buneq, bunge, bunle, bltgt): - Call sparc_emit_float_lib_cmp even on TARGET_ARCH32. - Adjust gen_b* calls so that they reflect return comparison of - sparc_emit_float_lib_cmp. - -2000-01-26 Alexandre Oliva - - * config/alpha/alpha.c (alpha_emit_xfloating_cvt): Do not assume - incoming operands array is large enough for one more operand. - (alpha_emit_xfloating_arith): Likewise. - -2000-01-25 Zack Weinberg - - * fixinc/Makefile.in (machname.h): SunOS 4 sed can't handle a - file with one line and no trailing newline. - Patch by Kaveh Ghazi . - * fixinc/fixtests.c (machine_name_test): Fix fencepost error - checking if the match is on the line. - * fixinc/gnu-regex.c: Provide regerror not __regerror. - -2000-01-25 Richard Henderson - - * sparc.c (output_cbranch): Fix accidental squashing of the - fp branch pre-delay nop. - -2000-01-25 Richard Henderson - - * tree.def (UNNE_EXPR): Remove. - * c-typeck.c (build_binary_op): Don't handle it. - * expr.c (expand_expr, do_jump, do_store_flag): Likewise. - - * rtl.def (UNNE): Remove. - (LTGT): Add. - * jump.c (reverse_condition): Update accordingly. - (swap_condition): Likewise. - (comparison_dominates_p): Handle unordered comparisons. - (reverse_condition_maybe_unordered): New. - * rtl.h (reverse_condition_maybe_unordered): Declare. - - * sparc.c (select_cc_mode): Update for UNNE/LTGT. - (output_cbranch): Use reverse_condition_maybe_unordered and LTGT. - * sparc.h (REVERSIBLE_CC_MODE): Always true. Update docs. - * sparc.md (bltgt): New. - -2000-01-25 Nick Clifton - - * emit-rtl.c (emit_insn): Only check machine class insns for - improper emission of a RETURN. - -2000-01-25 Richard Henderson - - * Makefile.in (flow.o): Depend on $(EXPR_H). - * flow.c (mark_regs_live_at_end): Use hard_function_value, i.e. - duplicate the structure of diddle_return_value for keeping regs live. - -2000-01-26 Michael Hayes - - * loop.c (current_loop_info): Delete. - (consec_sets_invariant_p): Add loop argument, update callers. - (get_condition_for_loop): Likewise. - (count_nonfixed_reads, update_giv_derive): Likewise. - (simplify_giv_expr, general_induction_var): Likewise. - (consec_sets_giv, recombine_givs): Likewise. - (move_movables): Delete loop_start and loop_end arguments, - add loop argument, and update callers. - (find_mem_givs, check_final_value): Likewise. - (record_giv, maybe_eliminate_biv, maybe_eliminate_biv_1): Likewise. - (loop_invariant_p): Rename from invariant_p, add loop argument, and - update callers. - (basic_induction_var): Add loop argument, delete loop_level argument, - and update callers. - * unroll.c (iteration_info): Delete loop_start and loop_end arguments, - add loop argument, and update callers. - (find_splittable_regs, find_splittable_givs): Likewise. - (reg_dead_after_loop, loop_find_equiv_value): Likewise. - (final_biv_value, final_giv_value, back_branch_in_range_p): Likewise. - (biv_total_increment): Delete loop_start and loop_end arguments; - update callers. - (precondition_loop_p): Delete loop_start and loop_info arguments; - update callers. - * loop.h (get_condition_for_loop): Add loop argument. - (biv_total_increment): Delete loop_start and loop_end arguments. - (precondition_loop_p): Delete loop_start and loop_info arguments; - add loop argument. - (final_biv_value): Delete loop_start and loop_end arguments; - add loop argument. - (final_giv_value, back_branch_in_range_p): Likewise. - -2000-01-25 Gavin Romig-Koch - - * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Fix for mips16. - -2000-01-25 Gavin Romig-Koch - - * Makefile.in (c-gperf.h) : Change the "See" pointer to - point to the new "generated_files" doc. - -2000-01-25 Clinton Popetz - - * config/fp-bit.c (_unord_f2): Fix typo. - -2000-01-25 Zack Weinberg - - * c-common.c, c-decl.c, c-lang.c, c-lex.c, c-parse.in, c-pragma.c, - c-typeck.c, objc/objc-act.c: Remove all references to obstack - functions obsoleted by GC, such as push_obstacks_nochange, - end_temporary_allocation, savealloc, saveable_tree_cons, etc. - and code which existed only to decide whether or not to call - them. Remove now-unused NESTED argument from start_function; - all callers changed. Do not change behavior based on ggc_p. - The use of the ixp_obstack in c-iterate.c and the util_obstack - in objc/objc-act.c remain; these are not obsoleted by garbage - collection. - * c-tree.h: Update prototype for start_function. - - * c-parse.y, c-parse.c, objc/objc-parse.c, objc/objc-parse.y: Rebuild. - -2000-01-25 Clinton Popetz - - * config/mips/mips.md (zero_extendsidi2_internal): Disable for - mips16. - -2000-01-25 Richard Henderson - - * sparc-protos.h (select_cc_mode): Declare. - * sparc.c (select_cc_mode): New. Handle unordered compares. - (output_cbranch): Always reverse via code change. Handle - unordered compares. Factor tests and string updates. - * sparc.h (SELECT_CC_MODE): Split out to select_cc_mode. - (REVERSIBLE_CC_MODE): Also exclude CCFPmode. - * sparc.md (bunordered, bordered): New. - (bungt, bunlt, buneq, bunge, bunle): New. - -2000-01-25 Richard Henderson - - * dwarf2out.c (dwarf2out_init): Use ggc_add_rtx_varray_root. - * ggc-common.c (ggc_add_rtx_varray_root): New. - (ggc_mark_rtx_varray): New. - (ggc_mark_rtx_varray_ptr): New. Shift all ggc_mark_foo_ptr - functions down below ggc_mark_foo. - * ggc.h (ggc_add_rtx_varray_root, ggc_mark_rtx_varray): Declare. - -2000-01-25 Richard Henderson - - * alpha.c (secondary_reload_class): Don't allocate a secondary - for integral mode memories into FLOAT_REGS. Rearrange the more - complicated memory expression inward. - -2000-01-25 Zack Weinberg - - * inclhack.def: Fixes to play nicer with FreeBSD, and - corrections to comments. - (cxx_unready): Add select expression. - (irix_sockaddr): Add bypass expression. - (machine_ansi_h_va_list): New fix. - (stdio_va_list): No need to edit _BSD_VA_LIST_. - Split out addition of "#include " to... - (stdio_stdarg_h): ... here. - (systypes_for_aix): Rename to systypes_stdlib_size_t. Apply - to stdlib.h also. Do not munge _BSD_SIZE_T_. - (sysz_stdlib_for_sun): Delete duplicate fix for unprotected - size_t. - (ultrix_ifdef): Tighten up select expression. - - * fixincl.tpl: Exorcise 'exesel'. Rewrite calculations of - re_ct and max_mach to avoid use of shell. Make printed names - match names in inclhack.def. Use static copyright date. - Don't count c_test and test expressions as requiring regex_t - slots. Add some commentary. - * inclhack.tpl: Do not include the 'This script contains N - fixup scripts' line if PROGRAM is defined. Use static - copyright date. - -2000-01-24 Jason Merrill - - * dwarf2out.c: include "varray.h", not dyn-string.h. - (ASM_OUTPUT_DWARF2_ADDR_CONST, ASM_NAME_TO_STRING): Lose. - (addr_const_to_string, addr_to_string): Lose. - (ASM_OUTPUT_DWARF_ADDR_CONST): Copy from dwarfout.c. - (struct dw_val_struct): val_addr is now an rtx. - (add_AT_addr, AT_addr, free_AT, output_aranges): Adjust. - (used_rtx_varray): New varray. - (dwarf2out_init): Initialize it. - (save_rtx): New fn. - (mem_loc_descriptor, add_const_value_attribute): Call it instead of - addr_to_string. - * arm/telf.h, arm/unknown-elf.h, mn10200.h, mn10300.h, - sparc/sp64-elf.h: Remove definition of ASM_OUTPUT_DWARF2_ADDR_CONST. - * Makefile.in (dwarf2out.o): Update dependencies. - -2000-01-24 Richard Henderson - - * i386.c (i386_dwarf_output_addr_const): New. - * i386.h (ASM_OUTPUT_DWARF_ADDR_CONST): New. - - * dwarf2out.c (mem_loc_descriptor): Call ASM_SIMPLIFY_DWARF_ADDR - if defined. - * dwarfout.c (output_mem_loc_descriptor): Likewise. - * i386.c (i386_simplify_dwarf_addr): New. - * i386.h (ASM_SIMPLIFY_DWARF_ADDR): New. - -Mon Jan 24 16:56:10 2000 Jim Wilson - - * dwarf2out.c (gen_struct_or_union_type_die): Set complete if - TYPE_STUB_DECL is NULL. - -2000-01-24 Richard Henderson - - * builtins.c (expand_tree_builtin): Move ... - * c-common.c (expand_tree_builtin): ... here. - -2000-01-25 Michael Hayes - - * loop.h (LOOP_INFO): New accessor macro. - * basic-block.h (struct loop): Rename field `info' to `aux'. - * loop.c (scan_loop): Replace loop->info with LOOP_INFO (loop). - (prescan_loop, strength_reduce, check_dbra_loop, insert_bct): Likewise. - * unroll.c (loop_iterations, unroll_loop): Likewise. - -2000-01-24 Christopher Faylor - - * config/i386/t-cygwin: Accommodate new winsup directory layout - when searching for include files. - -2000-01-24 Richard Henderson - - * rtl.def: Add unordered fp comparisons. - * tree.def: Likewise. - * tree.h: Add ISO C 9x unordered fp comparison builtins. - - * builtins.c (expand_tree_builtin): New function. - * c-typeck.c (build_function_call): Use it. - (build_binary_op): Support unordered compares. - * c-common.c (c_common_nodes_and_builtins): Add unordered compares. - - * combine.c (known_cond): Handle reverse_condition returning UNKNOWN. - (reversible_comparison_p): Allow UNORDERED/ORDERED to be reversed. - * cse.c (fold_rtx): Check FLOAT_MODE_P before reversing. - (record_jump_equiv): Handle reverse_condition returning UNKNOWN. - * jump.c (reverse_condition): Don't abort for UNLE etc, but - return UNKNOWN. - (swap_condition): Handle unordered compares. - (thread_jumps): Check can_reverse before reversing. - * loop.c (get_condition): Likewise. Allow UNORERED/ORDERED to be - reversed for FP. - - * optabs.c (can_compare_p): New argument CODE. Verify branch or - setcc is present before acking for cmp_optab. Update all callers. - (prepare_float_lib_cmp, init_optabs): Handle UNORDERED. - * expmed.c (do_cmp_and_jump): Update for can_compare_p. - * expr.c (expand_expr): Likewise. Support unordered compares. - (do_jump, do_store_flag): Likewise. - * expr.h (enum libfunc_index): Add unordered compares. - - * Makefile.in (FPBIT_FUNCS): Add _unord_sf. - (DPBIT_FUNCS): Add _unord_df. - * config/fp-bit.c (_unord_f2): New. - * fp-test.c (main): Try unordered compare builtins. - - * alpha-protos.h (alpha_fp_comparison_operator): Declare. - * alpha.c (alpha_comparison_operator): Check mode properly. - (alpha_swapped_comparison_operator): Likewise. - (signed_comparison_operator): Likewise. - (alpha_fp_comparison_operator): New. - (alpha_emit_conditional_branch): Handle unordered compares. - * alpha.h (PREDICATE_CODES): Update. - * alpha.md (fp compares): Use alpha_fp_comparison_operator. - (bunordered, bordered): New. - -2000-01-24 Richard Henderson - - * alpha.c (alpha_emit_xfloating_cvt): Thinko in operand manipulation. - * alpha.md (movtf): New expander, insn, and splitter. - -Mon Jan 24 19:49:47 MET 2000 Jan Hubicka - - * reg-stack.c (subst_stack_regs_pat): Handle correctly USEs of - dead registers. - -Mon Jan 24 17:37:31 MET 2000 Jan Hubicka - - * i386.h (FIRST_PSEUDO_REGISTER): Set to 21. - (FIXED_REGISTERS, CALL_USED_REGISTERS, - REG_ALLOC_ORDER): Add frame pointer - (FRAME_POINTER_REGNUM): Set to 20 - (HARD_FRAME_POINTER_REGNUM): New macro. - (ELIMINABLE_REGS): Eliminate ARG_POINTER and FRAME_POINTER - to HARD_FRAME_POINTER. - (REGNO_OK_FOR_BASE_P): Accept FRAME_POINTER_REGNUM - (REG_OK_FOR_INDEX_NONSTRICT_P): Likewise. - (REG_OK_FOR_BASE_NONSTRICT_P): Likewise. - (HI_REGISTER_NAMES): Add "frame". - (CAN_ELIMINATE): Handle FRAME_POINTER_REGNUM elimination. - (debug_reg): Handle FRAME_POINTER_REGNUM. - (reg_class): Add arg pointer and frame pointer to NON_Q_REGS, - GENERAL_REGS and INDEX_REGS. - * i386.c (SAVED_REGS_FIRST): new macro. - (AT_BP): Use hard_frame_pointer_rtx instead of frame_pointer_rtx - (ix86_decompose_address, memory_address_length): Likewise. - (regclass_map): Add frame pointer. - (call_insn_operand): Handle frame_pointer_rtx. - (reg_no_sp_operand): Likewise. - (ix86_decompose_address): Handle frame_pointer_rtx as stack_pointer_rtx. - (print_operand, legitimize_pic_address): Fix formating. - (ix86_compute_frame_size): Make static, update prototype, new - parameters padding1, padding2, use ix86_nsaved_regs, use - stack_alignment_needed. - (ix86_initial_elimination_offset): Handle FRAME_POINTER_REGNUM - to HARD_FRAME_POINTER_REGNUM conversions. - (ix86_expand_prologue): Handle SAVED_REGS_FIRST prologues. - (ix86_expand_epilogue): Handle SAVED_REGS_FIRST epilogues. - (print_reg): Abort on FRAME_POINTER_REGNUM - -Mon Jan 24 16:50:08 MET 2000 Jan Hubicka - - * i386.h (PREDICATE_CODES): Add aligned_operand. - * i386.c (aligned_operand): New function. - (ix86_aligned_p): Kill. - * i386.md (movhi_1): Emit mov for aligned operands. - (promoting peep2s): Use aligned_operand. - -2000-01-23 Zack Weinberg - - * fixinc/fixfixes.c (fix_char_macro_uses): Correct regular - expression to allow underscores in macro names. - (fix_char_macro_defines): Increment scanning pointer. - -2000-01-23 Richard Henderson - - * alpha/osf.h (TARGET_HAS_XFLOATING_LIBS): Define. - * alpha/osf5.h: New file. - * configure.in (alpha-*-osf5): Add it to tm_file. - - * emit-rtl.c (operand_subword): Support TFmode on a 64-bit target. - - * alpha-protos.h (alpha_emit_xfloating_arith): Declare. - (alpha_emit_xfloating_cvt, function_arg): Declare. - * alpha.c (alpha_emit_conditional_branch): Call - alpha_emit_xfloating_compare for TFmode compares. - (alpha_lookup_xfloating_lib_func): New. - (alpha_compute_xfloating_mode_arg): New. - (alpha_emit_xfloating_libcall): New. - (alpha_emit_xfloating_arith): New. - (alpha_emit_xfloating_compare): New. - (alpha_emit_xfloating_cvt): New. - (print_operand): Add default abort case. - (function_arg): Mind FUNCTION_ARG_PASS_BY_REFERENCE. - * alpha.h (TARGET_HAS_XFLOATING_LIBS): New. - (BIGGEST_ALIGNMENT): Increase to 128 bits. - (RETURN_IN_MEMORY): True for TF/TCmode. - (ALPHA_ARG_SIZE): TF/TCmode is passed indirect. - (FUNCTION_ARG): Move to function_arg. - (FUNCTION_ARG_PASS_BY_REFERENCE): New. - (ASM_OUTPUT_LONG_DOUBLE): New. - (ASM_OUTPUT_DOUBLE): Always output bits. - * alpha.md (addtf3, divtf3, multf3, subtf3, cmptf): New. - (fix_trunctfdi2, floatditf2, floatunsditf2): New. - (extenddftf2, trunctfdf2): New. - -2000-01-23 Alexandre Oliva - - * config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Moved... - * config/sparc/sol2.h: ... here. - -2000-01-24 Michael Hayes - - * basic-block.h (struct loops): New field `levels'. - * flow.c (flow_loops_level_compute): Traverse all outer loops. - (flow_loop_level_compute): Initialize level to 1. - (flow_loops_find): Set loops->levels. - (flow_loops_dump): Print loops->levels. - -2000-01-23 Richard Henderson - - * libgcc2.c (dwarf_reg_size_table): Size with DWARF_FRAME_REGISTERS. - (throw_helper): Iterate over DWARF_FRAME_REGISTERS. - -2000-01-23 Richard Henderson - - * i386.c (dbx_register_map, svr4_dbx_register_map): New. - * i386.h (DBX_REGISTER_NUMBER): Use them. - * i386/beos-elf.h, i386/freebsd-elf.h, i386/i386elf.h: Likewise. - * i386/linux.h, i386/osfrose.h, i386/ptx4-i.h: Likewise. - * i386/rtemself.h, i386/sco5.h, i386/sysv4.h: Likewise. - * i386/sequent.h: Kill incorrect comment. - -2000-01-23 Mark Mitchell - - * ggc-page.c (struct page_entry): Make `context_depth' an - `unsigned short'. - (struct globals): Likewise. - -2000-01-23 Clinton Popetz - - * loop.c (check_dbra_loop): When checking a loop for - reversability, check the source of any stores to ensure - they don't depend on an initial value. - -2000-01-23 Michael Hayes - - * config/c4x/c4x.h (ASM_OUTPUT_BSS): Redefine. - -2000-01-22 Zack Weinberg - - * fixinc/fixincl.c: Move declarations of 'pz_fname' and - 'pz_scan' into scope of entire function. Only affects - compiles with -DDEBUG. - -2000-01-22 Alan Modra - - * config/elfos.h (UNIQUE_SECTION): Restore uninitialized data - section naming to that prior to 2000-01-07 patch. - * config/mips/elf.h (UNIQUE_SECTION): Ditto. - * config/mips/elf64.h (UNIQUE_SECTION): Ditto. - * config/mips/iris6gld.h (UNIQUE_SECTION): Ditto. - * config/i386/interix.c (UNIQUE_SECTION): Ditto. - * config/i386/winnt.c (UNIQUE_SECTION): Ditto. - -2000-01-22 Bernd Schmidt - - * config/arm/arm.c (soft_df_operand): Reject SUBREGs containing a - constant. - -2000-01-21 Jim Wilson - - * fixinc/inclhack.tpl: Test for directory before trying to cd into it. - * fixinc/fixincl.sh, fixinc/inclhack.sh: Regenerate. - -2000-01-21 Zack Weinberg - - * cpphash.c (change_newlines): Delete function. - (struct argdata): Delete 'newlines' and 'use_count' fields. - (macroexpand): Remove code referencing those fields. - -2000-01-22 Michael Hayes - - * loop.c (loops_info): New variable. - (loop_optimize): Allocate loops->array and free it on exit. - Allocate memory for loops_info and assign to each loop, - replacing alloca. - (find_and_verify_loops): Do not allocate loops->array. - -2000-01-21 Zack Weinberg - - * fixinc/fixfixes.c (machine_name_fix): Don't free 'scratch'. - -2000-01-21 Jakub Jelinek - - * config/sparc/sparc.md (movsi_pic_label_ref): Avoid creating new - pseudos if expanded after first flow. - (movdi_pic_label_ref): Likewise. - -2000-01-20 Richard Henderson - - * jump.c (jump_optimize_1): Don't do addr_vec optimizations at -O0. - -2000-01-20 Zack Weinberg - - * Makefile.in (fixinc.sh): Depend on specs. - * fixinc/Makefile.in: Add rule to create machname.h. - (fixlib.o): Depend on machname.h. - * fixinc/fixtests.c (machine_name): New test. - * fixinc/fixfixes.c (machine_name): New fix. - * fixinc/fixlib.c (mn_get_regexps): New helper function for - the machine_name test and fix. - * fixinc/fixlib.h: Prototype it. - * fixinc/inclhack.def (machine_name): Use the C test and fix. - * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuild. - - * gcc.c (do_spec_1) [case P]: Take care not to create - identifiers with three leading or trailing underscores. - - * fixinc/Makefile.in (FIXINC_DEFS): Add -DIN_GCC. - (fixincl): Don't specify libraries twice on link line. - (gnu-regex.o): Remove special rule. - * fixinc/gnu-regex.c: Define REGEX_MALLOC if C_ALLOCA was - defined by config.h. Do not define _REGEX_RE_COMP. - (regcomp): Allocate and initialize a fastmap. - * fixinc/gnu-regex.h: Do not define _REGEX_RE_COMP. - -2000-01-20 Brad Lucier - - * Makefile.in (predict.o): Depend on $(EXPR_H), not expr.h. - -2000-01-19 Richard Henderson - - * flow.c (propagate_block): Replace FIRST, LAST and BNUM - arguments with BB. Update all callers. Tidy line wrapping. - -2000-01-19 Clinton Popetz - - * emit-rtl.c (try_split): Return last_insn if we split the - last_insn. - -Thu Jan 20 01:01:23 MET 2000 Jan Hubicka - - * i386-protos.h (ix86_compute_frame_size): Remove prototype. - (ix86_initial_elimination_offset): Declare. - * i386.c (ix86_nsaved_regs): Break out from ... - (ix86_can_use_return_insn_p): ... here. - (ix86_emit_save_regs): Break out from ... - (ix86_expand_prologue): ... here. - (ix86_emit_epilogue_esp_adjustment, ix86_emit_restore_regs): Break - out from ... - (ix86_expand_epilogue): ... here. - (ix86_compute_frame_size): Make static, add prototype. - (ix86_initial_elimination_offset): Break out from ... - * i386.h (INITIAL_ELIMINATION_OFFSET): ... here. - -2000-01-19 Kaveh R. Ghazi - - * recog.h (OUT_FCN): Delete. - - * vax.md: Call `get_insn_template' instead of OUT_FCN. - -2000-01-19 Kaveh R. Ghazi - - * cppalloc.c: PROTO -> PARAMS. - * cpperror.c: Likewise. - * cppfiles.c: Likewise. - * cpplib.c: Likewise. - * cpplib.h: Likewise. - - * config/arm/arm-protos.h: PROTO -> PARAMS. - * config/arm/arm.c: Likewise. - * config/c4x/c4x.c: Likewise. - * config/fr30/fr30-protos.h: Likewise. - * config/nextstep.c: Likewise. - * config/pa/pa.c: Likewise. - * config/pj/pj.c: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/v850/v850-protos.h: Likewise. - * config/v850/v850.c: Likewise. - -2000-01-19 Kaveh R. Ghazi - - * i370-protos.h: New file. - - * i370.c: Include tm_p.h. Fix compile time warnings. - - * i370.h: Move prototypes to i370-protos.h. Fix compile time - warnings. - - * i370.md: Likewise. - -2000-01-19 Kaveh R. Ghazi - - * real.c (enan, einan, eiisnan, eiisneg, make_nan): Wrap in NANS. - (target_isinf, target_isnan, eisnan): Mark parameter with - ATTRIBUTE_UNUSED. - (eiisinf): Wrap in INFINITY. - (etoe113, etoe64, etoe53, etoe24): Wrap label `nonorm' in INFINITY. - (ibmtoe): Remove unused variable `rndsav'. - -Wed Jan 19 20:23:06 2000 J"orn Rennecke - - * sh.h (PASS_IN_REG_P): Remove extraneous paranthesis. - (GO_IF_LEGITIMATE_ADDRESS): Added missing tab. - -2000-01-19 Zack Weinberg - - * fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o. - * fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes. - (fix_char_macro_defines, fix_char_macro_uses): New functions. - - * fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp. - Recognize Emacs mode markers also. - * fixinc/fixtests.c (else_endif_label): Fix bug in recognition of - C++ comments in C++ headers. Call is_cxx_header only if - necessary. - - * fixinc/inclhack.def (avoid_bool): Add select for the problem and - bypass for ncurses. - (bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with... - (io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes): - ... these, which use the new C fixes. - (math_exception): Escape literal '+' in bypass expression. - - * fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh: - Regenerate. - -2000-01-19 Geoff Keating - - * rtlanal.c (reg_referenced_p): A CLOBBER of a MEM uses any REGs - inside the MEM. - -2000-01-20 Michael Hayes - - * loop.c (loop_optimize): Allocate loop_info structure for each loop - prior to calling scan_loop. - -Wed Jan 19 19:54:38 2000 J"orn Rennecke - - * sh.c (find_barrier, gen_block_redirect): Fix indentation. - (split_branches, calc_live_regs): Likewise. - -Wed Jan 19 19:12:36 2000 J"orn Rennecke - - * sh.md (fpu_single, fp_mode): New attributes. - -2000-01-20 Michael Hayes - - * loop.c (current_loop_info): Renamed from loop_info_data - and changed to a pointer. - (loop_optimize): Allocate loop_info structure for each loop - and initialize to zero. - (scan_loop): Set current_loop_info. - - * unroll.c (loop_iterations): Don't abort if REG_USERVAR_P set - on iteration_var. - -2000-01-19 Richard Henderson - - * stupid.c: Die die die. - * Makefile.in (OBJS): Remove stupid.o. - (stupid.o): Likewise. - - * except.c (emit_eh_context): Don't emit USEs for stupid. - * explow.c (probe_stack_range): Likewise. - * flags.h (obey_regdecls): Remove. - * flow.c (find_basic_blocks): Don't run try_merge_blocks - when not optimizing. - (life_analysis): Limit data collection when not optimizing. - (mark_regs_live_at_end): Always mark the return value registers. - (mark_used_regs): Remove dummy RETURN case. - (print_rtl_with_bb): Don't consult obey_regdecls. - * function.c (use_variable, use_variable_after): Remove. - (assign_parms): Consult optimize not obey_regdecls. - (expand_function_start): Don't emit USEs for stupid. - (expand_function_end): Likewise. - * global.c (build_insn_chain): Export. - * integrate.c (expand_inline_function): Kill return-value USE - handling code. - * jump.c (jump_optimize_1): Do simple jump optimizations and - dead code elimination. - (calculate_can_reach_end): Remove check_deleted argument. - (delete_insn): Patch out insns even when not optimizing. - * local-alloc.c (block_alloc): Don't do tying when not optimizing. - * rtl.h (use_variable, use_variable_after): Remove declarations. - (build_insn_chain): Declare. - * stmt.c (expand_value_return): Don't emit USEs for stupid. - (expand_end_bindings): Likewise. - (expand_decl): Likewise. Consult optimize not obey_regdecls. - * toplev.c (obey_regdecls): Remove. - (rest_of_compilation): Don't set it. Kill stupid in favor of - flow1, local-alloc, and reload. - (main): Don't set obey_regdecls. - - * config/nextstep.c (handle_pragma): Likewise. - - * alpha/alpha.md (allocate_stack): Don't emit USEs for stupid. - - * arm/arm.h (CONDITIONAL_REGISTER_USAGE): Don't fix reg 0 for stupid. - -2000-01-18 Kaveh R. Ghazi - - * alpha-protos.h: PROTO -> PARAMS. - * alpha.c: Likewise. - * elf.h: Likewise. - * h8300.c: Likewise. - * i386-protos.h: Likewise. - * i386.c: Likewise. - * m32r-protos.h: Likewise. - * m32r.c: Likewise. - * mips.c: Likewise. - * mips.md: Likewise. - * gmon-sol2.c: Likewise. - * sparc.c: Likewise. - -2000-01-18 Kaveh R. Ghazi - - * ns32k-protos.h: New file. - - * ns32k.c: Fix compile time warnings. - - * ns32k.h: Move prototypes to ns32k-protos.h. Fix compile time - warnings. - - * ns32k.md: Likewise. - -2000-01-18 Kaveh R. Ghazi - - * vax-protos.h: New file. - - * vax.c: Fix compile time warnings. - - * vax.h: Move prototypes to vax-protos.h. Fix compile time - warnings. - - * vax.md: Likewise. - - * vaxv.md: Likewise. - -2000-01-18 Kaveh R. Ghazi - - * romp-protos.h: New file. - - * romp.c: Fix compile time warnings. - - * romp.h: Move prototypes to romp-protos.h. Fix compile time - warnings. - - * romp.md: Likewise. - -2000-01-18 Kaveh R. Ghazi - - * we32k-protos.h: New file. - - * we32k.c: Fix compile time warnings. - - * we32k.h: Move prototypes to we32k-protos.h. Fix compile time - warnings. - -2000-01-18 Kaveh R. Ghazi - - * calls.c (emit_call_1): Mark parameter with ATTRIBUTE_UNUSED. - - * except.c (eh_regs): Likewise. - - * final.c (output_operand): Likewise. - - * fold-const.c (target_isinf, target_isnan): Likewise. - -Tue Jan 18 16:19:55 MET 2000 Jan Hubicka - - * i386.h (BIGGEST_ALIGNMENT): Set to 128. - (BIGGEST_FIELD_ALIGNMENT): Set to (TARGET_ALIGN_DOUBLE ? 64 : 32) - - * i386.md (memstr): Do not use rep stosb for counts divisible by 4 - when optimize_size. - (clrstrsi): Rewrite. - (strsethi, strsetqi): New expanders. - (strsethi_1, strsetqi_1, rep_stossi, rep_stosqi): New insn patterns. - (cmpstrsi): Emit compare insn before cmpstrsi_1 - (cmpstrsi_nz): use flags, set type to str, prefix_length to 1. - (strlensi_1): Likewise. - (cmpstrsi_1): Likewise; do not output compare. - (strlen expander): Do not unroll when optimizing for size. - (*subsi3_carry): Rename to subsi3_carry - (addqi3_cc): New pattern. - * i386.h (processor_costs): Add move_ratio field. - (MOVE_RATIO): Use move_ratio field, set to 3 for OPTIMIZE_SIZE - * i386.c (*_cost): Set move_ratio. - (x86_unroll_strlen): Enable for Athlon, PPro and K6 too. - (x86_expand_strlensi_1): Rewrite the main loop. - -2000-01-17 Richard Henderson - - * combine.c (combine_simplify_rtx): Give FLOAT_STORE_FLAG_VALUE a mode. - * cse.c (find_comparison_args, fold_rtx): Likewise. - * integrate.c (subst_constants): Likewise. - * loop.c (get_condition): Likewise. - - * tm.texi (FLOAT_STORE_FLAG_VALUE): Update docs. - - * alpha.h (FLOAT_STORE_FLAG_VALUE): Use REAL_VALUE_ATOF. - -2000-01-18 Martin v. Löwis - - * c-parse.in (SAVE_WARN_FLAGS): Create an INTEGER_CST. - (RESTORE_WARN_FLAGS): Unpack it. - Change semantic type of extension to ttype. - * c-common.c (split_specs_attrs): Expect an INTEGER_CST. - * c-parse.y, c-parse.c, objc/objc-parse.y, - objc/objc-parse.c: Regenerate. - -2000-01-17 Zack Weinberg - - * fixinc/fixlib.c: Add copyright notice. - (compile_re): New function. - * fixinc/fixlib.h: Prototype compile_re. - - * fixinc/fixfixes.c, fixinc/fixtests.c, fixinc/fixincl.c: - Use compile_re to compile regular expressions. - - * fixinc/fixincl.c (egrep_test): Don't bother asking regexec - where the pattern matched. - - * fixinc/inclhack.def (sun_memcpy): Move to AAB_sun_memcpy, - use 'replace'. - (ultrix_ansi_compat): Likewise. - (interactv_add1): Rename to 'isc_omits_with_stdc', remove shell test, - add egrep test. - (interactv_add2, interactv_add3): Delete. - (x11_sprintf): Don't use filename glob. - * fixinc/fixincl.x, fixinc/inclhack.sh, fixinc/fixincl.sh: - Regenerate. - -2000-01-17 Kaveh R. Ghazi - - * print-rtl.c: PROTO -> PARAMS. - * real.c: Likewise. - * reg-stack.c: Likewise. - * resource.c: Likewise. - * sdbout.h: Likewise. - * simplify-rtx.c: Likewise. - * stor-layout.c: Likewise. - * stupid.c: Likewise. - * xcoffout.c: Likewise. - * xcoffout.h: Likewise. - -2000-01-17 Kaveh R. Ghazi - - * toplev.c: PROTO -> PARAMS. - * toplev.h: Likewise. - * tree.c: Likewise. - * tree.h: Likewise. - * unroll.c: Likewise. - * varasm.c: Likewise. - * varray.c: Likewise. - * varray.h: Likewise. - -2000-01-17 Kaveh R. Ghazi - - * reload.c: PROTO -> PARAMS. - * reload.h: Likewise. - * reload1.c: Likewise. - * reorg.c: Likewise. - * resource.h: Likewise. - * rtl.c: Likewise. - * rtl.h: Likewise. - * rtlanal.c: Likewise. - * sbitmap.h: Likewise. - * sdbout.c: Likewise. - * stack.h: Likewise. - * stmt.c: Likewise. - * system.h: Likewise. - -2000-01-17 Kaveh R. Ghazi - - * machmode.h: PROTO -> PARAMS. - * mbchar.h: Likewise. - * mips-tdump.c: Likewise. - * mips-tfile.c: Likewise. - * optabs.c: Likewise. - * output.h: Likewise. - * prefix.c: Likewise. - * profile.c: Likewise. - * protoize.c: Likewise. - * real.h: Likewise. - * recog.c: Likewise. - * recog.h: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * regs.h: Likewise. - -2000-01-17 Kaveh R. Ghazi - - * ggc-common.c: PROTO -> PARAMS. - * ggc-page.c: Likewise. - * ggc-simple.c: Likewise. - * ggc.h: Likewise. - * global.c: Likewise. - * graph.c: Likewise. - * gthr-win32.h: Likewise. - * haifa-sched.c: Likewise. - * halfpic.h: Likewise. - * integrate.c: Likewise. - * integrate.h: Likewise. - * jump.c: Likewise. - * lcm.c: Likewise. - * local-alloc.c: Likewise. - * loop.c: Likewise. - * loop.h: Likewise. - -2000-01-17 Kaveh R. Ghazi - - * genattr.c: PROTO -> PARAMS. - * genattrtab.c: Likewise. - * gencheck.c: Likewise. - * gencodes.c: Likewise. - * genconfig.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * genflags.c: Likewise. - * gengenrtl.c: Likewise. - * genopinit.c: Likewise. - * genoutput.c: Likewise. - * genpeep.c: Likewise. - * genrecog.c: Likewise. - -2000-01-16 Mark Mitchell - - * tree.h (BINFO_VPTR_FIELD): Augment documentation. - -2000-01-16 Alexandre Oliva - - * aclocal.m4 (AC_FUNC_MMAP_ZERO): New macro. - * configure.in (AC_FUNC_MMAP_ZERO): Use instead of AC_FUNC_MMAP. - * ggc-page.c: Replace HAVE_MMAP with HAVE_MMAP_ZERO. - * configure, config.in: Rebuilt. - -2000-01-16 Zack Weinberg - - * config/i386/i386.md: Add peephole to merge successive stack - adjusts. - -Sat Jan 15 15:41:14 EST 2000 John Wehle (john@feith.com) - - * gcse.c (insert_insn_end_bb): Use emit_block_insn_before - instead of emit_insn_before. Also handle NOTE_INSN_BASIC_BLOCK - when walking backwards to find all the parameter loads when - the basic block ends in a call. - -2000-01-15 Michael Hayes - - * loop.c (this_loop_info): Delete. - (uid_loop): Add in place of uid_loop_num. All uses updated. - (loop_number_exit_count): Delete and replace with entry in loop - structure. All uses updated. - (loop_number_loop_starts, loop_number_loop_ends): Likewise. - (loop_number_loop_cont, loop_number_cont_dominator): Likewise. - (loop_outer_loop): Likewise. - (loop_invalid, loop_number_exit_labels): Likewise. - (loop_used_count_register): Delete and replace with entry in - loop_info structure. - (find_and_verify_loops): Add loops argument. - (verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start, - loop_end, etc. arguments with loop structure pointer. All callers - changed. - (loop_reg_used_before_p, scan_loop, strength_reduce): Likewise. - (check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise. - (load_mems_and_recount_loop_regs_set, load_mems): Likewise. - (insert_bct): Likewise. - (basic_induction_var): New argument level. - * loop.h (struct loop_info): Delete fields num, loops_enclosed, - vtop, and cont. Add used_count_register. - (uid_loop): Delete declaration. - (loop_number_exit_count): Likewise. - (loop_number_loop_starts, loop_number_loop_ends): Likewise. - (loop_number_loop_cont, loop_number_cont_dominator): Likewise. - (loop_outer_loop, loop_used_count_register): Likewise. - (loop_invalid, loop_number_exit_labels): Likewise. - (unroll_loop): Replace loop_start and loop_end arguments - with loop structure pointer. - (loop_precondition_p, loop_iterations): Likewise. - Include basic-block.h. - * unroll.c: (unroll_loop): Replace loop_start and loop_end arguments - with loop structure pointer. - (loop_precondition_p, loop_iterations): Likewise. - * basic-block.h (struct loop): New entries vtop, cont, - cont_dominator, start, end, top, scan_start, exit_labels, - exit_count. - * Makefile.in (LOOP_H): Add basic-block.h to dependencies. - -2000-01-15 Gerald Pfeifer - - * defaults.h (ASM_OUTPUT_ASCII): Use ISDIGIT. - -2000-01-14 Nathan Sidwell - - * config.in: Rebuilt for 2000-01-13 change to acconfig.h. - -2000-01-14 Kaveh R. Ghazi - - * pdp11-protos.h: New file. - - * pdp11.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * pdp11.h: Move prototypes to pdp11-protos.h. Fix compile time - warnings. - - * pdp11.md: Likewise. - - * 2bsd.h: Likewise. - -2000-01-14 Kaveh R. Ghazi - - * mn10300-protos.h: New file. - - * mn10300.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * mn10300.h: Move prototypes to mn10300-protos.h. Fix compile time - warnings. - - * mn10300.md: Likewise. - -2000-01-14 Kaveh R. Ghazi - - * mn10200-protos.h: New file. - - * mn10200.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * mn10200.h: Move prototypes to mn10200-protos.h. Fix compile time - warnings. - - * mn10200.md: Likewise. - -2000-01-14 Kaveh R. Ghazi - - * h8300-protos.h: New file. - - * h8300.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * h8300.h: Move prototypes to h8300-protos.h. Fix compile time - warnings. - - * h8300.md: Likewise. - -2000-01-14 Kaveh R. Ghazi - - * varasm.c (asm_output_bss): Mark parameters with ATTRIBUTE_UNUSED. - (asm_emit_uninitialised): Likewise. - -2000-01-13 Gavin Romig-Koch - - * config/mips/mips.h (ISA_HAS_INT_CONDMOVE): New. - * config/mips/mips.md: Use ISA_HAS_INT_CONDMOVE. - -2000-01-14 Clinton Popetz - - * config/mips/mips.c (override_options): Don't turn on extra - alignment for mips16. - -2000-01-14 Clinton Popetz - - * config/mips/mips.c (mips_va_arg): Fix fprv for the 32 bit - eabi, and make sure queued POSTINCREMENT rtl is emitted at - the right point. - -2000-01-14 Clinton Popetz - - * builtins.c (PAD_VARARGS_DOWN): Define. - (std_expand_builtin_va_arg): Use the above macro. - * config/mips/mips.h (PAD_VARARGS_DOWN): Define. - * tm.texi (Register Arguments): Document the above macro. - -2000-01-14 Nick Clifton - - * emit-rtl.c (emit_insn): If checking is enabled, make sure - that this function has not been used to emit a jump - instruction. - - * jump.c (return_jump_1): Cope with being passed a null rtx. - -2000-01-14 Kaveh R. Ghazi - - * eh-common.h: PROTO -> PARAMS. - * emit-rtl.c: Likewise. - * errors.c: Likewise. - * errors.h: Likewise. - * except.c: Likewise. - * except.h: Likewise. - * explow.c: Likewise. - * expmed.c: Likewise. - * expr.c: Likewise. - * expr.h: Likewise. - * final.c: Likewise. - * fix-header.c: 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. - -2000-01-14 Kaveh R. Ghazi - - * sh-protos.h: New file. - - * sh.c: Include insn-config.h, toplev.h, recog.h and tm_p.h. - Add static prototypes. Fix compile time warnings. - - * sh.h: Move prototypes to sh-protos.h. Fix compile time warnings. - * sh.md: Likewise. - * elf.h: Likewise. - -2000-01-14 Kaveh R. Ghazi - - * arc-protos.h: New file. - - * arc.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * arc.h: Move prototypes to arc-protos.h. Fix compile time - warnings. - - * arc.md: Likewise. - -2000-01-14 Kaveh R. Ghazi - - * dsp16xx-protos.h: New file. - - * dsp16xx.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * dsp16xx.h: Move prototypes to dsp16xx-protos.h. Fix compile time - warnings. - - * dsp16xx.md: Likewise. - -2000-01-14 Kaveh R. Ghazi - - * convex-protos.h: New file. - - * convex.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * convex.h: Move prototypes to convex-protos.h. Fix compile time - warnings. - -2000-01-14 Kaveh R. Ghazi - - * elxsi-protos.h: New file. - - * elxsi.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * elxsi.h: Move prototypes to elxsi-protos.h. Fix compile time - warnings. - - * elxsi.md: Likewise. - -2000-01-14 Clinton Popetz - - * config/mips/mips.h (REGISTER_MOVE_COST): Remove redundant - case for moving from HI/LO/HI_LO_REG. This makes the behavior - match the comment for MIPS16. - -Fri Jan 14 00:28:06 2000 Jeffrey A Law (law@cygnus.com) - - * flow.c (split_edge): Do not call set_block_for_insn if we - do not have a basic_block_for_insn structure. - - * fr30.h (TRAMPOLINE_TEMPLATE): Use nops to ensure the static chain - and destination functions are 32bit aligned within the trampoline. - (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Corresponding changes. - (TRAMPOLINE_ALIGNMENT): Define. - - * cse.c (cse_insn): When changing (set (pc) (reg)) to - (set (pc) (label_ref)), verify the change creates a valid insn. - - * fr30.c (call_operand): Tighten and rework to match rules for - call RTL expressions. - * fr30.h (PREDICATE_CODES, case call_operand): Only allow MEMs. - * fr30.md (call patterns): Improve constraints. - -Thu Jan 13 23:44:03 2000 Richard Henderson - - * fr30.c (fr30_expand_epilogue): Revert last change. - Use emit_jump_insn for the return insn. - -Thu Jan 13 14:46:03 2000 Jason Eckhardt - Stan Cox - - * predict.c: New file. Preliminary infrastructure work for static - branch prediction and basic block reordering. - * basic-block.h: Add prototype for estimate_probability. - * Makefile.in: Add rules for predict.o. - -2000-01-13 Jason Merrill - - * fixincludes (va_list): Use __not_va_list__ for the dummy. - * fixinc/*: Likewise. - -2000-01-13 Kaveh R. Ghazi - - * cccp.c: PROTO -> PARAMS. - * cexp.y: Likewise. - * collect2.c: Likewise. - * combine.c: Likewise. - * convert.h: Likewise. - * cse.c: Likewise. - * dbxout.c: Likewise. - * dbxout.h: Likewise. - * diagnostic.c: Likewise. - * doprint.c: Likewise. - * dwarf2out.c: Likewise. - * dwarf2out.h: Likewise. - * dwarfout.c: Likewise. - * dwarfout.h: Likewise. - * dyn-string.h: Likewise. - -2000-01-13 Kaveh R. Ghazi - - * calls.c (emit_call_1): Wrap varaible `struct_value_size_rtx' in - macro conditionals guarding use. - - * dwarf2out.c: Include "tm_p.h". - - * function.c (locate_and_pad_parm): Mark parameter with - ATTRIBUTE_UNUSED. - (expand_function_end): Likewise for variable `context'. - - * reorg.c (make_return_insns): Wrap prototype in macro HAVE_return. - -2000-01-13 Nick Clifton - - * config/fr30/fr30.c (fr30_expand_epilogue): Emit USEs of pop'ed - register to prevent compile time warnings. - -2000-01-13 Zack Weinberg - - * longlong.h [i386] (udiv_qrnnd): Rename 'd' argument to 'dv' - to avoid -Wtraditional warning. - -2000-01-13 Kaveh R. Ghazi - - * 1750a-protos.h: New file. - - * 1750a.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * 1750a.h: Move prototypes to 1750a-protos.h. Fix compile time - warnings. - - * 1750a.md: Likewise. - -2000-01-13 Kaveh R. Ghazi - - * a29k-protos.h: New file. - - * a29k.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * a29k.h: Move prototypes to a29k-protos.h. Fix compile time - warnings. - -2000-01-13 Kaveh R. Ghazi - - * clipper-protos.h: New file. - - * clipper.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * clipper.h: Move prototypes to clipper-protos.h. Fix compile time - warnings. - -Thu Jan 13 16:03:06 2000 J"orn Rennecke - - * reload1.c (reload_combine_note_store): Use HARD_REGNO_NREGS. - -2000-01-13 Nathan Sidwell - - * configure.in (--enable-new-gxx-abi): New option. - * acconfig.h (ENABLE_NEW_GXX_ABI): New define. - * Makefile.in (GXX_ABI_FLAG): New variable. - * configure: Regenerate. - -2000-01-13 Michael Hayes - - * stor-layout.c (layout_type): Use FORCE_STRUCT_BLK. - * tm.texi (FORCE_STRUCT_BLK): Document. - * config/c4x/c4x.h (FORCE_STRUCT_BLK): New macro. - -Wed Jan 12 23:12:47 2000 Hans-Peter Nilsson - - * config/ns32k/ns32k.md: Revert Jan 9 change. - - * genrecog.c (maybe_both_true_2): Do not compare a predicate-test - to a mode-test, if the predicate is address_operand. - -Wed Jan 12 22:34:00 2000 Jeffrey A Law (law@cygnus.com) - - * combine.c (if_then_else_cond): Be careful about what kinds - of RTL expressions are passed to operand_subword. - - * flow.c (split_edge): If we have to insert a new jump, make - sure to associate it with a basic block. - - * flow.c (commit_one_edge_insertion): A block with one successor - can end in a JUMP_INSN that is not a simplejump. - -2000-01-12 Robert Lipe - - * i386/sco5.h (INIT_SECTION_ASM_OP_COFF): Rename section to "ctor". - (BUILD_VA_LIST_TYPE): Define. - (EH_FRAME_SECTION_ASM_OP): Explictly define to better interact - with crtstuff.c. - -2000-01-12 Jason Merrill - - * cccp.c (do_pragma): Add cast to (char *). - -2000-01-12 Richard Henderson - Fred Fish - Jason Merrill - - * configure.in (i?86-*-beos{pe,elf,}*): Recognize. - * i386/t-beos, i386/x-beos, i386/xm-beos.h: New files. - * i386/beos-elf.h, i386/beos-pe.h: New files. - - * Makefile.in (CROSS_SYSTEM_HEADER_DIR): New. - * cross-make (SYSTEM_HEADER_DIR): Define using - CROSS_SYSTEM_HEADER_DIR. - - * gcc.c (LIBRARY_PATH_ENV): Provide default. - (process_command): Use it. - (main): Likewise. Kill trailing = from env vars. - (build_search_list): Put it back. - * collect2.c (main): Use LIBRARY_PATH_ENV. - - * configure.in (GCC_NEED_DECLARATIONS): Add environ. - * toplev.c: Use NEED_DECLARATION_ENVIRON. - - * tm.texi (Frame Layout): Document SMALL_STACK. - * c-common.c (c_common_nodes_and_builtins): Check it. - - * system.h: Undef alloca after including glibc's , - if USE_C_ALLOCA is defined. - - * gcc.c (set_input): New fn. - (main): After all input files are compiled, reset the input file - info to the first. - - * aclocal.m4 (rindex, index): If already defined, don't attempt - to redefine. - - * ginclude/varargs.h: (__va_list__): Define ifndef. - * ginclude/stdarg.h: Likewise. - - * ginclude/stddef.h (__WCHAR_TYPE__) [BEOS]: Use int - instead of unsigned char. - - * hash.h (true, false, boolean): Undef before enum. - - * expmed.c (choose_multiplier): Cast &mhigh_lo and &mhigh_hi to be - proper type of "HOST_WIDE_INT *", rather than their natural type of - "unsigned HOST_WIDE_INT *". - -2000-01-12 Kaveh R. Ghazi - - * svr3.h (ASM_FILE_START): Wrap if-clause in squigly brackets. - - * recog.c (memory_address_p): Mark parameter with ATTRIBUTE_UNUSED. - - * regclass.c (choose_hard_reg_mode): Likewise. - - * reload.c (find_valid_class, strict_memory_address_p): Likewise. - - * reorg.c (optimize_skip): Wrap prototype in macro conditionals. - -2000-01-12 Kaveh R. Ghazi - - * c-common.c: PROTO -> PARAMS. - * c-common.h: Likewise. - * c-decl.c: Likewise. - * c-iterate.c: Likewise. - * c-lang.c: Likewise. - * c-lex.c: Likewise. - * c-lex.h: Likewise. - * c-parse.in: Likewise. - * c-pragma.c: Likewise. - * c-pragma.h: Likewise. - * c-tree.h: Likewise. - * c-typeck.c: Likewise. - * objc/objc-act.c: Likewise. - * objc/objc-act.h: Likewise. - -2000-01-12 Kaveh R. Ghazi - - * m88k-protos.h: New file. - - * m88k.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * m88k.h: Move prototypes to m88k-protos.h. Fix compile time warnings. - - * m88k.md: Likewise. - - * tekXD88.h: Likewise. - -2000-01-12 Kaveh R. Ghazi - - * m68k-protos.h: New file. - - * m68k.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * m68k.h: Move prototypes to m68k-protos.h. Fix compile time warnings. - - * mot3300.h: Likewise. - -2000-01-12 Richard Earnshaw - - * haifa-sched.c (split_edges): Pass edgeset_size as second arg to - extract_bitlst. - (extract_bitlist): Declare bitlen. - -2000-01-12 Zack Weinberg - - * i386/sysv5.h (CPP_SPEC, LIBSPEC): Add -pthreadT. - -2000-01-12 Bernd Schmidt - - * reload1.c (reload_reg_unavailable): New static variable. - (reload_reg_free_p): Test it. - (reload_reg_free_for_value_p): Test it instead of - reload_reg_used. - (choose_reload_regs_init): Compute it. - -Wed Jan 12 03:24:41 2000 Toshiyasu Morita (toshi.morita@sega.com) - - * reorg.c (fill_slots_from_thread): Check modified_in_p - before replacing. - -Wed Jan 12 03:20:31 2000 John Marshall - - * gcc.texi (Funding, GNU/Linux, Copying, Contributors): Format - these nodes even if INTERNALS is not set. - -Wed Jan 12 09:39:22 2000 Nick Burrett - - * gcse.c (delete_null_pointer_checks_1): Cope when - get_condition cannot determine the condition. - -2000-01-12 Gabriel Dos Reis - - * toplev.h (set_message_length): Declare. - - * diagnostic.c (obstack_chunk_alloc): Define macro. - (obstack_chunk_free): Likewise. - (struct output_buffer): New data structure. - (vmessage): Remove. - (output_maximum_width): New variable. - (doing_line_wrapping, set_message_length, init_output_buffer, - get_output_prefix, output_space_left, emit_output_prefix, - output_newline, output_append, output_puts, dump_output, - vbuild_message_string, build_message_string, build_location_prefix, - voutput_notice, output_printf, line_wrapper_printf, - vline_wrapper_message_with_location): New functions. Implement - automatic line wrapping. - (v_message_with_decl): Make it handle automatic line wrapping. - (v_error_with_file_and_line): Likewise. - (v_warning_with_file_and_line): Likewise. - (announce_function): Likewise. - (default_print_error_function): Likewise. - -2000-01-11 16:24 -0800 Zack Weinberg - - * cpplib.h (struct cpp_options): Change lang_asm to char. - Add lang_fortran. - * cppinit.c (builtin_array): Take out __STDC_VERSION__, it's - done in cpp_handle_option now. - (initialize_builtins): Take out special case code used only by - __STDC_VERSION__. - (cpp_handle_option): Turn off trigraphs and trigraph warnings - if -traditional. Recognize -lang-fortran and set - lang_fortran, also turn off cplusplus_comments. - (print_help): Document -lang-fortran. - * cpplib.c (handle_directive): Ignore `# 123 "file"' if - lang_asm. Ignore all directives other than `# 123 "file"' if - CPP_PREPROCESSED. - (cpp_get_token): If -traditional, don't recognize directives - unless the # is in column 1. - (parse_string): If lang_fortran or lang_asm, silently - terminate strings ('' or "") at end of line. - Remove unnecessary braces. - -2000-01-11 Alexandre Oliva - Richard Henderson - - * resource.c (mark_referenced_resources): Mark a set strict_low_part - as used. - * config/i386/i386.c (ix86_expand_setcc): Re-enable clear + set - strict_low_part when possible. - -2000-01-11 Kaveh R. Ghazi - - * alias.c: PROTO -> PARAMS. - * basic-block.h: Likewise. - * bitmap.c: Likewise. - * bitmap.h: Likewise. - * builtins.c: Likewise. - * c-aux-info.c: Likewise. - * caller-save.c: Likewise. - * calls.c: Likewise. - -2000-01-11 Kaveh R. Ghazi - - * Makefile.in (toplev.o): Depend on regs.h. - - * output.h (tdesc_section): Prototype. - - * regclass.c (copy_cost): Mark parameters with ATTRIBUTE_UNUSED. - - * sdbout.c: Include "tm_p.h". - - * toplev.c: Include "regs.h". - -Tue Jan 11 11:37:58 2000 Mike Stump - - * unroll.c (unroll_loop): Add EH support. - -2000-01-11 Kaveh R. Ghazi - - * pa-protos.h: New file. - - * pa.c: Include recog.h and tm_p.h. - (compute_zdepwi_operands, compute_movstrsi_length, - remove_useless_addtr_insns, store_reg, load_reg, set_reg_plus_d, - find_addr_reg, import_milli): Add static prototypes. - (pa_cpu_string, pa_arch_string): Constify a char*. - (legitimize_pic_address): Pass argument `mode' to pic_label_operand. - (read_only_operand): Add argument `mode'. - (singlemove_string, output_move_double, output_fp_move_double, - output_block_move, output_and, output_ior, output_ascii, - remove_useless_addtr_insns, milli_names, output_mul_insn, - output_div_insn, output_mod_insn, output_arg_descriptor, - output_cbranch, output_bb, output_bvb, output_dbra, , - output_millicode_call, output_call, hppa_encode_label, - output_parallel_movb, output_parallel_addb): Constify a char*. - (hppa_va_start): Mark parameter `stdarg_p' with ATTRIBUTE_UNUSED. - (output_parallel_addb): Remove extra arg to `constrain_operands' - - * pa.h: Move all prototypes to pa-protos.h. - (pa_cpu_string, pa_arch_string): Constify a char*. - (LEGITIMIZE_ADDRESS): Call `symbolic_operand' with mode argument. - - * pa.md: Call `function_label_operand' with mode argument. - Likewise for `read_only_operand'. - Fix nesting of parens in call to `symbolic_operand'. - -2000-01-11 Kaveh R. Ghazi - - * i860-protos.h: New file. - - * i860.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * i860.h: Move prototypes to i860-protos.h. Fix compile time warnings. - - * i860.md: Likewise. - -Tue Jan 11 18:59:35 MET 2000 Jan Hubicka - - * i386.md (movstrsi expander): Rewrite. - (movstrsi_1 insn): Deleted. - (strmovhi, strmovqi expander): New expanders. - (movshi_1, movsqi_1, rep_movsi, rep_movqi): New patterns. - * i386.c (x86_single_stringop): New global variable. - * i386.h (x86_single_stringop): Declare. - (TARGET_SINGLE_STRINGOP): New macro. - -2000-01-11 Clinton Popetz - - * config/mips/mips.c (mips_va_arg): For EABI, emit the queued - integer vararg POSTINCREMENT before the destination of the jump - for the hard fp case. - (function_arg_pass_by_reference): Pass a copy of CUM to - FUNCTION_ARG. - - * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Move check - for CONSTANT_ADDRESS_P above while loop for subreg. - -2000-01-11 Clinton Popetz - - * flow.c (propagate_block): When a prologue/epilogue insn - is marked dead, unconditionally clear libcall_is_dead and - insn_is_dead, and only dump rtl if warnings aren't being - suppressed. - -Tue Jan 11 16:26:47 MET 2000 Jan Hubicka - - * i386.c (ix86_attr_length_default): Handle TYPE_STR and TYPE_CLD. - * i386.md (FIRST_PSEUDO_REGISTER): Set to 20. - (FIXED_REGISTERS): Set dirflag as fixed. - (CALL_USED_REGISTERS): Set dirflag as used. - (REG_ALLOC_ORDER): Set dirflag as last one. - (DIRFLAG_REG): New macro. - (MD_ASM_CLOBBERS): Asm clobber dirflag for backward compatibility. - (HI_REGISTER_NAMES): Add dirflag. - (DEBUF_PRINT_REG): Handle dirflag. - * i386.md (type attribute): New cld and str types. - (length_opcode attribute): Set cld and str to 1. - (memory attribute): Set str to unknown - it is not clear from the - patterns. - (pent_np function unit): Prefixed string operations takes 12 cycles - minimally; cld takes 2 cycles. - (ppro_uops attribute): Str is "many" and cld is "few". - (ppro_p0 unit): Handle cld here. - (k6_alux unit): Handle cld and str types. - (k6_load unit): It is ocupied by str opcodes. - (k6_store unit): It is ocupied by str opcodes. - (athlon_decode): Str is vector decoded. - (athlon_ieu): Handle str and cld. - (cld pattern): New. - (movstrsi, clrstr, cmpstr, strlen expander): Emit cld instruction - (movstrsi_1, clrstrsi_1, cmpstrsi_1, strlensi_1, - cmpstrsi_nz_1 insn): Do not output cld instruction - -Tue Jan 11 06:14:39 2000 David Starner - - * gcc.texi (G++ and GCC): Add Java and Chill. - (Bug Critera): Don't list languages. - - * gcc.texi (Incompatibilities): No longer claim most C compilers - are K&R. - - * gcc.texi (G++ and GCC): Update other front-ends list. - -Tue Jan 11 05:49:01 2000 Jeffrey A Law (law@cygnus.com) - - * i386.c (ix86_expand_setcc): Fix typo. - (ix86_expand_movcc): Similarly. - - * Band-aid until haifa's bitset implementation is nuked. - * haifa-sched.c (extract_bitlst): New parameter for size of the - bitset in bits. All callers changed. Avoid looking at undefined - bits in the bitset. - (edgeset_bitsize): New variable. - (schedule_region): Initialize edgeset_bitsize. - -2000-01-10 Kaveh R. Ghazi - - * Makefile.in (optabs.o): Depend on real.h - (resource.o): Depend on insn-attr.h - - * builtins.c (result_vector): Wrap prototype in macro conditions - governing definition and use. - - * c-common.c: Include tm_p.h. - - * c-lex.c: Likewise. - - * elfos.h: Constify a char*. - - * final.c (align_fuzz): Wrap prototype in macro HAVE_ATTR_length. - (get_attr_length, shorten_branches, profile_after_prologue): Mark - parameter with ATTRIBUTE_UNUSED. - - * fold-const.c (exact_real_inverse): Wrap variable `i' in - CHECK_FLOAT_VALUE. - - * haifa-sched.c (schedule_insns): Mark parameter with - ATTRIBUTE_UNUSED. - - * optabs.c: Include real.h. - - * real.h (ereal_atof): Add prototype arguments. - - * resource.c: Include insn-attr.h. - - * sdbout.c (sdbout_queue_anonymous_type, - sdbout_dequeue_anonymous_types): Wrap in macro - SDB_ALLOW_FORWARD_REFERENCES. - (sdbout_init, sdbout_start_new_source_file): Mark parameter with - ATTRIBUTE_UNUSED. - - * stmt.c (expand_return): Wrap variable `op0' in macro HAVE_return. - - * stupid.c: Include tm_p.h. - - * tree.c (real_value_from_int_cst): Mark parameter with - ATTRIBUTE_UNUSED. - -2000-01-10 Kaveh R. Ghazi - - * i960-protos.h: New file. - - * i960.c: Include tm_p.h. Add static prototypes. Fix compile - time warnings. - - * i960.h: Move prototypes to i960-protos.h. Fix compile time warnings. - -2000-01-10 Alexandre Oliva - - * combine.c (expand_field_assignment): Do not discard SUBREGs - while computing nonzero_bits. - -2000-01-09 Nick Clifton - - * config/arm/arm.c: Fix compile time warnings about signed vs - unsigned constants. - * config/arm/arm.h: Fix compile time warnings about signed vs - unsigned constants. - -2000-01-09 Philip Blundell - - * config/arm/arm.c (output_return_instruction): Use `ldr' rather - than `ldm' with only one register. - * config/arm/arm.md (push_multi): Use `str' rather than `stm' with - only one register. - - * config/arm/linux-gas.h (CLEAR_INSN_CACHE): Say that R0 is - clobbered. - -Sun Jan 9 17:50:23 2000 Hans-Peter Nilsson - - * config/ns32k/ns32k.md (load or push effective address): Operand 1 - must have SImode. - -2000-01-09 Kaveh R. Ghazi - - * elfos.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around - assignment used as truth value. - - * function.c (assign_temp): Mark parameter `dont_promote' with - ATTRIBUTE_UNUSED. Wrap variable `unsignedp' with macro - PROMOTE_FOR_CALL_ONLY. - - * genrecog.c (write_subroutine): Mark variable `operands' with - ATTRIBUTE_UNUSED. - - * optabs.c (prepare_cmp_insn): Mark parameter `align' with - ATTRIBUTE_UNUSED. - - * sdbout.c (sdbout_init): Likewise for parameter `asm_file'. - (sdbout_begin_block, sdbout_end_block): Likewise for `file'. - - * toplev.c (note_deferral_of_defined_inline_function): Likewise - for `decl'. - -2000-01-09 Michael Hayes - - * config/c4x.h: Tidy up comments. - * config/c4x.c: Likewise. - -Sun Jan 9 01:02:55 EST 2000 John Wehle (john@feith.com) - - * fold-const.c (lshift_double, rshift_double): Handle - shifting by 2 * HOST_BITS_PER_WIDE_INT correctly. - -2000-01-08 Alexandre Oliva - - * toplev.c (rest_of_compilation): Initialize cse_not_expected as - in prepare_function_start(). - -Sat Jan 8 12:12:46 2000 Nick Clifton - - * config/v850/v850.c (expand_epilogue): Interrupt functions no - longer allocate extra stack for function calls. - -2000-01-08 Michael Hayes - - * config/c4x/c4x.md (*subqf3_set): Fix typo. - -2000-01-08 Michael Hayes - - * config/c4x/c4x.h (CALLER_SAVE_PROFITABLE): Define as 0. - -2000-01-07 David Edelsohn - - * rs6000.c (processor_target_table): Add power3 as alias for 630. - * aix43.h: Revert Aug 2 change. - (HAS_INIT_SECTION): Define, not visible yet. - (LD_INIT_SWITCH): Define, not visible yet. - * t-aix43 (MULTILIB_OPTIONS): Revert Aug 2 change. - - * glimits.h (__LONG_MAX__): Recognize 64-bit AIX too. - - * collect2.c (main): Expand ld2 size further. - (export_object_lst): Cast assignment to avoid warning. - (main, LD_INIT_SWITCH): Add AIX 4.2+ -binitfini support. - (scan_prog_file, COFF): Do not collect initialization or - finalization functions generated for entire shared object if - init/fini support present. - -2000-01-07 Nick Clifton - - * config/elfos.h: Tidy up formatting of marcos. Make sure - that .section directives are always prefixed by a tab. - - * config/svr4.h: Add #include "elfos.h" and remove duplicate - definitions. - -2000-01-07 Matt Austern - - * fold-const.c (real_hex_to_f): Remove duplicate declaration of - expon. - -Fri Jan 7 01:55:34 2000 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (crtend.o): Pass @inhibit_libc@ to compilation of - crtstuff.c. - (crtbegin.o, s-crtS): Likewise. - -2000-01-06 Richard Henderson - - * alpha.md (adddi_2+1): Limit offset such that it will be - loadable with a single ldah+lda pair. - (adddi_2+2): Explicitly fail split if we can't make it work. - -2000-01-06 Mumit Khan - - * protoize.c: Conditionally include unistd.h. - (IS_SAME_PATH_CHAR): New macro. - (IS_SAME_PATH): New macro. - (CPLUS_FILE_SUFFIX): New macro. - (cplus_suffix): New static variable. - (is_abspath): New static function. - (in_system_include_dir): Handle DOS style pathnames. - (file_could_be_converted): Likewise. - (file_normally_convertible): Likewise. - (directory_specified_p): Likewise. - (file_excluded_p): Likewise. - (abspath): Likewise. - (shortpath): Likewise. - (referenced_file_is_newer): Likewise. - (save_def_or_dec): Likewise. - (do_processing): Likewise. - (main): Likewise. - (edit_file): Likewise. Use rename instead of link. - (rename_c_file): Likewise. Don't rename syscalls file. - (munge_compile_params): Define null device for DOS based systems. - (process_aux_info_file): Use binary mode if appliable. - (edit_file): Likewise. - * invoke.texi (Running Protoize): Document C++ suffixes used. - - * cccp.c: Delete PATH_SEPARATOR, DIR_SEPARATOR and - IS_DIR_SEPARATOR macros. - * collect2.c: Likewise. - * cppinit.c: Likewise. - * dwarf2out.c: Likewise. - * gcc.c: Likewise. - * gcov.c: Likewise. - * prefix.c: Likewise. - * rtl.c: Likewise. - * toplev.c: Likewise. - * system.h: And move to here. - - * prefix.c (update_path): Fix typo in variable name. - -2000-01-06 Richard Henderson - - * flow.c (mark_set_1): Use loop_depth+1 as reference weight. - (find_auto_inc, mark_used_regs, try_pre_increment_1): Likewise. - (count_reg_sets_1, count_reg_references): Likewise. - (flow_loops_level_compute): Start counting actual loop depth at 1. - (flow_loops_find): Likewise. - * local-alloc.c (update_equiv_regs): Likewise. - * regclass.c (regclass): Re-instate Jan 4 0-based loop_depth change. - -2000-01-06 Gabriel Dos Reis - - * defaults.h (DWARF_FRAME_REGISTERS): if not defined, default to - FIRST_PSEUDO_REGISTER - * dwarf2out.c: Don't include frame.h - * dwarfout.c: Likewise - * Makefile.in (dwarfout.o, dwarf2out.o): Remove dependence on - frame.h - -Thu Jan 6 13:44:59 CET 2000 Jan Hubicka - - * reg-stack.c (subst_stack_regs_pat): Handle correctly USEs of - dead registers. - - * i386.c (movsf splitter): Fix typo in my last checkin. - -2000-01-05 Nick Clifton - - * varasm.c (IN_NAMED_SECTION): Allow targets to provide their - own definition of this macro. - (asm_emit_uninitialised): Invoke UNIQUE_SECTION if either - flag_data_sections or UNIQUE_SECTION_P are true. - - * tm.texi (UNIQUE_SECTION): Document that it can be called for - uninitialized data decls. - - * config/i386/winnt.c (i386_pe_unique_section): Cope with - being called for uninitialized data. - - * config/i386/interix.c (i386_pe_unique_section): Cope with - being called for uninitialized data. - - * config/mips/elf.h (UNIQUE_SECTION): Cope with being called - for uninitialized data. - - * config/mips/elf64.h (UNIQUE_SECTION): Cope with being called - for uninitialized data. - - * config/mips/iri6gld.h (UNIQUE_SECTION): Cope with being called - for uninitialized data. - - * config/arm/unknown-elf.h (IN_NAMED_SECTION): Define. - (UNIQUE_SECTION_P): Always generate a unique section if - flag_data_sections is true. - (UNIQUE_SECTION): Also generate unique sections for - uninitialized data. - (ASM_OUTPUT_ALIGNED_BSS): Redefine to use named_section(). - (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Redefine to use - named_section(). - -2000-01-06 Michael Hayes - - * config/c4x/t-c4x (TARGET_LIBGCC2_CFLAGS): Don't redefine SF, DF, - SI, or DI. - -2000-01-06 Michael Hayes - - * config/c4x/c4x.md (udivqi3, divqi3): Delete. - (umodqi3, modqi3, udivhi3, divhi3, umodhi3, modhi3, ffsqi2): Likewise. - (*smulqi3_highpart_noclobber, *umulqi3_highpart_noclobber): New. - (*lshrqi3_const_noclobber, *lshrqi3_nonconst_noclobber): Likewise. - (*ashrqi3_const_noclobber, *ashrqi3_nonconst_noclobber): Likewise. - - * c4x.h (INIT_TARGET_OPTABS): Define to init libcalls. - -2000-01-05 11:25 -0800 Zack Weinberg - - * c-decl.c (finish_enum): Simplify code to determine minimum and - maximum values of the enum, and calculate the type. Remove check - for FUNCTION_DECLs in the values list, which cannot happen. Replace - the DECL_INITIAL of each enumeration constant with a copy converted - to the enumeration type. When updating variant types, don't bother - updating the type itself. - - * c-typeck.c (build_binary_op): Simplify conditional expressions - when weeding out spurious signed-unsigned warnings. Add new - spurious warning category: if the unsigned quantity is an enum - and its maximum value fits in signed_type(result_type). Update - commentary. - (build_conditional_expr): Warn here if one alternative is signed - and the other is unsigned. - -2000-01-05 Nick Clifton - - * config/fr30/fr30.h: Remove extraneous comments. - -2000-01-05 Bernd Schmidt - - * reload1.c (choose_reload_regs): When disabling a reload, also - set reload_spill_index to -1. - -2000-01-04 Joel Sherrill (joel@OARcorp.com> - - * configure.in (m68*-*-rtemscoff*): New target, formal name for - old m68*-*-rtems*. - (m68*-*-rtemself*): New target. - (mips64orion-*-rtems*): Remove duplicate definition of tm_file. - (sparc*-*-rtemsaout*): New target, formal name for old sparc*-*-rtems*. - (sparc*-*-rtemself*): New target. - (sparc*-*-rtems*): Now elf not a.out. - * config/i386/rtems.h: Include config/rtems.h. - * config/i386/rtemself.h: Include config/rtems.h. - * config/i960/rtems.h: Include config/rtems.h. - * config/m68k/rtems.h: Include config/rtems.h. - * config/m68k/rtemself.h: Include config/rtems.h. - * config/mips/rtems64.h: Include config/rtems.h. - * config/pa/rtems.h: Include config/rtems.h. - * config/rs6000/rtems.h: Include config/rtems.h. - * config/sh/rtems.h: Include config/rtems.h. - * config/sh/rtemself.h: Include config/rtems.h. - * config/sparc/rtems.h: Include config/rtems.h. - * config/sparc/rtemself.h: Include config/rtems.h - -Tue Jan 4 23:59:26 2000 Denis Chertykov - - * final.c (shorten_branches): Correctly compute length of - asms without operands. - -Tue Jan 4 22:55:41 2000 Steve Chamberlain - - * configure.in: Add pj target. - * configure: Regenerate. - * config/pj: New directory. - * config/pj/lib1funcs.S: New file. - * config/pj/linux.h: New file. - * config/pj/pj.c: New file. - * config/pj/pj.md: New file. - * config/pj/pjl.h: New file. - * config/pj/t-pj: New file. - * config/pj/xm-pj.h: New file - -Tue Jan 4 22:30:16 2000 Jeffrey A Law (law@cygnus.com) - - * toplev.c (rest_of_compilation): Run shorten-branches before - reg-stack for now. - -2000-01-05 Michael Hayes - - * config/c4x/c4x.h (IS_XXX_REG, IS_XXX_REGNO): Swap behavior of - macros so that they're consistent with their names. - * config/c4x/c4x.c (IS_XXX_REG, IS_XXX_REGNO): Likewise. - * config/c4x/c4x.md (IS_XXX_REG, IS_XXX_REGNO): Likewise. - -2000-01-05 Michael Hayes - - * config/c4x/c4x.md (*addqi3_noclobber_reload): Ensure that CC never - modified inadvertently. - -2000-01-04 Joel Sherrill - - * configure.in (v850*-*-rtems*): New target. - * configure: Regenerate. - * config/v850/rtems.h: New file. - -2000-01-04 Mumit Khan - - * gthr-win32.h (__gthread_active_p): Support Mingw MT runtime. - (__gthread_key_create): Likewise. - (__gthread_key_dtor): Likewise. - (__gthread_once): Fix logic. - (__gthread_key_delete): Cast away constness. - - * i386/cygwin.h (SUBTARGET_SWITCHES): Add -mthreads option. - * invoke.texi: Document. - * i386/mingw32.h (CPP_SPEC): Use. - (LIBGCC_SPEC): Likewise. - * i386/crtdll.h (LIBGCC_SPEC): Likewise. - -2000-01-04 David Edelsohn - - * rs6000/sysv4.h (ASM_OUTPUT_DEF): Undefine. - (HANDLE_PRAGMA_PACK): Undefine. - (SLOW_UNALIGNED_ACCESS): Define. - -2000-01-04 David Edelsohn - - * expmed.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters - to default definition. - (store_bit_field): Call SLOW_UNALIGNED_ACCESS with mode and alignment. - (store_fixed_bit_field): Call macro with word_mode and alignment. - (extract_bit_field): Call macro with relevant mode and alignment. - * expr.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters - to default definition. - (move_by_pieces): Call SLOW_UNALIGNED_ACCESS with word_mode - and alignment. - (move_by_pieces_ninsns): Likewise. - (clear_by_pieces): Likewise. - (emit_push_insn): Likewise. - (store_field): Call macro with relevant mode and alignment. - (expand_expr): Likewise. - (expand_expr_unaligned): Likewise. - - * rs6000.h (HANDLE_PRAGMA_PACK): Define. - (SLOW_UNALIGNED_ACCESS): Define. - (CASE_VECTOR_MODE): Always use 32-bit offsets. - (ASM_FILE_END): Generate 64-bit symbol in 64-bit mode. - (EXTRA_SECTION_FUNCTIONS): Indent .csect pseudo-op. - (toc_section): Likewise and .toc pseudo-op. - (ASM_DECLARE_FUNCTION): Likewise. Align text more strictly in - 64-bit mode. - (TEXT_SECTION_ASM_OP): Likewise. - (ASM_OUTPUT_ADD_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Always use - 32-bit offsets. - - * a29k.h (SLOW_UNALIGNED_ACCESS): Add MODE and ALIGN parameters. - * alpha.h (SLOW_UNALIGNED_ACCESS): Likewise. - * arm/thumb.h (SLOW_UNALIGNED_ACCESS): Likewise. - * gmicro.h (SLOW_UNALIGNED_ACCESS): Likewise. - * fr30.h (SLOW_UNALIGNED_ACCESS): Likewise. - -Tue Jan 4 11:44:13 2000 Jeffrey A Law (law@cygnus.com) - - * regclass.c: Revert my Jan 4 change to loop cost computation. - -Tue Jan 4 19:22:39 MET 2000 Jan Hubicka - - * regclass.c (regclass): Do not obey REG_N_REFS in non-optimizing - compilation. - -2000-01-04 Stan Cox - - * haifa-sched.c (build_control_flow): Change unreachable simple - loop test to check if current block has only one predecessor. - (find_rgns): Initialize degree. Use dest as degree index, not src. - -2000-01-04 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strlen): Initialize variable `icode'. - - * calls.c (expand_call): Likewise for - `old_stack_arg_under_construction'. - - * cpphash.c (macroexpand): Likewise for `args' and `rest_zero'. - - * function.c (pad_to_arg_alignment): Likewise for `save_var' and - `save_constant'. - - * gcc.c (execute): Likewise for `ut' and `st'. - - * genattrtab.c (attr_rtx): Likewise for `rt_val'. - - * genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'. - - * jump.c (jump_optimize_1): Likewise for `temp2'. - - * local-alloc.c (block_alloc): Likewise for `r1'. - - * loop.c (recombine_givs): Likewise for `life_start' and `life_end'. - - * reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'. - (subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'. - - * regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node' - and `set2'. - - * reload.c (find_reloads): Likewise for `goal_alternative_number' - and `goal_earlyclobber'. - - * scan-decls.c (scan_decls): Likewise for `prev_id_end'. - - * sdbout.c (sdbout_one_type): Likewise for `member_scl'. - - * stupid.c (stupid_life_analysis): Likewise for `chain'. - - * unroll.c (copy_loop_body): Likewise for `copy'. - - * varasm.c (output_constructor): Likewise for `byte'. - -Tue Jan 4 15:34:34 MET 2000 Jan Hubicka - - * i386.c (ix86_expand_move): Allow pushes of memory, offload to memory - all FP constants for constant->reg moves. - (ix86_split_to_parts): Try to convert memory address into immediate - when available in the constant pool. - * i386.h (PREFERRED_RELOAD_CLASS): Allow CONST_DOUBLE->integer reg - moves. - (LEGITIMATE_CONSTANT_P): Return 1. - * i386.md (pushsf): New splitter to convert constant pool memory - reference to immediate. - (mov?f): Likewise; do not allow CONST_DOUBLE for reg moves before - reload. - -2000-01-04 Bernd Schmidt - - * i386.md (ashlsi3_cmpno): Don't accept variables shifts. - (ashlhi3_cmpno, ashlqi3_cmpno, ashrsi3_cmpno, ashrhi3_cmpno, - ashrqi3_cmpno, lshrsi3_cmpno, lshrhi3_cmpno, lshrqi3_cmpno): Likewise. - (rotlsi3_cmpno, rotlhi3_cmpno, rotlqi3_cmpno, rotrsi3_cmpno, - rotrhi3_cmpno, rotrqi3_cmpno): Likewise. - -2000-01-04 Martin von Löwis - - * ginclude/stdbool.h: Support compilation as C++. - -Tue Jan 4 01:35:13 2000 J"orn Rennecke - - * fold-const.c (make_range): Don't try to reverse an unbounded range. - -Tue Jan 4 00:18:46 2000 Jeffrey A Law (law@cygnus.com) - - * regclass.c (regclass): Properly compute loop_cost. Adjust - comments. - - * regclass.c: Fix minor whitespace problems. - -2000-01-03 Anthony Green - - * config/i386/i386.md (builtin_setjmp_receiver): New pattern. - Restore the pic register if required. - -2000-01-03 Ulrich Drepper - - * c-common.c (format_char_info): Update comment. - (check_format_info): Recognize 'z' modifier in the same way 'Z' - was recognized. Emit warning for formats new in ISO C99 only - if flag_isoc9x is not set. - -Mon Jan 3 12:59:54 2000 Mark P. Mitchell - - * config/mips/iris6gld.h: Fix typo in -mabi=n32 specs. - -Mon Jan 3 15:33:37 MET 2000 Jan Hubicka - - * combine.c (expand_compound_operation): Do not convert ZERO_EXTEND to - SIGN_EXTEND, convert SIGN_EXTEND to ZERO_EXTEND. - (make_compound_operation): Choose cheaper alternative between - ZERO_EXTEND and SIGN_EXTEND when sign bit is not set. - - * regclass.c (op_costs): Remove global variable. - (record_reg_classes): New parameter "op_costs" and "reg_pref". - (record_operand_costs): Break out from ... - (scan_one_insn): ... here. - (dump_regclass): Make dumps nicer. - (regclass): Dump preferrences choosed and changes done during passes. - -2000-01-03 Jakub Jelinek - - * config/sparc/sparc.c (gen_df_reg): Fix for 32bit SPARC. - -2000-01-03 Jakub Jelinek - - * config/sparc/sparc.c (gen_df_reg): New function. - * config/sparc/sparc-protos.h (gen_df_reg): Add prototype. - * config/sparc/sparc.md (movtf_no_e_insn_sp64+1, - movtf_no_e_insn_sp64+2, movtf_no_e_insn_sp64+3, movtf_cc_sp64+1, - movtf_cc_reg_sp64+1): Use it. - -2000-01-02 Mark Mitchell - - * integrate.c (copy_decl_for_inlining): Clear TREE_ADDRESSABLE on - copied LABEL_DECLs. - -Mon Jan 3 02:54:40 2000 Hans-Peter Nilsson - - * config/i386/i386.c (ix86_expand_unary_operator): Function - definition made void. - (ix86_expand_binary_operator): Update outdated preceding comment. - * config/i386/i386-protos.h (ix86_expand_unary_operator): Update - prototype. - - * config/i386/i386.c (override_options): Fix option-name typo. - -2000-01-02 Mark Mitchell - - * system.h (CEIL): Define. - * builtins.c (CEIL): Remove. - * expmed.c (CEIL): Likewise. - * expr.c (CEIL): Likewise. - * stor-layout.c (CEIL): Likewise. - -2000-01-02 Franz Sirl - - * expr.c (store_constructor_field): Fix typo introduced with last - gcc2 merge. - -2000-01-01 Mark Mitchell - - * tree.h (BINFO_N_BASETYPES): New macro. - -2000-01-01 Bernd Schmidt - - * expmed.c (emit_store_flag): Prevent losing a pending stack - adjust the same way we prevent losing queued increments. - -See ChangeLog.2 for earlier changes. diff --git a/contrib/gcc/ChangeLog.4 b/contrib/gcc/ChangeLog.4 deleted file mode 100644 index 25546c4..0000000 --- a/contrib/gcc/ChangeLog.4 +++ /dev/null @@ -1,15261 +0,0 @@ -2000-12-31 Philip Blundell - - * config/arm/linux-gas.h (CLEAR_INSN_CACHE): Add missing asm - operands. - -2000-12-30 Richard Henderson - - * dbxout.c (dbxout_block): Invert logic on eliding LBRAC/RBRAC. - Initialize variables properly for DBX_LBRAC_FIRST. - -2000-12-30 Richard Kenner - - * expr.c (expand_expr, case COMPONENT_REF): Fix typo in last change. - -2000-12-30 Kaveh R. Ghazi - - * builtins.c (validate_arglist): New function, use it. - -2000-12-30 Philip Blundell - - * config/arm/arm.c (arm_expand_prologue): Fix typos in error - message and comment. Note location of testcase for an unhandled - situation. - -2000-12-30 Jeffrey Oldham - - * defaults.h (BUILD_VA_LIST_TYPE): New definition. - * tree.c (build_common_tree_nodes_2): Ensure the va_list_type_node - is a copy, not an alias. - -2000-12-30 Richard Kenner - - * calls.c (calls_function_1, case CONSTRUCTOR): New case. - - * alias.c (alias_sets_conflict_p): New function. - (mems_in_disjoint_alias_sets_p): Use it. - (readonly_fields_p): Moved from expr.c; check for record type. - (objects_must_conflict_p): New function. - * calls.c (expand_call): Use assign_temp as much as possible, use - readonly variant if assigned once, and don't set memory attributes. - (emit_library_call_value_1, store_one_arg): Likewise. - * integrate.c (expand_inline_function): Likewise. - * stmt.c (expand_asm_operands, expand_return): Likewise. - * expr.c (copy_blkmode_from_reg, store_constructor): Likewise. - (store_field, save_noncopied_parts, expand_expr): Likewise. - (expand_expr_unaligned): Likewise. - (readonly_fields_p): Moved to alias.c. - (safe_from_p): Rework handling of SAVE_EXPR. - MEMs ony conflict if alias sets conflict; likewise for INDIRECT_REF. - * function.c (struct temp_slot): Delete field ALIAS_SET; add TYPE. - (assign_stack_for_temp): Use objects_must_confict_p. - Set all memory attributes from type, if specified. - (mark_temp_slot): Mark TYPE field. - * tree.h (alias_sets_conflict_p, readonly_fields_p): New decls. - (objects_must_conflict_p): Likewise. - - * stmt.c (expand_decl): Don't use assign_stack_temp in error case. - (add_case_node): No need to copy nodes anymore. - -2000-12-30 Alexandre Oliva - - * config/sh/sh.c (split_branches): Don't dereference re-computed - `beyond' before checking it's non-NULL. - -2000-12-29 Robert Lipe - - Remove COFF support from i?86-pc-sco3.2v5. - * i386/sco5.h (PREFERRED_DEBUGGING_TYPE): Change to Dwarf II. - (TARGET_ELF): Now always true. - (SUBTARGET_SWTICHES: )Remove -mcoff. - - * i386/t-sco5 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES, - MULTILIB_EXCEPTION): Nuke coff. - (CRTSTUFF_T_CFLAGS_S): Deleted. - (TARGET_LIBGCC2_CFLAGS): Added. - -2000-12-29 Alexandre Oliva - - * varasm.c (output_constant_def): Don't ENCODE_SECTION_INFO - twice. Update desc->rtl and ->label, in case ENCODE_SECTION_INFO - modifies them. - -2000-12-29 Bernd Schmidt - - * ia64.c (ia64_expand_load_address): Accept additional scratch - register argument. All callers & prototype changed. - Use scratch register when generating load_symptr insns. - * ia64.md (movdi_symbolic): Clobber a scratch register. Use it - when calling ia64_expand_load_address. - (movdi): Generate movdi_symbolic with additional operand. - (load_gprel64): Use pic_offset_table_rtx instead of (reg:DI 1). - (load_symptr): Likewise. Use additional operand as a scratch - register instead of generating it here. - - * basic-block.h: Add a comment. - * flow.c (PROP_POSTRELOAD): New macro. - (update_life_info): Add it to prop_flags. - (mark_set_1): If it is set, compute REG_N_SETS for the original - register number of a hard reg. - - * emit-rtl.c (gen_raw_REG): New function. - (gen_rtx_REG, gen_reg_rtx, init_emit_once): Use it instead of - gen_rtx_raw_REG. - * print-rtl.c (print_rtx): Print ORIGINAL_REGNO. - * final.c (alter_subreg): Update it. - * regrename.c (do_replace): Likewise. Use gen_raw_REG. - * rtl.def (REG): Update comment. - * rtl.h (X0UINT, ORIGINAL_REGNO): New macros. - (gen_raw_REG): Declare. - -2000-12-29 Richard Kenner - - * tree.c (get_set_constructor_bits): Use host_integerp and - tree_low_cst. - - * local-alloc.c (update_equiv_regs): Don't use copy_rtx on PATTERN. - - * toplev.c (main): Call xmalloc_set_program_name. - * gcc.c (main): Likewise. - -2000-12-29 Philip Blundell - - * config/arm/arm.c (arm_override_options): Fix typo in warning - message. - -2000-12-29 Richard Henderson - - * config/alpha/alpha.c (alpha_expand_block_move): Initialize - src_align and dst_align in bits. Do unaligned quadword loads - if possible for BWX too. - (alpha_expand_block_clear): Initialize align in bits. Track - small leading offsets into a larger alignment. Play games with - stq_u for large 4-byte aligned blocks. Use load/mask/store - for appropreately aligned heads and tails. - -2000-12-29 Alexandre Oliva - - * function.c (assign_parms): Convert arguments passed by - reference to the right mode. - -2000-12-28 Geoffrey Keating - - * c-parse.in (select_or_iter_stmt): Use truthvalue_conversion - on the condition of a FOR statement, so that it gets typechecked - and optimized. - -2000-12-29 Alexandre Oliva - - * c-decl.c (grokdeclarator): Prevent crash in case of overflow in - array size. - - * calls.c (emit_library_call_value_1): Add to call_fusage the - stack slot assigned to argument passed by reference. - -2000-12-28 Jeffrey Oldham - - * toplev.h (extern really_sorry): Remove extern declaration for - nonexistent function. - -2000-12-28 Jeffrey Oldham - - * varasm.c (initializer_constant_valid_p): Indicate subtraction of - pointers to the same string constant is absolute. - -2000-12-28 Joseph S. Myers - - * c-common.c (enum format_type): Add strfmon_format_type. - (decl_attributes): Handle format attributes strfmon and - __strfmon__. - (FMT_FLAG_USE_DOLLAR, FMT_FLAG_ZERO_WIDTH_BAD, - FMT_FLAG_EMPTY_PREC_OK): Define. - (format_char_info): Update comment for flag_chars. - (format_flag_spec): Add skip_next_char. - (format_kind_info): Add left_precision_char. - (printf_flag_specs, scanf_flag_specs, strftime_flag_specs, - format_types): Update for these new structure members and flags. - (time_char_table): Make const. - (strfmon_length_specs, strfmon_flag_specs, strfmon_flag_pairs, - monetary_char_table): New. - (format_types): Add details of strfmon formats. - (init_function_format_info): Create default attribute for strfmon. - (check_format_info_main): Check the new flags. Handle - skip_next_char and left precision. - * toplev.c (documented_lang_options): Update description of - -Wformat. - * extend.texi: Document strfmon format attributes. Document - attribute forms such as __printf__. Clarify format_arg attribute - documentation. - * invoke.texi (-Wformat): Update for strfmon formats. - -2000-12-28 Andreas Jaeger - - * expmed.c (store_bit_field): Fix last patch. - -2000-12-28 Alexandre Oliva - - * config/sh/crt1.asm (start_l): `__SH4_SINGLE_ONLY__' was missing - the trailing `__'. - -2000-12-28 Alan Lehotsky - - * expmed.c (store_bit_field): Correctly compute smallest mode that - is sufficient to contain all bits we are storing. - -2000-12-27 Kaveh R. Ghazi - - * builtins.c (build_function_call_expr): New function. Use it - everywhere in lieu of manually constructing a CALL_EXPR. - -2000-12-27 Chandrakala Chavva - - * calls.c (store_one_arg): If parm is passed both in stack and in - register and offset is greater than reg_parm_stack_space, split - the offset and call emit_push_insn(). - -2000-12-27 Nick Clifton - - * ifcvt.c (noce_emit_store_flag): Handle jump insns that are - PARALLEL. - -2000-12-27 Alexandre Oliva - - * rtl.c (copy_most_rtx, shallow_copy_rtx): Copy frame_related - flag. - -2000-12-27 Bruce Korb - - * fixinc/Makefile.in: fix for ancient Bourne shell - * fixinc/Makefile.BEOS: obsolete - * fixinc/Makefile.DOS: obsolete - * fixinc/fixincl.sh(LINKS): use `test -d' rather than `ls' for testing - -2000-12-27 Bernd Schmidt - - * sched-deps.c (get_condition, conditions_mutex_p): New functions. - (add_dependence): Use them to avoid adding unnecessary dependencies - between conditionally executed insns. - (sched_analyze_1, sched_analyze_2, sched_analyze_insn): Don't free - dependency lists if current insn is a COND_EXEC. - -2000-12-27 Geoffrey Keating - - * config/rs6000/rs6000.md (define_attr "length"): Correct - calculation. - -2000-12-26 Kazu Hirata - - * config/h8300/h8300.c: Fix a comment typo. - (get_shift_alg): Fix a typo in the assembly code for 12-bit - ASHIFTRT in HImode. Do not output extra whitespace after one line - of assembly code. Output a tab after an opcode instead of a - space. - (emit_a_shift): Output a tab after an opcode instead of a space. - -2000-12-23 Marek Michalkiewicz - - * config/avr/avr.c (out_movqi_r_mr, out_movhi_r_mr, out_movsi_r_mr, - out_movsi_mr_r, out_movqi_mr_r, out_movhi_mr_r): Use %o instead of - %4 in output templates, do not modify operands passed by the caller. - -2000-12-23 Joseph S. Myers - - * builtins.def (BUILT_IN_LABS, BUILT_IN_LLABS, BUILT_IN_IMAXABS): - Don't define. - * builtins.c (expand_builtin): Don't handle BUILT_IN_LABS, - BUILT_IN_LLABS and BUILT_IN_IMAXABS. - * c-common.c (c_common_nodes_and_builtins): Use BUILT_IN_ABS for - builtin labs, llabs and imaxabs. - (expand_tree_builtin): Don't handle BUILT_IN_LABS, BUILT_IN_LLABS - and BUILT_IN_IMAXABS. - -2000-12-23 Joseph S. Myers - - * c-common.c (builtin_function_2): New function. - (c_common_nodes_and_builtins): Use it to define each pair (foo, - __builtin_foo) of builtins in one place. - -2000-12-22 Joseph S. Myers - - * gccbug.in: Add libgcj and preprocessor categories. - -2000-12-22 Bernd Schmidt - - * config/ia64/ia64.c (itanium_reorder): Only schedule stops in - the final scheduling pass. - -2000-12-22 Nick Clifton - - * config/arm/arm.h (struct machine_function): Add new field - 'lr_save_eliminated'. - * config/arm/arm.c (arm_compute_save_reg_mask): Do not include the - link register if its save has been eliminated. - (output_arm_prologue): Mention if the save of the link register - has been eliminated. - (output_arm_epilogue): Rename 'live_regs_mask' to - 'saved_regs_mask'. - Test 'saved_regs_mask' for the link register, not regs_ever_live. - (arm_expand_prologue): If the link register has not been saved set - lr_save_eliminated and emit a USE to prevent later passes from - scavenging it. - - * dwarf2out_frame_debug_expr: Allow the (scratch) frame - pointer to be initialized from the stack pointer plus a - constant. - -2000-12-22 Bernd Schmidt - - * regrename.c (struct du_chain): New field "earlyclobber". - (enum scan_actions): Remove unused entry "note_reference". - (enum scan_actions_name): Likewise. - (note_sets, clear_dead_regs, merge_overlapping_regs): New static - functions. - (regrename_optimize): Use them to compute unavailable regs; get - rid of the more simpleminded code we used to have here. - Use a tick array to ensure registers are allocated in a more - round-robin way. Disable code that only optimizes registers - that were seen more than once. - (referenced_regs): Remove variable. - (scan_rtx_reg): New arg "earlyclobber". All callers changed. - Store its value in newly generated du_chain structures. - Add new du_chains at the end, not the start, of the list. - Don't handle the "note_reference" action. - (scan_rtx): New arg "earlyclobber". All callers changed. - (build_def_use): Lose code to keep track of referenced regs. - -2000-12-22 Kaveh R. Ghazi - - * Makefile.in (sched-deps.o, sched-rgn.o): Fix dependency typo. - - * fp-bit.h (usi_to_float): Add prototype. - - * i386.c (ix86_expand_builtin): Delete unused label. - - * dwarf2out.c (file_info_cmp): Prototype. - (dwarf2out_line): Hide variable `old_in_use'. - - * objc-act.c (objc_fatal): Delete. - - * sched-vis.c (visualize_stall_cycles): Remove unused variable. - - * system.h (getopt): Fix error in last change. - - * varasm.c (assemble_trampoline_template): Constify. - -2000-12-22 Jason Merrill - - * collect2.c (main): Use auto_demangling. - -2000-12-22 Alexandre Oliva - - * function.c (assign_parms): Update parm's DECL_INCOMING_RTL - when optimizing PARALLEL to REG. - -2000-12-22 Graham Stott - - * reload.c (update_auto_inc_notes): New, broken out from ... - (find_reloads_address_1): ... use here, also correct possible - use of uninitialized reloadnum. - -2000-12-21 David O'Brien - - * config/freebsd.h (LIB_SPEC): remove -kthread option. - -2000-12-22 Michael Hayes - - * resource.c (mark_set_resources): Use MARK_SRC_DEST for - PRE_MODIFY and POST_MODIFY cases. - - * rtlanal.c (side_effects_p): Handle PRE_MODIFY and POST_MODIFY. - -2000-12-22 Michael Hayes - - * md.texi (Looping Patterns): New node. - -2000-12-21 Joseph S. Myers - - * gcc.texi, cpp.texi: Update last-updated dates. - -2000-12-21 Chandrakala Chavva - - * varasm.c (output_addressed_constants): Use language specific - expander on unknown nodes. - -2000-12-21 Graham Stott - - * combine.c (distribute_notes): Handle REG_NON_LOCAL_GOTO notes. - -2000-12-21 Bernd Schmidt - - * Makefile.in (out_object_file): Depend on sched-int.h. - * rtl.h (single_set_1): New macro. - (single_set_2): Renamed from single_set_1 and extra argument added. - * rtlanal.c (single_set_2): Likewise. - - * config/ia64/ia64-protos.h (get_bundle_name, ia64_issue_rate, - ia64_adjust_cost, ia64_sched_init, ia64_sched_finish, - ia64_sched_reorder, ia64_sched_reorder2, ia64_variable_issue): - Declare. - * config/ia64/ia64.c: Include "sched-int.h". - (hard_regno_rename_ok): Also disallow renaming from the various - reg_save_* regs. - (ia64_safe_itanium_requiers_unit0, ia64_safe_itanium_class, - ia64_safe_type, init_insn_group_barriers, group_barrier_needed_p, - safe_group_barrier_needed_p, fixup_errata): New static functions. - (rtx_needs_barrier): Handle bundle selector and cycle display - insns. - (emit_insn_group_barriers): Accept additional FILE * arg. All - callers changed. Rework to only generate stop bits between - basic blocks that haven't been inserted by scheduling. - (struct bundle, struct ia64_packet): New structures. - (NR_BUNDLES, NR_PACKETS): New macros. - (bundle, packets, type_names): New static arrays. - (ia64_final_schedule): New variable. - (ia64_single_set, insn_matches_slot, ia64_emit_insn_before, - gen_nop_type, finish_last_head, rotate_one_bundle, rotate_two_bundles, - cycle_end_fill_slots, packet_matches_p, get_split, find_best_insn, - find_best_packet, itanium_reorder, dump_current_packet, schedule_stop): - New static functions. - (ia64_issue_rate, ia64_sched_init, ia64_sched_reorder, - ia64_sched_finish, ia64_sched_reorder2, ia64_variable_issue): New - functions. - (ia64_reorg): Perform a final scheduling pass. - * config/ia64/ia64.h (CONST_COSTS): Slightly increase SYMBOL_REF costs. - (MAX_CONDITIONAL_EXECUTE, ADJUST_COST, ISSUE_RATE, MD_SCHED_INIT, - MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_FINISH, - MD_SCHED_VARIABLE_ISSUE): Define macros. - (ia64_final_schedule): Declare variable. - * config/ia64/ia64.md (attr itanium_class): Add some more classes. - (attr type): Account for them. - (itanium_requires_unit0): New attribute. - (function units): Rewrite. - (some splitters): Don't create scheduling barriers here. - (gr_spill_internal, gr_restore_internal): Don't predicate the - pseudo-op. - (nop_m, nop_i, nop_f, nop_b, nop_x, cycle_display, cycle_display_1, - bundle_selector): New patterns. - (insn_group_barrier): Now has an operand. - -2000-12-21 DJ Delorie - - * dwarf2out.c (simple_decl_align_in_bits): new - (field_byte_offset): Try both the type align and the - decl align, use whichever works, preferring the type align. - -2000-12-21 Joseph S. Myers - - * gccbug.in: Fix typo. - -2000-12-20 Benjamin Kosnik - - * Makefile.in (gcc_gxx_target_include_dir): Use instead of - build_tooldir and libstdcxx_incdir. - -2000-12-20 Robert Lipe - - * haifa-sched.c (schedule_block): Provide empty source statement - if not MD_SCHED_REORDER2. - -2000-12-20 Richard Henderson - - * rtl.h (REG_NON_LOCAL_GOTO): New. - * rtl.c (reg_note_name): Update. - * stmt.c (expand_goto): Emit a REG_NON_LOCAL_GOTO note. - * builtins.c (expand_builtin_longjmp): Likewise. - * flow.c (make_edges): Check for REG_NON_LOCAL_GOTO and do - not emit an edge. - -2000-12-20 Marek Michalkiewicz - - * config/avr/avr.c (out_movsi_r_mr, out_movsi_mr_r, out_movhi_mr_r): - Do not output undefined opcodes where source or destination register - overlaps with modified pointer register. Handle (X + d) addresses. - * config/avr/avr.md (*movhi, *movsi, *movsf): Correct insn length - in alternatives with memory operand. - -2000-12-20 Richard Henderson - - * c-typeck.c (build_asm_stmt): New, broken out from ... - (c_expand_asm_operands): ... here. Just do rtl expansion. - (c_expand_return): Return the new stmt node. - (c_start_case, do_case): Likewise. - * c-common.c (c_expand_expr_stmt): Likewise. - * c-common.h: Update declarations. - * c-tree.h: Likewise. - * c-semantics.c (build_stmt): Use STMT_LINENO not TREE_COMPLEXITY. - * c-parse.in (fndef): Set DECL_SOURCE_LINE to the open brace. - (nested_function, notype_nested_function): Likewise. - (compstmt): Return the compound statement not the binding level. - (lineno_labeled_stmt): Simplify. - (lineno_stmt, lineno_label): Set STMT_LINENO. - (stmt, label): Return the new stmt node. - -2000-12-20 Bernd Schmidt - - * Makefile.in (OBJS): Add sched-ebb.o. - (sched-ebb.o): New rule. - (sched-vis.o): Depend on hard-reg-set.h and $(BASIC_BLOCK_H). - (haifa-sched.o): Depend on insn-flags.h. - * haifa-sched.c: Include "insn-flags.h". - (priority): Don't access BLOCK_NUM, use the new contributes_to_priority - callback. - * rtl.h (schedule_ebbs): Declare. - * sched-int.h (struct sched_info): Add new members - contributes_to_priority and compute_jump_reg_dependencies. - * sched-rgn.c (contributes_to_priority, compute_jump_reg_dependencies): - New functions. - (region_sched_info): Add them. - * sched-vis.c: Include "hard-reg-set.h" and "basic-block.h". - * sched-ebb.c: New file. - * sched-deps.c (sched_analyze_insn): Add code to handle JUMP_INSNs. - - * flow.c (ior_reg_cond, and_reg_cond, elim_reg_cond): Properly - handle all relational operators. - -2000-12-20 Alexandre Oliva - - * final.c (output_addr_const): Use ASM_OUTPUT_SYMBOL_REF. - * tm.texi: Document it. - -2000-12-19 Benjamin Kosnik - - * Makefile.in (-DGPLUSPLUS_TOOL_INCLUDE_DIR): Use build_tooldir - instead of gcc_tooldir. - -2000-12-19 John David Anglin - - * system.h (getopt): Update prototype to match include/getopt.h. - -2000-12-19 John David Anglin - - From Jeff Law. - * pa.c (basereg_operand): Simplify. - -2000-12-19 Bernd Schmidt - - * haifa-sched.c (rm_line_notes): Arguments are now head and tail, - not block number. All callers and prototype changed. - (set_priorities): Likewise. - (save_line_notes): Add head and tail arguments; all callers and - prototype changed. - (restore_line_notes): Likewise. Don't crash on insns generated - during scheduling. - (schedule_block): Don't use BLOCK_HEAD/BLOCK_END macros. - Call MD_SCHED_INIT with additional argument. - When starting a new cycle, emit cycle_display insns if available. - Don't stop scheduling when encountering a JUMP_INSN, but add another - call to schedule_more_p in the inner loop. - Call MD_SCHED_REORDER2 after scheduling an insn. - Call MD_SCHED_FINISH once all insns are scheduled. - (sched_init): Compensate for the fact that get_block_head_tail - doesn't include leading notes. - * sched-deps.c (free_deps): Free vectors here. - * sched-rgn.c (compute_block_backward_dependencies): Not here. - (last_was_jump): New static variable. - (schedule_more_p): Test it. - (init_ready_list): Initialize it. - (can_schedule_ready_p): Set it if we have a JUMP_INSN. - - * config/i386/i386.h (MD_SCHED_INIT): Add new arg. - * config/m32r/m32r.h (MD_SCHED_INIT): Add new arg. - * config/sparc/sparc.h (MD_SCHED_INIT): Add new arg. - - * md.texi (cycle_display): Document. - * tm.texi (MD_SCHED_INIT): Document new arg. - (MD_SCHED_FINISH, MD_SCHED_REORDER2): Document. - - * flow.c (ior_reg_cond, nand_reg_cond, not_reg_cond): Rewrite - to use different representation. All callers changed. - (and_reg_cond): Renamed from nand_reg_cond; caller changed. - (init_propagate_block_info): Don't test flags to determine - whether to compute conditional lifetimes. - Adjust code for new representation of conditional lifetimes. - (mark_regno_cond_dead): Similar adjustment. - (free_reg_cond_life_info): Similar adjustment. - (elim_reg_cond): New function. - (flush_reg_cond_1): Use it. - -2000-12-19 Catherine Moore - - * reload1.c (reload_combine): Take multi-hard-regs into account - when processing CALL_INSN_FUNCTION_USAGE. - -2000-12-19 Joseph S. Myers - - * invoke.texi (-print-search-dirs): Make references to cpp refer - to cpp0 instead. - -2000-12-18 Kaveh R. Ghazi - - * fold-const.c (tree_expr_nonnegative_p): Treat truth values as - non-negative. - -Tue Dec 19 00:37:08 2000 J"orn Rennecke - - * reload.c (push_reload): When using a dying register for the reload - register in an in-out reload, use outmode if wider than inmode. - -2000-12-19 Joseph S. Myers - - * config/d30v/d30v.h (EXIT_BODY): Update comment. - -2000-12-18 Joseph S. Myers - - * config.gcc (*-*-linux*): Don't define HAVE_ATEXIT or BSTRING. - * tm.texi (EXIT_BODY): Update documentation. - * config/freebsd.h, config/netware.h, config/arm/coff.h, - config/arm/conix-elf.h, config/arm/unknown-elf.h, - config/d30v/d30v.h, config/mcore/mcore.h, config/pj/pj.h, - sparc/sp86x-aout.h: Remove definitions of HAVE_ATEXIT (some - commented out) and associated comments. - -2000-12-18 Joseph S. Myers - - * c-common.c (STD_C9L, ADJ_STD): Define. - (printf_length_specs, scanf_length_specs): Mark "ll" as standard - STD_C9L. - (T99_LL): Rename to T9L_LL. - (T99_ULL): Rename to T9L_ULL. - (print_char_table, scan_char_table): Use T9L_LL and T9L_ULL - instead of T99_LL and T99_ULL. - (check_format_info_main): Use ADJ_STD on all format standard - versions being compared. - * c-common.h: Declare warn_long_long. - * c-tree.h: Don't declare warn_long_long. - -2000-12-18 Joseph S. Myers - - * COPYING: Update to current - ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references - to 19yy as example year in copyright notice). - -2000-12-18 Neil Booth - - * c-lex.c (cb_file_change): Treat in_system_header as strictly - boolean (0 or 1). - -2000-12-18 Neil Booth - - * cppmain.c: Update print.lineno with -P. - -2000-12-18 Neil Booth - - * c-lex.c: s/change_file/file_change. - * cpplib.h: Similarly. - * cppmain.c: Similarly. - * fix-header.c: Similarly. - * cppfiles.c (stack_include_file): Pass the buffer location and - size to cpp_push_buffer. Generate the file_change callback, - so that sysp is already set. - * cpphash.h: Add _cpp_do_file_change. - * cpplib.c (do_line): Set buffer->sysp directly. Generate the - file_change callback after setting sysp. - (_cpp_do_file_change): Handle FC_ENTER and the FC_RENAME exception - here. - (cpp_push_buffer): Don't generate a callback. Clear sysp. - (cpp_pop_buffer): Clean up logic. - -2000-12-18 Benjamin Kosnik - - * configure.in (gcc_gxx_include_dir): Simplify. - (libstdcxx_incdir): Export. - * configure: Regenerate. - * Makefile.in (PREPROCESSOR_DEFINES): Add in - GPLUSPLUS_TOOL_INCLUDE_DIR bits here.. - (libstdcxx_incdir): Add. - * cppdefault.c (GPLUSPLUS_TOOL_INCLUDE_DIR): Add search path. - -2000-12-18 Neil Booth - - * c-lex.c (lex_lineno): Remove. - (init_c_lex, c_lex): Remove lex_lineno. - (cb_change_file): Update lineno correctly, both before calling - push_srcloc and before leaving the function. - (cb_def_pragma): Set lineno before outputting diagnostics. - -Sun Dec 17 18:45:41 2000 Richard Kenner - - * print-tree.c (print_node): Print DECL_USER_ALIGN and TYPE_USER_ALIGN. - Print TYPE_MIN_VALUE and TYPE_MAX_VALUE for REAL_TYPE. - Use print_node_brief to print bounds. - -2000-12-17 Neil Booth - - * cpplib.h (struct cpp_reader): Remove references to string_pool - and temp_string_pool. - * cppinit.c (cpp_create_reader, cpp_cleanup): Similarly; using - ident_pool in place. - * cpplex.c (parse_number, unescaped_terminator_p, parse_string, - save_comment, cpp_token_as_text): Similarly. - * cpplib.c (do_define, glue_header_name, parse_assertion): Similarly. - * cppmacro.c (make_number_token, builtin_macro, lock_pools, - unlock_pools, stringify_arg, paste_tokens): Similarly. - -Sun Dec 17 12:41:48 2000 Richard Kenner - - * dwarf2out.c (loc_descriptor_from_tree, case NOP_EXPR): New case. - (loc_descriptor_from_tree, case CONVERT_EXPR): Likewise. - (loc_descriptor_from_tree, case NON_LVALUE_EXPR): Likewise. - -2000-12-17 Richard Earnshaw - - * Makefile.in (check-po): Use $(MAKE). - (risky-stage1, risky-stage2, risky-stage3, risky-stage4): Likewise. - -2000-12-17 Neil Booth - - * cppmain.c (check_multiline_token): New function. - (scan_buffer): Use it. - (cb_change_file): Restructure to avoid warning. - * cpperror.c (print_location): Initialize col. - -2000-12-14 Philipp Thomas - - * protoize.c (main): Correctly set locale categories. - * gcc.c (main): Likewise. - * cppmain.c (general_init): Likewise. - * toplev.c (main): Likewise. - * gcov.c (main): Likewise. - * collect2.c (main): Likewise. - -2000-12-17 Kaveh R. Ghazi - - * c-common.c (c_common_nodes_and_builtins): Create a - cstring_endlink, use it. Rename int_ftype_string_string to - int_ftype_cstring_cstring, string_ftype_string_int to - string_ftype_cstring_int, and string_ftype_string_string to - string_ftype_cstring_cstring. Prefer sizetype_endlink and - int_endlink to manually recreating them. Fix the prototype - set for __builtin_strspn/__builtin_strcspn. - -2000-12-12 Marek Michalkiewicz - - * config/avr/avr.c (out_set_stack_ptr): Update comment. - (print_operand): Add support for %~ and %o. - -2000-12-17 Herman A.J. ten Brugge - - * c4x.h: Add ASM_OUTPUT_DEF definition for bounded pointer code. - -2000-12-17 Neil Booth - - * c-lex.c: Move main_input_filename handling to FC_ENTER. Clean up. - * cpperror.c (print_containing_files): Get right line number. - (print_location): Output column of 1 if 0. - * cppfiles.c (stack_include_file): cpp_push_buffer handles - the callback. - * cpphash.h (_cpp_do_file_change): No longer external. - * cpplib.c (do_file_change): Now local to cpplib.c. - (do_line): Fake a buffer stack for preprocessed files. - (cpp_push_buffer): Create a file_change callback. Handle faked - buffers. - (cpp_pop_buffer): Similarly. - * cpplib.h: BUF_FAKE: New buffer type. - * cppmain.c: Update to handle correct file renaming where a - #line is the first line of the main file, and produce only - the renamed file, not the original file, as output. - -2000-12-17 Michael Hayes - - * config/c4x/c4x.md: Remove redundant @s from output patterns. - -2000-12-17 Michael Hayes - Herman A.J. ten Brugge - - * config/c4x/c4x.h (REGISTER_TARGET_PRAGMAS): Call c4x_init_pragma. - - * config/c4x/c4x-protos.h (c4x_init_pragma): New prototype. - - * config/c4x/c4x.c (c4x_init_pragma): New function. - (c_lex_func): New variable. - (c4x_parse_pragma): Use c_lex_func. - -2000-12-17 Michael Hayes - Herman A.J. ten Brugge - - * config/c4x/c4x.h (MD_INIT_BUILTINS): Add void_list_node argument - to c4x_init_builtins. - - * config/c4x/c4x-protos.h (c4x_init_builtins): Add tree argument. - - * config/c4x/c4x.c (c4x_init_builtins): Add tree argument. - (c4x_output_ascii): Fix. - -2000-12-17 Michael Hayes - Herman A.J. ten Brugge - - * config/c4x/c4x.h (MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): Define. - - * config/c4x/c4x-protos.h (c4x_init_builtins): New prototype. - (c4x_expand_builtin): Likewise. - - * config/c4x/c4x.c (c4x_init_builtins): New function. - (c4x_expand_builtin): Likewise. - - * config/c4x/c4x.md (floatunsqihf2): New pattern. - (*floatqihf2_set, *fixhfqi_set, fix_trunchfqi2): Likewise. - (fixuns_trunchfqi2, toieee, frieee, *ldhf_conditional): Likewise. - (*ldhf_conditional_noov, movhfcc, trap, cond_trap_cc): Likewise. - (*toieee_movqf_clobber, *frieee_movqf_clobber): Likewise. - -2000-12-17 Michael Hayes - - * libgcc2.h: Use Wtype for SItype and DWtype for DItype in prototypes. - * libgcc2.c (__absvsi2): Use Wtype and DWtype. - (__absvdi2, __addvsi3, __addvdi3, __subvsi3): Likewise. - (__subvdi3, __mulvsi3, __mulvdi3, __negvsi2, __negvdi2): Likewise. - -2000-12-16 Alexandre Oliva - - * config/sh/sh.h (INITIALIZE_TRAMPOLINE): Enclose the block - statement in do/while(0). - -Sat Dec 16 19:56:24 MET 2000 Jan Hubicka - - * i386.md (ashrsi3_cmpno, ashrhi3_cmpno, ashrqi3_cmpno, lshrsi3_cmpno, - lshrhi3_cmpno): Remove redundant '@' from the template. - - * i386.md (cmpstrsi_1): Fix type of the compare. - - * genattrtab.c (attr_rtx_cost): New function. - (simplify_test_exp): Avoid overactive inlining; use temporary - obstacks for tests. - -Sat Dec 16 10:41:11 2000 Richard Kenner - - * diagnostic.c (finish_abort): Deleted. - (fatal): Add code from finish_abort. - (error_recursion, fancy_abort): Call fatal, not finish_abort. - (trim_filename): Remove leading "../". - * diagnostic.h (finish_abort): Deleted. - * toplev.c (crash_signal): Call fatal, not finish_abort. - - * stor-layout.c (place_field): Treat overflowing DECL_SIZE_UNIT - as if size were variable. - - * expmed.c (expand_mult): Write REG_EQUAL note with proper mode. - -2000-12-16 Neil Booth - - * tradcpp.c: T_WARNING: New. - (do_warning): New function. - (finclude): Skip past the newline and increase the line number - before calling output_line_command. - (do_line): Skip the new line after output_line_command. Don't - pre-decrement the line number. - -2000-12-15 Diego Novillo - - * i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix references to - _GLOBAL_OFFSET_TABLE_ when using Intel syntax. - -2000-12-15 Jakub Jelinek - - * gcc.c (cpp_options): Pass -fno-operator-names. - * cpplib.h (struct cpp_options): Add operator_names. - * cppinit.c (cpp_create_reader): Initialize it. - (initialize_builtins): If -fno-operator-names, don't add - C++ alternate operator names. - (COMMAND_LINE_OPTIONS): Add -fno-operator-names. - (cpp_handle_option): Clear operator_names. - -2000-12-15 Jason Merrill - - * jump.c (jump_optimize_1): Don't delete the line note after the - prologue even if it seems redundant. - - * config/arm/arm.c (arm_expand_prologue): Set RTX_FRAME_RELATED_P - on all insns used to adjust the stack. - -Fri Dec 15 15:32:16 MET 2000 Jan Hubicka - - * combine.c (cant_combine_insn_p): Get around SUBREGs when determining - hardreg<->reg moves. - -Fri Dec 15 14:48:37 MET 2000 Jan Hubicka - - * genrecog.c (add_to_sequence): Remove special case for - const_int_operand. - (maybe_both_true): Return 1 when falling out of sequence when - trying to find common position in the pattern. - -Fri Dec 15 14:44:51 MET 2000 Jan Hubicka - - * integrate.c (copy_rtx_and_substitute): Copy mode too. - -Fri Dec 15 14:11:57 MET 2000 Jan Hubicka - - * flow.c (notice_stack_pointer_modification_1): Cleanup. - -2000-12-15 Alexandre Oliva - - * function.c (adjust_trampoline_addr): New function. - (trampoline_address): Call it instead of round_trampoline_addr(). - * tm.texi (TRAMPOLINE_ADJUST_ADDRESS): Document it. - -2000-12-14 Zack Weinberg - - * cppfiles.c (hack_vms_include_specification): Delete function - (not used since 1998). - -Fri Dec 15 03:37:51 2000 J"orn Rennecke - - * haifa-sched.c (sched_init): Don't put a note in front of any BARRIER. - -2000-12-14 Jim Wilson - - * alias.c (get_alias_set): Call record_component_aliases for - COMPLEX_TYPE. - (record_component_aliases): Handle COMPLEX_TYPE. - -2000-12-14 Kaveh R. Ghazi - - * fixinc/gnu-regex.c: Disable NLS. - -2000-12-14 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_conditional_move): Do not swap - comparison operands when that would create non-canonical rtl. - - * config/i386/i386.md (umulsi3_highpart): Remove * from name. - (smulsi3_highpart): Likewise. - -2000-12-14 Neil Booth - - * gcc.c (cpp_options): Add -remap. - -2000-12-14 Neil Booth - - * gcc.c (cpp_options): Update to use '&'. - (struct switchstr): Change type of validated to save space. - New member 'ordering'. - (handle_braces, validate_switches): Update to handle '&'. - -2000-12-13 Laurynas Biveinis - - * fixinc/inclhack.def: skip stdio_va_list fix if __DJ_va_list - found in a header. - * fixinc/fixincl.x: regenerated. - -2000-12-13 DJ Delorie - - * config.gcc (cygwin, win32, mingw32): Use float-i386.h. - -2000-12-13 Tom Tromey - - * gcc.c (handle_braces): Handle %{ - - * function.c (assign_parms): Optimize incoming PARALLELs into - REGs if possible. - -2000-12-13 Bruce Korb - - * fixinc/Makefile.in(*): substantial rewrite to accommodate systems - that cannot handle bi-directional pipes, viz. BeOS and DOS. - * fixinc/fixlib.h(IGNORE_ARG): new macro - (STATIC): define for all of fixinc to use - * fixinc/fixfixes.c(*): eliminate unused arg warnings - * fixinc/fixtests.c(*): ditto - * fixinc/fixincl.c(start_fixer): chain_open now uses const arg list - * fixinc/gnu-regex.c: reorder some includes to avoid _GNU_SOURCE - warning. Also, eliminate the ``#ifdef emacs'' stuff. - (re_syntax_options): make global as it is declared so. - * fixinc/mkfixinc.sh: process the argument list more consistently - (beos/msdosdjgpp): set TARGETS to twoprocess vs. oneprocess - * fixinc/procopen.c(globals): include "fixlib.h" for std defs - * fixinc/server.c(globals): ditto - * fixinc/server.h(defines): ditto - -2000-12-13 Neil Booth - - * tradcpp.c (special_symbol): Improve test for definedness, - though it is still not perfect. - (do_define): Don't define illegal macro names. - -2000-12-07 Aldy Hernandez - - * config/mips/elf.h (ASM_OUTPUT_SECTION_NAME): emit @nobits - if changing into .bss section. - * config/mips/elf64.h: same. - * config/mips/iris6.h: same. - * config/mips/netbsd.h: same. - * config/mips/openbsd.h: same. - -2000-12-13 Neil Booth - - * cppfiles.c (read_name_map): Return null if open () fails. - (remap_filename): Simplify logic. Add ICE if it doesn't work - as expected. Perform secondary lookup attempt on base filename - only. - -Wed Dec 13 19:48:04 MET 2000 Jan hubicka - - * flow.c (notice_stack_pointer_modification_1): Notice midifications - using PRE_MODIFY and POST_MODIFY. - -Wed Dec 13 17:25:32 MET 2000 Jan Hubicka - - * genoutput.c (process_template): Add sanity checking for '@' templates. - -2000-12-13 Bernd Schmidt - - * simplify-rtx.c (cselib_finish): Free reg_values and used_regs - varrays. - -2000-12-12 Mike Stump - - * Makefile.in (distclean): Remove safe-ctype.c as well. - -2000-12-12 Brad Lucier - - * tradcpp.c (do_error): Cast difference of pointers to int - for error message. - -2000-12-12 Franz Sirl - - * config/rs6000/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Move from here... - * config/rs6000/sysv4.h (HANDLE_PRAGMA_PACK_PUSH_POP): ...to here. - -2000-12-12 Jim Wilson - - * rtlanal.c (may_trap_p): Check operand modes of LE, LT, GE, and GT. - -2000-12-12 Alexandre Oliva - - * configure.in: Simplify language enabling/disabling code. - * configure: Rebuilt. - * ch/config-lang.in (target_libs): Set. - (build_by_default): Set to no. - * cp/config-lang.in (target_libs): Set. - * f/config-lang.in (target_libs): Set. - * java/config-lang.in (target_libs): Set. - * objc/config-lang.in (target_libs): Set. - -2000-12-12 Neil Booth - - * tradcpp.c (enum node_type): Add T_ERROR. - (do_error): New function. - (directive_table): Add #error handler. - -2000-12-12 Franz Sirl - - * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): Enable .file/.loc check - for powerpc*-*-*. - * configure: Regenerated. - * config/rs6000/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. - * config/rs6000/rs6000.c (rs6000_unique_section): Use - STRIP_NAME_ENCODING. - -Mon Dec 11 13:51:09 2000 Jeffrey A Law (law@cygnus.com) - - * pa.c (cmpib_comparison_operator): Remove GEU and LTU. - * pa.h (PREDICATE_CODES, cmpib_comparison_operator): Corresponding - changes. - -2000-12-11 Bruce Korb - - * fixinc/fixincl.tpl: initialize all fields for warnings - * fixinc/fixincl.x: regenerate - -2000-12-11 Neil Booth - - * tradcpp.h: For tradcpp, NUL is not whitespace. - -2000-12-11 Neil Booth - - * fix-header.c (read_scan_file): Macro expansion is not a file buffer. - -2000-12-05 Marek Michalkiewicz - - * config/avr/avr.c (compare_condition, compare_sign_p): New functions. - (compare_diff_p, compare_eq_p): Call compare_condition. - (out_tsthi, out_tstsi): Call compare_sign_p. - (avr_progmem_p): Check for error_mark_node. - -2000-12-11 Neil Booth - - * cpperror.c (print_location): New function. - (print_containing_files): Simplify. - (_cpp_begin_message): Simplify and use print_location. - * cppfiles.c (stack_include_file): Update. - (_cpp_pop_file_buffer): Update. - * cpphash.h (struct cpp_buffer): New members - include_stack_listed and type. - * cpplib.c (_cpp_handle_directive): Buffer->inc is not null. - (run_directive): Take buffer type. cpp_push_buffer cannot fail. - (_cpp_do__Pragma, cpp_define, _cpp_define_builtin, cpp_undef, - handle_assertion): Update. - (cpp_push_buffer): Take a buffer type and file name. - (cpp_pop_buffer): Update. Clear include_stack_listed. - * cpplib.h (input_stack_listing_current): Remove. - (enum cpp_buffer_type): New. - (cpp_push_buffer): New prototype. - * cppmacro.c (builtin_macro): Simplify; buffer cannot be null. - * fix-header.c (read_scan_file): Update. - -2000-12-10 Robert Lipe - - * install.texi (i*86-*-sco3.2v5*): Remove information duplicated - in html version. - -2000-12-10 Richard Henderson - - * genrecog.c (find_operand): Handle 'V' format code. - (find_matching_operand): New. - (validate_pattern): Accept '=' for an in-out operand if there - is another operand with a matching constraint. - - * config/i386/i386.md (andqi_ext_0_cc): Use matching constraint - for op1 to op0. - -2000-12-10 Richard Henderson - - * genrecog.c (validate_pattern) [STRICT_LOW_PART]: Fix thinko. - -2000-12-09 Richard Henderson - - * genrecog.c (validate_pattern): Verify that ZERO_EXTRACT and - STRICT_LOW_PART as SET_DEST have in-out constraints. - -2000-12-09 Joseph S. Myers - - * c-common.c (check_function_format): Don't suggest adding format - attributes to functions with no parameter to which to add them. - -2000-12-09 Nick Clifton - - * config/arm/arm.c (arm_expand_prologue): Mark the generated - insn not the set as being DWARF2_FRAME_RELATED_P. - -2000-12-09 Laurynas Biveinis - - * Makefile.in: use $(build_exeext) for all build - system executable targets. - -2000-12-09 Laurynas Biveinis - - * install.texi: remove i[345]86-*-winnt3.5 section. - * configur.bat: removed. - * config/msdos: directory removed. - -2000-12-09 Neil Booth - - * cppfiles.c (NEVER_REREAD, DO_NOT_REREAD): Move from cpphash.h. - * cpphash.h (NEVER_REREAD, DO_NOT_REREAD, ABSOLUTE_PATH): Delete. - * cpplex.c (parse_identifier): Improve diagnostic. - (_cpp_lex_token): Return unconditionally at the end of a directive. - * cpplib.c (read_flag): Verify legality of each flag. - (end_directive): Resotre pfile->skipping before skip_rest_of_line. - (do_line): Use the new read_flag. - * cppmacro.c (struct cpp_macro, parse_arg, replace_args, - check_macro_redefinition, parse_params): Rename var_args to - variadic. - -2000-12-09 Joseph S. Myers - - * .cvsignore: Add info files. - -2000-12-08 Laurynas Biveinis - - * config/winnt: Remove obsolete directory. - * install.texi (Configurations): Remove obsolete documentation for - Windows NT. - -2000-12-08 Joseph S. Myers - - * configure.in: Don't define INSTALL_INFO. - * configure: Regenerate. - * Makefile.in (INSTALL_INFO): Remove. - (info): Depend on info files in source directory. - (cpp.info, gcc.info, c-tree.info): Build info files in source - directory. - (distclean): Don't remove info files. - (maintainer-clean): Remove info files from source directory. - (install-normal): Depend on install-info. - (install-info): Install info files from source directory, if they - exist. - * texinfo.tex: Update to version 2000-11-09.08 from ftp.gnu.org. - -2000-12-08 Alexandre Oliva - - * lcm.c (optimize_mode_switching): Check whether an insn is a NOTE - before taking its NOTE_LINE_NUMBER. - -2000-12-08 Nick Clifton - - * config/arm/arm.md (load_indirect_jump): Add pool ranges. - - * extend.texi: Document ARM "interrupt" function attribute. - Mention that the ARM also support the "naked" function - attribute. - - * config/arm/arm-protos.h (arm_current_func_type): Add - prototype. - - * config/arm/arm.h (EXCEPTION_LR_REGNUM): Define. - (struct machine_function): Add 'func_type' field. - Define bit values for 'func_type' field. - (ARM_FUNC_TYPE): New macro. - (IS_INTERRUPT): New macro. - (IS_VOLATILE): New macro. - (IS_NAKED): New macro. - (IS_NESTED): New macro. - (ARM_INITIAL_ELIMINATION_OFFSET): Use IS_VOLATILE. - - * config/arm/arm.c (isr_attribute_args): New Structure. A - list of "interrupt" function attribute modifiers. - (arm_isr_value): New Function: Returns the type of the current - interrupt function. - (arm_compute_func_type): New Function: Computes the type of - the current function. - (arm_current_func_type): New Function: Returns the type of the - current function. - (use_return_insn): Use arm_current_func_type. - (arm_valid_type_attribute_p): Accept "interrupt" function - attribute. - (arm_comp_type_attributes): Check "interrupt" attributes. - (arm_valid_machine_decl): Accept "interrupt" function - attribute. - (arm_function_ok_for_sibcall): Do not allow interrupt - functions to use sibcalls. - (arm_naked_function_p): Delete. - (print_multi_reg): Remove redundant parameter 'hat'. - (arm_compute_save_reg_mask): New Function: Compute a bit mask - of registers saved during the current function's prologue. - (output_arm_return_instruction): Use arm_current_func_type. - Generate return instruction when LR is not poppsed off the - stack. - (arm_volatile_func): Delete. - (output_arm_prologue): Use arm_current_func_type and - arm_compute_save_reg_mask. - Note presernce of interrupt functions. - (arm_output_epilogue): Use arm_current_func_type and - arm_compute_save_reg_mask. - (arm_expand_prologue): Use arm_current_func_type and - arm_compute_save_reg_mask. - (arm_init_machine_status): Initialize func_type field, if - necessary. - (thumb_expand_prologue): Use arm_current_func_type. - (output_thumb_prologue): Use arm_current_func_type. - -2000-12-08 Brad Lucier - - * tradcpp.c (do_include): Make pointer differences 64-bit clean. - -Fri Dec 8 08:23:29 2000 J"orn Rennecke - - * fp-bit.c (_fpmul_parts): Use USItype variables as inputs - for multiplies. - -2000-12-07 Mike Stump - - * Makefile.in (distclean): Remove alloca.c hashtab.c. - -2000-12-07 Zack Weinberg - - * Makefile.in (HOST_RTL): Add safe-ctype.o. - (safe-ctype.o): New rule. - * system.h: Include safe-ctype.h, not ctype.h. No need to - wrap ctype macros. - - * cpphash.h: Zap IStable and related macros. Define is_* in - terms of safe-ctype.h macros. - * cppinit.c: Delete the IStable and all related code. - - * tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and - is_space arrays. Delete initialize_char_syntax. Change all - references to the above arrays to use macros instead. - * tradcpp.h: Define is_idchar, is_idstart, is_space, and - is_nvspace in terms of safe_ctype.h's macros. - * tradcif.y: is_idchar, is_idstart are macros not arrays. - - * config/i370/i370.c, config/winnt/dirent.c, - config/winnt/fixinc-nt.c, config/winnt/ld.c: - Use uppercase ctype macros. If we included ctype.h, - include safe-ctype.h instead. - - * fixinc/fixfixes.c: Use uppercase ctype macros. Don't test - ISLOWER(c) before calling TOUPPER(c). - * fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk. - * fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h. No need to - wrap ctype macros. Don't test ISUPPER(x) before calling TOLOWER(x). - -2000-12-07 DJ Delorie - - * c-decl.c (grokdeclarator): preserve previous alignments when - rebuilding array types. - -2000-12-07 Neil Booth - - * cppfiles.c (struct include_file): Move from cpphash.h. - (_cpp_never_reread): New function. - (open_file, read_include_file): Use it. - (stack_include_file): Set the buffer's sysp according to the - path in which the file was found. - (find_include_file): Don't set sysp. - (cpp_make_system_header, actual_directory): Update. - (_cpp_execute_include): Do #include_next lookup handling here, - not in cpplib.c. Use _cpp_never_reread. - * cpphash.h (struct_include_file): Remove. - (struct cpp_buffer): New member sysp. - (CPP_IN_SYSTEM_HEADER, _cpp_execute_include): Update. - (_cpp_never_reread): New. - * cpplib.c (read_line_number): Rename read_flag. Rework slightly. - (end_directive): Clear line_extension flag. - (_cpp_handle_directive): Set line_extension flag for #number. - (do_include_next): Handle path lookup in _cpp_execute_include. - (do_line): Cleanup to use read_flag. Don't allow flags in #line. - (_cpp_do_file_change): Update. - (do_pragma_once): Use cpp_never_reread. Clean up. - * cpplib.h (struct lexer_state): New member line_extension. - -2000-12-07 Richard Henderson - - * flow.c (calculate_global_regs_live): Force the stack pointer live - after reload as well. - -2000-12-07 Bruce Korb - - * fixinc/Makefile.*(exeext): the variables are exeext, the - substitution expression is build_exeext. - -2000-12-07 Neil Booth - - * c-common.c (parse_in): Make a cpp_reader *. - * cppfiles.c (_cpp_fake_include): Remove. - * cpphash.h: Similarly. - * cpplib.c (do_line): Don't call _cpp_fake_include. A valid - #line always creates a callback; FC_RENAME if there are no - #line flags. - * fix-header.c (read_scan_file): cpp_push_buffer cannot fail. - The first EOF must be our get_char buffer. - -2000-12-07 Joseph S. Myers - - * c-common.c (warn_format_security): New variable. - (check_format_info): Warn about non-literal formats with no format - arguments if either -Wformat-nonliteral or -Wformat-security is - specified. - (set_Wformat): Set warn_format_security for settings other than 1. - * c-common.h (warn_format_security): Declare. - * c-decl.c (c_decode_option): Decode -Wformat-security and - -Wno-format-security. - * invoke.texi: Document -Wformat-security. - * toplev.c (documented_lang_options): Include -Wformat-security - and -Wno-format-security. - -2000-12-07 Joseph S. Myers - - * c-common.c (check_format_info): Warn for non-constant format - strings with strftime formats if -Wformat-nonliteral. Where the - format can convert arguments, if the format is not a string - literal and there are no arguments to the format, give a different - warning message from the general non-string-literal case. - -2000-12-07 Joseph S. Myers - - * c-common.c (format_wanted_type): Add reading_from_flag. - (print_char_table): Mark %s and %S formats with flag "R". - (check_format_info_main): Set up reading_from_flag appropriately. - If aflag, always set writing_in_flag rather than relying on the - format used being a scanf format and so having it set. - (check_format_types): Check for formats reading through null - pointers. - -2000-12-07 Joseph S. Myers - - * invoke.texi (-Wformat): Document what format features are - checked. - -2000-12-06 Kazu Hirata - - * config/h8300/h8300.h: Fix formatting. - -2000-12-06 Joel Sherrill - - * config.gcc (a29k*-*-rtems*, arm*-*-rtems*, c4x-*-rtems*, - h8300-*-rtems*, hppa1.1-*-rtems, *mips*-*-rtems*): New targets. - * config.gcc (*-rtems*): Add support for gthr-rtems.h. - * gthr-rtems.h, config/a29k/rtems.h, config/arm/rtems-elf.h, - config/h8300/rtems.h, config/mips/rtems.h: New files. - -2000-12-06 Mark Kettenis - - * config.gcc: Reorganize handling of *-*-gnu*, to share target - specific make details with Linux. Update comments to clarify - the distinction between GNU/Linux and GNU/Hurd. - -Wed Dec 6 19:22:02 2000 Jeffrey A Law (law@cygnus.com) - - * contrib.texi: Fix my email address. Update Per's - list of contributions. - -2000-12-06 Rodney Brown - - * c-lex.c (cb_indent): Decorate `str' argument, unused on HP-UX. - * collect2.c (scan_libraries): Remove unused `ch'. - (COFF specific stuff): Prototype ldgetname. Declare and prototype - ldbtread and ldclose. - - * config/alpha/osf.h: Standarize copyright statement. - * config/arc/arc.h: Likewise. - * config/arm/elf.h config/arm/coff.h config/arm/aout.h: Likewise. - * config/arm/arm.c config/arm/arm.h: Likewise. - * config/elxsi/elxsi.h: Likewise. - * config/i386/sco.h: Likewise. - * config/m68k/crds.h config/m68k/hp320.h config/m68k/lynx.h: Likewise. - * config/m68k/m68kv4.h config/m68k/next21.h: Likewise. - * config/m68k/sun3.h: Likewise. - * config/m88k/dgux.h config/m88k/dguxbcs.h: Likewise. - * config/pdp11/2bsd.h config/pdp11/pdp11.h: Likewise. - * config/romp/romp.h: Likewise. - * config/rs6000/aix41.h: Likewise. - * config/sparc/sysv4.h: Likewise. - * config/we32k/we32k.c config/we32k/we32k.h: Likewise. - * fixinc/gnu-regex.c fixinc/gnu-regex.h: Likewise. - * cpplib.h cppexp.c cselib.h profile.c: Likewise. - * longlong.h: Likewise. - * libgcc2.c: Likewise. - -2000-12-06 Herman A.J. ten Brugge - - * machmode.def: Use correct definition for BITSIZE on targets where - BITS_PER_UNIT != 8. - -2000-12-06 Bruce Korb - - * fixinc/Makefile.*: Reduce differences to (ultimately) reduce - the number of them. - -2000-12-06 J. David Anglin - - * pa.c: Include expr.h before c-tree.h. - (remove_useless_addtr_insns): Use reverse_condition_maybe_unordered - instead of reverse_condition. - (print_operand): Correct predicates for GT, GE, LT and LE. Add - predicates for LTGT, UNLE, UNLT, UNGE, UNGT, UNEQ, UNORDERED and - ORDERED. - (cmpib_comparison_operator): Add GEU and LTU codes. - * pa.h (PREDICATE_CODES): Add codes for cmpib_comparison_operator. - * pa.md (bltgt, bunle, bunlt, bunge, bungt, buneq, bunordered, - bordered): New float conditional branch patterns. - -Wed Dec 6 21:03:41 2000 J"orn Rennecke - - * final.c (final_addr_vec_align): Fix clipping to BIGGEST_ALIGNMENT. - -2000-12-06 Sylvain Pion - - * cpplex.c (skip_escaped_newlines): Don't warn for spaces between - backslash and newline, when inside a comment. - -2000-12-06 Joseph S. Myers - - * invoke.texi: Use @table @samp instead of @itemize @minus for - table of language standards. Fix use of @pxref. From Zack - Weinberg. Also exclude specs documentation from generated - manpage, and create separate ENVIRONMENT section. - -2000-12-06 Michael Matz - - * gcse.c (compute_pre_data): Kill trapping expressions in - destination blocks of abnormal edges. - -2000-12-05 Richard Sandiford - - * config/mn10300/mn10300.c (mn10300_print_reg_list): Added. - (mn10300_get_live_callee_saved_regs): Likewise. - (mn10300_gen_multiple_store): Likewise. - (store_multiple_operation): Likewise. - (expand_prologue): Use mn10300_gen_multiple_store(). - * config/mn10300/mn10300-protos.h (mn10300_print_reg_list): Added. - (mn10300_get_live_callee_saved_regs): Likewise. - (mn10300_gen_multiple_store): Likewise. - (store_multiple_operation): Likewise. - * config/mn10300/mn10300.md (store_movm): Use a MATCH_PARALLEL - tied to store_multiple_operation(). - -Tue Dec 5 20:09:14 2000 Jeffrey A Law (law@cygnus.com) - - * builtins.c (expand_builtin_setjmp_setup): Set - current_function_has_nonlocal_label. - -2000-12-05 Neil Booth - - * cppfiles.c (stack_include_file): Push zero-length buffers - in case of failure. Return void, as we don't fail any more. - (read_include_file): Check for files we shouldn't re-read. - Don't return an error code; errors are implied by marking the - file NEVER_REREAD. - (_cpp_execute_include): Move the recursion and in-macro checks - here. Update for stack_include_file not failing. - * cpplib.c (cpp_push_buffer): Always succeed, since - _cpp_execute_include performs the recursion check. Tidy up. - * cpplib.h (cpp_push_buffer): Update prototype. - -2000-12-05 Alexandre Oliva - - * sched-vis.c (visual_tbl_line_length): New variable. - (get_visual_tbl_length): Set it. - (visualize_stall_cycles): Don't let stalls overrun - visual_tbl_line_length. - -2000-12-05 Geoffrey Keating - - * global.c (global_conflicts): Allow for a REG_UNUSED note - with a different mode to the REG set in the insn. - -2000-12-05 Kaveh R. Ghazi - - * Makefile.in (fixinc.sh): Pass $WARN_CFLAGS into fixinc dir. - - * fixinc/Makefile.in (FIXINC_DEFS): Add $(WARN_CFLAGS). - -2000-12-05 Bruce Korb - - * fixinc/mkfixinc.sh(*-gnu*): activate fixinc for GNU/Hurd and - GNU/Linux. - -2000-12-05 Richard Earnshaw - - * fixinc/mkfixinc.sh: Run fixinc on netbsd. - * fixinc/inclhack.def (machine/ansi.h): Run this rule on all files, - to cope with aliased copies. - * fixinc/fixincl.x: Regenerate. - -2000-12-05 Bernd Schmidt - - * sched-vis.c: Guard with #ifdef INSN_SCHEDULING. - * sched-rgn.c: Likewise. - (rgn_print_insn): Fix output. - -2000-12-05 Bruce Korb - - * fixinc/Makefile.*: make these more consistent - * fixinc/mkfixincl.sh: enable BeOS fixincludes - -2000-12-05 Richard Henderson - - * stmt.c (warn_if_unused_value): Move side effects test earlier. - -2000-12-05 Alan Modra - - * bb-reorder.c (reorder_basic_blocks): Do check for EH edges even - when using sjlj. - -2000-12-05 Richard Henderson - - * flow.c (calculate_global_regs_live): Only force stack pointer - live before reload. Force pic register live before reload. - (insn_dead_p): Don't protect pic references from deletion. - -2000-12-05 Joseph S. Myers - - * invoke.texi: Add support for using texi2pod.pl. Don't use - @multitable. - -2000-12-04 Nick Clifton - - * config/arm/arm.c (arm_override_options): Test 'insn_flags' not - 'tune_flags' for XScale nature. - Remove spurious test of HARD_FLOAT and XScale flags. - - * config/arm/arm.md (umulsidi3adddi): Restore "=&r" register - contraint, accidentally changed during XScale contribution. - - * config/arm/lib1funcs.asm (interwork_call_via_, call_via_): Do - not create these functions if the target architecture does not - support Thumb instructions. - -2000-12-04 Joseph S. Myers - - * ONEWS: New file with the current contents of NEWS up to EGCS - 1.1. - * NEWS: Generate automatically from online release notes from EGCS - 1.0 to GCC 2.95.2, using ../contrib/gennews. - -2000-12-04 Neil Booth - - * tradcif.y: Move lexptr to top of file. Add rule to handle - assertions in conditional expressions. - * tradcpp.c (parse_answer): Assertions do not need to go to - end of line in conditional directives. - (parse_assertion): Get first character of identifiers correct. - (test_assertion): New function. - * tradcpp.h (test_assertion): New prototype. - -2000-12-01 Rodney Brown - - * config.gcc: Fix typo for UnixWare 7. - -2000-12-03 Phil Edwards - - * invoke.texi: Replace `pedwarns' with clearer text. - -2000-12-04 Bruce Korb - - * fixinc/Makefile.*(clean): don't clean autogenerated files. - (mainainer-clean): clean autogenerated files - -2000-12-04 DJ Delorie - - * md.texi: Add overview, clarify match_dup and define_expand. - -2000-12-04 DJ Delorie - - * print-tree.c (print_node): Target-specific builtins print - numbers, not names. - -2000-12-04 Jason Merrill - - * stor-layout.c (int_mode_for_mode): Handle MODE_VECTOR_INT, - MODE_VECTOR_FLOAT. - - * diagnostic.c (report_problematic_module): s/function/module/. - - * c-lex.h: Remove decl for check_newline. - -2000-12-04 Gerald Pfeifer - - * README.APOLLO: Remove obsolete file. - -2000-12-04 Neil Booth - - * cppinternals.texi: New file. - -2000-12-04 Neil Booth - - * cppfiles.c (cpp_make_system_header): Take 2 booleans, - and operate on current buffer. - (cpp_read_file): Rename _cpp_read_file. - * cpplib.c (do_line, do_pragma_system_header): Update calls to - cpp_make_system_header. - * fix-header.c: Similarly. - * cpphash.h (_cpp_read_file): Move from... - * cpplib.h: ... here. - * cppinit.c (do_includes, cpp_start_read): Update appropriately. - -2000-12-03 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strspn, expand_builtin_strcspn): - Handle another transformation. - -2000-12-03 Nick Clifton - - * config.gcc: Add support for StrongARM targets. - * config/arm/t-strongarm-elf: New file. - * config/arm/t-strongarm-coff: New file. - * config/arm/t-strongarm-pe: New file. - * config/arm/strongarm-pe.h: New file. - -2000-12-03 Nick Clifton - - * NEWS: Mention XScale has been added. - * config.gcc: Add support for XScale targets. - * config/arm/arm.h: Add support for XScale processor. - * config/arm/arm.c: Add support for XScale processor. - * config/arm/arm.md: Add support for XScale processor. - * config/arm/t-xscale-elf: New file. - * config/arm/t-xscale-coff: New file. - * config/arm/xscale-elf.h: New file. - * config/arm/xscale-coff.h: New file. - -2000-12-03 Richard Henderson - - * bb-reorder.c (reorder_basic_blocks): Don't check for EH edges - unless exception handling is enabled, and if not using sjlj. - - * builtins.c (expand_builtin_setjmp_setup): New. - (expand_builtin_setjmp_receiver): New. - (expand_builtin_setjmp): Split out _setup and _receiver functions. - Move argument parsing in from ... - (expand_builtin): ... here. - * except.c (receive_exception_label): Branch around receiver - unless new-style exceptions. Call expand_builtin_setjmp_receiver. - (start_dynamic_handler): Call expand_builtin_setjmp_setup. - * expr.h: Update builtin setjmp decls. - -2000-12-03 Bruce Korb - - * fixinc/mkfixinc.sh(build machine): Sometimes, there is no canonical - build machine name. Default to the target. - -2000-12-03 Laurynas Biveinis - - * Makefile.in: use $(build_canonical), not $(canonical_build). - -2000-12-03 Bernd Schmidt - - * Makefile.in (OBJS): Add sched-rgn.o. - (sched-rgn.o): New rule. * haifa-sched.c (sched_verbose): No - longer static. - (INSN_PRIORITY, INSN_COST, INSN_UNIT, INSN_REG_WEIGHT, - INSN_BLOCKAGE, UNIT_BITS, BLOCKAGE_MASK, ENCODE_BLOCKAGE, - UNIT_BLOCKED, BLOCKAGE_RANGE, MIN_BLOCKAGE_COST, - MAX_BLOCKAGE_COST): Move to sched-int.h. - (MAX_RGN_BLOCKS, MAX_RGN_INSNS, INSN_REF_COUNT, FED_BY_SPEC_LOAD, - IS_LOAD_INSN, struct haifa_edge, edge_table, NEXT_IN, NEXT_OUT, - FROM_BLOCK, TO_BLOCK, nr_edges, in_edges, out_edges, IN_EDGES, - OUT_EDGES, edgelst, struct region, nr_regions, rgn_table, - rgn_bb_table, block_to_bb, containing_rgn, RGN_NR_BLOCKS, - RGN_BLOCKS, BLOCK_TO_BB, BB_TO_BLOCK, CONTAINING_RGN, - debug_regions, find_single_block_region, find_rgns, too_large, - init_regions, current_nr_blocks, current_blocks, bitset, bitlst, - bitlst_table_last, bitlst_table_size, bitlst_table, bitset_member, - extract_bitlst, bblst, struct candidate, candidate_table, - bblst_table, bblst_size, bblst_last, IS_VALID, IS_SPECULATIVE, - SRC_PROB, target_bb, split_edges, compute_trg_info, - debug_candidate, debug_candidates, bbset, bbset_size, dom, - IS_RGN_ENTRY, IS_DOMINATED, prob, GET_SRC_PROB, edgeset, - rgn_nr_edges, rgn_edges, edgeset_size, edgeset_bitsize, - EDGE_TO_BIT, edge_to_bit, pot_split, ancestor_edges, - compute_dom_prob_ps, ABS_VALUE, INSN_PROBABILITY, - IS_SPECULATIVE_INSN, INSN_BB, MIN_DIFF_PRIORITY, MIN_PROBABILITY, - MIN_PROB_DIFF, check_live_1, update_live_1, check_live, - update_live, set_spec_fed, is_pfree, find_conditional_protection, - is_conditionally_protected, may_trap_exp, haifa_classify_insn, - is_prisky, is_exception_free, add_branch_dependences, - propagate_deps, compute_block_backward_dependences, - debug_dependencies, is_cfg_nonregular, build_control_flow, - new_edge, bb_deps, BITSET_UNION, BITSET_INTER, BITSET_DIFFER, - BITSET_INVERT, BITSET_ADD, BITSET_REMOVE, debug_regions, - UPDATE_LOOP_RELATIONS, INSN_TRAP_CLASS, WORST_CLASS, IS_REACHABLE, - CONST_BASED_ADDRESS_P, free_pending_lists, sched_target_n_insns, - target_n_insns, sched_n_insns, init_ready_list, deaths_in_region, - can_schedule_ready_p, new_ready, schedule_more_p, rgn_print_insn, - rgn_rank, region_sched_info): Move to sched-rgn.c. - (debug_reg_vector): Delete useless function. - (get_bb_head_tail): Likewise. - (insn_issue_delay, insn_cost, ready_add, get_block_head_tail, - no_real_insns_p, rm_line_notes, save_line_notes, - restore_line_notes, rm_redundant_line_notes, sched_init): No - longer static. - (rm_line_notes, save_line_notes, restore_line_notes, - schedule_block, set_priorities): Change argument to be a real - basic block, not one of haifa's "bb"s. All callers changed - (rm_other_notes): Initialize note_list here, not in - schedule_region. - (sched_finish): New function, called from schedule_insn. * * - sched-int.h (INSN_PRIORITY, INSN_COST, INSN_UNIT, INSN_REG_WEIGHT, - INSN_BLOCKAGE, UNIT_BITS, BLOCKAGE_MASK, ENCODE_BLOCKAGE, - UNIT_BLOCKED, BLOCKAGE_RANGE, MIN_BLOCKAGE_COST, - MAX_BLOCKAGE_COST): Moved here from haifa-sched.c. - (get_block_head_tail, no_real_insns_p, rm_line_notes, - save_line_notes, restore_line_notes, rm_redundant_line_notes, - rm_other_notes, insn_issue_delay, set_priorities, schedule_block, - sched_init, sched_finish, ready_add, insn_cost): Declare. - -2000-12-03 Laurynas Biveinis - Bruce Korb - - * Makefile.in: pass $(build_canonical) to mkfixinc.sh. - * fixinc/mkfixinc.sh: accept build system name as an argument. - Use it for choosing the fix build method. Use the target for - selecting special fix rules. - -2000-12-03 Bernd Schmidt - - * Makefile.in (OBJS): Add sched-deps.o. - (sched-deps.o): New rule. - * haifa-sched.c (struct deps, struct haifa_insn_data): Moved to - sched-int.h. - (INSN_DEPEND, INSN_LUID, CANT_MOVE, INSN_DEP_COUNT): Macros moved to - sched-int.h. - (SIZE_FOR_MODE): Delete unused macro. - (reg_known_equiv_p, reg_known_value, reg_pending_clobbers, - reg_pending_sets, reg_pending_sets_all, true_dependency_cache, - anti_dependency_cache, output_dependency_cache, - forward_dependency_cache): Variables moved to sched-deps.c. - (add_dependence, remove_dependence, find_insn_list, - find_insn_mem_list, add_insn_mem_dependence, flush_pending_lists, - sched_analyze_insn, sched_analyze_1, sched_analyze_2, - sched_analyze, group_leader, compute_forward_dependences, - init_deps, free_deps, init_dependency_caches, free_dependency_caches): - Functions moved to sched-deps.c. - (schedule_region): Call init_deps_global and finish_deps_global - instead of directly manipulating dependency data structures. - * sched-deps.c: New file. - (init_deps_global, finish_deps_global): New functions. - * sched-int.h (struct haifa_insn_data, struct deps): Moved here from - haifa-sched.c. - (h_i_d): Declare. - (INSN_DEPEND, INSN_LUID, CANT_MOVE, INSN_DEP_COUNT): Macros moved here - from haifa-sched.c. - - * Makefile.in (OBJS): Add sched-vis.o. - (sched-vis.o): New rule. - * haifa-sched.c (get_unit_last_insn): New function. - (sched_dump, insn_unit, actual_hazard_this_instance): No longer - static. - (schedule_block): Call visualize_alloc and visualize_free. Delete - spurious return statement. - (init_target_units, insn_print_units, get_visual_tbl_length, - init_block_visualization, print_block_visualization, safe_concat, - visualize_scheduled_inns, visualize_no_unit, visualize_stall_cycles, - print_exp, print_value, print_pattern, print_insn, target_units, - MAX_VISUAL_LINES, INSN_LEN, n_visual_lines, visual_tbl, - n_vis_no_unit, vis_no_unit): Move scheduling visualization - functions/variables... - * sched-vis.c: ...here. New file. - (visualize_alloc, visualize_free): New functions. - (visualize_scheduled_insns, visualize_stall_cycles, - print_block_visualization): Lose basic block argument. All callers - changed. - (visualize_scheduled_insns): Use new function get_unit_last_insn. - * sched-int.h (current_sched_info, sched_dump): Declare. - (init_target_units, insn_print_units, init_block_visualization, - print_block_visualization, visualize_scheduled_inns, - visualize_no_unit, visualize_stall_cycles, visualize_alloc, - visualize_free): Declare functions. - - * sched-int.h: New file. - * Makefile.in (haifa-sched.o): Depend on it. - * haifa-sched.c: Include it. - (no_real_insns_p): New function. - (current_sched_info): New static variable. - (__inline, HAIFA_INLINE): Moved to sched-int.h. - (get_block_head_tail): Minor cleanup. - (init_ready_list, can_schedule_ready_p, new_ready, schedule_more_p, - rgn_print_insn, rgn_rank): New functions, broken out of - rank_for_schedule, schedule_insn and schedule_block, where they - are now called through function pointers in current_sched_info. - (queue_insn, schedule_insn, queue_to_ready, debug_ready_list, - print_insn): To display uid and block number, call the print_insn - function pointer in current_schedule_info. - (region_sched_info): New static variable. - (sched_target_n_insns, sched_n_insns, target_n_insns): New global - variables, moved out of schedule_block. - (schedule_block): Return void. All callers changed. - Move some of the setup code into schedule_region. Get head/tail - from current_sched_info, and update it when done. - (schedule_region): Slightly rearranged, some code moved here from - schedule_block. Call no_real_insns_p to avoid doing work for a - block that consists only of notes and labels. - (schedule_insns): Initialize current_sched_info. - -2000-12-03 Neil Booth - - * cppmacro.c (funlike_invocation_p): Re-disable macros enabled - by contexts drops AFTER argument pre-expansion, so that they - remain enabled during argument pre-expansion. - (_cpp_pop_context): Unconditionally re-enable a macro when - dropping a context level. - -2000-12-03 Manfred Hollstein - - * arm/t-linux (MULTILIB_OPTIONS): Comment. - (MULTILIB_DIRNAMES): Likewise. - (EXTRA_MULTILIB_PARTS): Likewise. - (LIBGCC): Likewise. - (INSTALL_LIBGCC): Likewise. - -2000-12-02 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strcat, expand_builtin_strncat, - expand_builtin_strspn, expand_builtin_strcspn): New functions. - (expand_builtin): Handle BUILT_IN_STRCAT, BUILT_IN_STRNCAT, - BUILT_IN_STRSPN and BUILT_IN_STRCSPN. - - * builtins.def (BUILT_IN_STRCAT, BUILT_IN_STRNCAT, - BUILT_IN_STRSPN, BUILT_IN_STRCSPN): New entries. - - * c-common.c (c_common_nodes_and_builtins): Declare builtin - strcat, strncat, strspn and strcspn. - (string_ftype_string_cstring): Renamed from `string_ftype_ptr_ptr'. - - * extend.texi (strcat, strcspn, strncat, strspn): Document new - builtins. - -2000-12-02 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strcmp): Use const*_rtx when - expanding strcmp at compile-time. Add another transformation. - (expand_builtin_strncmp): Add more transformations. Call - expand_builtin_memcmp, not expand_builtin_strcmp, under - appropriate conditions if HAVE_cmpstrsi. - -2000-12-02 David Edelsohn - - * rs6000.md (anddi3_internal[23]): Prefer rldic? over andis - instruction. - (cr logic): Really make operands sequential. - -2000-12-02 Geoffrey Keating - - * c-common.c (combine_strings): When the ISO C standard specifies - the maximum length of a string, it doesn't include the trailing - zero byte. - - * cpplib.c (do_ifdef): Add check_eol() call. - (do_ifndef): Likewise. - -2000-12-02 Daniel Berlin - Bruce Korb - - * fixinc/*: global substitute /__MSDOS__/SEPARATE_FIX_PROC/ - * fixinc/mkfixinc.sh: prepare to use Makefile.BEOS for *-*-beos* - * fixinc/Makefile.DOS: define SEPARATE_FIX_PROC for build - * fixinc/fixfix.c(wrap_fix): avoid wrapping files that - use the "__need_" hackery. It breaks them. - * fixinc/fixincl.c(process - SEPARATE_FIX_PROC): - Sometimes on DOS and BeOS the temp output file cannot be opened. - Skip the file noisily. Ought to be fixed instead. - -2000-12-02 Bruce Korb - - From: 2000-11-19 Kaveh R. Ghazi - - * fixfixes.c (emit_gnu_type, format_write): Prototype. - (format_write, char_macro_use_fix, char_macro_def_fix): Use gcc's - custom uppercase ctype macros. - * fixincl.c (do_version): Make static and add ATTRIBUTE_NORETURN. - Use gcc's custom uppercase ctype macros. - (main): Prototype. - (machine_matches): Add static prototype and constify variable. - (create_file, test_test, egrep_test): Add static prototype. - (quoted_file_exists): Likewise, and constify parameters. - (extract_quoted_files, internal_fix, start_fixer, fix_applies, - write_replacement, test_for_changes): Add static prototype. - (write_replacement, test_for_changes): Delete excess argument to - `create_file'. - * fixtests.c (test): Make static. - * server.c (load_data, sig_handler, server_setup, find_shell): Add - static prototype. - (sig_handler): Mark parameter with ATTRIBUTE_UNUSED. - -2000-12-02 Bruce Korb - - * fixnc/mkfixinc.sh(msdosdjgpp): remove from fixincludes exception list - (per Laurynas Biveinis ) - -2000-12-02 Richard Earnshaw - - * arm.h (ARM_REGNO_OK_FOR_BASE_P, THUMB_REGNO_MODE_OK_FOR_BASE_P): New - macros. - (REGNO_MODE_OK_FOR_BASE_P): Define in terms of above. - (REGNO_OK_FOR_FOR_BASE_P): Delete. - (ARM_REG_OK_FOR_BASE_P, THUMB_REG_MODE_OK_FOR_BASE_P): New macros for - both strict and non-strict uses. - (REG_MODE_OK_FOR_BASE_P): Define in terms of above. - (ARM_REG_OK_FOR_INDEX_P, THUMB_REG_OK_FOR_INDEX_P): New macros. - (REG_OK_FOR_INDEX_P): Define in terms of above. - (REG_OK_FOR_BASE_P): Delete. - (REG_OK_FOR_PRE_POST_P): Delete. - (ARM_BASE_REGISTER_RTX_P): Renamed from BASE_REGISTER_RTX_P. - (ARM_INDEX_REGISTER_RTX_P): Renamed from INDEX_REGISTER_RTX_P. - (ARM_GO_IF_LEGITIMATE_INDEX): Renamed from GO_IF_LEGITIMATE_INDEX. - (THUMB_LEGITIMATE_OFFSET): Renamed from LEGITIMATE_OFFSET. - (ARM_GO_IF_LEGITIMATE_ADDRESS): Adjust for name changes. Use ARM - specific variants rather than general ones. Use ARM_REG_OK_FOR_BASE_P - in pre/post increment cases. - (THUMB_GO_IF_LEGITIMATE_ADDRESS): Similarly for Thumb. - (ARM_LEGITIMIZE_ADDRESS): Similarly. - (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Similarly. - * arm.c (legitimate_pic_address): Similarly. - -2000-12-02 Neil Booth - - * tradcpp.c (struct answer, parse_assertion, parse_answer, - canonicalize_text, find_answer): New. - (do_assert, do_unassert): Provide appropriate function bodies. - (union hashval): New member answers. - -2000-11-23 Marek Michalkiewicz - - * config/avr/avr.md: Document UNSPEC usage. - (*tablejump_rjmp, *tablejump_lib, *tablejump_enh, *tablejump): - Make operand 0 input only, clobber it. Use UNSPEC, not a bogus - MEM for program memory word reference. Do not add the label to - the table index in each of the asm output templates, instead ... - (casesi): ... do it in RTL. Adjust to match the above change. - -2000-12-02 Bernd Schmidt - - * c-common.c (PTRDIFF_TYPE): Provide default here, ... - * c-decl.c: ... not here. - - * haifa-sched.c (sched_dump): Renamed from dump. All users changed. - (old_max_uid): New variable. - (compute_forward_dependences): Renamed from - compute_block_forward_dependences; changed to accept block head and - tail instead of block number. Caller changed. - (free_deps, init_dependency_caches, free_dependency_caches, - init_regions, sched_init): New functions, split out from - schedule_insns and compute_block_backward_dependences. - -2000-12-02 Neil Booth - - * cppexp.c (parse_number): Update diagnostic test. - -2000-12-02 Bernd Schmidt - - * reload1.c (free_for_value_p): New function, frontend to - reload_reg_free_for_value_p. All callers of the latter now call - this function with an additional mode argument. - -2000-12-02 Gerald Pfeifer - - * install.texi (Configurations): Remove obsolete documentation for - hppa*-*-*. - -2000-12-02 Gerald Pfeifer - - * install.texi (Installation): Remove obsolete description for - libstdc++ which is now an integral part of GCC. - -2000-12-01 Jim Blandy - - * dbxout.c (dbxout_parms): Correctly describe parameters passed by - invisible reference in registers, but then spilled to the stack. - Remove code to emit a second stab for such parameters; it attempts - to describe the value's location by introducing a synthetic C++ - `reference' type, and then saying the stack slot has that - reference type. This loses type information (breaking GDB's - `ptype' command, among other things) just to describe a location - which stabs can represent correctly in other ways. - -2000-12-01 Alexandre Oliva - - * final.c (output_addr_const) : Don't assume at least one - operand is a CONST_INT. - - * config/sh/sh.c (reg_class_from_letter): Assign `k' to SIBCALL_REGS. - (machine_dependent_reorg): Split all insns. - * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Compute - reg_class_contents[SIBCALL_REGS]. - (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Add SIBCALL_REGS. - * config/sh/sh.md (calli_pcrel, call_pcrel, call_valuei_pcrel, - call_value_pcrel, call, call_value, sibcall): Match even when - not optimizing. - (sibcalli_pcrel, sibcall_pcrel): Likewise. Use constraint `k' - for call address. - (sibcalli): Likewise. - -2000-12-01 Joseph S. Myers - - * c-common.c (warn_format, warn_format_y2k, - warn_format_extra_args, warn_format_nonliteral): Define. - (check_format_info): Check warn_format_nonliteral and - warn_format_extra_args. - (check_format_info_main): Check warn_format_y2k. - (set_Wformat): New function. - * c-common.h (warn_format_y2k, warn_format_extra_args, - warn_format_nonliteral, set_Wformat): Declare. - * c-decl.c (warn_format): Remove definition. - (c_decode_option): Handle -Wformat-nonliteral, - -Wno-format-extra-args and -Wno-format-y2k, and negated versions. - Use set_Wformat. - * invoke.texi: Document these new options and -Wformat=2. - * toplev.c (documented_lang_options): Add these new options. - -2000-12-01 Joseph S. Myers - - * builtins.def (BUILT_IN_IMAXABS): Add. - * builtins.c (expand_builtin): Also abort on BUILT_IN_IMAXABS. - * c-common.c (c_common_nodes_and_builtins): Create builtin - functions __builtin_imaxabs, and plain imaxabs unless - flag_no_nonansi_builtin outside C99 mode. - (expand_tree_builtin): Handle BUILT_IN_IMAXABS. - * extend.texi: Document builtin imaxabs. - -2000-12-01 Joseph S. Myers - - * c-common.c: Include "defaults.h". - (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Define. - (c_common_nodes_and_builtins): Create string_type_node, - const_string_type_node, wint_type_node, intmax_type_node, - uintmax_type_node, default_function_type, ptrdiff_type_node and - unsigned_ptrdiff_type_node. - * c-common.h (identifier_global_value): Declare. - * c-decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. - (init_decl_processing): Don't create string_type_node, - const_string_type_node, wint_type_node, intmax_type_node, - uintmax_type_node, default_function_type, ptrdiff_type_node and - unsigned_ptrdiff_type_node. - (identifier_global_value): New function. - -2000-12-01 Neil Booth - - * cppinit.c (initialize): Forgotten prototype. - * cpplex.c (_cpp_lex_token): Loop until not skipping. - Always clear PREV_WHITE upon meeting a new line. - * cpplib.c (end_directive): Set pfile->skipping after - skip_rest_of_line. - * cpplib.h (cpp_reader): Remove macro_pos. - * cppmacro.c (cpp_get_line): Don't do anything special inside - macros. - (parse_arg): Add PREV_WHITE if a token appears after new lines. - (funlike_invocation_p): Save and restore the output position - over a successful check for a '('. - (enter_macro_context): Delete uses of macro_pos. - (cpp_get_token): Don't use pfile->skipping. - -2000-12-01 Phil Edwards - - * diagnostic.c: Fix typos in comments. - * diagnostic.h: Likewise. - -2000-11-30 Phil Edwards - - * rtl.texi (Machine Modes): Document BImode and OImode. - -2000-12-01 Joseph S. Myers - - * gcc.c (default_compilers): Add suffixes .mi, .cp, .ii, .FOR and - .FPP. - -2000-12-01 Joseph S. Myers - - * c-decl.c (grokdeclarator): If pedantic, warn about arrays with - incomplete element type. - (grokparms): Before checking for incomplete parameter type, check - the type isn't error_mark_node. - -2000-12-01 Jakub Jelinek - - * builtins.c (target_char_cast): New function. - (expand_builtin_strchr): Use it. - (expand_builtin_strrchr): Use it. - (builtin_memset_read_str): New function. - (expand_builtin_memset): Use target_char_cast. - Try to optimize memset with second argument nonzero using - store_by_pieces. - -2000-11-30 Marek Michalkiewicz - - * install.texi (avr): Replace incomplete list of supported MCU - types with a link to the current one ... - * invoke.texi (AVR Options): ... here. Update -mmcu= to list - all supported MCU types. Document -minit-stack= default. - Document new options -mno-tablejump, -mtiny-stack. - * md.texi (AVR family): Fix typo in 'w' constraint letter - description. Document 'q'. Update 'O'. - -2000-12-01 Bernd Schmidt - - * combine.c (cant_combine_insn_p): Only disallow insns involving - hard regs if they are reg-reg moves. - (try_combine, can_combine_p, combinable_i3pat): Delete old - SMALL_REGISTER_CLASSES tests. - -2000-12-01 Alexandre Oliva - - * config/sh/sh.c (shiftcosts): Don't get INTVAL before testing - whether X is a CONST_INT. - (addsubcosts): Likewise. - - * config/sh/sh.h (OUTPUT_ADDR_CONST_EXTRA): Use INTVAL instead of - mis-used XINT. - (ARG_POINTER_REGNUM): Set to AP_REG. - -2000-11-30 Alexandre Oliva - - * config/sh/sh.md (fpu_switch0, fpu_switch1, movpsi, fpu_switch, - splits): Only match on TARGET_SH4. - - * combine.c (try_combine): Disregard USEs when updating LOG_LINKS - of subsequent insns. - -2000-11-30 Richard Henderson - - * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Disable. - * config/alpha/alpha32.h (ASM_OUTPUT_MI_THUNK): Likewise. - -2000-11-30 Richard Henderson - - * config/alpha/elf.h (ASM_OUTPUT_SECTION_NAME): Copy elfos.h defn. - (DO_SELECT_SECTION): New. - (SELECT_SECTION): Use it. - (UNIQUE_SECTION_P): New. - (UNIQUE_SECTION): New. - -2000-11-30 Alexandre Oliva - - * c-common.c (status_warning) [! ANSI_PROTOTYPES]: Load status - from va_list before using it. - -2000-11-30 Michael Matz - - * flow.c (make_edge): Early out, if no flags to set. - (calculate_global_regs_live): Clear out garbage only when necessary. - - * simplify-rtx.c (varray_type used_regs): New. - (clear_table): Use it to only clear necessary items. - (cselib_lookup, cselib_record_set): Remember newly set items. - (cselib_update_varray_sizes, cselib_init): Initialize and grow - used_regs. - - * local-alloc.c (update_equiv_regs): New local `cleared_regs'. - Move clearing of dead regs out of insn-loop. - -2000-11-30 Richard Henderson - - * calls.c (expand_call): Emit queued insns before creating - the tail recursion sequence. - -2000-11-30 J. David Anglin - Bruce Korb - - * fixinc/inclhack.def(): prevent dual double definition protection - * fixinc/fixincl.x: regenerate - -2000-11-29 Loren J. Rittle - - * fixinc/Makefile.in (fixincl.x): Explicitly state the - location of the generated file. - -2000-11-30 Gerald Pfeifer - - * README.FRESCO: Remove obsolete file. - -2000-11-30 Mark Kettenis - - * config/t-gnu (LIBGCC1, CROSS_LIBGCC1, CRTSTUFF_T_CFLAGS, - TARGET_LIBGCC2_CFLAGS): Remove. We now use the settings from - config/t-linux for the Hurd. - -2000-11-30 Stephane Carrez - - * config/mn10200/udivmod.c, config/mn10200/divmod.c, - config/mn10200/udivmodsi4.c: Moved from here. - * config/udivmod.c, config/divmod.c, config/udivmodsi4.c: To here. - * config/mn10200/t-mn10200 (LIB2FUNCS_EXTRA): Use the generic - C division functions. - * config/m68hc11/t-m68hc11-gas (LIB2FUNCS_EXTRA): Likewise. - -Thu Nov 30 01:12:52 2000 Jeffrey A Law (law@cygnus.com) - - * pa.md (conditional moves): Avoid holes in operand list. - (mod, umod patterns): Similarly. - (variable extract/shift patterns): Similarly. - -2000-11-30 Neil Booth - - * objc/objc-act.c (lang_init, finish_file, maybe_objc_comptypes, - maybe_objc_check_decl, build_objc_string_object, - objc_declare_alias, objc_declare_class, build_message_expr, - build_protocol_expr, build_selector_expr, build_encode_expr, - get_class_ivars, start_class, start_protocol): Remove - redundant code, assuming doing_objc_thang is true. - -2000-11-29 John David Anglin - - * pa.c (restore_unscaled_index_insn_codes): Delete procedure. - (record_unscaled_index_insn_codes): Likewise. - (unscaled_index_insn_codes): Delete. - (max_unscaled_index_insn_codes_uid): Delete. - (output_function_prologue, output_function_epilogue, pa_reorg): - Don't use the unscaled index insn hack. - - * pa.md: Remove hack from all index insns to reverse the operand - order of frame and stack pointer references incorrectly created - in the reload pass. - - * function.h (emit_status): Delete member regno_pointer_flag and - rename regno_pointer_flag_length to regno_pointer_align_length. - Delete define for REGNO_POINTER_FLAG. - * integrate.h (inline_remap): Delete member regno_pointer_flag. - Add member x_regno_reg_rtx. - * rtl.h (rtx_def): Use frame_related bit to indicate register is - a pointer in REG expressions. Define REG_POINTER macro. - * alias.c (find_base_value, find_base_term): Use REG_POINTER - instead of REGNO_POINTER_FLAG. - * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. - * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead - of regno_pointer_flag_length. Remove code which refers to - regno_pointer_flag. - (mark_reg_pointer): Use REG_POINTER. - (free_emit_status): Remove code which refers to regno_pointer_flag. - (init_emit, mark_emit_status): Likewise. - * flow.c (dump_flow_info): Likewise. - * function.c (preserve_temp_slots): Likewise. - * integrate.c (expand_inline_function, copy_rtx_and_substitute): - Use x_regno_reg_rtx instead of regno_pointer_flag for function - pointer determination in map. - * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. - * predict.c (estimate_probability): Likewise. - * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. - * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of - regno_pointer_flag for function pointer determination in map. - * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use - REG_POINTER. - * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): - Use REG_POINTER. - (restore_unscaled_index_insn_codes): Revise comment. - - * expr.c (do_compare_and_jump): Add missing TYPE_MODE in statement. - -2000-11-30 Joseph S. Myers - - * extend.texi: Update documentation for attributes. - -2000-11-29 David O'Brien - - * config/alpha/elf.h (IDENT_ASM_OP): Protect the #define. - (ASM_DECLARE_OBJECT_NAME): Same. - (ASM_FILE_END): Same. - (ASM_FINISH_DECLARE_OBJECT): Same. - (ASM_IDENTIFY_GCC): Same. - (ASM_IDENTIFY_LANGUAGE): Same. - (ASM_OUTPUT_CONSTRUCTOR): Same. - (ASM_OUTPUT_DEF): Same. - (ASM_OUTPUT_DESTRUCTOR): Same. - (ASM_OUTPUT_EXTERNAL_LIBCALL): Same. - (ASM_OUTPUT_SECTION_NAME): Same. - (ASM_WEAKEN_LABEL): Same. - (BSS_SECTION_ASM_OP): Same. - (COMMON_ASM_OP): Same. - (CONST_SECTION_ASM_OP): Same. - (CONST_SECTION_FUNCTION): Same. - (CTORS_SECTION_ASM_OP): Same. - (DTORS_SECTION_ASM_OP): Same. - (ESCAPES): Same. - (FINI_SECTION_ASM_OP): Same. - (IDENT_ASM_OP): Same. - (IDENT_ASM_OP): Same. - (INIT_SECTION_ASM_OP): Same. - (INT_ASM_OP): Same. - (MAX_OFILE_ALIGNMENT): Same. - (SBSS_SECTION_ASM_OP): Same. - (SDATA_SECTION_ASM_OP): Same. - (SECTION_FUNCTION_TEMPLATE): Same. - (SELECT_SECTION): Same. - (SE_CONST_SECTION): Same. - (SIZE_ASM_OP): Same. - (SKIP_ASM_OP): Same. - (STRING_ASM_OP): Same. - (STRING_LIMIT): Same. - (TYPE_ASM_OP): Same. - (TYPE_OPERAND_FMT): Same. - -2000-11-29 Neil Booth - - * c-decl.c (c_decode_option): Don't handle -lang-objc. - * objc/lang-options.h: Remove -lang-objc. - * objc/lang-specs.h: Don't pass -lang-objc to cc1obj. - * objc/objc-act.c (lang_init_options): Set c_language. - -2000-11-29 Jakub Jelinek - - * expr.c (can_store_by_pieces): Reinitialize max_size for reverse - tests. - -2000-11-29 Neil Booth - - * c-pragma.c (init_pragma): Update for parse_in type change. - -2000-11-29 Laurynas Biveinis - - * configure.in: recognize DOS-style absolute paths. - -2000-11-29 Jakub Jelinek - - * expr.h (store_by_pieces): Add prototype. - (can_store_by_pieces): Likewise. - * expr.c (struct store_by_pieces): Renamed from clear_by_pieces. - (can_store_by_pieces): New. - (store_by_pieces): New. - (clear_by_pieces): New. - (clear_by_pieces_1): New. - (store_by_pieces_1): Renamed from clear_by_pieces, handle storing - arbitrary compiler generated constants into memory block. - (store_by_pieces_2): Renamed from clear_by_pieces_1, likewise. - * builtins.c (c_readstr): New. - (builtin_memcpy_read_str): New. - (expand_builtin_memcpy): If src is string constant and - emit_block_move would move it by pieces, compute integer constants - from the string and store it into memory block instead. - (builtin_strncpy_read_str): New. - (expand_builtin_strncpy): If N is not constant zero and c_strlen does - not return INTEGER_CST, don't optimize. - If N is larger than strlen(src) + 1, try to copy the string - including padding with store_by_pieces. - (expand_builtin_strcmp): If both arguments have side effects, don't - optimize. - (expand_builtin_fputs): If STR has side effects, don't optimize. - -2000-11-29 Richard Earnshaw - - * arm.md (sibcall, sibcall_value, sibcall_insn, sibcall_value_insn): - Add use of link register. - -2000-11-29 Joseph S. Myers - - * extend.texi: Update documentation for default format attributes. - -Tue Nov 28 21:56:45 2000 Jeffrey A Law (law@cygnus.com) - - * pa/pa-64.h (ASM_OUTPUT_SECTION_NAME): Use a hash table, not - a list, to keep track of the sections. - -2000-11-28 Nick Clifton - - * config/arm/arm.md (pic_load_addr): Split into - pic_load_addr_arm and pic_load_addr_thumb. - - * config/arm/arm.c (legitimize_pic_address): Generate either - ARM or Thumb versions of pic_load_addr. - (arm_finalize_pic): Generate either ARM or Thumb versions of - pic_load_addr. - -2000-11-28 Richard Henderson - - * calls.c (expand_call): Defer const/pure NO_DEFER_POP until - after sibcall do_pending_stack_adjust. - -Wed Nov 29 00:08:23 2000 J"orn Rennecke - - * jump.c (delete_insn): Check that REG_LABEL note actually contains - a CODE_LABEL. - -2000-11-28 Neil Booth - - * c-common.h: Remove flag_digraphs. - * c-decl.c: Remove flag_digraphs. - (c_decode_option): Don't set it. - * c-lex.c (init_c_lex): Don't do anything for digraphs. - -2000-11-28 Richard Henderson - - * c-parse.in (finish_parse): Update for parse_in type change. - (_yylex): Likewise. - -2000-11-28 Neil Booth - - * cppmacro.c (cpp_scan_buffer_nooutput): Take a boolean - indicating whether to scan all buffers on the stack or - just one. - * cppinit.c (do_includes): Update. - * cppmain.c (main): Update. - * cpplib.h: Update prototype. - -2000-11-28 Richard Henderson - - * genoutput.c (validate_insn_operands): New. - (gen_insn): Call it. - - * config/alpha/alpha.md (divmodsi_internal): Renumber operands. - (divmoddi_internal): Likewise. - * config/arm/arm.md (andsi3_compare0_scratch): Likewise. - * config/i960/i960.md (branch patterns): Likewise. - * config/ia64/ia64.md (tbit_and_0): Likewise. - (tbit_and_1, tbit_or_0, tbit_or_1): Likewise. - * config/m68k/m68k.md (zero_extract memory patterns): Likewise. - * config/mips/mips.md (divmodsi4_internal): Likewise. - (divmoddi4_internal): Likewise. - * config/rs6000/rs6000.md (call patterns): Likewise. - * config/sh/sh.md (movsi_y): Likewise. - * config/sparc/sparc.md: Comment out if 0 v8p shift pattern. - -2000-11-28 Richard Henderson - - * config.gcc: Kill residual pyramid support. - -2000-11-28 Neil Booth - - * c-lex.h (parse_in): Change parse_in to a cpp_reader *. - * c-decl.c (c_decode_option): Update to match. - * c-lex.c (init_c_lex, yyparse): Update to match. - * c-lang.c (lang_init_options): Use cpp_create_reader. - * cppinit.c (cpp_init): Rename initialize. - (cpp_reader_init): Rename cpp_create_reader. Create the - reader. Initialize cpplib if appropriate. - * cpplib.h (cpp_create_reader) New prototype. - (cpp_init, cpp_reader_init): Delete prototypes. - * cppmain.c (general_init, setup_callbacks): New functions. - (main): Use them. - * fix-header.c (scan_in): Change type to cpp_reader *. - (read_scan_file): Update for new cpplib interface and scan_in type. - - * cp/decl.c (parse_in): Change to cpp_reader *. - (lang_decode_option): Update. - * cp/lex.c (lang_init_options): Use new cpplib interface. - (init_cp_pragma, finish_parse, handle_pragma_implementation): Update. - * cp/spew.c (read_token): Update. - * objc/objc-act.c (lang_init_options): Update new cpplib interface. - -2000-11-28 Jakub Jelinek - - * loop.c (load_mems): Avoid using next_label to find end_label. If - jumping outside of the loop (other than loop end), don't hoist MEMs - out of loop. - -2000-11-28 Jan Hubicka - - * calls.c (expand_call): Don't disable tail recursion based - on the loop nest. - -2000-11-28 Neil Booth - - * tradcpp.c (enum node_type): New hash types T_ASSERT, T_UNASSERT. - (struct directive): Drop 4th argument from handlers. - (do_define, do_line, do_include, do_undef, do_else, do_elif, - do_endif): Similarly. - (do_assert, do_unassert, do_ifdef, do_ifndef): New handlers. - (do_ifxdef): Update as common handler of do_ifdef and do_ifndef. - (make_definition, make_undef): Take a const char*. - (make_assertion): New function. - (struct directive_table): Update. - (main): Handle -A command line argument. - (handle_directive): Drop fourth handler argument. - -2000-11-28 Bernd Schmidt - - * simplify-rtx.c (cselib_record_sets): Ignore sets whose destination - is anything but REG or MEM, but look inside STRICT_LOW_PART. - -Tue Nov 28 09:53:50 2000 Richard Kenner - - * system.h (IS_DIR_SEPARATOR): Use uppercase macro name. - (IS_ABSOLUTE_PATHNAME): New macro. - * gcc.c (find_a_file, process_command, do_spec_1, main): Use it. - -2000-11-28 Jakub Jelinek - - * config/i386/i386.md (truncxfsf2_2): Fix predicate. - -2000-11-27 Jim Wilson - - * reload1.c (reload): Use HOST_WIDE_INT for old_frame_size. - -2000-11-27 Matthias Klose - - * extend.texi (Nested Functions): Update URL of Usenix paper. - -2000-11-27 Mark Mitchell - - * function.c (free_after_compilation): Clear x_clobber_return_insn. - -2000-11-27 Neil Booth - - * cppinit.c (cpp_reader_init): Remove handling of warn_paste - command line options. - (cpp_handle_option): Similarly. - * cpplib.h (struct cpp_options): Remove warn_paste. - * cppmacro.c (paste_tokens): Apart from assembler, make - unpasteable token warning mandatory. - -2000-11-27 Neil Booth - - * tradcpp.c (enum pending_dir_t, struct pending_dir): New. - (main): Allocate a pending directive set of these. Use it. - Merge handling of -D and -U. Update handling of pending - directives. Free the memory after use. - -2000-11-27 Bernd Schmidt - - * flow.c (entry_exit_blocks): Add entry for cond_local_set. - (struct propagate_block_info): Add new member cond_local_set. - (propagate_block): Accept new arg cond_local_set. All callers - changed. - (init_propagate_block_info): Likewise. - (calculate_global_regs_live): Allocate & free cond_local_set. Always - rescan if there's overlap between cond_local_set and new_live_at_end. - (mark_set_1): Set bits either in cond_local_set or local_set, as - appropriate. - * basic-block.h (struct basic_block_def): New field cond_local_set. - (propagate_block, init_propagate_block_info): Update prototypes. - -Mon Nov 27 17:29:44 2000 kaz Kojima - - * gcc/config/sh/sh.md (udivsi3_i4, udivsi3_i4_single): Clobber - T register. - -2000-11-27 Richard Earnshaw - - * arm.c (select_dominance_cc_mode): Handle new way that combine - canonicalizes conditional compares. - (arm_select_cc_mode): Likewise. - * arm.md: Garbage collect some dead code. - (cmp_and, cmp_ior): New patterns. - (splitter for conditional move with inverted false): Use cond_exec - and handle unordered comparisons. - -Mon Nov 27 17:22:56 MET 2000 Jan Hubicka - - * i386.c (ix86_force_to_memory, ix86_free_from_memory): New. - * i386-protos.h (ix86_force_to_memory, ix86_free_from_memory): Declare - * i386.md (float?i?f, int/fp operations): Rewrite spliters to use - ix86_force_to_memory and ix86_free_from_memory. - -2000-11-27 Richard Earnshaw - - * arm.md (arm_adddi3, adddi_sesidi_di, adddi_zesidi_di, arm_addsi3, - arm_subsi3_insn, anddi_zesidi_di, arm_andsi3_insn, anddi_notdi_di, - anddi_notzesidi_di, anddi_notsesidi_di, arm_iorsi3, - one_cmpldi2): Merge with splitters to create define_insn_and_split - patterns. Remove redundant splits. - (peephole2 for add:SI of invalid immediate): New. - (peephole2 for minus:SI of invalid immediate): New. - (peephole2 for ior:SI of invalid immediate): New. - (peephole for merge of move and compare): Convert ot peephole2. - (addsf3, adddf3): Mark as commutative. - - * arm.md (thumb peephole for merging stack adjustments): Convert to - peephole2. - -2000-11-27 Bernd Schmidt - - * haifa-sched.c (print_pattern): Prettier output for COND_EXEC. - - * reload1.c (reload_cse_simplify_set): Pass down mode to cselib_lookup. - (reload_cse_simplify_operands): Do nothing about operands where both - the operand and the match_operand fail to give us a mode. - * simplify-rtx.c (wrap_constant): New function. - (entry_and_rtx_equal_p): Except integer constants to come wrapped in a - CONST describing the proper mode. - (rtx_equal_for_cselib_p): Pass down modes to recursive calls of - cselib_lookup. - (cselib_lookup_mem): Call wrap_constant on the rtx that is passed to - htab_find_slot_with_hash. - (cselib_lookup): Likewise. - - Based on a patch from Geoff Keating : - * loop.c (basic_induction_var): If a REG is set from something - that is not a biv, then the REG is not a biv. Even if it is - earlier set from something that is a biv. - -2000-11-27 Alexandre Oliva - - * configure.in (extra_objs): Enclose extra_headers in quotes. - * configure: Rebuilt. - -2000-11-27 Neil Booth - - * c-lex.c (cb_enter_file, cb_leave_file, cb_rename_file): - Combine into the new function cb_change_file. - (init_c_lex): Update. - * cppfiles.c (stack_include_file): Use _cpp_do_file_change. - (cpp_syshdr_flags): Delete. - * cpphash.h (_cpp_do_file_change): New prototype. - Move struct cpp_buffer here from... - * cpplib.h (struct cpp_buffer): ... here. - (enum cpp_fc_reason, struct cpp_file_loc, - struct_cpp_file_change, change_file): New. - (enter_file, leave_file, rename_file, cpp_syshdr_flags): Delete. - * cpplib.c (do_line): Update for new cb_change_file callback. - (_cpp_do_file_change): New function. - (_cpp_pop_buffer): Update to use it. - * cppmain.c (move_printer): Delete. - (main): Set up single callback cb_change_file. - (cb_enter_file, cb_leave_file, cb_rename_file): Delete. - (cb_change_file): New. - * fix-header.c (cur_file, cb_change_file): New. - (recognized_function, read_scan_file): Update. - * scan-decls.c (scan_decls): Update. - * scan.h (recognized_function): Update prototype. - -2000-11-26 Mark Mitchell - - * tree.h (mark_tree_hashtable): New function. - * tree.c (mark_tree_hashtable_entry): New function. - (mark_tree_hashtable): Likewise. - -2000-11-27 Michael Meissner - - * d30v-protos.h (srelational_si_operator): Correctly spell - function. - (urelational_si_operator): Ditto. - (relational_si_operator): Ditto. - (d30v_expand_prologue): Add prototype. - (d30v_expand_epilogue): Ditto. - - * d30v.h (OPTIMIZATION_OPTIONS): Undo November 22nd change. - - * d30v.md (movcccc_*): Delete now unused patterns. - (64 bit comparison splitters): Rewrite to use COND_EXEC instead of - IF_THEN_ELSE. - (define_cond_exec): Use 'b' to select branch flags. - -2000-11-26 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strncmp, expand_builtin_strncpy): New - functions. - (expand_builtin): Handle BUILT_IN_STRNCPY and BUILT_IN_STRNCMP. - - * builtins.def (BUILT_IN_STRNCPY, BUILT_IN_STRNCMP): New entries. - - * c-common.c (c_common_nodes_and_builtins): Declare builtin - strncpy and strncmp. - - * extend.texi (strncmp, strncpy): Document new builtins. - -2000-11-26 Mark Mitchell - - * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Use a hash table, not - a list, to keep track of the sections. - * tm.texi (ASM_OUTPUT_SECTION_NAME): Document the fact that the - parameter provided will always be a canonical string. - -2000-11-26 Neil Booth - - * cppmacro.c (cpp_scan_buffer_nooutput): Only scan the - current buffer. - -2000-11-26 Joseph S. Myers - - * makefile.vms: Remove EGCS references. - -2000-11-26 Ulrich Drepper - - * dwarf2out.c (output_file_names): New function. Compute minimal - combination of directory and file name table and emit them. - (output_line_info): Remove code to emit directory and file name - table and call output_file_names instead. - (file_info_cmp): Helper function to sort directory names. - -2000-11-26 Neil Booth - - * cpplib.h (struct cpp_reader): Remove lang_asm. - (struct cpp_options): Remove c89. New members lang, - extended_numbers. - * cppexp.c (parse_number): Use them. - * cpphash.h (VALID_SIGN): Use them. - * cppinit.c (set_lang, cpp_start_read): Update. - * cpplex.c (parse_string, _cpp_lex_token): Update. - * cpplib.c (_cpp_handle_directive): Update. - * cppmacro.c (parse_args): Update. - * cppmain.c (scan_buffer): Update. - -Sun Nov 26 10:02:37 2000 Richard Kenner - - * fold-const.c (fold, case CONVERT_EXPR): Always return tree of - proper type. - -2000-11-26 Neil Booth - - * Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib. - * c-decl.c: Remove parse_in declaration. - * c-lang.c: Similarly. - * c-lex.c: Similarly. - * c-parse.in: Similarly. - * c-pragma.c: Similarly. - * configure.in: Similarly. - * cp/Make-lang.in: Similarly. - * cp/spew.c: Similarly. - * cp/decl2.c: Remove check for lang-c++ option. - * cp/lang-specs.h: Remove -lang-c++ from cc1plus command line. - * cp/lex.c (lang_init_options): With cpp_reader_init, default to C++. - * c-lex.h: Add declaration of parse_in. - * cppinit.c: Call set_lang after allocating pfile->pending. - * configure: Regenerate. - -2000-11-25 Zack Weinberg - - * combine.c (try_combine): Remove redundant test. - -2000-11-25 Richard Henderson - - * c-common.h (DECL_C_HARD_REGISTER): New. - * c-decl.c (finish_decl): Set it for asm register variables. - * c-semantics.c (emit_local_var): Test it when instantiating one. - -2000-11-25 Richard Henderson - - * c-decl.c (c_expand_body): Use DECL_SOURCE_LINE rather than - lineno for the start of the function. - -2000-11-25 Richard Henderson - - * dwarf2out.c (file_table, file_table_allocated): Remove. - (file_table_allocated): Remove. - (struct file_table): New. - (decl_file_table, line_file_table): New. - (print_dwarf_line_table): Use them. - (size_of_line_prolog): Likewise. - (output_line_info): Likewise. - (add_src_coords_attributes): Likewise. - (gen_subprogram_die): Likewise. - (gen_variable_die): Likewise. - (dwarf2out_add_library_unit_info): Likewise. - (dwarf2out_line): Likewise. - (lookup_filename): Take a struct file_table argument. - (init_file_table): New. - (dwarf2out_init): Use it. - -2000-11-25 Joseph S. Myers - - * invoke.texi: Update sequence points references. - -2000-11-25 Neil Booth - - * c-common.c: Remove USE_CPPLIB conditional inclusions. - * c-common.h: Similarly. - * c-decl.c: Similarly. - * c-lang.c: Similarly. - * c-lex.c: Similarly. - * c-parse.in: Similarly. - * c-pragma.c: Similarly. - * c-pragma.h: Similarly. - * gcc.c: Similarly. - * toplev.c: Similarly. - * cp/cp-tree.h: Similarly. - * cp/decl2.c: Similarly. - * cp/lang-specs.h: Similarly. - * cp/lex.c: Similarly. - * cp/lex.h: Similarly. - * cp/spew.c: Similarly. - * java/lang-options.h: Similarly. - * objc/lang-specs.h: Similarly. - * objc/objc-act.c: Similarly. - - * configure.in: Remove configure option. - * config.in: Regenerate. - * configure: Regenerate. - -2000-11-25 Richard Henderson - - * haifa-sched.c (sched_analyze_1, sched_analyze_2, sched_analyze): - Revert 2000-11-22 change. - -2000-11-25 Bernd Schmidt - - * config/i386/i386.h (FIXED_REGS): Make the three flags registers - fixed. - -2000-11-25 Philipp Thomas - * configure.in (ALL_LINGUAS): Remove en_GB and add sv. - * configure: Rebuilt. - -2000-11-25 Jakub Jelinek - - * config/sparc/sparc.md (muldi3_v8plus): Remove H constraint. - Handle CONST_INT as second argument. - * config/sparc/sparc.c (set_extends): Remove first argument. - Properly handle AND, CONST_INT and CONST_DOUBLE, handle IOR, XOR and - MOV. - (sparc_check_64): Abort if first argument is not REG. - If it is DImode REG, look at the lower register of the register - pair. - - * config/sparc/sparc.c (load_pic_register, restore_regs, - output_return, sparc_v8plus_shift, sparc_function_profiler, - sparc_function_block_profiler, sparc_block_profiler): Fix output - formatting. - -2000-11-25 Alexandre Oliva - - * config/sh/sh.h (TARGET_NONE): New. - (TARGET_SWITCHES): For all variant-selecting switch, use - TARGET_NONE to reset all other variant-selecting switch. Added - empty strings to avoid warnings. - (TARGET_DEFAULT): Set to SH1_BIT. - - * Makefile.in ($(INTL_TARGETS)): Added $(CONFIG_H) for - insn-codes.h. - - * gcc/config/sh/sh.md (sibcalli, sibcalli_pcrel): New insns. - (sibcall_pcrel): New insn_and_split. - (sibcall, sibcall_value, sibcall_epilogue): New expands. - - * config/sh/sh.md (GOTaddr2picreg, symGOT2reg, symGOTOFF2reg, - symPLT_label2reg, call, call_value): Don't set - current_function_uses_pic_offset_table. - * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Don't mark - PIC_OFFSET_TABLE_REGNUM as call_used, so that calc_live_regs - takes it into account. - (FINALIZE_PIC): Delete, useless. - (LEGITIMATE_CONSTANT_P): Delete, unused. - * config/sh/sh.c (sh_expand_prologue): Don't use - current_function_uses_pic_offset_table. Don't special-case - PIC_OFFSET_TABLE_REGNUM. Initialize it if it's ever live and - PIC is enabled. - (sh_expand_epilogue, initial_elimination_offset): Don't - special case PIC_OFFSET_TABLE_REGNUM. - -2000-11-25 Alexandre Oliva , NIIBE Yutaka - - * config/sh/sh-protos.h (symbol_ref_operand): Declare. - * config/sh/sh.md (UNSPEC_CALLER): New constant. - (calli_pcrel, call_valuei_pcrel): Use PIC_REG. - (call_pcrel, call_value_pcrel): New insn_and_splits. - (call, call_value): Use them. - (call_site): New expand. - (sym_label2reg, symPLT_label2reg): Adjust to hold call_sites. - * config/sh/sh.h (OUTPUT_ADDR_CONST_EXTRA) [UNSPEC_CALLER]: - Output call_site label. - (PREDICATE_CODES): Added symbol_ref_operand. - * config/sh/sh.c (symbol_ref_operand): Define. - * emit-rtl.c (try_split): Propagate CALL_INSN_FUNCTION_USAGE - to CALL_INSNs in the split sequence. - -2000-11-24 Nick Clifton - - * config.gcc (v850-*-*): Define c_target_objs and - cxx_target_objs. - - * config/v850/t-v850: Define how to build v850-c.o - - * config/v850/v850.h (struct data_area_stack_element): Move - definition here from v850.c. - - * config/v850v850.c: Include gcc.h to avoid compile time - warning. - (push_data_area): Move to v850-c.c. - (pop_data_area): Move to v850-c.c. - (mark_current_function_as_interrupt): Move to v850-c.c. - (GHS_default_section_names): Allow to be exported. - (GHS_current_section_names): Allow to be exported. - (data_area_stack_elements): Allow to be exported. - (ghs_pragma_section): Move to v850-c.c. - (ghs_pragma_interrupt): Move to v850-c.c. - (ghs_pragma_starttda): Move to v850-c.c. - (ghs_pragma_startsda): Move to v850-c.c. - (ghs_pragma_startzda): Move to v850-c.c. - (ghs_pragma_endtda): Move to v850-c.c. - (ghs_pragma_endsda): Move to v850-c.c. - (ghs_pragma_endzda): Move to v850-c.c. - - * config/v850/v850-c.c: New file: Contains v850 specific - pragma parsing functions. - -2000-11-24 Nick Clifton - - * config.gcc (extra_objs): Remove duplicate description. - (c_target_objs): New variable. Contains target specific - object files for the gcc C compiler only. - (cxx_target_objs): New variable. Contains target specific - object files for the gxx C++ compiler only. - - * configure.in (c_target_objs): Substitute in the makefile. - (cxx_target_objs): Substitute in the makefile. - * configure: Regenerate. - - * Makefile.in (C_TARGET_OBJS): Define and initialize from - c_target_objs. - (CXX_TARGET_OBJS): Define and initialize from - cxx_target_objs. - (C_AND_OBJC_OBJS): Include C_TARGET_OBJS. - - * cp/Make-lang.in (CXX_C_OBJS): Include CXX_TARGET_OBJS). - - * tm.texi (REGISTER_TARGET_PRAGMAS): Add paragraph explaining - about how the use of the 'c_lex' function requires the use of - the target specific, language specific object files feature of - the configuration mechanism. - -Fri Nov 24 18:50:58 2000 Richard Kenner - - * gcc.c (process_command): Use F_OK, not R_OK. - -2000-11-24 Arno J. Klaassen - - * flow.c (print_rtl_and_abort): Remove ANSIism. - -Fri Nov 24 19:54:36 2000 Alexandre Oliva - - * config/sh/sh.h (GENERAL_REGISTER_P, - GENERAL_OR_AP_REGISTER_P, FP_REGISTER_P, XD_REGISTER_P, - FP_OR_XD_REGISTER_P, FP_ANY_REGISTER_P): New macros. Use them - all over. - (SPECIAL_REG): Renamed to SPECIAL_REGISTER_P. - * config/sh/sh.c: Use new macros. - * config/sh/sh.md: Likewise. - -Fri Nov 24 19:46:16 2000 Alexandre Oliva - - * config/sh/sh.md: Clobber MACH_REG and MACL_REG in SImode, - instead of just MACH_REG in DImode. Always refer to FPSCR_REG - in PSImode. - -Fri Nov 24 22:37:41 2000 Denis Chertykov - - * config/avr/avr.c (out_tsthi,out_tstsi): Test simplification bug - fixed. - (machine_dependent_reorg): Wrong optimization based on - NOTICE_UPDATE_CC removed. - -Fri Nov 24 19:48:09 2000 J"orn Rennecke - - * jump.c (delete_computation): Re-instate deletion of feeding insn. - (delete_insn): Look for REG_LABEL notes. - (redirect_tablejump): Delete feeding insns. - -2000-11-24 Bernd Schmidt - - * config/i386/i386.md (call_pop_0, call_pop_1, call_value_pop_0, - call_value_pop_1): Make sure operand numbers are contiguous. - - * fold-const.c (fold_range_test): Avoid crash if LHS or RHS is null. - - * reload1.c (conflicts_with_override): New function. - (emit_input_reload_insns): Use it to tighten test for validity - of substituting into output of previous insn. - - * haifa-sched.c (struct ready_list): New. - (ready_lastpos, ready_add, ready_remove_first, ready_sort): New static - functions. - (schedule_insn): Replace args READY and N_READY with a pointer to a - ready_list; return void. Use the new functions to access the ready - list. All callers changed. - (queue_to_ready, debug_ready_list): Likewise. - (schedule_block): Initialize a ready_list structure. Use new - functions to access it. - (max_priority): Remove unused variable. - (schedule_insn): Don't set it. - - * c-common.c (verify_tree): Don't recurse into CONSTRUCTORs. - - * combine.c (cant_combine_insn_p): New function. - (try_combine): Use it. - - * Makefile.in (c-common.o): Depend on $(OBSTACK_H). - * c-common.c (c-obstack.c): Include "obstack.h". - (struct reverse_tree): Delete. - (reverse_list, reverse_max_depth): Delete. - (build_reverse_tree, common_ancestor, modify_ok): Delete functions. - (struct tlist, struct tlist_cache): New. - (tlist_obstack, tlist_firstobj, warned_ids, save_expr_cache): New. - (add_tlist, merge_tlist, verify_tree, warning_candidate_p, - warn_for_collisions, warn_for_collisions_1, new_tlist): New - static functions. - (verify_sequence_points): Rewritten. - * fold-const.c (fold): Don't lose possibly important sequence - points when removing one arm of TRUTH_ORIF_EXPRs or TRUTH_ANDIF_EXPRs. - -2000-11-24 Richard Sandiford - - * gcc/cse.c (cse_insn): Removed conversion of REG_EQUIV to REG_EQUAL - when reversing a register-to-register copy. Reversal now disabled - when the previous instruction has a REG_EQUIV. - -2000-11-24 Nathan Sidwell - - * c-parse.in (unary_expr): Move VA_ARG from here ... - (primary): ... to here. - -2000-11-23 Graham Stott - - * expr.c (store_constructor): If a field is non addressable and - the target is a MEM use MEM_ALIAS_SET otherwise use get_alias_set. - -2000-11-23 Bernd Schmidt - - * flow.c (print_rtl_and_abort): New function. - (verify_wide_reg, verify_local_live_at_start): Try to dump more - information before aborting. - -2000-11-23 Alexandre Oliva - - * emit-rtl.c (gen_lowpart_common): Use word 0 if register mode - is narrower than requested mode. - (gen_highpart): Abort if register mode is narrower than - requested mode. - -2000-11-23 Graham Stott - - * cse.c (cse_insn): Initialize all regcost variables. - Fix a typo add missing '='. - Only compare costs if there is a replacement insn. - -Thu Nov 23 04:33:33 2000 Alexandre Oliva - - * final.c (output_addr_const) [LABEL_REF]: Simplify. - [MINUS]: Enclose non-CONST_INTs in parentheses. - [default]: Try OUTPUT_ADDR_CONST_EXTRA. - * tm.texi (OUTPUT_ADDR_CONST_EXTRA): Document it. - * varasm.c (decode_rtx_const) [CONST]: If it's not something - PLUS or MINUS a CONST_INT, use the whole CONST with offset 0 - instead of abort()ing. - * sh.c (output_pic_addr_const): Removed. Fixed all callers. - * sh.h (OUTPUT_ADDR_CONST_EXTRA): New. Handle the UNSPECs - formerly handled in output_pic_addr_const. - * sh.md (sym_label2reg, symPLT_label2reg): Enclose UNSPEC - operands of MINUS in CONSTs so that decode_rtx_const() will - accept them. - -Thu Nov 23 04:10:30 2000 Alexandre Oliva - - * config/sh/sh.md (mova_const): New pattern. - (GOTaddr2picreg): Use it. - * config/sh/sh.c (broken_move): Match it. - (mova_p): Don't match it. - (machine_dependent_reorg): Adjust it. - -Thu Nov 23 02:09:09 2000 Alexandre Oliva - - * config/sh/sh.h (FIRST_GENERAL_REG, LAST_GENERAL_REG): New. - Moved most register-number #defines... - * config/sh/sh.md (define_constants): ... here. Use macros to - refer to registers and unspecs. - * config/sh/sh.c: Likewise. - -Thu Nov 23 01:01:32 2000 J"orn Rennecke - - * Makefile.in (HOST_CFLAGS): Add -DGENERATOR_FILE. - (rtl.o, print-rtl.o, bitmap.o, obstack.o): Build with -DGENERATOR_FILE. - (alloca.o, vfprintf.o, ggc-none.o, errors.o): Likewise. - (splay-tree.o, hash.o): Likewise. - GCONFIG_H: New. - (rtl.o, print-rtl.o): Depend on $(GCONFIG_H) instead of $(CONFIG_H). - (bitmap.o, obstack.o, vfprintf.o, ggc-none.o, errors.o): Likewise. - (hashtab.o): Likewise. - (gcov.o): Depend on $(CONFIG_H). - * configure.in: #include insn-codes.h in tm.h. - -2000-11-22 Nick Clifton - - * config/arm/arm.c (arm_encode_call_attribute): Make 'newstr' a - const char * to avoid a compile time warning. - - * config/arm/arm.md (define_constants): Define symbolic names for - the link register, last integer register and the fake CC register. - Update patterns to use these symbolic names. - -2000-11-22 Neil Booth - - * cpplex.c (trigraph_ok): Ensure we don't warn twice. - * cpplib.h (struct cpp_buffer): New member last_Wtrigraphs. - -2000-11-22 Richard Henderson - - * haifa-sched.c (sched_analyze_1): Don't special-case calls - for clobbering registers. - (sched_analyze_2): Likewise. - (sched_analyze): Zap reg_last_uses and reg_last_sets after calls. - -2000-11-22 Chris Demetriou - Neil Booth - - * gcc.c (validate_switches): Validate multiple switches named - in '|' (or) expressions in specs. - (handle_braces): If more than 1 alternative in a '|' spec - matches, call do_spec1 just once. - -2000-11-22 Michael Meissner - - * d30v.h (TARGET_SWITCHES): Add documentation strings. - (TARGET_OPTIONS): Ditto. - (OPTIMIZATION_OPTIONS): Temporarily turn off -frename-registers if - -O3. - -Wed Nov 22 06:40:56 2000 Jeffrey A Law (law@cygnus.com) - - * pa.c (hppa_encode_label): Account for addition of encoding - character when allocating persistent space for the new label - name. - -2000-11-22 Zack Weinberg - - * Makefile.in, config.gcc, configure.in: Expunge remaining - traces of facility for running MD files through C preprocessor. - -2000-11-22 Joseph S. Myers - - * gcov.texi: Add magic comments for texi2pod.pl. - * Makefile.in: Add rules to generate and install gcov.1. - * gcov.1: New (generated) file. - -2000-11-21 Richard Henderson - - * regrename.c (scan_rtx_reg): Terminate the chain rather than - abort on mark_read with NO_REGS. - -2000-11-21 Mike Stump - - * fixinc/fixtests.c (TEST_FOR_FIX_PROC_HEAD): Fix to allow - compilation with older compilers, such as /bin/cc on SunOS. - * fixinc/fixfixes.c (FIX_PROC_HEAD): Ditto. - -2000-11-21 Richard Henderson - - * varasm.c (record_constant): Pad the constructed - constant_descriptor appropriately. - -Wed Nov 22 00:52:55 2000 J"orn Rennecke - - * rtl.h (traverse_md_constants): Declare. - (struct md_constant): Define. - * Makefile.in (HOST_RTL): Add hashtab.o . - (OBJS): Add hashtab.o . - (hashtab.o): New rule. - (rtl.o): Depends on HASHTAB_H. - * rtl.c (hashtab.h): #include. - (md_constants): New static variable. - (def_hash, def_name_eq_p, read_constants): New static functions. - (traverse_md_constants): New function. - (read_name): Do constant expansion. - (read_rtx): Recognize define_constants. - * gencodes.c (print_md_constant): New function. - (main): Emit #defines for all constant definitions encountered. - * md.texi (Constant Definitions): New node. - * gensupport.c (xcalloc): New function. - -2000-11-21 Richard Henderson - - * config/alpha/alpha.c (alpha_split_tfmode_frobsign): New. - * config/alpha/alpha-protos.h: Declare it. - * config/alpha/alpha.md (abstf_internal): Use it. - (negtf_internal): Likewise. - (andnotdi3): Unstar the name. - (movtf_internal): Add o/G alternative. - -2000-11-21 Zack Weinberg - - * stringpool.c (stringpool_statistics): Also report number and - percentage of entries which are identifiers. - -2000-11-21 Diego Novillo - - * gcse.c (hoist_expr_reaches_here_p): Do not mark expr_bb as - visited before visiting it. - -2000-11-21 Nick Clifton - - * config/arm/arm.h: Accept TARGET_CPU_arm9tdmi, - TARGET_CPU_strongarm110 and TARGET_SPU_strongarm1100. - - * config.gcc: Accept --with-cpu=arm9 and --with-cpu=arm9tdmi. - -2000-11-21 Richard Henderson - - * c-common.c (c_unsafe_for_reeval): New function. - (add_c_tree_codes): Register it. - * c-common.h: Declare it. - * tree.c (lang_unsafe_for_reeval): New hook. - (unsafe_for_reeval): Call it. - * tree.h: Declare it. - -2000-11-21 Richard Henderson - - * config/i386/i386.c (i386_simplify_dwarf_addr): Simplify @GOT - references as well. - -2000-11-21 Neil Booth - - * do_includes: Revert to using cpp_read_file. - -2000-11-21 Bernd Schmidt - - * loop.c (consec_sets_giv): If the reg we're examining is anything - but UNKNOWN_INDUCT, do nothing. - Reset the reg's type to UNKNOWN_INDUCT before returning. - - Mostly from Vladimir Makarov (vmakarov@redhat.com) - * ia64.md (attr itanium_class): Define insn types as described in - Itanium docs. - (all insn patterns): Use itanium_class, not type attributes. - Occasionally split alternatives as necessary. - (attr type): Compute from new attr itanium_class. - -2000-11-21 Kaveh R. Ghazi - - * tradcpp.c (output_line_command): Mark system headers as such in - `line' commands. - -2000-11-21 Jakub Jelinek - - * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): SPARC has .file/.loc - support in as as well. - * configure: Regenerate. - -2000-11-20 Richard Henderson - - * c-lex.c (orig_filename): New variable. - (init_c_lex): Set it. Move call to cpp_start_read ... - (yyparse): ... here. New function. - * c-parse.in (yyparse_1): Rename the parser entry point. - * c-tree.h: Declare it. - -2000-11-21 Jakub Jelinek - - * expr.c (do_compare_and_jump): If op0 was replaced by promoted - integer constant, use type of op1 for comparison. - -2000-11-20 Stan Shebs - - * config/rs6000/xm-darwin.h: New file, Darwin host definitions. - * config/rs6000/x-darwin: New file, Darwin host fragment. - * config.gcc (powerpc-*-darwin*): New host. - * system.h (HAVE_DESIGNATED_INITIALIZERS): Allow this to be - overridden by a config file. - -2000-11-20 Neil Booth - - * cppmacro.c (paste_tokens): Rename from paste_payloads. - Change token type after pasting spellings. - (paste_all_tokens): Use it. - * gcc.dg/cpp/paste2.c: Update test. - * objc/execute/paste.m: New test. - -2000-11-20 Richard Henderson - - * dwarf.h (FMT_CODE): Adjust argument order; fix mapping to - dwarf_subscr_data_formats bits. - * dwarfout.c (simple_type_size_in_bits): Handle a type with - no computed size as size zero. - (field_byte_offset): Likewise. - (subscript_data_attribute): Handle a range with no upper bound. - -2000-11-20 Kaveh R. Ghazi - - * gansidecl.h (const): Check __STDC__ before undef'ing `const'. - -2000-11-20 Joseph S. Myers - - * c-typeck.c (build_conditional_expr): When merging type - qualifiers for conditional expressions between a pointer and a - pointer to a void type, merge the qualifiers on the target types - rather than the pointer type. Remove obsolete conditioned out - code. - -2000-11-20 Neil Booth - - * c-lang.c (lang_init_options): Update call to - cpp_reader_init. - * cppmain.c (main): Similarly. - * fix-header.c (read_scan_file): Similarly. - * cp/lex.c (lang_init_options): Similarly. - * objc/objc-act.c (lang_init_options): Similarly. - * cppexp.c (parse_number): Only warn for unextended C89. - * cppinit.c (set_lang): New function. - (cpp_reader_init): Take a LANG argument and pass it to set_lang. - (COMMAND_LINE_OPTIONS): New option std=c++98. - (cpp_handle_option): Use set_lang. - * cpplex.c (_cpp_lex_token): Warn pedantically if not C99. - * cppib.h (enum_c_lang): New enumeration. Update comments. - -2000-11-20 Will Cohen - - * calls.c (expand_call): Clear target only when target is in - hard register and current_function_check_memory_usage is set. - -2000-11-20 Bernd Schmidt - - * toplev.c (rest_of_compilation): Run optimize_mode_switching even - if not optimizing. - * sh.c (emit_sf_insn, emit_df_insn): Just call emit_insn. - -2000-11-19 Richard Henderson - - * crtstuff.c (force_to_data): Use array size 1 not 0. - - * dwarf2out.c (simple_type_size_in_bits): Handle a type with - no computed size as size zero. - (field_byte_offset): Likewise. - -2000-11-20 Joseph S. Myers - - * config.gcc: Fix another typo. - -2000-11-19 Richard Henderson - - * c-decl.c (grokdeclarator): Support flexible array members. - Use open-ended ranges for these and zero-length arrays. - * c-typeck.c (push_init_level): Validate the context of - initialization of a zero-length array. - * tree.c (int_fits_type_p): Be prepared for missing bounds. - * varasm.c (array_size_for_constructor): New. - (output_constructor): Use it for arrays of unspecified length. - * extend.texi (Zero Length): Mention C99 flexible array members. - Document initialization in a top-level struct as valid. - -2000-11-19 Joseph S. Myers - - * config.gcc, invoke.texi: Fix errors in spelling of "deprecated". - - * alias.c (mems_in_disjoint_alias_sets_p): Do use alias sets in - stdarg and varargs functions. - -2000-11-19 Zack Weinberg - - * gcc.c (process_command): Define 'j' variable when - MODIFY_TARGET_NAME is defined. - -2000-11-19 Richard Henderson - - * stor-layout.c (variable_size): Only put SAVE_EXPRs on pending_sizes. - -2000-11-19 Franz Sirl - - * rs6000/rs6000.c (rs6000_encode_section_info): Fix string length - calculation and allocation. - -2000-11-19 Kaveh R. Ghazi - - * builtins.c (c_getstr): Constify variable. - * gmon-sol2.c (_mcleanup): Comment out #endif labels. - * conflict.c (const_conflict_graph_arc): New typedef. - (arc_hash, arc_eq): Avoid needlessly casting away const-ness. - * cppmacro.c (builtin_macro): Likewise. - * dwarf2out.c (output_comp_unit): Constify variable. - * fix-header.c (v_fatal): Add ATTRIBUTE_PRINTF. - * protoize.c (IS_SAME_PATH_CHAR): Use TOUPPER, not toupper. - * ssa.c (ssa_rename_from_hash_function): Avoid needlessly casting - away const-ness. - * tradcpp.c (rescan, do_line, macroexpand, macarg): Use - ISALNUM/ISDIGIT/ISPRINT, not isalnum/isdigit/isprint. - * varasm.c (const_str_htab_hash, const_str_htab_eq, - compare_constant_1, record_constant_1): Constify. - -2000-11-18 Richard Henderson - - * c-decl.c (grokdeclarator): Special case the creation of an - index for a zero-length array. - * tree.c (build_index_type): Revert Oct 20 change. - -2000-11-18 Marek Michalkiewicz - - * config/avr/avr-protos.h (avr_output_addr_vec_elt): Prototype. - * config/avr/avr.c (jump_tables_size): New variable. - (function_prologue): Initialize it as 0. - (function_epilogue): Add it to function_size. - (avr_output_addr_vec_elt): New function. Count words in jump - tables in jump_tables_size. Move code ... - * config/avr/avr.h (ASM_OUTPUT_ADDR_VEC_ELT): ... from here. - Call avr_output_addr_vec_elt instead. - * config/avr/avr.md (tablejump): Remove disabled define_expand. - -2000-11-18 Mark Mitchell - - * configure.in: Make --enable-new-gxx-abi the default. - * configure: Likewise. - -2000-11-18 Kaveh R. Ghazi - - * Makefile.in (tradcpp.o, tradcif.o): Depend on tradcpp.h. - - * tradcif.y: Include tradcpp.h. Constify. Make functions static. - Move extern function declarations to tradcpp.h. - - * tradcpp.c: Likewise. - - * tradcpp.h: New file. - -2000-11-18 Joseph S. Myers - - * c-decl.c (check_for_loop_decls): New function. - * c-parse.in (for_init_stmt): New. - (select_or_iter_stmt): Use for_init_stmt. - * c-tree.h (check_for_loop_decls): New declaration. - -2000-11-18 Neil Booth - - * cppinit.c: Update comments. - (cpp_reader_init): Make -imacro and -include use the standard - #include "" search path. - (do_includes): New function. - -2000-11-18 Ben Elliston - - * config/sh/crt1.asm (start_l): Move PC-relative move instruction - out of a branch delay slot. - -2000-11-17 Richard Henderson - - * config/alpha/elf.h (PREFERRED_DEBUGGING_TYPE): Set to DWARF2_DEBUG. - (ASM_SPEC): Disable and enable .mdebug based on -gstabs. - (ASM_FILE_START): Only write out ecoff .file directive if - emitting mdebug debugging. - -2000-11-17 Richard Henderson - - * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): New. Detect - whether as accepts .file/.loc and produces dwarf2 line info. - * dwarf2out.c (DWARF2_ASM_LINE_DEBUG_INFO): Default on if - the assembler supports it. - * config.in, configure: Regenerate. - -2000-11-17 Richard Henderson - - * fixinc/mkfixinc.sh: Don't disable fixincludes for any linux*. - -2000-11-17 Jim Wilson - - * config/ia64/ia64.c (emit_insn_group_barriers, case CALL_INSN): - Don't clear need_barrier is next_insn is a CALL_INSN, or has - instruction type B or UNKNOWN. - -2000-11-17 Neil Booth - - * cpperror.c (print_file_and_line): Don't display line number if 0. - -2000-11-17 Zack Weinberg - - * ggc.h: Delete ggc_add_string_root and ggc_mark_string. Add - digit_vector and digit_string. - * stringpool.c (digit_vector): New. - (ggc_alloc_string): Use digit_string. - - * stmt.c (digit_strings): Delete. - (init_stmt): Do not initialize digit_strings. - (expand_asm_operands): Use ggc.h's digit_string macro. - * toplev.c (mark_file_stack): Delete. - (compile_file): Don't call init_tree_codes. - (main): No need to make the file stack a GC root. - * tree.c (init_tree_codes): Delete. - * tree.h (init_tree_codes): Delete. - - * c-lex.c: Don't include ggc.h. - (mark_splay_tree_node, mark_splay_tree): Delete. - (init_c_lex): No need to ggc_strdup string constant. Don't add - file_info_tree to GGC roots. - (cb_enter_file, cb_rename_file): No need to ggc_strdup - ip->nominal_fname. - - * Makefile.in (c-lex.o): No longer depends on $(GGC_H). - - * dbxout.c (dbxout_init), - dwarf2out.c (dwarf2out_line), - ggc-common.c (ggc_mark_rtx_children, ggc_mark_trees), - varasm.c (mark_const_hash_entry, mark_pool_constant, init_varasm_once), - xcoffout.c (xcoffout_source_file), - i386.c (load_pic_register): - Delete call(s) to ggc_add_string_root and/or ggc_mark_string. - - * except.c (create_rethrow_ref), - profile.c (init_edge_profiler), - toplev.c (compile_file), - varasm.c (named_section, assemble_static_space, - assemble_trampoline_template, output_constant_def, force_const_mem), - i386.c (load_pic_register), - ia64.c (ia64_encode_section_info), - rs6000.c (rs6000_emit_load_toc_table, create_TOC_reference, - rs6000_emit_prologue, rs6000_emit_epilogue), - rs6000.md (load_toc_aix_si, load_toc_aix_di): - Change ggc_alloc_string (var, -1) to ggc_strdup (var). - - * profile.c (output_func_start_profiler), - tree.c (make_node), - i386.c (load_pic_register): No need to ggc_strdup string constant. - -2000-11-17 Hans-Peter Nilsson - - * Makefile.in (config.status): Depend on config.gcc. - * configure.in : Move - contents of loop into config.gcc, removing autoconf quoting. - Fix changequote bug for alpha*-*-vxworks*. - * configure: Regenerate. - * config.gcc: New. - -2000-11-16 Zack Weinberg - - * c-parse.in (if_prefix): Find the filename and line number at - $-2 and $-1 respectively. - * diagnostic.c (error_recursion): Add missing newline, use - fputs, translate string. - -2000-11-16 Zack Weinberg - - * stringpool.c: New file. - * ggc-common.c (ggc_mark_string_ptr, ggc_add_string_root): Delete. - (ggc_alloc_string): Now in stringpool.o. - * ggc-page.c, ggc-simple.c: Do not define or allocate empty_string. - * ggc.h: Delete prototype of ggc_add_string_root. #define - ggc_add_string_root and ggc_mark_string to nothing. Prototype - init_stringpool and stringpool_statistics. - (ggc_alloc_string): Returns a const char *. - * tree.c (hash_table, do_identifier_warnings): Delete. - (init_obstacks): Don't initialize the identifier hash table. - (get_identifier, maybe_get_identifier, start_identifier_warnings, - set_identifier_size): Now in stringpool.c. - * tree.h (struct tree_string): Constify pointer field. - (approx_sqrt): Prototype. - - * Makefile.in (stringpool.o): Add rule, mention in OBJS. - - * toplev.c (approx_sqrt): New function. - (compile_file): Call stringpool_statistics if mem_report is on. - (main): Call init_stringpool. - - * builtins.c (c_strlen), c-decl.c (finish_decl), c-lex.c - (process_directive), c-typeck.c (constructor_asmspec, struct - initializer_stack, start_init), except.c (create_rethrow_ref), - stmt.c (digit_strings), toplev.c (decode_f_option), tree.c - (built_in_filename), varasm,c (in_named_name, - assemble_static_space, struct constant_descriptor, struct - deferred_string, struct pool_constant, force_const_mem), - i386.c (pic_label_name, global_offset_table_name), rs6000.c - (rs6000_emit_prologue, rs6000_emit_epilogue) : Constify a char *. - - * c-common.c (combine_strings): Combine strings in scratch - buffer, then pass to build_string. - * optabs.c (init_libfuncs), profile.c (init_edge_profiler, - output_func_start_profiler), stmt.c (init_stmt), alpha.c - (alpha_need_linkage), arm.c (arm_encode_call_attribute), - i386.c (load_pic_register), ia64.c (ia64_encode_section_info), - rs6000.c (rs6000_encode_section_info): Create string in - scratch buffer, then pass to ggc_alloc_string. - - * stmt.c (expand_asm_operands): If we must adjust the - constraint strings, do so by creating a new one, not by - modifying the old one in place. Constify some char *s. - * config/pa/pa.c (hppa_encode_label): Drop unnecessary second - argument. Create string in scratch buffer, then pass to - ggc_alloc_string. - * config/pa/pa-protos.h: Update prototype. - * config/pa/elf.h, config/pa/pa.h, config/pa/som.h: - hppa_encode_label takes only one argument. - -2000-11-16 Kaveh R. Ghazi - - * mcore.c (mcore_expand_prolog): Call xmalloc/xrealloc, not - malloc/realloc. - - * cpplib.c (glue_header_name): Likewise. - - * fixincl.c (run_compiles, start_fixer): Likewise. - - * fixlib.c (load_file_data): Likewise. - - * mkdeps.c (munge): Likewise. - -2000-11-17 Hans-Peter Nilsson - - * defaults.h [EH_FRAME_SECTION_ASM_OP] (EH_FRAME_SECTION): Remove - trailing ';'. Fix formatting. - -2000-11-16 Jim Wilson - - * config/ia64/ia64.h (MASK_INLINE_DIV_LAT, MASK_INLINE_DIV_THR): - Shift masks left by one to avoid conflict. - - * config/ia64/ia64.c (ia64_encode_section_info): Disallow decls with - DECL_EXTERNAL set. - -2000-11-16 Nick Clifton - - * config/arm/arm.c (output_arm_prologue): Note nested functions. - (arm_expand_prologue): For nested functions preserve the - static chain register during stack frame creation. - - * config/arm/arm.h (STATIC_CHAIN_REGNUM): Change to 12. - (ARM_INITIAL_FRAME_ELIMINATION_OFFSET): For a nested function - with a stack frame there is a 4 byte gap between the arg - pointer and the hard frame pointer (used to preserve the - static chain register during stack frame creation). - -2000-11-16 DJ Delorie - - * rtl.c (read_rtx): Provide suitable names for unnamed - define_insn and define_insn_and_split patterns, based on file - and line numbers. - -2000-11-15 Neil Booth - - * cpplib.c (start_directive, end_directive): New functions. - (_cpp_handle_directive, run_directive): Use them. - (_cpp_handle_directive): Don't -Wtraditional on indented - null directives. - (_cpp_push_buffer): Don't re-clear was_skipping. - * cpplib.h (struct cpp_reader): New member la_saved. - * cppmacro.c (cpp_get_token): Don't interpret _Pragma in - directives. - - gcc.dg/cpp/_Pragma1.c: Update. - gcc.dg/cpp/_Pragma2.c: New test. - -2000-11-15 Mark Mitchell - - * toplev.c (wrapup_global_declarations): Don't write out - artificial static variables that aren't needed. - -2000-11-15 Bernd Schmidt - - * ia64.c (struct group): New structure. - (last_group): New static array. - (group_idx): New static variable. - (emit_group_barrier_after, errata_find_address_regs, errata_emit_nops): - New static functions. - (emit_insn_group_barriers): Initialize and keep track of group_idx - and last_group. - Call errata_emit_nops if TARGET_B_STEP or TARGET_A_STEP. - Replace all calls to emit_insn_after that emit a group barrier to use - emit_group_barrier_after. - * ia64.h (MASK_B_STEP): New. - (other MASK_XXX macros): Renumbered. - (TARGET_B_STEP): New. - (TARGET_SWITCHES): Add -mb-step. - -2000-11-15 Fred Fish - - * fixinc/mkfixinc.sh (fixincludes): Add *-*-beos* to list of - machines for which fixincludes is not needed. - * config/i386/x-beos (STMP_FIXPROTO): Don't run fixproto. - -2000-11-15 Jason Merrill - - * diagnostic.c (finish_abort): New fn. - (fancy_abort, error_recursion): Use it. - * toplev.c (crash_signal): Likewise. - * diagnostic.h: Declare it. - -2000-11-13 Andrew Haley - - * tree.c (build_type_no_quals): New function. - * tree.h (build_type_no_quals): Declare. - * c-common.c (c_get_alias_set): When considering type - compatibility for pointer types, ignore cv-qualifiers anywhere in - a pointer chain. - -2000-11-15 Graham Stott - - * regrename.c (scan_rtx_rtx): Skip to the next chain on - encountering a terminated chain. - -2000-11-14 Mark Mitchell - - * configure.in: Move check for V3 above check for C++ header-file - directory. - * configure: Regenerated. - -2000-11-14 DJ Delorie - - * config/v850/v850.c: Remove obstacks. - -Tue Nov 14 21:54:31 2000 Marek Michalkiewicz & Denis Chertykov - - * config/avr/avr.c (avr_case_values_threshold): New. - (avr_override_options): Set it depending on options, make it large - when not optimizing to work around "unable to generate reloads". - - * config/avr/avr.h (TARGET_SWITCHES): Add -mno-tablejump option. - (EXTRA_SECTION_FUNCTIONS): Make the .progmem.gcc_sw_table section - executable if not AVR_MEGA. Make sure jump tables are word-aligned. - (JUMP_TABLES_IN_TEXT_SECTION): Define as 0, not 1. - (ASM_OUTPUT_ADDR_VEC_ELT): Optimize, use "rjmp" if not AVR_MEGA. - (avr_case_values_threshold): Declare as extern int. - (CASE_VALUES_THRESHOLD): Define as avr_case_values_threshold. - - * config/avr/avr.md (tablejump): Removed. - (*tablejump_rjmp): New for jump tables made from "rjmp" instructions. - (*tablejump_lib, *tablejump_enh, *tablejump): Change to expect the - index in the table, not multiplied by 2. - (casesi): Change to match the above insns. Always enable. - - * config/avr/libgcc.S (__tablejump__): Rename to __tablejump2__. - Change to expect the word address of the table, multiply it by 2 - here and not in the caller. Change "adiw" to faster "inc". - -2000-11-14 Neil Booth - - * cppexp.c (parse_defined): Call cpp_get_token not - _cpp_get_token. - (lex): Similarly. - * cpplex.c (cpp_output_line): Similarly. - * cpplib.c (glue_header_name, do_line, do_ident, - parse_answer, parse_assertion): Similarly. - (_cpp_handle_diretive): Don't save to lookaheads - when processing directives. - * cppmacro.c (parse_arg, expand_arg): Call cpp_get_token not - _cpp_get_token. - (funlike_invocation_p): Don't save to lookaheads - when pre-expanding arguments. - (_cpp_get_token): Delete. - (cpp_get_token): Merge contents of _cpp_get_token. - -2000-11-14 Jakub Jelinek - - * builtins.c (expand_builtin_setjmp): Set - current_function_calls_setjmp. - (expand_builtin_longjmp): Set current_function_calls_longjmp. - - * config/sparc/sparc.md (builtin_setjmp_setup): New expand. - (do_builtin_setjmp_setup): New insn. - -Tue Nov 14 12:34:56 2000 Richard Kenner - - * tree.c (get_unwidened): Use host_integerp and tree_low_cst. - (int_fits_type_p): For variable bounds, call force_fit_type. - -2000-11-14 Jakub Jelinek - - * varasm.c (struct deferred_string): New structure. - (const_str_htab): New variable. - (STRHASH): New macro. - (mark_const_str_htab_1, mark_const_str_htab, const_str_htab_hash, - constr_str_htab_eq, const_str_htab_del): New functions. - (output_constant_def): Add DEFER argument, defer string - constants until mark_constant_pool time if requested. - (mark_constant_pool): Walk the insn chain even if const_str_htab is - not empty. - (mark_constants): If a SYMBOL_REF for deferred string is found, - output it and remove from hash table. - (output_addressed_constants): Set DEFER to 0 in call to - output_constant_def. - * rtl.h (STRING_POOL_ADDRESS_P): Define. - (output_constant_def): Adjust prototype. - * expr.c (expand_expr): Set DEFER to 1 in call to output_constant_def. - -2000-11-14 Chandrakala Chavva - - * optabs.c (expand_complex_ab):: Use overflow-trapping optabs for - signed types if flag_trapv. - -2000-11-14 Zack Weinberg - - * tradcpp.c, tradcif.y: Update FSF mailing address, delete - reference to GPLv1. - -2000-11-14 Joseph S. Myers - - * c-common.h (CTI_C_SIZE_TYPE): Update comment. - -2000-11-14 Jakub Jelinek - - * varasm.c (struct varasm_status): Change x_const_rtx_sym_hash_table - to array of pool_constnat pointers. - (struct pool_constant): Add next_sym and label members. - (struct pool_sym): Remove. - (init_varasm_status): Change pool_sym into pool_constant. - (mark_pool_constant): Mark pc->label string as well. - (mark_pool_sym_hash_table): Remove. - (mark_varasm_status): Remove it from caller as well. - (free_varasm_status): Don't free pool_sym structures. - (force_const_mem): Don't allocate pool_sym structure, instead - fill pool->label and chain it into rtx_sym hash table. - (find_pool_constant, mark_constant_pool): Use pool_constant instead - of pool_sym. - -2000-11-14 Jakub Jelinek - - * reload1.c (emit_input_reload_insns): Honor forcing of constants - into memory by PREFERRED_RELOAD_CLASS NO_REGS. - -2000-11-14 Michael Matz - - * dominance.c: New file. - * Makefile.in (OBJS): Add dominance.o. - - * flow.c (compute_flow_dominators): Remove. - (compute_immediate_dominators): Remove. - (compute_immediate_postdominators): Remove. - * basic-block.h: Remove their prototypes. - (calculate_dominance_info): Add prototype. - - * dce.c (eliminate_dead_code): Change calls to above functions. - Don't compute dominators but only immediate dominators. - * flow.c (flow_loops_find): Change callers. - * gcse.c (compute_code_hoist_data): Likewise. - * haifa-sched.c (schedule_insns): Likewise. - * ifcvt.c (if_convert): Likewise. - * ssa.c (convert_to_ssa): Likewise, and only compute immediate - dominators. - -2000-11-14 Richard Henderson - - * stmt.c (warn_if_unused_value): Don't warn if the expression - has side effects. - - * c-typeck.c (c_sizeof): Fold result to c_size_type_node. - (c_sizeof_nowarn, c_alignof, c_alignof_expr): Likewise. - -2000-11-13 Franz Sirl - - * loop.c (basic_induction_var): Revert accidental checkin. - -2000-11-13 Hans-Peter Nilsson - - * c-lex.c (cb_leave_file): Harmonize conditions and order of - statements to those of process_directive for (action == act_pop). - - * collect2.c (main): Pass on -B options from COLLECT_GCC_OPTIONS. - - * local-alloc.c (equiv_init_movable_p): References to CC0 are not - movable. - -2000-11-13 Joseph S. Myers - - * c-parse.in (stmts_and_decls): Deprecate use of label at end of - compound statement. - -2000-11-13 Neil Booth - - * cpplex.c (_cpp_lex_token): CPP_COMMENT and true CPP_EOF - cases return without MI check. - * cpplib.c (do_diagnostic): Take boolean of whether to - print the directive name. - (do_error, do_warning): Update. - (do_pragma_dependency): Use it. - * cpplib.h (VARARGS_FIRST): Delete. - (struct cpp_token): Delete integer. - * cppmacro.c (enter_macro_context): Move disabled check - to _cpp_get_token. - (_cpp_get_token): Simplify into a single loop. - -2000-11-13 Richard Earnshaw - - * configure.in: Use 'test -f' not '[ -e'. - * configure: Regenerated. - -2000-11-13 DJ Delorie - - * config/mn10300/mn10300.md (store_movm): Note which registers are - really used or clobbered. - -2000-11-13 Joseph S. Myers - - * c-parse.in (ends_in_label): Remove from %union and %type. - (decls, stmts, lineno_stmt_or_labels, xstmts, - lineno_stmt_or_label, stmt_or_label): Remove. - (stmts_and_decls, lineno_stmt_decl_or_labels_ending_stmt, - lineno_stmt_decl_or_labels_ending_decl, - lineno_stmt_decl_or_labels_ending_label, - lineno_stmt_decl_or_labels_ending_error, - lineno_stmt_decl_or_labels, compstmt_contents_nonempty, - lineno_stmt, lineno_label): New. - (compstmt_nostart): Use compstmt_contents_nonempty. - -2000-11-13 Joseph S. Myers - - * c-common.c (boolean_increment): New function. - * c-common.h (enum c_tree_index): Add CTI_C_BOOL_TYPE, - CTI_C_BOOL_TRUE and CTI_C_BOOL_FALSE. - (c_bool_type_node, c_bool_true_node, c_bool_false_node): Define. - (boolean_increment): Declare. - * c-convert.c (convert): Allow for BOOLEAN_TYPE. - * c-decl.c (init_decl_processing): Create boolean nodes. - (finish_struct): Allow for _Bool bitfields. - * c-parse.in (reswords): Add _Bool. - (rid_to_yy): Allow for RID_BOOL. - * c-typeck.c (default_conversion): Make booleans promote to int. - (convert_arguments, build_unary_op, build_modify_expr, - convert_for_assignment): Allow for booleans. - * ginclude/stdbool.h: Make conforming to C99. - -2000-11-13 Joseph S. Myers - - * c-parse.in (c99_block_start, c99_block_end, - c99_block_lineno_labeled_stmt): New. - (simple_if, do_stmt_start): Use c99_block_lineno_labeled_stmt. - (stmt): Split off selection and iteration statements into... - (select_or_iter_stmt): New. Use c99_block_lineno_labeled_stmt. - -2000-11-13 Joseph S. Myers - - * invoke.texi (-Wtrigraphs, -fdump-translation-unit, -save-temps, - -time): Update. - -2000-11-13 Richard Earnshaw - - * arm.md (mulsidi3adddi, umulsidi3adddi): Revert previous change. - Rewrite to avoid use of match_dup. Don't try to tie registers that - are not in the same mode. - -2000-11-13 Joseph S. Myers - - * invoke.texi: Update lists of languages and suffixes supported. - -2000-11-13 Joseph S. Myers - - * configure.in: Take toplevel configure arguments from the - environment to create configargs.h and substitute - gcc_config_arguments, taking account of any existing configargs.h - if reconfiguring. - * configure: Regenerate. - * gccbug.in: Include toplevel configure arguments in gccbug. - -2000-11-13 Richard Earnshaw - - * varasm.c (struct constant_descriptor): Put CONTENTS inside a - union to make it well-aligned. Update all uses. - -2000-11-13 Joseph S. Myers - - * c-parse.in (initelt): Give appropriate pedantic warnings, - depending on flag_isoc99, for non-ISO syntax and for C99 syntax - outside C99 mode. - (designator): If pedantic, pedwarn for a designator specifying a - range of elements. - * c-typeck.c (set_init_index, set_init_label): Don't pedwarn for - these cases. - * extend.texi: Document the C99 syntax as the preferred syntax, - and the pre-2.5 syntax as obsolete. Mention use of designator - lists for nested subobjects. - -2000-11-13 Joseph S. Myers - - * diagnostic.c (vbuild_message_string, output_do_printf, vnotice): - Add ATTRIBUTE_PRINTF. - * tradcpp.c (v_message, warning, error, fatal, error_with_line): - Add ATTRIBUTE_PRINTF*. - -2000-11-12 Mark Mitchell - - * function.c (assign_parms): When calling put_var_into_stack, make - sure that there are no hidden pending sequences. - -2000-11-12 Kaveh R. Ghazi - - * builtins.c (expand_builtin): Handle BUILT_IN_INDEX and - BUILT_IN_RINDEX. Add missing checks for BUILT_IN_STRCHR and - BUILT_IN_STRRCHR. - - * builtins.def (BUILT_IN_INDEX, BUILT_IN_RINDEX): New entries. - - * c-common.c (c_common_nodes_and_builtins): Declare index and - rindex when nonansi builtins are allowed. - - * extend.texi (index, rindex): Document new builtins. - -2000-11-12 Mark Mitchell - - * configure.in: Turn on libstdc++ V3 by default. - * configure: Regenerated. - - * fixinc/mkfixinc.sh: Use the ordinary fixincludes on Solaris. - -2000-11-12 Jakub Jelinek - - * reload1.c (set_label_offsets): Go inside of PARALLELs. - -2000-11-12 Joseph S. Myers - - * invoke.texi: Clean up option summary. - -2000-11-12 Nick Clifton - - * config/mcore/mcore.c: Fix comment formating, and adjust sequence - of #include headers. - -2000-11-12 Marc Espie - - * configure.in: Fix filds test. - * configure: Regen. - -2000-11-12 Mark Mitchell - - * jump.c (delete_computation): Don't assume that just because an - instruction sets a register, that register is dead. - -2000-11-12 Neil Booth - - * cppexp.c: Don't worry about pfile->skipping. - * cpplib.c (struct if_stack): Make was_skipping unsigned char. - (cpp_handle_directive): Save pfile->skipping in struct cpp_buffer - for handled directives. - (skip_rest_of_line): Use _cpp_lex_token after popping contexts - and releasing lookaheads. - (do_ifdef, do_ifndef, do_if): Use buffer->was_skipping. - (do_else, do_elif, push_conditional): Update logic. - (do_endif): Set buffer->was_skipping rather than pfile->skipping. - (unwind_if_stack): Inline into cpp_pop_buffer. - (cpp_push_buffer): Clear ifs->was_skipping for cpp_handle_directive. - * cpplex.c (_cpp_lex_token): Clear skipping on EOF. Handle - multiple-include optimisation. - * cpplib.h (struct cpp_buffer): New member was_skipping. - * cppmacro.c (_cpp_get_token): Loop whilst pfile->skipping. This - works because skipping == 0 in directives. - (_cpp_release_lookahead): Renamed from release_lookahead. - (cpp_get_token): No need to check skipping as _cpp_get_token does - this for us. No need to handle MI optimisation. - -Sat Nov 11 21:14:02 2000 Mark P Mitchell - - * fixinc/inclhack.def (sunos_matherr_decl): Bypass matherr - declarations that use `__MATH_EXCEPTION' in their prototypes, too. - * fixinc/fixincl.x: Regenerated. - -2000-11-11 Bruce Korb - - * fixinc/inclhack.def (avoid_bool_type): avoid commenting out #endif - (avoid_wchar_t_type): ditto - * fixinc/fixinc.irix: obsoleted - -2000-11-11 Zack Weinberg - - * configure.in: Don't add $outputs to all_lang_makefiles. Add - $srcdir/$s/Makefile.in if it exists. - * configure: Regenerate. - -Sat Nov 11 18:41:20 2000 Mark P Mitchell - - * fixinc/mkfixinc.sh: Use the ordinary fixincludes on IRIX. - -2000-11-11 Jason Merrill - - * function.c (assign_parms): If TREE_ADDRESSABLE is set, try to - give the parm a register and then call put_var_into_stack. - * stmt.c (expand_decl): Likewise. - -2000-11-11 Joseph S. Myers - - * gcc.texi: Adjust wording. - -2000-11-11 Mark Mitchell - - * fixinc/inclhack.def (avoid_wchar_t_type): New fix. - * fininc/fixincl.x: Regenerated. - -2000-11-11 Joseph S. Myers - - * invoke.texi: Correct spelling of -foptimize-register-move. - -2000-11-11 Neil Booth - - Remove CPP_PLACEMARKERs. - - * cppexp.c (lex): Don't handle CPP_PLACEMARKER. - * cpplex.c (_cpp_lex_token): Rename skip_newlines to next_bol - * cpplib.c (skip_rest_of_line, check_eol, cpp_push_buffer): - Similarly. - * cpplib.h: Remove CPP_PLACEMARKER. - (struct lexer_state): Rename skip_newlines to next_bol. - * cppmacro.c (stringify_arg): Don't handle CPP_PLACEMARKER. - Simplify prev_white handling as a result. - (paste_all_tokens): Don't worry about CPP_PLACEMARKERs. - (parse_arg): Empty arguments are now empty, not CPP_PLACEMARKERs. - (parse_args): Similarly. Update argument count tests. - (enter_macro_context): Return 2 to indicate an empty macro. - (replace_args): Don't bother pre-expanding an empty argument. - Handle placemarkers and ## extension during pre-expansion. - (cpp_get_token): Handle empty macro expansions. Don't worry - about CPP_PLACEMARKERs. - (_cpp_create_definition): Empty macros are now empty. - (cpp_macro_definition): Don't special case empty macros. - * scan-decls.c: Don't bother with CPP_PLACEMARKERs. - * c-lex.c: Similarly. - -2000-11-11 Joseph S. Myers - - * gcc.texi, invoke.texi: Add new section discussing language - standards; link to it where appropriate; refer to ISO C instead of - ANSI C. - -2000-11-11 Alexandre Oliva - - * builtins.c (std_expand_builtin_va_start): Take PARM_BOUNDARY - into account. - - * config/sh/sh.h (MODES_TIEABLE_P): Don't tie SFmode to other FP - modes. - -2000-11-10 Joseph S. Myers - - * gcc.texi, gcov.texi: Update dates and version numbers. - -2000-11-10 Zack Weinberg - - * configure.in: Remove AC_PROG_LEX and AC_PROG_YACC. Look for - flex and bison, specifically, first in a unified build and - then installed on the system. - * Makefile.in: Set BISON to @BISON@, FLEX to @FLEX@. Rename - LEXFLAGS to FLEXFLAGS. Adjust ORDINARY_FLAGS_TO_PASS to - match. - - (collect2.o, gcc.o, prefix.o, toplev.o, alloca.o, intl.o, - cppdefault.o): Remove pointless sed munging of source file - name. - -2000-11-10 Bernd Schmidt - - * reload.c (find_reloads_address_1, case POST_MODIFY): Use RELOAD_OTHER - for address reloads. Push replacements for REG_INC notes. - (regno_clobbered_p): New arg SETS. Examine SETs if it's nonzero. All - callers changed. - * reload1.c (choose_reload_regs): Registers set in the insn can't be - used for RELOAD_OTHER reloads. - -2000-11-10 Mark Mitchell - - * c-dump.h: New file. - -2000-11-10 Kaveh R. Ghazi - - * alpha.c (check_float_value): Use memcpy, not bcopy. - * arm.c (output_move_double): Likewise. - * arm.md: Likewise. - * m88k.c (legitimize_operand): Likewise. - * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise. - * m88k.md: Likewise. - * mips.c (override_options): Likewise. - * mips.md: Likewise. - * romp.c (output_fpops): Likewise. - * rs6000.c (rs6000_override_options): Likewise. - * sh.md: Likewise. - * vax.c (check_float_value): Likewise. - - * emit-rtl.c (copy_rtx_if_shared, init_emit_once): Likewise. - * expmed.c (synth_mult): Likewise. - * final.c (add_bb_string): Likewise. - * genattr.c (main): Likewise. - * genattrtab.c (attr_string, simplify_cond, copy_rtx_unchanging): - Likewise. - * jump.c (thread_jumps): Likewise. - * prefix.c (save_string): Likewise. - * real.h (REAL_VALUE_FROM_CONST_DOUBLE): Likewise. - * regclass.c (init_reg_sets, init_reg_sets_1): Likewise. - * reload1.c (reload, eliminate_regs): Likewise. - -2000-11-10 Joseph S. Myers - - * gcc.texi (Service): Update to reflect current practice and - location of the GNU service directory. - -2000-11-09 Bernd Schmidt - - * regrename.c (build_def_use): Mark contents of REG_INC notes as - needing replacement. - - * config/ia64/ia64.md (extendsfdf2, extendsftf2, extenddftf2): Emit - a no-op move if regs are equal. - * toplev.c (rest_of_compilation): Do the noop moves elimination pass - when calling jump after post-reload splitting. - -2000-11-09 Jan van Male - - * c-tree.texi: Fix typos. - * extend.texi: Likewise - * gcov.texi: Likewise - * rtl.texi: Likewise - * tm.texi: Likewise - -2000-11-09 Hans-Peter Nilsson - - * c-lex.c [! NO_IMPLICIT_EXTERN_C] (cb_enter_file): Check - in_system_header and flags[1] before dereferencing flags[2]. - -2000-11-09 Matthew Hiller - - * reload1.c (reload_combine): Fixed calculation of - first_index_reg, last_index_reg. - -2000-11-09 Mark Mitchell - - * c-dump.c (dequeue_and_dump): Dump function bodies. - - * Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o. - (c-dump.o): New target. - * c-common.h (flag_dump_translation_unit): New variable. - (C_TYPE_QUALS): New macro. - (strip_array_types): New function. - (DECL_C_BIT_FIELD): New macro. - (SET_DECL_C_BIT_FIELD): Likewise. - (CLEAR_DECL_C_BIT_FIELD): Likewise. - (dump_info_p): New typedef. - (dump_tree_fn): Likewise. - (lang_dump_tree): New variable. - (dump_node_to_file): New function. - * c-common.c (flag_dump_translation_unit): Define it. - (strip_array_types): New function. - * c-decl.c (c_decode_option): Handle -fdump-translation-unit. - * c-lang.c (finish_file): Call dump_node_to_file if - flag_dump_translation_unit. - * c-semantics.c (mark_rtl_for_local_static): Fix typo in comment. - * c-tree.h (DECL_C_BIT_FIELD): Remove declaration. - * c-dump.c: New file. - -2000-11-09 Christopher Faylor - - * config/i386/cygwin.h: Add mingw startfile prefix. - -2000-11-09 Richard Henderson - - * flow.c (invalidate_mems_from_set): Split out from ... - (mark_set_1): ... here. - (try_pre_increment_1): Use it. Use propagate_block_delete_insn - instead of turning insn into a NOTE_INSN_DELETED. - -2000-11-10 Joseph S. Myers - - * extend.texi, invoke.texi: Move documentation of builtin versions - of C library functions to one place and update. - -2000-11-09 Richard Henderson - - * fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than - the types themselves to discover type equivalence. - -2000-11-09 Mike Stump - - * Makefile.in (distclean): Remove a few extra leftovers. - -2000-11-09 Richard Henderson - - * recog.c (validate_replace_rtx_1): Consider subregs when - replacing a register with a constant inside a sign/zero_extend. - - * config/alpha/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define. - -2000-11-09 Geoffrey Keating - - * c-decl.c (finish_struct): When a structure is completed, - check all its variant types for completeness. - -2000-11-09 Neil Booth - - * cpphash.c: Move cpp_defined here from cpplib.c. - * cpplib.c: Update comments, move cpp_defined to cpphash.c. - * cpplex.c (_cpp_lex_token): Don't leave the lexer at EOL. - * cppmacro.c (cpp_get_token): Update comments, no need now - to catch the CPP_EOF meaning EOL case. - -2000-11-08 Geoffrey Keating - - * config/sparc/sparc.c (sparc_va_arg): When the required alignment - is more than that provided, copy to a temporary. - -2000-11-09 Alexandre Oliva - - * mklibgcc.in (EXTRA_MULTILIB_PARTS): Prevent `make' from - interpreting $out as a macro assignment. - * Makefile.in (T_TARGET): New auxiliary macro and target. - (all): Add a target right in the beginning, so that we don't build - T_TARGET by default. - -2000-11-09 Graham Stott - - * config/i386/i386.md (mmx_pinsrw): Output operands in correct - order for -mintel-syntax. Remove comment now that the operand - order has been checked. - (mmx_pextrw): Likewise. - (mmx_pshufw): Likewise. - -2000-11-09 Jakub Jelinek - - * builtins.c (c_strlen): Use TREE_STRING_LENGTH - 1 for max. - (c_getstr): New function. - (expand_builtin_strstr): Do nothing if -fcheck-memory-usage. - If both arguments are constant string, optimize out. - (expand_builtin_strchr, expand_builtin_strrchr): New functions. - (expand_builtin_strpbrk): Use c_getstr, do nothing if - -fcheck-memory-usage. - (expand_builtin_fputs): Likewise. - (expand_builtin_strcmp): Add MODE argument. - Use even if !HAVE_cmpstrsi. - Optimize the case when both arguments are constant strings. - (expand_builtin): Adjust expand_builtin_strcmp caller. - Call expand_builtin_strchr and expand_builtin_strrchr. - * c-common.c (c_common_nodes_and_builtins): Add strchr and strrchr - builtins. - * builtins.def (BUILT_IN_STRRCHR): Add. - -2000-11-08 Gerald Pfeifer - - * fixinc/gnu-regex.c: Rename EGCS LOCAL markers to GCC LOCAL. - -2000-11-09 Joseph S. Myers - - * calls.c (expand_call, emit_library_call_value_1), collect2.c - (scan_prog_file), config/a29k/a29k.c (print_operand), - config/sparc/sparc.c (order_regs_for_local_alloc): Use memcpy () - instead of bcopy (). - * real.h: Use memcmp () instead of bcmp (). - * config/m88k/m88k.c (m88k_layout_frame), config/sh/sh.c - (split_branches), config/sparc/sparc.c (ultra_flush_pipeline, - ultrasparc_sched_init, ultrasparc_sched_reorder), - config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Use memset () - instead of bzero (). - * config/vax/xm-xms.h (FILE_NAME_NONDIRECTORY): Use strrchr () - instead of rindex (). - * configure.in: Don't check for bzero, bcmp, index or rindex. - * configure, config.in: Regenerate. - * system.h: Don't include declarations for bzero, bcmp, index or - rindex. - * config/i386/xm-beos.h, config/rs6000/xm-beos.h: Don't define - bzero, bcmp, index or rindex. - -Wed Nov 8 21:58:20 2000 Christopher Faylor - - * config/i386/cygwin.h: Add -no-win32 switch. Separate -mno-cygwin - include and library paths from -mcygwin case. Parameterize some - declarations to avoid warnings. Use standard locations for include and - lib dirs. - -2000-11-08 Nick Clifton - - * config/arm/arm.md (mulsidi3adddi): Change output operand - constraint from "=&" to "+&". - (umulsidi3adddi): Change output operand constraint from "=&" to - "+&". - -2000-11-08 Richard Henderson - - * flow.c (init_propagate_block_info): Protect the rtx stored in - mem_set_list from modification by find_auto_inc. - (mark_set_1): Likewise. - -2000-11-08 Neil Booth - - Move directive handling into the lexer itself. - - * cpplex.c (_cpp_lex_token): Handle directives directly. - In the case of a directive interrupting a function-like - macro invocation, use extra_char since read_ahead is - used to store the '#'. Return a CPP_EOF in this case. - * cppmacro.c (parse_arg): No need to handle CPP_DHASH any more. - (cpp_get_token): Don't handle directives here. - * cpplib.h: Remove CPP_DHASH token type. - -Wed Nov 8 21:53:41 MET 2000 Jan Hubicka - - * regmove.c (combine_stack_adjustments_for_blocks): Recognize pushes - formed using PRE_MODIFY too. - -2000-11-08 Mark Mitchell - - * c-tree.texi (VAR_DECL): Describe representation of GCC's - extension for placing variables in particular registers. - - * c-tree.texi (FUNCTION_TYPE): Clarify TYPE_ARG_TYPES for - unprototyped C functions with no parameters. - -2000-11-08 Jakub Jelinek - - * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Cast DELTA to int - before passing to fprintf. - -2000-11-08 Jakub Jelinek - - * function.c (expand_function_start): Cast GET_MODE_SIZE to - HOST_WIDE_INT before negating it. - -2000-11-08 Jakub Jelinek - - * expr.c (expand_expr) [ADDR_EXPR]: Handle when op0 is RETURN_DECL - passed in multiple non-contiguous locations. - -2000-11-08 Gerald Pfeifer - - * README.gnat: Remove file. - -2000-11-08 Alexandre Oliva - - * mklibgcc.in (EXTRA_MULTILIB_PARTS): Generate multilib parts - in-place. - -2000-11-07 Richard Henderson - - * dwarfout.c (INSN_LABEL_FMT): Remove. - (output_label_die): Use ASM_GENERATE_INTERNAL_LABEL. - (dwarfout_label): Remove. - * dwarfout.h: Remove it's prototype. - * dwarf2out.c (INSN_LABEL_FMT): Remove. - (gen_label_die): Use ASM_GENERATE_INTERNAL_LABEL. - (dwarf2out_label): Remove. - * dwarf2out.h: Remove it's prototype. - * final.c (final_scan_insn): Don't call dwarf[2]out_label. - -2000-11-07 Richard Henderson - - * config/ia64/fde-glibc.c (find_fde_for_dso): Do a binary - search on the unwind region section. - - * config/ia64/ia64.md (movbi): Add r/r alternative. - (cmovdi_internal_astep): Describe all combinations of register - classes for sources & destinations; remove matching constraints. - (cmovdi_internal): Likewise. - - * gcc.c (default_compilers) [@cpp-output]: Add -fpreprocessed. - -2000-11-07 Richard Henderson - - * c-lang.c (start_cdtor, finish_cdtor): New functions. - (finish_file): Use them in building constructor/destructor functions. - - * config/alpha/alpha.h (HAS_INIT_SECTION, LD_INIT_SWITCH, - LD_FINI_SWITCH): Move ... - * config/alpha/osf.h: ... here. - * config/alpha/alpha-interix.h: Don't undef them. - -2000-11-07 Jeffrey Oldham - - * config/mips/t-iris6 (FPBIT): New. Added so that __unorddf2 is - included in libgcc.a. - (DPBIT): Likewise. - (dp-bit.c): Likewise. - (fp-bit.c): Likewise. - -2000-11-07 Nick Clifton - - * config/m88k/m88k.h (GLOBAL_ASM_OP): Add missing tab. - (INTERNAL_ASM_OP): Add missing tab. - -2000-11-07 Joseph S. Myers - - * alias.c (init_alias_analysis), calls.c (expand_call, - emit_library_call_value_1), combine.c (init_reg_last_arrays), - cse.c (new_basic_block), dbxout.c (dbxout_type), diagnostic.c - (init_output_buffer, set_diagnostic_context), dwarf2out.c - (equate_decl_number_to_die, build_abbrev_table), emit-rtl.c - (init_emit_once), fold-const.c (mul_double, div_and_round_double), - function.c (assign_parms), gcse.c (compute_can_copy, - alloc_gcse_mem, alloc_reg_set_mem, record_one_set, - compute_hash_table, compute_set_hash_table, - compute_expr_hash_table), genattrtab.c (optimize_attrs), global.c - (global_alloc, global_conflicts), haifa-sched.c (compute_trg_info, - clear_units, schedule_block), integrate.c (initialize_for_inline, - expand_inline_function), jump.c (thread_jumps), local-alloc.c - (local_alloc), loop.c (combine_movables, count_loop_regs_set, - load_mems_and_recount_loop_regs_set), print-tree.c (debug_tree), - regclass.c (init_reg_sets, init_reg_sets_1, regclass, - record_reg_classes, allocate_reg_info), reload.c - (get_secondary_mem, remove_address_replacements, find_reloads), - reload1.c (reload, set_initial_label_offsets, finish_spills, - reload_as_needed, choose_reload_regs_init, - reload_cse_simplify_operands), reorg.c (dbr_schedule), sbitmap.c - (sbitmap_zero), simplify-rtx.c (simplify_plus_minus), ssa.c - (rename_registers), stmt.c (expand_end_case), unroll.c - (unroll_loop), varray.c (varray_grow), objc/objc-act.c: Use memset - () instead of bzero (). - -2000-11-07 Neil Booth - - * cp/lang-specs.h: Fix -save-temps specs under USE_CPPLIB. - -2000-11-07 Kaveh R. Ghazi - - * c-common.c (combine_strings): Only warn about long strings for C. - -Tue Nov 7 19:44:30 2000 J"orn Rennecke - - * combine.c (distribute_notes): Fix typo in last change. - -2000-11-07 Geoff Keating - - * config/rs6000/rs6000.md (movdi_internal32+1): Use - operand_subreg_force rather than gen_rtx_SUBREG. - (movdi_internal32+2): Likewise. - -2000-11-07 Philip Blundell - - * configure.in (arm*-*-linuxaout*): Obsolete, deleted. - * config/arm/linux-aout.h: Likewise. - * configure: Regenerate. - -2000-11-07 Philipp Thomas - - * ABOUT-GCC-NLS: Remove the patch for gettext as it has been - accepted my the gettext maintainer. - -2000-11-07 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strpbrk): New function. - (expand_builtin): Handle BUILT_IN_STRPBRK. - - * builtins.def (BUILT_IN_STRPBRK): New entry. - - * c-common.c (c_common_nodes_and_builtins): Declare builtin - strpbrk. - -2000-11-07 David O'Brien - - * config/alpha/freebsd.h: New file -- FreeBSD/alpha architecture file. - * POTFILES.in: Add config/alpha/freebsd.h - * configure.in: Add alpha*-freebsd support. - * configure: Regenerate. - -2000-11-07 Joseph S. Myers - - * tree.c (build_common_tree_nodes_2): Make va_list_type_node be a - copy of ptr_type_node rather than ptr_type_node itself. - -Tue Nov 7 06:29:24 2000 J"orn Rennecke - - * combine.c (recog_for_combine): Allocate uninitialized vector with - rtvec_alloc. - * recog.c (apply_change_group): Likewise. - -Tue Nov 7 06:24:02 2000 J"orn Rennecke - - * flow.c (verify_local_live_at_start): Back out last change. - * combine.c (distribute_notes): When parts of a hard reg are - neither set nor referenced in PLACE, search backwards for a - place to put a REG_UNUSED note; if none found, ask for flow - info refresh. - -Mon Nov 6 20:08:13 2000 J"orn Rennecke - - * reload1.c (eliminate_regs_in_insn): Allow a set to be a PARALLEL - with (clobber (match_scratch...)). - -2000-11-06 Neil Booth - - * c-lex.c (init_c_lex): If cpp_start_read fails, exit with - error status. - -2000-11-06 Neil Booth - - * tradcpp.c (special_symbol): Assign an null string rather - than writing to an unallocated buffer. - -2000-11-06 Neil Booth - - * cpplex.c (_cpp_equiv_tokens): Check arg_no in the - CPP_MACRO_ARG case. - -2000-11-06 Neil Booth - - * c-lex.c (c_lex): Replace tok.val.aux with tok.val.c or - tok.val.arg_no as appropriate. - * cppexp.c (lex): Similarly. - * cpplex.c (_cpp_lex_token, cpp_spell_token, cpp_output_token, - cpp_equiv_tokens, cpp_can_paste, cpp_avoid_paste): Similarly. - * cppmacro.c (stringify_arg, replace_args, lex_expansion_token, - cpp_macro_definition): Similarly. - * cpplib.h (struct cpp_token): Replace aux with c and arg_no. - -2000-11-06 Jakub Jelinek - - * config/sparc/sparc.md (adddi3): If operands[2] is 4096 and - operands[1] is constant, calculate the sum and generate movdi. - (addsi3): Similarly. Use SImode in call to arith_4096_operand. - (subsi3): Use SImode in call to arith_4096_operand. - -2000-11-06 Jakub Jelinek - - * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): On sparc64 we need to - adjust %o1, not %o0 if the return type is large structure. - -2000-11-06 Jakub Jelinek - - * config/sparc/sparc.md (smulsi3_highpart_v8plus, ashldi3_v8plus+1, - update_return, flush, flushdi, ffssi2, ffsdi2): Fix output formatting. - -Sat Sep 23 19:10:20 2000 Denis Chertykov & Marek Michalkiewicz - - * expmed.c (expand_divmod): For signed divide by 2, prefer - a branch and fewer shifts if branches are very cheap. - -2000-11-05 Joseph S. Myers - - * Makefile.in: Remove all targets related to building - distributions and diffs, or INSTALL. - * INSTALL, install1.texi: Remove. - * configure.in: Remove mention of distdir. - * configure: Regenerate. - * objc/Make-lang.in: Remove mention of distdir. - -2000-11-04 Neil Booth - - * cpp.texi: Update for _Pragma. - -2000-11-04 Joseph S. Myers - - * gcc.texi (Contributing): Update URL for projects web page. - -2000-11-04 Neil Booth - - * cpplex.c (parse_string): Don't allow multiline strings in - #include family directives. - -2000-11-04 Neil Booth - - * cpplib.c (do_line): Only warn pedantically if not reading - preprocessed input. - -2000-11-04 Alexandre Oliva - - * calls.c (emit_call_1) [sibcall_pop]: Use n_popped instead of - RETURN_POPS_ARGS(). - -2000-11-03 Zack Weinberg - - * builtins.c (expand_builtin_strlen): Remove unused mode - argument. - * gcc.c (process_command): Remove unused variable. - * fold-const.c: Include expr.h. - * recog.c: Include reload.h. - * Makefile.in (recog.o, fold-const.o): Update deps. - -2000-11-02 Geoffrey Keating - - * fixinc/gnu-regex.c: Change 'CYGNUS LOCAL' to 'EGCS LOCAL'. - -Fri Nov 3 13:41:04 2000 Mark P Mitchell - - * config/mips/iris6.h (SUBTARGET_CC1_SPEC): Remove -static - handling. - (STARTFILE_SPEC): Likewise. - (LINK_SPEC): Likewise. - -2000-11-03 Kaveh R. Ghazi - - * Makefile.in (fold-const.o): Depend on $(GGC_H), not ggc.h. - (toplev.o): Likewise for $(LOOP_H)/loop.h and $(REGS_H)/regs.h. - (simplify-rtx.o): Likewise for $(GGC_H)/ggc.h. - -2000-11-03 Joseph S. Myers - - * c-decl.c (duplicate_decls, copy_lang_decl), dwarfout.c - (dwarfout_line), gcc.c (main, save_string), tree.c (init_obstacks, - perm_calloc, get_identifier, maybe_get_identifier, - real_value_from_int_cst, simple_cst_equal), varasm.c - (assemble_name, assemble_real, immed_real_const_1, - compare_constant_1, decode_rtx_const, output_constant_pool): Use - strrchr () instead of rindex (). Use memcmp () instead of bcmp - (). Use memcpy () instead of bcopy (). Use memset () instead of - bzero (). - -2000-11-03 Nathan Sidwell - - * cppfiles.c (open_file): If already read, then don't reopen. - Immediately close an empty file. - -2000-11-01 Bernd Schmidt - - * expr.h (fold_builtin): Move declaration... - * tree.h (fold_builtin): ... here. - -Fri Nov 3 05:41:07 2000 J"orn Rennecke - - * flow.c (verify_local_live_at_start): Allow hard regs to die. - -2000-11-02 Neil Booth - -config: - * a29k/a29k.h, a29k/unix.h, a29k/vx29k.h, - alpha/alpha-interix.h, alpha/alpha.h, alpha/linux.h, - alpha/openbsd.h, alpha/osf.h, alpha/vms.h, alpha/vxworks.h, - alpha/win-nt.h, arc/arc.h, arm/arm.h, arm/conix-elf.h, - arm/linux-aout.h, arm/linux-elf.h, arm/netbsd.h, arm/riscix.h, - arm/riscix1-1.h, arm/semiaof.h, arm/unknown-elf-oabi.h, arm/vxarm.h, - c4x/rtems.h, clipper/clix.h, convex/convex.h, d30v/d30v.h, - elxsi/elxsi.h, fr30/fr30.h, h8300/h8300.h, i370/linux.h, i370/mvs.h, - i370/oe.h, i386/386bsd.h, i386/aix386ng.h, i386/beos-elf.h, - i386/bsd386.h, i386/crtdll.h, i386/cygwin.h, i386/dgux.h, - i386/djgpp-rtems.h, i386/djgpp.h, i386/freebsd-aout.h, i386/freebsd.h, - i386/gnu.h, i386/i386-interix.h, i386/i386.h, i386/linux-aout.h, - i386/linux-oldld.h, i386/linux.h, i386/lynx-ng.h, i386/lynx.h, - i386/mach.h, i386/mingw32.h, i386/moss.h, i386/netbsd.h, - i386/netware.h, i386/next.h, i386/openbsd.h, i386/osf1elf.h, - i386/osfelf.h, i386/osfrose.h, i386/ptx4-i.h, i386/rtems.h, - i386/rtemself.h, i386/sco.h, i386/sco4.h, i386/sco4dbx.h, i386/sco5.h, - i386/scodbx.h, i386/sequent.h, i386/sol2.h, i386/sun.h, i386/sysv3.h, - i386/sysv4.h, i386/uwin.h, i386/vsta.h, i386/vxi386.h, i386/win-nt.h, - i386/win32.h, i860/fx2800.h, i860/i860.h, i860/mach.h, i860/sysv3.h, - i860/sysv4.h, i960/i960.h, i960/rtems.h, i960/vx960-coff.h, - ia64/ia64.h, ia64/linux.h, m32r/m32r.h, m68k/3b1.h, m68k/3b1g.h, - m68k/a-ux.h, m68k/altos3068.h, m68k/amix.h, m68k/apollo68.h, - m68k/crds.h, m68k/ctix.h, m68k/dpx2.h, m68k/hp2bsd.h, m68k/hp320.h, - m68k/hp3bsd.h, m68k/hp3bsd44.h, m68k/isi.h, m68k/linux-aout.h, - m68k/linux.h, m68k/lynx-ng.h, m68k/lynx.h, m68k/m68kemb.h, - m68k/m68kv4.h, m68k/mot3300.h, m68k/netbsd.h, m68k/news.h, - m68k/next.h, m68k/openbsd.h, m68k/pbb.h, m68k/plexus.h, m68k/rtems.h, - m68k/rtemself.h, m68k/sun2.h, m68k/sun3.h, m68k/sun3mach.h, - m68k/tower-as.h, m68k/tower.h, m68k/vxm68k.h, m88k/dgux.h, - m88k/dolph.h, m88k/luna.h, m88k/m88k-aout.h, m88k/m88k-coff.h, - m88k/openbsd.h, m88k/sysv3.h, m88k/sysv4.h, mips/bsd-4.h, - mips/bsd-5.h, mips/dec-bsd.h, mips/dec-osf1.h, mips/gnu.h, - mips/iris3.h, mips/iris5.h, mips/iris6.h, mips/linux.h, mips/mips.h, - mips/netbsd.h, mips/news4.h, mips/news5.h, mips/nws3250v4.h, - mips/openbsd.h, mips/osfrose.h, mips/rtems64.h, mips/sni-svr4.h, - mips/svr3-4.h, mips/svr3-5.h, mips/svr4-4.h, mips/svr4-5.h, - mips/ultrix.h, ns32k/encore.h, ns32k/merlin.h, ns32k/netbsd.h, - ns32k/ns32k.h, ns32k/pc532-mach.h, ns32k/pc532.h, ns32k/sequent.h, - ns32k/tek6000.h, ns32k/tek6100.h, ns32k/tek6200.h, pa/pa-hiux.h, - pa/pa-hpux.h, pa/pa-hpux7.h, pa/pa-linux.h, pa/pa-osf.h, - pa/pa-pro-end.h, pa/pa.h, pa/rtems.h, pj/linux.h, pj/pj.h, - romp/romp.h, rs6000/aix.h, rs6000/aix31.h, rs6000/aix41.h, - rs6000/aix43.h, rs6000/beos.h, rs6000/eabi.h, rs6000/eabisim.h, - rs6000/linux.h, rs6000/lynx.h, rs6000/mach.h, rs6000/rtems.h, - rs6000/sysv4.h, rs6000/vxppc.h, sh/elf.h, sh/linux.h, sh/rtems.h, - sh/rtemself.h, sh/sh.h, sparc/aout.h, sparc/elf.h, sparc/linux-aout.h, - sparc/linux.h, sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, - sparc/liteelf.h, sparc/lynx-ng.h, sparc/lynx.h, sparc/netbsd.h, - sparc/openbsd.h, sparc/pbd.h, sparc/rtems.h, sparc/rtemself.h, - sparc/sol2-sld-64.h, sparc/sol2.h, sparc/sp64-aout.h, - sparc/sp64-elf.h, sparc/sp86x-aout.h, sparc/sp86x-elf.h, - sparc/sparc.h, sparc/sysv4.h, sparc/vxsim.h, sparc/vxsparc.h, - v850/rtems.h, vax/netbsd.h, vax/openbsd.h, vax/ultrix.h, vax/vax.h, - vax/vaxv.h, vax/vms.h, we32k/we32k.h - - Replace -A() with -A=, the new assertion syntax. - -Thu Nov 2 21:52:35 2000 J"orn Rennecke - - * combine.c (distribute_notes): Use rtx_equal_p to check elim_i2 / - elim_i1. - In REG_DEAD handling: When handling parts of multi-hard-reg hard - registers, increment the loop counter by the size of the parts; - use recursion to handle individual parts. - -2000-11-02 Neil Booth - - * configure.in: Make integrated CPP the default. - * configure: Regenerate. - -Thu Nov 2 19:20:12 2000 J"orn Rennecke - - * reload.c (find_equiv_reg): Test all hard registers for membership - in the requested class. - -2000-11-02 Joseph S. Myers - - * collect2.c (main, write_c_file_stat), gcc.c (translate_options, - process_command, main), gcov.c (open_files, output_data), tlink.c - (frob_extension, scan_linker_output), toplev.c - (file_name_nondirectory): Use strchr () and strrchr () instead of - index () and rindex (). - -2000-11-02 Joseph S. Myers - - * c-common.c (get_flag_spec, check_format_info_main, - check_format_types): Use strchr () instead of index (). Compare - against error_mark_node instead of comparing the TREE_CODE against - ERROR_MARK. - -2000-11-02 Zack Weinberg - - Integrated CPP. - - * c-lex.c (init_c_lex): Update cpp_start_read call. - (cb_ident): Update for new callback prototype. - (cb_def_pragma): Update for new cpp_get_token prototype. - (c_lex): Similarly. Use cpp_get_line. - - * c-parse.in (finish_parse): Update for new cpp_finish - prototype. - - * cp/lex.c (finish_parse): Similarly. - -2000-11-01 Geoff Keating - - * machmode.def: Add V16QImode. - -2000-11-01 Richard Henderson - - * dwarf2out.c (loc_descriptor_from_tree): Check for null result - from rtl_for_decl_location. - (add_location_or_const_value_attribute): Likewise. - -2000-11-01 Neil Booth - - * cpplib.c (run_directive): Use correct line number for output - of _Pragma. Remember any in-progress directive. - - * gcc.dg/cpp/vararg2.c, gcc.dg/cpp/_Pragm1.c: New tests. - -2000-11-01 Richard Henderson - - * stmt.c (expand_start_null_loop): Set continue_label. - -2000-11-01 Bernd Schmidt - - * builtins.c (fold_builtin_constant_p, fold_builtin): New functions. - (expand_builtin_constant_p): Move parts of the code into - fold_builtin_constant_p. - (expand_builtin_strlen): Move parts of the code into fold_builtin. - * expr.h (fold_builtin): Declare. - * fold-const.c (fold): Handle builtin calls. - - * c-typeck.c (build_function_call): Call fold on the CALL_EXPR. - -2000-11-01 Richard Henderson - - * stmt.c (expand_start_null_loop): New. - (expand_end_null_loop): New. - * c-semantics.c (genrtl_do_stmt): Use them. - * tree.h: Declare them. - -2000-11-01 Richard Henderson - - * cppmain.c (scan_buffer): Don't avoid paste for assembly. - -2000-11-01 Neil Booth - - * c-parse.in (_yylex): Remove CPP_BACKSLASH case. - * cp/spew.c: Similarly. - * cpplex.c (_cpp_lex_token): Backslashes are now CPP_OTHER. - * cppmacro.c (stringify_arg): Similarly. - * cpplib.h (CPP_BACKSLASH): Delete. - -2000-10-31 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strstr): New function. - (expand_builtin): Handle BUILT_IN_STRSTR and BUILT_IN_STRCHR. - - * builtins.def (BUILT_IN_STRSTR, BUILT_IN_STRCHR): New entries. - - * c-common.c (c_common_nodes_and_builtins): Declare builtin strstr - and builtin strchr. - -2000-10-31 Richard Henderson - - * config/i386/i386.c (fcmov_comparison_operator): Check for - CCFPmode or CCFPUmode instead of CCmode. - (ix86_expand_fp_movcc): Call ix86_expand_setcc for most - unordered operations as well. - -2000-10-31 Richard Henderson - - * c-semantics.c (genrtl_do_stmt): Use integer_zerop instead - of integer_zero_node. - -2000-10-31 Richard Henderson - - * c-semantics.c (genrtl_do_stmt): Special case do/while(0). - -2000-10-31 Nick Clifton - - * config/arm/unknown-elf.h (UNIQUE_SECTION_P): Do not allow - -fdata-sections to override the section attribute of a DECL. - -2000-10-31 Chris Demetriou - - * libgcc2.c (__shtab): Remove __shtab variable. - * libgcc-std.ver (GCC_3.0): Remove __shtab from symbol list. - * Makefile.in (LIB2FUNCS): Remove _shtab from list of library - members. - -2000-10-31 Jim Wilson - - * defaults.h (ASM_OUTPUT_DEBUG_LABEL): New. - * tm.texi (ASM_OUTPUT_DEBUG_LABEL): Document. - * dwarf2out.c (dwarf2out_begin_block): Use ASM_OUTPUT_DEBUG_LABEL - instead of ASM_OUTPUT_INTERNAL_LABEL. - (dwarf2out_end_block, dwarf2out_label): Likewise. - * final.c (final_scan_insn, case NOTE_INSN_DELETED_LABEL): Likewise - * config/ia64/ia64.h (ASM_OUTPUT_DEBUG_LABEL): Define. - -2000-10-31 Richard Henderson - - * dwarf2out.c (struct dw_loc_descr_struct): Add dw_loc_addr. - (size_of_locs): Set it. - (output_loc_operands): Use it to compute branch displacement. - (int_loc_descriptor): New. - (mem_loc_descriptor): Dereference memory in the proper size. - Use DW_OP_plus_uconst when possible. Use int_loc_descriptor. - (loc_descriptor_from_tree): New. - (rtl_for_decl_location): Break out from ... - (add_location_or_const_value_attribute): ... here. - (add_bound_info): Use loc_descriptor_from_tree. - -2000-10-31 Neil Booth - - * cpp.texi: Update for new command line assertion syntax. - * cpplib.c (cpp_define): Simplify a bit. - (cpp_assert, cpp_unassert): Use handle_assertion. - (handle_assertion): New function; accept new command line - syntax with '='. - * testsuite/gcc.dg/cpp/assert3.c: New tests. - -2000-10-31 Neil Booth - - * cppmacro.c (STDC_0_IN_SYSTEM_HEADERS): Define to 0 if - undefined. Remove #ifdef check. - * config/i386/sol2.h, config/rs6000/sol2.h, config/sparc/sol2.h: - Define STDC_0_IN_SYSTEM_HEADERS to 1. - -2000-10-31 Jan Hubicka - Jakub Jelinek - - * config/i386/i386.h: Clarify CCNOmode description in comment. - (EXTRA_CC_MODES): Remove CCRCmode. - * config/i386/i386.c (ix86_comparison_operator): Remove CCRCmode. - (put_condition_code, ix86_match_ccmode): Likewise. - (ix86_cc_mode): Likewise. Fix comment. - (ix86_expand_strlensi_unroll_1): *rc patterns are gone. - * config/i386/i386.md: Add unspec 12 description. - (adddi3 split): Use unspec 12 instead of CCRCmode. - (addsi3_carry_rc): Remove. - (addsi3_cc, addqi3_cc): New patterns. - (addsi_3): Swap operands, match CCZmode. - (addsi_4): Rewritten. - (addsi_5): Renamed from addsi_6. - (addsi_6): Removed. - (addhi_3): Swap operands, match CCZmode. - (addhi_4): Rewritten. - (addhi_5): Renamed from addhi_6. - (addhi_6): Removed. - (addqi_3): Swap operands, match CCZmode. - (addqi_4): Rewritten. - (addqi_5): Renamed from addqi_6. Use =q constraint for clobber. - (subsi3_carry_rc): Removed. - (iorqi_3): Use =q constraint for clobber. - (xorqi_cc_2): Likewise. - (negdi2_1 split): Don't use CCRCmode, use ltu instead of gtu. - (x86_movsicc_0_m1_rc): Removed. - (cmp?i peepholes): Remove neg. Use CCGCmode instead of CCRCmode. - -2000-10-31 Joseph S. Myers - - * c-typeck.c (build_unary_op): If pedantic, pedwarn for increment - and decrement of complex types. - -2000-10-31 Kaveh R. Ghazi - - * builtins.c (expand_builtin_fputs): When deleting NOP calls to - builtin fputs, ensure we still evaluate the stream in case it - has side-effects. - -2000-10-31 Jakub Jelinek - - * expr.c (do_store_flag): Pass operand_mode instead of GET_MODE (op0) - to expand_shift. - -Tue Oct 31 15:33:27 2000 J"orn Rennecke - - * sh-protos.h (reg_no_subreg_operand, emit_fpscr_use): Don't declare. - (fp_extended_operand, emit_fpscr_use): Likewise. - * sh.c (reg_no_subreg_operand, fp_extended_operand): Delete functions. - (fpul_operand): New function. - * sh.h (PREDICATE_CODES): Remove reg_no_subreg_operand and - fp_extended_operand. Add fpul_operand. - * sh.md (mulsf3, mulsf3_i4): Use fp_arith_reg_operand for "f" operands. - (mulsf3_ie, macsf3, cmpgtsf_t, cmpeqsf_t, ieee_ccmpeqsf_t): Likewise. - (cmpgtsf_t_i4, cmpeqsf_t_i4, ieee_ccmpeqsf_t_4, negsf2): Likewise. - (negsf2_i, sqrtsf2, sqrtsf2_i, abssf2, abssf2_i, adddf3): Likewise. - (adddf3_i, subdf3, subdf3_i, muldf3, muldf3_i, divdf3): Likewise. - (divdf3_i): Likewise. - (floatsisf2): Likewise. Use fpul_operand for 'y' operand. - (floatsisf2_i4, floatsisf2_ie, fix_truncsfsi2): Likewise. - (fix_truncsfsi2_i4, fixsfsi, floatsidf2, floatsidf2_i): Likewise. - (fix_truncdfsi2, fix_truncdfsi2_i, extendsfdf2): Likewise. - (extendsfdf2_i4, truncdfsf2, truncdfsf2_i4): Likewise. - -2000-10-31 Bernd Schmidt - - * config/i386/i386.c (ix86_init_builtins): Correct return type - building v4hi_ftype_v4hi_int_int tree node. - (ix86_expand_builtin): Use correct operand numbers 0 and 1. - Copy operand 0 into a Pmode register, don't generate a MEM rtx. - - * config/i386/i386.md (sse_movntdi): Use mmx register constraint - for operand 1. - (mmx__uavgv8qi3): Correct insn mnemonic. - (mmx_psadbw): Correct insn mnemonic. Use V8QI mode for operands 1 and 2. - (mmx_punpckhwd): Correct insn mnemonic. - (mmx_punpckhdq): Likewise. - (mmx_punpcklwd): Likewise. - (mmx_punpckldq): Likewise. - (prefetch): Use immediare_operand and 'n' constraint for operand 1. - Renumber case labels to match the _mm_prefetch constants defined in - xmmintrin.h. - - * recog.c (split_all_insns): Don't try to call cleanup_subreg_operands - if the splitter didn't emit new insns. - Make sure we call cleanup_subreg_operands even when splitting the last - insn in a basic block. - - * invoke.texi (Debugging Options): Describe -do. - * toplev.c (enum_dump_file_index): New entry DFI_postreload. - (dump_file): Likewise. - (rest_of_compilation): Split .greg dump into .greg and .postreload. - -2000-10-30 Neil Booth - - * cppfiles.c (stack_include_file): Check for stacked contexts - here. - * cpphash.h (_cpp_do__Pragma): New prototype. - * cppinit.c (cpp_reader_init): Add _Pragma keyword to hash table. - - * cpplex.c (skip_escaped_newlines): Only process trigraphs and - escaped newlines if !(buffer->from_stage3). - (_cpp_lex_token): Warn about missing newlines iff - !buffer->from_stage3. - - * cpplib.c (get__Pragma_string, destringize, - _cpp_do__Pragma): New functions. - (run_directive): Set output_line for _Pragma to avoid line - markers in output. Set from_stage3 and prevent macro expansion - for _Pragma and command-line options. Check buffer exhaustion. - (cpp_push_buffer): Don't check for stacked macro contexts, as - this is perfectly legitimate for _Pragma. Move the check to - stack_include_file instead. Set from_stage3 iff buffer is - preprocessed input. - - * cpplib.h (struct cpp_buffer): Make warned_cplusplus_comments - unsigned. New boolean from_stage3. - (struct spec_nodes): Add n__Pragma. - - * cppmacro.c (enter_macro_context): Flip sense of return value. - (_cpp_get_token): Handle _Pragma operator. - -2000-10-30 Phil Edwards - - * gcc.texi: The C++ standard isn't "draft" anymore. - -2000-10-30 Mark Mitchell - - * cppmacro.c (builtin_macro): Use NT_VOID, not T_VOID. - -2000-10-29 Neil Booth - - * cpplib.c (skip_rest_of_line): Use _cpp_get_token. - -2000-10-29 Joseph S. Myers - - * toplev.c, flags.h, fold-const.c, real.c, rtl.c, - fixinc/inclhack.def: Change comments mentioning C9X to refer to - C99 instead. - - * invoke.texi: Document that -V will only work for very similar - versions of driver and compiler. - -2000-10-29 Neil Booth - - * cppmacro.c (_cpp_create_definition): Optimize the case of - a macro defined to itself. - -2000-10-29 Neil Booth - - * cpplex.c (save_comment): Don't store new lines in C++ comments. - -2000-10-29 Michael Hayes - - * integrate.c (copy_insn_list): Copy the unchanging flag for calls. - -2000-10-28 Geoffrey Keating - - * cpphash.c (cpp_forall_identifiers): Add context variable - for callback routine. - * cppmain.c (dump_macro): Update to match cpp_forall_identifiers - change. - (main): Call cpp_forall_identifiers with null context. - * cpplib.h (cpp_forall_identifiers): Update prototype. - - * cppmain.c: Make `parse_in' and `print' static. - -2000-10-28 Alan Modra - - * c-decl.c (finish_function): Clear c_function_name_declared_p. - -2000-10-28 Richard Henderson - - * regrename.c (scan_rtx_address): Frob action, not class, - when trying to disable optimization. - -2000-10-28 Mark Mitchell - - * c-semantics.c (make_rtl_for_local_static): Don't clobber - DECL_ASSEMBLER_NAME. - -2000-10-28 Joseph S. Myers - - * configure.in: Determine and substitute gcc_version_full. - * configure: Regenerate. - * gccbug.in: Use it to give full version. Don't allow - confidential PRs. - -2000-10-28 Richard Henderson - - * recog.c (split_all_insns): Run cleanup_subreg_operands - after reload. - - * regrename.c (regrename_optimize): Verify that all registers of - a multiple register mode are available. - (scan_rtx_address): Accept the mode of the address; all callers - changed. - - * cpplib.c (run_directive): Fix prototype. - -2000-10-28 Bernd Schmidt - - * reload.c (find_reloads): Distinguish "wins" so that we know whether - a given operand won because of a matching constraint or not; then use - that information to compute goal_alternative_matched properly. - * reload1.c (choose_reload_regs): Never set reload_override_in for an - optional reload. - - * config/ia64/ia64.h (RTX_COSTS): A few more entries, and a more - accurate value for MULT. - * config/ia64/ia64.c (ia64_print_operand): Require probability to be - 2% or > 98% before using static branch prediction bits. - -2000-10-28 Neil Booth - - New macro expander. - - * cpplib.c (struct answer): New. - (struct if_stack): Use cpp_lexer_pos rather than line and col. - Rename cmacro mi_cmacro. - (struct directive, KANDR, STDC89, EXTENSION, COND, IF_COND, INCL, - IN_I): New directive and flags. - (skip_rest_of_line, check_eol, run_directive, glue_header_name, - parse_answer, parse_assertion, find_answer): New functions. - (parse_ifdef, detect_if_not_defined, validate_else): Remove. - (lex_macro_node): New function to replace parse_ifdef and - get_define_node. - - (_cpp_handle_directive): New function, combines _cpp_check_directive - and _cpp_check_linemarker. - - (do_define, do_undef, parse_include, do_include, do_import, - do_include_next, read_line_number, do_line, do_ident, do_pragma, - do_pragma_once, do_pragma_poison, do_pragma_dependency): - Update for new token getting interface. - - (do_ifdef, do_ifndef, do_if, do_else, do_endif, push_conditional) - : Update for new multiple-include optimisation technique. - (do_elif): Don't forget to invalidate controlling macros. - - (unwind_if_stack, cpp_defined, cpp_push_buffer, cpp_pop_buffer): Update. - (parse_assertion, parse_answer, find_answer, _cpp_test_assertion): - Functions to handle assertions with the new token interface. - (do_assert, do_unassert): Use them. - - (cpp_define, _cpp_define_builtin, cpp_undef, cpp_assert, cpp_unassert): - Use run_directive. - - (_cpp_init_stacks): Register directive names. Don't register special - nodes. - - * cpperror.c (print_containing_files, _cpp_begin_message): Update to - new position recording regime. - (cpp_ice, cpp_fatal, cpp_error, cpp_error_with_line, cpp_warning, - cpp_warning_with_line, cpp_pedwarn, cpp_pedwarn_with_line, - cpp_pedwarn_with_file_and_line): Update for _cpp_begin_message changes. - (cpp_type2name): Move to cpplex.c. - - * cppexp.c (parse_charconst): spec_nodes is no longer a pointer. - (parse_defined): Update to handle new multiple include optimisation - method. Remove poisoned identifier warning. - (parse_assertion, TYPE_NAME): Delete. - (lex): Update for multiple include optimisation, removal of - CPP_DEFINED, to use _cpp_test_assertion for assertions and - cpp_token_as_text. - (_cpp_parse_expr): Update for MI optimisation, and to use op_as_text. - (op_as_text): New function, to wrap cpp_token_as_text. - - * cppfiles.c (stack_include_file, _cpp_pop_file_buffer): - Update for MI optimisation. - (_cpp_execute_include): Take a token rather than 3 arguments. Fix - segfault on diagnostic. - (_cpp_compare_file_date): Take a token rather than 3 args. - (cpp_read_file): Work correctly for zero-length files. - - * cpphash.c (_cpp_init_macros, _cpp_cleanup_macros): Rename - _cpp_init_hashtable and _cpp_cleanup_hashtable. - (cpp_lookup): Place identifiers at front of identifier pool - for _cpp_lookup_with_hash. - (_cpp_lookup_with_hash): Require identifiers to be at the front of - the identifier pool. Commit the memory if not already in the - hash table. - - * cppinit.c (cpp_reader_init): Move cpp_init_completed test to top. - Initialize various members of cpp_reader, memory pools, and the - special nodes. - (cpp_printer_init): Delete. - (cpp_cleanup): Update. - (struct builtin, builtin_array, initialize_builtins): Update for new - hashnode definition and builtin handling. - (cpp_start_read, cpp_finish): Don't take or initialize a - printer. Update. - - * cpplib.h (cpp_printer, cpp_toklist, CPP_DEFINED, BOL, - PASTED, VAR_ARGS, BEG_OF_FILE, IN_DIRECTIVE, KNOWN_DIRECTIVE, - T_VOID, T_SPECLINE, T_DATE, T_FILE, T_BASE_FILE, T_INCLUDE_LEVEL, - T_TIME, T_STDC, T_OPERATOR, T_POISON, T_MACRO, T_ASSERTION): Delete. - (struct cpp_pool, struct cpp_macro, struct cpp_lexer_pos, - struct cpp_lookahead, CPP_DHASH, enum mi_state, enum mi_ind, - NO_EXPAND, VARARGS_FIRST, struct cpp_token_with_pos, - struct toklist, struct cpp_context, struct specnodes, - TOKEN_LOOKAHEAD, TOKEN_BUFFSIZE, NODE_OPERATOR, NODE_POISONED, - NODE_BUILTIN, NODE_DIAGNOSTIC, NT_VOID, NT_MACRO, NT_ASSERTION, - enum builtin_type, cpp_can_paste): New. - (struct cpp_token): Delete line and col members. - (struct cpp_buffer): New member output_lineno. - (struct lexer_state): Delete indented, in_lex_line, seen_dot. - Add va_args_ok, poisoned_ok, prevent_expansion, parsing_args. - (struct cpp_reader): New members lexer_pos, macro_pos, directive_pos, - ident_pool, temp_string_pool, macro_pool, argument_pool, string_pool, - base_context, context, directive, mi_state, mi_if_not_defined, - mi_lexed, mi_cmacro, mi_ind_cmacro, la_read, la_write, la_unused, - mlstring_pos, macro_buffer, macro_buffer_len. - Delete members mls_line, mls_column, token_list, potential_control_macro, - temp_tokens, temp_cap, temp_alloced, temp_used, first_directive_token, - context_cap, cur_context, no_expand_level, paste_level, contexts, args, - save_parameter_spellings, need_newline, . - Change type of date, time and spec_nodes members. - Change prototypes for include and ident callbacks. - (struct cpp_hashnode): Change type of name. Remove union members - expansion and code. Add members macro, operator and builtin. - - (cpp_token_len, cpp_token_as_text, cpp_spell_token, cpp_start_read, - cpp_finish, cpp_avoid_paste, cpp_get_token, cpp_get_line, - cpp_get_output_line, cpp_macro_definition, cpp_start_lookahead, - cpp_stop_lookahead): New prototypes. - (cpp_printer_init, cpp_dump_definition): Delete prototypes. - - (U_CHAR, U, ustrcmp, ustrncmp, ustrlen, uxstrdup, ustrchr, ufputs): - Move from cpphash.h. - - * cpphash.h (U_CHAR, U, ustrcmp, ustrncmp, ustrlen, uxstrdup, ustrchr, - ufputs): Move to cpplib.h. - (enum spell_type, struct token_spelling, _cpp_token_spellings, TOKEN_SPELL, - TOKEN_NAME, struct answer, FREE_ANSWER, KANDR, STDC89, EXTENSION, - COND, EXPAND, INCL, COMMENTS, IN_I, struct directive, directive_handler, - struct spec_nodes, _cpp_digraph_spellings, _cpp_free_temp_tokens, - _cpp_init_input_buffer, _cpp_grow_token_buffer, _cpp_init_toklist, - _cpp_clear_toklist, _cpp_expand_token_space, _cpp_expand_name_space, - _cpp_equiv_tokens, _cpp_equiv_toklists, _cpp_process_directive, - _cpp_run_directive, _cpp_get_line, _cpp_get_raw_token, _cpp_glue_header_name, - _cpp_can_paste, _cpp_check_directive, _cpp_check_linemarker, - _cpp_parse_assertion, _cpp_find_answer): Delete. - (VALID_SIGN, ALIGN, POOL_FRONT, POOL_LIMIT, POOL_BASE, POOL_SIZE, - POOL_USED, POOL_COMMIT, struct cpp_chunk, _cpp_lex_token, _cpp_init_pool, - _cpp_free_pool, _cpp_pool_reserve, _cpp_pool_alloc, _cpp_next_chunk, - _cpp_lock_pool, _cpp_unlock_pool, _cpp_test_assertion, - _cpp_handle_directive, DSC): New. - (struct include_file): New member defined. - - (DO_NOT_REREAD, _cpp_begin_message, _cpp_execute_include, - _cpp_compare_file_date): Update. - (_cpp_pop_context, _cpp_get_token, _cpp_free_lookaheads, _cpp_push_token): New. - (_cpp_init_macros, _cpp_cleanup_macros): Rename to _cpp_init_hashtable, - _cpp_cleanup_hashtable. - - * Makefile.in: Remove cppoutput.c. - - * cppoutput.c: Delete - - * fixheader.c (read_scan_file): Update for new cpp_get_token - prototype. - (recognized_function): New argument LINE. - - * scan-decls.c (skip_to_closing_brace, scan_decls): Update for - new cpp_get_token prototype. - - * scan.h (recognized_function): Update prototype. - - * po/POTFILES.in: Remove cppoutput.c. - -2000-10-27 Mark Mitchell - - * c-typeck.c (check_init_type_bitfields): Remove. - (constructor_incremental): Likewise. - (struct constructor_stack): Remove incremental bit. - (struct initializer_stack): Likewise. - (start_init): Don't play with constructor_incremental. - (finish_init): Likewise. - (really_start_incremental_init): Likewise. - (push_init_level): Likewise. - (pop_init_level): Likewise. - (output_init_level): Likewise. - (output_pending_init_elements): Likewise. - -2000-10-21 Mike Coleman - - * c-pragma.c (handle_pragma_pack): Initialize align to -1. - Improve error messages. Correct parsing of - #pragma pack(pop [,id]). Do not check the user-supplied - alignment if we're popping. - - * gcc.dg/pack-test-1.c: New test case. - * gcc.dg/pack-test-2.c: New test case. - * gcc.dg/pack-test-1.h: New file. - -2000-10-27 Neil Booth - - * cpp.texi: Update. - -2000-10-27 Kelley Cook - - * invoke.texi: Document -mintel-syntax - -2000-10-27 Richard Henderson - - * invoke.texi: Document -frename-registers. Add it to -O3. - * toplev.c (rest_of_compilation): Run regrename before ifcvt2. - (enum dump_file_index, dump_file): Update order. - (main): Set flag_rename_registers at -O3. - -2000-10-27 Richard Henderson - - * config/alpha/alpha.h (enum reg_class): Add PV_REG. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS): Update. - (REG_CLASS_FROM_LETTER): Assign it to 'c'. - * config/alpha/alpha.md (call_osf_1): Use it. - (call_value_osf_1): Likewise. - - * config/ia64/ia64.c: Revert 10-23 patch. - (ia64_hard_regno_rename_ok): New. - * config/ia64/ia64-protos.h: Declare it. - * config/ia64/ia64.h (HARD_REGNO_RENAME_OK): Use it. - -2000-10-27 Bernd Schmidt - Richard Henderson - - * regrename.c: Rewrite to handle multi-register modes and - cond_exec instructions. - * Makefile.in (regrename.o): Update dependencies. - * recog.h (struct operand_alternative): Add is_address. - * recog.c (preprocess_constraints) [case 'p']: Set it. - -2000-10-27 Zack Weinberg - - * configure.in: If not NO_MINUS_C_MINUS_O, substitute - OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to - top level. Kill oldstyle_subdirs. Do not include - $srcdir/$s/Makefile.in in all_lang_makefiles, but do include - $outputs. Do not run configure.lang from config.status. - Rearrange warning-flag logic to correspond to what the - makefile wants. Put special vax stage1 options in - @stage1_flags@ not @stage1_warn_cflags@. Don't do anything - with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. - (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if - switch is given, nothing otherwise. - * configure.lang: Delete. - - * Makefile.in: Expunge all traces of extra_c_objs, - extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from - @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set - warning options via a three level scheme so that -pedantic and - -Wtraditional are not used for non-C front ends: LOOSE_WARN, - STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> - WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. - Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. - Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, - LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file - generation rules. Wrap all rules that change the current - directory in parentheses; pmake doesn't spawn a new shell for - each command. Expunge all references to $(P). When one - command depends on another and they're run all at once, use && - to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files - deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 - and beyond. - - * objc/Make-lang.in: Wrap all rules that change the current - directory in parentheses. Expunge all references to $(P). - When one command depends on another and they're run all at - once, use && to separate them, not ;. Add OUTPUT_OPTION to - all object-file generation rules. Delete obsolete variables. - * objc/Makefile.in: Delete. - -2000-10-27 Jakub Jelinek - - * calls.c (expand_call): If sibcall_failure is set during pass 1, - clear tail_call_insns as well. - -2000-10-27 Nick Clifton - - * config/arm/arm-protos.h (arm_function_ok_for_sibcall): Add - prototype. - -2000-10-26 Richard Henderson - - * calls.c (expand_call): Supress sibcall if we have a - BLKmode return in registers. - -2000-10-26 Bernd Schmidt - - * ia64.h (PREFERRED_RELOAD_CLASS): Force floating point constants - into memory. - -2000-10-26 Nathan Sidwell - - * tree.c (make_node, case 't'): Set alignment to that of - char_type_node. - * expr.c (move_by_pieces_ninsns): Abort if some length remains. - -2000-10-25 Mark Mitchell - - * Makefile.in (site.exp): Define HAVE_LIBSTDCXX_V3. - * configure.in (enable-libstdcxx-v3): Arrange to have - HAVE_LIBSTDCXX_V3 substituted into the output files. - -2000-10-25 Richard Henderson - - * recog.c (constrain_operands): Initialize which_alternative - before no alternatives early exit. - - * cse.c (find_comparison_args): Check that we can reverse a - comparison if needed before accepting the substitution. - - * reload.c (find_reloads_address_part): Kill rtx obstack hackery. - - * simplify-rtx.c (simplify_relational_operation): Sign extend - low words before sign extending to high words. - -2000-10-25 Nick Clifton - - * config/mcore/mcore.c: Include config.h before system.h. - -2000-10-25 Ray Essick - - * config/mcore/mcore.md (return): Force function epilogue to - always be generated to work around epilogue suppression bug in - M*Core backend. - -2000-10-25 Joseph S. Myers - - * c-decl.c (grokdeclarator): Move warning for qualified void - return types with -pedantic to when the function type is - constructed. At -W, warn in general for qualified function return - types, except for volatile void. - * invoke.texi: Document this new warning at -W. - -2000-10-25 Neil Booth - - * cpp.texi: Update with implementation-defined behavior and - internal limits. - -2000-10-25 Jakub Jelinek - - * stor-layout.c (layout_type): If TYPE_ALIAS_SET was already set on the - incomplete type force it into alias set 0. - -Wed Oct 25 01:02:44 EDT 2000 John Wehle (john@feith.com) - - * alias.c: Include basic-block.h. - (loop_p): New function. - (mark_constant_function): Use it. - * Makefile.in (alias.o): Update dependencies. - -2000-10-24 Aldy Hernandez - - * config/mn10300/mn10300.c (secondary_reload_class): Treat pseudos - like memory. - -2000-10-24 Jim Wilson - - * expmed.c (store_bit_field): Move integer pun code down after - code that calls emit_move_insn for entire register move. - * stor-layout.c (compute_record_mode): Revert Mar 25, Aug 18, and - Oct 20 changes. Only store mode in TYPE_MODE if RECORD_TYPE. - -2000-10-24 Richard Henderson - - * rtlanal.c (rtx_unstable_p, rtx_varies_p): Don't consider pic - register stable if PIC_OFFSET_TABLE_REG_CALL_CLOBBERED. - -2000-10-24 Aldy Hernandez - - * gcse.c (cprop_insn): do not propagate constants into jump_insn - for machines with CC0 more than once. - -2000-10-24 Richard Henderson , Aldy - - * config/mn10300/mn10300.h (PREFERRED_RELOAD_CLASS): Treat - pseudos just like memory. - -2000-10-24 Alexandre Oliva - - * combine.c (distribute_notes): Discard REG_LIBCALL and REG_RETVAL - when deleting libcall sequence collapsed to a single instruction. - -2000-10-24 Andrew Haley - - * expr.c (do_store_flag): Don't crash if either side of a - comparison is error_mark_node. - -2000-10-24 Jakub Jelinek - - * sibcall.c (purge_mem_unchanging_flag): New function. - (optimize_sibling_and_tail_recursive_calls): Call it. - -2000-10-24 Philipp Thomas - - * Makefile.in (check-po): New target for doing checks in the po - subdir if all languages configured. - (CHECK_TARGETS): Add @CHECK_PO@, replaced with check-po via - configure if NLS is enabled. - * configure.in: If NLS is enabled, substitute CHECK_PO by check-po, - otherwise leave empty. - * configure: Regenerate. - -2000-10-23 Diego Novillo - - * i386.c (print_operand): Handle new 'A' formatting code. - 387 opcodes need suffixes even with -mintel-syntax. - Check for explicit size override (codes 'b', 'w' and 'k'). - (print_operand_address): Check if register prefix is needed when - emitting `ds' segment override. - * i386.h: Add comment about new 'A' formatting code. - * i386.md (jump and call patterns): Emit absolute references using %A. - -2000-10-23 Richard Henderson - - * config/ia64/ia64.c (ia64_expand_prologue): Mark extra - output registers as fixed. - (ia64_function_epilogue): Undo output fixation. - -2000-10-23 Richard Henderson - - * config/alpha/alpha.md: Add names for all unnamed insns; use - define_insn_and_split in some obvious places. - (lda): Remove. - (zero_extendqihi2): Use an expander w/ nonimmediate_operand for BWX. - (zero_extendqisi2, zero_extendqidi2): Likewise. - (zero_extendhisi2, zero_extendhidi2): Likewise. - (abs splitters): Fix match_scratch operand number. - (bcc_reverse): Swap pc & label instead of non-canonical compare. - -2000-10-23 Jim Wilson - - * ia64.c (ia64_print_operand, case 'r'): Correct comment. Handle - CONST_INT. - * ia64.md (cmpsi_adjusted): Use %r3. - (cmpdi_adjusted): Likewise. - -2000-10-23 Diego Novillo - - * config/i386/att.h (ASM_FILE_START): Define. - -2000-10-23 Diego Novillo - - * config/i386/linux.h (ASM_FILE_START): Define. - -Wed Oct 18 11:16:40 2000 Donald Lindsay - - * gcc/configure.in: m68k-coff tm_file should not have libgloss.h, - since this (only) drags in a crt0.o reference that the .ld files - also introduce. - -2000-10-23 Geoff Keating - - * reload1.c (reload_reg_reaches_end_p): A RELOAD_OTHER can - overwrite the value in a RELOAD_FOR_INPUT and other kinds of - reloads just like an RELOAD_FOR_OUTPUT would. - - * local-alloc.c (update_equiv_regs): Add an abort(). When - deleting or moving insns, update reg_equiv[regno].init_insns. - -2000-10-23 Mark Mitchell - - * c-tree.texi: Improve documentation for IF_STMTs and related - conditional statements. - -2000-10-22 Mark Mitchell - - * expr.c (do_preexpand_calls): Remove. - (same_from_p): Don't use CALL_EXPR_RTL. - (expand_expr): Don't call preexpand_calls, or use CALL_EXPR_RTL. - (preexpand_calls): Remove. - * tree.c (first_rtl_op): Remove CALL_EXPR case. - (unsave_expr_1): Likewise. - * tree.def (CALL_EXPR): Give it only two slots. - * tree.h (CALL_EXPR_RTL): Remove. - -2000-10-21 Chandrakala Chavva - - * libgcc-std.ver (__addvsi3, __addvdi3, __subvsi3, __subvdi3, - __mulvsi3, __negvsi2, __negvdi2, __absvsi2, __absvdi2, __mulvdi3): - New functions. - -2000-10-22 Alexandre Oliva - - * calls.c (combine_pending_stack_adjustment_and_call): Don't - adjust stack when unadjusted_alignment ends up as zero. - -2000-10-22 Joseph S. Myers - - * fixinc/genfixes: Remove EGCS reference. - * install.texi: Remove EGCS reference. - * INSTALL: Regenerate. - -2000-10-22 Mark Mitchell - - * tree.h (TYPE_IS_SIZETYPE): Add more documentation. - -2000-10-21 Joseph S. Myers - - * diagnostic.c: Remove EGCS reference in comment. - -Sat Oct 21 08:24:25 2000 Richard Kenner - - * loop.c (strength_reduce): Fix error in last change. - -2000-10-20 David Edelsohn - - * Makefile.in (SHLIB_NM_FLAGS): New. - (libgcc.mk): Pass it. - * mklibgcc.in (libgcc.map): Use it. - - * rs6000/t-aix43 (SHLIB_EXT, SHLIB_LINK, SHLIB_LIBS, - SHLIB_MKMAP, SHLIB_MAPFILES, SHLIB_NM_FLAGS): New. - -2000-10-20 Kaveh R. Ghazi - - * mips.h (REG_CLASS_FROM_LETTER): Cast array arg to unsigned char. - - * sparc.c (load_pic_register): Delete unused varaible. - - * libgcc2.c (__addvsi3): Delete unused variable. - - * libgcc2.h (__absvsi2, __absvdi2, __addvsi3, __addvdi3, - __subvsi3, __subvdi3, __mulvsi3, __mulvdi3, __negvsi2, - __negvdi2): Prototype. - - * ssa.c (apply_delayed_renames): Avoid undefined operation. - - * toplev.c (display_target_options): Make static to match - prototype. Delete empty declaration. - -2000-10-20 Tom Tromey - - * cppspec.c (DEFAULT_WORD_SWITCH_TAKES_ARG): Added -MF and -MT. - * gcc.c (DEFAULT_WORD_SWITCH_TAKES_ARG): Added -MF and -MT. - -Fri Oct 20 17:05:49 2000 Richard Kenner - - * expr.c (expand_expr, case SAVE_EXPR): Set RTX_UNCHANGING_P on - returned MEM. - (expand_expr_unaligned, case ARRAY_REF): Check that index is - a constant before comparing it; use tree_low_cst. - * tree.c (save_expr): Set TREE_READONLY. - (substitute_expr): Return inside of NON_LVALUE_EXPR. - (build, build1): Set TREE_READONLY if all operands are. - (build_index_type): If upper bound is a negative number, lower - bound is zero and sizetype is unsigned, use upper bound of one and - lower of zero. - -2000-10-20 David Edelsohn - - * gcc.c (process_command, main): Use "because" instead of - "since" in error messages. - -Fri Oct 20 13:33:16 2000 Richard Kenner - - * stor-layout.c (compute_record_mode): Use tree_low_cst. - Don't use mode of field for record unless sizes are the same. - (layout_type, case ARRAY_TYPE): Remove special bounds handling - previously added for Ada; also change to using host_integerp - and tree_low_cst. - - * loop.c (strength_reduce): Show when new register made for - giv is known to be a pointer and its aligment if so and known. - (loop_dump_aux): Show VERBOSE parameter unused. - - * gcse.c (set_hash_table_size): Now unsigned. - * sdbout.c (template_name_p): Add "const" to avoid warnings. - (sdbout_record_type_name, plain_type_1, sdbout_symbol): Likewise. - (sdbout_one_type, sdbout_parms, sdbout_reg_parms): Likewise. - (sdbout_end_epilogue): Remove variable NAME. - * system.h (getopt): Add default definition. - * config/alpha/alpha.c (print_operand): Don't continue processing - after issuing error. - (summarize_insn): Avoid use of UL in constant. - - * function.c (locate_and_pad_parm): Use host_integerp and tree_low_cst. - - * fold-const.c (force_fit_type): Unsigned values can overflow - if they are sizetype. - (int_const_binop): Don't use cache if overflows. - -2000-10-20 Richard Henderson - - * function.c (locate_and_pad_parm): Zero alignment_pad. - - * regrename.c (rr_replace_reg): Rewrite to use recog_data to - perform substitutions, and apply_change_group to see if it worked. - -Fri Oct 20 13:33:16 2000 Richard Kenner - - * dwarf2out.c (add_bound_info): Also ignore COND_EXPR. - - * combine.c (struct undo): Change int to unsigned int. - (do_SUBST_INT): Args are unsigned int. - (make_extraction, force_to_mode): Use proper type when forming mask. - (make_field_assignment): Likewise. - -2000-10-20 Joseph S. Myers - - * c-common.c (check_format_info_recurse): Extract string constant - initializers from non-volatile constant arrays and check them as - formats. - * c-typeck.c (decl_constant_value): Don't check pedantic or check - for DECL_MODE (decl) != BLKmode. - (decl_constant_value_for_broken_optimization): New function which - includes these checks. - (default_conversion, convert_for_assignment, digest_init): Use - decl_constant_value_for_broken_optimization instead of - decl_constant_value. - -2000-10-20 Mark Mitchell - - * tree.h (DECL_ALIGN_UNIT): New macro. - -2000-10-14 Marek Michalkiewicz - - * config/avr/avr-protos.h (avr_output_bld): New. - (out_shift_with_cnt): Add t_len argument. - * config/avr/avr.c (avr_num_arg_regs): Remove -mpack-args. - (output_movqi, output_movhi, output_movsisf): Optimize loading - any constant with exactly one bit set to NO_LD_REGS. - (out_shift_with_cnt): Optimize output code for size or speed, - depending on optimize_size. Handle small shift counts as well - (if not hand-optimized in ?sh??i3_out). Shifts can be done - with or without a scratch register, with help of __tmp_reg__ - or __zero_reg__ if necessary. Add T_LEN argument to pass the - length of TEMPLATE in words, return total insn length in *LEN. - (ashlqi3_out, ashrqi3_out, lshrqi3_out): Change all calls to - out_shift_with_cnt to work with the above change. - (ashlhi3_out, ashlsi3_out, ashrhi3_out, ashrsi3_out, lshrhi3_out, - lshrsi3_out): Likewise. Optimize more known shift count cases. - Remove cases already well optimized in out_shift_with_cnt. - (avr_output_bld): New function. - * config/avr/avr.h (MASK_PACK_ARGS, TARGET_PACK_ARGS): Remove. - (TARGET_SWITCHES): Remove -mpack-args backward compatibility. - * config/avr/avr.md (*reload_inqi, *reload_inhi, *reload_insi): - Add reload_completed to insn condition - only for peepholes. - (ashlqi3, ashrqi3, lshrqi3): Correct insn length for shift counts - in a register or memory. - (ashlhi3, ashlsi3, ashrhi3, ashrsi3, lshrhi3, lshrsi3): Likewise. - Do not require a scratch register. - (*ashlhi3_const, *ashlsi3_const, *ashrhi3_const, *ashrsi3_const, - *lshrhi3_const, *lshrsi3_const): New insns and matching peepholes. - Optimize shifts by known count using a scratch register, but only - if one is still available after register allocation. - -2000-10-20 J. David Anglin - - * t-vax: New file. Don't build modules from libgcc1.c. - -Fri Oct 20 00:57:00 EDT 2000 John Wehle (john@feith.com) - - * alias.c: (mark_constant_function): Don't check pure functions. - Initialize and end alias analysis. - (nonlocal_mentioned_p): Rename from nonlocal_reference_p. - Don't make a special exception for recursion. Handle - UNSPEC_VOLATILE. Don't assume ASM_OPERANDS is non-local - unless it's volatile. - - * local-alloc.c (equivalence): New structure. - (reg_equiv): Define. - (contains_replace_regs): Remove array and use - field in reg_equiv. - (memref_referenced_p): Likewise. - (no_equiv): Likewise. - (update_equiv_regs): Likewise. - - (equiv_init_varies_p, - equiv_init_movable_p): New functions. - (update_equiv_regs): Use them. Use rtx_varies_p - instead of function_invariant_p. Process insns - from end to beginning. Allow a REG_EQUIV insn - within the same loop as a use to be moved, also - allow it to be moved out of a loop. Update - REG_DEAD notes when substituting into an insn. - -2000-10-19 Jim Wilson - - * c-decl.c (start_decl): Check for error_mark_node type before using - COMPLETE_TYPE_P. - (finish_decl): Likewise. Don't give an error if decl type is - already error_mark_node. - - * haifa-sched.c (compute_trg_info): Add explanatory comments. - New local update_blocks. Use update_blocks to remove duplicates - when computing update blocks. Check for bblst_table overflow. - (schedule_block): Add explanatory comment. Reduce bblst_size by - factor of 2. - * config/ia64/ia64.md (movdi_symbolic): Document loss of REG_LABEL - notes. - -2000-10-19 Chandrakala Chavva - - * libgcc2.c (_mulvsi3): Change variables u and v to a and b. - -2000-10-19 Chandrakala Chavva - - * expmed.c: Minor corrections in comments. - * invoke.texi: Added desciption for the new option -ftrapv. - -2000-10-19 Chandrakala Chavva - - * libgcc2.c: Added the missing #endif. - -Thu Oct 19 14:25:11 MET DST 2000 Jan Hubicka - - * i386.h (CONST_OK_FOR_LETTER): Re-add 'N'; document. - -2000-10-18 Chandrakala Chavva - - * expmed.c (expand_mult): Don't do synth_mult optimization for -ftrapv. - Use smulv_optab for -ftrapv. - (expand_mult_highpart): Use unsigned multiply. - (expand_divmod): Special-case division by -1. - For EXACT_DIV_EXPR, do right shift first, then the multiply. - For complex divide, use abs with unsigned result. - * expr.c (force_operand): Use unsigned multiply. - (expand_expr): Use overflow-trapping optabs for signed types if - flag_trapv. - If flag_trapv, don't generate a recursive call with EXPAND_SUM - if the type is signed and the original call wasn't EXPAND_SUM or - EXPAND_INITIALIZER. - * expr.h (addv_optab, subv_optab, smulv_optab, sdivv_optab): Declare. - (negv_optab, absv_optab): Declare. - * flags.h (flag_trapv): Declare. - * genopinit.c (optabs): Add entries for addv_optab, subv_optab, - smulv_optab, sdivv_optab, negv_optab and absv_optab. - (gen_insn): Interpret '$P' as requiring an integer mode, - including partial integer modes. - * loop.c (emit_iv_add_mult): Use unsigned expand_mult_add. - (product_cheap_p): Use unsigned expand_mult. - * optabs.c (addv_optab, subv_optab, smulv_optab, sdivv_optab): Define. - (negv_optab, absv_optab): Define. - (expand_binop): Use overflow-trapping optabs for signed types if - flag_trapv. - Handle negv_optab libe neg_optab. - (expand_abs): Take result_unsignedp argument instead of unsignedp one. - Use overflow-trapping optabs for signed result if flag_trapv. - (expand_complex_abs): Use overflow-trapping optabs for signed types if - flag_trapv. - Don't open-code complex absolute-value operation for flag_trapv. - (init_optabs): Initialize addv_optab, subv_optab, smulv_optab, - sdivv_optab, negv_optab and absv_optab. - * toplev.c (flag_trapv): Define. - (lang_independent_options f_options): Include flag_trapv. - * tree.h (TYPE_TRAP_SIGNED): Define. - * libgcc2.c (__addvsi3, __addvdi3, __subvsi3,__subvsi3, __subvdi3, - __mulvsi3, __negvsi2, __negvdi2, __absvsi2, __absvdi2, __mulvdi3): - New functions. - * Makefile.in: add _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 - _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2. - -2000-10-18 Geoffrey Keating - David V. Henkel-Wallace - - * config/i386/t-netware: Bring in from the Red Hat tree. - * config/i386/netware.h: Likewise. - * config/netware.h: Likewise. - * config/rs6000/netware.h: Delete. - * configure.in: Add i[34567]86-*-netware. - * configure: Hand-edit to match configure.in change. - -2000-10-18 Mark Mitchell - - * c-common.h (flag_no_builtin): Declare. - (flag_no_nonansi_builtin): Likewise. - (c_common_nodes_and_builtins): Change prototype. - * c-common.c (flag_no_builtin): New variable. - (flag_no_nonansi_builtin): Likewise. - (c_common_nodes_and_builtins): Remove parameters. Adjust - accordingly. - * c-decl.c (flag_no_builtin): Remove. - (flag_no_nonansi_builtin): Likewise. - (init_decl_processing): Adjust call to - c_common_nodes_and_builtins. - -2000-10-18 Marc Espie - - * tm.texi (LIBGCC_SPEC): Synch with reality. - -2000-10-18 Joseph S. Myers - - * c-common.c (check_format_types): Check for writing through a - NULL pointer argument. - -2000-10-18 Hans-Peter Nilsson - - * tm.texi (Exception Region Output): Document - DWARF_CIE_DATA_ALIGNMENT. - * dwarf2out.c (DWARF_CIE_DATA_ALIGNMENT): Wrap definition in - #ifndef. - [ENABLE_CHECKING] (reg_save): Abort if offset is not a multiple of - DWARF_CIE_DATA_ALIGNMENT. - -2000-10-18 Michael Hayes - - * basic-block.h (struct loop): Delete fields pre_header_root - and pre_header_trace and replace with pre_header_edges - and num_pre_header_edges. - * flow.c (flow_loop_dump): Dump pre_header_edges. - (flow_loops_free): Free pre_header_edges. - (flow_loop_pre_header_scan): Calculate pre_header_edges. - -2000-10-18 Gerald Pfeifer - - * contrib.texi: Update references to steering committee members - and Jeff Law's entry. - -2000-10-18 Joseph S. Myers - - * c-common.c (CPLUSPLUS_STD_VER, C_STD_VER, C_STD_NAME): Define. - (maybe_read_dollar_number, check_format_info_main): Use them for - pedantic warning messages. - -2000-10-18 Joseph S. Myers - - * c-common.c (check_format_info_main): Minor cleanup: move - variables into inner scopes; initialize declarations where - appropriate; don't hardcode "scanf" name on warning for zero - width. - -2000-10-17 Mark Mitchell - - * c-common.c (back_end_hook): New variable. - * c-common.h (back_end_hook): Declare it. - * c-lang.c (finish_file): Use it. - - * emit-rtl.c (init_emit_once): Initialize the const_int_htab - earlier. - -2000-10-18 Jan Hubicka - - * i386.c (ix86_comparison_operator, put_condition_code, - ix86_match_ccmode, ix86_cc_mode): Handle CCRCmode. - (ix86_expand_strlensi_unroll_1): Use CCRCmode. - * i386.h (EXTRA_CC_MODES): Add CCRCmode. - * i386.md (adddi and negdi splitter): Use CCRCmode. - (add?i_3, add?i_4, add?i_5): Use CCRCmode; swap operands - (subsi3_carry): add '*' - (addsi3_carry_rc, subsi3_carry_rc, x86_movsicc_0_m1_rc): New. - (cmp to add peep2): Use CCRCmode; swap operands. - -2000-10-18 Kazu Hirata - - * h8300.c: Fix a comment typo. - (round_frame_size): New. - (compute_saved_regs): Likewise. - (push): Likewise. - (pop): Likewise. - (push_order): Remove. - (pop_order): Likewise. - (function_prologue): Rearrange code for readability. - (function_epilogue): Likewise. - - * config/h8300/h8300.md: Remove an unnecessary sign_extend - expander that is used when not optimizing. Output a tab after - each assembly insns. - - * reorg.c: Fix formatting. - -2000-10-17 Joern Rennecke - - * reload1.c (move2add_note_store): Check for simple - auto-inc in destination. - -2000-10-17 Michael Chastain - - * config/i386/i386-aout.h: define INT_ASM_OP. - -Tue Oct 17 20:11:08 2000 Alan Modra - - * pa.c (print_operand): Handle case 'c' for .vtable_inherit - -Tue Oct 17 20:05:51 2000 Martin Buchholz - - * i370.md: Fix spelling typo. - -2000-10-17 Franz Sirl - - * function.c (locate_and_pad_parm): Don't align stack unconditionally. - Fixes execute/20001017-1.c on powerpc-linux-gnu. - - * expr.c (store_constructor): Apply MEM_ALIAS_SET to MEMs only. - * rs6000/rs6000.c (rs6000_hash_constant): Use X0INT to access a - LABEL_REF. - - * rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS, - ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move from - here... - * rs6000/aix.h: ...to here. - * rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to Linux-style. - -2000-10-17 Jakub Jelinek - - * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Reload gp if needed. - - * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Always use call, make - sure linker can relax even the delay slot mov %g1,%o7, fix output - formating. - -2000-10-17 Kazu Hirata - - * config/h8300/h8300.md: Remove an unnecessary zero_extend - expander that is used when not optimizing. Output a tab after - each assembly insns. - -2000-10-17 Chandrakala Chavva - - * gcc.c: New options --target-help. - (process_command): Added code to parse this new option. - * toplev.c (display_target_options): New function to support the - above new option. - * cppinit.c (new_pending_directive) : New option OPT_target__help. - (cpp_handle_option): Support this new option. - * invoke.texi: Added notes about --target-help option. - -2000-10-17 Graham Stott - - * config/i386/i386.md (testqi_1): Add missing operand prefix - for operand 0. - * config/i386/i386-protos.h: Add missing prototype. - -2000-10-17 Diego Novillo - - * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Symbol - _GLOBAL_OFFSET_TABLE should not have a $ prefix when - using -mintel-syntax. - -2000-10-17 Joseph S. Myers - - * c-common.c (FMT_FLAG_DOLLAR_MULTIPLE): Define. - (format_types): Use it for printf. - (maybe_read_dollar_number): Add parameter for the kind of format - involved. Warn for multiple use for arguments if this is - inappropriate for the kind of format involved. - (check_format_info_main): Update calls to maybe_read_dollar_number. - -2000-10-17 J. David Anglin - - * inclhack.def (hpux_maxint): Also apply fix to values.h. - * fixincl.x: Rebuilt. - -2000-10-17 Alexandre Oliva - - * genrecog.c (write_switch): Return the first condition that needs a - label. - -2000-10-17 Bernd Schmidt - - * c-tree.h (warn_sequence_point): Move declaration to... - * c-common.h (warn_sequence_point): ... here. - * c-decl.c (warn_sequence_point): Move definition to... - * c-common.c (warn_sequence_point): ... here. - (struct reverse_tree): New. - (reverse_list, reverse_max_depth): New static variables. - (build_reverse_tree, common_ancestor, modify_ok - verify_sequence_points): New functions. - (c_expand_expr_stmt): Call verify_sequence_points if -Wsequence-point. - * c-typeck.c (check_modify_expr): Delete. - (build_modify_expr): Don't call it. - -2000-10-17 Joseph S. Myers - - * c-common.h (warn_missing_format_attribute): New variable. - * c-decl.c (warn_missing_format_attribute): New variable. - (c_decode_option): Decode -Wmissing-format-attribute and - -Wno-missing-format-attribute. - * c-common.c (check_function_format): If - -Wmissing-format-attribute, give a warning where a vprintf or - vscanf function is called by a function without its own printf or - scanf attribute. - * toplev.c (documented_lang_options): Add - -Wmissing-format-attribute. - * invoke.texi: Document -Wmissing-format-attribute. - -2000-10-17 Marc Espie - - * invoke.texi (-shared): Insist on requiring code generation flags - to be used along with -shared, and document the subtle failure that - may occur otherwise. - -2000-10-16 J. David Anglin - - * pa.md (return_internal): Move `use' after `return'. - -2000-10-16 Theodore Papadopoulo - - * machmode.def: Correct comment. - -2000-10-16 Rodney Brown - - * print-rtl.c (print_rtx_head): Constify. - * rtl.h (print_rtx_head): Similarly. - - * config/pa/pa/pa-protos.h (output_64bit_and, output_64bit_ior): - Constify char * return value. - * config/pa/pa/pa.c - (output_64bit_and, output_64bit_ior): Constify char * return value. - (pa_can_combine_p): Make static. - (function_arg): Decorate unused `named' argument. Fix comment typo. - (function_arg_partial_nregs): Decorate unused `named' argument. - -2000-10-16 Joseph S. Myers - - * c-common.c (format_check_results): New structure. - (finish_dollar_format_checking): Adjust to take a - format_check_results * parameter. - (check_format_info, check_format_info_recurse, - check_format_info_main): Split check_format_info into three - functions, the main checking going in check_format_info_main. - Recurse when any reduction of the format string argument towards a - string literal is done; go down both branches of a conditional - expression. Don't warn for extra format arguments or empty format - strings if they only occur in some branches of a conditional - expression. - -2000-10-16 Kazu Hirata - - * config/h8300/h8300.c: Remove obstack. Include ggc.h. - -2000-10-16 Jakub Jelinek - - * rtlanal.c (may_trap_p): Check operand modes of COMPARE. - -2000-10-15 Diego Novillo - - * i386.md (*movsi_or): Switch operand order for intel syntax. - -2000-10-14 Joseph S. Myers - - * PROBLEMS: Remove. - - * gcc.texi (Contributing): Update. - -2000-10-13 Diego Novillo - - * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Output final jump using - appropriate assembler dialect. - -2000-10-13 Alexandre Oliva - - * c-common.c (c_expand_builtin): PARAMS-ize prototype. - -2000-10-12 Marek Michalkiewicz - - * config/avr/avr.c (output_movhi, output_movsisf): Fix loading - constants 1 and 2 to NO_LD_REGS. - -2000-10-13 Kaveh R. Ghazi - - * Makefile.in (c-parse.c, tradcif.c): Create atomically. - - * objc/Make-lang.in (objc-parse.c): Likewise. - -2000-10-13 Richard Earnshaw - - * arm.c: Include obstack.h - (minipool_obstack, minipool_startobj): Define. - (arm_add_gc_roots): Initialize them. - (create_fix_barrier): Use our new obstack. - (push_minipool_barrier, push_minipool_fix): Likewise. - (arm_reorg): Release obstack memory. - -2000-10-13 Jakub Jelinek - - * config/sparc/sparc.md (nonlocal_goto_receiver): Remove. - (prologue, exception_receiver, builtin_setjmp_receiver): New - patterns. - * config/sparc/sparc.h (FINALIZE_PIC): Remove. - * config/sparc/sparc-protos.h (finalize_pic): Remove. - (load_pic_register): New prototype. - * config/sparc/sparc.c (pic_setup_code): Remove. - (finalize_pic): Rename to... - (load_pic_register): ...this function. - Don't look for nonlocal_goto_receivers and emit pic setup code - directly. Don't check current_function_uses_pic_offset_table. - -2000-10-13 Richard Earnshaw - - * tree.h (struct obstack): Declare. - -2000-10-12 Mark Mitchell - - Remove obstacks. - * Makefile.in (ggc-callbacks.o): Remove target. - (flow.o): Depend on GGC_H. - * alias.c (init_alias_analysis): - Remove ggc_p conditionals. - (end_alias_analysis): Likewise. - * basic-block.h (init_flow): New function. - (allocate_reg_life_data): Declare. - * bb-reorder.c (function_obstack): Replace with ... - (flow_obstack): ... new variable. - (fixup_reorder_chain): Use it. - * c-decl.c (ggc_p): Remove. - (caller-save.c): Don't call oballoc/obfree. - * combine.c (struct - undobuf): Remove storage. - (try_combine): Don't call oballoc. - (undo_all): Don't call obfree. - * cse.c (insert): Use xmalloc, not - oballoc. - (cse_main): Adjust accordingly. - * dwarf2out.c (save_rtx): Remove - obstack code. - (dwarf2out_init): Remove ggc_p conditionals. - * emit-rtl.c (rtl_obstack): Remove. - (gen_rtx_CONST_INT): Remove ggc_p conditionals. - (make_insn_raw): Likewise. - (emit_insn_before): Likewise. - (emit_insn_after): Likewise. - (emit_insn): Likewise. - (gen_sequence): Likewise. - (copy_insn_1): Remove handling of `b' RTL components. - (init_emit_once): Remove ggc_p conditionals. - * except.c (create_rethrow_ref): Don't fool with obstacks. - (add_partial_entry): Likewise. - (call_get_eh_context): Likewise. - (begin_protect_partials): Likewise. - (protect_with_terminate): Likewise. - * explow.c - (plus_constant_wide): Likewise. - * expr.c (init_expr_once): - Likewise. - (emit_block_move): Likewise. - (clear_storage): Likewise. - (expand_expr): Likewise. - * flow.c (function_obstack): Remove. - (flow_obstack): New variable. - (flow_firstobj): Likewise. - (create_base_block): Use the flow_obstack. - (split_block): Likewise. - (split_edge): Likewise. - (calculate_global_regs_live): Likewise. - (allocate_bb_life_data): Make it static. Likewiwse. - (init_flow): New function. - (size_int_type_wide): Remove ggc_p conditionals. - * function.c - (push_function_context_to): Don't call save_tree_status. - (pop_function_context_from): Or restore_tree_status. - (assign_stack_local_1): Don't call push_obstacks. - (find_fixup_replacement): Use xmalloc. - (fixup_var_refs_insns): Free the storage. - (insns_for_mem_walk): Don't mess with obstacks. - (instantiate_decls): Likewise. - (trampoline_address): Likewise. - (expand_function_end): Likewise. - * function.h (sturct function): - Remove obstack-related variables. - (save_tree_status): Don't declare. - (restore_tree_status): Likewise. - * gcse.c (compute_can_copy): - Don't call oballoc/obfree. - * genattrtab.c (operate_exp): Remove - ggc_p conditionals. - (simplify_cond): Likewise. - (simplify_test_exp): Don't mess with obstacks. - (optimize_attrs): Likewise. - * gengenrtl.c (gendef): Don't include - ggc_p conditionals. - * ggc-callbacks.c (ggc_p): Remove. - * ggc-none.c (ggc_p): Remove. - * ggc.h (ggc_p): Don't declare. - * integrate.c (save_for_inline): Don't mess with obstacks. - (integrate_decl_tree): Likewise. - (output_inline_function): Likewise. - * lists.c - (init_EXPR_INSN_LIST_cache): Likewise. - * loop.c (temp_obstack): - Remove. - (rtl_obstack): Likewise. - (init_loop): Don't mess with obstacks. - (reg_address_cost): Free BIVs and GIVs. - (check_insns_for_bivs): Use xmalloc, not oballoc. - (find_mem_givs): Likewise. - (record_biv): Likewise. - (general_induction_var): Likewise. - (product_cheap_p): Likewse. - * optabs.c (init_one_libfunc): Remove - ggc_p conditional. - * print-tree.c (debug_tree): Don't use - oballoc/obfree. - (print_node): Likewise. - * profile.c (output_func_start_profiler): - Remove call to temporary_allocation. - * reload1.c - (eliminate_regs_in_insn): Don't mess with obstacks. - * resource.c - (mark_target_live_regs): Use xmalloc. - (free_resource_info): Free the memory. - * rtl.c (rtl_obstack): - Remove. - (rtvec_alloc): Don't mess with obstacks. - (rtx_alloc): Likewise. - (rtx_free): Remove. - (copy_rtx): Don't handle `b' cases. - (read_rtx): Use a local rtl_obstack. - * rtl.h (oballoc): Remove. - (obfree): Likewise. - (pop_obstacks): Likewise. - (push_obstacks): Likewise. - (allocate_bb_life_data): Likewise. - (allocate_reg_life_data): Likewise. - (rtx_free): Likewise. - * sdbout.c (sdbout_queue_anonymous_type): - Use tree_cons, not saveable_tree_cons. - * simplify-rtx.c - (cselib_init): Don't mess with obstacks. - * stmt.c - (mark_block_nesting): Mark the label_chain. - (epxand_label): Use ggc_alloc, not oballoc. - (clear_last_expr): Don't mess with obstacks. - (expand_decl_cleanup): Likewise. - (expand_dcc_cleanup): Likewise. - (expand_dhc_cleanup): Likewise. - (expand_anon_union_decl): Likewise. - (add_case_node): Use xmalloc, not oballoc. - (free_case_nodes): New function. - (expand_end_case): Call it. - * stor-layout.c (layout_type): Don't - mess with obstacks. - (layout_type): Likewise. - * toplev.c (wrapup_global_declarations): - Likewise. - (compile_file): Remove ggc_p conditionals. - (rest_of_compilation): Call init_flow. Remove ggc_p conditionals. - (decode_f_option): Remove ggc_p conditionals. - * tree.c - (function_maybepermanent_obstack): Remove. - (maybepermanent_obstack): Likewise. - (function_obstack): Likewise. - (tmeporary_obstack): Likewise. - (momentary_obstack): Likewise. - (temp_decl_obstack): Likewise. - (saveable_obstack): Likewise. - (rtl_obstack): Likewise. - (current_obstack): Likewise. - (expression_obstack): Likewise. - (struct obstack_stack): Likewise. - (obstack_stack): Likewise. - (obstack_stack_obstack): Likewise. - (maybepermanent_firstobj): Likewise. - (temporary_firstobj): Likewise. - (momentary_firstobj): Likewise. - (temp_decl_firstobj): Likewise. - (momentary_function_firstobj): Likewise. - (all_types_permanent): Likewise. - (struct momentary_level): Likewise. - (momentary_stack): Likewise. - (init_obstacks): Remove initialization of removed obstacks. - (save_tree_status): Remove. - (restore_tree_status): Likewise. - (temporary_allocation): Liekwise. - (end_temporary_allocation): Liekwise. - (resume_temporary_allocation): Likewise. - (saveable_allocation): Likewise. - (push_obstacks): Likewise. - (push_obstacks_nochange): Likewise. - (pop_obstacks): Likewise. - (allocation_temporary_p): Likewise. - (permanent_allocation): Likewise. - (preserve_data): Likewise. - (preserve_initializer): Likewise. - (rtl_in_current_obstack): Likewise. - (rtl_in_saveable_obstack): Likewise. - (oballoc): Likewise. - (obfree): Likewise. - (savealloc): Likewise. - (expralloc): Likewise. - (print_obstack_name): Likewise. - (debug_obstack): Likewise. - (object_permanent_p): Likewise. - (push_momentary): Likewise. - (perserve_momentary): Likewise. - (clear_momentary): Likewise. - (pop_momentary): Likewise. - (pop_momentary_nofree): Likewise. - (suspend_momentary): Likewise. - (resume_momentary): Likewise. - (make_node): Don't set TREE_PERMANENT. - (copy_node): Remove ggc_p conditionals. Don't set TYPE_OBSTACK. - Don't set TREE_PERMANENT. - (get_identifier): Remove ggc_p conditionals. - (build_string): Likewise. - (make_tree_vec): Likewise. - (build_decl_list): Remove. - (build_expr_list): Likewise. - (tree_cons): Remove ggc_p conditionals. - (decl_tree_cons): Remove. - (expr_tree_cons): Likewise. - (perm_tree_cons): Likewise. - (temp_tree_cons): Likewise. - (saveable_tree_cons): Likewise. - (build1): Remove ggc_p conditionals. - (build_parse_node): Likewise. - (build_type_attribute_variant): Don't mess with obstacks. - (build_type_copy): Likewise. - (type_hash_canon): Likewise. - (build_pointer_type): Likewise. - (build_reference_type): Likewise. - (build_index_type): Likewise. - (build_range_type): Likewise. - (dump_tree_statistics): Don't print obstack information. - * tree.h - (struct tree_common): Remove permanent_flag. - (TREE_PERMANENT): Remove. - (TREE_SET_PERMANENT): Likewise. - (TYPE_OBSTACK): Likewise. - (struct tree_type): Remove obstack. - (oballoc): Remove. - (savealloc): Likewise. - (build_decl_list): Likewise. - (build_expr_list): Likewise. - (perm_tree_cons): Likewise. - (temp_tree_cons): Likewise. - (saveable_tree_cons): Likewise. - (decl_tree_cons): Likewise. - (expr_tree_cons): Likewise. - (suspend_momentary): Likewise. - (allocation_temporary_p): Likewise. - (resume_momentary): Likewise. - (push_obstacks_nochange): Likewise. - (permanent_allocation): Likewise. - (push_momentary): Likewise. - (clear_momentary): Likewise. - (pop_momentary): Likewise. - (end_temporary_allocation): Likewise. - (pop_obstacks): Likewise. - (push_obstacks): Likewise. - (pop_momentary_nofree): LIkewise. - (preserve_momentary): Likewise. - (saveable_allocation): Likewise. - (temporary_allocation): Likewise. - (resume_temporary_allocation): Likewise. - (perserve_initializer): Likewise. - (debug_obstack): Likewise. - (rtl_in_current_obstack): Likewise. - (rtl_in_saveable_obstack): Likewise. - (obfree): Likewise. - * varasm.c (current_obstack): Remove. - (saveable_obstack): Remove. - (rtl_obstack): Remove. - (immed_double_const): Don't mess with obstacks. - (immed_real_cons): Likewise. - (output_constant_def): Likewise. - (init_varasm_status): Use xcalloc. - (mark_pool_constant): Mark the pool constant itself. - (free_varasm_status): Free memory. - (decode_rtx_const): Call bzero directly, rather than expanding it - inline. - (record_rtx_const): Don't mess with obstacks. - (force_const_mem): Likewise. - * config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p - conditionals. - (aof_pic_entry): Likewise. - * config/ia64/ia64.c (ia64_encode_section_info): Likewise. - * config/m32r/m32r.c (m32r_encode_section_info): Likewise. - * config/pa/pa.c (saveable_obstack): Remove. - (rtl_obstack): Likewise. - (current_obstack): Likewise. - (output_call): Don't mess with obstacks. - (hppa_encode_label): Remove ggc_p conditionals. - * config/romp/romp.c (get_symref): Don't mess with obstacks. - * config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional. - (rs6000_encode_section_info): Likewise. - * config/sh/sh.c (get_fpscr_rtx): Likewise. - -Thu Oct 12 16:02:31 MET DST 2000 Jan Hubicka - - * i386.md (adddi3, subdi3 splitters): Update for new pattern. - (addsi3_cc, addqi3_cc, subsi3_cc): Remove - (addsi3_carry): Canonicalize. - (addqi_5): Remove '*'. - (sbb pattern): Canonicalize. - - * i386.md (cmp to inc/add peep2): New. - -2000-10-12 Richard Earnshaw - - * bb-reorder.c (reorder_basic_blocks): Allocate an aux block for - the exit block. - -2000-10-12 Joseph S. Myers - - * gcc.texi: Merge in contents of README.TRAD and TESTS.FLUNK. - * README.TRAD, TESTS.FLUNK: Remove. - -2000-10-12 Joseph S. Myers - - * c-common.c (decl_attributes): Don't allow strftime formats with - first_arg_num nonzero. - (check_format_info): Set wanted_type and wanted_type_name to zero - before they are possibly assigned and used. - -2000-10-12 Joseph S. Myers - - * c-common.c (scanf_flag_specs): Add flags ' and I. - (strftime_flag_pairs): Disallow any pair of the _, - and 0 flags, - or the ^ and # flags together. - (scan_char_table): Handle the ' and I flags. - (format_types): Add ' and I flags for scanf. - -2000-10-12 Joseph S. Myers - - * c-common.c (print_char_table): Use the unpromoted type for - lengths "h" and "hh" with conversions dioxXu. - (check_format_types): Apply the default argument promotions where - the wanted type is not a pointer target. - -2000-10-11 Michael Meeks - Joseph S. Myers - - * c-typeck.c (check_modify_expr): New function. - (build_modify_expr): Call it if warn_sequence_point. - * c-decl.c (warn_sequence_point): New variable. - (c_decode_option): Handle -Wsequence-point and - -Wno-sequence-point. Enable -Wsequence-point as part of -Wall. - * c-tree.h (warn_sequence_point): Declare. - * invoke.texi (-Wsequence-point): Document. - * toplev.c (documented_lang_options): Add -Wsequence-point and - -Wno-sequence-point. - Original work by Michael Meeks, 16 Jun 1998. - -Wed Oct 11 06:15:41 2000 Richard Kenner - - * tree.c (get_narrower): Don't look at precision of field if - not laid out yet. - -Tue Oct 10 23:14:33 2000 Denis Chertykov - - * config/avr/avr.c (valid_machine_decl_attribute): Allow `extern' - declaration for data with "progmem" attribute. - -2000-10-09 Marek Michalkiewicz - - * config/avr/avr.c (out_shift_with_cnt): Use AS2 macro. - Correct insn length if shift count is a memory operand. - * config/avr/avr.md: New define_peephole2 to use *reload_inqi. - (*iorhi3_clobber): Change lo8 to hi8. - (zero_extendhisi2): Change %B0 to %A1. - (ashlhi3, ashrhi3): Correct insn length. - (andhi3, abssf2, extendqisi2, extendhisi2): Change "cc" - from "clobber" to "set_n" in some alternatives. - -2000-10-10 Jakub Jelinek - - * reload1.c (calculate_needs_all_insns): If deleting an instruction, - remove its insn_chain structure as well. - -2000-10-09 J. David Anglin - - * dbxout.c (dbxout_source_line): Remove extra tab. - -2000-10-09 Hans-Peter Nilsson - - * config/elfos.h (UNIQUE_SECTION): Apply STRIP_NAME_ENCODING on name. - -2000-10-09 Richard Henderson - - * Makefile.in (LANG_LIB2FUNCS): Remove. - (LIB2FUNCS): Remove _pure. - (LIB2ADD): Remove LANG_LIB2FUNCS. - (stage_a): Don't set LANG_LIB2FUNCS. - * libgcc2.c (__terminate): Mark noreturn. - (__pure_virtual): Remove. - * mklibgcc.in: Remove LIB2ADD .txt processing. - -2000-10-09 Richard Earnshaw - - * arm.md (push_multi): Revert unintended change. - -2000-10-09 Richard Earnshaw - - * arm.c: Miscellaneous white space and comment clean-ups. No - functional change. - * arm.md: Likewise. - -2000-10-09 Kaveh R. Ghazi - - * c-common.c (c_expand_builtin_printf): Set the TREE_TYPE of a new - STRING_CST by calling combine_strings. - -2000-10-09 Richard Earnshaw - - * arm.c (thumb_expand_movstrqi): Rewrite to support SSA form. - (thumb_output_move_mem_multiple): Support new insn format. - * arm.md (movmem12b): Use SSA compatible format. - (movmem8b): Likewise. - -2000-10-09 Richard Earnshaw - - * arm.md (predicable): New attribute, default to "no". - (all patterns): Mark as predicable if appropriate. - (conditional execution splits): Split using predication format. - (define_cond_exec): Define. - * arm.c (arm_print_operand): handle insn predicate. - -2000-10-09 Gerald Pfeifer - - * README.NS32K: Remove file. - -2000-10-09 Gerald Pfeifer - - * README-bugs: Remove file. - -2000-10-08 Philipp Thomas - * aclocal.m4 (AM_GNU_GETTEXT): Fix non portable use of == operator - for test. - * configure: Rebuilt. - -2000-10-08 Philipp Thomas - * aclocal.m4 (AM_WITH_NLS): When not using included gettext, - disable catalog building if no suitable program was found. - Move warning message from here - (AM_GNU_GETTEXT): To here. - * configure: Rebuilt. - -2000-10-08 Philipp Thomas - * aclocal.m4 (GCC_PATH_PROG): New. Like AC_PATH_PROG but uses - different cache variables. - (GCC_PATH_PROG_WITH_TEST): New. Like AM_PATH_PROG_WITH_TEST but - uses different cache variables. - (AM_WITH_NLS): Use GCC_PATH_PROG and GCC_PATH_PROG_WITH_TEST. - * configure: Regenerated. - -2000-10-08 Richard Henderson - - * Makefile.in (libgcc.mk): Pass SHLIB_EXT, not SHLIB_LIBS. - * configure.in (sparc*-*-solaris*): Use t-slibgcc{,-sld}. - * mklibgcc.in: Consider SHLIB_LINK the entire shlib build command. - Use SHLIB_EXT. - - * config/t-linux (SHLIB_EXT): New. - (SHLIB_LINK): Use the entire build command, with substitutions. - (SHLIB_LIBS): Remove. - * config/alpha/t-osf4: Likewise. - * config/mips/t-iris6: Likewise. - * config/sparc/t-sol2: Likewise, but move shlib stuff... - * config/sparc/t-slibgcc-sld: ...here. - * config/sparc/t-slibgcc: New file. - -2000-10-08 Joseph S. Myers - - * tm.texi (INTMAX_TYPE, UINTMAX_TYPE): Define. - * c-common.h (enum c_tree_index): Add CTI_INTMAX_TYPE and - CTI_UINTMAX_TYPE. - (intmax_type_node, uintmax_type_node): Define. - * c-common.c (decl_attributes): If pedantic, warn if `mode' - attributes create a type wider than intmax_t. - (T_IM, T_UIM): Define properly. - * c-decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already - defined. - (init_decl_processing): Initialize intmax_type_node and - uintmax_type_node. - * c-lex.c (lex_number): When pedantic and warning for integer - constants that are too large, in C99 mode warn for those that have - a type wider than long long. - -2000-10-08 Joseph S. Myers - - * c-common.c (FMT_FLAG_ARG_CONVERT, FMT_FLAG_SCANF_A_KLUDGE, - FMT_FLAG_FANCY_PERCENT_OK): Define. - (format_char_info): Add flag "4" to comment. - (format_flag_spec, format_flag_pair): New structures. - (format_kind_info): Add additional fields to control format - checking. - (printf_flag_specs, printf_flag_pairs, scanf_flag_specs, - scanf_flag_pairs, strftime_flag_specs, strftime_flag_pairs): New - arrays. - (time_char_table): Use "4" flag to handle %Ey. - (format_types): Add entries for new fields. - (get_flag_spec): New function. - (check_format_info): Increase size of flag_chars[] to 256. - Control format checking using the new fields of a format_kind_info - and the new tables; remove all conditionals on printf_format_type, - scanf_format_type or strftime_format_type. Handle all details of - bad combinations of flags (including width, precision and strftime - modifiers) through data rather than ad hoc code. Handle all - details of standard versions in which flags appeared through - data. Use the "4" flag. - -2000-10-07 Will Cohen , Kazu Hirata - - * config/h8300/h8300.md: Remove the memory alternative and correct - the insn lengths in the templates for sign extension and zero - extension. - -2000-10-07 Richard Henderson - - * calls.c (expand_call): Disallow sibcalls to noreturn functions. - * flow.c (make_edges): Revert last change. - - * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Don't test - TREE_THIS_VOLATILE. - * config/pa/pa.h (FUNCTION_OK_FOR_SIBCALL): Likewise. - -2000-10-06 David O'Brien - - * config/alpha/elf.h: Standardize the formatting. - -2000-10-06 David O'Brien - - * config/alpha/elf.h: Protect the ASM_OUTPUT_IDENT definition with an - #undef. - -2000-10-06 Richard Henderson - - * function.c (diddle_return_value): Examine - current_function_return_rtx instead of the DECL_RESULT. - (expand_function_end): Handle reloading DECL_RESULT from memory - into a hard register. Query promote_mode for sign of mismatched - modes. - -2000-10-06 Vladimir Makarov - - * haifa-sched.c (schedule_insns): Fix typo in freeing - forward_dependency_cache. - -2000-10-06 Alexandre Oliva - - * config/sh/sh.md (calli_pcrel, call_valuei_pcrel): Add - `TARGET_SH2' as a condition. - -2000-10-06 Vladimir Makarov - - * haifa-sched.c (anti_dependency_cache, output_dependency_cache, - forward_dependency_cache): New variables. - (add_dependence, remove_dependence): Use anti_dependency_cache and - output_dependency_cache. - (compute_block_forward_dependences): Use forward_dependency_cache. - (schedule_insns): Allocate and free memory for anti/output/forward - dependencies caches. - -2000-10-06 Alexandre Oliva - - * config/sh/sh.md (call, call_value): Use `TARGET_SH2' instead of - `! TARGET_SH1'. Reindent. - -2000-10-06 Kaveh R. Ghazi - - * builtins.c (is_valid_printf_arglist, expand_builtin_printf): - Move functions from here ... - - * c-common.c (is_valid_printf_arglist, c_expand_builtin_printf): - ... to here. - (c_expand_builtin): New function. - (init_function_format_info): Don't set `check_function_format_ptr'. - (c_common_nodes_and_builtins): Set built_in_class type for - printf/__builtin_printf to BUILT_IN_FRONTEND. - (c_expand_expr): Handle CALL_EXPRs that are front-end builtins. - - * c-common.h (build_function_call): Declare. - - * expr.c (expand_expr): Pass builtins with class BUILT_IN_FRONTEND - to `lang_expand_expr' rather than `expand_builtin'. - - * tree.c (check_function_format_ptr): Delete. - - * tree.h (check_function_format_ptr): Likewise. - -2000-10-06 Hans-Peter Nilsson - - * dwarf2out.c (build_cfa_loc): Correct to use DW_OP_regx or - DW_OP_bregx when cfa->reg > 31. - - * frame-dwarf2.c (decode_stack_op) [case DW_OP_regx]: Add missing - break. - -2000-10-05 Richard Henderson - - * c-decl.c (warn_missing_noreturn): Remove. - (c_expand_body): Don't set or check can_reach_end. - * c-tree.h (warn_missing_noreturn): Move ... - * flags.h: ... here. - (can_reach_end): Remove. - * flow.c (check_function_return_warnings): New. - (make_edges): No edge to exit for noreturn sibcalls. - * function.c (expand_function_end): Save the return value - clobber instruction. - (mark_function_status): Mark it. - * function.h (struct function): Add x_clobber_return_insn. - * jump.c (can_reach_end): Remove. - (calculate_can_reach_end): Remove. - (jump_optimize_1): Don't call it. - * output.h (check_function_return_warnings): Declare. - * toplev.c (warn_missing_noreturn): Move from c-decl.c - (rest_of_compilation): Call check_function_return_warnings. - -2000-10-05 Richard Henderson - - * Makefile.in (NM_FOR_TARGET): New. - (libgcc.mk): Pass SHLIB_MKMAP, SHLIB_MAPFILES. - (libgcc.a, stmp-multilib): Pass NM_FOR_TARGET. - * mklibgcc.in: If SHLIB_MKMAP, build libgcc.map. Depend the - shared library build on that and EXTRA_MULTILIB_PARTS. - * mkmap-flat.awk: New file. - * mkmap-symver.awk: New file. - * libgcc-std.ver: New file. - * config/libgcc-glibc.ver: New file. - * config/ia64/libgcc-ia64.ver: New file. - * config/t-linux (SHLIB_MKMAP, SHLIB_MAPFILES): New. - (SHLIB_LINK): Add --version-script. - * config/ia64/t-ia64 (SHLIB_MAPFILES): Add libgcc-ia64.ver. - * config/mips/t-iris6 (SHLIB_MKMAP, SHLIB_MAPFILES): New. - * config/sparc/t-sol2 (SHLIB_MKMAP, SHLIB_MAPFILES): New. - (SHLIB_LINK): Add -M. - -2000-10-05 Richard Henderson - - * Makefile.in (LIB2FUNCS): Add _clz. - * libgcc2.c (__ffsdi2): Use count_trailing_zeros. - (__clz_tab): Put in its own unit, non-static. - * libgcc2.h: Always include longlong.h. - - * longlong.h [alpha] (count_leading_zeros): Use cmpbge with - a zero instead of -1. - (count_trailing_zeros): Likewise. - -2000-10-05 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_setcc): Don't swap GT tests - when second op1 is const0_rtx. Validate op0 as a register. - * config/alpha/alpha.md (setcc_internal): Don't allow constants - in the first argument of the compare. - (setcc_swapped_internal): Likewise. - (setne_internal): Likewise. - -2000-10-05 Geoff Keating - - * tree.c (tree_size): New function split out of copy_node. - (make_node): Remove obstack handling. Use tree_size. - (copy_node): Use tree_size. - * tree.h: Prototype tree_size. - -2000-10-05 Richard Henderson - - * diagnostic.c (output_format): Add missing break. - -2000-10-05 Jim Wilson - - * function.c (fixup_var_refs_1, case SET): When gen_move_insn returns a - SEQUENCE, call emit_insn_before, copy PATTERN and REG_NOTES of last - sequence insn to INSN, and delete last sequence insn. - -2000-10-05 Phil Edwards - - * gcc.c (main): Include generated configargs.h header - and use arguments in '-v' output. - -Thu Oct 5 16:16:57 2000 Richard Kenner - - * gcc.c: Move data on prefixes forward in file and reorganize. - (md_exec_prefix, md_startfile_prefix, md_startfile_prefix_1): - Always define, but make null if no value. - (static_specs): Add "md_exec_prefix", "md_startfile_prefix", - and "md_startfile_prefix_1". - (main): Check whether md_exec_prefix and the others are the - null string rather than whether the macro is defined. - -Thu Oct 5 19:04:18 2000 J"orn Rennecke - - * (convert_move): Use zero_extendpsisi2 to do an unsigned extension - from PSImode to SImode. - -2000-10-05 Jakub Jelinek - - * emit-rtl.c (gen_lowpart_common) [REAL_ARITHMETICS]: Fix conversion - from float to integral mode with HOST_BITS_PER_WIDE_INT 64. - * dwarf2out.c (add_const_value_attribute): Divide by 4, not - sizeof(long). - -Thu Oct 5 09:31:31 2000 Richard Kenner - - * fold-const.c (fold, case MINUS_EXPR, case EQ_EXPR): Perform - negation in proper type.a - -2000-10-04 Richard Henderson - - * configure.in (enable-shared): New. - * Makefile.in (LIBGCC_DEPS): Depend on EXTRA_PARTS as well. - (libgcc.mk): Pass SHLIB_LINK, SHLIB_LIBS, SHLIB_MULTILIB to mklibgcc. - * mklibgcc.in: Use them to link shared a libgcc. - * config/t-linux (SHLIB_LINK, SHLIB_LIBS): New. - * config/alpha/t-ieee (SHLIB_MULTILIB): New. - * config/mips/t-iris6 (SHLIB_LINK, SHLIB_LIBS): New. - * config/sparc/t-sol2 (SHLIB_LINK, SHLIB_LIBS): New. - - * configure.in (alpha-osf*): Use t-osf and x-osf. - * config/alpha/t-osf: New file. - * config/alpha/t-osf4: New file. - * config/alpha/x-osf: New file. - * config/alpha/x-alpha: Remove file. - -2000-10-04 Will Cohen - - * c-typeck.c (process_init_element): Added warning for zero-length - array. - - * extend.texi (Zero Length): State that static initializers for - zero-length arrays are not allowed. - -Mon Oct 2 14:50:14 MET DST 2000 Jan Hubicka - - * rtlanal.c (single_set_1): Do not require USE and CLOBBERs - to come last. - -2000-10-03 Michael Hayes - - * config/float-c4x.h: New. - * configure.in (c4x-*): Set float_format to c4x. - * configure: Regenerate. - -2000-10-02 Kaveh R. Ghazi - - * configure.in (sparc-*-solaris2*): Disable 32-to-64 cross - compilation for solaris versions 2.7 and greater. - -2000-10-02 Marc Espie - - * config/alpha.h (WORD_SWITCH_TAKES_ARG): add -rpath to default, - instead of redefining from scratch. - -2000-10-02 David O'Brien - - * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Define. - -2000-10-01 Mark Mitchell - - * config/ns32k/genix.h: Remove. - * config/ns32k/x-genix: Likewise. - * config/ns32k/xm-genix.h: Likewise. - * config/fx80: Remove all filee in directory. - * config/pyr: Likewise. - * config/tahoe: Likewise. - * config/gmicro: Likewise. - * config/spur: Likewise. - * configure.in: Remove configury bits for above targets. - * configure: Regenerated. - - * configure.in: Don't configure chill by default. - * configure: Regenerated. - - * c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only. - (lang_mark_false_label_stack): Remove. - * c-lex.c (init_c_lex): Add file_info_tree as GC root. Allocate - string in GC area. - (mark_splay_tree_node): New function. - (mark_splay_tree): Likewise. - * except.c (mark_eh_status): Only call lang_mark_false_label_stack - if it exists. - * ggc-callbacks.c (lang_mark_false_label_stack): Remove. - * ggc-common.c (lang_mark_false_label_stack): Change type. - * ggc.h (ggc_alloc_string): Add comment. - (ggc_strdup): New function. - -Sat Sep 23 19:10:20 2000 Denis Chertykov - - * config/avr/avr.h (BRANCH_COST): Define as 0. - - * config/pdp11/pdp11.c: #include "tree.h" added. - -2000-09-30 Marek Michalkiewicz - - * config/avr/avr.c (ashlhi3_out, ashlsi3_out, ashrhi3_out, - ashrsi3_out, lshrhi3_out, lshrsi3_out): Optimize more cases - with known shift count. - * config/avr/avr.md (ashlsi3, ashrsi3, lshrsi3): - New alternative for shift count 2 with no scratch register. - (ashlhi3, ashlsi3): Change "cc" attribute from "clobber" to - "set_n" for shift counts 1 and 2. - -2000-09-30 Geoff Keating - - * config/rs6000/rs6000.md (movsi_to_cr): Remove the USE. Calculate - the mask value from the individual SET operations. - (return_internal_si): Move the USE after the RETURN. - (return_internal_di): Likewise. - (return_and_restore_fpregs_si): Likewise. - (return_and_restore_fpregs_di): Likewise. - (return_eh_si): Likewise. - (return_eh_di): Likewise. - * config/rs6000/rs6000.c (mtcrf_operation): Don't look for, - or check, the USE. - (rs6000_emit_prologue): Don't emit the USE for movsi_to_cr. - Don't generate a PARALLEL around a single operation movsi_to_cr. - Generate the RETURN first in any PARALLELs. - - * rtlanal.c (single_set_1): Use fatal_insn to display the - invalid insn. Check for more cases when a USE or CLOBBER occurs - before a SET. - * Makefile.in: Update dependencies for rtlanal.o. - -2000-09-30 Joseph S. Myers - - * i386.c: Move include of "config.h" to before that of . - -2000-09-30 Joseph S. Myers - - * c-tree.texi, contrib.texi, gcc.texi, install.texi, invoke.texi: - Consistently use @email for formatting email addresses. - -2000-09-29 Richard Henderson - - * cse.c (notreg_cost): New argument outer. - (COST): Pass in SET to notreg_cost - (COST_IN): New. - (fold_rtx): Use COST_IN. Prefer constants when costs - are the same. - -2000-09-29 David Edelsohn - - * fixinc/inclhack.def (broken_cabs): Generalize regex. - * fixinc/fixincl.x: Regenerate. - -2000-09-29 Franz Sirl - - * loop.c (check_final_value): A GIV is not replaceable if used - before set. - -Fri Sep 29 10:04:12 2000 Jeffrey A Law (law@cygnus.com) - - * version.c: Bump to gcc-2.97. - -Frs Sep 29 13:37:59 MET DST 2000 Jan Hubicka - - * final.c (final_scan_insn): Remove extra extract_insn call; - Use caching for constrain_operands. - (cleanup_subreg_operands): Use caching for extract_insn. - * recog.c (constrain_operands_cached): New. - * recog.h (constrain_operands_cached): Declare. - * i386.c (ix86_attr_length_immediate_default, - ix86_attr_length_address_default, ix86_agi_dependant): Cache - extract_insn call. - - * recog.c (asm_noperands): Tweak. - (extract_insn): Do not call asm_noperads for non-asm instructions. - -Fri Sep 29 13:20:42 MET DST 2000 Jan Hubicka - - * recog.c (recog_memoized): Rename to recog_memoized_1. - * recog.h (recog_memoized): Rename to recog_memoized_1. - (recog_memoized): New macro. - * rtl.h (single_set): Rename to single_set_1 - (single_set): New macro. - * rtlanal.c (single_set): Rename to single_set_1; expect clobbers - to be last. - - * i386.md (strmovsi_1, strmovhi_1 strmovqi_1): - Do not use match_dup of input operands at outputs. - Use register_operand for memory expression. - (rep_movsi): Put use last, canonicalize. - Use register_operand for memory expression. - (rep_movqi): Put use last. - Use register_operand for memory expression. - (strsetsi_1, strset_hi_1, strsetqi_1): Do not use match_dup - of input operands at outputs. Use register_operand for memory - expression. - (rep_stossi): Put use last; canonicalize; fix match_dup in - the address expression - (rep_stosqi): Likewise. - (memcmp expander): Update calls. - (cmpstrsi_nz_1, cmpstrsi_1, strlensi_1): Avoid match_dups in - the clobbers. - - * i386.md (fp_jcc_3, fp_jcc_4, jp_fcc_5): if_then_else operand is - VOIDmode. - (fp_jcc_4, fp_jcc_3): Refuse unordered comparisons. - -2000-09-28 David O'Brien - - * config/i386/freebsd-aout.h: New, FreeBSD a.out config file. - Contains the old contents of config/i386/freebsd.h - * config/i386/freebsd.h: Now the ELF rather than a.out config file. - Contains the old contents of config/i386/freebsd-elf.h - * config/i386/freebsd-elf.h: Retire this file -- contents moved to - config/i386/freebsd.h. - * configure.in: Adjust for above changes. - * po/POTFILES.in: Likewise. - * po/en_GB.po: Likewise. - * po/gcc.pot: Likewise. - * configure: Rebuilt. - -2000-09-28 Franz Sirl - - * doloop.c (doloop_modify): Prevent delete_insn() from - deleting too much. Prefer loop->top over loop->start as - target for the new JUMP insn. - (doloop_valid_p): Ignore loop with exit_count != 0. - -2000-09-28 Philipp Thomas - - * invoke.texi (i386 Options): Add athlon to table of possible - choices for -mcpu=. - -2000-09-28 Gabriel Dos Reis - - * diagnostic.h (output_clear_message_text): New function. - (output_message_text): New macro. - - * diagnostic.c (clear_text_info): Rename to - output_clear_message_text. - (output_clear): Adjust. - (output_finish): Rename to output_finalize_message. Tweek. - (output_to_stream): Adjust. - -2000-09-28 Neil Booth - - * cpperror.c (_cpp_begin_message): Do the test for suppression - of warnings and pedantic warnings before the "is a warning an - error" tests. - * cppinit.c (cpp_handle_option): Remove surplus \n. - * cpplex.c (ON_REST_ARG): Delete. - (skip_block_comment): Initialize prevc. - (parse_args): Improve error messages. - (maybe_paste_with_next): Use CONTEXT_VARARGS rather - than ON_REST_ARG. - * cpplib.c (cpp_push_buffer): Fix grammar in message. - * cppmain.c (main): Set callbacks for #ident and #pragma - only if no_output option is false. - (do_pragma_implementation): Only call the #pragma handler - if it is set in the cpp_reader structure. - -Wed Sep 27 14:00:07 2000 Donald Lindsay - - * integrate.c (copy_insn_list): if an ignored return value - is being clobbered, skip cloning that into the inline copy. - -2000-09-27 Joseph S. Myers - - * extend.texi, invoke.texi, gcc.texi, install.texi: Consistently - use @uref for formatting URLs. - -2000-09-27 Mark Elbrecht - - * config/i386/djgpp.h (UNIQUE_SECTION): Constify the variables - name and prefix. - -Tue 26-Sep-2000 18:25:38 BST Neil Booth - - * gcc.c (cpp_options): Add spec for -ftabstop=. - (invoke_as): New spec that handles invoking as. - Update specs to handle -save-temps and -traditional. - * ch/lang-specs.h, f/lang-specs.h, java/lang-specs.h: - Use invoke_as. - * cp/lang-specs.h, objc/lang-specs.h: Update to use - invoke_as, and handle -save-temps and -traditional (if - appropriate). - -2000-09-26 Jakub Jelinek - - * config/sparc/sparc.c (sparc_emit_set_const64): Don't abort when - op0 is a SUBREG. - (function_arg_slotno): Accept TImode/CTImode. - * config/sparc/sparc.h (MIN_UNITS_PER_WORD): If IN_LIBGCC2 define - to UNITS_PER_WORD. - -2000-09-26 Michael Hayes - - * flow.c (flow_loop_pre_header_scan): Punt if loop enters - from entry block. - -2000-09-25 Jim Wilson - - * config/ia64/ia64.h (INDEX_REG_CLASS): Define to GENERAL_REGS. - (REGNO_OK_FOR_INDEX_P): Define to REGNO_OK_FOR_BASE_P. - (LEGITIMATE_ADDRESS_DISP): Use LEGITIMATE_ADDRESS_REG. - (REG_OK_FOR_INDEX): Define to REG_OK_FOR_BASE_P. - -Tue 26-Sep-2000 00:16:22 BST Neil Booth - - * cpplex.c (parse_args): Don't set VOID_REST flag. - (CONTEXT_VARARGS): New flag. - (maybe_paste_with_next): Set context earlier in loop. Use - it. Do varargs test with CONTEXT_VARARGS flag. - (push_arg_context): Set CONTEXT_VARARGS flag if we're - pushing an argument context for a varargs argument. - * cpplib.h (VOID_REST): Delete. - * gcc.dg/cpp/vararg1.c: Add test case. - -2000-09-25 Branko Cibej - - * flags.h: Declare warning flag warn_system_headers. - * toplev.c: Define it. - (W_options): Add option -Wsystem-headers. - * diagnostic.c (count_error): Test warn_system_headers. - * invoke.texi: Add description for -Wsystem-headers. - * cpplib.h (cpp_options): New member warn_system_headers. - * cpphash.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Don't test - CPP_IN_SYSTEM_HEADER. - * cpplib.c (do_import, do_pragma_once): Likewise. - * cpperror.c (_cpp_begin_message): Test warn_system_headers - and CPP_IN_SYSTEM_HEADER. - * cppinit.c (handle_option): Recognize -Wsystem_headers. - (print_help): Describe -Wsystem_headers. - * cpplex.c (lex_line): Reorganize condition so that warnings - about C++ comments in system headers can be enabled. Remove - label do_line_comment. - -Mon 25-Sep-2000 23:38:27 BST Neil Booth - - * cpplex.c (save_comment): Only store the initial '/' - now. - (lex_token): Combine handling of the two comment types. - Pass everything but the initial '/' to save_comment. - -Mon 25-Sep-2000 23:31:45 BST Neil Booth - - * cpphash.h (_cpp_digraph_spellings, _cpp_process_directive, - _cpp_can_paste): New library-internal prototypes. - * cpplex.c (dump_param_spelling, output_line_command, - output_token, cpp_scan_buffer, cpp_scan_buffer_nooutput, - cpp_printf, cpp_output_list): Move to cppoutput.c. - (process_directive, can_paste, digraph_spellings): Add _cpp_ prefix. - * cppmacro.c (dump_macro_args, cpp_dump_definition) Move to - cppoutput.c. - * cppoutput.c (dump_macro_args, cpp_dump_definition, output_token, - dump_param_spelling, output_line_command, cpp_scan_buffer, - cpp_scan_buffer_nooutput, cpp_printf, cpp_output_list): Moved - from elsewhere. - * Makefile.in: Add cppoutput.c. - * po/POTFILES.in: Add cppoutput.c. - -2000-09-25 Richard Henderson - - * config/ia64/ia64.c (ia64_print_operand): Define 'e' as 64-n. - * config/ia64/ia64.md (rotrsi3): Allow variable rotates; don't - split until after reload. - (rotlsi3, rotldi3): New. - -2000-09-25 Gabriel Dos Reis - - * diagnostic.c (output_last_position): Define. - (set_real_maximum_length): Tweek. - * diagnostic.h (output_last_position): Declare. - -2000-09-25 Kazu Hirata - - * config/i386/i386.c: Fix formatting. - -2000-09-24 Alan Lehotsky - - * emit-rtl-c (gen_lowpart_common): Accept non-paradoxical SUBREG when - UNITS_PER_WORD is small. - -2000-09-25 Joseph S. Myers - - * c-common.c (format_char_info): Add flags2; update comments. - (print_char_table, scan_char_table, time_char_table): Split some - flags out into flags2. - (check_format_info): Use flags2 for those flags, for identifying - the initial character of a scanf scanset, and for identifying - printf formats where the '0' flag is ignored with precision. - -2000-09-25 Hans-Peter Nilsson - - Changes below marked "here" add TABs on either or both sides, - covering start of line, up to any operand for all noted .*ASM.*_OP - definitions. All callers changed. - * tm.texi: Make documented *_ASM.*_OP:s include spacing - (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, SHARED_SECTION_ASM_OP, - BSS_SECTION_ASM_OP, SHARED_BSS_SECTION_ASM_OP, INIT_SECTION_ASM_OP, - ASM_BYTE_OP, FINI_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP, - ASM_STABS_OP, ASM_STABD_OP, ASM_STABN_OP). - Fix typos in description for LONG_LONG_TYPE_SIZE and - FINI_SECTION_ASM_OP. - * crtstuff.c (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Explain - why these defaults don't have leading spacing. - * dbxout.c (ASM_STABS_OP, ASM_STABN_OP): Here. - * dwarf2out.c (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP, SECTION_ASM_OP, ASM_BYTE_OP): Here. - * dwarfout.c (FILE_ASM_OP, VERSION_ASM_OP, - UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, ASM_BYTE_OP, - PUSHSECTION_ASM_OP, POPSECTION_ASM_OP): Here. - * defaults.h (ASM_STABD_OP, EH_FRAME_SECTION_ASM_OP): Here. - * varasm.c (ASM_STABS_OP): Here. - * xcoffout.h (ASM_STABS_OP): Here. - * config/elfos.h (IDENT_ASM_OP, ASM_BYTE_OP, SET_ASM_OP, - SKIP_ASM_OP, ALIGN_ASM_OP, COMMON_ASM_OP, LOCAL_ASM_OP, - INT_ASM_OP, ASCII_DATA_ASM_OP, TYPE_ASM_OP, SIZE_ASM_OP, - STRING_ASM_OP): Here. - * config/freebsd.h (IDENT_ASM_OP): Here. - * config/linux-aout.h (SET_ASM_OP): Here. - * config/linux.h (SET_ASM_OP): Here. - * config/lynx.h (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, - INT_ASM_OP): Here. - * config/netbsd.h (TYPE_ASM_OP, SIZE_ASM_OP, SET_ASM_OP): Here. - * config/nextstep.h (EH_FRAME_SECTION_ASM_OP, ALIGN_ASM_OP): Here. - * config/openbsd.h (TYPE_ASM_OP, SIZE_ASM_OP, SET_ASM_OP): Here. - * config/psos.h (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, - INT_ASM_OP): Here. - * config/ptx4.h (IDENT_ASM_OP, ASM_BYTE_OP, SET_ASM_OP, - SKIP_ASM_OP, ALIGN_ASM_OP, COMMON_ASM_OP, LOCAL_ASM_OP, - INT_ASM_OP, ASCII_DATA_ASM_OP, CONST_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, INIT_SECTION_ASM_OP, - FINI_SECTION_ASM_OP, TYPE_ASM_OP, SIZE_ASM_OP STRING_ASM_OP): Here. - * config/svr3.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, - CONST_SECTION_ASM_OP, ASM_BYTE_OP): Here. - * config/a29k/udi.h (INT_ASM_OP): Here. - * config/alpha/alpha-interix.h (CONST_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, INT_ASM_OP, - SET_ASM_OP): Here. - * config/alpha/alpha.h (TEXT_SECTION_ASM_OP, - READONLY_DATA_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP, ASM_STABS_OP, ASM_STABN_OP, - ASM_STABD_OP): Here. - * config/alpha/elf.h (IDENT_ASM_OP, SKIP_ASM_OP, ALIGN_ASM_OP, - COMMON_ASM_OP, INT_ASM_OP, ASCII_DATA_ASM_OP, - CONST_SECTION_ASM_OP, CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, - BSS_SECTION_ASM_OP, SBSS_SECTION_ASM_OP, SDATA_SECTION_ASM_OP, - INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, TYPE_ASM_OP, - SIZE_ASM_OP, STRING_ASM_OP): Here. - * config/alpha/vms.h (LINK_SECTION_ASM_OP, - READONLY_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, COMMON_ASM_OP): Here. - * config/arc/arc.h (ASM_BYTE_OP, SET_ASM_OP): Here. - (PUSHSECTION_ASM_OP): Define this, not PUSHSECTION_FORMAT. - * config/arm/aof.h (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): - Here. - * config/arm/aout.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - BSS_SECTION_ASM_OP, SET_ASM_OP): Here. - * config/arm/coff.h (INT_ASM_OP): Here. - * config/arm/conix-elf.h (UNALIGNED_WORD_ASM_OP): Here. - * config/arm/elf.h (TYPE_ASM_OP, SIZE_ASM_OP, INT_ASM_OP): Here. - * config/arm/linux-elf.h (IDENT_ASM_OP, CONST_SECTION_ASM_OP, - INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP): Here. - * config/arm/unknown-elf.h (UNALIGNED_WORD_ASM_OP): Here. - * config/avr/avr.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - ASM_BYTE_OP, TYPE_ASM_OP, SIZE_ASM_OP, WEAK_ASM_OP, - STRING_ASM_OP): Here. Update documentation copy in comments. - * config/c4x/c4x.h (ASM_STABS_OP, BSS_SECTION_ASM_OP): Here. - * config/clipper/clipper.h (TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP): Here. - * config/clipper/clix.h (BSS_SECTION_ASM_OP, INIT_SECTION_ASM_OP): - Here. - * config/convex/convex.h (TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP): Here. - * config/d30v/d30v.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - BSS_SECTION_ASM_OP): Here. - * config/fr30/fr30.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - BSS_SECTION_ASM_OP): Here. - * config/fx80/fx80.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/gmicro/gmicro.h (TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP): Here. - * config/h8300/h8300.h (ASM_WORD_OP): Here. - * config/i370/i370.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - BSS_SECTION_ASM_OP): Here. - * config/i386/aix386.h (INIT_SECTION_ASM_OP): Here. - * config/i386/bsd.h (ASM_BYTE_OP): Here. - * config/i386/cygwin.h (SET_ASM_OP, INT_ASM_OP): Here. - * config/i386/dgux.h (CONST_SECTION_ASM_OP): Here. - * config/i386/djgpp.h (IDENT_ASM_OP, INT_ASM_OP, SET_ASM_OP): - Here. - * config/i386/freebsd-elf.h (SET_ASM_OP): Here. - * config/i386/freebsd.h (TYPE_ASM_OP, SIZE_ASM_OP, INT_ASM_OP): - Here. - * config/i386/i386-coff.h (CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, INT_ASM_OP): Here. - * config/i386/i386-interix.h (STRING_ASM_OP, CONST_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, INT_ASM_OP, - SET_ASM_OP): Here. - * config/i386/i386elf.h (BSS_SECTION_ASM_OP): Here. - * config/i386/netbsd.h (INT_ASM_OP): Here. - * config/i386/openbsd.h (INT_ASM_OP): Here. - * config/i386/osfrose.h (TYPE_ASM_OP, SIZE_ASM_OP, SET_ASM_OP, - IDENT_ASM_OP): Here. - * config/i386/sco5.h (ALIGN_ASM_OP, ASCII_DATA_ASM_OP, - ASM_BYTE_OP, IDENT_ASM_OP, COMMON_ASM_OP, SET_ASM_OP, - LOCAL_ASM_OP, INT_ASM_OP, TYPE_ASM_OP, SIZE_ASM_OP, STRING_ASM_OP, - SKIP_ASM_OP, GLOBAL_ASM_OP): Here. - * config/i386/seq-sysv3.h (SHARED_SECTION_ASM_OP, - SHARED_BSS_SECTION_ASM_OP): Here. - * config/i386/sequent.h (SHARED_SECTION_ASM_OP): Here. - * config/i386/sun386.h (ASM_BYTE_OP, TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP): Here. - * config/i386/svr3gas.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, - CONST_SECTION_ASM_OP): Here. - * config/i386/sysv3.h (INIT_SECTION_ASM_OP): Here. - * config/i386/unix.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - BSS_SECTION_ASM_OP): Here. - * config/i860/bsd-gas.h (ASCII_DATA_ASM_OP): Here. - * config/i860/bsd.h (ASCII_DATA_ASM_OP): Here. - * config/i860/fx2800.h (ASM_STABS_OP, ASM_STABN_OP, ASM_STABD_OP, - BSS_ASM_OP): Here, but use trailing spaces. - * config/i860/i860.h (ASM_BYTE_OP, TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP): Here. - * config/i860/paragon.h (ASCII_DATA_ASM_OP, BSS_SECTION_ASM_OP): - Here. - * config/i860/sysv3.h (ASCII_DATA_ASM_OP, CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, TDESC_SECTION_ASM_OP): Here. - * config/i860/sysv4.h (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, - TDESC_SECTION_ASM_OP): Here. - * config/i960/i960-coff.h (CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, INT_ASM_OP): Here. - * config/i960/i960.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/ia64/ia64.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - BSS_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP, - UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP): Here. - * config/ia64/sysv4.h (ASM_BYTE_OP, STRING_ASM_OP, SKIP_ASM_OP, - COMMON_ASM_OP, ASCII_DATA_ASM_OP, INIT_SECTION_ASM_OP, - FINI_SECTION_ASM_OP, CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, - SDATA_SECTION_ASM_OP, SBSS_SECTION_ASM_OP): Here. - * config/m32r/m32r.h (SCOMMON_ASM_OP): Here. - * config/m68hc11/m68hc11.h (GLOBAL_ASM_OP): Here. - * config/m68k/auxas.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP, - SPACE_ASM_OP, ALIGN_ASM_OP, GLOBAL_ASM_OP, SWBEG_ASM_OP, - SET_ASM_OP): Here. - * config/m68k/coff.h (BSS_SECTION_ASM_OP, CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, INT_ASM_OP): Here. - * config/m68k/crds.h (BSS_SECTION_ASM_OP): Here. - * config/m68k/dpx2.h (ASM_BYTE_OP, GLOBAL_ASM_OP): Here. - * config/m68k/hp320.h (ASCII_DATA_ASM_OP, GLOBAL_ASM_OP): Here. - * config/m68k/linux.h (BSS_SECTION_ASM_OP): Here. - * config/m68k/lynx.h (BSS_SECTION_ASM_OP): Here. - * config/m68k/m68k.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - GLOBAL_ASM_OP): Here. - * config/m68k/m68kelf.h (SWBEG_ASM_OP, BSS_ASM_OP, - BSS_SECTION_ASM_OP): Here. - * config/m68k/m68kv4.h (BSS_ASM_OP): Here. - * config/m68k/mot3300.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - ASCII_DATA_ASM_OP, SET_ASM_OP, CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, GLOBAL_ASM_OP, ASM_BYTE_OP, ALIGN_ASM_OP, - SKIP_ASM_OP): Here. - * config/m68k/newsgas.h (SET_ASM_OP): Here. - * config/m68k/rtemself.h (INIT_SECTION_ASM_OP, - FINI_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP): Here. - * config/m68k/sgs.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP, - SPACE_ASM_OP, ALIGN_ASM_OP, GLOBAL_ASM_OP, SWBEG_ASM_OP, - SET_ASM_OP, UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP): Here, - but use trailing spaces. - * config/m68k/tower-as.h (TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP, GLOBAL_ASM_OP, INIT_SECTION_ASM_OP, - FINI_SECTION_ASM_OP, CONST_SECTION_ASM_OP, BSS_SECTION_ASM_OP): - Here. - * config/m88k/dgux.h (FINI_SECTION_ASM_OP, INIT_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Here. - * config/m88k/m88k.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - CONST_SECTION_ASM_OP, TDESC_SECTION_ASM_OP, CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, - IDENT_ASM_OP, FILE_ASM_OP, SECTION_ASM_OP, SET_ASM_OP, - GLOBAL_ASM_OP, ALIGN_ASM_OP, SKIP_ASM_OP, COMMON_ASM_OP, - BSS_ASM_OP, FLOAT_ASM_OP, DOUBLE_ASM_OP, INT_ASM_OP, SHORT_ASM_OP, - CHAR_ASM_OP, ASCII_DATA_ASM_OP, SBSS_ASM_OP, SCOMM_ASM_OP, - SDATA_SECTION_ASM_OP, TYPE_ASM_OP, SIZE_ASM_OP, INTERNAL_ASM_OP, - VERSION_ASM_OP, UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - PUSHSECTION_ASM_OP, POPSECTION_ASM_OP, REQUIRES_88110_ASM_OP, - ASM_BYTE_OP): Here. - * config/m88k/openbsd.h (SET_ASM_OP): Here. - * config/m88k/sysv4.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Here. - * config/mcore/mcore-elf.h (UNALIGNED_INT_ASM_OP, - UNALIGNED_SHORT_ASM_OP, CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP): Here. - * config/mcore/mcore-pe.h (CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, INT_ASM_OP): Here. - * config/mips/elf.h (TYPE_ASM_OP, SIZE_ASM_OP, - BSS_SECTION_ASM_OP): Here. - * config/mips/elf64.h (TYPE_ASM_OP, SIZE_ASM_OP): Here. - * config/mips/iris5.h (ABICALLS_ASM_OP): Here. - * config/mips/iris6.h (TYPE_ASM_OP, SIZE_ASM_OP, - POPSECTION_ASM_OP, BSS_SECTION_ASM_OP, CONST_SECTION_ASM_OP_32, - CONST_SECTION_ASM_OP_64, CTORS_SECTION_ASM_OP, - DTORS_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP): Here. - * config/mips/mips.c (ABICALLS_ASM_OP): Here. - * config/mips/mips.h (ASM_STABS_OP, ASM_STABN_OP, ASM_STABD_OP): - Here. - * config/mips/netbsd.h (TYPE_ASM_OP, SIZE_ASM_OP, WEAK_ASM_OP): - Here. - * config/mips/osfrose.h (SET_ASM_OP): Here. - * config/mips/sni-svr4.h (ABICALLS_ASM_OP): Here. - * config/ns32k/encore.h (SHARED_SECTION_ASM_OP): Here. - * config/ns32k/merlin.h (SHARED_SECTION_ASM_OP): Here. - * config/ns32k/ns32k.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/ns32k/sequent.h (SHARED_SECTION_ASM_OP): Here. - * config/ns32k/tek6000.h (SHARED_SECTION_ASM_OP): Here. - * config/pa/pa-64.h (INT_ASM_OP, TYPE_ASM_OP, SIZE_ASM_OP): Here. - * config/pa/pa.h (ASM_STABS_OP, ASM_STABN_OP): Here. - * config/pj/pj.h (SET_ASM_OP, BSS_SECTION_ASM_OP): Here. - * config/pyr/pyr.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/romp/romp.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/rs6000/rs6000.h (SET_ASM_OP): Here. - * config/rs6000/sol2.h (ASM_STABN_OP): Here. - * config/rs6000/sysv4.h (SKIP_ASM_OP, LOCAL_ASM_OP, LCOMM_ASM_OP): - Here. - * config/sh/sh.h (SET_ASM_OP, BSS_SECTION_ASM_OP, - UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP): Here. - * config/sparc/linux.h (COMMON_ASM_OP): Here. - * config/sparc/linux64.h (COMMON_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP): Here. - * config/sparc/litecoff.h (BSS_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, INT_ASM_OP): Here. - * config/sparc/lynx.h (BSS_SECTION_ASM_OP): Here. - * config/sparc/pbd.h (ASM_INT_OP): Here. - * config/sparc/sp64-elf.h (UNALIGNED_LONGLONG_ASM_OP): Here. - * config/sparc/sparc.h (ASM_BYTE_OP, TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP, IDENT_ASM_OP): Here. - * config/sparc/sun4gas.h (UNALIGNED_DOUBLE_INT_ASM_OP, - UNALIGNED_INT_ASM_OP, UNALIGNED_SHORT_ASM_OP): Here. - * config/sparc/sysv4.h (STRING_ASM_OP, COMMON_ASM_OP, SKIP_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_SHORT_ASM_OP, PUSHSECTION_ASM_OP, POPSECTION_ASM_OP, - TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP, - CONST_SECTION_ASM_OP, INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, - EH_FRAME_SECTION_ASM_OP): Here. - * config/sparc/vxsim.h (COMMON_ASM_OP): Here. - * config/spur/spur.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/tahoe/tahoe.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/v850/v850.h (SCOMMON_ASM_OP, ZCOMMON_ASM_OP, - TCOMMON_ASM_OP): Here. - * config/vax/vax.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): - Here. - * config/we32k/we32k.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - ASM_BYTE_OP): Here. - -2000-09-25 Richard Henderson - - * expmed.c (store_bit_field): Adjust last change to not consider - any word-sized field naturally aligned. - -2000-09-24 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_conditional_branch): Handle - TFmode unordered compares properly. Revalidate integer compare - operands. - (alpha_emit_setcc): New. - (alpha_emit_conditional_move): Revalidate integer compare operands. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.md (cmpdi): Allow general operands. - (sne): Use alpha_emit_setcc. - (seq, slt, sle, sgt, sge, sltu, sleu, sgtu, sgeu): Likewise. - (sunordered, sordered): New. - -2000-09-24 Richard Henderson - - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.c (call_multiple_values_operation): Remove. - (ia64_expand_call): New. - (ia64_expand_prologue): Emit an alloc if we need extra input - registers. - (ia64_expand_epilogue): New arg sibcall_p; don't emit the return - instruction if true. - (struct reg_flags): Add is_sibcall. - (rtx_needs_barrier): A sibcall does not use CFM et al. Ignore USEs. - (emit_insn_group_barriers): Set flags.is_sibcall. Remove hacks - for CODE_FOR_gr_spill_internal/CODE_FOR_gr_restore_internal. - * config/ia64/ia64.h (PREDICATE_CODES): Update. - * config/ia64/ia64.md (call): Use ia64_expand_call. - (call_value): Likewise. - (sibcall, sibcall_value): New. - (call patterns): Remove extra expanders; tidy. - (sibcall_epilogue): New. - (set_bsp): Remove the extra USE. Put the operand inside the UNSPEC. - -2000-09-24 Richard Henderson - - * emit-rtl.c (gen_lowpart_common): Use trunc_int_for_mode. - - * sibcall.c (skip_pic_restore): New. - (identify_call_return_value): Use it. - -2000-09-24 Mark Mitchell - - * c-tree.texi: Moved here from cp/ir.texi. Documented nested - functions. Generalize to handle both C and C++. - * Makefile.in (c-tree.info): New target. - (info): Add c-tree.info. - -Sun Sep 24 09:15:48 2000 Richard Kenner - - * expr.c (store_field): If BITSIZE is negative, use size of type. - (expand_expr, case COMPONENT_EXPR): Likewise. - -Sun 24-Sep-2000 11:40:23 BST Neil Booth - - * cpplex.c: Update TODO comment. - * cpplib.c (do_error, do_warning): Merge common code of - do_error and do_warning into do_diagnostic. Use it. - (do_diagnostic): New function. - * cpplib.h: Fix comment typo. - -2000-09-24 Joseph S. Myers - - * c-common.c (check_format_info): Warn for a wide character string - used as a non-wide format argument. - -2000-09-24 Joseph S. Myers - - * builtins.def (BUILT_IN_LLABS): Add. - * builtins.c (expand_builtin): Also abort on BUILT_IN_LLABS. - * c-common.c (c_common_nodes_builtins): Create builtin functions - __builtin_llabs, and plain llabs unless no_nonansi_builtins - outside of C99 mode. - (expand_tree_builtin): Handle BUILT_IN_LLABS. - -Sat 23-Sep-2000 22:39:18 BST Neil Booth - - * cpphash.h (CPP_RESERVE, CPP_PUTS_Q, CPP_PUTS, CPP_PUTC_Q, - CPP_PUTC, DUMMY_TOKEN, NO_DUMMY_TOKEN): Delete. - * cpplex.c (_cpp_expand_token_space, _cpp_init_toklist, - _cpp_free_toklist): No need to worry about extra dummy token - at the start of token lists any more. - (trigraph_ok): Only warn outside comments. - (skip_block_comment): Set and clear lexing_comment. - (skip_line_comment): Take a cpp_reader not cpp_buffer. - Set and clear lexing_comment. - (parse_number): Handle leading '.' indicated by pfile->seen_dot. - (check_long_token): Delete. - (lex_percent, lex_dot): New subroutines of lex_token to - handle lexing of '.' and '%' without lookback. - (lex_token): Use lex_dot and lex_percent. - (lex_line): Don't check for LIST_OFFSET. - (_cpp_init_input_buffer): Update for new _cpp_init_toklist. - * cpplib.c (_cpp_parse_assertion): Similarly. - (cpp_push_buffer): Initialize extra_char. - * cpplib.h (LIST_OFFSET): Delete. - (struct cpp_buffer): New member extra_char. - (struct lexer_state): New members lexing_comment and seen_dot. - -2000-09-23 Jason Merrill - - * config/rs6000/x-aix41 (CLIB): Define here. - * config/rs6000/t-aix43: Not here. - * config/rs6000/t-aix41: Or here. Remove. - * configure.in: Don't use it. - -2000-09-22 Jason Merrill - - * configure.in: Add test for HAVE_LD_DWARF_LINKONCE. - * toplev.c: Use it to initialize flag_eliminate_dwarf2dups. - * config.in: Regenerate. - - * configure.in: Fix checks for assembler features when using a - one-tree assembler that has not yet been built. - Fix --disable-threads. - -2000-09-19 Geoff Keating - - * stmt.c (expand_asm_operands): Allow # in constraints. - -2000-09-22 Jason Merrill - - * c-lex.c (skip_white_space): Just treat CRs as horizontal whitespace. - - * dbxout.c (dbxout_symbol_name): Just use DECL_NAME for - function-local names. - -2000-09-22 Brad Lucier - Mark Mitchell - - * toplev.c (warn_disabled_optimization): Declare new warning flag. - * flags.h (warn_disabled_optimization): Add it here. - * gcse.c (gcse_main): Add warning when disabled. - * invoke.texi: Document -Wdisabled-optimization. - -2000-09-21 Jason Merrill - - * dwarf2out.c (add_const_value_attribute): Multiply by length, not 4. - - * dwarf2out.c (tree_add_const_value_attribute): New fn. - (gen_variable_die): Call it for non-definitions. - - * dwarf2out.c (die_struct): Add die_mark field. - (mark_dies, unmark_dies): New fns. - (clear_die_sizes): Remove. - (print_die): Check die_symbol rather than die_offset. - (build_abbrev_table, output_pubnames, output_aranges): Check - die_mark rather than die_offset. - (output_comp_unit): Move calc_die_sizes after build_abbrev_table. - Call mark_dies. - -Thu 21-Sep-2000 18:19:05 BST Neil Booth - - * cppfiles.c (lookup_include_file): Rename to open_file. - Always create a splay tree value, even on syscall failures. - Negative entries indicated by fd == -2. - Re-open files closed in the meantime. - (_cpp_fake_include): Create a negative splay tree entry. - (find_include_file, cpp_read_file): Update for function name - change. - * gcc.gd/cpp/mi4.c: Testcase. - -2000-09-21 Nick Clifton - - * config/arm/t-arm-elf (MULTILIB_DIRNAMES): Enable multilibs for - ARM and THUMB modes. - - * config/mcore/mcore.c: Fix compile time warnings. - * config/mcore/mcore-protos.h: Fix compile time warnings. - -2000-09-20 J. David Anglin - - * configure.in: Correct test of gcc_cv_glibc. - * configure: Rebuilt. - * config.in: Rebuilt. - -2000-09-20 Kaveh R. Ghazi - - * builtins.c (expand_builtin_fputs): Also expand when length!=1. - (expand_builtin): Handle BUILT_IN_FWRITE. - - * builtins.def (BUILT_IN_FWRITE): New entry. - - * c-common.c (c_common_nodes_and_builtins): Declare __builtin_fwrite. - -Wed Sep 20 15:39:14 2000 Richard Kenner - - * gcc.c (modify_target): New variable and struct. - (process_command): Handle MODIFY_TARGET_NAME. - * tm.texi (MODIFY_TARGET_NAME): Add documentation for new macro. - * config/pa/pa.h (MODIFY_TARGET_NAME): New macro. - - * c-decl.c (finish_decl): Add else's to avoid referencing - TYPE_DOMAIN of an ERROR_MARK. - -Wed Sep 20 21:44:31 2000 Denis Chertykov - - * config/avr/avr.c (adjust_insn_length): Adjust lengths of - `reload_in*' insns. - -2000-09-19 Marek Michalkiewicz - - * config/avr/avr.md (neghi2): Add alternative for input and output - operands in different registers, as in negsi2. - (*negsi2): Remove '*' from the name. Use "movw" if available. - -2000-09-19 Jim Wilson - - * config/ia64/crtbegin.asm (__dso_handle): Delete use of - HAVE_GAS_HIDDEN macro. - -Tue 19-Sep-2000 22:38:57 BST Neil Booth - - * cpplex.c (lex_line): Drop the EOF token for unknown - directives in assembler. - -2000-09-19 David Edelsohn - - * configure.in: Allow enable_threads_flag value of "aix". Define - thread_file as "aix" for AIX 4.3 and above. - * configure: Regenerated. - - * gthr-aix.h: New file. - - * rs6000/t-aix43: Replace soft-float multilib with pthread. - Remove 403 processor multilib match. Fix rios2 processor multilib - match. - - * rs6000/aix.h (ASM_DECLARE_FUNCTION_NAME): Use function_section - to return to appropriate csect. - -2000-09-19 Kaveh R. Ghazi - - * builtins.c (is_valid_printf_arglist, expand_builtin_printf): New - functions. - (expand_builtin_fputs): Set `target' parameter for `expand_expr'. - (expand_builtin): Handle BUILT_IN_PUTCHAR, BUILT_IN_PUTS and - BUILT_IN_PRINTF. - - * builtins.def (BUILT_IN_PUTCHAR, BUILT_IN_PUTS, BUILT_IN_PRINTF): - New entries. - - * c-common.c (init_function_format_info): Handle __builtin_printf. - Set `check_function_format_ptr'. - (c_common_nodes_and_builtins): Set `puts_ftype' and - `printf_ftype'. Declare __builtin_putchar, __builtin_puts, - __builtin_printf and printf. - - * tree.c, tree.h (check_function_format_ptr): Declare. - -Tue 19-Sep-2000 18:26:57 BST Neil Booth - - * cppfiles.c (read_include_file): Take no special action for - zero-length files. - -2000-09-19 Bernd Schmidt - - * final.c (insn_current_reference_address): Use INSN_SHUID of seq - rather than that of branch. - (shorten_branches): Don't increment insn_current_address twice. - - Undo most of the Wed Jan 27 23:39:53 1999 patch: - * loop.h (struct induction): Delete members derived, ix and last_use. - (struct loop_ivs): Delete members first_increment_giv and - last_increment_giv. - * loop.c (verify_dominator, find_life_end, cmp_recombine_givs_stats, - recombine_givs): Delete functions. - (find_and_verify_loops): Don't initialize cont_dominator. - (strength_reduce): Lose code to try to find bivs that can be - expressed as givs of another biv, and to convert biv increments - into givs. - Lose loop_scan_start variable, always use loop->scan_start. - Don't call recombine_givs. Don't handle derived givs. - (record_giv): Don't initialize derived and last_use fields. - (biv_eliminiation_giv_has_0_offset): Lose code to handle derived - givs. - * unroll.c (derived_regs): Delete static variable. - (unroll_loop): Don't initialize it. - (copy_loop_body): Lose code to handle derived givs. - (find_splittable_givs): Don't check for givs made from biv - increments. - Don't set derived_regs. - - Fix misapplied earlier patch: - * config/sh/sh.md (floatsisf_ie): Reenable. Remove explicit reference - to fpul. - (floatsisf2): Generate floatsisf_ie by default. - (floatsisf_i4): Conditional on TARGET_SH4. - - (floatsisf2, floatsidf2, extendsfdf2): Also use reg_no_subreg_operand - predicate for the expanders. - -2000-09-19 Richard Henderson - - * config/i386/i386.h (CPP_CPU_SPEC): Define i586 and i686 symbols - in addition to pentium and pentiumpro symbols. - (CPP_CPU_DEFAULT_SPEC): Likewise. - - * c-typeck.c (c_expand_asm_operands): Restore the output tree - after expanding. - - * stmt.c (expand_expr_stmt): Only call warn_if_unused_value - if the tree has side effects. - (warn_if_unused_value): Do not warn about void constructs. - - * c-decl.c (poplevel): Invoke warn_about_unused_variables. - - * unroll.c (copy_loop_body): Update LABEL_NUSES before - calling invert_jump. - -2000-09-18 Geoff Keating - - * combine.c (can_combine_p): Don't substitute an ASM_OPERANDS - into anything. - -2000-09-18 Kaveh R. Ghazi - - * Makefile.in (c-common.o): Depend on diagnostic.h. - - * c-common.c: Include diagnostic.h. - (tfaff): Delete. - (status_warning): New function. - (check_format_info, maybe_read_dollar_number, check_format_types, - finish_dollar_format_checking, check_function_format): Accept a - `status' parameter. All callers changed. - - * c-common.h (check_function_format): Accept a `status' parameter. - - * c-typeck.c: Update call to `check_function_format'. - -2000-09-18 Richard Henderson - - * c-decl.c (c_expand_body): Call mark_varargs before - expand_function_start. - -2000-09-18 Geoff Keating - - * config/rs6000/eabi-cn.asm: Use /**/ to delimit comments, not #. - * config/rs6000/eabi-ci.asm: Likewise. - -2000-09-18 Richard Henderson - - * emit-rtl.c (init_emit_once): Initialize const_tiny_rtx - for BImode. - -2000-09-18 Jim Wilson - - * unroll.c (loop_iterations): Pass increment to extend_for_giv_value - before passing it to fold_rtx_mult_add. - - * unroll.c (final_giv_value): Pass increment through - extend_value_for_giv before passing it to emit_iv_add_mult. - - * function.c (fixup_var_refs_1, case ZERO_EXTRACT): If we have a - paradoxical subreg, then directly substitute the replacement and - return. - -Mon 18-Sep-2000 22:12:44 BST Neil Booth - - * cpp.texi: Update documentation, including some clarifications, - the treatment of various newline combinations, and space between - backslash and newline. - -Mon Sep 18 21:00:47 2000 J"orn Rennecke - - * sdbout.c (PUT_SDB_DEF, PUT_SDB_TAG, PUT_SDB_EPILOGUE_END): - Replace ASM_OUTPUT_LABELREF with assemble_name. - -Mon Sep 18 20:26:50 2000 J"orn Rennecke - - * sh.c (addsubcosts): CONST is not cheap. - (find_barrier): For Sh1, take alignment after jumps into account. - -2000-09-15 Andrew Haley - - * toplev.c (rest_of_compilation): Call purge_hard_subreg_sets to - remove all SETs of SUBREGs of hard registers. - * function.c (purge_hard_subreg_sets): New function. - (purge_single_hard_subreg_set): New function. - * rtl.h: (purge_hard_subreg_sets): New function. - -2000-09-18 Richard Henderson - - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.c (signed_inequality_operator): New. - (ia64_expand_compare): New. - (ia64_register_move_cost): Handle PR_REGS moves. - (ia64_secondary_reload_class): Require a GR when moving to a PR. - (struct reg_write_state): Add written_by_and/or. - (struct reg_flags): Add is_and/or. - (rws_update): Set them. - (rws_access_regno): Test them to allow parallel comparisons. - (rtx_needs_barrier): Recognize parallel comparisons. - (emit_insn_group_barriers): Set prev_insn after a call stop bit. - Call recog_memoized; ignore pred_rel_mutex. - (emit_predicate_relation_info): Don't call find_basic_blocks here. - (ia64_reorg): Do it here instead. - * config/ia64/ia64.h: s/CCmode/BImode/g - (MODES_TIEABLE_P): Don't tie BImode. - (PREFERRED_RELOAD_CLASS): Do not reload operations into AR regs. - (CONST_COSTS): Pick sensible values for CONST_INT based on context. - (RTX_COSTS): Make multiply 4 insns. - (MEMORY_MOVE_COST): New. - (PREDICATE_CODES): Update. - * config/ia64/ia64.md: s/CCmode/BImode/g - (movcci, movbi): New. - (andbi3, andcmbi3, iorbi3, iorcmbi3, one_cmplbi2): New. - (cmpsi_and_0, cmpsi_and_1, cmpsi_andnot_0, cmpsi_andnot_1): New. - (cmpdi_and_0, cmpdi_and_1, cmpdi_andnot_0, cmpdi_andnot_1): New. - (tbit_and_0, tbit_and_1, tbit_and_2, tbit_and_3): New. - (cmpsi_or_0, cmpsi_or_1, cmpsi_orcm_0, cmpsi_orcm_1): New. - (cmpdi_or_0, cmpdi_or_1, cmpdi_orcm_0, cmpdi_orcm_1): New. - (tbit_or_0, tbit_or_1, tbit_or_2, tbit_or_3): New. - (mulsi, muldi): Use xmpy not xma. - (cmpbi): New. - (movcc, movcc_internal): Remove. - (branch expanders): Use ia64_expand_compare. - (setcc expanders): Likewise. - (cmov insns): Use move_operand and ia64_move_ok. - (pred_rel_mutex): Use unspec not unspec_volatile. Prevent the - scheduler from moving it past a use. - * config/ia64/build.hacks: Remove. - -Mon 18-Sep-2000 19:21:35 BST Neil Booth - - * cpphash.h (HASHSTEP): Take character rather than pointer - to character. - (_cpp_check_directive, _cpp_check_linemarker): Update prototypes. - - * cpphash.c (cpp_loookup): Update for new HASHSTEP. - - * cpplex.c (auto_expand_name_space, trigraph_replace, - backslash_start, handle_newline, parse_name, INIT_TOKEN_STR, - IMMED_TOKEN, PREV_TOKEN_TYPE, PUSH_TOKEN, REVISE_TOKEN, - BACKUP_TOKEN, BACKUP_TRIGRAPH, MIGHT_BE_DIRECTIVE, - KNOWN_DIRECTIVE): Delete. - - (handle_newline, check_long_token, skip_escaped_newlines, - unterminated): New functions. - (ACCEPT_CHAR, SAVE_STATE, RESTORE_STATE): New macros. - - (parse_identifier): Was parse_name, new implementation. - (skip_line_comment, skip_block_comment, skip_whitespace, - parse_number, parse_string, trigraph_ok, save_comment, - adjust_column, _cpp_get_line): New implementations. - - (lex_token): New function. Lexes a token at a time, looking - forwards. Contains most of the guts of the old lex_line. - (lex_line): New implementation, using lex_token to obtain - individual tokens. - (cpp_scan_buffer): Use the token's line, not the list's line. - - * cpplib.c (_cpp_check_directive, _cpp_check_linemarker): - New implementations. - (do_assert): Don't bother setting the answer's list's line. - (cpp_push_buffer): Initialize new pfile and read_ahead members - of struct cpp_buffer. - - * cpplib.h (cppchar_t): New typedef. - (struct cpp_buffer): read_ahead, pfile and col_adjust are - new members. - (struct lexer_state): New structure that determines the state - and behavior of the lexer. - (IN_DIRECTIVE, KNOWN_DIRECTIVE): New macros. - (struct cpp_reader): New member "state". Rename - multiline_string_line and multiline_string_column. Delete - col_adjust, in_lex_line members. - (CPP_BUF_COLUMN): Update. - -2000-09-18 Richard Henderson - - * combine.c (simplify_comparison): Shift a NOT out of a single - bit test. - - * combine.c (if_then_else_cond): Canonicalize BImode true to - STORE_FLAG_VALUE. - * explow.c (trunc_int_for_mode): Likewise. - - * combine.c (combine_simplify_rtx): Use gen_unary to distribute - the NOT for De Morgan's rule. - * simplify-rtx.c (simplify_unary_operation): Simplify a BImode NOT - of a comparison to the reverse comparison. - - * combine.c (try_combine): Allow split to create a single insn. - - * machmode.def: Add BImode. Add a column for bitsize. - * machmode.h (DEF_MACHMODE): Adjust for extra column. - (GET_MODE_BITSIZE): Use it. - * rtl.c (DEF_MACHMODE): Adjust for extra column. - (mode_bitsize): New. - (mode_mask_array): Use bitsize. - * combine.c (combine_simplify_rtx): Require inner and outer - modes to match on nonzero_bits optimizations. - -2000-09-18 Bernd Schmidt - - * reload1.c (forget_old_reloads_1): If a hard reg is stored, clear - its entry in spill_reg_store. - * config/sh/lib1funcs.ams (movstr_i4 functions): Always compile in. - * sh.c (reg_no_subreg_operand): New function. - * sh-protos.h (reg_no_subreg_operand): Declare it. - * sh.h (PREDICATE_CODES): Add it. - * sh.md (floatsisf2_i4, floatsidf2_i, extendsfdf2_i4): Use it for - input operand that needs to be in fpul. - (fix_truncsfsi2, fix_truncsfsi2_i4): Use register_operand for output. - * sh.c (find_barrier): Take into account that machine_dependent_reorg - might add new insns. - -2000-09-18 Alexandre Oliva - - * config/sh/sh.c (sh_expand_prologue): Mark GOTaddr2picreg as - MAYBE_DEAD. - (sh_expand_epilogue): Take the PIC register into account when - computing the frame size. - - * config/sh/sh.c (nonpic_symbol_mentioned_p): Check LABEL_REFs. - * config/sh/sh.md (sym_label2reg, symPLT_label2reg): Protect - LABEL_REFs with a PIC-safe unspec. - -2000-09-18 Joseph S. Myers - - * c-common.c (check_format_info): Properly save the argument - number and parameter for $ operand number formats in case width - and precision arguments are also used. Allow printf width and - precision arguments to have operand numbers even if none was - specified for the main format, since this is OK for %*.*m. Only - object to missing $ operand number if the format used requires an - argument. - -2000-09-18 Joseph S. Myers - - * c-common.c (format_char_info): Add 'W' flag to comment. - (print_char_table, scan_char_table): Use it. - (check_format_info): Use the 'W' flag to determine whether a - format argument is written into. - -2000-09-18 Joseph S. Myers - - * c-common.c (check_format_types): Reorganize and clean up, - checking earlier for ERROR_MARKs and making cur_type into its - TYPE_MAIN_VARIANT where convenient. - -2000-09-18 Joseph S. Myers - - * gcc.c (cpp_options): Add specs for __STDC_HOSTED__. - -2000-09-18 Bernd Schmidt - - * optabs.c (emit_libcall_block): Set CONST_CALL_P for the call. - - * i386-protos.h (ix86_init_builtins, ix86_expand_builtin): Declare. - * i386.c (struct builtin_description): New. - (bdesc_comi, bdesc_2arg, bdesc_1arg): New arrays. - (mmx_reg_operand): Declare MODE arg as unused. - (ix86_expand_sse_comi, ix86_expand_sse_compare, safe_vector_operand, - ix86_expand_unop1_builtin, ix86_expand_unop_builtin, - ix86_expand_binop_builtin, ix86_expand_store_builtin, - ix86_init_builtins, ix86_expand_builtin): New functions. - * i386.h (ix86_builtins): New enumeration. - (MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): New macros. - * i386.md (attr length_immediate): 0 for mmx/sse types. - (attr prefix_0f): 1 for mmx/sse types. - (setcc_2): Remove "*" so we get gen_setcc_2. - (emms): Account for changed register numbering. Set "memory" attr - to unknown. - (sfence): Set "memory" attr to unknown. - -2000-09-18 Andreas Jaeger - - * configure.in: Define _GNU_SOURCE only when using the GNU C - Library. - * configure: Regenerated. - * config.in: Regenerated. - -2000-09-17 Mark Mitchell - - * cppinit.c (cpp_init): Don't use ANSI prototypes. - * flow.c (flow_dump_loop): Likewise. - (flow_loops_dump): Likewise. - - * c-typeck.c (c_start_case): Fix typo. - -2000-09-17 Joseph S. Myers - - * c-decl.c (grokdeclarator): Don't give a warning about defaulting - to int for plain complex which defaults to complex double. Do - warn about defaulting to complex double if pedantic. Warn about - complex integer types if pedantic. Warn about complex types if - pedantic and not in C99 mode. - * c-typeck.c (build_unary_op): If pedantic, warn about use of ~ - for complex conjugation. - -2000-09-17 Joseph S. Myers - - * contrib.texi: Update my entry. - -Sun Sep 17 18:48:32 2000 Denis Chertykov - - * config/avr/avr.md (mcu_enhanced): New attribute. - (mcu_mega): Likewise. - (extendhisi2): Use mcu_enhanced. - (zero_extendhisi2): Likewise. - (call_insn): Use mcu_enhanced and mcu_mega. - (call_value_insn): Likewise. - (*sbrx_branch): Use mcu_mega. - (*sbrx_and_branchsi): Likewise. - (*sbrx_and_branchhi): Likewise. - (*tablejump_lib): Likewise. - -Sun Sep 17 10:46:17 2000 Richard Kenner - - * alias.c (true_dependence): Allow non-unchanging read to conflict - with unchanging write. - - * expr.c (store_constructor_field): Accept ALIAS_SET arg. - (store_constructor): Pass alias_set to it. - - * c-decl.c (grokdeclarator): Reorder tests to avoid looking at - TYPE_MAIN_VARIANT of ERROR_MARK. - * c-lex.c (readescape): Avoid using printf syntax we don't recognize. - - * simplify-rtx.c (simplify_unary_operation): Add cases - FLOAT_EXTEND and FLOAT_TRUNCATE to ones that return 0. - -2000-09-17 Bernd Schmidt - - * expr.h (emit_library_call, emit_library_call_value): Delete - declarations. - * rtl.h (enum libcall_type): New. - (emit_library_call, emit_library_call_value): Change fn_type arg to - be of type enum libcall_type. - * calls.c: Likewise for the function definitions. Several callers - throughout changed to use the new enumeration appropriately. - (emit_library_call_value_1): Likewise. Put back code to make libcall - blocks of equal form, but only use it for the two new higher - enumeration values. - -2000-09-16 Mark Mitchell - - Convert the C front-end to use function-at-a-time mode. - * c-common.h: Include splay-tree.h. - (C_DECLARED_LABEL_FLAG): New macro. - (struct language_function): Add x_scope_stmt_stack and - x_function_name_declared_p. - (RECHAIN_STMTS): Move definition. - (lang_statement_code_p): Likewise. - (lang_expand_stmt): Likewise. - (lang_expand_decl_stmt): New variable. - (lang_expand_function_end): Likewise. - (current_scope_stmt_stack): New function. - (add_decl_stmt): Likewise. - (add_scope_stmt): Likewise. - (mark_stmt_tree): Likewise. - (struct c_lang_decl): New structure. - (DECL_SAVED_TREE): Define. - (c_mark_lang_decl): New function. - (c_expand_start_cond): Change prototype. - (c_finish_then): New function. - (c_finish_else): Likewise. - (current_function_name_declared): Remove. - (set_current_function_name_declared): Likewise. - (mark_c_language_function): Declare. - (case_compare): Likewise. - (c_add_case_label): Likewise. - (c_expand_expr): Likewise. - (c_safe_from_p): Likewise. - * c-common.c (lang_expand_function_end): New variable. - (struct if_elt): Add if_stmt. - (c_expand_start_cond): Add the if-statement to the statement-tree, - rather than generating RTL. - (c_finish_then): New function. - (c_expand_start_else): Don't generate RTL. - (c_finish_else): New function. - (c_expand_expr_stmt): Don't generate RTL. - (statement_code_p): Add SCOPE_STMT. - (case_compare): New function. - (c_add_case_label): Likewise. - (mark_stmt_tree): Likewise. - (c_mark_lang_decl): Likewise. - (mark_c_language_function): Likewise. - (c_expand_expr): Likewise. - (c_safe_from_p): Likewise. - * c-decl.c (c_stmt_tree): New variable - (c_scope_stmt_stack): Likewise. - (c_function_name_declared_p): Likewise. - (lang_expand_expr_stmt): Remove. - (poplevel): Don't call output_inline_function for nested - functions. - (pushdecl): Don't set DECL_CONTEXT for a local declaration of an - `extern' function. - (redeclaration_error_message): Change means of computing whether - or not a function is nested. - (lookup_label): Don't call label_rtx. - (init_decl_processing): Add more GC roots. - (start_decl): Add DECL_STMTs to the statement-tree, rather than - calling rest_of_decl_compilation. - (finish_decl): Don't call expand_decl. - (store_parm_decls): Begin the statement-tree, but don't generate - RTL. - (finish_function): Tie off the statement-tree. Call c_expand_body - if appropriate. - (c_expand_body): New function. - (push_c_function_context): Save more information. - (pop_c_function_contxt): Likewise. - (copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it. - (lang_mark_tree): Mark it. - (current_stmt_tree): Adjust. - (current_scope_stmt_stack): New function. - (do_case): Remove. - (set_current_name_declared): Likewise. - (c_begin_compound_stmt): Define. - (c_expand_decl_stmt): Likewise. - * c-lang.c: Include rtl.h and expr.h. - (lang_init): Set more language-specific hooks. - * c-lex.c: Include expr.h. - * c-parse.in: Changes throughout to add statements to the - statement-tree, rather than generating RTL after every statement. - * c-semantics.c (lang_expand_decl_stmt): Define. - (add_decl_stmt): New function. - (add_scope_stmt): Likewise. - (finish_stmt_tree): Tweak. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Handle local labels, and call - lang_expand_decl_stmt if required. - (genrtl_for_stmt): Fix line-number handling. - (genrtl_case_label): Handle cleanups. - (genrtl_asm_stmt): Don't call combine_strings. - (genrtl_compound_stmt): Simplify. - (expand_stmt): Handle SCOPE_STMTs. - * c-tree.h (struct lang_decl): New structure. - (C_DECLARED_LABEL_FLAG): Remove. - (c_begin_compound_stmt): Declare. - (c_expand_decl_stmt): Likewise. - (c_expand_start_case): Rename to c_start_case. - (c_finish_case): New function. - * c-typeck.c (start_init): Tweak setting of - constructor_incremental. - (c_expand_asm_operands): Tweak error-handling. Add to the - statement-tree. - (c_expand_return): Add to the statement-tree. - (c_expand_start_case): Rename to ... - (c_start_case): ... this. - (struct c_switch): New type. - (switch_stack): New variable. - (do_case): Simplify. - (c_finish_case): New function. - * dependence.c: Include expr.h. - (enum dependence_type): Change spelling of enumerals. - (check_node_dependence): Adjust. - * expr.h (lang_safe_from_p): Declare. - (safe_from_p): Likewise. - * expr.c (lang_safe_from_p): New variable. - (safe_from_p): Give it external linkage. Use lang_safe_from_p. - * stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type. - * toplev.c (rest_of_decl_compilation): Robustify. - * tree.c (contains_placeholder_p): Likewise. - * Makefile.in: Update dependencies. - * objc/objc-act.h: Adjust calculation of value for dummy_tree_code. - * objc/objc-act.c: Include rtl.h, expr.h, and c-common.h. - (objc_expand_function_end): New function. - (finish_method_def): Use it. - (init_objc): Initialize more language-specific hooks. - * objc/Make-lang.in: Update dependencies. - -2000-09-16 Geoffrey Keating - - * configure.in: Define macros that affect features before - testing for features. Don't define _XOPEN_SOURCE. - * configure: Regenerated. - * config.in: Regenerated. - -Sat Sep 16 19:42:50 EDT 2000 John Wehle (john@feith.com) - - * rtlanal.c (rtx_varies_p): Volatile asms vary. - (rtx_unstable_p): Restructure code. Volatile asms - are unstable. - -Sat Sep 16 14:35:55 2000 Richard Kenner - - * function.h (no_debugging_symbols): New field. - * integrate.c (save_for_inline): Renamed from save_for_inline_nocopy. - Initialize no_debugging_symbols. - (output_inline_function): Save and restore write_symbols and set from - no_debugging_symbols. - * toplev.c (rest_of_compilation): Call save_for_inline. - * tree.h: Update comment. - - * stor-layout.c (place_field): Don't do anything if field or - its type are ERROR_MARK. - -Sat Sep 16 19:14:00 2000 Laurynas Biveinis - - * cppfiles.c (purge_cache): Use munmap only if MMAP_THRESHOLD defined. - (read_include_file): Ensure inc->mmaped is initialized. - -2000-09-16 Richard Henderson - - * cppiles.c (purge_cache): Use PTR not caddr_t. - -2000-09-16 Hans-Peter Nilsson - - * gcc.c: In description for %{ - - * configure.in: Always define _GNU_SOURCE to make interfaces - visible that were hidden by only defining _GNU_SOURCE. - * configure: Regenerated. - -Sat 16-Sep-2000 08:13:45 BST Neil Booth - - * cpplex.c (push_macro_context): Set an argument's level after - calling parse_args. We could loop infinitely otherwise. - -2000-09-15 Tom Tromey - - * configure, config.in: Rebuilt. - * configure.in: Check for iconv.h. Define _XOPEN_SOURCE. - -2000-09-15 Greg McGary - - * cppmacro.c (check_trad_stringification): Check token - text pointers against limit before dereferencing. - -2000-09-15 Joseph S. Myers - - * c-common.c (format_wanted_type): New structure. - (check_format_types): New function. - (check_format_info): Pass all checking of types of format - arguments, including width and precision arguments, to this new - function. - -2000-09-15 Gerald Pfeifer - - * BUGS: Remove file. - -2000-09-15 Jakub Jelinek - - * config/alpha/alpha.c (override_options): ev6 cache latencies - from Richard Henderson. Don't allow -mmemory-latency=L0. - - * config/alpha/alpha.h (TARGET_CPU_EV5, TARGET_CPU_EV6): Define. - (TARGET_OPTIONS): Add tune=. - (alpha_tune_string): Declare. - * config/alpha/alpha.c (override_options): Add cpu_table. - Use alpha_cpu_string first to set both alpha_cpu and target_flags - and then alpha_tune_string to set alpha_cpu only. - Replace tests for PROCESSOR_EV* with TARGET_CPU_EV* tests. - * config/alpha/elf.h (ASM_FILE_START): Likewise. - * config/alpha/osf.h (ASM_FILE_START): Likewise. - * config/alpha/openbsd.h (ASM_FILE_START): Likewise. - -Fri Sep 15 19:45:55 MET DST 2000 Jan Hubicka - - * i386-protos.h (no_comparison_operator, uno_comparison_operator): - Remove. - (ix86_comparison_operator, ix86_cc_mode): Declare - * i386.h (CCGC, CCGCO): New modes. - (SELECT_CC_MODE): Move offline to .... - * i386.c (ix86_cc_mode): .... here; use new modes. - (ix86_comparison_operator): New. - (fcmov_comparison_operator): Ensure proper mode. - (put_condition_mode): More sanity checking. - (ix86_match_ccmode): Handle new modes. - (ix86_expand_fp_compare): GEU requires CCmode. - (ix86_expand_strlensi_unroll_1): Use emit_cmp_and_jump_insn instead of - doing it by hand. - * i386.md (cmp?i_ccz_1): Remove - (cmp?i_ccno_1): Use ix86_match_ccmode. - (cmp?i_minus_1): New. - (cmpsi_1): New expander. - (cmpqi_ext_1): Use match_ccmode - (cmpqi_ext_3): New expander. - (cmpqi_ext_3_insn): Rename from cmpqi_ext_3. - (cmpqi_ext_4): Use match_ccmode. - (add?i_?): Use match_ccmode. - (add?i_6): New. - (test?i_ccz_1): Remove - (test?i_1): New. - (testsi_ccno_1, testqi_ccz_1, testqi_ext_ccno_0): New expander. - (testqi_ext_0): Use ix86_match_ccmode. - (*xorqi_cc_ext_1): Use ix86_match_ccmode. - (xorqi_cc_ext_1): New expander. - (shift patterns): Use CCGOCmode for all shifts except for sar. - (setcc_?, jcc_?, miv?icc_nic): Use ix86_comparison_operator. - (setcc_3, jcc_3, miv?icc_c): Remove. - -2000-09-15 Will Cohen - - * dwarf2out.c (add_const_value_attribute): Changed array into a - xmalloced object, so it exists after function exit. - (free_AT): Added case for dw_val_class_float to free allocated - memory. - -2000-09-15 Kazu Hirata - - * config/i386/i386.md: Fix a comment typo. - * gcc.c: Fix formatting. - -2000-09-15 Bernd Schmidt - - * optabs.c (emit_libcall_block): If target is a user variable, - copy to a temporary first. - * expr.c (convert_move): When generating a libcall, make a libcall - block. - * calls.c (emit_library_call_value_1): Don't create a libcall - sequence here; our caller will in most cases do it. - - * sh.h (SECONDARY_INPUT_RELOAD_CLASS): Handle moving T, MACL or - MACH into FPUL. - (SECONDARY_OUTPUT_RELOAD_CLASS): Similar case. - * sh.md (reload_outsf): Generate recognizable patterns for - TARGET_SH3E. - (floatsisf2, floatsisf2_ie, floatsisf2_i4, fix_truncsfsi2, - fix_truncsfsi2_i4, fixsfsi, floatsidf2, floatsidf2_i, fix_truncdfsi2, - fix_truncdfsi2_i, extendsfdf2, extendsfdf2_i4, truncdfsf2, - truncdfsf2_i4): Change not to use explicit references to fpul. - (floatsisf2_ie): Remove USE of fpscr. - (floatsisf2): Change default expansion to match this. - (fix_truncsfsi2_i4_2, fix_truncdfsi2_i4 & splitters): Comment out - unused patterns. - -2000-09-15 Richard Henderson - - * expmed.c (store_bit_field): Consider naturally aligned - memory for direct reference. - -2000-09-15 Richard Henderson - - * config/alpha/alpha.c (alpha_expand_unaligned_load): Force all - AND addresses into alias set 0. - (alpha_expand_unaligned_store): Likewise. - (alpha_expand_unaligned_load_words): Likewise. - (alpha_expand_unaligned_store_words): Likewise. - -2000-09-15 Bernd Schmidt - - * config/sh/sh.h (CPP_SPEC): For -m4-nofpu, define __SH4_NOFPU__. - * config/sh/lib1funcs.asm (movstr_i4): Also compile if __SH4_NOFPU__ - is defined. - * config/mips/mips.c (mips_va_arg): Args passed by reference have a - rsize of UNITS_PER_WORD. - -Fri 15-Sep-2000 06:49:07 BST Neil Booth - - * cpplex.c (ON_REST_ARG): Correct the test. - (maybe_paste_with_next): Duplicate a token that fail pasting, - and clear its PASTE_LEFT flag, so that nested pasting attempts - do not occur. - -2000-09-14 Richard Henderson - - * calls.c (precompute_register_parameters): Use COSTS_N_INSNS, not 2. - * cse.c (rtx_cost): Likewise. - * optabls.c (expand_binop): Likewise. - (expand_twoval_binop, prepare_cmp_insn): Likewise. - * regclass.c (copy_cost): Likewise. - * reload1.c (reload_cse_move2add): Likewise. - -2000-09-14 Joseph S. Myers - - * c-parse.in (reswords): Add _Complex. - -2000-09-14 J. David Anglin - - * gcc.1: Delete documentation for -undef preprocessor option. - -2000-09-14 Alexandre Oliva - - * config/sh/sh.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, - STARTFILE_SPEC, ENDFILE_SPEC): Remove define. - * config/sh/elf.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP): - Remove undefine before config/elfos.h. - * config/sh/t-sh (EXTRA_MULTILIB_PARTS): Comment out. - -2000-09-14 Kazu Hirata - - * invoke.texi (H8/300 Options): Add -ms2600. - * config/h8300.c (h8300_init_once): Output an error when -ms2600 - is used without -ms. - * config/h8300.h (TARGET_MAC): New. - (TARGET_SWITCHES): Add -ms2600 and -mno-s2600. - (CONDITIONA_REGISTER_USAGE): Disable the mac register on any - machine other than H8S/2600. - * config/h8300.md: Accept mac instructions on the H8S/2600 instead - of the H8S/2000. - -2000-09-14 Alexandre Oliva , Bernd Schmidt - - * reload.c (find_reloads_address_1): Generate reloads for auto_inc - pseudos that refer to the original pseudos, not only to their - equivalent memory locations. - -Thu Sep 14 12:10:16 2000 Richard Kenner - - * expr.c (expand_expr, case COMPONENT_EXPR): Copy memory attributes - when making new MEM. - - * Makefile.in (LN): Remove duplicate definition. - -2000-09-12 Bernd Schmidt - - From Joern Rennecke: - * local-alloc.c (update_equiv_regs): If there is no REG_EQUAL note - on an insn and function_invariant_p returns nonzero for the source, - add a REG_EQUAL note. - -Thu Sep 14 00:51:57 EDT 2000 John Wehle (john@feith.com) - - * alias.c (memrefs_conflict_p): An ADDRESSOF doesn't - conflict with frame_pointer_rtx. - -2000-09-13 Kazu Hirata - - * loop.c: Fix formatting. - * loop.h: Likewise. - -2000-09-13 Richard Henderson - - * config/ia64/ia64.md (divsf3): New. - (divsf3_internal_lat, divsf3_internal_thr): New. - (divdf3, divdf3_internal_lat, divdf3_internal_thr): New. - (divtf3, divtf3_internal_lat, divtf3_internal_thr): New. - (adddf3_trunc, subdf3_trunc, muldf3_trunc): New. - (madddf4_trunc, msubdf4_trunc, nmuldf3_trunc): New. - (nmadddf4_alts, nmadddf4_trunc): New. - (addtf3_truncsf, addtf3_truncdf, subtf3_truncsf): New. - (subtf3_truncdf, multf3_truncsf, multf3_truncdf): New. - (multf3_truncsf_alts, multf3_truncdf_alts): New. - (maddtf4_truncsf, maddtf4_truncdf, maddtf4_alts_truncdf): New. - (msubtf4_truncsf, msubtf4_truncdf, nmultf3_truncsf): New. - (nmultf3_truncdf, nmaddtf4_truncsf, nmaddtf4_truncdf): New. - (nmaddtf4_truncdf_alts): New. - (recip_approx): Don't predicate. - -2000-09-13 Richard Henderson - - * config/ia64/lib1funcs.asm (__divsf3): Protect fnorm.s with p6. - -2000-09-13 Stephane Carrez - - * flags.h (flag_dump_rtl_in_asm): Declare. - * toplev.c (flag_dump_rtl_in_asm): Define. - (decode_d_option): Set flag_dump_rtl_in_asm and flag_print_asm_name - if -dP is specified. - * rtl.h (print_rtx_head): Declare. - * print-rtl.c (print_rtx_head): Define. - (print_rtx): Print the string pointed to by print_rtx_head - at beginning of each dump line. - (print_rtl): Likewise. - (print_rtl_single): Likewise. - * final.c (final_scan_insn): Dump the insn in the assembly - file for debugging. - * gcc.1: Document -dP option. - * invoke.texi (Debugging Options): Likewise. - -2000-09-13 Stephane Carrez - - * md.texi (Machine Constraints): Document the 68HC11 constraints. - * install.texi (Configurations): Document the 68HC11&68HC12 port. - * invoke.texi (Option Summary, M68hc1x Options): Document the options. - -Tue Sep 12 13:51:13 2000 Denis Chertykov - - * config/avr/avr.h (ASSEMBLER_DIALECT): New macro declared. - * config/avr/avr.md (*movstrqi_insn): Cleanup output template. - (*clrstrqi): Likewise. - (xorhi3,xorsi3,absqi2): Likewise. - (one_cmplhi2,one_cmplsi2): Likewise. - (addsi3): Two stupid constraint alternatives removed. - (extendhisi2): Use `movw' for enhanced avr cores. - (zero_extendhisi2): Likewise. - -Wed Sep 13 02:31:23 EDT 2000 John Wehle (john@feith.com) - - * alias.c (find_base_term): Use frame_pointer_rtx - when handling an ADDRESSOF. - - * cse.c (canon_hash): Handle USE of BLKmode memory. - (cse_insn): Outgoing arguments for a libcall don't - affect any recorded expressions. - -2000-09-12 Tom Tromey - - * configure, config.in: Rebuilt. - * configure.in: Check for iconv, nl_langinfo, langinfo.h. - -2000-09-12 Jakub Jelinek - - * c-lex.c (lex_string): Use charwidth to compute bytemask. - * expr.c (expand_expr): Don't optimize constant array references - initialized with wide string constants. - -2000-09-13 Michael Hayes - - * loop.c (note_set_pseudo_multiple_uses): Correct. - -2000-09-12 Jim Wilson - - * ifcvt.c (noce_process_if_block): If A and B are the same, and no - else block, and X has side-effects, then fail. - -2000-09-12 Greg McGary - - * config/mips/mips-protos.h - (trap_cmp_op, mips_gen_conditional_trap): New func decls. - * config/mips/mips.h (ISA_HAS_COND_TRAP): New macro. - (PREDICATE_CODES): Add "trap_cmp_op". - * config/mips/mips.c - (trap_cmp_op, mips_gen_conditional_trap): New functions. - * config/mips/mips.md (trap, conditional_trap): New patterns. - -2000-09-12 Bernd Schmidt - - * flow.c (try_pre_increment_1): Don't do anything to sets of the stack - pointer. - -2000-09-12 Kaveh R. Ghazi - - * builtins.c (built_in_decls): New array. - (expand_builtin_fputs): New function. - (expand_builtin): Handle BUILT_IN_FPUTC and BUILT_IN_FPUTS. - - * builtins.def (BUILT_IN_FPUTC, BUILT_IN_FPUTS): New members. - - * c-common.c (c_common_nodes_and_builtins): Handle fputc/fputs. - - * tree.h (built_in_decls): New array. - -Tue Sep 12 08:53:57 2000 Jeffrey A Law (law@cygnus.com) - - * convex.md: Use "+" instead of "=" for outputs wrapped in a - STRICT_LOW_PART. - * i370.md, i386.md, ns32k.md, sh.md, vax.md: Likewise. - -2000-09-12 Kazu Hirata - - * haifa-sched.c: Fix formatting. - - * genattrtab.c: Fix formatting. - - * unroll.c: Fix formatting. - -2000-09-12 Bruce Korb - - * fixinc/fixfixes.c: make a type for the fix procedure & use it, - remove obsolete code - * fixinc/fixincl.c: Use PARAMS, not _P_. Add no-op default to switch. - * fixinc/fixincl.tpl: make non-exported arrays static scope - * fixinc/fixincl.x: regenerate - * fixinc/fixlib.h: Use PARAMS, not _P_ - * fixinc/fixtests.c: make a type for the test proc & use it - * fixinc/server.h: Use PARAMS, not _P_ - -2000-09-12 Kaveh R. Ghazi - - * c-typeck.c (process_init_element): Avoid union init warnings on - floating point zero. Don't crash on unions containing structs. - -2000-09-12 Alexandre Oliva - - * config/sh/sh.h (PREDICATE_CODES): Add CONST_DOUBLE to - general_movsrc_operand, and remove CONST_INT from - general_movdst_operand. - -2000-09-12 Bernd Schmidt - - * cse.c (approx_reg_cost): If SMALL_REGISTER_CLASSES, return INT_MAX - if a reference to non-fixed hardreg is seen. Otherwise, count hard - regs with a higher cost. - (preferrable): Deal with cases where either cost or regcost is - MAX_COST. - (cse_insn): Use MAX_COST rather than 10000. Always initialize - regcost values. - (COSTS_N_INSNS): Move definition... - * rtl.h: ...here. - (MAX_COST): New macro. - * loop.c (init_loop): Use COSTS_N_INSNS macro instead of hardcoded - constant. - -2000-09-11 Mark Mitchell - - * c-common.h (genrtl_clear_out_block): Remove. - * c-semantics.c (genrtl_clear_out_block): Remove. - (genrtl_while_stmt): Don't call it. - (genrtl_for_stmt): Likewise. - -2000-09-11 Zack Weinberg - - * cppfiles.c: Move all default-#defines to top of file. - (open_include_file): Replace by lookup_include_file. - (read_with_read, read_file): Merged into read_include_file. - (stack_include_file, purge_cache): New functions. - (close_cached_fd): Delete. - (lookup_include_file, read_include_file, _cpp_pop_file_buffer): - Cache the in-memory buffer, not the file descriptor. - - * cpphash.h (struct include_file): Add buffer, st, refcnt, - mapped fields. - (xcnew): New utility macro. - (DO_NOT_REREAD, NEVER_REREAD): Move up by struct include_file. - * cpplib.h (struct cpp_buffer): Remove mapped field. - -2000-09-11 Zack Weinberg - - * cpplex.c (parse_string): Accept backslash space newline as a - line continuation. - (lex_line): Likewise. - (_cpp_get_token): Remove hard limit on macro nesting. - -2000-09-12 Philipp Thomas - - * aclocal.m4 (AM_WITH_NLS): Don't force use of included gettext. - * configure: Rebuilt. - -2000-09-13 Michael Hayes - - * flow.c (split_block): Fix update of registers live at - end of split block. - -Tue Sep 12 01:51:38 MET DST 2000 Jan Hubicka - - * i386.md (add?i_3, add?i_5): New. - (add?i_4): Rename from add?i_3; Fix compare pattern. - (sub?i_3, xor?i_3, ior?i_3): New. - - * genrecog.c (write_tree): Output code to clear insn_extract cache. - * genattrtab.c (write_attr_case): Gen call to extract_insn_cache - instead of extract_insn and extract_constrain_insn_cache instead of - extract_insn and constrain_operands. - * recog.c (extract_insn_cached, extract_constrain_insn_cached): - New functions. - (extract_insn): Clear which_alternative. - (constrain_operands): Set which_alternative to -1 when failed. - * recog.h (extract_constrain_insn_cached, extract_insn_cached): - Declare. - -2000-09-11 Matthew Hiller - - * config/h8300/h8300.md (movstrictqi): Changed constraint modifier - on operand 0 to '+'. - (movstricthi): Likewise. - -2000-09-12 Michael Hayes - - * loop.h (LOOP_IVS): New macro. - (REG_IV_TYPE, REG_IV_INFO): Add ivs argument. - (struct loop_ivs): New. - (struct loop_info): Add ivs field. - (reg_iv_type, reg_iv_info): Delete prototype. - (reg_biv_class, loop_iv_list): Likewise. - * loop.c (record_biv, find_life_end): Pass loop argument. - (reg_iv_type): Remove global array and use - field in loop_regs structure within loop_ivs structure. - (reg_iv_info, reg_biv_class, loop_iv_list): Likewise. - (first_increment_giv, last_increment_giv): Use entry in - loop_ivs structure. - (record_initial): Pass ivs pointer. - * unroll.c (copy_loop_body, remap_split_bivs): Add loop argument. - -2000-09-12 Michael Hayes - - * loop.h (LOOP_REGS): New macro. - (struct loop_regs): New. - (struct loop_info): Add regs field. - * loop.c (set_in_loop): Remove global array and store - in loop_regs structure as part of loop_info structure. - (n_times_set, may_not_optimize): Likewise. - (reg_single_usage, moved_once): Likewise. - (count_one_set): Add regs argument. - (combine_movables, rtx_equal_for_loop_p, combine_givs): Likewise. - (set_pseudo_multiple_uses): Pass regs pointer. - -2000-09-12 Michael Hayes - - * unroll.c (iteration_info): Subsume into loop_iterations. - * loop.h (loop_info): New field iv. - -2000-09-12 Michael Hayes - - * basic-block.h (LOOP_TREE, LOOP_PRE_HEADER, LOOP_EDGES): New. - (LOOP_EXITS_DOMS, LOOP_ALL): Likewise. - (flow_loops_update): New prototype. - (flow_loops_find): Add flags to prototype. - (struct loop): Add `pre_header_root' and `pre_header_trace' fields. - * flow.c (flow_loop_pre_header_scan): New. - (flow_loop_dump): Dump pre-header root and trace and exit dominators. - (flow_loop_free): Free pre-header root and trace and exit dominators. - (flow_loops_find): New argument flags. - (flow_loops_update): New function. - * toplev.c (rest_of_compilation): Add flag argument to flow_loops_find. - -2000-09-12 Michael Hayes - - * basic-block.h (split_block, update_bb_for_insn): New prototypes. - * flow.c (split_block, update_bb_for_insn): New functions. - -2000-09-11 Richard Henderson - - * cse.c (fold_rtx): Honor NO_FUNCTION_CSE. - -2000-09-11 Richard Henderson - - * config/ia64/ia64-protos.h (fr_nonimmediate_operand): Declare. - * config/ia64/ia64.c (fr_nonimmediate_operand): New. - (ia64_override_options): Prevent optimizing division for both - latency and throughput. - (rtx_needs_barrier): Handle frcpa. - * config/ia64/ia64.h (MASK_INLINE_DIV_LAT): New. - (MASK_INLINE_DIV_THR, TARGET_INLINE_DIV_LAT): New. - (TARGET_INLINE_DIV_THR, TARGET_INLINE_DIV): New. - (TARGET_SWITCHES): Add -minline-divide-min-latency and - -minline-divide-max-throughput. - (PREDICATE_CODES): Update. - * config/ia64/ia64.md (extendsidi2): Remove * from f case. - (zero_extendsidi2): Likewise. Fix typo in f case insn. - (extendsfdf2): Add cases for gr<->fr and fr<->mem. - (extendsftf2): Likewise. - (extenddftf2): Likewise. - (fix_trunctfdi2_alts): New. - (fixuns_trunctfdi2_alts): New. - (madd*4): Rename from madd*3. - (divsi3, modsi3, udivsi3, umodsi3): New. - (divsi3_internal): New. - (divdi3, moddi3, udivdi3, umoddi3): New. - (divdi3_internal_lat, divdi3_internal_thr): New. - (multf3_alts, maddtf4_alts, nmaddtf4_alts): New. - (recip_approx): New. - -2000-09-11 Alexandre Oliva - - * print-rtl.c (debug_call_placeholder_verbose): New variable. - (print_rtx) [CALL_PLACEHOLDER]: Dump all call sequences if it is - set. - * integrate.c (copy_rtx_and_substitute): Don't share - LEAF_REG_REMAPpable registers with the inlined function. Don't - share the function value with calling sequences. - -2000-09-11 Jakub Jelinek - - * c-decl.c (do_case): Fix a typo. - - * combine.c (simplify_if_then_else): Don't convert a == b ? b : a - to a if the comparison is floating mode and not -ffast-math. - * simplify-rtx.c (simplify_ternary_operation): Likewise. - -Mon Sep 11 20:07:48 2000 J"orn Rennecke - - * sh.h (INITIALIZE_TRAMPOLINE): Remove stray call to - gen_ic_invalidate_line. - -2000-09-11 Philip Blundell - - * config/arm/elf.h (SUBTARGET_CPP_SPEC): Don't define `arm_elf'. - -Mon Sep 11 10:48:41 2000 Ulrich Drepper - - * install.texi (LANGUAGES): Update to include new languages. - * INSTALL: Rebuilt. - -2000-09-11 DJ Delorie - - * gcc.c (main): Don't warn about unused -B prefixes - (unused_prefix_warnings): remove - -2000-09-11 Kazu Hirata - - * final.c: Fix formatting. - - * integrate.c: Fix formatting. - -2000-09-11 Geoff Keating - - * alias.c (memrefs_conflict_p): An ADDRESSOF does conflict, sorry. - -2000-09-11 Bernd Schmidt - - * reload.c (regno_clobbered_p): Fix thinko in previous change. - -2000-09-10 Stephane Carrez - - * gcc.1: Document 68hc11 specific options. - -2000-09-10 Geoff Keating - - * config/rs6000/sysv4.h (MASK_LONG_DOUBLE_128): Define. - (TARGET_LONG_DOUBLE_128): Define. - (SUBTARGET_SWITCHES): Add -mlong-double-64 and -mlong-double-128. - (LONG_DOUBLE_TYPE_SIZE): Redefine. - (MAX_LONG_DOUBLE_TYPE_SIZE): Define. - (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on definition - of __LONG_DOUBLE_128__. - (CPP_SYSV_SPEC): Define __LONG_DOUBLE_128__ if -mlong-double-128 - passed. - (CPP_LONGDOUBLE_DEFAULT_SPEC): Define. - (CPP_SYSV_DEFAULT_SPEC): Define. - (SUBTARGET_EXTRA_SPECS): Add cpp_longdouble_default. - (INIT_TARGET_OPTABS): Define. - - * config/rs6000/aix.h (RS6000_ITRUNC): Moved from rs6000.h. - (RS6000_UITRUNC): Likewise. - (INIT_TARGET_OPTABS): New macro. - * config/rs6000/rs6000.c (rs6000_trunc_used): Delete. - (trunc_defined): Delete. - (output_prolog): Don't output .extern definitions for fp->int - conversion routines, ASM_OUTPUT_EXTERNAL_LIBCALL will do it. - * config/rs6000/rs6000.h (rs6000_trunc_used): Delete. - (trunc_defined): Delete. - (RS6000_ITRUNC): Moved to aix.h. - (RS6000_UITRUNC): Likewise. - * config/rs6000/rs6000.md (fix_truncdfsi2): Fail if it would - only emit a libcall. - (fixuns_truncdfsi2): Delete. - (trunc_call): Delete. - (trunc_call_rtl): Delete. - -2000-09-10 Zack Weinberg - - * varasm.c (make_decl_rtl): Restore leading star on - DECL_ASSEMBLER_NAME set for decls with an asmspec. - -2000-09-10 Zack Weinberg - - * c-pragma.c (handle_pragma_pack): Correct parsing logic so it - won't give a spurious error for '#pragma pack()'. Simplify - control flow for readability. 'reset' action is not necessary. - -2000-09-10 Zack Weinberg - - * defaults.h: Provide default definitions for: CHAR_TYPE_SIZE, - SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, - LONG_LONG_TYPE_SIZE, WCHAR_TYPE_SIZE, FLOAT_TYPE_SIZE, - DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE, and WCHAR_UNSIGNED. - - * cppexp.c, dwarfout.c, dwarf2out.c, emit-rtl.c, final.c, optabs.c, - profile.c, sdbout.c, tradcif.y, tree.c: - Include defaults.h if not already included. - Don't define the above macros. - - * Makefile.in: Update dependencies. - -2000-09-10 Mark Mitchell - - * c-common.h (add_stmt): Change prototype. - (RECHAIN_STMTS): New macro. - (CASE_LABEL_DECL): Likewise. - (genrtl_case_label): Change prototype. - (c_expand_start_case): Remove prototype. - (build_case_label): Change prototype. - (decl_constant_value): Declare. - * c-common.c (check_case_value): Handle C++'s extensions to C - semantics. - * c-commnon.def (CASE_LABEL): Add room for the CASE_LABEL_DECL - field. - * c-parse.in (stmt): Adjust handling of return statements and case - laels. - * c-semantics.c (add_stmt): Return the new statement. - (genrtl_return_stmt): Take the RETURN_STMT as input, not the - returned expression. Directly generate RTL, rather than calling - c_expand_return. - (genrtl_switch_stmt): Don't call c_expand_start_case. - (build_case_label): Take the LABEL_DECL as input, too. - (genrtl_case_label): Just call add_case_node. - (expand_stmt): Adjust calls to genrtl_return_stmt and - genrtl_case_label. - * c-tree.h (c_expand_start_case): Declare. - * c-typeck.c (decl_constant_value): Give it external linkage. - (c_expand_return): Don't call expand_return or expand_null_return; - use genrtl_return_stmt instead. - * stmt.c (struct nesting): Remove num_ranges field. - (add_case_node): Give it external linkage. - (expand_start_case): Don't set num_ranges. - (expand_start_case_dummy): Don't clear it. - (pushcase): Rely on add_case_node to handle `default' labels. - (add_case_node): Handle `default' labels. - * tree.c (tree_int_cst_compare): New function. - * tree.h (tree_int_cst_compare): Declare. - (add_case_node): Likewise. - -2000-09-10 Richard Henderson - - * c-parse.in: Revert last change. - (init_reswords): Do not enter disabled keywords into the ridpointers - table, modulo objc weirdness. - (_yylex): Return the canonical spelling for a keyword. - -2000-09-10 Philip Blundell - - * config/arm/arm.h (CPP_ISA_SPEC): Don't define `arm' or `thumb'. - * config/arm/linux-elf.h (CPP_PREDEFINES): Don't define `__arm__'. - -Sun Sep 10 14:30:28 EDT 2000 John Wehle (john@feith.com) - - * alias.c (find_base_term): Handle ADDRESSOF. - (memrefs_conflict_p): An ADDRESSOF doesn't conflict. - -2000-09-10 Denis Chertykov - - * genoutput.c (output_insn_data): Translate to \n\ while - outputting templates with many lines. - -2000-09-10 Stephane Carrez - - * libgcc2.h: Use LONG_LONG_TYPE_SIZE instead of MIN_UNITS_PER_WORD - to decide whether 64-bit support must be generated. - -2000-09-10 Richard Henderson - - * c-parse.in (asm patterns): Fix volatile check. - -2000-09-09 Kaveh R. Ghazi - - * cppmacro.c (check_trad_stringification): New function. - (save_expansion): If -Wtraditional, warn about stringification of - macro arguments. - -2000-09-11 Michael Hayes - - * loop.h (struct loop_mem_info): Move from loop.c - (struct loop_info): Add fields store_mems, mems, mems_idx, - mems_allocated, unknown_address_altered, - unknown_constant_address_altered, num_mem_sets, and - first_loop_store_insn. - - * loop.c (loop_store_mems): Replace with field in loop_info struct. - (loop_mems, loop_mems_idx, loop_mems_allocated): Likewise. - (unknown_address_altered, unknown_constant_address_altered): Likewise. - (num_mem_sets): Likewise. - (replace_loop_mems, replace_loop_regs): New. - (struct loop_replace_args): New. - (load_mems): Use replace_loop_mems. - (try_copy_prop): Use replace_loop_regs. - (replace_loop_reg, replace_loop_mem): Use loop_replace_args structure. - -2000-09-09 Stephane Carrez - - * configure.in: Recognize m6811-elf and m6812-elf. - * configure: Regenerate. - -2000-09-09 Geoff Keating - - * recog.c (validate_replace_rtx_1): Correct MODE parameter in call - to operand_subword. - -2000-09-10 Michael Hayes - - * loop.c (struct movables): New. - (num_movables): Move into struct movables. - (the_movables): Change type to struct movables. - (ignore_some_movables): Change struct movable arg to struct movables. - (force_movables, combine_movables, regs_match_p): Likewise. - (rtx_equal_for_loop_p, move_movables): Likewise. - (scan_loop): Change movables to be of type struct movables. - Replace last_movable with field in movables structure. - -2000-09-08 Zack Weinberg - - * c-pragma.c: Don't elide entire file if !HANDLE_GENERIC_PRAGMAS. - (init_pragma): Avoid warning if pfile happens to be unused. - * c-pragma.h: Never define HANDLE_GENERIC_PRAGMAS. Never - define init_pragma to nothing. Always prototype - init_pragma. Prototype dispatch_pragma if !USE_CPPLIB. - - * c-lex.c (process_directive): Always call dispatch_pragma. - Initialize entering_c_header to 0. - -2000-09-08 Stephane Carrez - - * config/m68hc11/m68hc11.md: New file, machine description for - 68HC11 & 68HC12. - * config/m68hc11/m68hc11.h: New file, definitions for 68HC11 & 68HC12. - * config/m68hc11/m68hc11.c: New file, functions for 68HC11 & 68HC12. - * config/m68hc11/m68hc12.h: New file, definitions for 68HC12. - * config/m68hc11/m68hc11-protos.h: New file. - * config/m68hc11/m68hc11-crt0.S: New file, startup code. - * config/m68hc11/t-m68hc11-gas: New file, makefile fragment. - * config/m68hc11/xm-m68hc11.h: New file, target defs. - * config/m68hc11/larith.asm: New file, libgcc routines. - -2000-09-08 Stephane Carrez - - * Makefile.in (DPBIT_FUNCS): Add _usi_to_df. - (FPBIT_FUNCS): Add _usi_to_sf. - * config/fp-bit.c (usi_to_float): New function. - * config/fp-bit.h (L_usi_to_sf, L_usi_to_df): Define. - (usi_to_float): Add appropriate #define. - -2000-09-08 Bernd Schmidt - - * i386-protos.h (sse_comparison_operator, mmx_reg_operand): Declare - new functions. - * i386.c (sse_comparison_operator, mmx_reg_operand): New functions. - * i386.md (attr "type"): Add sse and mmx types. - (attr "memory"): Handle them without a crash. - (movsi_1, movdi_2): Allow MMX regs. - (movdi splits): Don't split moves involving MMX regs. - (setcc_4): Remove '*' from pattern name so we get a gen_setcc4. - (movv4sf_internal, movv4si_internal, movv8qi_internal, - movv4hi_internal, movv2si_internal, movv8qi, movv4hi, movv2si, - movv4sf, movv4si, pushv4sf, pushv4si, pushv8qi, pushv4hi, pushv2si, - sse_movaps, sse_movups, sse_movmskps, mmx_pmovmskb, mmx_maskmovq, - sse_movntv4sf, sse_movntdi, sse_movhlps, sse_movlhps, sse_movhps, - sse_movlps, sse_loadss, sse_movss, sse_storess, sse_shufps, - addv4sf3, vmaddv4sf3, subv4sf3, vmsubv4sf3, mulv4sf3, vmmulv4sf3, - divv4sf3, vmdivv4sf3, rcpv4sf2, vmrcpv4sf2, rsqrtv4sf2, vmrsqrtv4sf2, - sqrtv4sf2, vmsqrtv4sf2, sse_andti3, sse_nandti3, sse_iorti3, - sse_xorti3, maskcmpv4sf3, maskncmpv4sf3, vmmaskcmpv4sf3, - vmmaskncmpv4sf3, sse_comi, sse_ucomi, sse_unpckhps, sse_unpcklps, - smaxv4sf3, vmsmaxv4sf3, sminv4sf3, vmsminv4sf3, cvtpi2ps, cvtps2pi, - cvttps2pi, cvtsi2ss, cvtss2si, cvttss2si, addv8qi3, addv4hi3, - addv2si3, ssaddv8qi3, ssaddv4hi3, usaddv8qi3, usaddv4hi3, subv8qi3, - subv4hi3, subv2si3, sssubv8qi3, sssubv4hi3, ussubv8qi3, ussubv4hi3, - mulv4hi3, smulv4hi3_highpart, umulv4hi3_highpart, mmx_pmaddwd, - mmx_iordi3, mmx_xordi3, mmx_anddi3, mmx_nanddi3, mmx_uavgv8qi3, - mmx_uavgv4hi3, mmx_psadbw, mmx_pinsrw, mmx_pextrw, mmx_pshufw, - eqv8qi3, eqv4hi3, eqv2si3, gtv8qi3, gtv4hi3, gtv2si3, umaxv8qi3, - smaxv4hi3, uminv8qi3, sminv4hi3, ashrv4hi3, ashrv2si3, lshrv4hi3, - lshrv2si3, mmx_lshrdi3, ashlv4hi3, ashlv2si3, mmx_ashldi3, - mmx_packsswb, mmx_packssdw, mmx_packuswb, mmx_punpckhbw, - mmx_punpckhwd, mmx_punpckhdq, mmx_punpcklbw, mmx_punpcklwd, - mmx_punpckldq, emms, sfence, ldmxcsr, prefetch, stmxcsr, sse_clrti, - mmx_clrdi): New patterns. - -2000-09-08 Richard Earnshaw - - * arm.c: Don't include tm.h directly. - -Fri Sep 8 14:34:56 MET DST 2000 Jan Hubicka - - * recog.c (validate_replace_rtx_1): Fix confusion about equality - testing; simplify subregs of constants and nested subregs. - -2000-09-08 Alexandre Oliva - - * config/sh/sh.md (symPLT_label2reg): Use operand3 for PIC reg. - -2000-09-08 Bernd Schmidt - - * combine.c (combine_simplify_rtx): Try to simplify VEC_SELECT of a - VEC_CONCAT. - * rtl.texi (description of USE): Add note about possible pitfalls - with this rtx. - From Richard Henderson: - * reload1.c (choose_reload_regs): Compute need_mode properly. - -2000-09-07 Richard Henderson - - * config/ia64/lib1funcs.asm (__divsi3): Use .s1 for frcpa. - (__modsi3, __umodsi3): Likewise. - (__udivsi3): Likewise. Normalize the TFmode values. - -2000-09-07 Geoff Keating - - * config/rs6000/sol-c0.c (_start): Declare `termfunc' parameter - with a prototype. - * config/rs6000/rs6000.h (RS6000_ARG_SIZE): Use cast to suppress - warning. - -Fri Sep 8 03:26:38 2000 J"orn Rennecke - - * sh.md (cmpeqsi_ior_t, cmpeqsi_and_t): Remove. - (cmpeqdi_t): Add output pattern. - (cmpeqdi_t+1): Don't split when not optimizing. - Restore proper splitting operation. - -2000-09-07 Richard Henderson - - * c-lex.c (process_directive): If not HANDLE_GENERIC_PRAGMAS, - do not call dispatch_pragma. - -2000-09-07 Jim Wilson - - * reload.c (push_reload): Use CLASS_CANNOT_CHANGE_MODE_P in addition - to CLASS_CANNOT_CHANGE_MODE. - * config/ia64/ia64.h (CLASS_CANNOT_CHANGE_MODE_P): True only if the - mode classes are different. - -2000-09-07 Zack Weinberg - - * cpplib.h (struct cpp_options): Add user_label_prefix member, - left out of commit which removed cppulp.c. - -2000-09-07 Richard Henderson - - * bb-reorder.c (fixup_reorder_chain): Add jump in new block - after switch for CASE_DROPS_THROUGH. - -2000-09-07 Richard Henderson - - * loop.c (strength_reduce): Call check_ext_dependant_givs. - Properly extend the biv initial value for the giv. - (record_biv): Zero ext_dependant. - (record_giv): New argument ext_val. Update all callers. - (general_induction_var): Likewise. - (consec_sets_giv): Likewise. - (simplify_giv_expr): Likewise. Fill in ext_val if we find - a sign-extend, zero-extend, or truncate. - (combine_givs_p): Make sure modes are compatible. - (check_ext_dependant_givs): New. - (extend_value_for_giv): New. - * loop.h (struct induction): Add ext_dependant. - * unroll.c (iteration_info): Extend the biv initial value for the giv. - (find_splittable_givs): Likewise. - (final_giv_value): Likewise. - -2000-09-07 Zack Weinberg - - * c-pragma.h: Define HANDLE_GENERIC_PRAGMAS if - REGISTER_TARGET_PRAGMAS is defined. Duplicate some - definitions from cpplib.h. - * cpplib.h: Don't typedef struct cpp_reader if c-pragma.h has - already done it. - * tm.texi: Document HANDLE_PRAGMA as no longer supported. Add - documentation for REGISTER_TARGET_PRAGMAS. - - * c-lex.c: Include cpplib.h before c-pragma.h. Define a - default-pragma callback to implement -Wunknown-pragmas if - USE_CPPLIB. - * c-parse.in: Move all includes to top of file. - * c-pragma.c: Include cpplib.h before c-pragma.h. Include - tm_p.h. - (dispatch_pragma): Put the namespace in the -Wunknown-pragmas - warning. - (init_pragma): If REGISTER_TARGET_PRAGMAS is defined, call it. - - * arm.h, arm-protos.h, arm.c, - c4x.h, c4x-protos.h, c4x.c, - h8300.h, h8300-protos.h, h8300.c, - i370.h, i370-protos.h, i370.c, - i960.h, i960-protos.h, i960.c, - sh.h, sh-protos.h, sh.c, - v850.h, v850-protos.h, v850.c: Convert HANDLE_PRAGMA-based - pragmata scheme to use REGISTER_TARGET_PRAGMAS instead. - - * d30v.h: Don't mention HANDLE_PRAGMA in comment. Add - multiple include guard. - * i370.md (untyped_call): Use GEN_CALL. - (umodsi3): Remove unused variable. - * sh/elf.h: Don't undef HANDLE_SYSV_PRAGMA. - * v850.c (output_move_single, output_move_double): Constify - return value. - (print_operand): Constify a char *. - * v850.h (struct small_memory_info): Constify name member. - -2000-09-07 Kazu Hirata - - * config/h8300.h: Fix comment typos. - * config/h8300/h8300.md: Likewise. - * config/h8300/lib1funcs.asm: Likewise. - -Thu 07-Sep-2000 21:29:00 BST Neil Booth - - * Makefile.in: Remove references to cppulp.{c,o}. - * cppinit.c (initialize_builtins, cpp_start_read, - cpp_handle_option): Update to use cpp_options structure. - * cppulp.c: Remove. - -2000-09-07 Joseph S. Myers - - * c-common.c (time_char_table): Allow %#b and %#h. - -2000-09-07 Herman A.J. ten Brugge - - * reorg.c (find_end_label): If the basic block reorder pass moves the - return insn to some other place try to locate it again and put our - end_of_function_label there. - * reorg.c (relax_delay_slots): Check if find_end_label created a - new label that invalidates the current optimazation. - -2000-09-07 Catherine Moore - - * unroll.c (unroll_loop): Check for unconditional jumps - to loop continuation. Delete if n_iterations is 1. - (ujump_to_loop_cont): New routine. - -2000-09-07 Bernd Schmidt - - * rtl.c (class_narrowest_mode): Add entries for MODE_VECTOR_INT and - MODE_VECTOR_FLOAT. - * reload.c (regno_clobbered_p): Accept new arg, MODE, and use it - to handle multiword modes correctly. All callers and the declaration - changed. - -2000-09-06 Mark Mitchell - - * c-common.h (prep_stmt): Declare. - (lang_expand_stmt): Likewise. - * c-decl.c (lang_expand_stmt): Remove. - * c-semantics.c (lang_expand_stmt): Define. - (prep_stmt): New function. - (expand_stmt): Handle common statement types here. - -2000-09-07 Niibe Yutaka , Kaz Kojima , Alexandre Oliva - - * configure.in (sh-*-linux*): Added. - * configure: Rebuilt. - * config/sh/t-linux: New file. - * config/sh/sh.h (USERMODE_BIT): Define. - (TARGET_USERMODE): Likewise. - (TARGET_SWITCHES): New switches for the bits above. - (INITIALIZE_TRAMPOLINE): Call __ic_invalidate in USERMODE. - * config/sh/linux.h: New file. - * config/sh/lib1funcs.asm (GLOBAL): Don't prefix symbols with - underscore on linux. - (L_sdivsi3, L_udivsi3): Define for linux. - (L_ic_invalidate): Define. - * invoke.texi (SH Options): Document -musermode. - -2000-09-07 Alexandre Oliva - - * config/sh/sh.h (OVERRIDE_OPTIONS): Don't disable function - CSE unless generating PIC. - - * config/sh/sh.md (symPLT_label2reg): Force the initialization of - the PIC register. - -2000-09-06 H.J. Lu (hjl@gnu.org) - - * Makefile.in (clean_s1): Depend on stage_b. - (clean_s2): Depend on stage_d. Don't remove $(VOL_FILES) in - stage2. They are used for "make compare". - -2000-09-06 Mark Mitchell - - Move statement-tree facilities from C++ to C front-end. - * c-common.h (c_tree_index): Add CTI_VOID_ZERO. - (void_zero_node): New macro. - (struct stmt_tree_s): New type. - (stmt_tree): New typedef. - (struct language_function): New type. - (last_tree): New macro. - (last_expr_type): Likewise. - (walk_tree_fn): New typedef. - (current_stmt_tree): New function. - (begin_stmt_tree): Likewise. - (add_stmt): Likewise. - (finish_stmt_tree): Likewise. - (statement_code_p): Likewise. - (lang_statement_code_p): New variable. - (walk_stmt_tree): New function. - (STMT_IS_FULL_EXPR_P): New macro. - * c-common.c (lang_statement_code_p): New variable. - (c_common_nodes_and_builtins): Initialize void_zero_node. - (statement_code_p): New function. - (walk_stmt_tree): Likewise. - * c-decl.c (language_function): Rename to ... - (c_language_function): ... this. Include language_function. - (push_c_function_context): Adjust accordingly. - (pop_c_function_context): Likewise. - (mark_c_function_context): Likewise. - (current_stmt_tree): Define. - * c-semantics.c (begin_stmt_tree): New function. - (add_stmt): Likewise. - (prune_unused_decls): Likewise. - (finish_stmt_tree): Likewise. - -2000-09-06 Herman A.J. ten Brugge - - * flow.c (insn_dead_p): Detect dead memory stores with auto increments. - -2000-09-06 Kazu Hirata - - * calls.c: Fix formatting. - -2000-09-06 Graham Stott - - * config/i386/i386.h (ADDRESS_COST): Fix typo. - -2000-09-06 Zack Weinberg - - Integrated preprocessor. - - * Makefile.in: Remove all references to c-parse.gperf, - c-gperf.h, and c-parse.h. Remove -d from yacc command line - generating c-parse.c. Update dependencies. - * c-parse.gperf, c-gperf.h: Delete. - - * c-common.c: Don't define parse_options, cpp_token, yy_cur, - yy_lim, or yy_get_token. Don't define get_directive_line if - USE_CPPLIB. - * c-common.h: Add multiple include guard. Define RID values - for every keyword in C, C++, and Objective-C. Put all the - modifiers first. - (struct c_fileinfo, get_fileinfo, dump_time_statistics): New. - * c-decl.c (c_decode_option): Handle -lang-objc here. - (print_lang_identifier): Handle C_IS_RESERVED_WORD case. - (grokdeclarator): Adjust for new RID scheme. - (extract_interface_info): New stub. - * c-lang.c: Don't declare yy_cur or parse_options. - (lang_init_options): Call cpp_init. Don't call - cpp_options_init. - (lang_init): Don't call check_newline if USE_CPPLIB. - - * c-lex.c: Don't include c-parse.h. Do include timevar.h. - Elide lots of unnecessary code if USE_CPPLIB. Delete code - rendered unnecessary by new architecture. Move routines not - shared with C++ to c-parse.in. Maintain a local idea of the - line number. Handle C++ as well as C. - [USE_CPPLIB]: Declare and register callbacks for #ident and - for entering/leaving files. - (init_c_lex, c_lex): Are now the entry points to this file. - (check_newline): Break out directive handling to - process_directive. - (read_ucs, is_extended_char, utf8_extend_token): Moved here - from C++ front end. - (readescape, parse_float): Overhaul. - (lex_number, lex_string, lex_charconst): Break out of c_lex - (n'ee yylex). - (get_fileinfo, update_header_times, dump_one_header, - dump_time_statistics): New and/or moved here from C++. - Support per-file data needed by C++ and per-header timing - statistics (C++ only, at the moment). - * c-lex.h: Update prototypes. Add multiple include guard. - * c-tree.h (struct lang_identifier): Add rid_code field. - (C_IS_RESERVED_WORD, C_RID_CODE): New. - - * c-parse.in: Include c-pragma.h. Remove unnecesary calls to - reinit_parse_for_function and/or position_after_white_space. - (save_filename, save_lineno): Look ahead before saving. - (label -> identifier ':'): Save file and line before shifting ':'. - (reservedwords): No need to call get_identifier. - (init_parse, finish_parse, yyerror, yylex, yyprint, - make_pointer_declarator): Are now here for C/ObjC. - (rid_to_yy): Conversion table from RID constants to Yacc codes. - - * c-pragma.c: Rewrite parsing logic to fit with cpplib's - #pragma registry. Provide dummy implementation of that - interface if !USE_CPPLIB. - * c-pragma.h: Update to match. - - * flags.h: Add multiple include guard. - (flag_detailed_statistics): Moved here from C++. - * toplev.c: Define flag_detailed_statistics. - - * gcc.c (C specs): Use %(trad_capable_cpp) for -E|-M|-MM case - #if USE_CPPLIB. - * timevar.def (TV_CPP, TV_LEX): New. - * timevar.h: Add multiple include guard. - - * objc/lang-specs.h: Use %(trad_capable_cpp) for -E|-M|-MM case - #if USE_CPPLIB. - * objc/objc-act.c: Don't mention yy_cur or parse_options. - Initialize cpplib properly. Force lineno to 0 after first - call to check_newline. Don't handle -lang-objc here. - Move forget_protocol_qualifiers and remember_protocol_qualifiers here. - -2000-09-06 David Edelsohn - - * rs6000.md: Correct function unit definitions for cr_logical and - mtjmpr. - (sCOND): Additionally fail for sgt, slt, sge, sle if !TARGET_POWER - and use portable method for >=0 and floating point >=. Remove - associated matchers. - -2000-09-06 Mark Mitchell - - * extend.texi: Mark named return value extension as deprecated. - -2000-09-06 Geoff Keating - - * config/rs6000/rs6000.c (rs6000_reverse_condition): Return - the result. - -2000-09-06 Gabriel Dos Reis - - * toplev.c (display_help): Fix thinko in documentation. - - * diagnostic.h (output_buffer::indent_skip): New fields. - (output_indentation): New macro. - - * diagnostic.c (output_indent): New function. - (output_set_prefix, clear_diagnostic_info): Use. - (output_emit_prefix): Predict future indentation. - -2000-09-06 DJ Delorie - - * Makefile.in (stage_*): add more dependencies to ensure parallel - builds build correctly - -2000-09-06 Manfred Hollstein - - * Makefile.in (bootstrap-lean): Depend on bootstrap-lean_g, - not bootstrap-lean_f. - -2000-09-06 Andreas Schwab - - * mklibgcc.in: Emit rule for libgcc-stage-start. - * Makefile.in (stage1-start, stage2-start, stage3-start, - stage4-start): Don't handle libgcc here, use libgcc.mk instead. - -2000-09-06 Bernd Schmidt - - * local-alloc.c (local_alloc): Ignore CLASS_LIKELY_SPILLED. - (update_equiv_regs): Likewise, except for the mn10200 kludge. - (combine_regs): Likewise. - - * Makefile.in (cse.o): Depend on $(BASIC_BLOCK_H). - * cse.c: Include "basic-block.h". - (struct table_elt): New field REGCOST. - (CHEAP_REG): Delete macro. - (COST): Return 0 for REGs. - (approx_reg_cost_1, approx_reg_cost, preferrable): New functions. - (notreg_cost): Return 0 for appropriate SUBREGs. - (COSTS_N_INSNS): Return N * 2. - (rtx_cost): Return 0 for REGs, and use cost of nested rtx for cheap - SUBREGs. - (CHEAPER): Use new function preferrable. - (insert): Initialize REGCOST member. - (find_best_addr): Use approx_reg_cost for estimation of register - usage. - (cse_insn): Likewise. - * loop.c (iv_add_mult_cost): New function. - (add_cost, shift_cost, mult_cost): Delete variables. - (init_loop): Don't initialize add_cost; reduce copy_cost by half. - (strength_reduce): Use iv_add_mult_cost instead of fixed add_cost. - Make code that detects autoinc opportunities slightly less optimistic. - (simplify_giv_expr): If expression contains other reg that is also a - giv, only increment benefit if this is the only use of that reg. - (consec_sets_giv): Take that change into account. - (combine_givs): Slightly more verbose output. - - * i386.h (RTX_COSTS): For MULT, return true cost of multiplication, - not the cost of an equivalent shift. - * sh-protos.h (addsubcosts): Declare. - * sh.c (addsubcosts): New function. - * sh.h (CONST_COSTS): If CONST_OK_FOR_I, then return 0. - (RTX_COSTS): Tweak. Use addsubcosts. - (ADDRESS_COST): Return higher cost for reg+reg addressing. - -2000-09-06 Geoff Keating - - * config/rs6000/rs6000.c (validate_condition_mode): New function. - (branch_comparison_operator): Call validate_condition_mode to - abort rather than returning 0. - (branch_positive_comparison_operator): New function. - (scc_comparison_operator): Call validate_condition_mode to abort - rather than returning 0. - (ccr_bit): Call validate_condition_mode. Update for - new branch scheme. - (print_operand): Delete %C modifier. Update %E case - to use EQ bit not SO bit. - (rs6000_reverse_condition): New function. - (rs6000_generate_compare): New function. - (rs6000_emit_sCOND): New function. - (rs6000_emit_cbranch): New function. - (output_cbranch): The length of a long branch insn is - now only 8 bytes. Add validate_condition_mode. Use - rs6000_reverse_condition. Remove cror generation. - - * config/rs6000/rs6000.h: Update comments. - (PREDICATE_CODES): Add new predicate. Update codes used - by branch_comparison_operator and scc_comparison_operator. - * config/rs6000/rs6000-protos.h: Add prototypes for - new external functions. - * config/rs6000/rs6000.md: Add new scheduling parameters - for cr_logical instructions. Change length of branch - instructions. - (bCOND patterns): Call rs6000_emit_cbranch. - (sCOND patterns): Call rs6000_emit_sCOND. - (branch patterns): Change lengths to 4. - (cr logical patterns): New. - -2000-09-06 Richard Henderson - - * config/i386/i386.md (call_pop): Fix test for setting - current_function_uses_pic_offset_table. - (call, call_value_pop, call_value): Likewise. - -2000-09-06 Zack Weinberg - - * timevar.c (timevar_add): Delete. - (timevar_get): Also count time since the selected timer was - last updated. Do not examine the timevar stack if the - selected timer is standalone. - -2000-09-05 J. David Anglin - - * gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend. - -2000-09-05 Jason Merrill - - * c-decl.c (finish_incomplete_decl): Don't call complete_array_type - for 'extern' arrays. - -2000-09-05 Richard Henderson - - * config/ia64/lib1func.asm (__divtf3): Rebundle for Itanium. - Eliminate final copy from non-trapping case. - (__divdf3, __divsf3): Likewise. - -2000-09-05 Richard Henderson - - * config/ia64/ia64.md (mulhi3): Fix typo last change. - * config/ia64/lib1func.asm (__divdi3, __udivdi3, __umodsi3): Likewise. - -2000-09-03 Donn Terry , Laurynas Biveinis - - * Makefile.in: Restructure bootstrap stages to allow clean - restart after failure. - -2000-09-05 Richard Henderson - - * config/ia64.md (movsi and movdi patterns): Allow moves from - 8-bit constants to AR registers. - -2000-09-05 Richard Henderson - - * config/ia64/ia64.md (mulhi3): New. - -2000-09-05 Richard Henderson - - * config/ia64/ia64.h (INIT_TARGET_OPTABS): Remove. - * config/ia64/lib1funcs.asm (__divdi3): Update from Intel IA-64 - Optimization Guide, minimum latency alternative. - (__moddi3, __udivdi3, __umoddi3): Likewise. - (__divsi3, __modsi3, __udivsi3, __umodsi3): Likewise. - -2000-09-05 Bruce Korb - - * fixinc/fixincl.c (load_file): always read header files - with sizes that are a multiple of the page size. - & use libiberty's getpagesize for determining that. - -2000-09-05 Alexandre Oliva - - * gcse.c (hash_string_1): Add prototype. - * cse.c (canon_hash_string): Likewise. - -2000-09-04 Craig Newell - - * gcc.c: Undefine "__WCHAR_TYPE__" before redefining it. - -2000-09-04 Andreas Schwab - - * Makefile.in (STAGESTUFF): Remove libgcc. - (stage1-start, stage2-start, stage3-start): Copy the contents of - the libgcc directory explicitly. - (mostlyclean): Clean libgcc. - -2000-09-04 Andrew Haley - - * dwarf2out.c: (stack_adjust_offset): New prototype. - -Wed Jan 1 00:23:59 MET 1997 Jan Hubicka - - * combine.c (make_extraction): Fix rtx_cost comparison to - match the comment. - -Wed Jan 1 00:17:32 MET 1997 Jan Hubicka - - * i386.md (pushsi2, pushhi2, pophi2, swapsf, swapdf, - umulsi3_highpart, smulsi3_highpart, testqi_ccno_1, xorqi_ext_1): - Add '*' to insn pattern name. - -2000-09-04 Jakub Jelinek - - * cpplex.c (ON_REST_ARG): Check VAR_ARGS flag of current context, - use posn - 1 to index into tokens array. - (maybe_paste_with_next): Adjust caller. - -2000-09-03 Geoff Keating - - * invoke.texi: Document the -mvxworks option for rs6000 ELF. - - * config/rs6000/rs6000.h: Update various comments about XER_REGNO. - (REGNO_REG_CLASS): Use symbolic register - names. - -2000-09-03 Richard Earnshaw - - * arm.c (final_prescan_insn): If the form of a jump insn isn't - recognized, don't try to conditionally execute it. - -Sun Sep 3 13:10:56 2000 Denis Chertykov - - * config/avr/avr.md ("*tablejump_lib"): New pattern. - (call_value_insn): Right length claculation. - (call_insn): Likewise. - -2000-09-02 Marek Michalkiewicz - - * config/avr/avr-protos.h, config/avr/avr.c (unique_section, - gas_output_limited_string, gas_output_ascii, output_movqi, - output_movhi, out_movqi_r_mr, out_movqi_mr_r, out_movhi_r_mr, - out_movhi_mr_r, out_movsi_r_mr, out_movsi_mr_r, output_movsisf, - out_tstsi, out_tsthi, ret_cond_branch, ashlqi3_out, ashlhi3_out, - ashlsi3_out, ashrqi3_out, ashrhi3_out, ashrsi3_out, lshrqi3_out, - lshrhi3_out, lshrsi3_out, output_reload_inhi, output_reload_insisf, - out_shift_with_cnt, ptrreg_to_str, cond_string, encode_section_info): - Add "const" as needed to remove warnings. - - * config/avr/avr.c (avr_override_options, avr_init_once, - function_prologue, function_epilogue, frame_pointer_required_p, - class_likely_spilled_p, order_regs_for_local_alloc, - avr_address_cost, avr_ret_register): Use K&R style arguments. - (initial_elimination_offset, gas_output_limited_string): - Remove ATTRIBUTE_UNUSED from the used arguments. - (output_mov*, out_mov*_r_mr, out_mov*_mr_r, output_reload_insisf): - Use local variables src, dest, base to access operands[]. - Rename reg_dest to reg_src if that's what it is. - (output_movhi, output_movsisf): Optimize loading 8-bit immediate - constants to LD_REGS if reg_was_0. - (output_reload_insisf): Change arg 3 to insn length and set it. - (out_movhi_r_mr, out_movhi_mr_r): Use in/out for more efficient - access to 16-bit I/O register pairs. - (avr_address_cost): Lower cost for the above case. - (out_tsthi): Use "or" (faster) instead of "sbiw" if the operand - may be clobbered, also for LD_REGS. - (adjust_insn_length): Correct insn length for iorhi3 and iorsi3 - with a CONST_INT. - - * config/avr/avr.h (PTRDIFF_TYPE): Make signed. - - * config/avr/avr.md: Change all uses of the TEST_HARD_REG_CLASS - macro to test_hard_reg_class function. - (*movsi, *movsf): Change "cc" attribute from "clobber" to "none" - for loading immediate constants to LD_REGS. - (andsi3, cmphi, cmpsi): Add return statements to avoid warnings. - - -Sat Sep 2 13:58:23 2000 Marek Michalkiewicz - - * config/avr/avr.md ("*negsi2"): substitute %@ to __zero_reg__ - * config/avr/libgcc.S: Lost part of the previous patch. - -2000-08-31 J. David Anglin - - * gthr-dce.h (__gthread_objc_mutex_allocate): Create a pthread_mutex_t - object before calling pthread_mutex_init. - -2000-09-02 Alexandre Oliva - - * config/sh/t-elf, config/sh/crt1.asm, config/sh/crti.asm, - config/sh/crtn.asm: New files. - * config/sh/t-sh (EXTRA_MULTILIB_PARTS): Set. - (crt1.o, crti.o, crtn.o): New targets. - * configure.in [sh-*-elf*, sh-*-rtemself*] (tmake_file): Added - sh/t-elf. - * configure: Rebuilt. - * config/sh/sh.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, - STARTFILE_SPEC, ENDFILE_SPEC, CRT_CALL_STATIC_FUNCTION): Define. - * config/sh/elf.h (INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP): - Undefine for config/elfos.h to redefine. - (STARTFILE_SPEC, ENDFILE_SPEC): Redefine after config/elfos.h. - -2000-09-02 Alexandre Oliva , Niibe Yutaka , Kaz Kojima - - * config/sh/sh-protos.h (nonpic_symbol_mentioned_p, - legitimize_pic_address, output_pic_addr_const): Declare. - * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Fix PIC register. - (PREFERGOT_BIT, TARGET_PREFERGOT): Likewise. - (TARGET_SWITCHES): New switch -mprefergot. - (OVERRIDE_OPTIONS): Set flag_no_function_cse unless -mprefergot. - (PIC_OFFSET_TABLE_REGNUM): Define. - (GOT_SYMBOL_TABLE): Likewise. - (LEGITIMIZE_ADDRESS): Use legitimize_pic_address. - (ENCODE_SECTION_INFO): Define. - (FINALIZE_PIC): New macros. - (LEGITIMATE_PIC_OPERAND_P, SYMBOLIC_CONST_P): New macro. - (ASM_OUTPUT_INT, ASM_OUTPUT_SHORT): Use output_pic_addr_const. - * config/sh/sh.c (print_operand_address): Use output_pic_addr_const. - (prepare_move_operands): Call emit_pic_move or - emit_pic_const_move if appropriate. - (output_far_jump): For PIC, use braf and output long offset. - (machine_dependent_reorg): - (sh_expand_prologue): Save and initialize the PIC register. - (sh_expand_epilogue): Restore it. - (initial_elimination_offset): Account for it. - (nonpic_symbol_mentioned_p): New function. - (legitimize_pic_address): Likewise. - (output_pic_addr_const): Likewise. - * config/sh/sh.md (calli_pcrel, call_valuei_pcrel): New insns. - (call, call_value): Use them. - (GOTaddr2picreg, sym_label2reg, symGOT2reg, symGOTOFF2reg, - symPLT_label2reg): New expands. - * invoke.texi (SH Options): Document -mprefergot. - -2000-09-01 Alexandre Oliva - - * rtl.h (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): New macro. - * gcse.c (hash_string_1): New function. - (hash_expr_1) : Disregard filename and line number. - (expr_equiv_p) : Likewise. - * cse.c (rtx_cost): Don't increase the cost of ASM_OPERANDS. - (canon_hash_string): New function. - (canon_hash) : Disregard filename and line number. - (exp_equiv_p) : Likewise. - (fold_rtx): Use ASM_OPERANDS accessor macros. - * emit-rtl.c (copy_insn_1): Likewise. - * integrate.c (copy_rtx_and_substitute): Likewise. - * stmt.c (expand_asm_operands): Likewise. Give an - ASM_OPERANDS rtx the mode of the output reg being set from it. - -2000-09-01 Fred Fish - - * fix-header.c (write_rbrac): Add putc and getc to list of - functions to protect against prior definition as a macro. - -2000-09-01 Joseph S. Myers - - * c-common.h (enum c_tree_index): Add CTI_C_SIZE_TYPE. - (c_size_type_node): Define. - * c-decl.c (init_decl_processing): Initialize c_size_type_node. - * c-common.c (enum format_lengths, enum format_std_version, - format_length_info, format_type_detail, BADLEN, NOLENGTHS, - format_kind_info, printf_length_specs, scanf_length_specs, T89_I, - T99_I, T89_L, T99_LL, TEX_LL, T89_S, T89_UI, T99_UI, T89_UL, - T99_ULL, TEX_ULL, T89_US, T89_F, T99_F, T89_D, T99_D, T89_LD, - T99_LD, T89_C, T99_SC, T99_UC, T89_V, T94_W, TEX_W, T94_WI, - TEX_WI, T99_ST, T99_SST, T99_PD, T99_UPD, T99_IM, T99_UIM, - format_types): Define. - (format_char_info, print_char_table, scan_char_table, - time_char_table): Rearrange for new organization of information - about format length modifiers and standard versions. - (T_ST): Redefine to use c_size_type_node. - (check_format_info): Obtain information about length modifiers and - standard versions from tables. Adjust warning message wordings. - Use the name from the user's program for `ll' and `hh' length - modifiers in warning messages. Use more informative names for - wanted types where available (for wchar_t, wint_t, size_t, signed - size_t, ptrdiff_t, unsigned ptrdiff_t, intmax_t and uintmax_t). - -2000-09-01 Jim Wilson - - * calls.c (emit_call_1): Add REG_NORETURN note to call if ECF_NORETURN. - * combine.c (distribute_notes): Handle REG_NORETURN. - * rtl.c (reg_note_name): Add REG_NORETURN. - * rtl.h (enum reg_note): Likewise. - - * config/ia64/ia64-protos.h (emit_safe_across_calls): Renamed from - ia64_file_start. - * config/ia64/ia64.c (emit_safe_across_calls): Likewise. - (rtx_needs_barrier): Handle unspec_volatile 8 and 9. - (emit_predicate_relation_info): Handle conditional calls with - REG_NORETURN. - * config/ia64/ia64.h (ASM_FILE_START): Call emit_safe_across_calls - instead of ia64_file_start. - * config/ia64/sysv4.h (ASM_FILE_START): Likewise. - * config/ia64/ia64.md (safe_across_calls_all, - save_across_calls_normal): New patterns. - - * loop.c (check_final_value): Check for biv use before checking for - giv use. Check for both biv and giv uses. Always set last_giv_use - if there is a giv use. - -2000-09-01 Richard Henderson - - * config/ia64/ia64.md (mulsi3): Use grfr_register_operand. - (madddi3): Likewise. - (maddsi3): New. - -Fri Sep 1 10:59:47 2000 Richard Kenner - - * expr.c (clear_storage): Don't use emit_move_insn unless - either BLKmode or proper size. - (store_constructor): Don't call clear_storage if REG of wrong size. - - * flow.c (init_propagate_block_info): Don't mark frame dead at end - of function if returns wiht stack pointer depressed. - -2000-09-01 Andrew Haley - - * dwarf2out.c (stack_adjust_offset): New function. - (dwarf2out_stack_adjust): Break out stack adjust logic into - new stack_adjust_offset function. Look inside parallels and - sequences for stack adjustments. - -2000-08-31 Jeff Law - - * arm.md: Use no_new_pseudos to determine when it is safe - to create new pseudo registers. - - * arm.c (legitimize_pic_address): Use no_new_pseudos to determine - when we can safely allocate new registers. - -2000-08-31 Geoffrey Keating - - * stmt.c (expand_asm_operands): Twiddle generating_concat_p - so that CONCATs are not generated for ASMs. - * emit-rtl.c (gen_reg_rtx): Don't generate CONCATs when - not generating_concat_p. - * function.c (pop_function_context_from): Reset - generating_concat_p. - (prepare_function_start): Likewise. - * rtl.c (generating_concat_p): Define. - * rtl.h (generating_concat_p): Declare. - * toplev.c (rest_of_compilation): No CONCATs after RTL generation. - -2000-08-22 Philipp Thomas - Masanobu Yuhara - - * gmicro.h (TARGET_SWITCHES): Add descriptions and mark them - for translation. - -2000-08-30 Greg McGary - - * Makefile.in (fixinc.sh): Pass CC, CFLAGS and LDFLAGS to mkfixinc.sh - * fixinc/Makefile.in (fixincl): Pass $(LDFLAGS) to $(CC). - * fixinc/mkfixinc.sh: Pass $CC, $CFLAGS and $LDFLAGS to $MAKE. - -2000-08-30 Greg McGary - - * tree.h (struct tree_int_cst): Wrap low and high in a sub-struct. - (TREE_INT_CST_LOW, TREE_INT_CST_HIGH): Access through sub-struct. - (TREE_INT_CST): New macro. - * varasm.c (const_hash, compare_constant_1, record_constant_1): - Use new macro TREE_INT_CST. - -Wed 30-Aug-2000 23:18:59 BST Neil Booth - - * contrib.texi: Add self. - -2000-08-30 Alexandre Oliva - - * config/sh/sh.md (cmpeqsi_ior_t, cmpeqsi_and_t): New insns. - (cmpeqdi_t splitter): Use cmpeqsi_and_t instead of emitting jumps - and labels. - -2000-08-30 J. David Anglin - - * fixinc/gnu-regex.c: Don't define `const'. - -Tue Aug 29 22:09:59 2000 Richard Kenner - - * expr.c (store_constructor): Allow variable bounds of array type. - (expand_expr): Don't blow up if type is ERROR_MARK. - * varasm.c (output_constructor): Don't access lower bound of array - type unless need it if index is supplied (so it can be a variable - if no index is supplied). - Use tree_low_cst; use HOST_WIDE_INT for sizes; change BITPOS to POS. - Other minor cleanups. - -2000-08-29 J. David Anglin - - * Makefile.in: Revamp handling of cflags to allow different WARN_CFLAGS - for compilations in stage 1 and subsequent stages, respectively. - * configure.in (vax): Add compiler-dependent CFLAGS for stage 1. - * configure: Rebuilt. - * x-vax, x-vax-gcc: Deleted. - -2000-08-29 Zack Weinberg - - * c-common.c (declare_function_name): Use func_id_node, - function_id_node, and pretty_function_id_node. Do not make - __func__ visible at file scope. - * c-common.h (c_tree_index): Add CTI_FUNCTION_ID, - CTI_PRETTY_FUNCTION_ID, and CTI_FUNC_ID. - (function_id_node, pretty_function_id_node, func_id_node): New - macros. - * c-decl.c (init_decl_processing): Initialize function_id_node, - pretty_function_id_node, and func_id_node. - (c_make_fname_decl): Correct comment. - - * tree.h (struct tree_identifier): Constify pointer member. - - * c-decl.c (pushdecl, implicit_decl_warning): Constify a char *. - * c-pragma.h (struct weak_syms): Constify name and value members. - (add_weak): Constify arguments. - - * calls.c (special_function_p): Constify a char *. - (expand_call): Remove variable which is initialized and then - never used. - * dependence.c (struct def_use, struct induction, struct subscript): - Constify 'variable' member. - (get_low_bound, have_induction_variable): Constify char * argument. - (find_induction_variable): Add braces to avoid dangling else. - (classify_dependence): Constify char * arrays. - * profile.c (output_func_start_profiler): Constify a char *. - * stor-layout.c (finalize_record_size): Constify a char *. - * tree.c (is_attribute_p): Constify a char *. - * varasm.c (add_weak, remove_from_pending_weak_list): Constify argument. - - * varasm.c (make_function_rtl, make_decl_rtl): Rearrange code - for comprehensibility. Do not call get_identifier if we did - not change the DECL_ASSEMBLER_NAME of the decl. Use alloca to - create temporary string constants, not ggc_alloc_string. No - need to copy result of ASM_FORMAT_PRIVATE_NAME. Use const - char * to hold IDENTIFIER_POINTERs. - -2000-08-29 Richard Henderson - - * config/ia64/ia64.md (muldi3): Use grfr_register_operand - for the inputs. - -2000-08-29 Richard Henderson - - * reload.c (push_secondary_reload): Allow class == reload_class - if we're using a reload_in/out pattern. - - * config/ia64/ia64.md (reload_inti): Use a TImode scratch. Use - the half that does not conflict with the reload register. - (reload_outti): Likewise. - -2000-08-29 Kazu Hirata - - * reload.c: Fix formatting. - - * stmt.c: Fix formatting. - - * gcc.c: Fix formatting. - -2000-08-29 Zack Weinberg - - * flags.h (time_report, mem_report): New global flags. - * toplev.c: Define time_report and mem_report. - (f_options): Add -ftime-report and -fmem-report. - (compile_file): Turn on time_report if quiet_flag is off. - Call ggc_print_statistics at very end if mem_report is on. - * timevar.c (TIMEVAR_ENABLE): Examine time_report, not quiet_flag. - - * ggc-common.c (ggc_print_statistics): Rename to - ggc_print_common_statistics; all callers changed. Scale - quantities above 10K to kilobytes and above 10M to megabytes. - * ggc-page.c (ggc_page_print_statistics): Rename to - ggc_print_statistics. Report memory consumed by internal data - structures for each allocation bucket. Scale quantities above - 10K to kilobytes and above 10M to megabytes. - * ggc-simple.c: Prototype debug_ggc_tree to avoid warning. - Cast PTR_KEY(p) to unsigned long in fprintf call to avoid warning. - Define tally_leaves always. - (ggc_print_statistics): New function. - * ggc.h: Adjust for renamed functions. - -Wed Aug 30 00:11:42 2000 Denis Chertykov - - * config/avr/avr.md ("*movsf","*movsi"): Pass NULL to - output_movsisf instead of which_alternative. - - * config/avr/avr.c (output_reload_inhi): Check for NULL ponter. - -Tue Aug 29 22:29:58 2000 Denis Chertykov & Marek Michalkiewicz - - * config/avr/avr-protos.h: (avr_output_ascii) Removed. - (avr_progmem_p): New prototype. - (output_movsisf): Prototype declaration changed. - (output_movqi): New prototype. - (output_movhi): New prototype. - (call_insn_operand): Likewise. - (final_prescan_insn): Likewise. - (avr_simplify_comparision_p): Likewise. - (avr_normalize_condition): Likewise. - (compare_eq_p): Likewise. - (out_shift_with_cnt): Likewise. - (const_int_pow2_p): Likewise. - (output_reload_inhi): Prototype declaration changed. - - * config/avr/avr.c: (debug_hard_reg_set): Prototype declared. - (ldi_reg_rtx): New. rtx for r31. - (avr_init_stack): Initialize as "__stack". - (function_prologue): Use it. - Replace all TARGET_ENHANCED with AVR_ENHANCED. - (avr_mcu_name): Initialize as "avr2". - (avr_enhanced_p, avr_mega_p): New variables. - (mcu_types, avr_override_options): Handle all known MCU types. - Also handle avr1 (only preprocess, assemble and link). - (print_operand): Using of `%K' in output template removed. - (out_movqi_r_mr): Optimized. - (out_movhi_r_mr): Likewise. - (output_movqi): New function. - (output_movhi): Likewise. - (out_movsi_r_mr): Optimized. - (output_movsisf): Compute insn length for `adjust_insn_length' - (out_movqi_mr_r): Optimized. - (out_movhi_mr_r): Optimized. - (adjust_insn_length): Use output_movsisf, output_movqi, - output_movhi for insn length adjusting. - (reg_unused_after): Use dead_or_set_p. - (preferred_reload_class): Now haven't any restriction. - (reg_was_0): New function. - (io_address_p): Likewise. - (const_int_pow2_p): Likewise. - (output_reload_inhi): Likewise. - (output_reload_insisf): Likewise. - - * config/avr/avr.h (MULTILIB_DEFAULTS): Define. - (LIB_SPEC): Use -lc for all supported devices. - (LIBGCC_SPEC): Use -lgcc for all supported devices. - (AVR_MEGA): Define as avr_mega_p. - (AVR_ENHANCED): New, define as avr_enhanced_p. - (TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=... - (CPP_SPEC, LINK_SPEC): Handle all known MCU types. - (CRT_BINUTILS_SPECS): Handle all known MCU types. - Rename gcrt1-*.o to make file names unique on 8.3 filesystems. - (EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC. - (ASM_SPEC): Pass -mmcu=... to the assembler. - Change all -DAVR_* to -D__AVR_*__. - (INIT_TARGET_OPTABS), config/avr/libgcc.S: - Rename library functions to start with two underscores. - (ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid - alignment. - (ASM_WEAKEN_LABEL): Declared for __attribute__((weak)). - (SUPPORTS_WEAK): Likewise. - (LDI_REG_REGNO): New. Register r31 will be used as temporary - register for loading constants to r0-r14. - - * config/avr/avr.md: Replace all TARGET_ENHANCED with - AVR_ENHANCED. - (*mov_r_sp): Removed. Handled by output_movhi. - (*mov_sp_r): Likewise. - (*mov_sp_r_no_interrupts): Likewise - (*mov_sp_r_tiny): Likewise. - (*movqi): Use output_movqi. - (*reload_inqi): New. - (*movhi): Use output_movhi. - (*reload_inhi): New. - (*negsi2): Optimized. - (*negsf2): Likewise. - Added peepholes (define_peephole2) for loading constants to r0-r14 - and for using `cpse' command. - - * config/avr/libgcc.S: Rename library functions to start with two - underscores. - Add support for enhanced core. - (_moqhi3): Fix typo, now _modqi3. - (__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word. - (__prologue_saves__): Remove test for stack adjust by 0. - (__tablejump__): New. - - * config/avr/t-avr: Build libgcc2 with -mcall-prologues. - Add multilib support. - -Tue Aug 29 15:17:54 EDT 2000 John Wehle (john@feith.com) - - * loop.c (prescan_loop): Don't check unknown_address_altered - when deciding if insert_loop_mem is safe. Add BLKmode MEMs - to loop_store_mems as necessary. - (loop_invariant_p): Don't check unknown_address_altered - or unknown_constant_address_altered. - -2000-08-29 J. David Anglin - - * vax.md (sltu, sgeu): Delete sltu and sgeu insn patterns. - -2000-08-29 Zack Weinberg - - * cpperror.c (print_file_and_line): If line is (unsigned int)-1, - print just the filename. - * cpplex.c (_cpp_run_directive): Add additional argument, the - name to give the synthetic buffer. This defaults to - translated "". - * cpplib.c (cpp_define, cpp_undef, cpp_assert, cpp_unassert): - Adjust to match. - (_cpp_define_builtin): New function. - * cppinit.c (initialize_builtins): Use _cpp_define_builtin. - * cpphash.h: Update prototypes. - - * tradcpp.c (main): Process -D and -U simultaneously, in the - order they appeared on the command line. - -2000-08-29 Kaveh R. Ghazi - - * c-decl.c (define_label): Call warning_with_file_and_line and - error_with_file_and_line instead of plain warning or error. - - * c-parse.in (label): Use save_filename/save_lineno to ensure - correct values for calls to define_label. - -2000-08-29 Mark Mitchell - - * calls.c (expand_call): Don't create a VAR_DECL just to throw it - away. - * expr.c (expand_expr, case TARGET_EXPR): Don't call - mark_addressable. - * tree.h (get_file_function_name): Remove two duplicate - declarations. - -2000-08-28 Kazu Hirata - - * tree.c: Fix formatting. - - * xcoffout.c: Fix formatting. - -2000-08-28 Jason Merrill - - * dwarf2out.c (attr_checksum): Also ignore DW_AT_producer. - -2000-08-28 Daniel Berlin - - * dwarf2out.c (dwarf2out_finish): Don't bother calling - break_out_includes if it won't do anything. - -2000-08-28 Richard Henderson - - * reload.c (push_secondary_reload): Revert 2000-08-16 change. - (find_reloads): Likewise. - * config/alpha/alpha.md (reload_inqi): Revert 2000-08-11 change. - (reload_inhi): Likewise. - -2000-08-28 Richard Henderson - - * config/i386/i386.c: Don't error on EXTRA_CONSTRAINT defined. - (call_insn_operand): Don't expect a surrounding mem. - (constant_call_address_operand): Likewise. - * config/i386/i386.h (PREDICATE_CODES): Update. - * config/i386/i386.md (call patterns): Move the match_operand - for the call destination inside the mem. - -2000-08-28 Richard Henderson - - * local-alloc.c (requires_inout): Don't use reserved range for - EXTRA_CONSTRAINTS; use anything not matched by REG_CLASS_FROM_LETTER. - * recog.c (asm_operand_ok): Likewise. - (preprocess_constraints, constrain_operands): Likewise. - * regclass.c (record_reg_classes): Likewise. - * reload.c (find_reloads): Likewise. - * reload1.c (maybe_fix_stack_asms): Likewise. - (reload_cse_simplify_operands): Likewise. - * stmt.c (expand_asm_operands): Likewise. - - * md.texi: Update constraints documentation. - * tm.texi (EXTRA_CONSTRAINT): Update. - -2000-08-28 Daniel Berlin - - * dwarf2out.c (DIE_LABEL_PREFIX): Remove leading "__". - (print_die): If we don't know the offset of the - target die, try the symbol. Add a trailing newline. - (reverse_all_dies): New fn. - (dwarf2out_finish): Call it. - (break_out_includes): Reorganize for clarity. - (add_sibling_attributes): Don't call reverse_die_lists. - (output_comp_unit): Rename from output_comdat_comp_unit. Use for - primary CU, too. - * flags.h: Add flag_eliminate_dwarf2_dups. - * toplev.c (f_options): Support -feliminate-dwarf2-dups. - -2000-08-28 Jason Merrill - - * dwarf2.h (DW_TAG_GNU_BINCL, DW_TAG_GNU_EINCL): New tags. - * dwarf2out.c: #include "md5.h". - (DIE_LABEL_PREFIX): New macro. - (dw_val_struct): Add 'external' flag to val_die_ref. - (add_AT_die_ref, AT_ref): Adjust. - (AT_ref_external, set_AT_ref_external): New fns. - (build_abbrev_table): Call set_AT_ref_external. - (value_format): Call AT_ref_external. - (die_struct): Add die_symbol field. - (new_die): Clear it. - (dwarf_tag_name): Handle BINCL/EINCL. - (dwarf2out_start_source_file): Add BINCL DIE. - (dwarf2out_end_source_file): Add EINCL DIE. - (push_new_compile_unit, pop_compile_unit, clear_die_sizes): New fns. - (loc_checksum, attr_checksum, die_checksum): New fns. - (is_type_die, is_comdat_die, is_symbol_die): New fns. - (compute_section_prefix, assign_symbol_names): New fns. - (gen_internal_sym, output_die_symbol, output_symbolic_ref): New fns. - (output_die): Call output_die_symbol and AT_ref_external. - (output_comdat_comp_unit): New fn, split out from... - (dwarf2out_finish): ...here. Also call add_sibling_attributes for - secondary CUs. - (output_pubnames, output_aranges): Abort if we see entries from - secondary CUs. - * toplev.h: Declare file_name_nondirectory. - * toplev.c (file_name_nondirectory): New fn, moved from C++ frontend. - (rest_of_type_compilation): Call dwarf2out_decl if at toplevel. - (debug_start_source_file): Call dwarf2out_start_source_file - regardless of debug verbosity. - (debug_end_source_file): Similarly. - * tree.h: Declare clean_symbol_name. - * tree.c (clean_symbol_name): Split out from... - (get_file_function_name_long): ...here. - - * dwarf2out.c (new_loc_descr): Use calloc. - (splice_child_die): Remove the die from the right parent. - (gen_struct_or_union_die): Don't add AT_name to a specification DIE. - -Mon Aug 28 19:02:13 2000 Richard Kenner - - * toplev.c (decode_g_option): Don't give warning for unknown -g - option; return 0 instead. - (main): If -g option is not recognized by front end or - language-independent code, give warning. - -2000-08-28 Greg McGary - - * config/i386/i386-protos.h (ix86_expand_compare): Add extern decl. - * config/i386/i386.c (ix86_expand_compare): Remove `static'. - * config/i386/i386.md (trap, conditional_trap): New insn & expand. - -2000-08-27 Greg McGary - - * cpplex.c (parse_string): Don't look for backslash - before first char in `namebuf'. - * loop.c (strength_reduce): Skip NOTEs. - -2000-08-27 Jason Merrill - - * c-decl.c (duplicate_decls): Don't set TREE_STATIC or clear - DECL_EXTERNAL on a local extern. Don't set DECL_IGNORED_P or - TREE_ASM_WRITTEN, either. - (finish_decl): Adjust. - -2000-08-28 Philipp Thomas - - * ABOUT-GCC-NLS: Remove gettext patches from Paul Eggert as - they have been incorporated into the gettext CVS. Change the text to - reflect the current status of NLS. Add instructions for accessing - the gettext CVS and add the patch from Martin v. Loewis. - -2000-08-27 Geoff Keating - - * config/rs6000/rs6000.md (movdi_internal64+5): Make SUBREG-safe - by using gen_lowpart_common. - (movdi_internal64+6): Likewise. - -2000-08-26 Alexandre Oliva - - * tm.texi (FINI_SECTION_ASM_OP, CRT_CALL_STATIC_FUNCTION): - Document. - - * config/mn10300/mn10300.h (DBX_REGISTER_NUMBER): Remap register - numbers to the ranges used by GDB. - -2000-08-25 Richard Henderson - - * config/ia64/ia64.h (struct machine_function): Add n_varargs. - * config/ia64/ia64.c (ia64_compute_frame_size): Use it. - (ia64_expand_prologue): Likewise. - (ia64_setup_incoming_varargs): Set it. Properly skip the current - argument for stdargs. - -2000-08-25 Jason Merrill - - * integrate.c (expand_inline_function): Pull out the original decl. - -2000-08-25 Jim Wilson - - * cse.c (cse_insn): Don't pass label subtraction to force_const_mem. - - * function.c (gen_mem_addressof): Clear MEM_ALIAS_SET if no decl. - -2000-08-25 Greg McGary - - * flow.c (dump_edge_info): Use ARRAY_SIZE. - * config/alpha/alpha.c (alpha_expand_block_move): Likewise. - -2000-08-25 Richard Earnshaw - - * arm.h (STRUCT_VALUE): Define to 0, not NULL. - -Fri Aug 25 12:52:49 EDT 2000 John Wehle (john@feith.com) - - * i386.c (ix86_find_base_term): New. - * i386-protos.h (ix86_find_base_term): Prototype. - * i386.h (FIND_BASE_TERM): Define. - * alias.c (find_base_term): Use it. - * tm.texi (FIND_BASE_TERM): Document it. - - * alias.c (true_dependence, write_dependence_p): Unchanging - memory can't conflict with non-unchanging memory. - - * alias.c (memrefs_conflict_p): A BLKmode reference - to a symbol (or CONST_INT address) always conflicts - with a reference to another symbol. - -2000-08-25 Joseph S. Myers - - * c-common.c (time_char_table): Don't allow width and flags with - "z" format. - -2000-08-25 Jakub Jelinek - - * config/i386/i386.c (ix86_expand_branch): Treat GE and GEU the same - way as LT and LTU when the second operand has 0 in low word. - -2000-08-26 Michael Hayes - - * basic-block.h (struct loop): Rename `exits' field to - `exit_edges'. Add `entry_edges' and `num_entries' fields. - - * flow.c (flow_loop_exit_edges_find): Rename from flow_loop_exits_find. - (flow_loop_entry_edges_find): Add. - (flow_edge_list_print): Rename from flow_exits_print. - (flow_loops_find): Call flow_loop_entry_edges_find. - (flow_loop_dump): Dump entry_edges list. - (flow_loops_free): Free entry_edges. - -2000-08-26 Michael Hayes - - * loop.c (loop_dump_aux, debug_loop): New functions. - (LOOP_BLOCK_NUM_1, LOOP_BLOCK_NUM, LOOP_INSN_UID): New macros. - - * flow.c (flow_loops_dump): Add callback parameter. - (flow_loop_dump): Add callback parameter and call it. Move - loop note debugging code to loop_dump_aux. - - * basic-block.h (flow_loop_dump): Add callback parameter - (flow_loops_dump): Likewise. - - * toplev.c (rest_of_compilation): Add NULL callback function pointer - to call to flow_loops_dump. - -2000-08-26 Michael Hayes - - * loop.c (count_loop_regs_set): Replace start and end arguments - with loop argument. All callers udated. - -2000-08-26 Michael Hayes - - * loop.c (constant_high_bytes): Delete. - -2000-08-26 Michael Hayes - - * loop.c (prescan_loop): Move checks for NOTE_INSN_LOOP_CONT - and NOTE_INSN_LOOP_VTOP to... - (find_and_verify_loops) ...here. - -Fri Aug 25 04:21:13 2000 Alexandre Oliva - - * crtstuff.c (CRT_CALL_STATIC_FUNCTION): Define default. - (fini_dummy, init_dummy): Use it. - -Fri 25-Aug-2000 08:03:27 BST Neil Booth - - * cpplex.c (is_macro_disabled): Caller has already checked - that we're not a preprocessed file. - -2000-08-24 Mark Mitchell - - * Makefile.in (C_AND_OBJC_OBJS): Remove c-iterate.o. - (c-iterate.o): Remove target. - * gcc/c-common.h (enum rid): Remove RID_ITERATOR. - * gcc/c-decl.c (init_decl_processing): Remove call to init_iterators. - (finish_decl): Don't handle iterators. - (grokdeclarator): Likewise. - * gcc/c-parse.gperf: Remove __iterator and __iterator__ keywords. - * gcc/c-gperf.h: Regenerated. - * gcc/c-iterate.c: Removed. - * gcc/c-lex.c (init_lex): Don't handle iterators. - * gcc/c-parse.in (primary): Remove pop_iterator_stack call. - (compstmt_primary_start): Remove push_iterator_stack call. - (stmt): Don't allow iterator statements. Replace iterator_expand - with expand_expr_stmt. - (all_iter_stmt): Remove. - (all_iter_stmt_simple): Likewise. - (all_iter_stmt_with_decl): Likewise. - * gcc/c-tree.h (ITERATOR_P): Remove. - (ITERATOR_BOUND_P): Likewise. - (init_iterators): Remove declaration. - (iterator_expand): Likewise. - (iterator_for_loop_start): Likewise. - (iterator_for_loop_end): Likewise. - (iterator_for_loop_record): Likewise. - (push_iterator_stack): Likewise. - (pop_iterator_stack): Likewise. - * gcc/c-typeck.c (decl_constant_value): Don't check ITERATOR_P. - (readonly_warning): Likewise. - * gcc/tree.h (ITERATOR_BOUND_P): Don't mention it. - -2000-08-24 Jim Wilson - - * c-common.c (decl_attributes, case A_ALIGN): Revert last change. - Copy type in a TYPE_DECL, just like pushdecl does. - -2000-08-24 Richard Henderson - - * toplev.c (main): Enable flag_reorder_blocks at -O2. - -2000-08-24 Zack Weinberg - - * ggc-page.c (alloc_page): If HAVE_MMAP_ANYWHERE and we're - asked for one page, allocate GGC_QUIRE_SIZE of them and put - the extras on the free list. - (release_pages): Clean up. - (ggc_set_mark): Don't adjust G.allocated here... - (sweep_pages): ... do it here. - -2000-08-24 Zack Weinberg - - * cppfiles.c (read_include_file): Rearrange initializations. - -2000-08-24 Richard Henderson - - * stmt.c (expand_asm_operands): Treat EXTRA_CONSTRAINT like g or X. - - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.c (gr_register_operand): New. - (fr_register_operand, grfr_register_operand): New. - (gr_nonimmediate_operand, grfr_nonimmediate_operand): New. - (grfr_reg_or_8bit_operand): New. - (gr_reg_or_0_operand): Rename from reg_or_0_operand and - use gr_register_operand. - (gr_reg_or_5bit_operand, gr_reg_or_6bit_operand): Likewise. - (gr_reg_or_8bit_operand, gr_reg_or_8bit_adjusted_operand): Likewise. - (gr_reg_or_8bit_and_adjusted_operand): Likewise. - (gr_reg_or_14bit_operand, gr_reg_or_22bit_operand): Likewise. - (fr_reg_or_fp01_operand): Likewise. - (not_postinc_memory_operand): New. - (ia64_split_timode): Remove unused variables. - (rtx_needs_barrier): Check arguments to cmpxchg. - (builtin_description): Remove. - (bdesc_2argsi, bdesc_2argdi): Remove. - (ia64_init_builtins): Declare all builtins directly. - (ia64_expand_fetch_and_op): Rewrite to be called from - ia64_expand_builtin directly. Use expand_binop and co. - (ia64_expand_op_and_fetch): Likewise. - (ia64_expand_compare_and_swap): Likewise. - (ia64_expand_binop_builtin): Remove. - (ia64_expand_lock_test_and_set): New. - (ia64_expand_lock_release): New. - (ia64_expand_builtin): Use them. - * config/ia64/ia64.h (CONSTRAINT_OK_FOR_S): New. - (EXTRA_CONSTRAINT): Use it. - (PREDICATE_CODES): Update. - * config/ia64/ia64.md (*): Use gr_register_operand and co. - (mf): Indicate that we set memory as well as use it. - (fetchadd_acq_si): Show memory being modified as well. - (fetchadd_acq_di, cmpxchg_acq_si, cmpxchg_acq_di): Likewise. - (val_compare_and_swap_si, val_compare_and_swap_di): Remove. - (lock_test_and_set_si, lock_test_and_set_di): Remove. - (fetch_and_add_si, fetch_and_sub_si, fetch_and_or_si): Remove. - (fetch_and_and_si, fetch_and_xor_si, fetch_and_nand_si): Remove. - (fetch_and_add_di, fetch_and_sub_di, fetch_and_or_di): Remove. - (fetch_and_and_di, fetch_and_xor_di, fetch_and_nand_di): Remove. - (add_and_fetch_di, sub_and_fetch_di, or_and_fetch_di): Remove. - (and_and_fetch_di, xor_and_fetch_di, nand_and_fetch_di): Remove. - (add_and_fetch_si, sub_and_fetch_si, or_and_fetch_si): Remove. - (and_and_fetch_si, xor_and_fetch_si, nand_and_fetch_si): Remove. - * config/ia64/ia64intrin.h (*): Cast result to the appropriate - return type. Pretty print definitions. - -2000-08-24 Jim Wilson - - * config/ia64/ia64.md (movdi): Don't call gen_movdi_symbolic if - we have a SYMBOL_REF with SYMBOL_REF_FLAG set. - -2000-08-24 Jason Merrill - - * dwarf2out.c (AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, - AT_loc, AT_addr, AT_lbl): Abort on unsuitable input. - (get_AT_low_pc, get_AT_hi_pc, get_AT_string, get_AT_flag, - get_AT_unsigned, get_AT_ref): Don't call them if get_AT fails. - -2000-08-24 Greg McGary - - * optabs.c (init_optabs): Initialize fixtab, fixtrunctab, floattab, - and extendtab within their proper array boundaries. - * emit-rtl.c (init_emit_once): Pass `const_tiny_rtx' with bounds - for the entire array. - - * config/arm/arm.c (arm_override_options): Use ARRAY_SIZE. - * config/alpha/alpha.c (alpha_lookup_xfloating_lib_func): Likewise. - * config/avr/avr.c (order_regs_for_local_alloc): Likewise. - * config/fr30/fr30.c (fr30_print_operand): Likewise. - * config/i386/dgux.c (output_options): Likewise. - * config/i386/dgux.h (ASM_FILE_START): Likewise. - * config/m88k/m88k.c (output_options): Likewise. - * config/m88k/m88k.h (ASM_FILE_START): Likewise. - * config/mcore/mcore.c (mcore_output_inline_const_forced, - layout_mcore_frame, handle_structs_in_regs): Likewise. - * config/mips/mips.c (output_block_move): Likewise. - * config/rs6000/rs6000.c (rs6000_override_options, - rs6000_file_start): Likewise. - * config/sparc/sparc.c (sparc_add_gc_roots): Likewise. - * fixinc/fixfixes.c (FIX_TABLE_CT): Likewise. - * fixinc/fixtests.c (TEST_TABLE_CT): Likewise. - * builtins.c (expand_builtin_setjmp): Likewise. - * expr.c (safe_from_p): Likewise. - * flow.c (life_analysis): Likewise. - * fold-const.c (size_int_type_wide): Likewise. - * gcc.c (translate_options, init_spec, set_spec, main): Likewise. - * genattrtab.c (make_length_attrs): Likewise. - * genopinit.c (gen_insn): Likewise. - * genrecog.c (NUM_KNOWN_PREDS, NUM_SPECIAL_MODE_PREDS): Likewise. - * global.c (global_alloc): Likewise. - * local-alloc.c (find_free_reg): Likewise. - * mips-tdump.c (print_symbol): Likewise. - * mips-tfile.c (parse_def, parse_input): Likewise. - * reload1.c (NUM_ELIMINABLE_REGS): Likewise. - * stmt.c (expand_nl_goto_receiver): Likewise. - * stor-layout.c (set_sizetype): Likewise. - * varasm.c (decode_reg_name): Likewise. - * toplev.c (decode_f_option, decode_W_option, - set_target_switch, print_switch_values): Likewise. - (NUM_ELEM): Remove macro. - (display_help, main): s/NUM_ELEM/ARRAY_SIZE/ - -2000-08-24 Greg McGary - - * tree.h (enum tree_index): New member `TI_MAIN_IDENTIFIER'. - (MAIN_NAME_P, main_identifier_node): New macros. - * c-common.c (c_common_nodes_and_builtins): Init main_identifier_node. - * c-decl.c (start_decl, grokdeclarator, start_function, - store_parm_decls, finish_function): Use MAIN_NAME_P. - * config/avr/avr.c (function_prologue, function_epilogue): Likewise. - * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Likewise. - * config/i386/win32.h (SUBTARGET_PROLOGUE): Likewise. - * config/pdp11/pdp11.c (output_function_prologue): Likewise. - -2000-08-24 Greg McGary - - * cppfiles.c (actual_directory): Don't write beyond `dir' - when it contains "". - * real.c (asctoeg): Stay within bounds of etens[][]. - -2000-08-24 Kaveh R. Ghazi - - * dependence.c (dependence_string, direction_string, - dump_one_node, dump_node_dependence): Hide unused identifiers. - (get_low_bound, normalize_coefficients): Match definition to - static prototype. - (get_one_coefficient): Initialize variables `value0_is_idx' and - `value1_is_idx'. - (ziv_test, gcd_test): Mark parameters with ATTRIBUTE_UNUSED. - (ziv_test): Delete variable `idx', use parameter `sub' instead. - (direction_merge): Avoid automatic aggregate initialization. - (have_dependence_p): Use `src' not `dest' to set `src_idx'. - Initialize variables `dest_idx' and `src_idx'. - (end_dependence_analysis): Avoid C89 style function definition. - -2000-08-24 Joseph S. Myers - - * c-common.c (time_char_table): Don't allow width with %F. - (check_format_info): Don't allow "Z" length with scanf. - -2000-08-24 Gabriel Dos Reis - - * diagnostic.c (finish_diagnostic): Define. - (output_do_printf): Use wrap_text instead of output_add_string. - (default_print_error_function): Avoid embedded '\n'. - - * diagnostic.h (flush_diagnostic_buffer): Declare. - -2000-08-23 Alexandre Oliva - - * dependence.c: Replace `[][]' with `[][MAX_SUBSCRIPTS]'. - -2000-08-23 Hans-Peter Nilsson - - * Makefile.in (GCC_PASSES): Add specs. - -2000-08-23 Jim Wilson - - * frame.h (IA64_UNW_EHANDLER, IA64_UNW_UHANDLER): New. - * config/ia64/frame-ia64.c (__get_personality): Return zero if neither - EHANDLER nor UHANDLER bit is set. - (__get_except_table): Likewise. - -2000-08-23 Nick Clifton - - * config/arm/lib1funcs.asm: Replace upper case condition codes - with lower case versions. - - * config/arm/arm.h (STRUCT_VALUE): Define. - (STRUCT_VALUE_REGNUM): Delete. - -2000-08-23 Zack Weinberg - - * cpphash.h (IN_I): New flag for directive table. - * cpplib.c (DIRECTIVE_TABLE): Mark #define, #undef, #ident, and - #pragma with IN_I. - (_cpp_check_directive): If -fpreprocessed, execute directives - marked with IN_I. Issue no warnings in this case. - * cpplex.c (_cpp_get_token): Expand no macros if -fpreprocessed. - -2000-08-23 Joseph S. Myers - - * c-common.c (print_char_table): Allow 'I' flag with %d, %i and - %u. - (check_format_info): Support printf 'I' flag; warn about it with - -pedantic. - -2000-08-23 Richard Earnshaw (rearnsha@arm.com) - - * arm.c (arm_expand_prologue): Ensure that the stack-adjustment - barrier can't be ignored by the alias analysis code. - -2000-08-12 Eli Zaretskii - - * fixinc/inclhack.def (sysv68_string): Fix the Sed script so it - works inside fixincl. - -Wed Aug 23 04:55:48 2000 Alexandre Oliva - - * simplify-rtx.c (simplify_rtx): Don't pass VOIDmode to - simplify_relational_operation() unless both operands are of - VOIDmode. - * cse.c (fold_rtx): Likewise. - -Tue Aug 22 23:53:27 EDT 2000 John Wehle (john@feith.com) - - * rtlanal.c (rtx_unstable_p): The pic register is stable - (within one function) and the actual rtx should be used - when checking the registers. - (rtx_addr_can_trap_p): Pic memory addresses can't trap. - - * alias.c (true_dependence, write_dependence_p): Fix - bug in previous patch. - - * i386.c (ix86_GOT_alias_set): New. - (legitimize_pic_address): Use it. - - * rtlanal.c (rtx_unstable_p): An unchanging MEM is - only stable if its address is stable. - (rtx_varies_p): An unchanging MEM can't vary if - its address doesn't vary. - -2000-08-22 Kaveh R. Ghazi - - * c-parse.in (unop +): Restrict -Wtraditional warnings to user code. - -2000-08-22 J. David Anglin - - * vax.h (ASM_SPEC): Pass `-J' to assembler. - * x-vax-gcc: New file for bootstrapping with gcc. - * x-vax: Use X_CFLAGS rather than X_CPPFLAGS to pass `-J'. - * configure.in: Use x-vax-gcc with gcc. - * configure: Rebuilt. - -Tue Aug 22 21:21:05 2000 J"orn Rennecke - - * toplev.c (rest_of_compilation): Rebuild label notes after - post-reload splitting pass if new labels have been created. - -2000-08-22 Gabriel Dos Reis - - * diagnostic.h (output_buffer_state): New macro. - * diagnostic.c (diagnostic_for_decl, sorry, - default_print_error_function, output_do_verbatim, - report_diagnostic, report_problematic_module): Use it. - (wrap_text): Tweak. - (output_format): Use wrap_text instead of maybe_wrap_text. - -2000-08-22 Nick Clifton - - * config/arm/lib1funcs.asm (ARM_DIV_MOD_BODY): New macro. - Common code for ARM divide and modulus functions. - (THUMB_DIV_MOD_BODY): New macro. Thumb equivalent of - ARM_DIV_MOD_BODY. - (FUNC_END): New macro: Common code at the end of the division and - modulo functions. - (THUMB_FUNCTION_START): New macro: Common code at the start of - Thumb functions. - (__divsi3, __udivsi3, __modsi3, __umodsi3): Use new macros. - -Tue Aug 22 20:34:52 2000 Kaz Kojima - - * config/sh/sh.md (cmpeqdi_t splitter): Fix a reverse testing. - - * config/sh/sh.c (prepare_scc_operands): Apply force_reg to - sh_compare_op1 when the mode is DImode and sh_compare_op1 isn't - const0_rtx. - -2000-08-22 Nick Clifton - - * config/arm/lib1funcs.asm (__umodsi3): Before performing any - restorative additions, test for bottom bits of IP being set, - rather than relying upon the RORs not matching. - (__modsi3): Ditto. - -2000-08-22 David Edelsohn - - * aix.h (ASM_DECLARE_FUNCTION_NAME): Call named_section() or - text_section() as appropriate instead of emitting text csect - pseudo-op directly. - (TEXT_SECTION_ASM_OP): Only require default 32-bit alignment. - (UNIQUE_SECTION): Define macro. - (ASM_OUTPUT_SECTION_NAME): Define macro. - * rs6000.c (rs6000_override_options): Disable -ffunction-sections - on AIX if debugging and -fdata-sections always. - -2000-08-22 Steven King - - * config/float-i386.h (LDBL_EPSILON): Remove __convert_long_double - machinery. - (LDBL_MAX): Same here. - -2000-08-22 Richard Henderson - - * flow.c (tidy_fallthru_edge): Update b->end properly. - -2000-08-22 Stan Cox - - * Makefile.in (OBJS): Add dependence.o. - * dependence.c: New file. - -2000-08-22 Alexandre Oliva , John David Anglin - - * calls.c (check_sibcall_argument_overlap_1): Adjust for - ARGS_GROW_DOWNWARD. - (check_sibcall_argument_overlap): Likewise. - -2000-08-22 Alexandre Oliva - - * invoke.texi (SH Options): Document -m4-nofpu, - -m4-single-only, -m4-single, -m4, -mbigtable, -mfmovd, - -mhitachi, -mnomacsave, -misize, -mpadstruct, -mspace. - -2000-08-22 Joseph S. Myers - - * c-common.c (check_format_info): Give the 'some locales' warning - for strftime %Ey rather than the unconditional 'only last 2 digits - of year' one. - -2000-08-22 Richard Henderson - - * alias.c (init_alias_analysis): Do not register - struct_value_incoming_rtx or static_chain_rtx as pointing - to stack memory. - -Tue Aug 22 01:44:43 2000 Jeffrey A Law (law@cygnus.com) - - * protoize.c (munge_compile_params): Fix typo and formatting buglets. - -2000-08-22 Gabriel Dos Reis - - * diagnostic.h (report_problematic_module): Declare. - * diagnostic.c (report_problematic_module): New function. - (report_error_function): Tweak. - -Tue Aug 22 02:31:26 2000 Richard Kenner - - * stmt.c (expand_goto_internal, fixup_gotos): Only check - TYPE_RETURNS_STACK_DEPRESSED for FUNCTION_TYPE. - -2000-08-21 Richard Henderson - - * flow.c (calculate_global_regs_live): Mark frame pointer live - everywhere before reload. - -2000-08-21 Jim Wilson - - * real.c (ereal_from_int, ereal_from_uint, significand_size): Handle - INTEL_EXTENDED_IEEE_FORMAT. - (toe64): Delete INTEL_EXTENDED_IEEE_FORMAT support. Unconditionally - clear last two bytes of output FP value. - -2000-08-21 Graham Stott - - * config/ia64/ia64.h (REDO_SECTION_INFO_P): Change decl to DECL. - -2000-08-21 Jakub Jelinek - - * unroll.c (loop_find_equiv_value): If ret is modified between - insn and loop_start, ret might not be equivalent to reg. - -2000-08-21 Joseph S. Myers - - * c-common.c (init_dollar_format_checking, - maybe_read_dollar_number, finish_dollar_format_checking): New - functions. - (dollar_arguments_used, dollar_arguments_count, - dollar_first_arg_num, dollar_max_arg_used, dollar_format_warned): - New variables. - (check_format_info): Support $ formats for scanf and printf width - and precision. Always increment format_chars to advance past the - '*' of precision, not just when the format parameters are - available to check. - -2000-08-21 Kaveh R. Ghazi - - * mips.c (block_move_loop, expand_block_move, - function_arg_partial_nregs, save_restore_insns, function_prologue, - mips_expand_prologue, RA_MASK): Avoid using the `U' integer - constant suffix. - (function_arg_advance, function_arg): Match argument to format - specifier `%p'. - -2000-08-21 Nix - - * gcc.c (do_spec_1): Implement %j spec flag. - Remove dead comment. - - * gcc.texi (The Configuration File): Document HOST_BIT_BUCKET. - * system.h (HOST_BIT_BUCKET): Default to "/dev/null". - * config/i386/xm-dos.h (HOST_BIT_BUCKET): Define as "NUL". - * config/i386/xm-os2.h, config/winnt/winnt.h: Likewise. - - * protoize.c (munge_compile_params): Use HOST_BIT_BUCKET (if - writable) instead of hardcoded value. - - * toplev.c (compile_file): Output to a file even if -fsyntax-only. - - * gcc.c, config/i386/xm-dos.h, config/i386/xm-os2.h: Kill - MKTEMP_EACH_FILE. - - * gcc.c (cc1_options): Do not process -o or run the assembler if - -fsyntax-only. - * objc/lang-spec.h: Likewise. - -2000-08-21 Eli Zaretskii - - * fixinc/fixincl.c (fix_with_system): Pipe the output of - "external" fixes through `cat', to avoid truncating the input - file by redirection. - -2000-08-21 Jakub Jelinek - - * config/i386/i386.md (lea_general_1): Copy insn condition to split - condition. - (lea_general_2, lea_general_3): Likewise. - -2000-08-21 Kaveh R. Ghazi - - * c-decl.c (duplicate_decls, define_label): Restrict -Wtraditional - warnings to user code. - - * c-lex.c (readescape, yylex): Likewise. - - * c-typeck.c (store_init_value, process_init_element): Likewise - (c_expand_start_case): Format. - -2000-08-18 Maciej W. Rozycki - - * mips/linux.h (LINK_SPEC): Use %(endian_spec). - - * mips/mips.h: Change LINKER_ENDIAN_SPEC to ENDIAN_SPEC - and linker_endian_spec to endian_spec. - (ENDIAN_SPEC): Add %{EB} and %{EL}. - (LINK_SPEC): Remove %{EB} and %{EL}. - (ASM_SPEC): Likewise. Use %(endian_spec). - -2000-08-21 Joseph S. Myers - - * c-tree.h (flag_hosted): Move declaration from here... - * c-common.h (flag_hosted): ... to here. - (flag_noniso_default_format_attributes): New declaration. - * c-decl.c (flag_noniso_default_format_attributes): New variable. - (c_decode_option): Set it appropriately for options choosing - language standard variant. - * c-common.c (init_function_format_info): Only provide default - format attributes if flag_hosted. Only provide the gettext - formats if flag_noniso_default_format_attributes. Update - comments. - (check_format_info): Disable treatment of %a as a scanf flag in - C99 mode. - -2000-08-21 Joseph S. Myers - - * c-common.c (scan_char_table): Add 'w' to flags for all formats - except 'n'. - (check_format_info): Set 'wide' for scanf format widths. Warn for - a zero scanf width. Make the check for writing into a constant - object at the first level of indirection; at later levels, warn if - any type qualifiers are encountered. - -Mon Aug 21 07:41:12 2000 Jeffrey A Law (law@cygnus.com) - - * reload.c (reload_inner_reg_of_subreg): New function broken out of - push_reload. - (push_reload): Use reload_inner_reg_of_subreg. - (combine_reloads): Do not combine reloads if the input reload - is a SUBREG in which the inner part will need reloading. - - * global.c (global_alloc): Avoid passing dumpfile argument to - reload routines. - * toplev.c (rest_of_compilation): Likewise. - * reload.h (reload): Remove dumpfile argument. Callers changed. - (debug_reload, debug_reload_to_stream): Move prototypes here. - * rtl.h (reload): Remove dumpfile argument. - * reload.c (debug_reload): Remove prototype. - (debug_reload_to_stream): Likewise. - * reload1.c: Avoid passing dumpfile around, rely on rtl_dump_file - instead. - -2000-08-21 Gabriel Dos Reis - - * diagnostic.c (context_as_prefix): Export. - (need_error_newline): Remove. - (lang_diagnostic_starter, lang_diagnostic_finalizer): New objects. - (error_module_changed, record_last_error_module, - error_function_changed, record_last_error_function): New functions. - (initialize_diagnostics): Default initialize - lang_diagnostic_starter, lang_diagnostic_finalizer. - (init_output_buffer): Tweak. - (file_name_as_prefix): New function. - (announce_function, default_print_error_function, - report_error_function, set_diagnostic_context): Tweak. - -2000-08-21 Richard Earnshaw - - * flow.c (init_propagate_block_info): Handle SUBREG in a jump - condition expression. - -2000-08-20 Richard Henderson - - * flow.c (merge_blocks_nomove): Don't seek back past the bb note. - -2000-08-20 Zack Weinberg - - * cppinit.c (cpp_init): Set global flag when called. - (cpp_reader_init): Bomb out if cpp_init hasn't been called. - -Sun Aug 20 01:41:35 2000 Dennis Chernoivanov - - * cpplex.c (cpp_scan_buffer): Move `output_line_command' just - before `process_directive' so that newlines won't be missed - for directives. - (cpp_printf): Increment `print->lineno' when newline is emitted. - - * cppmain.c (cb_ident): Likewise. - (cb_define): Likewise. - (cb_undef): Likewise. - (cb_include): Likewise. - (cb_def_pragma): Likewise. - (dump_macros_helper): Likewise. - -2000-08-20 Richard Henderson - - * config/ia64/ia64.c (emit_insn_group_barriers): Stop if ar.lc - assigned before a loop. - - * config/ia64/ia64.md (ashlsi3): Zero extend the shift count. - (ashrsi3, lshrsi3): Likewise. - -2000-08-20 Gabriel Dos Reis - - * c-lang.c: #include diagnostic.h - (c_tree_printer): New function. - (lang_init): Initialize lang_printer. - - * Makefile.in (c-lang.o): Depends on diagnostic.h - -2000-08-20 Gabriel Dos Reis - - * c-errors.c (pedwarn_c99): Adjust call to report_diagnostic. - - * diagnostic.c (default_diagnostic_starter, - default_diagnostic_finalizer): New functions. - (diagnostic_for_asm, diagnostic_for_decl): Tweak. - (pedwarn, pedwarn_with_file_and_line, error, - error_with_file_and_line, fatal, warning, - warning_with_file_and_line): Adjust call to report_diagnostic. - (report_diagnostic): Rework. - (set_diagnostic_context): New function. - - * diagnostic.h (struct diagnostic_context): New data structure. - (diagnostic_message, diagnostic_argument_list, - diagnostic_file_location, diagnostic_line_location, - diagnostic_is_warning, diagnostic_starter, diagnostic_finalizer, - diagnostic_finalizer, diagnostic_auxiliary_data): New macros. - (set_diagnostic_context): Declare. - (report_diagnostic): Change prototype. - -Sun 20-Aug-2000 09:25:45 BST Neil Booth - - * fix-header.c (main): Initialize cpplib. - -2000-08-19 Michael Meissner - - * ifcvt.c (find_if_block): Do not assume that a THEN block has any - instructions in it before checking for indirect jumps. - - * ifcvt.c (find_if_block): Do not consider a THEN block that ends - in an indirect jump as a potential for conditional execution. - - * d30v.h (d30v_init_expanders): Don't declare here. - * d30v-protos.h (d30v_init_expanders): Declare here with a valid - prototype. - -Sat 19-Aug-2000 21:11:45 BST Neil Booth - - * cpp.texi: Add @section for assertions. - -Sat Aug 19 12:37:08 EDT 2000 John Wehle (john@feith.com) - - * loop.c (scan_loop): Use CONST_CALL_P instead of - checking for REG_LIBCALL / REG_RETVAL. - -Sat Aug 19 09:18:47 2000 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload_as_needed): Accept dumpfile argument, - pass it to emit_reload_insns. - (emit_reload_insns): Add new dumpfile argument. If non-null - then dump the reloads for each insn into the dumpfile. - (reload): Pass dumpfile to reload_as_needed. - - * invoke.texi: Clean up linux-gnu vs linux comments. - -2000-08-19 Richard Henderson - - * config/ia64/ia64.c (reg_or_5bit_operand): New. - (ia64_depz_field_mask): New. - * config/ia64/ia64.h (CONSTRAINT_OK_FOR_R): New. - (PREDICATE_CODES): Update. - * config/ia64/ia64.md: Update commentary. - (depz_internal): New. - (ashlsi3): Implement directly. - (ashrsi3, lshrsi3): Simplify; rely on extv and extzv for constants. - (ashldi3): Use shladd. - * config/ia64/ia64-protos.h: Update. - -2000-08-18 Zack Weinberg - - * toplev.c (independent_decode_option): Always process -g. - Remove third argument, now unused. Adjust caller to match. - -2000-08-18 Richard Henderson - - * combine.c (make_compound_operation): Break after creating - the extraction. - -2000-08-18 Zack Weinberg - - * cpplib.c (cpp_register_pragma_space): Just return if the - namespace is already registered. - -2000-08-18 Ray Essick & Nick Clifton - - * config/mcore/mcore.md (rotlsi3): Allow allow rotations by a - constant amount. Do not generate ROTL instruction. - -Fri Aug 18 16:22:20 2000 Alexandre Oliva - - * config/sh/elf.h: Do not include sh/sh.h. - * config/sh/rtems.h: Likewise. - * config/sh/rtemself.h: Do not include sh/elf.h. - * configure.in: Get them included with `tm_file's. - * configure: Rebuilt. - - * config/sh/sh.md (fpu_switch0, fpu_switch1): Simplify. - * config/sh/sh.c (fpscr_set_from_mem): Use them. - -Fri Aug 18 14:23:18 2000 Richard Kenner - - * stor-layout.c (compute_record_type): Don't use mode of single - field as mode of record if not integer mode of same type. - - * regmove.c (perhaps_ends_bb_p): New function. - (optimize_reg_copy_1, optimize_reg_copy_2): Call it. - (optimize_reg_copy_3, fixup_match_2, regmove_optimize): Likewise. - (fixup_match_1): Likewise. - (fixup_match_1, combine_stack_adjustments_for_block): Add casts to - avoid signed/unsigned warnings. - - * function.c (fixup_var_refs_1, case MEM): Update CODE after - updating X. - -Fri 18-Aug-2000 18:33:45 BST Neil Booth - - * cpphash.h: Use HAVE_DESIGNATED_INITIALIZERS. - (_cpp_trigraph_map): Declaration moved from cpplex.c - - * cppinit.c: Define _cpp_trigraph_map. Use UCHAR_MAX + 1 - instead of 256. Use consistent test for designated initializers. - (cpp_init): Initialize trigraph_map. - (initialize_standard_includes, parse_option): Use memcmp - instead of strncmp. - - * cpplex.c (init_trigraph_map): Remove. - (trigraph_ok, trigraph_replace, lex_line): Refer to - _cpp_trigraph_map. - - * cpplib.c (str_match, WARNING, ERROR, ICE): Delete. - (do_unassert): Remove unused "next" local. - - * system.h (HAVE_DESIGNATED_INITIALIZERS): New prototype. - -2000-08-18 Emmanuel Marty - - * arm/lib1funcs.asm (_umodsi3 THUMB VARIANT): Restore deleted return - insn. - -2000-08-17 Richard Henderson - - * config/ia64/ia64.c (spill_restore_mem): Handle emitting - the first insn in a sequence. - -Thu Aug 17 22:40:05 EDT 2000 John Wehle (john@feith.com) - - * alias.c (true_dependence, write_dependence_p): A read - involving a label_ref or the constant pool doesn't create - a dependency. - - * rtl.h (unchanging): Improve documentation. - -2000-08-17 Rodney Brown - - * cse.c (insert_regs): Remove unused `regno'. - -2000-08-17 Neil Booth - - * (cppinit.c) merge_include_chains: Use remove_dup_dir, - remove_dup_dirs. If qtail == brack, remove brack not - qtail. - (remove_dup_dir, remove_dup_dirs): New functions. - -2000-08-17 Neil Booth - - * cppinit.c (cpp_cleanup): Free include dir chains. - * cpplib.c (do_undef): Let _cpp_free_definition make the node void. - (do_unassert): Free the assert with _cpp_free_definition. - * cppmacro.c (_cpp_free_definition): Free memory allocated for - assertions. Make the node a T_VOID node. - -2000-08-17 Neil Booth - - * cppinit.c (path_include, append_include_chain): - Remove 2nd parameter (struct cpp_pending *). - (path_include, initialize_standard_includes, cpp_handle_option): - Update callers appropriately. - (cpp_handle_option): Use pend. - -2000-08-17 Neil Booth - - * cppinit.c (sort_options): Remove, put functionality in - cpp_init. - (cpp_init): New. - (initialize_builtins): Free memory. - (cpp_start_read): Move init_IStable to cpp_init. - - * cpplib.h (cpp_init): New prototype. - * cppmain.c (main): Call cpp_init. - -Thu Aug 17 13:20:32 EDT 2000 John Wehle (john@feith.com) - - * rtlanal.c (rtx_unstable_p): Use CONSTANT_P. - (rtx_unstable_p, rtx_varies_p): Process vectors. - -2000-08-16 Niibe Yutaka , Kaz Kojima - - * config/sh/lib1funcs.asm (GLOBAL): Define. Use for all - references to GLOBAL symbols. Use LOCAL where appropriate. - -2000-08-16 Kaveh R. Ghazi - - * configure.in (*-ibm-aix4.[12]*): Delete test for gnu ld. Always - use t-aix41 when host == target. - -2000-08-16 Richard Henderson - - * reload.c (push_secondary_reload): Revert last change. - If we use a reload_in/out pattern, make the when the same - as the primary reload. - (find_reloads): Likewise. - -2000-08-16 Manfred Hollstein - - * configure.in (libstdcxx-v3): Fix test. - * configure: Regenerate. - -Wed Aug 16 08:10:32 2000 Richard Kenner - - * calls.c (calls_function_1, expand_call): Only test - TYPE_RETURNS_STACK_DEPRESSED for FUNCTION_TYPE. - * function.c (thread_prologue_and_epilogue_insns): Likewise. - -2000-08-16 Richard Henderson - - * combine.c (simplify_shift_const): Revert previous two - changes. If SHIFT_COUNT_TRUNCATED, crop the shift count - before the main loop. - -2000-08-15 Richard Henderson - - * combine.c (simplify_shift_const): Bound shift count when - combining shifts. - -Tue Aug 15 17:33:05 2000 Richard Kenner - - * calls.c (ECF_SP_DEPRESSED): New macro. - (calls_function_1): Treat calling sp-depressed function as alloca. - (emit_call_1): Don't adjust SP if calling sp-depressed function. - (expand_call): Set ECF_SP_DEPRESSED if TYPE_RETURNS_STACK_DEPRESSED. - If sp-depressed, ensure block saves and restores SP. - * fold-const.c (extract_muldiv): Only check TYPE_IS_SIZETYPE - for INTEGER_TYPE. - * function.c (keep_stack_depressed): New function. - (thread_prologue_and_epilogue_insns): Call it. - * print-tree.c (print_node): Use HOST_WIDE_INT_PRINT_UNSIGNED - to print DECL_OFFSET_ALIGN. - Print no-force-blk and transparent-union flags properly. - * stmt.c (expand_goto_internal): Don't restore stack if last block - and function returns with sp depressed. - (fixup_gotos): Likewise. - (save_stack_pointer): New function, from code in expand_decl. - (expand_decl): Call new function. - * tree.h (TYPE_IS_SIZETYPE): Call INTEGER_TYPE_CHECK. - (TYPE_RETURNS_STACK_DEPRESSED): New macro. - (save_stack_pointer): New declaration. - - * diagnostic.c (fatal_function): New variable. - (set_fatal_function): New function. - (fatal): Call it. - * diagnostic.h (set_fatal_function): New declaration. - -2000-08-15 William Cohen - - * config/sh/elf.h (DWARF2_DEBUGGING_INFO): Defined. - (PREFERRED_DEBUGGING_TYPE): Set to dwarf2 info. - (DWARF2_ASM_LINE_DEBUG_INFO): Defined. - -2000-08-15 Richard Henderson - - * flow.c (mark_used_reg): Set reg_cond_reg appropriately. - -2000-08-15 Richard Earnshaw - - * arm.c (arm_function_ok_for_sibcall): New function. - * arm.h (FUNCTION_OK_FOR_SIBCALL): Define. - * arm.md (call expanders): Don't check here for calls that can't - be sibling calls. - -2000-08-15 Richard Earnshaw - - * arm.md (splits generating cond_exec): Disable. - -2000-08-15 Richard Earnshaw - - * arm/linux-elf.h (text_section): Delete declaration. - -2000-08-15 Richard Earnshaw - - ARM support for unordered FP operations. - * arm-protos.h (arm_comparison_operator): Declare. - * arm.c (arm_comparison_operator): New function. - (arm_select_cc_mode): Add unordered comparison codes. - (get_arm_condition_code): Likewise. - (arm_final_prescan_insn): Can't handle unordered jumps that can't - be done in one insn. - * arm.h (PREDICATE_CODES): Add arm_comparison_operator. - * arm.md (all uses of comparison_operator): Replace with - arm_comparison_operator. - (bunordered, bordered, bugt, bunlt, bunge, bunle, buneq, bltgt): New - expands. - (arm_buneq, arm_bltgt, arm_buneq_reversed, arm_bltgt_reveresed): New - patterns. - -Tue Aug 15 00:36:36 2000 Ovidiu Predescu - - * gthr-posix.h: Conditionally include ; include - from libobjc/. - -2000-08-14 Richard Henderson - - * config/i386/i386.c (legitimize_pic_address): Use Pmode - for all CONSTs. - -2000-08-14 Richard Henderson - - * configure.in (ia64-*): Set float_format for i386 long double. - - * real.c (GET_REAL): Treat 128-bit INTEL_EXTENDED_IEEE_FORMAT - as we would for i386 XFmode. - (PUT_REAL): Likewise. - (endian, ereal_atof, real_value_truncate): Likewise. - (ereal_isneg, toe64, etens, make_nan): Likewise. - * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Likewise. - - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.c (general_tfmode_operand): New. - (destination_tfmode_operand): New. - (tfreg_or_fp01_operand): New. - (ia64_split_timode): New. - (spill_tfmode_operand): New. - (ia64_expand_prologue): Use TFmode not XFmode. - (ia64_expand_epilogue): Likewise. - (ia64_function_arg): Likewise. - (ia64_function_arg_advance): Likewise. - (ia64_return_in_memory): Likewise. - (ia64_function_value): Likewise. - (ia64_print_operand): Likewise. - (ia64_register_move_cost): Set GR<->FR to 5. - (ia64_secondary_reload_class): Get GR for TImode memory op. - * config/ia64/ia64.h (ROUND_TYPE_SIZE): Remove. - (ROUND_TYPE_ALIGN): Remove. - (LONG_DOUBLE_TYPE_SIZE): Set to 128. - (INTEL_EXTENDED_IEEE_FORMAT): Define. - (HARD_REGNO_NREGS): Use TFmode, not XFmode. - (HARD_REGNO_MODE_OK): Likewise. Disallow TImode in FRs. - (MODES_TIEABLE_P): Use TFmode, not XFmode. - (CLASS_MAX_NREGS): Likewise. - (ASM_OUTPUT_LONG_DOUBLE): Output by 4 byte hunks. - (PREDICATE_CODES): Update. - * config/ia64/ia64.md (movti): New. - (movti_internal): Use a clobber for memory alternatives. - (reload_inti, reload_outti): New. - (movsfcc_astep): Predicate properly. - (movdfcc_astep): Likewise. - (movxf): Remove. - (movtf): New. - (extendsftf2, extenddftf2): New. - (trunctfsf2, trunctfdf2): New. - (floatditf2, fix_trunctfdi2): New. - (floatunsditf2, fixuns_trunctfdi2): New. - (addtf3, subtf3, multf3, abstf2): New. - (negtf2, nabstf2, mintf3, maxtf3): New. - (maddtf3, msubtf3, nmultf3, nmaddtf3): New. - (cmptf): New. - (fr_spill): Use TFmode, not XFmode. - (fr_restore): Likewise. - * config/ia64/lib1funcs.asm (__divtf3): New. - * config/ia64/t-ia64 (LIB1ASMFUNCS): Add it. - -2000-08-14 Kaveh R. Ghazi - - * cse.c (fold_rtx): Avoid empty body in an if-statement. - - * doloop.c (doloop_iterations_max, doloop_modify): Avoid using the - `U' integer constant suffix. - - * dwarf2out.c (add_subscript_info): Avoid empty body in an - else-statement. - - * sparc/sol2.h (__enable_execute_stack): Prototype. - -2000-08-14 David Edelsohn - - * collect2.c: Remove use of AIX import file. - - * longlong.h: Test ARCH_PWR not ARCH_POWER. - - * rs6000.c (print_operand, case 'E'): Add else. - -2000-08-14 Richard Henderson - - * config/ia64/ia64.md (movdi): Delay calling ia64_expand_load_address. - (movdi_symbolic): New. - -2000-08-14 Jim Wilson - - * config/ia64/ia64.h (ASM_SPEC): Pass -mconstant-gp and -mauto-pic - to GNU as. For Intel as, pass -M const_gp and -M no_plabel. - * config/ia64/linux.h (ASM_SPEC): Pass -mconstant-gp and -mauto-pic - to GNU as. - -2000-08-14 Richard Henderson - - * expr.c (emit_group_load): Don't force constants into registers. - Special case source already in the correct mode. - -2000-08-14 Zack Weinberg - - * configure.in: Accept *-*-linux* not just *-*-linux-gnu*. - * fixinc/inclhack.def: Likewise. - * fixinc/mkfixinc.sh: Likewise. - * configure: Regenerate. - * fixinc/fixincl.x: Regenerate. - * install.texi: Document equivalence of linux and linux-gnu. - -Mon Aug 14 18:51:44 2000 J"orn Rennecke - - * cse.c (insert_regs): Also in REG case: When finding an invalid - value, and we make a new quantity, make sure that it won't be - mistaken by for a valid one by mention_regs. - -2000-08-13 Ralf Gütlein - - * h8300.md: Remove obsolete peepholes. - -2000-08-13 Kazu Hirata - - * invoke.texi (H8/300 Options): Fix typos. - * config/h8300.c: Fix formatting. - * config/h8300.h: Fix comment typos. - (OVERRIDE_OPTIONS): Fix formatting. - - * function.c: Fix formatting. - - * cse.c: Fix formatting. - -2000-08-13 Geoff Keating - - * flow.c (attempt_auto_inc): Remove unused variable `bb'. - (attempt_auto_inc): Suppress parentheses warning. - * function.c (put_reg_into_stack): Remove unused variable `unsigned_p'. - * loop.c (load_mems): Remove `u' suffix in two places. - * config/rs6000/rs6000.c: Remove unnecessary `u' suffixes from - hex constants. - * config/rs6000/rs6000.h: Likewise. - * config/rs6000/sol-c0.c: Prototype some functions. Remove the - __eabi dummy routine. - * config/rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Remove unused - variable `buf_ptr'. - - * config/rs6000/rs6000.c (rs6000_select_section): Rewrite to - not put stuff in .sdata unnecessarily. - (rs6000_unique_section): New function. - * config/rs6000/rs6000-protos.h: Add rs6000_unique_section. - * config/rs6000/sysv4.h (UNIQUE_SECTION): Define. - - * c-typeck.c (build_array_ref): Don't complain about non-lvalue - arrays in C99. Don't try to look at DECL_REGISTER of a - COMPONENT_REF. Don't complain twice about the same error. - - * fixinc/inclhack.def (aix_pthread): New fix. - (aix_sysmachine): New fix. - * fixinc/fixincl.x: Regenerate. - - * expr.c (expand_expr): Call convert_modes when turning a large - multiply into a small one. - -2000-08-12 Geoff Keating - - * tree.h (DECL_OFFSET_ALIGN): Make the off_align field of - the tree structure an exponent rather than an explicit alignment - so it doesn't overflow. - (SET_DECL_OFFSET_ALIGN): New macro. - * stor-layout.c (place_union_field): Use SET_DECL_OFFSET_ALIGN - rather than DECL_OFFSET_ALIGN. - (place_field): Likewise. - * expmed.c (store_bit_field): Abort on align==0 to avoid - antisocial machine behavior. - -2000-08-12 Richard Henderson - - * sibcall.c (uses_addressof): Accept both addressof and - current_function_internal_arg_pointer inside a mem. - (optimize_sibling_and_tail_recursive_call): Fail tail recursion - if current_function_uses_addressof. - * stmt.c (expand_return): Kill tail recursion and HAVE_return - optimizations. - -2000-08-11 Richard Henderson - - * config/ia64/ia64.md (addsi3): Remove expander. - (subsi3, mulsi3, negsi2, one_cmplsi2): Likewise. - (*addsi3_shladd): New. - -2000-08-11 Richard Henderson - - * config/ia64/ia64.c (do_spill): Pass cfa offset to move expander. - (do_restore): Likewise. - (gen_movdi_x, gen_fr_spill_x, gen_fr_restore_x): New. - (ia64_expand_prologue, ia64_expand_epilogue): Use them. - (rtx_needs_barrier): Track actual bit manipulation for - ar.unat moves, gr_spill, and gr_restore. - (emit_insn_group_barriers): Special case gr_spill/gr_restore. - (process_set): Don't handle varargs spills. - * config/ia64/ia64.md (gr_spill): Accept cfa offset. Emit - .mem.offset here instead of in process_set. - (gr_restore): Likewise. - -2000-08-11 Richard Henderson - - * config/ia64/ia64.h (PROMOTE_MODE): Only extend to SImode. - -2000-08-11 Mark Elbrecht - - * gcc.texi (The Configuration File): Document - COLLECT2_HOST_INITIALIZATION, GCC_DRIVER_HOST_INITIALIZATION, and - UPDATE_PATH_HOST_CANONICALIZATION. - -2000-08-11 Kaveh R. Ghazi - - * c-parse.in (cast_expr): Avoid -Wstrict-prototype warnings for - unprototyped function pointer casts on integer constants. - -2000-08-11 Laurynas Biveinis - - * fixproto: Recognize DOS paths with drive letters as absolute paths. - -2000-08-11 Nathan Sidwell - - * extend.texi (Volatiles): Fix typos. - -2000-08-11 Kazu Hirata - - * flow.c: Fix formatting. - -2000-08-11 Richard Henderson - - * reload.c (push_secondary_reload): When invoking a reload_{in,out} - pattern, always allocate a tertiary scratch register. - - * config/alpha/alpha.md (reload_inqi): Use a DImode scratch. - (reload_inhi): Likewise. - -2000-08-11 Richard Henderson - - * function.c (put_reg_into_stack): Allow type to be NULL. - (schedule_fixup_var_refs): Likewise. - (gen_mem_addressof): Allow decl to be NULL. - (put_addressof_into_stack): Likewise. - - * flow.c (merge_blocks_nomove): Be more careful about - locating the beginning of block A. - - * combine.c (simplify_shift_const): Obey SHIFT_COUNT_TRUNCATED. - -Thu Aug 10 22:47:09 2000 Ovidiu Predescu - - * configure.in: - * configure: - * gthr-posix.h: - * config.in: Reverted the check for . - -2000-08-10 Chris Demetriou - - * mips/elf.h (CTOR_SECTION_NAME, DTOR_SECTION_NAME): New - macros define the name of CTOR and DTOR sections. - (CTOR_LIST_BEGIN, CTOR_LIST_END, DTOR_LIST_BEGIN, - DTOR_LIST_END): Change to use attributes to specify - sections. - * mips/elf64.h (CTOR_SECTION_NAME, DTOR_SECTION_NAME, - (CTOR_LIST_BEGIN, CTOR_LIST_END, DTOR_LIST_BEGIN, - DTOR_LIST_END): Same as in mips/elf.h. - -2000-08-10 Drew Moseley - - * config/mn10300/mn10300.h: Added no-crt0 option for explicitly - disabling just crt0.o. - -2000-08-10 Richard Earnshaw & Nick Clifton - - * arm.h (CPP_SPEC): Use sub-spec cpp_interwork. - (CPP_INTERWORK_SPEC, CPP_INTERWORK_DEFAULT_SPEC): New sub-specs. - (EXTRA_SPECS): Add them. - * arm/lib1funcs.asm: Support builds for interworking. - Use macros to eliminate duplicated pieces of code. - -2000-08-10 Kazu Hirata - - * h8300.c (expand_a_rotate): New. - (emit_a_rotate): Likewise. - (h8300_adjust_insn_length): Add support for the rotate insns. - * h8300.md (rotlqi3): New. - (*rotlqi3_1): Likewise. - (rotlhi3): Likewise. - (*rotlhi3_1): Likewise. - (rotlhi3): Likewise. - (*rotlhi3_1): Likewise. - * h8300-proto.h: Add prototypes for expand_a_rotate and - emit_a_rotate. - - * h8300.c: Fix comment typos. - (dosize): Declare the variable amount as unsigned. - (get_shift_alg): Fix a comparison between signed and unsigned. - (emit_a_shift): Likewise. - (h8300_adjust_insn_length): Simplify the code. - - * c-decl.c: Fix formatting. - -2000-08-10 Kaveh R. Ghazi - - * c-lex.c (parse_float, yylex): For -Wtraditional, issue a - warning about non-traditional numeric constant suffixes. - - * cppexp.c (parse_number): Likewise. - - * invoke.texi: (-Wtraditional): Document new behavior. - -Thu Aug 10 00:11:04 2000 Ovidiu Predescu - - * gthr-posix.h: Include auto-host.h. Conditionally include - . - * configure.in: Check for the header file. - * config.in: Added define for HAVE_SCHED_H. - -2000-08-09 Kaveh R. Ghazi - - * c-typeck.c (process_init_element): For -Wtraditional, warn about - initialization of unions. - - * invoke.texi (-Wtraditional): Document new behavior. - -2000-08-09 Zack Weinberg - - * configure.in (--enable-c-cpplib): Uncomment. Use AC_DEFINE - instead of extra_c_flags. - (--enable-c-mbchar): Use AC_DEFINE instead of extra_c_flags. - * configure: Regenerate. - * config.in: Regenerate. - - * cpperror.c (cpp_type2name): New function. - * cpplex.c (lex_line): If we issued an error for an invalid - preprocessing directive, discard that logical line. - * cpplib.c (do_line): Call a hook function if the current file - is renamed by #line. - (do_ident): Pass the contents of the string, not the entire - token, to the callback function. - * cpplib.h (CPP_LAST_PUNCTUATOR): New #define. - (cb.rename_file): New hook function. - (cb.ident): Adjust prototype. - (cpp_type2name): Prototype. - * cppmacro.c (dump_macro_args): Correct precedence lossage. - - * cppmain.c (cb_ident): Update for changed interface. - (cb_rename_file): New function. - (main): Set rename callback. - -2000-08-09 Alexandre Oliva - - * caller-save.c (mark_referenced_regs): Mark partially-overwritten - multi-word registers. - -2000-08-08 Joseph S. Myers - - * c-common.c (combine_strings, check_format_info): Refer to ISO C - or ISO C89 instead of ANSI C. - * c-decl.c (grokdeclarator, xref_tag, finish_struct, - build_enumerator, do_case): Likewise. - * c-lex.c (parse_float, yylex): Likewise. - * c-parse.in: Likewise. - * c-typeck.c (common_type, build_array_ref, build_binary_op, - build_unary_op, pedantic_lvalue_warning, build_conditional_expr, - build_c_cast, convert_for_assignment, set_init_index, - set_init_label, c_expand_start_case): Likewise. - * toplev.c (documented_lang_options, display_help): Likewise. - -2000-08-08 Kazu Hirata - - * h8300.c: Fix formatting. - * h8300.h: Likewise. - * h8300.md: Likewise. - (movsi_h8300hs): Fix formatting of the resulting assembly code. - - * reload1.c: Fix formatting. - -2000-08-08 Rodney Brown - - * alpha/alpha.c (alpha_emit_xfloating_libcall): - Use GEN_CALL_VALUE define. - * alpha/alpha.md (untyped_call): Use GEN_CALL define. - * clipper/clipper.md (untyped_call): Likewise. - * dsp16xx/dsp16xx.md (untyped_call): Likewise. - * fx80/fx80.md (untyped_call): Likewise. - * mips/mips.md (untyped_call): Likewise. - * ns32k/ns32k.md (untyped_call): Likewise. - * pa/pa.md (untyped_call): Likewise. - * romp/romp.md (untyped_call): Likewise. - * sparc/sparc.md (untyped_call): Likewise. - -2000-08-08 Jason Eckhardt - - * config/i860/i860.c (singlemove_string): Do not generate assembler - pseudo instructions that must be expanded (that is, with signed - constants larger than 16 bits). - -2000-08-08 Richard Henderson - - * flow.c (life_analysis): Only turn off PROP_LOG_LINKS and - PROP_AUTOINC at -O0. Don't collect alias info at -O0. - (init_propagate_block_info): Don't kill memory stores at -O0. - (mark_set_1, mark_used_regs): Likewise. - -2000-08-08 David Edelsohn - - * rs6000.c (optimization_options): Decorate 'level' as - ATTRIBUTE_UNUSED. - (mask64_operand): Remove sign-extend thinko. - (rldic_operand): New function. - (load_multiple_operation): regno's are unsigned ints. - (store_multiple_operation): Likewise. - (lmw_operation): Likewise. - (stmw_operation): Likewise. - (includes_lshift_p): shift_mask is unsigned int. - (includes_lshift64_p): New function. - (addrs_ok_for_quad_peep): unsigned int reg1. - (print_operand): Consistently add "else" after - output_operand_lossage(). - (print_operand, case 'b'): Fold in case 'W'. - (print_operand, case 'W'): Print rldic MB value. - (output_epilogue): Update Objective-C language string. - (output_toc): unsigned HOST_WIDE_INT low, compare unsigned. - * rs6000.h (PREDICATE_CODES): Add rldic_operand. - * rs6000.md (ashldi3): Add rldic instruction. - (iordi3, xordi3): Remove redundant "else if CONST_DOUBLE". - (cmpsi_internal2, cmpdi_interal2): Use 'b' output template - modifier. - -2000-08-08 Richard Henderson - - * config/ia64/ia64-protos.h: Remove duplicates. Update - for massive code rearrangements. - * config/ia64/ia64.c (ia64_arpfs_regno): Remove. - (ia64_rp_regno, ia64_fp_regno, ia64_input_regs): Remove. - (ia64_local_regs, ia64_need_regstk): Remove. - (ar_ccv_reg_operand): New. - (ia64_gp_save_reg): New. - (struct ia64_frame_info): Combine most of the size elements; - add new gr save elements. - (find_gr_spill): New. - (next_scratch_gr_reg): New. - (mark_reg_gr_used_mask): New. - (ia64_compute_frame_size): Rewrite. Allocate special AR regs - to GR backing store regs when possible. - (ia64_initial_elimination_offset): New. - (ia64_rap_fp_offset): Remove. - (save_restore_insns): Remove. - (setup_spill_pointers): New. - (finish_spill_pointers): New. - (spill_restore_mem): New. - (do_spill, do_restore): New. - (ia64_expand_prologue): Rewrite to use them. - (ia64_expand_epilogue): Likewise. - (ia64_direct_return): Update for current_frame_info changes. - (ia64_function_prologue): Simplify .prologue emission. Emit - .spill when needed. - (ia64_setup_incoming_varargs): Don't ever emit rtl. - (ia64_dbx_register_number): New. - (ia64_initialize_trampoline): New. - (ia64_secondary_reload_class): Request GR_REGS for integer - arithmetic destined for FR_REGS. - (ia64_init_machine_status): Don't reset return_address_pointer_rtx. - (ia64_mark_machine_status): Mark ia64_gp_save. - (rws_access_regno): Rename from rws_access_reg; don't treat - predicates specially. - (rws_access_reg): New. Update all callers. - (rtx_needs_barrier): Remove dead unspecs. - (ia64_epilogue_uses): Mark ar.pfs and ar.unat live on exit. - (ia64_encode_section_info): Silence signed/unsigned warnings. - (spill_offset, sp_offset, spill_offset_emitted): Remove. - (tmp_reg, tmp_saved): Remove. - (process_set): Rewrite to expect complicated bits via - REG_FRAME_RELATED_EXPR. - (ia64_expand_fetch_and_op): Use emit_move_insn; be explicit - in the use of ar.ccv; never set RTX_UNCHANGING_P. - (ia64_expand_op_and_fetch): Likewise. - (ia64_expand_compare_and_swap): Likewise. - (ia64_expand_builtin): Likewise. - * config/ia64/ia64.h (AR_UNAT_REGNUM): New. - (FIRST_PSEUDO_REGISTER): Update. - (AR_M_REGNO_P): Update. - (FIXED_REGS): Don't mark three local registers as used. - (EXTRA_CC_MODES): New. - (SELECT_CC_MODE): New. - (HARD_REGNO_NREGS): Allow DImode in p0; handle CCImode. - (HARD_REGNO_MODE_OK): Disallow CCImode from non-predicates. - (FRAME_GROWS_DOWNWARD): Unset. - (STARTING_FRAME_OFFSET): Zero. - (ELIMINABLE_REGS): Eliminate from the soft to hard frame pointer. - (INITIAL_ELIMINATION_OFFSET): Defer to out of line function. - (HARD_FRAME_POINTER_REGNUM): New. - (CAN_DEBUG_WITHOUT_FP): Define. - (TRAMPOLINE_TEMPLATE): Remove. - (TRAMPOLINE_SIZE): Lower to 32. - (TRAMPOLINE_ALIGNMENT): Lower to 64. - (INITIALIZE_TRAMPOLINE): Defer to out of line function. - (PREDICATE_CODES): Update. - (struct machine_function): Add ia64_gp_save. - * config/ia64/ia64.md: Purge unused unspecs. - (movsi patterns): Allow moves to/from AR_M_REGS. - (movdi patterns): Allow moves to/from p0. - (call patterns): Move most setjmp hackery to ia64_gp_save_reg. - (gr_spill, gr_restore): Indicate ar.unat read/written. - (nonlocal_goto): Don't pass old frame_pointer. - (nonlocal_goto_receiver): Remove. - (exception_receiver): New. - (builtin_setjmp_setup): New. - (builtin_setjmp_receiver): New. - * config/ia64/lib1funcs.asm (__ia64_save_stack_nonlocal): Bundle. - (__ia64_nonlocal_goto): Bundle. Don't kill r7. - (__ia64_restore_stack_nonlocal): Likewise. - (__ia64_trampoline): New. - * config/ia64/sysv4.h (DBX_REGISTER_NUMBER): Defer to out of line - function. - * config/ia64/t-ia64 (LIB1ASMFUNCS): Add __trampoline. - -2000-08-08 Richard Henderson - - * frame.h (ia64_frame_state): Add my_psp. - * libgcc2.c (ia64_throw_helper): Add throw_sp argument. - (__throw): Pass it in. Don't clobber r7. - * config/ia64/frame-ia64.c (init_ia64_reg_loc): Mark inline. - (execute_one_ia64_descriptor) [mem_stack_v]: Sets psp.when - and nothing to do with sp. - (normalize_reg_loc): Use frame->my_psp. - (frame_translate): Handle frame-pointer-less functions. Set - spill_base correctly, in absence of being told. - (__build_ia64_frame_state): New sp argument. Fill in frame->my_sp. - (__ia64_backtrace_helper): New sp argument. Use - builtin_return_address instead of label addresses. - (print_record) [mem_stack_v]: No size member. - -2000-08-08 Richard Henderson - - * regclass.c (choose_hard_reg_mode): Iterate over all CC modes. - -2000-08-08 Richard Henderson - - * tm.texi (LOCAL_REGNO): Document. - * flow.c (LOCAL_REGNO, EPILOGUE_USES): Provide default. - (mark_regs_live_at_end): Don't mark LOCAL_REGNO registers. - * reload1.c (reload): Likewise when considering nonlocal labels. - - * config/ia64/ia64.h (LOCAL_REGNO): New. - * config/sparc/sparc.h (LOCAL_REGNO): New. - -2000-08-08 Joseph S. Myers - - * c-lex.c (yylex): Don't allow integer suffixes 'LUL', 'Ll', 'lL'. - -2000-08-07 Nick Clifton - - * config/mips/mips.c: Fix compile time warning messages. - * config/mips/mips-protos.h: Add prototype for equality_op. - - * mn10300.h (TARGET_SWITCHES): Document `-mam33'. - -2000-08-07 Graham Stott - - * mn10300.md: Use nonimmediate_operand instead of general_operand - on output operands. - - * mn10300.h (PREFERRED_RELOAD_CLASS): Limit memory reloads. - -2000-08-07 Alexandre Oliva - - * sh.h (EXTRA_CONSTRAINT_Q): Adjust to GNU Coding Standards. - * sh.c (expand_block_move): Break long lines. - (expand_ashiftrt, fpscr_set_from_mem): Likewise. - * sh.md (mulsi3): Likewise. - (movdi): Adjust spacing. - -2000-08-07 Richard Henderson - - * expmed.c (store_bit_field): Don't require MEM_IN_STRUCT_P. - * expr.c (emit_group_store): Don't set it. - -2000-08-07 Kazu Hirata - - * invoke.texi (Options for Debugging Your Program or GCC): Remove - duplicate entries for 'w' and 'z'. - - * flow.c: Fix a comment typo. - -Sun Aug 6 23:47:35 2000 Ovidiu Predescu - - * c-parse.in: Changed the language string for Objective-C to "GNU - Objective-C". - -Sun Aug 6 11:54:03 2000 Ovidiu Predescu - - * gthr-posix.h: Integrated Chris Ball's changes - to improve the Posix thread support for Objective-C. - -2000-08-06 Joseph S. Myers - - * c-common.h (enum c_tree_index): Add CTI_SIGNED_SIZE_TYPE and - CTI_UNSIGNED_PTRDIFF_TYPE. - (signed_size_type_node): Define. - (unsigned_ptrdiff_type_node): Define. - * c-decl.c (init_decl_processing): Create the - signed_size_type_node and unsigned_ptrdiff_type_node types. - * c-common.c (T_SC): Define. - (T_SST): Define. - (T_UPD): Define. - (print_char_table): Use T_SST for %zd, %zi, %zn. Use T_UPD for - %to, %tu, %tx, %tX. Allow %hhn (T_SC). Add "c" to the flags for - %s and %p. - (scan_char_table): Use T_SC for %hhd, %hhi, %hhn. Use T_SST for - %zd, %zi, %zn. Use T_UPD for %to, %tu, %tx, %tX. Add "c" to the - flags for %c, %s and %[. - (check_format_info): Only allow leniency for signedness of targets - of character pointers (when pedantic) for formats flagged with - "c", so for strings but not for %hh formats. When pedantic, don't - allow character pointers to substitute for void pointers if a - second level of indirection is present. - -2000-08-06 Kazu Hirata - - * invoke.texi (Options for Debugging Your Program or GCC): Update - the names of dump files. - - * h8300.c (dosize): Rearrange code for conciseness. - (split_adds_subs): Likewise. - - * loop.c: Fix formatting. - - * dwarf2out.c: Fix formatting. - - * tm.texi (FUNCTION_ARG_PARTIAL_NREGS): Fix a typo. - - * expr.c: Fix formatting. - -2000-08-06 Kaveh R. Ghazi - - * rs6000.c (rs6000_maybe_dead): Prototype. - -2000-08-06 Richard Henderson - - * stmt.c (expand_goto): Do virtual_stack_vars_rtx replacement for - HAVE_nonlocal_goto as well. - * config/i960/i960.md (nonlocal_goto): Don't do it here. - * config/pj/pj.md (nonlocal_goto): Likewise. - -2000-08-07 Michael Hayes - - * loop.c (try_swap_copy_prop): New function. - (load_mems): Rename copies to load_copies and add new regset - store_copies. Check for sets of shadow registers and mark - in store_copies. Call try_swap_copy_prop for registers - marked in store_copies. - -Sun Aug 6 00:54:42 2000 Ovidiu Predescu - - * objc/objc-act.c: New command line option -fconstant-string-class - to allow specifying a user defined constant string class, - different from NXConstantString. - - * toplev.c: Moved the Objective-C specific options to - objc/lang-options.h. - - * objc/lang-options.h: Moved the Objective-C specific options from - toplev.c. Added -fconstant-string-class. - -2000-08-05 Chris Demetriou - - * mips/elf.h (CTOR_LIST_BEGIN, CTOR_LIST_END, - DTOR_LIST_BEGIN, DTOR_LIST_END): change type of - __CTOR_LIST__ from func_ptr array to just func_ptr, to - avoid extra alignment imposed on arrays. - * mips/elf64.h (CTOR_LIST_BEGIN, CTOR_LIST_END, - DTOR_LIST_BEGIN, DTOR_LIST_END): Likewise. - - * mips.h: Clean up comments and spacing near MASKs. - (TARGET_UNIX_ASM): Delete. - (MASK_MIPS16, MASK_NO_CHECK_ZERO_DIV, MASK_CHECK_RANGE_DIV, - MASK_UNINIT_CONST_IN_RODATA): Change values to make mask - values contiguous. - -2000-08-05 Joseph S. Myers - - * c-common.c (print_char_table): Add entries for the X/Open ' - format flag (print decimals with locale's thousands grouping - character). Make %C expect wint_t. - (check_format_info): If pedantic, warn when the %n$ operand - number form is used. Allow for the ' flag; warn about it if - pedantic. - -2000-08-05 Zack Weinberg - - * i386.h (FUNCTION_OK_FOR_SIBCALL): Not OK if DECL's return - type is a float mode, cfun->decl's return type is not, and - TARGET_FLOAT_RETURNS_IN_80387. - -2000-08-04 Andreas Schwab - - * cppmain.c (cb_def_pragma): Skip the first two tokens from the - token list, which are always `#' and `pragma'. - -2000-08-04 Zack Weinberg - - * tree.c (tree_expr_nonnegative_p): Move to... - * fold-const.c: ... here. Also handle BIND_EXPR and RTL_EXPR. - (rtl_expr_nonnegative_p): New. - * tree.h: Add prototype for rtl_expr_nonnegative_p. - - * real.h (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH, CONST_DOUBLE_MEM, - CONST_DOUBLE_CHAIN: Move to... - * rtl.h: ...here. Use XCINT/XCEXP. - - * Makefile.in: Remove toplev.o from OBJS. Add rule to make - libbackend.a; add libbackend.a to STAGESTUFF. Add BACKEND - variable. Use BACKEND when linking cc1, not OBJS. Add BACKEND - to VOL_FILES. - - * objc/Make-lang.in (cc1obj): Link with $(BACKEND). - -2000-08-05 Herman A.J. ten Brugge - - * config/c4x/c4x.md (return_indirect_internal): New. - * config/c4x/c4x.c (c4x_expand_epilogue): Use it. - -2000-08-04 Joseph S. Myers - - * c-common.c (time_char_table): Mark up formats added in C99 and - make other corrections. %D and %g were added in C99. %Og is an - extension. %EX is permitted. %R, %T, %n, %r, %t were added in - C99. %e was added in C99. %Oj is an extension. %G and %z are in - C99 rather than GNU extensions, but %OG and %Oz are extensions. - %h was added in C99. %C was added in C99. %OY and %OC are - extensions. Add the C99 format %F. - (check_format_info): If pedantic and not in C99 mode, warn for C99 - formats, %E and %O. - -Fri Aug 4 23:01:58 2000 J"orn Rennecke - - * function.c (schedule_fixup_var_refs): New function, broken out - of put_reg_into_stack. - (put_reg_into_stack): Use it. - (put_var_into_stack): In CONCAT case, fixup up references for - components only after fixing up references to the whole concat. - -2000-08-04 Rodney Brown - - * alias.c (mark_constant_function): Use INSN_P. - (init_alias_analysis): Likewise. - * combine.c (combine_instructions): Use INSN_P. - (can_combine_p): Likewise. - (try_combine): Likewise. - (distribute_notes): Likewise. - (distribute_links): Likewise. - * cse.c (cse_around_loop): Use INSN_P. - (invalidate_skipped_block): Likewise. - (cse_set_around_loop): Likewise. - (cse_end_of_basic_block): Likewise. - (delete_trivially_dead_insns): Likewise. - * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. - (unshare_all_rtl_1): Likewise. - (next_cc0_user): Likewise. - (try_split make_insn_raw): Likewise. - (remove_unnecessary_notes): Likewise. - * final.c (shorten_branches): Use INSN_P. - (leaf_renumber_regs): Likewise. - (leaf_renumber_regs_insn): Likewise. - * flow.c (find_label_refs): Use INSN_P. - (verify_wide_reg): Likewise. - (notice_stack_pointer_modification): Likewise. - (count_or_remove_death_notes): Likewise. - (verify_flow_info): Likewise. - (clear_log_links): Likewise. - * function.c (fixup_var_refs_insns): Use INSN_P. - (compute_insns_for_mem): Likewise. - * gcse.c (alloc_gcse_mem): Use INSN_P. - (compute_sets): Likewise. - (compute_hash_table): Likewise. - (classic_gcse): Likewise. - (cprop): Likewise. - (insert_insn_end_bb): Likewise. - (delete_null_pointer_checks_1): Likewise. - * global.c (expand_preferences): Use INSN_P. - (build_insn_chain): Likewise. - * graph.c (node_data): Use INSN_P. - * haifa-sched.c (priority): Use INSN_P. - (rm_line_notes): Likewise. - (rm_other_notes): Likewise. - (find_insn_reg_weight): Likewise. - (init_target_units): Likewise. - (schedule_block): Likewise. - (compute_block_forward_dependences): Likewise. - (debug_dependencies): Likewise. - (set_priorities): Likewise. - * integrate.c (function_cannot_inline_p): Use INSN_P. - (save_parm_insns): Likewise. - (copy_insn_list): Likewise. - * jump.c (mark_all_labels): Use INSN_P. - (never_reached_warning): Likewise. - * lcm.c (optimize_mode_switching): Use INSN_P. - * local-alloc.c (validate_equiv_mem): Use INSN_P. - (memref_used_between_p): Likewise. - (update_equiv_regs): Likewise. - (block_alloc): Likewise. - (no_conflict_p): Likewise. - * loop.c (scan_loop): Use INSN_P. - (find_and_verify_loops): Likewise. - (count_loop_regs_set): Likewise. - (loop_reg_used_before_p): Likewise. - (strength_reduce): Likewise. - (recombine_givs): Likewise. - (check_dbra_loop): Likewise. - (load_mems): Likewise. - (try_copy_prop): Likewise. - * print-rtl.c (print_rtx): Use INSN_P. - * recog.c (find_single_use): Use INSN_P. - * reg-stack.c (stack_regs_mentioned): Use INSN_P. - (next_flags_user): Likewise. - (swap_rtx_condition): Likewise. - * regmove.c (mark_flags_life_zones): Use INSN_P. - (optimize_reg_copy_1): Likewise. - (optimize_reg_copy_2): Likewise. - (optimize_reg_copy_3): Likewise. - (reg_is_remote_constant_p): Likewise. - (fixup_match_2): Likewise. - (regmove_optimize): Likewise. - (fixup_match_1): Likewise. - * regrename.c (build_def_use): Use INSN_P. - (replace_reg_in_block): Likewise. - (consider_use): Likewise. - * reload.c (find_equiv_reg): Use INSN_P. - * reload1.c (reload): Use INSN_P. - (maybe_fix_stack_asms): Likewise. - (calculate_needs_all_insns): Likewise. - (reload_as_needed): Likewise. - (emit_output_reload_insns): Likewise. - (delete_address_reloads_1): Likewise. - (reload_cse_regs_1): Likewise. - (reload_combine): Likewise. - (reload_cse_move2add): Likewise. - * reorg.c (redundant_insn): Use INSN_P. - (dbr_schedule): Likewise. - * resource.c (find_dead_or_set_registers): Use INSN_P. - (mark_target_live_regs): Likewise. - * rtlanal.c (reg_used_between_p): Use INSN_P. - (reg_referenced_between_p): Likewise. - (reg_set_between_p): Likewise. - (reg_set_p): Likewise. - (single_set): Likewise. - (multiple_sets): Likewise. - (find_last_value): Likewise. - (reg_set_last): Likewise. - (find_reg_note): Likewise. - (find_regno_note): Likewise. - * sibcall.c (sequence_uses_addressof): Use INSN_P. - * simplify-rtx.c (cselib_process_insn): Use INSN_P. - * ssa.c (find_evaluations): Use INSN_P. - (rename_block): Likewise. - (rename_equivalent_regs): Likewise. - * unroll.c (loop_find_equiv_value): Use INSN_P. - (set_dominates_use): Likewise. - * varasm.c (mark_constant_pool): Use INSN_P. - (mark_constants): Likewise. - * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. - (alphaev4_next_group): Likewise. - (alphaev5_next_group): Likewise. - * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. - (c4x_rptb_rpts_p): Likewise. - * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. - * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. - (rs6000_adjust_priority): Likewise. - * config/sh/sh.c (sh_loop_align): Use INSN_P. - (machine_dependent_reorg): Likewise. - (split_branches): Likewise. - * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. - -Fri Aug 4 11:43:49 2000 John Wehle (john@feith.com) - - * combine.c (recog_for_combine): Remove the old notes - prior to attempting to recognize the new pattern. - (distribute_notes): Ignore REG_NONNEG notes. - -2000-08-04 Chandrakala Chavva - - * varasm.c (output_constructor): Add .align 0 for packed vars. - -2000-08-04 J. David Anglin - - * configure.in: Use default thread_file even when enable_threads is - yes or dce because hpux10.20 pa port uses MULTILIB implementation. - * configure: Rebuilt. - - * gthr-dce.h (__gthread_objc_condition_allocate): Fix typo. - -2000-08-04 Donn Terry (donnte@microsoft.com) - - * prefix.c (translate_name): Don't strip trailing DIR_SEPARATOR. - -2000-08-04 Mark Elbrecht - - * i386/x-djgpp: Delete code that conditionally modifies target_alias. - Delete code that conditionally modifies 'version'. - Delete X_CPPFLAGS. Add comment for SYSTEM_HEADER_DIR. - * i386/xm-djgpp.h (GCC_DRIVER_HOST_INITIALIZATION): New macro. - * gcc.c (main): Use it. - * config/i386/xm-djgpp.h (UPDATE_PATH_HOST_CANONICALIZE): New macro. - * prefix.c (update_path): Use it. - * i386/djgpp.h (STANDARD_INCLUDE_DIR): Define. - (MD_EXEC_PREFIX): Set to '/dev/env/DJDIR/bin/'. - (ASM_OUTPUT_SECTION_NAME): Add code attribute to sections containing - code. - (SUPPORTS_WEAK, SUPPORTS_ONE_ONLY): Default to true. - (SUBTARGET_SWITCHES): Adjust. - (WCHAR_UNSIGNED, WCHAR_TYPE_SIZE, WCHAR_TYPE): Undefine before - defining. - (WINT_TYPE, SIZE_TYPE, PTRDIFF_TYPE): Define. - -2000-08-04 Joseph S. Myers - - * c-common.h (flag_isoc94): Declare. - * c-decl.c (flag_isoc94): Define. - (c_decode_option): Set flag_isoc94 as appropriate. - * c-common.c (T_PD, T_IM, T_UIM): Define. - (format_char_info): Add tlen and jlen. - (print_char_table): Add entries for %t and %j. Allow %zn. Allow - %F. Allow %lf. - (scan_char_table): Add entries for %t and %j. Allow %F. Allow - %l[. - (time_char_table): Add NULL entries for %t and %j. - (check_format_info): Allow for %t and %j. Warn for %F if pedantic - and not C99. Warn for %lc, %ls and %l[ if pedantic and not C94. - Warn for printf %lf if pedantic and not C99. Don't warn for empty - precision. Allow precision argument to be unsigned int. If - pedantic, warn for %p passed an argument not a pointer to possibly - qualified void or a possibly qualified character type, and for - pointer targets of the wrong sign, except for character pointers. - -2000-08-04 Joseph S. Myers - - * ginclude/stddef.h: Don't declare wint_t unless __need_wint_t. - * c-common.h (enum c_tree_index): Add CTI_WINT_TYPE. - (wint_type_node): Define. - * c-decl.c (WINT_TYPE): Define. - (init_decl_processing): Create the wint_type_node type. - * c-common.c (T_WI): Define. - (print_char_table): Use T_WI for %lc format. - -2000-08-04 Bruce Korb - - * fixinc/: Verified that the MSDOS patch does not break - the UNIX functionality and applied the next three patches - from July: - -2000-07-28 Eli Zaretskii - - * fixinc/fixfixes.c (main) [__MSDOS__]: Avoid overwriting the - output file with the temporary one by appending ".X" to generate - the temporary fuile's name. If the output file already has an - extension, replace it with ".X". - - * fixinc/fixincl.c (fix_with_system) [__MSDOS__]: Use $ORIGDIR, - not $DESTDIR, to find applyfix. Use sprintf instead of snprintf; - reallocate the command buffer while copying the command-line - argument. Redirect the output directly to the temporary file, - instead of going through another temporary file. - (process): Close the temporary file before unlinking it. - (machine_matches) [__MSDOS__]: If the machine doesn't match, set - the FD_SKIP_TEST flag. Pay attention to the FD_MACH_IFNOT flag. - (run_compiles): Pass p_fixd argument to machine_matches, as it - expects. - - * fixinc/fixincl.sh: Export ORIGDIR. If $DJDIR is set in the - environment, assume there are no symlinks in the include - directory. When cleaning up the DONE files, look for them - case-insensitively. Don't try to remove symlinks if they aren't - there. - - * fixinc/fixlib.c (make_raw_shell_str): Accept new argument smax; - all callers changed. Declare pz "const char *", to avoid compiler - warnings. - - * fixinc/fixlib.h (ENV_TABLE): Get ORIGDIR from the environment. - Change prototype of make_raw_shell_str. - -2000-07-27 Eli Zaretskii - - * fixinc/fixincl.c [__MSDOS__]: Don't include "server.h". - (initialize) [__MSDOS__]: Use tempnam. - (initialize): Don't use SIGPIPE if it is not defined. - - * fixinc/fixfixes.c (main) [__MSDOS__]: freopen for stdout should - return stdout. - -2000-07-25 Bruce Korb - - * fixinc/fix*.[ch]: substantially reworked to make it possible - to run this program without using fork(2) or pipe(2) (i.e. in - a DOS environment). - -2000-08-04 Joseph S. Myers - - * cppdefault.h (WINT_TYPE): Define. - * cppinit.c (builtin_array): Define __WINT_TYPE__. - * tradcpp.c (initialize_builtins): Define __WINT_TYPE__. - * tm.texi (NO_BUILTIN_WINT_TYPE, WINT_TYPE): Document. - -Fri Aug 4 06:53:46 2000 Clinton Popetz - - * (mips_legitimate_address_p): Don't allow register+offset - if the offset is large and negative, and we are compiling - for 64 bit registers. - -2000-08-04 Herman A.J. ten Brugge - - * gencodes.c (main): Define CODE_FOR_nothing as the last possible - insn_code_number + 1. - -2000-08-04 Kazu Hirata - - * h8300.c (function_prologue): Rearrange code for conciseness. - (function_epilogue): Likewise. - * h8300.h (OK_FOR_U): Fix formatting. - - * cse.c: Fix a comment typo. Fix formatting. - -2000-08-03 Richard Henderson - - * config/i386/i386.md (return_indirect_internal): New. - * config/i386/i386.c (ix86_expand_epilogue): Use it. - -2000-08-03 Zack Weinberg - - * cpplex.c (parse_name): Might have to glue a CPP_OTHER token - before the name. - (lex_line): Glue @ onto the beginning of identifiers and - string constants, in Objective-C mode. - (output_token, spell_token): Handle CPP_OSTRING. - (can_paste, maybe_paste_with_next): Handle pasting @ onto the - beginning of a NAME or a STRING, in objc mode. - - * cpplib.c (get_define_node): Do not permit identifiers that - begin with @ to be #defined. - * cppmacro.c (CAN_PASTE_AFTER): Add CPP_OTHER. - * cpplib.h (TTYPE_TABLE): Add CPP_OSTRING. - - * c-lang.c, objc/objc-act.c (build_objc_string): Delete. - * c-tree.h (build_objc_string): Delete prototype. - * objc/objc-tree.def: Delete OBJC_STRING_CST. - * c-lex.c (yylex): Use build_string for all three kinds of strings. - - * c-parse.in, objc/objc-act.c: Update commentary. - -2000-08-03 Mark Mitchell - - * extend.texi: Fix typo in last change. - - * extend.texi: Add commentary on statement-expressions and their - interactions with C++. - -2000-08-03 Nick Clifton - - * dwarf2.h (DW_LANG_Java): Change value to 0x000b. - * dwarf.h (LANG_JAVA): Change value to 0x000b. - -2000-08-03 Anthony Green - - * dwarf2out.c (gen_compile_unit_die): Add java language support. - (add_bound_info): Check for java language. - (is_java): New function. - * dwarfout.c (output_compile_unit_die): Ditto. - * dwarf.h (dwarf_source_language): Add java source language type. - * dwarf2.h (dwarf_source_language): Ditto. - -Thu Aug 3 20:32:25 MET DST 2000 Jan Hubicka - - * reg-stack.c (subst_stack_regs_pat): Use replace_reg to swap - operands. - - * i386.c (ix86_expand_branch): Mode of comparison in - IF_THEN_ELSE is VOIDmode. - -Thu Aug 3 10:05:53 2000 Akiko Matsushita - - * gengenrtl.c, rtl.c: Avoid #elif. - -2000-08-03 Michael Poole - - * tm.texi (Register Classes): Clarify order of sub-initializers - in REG_CLASS_CONTENTS. - -Thu Aug 3 15:53:03 2000 J"orn Rennecke - - From SAITOH Masanobu: - * sh.h (ASM_OUTPUT_REG_PUSH): Fix syntax. - -2000-08-03 David Billinghurst - - * config/i386/cygwin.h: Remove -remap from CPP_SPEC since this option - is not supported by tradcpp and isn't actually needed for cygwin. - -2000-08-03 Kazu Hirata - - * h8300.c: Fix a comment typo. - * h8300.h (OK_FOR_U): Accept a 32-bit constant address on H8S. - - * jump.c: Fix formatting. - - * toplev.c: Fix formatting. - -Thu Aug 3 01:05:32 2000 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_auto_inc): Verify that we've got a REG before - peeking at its regno. Fail, don't abort if we can't find - the increment of the desired register. - - * pa.md (shadd height reduction patterns/splitters): Remove. - -2000-08-02 Jim Wilson - - * config/ia64/ia64-protos.h (flag_ssa): Declare. - * config/ia64/ia64.md (movti_internal, movti_internal+1): New. - -2000-08-02 Mark Mitchell - - * dce.c: Remove all uses of assert. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * ssa.c: Likewise. - -2000-08-02 Zack Weinberg - - * gcc.h (lang_specific_driver): Constify second argument. - * gcc.c (translate_options, process_command, main): Likewise. - Constify variables to match. Cast second argument to - pexecute. - - * cppspec.c, gccspec.c: Adjust type of second argument to - lang_specific_driver, and update code as necessary. - -2000-08-02 Jakub Jelinek - - * loop.c (scan_loop): Ensure update_end label does not - go away until reg_scan_update is run. - -2000-08-02 Zack Weinberg - - * c-common.h: Prototype min_precision and c_build_qualified_type here... - * c-tree.h: ... not here. - * errors.h: Prototype fancy_abort. - - * emit-rtl.c (gen_lowpart_common): Move variable 'c' into - HOST_BITS_PER_WIDE_INT == 64 ifdef block. - * regrename.c (regrename_optimize): Make control flow explicit. - (replace_reg_in_block): Initialize reg_use to 0. - - * i386.c (legitimate_address_p): Rename error label to - report_error to avoid namespace clash. - -2000-08-02 Kazu Hirata - - * fold-const.c: Fix formatting. - -Wed Aug 2 16:26:15 MET DST 2000 Jan Hubicka - - * i386.c (legitimate_address_p): Accept other bases than - pic_offset_table_rtx for GOTOFF constructs. - -Wed Aug 2 15:59:34 MET DST 2000 Jan Hubicka - - * i386.md (shift to lea splitter): Use const_int_operand. - -2000-08-02 Zack Weinberg - - * cppexp.c, cppinit.c, cpplex.c, cpplib.c, cppmacro.c, - cppspec.c: Do not use 'legal' or 'illegal' in error messages - and comments. - - * cppmain.c (cb_define, cb_undef): Don't generate any output - if not done_initializing. - * cpplex.c (maybe_paste_with_next): When the token after a ## - is an omitted rest argument, only delete the token before it - if that token is a comma. Do not warn about bogus token - pastes for , ## rest_arg. - - * cpp.texi: Update. - * cpp.1: Regenerate. - -2000-08-02 Fred Fish - - * config/i386/beos-elf.h (STARTFILE_SPEC): Add i386-mcount.o - when user gives -p option. Add init_term_dyn.o for BeOS 5.0 - and later. - - * config/i386/beos-elf.h (INCLUDE_DEFAULTS): Add additional - Be directories to search path. - - Remove support for __declspec(dllimport) and __declspec(dllexport). - This is leftover cruft from the earlier BeOS gcc port when BeOS - used Microsoft's PE object file format. - * configure.in (i*86-*-beoself): Remove extra_objs=winnt.o. - * config/i386/t-beos (winnt.o): Remove Makefile frag. - * config/i386/beos-elf.h (TARGET_NOP_FUN_DLLIMPORT): Remove. - (VALID_MACHINE_DECL_ATTRIBUTE): Remove. - (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - (MERGE_MACHINE_DECL_ATTRIBUTES): Remove. - (REDO_SECTION_INFO_P): Remove. - (ASM_EXPORT_DECL): Remove. - (ASM_DECLARE_FUNCTION_NAME): Remove. - (ASM_DECLARE_OBJECT_NAME): Remove. - (ASM_OUTPUT_ALIGNED_COMMON): Remove. - (ASM_OUTPUT_ALIGNED_DECL_COMMON): Remove. - (ASM_OUTPUT_ALIGNED_LOCAL): Remove. - (STRIP_NAME_ENCODING): Remove. - - Remove support for obsolete version of BeOS that is no longer - supported by Be. - * configure.in (i*86-*-beospe*): Remove. - * config/i386/beos-pe.h: Remove. - -2000-08-01 Jeffrey Oldham - Mark Mitchell - - * Makefile.in (OBJS): Added dce.o. - (ssa.o): Updated target to include ssa.h. - (flow.o): Likewise. - (toplev.o): Likewise. - (dce.o): Created target. - * basic-block.h: Added comments. - (INVALID_BLOCK): Added definition. - (connect_infinite_loops_to_exit): Added declaration. - Moved SSA declarations to ssa.h. - * flow.c: Added inclusion of ssa.h. - (struct depth_first_search_dsS, depth_first_search_ds): - Added definitions. - (compute_immediate_postdominators): Added definition. - (connect_infinite_loops_to_exit): Likewise. - (flow_dfs_compute_reverse_init): Likewise. - (flow_dfs_compute_reverse_add_bb): Likewise. - (flow_dfs_compute_reverse_execute): Likewise. - (flow_dfs_compute_reverse_finish): Likewise. - * rtl.h (rtx/in_struct): Added use to determine insn necessity. - (LABEL_P): Added definition. - (JUMP_P): Likewise. - (NOTE_P): Likewise. - (BARRIER_P): Likewise. - (JUMP_TABLE_DATA_P): Likewise. - (INSN_DEAD_CODE_P): Likewise. - * ssa.c: Replaced inclusions with ssa.h inclusion. - (CONVERT_HARD_REGISTER_TO_SSA_P): Moved to ssa.h. - (rename_registers): Removed unnecessary variables. - * ssa.h: Created by moving declarations from ssa.c and - basic-block.h. - * timevar.def: Defined TV_DEAD_CODE_ELIM. - * toplev.c: Added ssa.h inclusion. - (dump_file_index): Added DFI_dce. - (dump_file): Added "dce" entry. - Defined flag_ssa. - (f_options): Added dce entry. - * invoke.texi: Document -fdce. Emphasize experimental status of - -fssa. - * dce.c: New file. - -2000-08-01 Zack Weinberg - - * cpperror.c (v_message): Split into _cpp_begin_message and - v_message macro. All callers updated. - (_cpp_begin_message): Do inhibit_errors/inhibit_warnings - checks here. - - * cppfiles.c (cpp_syshdr_flags): New function. - (read_include_file): Don't call cpp_output_tokens. Call - enter_file hook. - * cppinit.c (dump_macros_helper): Moved to cppmain.c. - (cpp_reader_init): Don't initialize token_buffer. Call - _cpp_init_internal_pragmas. - (cpp_cleanup): Don't clear token_buffer. - (cpp_start_read): Don't worry about output from -D processing. - Don't call cpp_output_tokens. - (cpp_finish): Don't dump macros here. Don't call - cpp_output_tokens. - * cppmacro.c (_cpp_dump_definition): Rename - cpp_dump_definition. Write directly to a FILE *. - (dump_funlike_macro): Delete. - (dump_macro_args): New. - - * cpplex.c (TOKEN_LEN): Convert to inline function. - (_cpp_grow_token_buffer, safe_fwrite, cpp_output_tokens, - cpp_scan_line, _cpp_dump_list): Delete. - (cpp_printf, cpp_output_list): New. - (output_line_command): Don't worry about entering or leaving files. - (cpp_scan_buffer): Just output each token as we hit it. - (process_directive): Don't call cpp_output_tokens. - (_cpp_glue_header_name): Don't use token_buffer. - (output_token, dump_param_spelling): Write directly to a FILE *. - - * cpplib.c (pass_thru_directive, dump_macro_name, - pragma_dispatch, do_pragma_gcc): Delete. - (do_define, do_undef, parse_include, do_line, do_ident, do_pragma, - do_pragma_poison, cpp_pop_buffer): Call the appropriate hook - functions. - (do_error, do_warning, pragma_dependency): Call - _cpp_begin_message, then cpp_output_list. - (cpp_register_pragma, cpp_register_pragma_space, - _cpp_init_internal_pragmas): New. - (do_pragma): Walk the pragmas table here. - (do_pragma_once, do_pragma_poison, do_pragma_system_header, - do_pragma_dependency): Return void. - (do_pragma_implementation): Moved to cppmain.c. - - * cpplib.h: Update prototypes. - (struct cpp_reader): Remove printer, token_buffer, - token_buffer_size, and limit. Add struct cb, and pragmas. - (struct cpp_printer): Remove last_id and written. - (CPP_WRITTEN, CPP_PWRITTEN, CPP_SET_WRITTEN, - CPP_ADJUST_WRITTEN): Delete. - * cpphash.h: Update prototypes. - (ufputs): New wrapper. - - * cppmain.c (cb_define, cb_undef, cb_include, cb_ident, - cb_enter_file, cb_leave_file, cb_def_pragma): New functions. - (main): Set up callbacks. Register #pragma implementation. - Dump macros from here. - -2000-08-01 Geoff Keating - - * rtl.h (enum reg_note): Add REG_MAYBE_DEAD. - * rtl.c (reg_note_name): Add REG_MAYBE_DEAD. - * flow.c (propagate_one_insn): Allow deletion of prologue/epilogue - insns if they have a REG_MAYBE_DEAD note attached. - * config/rs6000/rs6000.c (rs6000_maybe_dead): New function. - (rs6000_emit_load_toc_table): TOC loads may go dead. - -2000-08-01 Jim Wilson - - * config/ia64/ia64.c (ia64_function_arg): Fix last change. Verify - type exists before using it. Use number of words as alignment - otherwise. - (ia64_function_arg_partial_nregs, ia64_function_arg_advance, - ia64_va_arg): Propagate ia64_function_args changes here. - -2000-08-01 Richard Henderson - - * config/elfos.h (ASM_DECLARE_OBJECT_NAME): Care for null DECL. - * config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. - -2000-08-01 Bernd Schmidt - - From Joern Rennecke: - * sh.h (CPP_SPEC, TARGET_SWITCHES): Add m4-nofpu. - * sh.md (udivsi3, divsi3): Don't use libcalls that use the FPU - unless TARGET_SH3E is set. - * t-sh (MULTILIB_MATCHES): Add m2=m4-nofpu. - - * sh.md (ashlsi3_d, ashlsi3_k): Remove, replace with - (ashlsi3_std): New pattern. - (ashlsi3 expander): Use it for TARGET_SH3. - * sh.c (gen_ashift): Use it instead of ashlsi3_k. - -Tue Aug 1 12:34:21 MET DST 2000 Jan Hubicka - - * loop.c (canonicalize_condition): Use destination, not source to - determine SET's mode. - -2000-07-31 Mark Mitchell - - * flow.c (clear_log_links): Fix typo. - -Mon Jul 31 22:19:24 2000 Jeffrey A Law (law@cygnus.com) - - * loop.c (check_dbra_loop): Make change from July 17, 2000 work - on targets which need more than one insn for a compare/cbranch - operation. - -2000-07-31 Jim Wilson - - * config/ia64/ia64.c (ia64_function_arg): Use alignment not size - when computing offset. - -Mon Jul 31 20:35:50 2000 Denis Chertykov - - * genpeep.c (main): Handle DEFINE_PEEPHOLE2. - -2000-07-31 Geoff Keating - - * flow.c (clear_log_links): Nuke global_live_at_start and - global_live_at_end data, since if the log_links stuff is invalid - so is global_live_at_*. - -2000-07-31 Richard Henderson - - * tm.texi (Addressing Modes): Clarify PRE/POST_MODIFY descriptions. - -2000-07-31 Jakub Jelinek - - * cpplex.c (_cpp_get_line): If index is 0, return line 0 col 0. - (_cpp_get_token): Don't macro expand a just pasted token if it - was pasted at no_expand_level. - -2000-07-31 Zack Weinberg - - * cppmacro.c (find_param, count_params, save_expansion): - Permit 'defined' as a macro parameter name. - -2000-07-31 Zack Weinberg - - * Makefile.in: Rename cpp to cpp0, tradcpp to tradcpp0, and - xcpp to cpp throughout. - (native): Remove unnecessary dependency on cpp. - - * gcc.c (trad_capable_cpp, C specs): Rename cpp to cpp, - tradcpp to tradcpp0. - (.i spec): Add missing output-file spec to cc1 command line. - * objc/lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. - -2000-07-31 Zack Weinberg - - * c-decl.c (mesg_implicit_function_declaration): Init to -1. - (implicit_decl_warning): New function. - (implicitly_declare): Use it. - * c-typeck.c (build_external_ref): Use implicit_decl_warning - to complain about implicit decls of builtins. - - * c-lang.c (lang_init): Set mesg_implicit_function_declaration - based on pedantic && flag_isoc99, if not already set. - * c-tree.h: Declare mesg_implicit_function_declaration. - Prototype implicit_decl_warning. - -2000-07-30 Jeffrey D. Oldham - - * Makefile.in (ssa.o): Updated header files in dependences. - * basic-block.h: Added compute_immediate_postdominators declaration. - * config/i386/i386.h (CONVERT_HARD_REGISTER_TO_SSA_P): Added - definition. - * flow.c (compute_immediate_dominators): Updated comment. - (compute_immediate_postdominators): Added definition. - * rtl.h (HARD_REGISTER_P): Added definition. - * ssa.c: Include additional header files. - (assert): Added definition. - (ssa_rename_to_lookup): Added to reimplement ssa_rename_to to - include select hard registers. - (ssa_rename_to_insert): Likewise. - (ssa_rename_from_initialize): Likewise. - (ssa_rename_from_lookup): Likewise. - (original_register): Likewise. - (ssa_rename_from_insert): Added to reimplement ssa_rename_from to - include select hard reigsters. - (ssa_rename_from_traverse): Likewise. - (ssa_rename_from_free): Likewise. - (ssa_rename_from_print): Likewise. - (ssa_rename_from_print_1): Likewise. - (ssa_rename_from_hash_function): Likewise. - (ssa_rename_from_equal): Likewise. - (ssa_rename_from_delete): Likewise. - (simplify_to_immediate_dominators): Removed in favor of - flow.c:compute_immediate_dominators. - (find_evaluations_1): Modified to work with hard registers. - (insert_phi_node): Likewise. - (insert_phi_nodes): Likewise. - (struct rename_set_data): Updated prev_reg comment. - (create_delayed_rename): Modified to work with hard registers. - (RENAME_NO_RTX): Updated comment. - (apply_delayed_renames): Modified to work with hard registers. - (rename_insn_1): Likewise and added handling of CLOBBER rtls. - (rename_block): Updated to use revised ssa_rename_to interface. - (rename_registers): Updated to use revised ssa_rename_to and - ssa_rename_from interface. - (convert_to_ssa): Revised to use compute_immediate_dominators and - deal with hard registers. - (make_regs_equivalent_over_bad_edges): Modified to work with hard - registers. Added check for illegal unification of hard register. - (make_equivalent_phi_alternatives_equivalent): Modified to work - with hard registers. - (compute_conservative_reg_partition): Likewise. - (coalesce_if_unconflicting): Modified to work with hard registers - and check for conflicting hard registers. - (mark_phi_and_copy_regs): Revised loop to work only on pseudo - registers. - (rename_equivalent_regs_in_insn): Modified to work with hard - registers. - (record_canonical_element_1): Added definition. - (check_hard_regs_in_partition): Added definition. - (convert_from_ssa): Added data structure deallocation and check - for illegal hard register unification. - (conflict_hard_regs_p): Added definition. - * toplev.c (rest_of_compilation): Added comment. - -2000-07-31 Anthony Green - - * config/ia64/crtbegin.asm (__EH_FRAME_BEGIN__): Align correctly. - -2000-07-31 Jason McMullan - - * builtins.c (expand_builtin_apply): Don't defer pop during - argument setup. - -2000-07-31 Herman A.J. ten Brugge - - * calls.c (combine_pending_stack_adjustment_and_call): Only use - preferred_unit_stack_boundary when it is > 1. - -2000-07-31 Joseph S. Myers - - * c-common.c (init_function_format_info): Add C99 format functions - in C99 mode. - - * c-decl.c (get_parm_info): Don't treat 'const void', 'volatile - void' or 'register void' as being the special case of 'void' alone - in a parameter list. - - * c-typeck.c (build_c_cast): Change -Wcast-qual pedwarn for - discarding qualifiers into a plain warning. - -2000-07-31 Kazu Hirata - - * combine.c: Fix formatting. - - * h8300.md: Fix formatting. - - * local-alloc.c: Fix formatting. - - * h8300.c (get_shift_alg): Remove the variable alg. - (emit_a_shift): Rearrange code to improve readability. - - * h8300.md (movsi_h8300hs): Rearrange code to improve readability. - - * h8300.h (MODES_TIEABLE_P): Accept a combination of QImode and - HImode on all architectures and a combination of HImode and SImode - on H8/300H and H8S. - - * h8300.c (split_adds_subs): Rearrange code for conciseness. - -Mon Jul 31 12:27:55 MET DST 2000 Jan Hubicka - - * i386.md (addsi to lea splitter, ashlqi3_1_lea): Fix bugs - in my last checkin. - -Mon Jul 31 10:41:01 MET DST 2000 Jan Hubicka - - * recog.c (extract_insn): Set operand_mode according to - operand if match_operand is VOIDmode. - -Mon Jul 31 10:36:38 MET DST 2000 Jan Hubicka - - * recog.c (validate_replace_rtx_1): Do not abort for (nil) expression. - -2000-07-31 Geoff Keating - - * c-parse.in (extdefs): Call ggc_collect between external - definitions. - -2000-07-30 Michael Hayes - Richard Henderson - - * Makefile.in (OBJS): Add doloop.o. - * doloop.c: New file. - - * final.c (insn_current_reference_address): Return 0 before final. - * flags.h (flag_branch_on_count_reg): Fix typos in commentary. - * jump.c (any_uncondjump_p): Likewise. - * loop.c (indirect_jump_in_function): Make static. - (strength_reduce): Call doloop_optimize. - (insert_bct, instrument_loop_bct): Remove. - * loop.h (doloop_optimize): Prototype. - * recog.c (split_all_insns): Split all INSN_P. - * toplev.c (flag_branch_on_count_reg): Default on. - - * config/c4x/c4x.c (c4x_optimization_options): Don't set - flag_branch_on_count_reg. - * config/i386/i386.c (override_options): Likewise. - * config/rs6000/rs6000.c (optimization_options): Likewise. - - * config/i386/i386.md (decrement_and_branch_on_count): Remove. - (doloop_end): New. - (dbra_ge): Remove, as well as all it's splitters. - - * config/rs6000/rs6000.md (decrement_and_branch_on_count): Remove. - (doloop_end): New. - - * config/ia64/ia64-protos.h (ar_lc_reg_operand): Declare. - (ia64_register_move_cost): Declare. - * config/ia64/ia64.c (ar_lc_reg_operand): New. - (struct ia64_frame_info): Add ar_size. - (ia64_compute_frame_size): Set it. - (save_restore_insns): Save and restore ar.lc. - (ia64_register_move_cost): New, moved from header file. Handle - application registers. - (REG_AR_PFS, REG_AR_EC): Remove. Replace with AR_*_REGNUM numbers. - (emit_insn_group_barriers): Special case doloop_end_internal. - (ia64_epilogue_uses): Mark ar.lc live at end. - * config/ia64/ia64.h (AR_CCV_REGNUM, AR_LC_REGNUM): New registers. - (AR_EC_REGNUM, AR_PFS_REGNUM): New registers. - (FIRST_PSEUDO_REGISTER): Make room. - (AR_M_REGNO_P, AR_I_REGNO_P, AR_REGNO_P): New. - (FIXED_REGISTERS, CALL_USED_REGISTERS): Update. - (REG_ALLOC_ORDER): Update. - (HARD_REGNO_MODE_OK): Update. - (REGISTER_NAMES): Update. - (enum reg_class): Add AR_M_REGS and AR_I_REGS. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update. - (REGNO_REG_CLASS): Update. - (LEGITIMATE_ADDRESS_DISP): Displacement range is 9 bits, not 10. - (REGISTER_MOVE_COST): Move out of line. - (PREDICATE_CODES): Update. - * config/ia64/ia64.md (movdi patterns): Handle ar register classes. - (addsi3_plus1_alt, adddi3_plus1_alt): New. - (shladd_elim splitter): Allow constants in the predicate. - (doloop_end, doloop_end_internal): New. - -2000-07-30 Richard Henderson - - * genattrtab.c (struct insn_def): Add lineno member. - (struct insn_ent): Likewise. - (struct attr_desc): Likewise. - (struct delay_desc): Likewise. - (struct function_unit_op): Likewise. - (struct function_unit): Likewise. - (check_attr_value): Use message_with_line. - (check_defs): Likewise. - (expand_units): Likewise. - (check_attr_test): Take a lineno argument. - (gen_attr): Likewise. - (gen_insn): Likewise. - (gen_delay): Likewise. - (gen_unit): Likewise. - (main): Give it to them. - (convert_set_attr_alternative): Take an insn_def argument - instead of num_alt and insn_index. - (convert_set_attr): Likewise. - (write_test_expr): Protect INSN_ADDRESSES load - with INSN_ADDRESSES_SET_P. - -2000-07-30 Richard Henderson - - * flow.c (init_propagate_block_info): Use pc_set. - -Sun Jul 30 20:58:34 MET DST 2000 Jan Hubicka - - * i386.md (*lea_general_[123]) New insns and splits. - (addsi3 to lea splitter): Handle other modes too. - (shlsi3 to lea splitter): Likewise. - (addhi_1_lea, shlhi_1_lea): New patterns. - (addhi_1, shlhi_1): Conditionize by PARTIAL_REG_STALL. - -Sun Jul 30 20:51:25 MET DST 2000 Jan Hubicka - - * recog.c (general_operand, nonimmediate_operand): Accept - any mode for VOIDmode CONSTANT_P operands. - -Sun Jul 30 20:42:21 MET DST 2000 Jan Hubicka - - * gcse.c (try_replace_reg): Use validate_replace_rtx_subexp - instead of replace_rtx. - * recog.c (validate_replace_rtx_subexp): New function. - * recog.h (validate_replace_rtx_subexp): Declare. - -Sun Jul 30 20:38:26 MET DST 2000 Jan Hubicka - - * combine.c (simplify_set, make_extraction, make_compound_operation - make_field_assignment): Use full mask instead of GET_MODE_MASK (mode) - as force_to_mode argument. - -Sun Jul 30 20:30:41 MET DST 2000 Jan Hubicka - - * combine.c (if_then_else_cond): Be sure that mode fits in - HOST_WIDE_INT. - -Sun Jul 30 20:27:36 MET DST 2000 Jan Hubicka - - * combine.c (record_promoted_value): Allow bitsize of mode - to be equivalent to HOST_BITS_PER_WISE_INT. - -Sun Jul 30 20:25:21 MET DST 2000 Jan Hubicka - - * function.c (assign_stack_local_1, assign_stack_temp_for_type): - Do not call gen_mode_alignment when mode is BLKmode. - -Sun Jul 30 20:21:54 MET DST 2000 Jan Hubicka - - * loop.c (express_from_1): Fix call of simplify_gen_binary. - -Sun Jul 30 20:08:37 MET DST 2000 Jan Hubicka - - * simplify-rtx.c (simplify_relational_operation): Verify that mode == - VOIDmode implies both operands to be VOIDmode. - (simplify_ternary_operation): Compute properly the mode of comparison. - * combine.c (combine_simplify_rtx): Likewise. - -2000-07-25 Michael Hayes - - * basic-block.h (struct loops): New field rc_order. - * flow.c (flow_loops_cfg_dump): Dump rc_order if computed. - (flow_loops_free): Free rc_order. - (flow_depth_first_order_compute): New parameter rc_order. - (flow_loops_find): Allocate rc_order and swap usage with - dfs_order. - -2000-07-30 Herman A.J. ten Brugge - Michael Hayes - - * config/c4x/c4x.md (set_ldp_prologue): Add for RTL prologue/epilogue. - (push_st, push_dp, pop_st, pop_dp, popqi_unspec): Likewise. - (nodb_call, return_from_epilogue): Likewise. - (return_from_interrupt_epilogue, prologue, epilogue): Likewise. - * config/c4x/c4x.c (c4x_expand_prologue, c4x_expand_eplilogue): Add. - * config/c4x/c4x-protos.h (c4x_interrupt_function_p): Add. - (c4x_expand_prologue, c4x_expand_epilogue): Likewise. - (c4x_valid_type_attribute_p): Likewise. - * config/c4x/c4x.h (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Delete. - (FUNCTION_BLOCK_PROFILER_EXIT): Convert to emit RTL. - -2000-07-30 Michael Hayes - - * config/c4x/c4x.c (c4x_emit_move_sequence): Use loadqi_big_constant - and loadhi_big_constant if applicable. - * config/c4x/c4x.md (loadqi_big_constant, loadhi_big_constant): Tweak - and add new splitter.s - -2000-07-30 Michael Hayes - - * config/c4x/c4x.c (c4x_rptb_insert): Make more robust. - -2000-07-30 Michael Hayes - - * config/c4x/c4x.h (ASM_FORMAT_PRIVATE_NAME): Output $ in label. - -2000-07-30 Michael Hayes - - * config/c4x/c4x.h (IS_XXX_REGNO): Rewrite to avoid unsigned warnings. - -2000-07-30 Michael Hayes - - * config/c4x/libgcc.S (divqf3): Improve accuracy. - -2000-07-27 Mark Mitchell - - Put phi nodes after NOTE_INSN_BASIC_BLOCK. - * rtl.h (NOTE_INSN_BASIC_BLOCK_P): New macro. - * bb-reorder.c (get_next_bb_note): Use NOTE_INSN_BASIC_BLOCK_P. - (get_prev_bb_note): Likewise. - (remove_scope_notes): Likewise. - * flow.c (commit_one_edge_insertion): Likewise. - (merge_blocks_nomove): Likewise. - (verify_flow_info): Likewise. - * gcse.c (insert_insn_end_bb): Likewise. - * reg-stack.c (emit_swap_insn): Likewise. - * ssa.c (first_insn_after_basic_block_note): New function. - (insert_phi_node): Use it. - (rename_block): Likewise. - (eliminate_phi): Likewise. - (make_regs_equivalent_over_bad_edges): Likewise. - (make_equivalent_phi_alternatives_equivalent): Likewise. - (for_each_successor_phi): Likewise. - (convert_from_ssa): Modify phi-node deletion algorithm. - -2000-07-29 Andreas Jaeger - - * configure.in (mips*-*-linux*): Use mips*el to check for little - endian MIPS, add tmake_file. - - * config/mips/linux.h (TARGET_VERSION): Use GNU/Linux. - (SUBTARGET_CPP_SPEC): Default MIPS_ISA is 1. - Patches by Maciej W. Rozycki . - -2000-07-28 Richard Henderson - - * config/ia64/ia64.c (ia64_print_operand): Fix typos. - Sign extend mode size before negating. - -2000-07-28 Richard Henderson - - * emit-rtl.c (gen_lowpart_common): Add missing 'c' variable. - -2000-07-28 Bernd Schmidt - - * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. - (cse_insn): Likewise. - (addr_affects_sp_p): Likewise. - * expr.c (move_by_pieces): Likewise. - (clear_by_pieces): Likewise. - * gcse.c (oprs_unchanged_p): Likewise. - * haifa-sched.c (sched_analyze_2): Likewise. - * recog.c (offsettable_address_p): Likewise. - * regclass.c (record_address_regs): Likewise. - * reload.c (find_reusable_reload): Likewise. - (push_reload): Likewise. - (operands_match_p): Likewise. - (decompose): Likewise. - (find_reloads_address_1): Likewise. - (find_inc_amount): Likewise. - * reload1.c (elimination_effects): Likewise. - * resource.c (mark_set_resources): Likewise. - * flow.c (attempt_auto_inc): New function; mostly broken out - of find_auto_inc. - (find_auto_inc): Split into two functions and enhanced to - generate POST_MODIFY. - * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. - * rtl.h (count_all_occurrences): Declare. - (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not - defined. - * rtlanal.c (count_all_occurrences): New function. - * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, - HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. - - * config/ia64/ia64-protos.h (destination_operand): Declare. - * config/ia64/ia64.c (destination_operand): New function. - (ia64_print_operand): Handle POST_MODIFY. - (rtx_needs_barrier): Likewise. - * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. - (HAVE_POST_MODIFY_REG): Define to 1. - (MAX_REGS_PER_ADDRESS): Change to 2. - (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. - (LEGITIMATE_ADDRESS_REG): New helper macro. - (LEGITIMATE_ADDRESS_DISP): Likewise. - (PREDICATE_CODES): Add entry for destination_operand. - * config/ia64/ia64.md (all mov patterns): Use destination_operand - predicate for operand 0. - -2000-07-28 Kaveh R. Ghazi - - * dwarf2out.c: Indent #error directive. - - * gbl-ctors.h: Fix typo in comment. - (__do_global_ctors): Prototype. - - * gcse.c (record_one_set, pre_delete): Remove unused variables. - - * rs6000.c (rs6000_maybe_dead): Delete unused prototype. - (print_operand): Initialize variable `t'. - -2000-07-27 Aldy Hernandez - - * config/arm/arm.md ("call_value"): removed constraints. - Constraints are ignored in expanders. - (*call_value_reg): split =rf into various constraints. - (*call_value_mem): same - (*call_value_symbol): same - (*sibcall_value_insn): same - -2000-07-28 Philipp Thomas - - * install.texi (--enable-nls): Change the description of the NLS - related configure options to match the current state. - (--with-included-gettext): Likewise. - (--enable-maintainer-mode): New description added. - * extend.texi (-fstrict-prototype): Add missing '.'. - -2000-07-27 Jim Wilson - - * dwarf2out.c (gen_decl_die): Don't call gen_abstract_function if - DECL_INITIAL (decl) == NULL_TREE. - -2000-07-27 Alexandre Oliva - - * Makefile.in (INSN_ATTR_H): New macro. Replace all dependencies - on insn-attr.h with it. - * genattr.c: Generate `#include "insn-addr.h"' if HAVE_ATTR_length. - * insn-addr.h: New header. - (insn_addresses_): Renamed from insn_addresses. - (INSN_ADDRESSES_DEFN, INSN_ADDRESSES, INSN_ADDRESSES_ALLOC, - INSN_ADDRESSES_FREE, INSN_ADDRESSES_SET_P, INSN_ADDRESSES_SIZE, - INSN_ADDRESSES_NEW): New macros. - * genattrtab.c (write_test_expr): Use new macros. - * final.c (insn_addresses, init_insn_lengths): Likewise. - (align_fuzz, shorten_branches): Likewise. - (final): Likewise. Do not reject new insns if their addresses - have been added to INSN_ADDRESSES. - * config/arm/arm.c, config/avr/avr.c: Use new macros. - * config/h8300/h8300.c, config/i370/i370.c: Likewise. - * config/m88k/m88k.c, config/pa/pa.c, config/pa/pa.md: Likewise. - * config/sparc/sparc.c, config/sparc/sparc.md: Likewise. - * config/sh/sh.c: Likewise. - (output_branchy_insn): Use INSN_ADDRESSES_NEW. - - * Makefile.in (bootstrap): Move -BstageN/ back to the beginning. - -2000-07-27 Andrew Cagney - - * gcc.c (struct prefix_list): Add member priority. - (enum path_prefix_priority): Declare. - (add_prefix): Replace ``first'' with ``priority''. Append new - entry but keep list in priority order. - (process_command): Update. Pass PREFIX_PRIORITY_B_OPT or - PREFIX_PRIORITY_LAST to add_prefix. - (process_command): Move include kludge - foo/stageN - to before - foo/include. - -2000-07-27 Jason Merrill - - * dwarf2out.c (gen_typedef_die): Abort if we get identical - TREE_TYPE and DECL_ORIGINAL_TYPE on a typedef. - -2000-07-27 RodneyBrown - - * expr.h (get_alias_set, lang_get_alias_set): Delete prototypes. - * tree.h (get_alias_set, lang_get_alias_set): Prototype. - -2000-07-27 Joseph S. Myers - - * c-decl.c (finish_function): Don't treat 'main' specially unless - flag_hosted. In C99 mode, return 0 from 'main' unless - DEFAULT_MAIN_RETURN is otherwise defined. - - * c-decl.c (store_parm_decls): In C99 mode, pedwarn for function - parameters defaulting to int in an old-style function definition. - -2000-07-27 Kaveh R. Ghazi - - * c-parse.in (string): For -Wtraditional, warn about string - concatenation only once per line. - -Thu Jul 27 09:25:17 2000 Akiko Matsushita - - * pa/x-pa-hpux: Add -D_HIUX_SOURCE to FIXPROTO_DEFINES - for HI-UX/WE2 systems. - -2000-07-24 Bruce Korb - - * fixincl/fixfixes.c(emit_gnu_type): rewrote to *rely* on GCC - defining the __xxx_TYPE__ macros. - * fixincl/fixincl.tpl(gnu_type_map): now obsolete - * fixincl/fixlib.h: don't need to include "tm.h" anymore - * fixincl/inclhack.def(type_map): now obsolete - -Thu Jul 27 11:54:17 2000 Andrew Cagney - - * cpp.texi: Append a trailing full-stop to xrefs where needed. - -2000-07-26 Dave Pitts - - * i370.c: Remove LONGEXTERNAL ifdef from alias_number. Added hash - routine constants. - (mvs_hash_alias): New function. - (mvs_add_alias): Change argument spacing. - (mvs_need_alias): Change aliasing criteria. Added documentation. - (mvs_get_alias): Change to use hashed name. The hashed name prevents - CSECT name collisions. - (mvs_check_alias): Likewise. - (handle_pragma): Change documentation. - * i370.md (mulsi3, divsi3, udivsi3, modsi3, umodsi3): Changed gen_rtx - mode from SImode to DImode. - (iorhi3): Changed LTORG size for insn. - -Wed Jul 26 19:44:05 2000 Hans-Peter Nilsson - - * reload.c (find_reloads_toplev): Reload a paradoxical subreg of a - mem if the address is a mode_dependent_address_p. - -2000-07-26 Kazu Hirata - - * h8300.c (print_operand): Print ":8" when the 'R' operand is - suitable for 8-bit absolute. - * h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): New. - (OK_FOR_U): Add a case for the 8-bit constant address on the - H8/300H. - -Wed Jul 26 19:26:21 2000 Hans-Peter Nilsson - - * varasm.c (assemble_variable) [! defined(ASM_OUTPUT_ALIGNED_COMMON) - && ! defined (ASM_OUTPUT_ALIGNED_BSS]): Also test - ! defined(ASM_OUTPUT_ALIGNED_DECL_COMMON) before complaining about - lack of implemented alignment. - -2000-07-26 Geoffrey Keating - - * emit-rtl.c (gen_lowpart_common) [REAL_ARITHMETIC]: Handle - cross-compiling between 64-bit and 32-bit machines. - -2000-07-27 Richard Henderson - - * config/ia64/ia64.md (movqicc_astep, movqi_internal_astep): New. - (movhicc_astep, movhi_internal_astep): New. - (movsicc_astep, movsi_internal_astep): New. - (movdicc_astep, movdi_internal_astep): New. - (movsfcc_astep, movsf_internal_astep): New. - (movdfcc_astep, movdf_internal_astep): New. - (movxfcc_astep, movxf_internal_astep): New. - (cmovdi_internal_astep, cmovsi_internal_astep): New. - Unify the cmov[ds]i splitters. - -2000-07-27 Rodney Brown - - * real.c (asctoeg): Rename `error' label to unexpected_char_error - -2000-07-26 Nick Clifton - - * config/arm/vxarm.h (CPP_PREDEFINES): Remove definition of - __arm__. Allow it to be defined by CPP_ISA_SPEC in arm.h - - * dwarf2out.c (dwarf2out_frame_debug_expr): Accept SEQUENCE as - well as PARALLEL blocks in FRAME_RELATED_EXPR notes. - -2000-07-26 Alexandre Oliva - - * c-decl.c (finish_enum): Convert enumerations that fit in an - `int' to `int'. - (build_enumerator): In pedantic mode, cast to `int' those that - don't. - -2000-07-25 Rodney Brown - - * config/alpha/osf.h (SIZE_TYPE, PTRDIFF_TYPE): New. - -Tue Jul 25 23:08:33 2000 J"orn Rennecke - - * sh.md (cmpgtdi_t): Must be split. - (cmpgtdi_t+1): New splitter. - -2000-07-25 Zack Weinberg - - * cpplib.c (_cpp_check_directive): Issue -Wtraditional - warnings for indented directives even if we are skipping. - -2000-07-25 Nathan Sidwell - - * invoke.texi (strict-prototypes): Remove. - * extend.texi (Deprecated Features): Add strict-prototypes. - (Backwards Compatibility): New node. - -2000-07-25 Jakub Jelinek - - * config/i386/i386.md (andsi_1+1): Allow HImode. - (andsi_1+2): Require q_regs_operand. - -2000-07-25 Jakub Jelinek - - * config/i386/i386.md (call_pop): Check operands[0], - not operands[1]. Only check SYMBOL_REF_FLAG for a SYMBOL_REF. - (call): Likewise. - (call_value_pop): Only check SYMBOL_REF_FLAG for a SYMBOL_REF. - (call_value): Likewise. - -2000-07-25 Zack Weinberg - - * toplev.c (pipe_closed): Delete. - (crash_signal): New. Generate ICE for a fatal signal. - (float_signal): Call crash_signal outside a float-handler - block, not abort. - (main): Install crash_signal as handler for core-dumping signals. - -2000-07-25 David Edelsohn - - * rs6000.c (print_operand, case 'T'): New case. - - * rs6000.md (call_indirect_aix32): Convert to expander of - scheduled instructions. - (call_indirect_aix64): Likewise. - (call_value_indirect_aix{32,64}): Likewise. - (call, call_value): Invoke expanders for AIX. Fall through to - matchers for SysV. - (call_indirect_nonlocal_aix{32,64}): New patterns (ctr and lr). - (call_value_indirect_nonlocal_aix{32,64}): New patterns. - (call_nonlocal_aix32): Remove CALL_LONG alternative. Operand 1 - only "g" constraint. - (call_nonlocal_aix64): Likewise. - (call_value_nonlocal_aix{32,64}): Likewise. - (call_nonlocal_sysv): New pattern for ctr, lr, and symbolic - operands. - (call_value_nonlocal_sysv): New pattern. - (indirect_jump{si,di}): Use new 'T' modifier. - (tablejump{si,di} matchers): Likewise. - (return_internal_{si,di}): Likewise. - (return_eh_{si,di}): Likewise. - -2000-07-24 Richard Henderson - - * config/ia64/ia64.c (ia64_print_operand): Handle "%,". - * config/ia64/ia64.h (PRINT_OPERAND_PUNCT_VALID_P): Likewise. - * config/ia64/ia64.md (movdi_internal): Use it. - -2000-07-24 Zack Weinberg - - * cppexp.c: Warn about unary + if -Wtraditional. - * cpplex.c (lex_line): Always set BOL on the first token of a line. - -2000-07-24 Michael Meissner - - * d30v.h (FUNCTION_ARG_KEEP_AS_REFERENCE): Delete references to - unsupported macro. - -2000-07-24 Nick Clifton - - * config/arm/arm.c (emit_multi_reg_push): Generate a - REG_FRAME_RELEATED_NOTE that is compatible with the code in - dwarf2out_debug_frame_expr. - -2000-07-24 Jason Merrill - - * dwarf2out.c: Complain if DWARF2_DEBUGGING_INFO is defined without - UNALIGNED_INT_ASM_OP. - (def_cfa_1): Don't emit def_cfa_register or def_cfa_offset to adjust - a location expression. - (dwarf2out_frame_debug_expr): Lose cfa_old_reg stuff. Don't - assume indirect access if we're saving the CFA address exactly. - - * Makefile.in (bootstrap): Move -BstageN/ to the end. - -2000-07-24 Jakub Jelinek - - * tradcpp.c (main): Update max_include_len for cpp_include_defaults - as well. - -2000-07-24 Michael Meissner - - * invoke.texi (D30V Options): Add d30v options. - -Mon Jul 24 02:04:52 2000 Jeffrey A Law (law@cygnus.com) - - * gcse.c (alloc_pre_mem): Do not alloc TRANSPOUT, it is not - needed by our gcse pass anymore. - (free_pre_mem): Corresponding changes. - (compute_pre_data): Do not call compute_transpout anymore. - - * gcse.c (alloc_avail_expr_mem): Kill unused 'u_bitmap'. - (free_avail_expr_mem, alloc_pre_mem, free_pre_mem): Corresponding - changes. - - * gcse.c (free_pre_mem): Do not free ANTLOC and AE_KILL here. - (compute_pre_data): Do it here instead. - - * gcse.c (alloc_pre_mem, free_pre_mem): Delete unused bitmap - 'temp_bitmap'. - (pre_delete): Corresponding changes. - -2000-07-23 Mark Mitchell - - * c-semantics.c (make_rtl_for_local_static): Use TREE_ASM_WRITTEN - to figure out whether or not a variable has already been emitted. - -Sun Jul 23 14:49:12 2000 Jason Eckhardt - - * config/i860/i860.md (untyped_call expander): Use GEN_CALL - instead of gen_call. - -Sun Jul 23 11:52:03 2000 George Helffrich (george@gly.bris.ac.uk) - - * dbxout.c (dbxout_type, case COMPLEX_TYPE): Fix length field in stab. - -2000-07-23 Kazu Hirata - - * h8300.c: Fix formatting. - -2000-07-23 Joseph S. Myers - - * c-typeck.c (c_expand_start_case): Change -Wtraditional pedwarn - for `long' switch expression into a plain warning. - - * c-lex.c (init_lex): Keep the "inline" keyword in C99 mode. - (yylex): Don't pedwarn for "inline" in C99 mode. - - * bitmap.c (debug_bitmap_file): Cast pointers to PTR for printing - with %p. - * ggc-page.c (debug_print_page_list, alloc_page, free_page, - ggc_alloc): Likewise. - * bb-reorder.c (dump_scope_forest_1): Likewise. - -2000-07-22 Aldy Hernandez - - * reload.c (find_reloads_toplev): Add new parameter - "address_reloaded". - (find_reloads): Add new parameter to find_reloads_toplev calls. - -2000-07-22 Jeffrey Oldham - - * collect2.c (main): Typo fixed. - * diagnostic.c: Typo fixed. - * dwarf2out.c (dwarf2out_frame_debug_expr): Typo fixed. - * eh-common.h: Typo fixed. - * emit-rtl.c (start_sequence): Typo fixed. - * flow.c (find_label_refs): Typo fixed. - (calculate_global_regs_live): Typo fixed. - (mark_regno_cond_dead): Typo fixed. - (create_edge_list): Typos fixed. - (verify_edge_list): Typo fixed. - * ggc-common.c (ggc_mark_rtx_children): Typo fixed. - * loop.c (strength_reduce): Typo in function name fixed. - * rtl.h: Added comments. Typo in function name fixed. - * rtlanal.c: Typo in function name fixed. - (insn_dependant_p): Rename to ... - (insn_dependent_p): ... this. - (computed_jumo_p): Typo fixed. - -2000-07-22 Kaveh R. Ghazi - - * system.h (__FUNCTION__): Wrap definition in #ifndef. - -2000-07-21 David Edelsohn - - * rs6000.h (SIZE_TYPE): Define. - -2000-07-21 Mark Mitchell - - * ssa.c (rename_insn_1): Don't rename registers that are - CLOBBERed. - -2000-07-21 Zack Weinberg - - * diagnostic.c (trim_filename, fancy_abort): Moved here from - rtl.c. - (fatal_function, set_fatal_function): Removed. - (fatal): Don't prepare for or call the fatal_function. - (diagnostic_lock, error_recursion): New. - (diagnostic_for_decl, report_diagnostic): Guard against - re-entering the error reporting routines. - (fancy_abort): Assume function is not NULL. - - * errors.c (fancy_abort): New. Assume function is not NULL. - * tradcpp.c (fancy_abort): Assume function is not NULL. - - * system.h: Provide default definition of __FUNCTION__. - * rtl.h: Use __FUNCTION__ not __PRETTY_FUNCTION__ throughout. - Always use __FUNCTION__ in definition of abort. - * tree.h: Likewise. - * varray.h: Likewise. - * toplev.h: Likewise. Don't prototype set_fatal_function. - -2000-07-20 Geoff Keating - - * config/rs6000/aix43.h (CPP_SPEC): Define __LONG_MAX__ correctly - in 64-bit mode. - * glimits.h: Don't do #if defined for ARCH_PPC. - - * config/rs6000/rs6000.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): All - constants of size no larger than a pointer should go in the TOC. - Add 'MODE' parameter. - (LEGITIMIZE_RELOAD_ADDRESS): Add MODE parameter to - ASM_OUTPUT_SPECIAL_POOL_ENTRY_P. - (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Likewise. - * config/rs6000/aix.h (SELECT_RTX_SECTION): Likewise. - * config/rs6000/netware.h (SELECT_RTX_SECTION): Likewise. - * config/rs6000/rs6000.c (constant_pool_expr_1): Likewise. - (rs6000_legitimize_address): Likewise. - (rs6000_emit_move): Likewise. - (rs6000_select_rtx_section): Likewise. - (output_toc): Deal properly with outputting small constants like - HImode, and SFmode in 32-bit mode, and DFmode in 64-bit mode. - * config/rs6000/sysv4.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Add - MODE parameter. Put small constants in the TOC. - - * config/rs6000/rs6000.c (easy_fp_constant_p): All constants are - easy in SImode. - (rs6000_emit_move): When reload calls us with an illegitimate - address, exit early. Move the change_address calls to one place - at the end of the routine. Merge the SImode and DImode expanders. - When called by reload to put an integer into a FP register, force - it to memory. - - * config/rs6000/rs6000.c (struct toc_hash_struct): Add 'key_mode' - field. - (rs6000_hash_constant): Hash mode too. - (toc_hash_function): Allow for key_mode. - (toc_hash_eq): Structures are different if key_mode differs. - (output_toc): Add 'mode' parameter. Save key_mode. - * config/rs6000/rs6000.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): - Pass 'mode' parameter. - * config/rs6000/rs6000-protos.h (output_toc): Add 'mode' param. - - * config/rs6000/rs6000.c (output_toc): Use RS6000_OUTPUT_BASENAME - for vtable references. - - * config/rs6000/rs6000.h (PREFERRED_RELOAD_CLASS): If we have a - choice, don't put integer values in FP regs. - -Thu Jul 20 18:13:52 2000 Jeffrey A Law (law@cygnus.com) - - * flow.c (verify_flow_info): Revamp code to verify that the - head and end of each basic block are in the insn chain. - -Thu Jul 20 18:02:35 2000 Michael Matz - - * gcse.c (record_one_set): Prepend instead of append onto - reg_set_table, making it O(n) instead O(n^2). - * lcm.c (compute_antinout_edge,compute_laterin,compute_available): - Use a queue instead of a stack as worklist. - -2000-07-20 Kazu Hirata - - * h8300.c (two_insn_adds_subs_operand): Fix a typo. - * h8300.h (OK_FOR_T): New. - (EXTRA_CONSTRAINT): Support OK_FOR_T. - * h8300.md: Use inc/dec.[wl] for increment/decrement - by 1 and 2 in HI and SI modes. - -2000-07-20 Jim Wilson - - * config/ia64/ia64.h (ASM_OUTPUT_MI_THUNK): Handle DELTA values - larger than 14 bits. - -2000-07-20 Zack Weinberg - - * cppmacro.c (CAN_PASTE_AFTER): New macro. - (count_params): Don't set GNU_REST_ARGS on anything. - (save_expansion): Set PASTE_LEFT only on tokens for which - CAN_PASTE_AFTER is true, or which are named operators. - - * cpplex.c (parse_args): Distinguish between a rest argument - given one empty argument, and a rest argument given zero arguments. - (maybe_paste_with_next): Look for VOID_REST tag, and trigger - deletion of previous token based on that. - (get_raw_token): Flatten some control structure. - - * cpplib.h (CPP_LAST_EQ): Correct. - (VOID_REST): New token flag. - (GNU_REST_ARGS): Delete. - - * tradcpp.c (main): Don't munge -D options. - (make_definition): Bring -D handling in line with cpplib. - (do_define): Strip all leading whitespace from macro definitions. - -2000-07-20 David Billinghurst - - * Makefile.in (tradcpp): Depend on intl.o and version.o. - -2000-07-20 Bruce Korb - - * fixincl/check.tpl: strip the platform specific types before testing - * fixincl/fixfixes.c(gnu_type_fix): use platform specific types - * fixincl/fixincl.tpl: use platform specific types - * fixincl/fixlib.h: include the platform specific types - * fixincl/inclhack.def(gnu_types): don't supply the types - * fixincl/fixincl.x: regen - -2000-07-19 Jim Wilson - - * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Don't allow XFmode in - GR_REGS. - -2000-07-19 Zack Weinberg - - * tradcpp.c (rescan): Do not recognize directives when the # - is indented. - -2000-07-19 Zack Weinberg - - Implement C++ named operators. - - * cpplib.h (TTYPE_TABLE): Move CPP_MIN and CPP_MAX into block - of operators allowed in #if and having an _EQ variant. Add - CPP_MIN_EQ, CPP_MAX_EQ, and CPP_DEFINED. - (cpp_token flags): Add NAMED_OP. - (enum node_type): Add T_OPERATOR. - (struct cpp_hashnode): Add code slot to value union. - * cpphash.h (spec_nodes): Remove n_defined. - - * cpplex.c (lex_line): Convert T_OPERATOR nodes to their proper types. - (spell_token, can_paste, maybe_paste_with_next): Handle named operators. - (is_macro_disabled): Tweak error messages. - - * cpplib.c (get_define_node): Disallow all named operators as - macro names. Tweak error messages. - (_cpp_init_stacks): Don't set up spec_nodes->n_defined. - - * cppinit.c (builtin_array): Add entries for the named operators. - * cppexp.c (lex): Check for CPP_DEFINED token. - (priority table): Add entries for CPP_MIN and CPP_MAX. - (_cpp_parse_expr): Handle CPP_MIN and CPP_MAX. - -2000-07-19 Bernd Schmidt - - * gcse.c (INSN_CUID): If ENABLE_CHECKING, abort if the uid is - larger than the array of cuids. - (alloc_gcse_mem): Use uid_cuid rather than INSN_CUID when computing - cuids. - -2000-07-19 Bruce Korb - - * fixinc/fixincl.c: Convert to using a table of environment variables - and activate the auto-edit marker on the fixed output files. - * fixinc/fixlib.h: Define the environment table - * fixinc/fixincl.sh: export the ${INPUT} dir - * fixinc/check.tpl: likewise - -2000-07-18 Zack Weinberg - - * gcc.c (.h spec): Fix typo. - -Wed Jul 19 01:22:15 CEST 2000 Marc Espie - - * Makefile.in: Fix tradcif.c path. - -2000-07-18 Zack Weinberg - - * cpplib.h (TTYPE_TABLE): Rearrange to use only two per-entry - macros, not five. - - * cpphash.h (TOKEN_NAME): New macro. - (_cpp_spell_operator): Deleted. - (token_spellings): Now _cpp_token_spellings. - - * cppexp.c: Use TOKEN_NAME or TYPE_NAME, not _cpp_spell_operator. - * cpplex.c: Use OP and TK macros when expanding the - TTYPE_TABLE. Eliminate token_names. For non-OPERATOR tokens, - store the stringification of the enumeration name (CPP_CHAR, - etc.) in the name slot of token_spellings. - Use TOKEN_NAME and/or TOKEN_SPELL, do not reference - token_spellings directly. - * cpplib.c: Use TOKEN_SPELL. - - * cpplex.c (_cpp_push_token): If the token being pushed back - is the previous token in this context, just subtract one from - context->posn. - * cppmacro.c (save_expansion): Clear aux field when storing a - placemarker. - -2000-07-18 Jakub Jelinek - - * cpplex.c (cpp_scan_buffer): Output line command even at the stop - buffer, provided it is not NULL. - -2000-07-18 Alexandre Oliva - - * c-decl.c (duplicate_decls): Do not call make_var_volatile() in - case of invalid volatile re-declaration. - -2000-07-18 Jakub Jelinek - - * calls.c (store_arg): Return nonzero if sibcall_failure is desired. - (expand_call): Adjust caller. - -2000-07-17 Gabriel Dos Reis - - * diagnostic.h (report_diagnostic): Change prototype. - - * diagnostic.c (output_do_verbatim, diagnostic_for_asm, - diagnostic_for_decl): Change prototype. - (error_with_decl, warning_with_decl, pedwarn_with_decl, warning, - error, warning, error_with_file_and_line, - warning_with_file_and_line, pedwarn_with_file_and_line, fatal): - Adjust call to report_diagnostic, diagnostic_for_decl. - (error_for_asm, warning_for_asm): Adjust call to diagnostic_for_asm. - (output_verbatim, verbatim): Adjust call to output_do_verbatim. - - * c-errors.c (pedwarn_c99): Adjust call to report_diagnostic. End - varaible argument list. - -2000-07-17 Zack Weinberg - - * cpphash.c: Don't include hashtab.h. Most macro-handling code - moved to cppmacro.c. - (hash_HASHNODE, eq_HASHNODE, _cpp_dump_macro_hash, - dump_hash_helper): Delete. - (expand_hash, higher_prime_number, _cpp_lookup_with_hash, - cpp_forall_identifiers): New. Implement specialized version of - Vlad's expandable hash table. - (cpp_lookup): Use new functions. - (_cpp_init_macros, _cpp_cleanup_macros): Adjust for new - implementation. - * cppmacro.c: New file. - * cppinit.c (dump_macros_helper): New. - (cpp_finish): Iterate over the identifier table directly. - * cpplex.c (parse_name): Calculate the hash of the identifier - while we scan it. Use _cpp_lookup_with_hash when we can. - - * cpphash.h: Update prototypes. - (xcnewvec, HASHSTEP): New helper macros. - * cpplib.h: Update prototypes. - * Makefile.in (LIBCPP_OBJS): Add cppmacro.o. - (cppmacro.o): New rule. - (cpphash.o): Update deps. - - * cppmain.c: Do not set pfile->printer if no_output is on. - -2000-07-15 Neil Booth - - * cpplib.c: Change all directive-handler functions to return - void, not int. - * cpphash.h: Update typedefs. - -2000-07-17 Geoffrey Keating - - * configure: Regenerate. - - * extend.texi (Extended Asm): Mention that a memory clobber - does not count as a side-effect. - - * unroll.c (copy_loop_body): Fix one instance of using host - arithmetic on the target; fixes loop-4 on a 32-bit -> 64-bit - cross-compile. - - * tlink.c (scan_linker_output): Tweak for output of AIX ld. - -2000-07-17 Richard Henderson - - * config/ia64/ia64.md (movdi): Split out load address code. - New post-reload splitter for symbolic operands. - (movdi_internal): Abort if we didn't split symbolic operands - when we should have. - * config/ia64/ia64.c (ia64_expand_load_address): New, from movdi bits. - (ia64_reorg): Split insns when not optimizing. - * config/ia64/ia64-protos.h (ia64_expand_load_address): Declare. - -Mon Jul 17 23:43:26 MET DST 2000 Jan Hubicka - - * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use LONG_DOUBLE_TYPE_SIZE - instead of MAX_LONG_DOUBLE_TYPE_SIZE to decide output format. - -2000-07-17 Chandrakala Chavva - - * loop.c (check_dbra_loop) : Changed loop_continue to loop->cont. - -2000-07-17 Jason Merrill - - * Makefile.in (clean): Remove libgcc directory. - - * configure.in (-Wno-long-long check): Use higher-level macros. - -2000-07-17 Zack Weinberg - - * simplify-rtx.c (simplify_binary_operation): Recognize - (compare (gt[u] (cc) 0) (lt[u] (cc) 0)). - (simplify_ternary_operation): Do not examine MODE_BITSIZE of - a CONST_INT, it will always be zero. - -2000-07-17 Chandrakala Chavva - - * loop.c (check_dbra_loop) : Return if more than one condition is - present to control the loop. - -Mon Jul 17 08:26:35 2000 Clinton Popetz - - * mips.c (mips_expand_prologue): Don't calculate the last argument - register unless we need it. When we are calculating this, make - sure FUNCTION_ARG is giving us a REG. - -2000-07-17 Stephane Carrez - - * flow.c (libcall_dead_p): Use single_set to verify the insn - has only one set and get for analysis. - (propagate_one_insn): Don't pass the PATTERN of the insn. - -2000-07-17 Mark Klein - - * pa.c (emit_hpdiv_const): Update to match new pattern for udivsi3. - -2000-07-17 J. David Anglin - - * Makefile.in (TARGET_GETGROUPS_T): New configuration variable. - * configure.in (TARGET_GETGROUPS_T): Evaluate. - * sys-protos.h (getgroups): Use TARGET_GETGROUPS_T for array type - of second argument of getgroups. - * configure, config.in: Rebuilt. - -2000-07-17 Geoffrey Keating - - * simplify-rtx.c (simplify_relational_operation): Two signed - values with equal high words are less/greater than each other if - their low words are less/greater when considered as unsigned. - -Mon Jul 17 02:37:06 2000 Marc Espie - - * configure.in (vax-*-openbsd): Change to new style configuration, - add collect2/float_format information. - * configure: Rebuilt. - * config/vax/openbsd1.h: New. - * config/vax/openbsd.h: New. - * config/vax/t-openbsd: New. - -2000-07-17 Chip Salzenberg - - * c-common.c (shorten_compare): Quiet warnings about unsigned - comparisons with zero when they occur in a system header. - -2000-07-17 Joseph S. Myers - - * invoke.texi (-pedantic): Refer to ISO C instead of ANSI C, and - update to describe current practice. - - * glimits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define for C99. - - * contrib.texi, cpp.texi, extend.texi, invoke.texi: Update - references to C9X. Change references to -fstd and -flang-isoc9x - to refer to -std. - - * c-common.c (scan_char_table): Allow "z" length modifiers on - diouxXn formats. - (check_format_info): Use TYPE_DOMAIN on the type matched against - for "z" formats, to retrieve the language size_t rather than the - internal one. - - * c-common.c (check_format_info): Do not make a pedantic objection - to the 'L' length modifier if used with a floating point type - character. - - * c-lex.c (yylex): Don't pedwarn for hexadecimal floating point - constants in C99 mode. - -2000-07-17 Kazu Hirata - - * h8300.md: Fix the format of mac. - (movsi_h8300hs): Output a tab after stmac instead of a space. - - * h8300.c (two_insn_adds_subs_operand): Improve code for detecting - profitable adds/subs sequences. - - * fold-const.c: Fix comment typos. - -2000-07-16 Laurynas Biveinis - - * cppfiles.c (read_name_map): Set map_list_ptr->map_list_map to NULL. - -2000-07-16 Kaveh R. Ghazi - - * fixinc/fixfixes.c (emit_gnu_type): Avoid string concatenation. - -2000-07-16 Neil Booth - - * cpplex.c: Update comments. - * README.Portability: Small update. - -2000-07-16 Neil Booth - - * README.Portability: Small update. - -2000-07-15 Richard Henderson - - * config/ia64/ia64-protos.h (ia64_move_ok): Prototype. - * config/ia64/ia64.c (ia64_move_ok): New function. - * config/ia64/ia64.md (movqi, movqi_internal): Use it. - (movhi, movsi, movdi, movsf, movdf, movxf): Likewise. - -2000-07-15 Zack Weinberg - - * cpphash.c (save_expansion): Clear PREV_WHITE on tokens - immediately following a paste operator. - * cppinit.c (sort_options): New function (only for HOST_EBCDIC). - (cpp_reader_init): Call it, if HOST_EBCDIC. - (cpp_handle_options): Do not sort option list here. - (handle_option): Rename to cpp_handle_option and export. - * cpplex.c (cpp_scan_buffer_nooutput, cpp_scan_buffer): Use - _cpp_get_token directly. - (cpp_scan_line): Return 0 at EOF, 1 otherwise. - * cpplib.c (cpp_push_buffer): Don't set new->lineno to 1. - * cpplib.h: Prototype cpp_handle_option. Update prototype of - cpp_scan_line. - -2000-07-15 Richard Henderson - - * fold-const.c (extract_muldiv): Don't optimize past an unsigned - cast around an expression. Tidy other unsigned tests. - -2000-07-15 Gabriel Dos Reis - - * diagnostic.c (doing_line_wrapping, line_wrapper_printf, notice, - v_error_with_decl, v_warning_with_decl, v_pedwarn_with_decl): Remove. - (v_message_with_decl): Rename to ... - (format_with_decl): ... this. Tweak - (diagnostic_for_decl): New function. - (fatal_io_error): Use verbatim in lieu of notice. - (announce_function): Use verbatim. - (default_print_error_function): Likewise. - (error_with_decl, warning_with_decl, pedwarn_with_decl): Use new - infratructure. - -2000-07-15 Kaveh R. Ghazi - - * mips.c (function_arg_pass_by_reference): Don't do automatic - aggregate initialization. - (machine_dependent_reorg): Initialize variable `mode'. - - * mips.md (absdi2): Change variable `regno1' to unsigned int. - (reload_indi): Rename loword/hiword to lo_word/hi_word to avoid - conflicts with sys/param.h macro of the same name. - (reload_outdi): Likewise. - -2000-07-15 Michael Meissner - - * fold-const.c (fold): When optimizing FOO++ == CONST into ++FOO - == CONST + INCREMENT, don't overwrite the tree node for FOO++, - create a new node instead. - -2000-07-15 Neil Booth - - * README.Portability: Correct example about calling a function - through a pointer to function. Format wide paragraphs. - -2000-07-15 Michael Meissner - - * README.Portability: Update integer suffixes and function - prototype sections. - -2000-07-15 Neil Booth - - * README.Portability: Small update. - -2000-07-15 Neil Booth - - * README.Portability: New file. - -Fri Jul 14 18:13:53 2000 Mark P Mitchell - - * INSTALL: Give special instructions for building GCC on Irix 6. - * config/mips/x-iris6 (CC): Don't set it. - (OLDCC): Likewise. - -2000-07-14 Jason Merrill - - * dwarf2out.c (dwarf2out_frame_debug_expr): If we store the CFA - register in the stack and later in another register, use the new - register. - -Fri Jul 14 10:25:53 2000 Clinton Popetz - - * config/mips/mips.md: (absdi2): Handle sign_extend for - second operand. - -2000-07-14 Nathan Sidwell - - * cpplib.c (do_pragma_dependency): Tidy warning messages. - -2000-07-14 Zack Weinberg - - * .cvsignore: Correct typo. - -2000-07-13 Mark Mitchell - - * .cvsignore: Add generated YACC files. - * objc/.cvsignore: New file. - -2000-07-14 Neil Booth - - * cpplex.c (adjust_column): New function. - (skip_whitespace): Use it. - (skip_block_comment): Use it, and warn about /*/* with - -Wcomments. - -2000-07-14 Neil Booth - - * cpphash.c (struct macro_info): Add new members. - (_cpp_free_definition): Delete the macro directly. - (count_params): Return void, with first token of - expansion in struct macro_info on success. - (parse_define): Return int. Hoist syntax checking from - save_macro_expansion. Leave call to save_expansion to - _cpp_create_definition. - (alloc_macro): Needs just 2 arguments. - (free_macro): Delete. - (save_expansion): Don't perform syntax check. - (_cpp_create_definition): Call save_expansion. - -2000-07-13 Kaveh R. Ghazi - - * genrecog.c (write_header): Split long string. - - * cpphash.c (macro_info): Don't use the `signed' keyword. - - * system.h (alloca): Prototype if __GNUC__ && __SIZE_TYPE__. - -2000-07-13 Jakub Jelinek - - * calls.c (stored_args_map): New variable. - (check_sibcall_argument_overlap_1): New. - (check_sibcall_argument_overlap): New. - (expand_call): Initialize stored_args_map. - Call check_sibcall_argument_overlap. - -2000-07-13 Bruce Korb - - * fixinc/fixfixes.c: move EXIT_BROKEN to header, add sub-expr max count - (emit_gnu_type): utility procedure for gnu_type_fix - (gnu_type_fix): implement various pre-processor guards around - standard types so these types can be defined over and over - * fixinc/fixincl.tpl: add a "gnu_type_map" that forces the standard - types alluded to above will have GNU-compliant base types - * fixinc/fixlib.h: add EXIT_BROKEN define and the gnu_type_map struct - * fixinc/inclhack.def: add test_text entries and utilize the new - "gnu_types" fix for the ptrdiff_t, size_t and wchar_t types. - * fixinc/fixincl.x: regenerate - -2000-07-12 Gabriel Dos Reis - - * diagnostic.c (vline_wrapper_message_with_location, - v_message_with_file_and_line, v_error_with_file_and_file, - v_error_for_asm, v_warning_for_asm, vfatal, - v_warning_with_file_and_line, v_pedwarn_with_file_and_line, - vsorry, verror, vwarning, vpedwarn): Remove. - (diagnostic_for_asm): New function. - (pedwarn, error, warning, pedwarn_with_file_and_line, - error_with_file_and_line, warning_with_file_and_line, sorry, - error_for_asm, warning_for_asm, fatal): Reimplement. - (finish_diagnostic): Clear diagnostic info as well. - -2000-07-13 Neil Booth - - * c-common.h (flag_digraphs): New. - * c-decl.c (c_decode_option): Set flag_digraphs as appropriate. - * c-lex.c (yylex): Use flag_digraphs to decide whether to - honor digraphs. - -2000-07-13 Zack Weinberg - - * gcc.c (do_spec_1): Add new %B operator. - (set_input): Prepare for %B. - - (link_command_spec): Move up with the other tm.h- - overrideable specs. Factor out the portion conditional on - LINK_LIBGCC_SPECIAL into a new spec, %(link_libgcc). - (struct compiler): Just have a single spec string. All users - updated. - (default_compilers): Remove unnecessary braces. - (static_specs): Update. - - (trad_capable_cpp, cpp_options, cc1_options, asm_options): New - named specs. - (C and assembly specs): Use the new named specs, as appropriate. - - * objc/lang-specs.h: Use the new named specs. - Remove unnecessary braces. - -2000-07-12 Zack Weinberg - - * gcc.c (execute): If a subprocess gets a fatal signal, report - strsignal() of the signal number, and ask for a bug report. - Do not do this for SIGPIPE if there's already been an error. - - * tradcpp.c: Don't include signal.h. Don't catch SIGPIPE. - Delete pipe_closed. - - * tradcif.c: Remove. - -2000-07-12 Zack Weinberg - - * final.c (profile_function): Do not emit profile counters in - the data section, if NO_PROFILE_COUNTERS is defined. - * tm.texi: Document NO_PROFILE_COUNTERS. Update doc for - FUNCTION_PROFILER. - - * config/i386/linux.h (NO_PROFILE_COUNTERS): Define. - (FUNCTION_PROFILER): Just emit a call to mcount. - -2000-07-12 Zack Weinberg - - * tradcpp.c (main): Rename 'perror' label to 'sys_error'. - - * cppexp.c, cpphash.c, cpphash.h, cppinit.c, cpplex.c, - cpplib.c, cpplib.h: Eradicate all traces of code dependent on - traditional, lang_chill, or lang_fortran. - - * cppfiles.c: #undef strcmp to suppress warning about macros - used without arguments. - (_cpp_execute_include): Use f, not fname, in "No include path" - error. - (_cpp_pop_file_buffer): New function. - * cpplib.c: Don't include . - (cpp_push_buffer): Set line_base and lineno in new buffer. - (cpp_pop_buffer): Use _cpp_pop_file_buffer. - - * cpplex.c: Move all prototypes and structure declarations to the - top of the file. Properly parenthesize some macro arguments. - (cpp_scan_line): New function. - (special_symbol [case T_INCLUDE_DEPTH]): Use pfile->include_depth, - don't need to walk up the stack counting. - -2000-07-12 Kaveh R. Ghazi - - * c-common.c (combine_strings): Emit a pedantic warning when a - string length is greater than the minimum ANSI C is required - to support. - -Wed Jul 12 13:24:30 2000 Jeffrey A Law (law@cygnus.com) - - * pa/xm-pa64.h (NO_SYS_SIGLIST): Kill. - * d30v/xm-d30v.h (NO_SYS_SIGLIST): Kill. - -2000-07-12 Kaveh R. Ghazi - - * c-decl.c (define_label): Warn about identifier conflicts with - labels in traditional C. - - * c-parse.in (unop +): Warn about the unary plus operator for - traditional C. - - * c-typeck.c (store_init_value): Warn about automatic aggregate - initialization for traditional C. - - * invoke.texi (-Wtraditional): Document new warnings. - -2000-07-12 Gabriel Dos Reis - - * Makefile.in (c-errors.o): Fix thinko in dependency. - -2000-07-12 Zack Weinberg - - * gcc.c (C specs [!USE_CPPLIB]): Invoke tradcpp if any of - -traditional, -ftraditional, or -traditional-cpp was given. - Do not pass -traditional to the preprocessor. - (.S spec): Likewise. Don't bother defining __ASSEMBLER__, the - preprocessor does it automatically. - * objc/lang-specs.h: Likewise. Don't bother defining __OBJC__. - - * ch/lang-specs.h: Always use tradcpp. Do not pass - -traditional, -trigraphs, or -pedantic to the preprocessor. - * f/lang-specs.h (.F spec): Likewise. Don't bother defining - _LANGUAGE_FORTRAN. - -2000-07-12 Zack Weinberg - - * cppexp.c (LOGICAL): Delete macro. - (_cpp_parse_expr): Do not use UNARY for unary +. Implement || - and && directly. - - * cpphash.c (HASHSIZE): Increase to 4096. - (struct hashdummy): Add hash field. - (eq_HASHNODE): Compare unreduced hashes, then lengths, then - the string values using memcmp. - (cpp_lookup): Set dummy.hash. - -Wed Jul 12 13:15:16 2000 Marc Espie - - * configure.in (m88k-openbsd): Express configuration using new fragment - style. - * configure: Rebuilt. - * m88k/aout-dbx.h: New. - * m88k/openbsd.h: New. - * m88k/xm-openbsd.h: New. - -2000-07-12 Kaveh R. Ghazi - - * expr.c (expand_expr): Return const0_rtx, not error_mark_node. - -2000-07-12 Richard Henderson - - * reload.c (push_secondary_reload): Make sure to add the new - reload at the end, after acquiring secondary memory. - -2000-07-12 Kaveh R. Ghazi - - * cpplex.c (is_macro_disabled): Use CPP_WTRADITIONAL. - - * c-decl.c (set_current_function_name_declared, anon_aggr_type_p, - lang_expand_stmt): Mark parameters with ATTRIBUTE_UNUSED. - - * c-parse.in (stmt): Delete unused variables. - - * convert.c (convert_to_vector): Likewise. - - * gensupport.c (process_rtx): Declare attr as `rtvec' not `rtx'. - - * tree.c (finish_vector_type): Prototype. - -2000-07-12 Bruce Korb - - * fixinc/fixfixes.c: use xmalloc - * fixinc/fixincl.c(initialize): set program name for xmalloc - * fixinc/fixlib.c(must_malloc): obsolete - (is_cxx_header): no longer used - disabled - (skip_quote): inserted and disabled for future use - * fixinc/fixlib.h: reflects above - * fixinc/fixtests.c: removed dinkleberries - -2000-07-12 Neil Booth - - * cpphash.h: (TOKEN_SPELL) Pulled from cpplex.c. - * cpplex.c (TOKEN_SPELL) Move to cpphash.h. - - * cpphash.c: (struct macro_info, alloc_macro, free_macro, - struct toklist_dummy): New. - (cpp_free_definition): Free macros with free_macro. - (count_params): Don't save parameter spellings. Save macro - information in a struct macro_info. - (parse_define): Don't allocate a token list. - (save_expansion): Allocate the macro's token list, and - save parameter spellings if necessary. Use TOKEN_SPELL. - (cpp_create_definition): Make list const. - -2000-07-12 Gabriel Dos Reis - - * c-typeck.c (pedwarn_c99): Move to - * c-errors.c: ... Here. - * toplev.h (verror, vwarning, vpedwarn): Remove prototypes. - * diagnostic.c (verror, vwarning, vpedwarn): Make static. - * Makefile.in (C_AND_OBJC_OBJS): Include c-errors.o - (c-errors.o): List dependency. - -2000-07-12 Mark Mitchell - - * c-parse.c: Remove. - * c-parse.h: Likewise. - * c-parse.y: Likewise. - * objc/objc-parse.c: Likewise. - * objc/objc-pasre.y: Likewise. - -2000-07-11 Rodney Brown - - * gcc.texi: Fix minor typos - * extend.texi: Fix minor typos - -2000-07-11 Marc Espie - - * collect2.c (main): Recognize .lo as object files. - -2000-07-11 J. David Anglin - - * pa.c (hppa_encode_label): Store labels in gc memory when ggc_p is - true. - - * aclocal.m4 (AC_FUNC_MMAP_ANYWHERE): Extend test to detect systems - with MAP_ANONYMOUS and MAP_ANON. - * configure, config.in: Rebuilt. - -2000-07-12 Gabriel Dos Reis - - * diagnostic.c (save_output_state): Remove. - (restore_output_state): Likewise. - (clear_text_info): New function. - (clear_diagnostic_info): Likewise. - (output_text_length, is_starting_newline, output_prefix, - line_wrap_cutoff, ideal_line_wrap_cutoff, prefix_was_emitted_for, - prefixing_policy, output_buffer_ptr_to_format_args): New macros - (set_real_maximum_length, output_set_maximum_length, - output_set_prefix, output_get_prefix, output_set_maximum_length, - output_destroy_prefix, init_output_buffer, - reshape_diagnostic_buffer, output_space_left, output_emit_prefix, - output_add_newline, output_add_character, output_add_space, - output_append_r, output_append, wrap_text, output_format, - output_do_printf, output_printf, output_do_verbatim, - output_verbatim, verbatim): Use them. - (output_clear): Split into cleat_text_info and - clear_diagnostic_info. - (struct output_state): Move to... - - * diagnostic.h: ...Here - (struct output_buffer): Adjust. - -2000-07-11 Zack Weinberg - - * cpplex.c (parse_name): No longer inline (premature optimization). - (do_pop_context): Fold into pop_context. - (pop_context): Returns int. - (lex_next): Hoist test for end of directive into pop_context. - (push_macro_context): Returns int; takes just reader and token. - Hoist test for excessive nesting to caller. - (push_arg_context): Returns void; takes just reader and token. - Do not call stringify_arg or get_raw_token. - (get_raw_token): Convert tail recursion through push_arg_context - to a loop at this level. Call stringify_arg here if appropriate. - (maybe_paste_with_next): Convert tail recursion to a while loop. - Hoist test of paste_level to caller. - - (stringify_arg): Push arg context at beginning. - (cpp_get_token): Split out core into _cpp_get_token. Call - process_directive here. Throw away CPP_PLACEMARKER tokens. - (_cpp_get_token): Convert tail recursion through - push_macro_context to a loop at this level. - (_cpp_glue_header_name, is_macro_disabled, stringify_arg, - _cpp_get_raw_token): Use _cpp_get_token. - (_cpp_skip_rest_of_line): Drop the context stack directly; do - not call pop_context. - (_cpp_run_directive): Call lex_next directly. - - * cpphash.h: Prototype _cpp_get_token. - * cppexp.c (lex): Use it. - * cpphash.c (parse_define): Use it. - * cpplib.c (get_define_node, do_undef, parse_include, - read_line_number, do_line, do_ident, do_pragma, do_pragma_gcc, - do_pragma_implementation, do_pragma_poison, do_pragma_dependency, - parse_ifdef, validate_else): Use it. - (cpp_push_buffer): Tweak error message; abort if anyone tries - to push a buffer while macro expansions are stacked. - -2000-07-11 Donn Terry - - * cpplex.c (free_macro_args, save_token): Cast arg of free - and/or xrealloc to PTR. - (_cpp_init_input_buffer): Clear all fields of the base context. - -Tue Jul 11 15:28:21 CDT 2000 Clinton Popetz - - * gensupport.c (process_rtx): Make rtl checking stop - complaining about the define_insn while it is being - converted from a define_insn_and_split. - -Tue Jul 11 16:26:17 2000 Clinton Popetz - - * config/mips/mips.c (simple_memory_operand): Access the - INTVAL of the address, not it's containing MEM. - -2000-07-11 Bruce Korb - - * fixinc/fixtests.c(double_slash): obsolete - (else_endif_label): likewise - * fixinc/inclhack.def(irix_multiline_cmnt): obsolete - (libc1_ifdefd_memx): correct initial comment - and omit the #if/#endif pair from the memxxx declarations - * fixinc/fixincl.x: regen - -2000-07-11 Kaveh R. Ghazi - - * cpplex.c (T, I, S, C, N): Avoid non-constant initializers. - -2000-07-11 Neil Booth - - * cpp.texi: Update. - -2000-07-11 Neil Booth - - * cppinit.c: (cpp_reader_init): Allow digraphs by default. - (handle_option): Set digraphs according to standard. - Merge OPT_lang_c89 handler with OPT_std_c89. - - * cpplex.c: (lex_line, can_paste): Honor digraphs in - accordance with the digraphs flag. - - * cpplib.h: (struct cpp_options): New option digraphs. - -2000-07-10 Hans-Peter Nilsson - Bruce Korb - - * fixinc/inclhack.def (libc1_ifdefd_memx): New fix. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/testing.h: Add testcase. - -2000-07-10 Richard Henderson - - * config/ia64/ia64.c (got_symbolic_operand): New. - (symbolic_operand, move_operand): Revert 0701 change. - * config/ia64/ia64.h (PREDICATE_CODES): Update. - * config/ia64/ia64-protos.h (got_symbolic_operand): Declare. - * config/ia64/ia64.md (movdi): Revert 0701 wrt symbolic_operand; - split the offset into a 14-bit low part instead of a 13-bit low part. - (load_fptr): Mark the mem as unchanging. - (load_symptr): Use got_symbolic_operand. - -2000-07-10 Nick Clifton - - * libgcc2.c (next_stack_level): Cast result of computation to - (void **) so that the assignment does not generate a warning. - -2000-07-10 Chandrakala Chavva - - * flags.h : Add new variable flag_single_precision_constant. - * toplev.c (display_help) : Add -fsingle-precision-constant option. - (flag_single_precision_constant): New. - * c-lex.c (yylex): Convert floating point constant to single - precision constant. - * invoke.texi : Add documentation for this new option. - -2000-07-10 Gabriel Dos Reis - - * diagnostic.c (output_octal): Second parameter is unsigned. - (output_long_octal): Likewise. - (output_hexadecimal): Likewise. - (output_long_hexadecimal): Likewise. - (output_format): Adjust arguments extraction. Tweak. - (output_verbatim, verbatim): End variable argument list. - (report_diagnostic): Improve documentation. - -2000-07-10 Benjamin Chelf - - * c-common.h (build_stmt): Declare. - (build_continue_stmt): Likewise. - (build_break_stmt): Likewise. - (build_return_stmt): Likewise. - - * c-decl.c (do_case): Rewrite to do what previously done in - c-parse.in. - - * c-semantics.c (build_stmt): Define. - (build_return_stmt): Likewise. - (build_break_stmt): Likewise. - (build_continue_stmt): Likewise. - (build_case_label): Likewise. - - * c-parse.in (BREAK): Change to build tree, then generate RTL. - (CONTINUE): Likewise. - (RETURN): Likewise. - (CASE): Likewise. - (DEFAULT): Likewise. - - * c-parse.y: Regenerate. - * c-pasre.c: Likewise. - -2000-07-09 Jason Merrill - - * expr.c (expand_expr): Bail earlier if we get an error_mark_node. - - * tree.h (STRIP_NOPS): Check for error_mark_node. - (STRIP_SIGN_NOPS, STRIP_TYPE_NOPS): Likewise. - (dwarf2out_*): Remove duplicate declarations. - - * c-decl.c (duplicate_decls): Copy DECL_ABSTRACT_ORIGIN from - DECL_ABSTRACT_ORIGIN, not DECL_ORIGIN. - -2000-07-10 Gabriel Dos Reis - - * diagnostic.c (wrap_text): New function. - (maybe_wrap_text): Likewise. - (output_add_string): Use it. - (output_format): Likewise. - (count_error): Use verbatim instead of notice. - (report_error_function): Likewise. Don't use plain fprintf. - (finish_diagnostic): New function. - (output_do_verbatim): Tweak. Commonalize functionalities in - output_verbatim and verbatim. - (output_verbatim): Adjust. - (verbatim): Likewise. - (report_diagnostic): Define. - - * diagnostic.h (report_diagnostic): Prototype. - -2000-07-09 Zack Weinberg - - * cppexp.c (_cpp_parse_expr): Don't use unary plus. - -2000-07-09 Neil Booth - - * cpphash.h: ISvspace, is_vspace, is_nvspace: New. - IShspace, ISspace: Update. - - * cppinit.c: ISTABLE: Update. - V: New. - - * cpplex.c (IS_HSPACE, S_NEWLINE): Remove. - (IS_DIRECTIVE): Rename KNOWN_DIRECTIVE. - (skip_block_comment, skip_line_comment, parse_string, - lex_line): Use is_vspace rather than IS_NEWLINE. - (skip_whitespace, lex_line): Clean up to use is_nvspace. - (lex_line): Use KNOWN_DIRECTIVE. Any kind of directive - gets a BOL flag. - (lex_next): Unconditionally stop if within a directive. - Treat directives within macro invocations as directives - (after parse_args emits error), not as the argument. - -2000-07-09 Gabriel Dos Reis - - * diagnostic.c (diagnostic_args): New macro. - (diagnostic_msg): Likewise. - (output_formatted_integer): Likewise. - (output_state): New data type. - (digit_buffer): Make global. - (output_add_integer): Rename to output_decimal. Squeeze - digit_buffer. - (output_long_decimal, output_unsigned_decimal, - output_long_unsigned_decimal, output_octal, output_long_octal, - output_hexadecimal, output_long_hexadecimal): New functions. - (output_append_r): New function. - (output_append): Tweak. - (output_flush_on): Rename to output_to_stream. - (output_format): Change prototype. Improve documentation. Handle - more format specifiers. - (build_location_prefix): Rename to context_as_prefix. - (output_notice): Rename to output_do_printf. - (output_printf): Tweak. - (line_wrapper_printf): Likewise. - (vline_wrapper_message_with_location): Adjust call to renamed - functions. - (v_message_with_decl): Likewise. - (default_print_error_function): Likewise. - (save_output_state): New function. - (restore_output_state): Likewise. - (output_do_verbatim): Likewise. - (output_verbatim): Define. - (verbatim): Likewise. - - * diagnostic.h (printer_fn): Change return type from void to int. - Improve documentation. - (output_add_integer): Rename to output_decimal. - (output_flush_on, output_format): Don't export. - (output_verbatim, verbatim): Declare. - -2000-07-08 Toon Moene - - * fold-const.c (extract_muldiv) case PLUS_EXPR, MINUS_EXPR: - Check whether c divides op1 exactly if operation is not - multiplication. - -2000-07-08 Richard Henderson - - * final.c (final): Do not abort when reg-stack introduces - a new insn. - -2000-07-08 Zack Weinberg - - * cpplib.h (struct cpp_name): Now struct cpp_string. - (CPP_INT, CPP_FLOAT, CPP_NUMBER, CPP_COMMENT, - CPP_HEADER_NAME): Change to type S. - (struct cpp_token): Rename 'name' field to 'str'. Add 'node' - field, a cpp_hashnode *. All references to val.name updated - to use val.str or val.node as appropriate. - (struct cpp_reader): Add spec_nodes field. - (cpp_idcmp): Now cpp_ideq; takes a token * and a char *. - - * cpphash.h (struct spec_nodes): New. - (enum spell_type): Reorder. Only SPELL_STRING tokens use - val.str. All references to 'spelling > SPELL_NONE' updated to - match. - - (CPP_IN_SYSTEM_HEADER): Check pfile->buffer and - pfile->buffer->inc are not NULL before dereferencing them. - - * cpplex.c (parse_name): Take a pointer to the current token, - plus current position and limit as args; return the new - position; don't copy the text of a name into the string - buffer, instead call cpp_lookup and store the node pointer. - If extending a token, copy out the text of the old into a - scratch buffer, append the new, look that up and store the new - node pointer. Inline. - (maybe_paste_with_next): If the result of paste is a NAME, - then look up the pasted text and store its node pointer. - (lex_line): Adjust for new parse_name interface. - Check for L"str", L'str' using spec_nodes->n_L. - (spell_token): SPELL_IDENT tokens have their spelling in - val.node->name. Handle SPELL_STRING tokens that don't have - string delimiters. - (_cpp_expand_name_space, - (can_paste): Check for L ## "str" using spec_nodes->n_L. - (cpp_get_token, special_symbol): No need to call cpp_lookup. - (cpp_idcmp): Now cpp_ideq; take a token * and a const char *; - return 1=equal 0=not, not a tristate. - - * cpphash.c (var_args_str): Delete. - (find_param): Compare node fields directly. - (is__va_args__): Use CPP_PEDANTIC. Just compare - token->val.node with spec_nodes->n__VA_ARGS__. - (dump_funlike_macro): Don't use var_args_str. - - * cpplib.c (_cpp_check_directive): Just walk through - spec_nodes->dirs comparing pointers. - (get_define_node, do_pragma_poison, detect_if_not_defined, - parse_ifdef): The identifier has already been looked up. - (do_ifdef, do_ifndef): parse_ifdef won't return a poisoned - node. - (do_if): Only call detect_if_not_defined at beginning of file. - (_cpp_parse_assertion): Only copy string pointers for - SPELL_STRING tokens. - (pragma_dispatch): Take a node pointer and examine its name - field. - (_cpp_init_stacks): Also initialize the spec_nodes structure. - - * cppinit.c (cpp_reader_init): Call _cpp_init_stacks after - _cpp_init_macros. - (cpp_cleanup): Free pfile->spec_nodes. Call _cpp_cleanup_* in - reverse order from the corresponding _cpp_init_* routines. - - * cppexp.c (parse_number, parse_charconst, parse_defined, - lex): Check val.node->type instead of calling cpp_defined. - Use spec_nodes entries where appropriate. - - * fix-header.c, scan-decls.c: Update for interface changes. - -2000-07-08 Geoffrey Keating - - * config/rs6000/rs6000.c (rs6000_emit_move): Fix conditions for - emitting aux_truncdfsf2. - -2000-07-03 Donn Terry (donnte@microsoft.com) - - * cppinit.c (print_help): split overlong line into ISO C89 - maximum chunks. - -2000-07-07 Zack Weinberg - - * cppexp.c: Update all code for new lexer interface. - (op_t, operator codes, struct token, tokentab2, op_to_str): Remove. - (struct suffix, vsuf_1, vsuf_2, vsuf_3, op_to_prio): New. - * cpplex.c (token_names): Trim leading CPP_ from names; make - the strings unsigned. - (_cpp_spell_operator): New. - (is_macro_disabled): Disable all macros if rescanning - preprocessed text. - (_cpp_get_directive_token): Remove. - - * cppinit.c: Don't set no_macro_expand. - * cpplib.c (read_line_number, do_line): Check only for EOF, - not VSPACE. - * cpphash.h: Update prototypes. - * cpplib.h (CPP_VSPACE): Remove. - (struct cpp_reader): Remove no_macro_expand. - -2000-07-08 Neil Booth - - * cpphash.c (is__va_args__): New function. - (count_params): Fix line reported in error messages. Use - is__va_args__. Don't return ')' on error. Flag GNU style - rest args macro definitions. - (parse_define): Check macro name is not __VA_ARGS__. - (save_expansion): Check identifier in non-varargs-macro is - not __VA_ARGS__. Don't flag GNU_VARARGS. - * cpplex.c (parse_args): Accept no argument iff GNU_REST_ARGS. - (maybe_paste_with_next): Use per-macro GNU_REST_ARGS rather - than per-token GNU_VARARGS. - * cpplib.h (GNU_VARARGS): Remove. - (GNU_REST_ARGS): New. - -Sat Jul 8 01:38:25 MET DST 2000 Jan Hubicka - - * i386.md (call_pop, call, call_value_pop): Do not set - current_function_uses_pic_offset_table for calls to static - functions or indirect calls. - -2000-07-07 Jim Wilson - - * config/ia64/ia64.c (rws_access_reg): New local write_count. If - is_predicate_reg, then take max write_count of register pair. - -2000-07-07 Kaveh R. Ghazi - - * tradcpp.c (main): Rename label `include' to `add_include' to - avoid conflicts with variable `include' in traditional C. - -2000-07-07 Jakub Jelinek - - * integrate.c (copy_insn_list): Remove REG_LABEL notes. - -2000-07-07 Jakub Jelinek - - * sibcall.c (uses_addressof): Add INMEM argument, check for - current_function_internal_arg_pointer outside of MEM rtxs in addition - to ADDRESSOFs. - (sequence_uses_addressof): Update caller. - -2000-07-07 Zack Weinberg - - * tradcpp.c (initialize_builtins): Honor NO_BUILTIN_SIZE_TYPE - and friends. - -2000-07-07 Kaveh R. Ghazi - - * system.h (UNION_INIT_ZERO): New macro for initializing union - members in structs. - - * cpplex.c (placemarker_token, eof_token): Use UNION_INIT_ZERO. - -2000-07-07 Neil Booth - - * cpp.texi: Update. - -Fri Jul 7 07:47:35 2000 Jeffrey A Law (law@cygnus.com) - - * final.c (final): Detect out of bounds array access to - the insn_lengths array. - -2000-07-07 Kazu Hirata - - * fold-const.c (fold): Fix a comment typo. - -2000-07-07 Neil Booth - - * cpp.texi: Update to new lexer. - -2000-07-06 Zack Weinberg - - * tradcpp.c: New file. - * tradcif.y: New file. - * tradcif.c: New generated file. - - * Makefile.in: Add rules to build tradcpp.o, tradcif.o, - $(srcdir)/tradcif.c. Add tradcpp to STAGESTUFF and - dependencies of C. Install tradcpp from install-common, in - $(libsubdir). - -2000-07-06 Zack Weinberg - - * cppinit.c: Include cppdefault.h. Refer to - cpp_GCC_INCLUDE_DIR and cpp_GCC_INCLUDE_DIR_len, not directly - to GCC_INCLUDE_DIR and its length. - (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, - USER_LABEL_PREFIX, REGISTER_PREFIX, struct default_include, - STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT): Move to - cppdefault.h. - (include_defaults_array): Move to cppdefault.c. - - * cppdefault.h: New file. - * cppdefault.c: New file. - - * Makefile.in (LIBCPP_OBJS): Add cppdefault.o. - (cppinit.o): Don't apply $(PREPROCESSOR_DEFINES) to this file. - (cppdefault.o): New rule; apply $(PREPROCESSOR_DEFINES) to - this file. - -Thu Jul 6 18:30:36 2000 Richard Kenner - - * reload.c (push_reload): When seeing if can reuse a register, - check extra registers against widest of INMODE and OUTMODE. - -2000-07-06 Neil Booth - - * cpplib.c: (_cpp_parse_assertion): Perform hash lookups - based on full length of predicate. - -2000-07-06 Hans-Peter Nilsson - - * timevar.c: [HAVE_SYS_RESOURCE_H]: Include . - [NEED_DECLARATION_GETRUSAGE]: Declare getrusage. - -2000-07-05 Kazu Hirata - - * h8300-proto.h: Fix formatting. - * h8300.c: Likewise. - * h8300.h: Likewise. - -2000-07-05 Jim Wilson - - * config/ia64/ia64.h (HARD_REGNO_MODE_OK): If FR_REGNO_P, disallow - CCmode. - -2000-07-05 Rodney Brown - - * invoke.texi: Fix minor typos - * md.texi: Fix minor typos - -2000-07-05 Zack Weinberg - - * cpplib.c (_cpp_parse_assertion): Fix buffer overrun. - -2000-07-04 Zack Weinberg - - * cpplex.c: Don't include sys/mman.h. - (cpp_push_buffer, cpp_pop_buffer): Moved to cpplib.c. - - * cpplib.c: Include sys/mman.h and obstack.h. - (cpp_push_buffer): Moved from cpplex.c; allocate buffers on an - obstack. - (cpp_pop_buffer): Moved from cpplex.c; free buffers from an obstack. - (_cpp_unwind_if_stack): Now static, unwind_if_stack. Don't - bother freeing if stack entries (they will be freed with their buffer). - (do_endif): Free if stack entries from the buffer obstack. - (push_conditional): Allocate if stack entries from the buffer obstack. - - (find_answer): Rename to _cpp_find_answer. - (do_assert, do_unassert): Update. - - * cpphash.h: Update prototypes. - (xobnew): New convenience macro. - * cpplib.h (struct cpp_reader): Add hash_ob and buffer_ob fields. - Update comments. - (struct cpp_hashnode): Remove disabled field. - - * cppinit.c: Don't include hashtab.h or splay-tree.h. - (report_missing_guard): Moved to cppfiles.c. - (cpp_reader_init): Call cpp_init_stacks, cpp_init_macros, - cpp_init_includes. - (cpp_cleanup): Call cpp_cleanup_stacks, cpp_cleanup_macros, - cpp_cleanup_includes. Don't destroy hashtab or - all_include_files here. - (cpp_finish): Use _cpp_report_missing_guards. - - * cppfiles.c (report_missing_guard): Moved from cppinit.c. - (_cpp_init_include_table): Rename _cpp_init_includes. - (_cpp_cleanup_includes, _cpp_report_missing_guards): New. - - * cppexp.c (parse_assertion): Update for new name of - find_answer. - - * Makefile.in (cpplib.o, cpphash.o, cppinit.o): Update deps. - -2000-07-04 Zack Weinberg - - * cpplib.c (do_ident): s/VSPACE/EOF/ - -2000-07-05 Neil Booth - - * cpplex.c: Fix trigraph replacement within strings. - -2000-07-04 Kaveh R. Ghazi - - * rs6000/aix.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier. - - * xcoffout.c (assign_type_number): Constify. - (xcoffout_source_file): Add static prototype. Don't needlessly - cast away const-ness. - -2000-07-04 Jason Merrill - - * frame.h (frame_state): Move base_offset to end. - -Mon Jul 3 21:31:43 2000 Clinton Popetz - - * calls.c (emit_library_call_value_1): Revert previous change. - -2000-07-03 Zack Weinberg - - * fix-header.c (struct partial_proto): Remove unnecessary fields. - (recognized_extern, recognized_function, read_scan_file): - Update for new scheme. - (check_protection): It's still a multiple include guard even - if it doesn't always trigger. - * scan-decls.c (skip_to_closing_brace, scan_decls): Update for - new scheme. - * scan.h: Declare struct cpp_token. Update prototypes. - -2000-07-03 Neil Booth - Zack Weinberg - - Complete overhaul of the lexer and macro expander. - - * cpphash.c (object_defn, funct_defn, push_macro_expansion, - arg, arglist, argdata, reflist, collect_objlike_expansion, - collect_funlike_expansion, collect_params, - warn_trad_stringify, trad_stringify, duplicate_arg_p, add_pat, - unsafe_chars, macarg, compare_defs, special_symbol, - scan_arguments, stringify, funlike_macroexpand, - _cpp_quote_string, monthnames): Delete. - (cpp_lookup, _cpp_free_definition, dump_funlike_macro, - _cpp_create_definition, _cpp_dump_definition, - dump_hash_helper): Adjust. - (find_param, count_params, parse_define, var_args_str, - check_macro_redefinition, save_expansion): New. - - * cpplex.c (skip_block_comment, skip_line_comment, parse_name, - parse_string, output_line_command, trigraph_replace, - lex_line, cpp_push_buffer, cpp_pop_buffer, cpp_output_tokens, - cpp_scan_buffer_nooutput, cpp_scan_buffer, cpp_free_toklist, - cpp_idcmp, _cpp_get_directive_token, _cpp_init_input_buffer, - _cpp_skip_rest_of_line): Modify. - - (maybe_macroexpand, skip_comment, copy_comment, skip_string, - find_position, null_warning, bump_column, expand_name_space, - pedantic_whitespace, _cpp_output_list, _cpp_slice_toklist, - _cpp_squeeze_toklist, _cpp_scan_until, _cpp_skip_hspace, - _cpp_parse_name, _cpp_lex_token, cpp_get_non_space_token, - _cpp_prescan): Delete. - - (dump_param_spelling, process_directive, lex_next, - is_macro_disabled, stringify_arg, expand_context_stack, - output_token, make_string_token, alloc_number_token, - special_symbol, duplicate_token, maybe_paste_with_next, - can_paste, prevent_macro_expansion, restore_macro_expansion, - get_temp_token, release_temp_tokens, quote_string, - token_names, token_spellings, _cpp_expand_name_space, - _cpp_glue_header_name, _cpp_reserve_name_space, - digraph_spellings, trigraph_ok, skip_whitespace, save_comment, - placemarker_token, eof_token, cpp_context, macro_args, - get_raw_token, parse_arg, parse_args, save_token, - push_arg_context, push_macro_context, pop_context, - do_pop_context, free_macro_args, _cpp_get_line, - _cpp_run_directive): New. - - * cpplib.c (validate_else, parse_include, push_conditional, - pass_thru_directive, read_line_number, parse_ifdef, - detect_if_not_defined, _cpp_check_directive, do_define, - do_undef, do_include, do_import, do_include_next, do_error, - do_warning, do_ident, do_pragma, pragma_dispatch, gcc_pragmas, - top_pragmas, do_pragma_gcc, do_pragma_implementation, - do_pragma_poison, do_pragma_system_header, - do_pragma_dependency, do_sccs, do_ifdef, do_ifndef, do_else, - dl_elif, do_endif, _cpp_unwind_if_stack, do_assert, - do_unassert, cpp_define, cpp_undef, cpp_assert, cpp_unassert, - cpp_defined): Update for new scheme. - (strtoul_for_line, get_define_node, dump_macro_name, - _cpp_check_linemarker, _cpp_parse_assertion): New. - (_cpp_handle_directive, do_pragma_default): Delete. - - * cpphash.h (struct predicate): Now struct answer. - (enum spell_type, struct token_spelling, struct directive, - directive_handler): New. - Update prototypes. Remove unused macros. - * cpplib.h: Update prototypes. Remove unused macros, - structure definitions, and fields. - - * cpperror.c (print_containing_files, v_message): Adjust. - * cppexp.c (parse_assertion, lex, parse_escape, - _cpp_parse_expr): Adjust. - * cppfiles.c (open_include_file, _cpp_execute_include, - _cpp_compare_file_date, cpp_read_file, read_include_file): - Adjust. - * cppinit.c (dump_special_to_buffer): Delete. - (append_include_chain, merge_include_chains, cpp_reader_init, - cpp_cleanup, initialize_builtins, builtin_array, cpp_start_read, - cpp_finish, handle_option, print_help): Adjust. - * cppmain.c (main): Adjust. - -2000-07-03 Zack Weinberg - - * cppspec.c (lang_specific_driver): Use double quotes in error - message. - -Mon Jul 3 16:53:43 2000 Clinton Popetz - - * calls.c (emit_library_call_value_1): Use valreg instead - of hard_libcall_value. - -2000-07-03 Geoff Keating - - * config/rs6000/rs6000.c (rs6000_emit_move): New function. - * config/rs6000/rs6000-proto.h: Prototype rs6000_emit_move. - * config/rs6000/rs6000.md (movsi): Use rs6000_emit_move. - (movhi): Likewise. - (movqi): Likewise. - (movdf): Likewise. - (movsf): Likewise. - (movdi): Likewise. - (movti): Likewise. - - * expmed.c (expand_mult_highpart): Use op1 instead of wide_op1 when - mode instead of wider_mode is being used. - -2000-07-03 Jakub Jelinek - - * config/i386/i386.md (movstrictqi_xor): Use 'q' constraint instead - of 'r'. Use q_regs_operand. - (andsi_1+2): Use q_regs_operand. - -2000-07-03 Jakub Jelinek - - * builtins.c (get_memory_rtx): Always put into alias set 0. - -2000-07-03 Nick Clifton - - * config/arm/arm.md: Fix post increment and pre increment - peepholes so that they do not generate UNPREDICATBLE opcodes. - (ie ones where the increment clobbers the source/destination). - -2000-07-01 Marek Michalkiewicz - - * config/avr/avr.c (out_adj_frame_ptr): Make "frame pointer - change too big for -mtiny-stack" a warning, if larger than 63. - (out_set_stack_ptr): Change the logic so -mno-interrupts is - always safe to use on possible future devices. - (function_prologue): Write SPH before SPL, for consistency. - If interrupt_func_p true, we know we have enabled interrupts. - (avr_num_arg_regs): New function. Round up to even number of - bytes if no -mpack-args or if calling a libgcc function. - (function_arg, function_arg_advance): Use it. - (output_movsisf, ashlsi3_out, ashrsi3_out, lshrsi3_out): - Output "movw" if available. - (out_tsthi, out_tstsi, ashlqi3_out, lshrqi3_out): Change uses - of TEST_HARD_REG_CLASS macro to test_hard_reg_class function. - (asm_output_section_name): Add blanks for consistent output. - (encode_section_info): Set TREE_READONLY for progmem data to - avoid gas warnings about changed section attributes. - (avr_hard_regno_mode_ok): Force non-QImode data to start in - even numbered registers on devices with "movw". - * config/avr/avr.h (MASK_*): Define bits for target_flags. - (TARGET_SWITCHES): Mark help strings for translation. - Add new -mpack-args and -menhanced switches. - (TARGET_OPTIONS): Mark help strings for translation. - (progmem_section): Add section attributes. - * config/avr/avr.md (*movhi, call_insn, call_value_insn): - Output "movw" if available. - (mulqi3, mulqihi3, umulqihi3, mulhi3, *tablejump_enh): - New patterns. - * config/avr/libgcc.S (_mulqi3, _divqi3): Update to the new - call convention (arguments aligned on even registers). - (_cleanup, _exit): Make weak symbols libc can override. - -2000-07-03 Kaveh R. Ghazi - - * fp-bit.h: New file. - - * fp-bit.c: Move common code, prototypes, etc into fp-bit.h. - Comment #endif statements. - (__thenan_sf, __thenan_df): Add missing braces around initializer. - -Mon Jul 3 00:32:47 2000 Jeffrey A Law (law@cygnus.com) - - * gcse.c (compute_pre_data): Compute ae_kill using other local - properties instead of calling compute_ae_kill. - - * alias.c (init_alias_analysis): Do not call - prologue_epilogue_contains until after reload has completed. - -2000-07-02 Benjamin Chelf - - * c-common.h (genrtl_begin_compound_stmt): Remove declaration. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Change to return void. - - * c-semantics.c (genrtl_begin_compound_stmt): Remove function and - move code from here to ... - (genrtl_compound_stmt): ... here. - (genrtl_finish_compound_stmt): Remove. - (expand_stmt): Add comment. - -2000-07-02 Zack Weinberg - - * c-typeck.c (build_indirect_ref): Use COMPLETE_OR_VOID_TYPE_P - and VOID_TYPE_P. - -2000-07-02 Jakub Jelinek - - * cpplib.h (struct cpp_reader): New field include_depth. - (struct cpp_printer): Rename last_bsd to last_id. - * cppfiles.c (read_include_file): Bump include_depth. - * cpplex.c (cpp_pop_buffer): Decrement include_depth. - (output_line_command): Output correct #line if a header - is including itself and is not protected against multiple inclusion. - Use include_depth instead of buffer_stack_depth, last_id instead of - last_bsd. - * cppinit.c (cpp_start_read): Initialize last_id instead of - last_bsd. - -2000-07-01 Benjamin Chelf - - * Makefile.in (C_AND_OBJC_OBJS): Added c-semantics.o. - (c-semantics.o): New target. - - * c-common.h (TREE_LANG_FLAG_?): Added documentation. - (genrtl_do_pushlevel): Moved from cp/cp-tree.h. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (gerntl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_decl_cleanup): Likewise. - (DECL_ANON_UNION_ELEMS): Likewise. - (emit_local_var): Likewise. - (make_rtl_for_local_static): Likewise. - (expand_cond): Likewise. - (expand_stmt): Likewise. - (c_expand_return): Likewise. - (c_expand_start_case): Likewise. - (do_case): Likewise. - (COMPOUND_STMT_NO_SCOPE): Likewise. - (c_expand_asm_operands): Likewise. - (NEW_FOR_SCOPE_P): New macro. - (expand_expr_stmt_fn): New type. - - (set_current_function_name_declared): Likewise. - (current_function_name_declared): Likewise. - (lang_expand_stmt): Likewise. - (stmts_are_full_exprs_p): Likewise. - (anon_aggr_type_p): Likewise. - (lang_expand_expr_stmt): Likewise. - (build_case_label): Likewise. - - * c-decl.c (lang_expand_expr_stmt): Initialize. - (stmts_are_full_exprs_p): Define. - (current_function_name_declared): Likewise. - (do_case): Likewise. - (lang_expand_stmt): Likewise. - (set_current_function_name_declared): Likewise. - (anon_aggr_type_p): Likewise. - - * c-semantics.c: New file. - (expand_cond): Moved from cp/semantics.c. - (genrtl_do_pushlevel): Likewise. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_decl_cleanup): Likewise. - (make_rtl_for_local_static): Moved from cp/decl.c. - (emit_local_var): Likewise. - (expand_stmt): Define. - - * c-tree.h: (c_expand_asm_operands): Moved to c-common.h. - (c_expand_return): Likewise. - (c_expand_start_case): Likewise. - -2000-07-01 Richard Henderson - - * config/ia64/ia64.c (symbolic_operand): Reject CONST expressions - with the low 13 bits set. - (move_operand): Check for CONST|SYMBOL_REF|LABEL_REF directly. - * config/ia64/ia64.md (movdi): Likewise. Expand a CONST with one - of the low 13 bits into a CONST plus an adddi3. - (load_symptr): Set RTX_UNCHANGING_P. - -See ChangeLog.3 for earlier changes. diff --git a/contrib/gcc/ChangeLog.5 b/contrib/gcc/ChangeLog.5 deleted file mode 100644 index e5c26cc..0000000 --- a/contrib/gcc/ChangeLog.5 +++ /dev/null @@ -1,14446 +0,0 @@ -2001-06-30 Zack Weinberg - - * rtl.def (DEFINE_INSN, DEFINE_INSN_AND_SPLIT, DEFINE_PEEPHOLE): - Change output-template slot to format 'T'. - * rtl.h (XTMPL): New. - * read-rtl.c (read_escape): New function. - (read_quoted_string, read_braced_string): Use it. - (read_rtx): Set star_if_braced from the format string. - Use XTMPL where appropriate. - * genoutput.c (gen_insn, gen_peephole): Use XTMPL to get the - template string. - - * rtl.c: Include errors.h for sake of rtl_check_failed* routines. - Document 'T' in rtx format strings. - * Makefile.in (rtl.o, $(HOST_PREFIX_1)rtl.o): Depend on errors.h. - * errors.c (internal_error): Add missing ": " at end of string. - - * i860.md: Change triple backslashes to double backslashes at - ends of lines in output templates. - * ns32k.md: Remove stray backslash-newline in output template. - -2001-06-29 Nick Clifton - - * gcc.c (process_command): Append a DIR_SEPARATOR to a path - specified by the -B switch, if doing so would create a valid - directory name. - * doc/invoke.texi: Document changed behavior of -B. - -2001-06-29 DJ Delorie - - * simplify-rtx.c (simplify_subreg): When simplifying a CONCAT, at - least get rid of the CONCAT if we can't simplify further. - -Fri Jun 29 12:27:24 2001 Jeffrey A Law (law@cygnus.com) - - * simplify-rtx.c (simplify_rtx): Use swap_commutative_operands_p. - - * doc/gcc.texi (Passes): Update due to recent -fdce -> -fssa-dce - changes. Fix documentation for SSA DCE pass. - - * ssa-dce.c (ssa_eliminate_dead_code): Renamed from - eliminate_date_code. - * ssa.h (ssa_eliminate_dead_code): Corresponding changes. - * timevar.def (TV_SSA_DCE): Renamed from TV_DEAD_CODE_ELIM. - * toplev.c (DFI_ssa_dce): Renamed from DFI_dce. - (dump_file_info): Similar changes. - (flag_ssa_dce): Similarly - (f_options): Similar changes. - (rest_of_compilation): Corresponding changes. - * doc/invoke.texi: Update as option is now -fssa-dce instead - of -fdce. Update dump file name. - - * ssa-dce.c (note_inherently_necessary_set): New function. - (find_inherently_necessary): Use it. Do not consider - NOTEs, CODE_LABELs or BARRIERS are necessary. Improve - handling of asms and unspecs. - (delete_insn_bb): Only delete INSNs, CALL_INSNs or JUMP_INSNs. - -2001-06-29 Joseph S. Myers - - * target.h (struct gcc_target): Add comp_type_attributes and - set_default_type_attributes. - * target-def.h (TARGET_COMP_TYPE_ATTRIBUTES, - TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Define. - (TARGET_INITIALIZER): Update. - * doc/tm.texi (COMP_TYPE_ATTRIBUTES, TARGET_COMP_TYPE_ATTRIBUTES, - SET_DEFAULT_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): - Update documentation of old target macros to describe new target - hooks. - * tree.c (make_node): Use target.set_default_type_attributes. - (default_comp_type_attributes, - default_set_default_type_attributes): New functions. - * tree.h (default_comp_type_attributes, - default_set_default_type_attributes): Declare. - * c-typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. - (comptypes): Use target.comp_type_attributes. - * config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h - (arc_comp_type_attributes, arc_set_default_type_attributes, - COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove - functions and macros with default behavior. - * config/m32r/m32r-protos.h, config/m32r/m32r.c, - config/m32r/m32r.h (m32r_comp_type_attributes, - m32r_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, - SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. - * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, - config/m68hc11/m68hc11.h (m68hc11_comp_type_attributes, - m68hc11_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, - SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. - * config/ns32k/ns32k-protos.h, config/ns32k/ns32k.c, - config/ns32k/ns32k.h (ns32k_comp_type_attributes, - COMP_TYPE_ATTRIBUTES): Likewise. - * config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, - config/rs6000/rs6000.h (rs6000_comp_type_attributes, - rs6000_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, - SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. - * config/d30v/d30v.h (COMP_TYPE_ATTRIBUTES, - SET_DEFAULT_TYPE_ATTRIBUTES): Remove commented out macro - definitions. - * config/i386/i386.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. - * config/ns32k/ns32k.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. - * config/arm/arm.c (arm_comp_type_attributes, - arm_set_default_type_attributes): Make static. - (TARGET_COMP_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): - Define. - * config/arm/arm.h (COMP_TYPE_ATTRIBUTES, - SET_DEFAULT_TYPE_ATTRIBUTES): Don't define. - * config/arm/arm-protos.h (arm_comp_type_attributes, - arm_set_default_type_attributes): Don't declare. - * config/i386/i386.c (ix86_comp_type_attributes): Make static. - (TARGET_COMP_TYPE_ATTRIBUTES): Define. - * config/i386/i386.h (COMP_TYPE_ATTRIBUTES): Don't define. - * config/i386/i386-protos.h (ix86_comp_type_attributes): Don't - declare. - -2001-06-28 Jan van Male - - * predict.c (dump_prediction): Eliminate fprintf warning. - -2001-06-28 Diego Novillo - - * flow.c (dump_bb): Remove unused third argument to call - to fprintf when displaying the basic block header. - -2001-06-28 Michael Hayes - Jeff Law - - * Makefile.in (OBJS): Add df.o - (df.o): Add dependencies. - * basic-block.h (flow_depth_first_order_compute): Declare. - * flow.c (flow_depth_first_order_compute): No longer declare. - Make external. - * df.c, df.h: New files. - -2001-06-28 Zack Weinberg - - * config/i386/i386.md: Global update to use new string syntax - where it will improve readability. Warning fixes: - (*truncdfsf2_2): Abort if which_alternative is not 0 or 1. - (*adddi_1_rex64, *adddi_2_rex64, *adddi_3_rex64, - *adddi_4_rex64, *adddi_5_rex64): Cast 1 to unsigned int. - - * read-rtl.c: Syntactic sugar for C embedded in strings in - machine descriptions. - (read_string): Break inner loop into separate function. Takes - an int. Dispatch to read_quoted_string or read_braced_string - as appropriate. Automatically insert a leading star on braced - strings if STAR_IF_BRACED is true. - (read_quoted_string, read_braced_string): New functions. - * doc/rtl.texi, doc/md.texi: Document new syntax. Update - examples to match. - - * rtl.c: Split RTL reader (read_rtx, read_skip_spaces, - traverse_md_constants, fatal_with_file_and_line, - fatal_expected_char, read_name, read_string, def_hash, - def_name_eq_p, read_constants, and related data) to its own - file. Weed out now-unnecessary #includes. - * read-rtl.c: New file. - * Makefile.in (HOST_RTL): Add read-rtl.o. - (read-rtl.o): New rule. - (rtl.o, $(HOST_PREFIX_1)rtl.o): Update dependencies. - * doc/gcc.texi (Passes): Talk briefly about the support - library used by genfoo. - * doc/rtl.texi (Reading RTL): read_rtx is not available in the - compiler itself. - -2001-06-28 Stan Shebs - - * config/darwin.h (REGISTER_TARGET_PRAGMAS): Define. - * config/darwin-c.c: New file. - * config/darwin-protos.h: Declare new functions. - * config/rs6000/t-darwin (darwin-c.o): New rule. - * config.gcc (powerpc-*-darwin*): Define c_target_objs and - cxx_target_objs. - * doc/extend.texi (Pragmas): New section. - -Thu Jun 28 20:13:11 CEST 2001 Jan Hubicka - - * flow.c (try_merge_block): Rename to try_optimize_cfg; - do basic simplifications on the CFG. - (is_forwarder_block_p, can_fallthru, try_redirect_by_replacing_jump, - try_simplify_condjump): New. - (redirect_edge_and_branch): Try replace jump insn. - (flow_delete_insn): Handle deleting of ADDR_VEC insns. - - * basic-block.h (FALLTHRU_EDGE, BRANCH_EDGE): New macros. - -Thu Jun 28 11:19:42 2001 Jeffrey A Law (law@cygnus.com) - - * ssa-dce.c (eliminate_dead_code): Properly handle control - dependencies implied by PHI nodes. - - * ssa-dce.c (eliminate_dead_code): Remove fake edges from the - CFG after dead code elimination is complete. - -2001-06-28 Rainer Orth - - * gthr-posix.h [LIBOBJC]: Add weak definitions of - sched_get_priority_max, sched_get_priority_min. - -2001-06-28 Gabriel Dos Reis - - * diagnostic.c (default_print_error_function): Tweak. - (report_error_function): Likewise. - * toplev.h (default_print_error_function): Move to... - * diagnostic.h: ...here. Add a `diagnostic_context *' parameter. - * tree.h (print_error_function): Move to... - * diagnostic.h: ...here. Add a `diagnostic_context *' parameter. - -Thu Jun 28 06:16:45 2001 Richard Kenner - - * expr.c (expand_assignment): When have varying-length object, - make MEM a BLKmode. - (expand_expr, case ADDR_EXPR): Use SAVE_EXPR_RTL after putting - SAVE_EXPR stack in case we had a SUBREG. - -Thu Jun 28 10:31:06 CEST 2001 Jan Hubicka - - * i386.md (cmp?i): Simplify; refuse immediate operand - in alternative 0 - * i386.c (cmpsi_operand): Refuse constants. - - * i386.md (movsi_insv_1, movsi_insv_1_rex64): Allow immediate operand. - - * flow.c (block_label, redirect_edge_and_branch): Split out from .... - (split_edge) .... here; - -2001-06-28 Neil Booth - - * i386/i386.c (ix86_valid_type_attribute_p): Give external - linkage, move declaration to... - * i386/i386-protos.h: ...here. - -2001-06-27 H.J. Lu (hjl@gnu.org) - - * build-make (CC): Removed. - (HOST_CC): Set to $(CC_FOR_BUILD). - (HOST_CFLAGS): Replace $(CFLAGS) with $(CFLAGS_FOR_BUILD). - Fix a typo in comments. - - * configure.in: Set CFLAGS to $(CFLAGS_FOR_BUILD) when - generating auto-build.h for canadian cross compile. Set CC - to `"${CC_FOR_BUILD}"' instead of just `${CC_FOR_BUILD}'. - Save/restore CFLAGS. - * configure: Regenerated. - -2001-06-27 Jim Wilson - - * emit-rtl.c (gen_highpart): Call validize_mem. - -2001-06-27 Bruce Korb - - * fixinc/inclhack.def(hpux11_cpp_pow_inline): new, but real similar to - hpux10_cpp_pow_inline. Not similar enough. - (solaris_mutex_init): renamed. PTHREAD_*_INITIALIZER is a problem for - all Solaris versions. This fix patches MUTEX and COND initializers, - the RWLOCK one will wait for someone to complain. For now, anyway. - (uw7_byteorder_fix): It was looking for the byteorder.h file in the - wrong directory. - -2001-06-27 Stan Shebs - - * objc/objc-act.c (handle_impent): Rewrite to be more portable - and to use ASM_DECLARE_CLASS_REFERENCE. - * config/darwin.h (ASM_DECLARE_CLASS_REFERENCE): Rename from - undocumented DECLARE_CLASS_REFERENCE, add file argument. - * doc/tm.texi (ASM_DECLARE_CLASS_REFERENCE): Document. - -Wed Jun 27 18:01:09 2001 Jeffrey A Law (law@cygnus.com) - - * simplify-rtx.c (simplify_rtx): Canonicalize commutative expressions - by putting complex operands first and constants second. - -2001-06-27 Gabriel Dos Reis - - * diagnostic.h: Add documentation. Make macros polymorphic. - * diagnostic.c (ideal_line_wrap_cutoff): Remove - definition. Replace with diagnostic_line_cutoff. - (prefixing_policy): Remove. Replace with diagnostic_prefixing_rule. - -2001-06-27 Joseph S. Myers - - * doc/c-tree.texi, doc/contrib.texi, doc/cpp.texi, - doc/cppinternals.texi, doc/extend.texi, doc/gcc.texi, - doc/gcov.texi, doc/install-old.texi, doc/install.texi, - doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Replace - . at end of sentences preceded by a capital letter with @.. - -2001-06-26 Daniel Berlin - - * doc/invoke.texi: Add description of max-gcse-passes param. - - * gcse.c (gcse_main): Use MAX_GCSE_PASSES instead of MAX_PASSES. - (MAX_PASSES): Remove now unneeded macro. - - * params.h (MAX_GCSE_PASSES): New macro, to get parameter value of - max-gcse-passes param. - - * params.def (PARAM_MAX_GCSE_PASSES): New parameter, controlling - maximum number of GCSE passes to run. Defaults to 1 (which is what - MAX_PASSES in gcse.c used to be). - -2001-06-27 Neil Booth - - * system.h (TARGET_ESC): Move to ... - * defaults.h (TARGET_ESC): ... here. - * target-def.h (TARGET_VALID_DECL_ATTRIBUTE, - TARGET_VALID_TYPE_ATTRIBUTE): Default to a no-op handler. - * tree.c (default_valid_attribute_p): New. - (valid_machine_attribute): Handlers can not be NULL. - * tree.h (default_valid_attribute_p): New. - * doc/tm.texi: Document TARGET_ESC. - * cp/decl2.c (import_export_class): Update. - -2001-06-26 Bruce Korb - - * gcc/fixinc/fixincl.c(initialize): In very strict ANSI, you cannot - use preprocessing directives inside a string literal. Fixed. - -2001-06-26 Jim Wilson - - * doc/tm.texi (MAX_LONG_DOUBLE_TYPE_SIZE, INTEL_EXTENDED_IEEE_FORMAT): - Document. - -2001-06-27 Joseph S. Myers - - * doc/cpp.texi, doc/cppinternals.texi, doc/extend.texi, - doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi, - doc/tm.texi: Use @: where necessary when a full stop does not end - a sentence. - -2001-06-27 Joseph S. Myers - - * doc/gcc.texi, doc/install.texi, doc/invoke.texi: Remove trailing - whitespace. - -2001-06-26 Joseph S. Myers - - * doc/c-tree.texi, doc/cpp.texi, doc/extend.texi, doc/gcc.texi, - doc/install.texi, doc/invoke.texi, doc/objc.texi, doc/rtl.texi, - doc/tm.texi: Use two spaces after ends of sentences. - -2001-06-26 Daniel Berlin - - * toplev.c (display_help): Fix param thinko. - * Makefile.in: Fix params.h dependencies. - -2001-06-26 Gabriel Dos Reis - - * toplev.c (decode_f_option): Adjust setting. - (toplev_main): Call diagnostic_initialize. Remove call to - reshape_diagnostic_buffer._ - - * diagnostic.h (struct output_buffer): Add new field format_decoder. - (diagnostic_format_decoder): New macro. - (diagnostic_prefixing_rule): Likewise. - (diagnostic_line_cutoff): Likewise. - (set_message_prefixing_rule): Remove. - - * diagnostic.c (lang_printer): Remove. - (diagnostic_message_length_per_line): Likewise. - (current_prefixing_rule): Likewise. - (initialize_diagnostics): Rename to... - (diagnostic_initialize): ...this. Tweak. - (default_initialize_buffer): Remove. - (reshape_diagnostic_buffer): Likewise. - (init_output_buffer): Adjust prefixing rule setting. - (output_format): Use format_decoder from the output_buffer. - - * c-lang.c (c_init): Adjust tree formatter setting. - -2001-06-26 Rainer Orth - - * config/i386/sol2.h (CPP_SPEC): Pass -P for .S files. - -2001-06-26 Neil Booth - - * Makefile.in (TARGET_H, TARGET_DEF_H): New. - (c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update. - * c-decl.c (duplicate_decls): Use function pointer. - * c-typeck.c (common_type): Similarly. - * tree.c (valid_machine_attribute): Similarly. - (merge_machine_type_attributes): Rename merge_type_attributes. - (merge_machine_decl_attributes): Rename merge_decl_attributes. - (merge_dllimport_decl_attributes): New function. - * tree.h (merge_machine_type_attributes): Rename merge_type_attributes. - (merge_machine_decl_attributes): Rename merge_decl_attributes. - (merge_dllimport_decl_attributes): New prototype. - * target.h: New. - * target-def.h: New. - -doc: (Joseph Myers) - * doc/gcc.texi, doc/tm.texi: Update documentation. - -cp: Make-lang.in: Update dependencies. - * spew.c: Include target.h. - (duplicate_decls): Call target function. - * decl2.c: include target.h - (import_export_class): Use existence of target function pointer. - * typeck.c: Include target.h. - (qualify_type_recursive): Rename variable. Call target function. - (type_after_usual_arithmetic_conversions): Similarly. - (common_type): Similarly. - -config: * 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c, - avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c, - d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c, - i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c, - m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c, - mips/mips.c, mn10200/mn10200.c, mn10300/mn10300.c, ns32k/ns32k.c, - pa/pa.c, pdp11/pdp11.c, pj/pj.c, romp/romp.c, rs6000/rs6000.c, - sh/sh.c, sparc/sparc.c, v850/v850.c, vax/vax.c, we32k/we32k.c) - : Include target.h and target-def.h. Define target. - - * arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove. - * arc/arc.c (arc_valid_machine_decl_attribute): Rename - arc_valid_decl_attribute, make static. - * arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * arm/arm-protos.h (arm_valid_machine_decl_attribute, - arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute, - arm_pe_merge_machine_decl_attributes): Remove. - * arm/arm.c (arm_valid_machine_decl_attribute_p): Rename - arm_valid_decl_attribute_p, make static. - (arm_pe_valid_decl_attribute_p): Move from pe.c. - * arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c. - (arm_pe_merge_machine_decl_attributes): Move to tree.c. - * arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. - * arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. - * arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New. - (VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove. - * avr/avr-protos.h (valid_machine_type_attribute, - valid_machine_decl_attribute): Remove. - * avr/avr.c (valid_machine_type_attribute, - valid_machine_decl_attribute): Rename and make static. - * avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE, - VALID_MACHINE_DECL_ATTRIBUTE): Remove. - * c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove. - * c4x/c4x.c (c4x_valid_type_attribute_p): Make static. - * c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * d30v/d30v.h: Remove obsolete comments. - * h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove. - * h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make - static. - * h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. - * i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. - (i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES, - i386_pe_valid_type_attributes_p): Remove. - * i386/i386-protos.h (ix86_valid_decl_attribute_p, - ix86_valid_type_attribute_p): Remove. - * i386/i386.c (ix86_valid_decl_attribute_p): Remove. - (ix86_valid_type_attribute_p): Make static. - * i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE, - VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c. - * ia64/ia64-protos.h (ia64_valid_type_attribute): Remove. - * ia64/ia64.c (ia64_valid_type_attribute): Make static. - * ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove. - * m32r/m32r.c (m32r_valid_decl_attribute): Make static. - * m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. - * m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p, - m68hc11_valid_type_attribute_p): Remove. - * m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove. - (m68hc11_valid_type_attribute_p): Make static. - * m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE, - VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * mcore/mcore-protos.h (mcore_valid_machine_decl_attribute, - mcore_merge_machine_decl_attribute): Remove. - * mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename, - make static. - (mcore_merge_machine_decl_attributes): Move to tree.c. - * mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE, - VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. - * ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p, - ns32k_valid_type_attribute_p): Remove. - * ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove. - (ns32k_valid_type_attribute_p): Make static. - * ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE, - VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p, - rs6000_valid_type_attribute_p): Remove. - * rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove. - (rs6000_valid_type_attribute_p): Make static. - * rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE, - VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove. - * sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static. - * sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. - * v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove. - * v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static. - * v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove. - -2001-06-26 Vladimir Makarov - - * glimits.h (USHRT_MAX): Use unsigned suffix if int can not hold - it. - -2001-06-26 Gabriel Dos Reis - - * diagnostic.h (struct diagnostic_context): Add new field. - (lang_diagnostic_starter, lang_diagnostic_finalizer): Remove - declaratons. - (global_dc): Declare. - * diagnostic.c (global_diagnostic_context): New variable. - (global_output_buffer): Remove. - (global_dc): Define. - (lang_diagnostic_starter, lang_diagnostic_finalizer): Remove - definitions. - (initialize_diagnostics): Adjust initialization. - (set_diagnostic_context): Adjust setting. - -2001-06-26 Rainer Orth - - * config/mips/iris5.h (UNALIGNED_INT_ASM_OP, - UNALIGNED_SHORT_ASM_OP): Define. - * config/mips/iris6.h (UNALIGNED_INT_ASM_OP, - UNALIGNED_SHORT_ASM_OP): Undef. - -Tue Jun 26 12:40:12 CEST 2001 Jan Hubicka - - * i386.md (float_truncate splitter, and to mov splitters): Add - reload_completed; fix operand predicate. - - * haifa-sched.c (sched_init): Do not split insns. - * toplev.c (rest_of_compilation): Call split_all_insns before - sched1 pass; simplify condition of post-reload splitter; - call split_all_insn before sched2 pass. - -2001-06-26 Gabriel Dos Reis - - * diagnostic.h (diagnostic_prefixing_rule_t): New enum type. - (set_message_prefixing_rule): Adjust prototype. - * diagnostic.c (current_prefixing_rule): Adjust type. - -2001-06-26 Neil Booth - - * defaults.h: Default escape sequences to ASCII. - * config/i370/i370.h: Adjust for ASCII default. - * config/1750a/1750a.h: Remove escape sequence definitions. - * config/a29k/a29k.h: Similarly. - * config/alpha/alpha.h: Similarly. - * config/arc/arc.h: Similarly. - * config/arm/arm.h: Similarly. - * config/avr/avr.h: Similarly. - * config/c4x/c4x.h: Similarly. - * config/clipper/clipper.h: Similarly. - * config/convex/convex.h: Similarly. - * config/d30v/d30v.h: Similarly. - * config/dsp16xx/dsp16xx.h: Similarly. - * config/elxsi/elxsi.h: Similarly. - * config/fr30/fr30.h: Similarly. - * config/h8300/h8300.h: Similarly. - * config/i386/i386.h: Similarly. - * config/i860/i860.h: Similarly. - * config/i960/i960.h: Similarly. - * config/ia64/ia64.h: Similarly. - * config/m32r/m32r.h: Similarly. - * config/m68hc11/m68hc11.h: Similarly. - * config/m68k/m68k.h: Similarly. - * config/m88k/m88k.h: Similarly. - * config/mcore/mcore.h: Similarly. - * config/mips/mips.h: Similarly. - * config/mn10200/mn10200.h: Similarly. - * config/mn10300/mn10300.h: Similarly. - * config/ns32k/ns32k.h: Similarly. - * config/pa/pa.h: Similarly. - * config/pdp11/pdp11.h: Similarly. - * config/pj/pj.h: Similarly. - * config/romp/romp.h: Similarly. - * config/rs6000/rs6000.h: Similarly. - * config/sh/sh.h: Similarly. - * config/sparc/sparc.h: Similarly. - * config/v850/v850.h: Similarly. - * config/vax/vax.h: Similarly. - * config/we32k/we32k.h: Similarly. - * doc/tm.texi: Update documentation. - -2001-06-26 Gabriel Dos Reis - - * diagnostic.c (digit_buffer): Remove as global. Move to... - * diagnostic.h (struct output_buffer): ... here. - * diagnostic.c (output_formatted_integer): Adjust use of digit_buffer. - -2001-06-25 Steve Ellcey - - * config.gcc (ia64*-*-hpux*): Add ia64/hpux_longdouble.h to tm_file. - Define tmake_file to include ia64/t-hpux. - * real.c (INTEL_EXTENDED_IEEE_FORMAT): Test for value instead of - testing to see if it is defined. - * real.h (INTEL_EXTENDED_IEEE_FORMAT): Likewise. Default to 0 if - undefined. - * config/ia64/hpux_longdouble.h: New. - * config/ia64/ia64.c (hfa_element_mode): Add comment about incorrect - handling of long doubles. - (ia64_function_arg, ia64_function_value): Add checks for TFmode - and INTEL_EXTENDED_IEEE_FORMAT. - * config/ia64/ia64.h (INTEL_EXTENDED_IEEE_FORMAT): Define to one. - (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, LIBCALL_VALUE): Add checks for - TFmode and INTEL_EXTENDED_IEEE_FORMAT. - * config/ia64/ia64.md (all TFmode patterns): Test - INTEL_EXTENDED_IEEE_FORMAT in condition. - (floatdidf2, floatdisf2): New, for !INTEL_EXTENDED_IEEE_FORMAT. - * config/ia64/quadlib.c: New. - * config/ia64/t-hpux: New. - * config/i386/i386.h (INTEL_EXTENDED_IEEE_FORMAT): Define to one. - -2001-06-25 Jim Wilson - - * config/i960/t-960bare (i960-c.o): Add missing header dependencies. - * config/i960/t-vxworks960: Likewise. - -2001-06-25 Dale Johannesen - - * bitmap.c (bitmap_last_bit_set): Fix a non-c89 usage (null actual - argument to macro). - -Mon Jun 25 11:10:51 CEST 2001 Jan Hubicka - - * i386.md (movsi_insv_1, movsi_insv_1_rex64): Fix constraints. - -2001-06-25 Joseph S. Myers - - * doc/c-tree.texi, doc/contrib.texi, doc/extend.texi, - doc/gcc.texi, doc/gcov.texi, doc/install.texi, doc/invoke.texi, - doc/md.texi, doc/rtl.texi, doc/tm.texi: Be more consistent about - the use of "GCC" and related terms. - * doc/gcc.1, doc/gcov.1: Regenerate. - -2001-06-24 Joseph S. Myers - - * doc/extend.texi, doc/gcc.texi, doc/install-old.texi, - doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Remove - uses of @refill. - -Sun Jun 24 21:21:49 CEST 2001 Jan Hubicka - - * (movsi_insv_1, movsi_insv_1_rex64): Allow immediate operand. - -2001-06-24 Richard Henderson - - * builtins.c (expand_builtin_expect_jump): Disable if the - expression can't be re-evaluated. - -2001-06-24 Nick Clifton - - * config/arm/arm.c (arm_compute_save_reg_mask): For FIQ interrupt - handlers examine register r0-r7, for other interrupt handlers - examine r0-r12. If the interrupt handler is not a leaf function - save all call clobbered registers. - (arm_output_epilogue): If the prologue has pushed the IP register, - restore it here. - (Arm_expand_prologue): For interrupt functions that need the frame - pointer, push the IP register before it is corrupted. - - * config/arm/arm.h (ARM_SIGN_EXTEND): Fix compile time warnings - about the use of signed and unsigned quantities in a conditional. - -2001-06-23 Richard Henderson - - * config/alpha/crtfastmath.c: New file. - * config/alpha/t-crtfm: New file. - * config/alpha/elf.h (ENDFILE_SPEC): Use crtfastmath.o. - * config/alpha/osf.h (ENDFILE_SPEC): Likewise. - * config/alpha/t-crtbe (EXTRA_PARTS): Add pieces defined here. - * config.gcc (alpha-{linux,freebsd,netbsd,osf}): Use alpha/t-crtfm; - do not set extra_parts here. - -2001-06-24 Joseph S. Myers - - * doc/install-old.texi: Remove more documentation of configure - options. - * doc/install.texi: Add it here. - -Sat Jun 23 19:40:05 CEST 2001 Jan Hubicka - - * i386-protos.h (emit_i387_cw_initialization): Declare. - * i386.md (movsi_insv_1): Remove '*'. - (fix_trunc?f?i2): Revamp to use control word parameters. - (fix_trunc?i_1): Likewise; update splitters. - (fix splitter): Remove. - * i386.c (MAX_386_STACK_LOCALS): set to 3. - (emit_i387_cw_initialization): New function. - (output_fix_trunc): Do not initialize control word; - kill dead code; simplify. - -2001-06-23 Neil Booth - - * cppmacro.c (make_string_token): Avoid warning. - (cpp_macro_definition): Prepend the macro name. Update - comments. - * cppmain.c (cb_define, dump_macro): Update for changes - to cpp_macro_definition. - -Sat Jun 23 10:20:03 CEST 2001 Jan Hubicka - - * flow.c (attempt_auto_inc, try_pre_increment_1): Fix typo. - -Sat Jun 23 01:23:59 CEST 2001 Jan Hubicka - - * flow.c (mark_set_1, attempt_auto_inc, mark_used_reg, - try_pre_increment_1): compute REG_FREQ using bb->frequency. - - * regclass.c (loop_cost): Kill. - (frequency): New global variable. - (record_operand_costs): Replace loop_cost by frequency. - (scan_one_insn): Likewise. - (regclass): Likewise; set frequency according to bb->frequency. - - * flow.c (split_edge): Set frequency. - -Sat Jun 23 01:16:42 CEST 2001 Jan Hubicka - - * predict.c (block_info_def): Add nvisited. - (propagate_freq): Count nvisited; re-queue delayed blocks; handle - irreducible regions. - - * flow.c (dump_edge_info): Dump the probability of edge. - (combine_predictions_for_insn): Dump the basic block. - -2001-06-22 Joseph S. Myers - - * doc/gcc.texi: Update documentation of source files of C - compiler. - -2001-06-22 Richard Henderson - - * doc/invoke.texi (-funsafe-math-optimizations): Document its - possible effects at link time. - -2001-06-22 Diego Novillo - - * basic-block.h (dump_edge_info): Declare. - (clear_edges): Declare. - (mark_critical_edges): Declare. - * flow.c (dump_edge_info): Remove static declaration. - (clear_edges): Ditto. - (mark_critical_edges): Ditto. - (free_basic_block_vars): Only clear edges and free basic block - array if basic_block_info is not NULL. - * ssa.c (compute_dominance_frontiers): Remove static declaration. - * ssa.h (compute_dominance_frontiers): Declare. - -2001-06-22 Toshiyasu Morita (toshiyasu.morita@hsa.hitachi.com) - - * predict.c: (expected_value_to_br_prob): Check for const_true_rtx - instead of const1_rtx for true case. - -2001-06-22 David Mosberger - - * config/ia64/crtfastmath.c: New file. - * config/ia64/t-ia64 (EXTRA_PARTS): Include it. - * config/ia64/linux.h (ENDFILE_SPEC): New. - -2001-06-22 Toshiyasu Morita - - * config/h8300/h8300.c (asm_file_start): Remove reference to - "release F-1". - -2001-06-22 Joseph S. Myers - - * c-common.c (verify_tree): Check for x being NULL. - * doc/c-tree.texi: Document COMPOUND_BODY of an empty - COMPOUND_STMT. - Fixes PR c/3259. - -2001-06-22 DJ Delorie - - * config/arm/arm.h (struct machine_function): Remove ra_rtx. - * config/arm/arm.c (arm_mark_machine_status): Remove ra_rtx. - (arm_return_addr): Use get_hard_reg_initial_val et al. - * config/d30v/d30v.h (struct machine_function): Remove ra_rtx. - * config/d30v/d30v.c (d30v_mark_machine_status): Remove ra_rtx. - (d30v_return_addr): Use get_hard_reg_initial_val et al. - * config/rs6000/rs6000.h (struct machine_function): Remove ra_rtx. - * config/rs6000/rs6000.c (rs6000_override_options): Don't set - mark_machine_status. - (rs6000_mark_machine_status): Remove. - (rs6000_return_addr): Use get_hard_reg_initial_val. - (rs6000_ra_ever_killed): Use has_hard_reg_initial_val. - * config/v850/v850.h (INIT_EXPANDERS): Delete. - * config/v850/v850.c (struct machine_function): Delete. - (v850_init_machine_status): Delete. - (v850_mark_machine_status): Delete. - (v850_free_machine_status): Delete. - (v850_return_addr): Use get_hard_reg_initial_val. - (v850_init_expanders): Delete. - -Fri Jun 22 19:20:59 CEST 2001 Jan Hubicka - - * predict.c (estimate_bb_frequencies): Do not handle conditional - jumps jumping to fallthru basic block as conditional jumps. - -Fri Jun 22 19:11:28 CEST 2001 Jan Hubicka - - * regs.h (struct reg_info_def): Add freq field. - (REG_N_REFS): Update comment. - (REG_FREQ): New. - * regclass.c (scan_one_insn): Update REG_FREQ. - * flow.c (mark_set_1): Update REG_FREQ, make REG_N_SETS unweighted. - (attempt_auto_inc): Likewise. - (mark_used_reg): Likewise. - (try_pre_increment_1): Likewise. - * local-alloc.c (struct qty): Add freq field. - (alloc_qty): Set freq. - (update_equiv_regs): Set REG_FREQ. - (QTY_CMP_PRI): Use freq. - (combine_regs): Update qty->freq. - * global.c (struct allocno): Update comment for n_refs; - add freq field. - (local_reg_freq): New array. - (global_alloc): Update freq field; - allocate and initialize local_reg_freq. - (allocno_compare): Use freq field. - (find_reg): Likewise. - * reload1.c (count_pseudo): Use freq isntead of n_refs. - (count_spilled_pseudo): Likewise. - - * tm.texi (GCOV_TYPE_SIZE): Document. - * basic-block.h (gcov_type): Define. - (struct edge_def): Use gcov_type for count field. - (struct basic_block_def): Likewise. - * defaults.h (GCOV_TYPE_SIZE): Define. - * final.c (end_final): Use GCOV_TYPE_SIZE. - * flow.c (dump_edge_info, dump_flow_info, dump_bb): Print count fields - using HOST_WIDEST_INT_PRINT_DEC. - * gcov-io.h (__fetch_gcov_type, __store_gcov_type, __read_gcov_type, - __write_gcov_type): New. - (store_long): Remove. - * gcov.c (gcov_type): Set default. - (struct adj_list): Use gcov_type for arc_count. - (bb_info): Use gcov_type for succ_count, pred_count and exec_count. - (create_program_flow_graph): Read arc_count properly. - (solve_program_flow_graph): 'total' is gcov_type. - (output_data): Line_counts is gcov_type, print it properly. - * libgcc2.c (struct bb): Counts is gcov_type. - (__bb_exit_func): Use __read_gcov_type and __write_gcov_type. - * profile.c (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set default. - (GCOV_TYPE_SIZE): Define. - (struct bb_info): succ_count and pred_count is gcov_type. - (compute_branch_probabilities): Use __read_gcov_type, - print read edges to the dump file. - (total): Is gcov_type. - (gen_edge_profiler): Use GCOV_TYPE_SIZE. - -2001-06-14 Andrew Haley - - * optabs.c (emit_libcall_block): When using non-call exceptions, - don't mark libcalls never throwing. - -2001-06-21 Stan Shebs - - * objc/objc-act.c (hash_init): Use xcalloc. - -2001-06-21 Richard Henderson - - * flow.c (entry_exit_blocks): Initialize frequency. - (split_block): Copy it. - (dump_flow_info): Dump it. - -Thu Jun 21 22:15:10 2001 J"orn Rennecke - - * sh.c (barrier_align): Also recognize branch-around-a-jump-sequence - from machine-depedent_reorg for purposes of alignment supression - when no delay slot insn has been added. - -2001-06-21 Neil Booth - - * cppmacro.c (make_string_token): Null terminate. - -2001-06-21 DJ Delorie - - * config/alpha/alpha.h (struct machine_function): Remove. - * config/alpha/alpha.c (integrate.h): Include. - (override_options): Don't set up machine_status hooks. - (alpha_init_machine_status): Remove. - (alpha_mark_machine_status): Remove. - (alpha_free_machine_status): Remove. - (alpha_return_addr): Use get_hard_reg_initial_val. - (alpha_gp_save_rtx): Likewise. - (alpha_ra_ever_killed): Use has_hard_reg_initial_val. - -2001-06-20 Aldy Hernandez - - * config/sh/sh.md (interrupt_function): Use - current_function_interrupt. - (define_delay): Schedule in delay slot if TARGET_SH3, even if it is - an interrupt function. - - * config/sh/sh.h (current_function_interrupt): Define extern. - - * config/sh/sh.c (current_function_interrupt): New global. - (sh_expand_prologue): Set current_function_interrupt. - -2001-06-21 Phil Edwards - - * doc/install.texi: Add 'c' to list of --enable-languages choices. - -2001-06-21 DJ Delorie - - * integrate.c (mark_hard_reg_initial_vals): Check for NULL. - - * integrate.c (ggc.h): Include. - (initial_value_pair, initial_value_struct, - setup_initial_hard_reg_value_integration): Add prototypes. - (expand_inline_function): Call - setup_initial_hard_reg_value_integration. - (has_func_hard_reg_initial_val, get_func_hard_reg_initial_val, - get_hard_reg_initial_val, has_hard_reg_initial_val): New functions - to keep track of values present at the start of a function. - (mark_hard_reg_initial_vals): New, for gc. - (setup_initial_hard_reg_value_integration): New. Sets up pseudo - mappings for initial values. - (emit_initial_value_sets): New. Emits code to set initial value - pseudos. - * integrate.h: Add prototypes for new functions. - * function.h (struct function): Add hard_reg_initial_vals field. - * function.c (integrate.h): Include. - (mark_function_status): Call - mark_hard_reg_initial_vals. - * toplev.c (integrate.h): Include. - (rest_of_compilation): Call emit_initial_value_sets. - -2001-06-21 Stan Shebs - - * doc/contrib.texi, doc/cpp.texi, doc/cppinternals.texi, - doc/extend.texi, doc/gcc.texi, doc/install.texi, doc/invoke.texi, - doc/objc.texi, doc/tm.texi: Use the correct name "Objective-C" - everywhere instead of "Objective C". - -2001-06-21 Joseph S. Myers - - * doc/c-tree.texi, doc/contrib.texi, doc/extend.texi, - doc/gcc.texi, doc/install-old.texi, doc/install.texi, - doc/invoke.texi, doc/rtl.texi: Consistently use "front end" and - "back end" as nouns and "front-end" and "back-end" as adjectives. - -Wed Jun 20 21:53:35 CEST 2001 Jan Hubicka - - * predict.c (estimate_probability): Fix loop bounds. - -Wed Jun 20 19:10:48 CEST 2001 Jan Hubicka - - * toplev.c (rest_of_compilation): Run mark_constant_function - before profile-arcs. - -Wed Jun 20 19:08:18 CEST 2001 Jan Hubicka - - * predict.c (estimate_loops_at_level, propagate_freq - estimate_bb_frequencies, count_to_freqs): New functions. - (estimate_probability): Call estimate_bb_frequencies. - * basic-block.h (basic_block_def): Add field "freq". - (BB_FREQ_MAX): New constant. - -Wed Jun 20 17:02:50 2001 J"orn Rennecke - - * sh.c (barrier_align): Don't ask for alignment when seeing a - branch-around-a-jump from machine_dependent_reorg. - -Wed Jun 20 08:35:02 2001 Jeffrey A Law (law@cygnus.com) - - * ssa.c (rename_block): Update parameter to remove_phi_alternative - (convert_from_ssa): Do create REG_DEAD and REG_UNUSED notes when - re-running life analysis. - -2001-06-20 Stan Shebs - - * objc/objc-act.c (hash_init): Assume xmalloc always succeeds, - also use memset to clear the hash tables. - (hash_enter): Assume xmalloc always succeeds. - (hash_add_attr): Ditto. - (continue_class): Ditto. - -2001-06-20 Michael Meissner - - * builtins.c (predict.h): Include. - (expand_builtin_expect): Update comment. - (expand_builtin_expect_jump): New function to expand - __builtin_expect inside of a conditional jump expansion. - - * expr.c (do_jump): Special case __builtin_expect (, 0) and - __builtin_expect (, 1). - - * Makefile.in (builtins.o): Depend on $(PREDICT_H). - - * rtl.h (expand_builtin_expect_jump): Add prototype. - -2001-06-19 Geoffrey Keating - - * doc/rtl.texi (Machine Modes): Correct description of - floating-point modes on machines with non-8-bit bytes. - -2001-06-19 Bernd Schmidt - - * regmove.c (optimize_reg_copy_3): Do nothing if previous insn - carries a REG_EQUIV note. If it carries REG_EQUAL, delete the - note. - -Tue Jun 19 07:53:52 2001 Jeffrey A Law (law@cygnus.com) - - * ssa.c (remove_phi_alternative): Remove declaration. No longer - static. Second argument is a pointer to a basic block structure, - not a basic block index. - (convert_to_ssa): Do not remove dead code. - (convert_from_ssa): Do not remove dead code to create death notes. - * ssa.h (remove_phi_alternative): Declare. - - * flow.c (delete_unreachable_blocks): Fix patch error in - previous change (call to find_unreachable_blocks was lost). - - * ssa.c (ssa_uses): Remove definition. - (apply_delayed_renames): Don't grow ssa_uses. - (rename_block): Remove comment related to ssa_uses. - (rename_registers): Do not initialize ssa_uses. - (convert_from_ssa): Do not free ssa_uses. - - * ssa-dce.c: Renamed from dce.c. - * Makefile.in (OBJS): Replace dce.o with ssa-dce.o - (dependencies): Replace dce.c with ssa-dce.c and dce.o with - ssa-dce.o. - -2001-06-19 Eric Christopher - - * emit-rtl.c (gen_lowpart_common): Do not assume that SFmode - and DFmode are UNITS_PER_WORD and 2*UNITS_PER_WORD. Use - GET_MODE_BITSIZE instead of GET_MODE_SIZE/UNITS_PER_WORD. - -Tue Jun 19 01:52:27 2001 J"orn Rennecke - - * sh.c (output_branch): Delete bogus code. - - * sh.c (initial_elimination_offset): - Fix FROM == RETURN_ADDRESS_POINTER_REGNUM case. - -Mon Jun 18 12:50:49 2001 Jeffrey A Law (law@cygnus.com) - - * flow.c (find_unreachable_blocks): New function. - (delete_unreachable_blocks): Use find_unreachable_blocks. - * basic-block.h (find_unreachable_blocks): Declare. - - * dce.c (eliminate_dead_code): Fix formatting glitch. - -2001-06-18 Jason Merrill - - * c-common.h (RETURN_NULLIFIED_P): New macro. - * c-semantics.c (genrtl_return_stmt): Check it. - - * expr.c (clear_storage): Set TREE_NOTHROW on the decl for memset. - (emit_block_move): Likewise. - -Mon Jun 18 17:27:24 CEST 2001 Jan Hubicka - - * unroll.c: Include predict.h. - (unroll_loop): Drop prediction notes on preconditioning. - * predict.def (PRED_LOOP_PRECONDITIONG, PRED_LOOP_CONDITION): - New; add comments on the others. - * Makefile.in: (unroll.o): Add dependency on predict.h. - * loop.c (strength_reduce): Fix branch prediction. - -Mon Jun 18 17:26:56 CEST 2001 Jan Hubicka - - * stmt.c (emit_case_nodes): Optimize test whether index is in given - interval. - -Mon Jun 18 15:43:10 CEST 2001 Jan Hubicka - - * predict.c (estimate_probability): Do not bail out early - when note is present. - (combine_predictions_for_insn): Fix note removal code. - -2001-06-18 Ben Elliston - - * except.c (resolve_fixup_regions): Initialize "cleanup". - -2001-06-17 Neil Booth - - * tm.texi: Document STDC_0_IN_SYSTEM_HEADERS. - -Sat Jun 16 20:20:39 2001 Richard Kenner - - * expr.c (expand_expr, case ADDR_EXPR): If taking address of SAVE_EXPR, - use put_var_into_stack. - -2001-06-16 Franz Sirl - - * gccspec.c (lang_specific_driver): If compiling ObjC, add - -shared-libgcc when necessary. - * Makefile.in (gccspec.o): Compile with DRIVER_DEFINES. - -2001-06-16 Daniel Berlin - - * bitmap.h: Add dump_bitmap, bitmap_zero, bitmap_union_of_diffs, - bitmap_a_or_b, bitmap_a_and_b, bitmap_first_set_bit, - bitmap_last_set_bit. All for compatibility with sbitmap's. - - *bitmap.c (bitmap_zero): New function. - (bitmap_union_of_diffs): New function. - (bitmap_first_set_bit): New function. - (bitmap_last_set_bit): New function. - -2001-06-16 Neil Booth - - * cpp.texi, invoke.texi: Update. - * cpp.1, gcc.1: Regenerate. - -Sat Jun 16 12:45:20 CEST 2001 Jan Hubicka - - * i386.md (minsf): Fix splitter. (PR fortran/3191) - -2001-06-16 Neil Booth - - * doc/cpp.texi: Update. - * doc/cpp.1: Regenerate. - -2001-06-15 Loren J. Rittle - - * doc/install.texi: Use correct markup hints. - -Fri Jun 15 18:05:22 2001 Richard Kenner - - * function.c (gen_mem_addressof): Handle case where DECL is SAVE_EXPR. - - * explow.c (expr_size): If DECL and size specified, use it. - -2001-06-15 Zack Weinberg - - * doc/cpp.texi: Formatting corrections. - Correct buggy example of use of __GNUC__ etc. - Clarify $ in identifiers. - * doc/cpp.1: Regenerate. - -Fri Jun 15 19:35:38 CEST 2001 Jan Hubicka - - * optabs.c (expand_twoval_binop): Avoid undefined behavior. - -2001-06-15 Rainer Orth - - * doc/install.texi (Specific, alpha*-*-*): Fixed Tru64 UNIX - etc. spelling. - (Specific, alpha-*-osf1): Renamed to alpha*-*-osf*. - Added Tru64 UNIX V5.1 bootstrap hints. - (Specific, alpha*-*-osf*): Removed old section, obsolete. - -2001-06-15 Andreas Jaeger - - * doc/install.texi (Specific): Mention that glibc cannot be - compiled with GCC 3.0. - -2001-06-14 Andrew Haley - - * combine.c (nonzero_bits): Don't optimize away division by - zero. - -2001-06-15 Zack Weinberg - - * doc/cpp.texi: Revised and brought up to date. - * doc/cpp.1: Regenerate. - -2001-06-15 Loren J. Rittle - - * doc/install.texi: Update --enable-threads to match reality. - -2001-06-15 Michael Hayes - - * doc/install.texi: Update for C4x. - * README.C4X: Remove. - -2001-06-14 Joseph S. Myers - - * doc/c-tree.texi, doc/contrib.texi, doc/extend.texi, - doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi, - doc/objc.texi, doc/rtl.texi, doc/tm.texi: Fix spelling and typos. - Consistently use "built-in" and "bit-field". Minor logical markup - improvements. - * doc/gcc.1: Regenerate. - -2001-06-14 Richard Henderson - - * config/mips/mips.md (exception_receiver): New. - -2001-06-14 Daniel J. Berlin - - * doc/gcc.texi: Update passes documentation to be more in tune - with reality. - -Thu Jun 14 15:38:28 CEST 2001 Jan Hubicka - - * i386.c (ix86_expand_prologue): Fix merging conflict. - -2001-06-14 Joseph S. Myers - - * doc/c-tree.texi, doc/contrib.texi, doc/extend.texi, - doc/gcc.texi, doc/gcov.texi, doc/install-old.texi, - doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Use more - logical markup. Use TeX quotes and dashes. Use @dots{} and - @minus{}. Avoid spaces inside @var. Update last modification - date in gcc.texi. - * doc/gcc.1, doc/gcov.1: Regenerate. - -Thu Jun 14 12:44:15 CEST 2001 Jan Hubicka - - * i386.c (x86_accumulate_outgoing_args, x86_prologue_using_move, - x86_epilogue_using_move): New global variables. - (override_options): Enable ACCUMULATE_OUTGOING_ARGS if preferred. - (ix86_emit_save_regs_using_mov): New static function. - (ix86_expand_prologue, ix86_expand_epilogue): Use moves if preferred. - * i386.h (MASK_MMX, MASK_SSE, MASK_SSE2, MASK_128BIT_LONG_DOUBLE, - MASK_MIX_SSE_I387): Renumber. - (MASK_NO_ACCUMULATE_OUTGOING_ARGS): New. - (x86_accumulate_outgoing_args, x86_prologue_using_move, - x86_epilogue_using_move): Declare. - (TARGET_PROLOGUE_USING_MOVE, TARGET_EPILOGUE_USING_MOVE): New. - -2001-06-13 John David Anglin - - * inclhack.def (hpux10_cpp_pow_inline): New hack. - -2001-06-13 Richard Henderson - - * ifcvt.c (dead_or_predicable): Fix return value last patch. - -2001-06-13 Mark Mitchell - - * NEWS: Remove. - -2001-06-13 Richard Henderson - - * ifcvt.c (cond_exec_get_condition): Use reversed_comparison_code. - (cond_exec_process_if_block, dead_or_predicable): Likewise. - -2001-06-13 Rainer Orth - - * mips-tfile.c (copy_object): Always pass indexNil for symbol - table index. - -2001-06-13 Kazu Hirata - - * config/h8300/h8300.h (OK_FOR_T): Remove. - (EXTRA_CONSTRAINT): Do not use OK_FOR_T. - * config/h8300/h8300.md: Remove alternatives involving inc and dec - in the helper patterns for addhi3 and addsi3. - -2001-06-13 Phil Edwards - - * doc/contrib.texi: Link to libstdc++'s thanks.html for now. - -2001-06-13 Zack Weinberg - - * Makefile.in: Move _bb and __gcc_bcmp to LIB2FUNCS_ST. - * libgcc-std.ver: Take out __bb* and __gcc_bcmp. - - * config/t-slibgcc-elf-ver, config/t-slibgcc-sld, - config/alpha/t-osf4, config/mips/t-iris6: Extract all - references to @shlib_map_file@, @shlib_objs@, or - @shlib_base_name@ to Makefile variables. - Bump soname version of libgcc to 1. - -2001-06-13 Joseph S. Myers - - * doc/install.texi: Use more logical markup. Include @node - commands in the source when generating any non-HTML. - -2001-06-13 Joseph S. Myers - - * README: Remove. Some of the contents moved to ../README. - -2001-06-13 Alexandre Oliva - - * doc/install.texi (--enable-shared): List package names - recognized by GCC. - -2001-06-13 Alexandre Oliva - - * doc/install.texi (ix86-*-solaris*): Removed, outdated. - (*-*-solaris*): Document problem in /bin/sh that affects - configuring libraries. - (sparc-*-solaris*): Recommend GNU binutils 2.11.1 or vendor tools. - (*-sun-solaris2.8): Document linker problem that explains why - libjava is disabled by default. - -2001-06-09 Mark Mitchell - - Revert this patch: - * toplev.c (rest_of_compilation): Remove dead code before - purge_addressof. - -2001-06-12 Alexandre Oliva - - Reverted: - 2001-06-07 Nathan Sidwell - * configure.in (sparc*-*-*): Check assembler R_SPARC_UA32 support. - * configure: Rebuilt. - -2001-06-12 Jim Wilson - - * loop.c (strength_reduce): Move bl->all_reduced set before - check_ext_dependant_givs call. - (check_ext_dependant_givs): Clear bl->all_reduced when ignoring givs. - -2001-06-12 Alexandre Oliva - - * doc/extend.texi (Function Attributes): Document SH's sp_switch - and trap_exit. - -2001-06-13 Joseph S. Myers - - * doc/invoke.texi: Use more logical markup. Use TeX quotes, - dashes and @dots{}. - -2001-06-12 Richard Henderson - - * config/i386/i386.c (ix86_expand_prologue): Always use - gen_pro_epilogue_adjust_stack; update arguments. - (ix86_expand_epilogue): Likewise. - (ix86_emit_epilogue_esp_adjustment): Remove. - (ix86_adjust_cost): Remove pro_epilogue_adjust_stack hack. - * config/i386/i386.md (pro_epilogue_adjust_stack): Use a BLKmode - clobber of scratch memory instead of a modification of EBP as the - barrier. Update all peepholes to match. - -2001-06-12 Joseph S. Myers - - * doc/gcc.texi: Change the font used for @def... commands to a - fixed width font. - * doc/extend.texi: Use more logical markup. Use "built-in" - instead of "builtin". Use @deftypefn to mark up built-in - functions; specify their types in the @deftypefn and not in the - descriptive text. Use TeX quotes and dashes. Add more index - entries. - -2001-06-12 lars brinkhoff - - * gcc.texi (HOST_BITS_PER_LONGLONG): Document. - (DIR_SEPARATOR_2): Likewise. - -2001-06-12 Joseph S. Myers - - * doc/install.texi (--exec-prefix, --bindir, --libdir, - --with-slibdir, --infodir, --mandir, --with-cpp-install-dir): - Document. - (--enable-cpp): Change to document --disable-cpp instead; update - to reflect current default. - (--without-fast-fixincludes): Remove documentation. - (Final install): Document installation directories in more - detail. Document use of make dvi. - -Tue Jun 12 19:01:43 CEST 2001 Jan Hubicka - - * recog.c (validate_replace_rtx_1): Fix previous patch. - -Tue Jun 12 17:25:39 CEST 2001 Jan Hubicka - - * recog.c (validate_replace_rtx_1): Do plus_constant call always. - -Tue Jun 12 17:24:07 CEST 2001 Jan Hubicka - - * simplify-rtx.c (simplify_subreg): Allow volatile memory - to be subregged in case we don't have move instruction. - -Tue Jun 12 12:20:12 CEST 2001 Jan Hubicka - - * loop.c: Include predict.h - (strength_reduce): Drop branch prediction note in case - number of iterations is known. - * predict.def (PRED_LOOP_ITERATIONS): new. - * Makefile.in (loop.o): Add dependency on predict.h - -2001-06-12 Kaveh R. Ghazi - - * c-decl.c (grokdeclarator): Use INTEGRAL_TYPE_P. - - * c-typeck.c (c_start_case): Likewise. - -2001-06-12 Mark Mitchell - - * expr.c (store_field): Don't set MEM_ALIAS_SET for a field - in a structure at a variable address. - -2001-06-12 Joseph S. Myers - - * doc/gcov.texi: Use more logical markup. - -2001-06-11 Mark Mitchell - - * unroll.c (initial_reg_note_copy): Use PUT_REG_NOTE_KIND and - REG_NOTE_KIND, not PUT_MODE and GET_MODE. - (final_reg_note_copy): Remove REG_WAS_0 notes that are no longer - valid. - -2001-06-11 Stan Shebs - - * config/darwin.h (ASM_FILE_END): Remove decl of language_string. - -2001-06-11 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*lshrdi3_const32"): Mark the clobber - as an early clobber to make sure it is not used by reload in - one of the operands. - -2001-06-11 Mark Mitchell - - * doc/c-tree.texi: Update information about flag_honor_std. - * doc/install.texi: Note that binutils is required on HPUX 11. - * doc/invoke.texi (-fhonor-std): Note that -fno-honor-std is - now the default. - - * config/mips/abi64.h (RETURN_IN_MEMORY): Fix handling of - variable-sized types. - -2001-06-11 Joseph S. Myers - - * doc/md.texi: Use TeX dashes and quotes. - -2001-06-11 Joseph S. Myers - - * doc/rtl.texi: Reference manual chapter about trees. - -2001-06-11 Rainer Orth - - * config/mips/iris6.h (NO_BUILTIN_WINT_TYPE): Define. - (WINT_TYPE): Override. - (WINT_TYPE_SIZE): Likewise. - (SUBTARGET_CPP_SIZE_SPEC): Define __WINT_TYPE__ as appropriate. - - * config/sparc/sol2.h (WINT_TYPE): Define. - (WINT_TYPE_SIZE): Likewise. - - * config/sparc/sol2-sld-64.h (NO_BUILTIN_WINT_TYPE): Define. - (WINT_TYPE): Override. - (WINT_TYPE_SIZE): Likewise. - (CPP_ARCH32_SPEC): Add __WINT_TYPE__ definition. - (CPP_ARCH64_SPEC): Likewise. - -2001-06-11 Richard Henderson - - * unwind-dw2-fde.c (__deregister_frame_info): Don't play games - with alias attribute. - - * config/linux.h (CPLUSPLUS_CPP_SPEC): Use %(cpp) not $(cpp_cpu). - * config/alpha/linux.h (CPLUSPLUS_CPP_SPEC): Likewise. - -2001-06-11 Franz Sirl - - * config/rs6000/linux.h (CPLUSPLUS_CPP_SPEC): New. - -2001-06-11 Stan Shebs - - * config/darwin.c (darwin_encode_section_info): Rewrite to simplify - and fix coding mistakes. - -2001-06-11 Nick Clifton - - * config/m32r/m32r.md (movstrsi_internal): Do not expect a - return string from m32r_output_block_move. - * config/m32r/m32r-protos.h: Make m32r_output_block_move a - void function. - * config/m32r/m32r.h (INT32_P): Rename to UNIT32_P and remove - integer overflow. - (ROUND_ADVANCE): Remove signed/unsigned conflict. - * config/m32r/m32r.c: Declare prototypes for static functions. - (move_src_operand): Replace INT32_P with UINT32_P. - (function_arg_partial_nregs): Fixed signed/unsigned conflict - in initialisation of 'size'. - (m32r_sched_reord): Remove redundant declarations of 'code'. - (m32r_output_block_move): Change to a void function. - (m32r_encode_section_info): Cast return of - TREE_STRING_POINTER to avoid compile time warning. - -2001-06-11 Richard Henderson - - * config/alpha/osf5.h (TARGET_LD_BUGGY_LDGP): New. - * config/alpha/alpha.h (TARGET_LD_BUGGY_LDGP): Default. - (struct machine_function): Add gp_save_rtx. - * config/alpha/alpha.c (alpha_mark_machine_status): Mark it. - (alpha_gp_save_rtx): New. - * config/alpha/alpha-protos.h: Declare it. - * config/alpha/alpha.md (exception_receiver): Make an expander. - Use alpha_gp_save_rtx if TARGET_LD_BUGGY_LDGP. - -2001-06-11 Richard Henderson - - * config/alpha/osf.h (LINK_SPEC): Hide _GLOBAL_* symbols. - -2001-06-11 Rainer Orth - - * configure.in: Align --help messages. - Remove trailing full stops. - Consistently use lower case. - Fix DWARF 2 spelling. - * configure: Rebuilt. - -2001-06-11 Rainer Orth - - * config/alpha/alpha.h (CPP_SPEC): Don't define __LANGUAGE_C and - variants for .cpp/.cp/.c++ files. - Move definition of __LANGUAGE_C_PLUS_PLUS ... - (CPLUSPLUS_CPP_SPEC): ... here. - -Mon Jun 11 15:47:45 CEST 2001 Jan Hubicka - - * jump.c (duplicate_loop_exit_test): Fix loop header heuristics. - -2001-06-11 Joseph S. Myers - - * c-decl.c (store_parm_decls): When comparing types in an - old-style function declaration with those from a previous - prototype, compare the unqualified versions of parameter types. - Fixes PR c/3116. - -2001-06-11 Joseph S. Myers - - * doc/objc.texi: Use more logical markup. Use TeX dashes. - -2001-06-11 Joseph S. Myers - - * doc/c-tree.texi: Use more logical markup. - -2001-06-11 Joseph S. Myers - - * c-decl.c (xref_tag): Don't return previous tags of wrong type. - -2001-06-11 Aldy Hernandez - - * loop.c (scan_loop): Do not combine asm statements. - -2001-06-11 Michael Hayes - - * simplify-rtx.c (simplify_subreg): Fix offset calculation - for complex values within a CONCAT. - -2001-06-11 Joseph S. Myers - - * doc/install.texi: Update details of what components are included - in the GCC distribution. Update default directory for g++ - includes. Update documentation relating to old libio. Adjust - documentation on DejaGnu environment variables. Remove - documentation of --enable-cpplib. - -2001-06-11 Joseph S. Myers - - * doc/contrib.texi: Fix alphabetical order. Fix typos. Improve - markup. - -2001-06-10 Richard Henderson - - * ifcvt.c (life_data_ok): New. - (merge_if_block): Use it to determine whether to update - global_live_at_end. - (if_convert): Set it. - -2001-06-10 Richard Henderson - - * config/alpha/osf5.h (ASM_OLDAS_SPEC): Add -c. - -2001-06-10 Alexandre Oliva - - * doc/invoke.texi (MN10300 Options): Document -mno-crt0. - (SH Options): Document -mieee. - * doc/install.texi (Final install): Remove obsolete information - about installing cross compilers. - * doc/gcc.1: Rebuilt. - -2001-06-10 Richard Henderson - - * config/alpha/alpha.c (override_options): Set align_loops, - align_jumps, and align_functions. - * config/alpha/alpha.h (FUNCTION_BOUNDARY): Set to 32 bits. - (LOOP_ALIGN, LABEL_ALIGN_AFTER_BARRIER): Remove. - -2001-06-11 Michael Hayes - - * emit-rtl.c (gen_lowpart_common): Do not assume that SFmode and DFmode - are one and two words in size. - -2001-06-10 Richard Henderson - - * doc/invoke.texi (Optimization Options): Document -fpeephole2. - (Code Generation Options): Document -fnon-call-exceptions. - -2001-06-10 Mark Kettenis - - * config/i386/gnu.h (MD_FALLBACK_FRAME_STATE_FOR): Undefine. - -2001-06-10 Stephane Carrez - - * m68hc11.md (peepholes): Remove unused and wrong peepholes. - -2001-06-10 Mark Mitchell - Gabriel Dos Reis - - * Makefile.in (c-parse.o): Depend on diagnostic.h - (dwarf2out.o): Likewise. - - * dwarf2out.c: #include diagnostic.h - - * toplev.h (warningcount, errorcount, sorrycount): Remove - declarations. - - * toplev.c (warningcount, errorcount, sorrycount): Remove - definitions. - - * diagnostic.h (struct output_buffer): Reorder fields. - (diagnostic_kind_count): New macro. - (errorcount, warningcount, sorrycount): Define as macros. - (diagnostic_report_warnings_p): New macro. - (output_state): Add diagnostic_count field. - - * diagnostic.c (warningcount, errorcount, inhibit_warnings): - Remove tentative declaration. - (count_error): Use diagnostic_report_warnings_p. - - * c-parse.in: #include diagnostic.h - -2001-06-10 Stephane Carrez - - * config/m68hc11/m68hc11.md ("extendhisi2"): Fix constraints to - prefer a memory for operand 1. - ("*addsi3"): Fix constraints, the '!' was too strong. - ("*addsi3_split"): Accept soft register and split accordingly. - -2001-06-10 Stephane Carrez - - * config/m68hc11/m68hc11-protos.h (m68hc11_initialize_trampoline): - Move definition in the RTX_CODE section. - -2001-06-10 Stephane Carrez - - * config/m68hc11/m68hc11.h (RETURN_ADDR_RTX): Define the return - address as relative to the argument pointer. - -Sun Jun 10 10:58:53 CEST 2001 Jan Hubicka - - * predict.def (PRED_OPCODE): Place before call and error_return. - -Sun Jun 10 10:00:17 CEST 2001 Jan Hubicka - - * predict.def (PRED_CALL, PRED_ERROR_RETURN): New. - * predict.c (estimate_probability): Calculate dominance - information; improve detection of NORETURN heuristics; - add call/error_return heuiristics; tweak comparison heuristics - to recognize -1. - -2001-06-09 Alexandre Oliva - - * doc/invoke.texi (C Dialect Options): Document -aux-info. - (Debugging Options): Document -print-multi-directory and - -print-multi-lib. - * doc/gcc.1: Rebuilt. - - * toplev.c (independent_decode_option): Require `=' between - `-aux-info' and filename in the same argument. - * gcc.c: Don't pass -aux-info=filename twice. - -2001-06-09 Mark Mitchell - - * expr.c (expand_expr, case ARRAY_REF): Do not replace - an array element with the known initializing value if it has - side-effects. - - * toplev.c (rest_of_compilation): Remove dead code before - purge_addressof. - -2001-06-09 Neil Booth - - * cppinit.c (print_help): Document -fpreprocessed. - * invoke.texi: Similarly. - -Sun Jun 10 00:35:37 CEST 2001 Jan Hubicka - - * predict.def: New file. - * predict.h: New file. - * predict.c: Include predict.h. - (predictor_info): New structure and array. - (predict_edge, predict_insn): Rewrite; make global. - (predict_edge_def, predict_insn_def): New global functions. - (dump_prediction, combine_predictions_for_insns): New - static functions. - (estimate_probability): Change calls to predict_edge - to predict_edge_def and calls to predict_insn to predict_insn_def; - combine probabilities. - (expected_value_to_br_prob): Behave as predictor. - * rtl.h (REG_BR_PRED): Update coment. - (invert_br_probabilities): New. - * jump.c: Include predict.h - (duplicate_loop_exit_test): Drop branch prediction notes. - (invert_jump): Use invert_br_probabilities. - * Makefile.in: Add dependency on predict.h for jump and predict pass. - * ifcvt.c (dead_or_predicable): Use invert_br_probabilities. - * combine.c (distribute_notes): Handle BR_PRED. - -Sat Jun 9 23:29:41 CEST 2001 Jan Hubicka - - * predict.c (predict_insn, predict_edge): New static functions. - (estimate_probability): Revamp to use new functions; - fix loop header heruistics; add loop exist heruistics - -2001-06-09 Alexandre Oliva - - * config.gcc: Re-enable bi-arch sparc on Solaris 7 and above. - -2001-06-09 Peter Jakubek - - * config/m68k/m68k.md (ashrdi_const): Fix right shift by 16. - -2001-06-09 John David Anglin - - * vax.h (NOTICE_UPDATE_CC): Set CC_NO_OVERFLOW in cc_status.flags - for integer operations that don't update C bit. - -2001-06-09 Nicola Pero - - * gthr-posix.h (__gthread_objc_init_thread_system): If - pthread_key_create fails, it's not clear what the return value is. - This obvious fix makes sure it always returns -1 if a problem - occurs. - -2001-06-09 Joseph S. Myers - - * doc/gcc.texi: Use @defcodeindex for the index of options. Add - more index entries. Use more logical markup where appropriate. - Use TeX quotes and dashes. - -2001-06-09 Benjamin Kosnik - - * unwind-pe.h: Conditionally qualify references to abort with - std::. - -2001-06-09 Julian Foad - - * doc/invoke.texi: Remove superfluous text. - -2001-06-08 Richard Henderson - - * config/alpha/linux.h (CPLUSPLUS_CPP_SPEC): New. - (LIB_SPEC): Mirror config/linux.h version. - -2001-06-08 Richard Henderson - - * except.c (get_exception_pointer, get_exception_filter): Take a - struct function. Update all callers. - * except.h (get_exception_pointer): Update declaration. - * expr.c (expand_expr): Update get_exception_pointer call. - * integrate.c (expand_inline_function): Remap the exception pointer - from callee to caller. - -2001-06-08 Mark Mitchell - - * c-decl.c (grokdeclarator): Make the TREE_TYPE for declarations - accurately reflect its cv-qualification. - * c-typeck.c (type_lists_compatible_p): Ignore the top-levl - cv-qualifiers on function types. - -2001-06-08 Mark Mitchell - - * basic-block.h: Improve comments. - * except.c (expand_eh_region_end_allowed): Remove redundant call - to do_pending_stack_adjust. - * flow.c (life_analysis): Fix typo in comment. - (calculate_global_regs_live): Add documentation. - (mark_set_1): Likewise. - (debug_regset): Likewise. - * doc/rtl.texi (cond_exec): Document it. - -Fri Jun 8 21:52:51 CEST 2001 Jan Hubicka - - * i386.h (CONST_COSTS): set cost of constants representable in - immediate fields to 0. - -Fri Jun 8 21:34:54 CEST 2001 Jan Hubicka - - * function.c (diddle_return_value): Kill code to determine - return value before expand_function_end. - (expand_function_end): Delay call to clobber_return_register - after fucntion return value is computed. - - Re-install temporary reverted patch: - * toplev.c (rest_of_compilation): Call split_all_insns - before reg-stack and shorten-branches. Do shorten-branches - after reg-stack. - * final.c (shorten_branches): Remove insn splitting code. - -2001-06-08 Joseph S. Myers - - * doc/gcc.texi, doc/invoke.texi: Add index of command line - options. Use @opindex to index them rather than other indexing - commands. Use @var{...} instead of <...>. Avoid spaces in names - inside @var. Don't use @kindex to index escape sequences in - source code. - -2001-06-08 Jason Merrill - - * stmt.c (current_nesting_level): New fn. - * tree.h: Declare it. - * c-semantics.c (genrtl_compound_stmt): Use it. - - * dbxout.c (dbxout_symbol): Use DECL_RTL_SET_P. - -2001-06-08 Jakub Jelinek - - * jump.c (mark_modified_reg): Allow jump threading if condition - codes are represented by a hard register. - -2001-06-08 Jakub Jelinek - - * config/ia64/ia64.c (ia64_function_arg): Use [SDT]Fmode as gr_mode - for complex floats passed to unprototyped functions. - -2001-06-08 Mark Mitchell - - * except.c (expand_eh_region_end_allowed): Call - do_pending_stack_adjust as necessary. - -Fri Jun 8 14:16:33 CEST 2001 Jan Hubicka - - * function.c (clobber_return_register): Clobber the pseudo return - register too. - - * sibcall.c (skip_unreturned_value): New function. - (call_ends_block_p): Use it. - - * recog.c (split_insn): Break out from ... - (split_all_insns): ... here; do not use basic block information - when it is broken. - -Thu Jun 7 18:27:53 CEST 2001 Jan Hubicka - - * simplify-rtx.c (simplify_subreg): Fix verification of - combined subreg. - -2001-06-08 Rainer Orth - - * config/mips/mips.h (CPP_SPEC): Simplify .s/.S handling. - Don't define _LANGUAGE_C and variants for .cpp/.cp/.c++ files. - Move definition of _LANGUAGE_C_PLUS_PLUS ... - (CPLUSPLUS_CPP_SPEC): ... here. - Fixes PRs c++/3047, target/441. - -2001-06-08 Gerald Pfeifer - - * doc/install.texi2html (MAKEINFO): Keep value if set already. - -2001-06-08 Joseph S. Myers - - * doc/gcc.texi: Add trailing slash to URL. - -2001-06-07 Stan Shebs - - * config/darwin.h (ENCODE_SECTION_INFO): Define. - (REDO_SECTION_INFO_P): Ditto. - (STRIP_NAME_ENCODING): Ditto. - (ASM_DECLARE_OBJECT_NAME): Use ENCODE_SECTION_INFO. - (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Ditto. - (ASM_OUTPUT_LABELREF): Use STRIP_NAME_ENCODING. - (GEN_LAZY_PTR_NAME_FOR_SYMBOL): Ditto. - * config/darwin.c: No longer include c-tree.h. - (machopic_classify_ident): Rewrite to use symbol encoding. - (lookup_name_darwin): Remove. - (machopic_non_lazy_ptr_name): Handle encoded symbols. - (machopic_stub_name): Use STRIP_NAME_ENCODING. - (machopic_validate_stub_or_non_lazy_ptr): Ditto. - (machopic_finish): Ditto, remove test of decl. - (update_non_lazy_ptrs): New function. - (darwin_encode_section_info): New function. - * config/darwin-protos.h: Declare it. - * config/rs6000/rs6000.c (machopic_output_stub): Use - STRIP_NAME_ENCODING. - -2001-06-07 Mark Mitchell - - * tree.h (DECL_SOURCE_FILE): Improve documentation. - (DECL_SOURCE_LINE): Likewise. - -2001-06-07 Loren J. Rittle - - * config/alpha/elf.h (MAKE_DECL_ONE_ONLY): Copy definition - from config/elfos.h. - -2001-06-07 Phil Edwards - - * linux.h (CPLUSPLUS_CPP_SPEC): Move -D_GNU_SOURCE to here. - * pa/pa-linux.h: Allow CPLUSPLUS_CPP_SPEC to remain. - -2001-06-08 Joseph S. Myers - - * doc/contrib.texi: Add copyright notice. - -2001-06-08 Joseph S. Myers - - * doc/md.texi: Use four digit years in copyright notice. - -2001-06-08 Joseph S. Myers - - * config.gcc: For $target_alias of athlon-*, set - target_cpu_default2=5. - -Thu Jun 7 16:17:40 2001 Richard Kenner - - * global.c (build_insn_chain): Allow ADDR_VEC or ADDR_DIF_VEC after - end of last block if last real insn is a JUMP_INSN. - -2001-06-07 Joseph S. Myers - - * NEWS: Regenerate. - -2001-06-07 Rainer Orth - - * gthr-posix.h (__gthread_objc_thread_detach): Simply cast - pthread_t to objc_thread_t. - (__gthread_objc_thread_id): Likewise. - -2001-06-07 Rainer Orth - - * alpha/osf5.h (CPP_XFLOAT_SPEC): Override default definition. - (ASM_OLDAS_SPEC): Likewise. - - * alpha/osf.h (CPP_XFLOAT_SPEC): Define. - (CPP_SUBTARGET_SPEC): Use it. - (ASM_OLDAS_SPEC): Define. - (ASM_SPEC): Use it. - (SUBTARGET_EXTRA_SPECS): Define, declare the new specs above. - -2001-06-07 Rainer Orth - - * config/alpha/alpha.c (alpha_va_arg): Handle TFmode, TCmode args, - passed by reference. - -2001-06-07 Joseph S. Myers - - * doc/tm.texi (TARGET_SWITCHES, TARGET_OPTIONS): Adjust markup. - Document use of N_(...), and show it in examples. Note that - documentation should be added to invoke.texi. Avoid an overfull - hbox. - -Thu Jun 7 17:09:50 CEST 2001 Jan Hubicka - - * toplev.c (rest_of_compilation): Revert previous patch. - * final.c (shorten_branches): Likewise. - -2001-06-07 Gerald Pfeifer - - * pself.c, pself1.c, pself2.c, pself3.c, pself4.c, pself5.c: - Remove. - -2001-06-07 Joseph S. Myers - - * doc/install-old.texi: Remove more obsolete documentation. - -Thu Jun 7 13:20:14 CEST 2001 Jan Hubicka - - * expr.c (copy_blkmode_from_reg): Fix operand_subword_force call. - -Thu Jun 7 12:12:58 CEST 2001 Jan Hubicka - - * toplev.c (rest_of_compilation): Call split_all_insns - before reg-stack and shorten-branches. Do shorten-branches - after reg-stack. - * final.c (shorten_branches): Remove insn splitting code. - -2001-06-07 Nathan Sidwell - - * configure.in (sparc*-*-*): Check assembler R_SPARC_UA32 support. - * configure: Rebuilt. - -2001-06-07 Andreas Jaeger - - * emit-rtl.c (operand_subword): Remove unused variable. - -Wed Jun 6 14:51:05 CEST 2001 Jan Hubicka - - * i386.md (floatdi?f): Avoid usinf of SSE instructions - if TARGET_64BIT is false. - (floatdi?f_i386_only): New insn. - (floatdi?f_i386): Disable for !TARGET_64BIT. - - * (min?f, max?f splitters): Handle case where - operands are cross-matched. - - * i386.h (HI_REGISTER_NAMES): Remove redundant definition - (MMX_REGISTER_NAMES): Kill. - (PRINT_OPERAND): Fix comment. - (PRINT_REG): Likewise. - * i386.c (print_reg): Kill support for 'm' CODE; simplify. - (print_operand): Update comment; kill 'm'. - - * i386.c (x86_branch_hints): New global variable - (print_operand): Support outputting of branch prediction hints. - * i386.md (conditional jump patterns): Add branch prediction hints - to the template. - * i386.h (x86_branch_hints): Declare - (TARGET_BRANCH_PREDICTION_HINTS): New macro. - (PRINT_OPERAND_FUNCT_VALID_P): New. - * final.c (final_forward_branch_p): New function. - -2001-06-06 Richard Henderson - - * flow.c (mark_used_reg): Clean up looping over multiple hard - registers. Do conditional life bits across multiple hard regs. - -2001-06-05 Jeffrey D. Oldham - - * reload1.c (reload): Revert Schmidt's change so all USEs are not - deleted during reload. - -2001-06-05 Mark Mitchell - - * c-semantics.c (genrtl_scope_stmt): Write out nested inline - functions here, instead of ... - * c-decl.c (c_expand_body): ... here. - -2001-06-05 David O'Brien - - * config.gcc, config/sparc/bsd.h: Do not directly include - sparc/sparc.h. Instead do it via tm_file. - -2001-06-05 Richard Henderson - - * dwarf2.h (DW_EH_PE_aligned): New. - * dwarf2asm.c (eh_data_format_name): Name it. - (dw2_asm_output_encoded_addr_rtx): Align for it. - * dwarf2out.c (output_call_frame_info): Handle it for personality - routine and LSDA pointers. - - * unwind-pe.h (DW_EH_PE_aligned): New. - (base_of_encoded_value): Handle it. - (read_encoded_value_with_base): Likewise. - * unwind-dw2-fde.c (base_from_object): Likewise. - (get_cie_encoding): Likewise. - - * config/alpha/elf.h: Remove ecoff commentary. - * config/alpha/osf.h (ASM_PREFERRED_EH_DATA_FORMAT): New. - -2001-06-05 David O'Brien - - * config.gcc, config/i386/bsd386.h: Do not directly include - i386/386bsd.h. Instead do it via tm_file. - -2001-06-05 David O'Brien - - * elfos.h (USING_ELFOS_H): Identify the use of elfos.h in the same - way svr4.h does. - -2001-06-05 Pascal Obry - - * configure.in: Quote $enable_win32_registry in case the value has - spaces in it. - * configure: Ditto. - -2001-06-05 Mark Mitchell - - * print-rtl.c (xspaces): Remove. - (print_rtx): Use printf field-width, rather than xpsaces, to - indent. - * toplev.c (main): Disable sibling-call optimization if we are - handling exceptions. - -2001-06-05 Bernd Schmidt - - * reload1.c (reload): Delete all USEs generated during reload. - -2001-06-05 scott snyder - - * gccbug.in: Fix typo. - -2001-06-05 Andreas Jaeger - - * builtins.def: Fix definition of __builtin_cosf, it uses float as - parameter and return value. - -2001-06-04 Anthony Green - - * config/sparc/elf.h (CPP_PREDEFINES): Don't assert cpu or - machine. This is now done in sparc.h. - -2001-06-05 Nathan Sidwell - - Correct CVS resurrection of invoke.texi. - * doc/invoke.texi: Document new tree dump flags. - -2001-06-05 Joseph S. Myers - - * c-typeck.c (build_c_cast): Use TYPE_MAIN_VARIANT when checking - for casting an aggregate to its own type. Fixes PR c/2735. - -2001-06-05 Joseph S. Myers - - * doc/texinfo.tex: Update to version 2001-05-24.08. - -2001-06-05 Nathan Sidwell - - * c-common.h (flag_dump_translation_unit): Remove. - (enum tree_dump_index): Define. - (TDF_ADDRESS, TDF_SLIM): New #defines. - (dump_node_to_file): Remove. - (dump_node): Make extern. Add flags. - (dump_flag, dump_enabled_p, dump_begin, dump_end, - dump_switch_p): Prototype. - * c-common.c (flag_dump_translation_unit): Remove. - * c-decl.c (c_decode_option): Remove -fdump-translation-unit - logic. Use dump_switch_p. - * c-dump.h (struct dump_info): Add node and user fields. - (dump_pointer): Declare. - * c-dump.c (dump_node): Make extern. Add flags. - (SOL_COLUMN, EOL_COLUMN, COLUMN_ALIGNMENT): New #defines. - (dump_new_line, dump_maybe_newline): Use them. - (dump_pointer): New function. - (dequeue_and_dump): Check TDF_SLIM before dumping a _DECL's - chain or function's body. Dump address, if TDF_ADDRESS set. - (dump_flag): Define. - (dump_node_to_file): Remove. - (struct dump_file_info): New struct. - (dump_files): New array. - (dump_begin, dump_end, dump_enabled_p, dump_switch_p): Define. - * c-lang.c (finish_file): Adjust dumping. - * toplev.h (dump_base_name): Make extern. - * invoke.texi: Document new flags. - -2001-06-04 Mark Mitchell - - * c-tree.h (lang_decl): Add pending_sizes fields. - * c-decl.c (store_parm_decls): Save pending_sizes away for nested - functions. - (c_expand_body): Expand them. - (lang_mark_tree): Mark lang_decl:pending_sizes. - * function.c (expand_pending_sizes): New function, broken out - from ... - (expand_function_start): ... here. - * tree.h (expand_pending_sizes): Declare it. - -2001-06-04 Loren J. Rittle - - * doc/install.texi: Update FreeBSD information. Generalize - and update information for alpha-based platforms using ELF. - -2001-06-04 John David Anglin - - * c-decl.c (get_parm_info): Use INTEGRAL_TYPE_P. - (store_parm_decls): Likewise. - * c-typeck.c (convert_arguments): Likewise. - -2001-06-04 Richard Henderson - - * sibcall.c (optimize_sibling_and_tail_recursive_call): Suppress - optimization if current_function_calls_setjmp. - -2001-06-04 Joseph S. Myers - - * doc/c-tree.texi: Fix documentation of TREE_STRING_LENGTH for - wide strings. - -Mon Jun 4 20:44:25 CEST 2001 Jan Hubicka - - * simplify-rtx.c (simplify_subreg): Fix combining of - paradoxical subregs. - -Mon Jun 4 20:15:25 CEST 2001 Jan Hubicka - - * rtlanal.c (rtx_unsable_p): ADDRESSOF is stable. - (no_labels_between_p): Short circuit case beg==end. - -Mon Jun 4 20:03:05 CEST 2001 Jan Hubicka - - * rtlanal.c (operand_preference): Fix preference for objects. - -Mon Jun 4 20:00:40 CEST 2001 Jan Hubicka - - * gcse.c (handle_avail_expr): Be prepared to handle single_set - parallels. - -Mon Jun 4 19:59:46 CEST 2001 Jan Hubicka - - * combine.c (if_then_else_cond): Use simplify_subreg instead - of operand_subword. - * integreate.c (sub_constants): Likewise. - -Mon Jun 4 19:59:12 CEST 2001 Jan Hubicka - - * emit-rtl.c (constant_subword): Deprecate; remove most of code - and use simplify_gen_subreg. - -Mon Jun 4 19:55:23 CEST 2001 Lars Brinkhoff - - * sibcall.c (skip_copy_to_return_value): recognize the situation - when the called function's return value is copied into an - intermediate pseudo, and then into the calling functions return - value register. - -Mon Jun 4 16:50:33 CEST 2001 Jan Hubicka - - * simplify_rtx.c (simplify_subreg): Keep subregs on return values, - check CLASS_CANNOT_CHANGE_MODE before avoiding subreg on hard reg, - in case register wasn't OK previously, accept it now; allow - subregs of frame pointer if reload completed and frame pointer - is not needed. - - * combine.c (sombine_simplify_rtx): Fix comment; - use subreg_lowpart_offset instead of subreg_lowpart_p - (gen_lowpart_for_combine): Use subreg_lowpart_offset. - * rtl.h (subreg_lowpart_parts_p): Kill. - (subreg_lowpart_offset, subreg_highpart_offset): Declare. - * simplify-rtx.c (simplify_subreg): Use subreg_lowpart_offset. - * emit-rtl.c (gen_lowpart_SUBREG): Use subreg_lowpart_offset; - (gen_lowpart_common): Likewise. - (subreg_lowpart_p): Likewise. - (subreg_lowpart_parts_p): Kill. - (subreg_lowpart_offset, subreg_highpart_offset): New function. - - * emit-rtl.c (gen_lowpart_common): Use simplify_gen_subreg - to simplify SUBREG and REG. - (gen_highpart): Use simplify_gen_subreg for all simplifications. - - * emit-rtl.c (gen_realpart, gen_imagpart): Do not handle - CONCAT specially. - - * rtlanal.c (replace_regs): Use simplify_gen_subreg - -Mon Jun 4 09:21:19 2001 Richard Kenner - - * doc/c-tree.texi (ARRAY_REF): Say what type of expression must be. - (ARRAY_RANGE_REF): Added description. - - * tree.def (ARRAY_RANGE_REF): New code. - * alias.c (handled_component_p, can_address_p): Handle it. - * dwarf2out.c (loc_descriptor_from_tree): Likewise. - * explow.c (set_mem_attributes): Likewise. - * expr.c (expand_assignment, get_inner_reference): Likewise. - (expand_expr, expand_expr_unaligned, do_jump): Likewise. - * fold-const.c (operand_equal_p): Likewise. - * tree.c (staticp, stabilize_reference): Likewise. - * varasm.c (decode_addr_const): Likewise. - -Sun Jun 3 21:59:51 2001 Richard Kenner - - * reload.c (reload_inner_reg_of_subreg): Return 1 for PLUS. - (push_reload): Handle non-REG in reload_inner_reg_of_subreg case. - -2001-06-03 kaz Kojima - - * gcc/config/sh/sh.c (print_operand_address, print_operand): Call - mark_constant_pool_use before output_addr_const. - (struct pool_node): New field wend. - (add_constant): Note a sequence of constants that are referenced - by a given label. - (pool_window_label, pool_window_last): New variables. - (dump_table): Emit a unspec_volatile representing the end of a - sequence of constants. - (mark_constant_pool_use): New function. - * gcc/config/sh/sh.md (UNSPECV_WINDOW_END): New constant. - (consttable_2): Add the second operand which flags whether - this consttable entry was used or not. - (consttable_4, consttable_8, consttable_sf, consttable_df): - Likewise. - (consttable_window_end): New insn. - -2001-06-03 Alexandre Oliva - - * insn-addr.h (INSN_ADDRESSES_NEW): Make insn_uid__ unsigned. - Reformat according to coding standards. - - Warning removal. - * config/sh/sh.c (print_operand_address): Cast INTVAL to int. - (shl_and_kind): Cast wide constant. - (gen_far_branch): Define as static, as in declaration. - (barrier_align): Compute cache-line length as unsigned. Add - parentheses in initial credit computation. - (rounded_frame_size): Add parentheses. - (permanent_obstack): Remove declaration. Include ggc.h for - declaration of ggc_add_root_rtx(). - (get_free_reg): Removed declaration of unused variable reg. - (legitimize_pic_address): Mark mode argument as unused. - -2001-06-03 Igor Shevlyakov - - * config/sh/sh.c (output_branch): Support for insn with lenght - attr 12 & 16 which represents cond branches outside +-4096 range. - -2001-06-03 Alexandre Oliva - - * config/sh/lib1funcs.asm (ic_invalidate): Align the - cache-mirroring sequence. Add nops. - -2001-06-03 Joseph S. Myers - - * doc/install-old.texi: Remove more old installation - documentation. - * doc/install.texi: Add relevant parts here. - -2001-06-03 Gerald Pfeifer - - * doc/install.texi2html: New script. - -2001-06-03 David Edelsohn - - * doc/install.texi: Update AIX information again. - -2001-06-02 Joseph S. Myers - - * doc/gcc.texi, doc/install-old.texi: Remove old system-specific - installation documentation. - * doc/install.texi: Move it to here. - -2001-06-02 Joseph S. Myers - - * doc/install.texi: Clean up Texinfo markup. - -2001-06-02 Joseph S. Myers - - * doc/cpp.texi, doc/cppinternals.texi, doc/gcc.texi: Move contents - to just after title page. - -2001-06-02 Joseph S. Myers - - * doc/install-old.texi: Remove documentation of some configuration - options. - * doc/install.texi: Add relevant parts of this documentation here. - -2001-06-02 Gerald Pfeifer - - * contrib.texi: Updated entries for Mark Mitchell, Joseph S. Myers, - Gerald Pfeifer, Bernd Schmidt, and Dean Wakerley. - -Sat Jun 2 12:23:51 CEST 2001 Jan Hubicka - - * i386.md (all uses of ext_register_operand): Make sure they are - VOIDmode; replace all uses outside zero_extend. - (and?i splitters): Use ext_register_operands. - (test?i peep2): Remove ignored constraints. - * i386.c (ext_register_operand): Check that operand is - either pseudo or hard or 'Q' register. - -Sat Jun 2 06:53:50 2001 Richard Kenner - - * tree.h (struct record_layout_info_s): New field unpadded_align. - (set_lang_adjust_rli): New declaration. - * stor-layout.c (layout_decl): If DECL is packed, but at alignment - it would have if not packed, do not downgrade DECL_ALIGN. - (lang_adjust_rli, set_lang_adjust_rli): New. - (start_record_layout): Initialize new field unpadded_align. - (debug_rli): Display it. - (place_union_field, place_field): Set it. - (layout_type, case RECORD_TYPE): Call via lang_adjust_rli if set. - - * print-tree.c (print_node): Don't print "regdecl" when bit doesn't - mean that; use proper names instead. - Print DECL_NO_STATIC_CHAIN. - - * except.c (expand_builtin_frob_return_addr): Add missing call - to convert_memory_address #ifdef POINTERS_EXTEND_UNSIGNED. - (expand_builtin_eh_return): Likewise. - (expand_eh_return): Clean up ptr_mode != Pmode cases. - -2001-06-01 Jan van Male - - * doc/invoke.texi: Remove references to papers about sequence points - to readings.html, refer to that page. - -2001-06-01 Gerald Pfeifer - - * README: Update references to installation instructions. - -2001-06-01 Laurent Guerby - Gerald Pfeifer - - * doc/install.texi: Define srcdir when sources come from CVS. - Significantly improve markup. Wrap overly long lines - -2001-06-01 DJ Delorie - - * c-tree.texi, contrib.texi, cpp.texi, cppinternals.texi, - extend.texi, fdl.texi, gcov.texi, invoke.texi, md.texi, - objc.texi, rtl.texi, tm.texi, texinfo.tex, gcc.1, cpp.1, - gcov.1: Move to doc subdirectory. - * install.texi: Move to doc/install-old.texi. - * gcc.texi: Move to doc, refer to install-old.texi. - * Makefile.in: Reflect move of docs to doc/. - * f/Make-lang.in: Ditto. - * java/Make-lang.in: Ditto. - * doc/.cvsignore: New. - -2001-05-31 Jan van Male - - * invoke.texi: use two spaces between command options, eliminate - some 'overfull hboxes' - -2001-06-01 Hans-Peter Nilsson - - * Makefile.in (s-mlib): Make backtick-commands always succeed. - (DRIVER_DEFINES): Ditto. - -2001-05-31 Richard Henderson - - * gcc.c (init_gcc_specs): When linking against libgcc_s.so, - also link against libgcc.a. - -2001-05-31 Geoff Keating - - * config/mips/mips.h (ASM_OUTPUT_ASCII): Convert to function. - * config/mips/mips.c (mips_output_ascii): New function. - * config/mips/mips-protos.h (mips_output_ascii): Prototype. - - * config/mips/mips.h (DWARF_CIE_DATA_ALIGNMENT): Force to 4. - -Thu May 31 19:09:53 CEST 2001 Jan Hubicka - - * flow.c (set_block_for_new_insns): Remove bogus shortcut. - * i386.c (ix86_expand_int_movcc): Force one of operands to be register. - -2001-05-31 Rodney Brown - - * install.texi (Configuration): Add html links for --with-gnu-as & - --with-gnu-ld and refer to them from hppa & SCO triplets. - (Specific): Link back to with-gnu-ld for all ELF platfoms. - (Specific): Reword AVR binutils recommendation. - -2001-05-30 Zack Weinberg - - * ggc-page.c (size_lookup): Increase minimum allocation size - to eight bytes. - (ggc_print_statistics): Report size of each bin in bytes, not - as its order; there is no longer a direct relationship. - -2001-05-31 Jan van Male - - * extend.texi: Fix formating of examples, eliminate some - 'overfull hboxes'. - * gcc.texi: Eliminate some 'overfull hboxes'. - * invoke.texi: Use two spaces between command options, eliminate - some 'overfull hboxes'. - -2001-05-30 Richard Henderson - - * dwarf2out.c (dwarf2out_finish): Don't emit DW_AT_stmt_list at -g1. - -2001-05-30 Tom Tromey - - * gcc.c (do_spec_1): In `%O' case, if we computed saved_suffix, - use it in the new association. - -2001-05-30 Loren J. Rittle - John David Anglin - - * gthr-posix.h (__gthread_active_ptr): Cast function pointer - to target type to allow ISO C++ compiler to accept it. - * gthr-dce.h (__gthread_active_ptr): Likewise. - * gthr-solaris.h (__gthread_active_ptr): Likewise. - -2001-05-30 Neil Booth - - * cpplex.c (_cpp_lex_token): Revert patch of 16 May 2001 - so that we do accept comments in preprocessed input. - -2001-05-30 Neil Booth - - * cpphash.c (alloc_node): Cast allocated pointer. - -2001-05-30 Gordon Sadler - - * invoke.texi (Option Summary): Remove -isystem-c++ from options. - -2001-05-29 Stan Shebs - - * gcc.texi: Add links for information about Objective-C. - -2001-05-29 Nathan Sidwell - - * configure.in (gcc_version): Remove unrequired \ on ". (Solaris - /bin/sed fails on [^\"]). - (configargs.h): Likewise. - -2001-05-29 Hartmut Schirmer - - * config/sh/sh.h (IDENT_ASM_OP): End with TAB, not LF. - -2001-05-28 Stan Shebs - - * objc/objc.gperf: Remove, no longer used. - -2001-05-28 Joseph S. Myers - - * c-tree.texi, contrib.texi, cpp.texi, extend.texi, gcc.texi, - gcov.texi, install.texi, md.texi, objc.texi, rtl.texi, tm.texi: - Remove trailing whitespace. - -2001-05-28 Gerald Pfeifer - - * doc/install.texi (Specific): http://reality.sgi.com/ariel/freeware/ - became http://freeware.sgi.com/. - -2001-05-27 Geoffrey Keating - - * local-alloc.c (update_equiv_regs): Don't eliminate constant - expressions at -O0. - -2001-05-27 Stan Shebs - - * objc/objc-act.c: Add/fix various comments. - (init_selector): Remove, no longer used. - (build_msg_pool_reference): Ditto. - (objc_debug): Ditto. - -2001-05-27 Neil Booth - - * c-decl.c (init_decl_processing): - Don't call start_identifier_warnings. - * flags.h (warn_id_clash, id_clash_len): Remove. - * stringpool.c: Don't include flags.h. - (scan_for_clashes, do_identifier_warnings, - start_identifier_warnings): Remove. - * toplev.c (warn_id_clash, id_clash_len): Remove. - (display_help): Don't document -Wid-clash. - (decode_W_option): Print warning on -Wid-clash. - * tree.h (start_identifier_warnings): Remove. - * invoke.texi: Remove documentation of -Wid-clash. - -2001-05-27 Kaveh R. Ghazi - - * fixinc/fixtests.c: Declare entries in ENV_TABLE. - -2001-05-27 Bruce Korb - - * fixinc/check.tpl(HACK) add and use a Scheme variable - (has no test text): error out if no "test_text" is defined - * fixinc/fixincl.tpl: likewise - (FIXIDX): make it an enumeration so we minimize diffs - * fixinc/inclhack.def: re-alphabetize and add sort instructions - * fixinc/fixincl.x: regenerate - * fixinc/tests/base/stdio.h: test output got moved due to - the alphabetizing - * README-fixinc: rewrite (mostly) - -2001-05-27 Neil Booth - - * cpplib.c (run_directive): Set pfile->directive. - -2001-05-23 Theodore Papadopoulo - - * c-tree.texi: Reformat the manual as a single chapter now - included by gcc.texi. - * gcc.texi: Include c-tree.texi. Merge all indexes. - * Makefile.in (dvi): Add generation for the cppinternals - documentation. Added dependencies on fdl.texi and c-tree.texi - where appropriate. Use TEXI2DVI instead of custom tex calls. - (info): Added dependencies on fdl.texi and c-tree.texi where - appropriate. Remove the target c-tree.info. - -2001-05-27 Lars Brinkhoff - - * combine.c (try_combine): Fix typo in comment. - * expr.c (expand_expr): Likewise. - * config/i370/i370.md (untyped_call): Likewise. - -2001-05-26 Bruce Korb - - * fixinc/fixtests.c(stdc_0_in_system_headers_test): Must return "FIX" - when fixincl is operating in test mode - * fixinc/inclhack.def(AAB_dgux_int_varargs) : aesthetics - (AAB_ultrix_limits): remove redundant text - (AAB_ultrix_memory): ditto - (AAB_ultrix_string): ditto - (djgpp_wchar_h): fix the test text - (irix_stdio_va_list): add test text - (irix_limits_const): add a testing output file (limits.h is overwritten) - (strict_ansi_not_ctd): put limits.h second in list for same reason - (solaris27_mutex_init): test text needed selection text, too - - * fixinc/fixtests.c(stdc_0_in_system_headers_test): Must return "FIX" - when fixincl is operating in test mode - -2001-05-26 Philip Blundell - - * config/c4x/c4x-protos.h: Use GCC_C_PRAGMA_H in place of _C_PRAGMA_H. - * config/i960/i960-protos.h: Likewise. - * config/i370/i370-protos.h: Likewise. - * config/h8300/h8300-protos.h: Likewise, - * config/sh/sh-protos.h: Likewise. - * config/v850/v850-protos.h: Likewise. - -2001-05-26 Philip Blundell - - * config/arm/arm-protos.h: Use GCC_C_PRAGMA_H in place of _C_PRAGMA_H. - -2001-05-25 Zack Weinberg - - * toplev.c (debug_args, f_options, W_options): Mark - descriptions for translation. - (display_help): Translate descriptions on output. - - * cp/lang-options.h, f/lang-options.h, java/lang-options.h, - objc/lang-options.h: Mark descriptions for translation. - - * aclocal.m4: Quote final argument of patsubst. Use - 3-argument form of AC_DEFINE. Restore quotes to [] while - using AC_FD_CC. - * configure.in: Remove unnecessary changequote calls. - * configure, config.in: Regenerate. - -2001-05-25 Sam TH - - * basic-block.h: Fix header include guards. - * bitmap.h c-dump.h c-lex.h c-pragma.h c-tree.h collect2.h - cppdefault.h cpphash.h cpplib.h defaults.h diagnostic.h errors.h - except.h flags.h gcc.h gcov-io.h graph.h gstab.h gthr-aix.h - gthr-dce.h gthr-posix.h gthr-rtems.h gthr-single.h gthr-solaris.h - gthr-vxworks.h gthr-win32.h gthr.h hard-reg-set.h hwint.h - insn-addr.h libgcc2.h mbchar.h mkdeps.h params.h prefix.h real.h - rtl.h sbitmap.h system.h timevar.h toplev.h tradcpp.h tsystem.h - varray.h version.h: Likewise. - * config/dbxelf.h config/fp-bit.h config/arm/arm-protos.h - config/arm/arm.h config/c4x/c4x-protos.h - config/h8300/h8300-protos.h config/h8300/h8300.h - config/i370/i370-protos.h config/i370/i370.h - config/i960/i960-protos.h config/mcore/mcore.h - config/mips/mips-protos.h config/sh/sh-protos.h config/sh/sh.h - config/v850/v850-protos.h config/v850/v850.h: Likewise. - * fixinc/fixlib.h fixinc/server.h: Likewise. - -2001-05-25 Stacey Sheldon - - * config/arc/initfini.c (.init): Fix typo. - -2001-05-25 Geoffrey Keating - - * config/rs6000/rs6000.md (fseldfsf4): Correct mode of operand 4. - -2001-05-25 Rainer Orth - - * i386/i386.h (CC1_CPU_SPEC): Clarify -m486 etc deprecation messages. - -2001-05-25 Richard Henderson - - * libgcc-std.ver: Export XFmode and TFmode versions of symbols. - -2001-05-25 Richard Henderson - - * config.gcc (all gnu and linux): Use t-slibgcc-elf-ver with t-linux. - (i386-*-solaris2): Use t-slibgcc-elf-ver or t-slibgcc-sld. - (sparc*-*-solaris2): Likewise. - * config/t-linux: Remove shared libgcc macros. - * config/t-slibgcc-elf-ver: Move from sparc/t-slibgcc. - * config/t-slibgcc-sld: Move from sparc/t-slibgcc-sld. - -2001-05-25 Loren J. Rittle - - * config.gcc (*-*-freebsd*): Report bad configuration. - -2001-05-25 David Edelsohn - - * xcoffout.h (DBX_OUTPUT_GCC_MARKER): Do not emit any marker. - - * config/rs6000/aix.h (USER_LABEL_PREFIX): AIX symbols do not have - any prefix. - (ASM_OUTPUT_LABELREF): Delete. - -2001-05-25 Rainer Orth - - * fixinc/inclhack.def (strict_ansi_not, strict_ansi_not_ctd, - strict_ansi_only): Don't run if stdc_0_in_system_headers. - * fixinc/fixincl.x: Regenerate. - * fixinc/fixtests.c (stdc_0_in_system_headers_test): New function. - (FIX_TEST_TABLE): Declare it. - * fixinc/fixlib.h: Include config.h. - -2001-05-25 Rainer Orth - - * fixinc/inclhack.def (alpha___assert): Change char * args to - const char * on Tru64 UNIX to avoid excessive warnings from - assert.h. - * fixinc/fixincl.x: Regenerate. - -2001-05-25 Geoff Keating - - * dbxout.c (dbxout_symbol): Invert previous patch, which was - outputting a tag only for variable-size records. - -2001-05-25 Jeff Knaggs - - * config/alpha/alpha.md (movtf_internal): Use reg_overlap_mentioned_p - instead of rtx_equal_p for early clobber test. - -2001-05-26 Mark Mitchell - - * builtins.def: Encode additional information, such as names and - types, here. - * builtin-types.def: New file. - * builtins.c (built_in_names): Adjust use of DEF_BUILTIN. - (built_in_decls): Likewise. Don't explicitly initialize global - data to NULL. - (expand_builtin_mathfn): Handle float and long double variants of - math builtins. - (expand_builtin): Likewise. - * c-common.c (c_common_nodes_and_builtins): Make it table-driven. - (expand_tree_builtin): Handle long, long long, float, and long - double variants of math functions. - * c-common.h (c_tree_index): Remove some unused nodes. - (void_ftype): Remove. - (void_type_ptr): Likewise. - (int_ftype_int): Likewise. - (ptr_ftype_sizetype): Likewise. - * c-decl.c (init_decl_processing): Remove creation of DWARF - builtins. - * defaults.h (MD_INIT_BUILTINS): Provide default definition. - * tree.h (built_in_function): Adjust definition of DEF_BUILTIN. - * Makefile.in (c-common.o): Depend on builtin-types.def. - -2001-05-25 Dale Johannesen - - * config/rs6000/t-darwin: Fix dependencies for darwin.o. - -2001-05-25 Neil Booth - - * c-parse.in (notype_initdcl): Remove redundant line. - -2001-05-25 Rainer Orth - - * aclocal.m4: Fixed typo. - (gcc_AC_HEADER_STDBOOL): Define. - (gcc_AC_C__BOOL): Define. - * configure.in: Use them. - (AC_CHECK_HEADERS): Remove stdbool.h - * configure, config.in: Regenerate. - -2001-05-25 Richard Henderson - - * function.c (expand_function_start): Don't abort on PARALLEL - returns from hard_function_value. - -2001-05-25 Richard Henderson - - * config/i386/i386.md: Revert previous change. Do not apply - the peephole if the components do not die after the sequence. - -2001-05-25 Joseph S. Myers - - * c-parse.in (array_declarator): New. Handle C99 constructs. - Don't restrict [*] declarators to C only. - (after_type_declarator, parm_declarator_starttypename, - parm_declarator_nostarttypename, notype_declarator, - direct_absdcl1): Use it. - * c-decl.c (build_array_declarator, set_array_declarator_type): - New functions. Warn that [*] isn't properly implemented; pedwarn - for [*] outside C99 mode if pedantic rather than giving a hard - error. - (grokdeclarator): Handle static and type qualifiers in parameter - array declarators. - * c-tree.h (build_array_declarator, set_array_declarator_type): - Declare. - * extend.texi (Attribute Syntax): Document attributes in parameter - array declarators. - -2001-05-25 Mark Mitchell - - * config/i386/i386.md: Make sure cmpstr peepholes do not - affect liveness information. - -2001-05-24 Mark Mitchell - - * c-typeck.c (digest_init): Issue error messages about - invalid constants, not warnings. - -2001-05-24 Mark Mitchell - - * invoke.texi (-fno-builtin): Document that this is always on - in C++. - -2001-05-24 Philip Blundell - - * doc/install.texi (arm*-*-linux-gnu): Say that binutils 2.10 is - required. - -2001-05-24 Philip Blundell - - * config/arm/arm.c (output_return_instruction): Correctly handle - interworking and interrupt functions. - -2001-05-24 Philip Blundell - - * config/arm/arm.h (TARGET_SWITCHES): Correct misleading help for - -m{no-}sched-prolog. Fix typos and improve formatting. - -2001-05-24 Philip Blundell - - * invoke.texi (ARM Options): Improve wording slightly. Add - documentation for more options, including those for Thumb mode. - Don't mention options that don't exist or are unimplemented. - (Thumb Options): Delete; merged into above section. - -2001-05-24 Geoff Keating - - * config/rs6000/linux.h (SIGNAL_FRAMESIZE): Define. - (MD_FALLBACK_FRAME_STATE_FOR): Use it. - -Thu May 24 19:47:19 CEST 2001 Jan Hubicka - - * simplify-rtx.c (simplify_subreg): Fix CONCAT simplification; - fix hard register simplification. - -Thu May 24 00:15:17 2001 Rainer Orth - - * sparc/sol2.h (CPLUSPLUS_CPP_SPEC): Add all of CPP_SPEC instead - of just copying CPP_CPU_SPEC. - -Thu May 24 15:56:48 CEST 2001 Jan Hubicka - - * i386.c (incdec_operand): Accept only 1 and -1. - -2001-05-23 Kelley Cook - - * Makefile.in: Move many of the *_H definitions eariler in the - file, so that rules in t-* files that use them for - dependencies will work in a parallel build. - * config/i386/t-cygwin (winnt.o): Depend on $(CONFIG_H). - -2001-05-23 Richard Henderson - - * integrate.c (expand_inline_function): Handle CONCAT DECL_RESULT. - -2001-05-23 Neil Booth - - * cpp.texi: Update for handling of charconsts. - * cpplex.c (maybe_read_ucs): Don't accept D800-DFFF. Update - diagnostics. Skip to the end if the UCS is too short. - (cpp_interpret_charconst): Long charconsts issue a warning - not an error. - -2001-05-23 Richard Henderson - - * doc/install.texi (alpha-linux): Require binutils 2.11. - -2001-05-23 Neil Booth - - * c-lex.c (read_escape, read_ucs): Delete. - (lex_string): Use cpp_parse_escape. - * cpplex.c (read_ucs): Rename maybe_read_ucs. Do nothing - if not C++ or not C99. Warn if traditional. - (parse_escape): Rename cpp_parse_escape. Make the bitmask - unsigned. Warn for out-of-range escape sequences here. - Update to use maybe_read_ucs. - (cpp_interpret_charconst): Don't warn here. - * cpplib.h (cpp_parse_escape): New exported function. - -2001-05-23 Joseph S. Myers - - * extend.texi (Attribute Syntax): Clarify application of - attributes to parameters declared as functions or arrays. - -2001-05-23 Jason Merrill - - * dbxout.c (dbxout_type_methods): Do still group methods by name. - -2001-05-23 Zack Weinberg - - * diagnostic.c (vnotice): Kill. - (fnotice): Call vfprintf directly. - (diagnostic_for_decl, output_do_verbatim, output_verbatim, - verbatim, set_diagnostic_context): Rename string argument to - indicate that it is run through gettext. - (vbuild_message_string, build_message_string, output_do_printf): - Rename string argument to indicate that it is NOT run through - gettext. - (output_printf, diagnostic_for_decl, fatal_io_error, sorry, - output_do_verbatim, set_diagnostic_context, fnotice, _fatal_insn): - Run msgid argument through gettext. - (default_print_error_function): Run constant strings through - gettext when nothing else will. - (fatal_error, internal_error, error_recursion): Use fnotice. - Present complete sentences to gettext. - -2001-05-23 Mark Mitchell - - * jump.c (mark_jump_label): Fix thinko in 2001-05-19 change. - -2001-05-23 Richard Henderson - - * function.c (expand_function_start): Always use a pseudo - for the function result value. - -2001-05-22 Richard Henderson - - * config/mips/iris6.h (EH_FRAME_SECTION_ASM_OP): Give the - section pointer alignment. - - * doc/install.texi (alpha-linux): Require binutils >= 2.10. - - * unwind-dw2-fde.c (__deregister_frame_info): Stringize use - of __USER_LABEL_PREFIX__. - -2001-05-22 Richard Henderson - - * unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favor of... - (__deregister_frame_info_bases): New. - * unwind-dw2-fde.h: Declare it. - * libgcc-std.ver: Export it. - * crtstuff.c (__do_global_dtors_aux): Call it if we would have - called __register_frame_info_bases. - -2001-05-22 Loren J. Rittle - - * config/freebsd.h (FBSD_CPP_PREDEFINES): Use #endif/#if pair - instead of #elif (which is OK for this case but not in general). - -2001-05-22 Andrew MacLeod - - * builtins.c (expand_builtin_longjmp): A longjmp can be a call too. - * config/ia64/ia64.md (nonlocal_goto): Reverse label and frame pointer - parameters to __ia64_nonlocal_goto. Flag as NO_RETURN. - * config/ia64/ia64.c (ia64_expand_epilogue): Make sure we are issuing - "r2" to the assembly file. Only issue allocs with nonzero parameters. - -2001-05-22 Loren J. Rittle - David O'Brien - - * config/freebsd.h (LIB_SPEC): Key the exact setting to - configure-time options and target version of FreeBSD. Set-up - to match architectural change in threading support. Correctly - report when -pthread option is not supported by configure-time - options. - (FBSD_CPP_PREDEFINES): Move from architecture-specific files - and extend to encode target version number in run-time setting - of __FreeBSD__ macro to match the system compiler. - (CPP_PREDEFINES): Likewise. - (PREFERRED_DEBUGGING_TYPE): Change to DWARF2_DEBUG. - - * config/alpha/freebsd.h (CPP_PREDEFINES): Moved to common freebsd.h. - * config/i386/freebsd.h (CPP_PREDEFINES): Likewise. - -2001-05-22 Loren J. Rittle - David O'Brien - - * config.gcc (the unlabeled system switch statement): Add - generic configuration section to handle *-*-freebsd*. Also, - to match the system compiler, default to threading support (it - may be disabled with the standard --disable-threads - configuration-time switch). - (i[34567]86-*-freebsd* in machine-specific section): Use it. - (alpha*-*-freebsd* in machine-specific section): Likewise. - - * config/freebsd3.h: New file to expose FBSD_MAJOR macro (3). - * config/freebsd4.h: New file to expose FBSD_MAJOR macro (4). - * config/freebsd5.h: New file to expose FBSD_MAJOR macro (5). - * config/freebsd6.h: New file to expose FBSD_MAJOR macro (6). - * config/freebsd-nthr.h: New file to expose FBSD_NO_THREADS macro. - -2001-05-22 Loren J. Rittle - David O'Brien - - * config/t-freebsd (TARGET_LIBGCC2_CFLAGS): Add -fPIC. - * config/t-freebsd-thread (TARGET_LIBGCC2_CFLAGS): Add - -pthread instead setting macro. - -2001-05-22 Richard Henderson - - * crtstuff.c (__register_frame_info_bases): Declare. - (frame_dummy): Use it, if CRT_GET_RFIB_TEXT or CRT_GET_RFIB_DATA. - (__do_global_dtors_aux, __do_global_dtors): Streamline. - - * config/i386/linux.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New. - (CRT_GET_RFIB_DATA): New. - * config/i386/sysv4.h: Likewise. - * config/i386/sco5.h: Likewise. - (ASM_PREFERRED_EH_DATA_FORMAT): New. - -2001-05-22 Richard Henderson - - * rtl.c (read_string): Break out from ... - (read_rtx): ... here. - -2001-05-22 Gerald Pfeifer - - * doc/install.texi (Specific): Remove a bogus and duplicate part - copied from the end of the document. - -2001-05-22 Bernd Schmidt - - * Makefile.in (LIBGCC_DEPS): Correct LIB1ASMSRC dependency. - -2001-05-22 Gerald Pfeifer - - * install.texi: Remove obsolete information on SunOS as well as - i386-sun-sunos4, i860-intel-osf1, and powerpcle-*-solaris2*. - (Installing GNU CC on the Sun): Remove section. - -2001-05-22 Alexandre Oliva - - * cppfiles.c (remove_component_p): Don't assume lstat/stat will - keep errno unchanged on success. - -2001-05-22 Joseph S. Myers - - * c-lex.c (lex_number): If pedantic and not C99, pedwarn exactly - once for hexadecimal floats, whether or not they contain a decimal - point. Don't let the setting of pedantic otherwise affect the - parsing of hexadecimal floats. - -2001-05-22 Gerald Pfeifer - - * README.ACORN: Remove obsolete file. - -2001-05-22 Jan Hubicka - - * combine.c (gen_binary): Use swap_commutative_operands_p - (simplify_comparison): Likewise. - * expmed.c (emit_store_flag): Likewise. - * expr.c (compare_from_rtx): Likewise. - (do_compare_rtx_and_jump): Likewise. - * optabs.c (emit_cmp_and_jump_insn): Revert last patch; abort - if not emitting a branch and operands want swapping. - -2001-05-22 Neil Booth - - * c-lex.c (c_lex): Just cast cpp's hashnode to gcc's one. - * stringpool.c: (IS_FE_IDENT, make_identifier): Delete. - (maybe_get_identifier): Update. - * tree.h (make_identifier): Delete. - -2001-05-21 Richard Henderson - - * combine.c (subst): Do not substitute for a register as - a destination subreg/strict_low_part/zero_extract. - - * combine.c (simplify_comparison): Update op1 after constant - extension. - * recog.c (const_int_operand): Accept only constants valid - for the given mode. - * genrecog.c: Update comments wrt const_int_operand. - - * emit-rtl.c (init_emit_once): Zero unused memory in a - CONST_DOUBLE. - -2001-05-21 Mark Mitchell - - * tree.h (type_num_arguments): Declare it. - * tree.c (type_num_arguments): New function. - -2001-05-21 Richard Henderson - - * dwarf2out.c (current_funcdef_number): Move outside dwarf2 - conditional ifdef. - -2001-05-21 Geoff Keating - - * config/rs6000/rs6000.md (maxsf3): Use rs6000_emit_minmax. - (maxsf3+1): Delete. - (minsf3): Use rs6000_emit_minmax. - (minsf3+1): Generalize to handle both SMIN and SMAX. Use - rs6000_emit_minmax. - (movsfcc): Use rs6000_emit_cmove. - (fselsfsf4): Don't compare a CONST_INT with a floating-point value. - Don't generate emit_fselsfsf4. - (fseldfsf4): Likewise. - (maxdf3): Use rs6000_emit_minmax. - (maxdf3+1): Delete. - (mindf3): Use rs6000_emit_minmax. - (mindf3+1): Generalize to handle both SMIN and SMAX. Use - rs6000_emit_minmax. - (movdfcc): Use rs6000_emit_cmove. - (fseldfdf4): Don't compare a CONST_INT with a floating-point value. - Don't generate emit_fselsfsf4. - (fselsfdf4): Likewise. - * config/rs6000/rs6000.c (zero_fp_constant): New predicate. - (min_max_operator): New predicate. - (rs6000_emit_cmove): New function. - (rs6000_emit_minmax): New function. - * config/rs6000/rs6000-protos.h: Prototype new functions. - * config/rs6000/rs6000.h (PREDICATE_CODES): Add zero_fp_constant - and min_max_operator. - - * config/rs6000/rs6000.c (output_cbranch): Handle all - conditional types in the switch statement. - -2001-05-21 Mark Mitchell - - * c-decl.c (finish_decl): Don't set DECL_C_HARD_REGISTER for - non-register variables. - * extend.texi: Document that asm-specifications do not make sense - for non-static local variables. - -2001-05-21 Jason Merrill - - * dbxout.c (MINIMAL_DEBUG, flag_minimal_debug): Lose. - (dbxout_type_fields): Lose minimal_debug support. - (dbxout_type_methods, dbxout_type): Likewise. - -2001-05-17 Andrew Haley - - * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New. - -2001-05-21 Richard Henderson - - * dwarf2out.c (DEBUG_FRAME_SECTION): Rename from FRAME_SECTION. - Update all users. - -2001-05-20 Richard Henderson - - * dwarf2out.c (DEBUG_ABBREV_SECTION, DEBUG_ARANGES_SECTION, - DEBUG_MACINFO_SECTION, DEBUG_LOC_SECTION, DEBUG_PUBNAMES_SECTION, - DEBUG_STR_SECTION): Rename from s/DEBUG_//. Update all users. - * dwarfout.c (DEBUG_SFNAMES_SECTION, DEBUG_SRCINFO_SECTION, - DEBUG_MACINFO_SECTION, DEBUG_PUBNAMES_SECTION, DEBUG_ARANGES_SECTION): - Likewise. - * config/mips/iris6.h (DEBUG_SFNAMES_SECTION, DEBUG_SRCINFO_SECTION, - DEBUG_MACINFO_SECTION, DEBUG_PUBNAMES_SECTION, DEBUG_ARANGES_SECTION, - DEBUG_FRAME_SECTION, DEBUG_ABBREV_SECTION): Rename as above. - (DEBUG_LOC_SECTION, DEBUG_STR_SECTION): New. - * config/ia64/ia64.h (DEBUG_ABBREV_SECTION, DEBUG_ARANGES_SECTION, - DEBUG_PUBNAMES_SECTION): Rename as above. - (DEBUG_MACINFO_SECTION, DEBUG_LOC_SECTION, DEBUG_STR_SECTION): New. - -2001-05-20 Richard Henderson - - * optabs.c (emit_cmp_and_jump_insns): Don't swap commutative - operands unless the operation is commutative. - -2001-05-20 Kaveh R. Ghazi - - * fold-const.c (tree_expr_nonnegative_p): Detect more non-negative - cases. - -2001-05-21 Joseph S. Myers - - * extend.texi: Clarify documentation of extensions included in ISO - C99. Prefer C99 terminology and syntax to old GNU terminology and - syntax. Add more index entries. Document mixed declarations and - code as an extension in C89 mode. Warn about future changes to - semantics of inline functions. Fixes PR other/930. - -Sun May 20 16:39:24 2001 Richard Kenner - - * expr.c (expand_expr, case ARRAY_REF): Don't fold constant - access if EXPAND_CONST_ADDRESS or EXPAND_INITIALIZER. - (expand_expr, case COMPONENT_REF): Do copy if misaligned even - if EXPAND_CONST_ADDRESS or EXPAND_INITIALIZER. - - * stmt.c (expand_decl): Set mode, alignment, and sizes for CONST_DECL. - -2001-05-20 Richard Henderson - - * sched-deps.c (sched_analyze_insn): Force volatile memory reads - to be output before a branch. - -2001-05-20 Richard Henderson - - * Makefile.in (dwarf2asm.o): Depend on $(TREE_H). - -2001-05-20 Richard Henderson - - * config/i386/att.h (ASM_SHORT, ASM_LONG): Add trailing \t. - (ASM_DOUBLE): Remove. - * config/i386/bsd.h, config/i386/sco5.h: Likewise. - * config/i386/sun386.h: Likewise. - - * config/i386/i386.h (UNALIGNED_SHORT_ASM_OP): New. - (UNALIGNED_INT_ASM_OP, INT_ASM_OP): New. - - * config/i386/cygwin.h (INT_ASM_OP): Remove. - * config/i386/freebsd-aout.h, config/i386/i386-aout.h: Likewise. - * config/i386/i386-coff.h, config/i386/i386-interix.h: Likewise. - * config/i386/netbsd.h, config/i386/openbsd.h: Likewise. - - * config/i386/cygwin.h: Adjust uses of ASM_LONG for trailing \t. - * config/i386/djgpp.h, config/i386/i386.h: Likewise. - * config/i386/i386elf.h, config/i386/ptx4-i.h: Likewise. - * config/i386/sco5.h, config/i386/svr3gas.h: Likewise. - * config/i386/sysv4.h, config/i386/vsta.h: Likewise. - * config/i386/win32.h: Likewise. - -2001-05-20 Joseph S. Myers - - * invoke.texi: Add more options to summary list. - -2001-05-20 Joseph S. Myers - - * invoke.texi: Document meaning of -pedantic when -std=gnu* is - used. Fixes PR c/2291. - * gcc.1: Regenerate. - -2001-05-20 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_override_options): Ignore - the -fpic and -fPIC options, clear flag_pic. - -2001-05-20 Neil Booth - - * hashtable.c (calc_hash): Fix HASHSTEP definition. - * stringpool.c (make_identifier): No statistics here anymore. - * objc-act.c (steup_string_decl): Remove redundant check. - -2001-05-20 Neil Booth - - * Makefile.in (OBJS, LIBCPP_OBJS, LIBCPP_DEPS, - cpplib.o, cpphash.o, fix-header): Update. - (hashtable.o): New target. - * c-common.h: Include cpplib.h. Define C_RID_CODE and - struct c_common_identifier here. - * c-lang.c (c_init_options): Update. Call set_identifier_size. - * c-lex.c (c_lex): Update. - * c-pragma.h: Update. - * c-tree.h (struct lang_identifier): Contain c_common_identifier. - Delete rid_code. - (C_RID_CODE): Delete. - * cpphash.c: Rewrite to use hashtable.c. - * cpphash.h: Update include guards. - (struct cpp_reader): Remove hashtab. - hash_ob and buffer_ob are no longer pointers. Add hash_table - and our_hashtable. - (HASHSTEP, _cpp_init_hashtable, _cpp_lookup_with_hash): Delete. - (_cpp_cleanup_hashtable): Rename _cpp_destroy_hashtable. - (_cpp_cleanup_stacks): Rename _cpp_init_directives. - * cppinit.c (cpp_create_reader): Update. - * cpplex.c (cpp_ideq, parse_identifier, cpp_output_token): Update. - (cpp_interpret_charconst): Eliminate warning. - * cpplib.c (do_pragma, do_endif, push_conditional, - cpp_push_buffer, cpp_pop_buffer): Update. - (_cpp_init_stacks): Rename cpp_init_directives. - (_cpp_cleanup_stacks): Remove. - * cpplib.h: Update include guards. Include tree-core.h and c-rid.h. - (cpp_hashnode, cpp_token, NODE_LEN, NODE_NAME, - cpp_forall_identifiers, cpp_create_reader): Update. - (C_RID_CODE, cpp_make_node): New. - (c_common_identifier): New identifier node for C front ends. - * cppmain.c (main): Update. - * fix-header.c (read_scan_file): Update. - * flags.h (id_clash_len): Make unsigned. - * ggc.h (ggc_mark_nonnull_tree): New. - * hashtable.c: New. - * hashtable.h: New. - * stringpool.c: Update comments and copyright. Update to use - hashtable.c. - * toplev.c (approx_sqrt): Move to hashtable.c. - (id_clash_len): Make unsigned. - * toplev.h (ident_hash): New. - * tree.c (gcc_obstack_init): Move to hashtable.c. - * tree.h: Include hashtable.h. - (IDENTIFIER_POINTER, IDENTIFIER_LENGTH): Update. - (GCC_IDENT_TO_HT_IDENT, HT_IDENT_TO_GCC_IDENT): New. - (struct tree_identifier): Update. - (make_identifier): New. -cp: - * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. - (C_RID_CODE): Remove. - * lex.c (cxx_init_options): Call set_identifier_size. Update. - (init_parse): Don't do it here. -objc: - * objc-act.c (objc_init_options): Call set_identifier_size. Update. - -Sat May 19 18:23:04 2001 Richard Henderson - - * except.c (dw2_build_landing_pads): Use word_mode, not Pmode, - as ncessary. - (expand_eh_return): Convert between word_mode and Pmode. - * unwind-dw2.c (extract_cie_info): Do not assume words and pointers - are the same size. - (execute_stack_op): Likewise. - (execute_cfa_program): Likewise. - (uw_frame_state_for): Likewise. - (uw_update_context_1): Likewise. - * unwind.inc (_Unwind_Reason_Code): Likewise. - * config/mips/mips.h (EH_RETURN_DATA_REGNO): Define. - (EH_RETURN_STACKADJ_RTX): Likewise. - * config/mips/mips.c (compute_frame_size): Make space for saving - EH return registers. - (mips_expand_epilogue): Handle EH stack adjustments. - * config/mips/mips.md (eh_return): New pattern. - (eh_set_lr_si): Likewise. - (eh_set_lr_di): Likewise. - Add splitter to perform EH return after reload. - -2001-05-19 Mark Mitchell - - * jump.c (mark_jump_label): Tidy previous change. - -2001-05-19 Bruce Korb - - * fixinc/genfixes: no need for two warnings - * fixinc/Makefile.in: open stdin for those building with a closed one. - -2001-05-19 Mark Mitchell - - * jump.c (jump_optimize_1): Tidy. - (mark_jump_label): When changing the label in a LABEL_REF, change - update any REG_EQUAL notes as well. - -2001-05-19 Joseph S. Myers - - * c-parse.in (parm_declarator): Split into - parm_declarator_starttypename and parm_declarator_nostarttypename. - (parm_declarator_starttypename, parm_declarator_nostarttypename): - New. Allow parenthesized sub-declarators which don't begin with a - TYPENAME. Fixes PR c/166. - -2001-05-19 Mark Mitchell - - * defaults.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): New - macro. - * tm.texi (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): - Document it. - * toplev.c (main): If the target does not allow profiling without - a frame pointer, issue an error message. - * config/i386/linux.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): - Define it to false. - -Sat May 19 07:53:42 2001 Richard Kenner - - * recog.c (general_operand): Modify last change to allow it if reload - has completed. - -Sat May 19 10:23:54 CEST 2001 Jan Hubicka - - * recog.c (general_operand): Prohibit nonzero subreg bytes on - subregs containing mem. - -Sat May 19 09:40:45 2001 Denis Chertykov - - * regrename.c (regrename_optimize): frame pointer register can - use a few hardregs. - -2001-05-18 Jason Merrill - - * README.DWARF: Move into dwarfout.c. - -2001-05-18 Dale Johannesen - - * config/rs6000/rs6000.c (secondary_reload_class): Fix Darwin - specific misuse of r0 as a reload address. - -Fri May 18 22:42:04 CEST 2001 Jan Hubicka - - * combine.c (combine_simplify_rtx): Clear op0_mode if simplification - succeeded. - -Fri May 18 07:26:34 2001 Richard Kenner - - * genrecog.c (enum decision_type): Add DT_elt_zero-wide_safe. - (add_to_sequence): Make that decision type. - (maybe_both_true_2, nodes_identical_1, factor_tests): Use it. - (write_switch, write_cond, debug_decision_2): Likewise. - - * dbxout.c (dbxout_type): Use host_integerp and fix typo in testing - for INTEGER_TYPE. - (dbxout_symbol, case TYPE_DECL): Don't generate tag for records of - variable size. - -2001-05-18 Stan Shebs - - * configure.in (gcc_cv_as_eh_frame): Cope with old assemblers. - * configure: Regenerate. - -2001-05-18 Per Bothner - - Changes needed for java/jvspec.c - * gcc.h (n_infiles, outfiles): Add declarations. - * gcc.c (n_infiles, outfiles): Mske no longer static. - -Fri May 18 10:14:42 2001 Jeffrey A Law (law@cygnus.com) - - * config/pa/som.h (EXCEPTION_SECTION): Define. - -2001-05-18 Daniel Berlin - - * dwarf2out.c: Add dw_loc_list_ref, a reference to a location - list. - Add have_location_lists, a variable to determine whether we need a - .debug_loc section or not. - (enum dw_val_class): Add dw_val_class_loc_list. - (dw_val_struct): Add val_loc_list. - (dw_loc_list_struct): New structure, represents location lists. - (new_loc_list): New function, return a new location list, given - the range and location expression. - (add_loc_descr_to_loc_list): New function, add a location - expression to a location list, given the expression and range. - (output_loc_list): New function, output a location list. - (gen_internal_sym): Modified to take symbol prefix, so we can - reuse it for location list symbols. - (add_AT_loc_list): New function, add a location list to a DIE at - the named attribute. - (AT_loc_list): New function, return the location list reference - for a given attribute, if it's a location list. - (print_die): Handle dw_val_class_loc_list. - (size_of_die): Ditto. - (value_format): Ditto. - (output_die): Ditto. - (output_location_lists): New function, output all of the location - lists for a DIE and it's children. - (dwarf2out_finish): Call output_location_lists if we have location - lists. - - -Fri May 18 15:39:16 CEST 2001 Jan Hubicka - - * gcse.c (try_replace_reg): First try global replace, later try to - simplify the expression. - - * gcse.c (find_used_regs): Change calling convention; work via - note_uses. - (cprop_insn): Update call of find_used_regs; work for CALL_INSNs too. - -2001-05-18 Bernd Schmidt - - Revert - 2001-02-09 Nick Clifton - * config/arm/arm.md: Change output constraint on post inc - load/store multiple patterns to be a read/write constraint. - -2001-05-18 Mark Mitchell - - * basic-block.h (struct basic_block_def): Add documentation about - what a basic block is, and what the various fields are used for. - * flow.c (calculate_globlal_regs_live): Add documentation about - how the algorithm works, and how we know that it will terminate. - Check that the the inductive assumption that guarantees - termination actually holds. - (mark_used_regs): Treat conditionally set registers as used. - (debug_regset): Add comment. - * rtl.texi (cond_exec): Add documentation. - - * function.c (expand_function_start): Avoid creating BLKmode - pseudos. - -2001-05-17 Mark Mitchell - - * dwarf2out.c (output_comp_unit): Always output a compilation-unit - DIE, even if it has no children. - (dwarf2out_finish): Always output the line-number table, even if - it has no content. - -2001-05-18 David Edelsohn - - * rs6000.md (movsfcc,movdfcc): Remove NE case. - -2001-05-17 Bruce Korb - - * fixinc/fixincl.tpl: rewritten as an AutoGen version 5 template - * fixinc/genfixes: emit a warning if AutoGen is out of date - -2001-05-17 Brendan Conoboy - Bruce Korb - - * fixinc/fixincl.sh(FIXINC): accept local directory if fixincl not - found in fixinc directory. Facilitates binary distributions. - -2001-05-17 Jeffrey Oldham - - * dbxout.c (dbxout_symbol_location): For CONCAT, skip types not - COMPLEX_TYPE. - -Thu May 17 19:42:39 2001 Mark Kettenis - - * dwarf2out.c (modified_type_die): Equate qualified type to die. - -Thu May 17 23:19:46 CEST 2001 Jan Hubicka - - * integrate.c (copy_rtx_and_substitute): Use simplify_gen_subreg. - (simplify_subreg): Handle complex types represented as CONCAT. - - * recog.c (validate_replace_rtx_1): Properly canonicalize expression - * rtl.h (swap_commutative_operands_p): Declare. - * rtlanal.c (swap_commutative_operands_p): New. - (operand_preference): New static function. - - * combine.c (combine_simplify_rtx): Use swap_commutative_operands_p. - (gen_binary): Likewise. - * optabs.c (emit_cmp_and_jump_insns, emit_conditional_move): Likewise. - * simplify-rtx.c (simplify_gen_binary, - simplify_gen_relational): Likewise. - -Thu May 17 20:43:36 CEST 2001 Jan Hubicka - - * cse.c (fold_rtx): Use simplify_subreg. - - * simplify-rtx.c (simplify_replace_rtx): Use simplify_gen_subreg. - (simplify_gen_subreg): New. - (simplify_rtx): Use simplify_subreg. - * rtl.h (simplify_gen_subreg): Declare. - -2001-05-17 Mark Mitchell - - * doc/install.texi: Update Solaris information. - - * except.h (protect_cleanup_actions): Remove it. - (lang_protect_cleanup_actions): Declare it. - * except.c (protect_cleanup_actions): Remove it. - (lang_protect_cleanup_actions): New variable. - (init_eh): Don't make protect_cleanup_actions a GC root. - (expand_eh_region_and_cleanup): Call - lang_protect_cleanup_actions. - (output_function_exception_table): Remove unused `align' - variable. - * varasm.c (assemble_external): Abort if we have not yet - opened the assembly output file. - -Thu May 17 11:54:50 2001 Jeffrey A Law (law@cygnus.com) - - * except.c (sjlj_emit_function_enter): Call assemble_external_libcall - for eh_personality_libfunc. - -Thu May 17 19:48:00 CEST 2001 Jan Hubicka - - * recog.c (validate_replace_rtx_1): Use "TO" mode if not VOIDmode - when calling simplify_subreg. This is needed to allow replacing - of expression of one mode by expression of different mode. - -Thu May 17 19:40:03 CEST 2001 Jan Hubicka - - * simplify-rtx.c (simplify_subreg): Avoid creating of incorrect subregs. - -2001-05-17 Bernd Schmidt - - * expr.c (protect_from_queue): Protect against subsequent calls to - emit_queue. - (expand_expr, case ADDR_EXPR): Prevent protect_from_queue from being - too clever. - -Thu May 17 18:17:34 CEST 2001 Jan Hubicka - - * simplify_rtx.c (simplify_subreg): Fix simplification of nested subregs. - -2001-05-17 Gerald Pfeifer - - * gccbug.in (CATEGORIES): Add "bootstrap". - -Thu May 17 16:59:41 CEST 2001 Jan Hubicka - - * simplify-rtx.c (simplify_subreg): Break out from ... - * combine.c (combine_splify_rtx) ... here and ... - * recog.c (validate_replace_rtx_1): ... here; - * rtl.h (subreg_lowpart_parts_p, simplify_subreg): Declare. - * emit-rtl.c (subreg_lowpart_parts_p): Break out from ... - (subreg_lowpart_p): ... here. - -2001-05-17 Bernd Schmidt - - * stmt.c (expand_asm_operands): For inout operands, make sure - the substitution of '=' for '+' makes it into the rtl. - - * reload1.c (delete_output_reload): Call eliminate_regs on substed. - (reload_as_needed): Call update_eliminable_offsets a bit later. - -2001-05-17 Gerald Pfeifer - - * gcc.texi (gccbug): Refer to the web pages for detailed information - on GNATS. - -2001-05-16 Zack Weinberg - - * libgcc1-test.c, libgcc1.c, config/i386/perform.h: Delete file. - - * Makefile.in: Delete variables: OLDCC, CCLIBFLAGS, OLDAR, - OLDAR_FLAGS, LIBGCC1, LIBGCC1_TEST, CROSS_LIBGCC1, - LIB1FUNCS, and LIB1FUNCS_EXTRA. Delete rules: libgcc1-test, - libgcc1-test.o. Clarify commentary now that libgcc1 no longer exists. - * cross-make: Don't set LIBGCC1. - * mklibgcc.in: Delete all code for building from libgcc1.c. - Always honor LIB1ASMFUNCS if set. - - * crtstuff.c, floatlib.c, longlong.h, config/fp-bit.c, - config/arc/lib1funcs.asm, config/arm/lib1funcs.asm, - config/d30v/libgcc1.asm, config/fr30/lib1funcs.asm, - config/h8300/lib1funcs.asm, config/i386/cygwin.asm, - config/i386/uwin.asm, config/m68hc11/larith.asm, - config/m68k/lb1sf68.asm, config/mcore/lib1.asm, - config/mn10200/lib1funcs.asm, config/sh/lib1funcs.asm, - config/sparc/lb1spc.asm, config/sparc/lb1spl.asm, - config/v850/lib1funcs.asm, config/c4x/libgcc.S: - Delete or update references to libgcc1 in commentary. - - * config/t-libc-ok, config/t-linux, config/t-linux-aout, - config/t-netbsd, config/a29k/t-a29kbare, config/a29k/t-vx29k, - config/alpha/t-interix, config/alpha/t-osf, config/alpha/t-vms, - config/arc/t-arc, config/arm/t-arm-aout, config/arm/t-arm-coff, - config/arm/t-arm-elf, config/arm/t-linux, config/arm/t-pe, - config/arm/t-semi, config/arm/t-strongarm-coff, - config/arm/t-strongarm-elf, config/arm/t-strongarm-pe, - config/arm/t-xscale-coff, config/arm/t-xscale-elf, config/avr/t-avr, - config/c4x/t-c4x, config/d30v/t-d30v, config/fr30/t-fr30, - config/h8300/t-h8300, config/i386/t-beos, config/i386/t-cygwin, - config/i386/t-i386elf, config/i386/t-interix, config/i386/t-netware, - config/i386/t-next, config/i386/t-rtems-i386, config/i386/t-sol2, - config/i960/t-960bare, config/i960/t-vxworks960, config/ia64/t-ia64, - config/m32r/t-m32r, config/m68hc11/t-m68hc11-gas, config/m68k/t-lynx, - config/m68k/t-m68kbare, config/m68k/t-m68kelf, - config/m68k/t-mot3300-gald, config/m68k/t-mot3300-gas, - config/m68k/t-next, config/m68k/t-vxworks68, config/m88k/t-bug, - config/m88k/t-dgux, config/m88k/t-dgux-gas, config/m88k/t-dguxbcs, - config/m88k/t-luna, config/m88k/t-luna-gas, config/m88k/t-m88k, - config/m88k/t-m88k-gas, config/m88k/t-sysv4, config/mcore/t-mcore, - config/mcore/t-mcore-pe, config/mips/t-bsd, config/mips/t-bsd-gas, - config/mips/t-cross64, config/mips/t-ecoff, config/mips/t-elf, - config/mips/t-iris6, config/mips/t-r3900, config/mips/t-svr3, - config/mips/t-svr3-gas, config/mips/t-svr4, config/mips/t-svr4-gas, - config/mips/t-ultrix, config/mn10200/t-mn10200, - config/mn10300/t-mn10300, config/pa/t-linux, config/pa/t-linux64, - config/pa/t-pa, config/pa/t-pa64, config/pa/t-pro, - config/pdp11/t-pdp11, config/pj/t-pj, config/rs6000/t-aix43, - config/rs6000/t-beos, config/rs6000/t-darwin, config/rs6000/t-newas, - config/rs6000/t-ppccomm, config/rs6000/t-rs6000, config/sh/t-linux, - config/sh/t-sh, config/sparc/t-chorus-elf, config/sparc/t-elf, - config/sparc/t-sol2, config/sparc/t-sp86x, config/sparc/t-sparcbare, - config/sparc/t-sparclite, config/sparc/t-splet, - config/sparc/t-sunos41, config/sparc/t-vxsparc, - config/sparc/t-vxsparc64, config/v850/t-v850: - Don't set any of LIBGCC1, CROSS_LIBGCC1, or LIBGCC1_TEST. - - * config/alpha/alpha.h, config/i386/i386.h, config/i860/i860.h: - Don't set FLOAT_VALUE_TYPE, FLOAT_ARG_TYPE, INTIFY, or FLOATIFY. - * config/d30v/d30v.h: Don't mention LIBGCC_NEEDS_DOUBLE, - FLOAT_VALUE_TYPE, FLOAT_ARG_TYPE, FLOATIFY, INTIFY, - nongcc_SI_type, nongcc_word_type, or perform_* - * config/i860/fx2800: Don't define perform_umodsi3 or perform_modsi3. - - * config/i386/386bsd.h, config/i386/beos-elf.h, - config/i386/linux-aout.h, config/i386/linux-oldld.h, - config/i386/linux.h, config/i386/mach.h, config/i386/netbsd.h, - config/i386/openbsd.h, config/i386/osfrose.h, config/i386/rtemself.h: - Don't include i386/perform.h. - - * config/a29k/t-a29k, config/arm/t-semiaof, config/i370/t-i370, - config/i370/t-linux, config/i370/t-mvs, config/i370/t-oe, - config/i386/t-djgpp, config/i386/t-i386bare, config/i386/t-vsta, - config/ia64/t-hpux, config/mips/t-mips, config/mips/t-mips-gas, - config/mips/t-osfrose, config/sparc/t-sp64, config/sparc/t-sunos40, - config/vax/t-openbsd, config/vax/t-vax: Delete. - - * config.gcc: Remove references to deleted files. - (arm-semi-aof): Use arm/t-semi for tmake_file. - - * gcc.texi, install.texi, invoke.texi, tm.texi: - Delete or rewrite text which is no longer relevant now that - libgcc1 no longer exists. - - * config/t-openbsd, config/alpha/t-interix, config/i386/t-interix: - No need to set INSTALL_ASSERT_H. (Missed in previous sweep.) - -2001-05-16 Wolfgang Bangerth - Bruce Korb - - * fixinc/inclhack.def(solaris27_mutex_init): Fix broken mutex - initializer - -2001-05-16 Zack Weinberg - - * i386.md: Add two peepholes to clean up code generated by - cmpstr* expanders. - -2001-05-16 Richard Henderson - - * dwarf2asm.c (eh_data_format_name): Add names for "pointer size" - variants of non-absolute encodings. - - * config/i386/i386.h (ASM_PREFERRED_EH_DATA_FORMAT): New. - - * libgcc-std.ver (_Unwind_Find_FDE, __register_frame_info_bases, - __register_frame_info_table_bases): Export. - -2001-05-16 Richard Henderson - - * except.c (eh_data_format_name): Move to ... - * dwarf2asm.c: ... here. Use designated initializers if available. - (dw2_asm_output_encoded_addr_rtx): Accept varargs commentary. - * dwarf2asm.h: Update declarations. - * dwarf2out.c (output_cfi) [DW_CFA_set_loc]: If for_eh, mind - ASM_PREFERRED_EH_DATA_FORMAT. - (output_call_frame_info): Likewise. Use 'L' augmentation for - the LSDA encoding. - - * unwind-dw2-fde.h (struct fde_vector): New. - (struct old_object): Rename from struct object. - (struct object): New. - (__register_frame_info_bases): Declare. - (__register_frame_info_table_bases): Declare. - (struct dwarf_fde): Remove explicit pc_begin/pc_range members. - * unwind-dw2-fde.c (objects): Remove. - (unseen_objects, seen_objects): New. - (__register_frame_info_bases): New. - (__register_frame_info): Use it. - (__register_frame_info_table_bases): New. - (__register_frame_info_table): Use it. - (__deregister_frame_info): Rewrite for changed object struct. - (base_from_object, get_cie_encoding, get_fde_encoding): New. - (fde_unencoded_compare): Rename from fde_compare; uninline. - (fde_single_encoding_compare, fde_mixed_encoding_compare): New. - (start_fde_sort): Adjust for new definition of fde_vector. - (fde_insert): Likewise. - (end_fde_sort): Likewise. Select comparison function based - on properties of the object. - (fde_split): Take object and fde_compare_t arguments. - (frame_heapsort, fde_merge): Likewise. - (classify_object_over_fdes): Rename from count_fdes. Handle - encoded pointers. Collect encoding, mixed_encoding, and pc_begin - for the object. - (add_fdes): Handle encoded pointers. - (init_object): Rename from frame_init. Update for new struct object. - (linear_search_fdes): Rename from search_fdes. Handle encoded - pointers. - (binary_search_unencoded_fdes): Broken out from _Unwind_Find_FDE. - (binary_search_single_encoding_fdes): New. - (binary_search_mixed_encoding_fdes): New. - (search_object): New. - (_Unwind_Find_FDE): Update for new struct object. Fill in - the dwarf_eh_bases. - * unwind-dw2.c: Include unwind-pe.h. Constify all pointers - iterating over EH data. - (_Unwind_FrameState): Remove saw_lsda, addr_encoding. Add - fde_encoding, lsda_encoding. - (read_uleb128, read_sleb128): Remove. - (read_encoded_pointer): Remove. All callers use read_encoded_value. - (extract_cie_info): Set lsda_encoding from 'L' augmentation. - (uw_frame_state_for): Don't set bases.func. Handle encoded fde - pointers. - * unwind-pe.h: Add "struct" to _Unwind_Context references. - -2001-05-16 Neil Booth - - * cppexp.c (lex): Use NODE_NAME and NODE_LEN. - * cpphash.c (_cpp_lookup_with_hash): Similarly. - * cpplex.c (cpp_ideq, parse_identifier, cpp_token_len, - cpp_spell_token, cpp_output_token): Similarly. - * cpplib.c (lex_macro_node, do_undef, do_pragma, - do_pragma_poison, parse_assertion, do_assert): Similarly. - * cppmacro.c (builtin_macro, parse_args, funlike_invocation_p, - save_parameter, _cpp_create_definition, check_trad_stringification, - cpp_macro_definition): Similarly. - * cppmain.c (cb_define, cb_undef, dump_macro): Similarly. - * c-lex.c (cb_undef, c_lex): Similarly. - * fix-header.c (recognized_function): Similarly. - * cpplib.h (NODE_LEN, NODE_NAME): New. - (cpp_hashnode): Rename length len. - -Wed May 16 13:41:10 2001 Jeffrey A Law (law@cygnus.com) - - * pa32-regs.h (HARD_REGNO_MODE_OK): Allow TI/TFmode values in - GPRs. - -2001-05-16 Andreas Jaeger - - * Makefile.in (toplev.o): Add dependency on dwarf2asm.h. - - * toplev.c: Include dwarf2asm.h for prototype of - dw2_output_indirect_constants. - -Wed May 16 19:53:53 CEST 2001 Jan Hubicka - - * stmt.c (expand_asm_operands): Be able to offload addressof - expression to memory. (PR optimization/185) - -Wed May 16 18:53:23 CEST 2001 Jan Hubicka - - * combine.c (combine_simplify_rtx): Set op0_mode to VOIDmode after - applying distributive law. - -2001-05-16 John David Anglin - - * pa-hpux10.h (THREAD_MODEL_SPEC): Define. - - * gthr-dce.h (UNUSED): Attribute unused macro. - (__gthread_key_dtor): Make arguments UNUSED. - (__gthread_key_delete): Revise for compatibility with DRAFT4 - implementation. - -2001-05-16 David Edelsohn - - * doc/install.texi: Update AIX information. - * README.RS6000: Remove obsolete file. - -2001-05-16 Jakub Jelinek - Nathan Sidwell - - * gcc.c (give_switch): Don't write before start of string. - Always append suffix. - -2001-05-16 Nathan Sidwell - - * cpplex.c (_cpp_lex_token, '/' case): Comments can't appear - after stage3. - -2001-05-16 Gerald Pfeifer - - * README.ALTOS: Remove obsolete file. - -2001-05-16 Neil Booth - - * c-lex.h (save_and_forget_protocol_qualifiers, - forget_protocol_qualifiers, remember_protocol_qualifiers): - Remove deleted functions' prototypes. - -2001-05-16 Neil Booth - - * c-parse.in (methodtype): New production. - (methoddef, methodproto): Collapse separate '-' and '+' - handlers into 1. - -2001-05-16 Neil Booth - - * c-common.h (RID_FIRST_PQ): New. - * c-parse.in (objc_pq_context): New. - (objc parser): Set objc_pq_context rather than calling - remember_protocol_qualifiers and forget_protocol_qualifiers. - Don't call save_and_forget_protocol_qualifiers. - (yylexname): Handle objc protocol qualifiers here. - * stringpool.c (struct str_header): Replace with sp_hashnode. - (SP_EMPTY, SP_LEN, SP_TREE, SP_STR, SP_VALID): New. - (alloc_string): Rename alloc_ident. Use the SP_ accessors. - Allocate an IDENTIFIER_NODE for each identifier. - (FORALL_STRINGS, set_identifier): Delete. - (FORALL_IDS, expand_string_table, stringpool_statistics): Update. - (ggc_alloc_string): Use an obstack. - (get_identifier, maybe_get_identifier, mark_string_hash): Update. - * tree.h: Update comments. - (set_identifier): Delete. - * objc/objc-act.c (N_PQ, saved_pq, saved_not_pq, - save_and_forget_protocol_qualifiers, forget_protocol_qualifiers, - remember_protocol_qualifiers): Delete. - -Tue May 15 22:14:09 2001 Jeffrey A Law (law@cygnus.com) - - * flow.c (life_analysis): After life analysis is complete, do - an optional scan over insns looking for REG_LABEL notes that - reference a deleted label. - (propagate_block_delete_insn): Verify INOTE is a CODE_LABEL - before peeking at LABEL_NUSES. - -2001-05-15 Richard Henderson - - * unwind-sjlj.c (_Unwind_GetDataRelBase): New. - (_Unwind_GetTextRelBase): New. - -2001-05-15 Mark Mitchell - - * config/sparc/sol2.h (CPLUSPLUS_CPP_SPEC): Define. - -2001-05-15 Geoffrey Keating - - * objc/objc-act.c (handle_class_ref): Use rest_of_decl_compilation - so that CHOOSE_SECTION gets used. - - * config/rs6000/sysv4.h (ASM_PREFERRED_EH_DATA_FORMAT): Treat - TARGET_RELOCATABLE like flag_pic for now. - -2001-05-15 David Edelsohn - - * rs6000.md (movdi splitter): Sign extend more efficiently. - * rs6000.c (reg_or_arith_cint_operand): Redefine 64-bit constant - to "long long" valid on 32-bit and 64-bit hosts. - (logical_operand): Cast trunc_int_for_mode return value. - (rs6000_emit_move): Shift macro to encapsulate variable. - (rs6000_va_start): Use HOST_WIDE_INT_PRINT_DEC. - (rs6000_emit_{prologue,epilogue}): EH regno is unsigned but - plus_constant requires signed argument. - -2001-05-15 Loren J. Rittle - - * gthr-posix.h: Make additional pthread-* functions weak. - -Tue May 15 13:51:32 CEST 2001 Jan Hubicka - - * recog.c (apply_change_group): Avoid unneeded validating. - -2001-05-14 David Edelsohn - - * rs6000.c (num_insns_constant_wide): Constants are sign-extended. - (num_insns_constant): CONST_INT can be 64-bits. - -2001-05-14 Stan Shebs - - * config/darwin.h (LIB_SPEC): Just use -lSystem. - (LIBGCC_SPEC): Don't define. - -2001-05-14 Richard Henderson - - * configure.in (gcc_cv_as_eh_frame): New test. - * config.in, configure: Rebuild. - * gcc.c (init_spec): Honor USE_AS_TRADITIONAL_FORMAT. - -2001-05-14 Andrew MacLeod - - * config/ia64/lib1funcs.asm (__divtf3): Fix incorrect bits in - extended precision divide. - -2001-05-14 Andrew MacLeod - - * config/ia64/ia64.c (rtx_needs_barrier): Call rtx_needs_barrier - for RETURNS as well. - -Mon May 14 17:34:48 CEST 2001 Jan Hubicka - - * i386.h (TARGET_64BIT): Define to constant if !TARGET_BI_ARCH - (CPP_CPU??_SIZE_TYPE): New. - (CPP_CPU??_SPEC, CPP_CPUCOMMON_SPEC): Break out from... - (CPP_CPU_SPEC): ... here; support choosing of CPU. - (EXTRA_SPECS): Add cpp_cpu??, cpp_cpu??sizet, cpp_cpucommon. - (MAX_LONG_TYPE_SIZE, MAX_BITS_PER_WORD): Define to 32 for 32bit-only - compiler. - * i386.c (override_options): Add sorry about not suported modes. - -Mon May 14 08:56:47 2001 Jeffrey A Law (law@cygnus.com) - - * config/pa/som.h (NM_FLAGS): Remove. - (ASM_OUTPUT_FUNCTION_PREFIX): No longer truncate subspace names. - (ASM_OUTPUT_SECTION_NAME): Remove. - (MAKE_DECL_ONE_ONLY, ASM_WEAKEN_LABEL): Likewise. - -2001-05-14 Mark Mitchell - - * regrename.c (regrename_optimize): Do not rename registers to - leaf registers. - -2001-05-14 Alexandre Oliva - - * rtl.texi (CALL_INSN_FUNCTION_USAGE): Note that (and when) it may - contain MEMs. Remove useless distinction about clobbering - registers. - -2001-05-13 Geoff Keating - - * config/rs6000/rs6000.h (EXCEPTION_SECTION): Move to... - * config/rs6000/aix.h (EXCEPTION_SECTION): ... here. - * config/rs6000/sysv4.h (CONST_SECTION_ASM_OP): Delete. - (ASM_PREFERRED_EH_DATA_FORMAT): Define. - (EXCEPTION_SECTION): Define. - -2001-05-13 Zack Weinberg - - * libgcc2.c, libgcc2.h: Restore __eprintf. Label as used for - binary backward compat only. - * Makefile.in (LIB2FUNCS_ST): New. Put _eprintf here, not - in LIB2FUNCS. Pass it to mklibgcc. - * mklibgcc.in: Handle LIB2FUNCS_ST. - - * Makefile.in (installdirs): Don't create $(gcc_tooldir). - -2001-05-13 Alexandre Oliva - - * tm.texi (THREAD_MODEL_SPEC): Document it. - * gcc.c (main): Use it. - * config/rs6000/aix43.h (THREAD_MODEL_SPEC): Define it. - * config/rs6000/aix51.h (THREAD_MODEL_SPEC): Likewise. - -2001-05-13 Franz Sirl - - * rtl.h (SYMBOL_REF_WEAK): New macro. - * rtlanal.h (rtx_addr_can_trap): Use it, a weak SYMBOL_REF can trap. - * varasm.c (make_decl_rtl): Mark SYMBOL_REF weak if necessary. - * rtl.texi (SYMBOL_REF_WEAK): Document it. - * gcc.texi: Remove wrong description. - -2001-05-13 Mark Mitchell - - * Makefile.in (STAMP): New macro. - Replace all uses of `touch' with $(STAMP). - * fixinc/Makefile.in: Likewise. - -Sun May 13 07:26:34 2001 Richard Kenner - - * configure.in: ldopen is never in -lexc, so don't test for it. - Add test for exc_resume in -lexc for Ada. - * configure: Regenerated. - -2001-05-12 Richard Henderson - - * dwarf2asm.c (size_of_encoded_value): New function. - * dwarf2asm.h: Declare it. - * except.c (output_function_exception_table): Align the TType - array only as wide as the encoding. - -2001-05-12 Zack Weinberg - - * extend.texi: Document #pragma GCC java_exceptions. - -2001-05-12 Neil Booth - - * c-parse.in (bison parser, init_reswords): Remove uses of - doing_objc_thang. - * c-tree.h (doing_objc_thang): Remove. - -2001-05-12 Neil Booth - - * cpplex.c (_cpp_lex_token): Ensure we warn at most once - about files not ending in newlines. - -2001-05-12 Neil Booth - - * dwarfout.c (dwarfout_init): Add cast. - * sched-deps.c (sched_analyze_insn): Remove unused vars. - * unwind-dw2-fde.c (_Unwind_Find_FDE): Flag unused parameter so. -cp: - * method.c (build_mangled_C99_name): Remove unused prototype. - -2001-05-12 Alexandre Oliva - - * config/arm/arm.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Use delta. - -2001-05-12 Alexandre Oliva - - * defaults.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define. - * tm.texi (TARGET_PRTMEMFUNC_VBIT_LOCATION): Document. - -2001-05-11 Richard Henderson - - * defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New. - * dwarf2asm.c (dw2_force_const_mem, dw2_output_indirect_constant_1, - dw2_output_indirect_constants, dw2_asm_output_encoded_addr_rtx): New. - * dwarf2asm.h (dw2_asm_output_encoded_addr_rtx): Prototype. - (dw2_output_indirect_constants): Prototype. - * dwarf2out.c (dwarf2out_begin_prologue): Generate - current_function_func_begin_label if we'll need it for EH. Exit - early for IA64_UNWIND_INFO. - * except.c: Get DW_EH_PE_* defines from dwarf2.h. - (eh_data_format_name): Update for indirect references. - (output_function_exception_table): Care for IA64_UNWIND_INFO. - Handle ASM_PREFERRED_EH_DATA_FORMAT. - * except.h (MUST_USE_SJLJ_EXCEPTIONS): IA64_UNWIND_INFO needn't - define HAVE_eh_return etc. - * final.c (final_start_function): Always call dwarf2out_begin_prologue. - (final_end_function): Don't call output_function_exception_table. - * toplev.c (compile_file): Call dw2_output_indirect_constants. - (rest_of_compilation): Invoke output_function_exception_table - for ia64 before assemble_end_function. - * tm.texi (ASM_PREFERRED_EH_DATA_FORMAT): Document. - (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Document. - - * unwind-dw2.c (_Unwind_GetTextRelBase, _Unwind_GetDataRelBase): New. - * unwind.h: Declare them. - * libgcc-std.ver: Export them. - * unwind-pe.h: New file. - - * config/alpha/elf.h (ASM_PREFERRED_EH_DATA_FORMAT): New. - - * config/ia64/fde-glibc.c: Use "struct unw_table_entry" - instead of "fde". - (find_fde_for_dso): Extract DT_PLTGOT. - (_Unwind_FindTableEntry): Rename from __ia64_find_fde; return - the segment and gp as well. - * config/ia64/frame-ia64.c: Remove file. - * config/ia64/frame-ia64.h: Remove file. - * config/ia64/unwind-ia64.c: New file. - * config/ia64/unwind-ia64.h: New file. - * config/ia64/ia64.h (ASM_OUTPUT_EH_CHAR): Remove. - (ASM_OUTPUT_EH_SHORT, ASM_OUTPUT_EH_INT): Remove. - (ASM_OUTPUT_EH_DOUBLE_INT): Remove. - (ASM_PREFERRED_EH_DATA_FORMAT): New. - (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New. - (IA64_UNWIND_INFO): Re-enable. - (HANDLER_SECTION): Remove. - (EH_RETURN_DATA_REGNO): New. - * config/ia64/ia64.md (exception_receiver): Remove. - * config/ia64/t-glibc (LIB2ADDEH): Re-enable. - * config/ia64/t-ia64 (LIB2ADDEH): Re-enable. - -2001-05-11 Richard Henderson - - * config/ia64/ia64.c (group_barrier_needed_p): Don't allow - calls and jumps to be bundled together. - (ia64_reorg): Emit a break after a noreturn call that ends - a function. - * config/ia64/ia64.md (break_f): New. - -2001-05-12 Neil Booth - - * c-lex.c (lex_charconst): Convert into a simple wrapper - around cpp_interpret_charconst, to which most of the code - body is moved. - * cppexp.c (MAX_CHAR_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE, - MAX_LONG_TYPE_SIZE, MAX_INT_TYPE_SIZE, MAX_CHAR_TYPE_MASK, - MAX_WCHAR_TYPE_MASK, parse_escape, parse_charconst): Remove. - (lex): Use cpp_interpret_charconst. - * cpplex.c (parse_escape, read_ucs, cpp_interpret_charconst, - hex_digit_value): New functions. - (MAX_CHAR_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): New macros. - * cpplib.h (cpp_interpret_charconst): New prototype. - * Makefile.in: Update. - -2001-05-12 Dean Wakerley - - * doc/install.texi: New file. Converted to texinfo from the HTML - documentation in wwwdocs/htdocs/install. - -Fri May 11 15:50:13 2001 Jeffrey A Law (law@cygnus.com) - - * gcse.c (insert_insn_end_bb): Do not search for assignments to - non-argumment registers that are mentioned in CALL_INSN_FUNCTION_USAGE. - - * toplev.c (compile_file): Move comment for opening output - file to just before the code that opens the output file. - -2001-05-11 Jakub Jelinek - - * regmove.c (regmove_optimize): Suppress the optimization for - unchanging destination register. Add comment above function. - -2001-05-11 Zack Weinberg - - * Makefile.in: Exterminate all references to assert.h. - * cross-make: Likewise. - * assert.h: Delete. - * configure.in: Correct commentary. - * configure: Regenerate. - - * libgcc-std.ver, libgcc2.c, libgcc2.h, sys-protos.h: - Remove __eprintf. - - * config/t-freebsd, config/t-linux, config/t-linux-aout, - config/t-netbsd, config/t-rtems, config/x-linux, - config/i386/t-beos, config/mcore/t-mcore, config/mcore/t-mcore-pe: - No need to override INSTALL_ASSERT_H. - - * fixinc/fixinc.dgux, fixinc/fixinc.interix, fixinc/fixinc.ptx, - fixinc/fixinc.svr4, fixinc/fixinc.winnt, fixinc/fixinc.wrap, - fixinc/fixincl.sh: Don't install assert.h into objdir/include. - -2001-05-11 Graham Stott - - * combine.c (simplify_comparison): Fix typo. - -2001-05-11 Mark Mitchell - - * loop.h (struct movables): Remove `num'. - * loop.c (scan_loop): Don't set it. Use count_insns_in_loop. - Adjust call to strength_reduce. - (num_unmoved_movables): New function. - (move_movables): Don't set movables->num. - (strength_reduce): Compute the number of instructions in the loop - here, rather than in the caller. - (check_dbra_loop): Always clear reversible_mem_store if there - are any memory sets. - (loop_regs_scan): Don't count instructions here. - (count_insn_in_loop): New function. - -2001-05-11 Mark Mitchell - - * optabs.c (emit_libcall_block): Don't mark calls as CONST_CALL_P. - -2001-05-11 Neil Booth - - * c-common.c (finish_label_expr): New function, lifted from - from cp/semantics.c. - * c-common.h (finish_label_expr, lookup_label): New prototypes. - * c-parse.in: Move 3 blocks of parser code into new functions. - * c-typeck.c (simple_asm_stmt, c_cast_expr): New functions. - * c-tree.h (simple_asm_stmt, c_cast_expr): New prototypes. - (lookup_label): Remove. - -2001-05-11 Alexandre Oliva - - * config/mn10300/t-mn10300 (dp-bit.c, fp-bit.c): Don't define - FLOAT_BIT_ORDER_MISMATCH. - -2001-05-10 David Edelsohn - - * expr.c (emit_push_insn): Convert PUSH_ROUNDING argument to - bytes. Reported by Kazu Hirata . - -2001-05-10 David Edelsohn - - * expr.c (emit_group_load): extract_bit_field requires a REG or - MEM as an argument. - -Thu May 10 14:45:44 2001 Jeffrey A Law (law@cygnus.com) - - * cse.c (cse_insn): Mostly remove first hunk of code which collapsed - a computed jump into an unconditional jump. - In second hunk of code for collapsing computed and conditional jumps - into unconditional jumps, reemit the jump in additional cases. - - * jump.c (jump_optimize_1): Do not wrap the new jump target - inside a LABEL_REF; gen_jump will do that automatically. - -2001-05-10 Toon Moene - - * dwarf2out.c (mem_loc_descriptor): Do not pass constant pool - contents for a SYMBOL_REF in case of floating point constants. - -2001-05-10 DJ Delorie - - * c-common.c (combine_strings): Widen strings in a - host-endian-independent way. - -2001-05-10 Joseph S. Myers - - * c-parse.in: Remove many shift/reduce conflicts. Update - %expect values. - (declspecs_nosc_nots_nosa_noea, declspecs_nosc_nots_nosa_ea, - declspecs_nosc_nots_sa_noea, declspecs_nosc_nots_sa_ea, - declspecs_nosc_ts_nosa_noea, declspecs_nosc_ts_nosa_ea, - declspecs_nosc_ts_sa_noea, declspecs_nosc_ts_sa_ea, - declspecs_sc_nots_nosa_noea, declspecs_sc_nots_nosa_ea, - declspecs_sc_nots_sa_noea, declspecs_sc_nots_sa_ea, - declspecs_sc_ts_nosa_noea, declspecs_sc_ts_nosa_ea, - declspecs_sc_ts_sa_noea, declspecs_sc_ts_sa_ea, declspecs_ts, - declspecs_nots, declspecs_ts_nosa, declspecs_nots_nosa, - declspecs_nosc_ts, declspecs_nosc_nots, declspecs_nosc, declspecs, - maybe_type_quals_setattrs, typespec_nonattr, typespec_attr, - typespec_reserved_nonattr, typespec_reserved_attr, - typespec_nonreserved_nonattr, maybe_setattrs, structsp_attr, - structsp_nonattr, components_notype, component_notype_declarator, - absdcl1_ea, absdcl1_noea, direct_absdcl1, absdcl_maybe_attribute, - firstparm, setspecs_fp): New - (typed_declspecs, reserved_declspecs, typed_typespecs, - reserved_typespecquals, declmods, typespec, typespecqual_reserved, - typed_declspecs_no_prefix_attr reserved_declspecs_no_prefix_attr - declmods_no_prefix_attr, nonempty_type_quals, structsp, - type_quals): Remove. Users updated. - (initdecls, notype_initdecls, after_type_declarator, - parm_declarator, notype_declarator, absdcl1, components, ivars): - Don't allow attributes at the start of a declarator; include them - in the production containing the declarator instead. Always - require type specifiers before trying to redeclare a typedef name. - (typename): Allow for attributes but warn that they are ignored. - (parmlist, firstparm, setspecs_fp): Include attributes in - parmlist; suck them off the parser stack in firstparm using - setspecs_fp. - -Thu May 10 09:17:42 2001 Jeffrey A Law (law@cygnus.com) - - * ifcvt.c (merge_if_block): Use any_uncondjump_p, not simplejump_p - to determine if a block has an unconditional jump at its end. - - * jump.c (jump_optimize_1): When converting a conditional jump - to an unconditional jump, build the jump using gen_jump instead - of just modify operands in-place. - -2001-05-09 Zack Weinberg - - * cppinit.c (cpp_post_options): Shut off macro expansion if - -fpreprocessed. - * cpplib.c (_cpp_handle_directive): If -fpreprocessed, accept - IN_I directives only if the # is in column 1 and the directive - name begins in column 2. - * cppmain.c (scan_buffer): Insert a space between # and an - identifier, when that identifier is a directive name. - - * tradcpp.c (struct file_buf): Add a pointer to the next entry - in the header search path. - (enum node_type): Add T_INCLUDE_NEXT. - (directive_table): Add entry for include_next. - (do_include_next): New function. - (process_include): New routine, broken out of do_include. - (finclude): Insert 'nhd' argument, to be copied into - next_header_dir of the new buffer. - (main): Adjust to match. - * gsyslimits.h, limity.h: Un-indent #include_next. - -2001-05-09 Joseph S. Myers - - * objc.texi: Move from ../libobjc/objc-features.texi. Adjust for - inclusion as a chapter of the GCC manual. - * gcc.texi: Include objc.texi. - * fdl.texi: Use @unnumberedsec for the addendum. - * Makefile.in ($(srcdir)/gcc.info, gcc.dvi): Update dependencies. - -Wed May 9 16:01:41 CEST 2001 Jan Hubicka - - * i386.md (DImode move splitters): Use !MMX and !SSE for the condition. - -Wed May 9 10:40:25 2001 Alexandre Oliva - - * regclass.c (scan_one_insn): Update REG_N_REFS when optimizing - handling of two-address insns. - -Wed May 9 10:36:18 2001 Alexandre Oliva - - * Makefile.in (NM_FOR_TARGET): Look for ./nm, then - ../binutils/nm-new instead of ../binutils/nm. - -Wed May 9 12:15:46 CEST 2001 Jan Hubicka - - * i386.md (movdi splitter): Fix the splitting condition - (float_extenddftf splitter): Fix mode. - -Wed May 9 12:05:39 CEST 2001 Jan Hubicka - - * genrecog.c (write_switch): Avoid outputting of switch for - types wider than int. - -2001-05-03 Andrew Haley - - * reload1.c (copy_eh_notes): New function. - (emit_input_reload_insns): Call it. - (emit_output_reload_insns): Call it. - -2001-05-07 Zack Weinberg - - * config.gcc (i[34567]86-*-sco3.2v4*, i[34567]86-*-sco*): - Delete stanzas. - * config/i386/sco.h, config/i386/sco4.h, config/i386/scodbx.h, - config/i386/sco4dbx.h, config/i386/x-sco4: Delete file. - - * optabs.c: Delete #ifdef BROKEN_LDEXP block. - -2001-05-07 John David Anglin - - * pa.md (interspace_jump): Revise comment. - (builtin_longjmp): Block initial setup insns from delay slot of - interspace branch. - (builtin_setjmp_receiver): New expander to save and restore PIC - register. - - * som.h (NM_FLAGS): Remove `-n' sort option. Revise comment. - -Mon May 7 09:30:14 2001 Jeffrey A Law (law@cygnus.com) - - * toplev.c (compile_file): Set up the output file before we call - the various initializers for the compiler. - - * except.c (sjlj_mark_call_sites): Do not search for assignments to - non-argumment registers that are mentioned in CALL_INSN_FUNCTION_USAGE. - - * pa.h (MAX_LONG_TYPE_SIZE): Should be 32, not 64. - * pa-64.h (*_TYPE_SIZE): Undefine before redefining. - -2001-05-06 Zack Weinberg - - * Makefile.in (tradcpp0): Correct typo in dependency list. - -2001-05-06 Geoff Keating - - * config/rs6000/rs6000.c (rs6000_emit_prologue): Don't save - the link register if we're not going to use it. - - * config/rs6000/rs6000.c (output_profile_hook): Fix a warning. - (output_function_profiler): Likewise. - -2001-05-07 Alan Modra - - * pa.c (compute_frame_size): 64-bit frame marker is 16 bytes. - -2001-05-06 Alexandre Oliva - - * unroll.c (loop_iterations): Don't sign-extend abs_diff; - zero-extend it. Make abs_inc unsigned. - - * optabs.c (expand_binop): Sign-extend xop0 and xop1 from the - widest mode in narrowing and widening operations. - - * config/mips/mips.md: Sign extend CONST_INTs. - -2001-05-06 Andreas Jaeger - - * invoke.texi (Option Summary): Add -momit-leaf-frame-pointer - (i386 Options): Document -momit-leaf-frame-pointer. - -2001-05-06 Neil Booth - - * c-typeck.c (internal_build_compound_expr): Check for - array to pointer conversion just once. - -2001-05-05 Richard Henderson - - * integrate.c (copy_insn_list): Substitute NOTE_EXPECTED_VALUE. - -2001-05-05 Richard Henderson - - * except.c (remove_fixup_regions): Adjust REG_EH_REGION notes - to the parent of the fixup region. - -2001-05-05 Jakub Jelinek - - * gcc.c (cpp_options): Define __NO_INLINE__ unless we are honoring - "inline" keyword. - * cpp.texi (__NO_INLINE): Document it. - -2001-05-05 Neil Booth - - * cppfiles.c (struct include_file): New member err_no. - (find_or_create_entry): Set it. - (open_file): Don't set fds to -2. Instead, use err_no to - remember previous errors, if any. - -2001-05-05 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Optimize moves - between X and Y by using sequences of xgdx and xgdy. - -2001-05-05 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*logicalsi3_silshr16"): Use '?' instead - of '!' for the 'D' alternative ('!' is too strong). - ("*logicalsi3_silshl16"): Likewise. - ("movstricthi"): Accept 'A' when 'd' constraint, remove spurious '+'. - ("movstrictsi"): Remove spurious '+'. - ("movstrictqi"): Don't accept 'A' and remove spurious '+'. - ("tstqi_1", "*lshrqi3_const1"): Put 'm' constraint before 'd'. - ("subqi3"): Disparage with '!' the 'x' and 'y' registers to avoid - a reload to them. - -2001-05-04 David Edelsohn - - * calls.c (store_one_arg): Don't divide align by BITS_PER_UNIT. - -2001-05-04 Lars Brinkhoff - - * simplify-rtx.c (simplify_binary_operation): Simplify ~a + 1 - into -a. - -2001-05-04 Franz Sirl - - * config/rs6000/rs6000.md (ashldi3 splits): Guard with - TARGET_POWERPC64. - -2001-05-04 Stephane Carrez - - * config/m68hc11/m68hc11.md (lshrhi3_const1): Fix shift of - soft register, use ror instead of rol. - -2001-05-04 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Take - into account pre/post increment decrement for 68HC12. - Fix other problems in replacement and fix call to reg_mentioned_p. - -2001-05-04 Stephane Carrez - - * config/m68hc11/larith.asm (L_regs_frame): New for _.frame. - Put the soft registers in bss for 68HC12. - (L_regs_d3_4): New for _.d3 and _.d4. - (L_regs_d5_6): Likewise. - (L_regs_d1_2): Likewise. - * config/m68hc11/t-m68hc11-gas (T_CPPFLAGS): Compile new parts. - -2001-05-04 Stephane Carrez - - * config/m68hc11/m68hc11.h (CPP_SPEC): Pass -D__HAVE_SHORT_DOUBLE__ - to the pre-processor when -fshort-double is specified. - * config/m68hc11/m68hc11.2 (CPP_SPEC): Likewise. - -2001-05-04 Stephane Carrez - - * config/m68hc11/larith.asm (divmodhi4): Empty for 68HC12. - (__mulsi3): Rewrite for 68HC12. - * config/m68hc11/m68hc11.md (divmodhi4): Use idivs for 68HC12. - Mark 'x' constraint with earlyclobber to prevent a - RELOAD_FOR_OTHER_ADDRESS to go in it. - (mulhi3_m68hc12): New pattern. - (mulhi3_m68hc11): Rename of mulhi3. - (mulhi3): New expand for 68HC12 optimisation. - (umulhisi3, mulhisi3): New patterns for 68HC12. - -2001-05-04 Stephane Carrez - - * config/m68hc11/m68hc11.md (*tbne, *tbeq): New patterns for 68HC12. - (extendqisi2, extendqihi2, extendhisi2): Use sex for 68HC12. - (uminqi3, umaxqi3, uminhi3, umaxhi3): New pattern for 68HC12. - -2001-05-04 Stephane Carrez - - * config/m68hc11/m68hc11.h (CONST_COSTS): Make the cost of - constants cheap after reload. - * config/m68hc11/m68hc11.c (m68hc11_shift_cost): Shift by 16 and 32 - are cheap. - (m68hc11_rtx_costs): Cost of multiplication by 65536 is expensive - so that gcc prefers a shift by 16. - (m6811_cost, m6812_cost): Make the shift cheap compared to an add. - -2001-05-04 Nick Clifton - - * config/arm/elf.h (ASM_OUTPUT_ALIGNED_COMMON): Define. - -2001-05-04 Kaveh R. Ghazi - - * alpha.h: NULL_PTR -> NULL. - * arm.c: Likewise. - * arm.h: Likewise. - * avr.h: Likewise. - * c4x.c: Likewise. - * c4x.h: Likewise. - * i386.c: Likewise. - * i386.md: Likewise. - * i860.c: Likewise. - * ia64.c: Likewise. - * m68hc11.h: Likewise. - * rs6000.h: Likewise. - * sh.c: Likewise. - * sh.h: Likewise. - * sparc.h: Likewise. - * v850.c: Likewise. - - * expr.c: Likewise. - * final.c: Likewise. - * gcc.c: Likewise. - * recog.c: Likewise. - -2001-05-04 Kaveh R. Ghazi - - * i386.c (ix86_emit_restore_regs_using_mov, ix86_save_reg): Change - `bool' parameter to `int'. - - * hash.c (hash_lookup): Likewise. - - * hash.h (hash_lookup): Likewise. - - * tlink.c (symbol_hash_lookup, demangled_hash_lookup): Likewise. - -Fri May 4 13:10:03 CEST 2001 Jan Hubicka - - * i386.c (x86_initialize_trampoline): Fix mode of constant. - -2001-05-03 Geoff Keating - - * invoke.texi (i386 Options): Delete references to -malign-jumps, - -malign-loops, -malign-functions. - * i386.c (ix86_align_funcs): Delete. - (ix86_align_loops): Delete. - (ix86_align_jumps): Delete. - (override_options): Mark -malign-* as obsolete. Emulate their - behavior with the -falign-* options. Default -falign-* from - the processor table. - * i386.h (FUNCTION_BOUNDARY): Define to 16; revert Richard Kenner's - patch of Wed May 2 13:09:36 2001. - (LOOP_ALIGN): Delete. - (LOOP_ALIGN_MAX_SKIP): Delete. - (LABEL_ALIGN_AFTER_BARRIER): Delete. - (LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Delete. - -2001-05-04 Andreas Jaeger - - * except.h: Add prototype declaration for - expand_builtin_init_dwarf_reg_sizes. - -2001-05-03 Geoffrey Keating - - * Makefile.in (site.exp): Set TESTING_IN_BUILD_TREE. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.md ("bitcmpqi"): New pattern for bitb - instruction. - ("bitcmpqi2"): New pattern for bit-extract and test. - ("bitcmphi"): New pattern for bitb/bita instructions. - -2001-05-03 Joseph S. Myers - - * gccbug.in: Use a temporary directory when the mktemp command is - not available. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.h (STATIC_CHAIN_REGNUM): Use soft z register - instead of _.d1. - (INITIALIZE_TRAMPOLINE): Call it. - (TRAMPOLINE_SIZE): Define according to 68HC11/68HC12. - (TRAMPOLINE_TEMPLATE): Remove. - * config/m68hc11/m68hc11.c (m68hc11_initialize_trampoline): New. - * config/m68hc11/m68hc11-protos.h (m68hc11_initialize_trampoline): - Declare. - -2001-05-03 David O'Brien - - * config/t-freebsd: Don't install "assert.h" in gcc. Compile crtbeginS.o - and crtendS.o with PIC. - -2001-05-03 Stephane Carrez - - * config/m68hc11/larith.asm (__mulqi3): Fix multiplication of two - negative numbers. - (___subdi3, ___adddi3): Use x instead of y as index register. - (__init_bss_section, __map_data_section): Optimize for 68HC12. - (__memset, __memcpy): Likewise. - (regs): Put the soft registers in bss for 68HC12. - (abort): Use trap to abort for 68hc12. - (__mulhi3, __mulhi32): Use emul for 68hc12. - (__mulsi3): Avoid to use the tmp soft register for 68hc12. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.h (LIMIT_RELOAD_CLASS): Don't define. - * config/m68hc11/m68hc11-protos.h (limit_reload_class): Remove. - * config/m68hc11/m68hc11.c (limit_reload_class): Remove. - (m68hc11_override_options): Remove setting of flag_no_nonansi_builtin. - Set 68HC12 min offset to -65536. - (print_operand): Put parenthesis arround the operand if it refers - to a symbol having the same name as a register. - (m68hc11_z_replacement): When z register is replaced by its - equivalent soft register, force the insn to be re-recognized. - (m68hc11_check_z_replacement): Fix the test when destination is - the index register and z dies in the insn. - (m68hc11_reorg): Remove the REG_DEAD notes beforce recomputing them. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_override_options): Initialize - costs according to processor variant. - (m68hc11_shift_cost): New function to compute shift costs. - (m68hc11_rtx_costs): Define costs according to processor variant. - (m6811_cost): Costs for 68HC11. - (m6812_cost): Costs for 68HC12. - (COSTS_N_INSNS): Remove. - - * config/m68hc11/m68hc11.h (RTX_COSTS): New. - (DEFAULT_RTX_COSTS): Remove. - (CONST_COSTS): Define costs according to OUTER_CODE. - (processor_costs): New struct to define costs. - (m68hc11_cost): Pointer to current costs. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.md (*addhi3_68hc12): Fix generation - and use m68hc11_notice_keep_cc when using leax/leay. - (addhi3 split): Reject split if the insn is handled by - leax/leay above. - * config/m68hc11/m68hc11.c (m68hc11_split_move): For 68HC12 the - push must be handled in a special way if the source operand uses - sp as index register. - (m68hc11_notice_keep_cc): New function. - (m68hc11_gen_movhi): Use it when an insn changes a register but - not the flags. - (m68hc11_gen_movqi): Fix move for 68HC12. - * config/m68hc11/m68hc11-protos.h (m68hc11_notice_keep_cc): Declare. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Use LCT_CONST - and don't pass operands[0] to emit_library_call_value. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.md (tsthi_1): Use cpd for 68HC12. - (zero_extendsi split): Simplify and use (zero_extendhi). - (*addhi3): Remove 'w' constraint since stack pointer is handled - by (addhi3_sp). - (*ashlhi3_2): Operand 2 is clobbered use '+' for its constraint. - (*ashlhi3, *ashrhi3, *lshrhi3): Likewise. - (*ashrhi3_const): Fix shift by 7. - (*lshrsi3_const16): Fix template. - (call, call_value): Fix constraint and predicate. - -2001-05-03 Stephane Carrez - - * config/m68hc11/m68hc11.md (X_REGNUM, D_REGNUM): New constant. - (Y_REGNUM, SP_REGNUM, PC_REGNUM, A_REGNUM, B_REGNUM): Likewise. - (CC_REGNUM): Likewise. - (*unnamed splits): Use above constants instead of hard coded numbers. - (*adcq, *subcq, *addsi_carry, *rotlqi3_with_carry): Likewise. - (*rotlhi3_with_carry, *rotrhi3_with_carry): Likewise. - (*return_16bit, *unnamed peepholes): Likewise. - -2001-05-03 David O'Brien - - * config.gcc(rs6000-ibm-aix|powerpc-ibm-aix): Do not include - rs6000/rs6000.h twice. - -2001-05-03 Mark Elbrecht - - * config/i386/djgpp.h (CPP_PREDEFINES): Define __GO32__. - (CPP_SPEC): Conditionally define MSDOS and GO32. - (SUBTARGET_SWITCHES): Ignore -mbnu210 and -mno-bnu210. - (SUBTARGET_OVERRIDE_OPTIONS): Warn that -mbnu210 and -mno-bnu210 are - ignored. - (SUPPORTS_WEAK, SUPPORTS_ONE_ONLY): Remove. - -2001-05-03 Alexandre Oliva - - * config/mn10300/mn10300.md: Sign-extend GEN_INT operands. - -2001-05-03 Mark Mitchell - - * integrate.h (struct inline_remap): Add leaf_reg_map table. - * integrate.c (expand_inline_function): Use xcalloc to allocate - memory. - (copy_rtx_and_substitute): Use the leaf_reg_map for leaf - registers. - -2001-05-03 Mark Mitchell - - * c-dump.c (dequeue_and_dump): Don't look at DECL_ASSEMBLER_NAME - if it is not set. - -2001-05-03 Alexandre Oliva - - * config/mn10300/mn10300.h (LINK_SPEC): Pass --relax to the - linker if -mrelax is given. - (TARGET_SWITCHES): Document -mrelax. - - Re-installed 2001-01-09's patch: - * hwint.h (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Use long long - if it's wider than long and the target's long is wider than the - host's. - -2001-05-02 David O'Brien - - * config.gcc, config/rs6000/aix51.h, config/rs6000/mach.h: Do not - directly include rs6000/rs6000.h. Instead do it in tm.h. - -2001-05-02 Stan Shebs - - * objc/objc-act.c (STRING_OBJECT_CLASS_NAME): Default to - NSConstantString for NeXT-style runtimes. - (STRING_OBJECT_GLOBAL_NAME): New macro. - (enum objc_tree_index): Add values OCTI_CNST_STR_GLOB_ID and - OCTI_STRING_CLASS_DECL. - (constant_string_global_id): New macro. - (string_class_decl): Ditto. - (setup_string_decl): New function. - (build_objc_string_object): Use it to build a NeXT runtime - compatible string initializer. - -2001-05-02 Jakub Jelinek - - * tradcpp.c (do_define): Make sure we don't walk past limit. - -2000-05-01 Franz Sirl - - * config/rs6000/rs6000.c (rs6000_legitimate_address): Allow any stack - offsets if not REG_OK_STRICT. - - * config/rs6000/rs6000.h (REG_OK_STRICT_FLAG): New macro. - (INT_REG_OK_FOR_INDEX_P): Likewise. - (INT_REG_OK_FOR_BASE_P): Likewise. - (REG_OK_FOR_INDEX_P): Use INT_REG_OK_FOR_INDEX_P. - (REG_OK_FOR_BASE_P): Use INT_REG_OK_FOR_BASE_P. - (LEGITIMATE_OFFSET_ADDRESS_P): Use INT_REG_OK_FOR_INDEX_P and - INT_REG_OK_FOR_BASE_P instead of REG_OK_FOR_INDEX_P and - REG_OK_FOR_BASE_P. Take an additional parameter. - (LEGITIMATE_INDEXED_ADDRESS_P): Likeewise. - (LEGITIMATE_INDIRECT_ADDRESS_P): Likewise. - (LEGITIMATE_LO_SUM_ADDRESS_P): Likewise. - (GO_IF_LEGITIMATE_ADDRESS): Move code into new function - rs6000_legitimate_address() and use it. - * config/rs6000/rs6000.c: Update all callers. - (rs6000_legitimate_address): New function. - -2001-05-02 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_emit_move): Merge - special_constant conditional blocks together. - -2001-05-02 Dale Johannesen - - * config/rs6000/rs6000.h (RS6000_ARG_SIZE): Remove unused NAMED - parameter. - (STRICT_ARGUMENT_NAMING): Define. - * config/rs6000/rs6000.c (function_arg_advance, function_arg, - function_arg_partial_nregs, setup_incoming_varargs): Remove - args logic which depends on "named" now that STRICT_ARGUMENT_NAMING - is defined. - -Wed May 2 13:09:36 2001 Richard Kenner - - * config/i386/i386.h (FUNCTION_BOUNDARY): Result is unsigned. - - * function.c (fixup_var_regs_1, case SUBREG): Use promoted mode - for replacement. - - * expr.c (store_field): Do nothing except elaborate side-effects if - zero-bit field. - -2001-05-02 Kaveh R. Ghazi - - * c-lex.c: NULL_PTR -> NULL. - * cse.c: Likewise. - * emit-rtl.c: Likewise. - * gcse.c: Likewise. - * genpeep.c: Likewise. - * jump.c: Likewise. - * mips-tdump.c: Likewise. - * reload1.c: Likewise. - * rtlanal.c: Likewise. - * stmt.c: Likewise. - * stor-layout.c: Likewise. - * toplev.c: Likewise. - -2001-05-01 Per Bothner - - * expr.c (expand_expr): When compiling LABELED_BLOCK_EXPR, - call do_pending_stack_adjust before emiting label. - -2001-05-01 Mark Mitchell - - * extend.texi: Fix typo. - -2001-05-01 Stan Shebs - - * objc/objc-act.c (build_module_descriptor): Clear DECL_CONTEXT - of UOBJC_MODULES_decl. - (generate_strings): Clear DECL_CONTEXT of new decl nodes. - (generate_descriptor_table): Ditto. - (generate_protocols): Ditto. - (generate_protocol_list): Ditto. - (generate_classref_translation_entry): Ditto. - -2001-05-01 Jeffrey Oldham - - * invoke.texi (Optimize Options): Add documentation for `--param - max-delay-slot-insn-search' and `--param - max-delay-slot-live-search' and reorder --param section. - * params.def: Modify initial comment. - * params.h (param_info): Add `help' member. - * toplev.c (lang_independent_params): Include `help' description. - (display_help): Print --param parameters. - -2001-05-01 Zack Weinberg - - * config.gcc: Don't default xmake_file to ${cpu_type}/x-${cpu_type}. - Remove references to deleted files. - (*-*-openbsd): No need to override xmake_file. - (*-*-sysv4): Treat like *-*-sysv. - - * configure.in: Probe for ldopen in various places, and set up - collect2 to be linked with them if found. - Don't dink with Windows registry stuff unless $host_os is a - Win32 os name. Check to see if we need -ladvapi32. - * configure: Regenerate. - - * Makefile: Get rid of CLIB and HOST_CLIB. - Substitute in COLLECT2_LIBS and link collect2 against its contents. - * build-make: Get rid of HOST_CLIB. - - * config/a29k/x-unix, config/alpha/x-osf, config/i386/x-aix, - config/i386/x-osfrose, config/m68k/x-dpx2, config/mips/x-iris3, - config/mips/x-mips, config/mips/x-osfrose, config/mips/x-sony, - config/mips/x-sysv, config/rs6000/x-aix31, config/rs6000/x-aix41, - config/rs6000/x-rs6000: Delete. - - * config/i386/x-cygwin, config/m68k/t-aux, config/mips/x-iris: - Don't set CLIB. - - 24 x-host fragments remain, 0 x-cpu, 3 top level. - -2001-05-01 Zack Weinberg - - * aclocal.m4 (gcc_AC_C_CHAR_BIT): Correct test program. - * configure: Regenerate. - -2001-05-01 Angela Marie Thomas - - * Makefile.in (install-headers): Remove redundant dependency. - -2001-05-01 Nathan Sidwell - - * c-tree.texi (USING_STMT): Document. - -2001-05-01 Kaveh R. Ghazi - - * bitmap.c: Change NULL_PTR to NULL or "(rtx*)0". - * c-common.c: Likewise. - * c-decl.c: Likewise. - * combine.c: Likewise. - * rs6000.c: Likewise. - * except.c: Likewise. - * explow.c: Likewise. - * expr.c: Likewise. - * fold-const.c: Likewise. - * function.c: Likewise. - * gcc.c: Likewise. - * gcse.c: Likewise. - * integrate.c: Likewise. - * loop.c: Likewise. - * objc/objc-act.c: Likewise. - * recog.c: Likewise. - * reg-stack.c: Likewise. - * reload.c: Likewise. - * reload1.c: Likewise. - * simplify-rtx.c: Likewise. - * stmt.c: Likewise. - * varasm.c: Likewise. - -2001-05-01 Gabriel Dos Reis - - * diagnostic.def: New file. - * diagnostic.h (diagnostic_t): New enum. - * Makefile.in (diagnostic.o): Depend on diagnostic.def - -2001-04-30 Zack Weinberg - - * tsystem.h: Test only POSIX for availability of string.h - and time.h. - * config.gcc (all systems): If USG appeared in xm_defines, - change it to POSIX. If both USG and POSIX appeared, just - delete USG. Remove unnecessary quotes around xm_defines - settings. - (m68k-crds-unos*): Don't #define unos - tested nowhere. - (m68k-apple-aux*): Don't #define AUX - tested nowhere. - (alpha*-*-linux*ecoff*, powerpc-*-linux*libc1, - powerpc-*-linux*): No need to set xm_defines - handled by - global settings for *-*-linux*. - -2001-04-30 Zack Weinberg - - * dbxout.c, mips-tfile.c, config/mips/mips.c, xcoffout.c: - Always include gstab.h, not system stab.h. Don't provide - default definitions of N_CATCH or N_OPT. Always use the - gstab.h variant of STAB_CODE_TYPE. - * final.c: Don't include stab.h/gstab.h at all, or provide - defaults for N_SLINE and N_SOL. - - * xcoffout.c: Can assume N_MAIN, N_DSLINE, N_BSLINE, N_BINCL, - N_EINCL, N_EXCL, N_M2C, N_SCOPE, N_CATCH, and N_OPT are - available. - * sdbout.c: Always include gsyms.h instead of system syms.h. - - * configure.in: No need to check for stab.h. - * configure, config.in: Regenerate. - * Makefile.in (final.o): Don't depend on gstab.h. - -2001-04-30 Mark Mitchell - Richard Henderson - - * extend.texi: Improve documentation of volatile asms. - -2001-04-30 Mark Mitchell - - * c-tree.texi: Fix thinko. - * gcc.texi: Likewise. - -2001-04-30 Richard Henderson - - * c-common.c (c_promoting_integer_type_p): New function, from the - corpse of old macro. Properly promote too-small enumerations and - booleans. Adjust all callers. - * c-common.h (C_PROMOTING_INTEGER_TYPE_P): Remove. - (c_promoting_integer_type_p): Declare. - * c-decl.c: Adjust C_PROMOTING_INTEGER_TYPE_P invocations. - * c-typeck.c: Likewise. - (default_conversion): Remove now redundant boolean check. - -2001-04-30 Jan Hubicka - Richard Henderson - - * regmove.c (try_apply_stack_adjustment): Remove now redundant - sanity checks. - (combine_stack_adjustments_for_block): Don't combine stack - allocation followed by deallocations. Handle grow-up stacks. - -2001-04-30 Mark Mitchell - - * fdl.texi: New file. - * c-tree.texi: Use the GFDL. - * gcc.texi: Likewise. - -2001-04-30 Stan Shebs - - * invoke.texi: Add a section documenting Objective-C options. - -2001-04-27 Andrew Haley - - * emit-rtl.c (try_split): Copy EH notes to sequence. - -2001-04-30 Mark Mitchell - - * regmove.c (record_stack_memrefs): Catch all references to the - stack pointer. - -2001-04-29 Toomas Rosin - - * Makefile.in (stmp-fixinc): quote shell assignment values - -2001-04-29 Kaveh R. Ghazi - - * c-aux-info.c: NULL_PTR->NULL in calls to `concat'. - - * gcc.c: Likewise. - - * prefix.c: Likewise. - -2001-04-28 Stan Shebs - - * objc/objc-act.c (handle_class_ref): Rewrite to flush target - specific code and use new macro ASM_DECLARE_UNRESOLVED_REFERENCE. - * config/darwin.h (ASM_DECLARE_UNRESOLVED_REFERENCE): Define. - * tm.texi (ASM_DECLARE_UNRESOLVED_REFERENCE): Document. - - * config/darwin.h (STANDARD_EXEC_PREFIX): Don't define. - (NEXT_OBJC_RUNTIME): Define. - -Sat Apr 28 21:02:58 CEST 2001 Jan Hubicka - - * rtl.h (simplify_gen_relational): Add cmp_mode parameter. - * simplify-rtx.c (simplify_gen_relational): Likewise. - - * simplify-rtx.c (simplify_replace_rtx): Handle relationals and MEMs. - - * i386.h (VALID_SSE_REG_MODE): Accept MMX modes if SSE2 - * i386.md (movsi_1, movdi2, movdi_1_rex64): Handle SSE2 moves. - - * i386.md (negsf2, negdf2, abssf2, absdf2): Force operands to - registers in SSE case; fix handling of the immediates. - (negsf2_ifs, abssf2_ifs): Tweak constraints; require - operands to be in regsiters before reload. - (negdf2_ifs, absdf2_ifs): Likewise; disable for 64bit - (negdf2_ifs_rex64, absdf2_ifs_rtx64): New. - (abstf,absxf,negtf,negxf splitters): Compute - properly the regnum for x86_64. - (avsdf2_if_rex64): New. - -Sat Apr 28 10:36:23 2001 Jeffrey A Law (law@cygnus.com) - - * flow.c (propagate_block_delete_insn): Handle deletion of ADDR_VEC - and ADDR_DIFF_VEC insns when the proceeding CODE_LABEL was put - into the constant pool. - * jump.c (jump_optimize_1): Remove barrier successors after all - the LABEL_NUSES counds have been computed. - (delete_barrier_successors): When deleting a tablejump insn, also - delete the jump table it uses. - * varasm.c (force_const_mem): Set LABEL_PRESERVE_P when forcing a - label into memory. - -2001-04-28 Martin Kalen - - * pa.c (FRP): Remove erroneous white space in macro definition. - -2001-04-28 Andreas Jaeger - - * invoke.texi: Use XX-bit instead of XXbit or XX bit where - appropriate. - * extend.texi: Likewise. - * tm.texi: Likewise. - -2001-04-28 Andreas Jaeger - - * md.texi: Use XX-bit instead of XXbit or XX bit where - appropriate. - -2001-04-28 Jens Schweikhardt - - * gcc.c (process_command): Allow -l lib in addition to -llib - for POSIX compliance. This fixes PR c/2347. - - * invoke.texi: Update section on Link Options accordingly. - -2001-04-27 Zack Weinberg - - * function.c (purge_addressof_1): Remove the duplicate - if (code == SET) block. Fold the two if (code == ADDRESSOF) - blocks together. - -2001-04-28 Jason Merrill - - * except.c (expand_eh_region_start): Don't start a new block. - (expand_eh_region_end): Don't end a block. - * stmt.c (expand_end_bindings): Don't end EH blocks. - (expand_decl_cleanup): Starting an EH region won't change the block. - (mark_block_as_eh_region, mark_block_as_not_eh_region): Lose. - (is_eh_region): Lose. - * tree.h: Adjust. - -2001-04-27 Jeffrey Oldham - - * except.c (expand_eh_region_end_cleanup): word_mode, not Pmode. - - * collect2.c (main): Add `-L' case to remove duplicate entries. - (is_in_args): New function to check for a duplicate argument. - * defaults.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): New macro. - * tm.texi (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): New documentation. - * config/mips/iris6.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): - Define to be nonzero. - -2001-04-27 Andreas Jaeger - Richard Henderson - - * md.texi (Machine Constraints): Document additional i386 - constraints and fix description of "A". - -Fri Apr 27 10:43:49 2001 Jeffrey A Law (law@cygnus.com) - - * tm.texi (TARGET_MEM_FUNCTIONS): Update text. - -2001-04-27 Jason Merrill - - * except.c (get_exception_filter): word_mode, not Pmode. - -2001-04-26 Geoffrey Keating - - * config/sparc/sparc.md (movsf_no_f_insn): Add more alternatives - common to other movsf patterns. Move up so that in future - people who change the other patterns will change it too. - (movsf_lo_sum): Allow even for soft-float; add appropriate - constraints. - (movsf_high): Likewise. - (movsf_high+1): Allow even for soft-float. - - * function.c (expand_function_end): Always clobber the - return registers, even if there is no return label. - -Thu Apr 26 20:28:21 CEST 2001 Jan Hubicka - - * (ix86_expand_fp_movcc): Re-enable SSE conditional move generation. - -Thu Apr 26 19:20:28 CEST 2001 Jan Hubicka - - * i386.md (abs/neg splitter): Fix calculation of sign bit for TFmodes - (pushqi2_rex64, pushhi2_rex64): Add. - -2001-04-26 Andrew Haley - - * except.c (expand_eh_region_end_cleanup): Force pending stack - adjust before emitting label that branches around cleanup code. - -2001-04-26 H.J. Lu (hjl@gnu.org) - - * config.gcc (mips*-*-linux*): Add elfos.h to tm_file. - - * config/mips/ecoff.h (STARTFILE_SPEC): Undefine before - define. - * config/mips/elf64.h (MAX_OFILE_ALIGNMENT): Likewise. - (ASM_OUTPUT_SECTION_NAME): Likewise. - (ASM_WEAKEN_LABEL): Likewise. - (UNIQUE_SECTION): Likewise. - (ASM_OUTPUT_CONSTRUCTOR): Likewise. - (ASM_OUTPUT_DESTRUCTOR): Likewise. - * config/mips/elf.h (MAX_OFILE_ALIGNMENT): Likewise. - (ASM_OUTPUT_SECTION_NAME): Likewise. - (ASM_WEAKEN_LABEL): Likewise. - (UNIQUE_SECTION): Likewise. - (ASM_OUTPUT_CONSTRUCTOR): Likewise. - (ASM_OUTPUT_DESTRUCTOR): Likewise. - * config/mips/linux.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/mips/mips.h (DBX_CONTIN_LENGTH): Likewise. - (ASM_FILE_START): Likewise. - (ASM_OUTPUT_SOURCE_LINE): Likewise. - (ASM_DECLARE_OBJECT_NAME): Likewise. - (ASM_FILE_END): Likewise. - (ASM_DECLARE_FUNCTION_NAME): Likewise. - (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - (ASM_GENERATE_INTERNAL_LABEL): Likewise. - (ASM_OUTPUT_CASE_LABEL): Likewise. - (ASM_OUTPUT_SKIP): Likewise. - (ASM_OUTPUT_ASCII): Likewise. - (ASM_OUTPUT_IDENT): Likewise. - (READONLY_DATA_SECTION): Likewise. - (EXTRA_SECTIONS): Likewise. - (EXTRA_SECTION_FUNCTIONS): Likewise. - (SELECT_RTX_SECTION): Likewise. - (SELECT_SECTION): Likewise. - - * config/mips/linux.h (INVOKE__main): Undefine. - (CTOR_LIST_BEGIN): Likewise. - (CTOR_LIST_END): Likewise. - (DTOR_LIST_BEGIN): Likewise. - (DTOR_LIST_END): Likewise. - (SET_ASM_OP): Defined it to ".dummy". - (ASM_OUTPUT_DEF): Defined. - (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Defined. - -2001-04-26 Nick Clifton - - * config/arm/arm.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Define, if the - assembler supports .p2align. - -2001-04-26 Nathan Sidwell - - * c-lex.c (c_lex): Remove # from %o diagnostic formatting. - -2001-04-26 Jakub Jelinek - - * integrate.c (expand_inline_function): Check for error_mark_node - in actual argument. - -2001-04-26 Jakub Jelinek - - * config/i386/i386.h (CC1_CPU_SPEC): Fix deprecation warnings for - -m386 and -m486. - -2001-04-26 Alexandre Oliva - - * configure.in (configargs.h): Define thread_model. - * configure: Rebuilt. - * gcc.c (main): Print it with -v. - -2001-04-25 Joseph S. Myers - - * invoke.texi: Document -Wmissing-braces, -dumpspecs, - -dumpmachine, -dumpversion, -fmem-report and -ftime-report. - * gcc.1: Regenerate. - -2001-04-25 Rainer Orth - - * dwarfout.c (is_pseudo_reg, type_main_variant, is_tagged_type, - is_redundant_typedef): Use static inline instead of inline static. - -Wed Apr 25 18:21:01 2001 Christopher Faylor - - * config/i386/cygwin.h: Move W32API search to LINK_SPEC to ensure that - this directory is always searched. - -2001-04-25 Richard Henderson - - * config/i386/i386.c (ix86_expand_epilogue): Properly compute size - of registers to restore along non eh_return path. - -2001-04-25 Jakub Jelinek - - * c-format.c (check_format_info_recurse): Handle - PLUS_EXPR for format string. - -2001-04-25 Jakub Jelinek - - * config/ia64/ia64.h (CC1_SPEC): Define. - * config/ia64/linux.h (CC1_SPEC): Define. - -Wed Apr 25 17:09:50 2001 J"orn Rennecke - - * emit-rtl.c (constant_subword): Also do sign extension in - BITS_PER_WORD == 16 case. - -2001-04-25 Jason Merrill - - * loop.c (try_swap_copy_prop): Go back to checking insn. - -2001-04-25 Jakub Jelinek - - * emit-rtl.c (subreg_hard_regno): Only do HARD_REGNO_MODE_OK check - if check_mode is nonzero. - -2001-04-25 Jakub Jelinek - - * config/i386/i386.c (ix86_expand_int_movcc): If overlap between - out and comparison sequence has been detected, put result into - proper temporary pseudo. - -2001-04-24 Zack Weinberg - - * Makefile.in (LIB2FUNCS): Remove _varargs and __dummy. - * libgcc-std.ver: Remove __builtin_saveregs, __dummy, and __empty. - * libgcc2.c: Remove __dummy and __builtin_saveregs. - * libgcc2.h: Don't prototype __builtin_saveregs or __dummy. - * config/i860/varargs.asm: New file - preserve i860 __builtin_saveregs - for future reference. - -2001-04-24 Jason Merrill - - * except.c (reachable_handlers): Step out one level from a RESX. - - * except.c (struct eh_region): Rename 'last' to 'resume'. - (mark_eh_region, duplicate_eh_region_1): Adjust. - (expand_eh_region_end_cleanup): Remember the jump, not the barrier. - (build_post_landing_pads): Likewise. - (expand_end_catch, expand_eh_region_end_allowed): Don't set it. - (expand_eh_region_end_must_not_throw): Likewise. - (connect_post_landing_pads): Thread (only) regions with non-deleted - resume insns. - - * except.c (expand_eh_region_end_cleanup): Save the EH return data - registers around the cleanup. - (get_exception_filter): New fn. - (finish_eh_generation): Use it. - -2001-04-24 Nathan Sidwell - - * c-semantics.c (add_scope_stmt): Don't call - current_scope_stmt_stack multiple times. - -2001-04-24 Zack Weinberg - Nathan Sidwell - - Lazy __FUNCTION__ generation. - * c-common.h (RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME, - RID_C99_FUNCTION_NAME): New _RIDs. - (CTI_FUNCTION_ID, CTI_PRETTY_FUNCTION_ID, CTI_FUNC_ID): Remove. - (CTI_FUNCTION_NAME_DECL, CTI_PRETTY_FUNCTION_NAME_DECL, - CTI_C99_FUNCTION_NAME_DECL, CTI_SAVED_FUNCTION_NAME_DECLS): New - global tree slots. - (function_id_node, pretty_function_id_node, func_id_node): Remove. - (c99_function_name_decl_node, function_name_decl_node, - pretty_function_name_decl_node, saved_function_name_decls): - Declare. - (struct language_function): Remove x_function_name_declared_p. - (make_fname_decl): Remove a parameter. - (declare_function_names): Remove prototype. - (start_fname_decls, finish_fname_decls): Prototype. - (fname_as_string): Likewise. - (fname_string, fname_decl): Likewise. - * c-common.c (make_fname_decl): Adjust. - (struct fname_var_t): New struct. - (fname_vars): New static array. - (declare_function_name): Remove. - (start_fname_decls, finish_fname_decls): New functions. - (fname_as_string): New function from remnants of - declare_function_name. - (fname_string, fname_decl): New functions. - - * c-decl.c (c_function_name_declared_p): Remove. - (init_decl_processing): Don't generate __FUNCTION__ et al ids, - don't call declare_function_name. Call start_fname_decls. - (c_make_fname_decl): Adjust parameters. Generate the name. Don't - clobber the line number. Call finish_decl. - (start_function): Call start_fname_decls. - (finish_function): Call finish_fname_decls. - Remove c_function_name_declared_p. - (push_c_function_context): Don't push c_function_name_declared_p. - (pop_c_function_context): Don't pop c_function_name_declared_p. - (c_begin_compound_stmt): Don't check c_function_name_declared_p. - * c-parse.in (STRING_FUNC_NAME, VAR_FUNC_NAME): New tokens. - (program): Call finish_fname_decls for C. - (primary): Add VAR_FUNC_NAME. - (reswords): Add slots for __FUNCTION__ et al. - (rid_to_yy): Add mappings for __FUNCTION__ et al. - (yylexname): If it's a STRING_FUNC_NAME generate the function name - now. Don't look for VAR_DECLs containing __FUNCTION__ et al. - * c-semantics.c (prune_unused_decls): Remove. - (finish_stmt_tree): Don't call prune_unused_decls. - (genrtl_decl_stmt): Don't prune unused decls here. - -2001-04-24 Nick Clifton - - * dwarf2out.c (mem_loc_descriptor): If a SYMBOL_REF is in the - constant pool, use the pool's SYMBOL_REF instead. - - * config/v850/v850.h (STRICT_ALIGNMENT): Always set, even for the - v850e. - -2001-04-23 Joseph S. Myers - - * c-convert.c (convert): When converting to a BOOLEAN_TYPE, avoid - passing nested NOP_EXPRs to fold. - -Mon Apr 23 14:32:12 CEST 2001 Jan Hubicka - - * reg-stack.c (emit_swap_insn): Do not get pass CALL_INSNs. - -2001-04-22 Mark Mitchell - - * loop.c (loop_delete_insns): Add prototype. - -2001-04-23 Phil Edwards - - * configure.in: Remove ENABLE_STD_NAMESPACE. - * config.in: Regenerated. - * configure: Regenerated. - -2001-04-22 Stan Shebs - - * config.gcc (powerpc-*-darwin*): Move the flag in xm-darwin.h - into xm_defines. - * config/rs6000/xm-darwin.h: Remove file. - -2001-04-22 Kaveh R. Ghazi - - * collect2.c (main): Use concat in lieu of xmalloc/sprintf. - (write_c_file_stat): Likewise. - - * dbxout.c (dbxout_init): Likewise. - - * profile.c (output_func_start_profiler): Likewise. - -2001-04-22 Philipp Thomas - - * ABOUT-GCC-NLS: Now that gettext 0.10.37 is out, - require it instead of the CVS version. - * cpperror.c (v_message): Put a blank before the macro - body to not confuse exgettext. - -2001-04-21 Mark Mitchell - - * flow.c (proagate_one_insn): Remove useless assignment. - * jump.c (delete_insn): Tidy. - * loop.c (try_copy_prop): When deleting an instruction with a - REG_RETVAL note, delete the entire libcall sequence. - (loop_delete_insns): New function. - * unroll.c (initial_reg_note_copy): Copy INSN_LIST notes, even if - we're not substituting into them yet. - -2001-04-21 Kazu Hirata - - * config/h8300/h8300.c (general_operand_src): Fix a comment typo. - - * config/sparc/sparc.c (sparc_flat_eligible_for_epilogue_delay): - Fix a comment typo. - * config/i960/i960.c (signed_arith_operand): Likewise. - - * calls.c (expand_call): Fix a comment typo. - -2001-04-20 Zack Weinberg - - * configure.in: Probe for times, clock, struct tms, and clock_t. - * configure, config.in: Regenerate. - * timevar.c: Replace ifdef forest in get_time with (relatively) - straightforward series of checks based on autoconf's probes. - -Fri Apr 20 12:24:50 2001 Jeffrey A Law (law@cygnus.com) - - * config/pa/som.h (NM_FLAGS): Define. - -2001-04-20 Bernd Schmidt - - * ia64.h (MD_SCHED_REORDER, MD_SCHED_REORDER2): Pass CLOCK to called - function. - * ia64-protos.h (ia64_sched_reorder): Additional arg for clock. - * ia64.c (nop_cycles_until): New function. - (prev_cycle, prev_first, last_issued): New static variables. - (ia64_sched_reorder): Additional arg for clock. - On final scheduling pass, emit extra NOPs as needed. - Set prev_first and prev_cycle. - (ia64_sched_reorder2): Pass clock arg down to ia64_sched_reorder. - (ia64_variable_issue): Set last_issued. - -2001-04-20 Alexandre Oliva - - * config/i386/i386.c (ix86_expand_int_movcc, - ix86_expand_strlensi_unroll_1): Sign-extend CONST_INTs. - -2001-04-20 Geoff Keating - - * config/rs6000/rs6000.md (ctrsi_internal1, ctrsi_internal2, - ctrsi_internal3, ctrsi_internal4, ctrsi_internal5, - ctrsi_internal6, ctrdi_internal1, ctrdi_internal2, - ctrdi_internal3, ctrdi_internal4, ctrdi_internal5, - ctrdi_internal6): In the short-branch case, this insn is only 4 - bytes long. Reported by Reza Yazdani . - -2001-04-20 Jakub Jelinek - - * reg-stack.c (check_asm_stack_operands): Issue error if "=t" resp. - "=u" is used together with "st" resp. "st(1)" clobber. - -2001-04-20 Jakub Jelinek - - * gcse.c (gcse_main): Fix comment typo. - (delete_null_pointer_check): Likewise. - (hash_scan_set): Don't consider sets with REG_EQUIV MEM notes. - * cse.c (cse_insn): Likewise. - * function.c (fixup_var_refs_insns_with_hash): The sequence is - toplevel. - -2001-04-19 Zack Weinberg - - * toplev.c: Excise all code for the undocumented -dm option. - (float_signal): Call signal just once, unconditionally. - -2001-04-19 Geoff Keating - - * fold-const.c (fold): Use first_rtl_op rather than - TREE_CODE_LENGTH when looping over parameters of a tree. - Correct strange grouping in test for evaluated SAVE_EXPR. - -Thu Apr 19 19:15:26 2001 Jeffrey A Law (law@cygnus.com) - - * config/pa/pa-linux.h (CPLUSPLUS_CPP_SPEC): Undefine. - * config/pa/pa.h (CPLUSPLuS_CPP_SPEC): Define. - - * config/pa/som.h (ASM_OUTPUT_FUNCTION_PREFIX): Truncate subspace - name at 32 total characters. - (ASM_OUTPUT_SECTION_NAME): Similarly. Also, only support placing - functions in named sections -- data items can still go into unique - sections, but they have normal names (ie $LIT$ and $DATA$). - - * config/pa/som.h (SUPPORTS_INIT_PRIORITY): SOM does not support - INIT_PRIORITY. - -2001-04-19 DJ Delorie - - * config/alpha/vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX - to TARGET_OBJECT_SUFFIX and TARGET_EXECUTABLE_SUFFIX. - * config/i386/cygwin.h: Likewise. - * config/i386/mingw32.h: Likewise. - * config/vax/vms.h: Likewise. - * config/i386/djgpp.h: Remove NO_AUTO_EXE_SUFFIX. - - * config/alpha/xm-vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX - to HOST_OBJECT_SUFFIX and HOST_EXECUTABLE_SUFFIX. - * config/i386/xm-cygwin.h: Likewise. - * config/i386/xm-djgpp.h: Likewise. - * config/i386/xm-mingw32.h: Likewise. - * config/vax/xm-vms.h: Likewise. - - * mkdeps.c (deps_add_default_target): Use TARGET_OBJECT_SUFFIX - instead of OBJECT_SUFFIX. - * collect2.c (find_a_file): Look for files matching the extension - HOST_EXECUTABLE_SUFFIX instead of EXECUTABLE_SUFFIX. - * gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Depend on - TARGET_EXECUTABLE_SUFFIX. - (find_a_file): Use HOST_EXECUTABLE_SUFFIX. - (make_relative_prefix): Likewise. - (convert_filename): Use TARGET_ suffixes throughout. Remove - NO_AUTO_EXE_SUFFIX. - (process_command): Likewise. - (do_spec_1): Likewise. - * java/lang.c (init_parse): Likewise. - - * gcc.texi : Document four new options matching the pattern - (HOST|TARGET)_(OBJECT|EXECUTABLE)_SUFFIX. Remove documentation - for deleted macros OBJECT_SUFFIX and EXECUTABLE_SUFFIX. Remove - documentation for NO_AUTO_EXE_SUFFIX. - -2001-04-19 Mark Mitchell - - * toplev.h (struct lang_hooks): Allow decode_option to indicate - that language-independent processing should not be done. - * toplev.c (main): Adjust accordingly. - - * rtl.texi (jump_insn): Expand on JUMP_LABEL documentation. - * loop.c (load_mems): Handle a NULL JUMP_LABEL for a JUMP_INSN. - - * mips.md (reload_outputdi): Require that operand0 be a - general_operand. - -2001-04-19 Jakub Jelinek - - * invoke.texi (-Wshadow): Clarify. - -2001-04-18 Mark Mitchell - - * loop.c (load_mems): Examine all the instructions in the loop - before concluding that all jumps branch to the first instruction - after the loop. - -Wed Apr 18 20:32:03 2001 Christopher Faylor - - * config/i386/xm-cygwin.h (CPP_SPEC): Fix typo. - -2001-04-18 Jakub Jelinek - - * cpp.texi (-Wwhite-space): Remove. - (-Wall): -Wall does not imply -Wwhite-space. - -2001-04-17 Zack Weinberg - - * dbxout.c (dbxout_init): If DBX_OUTPUT_GCC_MARKER is defined, - use it instead of blindly generating a .stabs. - * xcoffout.h: Define DBX_OUTPUT_GCC_MARKER so we put the type - in the right place. - * xcoffout.c: Don't bother defining default for N_CATCH. - (UNKNOWN_STAB): Use internal_error. - (stab_to_sclass): Remove now-unnecessary aborts. - Remove #if 0'ed case N_BROWS. Add #ifdef N_OPT block. - -Tue Apr 17 21:41:11 2001 Jeffrey A Law (law@cygnus.com) - - * jump.c (mark_all_labels): Canonicalize the tail recursion - label attached to CALL_PLACEHOLDER insns. - -2001-04-17 Kaveh R. Ghazi - - * output.h (dump_flow_info, free_basic_block_vars, - which_alternative): Delete redundant prototypes. - - * rtl.h (bss_section): Likewise. - -2001-04-17 Loren J. Rittle - - * dbxout.c (N_OPT): Define if not available from - -2001-04-17 John David Anglin - - * vax.h (PROMOTE_PROTOTYPES): Define for compatibility with system - libraries and native K&R compilers. - -2001-04-16 Kaveh R. Ghazi - - * c-typeck.c (convert_arguments): Don't check for width changes - with -Wtraditional. - - * invoke.texi (-Wtraditional): Update documentation. - -2001-04-16 Zack Weinberg - - * toplev.c (output_lang_identify): Delete. - (compile_file): Don't call ASM_IDENTIFY_GCC or ASM_IDENTIFY_LANGUAGE. - Don't generate gcc2_compiled. label. Don't emit a nop if profiling. - If IDENT_ASM_OP is defined, emit an .ident "GCC (GNU) " - after calling ASM_FILE_END. - - * dbxout.c (dbxout_init): Don't call ASM_IDENTIFY_GCC_AFTER_SOURCE. - Instead, unconditionally emit an N_OPT stab with string equal - to STABS_GCC_MARKER, which defaults to "gcc2_compiled." - - * defaults.h: Don't provide default for ASM_IDENTIFY_LANGUAGE. - - * config/dbxelf.h, config/freebsd.h, config/nextstep.h, - config/psos.h, config/ptx4.h, config/1750a/1750a.h, - config/alpha/alpha.h, config/alpha/elf.h, config/arc/arc.h, - config/arm/aof.h, config/arm/coff.h, config/arm/elf.h, - config/arm/linux-elf.h, config/avr/avr.h, config/d30v/d30v.h, - config/dsp16xx/dsp16xx.h, config/h8300/h8300.h, - config/i370/i370.h, config/i386/beos-elf.h, - config/i386/osf1elf.h, config/i386/osfrose.h, - config/ia64/sysv4.h, config/m68k/3b1.h, config/m68k/auxgas.h, - config/m68k/crds.h, config/m68k/hp320.h, config/m68k/m68kv4.h, - config/m68k/mot3300.h, config/m68k/news.h, config/m68k/sgs.h, - config/m68k/tower-as.h, config/mcore/mcore-elf.h, - config/mips/iris6.h, config/mips/osfrose.h, - config/mips/sni-svr4.h, config/pa/som.h, config/pdp11/pdp11.h, - config/sparc/sp64-elf.h: - Delete definitions of any or all of: ASM_IDENTIFY_GCC, - ASM_IDENTIFY_GCC_AFTER_SOURCE, and ASM_IDENTIFY_LANGUAGE. - - * config/elfos.h, config/freebsd.h, config/linux.h, - config/alpha/elf.h, config/arm/linux-elf.h, config/i386/i386elf.h, - config/i386/ptx4-i.h, config/mips/gnu.h, config/mips/linux.h, - config/sparc/linux.h, config/sparc/linux64.h: Delete definitions - of ASM_FILE_START which merely emit a .version directive. Delete - definitions of ASM_FILE_END which merely emit an .ident directive. - - * config/avr/avr.h, config/vax/vax.h: Delete definition of - ASM_IDENTIFY_GCC and move part of its logic into - ASM_FILE_START. - - * config/i386/att.h, config/i386/gas.h, config/i386/linux.h, - config/sparc/linux-aout.h: Don't emit .version directive in - ASM_FILE_START. - - * config/i386/dgux.c, config/m88k/m88k.c, config/sh/sh.c - (output_file_start): Correct comment. - - * config/i386/osfrose.h: Don't emit trailing .ident directive. - * config/m68k/mot3300.h: Override STABS_GCC_MARKER to "gcc2_compiled%" - to match gdb. - * config/pa/lib2funcs.asm: Delete gcc_compiled. label. - * config/rs6000/aix.h: Correct comment. - - * config/i386/i386afe.h: Delete. - * config.gcc: Remove references to i386afe.h. - - * tm.texi: Delete documentation of ASM_IDENTIFY_GCC. The - other macros deleted by this patch were undocumented. - -Mon Apr 16 08:03:48 2001 Jeffrey A Law (law@cygnus.com) - - * pa.md (reload_outdi): Operand 0 must be a non hard register. - - * pa.c (secondary_reload_class): SAR<->FP copies require a - secondary register. - - * install.texi (mips-mips-bsd): Update list of functions - required to include memmove. - * tm.texi (TARGET_MEM_FUNCTIONS): Update list of implicitly - used functions to include memmove. - -2001-04-15 Toon Moene - - * i386.md (sqrtdf2): SFmode should be DFmode. - -2001-04-15 Alexandre Oliva - - * gcse.c (compute_ld_motion_mems): ASM outputs aren't moveable. - (find_moveable_store): Likewise. - -2001-04-15 Jim Wilson - - * function.c (expand_function_end): Handle PARALLEL real_decl_rtl. - -Sat Apr 14 16:24:19 CEST 2001 Jan Hubicka - - * i386.md (ashldi3_1_rex64): Add 'J' to the constraints - (ashrdi3_1_rex64): Change 'n' constraint to 'J'. - -2001-04-14 Alexandre Oliva - - * config/mn10300/mn10300.md (cmpsi): Tell reload to disregard the - first alternative. - -2001-04-14 Alan Modra - - * pa.c (force_mode): New function. - (emit_move_sequence): Use it instead of generating new rtx_REGs. - -2001-04-13 Jim Wilson - - * config/ia64/ia64.c (ia64_expand_epilogue): Emit alloc if sibcall_p. - (first_instruction): New static variable. - (rtx_needs_barrier): Return 1 for alloc. - (init_insn_group_barriers): Set first_instruction. - (rws_sum): Delete duplicate definition. - (group_barrier_needed_p): Return 0 when first_instruction true. - (safe_group_barrier_needed_p): Save and restore first_instruction - around group_barrier_needed_p call. - -Fri Apr 13 21:40:28 2001 Loren J. Rittle - - * expr.h (enum libfunc_index): Add LTI_memmove. - (memmove_libfunc): Define macro. - * optabs.c (init_optabs): Initialize memmove_libfunc. - * expr.c (expand_assignment): Use memmove_libfunc instead of - memcpy_libfunc. - -2001-04-13 Alan Modra - - * pa.h (GO_IF_LEGITIMATE_ADDRESS): Disallow PIC LO_SUM - fp mode addresses. - -2001-04-13 Kaveh R. Ghazi - - * Makefile.in (reg-stack.o): Depend on reload.h. - (insn-attrtab.o): Depend on flags.h. - - * genattrtab (main): Include flags.h in insn-attrtab.c. - - * reg-stack.c: Include reload.h. - - * sparc.h (flag_pic): Delete redundant declaration. - - * output.h (flag_pic): Likewise. - - * tree.h (pedantic): Likewise. - -2001-04-13 Kaveh R. Ghazi - - * Makefile.in (toplev.o, jump.o, regmove.o): Depend on reload.h - - * jump.c, regmove.c, toplev.c: Include reload.h. - - * reload.h (reload_cse_regs): Declare. - - * rtl.h (find_equiv_reg, operands_match_p, safe_from_earlyclobber, - reload_cse_regs, init_reload, mark_home_live, reload, - init_caller_save): Delete redundant prototypes. - -2001-04-13 Kaveh R. Ghazi - - * Makefile.in (ssa.o, regclass.o): Depend on $(EXPR_H). - - * regclass.c, ssa.c: Include expr.h. - - * rtl.h (memory_address, force_reg, emit_queue, emit_move_insn, - gen_move_insn): Delete redundant declarations. - -2001-04-13 Franz Sirl - - * Makefile.in (CFLAGS, BOOT_CFLAGS): Partly revert 2000-10-27 patch. - (stage1_build): Instead pass down STAGE1_CFLAGS here. Pass down - MAKEINFO and MAKEINFOFLAGS too. - (stage4_build): Correctly order -B flags. - -2001-04-13 Alan Modra - - * pa.c (hppa_init_pic_save): Set rtx_unchanging for - PIC_OFFSET_TABLE_SAVE_RTX. - (zdepi_cint_p): Describe zdepi insn. - Formatting and white space fixes throughout file. - - * pa.c (uint32_operand): Don't use long constant >= 2^32. - (emit_move_sequence): Use HOST_WIDE_INT constants. Don't worry - about 32->64 bit sign extension if 32 bit HOST_WIDE_INTs. - (compute_movstrsi_length): Make `align' unsigned to avoid warning. - (output_64bit_and): Use plain `int's for shift counts. - (output_64bit_ior): Likewise. - (function_arg_partial_nregs): Use unsigned vars to avoid warnings. - * pa.h (CONST_OK_FOR_LETTER_P): Use HOST_WIDE_INT constants for case - `N', and simplify. - - * pa-hpux10.h (NEW_HP_ASSEMBLER): Define to 1. - * pa-hpux11.h (NEW_HP_ASSEMBLER): Likewise. - * pa.h (LEGITIMATE_CONSTANT_P) Collapse two defines depending on - NEW_HP_ASSEMBLER into one. Kill warnings. - - * pa-gas.h: Delete file. - * config.gcc: Match `parisc' as well as `hppa' for cpu_type=pa. - Add new targets hppa*64*-*-linux* and parisc*64*-*-linux*. Update - hppa*-*-linux*. For all pa targets, remove pa/gas.h from tm_file, - instead setting MASK_GAS | MASK_JUMP_IN_DELAY in target_cpu_default2. - - * config/pa/mill32.S: New file. - * config/pa/mill64.S: New file. - * config/pa/t-linux (LIBGCC1, CROSS_LIBGCC1, LIB1ASMFUNCS, - LIB1ASMSRC, CRTSTUFF_T_CFLAGS_S, TARGET_LIBGCC2_CFLAGS): Define. - * config/pa/t-linux64: New file. - * config/pa/t-pa64 (CROSS_LIBGCC1): Change to libgcc1-asm.a - (LIB1ASMFUNCS, LIB1ASMSRC): Define. - (TARGET_LIBGCC2_CFLAGS): Add -Dpa64=1 -DELF=1. - - * elfos.h (SELECT_SECTION): Undef before defining. - * pa-linux.h (LINUX_DEFAULT_ELF, PTRDIFF_TYPE, CPP_SPEC): Remove. - (LIB_SPEC): Remove -lmilli. - (DBX_REGISTER_NUMBER): Remove. - (PREFERRED_DEBUGGING_TYPE, DWARF2_ASM_LINE_DEBUG_INFO, - (DWARF2_UNWIND_INFO, ASM_SPEC, LINK_SPEC, FUNCTION_OK_FOR_SIBCALL, - NO_PROFILE_COUNTERS, SELECT_RTX_SECTION, INCOMING_RETURN_ADDR_RTX, - DWARF_FRAME_RETURN_COLUMN, STRING_ASM_OP, TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP, ASM_FILE_START, - ASM_OUTPUT_DEF, ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT, - ASM_OUTPUT_LABEL, ASM_GLOBALIZE_LABEL, ASM_DECLARE_FUNCTION_NAME, - TARGET_GAS): Define. - * pa.c (output_arg_descriptor): Disable for TARGET_ELF32. - (function_arg): If TARGET_ELF32, pass fp args in both general and fp - regs if we don't have a prototype. - * pa.md (canonicalize_funcptr_for_compare): Not for TARGET_ELF32. - * pa.h (TARGET_ELF32): Default to 0 if undefined. - (EH_RETURN_DATA_REGNO, EH_RETURN_STACKADJ_RTX, - EH_RETURN_HANDLER_RTX): Define. - * pa32-regs.h (DBX_REGISTER_NUMBER): Remove unnecessary test. - (DWARF_FRAME_REGNUM): Define. - * pa64-regs.h (DWARF_FRAME_REGNUM): Define. - * pa32-linux.h: New file. - * pa64-linux.h: New file. - - * pa-64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Define. - (ASM_OUTPUT_DOUBLE_INT): Format, protect macro with do..while. - (LINK_SPEC, LIB_SPEC, MD_EXEC_PREFIX, MD_STARTFILE_PREFIX, - NEW_HP_ASSEMBLER, ASM_FILE_START, OBJECT_FORMAT_ELF, - DWARF2_DEBUGGING_INFO, PREFERRED_DEBUGGING_FORMAT, - DWARF2_ASM_LINE_DEBUG_INFO, USE_CONST_SECTION, CONST_SECTION_ASM_OP, - CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP, INIT_SECTION_ASM_OP, - FINI_SECTION_ASM_OP, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, - READONLY_DATA_SECTION, CONST_SECTION_FUNCTION, CTORS_SECTION_FUNCTION, - DTORS_SECTION_FUNCTION, ASM_OUTPUT_SECTION_NAME, MAKE_DECL_ONE_ONLY, - UNIQUE_SECTION_P, UNIQUE_SECTION, INT_ASM_OP, ASM_OUTPUT_CONSTRUCTOR, - ASM_OUTPUT_DESTRUCTOR, TYPE_ASM_OP, SIZE_ASM_OP, ASM_WEAKEN_LABEL, - TYPE_OPERAND_FMT, ASM_DECLARE_RESULT): Move to.. - * pa64-hpux.h: New file. - (ASM_FILE_START): Correct typo. - (PREFERRED_DEBUGGING_FORMAT): Rename to PREFERRED_DEBUGGING_TYPE. - * config.gcc: Modify for above. - -Fri Apr 13 00:09:22 EDT 2001 John Wehle (john@feith.com) - - * jump.c (jump_optimize_1): Don't delete dead stores here. - * toplev.c (rest_of_compilation): Call delete_trivially_dead_insns - prior to running jump optimize before cse2. - -2001-04-12 Richard Henderson - - * Makefile.in (regmove.o): Depend on except.h. - * regmove.c: Include it. - -2001-04-12 Stan Shebs - - * objc/objc-act.c: Remove all code ifdefed with the never-used - macro OBJC_INT_SELECTORS. - * config/d30v/d30v.h: Remove commented-out ref to OBJC_INT_SELECTORS. - * tm.texi: Remove doc for OBJC_INT_SELECTORS. - -Thu Apr 12 18:13:37 2001 Rodney Brown - - * config/pa/quadlib.c: Add prototypes. - -2001-04-12 Kaveh R. Ghazi - - * bitmap.h (debug_bitmap): Delete redundant prototype. - - * rtl.h (get_frame_size): Likewise. - -2001-04-12 Jim Wilson - - * config/ia64/ia64.md (extendsfdf2, extendsftf2, extenddftf2): Simplify - to just emit an fnorm. - -2001-04-12 Kaveh R. Ghazi - - * c-common.h (truthvalue_conversion, type_for_mode, - type_for_size): Delete redundant declarations. - - * c-lex.h (is_class_name): Likewise. - - * c-tree.h (pedantic, convert, getdecls, gettags, - global_bindings_p, init_decl_processing, insert_block, - maybe_build_cleanup, poplevel, print_lang_decl, - print_lang_identifier, print_lang_type, pushdecl, pushlevel, - set_block, incomplete_type_error, build_function_call, - lvalue_or_else, mark_addressable): Likewise. - - * expr.h (expand_tree_builtin): Likewise. - -2001-04-12 Mark Mitchell - - * invoke.texi: Document --param max-gcse-memory. - -2001-04-12 Kaveh R. Ghazi - - * configure.in (errno): Check for declaration. - * configure, config.in: Regenerated. - - * system.h (errno): Only declare if not already done. - -2001-04-12 Alexandre Oliva - - * recog.c (general_operand, immediate_operand, - nonmemory_operand): Require CONST_INTs to be sign-extended - values for their modes. - -2001-04-12 Alexandre Oliva - - * expmed.c (store_bit_field): Truncate CONST_INTs. - (expand_mult_highpart, expand_divmod): Likewise. - * expr.c (convert_modes, store_field): Likewise. - * integrate.c (expand_inline_function): Use promote_mode() to - determine whether to convert_modes() an argument as signed - or unsigned. - * optabs.c (expand_binop): Get CONST_INT operands - sign-extended for their appropriate modes. - * stmt.c (emit_case_nodes): Convert node values to the - appropriate mode. - (expand_end_case): Convert minval and range to the appropriate - mode. - * unroll.c (loop_iterations): Truncate abs_diff to the mode of - the iteration variable. - * varasm.c (immed_double_const): Don't require words to be - narrower than host wide ints to properly sign-extend - CONST_INTs. - -2001-04-12 kaz Kojima - - * sh.md (builtin_setjmp_receiver): New expander. - -2001-04-12 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_emit_move): Do not - special-case HOST_BITS_PER_WIDE_INT != 32. Use same criteria - for generating CONST_INT and CONST_DOUBLE. - -2001-04-12 Alexandre Oliva - - * config/rs6000/rs6000.c (logical_operand): CONST_INTs are - already sign-extended. - (rs6000_emit_prologue): Make register iterator signed. - (rs6000_emit_epilogue): Likewise. - * config/rs6000/rs6000.md (addsi3, adddi3): Sign-extend high - and low. - (movsf split, movdf split): Sign-extend CONST_INTs. - (movdi splits): Likewise. - -2001-04-12 Kelley Cook - - * config-lang.in (lang_dirs): Add in zlib. - -2001-04-11 Alexandre Oliva - - * config/i386/i386.md: Apply trunc_int_for_mode() to GEN_INT - operands that make it to RTL. - -2001-04-11 Stan Shebs - - Add Darwin (Mac OS X kernel) native support. - * config.gcc (powerpc-*-darwin*): Add native bits. - * config/darwin.c: New file, generic Darwin support functions. - * config/darwin.h: New file, generic Darwin definitions. - * config/darwin-protos.h: New file, generic Darwin prototypes. - * rs6000/darwin.h: New file, Darwin for PowerPC. - * rs6000/t-darwin: New file, Darwin makefile fragment. - * rs6000/rs6000.h (OBJECT_MACHO): New macro. - (TARGET_MACHO): Ditto. - (rs6000_abi): Add ABI_DARWIN. - (RS6000_REG_SAVE): Add ABI_DARWIN case. - (RS6000_SAVE_AREA): Ditto. - (FP_ARG_MAX_REG): Ditto. - (RETURN_ADDRESS_OFFSET): Ditto. - * rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO - cases. - (rs6000_emit_move): Add ABI_DARWIN cases. - (print_operand): Ditto. - (first_reg_to_save): Ditto. - (rs6000_stack_info): Ditto, also align stack by 16 instead of 8. - (debug_stack_info): Ditto. - (rs6000_emit_prologue): Ditto. - (rs6000_emit_epilogue): Ditto. - (output_profiler_hook): Ditto. - (output_function_profiler): Ditto. - (rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO. - (output_mi_thunk): Add TARGET_MACHO case. - (add_compiler_stub): Ditto. - (output_compiler_stub): Ditto. - (no_previous_def): Ditto. - (output_call): Ditto. - (machopic_output_stub): Ditto. - (rs6000_machopic_legitimize_pic_address): Ditto. - (toc_section): Ditto. - * rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern. - (macho_high): Ditto. - (macho_low): Ditto. - (movsi_low): Ditto. - (load_macho_picbase): Ditto. - (call): Add TARGET_MACHO case to modify function. - (call_value): Ditto. - (call_nonlocal_sysv): Add ABI_DARWIN case. - (call_value_nonlocal_sysv): Ditto. - * rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address): - Add prototype. - (machopic_output_stub): Ditto. - * ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_. - -2001-04-11 Mark Mitchell - - * dwarf2out.c (modified_type_die): Don't create new types here. - * tree.h (get_qualified_type): New function. - (build_qualified_type): Adjust comment. - * tree.c (get_qualified_type): New function. - (build_qualified_type): Use it. - -2001-04-11 Kaveh R. Ghazi - - * cpp.texi (-Wtraditional): Update description. - - * invoke.texi (-Wtraditional): Likewise. - -2001-04-11 Jim Wilson - - * config/ia64/ia64.h (FUNCTION_ARG_BOUNDARY): Return 128 if argument - requires more than 64 bits of alignment. - -2001-04-11 Neil Booth - - * cpplib.c (do_line): Sanity check iff enable checking. - -2001-04-11 Richard Henderson - - * Makefile.in (insn-recog.o): Depend on toplev.h. - (insn-emit.o, doloop.o): Likewise. - * genrecog.c, genemit.c: Include toplev.h in generated file. - * doloop.c: Include toplev.h. - -2001-04-11 Mark Mitchell - - * Makefile.in (gcse.o): Depend on params.h. - * gcse.c: Include params.h. - (gcse_main): Don't do GCSE if doing so will take inordinate - amounts of memory. - * params.def (PARAM_MAX_GCSE_MEMORY): New parameter. - * params.h (MAX_GCSE_MEMORY): New macro. - -2001-04-11 Kaveh R. Ghazi - - * Makefile.in (insn-output.o): Depend on $(EXPR_H). - - * genoutput.c (output_prologue): Include expr.h in insn-output.c. - -2001-04-11 Kaveh R. Ghazi - - * output.h (assemble_real): Declare if REAL_VALUE_TYPE is defined. - - * real.h (ereal_atof, real_value_truncate, target_isnan, - target_isinf, target_negative, assemble_real, debug_real): Delete - redundant prototypes. - - * Makefile.in (ifcvt.o): Depend on toplev.h. - - * c-semantics.c: Include expr.h. - - * ifcvt.c: Include toplev.h. - - * expr.h (rtx_equal_p): Delete prototype. - - * rtl.h (exact_log2_wide, floor_log2_wide, permalloc, - protect_from_queue, gen_jump, gen_beq, gen_bge, gen_ble, - eliminate_constant_term, expand_complex_abs, find_single_use, - make_tree, init_expr_once, init_optabs, supports_one_only): - Likewise. - - * tree.h (exact_log2_wide, floor_log2_wide, expand_null_return, - rest_of_type_compilation, emit_queue, do_pending_stack_adjust, - expand_assignment, store_expr, emit_line_note_after, - emit_line_note_force, split_specs_attrs, label_rtx): Likewise. - - * toplev.h (exact_log2_wide, floor_log2_wide): Add prototype. - - * sparc-protos.h: Delete redundant prototypes. - -2001-04-11 Vladimir Makarov - - * reload.c (push_reload): Add condition missed in SUBREG byte - offset patch. - -Wed Apr 4 00:28:23 2001 Rainer Orth - - * sparc/sol2-sld-64.h (STARTFILE_SPEC): Added missing blank. - -Wed Apr 11 14:06:10 CEST 2001 Jan Hubicka - - * i386.md (floatsisf_sse): Fix output template - * i386.c (ix86_expand_fp_movcc) - - * reg-stack.c (emit_pop_insn): Handle complex modes. - (move_for_stack_reg): Emit proper move mode. - (subst_stack_regs_pat): Handle complex modes. - -2001-04-11 Jakub Jelinek - - * cpplex.c (_cpp_lex_token): Only warn if -Wcomment. - -2001-04-10 Richard Henderson - - * libgcc2.h (__terminate_func_ptr): Remove typedef. - (__pure_virtual, __terminate, __terminate_set_func, - __default_terminate, __throw_type_match, __empty, - __get_eh_context, __get_eh_info, __get_dynamic_handler_chain, - __eh_rtime_match, __unwinding_cleanup, __rethrow, - __sjthrow, __sjpopnthrow, __eh_alloc, __eh_free): - Remove prototypes of deleted functions. - -2001-04-10 Kaveh R. Ghazi - - * c-typeck.c (convert_arguments): -Wtraditional now activates - -Wconversion warnings, except for changes in signed-ness. - Detect complex<->int & int<->complex conversions as well. - - * invoke.texi (-Wtraditional): Document it. - -Tue Apr 10 17:45:50 2001 Richard Kenner - - * gcse.c (update_ld_motion_stores): Don't use variable I for an insn. - * flow.c (set_block_for_new_insns): Remove needless cast and - properly check for unset block number. - -2001-04-10 Andrew MacLeod - - * function.c (purge_single_hard_subreg_set): Only check REGNO if - the subreg was a hard register. Pseudos are left as subregs. - -2001-04-09 Franz Sirl - - * Makefile.in (LIB2FUNCS_STATIC_EXTRA): New macro. - (LIB2ADD_ST): New macro, pass it to mklibgcc. - * mklibgcc.in (libgcc2_st_objs): New variable, set it from LIB2ADD_ST. - (libgcc_st_objs): New, set from libgcc2_st_objs. Use it for libgcc.a. - * config/rs6000/t-ppccomm (LIB2FUNCS_STATIC_EXTRA): New macro. - -2001-04-09 Bo Thorsen - - * config/i386/i386.md: "TARGET_64BIT && TARGET_64BIT": Removed one. - -2001-04-09 Andrew MacLeod - - * output.h (set_block_num): Missed it earlier, remove deprecated - prototype. - -2001-04-09 Andrew MacLeod - - * gcse.c (oprs_unchanged_p): Pass basic_block to load_killed_in_block_p. - (load_killed_in_block_p): Change bb parameter from int to basic_block. - (oprs_not_set_p): Pass basic_blocks instead of ints as parameters. - (handle_rd_kill_set): Change bb parameter from int to basic_block. - (compute_kill_rd): Pass basic_blocks instead of ints as parameters. - (expr_killed_p): Change bb parameter from int to basic_block, pass - basic_blocks instead of ints as parameters. - (compute_ae_kill): Pass basic_blocks instead of ints as parameters. - (expr_reaches_here_p_work, expr_reaches_here_p): Change bb parameter - from int to basic_block, pass basic_blocks instead of ints as parms. - (pre_expr_reaches_here_p_work, pre_expr_reaches_here_p): Change bb - parameter from int to basic_block, pass basic_blocks instead of ints. - (process_insert_insn): Pass basic_blocks instead of ints as parameters. - (insert_insn_end_bb): Change bb parameter from int to basic_block, - pass basic_blocks instead of ints. - (pre_edge_insert, pre_insert_copy_insn, pre_insert_copies): Pass - basic_blocks instead of ints as parameters. - (pre_delete): Pass basic_blocks instead of ints as parameters. - (hoist_expr_reaches_here_p): Change bb parameter from int to - basic_block, pass basic_blocks instead of ints. - (hoist_code): Pass basic_blocks instead of ints as parameters. - (reg_set_info, store_ops_ok, store_killed_after, store_killed_before): - Change bb parameter from int to basic_block. - (build_store_vectors): Pass basic_blocks instead of ints as parameters. - (insert_insn_start_bb): Change bb parameter from int to basic_block, - pass basic_blocks instead of ints. - (insert_store): Pass basic_blocks instead of ints as parameters. - (replace_store_insn, delete_store): Change bb parameter from int to - basic_block, pass basic_blocks instead of ints. - (store_motion): Pass basic_blocks instead of ints as parameters. - -2001-04-09 Andrew MacLeod - - * basic-block.h (set_new_block_for_insns): New Prototype. - (set_block_num): Delete prototype. - * flow.c (set_block_num): Remove obsolete function. - (set_block_for_new_insns): Set BB for single or multiple insns. - * gcse.c (handle_avail_expr): Use set_block_for_new_insns. - (process_insn_end_bb): Use set_block_for_new_insns or - set_block_for_insn instead of set_block_num. - (pre_insert_copy_insn): Use set_block_for_new_insns. - (update_ld_motion_stores): Use set_block_for_new_insns. - (insert_insn_start_bb): Use set_block_for_new_insns. - (replace_store_insn): Use set_block_for_new_insns. - -2001-04-09 Andrew MacLeod - Jeff Law - - * alias.c (get_addr): Externalize. - (canon_true_dependence): New function. Behaves like true_dependance - except it already assumes a MEM has been canonicalized. - * flags.h (flag_gcse_lm, flag_gcse_sm): New optimization flags. - * gcse.c (struct ls_expr): Add load/store expressions structure. - (modify_mem_list, canon_modify_mem_list): New variable. - (gcse_main): Initialize & finalize alias analysis. Use enhanced - load motion and store motion if requested. - (alloc_gcse_mem): Allocate space for modify_mem_list array. - (free_gcse_mem): Free the modify_mem_list array. - (oprs_unchanged_p): Use load_killed_in_block_p. - (gcse_mems_conflict_p, gcse_mem_operand): New variables. - (mems_conflict_for_gcse_p): New function. Don't kill loads - with stores to themselves if its in the load/store expression list. - (load_killed_in_block_p): New function. - (canon_list_insert): New Function. - (record_last_mem_set_info): Keep a list of all instructions which - can modify memory for each basic block. - (compute_hash_table, reset_opr_set_tables): Clear modify_mem_list. - (oprs_not_set_p): Use load_killed_in_block_p. - (mark_call, mark_set, mark_clobber): Use record_last_mem_set_info. - (expr_killed_p): Use load_killed_in_block_p. - (compute_transp): Do not pessimize memory references. - (pre_edge_insert): Update stores for a load motion expression. - (one_pre_gcse_pass): Check loads/stores for extra load motion. - (ldst_entry): Find or create a ldst_expr structure. - (free_ldst_entry): Free memory for an individual item. - (free_ldst_mems): Free entire load/store expression list. - (print_ldst_list): Print debug info. - (find_rtx_in_ldst): Try to find an rtx expression in the ldst list. - (enumerate_ldsts): Assign integer values to each entry in list. - (first_ls_expr): First expression in the list. - (next_ls_expr): Next expression in the list. - (simple_mem): Check if expression qualifies for ld/st expression list. - (invalidate_any_buried_refs): Remove from expression list if its - used in some other way we don't understand. - (compute_ld_motion_mems): Find all potential enhanced load motion - expression. - (trim_ld_motion_mems): Remove any expressions which are invalid. - (update_ld_motion_stores): Copy store values to registers for loads - which have been moved. - (regvec, st_antloc, num_store): New global statics. - (reg_set_info): Marks registers as set. - (store_ops_ok): Verfies registers expressions are valid in a block. - (find_moveable_store): Look for moveable stores in a pattern. - (compute_store_table): Find stores in a function worth moving, maybe. - (load_kills_store): Check dependence of a load and store. - (find_loads): Find any loads in a pattern. - (store_killed_in_insn): Check if a store is killed in an insn. - (store_killed_after): Check is store killed after an insn in a block. - (store_killed_before): Check is store killed before an insn in a block. - (build_store_vectors): Generate the antic and avail vectors. - (insert_insn_start_bb): Insert at the start of a BB, update BLOCK_HEAD. - (insert_store): Add a store to an edge. - (replace_store_insn): Replace a store with a SET insn. - (delete_store): Delete a store insn. - (free_store_memory): Free memory. - (store_motion): Perform store motion. - * invoke.texi: Add documentation for -fcse-lm and -fgcse-sm. - * rtl.h (get_addr, canon_true_dependence): Add prototypes. - * toplev.c (flag_gcse_lm, flag_gcse_sm): New Variables. - (f_options): Add gcse-lm and gcse-sm. - -Mon Apr 9 16:18:03 CEST 2001 Jan Hubicka - - * i386.c (expand_fp_movcc): Fix condition reversal code. - - * i386.c (ix86_register_move_cost): Fix handling of reformating penalty - * i386.h (INTEGER_CLASS_P, MAYBE_INTEGER_CLASS_P): New. - (CLASS_MAX_NREGS): Use it. - - * i386.h (HARD_REGNO_NREGS): Handle properly TF and TCmodes on 64bit; - handle properly complex values. - (CLASS_MAX_NREGS): Likewise; update comment. - -2001-04-05 Bernd Schmidt - - * ia64.c (ia64_flag_schedule_insns2): New variable. - (ia64_override_options): Initialize it. Clear - flag_schedule_insns_after_reload. - (ia64_reorg): Only do scheduling if ia64_flag_schedule_insns2. - -Mon Apr 9 15:09:13 CEST 2001 Jan Hubicka - - * i386.md (truncdfsf2_*): Add i387->int/sse reg alternatives; - Do not require source to match destination anymore; - Add abort to the nontrivial cases that should be handled by split. - (fix_trunc?fdi): Add SSE case for x86_64. - (floatdi?f): Likewise. - (floatdi?f_sse): New. - (fix_trunc?fdi_sse): New. - -2001-04-09 Richard Sandiford - - * dwarfout.c (DEBUG_ARANGES_BEGIN_LABEL): New label. - (DEBUG_ARANGES_END_LABEL): Ditto. - (dwarfout_init): Generate length and version fields at the start - of the .debug_aranges info. Insert DEBUG_ARANGES_BEGIN_LABEL - after the length field. - (dwarfout_finish): Insert DEBUG_ARANGED_END_LABEL at the end of - the .debug_aranges info. - -Sun Apr 8 00:43:27 CEST 2001 Jan Hubicka - - * i386.c (call, call_value): Make sure that resulting call_insn - does have proper second operand. - -Sun Apr 8 22:50:49 2001 Christopher Faylor - - * config/i386/xm-cygwin.h (GET_ENV_PATH_LIST): Eliminate obsolete - function. Remove include of sys/cygwin.h. - -Sun Apr 8 22:20:27 2001 Christopher Faylor - - * config/i386/cygwin.h (STARTFILE_SPEC): search */lib/w32api by default. - (CPP_SPEC): Always search */include/w32api for header files. - (ASM_OUTPUT_SECTION_NAME): Avoid testing NULL DECL. - (LINK_SPEC): Add "cyg" to the library search prefixes. - -2001-04-08 Philip Blundell - - * config/arm/arm.h (ASM_OUTPUT_LABELREF): Use asm_fprintf. - -2001-04-08 Neil Booth - - * cpperror.c (print_location): Don't special case . - (_cpp_begin_message): Handle WARNING_SYSHDR the same as - WARNING, but we don't check if we're in system headers. - * cpplib.h (enum error_type): WARNING_SYSHDR: New. - * cpplib.c (do_warning): Warn in system headers. - -2001-04-07 Mumit Khan - - * mbchar.c: Include config.h first. - -2001-04-07 Zack Weinberg - - * config.gcc: Set default for xmake_file at top, not bottom. - Change places that set xmake_file to "none" to set to the - empty string instead, or remove them entirely if there is no - default xmake_file for this cpu_type. Remove references to - deleted files. - - * config/x-lynx, config/convex/x-convex, config/elxsi/x-elxsi, - config/i386/x-isc, config/i386/x-isc3, config/i386/x-ncr3000, - config/i386/x-next, config/i386/x-sco, config/i386/x-sysv3, - config/i386/x-vsta, config/i860/x-sysv4, config/m68k/x-amix, - config/m68k/x-apollo68, config/m68k/x-ccur, config/m68k/x-crds, - config/m68k/x-hp2bsd, config/m68k/x-mot3300, config/m68k/x-mot3300-gas, - config/m68k/x-tower, config/m88k/x-sysv4, config/mips/x-dec-osf1, - config/mips/x-sni-svr4, config/mips/x-ultrix, config/romp/x-mach, - config/romp/x-romp, config/rs6000/x-beos, config/rs6000/x-lynx, - config/rs6000/x-mach, config/rs6000/x-sysv4, config/sparc/x-sysv4: - Delete. - - * config/a29k/x-unix, config/i386/x-aix, config/i386/x-osf1elf, - config/i386/x-osfrose, config/m68k/x-dpx2, config/mips/x-iris3, - config/mips/x-mips, config/mips/x-osfrose, config/mips/x-sony, - config/mips/x-sysv, config/rs6000/x-aix31: - Just set CLIB to -lld or -lmld, as appropriate. - - * config/arm/x-riscix, config/i370/x-oe, config/i386/x-dgux, - config/i386/x-sco4, config/i386/x-sco5, config/m68k/x-hp320, - config/m68k/x-hp320g, config/m68k/x-next, config/m88k/x-dgux, - config/mips/x-iris, config/pa/x-pa: - Just set (some of) FIXPROTO_DEFINES, STMP_FIXPROTO, - OTHER_FIXINCLUDES_DIRS. - - * config/i386/x-djgpp: Don't set LN or LN_S. - * config/m88k/x-dolph: Don't define __m88k__. - * config/m88k/x-tekXD88: Don't set AR_FLAGS. - * config/pa/x-pa-mpeix: Just set up quadlib.asm. - * config/i860/fx2800.h: No need to #undef SVR4. - - 38 x-host fragments remain, 2 x-cpu. - -2001-04-07 Herman A.J. ten Brugge - - * c4x.h (HARD_REGNO_NREGS): HCmode mode uses 2 regs not 4. - -2001-04-06 Neil Booth - - * cpplib.c (cpp_push_buffer): Give stdin buffers the name . - -2001-04-06 Neil Booth - - * configure.in: Add check for lstat. - * configure, config.in: Regenerate. - * cppinit.c (append_include_chain): Make empty path ".". - * cpplib.c (do_line): Don't simplify #line paths. - * cppfiles.c (remove_component_p): New function. - (find_or_create_entry): Acknowledge stat () errors during - path simplification. - (handle_missing_header): Don't simplify paths. - (_cpp_simplify_pathname): Don't simplify VMS paths. Return - the empty path untouched. Don't leave a trailing '/'. - -2001-04-06 Benjamin Kosnik - - * cppdefault.c (GPLUSPLUS_BACKWARD_INCLUDE_DIR): Add. - * Makefile.in (-DGPLUSPLUS_BACKWARD_INCLUDE_DIR): Add. - -2001-04-06 Neil Booth - - * cppfiles.c (open_file): Fail directories silently, but - with an errno of NOENT set. - (read_include_file): Move the common exit code to the sole - caller. Return an int indicating success or failure. Let - open_file handle directories. - (stack_include_file): If read_include_file fails, - push a "null" buffer. - -2001-04-05 DJ Delorie - - * function.h (virtuals_instantiated): Declare. - * function.c: (virtuals_instantiated): Make global. - * calls.c (emit_library_call_value_1): Use - virtual_outgoing_args_rtx only if it hasn't been instantiated. - Otherwise, use the stack pointer directly. - -Thu Apr 5 19:13:33 CEST 2001 Jan Hubicka - - * i386.c (x86_initialize_trampoline): New global function. - * i386.h (TRAMPOLINE_SIZE): Size is 23 for x86_64. - (INITIALIZE_TRAMPOLINE): Move offline. - * i386-protos.h (x86_initialize_trampoline): Declare. - -Thu Apr 5 19:02:15 CEST 2001 Jan Hubicka - - * i386.md (movdi_1_rex64): Allow SSE->SSE reg move. - (lea_0): Rename to lea_1. - (lea_1_zext, lea_1_rex64, lea_2_rex64): New patterns. - (lea_general_?): Allow SImodes on TARGET_64BIT - (lea_general_?_zext): New patterns. - (call_1, call_1_rex64): Fix. - -Thu Apr 5 19:00:15 CEST 2001 Jan Hubicka - - * i386.c (ix86_split_long_move): Use PUT_MODE instead of change_address. - -Thu Apr 5 18:25:56 CEST 2001 Jan Hubicka - - * i386.c (function_arg): Return constm1_rtx for last argument. - (ix86_expand_prologue): Update gen_call calls. - * i386.h (FUNCTION_BLOCK_PROFILER_EXIT): Likewise. - * i386.md (call_pop): Likewise. - (call): Second operand is VOIDmode. - (call_0): Likewise; Support 64bits. - (call_exp): New expander. - (call_1): Get to the sync. - (call_1_exp): New pattern. - (call_value): Support 64bit. - (call_value_exp): New pattern. - (untyped_call): Update gen_call call. - (call_value_pop): Disable for 64bit. - (call_value_0_rex64): New pattern. - (call_value_1_rex64): Likewise. - -2001-04-05 Bo Thorsen - - * i386.md: Don't allow "builtin_setjmp_receiver" for TARGET_64BIT. - -Thu Apr 5 13:44:17 2001 J"orn Rennecke - - * i386.md (*andsi_1+3): If used after reload, make sure the operand - satisfies ANY_QI_REG_P. - -2001-04-05 Bernd Schmidt - - * config/ia64/ia64.c (rtx_needs_barrier): A PARALLEL can contain - ASM_OPERAND. - - * sched-deps.c (sched_analyze_insn): Revert more of the March 27 - change. - -2001-04-04 Zack Weinberg - - * config.gcc: Remove default for xm_file. Clean up local - machine type handling. Remove settings of xm_file to - something that doesn't exist. In the big switch, set xm_file, - don't append to it (the value before the big switch is always - null). Don't force build_xm_file or host_xm_file to have a value. - * configure.in: Remove default for xm_file. Do not special - case $cpu/xm-$cpu.h not existing. - * configure: Regenerate. - -2001-04-04 Diego Novillo - - * simplify-rtx.c (simplify_binary_operation): Check for overflow - when folding integer division and modulo operations. - -2001-04-04 Andrew MacLeod - - * dwarf2out.c (output_cfi): Add 'for_eh' parameter, use PTR_SIZE - instead of DWARF2_ADDR_SIZE for EH addresses. - (output_call_frame_info): Use PTR_SIZE instead of DWARF2_ADDR_SIZE for - EH addresses. - -2001-04-04 Richard Henderson - - * config/ia64/ia64.h (IA64_UNWIND_INFO): Disable. - * config/ia64/t-glibc (LIB2ADDEH): Disable. - * config/ia64/t-ia64 (LIB2ADDEH): Disable. - -2001-04-04 Richard Henderson - - * configure.in (gcc_cv_as_leb128): Escape "." in regexp. - * configure: Rebuilt. - -2001-04-04 Jakub Jelinek - - * gcse.c (delete_null_pointer_checks_1): Add delete_list argument, - push insns to delete to it instead of deleting them. - (delete_null_pointer_checks): Delete insns from delete_list after - all delete_null_pointer_checks_1 passes are done. - -2001-04-04 Richard Henderson - - * configure.in (gcc_cv_as_leb128): Tweek minor number extraction. - * configure: Rebuilt. - -2001-04-04 Zack Weinberg - - * expr.h: Remove #ifdef FUNCTION_CONVERSION_BUG logic. - * config/romp/xm-romp.h: Delete. - -2001-04-04 Bernd Schmidt - - * sched-deps.c (sched_analyze_insn): Partially revert March 27 - change. - -2001-04-04 Herman A.J. ten Brugge - - * emit-rtl.c (mark_label_nuses) Increment the label uses for - all labels present in rtx. - (try_split) Call new function for all split insns. - -2001-04-04 Jakub Jelinek - - * recog.c (validate_replace_rtx_1): Instead of aborting just make - sure the change won't be validated. - -Wed Apr 4 00:45:38 EDT 2001 John Wehle (john@feith.com) - - * rtl.h (set_noop_p): Declare. - * flow.c (set_noop_p): Move from here ... - * rtlanal.c (set_noop_p): ... to here and enhance. - * cse.c (delete_trivially_dead_insns): Use it. - * gcse.c (hash_scan_set): Likewise. - * jump.c (delete_noop_moves): Likewise. - * recog.c (split_all_insns): Likewise. - -2001-04-04 Alan Modra - - * dwarf2out.c (dwarf2out_frame_debug_expr): Support adjusting - stack pointer via a LO_SUM. Ditto for setting a temp register - used to save to the stack. Set cfa_temp when setting fp, and - allow matches to cfa_temp in addition to cfa_store when saving - regs. Handle POST_INC and LO_SUM register stores. Document the - changes and errors in rule 12 doco. - - * pa.c (set_reg_plus_d, store_reg, load_reg): Return last insn. - (actual_fsize, local_fsize, save_fregs): Move for store_reg to see. - (load_reg): Move closer to epilogue code. - (DO_FRAME_NOTES): Define to control the following.. - (FRP): Define to set RTX_FRAME_RELATED_P on insns. - (hppa_expand_prologue): Use FRP and REG_FRAME_RELATED_EXPR - notes as necessary. - (hppa_expand_epilogue): Likewise. - -2001-04-03 Richard Henderson - - * configure.in (gcc_cv_as_leb128): Reject gas before 2.11. - * configure: Rebuild. - -2001-04-03 Richard Henderson - - * rtl.h (LCT_THROW): New. - * calls.c (emit_library_call_value_1): Handle it. - * except.c (connect_post_landing_pads): Use it. - -2001-04-03 Zack Weinberg - - * gansidecl.h: Delete file. - * configure.in: Change all refs to gansidecl.h to use - ansidecl.h. Adjust *_file_list so they know where ansidecl.h - lives. - * configure: Regenerate. - - * Makefile.in (intl.o): Don't depend on gansidecl.h. - * defaults.h: s/gansidecl.h/ansidecl.h/ in comment. - * ggc.h, config/fr30/fr30.h, config/mcore/mcore.c: - Don't include gansidecl.h. - * intl.c, main.c, version.c, fixinc/fixlib.h, - fixinc/procopen.c, fixinc/server.c: Include ansidecl.h not - gansidecl.h. - -Tue Apr 3 19:41:21 CEST 2001 Jan Hubicka - - * i386.c (ix86_force_to_memory, ix86_free_from_memory): - Update for 64bit. - -2001-04-03 Zack Weinberg - - * config/i386/xm-beos.h, config/i386/xm-isc.h, - config/i386/xm-next.h, config/i386/xm-sco.h, - config/i386/xm-sco5.h, config/m68k/xm-plexus.h, - config/m88k/xm-m88k.h: Delete. - - * config/i386/xm-djgpp.h: Don't define __MSDOS__. - * config/romp/xm-romp.h: Don't define bcopy. - * config/rs6000/xm-beos.h: Don't define bcopy, HAVE_VPRINTF, - HAVE_PUTENV, HAVE_RENAME, or USE_C_ALLOCA. - - * config.gcc: Remove references to deleted files. - - 14 xm-host.h remain, 1 xm-cpu.h. - -2001-04-03 Jakub Jelinek - David S. Miller - Andrew MacLeod - - Use byte offsets in SUBREGs instead of words. - - * alias.c (nonlocal_mentioned_p): Use subreg_regno function. - * caller-save.c (mark_set_regs): Change callers of subreg_hard_regno - to pass new argument. - (add_stored_regs): Use subreg_regno_offset function. - * calls.c (expand_call): For non-paradoxical SUBREG take endianess - into account. - (precompute_arguments): Use gen_lowpart_SUBREG. - * combine.c (try_combine): Replace explicit XEXP with SUBREG_REG. - (combine_simplify_rtx): Rework to use SUBREG_BYTE. - (simplify_set): Rework to use SUBREG_BYTE. - (expand_field_assignment): Use SUBREG_BYTE. - (make_extraction): Use SUBREG_BYTE. - (if_then_else_cond): Use SUBREG_BYTE. - (apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments. - (gen_lowpart_for_combine): Compute full byte offset. - * cse.c (mention_regs): Use SUBREG_BYTE. - (remove_invalid_subreg_refs): Rework to use SUBREG_BYTE. - (canon_hash): Use SUBREG_BYTE. - (fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword. - (gen_lowpart_if_possible): Formatting. - * dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos - correctly. - * dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG - (mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG - (loc_descriptor): Fixup explicit XEXP into SUBREG_REG - * dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG - (output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG - (output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG - * emit-rtl.c (gen_rtx_SUBREG): New function, used to verify - certain invariants about SUBREGs the compiler creates. - (gen_lowpart_SUBREG): New function. - (subreg_hard_regno): New function to get the final register number. - (gen_lowpart_common): Use SUBREG_BYTE. - (gen_imagpart): Spacing nits. - (subreg_realpart_p): Use SUBREG_BYTE. - (gen_highpart): Use SUBREG_BYTE. - (subreg_lowpart_p): Always compute endian corrected goal offset, - even at the byte level, then compare against that. - (constant_subword): New function, pulled out all constant cases - from operand_subword and changed second argument name to offset. - (operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early - and call constant_subword to do the work. Return const0_rtx if - looking for a word outside of OP. - (operand_subword_force): Change second arg name to offset. - * expmed.c (store_bit_field): Use SUBREG_BYTE. - (store_split_bit_field): Use SUBREG_BYTE. - (extract_bit_field): Use SUBREG_BYTE. - (extract_split_bit_field): Use SUBREG_BYTE. - (expand_shift): Use SUBREG_BYTE. - * expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG. - * final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE. - * flow.c (set_noop_p): Use SUBREG_BYTE. - (mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead. - * function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG. - (fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian - correction code. - (optimize_bit_field): Use SUBREG_BYTE. - (purge_addressof_1): Use SUBREG_BYTE. - (purge_single_hard_subreg_set): Use subreg_regno_offset function. - (assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are - actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true. - * gengenrtl.c (special_rtx): Add SUBREG. - * global.c (mark_reg_store): Use SUBREG_BYTE. - (set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE. - * ifcvt (noce_emit_move_insn): Use SUBREG_BYTE. - * integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure - final byte offset is congruent to subreg's mode size. - (subst_constants): Use SUBREG_BYTE. - (mark_stores): Use subreg_regno_offset function. - * jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset - function and SUBREG_BYTE. - * local-alloc.c (combine_regs): Use subreg_regno_offset function. - (reg_is_born): Use subreg_hard_regno. - * recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte - endian correction code. Don't combine subregs unless resulting - offset aligns with type. Fix subreg constant extraction for DImode. - Simplify SUBREG of VOIDmode CONST_DOUBLE. - (general_operand): Remove dead mode_altering_drug code. - (indirect_operand): Use SUBREG_BYTE. - (constrain_operands): Use subreg_regno_offset function. - * reg-stack.c (get_true_reg): Use subreg_regno_offset function. - * regmove.c (regmove_optimize): Use SUBREG_BYTE. - (optimize_reg_copy_3): Use gen_lowpart_SUBREG. - * regs.h (REG_SIZE): Allow target to override. - (REGMODE_NATURAL_SIZE): New macro which target can override. - * reload.c (reload_inner_reg_of_subreg): subreg_regno should be used - on the entire subreg rtx. - (push_reload): Use SUBREG_BYTE in comments and code. - (find_dummy_reload): Use subreg_regno_offset. Only adjust offsets - for hard registers inside subregs. - (operands_match_p): Use subreg_regno_offset. - (find_reloads): Use SUBREG_BYTE and only advance offset for subregs - containing hard regs. - (find_reload_toplev): Use SUBREG_BYTE. Remove byte endian - corrections when fixing up MEM subregs. - (find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and - subreg_regno_offset where appropriate. - (find_reloads_subreg_address): Use SUBREG_BYTE. Remove - byte endian corrections when fixing up MEM subregs. - (subst_reloads): When combining two subregs, make sure final - offset is congruent to subreg's mode size. - (find_replacement): Use SUBREG_BYTE and subreg_regno_offset. - (refers_to_regno_for_reload_p): Use subreg_regno. - (reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset. - * reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian - correction code for memory subreg fixups. - (forget_old_reload_1): Use subreg_regno_offset. - (choose_reload_regs): Use subreg_regno. - (emit_input_reload_insns): Use SUBREG_BYTE. - (reload_combine_note_store): Use subreg_regno_offset. - (move2add_note_store): Use subreg_regno_offset. - * resource.c (update_live_status, mark_referenced_resources): Use - subreg_regno function. - (mark_set_resources): Use subreg_regno function. - * rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE. - (subreg_regno_offset, subreg_regno): Define prototypes. - (subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions. - (gen_lowpart_SUBREG): Add prototype. - * rtl.texi (subreg): Update to reflect new byte offset representation. - Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now. - * rtlanal.c (refers_to_regno_p): Use subreg_regno. - (reg_overlap_mentioned_p): Use subreg_regno. - (replace_regs); Make sure final offset of combined subreg is - congruent to size of subreg's mode. - (subreg_regno_offset): New function. - (subreg_regno): New function. - * sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE. - * sdbout.c (sdbout_symbol): Compute offset using alter_subreg. - * stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG. - * tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead. - (SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides. - * config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno. - (a29k_get_reloaded_address): Use SUBREG_BYTE. - (print_operand): Use SUBREG_BYTE. - * config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE. - * config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE. - (arm_reload_out_hi): Use SUBREG_BYTE. - * config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset - instead of SUBREG_WORD. - (d30v_print_operand_memory_reference): Use subreg_regno_offset. - * config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix - SUBREG creation to use byte offset. - * config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit - inverted load insns): Fix explicit rtl subregs to use byte - offsets. - * config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3, - udivsi3, umodsi3): Generate SUBREGs with byte offsets. - * config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE. - * config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl - to use byte offsets. - (unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets. - * config/i960/i960.md (extendhisi2): Generate SUBREGs with byte - offsets, also make sure it is congruent to SUBREG's mode size. - (extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2, - unnamed ldob insn): Generate SUBREGs with byte offset. - (zero_extendqihi2): SUBREG's are byte offsets. - * config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE. - (m68hc11_gen_highpart): Use SUBREG_BYTE. - * config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2, - zero-extendqisi2): Generate SUBREGs with byte offset. - (umulsidi3, mulsidi3, subreghi1ashrdi_const32, - subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit - subregs in rtl to use byte offsets. - * config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset. - * config/mips/mips.c (mips_move_1word): Use subreg_regno_offset. - (mips_move_2words): Use subreg_regno_offset. - (mips_secondary_reload_class): Use subreg_regno_offset. - * config/mips/mips.md (DImode plus, minus, move, and logical op - splits): Fixup explicit subregs in rtl to use byte offsets. - * config/mn10200/mn10200.c (print_operand): Use subreg_regno function. - * config/mn10300/mn10300.c (print_operand): Use subreg_regno function. - * config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in - rtl to use byte offsets. - * config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE. - * config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit - subregs to use byte offsets. - * config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1): - Fixup explicit subregs in rtl to use byte offsets. - * config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE - and remove byte endian correction code. - * config/sh/sh.c (output_movedouble): Use subreg_regno. - (gen_ashift_hi): Use SUBREG_BYTE. - (regs_used): Use subreg_regno_offset. - (machine_dependent_reorg): Use subreg_regno_offset. - * config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE. - * config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno. - (movdf_i4): Subregs are byte offsets now. - * config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE. - * config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed. - (REGMODE_NATURAL_SIZE): Override. - (REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode. - * config/sparc/sparc.md (TFmode move splits): Generate SUBREGs - with byte offsets. - (zero_extendhisi2, zero_extendqidi2_insn, extendhisi2, - extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn, - extendqidi2): Generate SUBREGs with byte offsets, also make sure - it is congruent to SUBREG's mode size. - (smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte - offsets. - (cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc, - cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2, - lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper - SUBREG_BYTE offset for non-paradoxical subregs in patterns. - * config/v850/v850.c (print_operand, output_move_double): Use - subreg_regno function. - -2001-04-03 Alexandre Oliva - - * configure.in (target_subdir): Use target_alias, not target. - * configure: Rebuilt. - - * config/sh/crtn.asm (init, fini): Restore r15 from r14, not the - other way round. - * config/sh/crti.asm: Fix typos in comments. - -2001-04-03 Alan Modra - - * pa.h: Revise comments for TARGET_NO_SPACE_REGS and - TARGET_FAST_INDIRECT_CALLS. - * pa.c (override_options): TARGET_NO_SPACE_REGS is now OK with - -fPIC. Don't warn. - (return_addr_rtx): Short circuit export stub matching when - TARGET_NO_SPACE_REGS. - (output_millicode_call): For out of range calls, make -fPIC - take precedence, then TARGET_PORTABLE_RUNTIME, then ble. Don't - return before delay slot checks when TARGET_PORTABLE_RUNTIME. - * pa.md: Modify length attr calculation of all millicode insns to - match above. - -2001-04-02 Geoffrey Keating - - * configure.in (gcc_cv_as_leb128): Correct name of cache variable. - Require at least 2.11 in the version test. Specifically check - for and reject GAS version 2.10.90. - * configure: regenerate. - -2001-04-03 Alan Modra - - * pa.c (override_options): Remove PIC profiling warning. - (hp_profile_labelno): Delete. - (hp_profile_label_rtx): Delete. - (hp_profile_label_name): Delete. - (pa_add_gc_roots): Remove reference to hp_profile_label_rtx. - (output_function_prologue): Remove profiling code and all tests on - profile_flag. Move store of PIC_OFFSET_TABLE_REGNUM now that - merge_sp_adjust_with_store can work for PIC and profiling. - (hppa_expand_epilogue): Remove profile_flag test. - (hppa_can_use_return_insn_p): Likewise. - (hppa_init_pic_save): Emit before tail_recursion_reentry, and - cater for PROFILE_HOOK. - (hppa_profile_hook): New function. - * pa.h (FUNCTION_PROFILER): Now does nothing. - (PROFILE_HOOK): Define. - (hppa_profile_hook): Declare. - (PROFILE_BEFORE_PROLOGUE): Delete. - (ASM_OUTPUT_REG_PUSH): Delete. - (ASM_OUTPUT_REG_POP): Delete. - * pa.md (call_profiler): Turn it into a call insn, and don't `use' - r24. Accept function name operand, and use this and a locally - generated label to calculate pc-rel offset to func start. - -2001-04-02 Kaveh R. Ghazi - - * $(HOST_PREFIX_1)errors.o, $(HOST_PREFIX_1)ggc-none.o, - ggc-common.o, ggc-simple.o, ggc-page.o, ggc-none.o: Depend on - $(SYSTEM_H). - -2001-04-03 Alan Modra - - * dwarf2out.c (dwarf2out_frame_debug_expr): Move errant HIGH and - LO_SUM cases to where they belong. - -2001-04-02 Richard Henderson - - * except.h (lang_eh_type_covers): Mark extern. - (lang_eh_runtime_type): Likewise. - -2001-04-02 Zack Weinberg - - * genattr.c, gencheck.c, gencodes.c, genconfig.c, genflags.c, - gengenrtl.c: Wrap generated header in multiple-include guard. - Improve error checking. - -2001-04-02 Kaveh R. Ghazi - - * configure.in: Don't check for putenv. - * configure: Regenerate. - * gcc.c (putenv): Don't define. - * vax/xm-vms.h: Handle putenv. - -2001-04-02 Jakub Jelinek - - * ifcvt.c (noce_emit_move_insn): New. - (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): Use it. - (noce_process_if_block): Likewise. - For STRICT_LOW_PART, take mode from its SUBREG. - -2001-04-02 Jakub Jelinek - - * fold-const.c (fold): Before optimizing unsigned comparison with - 0x7fffffffU, make sure arg0 is integral type. - -2001-04-02 Joseph S. Myers - - * c-tree.texi: Document representation of wide strings. - -2001-04-01 Richard Henderson - - * except.h (expand_builtin_dwarf_fp_regnum): Declare. - -Sun Apr 1 11:49:05 CEST 2001 Jan Hubicka - - * i386.md: remove obsoleted comments. - (adddi_?): Rename to adddi_?_rex64; disable for 32bit. - (x86_movsicc_0_m1_rex64): Rename to x86_movdicc_0_m1_rex64; - fix output template. - -2001-03-31 Marek Michalkiewicz - - * config/avr/libgcc.S (__mulhi3): Optimize previous change. - -2001-03-30 Bernd Schmidt - - * loop.c (load_mems): When generating a load from a pseudo, update - REGNO_LAST_UID. - -Fri Mar 30 17:36:43 CEST 2001 Jan Hubicka - - * i386.c (ix86_split_long_move): Use change address to compensate - stack pointer change in push instruction. - -Fri Mar 30 00:31:00 CEST 2001 Jan Hubicka - - * i386.md (sse_movdfcc_eq): Fix constraint (sse_mov?fcc splitter): Use operands_match_p - instead of rtx_equal_p; fix the output template. - -Fri Mar 30 00:21:41 CEST 2001 Jan Hubicka - - * i386.c (ix86_expand_setcc): Support 64bit. - (ix86_expand_int_movcc): Likewise. - * i386.md (movdicc_rex64, x86_movsicc_0_m1_rex64, movdicc_c_rex64): - New patterns. - - * i386.md (allocate_stack_worker): Turn to expander. - (allocate_stack_worker_1, allocate_stack_worker_rex64): New insns. - - * i386.c (print_reg): Do not print x86_64 style regs on IA-32 - -2001-03-29 Richard Henderson - - * libgcc2.c [L__main]: Include unwind-dw2-fde.h instead of frame.h. - -2001-03-28 Matthew Hiller - - * config/mn10300/mn10300.md (cmpsi): Fix first alternative's - output template. - - * MAINTAINERS: Added self. - -2001-03-28 Richard Henderson - - * Makefile.in (cs-tconfig.h): Depend on CONFIG_H, not GCONFIG_H. - Use ALL_CFLAGS not HOST_CFLAGS for sjlj detection. - -2001-03-28 Jim Wilson - - * config/ia64/ia64.md (movtf): Change DImode to TFmode in calls to - operand_subword. - -2001-03-28 Kaveh R. Ghazi - - * toplev.h (fatal_error): Add ATTRIBUTE_NORETURN. - - * tradcif.y (yyerror): Likewise. Add format specifier in call to - `error'. - - * tradcpp.c (macroexpand): Likewise for call to `error_with_line'. - -2001-03-28 DJ Delorie - - * Makefile.in (stage1_build): Revert CFLAGS patch. - -2001-03-28 Marek Michalkiewicz - - * config/avr/libgcc.S (__mulhi3): Correct tests to exit the loop - when multiplier or multiplicand is zero. - -2001-03-28 Bernd Schmidt - - * cselib.c (hash_rtx): Don't do tail recursion elimination by hand. - - * config/ia64/ia64.c (update_set_flags): New function, broken out of - rtx_needs_barrier. - (set_src_needs_barrier): Likewise. - (rtx_needs_barrier): For SET case, use these two functions. Rework - PARALLEL case to handle all inputs before all outputs. - (emit_insn_group_barriers): Call init_insn_group_barriers only if we - saw a label and no stop bit since then. - (maybe_rotate, process_epilogue): Add prototypes. - -2001-03-28 Richard Henderson - - * config/rs6000/rs6000.h (EPILOGUE_USES): Use TARGET_AIX, - not TARGET_TOC for special toc restore handling. - * config/rs6000/rs6000.md (eh_return): Likewise. - -2001-03-28 Richard Henderson - - * config/sparc/sparc.c (eligible_for_epilogue_delay): False if - current_function_calls_eh_return. - (output_function_epilogue): Handle eh_return. - * config/sparc/sparc.h (DOESNT_NEED_UNWINDER): Remove. - (EH_RETURN_DATA_REGNO): New. - (EH_RETURN_STACKADJ_RTX): New. - (EH_RETURN_HANDLER_RTX): New. - * config/sparc/sparc.md (call/short branch peepholes): Check - can_throw_internal instead of in_same_eh_region. - - * config/rs6000/rs6000.c (rs6000_stack_info): Allocate space - for eh_return data registers. - (rs6000_emit_prologue): Save eh_return data registers. - (rs6000_emit_epilogue): Force inline restores if eh_return. - Restore eh_return data registers. Mind EH_RETURN_STACKADJ_RTX. - * config/rs6000/rs6000.h (rs6000_stack_t): Add ehrd_offset. - (EH_RETURN_DATA_REGNO, EH_RETURN_STACKADJ_RTX): New. - (EPILOGUE_USES): True for TOC_REGISTER if calls_eh_return and - the target uses one. - * config/rs6000/rs6000.md (eh_epilogue, eh_reg_restore): Remove. - (return_eh_si, return_eh_di): Remove. - (eh_return): New, from corpse of eh_epilogue. - (eh_set_lr_si, eh_set_lr_di): New. - - * config/i386/i386.c (general_no_elim_operand): Disallow virtual regs. - (ix86_save_reg): If maybe_eh_return, true for EH_RETURN_DATA_REGNOs. - True for pic register if current_function_calls_eh_return. - (ix86_expand_epilogue): Change "emit_return" argument into "style". - Handle eh_return requirements. - * config/i386/i386.h (EH_RETURN_DATA_REGNO): New. - (EH_RETURN_STACKADJ_RTX): New. - * config/i386/i386.md (exception_receiver): Remove. - (eh_return, eh_return_1): New. - * config/i386/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New. - - * config/alpha/alpha.c (alpha_sa_mask): Add EH_RETURN_DATA_REGNOs. - (alpha_mark_machine_status): No eh_epilogue_sp_ofs ... - (alpha_expand_epilogue): ... use EH_RETURN_STACKADJ_RTX instead. - * config/alpha/alpha.h (machine_function): Remove eh_epilogue_sp_ofs. - (EH_RETURN_DATA_REGNO): New. - (EH_RETURN_STACKADJ_RTX, EH_RETURN_HANDLER_RTX): New. - * config/alpha/alpha.md (eh_epilogue): Remove. - (exception_receiver): Use $26 for ldgp input. - * config/alpha/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New. - -2001-03-28 Richard Henderson - - * except.c: Rewrite entirely for IA-64 ABI exception handling. - * except.h: Likewise. - - * Makefile.in (LIB2ADDEH): Mention unwind-dw2*.c - (LIB2ADDEHDEP): New. - (LIB2FUNCS_EH): Remove. - (LIB2ADD): Remove LIB2ADDEH. - (libgcc.mk): Pass LIB2ADDEHDEP, don't pass LIB2FUNCS_EH. - (LIBGCC_DEPS): Use LIB2ADDEHDEP. - (crt{begin,end}[S].o): Likewise. - (except.o): Update includes. - * mklibgcc.in: Remove LIB2FUNCS_EH, add LIB2ADDEH, LIB2ADDEHDEP. - (libgcc2_c_dep): Use LIB2ADDEHDEP. - - * basic-block.h (struct basic_block_def): Remove eh_beg, eh_end. - * bb-reorder.c (reorder_basic_blocks): Don't disable for EH. - * builtins.def (BUILT_IN_EH_RETURN_DATA_REGNO): New. - * builtins.c (expand_builtin): Implement it. - [BUILT_IN_EH_RETURN]: Update for nr arguments change. - * c-common.c (c_common_nodes_and_builtins): Declare it. - * c-decl.c (init_decl_processing): Update __builtin_eh_return. - * calls.c (libfunc_nothrow): Remove. - (emit_library_call_value_1): Don't call it. - * crtstuff.c: Include unwind-dw2-fde.h instead of frame.h. - * dwarf2.h (dwarf_call_frame_info): Add dwarf2.1 elements. - (DW_EH_PE_*): New defines for pointer encoding in .eh_frame. - * dwarf2out.c (struct dw_fde_struct): Add uses_eh_lsda, funcdef_number. - (current_funcdef_number): Globalize. - (output_call_frame_info): Emit frame data if an lsda is needed. - Generate augmentation for personality routine. Don't play with - difference symbols. - (dwarf2out_begin_prologue): Record funcdef_number. - * dwarf2out.h (current_funcdef_number): Declare. - * expr.c (expand_expr): Update for except.h name changes. - Remove POPDCC_EXPR, POPDHC_EXPR. Add EXC_PTR_EXPR. - * expr.h (LTI_throw, LTI_rethrow): Remove. - (LTI_sjthrow, LTI_sjpopnthrow, LTI_terminate): Remove. - (LTI_eh_rtime_match): Remove. - (LTI_unwind_resume, LTI_eh_personality): Add. - (LTI_unwind_sjlj_register, LTI_unwind_sjlj_unregister): Add. - * final.c (final): Don't call check_exception_handler_labels, - init_insn_eh_region, or free_insn_eh_region. - (final_scan_insn): Always emit debug labels for - NOTE_INSN_EH_REGION notes. - * flags.h (flag_new_exceptions): Remove. - * flow.c (entry_exit_blocks): Remove eh_beg, eh_end. - (record_active_eh_regions): Remove. - (count_basic_blocks): Check all instructions for REG_EH_REGION. - Use can_throw_internal. - (find_basic_blocks_1): Likewise. - (move_stray_eh_region_notes): Remove. - (find_label_refs): No eh_return_stub_label. - (make_edges): Likewise. No init/free_eh_nesting_info. Handle RESX. - (make_eh_edge): No eh_nest_info. Update for reachable_handlers - changes. - (delete_unreachable_blocks): Don't track deleted handlers. - (flow_delete_block): Use maybe_remove_eh_handler. - (delete_eh_regions): Remove. - (merge_blocks): Don't check for eh region match. - (mark_regs_live_at_end): Handle EH_RETURN_DATA_REGNO, - EH_RETURN_STACKADJ_RTX, EH_RETURN_HANDLER_RTX. - (init_propagate_block_info): Disable dead frame store optimization - when current_function_calls_eh_return. - (dump_bb): Don't print eh_beg, eh_end. - * function.c (fixup_var_refs): No catch_clauses. - (expand_function_end): Likewise. Call expand_eh_return before - the return register use. Call sjlj_emit_function_exit_after. - (expand_function_start): Force pseudo DECL_RESULT if sjlj exceptions. - * function.h (struct function): Add calls_eh_return, uses_eh_lsda. - * ifcvt.c (dead_or_predicable): Remove eh region check. - * integrate.c (function_cannot_inline_p): Disallow __builtin_eh_return. - Don't check for EH vs parameters. - (expand_inline_function_eh_labelmap, eif_eh_map): Remove. - (expand_inline_function): Call duplicate_eh_regions. - (copy_insn_list): Don't handle NOTE_INSN_EH_REGION_BEG/END. - (copy_insn_notes): Remap REG_EH_REGION notes. - (copy_rtx_and_substitute): Remove SYMBOL_REF_NEED_ADJUST check. - * integrate.h (struct inline_remap): Add local_return_label. - * jump.c (jump_optimize_1): Don't init/free_insn_eh_region, nor - check_exception_handler_labels, nor exception_optimize. - (find_cross_jump): No EH region check. - * optabs.c (init_optabs): Update for changed eh libfuncs. - * rtl.def (RESX): New. - * rtl.h (SYMBOL_REF_NEED_ADJUST): Remove. - * stmt.c (expand_decl_cleanup): Simplify using_eh_for_cleanups_p - checks. Update for except.h name changes. - (expand_cleanups): Likewise. - (expand_dcc_cleanup, expand_dhc_cleanup): Remove. - * toplev.c (dump_file_index, dump_file): Add .02.eh dump. - (compile_file): Call init_eh before init_optabs. Don't - output_exception_table here. - (rest_of_compilation): Call convert_from_eh_region_ranges, - convert_to_eh_region_ranges, output_function_exception_table. - Don't emit_eh_context. - * tree.def (POPDHC_EXPR, POPDCC_EXPR): Remove. - (EXC_PTR_EXPR): New. - - * md.texi (eh_epilogue): Remove. - (eh_return): Document. - * tm.texi (EH_RETURN_DATA_REGNO): Document. - (EH_RETURN_STACKADJ_RTX, EH_RETURN_HANDLER_RTX): Document. - - * eh-common.h: Remove file. - * frame-dwarf2.c, frame.c, frame.h: Remove files. - * libgcc2.c (L_eh): Remove. - - * unwind-dw2-fde.c: New file, largely copied from frame.c. - * unwind-dw2-fde.h: New file. - * unwind-dw2.c: New file, largely cribbed from frame-dwarf2.c. - * unwind-sjlj.c, unwind.h, unwind.inc: New files. - * libgcc-std.ver: Update for eh symbols. - -2001-03-27 Richard Henderson - - * regmove.c (perhaps_ends_bb_p): Use can_throw_internal to - reduce false positives. - (regmove_optimize): Disable if flag_non_call_exceptions. - - * stmt.c (expand_return): Remove always true predicate. - (expand_decl_cleanup_no_eh): Remove dead code. - - * sched-deps.c (sched_analyze_insn): Consolidate scheduling - barrier code. Add a scheduling barrier if a non-call insn - can throw internally. - - * rtlanal.c (rtx_addr_can_trap_p): Virtual registers cannot trap. - Auto-inc addresses trap only if their base register does. - - * except.c (can_throw_internal): Rename from can_throw. - * except.h, resource.c: Update references. - - * integrate.c (copy_insn_list): Use returnjump_p. - (copy_insn_notes): Recurse for CALL_PLACEHOLDER. - - * function.h (struct function): Move all boolean valued fields - to single bit fields at the end of the struct. - - * bb-reorder.c, dwarf2out.c, except.c, except.h, flow.c, - jump.c, toplev.c: - Rename asynchronous_exceptions to flag_non_call_exceptions. - - * gthr-single.h (UNUSED): New. Distinguish between how C - and C++ mark unused function arguments. Use throughout. - - * Makefile.in (cs-tconfig.h): Copy USING_SJLJ_EXCEPTIONS - value to target configuration header. - * configure.in (CONFIG_SJLJ_EXCEPTIONS): New. - * config.in, configure: Rebuild. - * except.h (USING_SJLJ_EXCEPTIONS): New. Define based on - configuration and target defines. - (exceptions_via_longjmp): Remove. - * dwarf2out.c, except.c, final.c, toplev.c, config/ia64/ia64.c: - Use USING_SJLJ_EXCEPTIONS instead of exceptions_via_longjmp. - - * except.h (flag_non_call_exceptions): Move ... - * flags.h: ... here. - - * combine.c (distribute_notes) [REG_EH_REGION]: If non-call - exceptions, put the note on the trapping instruction. - - * flags.h (flag_new_exceptions): Remove. - * toplev.c: Don't set it. - * final.c: Don't check it. - * except.c: Provide stub definition. - - * flow.c (tidy_fallthru_edges): Don't combine complex edges. - (calculate_global_regs_live): Kill call-clobbered registers - across exception edges. - * reg-stack.c (convert_regs_1): Kill the entire target stack - across non-call exception edges. - - * flow.c (cleanup_cfg): Take no argument. - * output.h, sibcall.c, toplev.c: Update all calls. - -2001-03-27 Kaveh R. Ghazi - - * configure.in: Don't check for bcopy. - * configure, config.in: Regenerate. - - * system.h: Don't define or prototype bcopy, instead poison it. - -2001-03-27 Richard Henderson - - * function.c (expand_function_start): Set DECL_REGISTER on - a pseudo used for DECL_RESULT. - - * rtl.h (LCT_NORETURN): New. - * calls.c (emit_library_call_value_1): Handle it. - -2001-03-27 Stan Shebs - - * objc/objc-act.c (objc_init): Use dump_base_name. - (gen_declaration): Clear the buffer arg. - (gen_declaration_1): New function, body of gen_declaration. - (adorn_decl): Call gen_declaration_1 instead of gen_declaration. - (gen_method_decl): Ditto, plus always clear buffer arg. - (error_with_ivar): Simplify. - (warn_with_method): Ditto. - (build_message_expr): Don't clear buffers. - (dump_interface): Ditto. - (objc_debug): Ditto. - (build_keyword_selector): Clear the buffer by only zeroing - the first element. - (objc_implementation_context): Declare. - (start_class): Warn about missing @end. - (finish_objc): Ditto. - -2001-03-28 John David Anglin - - * reload1.c (eliminate_regs): Don't abort on MEM USEs. - -2001-03-27 Kaveh R. Ghazi - - * Makefile.in (SYSTEM_H): Define. - Depend on $(SYSTEM_H), not system.h. - - * objc/Make-lang.in: Depend on $(SYSTEM_H), not system.h. - -2001-03-27 Jim Wilson - - * final.c (final_scan_insn, case NOTE_INSN_BASIC_BLOCK): Call - IA64_UNWIND_EMIT. - * config/ia64/ia64.c (block_num, need_copy_state): New static vars. - (process_epilogue): New static function. - (process_set): Call process_epilogue instead of emitting .restore - directly. - (process_for_unwind_directive): Handle NOTE_INSN_BASIC_BLOCK. - - * flow.c (struct reg_cond_life_info): New fields orig_condition - and stores. - (init_propagate_block_info): Set new fields. - (mark_regno_cond_dead): Set and use new fields. - (flush_reg_cond_reg_1): Likewise. - (and_reg_cond, case AND): Check for redundant AND conditions. - (mark_used_reg): Delete unnecessary clears before freeing splay trees. - Set new fields. - -2001-03-27 Neil Booth - - * cppmacro.c (stringify_arg): Null terminate strings. - -2001-03-27 Zack Weinberg - - * config.gcc (m68hc11-*-*, m68hc12-*-*): Convert to new tm.h - inclusion style. xm-m68hc11.h no longer exists. - * config/m68hc11/xm-m68hc11.h: Delete file. - * config/m68hc11/m68hc12.h: Convert to new tm.h inclusion style. - - * config/m68hc11/m68hc11.h: Convert to new tm.h inclusion style. - Don't define GCC_VERSION, N_, or PARAMS; don't include - gansidecl.h or stdio.h. Define inhibit_libc here. - Make code conditioned on #if GCC_VERSION > 2095 unconditional. - Delete code conditioned on #if GCC_VERSION == 2095. - - * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c: - Make code conditioned on #if GCC_VERSION > 2095 unconditional. - Delete code conditioned on #if GCC_VERSION == 2095. - -2001-03-27 Kaveh R. Ghazi - - * system.h: Include symcat.h. - (STRINGIFY): Don't define. - - * configure.in: Adjust comment. - - * builtins.c: Use STRINGX, not STRINGIFY. - * gencheck.c: Likewise. - * gengenrtl.c: Likewise. - * protoize.c: Likewise. - - * cpplex.c: Don't include symcat.h. - * cpplib.c: Likewise. - - * gansidecl.h (HAVE_STRINGIZE): Don't define. - -2001-03-27 Alan Modra - - * c-typeck.c (digest_init): Fold init expression. - -2001-03-26 Kaveh R. Ghazi - - * sbitmap.c (sbitmap_copy): Call memcpy, not bcopy. - -2001-03-27 Alan Modra - - * except.c (eh_regs): Save results of build_pointer_type to a temp - as FUNCTION_VALUE macro may evaluate its args multiple times. - -2001-03-26 Mark Mitchell - - * c-common.h (DECL_NUM_STMTS): New macro. - * c-decl.c (duplicate_decls): Copy DECL_NUM_STMTS, not - DECL_FRAME_SIZE. - (pushdecl): Likewise. - * c-semantics.c (add_stmt): Update DECL_NUM_STMTS. - * integrate.c (expand_inline_function): Don't check - DECL_FRAME_SIZE. - * print-tree.c (print_node): Don't print it. - * toplev.c (rest_of_compilation): Don't try to inline when - flag_no_inline is on. - * tree.h (DECL_FRAME_SIZE): Remove. - (tree_decl): Adjust accordingly. - -2001-03-26 Kaveh R. Ghazi - - * combine.c (try_combine): Use memcpy, not bcopy. - - * genattrtab.c (expand_units): Likewise. - -Mon Mar 26 15:55:08 CEST 2001 Jan Hubicka - - * i386.md (push mem DI peep2): New. - (mov 0, mov -1 peep2): Handle 64bit. - (lea to arithmetics peep2): Handle 64bit leas. - (rsp arithmetics to push/pop peep2s): New. - - * i386.md (truncdfsf2_3, trunctfsf2_2): Change predicate to memory_operand. - -Mon Mar 26 14:35:18 CEST 2001 Jan Hubicka - - * i386.c (struct machine_function): Add save_varrargs_registers. - (ix86_save_varrargs_registers): New macro. - (ix86_frame_layout): Support 64bit; support red zones and varrargs area. - (ix86_expand_prologue): Likewise. - (ix86_emit_epilogue_esp_adjustement): Likewise. - (ix86_expand_epilogue): Likewise. - * i386.md (pro_epilogue_adjust_stack): Turn to expander; support 64bit. - (pro_epilogue_adjust_stack_1): New insn. - (pro_epilogue_adjust_stack_rex64): Likewise. - * i386.h (MASK_NO_RED_ZONE): New constant. - (TARGET_RED_ZONE): New macro. - (TARGET_OPTIONS): Add "red-zone" and "no-red-zone" - (RED_ZONE_SIZE): New constant. - (RED_ZONE_RESERVE): New constant. - -2001-03-25 Kaveh R. Ghazi - - * toplev.c (set_float_handler): Use memcpy, not bcopy. - -2001-03-25 Kazu Hirata - - * config/h8300/h8300.md (umodqi3): Output a tab instead of a - space. - (modqi3): Likewise. - (umodhi3): Likewise. - (modhi3): Likewise. - -2001-03-25 Kaveh R. Ghazi - - * mkconfig.sh (DEFINES): Handle entries with '='. - - * config.gcc: Don't use i370/xm-mvs.h or ns32k/xm-pc532-min.h. - Set xm_defines to MACRO=value instead. - - * i370/xm-mvs.h: Delete. - - * ns32k/xm-pc532-min.h: Likewise. - -Sun Mar 25 15:01:40 CEST 2001 Jan Hubicka - - * i386.md (ashldi3, ashrdi3, lshrdi3): Change predicates to - shiftdi_operand; - use ix86_expand_binary_operator - (?sh??i_?): Disable for 64bit. - * i386.h (PREDICATE_CODES): Add shiftdi_operand. - * i386.c (shiftdi_operand): New predicate. - - * (ashldi3_1_rex64, ashldi3_cmp_rex64, ashlsi3_1_zext, ashlsi3_cmp_zext, - ashrdi3_63_rex64, ashrdi3_1_one_bit_rex64, ashrdi3_1_rex64, - ashrdi3_one_bit_cmp_rex64, ashrdi3_cmp_rex64, ashrsi3_31_zext, - ashrsi3_1_one_bit_zext, ashrsi3_1_zext, ashrsi3_one_bit_cmp_zext, - ashrsi3_cmp_zext, lshrdi3_1_one_bit_rex64, lshrdi3_1_rex64, - lshrdi3_cmp_one_bit_rex64, lshrdi3_cmp_rex64, lshrsi3_1_one_bit_zext, - lshrsi3_1_zext, lshrsi3_cmp_one_bit_zext, lshrsi3_cmp_zext, - rotlsi3_1_one_bit_rex64, rotldi3_1_rex64, - rotlsi3_1_one_bit_zext, rotlsi3_1_zext, rotrdi3_1_one_bit_rex64, - rotrdi3_1_rex64, rotrsi3_1_one_bit_zext, rotrsi3_1_zext): New patterns. - (rotldi3, rotrdi3): New expanders. - -Sun Mar 25 14:25:33 CEST 2001 Jan Hubicka - - * i386.md (movstrsi): Move offline. - (movstrdi): New. - (strmovdi_rex64): New. - (strmov?i): Accept 64bit. - (strmov?i_rex64): New. - (strmov?i_rex_1): New. - (strmov?i_1): Disable for 64bit. - (rep_mov?i_rex64): New. - (rep_mov?i): Disable for 64bit. - (clrstrsi): Move offline. - (strset?i_rex64): New. - (strset?i: Accept 64bit. - (rep_stos?i): Disable for 64bit. - (rep_stos?i_rex64): New. - (strset?i_rex_1): New. - (strset?i_1): Disable for 64bit. - (cmpstrsi): Accept 64bit. - (cmpstrsi_nz_1): Rename to cmpstrqi_nz_1; Disable for 64bit. - (cmpstrqi_nz_rex_1): New. - (cmpstrsi_1): Rename to cmpstrqi_1; Disable for 64bit. - (strlensi): Move offline. - (strlendi): New. - (strlenqi_1): Disable for 64bit; fix constraints. - (strlenqi_rex_1): New. - * i386.c (ix86_adjust_counter): New static function. - (ix86_zero_extend_to_Pmode): Likewise. - (ix86_expand_aligntest): Likweise. - (ix86_expand_strlensi_unroll_1): Make static; update for 64bit. - (ix86_expand_movstr): New global function. - (ix86_expand_clrstr): New global function. - (ix86_expand_strlen): New global function. - * i386-protos.h (ix86_expand_movstr, ix86_expand_clrstr, - ix86_expand_strlen): Declare. - (ix86_expand_strlensi_unroll_1): Delete. - -Sat Mar 24 23:15:19 CET 2001 Jan Hubicka - - * i386.md (cmpdi): Fix operand predicates. - (cmpdi_ccno_1_rex64, cmpdi_minus_1_rex64, cmpdi_1_rex64, - cmpdi_1_insn_rex64): New patterns. - (adddi3): Turn to expander. - (adddi3_1, adddi3_carry_rex64, adddi3_cc_rex64): New patterns. - (addsi3_carry_zext): New pattern. - (adddi_?_rex64): New patterns and splitters. - (addsi_?_zext): New patterns. - (subsi3_carry_zext): New pattern. - (subdi_?_rex64): New patterns and splitters. - (iorsi_?_zext): New patterns. - (iordi_?_rex64): New patterns and splitters. - (iorsi_?_zext): New patterns. - (iorsi_?_zext_imm): New patterns. - (xorsi_?_zext): New patterns. - (xordi_?_rex64): New patterns and splitters. - (xorsi_?_zext): New patterns. - (negdi*): New patterns. - (one_cmpldi*): Likewise. - (one_cmplsi*_zext, negsi*_zext): Likewise. - (testqi_ext_3_rex64): New pattern. - -Sat Mar 24 21:13:28 CET 2001 Jan Hubicka - - * i386-protos.h (ix86_split_long_move): Return void. - * i386.c (ix86_split_to_parts): Handle 64bit target. - (ix86_split_long_move): Likewise. - * i386.md (all calls to ix86_split_long_move): Update. - -2001-03-23 Richard Henderson - - * config/mips/iris4.h (ASM_OUTPUT_ASCII): Rename local variables - to avoid shadowing arguments. - -2001-03-23 Jakub Jelinek - - * varasm.c (make_decl_rtl): Don't append var_labelno discriminator - to variable names where DECL_NAME is different from - DECL_ASSEMBLER_NAME. - -2001-03-23 Jim Wilson - - * varasm.c (make_decl_rtl): Add TREE_PUBLIC check to abort test. - (assemble_alias): Call make_decl_rtl. - -Fri Mar 23 16:59:08 2001 J"orn Rennecke - - * stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type. - -2001-03-23 Bryce McKinlay - - * extend.texi: Document the "java_interface" attribute. - -2001-03-22 Zack Weinberg - - * mkconfig.sh: Use a subshell with redirected stdout, - instead of closing stdout and confusing commands that run - afterward. Throw away output of cmp. - -2001-03-22 Gordon Sadler - - * Makefile.in (stage1_build): Pass CFLAGS to stage1_build. - -Thu Mar 22 22:15:59 CET 2001 Jan Hubicka - - * i386.md (zero_extendsidi2_32): Break out from ... - (zero_extendsidi2): ... here ; turn to expander. - (zero_extendsidi2_rex64): New. - (extendsidi2_32): Break out from ... - (extendsidi2): ... here ; turn to expander. - (extendsidi2_rex64): New. - (zero_extendhidi2, zero_extendqidi2, extendhidi2, extendqidi2): New. - (trunc?f?f splitters): Add 64bit versions. - -Thu Mar 22 21:41:16 CET 2001 Jan Hubicka - - * i386.md (pushsi, pushsi2_prologue): Disable. - (pushsi2_rex64): New. - (movabs?i_1_rex64, movabs?i_2_rex64): New. - (movqi_ext_1): Disable for 64bit. - (movqi_ext_1_rex64): New. - (pushdi2_rex64): New pattern, peep2s and splitter. - (pushdi2_prologue_rex64): New pattern. - (popdi1_epilogue_rex64, popdi1, movdi_xor_rex64, movdi_or_rex64): - Likewise. - (movdi splitters): Disable for 64bit. - (movdi_1_rex64): New pattern, peep2s and splitters. - (swapdi): New pattern. - (pushsf): Disable for 64bit. - (pushsf_rex64): New pattern and splitter. - (pushdf_nointeger): Disable for 64bit. - (pushdf_integer): Handle the 64bit case. - (pushtf): Likewise; update splitters. - -2001-03-22 Richard Henderson - - * mkconfig.sh: Include insn-flags.h. - * Makefile.in (CONFIG_H): Include insn-flags.h. - (lots of objects): Remove insn-codes.h and insn-flags.h. - - * alias.c, bb-reorder.c, calls.c, do-loop.c, flow.c, haifa-sched.c, - integrate.c, jump.c, loop.c, predict.c, profile.c, reg-stack.c, - regmove.c, reorg.c, a29k/a29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c, - avr/avr.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c, - dsp16xx/dsp16xx.c, fr30/fr30.c, h8300/h8300.c, i370/i370.c, - i386/i386.c, i860/i860.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c, - m68k/m68k.c, m88k/m88k.c, mcore/mcore.c, mn10200/mn10200.c, - mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c, - pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c, - v850/v850.c, vax/vax.c: - Don't include insn-flags.h. - - * diagnostic.c, expr.h, reload.c, toplev.c: - Don't include insn-codes.h. - - * builtins.c, combine.c, except.c, explow.c, expmed.c, expr.c, - final.c, function.c, optabs.c, recog.c, reload1.c, stmt.c, - c4x/c4x.c, i960/i960.c, mips/mips.c: - Don't include insn-codes.h or insn-flags.h. - - * genemit.c, genopinit.c, genoutput.c: Don't include insn-codes.h - or insn-flags.h in the generated code. - * genflags.c (gen_proto): Use "struct rtx_def *" instead of "rtx". - (main): Forward declare struct rtx_def. - -2001-03-22 Joseph S. Myers - - * invoke.texi (-ffast-math): Remove duplicate line about - __FAST_MATH__. - - * gcc.texi: Remove more obsolete documentation of bugs and - installation problems. - -2001-03-21 Kazu Hirata - - * config/h8300/h8300.md (movsi_h8300hs): Split the 2nd alternative - into two parts. - -2001-03-20 Jason Merrill - - * collect2.c (is_ctor_dtor): Always use '_' in the file fn names, - not '.' or '$'. - * tree.c (FILE_FUNCTION_FORMAT): Likewise. - * varasm.c (CHKR_PREFIX): Likewise. - -Wed Mar 21 14:27:11 2001 Richard Kenner - - * gcse.c (hash_scan_set): An expression is not anticipatible if it - is part of a multi-SET insn. - - * cse.c (find_comparison_args): Remove previous change. - * ifcvt.c (noce_process_if_block): When moving an insn, remove any - REG_EQUAL notes. - - * config/i386/i386.md (conditional_trap): Remove warning. - - * recog.c (push_operand): Fix error in last change that caused - undefined symbol on many targets. - - * sdbout.c: #include ggc.h. - (sdbout_init): Move to end of file. - Call ggc_add_tree_root for anonymous_types. - (sdbout_symbol): Use DECL_NAME for local, not DECL_ASSEMBLER_NAME. - (sdbout_one_type): Use DECL_NAME for field name. - * Makefile.in (sdbout.o): Show includes ggc.h. - -Wed Mar 21 20:33:26 CET 2001 Jan Hubicka - - * i386.c (override_options): Default ix86_regparm to REGPARM_MAX. - (override_options): Use properlimits for preferred_stack_boundary. - (ix86_valid_type_attribute_p): Disable stdcall and cdecl attributes - on x86_64. - (ext_register_operand): Accept DImode. - (load_pic_register): Abort on 64bit. - (gen_push): Use Pmode instead of SImode. - (ix86_save_reg): Pic reg is never used on 64bit. - (ix86_expand_prologue): Likewise. - (ix86_emit_save_regs): Use Pmode instead of SImode. - (legitimate_address_p): Check displacement for 64bit. - (print_operand): Avoid outputting of (%rip) on 64bit. - (print_operand_address): Output (%rip) where possible. - (split_di): Abort on 64bit registers. - (ix86_expand_branch): DImode comparison is simple for x86_64. - (memory_address_length): Recognize memory addresses formed using - PRE/POST modify. - (ix86_data_alignment, ix86_local_alignment): Align arrays to 16 bytes - for x86_64. - * i386.h (TARGET_USE_SAHF): Disable for 64bit. - -Wed Mar 21 18:51:19 CET 2001 Jan Hubicka - - * recog.c (push_operand): Recognize new format of push instructions. - -Wed Mar 21 10:53:57 CET 2001 Jan Hubicka - - * i386.md (pushqi1): New. - * i386-protos.h (x86_64_general_operand, x86_64_szext_general_operand, - x86_64_nonmemory_operand, x86_64_szext_nonmemory_operand, - x86_64_immediate_operand, x86_64_immediate_operand, - x86_64_zext_immediate_operand): Declare. - * i386.c (x86_64_general_operand, x86_64_szext_general_operand, - x86_64_nonmemory_operand, x86_64_szext_nonmemory_operand, - x86_64_immediate_operand, x86_64_immediate_operand, - x86_64_zext_immediate_operand): define. - * i386.h (PREDICATE_CODES): Add new predicates. - -Wed Mar 21 10:25:13 CET 2001 Jan Hubicka - - * i386.md (pophi1, popqi1, pushqi1): Remove. - - * expr.c (emit_single_push_insn): New function. - (move_by_pieces): Accept NULL as destination for push instructions. - (gen_push_operand): Kill. - (emit_push_insn): Pass NULL when pushing; avoid updating of - stack_pointer_delta. - * expr.h (gen_push_operand): Kill. - -Tue Mar 20 20:15:06 2001 Richard Kenner - - * rtl.texi (COMPARE): Clarify documentation and reference section - on comparisons. - -2001-03-20 Stan Shebs - - * objc/objc-act.c (get_static_reference): Use NULL_TREE. - (get_object_reference): Ditto. - (error_with_ivar): Use error_with_file_and_line. - (warn_with_method): Use warning_with_file_and_line. - -2001-03-20 Tom Tromey - - * libgcc-std.ver: Added __fixunssfsi and __fixunsdfsi. - -2001-03-20 Mark Mitchell - - * tree.c (set_decl_assembler_name): Set DECL_ASSEMBLER_NAME for - variables that are TREE_PUBLIC, even if not TREE_STATIC. - -2001-03-20 DJ Delorie - - * Makefile.in (install-libgcc): Pass complete list of variables. - (install-multilib): Ditto. - -2001-03-20 David Billinghurst - - * config/i386/cygwin.h: Declare ctor_section, dtor_section - drectve_section, switch_to_section. - - * winnt.c: Declare functions associated_type, gen_stdcall_suffix, - i386_pe_dllexport_p, i386_pe_dllimport_p, i386_pe_mark_dllexport, - i386_pe_mark_dllimport. - -2001-03-20 David Billinghurst - - * config/i386/cygwin.h: Include Declare and constify - functions i386_pe_*. - - * config/i386/winnt.c: Include "tm_p.h" and "toplev.h" Constify - i386_pe_* functions with char * arguments. - -2001-03-20 Alexandre Oliva - - * config/sh/sh.md (movsf_ie): Fix output patterns for fpul load - and store. - (movsi_ie): Introduce fpul store. - -2001-03-20 Alan Modra - - * Makefile.in (OBJS): Remove hashtab.o. - -2001-03-19 Stan Shebs - - * objc/objc-act.c (maybe_objc_method_name): Remove, never called. - * c-lang.c (maybe_objc_method_name): Ditto. - * c-tree.h (maybe_objc_method_name): Remove decl. - -2001-03-19 Tom Tromey - - * gcc.c (init_gcc_specs): Fix comment. - -2001-03-19 Mark Mitchell - - Compute DECL_ASSEMBLER_NAME lazily. - * tree.h (DECL_ASSEMBLER_NAME): Compute it lazily. - (DECL_ASSEMBLER_NAME_SET_P): New macro. - (SET_DECL_ASSEMBLER_NAME): Likewise. - (COPY_DECL_ASSEMBLER_NAME): Likewise. - (set_decl_assembler_name): Declare. - (lang_set_decl_assembler_name): Likewise. - * tree.c (lang_set_decl_assembler_name): New variab.e - (set_decl_assembler_name): New function. - (init_obstacks): Set lang_set_decl_assembler_name. - (build_decl): Don't set DECL_ASSEMBLER_NAME. - * c-decl.c (duplicate_decls): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (builtin_function): Likewise. - (finish_decl): Likewise. - * dbxout.c (dbxout_type_methods): Likewise. - * ggc-common.c (ggc_mark_trees): Likewise. - * profile.c (output_func_start_profiler): Likewise. - * varasm.c (make_decl_rtl): Likewise. - - * cse.c (find_comparison_args): Update documentation. Fix - mishandling of COMPARE operations. - - * tree.def (ABS_EXPR): Add documentation. - * fold-const.c (fold): Improve folding of ABS_EXPRs. - -2001-03-19 Zack Weinberg - - * Makefile.in (hash.o): Depend on $(GCONFIG_H), not $(CONFIG_H). - -2001-03-19 Jakub Jelinek - - * crtstuff.c (init_dummy): Use CRT_END_INIT_DUMMY if defined. - Remove ia32 linux PIC kludge and move it... - * config/i386/linux.h (CRT_END_INIT_DUMMY): ...here. - -Mon Mar 19 18:53:54 CET 2001 Jan Hubicka - - * i386.md (absdf2 expander): Fix 64bit case. - -2001-03-19 Brad Lucier - - * Makefile.in: Have splay-tree.o depend on $(GCONFIG_H). - -2001-03-16 Andrew Haley - - * config/ia64/libgcc-ia64.ver: Add __ia64_backtrace. - -2001-03-19 Gerald Pfeifer - - * README.X11: Remove obsolete file. - -2001-03-18 Anthony Green - - * config/pj/pj.h: Remove some trailing commas. - (ASM_SPEC): Use -EB and -EL, not -mb and -ml. - -2001-03-18 Richard Henderson - - * defaults.h (ACCUMULATE_OUTGOING_ARGS, PUSH_ARGS): Move from ... - * calls.c: ... here. - * combine.c, expr.c, final.c, function.c toplev.c: Don't provide - defaults for them here. - -2001-03-17 Anthony Green - - * config/pj/lib1funcs.S: Fix broken comment. - * config/pj/pj.h (LOCAL_LABEL_PREFIX): Prefix internal - labels with '.'. - -2001-03-18 Joseph S. Myers - - * gcc.texi: Remove obsolete information relating to build and - installation problems with enquire or the Pyramid C compiler. - -2001-03-17 Richard Henderson - - * dwarf2out.c (queue_reg_save): New. - (flush_queued_reg_saves, clobbers_queued_reg_save): New. - (dwarf2out_frame_debug_expr): Call queue_reg_save instead of - dwarf2out_reg_save. - (dwarf2out_frame_debug): Call flush_queued_reg_saves when needed. - (cfa, cfa_store, cfa_temp): Make static. - * final.c (final_scan_insn): Always call dwarf2out_frame_debug. - -2001-03-17 Richard Henderson - - * integrate.h (struct inline_remap): Add local_return_label. - * integrate.c (expand_inline_function): Initialize it and emit - it after copy_insn_notes. - (copy_insn_list): Don't store local_return_label here. - (copy_insn_notes): New function split out from copy_insn_list. - -2001-03-17 Richard Henderson - - * dwarf2out.c (lookup_filename): Emit .file if the assembler - is generating .debug_line. - (dwarf2out_init): Add main_input_filename to the file table first. - * configure.in (as_dwarf2_debug_line): Test with file number 1 - instead of file number 0. - -Sat Mar 17 11:52:34 2001 Richard Kenner - - * combine.c (undobuf): Remove field previous_undos; all refs deleted. - (gen_rtx_combine): Deleted; all references changed as appropriate. - (gen_unary): Deleted; all refs changed to call simplify_gen_unary. - - * print-tree.c (print_node): Print DECL_NONADDRESSABLE_P. - -2001-03-17 David Billinghurst - - * config/i386/xm-cygwin.h: Include - - * config/ia64/ia64.c (ia64_compute_frame_size): If reg_fp is zero, - then set it to LOC_REG (79) instead of aborting. - -2001-03-16 Phil Edwards - - * gccbug.in: Remove high priority. - -2001-03-16 Richard Henerson - - * aclocal.m4 (gcc_AC_EXAMINE_OBJECT): Substitute leading od - output with a space instead of deleting it. - * configure: Regenerate. - -2001-03-16 Zack Weinberg - - * aclocal.m4 (gcc_AC_EXAMINE_OBJECT): New utility macro which - handles the gory details of converting an object file into - something that's safe to grep. - (gcc_AC_C_COMPILE_BIGENDIAN): Rename to - gcc_AC_C_COMPILE_ENDIAN. Use gcc_AC_EXAMINE_OBJECT. Put - newlines at either end of the string we're looking for. - Make 'checking ...' message less stilted. - (gcc_AC_C_FLOAT_FORMAT): Use gcc_AC_EXAMINE_OBJECT. Handle - ARM in-memory layout and its hypothetical converse. Don't - define HOST_FLOAT_WORDS_BIG_ENDIAN unless it's different from - HOST_WORDS_BIG_ENDIAN. - - * configure.in: Adjust for renamed macro. Move - gcc_AC_C_FLOAT_FORMAT below gcc_AC_C_COMPILE_ENDIAN. - * configure, config.in: Regenerate. - -2001-03-16 Laurynas Biveinis - - * fixinc/Makefile.in: Set SHELL. - -2001-03-16 Laurynas Biveinis - - * fixinc/fixincl.c (fix_with_system): Quote file names before - passing them to shell. - -2001-03-16 Laurynas Biveinis - - * Makefile.in: Use fix-header$(build_exeext) instead - of fix-header. - -2001-03-16 Richard Henderson - - * dwarf2out.c: Revert most of 2000-11-25 and 2001-01-24 changes. - (LN_PROLOG_AS_LABEL, LN_PROLOG_END_LABEL): New. - (size_of_line_prolog): Remove. - (output_line_info): Compute prologue size via label difference. - (lookup_filename): Return "unspecified" for and . - - * configure.in (HAVE_AS_DWARF2_DEBUG_LINE): Require that the - assembler error when redefining file numbers. - * config.in, configure: Rebuild. - - * dwarf2asm.c (dw2_asm_output_data): Mask data to the output size. - (dw2_asm_output_data_uleb128): Use space not tab after .uleb128. - (dw2_asm_output_delta_uleb128): Likewise. - (dw2_asm_output_delta_sleb128): Similarly. - (dw2_asm_output_data_sleb128): Similarly. Print number in decimal. - -2001-03-16 Michael Meissner - - * mips.h (BITMASK_HIGH): Replacement for 0x80000000 that avoids - warnings. - (BITMASK_UPPER16): Replacement for 0xffff0000 that avoids - warnings. - (BITMASK_LOWER16): Replacement for 0x0000ffff. - - * mips.c (save_restore_insns): Use BITMASK_UPPER16/BITMASK_LOWER16 - instead of 0xffff0000/0x0000ffff to avoid warnings about constants - being unsigned in ISO C and signed in traditional. - (expand_prologue): Ditto. - (RA_MASK): Use BITMASK_HIGH to avoid warnings. - - * mips.md (divmodsi4,divmodsi4): Use BITMASK_HIGH to avoid - warnings. - (divsi3,divdi3): Ditto. - (modsi3,moddi3): Ditto. - (fix_truncdfsi2,fix_truncdfdi2): Ditto. - (fix_truncsfsi2,fix_truncsfdi2): Ditto. - (movsi split): Use BITMASK_UPPER16/BITMASK_LOWER16 to avoid - warnings. - -Fri Mar 16 14:47:57 CET 2001 Jan Hubicka - - * i386.c (ix86_expand_fp_movcc): Do not attempt to construct - SSE based conditional moves on LTGT/UNEQ conditions; - Canonicalize EQ to NE. - * i386.md (sse_mov?fcc): Disallow EQ and NE in IEEE mode. - (sse_mov?fcc_ne): New. - - * i386-protos.h (sign_extended_value, zero_extended_value): Declare. - -2001-03-16 Alexandre Oliva - - * config/sh/sh.c (sh_expand_prologue): Insns that set up the PIC - register may be dead. - -2001-03-16 Brad Lucier - - * Makefile.in (hash.o): Depend on CONFIG_H. - -2001-03-15 Mark Mitchell - - * dwarf2out.c (rtl_for_decl_location): Use DECL_RTL_IF_SET. - -2001-03-15 Richard Henderson - - * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): New. - (ASM_OUTPUT_DWARF_PCREL): New. - * config/ia64/hpux.h (ASM_OUTPUT_DWARF_OFFSET): Remove. - -2001-03-16 Alexandre Oliva - - * cppfiles.c (stack_include_file): Use MAX of sysp. - -2001-03-15 Steve Ellcey - - * config.gcc (ia64*-*-hpux*): New case. - * config/ia64/hpux.h: New file for HP-UX support. - * config/ia64/t-hpux: New file for HP-UX support. - -2001-03-16 Bruce Korb , Alexandre Oliva - - * fixinc/inclhack.def (irix_stdio_va_list): New. - * fixinc/fixincl.x: Rebuilt. - -2001-03-15 Richard Henderson - - * dwarf2asm.c (dw2_asm_output_offset): Use ASM_OUTPUT_DWARF_OFFSET - if provided by the target. - (dw2_asm_output_pcrel): Likewise with ASM_OUTPUT_DWARF_PCREL. - (dw2_asm_output_addr): New. - * dwarf2asm.h (dw2_asm_output_addr): Declare. - * dwarf2out.c (output_cfi): Use it for program addresses. - (output_call_frame_info, output_die): Likewise. - (output_aranges, output_line_info): Likewise. - -2001-03-15 Bruce Korb - - * gcc.c(main): make more rigorous - * collect2.c(main): guard against ignoring SIGCHLD - * protoize.c(main): ditto - * gcc/fixinc/fixincl.c(initialize): ditto - -2001-03-15 Mark Mitchell - - * sdbout.c (sdbout_symbol): Use DECL_RTL_SET_P, SET_DECL_RTL. - (sdbout_parms): Likewise. - -Thu Mar 15 12:57:14 2001 Jeffrey A Law (law@cygnus.com) - - * reload1.c (reload_cse_simplify_set): For LOAD_EXTEND_OP, do not - "widen" a destination that is already wider than a word. Also do - not widen if LOAD_EXTEND_OP is NIL for the given mode. - -2001-03-15 Bernd Schmidt - - * config/ia64/ia64.c (ia64_sched_reorder): Remove debugging aids. - -Thu Mar 15 11:30:31 EST 2001 John Wehle (john@feith.com) - - * i960.h (ROUND_TYPE_SIZE_UNIT): Fix typo. - -Thu Mar 15 11:24:29 EST 2001 John Wehle (john@feith.com) - - * i960.h (i960_maxbitalignment, - i960_last_maxbitalignment): Declare. - * i960.c (i960_maxbitalignment, - i960_last_maxbitalignment): Make global. - (process_pragma): Delete. - (i960_pr_align, i960_pr_noalign): Move from here ... - * i960-c.c: ... to this new file. - * t-960bare (i960-c.o): New rule. - * t-vxworks960 (i960-c.o): Likewise. - * config.gcc (i960-*-*): Define c_target_objs and - cxx_target_objs. - -2001-03-15 Bernd Schmidt - - * cselib.c (hash_rtx): For REG and MEM, just use value of expression - without adding in rtx code and mode. - - * alias.c (init_alias_analysis): Don't use any rtx whose value - varies as a known value. - Delete a superfluous test. - - * config/ia64/ia64.c (maybe_rotate): New function, broken out of - ia64_sched_reorder. - (ia64_sched_reorder): Call maybe_rotate; also rotate after - scheduling a stop bit. - (ia64_emit_nops): Correctly handle ASMs. - -2001-03-15 Mark Mitchell - - * varasm.c (assemble_variable): Use DECL_RTL_SET_P. - -2001-03-15 Neil Booth - - * cpp.texi: Update documentation for -include and -imacros. - * cppfiles.c (struct include_file): Remove "defined" memeber. - (find_or_create_entry): Make a copy of the file name, and - simplify it. - (open_file): Update to ensure we use the simplified filename. - (stack_include_file): Don't set search_from. - (cpp_included): Don't simplify the path name here. - (find_include_file): New prototype. Call search_from to - get the start of the "" include chain. Don't simplify the - filenames here. - (_cpp_execute_include): New prototype. Move diagnostics to - do_include_common. Update. - (_cpp_pop_file_buffer): Don't set defined. - (search_from): New prototype. Use the preprocessor's cwd - for files included from the command line. - (read_name_map): Don't simplify the pathname here. - * cpphash.h (enum include_type): New. - (struct buffer): Delete search from. New search_cached. - (_cpp_execute_include): Update prototype. - * cppinit.c (do_includes): Use _cpp_execute_include. - * cpplib.c (do_include_common): New function. - (do_include, do_include_next, do_import): Use it. - -2001-03-14 Mark Mitchell - - * varasm.c (assemble_alias): Use DECL_ASSEMBLER_NAME, not the - contents of the RTL, to determine the name of the object. - -2001-03-14 Mark Mitchell - - * tree.h (DECL_RTL): Allocate RTL lazily. - (SET_DECL_RTL): New macro. - (DECL_RTL_SET_P): Likewise. - (COPY_DECL_RTL): Likewise. - (DECL_RTL_IF_SET): Likewise. - * varasm.c (make_decl_rtl): Add assertions about the kind of - declaration we are processing. - * c-decl.c (duplicate_decls): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. - (start_decl): Likewise. - (finish_decl): Likewise. - * c-semantics.c (emit_local_var): Likewise. - * calls.c (expand_call): Likewise. - * dbxout.c (dbxout_symbol): Likewise. - * emit-rtl.c (unshare_all_rtl): Likewise. - (unshare_all_decls): Likewise. - (reset_used_decls): Likewise. - * expr.c (store_constructor): Likewise. - (safe_from_p): Likewise. - (expand_expr): Likewise. - * function.c (put_var_into_stack): Likewise. - (instantiate_decls_1): Likewise. - (assign_parms): Likewise. - (expand_function_start): Likewise. - (expand_function_end): Likewise. - * ggc-common.c (gcc_mark_trees): Likewise. - * integrate.c (function_cannot_inline_p): Likewise. - (copy_decl_for_inlining): Likewise. - (expand_inline_function): Likewise. - (integrate_parm_decls): Likewise. - (integrate_decl_tree): Likewise. - * print-tree.c (print_node): Likewise. - * reg-stack.c (stack_result): Likewise. - * stmt.c (label_rtx): Likewise. - (expand_return): Likewise. - (expand_decl): Likewise. - (expand_decl_cleanup): Likewise. - (expand_anon_union_decl): Likewise. - * toplev.c (check_global_declarations): Likewise. - (rest_of_decl_compilation): Likewise. - * tree.c (simple_cst_equal): Likewise. - * objc/objc-act.c (generate_static_references): Likewise. - -2001-03-14 Zack Weinberg - - * aclocal.m4 (gcc_AC_C_CHARSET, gcc_AC_C_COMPILE_BIGENDIAN, - gcc_AC_C_FLOAT_FORMAT): New macros. - * configure.in: Add AC_PROG_CPP after CC tests; - gcc_AC_C_CHARSET and gcc_AC_C_FLOAT_FORMAT after the sizeof - tests; and gcc_AC_C_COMPILE_BIGENDIAN after gcc_AC_C_CHAR_BIT. - * configure, config.in: Regenerate. - - * config/a29k/xm-a29k.h, config/arc/xm-arc.h, - config/arm/xm-arm.h, config/c4x/xm-c4x.h, - config/convex/xm-convex.h, config/d30v/xm-d30v.h, - config/i370/xm-linux.h, config/i370/xm-oe.h, - config/ia64/xm-ia64.h, config/m32r/xm-m32r.h, - config/m68k/xm-m68k.h, config/mips/xm-mips.h, - config/pa/xm-linux.h, config/pa/xm-pa.h, - config/rs6000/xm-lynx.h, config/rs6000/xm-mach.h, - config/rs6000/xm-rs6000.h, config/rs6000/xm-sysv4.h, - config/sparc/xm-sparc.h, config/vax/xm-vax.h, - config/we32k/xm-we32k.h: Delete. - - * config/i370/xm-mvs.h, config/m88k/m88k.h, - config/romp/xm-romp.h, config/rs6000/xm-beos.h, - config/vax/xm-vms.h: Don't define any of: - HOST_FLOAT_FORMAT, HOST_EBCDIC, HOST_WORDS_BIG_ENDIAN - - * config/rs6000/aix.h: Define COLLECT_EXPORT_LIST here. - - * config.gcc: Remove references to deleted files. - (i370-*-opened*): Use i370/xm-mvs.h (which now defines only - FATAL_EXIT_CODE, which is the same between oe and mvs). - -2001-03-14 DJ Delorie - Vladimir Makarov - - * config/i960/i960.c (i960_function_prologue): Compute size of - frame according to number of registers actually saved there. - -2001-03-14 Richard Henderson - - * expr.c (emit_move_insn_1): Fix else if around #endif. - -Wed Mar 14 22:39:12 CET 2001 Jan Hubicka - Vojtech Pavlik - - * md.texi (machine constraints): Document 'Q', 'R', 'e' and 'Z' - constraints. - -Wed Mar 14 22:26:10 CET 2001 Jan Hubicka - - * i386.c (ix86_cmodel_string, ix86_cmodel): Define. - (override_options): Parse cmodel string. - (x86_64_sign_extended_value, x86_64_zero_extended_value): New. - * i386.h (TARGET_OPTIONS): Add "cmodel". - (EXTRA_CONSTRAINT): Recognize 'e' and 'Z'. - (enum cmodel): New. - (ix86_cmodel_string, ix86_cmodel): Declare. - -Wed Mar 14 22:26:54 CET 2001 Jan Hubicka - - Spot by Matt Kraai: - * i386.h (GENERAL_REG_P): Add missing REG_P. - -2001-03-14 Laurynas Biveinis - - * configure.in: Use $gcc_cv_as instead of $as. - * configure: Regenerated. - -2001-03-14 Neil Booth - - * cppfiles.c (stack_include_file): Only increase the include - count if we actually process the file properly, as opposed - to treating it as length zero. Only call read_include_file - if not DO_NOT_REREAD. Handle the -H include file output - here. - (read_include_file): Remove now redundant DO_NOT_REREAD check. - (cpp_included, find_include_file): Simplify pathnames after - remapping them. If remapping, don't use the remapped file - name's buffer as our scratch buffer. - (cpp_pop_file_buffer): Replace the multiple include macro - only if it isn't yet set. - (read_name_map): Simplify remapped names when reading in. - (remap_filename): Move code to code path that uses it. - (_cpp_simplify_pathname): Return the input pointer. - * cpphash.h (_cpp_simplify_pathname): Update prototype. - -2001-03-14 Mark Mitchell - - * expr.c (expand_expr): Revove bogus conditional. - -Wed Mar 14 19:29:50 CET 2001 Jan Hubicka - - * expr.c (emit_move_insn_1): Guard PUSH_ROUNDING use by ifdef. - -2001-03-14 Jakub Jelinek - - * reg-stack.c (stack_result): Unconditionally use - FUNCTION_OUTGOING_VALUE resp. FUNCTION_VALUE. - -Wed Mar 14 16:36:25 CET 2001 Jan Hubicka - - * expr.c (emit_move_insn_1): Split push of complex value when - no suitable push instruction exist. - - * i386.md (QImode move/add/shift patterns): Use ANY_QI_REG_P - instead of QI_REG_P. - -Tue Mar 13 22:22:04 2001 Richard Kenner - - * alias.c (handled_component_p, can_address_p): New functions. - (get_alias_set): Use them. - -2001-03-13 Jim Wilson - - * config/ia64/ia64.c (find_gr_spill): Subtract frame_pointer_needed - from 80 in try_locals code. - (ia64_expand_prologue): Add comment pointing to find_gr_spill change. - -2001-03-13 Zack Weinberg - - * aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF, gcc_AC_C_CHAR_BIT, - gcc_AC_C_LONG_LONG): New. - * configure.in: Use them. Probe the size of short, int, long, - and long long/__int64 if we have them. Move all the AC_C_* - checks together, except gcc_AC_C_CHAR_BIT which has to go - after AC_CHECK_HEADERS(limits.h). - Take hwint.h out of host_xm_file and build_xm_file. - - * hwint.h: Unconditionally define HOST_BITS_PER_CHAR, - HOST_BITS_PER_SHORT, HOST_BITS_PER_INT, HOST_BITS_PER_LONG, - and HOST_BITS_PER_LONGLONG in terms of SIZEOF_* and CHAR_BIT. - Move the HOST_WIDEST_INT setup logic here from system.h. - Provide HOST_WIDEST_INT even if HOST_BITS_PER_LONGLONG is not - defined. - * system.h: Include hwint.h after limits.h. HOST_WIDEST_INT - is now handled by hwint.h. - - * config/alpha/xm-alpha-interix.h, config/alpha/xm-vms.h, - config/c4x/xm-c4x.h, config/i370/xm-oe.h, - config/ia64/xm-ia64.h: Don't define any of: - HOST_BITS_PER_LONG, HOST_BITS_PER_CHAR, HOST_BITS_PER_SHORT, - HOST_BITS_PER_LONGLONG. - - * config/alpha/xm-alpha.h, config/dsp16xx/xm-dsp16xx.h, - config/h8300/xm-h8300.h, config/mips/iris6.h, - config/mn10200/xm-mn10200.h, config/pa/xm-pa64hpux.h, - config/sparc/xm-sp64.h: Delete. - * config.gcc: Remove references to deleted files. - - * config/arm/xm-arm.h, config/mips/xm-mips.h: Don't define - HOST_FLOAT_FORMAT to IEEE_FLOAT_FORMAT. - * config/i370/xm-linux.h: Clarify floating-point situation in - a comment. - -2001-03-13 Neil Booth - - * cppfiles.c (NO_INCLUDE_PATH): New macro. - (find_include_file): Decide here which part of the include - chain to start the search. Complain about an empty include - chain in all cases apart from an abolsute file name. - (_cpp_execute_include): Don't choose the search chain here. - Don't call handle_missing_include in the case of an empty - include chain. - (_cpp_compare_file_date): Don't choose the search chain here. - * cpplib.c (do_include_next): Move the in-main-file diagnostic - here from _cpp_execute_include. Behave like #include if - we're in the main file. - -2001-03-13 Kaveh R. Ghazi - - * system.h (malloc, realloc, calloc, strdup): Only poison these - tokens when IN_GCC is defined. - -Tue Mar 13 14:38:44 CET 2001 Jan Hubicka - - * i386.md (abs?f expander): Support SSE case. - (abd?f_if): Add new "USE"; add splitters. - -2001-03-13 Kaveh R. Ghazi - - * cpp.texi (poison): Explain the macro expansion exception. - -2001-03-13 Jakub Jelinek - - * expr.c (store_expr): Add dont_store_target. If temp is already in - target before copying to reg, don't store it into target again. - -2001-03-12 Neil Booth - - * cppinternals.texi: Update for file handling. - -2001-03-12 Jeffrey Oldham - - * emit-rtl.c (remove_unnecessary_notes): Reverse Richard Kenner's - 2001-02-24 which broke building the Java library. - * function.c (identify_blocks): Likewise. - (all_blocks): Likewise. - * integrate.c (integrate_decl_tree): Likewise. - * print-tree.c (print_node): Likewise. - * tree.h (BLOCK_NUMBER): Likewise. - (struct tree_block): Likewise. - -2001-03-12 David Edelsohn - - * rs6000/aix51.h (CPP_SPEC, CPLUSPLUS_CPP_SPEC): Fix typo in - __WCHAR_TYPE__ definition. - (WCHAR_TYPE_SIZE): #undef before #define. - -2001-03-12 Neil Booth - - * cppfiles.c: Update comments. - (destroy_include_file_node): Rename destroy_node. - (find_or_create_entry): New function. - (open_file, _cpp_fake_include): Use it. - (handle_missing_header): New function, broken out of - _cpp_execute include. Don't segfault if there is no - system or quoted path. - (_cpp_execute_include): Use handle_missing_header. - -2001-03-12 Jeffrey Oldham - - * jump.c (reversed_comparison_code_parts): Reverse Jan Hubricka's - 2001-02-28 patch because it breaks arm-linux and mips-sgi-irix6.5. - -Mon Mar 12 14:05:32 2001 Richard Kenner - - * flow.c (insn_dead_p): Don't consider two memrefs equivalent - unless anti_dependence says they are. - * alias.c (objects_must_conflict): If neither has a type specified, - they must conflict. - -2001-03-12 Neil Booth - David Billinghurst - - * config/mips/iris5.h: Change WCHAR_TYPE to int. - -Mon Mar 12 16:32:21 CET 2001 Jan Hubicka - - * i386.md (trunctfdf2_2): Rename missnamed pattern. - (*_one_bit): Remove type on the match_operand in attributes. - -Mon Mar 12 16:27:56 CET 2001 Jan Hubicka - - * i386.c: Commit forgotten hunk in previous patch. - (regclass_map): Add extended registers. - (dbx_register_map): Add missing frame register. - -Mon Mar 12 15:41:08 CET 2001 Jan Hubicka - - * i386.md (all XFmode patterns except swapxf): Disable for 64bit. - - * i386.md (x86_sahf_1): Disable for 64bit. - (popsi*, pophi*): Likewise. - (pushqi, pushhi): Likewise. - (movdi, pushdi): Likewise. - (zero extend DImode splitter): Likewise. - (adddi, minusdi splitter): Likewise. - (umulsidi): Likewise. - (umulsi): New. - (mulsidi): Disable for 64bit - (lshift:DI/ashift:DI): Disable for 64bit. - (loop patterns): Likewise. - (call_pop, call_value_pop expanders and patterns): Likewise. - (prologue_get_pc): Likewise. - (leave): Likewise. - (fcmovDI pattern and splitter): Likewise. - (movdfcc_1_rex64): New. - -Mon Mar 12 15:16:36 CET 2001 Jan Hubicka - - * i386.h (VALID_FP_MODE_P): XFmode is invalid on x86_64. - (MODES_TIEABLE_P): QImodes and DImodes are tiable on x86_64. - (HARD_REGNO_CALLER_SAVE_MODE): Save QImodes as QImodes for x86_64. - (STATIC_CHAIN_REGNUM): Set to r10 for x86_64. - (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM for x86_64. - (LIMIT_RELOAD_CLASS): Avoid limiting of QImodes on x86_64. - (SECONDARY_OUTPUT_RELOAD_CLASS): No need to QImodes. - (PUSH_ROUNDING): x86_64 rounds to 64bits. - (CONSTANT_ADDRESS_P): Accept CONST_DOUBLE. - (REGPARM_MAX): Set to 6 for x86_64. - (SSE_REGPARM_MAX): Set to 16 for x86_64. - * i386.c (hard_regno_mode_ok): QImodes can be in all general purpose - registers. - - * (patterns that does use upper halves): Update constraints - 'q' to 'Q' and 'r' to 'R'. - (cmpqi_ext_1): Disable for 64bit. - (cmpqi_ext_3_insn): Likewise. - (movqi_extzv_1): Likewsie. - (addqi_ext_1): Liekwsie - (testqi_ext_1): Liekwsie - (andqi_ext_1): Liekwsie - (xorqi_ext_1): Liekwsie - (cmpqi_ext_1_rex64): New. - (cmpqi_ext_3_insn_rex64): Likewise. - (movqi_extzv_1_rex64): Likewsie. - (addqi_ext_1_rex64): Liekwsie - (testqi_ext_1_rex64): Liekwsie - (andqi_ext_1_rex64): Liekwsie - (xorqi_ext_1_rex64): Liekwsie - -2001-03-11 Zack Weinberg - - * configure.in: Move check for unsigned enumerated bitfields - to macro in aclocal.m4. Disable it for now. - * configure, config.in: Regenerate. - * system.h: Don't do anything with ONLY_INT_FIELDS. Use the - unsigned-int form of ENUM_BITFIELD() unless being compiled by GCC. - * varasm.c (struct rtx_const): Use ENUM_BITFIELD(). Move enum - kind above its first use. - - * config/xm-interix.h, config/alpha/xm-alpha.h, - config/i370/xm-linux.h, config/i386/xm-beos.h, - config/i386/xm-mingw32.h, config/mips/xm-mips.h, - config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, - config/rs6000/xm-beos.h, config/rs6000/xm-sysv4.h, - Don't define ONLY_INT_FIELDS under any circumstances. - - * config/pa/xm-pa.h: Don't define __BSD_NET2__. - - * config/pa/xm-pahpux.h, config/pa/xm-papro.h, - config/sparc/xm-sysv4.h: Delete - now identical with some - other xm header. - * config.gcc (hppa targets): Replace xm-pahpux.h and - xm-papro.h with implicit xm-pa.h. - (sparc targets): Replace xm-sysv4.h with implicit or explicit - xm-sparc.h. - -2001-03-12 Aldy Hernandez - - * reload1.c (reload_cse_simplify): Call reload_cse_simplify_set - before reload_cse_noop_set_p. - -2001-03-11 Zack Weinberg - - * config.gcc: Where xm-host.h used to include another - xm-host.h, list the nested header directly in xm_file. Remove - references to deleted files. Can now use sparc/xm-sp64.h for - sparcv9-*-solaris*. - - * config/xm-linux.h, config/arm/xm-linux.h, - config/i386/xm-dos.h, config/i386/xm-gnu.h, - config/i386/xm-linux.h, config/i386/xm-openbsd.h, - config/i860/xm-fx2800.h, config/m68k/xm-atari.h, - config/m68k/xm-linux.h, config/m68k/xm-sun3.h, - config/sparc/xm-linux.h, config/sparc/xm-sysv4-64.h: - Delete. - - * config/alpha/xm-alpha-interix.h: Don't include alpha/xm-alpha.h. - * config/mips/xm-iris5.h: Don't include mips/xm-mips.h. Don't - bother to wrap #undef in #ifdef. - * config/pa/xm-linux.h, config/rs6000/xm-sysv4.h: - Don't include xm-linux.h. - * config/sparc/xm-sp64.h: Don't include sparc/xm-sparc.h. - - * configure.in: Wrap regexps using [] in changequote block. - Use expr : not echo | grep. Simplify regexps. - * configure: Regenerate. - - 56 xm-files remain, 22 xm-arch. - -2001-03-11 Kaveh R. Ghazi - - * mips-tfile.c: Cast arg to PTR when specifier is HOST_PTR_PRINTF. - (__proto, PTR_T, CPTR_T): Delete, use PARAMS/PTR instead. - (local_index, local_rindex): Delete, use strchr/strrchr instead. - (copy_object): Fix format specifier vs argument mismatch. - - * mips-tdump.c: Make local functions static. - (rindex): Don't #undef. - (__proto, PTR_T, CPTR_T): Delete, use PARAMS/PTR instead. - (fatal, fancy_abort): Delete. - (read_seek): Avoid signed/unsigned compare. - -Sun Mar 11 17:01:41 2001 Richard Kenner - - * combine.c (try_combine): Fix error in change to try original - register. - (gen_rtx_combine): Do same as gen_rtx for now. - -2001-03-11 Zack Weinberg - - * configure.in: AC_SUBST xm_defines. - * configure: Regenerate. - * Makefile.in: Set DEFINES=$(xm_defines) when building - tconfig.h. - -2001-03-11 Neil Booth - - * cppfiles.c (INCLUDE_LEN_FUDGE, ENOMEM): Delete. - (cpp_included, find_include_file): Update. - (_cpp_compare_file_date): Make else unconditional. - -2001-03-10 kaz Kojima - - * config/sh/sh.h (LEGITIMATE_PIC_OPERAND_P): Defined. - -2001-03-10 Toshiyasu Morita - - * config/sh/sh.md (umulhisi3_i, mulhisi3_i): Fix mnemonics. - * config/sh/lib1funcs.asm (mulsi3): Convert mulu to mulu.w. - -Sat Mar 10 22:42:05 2001 Alexandre Oliva - - * tree.c (build_common_tree_nodes_2): Don't copy va_list_type_node - if it's a record type. - -Sat Mar 10 17:52:54 2001 Christopher Faylor - - * config/i386/cygwin.h: Make ../w32api a system directory. Reorganize - mingw includes slightly. - -2001-03-10 Kaveh R. Ghazi - - * system.h (malloc, realloc, calloc, strdup, bzero, bcmp, rindex): - #undef token before poisoning it. - -2001-03-10 Kaveh R. Ghazi - - * alpha.c (check_float_value): Use memcpy, not bcopy. - - * m32r.c (m32r_sched_reorder): Likewise. - - * vax.c (check_float_value): Likewise. - -2001-03-10 Neil Booth - - * toplev.c (file_name_nondirectory): Remove. - * toplev.h: Similarly. - * dwarf2out.c (compute_section_prefix): Use lbasename instead - of file_name_nondirectory. - -Sat Mar 10 10:36:45 2001 Richard Kenner - - * mips-tdump.c (read_seek): Call xmalloc, not malloc. - * mips-tfile.c: Don't #undef rindex; not used. - -Sat Mar 10 14:34:59 CET 2001 Jan Hubicka - - * i386.h (DBX_REGISTER_NUMBER): Return proper values for 64bits. - (dbx64_register_map): Declare. - (RETURN_ADDR_RTX): Fix for 64bit. - (DWARF_FRAME_RETURN_COLUMN): Set to 16 for 64bit. - (INCOMING_FRAME_SP_OFFSET): Set to 8. - * i386.c (dbx64_register_map): New global array. - * beos-elf.h, freebsd.h, i386-interix.h, i386elf.h, - linux.h (DBX_REGISTER_REGNUMBER): Use dbx64_register_map - for 64bits. - -2001-03-10 Neil Booth - - * cppfiles.c (search_from): Use lbasename. - * mkdeps.c (deps_add_default_target): Use lbasename. - -2001-03-09 Kaveh R. Ghazi - - * fixinc/server.c (load_data, run_shell): Use xmalloc, xrealloc & - xcalloc in lieu of malloc, realloc & calloc. - - * gencheck.c (xmalloc): Use really_call_malloc, not malloc. - - * gengenrtl.c (xmalloc): Likewise. - - * gensupport.c (xcalloc, xrealloc, xmalloc): Use the - really_call_* memory allocation routines. - - * stmt.c (check_for_full_enumeration_handling): Use - really_call_calloc, not calloc. - - * system.h (really_call_malloc, really_call_calloc, - really_call_realloc): Define. - (malloc, realloc, calloc, strdup, bzero, bcmp, rindex): Poison. - -Fri Mar 9 18:39:19 2001 Jeffrey A Law (law@cygnus.com) - - * pa.md (builtin_longjmp): Rework slightly to work for PA64 too. - -2001-03-09 Nicola Pero - - * configure: Rebuilt. - * configure.in: Only use `lang_requires' for languages athat are - actually enabled. - -2001-03-09 Joseph S. Myers - - * invoke.texi: Fix typo. - * gcc.1: Regenerate. - -2001-03-09 Zack Weinberg - - * configure.in: Prune nonexistent files from build_xm_file, - xm_file, and host_xm_file lists. Warn unless they're - $cpu/xm-$cpu.h. - Don't generate *config.h here. - AC_SUBST all variables needed to generate *config.h. - * configure: Regenerate. - * mkconfig.sh: New helper script, from code removed from - configure.in. - * Makefile.in: Zap all MALLOC variables - no longer used - anywhere, and malloc.c doesn't exist. - Substitute in variables needed to generate *config.h. - Stop lying about the dependencies contained in CONFIG_H and - GCONFIG_H. - (HCONFIG_H, TCONFIG_H, TM_P_H): New variables. - (config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h, - cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules. - (all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H), - $(TM_P_H), etc. as appropriate. - - * config.gcc: Zap references to deleted files. - * ggc-none.c: Don't include rtl.h or tm_p.h. - - * config/i386/xm-beos.h, config/i386/xm-dgux.h, - config/i386/xm-djgpp.h, config/i386/xm-dos.h, - config/i386/xm-gnu.h, config/i386/xm-i386-interix.h, - config/i386/xm-linux.h, config/i386/xm-linux.h, - config/i386/xm-next.h, config/i386/xm-openbsd.h, - config/i386/xm-sun.h, config/i386/xm-sysv3.h: - Don't include i386/xm-i386.h. - - * config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h, - config/i386/xm-i386.h, config/i860/xm-i860.h, - config/i960/xm-i960.h, config/mcore/xm-mcore.h, - config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, - config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h: - Delete (empty except comments, #includes of other deleted - files, and macros used nowhere). - -Fri Mar 9 20:05:27 CET 2001 Jan Hubicka - - * i386.h (MAX_WCHAR_TYPE_SIZE): New constant to keep tradcpp - independent on TARGET_FLAGS. - -Fri Mar 9 19:52:52 CET 2001 Jan Hubicka - - * i386.h (FIRST_PSEUDO_REGISTER): Set to 53. - - (FIXED_REGISTERS, CALL_USED_REGISTERS, REG_ALLOC_ONES): Add - extended ones. - (CONDITIONAL_REGISTER_USAGE): Set proper values according to - TARGET_64BIT. - (FIRST_REX_INT_REG, LAST_REX_INT_REG, FIRST_REX_SSE_REG, - LAST_REX_SSE_REG): define. - (enum reg_class): Add 'LEGACY_REGS' - (REG_CLASS_CONTENTS): Likewise; add extended registers. - (SSE_REGNO_P): Recognize extended registers. - (ANY_QI_REG_P, REX_INT_REGNO_P, REX_INT_REG_P): New. - (REG_CLASS_FROM_LETTER): Add 'R' and 'Q'. - (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, - REG_OK_FOR_BASE_NONSTRICT_P): Recognize REX registers. - (REG_OK_FOR_STRREG_NONSTRICT_P, REG_OK_FOR_STRREG_STRICT_P, - REG_OK_FOR_STRREG_P): Remove. - (HI_REGISTER_NAMES): Add extended registers. - (ADDITIONAL_REGISTER_NAMES): Likewise. - (QI_REGISTER_NAMES): Add 8bit extended registers. - (DEBUG_REG): Support extended registers. - * i386.c (regclass_map): Add extended registers. - (dbx_register-map): Likewise. - (svr4_dbx_register_map): Likewise. - (print_reg): Support extended registers. - (print_operand): Support 64bit operands. - -Fri Mar 9 19:37:46 CET 2001 Jan Hubicka - - * i386.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Set to 128bit for x86_64 - (BOOL_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, - FLOAT_TYPE_SIZE, LONG_TYPE_SIZE, MAX_LONG_TYPE_SIZE, - DOUBLE_TYPE_SIZE, LONG_LONG_TYPE_SIZE): New constants. - (BITS_PER_WORD, UNITS_PER_WORD, POINTER_SIZE, PARM_BOUNDARY, - STACK_BOUNDARY): Set properly for 64bits. - (MAX_BITS_PER_WORD, MIN_UNITS_PER_WORD): New constants. - (EMPTY_FIELD_BOUNDARY): Define using BITS_PER_WORD. - (BIGGEST_FIELD_ALIGNMENT): Set to 128 for 64bits. - (MOVE_MAX): Set to 16. - (MOVE_MAX_PIECES): 8 for 64bit. - (Pmode): Set to SImode. - -Fri Mar 9 09:00:36 2001 Mike Stump - - * cselib.c (hash_rtx): Ensure that hash isn't zero upon return. - -Fri Mar 9 17:38:08 CET 2001 Jan Hubicka - - * i386.h (mask_64bit): New constant. - (target_64bit): New macro. - (target_options): Add '64'/'32' - (target_default): Define. - * cygwin.h freebsd-aout.h i386-interix.h i386.h i386elf.h isc.h - isccoff.h netbsd.h next.h openbsd.h p sco.h sco5.h scodbx.h sequent.h - unix.h win32.h (TARGET_DEFAULT): Rename to TARGET_SUBTARGET_DEFAULT. - -Thu Mar 8 23:36:56 2001 Jeffrey A Law (law@cygnus.com) - - * config/pa/som.h (MAKE_DECL_ONE_ONLY, ASM_WEAKEN_LABEL): Disable. - -Thu Mar 8 23:29:37 2001 John Wehle (john@feith.com) - - * rtlanal.c (rtx_varies_p): Check operand 0 of a - LO_SUM unless for_alias is set. - -2001-03-08 Stan Shebs - - * objc/objc-act.c: Fix old typos in comments, add comments for - various functions. - (hash_init): Fix file name in error message. - (hash_enter): Ditto. - (hash_add_attr): Ditto. - (continue_class): Ditto. - -2001-03-08 Bruce Korb - - gcc.c(main): ensure SIGCHLD handling is set to SIG_DFL so that - wait4() can receive the signal. - -Thu Mar 8 21:09:10 2001 Rainer Orth - - * fixinc/inclhack.def (AAB_dgux_int_varargs): Don't use HTML - entities. - * fixinc/fixincl.x: Regenerate. - -Thu Mar 8 21:09:10 2001 Rainer Orth - - * fixinc/inclhack.def (AAA_standards): Undo breakage - on Tru64 UNIX. - * fixinc/fixincl.x: Regenerate. - -2001-03-08 Richard Henderson - - * configure.in (HAVE_AS_LEB128): New assembler check. - * configure, config.in: Rebuilt. - -Thu Mar 8 19:54:04 CET 2001 Jan Hubicka - - * reg-stack.c (move_for_stack_reg): Avoid non-poping fst for - TFmode too. - -2001-03-08 Kaveh R. Ghazi - - * config/ns32k/xm-pc532-min.h, config/we32k/xm-we32k.h: Delete - references to the MAXPATHLEN macro. - - * config/alpha/xm-alpha.h, config/arm/xm-arm.h, - config/i386/xm-cygwin.h, config/xm-linux.h: Delete references to - the POSIX macro. - - * config/i386/xm-gnu.h, config/xm-gnu.h, - config/alpha/xm-openbsd.h, config/i386/xm-openbsd.h, - config/m68k/xm-openbsd.h, config/mips/xm-openbsd.h, - config/sparc/xm-openbsd.h, config/xm-openbsd.h: Delete empty - and/or unused files. - - * config.gcc: Define POSIX in xm_defines as appropriate in lieu of - doing so in various xm-*.h files. - -Thu Mar 8 06:32:50 2001 Richard Kenner - - * config/i386/i386.md (clrstrsi): Call ix86_set_move_mem_attrs. - -2001-03-08 Alexandre Oliva - - * configure.in (enable_shared): Support per-package shared-library - enabling. - * configure: Rebuilt. - -2001-03-07 David Edelsohn - - * rs6000.md (cr logic): Add original POWER mnemonic alternative - for crnot. Set operands[5] in splitter. - -2001-03-07 Kaveh R. Ghazi - - * config/i370/xm-mvs.h, config/i370/xm-oe.h, - config/i386/xm-beos.h, config/i386/xm-mingw32.h, - config/m88k/xm-m88k.h, config/mips/xm-iris6.h, - config/mips/xm-openbsd.h, config/pa/xm-pa64hpux.h, - config/pa/xm-pahpux.h, config/rs6000/xm-beos.h, - config/rs6000/xm-darwin.h, config/rs6000/xm-mach.h, - config/rs6000/xm-rs6000.h, config/xm-interix.h: Delete references - to the USG macro. - - * config/vax/xm-vaxv.h, config/a29k/xm-unix.h, - config/i370/xm-i370.h, config/i386/xm-dgux.h, - config/i386/xm-sun.h, config/i386/xm-sysv3.h, - config/m68k/xm-tower.h, config/m68k/xm-aux.h, - config/m68k/xm-hp320.h, config/m68k/xm-amix.h, - config/m68k/xm-altos3068.h, config/m68k/xm-mot3300.h, - config/m68k/xm-m68kv.h, config/m88k/xm-openbsd.h, - config/mips/xm-nws3250v4.h, config/mips/xm-sysv.h, - config/mips/xm-iris3.h, config/mips/xm-iris4.h, config/xm-svr3.h, - config/xm-svr4.h, config/sparc/xm-pbd.h, config/clipper/xm-clix.h: - Delete unused and/or empty files. - - * config.gcc: Define USG in xm_defines as appropriate. Define - POSIX in lieu of xm-svr4.h. Delete all references to the SVR3 - macro. Remove deleted xm-* files from $xm_files variable. - -2001-03-07 Tom Tromey - - * configure: Rebuilt. - * configure.in: Allow config-lang.in to set `lang_requires' to list - of other required languages. - -2001-03-07 Andrew MacLeod - - * config/a29k/a29k.c (print_operand): Free a29k_last_prologue_insn - after its emitted. - (output_prologue): Use xmalloc not oballoc. - (output_epilog): Free a29k_first_epilogue_insn when finished. - * confif/a29k/a29k.h (PREDICATE_CODES): Remove shift_constant_operand. - -2001-03-07 Brad Lucier - - * builtins.c (expand_builtin_mathfn): Check - flag_unsafe_math_optimizations, not flag_fast_math. - (expand_builtin): Likewise - * combine.c (combine_simplify_rtx): Likewise. - (simplify_if_then_else): Likewise. - * cse.c (fold_rtx): Likewise. - * flags.h: Remove flag_fast_math. Add - flag_unsafe_math_optimizations and flag_trapping_math. - * fold-const.c (negate_expr): Check - flag_unsafe_math_optimizations, not flag_fast_math. - (invert_truthvalue): Likewise. - (fold): Likewise. Before associating operands, check that - code == MULT_EXPR, not code != MULT_EXPR. - * ifcvt.c (noce_try_minmax): Check - flag_unsafe_math_optimizations, not flag_fast_math. - (noce_operand_ok): Check flag_trapping_math, not flag_fast_math. - * invoke.texi: Document -funsafe-math-optimizations and - -fno-trapping-math. Change documentation for -ffast-math. - * jump.c (reversed_comparison_code_parts): Likewise. - (rtx_equal_for_thread_p): Likewise. - * optabs.c (emit_conditional_move): Likewise. - * simplify-rtx.c (simplify_binary_operation): Likewise. - (simplify_relational_operation): Likewise. - (simplify_ternary_operation): Likewise. - * toplev.c: Remove flag_fast_math. Add flag_trapping_math and - flag_unsafe_math_optimizations. Remove fast-math entry from f_options. - Add trapping-math and unsafe-math-optimizations entries to f_options. - (set_fast_math_flags): New, sets flags for -ffast-math. - (set_no_fast_math_flags): New, sets flags for -fno-fast-math. - (decode_f_option): Add code to handle -ffast-math and -fno-fast-math. - * toplev.h: Declare set_fast_math_flags and set_no_fast_math_flags. - - * config/alpha/alpha.c (alpha_emit_conditional_branch): Likewise. - (alpha_emit_conditional_move): Initialize local_fast_math to - flag_unsafe_math_optimizations, not flat_fast_math. - * config/c4x/c4x.c (c4x_override_options): Call set_fast_math_flags - instead of setting flag_fast_math to 1. - * config/convex/convex.md: Check flag_unsafe_math_optimizations, - not flag_fast_math. - * config/i386/i386.c (override_options): Likewise - * config/i386/i386.md: Likewise. - * config/m68k/m68k.md: Likewise. - * config/mips/mips.md: Likewise. - * config/rs6000/rs6000.c (validate_condition_mode): Likewise. - (rs6000_generate_compare): Likewise. - -2001-03-07 Laurynas Biveinis - - * Makefile.in: Set RANLIB to @RANLIB@. - Remove RANLIB_TEST. - -2001-03-07 Laurynas Biveinis - - * fixinc/inclhack.def (djgpp_wchar_h): New test. - * fixinc/fixincl.x: Regenerated. - -2001-03-07 Richard Henderson - - * config/alpha/alpha.md (call_osf_1_noreturn): New pattern. - -2001-03-07 Richard Henderson - - * emit-rtl.c (remove_unnecessary_notes): Verify proper nesting - of block notes and exception handling notes. - - * lists.c (init_EXPR_INSN_LIST_cache): Don't check initialized. - * toplev.c (rest_of_compilation): Call init_EXPR_INSN_LIST_cache ... - (compile_file): ... here. - -2001-03-06 Kaveh R. Ghazi - - * fixinc/Makefile.in (FIXINC_DEFS): Add -DHAVE_CONFIG_H. - - * fixinc/gnu-regex.c: Don't include auto-host.h since we get - config.h now. Include libiberty.h to handle alloca. - -2001-03-06 Zack Weinberg - - * c-parse.in (yylexname): New function, split out of _yylex. - (objc_rid_sans_at): New table. - (init_reswords): Initialize it. - (_yylex): Give labels clearer names. Handle CPP_ATSIGN by - retrieving the next token and checking it for significance as - an ObjC keyword or string constant. - - * cpplex.c (_cpp_lex_token): Just return CPP_ATSIGN for '@'. - * cpplib.h (TTYPE_TABLE): Add CPP_ATSIGN, drop CPP_OSTRING. - - * c-lex.c, c-parse.in, cppmacro.c, cpplex.c: Remove references - to CPP_OSTRING. - -2001-03-06 Stephen L Moshier - - * config/m68k/m68k.c (const_uint32_operand): Accept any - const_int on a 32-bit host. - -2001-03-06 Nicola Pero - - * objc/objc-act.c (init_objc): Set save_lang_status, - restore_lang_status, and mark_lang_status. - -2001-03-06 Krister Walfridsson - - * dwarf2asm.c (dw2_asm_output_delta): Fix smallest_mode_for_size call. - -2001-03-06 Neil Booth - - * cppinternals.texi: Update. - -2001-03-06 Kaveh R. Ghazi - - * config/a29k/xm-a29k.h, config/a29k/xm-unix.h, - config/alpha/xm-alpha.h, config/arc/xm-arc.h, config/arm/xm-arm.h, - config/c4x/xm-c4x.h, config/clipper/xm-clix.h, - config/convex/xm-convex.h, config/d30v/xm-d30v.h, - config/dsp16xx/xm-dsp16xx.h, config/elxsi/xm-elxsi.h, - config/h8300/xm-h8300.h, config/i370/xm-i370.h, - config/i370/xm-linux.h, config/i370/xm-mvs.h, config/i370/xm-oe.h, - config/i386/xm-i386.h, config/i860/xm-i860.h, - config/i960/xm-i960.h, config/ia64/xm-ia64.h, - config/m32r/xm-m32r.h, config/m68k/xm-m68k.h, - config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, - config/mips/xm-mips.h, config/mn10200/xm-mn10200.h, - config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, - config/pa/xm-linux.h, config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, - config/pa/xm-pahpux.h, config/pa/xm-papro.h, config/pj/xm-pj.h, - config/romp/xm-romp.h, config/rs6000/xm-beos.h, - config/rs6000/xm-lynx.h, config/rs6000/xm-rs6000.h, - config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, - config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h, - config/v850/xm-v850.h, config/vax/xm-vax.h, config/vax/xm-vms.h, - config/we32k/xm-we32k.h: Delete HOST_BITS_PER_* definitions which - match the defaults provided in hwint.h. - - * config/i386/xm-lynx.h, config/m68k/xm-lynx.h, - config/sparc/xm-lynx.h, config/xm-std32.h: Delete files. - - * config.gcc (xm_file): Don't set to files which are deleted. - - * hwint.h: Provide default values for HOST_BITS_PER_*. No longer - guard this file against these macros being undefined. - -2001-03-06 Zack Weinberg - - * objc/objc-act.c (objc_add_static_instance): Set DECL_INITIAL - and DECL_DEFER_OUTPUT on the decl we create, before calling - rest_of_decl_compilation. - -2001-03-06 Zack Weinberg - - * aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE - AC_FUNC_ALLOCA. - * configure, config.in: Regenerate. - * config.gcc: Remove references to deleted files. - - * genattr.c, genattrtab.c, genextract.c, genoutput.c, - genrecog.c, rtl.c: Do not use alloca anywhere. - - * Makefile.in, build-make, system.h, config/x-interix, - config/x-svr4, config/xm-interix.h, config/xm-openbsd.h, - config/alpha/xm-alpha.h, config/alpha/xm-vms.h, - config/arc/xm-arc.h, config/arm/xm-arm.h, - config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, - config/h8300/xm-h8300.h, config/i370/x-oe, - config/i370/xm-linux.h, config/i386/x-aix, config/i386/x-beos, - config/i386/x-ncr3000, config/i386/x-sco5, - config/i386/xm-dgux.h, config/i860/x-sysv4, - config/i960/xm-i960.h, config/m32r/xm-m32r.h, - config/m68k/x-crds, config/m68k/x-dpx2, config/m68k/x-hp320, - config/m68k/x-hp320g, config/m69k/x-mot3300, - config/m68k/x-mot3300-gas, config/m68k/xm-amix.h, - config/m68k/xm-hp320.h, config/m68k/xm-m68kv.h, - config/m68k/xm-mot3300.h, config/m88k/x-dolph, - config/m88k/x-sysv4, config/m88k/x-tekXD88, - config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, - config/mips/x-iris, config/mips/x-iris3, - config/mips/x-sni-svr4, config/mips/x-sysv, - config/mips/xm-iris6.h, config/mips/xm-mips.h, - config/mips/xm-nws3250v4.h, config/pa/x-hpux, - config/pa/x-pa-mpeix, config/pa/xm-pa.h, - config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h, - config/pa/xm-papro.h, config/romp/xm-romp.h, - config/rs6000/x-aix31, config/rs6000/x-aix41, - config/rs6000/x-beos, config/rs6000/x-lynx, - config/rs6000/x-mach, config/rs6000/x-rs6000, - config/rs6000/x-sysv4, config/rs6000/xm-rs6000.h, - config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, - config/sparc/x-sysv4, config/sparc/xm-linux.h, - config/sparc/xm-pbd.h, config/sparc/xm-sparc.h, - config/vax/xm-vms.h: Eradicate all references to alloca and - related stuff. - - * config/xm-alloca.h, config/clipper/x-clix, - config/i386/xm-sysv4.h, config/i860/x-fx2800, - config/i860/x-sysv3, config/m88k/x-sysv3, - config/sparc/xm-sol2.h, config/we32k/x-we32k: Delete - (contained only alloca related hacks). - - * config/i386/xm-beos.h, config/rs6000/xm-beos.h: Just define - USE_C_ALLOCA. - -2001-03-05 Brad Lucier - - * invoke.texi: Document __FAST_MATH__. - -2001-03-05 Kaveh R. Ghazi - - * crtstuff.c: Restore include of auto-host.h. - -2001-03-05 Fergus Henderson - - Put main() in a separate file, so that the language - front-end can use a different main(). - - * main.c: New. - * toplev.c: (main): Rename as toplev_main. - * toplev.h: Declare toplev_main. - * Makefile.in (OBJS): add toplev.o. - (BACKEND): remove toplev.o, add main.o. - -2001-03-04 Neil Booth - - * cppfiles.c (search_from): Special case the empty string. - -2001-03-04 Neil Booth - - * cppfiles.c (_cpp_execute_include): Don't make a null-terminated - copy of the filename. Don't use CPP_PREV_BUFFER. Don't call - strlen or strcpy; we already know the length. - (_cpp_compare_file_date): Similarly. - * cpphash.h (struct cpp_reader): Delete done_initialising. - (CPP_PREV_BUFFER): Delete. - * cppinit.c (cpp_start_read): Don't set done_initialising. - * cpplex.c (parse_string): Guarantee null-termination. - (_cpp_equiv_toklists): Remove. - * cpplib.c (glue_header_name): Null-terminate. - (do_line): Don't leak memory. - * cpplib.h (BT_WEAK): Delete. - * cppmain.c (cb_ident): Strings are now null-terminated. - -2001-03-04 Laurynas Biveinis - - * gcc.c (convert_filename): Append executable suffix - if NO_AUTO_EXE_SUFFIX is not defined. - * gcc.texi: Document NO_AUTO_EXE_SUFFIX. - * config/i386/djgpp.h: Define NO_AUTO_EXE_SUFFIX. - -2001-03-03 David O'Brien - - from 2000-09-06 Zack Weinberg - * c-parse.gperf, c-gperf.h: Delete. - (c-gperf.h was accidently re-added to the CVS repo in the rev - 1.16 commit by tromey) - -2001-03-03 Neil Booth - - * cpplex.c (_cpp_lex_token): Don't warn about directives in - macro arguments when looking for the '('. - * cppmacro.c (funlike_invocation_p): Set parsing_args to - 2 when really parsing arguments; 1 when looking for '('. - Always restore the lexer position. - -2001-03-03 Neil Booth - - * longlong.h (umul_ppmm): Don't use a multiline string. - -2001-03-03 John David Anglin - - * fixinc/fixlib.h (t_bool): Add identifier `t_bool' in typedef. - * fixinc/server.c (read_pipe_timeout): Use enum t_bool instead of - t_bool in declaration because pcc can't combine volatile with typedef - types. - -Sat Mar 3 19:47:13 CET 2001 Jan Hubicka - - * i386.c (ix86_expand_fp_compare): Delay creating of scratch register - until when it is really needed. - (ix86_expand_compare): Update call of ix86_expand_fp_compare. - * i386.h (PREDICATE_CODES): Add all codes for sse_comparison_operator - * i386.md (float?i?f splitter): Don't force source operand to memory - for SSE. - (sse_movdfcc): Fix constraint. - (sse_movdfcc splitter): Handle properly the second alternative. - -2001-03-03 Neil Booth - - * cpplex.c (parse_string): Unconditionally pedwarn. - -2001-03-03 Neil Booth - - * cpp.texi: Update. - * cppexp.c (parse_number): Update. - * cpplex.c (parse_string): Pedwarn if multiline string does not - result from a system header's macro. - * cpplib.h (sys_objmacro_p): Rename sys_macro_p. - * cppmacro.c (sys_objmacro_p): Rename sys_macro_p. Return true - for function-like macros too. - * c-lex.c (lex_number): Update. - -2001-03-03 Richard Henderson - - * dwarf2out.c (output_call_frame_info): Fix augmentation length. - -Sat Mar 3 04:17:17 2001 J"orn Rennecke - - * combine.c (try_combine): If split with mode-changed scratch - register didn't work, try the original mode. - -Sat Mar 3 03:46:47 2001 J"orn Rennecke - - * tm.texi: Change STRUCT_FORCE_BLK to MEMBER_TYPE_FORCES_BLK. - * config/c4x/c4x.h: Likewise. - * stor-layout.c (compute_record_mode): Likewise. - (layout_type, case ARRAY_TYPE): Use MEMBER_TYPE_FORCES_BLK. - -2001-03-02 Zack Weinberg - - * configure.in: Kill tm.h. Include the files in the $tm_file - list in all three of config.h, hconfig.h, tconfig.h, after the - relevant set of xm_files. Put TARGET_CPU_DEFAULT in all - three, include insn-codes.h in all three (#ifndef GENERATOR_FILE). - * configure: Regenerate. - * Makefile.in (clean): Don't delete tm.h. - - * system.h: If SUCCESS_EXIT_CODE and FATAL_EXIT_CODE are not - defined, set them from EXIT_SUCCESS and EXIT_FAILURE. If - those are not defined, set SEC and FEC to 0 and 1. - * gcc.texi: Update to match. - - * crtstuff.c: Include tconfig.h, not auto-host.h and tm.h. - * config/fp-bit.c, config/m68k/aux-crt2.asm, - config/m68k/aux-crtn.asm, config/m68k/aux-mcount.c: - Include tconfig.h, not tm.h. - - * config/xm-lynx.h, config/xm-std32.h, - config/a29k/xm-a29k.h, config/a29k/xm-unix.h, - config/alpha/xm-alpha.h, config/arc/xm-arc.h, - config/avr/xm-avr.h, config/c4x/xm-c4x.h, - config/clipper/xm-clix.h, config/convex/xm-convex.h, - config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, - config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h, - config/h8300/xm-h8300.h, config/i370/xm-linux.h, - config/i386/xm-i386.h, config/i860/xm-i860.h, - config/i960/xm-i960.h, config/ia64/xm-ia64.h, - config/m32r/xm-m32r.h, config/m68hc11/xm-m68hc11.h, - config/m88k/xm-m88k.h, config/mcore/xm-mcore.h, - config/mips/xm-mips.h, config/mn10200/xm-mn10200.h, - config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h, - config/pa/xm-linux.h, config/pa/xm-pa.h, - config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h, - config/pa/xm-papro.h, config/pdp11/xm-pdp11.h, - config/pj/xm-pj.h, config/romp/xm-romp.h, - config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h, - config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, - config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h, - config/v850/xm-v850.h, config/vax/xm-vax.h, - config/we32k/xm-we32k.h: - Don't include tm.h. - Don't define SUCCESS_EXIT_CODE or FATAL_EXIT_CODE. - - * config/i370/xm-i370.h, config/i370/xm-mvs.h, - config/i370/xm-oe.h: Don't include tm.h. Don't define - SUCCESS_EXIT_CODE. - * config/vax/xm-vms.h: Don't include tm.h. - - * config/xm-lynx.h, config/avr/xm-avr.h, - config/fr30/xm-fr30.h, config/pdp11/xm-pdp11.h, - Delete; made empty by above changes. - * config/i386/xm-lynx.h, config/m68k/xm-lynx.h, - config/rs6000/xm-lynx.h, config/sparc/xm-lynx.h: - Don't include config/xm-lynx.h or tm.h. - - * config/xm-gnu.h: Don't include fcntl.h. - * config/sparc/xm-lynx.h: Don't include sys/types.h and - sys/wait.h. - * config/clipper/xm-clix.h, config/vax/xm-vax.h: Don't define isinf. - -2001-03-02 Richard Henderson - - * tm.texi (File Framework): Document UNALIGNED_SHORT_ASM_OP, - UNALIGNED_INT_ASM_OP, and UNALIGNED_DOUBLE_INT_ASM_OP. - -2001-03-02 Richard Henderson - - * Makefile.in (OBJS): Add dwarf2asm.o. - * dwarf2asm.c, dwarf2asm.h: New files. - * dwarf2out.c (*): Use them. - (size_of_uleb128, size_of_sleb128): Remove. - (output_uleb128, output_sleb128): Remove. - (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP): Remove. - (UNALIGNED_DOUBLE_INT_ASM_OP, ASM_BYTE_OP): Remove. - (UNALIGNED_OFFSET_ASM_OP, UNALIGNED_WORD_ASM_OP): Remove. - (FDE_LABEL, LINE_NUMBER_BEGIN_LABEL, LINE_NUMBER_END_LABEL): New. - (ASM_OUTPUT_DWARF_DATA1, ASM_OUTPUT_DWARF_DELTA1): Remove. - (ASM_OUTPUT_DWARF_DATA2, ASM_OUTPUT_DWARF_DELTA2): Remove. - (ASM_OUTPUT_DWARF_DATA4, ASM_OUTPUT_DWARF_DELTA4): Remove. - (ASM_OUTPUT_DWARF_DATA, ASM_OUTPUT_DWARF_DELTA): Remove. - (ASM_OUTPUT_DWARF_ADDR, ASM_OUTPUT_DWARF_ADDR_DATA): Remove. - (ASM_OUTPUT_DWARF_ADDR_DELTA, ASM_OUTPUT_DWARF_ADDR_CONST): Remove. - (ASM_OUTPUT_DWARF_OFFSET4, ASM_OUTPUT_DWARF_OFFSET): Remove. - (ASM_OUTPUT_DWARF_CONST_DOUBLE): Remove. - (ASM_OUTPUT_DWARF_NSTRING, ASM_OUTPUT_DWARF_STRING): Remove. - (dwarf2out_frame_debug): Remove unused variables. - (output_loc_operands): Don't abort on 8 byte constants if - host integers are wide enough. - (output_symbolic_ref): Remove. - (size_of_die): Don't assume 4 byte host integers. - (output_line_info): Use ASM_GENERATE_INTERNAL_LABEL for begin - and end labels. - (add_const_value_attribute) [CONST_INT]: Verify we're not doing - something stupid with HOST_WIDE_INT to long truncation. - [CONST_DOUBLE]: Likewise. - - * config/arm/conix-elf.h (UNALIGNED_WORD_ASM_OP): Remove. - (ASM_OUTPUT_DWARF2_ADDR_CONST, ASM_OUTPUT_DWARF_ADDR_CONST): Remove. - * config/arm/unknown-elf.h: Likewise. - * config/rs6000/aix.h (UNALIGNED_SHORT_ASM_OP): New. - (UNALIGNED_INT_ASM_OP, UNALIGNED_DOUBLE_INT_ASM_OP): New. - (ASM_OUTPUT_DWARF_ADDR_VAR, ASM_OUTPUT_DWARF_DELTA_VAR): Remove. - (ASM_OUTPUT_DWARF_DELTA2, ASM_OUTPUT_DWARF_DELTA4): Remove. - (ASM_OUTPUT_DWARF_DELTA, ASM_OUTPUT_DWARF_ADDR_DELTA): Remove. - (ASM_OUTPUT_DWARF_ADDR, ASM_OUTPUT_DWARF_DATA4): Remove. - (ASM_OUTPUT_DWARF_DATA2, ASM_OUTPUT_DWARF_OFFSET4): Remove. - (ASM_OUTPUT_DWARF_OFFSET): Remove. - * config/rs6000/sysv4.h (ASM_OUTPUT_DWARF_ADDR): Remove. - * config/sparc/sp64-elf.h (UNALIGNED_DOUBLE_INT_ASM_OP): New. - (UNALIGNED_LONGLONG_ASM_OP, ASM_OUTPUT_DWARF_ADDR): Remove. - (ASM_OUTPUT_DWARF_ADDR_CONST, ASM_OUTPUT_DWARF_REF): Remove. - -2001-03-02 John David Anglin - - * cselib.c (hash_rtx): Cast enums to unsigned int. - -2001-03-02 John David Anglin - - * print-rtl.c (print_rtx): Cast enums to int for comparison. - * c-decl.c (grokdeclarator): Cast enums to int for comparison and - shifts. - * c-format.c (C_STD_VER): Cast to int for comparisons. - (check_function_format): Cast various enums to int for &. - (maybe_read_dollar_number): Likewise. - (check_format_info): Likewise. - (check_format_info_main): Likewise. - * expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison. - (safe_from_p): Likewise. - * varasm.c (const_hash): Cast enum to int for %. - * emit-rtl.c (init_emit_once): Use int loop variable to work around - pcc enum problems with < and ++ operators. - * regclass.c (init_reg_sets_1): Cast enums for comparison. - (choose_hard_reg_mode): Use unsigned int to iterate over CCmodes. - (regclass_init): Change enum class to int to iterate over reg_classes. - * genrecog.c (merge_trees): Cast enums for comparison. - * rtl.h (GET_CODE): Cast to enum rtx_code. - (PUT_CODE): Cast to ENUM_BITFIELD(rtx_code). - (GET_MODE): Cast to enum machine_mode. - (PUT_MODE): Cast to ENUM_BITFIELD(machine_mode). - (GET_NOTE_INSN_NAME): Cast enum to int. - * tree.h (TREE_CODE): Cast to enum tree_code. - (TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code). - * timevar.c (timevar_print): Change loop variable id from enum to - unsigned int. - * fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int. - * config/i386/i386.md: Use PUT_MODE for mode assignment. - * toplev.c (compile_file): Cast enum DFI to int. - (decode_d_option): Likewise. - -Fri Mar 2 12:18:13 2001 Christopher Faylor - - * cppinit.c (append_include_chain): Mark "after" include file name list - as a system directory. - * cpp.texi: Document new behavior. - -Fri Mar 2 11:59:43 CET 2001 Jan Hubicka - - * ifcvt.c (noce_operand_ok): Handle properly unarry operations. - -2001-03-02 Neil Booth - - * cppfiles.c (struct include_file): Update. - (stack_include_file): Use search_from. - (cpp_included, find_include_file): Update. - (cpp_execute_include): Update. ptr->name may not be - null terminated. Use the new search_from member variable - of cpp_buffer. - (_cpp_compare_file_date): Similarly. - (search_from): New function, similar to actual_directory. - (actual_directory): Delete. - (remap_filename): Update. loc->name may not be null terminated. - (struct file_name_list): Rename search_path. Update. - * cpphash.h (struct cpp_buffer): Delete actual_dir. New members - search_from and dir. - (struct cpp_reader): Remove actual_dirs. - * cppinit.c (struct cpp_pending): Update for renamed objects. - (append_include_chain, remove_dup_dir, remove_dup_dirs, - merge_include_chains, cpp_destroy, cpp_start_read): Similarly. - * cpplib.h (struct cpp_options): Similarly. - -2001-03-01 Zack Weinberg - - * config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h, - config/a29k/xm-unix.h, config/alpha/xm-alpha.h, - config/arc/xm-arc.h, config/arm/xm-arm.h, config/c4x/xm-c4x.h, - config/clipper/xm-clix.h, config/convex/xm-convex.h, - config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h, - config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h, - config/h8300/xm-h8300.h, config/i370/xm-i370.h, - config/i370/xm-linux.h, config/i370/xm-mvs.h, - config/i370/xm-oe.h, config/i386/xm-aix.h, - config/i386/xm-i386.h, config/i386/xm-osf.h, - config/i860/xm-i860.h, config/i960/xm-i960.h, - config/ia64/xm-ia64.h, config/m32r/xm-m32r.h, - config/m68k/xm-m68k.h, config/m88k/xm-m88k.h, - config/mcore/xm-mcore.h, config/mips/xm-mips.h, - config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h, - config/ns32k/xm-ns32k.h, config/pa/xm-linux.h, - config/pa/xm-pa.h, config/pa/xm-pa64hpux.h, - config/pa/xm-pahpux.h, config/pa/xm-papro.h, - config/pj/xm-pj.h, config/romp/xm-romp.h, - config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h, - config/rs6000/xm-sysv4.h, config/sh/xm-sh.h, - config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h, - config/v850/xm-v850.h, config/vax/xm-vax.h, - config/vax/xm-vms.h, config/we32k/xm-we32k.h: - Do not define TRUE or FALSE. - - * config/i386/xm-aix.h, config/i386/xm-osf.h: Delete; made - empty by above change. - * config.gcc: Remove references to these files. - - * configure.in: Detect stdbool.h. - * configure, config.in: Regenerate. - * system.h: Include stddef.h here if available. - Set HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__. - Then set up a sensible boolean type at the very end. - - * combine.c, cse.c, expr.c, fold-const.c, gensupport.c, - config/mcore/mcore.c: Rename variables named 'true' and/or 'false'. - - * hash.h: Delete 'boolean' typedef and related #undefs. - - * function.c, ggc-common.c, hash.h, hash.c, tlink.c: Replace - all uses of 'boolean' with 'bool'. - -2001-03-01 John David Anglin - - * cpplib.c (_cpp_init_stacks): Cast enum for comparison. - * cppexp.c (lex): Cast enums for comparison. - * cppinit.c (parse_option): Cast enum for comparison. - * cpplex.c (cpp_spell_token): Cast enums to int for minus. - (cpp_output_token): Likewise. - (cpp_can_paste): Cast enums for comparsion and plus/minus. - (cpp_avoid_paste): Cast enums for minus and comparison. - -2001-03-01 Zack Weinberg - - * gcc.c, objc/lang-specs.h: Add zero initializer for cpp_spec - field to all array elements. - -2001-03-01 Zack Weinberg - - * cpphash.h (struct cpp_reader): Add print_version field. - * cppinit.c (cpp_handle_option): For -v, -version, and --version, - just set print_version and other flags as appropriate. - (cpp_post_options): Print version here if print_version is set. - - * toplev.c (exit_after_options): New flag. - (independent_decode_option): Don't exit here; just set - exit_after_options. - (main): Exit after calling lang_hooks.post_options if - exit_after_options is true. - - * cppinit.c (append_include_chain): Drop never-used case QUOTE. - (merge_include_chains): Adjust comment to match code. - -2001-03-01 Zack Weinberg - - * stringpool.c (set_identifier): New function. - * tree.h: Prototype it. - - * c-parse.in: Kill D_YES. If compiled for objc, call - save_and_forget_protocol_qualifiers from init_reswords. - * objc/objc-act.c (remember_protocol_qualifiers, - forget_protocol_qualifiers): Don't diddle C_IS_RESERVED_WORD. - Swap out the non-keyword IDENTIFIER_NODEs for keyword ones, or - vice versa. - (save_and_forget_protocol_qualifiers): New function. - * c-lex.h: Prototype save_and_forget_protocol_qualifiers. - -2001-03-01 Diego Novillo - - * c-semantics.c (prune_unused_decls): Return error_mark_node - instead of (tree) 1 to stop traversing the tree chain. - -2001-03-01 Bernd Schmidt - - Fix a problem introduced by Kenner's Feb 18 change. - * toplev.c (rest_of_compilation): Disable flag_cse_follow_jumps and - flag_cse_skip_blocks only temporarily, not for ever. - -Thu Mar 1 09:49:58 2001 Jeffrey A Law (law@cygnus.com) - - * config/pa/som.h (ASM_IDENTIFY_GCC): Define. - (ASM_IDENTIFY_GCC_AFTER_SOURCE): Likewise. - - * pa.c (emit_move_sequence): Verify operand0 is a hard register - before determining its register class. - -2001-03-01 Bernd Schmidt - - * config/ia64/ia64.c (ia64_hard_regno_rename_ok): Disallow renaming - from reg 4 if current_function_calls_setjmp. - (gen_nop_type): New function. - (ia64_emit_nops): New function. - (ia64_reorg): Call it. - (ia64_sched_reorder): Move code that rotates bundles up a bit. - - * reload1.c (eliminate_regs_in_insn): Restrict the special case - code not to try to optimize adds with anything but a REG destination. - - * sched-int.h (struct haifa_insn_data): Add new member priority_known. - (INSN_PRIORITY_KNOWN): New accessor macro. - * haifa-sched.c (priority): Use it instead of testing priority against - zero. - -2001-02-28 DJ Delorie - - * config/m68k/m68k.h (MOVE_BY_PIECES_P): Avoid pushing bytes, - since that doesn't work the way gcc wants on a generic m68k. - -2001-02-28 Richard Henderson - - * caller-save.c (save_call_clobbered_regs): Fix typo in - comparison last change. - -Wed Feb 28 19:31:42 CET 2001 Jan Hubicka - - * i386.c (pentium4_cost): New. - (m_PENT4): New macro. - (x86_push_memory, x86_movx,x86_cmove, x86_deep_branch, x86_use_sahf - x86_sub_esp_4, x86_sub_esp_8, x86_add_esp_4, x86_add_esp_8 - x86_integer_DFmode_moves, x86_partial_reg_dependency, - x86_memory_mismatch_stall): Add Pentium4 - (x86_use_q_reg, x86_use_any_reg): Kill. - (override_options): Add pentium4. - (incdec_operand): Return 0 for pentium4. - (ix86_issue_rate): Add PROCESSOR_PENTIUM4 and PROCESSOR_ATHLON. - * i386.h (x86_use_q_reg, x86_use_any_reg): Kill. - (TARGET_PENTIUM4): Define. - (enum processor_type): Add PROCESSOR_PENTIUM4. - (CPP_CPU_DEFAULT_SPEC): Add pentium4 support. - * i386.md (attribute "cpu"): Add pentium4. - * invoke.texi (march): Add pentium4. - -Wed Feb 28 19:28:06 CET 2001 Jan Hubicka - - * i386.md (sse_mov?fcc*): New patterns and splitters. - * i386.c (ix86_expand_movcc): Work post-reload; recognize - the SSE based conditional moves. - -Wed Feb 28 19:18:23 CET 2001 Jan Hubicka - - * i386.md (attribute mode): Add "TI". - (movsf_1): Add pxor support; remove constant propagation splitter. - (movdf_integer): Likewise. - (movdf_nointeger): Likewise. - (movxf constant prop splitter): Handle all modes; update for SSE. - * i386.h (CONST_DOUBLE_OK_FOR_LETTER): Add 'H' for SSE constants. - * i386.c (standard_80387_constant_p): Rewrite. - (standard_sse_constant_p): New. - * i386-protos.h (standard_sse_constant_p): New. - -Wed Feb 28 19:05:37 CET 2001 Jan Hubicka - - * i386.md (sse_setccsf, sse_setccdf): New. - (sse_cmp* patterns): Use '%D' instead of outputtting condition - flag directly. - * i386.c (sse_comparison_operator): Accept the supported unordered - comparses; be ready for fast_math. - (print_operand): Support 'D'. - -Wed Feb 28 18:54:51 CET 2001 Jan Hubicka - - * jump.c (reversed_comparison_code): Kill. - -Wed Feb 28 18:50:15 CET 2001 Jan Hubicka - - * toplev.c (rest_of_compilation): Do post-reload splitting unconditionally - for STACK_REGS - -Wed Feb 28 18:47:37 CET 2001 Jan Hubicka - - * i386.md (sse_andti3, sse_nandti_3, sse_xorti3): Add SSE2 versions; - add missing '%' in constraints. - -Wed Feb 28 17:24:24 CET 2001 Jan Hubicka - - * c-common.c (build_common_tree_nodes): Build intTI_type_nodes - for HOST_BITS_PER_WIDE_INT == 32 too. - -Wed Feb 28 17:22:35 CET 2001 Jan Hubicka - - * caller-save.c (reg_save_code, reg_restore_code): Index by mode, not - NREGS. - (insert_save, insert_restore): New parameter save_mode. - (init_caller_save): Update initialization of reg_save_code - and reg_restore_code. - (save_call_clobbered_regs): Compute save_modes and update calls to - reg_save_code and reg_restore_code. - (insert_restore): Unsignetize numbers; use save_modes to choose mode - of spill; update use of reg_restore_code. - (insert_save): Likewise. - * i386.h (HARD_REGNO_CALLER_SAVE_MODE): Update. - * c4x.h (HARD_REGNO_CALLER_SAVE_MODE): Update. - * regs.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise. - -Wed Feb 28 17:19:28 CET 2001 Jan Hubicka - - * ifcvt.c (noce_emit_store_flag, noce_try_store_flag_constants, - noce_try_store_flag_inc, noce_try_store_flag_mask, - noce_try_cmove_arith): - Use reversed_comparison_code instead of reverse_comparison and - can_reverse_comparison_p. - -Wed Feb 28 17:17:29 CET 2001 Jan Hubicka - - * jump.c (reversed_comparison_code_parts): Allow reversal of - unordered compares in -ffast-math mode; reverse ordered compares - for FP even w/o -ffast-math. - -2001-02-27 Richard Henderson - - * print-rtl.c (print_rtx) [i]: Don't print field five on - NOTEs other than NOTE_INSN_DELETED_LABEL. - -2001-02-27 Zack Weinberg - - * mips/xm-iris4.h: Delete #if 0 block (there since before 1997). - * pa/xm-linux.h, pa/xm-pa.h, pa/xm-papro.h: Don't declare errno. - -2001-02-27 Diego Novillo - - * c-common.c (walk_stmt_tree): Visit the chain of the current tree - even if walk_subtrees is 0. - * c-semantics.c (prune_unused_decls): Return a non-null value to - stop traversing the tree chain. - -2001-02-27 DJ Delorie - - * config/m68k/m68k.c (output_function_prologue): Save the new CFA - register, *then* define it as the new CFA. - -Tue Feb 27 16:49:13 2001 Jeffrey A Law (law@cygnus.com) - - * pa.c (override_options): Promote -fpic to -fPIC. - (legitimize_pic_address): Simplify due to removal of - small PIC as a code generation option. - (secondary_reload_class): Similarly. - * pa.h (GO_IF_LEGITIMATE_ADDRESS): Similarly. - (PRINT_OPERAND_ADDRESS): Similarly. - * pa.md (various patterns): Similarly. - (small pic lo_sum pattern): Remove. - -Tue Feb 27 16:01:13 CET 2001 Jan Hubicka - Fergus Henderson - - * md.texi (min, max): Document - -Tue Feb 27 15:51:35 CET 2001 Jan Hubicka - - * i386.md (movsf, movdf): Use movaps for reg-reg moves if - TARGET_PARTIAL_REG_DEPENDENCY. - (truncdfsf2_1_sse, truncdfsf2_2): Penalize the fpreg->mem case. - -Tue Feb 27 15:36:48 CET 2001 Jan Hubicka - - * i386.md (mins*, maxs*): New patterns, expanders and splitters. - -2001-02-26 Jeffrey Oldham - - * mips.c (mips_make_temp_file): Fix thinko in last change. - -2001-02-26 Jason Eckhardt - - * combine.c (known_cond): Do not reverse the condition when - SMAX/UMAX is being considered and the condition is for equality - or inequality. - - * testsuite/gcc.c-torture/execute/20010221-1.c: New test. - -2001-02-26 Philip Blundell - - * config.gcc: Remove obsolete targets "arm*-*-linuxoldld" and - "armv2-*-linux". - * config/arm/linux-elf.h: Remove historical relics related to - above configurations. - * config/arm/linux-oldld.h: Delete. - * config/arm/linux-elf26.h: Delete. - -2001-02-26 Jason Merrill - - * c-decl.c (finish_decl): Set DECL_DEFER_OUTPUT on tentative file-scope - definitions. - * toplev.c (rest_of_decl_compilation): Check DECL_DEFER_OUTPUT to - recognize a tentative definition. Lose obsolete code. - - * toplev.c (wrapup_global_declarations): Don't emit DECL_COMDAT - variables unless necessary, either. - -2001-02-25 Richard Henderson - - * ifcvt.c (struct noce_if_info): Add test_bb. - (noce_get_alt_condition): New. - (noce_try_minmax, noce_try_abs): New. - (noce_operand_ok): New. - (noce_process_if_block): Use them. - * rtlanal.c (may_trap_p): NEG and ABS can never trap. - -Sun Feb 25 14:26:17 2001 Christopher Faylor - - * config/i386/cygwin.h (CPP_SPEC): Add missing space before w32api - include. - -2001-02-25 Zack Weinberg - - * config.gcc: Put back pa/t-openbsd and rs6000/t-openbsd. - * config/mips/mips.c (mips_make_temp_file): Set temp_filename - properly. - (mips_asm_file_end): Free temp_filename here. - -Sun Feb 25 08:34:23 2001 Richard Kenner - - * config/i386/i386-protos.h (ix86_set_move_mem_attrs): Move decl. - * config/i386/i386.c (ix86_set_move_mem_attrs_1): Fix typo. - - * config/i386/i386.md (movstrsi): Handle FAIL case. - -2001-02-25 Neil Booth - - * cppinit.c (builtin_array): Update. - (init_builtins): Flag builtins to warn if redefined or - undefined. Define __GXX_WEAK as a normal macro. - * cpplib.c (do_undef): Warn if flagged NODE_WARN. - * cpplib.h (NODE_WARN): New flag. - * cppmacro.c (builtin_macro): Remove handling of __GXX_WEAK__. - Handle __STDC__ as a builtin only on Solaris. - (warn_of_redefinition): Renamed from check_macro_definition. - Reverse sense of test. Always warn if NODE_WARN. - (_cpp_create_definition): Use warn_of_redefinition. Flag - any macro beginning with "__STDC_" to require a mandatory - warning if redefined or undefined. - -2001-02-24 Zack Weinberg - - * xm-interix.h, xm-lynx.h, alpha/xm-vms.h, convex/xm-convex.h, - i370/xm-i370.h, i370/xm-linux.h, i370/xm-mvs.h, i370/xm-oe.h, - i386/xm-beos.h, i386/xm-dos.h, i386/xm-mingw32.h, - i860/xm-i860.h, m68k/xm-3b1.h, m68k/xm-amix.h, m68k/xm-aux.h, - m68k/xm-crds.h, m68k/xm-mot3300.h, m88k/xm-sysv3.h, - mips/xm-mips.h, rs6000/xm-beos.h, vax/xm-vms.h: - Don't define any of: - USE_PROTOTYPES, vfork, mktemp, SVR3, NO_SYS_PARAMS_H, - P_tmpdir, MVS, NO_DBX_FORMAT, USE_STDARGS, STDC_HEADERS, - NO_PRECOMPILES, i860, __PTR_TO_INT, __INT_TO_PTR, rindex, - index, FULL_PROTOTYPES, AUX, R_OK, W_OK, X_OK, F_OK, - STACK_DIRECTION, MIPS, MAX_READ_LEN, MAX_WRITE_LEN. - - * alpha/xm-alpha.h, clipper/xm-clix.h, d30v/xm-d30v.h, - fr30/xm-fr30.h, i370/xm-linux.h: Remove commented-out macro - definitions. - - * m68k/xm-3b1.h, m68k/xm-crds.h, m88k/xm-sysv3.h: - Delete now-empty file. - - * alpha/vms.h: Define NEED_ATEXIT here... - * alpha/xm-vms.h: ...not here. - - * i386/cygwin.h: Don't define PARAMS. - * mips/mips.c: Don't prototype mktemp. Don't define - P_tmpdir. Use make_temp_file to create temporary files. - Don't be clever and delete temporary files early. - * config.gcc: Drop references to deleted files. Don't define - FULL_PROTOTYPES. - * gcc.texi: Don't mention USE_PROTOTYPES. - -Sat Feb 24 20:25:29 2001 Richard Kenner - - * config/i386/i386.c (ix86_set_move_mem_attrs): New function. - (ix86_set_move_mem_attrs_1): Likewise. - * config/i386/i386-protos.h (ix86_set_move_mem_attrs): New declaration. - * config/i386/i386.md (movstrsi): Call it. - -2001-02-24 Zack Weinberg - - * config.gcc: Expunge references to alpha/t-pe, pa/t-openbsd, - x-linux-aout, i386/t-go32, t-osf, m68k/x-m68kv, - ns32k/xm-netbsd.h, rs6000/t-openbsd, rs6000/t-xnewas, - rs6000/x-aix41-gld. These are nonexistent, empty, or obsolete. - - (i750a-*-*): Error here if hosting on i750a. - (alpha*-*-winnt*, ix86-*-winnt3*): Remove stanzas entirely. - - * x-linux-aout, xm-freebsd.h, i386/beos-pe.h, ns32k/xm-netbsd.h: - Remove (empty modulo comments). - - * 1750a/xm-1750a.h, alpha/config-nt.sed, alpha/win-nt.h, - alpha/xm-winnt.h, i386/config-nt.sed, i386/os2.h, - i386/t-winnt, i386/win-nt.h, i386/xm-freebsd.h, i386/xm-os2.h, - i386/xm-winnt.h, m68k/x-alloca-c, m88k/x-dguxbcs, - mips/x-netbsd, mips/x-nws3250v4, rs6000/t-xnewas, - rs6000/t-xrs6000, rs6000/xm-cygwin.h: Remove (obsolete) - - * i386/crtdll.h, i386/cygwin.h, i386/mingw32.h: - Remove reference to winnt.h in comment. - * rs6000/t-newas, rs6000/t-rs6000: Override LIBGCC1_TEST to null. - -2001-02-24 Franz Sirl - - * loop.c (check_dbra_loop): A biv has uses besides counting if it is - used to set another biv. - -Sat Feb 24 06:45:21 2001 Richard Kenner - - * tree.h (BLOCK_DEAD): New macro. - (struct tree_block): New flag, dead_flag. - * print-tree.c (print_node, case 'b'): Print missing fields. - * emit-rtl.c (remove_unnecessary_notes): Set BLOCK_DEAD. - * function.c (identify_blocks): Enable test for misplaced notes. - (all_blocks): Skip BLOCK_DEAD blocks. - * integrate.c (integrate_decl_tree): Likewise. - - * errors.c (internal_error, trim_filename): New functions. - (fancy_abort): Call internal_error. - * errors.h (internal_error, trim_filename): New declarations. - -2001-02-24 Alexandre Oliva - - * config/mn10300/mn10300.h (DBX_REGISTER_NUMBER): Reverted - 2000-08-26's patch. - (EXTRA_CONSTRAINT): Formatting changes. - -2001-02-23 Kaveh R. Ghazi - - * rtl.c (rtl_check_failed_code2): Fix typo in last change. - -2001-02-23 Per Bothner - - * gcc.c (record_temp_file, pfatal_with_name, error): Make non-static, - so they can be called from java/jvspec.c. - * gcc.h (record_temp_file, pfatal_with_name, error): Declare. - -Sat Feb 24 03:32:50 CET 2001 Jan Hubicka - - * i386.c (ix86_frame): New structure. - (ix86_compute_frame_size): Kill. - (ix86_compute_frame_layout): New. - (ix86_save_reg): New. - (ix86_can_use_return_insn_p): Use frame layout stuff. - (ix86_expand_prologue): Likewise. - (ix86_expand_epilogue): Likewise. - (ix86_initial_elimination_offset): Likewise. - (ix86_nsaved_regs): Use ix86_save_reg. - (ix86_emit_save_regs): Likewise. - -Sat Feb 24 03:30:38 CET 2001 Jan Hubicka - - * flow.c (find_sub_basic_blocks): New function. - (split_block): Be ready for basic block introduced by CODE_LABEL. - (commit_one_edge_insertion): Call find_sub_basic_block. - - * flow.c (make_edges): Add edge from entry for blocks starting with - label having ALTERNATE_NAME - -Sat Feb 24 03:19:42 CET 2001 Jan Hubicka - - * function.c (epilogue_done): Be ready for first basic block not - containing PROLOGUE_END note. - (reposition_prologue_and_epilogue_notes): Avoid placing - PROLOGUE_END note between BASIC_BLOCK. - -Sat Feb 24 03:17:09 CET 2001 Jan Hubicka - - * loop.c (canonicalize_condition): Move to reversed_comparison_code. - -2001-02-21 DJ Delorie - - * config/i960/i960.h (FRAME_POINTER_REQUIRED): Revert removal of - check for current_function_has_nonlocal_goto from 1999-11-12. - -Fri Feb 23 15:28:39 2001 Richard Kenner - - * diagnostic.c (trim_filename): No longer static. - * toplev.h (trim_filename): Declare. - * rtl.c (rtl_check_failed_bounds): Call internal_error. - (rtl_check_failed_type1, rtl_check_failed_type2): Likewise. - (rtl_check_failed_code1, rtl_check_failed_code2): Likewise. - (rtvec_check_failed_bounds): Likewise. - * tree.c (tree_check_failed, tree_class_check_failed): Likewise. - - * convert.c (convert_to_integer): Don't do unsigned unless result or - both inputs are unsigned. - - * fold-const.c (fold_convert): Don't call size_int_type_wide if - input overflows. - - * c-decl.c (set_block): Set NAMES and BLOCKS from BLOCK. - - * varasm.c (output_constant): Recompute CODE after lang-specific fn. - -2001-02-23 Jeffrey Oldham - - * Makefile.in (resource.o): Add params.h dependence. - * params.def (MAX_DELAY_SLOT_LIVE_SEARCH): New parameter. - * params.h (MAX_DELAY_SLOT_LIVE_SEARCH): Likewise. - * resource.c: Add dependence on params.h. - (current_live_regs): Fix explanatory comment. - (find_basic_block): Add new parameter to permit limiting search - for a BARRIER. - (mark_target_live_regs): Add new argument to find_basic_block call. - (incr_ticks_for_insn): Likewise. - -2001-02-23 Gabriel Dos Reis - - * diagnostic.c (output_to_stream): Rename to - output_buffer_to_stream. Loses the stream parameter. - (init_output_buffer): Set diagnosic_buffer's stream. - (flush_diagnostic_buffer): Adjust. - (default_print_error_function): Likewise. - (finish_diagnostic): Likewise. - (verbatim): Likewise. - - * diagnostic.h (struct output_buffer): Add `stream' field. - (output_buffer_attached_stream): New macro. - -2001-02-23 Jakub Jelinek - - * fold-const.c (extract_muldiv) [case PLUS_EXPR]: If not MULT_EXPR, - check if either operand is divisible by C. - (multiple_of_p): Handle LSHIFT_EXPR with small constant shift. - If type is signed, consider negative numbers as well. - -2001-02-22 Richard Henderson - - * config/ia64/crtbegin.asm (.fini): Use pc-relative relocs to - reach .text instead of gp-relative relocs. - * config/ia64/crtend.asm (.init): Likewise. - -2001-02-22 Andreas Jaeger - - * extend.texi (C++ Attributes): Fix typo. - -2001-02-21 David Mosberger - - * config/ia64/ia64.c (ia64_epilogue_uses): For syscall_linkage - functions, drop current_function_args_info.words test. - (ia64_compute_frame_size): Mark syscall_linkage functions as - using eight input registers. - -2001-02-21 Loren J. Rittle - Bruce Korb - - * fixinc/inclhack.def (freebsd_gcc3_breakage): new fix - * fixinc/README: Document how to convert sed substitutions - to format style c_fix-es. - * fixinc/fixincl.x: regen - -2001-02-21 Jeffrey D. Oldham - - * gcc.c: Add comment explaining how to add a command-line option. - Add title to specs language comment. - -2001-02-21 Jeffrey Oldham - - * gcc.c (cc1_options): Add "-param". - (DEFAULT_WORD_SWITCH_TAKES_ARG): Likewise. - (option_map): Likewise. - * toplev.c (display_help): Add entry for "--param". - (independent_decode_option): Fix typographical error. - -Wed Feb 21 18:57:28 CET 2001 Catherine Moore - Bernd Schmidt - Jan Hubicka - - * i386.c (function_arg_advance): Pass SSE arguments in registers. - (function_arg): Likewise. - -Wed Feb 21 18:12:41 CET 2001 Jan Hubicka - - * i386.md (mmx_lshrdi3, mmx_ashldi3): Guard by unspec. - -2001-02-21 Kazu Hirata - - * config/h8300/h8300.md (iorsi3): Do not output an extra newline - character. - (xorsi3): Likewise. - -Wed Feb 21 17:35:24 CET 2001 Jan Hubicka - - * flow.c (init_propagate_block_info): Canon address and use single_set - for killing dead memory stores. - -2001-02-21 Jeffrey Oldham - - * Makefile.in (reorg.o): Add params.h dependence. - * params.def: Fix typographical error in comment. - (MAX_DELAY_SLOT_INSN_SEARCH): New parameter. - * params.h: Modify introductory comment. - (MAX_DELAY_SLOT_INSN_SEARCH): New parameter. - * reorg.c: Add dependence on params.h. - (redundant_insn): Add parameterized throttle for search. - (fill_simple_delay_slots): Add a comment explaining a variable. - Move conditional out of loop, simplifying code. - (fill_eager_delay_slots): Fix typographical error in comment. - -2001-02-20 Aldy Hernandez - - * tm.texi (REVERSE_CONDEXEC_PREDICATES_P): New macro documentation. - - * flow.c (ior_reg_cond): Use REVERSE_CONDEXEC_PREDICATES_P macro. - (REVERSE_CONDEXEC_PREDICATES_P): Define macro. - -2001-02-21 Jason Merrill - - * tree.h (DECL_UNINLINABLE): Move from C++ frontend. - (struct tree_decl): Add uninlinable bitfield. - * c-decl.c (duplicate_decls): Set it. - * integrate.c (function_cannot_inline_p): Check it. - - * dwarf2out.c (add_name_and_src_coords_attributes): Don't add - DW_AT_MIPS_linkage_name to abstract methods. - (dwarf2out_abstract_function): Emit class context before calling - set_decl_abstract_flags. Don't clear DECL_ABSTRACT. - (gen_subprogram_die): Remove obsolete code. - (gen_member_die): Don't include clones in the member list. - (gen_decl_die): Emit abstract info for clone origin. - * dwarfout.c (output_type): Don't include clones in the member list. - * dbxout.c (dbxout_type_methods): Ignore abstract methods. - * toplev.c (note_deferral_of_defined_inline_function): Don't clear - DECL_ABSTRACT on a function that already has it set. - - * dwarf2out.c (gen_formal_types_die): Also accept a FUNCTION_DECL. - (get_subprogram_die): Pass it in. - -2001-02-21 Richard Earnshaw - - * flow.c (mark_set_1): Make not_dead unsigned long. For - non-pseudos, use it as a bitmask of the hard regs that - don't die. - -2001-02-21 Neil Booth - - * cppfiles.c: Update comments. - (_cpp_read_file): Don't check for NULL filenames any more. - * cppinit.c (cpp_start_read): Don't do canonicalization of - in_fname and out_fname. Use the passed file name exclusively. - (_cpp_handle_options): Don't treat "-" as a command line option, - but as a normal filename. - (_cpp_post_options): Canonicalize in_fname and out_fname. - * cppmain.c (printer_init): Don't check out_fname for NULL. - * c-lex.c (orig_filename): Rename cpp_filename for clarity. - (init_c_lex): Update, and use "" to represent stdin to CPP. - (yyparse): Update. - -2001-02-20 Will Cohen - - * config/pa/quadlib.c (_U_Qfcnvfxt_quad_to_usgl): New function. - * config/pa/long_double.h (FIXUNS_TRUNCTFSI2_LIBCALL): Added. - (INIT_TARGET_OPTABS): Use FIXUNS_TRUNCTFSI2_LIBCALL for - fixunstfsi_libfunc. - -2001-02-20 Stan Shebs - - * config/rs6000/rs6000.c (output_cbranch): Output branches - on separate lines instead of using ';' to separate. - -2001-02-20 Neil Booth - - * cppinit.c (set_lang): Move builtin handling to... - (init_builtins): ...here. - (_cpp_create_reader): Move call to set_lang. - -2001-02-20 Mark Mitchell - - * stmt.c (expand_return): If an attempt is made to return the - error_mar_node, treat the return like a return without a value. - -2001-02-19 Zack Weinberg - - * sibcall.c (skip_copy_to_return_value): Call - identify_call_return_value here, and return orig_insn if it - returns zero. Hardret and softret arguments now unnecessary. - (call_ends_block_p): Don't call identify_call_return_value here. - - * ggc-common.c (ggc_mark_rtx_children): No need to mark 'S' or - 's' slots in RTXen. - * ggc-page.c, ggc-simple.c (ggc_mark_if_gcable): Delete function. - * ggc.h (ggc_mark_if_gcable): Delete prototype. - -Mon Feb 19 20:30:16 2001 Jeffrey A Law (law@cygnus.com) - - * pa.c (move_operand): Accept code to load the address of a - symbol out of the DLT as a valid move operand. - (print_operand, case 'A'): New to handle generating a DLT - reference for a LO_SUM expression. - * pa.h (EXTRA_CONSTRAINT): Handle 'A' for DLT LO_SUM references. - * pa.md (movsi, movdi patterns): Allow DLT LO_SUM references. - -2001-02-19 Joseph S. Myers - - * README, cpp.texi, gcc.texi, version.c: Update version number to - 3.1. - * cpp.1, gcov.1, gcc.1: Regenerate. - -2001-02-19 Neil Booth - - * cppfiles.c (stack_include_file): Generate dependencies - here, and manage include_count here too. - (PRINT_THIS_DEP): Delete. - (_cpp_execute_include): Do not generate dependencies here, - apart from the case of a missing header. Do not manage - include_count. - (_cpp_read_file): Leave dependency generation to - stack_include_file. - -Mon Feb 19 10:17:47 2001 Jeffrey A Law (law@cygnus.com) - - * config.gcc (hppa*64*-*-hpux11*): Add MASK_GAS to - target_cpu_default. Remove dead assignment to - target_cpu_default. - -Mon Feb 19 16:47:39 CET 2001 Jan Hubicka - - * regclass.c (contains_reg_of_mode): Make global. - (init_reg_sets): Remove contains_reg_of_mode; take into account - CLASS_MAX_NREGS when looking for the proper mode. - (dump_regclass): Dump only classes considered for the pseudo. - (regclass): Use contains_reg_of_mode. - -Mon Feb 19 16:45:42 CET 2001 Jan Hubicka - - * gcc.c (do_spec_1): 'n' for printing notices. - * i386.h (CC1_CPU_SPEC): Notice deprecated options as deprecated. - -Mon Feb 19 15:51:30 CET 2001 Jan Hubicka - - * reg-stack.c (next_flags_user): Use current_block->end - (swap_rtx_condition): Look for next user if flags don't die; - give up on CALL_INSNs; use current_block->end. - -Mon Feb 19 08:27:21 2001 Richard Kenner - - * sibcall.c (call_ends_block_p): New function. - (optimize_sibling_and_tail_recursive_call): Use it. - -2001-02-18 Kazu Hirata - - * config/h8300/h8300.md: Update copyright. - (andsi3): Do not output an extra newline character. - -Sun Feb 18 15:45:17 2001 Richard Kenner - - * toplev.c (note_deferral_of_defined_inlined_function): Argument - FNDECL may be unused. - - * toplev.c (rest_of_compilation): Don't have CSE skip blocks or - follow jumps after first run. - If -fexpensive-optimizations rerun CSE after GCSE and iterate until - it doesn't change any jumps. - -Sun Feb 18 17:05:50 2001 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (rtlanal.o): Depend on hard-reg-set.h. - ($HOST_PREFIX_1)rtlanal.o: Remove rules for building - (mostlyclean): Corresponding changes. - * rtlanal.c (hard-reg-set.h): Include. - (rtx_unstable_p): Do not treat the argument pointer specially - if it is not a fixed register. - (rtx_varies_p, rtx_addr_can_trap_p): Similarly. - -Sun Feb 18 15:45:17 2001 Richard Kenner - - * sibcall.c (optimize_sibling_and_tail_recursive_call): Compare - against last real insn in basic block. - Rework to avoid gotos. - - * Makefile.in (gcse.o): Now includes ggc.h. - * gcse.c: Include ggc.h. - (want_to_gcse_p): Verify expression can be in SET as valid insn. - (try_replace_reg): Remove warning of uninitialize variable. - (process_insert_insn): Call invalid_insn_p to validate insn. - * recog.c (insn_invalid_p): Now global. - See if can make valid by adding CLOBBERs of SCRATCH only and do if so. - * recog.h (insn_invalid_p): New declaration. - - * jump.c (jump_optimize_1): Only define reversed_code #ifdef HAVE_trap. - - * config/sparc/sparc.c (eligible_for_epilogue_delay): Don't put - assignments from FP constants since 'Y' output code can't handle it. - (eligible_for_sibcall_delay): Likewise. - - * flow.c (print_rtl_and_abort_fcn): Renamed from print_rtl_and_abort. - Call fancy_abort directly, passing args. - (print_rtl_and_abort): Now a macro, like fancy_abort. - - * final.c (output_operand_lossage): Use internal_error, not error. - -2001-02-18 Shane Nay - - * mips.c (mips_expand_prologue) Add REG_MAYBE_DEAD to - structure shift insns. - -2001-02-18 Mark Mitchell - - * invoke.texi (-fsquangle): Remove documentation. - (-fname-mangling-version): Likewise. - -2001-02-18 Lars Brinkhoff - - * optabs.c (expand_abs): Remove reference to - HAVE_contitional_arithmetic. - * combine.c (simplify_set): Likewise. - -2001-02-18 Richard Henderson - - * ifcvt.c (dead_or_predicable): Don't move code if eh regions - would be disrupted. - -2001-02-18 Richard Henderson - - * config/ns32k/ns32k.h (ADJSP): Upcase arguments. - - * config/alpha/alpha.md (movsi_fix): Fix typo in pattern name. - - * reload1.c (reload_cse_simplify_set): Fix typo. - -Sun Feb 18 09:30:09 2001 Richard Kenner - - * diagnostic.c (_fatal_insn): Decrement errorcount. - - * invoke.texi (-I): Add note avoiding use for system header files. - - * rtl.h (add_clobbers): Remove duplicate declaration. - * recog.h (added_clobbers_hard_reg_p): New declaration. - * genemit.c (struct clobber_pat): New field has_hard_reg. - (gen_insn): Record if added clobbers clobber hard reg. - (gen_split): Avoid unused warning if number of operands is 0. - (output_added_clobbers_hard_reg_p): New function. - (main): Call it. - -2001-02-18 Alan Modra - - * pa.c (hppa_expand_prologue): Simplify code storing return - pointer. For large (>=8k) frames with a post_store, adjust stack - pointer by 8k-64 first rather than by 64. When testing with - VAL_14_BITS_P, always use the actual value rather than the value - negated. Add blockage to prevent scheduling of spills before - stack frame has been created. - (hppa_expand_epilogue): Simplify code loading return pointer. - Allow a slightly larger range for merge_sp_adjust_with_load case. - When testing with VAL_14_BITS_P, always use the actual value. - - * pa.c (pa_adjust_insn_length): Check that block move - pattern is a set before looking at operands. - -2001-02-17 Mark Mitchell - - * fold-const.c (fold_binary_op_with_conditional_arg): New - function, split out from ... - (fold): ... here. - * tree.def (COND_EXPR): Document the use of VOID_TYPE for - conditional arms that throw exceptions. - - * print-tree.c (print_node): Do not use BLOCK_CHAIN when we're not - looking at a BLOCK. - -2001-02-17 Kaveh R. Ghazi - - * aclocal.m4 (gcc_AC_CHECK_DECL): Before attempting the test, - define HAVE_DECL_* to 1 to mask potential backup declarations. - * configure: Regenerated. - -2001-02-17 Mark Mitchell - - * invoke.texi (-Woverloaded-virtual): Clarify documentation. - -2001-02-17 Richard Henderson - - * reload1.c (reload_cse_simplify_set): Respect LOAD_EXTEND_OP - when replacing a memory load with a register. - -Sat Feb 17 14:48:30 2001 Richard Kenner - Jan Hubicka - - * recog.c (validate_replace_src_1): New. - (validate_replace_src_data): Likewise. - (validate_replace_src): Use note_uses. - * rtl.h (note_uses): Declare. - * rtlanal.c (note_uses): New. - -Sat Feb 17 10:52:34 CET 2001 Jan Hubicka - - * reg-stack.c (stack_def): Make field reg unsigned. - (remove_regno_note): Unsignetize parameter. - -2001-02-16 Jes Sorensen - - * ia64.c (errata_emit_nops): Add VOIDmode as second argument to - shladd_operand() call. - -2001-02-16 Bruce Korb - Rodney Brown - - * fixinc/mkfixinc.sh: Use C fixincludes for UnixWare 7. - * fixinc/inclhack.def: Add fixinc.svr4 patterns with matching - machine restrictions - * fixinc/fixincl.x: regen - -Fri Feb 16 12:41:30 2001 Richard Kenner - - * gcse.c (hash_scan_set): If cprop, see if REG_EQUAL or REG_EQUIV. - Don't CSE a nop. - (hash_scan_insn): Clean up calls to hash_scan_set. - (compute_kill_rd): REGNO now unsigned. - (try_replace_reg): Rework to use simplify_replace_rtx. - (cprop_jump, cprop_cc0_jump): Likewise. - (cprop_insn): Call find_reg_equal_equiv_note. - Reflect changes to cprop_jump and cprop_cc0_jump. - - * recog.c (validate_replace_src): Replace in operands of - ZERO_EXTRACT in SET_DEST. - - * cse.c (new_label_ref): New variable. - (insert): Set it instead of recorded_label_ref. - (cse_basic_block): Set recorded_label_ref if new_label_ref use, has - CODE_LABEL for this function, and not already in REG_LABEL note. - -2001-02-16 Jeffrey Oldham - - * resource.c (mark_referenced_resources): Fix typo in introductory - comment. - * config/mips/abi64.h (SUBTARGET_TARGET_OPTIONS): Fix typo in - string constant. - -2001-02-16 Jason Merrill - - * dwarf2out.c (add_bound_info): Don't crash if SAVE_EXPR_RTL is - NULL. - (gen_subprogram_die): Don't abort on seeing a second definition if - the previous one was abstract. Don't replace an abstract instance - in the lookup table. - - * dwarf2out.c (dwarf2out_abstract_function): Rename from - gen_abstract_function. - * dwarf2out.h: Declare it. - * toplev.c (note_outlining_of_inline_function): New fn. - * toplev.h: Declare it. - * integrate.c (output_inline_function): Call it. - * c-decl.c (duplicate_decls): Call it when redefining an extern - inline. Don't inline the new defn. - - * tree.h (BLOCK_CHAIN): Use BLOCK_CHECK. - -2001-02-16 Gerald Pfeifer - - * .gdbinit: Rename to gdbinit.in. - * gdbinit.in: New file, - * configure.in: Generate .gdbinit from gdbinit.in. - * configure: Regenerated. - * Makefile.in (distclean): Always remove .gdbinit. - -2001-02-16 Jakub Jelinek - - * objc/objc-act.c (start_class): Register implemented_classes with - GC. - -2001-02-16 Neil Booth - - * cppfiles.c (_cpp_make_system_header): Generate a file - change callback. - -2001-02-15 Jim Meyering - - * Makefile.in (install-common): Don't depend on installdirs here. - Instead, make each of the lang.install-common targets (e.g., - c++.install-common in cp/Make-lang.in) depend on it. - (install-driver): Depend on installdirs. - -Thu Feb 15 21:30:26 2001 Richard Kenner - - * flow.c (tidy_fallthru_edge): Never end block on line number NOTE. - - * function.c (assign_parms): Set RTX_UNCHANGING_P in pseudo when we - do in memory. - -2001-02-15 Mark Mitchell - - * invoke.texi (--param): Document. - -Thu Feb 15 15:16:38 2001 Alexandre Oliva - - * config/sh/sh.h (BOOL_TYPE_SIZE): Don't define. - -Thu Feb 15 10:52:31 CET 2001 Jan Hubicka - - * i386.md (extendsfdf2_2): Fix constraints. - -Thu Feb 15 09:46:21 CET 2001 Jan Hubicka - - * i386.md (fop_df_3 splitter): Fix operand number. - -Wed Feb 14 12:37:37 CET 2001 Jan Hubicka - - * invoke.texi (-mreg-alloc): Nuke. - * i386.c (ix86_reg_alloc_order, regs_allocated, - order_regs_for_local_alloc): Nuke. - (override_options): Kill reg_alloc code. - * i386.h (TARGET_OPTIONS): Kill reg-alloc. - (REG_ALLOC_ORDER): SSE goes before I387. - (ORDER_REGS_FOR_LOCAL_ALLOC): Kill. - (ix86_reg_alloc_order): Likewise. - * i386-protos.h (ix86_reg_alloc_order): Kill. - -2001-02-14 Richard Henderson - - * toplev.c (f_options): Clarify -fschedule-insns2 documentation. - -Wed Feb 14 11:59:58 CET 2001 Jan Hubicka - - * i386.h (RETURN_IN_MEMORY): Fix formating; reject TFmodes - -Wed Feb 14 11:12:38 CET 2001 Jan Hubicka - - * i386-protos.h (ix86_memory_move_cost): Move offline. - * i386.c (ix86_register_move_cost): Compute properly cost of - SSE, MMX and i387 instructions. - (*_cost): Add costs of SSE/MMX moves. - (ix86_memory_move_cost): Move offline from ....; Likewise. - * i386.h (MEMORY_MOVE_COST): .... here; - (struct processor costs): Add new fields to represent costs - of SSE/MMX moves. - -Wed Feb 14 10:08:26 CET 2001 Jan Hubicka - - * regclass.c (init_reg_sets_1): Reinstall the optimization of - move_cost together with Matt Kraai's fix. - -2001-02-14 Jeffrey Oldham - - * Makefile.in (OBJS): Add params.o. - -2001-02-14 Richard Henderson - DJ Delorie - - * jump.c (jump_optimize_1): When we delete a conditional jump - preceding a non-conditional jump to effectively the same place, - make sure that the combined jump skips any clobber insns between - the two labels. - -2001-02-14 Jeffrey Oldham - - * gcc.c (do_spec_1): Fix off-by-one error for '%M' case. - -2001-02-14 Mark Mitchell - - * Makefile.in (toplev.o): Depend on params.h. - (intergate.o): Likewise. - (params.o): New target. - * flags.h (inline_max_insns): Remove. - * integrate.c: Include params.h. - Use MAX_INLINE_INSNS instead of inline_max_insns. - * params.c: New file. - * params.h: Likewise. - * params.def: Likewise. - * toplev.c: Include params.h. - (lang_independent_params): New variable. - (decode_f_option): Use the param machinery instead of setting - max_inline_insns. - (independent_decode_option): Handle "--param name=value". - (main): Register language-independent parameters. - -Wed Feb 14 11:13:45 CET 2001 Jan Hubicka - - * i386.md (pushsf, pushdf_nointeger): Fix constraint. - -2001-02-14 Richard Henderson - - * regclass.c (init_reg_sets_1): Revert last two changes. - -2001-02-14 Jakub Jelinek - - * stor-layout.c (is_pending_size, put_pending_size): New functions. - (variable_size): Call put_pending_size. - * tree.h (is_pending_size, put_pending_size): Add prototypes. - * fold-const.c (extract_muldiv): If SAVE_EXPR is on the pending - sizes list, put newly created SAVE_EXPR there as well. - -2001-02-14 Jakub Jelinek - - * config/ia64/ia64.c (last_group): Only 2 entries are needed. - (errata_find_address_regs): load_group has only 2 entries. - (errata_emit_nops): Likewise. shladd is not problematic. - Clear last_group if nop was emitted. - (fixup_errata): load_group has only 2 entries. - Optimize. - -2001-02-14 Neil Booth - - * c-lex.c (lex_number): Only warn traditionally for U suffix - outside system macros. - * cppexp.c (parse_number): Similarly. - * cpplib.h (NODE_SYSHDR, cpp_sys_objmacro_p): New. - * cppmacro.c (struct cpp_macro): New member node. - (parse_args): Only warn about missing rest args if not - a system macro. - (funlike_invocation_p): Similarly for uninvoked funlike macros. - (cpp_sys_objmacro_p): New. - (_cpp_create_definition): Store the node with the macro defn. - Remember if the macro is defined in a system header. - -2001-02-13 DJ Delorie - - * configure.in (check_languages): determine languages to check - * Makefile.in (check-c++): alias for check-g++ - (check-f77): alias for check-g77 - (CHECK_TARGETS): depend on configured languages - -Wed Feb 14 01:13:59 CET 2001 Jan Hubicka - - * i386.md (fixsfsi2, fixdfdi2): Fix previous patch again. - (sqrtsf2): Use TARGET_SSE instead of TARGET_SSE2) - (sqrtsf2 patterns): Use 'x' instead of 'Y'. - (sqrtextendsfdf2): Disable for SSE2. - -Wed Feb 14 00:19:28 CET 2001 Jan Hubicka - - * i386.md (fixsfsi2, fixdfdi2): Fix previous patch again. - (sqrtsf2): Use TARGET_SSE instead of TARGET_SSE2) - (sqrtsf2 patterns): Use 'x' instead of 'Y'. - (sqrtextendsfdf2): Disable for SSE2. - -Wed Feb 14 00:11:20 CET 2001 Jan Hubicka - - * i386.md (movsfcc_1): Support integer cmove instruction. - (movdfcc_1): Likewise; new splitter. - -Tue Feb 13 23:19:27 CET 2001 Jan Hubicka - - * i386.c (output_fp_compare): Support SSE. - (prepare_fp_compare_args): SSE comparisons always support memory. - * i386.h (TARGET_CMOVE): SSE imply cmove. - * i386.md (cmp?f2): Enable for SSE too. - (cmpfp_i*): Support SSE. - (cmpfp_i_sse): New. - (cmpfp_i_sse_only): New. - (s*, b* fp expanters): Enable for SSE too. - (fp_jcc_1_sse, fp_jcc_1_sse_only, fp_jcc_2_sse, fp_jcc_2_sse_only): - New patterns. - -Tue Feb 13 23:05:42 CET 2001 Jan Hubicka - - * regclass.c (init_reg_sets_1): Silence warning. - -Tue Feb 13 22:03:07 CET 2001 Jan Hubicka - - * i386.md (sqrt?f2): Change to expander. - (sqrt?f2_1, sqrt?f2_sse_only, sqrt?f2_i387): New. - -Tue Feb 13 15:42:05 2001 Richard Kenner - - * rtlanal.c (find_reg_equal_equiv_note): New function. - * simplify-rtx.c (simplify_gen_unary, simplify_gen_ternary): New fns. - (simplify_gen_relational, simplify_replace_rtx): Likewise. - * rtl.h: Add declarations for above functions. - -Tue Feb 13 21:09:11 CET 2001 Jan Hubicka - - * cse.c (cse_main): Converts ifdefs on PIC_OFFSET_TABLE_REGNUM to - conditionals. - * defaults.h (PIC_OFFSET_TABLE_REGNUM): Default to INVALID_REGNUM. - * emit-rtl.c (init_emit_once): Convert ifdefs to conditionals. - * flow.c (mark_regs_live_at_end): Likewise. - (calculate_global_regs_live): Likewise. - * gcse.c (compute_hash_table): Likewise. - (compute_kill_rd): Likewise. - * resource.c (mark_target_live_regs): Likewise. - * rtl.h (INVALID_REGNUM): New macro. - -Tue Feb 13 20:59:22 CET 2001 Jan Hubicka - - * i386.md (fixsfsi2, fixdfdi2): Fix previous patch. - -Tue Feb 13 16:32:20 CET 2001 Jan Hubicka - - * i386.md (fixsfsi2, fixdfdi2): Force operand to register - for SSE. - -Tue Feb 13 14:53:16 CET 2001 Jan Hubicka - - * i386.md (add?f3, sub?f3, mul?f3, dif?f3): Enable for TARGET_SSE(2) - too. - (fop_sf_comm, fop_df_comm, fop_sf_1, fop_df_1): Support SSE. - (fop_sf_comm_sse, fop_df_comm_sse): New patterns. - (fop_sf_1_sse, fop_df_1_sse): New patterns - (fop_*): Disable float_extend and float patterns for SSE compilation. - * i386.c (output_387_binary_op): Support SSE. - -Tue Feb 13 14:16:34 CET 2001 Jan Hubicka - - * i386.md (dummy_extendsfdf2): Support SSE2 - (extendsfdf2): Enable if 80387 or SSE2. - (extendsfdf2_1): Support SSE2. Disable if SSE2 is avialble - and no MIX_I387_SSE2 - (extendsfdf2_1_sse_only): New pattern. - (truncdfsf2): Enable if SSE2 or 80387; Always use SSE only version - of SSE. - (truncdfsf2_1): Support SSE. - (truncdfsf2_2): Support SSE. - (truncdfsf2_2_1_sse): New pattern. - (fixtruncsfsi2): Always use SSE if available. - (fix_truncsfsi_sse): New pattern. - (fix_truncdfsi_sse): New pattern. - (floatsis?f2): Support SSE. - (floatsidf2_i387): New pattern. - (floatsidf2_sse): Likewise. - -Tue Feb 13 07:52:04 2001 Richard Kenner - - * configure.in: Use "have_gnat" variable, not "gnat". - * configure: Regenerated. - - * config/sparc/sparc.c (function_value): Treat all non-record - aggregate types like used to treat UNION_TYPE. - -Tue Feb 13 13:31:33 CET 2001 Jan Hubicka - - * i386.c (print_reg): Use ANY_FP_REG instead of FP_REG - * i386.h (MASK_128BIT_LONG_DOUBLE): Renumber - (MASK_SSE2): New. - (MASK_MIX_SSE_I387): New. - (TARGET_SSE): SSE2 imply SSE. - (TARGET_SSE2, TARGET_MIX_SSE_I387): New. - (TARGET_SWITCHES): Add "sse2", "mix-sse-i387". - (enum reg_class): Add new classes. - (REG_CLASS_NAMES): Likewise. - (REG_CLASS_CONTENTS): Likewise. - (ANY_FP_REG_P, ANY_FP_REGNO_P, SSE_REG_P, SSE_FLOAT_MODE): New macros. - (REG_CLASS_FROM_LETTER): 'x' and 'y' is SSE_REGS only when SSE is - supported. Add 'Y' to be SSE_REGS when SSE2 is supported. - (CLASS_MAX_NREGS): Use new macros. - (REGISTER_MOVE_COST): Rewrite using SECONDARY_MEMORY_MAYBE_NEEDED. - * i386.md (pushsf, movsf): Support SSE. - (pushdf_nointeger, pushdf_integer, pushdf): Support SSE, update - splitters to use ANY_FP_REGNO_P. - (movdf_nointeger, movdf_integer): Likewise. - -2001-02-13 Alexandre Oliva - - * combine.c (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD): New macro. - (try_combine): Use it. - -Tue Feb 13 11:37:06 CET 2001 Jan Hubicka - - * i386.h (SSE_CLASS_P, MMX_CLASS_P, MAYBE_FLOAT_CLASS_P, - MAYBE_SSE_CLASS_P, MAYBE_MMX_CLASS_P): New macros. - (PREFERRED_RELOAD_CLASS, SECONDARY_MEMORY_NEEDED): Move offline. - (REGISTER_MOVE_COST): Likewise. - * i386-protos.h (ix86_secondary_memory_needed, - ix86_preferred_reload_class, ix86_register_move_cost): Declare. - * i386.c (ix86_secondary_memory_needed, - ix86_preferred_reload_class, ix86_register_move_cost): New function. - -Die Feb 13 11:04:25 CET 2001 Jan Hubicka - - * i386.h (VALID_FP_MODE_P, VALID_INT_MODE_P): New. - (HARD_REGNO_MODE_OK): Move offline to .... - * i386.c (ix86_hard_regno_mode_ok) ... here; - refuse all incorrect modes. - * i386-protos.h (ix86_hard_regno_mode_ok): Declare. - -2001-02-13 Richard Henderson - - * sparc.md (cmp_cc_arith_op_set): Don't use match_dup on the - entire operator; replicate that and match_dup the operands. - (cmp_ccx_arith_op_set): Likewise. - (cmp_cc_arith_op_not_set): Likewise. - (cmp_ccx_arith_op_not_set): Likewise. - -2001-02-13 Alexandre Oliva - - * explow.c (trunc_int_for_mode): Sign-extend value to mode. - -2001-02-12 Geoffrey Keating - - * config/rs6000/sysv4.h (MASK_NO_BITFIELD_WORD): New macro. - (TARGET_NO_BITFIELD_WORD): New macro. - (SUBTARGET_SWITCHES): Add -mbit-word, -mno-bit-word options. - (BITFIELD_NBYTES_LIMITED): Define based on TARGET_NO_BITFIELD_WORD. - -Mon Feb 12 18:13:26 2001 Richard Kenner - - * cselib.c: New file, from simplify-rtx.c. - * simplify-rtx.c: Remove cselib parts. - * Makefile.in: Add cselib.o. - -2001-02-12 Geoffrey Keating - - * config/rs6000/rs6000.c (rs6000_float_const): Remove warning. - (setup_incoming_varargs): Remove warning. - - * config/rs6000/rs6000.c (validate_condition_mode): When - flag_fast_math, allow floating-point conditionals to be reversed. - (rs6000_generate_compare): When flag_fast_math, don't generate - cror operations for FP conditionals. - - * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Handle - -mcall-i960. - (ASM_SPEC): Likewise. - (CC1_ENDIAN_LITTLE_SPEC): Likewise. - (CC1_SPEC): Likewise. - (LINK_TARGET_SPEC): Likewise. - (CPP_ENDIAN_SPEC): Likewise. - * Makefile.in (check-consistency): New target. - -2001-02-12 Joseph S. Myers - - * c-decl.c (grokdeclarator): In C99 mode, give the more specific - "return type defaults" warning for functions with return type - defaulting to int. - * c-lang.c (c_init): In C99 mode, enable warnings for implicit - function declarations by default rather than only when pedantic. - -Mon Feb 12 17:28:48 CET 2001 Jan Hubicka - - * regclass.c (init_reg_sets_1): Optimize calculation of move_cost - arrays. - -2001-02-12 Nathan Sidwell - - * extend.texi (Deprecated): Deprecate new initializer lists. - -2001-02-12 Nathan Sidwell - - * mkdeps.c (deps_add_default_target): Robustify. Add - basename component only. - * cpp.texi (-M): Describe how default target is generated. - * invoke.texi (-M): Likewise. - -2001-02-12 Kazu Hirata - - * toplev.c (push_float_handler): Remove. - (pop_float_handler): Remove. - * toplev.h: Remove prototypes for the above functions. - -2001-02-12 Jakub Jelinek - - * c-common.c (constant_fits_type_p): New function. - (convert_and_check): Use it. - -2001-02-11 Mark Mitchell - - * Makefile.in (GXX_ABI_FLAG): Don't define. - * configure.in (--enable-new-gxx-abi): Remove option. - * config.in: Regenerated. - * configure: Likewise. - -2001-02-12 Alexandre Oliva - - * lcm.c (compute_earliest): Let EXIT_BLOCK be handled as a regular - basic block. - (optimize_mode_switching) [NORMAL_MODE]: Set up EXIT_BLOCK as a - regular basic block, and arrange for all edges into it to switch - to normal mode. - -2001-02-11 Gerald Pfeifer - - * Makefile.in (distclean): Do not remove .gdbinit. - -2001-02-11 Mark Mitchell - - * Makefile.in (gcc.o): Fix typos. - (protize.o): Likewise. - (unprotoize.o): Likewise. - -2001-02-11 Richard Henderson - - * tree.c (build1): Check for null operand in last change. - -2001-02-11 Richard Henderson - - * fold-const.c (split_tree): Don't assume a constant isn't splittable. - (fold): Don't assume a constant isn't foldable. - * tree.c (build): Set TREE_CONSTANT for an expression with no - side-effects and constant operands. - (build1): Likewise. - -2001-02-10 Richard Henderson - - * jump.c (squeeze_notes): Revert 2000-05-12 change. - -2001-02-10 Anthony Green - - * cpp.texi (Standard Predefined): Add documentation for - __OPTIMIZE_SIZE__. - - * c-common.c (combine_strings): Improve warning message. - -2001-02-10 Geoffrey Keating - - * config/rs6000/sysv4.h (LINK_TARGET_SPEC): Use two dashes for - --oformat. - * config/rs6000/sysv4le.h (LINK_TARGET_SPEC): Likewise. - -Fri Feb 9 15:05:27 2001 Christopher Faylor - - * config/i386/t-cygwin (T_CPPFLAGS): Use correct location for - CYGWIN_CROSS_DIR. - -2001-02-09 Alexandre Oliva - - * config/sh/sh.md (sibcalli, sibcalli_pcrel, sibcalli): Set - fp_mode attribute. - -2001-02-09 Nick Clifton - - * config/arm/arm.md: Change output contraint on post inc - load/store multiple patterns to be a read/write contraint. - -2001-02-09 Neil Booth - - * gcc.c (cpp_options): Delete .d files on error. Don't delete - .o files when using the -M options. - -2001-02-08 Franz Sirl - David Edelsohn - - * config/rs6000/rs6000.c (output_toc): Allow 32-bit targets to - handle DImode constants. Use one TOC entry for SImode and smaller - constants, aligned properly. - -2001-02-08 Jason Merrill - - * config/arm/arm.c (arm_expand_prologue): Do tell the dwarf2 backend - about the SP adjustment for saving the static chain pointer. - * dwarf2out.c (dwarf2out_frame_debug_expr): Use the specified - offset when setting a temporary CFA register. - -2001-02-08 Chandrakala Chavva - - * config.gcc : New targets, i386-*-chorusos*, sparc-*-chorusos*, - powerpc-*-chorusos* . - * config/rs6000/chorus.h : New file. - * config/i386/chorus.h : New file. - * config/sparc/chorus.h : New file. - * config/sparc/t-chorus-elf : New file. - -2001-02-08 David Edelsohn - - * config/rs6000/rs6000.h (ASM_OUTPUT_SYMBOL_REF): Move from here ... - * config/rs6000/aix.h (ASM_OUTPUT_SYMBOL_REF): ... to here. - * config/rs6000/aix51.h (CPLUSCPLUS_CPP_SPEC): Define it. - (__WCHAR_TYPE__): Correct macro name. - -2001-02-08 Richard Henderson - - * config/i386/i386.c (ix86_frame_pointer_required): New. - (ix86_setup_frame_addresses): New. - (struct machine_function): Add accesses_prev_frame. - * config/i386/i386.h (FRAME_POINTER_REQUIRED): Call - ix86_frame_pointer_required. - (SUBTARGET_FRAME_POINTER_REQUIRED): New. - (SETUP_FRAME_ADDRESSES): New. - * config/i386/i386-protos.h: Update. - * config/i386/sco5.h (SUBTARGET_FRAME_POINTER_REQUIRED): Rename - from FRAME_POINTER_REQUIRED. - * config/i386/svr3gas.h: Likewise. - * config/i386/sysv3.h: Likewise. - * config/i386/v3gas.h: Likewise. - -2001-02-08 Richard Henderson - - * config/sparc/sparc.c (function_arg_record_value_3): Fix - calculation of the number of integer registers required. - (function_arg_record_value): Likewise. - -2001-02-08 Jason Merrill - - * diagnostic.c (internal_error): Say "confused" after 1 error, not - two. Print file and line with "confused" message. - - * dwarf2out.c (dwarf2out_line): Include filename in -dA output. - -Thu Feb 8 11:21:28 2001 Richard Kenner - - * rtlanal.c (remove_node_from_expr_list): Correctly update PREV. - -2001-02-08 Bernd Schmidt - - * final.c (cleanup_subreg_operands): The address of a MEM can - contain SUBREGs. - - * config/ia64/ia64.c (ia64_variable_issue): Call group_barrier_needed_p - for asms, too. - -2001-02-08 Joseph S. Myers - - * gcc.texi (Incompatibilities): Update documentation of - preprocessing numbers. - -2001-02-07 Jakub Jelinek - - * c-decl.c (finish_enum): Revert part of 2000-01-05 change. - -2001-02-07 Mark Mitchell - - * config/rs6000/aix43.h (CPLUSCPLUS_CPP_SPEC): Define it. - - * defaults.h (CPLUSPLUS_CPP_SPEC): New macro. - * gcc.c (struct compiler): Add cpp_spec field. - (input_file_compiler): New variable. - (do_spec_1): Allow a particular compiler to handle `%C' - specially. - (main): Store the current compiler in input_file_compiler. - * tm.texi (CPLUSPLUS_CPP_SPEC): Document. - -2001-02-07 Zack Weinberg - - * cpphash.h (struct spec_nodes): Add n_true and n_false. - * cppinit.c (cpp_create_reader): Initialize them. - (append_include_chain): cxx_aware arg might be unused. - * cppexp.c (lex): In C++ mode, recognize 'true' and 'false' - keywords and give them their phase 7 meaning. Pedwarn about - this unless '__bool_true_false_are_defined' is defined. - -2001-02-07 Alexandre Oliva - - * lcm.c (optimize_mode_switching): Emit mode_set before the - JUMP_INSN of an abnormal edge. - -2001-02-07 Bernd Schmidt - - * builtins.c (expand_builtin_setjmp_receiver): Emit an ASM_INPUT as - a scheduling barrier at the end. - - * tm.texi (MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): Document. - -2001-02-07 Alexandre Oliva - - * config/sh/sh.md (reload_outsf): Removed. - (movsf_ie): Introduce constraints for FPUL loads and stores. - (reload_insf): Broaden the output constraint. - - * config/elfos.h (INT_ASM_OP): Don't define it if it's already - defined. - * config/sh/sh.h (INT_ASM_OP, ASM_OUTPUT_CONSTRUCTOR, - ASM_OUTPUT_DESTRUCTOR): Copy definitions from config/elfos.h. - -2001-02-06 Chandrakala Chavva - - * final.c: Revert my previous changes. - * output.h: Make profile_label_no extern. - * config/rs6000/rs6000.c (output_profile_hook): Use standard functions - for generating label. - -2001-02-06 Laurynas Biveinis - - * config/i386/djgpp.h: Add comments about standard paths. - (MD_EXEC_PREFIX): Undefine before defining. - (MD_STARTFILE_PREFIX): New. - -2001-01-30 Bruce Korb - - fixinc/fixincl.c(process): Emit error message only if appropriate :) - (load_file): do not rely on load_file_data() to close file pointer - fixinc/fixlib.c(load_file_data): do not close passed in file pointer - fixinc/inclhack.def(irix_limits_const): add test_text - -2001-02-06 Neil Booth - - * cppexp.c (parse_defined): Improve diagnostics for invalid - syntax. - -2001-02-06 Neil Booth - - * cppmacro.c (cpp_get_token): Avoid pasting after a builtin. - -2001-02-06 Mark Mitchell - - * config/rs6000/rs6000.h (ASM_OUTPUT_SYMBOL_REF): Define. - * config/rs6000/rs6000-protos.h (rs6000_output_symbol_ref): Declare. - * config/rs6000/rs6000.c (VTABLE_NAME_P): New macro. - (rs6000_output_symbol_ref): New function. - (output_toc): Use VTABLE_NAME_P. - -Tue Feb 6 07:54:51 2001 Richard Kenner - - * print-tree.c (print_node, case PARM_DECL): - Print DECL_ARG_TYPE and DECL_ARG_TYPE_AS_WRITTEN. - - * stor-layout.c (reference_types_internal): New variable. - (internal_reference_types): New function. - (layout_type, case REFERENCE_TYPE): Make Pmode if internal. - * tree.h (internal_reference_types): New declaration. - - * cse.c (find_best_addr): Fix typo in computing cost. - -Mon Feb 5 21:56:16 2001 Richard Kenner - - * combine.c (nonzero_bits, case PLUS): If pointers extend unsigned - and this is the sum of a pointer and a constant, we know the result - did not overflow. - (num_sign_bit_copies, case PLUS): Likewise. - * explow.c (convert_memory_address): Remove opposite SUBREG. - * function.c (instantiate_new_reg): New function (from common code). - (instantiate_virtual_regs_1): Call it. - For PLUS, handle if (plus (subreg (virt-reg) (const_int)) - if pointers sign- or zero-extend. - * simplify-rtx.c (simplify_unary_operation, case ZERO_EXTEND): - If pointers extend unsigned, use inside of SUBREG. - (simplify_unary_operation, case SIGN_EXTEND): Likewise, if sign extend. - -2001-02-05 Benjamin Kosnik - - * Makefile.in (-DGPLUSPLUS_TOOL_INCLUDE_DIR): Change to target - subdir of gcc_gxx_include_dir. - (gcc_gxx_target_include_dir): Remove. - -2001-02-05 Jeffrey Oldham - - * dwarf2out.c: Revise DWARF2 Abbreviation Glossary comments. - (dwarf2out_frame_debug_expr): Revise introductory comments to add - a high-level description. - -2001-02-05 Chandrakala Chavva - - * final.c: Move the declaration of profile_label_no to ... - * output.h: ... here. - * function.c (expand_function_start): Call PROFILE_HOOK. - * config/rs6000/aix.h: Define PROFILE_HOOK. - * config/rs6000/rs6000-protos.h: output_profile_hook new. - * config/rs6000/rs6000.c (output_profile_hook): Define. - (output_prolog): Do nothing for ABI_AIX as it is taken care by - output_profile_hook. - tm.texi : Explain new macro PROFILE_HOOK. - -2001-02-06 Hans-Peter Nilsson - - * extend.texi (Extended Asm): Do not say that semicolon is always - a valid line-breaking character for GNU assemblers. Use - newline-tab as the most commonly supported syntax. Use - newline-tab rather than semicolon in multi-insn examples. - -2001-02-05 Franz Sirl - - * Makefile.in (gcc_gxx_target_include_dir): Use $(target_alias). - -2001-02-05 Franz Sirl - David Edelsohn - - * config/rs6000/rs6000.c (rs6000_return_addr): Use PIC - code for AIX, even without flag_pic. - -2001-02-05 Jakub Jelinek - - * c-typeck.c (common_type): push and pop binding level around - calling common_type on function parameters. - -Mon Feb 5 14:30:37 2001 Christopher Faylor - - * config/i386/cygwin.h (CPP_SPEC): Add missing space after -idirafter. - -Mon Feb 5 11:23:16 2001 Richard Kenner - - * config/mips/mips.c (override_options): Fix typo in last change. - (mips_make_temp_file): Call fatal_io_error, not pfatal_with_name. - (mips_asm_file_end): Likewise; also pass more args to fatal_io_error. - -2001-02-05 Nathan Sidwell - - * invoke.texi (-fdump-class-layout): Document. - (-fdump-translation-unit): Use `=' as filename separator. - -2001-02-05 Mark Mitchell - - * Makefile.in (s-mlib): Don't build multilibs if - --disable-multilib. - (DRIVER_DEFINES): Adjust accordingly. - (gcc.o): Likewise. - (protoize.o): Likewise. - (unprotoize.o): Likewise. - * configure.in: Recognize --enable-multilib. - -2001-02-04 Mark Mitchell - - * Makefile.in (DRIVER_DEFINES): Fix quoting. - - * Makefile.in (site.exp): Always set HAVE_LIBSTDCXX_V3. - * configure.in: Remove --enable-libstdcxx_v3 support. - * configure: Regenerated. - -Sun Feb 4 15:52:44 2001 Richard Kenner - - * config/avr/avr.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): - Call abort instead of fatal. - (TRAMPOLINE_TEMPLATE): Call internal_error instead of fatal. - * config/dsp16xx/dsp16xx.h (FUNCTION_PROFILER): Likewise. - (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Likewise. - (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Likewise. - (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Likewise. - * config/rs6000/rs6000.h (RETURN_ADDRESS_OFFSET): Likewise. - - * diagnostic.h (set_internal_error_function): Renamed. - * toplev.h (internal_error): Renamed from fatal. - (pfatal_with_name): Deleted. - (fatal_io_error): Now has printf-style arguments. - * diagnostic.c (pfatal_with_name): Deleted. - (fatal_io_error): Rework to have args in printf-style. - (set_internal_error_function): Renamed from set_fatal_function. - (internal_error): Renamed from fatal. - (error_recursion, fancy_abort): Call internal_error instead of fatal. - * dwarf2out.c (get_cfa_from_loc_descr): Likewise. - * emit-rtl.c (gen_realpart, gen_imagpart): Likewise. - * expr.c (check_max_integer_computation_mode, expand_expr): Likewise. - * flow.c (verify_flow_info): Likewise. - * config/arm/arm.c (thumb_unexpanded_epilogue): Likewise. - * config/mips/mips.c (save_restore_insns): Likewise. - - * except.c (duplicate_eh_handlers): Call abort instead of fatal. - * flow.c (verify_flow_info): Likewise. - * config/arm/arm.c (thumb_load_double_from_address): Likewise. - * config/avr/avr.c (pttreg_to_str, unique_section): Likewise. - (avr_normalize_condition): Likewise. - * config/c4x/c4x.c (c4x_emit_libcall, c4x_valid_operands): Likewise. - * config/dsp16xx/dsp16xx.c (dsp16xx_reg_class_from_letter): Likewise. - (limit_reload_class, double_reg_to_memory): Likewise. - (print_operand_address, emit_1600_code_shift): Likewise. - (gen_tst_reg, gen_compare_reg): Likewise. - * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise. - * config/dsp16xx/dsp16xx.c (dsp16xx_invalid_register_for_compare): - Deleted. - * config/dsp16xx/dsp16xx.md (unnamed cmphi): Call abort instead of it. - - * c-parse.in (methoddef): Call fatal_error instead of fatal. - * objc/objc-act.c (build_ivar_chain): Likewise. - * dwarfout.c (dwarfout_init): Call fatal_io_error instead of - pfatal_with_name. - * graph.c (clean_graph_dump_file): Likewise. - * profile.c (init_branch_prob): Likewise. - * objc/objc-act.c (objc_init): Likewise. - - * config/arm/arm.c (arm_override_options): Make errors non-fatal. - * config/avr/avr.c (avr_override_options): Likewise. - * config/c4x/c4x.c (c4x_expand_prologue): Likewise. - * config/dsp16xx/dsp16xx.c (function_prologue): Likewise. - * config/h8300/h8300.c (h8300_init_once): Likewise. - * config/mips/mips.c (override_options): Likewise. - * config/i386/i386.c (override_options): Likewise, rework. - * config/m68k/m68k.c (override_options): Likewise. - - * config/dsp16xx/dsp16xx.c (print_operand): Call output_operand_lossage - instead of fatal. - * config/mips/mips.c (print_operand): Likewise. - * hash.c (hash_allocate): Don't check for failure returns from - obstack functions that can't fail. - (hash_table_init_n, hash_table_init): Likewise; also now return void. - * hash.h (hash_table_init_n, hash_table_init): Now return void. - * objc/objc_act.c (objc_check_decl): Remove unneeded fatal call. - (get_object_reference): Likewise. - -2001-02-04 Nick Clifton - - * config/arm/arm.c (all_cores): Add 710T, 720T, 740T, 940T, 9e, - StrongARM1110, 10TDMI, and 1020T. - -2001-02-04 Kaveh R. Ghazi - - * mips.h (MULTILIB_ISA_DEFAULT): Don't use #elif. - -2001-02-04 Alexandre Oliva - - * config/sh/sh.md (movdf load split): Pass register number to - FP_OR_XD_REGISTER_P. - -2001-02-04 Mark Mitchell - - * cppinit.c (BC): New macro. - (builtin_array): Add __GXX_WEAK__. - * cpplib.h (builtin_type): Add BT_WEAK. - * cppmacro.c (builtin_macro): Handle BT_WEAK. - * defaults.h (SUPPORTS_ONE_ONLY): Define. - * varasm.c (SUPPORTS_ONE_ONLY): Do not define. - -2001-02-03 Jakub Jelinek - - * cppinit.c (append_include_chain): Honor NO_IMPLICIT_EXTERN_C. - -2001-02-03 Neil Booth - - * cpphash.h: Rename _ALIGN POOL_ALIGN. - * cpplex.c (new_chunk, _cpp_pool_reserve): Update. - -2001-02-03 Neil Booth - - * cpphash.h: Rename ALIGN _ALIGN. - * cpplex.c (new_chunk, _cpp_pool_reserve): Update. - -Fri Feb 2 23:15:29 2001 Christopher Faylor - - * config/i386/cygwin.h (CPP_SPEC): Reorganize YA to better handle cross - compilation environment. - * config/i386/t-cygwin (T_CPPFLAGS): Define CYGWIN_CROSS_DIR to allow - control over location of cygwin includes and libs. - -2001-02-03 Michael Hayes - - * md.texi (Standard Names): remove reference to spur.md. - -2001-02-03 Michael Hayes - - * c4x.c (group1_reg_operand, group1_mem_operand, arx_reg_operand, - c4x_arn_reg_operand, c4x_arn_mem_operand): Do not check register - number before reload. - (c4x_adjust_cost): Return zero before reload. - * c4x.md (load_immed_address+1, load_immed_address+2): Do not - split before reload. - -2001-02-03 Herman A.J. ten Brugge - - * c4x.c (c4x_hard_regno_rename_ok): New. - * c4x-protos.h (c4x_hard_regno_rename_ok): New. - * c4x.h (HARD_REGNO_RENAME_OK): Define. - -Fri Feb 2 20:03:50 2001 Richard Kenner - - * diagnostic.h: Add missing "extern" in all declarations. - -2001-02-02 Alex Samuel - - * Makefile.in (gcc_gxx_target_include_dir): Generate dynamically - as for gcc_gxx_include_dir. - -2001-02-02 Neil Booth - - * cpp.texi, invoke.texi: Update -Wtraditional documentation. - -2001-02-02 Alexandre Oliva - - * config/sh/sh.c (output_far_jump): Don't use braf on SH1. Emit - label before alignment to be used as the braf base address. - * config/sh/sh.md (length): Use longer lengths for SH1 PIC far - branches. - (casesi_jump_2): Require at least TARGET_SH2. - - * config/float-sh.h (LDBL_EPSILON, LDBL_MIN, LDBL_MAX): Prevent - truncation to 32-bit doubles on -m3e and -m4-single-only. - -2001-02-02 Mark Mitchell - - * gcc.c (init_gcc_specs): New function. Make -shared-libgcc - the default when building a shared object. - (init_spec): Use it. - * testsuite/lib/g++.exp: Include the directory where libgcc - is located to the LD_LIBRARY_PATH list. - * invoke.texi (-shared-libgcc): Document the cases in which - GCC defaults to using the shared libgcc. - -2001-02-02 Alexandre Oliva - - * config/fp-bit.h (MAX_USI_INT, MAX_SI_INT): Don't assume - unsigned is wide enough. - (BITS_PER_SI): New. - * config/fp-bit.c (_fpmul_parts): Don't assume 32-bits SI. - (si_to_float): Likewise. - (float_to_si, float_to_usi): Use BITS_PER_SI. - -2001-02-01 Jeffrey Oldham - - * dwarf2out.c: Added explanation of abbreviations. - (def_cfa_1): Added comments listing DWARF2 instructions. - (cfa_temp_reg): Removed in favor of cfa_temp. - (cfa_temp_value): Removed in favor of cfa_temp. - (cfa_temp): New global variable. - (dwarf2out_frame_debug_expr): Added extensive introductory - comments explaining the function's transformations. Revised to - use cfa_temp. Added some rtx checking. Generalize IOR case. - (dwarf2out_frame_debug): Revised to use cfa_temp. - (output_aranges): Cast as "unsigned" to avoid warning. - * rtl.texi (RTX_FRAME_RELATED_P): Revise entry to emphasize better - explain which instructions must be marked. - -2001-02-01 Richard Henderson - - * local-alloc.c (update_equiv_regs): Copy INSN_CODE to the - new instruction. - -2001-02-01 Alexandre Oliva - - * config/sh/crt1.asm (main_k): Modified so that start calls - ___setup_argv_and_call_main. - -2001-02-01 Neil Booth - - * cpphash.h (struct cpp_buffer): Move saved_flags from cpp_reader. - * cpplex.c (_cpp_lex_token): New token picks up the saved flags, - and AVOID_LPASTE is cleared on meeting an unescaped newline. - * cppmacro.c (builtin_macro): Set builtin flags here. - (paste_all_tokens): Preserve AVOID_LPASTE on pasted token. - (replace_args): Clarify intent. - (cpp_get_token): Macro expansion tokens get the saved flags. - Update. - * cppmain.c (scan_buffer): Remove now-redundant print.printed - check. - -2001-02-01 Jeffrey Oldham - - * config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Reverse change of - 2001-Jan-29. - -Thu Feb 1 07:22:41 2001 Richard Kenner - - * builtins.c (expand_builtin_alloca): allocate_dynamic_stack_space - returns Pmode pseudo, but we need ptr_mode. - * explow.c (allocate_dynamic_stack_space): Use plus_constant. - Remove bogus conversions; use HOST_WIDE_INT for size. - Don't use TARGET if wrong mode. - - * config/i386/i386.c (ix86_compute_frame_size): Allow - stack_alignment_needed to be non-default even if size is zero. - -2001-01-31 Alan Modra - - * pa.c (hppa_init_pic_save): New function. - * pa.h (hppa_init_pic_save): Declare. - * pa.md (call, call_value, sibcall, sibcall_value): Use - the above instead of duplicated code. - - * pa.c (hppa_encode_label): Correct size of alloca buffer - so we don't overrun it. Correct leading `*' case. - * pa.h (STRIP_NAME_ENCODING): Simplify now that we don't - need to handle `*@'. - (FUNCTION_NAME_P): Likewise. - -2001-01-31 Richard Henderson - - * config.gcc (alpha-osf5): Use float-i128.h. - - * config/float-i128.h (FLT_EVAL_METHOD, DECIMAL_DIG): Define. - * config/float-i32.h: Likewise. - * config/float-i64.h: Likewise. - * config/float-sh.h: Likewise. - * config/float-sparc.h: Likewise. - -2001-01-31 DJ Delorie - - * expmed.c (extract_bit_field): allow non-integral modes if we - want to extract a whole register from itself. - -2001-01-31 Jakub Jelinek - - * c-typeck.c (set_init_index): If first is equal to last, assume as - if it was not a range at all. - -2001-01-31 Alexandre Oliva - - * config/fp-bit.c: Include tm.h. - (float_to_si): Don't assume SImode is 32-bits wide. - (float_to_usi): Likewise. - -2001-01-31 Joseph S. Myers - - * c-parse.in (structsp): Pedwarn when "enum foo" refers to an - incomplete type. - (typename): Call pending_xref_error after parsing typed_typespecs. - * c-decl.c (lookup_tag): Give error immediately rather than - leaving it pending if the tag of the wrong type is in the same - binding level. - (xref_tag): Don't pedwarn for forward declarations of enum types - here. - * gcc.texi (Actual Bugs): Remove entry for misuse of struct, union - and enum tags. - -2001-01-31 Alexandre Oliva - - * config/float-sparc.h (LDBL_MAX) [sparc32]: Fix typo. - -2001-01-31 Neil Booth - - * cpplib.c (T_ELIF): Move to STDC89, not that it matters. - (_cpp_handle_directive): Suggest not using #elif with -Wtraditional. - -2001-01-31 Neil Booth - - * cpphash.h (struct cpp_reader): New saved_flags. - * cppmacro.c (cpp_get_token): Use saved_flags to remember - to avoid a paste after a pasted token. - -2001-01-31 Alexandre Oliva - - * libgcc2.h (Wtype_MAX, Wtype_MIN): Define. - * libgcc2.c (__fixunssfSI, __fixunsdfSI, __fixunsxfSI): Use - Wtype_MIN instead of LONG_MIN. - -2001-01-30 Jeffrey Oldham - - * fixinc/fixincl.tpl: Add 2001 to copyright. Change name of - README file. - * fixinc/fixincl.x: Regenerated. - * fixinc/inclhack.def (irix_limits_const): New definition to - convert "const" to "__const" in limits.h. - -2001-01-30 Jeffrey Oldham - - * fixinc/genfixes (AG): Fix "autogen4" thinko. - -2001-01-30 Herman A.J. ten Brugge - - * regmove.c (try_auto_increment): Change REG_DEAD into REG_UNUSED - when register dies in the insn. - -2001-01-30 Neil Booth - - * diagnostic.c (fatal): Fix word wrap. - -2001-01-30 Alexandre Oliva - - * combine.c (try_combine): Fix SUBREG setting for - HOST_BITS_PER_WIDE_INT >= 2 * BITS_PER_WORD. - -2001-01-30 Franz Sirl - - * jump.c (comparison_dominates_p): Don't try to handle UNKNOWN - comparison codes. - -2001-01-30 Neil Booth - - * c-decl.c (c_expand_body): Check TYPE_SIZE_UNIT (ret_type) - is not NULL. - * toplev.c (decode_W_option): Update warn_larger_than - unconditionally for each processed switch. - -2001-01-30 John David Anglin - - * pa.c (pa_init_machine_status): Initialize pic_offset_table_save_rtx - to NULL_RTX. - (hppa_expand_prologue): Delete code to save pic offset table register - in the function prologue. - * pa.h (PIC_OFFSET_TABLE_SAVE_RTX): Correct type in comment. - * pa.md (call, call_value, sibcall, sibcall_value): Save the pic offset - table register at the beginning of the function after the prologue. - -2001-01-29 lars brinkhoff - - * tm.texi (PUSH_ROUNDING): Remove duplicate lines. - -2001-01-29 John David Anglin - Jeff Law - - * pa.md (return): Revise comment for trivial return. - (return_internal): Non-trivial return pattern for non-PIC code. - (return_internal_pic): Non-trivial return pattern for PIC code. - It uses the PIC register to ensure it is restored after - function calls. - (epilogue): Generate appropriate return for PIC and non-PIC code. - -Mon Jan 29 23:53:14 2001 Christopher Faylor - - * config/i386/cygwin.h: Fix -mno-cygwin search path for link. - -2001-01-29 DJ Delorie - - * combine.c (if_then_else_cond): Pass the correct mode to - operand_subword() for constants. - -Mon Jan 29 20:38:19 2001 Christopher Faylor - - * config/i386/cygwin.h: Add w32api to include search. Search different - directories in a cross-build environment. - -2001-11-29 Tim Josling - - * tree.h (TYPE_STUB_DECL): Add documentation. - -2001-11-29 Laurynas Biveinis - - * sdbout.c (sdbout_one_type): Skip types with indeterminate size. - (sdbout_field_types): Likwise. Fix use of host_integerp. - -2001-01-29 Thomas Pfaff - - * mingw32.h: Override STARTFILE_SPEC and LINK_SPEC declared in - cygwin.h. - -2001-01-29 Jeffrey Oldham - - * config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Revise definition - to use flag_gnu_linker. - -2001-01-29 Neil Booth - - * cpplib.c (T_BAD_DIRECTIVE): Remove. - (_cpp_init_stacks): Loop from 0 to N_DIRECTIVES - 1. - -2001-01-29 Joseph S. Myers - - * tree.c, tree.h (build_parse_node): Remove; was identical to - build_nt. - * c-lang.c (start_cdtor), objc/objc-act.c - (build_module_descriptor): Use build_nt instead of - build_parse_node. - -2001-01-29 Jakub Jelinek - - * config/i386/i386.md (addqi_1_lea): Fix mode (QI instead of HI). - (testqi_1, andqi_2): If widening to SImode, make sure CONST_INT does - not have any upper bits set. - -2001-01-29 Phil Edwards - - * COPYING.LIB: Update to LGPL 2.1 from the FSF. - -2001-01-28 Kaveh R. Ghazi - - * stmt.c (estimate_case_costs): Use integer_minus_one_node. - - * tree.c (build_common_tree_nodes_2): Set integer_minus_one_node. - - * tree.h (tree_index): Add new element TI_INTEGER_MINUS_ONE. - (integer_minus_one_node): Define. - -2001-01-28 Alexandre Oliva - - * Makefile.in (bootstrap2-lean): Fix typo. - -2001-01-28 Neil Booth - - * cpphash.c (_cpp_cleanup_hashtable, _cpp_lookup_with_hash) - : Don't set fe_value. - * cpplib.h (AVOID_LPASTE): New flag. - (struct cpp_hashnode): Remove fe_value. - * cpplex.c (cpp_avoid_paste): Don't paste '.' with a number. - * cppmacro.c (builtin_macro): Don't set flags here. - (replace_args): Set AVOID_LPASTE flag on first token of an - argument, and the token following it. - (cpp_get_token): Set AVOID_LPASTE flag on first token of a - macro expansion, and on the token following it. Do it for - builtins too. - * cppmain.c (scan_buffer): Avoid pasting only flagged tokens. - -2001-01-27 Richard Henderson - - * config/alpha/t-ieee: Remove multilibbing. - (TARGET_LIBGCC2_CFLAGS): Add -mieee. - -2001-01-27 Kaveh R. Ghazi - - * configure.in: Arrange to include defaults.h in [ht]config.h/tm.h. - - * Makefile.in: Remove all dependencies on defaults.h. - * builtins.c: Don't include defaults.h. - * c-common.c: Likewise. - * c-decl.c: Likewise. - * c-pragma.c: Likewise. - * c-typeck.c: Likewise. - * combine.c: Likewise. - * i386.c: Likewise. - * frame-ia64.c: Likewise. - * cppexp.c: Likewise. - * crtstuff.c: Likewise. - * dbxout.c: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * emit-rtl.c: Likewise. - * except.c: Likewise. - * expr.c: Likewise. - * final.c: Likewise. - * frame-dwarf2.c: Likewise. - * libgcc2.c: Likewise. - * optabs.c: Likewise. - * profile.c: Likewise. - * sdbout.c: Likewise. - * toplev.c: Likewise. - * tradcif.y: Likewise. - * tree.c: Likewise. - * varasm.c: Likewise. - -2001-01-27 Kaveh R. Ghazi - - * builtins.c (expand_builtin_fputs): Use size_one_node when - transforming into fwrite. - -2001-01-27 Joseph S. Myers - - * extend.texi (Attribute Syntax): New section. - -2001-01-27 Michael Sokolov - - * fixproto: Correctly install synthesized unistd.h and stdlib.h when - they didn't need fixing. - -2001-01-27 Janis Johnson - - * config.gcc (i[34567]86-sequent-{ptx4*,sysv4*}): Use usegas.h - if appropriate. - * config/ptx4.h: Several fixes to build on DYNIX/ptx v4.[456], and - to remove macro definitions that are duplicated from elfos.h. - -2001-01-27 Richard Henderson - - * config/i386/sco5gas.h: Move ... - * config/usegas.h: ... here. - * config.gcc (i[34567]86-*-sco3.2v5) [tm_file]: Update. - -2001-01-27 Jakub Jelinek - - * c-typeck.c (struct constructor_stack): Add range_stack member. - (really_start_incremental_init): Clear it. - (push_init_level): Save constructor_range_stack and clear it if - pushing explicit braces. - (pop_init_level): abort if constructor_range_stack is nonzero at - explicit closing brace. Restore saved constructor_range_stack if - not implicit. - -2001-01-27 Alexandre Oliva - - * expr.c (emit_move_insn): Add REG_EQUAL note when constant loaded - into register was forced into memory. - -2001-01-27 Alexandre Oliva - - * Makefile.in: Remove uses of + before $(MAKE). - -2001-01-26 Richard Henderson - - * stmt.c (cost_table): Remove. - (COST_TABLE, cost_table_initialized): New. - (estimate_case_costs): Use the later instead of the former. - (balance_case_nodes): Likewise. - -2001-01-26 Richard Henderson - - * alias.c (objects_must_conflict_p): Read-only slots may not - conflict despite having the same type. - -2001-01-27 Michael Hayes - - * loop.c (loop_giv_reduce_benefit): Copy mode size into - int variable. - (check_ext_dependant_givs): Initialize u_start_val and - u_end_val. - (load_mems): Make last_max_reg unsigned. - (try_swap_copy_prop): Use INSN_P and initialize set. - -Fri Jan 26 23:22:58 2001 Denis Chertykov - - * README.AVR : Removed. - -Fri Jan 26 11:37:26 2001 Jeffrey A Law (law@cygnus.com) - - * pa-64.h (text_section): Remove declaration. - - * pa.md (return_internal): Remove mode on PIC register use. - -2001-01-25 lars brinkhoff - - * tm.texi (DATA_ALIGNMENT, LOCAL_ALIGNMENT, ASM_OPEN_PAREN, - ASM_CLOSE_PAREN): fix typos. - -2001-01-25 Mark Mitchell - - * acconfig.h: Define `const' to the empty string if neither - __STDC__ nor __cplusplus is defined. - * config.in: Regenerated. - -2001-01-25 David Edelsohn - - * config.gcc (rs6000-ibm-aix[5-9]*): Change to aix51.h. - * collect2.c (main): Delete importf. Add ".obj" file extension. - (GCC_CHECK_HDR): Handle AIX V5 new magic number. - (aix_std_libs): Add additional AIX libraries to skip. - * config/rs6000/aix.h (MY_ISCOFF): Add AIX V5 new magic number. - * config/rs6000/aix51.h: New file. - -2001-01-25 Michael Hayes - - * loop.c (loop_call_insn_emit_before, loop_call_insn_hoist): New. - (loop_insn_emit_before): No longer static. - (move_movables): Replace emit_insn_after with loop_insn_emit_after. - (loop_givs_rescan, load_mems): Likewise. - (check_dbra_loop): Replace emit_insn_before with loop_insn_emit_before. - (maybe_eliminate_biv_1): - (move_movables): Replace emit_call_insn_before with - loop_call_insn_hoist. - * loop.h (loop_insn_emit_before): Add. - * unroll.c (copy_loop_body): Replace emit_insn_before with - loop_insn_emit_before. - -2001-01-25 Neil Booth - - * diagnostic.c (fatal): Request preprocessed source. - -Thu Jan 25 02:01:16 2001 J"orn Rennecke - - * c-decl.c (duplicate_decls): If different_binding_level is nonzero, - olddecl has argument types and newdecl has none, use the argument - types from olddecl. - -2001-01-24 Ulrich Drepper - - * dwarf2out.c (prefix_of): New function. Determine longest common - prefix of the two arguments. The units are whole path components. - (output_file_names): When adding a new directory find the one entry - with the longest common prefix already in the list. Artificially - generate entry if there is none for this prefix. - Fix test to check whether the zeroth directory entry is used. - -Wed Jan 24 23:51:55 2001 J"orn Rennecke - - * reload1.c (reload_reg_free_for_value_p): New parameter start_regno. - Changed all callers. Take it into account when deciding if a - previously loaded value matches. - -2001-01-24 Richard Henderson - - * reload.c (find_reloads_subreg_address): Fail the substitution - if the resulting address is insufficiently aligned. - -2001-01-24 DJ Delorie - - * combine.c (combine_simplify_rtx): If the modes are all VOIDmode, - check the original operand's mode also. - * simplify-rtx.c (simplify_ternary_operation): Ditto. - -2001-01-24 Joseph S. Myers - - * c-parse.in (cast_expr): Move compound literals from here ... - (primary): ... to here. Use standard terminology "compound - literal" instead of "constructor expression". - -2001-01-24 Joseph S. Myers - - * gcc.1, cpp.1: Regenerate. - -2001-01-24 Alexandre Oliva - - * calls.c (emit_library_call_value_1): Memory slot for - pass-by-reference argument should have the mode of the argument, - not of the pointer to it. - -2001-01-24 Tom Tromey - - * gcc.texi (G++ and GCC): Mention gcj manual. - (Standards): Link to section of manual mentioning gcj/Java - compatibility. - -2001-01-24 Jakub Jelinek - - * cppfiles.c (_cpp_read_file): Add to dependencies if requested. - * cppinit.c (cpp_start_read): Remove deps_add_dep call. - * tradcpp.c (main): Add -imacros or -include'd dependencies - for -M*. - * cpp.texi (-M, -MM): Document -M -include behavior. - -2001-01-24 Roger Collins - - * config/i386/xm-i386.h: Make __i386__ a boolean macro. - -2001-01-24 Will Cohen - - * config/mips/abi64.h (RETURN_IN_MEMORY): Always take into account - whether registers are 32 bits or 64 bits in size. - -2001-01-24 Ben Elliston - - * config/m32r/m32r.h (PREDICATE_CODES): Remove m32r_not_same_reg. - -2001-01-24 Richard Henderson - - * config/alpha/alpha.md (builtin_longjmp_internal): New. - (builtin_longjmp): Use it instead of emit_indirect_jump. - -2001-01-23 John David Anglin - - * bb-reorder.c (make_reorder_chain_1): Handle case where - jump edge goes to the same block as the fallthru edge. - -2001-01-23 Jim Wilson - - * dwarf2out.c (dwarf2out_line): Make last_file_num be unsigned. - * frame.h (__ia64_personality_v1): Add prototype. - * libgcc2.c (ia64_throw_helper): Change personality declaration to - prototype form. Add void * cast to first argument to personality - call. - * real.c (e113toe): Surround with INTEL_EXTENDED_IEEE_FORMAT ifdefs. - (asctoe113): Likewise. - * config/ia64/frame-ia64.c: Include eh-common.h. - * config/ia64/ia64-protos.h (sdata_section, sbbs_section): Add - prototypes. - * config/ia64/ia64.c (emit_insn_group_barriers): Add ATTRIBUTE_UNUSED - to dump parameter. - (itanium_split_issue): Add prototype. - (gen_nop_type): Ifdef out. - (find_best_packet): Initialize best_packet. - (ia64_encode_section_info): New local string. Use for ggc_alloc_string - result. - * config/ia64/ia64.h (ASM_OUTPUT_LONG_DOUBLE): Use 0L not 0. - * config/ia64/ia64.md (bsp_value): Add explicit stop bit at start. - (flushrs): Add explicit stop bit at end. - * config/ia64/lib1funcs.asm (__ia64_restore_stack_nonlocal): Change - trailing \ to >. - -2001-01-23 Chris Demetriou - - * libgcc-std.ver (GCC_3.0): Add __terminate_func_set to list - of EH symbols. - * libgcc2.c (__terminate_func): Make variable static. - (__terminate_set_func): New function to set __terminate_func. - * libgcc2.h (__terminate_func_ptr): New typedef. - (__terminate_set_func): New function. - -2001-01-23 Richard Henderson - - * flow.c (init_propagate_block_info): Don't consider unchanging - memories for dead frame store elimination. - -2001-01-23 Richard Henderson - - * varasm.c (UNIQUE_SECTION): Move default implementation ... - * defaults.h: ... here. - -2001-01-24 Michael Hayes - - * c4x.h (TARGET_LOAD_DIRECT_MEMS): Define. - -2001-01-23 Neil Booth - - * c-lex.c (lex_charconst): Fix typo: s/p/str. - -2001-01-23 Franz Sirl - - * rs6000.h (rs6000_return_addr): Move prototype from here... - * rs6000-protos.h (rs6000_return_addr): ...to here. - (rs6000_init_expanders): Delete prototype. - -2001-01-23 Nick Clifton - - * invoke.texi: Replace , with \, inside @gccoptlist macros. - (Spec Files): Document %B and %j and %. and %v3 and %M and - %{S*&T} spec switches. - -2001-01-24 Herman A.J. ten Brugge - - * c4x.c (c4x_r11_set_p): Calculate rtx code correctly. - -2001-01-23 Chris Demetriou - Neil Booth - - * cpperror.c: Merge handlers of PEDWARN and WARNING. - Have -Werror make pedantic warnings errors, like the - rest of GCC. - -2001-01-23 Phil Edwards - - * c-tree.texi (IDENTIFIER_LENGTH): Fix typo. - -2001-01-23 Jakub Jelinek - - * integrate.h (struct inline_remap): Add compare_src, compare_mode. - * integrate.c (expand_inline_function): Initialize them. - (subst_constants): If changing COMPARE so that both its arguments - will be VOIDmode and the comparison mode will be lost, note - compare_mode. Use the recorded compare_mode to optimize - IF_THEN_ELSE. - -2001-01-23 Jason Merrill - - * dwarf2out.c (new_die): Use xcalloc. - (output_die): Abort rather than emit a local reference to offset 0. - -2001-01-17 Andrew Haley - - * libgcc2.c (get_reg_addr): Don't abort if we haven't got a copy - of a saved register; return NULL instead. - (copy_reg): Take a pointer to a source register rather than a - frame_state. - (next_stack_level): Remember the address in the stack frame of all - saved registers. - Use the saved register pointer array as the source of the CFA. - (throw_helper): Rewrite. Unwind once rather than twice and keep - track of saved registers as we go. - -2001-01-23 Herman A.J. ten Brugge - - * c4x-protos.h (c4x_legitimize_reload_address): Remove. - * c4x.c (c4x_legitimize_reload_address): Remove. - * c4x.h (LEGITIMIZE_RELOAD_ADDRESS): Rewrite to generate correct - reload address for ldp(k) insn. - -Mon Jan 22 20:53:47 2001 Jeffrey A Law (law@cygnus.com) - - * pa.md (return_internal): Add a USE of the PIC register to ensure - it is restored after each call. - (return expander): Corresponding changes. - -2001-01-22 Franz Sirl - - * rs6000.h (INIT_EXPANDERS): Delete. - (RETURN_ADDR_RTX): Call rs6000_return_addr(). - * rs6000.c (rs6000_override_options): Call *_machine_status from - here... - (rs6000_init_expanders): ...instead of here. Delete. - (rs6000_mark_machine_status): New function. - (rs6000_init_machine_status): Use xcalloc. - (rs6000_return_addr): Generate RTX for the return address. - (rs6000_ra_ever_killed): New, check if LR was ever destroyed. - (rs6000_stack_info): Use it. - -2001-01-22 Thomas Pfaff - - * gthr-win32.h: Include errno.h to get a declaration for - EINVAL and _mingw.h if the target is mingw32. - -2001-01-22 Andres Felipe Vargas - - * cpp.texi: Correct typos. - -Mon Jan 22 13:59:09 2001 Richard Kenner - - * explow.c (probe_stack_range): Ensure value passed to - stack_check_libfunc is ptr_mode, not Pmode. - -Mon Jan 22 16:53:06 2001 J"orn Rennecke - - * recog.c (validate_replace_rtx_1): In ZERO_EXTEND / SIGN_EXTEND - case, don't use operand_subword to calculate a SUBREG that is - wider than a word. - - * rtl.texi: Comparisons yield 0 or STORE_FLAG_VALUE. - -2001-01-22 Herman A.J. ten Brugge - - * c4x.c (c4x_valid_rptb_p, c4x_label_ref_used_p): New functions. - (c4x_rptb_insert): Call c4x_valid_rptb_p to check if repeat block is - valid. If not replace it by equivalent insns. - -2001-01-22 Herman A.J. ten Brugge - - * c4x.c (c4x_check_legit_addr): Only check CONST. Not if CONST - contains SYMBOL_REF, LABEL_REF and CONST_INT. - (c4x_U_constraint, symbolic_address_operand): Likewise. - (c4x_immed_float_constant): Do not check if CONST_DOUBLE is in - memory. - (c4x_r11_set_p, c4x_check_laj_p): New functions. - * c4x-protos.h (c4x_check_laj_p): Add prototype. - * c4x.md (in_annul_slot_3): Do not allow auto-increment in last - anulling slot because of silicon bug. - (laj, lajv): Call c4x_check_laj_p to check for silicon bug. - -2001-01-22 Alan Modra - - * cppexp.c (parse_charconst): Change `mask' type to agree - with parse_escape. - -2001-01-21 Richard Henderson - - * config/i386/i386.c (ix86_asm_file_end): Disable putting - pic_label_name in a linkonce section. - -2001-01-17 Philipp Thomas - - * aclocal.m4 (AM_WITH_NLS): Add -lintl to LIBS if gettext was - found in libintl. - * configure: Regenerate. - -Sun Jan 21 02:38:56 2001 J"orn Rennecke - - * expmed.c (synth_mult, expand_mult_highpart, expand_divmod): Guard - uses of shift_cost, shiftadd_cost and shiftsub_cost with bound checks. - -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): Optimize if/else. - (avr_function_value): Fix formatting. - - * config/avr/avr.md (branch): Call to ret_cond_branch changed. - (difficult_branch): Likewise. - (rvbranch): Likewise. - (difficult_rvbranch): Likewise. - - * config/avr/avr-protos.h (ret_cond_branch): Prototype changed. - - * config/avr/libgcc.S: Fix comment. - -2001-01-20 Michael Sokolov - - * sdbout.c (PUT_SDB_DEF): Fix after last bogus change. - -2001-01-20 Michael Sokolov - - * cppinit.c (INO_T_EQ): Don't use #elif, fix formatting. - -2001-01-20 Michael Sokolov - - * aclocal.m4 (gcc_AC_FUNC_STRSTR): New macro. - * configure.in (gcc_AC_FUNC_STRSTR): Add invokation. - * configure, config.in: Regenerate. - * Makefile.in (STRSTR, HOST_STRSTR, USE_HOST_STRSTR): New variables. - (LIBDEPS, HOST_LIBDEPS, LIBS, HOST_LIBS): Add strstr handling. - (strstr.o, $(HOST_PREFIX_1)strstr.o): New rules. - (doprint.o): New rule. - -2001-01-20 Joseph S. Myers - - * c-typeck.c (digest_init): Handle boolean types as scalars. - -Sat Jan 20 12:46:57 2001 Richard Kenner - - * stmt.c (expand_return): Don't return anything if size is zero. - Delete redundant assignment to BYTES. - * expr.c (move_block_from_reg): Do nothing if NREGS is zero. - -2001-01-20 Marek Michalkiewicz - - * config/avr/avr.h (INIT_TARGET_OPTABS): Remove most of it, was - the same as the default library function names. - * config/avr/avr.md: Document special characters after '%'. - (mulqi3, mulhi3, mulsi3): Call libgcc.S functions ourselves, - knowing which of the call-used registers are really clobbered. - (divmodqi4, udivmodqi4, divmodhi4, udivmodhi4, divmodsi4, udivmodsi4): - New. Both quotient and remainder from one libgcc.S call. - * config/avr/libgcc.S: Optimize mul/divmod for the new insns above, - clobber as few registers as possible. - * config/avr/t-avr (LIB1ASMFUNCS): Adjust for the above changes. - -2001-01-20 Neil Booth - - * cppmacro.c (funlike_invocation_p): Don't move back up to the - context of the top of the stack. - -2001-01-20 Jakub Jelinek - - * function.c (fixup_var_refs): Move CALL_PLACEHOLDER handling... - (fixup_var_refs_insns): ...here. - -2001-01-20 Zack Weinberg - - * function.c (fixup_var_refs_insns): Break up into - fixup_var_refs_insn [body of loop], fixup_var_refs_insns - [loop over entire insn list], and fixup_var_refs_insns_with_hash - [loop over hash table entries]. - (fixup_var_refs): Adjust calls to fixup_var_refs_insns and/or - fixup_var_refs_insns_with_hash, to match above changes. - -2001-01-19 John David Anglin - - * Makefile.in (ORDINARY_FLAGS_TO_PASS): Add MAKEOVERRIDES variable. - (libgcc.a): Likewise. - (stmp-multilib): Likewise. - (STAGE2_FLAGS_TO_PASS): Likewise. - -2001-01-19 Alexandre Oliva - - * config/sh/sh.c (prepare_move_operands) [PIC]: Use operands[0] as - temporary if no_new_pseudos. - -2001-01-19 Neil Booth - - * cppinternals.texi: Update. - -2001-01-19 Richard Earnshaw - - * arm.c (arm_init_builtins): Re-enable builtins. - -Fri Jan 19 13:02:56 2001 Richard Kenner - - * rtl.texi (SET, CLOBBER): Document PARALLEL as SET_DEST possibility. - * flow.c (mark_set_1, case PARALLEL): Don't require BLKmode, allow - element to be null, and always expect an EXPR_LIST. - * rtlanal.c (reg_overlap_mentioned_p, note_stores): Likewise. - * sched-deps.c (sched_analyze_1): Likewise. - * sched-rgn.c (check_live_1, update_live_1): Likewise. - - * regclass.c (max_set_parallel): New variable. - (reg_scan): Take it into account in computation of max_parallel. - (reg_scan_mark_refs, case SET): Compute it. - - * alias.c (rtx_equal_for_memref_p, case ADDRESSOF): Don't assume - args are REG. - * expr.c (store_constructor): Don't look at MEM_ALIAS_SET unless MEM. - * function.c (assign_parms): Use INTVAL for a CONST_INT. - -2001-01-19 Jason Merrill - - * dwarf2out.c (gen_subprogram_die): Don't reuse the in-class decl - for the abstract instance of an inline function. - -Fri Jan 19 14:31:35 2001 Alexandre Oliva - J"orn Rennecke - - * reload1.c (move2add_note_store): Treat all registers directly or - indirectly derived from a base register as members of the same set - of values. - (reload_cse_move2add): Adjust accordingly. Take mode and offset - of base register into account. - -Fri Jan 19 09:18:42 2001 J"orn Rennecke - - * alias.c (find_base_value): Recognize TRUNCATE. - (record_set): In PLUS case, invalidate if other summand is also a - base value. - -Thu Jan 18 06:43:04 2001 Richard Kenner - - * flow.c (mark_set_1, case PARALLEL): New case; rework to allow - entry to be EXPR_LIST. - * rtlanal.c (reg_overlap_mentioned_p): Allow PARALLEL in SET to - be an EXPR_LIST (but not null, which other code doesn't allow). - (note_stores): Properly handle PARALLEL in SET. - Recursively call for top-level PARALLEL. - * sched-deps.c (sched_analyze_1): Handle EXPR_LIST in PARALLEL in SET. - * sched-rgn.c (check_live_1, update_live_1): Likewise. - - * config.gcc (rs6000-ibm-aix*, rs6000-bull-bosx): Add rs6000/aix.h. - -2001-01-18 Neil Booth - - * cpplib.c (_cpp_handle_directive): Use buffer->was_skipping, - not pfile->skipping (== 0). - -2001-01-17 Nick Clifton - - * config/rs6000/rs6000.c: Add prototypes for {init|free}_ - machine_status. - -2001-01-17 Jim Wilson - - * invoke.texi (IA-64 options): Improve. - -2001-01-17 Tom Tromey - - * invoke.texi (Optimize Options): Use `{}' to around @samp - argument. - -2001-01-17 Aldy Hernandez - - * invoke.texi (-fno-guess-branch-probability): New option. - -Wed Jan 17 13:26:34 2001 Richard Kenner - - * combine.c (try_combine): Don't set i3_subst_into_i2 for - case of making new double-word constant. - Revert last change: instead just test i3_subst_into_i2. - -2001-01-17 Jakub Jelinek - - * config/i386/i386.md (cmpqi_minus_1): Use {b} for QImode operation. - Use q constraints instead of r. - -Tue Jan 16 22:23:04 2001 Alan Modra (alan@linuxcare.com.au) - - * config/pa/pa.h (PIC_OFFSET_TABLE_REGNUM_SAVED): Remove. - (machine_function): Define. - (PIC_OFFSET_TABLE_SAVE_RTX) : Define. - * config/pa/pa.c (pa_init_machine_status, pa_mark_machine_status, - pa_free_machine_status): New functions. - (override_options): Set {init,mark,free}_machine_status to above. - (hppa_expand_prologue): Use PIC_OFFSET_TABLE_SAVE_RTX instead of - PIC_OFFSET_TABLE_REGNUM_SAVED. - * config/pa/pa.md: Use PIC_OFFSET_TABLE_SAVE_RTX instead of - PIC_OFFSET_TABLE_REGNUM_SAVED throughout. - * config/pa/pa32-regs.h (CONDITIONAL_REGISTER_USAGE): Remove - references to PIC_OFFSET_TABLE_REGNUM_SAVED. - * config/pa/pa64-regs.h (CONDITIONAL_REGISTER_USAGE): Likewise. - -2001-01-15 DJ Delorie - - * Makefile.in (gcov.1): Protect against texi2pod/pod2man failing. - (cpp.1): Ditto. - (gcc.1): Ditto. - -Tue Jan 16 17:20:43 2001 Richard Kenner - - * flow.c (propagate_one_insn): Make trying to delete a prologue - or epilogue insn an ICE, not a warning. Allow doing this if - the current function returns with stack pointer depressed. - - * combine.c (try_combine): If i3_subst_into_i2, properly check for - I3 having more than one SET. - -2001-01-16 Jim Wilson - - * invoke.texi: Document IA-64 options. - - * config/ia64/ia64.c (ia64_print_operand_address): Delete 'B' support. - (fixup_errata): Delete TARGET_A_STEP use. - * config/ia64/ia64.h (MASK_A_STEP, TARGET_A_STEP): Delete. - (TARGET_SWITCHES): Delete -ma-step option. - * config/ia64/ia64.md (all FP patterns): Delete %B0. - (movqicc_astep, movqi_internal_astep, movhicc_astep, - movhi_internal_astep, movsicc_astep, movsi_internal_astep, movdi+1, - movdi_internal_astep, movsfcc_astep, movsf_internal_astep, - movdfcc_astep, movdf_internal_astep, movtfcc_astep, - movtf_internal_astep, cmovdi_internal_astep, cmovsi_internal_astep): - Delete. - (movqi_internal, movhi_internal, movsi_internal, movdi_internal, - movsf_internal, movdf_internal, movtf_internal, cmovdi_internal, - cmovsi_internal): Delete ! TARGET_A_STEP check. - -2001-01-16 Gerald Pfeifer - - * gcc.texi (Bug Lists): Do not mention newsgroups nor the - possibility to report bugs via postal mail. Change a URL and - merge in a nearly duplicate statement... - (Bug Reporting): ...from here. - (Service): Refer to the Bug Reporting section instead of - duplicating an URL. - (Contributing): Remove trivial explanations concerning snapshots. - -2001-01-16 Alan Modra - - * cppmain.c (general_init): Don't use ANSI prototype. - -2001-01-16 Tom Tromey - - * gcc.c (cpp_options): Added `*' to specs for -MF, -MQ, and -MT. - -2001-01-16 Richard Henderson - - * config/i386/i386.h: Fix comment typo. - * config/i386/i386.md (shift+compare pattern names): s/cmpno/cmp/ - (ashr+compare patterns): Match CCGOCmode not CCNOmode. - -2001-01-16 Phil Edwards - - * gcc.c: Revert previous -fsyntax-only-related change; move - to cp/g++spec.c. - -2001-01-16 Jakub Jelinek - - * config/i386/i386.c (fcmov_comparison_operator): Only initialize - inmode after checking GET_CODE (op). - -2001-01-16 Richard Henderson - - * flow.c (struct propagate_block_info): Add mem_set_list_len. - (MAX_MEM_SET_LIST_LEN): New. - (propagate_one_insn): Update mem_set_list_len. - (invalidate_mems_from_autoinc): Likewise. - (invalidate_mems_from_set): Likewise. - (mark_used_regs): Likewise. - (init_propagate_block_info): Likewise. Stop collecting memories - when we reach MAX_MEM_SET_LIST_LEN. - (mark_set_1): Likewise. - -2001-01-16 Richard Henderson - - * unroll.c (precondition_loop_p): Fail if no iteration - variable found. - -2001-01-16 Phil Edwards - - * gcc.c: When -fsyntax-only is given, do not complain about - unused libraries. - -2001-01-15 Richard Henderson - - * config/i386/i386.c (asm_output_function_prefix): Remove. - (ix86_asm_file_end): New. - (load_pic_register): Generate pic_label_name into a - statically allocated buffer. - * config/i386/i386-protos.h: Update. - * config/i386/i386.h (ASM_OUTPUT_FUNCTION_PREFIX): Remove. - (ASM_FILE_END): New. - * config/i386/i386afe.h: New file. - * config.gcc (i?86-*-elf) [tm_file]: Use it. - (i?86-*-{freebsd,linux*,moss*}): Likewise. - * config/elfos.h (ASM_FILE_END): Undef before redefinition. - * config/i386/cygwin.h (ASM_FILE_END): Likewise. - * config/i386/osfrose.h (ASM_FILE_END): Invoke ix86_asm_file_end. - * config/i386/sco5.h (ASM_FILE_END): Likewise. - * config/i386/winnt.c (i386_pe_asm_file_end): Likewise. - -2001-01-15 Joseph S. Myers - - * Makefile.in (install-man): Remove explicit dependency on - $(srcdir)/gcc.1. - - * configure.in, configure: Revert previous patch requiring perl - 5.6.0. - -2001-01-12 Aldy Hernandez - - * toplev.c (flag_guess_branch_prob): New. - (f_options): Add guess-branch-probability option. - (rest_of_decl_compilation): Only estimate branch probability if - flag set. - (main): set flag_guess_branch_prob. - - * flags.h (flag_guess_branch_prob): New. - -2001-01-15 DJ Delorie - - * gcc.texi (Makefile): Add documentation for Makefile targets. - -2001-01-15 Philip Blundell - - * config/arm/arm.c (arm_finalize_pic): New arg "prologue". - (is_pic): Delete. - * config/arm/arm-protos.h (arm_finalize_pic): Update prototype. - (is_pic): Delete declaration. - * config/arm/arm.h (FINALIZE_PIC): Update call to arm_finalize_pic. - (OUTPUT_INT_ADDR_CONST): Remove special handling of PIC address. - * config/arm/arm.md (builtin_setjmp_receiver): New. - -2001-01-15 Richard Earnshaw - - * arm.c (use_return_insn): Don't try to determine the function type - until after reload has completed. - (arm_output_epilogue): Don't adjust the sp value recovered from the - stack. - (emit_multi_reg_push): Don't record dwarf information for the pc. - * arm.md (eh_epilogue): The function type may have changed, so it - needs to be recalculated. - * arm/netbsd.h (DWARF2_UNWIND_INFO): Delete. Can now use dwarf2 - unwind tables on arm/netbsd. - -2001-01-15 Richard Earnshaw - - * arm.md (cbranchsi4): Correct calculation of branch ranges. - (negated_cbranchsi4): Likewise. - -2001-01-15 Richard Earnshaw - - * config/arm/semi.h (SUBTARGET_EXTRA_SPECS): Define. - (SUBTARGET_EXTRA_ASM_SPEC): Define to empty string. - (ASM_SPEC): Call subtarget_extra_asm_spec. Don't - pass -mapcs-* options to assembler. - * config/arm/elf.h (SUBTARGET_EXTRA_SPECS): Define. - (SUBTARGET_EXTRA_ASM_SPEC): Define to empty string. - (ASM_SPEC): Call subtarget_extra_asm_spec. - -2001-01-15 Andreas Jaeger - - * config/i386/i386.c (ix86_init_builtins): Make i size_t to remove - warnings. - (ix86_expand_builtin): Likewise. - - * gencodes.c (output_predicate_decls): Make i size_t to avoid - warning about comparison between signed and unsigned. - -2001-01-14 Geoffrey Keating - - * expr.c (do_jump): Treat VOIDmode CONST_DOUBLEs like CONST_INTs. - -2001-01-14 Ralf Baechle - - * config/mips/linux.h (SUBTARGET_CPP_SPEC): Default ABI is 32; change - SUBTARGET_CPP_SPEC appropriately. - -2001-01-12 Mark Mitchell - - * varasm.c (make_decl_rtl): Fix typo in last change. - -2001-01-14 Jeffrey Oldham - - * defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the - linker supports the init_priority C++ attribute. - * tm.texi (SUPPORTS_INIT_PRIORITY): Documentation for new macro. - * config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Indicate Irix - linker does not support init_priority C++ attribute. - -Sun Jan 14 22:31:30 2001 J"orn Rennecke - - * Makefile.in (libgcc1-test.o): Depends on stmp-int-hdrs. - -2001-01-14 Neil Booth - - * c-parse.in (finish_parse): Add comment about cpp_destroy. - * cp/lex.c (finish_parse): Similarly. - * cppinit.c (cpp_cleanup): Rename cpp_destroy for clarity. - Return the number of errors encountered. - * cpplib.h (cpp_cleanup): Rename cpp_destroy, return int. - * cppmain.c (main): Don't call cpp_destroy. - -2001-01-14 Joseph S. Myers - - * configure.in: Require at least perl 5.6.0 to regenerate - manpages. - * configure: Regenerate. - -2001-01-14 Richard Henderson - - * genrecog.c (DT_veclen_ge): New. - (add_to_sequence) [MATCH_PARALLEL]: Generate one. - (maybe_both_true_2): Simplify DT_veclen vs DT_veclen_ge. - (nodes_identical_1): Handle DT_veclen_ge. - (write_cond, debug_decision_2): Likewise. - -2001-01-14 Richard Earnshaw - - * arm.md (ldmsi_postinc, ldmsi, stmsi_postinc, smsi): Delete. Replace - with ... - (ldmsi_postinc[432], ldmsi[432], stmsi_postinc[432], stmsi[432]): New. - -2001-01-14 Neil Booth - - * cppmain.c (do_preprocessing): New function; most of the old - main. - (main): Call it to do most of the work. - (cb): Move from global scope to set_callbacks (). - (setup_callbacks): Get the callback pointer. - (general_init, printer_init): Clean up code and comments. - -2001-01-14 Richard Earnshaw - - * config/arm/semi.h (ASM_SPEC): Pass -k to the assembler when - compiling PIC. - -2001-01-14 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Update comments. - -Sun Jan 14 06:20:49 2001 Richard Kenner - - * ggc-page.c (alloc_annon): Call perror and correctly call exit. - (alloc_page, ggc_alloc): Add casts to remove warnings. - -2001-01-14 Geoffrey Keating - - * combine.c (simplify_comparison): Don't change `code' when - can't reverse comparison. - -2001-01-14 Richard Henderson - - * rtlanal.c (computed_jump_p_1): Rename from jmp_uses_reg_or_mem; - update all call sites. Return true for all non-label constants. - -Sun Jan 14 10:09:48 MET 2001 Jan hubicka - - * i386.c (ix86_expand_compare): Add bypass_test and second_test - parameters. - (ix86_expand_branch): Update. - (ix86_expand_setcc): Update to handle multiple test conditions. - (expand_int_movcc): Likewise. - (expand_fp_movcc): Likewise. - * i386-protos.h (ix86_expand_compare): New. - * i386.md (andqi_?_slp, orqi_?_slp): New. - (conditional trap expander): Update call to ix86_expand_compare. - -2001-01-14 Richard Henderson - - * config/vax/vax.md: Use nonimmediate_operand instead of - general_operand in destinations. - - * config/vax/vax.md (indirect_jump): Use register_operand. - - * config/vax/vax.h (RETURN_POPS_ARGS): Max at 255 arguments. - * config/vax/vax.md (call_pop): Turn into an expander. - (call_value_pop): Likewise. - (call, call_value): New. - -2001-01-14 Andreas Jaeger - - * config/i386/i386.c (ix86_split_fp_branch): Remove unused - variables. - (ix86_fp_compare_mode): Add unused attribute. - (ix86_expand_fp_movcc): Remove unused variable. - (ix86_expand_builtin): Make fcode unsigned. - - * expr.c (MOVE_BY_PIECES_P): Cast MOVE_RATIO to unsigned. - (expand_expr): Add cast to avoid signed warning. - (store_field): Likewise. - (store_constructor_field): Likewise. - (store_constructor): Likewise. - (store_expr): Likewise. - (clear_storage): Likewise. - (emit_group_store): Likewise. - (emit_group_load): Likewise. - -2001-01-13 Joseph S. Myers - - * c-common.c: Move format checking code to ... - * c-format.c: ... here. New file. Reorder some functions and - declarations. - (decl_handle_format_attribute, decl_handle_format_arg_attribute): - New functions. - * c-common.h (decl_handle_format_attribute, - decl_handle_format_arg_attribute): Declare. - * Makefile.in (C_AND_OBJC_OBJS): Add c-format.o. - (c-common.o): Adjust dependencies. - (c-format.o): New list of dependencies. - -2001-01-13 Jakub Jelinek - - * unroll.c (loop_iterations): If we cannot prove iteration variable - is set once in each iteration, punt. - -Sun Jan 14 00:23:15 2001 Denis Chertykov - - * config/avr/avr.md ("strlenhi"): Remove clobber of input address. - (*strlenhi): Remove clobber (which was buggy) of output address. - -2001-01-13 Joseph S. Myers - - * Makefile.in (generated-manpages): Add gcc.1 - ($(srcdir)/gcc.1): New target. - (maintainer-clean): Delete $(srcdir)/gcc.1. - * gcc.texi: Add macros @gccoptlist and @gol. - * invoke.texi: Include option summary in manpage. Mark up option - summary with @gccoptlist and @gol. Use @r in one place where - appropriate. - * texinfo.tex: Update to version 2000-12-11.07 from ftp.gnu.org. - * gcc.1: Generate from invoke.texi. - -2001-01-13 Richard Henderson - - * ggc-page.c (USING_MALLOC_PAGE_GROUPS): New; set if not using mmap. - (struct page_entry): Add group member. - (struct page_group): New. - (struct globals): Add page_groups member. - (alloc_anon): Only define for using mmap; remove valloc call. - (page_group_index): New. - (set_page_group_in_use): New. - (clear_page_group_in_use): New. - (alloc_page): Implement USING_MALLOC_PAGE_GROUPS. - (free_page, release_pages): Likewise. - * configure.in (with-gc): Default to ggc-page always. - -2001-01-13 Alexandre Oliva - - * reload1.c (replace_pseudos_in_call_usage): Use - reg_equiv_constant and reg_equiv_address, and don't try - regno_reg_rtx first. - -2001-01-13 Richard Henderson - - * ggc-page.c (alloc_page): Round up allocation size to one page. - Set e->order on extra pages. - -2001-01-13 Richard Henderson - - * genrecog.c (nodes_identical): Expand commentary. - (write_switch): Watch out for identical nodes. - -2001-01-13 Neil Booth - - * cppfiles.c (_cpp_fake_include): New function. - * cpphash.h (_cpp_fake_include): New. - * cpplib.c (do_line): Call _cpp_fake_include when entering - header files in preprocessed input. - * cppmain.c (cb_pragma_implementation): Remove handling. - (setup_callbacks): Don't register pragmas. - -2001-01-13 Neil Booth - - * extend.texi: Udate for CPP. - -2001-01-13 Andreas Jaeger - - * reload1.c: Add prototype for replace_pseudos_in_call_usage. - - * regmove.c: Add prototype for replace_in_call_usage. - -2001-01-13 Neil Booth - - * cpplib.h (cpp_pool, mi_state, mi_ind, struct cpp_macro, - struct cpp_chunk, struct htab, struct toklist, - struct cpp_context, CPP_STACK_MAX, struct lexer_state, - struct spec_nodes, struct cpp_reader, CPP_OPTION, CPP_BUFFER, - CPP_BUF_LINE, CPP_BUF_COL, CPP_BUF_COLUMN, U, ustrcmp, ustrncmp, - ustrlen, uxstrdup, ustrchr, ufputs): Move to cpphash.h. - (struct macro_args): Delete. - * cpphash.h: See above. - -2001-01-13 Neil Booth - - * cppmain.c (struct printer): Remove no_line_dirs. - (options, cb): New. - (main, setup_callbacks, scan_buffer, printer_init, cb_define) - : Use options rather than CPP_OPTION. - (setup_callbacks): Use cb rather than pfile->cb. - (main): No need to check for a buffer. Use cpp_errors. - (printer_init): Don't set no_line_dirs. - (maybe_print_line): Use options not no_line_dirs. - (cb_file_change): Don't call print_line if -P. - -2001-01-13 Neil Booth - - * c-lex.c (init_c_lex): Use cpp_get_callbacks to set - callbacks. - * c-parse.in (finish_parse): Use cpp_errors. - (__yylex): Use return value of cpp_pop_buffer. - * cp/lex.c (finish_parse): Use cpp_errors. - * cp/spew.c (read_token): Use return value of cpp_pop_buffer. - -Sat Jan 13 16:57:40 2001 Denis Chertykov - - * README.AVR: URLs corrected. - -Sat Jan 13 07:30:02 2001 Richard Kenner - - * c-decl.c (start_function): Don't warn if old prototype is builtin - that's not in C's namespace. - * libgcc2.c (_varargs): Update definition of __builtin_saveregs. - (_bb): Add prototype for ctime. - * config/alpha/osf.h (TRANSFER_FROM_TRAMPOLINE): Add missing protos. - -Sat Jan 13 09:53:32 MET 2001 Jan Hubicka - - * i386.c (ix86_fp_comparison_arithmetics_cost, - ix86_fp_comparison_fcomi_cost, ix86_fp_comparison_sahf_cost, - ix86_fp_comparison_cost): New functions. - (ix86_expand_fp_compare): Use the costs to choose best bethod; add - two new parameters SECOND_TEST and BYPASS_TEST; allow generating - two-branch sequences; make static. - (ix86_use_fcomi_compare): Do decision according to the costs. - (split_fp_branch): New. - * i386.md (compare-and-branch patterns): Use split_fp_branch. - * i386-protos.h (ix86_expand_fp_compare): Remove - (ix86_split_fp_branch): Declare. - - * i386.h (PREDICATE_CODES): Update codes from fcmov_comparison_operand - and ix86_comparison_operator. - - * i386.c (ix86_prepare_fp_compare_args): Try to rearange the comparison - to make it cheaper. - - * i386.c (put_condition_code): Output properly the unordered/ordered - compares in fp case. - (ix86_expand_fp_movcc): Use ix86_expand_compare infrastructure. - - * tm.texi (REVERSE_CONDITION): Document. - * i386.c (ix86_fp_compare_mode): Simplify; return always CCFPmode - in -ffast-math mode. - * i386.h (REVERSE_CONDITION, REVERSIBLE_CC_MODE): New macro. - -2001-01-13 Alexandre Oliva - - * config/sh/sh.c (sh_expand_epilogue): Use PR explicitly. - - * config/sh/sh.c (sh_expand_prologue): Let the second toggle_sz be - optimized away. - - * config/sh/sh.c (mova_p): Fix test for mova_const. - -2001-01-13 Neil Booth - - * fix-header.c (read_scan_file): Use cpp_get_callbacks and - cpp_get_options rather than dereferencing pfile and using - CPP_OPTION. - * scan-decls.c (scan_decls): Use return value of - cpp_pop_buffer rather than CPP_BUFFER. - -2001-01-13 Neil Booth - - * cppinit.c (cpp_handle_option): help_only is now part of the - cpp_options structure. - * cpplib.c (cpp_errors, cpp_get_options, cpp_get_callbacks, - cpp_set_callbacks): New functions. - * cpplib.h (cpp_callbacks): Break out as a named structure. - (cpp_options): Move help_only here from cpp_reader. - (CPP_FATAL_ERRORS): Update to use cpp_errors. - (cpp_errors, cpp_get_options, cpp_get_callbacks, - cpp_set_callbacks): New prototypes. - * cppmain.c (main): Update for help_only. - -2001-01-13 Joseph S. Myers - - * Makefile.in (info, maintainer-clean, install-info, uninstall): - Also build and remove and install and uninstall c-tree.info and - cppinternals.info. - ($(srcdir)/gcc.info): Add dependency on contrib.texi. - ($(srcdir)/cppinternals.info): New target. - * c-tree.texi: Change file name used when makeinfo used without -o - from ir.info to c-tree.info. Add info directory entry. - * cppinternals.texi: Add info directory entry. - * .cvsignore: Update. - -2001-01-12 Jakub Jelinek - - * c-typeck.c (store_init_value): Don't require constant initializer - elements with -pedantic -std=c99. - (digest_init): Change error about non-constant initializer elements - into pedwarn. - (constructor_range_end): Remove. - (constructor_incremental, designator_depth, - designator_errorneous): New variables. - (struct constructor_stack): Remove range_end, add incremental. - (struct constructor_range_stack, constructor_range_stack): New. - (struct initializer_stack): Add constructor_range_stack. - (finish_init): Set it. - (start_init): Likewise. require_constant_elements for non-static - trees only if not flag_isoc99. - (really_start_incremental_init): Remove constructor_range_end, add - constructor_incremental. - (pop_init_level): Likewise. - (push_init_level): Likewise. If implicit and the subobject had some - value set already, preinitialize the level with it. - Warn about missing braces only if not pushing due to designators. - (set_designator, push_range_stack): New functions. - (set_init_label): Use them. - (set_init_index): Likewise. Remove constructor_range_end. - Error if designator index is outside of array bounds. - (add_pending_init): Compare values of purpose index trees, not the - trees themselves. Allow overwriting of already initialized element. - Issue a warning if it had side-effects. - (set_nonincremental_init, set_nonincremental_init_from_string): New - functions. - (pending_init_member): Rename to... - (find_init_member): ...this function. Call set_nonincremental_init - if necessary. Compare values of purpose index trees, not the trees - themselves. Return the actual value, not just nonzero if something - is found. - (output_init_element): Remove checks for duplicates. - If field has zero size, only check the initializer for correctness. - Call set_nonincremental_init if necessary. Push RECORD/ARRAY into AVL - if constructor_incremental is zero. Change error about initializers - not computable at load time into pedwarn. - (output_pending_init_elements): Compare bit positions, not - FIELD_DECLs to take into account zero-sized fields. - (process_init_element): Use constructor_range_stack to fill all - ranges in the designator lists from current level up. - * extend.texi: Update documentation for labeled elements. - -2001-01-12 Alexandre Oliva - - * calls.c (emit_library_call_value_1): Add USEs and CLOBBERs - to function usage for arguments passed by reference. Optimize - callee-copied arguments. - * regmove.c (replace_in_call_usage): New function. - (fixup_match_1): Call it. - * cse.c (cse_insn): Canonicalize registers in function usage. - * reload1.c (replace_pseudos_in_call_usage): New function. - (reload): Call it. - - * Makefile.in: Reverted yesterday's wrong patch. Installed the - right version. - -2001-01-12 Jakub Jelinek - - * config/alpha/alpha.c (alpha_expand_block_move): GET_MODE of tmp, - not XEXP (tmp, 0). - -2001-01-12 DJ Delorie - - * Makefile.in (bootstrap): rename stages to be mnemonic. Add - restageN, unstageN, bubblestrap, quickstrap, and cleanstrap - targets. - -2001-01-12 Joseph S. Myers - - * cpp.texi, extend.texi, gcc.texi, install.texi, invoke.texi, - tm.texi: Consistently refer to ISO C instead of ANSI C. Refer to - -std options alongside references to -ansi. Update some - documentation for C99. - * cpp.1: Regenerate. - -2001-01-12 Andreas Jaeger - - * haifa-sched.c (restore_line_notes): Remove argument block B - since it's unused. - * sched-ebb.c (schedule_ebb): Change caller. - * sched-rgn.c (schedule_region): Likewise. - * sched-int.h (restore_line_notes): Adjust prototype. - - * loop.h: Remove wrong declaration of doloop_condition_get. - -2001-01-12 Phil Edwards - - * extend.texi: Move C++-extension-related node from the C section - into the C++ section. - -2001-01-12 Joseph S. Myers - - * extend.texi: Refer to an array of pointers to functions instead - of one of functions. - -Fri Jan 12 12:08:12 MET 2001 Andreas Jaeger - Jan Hubicka - - * combine.c (reversed_comparison): Fix typo in last patch. - Check X for NULL. - (combine_reversed_comparison_code): Make static to follow - prototype declaration. - -2001-01-12 Phil Edwards - - * install.texi: Remove misplaced duplicate entry. - -2001-01-11 Ulrich Drepper - - * config/float-i386.h: Define FLT_EVAL_METHOD and DECIMAL_DIG for C99. - -Thu Jan 11 17:06:30 EST 2001 John Wehle (john@feith.com) - - * final.c: (leaf_function_p): Fix typo. - -2001-01-11 Zack Weinberg - - * aclocal.m4 (AC_FUNC_MMAP_ANYWHERE): Completely rewritten. - Now defines HAVE_MMAP_DEV_ZERO and/or HAVE_MMAP_ANON depending - which you have. - (AC_FUNC_MMAP_FILE): Don't AC_REQUIRE AC_FUNC_MMAP_ANYWHERE. - * configure.in: Set GGC to ggc-page if any of mmap_dev_zero, - mmap_anon, and valloc is available. - * ggc-page.c: Restructure ifdef logic to match new autoconf - spec. Don't throw away the test page in init_ggc. - - * configure, config.in: Regenerate. - -2001-01-12 Michael Hayes - - * loop.h (total_biv_increment): Constify iv_class pointer. - (struct induction): Replace `mem_mode' with `mem' rtx. - * unroll.c (total_biv_increment): Constify iv_class pointer. - * loop.c (loop_giv_reduce_benefit): Derive mem mode from mem rtx. - (find_mem_givs, combine_givs_p): Likewise. - (debug_ivs, debug_iv_class, loop_ivs_dump, loop_iv_class_dump): New. - -2001-01-10 Thomas Pfaff - - * gthr-win32.h (__gthread_objc_thread_get_data): Save and restore Win32 - LastError. - (__gthread_getspecific): Ditto. - -Fri Jan 12 00:04:00 MET 2001 Jan Hubicka - - * i386.c (ix86_comparison_operator, fcmov_comparison_operator, - put_condition_code): Convert fp comparison codes to integer - before handling. - (ix86_expand_fp_compare): Postnote the fp comparison code conversion - to final. - - * i386.c (unsigned_comparison, no_comparison_operator): Kill. - * i386-protos.h (no_comparison_operator): Kill. - - * i386.c (ix86_expand_fp_compare): Fix ordered/unordered confussion. - - * combine.c (REVERSIBLE_CC_MODE): Remove. - (reversible_comparison_p): Remove. - (combine_reversed_comparison_code): New. - (reversed_comparison): New. - (combine_simplify_rtx): Use - combine_reversed_comparison_code/reversed_comparison instead - of reversible_comparison_p. - (simplify_if_then_else): Likewise. - (simplify_set): Likewise. - (simplify_logical): Likewise. - (if_then_else_cond): Likewise. - (known_cond): Likewise. - (simplify_comparison): Likewise. - -2001-01-11 Alan Lehotsky - - * builtins.c (std_expand_builtin_va_start): Handle varargs when - sizeof (int) is larger than sizeof(__word__). - -2001-01-11 Neil Booth - - * cppinit.c (do_includes): Fix typo. - -2001-01-11 Stephane Carrez - - * config/m68hc11/m68hc11.md (cmphi_1): Make sure reloading - in S_REGS does not occur because not all sources are possible - when a S_REGS is a destination (sometimes needs a clobber). - (movqi_const0, zero_extendhisi2, zero_extendqisi2): Likewise. - (zero_extendhidi2, extendqisi2, extendqihi2, extendhisi2): Likewise. - (anddi3, iordi3, xordi3, negqi2, one_cmplhi2, one_cmplqi2: Likewise. - (ashldi3_const32, ashldi3_const1, ashlsi3_const16): Likewise. - (ashlsi3_const1, ashlhi3_2, ashlqi3_const1, ashrhi3): Likewise. - (ashrqi3_const1, lshrdi3_const32, lshrdi3_const63): Likewise. - (lshrdi_const1, lshrsi3_const16): Likewise. - (*addhi3, lshrsi3_const1, lshrqi3_const1): Likewise. - (*movhi_68hc12, *movqi_68hc12): Likewise. - (movstrictqi): Make sure reloading in D_REGS as a destination - does not happen. - -2001-01-11 Neil Booth - - * cppspec.c (DEFAULT_WORD_SWITCH_TAKES_ARG): Add -MQ. - -2001-01-11 Neil Booth - - * cppinit.c (cpp_start_read): If -fpreprocessed, ignore - -D, -U and -A, and don't initialize the builtins. - (do_includes): Error if -include or -imacros with -fpreprocessed. - * cppmain.c (cb_define, cb_undef): Unconditionally process - the callback. - * tradcpp.c (main): Fix typo. - -2000-01-11 Mark Elbrecht - - * cppfiles.c (cpp_included, find_include_file, _cpp_execute_include) - (read_name_map): Use IS_ABSOLUTE_PATH. - * tradcpp.c (get_filename): Likewise. - -2001-01-11 Stephane Carrez - - * config/m68hc11/m68hc11.md (*adcq, *subcq): Fix operand numbers. - (*ashlsi3_const16_zexthi, *ashlsi3_const1): Likewise. - (*lshrsi3_const, *lshrsi3_const1, *lshrsi3_const16): Likewise. - (*ashrsi3, *ashrsi3_const, *ashlsi3, *ashlsi3_const): Likewise. - (*ashlsi3_const1, *lshrsi3, *ashlsi3_const16): Likewise. - (cmphi_z_used): Don't use '@' for the output. - (tstqi_z_used): Likewise. - (cmpqi_z_used): Likewise. - (one_cmplsi2): Likewise. - -2001-01-11 Alexandre Oliva - - * config/sh/sh.c (barrier_align): Recognize branch around far - branch and redundant insn. - -2001-01-11 Neil Booth - - * invoke.texi: Restore documentation of the drivers' switches -MD - and -MMD. - -2001-01-11 Alexandre Oliva - - * config/sh/sh.h (LABEL_ALIGN): Use UNSPECV_ALIGN instead of 1. - - * Makefile.in (check-gcc//%, check-g++//%, check-g77//%, - check-objc//%): Support parallel testing of multilibs. - (TESTSUITEDIR): Set to testsuite by default, but override for - parallel testing. - (check-gcc, check-g++, check-g77, check-objc): Enter - $(TESTSUITEDIR). - -2001-01-11 Bernd Schmidt - - * alias.c (throughout): Use REGNO, rather than ORIGINAL_REGNO. - * sched-deps.c (deps_may_trap_p): Likewise. - * basic-block.h: Remove a comment. - * flow.c (PROP_POSTRELOAD): Remove. - (update_life_info): Don't add it to prop_flags. - (mark_set_1): Lose the code that was enabled by it. - -2001-01-11 Michael Hayes - - * flow.c (flow_call_edges_add): New. - * basic_block.h (flow_call_edges_add): New. - -2001-01-11 J"orn Rennecke - - * reload1.c (move2add_note_store): Update reg_set_luid even if - base reg remains the same. - -2001-01-10 Nick Clifton - - * config/d30v/d30v.c (d30v_init_machine_status): Initialize - machine_function structure to zero. - Add prototypes for machine_status functions. - -2001-01-10 Mark Mitchell - - * c-common.h (CTI_VOID_LIST): Remove. - (void_list_node): Likewise. - * tree.h (TI_VOID_LIST_NODE): New enumeral. - (void_list_node): New macro. - * config/arm/arm.c (arm_init_builtins): Use void_list_node. - * config/i386/i386.c (ix86_init_builtins): Likewise. - * config/ia64a/ia64.c (ia64_init_builtins): Likewise. - -2001-01-10 Neil Booth - - * Makefile.in (tradcpp0): Depend on mkdeps.h. Link mkdeps.o - * cppinit.c (cpp_start_read): Update comment, remove unneeded - if statement. - * tradcpp.c: Include mkdeps.h. - (deps, print_deps_phony_targets, deps_append, output_deps, - init_dependency_output, output_deps): New. - (deps_buffer, deps_allocated_size, deps_size, deps_column, - deps_output): Delete. - (print_deps_missing_files): Rename deps_missing_files. - (inhibit_output): Make global. - (main): Delete inhibit_output, deps_stream, deps_target. - Use mkdeps functionality in the same way as cpplib. Remove - -g3 handling. Handle -MF, -MP, -MQ, -MT. Update handling of - -M and -MM. Remove old handling of deps via deps_out, and - old reading of environment variables. - (get_filename): Update to use deps_add_dep. - -2001-01-10 Mark Mitchell - - * output.h (make_function_rtl): Remove prototype. - (make_decl_rtl): Likewise. - * varasm.c (make_function_rtl): Remove. - (make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather - than from a third parameter. - * tree.h (make_decl_rtl): Remove last parameter. - * c-decl.c (builtin_function): Remove last argument in call to - make_decl_rtl; use make_function_rtl instead of make_decl_rtl. - (start_function): Likewise. - * except.c (call_get_eh_context): Likewise. - * expr.c (emit_block_move): Likewise. - (clear_storage): Likewise. - * profile.c (output_func_start_profiler): Likewise. - * toplev.c (rest_of_decl_compilation): Likewise. - * objc/objc-act.c (create_builtin_decl): Likewise. - (synth_module_prologue): Likewise. - (generate_static_reference): Likewise. - (build_selector_reference_decl): Likewise. - (build_class_reference_decl): Likewise. - (build_objc_string_decl): Likewise. - (build_protocol_reference): Likewise. - -2001-01-10 Richard Henderson - - * hwint.h: Revert yesterday's change. - -2001-01-10 Nick Clifton - - * function.h (save_machine_status): Delete. - (restore_machine_status): Delete. - Amend comment describing {init|mark|free}_machine_status. - - * function.c (save_machine_status): Delete. - (restore_machine_status): Delete. - Amend comment describing {init|mark|free}_machine_status. - (push_function_context_to): Remove invocation of - save_machine_status. - (pop_function_context_from): Remove invocation of - restore_machine_status. - - * emit-rtl.c (init_emit_once): Amend comment describing - {init|mark|free}_machine_status. - - * tm.texi (Per-Function Data): New node. Describe the - INIT_EXPANDERS macro and the {init|mark|free}_machine_status - function pointers. - -2001-01-10 Neil Booth - - * cppinit.c (OPT_g): Remove. - (cpp_handle_option): Update for removed -g3. - (print_help): Update. - * cpplib.h (struct cpp_options): Remove debug_output. - * cppmain.c (setup_callbacks, cb_define): Update. - * gcc.c (cpp_options): Translate -g3 to -dD. - -2001-01-10 Aldy Hernandez - - * config/i960/i960.md: Change modifier to + on the zero_extract - pattern after the (rotate -2 reg) canonicalization pattern. - -2001-01-10 Richard Henderson - - * config/alpha/alpha.c (alpha_free_machine_status): New. - (override_options): Install it. - (alpha_mark_machine_status): Verify machine non-null. - * config/i386/i386.c (ix86_free_machine_status): New. - (override_options): Install it. - (ix86_init_machine_status): Use xcalloc. - (ix86_mark_machine_status): Verify machine non-null. - * config/ia64/ia64.c (ia64_free_machine_status): New. - (ia64_override_options): Install it. - (ia64_mark_machine_status): Verify machine non-null. - -Wed Jan 10 11:34:39 2001 Jeffrey A Law (law@cygnus.com) - - * function.c (instantiate_virtual_regs): Instantiate virtual - registers found in CALL_INSN_FUNCTION_USAGE. - -2001-01-10 Joseph S. Myers - - * i386.h (CPP_CPU_SPEC): Allow for -std=c* and -std=i* as - equivalent to -ansi in disabling -Di386. - -Wed Jan 10 16:38:31 MET 2001 Jan Hubicka - - * i386.c (ix86_fp_compare_code_to_integer, ix86_fp_comparison_codes): - new functions. - (ix86_expand_fp_compare): Make trivial use of new infrastructure. - -2001-01-10 Richard Earnshaw - - * arm.c (arm_init_builtins): Temporarily disable xscale builtins. - -2001-01-10 Joseph S. Myers - - * invoke.texi: Document that -fcond-mismatch isn't supported for - C++. - -2001-01-10 Joseph S. Myers - - * gcc.texi: Define macro gcctabopt. - * invoke.texi: Add manpage sections BUGS and AUTHOR. Use - @command, @env and @option in some places where appropriate. Use - @gcctabopt where appropriate. Put URLs and email addresses inside - @w. - -2001-01-10 Nathan Sidwell - - * gcc.c (cpp_options): Set MD file name from output - filename, if specified. - (suffix_subst): New static variable. - (do_spec): Clear it. - (do_spec_1, case '.'): Handle new `%.suffix' spec. - Clear it. - (give_switch): Handle suffix_subst. - -2001-01-10 Phil Edwards - - * invoke.texi: Fix another typo. - -2001-01-10 Phil Edwards - - * invoke.texi: Fix typo. - -2001-01-10 Neil Booth - - * c-lang.c (lang_hooks): Update. - (lang_decode_option): Remove. - (lang_init_options): Rename c_init_options. - * toplev.c (main): Use lang_hooks for lang_init_options - and lang_decode_option. - * toplev.h (lang_hooks): Add 2 new hooks. - * tree.h: Remove lang_init_options and lang_decode_option. - * cp/cp-tree.h (lang_decode_option): Rename cxx_decode_option. - * cp/decl2.c: Similarly. - * cp/lex.c (lang_init_options): Rename cxx_init_options. - (lang_hooks): Update. - * f/com.c (f_init, f_finish): Rename ffe_init, ffe_finish - for consistency. - (lang_init_options): Rename ffe_init_options. - (lang_hooks): Update. - (lang_decode_option): Remove. - * java/lang.c (lang_init_options): Rename java_init_options. - (lang_decode_option): Rename java_decode_option. - (lang_hooks): Update. - * objc/objc-act.c (lang_init_options): Rename objc_init_options. - (lang_decode_option): Rename objc_decode_option. - (lang_hooks): Update. - -2001-01-09 Nick Clifton - - * config/d30v/d30v.c (d30v_eh_epilogue_sp_ofs): Delete. - (d30v_return_addr_rtx): Delete. - (d30v_expand_epilogue): Use eh_epilogue_sp_ofs field in the - cfun->machine structure. - (struct machine_function): Move to d30v.h - (d30v_save_machine_status): Delete. - (d30v_restore_machine_status): Delete. - (d30v_init_machine_status): New Function. - (d30v_mark_machine_status): New Function. - (d30v_free_machine_status): New Function. - (d30v_init_expanders): Use new functions. - (d30v_return_addr): Use ra_rtx field in cfun->machine. - (d30v_add_gc_roots): Remove d30v_eh_epilogue_sp_ofs and - d30v_return_addr_rtx. - - * config/d30v/d30v.h (struct_machine): Move here. - Add eh_epilogue_sp_ofs field. - - *config/d30v/d30v.md (epilogue): Initialize eh_epilogue_sp_ofs - field in cfun->machine structure. - -Tue Jan 9 21:34:57 2001 John David Anglin - - * pa32-regs.h (CONDITIONAL_REGISTER_USAGE): When generating pic code, - PIC_OFFSET_TABLE_REGNUM_SAVED is a call_used register. - * pa64-regs.h (CONDITIONAL_REGISTER_USAGE): Likewise. - -Tue Jan 9 21:25:19 2001 Jeffrey A Law (law@cygnus.com) - - * objc/lang-options.h: Remove bogus reference to - Java trademark. - -2001-01-09 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Use a struct shift_info to - return the result. - -2001-01-09 Alan Lehotsky - - * reload.c (find_reloads_address): Check for eliminable registers - when substituting a constant expression for a pseudo. - -2001-01-09 Joseph S. Myers - - * c-common.c (enum format_type): Add format_type_error. - (decode_format_type): New function. - (decl_attributes): Use it. - (format_kind_info): Adjust comment. - -2001-01-09 David O'Brien - - * config.gcc (*-*-gnu*, i[34567]86-*-elf*, i[34567]86-*-linux*libc1, - i[34567]86-*-linux*, i[34567]86-*-moss*): Specify needed platform specific - files in tm_file. - * config/i386/gnu.h: Don't include required platform specific .h files, - tm.h will do it instead. - * config/i386/i386elf.h: Likewise. - * config/i386/linux.h: Likewise. - * config/i386/moss.h: Likewise. - * config/mips/gnu.h: Likewise. - -2001-01-09 Franz Sirl - - * config.gcc (powerpc-*-beos*): Include ${tm_file} and rs6000/aix.h. - (rs6000-ibm-aix3.[01]*): Likewise. - (rs6000-ibm-aix3.2.[456789]*, powerpc-ibm-aix3.2.[456789]*): Likewise. - (rs6000-ibm-aix4.[12]*, powerpc-ibm-aix4.[12]*): Likewise. - (rs6000-ibm-aix4.[3456789]*, powerpc-ibm-aix4.[3456789]*): Likewise. - (rs6000-ibm-aix[56789].*, powerpc-ibm-aix[56789].*): Likewise. - (powerpc-*-sysv*): Include {tm_file}. svr4.h and rs6000/sysv4.h. - (powerpc-*-eabiaix*): Likewise. - (powerpc-*-eabisim*): Likewise. - (powerpc-*-elf*): Likewise. - (powerpc-*-eabi*): Likewise. - (powerpc-*-rtems*): Likewise. - (powerpc-*-linux*libc1): Likewise. - (powerpc-*-linux*): Likewise. - (powerpc-wrs-vxworks*): Likewise. - (powerpcle-wrs-vxworks*): Likewise. - (powerpcle-*-sysv*): Likewise. - (powerpcle-*-elf*): Likewise. - (powerpcle-*-eabisim*): Likewise. - (powerpcle-*-eabi*): Likewise. - (powerpcle-*-solaris2*): Likewise. - * config/rs6000/aix31.h: Delete includes. - * config/rs6000/aix3newas.h: Likewise. - * config/rs6000/aix41.h: Likewise. - * config/rs6000/aix43.h: Likewise. - * config/rs6000/beos.h: Likewise. - * config/rs6000/rtems.h: Likewise. - * config/rs6000/sysv4.h: Likewise. - -2001-01-09 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Remove an argument cpu. - Change an argument mode of machine_mode to shift_mode of - shift_mode. Remove an extra error check. - (emit_a_shift): Adopt to the new calling prototype of - get_shift_alg. - (function_prologue): Fix code for a monitor - function. Support H8S. - (function_epilogue): Do not output pop for a monitor function. - -2001-01-09 Nick Clifton - - * config/rs6000/rs6000.c (rs6000_sysv_varargs_p): Delete. - (setup_incoming_varargs): Use sysv_varargs_p field of the - cfun->machine structure. - (struct machine_function): Move to rs6000.h - (rs6000_save_machine_status): Delete. - (rs6000_restore_machine_status): Delete. - (rs6000_init_machine_status): New Function. - (rs6000_free_machine_status): New Function. - (rs6000_init_expanders): Use new functions. - - * config/rs6000/rs6000.h (rs6000_sysv_varargs_p): Delete - export. - (struct machine_function): Move here. - - * config/rs6000/sysv4.h (RS6000_VARARGS_AREA): Use - sysv_varargs_p field of the cfun->machine structure. - - * config/rs6000/rs6000-protos.h (rs6000_save_machine_status): - Remove prototype. - (rs6000_restore_machine_status): Remove prototype. - -2001-01-09 Richard Henderson - - * sched-int.h (struct deps): Add max_reg, reg_last_in_use; merge - reg_last_uses, reg_last_sets, reg_last_clobbers into struct deps_reg. - * sched-deps.c (sched_analyze_1): Update uses of struct deps. - (sched_analyze_2, sched_analyze_insn): Likewise. - (sched_analyze, init_deps): Likewise. - (free_deps): Likewise. Iterate with EXECUTE_IF_SET_IN_REG_SET. - * sched-rgn.c (propagate_deps): Likewise. Remove max_reg argument. - (compute_block_backward_dependences): Update propagate_deps call. - -2001-01-09 Mark Elbrecht - - * gcc.c (process_command): Set switches[n_switches].ordering to 0. - -2001-01-09 Neil Booth - - * cppinit.c (OPT_MD, OPT_MMD): Restore. - (cpp_handle_option): Handle them. - (cpp_post_options): Ensure one of -M or -MM is specified with - any other -M? option. - (init_dependency_output): Suppress output with -MG. - -2001-01-09 Neil Booth - - * cpp.texi: Update. - * invoke.texi: Update. - -2001-01-09 Bernd Schmidt - - * sh.md (reload_outsf): Generate recognizable patterns for - TARGET_SH3E. - -2001-01-09 Neil Booth - - * c-lang.c (lang_hooks): Update. - (lang_init): Rename c_init. - (lang_finish): Remove. - * toplev.c (compile_file): Use lang_hooks for lang_init () - and lang_finish (). - * toplev.h (lang_hooks): Add init () and finish (). - * tree.h (lang_init, lang_finish): Remove. - * cp/tree.h (lang_init, lang_finish): Remove. - * cp/decl2.c (cxx_post_options, lang_hooks): Move to cp/lex.c. - * cp/lex.c (cxx_init, cxx_finish, cxx_post_options, - lang_hooks): New. - (lang_init, lang_finish): Remove. - * f/com.c (lang_init, lang_finish): Rename f_init, f_finish. - (lang_hooks): Update. - * java/lang.c (lang_init): Rename java_init. - (lang_finish): Remove. - (lang_hooks): Update. - * objc/objc-act.c (lang_init): Rename objc_init. - (lang_finish): Remove. - (lang_hoooks): Update. - -20001-01-09 Graham Stott - - * cppfiles.c (_cpp_execute_include): Move `len` initialisation - after `ptr` is initialized. - -2001-01-09 Alexandre Oliva - - * config/sh/sh.h (STATIC_CHAIN_REGNUM): Change from r13 to r3. - (INITIALIZE_TRAMPOLINE): Adjust accordingly. - * config/sh/sh.c (sh_expand_prologue): Use r1 as temporary for - stack adjusts, instead of r3. - -2001-01-09 Michael Hayes - - * flow.c (flow_loop_scan): Break out of ... - (flow_loops_find) ... here. - * basic-block.h (flow_loop_scan): New. - (LOOP_ENTRY_EDGES, LOOP_EXIT_EDGES): Add. - (LOOP_EDGES, LOOP_EXITS_DOMS, LOOP_ALL): Redefine. - -2001-01-09 Alexandre Oliva - - * cppinit.c (cpp_cleanup): NULLify macro_buffer and zero - macro_buffer_len. - * cppmacro.c (cpp_macro_definition): Reset macro_buffer_len when - realloc()ing macro_buffer. - - * hwint.h (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Use long long - if it's wider than long and the target's long is wider than the - host's. - -2001-01-09 Mark Mitchell - - Remove support for using UWIN as a host machine. - * configure.in: Issue an error message. - * configure: Regenerated. - * config.gcc: Remove xm_* UWIN configury. - * config/i386/xm-uwin.h: Remove. - -2001-01-08 Nick Clifton - - * config/v850/v850.c (ra_rtx): Delete. - (v850_save_machine_status): Delete. - (v850_restore_machine_status): Delete. - (v850_init_machine_status): New function. - (v850_mark_machine_status): New function. - (v850_free_machine_status): New function. - (v850_return_addr): Use ra_rtx field in machine structure. - (v850_init_expanders): Use new functions. - - * config/v850/v850-protos.h: Fix prototypes for v850_output_* - * config/v850/v850.c: Change arguments to v850_output+* functions - to take a const char *, to avoid compile time warning. - * config/v850/v850.h (ASM_OUTPUT_LABELREF): Undefine, not needed. - (USER_LABEL_PREFIX): Redefine. - -2000-01-08 Jim Wilson - - * sched-rgn.c (BITSET_ADD, BITSET_REMOVE, bitset_member): Cast - 1 to unsigned HOST_WIDE_INT before left shift. - -2001-01-08 Nick Clifton - - * config/arm/arm.c (arm_mark_machine_status): Check to see if - the machine structure has been allocated. - (arm_free_machine_status): New function: Free the machine - specific function structure. - -2001-01-08 Richard Henderson - - * jump.c (simplejump_p): Revert last change. - -2001-01-08 Neil Booth - - * cppinit.c (init): Rename init_library. - (cpp_create_reader): Update. - * gcc.c (cpp_options): If -o given, use it as the target of - any -M options. - -2001-01-08 Richard Earnshaw - - * arm.c (arm_arch5e): New variable. - (all_cores): XScale is a 5TE device. - (arm_override_options): Set arm_arch5e. - (arm_init_builtins): __builtin_prefetch is in arch5e. - * arm.h (arm_arch5e): Declare it. - - * arm.h (PREDICATE_CODES): Add arm_hard_register_operand. - - * arm.md (define_constants): Add defines for UNSPEC and - UNSPEC_VOLATILE insns. Update all users. - (define_constants): Add constants for IP_REGNUM, SP_REGNUM, PC_REGNUM. - * arm.c (multi_register_push, note_invalid_constants) - (emit_multi_reg_push, emit_sfm, expand_prologue): Use constants. - * arm.h (SP_REGNUM, IP_REGNUM, PC_REGNUM): Delete defines. - (STACK_POINTER_REGNUM): Define in terms of SP_REGNUM. - -Mon Jan 8 16:14:56 MET 2001 Jan Hubicka - - * jump.c (jump_optimize_1): Use reversed_comparison_code - instead of can_reverse_comparison_p. - (jump_back_p): Likewise. - (invert_exp_1): Likewise. - (thread_jumps): Likewise. - * simplify-rtx.c (simplify_unary_operation): Likewise. - (simplify_ternary_operation): Likewise. - * cse.c (find_comparison_args): Convert to use - can_reverse_comparison_p. - (record_jump_equiv): Likewise. - -2001-01-08 Richard Earnshaw - - * arm.h (HARD_REGNO_RENAME_OK): Delete. - (EPILOGUE_USES): Define. - (INITIAL_ELIMINATION_OFFSET): Current prologue code does not - automatically stack the LR if it isn't live. - -Mon Jan 8 13:46:02 MET 2001 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Take care to reverse fp conditions - properly. - -Sun Jan 7 18:37:43 2001 Mark P Mitchell - - * ggc-page.c (max_alignment): New structure. - (MAX_ALIGNMENT): New macro. - (init_ggc): Use it to round up the sizes in the - extra_order_size_table. - -2001-01-07 Franz Sirl - - * config/rs6000/rs6000.h (EPILOGUE_USES): New, mark link register - after reload. - -2001-01-07 Kaveh R. Ghazi - - * builtins.def (BUILT_IN_FPRINTF): New entry. - - * c-common.c (c_expand_builtin_fprintf): New function. - (init_function_format_info): Handle __builtin_fprintf. - (c_common_nodes_and_builtins): Declare fprintf/__builtin_fprintf. - (c_expand_builtin): Handle BUILT_IN_FPRINTF. - - * c-decl.c (duplicate_decls): Adjust comment. - - * extend.texi (fprintf): Document new builtin. - -2001-01-07 Richard Henderson - - * jump.c (simplejump_p): Recognize any single_set jump - of the proper form. - -2001-01-07 Richard Henderson - - * configure.in (slibdir): Accept an --with-slibdir option. - Use "test" not "[" in configure. Default to $(libdir). - - * config/t-linux (SHLIB_INSTALL): Double quote slibdir; - fix typo in rm -f. - * config/t-aix43 (SHLIB_INSTALL): Likewise. - * config/alpha/t-osf4 (SHLIB_INSTALL): Likewise. - (SHLIB_LINK): Create links for the soname. - * config/mips/t-iris6: Likewise. - * config/sparc/t-slibgcc: Likewise. - * config/sparc/t-slibgcc-sld: Likewise. - -2001-01-07 Jakub Jelinek - - * config/i386/i386.c (constant_call_address_operand): Accept - (const (plus (symbol_ref) (const_int))). - * config/i386/i386.h (PREDICATE_CODES): Add CONST for - constant_call_address_operand. - -2001-01-08 Michael Hayes - - * libgcc2.h (W_TYPE_SIZE): Fix case where MIN_UNITS_PER_WORD == 1 - and LONG_LONG_TYPE_SIZE > 32. - -2001-01-07 Gerald Pfeifer - - * jump.c (reversed_comparison_code_parts): Fix typo introduced by - the previous change. - -Sun Jan 7 19:37:48 MET 2001 Jan Hubicka - - * jump.c (reversed_comparison_code_parts, reversed_comparison_code): - New. - (can_reverse_comparison_p): Rewrite to use reversed_comparison_code. - (reverse_condition_maybe_unordered): Abort on unsigned comparisons. - * rtl.h (reversed_comparison_code_parts, reversed_comparison_code): - Declare. - -2001-01-07 Neil Booth - - * fix-header.c (read_scan_file): s/pfile/scan_in/. - -2001-01-07 Neil Booth - - * c-lang.c (c_post_options): Call cpp_post_options. - * objc/objc-act.c (objc_post_options): Similarly. - * cppmain.c (main): Similarly. - * fix-header.c (read_scan_file): Similarly. - * cppinit.c (cpp_start_read): Move option consistency checks - to cpp_post_options. Don't call init_dependency_output. - If needed, add default target and main file dependency. - (OPT_MD, OPT_MMD): Remove. - (OPT_MF): New. - (cpp_handle_option): Update for OPT_* changes. - (cpp_post_options): New. - (init_dependency_output): Command line -MF overrides environment - variables. Don't set default target etc. Suppress output - if dependencies are going to stdout. - (print_help): Update. - * cpplib.h (cpp_post_options): New. - * gcc.c (cpp_options): Update for -MD, -MMD, -MF. - -Sun Jan 7 14:44:19 MET 2001 Jan Hubicka - - * jump.c (comparison_dominates_p): Support unordered compares. - -Sun Jan 7 14:39:07 MET 2001 Jan Hubicka - - * simplify-rtx.c (simplify_relational_operation): Always simplify - ORDERED and UNORDERED when FLAG_FAST_MATH. Handle properly UNLE - and UNGE. - -Sun Jan 7 14:35:13 MET 2001 Jan Hubicka - - * combine.c (combine_simplify_rtx): Recognize the unordered compares. - (nonzero_bits): Likewise. - (simplify_comparison): Likewise. - (num_sign_bit_copies): Likewise; return more sane value depending - on STORE_FLAG_VALUE. - (known_cond): Do not assume EQ to be always true for equivalent - operands. - -Sun Jan 7 14:31:57 MET 2001 Jan Hubicka - - * cse.c (fold_rtx): Handle unordered comparisons. - -Sun Jan 7 13:49:19 MET 2001 Jan Hubicka - - * rtlanal.c (set_of_1): New static function. - (reg_set_last_1, reg_set_p_1, reg_set_reg, reg_set_flag, - reg_set_last_unknown, reg_set_last_value, reg_set_last_first_regno, - reg_set_last_last_regno): Remove. - (set_of): New global function. - (set_of_data): New structure. - (reg_set_p, reg_set_last): Revamp for set_of. - * rtl.h (set_of): New. - -2001-01-07 Joseph S. Myers - - * c-common.c (c_common_nodes_and_builtins): Add _Exit builtin. - * extend.texi: Document _Exit builtin. - -2001-01-07 Neil Booth - - * (initialize, initialize_builtins, - initialize_dependency_output, initialize_standard_includes): - Rename s/initialize/init. Update. - (init_dependency_output): Move to after - cpp_handle_options, the correct location temporally at least. - (opt_comp): Move next to init (), its caller. Fix prototype. - (init): Make "initialized" local scope. - (cpp_create_reader): Always call init (). - (cpp_start_read): Update. - (output_deps): New function, broken out of cpp_finish. - (cpp_finish): Break out output_deps. - -2001-01-07 Richard Henderson - - * collect2.c (COFF specific stuff): Revert 12-06 patch - to prototype system functions. - -2001-01-07 Michael Hayes - - * hard-reg-set.h: Add multiple include guard. - * basic-block.h (struct loop): Add `sink' field. - * loop.h: Include sbitmap.h, hard-reg-set.h, and basic-block.h. - (emit_iv_add_mult): Delete. - (loop_iv_add_mult_hoist, loop_iv_add_mult_sink): Define. - (loop_iv_add_mult_emit_before, loop_insn_sink): Define. - (unroll_loop): Remove end_insert_before argument. - * loop.c (loop_givs_rescan): Remove end_insert_before argument. - (maybe_eliminate_biv_1): Likewise. - (emit_iv_add_mult): Delete. - (gen_add_mult, loop_regs_update): New. - (loop_insn_emit_after, loop_insn_emit_before): New. - (loop_insn_sink, loop_insn_sink_or_swim): New. - (emit_iv_add_mult): Delete. - (scan_loop): Set loop->sink. - (loop_givs_reduce): Use loop_insn_sink and its ilk. - (loop_givs_rescan, strength_reduce, check_dbra_loop): Likewise. - (maybe_eliminate_biv_1): Likewise. - (maybe_eliminate_biv_1): Add basic block argument. - * unroll.c (unroll_loop): Remove end_insert_before argument. - (find_splittable_regs): Likewise. - (find_splittable_regs): Use loop_insn_sink and its ilk. - (find_splittable_givs, final_biv_value, final_giv_value): Likewise. - -2001-01-07 Michael Hayes - - * loop.h (loop_insn_hoist): New prototype. - * loop.c (loop_insn_hoist, loop_insn_emit_before): New. - (move_movables, loop_givs_rescan): Use loop_insn_hoist. - (check_dbra_loop, load_mems): Likewise. - * unroll.c (unroll_loop, find_splittable_regs): Likewise. - (find_splittable_givs): Likewise. - -2001-01-07 Michael Hayes - - * loop.c (emit_iv_add_mult): Use single_set to examine new insn. - -2001-01-07 Richard Henderson - - * sched-rgn.c (is_cfg_nonregular): Fix thinko's last change. - -2001-01-07 Richard Henderson - - * Makefile.in (DRIVER_DEFINES): Define ENABLE_SHARED_LIBGCC and - NO_SHARED_LIBGCC_MULTILIB as required for the target. - * gcc.c (init_spec): Massage the existing libgcc_spec into a - variant that handles a shared libgcc. - (process_command): Always validate -{static,shared}-libgcc. - (do_spec_1): New 'M' case. - * invoke.text (Link Options): Document -{static,shared}-libgcc. - -2001-01-07 Richard Henderson - - * Makefile.in (slibdir): New variable. - (libgcc.mk): Pass SHLIB_INSTALL to mklibgcc. - (installdirs): Create slibdir. - (install-libgcc, install-multilib): Defer to libgcc.mk. - * configure.in (slibdir): Substitute. - * mklibgcc.in (install): New target. - - * config/t-linux (SHLIB_LINK): Create links for the soname. - (SHLIB_INSTALL): New. - * config/alpha/t-osf4 (SHLIB_INSTALL): New. - * config/mips/t-iris6 (SHLIB_INSTALL): New. - * config/rs6000/t-aix43 (SHLIB_INSTALL): New. - * config/sparc/t-slibgcc (SHLIB_INSTALL): New. - * config/sparc/t-slibgcc-sld (SHLIB_INSTALL): New. - -2001-01-07 Richard Henderson - - * config/rs6000/aix.h (LINK_LIBGCC_SPECIAL_1): New. - * config/rs6000/rs6000.h (LIBGCC_SPEC): Remove. - * config/rs6000/sysv4.h (LIBGCC_SPEC): Remove. - -2001-01-07 Michael Hayes - - * loop.c (count_loop_regs_set): Delete. - (load_mems_and_recount_loop_regs_set): Delete. - (loop_regs_scan): Merge common code from count_loop_regs_set, - scan_loop, and load_mems_and_recount_loop_regs_set. - (scan_loop): Call load_mems directly and loop_regs_scan - again if new registers created. - -2001-01-07 Neil Booth - - * toplev.c (main): Call the front-end specific post_options - hook if one is given. - * toplev.h (struct_lang_hooks, lang_hooks): New. - * c-lang.c (c_post_options, lang_hooks): Implement lang_hooks - for the C front end. - * cp/decl2.c (cxx_post_options, lang_hooks): Implement - lang_hooks for the C++ front end. - * objc/objc-act.c (objc_post_options, lang_hooks): Implement - lang_hooks for the ObjC front end. - * f/com.c (lang_hooks): Hooks for the Fortran front end. - * java/lang.c (lang_hooks): Hooks for the Java front end. - -2001-01-07 Neil Booth - - * c-lex.c (init_c_lex): Request #define / #undef callbacks - for verbose DWARF[2] debugging. - (cb_define, cb_undef): The new callbacks. - * toplev.h (debug_define, debug_undef): Make const correct. - * toplev.c (debug_define, debug_undef): Similarly. Do not - perform the verbosity tests here anymore. - -2001-01-07 Alexandre Oliva - - * reload.c (subst_reloads): Take INSN argument. When - replacing a LABEL_REF in a JUMP_INSN, add a REG_LABEL note. - * reload.h (subst_reloads): Adjust prototype. - * reload1.c (reload_as_needed): Pass INSN to subst_reloads. - * jump.c (mark_all_labels): Canonicalize any REG_LABEL notes - present in JUMP_INSNs and copy them to JUMP_LABEL. - * flow.c (find_label_refs, find_basic_blocks_1): Skip - JUMP_INSNs and insns with REG_LABELs that are followed by - JUMP_INSNs with the same REG_LABEL. - * sched-rgn.c (is_cfg_nonregular): Likewise. - * rtlanal.c (computed_jump_p): Make it false if a REG_LABEL - note is available. - * unroll.c (unroll_loop): Look for REG_LABEL notes in - JUMP_INSNs too. - * rtl.texi (REG_LABEL): Document usage in JUMP_INSNs. - -2001-01-06 Richard Henderson - - * loop.c (scan_loop): Use xcalloc for the regs array. - (load_mems_and_recount_loop_regs_set): Zero the new memory - received from xrealloc. - -2001-01-06 Neil Booth - - * mkdeps.c (deps_add_dep): Fix vector re-allocation. - -Sat Jan 6 00:09:34 2001 J"orn Rennecke - - * integrate.c (copy_rtx_and_substitute): When copying - an ignored return value, strip REG_FUNCTION_VALUE_P. - -2001-01-06 Michael Hayes - - * loop.c (debug_biv, debug_giv): New. - (loop_biv_dump): Break out from ... - (record_biv): ... here. - (loop_giv_dump): Break out from ... - (record_giv): ... here. - (loop_bivs_check): Use print_simple_rtl. - * unroll.c (loop_iterations): Use print_simple_rtl. - -2000-01-05 John David Anglin - - * pa.md (return, return_internal): Modify patterns to prevent regrename - mucking with the return pointer. - -2001-01-05 Richard Henderson - - * dwarf2out.c (mem_loc_descriptor) [case MEM]: Revert 10-31 change. - -Fri Jan 5 16:34:18 2001 Nick Clifton - - * config/v850/lib1funcs.asm: Replace __mulsi3 routine with faster - version supplied by Matteo Frigo. - -2001-01-05 Neil Booth - - * cpp.texi: Update for -MQ. - * cppinit.c (cpp_create_reader): Always create pfile->deps. - (cpp_cleanup): Always free pfile->deps. - (initialize_dependency_output): Don't create pfile->deps. - (cpp_handle_option): Similarly. - (OPT_MQ): New. - * gcc.c (cpp_options): Handle -MQ. - (DEFAULT_WORD_SWITCH_TAKES_ARG): Add -MQ. - * mkdeps.c (base_name): Remove. - (deps_init): Don't allocate vector space until it's needed. - (deps_free): Only free vectors if allocated. - (deps_add_target, deps_add_dep): Update for initial allocation. - (deps_add_default_target): Don't strip to the base_name. - -2001-01-05 DJ Delorie - - * config/v850/v850.h (RETURN_ADDR_RTX): Define. - (INIT_EXPANDERS): Define. - - * config/v850/v850.c (struct machine_function): Define. - (v850_save_machine_status): New function. - (v850_restore_machine_status): New function. - (v850_return_addr): New function. - (v850_init_expanders): New function. - - * config/v850/v850-protos.h: Add prototypes for v850_return_addr - and v850_init_expanders. - -2001-01-05 Zack Weinberg - - * cpplib.h (struct cpp_reader): Add help_only field. - * cppinit.c (COMMAND_LINE_OPTIONS): Add OPT_version. - (cpp_handle_option): Set pfile->help_only if we see -h, - --help, -target-help, or --version. Print version string but - do not set help_only if we see -v or -version. Make text - printed by -v match that printed by (-)-version. - - * cppmain.c (main): Exit after option parsing if - pfile->help_only is true. - - * toplev.c (independent_decode_option): Call print_version, - then exit, if we see --version (but not -version). - (print_version): Split lengthy message into two lines. - -2001-01-05 Nick Clifton - - * config/v850/v850.c (v850_encode_data_area): Use alloca to create - temporary string for initialisation before calling ggc_alloc_string. - -2001-01-06 Michael Hayes - - * rtl.h (print_simple_rtl): New. - * print-rtl.c (print_simple_rtl): New. - (flag_simple): New. - (print_rtx): Disable printing of flags and modes, etc., - if `flag_simple` nonzero. - -2001-01-05 Zack Weinberg - - * function.c (fixup_var_refs): Use push_to_full_sequence where - possible. - -2001-01-05 Michael Meissner - - * flags.h (flag_reorder_blocks): Add declaration. - (flag_rename_block): Ditto. - -2001-01-05 DJ Delorie - - * function.c (reorder_blocks): Make sure the flags are all reset - before using them to mark blocks, else a second invocation will - corrupt the block chain. - (reorder_blocks_0): New, resets the flags. - -Fri Jan 5 20:34:06 2001 J"orn Rennecke - - * cse.c (find_comparison_args): Stop if the argument is known to - be constant. - -2001-01-05 Alexandre Oliva - - * config/sh/sh.md (movdf): When splitting load into pair of - registers, don't clobber the register used in the address too - early. - -2001-01-05 Jeffrey Oldham - - * varasm.c (mark_constant_pool): Improve initial comments. - (mark_constants): Move marking of constants to mark_constant. - (mark_constant): New function to recursively mark all constants - referred to by a constant. - -2001-01-05 Catherine Moore - - * dbxout.c ((dbxout_parms): Handle invisible ref where decl is a REG. - -2001-01-05 Phil Edwards - - * cp/lang-options.h: Bring comment in line with reality. - * f/lang-options.h: Likewise. - * java/lang-options.h: Likewise. - * objc/lang-options.h: Likewise. - * ch/lang-options.h: Likewise. - * f/g77.texi: And update the manual. - -2001-01-05 Marek Michalkiewicz - Denis Chertykov - - * config/avr/avr-protos.h (avr_peep2_scratch_safe): Prototype. - * config/avr/avr.c (avr_peep2_scratch_safe): New function. - * config/avr/avr.md (all peepholes that request a scratch register): - Call it, FAIL the peephole if not safe (in interrupt functions). - -2001-01-05 Mark Mitchell - - * ggc-page.c (NUM_EXTRA_ORDERS): Hardwire to zero for now. - -2001-01-05 Joseph S. Myers - - * builtins.def (BUILT_IN_CONJ, BUILT_IN_CREAL, BUILT_IN_CIMAG): - Define. - * builtins.c (expand_builtin): Abort on BUILT_IN_CONJ, - BUILT_IN_CREAL and BUILT_IN_CIMAG. - * c-common.c (c_common_nodes_and_builtins): Create builtin conjf, - conj, conjl, crealf, creal, creall, cimagf, cimag and cimagl. - (expand_tree_builtin): Handle BUILT_IN_CONJ, BUILT_IN_CREAL and - BUILT_IN_CIMAG. - * extend.texi: Document these builtins. - -2001-01-05 Daniel Berlin - - * c-common.c (lang_get_alias_set): Say we know nothing of - VECTOR_TYPE aliasing. - - * dwarf2out.c (is_base_type): Handle VECTOR_TYPE properly. - -2001-01-05 Bruce Korb - - * fixinc/mkfixinc.sh(vax-*-bsd): convert exit and atexit calls to - their x* equivalent versions for atexit-less systems - * fixinc/fixincl.c(main): do not return from main() on atexit-less - systems (or any other system any more). - -2001-01-05 Richard Earnshaw - - * arm.md (ldmsi_postinc): Avoid use of match_dup between input and - output operands. Use arm_hard_register_operand for operand 4. - (stmsi_postinc): Similarly. - (ldmsi): Use arm_hard_register_operand for opernand 2. - (stmsi): Similarly. - * arm.c (arm_hard_register_operand): New function. - * arm-protos.h (arm_hard_register_operand): Prototype it. - - * arm.h (HARD_REGNO_RENAME_OK): Define. - -Fri Jan 5 16:29:49 MET 2001 Jan Hubicka - - * simplify-rtx.c (cfc_args): add "unordered" field. - (check_fold_consts): Set unordered field. - (simplify_relational_operation): Simplify the unordered - comparisons. - - * reg-stack.c (swap_rtx_condition): Ensure that the transformation - is valid. - - * emit-rtl.c (try_split): Fix code to mark labels. - * jump.c (mark_jump_label): Make global. - * rtl.h (mark_jump_label): Declare. - - * predict.c (estimate_probability): Handle unordred comparisons. - -2001-01-05 Neil Booth - - * cpp.texi: Update for -MP. Clarify behavior of -MT. - * cppinit.c (initialize_dependency_output): Update. - (cpp_finish): Output dummy targets for -MP. - (OPT_MP): New. - (cpp_handle_option): Handle -MP. Don't quote -MT options. - * cpplib.h (struct cpp_options): Add deps_phony_targets. - * gcc.c (cpp_options): Update to handle -MP. - * mkdeps.c (deps_add_target, deps_add_default_target): Update - to quote only the default target. - (deps_phony_targets): Insert a preceding newline. Rename from - deps_dummy_targets for consistency. - * mkdeps.h: Update - -2001-01-05 Alexandre Oliva - - * calls.c (emit_library_call_value_1): Support - INIT_CUMULATIVE_LIBCALL_ARGS. - * tm.texi (INIT_CUMULATIVE_LIBCALL_ARGS): Document it. - -2001-01-04 Richard Henderson - - * c-decl.c (finish_struct): Detect flexible array members - used in an inappropriate context. - * c-typeck.c (really_start_incremental_init): Special case - constructor_max_index for zero length arrays. - (pop_init_level): Allow initialization of flexible array - members. Deprecate initialization of zero length arrays. - Don't issue missing initializer warning for flexible array - members or zero length arrays. - (process_init_element): Don't dereference null DECL_SIZE. - * varasm.c (array_size_for_constructor): Return a HOST_WIDE_INT. - Don't abort for empty constructors. Use size_binop - (output_constructor): Add commentary regarding zero length - array futures. Abort if we try to initialize an array of - unspecified length with a non-empty constructor in the middle - of a structure. - - * extend.texi (Zero Length): Update and clarify documentation - on static initialization. - -2001-01-05 Michael Hayes - - * config/c4x/c4x.c (c4x_expand_prologue): Don't compile an ISR - with more than 32767 words of local storage. - -2001-01-05 Michael Hayes - - * config/c4x/c4x.c (c4x_init_builtins): Remove builtin support - for 'abs', 'labs', and 'fabs'. - (c4x_expand_builtin): Likewise. - * config/c4x/c4x.h (enum c4x_builtins): Likewise. - -2001-01-05 Alexandre Oliva - - * config/sh/sh.md (prget, prset): New insn types. - (return delay slot): Don't allow prset. - (call, sfunc delay slot): Don't allow prget. - (movsi_i, movsi_ie, movsi_i_lowpart): Create separate alternatives - for prset and prget. - -2001-01-05 Michael Hayes - - * loop.h (struct loop_reg): New. - (struct loop_regs): Change to use array of `struct loop_reg'. - * loop.c: Replace assortment of varrays with single regs array. - (count_one_set): Delete may_not_move array argument - and use regs array instead. All caller's changed. - (count_loop_regs_set): Delete may_not_move and single_usage - arguments and use regs array instead. All caller's changed. - (find_single_use_in_loop): Replace usage array argument with pointer - to regs structure. All caller's changed. - (loop_optimize): Delete `moved_once' array. - -2001-01-05 Michael Hayes - - * loop.c (prescan_loop): Set loop_info->has_nonconst_call. - Use it instead of loop_info->has_call for scanning loop mems. - (check_dbra_loop): Replace loop_info->has_call test with - loop_info->has_nonconst_call. - -2000-01-04 Matthew Hiller - - * config/sh/sh.h (EPILOGUE_USES): Recognize fpscr as epilogue-used - for TARGET_SH3E. - -2001-01-04 Joseph S. Myers - - * fold-const.c (fold): When folding a CONJ_EXPR of a COMPLEX_CST, - use TREE_REALPART and TREE_IMAGPART instead of TREE_OPERAND. - -2001-01-04 Joseph S. Myers - - * c-common.c (SIZE_TYPE, WCHAR_TYPE): Define. - (flag_short_double, flag_short_wchar): Define. - (c_common_nodes_and_builtins): Create many tree nodes shared - between C and C++ here instead of in cp/decl.c and ... - * c-decl.c (init_decl_processing): ... here. - (SIZE_TYPE, WCHAR_TYPE): Don't define. - (flag_short_double, flag_short_wchar): Don't define. - (record_builtin_type): New function. - (build_void_list_node): New function. - * c-common.h (flag_short_double, flag_short_wchar, - record_builtin_type, build_void_list_node): Declare. - -Thu Jan 4 21:09:47 2001 J"orn Rennecke - - * integrate.c (expand_inline_function): Don't put a virtual - register into the reg map. - - * function.c (fixup_var_refs_1): If force_operand didn't put - the address into the target, move it there. - -2001-01-04 Mark Mitchell - - Special-case tree_decl/tree_list allocations. - * ggc-page.c (OBJECT_PER_PAGE): Reimplement. - (OBJECT_SIZE): New macro. - (NUM_EXTRA_ORDER): Likewise. - (extra_order_size_table): New variable. - (NUM_ORDERS): New macro. - (objects_per_page_table): New variable. - (object_size_table): New variable. - (G.pages): Use NUM_ORDERS to bound the array. - (G.page_tails): Likewise. - (DIV_ROUND_UP): Remove. - (BITMAP_SIZE): Use CEIL, instead of DIV_ROUND_UP. - (alloc_page): Use OBJECT_SIZE. - (size_lookup): Don't make it const. - (ggc_alloc): Use OBJECT_SIZE. - (ggc_set_mark): Likewise. - (ggc_get_size): Likewise. - (init_ggc): Set up the object_size_table, objects_per_page_table, - and adjust size_lookup. - (ggc_recalculate_in_use_p): Use CEIL, not DIV_ROUND_UP. - (ggc_pop_context): Use NUM_ORDERS. - (clear_marks): Likewise. - (sweep_pages): Likewise. - (poison_pages): Likewise. - (ggc_print_statistics): Use OBJECT_SIZE. - -Thu Jan 4 15:54:05 2001 Richard Kenner - - * varasm.c (output_constructor): Use HOST_WIDE_INT for sizes. - Only call array_size_for_constructor if last field and array type - with no upper bound. - -2001-01-04 Philip Blundell - - * config/arm/arm.c (arm_gen_constant): Prefer to emit constants - from bit 31 downwards, if this requires no more insns. - (count_insns_for_constant): New helper function for above. - -2001-01-04 Alexandre Oliva - - * gencodes.c (output_predicate_decls): Remove empty initializer. - -2001-01-04 Mark Mitchell - - * tree.c (copy_node): Remove documentation about obstacks. - (buidl1): Check that nobody tries to build 2-argument nodes this - way. - -2001-01-04 Kaveh R. Ghazi - - * sparc.h (PREDICATE_CODES): Delete fp_sethi_p, fp_mov_p and - fp_high_losum_p. - - * gencodes.c (output_predicate_decls): Fill empty initializer - braces. - -2001-01-04 Jakub Jelinek - - * tradcpp.c (deps_file, print_deps_missing_files): New variables. - (main): Handle -MG, -MD, -MMD. Bail out if -MG is given without -M - or -MM. - (do_include): Handle missing headers like cpp0. - * cppfiles.c (_cpp_execute_include): Don't prefix absolute header - paths with first include pathname. Don't strcat to uninitialized - string. - -2001-01-04 Bernd Schmidt - - * regrename.c (regrename_optimize): Don't rename from frame pointer - if frame_pointer_needed. - (do_replace): Don't set ORIGINAL_REGNO to a hard register number. - * config/ia64/ia64.c (emit_all_group_insn_barriers): New function. - (ia64_reorg): Use it instead of scheduling if ! optimize. - (errata_emit_nops): Properly call asm_noperands. - (ia64_sched_reorder): Finish cycle if we see an asm. - (ia64_variable_issue): Clear scheduling state after asms. - -2001-01-04 Neil Booth - - * cpp.texi: Update for -MT. - * cppinit.c (initialize_dependency_output): Add a default - target if none has been given already. - (no_tgt, OPT_MT): New. - (cpp_handle_option): Handle -MT. Update -M etc. - * cpplib.h (struct cpp_options): Remove deps_target. - * gcc.c (cpp_options): Handle -MT. - * mkdeps.c (struct deps): Move from mkdeps.h. - (deps_calc_target): Rename deps_add_default_target. Add a - default target if none has been specified already. - * mkdeps.h (struct deps): Move to mkdeps.c. - (deps_calc_target): Rename deps_add_default_target. - -2000-01-03 Richard Henderson - - * c-decl.c (grokdeclarator): Give zero-length arrays size zero. - Remove dead code. - * c-typeck.c (push_init_level): Move checks for flexible array - members and zero length arrays ... - (pop_init_level): ... here. Silently discard empty initializations. - Remove dead code. - * varasm.c (output_constructor): Update for sizeof change to - zero-length arrays. - - * extend.texi (Zero Length): Clarify semantics. - -2001-01-03 Alexandre Oliva - - * configure.in (tm.h): Include isns-codes.h last. - * configure: Rebuilt. - -2001-01-03 Richard Henderson - - * config/alpha/alpha.md (addvsi3, addvdi3): New. - (negvsi2, negvdi2, subvsi3, subvdi3, mulvsi3, mulvdi3): New. - -2001-01-03 Franz Sirl - - * tradcpp.c (main): Make sure finclude() is called with a valid - indepth value while handling -include. - -2001-01-03 Alexandre Oliva - - * gencodes.c (output_predicate_decls): New function. - (main): Call it. - * machmode.h (GET_MODE_MASK): Arrange for it to be defined - even if it is not the first time machmode.h is #included. - * config/sh/sh.c (fpul_operand): Declare MODE argument. - * tm.texi (PREDICATE_CODES): Document predicate declarations. - * gcc.texi (Copyright): Added 2001. - -2001-01-03 Joseph S. Myers - - * c-common.c (c_common_lang_init): New function. Warn if format - warning options which only have effects when used with -Wformat - are used without -Wformat. - * c-common.h (c_common_lang_init): Declare. - * c-lang.c (lang_init): Call c_common_lang_init. - * objc/objc-act.c (lang_init): Call c_common_lang_init. - -2001-01-03 Joseph S. Myers - - * configure.in: Check for the mktemp command. - * configure: Regenerate. - * gccbug.in: Use a separate temporary file $TEMP0 for one use of - $TEMP. Create temporary files with mktemp, if available at - configure time; otherwise use set -C. Remove temporary files - before exit. - -2001-01-03 Joseph S. Myers - - * configure.in: Require at least texinfo 4.0. Check for whether - Pod::Man is sufficiently recent to regenerate GCC manpages. - * configure: Regenerate. - * Makefile.in (TEXI2POD): Call perl explicitly rather than relying - on #!. - (GENERATED_MANPAGES): Define. - (generated-manpages): New target. Depend on cpp.1 as well as - gcov.1. - (install-man): Depend on $(GENERATED_MANPAGES) (defined by - configure to generated-manpages or empty) rather than on the - manpages directly. Remove execute permission from installed - gcov.1 as well as cpp.1. - * cpp.1, gcov.1: Regenerate. - -2001-01-03 Kaveh R. Ghazi - - * builtins.c (expand_builtin_strncmp): Use host_integerp and - tree_low_cst. Allow using cmpstrsi in more cases. - -Wed Jan 3 10:48:43 2001 Richard Kenner - - * config/sparc/sparc.h (RETURN_IN_MEMORY): Return 0 for variable - sized types. - -Wed Jan 3 12:22:32 2001 Alexandre Oliva - - * build-make (HOST_CFLAGS): Added `-DGENERATOR_FILE'. - * Makefile.in (HOST_CFLAGS): Mention build-make. - -Wed Jan 3 08:53:50 2001 Richard Kenner - - * config/sparc/sparc.md (nonlocal_goto): Emit goto_handler_and_restore - as JUMP_INSN. - -2001-01-01 Bernd Schmidt - - * builtins.c (expand_builtin_return_addr): Don't use MEM_ALIAS_SET on - a REG rtx. - - * cse.c (cse_rtx_varies_p): Accept additional FROM_ALIAS arg. All - callers changed. - - * alias.c (throughout): Use ORIGINAL_REGNO when accessing - reg_base_value and reg_known_value arrays. - (init_alias_analysis): Add more cases to detect known values. - * sched-deps.c (deps_may_trap_p): New function. - (sched_analyze_2): Use it. - -2001-01-03 Alexandre Oliva - - * combine.c (simplify_shift_const): Even if we're sign-extracting, - don't discard an ASHIFTRT if we're shifting in a wider mode. - -2000-01-02 John David Anglin - - * toplev.c (rest_of_compilation): Don't print basic block information - when CFG isn't up to date. - -2001-01-02 Mark Elbrecht - - * config/i386/djgpp.h (DWARF2_DEBUGGING_INFO): Define. - (UNALIGNED_INT_ASM_OP, UNALIGNED_DOUBLE_ASM_OP): Define. - (UNALIGNED_SHORT_ASM_OP): Define. - (CPP_PREDEFINES): Remove defines for GO32 and DJGPP. - -2001-01-02 Mark Mitchell - - * fold-const.c (fold_convert): Fix typo. - -2001-01-02 Richard Henderson - - * c-common.h (ASM_INPUT_P): New. - * c-parse.in (asm): Set it when needed. - * c-semantics.c (genrtl_asm_stmt): Test it instead of the - existence of an operand. - -Tue Jan 2 20:27:07 MET 2001 Jan Hubicka - - * dwarf2out.c (stack_adjust_offset): Handle PRE_MODIFY. - (dwarf2out_frame_debug_expr): Likewise. - (mem_loc_descriptor): Handle PRE and POST_MODIFY. - -Tue Jan 2 20:21:31 MET 2001 Jan Hubicka - - * i386.c (ix86_split_to_parts): Return number of part required; - handle TFmodes. - (print_operand, ix86_expand_branch, ix86_expand_fp_movcc): Handle - TFmodes. - (ix86_split_long_move): Use number of part returned - by ix86_split_to_parts - * i386.h (MASK_128BIT_LONG_DOUBLE, TARGET_128BIT_LONG_DOUBLE): - New macros. - (TARGET_SWITCHES): Add 128bit-long-double and 96bit-long-double - (LONG_DOUBLE_TYPE_SIZE): Change from constant. - (MAX_LONG_DOUBLE_TYPE_SIZE): New macro. - (INTEL_EXTENDED_IEEE_FORMAT): Likewise. - (ALIGN_MODE_128): Add TFmode. - (IS_STACK_MODE): Likewise. - (HARD_REGNO_NREGS): TFmode needs 3 registers. - (HARD_REGNO_OK): Support TFmodes. - (ASM_OUTPUT_LONG_DOUBLE): Handle TFmodes. - * i386.md (scheduler definitions): Use memory operand to determine - fst/fld instructions; use mode attribute to determine real mode of - the instruction. - (*tf): New patterns, expanders and splitters; based on XFmode patterns. - * invoke.texi (128bit-long-double, 96bit-long-double): Document. - -2001-01-02 Mark Mitchell - - * tree.def (TRUTH_NOT_EXPR): Improve documentation. - -Tue Jan 2 10:47:38 2001 Richard Kenner - - * config/mips/mips.c (function_arg): Don't pass NULL_TREE to - host_integerp. - -2001-01-02 Jeffrey Oldham - - * tm.texi (FUNCTION_ARG): Document that @var{type} can be an - incomplete type. - -Tue Jan 2 10:47:38 2001 Richard Kenner - - * tsystem.h: Define HAVE_DECL_GETOPT. - -2001-01-02 Philip Blundell - - * config/arm/linux-gas.h (CLEAR_INSN_CACHE): Avoid illegal clobber - of input operand. - -2001-01-02 Richard Henderson - - * alpha.md (*ze_and_ne): Duplicate insn condition to split. - -2001-01-02 Andreas Jaeger - - * c-decl.c (c_decode_option): Remove support of - -Wmissing-noreturn. - - * toplev.c (documented_lang_options): Remove -Wmissing-noreturn. - (W_options): Add -Wmissing-noreturn here. - - * flow.c: Define lang_missing_noreturn_ok_p. - (check_function_return_warnings): Use it. - - * c-common.h: Declare lang_missing_noreturn_ok_p. - - * c-lang.c (c_missing_noreturn_ok_p): New function. - (lang_init): Set lang_missing_noreturn_ok_p. - - * invoke.texi (Warning Options): Document this. - -2000-12-27 Phil Edwards - - * extend.texi (C++ Extensions): New node for C++ attributes; - describe init_priority and com_interface. - * invoke.texi: Remove -finit-priority as it now has zero effect. - * install.texi: Fix xref syntax. - * md.texi: Likewise. - -Mon Jan 1 21:28:29 2001 Richard Kenner - - * config.gcc (sparc64-wrs-vxworks*): New case. - * config/sparc/vxsparc64.h, config/sparc/t-vxsparc64: New files. - - * config/sparc/sparc.c (sparc_override_options): Do support different - pointer and architecture size. - * config/sparc/sparc.h (MIN_UNITS_PER_WORD): Always 4. - (POINTERS_EXTEND_UNSIGNED): Define. - (Pmode): Test TARGET_ARCH64, not TARGET_PTR64. - (FUNCTION_MODE): Define to be Pmode. - * config/sparc/sparc.md (64-bit call patterns): FUNCTION_MODE now DI. - - * function.c (expand_function_end): Properly handle DECL_RESULT - and copy when ptr_mode != Pmode. - * expmed.c (make_tree): Convert X from Pmode to ptr_mode, if needed. - -2001-01-01 Kaveh R. Ghazi - - * c-common.c (c_common_nodes_and_builtins): Set prototype - parameters for __builtin_fputs, __builtin_fputc and - __builtin_fwrite. Don't declare plain fputc as a builtin. - -2001-01-01 John David Anglin - - * loop.c (add_label_notes): Increment the label usage count when - a note is added to an insn which refers to a CODE_LABEL. - * gcse.c (add_label_notes): Likewise. - -2001-01-01 Andreas Jaeger - - * loop.c (scan_loop): Use xmalloc to allocate movables. - -2001-01-01 Alexandre Oliva - - * tm.texi (REGISTER_MOVE_COST): Add a mode argument. - * reload.c (REGISTER_MOVE_COST): Likewise. Adjust all callers. - * reload1.c (REGISTER_MOVE_COST): Likewise. - * regclass.c (REGISTER_MOVE_COST): Likewise. - (move_cost, may_move_in_cost, may_move_out_cost): Add mode - dimension. Adjust all users. - (init_reg_sets_1): Iterate on all modes. - * config/1750a/1750a.h (REGISTER_MOVE_COST): Adjust. - * config/a29k/a29k.h (REGISTER_MOVE_COST): Adjust. - * config/alpha/alpha.h (REGISTER_MOVE_COST): Adjust. - * config/arc/arc.h (REGISTER_MOVE_COST): Adjust. - * config/arm/arm.h (REGISTER_MOVE_COST): Adjust. - * config/avr/avr.h (REGISTER_MOVE_COST): Adjust. - * config/c4x/c4x.h (REGISTER_MOVE_COST): Adjust. - * config/d30v/d30v.h (REGISTER_MOVE_COST): Adjust. - * config/dsp16xx/dsp16xx.h (REGISTER_MOVE_COST): Adjust. - * config/h8300/h8300.h (REGISTER_MOVE_COST): Adjust. - * config/i386/i386.h (REGISTER_MOVE_COST): Adjust. - * config/ia64/ia64.h (REGISTER_MOVE_COST): Adjust. - * config/m32r/m32r.h (REGISTER_MOVE_COST): Adjust. - * config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Adjust. - * config/m68k/m68k.h (REGISTER_MOVE_COST): Adjust. - * config/mcore/mcore.h (REGISTER_MOVE_COST): Adjust. - * config/mips/mips.h (REGISTER_MOVE_COST): Adjust. - * config/mn10200/mn10200.h (REGISTER_MOVE_COST): Adjust. - * config/mn10300/mn10300.h (REGISTER_MOVE_COST): Adjust. - * config/ns32k/ns32k.h (REGISTER_MOVE_COST): Adjust. - * config/pa/pa.h (REGISTER_MOVE_COST): Adjust. - * config/pdp11/pdp11.h (REGISTER_MOVE_COST): Adjust. - * config/pj/pj.h (REGISTER_MOVE_COST): Adjust. - * config/romp/romp.h (REGISTER_MOVE_COST): Adjust. - * config/rs6000/rs6000.h (REGISTER_MOVE_COST): Adjust. - * config/sh/sh.h (REGISTER_MOVE_COST): Adjust. - * config/sparc/sparc.h (REGISTER_MOVE_COST): Adjust. - -2001-01-01 Bernd Schmidt - - * alias.c (fixed_scalar_and_varying_struct): Adjust prototype of - arg VARIES_P. Call it with extra arg. - (true_dependence): Likewise. - * rtl.h (rtx_addr_can_trap_p): Declare. - (rtx_varies_p, rtx_addr_varies_p, true_dependence): Update - prototypes. - * rtlanal.c (rtx_addr_can_trap_p): No longer static. - (rtx_varies_p): Accept extra arg FOR_ALIAS; only disallow - pic offset table register if it's zero. All callers changed. - (rtx_addr_varies_p): Accept extra arg FOR_ALIAS; all callers changed. - -Mon Jan 1 07:38:33 2001 Richard Kenner - - * explow.c (convert_memory_address, case SYMBOL_REF): Copy - STRING_POOL_ADDRESS_P. - - * config/sparc/sparc.c (input_operand): Properly test for short op. - - * config.gcc (sparc-*-elf): Include sparc/sol2.h. - (sparc-*-rtems*): Include sparc/sol2.h and sparc/elf.h. - (sparclite-*-elf*, sparc86x-*-elf*): Likewise. - * config/sparc/elf.h: No longer include sol2.h. - * config/sparc/lifeelf.h: No longer include sparc/elf.h. - * config/sparc/rtemself.h, config/sparc/sp86x-elf.h: Likewise. - - * config/sparc/sparc.md: Test TARGET_ARCH64 instead of TARGET_PTR64. - -2001-01-01 Michael Hayes - - * loop.c (check_insn_for_bivs): Use ivs->n_regs to check array bounds. - (find_mem_givs, record_biv, maybe_eliminate_biv): Likewise. - (record_initial): Likewise. - * unroll.c (copy_loop_body, loop_iterations): Likewise. - (remap_split_bivs): Likewise. - -2001-01-01 Michael Hayes - - * loop.c (loop_ivs_free): New function. - (strength_reduce): Break out from... - -2001-01-01 Michael Hayes - - * loop.h (struct iv): New. - (REG_IV_TYPE, REG_IV_CLASS, REG_INFO): Modify to use 'struct iv'. - (struct loop_ivs): Replace 'reg_iv_type', 'reg_iv_info', - 'reg_biv_class' fields with 'regs' and 'n_regs'. - (struct ivs): Rename 'loop_iv_list' field to 'list'. - * loop.c (loop_bivs_find, strength_reduce): Use ivs->regs array. - * unroll.c (loop_iterations): Check array bounds with ivs->n_regs. - -2000-12-31 Alexandre Oliva - - * resource.c (mark_referenced_resources): Abort() before - attempting to mark a pseudo register. - (mark_set_resources): Likewise. - -2001-01-01 Michael Hayes - - * loop.h (REG_IV_CLASS): New accessor macro. - * loop.c (REG_IV_CLASS): Use it instead of reg_iv_class array. - * unroll.c (REG_IV_CLASS): Likewise. - -See ChangeLog.4 for earlier changes. diff --git a/contrib/gcc/ChangeLog.6 b/contrib/gcc/ChangeLog.6 deleted file mode 100644 index 8e1510d..0000000 --- a/contrib/gcc/ChangeLog.6 +++ /dev/null @@ -1,19208 +0,0 @@ -2001-12-31 Richard Henderson - - * config/ia64/ia64.c (mark_reg_gr_used_mask): Mind HARD_REGNO_NREGS. - -2001-12-31 Richard Henderson - - * regrename.c (build_def_use): Don't rename asm operands that - were originally hard registers. - (copyprop_hardreg_forward_1): Likewise. - (find_oldest_value_reg): Copy ORIGINAL_REGNO from source. - * varasm.c (make_decl_rtl): Use gen_rtx_raw_REG. Set ORIGINAL_REGNO. - -2001-12-31 Douglas B Rupp - - * config/alpha/vms.h (HAS_INIT_SECTION, NEED_ATEXIT): Remove. - (NAME__MAIN, SYMBOL__MAIN): Define. - -2001-12-31 Richard Henderson - - * cfgrtl.c (delete_insn): Check for not NOTE_INSN_DELETED_LABEL - before decrementing LABEL_NUSES from a jump table. - - * final.c (alter_subreg): Assign REGNO after changing the rtx code. - - * config/alpha/alpha.c (reg_no_subreg_operand): Reject all - non-registers. - -2001-12-31 Graham Stott - - * halfpic.h: Remove foward defs of tree_node and rtx_def. - - * toplev.h: Remove forward def of tree_node, rtx_def. - - * except.h: Remove forward def of tree_node, rtx_def and - define of tree, rtx. Also remove undefs. - - * basic-block.h: Remove forward def of tree_node and - define of tree. - -2001-12-30 Richard Henderson - - * cfglayout.c (scope_def, scope_forest_info, forest, - relate_bbs_with_scopes, make_new_scope, build_scope_forest, - remove_scope_notes, insert_intra_before_1, insert_intra_1, - insert_intra_bb_scope_notes, insert_inter_bb_scope_notes, - rebuild_scope_notes, free_scope_forest_1, dump_scope_forest, - dump_scope_forest_1, get_next_bb_note, get_prev_bb_note): Remove. - (fixup_reorder_chain): Don't set scope for bb. - (insn_scopes, scope_to_insns_initialize, set_block_levels, - change_scope, scope_to_insns_finalize): New. - (cfg_layout_initialize, cfg_layout_finalize): Update to match. - * cfglayout.h (scope_def, scope): Remove. - (reorder_block_def): Remove scope member. - (scope_to_insns_initialize, scope_to_insns_finalize): Declare. - * haifa-sched.c: Revert reemit_other_notes change. - * sched-ebb.c (schedule_ebbs): Don't call remove_unnecessary_notes. - Use scope_to_insns_initialize and scope_to_insns_finalize. - * sched-rgn.c (schedule_insns): Likewise. - -2001-12-31 Graham Stott - - * c-lex.c: Include tree.h before expr.h - - * c-typeck.c: Include rtl.h earlier. - - * tree.h (STRIP_NOPS): Remove extraneous semicolon. - (STRIP_SIGN_NOPS): Likewise. - (STRIP_TYPE_NOPS): Likewise. - (COMPLETE_OR_UNBOUND_ARRAY_TYPE_P): Add Parenthesis around - macro paramater. - - * final.c (struct bb_list): Delete. - (struct bb_str): Likewise. - - * cfgloop.c (flow_loop_entry_edges_find): Fix typo. - (flow_loop_exit_edges_find): Likewise. - - * gcse.c (gcse_main): Fix typos. - (alloc_gcse_mem): Likewise. - - * function.h: Remove undefs for rtx and tree. - -2001-12-30 Richard Henderson - - * loop.c (check_dbra_loop): Fix last change: examine both - has_multiple_exit_targets and exit_count. - -2001-12-30 Richard Henderson - - * integrate.c (copy_rtx_and_substitute): Fix error last change: - we need to unconditionally create a new mem. - -2001-12-30 Hans-Peter Nilsson - - * config/mmix/mmix.md ("*call_real"): Fix typo in comment. - * config/mmix/mmix.h (EXTRA_CONSTRAINT): Pass MMIX_REG_OK_STRICT - to mmix_extra_constraint. - * config/mmix/mmix.c (mmix_secondary_reload_class): Only handle - non-global register classes. Mark now unused parameters as such. - (mmix_extra_constraint, 'U'): Use new parameter strict and call - calling memory_operand_p or strict_memory_address_p, not - address_operand. - * config/mmix/mmix-protos.h (mmix_extra_constraint): Add parameter. - -2001-12-30 Kaveh R. Ghazi - - * unroll.c: Move include files above first use of `const'. - -2001-12-30 Jakub Jelinek - - * cfgrtl.c (try_redirect_by_replacing_jump): Allow redirect_jump - to fail if target is EXIT_BLOCK_PTR, die otherwise. - (redirect_edge_and_branch): Likewise. - * cfgcleanup.c (try_forward_edge): Don't force jump redirecting - if target is EXIT_BLOCK_PTR. - -2001-12-29 David Edelsohn - - * gcc.c (init_gcc_spec): Do not link with static libgcc.a if - gcc invoked with -shared. - -2001-12-29 Graham Stott - - * config/i386/i386.c (ix86_asm_dialect): Fix enum type. - - (override_options): Delete abs macro unused. - - (output_pic_addr_const): Use ASM_ATT/ASM_INTEL enumerations - when testing ASSEMBLER_DIALECT. - - (print_reg): Likewise. - (print_operand): Likewise. - (print_operand_address): Likewise. - (print_operand): abort if ASSEMBLER_DIALECT is unknown dialect. - - * config/i386/i386.h (ix86_asm_dialect): Fix enum type. - - (FIND_BASE_TERM): Fix typo. - -Sat Dec 29 15:48:54 2001 Richard Kenner - - * expr.c (store_field): Use adjust_address, not PUT_MODE. - (expand_expr, case VIEW_CONVERT_EXPR): Likewise. - * reload1.c (eliminate_regs, case SUBREG): Likewise, but use - adjust_address_nv. - * varasm.c (make_decl_rtl): Likewise. - * integrate.c (copy_rtx_and_substitute, case MEM): Likewise, but use - replace_equiv_address_nv. - - * varasm.c (decode_addr_const, case INTEGER_CST): Call - output_constant_def instead of looking at TREE_CST_RTL. - - * expr.c (convert_move): If -fforce-mem, force FROM to not be memory. - - * stor-layout.c (layout_decl): Don't misalign field of variable size - for packed record. - - * dwarf2out.c (compute_section_prefix): Avoid cast warning. - (gen_decl_die): Only check DECL_IGNORED_P on decls. - (dwarf2out_decl): Check for DECL_IGNORED_P only when needed. - -2001-12-29 Jakub Jelinek - - * cfglayout.c (insert_intra_before_1): New. - (insert_inter_bb_scope_notes): Emit sibling block notes which don't - span multiple basic blocks. - -2001-12-29 Richard Henderson - - * loop.c (prescan_loop): Set has_multiple_exit_targets for exception - edges. Rearrange jump interpretation code to use pc_set. - (check_dbra_loop): Examine has_multiple_exit_targets not exit_count. - - * sched-deps.c (sched_analyze_insn): Set scheduling barrier for - all insns that can throw, not just if flag_non_call_exceptions. - -2001-12-29 Stan Shebs - - * objc/objc-act.c (STRING_OBJECT_CLASS_NAME): Remove. - (default_constant_string_class_name): New global. - (objc_init): Set it. - (synth_module_prologue): Use it. - - * objc/objc-act.c: Apply various cosmetic and formatting changes. - -2001-12-29 Kazu Hirata - - * config/rs6000/darwin-tramp.asm: Fix comment formatting. - * config/rs6000/freebsd.h: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/sh/sh.c: Likewise. - * config/sh/sh.h: Likewise. - -2001-12-28 Stan Shebs - - * objc/objc-act.c (build_module_descriptor): Make sure the init - function is not deferred. - (build_dispatch_table_initializer): Compute the method encoding if - not already done. - -2001-12-28 Kazu Hirata - - * doc/md.texi: Add @findex define_insn_and_split. - -2001-12-28 Hans Bohem - - * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New. - * config/ia64/unwind-ia64.c (uw_init_context_1): Redo sp, psp, - bsp setup. Set pri_unat_loc to something reasonable. - (uw_install_context): Add missing cast. - (unw_access_gr): Fix off-by-1 indexing error. - -2001-12-28 Kazu Hirata - - * except.c: Fix comment formatting. - * flags.h: Likewise. - * flow.c: Likewise. - * predict.c: Likewise. - * simplify-rtx.c: Likewise. - * system.h: Likewise. - * vmsdbg.h: Likewise. - * vmsdbgout.c: Likewise. - -2001-12-28 Kazu Hirata - - * config/h8300/h8300.md: Fix formatting. - -2001-12-28 Geoff Keating - - * varasm.c (record_constant_1): Correct parameter to recursive - call in default case. - -2001-12-28 Jakub Jelinek - - * config/sparc/sparc.h (ASM_PREFERRED_EH_DATA_FORMAT, - ASM_OUTPUT_DWARF_PCREL): Define. - * config/sparc/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. - * configure.in (HAVE_AS_SPARC_UA_PCREL): Check whether as supports - .uaword %r_disp32() and linker handles it correctly. - * configure, config.in: Rebuilt. - -2001-12-28 Jakub Jelinek - - * c-typeck.c (store_init_value): If initializing object with array - type of unknown size by a compound literal, set object's size from - compound literal size. - * doc/extend.texi (Compound Literals): Adjust documentation. - -2001-12-28 Richard Henderson - - * real.c (etoe113, toe113): Ifndef INTEL_EXTENDED_IEEE_FORMAT. - (endian): Clear word 3 for INTEL_EXTENDED_IEEE_FORMAT. - (etartdouble): Invoke etoe64 for INTEL_EXTENDED_IEEE_FORMAT. - * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Don't special case - INTEL_EXTENDED_IEEE_FORMAT. - -2001-12-27 Geoff Keating - - * combine.c (try_combine): Mask off sign bits when combining - stores to the low and high parts of a two-word value. - - * expr.c (expand_expr): Don't mark memory for non-constants as - constant. - -Thu Dec 27 20:39:55 2001 Richard Kenner - - * integrate.c (copy_rtx_and_substitute, case MEM): If inlining - and not for LHS, clear RTX_UNCHANGING_P. - -2001-12-28 Philipp Thomas - - * cppfiles.c (stack_include_file): Don't translate . - -2001-12-27 Roger Sayle - - * builtins.c (expand_builtin_memcmp): Optimize memcmp built-in - when all arguments are known constant. Fixes PR opt/3508. - -2001-12-27 Kazu Hirata - - * config/h8300/h8300.md (two anonymous patterns): Remove. - -2001-12-27 Richard Henderson - - * haifa-sched.c (reemit_other_notes): New. - (schedule_block): Use it. - * sched-ebb.c (schedule_ebbs): Call remove_unnecessary_notes. - * sched-rgn.c (schedule_insns): Likewise. - * cfglayout.c (remove_scope_notes): Handle removing note at - the end of the insn chain. - * function.c (debug_find_var_in_block_tree): New. - -2001-12-27 Alan Modra - David Edelsohn - - * config/rs6000/linux64.h (ASM_DECLARE_FUNCTION_NAME): Simplify. - -2001-12-27 Jakub Jelinek - - * toplev.c (independent_decode_option): Re-add -aux-info option - handling. - -Thu Dec 27 09:50:44 2001 Richard Kenner - - * integrate.c (copy_insn_notes): Don't adjust REG_EH_REGION note - if special value. - -2001-12-26 Kaveh R. Ghazi - - * collect2.c (is_ctor_dtor): Const-ify. - * m88k-protos.h (output_file_start): Likewise. - * m88k.c (m88k_lang_independent_options, output_options, - output_file_start): Likewise. - * fix-header.c (files_to_ignore, std_include_entry, include_entry, - std_include_table, main): Likewise. - * protoize.c (longopts): Likewise. - * regclass.c (int_reg_class_contents): Likewise. - * toplev.c (dump_file, f_options, W_options): Make static. - (lang_independent_options, f_options, W_options): Const-ify. - * tree-dump.c (dump_file_info): Likewise. - * unroll.c (_factor): Make static. - -Wed Dec 26 17:55:50 2001 Richard Kenner - - * config/alpha/alpha.c (alpha_align_insns): Remove warning. - - * config/sparc/sparc.md (call struct patterns): Show starting - at two words long. - -2001-12-26 David Edelsohn - - * rs6000.h (ASM_CPU_SPEC, CPP_CPU_SPEC): Add mcpu=405. - * sysv4.h (CPP_SYSV_SPEC, CPP_OS_VXWORKS_SPEC): Add mcpu=405. - -2001-12-26 DJ Delorie - - * function.c (expand_main_function): Make sure stack adjustments - happen before sjlj exception setup. - -2001-12-26 David Edelsohn - - * rs6000.md (indirect_jump): Prefer CTR over LR. - * xcoff.h (ASM_DECLARE_FUNCTION_NAME): Handle weak function. - -Tue Dec 25 12:04:47 2001 Richard Kenner - - * dwarf2out.c: Reformatting and minor code rearrangement. - -2001-12-24 Douglas B. Rupp (rupp@gnat.com) - - * configure.in (quoted_stage_prefix_set_by_configure): Generate. - * configure: Regenerated. - * Makefile.in (SUBDIR_FLAGS_TO_PASS): Use - quoted_stage_prefix_set_by_configure. - -Mon Dec 24 10:24:59 2001 Richard Kenner - - * rtl.h (in_expr_list_p): New declaration. - * rtlanal.c (in_expr_list_p): New function. - * cfgcleanup.c: Reformatting and minor code rearrangement. - * cfglayout.c, cfgloop.c, cfgrtl.c: Likewise. - -2001-12-23 Richard Henderson - - PR c/5163: - * c-decl.c (duplicate_decls): As needed, set DECL_INLINE when - we have a function body associated. Minor cleanups. - (grokdeclarator): Do not set DECL_INLINE without a function body. - -2001-12-23 Richard Henderson - - * stmt.c (resolve_operand_names): Handle operand modifiers. - -2001-12-23 Richard Henderson - - * stmt.c (parse_input_constraint): Break out from ... - (expand_asm_operands): ... here. Loop over the operands twice, - the first time only calling mark_addressable. Correct and simplify - the conditions for spilling an output operand to memory. - -2001-12-23 Richard Henderson - - * config/alpha/alpha.c (call_operand) [OSF]: Disallow virtual regs. - - * config/alpha/alpha.md (UNSPEC_SIBCALL): New. - (sibcall, sibcall_value, sibcall_osf_1_er, sibcall_osf_1): Use it. - (sibcall_value_osf_1_er, sibcall_value_osf_1): Likewise. - -2001-12-23 Joseph S. Myers - - * c-typeck.c (c_start_case): Don't strip conversions from the - controlling expression. Partially fixes PR c/2454. - -2001-12-23 Joseph S. Myers - - * Makefile.in (USER_H): Remove proto.h. - * config.gcc (c*-convex-*): Set extra_headers=proto.h. - -2001-12-23 Kaveh R. Ghazi - - * arc.c (arc_hard_regno_mode_ok): Const-ify. - * arc.h (arc_hard_regno_mode_ok): Likewise. - * i386.c (x86_64_reg_class_name): Make static. - * m68k.c (regno_reg_class): Const-ify. - * m68k.h (regno_reg_class): Likewise. - * mcore.c (reg_class_from_letter): Likewise. - * mcore.h (reg_class_from_letter): Likewise. - * sh.c (reg_class_from_letter, ashiftrt_insns, shift_insns, - ext_shift_insns, ext_shift_amounts): Likewise. - * sh.h (reg_class_from_letter): Likewise. - * sparc.c (hard_regno_mode_classes, hard_32bit_mode_classes, - hard_64bit_mode_classes): Likewise. - * sparc.h (hard_regno_mode_classes): Likewise. - - * gcc.c (modify_target): Make static. - * gengenrtl.c (defs, formats): Likewise. - * reload1.c (elim_table_1, init_elim_table): Const-ify. - * tradcpp.c (directive, directive_table, handle_directive, - skip_if_group, run_directive): Likewise. - -2001-12-23 Richard Henderson - - * calls.c (expand_call): Don't turn off ECF_LIBCALL_BLOCK for - an invalid result register; do end the sequence properly. - (emit_library_call_value_1): Likewise. - -2001-12-22 Aldy Hernandez - - * config/rs6000/rs6000.h (rs6000_builtins): Add vsldoi variants. - - * config/rs6000/rs6000.md ("altivec_vsldoi_*"): Same. - - * config/rs6000/rs6000.c: Clean up some spacing and indentation. - (altivec_init_builtins): Add tree types for builtins with 4 bit - literals. - (bdesc_3arg): Add vsldoi variants. - -2001-12-22 Kaveh R. Ghazi - - * 1750a.h (datalbl, jmplbl): Declare array size explicitly. - * a29k.h (a29k_debug_reg_map): Likewise. - * arc.h (arc_regno_reg_class): Likewise. - * c4x-protos.h (c4x_regclass_map, c4x_caller_save_map): Likewise. - * convex.h (regno_reg_class, reg_class_from_letter): Likewise. - * d30v.h (regno_reg_class, reg_class_from_letter): Likewise. - * i386.h (regclass_map): Likewise. - * m32r.h (m32r_hard_regno_mode_ok, m32r_punct_chars): Likewise. - * mcore.h (regno_reg_class): Likewise. - * mips.h (mips_print_operand_punct, mips_char_to_class): - Likewise. - * ns32k.h (regclass_map): Likewise. - * pj.h (pj_debugreg_renumber_vec): Likewise. - * s390.h (regclass_map): Likewise. - * sh.h (regno_reg_class): Likewise. - * sparc.h (sparc_regno_reg_class): Likewise. - - * hard-reg-set.h (reg_class_contents): Likewise. - * machmode.h (class_narrowest_mode): Likewise. - -2001-12-22 David Edelsohn - - * loop.c (scan_loop, move_movables, count_one_set): Do not - overlook hard registers when computing statistics. - -Sun Dec 23 00:49:37 CET 2001 Jan Hubicka - - * calls.c (ECF_LIBCALL_BLOCK): New constant. - (emit_call_1, initialize_argument_information, - precompute_arguments, expand_call, - emit_library_call_value_1): Use ECF_LIBCALL_BLOCK - instead of ECF_PURE | ECF_CONST. Honnor LCT_CONST/LCT_PURE. - -2001-12-22 Joseph S. Myers - - * config.gcc (extra_headers): Move settings to math-68881.h and - ppc-asm.h to common code for CPU types. Use math-68881.h on all - m68k targets. - (header_files): Remove unused setting. - -2001-12-22 Kaveh R. Ghazi - - * elxsi.c: Include "hard-reg-set.h" and/or don't declare - `call_used_regs' explicitly. - * i860.c: Likewise. - * m68k.c: Likewise. - * ns32k.c: Likewise. - * pa.c: Likewise. - * vax.c: Likewise. - * we32k.c: Likewise. - -Fri Dec 21 23:30:14 CET 2001 Jan Hubicka - - * i386.h (TARGET_CPU_DEFAULT_pentium_mmx): New. - (TARGET_CPU_DEFAULT_*): Renumber. - -Sat Dec 22 12:20:20 EST 2001 John Wehle (john@feith.com) - - * rtl.h (subreg_lsb): Declare. - * rtlanal.c (subreg_lsb): Implement. - -Sat Dec 22 08:59:50 2001 Richard Kenner - - * predict.c: Reformatting and minor cleanups. - * cfg.c, cfganal.c, cfgbuild.c: Likewise. - - * expr.c (expand_expr, case ADDR_EXPR): Handling taking address of - SAVE_EXPR. - * function.c (gen_mem_addressof): Add missing tests for SAVE_EXPR. - (put_addressof_into_stack): Clarify code in setting of used_p. - - * calls.c (flags_from_decl_or_type): Move ECF_SP_DEPRESSED here. - (expand_call): Delete from here. - Do pending stack adjustments if ECF_SP_DEPRESSED. - - * dwarf2out.c (save_rtx): Deleted. - (mem_loc_descriptor): Do equivalent operation. - (add_const_value_attribute, case CONST): Likewise. - (add_name_and_src_coords_attributes): Likewise. - -2001-12-21 Kazu Hirata - - * config/h8300/h8300.h: Fix comment formatting. - -Fri Dec 21 17:30:15 2001 Jeffrey A Law (law@redhat.com) - - * pa.h (CPP_SPEC): If not in ANSI mode, define _INCLUDE_LONGLONG. - (CPLUSPLUS_CPP_SPEC): Define _INCLUDE_LONGLONG. - -2001-12-21 Robert Lipe - - * system.h (PREFETCH): Explictly undefine. - -2001-12-21 Richard Henderson - - * c-parse.in (SAVE_WARN_FLAGS): Save warn_traditional. - (RESTORE_WARN_FLAGS): Restore it. - (extension): Zero warn_traditional. - -2001-12-21 Kazu Hirata - - * doc/passes.texi: Fix a typo. - -2001-12-21 Kazu Hirata - - * config/h8300/h8300.h: Fix a comment typo. - -2001-12-21 Jakub Jelinek - - * combine.c (nonzero_bits): If using reg_nonzero_bits, - we don't know anything about bits outside of X mode. - (num_sign_bit_copies): Likewise. - -2001-12-21 Nick Clifton - - * config/arm/arm.md (prefetch): Use 'a' operand code. - -2001-12-20 Kaveh R. Ghazi - - * aclocal.m4 (gcc_AC_PROG_GNAT): Run prospective ada drivers in - subshells. - * configure.in: Likewise for perl Pod::Man. - - * configure: Regenerated. - -2001-12-20 Kaveh R. Ghazi - - * builtin-attrs.def (__builtin_printf_unlocked, - __builtin_fprintf_unlocked, printf_unlocked, fprintf_unlocked): - Mark with the __printf__ attribute. - - * builtins.c (expand_builtin_fputs): Add an `unlocked' parameter - and set the replacement function depending on it. - (expand_builtin): Skip BUILT_IN_*_UNLOCKED when not optimizing. - Handle BUILT_IN_*_UNLOCKED when optimizing. - - * builtins.def (DEF_EXT_FALLBACK_BUILTIN, - DEF_EXT_FRONT_END_LIB_BUILTIN): New macros. - Declare the "unlocked" stdio functions. - - * c-common.c (c_expand_builtin_printf, c_expand_builtin_fprintf): - Add an `unlocked' parameter and set the replacement function - depending on it. - (c_expand_builtin): Handle BUILT_IN_PRINTF_UNLOCKED and - BUILT_IN_FPRINTF_UNLOCKED. - - * doc/extend.texi (printf_unlocked, fprintf_unlocked, - fputs_unlocked): Document. - -2001-12-20 Josef Zlomek - - * cfgloop.c (flow_loops_find): Use the information of the depth - first search order of the CFG correctly when finding natural loops. - -2001-12-20 Richard Henderson - - * config/alpha/alpha.md (prologue_mcount): Update for explicit relocs. - -2001-12-20 Richard Henderson - - * config/alpha/alpha.c (call_operand) [OSF]: Accept pseudos. - * config/alpha/alpha.md (call_osf, call_value_osf): Don't force - operand into $27. - -2001-12-20 Joseph S. Myers - - * configure.in (all_headers, all_lib2funcs): Remove. - * configure: Regenerate. - * Makefile.in (LANG_EXTRA_HEADERS): Remove. - (USER_H): Don't include $(LANG_EXTRA_HEADERS). - * config/alpha/t-interix (USER_H): Don't include - $(LANG_EXTRA_HEADERS). - * config/i386/t-interix: Likewise. - * config/t-openbsd: Likewise. - -2001-12-20 Andreas Jaeger - - * libgcc2.c (__bb_exit_func): Remove unused variable. - (num_digits): Remove unused function. - -2001-12-20 Alan Shieh - - * config/arm/arm.c (arm_output_epilogue): Changed IP restore - to use ldmfd instead of ldmea. - * config/arm/arm.c (arm_compute_initial_elimination_offset): - Modified to reflect behavior of arm_expand_prologue when generating - interrupt handlers - -2001-12-20 Nick Clifton - - * config/arm/arm.c (arm_compute_save_reg0_reg12_mask): New - function. Compute which of registers r0 through r12 should be - saved onto the stack during a function's prologue. - (arm_compute_save_reg_mask): Use - arm_compute_save_reg0_reg12_mask. - (arm_compute_initial_elimination_offset): Use - arm_compute_save_reg0_reg12_mask. - - (arm_expand_prologue): Do not mark as save of the IP register - for an interrupt handler as being part of the frame creation - code. - -2001-12-20 Richard Henderson - - * varasm.c (assemble_real): Use REAL_VALUE_TO_x and assemble_integer - to emit floating point values. - (assemble_real_1): Remove. - - * 1750a/1750a.c (real_value_to_target_single): New. - (real_value_to_target_double): New. - * 1750a/1750a.h (TARGET_FLOAT_FORMAT): New. - (REAL_VALUE_TO_TARGET_SINGLE): New. - (REAL_VALUE_TO_TARGET_DOUBLE): New. - * 1750a/1750a-protos.h: Update. - - * 1750a/1750a.h, a29k/a29k.h, alpha/alpha.h, alpha/unicosmk.h, - alpha/vms.h, arc/arc.h, arm/aof.h, arm/aout.h, avr/avr.c, - avr/avr.h, c4x/c4x.h, clipper/clix.h, convex/convex.h, cris/cris.h, - d30v/d30v.h, dsp16xx/dsp16xx.c, dsp16xx/dsp16xx.h, elxsi/elxsi.h, - fr30/fr30.h, h8300/h8300.h, i370/i370.h, i386/i386.h, i386/i386elf.h, - i386/next.h, i386/ptx4-i.h, i386/sysv4.h, i860/fx2800.h, i860/i860.h, - i860/paragon.h, i860/sysv4.h, i960/i960-protos.h, i960/i960.c, - i960/i960.h, ia64/ia64.h, m32r/m32r.h, m68hc11/m68hc11.c, - m68hc11/m68hc11.h, m68k/3b1.h, m68k/altos3068.h, m68k/crds.h, - m68k/dpx2.h, m68k/hp320.h, m68k/m68k.h, m68k/mot3300.h, m68k/news.h, - m68k/next.h, m68k/next21.h, m68k/sgs.h, m68k/sun2o4.h, m68k/sun3.h, - m68k/tower-as.h, m88k/m88k.h, mcore/mcore.h, mips/mips-protos.h, - mips/mips.c, mips/mips.h, mmix/mmix-protos.h, mmix/mmix.c, - mmix/mmix.h, mn10200/mn10200.h, mn10300/mn10300.h, ns32k/encore.h, - ns32k/ns32k.h, pa/long_double.h, pa/pa.h, pdp11/pdp11.h, pj/pj.h, - romp/romp.c, romp/romp.h, rs6000/rs6000.h, s390/linux.h, sh/sh.h, - sparc/sparc.h, stormy16/stormy16.h, v850/v850.h, vax/vax.h, - vax/vaxv.h, we32k/we32k.h, doc/tm.texi: Remove ASM_OUTPUT_FLOAT, - ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_BYTE_FLOAT, - ASM_OUTPUT_SHORT_FLOAT, ASM_OUTPUT_THREE_QUARTER_FLOAT, and all - associated support routines. - -Thu Dec 20 16:58:46 CET 2001 Jan Hubicka - - * cfgcleanup.c (flow_find_cross_jump): Avoid incrementing of ninsns - if one of block does not contain jump. - (outgoing_edge_math): Revert last path; require edges to be noncomplex - nonfake to match single exit edge; require conditional jumps to not - have side effect. - -2001-12-20 Turly O'Connor - - * tm.texi (ASM_OUTPUT_OPERAND): Change documentation references to - "recog_operand" to "recog_data.operand". - * rtl.def: Likewise. - -2001-12-20 Jakub Jelinek - - * simplify-rtx.c (simplifi_binary_operation) [DIV]: If DIV has - narrower mode than op0, only return the bits in DIV's mode. - -2001-12-20 Jakub Jelinek - - * combine.c (distribute_notes): Avoid adding REG_LABEL notes - to JUMP_INSNs with JUMP_LABEL. - -2001-12-19 Aldy Hernandez - - * doc/install.texi: Add documentation for --enable-altivec. - - * config.gcc: Add support for --enable-altivec. - - * config/rs6000/altivec.h: New. - - * config/rs6000/linuxaltivec.h (SUBSUBTARGET_OVERRIDE_OPTIONS): - Define. Fix typo. - - * config/rs6000/rs6000.c (vrsave_operation): Change unspec to - unspec_volatile. - (generate_set_vrsave): Generate the unspec here instead of calling - an .md pattern. - (generate_set_vrsave): Use gen_rtvec. - (rs6000_emit_prologue): Replace call to gen_get_vrsave with - gen_rtx_SET. - - * config/rs6000/rs6000.md ("*movsi_internal1"): Add constraints - for setting special registers. - ("*set_vrsave_internal"): Use unspec_volatile. - ("set_vrsave"): Remove. - ("get_vrsave"): Remove. - - * config/rs6000/rs6000.h (REG_CLASS_CONTENTS): Add vrsave to - SPECIAL_REGS. - -2001-12-19 Bruce Korb - - * gcc/fixinc/inclhack.def: Remove all the fix suppression "fixes". - (strict_ansi_not_ctd): accommodate __STDC__ == 0 tests in UW 2.1.2 - * gcc/fixinc/mkfixinc.sh(i?86-*-sysv4.2uw2*): now uses fixincl program - * gcc/fixinc/base/...: adjust for changes in fixes - -2001-12-20 Joseph S. Myers - - * po/gcc.pot: Regenerate. - - * configure.in (all_diff_excludes, diff_excludes): Remove. - * configure: Regenerate. - * Makefile.in (LANG_DIFF_EXCLUDES): Remove. - * objc/config-lang.in (diff_excludes): Remove. - -2001-12-19 Dan Nicolaescu - - * config/sparc/sparc.md (ldd peephole2s): For load peepholes pass - the destination register as a parameter to mems_ok_for_ldd_peep. - For store peepholes pass NULL_RTX. Move all volatile checks ... - * config/sparc/sparc.c (mems_ok_for_ldd_peep): ... here. Add a - register parameter, check it's not the same as base for an address. - * config/sparc/sparc-protos.h (mems_ok_for_ldd_peep): Update. - -2001-12-19 Jakub Jelinek - - * config/ia64/ia64.c (ia64_single_set): Return first set for - prologue_allocate_stack and epilogue_deallocate_stack instructions. - -2001-12-19 Dale Johannesen - - * config/rs6000/rs6000.h: LEGITIMIZE_RELOAD_ADDRESS: - redefine in terms of rs6000_legitimize_reload_address(). - * config/rs6000/rs6000-protos.h: Add this function. - * config/rs6000/rs6000.c: Add this function. Includes - handling for Darwin FP constants. - -Wed Dec 19 11:01:21 2001 Jeffrey A Law (law@redhat.com) - - * config/pa/t-hpux-shlib: New file. - * config.gcc (hpux10, hpux11): Include t-hpux-shlib in tmake_file - for 32bit hpux10 & hpux11 configurations. - -2001-12-19 Nick Clifton - - * config/arm/xscale-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Pass - -mno-fpu onto gas unless -mhard-float is specified. - (MULTILIB_DEFAULTS): Include msoft-float. - - * config/arm/t-xscale-coff (EXTRA_MULTILIB_PARTS): Remove definition. - - * config/arm/coff.h (SUPPORTS_INIT_PRIORITY): Define (to false). - * config/arm/elf.h (SUPPORTS_INIT_PRIORITY): Define (to true). - -Wed Dec 19 06:12:34 2001 Douglas B. Rupp - - * dwarf2out.c (add_name_and_src_coords_attributes): Fix VMS procedure - descriptor output. - -2001-12-18 Stan Shebs - - * rs6000.h (LOCAL_ALIGNMENT): Fix parens. - -Tue Dec 18 17:02:06 2001 Richard Kenner - - * emit-rtl.c (widen_memory_access): Only call compare_tree_int - on an INTEGER_CST. - -2001-12-18 David Edelsohn - - * rs6000.c (rs6000_override_options): Only use DI ops when - TARGET_64BIT. Fix typo. - -Tue Dec 18 16:39:46 CET 2001 Jan Hubicka - - * att.h (ASM_FILE_START): Use asm_dialect. - * linux.h (ASM_FILE_START): Likewise. - * gas.h (ASM_FILE_START): Likewise. - * i386.c (ix86_debug_arg_string, ix86_debug_addr_string, - ix86_asm_string, ix86_asm_dialect): New. - (override_options): Set asm_dialect. - * i386.h (MASK_MIX_SSE_I387, MASK_INTEL_SYNTAX, MASK_DEBUG_ARG, - MASK_DEBUG_ADDR): Kill. - (MASK_64BIT, MASK_NO_RED_ZONE): renumber. - (TARGET_DEBUG_ADDR, TARGET_DEBUG_ARG): Use string. - (ASSEMBLER_DIALECT): Use asm_dialect. - (TARGET_SWITCHES): Undocument deprecated items; deprecate intel-syntax; - remove debug-addr and debug-arg. - (TARGET_OPTIONS): Add debug-arg, debug-addr, asm. - (asm_dialect): New enum. - (ix86_debug_arg_string, ix86_debug_addr_string, - ix86_asm_string, ix86_asm_dialect): Declare. - * invoke.texi (-mintel-syntax): Remove. - (-masm): Document. - -Tue Dec 18 16:37:42 CET 2001 Jan Hubicka - - * libgcc2.c (__bb_exit_func): Kill -ax dumping code. - -2001-12-18 Jason Merrill - - C++ ABI change: destroy value arguments in caller. - * calls.c (initialize_argument_information): Pass the address of - the TARGET_EXPR temporary rather than storing it into another. - -Tue Dec 18 07:09:06 2001 Douglas B. Rupp - - * config/alpha/xm-vms.h (INCLUDE_DEFAULTS): Add /gnu/include. - * config/alpha/vms.h (STACK_CHECK_BUILTIN): #define 0 for VMS. - -2001-12-18 Jakub Jelinek - - * config/linux.h (PREFERRED_DEBUGGING_TYPE): Remove. - * config/sparc/linux.h (PREFERRED_DEBUGGING_TYPE): Remove. - * config/sparc/linux64.h (PREFERRED_DEBUGGING_TYPE): Remove. - (CC1_SPEC): Don't default to -gstabs+ if -m32. - -2001-12-05 David O'Brien - - * elfos.h (PREFERRED_DEBUGGING_TYPE): Change to DWARF2_DEBUG. - -2001-12-18 Joseph S. Myers - - * po/gcc.pot: Regenerate. - -2001-12-18 Kazu Hirata - - * config/h8300/h8300.c: Fix comment typos. - * config/h8300/h8300.h: Fix comment formatting. - -2001-12-17 Kaveh R. Ghazi - - * machmode.h (mode_name, mode_class, mode_size, mode_unit_size, - mode_bitsize, mode_mask_array, mode_wider_mode): Set array size in - declaration to NUM_MACHINE_MODES. - (mode_size, mode_unit_size): Set array type to unsigned char. - (mode_bitsize): Set array type to unsigned short. - - * rtl.c (rtx_length): Set array type to unsigned char. - (rtx_length, rtx_name, rtx_format, rtx_class): Set array size to - NUM_RTX_CODE. - (mode_bitsize): Set array type to unsigned short. - (mode_size, mode_unit_size): Set array type to unsigned char. - (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, - mode_wider_mode, mode_mask_array): Set array size to - NUM_MACHINE_MODES. - - * rtl.h (rtx_length, rtx_name, rtx_format, rtx_class): Set array - size in declaration to NUM_RTX_CODE. - -2001-12-17 Richard Henderson - - * config/alpha/alpha.md (unop): Encode RB as $sp. - -2001-12-17 Neil Booth - - * Makefile.in: Update dependencies. - * c-lang.c: Remove unnecessary includes. - (deferred_fns, start_cdtor, finish_cdtor, defer_fn): Move to - c-objc-common.c. - (finish_file): Move body to c_common_finish_file. - * c-objc-common.c: Include varray.h and ggc.h. - (deferred_fns, start_cdtor, finish_cdtor, defer_fn, - expand_deferred_fns, c_objc_common_finish_file): Moved from c-lang.c. - (c_objc_common_init): Initialize deferred function array. - * c-tree.h (c_objc_common_finish_file, - static_ctors, static_dtors): New. -objc: - * Make-lang.in: Update dependencies. - * objc/objc-act.c: Don't include varray.h. - (defer_fn, deferred_fns): Move to c-objc-common.c. - (objc_init): Similarly for initialization of it. - (finish_file): Move some to c-objc-common.c, use - c_objc_common_finish_file. - -2001-12-17 Aldy Hernandez - - * config/rs6000/rs6000.c: Remove is_gpr_return_reg prototype. - -2001-12-17 Neil Booth - - * doc/cppinternals.texi: Update. - -Mon Dec 17 14:21:21 2001 Jeffrey A Law (law@redhat.com) - - * expmed.c (emit_store_flag): Extract updated comparison code - from the return value of compare_from_rtx. - * expr.c (do_store_flag): Similarly. - -2001-12-17 Nick Clifton - - * caller-save.c (init_caller_save): Use MODE_BASE_REG_CLASS in - preference to BASE_REG_CLASS. - * recog.c (preprocess_constraints): Ditto. - * regclass.c (record_operand_costs, scan_one_insn, regclass, - record_reg_classes, record_address_regs): Ditto. - * regrename.c (scan_rtx_address, scan_rtx, - replace_oldest_value_addr, replace_oldest_value_mem): Ditto. - * reload.c (find_reloads, find_reloads_address, - find_reloads_address_1): Ditto. - * reload1.c (maybe_fix_stack_asms): Ditto. - * defaults.h (MODE_BASE_REG_CLASS): Provide default - definition. - * doc/tm.texi: Document MODE_BASE_REG_CLASS. - - * config/arm/arm.h (MODE_BASE_REG_CLASS): Define. - -2001-12-17 Joseph S. Myers - - * doc/install.texi2html: Use -I $SOURCEDIR. - - Separate user and internals manuals. - * Makefile.in (info, $(docdir)/gcc.info, dvi, gcc.dvi): Update - dependencies. - ($(docdir)/gccint.info, gccint.dvi): New targets. - (maintainer-clean, install-info, uninstall): Update. - * doc/.cvsignore: Add gccint.info*. - * doc/include/gcc-common.texi: New file. - * doc/gcc.texi: Use it. Adjust to be a user-only manual. Put - copyright notice in a macro. Don't include ISBN unless FSFPRINT - is defined. - * doc/gccint.texi: New file. - * doc/configfiles.texi, doc/extend.texi, doc/invoke.texi, - doc/md.texi, doc/passes.texi, doc/tm.texi, doc/trouble.texi: - Update for separate user and internals manuals. - -2001-12-17 Dale Johannesen - - * config/rs6000/rs6000.h: CPP_CPU_SPEC: add mcpu=7400. - ASM_CPU_SPEC: Ditto. - RTX_COSTS: Fix timing info for 7450 multiply. - * config/rs6000/rs6000.md: Fix timing info for 7450 imul. - Allow floats to be kept in int regs in movsf_low, - movsf_low_st (Darwin only) - -2001-12-17 Aldy Hernandez - - * config/rs6000/rs6000.c (vrsave_operation): Recognize SETs in - parallel. - (is_gpr_return_reg): New. - (rs6000_emit_prologue): Call generate_set_vrsave with additional - argument. Save only registers in the mask. Attach - REG_FRAME_RELATED_EXPR note to altivec offsets. Do not call - rs6000_frame_related when saving VRSAVE. - (rs6000_emit_epilogue): Call generate_set_vrsave with additional - argument. Restore only registers in the mask. Restore altivec - registers after we restore CR. - (generate_set_vrsave): New parameter epiloguep. Generate unspec - sets instead of clobbers for call saved registers. - (altivec_frame_fixup): New. - -2001-12-17 Richard Henderson - - * config/sparc/sparc.md (movdi_zero): Remove. - (movdi_insn_sp32_v9): New. - -2001-12-17 Richard Henderson - - * cfgcleanup.c (outgoing_edges_match): Check for insn match with - a single outgoing edge too. - -Mon Dec 17 18:27:52 CET 2001 Jan Hubicka - - * cfgrtl.c (redirect_edge_and_branch): Do simplify abnormal - edges resulting from computed jump - -Mon Dec 17 17:57:05 CET 2001 Jan Hubicka - - * Makefile.in (cfgcleanup.o): Add cselib.h dependency. - * basic-block.h (CLEANUP_THREADING): New constant. - * cfgcleanup.c: Include cselib.h - (thread_jump, mark_effect): New functions. - (try_forward_edges): Do jump threading when asked for. - * jump.c (mark_modified_reg, save_regs, num_same_regs, modified_regs, - modified_mem, thread_jumps, rtx_equal_for-thread_p): Kill. - * rtl.h (thread_jumps, rtx_equal_for_thread_p): Kill. - * toplev.c (rest_of_compilation): Do now call thread_jumps; use - CLEANUP_THREAD instead. - -2001-12-17 Kaveh R. Ghazi - - * sparc/linux.h (STARTFILE_SPEC): Fix typo in last change. - -2001-12-17 Tom Rix - - * config/rs6000/rs6000.c (expand_block_move): Fix limits on max size - of bytes. - -2001-12-17 Richard Sandiford - - * target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op, - asm_out.integer): New fields. - * target-def.h (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_[HSDT]I_OP, - TARGET_ASM_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initializers. - (TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect - the individual initializers together. - (TARGET_ASM_OUT): Add the new initializers. - * output.h (assemble_integer): Return bool. - (integer_asm_op): Declare. - (default_assemble_integer): Declare. - (assemble_aligned_integer): New interface to assemble_integer. - * varasm.c (integer_asm_op): New function to select pseudo-op. - (default_assemble_integer): Default implementation of asm_out.integer. - (assemble_integer): Use the new target hook. Split objects into - words or bytes if the target hook fails. Return bool. - * doc/tm.texi (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_OUTPUT_SHORT, - ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT, ASM_OUTPUT_QUADRUPLE_INT, - UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP): Undocument. - Document new target hooks. - - * defaults.h (ASM_OUTPUT_ADDR_VEC_ELT): Use integer_asm_op. - * dwarf2asm.c (unaligned_integer_asm_op): Remove. - (dw2_assemble_integer): New. - (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): Use it. - (dw2_asm_output_nstring): Use assemble_integer for the null terminator. - (dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128): Use - integer_asm_op to get the byte pseudo-op. Use assemble_integer - if it returns NULL. - * dwarf2asm.h (dw2_assemble_integer): Declare. - * dwarfout.c: Include dwarf2asm.h. Use dwarf2 functions for the - default implementation of most macros. - (output_unsigned_leb128): Use dw2_asm_output_data. - (output_signed_leb128, dwarfout_source_line): Likewise. - (output_reg_number): Use dw2_assemble_integer. - (generate_macinfo_entry): Separate the type and offset arguments. - Use assemble_integer to write the value. - (dwarfout_start_source_file): Update generate_macinfo_entry usage. - (dwarfout_end_source_file, dwarfout_define, dwarfout_undef): Likewise. - * final.c (output_addr_const): Don't put brackets round a subtracted - symbol value or ".". - * halfpic.c (half_pic_finish): Use assemble_aligned_integer. - - * config/1750a/1750a.c (assemble_integer_1750a): New, - * config/alpha/alpha.h (literal_section): Avoid ASM_OUTPUT_INT. - * config/arc/arc.c (arc_assemble_integer): New. - * config/arc/arc.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT. - * config/arm/arm.c (arm_poke_function_name): Likewise. - (arm_assemble_integer): New, extracted from... - * config/arm/arm.h (OUTPUT_INT_ADDR_CONST): ...here, now removed. - (ARM_TRAMPOLINE_TEMPLATE, ARM_FUNCTION_PROFILER): Avoid ASM_OUTPUT_INT. - (ARM_FUNCTION_PROFILER): Likewise. - * config/avr/avr-protos.h (asm_output_byte): Remove. - (asm_output_char, asm_output_short): Remove. - * config/avr/avr.c (avr_assemble_integer): New. - (asm_output_byte, asm_output_char, asm_output_short): Remove. - * config/clipper/clipper.h (ASM_LONG): Remove. - * config/dsp16xx/dsp16xx-protos.h (asm_output_long): Remove. - * config/dsp16xx/dsp16xx.c (asm_output_long): Remove. - * config/elxsi/elxsi.c (elxsi_assemble_integer): New. - * config/i370/i370.c (i370_hlasm_assemble_integer): New. - * config/i370/i370.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT. - (ASM_BYTE, ASM_SHORT, ASM_LONG): Delete. - * config/i386/att.h, (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP. - * config/i386/linux.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use - ASM_LONG instead of UNALIGNED_INT_ASM_OP. - * config/i386/sco5.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. - (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP. - * config/i386/sysv4.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use - ASM_LONG instead of UNALIGNED_INT_ASM_OP. - * config/i860/fx2800.h (ASM_FILE_END): Avoid ASM_LONG. - * config/i860/i860.c (i860_output_function_epilogue): Likewise. - * config/i860/i860.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT. - (ASM_SHORT, ASM_LONG): Undefine. - * config/i860/paragon.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP. - * config/i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise. - * config/i960/i960.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT. - * config/ia64/ia64.c (ia64_assemble_integer): New. - * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use integer_asm_op. - (ASM_OUTPUT_DWARF_PCREL): Likewise. - * config/m68hc11/m68hc11.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, - ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_VEC_ELT): Avoid ASM_LONG. - (ASM_SHORT, ASM_LONG): Remove. - * config/m68k/m68k.h (INT_OP_GROUP): New macro. - (INT_OP_STANDARD, INT_OP_DOT_WORD, INT_OP_NO_DOT, INT_OP_DC): New - macros, the allowed values for INT_OP_GROUP. - * config/m68k/amix.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP - * config/m68k/atari.h (ASM_OUTPUT_ASCII): Likewise - * config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Likewise - * config/m68k/auxas.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove. - (INT_OP_GROUP): Define to INT_OP_NO_DOT. - * config/m68k/dpx2.h (ASM_LONG): Undefine. - (INT_OP_GROUP): Define to INT_OP_DC. - * config/m68k/dpx2g.h (ASM_LONG): Undefine. - * config/m68k/hp320.h (INT_OP_GROUP): Define to INT_OP_NO_DOT. - * config/m68k/lynx.h (ASM_LONG): Undefine. - * config/m68k/dpx2g.h (ASM_LONG): Undefine. - * config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP. - * config/m68k/m68kv4.h (ASM_OUTPUT_ASCII): Likewise. - (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_*. - * config/m68k/mot3300.h (INT_OP_GROUP): Define to INT_OP_STANDARD - for GAS and INT_OP_NO_DOT otherwise. - (ASM_CHAR, ASM_BYTE, ASM_SHORT, ASM_LONG): Remove. - (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, - ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid ASM_LONG. - (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP. - * config/m68k/sgs.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove. - (INT_OP_GROUP): Define to INT_OP_STANDARD. - (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, - ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid LONG_ASM_OP. - (ASM_OUTPUT_ASCII): Avoid BYTE_ASM_OP. - * config/m68k/tower-as.h (ASM_LONG): Remove. - (INT_OP_GROUP): Define to INT_OP_NO_DOT. - * config/m88k/m88k.c (output_tdesc): Avoid ASM_LONG. - * config/m88k/m88k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT. - (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid ASM_LONG. - * config/mips/iris5.h (TARGET_IRIX5): Define. - * config/mips/mips.c (mips_assemble_integer): New. - * config/mips/sni-svr4.h (ASM_LONG): Undefine. - * config/mmix/mmix-protos.h (mmix_asm_output_double_int): Remove. - * config/mmix/mmix.c (mmix_assemble_integer): New. - (mmix_asm_output_double_int): Remove. - (mmix_print_operand): Call mmix_output_octa directly. - * config/mmix/mmix.h (ASM_LONG): Remove. - * config/ns32k/ns32k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT. - * config/pa/pa.c (pa_assemble_integer): New. - (pa_override_options): Only use aligned DI ops on 64-bit targets. - Only use the unaligned ops if TARGET_GAS. - * config/pdp11/pdp11.c (pdp11_assemble_integer): New. - * config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT. - * config/pj/pj.h (ASM_LONG): Undefine. - * config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Undefine. - * config/rs6000/rs6000.c (rs6000_assemble_integer): New, mostly - extracted from ASM_OUTPUT_INT in sysv4.h. Use in_text_section() - and in_toc_section() rather than the in_section variable. - (rs6000_override_options): Only use DI ops when TARGET_POWERPC64. - * config/rs6000/sysv4.h (TOC_SECTION_FUNCTION): Add in_toc_section(). - (RELOCATABLE_NEEDS_FIXUP): Define. - * config/rs6000/xcoff.h (DOUBLE_INT_ASM_OP): Change space to tab. - * config/s390/linux.h (ASM_SHORT, ASM_LONG, ASM_QUAD): Remove. - (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Use integer_asm_op - to get the word directive. - (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP. - * config/s390/s390.c (s390_assemble_integer): New. - * config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Use - integer_asm_op to get the word directive. - * config/sparc/sol2.h (ASM_SHORT, ASM_LONG): Remove. - * config/sparc/sparc-protos.h (output_double_int): Remove. - * config/sparc/sparc.c (output_double_int): Move to... - (sparc_assemble_integer): ...this new function. - (sparc_override_options): Only use .uaxword if TARGET_ARCH64. - * config/sparc/sparc.h (ASM_SHORT, ASM_LONG, ASM_LONGLONG): Remove. - * config/sparc/sysv4.h (ASM_LONG): Remove. - (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid - ASM_LONG. - * config/vax/vax.h (TRAMPOLINE_TEMPLATE): Use assemble_aligned_integer. - * config/we32k/we32k.h (TRAMPOLINE_TEMPLATE): Likewise. - - * config/1750a/1750a.c, config/a29k/a29k.c, config/alpha/alpha.c, - config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c, - config/clipper/clipper.c, config/convex/convex.c, config/cris/cris.c, - config/d30v/d30v.c, config/dsp16xx/dsp16xx.c, config/elxsi/elxsi.c, - config/fr30/fr30.c, config/h8300/h8300.c, config/i370/i370.c, - config/i386/i386.c, config/i860/i860.c, config/i960/i960.c, - config/ia64/ia64.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, - config/m68k/m68k.c, config/m88k/m88k.c, config/mips/mips.c, - config/mmix/mmix.c, config/mn10200/mn10200.c, config/mn10300/mn10300.c, - config/ns32k/ns32k.c, config/pa/pa.c, config/pdp11/pdp11.c, - config/sh/sh.c, config/sparc/sparc.c, config/stormy16/stormy16.c, - config/v850/v850.c, config/vax/vax.c, config/we32k/we32k.c - (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_HI_OP, - TARGET_ASM_ALIGNED_SI_OP, TARGET_ASM_ALIGNED_DI_OP, - TARGET_ASM_UNALIGNED_HI_OP, TARGET_ASM_UNALIGNED_SI_OP, - TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_INTEGER): Redefine as - appropriate. - - * config/defaults.h, config/darwin.h, config/elfos.h, config/svr3.h, - 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/bsd.h, config/i386/djgpp.h, config/i386/i386.h, - config/i386/sco5.h, config/i386/sol2.h, config/i386/sun386.h, - config/i860/i860.h, config/i960/i960.h, config/ia64/ia64.h, - config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/auxas.h, - config/m68k/dpx2.h, config/m68k/hp320.h, config/m68k/m68k.h, - config/m68k/mot3300.h, config/m68k/sgs.h, config/m68k/tower-as.h, - config/m88k/m88k.h, config/mcore/mcore-elf.h, config/mcore/mcore.h, - config/mips/iris5.h, config/mips/iris6.h, config/mips/mips.h, - config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h - config/ns32k/encore.h, config/ns32k/ns32k.h, config/pa/pa-64.h, - config/pa/pa.h, config/pdp11/pdp11.h, config/pj/pj.h, - config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000.h, - config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/linux.h, - config/sh/sh.h, config/sparc/linux64.h, config/sparc/sol2.h, - config/sparc/sp64-elf.h, config/sparc/sparc.h, config/sparc/sysv4.h, - config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h, - config/we32k/we32k.h (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_BYTE_OP, - ASM_BYTE, ASM_OUTPUT_SHORT, ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT, - UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP): Undefine, where defined. - -2001-12-17 Stan Shebs - - * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Define. - (STACK_BOUNDARY): Remove definition. - (CPP_PREDEFINES): Define __POWERPC__. - -2001-12-17 Gerald Pfeifer - - * doc/c-tree.texi (Trees): Only refer to GCC. - -2001-12-17 Andreas Jaeger - - * c-common.def: Fix typo in comment. - -2001-12-16 David O'Brien - - * config.gcc (sparc64-*-freebsd*): Add target. - * config/sparc/freebsd.h: New file. - * config/sparc/sparc.h (LIB_SPEC, LINK_SPEC): Don't define. - * config/sparc/sunos4.h (LIB_SPEC, LINK_SPEC): Define. - * config/sparc/sysv4.h (CPP_PREDEFINES): Undefine before defining. - -2001-12-16 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_legitimize_address): Force both - PLUS operands into registers for altivec mode. - -2001-12-16 Aldy Hernandez - - * builtins.c (apply_args_size): Change regno to unsigned. - -2001-12-16 Aldy Hernandez - - * config/rs6000/rs6000.h (FUNCTION_ARG_REGNO_P): Change - ALTIVEC_ARG_MAX_REG to ALTIVEC_ARG_NUM_REG. - -2001-12-16 Zack Weinberg - - * c-typeck.c (error_init, pedwarn_init, warning_init): Call - gettext on argument before printing. - - * fold-const.c (negate_expr): Always call fold on new - NEGATE_EXPR. - -2001-12-17 Joseph S. Myers - - * c-common.def (COMPOUND_LITERAL_EXPR): Contain a DECL_STMT, not - a DECL directly. - * c-common.h (COMPOUND_LITERAL_EXPR_DECL_STMT): New. - (COMPOUND_LITERAL_EXPR_DECL): Adjust definition. - * c-decl.c (build_compound_literal): Put the decl inside a - DECL_STMT. - * doc/c-tree.texi (COMPOUND_LITERAL_EXPR): Update documentation. - Fixes PR c/5105. - -2001-12-16 Aldy Hernandez - - * config.gcc: Add powerpc-*-eabisimaltivec*. - -2001-12-16 Neil Booth - - * c-common.c, c-common.h (back_end_hook): Remove. - * c-lang.c (finish_file): Remove back_end_hook. - -Sun Dec 16 13:13:01 2001 Richard Kenner - - * expr.c (highest_pow2_factor, case INTEGER_CST): Fix error in - last change. - -2001-12-16 Richard Henderson - - * toplev.c (parse_options_and_default_flags): Don't enable - flag_cprop_registers at -O1. - -2001-12-16 Kaveh R. Ghazi - - * avr.c (avr_simplify_comparision_p, adjust_insn_length, - mask_one_bit_p, output_reload_insisf): Don't use the 'U' suffix. - * avr.h (reg_class): Likewise. - * avr.md: Likewise. - * mcore.c (try_constant_tricks, mcore_byte_offset, - mcore_halfword_offset): Likewise. - * sh.c (shl_sext_kind, gen_block_redirect, split_branches): Likewise. - * v850.c (not_power_of_two_operand): Likewise. - - * clipper/clix.h (ASM_OUTPUT_ASCII): Avoid signed/unsigned - warnings. - * convex.h (ASM_OUTPUT_ASCII): Likewise. - * i370.h (ASM_OUTPUT_ASCII): Likewise. - * i386/att.h (ASM_OUTPUT_ASCII): Likewise. - * i386/i386-interix.h (ASM_OUTPUT_ASCII): Likewise. - * i386/i386elf.h (ASM_OUTPUT_ASCII): Likewise. - * i386/ptx4-i.h (ASM_OUTPUT_ASCII): Likewise. - * i386/sco5.h (ASM_OUTPUT_ASCII): Likewise. - * i386/sun386.h (ASM_OUTPUT_ASCII): Likewise. - * i386/sysv4.h (ASM_OUTPUT_ASCII): Likewise. - * i860/bsd.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/3b1.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/amix.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/atari.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/crds.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/hp320.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/m68kv4.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/mot3300.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/sgs.h (ASM_OUTPUT_ASCII): Likewise. - * m68k/tower-as.h (ASM_OUTPUT_ASCII): Likewise. - * mips/bsd-5.h (ASM_OUTPUT_ASCII): Likewise. - * mips/mips-5.h (ASM_OUTPUT_ASCII): Likewise. - * mips/svr3-5.h (ASM_OUTPUT_ASCII): Likewise. - * mips/svr4-5.h (ASM_OUTPUT_ASCII): Likewise. - * ns32k/encore.h (ASM_OUTPUT_ASCII): Likewise. - * vax/vaxv.h (ASM_OUTPUT_ASCII): Likewise. - * we32k/we32k.h (ASM_OUTPUT_ASCII): Likewise. - - * i386/uwin.h (MD_STARTFILE_PREFIX): Avoid redefinition warnings. - * interix.h (TARGET_MEM_FUNCTIONS): Likewise. - * psos.h (CPP_PREDEFINES): Likewise. - * rs6000/linux64.h (ROUND_TYPE_ALIGN): Likewise. - * rs6000/xcoff.h (RS6000_MCOUNT, RS6000_ITRUNC, RS6000_UITRUNC, - ASM_OUTPUT_EXTERNAL): Likewise. - * sparc/liteelf.h (DWARF_DEBUGGING_INFO, DWARF2_DEBUGGING_INFO): - Likewise. - * sparc/sp64-elf.h (UNALIGNED_DOUBLE_INT_ASM_OP): Likewise. - * sparc/sp86x-elf.h (DWARF_DEBUGGING_INFO, DWARF2_DEBUGGING_INFO): - Likewise. - * sparc/sunos4.h (SUNOS4_SHARED_LIBRARIES): Likewise. - - * c-lex.c (lex_number): Use ISXDIGIT/hex_value. - * vax/xm-vms.h (FILE_NAME_NONDIRECTORY): Use ISUPPER/TOLOWER. - * fold-const.c (real_hex_to_f): Use hex_value. - * real.c (asctoeg): Use hex_value & ISXDIGIT. - * toplev.c (toplev_main): Call hex_init. - * tradcpp.c (main): Call hex_init. - - * nextstep-protos.h: New file. - * nextstep.c: Include "rtl.h", "output.h" & "tm_p.h". - * nextstep.h (INCLUDE_DEFAULTS): Delete LOCAL_INCLUDE_DIR and - STANDARD_INCLUDE_DIR from the CROSS_COMPILE clause. - (nextstep_asm_out_constructor, nextstep_asm_out_destructor, - handle_pragma): Move prototypes to nextstep-protos.h. - * config.gcc (i[34567]86-next-*, m68k-next-nextstep2*, - m68k-next-nextstep[34]*): Append nextstep-protos.h to tm_p_file. - -2001-12-16 Craig Rodrigues - - PR other/3725 - * configure.in: Add AC_SUBST(target_alias). - * configure: Regenerated. - -2001-12-15 Richard Henderson - - * config/alpha/alpha.md (sibcall_osf_1_er): New. - (sibcall_value_osf_1_er): New. - -2001-12-15 Dan Nicolaescu - - * config/sparc/sparc.c (mems_ok_for_ldd_peep): Rename from - addrs_ok_for_ldd_peep_withmem; take MEMs as parameters, not - addrs; eliminate restriction of only using fp and sp as base - registers. - * config/sparc/sparc-protos.h: Update. - * config/sparc/sparc.md (movdi): Use TARGET_V9 not TARGET_ARCH64. - (*cmp_cc_set, *cmp_ccx_set64, *movdi_zero): New insns derived - from old define_peepholes. - Convert all the ldd/std peepholes to peephole2. - -2001-12-15 Ulrich Weigand - - * s390.md (prologue, epilogue, *return_si, *return_di): New. - s390.c (find_unused_clobbered_reg, s390_frame_info, - save_fpr, restore_fpr, s390_emit_prologue, s390_emit_epilogue): New. - s390-protos.h (s390_emit_prologue, s390_emit_epilogue): Declare. - s390.c (s390_arg_frame_offset): Use s390_frame_info. - (leaf_function_flag, cur_is_leaf_function, - save_fprs, restore_fprs, force_const_mem_late): Remove. - (s390_function_prologue, s390_function_epilogue): Mostly remove. - s390.md (lit): New. Uses ... - s390.c (s390_output_constant_pool): ... this, so adapt and make global. - s390-protos.h (s390_output_constant_pool): Declare. - s390.md (load_multiple, store_multiple): Allow use after reload. - s390.c (load_multiple_operation, store_multiple_operation): Likewise. - s390.h (INCOMING_FRAME_SP_OFFSET): Define. - s390.h (CALL_REALLY_USED_REGISTERS): Define. - config/s390/linux64.h (CALL_USED_REGISTERS): Remove, now handled ... - s390.h (CONDITIONAL_REGISTER_USAGE): ... here. - s390.c (s390_sr_alias_set): New global variable, initialized ... - (override_options): ... here. New. - s390-protos.h (override_options): Declare. - s390.h (OVERRIDE_OPTIONS): Call it. - s390.c (s390_function_profiler): New. - s390-protos.h (s390_function_profiler): Declare. - s390.h (FUNCTION_PROFILER): Call it. - s390.c (s390_profile): Remove. - - * s390.c (reg_used_in_mem_p): PC reload counts as memory access. - (addr_generation_dependency_p): Consider literal pool register loads. - (s390_adjust_priority): Do not schedule load_multiple. - s390.md (attribute "type"): Define some additional types. - (function_unit "integer"): Adapt. - (many insns): Adapt "type" attribute setting. - - * s390.c (general_s_operand, s_imm_operand): New. - (s_operand): Remove old definition, call general_s_operand instead. - s390-protos.h (s_imm_operand): Declare. - s390.c (base_n_index_p, r_or_s_operand, r_or_s_or_im8_operand, - r_or_x_or_im16_operand, r_or_im8_operand): Remove. - s390-protos.h (r_or_s_operand, r_or_s_or_im8_operand, - r_or_x_or_im16_operand, r_or_im8_operand): Likewise. - s390.h (PREDICATE_CODES): Add s_imm_operand, remove r_or_s*_operand. - s390.md (many insns): Rework insn predicates. - - * s390.c (legitimate_pic_operand_p, legitimate_constant_p): Accept all - non-symbolic constants. Reload will force them because of ... - (s390_preferred_reload_class): ... this. New. - s390-protos.h (s390_preferred_reload_class): Declare. - s390.h (PREFERRED_RELOAD_CLASS): Call it. - s390.md (movdi, movsi, movdf, movsf, *reload_la_64 splitters, - *reload_la_31 splitters): Handle constants after reload. - (many insns): no longer force all constants immediately. - s390.c (legitimate_reload_constant_p): New helper routine. - s390-protos.h (legitimate_reload_constant_p): Declare. - s390.c (print_operand): Clean up CONST_INT case, add CONST_DOUBLE case. - - * s390.h (FIRST_PSEUDO_REGISTER, FRAME_POINTER_REGNUM, - HARD_FRAME_POINTER_REGNUM, REGISTER_NAMES): Add virtual frame pointer. - (CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS): Update. - (ELIMINABLE_REGS, INITIAL_ELIMINATION_OFFSET): Likewise. - (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_NONSTRICT_P): Likewise. - (DWARF_FRAME_REGISTERS): Define. - s390.c (regclass_map): Add virtual frame pointer. - (legitimate_la_operand_p): Allow use of virtual frame pointer. - s390.md (*la_ccclobber, *addaddr_ccclobber): New. - (addaddr, addsi_64): Delete. - - * s390.h (HARD_REGNO_MODE_OK): Allow SImode and DImode values in - floating point registers. - (CLASS_CANNOT_CHANGE_MODE, CLASS_CANNOT_CHANGE_MODE_P): Define. - (ADDR_FP_REGS, GENERAL_FP_REGS): New register classes. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update. - - * s390.md (movti): Replace multi-insn output with splitters. - (movdi_31, movdf_31): Likewise. - (movti_ss, movdi_ss, movsi_ss, movdf_ss, movsf_ss): New. - (movdi_lhi, movdi_lli, movdi_larl, movsi_lhi, movsi_lli): New. - (movdi_64, movdi_31, movsi, movdf_64, movdf_31): Adapt. - (movdf_soft_64, movdf_soft_31, movsf_soft): Remove. - (movsf_64, movsf_31): Remove, replace by ... - (movsf): ... this. - (movqi_64): Use lhi instead of llill. - (*movstrictqi, *movstricthi): Don't use (strict_low_part (mem)). - - * s390.md (extendsidi2, *extendsidi2, extendhidi2, *extendhidi2, - extendqidi2, extendhisi2, *extendhisi2, extendqisi2, - extendqihi2 and associated splitters): Reworked. - (zero_extendsidi2, zero_extendsidi2, *zero_extendsidi2, - zero_extendhidi2, *zero_extendhidi2, zero_extendqidi2, - zero_extendqidi2, *zero_extendqidi2, zero_extendhisi2, - *zero_extendhisi2_64, zero_extendhisi2_31, zero_extendqisi2, - *zero_extendqisi2_64, *zero_extendqisi2_mem_31, - zero_extendqisi2_reg_31, zero_extendqihi2, *zero_extendqisi2_64, - zero_extendqihi2, zero_extendqihi2_64, zero_extendqihi2_31, - and associated splitters): Likewise. - (*sethighqisi, *sethighhisi, *sethighqidi_64, *sethighqidi_31 - and associated splitters): New. - (truncdisi2, truncdihi2, truncdiqi2, truncsihi2, do_truncsihi2, - *truncsihi2_64, truncsiqi2, trunchiqi2): Remove. - (ashlhi3, ashrhi3, lshrhi3, abshi3): Remove. - s390.h (PROMOTE_PROTOTYPES): Remove. - config/s390/linux64.h (PROMOTE_PROTOTYPES): Likewise. - - * s390.md (muldi3): Delete, use instead ... - (mulsidi3): ... this. - (*muldi3_64): Rename to muldi3. - (mulsi_6432): Fix template. - (divdi3, moddi3): Delete, replace by ... - (divmoddi4): ... this. - (divmodtidi3): Fix template. - (divmodtisi3): New. - (udivdi3, umoddi3): Delete, replace by ... - (udivmoddi4): ... this. - (udivmodtidi3): Fix template. - (divsi3, modsi3): Delete, replace by ... - (divmodsi4): ... this. - (divmoddisi3): Fix template. - (udivsi3, umodsi3): Adapt. - - * s390.md (anddi3): Remove SS alternative, use instead ... - (anddi3_ss, anddi3_ss_inv): ... these. - (anddi3_ni): New. - (andsi3*, andhi3*, andqi3*): Likewise. - (iordi3): Remove SS alternative, use instead ... - (iordi3_ss, iordi3_ss_inv): ... these. - (iordi3_oi): New. - (iorsi3*, iorhi3*, iorqi3*): Likewise. - (iordi3_cc, iordi3_cconly, iorsi3_cc, iorsi3_cconly): New. - (xordi3): Remove SS alternative, use instead ... - (xordi3_ss, xordi3_ss_inv): ... these. - (xordi3_oi): New. - (xorsi3*, xorhi3*, xorqi3*): Likewise. - (xordi3_cc, xordi3_cconly, xorsi3_cc, xorsi3_cconly): New. - (one_cmpldi2, one_cmplsi2, one_cmplhi2, one_cmplqi2): - Expand to XOR with -1. - (*one_cmpldi2, *one_cmplsi2, *one_cmplhi2): Remove. - (cmpdi_tm): Delete, replace by ... - (cmpdi_tm_reg, cmpdi_tm_mem): ... these. - (cmpsi_cct): Delete, replace by ... - (cmpsi_tm_reg, cmpsi_tm_mem): ... these. - (cmpdi_tm2, cmpsi_tm2): Improve. - (cmphi_tm_sub, cmpqi_tm_sub, cmpqi_tm2, cmpqi_tm): New. - s390.c (s390_single_hi, s390_extract_hi, - s390_single_qi, s390_extract_qi): New helper routines. - s390-protos.h (s390_single_hi, s390_extract_hi, - s390_single_qi, s390_extract_qi): Declare. - s390.c (tmxx_operand, const1_operand): Remove. - s390-protos.h (tmxx_operand, const1_operand): Likewise. - s390.h (PREDICATE_CODES): Likewise. - - * s390.md (sqrtdf2, sqrtsf2): New. - - * s390.h (CRT_CALL_STATIC_FUNCTION): Define. - (check_and_change_labels): Remove section-change special case. - - * s390.h (RETURN_ADDR_RTX): Fix use of __builtin_return_address - in leaf functions. Needs ... - (DYNAMIC_CHAIN_RTX): ... this. New. - - * s390.c (emit_pic_move): Don't generate pseudos if no_new_pseudos. - - * s390.md (movstrdix_64, movstrsix_31, movstrdi_64, movstrsi_31, - clrstrsi_64, clrstrsi_31, cmpstr_64, cmpstr_31): Do not clobber - input operands using a match_dup clause. - (movstrdi, movstrsi, clrstrdi, clrstrsi, cmpstrdi, cmpstrsi): Adapt. - - * s390.md (floatdidf2, floatdisf2, floatsidf2, floatsidf2_ieee, - floatsisf2, floatsisf2_ieee): Add missing CC clobber. - - * s390.md (floatsidf2_ibm): Use correct operand. - - * s390.md (fixuns_truncdfdi2, fixuns_truncdfsi2, fix_truncdfsi2, - fixuns_truncsfdi2, fixuns_truncsfsi2, floatsidf2): Remove use of - non-portable constants. - s390.c (s390_gen_rtx_const_DI): New helper routine. - s390-protos.h (s390_gen_rtx_const_DI): Declare. - - * s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Fix alignment. - - * config/s390/linux.h (ASM_OUTPUT_SHORT, ASM_OUTPUT_CHAR, - ASM_OUTPUT_BYTE): Clean up assembly output. - (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGN): Remove duplicate definitions. - (ASM_OUTPUT_ASCII): Remove. - - * config/s390/t-linux (CRTSTUFF_T_CFLAGS_S): Define. - -2001-12-15 Zack Weinberg - - * unwind-dw2-fde-glibc.c: #define _Unwind_Find_FDE to itself - before including unwind-dw2-fde.c, if we are not using the - special code in this file. - -2001-12-15 Richard Henderson - - * config/alpha/alpha.h (TARGET_SWITCHES): Turn on - MASK_EXPLICIT_RELOCS if the assembler supports it. - * configure.in (HAVE_AS_EXPLICIT_RELOCS): New. - * configure, config.in: Rebuild. - -Sat Dec 15 17:53:03 2001 Richard Kenner - - * calls.c (emit_call_1): If ECF_SP_DEPRESSED, pretend have adjusted - for rounded_stack_size. - -2001-12-15 Joseph S. Myers - - * c-typeck.c, config/i386/i386.h, config/mcore/mcore.h, - config/ns32k/ns32k.h, config/rs6000/sysv4.h, fold-const.c, - toplev.c, cppinit.c, cppmacro.c, gcc.c: Use "built-in" and - "bit-field" spellings in messages. - * po/gcc.pot: Regenerate. - -2001-12-15 Joseph S. Myers - - * gcc.c, config/fr30/fr30.c, config/v850/v850-c.c, toplev.c: Use - American spelling in messages. - * po/gcc.pot: Regenerate. - -2001-12-15 Kazu Hirata - - * config/h8300/h8300.md: Adjust whitespacing. Remove - constraints from expanders. Replace \@ with @. - -2001-12-15 Richard Earnshaw - - * arm/unknown-elf.h (CPP_PREDEFINES): Add a suitable default. - -2001-12-15 Ulrich Weigand - - * regrename.c (copyprop_hardreg_forward): Do not keep register - value data live across abnormal call or eh egdes. - -Sat Dec 15 08:29:45 2001 Richard Kenner - - * expr.c (highest_pow2_factor, case INTEGER_CST): Return - BIGGEST_ALIGNMENT for 0. - -Sat Dec 15 14:13:03 CET 2001 Jan Hubicka - - * predict.def (PRED_NORETURN): Make probabilities match reality. - (PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL, PRED_ERROR_RETURN): - Likewise. - -2001-12-15 Jakub Jelinek - - * configure.in: Check for ld. - (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. - * configure, config.in: Rebuilt. - * config.gcc: Add crtbeginT.o to extra_parts where needed. - * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc - frame unwinding on Linux. - * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde - frame unwinding. - * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. - (LINK_EH_SPEC): Define. - * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. - * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. - * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't - iterate further if pc falls into current library, but fde was not - found. - * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static - if using glibc. - (LINK_EH_SPEC): Define. - * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): - Use crtbeginT.o for -static. - (LINK_EH_SPEC): Define. - * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. - * Makefile.in (crtbeginT.o): Add rule. - * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. - If neither -static-libgcc nor -shared-libgcc is passed and -shared, - use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. - If none of the above switches are passed, use -lgcc -lgcc_eh. - (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. - * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if - creating libgcc_s.so, put them into separate libgcc_eh.a instead. - * unwind-dw2-fde.c: Don't include any headers if this file - is included from other .c file. - * unwind-dw2-fde-glibc.c: New file. - * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. - Use it instead of EH_FRAME_SECTION_NAME where appropriate. - -2001-12-14 Kaveh R. Ghazi - - * builtins.c (expand_builtin_memcmp): Mark parameter with - ATTRIBUTE_UNUSED. - * cfgcleanup.c (insns_match_p): Likewise. - * regrename.c (mode_change_ok): Likewise. - * gcc.c (execute): Const-ify. - -2001-12-14 Aldy Hernandez - - * c-parse.in (typename): Do not split attributes. - Remove unsupported attributes warning. - - * c-decl.c (groktypename): Apply attributes. - -2001-12-14 Richard Henderson - - * config/ia64/ia64.c (spill_restore_mem): Mark iterator - initialization as possibly dead. - -2001-12-14 Richard Henderson - - * regrename.c (mode_change_ok): New. - (find_oldest_value_reg): Use it. - -2001-12-14 Richard Henderson - - * regrename.c (struct value_data): Add max_value_regs. - (init_value_data): Initialize it. - (kill_value): Kill values that overlap the dying register. - (set_value_regno): New. - (kill_set_value, kill_autoinc_value, copy_value): Use it. - (copyprop_hardreg_forward_1): Kill earlyclobber operands - before looking at inputs. - -2001-12-14 David Edelsohn - - * config/rs6000/rs6000.h (ASM_OUTPUT_DEF_FROM_DECLS): Handle - DECL_WEAK for function descriptors. - * config/rs6000/xcoff.h (HANDLE_PRAGMA_WEAK): Define if assembler - weak support present. - (ASM_WEAKEN_LABEL): Same. - -2001-12-14 Kazu Hirata - - * config/h8300/h8300.md (anonymous pattern): Add a missing - mode. - -2001-12-14 Kazu Hirata - - * config/h8300/h8300.c (h8300_adjust_insn_length): Fix a - comment typo. - -2001-12-14 Kazu Hirata - - * config/h8300/h8300.c (h8300_handle_eightbit_data_attribute): - Remove the initialization requierment. - (h8300_handle_tiny_data_attribute): Likewise. - -2001-12-14 Kazu Hirata - - * config/h8300/h8300.md (udivqi3): Remove. - (divqi3): Likewise. - (udivhi3): Likewise. - (divhi3): Likewise. - (umodqi3): Likewise. - (modqi3): Likewise. - (umodhi3): Likewise. - (modhi3): Likewise. - (udivmodqi3): New. - (divmodqi3): Likewise. - (udivmodhi3): Likewise. - (divmodhi3): Likewise. - -Sat Dec 15 01:39:12 CET 2001 Jan Hubicka - - * cfgcleanup.c (flow_find_cross_jump): Replace tests for note - by active_insn_p; count conditional jump as instruction. - -2001-12-14 DJ Delorie - Danny Smith - - * config/i386/cygwin.h (I386_PE_STRIP_ENCODING): Handle '*' - at SYM_NAME[0] or SYM_NAME[3]. - (STRIP_NAME_ENCODING): Don't check for leading '*'. - -2001-12-14 Ira Ruben - - Add -### option (displays driver-generated commands without - executing and quotes all arguments). - * doc/invoke.texi: Add -###. - * gcc.c (verbose_only_flag) - New flag. - * (execute): If -### write quoted arguments and return. - * (display_help): Print meaning of -###. - * (process_command): Handle -###. - -2001-12-14 Ira Ruben - - Fix to no allow -save-temps to clobber user's source file. - * gcc.c: Add static globals input_stat and input_stat_set. - (do_spec_1): For 'g', 'u', 'U' case with save_temps_flag - set, check that user's input file is not overwritten. - (set_input): Reset input_stat_set for each new file. - -Fri Dec 14 22:14:44 CET 2001 Jan Hubicka - - * predict.c (estimate_probability): Fix LOOP_EXIT heuristic. - -2001-12-14 Zack Weinberg - - * combine.c (record_dead_and_set_regs): Use - regs_invalidated_by_call. Don't note stores for CALL_INSNs. - -2001-12-14 Roger Sayle - - * builtins.def: Rename BUILT_IN_FSQRT to BUILT_IN_SQRT and - __builtin_fsqrt to __builtin_sqrt. - - * builtins.c (expand_builtin_mathfn,expand_builtin): Same. - * doc/extend.texi: Simplify documentation to match patch. - -Fri Dec 14 21:23:54 CET 2001 Jan Hubicka - - * config.gcc: Revamp target_cpu_default2 to strings; - support new x86 variants. - * i386.c (override_options): Default x86_cpu_string and x86_arch_string - properly; set prefetch_sse. - * i386.h (x86_prefetch_sse): Declare. - (TARGET_PREFETCH_SSE): New. - (CPP_CPU_DEFAULT_SPEC): Define according to the new macros. - (TARGET_CPU_DEFAULT_*): New. - -Thu Dec 13 21:57:13 CET 2001 Janis Johnson - Jan Hubicka - - * config/i386/i386.h (struct processor_costs): Add new members - prefetch_block and simultaneous_prefetches. - (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES): New. - * config/i386/i386.c (processor_costs structs): Add values for - prefetch_block and simultaneous_prefetches. - * config/i386/i386.md (unspec values): Remove values for prefetch - operations, which now use the PREFETCH rtx code. - (prefetch_sse, prefetch_3dnow, prefetchw): Combine to use new - unified prefetch support. - -2001-12-14 Jason Merrill - - * diagnostic.c (sorry): Increment sorrycount before saving the - buffer state. - -Fri Dec 14 19:53:23 CET 2001 Jan Hubicka - - * i386.md (sqrt?f): Fix conditionals. - -Fri Dec 14 07:29:52 2001 Douglas B. Rupp - - * config.gcc (alpha64-dec-*vms*): New case. - * config/alpha/t-vms64, config/alpha/vms-crt0-64.c: New files. - * config/alpha/vms-psxcrt0-64.c, config/alpha/vms64.h: Likewise. - * config/alpha/xm-vms64.h: Likewise. - - * config/alpha/alpha.c (vms_attribute_table): Add new attributes. - (alpha_write_linkage): Test for null alpha_links. - (SECTION_VMS_GLOBAL, SECTION_VMS_INITIALIZE): New section attributes. - (vms_section_type_flags, vms_asm_named_section): Handle them. - -Fri Dec 14 12:05:14 CET 2001 Jan Hubicka - - * i386.c (ix86_fpmath, ix86_fpmath_string): New. - (override_option): Set ix86_fpmath. - * i386.h (MASK_MIX_SSE_I387): Remove. - (TARGET_SSE_MATH): New. - (TARGET_MIX_SSE_I387): Use ix86_fpmath. - (TARGET_SWITCHES): Remove "mix-sse-i387". - (fpmath_unit): New enum. - (ix86_fpmath, ix86_fpmath_string): Declare. - * i386.md (swapsf): Fix condition. - (add?f, sub?f, mul?f, div?f, sqrt?f, min?f): Use TARGET_SSE_MATH. - (fp_?f_*_nosse): New. - (fp_*): Use TARGET_SSE_MATH. - * invoke.texi (-mfpmath): Document. - (-msse2): Add. - -2001-12-14 Jason Merrill - - * dwarf2out.c (output_die): Print the string in the comment for - a DW_FORM_strp. - -2001-12-14 Richard Earnshaw - - * netbsd.h (COLLECT_SHARED_INIT_FUNC) - (COLLECT_SHARD_FINI_FUNC): Remove redundant semicolon. - * doc/tm.texi (COLLECT_SHARED_INIT_FUNC) - (COLLECT_SHARD_FINI_FUNC): Use @code where appropriate. - -2001-12-13 Richard Henderson - - * regrename.c (kill_value_regno): Simplify chain removal. - (kill_value): Kill all of HARD_REGNO_NREGS. - (kill_set_value): Use kill_value not kill_value_regno. - (kill_autoinc_value): Likewise. - (copyprop_hardreg_forward): Don't collect refresh_blocks. - Call delete_noop_moves. - -2001-12-13 Aldy Hernandez - - * attribs.c (c_common_attribute_table): Swap decl_req and type_req - for the mode attribute. - (handle_mode_attribute): Handle types, not decls. - -2001-12-13 Jason Merrill - - * c-common.h (COMPOUND_STMT_BODY_BLOCK): New macro. - -2001-12-13 Aldy Hernandez - - * config/rs6000/rs6000.md (eh_set_lr_di): Change scratch - constraint to base register. - (eh_set_lr_si): Same. - -2001-12-13 Hans-Peter Nilsson - - * expr.c (expand_expr, case ADDR_EXPR): Don't honor - flag_force_addr for modifier != EXPAND_CONST_ADDRESS, - modifier != EXPAND_INITIALIZER and modifier != EXPAND_SUM. - -Thu Dec 13 20:30:08 2001 Richard Kenner - - * expr.c (copy_blkmode_from_reg): Add missing braces to eliminate - warning and reformat comments. - (expand_assignment): Don't pass EXPAND_WRITE if LHS is component. - (highest_pow2_factor, case INTEGER_CST): Return BIGGEST_ALIGNMENT - if overflow. - -2001-12-12 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_override_options): Add - SUBSUBTARGET_OVERRIDE_OPTIONS. - - * config/rs6000/eabialtivec.h: New file. - - * config/rs6000/linuxaltivec.h: New file. - - * config.gcc: Add powerpc-*-eabialtivec and - powerpc-*-linux-gnualtivec. - -2001-12-13 Neil Booth - - * toplev.c (process_options, parse_options_and_default_flags): - Set flag_no_inline before the post_options hook. - -2001-12-13 Richard Henderson - - * emit-rtl.c (adjust_address_1): Don't adjust address if adjust - is false. - -2001-12-13 Richard Earnshaw - - * collect2.c (COLLECT_SHARED_INIT_FUNC) - (COLLECT_SHARD_FINI_FUNC): Define default values. - (write_c_file_stat): Use them to call construtor and destructor - functions in shared libraries. - * doc/tm.texi (COLLECT_SHARED_INIT_FUNC) - (COLLECT_SHARD_FINI_FUNC): Document them. - * config/netbsd.h (COLLECT_SHARED_INIT_FUNC) - (COLLECT_SHARD_FINI_FUNC): Define. - - * config/netbsd.h (LINK_SPEC): Don't pull in estart if creating a - shared library. Pass -shared through to the linker. - * config/arm/netbsd.h (LINK_SPEC): Likewise. - - * config/arm/t-netbsd (TARGET_LIBGCC2_CFLAGS): Add -fpic. - (SHLIB_EXT, SHLIB_NAME, SHLIB_SONAME, SHLIB_OBJS, SHLIB_LINK) - (SHLIB_INSTALL): Define. - -2001-12-13 Richard Earnshaw - - * arm.c (legitimize_pic_address): Handle LABEL_REFs in substantially - the same way as we handle SYMBOL_REFS. - -Thu Dec 13 07:47:24 2001 Richard Kenner - - * loop.c (remove_constant_addition): Fix prototype and whitespace. - (emit_prefetch_instructions): Remove warnings and whitespace - changes. - -Thu Dec 13 06:48:38 2001 Douglas B. Rupp - - * config/alpha/vms-cc.c (preprocess_args): Fix forward - declaration. - -Thu Dec 13 12:31:07 CET 2001 Jan Hubicka - - * predict.c (estimate_probability): Reorganize opcode heuristics. - * predict.def (PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL, - PRED_FPOPCODE): New. - - * i386.c (override_options): Recognize various CPU variants and set - SSE/MMX/3dNOW flags accordingly. - * i386.h (MASK_MMX_SET, MASK_SSE_SET, MASK_SSE2_SET, MASK_3DNOW_SET, - MASK_3DNOW_A_SET): New. - (MASK_ACCUMULATE_OUTGOING_ARGS_SET): New. - (MASK_NO_ACCUMULATE_OUTGOING_ARGS): Delete. - (MASK_*): Renumber. - (TARGET_FLAGS): Use new masks. - (CPP_CPU_SPECS): Recognize new CPU variants. - * invoke.texi (-mcpu): Update documentation. - - * flags.h (flag_prefetch_loop_arrays): Declare. - * loop.h (LOOP_PREFETCH): Define new constant. - * loop.c (strength_reduce): Call emit_prefetch_instructions. - (MAX_PREFETCHES, PREFETCH_BLOCKS_BEFORE_LOOP_MAX, - PREFETCH_BLOCKS_BEFORE_LOOP_MIN, PREFETCH_BLOCKS_IN_LOOP_MIN): New - constants. - (check_store_data): New structure. - (check_store, emit_prefetch_instructions, rtx_equal_for_prefetch_p): - New functions. - * toplev.c: Include insn-flags.h. - (flag_prefetch_loop_arrays): New global variable. - (lang_independent_option): Add -fprefetch-loop-arrays. - (rest_of_compilation) Pass LOOP_PREFETCH when flag_prefetch_loop_arrays - is set. - * Makefile.in (toplev.c): Depend on insn-flags.h. - * invoke.texi (-fprefetch-loop-arrays): Document. - - * predict.c (estimate_probability): Distribute the loop exit - probability according to number of exit edges. - - * cfgcleanup.c (insns_match_p): Break out from ...; - (flow_find_cross_jump): ... here; - (outgoing_edges_match): Add parameter MODE; attempt to match everything - except for tablejumps. - (try_crossjump_to_edge): Accept complex edges. - (try_crossjump_bb): Likewise. - -2001-11-29 Corey Minyard - - * recog.c (validate_replace_rtx_1): Use simplify_gen_binary - instead of plus_constant. - * simplify-rtx.c (neg_const_int): New. - (simplify_gen_binary, simplify_plus_minus): Use it. - -2001-12-12 Roger Sayle - - * builtins.c (expand_builtin_memset, expand_builtin_memcpy, - expand_builtin_strcpy): Additional arguments TARGET and MODE. - (expand_builtin_bzero, expand_builtin_strcpy, - expand_builtin_strncpy, expand_builtin_bzero): Pass additional - TARGET and MODE parameters to the above functions. - (expand_builtin_memset, expand_builtin_memcpy): Optimize the - case where the LEN parameter is constant zero. - (expand_builtin_memcmp): No longer conditional on - HAVE_cmpstrsi. Take an additional mode parameter. Optimize - the cases where len is either constant zero or one. - Optimize to call to memcpy, even if the memcpy isn't inlined. - (expand_builtin_strncpy): Optimize to call memcpy, even if the - memcpy isn't inlined. - (expand_builtin_strcmp, expand_builtin_strncmp): Always attempt - to optimize to a call to memcmp. - (expand_builtin): expand_builtin_memcmp can always be called, - and pass the required parameters to expand_builtin_memcmp, - expand_builtin_memset, expand_builtin_memcpy and - expand_builtin_strcpy. - -2001-12-12 David O'Brien - - * config.gcc (arm-*-freebsd*): Add target. - * config/arm/freebsd.h: New file. - * config/arm/arm.h (CPP_PREDEFINES): Do not define. - (CPP_SPEC): #undef before defining. - (CPP_CPU_ARCH_SPEC): Add -Acpu=arm -Amachine=arm. - * config/arm/conix-elf.h (CPP_PREDEFINES): Remove -Acpu=arm - -Amachine=arm. - * config/arm/linux-elf.h: Likewise. - * config/arm/netbsd.h: Likewise. - * config/arm/riscix.h: Likewise. - * config/arm/riscix1-1.h: Likewise. - * config/arm/semiaof.h: Likewise. - -2001-12-12 Richard Henderson - - * regrename.c (copyprop_hardreg_forward): New optimization. - (kill_value_regno, kill_value, init_value_data, kill_clobbered_value, - kill_set_value, kill_autoinc_value, copy_value, find_oldest_value_reg, - replace_oldest_value_reg, replace_oldest_value_addr, - replace_oldest_value_mem, copyprop_hardreg_forward_1, - debug_value_data, validate_value_data): New. - * rtl.h (copyprop_hardreg_forward): Declare. - * toplev.c (flag_cprop_registers): New. - (f_options): Add -fcprop-registers - (rest_of_compilation): Invoke it. - (parse_options_and_default_flags): Set it at -O1. - * doc/invoke.texi: Document it. - -2001-12-12 Jakub Jelinek - - * dwarf2out.c (dw_val_class): Add dw_val_class_range_list. - (DEBUG_RANGES_SECTION_LABEL): Define. - (ranges_section_label): Add. - (add_AT_range_list): New. - (print_die, sizeof_die, value_format): Handle dw_val_class_range_list. - (output_loc_list): Location expression length is always 2-byte. - (output_die): Handle dw_val_class_range_list. - (gen_lexical_block_die): Call add_AT_range_list. - (dwarf2out_init): Initialize ranges_section_label. - (dwarf2out_finish): Emit ranges_section_label. - -2001-12-12 Jakub Jelinek - - * c-typeck.c (digest_init): Allow initializing - static storage duration objects with compound literals. - * doc/extend.texi (Compound literals): Document the extension. - -2001-12-12 Richard Henderson - - * emit-rtl.c (adjust_address_1): Always copy address to avoid - shared rtl. - -Wed Dec 12 07:37:52 2001 Olivier Hainque - - * stmt.c (expand_end_case): Do subtraction of lower bound as trees - to avoid overflow. - -Wed Dec 12 07:35:24 2001 Douglas B. Rupp - - * cppfiles.c (read_include_file): Set buffer size properly when - file is shorter than expected. - -Wed Dec 12 08:35:33 2001 Nicola Pero - - * objc/objc-act.c (encode_complete_bitfield): Fixed encoding - enumeral types - encode them using 'i'. - -2001-12-12 Nathan Sidwell - - * doc/extend.texi (Deprecated Features): Deprecate implicit - typename. Document that named return and initializer lists are now - removed. - -2001-12-11 Roger Sayle - - * except.c (reachable_next_level): Handle ERT_UNKNOWN to avoid - compiler warning about enumeration values not being handled. - -2001-12-11 Momchil Velikov - - * config/fp-bit.c (pack_d): Cast to ``fractype'' for long long - shifts. - -2001-12-11 Richard Henderson - - * config/alpha/alpha.h (TARGET_FIXUP_EV5_PREFETCH): New. - * config/alpha/linux.h (TARGET_FIXUP_EV5_PREFETCH): New. - * config/alpha/alpha.md (prefetch): New. - -2001-12-11 Richard Henderson - - * combine.c (simplify_and_const_int): Simplify (AND (PLUS X Y) C) - if C has only low bits set and doesn't intersect with X or Y. - -Tue Dec 11 23:58:39 EST 2001 John Wehle (john@feith.com) - - * basic-block.h (flow_preorder_transversal_compute): Declare. - * cfganal.c (flow_preorder_transversal_compute): Implement. - -Tue Dec 11 23:54:27 EST 2001 John Wehle (john@feith.com) - - * cfganal.c (flow_depth_first_order_compute): Always - increment dfsnum. - -2001-11-30 Alan Matsuoka - - * combine.c (combine_simplify_rtx) : Can't simplify - cases that use mode class MODE_CC. - -2001-12-11 Richard Henderson - - * expmed.c (expand_divmod): Ignore sdiv_pow2_cheap for modes in - which there is no divide expander. - -2001-12-11 Richard Henderson - - * except.c (sjlj_find_directly_reachable_regions): Don't - consider RNL_BLOCKED a directly reachable region. - (sjlj_assign_call_site_values): Trust directly_reachable. - (sjlj_emit_dispatch_table): Likewise. - -2001-12-11 Richard Henderson - - * config/alpha/alpha.md (divmodsi_internal_er): Split, so that - we represent the address load's dependency on the gp. - (divmoddi_internal_er): Likewise. - (divmodsi_internal_er_1, divmoddi_internal_er_1): New. - -2001-12-11 Richard Henderson - - * emit-rtl.c (widen_memory_access): New. - * expr.h (widen_memory_access): Declare it. - * config/alpha/alpha.c (get_aligned_mem): Use it. - -2001-12-11 Richard Henderson - - * combine.c (simplify_shift_const): Move SHIFT_COUNT_TRUNCATED - simplification above out of range check. - -2001-12-11 Dan Nicolaescu - - * config/sparc/sparc.md (prefetch): New. - -2001-12-11 Aldy Hernandez - - * output.h (regno_uninitialized): Make argument unsigned. - - * flow.c (regno_uninitialized): Make regno unsigned. - -2001-12-11 David O'Brien - - * elfos.h (ENDFILE_SPEC, STARTFILE_SPEC): Do not define. - * config/cris/cris.h (ENDFILE_SPEC): Define. - * config/i386/i386elf.h ((ENDFILE_SPEC, STARTFILE_SPEC): Define. - * config/pa/elf.h: Likewise. - -2001-12-11 Richard Henderson - - * objc/objc-act.c (build_string_class_template): New. - (build_objc_string_object): Call it. - -2001-12-11 Steve Ellcey - - * doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): New. - * defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): New. - * calls.c (store_unaligned_arguments_into_pseudos): Check - FUNCTION_ARG_REG_LITTLE_ENDIAN to see how structures - are passed/returned. - * expr.c (move_block_from_reg): Ditto. - (move_block_from_reg): Ditto. - (copy_blkmode_from_reg): Ditto. - * stmt.c (expand_return): Ditto. - * stor-layout.c (compute_record_mode): If - FUNCTION_ARG_REG_LITTLE_ENDIAN is set then check - MEMBER_TYPE_FORCES_BLK even if mode == VOIDmode. - * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Set to true - so that Structures of one field are still treated as structures. - (FUNCTION_ARG_REG_LITTLE_ENDIAN): New, set it to true. - (FUNCTION_ARG_PADDING): Set to ia64_hpux_function_arg_padding(). - (PAD_VARARGS_DOWN): Modify from default to not pad structures down. - * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): New. - * config/ia64/ia64.c (ia64_hpux_function_arg_padding): New function - to special case handling of structure padding. - -2001-12-11 Daniel Berlin - - * sched-rgn.c (CONST_BASED_ADDRESS_P): CONST_INT -> CONSTANT_P. - (may_trap_exp): Stores only are risk if they trap, too, not just - if code == MEM. - -2001-12-11 Aldy Hernandez - - * flow.c (find_regno_partial): Indent properly. Add a default to - switch. - -2001-12-11 Neil Booth - - * c-common.c (combine_strings): Complain if concatenating - __FUNCTION__. - * c-parse.in (yylexname): Flag artificial strings. - * tree.h (TREE_ARTIFICIAL_STRING_P): New. -doc: - * extend.texi: Update. - -2001-12-11 Aldy Hernandez - - * c-common.c (type_for_mode): Handle unsigned vectors. - (type_for_mode): Remove redundant calls to TYPE_MODE. - - * tree.c (make_vector): New. - (build_common_tree_nodes_2): Use make_vector for vector types. - Add unsigned vector types. - - * tree.h (tree_index): Add unsigned types for vectors. - (unsigned_V16QI_type_node): New. - (unsigned_V4SI_type_node): New. - (unsigned_V8QI_type_node): New. - (unsigned_V8HI_type_node): New. - (unsigned_V4HI_type_node): New. - (unsigned_V2SI_type_node): New. - -2001-12-11 Stan Shebs - - * objc/objc-act.c (finish_message_expr): Fix misplaced parens in a - test of class names. - -2001-12-11 David O'Brien - - * config.gcc (m68020-*-elf*): Expand tm_file to include all needed - cpu configuration headers. - * config/h8300/elf.h: Include dbxelf.h. - * config/m68k/linux.h: Likewise. - * config/m68k/m68020-elf.h: Likewise. - * config/m68k/m68kv4.h: Likewise. - * config/sh/elf.h: Likewise. - * config/m68k/m68kemb.h: Add comment about the its purpose. - -2001-12-11 Richard Henderson - - * objc/objc-act.c (build_constructor): Cast initializer values - to the proper field types. - -2001-12-11 Jakub Jelinek - - * unwind-dw2.c (execute_cfa_program): Fix DW_CFA_restore handling. - -2001-12-10 Roger Sayle - - * builtins.c (expand_builtin): Use a switch statement to list - those functions not expanded without optimizations, instead of a - series of equality tests. - -Tue Dec 11 07:08:57 2001 Douglas B. Rupp - - * config/alpha/vms.h (LIB_SPEC): Define. - * config/alpha/xm-vms.h (INCLUDE_DEFAULTS): Don't set component field. - - * libgcc2.c (_bb): Remove ctime declaration. - - * Makefile.in (stage[1234]-start): $(LN_S) utilities in a manner - that works if LN_S = cp. - - * config/alpha/x-vms (version): Change "." to "_". - - * configure.in: Hardcode that vfork works on VMS host. - * configure: Regenerated. - -Mon Dec 10 18:37:31 2001 Douglas B. Rupp - - * gcc.c (convert_filename): Add do_obj parameter. Don't convert - unless do_obj true. - (process_command): Modify calls to convert_filename. - -2001-12-11 Rainer Orth - - * config/sparc/sol2-sld-64.h: Include dbxelf.h again. - -Mon Dec 10 15:54:27 2001 Jeffrey A Law (law@cygnus.com) - - * combine.c (known_cond): Check mode of each operand to determine - if COND is comparing floating point values. - -2001-12-10 David Edelsohn - - * rs6000.h (processor_type): Add PPC405. - (RTX_COSTS): Add PPC405. Correct rs64 and ppc630 multiply costs. - * rs6000.md: Add PPC405 information. Utilize imul2 and imul3 for - rios1, rs64, and ppc630 processors. - * rs6000.c (processor_target_table): Add PPC405. - -2001-12-10 Richard Henderson - - * config/alpha/alpha.md (unaligned_extendhidi): Call gen_lowpart - instead of hardcoding subregs into the _be and _le patterns. - -2001-12-10 Neil Booth - - * c-lex.c, c-parse.in, c-typeck.c: Revert concatenation changes. - -Mon Dec 10 09:19:11 2001 Richard Kenner - - * config/i386/i386.md (leave, leave_rex64): Adjust pattern to match - what insn does. - -2001-12-10 Joseph S. Myers - - * doc/cpp.texi: Don't condition menus on @ifinfo. Condition the - copyright notice formerly conditioned on @ifinfo on @ifnottex - instead. - -Mon Dec 10 06:15:44 2001 Richard Kenner - - * vmsdbgout.c (lookup_filename): Remove warning. - -Mon Dec 10 06:09:57 2001 Douglas B. Rupp - - * Makefile.in: Add $(OUTPUT_OPTION) to compilation rules. - - * config.gcc (alpha*-dec-vms*): Change to alpha*-dec-*vms* - (exeext, target_alias, prefix, local_prefix): Define. - * config/alpha/x-vms (USE_COLLECT2): Make empty. - * config/alpha/xm-vms.h (INCLUDE_DEFAULTS): Use Unix style - file specifications. Remove ".". - (GCC_INCLUDE_DIR): Remove redefinition (redundant). - * fixinc/mkfixinc.sh (alpha*-dec-vms*): Change to alpha*-dec-*vms* - -2001-12-09 Nathan Sidwell - - * Makefile.in (.po.gmo): Use POSIXLY_CORRECT argument ordering. - -Sun Dec 9 21:57:24 2001 Douglas B. Rupp - - * config/alpha/t-vms (EXTRA_PARTS): Append $(VMS_EXTRA_PARTS) - Add rules for building [vp]crt0.o - * config/alpha/vms.h (START_FILE_SPEC): Define. - * config/alpha/x-vms (VMS_EXTRA_PARTS): Define - * config/alpha/vms-crt0.c, config/alpha/vms-psxcrt0.c: New files. - * doc/invoke.texi: Document special Alpha/VMS options. - -Sun Dec 9 20:25:17 2001 Richard Kenner - - * hwint.h (HOST_BITS_PER_LONGLONG): Deal with __int64 type. - * vmsdbg.h (DST_SRC_COMMAND): Test for type of long long or __int64, - not GNUC. - -Sun Dec 9 20:19:32 2001 Richard Kenner - Douglas B. Rupp - - * tree.c (append_random_char): Conditionalize INO for VMS. - -2001-12-09 Richard Henderson - - * cfgcleanup.c (label_is_jump_target_p): New function. - (try_optimize_cfg): Use label_is_jump_target_p to check if label is - target of a JUMP_INSN from the preceding block. - -Sun Dec 9 18:40:07 2001 Douglas B. Rupp - - * vmsdbgout.c (lookup_filename): Assign null string instead - of null pointer to fnam. - -2001-12-09 Richard Henderson - - * config/alpha/alpha.c (alpha_align_insns): Suppress realignment - immediately after a call; insert nops before a call. - -2001-12-09 Richard Henderson - - * config/alpha/alpha.c (alpha_align_insns): Use align_functions, - not FUNCTION_BOUNDARY. - * config/alpha/alpha.h (TRAMPOLINE_ALIGNMENT): New. - * config/alpha/alpha32.h, config/alpha/vms.h: Likewise. - * config/alpha/unicosmk.h (FUNCTION_BOUNDARY): Remove. - -2001-12-09 Hans-Peter Nilsson - - * config/mmix/mmix.c (mmix_function_block_profiler, - mmix_block_profiler, mmix_function_block_profiler_exit): Delete - unused functions. - * config/mmix/mmix-protos.h (mmix_function_block_profiler, - mmix_block_profiler, mmix_function_block_profiler_exit): Delete - prototypes. - - * config/cris/cris.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): - Delete obsoleted macros. - -2001-12-09 Joseph S. Myers - - * doc/cpp.texi, doc/cppinternals.texi, doc/invoke.texi, - doc/md.texi, doc/rtl.texi, doc/tm.texi: Use American spelling. - - * ChangeLog.2, ChangeLog.3, ChangeLog.5, ChangeLog, alias.c, - cfgbuild.c, expmed.c, expr.c, final.c, flow.c, fold-const.c, - function.c, config/alpha/alpha.md, config/alpha/vms-ld.c, - config/arm/arm.c, config/arm/arm.h, config/c4x/libgcc.S, - config/i370/i370.c, config/i386/i386.c, - config/i386/i386-interix.h, config/i386/i386.md, - config/i386/i386.h, config/i386/netbsd-elf.h, config/ia64/ia64.c, - config/m32r/m32r-protos.h, config/mcore/mcore.h, - config/rs6000/rs6000.h, config/sparc/linux64.h, - config/sparc/sparc.c, config/v850/v850-protos.h, - config/cris/cris.h, config/s390/s390.md, config/elfos.h: Fix - spelling errors. - -2001-12-09 Daniel Berlin - - * config/rs6000/rs6000.h (enum rs6000_builtins): Add remaining - altivec builtins (VCF?X, VCT?XS, VSEL, V*EFP, VRFI*). - - * config/rs6000/rs6000.c: Ditto. - - * config/rs6000/rs6000.md: Ditto. - -2001-12-09 Kaveh R. Ghazi - - * 1750a.md: Add default case in switch. - * alpha/vms.h (INITIAL_ELIMINATION_OFFSET): Add abort clause in - if-else statement. - * dsp16xx.c (print_operand_address): Likewise. - * i386/osf1elf.h (FUNCTION_PROFILER): Const-ify. - * ia64.md: Add missing braces. - * rs6000-protos.h (s8bit_cint_operand): Prototype. - * s390.h (INITIAL_ELIMINATION_OFFSET): Add abort clause in - if-else statement. - * stormy16.h (REG_CLASS_CONTENTS): Add missing braces. - * v850.h (OUTPUT_ADDR_CONST_EXTRA): Don't issue a `return'. - * dbxout.c (dbxout_source_file): Move a variable into the scope - where it is used. - * final.c (profile_function): Mark parameter with - ATTRIBUTE_UNUSED. - * genemit.c (gen_expand): Likewise for generated file. - * insn-addr.h (INSN_ADDRESSES_NEW): Avoid undefined behavior. - - * vmsdbg.h: Delete spurious close-comment. - (DST_HEADER): Fix typo in ENUM_BITFIELD parameter. - * vmsdbgout.c (write_modbeg): Define return type. - - * m68k/3b1.h (ASM_OUTPUT_ALIGN): Wrap in do-while(0). - * m68k/amix.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * m68k/atari.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * m68k/hp320.h (ASM_OUTPUT_ALIGN): Likewise. - * m68k/m68kelf.h (ASM_OUTPUT_ALIGN): Likewise. - * m68k/sgs.h (ASM_OUTPUT_ALIGN): Likewise. - * m68k/tower-as.h (ASM_OUTPUT_ALIGN): Likewise. - -2001-12-08 Tom Rix - - * config/rs6000/aix43.h (NON_POWERPC_MASKS): Delete MASK_STRING. - * config/rs6000/aix51.h (NON_POWERPC_MASKS): Same. - * config/rs6000/rs6000.md (load_multiple, store_multiple): Do not use - for powerpc64. - * config/rs6000/rs6000.md (movstrsi_8reg, movstrsi_6reg, - movstrsi_4reg, movstrsi_1_reg): Add powerpc64. - * config/rs6000/rs6000.c (expand_block_move): Do not use - gen_movstrsi_2reg and powerpc64. - -2001-10-08 Aldy Hernandez - - * c-common.h (rid): Add RID_CHOOSE_EXPR and - RID_TYPES_COMPATIBLE_P. - - * c-parse.in (reswords): Add __builtin_choose_expr. - Add __builtin_types_compatible_p. - Add CHOOSE_EXPR token. - Add TYPES_COMPATIBLE_P token. - Add production for CHOOSE_EXPR. - Add production for TYPES_COMPATIBLE_P. - - * doc/extend.texi (__builtin_choose_expr): Add documentation. - (__builtin_types_compatible_p): Likewise. - -2001-12-08 David Edelsohn - - * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN - to unions. - -2001-12-08 Neil Booth - - * c-parse.in: Take string literals in assembler constructs, - not expressions. - * c-typeck.c (build_asm_stmt, simple_asm_stmt): No need to - check the strings are STRING_CSTs. - -2001-12-08 Neil Booth - - * c-lex.c (c_lex): Peek a token ahead for a string to concatenate, - using combine_strings to do the concatenation. - * c-parse.in: Replace uses of the string non-terminal with STRING. - Don't attempt string concatenation. - (OBJC_STRING): New terminal. - (string): Remove non-terminal. - (_yylex): Call combine_strings on function names. Generate - OBJC_STRING terminals; don't pass '@' on to yacc. - * c-typeck.c (simple_asm_stmt): Don't concatenate strings here. - (build_asm_stmt): Similarly. - -2001-12-08 Kaveh R. Ghazi - - * rtlanal.c (get_jump_table_offset): Delete unused variable. - -2001-12-08 Richard Earnshaw - - * arm.md (VUNSPEC_PREFETCH): Delete constant definition. - (prefetch): Rewrite using PREFETCH RTL primitive. - * arm.h (arm_builtins): Delete ARM_BUILTIN_PREFETCH). - * arm.c (arm_init_builtins): Don't initialize a builtin for - __builtin_prefetch here. - (arm_expand_builtin): Don't expand __builtin_prefetch here. - -2001-12-08 Richard Earnshaw - - * final.c (cleanup_subreg_operands): Use recog_data.operand_loc - in test for a subreg. - -2001-12-08 John David Anglin - - * rtl.c (rtx_equal_p): Check for null pointers when comparing rtx - strings. - -2001-12-07 Richard Henderson - - * doc/extend.texi: Fix typo last change. - - * c-decl.c (c_language): Remove duplicate. - -2001-12-07 Dale Johannesen - - * config/rs6000/darwin.h: Set MAX_LONG_TYPE_SIZE to 32. - * config/rs6000/rs6000.c (rs6000_emit_move): In Darwin- - specific codegen, eliminate a register copy. - (print_operand_address): Add support for Darwin's lo16(constant) - syntax. - (rs6000_machopic_legitimize_pic_address): Fix darwin-specific - generation of addresses within very large data objects. - (s8bit_cint_operand): New. - * config/rs6000/rs6000.md: Remove "iu" reference for 750/7400. - Move "mtjmpr" to correct functional unit for 750/7400/7450. - Add imul2 and imul3 insn types for multiplication by 16- and - 8-bit constants. - Change tablejump patterns to strongly discourage using LR - rather than CTR. - Add %lo16 patterns for Darwin loads and stores. - -2001-12-07 Kaveh R. Ghazi - - * alpha.md: Use (HOST_WIDE_INT)1<<63 in lieu of 0x8000000000000000. - -2001-12-07 Stephane Carrez - - * config/sparc/sparc.c (epilogue_renumber): Do not replace %fp - with %sp because it can cause the delayed instruction to load - below the stack. - -2001-12-07 Kaveh R. Ghazi - - * alpha.c (alpha_expand_unaligned_store, - alpha_expand_unaligned_store_words): Use constm1_rtx in place of - call to immed_double_const. - -2001-12-07 Aldy Hernandez - - * doc/extend.texi (Variable Attributes): Document vector_size. - - * attribs.c (c_common_attribute_table): Add vector_size. - (handle_vector_size_attribute): New. - (vector_size_helper): New. - (decl_attributes): Relayout the decl after calculating attribs. - -2001-12-07 Joseph S. Myers - - * doc/gcc.texi: Don't include install-old.texi. Adjust menu - description for Trouble section. - * doc/install-old.texi: Adjust for inclusion as chapter of new - installation manual. - * doc/install.texi, doc/include/fdl.texi, doc/install.texi2html: - Adjust to include old installation chapter as chapter of new - installation manual. - -Fri Dec 7 11:07:35 EST 2001 John Wehle (john@feith.com) - - * rtl.h (get_jump_table_offset): Declare. - * rtlanal.c (get_jump_table_offset): Implement. - -Fri Dec 7 07:06:17 2001 Richard Kenner - - * final.c (bb_head, bb_tail, bb_file_label_num, bb_func_label_num): - Deleted; were used only by BB profiler code. - (sbb_head, sbb_tail, sbb_label_num): Likewise. - (end_final): Delete now-unused vars I, PTR, and SPTR. - - * expr.c (store_field): Remove warning. - (expand_expr, case COMPONENT_REF, case VIEW_CONVERT_EXPR): Likewise. - (highest_pow2_factor, case MIN_EXPR, case MAX_EXPR): Add cases. - (highest_pow2_factor, case *_DIV_EXPR): Only can do something if - divisor constant power of 2. - (highest_pow2_factor, case COMPOUND_EXPR): Look at operand 1. - -2001-12-07 Kaveh R. Ghazi - - * alpha.c (function_arg): Cast value to HOST_WIDE_INT before - shifting. - -2001-12-06 Aldy Hernandez - - * rs6000.h (PRE_GCC3_DWARF_FRAME_REGISTERS): New. - (DWARF_FRAME_REGISTERS): Delete. - -2001-12-06 Janis Johnson - - * builtin-types.def (BT_FN_VOID_PTR_VAR): New. - * builtins.def (BUILT_IN_PREFETCH): Change arguments. - * builtins.c (expand_builtin_prefetch): Two arguments are now optional, - with defaults for read prefetch with high degree of locality. - * doc/extend.texi (__builtin_prefetch): Update documentation. - * doc/md.texi (prefetch): Add documentation. - -2001-12-06 Rainer Orth - - * fixinc/inclhack.def (stdio_va_list): Handle __VA_LIST__ in Tru64 - UNIX V5.1A stdio.h. - * fixinc/fixincl.x: Regenerate. - Fixes PR libf2c/4826. - -2001-12-06 Aldy Hernandez - Richard Henderson - - * doc/tm.texi (DWARF_FRAME_REGISTERS): Add documentation. - (PRE_GCC3_DWARF_FRAME_REGISTERS): Same. - - * unwind-dw2.c (__frame_state_for): Change DWARF_FRAME_REGISTERS - to PRE_GCC3_DWARF_FRAME_REGISTERS. - (frame_state): Same. - (PRE_GCC3_DWARF_FRAME_REGISTERS): Define if not already defined. - -2001-12-06 Kaveh R. Ghazi - - * langhooks.c (lhd_staticp): Mark parameter with - ATTRIBUTE_UNUSED. - -2001-12-06 H.J. Lu - - * Makefile.in (.po.gmo): Use "-test -d po || mkdir po" to - reduce noise. - (.po.pox): Likewise. - (o/$(PACKAGE).pot): Likewise. - -2001-12-06 Alexandre Oliva - - * tree.c (get_callee_fndecl): Move DECL_ABSTRACT_ORIGIN-following... - * tree-inline.c (expand_call_inline): ... here. - -2001-12-06 H.J. Lu - - * Makefile.in (.po.gmo): Use "-mkdir po" for parallel build. - (.po.pox): Likewise. - (o/$(PACKAGE).pot): Likewise. - -2001-12-06 David O'Brien - - * config.gcc: Include dbxelf.h before elfos.h. - * elfos.h: Don't include dbxelf.h, let config.gcc handle it. - -2001-12-06 Zack Weinberg - - * cppfiles.c (open_file): If we've opened a directory by - mistake, close it. - (find_include_file): Avoid turning / into // or // into ///. - -2001-12-06 Nick Clifton - - * config/arm/arm.h (STRUCT_VALUE): Suppress definition. - (STRUCT_VALUE_REGNUM): Restore definition. - -2001-12-06 Andrew MacLeod - - * flow.c (find_regno_partial): Return register, not the expression - the register is in. - -Thu Dec 6 09:24:12 2001 Richard Kenner - - * function.c (handle_epilogue_set): Check for FP setting case when - SP is set from FP in same insn. - -2001-12-06 Nick Clifton - - * config/arm/arm.c (load_multiple_sequence): Pass pointer to - RTX when calling alter_subreg(). - (store_multiple_sequence): Pass pointer to RTX when calling - alter_subreg(). - -Thu Dec 6 06:55:13 2001 Richard Kenner - - * function.c (assing_parms): Fix typo in last change. - * config/clipper.c (clipper_builtin_saveregs): Remove Checker code. - * config/m88k/m88k.c (m88k_builtin_saveregs): Likewise. - * config/pa/pa.c (hppa_builtin_saveregs): Likewise. - * config/sparc/sparc.c (sparc_builtin_saveregs): Likewise. - -2001-12-06 Alan Modra - - * config/rs6000/rs6000.c (rs6000_unique_section): Simplify and - correct code selecting section. - -Thu Dec 6 12:45:33 CET 2001 Jan Hubicka - - * final.c (count_basic_block, add_bb, add_bb_string): - Kill. - (end_final, final_start_function, final, final_scan_insn, - leaf_function_p): Kill BB profiler related code. - * flags.h (profile_block_flag): Kill. - * libgcc2.c (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE, - BB_BUCKETS, BBINBUFSIZE, bb_edge, bb_func_mode, bb_func, - __bb, bb_src, bb_dst, bb_tracefile, bb_hashbuckets, - bb_func_head, bb_callcount, bb_mode, bb_stack, bb_stacksize - reported, GOPENDECOMPRESS, GOPENCOMPRESS, gopen, gclose, - __bb_exit_trace_func, __bb_init_prg, __bb_trace_func, - __bb_trace_func_ret, __bb_init_file, __bb_trace_ret, - __bb_init_trace_func): Kill. - * toplev.c (profile_block_flag): Kill. - (indepdendent_decode_option, process_options): Kill -a related code. - * alpha.c (direct_call_operand): Likewise. - * arm.c (arm_expand_prologue, thumb_expand_prologue, - thumb_expand_epilogue): Likewise. - * c4x.c (c4x_expand_prologue, c4x_null_epilogue_p): Likewise. - * c4x.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * d30v.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * fr30.c (fr30_expand_prologue): Kill BB profiler related code. - * i386.c (ix86_can_use_return_insn_p, ix86_expand_prologue, - ix86_expand_epilogue, ix86_expand_epilogue): Kill BB profiler related - code. - (ix86_output_function_block_profiler, ix86_output_block_profiler): Kill. - * i386.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * fr30.c (fr30_expand_prologue): Kill BB profiler related code. - * i960.c (i960_output_function_prologue): Kill BB profiler related - code. - * ia64.c (ia64_compute_frame_size): Likewise. - * ia64.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * m32r.c (m32r_expand_prolofue): Kill BB profiler related code. - * m68hc11.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * m68k.c (m68k_output_function_epilogue): Kill BB profiler related code. - * m68k.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * m88k.c (output_options, m88k_layout_frame, m88k_expand_prologue): - Kill BB profiler related code. - * m88k.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * mips.c (mips_expand_prologue): Kill BB profiler related code. - * mmix.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * rs6000.c (rs6000_override_options): Kill BB profiler related code. - * s960.c (s390_function_prologue): Kill BB profiler related code. - * s960.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * linux-aout.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill. - * linux.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill. - * linux64.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill. - * sol2.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill. - * sparc.c (sparc_override_options, eligible_for_sibcall_delay, - sparc_nonflat_function_epilogue): Kill BB profiler related code. - (sparc_function_block_profiler, sparc_block_profiler, - sparc_function_block_profiler_exit): Kill. - * sparc.h (OVERRIDE_OPTIONS): Kill BB profiler related code. - (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * sun4o3.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill. - * sunos4.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill. - * stormy16.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - * doc/invoke.texi: Kill documentation of -a and -ax. - * tm.texi (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER, - FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE, - MACHINE_STATE_RESTORE): Kill. - -2001-10-26 Steve Christiansen - - * doc/rtl.texi: Use a table to display RTL format characters. - -2001-12-06 Bo Thorsen - - * config/i386/linux64.h (LINK_SPEC): Correct name of dynamic linker. - -Wed Dec 5 19:18:53 2001 Richard Kenner - - * function.c (keep_stack_depressed): Check global_live_at_start - of EXIT_BLOCK for temp register and verify it isn't in equiv_reg_src. - -2001-12-05 David O'Brien - - * config.gcc (powerpc-*-freebsd*): Use the proper tmake_file files, - as set by the generic FreeBSD configure framework. - -2001-12-04 Jason Merrill - - * langhooks.h (struct lang_hooks_for_tree_inlining): Add - start_inlining, end_inlining. - * tree-inline.c (expand_call_inline): Call them. - * langhooks-def.h (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. - (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. - (LANG_HOOKS_TREE_INLINING_INITIALIZER): Add them. - * langhooks.c (lhd_tree_inlining_start_inlining): New fn. - (lhd_tree_inlining_end_inlining): New fn. - -2001-12-05 Neil Booth - - * c-common.c (shadow_warning): New function, moved from cp/decl.c. - * c-common.h (shadow_warning): New. - * c-decl.c: Include c-common.h. - (warn_if_shadowing): New, broken out of pushdecl. - (pushdecl): Use warn_if_shadowing. - (store_parm_decls): Prevent duplicate -Wshadow warnings. - -Wed Dec 5 17:59:19 2001 Douglas B. Rupp - - * config/alpha/vms.h (SIZE_TYPE, PTRDIFF_TYPE): Remove, were disabled. - (DOLLARS_IN_IDENTIFIERS, LINK_SPEC): Remove duplicate. - (LIB_SPEC): Remove. - -Wed Dec 5 16:03:04 2001 Richard Kenner - - * doc/c-tree.texi (RECORD_TYPE, UNION_TYPE): Expand on definition. - (QUAL_UNION_TYPE): New type. - - * varasm.c (output_constant, case ERROR_MARK): New case. - - * attribs.c (handle_no_check_memory_usage_atribute): Deleted. - (c_com): Delete its reference. - * builtins.c: Delete memory checking code. - * calls.c, expr.c, function.c, stmt.c: Likewise. - * builtins.c (expand_builtin_arg_info): Remove reference to - EXPAND_MEMORY_USE_* modifiers. - * explow.c (expr_size): Likewise. - * expr.c (expand_expr, expand_increment): Likewise. - * expr.h (ARGS_SIZE_RTX): Likewise. - * function.c (assign_parms, expand_pending_sizeso): Likewise. - * c-decl.c (duplicate_decls): Don't handle DECL_NO_CHECK_MEMORY_USAGE. - * expr.c (in_check_memory_usage): Delete. - (get_push_address, get_memory_usage_from_modifier): Delete. - (expand_assigment): Use EXPAND_WRITE on destination. - (expand_expr): Delete ro_modifier. - * expr.h (expand_modifier): Delete EXPAND_MEMORY_* entries and - add EXPAND_WRITE. - (memory_use_mode): Delete. - * flags.h (flag_check_memory_usage): Deleted. - (flag_prefix_function_name): Likewise. - * function.c (expand_function_start): Don't set - current_function_check_memory_usage. - * function.h (check_memory_usage): Delete. - * libfuncs.h, optabs.c: Delete chkr_* stuff. - * stmt.c (expand_asm_opernd): Change EXPAND_MEMORY_USE_WO to - EXPAND_WRITE. - * toplev.c (flag_check_memory_usage): Deleted. - (flag_prefix_function_name): Likewise. - (f_options, process_options): Delete references to above. - * tree.h (DECL_NO_CHECK_MEMORY_USAGE): Deleted. - * varasm.c (CHKR_PREFIX): Deleted. - (make_decl_rtl): Remove flag_prefix_function_name handling. - (assemble_name): Likewise. - * doc/extend.texi: Remove no_check_memory_usage attribute. - * doc/invoke.texi: Remove -fcheck-memory-usage - and -fprefix-function-name. - -2001-12-05 Andreas Schwab - - * Makefile.in (STMP_FIXPROTO, STMP_FIXINC): Use substituted values - from autoconf. - -2001-12-05 Nick Clifton - - * config.gcc: Include arm/xscale-coff.h before arm/arm.h. - -2001-12-05 William Cohen - - * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Correct typo in - instruction. - -2001-12-05 Daniel Berlin - - * config/rs6000/rs6000.h (enum rs6000_builtins): Add more altivec - builtins. - - * config/rs6000/rs6000.md: Modeling of 7450 altivec changed to - better reflect reality (change from Apple's tree). - Add more of altivec instructions. - Add ftruncv4sf2 pattern. - Remove more unspecs (vector merge instructions, etc). - - * config/rs6000/rs6000.c (bdesc_3arg): New, for 3 argument altivec - builtins. - (bdesc_1arg): New, for 1 argument altivec builtins. - (altivec_expand_builtin): Handle unary and ternary ops. - (altivec_init_builtins): Ditto. - -Wed Dec 5 09:33:39 2001 Richard Kenner - - * config/alpha/vms.h (ADA_LONG_TYPE_SIZE): New macro. - * doc/tm.texi (ADA_LONG_TYPE_SIZE): Document it. - -2001-12-05 Jakub Jelinek - - * gcse.c (store_killed_in_insn): Consider pure calls - as potential store killers in addition to normal calls. - -2001-12-05 Jakub Jelinek - - * expr.c (expand_expr): When checking promoted value, use - DECL_MODE (exp) and not mode. - -2001-12-05 Jakub Jelinek - - * c-typeck.c (output_init_element): Call digest_init - just once, not in each if branch and check its return value for - error_mark_node. - -2001-12-05 Jakub Jelinek - - * c-decl.c (pushdecl): Only increase n_incomplete if pushed decl's - type is RECORD_TYPE, UNION_TYPE or ARRAY_TYPE thereof. - (finish_struct): Break the loop if n_incomplete went to 0. - For ARRAY_TYPE, if it is not TYPE_DECL, layout the decl too. - -Wed Dec 5 07:41:13 2001 Douglas B. Rupp - - * config/alpha/alpha.c (alpha_va_start): Update VMS case. - -Wed Dec 5 07:27:42 2001 Richard Kenner - Douglas B. Rupp - - * vmsdbg.h, vmsdbgout.c: Add documentation and minor cleanups. - * doc/invoke.texi: Add -gvms. - * doc/passes.texi: Add mention of vmsdbgout.c. - * doc/tm.texi: Document VMS debugging output. - -Wed Dec 5 06:26:27 2001 Richard Kenner - - * function.h (tree, rtx): Remove no-longer-needed definitions. - - * function.c (keep_stack_depressed): Refine check for register - clobbered over call. - - * expr.c (store_expr): When copying string constant into array, - use functions that update memrefs instead of computations on - addresses to better track MEMs. Also properly handle 32/64 pointers. - (expand_expr): Use TARGET even if not reg for multi-word CONSTRUCTOR. - (expand_expr, case CONSTRUCTOR): Fix errors in parms to assign_temp. - - * emit-rtl.c (component_ref_for_mem_expr): Try harder to find decl - underneath COMPONENT_REFs. - (set_mem_attributes): Also strip VIEW_CONVERT_EXPR. - -2001-12-05 Neil Booth - - * toplev.c (display_target_options): Don't print twice. - -Wed Dec 5 00:42:16 EST 2001 John Wehle (john@feith.com) - - * emit-rtl.c (set_unique_reg_note): Don't set - a REG_EQUAL or REG_EQUIV note if multiple sets - are present. - -2001-12-04 John David Anglin - - * cfgrtl.c (verify_flow_info): Allow jump table data in fallthru if - CASE_DROPS_THROUGH. - -2001-12-04 Andrew MacLeod - - * rtl.h (initialize_uninitialized_subregs): New prototype. - * toplev.c (rest_of_compilation): Call initialize_uninitialized_subregs - when optimization is on. - * flow.c (find_regno_partial): Find subregs within an expression. - (initialize_uninitialized_subregs): Initialize live on entry registers - which are used in subreg expressions. - -2001-12-04 Phil Edwards - - * Makefile.in: Add INSTALL_SCRIPT using INSTALL definition. - -2001-12-04 DJ Delorie - - * fixinc/fixincl.c (initialize): Avoid problemsome macro - parameter names (PR 3388). - -2001-12-05 Alan Modra - - * config/rs6000/rs6000.c (rs6000_legitimize_address): Fix typo. - * config/rs6000/rs6000.h (LEGITIMATE_LO_SUM_ADDRESS_P): Here too. - -2001-12-04 Joseph S. Myers - - * c-common.def (COMPOUND_LITERAL_EXPR): New. - * c-common.c (c_expand_expr): Handle COMPOUND_LITERAL_EXPR. - (c_staticp): New function. - * c-common.h (COMPOUND_LITERAL_EXPR_DECL): New. - (c_staticp): Declare. - * c-typeck.c (default_function_array_conversion, build_unary_op): - Don't handle CONSTRUCTOR specially. - (lvalue_p, mark_addressable): Handle COMPOUND_LITERAL_EXPR. - * c-decl.c (build_compound_literal): New function. - * c-tree.h (build_compound_literal): Declare. - * c-parse.in (primary): Use build_compound_literal. - * c-lang.c (LANG_HOOKS_STATICP): Define. - * objc/objc-lang.c (LANG_HOOKS_STATICP): Likewise. - * doc/c-tree.texi: Document COMPOUND_LITERAL_EXPR. - * doc/extend.texi: Update documentation of compound literals. - Fixes PR c/4787. - -2001-12-04 Joseph S. Myers - - * langhooks.h (struct lang_hooks): Add staticp. - * langhooks-def.h (lhd_staticp, LANG_HOOKS_STATICP): New. - (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_STATICP. - * langhooks.c (lhd_staticp): New function. - * tree.c (staticp): Call lang_hooks.staticp for language-specific - tree codes. - -2001-12-04 Neil Booth - - * cppspec.c (lang_specific_driver): Set is_cpp_driver. - * gcc.c (process_command): Ensure the cpp driver sees - --help and --target-help, and that the help is printed - exactly once. - -2001-12-04 David Edelsohn - - * config/elfos.h (ASM_OUTPUT_INTERNAL_LABEL): Display count unsigned. - -2001-12-04 Hans-Peter Nilsson - - * config/cris/cris.h (OPTIMIZATION_OPTIONS): Don't unset - flag_strict_aliasing. Use separate assignment statements. - -2001-12-04 Zack Weinberg - - * build-make, cross-make: Delete file. - * configure.in: Set and substitute CROSS, ALL, - SYSTEM_HEADER_DIR, HOST_PREFIX, HOST_PREFIX_1, HOST_CC, - HOST_CFLAGS, STMP_FIXINC, and STMP_FIXPROTO depending on - whether build == host and host == target. Do not - AC_SUBST_FILE build_overrides or cross_overrides. Do not - AC_SUBST cross_defines or extra_c_flags. - * Makefile.in (NATIVE_SYSTEM_HEADER_DIR): New. - (SYSTEM_HEADER_DIR, HOST_PREFIX, HOST_CC, HOST_PREFIX, - HOST_PREFIX_1, HOST_CFLAGS, ALL, INTERNAL_CFLAGS): Set - partially or completely with autoconf-substituted @variable@ - notation. - (INSTALL_TARGET, @cross_defines@, @cross_overrides@, - @build_overrides@, @extra_c_flags@, all.build, install-build, - install-cross-rest, install-float-h-cross): Deleted. - (install-normal): Rename to install. Delete old "install" - indirection rule. - -2001-12-04 Andrew MacLeod - - * stmt.c (expand_return): Clear destination instead of clobbering it - when setting a return value via bitsets. - -2001-12-04 Alexandre Oliva - - * tree.c (get_callee_fndecl): Only use DECL_ABSTRACT_ORIGIN if - it has DECL_SAVED_TREE. - - * c-decl.c (duplicate_decls): Revert rth's patch. If newdecl - is in a different binding level, get its abstract origin to be - olddecl. - * tree-inline.c (expand_call_inline): Move DECL_INITIAL sanity - check earlier. - * tree.c (get_callee_fndecl): Follow DECL_ABSTRACT_ORIGIN if - DECL_INITIAL is NULL. - -2001-12-04 Jakub Jelinek - - * flow.c (ior_reg_cond): Return NULL if ! add and rtx wasn't optimized. - Return correct value if one of the subexpressions was optimized to - 0 resp. 1. Optimize (x | A) | x and (x & A) | x. - (and_reg_cond): Similarly. - -2001-12-04 Jakub Jelinek - - * function.c (assign_parms): Set last_named only for last named - argument. - -2001-12-04 Joseph S. Myers - - * doc/install.texi: Use the GFDL. Include years from old install - manual in copyright notice. Include copyright and GFDL notice on - HTML index page. Include usual footer on testing.html. - * doc/install.texi2html: Build gfdl.html. Use -I - $SOURCEDIR/include. - * doc/include/fdl.texi: Adapt for use in the install manual. - -2001-12-04 Joseph S. Myers - - * doc/install.texi: Document that installed native compiler for - building cross compilers should be GCC 2.95 or later. - -2001-12-03 Eric Christopher - - * config/mips/mips.h (CALL_REALLY_USED_REGISTERS): New macro. - * config/mips/mips.md: Check TARGET_DEBUG_D_MODE before split - patterns. - -2001-12-03 Janis Johnson - - * rtl.def (PREFETCH): New rtx code. - * doc/rtl.texi (PREFETCH): Add documentation. - * function.c (instantiate_virtual_regs_1): Handle PREFETCH rtx. - * rtlanal.c (reg_referenced_p): Ditto. - * sched-vis.c (print_exp): Ditto. - * ssa-dce.c (find_inherently_necessary): Ditto. - - * config/ia64/ia64.h (SIMULTANEOUS PREFETCHES): Define. - (PREFETCH_BLOCK): Define. - * config/ia64/ia64.md (itanium_class): Add lfetch. - (prefetch, prefetch_internal): New. - - * builtin-types.def (BT_FN_VOID_PTR_INT_INT): New. - * builtins.def (BUILT_IN_PREFETCH): New. - * builtins.c (expand_builtin_expect): New. - (expand_builtin): Call it. - * doc/extend.texi: Document __builtin_prefetch. - - * config/i386/i386.md (prefetch): Rename as prefetch_sse to avoid - conflicts with new generic prefetch functionality. - * config/i386/i386.c (ix86_expand_builtin): Use new name for - prefetch_sse. - -2001-12-02 Ziemowit Laski - - * objc/Make-lang.in: Update copyright. - (OBJC_OBJS): Add objc-lang.o. - (objc-lang.o): New rule. - * objc/config-lang.in: Fix file description and update - copyright. - * objc/objc-act.c: Do not include langhooks.h and - langhooks-def.h - (lang_hooks): Move (along with LANG_HOOKS...) to objc-lang.c. - (objc_post_options): Move to objc-lang.c. - (objc_init_options): Move to objc-lang.c. - (objc_init): Make non-static. - (objc_decode_option): Make non-static. - (HASHFUNCTION): Remove macro. - (hash_func): New function. - (hash_enter): Replace HASHFUNCTION with hash_func. - (hash_lookup): Replace HASHFUNCTION with hash_func. - (maybe_objc_tree_codes): New function. - (init_objc): Move ObjC tree code initialization to - maybe_objc_tree_codes(). - * objc/objc-act.h (GCC_OBJC_ACT_H): New include guard. - (objc_init): New public prototype. - (objc_decode_option): New public prototype. - (maybe_add_objc_tree_codes): New public prototype. - * objc/objc-lang.c: New file. - (lang_hooks): Moved from objc-act.c. - (objc_post_options): Moved from objc-act.c. - (objc_init_options): Moved from objc-act.c. - -2001-12-03 Geoff Keating - - * emit-rtl.c (gen_lowpart_common): Avoid unwanted sign-extension - of array elements. - -2001-12-03 Neil Booth - - PR c/4988 - * gcc.c (process_command): Don't add a preprocessor option for - --help and --target-help; cc1 is enough. - -2001-12-03 Neil Booth - - * c-decl.c (grokdeclarator): Use ISO word. - * cppinit.c: Remove leading capital from diagnostic messages, as - per GNU coding standards. - * emit-rtl.c: Similarly. - * final.c: Similarly. - * gcc.c: Similarly. - * tradcpp.c: Similarly. - * config/arm/arm.c: Similarly. - * config/arm/arm.h: Similarly. - * config/avr/avr.c: Similarly. - * config/avr/avr.h: Similarly. - * config/c4x/c4x.c: Similarly. - * config/cris/cris.c: Similarly. - * config/cris/cris.h: Similarly. - * config/d30v/d30v.c: Similarly. - * config/dsp16xx/dsp16xx.c: Similarly. - * config/dsp16xx/dsp16xx.h: Similarly. - * config/h8300/h8300.c: Similarly. - * config/i386/i386.c: Similarly. - * config/i386/xm-djgpp.h: Similarly. - * config/i960/i960.h: Similarly. - * config/m32r/m32r.c: Similarly. - * config/m68hc11/m68hc11.c: Similarly. - * config/m88k/m88k.c: Similarly. - * config/m88k/m88k.h: Similarly. - * config/mcore/mcore.c: Similarly. - * config/mcore/mcore.h: Similarly. - * config/mips/mips.c: Similarly. - * config/mmix/mmix.c: Similarly. - * config/pa/pa.c: Similarly. - * config/rs6000/rs6000.c: Similarly. - * config/rs6000/sysv4.h: Similarly. - * config/s390/s390.c: Similarly. - * config/sparc/sparc.c: Similarly. - * config/v850/v850-c.c: Similarly. - * config/v850/v850.c: Similarly. - -2001-12-03 Zack Weinberg - - * rs6000.h (RETURN_IN_MEMORY): Cast result of - int_size_in_bytes to unsigned HOST_WIDEST_INT so that -1 > 8. - -Mon Dec 3 09:18:34 2001 Jeffrey A Law (law@cygnus.com) - - * mn10200.md (negsf2): Use -0x8000 instead of 0x8000 for - bit twiddling constant. - -Mon Dec 3 16:16:37 CET 2001 Jan Hubicka - - * gcse.c (delete_null_pointer_checks_1): Do not use delete_list; - call purge_dead_edges after removing. - (delete_null_pointer_checks): Do not handle delete_list. - - * cfgbuild.c (inside_basic_block_p, control_flow_insn_p): Break out from ... - (count_basic_blocks): ... here. - (find_basic_blocks, find_bb_boundaries): Cleanup. - - * stor-layout.c (fixup_signed_type, fixup_unsigned_type): Avoid - overflow for types greater then 2 * HOST_WIDE_INT. - - * reload.c (find_reloads): Update the duplicates after swapingg. - -Mon Dec 3 13:52:19 CET 2001 Jan Hubicka - - * i386.md (movabsqi*): Use 'b' prefix instead of 'q'. - -2001-12-02 Zack Weinberg - - * config/rs6000/rs6000.h (MASK_ALTIVEC_ABI, - MASK_LONG_DOUBLE_128): Delete. - (MASK_AIX_STRUCT_RET, MASK_AIX_STRUCT_RET_SET, - TARGET_AIX_STRUCT_RET): New flags. - (TARGET_SWITCHES): Remove entries for -mlong-double-128 and - -mlong-double-64. Add entries for -m(no-)aix-struct-return - and -m(no-)svr4-struct-return. - (TARGET_OPTIONS): Add entry for -mlong-double-. - (rs6000_long_double_size_string, rs6000_long_double_type_size, - rs6000_altivec_abi): Declare. - (TARGET_LONG_DOUBLE_128, TARGET_ALTIVEC_ABI, - LONG_DOUBLE_TYPE_SIZE): Change definitions to match. - (RETURN_IN_MEMORY): If !TARGET_AIX_STRUCT_RET, return - structures of size <= 8 bytes in registers. - (PRINT_OPERAND_PUNCT_VALID_P): Take out '$' and '*'. - - * config/rs6000/rs6000.c (rs6000_long_double_size_string, - rs6000_long_double_type_size, rs6000_altivec_abi): New - globals. - (rs6000_override_options): Set rs6000_long_double_type_size - from rs6000_long_double_size_string, if nonzero. Set the - MASK_AIX_STRUCT_RET bit in target_flags from DEFAULT_ABI, if - not already set. - (rs6000_parse_abi_options): Set rs6000_altivec_abi, not a - target_flags bit. - (rs6000_init_builtins): This hook now takes no arguments. - - * config/rs6000/netbsd.h, config/rs6000/linux.h: Define - DRAFT_V4_STRUCT_RET to 1. - -2001-12-03 Joseph S. Myers - - * c-typeck.c (really_start_incremental_init, push_init_level): - Avoid constructor_max_index being other than an INTEGER_CST. - -2001-12-02 David Edelsohn - - * config/rs6000/xcoff.h (ASM_OUTPUT_INTERNAL_LABEL): Display count - unsigned. - (ASM_GENERATE_INTERNAL_LABEL): Same. - (UNIQUE_SECTION): Fix typo. - -2001-12-02 Richard Henderson - - * c-decl.c (duplicate_decls): Conditionalize DECL_SAVED_TREE copy. - -2001-12-02 Richard Henderson - - * rtl.h (mem_attrs): Rename decl to expr; adjust all users. - (MEM_EXPR): Rename from MEM_DECL; adjust all users. - * emit-rtl.c (set_mem_expr): Rename from set_mem_decl. - * expr.h, final.c, reload1.c: Adjust users. - - * alias.c (nonoverlapping_component_refs_p): New. - (decl_for_component_ref, adjust_offset_for_component_ref): New. - (nonoverlapping_memrefs_p): Use them. - * emit-rtl.c (component_ref_for_mem_expr): New. - (set_mem_attributes): Use it. - (set_mem_offset): New. - * expr.c (expand_assignment): Call set_mem_attributes for - inner references; adjust the memory offset as needed. - * print-rtl.c (print_mem_expr): New. - (print_rtx): Use it. - -Sun Dec 2 09:22:25 2001 Douglas B. Rupp - - * config/x-interix3 (SYSTEM_HEADER_DIR): Put back default. - - * config/alpha/vms.h (VMS_DEBUGGING_INFO): New macro. - (PREFERRED_DEBUGGING_TYPE): Define as VMS_AND_DWARF2_DEBUG. - (ASM_SPEC): Don't redefine. - (OPTIMIZATION_OPTIONS, OVERRIDE_OPTIONS, LINK_SPEC): Define. - * config/alpha/t-vms (EXTRA_PARTS): Use; add rule for vms-dwarf2.asm. - * config/alpha/vms-dwarf2.asm: New file. - - * Makefile.in (OBJS): Add vmsdbgout.c and its rule. - * c-lex.c (init_c_lex): Test for VMS_AND_DWARF2_DEBUG. - * debug.h (gcc_debug_hooks): Add vmsdbg_debug_hooks. - (vmsdbgout_after_prologue): New declaration. - * defaults.h (VMS_DEBUGGING_INFO): Add to PREFERRED_DEBUGGING_TYPE. - * dwarf2.h (dwarf_attribute): New DW_AT_VMS_rtnbeg_pd_address. - * dwarf2out.c (dwarf2out_do_frame): Test for VMS_AND_DWARF2_DEBUG. - (dwarf2out_frame_finish): Test for VMS_AND_DWARF2_DEBUG. - (dwarf_attr_name): Use DW_AT_VMS_rtnbeg_pd_address. - (add_name_and_src_coords_attributes): Test VMS_DEBUGGING_INFO - * final.c (final_start_function): Test for VMS_AND_DWARF2_DEBUG. - Test VMS_DEBUGGING_INFO. - (final_end_function): Test for VMS_AND_DWARF2_DEBUG. - (final_scan_insn): Test for VMS_AND_DWARF2_DEBUG and VMS_DEBUG. - * flags.h (debug_info_type): Add VMS_DEBUG and VMS_AND_DWARF2_DEBUG. - * toplev.c (compile_file): Test VMS_DEBUGGING_INFO, VMS_DEBUG, and - VMS_AND_DWARF2_DEBUG. - (rest_of_type_compilation): Test for VMS_AND_DWARF2_DEBUG. - (decode_g_option): Add "vms" to debug_type_names. - (process_options): Set vmsdbg_debug_hooks if -gvms. - (lang_independent_init): Emit line number for VMS unless -g0. - * tree.c: (build_complex_type): Test for VMS_AND_DWARF2_DEBUG. - * vmsdbg.h, vmsdbgout.c: New files. - -Sun Dec 2 09:03:06 2001 Richard Kenner - - * cfgbuild.c (SET_STATE): Add cast to eliminate warning.a - -2001-12-02 Kaveh R. Ghazi - - * cfgrtl.c (purge_all_dead_edges): Initialize variable. - * dwarf2out.c (is_cxx): Prototype. - * local-alloc.c (block_alloc): Avoid 'unsigned>=0 is always true' - warning. - * objc/objc-act.c (defer_fn): Avoid signed/unsigned warning. - -Sun Dec 2 07:12:30 2001 Richard Kenner - - * libgcc2.c (__bb_exit_func): Fix line wrap problems. - -2001-12-02 Geoff Keating - - * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Simplify. - * config/rs6000/rs6000.c (rs6000_emit_move): Use adjust_address - rather than simplify_subreg. Check for volatile-ness. Check that - we're not splitting one slow operation into two slow operations. - -2001-12-02 David Edelsohn - - * emit-rtl.c (gen_lowpart_common): Cast array element to HOST_WIDE_INT - before shifting. - -2001-12-02 Neil Booth - - * c-decl.c (duplicate_decls, push_parm_decl): Remove leading - capital from diagnostics. - * c-lex.c (cb_file_change): Similarly. - * c-parse.in : Similarly. - * cfgrtl.c (verify_flow_info): Similarly. - * collect2.c: Similarly. - * cppfiles.c (find_include_file): Similarly. - * cppinit.c (cpp_handle_option): Similarly. - * cpplex.c (cpp_spell_token): Similarly. - * cppmain.c (do_preprocessing): Similarly. - * gcc.c (translate_options, process_command, do_spec1, - main, pfatal_execute): Similarly. - * genattr.c (main): Similarly. - * genattrtab.c (check_attr_test, operate_exp, simplify_test_exp, - write_test_expr, main): Similarly. - * gencodes.c (main): Similarly. - * genconfig.c (main): Similarly. - * genconstants.c (main): Similarly. - * genemit.c (main): Similarly. - * genextract.c (main): Similarly. - * genflags.c (main): Similarly. - * genopinit.c (main): Similarly. - * genoutput.c (process_template, main): Similarly. - * genpeep.c (main): Similarly. - * genrecog.c (main): Similarly. - * gensupport.c (is_predicable, identify_predicable_attribute, - alter_predicate_for_insn, init_md_reader_args, main): Similarly. - * ggc-page.c (alloc_anon): Similarly. - * mips-tfile.c (add_string, add_procedure, add_file, read_line, - parse_begin, parse_bend, parse_def, parse_end, parse_file, - parse_stabs_common, parse_stabs, write_varray, write_object, - read_seek, copy_object, main, error): Similarly. - * profile.c (compute_branch_probabilities): Similarly. - * reg-stack.c (check_asm_stack_operands): Similarly. - * reload.c (find_reloads): Similarly. - * reload1.c (spill_failure, failed_reload): Similarly. - * rtl-error.c (_fatal_insn_not_found): Similarly. - * toplev.c (read_integral_parameter, crash_signal, - decode_f_option, set_target_switch, parse_options_and_default_flags) - : Similarly. - * tradcif.y (parse_number, yylex): Similarly. - * tradcpp.c (main, fancy_abort): Similarly. - * tree.c (tree_check_failed): Similarly. - * varray.c (varray_check_failed): Similarly. - * xcoffout.c (xcoff_output_standard_types): Similarly. -objc: - * objc-act.c (get_object_ref, lookup_and_install_protocols, - build_objc_string_object, objc_declare_alias, build_ivar_chain, - finish_message_expr, build_protocol_expr, is_public, - start_class): Similarly. - -2001-12-01 Neil Booth - - * c-decl.c (duplicate_decls, parmlist_tags_warning): Remove - trailing period from diagnostics. - * c-lex.c (cb_file_change): Similarly. - * cppmacro.c (check_trad_stringification): Similarly. - * gcc.c (do_spec_1): Similarly. - * genattr.c (main): Similarly. - * genattrtab.c (main, operate_exp, make_length_attrs): Similarly. - * gencodes.c (main): Similarly. - * genconfig.c (main): Similarly. - * genconstants.c (main): Similarly. - * genemit.c (main): Similarly. - * genextract.c (main): Similarly. - * genopinit.c (main): Similarly. - * genoutput.c (main): Similarly. - * genpeep.c (main): Similarly. - * genrecog.c (main): Similarly. - * mips-tfile.c (add_file, error): Similarly. - * profile.c (init_branch_prob): Similarly. - * reload1.c (spill_failure): Similarly. - * stmt.c (parse_output_constraint): Similarly. - * varasm.c (assemble_variable): Similarly. - -2001-12-01 Kaveh R. Ghazi - - * m68k.c (init_FPA_table): Provide static prototype. - * mips/abi64.h (mips_function_value): Move prototype to ... - * mips-protos.h (mips_function_value): ... here. - * mips.c: Include halfpic.h. - * output.h (rdata_section): Prototype. - - * h8300.c (h8300_asm_named_section): Wrap with !OBJECT_FORMAT_ELF. - * m88k.c (m88k_svr3_asm_out_constructor, - m88k_svr3_asm_out_destructor): Wrap with CTOR_LIST_BEGIN && - !OBJECT_FORMAT_ELF. - * mcore.c (mcore_asm_named_section): Wrap with OBJECT_FORMAT_ELF. - * sh.c (sh_asm_named_section): Wrap with !OBJECT_FORMAT_ELF. - * sparc.c (sparc_elf_asm_named_section): Wrap with OBJECT_FORMAT_ELF. - -2001-12-01 Geoff Keating - - * config/rs6000/rs6000.h (LEGITIMATE_LO_SUM_ADDRESS_P): Complex - LO_SUM addresses less than word size are not legitimate, - because they lead to invalid SUBREGs. - * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise. - -2001-12-01 Olivier Hainque - - * unroll.c (loop_iterations): Give up on jumps with null JUMP_LABEL - while scanning for multiple back edges. - -2001-12-01 Franz Sirl - - * ginclude/ppc-asm.h (JUMP_TARGET): New macro. - * config/rs6000/tramp.asm: Use it. - -2001-12-01 Zack Weinberg - - * gencheck.c, gengenrtl.c: Don't define xmalloc. - * gensupport.c: Don't define xstrdup, xcalloc, xrealloc, - xmalloc. - -2001-11-30 John David Anglin - - * pa.c (output_ascii): Cast `p' to unsigned char. - -2001-11-30 Daniel Berlin - - * config/rs6000/rs6000.c (altivec_expand_builtin): add - ALTIVEC_BUILTIN_LD_INTERNAL_4sf and ALTIVEC_BUILTIN_ST_INTERNAL_4sf, - *_16qi,_8hi, rename existing V4SI ones to *_4si. - (altivec_init_builtins): Ditto. - (bdesc_2arg): Rename CODE_FOR_* to match changes in MD file. - - * config/rs6000/rs6000.md: Add attribute types vecsimple, - veccomplex, vecfloat, and vecperm, for altivec instructions. - Modify altivec patterns to use appropriate attribute type. - Modify altivec patterns to match RTL operations where appropriate - (IE no unspec where we can avoid it). - Add vector unit scheduling for ppc7450. - Rename patterns to what they are where appropriate - (altivec_vaddfp->addv4sf3, etc) - - * config/rs6000/rs6000.h (enum rs6000_builtins): Change VRS->VSR. - Pass -mppc, and define _ARCH_PPC, if -mcpu=7450 is used. - - * config/rs6000/sysv4.h: Add -mcpu=7450. - - * testsuite/gcc.dg/altivec-1.c: Update test to take into account renamed - _builtin_altivec_ld_interal function. - -2001-11-30 Kaveh R. Ghazi - - * configure.in (AC_CHECK_FUNCS): Delete strtoul, bsearch, popen, - strchr, strrchr, isascii, gettimeofday. - * config.in, configure: Regenerate. - -2001-11-30 Zoltan Hidvegi - - * unroll.c (unroll_loop): Correct special exit cases. - -2001-11-30 Stephane Carrez - - * config/sparc/sparc.c (DF_MODES_NO_S): Fix pr/3623, define to - accept DFmode and DImode only. - -2001-11-30 Aldy Hernandez - - * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Adjust for altivec. - (STACK_DYNAMIC_OFFSET): Same. - -2001-11-30 Richard Henderson - - * c-decl.c (duplicate_decls): Copy DECL_SAVED_TREE. - -2001-11-30 Aldy Hernandez - - * config/rs6000/rs6000.h (CALL_REALLY_USED_REGISTERS): New. - (CONDITIONAL_REGISTER_USAGE): Set call_really_used_registers to - the values in call_used_registers. - -Fri Nov 30 12:48:26 2001 Jeffrey A Law (law@cygnus.com) - - * gthr-dce.h: If _DCE_THREADS is not defined, then just include - gthr-single. - -2001-11-30 Jason Merrill - - * dwarf2out.c (is_cxx): New fn. - (add_data_member_location_attribute): Check it. - * dbxout.c (dbxout_type): Only look at BINFO_VPTR_FIELD for C++. - -Fri Nov 30 08:26:57 2001 Richard Kenner - - * dwarf2asm.c (dw2_asm_output_encoded_addr_rtx): Handle const1_rtx. - -2001-11-30 Daniel Berlin - - * genopinit.c (gen_insn): Handle MODE_VECTOR_INT and - MODE_VECTOR_FLOAT as allowed. - -2001-11-29 Zack Weinberg - - Purge cruft now we have build libiberty. - - * Makefile.in (OBSTACK, VFPRINTF, DOPRINT, STRSTR, - HOST_OBSTACK, HOST_VFPRINTF, HOST_DOPRINT, HOST_STRSTR, - USE_HOST_OBSTACK, USE_HOST_VFPRINTF, USE_HOST_DOPRINT, - USE_HOST_STRSTR): Delete variables. - (vfprintf.o, doprint.o, strstr.o, splay-tree.o, obstack.o, - hashtab.o, safe-ctype.o, $(HOST_PREFIX_1)obstack.o, - $(HOST_PREFIX_1)vfprintf.o, $(HOST_PREFIX_1)doprint.o, - $(HOST_PREFIX_1)strstr.o), $(HOST_PREFIX_1)): Delete rules. - (LIBIBERTY, BUILD_LIBIBERTY): New variables. - (LIBDEPS): Now just $(INTLDEPS) $(LIBIBERTY). - (LIBS): Now just $(INTLLIBS) @LIBS@ $(LIBIBERTY). - (HOST_LIBDEPS): Now just $(BUILD_LIBIBERTY). - (HOST_LIBS): Ditto. - (HOST_RTL): Remove hashtab.o safe-ctype.o. - (OBJS): Remove splay-tree.o. - (gen-protos): Depend on $(HOST_LIBS), not ../libiberty/libiberty.a. - (distclean): No need to delete splay-tree.c obstack.c - hashtab.c safe-ctype.c. - (mostlyclean): Delete build copies of print-rtl.c bitmap.c - errors.c ggc-none.c (all prefixed with $(HOST_PREFIX_1). - * aclocal.m4 (gcc_AC_FUNC_VFPRINTF_DOPRNT, gcc_AC_FUNC_STRSTR): - Delete. - * configure.in: Don't use them. - Set and substitute @FORBUILD@. - * config.in, configure: Regenerate. - * doprint.c: Move to libiberty/_doprnt.c. - * doc/configterms.texi: Document that libiberty is now built - up to three times. Fix typo. - -2001-11-30 Jason Merrill - - * dwarf2out.c (add_data_member_location_attribute): Do the - right thing for virtual bases. - * dbxout.c (dbxout_type): For a virtual base, print the offset - within the vtable. - -2001-11-29 Zoltan Hidvegi - - * doloop.c (doloop_valid_p): Check for LTU and GTU as well. - -2001-11-29 Aldy Hernandez - - * config/rs6000/rs6000.c (function_arg): Unnamed vector arguments - go in memory. - Remove unused attribute for named. - -2001-11-29 Kaveh R. Ghazi - - * genattrtab.c (attr_rtx_1): New function containing the - majority of `attr_rtx'. Move variable declarations into the - scope where they are used. Eliminate unnecessary gotos. - (attr_rtx): Now just a wrapper for `attr_rtx_1' using VA_OPEN, - VA_FIXEDARG, and VA_CLOSE. - -2001-11-30 Hans-Peter Nilsson - - * config/cris/cris.c (cris_notice_update_cc): Check first - destination also against overlap with cc_status.value2 and second - destination against overlap with cc_status.value1. For overlaps, - clear overlapped value, don't just CC_STATUS_INIT. - - * config/cris/cris.h (EXTRA_CONSTRAINT_T): Fix spacing and FIXME. - Fix typo in comment. - (LINK_SPEC): Remove whitespace at end of line. - -2001-11-29 Jakub Jelinek - - * c-lex.c (init_c_lex): Canonicalize "-" filename to "". - -2001-11-29 Jakub Jelinek - - * gcc.c (ASM_DEBUG_SPEC): Only check HAVE_AS_G*_DEBUG_FLAG - macros for the supported debugging types. - -2001-11-29 Craig Rodrigues - - PR other/4932 - * config/i386/i386.c (print_operand): Verify that the - argument to %c is a constant and not a conditional which - needs to be reversed. - -Thu Nov 29 11:12:59 2001 Geoffrey Keating (geoffk@redhat.com) - - * emit-rtl.c (gen_lowpart_common): Fix conversion of - REAL_VALUE_TYPEs to an array of target integers. Fix extraction - of low part of those arrays for 32bit and 64bit hosts. - -2001-11-29 Kaveh R. Ghazi - - * Makefile.in (insn-output.o): Depend on insn-codes.h. - -2001-11-29 Joseph S. Myers - - * configure.in (target_list): Add generated-manpages. - * configure: Regenerate. - * Makefile.in (generated-manpages): Depend on - lang.generated-manpages. - * objc/Make-lang.in (objc.generated-manpages): New dummy target. - -2001-11-29 Nick Clifton - - * config/arm/crti.asm (_init): Add .thumb_func if compiled - with -mthumb. - (_fini): Add .thumb_func if compiled with -mthumb. - -2001-11-28 Eric Christopher - - * config/mips/mips.c (override_options): Fix thinko in mips_tune - for mips32/mips64. Remove MASK_SOFT_FLOAT configuration bits. - -Thu Nov 29 00:24:15 EST 2001 John Wehle (john@feith.com) - - * alpha.md (tablejump): Use pic_offset_table_rtx - instead of gen_rtx_REG. - -Wed Nov 28 15:36:13 2001 Jeffrey A Law (law@cygnus.com) - - * expr.c (store_expr): When copying a string constant into an - array, reset the known alignment of the MEM for the section to - be cleared to BITS_PER_UNIT. - -2001-11-28 Hans-Peter Nilsson - - * config/cris/cris.c: Remove whitespace at end of line. - -Wed Nov 28 14:51:23 2001 Douglas B. Rupp - - * config.gcc (i[34567]86-*-interix3*): New case. - * config/x-interix3, config/interix3.h, config/i386/i386-interix3.h: - New files. - -2001-11-28 Richard Henderson - - * config/alpha/alpha.md (sibcall_osf_1, sibcall_value_osf_1): Use - symbolic_operand as the predicate. - -2001-11-28 Richard Henderson - - * doloop.c (doloop_modify_runtime): Properly select induction - variable; skip late entry test if biv initializer created by loop. - -Wed Nov 28 08:21:47 2001 Richard Kenner - - * tree.h (EXPR_WFL_LINECOL): Used by Java in node other than - EXPR_WITH_FILE_LOCATION, so change checks and documentation. - - * tree.h (TREE_VIA_PROTECTED): Update to show can be in TREE_VEC. - - * tree.h: Add missing checks on some macros; make formatting more - consistent. - - * stor-layout.c (put_pending_size): Look for SAVE_EXPR if not at top - level; only add to pending_sizes if find it. - - * langhooks.c (lhd_safe_from_p): Add ATTRIBUTE_UNUSED. - - * df.c (iterate_dataflow_sbitmap, iterate_dataflow_bitmap): - Add casts to remove warnings. - - * Makefile.in (OBJS): Sort alphabetically. - - * print-rtl.c (print_rtx): If RTX code is bad, just say so. - Also minor cleanups. - -Wed Nov 28 06:52:27 2001 Arnaud Charlet - - * Makefile.in (ORDINARY_FLAGS_TO_PASS): Remove STAGE_PREFIX. - (FLAGS_TO_PASS): Add STAGE_PREFIX. - (SUBDIR_FLAGS_TO_PASS): Apply PREPEND_DOTDOT_TO_RELATIVE_PATH - to STAGE_PREFIX. - -Wed Nov 28 10:42:19 CET 2001 Jan Hubicka - - * cse.c (true_dependence_in_rtx): New function. - (invalidate): Use it. - - * c-common.h (GOTO_FAKE_P): New macro. - * tree-inline.c (GOTO_FAKE_P): Set. - * c-tree.texi (GOTO_FAKE_P): Document. - - * varasm.c (assemble_variable): Set reloc to 3 for error_mark - containing pointers. - (output_addressed_constants): Check for local/external relocations. - * elfos.h (SELECT_SECTION): Classify data section. - * tm.texi (SELECT_SECTION): Update documentation. - - * cfganal.c (flow_dfs_compute_reverse_add_bb): set visited bit. - (flow_dfs_compute_reverse_execute): Add only unvisited blocks. - -2001-11-27 Kaveh R. Ghazi - - * defaults.h (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP): Also provide defaults when we have - OBJECT_FORMAT_ROSE. - -2001-11-28 Hans-Peter Nilsson - - * config/cris/cris.c: Tweak spacing for prototypes. - (LOSE_AND_RETURN): New macro. - (cris_operand_lossage): New function. - (cris_print_index, cris_print_base): Use cris_operand_lossage - rather than fatal_insn. - (cris_print_operand, cris_print_operand_address): Use - LOSE_AND_RETURN rather than fatal_insn and internal_error. - (cris_output_addr_const): Use LOSE_AND_RETURN and - output_operand_lossage rather than fatal_insn and internal_error - for valid but unexpected rtx expressions. - - * config/cris/cris.c (cris_split_movdx): Don't call alter_subreg - for a SUBREG in src or dest, abort instead. - -2001-11-28 Bryce McKinlay - - * doc/passes.texi: Remove reference to c-dump.c. Update tree inlining - doc. - -2001-11-27 Jakub Jelinek - - * gcc.c (ASM_DEBUG_SPEC): Use conditional expression rather than - preprocessor define. If only DBX_DEBUGGING_INFO or only - DWARF2_DEBUGGING_INFO is supported for the target, provide - appropriate definitions. - -2001-11-27 Neil Booth - - * Makefile.in: Update, and add c-objc-common.o dependencies. - * c-lang.c: Remove unnecessary includes. - (c_init): Move bulk of code to c_objc_common_init, and call it. - (c_tree_printer, c_missing_noreturn_ok_p, c_disregard_inline_limits, - inline_forbidden_p, c_cannot_inline_tree_fn): Move to - c-objc-common.c. - * c-objc-common.c: New. Mostly pulled from c-lang.c. - * c-tree.h (c_disregard_inline_limits, c_cannot_inline_fn, - c_objc_common_init, c_missing_noreturn_ok_p): New. - * toplev.c: Update comment. - * doc/passes.texi: Update. -objc: - * objc-act.c (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, - LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, - LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Override. - (objc_init): Update to use c_objc_common_init. - -2001-11-27 Neil Booth - - * cpphash.c (_cpp_init_hashtable): Update. - * cpphash.h (struct spec_nodes): Remove n_L. - * cpplex.c (_cpp_lex_direct): Check for prefix L separately. - -2001-11-17 Richard Henderson - - * unroll.c (loop_iterations): Move last change ... - * doloop.c (doloop_modify_runtime): ... here. - -2001-11-17 Corey Minyard - Richard Henderson - - * unroll.c (loop_iterations): Detect one situation in which we - overestimate the number of iterations. - -2001-11-27 Rainer Orth - - * gcc.c (set_input): Export. - Move declaration ... - gcc.h (set_input): ... here. - -2001-11-27 Rainer Orth - - * gcc.c (set_collect_gcc_options): New function, split out from - main. - Ignore elided switches. - (do_spec): Invoke before executing command. - (do_spec_1): Likewise. - Fixes PR other/3968. - -2001-11-27 Hans-Peter Nilsson - - * config/cris/cris.h (INT_ASM_OP): Remove. - -2001-11-27 Rainer Orth - - * config/i386/sol2.h (WINT_TYPE): Redefine. - (WINT_TYPE_SIZE): Likewise. - -2001-11-27 Kaveh R. Ghazi - - * collect2.c: Check HAVE_DUP2 instead of NO_DUP2. - (dup2): Make static and add prototype. - * m68k/plexus.h: Don't define NO_DUP2. - * configure.in (AC_CHECK_FUNCS): Add dup2. - * config.in, configure: Regenerate. - - * ia64/aix.h (REG_SIZE): Don't #undef. - * sparc.h (REG_SIZE): Delete. - * flow.c (mark_used_regs): Don't use REG_SIZE. - * regs.h (REG_SIZE): Delete. - -2001-11-27 Andreas Schwab - - * gcc.c: Fix typo PREFERRED_DEBUGGING_FORMAT -> - PREFERRED_DEBUGGING_TYPE. - -Tue Nov 27 08:21:47 2001 Richard Kenner - - * Makefile.in (c-lang.o): Depends on langhooks-def.h. - (expr.o, varasm.o): Depends on langhooks.h. - * c-common.c (c_safe_from_p): Always declare. - (c_expand_expr): Refine when declared. - * c-lang.c (c-common.h): Now include. - (LANG_HOOKS_SAFE_FROM_P): Define new hook. - (c_init): Don't set lang_safe_from_expr. - * expr.c (langhooks.h): Now include. - (lang_safe_from_p): No longer define. - (safe_from_p): Use lang hook. - (expand_expr): Set IGNORE if VOID_TYPE result of VIEW_CONVERT_EXPR too. - (expand_expr, case VIEW_CONVERT_EXPR): Pass ro_modifier down. - * expr.h (lang_expand_constant, lang_safe_from_p): Delete. - * langhooks-def.h (lhd_return_tree, lhd_safe_from_p): New decls. - (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. - * langhooks.c (lhd_return_tree, lhd_safe_from_p): New functions. - * langhooks.h (struct lang_hooks): New fields expand_constant - and safe_from_p. - * output.h (output_constant): Size arg is HOST_WIDE_INT. - * stmt.c (expand_decl_init): No longer need to expand constant - for CONST_DECL. - * stor-layout.c (put_pending_size): Don't check for SAVE_EXPR. - * toplev.c (lang_expand_constant): Delete var. - * tree.c (save_expr): Don't put another SAVE_EXPR around simple - operations on SAVE_EXPR. - * varasm.c (langhooks.h): Now include. - (compare_constant_1): Use lang_hooks, not lang_expand_constant. - (record_constant_1, output_addressed_constants): Likewise. - (initializer_constant_valid_p, output_constant): Likewise. - (output_constant_def): Process no-defer of string constant. - (output_addressed_constants, case ADDR_EXPR): Use handled_component_p. - (output_constant): Strip more conversions. - Track our size and pad for the rest. - (array_size_for_constructor): Remove code for non-byte STRING_CST. - (output_constructor): SIZE now HOST_WIDE_INT. - -2001-11-27 Richard Henderson - - * ifcvt.c (noce_try_store_flag_constants): Test for overflow - in computing DIFF. - -2001-11-27 Zack Weinberg - - * cppfiles.c (read_include_file): Add comment. - -2001-11-26 Richard Henderson - - * toplev.c (rest_of_compilation): Call free_bb_for_insn before exit. - -2001-11-26 Richard Henderson - - * config/ia64/sysv4.h (DBX_DEBUGGING_INFO): Undef. - * config/ia64/aix.h (PREFERRED_DEBUGGING_TYPE): Remove - commented out override. - -2001-11-26 Neil Booth - - * cppfiles.c (stack_include_file): Don't optimize zero-length - files. - (read_include_file): NUL-terminate read files. - * cpplex.c (handle_newline, skip_escaped_newlines, - get_effective_char, skip_whitespace, parse_identifier, - parse_identifier_slow, parse_number, parse_string, - _cpp_lex_direct): Optimize for the fact that buffers are guaranteed - NUL-terminated. - * cpplib.c (destringize_and_run, cpp_define, handle_assertion): - Be sure buffers are NUL terminated. - * cppmacro.c (warn_of_redefinition): Kill compile warning. - -2001-11-26 Neil Booth - - * c-common.c: Include tree-inline.h. - (c_language): Move separate definitions here. - (c_common_init_options, c_common_post_options): New. - (c_common_lang_init): Rename c_common_init. - * c-common.h (c_common_lang_init): Similarly. - (c_common_init_options, c_common_post_options): New. - * c-lang.c (c_post_options): Move body to c_common_post_options. - (c_init_options): Use c_common_init_options. - (c_init): Update. - * langhooks.def: Rearrange. - * langhooks.h: Rearrange, and improve comments. - * toplev.c (do_compile): New function. - (toplev_main): Use it. - (lang_independent_f_options, parse_options_and_default_flags, - process_options): Remove trailing periods. - * Makefile.in: Update. -objc: * objc-act.c (objc_post_options, objc_init_options): Use c-common.c - functions. - (ojbc_init): Update. - -2001-11-26 Richard Henderson - - * config/alpha/alpha.md (unop): Add 0 offset for some gas versions. - -2001-11-26 DJ Delorie - - * expr.c (store_constructor): Actually use the value computed - if WORD_REGISTER_OPERATIONS. - -2001-11-26 Richard Henderson - - * config/elfos.h (SELECT_SECTION): Don't check TREE_READONLY - for CONSTRUCTOR. - -2001-11-26 David Edelsohn - - * rs6000.c (output_mi_thunk): Handle minimal-toc and call - correct function on AIX. - -2001-11-26 Alexandre Oliva - - * toplev.c (process_options): Don't force - flag_optimize_sibling_calls to zero just because exceptions are - enabled. - -Mon Nov 26 12:37:05 2001 Jeffrey A Law (law@cygnus.com) - - * df.h (transfer_function_sbitmap): Use PARAMS around argument - list in function prototypes. - (transfer_function_bitmap): Likewise. - -2001-11-26 Loren J. Rittle - - * config/stormy16/stormy16.h: Remove DEFAULT_VTABLE_THUNKS. - * config/i386/netbsd-elf.h: Likewise. - -2001-11-26 David Edelsohn - - * doc/trouble.texi: Remove outdated RS/6000 comments. - -Mon Nov 26 13:49:41 CET 2001 Jan Hubicka - - * final.c (walk_alter_subreg): Fix return value. - -Mon Nov 26 11:36:20 CET 2001 Jan Hubicka - - * sparc.c (sparc_absnegfloat_split_legitimate): Do not call - alter_subreg. - * sparc.md (post-reload splitters): Do not call alter_subreg. - * cfgrtl.c (purge_dead_edges): Fix typo in previous fix. - -2001-11-25 Aldy Hernandez - - * regclass.c (choose_hard_reg_mode): Handle vector arguments. - -2001-11-26 Alan Modra - - * final.c: (insn_lengths): Make it an int *, so that large jump - tables don't overflow. - -2001-11-25 Joseph S. Myers - - * c-format.c (FMT_FLAG_DOLLAR_GAP_POINTER_OK): New. - (format_types): Use it for scanf. - (dollar_arguments_pointer_p): New. - (init_dollar_format_checking): Store details of which arguments - are pointers. - (maybe_read_dollar_number): Reallocate dollar_arguments_pointer_p. - (finish_dollar_format_checking): Take extra parameter - pointer_gap_ok. Treat unused arguments differently if - pointer_gap_ok and the unused arguments are pointers. - (check_format_info_main): Pass extra argument to - finish_dollar_format_checking. - * doc/invoke.texi (-Wno-format-extra-args): Document behavior when - unused arguments are present between used arguments with operand - numbers. - -2001-11-25 Daniel Berlin - - * df.c: Add prototypes for hybrid_search_bitmap and - hybrid_search_sbitmap. - (hybrid_search_bitmap): New function. - (hybrid_search_sbitmap): New function. - (iterative_dataflow_sbitmap): Change to use hybrid_search_sbitmap. - (iterative_dataflow_bitmap): Ditto. - -2001-11-25 Stephane Carrez - - * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize - address computations. - -2001-11-25 Stephane Carrez - - * config/m68hc11/m68hc11.c (d_register_operand): Must accept - register b (low part of d). - -2001-11-25 Stephane Carrez - - * config/m68hc11/m68hc11.h (FUNCTION_PROFILER): Fix label name - passed to mcount. - -Sun Nov 25 06:22:09 2001 Douglas B. Rupp - - * config/alpha/vms-ld.c, config/alpha/vms-cc.c: New files. - * config/alpha/x-vms: New file, to compile the above. - * config.gcc (alpha*-dec-vms*): Add x-vms. - -2001-11-24 Hans-Peter Nilsson - - * genextract.c (main): Set ro_loc for peepholes. - -Sat Nov 24 17:04:10 2001 Douglas B. Rupp - - * fix-header.c (main): Move inf_buffer termination and inf_limit - calculation to after read. - - * config/alpha/xm-vms.h (FILE_TYPE): Remove undef and baggage. - (__UNIX_FOPEN): Define. - -Sat Nov 24 16:11:00 2001 Richard Kenner - - * function.c (assign_stack_temp_for_type): Clear alias set before - setting new one. - -2001-11-23 David Edelsohn - - * rs6000.c (print_operand, case 'v'): Use HOST_WIDE_INT_PRINT_HEX - format. - * rs6000.md (cmptf): Fix typo. - -2001-11-23 Richard Sandiford - - * final.c (output_addr_const): Output PC as '.' even if !flag_pic. - * varasm.c (output_constructor): Use assemble_integer rather - than ASM_OUTPUT_BYTE. - -2001-11-23 Andreas Jaeger - - * cpplex.c (cpp_interpret_charconst): Use HOST_WIDE_INT for sign - extension. - -2001-11-23 Nick Clifton - - * config/arm/xscale-coff.h (SUBTARGET_CPU_DEFAULT): Override - default definition. - (SUBTARGET_EXTRA_ASM_SPEC): Remove previous definition. - (MULTILIB_DEFAULTS): Remove previous definition. - -2001-11-23 Neil Booth - - * cppmacro.c (warn_of_redefinition): Warn regardless of -pedantic. - * gcc.dg/cpp/mi6.c, gcc.dg/cpp/redef2.c: Update. - -2001-11-22 Kaveh R. Ghazi - - * cris.h: Revert thinko in last patch. - -2001-11-23 Joseph S. Myers - - * ChangeLog.0, ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog, - FSFChangeLog.10, c-decl.c, cppfiles.c, cppinit.c, cpplex.c, - cpplib.c, cppmain.c, cse.c, df.c, diagnostic.c, dominance.c, - dwarf2out.c, dwarfout.c, emit-rtl.c, errors.c, except.c, except.h, - explow.c, function.c, gcse.c, genrecog.c, predict.c, regmove.c, - sched-rgn.c, ssa-ccp.c, stmt.c, toplev.c: Fix spelling errors. - - * predict.c, reg-stack.c: Fix spelling errors. - -2001-10-09 Andrew Haley - - * calls.c (check_sibcall_argument_overlap): Use slot_offset for - start of stack slot. - -2001-11-22 Graham Stott - - * cfgrtl.c (try_redirect_by_replacing_jump): Fix typo, emit - replacement jump after original jump. - - (verify_flow_info): Remove redundent initialisation. - Handle reaching end of insn list before finding a BARRIER. - Only issue one missing barrier diagnostic. - -2001-11-22 Graham Stott - - * local-alloc.c (combine_regs): Handle SUBREG_REG being a MEM. - -Thu Nov 22 06:49:14 2001 Richard Kenner - - * config/i386/i386.md (leave, leave_rex64): Have RTL reflect what - insn actually does. - -2001-11-22 Nick Clifton - - * doc/invoke.texi (M32R/D Option Summary): Document -m32r switch. - Fix typo -mm32rx=> -m32rx. - - * config/arm/arm.c (arm_elf_asm_named_section): Only build for elf - targets. - - * config.gcc (xscale-coff): Add necessary header files to - tm_file variable. - -2001-11-20 Zack Weinberg - - * rs6000.c (output_cbranch): Use $, not %$, in output template. - -2001-11-21 Bryce McKinlay - - * tree-dump.c: Rename from c-dump.c. Include c-tree.h, not c-common.h. - (lang_type_quals): Declare. - (dequeue_and_dump): Use lang_hooks.tree_dump.type_quals function to - retrieve language-specific qualifiers for a type node, instead of - C_TYPE_QUALS. Likewise for lang_hooks.tree_dump.dump_tree instead of - lang_dump_tree. - * tree-dump.h: Rename from c-dump.h. - * c-common.h (C_TYPE_QUALS): Removed. - Move declarations for tree-dump.c interface to... - * tree.h: ... here. Remove lang_dump_tree. - * langhooks.h (struct lang_hooks_for_tree_dump): New. - (struct lang_hooks): Add tree_dump hooks. - * langhooks.c (lhd_tree_dump_dump_tree): New function. - (lhd_tree_dump_type_quals): New function. - * langhooks-def.h (lhd_tree_dump_dump_tree, lhd_tree_dump_type_quals): - Declare. - (LANG_HOOKS_INITIALIZER): Add tree_dump hooks. - * Makefile.in: Move tree-dump.o to language-independent back-end. - -2001-11-21 Kaveh R. Ghazi - - * 1750a.h (DBX_REGISTER_NUMBER): Don't define. - * alpha.h (DBX_REGISTER_NUMBER): Likewise. - * arc.h (DBX_REGISTER_NUMBER): Likewise. - * arm/aout.h (DBX_REGISTER_NUMBER): Likewise. - * avr.h (DBX_REGISTER_NUMBER): Likewise. - * c4x.h (DBX_REGISTER_NUMBER): Likewise. - * clipper.h (DBX_REGISTER_NUMBER): Likewise. - * convex.h (DBX_REGISTER_NUMBER): Likewise. - * cris.h (DBX_REGISTER_NUMBER): Likewise. - * dsp16xx.h (DBX_REGISTER_NUMBER): Likewise. - * elxsi.h (DBX_REGISTER_NUMBER): Likewise. - * fr30.h (DBX_REGISTER_NUMBER): Likewise. - * h8300.h (DBX_REGISTER_NUMBER): Likewise. - * i370.h (DBX_REGISTER_NUMBER): Likewise. - * i860.h (DBX_REGISTER_NUMBER): Likewise. - * i860/paragon.h (DBX_REGISTER_NUMBER): Likewise. - * i860/sysv3.h (DBX_REGISTER_NUMBER): Likewise. - * i860/sysv4.h (DBX_REGISTER_NUMBER): Likewise. - * m32r.h (DBX_REGISTER_NUMBER): Likewise. - * m68hc11.h (DBX_REGISTER_NUMBER): Likewise. - * m88k.h (DBX_REGISTER_NUMBER): Likewise. - * mcore/mcore-elf.h (DBX_REGISTER_NUMBER): Likewise. - * mcore.h (DBX_REGISTER_NUMBER): Likewise. - * mn10200.h (DBX_REGISTER_NUMBER): Likewise. - * mn10300.h (DBX_REGISTER_NUMBER): Likewise. - * pdp11.h (DBX_REGISTER_NUMBER): Likewise. - * romp.h (DBX_REGISTER_NUMBER): Likewise. - * rs6000.h (DBX_REGISTER_NUMBER): Likewise. - * rs6000/sysv4.h (DBX_REGISTER_NUMBER): Likewise. - * s390/linux.h (DBX_REGISTER_NUMBER): Likewise. - * stormy16.h (DBX_REGISTER_NUMBER): Likewise. - * v850.h (DBX_REGISTER_NUMBER): Likewise. - * vax.h (DBX_REGISTER_NUMBER): Likewise. - * we32k.h (DBX_REGISTER_NUMBER): Likewise. - - * defaults.h (DBX_REGISTER_NUMBER): Provide a default. - * doc/tm.texi (DBX_REGISTER_NUMBER): Update. - -2001-11-21 H.J. Lu - - * config/rs6000/sysv4.h (LIB_SPEC): Fix a typo. - -2001-11-21 Kaveh R. Ghazi - - * s390.c (s390_va_arg): Eliminate ALIGN parameter in call to - emit_cmp_and_jump_insns. - - * stormy16.c (xstormy16_expand_builtin_va_arg, - xstormy16_expand_casesi): Likewise. - -Wed Nov 21 17:37:16 2001 Richard Kenner - - * function.c (keep_stack_depressed): Major rework. - (handle_epilogue_set, emit_equiv_load): New functions. - (thread_prologue_and_epilogue_insns): keep_stack_depressed now - has return value. - * jump.c (returnjump_p_1): Also return 1 if SET with SET_IS_RETURN_P. - * rtl.h (SET_IS_RETURN_P): New macro. - - * expr.c (expand_expr, case VIEW_CONVERT_EXPR): Refine slightly - and also support TREE_ADDRESSABLE. - * tree.def (VIEW_CONVERT_EXPR): Document TREE_ADDRESSABLE. - -2001-11-21 David Edelsohn - - * rs6000.md (cmptf_internal1): Replace %$ with $. - -Wed Nov 21 16:44:01 2001 Douglas B. Rupp - - * cppfiles.c (STAT_SIZE_TOO_BIG): Define. - (read_include_file): Use STAT_SIZE_TOO_BIG. - - * cppinit.c (INO_T_COPY): Define. - (INO_T_EQ): Uppercase parameters. - (append_include_chain): Use INO_T_COPY. - -2001-11-21 Richard Sandiford - - * cfg.c: Fix typos and formatting in the introductory comment. - -Wed Nov 21 12:38:37 CET 2001 Jan Hubicka - - * profile.c (compute_branch_probabilites): Compute probabilities - for entry/exit edges; estimate probabilities for zero counts. - -2001-11-21 Jakub Jelinek - - * explow.c (probe_stack_range): Use LCT_NORMAL as second argument - to emit_library_call. - * function.c (expand_main_function, expand_function_start, - expand_function_end): Likewise. - * profile.c (output_func_start_profiler): Likewise. - * stmt.c (expand_nl_goto_receivers): Use LCT_NORETURN as - second argument to emit_library_call. - * optabs.c (prepare_cmp_insn): Use LCT_CONST_MAKE_BLOCK - as second argument to emit_library_call. - * calls.c (emit_library_call): Update fn_type description. - -2001-11-21 Jakub Jelinek - - * c-decl.c (c_expand_deferred_function): Only call c_expand_body - if fndecl is still DECL_INLINE and has DECL_RESULT. - -2001-11-20 Kaveh R. Ghazi - - * clipper.c (clipper_movstr): Avoid uninitialized warning. - * i960.c (is_mask, legitimize_address): Likewise. - * m88k.c (m88k_expand_prologue): Likewise. - * m88k.md: Likewise. - * mcore.c (emit_new_cond_insn): Likewise. - * stormy16.c (xstormy16_emit_cbranch): Likewise. - -2001-11-20 Zack Weinberg - - * config.gcc: Delete powerpcle-*-solaris2* stanza. - * config/rs6000/eabi.asm, config/rs6000/rs6000.c, - config/rs6000/rs6000.h, config/rs6000/rs6000.md, - config/rs6000/sol-ci.asm, config/rs6000/sol-cn.asm, - config/rs6000/sysv4.h, config/rs6000/t-ppccomm, - config/rs6000/t-ppcos: Expunge all references to Solaris. - - * config/rs6000/sol-c0.c, config/rs6000/sol2.h: Delete. - - * config/rs6000/rs6000.md: Replace '%$' with '$' in all - output templates. - * config/rs6000/rs6000.h: Define DEFAULT_PCC_STRUCT_RETURN to 0, - and change RETURN_IN_MEMORY to just check AGGREGATE_TYPE_P. - -2001-11-20 Kaveh R. Ghazi - - * sh.md: Avoid uninitialized warnings. - * vax.c (vax_rtx_cost): Likewise. - -2001-11-15 Aldy Hernandez - - * rs6000.c (direct_return): Check if we are saving altivec - registers. - (first_altivec_reg_to_save): New. - Updated stack frame layout comments. - (rs6000_stack_info): Calculate altivec register save size. - Save link register if we saved some altivec registers. - (rs6000_stack_info): Align save size to 16 if altivec abi or - abi_darwin. - (rs6000_stack_info): Calculate altivec register offsets. - (rs6000_stack_info): Add altivec info to save_size. - (debug_stack_info): Add altivec debug info. - (rs6000_emit_prologue): Save altivec registers and vrsave. - (compute_vrsave_mask): New. - (altivec_expand_builtin): Remove unused variables. - (rs6000_parse_abi_options): Add static qualifier. - (rs6000_expand_builtin): Remove unused parameters. - (altivec_expand_builtin): Cast bdesc_2arg to get rid of warning. - (altivec_init_builtins): Same. - (is_altivec_return_reg): New. - (vrsave_operation): New. - (ALTIVEC_REG_BIT): New. - (generate_set_vrsave): New. - - * rs6000.md (get_vrsave): New. - (set_vrsave): New. - (*set_vrsave_internal): New. - - * rs6000.h (rs6000_stack): Add first_altivec_reg_save, - altivec_save_offset, vrsave_save_offset, altive_size, vrsave_size, - altivec_padding_size, vrsave_mask. - (TOTAL_ALTIVEC_REGS): New. - (EPILOGUE_USES): Add VRSAVE_REGNO. - -2001-11-20 Jeff Law - - * unroll.c (copy_loop_body): Update LABEL_NUSES for the - exit label as necessary. - -2001-11-20 Brad Kaiser - - * reload1.c (elimination_effects): Use function_invariant_p - instead of CONSTANT_P when considering register equivalences. - -2001-11-20 David O'Brien - - * config.gcc: Add FreeBSD/PowerPC target. - (powerpc64-*-linux*, powerpc-*-sysv*, powerpc-*-netbsd*, - powerpc-*-chorusos*, powerpc-*-eabiaix*, powerpc-*-eabisim*, - powerpc-*-elf*, powerpc-*-eabi*, powerpc-*-rtems*, - powerpc-*-linux*libc1, powerpc-*-linux*, powerpc-wrs-vxworks*, - powerpcle-wrs-vxworks*, powerpcle-*-sysv*, powerpcle-*-elf*, - powerpcle-*-eabisim*, powerpcle-*-eabi*, powerpcle-*-solaris2*): Add - freebsd-spec.h to tm_file. - (rs6000-*-lynxos*): Add lynx.h to tm_file. - * config/freebsd.h: Tidy up. - (USING_CONFIG_FREEBSD): Define. - (FBSD_SWITCH_TAKES_ARG, FBSD_WORD_SWITCH_TAKES_ARG, - FBSD_CPP_PREDEFINES, FBSD_CPP_SPEC, FBSD_STARTFILE_SPEC, - FBSD_ENDFILE_SPEC, FBSD_LIB_SPEC): Remove (moved to freebsd-spec.h). - (TARGET_HAS_F_SETLKW): Define. - (ASM_OUTPUT_IDENT): Delete, the elfos.h definition is fine. - * config/freebsd-spec.h: New file. - * config/rs6000/freebsd.h: New file. - * config/rs6000/rs6000.h (TARGET_VERSION): Do not define. - * config/rs6000/rs6000.c: Test for USING_ELFOS_H rather than - USING_SVR4_H to know when to turn on ELF support. - * config/rs6000/sysv4.h (TARGET_VERSION, CPP_PREDEFINES): Don't undef, - define only if not already defined. - Add FreeBSD support. - * config/rs6000/aix.h (TARGET_VERSION): Define. - * config/rs6000/beos.h: Likewise. - * config/rs6000/darwin.h: Likewise. - * config/rs6000/mach.h: Likewise. - * config/rs6000/lynx.h (TARGET_VERSION): Likewise. - Don't include lynx.h directly. - -2001-11-20 Graham Stott - - * unwind-dw2-fde.c (__deregister_frame_info_bases): - Fix lossage in last change return OB. - -Tue Nov 20 11:56:12 2001 Douglas B. Rupp - - * config/alpha/xm-vms.h (_POSIX_EXIT): Define. - Remove unneeded exit related macros. - -2001-11-20 David Edelsohn - - * rs6000.c (rs6000_emit_eh_toc_restore): Remove ALIGN parm. - - * rs6000.c (rs6000_emit_move): Add TFmode case. - * sysv4.h (MASK_LONG_DOUBLE_128, TARGET_LONG_DOUBLE_128, - LONG_DOUBLE_TYPE_SIZE, MAX_LONG_DOUBLE_TYPE_SIZE, - LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Move from here... - * rs6000.h: ... to here. - * rs6000.md (movtf, extenddftf2, extendsftf2, trunctfdf2, - trunctfsf2, floatditf2, floatsitf2, fix_trunctfdi2, - fix_trunctfsi2, negtf2, abstf2, nabstf2, cmptf): New patterns. - -Tue Nov 20 06:41:38 2001 Richard Kenner - - * emit-rtl.c (get_mem_attrs): Fix typo. - -2001-11-20 Jakub Jelinek - - * c-lang.c (finish_file): Backout 2001-11-16 - changes, instead set DECL_DEFER_OUTPUT for static inline functions - before calling c_expand_deferred_function. - -2001-11-20 Jakub Jelinek - - * unwind-dw2-fde.c (__register_frame_info_bases, __register_frame): - Don't register empty .eh_frame sections. - (__deregister_frame_info_bases, __deregister_frame): Don't - unregister them either. - -2001-11-19 Geoffrey Keating - - * configure.in (HAVE_AS_GDWARF2_DEBUG_FLAG): Define. - (HAVE_AS_GSTABS_DEBUG_FLAG): Define. - * configure: Regenerate. - * config.in: Add dummy definitions of new flags. - * toplev.c (PREFERRED_DEBUGGING_TYPE): Move definition to... - * defaults.h (PREFERRED_DEBUGGING_TYPE): ... here. - * gcc.c (ASM_DEBUG_SPEC): New macro. - (asm_debug): New static variable. - (default_compilers): Add asm_debug when assembling from - user input. - (static_specs): Add asm_debug. - -2001-11-20 Loren J. Rittle - - * config.gcc (*-*-freebsd*): Remove configuration block. - -2001-11-19 Loren J. Rittle - - bootstrap/4422 - * configure.in: Setup ability to run ./stage[1234]/xgcc in - fixinc *as if* it were a proper lang subdirectory. - * configure: Rebuilt. - -2001-11-19 Loren J. Rittle - - * config/freebsd.h: Remove DEFAULT_VTABLE_THUNKS (again). - -2001-11-19 Kaveh R. Ghazi - - * 1750a.md: Don't use hex format for a const_int. - -2001-11-19 Geoffrey Keating - - * expmed.c (extract_bit_field): Don't create invalid SUBREGs. - -2001-11-19 Zack Weinberg - - * mkconfig.sh: Undefine ENABLE_NLS if GENERATOR_FILE is - defined (prevents link errors when gettext isn't in the system - library). - -2001-11-19 DJ Delorie - - * read-rtl.c (ISDIGIT, ISSPACE): Make sure we have these. - (validate_const_int): New. - (read_rtx): Validate constant integers. - * config/i386/i386.md (pmulhrwv4hi3): Use decimal constants. - -2001-11-19 Jakub Jelinek - - * doc/hostconfig.texi (DUMPFILE_FORMAT): Move into the table. - -Mon Nov 19 16:57:44 2001 Douglas B. Rupp - - * toplev.c (DUMPFILE_FORMAT): Define default. - (open_dump_file): Use DUMPFILE_FORMAT in sprintf. - (close_dump_file, compile_file): Likewise. - * config/alpha/xm-vms.h (DUMPFILE_FORMAT): Define. - * doc/hostconfig.texi (DUMPFILE_FORMAT): Document - -2001-11-19 Jeff Law - - * gcse.c (cprop_jump): Clear JUMP_LABEL field when we create - a nop-jump. - -2000-11-19 Neil Booth - - * cppmacro.c (_cpp_backup_tokens): Revert previous check-in. - Don't fall off the base token run. - -2001-11-19 Jason Wilkins - - * Makefile.in: Use INSTALL_SCRIPT not INSTALL_PROGRAM. - -Mon Nov 19 15:13:43 2001 Richard Kenner - - * tree.def (VIEW_CONVERT_EXPR): New tree code. - * tree.h (handled_component_p): New declaration. - * alias.c (handled_component_p): Move function from here ... - * expr.c (handled_component_p): ... to here and non longer static. - (is_zeros_p, case VIEW_CONVERT_EXPR): New case. - (store_field): Remove unneeded MEM_COPY_ATTRIBUTES call. - (get_inner_reference): Handle VIEW_CONVERT_EXPR. - (expand_expr, case VAR_DECL): Clean up handling of re-layout case. - (expand_expr, case VIEW_CONVERT_EXPR): New case. - (expand_expr, cse ADDR_EXPR): No need to copy if already - BIGGEST_ALIGNMENT. - * fold-const.c (fold, case VIEW_CONVERT_EXPR): New case. - * varasm.c (initializer_constant_value_p, case VIEW_CONVERT_EXPR): New. - (output_constant): Handle VIEW_CONVERT_EXPR. - * dwarf2out.c (loc-descriptor_from_tree, add_bound_info): - Add new case for VIEW_CONVERT_EXPR. - -2001-11-19 Kaveh R. Ghazi - - * a29k/unix.h (ASM_FILE_START): Const-ify. - * i386/beos-elf.h (INCLUDE_DEFAULTS): Remove semi-colon. - * i386/isc.h (ASM_FILE_START): Const-ify. - * i386/sun386.h (ASM_FILE_START): Likewise. - * m32r.md: Likewise. - * m68k/auxas.h (ADDITIONAL_REGISTER_NAMES): Add missing brackets. - * m68k/auxgas.h ADDITIONAL_REGISTER_NAMES): Likewise. - * m68k/tower.h (REGISTER_NAMES): Remove semi-colon. - * mn10200.md: Initialize variable. - -Mon Nov 19 18:06:21 CET 2001 Jan Hubicka - - * gcse.c (try_replace_reg): Copy RTX before creating note. - - * df.h (df_ref_flags): New uenum. - (DF_REF_FLAGS): New macro. - (struct ref): Add field "flags". - * df.c (HANDLE_SUBREG): Remove. - (df_ref_create): Likewise; set flags field of ref. - (df_def_record_1): Strip down read_write subreg; remove - commented out code; set READ_WRITE flag. - (read_modify_subreg_p): New static function. - (df_uses_record): Cleanup SET handling; set READ_WRITE flag; - new argument "flags". - (df_insn_refs_record): Update call of df_uses_record. - (df_insn_modify): Avoid #if 0 around comment. - (df_dump): Dump the read/write flag. - - * predict.c (propagate_freq): Make cyclic_probability and frequency - volatile - - * i386.c (ix86_cc_mode): Accept USE. - - * cfgrtl.c (purge_dead_edges): Cleanup EDGE_ABNORMAL flag if computed - jump is turned into simplejump. - -2001-11-19 Joseph S. Myers - - * doc/fragments.texi, doc/trouble.texi: Remove links to old - installation chapter. - * doc/gcc.texi: Don't claim that this manual documents - installation. Mark Installation menu entry as being out of date. - -Mon Nov 19 07:21:35 2001 Douglas B. Rupp - - * config/alpha/xm-vms.h: Don't define macros that autoconf handles. - (SUCCESS_EXIT_CODE, FATAL_EXIT_CODE): Define for posix compatibility. - * gcc.c (exit): Remove definition for VMS; moved to xm-vms.h. - -2001-11-19 Jason Merrill - - * cppmacro.c (_cpp_backup_tokens): Pop cur_run before decrementing - cur_token, not after. - - * config/clipper/clix.h, config/h8300/elf.h, config/mips/linux.h: - Lose ASM_OUTPUT_CONSTRUCTOR. - * system.h: Poison it and INT_ASM_OP. - * c-lang.c (finish_file): Don't check for it. - * libgcc2.c (L_ctors): Check TARGET_ASM_CONSTRUCTOR instead. - -2001-11-18 Kaveh R. Ghazi - - * mmix.c (mmix_cc1_ignored_option): Const-ify. - (mmix_init_machine_status): Make static to match declaration. - (mmix_unique_section): Const-ify. - (mmix_output_quoted_string): Avoid automatic aggregate - initialization. - (mmix_output_register_setting): Likewise. - (mmix_output_shiftvalue_op_from_str): Likewise. - - * mmix.h (mmix_cc1_ignored_option): Const-ify. - (ASM_OUTPUT_BYTE): Fix format specifier warning. - (ASM_GENERATE_INTERNAL_LABEL): Likewise. - -2001-11-18 Craig Rodrigues - - PR c/4448 - * gthr-win32.h: (__gthread_objc_thread_exit): Fix variable - name __objc_thread_exit_status so that it matches the - variable defined in objc/thr.h. - -2001-11-18 Craig Rodrigues - - PR bootstrap/4020 - * mklibgcc.in: Add missing semi-colons. - * Makefile.in: Same. - -Sun Nov 18 16:47:00 2001 Richard Kenner - - * expr.c (expand_expr, case VAR_DECL): Update alignment of DECL_RTL - after re-laying out decl in incomplete case. - (expand_expr, case ADDR_EXPR): Fix typo in copy case. - -2001-11-18 Joseph S. Myers - - * doc/install-old.texi: Move some sections out to ... - * doc/collect2.texi, doc/configfiles.texi, doc/headerdirs.texi: - ... here. New files. Make into chapters rather than sections. - * doc/gcc.texi: Include the new files and add menu entries for - them. - * Makefile.in ($(docdir)/gcc.info, gcc.dvi): Update dependencies. - -Sun Nov 18 14:13:52 2001 Richard Kenner - - * tree.h (TYPE_ALIGN_OK): New flag. - * emit-rtl.c (set_mem_attributes): Handle it. - * expr.c (emit_single_push_insn): Only set to alias set 0 if - doing sibcall optimization. - (expand_expr, case COMPONENT_REF): Call set_mem_attributes on case - when make temporary. - (expand_expr, case CONVERT_EXPR): Simplify convert-to-union case. - (expand_expr, case ADDR_EXPR): Abort if TYPE_ALIGN_OK and need copy. - - * sdbout.c (sdbout_symbol): Avoid warning due to &DECL_RTL. - -2001-11-18 Joseph S. Myers - - * c-decl.c (c_decode_option): Give deprecation warning for - -traditional. - * doc/invoke.texi (-traditional): Note that this option is - deprecated. - -Sun Nov 18 07:40:07 2001 Douglas B. Rupp - - * config/alpha/alpha.c (alpha_start_function, VMS): Cast shift - arg to HOST_WIDE_INT, not long. - - * config/alpha/vms.h (DIR_SEPARATOR, PREFIX). Don't define. - (HAS_INIT_SECTION): Define. - (REAL_ARITHMETIC): Don't undefine. - -2001-11-18 Egor Duda - - * config/i386/cygwin.h: Strip leading '*' from name, if any. - -2001-11-18 Neil Booth - - * Makefile.in (c-parse.o, c-common.o): Update dependencies. - * c-common.c: Include diagnostic.h. - (c_common_finish): New. - * c-common.h (c_common_finish): New. - * c-lang.c (LANG_HOOKS_FINISH): Override. - * c-parse.in: Don't include diagnostic.h. - (finish_parse): Remove. - * langhooks.h: Update comments. - * toplev.c (lang_dependent_init): New prototype. - (finalize): New. - (compile_file): Split cleanup code out to finalize. - (lang_dependent_init): Stop if lang_hooks.init fails. - (toplev_main): Update. - * tree.h (finish_parse): Remove. -objc: - * objc-act.c (LANG_HOOKS_FINISH): Override. - -Sat Nov 17 23:30:44 2001 Douglas B. Rupp - - * config/alpha/t-vms (LIB2FUNCS_EXTRA): Add vms_tramp.asm. - * config/alpha/vms_tramp.asm: New file. - * config/alpha/vms-tramp.asm: Removed. - -2001-11-18 Joseph S. Myers - - * c-common.c (struct disabled_builtin, disabled_builtins, - disable_builtin_function, builtin_function_disabled_p): New. - (builtin_function_2): Check for disabled built-in functions. - * c-common.h (disable_builtin_function): Declare. - * c-decl.c (c_decode_option): Handle -fno-builtin-FUNCTION. - * doc/invoke.texi: Document -fno-builtin-FUNCTION. - * doc/extend.texi: Mention -fno-builtin-FUNCTION. - -2001-11-17 Craig Rodrigues - - PR target/4606 - * config.gcc: Remove reference to va-clipper.h. - -2001-11-17 Stan Shebs - - * config/rs6000/rs6000.h (REG_CLASS_CONTENTS): Fix the - AltiVec-related bitfields. - -Sat Nov 17 12:06:31 2001 Richard Kenner - - * except.c (enum eh_region_type): Add ERT_UNKNOWN. - (mark_eh_region, case ERT_UKNONW): New case. - -2001-11-17 Christopher Faylor - Corinna Vinschen - - * config/i386/cygwin.h: Search target specific include directory for - w32api stuff, if appropriate. - -Sat Nov 17 08:20:44 2001 Douglas Rupp - - * config/alpha/vms.h (REG_ALLOC_ORDER): Redefine. - -2001-11-16 Aldy Hernandez - - * config/rs6000/rs6000.md: Change all ldvx to lvx. - -2001-11-16 Alexandre Oliva - - * gensupport.c (process_rtx): Don't assume filename is the first - argument of any rtl. - -2001-11-16 John David Anglin - - * vax-protos.h (reg_was_0_p): New prototype. - * vax.md (movsi, movhi, movqi): Use reg_was_0_p. - * vax.c (follows_p, reg_was_0_p): New functions. - -2001-11-16 John David Anglin - - * vax.md (casesi): Swap arguments in "(plus:SI (pc) (mult))". Reformat. - (casesi1): Likewise. Define new pattern which arises by simplification - when operand 1 is a constant int. Correct pattern which arises by - simplification when operand 1 is zero. - -2001-11-16 David O'Brien - - * config.gcc (arm*-*-rtems*, arm-*-coff*, armel-*-coff*, - arm-*-vxworks*, arm-*-riscix1.[01]*, arm-*-riscix*, - arm-semi-aout, armel-semi-aout, arm-semi-aof, armel-semi-aof, - arm*-*-netbsd*, arm*-*-linux*, arm*-*-uclinux*, arm*-*-aout, - arm*-*-ecos-elf, arm*-*-elf, arm*-*-conix*, arm*-*-oabi, - arm-*-pe*, strongarm-*-elf*, strongarm-*-coff*, strongarm-*-pe, - xscale-*-elf, xscale-*-coff: Include various CPU headers via tm_file. - * config/arm/aof.h: Don't include arm.h. - * config/arm/aout.h: Likewise. - * config/arm/coff.h: Don't include semi.h and aout.h. - * config/arm/elf.h: Don't include aout.h. - * config/arm/netbsd.h: Don't include netbsd.h and aout.h. - (TARGET_VERSION): Undef before defining. - (ARM_OS_NAME): Likewise - (TARGET_DEFAULT): Likewise - (TARGET_MEM_FUNCTIONS): Do not need to undefine now. - * config/arm/pe.h: Don't include arm/coff.h. - * config/arm/riscix.h (CPP_SPEC, SUBTARGET_CPP_SPEC): Use - SUBTARGET_CPP_SPEC rather than overiding the arm.h CPP_SPEC definition. - * config/arm/riscix1-1.h: Likewise. - * config/arm/rix-gas.h: Don't include riscix.h. - (DBX_CONTIN_LENGTH): Undef before defining. - * config/arm/semi.h: Don't include aout.h. - * config/arm/semiaof.h: Don't include aof.h. - * config/arm/strongarm-coff.h: Don't include coff.h. - * config/arm/strongarm-pe.h: Don't include strongarm-coff.h and pe.h. - * config/arm/vxarm.h: Don't include arm/coff.h. - * config/arm/xscale-coff.h: Don't include coff.h. - -Fri Nov 16 15:22:35 2001 Richard Kenner - - * config/pa/pa.c: Reflect changes in calling sequences of alter_reg and - emit_cmp_insn. - -2001-11-16 Andreas Jaeger - - * cfglayout.c (fixup_fallthru_exit_predecesor): Make void, rename - to .... - (fixup_fallthru_exit_predecessor): ... this. - Change callers and prototype. - -2001-11-16 Bernd Schmidt - - * config/i386/i386.c (ix86_expand_sse_comi): Generate setcc by - hand; don't use gen_setcc_2. - (ix86_expand_builtin): Fix pshufw. - * config/i386/i386.md (maskncmpv4sf3, vmmmaskncmpv4sf3): Special - case UNORDERED to emit the right assembler instruction. - (mmx_pshufw): Lose operand 2. - (cvtsi2ss): Fix representation. - From Graham Stott: - (mmx_clrdi, sse_clrti, stmxcsr, ldmxcsr): Set memory attribute. - -2001-11-16 Joseph S. Myers - - * doc/include/linux-and-gnu.texi: Remove. - * doc/gnu.texi: New. - * doc/gcc.texi: Include gnu.texi instead of linux-and-gnu.texi. - * Makefile.in ($(docdir)/gcc.info, gcc.dvi): Update dependencies. - -2001-11-16 Kazu Hirata - - * config/a29k/a29k.c: Fix comment formatting. - * config/a29k/a29k.h: Likewise. - * config/arc/arc.c: Likewise. - * config/arc/arc.h: Likewise. - * config/vax/vax.c: Likewise. - * config/vax/vax.h: Likewise. - * config/we32k/we32k.c: Likewise. - * config/we32k/we32k.h: Likewise. - -2001-11-16 Jeff Law - - * unroll.c (copy_loop_body): Initialize JUMP_LABEL field after - creating a new jump insn. - -Fri Nov 13 09:06:25 2001 Richard Kenner - - * expr.c (expand_expr, case ADDR_EXPR): Refine test for when to - copy misaligned data. - * varasm.c (assemble_variable): Set alignment into MEM when changed. - -2001-11-16 Graham Stott - - * optabs.c (prepare_cmp_insn): Correct lossage in last change fix - OPALIGN type. - -2001-11-16 Olivier Hainque - - * except.c: Support for catching a list of types with a single handler - (struct eh_region): Change type and filter to lists for catch regions. - (mark_eh_region): Mark the filter list for GC also. - (expand_start_catch): Always build a list if argument not NULL and - register each type of the list through add_type_for_runtime. - (duplicate_eh_region_1): Change type into type_list for catch regions. - (assign_filter_values): Assign a filter to each type associated with a - catch region. Assign filter for NULL types in a unique entry in the - filter list. - (build_post_landing_pads): Emit compare and jump for each filter of - the list associated with a catch region. - (reachable_next_level): When the type thrown is known, stop the search - as soon as one type within a catch list matches. Also, a handler is - potentially reachable only if at least one of the types it catches - has not been previously caught. - (collect_one_action_chain): Retrieve the filter for a NULL type list - from the first filter list entry. For non NULL type lists, add an - action record for every filter assigned. - * except.h: Reflect changes in comment before expand_start_catch. - -Fri Nov 16 07:12:51 2001 Richard Kenner - - * expr.c (expand_expr, case ADDR_EXPR): Only copy for misaligned if - BLKmode. - -Fri Nov 16 06:37:05 2001 Andreas Tobler - - * config/sparc/sparc.c: Remove ALIGN arg from emit_cmp_insn. - -2001-11-16 Jakub Jelinek - - * c-lang.c (finish_file): Don't emit static inline functions if - they weren't referenced. - -2001-11-15 Stan Shebs - - * expr.c (expand_expr, case COMPONENT_REF): Fix variable ref. - -2001-11-16 Bryce McKinlay - - * config/s390/s390.md: Remove ALIGN arg from emit_cmp_and_jump_insns - call. - * config/i386/i386.md: Likewise. - -Thu Nov 15 21:40:16 2001 Richard Kenner - - * timevar.c (rtl.h): Include so get fancy abort. - -2001-11-15 Dale Johannesen - - * config/darwin.h (SELECT_RTX_SECTION): Force address - initializers into 'const' section - * config/rs6000/rs6000.c (rs6000_emit_cmove): Fix mode of - if_then_else to match result, not operands - -Thu Nov 15 17:57:48 2001 Richard Kenner - - * alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. - * emit-rtl.c (change_address): Fix typo in default alignment. - (adjust_address_1): Use mode of NEW, not MODE, when setting size. - * expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case. - * rtl.h (REGNO_PTR_FRAME_P): New macro. - - * expr.c (store_field): Pass tree instead of max size; callers changed. - Change handling of alignment. - Only copy to_rtx if is TARGET. - (expand_expr_unaligned): Delete; callers now use expand_expr. - (emit_cmp_insn): No longer take ALIGN parm; all callers changed. - (expand_assignment): Change handling of alignment. - Only copy to_rtx if was original. - (get_inner_reference): No longer return alginment; callers changed. - (expand_expr, case COMPONENT_REF): Change handling of alignment. - (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned. - (compare_from_rtx): Delete ALIGN parm; all callers changed. - (do_compare_rtx_and_jump): Likewise. - * expr.h: Reflect above changes. - * tree.h: Likewise. - * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter - to get_inner_reference. - * builtins.c: Remove ALIGN parm in call to emit_cmp_and_jump_insns. - * doloop.c, except.c, explow.c, loop.c, stmt.c, unroll.c: Likewise. - * optabs.c: Likewise. - (prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed. - (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed. - * expmed.c: Remove ALIGN arg from calls to compare_from_rtx, - compare_rtx_and_jump, and emit_cmp_jump_insns. - * fold-const.c: Remove PALIGN in calls to get_inner_reference. - * function.c (assign_stack_temp_for_type): No longer static. - * optabs.h (emit_cmp_insn): Remove ALIGN parm. - (prepare_cmp_insn): Delete declaration. - * rtl.h (assign_stack_temp_for_type): Add declaration. - * config/alpha/alpha.c, config/d30v/d30v.c: Reflect above changes. - * config/clipper/clipper.c, config/h8300/h8300.c: Likewise. - * config/i386/i386.c,config/mips/mips.c: Likewise. - * config/i860/i860.c, config/ia64/ia64.c: Likewise. - * config/rs6000/rs6000.c, config/sh/sh.c: Likewise. - -2001-11-15 Stan Shebs - - * config/rs6000/rs6000.h: Fix a comment typo. - (RTX_COSTS): Sort processor versions better. - -2001-11-15 Kazu Hirata - - * config/h8300/h8300.md: Fix insn length of bit insns. - -2001-11-15 Jason Merrill - - * dwarf2out.c (dwarf2out_finish): Don't abort because of orphan - DIEs if there were errors in the source. - - * config/alpha/alpha-interix.h, config/alpha/elf.h, - config/arm/coff.h, config/i386/djgpp.h, config/i386/i386.c, - config/i386/i386.h, config/i386/sco5.h, config/i960/i960-coff.h, - config/m68k/coff.h, config/m88k/m88k.h, config/m88k/m88k.c, - config/pa/pa64-hpux.h, config/sh/sh.h, config/sparc/litecoff.h, - config/elfos.h, config/lynx.h, config/netware.h, - config/m68hc11/m68hc11.h, config/mcore/mcore-pe.h, - config/s390/linux64.h: Remove definitions of INT_ASM_OP, change - uses to use ASM_LONG. - -2001-11-15 Alan Matsuoka - - * gensupport.c process_include : Change call to alloca to - xmalloc. - -2001-11-15 Aldy Hernandez - - * config/rs6000/rs6000.md: Use spaces instead of tabs in output - templates. - -Thu Nov 15 08:36:39 2001 Richard Kenner - - * final.c (alter_subreg): If simplify_subreg can't do anything, - handle REG ourselves and abort for others. - -2001-11-15 Richard Hodson - - * config/h8300/h8300.c (dosize): Avoid corrupting R3 in interrupt - routines. - -2001-11-15 Neil Booth - - * fix-header.c (read_scan_file): Update. - -Thu Nov 15 08:36:39 2001 Richard Kenner - - * toplev.c (toplev_main): Don't start timing until after - command-line options are parsed. - -2001-11-15 Andreas Schwab - - * config.gcc: Set STMP_FIXPROTO and FIXPROTO_DEFINES in target - makefile frag, not host makefile frag. - (m88k-dg-dguxbcs*): Add m88k/t-dgux to tmake_file. - (hppa*): Add pa/t-bsd to tmake_file where no special xmake_file is - used. - (hppa*-*-openbsd*): Don't use nonexitent pa/t-openbsd. - * config/m88k/t-dguxbcs: Remove definitions already in t-dgux. - * config/m88k/t-dgux (STMP_FIXPROTO): Define. - * config/i386/t-cygwin (STMP_FIXPROTO): Define. - * config/i386/t-dgux (STMP_FIXPROTO): Define. - * config/x-interix: Don't define STMP_FIXPROTO and - FIXPROTO_DEFINES. - * config/t-interix: New file, define STMP_FIXPROTO. - * config/i386/x-beos (STMP_FIXPROTO): Don't define here. - * config/i386/t-beos (STMP_FIXPROTO): Define here instead. - * config/t-svr4 (FIXPROTO_DEFINES): Define. - * config/arm/t-riscix (FIXPROTO_DEFINES): Define. - * config/i386/t-sco5 (FIXPROTO_DEFINES): Define. - * config/i386/t-sco5gas (FIXPROTO_DEFINES): Define. - * config/m68k/t-hp3200: Renamed from x-hp3200. - * config/i370/t-oe: Renamed from x-oe. - * config/mips/t-iris: Renamed from x-iris. - * config/pa/t-bsd: Renamed from x-pa. - * config/pa/t-pa-hpux: Renamed from x-pa-hpux. - * config/x-linux, config/i386/x-cygwin, config/i386/x-dgux, - config/m88k/x-dgux, config/x-svr4, config/arm/x-riscix, - config/i386/x-sco5, config/m68k/x-hp320g, config/mips/x-iris6, - config/rs6000/x-cygwin: Remove files. - - * configure.in: Check for target objdump and use that in eh_frame - optimization test. - * configure: Regenerated. - -2001-11-15 Jakub Jelinek - - * jump.c (squeeze_notes): Return true if no real insns were found. - * rtl.h (squeeze_notes): Adjust prototype. - * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): If - squeeze_notes finds no real instructions, abort. - (merge_blocks_move_successor_nojumps): Likewise. - * loop.c (find_and_verify_loops): Likewise. - * stmt.c (expand_end_case): Likewise. - * ifcvt.c (dead_or_predicable): Return TRUE if squeeze_notes doesn't - find any real instructions. - - * config/ia64/ia64.c (ia64_adjust_cost): Handle SUBREGs. - - * cfgcleanup.c (try_optimize_cfg): If try_simplify_condjump optimized - conditional jump, request updating life into for the block - containing it. Fix a typo which prevented life info update. - Clear blocks bitmap before using it. - -2001-11-15 Neil Booth - - * c-common.c: Include c-lex.h. - (c_common_lang_init): Change prototype. Call init_c_lex and - init_pragma from here. - * c-common.h (c_common_lang_init): Change prototype. - * c-decl.c (init_decl_processing): Rename. Call c_parse_init. - * c-lang.c (c_init): Change prototype. Update. - (c_init_options): Update. - * c-lex.c (cpp_filename): Remove. - (init_c_lex): Update. Read the main file, and get the original - file name. - (yyparse): Finish the command line options. - * c-parse.in (c_parse_init): Call init_reswords here. - (init_parse): Remove. - * c-tree.h (c_init_decl_processing): New. - * cpphash.c (_cpp_init_hashtable): After initializing the hash - table, populate it. - * cppinit.c (read_original_filename, cpp_finish_options): New. - (cpp_create_reader): New prototype. Defer hash table initialization. - (cpp_start_read): Rename cpp_read_main_file. Initialize the - hash table. Get the original filename. - * cpplib.h (cpp_create_reader): Update. - (cpp_start_read): Remove. - (cpp_read_main_file, cpp_finish_options): New. - * cppmain.c (main, do_preprocessing): Update. - * langhooks.h (struct langhooks): Update init prototype. - * toplev.c (general_init, parse_options_and_default_flags, - process_options, lang_indpendent_init, lang_dependent_init, - init_asm_output): New; perform the bulk of initialization. - (compile_file): Move most of initialization to above functions. - (debug_hooks): Initialize statically. - (set_Wunused): Relocate. - (toplev_main): Move most of initialization to other init functions. - Have a clear logic flow. - * tree.h (init_parse, init_decl_processing): Remove. -objc: - * objc-act.c (objc_init): Update prototype, combine with old - init_parse. - (objc_init_options): Update. - - -2001-11-15 Andreas Jaeger - - * cfgrtl.c (purge_all_dead_edges): Use int as argument for - portability. - * basic-block.h: Adjust prototype. - -2001-11-15 Kazu Hirata - - * config/rs6000/aix31.h: Fix comment formatting. - * config/rs6000/beos.h: Likewise. - * config/rs6000/darwin.h: Likewise. - * config/rs6000/eabi.asm: Likewise. - * config/rs6000/linux.h: Likewise. - * config/rs6000/linux64.h: Likewise. - * config/rs6000/lynx.h: Likewise. - * config/rs6000/netbsd.h: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/rs6000/rs6000.h: Likewise. - * config/rs6000/rs6000.md: Likewise. - * config/rs6000/sol2.h: Likewise. - * config/rs6000/tramp.asm: Likewise. - * config/rs6000/xcoff.h: Likewise. - * config/rs6000/xm-beos.h: Likewise. - -2001-11-14 Alan Matsuoka - - * rtl.def (INCLUDE) : Define. - * gensupport.c (init_include_reader, process_include, - save_string) : New functions to implement an include facility - in .md files. - * gensupport.h : Add prototype for init_md_reader_args. - * genattr.c genattrtab.c gencodes.c genconfig.c genemit.c - genextract.c genflags.c genopinit.c genoutput.c - genpeep.c genrecog.c: Change call to init_md_reader to - init_md_reader_args. - * md.texi: Document (include "path") and -I directives for RTL - generation tools. - -2001-11-14 DJ Delorie - - * integrate.c (get_hard_reg_initial_reg): New. - * integrate.h (get_hard_reg_initial_reg): Prototype. - * local-alloc.c (block_alloc): Don't tie pseudos that - represent call-saved hard regs' initial values. - -2001-11-14 Kaveh R. Ghazi - - * m68k/linux.h: Include not "linux.h" to avoid infinite - recursion. - -2001-11-14 Roger Sayle - - * fold-const.c (fold): Optimize strlen comparisons against zero. - -2001-11-14 David O'Brien - - * config.gcc (sparc64-wrs-vxworks*, sparc-*-netbsd*, sparc-*-openbsd*, - sparc-*-chorusos*, sparc-*-elf*, sparc-*-linux*aout*, - sparc-*-linux*libc1*, sparc-*-linux*, sparc-*-lynxos*, sparc-*-rtems*, - sparc-*-rtemself*, sparc-hal-solaris2*, sparc-*-solaris2*, - sparc-*-sunos4.0*, sparc-*-sunos4*, sparc-*-sunos3*, sparc-*-sysv4*, - sparc-*-vxsim*, sparclite-*-aout*, sparclite-*-elf*, sparc86x-*-aout*, - sparc86x-*-elf*, sparc64-*-aout*, sparc64-*-elf*, sparc64-*-linux*): - Include various CPU headers via tm_file. a.out based platforms now - properly include sparc/aout.h. sol2.h usage now implies including - elfos.h, svr4.h, and sparc/sysv4.h. - * config/netbsd.h (TARGET_MEM_FUNCTIONS): Undef before defining it. - Also define to '1'. - * sparc/sparc.h (CPP_PREDEFINES, TARGET_VERSION, WORD_SWITCH_TAKES_ARG, - SELECT_SECTION, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP, DBX_REGISTER_NUMBER, ASM_OUTPUT_SOURCE_LINE): - Remove. They are a.out specific and belong in sparc/aout.h. - * sparc/aout.h (TARGET_VERSION, WORD_SWITCH_TAKES_ARG, SELECT_SECTION, - ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - DBX_REGISTER_NUMBER, ASM_OUTPUT_SOURCE_LINE): Define. Moved here from - sparc/sparc.h. - * sparc/litecoff.h (WORD_SWITCH_TAKES_ARG, ASM_DECLARE_FUNCTION_NAME, - TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, DBX_REGISTER_NUMBER): Define. - Moved here from sparc/sparc.h. - * config/sparc/linux-aout.h (DEFAULT_PCC_STRUCT_RETURN): Undef before - defining. - * config/sparc/linux64.h (UNALIGNED_DOUBLE_INT_ASM_OP): Undef before - * config/sparc/lynx.h: Don't include lynx.h. - (SELECT_SECTION): Do not undef. - * config/sparc/openbsd.h: Don't include sparc/sparc.h. - * config/sparc/sol2-sld-64.h: Include sparc/sparc.h, elfos.h, svr4.h, - and sparc/sysv4.h. - * config/sparc/sol2.h: Don't include sparc/sparc.h and sparc/sysv4.h. - * config/sparc/sp64-aout.h (CPP_PREDEFINES): Don't define. Get from - sparc/aout.h now. - * config/sparc/sp64-elf.h (DWARF_DEBUGGING_INFO, DWARF2_DEBUGGING_INFO): - Don't undef, there is no need. - * config/sparc/splet.h (CPP_PREDEFINES): Define. - * config/sparc/sun4o3.h (CPP_PREDEFINES): Likewise. - * config/sparc/sunos4.h (CPP_PREDEFINES): Likewise. - Don't include sparc/sparc.h. - * config/sparc/sysv4.h (WORD_SWITCH_TAKES_ARG, ASM_OUTPUT_SOURCE_LINE, - SELECT_SECTION, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, - DATA_SECTION_ASM_OP): Don't undef, there is no need now. Don't include - elfos.h and svr4.h. - (TARGET_VERSION): Define. - * config/sparc/vxsim.h (TARGET_VERSION): Define. - -Wed Nov 14 19:46:08 CET 2001 Jan Hubicka - - * cfglayout.c (fixup_fallthru_exit_predecesor): New static function. - (cfg_layout_finalize): Use it. - * bb-reorder.c (HAVE_epilogue): Remove. - (make_reorder_chain): Do not care special placement of - last basic block. - - * predict.c (expected_value_to_br_prob): Delete the note - once transformed. - - * c-decl.c (c_expand_body): Fix TV_EXPAND nesting problem; - measure integration time separately. - -Wed Nov 14 12:30:57 2001 Richard Kenner - - * function.c (struct temp_slot): ALIGN now unsigned. - -2001-11-14 Kazu Hirata - - * config/dsp16xx/dsp16xx.c: Fix comment formatting. - * config/dsp16xx/dsp16xx.h: Likewise. - * config/dsp16xx/dsp16xx.md: Likewise. - -2001-11-14 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Reorganize the code - that deals with 7-bit shifts in HImode. - -Wed Nov 14 14:17:05 CET 2001 Jan Hubicka - - * dbxout.c (dbxout_symbol_location): Update call of alter_subreg. - * final.c (walk_alter_subreg): Take pointer; update call of alter_subreg. - (final_scan_insn): Update call of alter_subreg. - (cleanup_subreg_operands): Likewise. - (alter_subreg): Rewrite using simplify_subreg. - (output_address, output_operand): Update call of alter_subreg. - * output.h (alter_subreg): Update prototype. - * sdbout.c (sdbout_symbol): Update call of alter_subreg. - * simplify-rtx.c (simplify_subreg): Copy ORIGINAL_REGNO. - * Makefile.in (final.o): Add dependency on expr.h - -Wed Nov 14 06:37:54 2001 Richard Kenner - - * c-lang.c (finish_file): Make I unsigned to eliminate warning. - -2001-11-13 Jeff Sturm - - * doc/install.texi (sparc-*-linux*): Mention requirements for - binutils and glibc. - -2001-11-14 Joseph S. Myers - - * Makefile.in (POD2MAN): Don't include --section=1. - (manext): Rename to man1ext. All users changed. - (man7ext): New. - (man7dir): New. - (generated-manpages): Also depend on $(docdir)/gfdl.7, - $(docdir)/gpl.7, and $(docdir)/fsf-funding.7. - ($(docdir)/gcov.1, $(docdir)/cpp.1, $(docdir)/gcc.1): Include - --section=1 in calls to $(POD2MAN). - ($(docdir)/gfdl.7, $(docdir)/gpl.7, $(docdir)/fsf-funding.7): New. - (maintainer-clean, install, uninstall): Handle the new man pages. - ($(docdir)/cpp.info, cpp.dvi): Depend on fdl.texi. - (installdirs): Create man7dir. - * doc/cpp.texi: Include GFDL in this manual. In the man page, - refer to gfdl(7) for the GFDL. Apply Front Cover and Back Cover - texts to man page. Include gpl(7), gfdl(7) and fsf-funding(7) in - the SEE ALSO man page section. - * doc/gcov.texi: Apply GFDL to man page. Include gpl(7), gfdl(7) - and fsf-funding(7) in the SEE ALSO man page section. - * doc/invoke.texi: Apply GFDL to man page. Include gpl(7), - gfdl(7) and fsf-funding(7) in the SEE ALSO man page section. - * doc/include/fdl.texi, doc/include/funding.texi, - doc/include/gpl.texi: Adjust for conversion by texi2pod.pl. - * doc/.cvsignore: Add gfdl.7, gpl.7 and fsf-funding.7. - -2001-11-13 Richard Henderson - - * dwarf2asm.c (dw2_force_const_mem): Set PUBLIC or STATIC - as appropriate for the artificial decl. - -2001-11-13 Richard Henderson - - * loop.c (combine_movables): Turn off combination until - move_movables validation bugs are fixed. - -2001-11-13 DJ Delorie - - * config.gcc (powerpc|rs6000): Set default cpp options based - on --with-cpu settings. - * config/rs6000/softfloat.h: New. - -2001-11-13 Kazu Hirata - - * config/h8300/h8300.c (shift_alg_si): Use special code for - 25-bit shifts on H8S. - (get_shift_alg): Generate special code for 25-bit shifts on - H8S. - -2001-11-13 Jakub Jelinek - - * emit-rtl.c (adjust_address_1): Add ADJUST argument. - (adjust_automodify_address_1): New. - * expr.h (adjust_address, adjust_address_nv): Adjust. - (adjust_automodify_address, adjust_automodify_address_nv): Define. - (adjust_address_1): Update prototype. - (adjust_automodify_address_1): Add prototype. - * expr.c (move_by_pieces_1): Use adjust_automodify_address. - (store_by_pieces_2): Likewise. - -Tue Nov 13 05:45:40 2001 Richard Kenner - - * Makefile.in (explow.o): Now depends on ggc.h. - * explow.c (ggc.h): Include. - (set_stack_check_libfunc): Mark stack_check_libfunc as ggc root. - - * Makefile.in (expr.o): Depends on insn-attr.h. - * expr.c (insn-attr.h): New include. - (force_operand): If INSN_SCHEDULING, deal with paradoxical SUBREG - of MEM. - (highest_pow2_factor, case INTEGER_CST): Handle negative values. - (expand_expr): Remove unneeded mark_temp_addr_taken calls and - clean up related usage in ADDR_EXPR. - (expand_expr_unaligned): Likewise. - - * emit-rtl.c (change_address): Fix typo in alias setting. - -2001-11-13 Kaveh R. Ghazi - - * Makefile.in (cfgcleanup.o): Depend on insn-config.h - -2001-11-12 Craig Rodrigues - - PR bootstrap/3451 - * c-pragma.c: Rename macros BAD, BAD2, BAD_ACTION to - GCC_BAD, GCC_BAD2, GCC_BAD_ACTION. - -2001-11-12 David O'Brien - - * config.gcc (sparc-tti-*, sparc64-wrs-vxworks*, sparc-wrs-vxworks*, - sparclite-wrs-vxworks*, sparc-*-aout*, sparc-*-netbsd*, - sparc-*-chorusos*, sparc-*-linux*aout*, sparc-*-linux*libc1*, - sparc-*-linux*, sparc-*-lynxos*, sparc-*-rtemsaout*, sparc-*-rtems*, - sparc-*-rtemself*, sparc-*-solaris2*, sparc-*-sunos3*, sparc-*-sysv4*, - sparc-*-vxsim*, sparclet-*-aout*, sparclite-*-coff*, sparclite-*-aout*, - sparc86x-*-aout*, sparc86x-*-elf*, sparc64-*-aout*, sparc64-*-elf*, - sparc64-*-linux*): Include various CPU headers via tm_file. - * config/svr3.h (ASM_OUTPUT_IDENT): Undef before defining it. - (SELECT_SECTION): Likewise. - (SELECT_RTX_SECTION): Likewise. - * config/sparc/sparc_bi.h: New file. - * config/sparc/aout.h: Don't include sparc/sparc.h and aoutos.h. - * config/sparc/linux-aout.h: Likewise. - * config/sparc/linux.h: Don't include sparc/sysv4.h. - * config/sparc/linux64.h: Likewise. - (SPARC_BI_ARCH): Don't define. sparc_bi.h will do it instead. - * config/sparc/lite.h: Don't include sparc/sparc.h and gofast.h. - * config/sparc/litecoff.h: Don't include sparc/lite.h, svr3.h, - and dbxcoff.h - (ASM_OUTPUT_IDENT): Do not #undef. - (SELECT_SECTION): Likewise. - (SELECT_RTX_SECTION): Likewise. - * config/sparc/liteelf.h: Don't include gofast.h. - * config/sparc/lynx-ng.h: Don't include sparc/sparc.h and lynx-ng.h. - * config/sparc/lynx.h: Don't include sparc/sparc.h. - * config/sparc/pbd.h: Likewise. - * config/sparc/netbsd.h: Don't include sparc/sparc.h and netbsd.h. - * config/sparc/rtems.h: Don't include sparc/aout.h and rtems.h. - * config/sparc/rtemself.h: Don't include rtems.h. - * config/sparc/sol2-64.h: Don't include sparc/sol2-sld-64.h. - * config/sparc/sol2-sld-64.h (SPARC_BI_ARCH): Don't define, include - sparc_bi.h instead. - * config/sparc/sol2-sld.h: Don't include sparc/sol2.h. - * config/sparc/sol2.h: Include sparc/sparc.h directly. - * config/sparc/sp64-aout.h: Don't include sparc/sparc.h and aoutos.h. - * config/sparc/sp64-elf.h: Don't include sparc/sol2.h. - * config/sparc/sp86x-aout.h: Don't include sparc/sparc.h and gofast.h. - * config/sparc/sp86x-elf.h: Don't include gofast.h. - * config/sparc/splet.h: Don't include sparc/aout.h. - * config/sparc/sun4o3.h: Don't include sparc/sparc.h. - * config/sparc/sysv4.h: Don't include sparc/sparc.h directly. - * config/sparc/vxsim.h: Don't include sparc/sysv4.h. - * config/sparc/vxsparc.h: Don't include sparc/aout.h and gofast.h. - * config/sparc/vxsparc64.h: Don't include gofast.h. - (SPARC_BI_ARCH): Don't define. sparc_bi.h will do it instead. - -2001-11-12 Joseph S. Myers - - * doc/standards.texi: Mention C99 TC1. - -2001-11-12 Kaveh R. Ghazi - - * mips-protos.h (mips_output_conditional_branch): Const-ify. - * mips.c (mips_output_conditional_branch): Likewise. - -2001-11-12 Kazu Hirata - - * config/h8300/h8300.c (shift_alg_si): Use special code for - 15-bit logical shifts and 31-bit logical shifts. - (get_shift_alg): Generate special code for 15-bit and 31-bit - logical shifts. - -2001-11-12 Kazu Hirata - - * config/h8300/h8300.c (shift_alg_qi): Use rotations when - doing 6-bit logical shifts on H8S. - (shift_alg_qi): Use special code for 21-bit shifts on H8S. - (get_shift_alg): Generate special code for 21-bit shifts on - H8S. - -2001-11-12 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Remove a redundant - label. - -Mon Nov 12 11:58:26 2001 Richard Kenner - - * alias.c (nonoverlapping_memrefs_p): Only update size from memref - if both size and offset known. - -2001-11-12 David O'Brien - - * config/ia64/freebsd.h: Fix misspelling. - -2001-11-12 Joseph S. Myers - - * doc/gcc.texi: Move several chapters out to ... - * doc/configterms.texi, doc/fragments.texi, doc/hostconfig.texi, - doc/include/linux-and-gnu.texi, doc/interface.texi, - doc/makefile.texi, doc/passes.texi, doc/portability.texi: - ... here. New files. - * doc/gcc.texi, doc/contrib.texi: Move section headings into - contrib.texi. - * Makefile.in ($(docdir)/gcc.info, gcc.dvi): Update dependencies. - -2001-11-12 Kazu Hirata - - * config/alpha/alpha-interix.h: Fix comment formatting. - * config/alpha/alpha.c: Likewise. - * config/alpha/alpha.h: Likewise. - * config/alpha/alpha32.h: Likewise. - * config/alpha/freebsd.h: Likewise. - * config/alpha/unicosmk.h: Likewise. - * config/alpha/vms.h: Likewise. - -2001-11-12 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Remove redundant code. - -2001-11-12 Jakub Jelinek - - * dbxout.c (dbxout_symbol_location): Avoid emitting invalid register - numbers. - -Mon Nov 12 05:18:42 2001 Richard Kenner - - * emit-rtl.c (set_mem_attributes): If making object, can set alignment - from type. - (replace_equiv_address): Call update_temp_slot_address. - - * dwarf2out.c (loc_descriptor_from_tree, case COMPOUND_EXPR): New case. - - * alias.c (nonoverlapping_memrefs_p): Handle DECL_RTL being a CONCAT. - -2001-11-12 Kazu Hirata - - * config/h8300/h8300.c (shift_alg_qi): New. - (shift_alg_hi): Likewise. - (shift_alg_si): Likewise. - (get_shift_alg): Change the type of count to unsigned int. - Use the tables. - -2001-11-11 Alexandre Oliva - - * Makefile.in (c-lang.o): Depend on $(VARRAY_H). - * c-decl.c (c_expand_body): Take argument can_defer_p. Use it - to decide whether to defer a function. - (finish_function): Adjust. - (c_expand_deferred_function): New function. - * c-lang.c (deferred_fns): New variable. - (c_init): Initialize it, and mark it as a root. - (defer_fn): New function. - (finish_file): Expand all deferred functions. - * c-tree.h (defer_fn): Declare. - (c_expand_deferred_function): Likewise. - * objc/Make-lang.in (objc-act.o): Depend on $(VARRAY_H). - * objc-act.c (deferred_fns): New variable. - (objc_init): Initialize it, and mark it as a root. - (defer_fn): New function. - (finish_file): Expand all deferred functions. - -2001-11-11 Kaveh R. Ghazi - - * alpha.c (unicosmk_special_name): Prototype. - (unicosmk_ssib_name): Delete unused variable. - * alpha/unicosmk.h (common_section, ssib_section): Prototype. - * alpha/vms.h (PREFIX): Undef before defining. - * arm/pe.h (SUBTARGET_NAME_ENCODING_LENGTHS): Likewise. - * i370/i370.c (mvs_hash_alias): Prototype. Wrap with macro - controlling usage. Const-ify. - (alias_number): Delete unused variable. - * m32r/m32r.c (m32r_sched_init): Add missing argument. - (m32r_expand_block_move): Fix uninitialized warnings. - * mn10300/mn10300.h (REGNO_IN_RANGE_P): Fix 'unsigned >=0 is - always true' warnings. - * openbsd.h (TARGET_MEM_FUNCTIONS): Don't redefine. - * sh/sh.c: Include "integrate.h". - (output_far_jump): Fix uninitialized warning. - * final.c (shorten_branches): Avoid automatic aggregate - initialization. - * integrate.c (subst_constants): Likewise. - -2001-11-11 Kazu Hirata - - * config/h8300/h8300.c (shift_alg): Remove SHIFT_MAX. - (get_shift_alg): Remove redundant code. - -2001-11-11 Kazu Hirata - - * config/pa/milli64.S: Fix comment formatting. - * config/pa/pa-64.h: Likewise. - * config/pa/pa-linux.h: Likewise. - * config/pa/pa-protos.h: Likewise. - * config/pa/pa.c: Likewise. - * config/pa/pa.h: Likewise. - * config/pa/pa32-linux.h: Likewise. - * config/pa/pa32-regs.h: Likewise. - * config/pa/pa64-hpux.h: Likewise. - * config/pa/pa64-regs.h: Likewise. - * config/pa/som.h: Likewise. - -2001-11-11 Joseph S. Myers - - * doc/gcc.texi: Move several chapters out to ... - * doc/bugreport.texi, doc/contribute.texi, doc/frontends.texi, - doc/service.texi, doc/standards.texi, doc/trouble.texi, - doc/vms.texi: ... here. New files. - * Makefile.in ($(docdir)/gcc.info, gcc.dvi): Update dependencies. - -2001-11-11 Joseph S. Myers - - * ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog.5, ChangeLog, - cfg.c, cfganal.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgrtl.c, - collect2.c, combine.c, config.in, configure, configure.in, - conflict.c, dwarf2out.c, dwarfout.c, except.c, final.c, flow.c, - genattrtab.c, ggc-page.c, jump.c, lcm.c, predict.c, reg-stack.c, - reload1.c, rtlanal.c, sched-rgn.c, toplev.c, unwind-dw2-fde.h: Fix - spelling errors. - -Sun Nov 11 05:56:01 2001 Richard Kenner - - * config/rs6000/rs6000.c (rs6000_hash_constant, toc_hash_eq): - Adjust operand number in CONST_DOUBLE. - - * expmed.c (extract_bit_field): No longer pass in alignment. - (extract_fixed_bit_field, extract_split_bit_field): Likewise. - (store_bit_field, store_fixed_bit_field, store_split_bit_field): - Likewise. - * expr.c (store_constructor, store_constructor_field): Likewise. - (store_field, emit_group_load, emit_group_store): Likewise. - * expr.h (emit_group_load, emit_group_store): Delete ALIGN parm. - (store_bit_field, extract_bit_field): Likewise. - * calls.c, expr.c, function.c: Change calls to above functions. - * ifcvt.c, stmt.c: Likewise. - - * alias.c (nonoverlapping_memrefs_p): Not overlapping if one base is - constant and one is on frame. - If know memref offset, adjust size from decl. - -2001-11-11 Kaveh R. Ghazi - - * alpha/unicosmk.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Fix - format specifier warning. - * convex.h (ASM_OUTPUT_BYTE): Likewise. - * elfos.h (ALIGN_ASM_OP): Undef before defining. - * i386/att.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier - warning. - * i386/bsd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * i386/gas.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * i386-interix.h (gen_stdcall_suffix): Prototype. - * i386.h (ASM_OUTPUT_BYTE): Fix format specifier warning. - * i386elf.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE, - ASM_OUTPUT_LONG_DOUBLE): Likewise. - * i386/interix.c (gen_stdcall_suffix): Const-ify. - * i386/next.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, - ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Fix format - specifier warnings. - * i386/osfrose.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * i386/ptx4-i.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE, - ASM_OUTPUT_LONG_DOUBLE): Likewise. - * i386/sco5.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * i386/sequent.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * i386/sun386.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * i386/svr3dbx.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * m68k/3b1.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE, - ASM_OUTPUT_FLOAT, ASM_GENERATE_INTERNAL_LABEL): Likewise. - * m68k/altos3068.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. - * m68k/amix.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL): - Likewise. - * m68k/atari.h (ASM_OUTPUT_ASCII, ASM_GENERATE_INTERNAL_LABEL): - Likewise. - * m68k/crds.h (ASM_OUTPUT_DOUBLE, PRINT_OPERAND): Likewise. - * m68k/dpx2.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, - ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE, ASM_OUTPUT_FLOAT_OPERAND): - Likewise. - * m68k/hp320.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_BYTE): - Likewise. - * m68k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE): - Likewise. - * m68k/m68kv4.h (ASM_OUTPUT_ASCII): Delete unused variable. - * m68k/mot3300.h (ASM_OUTPUT_BYTE): Fix format specifier warning. - * m68k/news.h (PRINT_OPERAND): Likewise. - * m68k/next.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT, - ASM_OUTPUT_FLOAT_OPERAND, ASM_OUTPUT_DOUBLE_OPERAND): Likewise. - * m68k/next21.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. - * m68k/plexus.h (ASM_SPEC): Insert space between macro name and - definition. - * m68k/sgs.h (ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, - ASM_OUTPUT_FLOAT, ASM_OUTPUT_ASCII, ASM_OUTPUT_FLOAT_OPERAND, - ASM_OUTPUT_DOUBLE_OPERAND): Fix format specifier warnings. - * m68k/sun3.h (ASM_OUTPUT_FLOAT_OPERAND): Likewise. - * m68k/tower-as.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_DOUBLE, - ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_FLOAT, ASM_OUTPUT_BYTE, - PRINT_OPERAND): Likewise. - * m88k/m88k.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_BYTE): - Likewise. - * mips/elf.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise. - * mips/elf64.h (PUT_SDB_SIZE, ASM_DECLARE_OBJECT_NAME): Likewise. - * mips/iris5gas.h (PUT_SDB_SIZE): Likewise. - * mips/linux.h (ASM_DECLARE_OBJECT_NAME): Likewise. - * mips.c (mips_output_external_libcall): Mark parameter with - ATTRIBUTE_UNUSED. - (mips_asm_file_start): Move variable into the scope where it's - used. - * mips.h (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise. - * mips/netbsd.h (ASM_DECLARE_OBJECT_NAME): Likewise. - * mips/sni-gas.h (PUT_SDB_SIZE): Likewise. - * ns32k/encore.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * ns32k.c (print_operand): Likewise. - * pa.c (print_operand, output_div_insn): Likewise. - * pa.h (ASM_OUTPUT_MI_THUNK, ASM_GENERATE_INTERNAL_LABEL, - ASM_OUTPUT_BYTE, PRINT_OPERAND_ADDRESS): Likewise. - * pa/pa64-hpux.h (UNIQUE_SECTION): Const-ify. - * sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Fix format - specifier warnings. - * sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * sparc/pbd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - (ASM_OUTPUT_SOURCE_LINE): Don't list macro arguments in undef. - * sparc/vxsim.h (ASM_GENERATE_INTERNAL_LABEL): Fix format - specifier warnings. - * svr3.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - - * sdbout.c (sdbout_end_epilogue): Mark parameter with - ATTRIBUTE_UNUSED. - * varasm.c (assemble_global): Likewise. - -2001-11-11 H.J. Lu - - * config.gcc: Add "elfos.h svr4.h" to $tm_file for Linux/mips. - -Sun Nov 11 01:26:00 CET 2001 Jan Hubicka - - * final.c (*_MAX_SKIP): Use *_max_skip variables. - * flags.h (align_loops_max_skip, align_jumps_max_skip, - align_labels_max_skip): New global variables. - * toplev.c (align_loops_max_skip, align_jumps_max_skip, - align_labels_max_skip): New global variables. - (toplev_main): Set new variables. - * i386.c (override_options): Set max_skip values. - -2001-11-10 Geoffrey Keating - - * doc/tm.texi (Label Output): Document ASM_OUTPUT_LABEL_REF. - * final.c (output_addr_const): Use ASM_OUTPUT_LABEL_REF. - * config/stormy16/stormy16.c (xstormy16_print_operand): For '%C', - don't print an @fptr for labels either. - (xstormy16_output_addr_vec): Don't print @fptr here. - * config/stormy16/stormy16.h (ASM_OUTPUT_LABEL_REF): New macro. - -Sat Nov 10 08:50:50 2001 Jeffrey A Law (law@cygnus.com) - - * ssa-ccp.c (examine_flow_edges): Use old-style definition, not - an ANSI/ISO definitino. - (ssa_const_prop): Likewise. - -2001-11-10 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_reg_names): Remove leading "v" or - altivec registers. - -2001-11-09 Kaveh R. Ghazi - - * cppexp.c (parse_number): Use ISXDIGIT/hex_value. - * cpplex.c (hex_digit_value): Use hex_p/hex_value. - * cppmain.c (general_init): Call hex_init. - * tradcif.y (parse_number): Use TOLOWER/ISXDIGIT/hex_value/hex_p. - - * config.gcc (i[34567]86-dg-dgux*): Don't set `out_file'. - - * i386/dgux.h (ASM_FILE_START): Set to the meaningful portions - of dgux.c:output_file_start(). - - * i386/dgux.c: Delete file. - -2001-11-09 Richard Henderson - - * config/alpha/alpha.c (decl_in_text_section): New. - (current_file_function_operand): Use it. - (alpha_encode_section_info, alpha_end_function): Likewise. - -2001-11-07 David O'Brien - - * config.gcc: Add FreeBSD/IA-64 target. Expand config/i64/elf.h headers. - * config/i64/ia64.h (TARGET_VERSION,ASM_SPEC,LINK_SPEC): Remove, - they are OS specific. Use CPP_CPU_SPEC rather than CPP_PREDEFINES, - so OS specific files and use CPP_PREDEFINES for their needs. - * config/i64/elf.h (TARGET_VERSION): Add. Also, move inclusion of - target headers to tm_file. - * config/ia64/aix.h (TARGET_VERSION): Likewise. - * config/ia64/hpux.h (TARGET_VERSION): Likewise. - * config/ia64/linux.h (TARGET_VERSION): Likewise. - (FUNCTION_PROFILER): Remove. - * config/ia64/ia64.h (FUNCTION_PROFILER): Update definition using the - version in config/ia64/linux.h. - * config/ia64/freebsd.h: New file. - * config/freebsd.h: Tidy up. - (_USING_CONFIG_FREEBSD): Define. - (FBSD_CPP_PREDEFINES): Add __KPRINTF_ATTRIBUTE__. - (FBSD_CPP_SPEC): Define generic FreeBSD spec. - (FBSD_STARTFILE_SPEC): Likewise. - (FBSD_ENDFILE_SPEC): Likewise. - (FBSD_LIB_SPEC): Likewise. - (WCHAR_UNSIGNED): Undefine, FreeBSD's wchars are signed. - (USER_LABEL_PREFIX): Define to ELF compatible value as some CPU headers - set an ELF-improper one. - -2001-11-09 John David Anglin - - * pa.c (emit_move_sequence): Use cint_ok_for_move to check whether a - constant can be loaded in a single instruction to a register. When - loading immediate constants, use PLUS instead of HIGH/LO_SUM. Use - depdi for insertion of most significant 32-bits on 64-bit hosts. - * pa.h (LEGITIMATE_CONSTANT_P): Accept constants that can be built - with ldil/ldo/depdi instruction sequence on 64-bit hosts. - * pa.md: New addmove pattern for adding constant_int to HImode - register and moving result to HImode register. Remove HImode HIGH - and LO_SUM patterns. - -2001-11-09 Neil Booth - - * Makefile.in: Update. - * c-decl.c (print_lang_decl, print_lang_type): Remove. - (print_lang_identifier): Rename c_print_identifier. - * c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. - (print_lang_statistics, lang_print_xnode): Remove. - * c-parse.in (set_yydebug): Rename c_set_yydebug. - * c-tree.h (c_set_yydebug, c_print_identifier): New. - * langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New. - LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, - LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, - LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New. - (LANG_HOOKS_INITIALIZER): Update. - * langhooks.h (struct lang_hooks): New members. - (lang_print_tree_hook): New. - * langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New. - * print-tree.c: Include langhooks.h. - (print_node): Update. - * toplev.c (decode_d_option): Update. - * tree.c: Include langhooks.h. - (dump_tree_statistics): Update. - * tree.h (print_lang_statistics, print_lang_decl, print_lang_type, - print_lang_identifier, set_yydebug, lang_print_xnode): Remove. -objc: - * objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER, - LANG_HOOKS_SET_YYDEBUG): Override. - (lang_print_xnode, print_lang_statistics): Remove. - -2001-11-09 Richard Henderson - - * dwarf2asm.c (dw2_force_const_mem): Invoke STRIP_NAME_ENCODING - on the symbol string. - -2001-11-09 Kaveh R. Ghazi - - * pa/elf.h (ASM_DECLARE_FUNCTION_NAME, - ASM_OUTPUT_EXTERNAL_LIBCALL): Undef before defining. - * config.gcc (hppa1.1-*-rtems*): Remove duplicate clause. - - * clipper.h (ASM_OUTPUT_REG_POP): Fix typo. - - * tlink.c (recompile_files): Copy strings passed to `putenv'. - -2001-11-09 Geoffrey Keating - - * tree.h (TYPE_VOLATILE): Trap use not on TYPEs. - (TYPE_READONLY): Likewise. - - * flow.c (insn_dead_p): Allow for AUTO_INC notes all the time. - - * config/stormy16/stormy16.h (ASM_SPEC): Revert last change, - don't pass --gdwarf2 to the assembler if the compiler will also - provide debug info. - - * config/stormy16/stormy16.c (xstormy16_expand_casesi): - Don't change INDEX. - -Fri Nov 9 17:51:09 2001 Richard Kenner - - * alias.c (nonoverlapping_memrefs_p): New function. - (true_dependence, canon_true_depenence, write_dependence_p): Call it. - - * emit-rtl.c (set_mem_attributes): Get alignments for constants. - -2001-11-09 Aldy Hernandez - - * rs6000.h (REG_CLASS_CONTENTS): Add VRSAVE bit to ALL_REGS. - (CONDITIONAL_REGISTER_USAGE): Disable AltiVec registers unless - generating altivec code. - (FIXED_REGISTERS): VRSAVE is fixed. - (CALL_USED_REGISTERS): VRSAVE is call used. - -2001-11-09 Jason Eckhardt - - * config/mips/mips.c (mips_output_conditional_branch): Do not hard - code the branch target as ".+16/.+12", but rather use labels. - -Fri Nov 9 11:27:42 2001 Jeffrey A Law (law@cygnus.com) - - * config/pa/milli64.S: Use %r25 and %r0 instead of arg1 and r0 - to work around limitations of certain versions of GAS. - - * pa.md (mulsi3): Remove PA64 hack to work around SUBREG issues. - (muldi3): Update due to SUBREG_BYTE changes. - (casesi): Similarly. - -2001-11-09 Zack Weinberg - - * doc/invoke.texi: Remove comment referring to -xf77-version. - -2001-11-09 Kazu Hirata - - * config/convex/convex.c: Fix comment formatting. - * config/convex/convex.h: Likewise. - -2001-11-08 Zack Weinberg - - * Makefile.in (.po.pox): Look both in srcdir and builddir - for $(PACKAGE).pot. - (po/$(PACKAGE).pot): Don't move-if-change the new potfile over - to the source directory. - -2001-11-09 Ben Elliston - Michael Meissner - Andrew MacLeod - Richard Henderson - Nick Clifton - Catherine Moore - - * m32r.c: Add support for m32rx processor. - * m32r.h: Ditto. - * m32r.md: Ditto. - * t-m32r: Ditto. - * m32r-protos.h: Add prototypes for m32rx functions. - * doc/invoke.texi: Document -m32rx option. - -2001-11-09 Jakub Jelinek - - * config/sparc/sparc.md (movdf): Avoid calling validize_mem during - or after reload. - -2001-11-09 Gerald Pfeifer - - * doc/install.texi2html: Use $MAKEINFO --no-split. - -2001-11-09 Andreas Schwab - - * Makefile.in ($(HOST_PREFIX_1)rtl.o, - $(HOST_PREFIX_1)print-rtl.o, $(HOST_PREFIX_1)bitmap.o, - $(HOST_PREFIX_1)vfprintf.o, $(HOST_PREFIX_1)doprint.o, - $(HOST_PREFIX_1)strstr.o, $(HOST_PREFIX_1)errors.o, - $(HOST_PREFIX_1)ggc-none.o): Update dependencies. - -2001-11-09 H.J. Lu - - * config/mips/mips.c (mips_output_function_prologues): Cast - `tsize' to long for output. - -2001-11-09 Neil Booth - - * c-lang.c (LANG_HOOKS_NAME): New. - (lang_hooks): Constify. - (c_init_options): Update. - (lang_identify): Remove. - * c-parse.in (language_string): Remove. - * dbxout.c: Include langhooks.h. - (dbxout_symbol_location): Update. - * dwarf2out.c: Include langhooks.h. - (gen_compile_unit_die): Update. - * dwarfout.c: Include langhooks.h. - (prototyped_attribute, output_compile_unit_die): Update. - * langhooks-def.h (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): New. - (LANG_HOOKS_INITIALIZER): Update. - * langhooks.h (struct lang_hooks): New members. Constify. - * stringpool.c: Don't include toplev.h. - (set_identifier_size): Remove. - * toplev.c (toplev_main): Initialize identifier size. - (print_version): Update. - * tree.h (language_string, init_lex, lang_identify, - set_identifier_size): Remove. - * Makefile.in: Update dependencies. - * config/darwin.c: Include langhooks.h. - (func_name_maybe_scoped): Update. - * config/darwin.h (ASM_END_FILE): Update. - * config/nextstep.h (ASM_END_FILE): Update. - * config/nextstep21.h (ASM_END_FILE): Update. - * config/i386/sun386.h (ASM_END_FILE): Update. - * config/rs6000/rs6000.c (ASM_END_FILE): Include langhooks.h. - (rs6000_output_function_epilogue): Update. -objc: - * objc-act.c (LANG_HOOKS_NAME): Override. - (struct lang_hooks): Constify. - (objc_init_options): Update. - (lang_identify): Remove. - -Fri Nov 9 00:25:18 EST 2001 John Wehle (john@feith.com) - - * fold-const.c (lshift_double): Honor PREC. - (rshift_double): Likewise. - -2001-11-08 Kazu Hirata - - * config/1750a/1750a.c: Fix comment formatting. - * config/1750a/1750a.h: Likewise. - -2001-11-08 Phil Edwards - - * configure.in (--enable-languages): Be more permissive about - syntax. Check for empty lists better. Warn about $LANGUAGES. - * configure: Regenerated. - -2001-11-08 Richard Henderson - - * dwarf2asm.c (dw2_force_const_mem): Fix typo. - -2001-11-08 Geoffrey Keating - - * config.gcc: Rename stormy16 to xstormy16. - * config/stormy16/stormy-abi: Likewise. - * config/stormy16/stormy16-protos.h: Likewise. - * config/stormy16/stormy16.c: Likewise. - * config/stormy16/stormy16.h: Likewise. - * config/stormy16/stormy16.md: Likewise. - -2001-11-06 Geoffrey Keating - - * tree.h (TYPE_VOLATILE): Add enable-checking code. - (TYPE_READONLY): Likewise. - -Thu Nov 8 18:00:55 2001 Richard Kenner - - * reload1.c (reload): Don't delete equiv insn if can throw. - - * expr.c (emit_block_move): If X is readonly emit CLOBBER for it. - (clear_storage): Likewise, for OBJECT. - -Thu Nov 8 16:23:51 2001 Jeffrey A Law (law@cygnus.com) - - * pa.c (emit_move_sequence): Fix SUBREG expression to - use proper byte offset when extending a constant from - SImode to DImode. - -2001-11-09 Jakub Jelinek - - * cfgrtl.c (purge_dead_edges): Remove REG_EH_REGION note for insns - which cannot throw. - -Thu Nov 8 18:00:55 2001 Richard Kenner - - * explow.c (convert_memory_address, case SUBREG): Only return - inner object if SUBREG_PROMOTED_VAR_P or known to be pointer. - -2001-11-08 Richard Henderson - - * Makefile.in (GCC_FOR_TARGET): Add build_tooldir/sys-include. - (CROSS_SYSTEM_HEADER_DIR): Use build_tooldir not tooldir. - (ORDINARY_FLAGS_TO_PASS, stmp-fixinc): Likewise. - -2001-11-08 Aldy Hernandez - - * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add -maltivec. - -2001-11-08 Jakub Jelinek - - * dwarf2out.c (debug_str_hash): New. - (struct indirect_string_node): New. - (struct dw_val_struct): Change type of val_str to it. - (DEBUG_STR_SECTION_FLAGS): Define. - (add_AT_string): Push string into hashtable, increment reference - counter. - (AT_string): Return string from ht_identifier. - (AT_string_form): New. - (free_AT): For dw_val_class_str, just decrement reference counter. - (size_of_string): Remove. - (size_of_die): Use AT_string_form to decide what size the string - occupies in DIE. - (size_of_pubnames): Use strlen instead of size_of_string. - (value_format): Use AT_string_form for dw_val_class_str. - (output_die): Output DW_FORM_strp strings using - dw2_asm_output_offset. - (indirect_string_alloc, output_indirect_string): New. - (dwarf2out_finish): Emit .debug_str strings if there are any. - -2001-11-08 Andreas Franck - - * configure.in: Add AC_ARG_PROGRAM to support program name - transformation with --program-prefix, --program-suffix and - --program-transform-name. - * configure: Regenerated. - * Makefile.in (GCC_INSTALL_NAME, CPP_INSTALL_NAME, - PROTOIZE_INSTALL_NAME, UNPROTOIZE_INSTALL_NAME, GCOV_INSTALL_NAME, - GCCBUG_INSTALL_NAME, GCC_CROSS_NAME, CPP_CROSS_NAME, - PROTOIZE_CROSS_NAME, UNPROTOIZE_CROSS_NAME): Handle - program_transform_name the way suggested by autoconf. - (GCC_TARGET_INSTALL_NAME): Define. - (install-driver): Use the transformed target alias name. - -2001-11-08 Richard Henderson - - * config/mips/mips.c (save_restore_insns): Remove GP from the - restore registers mask early instead of special casing it inside - the loop. - -2001-11-08 Neil Booth - - * cp/decl.c (shadow_warning): New function. - (pushdecl): Improve -Wshadow warnings. Don't give both a warning - and an error when a block scope decl shadows a parameter. - -2001-11-08 Richard Henderson - - * config/fp-bit.h (usi_to_float): Define for US_SOFTWARE_GOFAST - case as well. - -2001-11-08 John David Anglin - - * pa.md (negdf2, negsf2): Use multiplication rather than subtraction - to implement floating negation on processors prior to PA 2.0. - -2001-11-08 Jakub Jelinek - - * dwarf2asm.c (mark_indirect_pool_entry, mark_indirect_pool): New. - (USE_LINKONCE_INDIRECT): Define. - (dw2_output_indirect_constant_1): Try to output indirect constants - into linkonce sections if possible. - (dw2_force_const_mem): Likewise. Register indirect_pool with GGC. - (dw2_output_indirect_constants): Likewise. - -2001-11-07 Aldy Hernandez - - * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Add vrsave. - -2001-11-07 Neil Booth - - * c-decl.c (pushdecl): Remove file and line. - * c-typeck.c (pop_init_level): Remove size. - -2001-11-07 Aldy Hernandez - - * doc/invoke.texi: Add -maltivec, -mno-altivec, and -mabi=altivec - for rs6000. - - * config/rs6000/rs6000.h (MASK_ALTIVEC): New. - (TARGET_ALTIVEC): New. - (TARGET_SWITCHES): Add altivec. - (FIRST_PSEUDO_REGISTER): Change to 109. - (CALL_USED_REGISTERS): Same. - (FIRST_ALTIVEC_REGNO): New. - (LAST_ALTIVEC_REGNO): New. - (ALTIVEC_REGNO_P): New. - (UNITS_PER_ALTIVEC_WORD): New. - (ALTIVEC_VECTOR_MODE): New. - (FIXED_REGISTERS): Add altivec registers. - (REG_ALLOC_ORDER): Same. - (HARD_REGNO_NREGS): Adjust for altivec registers. - (HARD_REGNO_MODE_OK): Same. - (MODES_TIEABLE_P): Same. - (REGISTER_MOVE_COST): Same. - (REGNO_REG_CLASS): Same. - (reg_class): Add ALTIVEC_REGS. - (REG_CLASS_NAMES): Same. - (REG_CLASS_CONTENTS): Same. - (REG_CLASS_FROM_LETTER): Add 'v' constraint for ALTIVEC_REGS. - (ALTIVEC_ARG_RETURN): New. - (FUNCTION_VALUE): Handle VECTOR_TYPE. - (LIBCALL_VALUE): Handle altivec vector modes. - (VECTOR_MODE_SUPPORTED_P): New. - (ALTIVEC_ARG_MIN_REG): New. - (ALTIVEC_ARG_MAX_REG): New. - (ALTIVEC_ARG_NUM_REG): New. - (FUNCTION_VALUE_REGNO_P): Return true for altivec return register. - (FUNCTION_ARG_REGNO_P): Support passing args in altivec registers. - (REGISTER_NAMES): Add altivec regs. - (DEBUG_REGISTER_NAMES): Same. - (ADDITIONAL_REGISTER_NAMES): Same. - (rs6000_builtins): New. - (MD_EXPAND_BUILTIN): New. - (MD_INIT_BUILTINS): New. - (LEGITIMATE_OFFSET_ADDRESS_P): This addressing mode is not valid - for AltiVec instructions. - (LEGITIMATE_LO_SUM_ADDRESS_P): Same. - (HARD_REGNO_MODE_OK): Altivec modes can only go in altivec - registers. - (SECONDARY_MEMORY_NEEDED): We need memory to copy vector modes. - (TARGET_SWITCHES): Add no-altivec. - (DATA_ALIGNMENT): Align vectors to 128 bits. - (TARGET_OPTIONS): Add abi= option. - Add rs6000_abi_string extern. - (LOCAL_ALIGNMENT): New. - (CPP_CPU_SPEC): Define __ALTIVEC__ when -maltivec. - (MASK_ALTIVEC_ABI): New. - (TARGET_ALTIVEC_ABI): New. - (CONDITIONAL_REGISTER_USAGE): Set first 20 AltiVec registers to - call-saved. - (STACK_BOUNDARY): Adjust for altivec. - (BIGGEST_ALIGNMENT): Same. - (rs6000_args): Add vregno. - (USE_ALTIVEC_FOR_ARG_P): New. - (FIXED_REGISTERS): Add vrsave register. - (CALL_USED_REGISTERS): Same. - (CONDITIONAL_REGISTER_USAGE): Set VRSAVE info. - (VRSAVE_REGNO): New. - (reg_class): Add VRSAVE_REGS. - (REG_CLASS_NAMES): Same. - (REG_CLASS_CONTENTS): Same. - (REGNO_REG_CLASS): Same. - - * config/rs6000/sysv4.h (STACK_BOUNDARY): Adjust for altivec. - (ABI_STACK_BOUNDARY): Same. - (BIGGEST_ALIGNMENT): Same. - (ADJUST_FIELD_ALIGN): Remove undef. Define anew. - (ROUND_TYPE_ALIGN): Same. - - * config/rs6000/aix.h (ROUND_TYPE_ALIGN): Change BIGGEST_ALIGNMENT - to 64. - - * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Change BIGGEST_ALIGNMENT - to 64. - - * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Change BIGGEST_ALIGNMENT - to 64. - - * config/rs6000/rs6000.c (rs6000_expand_builtin): New. - (altivec_expand_builtin): New. - (altivec_init_builtins): New. - (TARGET_EXPAND_BUILTIN): New. - (TARGET_INIT_BUILTINS): New. - (rs6000_init_builtins): New. - (struct builtin_description): New. - (bdesc_2arg): New. - (rs6000_reg_names): Add altivec registers. - (alt_reg_names): Same. - (secondary_reload_class): Altivec regs can hold altivec regs and - memory. - (rs6000_emit_move): Force constants into memory for AltiVec moves. - (print_operand): Add 'y' case for printing altivec memory - operands. - (rs6000_legitimize_address): Legitimize vector addresses into - [REG+REG] or [REG]. - (altivec_expand_binop_builtin): New. - New string rs6000_current_abi. - (rs6000_override_options): Call rs6000_parse_abi_options. - (rs6000_parse_abi_options): New. - (function_arg_boundary): Vector arguments must be 16 - byte aligned. - (function_arg_advance): Handle vector arguments. - (function_arg_partial_nregs): Same. - (init_cumulative_args): Same. - (function_arg): Same. - - * config/rs6000/rs6000.md (altivec_lvx): New. - (type): Add altivec attribute. - (movv4si): New. - (*movv4si_internal): New. - (movv16qi): New. - (*movv16qi_internal): New. - (movv8hi): New. - (*movv8hi_internal1): New. - (movv4sf): New. - (*movv4sf_internal1): New. - (altivec_stvx): New. - (vaddubm): New. - (vadduhm): New. - (vadduwm): New. - (vaddfp): New. - (vaddcuw): New. - (vaddubs): New. - (vaddsbs): New. - (vadduhs): New. - (vaddshs): New. - (vadduws): New. - (vaddsws): New. - (vand): New. - (vandc): New. - (vavgub): New. - (vavgsb): New. - (vavguh): New. - (vavgsh): New. - (vavguw): New. - (vavgsw): New. - (vcmpbfp): New. - (vcmpequb): New. - (vcmpequh): New. - (vcmpequw): New. - (vcmpeqfp): New. - (vcmpgefp): New. - (vcmpgtub): New. - (vcmpgtsb): New. - (vcmpgtuh): New. - (vcmpgtsh): New. - (vcmpgtuw): New. - (vcmpgtsw): New. - (vcmpgtfp): New. - (vcmpgefp): New. - (vcmpgtub): New. - (vcmpgtsb): New. - (vcmpgtuh): New. - (vcmpgtsh): New. - (vcmpgtuw): New. - (vcmpgtsw): New. - (vcmpgtfp): New. - (vmaxub): New. - (vmaxsb): New. - (vmaxuh): New. - (vmaxsh): New. - (vmaxuw): New. - (vmaxsw): New. - (vmaxfp): New. - (vmrghb): New. - (vmrghh): New. - (vmrghw): New. - (vmrglb): New. - (vmrglh): New. - (vmrglw): New. - (vminub): New. - (vminsb): New. - (vminuh): New. - (vminsh): New. - (vminuw): New. - (vminsw): New. - (vminfp): New. - (vmuleub): New. - (vmulesb): New. - (vmuleuh): New. - (vmulesh): New. - (vmuloub): New. - (vmulosb): New. - (vmulouh): New. - (vmulosh): New. - (vnor): New. - (vor): New. - (vpkuhum): New. - (vpkuwum): New. - (vpkpx): New. - (vpkuhss): New. - (vpkshss): New. - (vpkuwss): New. - (vpkswss): New. - (vpkuhus): New. - (vpkshus): New. - (vpkuwus): New. - (vpkswus): New. - (vrlb): New. - (vrlh): New. - (vrlw): New. - (vslb): New. - (vslh): New. - (vslw): New. - (vsl): New. - (vslo): New. - (vsrb): New. - (vrsh): New. - (vrsw): New. - (vsrab): New. - (vsrah): New. - (vsraw): New. - (vsr): New. - (vsro): New. - (vsububm): New. - (vsubuhm): New. - (vsubuwm): New. - (vsubfp): New. - (vsubcuw): New. - (vsububs): New. - (vsubsbs): New. - (vsubuhs): New. - (vsubshs): New. - (vsubuws): New. - (vsubsws): New. - (vsum4ubs): New. - (vsum4sbs): New. - (vsum4shs): New. - (vsum2sws): New. - (vsumsws): New. - (vxor): New. - -2001-11-07 Daniel Berlin - - * Makefile.in (df.o): Add fibheap.h to dependencies. - - * df.h: Add prototypes for transfer functions, iterative_dataflow - functions. - (enum df_flow_dir): New enum. - (enum df_confluence_op): New enum. - (struct df): Add inverse_rts_map. - - * df.c: Add sbitmap.h to the list of includes. - (df_rd_global_compute): Removed. - (df_ru_global_compute): Removed. - (df_lr_global_compute): Removed. - (df_rd_transfer_function): New function. - (df_ru_transfer_function): New function. - (df_lr_transfer_function): New function. - (df_analyse_1): allocate/compute/free df->inverse_rts_map. - Use iterative_dataflow_bitmap instead of df_*_global_compute. - (iterative_dataflow_sbitmap): New function. - (iterative_dataflow_bitmap): New function. - -2001-11-07 Joseph S. Myers - - * doc/gcc.texi: Move terminology and spelling conventions to - htdocs/codingconventions.html. - -2001-11-07 Graham Stott - - * cse.c (cse_insn): Emit BARRIER after unconditional jump. - -Wed Nov 7 13:33:34 CET 2001 Jan Hubicka - - * expmed.c (expand_mult): Force operand to register before computing - cost. - * i386.c (x86_decompose_lea): New global vairable. - * i386.h (x86_decompose_lea): Declare. - (TARGET_DECOMPOSE_LEA): New macro. - (RTX_COST): Handle leas properly. - -2001-11-06 Richard Henderson - - * config/alpha/elf.h (DO_SELECT_SECTION): TREE_READONLY is not - defined for a CONSTRUCTOR; don't check it. - -2001-11-06 Danny Smith - - * gcov.c (output_data): Use IS_ABSOLUTE_PATHNAME to - test for absolute pathnames. - -2001-11-06 Olivier Hainque - - * unwind-dw2.c (execute_cfa_program): Evaluate call frame - instructions up to the target pc inclusive. - -2001-11-06 Steve Christiansen - - * loop.c (loop_regs_scan): Don't invalidate PIC register. - -2001-11-06 Eric Christopher - - * config/mips/mips.md(movdf_internal2): Add constraints for float - to general register move. - * config/mips/elf64.h: Add default ABI. - -2001-11-06 Neil Booth - - * alias.c:: Include langhooks.h. - * emit-rtl.c: Similarly. - * toplev.c: Similarly. - * tree-inline.c: Similarly. - * langhooks-def.h: New, the old langhooks.h. Give the default - hooks a common prefix. - * langhooks.h: Contents extracted from toplev.h. - * toplev.h: Move langhook stuff to langhooks.h. - * langhooks.c: Give default hooks a common prefix. - - * c-lang.c: Include langhooks-def.h. - * objc/objc-act.c: Similarly. - * Makefile.in: Update. - * objc/Make-lang.in: Update. - -2001-11-06 Joseph S. Myers - - * doc/install.texi: Document that configure options not listed in - this file are unsupported. Document --with-system-zlib. - -Tue Nov 6 09:21:34 2001 Richard Kenner - - * rtl.h (mem_for_const_double): New declaration. - * varasm.c (mem_for_const_double): New function. - * config/convex/convex.md (movdf): Use it. - * config/m68k/hp320.h (LEGITIMATE_PIC_OPERAND_P): Likewise. - * config/m68k/linux.h, config/m68k/m68k.h: Likewise. - * config/m68k/m68kv4.h: Likewise. - - * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Adjust for addition - of new GP reg classes. - - * expr.c (store_field): When making temp object for unaligned - component, set it to alias set 0. - -2001-11-06 Joseph S. Myers - - * c-common.c (c_expand_expr_stmt): Apply default conversions to - non-lvalue arrays if C99. - * c-typeck.c (default_conversion): Split out code handling - array-to-pointer and function-to-pointer conversions into a - separate default_function_array_conversion function. - (default_function_array_conversion): New function. Keep track of - whether any NON_LVALUE_EXPRs were stripped. Return non-lvalue - arrays unchanged outside C99 mode instead of giving an error for - them. - (build_component_ref): Use pedantic_non_lvalue when handling - COMPOUND_EXPR. Don't handle COND_EXPR specially. - (convert_arguments): Use default_function_array_conversion. - (build_unary_op): For ADDR_EXPR, take a flag indicating whether - non-lvalues are OK. - (unary_complex_lvalue): Likewise. - (internal_build_compound_expr): Use - default_function_array_conversion. Apply default conversions to - function in compound expression. - (build_c_cast, build_modify_expr, digest_init, build_asm_stmt): - Use default_function_array_conversion. - * doc/extend.texi: Update documentation of subscripting non-lvalue - arrays. - Fixes PR c/461. - -2001-11-05 Zack Weinberg - - * aclocal.m4: (AM_WITH_NLS): Don't look at ALL_LINGUAS. - (AM_GNU_GETTEXT): Set CATALOGS to a list of .gmo files - corresponding to the complete set of .po and .gmo files in - the source directory's po subdir, modified by LINGUAS. Don't - look at ALL_LINGUAS. - * configure.in: Don't set ALL_LINGUAS. - * configure: Regenerate. - - * Makefile.in (.po.gmo): Don't move into source directory. - (.po.pox): Clarify comments. - (install-po): Look for .gmo files in both srcdir and objdir; - don't fail if a file is totally missing. - (distclean): rmdir ada subdirectory too. - -2001-11-05 Geoffrey Keating - - * config/rs6000/rs6000.c (rs6000_select_section): Handle - CONSTRUCTORs _correctly_. - -2001-11-05 Neil Booth - - * c-decl.c (delete_block): Remove. - * c-tree.h (delete_block): Remove. - -2001-11-05 Neil Booth - - * cppexp.c (lex, parse_defined): Update warning about defined. - -2001-11-05 Geoffrey Keating - - * config/rs6000/rs6000.c (rs6000_select_section): Handle - CONSTRUCTORs too. - -2001-11-05 Nick Clifton - - * config/arm/arm.c (arm_return_in_memory): Cope with - int_size_in_bytes returning -1. - - * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Handle - DECL being NULL. - -Mon Nov 5 16:15:25 CET 2001 Jan Hubicka - - * Makefile.in (bb-reorder.o): Add dependency on cfglayout.h; - remove unneeded dependencies; - (cfglayout.o): New. - * cfglayout.c, cfglayout.h: New files; break out from ... - * bb-reorder.c: ... here; Remove unneeded includes; - -2001-11-04 Alan Modra - - * config/rs6000/rs6000.md (load_toc_aix_{si,di}): Mark r2 as used. - -2001-11-04 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_emit_move): Handle 64-bit - mode as well. Do not explicitly create intermediate regs. - -2001-11-04 Kaveh R. Ghazi - - * arm/aof.h (aof_text_section, aof_data_section): Don't declare. - (common_section): Delete unused variable. - (ASM_OUTPUT_ASCII): Fix signed/unsigned warnings. - (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warning. - * arm-protos.h (arm_poke_function_name, aof_add_import, - aof_delete_import): Const-ify. - * arm.c (legitimize_pic_address): Wrap variables in the macro - controlling their usage. - (arm_finalize_pic): Mark variable with ATTRIBUTE_UNUSED. - (arm_poke_function_name, pic_chain, import, aof_add_import, - aof_delete_import): Const-ify. - * i386.c (ix86_osf_output_function_prologue): Const-ify. - * i386/sysv4.h (ASM_OUTPUT_FLOAT, ASM_OUTPUT_DOUBLE, - ASM_OUTPUT_LONG_DOUBLE): Fix format specifier warnings. - * i860/fx2800.h (DBX_OUTPUT_STANDARD_TYPES): Const-ify. - * i860/sysv3.h: Add missing comment closure. - * m68k/apollo68.h (ASM_RETURN_CASE_JUMP): Add missing semi-colon. - * m88k/dgux.h (SELECT_RTX_SECTION): Add missing argument in call - to symbolic_operand. - - * config.gcc (m680[02]0-*-*): Rename case from m68000-*-*. - (i960-*-*): Set tmake_file. - (sparc86x-*-elf*): Fix typo in header name. - - * sched-rgn.c (schedule_insns): Delete unused variable. - -2001-11-04 Neil Booth - - PR c/2820 - * c-typeck.c (lookup_field): Rework to return a chain down to - the looked-up field. - (build_component_ref): Use the new lookup_field to handle - nested anonymous entities correctly. - -Sun Nov 4 11:53:31 2001 Richard Kenner - - * config/sparc/sparc.c (sparc_emit_set_const32, GEN_HIGHINT64): - Change parameters to gen_rtx_CONST_DOUBLE. - (GEN_INT64, sparc_emit_set_const64): Likewise. - * config/sparc/sparc.md (movdf split): Likewise. - -2001-11-03 Geoffrey Keating - - * unroll.c (calculate_giv_inc): Use find_last_value rather - than just hoping the last instruction is the right SET. - [Fixes 990604-1.c on stormy16.] - - * config/stormy16/stormy16.h (LIB_SPEC): Don't supply any libgloss - library at all if -T is used. - - * config/stormy16/stormy16.c (stormy16_print_operand): Avoid - some uses of uninitialized variables in error cases. - - * config/stormy16/stormy16.c (stormy16_output_shift): Don't - look at 'temp' if we won't be using it. - - * config/stormy16/stormy16.h (CONST_COSTS): Define. - (RTX_COSTS): Define. - (ADDRESS_COST): Define. - (MEMORY_MOVE_COST): Allow for memory_move_secondary_cost. - - * config/stormy16/stormy16.h (ASM_SPEC): Pass -g to the assembler. - - * config/stormy16/stormy16.h (ASM_OUTPUT_MI_THUNK): Call - stormy16_asm_output_mi_thunk. - * config/stormy16/stormy16.c (stormy16_asm_output_mi_thunk): New - function. - * config/stormy16/stormy16-protos.h - (stormy16_asm_output_mi_thunk): New prototype. - -2001-11-04 Joseph S. Myers - - * ChangeLog.2, ChangeLog.4, ChangeLog.5, ChangeLog, - FSFChangeLog.10, FSFChangeLog.11, alias.c, attribs.c, - caller-save.c, calls.c, cfg.c, cfganal.c, cfgcleanup.c, cfgrtl.c, - cppmacro.c, fold-const.c, ifcvt.c, local-alloc.c, profile.c, - sched-int.h, toplev.c, config/alpha/alpha.c, - config/alpha/alpha.md, config/c4x/c4x.h, config/cris/cris.h, - config/cris/cris.md, config/i370/i370.md, config/i386/i386.c, - config/i386/i386.h, config/i386/i386.md, config/i386/xm-djgpp.h, - config/ia64/ia64.c, config/m68hc11/m68hc11.c, config/m68k/m68k.md, - config/mcore/mcore.h, config/mmix/mmix.c, config/ns32k/ns32k.h, - config/ns32k/ns32k.md, config/rs6000/rs6000.c, - config/rs6000/sysv4.h, config/sh/sh.md: Fix spelling errors. - -2001-11-03 Kaveh R. Ghazi - - * Makefile.in (dbxout.o): Depend on function.h. - * collect2.c (is_in_list): Hide unused function. - * dbxout.c: Include function.h. - (source_label_number, dbxout_source_line, dbxout_source_file, - dbxout_function_end, dbxout_begin_function): Wrap/move inside - macros controlling usage. - * gcc.c (TARGET_EXECUTABLE_SUFFIX): Undef before defining. - * output.h (exports_section): Prototype. - - * convex.c (convex_output_function_prologue): Fix format specifier - warning. - (asm_declare_function_name): Fix signed/unsigned warning. - (print_operand): Fix format specifier warning. - * convex.h (S_REGNO_P, A_REGNO_P): Fix signed/unsigned warning. - * dsp16xx-protos.h (uns_comparison_operator, - num_1600_core_shifts): Prototype. - * dsp16xx.c: Include tm_p.h, not dsp16xx-protos.h. - (frame_size, frame_pointer_offset): Delete. - (dsp16xx_output_function_prologue, dsp16xx_output_function_epilogue): - Make static. Fix format specifier warnings. - * dsp16xx.h (IS_ACCUM_REG): Fix unsigned>=0 warning. - (EXTRA_SECTION_FUNCTIONS): Prototype const_section. - * dsp16xx.md: Add default case in switches. - * fr30.h (IN_RANGE): Delete. - * ia64.h (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings. - * mcore-protos.h (mcore_output_cmov): Const-ify. - * mcore.c (mcore_output_cmov): Likewise. - * mcore.h (switch_to_section): Make static and prototype. - * mn10200.h (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Fix - unsigned>=0 warnings. - * mn10300.h (REGNO_IN_RANGE_P): Likewise. - * rs6000-protos.h (read_only_data_section, - read_only_private_data_section): Prototype. - * rs6000.h (ASM_OUTPUT_BYTE): Fix format specifier warning. - * sh.c (sh_adjust_cost): Mark parameter with ATTRIBUTE_UNUSED. - * sh.h (GENERAL_REGISTER_P): Fix unsigned>=0 warning. - -2001-11-03 Kaveh R. Ghazi - - * dwarf2asm.c (dw2_asm_output_pcrel): Mark parameters with - ATTRIBUTE_UNUSED. - * final.c (final_scan_insn): Add brackets around body of if-stmt. - * gcc.c (convert_filename): Add static prototype. Const-ify. - Wrap variable in macros controlling its use. - * output.h (sdata_section): Add prototype. - - * 1750a.h (EXTRA_SECTION_FUNCTIONS): Add prototype. - (ASM_OUTPUT_ASCII): Avoid signed/unsigned warning. - * c4x.h (INIT_SECTION_FUNCTION): Add prototype. - (ASM_FILE_START): Const-ify. - (ASM_OUTPUT_BYTE_FLOAT, ASM_OUTPUT_SHORT_FLOAT): Fix format - specifier warning. - * c4x.md: Don't use the 'U' integer suffix. - * clipper.md (clipper_movstr): Delete declaration. - * d30v-protos.h (d30v_move_2words): Const-ify. - (debug_stack_info): Add prototype. - * d30v.c: Include "integrate.h". - (d30v_function_arg_boundary, d30v_function_arg, - d30v_function_arg_partial_nregs, d30v_function_arg_advance): Avoid - signed/unsigned warnings. - (d30v_print_operand_memory_reference, d30v_move_2words): - Const-ify. - * d30v.h (REG_CLASS_FROM_LETTER): Use unsigned array subscript. - * fr30.c (fr30_pass_by_reference, fr30_pass_by_value): Prototype. - * fr30.md: Const-ify. - * h8300.h (EXTRA_SECTION_FUNCTIONS): Add prototype. - * i370.c (i370_label_scan, mvs_get_label): Make definition static. - (mvs_get_label_page): Hide unused static function. - * i860.c (current_function_original_name): Const-ify. - * i860/sysv3.h (current_function_original_name): Likewise. - * i860/sysv4.h (current_function_original_name): Likewise. - * i960.md: Add default case in switches. Remove unused variable. - * i960/vx960-coff.h (MULTILIB_DEFAULTS): Undef before defining. - * m32r.md: Const-ify. - * m68hc11-protos.h (m68hc11_asm_file_start): Const-ify. - * m68hc11.c: Include "reload.h". - (static_chain_reg, print_options, m68hc11_asm_file_start): - Const-ify. - * m68hc11.md: Delete unused variable. Const-ify. Add parens - around & in comparison. - * mcore.h (TARGET_ASM_NAMED_SECTION): Undef before defining. - * mn10200.c (shift_mode): Remove trailing comma. - * mn10300-protos.h (output_tst): Const-ify. - * mn10300.c (output_tst): Likewise. - * pa/long_double.h (ASM_OUTPUT_LONG_DOUBLE): Fix format specifier - warnings. - * pa-protos.h (output_ascii): Use regular char *, not unsigned. - * pa.c (output_ascii): Likewise. - * pa/som.h (EXTRA_SECTION_FUNCTIONS): Add prototype. - * pdp11.md (expand_unop): Delete declarations. - * pj-protos.h (pj_output_addsi3): Const-ify. - * pj.c (pj_output_push_int, pj_output_load, pj_output_inc, - pj_output_cnv_op, mode_to_char, pj_output_varidx, pj_print_cond, - unique_src_operand): Add prototypes. - (pj_output_store_into_lval): Make definition static. - (pj_function_incoming_arg): Don't use unary plus. - (pj_output_addsi3): Const-ify. - * romp.md (get_symref): Delete declarations. - * v850-c.c (mark_current_function_as_interrupt): Don't return - value from void function. - * v850.c: Include "integrate.h". - * v850.h (ASM_OUTPUT_LABELREF): Const-ify. - * vax-protos.h (const_section): Add prototype. - -2001-11-03 Aldy Hernandez - - * machmode.def: Add documentation for the seventh argument in - vector modes. - -2001-11-04 Hans-Peter Nilsson - - * doc/invoke.texi (MMIX Options) <-mno-knuthdiv>: Say remainder - consistently. - <-mno-toplevel-symbols>: Change @code{:} to @samp{:}. - <-melf>: Don't have markup for ELF acronym. - -2001-11-03 Hans-Peter Nilsson - - * config.gcc (mmix-*-*): New target. - * doc/invoke.texi: Document MMIX options. - * doc/contrib.texi: Add note about MMIX port to my entry. - * config/mmix/t-mmix: New file. - * config/mmix/mmix.h: New file. - * config/mmix/mmix-protos.h: New file. - * config/mmix/mmix.c: New file. - * config/mmix/mmix.md: New file. - * config/mmix/crti.asm: New file. - * config/mmix/crtn.asm: New file. - -2001-11-03 Kazu Hirata - - * config/sparc/linux-aout.h: Fix comment formatting. - * config/sparc/linux.h: Likewise. - * config/sparc/linux64.h: Likewise. - * config/sparc/lynx.h: Likewise. - * config/sparc/pbd.h: Likewise. - * config/sparc/sol2-sld-64.h: Likewise. - * config/sparc/sol2.h: Likewise. - * config/sparc/sparc.c: Likewise. - * config/sparc/sparc.h: Likewise. - * config/sparc/sparc.md: Likewise. - * config/sparc/sunos4.h: Likewise. - * config/sparc/vxsim.h: Likewise. - * config/sparc/vxsparc.h: Likewise. - * config/sparc/vxsparc64.h: Likewise. - -Sat Nov 3 10:37:56 2001 Richard Kenner - - * cselib.c (cselib_subst_to_values, case CONST_DOUBLE): Remove - reference to CONST_DOUBLE_MEM in comment. - * emit-rtl.c (gen_rtx_CONST_DOUBLE): Remove one operand. - (gen_rtx, case CONST_DOUBLE): Call it with one less operand. - (init_emit_once): Don't clear CONST_DOUBLE_MEM. - * function.c (pop_function_context_from): Don't call - restore_varasm_status. - * function.h (restore_varasm_status): Delete declaration. - * gengenrtl.c (CONST_DOUBLE_FORMAT): Delete CONST_DOUBLE_MEM slot. - * rtl.c: Likewise. - * rtl.def (CONST_DOUBLE): Update comment. - * rtl.h (CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW): Update operand number. - (CONST_DOUBLE_CHAIN): Likewise. - (CONST_DOUBLE_MEM): Delete. - (gen_rtx_CONST_DOUBLE): Update parameters. - * varasm.c (struct varasm_status): x_pool_offset now HOST_WIDE_INT. - Remove reference to CONST_DOUBLE_MEM. - (const_alias_set): New variable. - (immed_double_const): Change call to gen_rtx_CONST_DOUBLE. - (immed_real_const_1): Adjust tests for 0, 1, and 2. - Don't set CONST_DOUBLE_MEM. - (clear_const_double_mem): Don't do anything with const_tiny_rtx. - (output_constant_def): Don't look at TREE_CST_RTL if INTEGER_CST. - Put constant in const_alias_set. - (struct pool_constant): ALIGN now unsigned. - OFFSET now HOST_WIDE_INT. - Delete LABEL. - (restore_varasm_status): Deleted. - (mark_pool_constant): Mark desc->rtl. - (force_const_mem): Rework to store rtl in hash table, - not CONST_DOUBLE_MEM. - Put constant in const_alias_set. - (find_pool_constant): Check desc->rtl. - (mark_constants, mark_constant): Don't special-case CONST_DOUBLE. - (init_varasm_once): Initialize const_alias_set. - - * expr.c (expand_expr, case ADDDR_EXPR): If at top level, don't call - force_const_mem. - - * reload.c (combine_reloads): Don't combine an output reload if there - are other reloads around for part of the output. - - * emit-rtl.c (set_mem_attributes): Set RTX_UNCHANGINGP_P if T is a - constant expression. - (set_mem_decl): New function. - * expr.h (set_mem_decl): New declaration. - * final.c (get_decl_from_op): Don't use ORIGINAL_REGNO if not pseudo. - (output_asm_operand_names): Add tab. - * reload1.c (alter_reg): Set decl of MEM from REG_DECL. - - * builtins.c (get_memory_rtx): Properly set MEM alias set and - attributes. - -2001-11-03 Joseph S. Myers - - * doc/extend.texi, doc/gcc.texi, doc/install.texi, doc/tm.texi: - Use "invalid" instead of "illegal". Use @r in comments in - examples. - -2001-11-02 Neil Booth - - * c-decl.c (pushdecl): Move block inside if conditional to remove - possibility of a segfault. Lookup block-level extern - variables in enclosing scopes correctly. - - * testsuite/gcc.c-torture/compile/20001018-1.x: Remove XFAIL. - -2001-11-02 Aldy Hernandez - - * expmed.c (store_bit_field): Use simplify_gen_subreg to make - SUBREG so we avoid SUBREGing memory. - - * expmed.c (store_bit_field): Same. - -2001-11-02 DJ Delorie - - * config/rs6000/rs6000.c (rs6000_emit_move): Make sure that - using FP registers for DImode mem-mem moves is acceptable. - -2001-11-02 Aldy Hernandez - - * builtins.c (apply_args_size): Handle vector arguments. - (apply_result_size): Same. - - * machmode.def: Set WIDER mode field for all vector entries. - -2001-11-02 Graham Stott - - * recog.c (decode_asm_operands): Check that the SRC is ASM_OPERANDS. - -2001-11-01 Eric Christopher - - * config.gcc: Revert part of earlier patch. - * config/mips/linux.h: Ditto. - * df.c: Include tm_p.h to avoid warnings. - * config/mips/mips.h (ABI_GAS_ASM_SPEC): Add defaults. Adjust - #if/#endif. - * config/mips/mips.c: Define mips_abi regardless. - (mips_output_function_prologues): Add long casts for .frame - output. - (override_options): Allow use of ABI_32. - -2001-11-01 Kazu Hirata - - * config/m68hc11/m68hc11.c: Fix comment formatting. - * config/m68hc11/m68hc11.h: Likewise. - * config/m68hc11/m68hc11.md: Likewise. - -2001-11-01 Neil Booth - - * c-typeck.c (default_conversion): Retain the original expression - codes. - * gcc.dg/Wparentheses.c: New tests. - -2001-11-01 David S. Miller - - * doc/install.texi (Specific, sparc-sun-solaris2*): Bring - 64-bit SPARC description more in line with reality. - -2001-11-01 Joseph S. Myers - - * Makefile.in (GCOV_OBJS): Add version.o. - * gcov.c: Include "version.h" and . - (gcov_version_string): Remove. - (print_usage): Take a parameter to determine whether this is a - call from --help or an error message. Give fuller output that - follows the GNU Coding Standards for --help. - (print_version): New function. - (options): New. - (process_args): Use getopt_long. Support long options. Follow - GNU Coding Standards for --help and --version. - * doc/gcov.texi: Document long options. - Addresses part of PR other/704. - -2001-11-01 John David Anglin - - * pa.c (output_move_double): Fix typo in double load. - -2001-11-01 Kazu Hirata - - * config/h8300/h8300.c (h8300_encode_label): Compute a string - before passing it to ggc_alloc_string. - -2001-11-01 Kazu Hirata - - * config/m68k/3b1.h: Fix comment formatting. - * config/m68k/3b1g.h: Likewise. - * config/m68k/a-ux.h: Likewise. - * config/m68k/amix.h: Likewise. - * config/m68k/apollo68.h: Likewise. - * config/m68k/atari.h: Likewise. - * config/m68k/aux-exit.c: Likewise. - * config/m68k/ccur-GAS.h: Likewise. - * config/m68k/crds.h: Likewise. - * config/m68k/dpx2.h: Likewise. - * config/m68k/dpx2g.h: Likewise. - * config/m68k/hp310.h: Likewise. - * config/m68k/hp320.h: Likewise. - * config/m68k/isi.h: Likewise. - * config/m68k/linux.h: Likewise. - * config/m68k/lynx.h: Likewise. - * config/m68k/m68k-psos.h: Likewise. - * config/m68k/m68k.c: Likewise. - * config/m68k/m68k.h: Likewise. - * config/m68k/m68k.md: Likewise. - * config/m68k/m68kelf.h: Likewise. - * config/m68k/m68kv4.h: Likewise. - * config/m68k/mot3300.h: Likewise. - * config/m68k/news.h: Likewise. - * config/m68k/next.h: Likewise. - * config/m68k/pbb.h: Likewise. - * config/m68k/plexus.h: Likewise. - * config/m68k/sgs.h: Likewise. - * config/m68k/sun3.h: Likewise. - * config/m68k/tower.h: Likewise. - * config/m68k/vxm68k.h: Likewise. - -2001-10-31 DJ Delorie - - * config/mips/mips.h (mips_cache_flush_func): Prototype. - (TARGET_OPTIONS): Support -mflush-func= and -mno-flush-func. - (INITIALIZE_TRAMPOLINE): Use mips_cache_flush_func if nonzero. - * config/mips/mips.c (mips_cache_flush_func): New. - * doc/invoke.texi: Document the new options. - -2001-10-31 Hans-Peter Nilsson - - * config.gcc (cris-*-linux*, tm_file): Rearrange order. - * config/cris/linux.h (LIB_SPEC, STARTFILE_SPEC): Don't redefine. - - * config/cris/cris.h (EH_RETURN_DATA_REGNO): Fix formatting. - - * config/cris/cris.c: Include output.h after tree.h but before - target.h. - -2001-10-31 Zack Weinberg - - * Makefile.in (INTL_TARGETS, POSUB): Delete all references. - (INTL_SUBDIRS): Just intl. - (.SUFFIXES): Add .gmo .po .pox. - (native): Also depend on build-@POSUB@. - (intl.all, intl.install): Depend on config.h and things it includes. - (po-generated): New target; depend on c-parse.c and tradcif.c. - (install-normal): Also depend on install-@POSUB@. - (XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): New variables. - (build-, install-, build-po, update-po, install-po, - .po.gmo, .po.pox, $(PACKAGE).pot, po/$(PACKAGE).pot): New rules. - - * aclocal.m4: Prefix each entry in CATALOGS with "po/" - * configure.in: Don't munge XGETTEXT. Don't generate - po/Makefile.in. - * configure: Regenerate. - - * exgettext: Delete. - * config/m68k/m68k.h: Add doc strings for -msky and -mnosky. - * objc/Make-lang.in: Replace $(INTL_TARGETS) with po-generated. - -2001-10-31 Kazu Hirata - - * config/h8300/h8300.md (two anonymous patterns): New. - -2001-10-31 Aldy Hernandez - - * tree.h (tree_index): Add support for V16QI and V8HI. - (V8HI_type_node): New. - (V16QI_type_node): New. - - * tree.c (build_common_tree_nodes_2): Same. - - * c-common.c (type_for_mode): Same. - -2001-10-31 Kazu Hirata - - * config/i386/att.h: Fix comment formatting. - * config/i386/beos-elf.h: Likewise. - * config/i386/bsd.h: Likewise. - * config/i386/bsd386.h: Likewise. - * config/i386/crtdll.h: Likewise. - * config/i386/cygwin.asm: Likewise. - * config/i386/cygwin.h: Likewise. - * config/i386/djgpp.h: Likewise. - * config/i386/freebsd-aout.h: Likewise. - * config/i386/freebsd.h: Likewise. - * config/i386/gas.h: Likewise. - * config/i386/i386-interix.h: Likewise. - * config/i386/i386-protos.h: Likewise. - * config/i386/i386.c: Likewise. - * config/i386/i386.h: Likewise. - * config/i386/i386.md: Likewise. - * config/i386/i386elf.h: Likewise. - * config/i386/interix.c: Likewise. - * config/i386/isc.h: Likewise. - * config/i386/isccoff.h: Likewise. - * config/i386/iscdbx.h: Likewise. - * config/i386/linux.h: Likewise. - * config/i386/lynx.h: Likewise. - * config/i386/mingw32.h: Likewise. - * config/i386/netbsd-elf.h: Likewise. - * config/i386/next.h: Likewise. - * config/i386/osf1elf.h: Likewise. - * config/i386/osfrose.h: Likewise. - * config/i386/sco5.h: Likewise. - * config/i386/seq-gas.h: Likewise. - * config/i386/seq-sysv3.h: Likewise. - * config/i386/sequent.h: Likewise. - * config/i386/sol2.h: Likewise. - * config/i386/sun386.h: Likewise. - * config/i386/uwin.asm: Likewise. - * config/i386/uwin.h: Likewise. - * config/i386/vxi386.h: Likewise. - * config/i386/win32.h: Likewise. - * config/i386/winnt.c: Likewise. - * config/i386/xm-cygwin.h: Likewise. - * config/i386/xm-mingw32.h: Likewise. - -2001-10-31 Kazu Hirata - - * builtins.def: Fix comment typos. - * config/alpha.c: Likewise. - * config/arm/arm.c: Likewise. - * config/avr/avr.h: Likewise. - * config/d30v/d30v.c: Likewise. - * config/d30v/d30v.h: Likewise. - * config/d30v/d30v.md: Likewise. - * config/dsp16xx/dsp16xx.c: Likewise. - * config/fr30/fr30.c: Likewise. - * config/fr30/fr30.md: Likewise. - * config/i386/i386.c: Likewise. - * config/i860/i860.c: Likewise. - * config/i960/i960.c: Likewise. - * config/ia64/ia64.c: Likewise. - * config/mips/mips.c: Likewise. - * config/pa/pa.c: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/s390/s390.c: Likewise. - * config/sparc/sparc.c: Likewise. - -2001-10-30 Kazu Hirata - - * config/mips/elf.h: Fix comment formatting. - * config/mips/elf64.h: Likewise. - * config/mips/iris5.h: Likewise. - * config/mips/iris5gas.h: Likewise. - * config/mips/iris6.h: Likewise. - * config/mips/isa3264.h: Likewise. - * config/mips/linux.h: Likewise. - * config/mips/mips.c: Likewise. - * config/mips/mips.h: Likewise. - * config/mips/mips.md: Likewise. - * config/mips/mips16.S: Likewise. - * config/mips/netbsd.h: Likewise. - * config/mips/osfrose.h: Likewise. - * config/mips/r3900.h: Likewise. - * config/mips/sni-svr4.h: Likewise. - * config/mips/svr4-t.h: Likewise. - * config/mips/ultrix.h: Likewise. - -2001-10-30 Daniel Berlin - - * bitmap.c (bitmap_element_free): Don't forget to update head->indx - when we update head->current. - -2001-10-30 Neil Booth - - * tree.c (id_string_size): Remove. - (dump_tree_statistics): Update. - * toplev.c (compile_file): If dumping stats, dump tree stats too. - -Tue Oct 30 19:00:43 CET 2001 Jan Hubicka - - * sched-rgn.c (schedule_insns): Fix comment. - -2001-10-30 Zack Weinberg - - * configure.in: Correct previous change: don't assume that - gas's version number _isn't_ the last thing on the line, or - isn't the only number on the line, either. - * configure: Regenerate. - -2001-10-30 Kazu Hirata - - * cfgcleanup.c: Fix a comment typo. - -2001-10-30 Kazu Hirata - - * alias.c: Fix comment formatting. - * recog.c: Likewise. - * config/cris/cris.c: Likewise. - * config/cris/cris.h: Likewise. - * config/i960/i960.c: Likewise. - * config/i960/i960.h: Likewise. - -2001-10-30 Kazu Hirata - - * config/arm/arm.c: Fix a comment typo. - * config/arm/arm.h: Likewise. - * config/ia64/ia64.c: Likewise. - -2001-10-30 Jakub Jelinek - - * emit-rtl.c (set_unique_reg_note): Don't create REG_EQUAL or - REG_EQUIV notes for ASM_OPERANDS. Return the new note (if any). - * rtl.h (set_unique_reg_note): Change return value. - * gcse.c (try_replace_reg): Use set_unique_reg_note. - * cse.c (cse_insn): Likewise. - * expr.c (emit_move_insn): Likewise. - * explow.c (force_reg): Likewise. - * local-alloc (update_equiv_regs): Likewise. - * loop.c (move_moveables, load_mems): Likewise. - * reload (find_reloads): Likewise. - -2001-10-30 Paolo Bonzini - - Localization fixes. - * c-decl.c (parmlist_tags_warning, start_struct, - check_for_loop_decls): Separate messages for struct, union and - enum cases to allow for languages in which they have different - genders. - * c-format.c (scanf_flag_specs): Separate short and long name of - the assignment suppression feature. - (check_format_types): Localize "pointer" and "different types" - strings. - * c-lex.c (lex_number): Localize "an unsigned long int" and - related strings. - (lex_string) [MULTIBYTE_CHARS]: Use initial lowercase letter on - warning message. - * c-typeck.c (build_unary_up): Separate messages for increment and - decrement cases to allow for languages in which they use different - articles. Localize the strings "increment" and "decrement" in one - case. - -Tue Oct 30 11:08:11 CET 2001 Jan Hubicka - - * lcm.c (optimize_mode_switching): Do not rebuild liveness information - when no changes has been made. - - * gcse.c (reg_set_bitmap): Turn into reg_set. - (modify_mem_list_set, canon_modify_mem_list_set) - (clear_modify_mem_tables, free_modify_mem_tables): New. - (gcse_main); Use free_modify_mem_tables. - (free_gcse_mem): Likewise; free the bitmaps. - (alloc_gcse_main): Initialize the bitmaps. - (canon_list_insert): Set canon_modify_mem_list_set. - (record_last_mem_set_info): Likewise; set modify_mem_list_set. - (compute_hash_table): Use clear_modify_mem_tables. - (reset_opr_set_tables): Likewise. - (oprs_not_set_p): reg_set_bitmap is regset. - (mark_set, mark_clobber): Likewise. - - * df.h (DF_EQUIV_NOTES): New constant. - (df_insn_refs_record): Record uses inside or REG_EQUIV/EQUAL notes - when asked for. - - * sched-rgn.c (CHECK_DEAD_NOTES): New constant. - (init_regions, schedule_insns): Conditionalize the checking - code by CHECK_DEAD_NOTES; avoid multiple calls to update_life_info. - -Tue Oct 30 11:02:31 CET 2001 Jan Hubicka - - * i386.md (movti_rex64 splitter): Fix condition. - -2001-10-29 Zack Weinberg - - * configure.in: Do not assume that gas's version number is the - last thing on the first line of as --version output. - * configure: Regenerate. - - * tradcpp.c: Include intl.h. Rename WARNING, ERROR, FATAL to - MT_WARNING, MT_ERROR, MT_FATAL. - (main): Call gcc_init_libintl. - (v_message): Call gettext on msgid and "warning: " - * tradcif.y: Include intl.h. - (yyerror): Make parameter definition consistent with - prototype. Call gettext on msgid argument. - -2001-10-29 Kaveh R. Ghazi - - * combine.c (num_sign_bit_copies): Avoid signed/unsigned - warnings. - - * sparc/sol2.h: Include when L_trampoline is defined. - -Mon Oct 29 19:22:07 2001 Richard Kenner - - * reload1.c (eliminate_regs): Test for reg_renumber being allocated - before referencing it. - -2001-10-26 DJ Delorie - - * config/rs6000/sysv4.h (LINK_SPEC): Allow -msdata=none to - override -G, and force -G0. - -2001-10-29 Joseph S. Myers - - * ChangeLog.2, ChangeLog.3, ChangeLog.4, FSFChangeLog.10, - FSFChangeLog.11, c-common.c, c-common.def, c-common.h, c-decl.c, - c-dump.c, c-typeck.c, except.c, sdbout.c, simplify-rtx.c, - timevar.h, tree.h, varasm.c: Fix spelling errors and typos. - - * loop.h (struct induction): Rename ext_dependant to - ext_dependent. - * loop.c: Change all uses. - (check_ext_dependant_givs): Rename to check_ext_dependent_givs. - All callers changed. - * timevar.c (DEFTIMEVAR): Fix spelling of identifier__ parameter. - -2001-10-29 Joseph S. Myers - - * c-parse.in (expr_no_commas, primary), c-typeck.c - (parser_build_binary_op): Use IS_EXPR_CODE_CLASS. - -2001-10-29 David Edelsohn - - Undo assemble_name change in earlier patch. - -Mon Oct 29 21:11:40 2001 Nicola Pero - - * objc/objc-act.c (finish_message_expr): For the GNU runtime: when - determining the type of the receiver, do not check that TREE_CODE - of receiver is CALL_EXPR before calling receiver_is_class_object(). - (receiver_is_class_object): For the GNU runtime: recognize - the case that the receiver is self in a class method context. - Check that TREE_CODE of receiver is CALL_EXPR when checking that - the receiver is a call to objc_get_class. - -2001-10-29 John David Anglin - - * pa.md (floatunssisf2): Set subreg 0 of operand 2 to zero. - -Mon Oct 29 07:23:33 2001 Richard Kenner - - * Makefile.in (OBJS): Put all files in alphabetical order. - - * dwarf2out.c (add_const_value_attribute): Fix error in last - change. - -Mon Oct 29 12:43:06 CET 2001 Jan Hubicka - - * basic-block.h (purge_all_dead_edges): Add update_life_p argument. - * cfgcleanup.c (merge_blocks): Update the life flag after merging; - fix warning. - * cfgrtl.c (purge_all_dead_edges): Allow updating of liveness. - (life_analysis): call purge_all_dead_edges after deleting noops. - (delete_noop_move): Do not purge CFG. - * toplev.c (rest_of_compilation): Update purge_all_dead_edges call. - -2001-10-28 David Edelsohn - - * config/rs6000/aix31.h (ASM_OUTPUT_EXTERNAL): Use assemble_name. - * config/rs6000/darwin.h (RS6000_OUTPUT_BASENAME): Delete. - (ASM_GLOBALIZE_LABEL): Use assemble_name. - (ASM_OUTPUT_COMMON): Likewise. - * config/rs6000/rs6000.c (print_operand): Use assemble_name. - (rs6000_output_function_epilogue): Likewise. - (output_mi_thunk): Fix typo. - (rs6000_output_symbol_ref): Use assemble_name. - (output_toc): Likewise. - * config/rs6000/sysv4.h (RS6000_OUTPUT_BASENAME): Delete. - * config/rs6000/xcoff.h (RS6000_OUTPUT_BASENAME): Delete; - assemble_name calls STRIP_NAME_ENCODING. - (ASM_OUTPUT_LABEL): Use assemble_name. - (ASM_GLOBALIZE_LABEL): Likewise. - (ASM_DECLARE_FUNCTION_NAME): Likewise. - (ASM_OUTPUT_ALIGNED_COMMON): Indent pseudo-op. Use assemble_name. - (ASM_OUTPUT_LOCAL): Likewise. - -Sun Oct 28 15:45:16 2001 Richard Kenner - - * builtins.c (get_memory_rtx): Handle POINTERS_EXTEND_UNSIGNED case. - (expand_builtin_apply, expand_builtin_return): Likewise. - (expand_builtin_va_arg, expand_builtin_va_copy): Likewise. - -2001-10-28 Joseph S. Myers - - * ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4, - ChangeLog.5, ChangeLog, FSFChangeLog.10, FSFChangeLog.11, - c-common.c, c-common.h, c-parse.in, c-typeck.c, cfg.c, config.gcc, - configure, configure.in, except.c, except.h, flow.c, function.c, - gcc.c, gcse.c, genrecog.c, libgcc2.c, loop.c, loop.h, params.def, - predict.def, predict.h, reg-stack.c, regmove.c, sched-deps.c, - sched-int.h, sibcall.c, ssa.c, stringpool.c, toplev.c, tree.c, - unroll.c: Fix spelling errors. - - * doc/extend.texi, doc/invoke.texi: Fix spelling. - - * doc/gcc.texi: Document use of "dependent" and American spelling. - -Sun Oct 28 17:05:36 CET 2001 Jan Hubicka - - * expr.c (emit_group_load): Support CONCATs by storing them to memory - and reloading. - -Sun Oct 28 09:59:54 2001 Richard Kenner - - * expr.c (store_constructor_field): Only call adjust_address on MEM. - -Sun Oct 28 16:48:09 CET 2001 Jan Hubicka - - * genrecog.c (write_switch): Output if before switch for - DT_elt_zero_wide_safe. - -2001-10-28 Kaveh R. Ghazi - - * Makefile.in (toplev.o, halfpic.o): Depend on halfpic.h - * i386/osfrose.h (SUBTARGET_SWITCHES): Add missing comma. - (FUNCTION_PROFILER): Const-ify. - * halfpic.c: Include "expr.h", "output.h" and "halfpic.h". - (eliminate_constant_term, assemble_name, output_addr_const): - Remove declarations. - (ptr_half_pic_address_p, half_pic_hash): Prototype. - (all_refs, half_pic_prefix, half_pic_hash, half_pic_declare, - half_pic_external, half_pic_address_p, half_pic_ptr): Const-ify. - * halfpic.h (ptr_half_pic_address_p, half_pic_finish): Prototype. - (half_pic_declare, half_pic_external): Const-ify. - * toplev.c: Include "halfpic.h". - -2001-10-28 Joseph S. Myers - - * config/alpha/alpha.md, config/arm/arm.c, config/arm/arm.h, - config/d30v/d30v.h, config/fr30/fr30.c, config/i370/x-oe, - config/i386/i386.c, config/i386/i386-interix.h, - config/i386/i386.md, config/i386/i386.h, config/i386/sco5.h, - config/i860/i860.h, config/i860/i860.md, config/m68k/aux-exit.c, - config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.md, - config/ns32k/ns32k.h, config/pa/pa.c, config/rs6000/rs6000.c, - config/sparc/sparc.c, config/m68hc11/m68hc11.c, - config/cris/cris.c, config/cris/cris.h, config/s390/s390.c, - config/s390/s390.h, config/stormy16/stormy16.h, doc/tm.texi: Fix - spelling errors. - - * ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4, - ChangeLog.5, ChangeLog, ChangeLog.lib, FSFChangeLog.10, ONEWS, - c-common.c, caller-save.c, cfg.c, cfgcleanup.c, cfgrtl.c, - collect2.c, df.h, diagnostic.h, final.c, gcse.c, gthr.h, - haifa-sched.c, jump.c, local-alloc.c, profile.c, protoize.c, - regmove.c, reload1.c, rtlanal.c, sched-vis.c, ssa.c, stmt.c, - system.h, toplev.c: Fix spelling errors. - -Sat Oct 27 17:32:04 2001 Richard Kenner - - * gcse.c (insert_insn_end_bb): Don't assume PAT is a SET. - - * dwarf2out.c (reg_number): Abort if pseudo. - (reg_loc_descriptor): Return 0 if pseudo. - (is_based_loc): Return 0 if pseudo. - (mem_loc_descriptor): Return 0 for pseudo and handle 0 return from - recursive calls. - (concat_loc_descriptor): Return 0 if either part's descriptor is 0. - (loc_descriptor): Return 0 if can't find location and handle 0 - return from recursive calls. - (loc_descriptor_from_tree): Likewise. - Fix handling of indirect. - Also return 0 for PLACEHOLDER_EXPR. - Clean up COMPONENT_REF cases. - (add_AT_location_descriptor): Simplify, but handle 0 return from - loc_descriptor. - (add_const_value_attribute): Avoid shift count warning. - (add_bound_info): Remove test for PLACEHOLDER_EXPR here. - Set comp_unit_die as context if not in function. - - * config/mips/mips-protos.h: Break up long lines. - Remove needless #ifdef/#endif blocks. - Don't declare functions declared in file made by genpreds or recog.h. - * config/mips/mips.c (mips_output_function_prologue): TSIZE - is now HOST_WIDE_INT; delete unneeded casts. - * config/mips/mips.h: Don't use #elif. - - * expr.c (stor_constructor_field): Always call adjust_address. - Copy TARGET before changing its alias set. - (store_field): Likewise, for TO_RTX. - (get_inner_reference): Stop at PLACEHOLDER_EXPR if can't find - replacement. - (safe_from_p, case ADDR_EXPR): Properly check for conflict. - (find_placeholder): Return 0 if can't find object. - (expand_expr, case PLACEHOLDER_EXPR): Abort if find_placeholder - returns 0. - -Sat Oct 27 16:31:23 CEST 2001 Jan Hubicka - - * ifcvt.c (if_convert): Call clear_aux_for_blocks. - -Sat Oct 27 12:12:09 CEST 2001 Jan Hubicka - - * cfgcleanup.c (merge_blocks_move_predecessor_nojumps, - merge_blocks_move_successors_nojumps): Set BB_UPDATE_LIFE. - (merge_blocks): Properly udpate life after making edge nonfallthru. - * cfgrtl.c (merge_blocks_nomove): Update global_live_at_end. - -2001-10-26 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Remove redundant code. - -2001-10-26 Neil Booth - - * c-typeck.c (convert_arguments): When comparing for enumeral - type equality, use TYPE_MAIN_VARIANT. - * gcc.dg/Wconversion.c: New tests. - -2001-10-26 Kazu Hirata - - * s390/s390.c: Fix comment typos. - * s390/s390.h: Likewise. - * s390/s390.md: Likewise. - -2001-10-26 Alexandre Oliva - - * tree-inline.c (WALK_SUBTREE_TAIL): New macro. - (walk_tree): Use it for tail calls where appropriate. - -2001-10-26 Alexandre Oliva - - * cse.c (check_for_label_ref): Don't require REG_LABEL notes for - non-local label_refs. - -2001-10-26 Kazu Hirata - - * config/h8300/h8300.md (4 anonymous patterns): New. - -2001-10-26 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Clean up. Return the - algorithm through the shift_info structure. - (emit_a_shift): Update the use of get_shift_alg. - -2001-10-27 Daniel Berlin - - * sched-rgn.c: Remove bitset typedef. - Change bitset to sbitmap in prototypes / variable types. - Remove bbset_size. - Remove edgeset_bits. - Remove edgeset_size. - s/BITSET_ADD/SET_BIT/g - s/BITSET_INVERT/sbitmap_ones/g - s/BITSET_INTER/sbitmap_a_and_b/g - s/BITSET_UNION/sbitmap_a_or_b/g - s/BITSET_DIFFER/sbitmap_difference/g - s/bitset_member/TEST_BIT/g - (BITSET_*): Removed. - (bitset_member): Removed. - (extract_bitlst): Rewrite, now that we have sbitmaps, we can use - EXECUTE_IF_SET_IN_SBITMAP. - (split_edges): Rewrite, use sbitmap functions instead of bitset - operations. - (schedule_region): Allocate/free sbitmaps, rather than bitsets. - -2001-10-26 Andreas Schwab - - * reload1.c (emit_input_reload_insns): Fix parens in last - (undocumented) change that was supposed to change only whitespace. - -Fri Oct 26 07:18:08 2001 Richard Kenner - - * cfgcleanup.c (BB_SET_FLAG, BB_CLEAR_FLAG): Add cast to avoid warning. - - * local-alloc.c (update_equiv_regs): Don't make REG_EQUAL note for - ASM_OPERANDS. - -2001-10-26 Andreas Jaeger - - * flow.c (clear_log_links): Remove unused variable. - * cfgcleanup.c (cleanup_cfg): Likewise. - -2001-10-26 Alexandre Oliva - - * tree-inline.c (remap_decl): Don't copy size and size_unit here. - (remap_save_expr): Map a remapped SAVE_EXPR to error_mark_node. - -2001-10-26 Richard Henderson - - * config/alpha/alpha.h (enum reg_class): Add R24_REG, R25_REG; - rename PV_REG to R27_REG. - (REG_CLASS_CONTENTS, REGNO_REG_CLASS): Update. - (REG_CLASS_FROM_LETTER): Update. - (PREFERRED_RELOAD_CLASS): Don't widen a reg class. - * config/alpha/alpha.md (divsi3): Don't hard-code r24, r25, r27. - (udivsi3, modsi3, umodsi3): Likewise. - (divdi3, udivdi3, moddi3, umoddi3): Likewise. - -2001-10-26 Richard Henderson - - * cfg.c (clear_aux_for_blocks): Split out of ... - (free_aux_for_blocks): here. - (clear_aux_for_edges): Split from ... - (free_aux_for_edges): here. - * basic-block.h: Declare them. - * lcm.c (compute_antinout_edge): Use them. - (compute_laterin, compute_available, compute_nearerout): Likewise. - (optimize_mode_switching): Likewise. - -2001-10-26 Richard Henderson - - * Makefile.in (unstage*): Remove as, ld, collect-ld before - moving everything back to the main build directory. - -2001-10-26 Christopher Faylor - - * config/i386/cygwin.h: Search target specific include directory, if - appropriate. - -2001-10-25 Kaveh R. Ghazi - - * dwarf2out.c (PTR_SIZE, default_eh_frame_section): Move outside - of macro guards. Fix #endif comment. - - * output.h (default_exception_section, default_eh_frame_section): - Move prototypes outside of macro guard. - - * crtstuff.c: Fix #endif comment. - -Thu Oct 25 12:21:58 2001 Jeffrey A Law (law@cygnus.com) - - * doc/md.texi (movMM): Clarify semantics of storing into a - non-paradoxical SUBREG. - -2001-10-25 Zack Weinberg - - * langhooks.c (lang_hook_default_clear_binding_stack): New. - (lang_hook_default_get_alias_set): Move next to other alias - hooks. - * langhooks.h: Prototype lang_hook_default_clear_binding_stack. - (LANG_HOOKS_CLEAR_BINDING_STACK): New macro. - (LANG_HOOKS_INITIALIZER): Add it. - * toplev.h (struct lang_hooks): Add clear_binding_stack. - * toplev.c (compile_file): Call lang_hooks.clear_binding_stack - instead of a loop calling poplevel. - -2001-10-25 Nick Clifton - - * config/mips/isa3264.h (SUBTARGET_CPP_SIZE_SPEC): Replace - occurrences of #elif with #if...#endif. - -2001-10-25 Kaveh R. Ghazi - - * cris.h (EH_RETURN_DATA_REGNO): Fix unsigned>=0 warning. - -Thu Oct 25 08:46:06 2001 Richard Kenner - - * alias.c (can_address_p): No longer static. - * emit-rtl.c (get_mem_attrs): New parameter, MODE; all callers changed. - Return 0 if all parameters are default values. - (set_mem_attributes): Set MEM_KEEP_ALIAS_SET_P. - (adjust_address_1): Try harder to compute a size. - * expr.c (expand_assignment, store_constructor): If can't address, - set MEM_KEEP_ALIAS_SET_P. - (store_constructor_field): Don't change set if MEM_KEEP_ALIAS_SET_P. - (store_field): Likewise. - (store_constructor): Simplify call to store_constructor_field. - * expr.h (can_address_p): New declaration. - * gensupport.c (gen_rtx_CONST_INT): New function. - * rtl.h (MEM_KEEP_ALIAS_SET_P): New macro. - (MEM_SIZE): Get size from mode, if not set and not BLKmode. - (MEM_COPY_ATTRIBUTES): Copy MEM_KEEP_ALIAS_SET_P. - - * stmt.c (expand_end_case): Remove orig_minval and use tree_low_cst. - -2001-10-24 Christopher Faylor - - * config/i386/cygwin.h: Use proper path for mingw crt files when - -mno-cygwin. - -Wed Oct 24 18:43:42 2001 Richard Kenner - - * dwarf2out.c (file_info_cmp): Always return consistent results. - -2001-10-24 Roger Sayle - - * stmt.c (expand_end_case): Index jumptables from zero for - suitably small values of minval. - -2001-10-24 Jakub Jelinek - - * stor-layout.c (place_union_field): If any field was aligned with - attribute aligned, set record type's TYPE_USER_ALIGN. - (place_field): Likewise. - (finalize_record_size): Don't clear TYPE_USER_ALIGN. - (layout_type) [ARRAY_TYPE]: Copy element's TYPE_USER_ALIGN. - -2001-10-24 Zack Weinberg - - * c-common.h (struct c_common_identifier): Remove rid_code field. - (C_RID_CODE): Use ->node.rid_code instead of ->rid_code. - - * c-typeck.c (constructor_designated): New local flag. - (struct constructor_stack): Add "designated" field to match. - (start_init): Clear it. - (really_start_incremental_init, push_init_level): Push and - clear it. - (pop_init_level): Pop it. - (set_designator): Set it. - - (pop_init_level): Suppress "missing initializer" warnings if - constructor_designated is true. - (process_init_element): Suppress warning about union - initialization under traditional C, if constructor_designated - is true. - -Wed Oct 24 15:35:38 2001 Richard Kenner - - * integrate.c (copy_rtx_and_substitute, case CALL): Fix error in last - change. - -Wed Oct 24 13:26:12 2001 Jeffrey A Law (law@cygnus.com) - - * h8300.h (RETURN_ADDR_RTX): Remove old, incorrect definition. - -2001-10-24 Dan Nicolaescu - - * ssa-ccp.c (ssa_ccp_substitute_constants): Don't do anything if - the node was already a set to a constant. - -Wed Oct 24 12:41:19 2001 Richard Kenner - - * emit-rtl.c (set_mem_attributes): Fix typo in last change. - * print-rtl.c (print_rtx, case MEM): Improve display of MEM_DECL. - -2001-10-24 Kaveh R. Ghazi - - * s390/linux.h (ASM_OUTPUT_BYTE): Fix format specifier warnings. - (ASM_OUTPUT_ASCII): Const-ify. Fix signed/unsigned warning. - (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings. - * s390.c (s390_final_chunkify): Don't use string concatenation. - (s390_function_prologue, s390_function_epilogue): Const-ify. - * s390.h (FUNCTION_PROFILER): Remove unused variable. - -2001-10-24 Jakub Jelinek - - * c-decl.c (finish_decl): Don't add DECL_STMTs for nested function - prototypes. - -2001-10-23 Stan Shebs - - * config/rs6000/x-darwin: Use -no-cpp-precomp instead of - -traditional-cpp in first-stage compilation. - -Tue Oct 23 21:45:40 2001 Richard Kenner - - * gensupport.c (target_flags): Add. - -Tue Oct 23 13:05:53 2001 Richard Kenner - - * darwin-protos.h (constructor_section, destructor_section, - mod_init_section, mod_term_section): Prototype. - * darwin.c (machopic_finish, update_non_lazy_ptrs, update_stubs): - Const-ify. - * darwin.h (ASM_DECLARE_OBJECT_NAME, ASM_DECLARE_FUNCTION_NAME): - Likewise. - (SECTION_FUNCTION): Prototype `FUNCTION'. Delete - objc_section_init declaration. - (EXTRA_SECTION_FUNCTIONS): Prototype objc_section_init. - (objc_section_init, try_section_alias): Make static. - (alias_section): Make static and hide unused function. - (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warning. - -Tue Oct 23 13:05:53 2001 Richard Kenner - - * alias.c (can_address_p): Compnonents are not addressable if - the containing type has alias set 0. - (get_alias_set): Rework to use STRIP_NOPS. - Only call front-end routine on object, type, or object with - NOPs stripped, not inner values. - Use language hook to call front-end routine. - * builtins.c (get_memory_rtx): Always call set_mem_attributes. - (expand_builtin_apply): Call set_mem_align on MEMs we make. - Don't pass alignment to emit_block_move. - (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. - (expand_builtin_memset): Likewise, but for clear_storage. - * c-common.c (lang_get_alias_set): Renamed to c_common_alias_set - and remove C++ specific parts. - * c-common.h (c_common_get_alias_set): Add declaration. - * c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro. - * calls.c (emit_call_1): Fix typo in sibcall_pop case. - (save_fixed_argument_area): Call set_mem_align. - Remove alignment in call to emit_block_move. - (emit_library_call_value_1, store_one_arg): Likewise. - (target_for_arg): Remove; disabled long ago. - * emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs - once and similar cleanups. - (offset_address): Use proper introductory comment. - * expr.c (emit_block_move): Use alignment from that of MEM args, not - from explicit operand; all callers changed. - (clear_storage): Likewise. - (expand_assignment): Don't call set_mem_alias_set on to_rtx. - (store_field): Remove kludge on alias set used for to_rtx. - (highest_pow2_factor, case *_DIV_EXPR): Never return 0. - (expand_expr_unaligned): Call set_mem_attributes instead of - set_mem_alias_set. - * expr.h (emit_block_move, clear_storage): Remove ALIGN argument. - * function.c (assign_stack_temp_for_type): Set MEM alignment. - (expand_function_end): Track MEM attributes of trampolines. - * ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM. - * integrate.c (copy_rtx_and_substitute, case CALL): Copy memory - attributes from original. - * langhooks.c (lang_hook_default_get_alias_set): New function. - (hook_get_alias_set_0): New function. - * langhooks.h (hook_get_alias_set_0): New declaration. - (lang_hook_default_get_alias_set): Likewise. - (LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer. - * reload1.c (alter_reg): Use adjust_address_nv. - * rtl.c (get_mode_alignment): Moved to here. - * rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and - change default if unknown from 1 to BITS_PER_UNIT. - * stor-layout.c (get_mode_alignment): Remove from here. - * toplev.h (struct lang_hoks): Add get_alias_set field. - * tree.h (lang_get_alias_set): Delete declaration. - * config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment. - * config/i386/i386.c (ix86_setup_incoming_varargs): Likewise. - (ix86_va_arg): Likewise. - * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. - * config/pa/pa.c (hppa_builtin_saveregs): Likewise. - * config/sparc/sparc.c (sparc_va_arg): Likewise. - * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. - (expand_block_move_mem): Remove dead code. - -2001-10-22 Neil Booth - - * c-common.c (warn_div_by_zero): New. - * c-common.h (warn_div_by_zero): New. - * c-decl.c (c_decode_option): Take it on the command line. - * c-typeck.c (build_binary_op): Warn about division by zero. - * doc/invoke.texi: Document the new command line option, fix - documentation of -Wmultichar. - * testsuite/gcc.dg/divbyzero.c: New tests. - * testsuite/gcc.dg/noncompile/20010524-1.c: Update. - -Tue Oct 23 15:30:23 CEST 2001 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Cleanup; use expand_simple_*op. - - * toplev.c (rest_of_compilation): Use CLEANUP_UPDATE_LIFE - to avoid update_life_info call. - * basic-block.h (CLEANUP_UPATE_LIFE): Define. - * cfgcleanup.c (bb_flags): New enum. - (BB_FLAGS, BB_SET_FLAG, BB_CLEAR_FLAG, FORWARDER_BLOCK_P): New macros. - (notice_new_block, update_forwarder_flag): New functions. - (try_simplify_condjump): Use FORWARDER_BLOCK_P. - (try_forward_edges): Likewise; update flags. - (merge_blocks): Likewise. - (outgoing_edges_match): Likewise. - (try_crossjump_to_edge): Likewise. - (try_optimize_cfg): Likewise; initialize and clear the flags; - recompute life info if needed. - (cleanup_cfg): No need to clear aux pointers. - -2001-10-23 Alexandre Oliva - - * config/i386/i386.c (override_options): Default to minimum - stack alignment when optimizing for code size. - * doc/invoke.texi (-mpreferred-stack-boundary): Document the - change. - - * config/i386/i386.c (override_options): Set upper limit of - -mpreferred-stack-boundary to 12. - -2001-10-22 Zack Weinberg - - * recog.c (peephole2_optimize): Add default case to switch. - -2001-10-23 Joseph S. Myers - - * doc/gcc.texi (Sending Patches): Remove. - -2001-10-22 Hans-Peter Nilsson - - * unwind-dw2-fde.c (fde_unencoded_compare): Derefer pc_begin - fields when comparing. - -2001-10-22 Kaveh R. Ghazi - - * arm.h (HOST_INT, HOST_UINT): Delete. Remove all uses. - * arm.c (HOST_INT, HOST_UINT): Likewise. - -2001-10-22 Stan Shebs - - * config/darwin-protos.h (darwin_exception_section): Declare. - (darwin_eh_frame_section): Declare. - -Mon Oct 22 18:21:25 CEST 2001 Jan Hubicka - - * i386.md (movti_rex64): Fix mode. - -2001-10-22 Stan Shebs - - * target.h (struct gcc_target): Add asm_out.exception_section, - asm_out.eh_frame_section. - * target-def.h (TARGET_ASM_EXCEPTION_SECTION): New macro. - (TARGET_ASM_EH_FRAME_SECTION): New. - (TARGET_INITIALIZER): Update. - * output.h (default_exception_section): Declare. - (default_eh_frame_section): Declare. - * dwarf2out.c: Include target.h. - (output_call_frame_info): Call target hook for eh frames. - (default_eh_frame_section): New function. - * except.c: Include target.h. - (output_function_exception_table): Call target hook for exception - section. - * varasm.c (default_exception_section): Rename from - exception_section, remove EXCEPTION_SECTION macro. - - * config/darwin.h (darwin_eh_frame_section): New function. - (EXCEPTION_SECTION): Remove. - (TARGET_ASM_EXCEPTION_SECTION): Define. - * config/nextstep.h (EH_FRAME_SECTION_ASM_OP): Remove. - (nextstep_exception_section): New function. - (nextstep_eh_frame_section): New function. - (TARGET_ASM_EXCEPTION_SECTION): Define. - (TARGET_ASM_EH_FRAME_SECTION): Define. - - * config/pa/som.h (EXCEPTION_SECTION): Remove. - (TARGET_ASM_EXCEPTION_SECTION): Define. - * config/rs6000/sysv4.h, config/rs6000/xcoff.h - (EXCEPTION_SECTION): Remove. - (TARGET_ASM_EXCEPTION_SECTION): Define. - * config/stormy16/stormy16.h: Remove comments referencing - EXCEPTION_SECTION and EH_FRAME_SECTION_ASM_OP. - - * doc/tm.texi: Document TARGET_ASM_EXCEPTION_SECTION and - TARGET_ASM_EH_FRAME_SECTION. - -2001-10-22 Nick Clifton - - * config/mips/mips.md (mul_acc_si): Fix precedence of conditional - terms. - - * c-format.c: Fix spelling typo in comment. - - * sched-int.h: Fix typo in GCC preamble. - -2001-10-21 Craig Rodrigues - - PR debug/4252 - * doc/invoke.texi: Remove references to -fdump-translation-unit. - -2001-10-22 Richard Henderson - - * config/i386/i386.c (ix86_expand_clear): New. - * config/i386/i386-protos.h: Declare it. - * config/i386/i386.md (setcc peep2s): Use it. - (movsi_xor): Unexport. - -2001-10-22 Richard Henderson - - * flow.c (clear_log_links): Use free_INSN_LIST_list, not - free_EXPR_LIST_list for LOG_LINKS. - -2001-10-21 Robert Lipe - - * config/i386/i386.c (sco_asm_named_section): Delete. - (sco_asm_out_constructor): Delete. - * config/i386/sco5.h (ASM_QUAD): Undo damage from att.h. - (ASM_OUTPUT_DOUBLE_INT): Likewise. - (TARGET_ASM_CONSTRUCTOR): Delete. Use default. - (TARGET_ASM_NAMED_SECTION): Use default for ELF. - (EXCEPTION_SECTION): Delete EH scn renaming hack. - -2001-10-21 Kaveh R. Ghazi - - * c-format.c (maybe_read_dollar_number): Use safe-ctype macros - and/or fold extra calls into fewer ones. - * collect2.c (dump_file): Likewise. - * cppexp.c (parse_number): Likewise. - * cpplex.c (_cpp_lex_direct): Likewise. - * final.c (output_asm_insn, asm_fprintf): Likewise. - * fix-header.c (inf_scan_ident, main): Likewise. - * fixinc/fixfixes.c (char_macro_use_fix, char_macro_def_fix): - Likewise. - * fold-const.c (real_hex_to_f): Likewise. - * gen-protos.c (parse_fn_proto): Likewise. - * genattrtab.c (check_attr_test, check_attr_value): Likewise. - * genrecog.c (change_state, write_action): Likewise. - * gensupport.c (shift_output_template): Likewise. - * local-alloc.c (requires_inout): Likewise. - * mips-tfile.c (IS_ASM_IDENT): Likewise. - * protoize.c (is_id_char, main): Likewise. - * real.c (asctoeg): Likewise. - * recog.c (asm_operand_ok): Likewise. - * reload.c (find_reloads): Likewise. - * scan.c (scan_identget_token): Likewise. - * sched-vis.c (print_value): Likewise. - * stringpool.c (ggc_alloc_string): Likewise. - * toplev.c (read_integral_parameter, decode_g_option): Likewise. - * tradcif.y (parse_number, yylex, parse_escape): Likewise. - * tradcpp.c (rescan): Likewise. - * tree.c (clean_symbol_name): Likewise. - * varasm.c (decode_reg_name): Likewise. - - * alpha.h (ASM_OUTPUT_ASCII): Likewise. - * darwin.c (name_needs_quotes, func_name_maybe_scoped): Likewise. - * dsp16xx.h (ASM_OUTPUT_ASCII): Likewise. - * m88k.c (output_ascii): Likewise. - * m88k.h (OVERRIDE_OPTIONS): Likewise. - * mcore.h (REG_CLASS_FROM_LETTER): Likewise. - * ns32k/encore.h (ASM_OUTPUT_ASCII): Likewise. - * sh.h (REG_CLASS_FROM_LETTER): Likewise. - -2001-10-21 Neil Booth - - * langhooks.c (lang_hook_default_do_nothing, - lang_hook_default_decode_option): New defaults. - * langhooks.h: Make hooks unconditional and non-NULL. - * toplev.c (compile_file, toplev_main): Update. - * toplev.h: Update comments. - * objc/objc-act.c (lang_hooks): Update to new paradigm. - -2001-10-21 Kaveh R. Ghazi - - * arm.h (FUNCTION_ARG_REGNO_P): Use IN_RANGE. - - * system.h (IN_RANGE): New macro. - -2001-10-21 Zack Weinberg - - * aclocal.m4 (AM_WITH_NLS): Also create and substitute - INTLDEPS variable, which does not include $LIBICONV. - * Makefile.in: Use INTLDEPS in LIBDEPS. - * configure: Regenerate. - -2001-10-21 Neil Booth - - * cpphash.h (struct cpp_buffer): Delete read_ahead and extra_char. - * cpplex.c (lex_percent, lex_dot): Remove. - (get_effective_char, skip_block_comment, skip_line_comment, - parse_identifier_slow, parse_number, parse_string, save_comment, - _cpp_lex_direct): Update to do lookback freely. - (IF_NEXT_IS, BACKUP): New macros. - * cpplib.c (cpp_push_buffer): Don't set read_ahead and extra_char. - * cppmacro.c (paste_tokens): Update. - -2001-10-20 Nick Clifton - - * doc/invoke.texi (i386 and x86-64 Options): Fix typo. - -2001-10-20 Hans-Peter Nilsson - - * reload1.c (reload): Check CONSTANT_P before calling - LEGITIMATE_PIC_OPERAND_P. - * config/cris/cris.c (cris_legitimate_pic_operand): Revert - workaround of 2001-10-13. - -Sat Oct 20 15:16:10 CEST 2001 Jan Hubicka - - * i386.c (split_di): Handle splitting of DFmode. - -Sat Oct 20 07:27:14 2001 Richard Kenner - - * emit-rtl.c (set_mem_attributes): Alignment is in bits. - (adjust_address_1, offset_address): Likewise. - - * final.c (output_asm_operand_names): New fcn, from output_asm_insn. - (output_asm_insn): Call it for each line output. - Don't record an operand more than once. - - * toplev.h (struct lang_hooks): HONOR_READONLY now bool. - * main.c: Include config.h and system.h, but not ansidecl.h. - * Makefile.in (main.o): Update accordingly. - -Sat Oct 20 12:05:31 CEST 2001 Jan Hubicka - - * i386.h (SSE_REGPARM_MAX): Set to 8 for x86_64. - -Sat Oct 20 12:01:07 CEST 2001 Jan Hubicka - - * basic-block.h (find_sub_basic_blocks): Use sbitmap parameter. - * cfgbuild.c (find_bb_boundaries, compute_outgoing_frequencies): - Break out from ... - (find_sub_basic_blocks): ... here; - (find_many_sub_basic_blocks): New. - * recog.c (split_all_insns): Update find_sub_basic_blocks call. - - * i386.h (ASM_PREFERRED_EH_DATA_FORMAT): Define sdata4. - - * i386.c (ix86_va_arg): Kill indirect_p handling; fix aliasing issues.: - - * i386.c (split_di, split_ti): Revamp to use simplify_subreg. - - * timevar.def (TV_LIFE, TV_LIFE_UPDATE, TV_MODE_SWITCH): new. - * flow.c (update_life_info): Measure time. - * c-decl.c: Include timevar.h - (c_expand_body): Measure time. - * toplev.c (rest_of_compilation): Measure time of mode switching - separately. - * Makefile.in (c-decl.o, cfgcleanup.o): Add dependency. - - * toplev.c (flag_asynchronous_unwind_tables): New global variable. - (lang_independent_options): Add asynchronous-unwind-tables - (toplev_main): flag_asynchronous_unwind_tables implies - flag_unwind_tables. - * flags.h (flag_asynchronous_unwind_tables): Declare. - * dwarf2out.c (dwarf2out_stack_adjust): Take into account - flag_asynchronous_unwind_tables. - (output_call_frame_info): Likewise. - * invoke.texi (-fasynchronous-unwind-tables): Document. - * i386.c (optimization_options): Enable - flag_asynchronous_unwind_tables. - - * i386.c (ix86_expand_setcc): Always expect target to be QImode. - * i386.md (s* expanders): Destination is QImode. - - * toplev.c (rest_of_compilation): Do not call clear_log_links. - * rtl.h (clear_log_links): Kill. - * flow.c (clear_log_links): Make static; accept blocks parameter; - do no clear life info. - (update_life_info): Call clear_log_links. - - * cfganal.c (forwarder_block_p): Avoid active_insn_p calls. - -2001-10-20 Neil Booth - - * cpplex.c (handle_newline, skip_escaped_newlines, - get_effective_char, skip_block_comment, skip_line_comment, - parse_identifier_slow, parse_number, parse_string, - _cpp_lex_direct): Update to do more stepping back. - (trigraph_ok): Similarly. Rename trigraph_p. - (SAVE_STATE, RESTORE_STATE): Remove. - (BUFF_SIZE_UPPER_BOUND): Tweak. Add sanity check. - - * cpplib.c (destringize): Rename destringize_and_run, and - call run_directive directly. - (_cpp_do__Pragma): Simplify. - -2001-10-19 Kaveh R. Ghazi - - * pe.c (arm_pe_unique_section): Const-ify. - * pe.h (TARGET_ASM_NAMED_SECTION): Undef before defining. - (switch_to_section): Add static prototype. - - * output.h (drectve_section): Prototype. - -2001-10-19 Franz Sirl - - * config.gcc (i[34567]86-*-gnu*, arc-*-elf*, d30v-*, - fr30-*-elf, hppa*64*-*-linux*, parisc*64*-*-linux*, hppa*-*-linux*, - parisc*-*-linux*, i370-*-linux*, i[34567]86-*-chorusos*, - i[34567]86-*-elf*, i[34567]86-ncr-sysv4*, i[34567]86-*-netware, - i[34567]86-sequent-ptx4*, i[34567]86-sequent-sysv4*, - i[34567]86-*-beoself*, i[34567]86-*-beos*, i[34567]86-*-freebsd*, - i[34567]86-*-netbsdelf*, i[34567]86-*-linux*libc1, - i[34567]86-*-linux*, i[34567]86-moss-msdos*, i[34567]86-*-moss*, - i[34567]86-go32-rtems*, i[34567]86-*-rtems*, i[34567]86-*-rtemself*, - i[34567]86-*-solaris2*, i[34567]86-*-sysv5*, i[34567]86-*-sysv4*, - i[34567]86-*-udk*, i[34567]86-*-osf1*, i[34567]86-dg-dgux*, - i860-alliant-*, i860-*-sysv4*, ia64*-*-aix*, ia64*-*-linux*, - ia64*-*-hpux*, m32r-*-elf*, m88k-dg-dgux*, m88k-*-sysv4*, mcore-*-elf, - mips*-*-linux*, mn10200-*-*, mn10300-*-*, pj*-linux*, pjl-*, - powerpc64-*-linux*, powerpc-*-sysv*, powerpc-*-netbsd*, - powerpc-*-chorusos*, powerpc-*-eabiaix*, powerpc-*-eabisim*, - powerpc-*-elf*, powerpc-*-eabi*, powerpc-*-rtems*, - powerpc-*-linux*libc1, powerpc-*-linux*, powerpc-wrs-vxworks*, - powerpcle-wrs-vxworks*, powerpcle-*-sysv*, powerpcle-*-elf*, - powerpcle-*-eabisim*, powerpcle-*-eabi*, powerpcle-*-solaris2*, - rs6000-*-mach*, s390-*-linux*, s390x-*-linux*, sh-*-elf*, - sh-*-rtemself*, sh-*-rtems*, sh-*-linux*, stormy16-*-elf, - v850-*-rtems*, v850-*-*, x86_64-*-linux*), cris-*-aout, cris-*-elf, - cris-*-none, cris-*-linux*: Update ${tmfile} list. - (c4x-*-rtems*, c4x-*, i[34567]86-go32-rtems*, i[34567]86-*-rtemscoff*, - i[34567]86-*-rtems*, i[34567]86-*-rtemself*, i[34567]86-*-osf1*, - mn10200-*-*, mn10300-*-*, powerpc-*-beos*, powerpc-*-darwin*, - powerpc-wrs-vxworks*, powerpcle-wrs-vxworks*, v850-*-rtems*, - v850-*-*): Delete superflous ${cpu_type} setting. - * config/linux.h: Delete svr4.h include. - (SET_ASM_OP): Delete. - * config/netware.h (INT_ASM_OP): Undef before define. - * config/ptx4.h: Delete elfos.h include. - (PREFERRED_DEBUGGING_TYPE): Undef instead of wrapping. - * config/svr4.h: Delete elfos.h include. Update commentary. - * config/arc/arc.h, config/d30v/d30v.h, config/fr30/fr30.h, - config/m32r/m32r.h, config/m88k/sysv4.h, config/mn10200/mn10200.h, - config/mn10200/mn10300.h, config/stormy16/stormy16.h, - config/v850/v850.h: Delete svr4.h include. - * config/i370/linux.h, config/i386/osf1elf.h, config/m68k/linux.h, - config/m68k/m68kv4.h, config/m88k/sysv4.h, - config/sparc/sysv4.h: Update includes. - * config/i386/beos-elf.h, config/i386/netware.h, config/i386/ptx4-i.h, - config/i386/rtemself.h, config/i386/sol2.h, config/i386/sysv4.h, - config/i386/sysv5.h, config/i386/udk.h, config/ia64/linux.h, - config/m88k/dguxbcs.h: Delete includes. - * config/i386/dgux.h, config/i386/osf1elfgdb.h: Delete include. - (PREFERRED_DEBUGGING_TYPE): Undef before defining it. - * config/i860/fx2800.h (ASM_OUTPUT_SOURCE_LINE): Undef before defining - it. - * config/m88k/dgux.h: Delete include. - (SDB_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE): Undef before - defining it. - * config/pj/pj.h (ASM_GENERATE_INTERNAL_LABEL, - ASM_OUTPUT_INTERNAL_LABEL, ASM_OUTPUT_SKIP): Undef before defining it. - * config/sh/elf.h: Update include. - (SDB_DEBUGGING_INFO, DWARF2_DEBUGGING_INFO, PREFERRED_DEBUGGING_TYPE, - DWARF2_ASM_LINE_DEBUG_INFO): Move behind includes. - -2001-10-19 Catherine Moore - - * config/stormy16/stormy-abi: Updates to varargs descriptions. - * config/stormy16/stormy16.c (stormy16_build_va_list): Reverse - base and count fields. - (stormy16_expand_builtin_va_start): last_reg_count changed to - size_of_reg_args. Use count + size in first comparison. - -Fri Oct 19 15:24:39 2001 Richard Kenner - - * langhooks.h (LANG_HOOKS_HONOR_READONLY): New macro. - * toplev.h (struct lang_hooks): New field HONOR_READONLY. - * emit-rtl.c (set_mem_attributes): Set RTX_UNCHANGING_P from - TREE_READONLY and TYPE_READONLY if lang_hooks.honor_readonly. - Set alignment from type if INDIRECT_REF. - (adjust_address_1, offset_address): Simplify alignment compuitation. - * expr.c (expand_expr, case INDIRECT_REF): Don't set RTX_UNCHANGING_P - here; done by set_mem_attributes. - -2001-10-19 Kaveh R. Ghazi - - * Makefile.in (rtlanal.o): Depend on $(TM_P_H). - * arm-protos.h (rdata_section, zero_init_section, common_section): - Prototype. - * arm.h (ASM_OUTPUT_DEF_FROM_DECLS): Const-ify. - * avr.h (ASM_OUTPUT_SKIP): Rename macro parameter to avoid - traditional mode stringification. - * function.c (thread_prologue_and_epilogue_insns): Wrap variable - in macros controling its use. - * rtlanal.c: Include tm_p.h. - * varasm.c (asm_output_aligned_bss): Mark parameter with - ATTRIBUTE_UNUSED. - (assemble_constant_align, assemble_start_function, assemble_align, - assemble_variable, assemble_trampoline_template, - output_constant_def_contents): Wrap potentially empty if-stmt body - in brackets. - -2001-10-19 Kaveh R. Ghazi - - * a29k-protos.h (literal_section): Prototype. - * a29k.h (ASM_FILE_START): Don't discard pointer qualifier. - * a29k.md: Ensure function pointers are prototyped. - * genattrtab.c (write_eligible_delay): Mark parameter with - ATTRIBUTE_UNUSED. - -2001-10-19 Kaveh R. Ghazi - - * calls.c (emit_call_1): Mark parameter with ATTRIBUTE_UNUSED. - * 1750a.c (print_operand): Fix format specifier warning. - * 1750a.h (ASM_FILE_START): Don't discard pointer qualifier. - * 1750a.md: Likewise. - * gcc.c (init_gcc_specs): Wrap with ENABLE_SHARED_LIBGCC. - * genemit.c (output_add_clobbers): Mark parameter with - ATTRIBUTE_UNUSED. - * genrecog.c (write_subroutine): Likewise. - * integrate.c (expand_inline_function): Delete unused variable. - * varasm.c (remove_from_pending_weak_list): Wrap with - ASM_WEAKEN_LABEL. - -2001-10-19 Jakub Jelinek - - * simplify-rtx.c (simplify_plus_minus): Negate constant iff its neg - field is different to previous argument's neg field. - - * config/alpha/alpha.c (summarize_insn): Don't abort on ASM_INPUT. - -Fri Oct 19 15:24:39 2001 Richard Kenner - - * final.c (get_decl_from_op): New function. - (output_asm_insn): Call it; write "*" when item with decl is address. - -2001-10-19 Janis Johnson - - * doc/install.texi (Specific, sparc-sun-solaris2*) Copy documentation - about 64-bit support from the 3.0_branch version. - -2001-10-19 Zack Weinberg - - * aclocal.m4 (AM_WITH_NLS): AC_DEFINE HAVE_LIBINTL_H and - USE_INCLUDED_LIBINTL when appropriate. - * configure, config.in: Regenerate. - * Makefile.in (datadir): Set to @datadir@. - (intl.o): Also depend on $(CONFIG_H) and system.h. - - * intl.c: Factor out common gettext initialization sequence. - (gcc_init_libintl): New function. - * intl.h: Include intl/libgnuintl.h if USE_INCLUDED_LIBINTL; - otherwise include libintl.h if HAVE_LIBINTL_H; otherwise turn - off NLS. Add multiple include guard. No need to #ifdef-guard - an #undef. Prototype gcc_init_libintl here. - - * collect2.c (main), cppmain.c (general_init), gcc.c (main), - gcov.c (main), protoize.c (main), toplev.c (toplev_main): - Use gcc_init_libintl. - -2001-10-19 Catherine Moore - - * config/stormy16/stormy16.h (ASM_COMMENT_START): Define. - - * config/stormy16/stormy16.c (stormy16_split_move): Make - sure that REG_INC notes are present for auto_inc operands. - -2001-10-19 Andreas Jaeger - - * configure: Regenerated. - * configure.in: Add x86_64 to switch statements. - -2001-10-18 Richard Henderson - - * config/alpha/alpha.md (sibcall_osf_1): Load destination - address into $27 explicitly. - (sibcall_value_osf_1): Likewise. - -Thu Oct 18 16:07:39 2001 Richard Kenner - - * emit-rtl.c (gen_reg_rtx): Also reallocate reg_decl array. - (offset_address): New function. - (free_emit_status): Free regno_decl. - (init_emit): Pass proper number of elements to xcalloc. - Allocate regno_decl. - (mark_emit_status): Mark regno_decl values. - * expr.c (highest_pow2_factor): New function. - (expand_assigment): Use it and offset_address. - Properly handle ptr_mode vs. Pmode in offset calculation. - (store_constructor, expand_expr_unaligned): Likewise. - (expand_expr, case COMPONENT_EXPR): Likewise. - * expr.h (offset_address): New decl. - * function.h (struct emit_status): Add regno_decl. - (REGNO_DECL): New macro. - * final.c (output_asm_name): Move in file and don't conditionalize - on flag_print_asm_name. - (output_asm_insn): Only call output_asm_name if flag_print_asm_name. - Output names of operands, if known. - * function.c (assign_parms): Set REGNO_DECL. - * integrate.c (integrate_decl_tree): Likewise. - * stmt.c (expand_decl): Likewise. - * regclass.c (reg_scan_mark_refs): Propagate REGNO_DECL for copies. - -2001-10-18 Alexandre Oliva - - * attribs.c (handle_noinline_attribute): New function. - (handle_used_attribute): Likewise. - (c_common_attribute_table): Added noinline and used. - * doc/extend.texi (Function Attributes): Document them. - * c-decl.c (duplicate_decls): Propagate DECL_UNINLINABLE. - Warn when merging inline with attribute noinline. - (start_decl, start_function): Warn if inline and attribute - noinline appear in the same declaration. - -2001-10-17 Neil Booth - - * config.gcc: Update c4x and i370 for C front end-specific - dependencies. - * config/c4x/c4x-c.c: New. - * config/c4x/c4x-protos.h (c4x_handle_pragma): Remove. - (code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree): - New declarations. - * config/c4x/c4x.c: Don't include c-lex.h or c-pragma.h. - (code_tree, data_tree, pure_tree, noreturn_tree, interrupt_tree): - Make extern. - (c4x_init_pragma): Remove. - (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, - c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, - c4x_pr_ignored): Move to c4x-c.c. - * config/c4x/c4x.h (REGISTER_TARGET_PRAGMAS): Update. - * config/c4x/t-c4x: Update. - * config/i370/i370-c.c: New. - * config/i370/i370.c: Don't include c-lex.h or c-pragma.h. - (i370_pr_map): Move to i370-c.c. - * config/i370/t-i370: New. - - * doc/tm.texi: Update. - -2001-10-17 Stan Shebs - - * config/rs6000/rs6000.c: Make assorted mechanical formatting and - typo fixes throughout. - (machopic_output_stub): Remove some dead code. - -2001-10-17 Richard Earnshaw - - * cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory - leak. - -Wed Oct 17 05:26:39 2001 Richard Kenner - - * Makefile.in (print-rtl.o): Depend on TREE_H. - * alias.c (get_alias_set): Make two passes over objects to first - see if inner object is access via restricted pointer. - Defer allocating alias set for restricted pointer until here. - Call find_placeholder with second arg nonzero. - Minor cleanups. - * c-common.c (c_apply_type_quals_to_decl): Defer getting alias - set for restricted pointer types. - * emit-rtl.c (set_mem_attributes): Set more attributes. - (set_mem_align, change_address, adjust_address_1): New functions. - (change_address_1): Now static. - (adjust_address, adjust_address_nv): Deleted. - (replace_equiv_address): Call change_address_1. - * expr.c (get_inner_reference): Handle PLACEHOLDER_EXPR. - (find_placeholder): Get starting point from PLIST arg. - (expand_expr, case PLACEHOLDER_EXPR): Initialize find_placeholder arg. - * expr.h (set_mem_align, change_address, adjust_address_1): New decls. - (adjust_address, adjust_address_nv): New macros. - * print-rtl.c (tree.h): New include. - (print_rtx, case MEM): Print all memory attributes. - -2001-10-17 Richard Henderson - - * config/alpha/alpha.c (direct_call_operand): Don't fall off end. - -2001-10-16 Matt Kraai - - * c-tree.texi: Eliminate duplicated word. - * cpp.texi: Likewise. - * install.texi: Likewise. - * invoke.texi: Likewise. - * tm.texi: Likewise. - -2001-10-17 Michael Collison - - * dsp16xx.c: Fix comment formatting to match GNU standards. - (dsp16xx_output_function_prologue): Change type of 'size' - parameter from 'int' to HOST_WIDE_INT. - (dsp16xx_output_function_epilogue): Change type of 'size' - parameter from 'int' to HOST_WIDE_INT. - -2001-10-16 Richard Henderson - - * configure.in (HAVE_AS_GOTOFF_IN_DATA): New x86 check. - * configure, config.in: Rebuild. - - * config/i386/i386.c (ix86_output_addr_vec_elt): New. - (ix86_output_addr_diff_elt): New. - * config/i386/i386.h (ASM_OUTPUT_ADDR_VEC_ELT): Use them. - (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. - (JUMP_TABLES_IN_TEXT_SECTION): New. - * config/i386/i386.md (tablejump): Handle HAVE_AS_GOTOFF_IN_DATA. - * config/i386/i386-protos.h: Update. - - * config/i386/386bsd.h, config/i386/beos-elf.h, - config/i386/freebsd-aout.h, config/i386/freebsd.h, - config/i386/i386-interix.h, config/i386/i386elf.h, - config/i386/linux.h, config/i386/netbsd-elf.h, - config/i386/netbsd.h, config/i386/openbsd.h, - config/i386/ptx4-i.h, config/i386/rtemself.h, - config/i386/sco5.h, config/i386/sysv4.h, config/i386/x86-64.h - (ASM_OUTPUT_ADDR_DIFF_ELT, JUMP_TABLES_IN_TEXT_SECTION): Remove. - -2001-10-16 Florian Weimer - - * stmt.c (expand_asm_operands): Update commentary. - -2001-10-16 Stan Shebs - - * config/darwin.h (GCC_NAME): Remove, no longer used. - (NO_MATH_LIBRARY): Ditto. - (MATH_LIBRARY): Define to emptiness. - (DWARF2_DEBUGGING_INFO): Define. - (PREFERRED_DEBUGGING_TYPE): Define. - (EXTRA_SECTION_FUNCTIONS): Add darwin_exception_section. - (EXCEPTION_SECTION): Define. - (ASM_PREFERRED_EH_DATA_FORMAT): Define. - * config/darwin.c (darwin_encode_section_info): Handle case of - DECL_INITIAL being error_mark_node. - -2001-10-16 Richard Henderson - - * alpha.c (current_file_function_operand): Don't fail for profiling. - (direct_call_operand): New. - * alpha-protos.h: Declare it. - * alpha.h (EXTRA_CONSTRAINT): Use it. - (PREDICATE_CODES): Add it. - (ASM_OUTPUT_MI_THUNK): Remove. - * alpha32.h (ASM_OUTPUT_MI_THUNK): Remove. - * alpha.md (sibcall_osf_1, sibcall_value_osf_1): Add 's' alternative. - -2001-10-16 Krister Walfridsson - - * config/i386/netbsd-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Define. - (JUMP_TABLES_IN_TEXT_SECTION): Define. - -Wed Oct 17 00:21:31 CEST 2001 Jan Hubicka - - * cfg.c (free_edge): Break out from .... - (remove_edge): ... here. - (clear_edges): Use free_edge. - - * att.h (ASM_QUAD): Add comment. - * bsd.h, sco5.h, sun386.h (ASM_QUAD): Define. - -Wed Oct 17 00:01:02 CEST 2001 Jan Hubicka - - * i386.c (split_ti): New function. - (ix86_split_to_parts): Support TImodes. - * i386.h (VALID_INT_MODE_P): Add TImode. - * i386.md (movdi splitter): Fix. - (movti): Support 64bit integer registers. - (movti_rex64): New function and splitter. - - * i386.c (*_cost): Add movsx/movzx cost. - * i386.h (struct processor_costs): Add movsx/movzx fields. - (RTX_COSTS): Handle zero/sign extend + avoid believing that - 64bit operations require split on 64bit machine. - (CONST_COST): Make large 64bit constants expensive on 64bit compilation. - - * i386.c (ix86_setup_incoming_varargs): Fix mode of PLUS. - (ix86_expand_move): Avoid pushes of memory if size does not match; - move long constants to register. - (x86_initialize_trampoline): Fix mode. - * i386.h (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): - Use ASM_QUAD on 64bit. - * i386.md (test pattern): Disallow impossible constants. - (tablejump PIC expander): Fix emitting of sum. - (movdicc_rex64): Rename to movdicc. - * linux64.h (LINK_SPEC): Add missing '%'. - -2001-10-16 Alexandre Oliva - - * tree-inline.c (inlinable_function_p): Leave it up to the - front-end to turn -finline-functions into DECL_INLINE set for all - functions. - -2001-10-16 Stan Shebs - - * config/rs6000/darwin.h (ASM_COMMENT_START): Define. - -2001-10-16 Alan Modra - - * recog.c: Formatting and comment typo fixes. - - * configure.in (gcc_cv_as_bfd_srcdir): New. Use it to find gas - version in single tree build. - * configure: Regenerate. - -2001-10-15 David Edelsohn - - * config/rs6000/rs6000.md (cr_logical): Swap order of CODE and - MODE arguments to gen_rtx and compare operand with const0_rtx. - -2001-10-15 Neil Booth - - * system.h: Poison old unused target macros. - * config/dsp16xx.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove. - * config/stormy16/stormy16.c: Update references to obsolete macros. - * config/stormy16/stormy16.h: Similarly. - * config/stormy16/stormy16.md: Similarly. - * config/cris/cris.h: Similarly. - -2001-10-15 Neil Booth - - * cpplib.c (struct pragma_entry): Store the name as a hashnode. - (lookup_pragma_entry, insert_pragma_entry, do_pragma, - cpp_register_pragma): Update accordingly. - -2001-10-14 Neil Booth - - * c-pragma.h (cpp_register_pragma_space): Remove. - * cpplib.h (cpp_register_pragma_space): Remove. - * cpplib.c (lookup_pragma_entry, insert_pragma_entry): New. - (cpp_register_pragma_space): Remove. - (cpp_register_pragma): Simplify using lookup_pragma_entry, - add sanity checks. - (do_pragma): Similarly. - (_cpp_init_internal_pragmas): Don't register namespaces. - - * config/v850/v850.h (REGISTER_TARGET_PRAGMAS): - Don't register namespaces. - * cp/lex.c (init_cp_pragma): Similarly. - * doc/tm.texi: Update. - -2001-10-10 Craig Rodrigues - - PR c/4157 - * config/i386/cygwin.h: Add missing space to MINGW_INCLUDES - -2001-10-13 Michael Collison - - * config/dsp16xx/dsp16xx.md: Rewrite for more efficient code and - add scheduling support. - * config/dsp16xx/dsp16xx.h: Rewrite for more efficient code. - * config/dsp16xx/dsp16xx.c: Rewrite for more efficient code. - * config/dsp16xx/dsp16xx-protos.h: Add new function prototypes. - - -2001-10-13 Hans-Peter Nilsson - - * config/cris/cris.c (cris_legitimate_pic_operand): Kludge around - missing CONSTANT_P test in core GCC. - -2001-10-12 Neil Booth - - * cppmain.c (struct printer): New member source. - (scan_translation_unit): Fix spacing at start of lines. - (cb_line_change): Update. - - * gcc.dg/cpp/spacing2.c: New test. - -2001-10-12 Hans-Peter Nilsson - - * config/cris/arit.c: Use __builtin_labs, not abs. - - * config/cris/cris.h (SET_STRIPPABLE_EXECUTABLE): Don't define. - - * config/cris/cris.c (cris_target_asm_function_epilogue): Move - misplaced sprintf and fprintf argument. - -2001-10-12 Zack Weinberg - - * ABOUT-NLS, aclocal.m4: Update i18n framework from gettext 0.10.40. - * configure.in, Makefile.in: Take out obsolete check-po logic. - * configure, config.in: Regenerate. - -2001-10-12 Ziemowit Laski - - * objc/objc-act.c (finish_objc): Correct precondition for emitting - symtab declarations. - -2001-10-12 Stan Shebs - - * config/rs6000/rs6000.c: Remove uses of "register" specifier in - declarations of arguments and local variables. - -2001-10-12 Christopher Faylor - - * config/i386/cygwin.h: Revert erroneous checkin of crtbegin and - ENDFILE_SPEC definition. - -2001-10-12 Kazu Hirata - - * gthr-dce.h: Fix comment formatting. - * gthr-posix.h: Likewise. - * gthr-single.h: Likewise. - * gthr-solaris.h: Likewise. - * gthr-vxworks.h: Likewise. - * gthr-win32.h: Likewise. - -2001-10-12 Jakub Jelinek - - * final.c (output_asm_insn): Make sure assembly dialects are - terminated, not nested. Output `|' and `}' characters if they - don't appear inside assembly dialect selection. - * config/i386/i386.md (rep_movdi_rex64, rep_movsi, rep_movsi_rex64, - rep_movqi, rep_movqi_rex64, rep_stosdi_rex64, rep_stossi, - rep_stossi_rex64, rep_stosqi, rep_stosqi_rex64, strsetsi_1, - strsetsi_rex_1): Add {} braces. - -2001-10-11 Zack Weinberg - - * toplev.c (compile_file): Ignore return value from yyparse. - Always pop any nested binding levels after yyparse returns. - -2001-10-11 Richard Henderson - - * doc/c-tree.texi (Expression trees): Add VTABLE_REF. - -2001-10-11 Richard Henderson - - * dwarf2out.c (add_const_value_attribute): If long < HOST_WIDE_INT, - fall back to add_AT_long_long for large CONST_INT. - -2001-10-11 Richard Henderson - - * config/i386/i386.md (setcc splitters): Add four splitters to - simplify compound compares that simplify_comparison can't handle. - -2001-10-11 Zack Weinberg - - * cpplex.c (digraph_spellings, token_spellings): Make static. - -2001-10-11 Franz Sirl - - * unroll.c (loop_iterations): Fixup last patch. - -2001-10-11 Richard Henderson - - * rtl.h (REG_VTABLE_REF): New. - * rtl.c (reg_note_name): Add it. - * combine.c (distribute_notes): Handle it. - * final.c (final_scan_insn): Handle it. - * tree.def (VTABLE_REF): New. - * expr.c (expand_expr): Handle it. - * varasm.c (assemble_vtable_entry, assemble_vtable_inherit): New. - * output.h: Declare them. - -2001-10-11 Richard Henderson - - * dwarf2out.c (rtl_for_decl_location): If no DECL_RTL, look - for a DECL_INITIAL. - -2001-10-11 David Edelsohn - - * config/rs6000/xcoff.h (UNALIGNED_DOUBLE_INT_ASM_OP): Only - available in 64-bit mode. - -2001-10-11 Hans-Peter Nilsson - - * config.gcc: Add cris-*-aout, cris-*-elf, cris-*-none, - cris-*-linux* cases. - * config/cris/cris-protos.h: New file. - * config/cris/cris.c: New file. - * config/cris/cris.h: New file. - * config/cris/cris.md: New file. - * config/cris/linux.h: New file. - * config/cris/aout.h: New file. - * config/cris/arit.c: New file. - * config/cris/cris_abi_symbol.c: New file. - * config/cris/mulsi3.asm: New file. - * config/cris/t-aout: New file. - * config/cris/t-cris: New file. - * config/cris/t-elfmulti: New file. - * config/cris/t-linux: New file. - * doc/invoke.texi: Add CRIS options. - * doc/install.texi (Specific): Add blurb for CRIS. - -2001-10-10 Hartmut Schirmer - - * config/float-i128.h: Make sure __STDC__VERSION__ is defined - before using it. - * config/float/i32.h: Likewise. - * config/float-i386.h: Likewise. - * config/float-i64.h: Likewise. - * config/float-m68k.h: Likewise. - * config/float-sh.h: Likewise. - * config/float-sparc.h: Likewise. - -2001-10-11 Hans-Peter Nilsson - - * doc/contrib.texi: Add note about CRIS port to my entry. - -2001-10-11 Kazu Hirata - - * basic-block.h: Fix formatting. - * bitmap.h: Likewise. - * cpplib.h: Likewise. - * c-tree.h: Likewise. - * diagnostic.h: Likewise. - * flags.h: Likewise. - * ggc.h: Likewise. - * longlong.h: Likewise. - * real.h: Likewise. - * reload.h: Likewise. - * rtl.h: Likewise. - * tree.h: Likewise. - -2001-10-10 Richard Henderson - - * c-parse.in (asm_operand): Allow named operands. - * genconfig.c (max_recog_operands): Set to 29. - * local-alloc.c (requires_inout): Skip multiple digits. - * recog.c (asm_operand_ok): Likewise. - (preprocess_constraints): Use strtoul for matching constraints. - (constrain_operands): Likewise. - * regmove.c (find_matches): Likewise. - * reload.c (find_reloads): Likewise. - * stmt.c (parse_output_constraint): Don't reject in-out - constraint on operands > 9. Reject '[' in constraint. - (expand_asm_operands): Handle named operands. Use strtoul - for matching constraints. - (check_operand_nalternatives): Split out from expand_asm_operands. - (check_unique_operand_names): New. - (resolve_operand_names, resolve_operand_name_1): New. - - * doc/extend.texi (Extended Asm): Document named operands. - * doc/md.texi (Simple Constraints): Document matching constraints - on operands > 9. - -2001-10-10 Richard Henderson - - * combine.c (try_combine): Handle a SEQUENCE of one insn. - - * i386.c (test splitter): Narrow tests vs paradoxical subregs. - (jcc splitters): Add two splitters to simplify compound compares - that simplify_comparison can't handle. - -2001-10-10 Richard Henderson - - * langhooks.c: Include langhooks.h. - * Makefile.in (langhooks.o): Depend on it. - -Wed Oct 10 23:49:06 EDT 2001 John Wehle (john@feith.com) - - * rtlanal.c (noop_move_p): Insns with a REG_RETVAL note - should not be considered as a no-op. - * flow.c (delete_noop_moves): Handle REG_LIBCALL notes. - -2001-10-10 Stan Shebs - - * alias.c: Remove uses of "register" specifier in declarations - of arguments and local variables. - * c-common.c: Ditto. - * c-convert.c: Ditto. - * c-decl.c: Ditto. - * c-format.c: Ditto. - * c-semantics.c: Ditto. - * c-typeck.c: Ditto. - * caller-save.c: Ditto. - * calls.c: Ditto. - * cfg.c: Ditto. - * cfgbuild.c: Ditto. - * cfgrtl.c: Ditto. - * collect2.c: Ditto. - * combine.c: Ditto. - * convert.c: Ditto. - * cppexp.c: Ditto. - * cppfiles.c: Ditto. - * cse.c: Ditto. - * dbxout.c: Ditto. - * defaults.h: Ditto. - * df.c: Ditto. - * dwarf2out.c: Ditto. - * dwarfout.c: Ditto. - * emit-rtl.c: Ditto. - * explow.c: Ditto. - * expmed.c: Ditto. - * expr.c: Ditto. - * final.c: Ditto. - * fix-header.c: Ditto. - * floatlib.c: Ditto. - * flow.c: Ditto. - * fold-const.c: Ditto. - * function.c: Ditto. - * gcc.c: Ditto. - * gcse.c: Ditto. - * gen-protos.c: Ditto. - * genattrtab.c: Ditto. - * gencheck.c: Ditto. - * genconfig.c: Ditto. - * genemit.c: Ditto. - * genextract.c: Ditto. - * genflags.c: Ditto. - * gengenrtl.c: Ditto. - * genoutput.c: Ditto. - * genpeep.c: Ditto. - * genrecog.c: Ditto. - * gensupport.c: Ditto. - * global.c: Ditto. - * gmon.c: Ditto. - * graph.c: Ditto. - * haifa-sched.c: Ditto. - * hard-reg-set.h: Ditto. - * hash.c: Ditto. - * integrate.c: Ditto. - * jump.c: Ditto. - * lists.c: Ditto. - * local-alloc.c: Ditto. - * loop.c: Ditto. - * mips-tdump.c: Ditto. - * mips-tfile.c: Ditto. - * optabs.c: Ditto. - * prefix.c: Ditto. - * print-rtl.c: Ditto. - * read-rtl.c: Ditto. - * real.c: Ditto. - * recog.c: Ditto. - * reg-stack.c: Ditto. - * regclass.c: Ditto. - * regmove.c: Ditto. - * reload.c: Ditto. - * reload1.c: Ditto. - * reorg.c: Ditto. - * resource.c: Ditto. - * rtl.c: Ditto. - * rtlanal.c: Ditto. - * scan.c: Ditto. - * sched-deps.c: Ditto. - * sched-rgn.c: Ditto. - * sdbout.c: Ditto. - * simplify-rtx.c: Ditto. - * stmt.c: Ditto. - * stor-layout.c: Ditto. - * toplev.c: Ditto. - * tradcif.y: Ditto. - * tradcpp.c: Ditto. - * tree.c: Ditto. - * unroll.c: Ditto. - * varasm.c: Ditto. - * xcoffout.c: Ditto. - -2001-10-10 Richard Henderson - - * rtl.h (can_reverse_comparison_p): Remove. - -2001-10-10 Christopher Faylor - - * config/i386/cygwin.h: Avoid adding include files if -nostdinc is - used. - -2001-10-10 Danny Smith - - * config/i386/mingw32.h (WIN32_NO_ABSOLUTE_INST_DIRS): New define. - (Thanks to Chris Faylor for suggesting macro name). - (CPP_PREDEFINES): Define __MINGW32__ but don't set value; add more - WIN32 defines. - (STANDARD_INCLUDE_DIR): Remove i386- from directory name. - (STANDARD_INCLUDE_COMPONENT): Change to MINGW. - (MATH_LIBRARY): Undef before definition. - (OUTPUT_QUOTED_STRING): Likewise. - * config/i386/cygwin.h: Use WIN32_NO_ABSOLUTE_INST_DIRS. - -2001-10-10 Richard Henderson - - * unwind-dw2-fde.c (fde_compare_t): Change return type to int. - (fde_unencoded_compare): Likewise. Don't use subtraction to get - a tristate comparison value. - (fde_single_encoding_compare, fde_mixed_encoding_compare): Likewise. - -2001-10-10 Franz Sirl - - PR c++/4512 - * unroll.c (loop_iterations): Ignore insns generated by loop - unrolling. - - * config.gcc (mips*-*-gnu*): Delete support. - * config/mips/gnu.h: Remove. - -2001-10-10 Kazu Hirata - - * calls.c: Fix formatting. - * c-decl.c: Likewise. - * cfgcleanup.c: Likewise. - * combine.c: Likewise. - * cppfiles.c: Likewise. - * cpplib.c: Likewise. - * cppmacro.c: Likewise. - * crtstuff.c: Likewise. - * cse.c: Likewise. - * dwarf2out.c: Likewise. - * expmed.c: Likewise. - * expr.c: Likewise. - * fold-const.c: Likewise. - * function.c: Likewise. - * gcse.c: Likewise. - * genattrtab.c: Likewise. - * ggc-page.c: Likewise. - * integrate.c: Likewise. - * libgcc2.c: Likewise. - * loop.c: Likewise. - * optabs.c: Likewise. - * profile.c: Likewise. - * protoize.c: Likewise. - * real.c: Likewise. - * recog.c: Likewise. - * reload1.c: Likewise. - * reload.c: Likewise. - * reorg.c: Likewise. - * resource.c: Likewise. - * sched-rgn.c: Likewise. - * sdbout.c: Likewise. - * stmt.c: Likewise. - * toplev.c: Likewise. - * varasm.c: Likewise. - -2001-10-10 Janis Johnson , Alexandre Oliva - - * langhooks.c: Include rtl.h, insn-config.h and integrate.h. - * Makefile.in (langhooks.o): Add dependencies. - -Wed Oct 10 00:41:29 EDT 2001 John Wehle (john@feith.com) - - * rs6000.c (rs6000_emit_load_toc_table): Don't - strdup the toc label. - (create_TOC_reference): Likewise. - -2001-10-09 Danny Smith - - * config.gcc (i[34567]86-*-mingw32*): Make msvcrt-dependent - version default. - -2001-10-09 Danny Smith - - * config/i386/i386.c (ix86_attribute_table): Correct - min_len, max_len fields for dllimport, dllexport and shared. - -2001-10-10 Joseph S. Myers - - * doc/c-tree.texi, doc/cppinternals.texi, doc/extend.texi, - doc/install.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: - Consistently use "nonzero" instead of "non-zero". - -2001-10-09 Kazu Hirata - - * acconfig.h: Fix comment formatting. - * c-dump.h: Likewise. - * c-tree.h: Likewise. - * conditions.h: Likewise. - * expr.h: Likewise. - * function.h: Likewise. - * gthr.h: Likewise. - * hwint.h: Likewise. - * integrate.h: Likewise. - * intl.h: Likewise. - * loop.h: Likewise. - * optabs.h: Likewise. - -2001-10-09 Kazu Hirata - - * c-common.h: Fix comment formatting. - * c-dump.c: Likewise. - * cfg.c: Likewise. - * diagnostic.h: Likewise. - * except.c: Likewise. - * gcc.h: Likewise. - * gcov-io.h: Likewise. - * genattrtab.c: Likewise. - * output.h: Likewise. - * predict.h: Likewise. - * reload1.c: Likewise. - * reload.h: Likewise. - * resource.h: Likewise. - * scan.h: Likewise. - * system.h: Likewise. - * tree.h: Likewise. - * tree-inline.c: Likewise. - * tsystem.h: Likewise. - * varasm.c: Likewise. - * xcoffout.h: Likewise. - -2001-10-09 Joseph S. Myers - - * doc/gcc.texi: Document preference for "nonzero" over "non-zero". - -2001-10-09 Joseph S. Myers - - * config/alpha/freebsd.h, config/alpha/lib1funcs.asm, - config/i386/i386elf.h, config/i386/netbsd-elf.h, - config/i386/netware.h, config/mcore/gfloat.h, - config/mcore/mcore.c, config/mcore/mcore.h, config/mcore/mcore.md, - config/netware.h, gccbug.in: Update FSF address. - -2001-10-09 Kazu Hirata - - * c-common.c: Fix comment typos. - * cfgrtl.c: Likewise. - * collect2.c: Likewise. - * cpplex.c: Likewise. - * doloop.c: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * expr.c: Likewise. - * fold-const.c: Likewise. - * gcc.c: Likewise. - * gcov.c: Likewise. - * gcse.c: Likewise. - * global.c: Likewise. - * ifcvt.c: Likewise. - * loop.c: Likewise. - * optabs.c: Likewise. - * protoize.c: Likewise. - * regclass.c: Likewise. - * reorg.c: Likewise. - * rtl.h: Likewise. - * stmt.c: Likewise. - * tree.h: Likewise. - * doc/cpp.texi: Likewise. - * doc/c-tree.texi: Likewise. - * doc/extend.texi: Likewise. - * doc/invoke.texi: Likewise. - * doc/objc.texi: Likewise. - * doc/tm.texi: Likewise. - -2001-10-08 Richard Henderson - - * varasm.c (set_named_section_flags): Initialize "declared". - -2001-10-08 Robert Lipe - - * varasm.c (struct in_named_entry): Add declared. - (named_section_first_declaration): New function. - (default_elf_asm_named_section): Use it. - * output.h (named_section_first_declaration): New. - -2001-10-08 Richard Henderson - - * i386.md (movsi_xor): Export. - (setcc peep2): Use it when available; add an alternative to - match zero_extendhisi2_and. - -2001-10-08 Kaveh R. Ghazi - - * romp-protos.h (romp_initialize_trampoline): New function. - * romp.c (romp_initialize_trampoline): Likewise. - * romp.h (INITIALIZE_TRAMPOLINE): Define in terms of - romp_initialize_trampoline. - -2001-10-08 Kaveh R. Ghazi - - * m68k/3b1.h (ASM_OUTPUT_SOURCE_LINE): Don't reference `last_linenum'. - * m68k/auxas.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * m68k/crds.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * m68k/mot3300.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - -2001-10-08 Franz Sirl - - * unroll.c (loop_iterations): Extend check for multiple back edges. - -2001-10-08 Alexandre Oliva - - * langhooks.h: New file. - * Makefile.in (OBJS): Added langhooks.o. - (c-lang.o): Depend on langhooks.h. - (c-common.o): Don't depend on tree-inline.h. - (tree-inline.o): Depend on toplev.h. - (langhooks.o): New rule. - * c-common.c: Don't include tree-inline.h. - (c_mark_lang_decl): Mark argument c as unused. - (c_common_lang_init): Don't initialize hooks here. - * c-lang.c: Include langhooks.h, then override some macros. - (lang_hooks): Initialize with macros in langhooks.h. - (c_init): Don't initialize hooks here. - * toplev.c (struct lang_hooks_for_tree_inlining): New struct. - (struct lang_hooks): Add tree_inlining. Refer to langhooks.h. - * tree-inline.c: Include toplev.h. Don't define hook variables. - * tree-inline.h: Don't define hook types nor declare hook - variables. Move macros to... - * langhooks.c: ... new file, as functions. Adjust all callers. - -2001-10-08 Jeffrey A Law - - * sibcall.c (optimize_sibling_and_tail_recursive_calls): Call - purge_mem_unchanging_flag on all instructions, not just on those - before NOTE_INSN_FUNCTION_BEG. - -2001-10-08 Neil Booth - - * cppmacro.c (_cpp_create_definition): Leave comments off. - - * doc/cpp.texi: Update. - -2001-10-08 DJ Delorie - - * c-decl.c (grokfield): Make sure the only unnamed fields - we're allowing are either structs or unions. - * doc/extend.texi: Add documentation for the unnamed field - extension. - -2001-10-08 Zack Weinberg - - * aclocal.m4 (gcc_AC_PROG_GNAT): New. - * configure.in: Use it. - * configure: Regenerated. - * config/pa/t-linux, config/pa/t-pa, config/pa/t-pa64, - config/pa/t-pro: Set T_ADAFLAGS, not ADA_CFLAGS. - -2001-10-08 Neil Booth - - * cppfiles.c (open_file): Don't mark zero-length files - never-reread here. Don't output diagnostics here either. - (stack_include_file): Mark them never-reread here. - (_cpp_read_file): Update. - -2001-10-08 Richard Henderson - - * config/i386/sol2.h (UNALIGNED_DOUBLE_INT_ASM_OP): New. - -2001-10-08 Richard Henderson - - * expr.c (store_expr): When converting a CONST_INT for storage - in a SUBREG, convert it to both SUBREG modes before stripping - the SUBREG. - -2001-10-08 Richard Henderson - - * varasm.c (restore_varasm_status): New. - * function.h: Declare it. - * function.c (pop_function_context_from): Call it. - -2001-10-08 Richard Henderson - - * c-common.h (struct c_lang_decl): Add declared_inline. - * c-tree.h (DECL_DECLARED_INLINE_P): New. - * c-lang.c (c_disregard_inline_limits): Use it. - * c-decl.c (duplicate_decls): Likewise. - (pushdecl, redeclaration_error_message): Likewise. - (pushdecl): Allocate DECL_LANG_SPECIFIC if needed. - (grokdeclarator): Likewise. Set DECL_DECLARED_INLINE_P. - Set DECL_INLINE if -finline-functions. - (store_parm_decls): Don't allocate DECL_LANG_SPECIFIC here. - -2001-10-08 Neil Booth - - * cppmacro.c (funlike_invocation_p): Move some logic to caller - in enter_macro_context. Create a padding token in its own context - if necessary when the search for '(' fails. - (enter_macro_context): Update. - -2001-10-07 Joseph S. Myers - - * ChangeLog.2, c-decl.c, config/i386/i386.md, doc/gcc.texi, gcc.c, - genmultilib, toplev.c: Fix spelling errors of "separate" as - "seperate", and corresponding spelling errors of related words. - -2001-10-07 Kaveh R. Ghazi - - * builtins.c (expand_builtin_setjmp_receiver): Const-ify. - * c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length): - Likewise. - * c-dump.c (dump_option_value_info): Likewise. - * c-format.c (format_length_info, format_char_info, - format_flag_spec, format_flag_pair, format_kind_info): Likewise. - * collect2.c (names): Likewise. - * cppdefault.h (default_include): Likewise. - * cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise. - * flow.c (life_analysis): Likewise. - * gcc.c (dir_separator_str, modify_target, option_map, - target_option_translations, spec_list_1, extra_specs_1, - init_spec): Likewise. - * gcov.c (gcov_version_string): Likewise. - * genattr.c (write_units): Likewise. - * genattrtab.c (make_length_attrs, write_function_unit_info): Likewise. - * gengenrtl.c (rtx_definition, defs): Likewise. - * genrecog.c (pred_table): Likewise. - * global.c (global_alloc): Likewise. - * lcm.c (optimize_mode_switching): Likewise. - * local-alloc.c (find_free_reg): Likewise. - * params.h (param_info): Likewise. - * predict.c (predictor_info): Likewise. - * protoize.c (unexpansion_struct): Likewise. - * real.c (bmask): Likewise. - * recog.h (insn_operand_data, insn_data): Likewise. - * regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise. - * stmt.c (expand_nl_goto_receiver): Likewise. - * toplev.c (da, debug_args, lang_opt, documented_lang_options, - target_switches, target_options): Likewise. - * tradcif.y (token, tokentab2, yylex): Likewise. - * tree.h (attribute_spec): Likewise. - - * alpha.c (override_options, alpha_lookup_xfloating_lib_func): - Likewise. - * arc.c (arc_output_function_epilogue): Likewise. - * arm.c (processors, all_cores, all_architectures, - arm_override_options, isr_attribute_arg, isr_attribute_args, - arm_isr_value): Likewise. - * avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc): - Likewise. - * c4x.c (c4x_int_reglist): Likewise. - * d30v.c (override_options): Likewise. - * h8300.c (shift_insn): Likewise. - * i386.c (size_cost, i386_cost, i486_cost, pentium_cost, - pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost, - ix86_expand_sse_comi, ix86_expand_sse_compare, override_options, - builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg, - ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise. - * i386.h (processor_costs, ix86_cost): Likewise. - * m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise. - * m68hc11.h (processor_costs, m68hc11_cost): Likewise. - * m68k.c (codes_68881, codes_FPA): Likewise. - * m88k.c (mode_from_align, max_from_align, all_from_align, - best_from_align, m_options): Likewise. - * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise. - * mcore.c (mode_from_align): Likewise. - * mips/elf64.h (UNIQUE_SECTION): Likewise. - * mips/iris6gld.h (UNIQUE_SECTION): Likewise. - * mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise. - * mips.h (mips_regno_to_class): Likewise. - * ns32k.c (scales): Likewise. - * pa.c (import_string, magic_milli): Likewise. - * rs6000.c (alt_reg_names, rs6000_override_options): Likewise. - * sparc.c (leaf_reg_remap, sparc_override_options, - reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders): - Likewise. - * sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise. - -2001-10-07 Dale Johannesen - - * reload1.c (reload_reg_free_p): Teach register interference - checking that multiple output reloads are emitted in - reverse order. - reload1.c (reload_reg_reaches_end_p): Ditto. - reload1.c (reloads_conflict): Ditto. - -2001-10-07 Joseph S. Myers - - * doc/c-tree.texi, doc/tm.texi: Consistently put NULL and - NULL_TREE inside @code. - -2001-10-07 Joseph S. Myers - - * doc/gcc.texi: Document consistent style of "32-bit", - "Objective-C", and "@code{NULL}". - -2001-10-06 Zack Weinberg - - * cpplex.c (enum spell_type): Add SPELL_NUMBER. - (cpp_token_len, cpp_spell_token, cpp_output_token, - _cpp_equiv_tokens): Handle it. - * cpplib.h (TTYPE_TABLE): Use SPELL_NUMBER for CPP_NUMBER and - CPP_COMMENT, SPELL_NONE for CPP_PADDING and CPP_EOF. - * cppexp.c (_cpp_parse_expr): Use the correct operator code in - error messages. - -Sat Oct 6 07:42:39 2001 Richard Kenner - - * gcc.c (default_compilers): Remove .ada. - -2001-10-06 Neil Booth - - * doc/cppinternals.texi: Update. - -2001-10-06 Zack Weinberg - - * gcc.c (main): Set this_file_error if the appropriate - compiler for a language has not been installed. - -2001-10-06 Ulrich Weigand - - * config/s390/s390.c (s390_va_arg): Use set_mem_alias_set. - -2001-10-05 Joseph S. Myers - - * gccbug.in (CATEGORIES): Add ada. - -2001-10-05 Catherine Moore - - * config/stormy16/stormy-abi: Document abi changes. - * config/stormy16/stormy16.h (REG_ALLOC_ORDER): Redefine. - (ICALL_REGS): New register class. - (NUM_ARGUMENT_REGISTERS): Now 6. - (DEFAULT_PCC_STRUCT_RETURN): Don't try to return structs - in registers. - (REG_CLASS_FROM_LETTER): Map 'z' to ICALL_REGS. - * config/stormy16.md (call_internal, call_value_internal, - indirect_jump): Use new 'z' constraint. - -2001-10-05 Neil Booth - - * doc/cppinternals.texi: Update. - -2001-10-05 Richard Henderson - - * dwarf2out.c (FRAME_BEGIN_LABEL): New. - (output_call_frame_info): Use it instead of __FRAME_BEGIN__ and - the gas section-name-as-label feature. - -2001-10-05 Neil Booth - - * doc/cppinternals.texi: Update. - -Fri Oct 5 08:17:46 2001 Richard Kenner - - * config/i386/i386.c (ix86_split_to_parts): Use trunc_int_for_mode - to ensure valid SImode constants. - -2001-10-05 Alexandre Oliva - - * Makefile.in (c-decl.o): Depend on tree-inline.h. - (c-lang.o): Likewise, as well as insn-config.h and integrate.h. - * c-decl.c: Include tree-inline.h. - (c_expand_body): Call optimize_inline_calls. Determine whether - a function is inlinable upfront, and only clear - DECL_SAVED_TREE, DECL_INITIAL and DECL_ARGUMENTS if it isn't. - * c-lang.c: Include tree-inline.h, insn-config.h and integrate.h. - (c_disregard_inline_limits): New function. - (inline_forbidden_p, c_cannot_inline_tree_fn): Likewise. - (c_post_options): Enable tree inlining if inlining is enabled. - Don't inline trees when instrumenting functions. - (c_init): Initialize lang_disregard_inline_limits and - lang_cannot_inline_tree_fn. - * tree-inline.c (initialize_inlined_parameters): Handle calls - with fewer arguments than declared parameters, and fewer - parameters than passed arguments. Don't assume value is a - DECL. - (declare_return_variable): Convert return value back to the - original type, if it was promoted. - (tree_inlinable_function_p): New function. - (inlinable_function_p): Don't look at DECL_INLINE if we're - inlining all functions. Make it work with a NULL id. - Re-check DECL_UNINLINABLE after language-specific checks. - * tree-inline.h (tree_inlinable_function_p): Declare it. - * integrate.c (save_for_inline): Don't bother to prepare argvec - when not inlining. - * cse.c (check_for_label_ref): Don't check deleted labels. - - * Makefile.in (tree-inline.o): Depend on newly-included headers. - * tree-inline.c: Include headers needed for the functions moved in. - (struct inline_data, INSNS_PER_STMT): Moved from cp/optimize.c. - (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise. - (copy_body, initialize_inlined_parameters): Likewise. - (declare_return_variable, inlinable_function_p): Likewise. - (expand_call_inline, expand_calls_inline): Likewise. - (optimize_inline_calls, clone_body): Likewise. - (walk_tree, walk_tree_without_duplicates): Moved from cp/tree.c. - (copy_tree_r, remap_save_expr): Likewise. - -2001-10-04 Alexandre Oliva - - * Makefile.in (OBJS): Added tree-inline.o. - (c-common.o): Depend on tree-inline.h. - (tree-inline.o): New target. - * c-common.c: Include tree-inline.h. - (c_mark_lang_decl): Don't mark saved_tree. - (c_common_lang_init): Set lang_anon_aggr_type_p. - * c-common.h (walk_tree_fn, DECL_SAVED_TREE): Moved to tree.h. - (struct c_lang_decl): Moved saved_tree to tree_decl. - * ggc-common.c: Mark saved_tree and inlined_fns of FUNCTION_DECLs. - * integrate.h (function_attribute_inlinable_p): Declare it. - * integrate.c (function_attribute_inlinable_p): Export it. - * tree-inline.c: New file. Define variables declared in... - * tree-inline.h: New file. Declare functions to be moved to - tree-inline.c. Define macros and declare types and hooks for - language-specific tree inlining. - (flag_inline_trees): Moved definition from cp/decl2.c. - * tree.h (walk_tree_fn, DECL_SAVED_TREE): Moved from c-common.h. - (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved from cp/cp-tree.h. - (struct tree_decl): Moved saved_tree from c_lang_decl and - inlined_fns from C++'s lang_decl. - -2001-10-04 Loren J. Rittle - - * Makefile.in (STAGE2_FLAGS_TO_PASS): Remove patches which - propagated HOST_CC, HOST_CFLAGS, HOST_LDFLAGS and HOST_CPPFLAGS. - -2001-10-04 Neil Booth - - * doc/cppinternals.texi: Update. - -2001-10-04 Eric Christopher - - * config/mips/mips.c (init_cumulative_args): Remember to set - cum->prototype. - * config.gcc: Redo linux configuration. Add target_cpu_default - of soft-float to all mipsisa32 combinations and tx39. - * config/mips/linux.h: Remove include of mips.h. - -2001-10-03 Loren J. Rittle - - * Makefile.in (STAGE2_FLAGS_TO_PASS): Propagate HOST_CFLAGS, - HOST_LDFLAGS and HOST_CPPFLAGS. - -2001-10-03 Ziemowit Laski - - * c-parse.in (objc_inherit_code, objc_pq_context, - objc_public_flag): Make static. - (objc_interface_context, objc_implementation_context, - objc_method_context, objc_ivar_chain, objc_ivar_context): Move to - global tree array in objc/objc-act.[ch]. - (methoddef): Remove unnecessary code. - - * objc/objc-act.c: (hashed_attribute, hashed_entry, imp_entry): - Hoist struct definitions to objc-act.h. - (nst_method_hash_list, cls_method_hash_list, imp_list, imp_count, - cat_count): Place declaration in objc-act.h. - (objc_tree_index): Move enumeration to objc-act.h. - (objc_global_trees): Place declaration and macro accessors in - objc-act.h. - (implementation_context): Remove duplicate; use - objc_implementation_context instead: - (method_context): Remove duplicate; use objc_method_context - instead. - (objc_ellipsis_node, objc_method_prototype_template, - implemented_classes, function_type): Move global vars to - objc_global_trees. - (init_objc): Use LAST_BASE_TREE_CODE instead of LAST_CODE. - (build_message_expr): Move actual construction of ObjC message - send nodes to finish_message_expr. - (finish_message_expr): New routine, contains code formerly in - build_message_expr. - * objc/objc-act.h (finish_message_expr): New prototype. - (objc_ivar_chain, objc_method_context, objc_ellipsis_node): Remove - declarations; these vars are now part of objc_global_trees. - (objc_tree_index, objc_global_trees): Move definitions from - objc-act.c. - * objc/objc-tree.def: Update copyright info. - -Wed Oct 3 12:22:11 EDT 2001 John Wehle (john@feith.com) - - * dwarf2asm.c (unaligned_integer_asm_op): Abort if - op is NULL. - * sparc/sysv4.h (UNALIGNED_DOUBLE_INT_ASM_OP): Use - only if TARGET_ARCH64. - -2001-10-02 Bernd Schmidt - - * doc/extend.texi: Fix some problems with previous checkin. - * doc/invoke.texi: Likewise. - -2001-10-02 Neil Booth - - * cpphash.h: Update comments. - (cpp_context): Update. - (spec_nodes): Remove n__Pragma. - * cppinit.c (cpp_create_reader): Update. - (builtin_array): Add _Pragma. - * cpplib.h: Update comments. - (NODE_DISABLED, BT_PRAGMA): New. - (cpp_start_lookahead, cpp_stop_lookahead): Remove prototypes. - * cppmacro.c (struct cpp_macro): Remove disabled. - (builtin_macro): Return int, handle _Pragma, push the new token - on the context stack. - (funlike_invocation_p): Unconstify, update. - (enter_macro_context): Handle builtins here. - (replace_args, push_token_context, push_ptoken_context): - Update for prototype changes. - (_cpp_pop_context): Update. - (cpp_get_token): Don't handle buitins, nor _Pragma here. - (cpp_sys_macro_p): Update. - (_cpp_free_definition): Clear disabled flag. - (_cpp_create_definition): Upate. - * cppmain.c: Update comments. - -Tue Oct 2 12:46:01 CEST 2001 Bo Thorsen , - Andreas Jaeger , - Jan Hubicka - - * doc/invoke.texi (i386 Options): Document x86-64 options. - (i386 and x86-64 Options): Rename i386 options section. - - * config/i386/i386.h (TARGET_UNWIND_INFO): New. - (TARGET_SWITCHES): Add -munwind-info. - (MASK_NO_UNWIND_INFO): New. - (NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_PTRDIFF_TYPE): Define for - biarch compilation. - (ASM_OUTPUT_DOUBLE_INT): New. - - * config/i386/linux64.h: New spec file for Linux x86-64 support. - * config.gcc: Fix tm_file settings for x86-64. - * config/i386/x86-64.h: New file with OS independent x86-64 - definitions. - * config/i386/biarch64.h: New file used to configure compiler - to biarch/64bit compilation. - - * config/i386/i386.c: (override_options): Set flags default - for 64bit compilation. - -Tue Oct 2 12:46:01 CEST 2001 Jan Hubicka - - * i386.c (legitimize_pic_address): Add missing bits of 64bit support. - (ix86_expand_int_movcc): Optimize DImode conditional moves with - constants on x86_64. - (ix86_attr_length_immediate_default): Support MODE_DI. - * i386.md (fixdi splitter): Add missing "&& 1" in splitter - condition. - (indirect_jump, tablejump): Turn into expander. - -2001-10-02 Joseph S. Myers - - * c-common.c (c_format_attribute_table): Make format and - format_arg attributes apply to function types rather than to - decls. - (is_valid_printf_arglist): Construct an attribute list and pass - that to check_function_format rather than a name. - * c-common.h (check_function_format): Adjust prototype. - * c-decl.c (duplicate_decls): Preserve attributes from type of - built-in decl when allowing for harmless conflict in types. - * c-format.c (record_function_format, - record_international_format, function_format_list, - international_format_info, international_format_list): Remove. - (function_format_info): Remove next, name and assembler_name. - Make format_num and first_arg_num be unsigned HOST_WIDE_INT. - (decode_format_attr): New. - (handle_format_attribute): Handle receiving a type rather than a - decl. Call decode_format_attr. Store format information in a - function_format_info. - (handle_format_arg_attribute): Correct comment. Handle receiving - a type rather than a decl. Use unsigned HOST_WIDE_INT for - arg_num. - (check_format_info_recurse, check_format_info_main): Take argument - numbers as unsigned HOST_WIDE_INT. - (check_function_format): Take a list of attributes from the - function type rather than a name or assembler name. Check for - format attributes in that list and the attributes on the type of - the current function rather than looking through - function_format_list. - (check_format_info): Use unsigned HOST_WIDE_INT for argument - numbers. - (check_format_info_recurse): Take format_arg attributes from the - type of the function calls rather than using - international_format_list. Allow for multiple format_arg - attributes. - * c-typeck.c (build_function_call): Pass type attributes to - check_function_format rather than name or assembler name. Don't - require there to be a name or assembler name to check formats. - -2001-10-02 Joseph S. Myers - - * attribs.c (decl_attributes): Possibly call - insert_default_attributes to insert default attributes on - functions in a lazy manner. - * builtin-attrs.def: New file; define the default format and - format_arg attributes. - * c-common.c (c_format_attribute_table): Move to earlier in the - file. - (c_common_nodes_and_builtins): Initialize format_attribute_table. - (enum built_in_attribute, built_in_attributes, - c_attrs_initialized, c_init_attributes, - c_common_insert_default_attributes): New. - (c_common_lang_init): Don't initialize format_attribute_table. Do - call c_init_attributes. - * Makefile.in (c-common.o): Depend on builtin-attrs.def. - * c-common.h (init_function_format_info): Don't declare. - (c_common_insert_default_attributes): Declare. - * c-decl.c (implicitly_declare, builtin_function): Call - decl_attributes. - (init_decl_processing): Don't call init_function_format_info. - (insert_default_attributes): New. - * c-format.c (handle_format_attribute, - handle_format_arg_attribute): Be quiet about inappropriate - declaration when applying default attributes. - (init_function_format_info): Remove. - * tree.h (enum attribute_flags): Add ATTR_FLAG_BUILT_IN. - (insert_default_attributes): Declare. - -2001-10-02 Joseph S. Myers - - * c-format.c (CPLUSPLUS_STD_VER): Define to STD_C94. - -2001-10-01 Jim Wilson - - * sched-deps.c (add_dependence): When elide conditional dependence, - check that insn doesn't modify cond2. - -2001-10-01 Dale Johannesen - - * config/rs6000/rs6000.h (enum processor_type): Add support - for 7400 (G4) and 7450. - (RTX_COSTS): Ditto. - * config/rs6000/rs6000.c (rs6000_override_options): Ditto. - (rs6000_issue_rate): Ditto. - (rs6000_adjust_cost): Fix cycle counts for compares. - (debug_stack_info): Fix an obvious typo. - * config/rs6000/rs6000.md: Add functional units for 7400 and 7450. - * doc/invoke.texi: Document. - * config/rs6000/darwin.h (TARGET_DEFAULT): Set to be reasonable - for Darwin. - (PROCESSOR_DEFAULT): Ditto. - -2001-10-01 Loren J. Rittle - - * Makefile.in (STAGE2_FLAGS_TO_PASS): Propagate HOST_CC. - (fixinc.sh): Map CC, CFLAGS and LDFLAGS to HOST_* versions for - later recursive make invocation. - -2001-10-01 Hans Boehm - - * optabs.c (emit_libcall_block): When using non-call exceptions, - don't add REG_LIBCALL reg notes to trapping calls. - -2001-10-01 David Billinghurst - - * flow.c (propagate_block_delete_libcall): Remove unused first arg - (propagate_one_insn): Update for above change - -2001-10-01 David Billinghurst - - * unwind-sjlj.c (_Unwind_GetRegionStart, _Unwind_GetDataRelBase, - _Unwind_GetTextRelBase): Argument is unused. - -Mon Oct 1 19:20:57 2001 Richard Kenner - - * alias.c (get_alias_set): Try to replace PLACEHOLDER_EXPR. - Loop through NOPs, placeholders, and components. - Don't go through NOPs if change mode. - (record_alias_subset): Do nothing if SUBSET and SET are the same. - * emit-rtl.c (set_mem_alias_set): Enable check. - * expr.c (find_placeholder): New function. - (expand_expr, case PLACEHOLDER_EXPR): Use it. - (expand_expr, case COMPONENT_EXPR): Always copy OP0 when we need - to modify it and avoid unneeded copies. - * expr.h (expand_expr): Always define. - (find_placeholder): New declaration. - -2001-10-01 Stephane Carrez - - * config/m68hc11/m68hc11.md ("add-split"): Fix add split when - operand 2 is the stack pointer. - ("addr-peephole"): Fix address computation peephole when operand 2 - is the stack pointer. - -Mon Oct 1 09:26:41 2001 Richard Kenner - - * config/i386/i386.c (ix86_va_arg): Call set_mem_alias_set. - (ix86_setup_incoming_varargs): Likewise. - -2001-10-01 Jason Merrill - - * stor-layout.c (layout_type): Don't complain about too-large - array here. - -Mon Oct 1 06:43:41 2001 Richard Kenner - - * function.c (keep_stack_depressed): Don't use delete_insn. - - * expr.h (set_mem_alias_set): Move decl to here. - * rtl.h (mem_attrs): New typedef and struct. - (union rtunion_def): Add field for mem_attrs. - (X0MEMATTR, MEM_ATTRS): New macros. - (MEM_ALIAS_SET): Use MEM_ATTRS. - (MEM_DECL, MEM_OFFSET, MEM_SIZE, MEM_ALIGN): New macros. - (MEM_COPY_ATTRIBUTES): Copy MEM_ATTRS. - (set_mem_alias_set): Delete decl from here. - - * alias.c (set_mem_alias_set): Delete from here. - * emit-rtl.c (mem_attrs_htab): New variable. - (rtx_htab_mark, rtx_htab_mark_1): Deleted. - (mem_attrs_htab_hash, mem_attrs_htab_eq): New functions. - (mem_attrs_mark, get_mem_attrs): Likewise. - (gen_rtx_MEM): Clear MEM_ATTRS. - (set_mem_attributes): Move to here. - (set_mem_alias_set): Likewise, and call get_mem_attrs. - (init_emit_once): const_int_htab now deletable htab. - Initialize mem_attrs_htab. - * explow.c (set_mem_attributes): Delete from here. - * function.c (put_var_into_stack): Clear MEM_ATTRS. - (gen_mem_addressof): Likewise; rework to use set_mem_attributes. - * ggc-common.c (ggc_mark_rtx_children, case MEM): New case. - * reload1.c (reload): Rework changing REG to MEM. - -2001-09-30 H.J. Lu - - * acconfig.h (PREFIX_INCLUDE_DIR): New variable. - * config.in: Rebuild. - -2001-09-30 Stephane Carrez - - * config/m68hc11/m68hc11.md ("cmpqi_1"): Fix constraints. - ("tsthi_1"): Avoid allocation in register y. - ("*movqi_68hc12"): Reorganize and fix constraints. - ("zero_extendqisi2"): Prefer d over x and y for operand 1. - ("addqi3"): Likewise. - ("addhi3"): Fix constraints. - ("*logicalhi3_zexthi"): Disparage soft registers. - -2001-09-30 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Fix move of sp - to tmp reg. - -2001-09-30 Stephane Carrez - - * config/m68hc11/m68hc11.h(INCOMING_RETURN_ADDR_RTX): Remove so - that we use setjmp/longjmp exceptions. - -2001-09-30 Neil Booth - - * cpphash.h (POOL_ALIGN, POOL_FRONT, POOL_LIMIT, POOL_BASE, - POOL_SIZE, POOL_ROOM, POOL_COMMIT, struct cpp_chunk, - struct cpp_pool, _cpp_init_pool, _cpp_free_pool, _cpp_pool_reserve, - _cpp_pool_alloc, _cpp_next_chunk): Remove. - (_cpp_extend_buff, BUFF_ROOM): Update. - (_cpp_append_extend_buff): New. - (struct cpp_reader): Remove macro_pool, add a_buff. - * cppinit.c (cpp_create_reader): Initialize a_buff, instead of - macro_pool. - (cpp_destroy): Free a_buff instead of macro_pool. - * cpplex.c (new_chunk, chunk_suitable, _cpp_next_chunk, - new_chunk, _cpp_init_pool, _cpp_free_pool, _cpp_pool_reserve, - _cpp_pool_alloc, ): Remove. - (parse_number, parse_string): Update use of _cpp_extend_buff. - (_cpp_extend_buff): Update. - (_cpp_append_extend_buff, cpp_aligned_alloc): New. - * cpplib.c (glue_header_name, parse_answer): - Update use of _cpp_extend_buff. - (cpp_register_pragma, cpp_register_pragma_space): Use - _cpp_aligned_alloc. - (do_assert, do_unassert): Check for EOL, update. - * cppmacro.c (stringify_arg, collect_args): Update to use - _cpp_extend_buff and _cpp_append_extend_buff. - (save_parameter, parse_params, alloc_expansion_token, - _cpp_create_definition): Rework memory management. - -2001-09-29 Andris Pavenis - - * config/i386/xm-djgpp.h (GCC_DRIVER_HOST_INITIALIZATION): Don't - update md_exec_prefix. - (UPDATE_PATH_HOST_CANONICALIZE): Don't free PATH as it can point - to string constant. - -2001-09-30 Ulrich Weigand - - * config/s390/s390.h (EXTRA_CC_MODES): Add CCLmode. - (SELECT_CC_MODE): Use s390_select_ccmode. - * config/s390/s390-protos.h (s390_select_ccmode): Add. - * config/s390/s390.c (s390_select_ccmode): New. - (s390_match_ccmode): Add CCLmode. - (s390_branch_condition_mask, s390_branch_condition_mnemonic): New. - (output_branch_condition, output_inverse_branch_condition): Removed. - (print_operand): Use s390_branch_condition_mnemonic. - * config/s390/s390.md (addsi3_cc, addsi3_cconly, addsi3_cconly2, - subsi3_cc, subsi3_cconly): Use logical instructions and CCLmode. - (bunordered, bordered, buneq, bungt, bunlt, bnuge, bunle, bltgt): New. - - * config/s390/s390.c (check_and_change_labels): Preserve CC mode - when converting conditional branches to far branches. - * config/s390/s390.md (cmpstr_const, cmpstr_64, cmpstr_31, cmpint_si, - cmpint_di): Use CCSmode instead of CCUmode. - - * config/s390/s390.c (legitimate_la_operand_p): New. - * config/s390/s390-protos.h (legitimate_la_operand_p): Add. - * config/s390/s390.md (movsi): Convert load address patterns to - arithmetic operations when necessary. - (addaddr_picR, addaddr_picL, addaddr_picN): Removed. - (do_la): Renamed to *do_la and use legitimate_la_operand_p. - (*do_la_reg_0): Don't use before reload. - - * config/s390/s390.c (legitimize_address): Make more efficient - use of two-register addressing mode. - - * config/s390/s390.c (s390_function_prologue): Fix incorrect prolog - with -mno-backchain in some corner cases. - - * config/s390/s390.md (cmpsi_cct): Operands 0 and 1 do not commute. - -2001-09-29 Alexandre Oliva - - * reload.c (find_reloads): Mark new USE insns with QImode. - (find_reloads_toplev, find_reloads_address, subst_reg_equivs, - find_reloads_subreg_address): Likewise. - * regrename.c (note_sets, clear_dead_regs): Abort if pseudos are - encountered. - * reload1.c (reload_combine_note_use): Likewise, inside USEs and - CLOBBERs. - (reload): Make sure there are no USEs with mode other than - VOIDmode. At the end, remove those marked with QImode. - -2001-09-29 Per Bothner - - * cppdefault.c (cpp_include_defaults): Also search PREFIX_INCLUDE_DIR. - * Makefile.in (includedir): Rename to local_includedir. - (includedir): Define as $(prefix)/include. - * config.in (PREFIX_INCLUDE_DIR): New variable. - * configure.in (PREFIX_INCLUDE_DIR): Test for new variable. - -2001-09-29 Bernd Schmidt - - * config/i386/i386.c (init_mmx_sse_builtins): Fix type of storelps and - storehps builtins. - * doc/extend.texi (Vector Extensions): New node. - * doc/invoke.texi (Machine Dependent Options): Add documentation for - i386 -mmmx, -msse, -m3dnow. - -Sat Sep 29 15:08:16 CEST 2001 Jan Hubicka - - * doc/invoke.texi (Optimize Options): Revert an accidental checkin. - -2001-09-29 Hans-Peter Nilsson - - * cse.c (cse_insn) [HAVE_cc0]: Fix typo delete-insn -> delete_insn. - - * doc/invoke.texi (Optimize Options): Delete spurious @table. - -2001-09-28 Richard Henderson - - * varasm.c (assemble_integer): Bound alignment check by - BIGGEST_ALIGNMENT. - - * cfgrtl.c (redirect_edge_and_branch): Abort if redirect_jump fails. - -2001-09-28 Rainer Orth - - * config/i386/sol2.h (CPLUSPLUS_CPP_SPEC): Define. - -2001-09-25 Bernd Schmidt - - Mostly from Graham Stott - * c-common.c (type_for_mode): Add support for V2SFmode. - * tree.c (build_common_tree_nodes_2): Likewise. - * tree.h (enum tree_index, global_trees): Likewise. - * config/i386/i386.c (x86_3dnow_a): New variable. - (override_options): Support 3Dnow extensions. - (bdesc_2arg, bdesc_1arg): Some SSE instructions are also part of - Athlon's version of 3Dnow. - (ix86_init_mmx_sse_builtins): Create 3Dnow builtins. - (ix86_expand_builtin): Handle them. - (ix86_hard_regno_mode_ok): Support V2SFmode if using 3Dnow. - * config/i386/i386.h (MASK_3DNOW, MASK_3DNOW_A, TARGET_3DNOW, - TARGET_3DNOW_A): New macros. - (TARGET_SWITCHES): Add 3Dnow switches. - (VALID_MMX_REG_MODE_3DNOW): New macro. - (VECTOR_MODE_SUPPORTED_P): Use it. - (enum ix86_builtins): Add entries for 3Dnow builtins. - * config/i386/i386.md (movv2sf_internal, movv2sf, pushv2sf, pf2id, - pf2iw, addv2sf3, subv2sf3, subrv2sf3, gtv2sf3, gev2sf3, eqv2sf3, - pfmaxv23sf3, pfminv2sf3, mulv2sf3, femms, prefetch_3dnow, prefetchw, - pfacc, pfnacc, pfpnacc, pi2fw, floatv2si2, pavgusb, pfrcpv2sf2, - pfrcpit1v2sf3, pfrcpit2v2sf3, pfrsqrtv2sf2, pfrsqit1v2sf3, - pmulhrwvhi3, pswapdv2si2, pswapdv2sf2): New patterns. - (mmx_pmovmskb, mmx_maskmovq, sse_movntdi, umulv4hi3_highpart, - mmx_uavgv8qi3, mmx_uavgv4hi3, mmx_psadbw, mmx_pinsrw, mmx_pextrw, - mmx_pshufw, umaxv8qi3, smaxv4hi3, uminv8qi3, sminv4hi3, sfence, - sfence_insn, prefetch): Make these available if TARGET_SSE or - TARGET_3DNOW_A. - -Fri Sep 28 19:18:40 CEST 2001 Jan Hubicka - - * i386-protos.h (ix86_setup_incoming_varargs, ix86_va_arg, - ix86_va_start, ix86_build_va_list): Declare. - * i386.c (ix86_setup_incoming_varargs, ix86_va_arg, - ix86_va_start, ix86_build_va_list): New global functions. - * i386.md (sse_prologue_save_insn): New insn. - (sse_prologue_save): New expander. - * i386.h (EXPAND_BUILTIN_VA_ARG, EXPAND_BUILTIN_VA_START, - BUILD_VA_LIST_TYPE, SETUP_INCOMING_VARARGS): New macros. - -2001-09-28 Neil Booth - - * cpplex.c (new_buff, _cpp_get_buff, _cpp_extend_buff): - Use size_t everywhere, make definitions consistent with - prototypes. - -Fri Sep 28 14:59:34 CEST 2001 Jan Hubicka - - * gcse.c (replace_store_insn): Use delete_insn. - * loop.c (move_movables): Likewise; avoid delete_insn - from clobbering notes moved elsewhere. - (check_dbra_loop): Use delete_insn. - * ssa.c (convert_from_ssa): Likewise. - * cse.c (cse_insn): Use delete_insn. - -2001-09-28 Neil Booth - - * cpphash.h (struct cpp_buff): Make unsigned. - (_cpp_get_buff): Take length of size_t. - (_cpp_unaligned_alloc): New. - (BUFF_ROOM, BUFF_FRONT, BUFF_LIMIT): New. - (struct cpp_reader): Remove ident_pool. Add u_buff. - * cppinit.c (cpp_create_reader): Initialize u_buff, not ident_pool. - (cpp_destroy): Destroy u_buff, not ident_pool. - * cpplex.c (parse_number, parse_string, save_comment, - cpp_token_as_text): Update to use the unaligned buffer. - (new_buff): Make unsigned. - (_cpp_unaligned_alloc): New. - * cpplib.c (glue_header_name): Update to use the unaligned buffer. - * cppmacro.c (new_number_token, builtin_macro, stringify_arg): - Similarly. - (collect_args): Make unsigned. - -2001-09-27 Zack Weinberg - - * cpplex.c (cpp_output_token): Use a putc loop for - SPELL_OPERATOR, and fwrite for SPELL_IDENT. - - * configure.in: Detect fwrite_unlocked and fprintf_unlocked. - * configure, config.in: Regenerate. - * system.h: Replace fwrite and fprintf with their unlocked - variants if available. - -2001-09-27 Richard Henderson - - * dwarf2out.c (dwarf2out_frame_finish): Never elide .debug_frame - in favor of .eh_frame. - -2001-09-27 Aldy Hernandez - - * config/rs6000/rs6000.h (FUNCTION_VALUE): Change hardcoded 33 and 3 - to macros. - (LIBCALL_VALUE): Likewise. - -2001-09-27 Neil Booth - - * cpphash.h: Update comment. - * cpplex.c: Update comments. - (_cpp_can_paste): Remove. - * cpplib.h (_cpp_can_paste): Remove. - * cppmacro.c (paste_tokens, paste_all_tokens): Update to use the - lexer rather than _cpp_can_paste. - -2001-09-27 Neil Booth - - * doc/cppinternals.texi: Update. - -2001-09-26 Neil Booth - - * cpphash.h (struct cpp_pool): Remove locks and locked. - (struct cpp_context): Add member buff. - (struct cpp_reader): Remove member argument_pool. - (_cpp_lock_pool, _cpp_unlock_pool): Remove. - * cppinit.c (cpp_create_reader, cpp_destroy): Argument_pool is dead. - * cpplex.c (chunk_suitable): Remove pool argument. - (MIN_BUFF_SIZE, BUFF_SIZE_UPPER_BOUND, EXTENDED_BUFF_SIZE): New. - (new_buff, _cpp_extend_buff): Update. - (_cpp_get_buff): Fix silly pointer bug. Be more selective about - which buffer is returned. - (_cpp_next_chunk, _cpp_init_pool): Pool locking removed. - (_cpp_lock_pool, _cpp_unlock_pool): Remove. - * cppmacro.c (lock_pools, unlock_pools): Remove. - (push_ptoken_context): Take a _cpp_buff. - (enter_macro_context): Pool locking removed. - (replace_args): Use a _cpp_buff for the replacement list with - arguments replaced. - (push_token_context): Clear buff. - (expand_arg): Use _cpp_pop_context. - (_cpp_pop_context): Free a context's buffer, if any. - -2001-09-26 DJ Delorie - - * c-typeck.c (digest_init): Check for sizeless arrays. - -2001-09-26 Richard Henderson - - * optabs.c (init_one_libfunc): Create a dummy function type - instead of using error_mark_node. - -2001-09-26 Neil Booth - - * cpphash.h (struct _cpp_buff, _cpp_get_buff, _cpp_release_buff, - _cpp_extend_buff, _cpp_free_buff): New. - (struct cpp_reader): New member free_buffs. - * cppinit.c (cpp_destroy): Free buffers. - * cpplex.c (new_buff, _cpp_release_buff, _cpp_get_buff, - _cpp_extend_buff, _cpp_free_buff): New. - * cpplib.h (struct cpp_options): Remove unused member. - * cppmacro.c (collect_args): New. Combines the old parse_arg - and parse_args. Use _cpp_buff for memory allocation. - (funlike_invocation_p, replace_args): Update. - -Wed Sep 26 13:20:51 CEST 2001 Jan Hubicka - - * final.c (final_scan_insn): Use delete_insn instead of delete_note. - -2001-09-25 Andrew Haley - - * except.c (sjlj_mark_call_sites): Change address inside sequence. - -2001-09-24 Andrew Haley - - * config/sh/linux.h (LINK_SPEC): Set dynamic-linker to agree with - glibc. - -2001-09-25 Janis Johnson - Jim Wilson - - * doc/install.texi (Specific, ia64-*-linux): Document. - -Tue Sep 25 17:13:56 CEST 2001 Jan Hubicka - - * Makefile.in (cfgrtl.o): Add. - * basic-block.h (alloc_block, alloc_aux_for_block, alloc_aux_for_blocks, - free_aux_for_block, alloc_aux_for_edge, alloc_aux_for_edges, - free_aux_for_edge): Declare. - * cfg.c - (HAVE_return): Undefine. - * basic-block.h (alloc_block, alloc_aux_for_block, alloc_aux_for_blocks, - free_aux_for_block, alloc_aux_for_edge, alloc_aux_for_edges, - free_aux_for_edge): New global functions. - (first_delete_block): New static variable. - (init_flow): Clear first_delete_block. - (basic_block_for_insn, label_value_list, tail_recursion_label_list, - can_delete_note_p, can_delete_label_p, commit_one_edge_insertion, - try_redirect_by_replacing_jump, last_loop_beg_note, - back_edge_of_syntactic_loop_p, force_nonfallthru_and_redirect, - delete_insn, delete_insn_chain, create_basic_block_structure, - create_basic_block, flow_delete_block, compute_bb_for_insn, - free_bb_for_insn, update_bb_for_insn, set_block_for_insn, - set_block_for_new_insns, split_block, merge_blocks_nomove, - block_label, try_redirect_by_replacing_jump, last_loop_beg_note, - redirect_edge_and_branch, force_nonfallthru_and_redirect, - force_nonfallthru, redirect_edge_and_branch_force, tidy_fallthru_edge, - tidy_fallthru_edges, split_edge, insert_insn_on_edge, - commit_one_edge_insertion, commit_edge_insertions, dump_bb, debug_bb, - debug_bb_n, print_rtl_with_bb, verify_flow_info, purge_dead_edges, - purge_all_dead_edges): Move to .... - * cfgrtl.c: New file; .... Here. - - * bb-reorder.c (fixup_reorder_chain): Use alloc_aux_for_block. - (reroder_basic_block): Use alloc_aux_for_blocks. - * predict.c (estimate_bb_frequencies): Likewise; use - alloc_aux_for_edges. - * profile.c (compute_branch_probabilities): Likewise. - (branch_prob): Likewise. - * reg-stack.c (reg_to_stack): Likewise. - - * emit-rtl.c (emit_insns_after): Never return NULL. - - * basic-block.h (set_block_for_new_insns): Delete. - * cfgrtl.c (set_block_for_new_insns): Delete. - - * cfgcleanup.c (try_optimize_cfg): Add fake exit edges for noreturn - calls when crossjumping. - - * cfgcleanup.c (try_simplify_condjump): Cleanup invert_jump call. - * unroll.c (copy_loop_body): Use delete_insn. - - * final.c (final, final_scan_insn): Use delete_insn/delete_note. - * function.c (fixup_var_refs_insn, fixup_var_refs_1, - keep_stack_depressed): Likewise. - * gcse.c (cprop_cc0_jump): Likewise. - * local-alloc.c (update_equiv_regs): Likewise. - * loop.c (scan_loop, loop_delete_insns): Likewise. - * regmove.c (try_auto_increment, fixup_match_1): Likewise. - * reload1.c (reload, calculate_needs_all_insns, reload_as_needed, - delete_output_reload, delete_address_reloads_1, - reload_cse_delete_noop_set, reload_combine, reload_cse_move2add): - Likewise. - * sibcall.c (replace_call_placeholder): Likewise. - * cse.c (cse_insn): Likewise. - -2001-09-25 Bernd Schmidt - - From Graham Stott - (def_builtin): Only define builtins appropriate for target_flags. All - callers changed. - (builtin_decsription): Add new field mask which is used to determine - when to define the builtin via the macro def_builtin. - - (bdesc_comi): Initialize new mask fields. - (bdesc_2srg): Likewise. - (bdesc_1arg): Likewise. - - * config/i386/i386.c (ix86_init_builtins): Correct return type - building v4hi_ftype_v4hi_int_int tree node. - (ix86_expand_sse_comi): Fix typo swapping operands. - Don't swap comparison condition, it is already swapped. - (ix86_expand_sse_compare): Before swapping operands - move operand 1 into new rtx and not the target rtx. - Don't swap comparison condition, it is already swapped. - Always check whether we need to create a new TARGET. - - * config/i386/i386.md: (sse_comi) Fix typos. - (sse_ucomi): Likewise. - (cvtss2si): Fix operand 0 contraint. - (cvttss2si): Likewise. - (sse_unpckhps): Fix mode for operand 2. - (sse_unpcklps): Likewise. - -2001-09-25 Graham Stott - - * sibcall.c (skip_copy_to_return_value): Tighten return value - copy check. - -2001-09-24 David Edelsohn - - * rs6000.c (lwa_operand): Address must be word aligned. - -Mon Sep 24 18:57:59 2001 Richard Kenner - - * tree.c (type_hash_marked_p): Consider as marked if debug symbol - number has been set. - (type_hash_mark): Mark type itself. - -2001-09-24 Neil Booth - - * c-lex.c (cb_def_pragma): Update. - (c_lex): Update, and skip padding. - * cppexp.c (lex, parse_defined): Update, remove unused variable. - * cpphash.h (struct toklist): Delete. - (union utoken): New. - (struct cpp_context): Update. - (struct cpp_reader): New members eof, avoid_paste. - (_cpp_temp_token): New. - * cppinit.c (cpp_create_reader): Update. - * cpplex.c (_cpp_temp_token): New. - (_cpp_lex_direct): Add PREV_WHITE when parsing args. - (cpp_output_token): Don't print leading whitespace. - (cpp_output_line): Update. - * cpplib.c (glue_header_name, parse_include, get__Pragma_string, - do_include_common, do_line, do_ident, do_pragma, - do_pragma_dependency, _cpp_do__Pragma, parse_answer, - parse_assertion): Update. - (get_token_no_padding): New. - * cpplib.h (CPP_PADDING): New. - (AVOID_LPASTE): Delete. - (struct cpp_token): New union member source. - (cpp_get_token): Update. - * cppmacro.c (macro_arg): Convert to use pointers to const tokens. - (builtin_macro, paste_all_tokens, paste_tokens, funlike_invocation_p, - replace_args, quote_string, stringify_arg, parse_arg, next_context, - enter_macro_context, expand_arg, _cpp_pop_context, cpp_scan_nooutput, - _cpp_backup_tokens, _cpp_create_definition): Update. - (push_arg_context): Delete. - (padding_token, push_token_context, push_ptoken_context): New. - (make_string_token, make_number_token): Update, rename. - (cpp_get_token): Update to handle tokens as pointers to const, - and insert padding appropriately. - * cppmain.c (struct printer): New member prev. - (check_multiline_token): Constify. - (do_preprocessing, cb_line_change): Update. - (scan_translation_unit): Update to handle spacing. - * scan-decls.c (get_a_token): New. - (skip_to_closing_brace, scan_decls): Update. - * fix-header.c (read_scan_file): Update. - - * doc/cpp.texi: Update. - -2001-09-24 Kaveh R. Ghazi - - * c-aux-info.c (affix_data_type): Use ATTRIBUTE_MALLOC. Avoid - leak by passing malloc'ed pointer to reconcat, not concat. - -2001-09-24 DJ Delorie - - * varasm.c (array_size_for_constructor): Handle STRING_CSTs also. - -2001-09-24 Ulrich Weigand : - - * flow.c (delete_dead_jumptables): Delete jumptable if the only - reference is from the literal pool. - -2001-09-24 Janis Johnson - - * doc/install.texi (Final install): Request additional information - in mail about successful builds. - -2001-09-24 John David Anglin - - * pa.c (return_addr_rtx): Return NULL_RTX if count is not zero. Use - initial value of return pointer register instead of value in frame-20. - Revise comments. - -2001-09-24 John David Anglin - - * som.h (ASM_OUTPUT_EXTERNAL): Improve formatting. - (ASM_OUTPUT_EXTERNAL_LIBCALL): Only generate a .IMPORT statement for - the libcall if there isn't a referenced identifier for the symbol. - -2001-09-24 John David Anglin - - * pa.h (TRAMPOLINE_TEMPLATE): Add two words to the template for - non 64-bit machines. Use these as a plabel for the trampoline. - (TRAMPOLINE_SIZE): Adjust size for new words. - (INITIALIZE_TRAMPOLINE): Initialize new words. - (TRAMPOLINE_ADJUST_ADDRESS): New. Adjust address to make it a - pointer to the plabel in the trampoline. - -2001-09-24 John David Anglin - - * pa.c (function_arg): Pass floating arguments in both general and - floating registers in indirect (dynamic) calls when generating code - for the 32 bit ABI and the HP assembler. - -2001-09-24 Rainer Orth - - * doc/install.texi: Markup fixes. - Use Solaris 2, SunOS 4 as appropriate. - (Specific, *-*-solaris2*): Explain this. - Unconditionally warn against /usr/ucb tools. - Remove Sun as warning, obsolete. - Move X11 header bug workaround here, update patches. - (Specific, sparc-sun-solaris2*): Detail Sun as fix status. - (Specific, sparc-sun-solaris2.7): Update patch 106950 status. - -2001-09-23 Zack Weinberg - - * errors.h (warning, error, fatal, internal_error): Don't mark - with ATTRIBUTE_PRINTF_n. - * toplev.h (internal_error, fatal_io_error, warning, error, - pedwarn, pedwarn_with_file_and_line, warning_with_file_and_line, - error_with_file_and_line, sorry, error_for_asm, warning_for_asm): - Likewise. - -Sun Sep 23 18:19:48 2001 Richard Kenner - - * function.c (pop_function_context_from): var_refs_queue - and temp slots now in GC memory. - (mark_function_status, free_after_compilation): Likewise; - also struct function now in GC memory. - (assign_stack_temp_for_type): struct temp_slot now in GC memory. - (combine_temp_slots): Likewise. - (schedule_fixup_var_refs): var_refs_queue now in GC memory. - (prepare_function_start): Use GC memory for struct function. - (mark_temp_slot): Deleted. - (gcc_mark_struct_function): struct function now in GC memory. - - * fold-const.c (extract_muldiv, case PLUS_EXPR): Only adjust - code for division, not modulus. - - * rtl.def (MEM): Remove obsolete part of comment. - -2001-09-22 Joseph S. Myers - - * c-format.c (init_function_format_info): Check __builtin_printf - and __builtin_fprintf even if -ffreestanding. Check C99 functions - in gnu89 mode. - -Sat Sep 22 09:09:32 2001 Richard Kenner - - * c-common.c (format_attribute_table): Remove decl. - * tree.h (format_attribute_table, lang_attribute_table): New decls. - (lang_attribute_common): Likewise. - - * function.c (fix_lexical_address): Use set_mem_alias_set. - (expand_function_start): Likewise. - * config/alpha/alpha.h (SETUP_INCOMING_VARARGS): Likewise. - - * varasm.c (output_constant): Fix unused variable warning. - - * attribs.c: New file, from c-common.c. - (attribute_tables): Now four elements. - (format_attribute_table, lang_attribute_common): New variables. - (init_attributes): Reflect above changes. - (handle_mode_attribute): Delete check for wider than uintmax. - * c-common.c: Delete parts moved to attribs.c. - (enum attrs): Deleted; unused. - (c_format_attribute_table): New variable. - (c_common_lang_init): Initialize format_attribute_table with it. - * c-common.h (decl_attributes): Remove decl. - * tree.h (decl_attribute): Move it to here. - * Makefile.in (C_AND_OBJS_OBJS): Add attribs.o. - (attribs.o): New rule. - -2001-09-22 Andreas Jaeger - - * builtins.c (c_getstr): Remove unused variable. - -2001-09-21 Richard Henderson - - * reload1.c (reload): Use delete_insn instead of splatting - NOTE_INSN_DELETED. - -2001-09-21 Richard Henderson - - * reload.c (push_secondary_reload): Don't check for "=" in output - constraint after ""->ALL_REGS check. - -2001-09-21 Richard Henderson - - * predict.c (expected_value_to_br_prob): Use pc_set. - - * optabs.c (init_one_libfunc): Gen a FUNCTION_DECL for use by - ENCODE_SECTION_INFO; get SYMBOL_REF from make_decl_rtl. - -2001-09-21 Richard Henderson - - * rtl.h (LCT_RETURNS_TWICE): New. - * calls.c (emit_call_1): Set current_function_calls_setjmp for - ECF_RETURNS_TWICE. - (emit_library_call_value_1): Map LCT_RETURNS_TWICE - to ECF_RETURNS_TWICE. - * except.c (sjlj_emit_function_enter): Use LCT_RETURNS_TWICE for - call to setjmp. - - * unwind-sjlj.c: Invent the setjmp.h declarations if inhibit_libc. - - * config/stormy16/stormy16.h (DONT_USE_BUILTIN_SETJMP): New. - (JMP_BUF_SIZE): New. - -2001-09-21 Richard Henderson - - * config/stormy16/stormy16.h (REG_CLASS_FROM_LETTER): Map 'd' - to R8_REGS. - -2001-09-21 Richard Henderson - - * tree.def (FDESC_EXPR): New. - * expr.c (expand_expr): Handle it. - * varasm.c (initializer_constant_valid_p): Likewise. - (output_constant): Likewise. - * defaults.h (TARGET_VTABLE_USES_DESCRIPTORS): New. - * config/ia64/ia64.h (TARGET_VTABLE_USES_DESCRIPTORS): New. - (ASM_OUTPUT_FDESC): New. - * doc/tm.texi: Document the new macros. - -21-09-2001 Richard Earnshaw (reanrsha@arm.com) - - * cfgcleanup.c (merge_blocks_move_successor_nojumps): Don't leave - ADDR_VEC or ADDR_DIFF_VEC jump insns as part of the basic block - once merging is complete. - -Fri Sep 21 11:20:12 2001 Richard Kenner - - * integrate.c (allocate_initial_values): Eliminate unused arg warning. - -21-09-2001 Richard Earnshaw (reanrsha@arm.com) - - * cfgcleanup.c (flow_find_cross_jump): Delete any REG_EQUAL notes - that would be invalid after a merge. - -Fri Sep 21 14:24:29 CEST 2001 Jan Hubicka - - * basic-block.h (flow_delete_insn, flow_delete_insn_chain): Kill. - * cfg.c (delete_insn): Rename from ....; use remove_insn; do not - remove some labels. - (flow_delete_insn): This one. - (delete_insn_chain): Rename from ...; do not care labels. - (flow_delete_insn_chain): ... this one. - (flow_delete_block): Remove the insns one BB has been expunged. - (merge_blocks_nomove): Likewise. - (try_redirect_by_replacing_jump): Use delete_insn[_chain]; do not care - updating BB boundaries. - (tidy_fallthru_edge): Likewise. - (commit_one_edge_insertion): Likewise. - * cfgbuild.c (find_basic_block): Likewise. - (find_basic_blocks_1): Likewise. - * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Likewise. - (try_crossjump_to_edge): Likewise. - (try_optimize_cfg): Likewise. - * cse.c (delete_trivially_dead_insns): Likewise. - * df.c (df_insn_delete): Likewise. - * doloop.c (doloop_modify): Use delete_related_insns. - * emit-rtl.c (try_split): Likewise. - (remove_insn): Update BB boundaries. - * expect.c (connect_post_landing_pads): Use delete_related_insns. - * flow.c (delete_dead_jumptables): Use delete_insn[_chain]; do not care - updating BB boundaries. - (propagate_block_delete_insn): Likewise. - (propagate_block_delete_libcall): Likewise. - * function.c (delete_handlers): Use delete_related_insns. - (thread_prologue_and_epilogue_insns): Likewise. - * gcse.c (delete_null_pointer_checks): Use delete_related_insns. - * genpeep.c (gen_peephole): Use delete_related_insns. - * ifcvt.c (noce_process_if_block): Use delete_insn; do not care updating - BB boundaries. - (find_cond_trap): Likewise. - * integrate.c (save_for_inline): Use delete_related_insns. - (copy_insn_list): Likewise. - * jump.c (pruge_linie_number_notes): Likewise. - (duplicate_loop_exit_test): Likewise. - (delete_computation): Likewise. - (delete_related_insn): Rename from ...; use delete_insn - (delete_insn): ... this one. - (redirect_jump): Use delete_related_insns. - * loop.c (scan_loop): Likewise. - (move_movables): Likewise. - (find_and_verify_loops): Likewise. - (check_dbra_loop): Likewise. - * recog.c (peephole2_optimize): Likewise. - * reg-stack.c (delete_insn_for_stacker): Remove. - (move_for_stack_reg): Use delete_insn. - * regmove.c (combine_stack_adjustments_for_block): Likewise. - * reload1.c (delete_address_reloads): Use delete_related_insns. - (fixup_abnormal_edges): Use delete_insn. - * recog.c (emit_delay_sequence): Use delete_related_insns. - (delete_from-delay_slot): Likewise. - (delete_scheduled_jump): likewise. - (optimize_skip): Likewise. - (try_merge_delay_insns): Likewise. - (full_simple_delay_slots): Likewise. - (fill_slots_from_thread): Likewise. - (relax_delay_slots): Likewise. - (make_return_insns): Likewise. - (dbr_schedule): Likewise. - * rtl.h (delete_insn): Rename to delete_related_insns. - (delete_insn, delete_insn_chain): New prototypes. - * ssa-ccp (sse_fast_dce): Remove deleting of DEF, as it is done - by df_insn_delete already. - * ssa-dce.c (delete_insn_bb): Use delete_insn. - * ssa.c (convert_from_ssa): Use delete_related_insns. - * unroll.c (unroll_loop): Likewise. - (calculate_giv_inc): Likewise. - (copy_loop_body): Likewise. - - * i386-protos.h (ix86_libcall_value, ix86_function_value, - ix86_function_arg_regno_p, ix86_function_arg_boundary, - ix86_return_in_memory, ix86_function_value): Declare. - * i386.c (x86_64_int_parameter_registers, x86_64_int_return_registers): - new static valurables. - (x86_64_reg_class): New enum - (x86_64_reg_class_name): New array. - (classify_argument, examine_argument, construct_container, - merge_classes): New static functions. - (optimization_options): Enable flag_omit_frame_pointer and disable - flag_pcc_struct_return on 64bit. - (ix86_libcall_value, ix86_function_value, - ix86_function_arg_regno_p, ix86_function_arg_boundary, - ix86_return_in_memory, ix86_function_value): New global functions. - (init_cumulative_args): Refuse regparm on x86_64, set maybe_vaarg. - (function_arg_advance): Handle x86_64 passing conventions. - (function_arg): Likewise. - * i386.h (FUNCTION_ARG_BOUNDARY): New macro. - (RETURN_IN_MEMORY): Move offline. - (FUNCTION_VALUE, LIBCALL_VALUE): Likewise. - (FUNCTION_VALUE_REGNO_P): New macro. - (FUNCTION_ARG_REGNO_P): Move offline. - (struct ix86_args): Add maybe_vaarg. - * next.h (FUNCTION_VALUE_REGNO_P): Delete. - * unix.h (FUNCTION_VALUE_REGNO_P): Delete. - -2001-09-21 Hartmut Penner - - * s390.md: Changed attributes for scheduling. - * s390.c: (s390_adjust_cost, s390_adjust_priority) - Changed scheduling - -2001-09-21 Joseph S. Myers - - Table-driven attributes. - * c-decl.c, config/alpha/alpha.c, config/arc/arc.c, - config/arm/arm.c, config/arm/pe.c, config/avr/avr.c, - config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h, - config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c, - config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c, - config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi, - doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c, - tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. - * tree.h (struct tree_decl): Change machine_attributes to - attributes. - * doc/c-tree.texi: Document that all attributes are now attached - to decls and types. - * c-common.c (add_attribute, attrtab, attrtab_idx, - default_valid_lang_attribute, valid_lang_attribute): Remove. - (attribute_tables, attributes_initialized, - c_common_attribute_table, default_lang_attribute_table): New - variables. - (handle_packed_attribute, handle_nocommon_attribute, - handle_common_attribute, handle_noreturn_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_no_instrument_function_attribute, - handle_no_check_memory_usage_attribute, handle_malloc_attribute, - handle_no_limit_stack_attribute, handle_pure_attribute): New - functions. - (init_attributes, decl_attributes): Rewrite to implement - table-driven attributes. - * c-common.h (enum attribute_flags): Move to tree.h. - * c-format.c (decl_handle_format_attribute, - decl_handle_format_arg_attribute): Rename to - handle_format_attribute and handle_format_arg_attribute. Update - for table-driven attributes. - * c-common.h (decl_handle_format_attribute, - decl_handle_format_arg_attribute): Remove prototypes. - (handle_format_attribute, handle_format_arg_attribute): Add - prototypes. - * c-decl.c (grokdeclarator): Handle attributes nested inside - declarators. - * c-parse.in (setattrs, maybe_setattrs): Remove. - (maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs. - Update to handle nested attributes properly. - (maybe_resetattrs, after_type_declarator, - parm_declarator_nostarttypename, notype_declarator, absdcl1_noea, - absdcl1_ea, direct_absdcl1): Update to handle nested attributes - properly. - (make_pointer_declarator): Update to handle nested attributes - properly. - * doc/extend.texi: Update documentation of limits of attributes - syntax. Warn about problems with attribute semantics in C++. - * target.h (struct target): Remove valid_decl_attribute and - valid_type_attribute. Add attribute_table and - function_attribute_inlinable_p. - * target-def.h (TARGET_VALID_DECL_ATTRIBUTE, - TARGET_VALID_TYPE_ATTRIBUTE): Remove. - (TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): - Add. - (TARGET_INITIALIZER): Update. - * integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default - definition. - (function_attribute_inlinable_p): New function. Check for the - presence of any machine attributes before using - targetm.function_attribute_inlinable_p. - (function_cannot_inline_p): Update. - * Makefile.in (integrate.o): Update dependencies. - * doc/tm.texi: Update documentation of target attributes and - example definition of TARGET_VALID_TYPE_ATTRIBUTE. - * tree.c (default_valid_attribute_p, valid_machine_attribute): - Remove. - (default_target_attribute_table, - default_function_attribute_inlinable_p): New. - (lookup_attribute): Update comment to clarify handling of multiple - attributes with the same name. - (merge_attributes, attribute_list_contained): Allow multiple - attributes with the same name but different arguments to appear in - the same attribute list. - * tree.h (default_valid_attribute_p): Remove prototype. - (struct attribute_spec): New. - (default_target_attribute_table): Declare. - (enum attribute_flags): Move from c-common.h. Add - ATTR_FLAG_TYPE_IN_PLACE. - (default_function_attribute_inlinable_p): Declare. - * config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove. - (TARGET_VALID_DECL_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (vms_attribute_table): New. - * config/arc/arc.c (arc_valid_decl_attribute): Remove. - (TARGET_VALID_DECL_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (arc_attribute_table, arc_handle_interrupt_attribute): New. - * config/arm/arm.c (arm_valid_type_attribute_p, - arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p): - Remove. - (TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't - define. - (TARGET_ATTRIBUTE_TABLE): Define. - (arm_attribute_table, arm_handle_fndecl_attribute, - arm_handle_isr_attribute): New. - * config/avr/avr.c (avr_valid_type_attribute, - avr_valid_decl_attribute): Remove. - (TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't - define. - (TARGET_ATTRIBUTE_TABLE): Define. - (avr_attribute_table, avr_handle_progmem_attribute, - avr_handle_fndecl_attribute): New. - * config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove. - (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (c4x_attribute_table, c4x_handle_fntype_attribute): New. - * config/h8300/h8300.c (h8300_valid_decl_attribute): Remove. - (TARGET_VALID_DECL_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (h8300_attribute_table, h8300_handle_fndecl_attribute, - h8300_handle_eightbit_data_attribute, - h8300_handle_tiny_data_attribute): New. - * config/i386/i386-protos.h (ix86_valid_type_attribute_p, - i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p): - Remove prototypes. - (ix86_handle_dll_attribute, ix86_handle_shared_attribute): New - declarations. - * config/i386/i386.c (ix86_valid_type_attribute_p: Remove. - (TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't - define. - (TARGET_ATTRIBUTE_TABLE): Define. - (ix86_attribute_table, ix86_handle_cdecl_attribute, - ix86_handle_regparm_attribute): New. - * config/i386/winnt.c (i386_pe_valid_decl_attribute_p, - i386_pe_valid_type_attribute_p): Remove. - (ix86_handle_dll_attribute, ix86_handle_shared_attribute): New. - * config/ia64/ia64.c (ia64_valid_type_attribute): Remove. - (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (ia64_attribute_table): New. - * config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1, - interrupt_ident2, model_ident1, model_ident2): Remove. - (TARGET_VALID_DECL_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (init_idents): Update. - (m32r_attribute_table, m32r_handle_model_attribute): New. - * config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p): - Remove. - (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New. - * config/mcore/mcore.c (mcore_valid_decl_attribute): Remove. - (TARGET_VALID_DECL_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (mcore_attribute_table, mcore_handle_naked_attribute): New. - * config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove. - (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (ns32k_attribute_table, ns32k_handle_fntype_attribute): New. - * config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove. - (TARGET_VALID_TYPE_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (rs6000_attribute_table, rs6000_handle_longcall_attribute): New. - * config/sh/sh.c (sh_valid_decl_attribute): Remove. - (TARGET_VALID_DECL_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (sh_attribute_table, sh_handle_interrupt_handler_attribute, - sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute): - New. - * config/stormy16/stormy16.c (stormy16_valid_type_attribute): - Remove. - (TARGET_VALID_TYPE_ATTRIBUTE): Don't define - (TARGET_ATTRIBUTE_TABLE): Define. - (stormy16_attribute_table, stormy16_handle_interrupt_attribute): - New. - * config/v850/v850.c (v850_valid_decl_attribute): Remove. - (TARGET_VALID_DECL_ATTRIBUTE): Don't define. - (TARGET_ATTRIBUTE_TABLE): Define. - (v850_attribute_table, v850_handle_interrupt_attribute, - v850_handle_data_area_attribute): New. - * config/v850/v850-c.c (mark_current_function_as_interrupt): - Return void. Call decl_attributes instead of - valid_machine_attribute. - -Fri Sep 21 01:49:41 2001 J"orn Rennecke - - * sh-protos.h (sh_pr_n_sets): Declare. - * sh.c (calc_live_regs): If the initial value for PR has been copied, - look at the copy to determine if PR needs to be saved. - sh_pr_n_sets: New function. - * sh.h (RETURN_ADDR_RTX): Use get_hard_reg_initial_val. - (ALLOCATE_INITIAL_VALUE): Define. - - * sh.c (initial_elimination_offset): - Fix RETURN_ADDRESS_POINTER_REGNUM case. - -Fri Sep 21 01:13:56 2001 J"orn Rennecke - - * integrate.c (allocate_initial_values): New function. - * integrate.h (allocate_initial_values): Declare. - * local-alloc.c (local_alloc): Move call to allocate_reg_info from - here... - * reload1.c (reload): And initialization of reg_equiv_memory_loc - from here... - * toplev.c (rest_of_compilation): To here. - Call allocate_initial_values. - * tm.texi: add description for ALLOCATE_INITIAL_VALUE. - -Thu Sep 20 09:00:27 2001 Richard Kenner - - * ggc-page.c (ggc_marked_p): Properly convert return to boolean. - -2001-09-20 DJ Delorie - - * c-typeck.c (really_start_incremental_init): Discriminate - between zero-length arrays and flexible arrays. - (push_init_level): Detect zero-length arrays and handle them - like fixed-sized arrays. - * expr.c (store_constructor): Handle zero-length arrays and - flexible arrays correctly. - * doc/extend.texi: Update zero-length array notes. - -2001-09-20 Jim Wilson - - * config/ia64/ia64.c (itanium_split_issue): Allow max 2 FP per cycle. - (insn_matches_slot): Handle TYPE_L and TYPE_X slots when checking - for issue port conflicts. - (cycle_end_fill_slots): TYPE_L instructions take two slots. - -2001-09-20 Andrew MacLeod - - * testsuite/gcc.c-torture/execute/990208-1.x: New. XFAIL at -O3 - on ia64. - -Thu Sep 20 09:00:27 2001 Richard Kenner - - * fold-const.c (hashtab.h): Include. - (int_const_binop): Remove FORSIZE arg and compute from type; all - callers changed. - Call size_int_type_wide for all single-word constants. - (size_htab_hash, size_htab_eq): New functions. - (size_int_type_wide): Rework to use hash table. - * ggc-common.c (hashtab.h): Include. - (struct d_htab_root): New struct. - (d_htab_roots): New variable. - (ggc_add_deletable_htab, ggc_htab_delete): New functions - (ggc_mark_roots): Handle deletable htabs. - * ggc-page.c (ggc_marked_p): New function. - * ggc-simple.c (ggc_marked_p): Likewise. - * ggc.h: Reformatting throughout. - (ggc_marked_p, ggc_add_deletable_htab): New declarations. - * tree.c (init_obstacks): Make type_hash_table a deletable root. - (type_hash_add): Allocate struct type_hash from GC memory. - (mark_hash_entry, mark_type_hash): Deleted. - (type_hash_marked_p, type_hash_mark): New functions. - * Makefile.in (ggc-common.o, fold-const.o): Include hashtab.h. - -Thu Sep 20 12:49:34 2001 J"orn Rennecke - - * sh.c (shiftcosts): Don't use shiftcosts array for modes wider - than SImode. - -Thu Sep 20 09:00:27 2001 Richard Kenner - - * stor-layout.c (layout_type, case ARRAY_TYPE): Kludge to disable - array-too-large test for signed sizetype. - -Thu Sep 20 12:19:36 CEST 2001 Jan Hubicka - - * i386.md (indirect_jump): Allow Pmode operand. - (tablejump): LIkewise; perform expansion to 64bit mode. - * i386.c (symbolic_operand): Allow 64bit PIC references. - (pic_symbolic_operand): Likewise. - (ix86_find_base_term): Strip the 64bit PIC references. - (legitimate_pic_address_disp_p): Handle 64bit PIC. - (legitimize_pic_address): Likewise. - (i386_simplify_dwarf_addr): Strip down the 64bit PIC references. - * i386.h (CASE_VECTOR_MODE): Set to SImode for 64bit PIC compilation. - -2001-09-19 Alexandre Petit-Bianco - - * stringpool.c (get_identifier_with_length): New function. - * tree.h (get_identifier_with_length): New prototype. - -2001-09-19 Alan Modra - David Edelsohn - - Revert: - * config/rs6000/rs6000.c (logical_operand): CONST_INTs are - already sign-extended. - - * config/rs6000/aix.h (INIT_TARGET_OPTABS): Define TFmode handlers. - * config/rs6000/rs6000.c (logical_operand): Always compare op as - HOST_WIDE_INT. - (rs6000_emit_set_long_const): Avoid unnecessary shift. - (output_profile_hook): Declare label_name const. - * config/rs6000/rs6000.md (boolcsi3, boolcdi3): Change predicates - to match constraints. - -2001-09-19 Stan Shebs - - * alias.c: Fix typos in comments. - * sched-rgn.c (init_ready_list): Ditto. - * unwind-dw2.c (uw_frame_state_for): Ditto. - * unwind-dw2-fde.c (_Unwind_Find_FDE): Ditto. - * unwind.inc (_Unwind_RaiseException_Phase2): Ditto. - * config/rs6000/rs6000.c (rs6000_adjust_priority): Ditto. - -2001-09-19 Richard Henderson - - * cfg.c (force_nonfallthru_and_redirect): Handle redirecting - to the exit block. - * Makefile.in (cfg.o): Depend on TM_P_H. - -2001-09-19 Richard Henderson - - * config/alpha/alpha.c (local_symbol_p): Split out from ... - (local_symbolic_operand): ... here. - (small_symbolic_operand): Check mode. - (global_symbolic_operand): New. - (input_operand): Reject symbolics if explicit relocs. - (call_operand): Tidy. - (alpha_legitimize_address): Use movdi_er_high_g. - (alpha_expand_mov): Likewise. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.h (PREDICATE_CODES): Update. - * config/alpha/alpha.md (UNSPEC_LITERAL, UNSPEC_LITUSE): New. - (UNSPEC_LDGP2, UNSPECV_PLDGP2): New. - (UNSPECV_LDGP2): Remove. - (all call patterns): Use 's' not 'i' for symbolic constraint. - (call_osf call_value_osf): Use call_operand. - (all osf call patterns): Use $gp. New peepholes for explicit relocs. - (movdi_er_nofix, movdi_er_fix): Remove symbolic alternative. - (prologue_ldgp_1_er): Remove. - (ldgp_er_1, ldgp_er_2, prologue_ldgp_er_2): New. - (builtin_setjmp_receiver_er patterns): Use them. - (exception_receiver_er): Likewise. - -2001-09-19 Richard Henderson - - * cfgbuild.c (find_sub_basic_blocks): Handle insns that can throw. - - * emit-rtl.c (try_split): Copy NORETURN, SETJMP, ALWAYS_RETURN - and NON_LOCAL_GOTO notes. - * recog.c (peephole2_optimize): Likewise. Handle EH_REGION; - copy over CALL_INSN_FUNCTION_USAGE. - -2001-09-18 Catherine Moore - - * config/stormy16/stormy16.h (DEFAULT_PCC_STRUCT_RETURN): - Define as 0. - -2001-09-18 Ulrich Weigand : - - * config.gcc (s390-*-linux-*, s390x-*-linux*): Switch to - new-style tm_file specification. Specify correct tm_p_file, - md_file, and out_file for s390x. - - * config/s390/linux.h, linux64.h: Don't include other target - macro header files. Now handled via tm_file. - - * config/s390/linux.h, s390.h: (IEEE_FLOAT, TARGET_IEEE_FLOAT, - TARGET_IBM_FLOAT): Move from linux.h to s390.h to ensure they - are defined before use. - -Tue Sep 18 09:51:11 2001 Eric Christopher - - * config/mips/mips.c (mips_asm_file_start): Conditionalize Elf - code generation only for Gnu assembler. - -2001-09-18 Catherine Moore - - * config/stormy16 (LIB_SPEC): Remove -lnosys. - -2001-09-18 Richard Sandiford - - * config/mips/mips.c (mips_frame_set): New. - (mips_emit_frame_related_store): When storing two 32-bit FPRs, use - a parallel frame-related expression with a set for each register. - -2001-09-18 Philip Blundell - - * config/arm/lib1funcs.asm (L_dvmd_lnx): Don't rely on kernel - header files. - -2001-09-17 Dale Johannesen - - * config/rs6000/rs6000.h (FIXED_REGISTERS): Use FIXED_R2. - * config/rs6000/aix.h (FIXED_R2): Define. - * config/rs6000/darwin.h (FIXED_R2): Define. - * config/rs6000/sysv4.h (FIXED_R2): Define. - -2001-09-17 Jeff Sturm - - * except.c (dw2_build_landing_pads): New local - clobbers_hard_regs. Emit an ASM_INPUT as a scheduling - barrier after clobbers. Fixes c++/4012. - -2001-09-17 Kaveh R. Ghazi - - * gcc.c (find_file): Use ACONCAT in lieu of alloca/strcpy/strcat. - -2001-09-17 Joseph S. Myers - - * dostage2, dostage3, listing, make-l2.com, makefile.vms, - patch-apollo-includes, vmsconfig.com: Remove obsolete files. - -2001-09-17 Kaveh R. Ghazi - - * c-aux-info.c (affix_data_type): Use ASTRDUP in lieu of - alloca/strcpy. - -2001-09-17 Neil Booth - - * cpphash.h (_cpp_lex_direct): New. - * cpplex.c (_cpp_lex_token): Update. - (lex_token): Rename _cpp_lex_direct; lex into pfile->cur_token, - and increment that pointer. - * cppmacro.c (alloc_expansion_token): New. - (lex_expansion_token): Lex macro expansion directly into - macro storage. - -2001-09-16 Brad Lucier - - * Makefile.in: Make rtl-error.o depend on $(CONFIG_H). - -Sun Sep 16 21:59:46 CEST 2001 Jan hubicka - - * basic-block.h (free_bb_for_insn): Declare. - * bb-reorder.c (label_for_bb): Use block_label. - (emit_jump_to_block_after): Remove. - (insert_intra_1): Do not update block_for_insn. - (insert_inter_bb_scope_notes): Likewise; update bb->end - * cfg.c (free_bb_for_insn): New. - (try_rediret_by_replacing_jump): Avoid set_block_for_new_insns call. - (force_nonfallthru_and_redirect): Likewise; do not update BB boundaries. - (commit_one_edge_insertion): Likewise. - (commit_one_edge_insertion): Do not update BB boundary. - (commit_edge_insertions): Do not call compute_bb_for_insn. - * cfgbuild.c (find_basic_blocks): Do not free basic_block_for_insn. - * cfgcleanup.c (merge_blocks_move_predecessor): Use reorder_insns_nobb. - (merge_blocks_move_successor_nojumps): Likewise. - (try_crossjump_to_edge): Do not update block_for_insn. - * combine.c (combine_instructions): Remove compute_bb_for_insn call. - * df.c (df_pattern_emit_later): Do not update BB boundary. - (df_jump_pattern_emit_after): Likewise. - (df_insn_move_before): Use emit_insn_before. - * emit-rtl.c (try_split): Emit after trial to get bb boundary updated - properly. - (add_insn_after, add_insn_before, emit_insns_after): Update BB - boundaries and basic_block_for_insn. - (reorder_insns_nobb): Rename from reorder_insns. - (reorder_insns): New. - (emit_block_insn_before, emit_block_insn_after): Kill. - * flow.c (check_function_return_warnings): Do not call - compute_bb_for_insn; Do not free basic_block_for_insn. - (attempt_auto_inc): Do not update basic_block_for_insn. - * function.c (emit_return_into_block): Likewise; - do not update BB boundaries. - * gcse.c (handle_avail_expr): Do not update basic_block_for_insn. - (insert_insn_end_bb): Use emit_insn_before; Likewise. - (pre_insert_copy_insn): Likewise. - (update_ld_motion_notes): Likewise. - (insert_insn_start_bb): Likewise. - (replace_store_insn): Likewise. - * ifcvt.c (noce_process_if_block): Likewise. - (if_convert): Do not call compute_bb_for_insn. - * lcm.c (optimize_mode_switching): Do not update BB boundaries. - Use emit_insn_before and emit_insn_after. - * recog.c (split_all_insns): Do not update BB boundaries; - Do not call compute_bb_for_insn. - (peephole2_optimize): Do not update BB boundaries. - * reg-stack.c (emit_pop_insn): Use emit_insn_after and - emit_insn_before. - (emit_swap_insn): Likewise. - (convert_regs_1): Likewise. - * reload1.c (reload): Call compute_bb_for_insn. - * rtl.h (reorder_insns_nobb): Declare. - * ssa.c (rename_equivalent_regs): Use emit_insn_before. - * toplev.c (rest_of_compilation): Call free_bb_for_insn - at places CFG is invalidated; do not call compute_bb_for_insn. - - * cfg.c (expunge_block): Invalidate BB structure. - - * (merge_blocks_nomove): Update properly BLOCK_FOR_INSN - array. - - * cfg.c (verify_flow_info): Verify the basic_block_for_insn array. - -2001-09-16 Neil Booth - - * cpphash.h (_cpp_lex_token): Update prototype. - * cpplex.c (_cpp_lex_token): New prototype. - * cpplib.c (skip_rest_of_line, check_eol, _cpp_handle_directive, - lex_macro_node, read_flag, do_pragma_poison): Update. - * cppmacro.c (cpp_get_token, parse_params, - lex_expansion_token): Update. - -2001-09-16 Neil Booth - - * cppmain.c (scan_translation_unit): Don't worry about - putting a space after hashes. - * cpplib.c (directive_diagnostics): New. - (_cpp_handle_directive): Update to use directive_diagnostics. - (run_directive): Don't toggle prevent_expansion. - (do_line): Backup in case of the line extension. - * cpplib.h (cpp_lexer_pos): Remove. - * cppmacro.c (_cpp_create_definition): Precede a leading # - with whitespace. - -2001-09-15 Richard Henderson - - * c-typeck.c (comptypes): Handle zero-length arrays properly. - -2001-09-15 Roman Lechtchinsky - - * c-common.c (c_promoting_integer_type_p): Handle ?Imode types. - -2001-09-15 Neil Booth - - PR preprocessor/3571 - * tradcpp.c (handle_directive): Skip non-vertical space. - -2001-09-15 Neil Booth - - * cppmain.c (setup_callbacks): Set line callback only - if outputting preprocessed source. - -2001-09-15 Kaveh R. Ghazi - - * collect2.c (main): Const-ification. - * gcc.c (translate_options, process_command): Use xstrdup in - lieu of xmalloc/strcpy. - (main): Use concat in lieu of xmalloc/strcpy/strcat. - -2001-09-14 Roman Lechtchinsky - - * doc/install.texi (Specific, alphaev5-cray-unicosmk*): Fix - example. - -2001-09-15 Neil Booth - - * scan-decls.c (scan_decls): Fix typo. - -2001-09-15 Neil Booth - - * cpphash.h (struct cpp_reader): Remove lexer_pos, directive_pos. - Split mlstring_pos into mls_line and mls_col. - * cppinit.c (cpp_create_reader): Initialize line to 1. - (cpp_destroy): Free tokenruns. - (push_include): Don't update lexer_pos. - * cpplex.c (unterminated, parse_string): Update. - (lex_token): Don't update lexer_pos, update. - * cpplib.c (if_stack): Save line instead of line + col. - (start_directive, _cpp_do__Pragma, do_else, do_elif, - push_conditional, _cpp_pop_buffer): Update. - * cppmacro.c (funlike_invocation_p): Don't save lexer_pos. - (_cpp_create_definition): Update. - -2001-09-15 Eric Christopher - - * config/mips/abi64.h: Add support for MEABI. - -2001-09-15 Eric Christopher - - * config/mips/mips.md: Add unspec #2. - (reload_indi): Use. - (reload_outdi): Ditto. - (reload_outsi): Ditto. - (HILO_delay): New. - -2001-09-15 Eric Christopher - Jason Eckhardt - - * config.gcc: Add mipsisa32 target and mipsisa32-linux target. - * config/mips/isa32-linux.h: New file. - * config/mips/isa3264.h: Ditto. - * config/mips/mips-protos.h: Add mips_hard_regno_nregs. - * config/mips/mips.c (mips_hard_regno_nregs): Move here from mips.h. - (output_block_mode): Support MEABI. - (function_arg): Ditto. Fix floating point arg passing. - (mips_va_start): Ditto. - (override_options): Add isas 32 and 64, meabi, mips32 and mips64 - processors. - (mips_asm_file_start): Add new section to pass abi to gdb. - (function_arg_pass_by_reference): Support MEABI. - (mips_parse_cpu): Support mips32 and mips64 processors. - * config/mips/mips.h: Support ABI_MEABI, TARGET_MIPS4KC, - TARGET_MIPS5KC. Support isa32 and isa64. - (processor_type): Add r4kc, r5kc, r20kc. - (GENERATE_MULT3_SI): New. - (GENERATE_MULT3_DI): Ditto. - (GENERATE_MULT3): Remove. - (ISA_HAS_64BIT_REGS): Add isa == 64. - (ISA_HAS_8CC): Add mips_isa = 32 and 64. - (ISA_HAS_MADD_MSUB): New. - (ISA_HAS_CLZ_CLO): Ditto. - (ISA_HAS_DCLZ_DCLO): Ditto. - (ABI_GAS_ASM_SPEC): New. - (GAS_ASM_SPEC): Use. Add support for mips32, mips64. - (ASM_SPEC): Ditto. - (LINK_SPEC): Ditto. - (SUBTARGET_CC1_SPEC): Ditto. - (SUBTARGET_CPP_SIZE_SPEC): Ditto. - (PAD_VARARGS_DOWN): Support MEABI. - (HARD_REGNO_NREGS): Move to mips.c. - (ASM_OUTPUT_IDENT): Add #undef. - * config/mips/mips.md: Add r4kc, r5kc, r20kc. - (mulsi3): Use GENERATE_MULT3_SI. - (mulsi3_mult3): Ditto. Support mips32, mips64. - (mul_acc_si): Use ISA_HAS_MADD_MSUB. - (mul_sub_si): New pattern. - (unnamed splitters): New. - (muldi3): Use GENERATE_MULT3_DI. - (muldi3_internal2): Ditto. - (movdicc): Support mips32. - * config/mips/t-isa3264: New file. - -2001-09-15 Hans-Peter Nilsson - - * rtl.h (FIND_REG_INC_NOTE) [HAVE_PRE_INCREMENT - || HAVE_PRE_DECREMENT || HAVE_POST_INCREMENT - || HAVE_POST_DECREMENT]: Call find_regno_note for REGs. - - * reorg.c (fill_slots_from_thread): After call to - steal_delay_list_from_target, update own_thread as new_thread may - have branched. - -2001-09-14 Neil Booth - - * cpperror.c (print_location): Take line and column, for - default positioning use the previously lexed token. - (_cpp_begin_message): Take line and column. - (cpp_ice, cpp_fatal, cpp_error, cpp_error_with_line, cpp_warning, - cpp_warning_with_line, cpp_pedwarn, cpp_pedwarn_with_line): Update. - * cpphash.h (_cpp_begin_message): Update prototype. - * cppinit.c (push_include): Don't set output line. - * cpplex.c (_cpp_lex_token): Callback for start of new output lines. - * cpplib.c (do_diagnostic, _cpp_pop_buffer): Update. - (do_pragma): Kludge for front ends. Don't expand macros at all. - * cpplib.h (cpp_lookahead, cpp_token_with_pos, cpp_get_line): Remove. - (struct cpp_token): Remove output_line. - (struct cpp_callbacks): New member line_change. - * cppmacro.c (builtin_macro, paste_all_tokens, replace_args, - cpp_get_token): Preserve BOL flag. - (cpp_get_line): Remove. - (_cpp_backup_tokens): Remove useless abort(). - * cppmain.c (cb_line_change): New. - (scan_translation_unit): Don't worry about starting new lines here. - * scan-decls.c (scan_decls): Update. - * c-lex.c (c_lex, init_c_lex): Update. - (cb_line_change, src_lineno): New. - -Fri Sep 14 13:54:50 EDT 2001 John Wehle (john@feith.com) - - * tree.c (append_random_chars): Generate the random - characters in a reproducable fashion. - -2001-09-14 Richard Henderson - - * config/i386/i386.c (internal_label_prefix): New. - (internal_label_prefix_len): New. - (override_options): Set them. - (local_symbolic_operand): New. - (legitimate_pic_address_disp_p): Use it. - (legitimize_pic_address): Likewise. - -2001-09-14 Marc Espie - - * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Generate reference to GOT - correctly. - -2001-09-14 Roman Lechtchinsky - - * config/alpha/alpha.md (unaligned_extendhidi_be): Fix. - * config/alpha/unicosmk.h (INIT_TARGET_OPTABS): New. - -2001-09-14 Nick Clifton - - * rtlanal.c (subreg_regno_offset): Add semicolon to end of - invocation of SUBREG_REGNO_OFFSET. - - * haifa-sched.c: Fix typo in FSF copyright statement. - * sched-deps.c: Fix typo in FSF copyright statement. - * sched-ebb.c: Fix typo in FSF copyright statement. - * sched-rgn.c: Fix typo in FSF copyright statement. - * sched-vis.c: Fix typo in FSF copyright statement. - - * config.gcc: Move inclusion of arm elf specific header files - from the files themselves into the tm_file variable. Make - sure that elfos.h is included before target specific elf - headers. - * config/arm/aout.h (NO_DOLLAR_IN_LABEL): Only define if not - already defined. - (ASM_OUTPUT_ASCII, ASM_OUTPUT_SKIP): Protect definition. - * config/arm.arm.h (TARGET_MEM_FUNCTIONS, - ASM_OUTPUT_CASE_LABEL): Protect definition. - (CC1_SPEC, FP_DEFAULT, ARM_FUNCTION_PROFILE): Only define if - not already defined. - * config/arm/conix-elf.h: (USER_LABEL_PREFIX, - LOCAL_LABEL_PREFIX, MAKE_DECL_ONE_ONLY, UNIQUE_SECTION): - Remove duplicate definition. - (READONLY_DATA_SECTION, SUBTARGET_EXTRA_SECTION, - (SUBTARGET_EXTRA_SECTION_FUNCTION, RDATA_SECTION_ASM_OP, - (RDATA_SECTION_FUNCTION): Remove redundant definition. - (STARTFILE_SPEC, ENDFILE_SPEC): Protect definition. - Remove inclusion of arm/elf.h. - * config/arm/unknown-elf.h: as for conix-elf.h. - (STARTFILE_SPEC): Include crti.o and crtn.o. - * config/arm/linux-elf.h: as for conix-elf.h. - * config/arm/ecos-elf.h: Remove inclusion of unknown-elf.h. - * config/arm/strongarm-elf.h: Remove inclusion of - unknown-elf.h. - * config/arm/xscale-elf.h: Remove inclusion of unknown-elf.h. - * config/arm/unknown-elf-oabi.h: Remove inclusion of - unknown-elf.h and elf.h. - * config/arm/uclinux-elf.h: Remove inclusion of linux-elf.h. - * config/arm/linux-gas.h (DBX_DEBUGGING_INFO, - ASM_WEAKEN_LABEL): Remove redundant definition. - * config/arm/elf.h: Test for inclusion of elfos.h - (USER_LABEL_PREFIX, ASM_DECLARE_RESULT, ASM_DECLARE_RESULT, - ASM_DECLARE_OBJECT_NAME, ASM_FINISH_DECLARE_OBJECT_NAME, - SUBTARGET_EXTRA_SECTION, SUBTARGET_EXTRA_SECTION_FUNCTION, - EXTRA_SECTIONS, INT_ASM_OP, ASM_WEAKEN_LABEL): Remove - redundant definition. - (TYPE_OPERAND_FMT, ASM_DECLARE_FUNCTION_NAME, - ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_INTERNAL_LABEL, - ASM_OUTPUT_ALIGNED_COMMON): Protect definition. - * t-arm-elf (EXTRA_MULTILIB_PARTS): Add crti.o and crtn.o. - Add rules to build crti.o and crtn.o - * crti.asm: New file. - * crtn.asm: New file. - -2001-09-13 Neil Booth - - * c-parse.in (_yylex): Use _cpp_backup_tokens. - * cpphash.h (struct tokenrun): Add prev. - (struct lexer_state): Remove bol. - (struct cpp_reader): Remove old lookahead stuff, add lookaheads. - (_cpp_free_lookaheads, _cpp_release_lookahead, _cpp_push_token) - : Remove. - * cppinit.c (cpp_create_reader): Don't set bol. - (cpp_destroy): Don't free lookaheads. - * cpplex.c (lex_directive): Remove. - (next_tokenrun): Update. - (_cpp_lex_token): Clean up logic. - (lex_token): Update to return a pointer to lexed token, since it - can move to the start of the buffer. Simpify newline handling. - * cpplib.c (SEEN_EOL): Update. - (skip_rest_of_line): Remove lookahead stuff. - (end_directive): Line numbers are already incremented. Revert - to start of lexed token buffer if we can. - (_cpp_handle_directive, do_pragma, do_pragma_dependency, - parse_answer): Use _cpp_backup_tokens. - (run_directive, cpp_pop_buffer): Don't set bol, set saved_flags - instead. Don't check for EOL. - (do_include_common, do_line, do_pragma_system_header): Use - skip_rest_of_line. - * cpplib.h (BOL, _cpp_backup_tokens): New. - * cppmacro.c (save_lookahead_token, take_lookahead_token, - alloc_lookahead, free_lookahead, _cpp_free_lookaheads, - cpp_start_lookahead, cpp_stop_lookahead, _cpp_push_token): Remove. - (builtin_macro): Don't use cpp_get_line. - (cpp_get_line): Short term kludge. - (parse_arg): Handle directives in arguments here. Back up when - appropriate. Store EOF at end of argument list. - (funlike_invocation_p): Use _cpp_backup_tokens. - (push_arg_context): Account for EOF at end of list. - (cpp_get_token): Remove lookahead stuff. Update. - -2001-09-13 Kaveh R. Ghazi - - * c-parse.in (yyerror): Const-ification and/or static-ization. - * c-typeck.c (push_member_name): Likewise. - * collect2.c (main): Likewise. - * dbxout.c (dbxout_parms): Likewise. - * diagnostic.c (format_with_decl): Likewise. - * dwarf2out.c (output_ranges): Likewise. - * dwarfout.c (fundamental_type_code): Likewise. - * except.c (dw2_output_call_site_table): Likewise. - * gcc.c (do_spec_1): Likewise. - * genopinit.c (optabs): Likewise. - * objc/objc-act.c (synth_id_with_class_suffix, start_class, - gen_declaration_1, handle_impent): Likewise. - * protoize.c (default_include, in_system_include_dir, abspath): - Likewise. - * sched-vis.c (visualize_stall_cycles): Likewise. - * sdbout.c (plain_type_1, sdbout_end_function, - sdbout_end_epilogue): Likewise. - * varasm.c (decode_reg_name): Likewise. - - * 1750a.c (mod_regno_adjust): Likewise. - * alpha.c (alpha_write_one_linkage, - unicosmk_output_default_externs): Likewise. - * arm.c (arm_condition_codes): Likewise. - * arm.h (arm_condition_codes): Likewise. - * avr.c (output_movsisf, encode_section_info): Likewise. - * darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL): - Likewise. - * i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. - * i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. - * m88k.c (output_function_profiler): Likewise. - * mips.c (mips_output_conditional_branch): Likewise. - * ns32k.c (ns32k_out_reg_names): Likewise. - * ns32k.h (ns32k_out_reg_names): Likewise. - * pj.c (pj_output_rval): Likewise. - * rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise. - * sparc.c (sparc_flat_function_prologue, - sparc_flat_function_epilogue): Likewise. - -2001-09-13 Markus Werle - Gerald Pfeifer - - * doc/install.texi (Binaries): Add "Binaries for HP-UX 11.00 at - Aachen University of Technology". - -2001-09-13 Andreas Schwab - - * config/float-m68k.h: Define DECIMAL_DIG and FLT_EVAL_METHOD for - C99. - -2001-09-13 Richard Henderson - - * config/alpha/alpha.c (small_symbolic_operand): New. - (override_options): Set MASK_SMALL_DATA based on pic/PIC. - (some_operand, input_operand): Don't handle HIGH. - (alpha_legitimize_address): Use it. Emit HIGH with PLUS gp. - (alpha_expand_mov): Likewise. - (print_operand) [H]: Just print HIGH symbol. - (print_operand_address): Handle small data. - * config/alpha/alpha.h (MASK_SMALL_DATA, TARGET_SMALL_DATA): New. - (TARGET_SWITCHES): Add -msmall-data/large-data. - (PIC_OFFSET_TABLE_REGNUM): New. - (PREFERRED_RELOAD_CLASS): Don't handle HIGH. - (PREDICATE_COES): Update. - * config/alpha/alpha.md (adddi_er_high): New. - (adddi_er_low): Handle small data. - * config/alpha/elf.h (DO_SELECT_SECTION): If SMALL_DATA, - prefer .sdata to .rodata. - (SELECT_RTX_SECTION): Likewise. - -2001-09-12 Josh Martin - - * fixinc/inclhack.def(hpux11_size_t): Keep HP-UX headers from - defining __size_t and leaving size_t undefined. - -2001-09-12 Diego Novillo - - * basic-block.h (expunge_block): Declare. - * cfg.c (expunge_block): Remove static declaration. - -2001-09-12 Richard Henderson - - * integrate.c (copy_insn_list): Copy label name from - NOTE_INSN_DELETED_LABEL. - -2001-09-12 Kaveh R. Ghazi - - * c-common.c (c_tree_code_name): Const-ification. - * c-decl.c (c_decode_option): Likewise. - * c-typeck.c (warn_for_assignment): Likewise. - * collect2.c (libexts, is_ctor_dtor, main, ignore_library): - Likewise. - * cppinit.c (output_deps): Likewise. - * dependence.c (dependence_string, direction_string): Likewise. - * dwarf2out.c (output_ranges): Likewise. - * fixinc/fixfixes.c (emit_gnu_type): Likewise. - * fixinc/gnu-regex.c (re_error_msgid): Likewise. - * gcc.c (standard_exec_prefix, standard_exec_prefix_1, - standard_startfile_prefix, standard_startfile_prefix_1, - standard_startfile_prefix_2, tooldir_base_prefix, - standard_bindir_prefix, find_a_file): Likewise. - * genattrtab.c (make_length_attrs): Likewise. - * gencheck.c (tree_codes): Likewise. - * genemit.c (gen_split): Likewise. - * genrecog.c (special_mode_pred_table): Likewise. - * graph.c (graph_ext): Likewise. - * protoize (default_include): Likewise. - * reload.c (reload_when_needed_name): Likewise. - * sched-vis.c (visualize_stall_cycles): Likewise. - * tlink.c (recompile_files): Likewise. - * toplev.c (decode_g_option): Likewise. - * tradcpp.c (output_deps): Likewise. - * varasm.c (decode_reg_name): Likewise. - - * arm.c (arm_condition_codes, strings_fpa, thumb_condition_code): - Const-ification. - * arm.md: Likewise. - * avr.c (avr_regnames, encode_section_info): Likewise. - * c4x.c (float_reg_names): Likewise. - * darwin.h (ASM_GLOBALIZE_LABEL): Likewise. - * elfos.h (const_section): Likewise. - * i386.c (ix86_comp_type_attributes): Likewise. - * i386/win32.h (STRIP_NAME_ENCODING): Likewise. - * ia64/aix.h (UNIQUE_SECTION): Likewise. - * ia64.c (type_names): Likewise. - * m68hc11.c (reg_class_names): Likewise. - * m88k.c (m_options): Likewise. - * mips.c (mips_output_conditional_branch, mips_unique_section): - Likewise. - * rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise. - * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue, - ultra_code_names): Likewise. - * sparc.h (OVERRIDE_OPTIONS): Likewise. - -2001-09-12 Jakub Jelinek - - * configure.in (gcc_cv_as_shf_merge): Fix a typo. - Use --fatal-warnings option for gas. - * configure: Rebuilt. - -2001-09-12 Roman Lechtchinsky - - * doc/install.texi (Specific, alphaev5-cray-unicosmk*): Document. - -2001-09-11 Jim Wilson - - * alias.c (clear_reg_alias_info): Only handle pseudo registers. - -2001-10-11 Matt Kraai - - * builtins.c (c_strlen): Treat an offset too large for a - HOST_WIDE_INT as out of range. - -Tue Sep 11 18:57:47 CEST 2001 Jan Hubicka - - * basic-block.h (EDGE_CRITICAL): Remove; renumber other flags. - (EDGE_CRITICAL_P): New predicate. - * cfg.c (force_nonfallthru_and_redirect, split_edge): Kill EDGE_CRITICAL - handling. - (insert_insn_on_edge): Use EDGE_CRITICAL_P. - (dump_edge_info): Remove "crit". - * cfganal.c (mark_critical_edges): Kill. - * cfgbuild.c (find_basic_blocks): Remove mark_critical_edges call. - * cfgcleanup.c (cleanup_cfg): Likewise. - * profile.c (instrument_edges): Use EDGE_CRITICAL_P. - (find_spanning_tree): Likewise. - * reg-stack.c (convert_regs_1): Likewise. - * ssa.c (mark_regs_equivalent_over_bad_edges): Likewise. - - * basic-block.h (create_basic_block_structure): New. - (create_basic_block): Update prototype. - (force_nonfallthru): New. - * bb-reorder.c (fixup_reorder_chain): Fixup use force_nonfallthru. - * cfg.c (create_basic_block_structure): Rename from create_basic_block; - handle updating of block_for_insn, creating of empty BBs and BBs at - the end of INSN chain. - (create_basic_block): New function. - (split_block): Use create_basic_block. - (force_nonfallthru_and_redirect): Break out from ...; cleanup - (redirect_edge_and_branch_force): ... here. - (force_nonfallthru): New. - (split_edge): Rewrite to use force_nonfallthru and create_block. - * cfgbuild.c (find_basic_blocks_1): Use create_basic_block_structure. - (find_basic_blocks): Free basic_block_for_insn. - * cfgcleanup.c (merge_blocks): Use force_nonfallthru. - - * cfg.c: Fix formating. - * cfgcleanup.c: Fix formating. - (merge_blocks, tail_recursion_label_p): Return bool. - (merge_blocks_move_predecessor_nojumps, - merge_blocks_move_successor_nojumps): Return void. - -2001-09-11 Jakub Jelinek - - * configure.in: Check whether assembler supports section merging. - * config.in: Rebuilt. - * configure: Rebuilt. - * varasm.c (variable_section, output_constant_pool): Pass alignment - to SELECT_SECTION and SELECT_RTX_SECTION. - (mergeable_string_section): New. - (mergeable_constant_section): New. - (default_elf_asm_named_section): Output SECTION_MERGE and - SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. - * output.h (mergeable_string_section): New. - (mergeable_constant_section): New. - (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. - * toplev.c (flag_merge_constants): New. - (f_options): Add -fmerge-constants and -fmerge-all-constants - options. - (toplev_main): Default to -fno-merge-constants if not optimizing. - * flags.h (flag_merge_constants): Add extern. - * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. - * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third - argument. - * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): - Define if assembler has working .subsection -1 support. - (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. - Put constant into special SHF_MERGE sections if the linker should - attempt to merge duplicates. - * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third - macro argument. - Put constant into special SHF_MERGE sections if the linker should - attempt to merge duplicates. - * config/alpha/elf.h: Likewise. - (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler - has working .subsection -1 support. - * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and - SELECT_SECTION. - * config/svr3.h: Likewise. - * config/darwin.h: Likewise. - * config/arm/aof.h: Likewise. - * config/arm/linux-elf.h: Likewise. - * config/avr/avr.h: Likewise. - * config/c4x/c4x.h: Likewise. - * config/d30v/d30v.h: Likewise. - * config/i386/dgux.h: Likewise. - * config/i386/osfrose.h: Likewise. - * config/i386/sco5.h: Likewise. - * config/i386/svr3gas.h: Likewise. - * config/ia64/aix.h: Likewise. - * config/m32r/m32r.h: Likewise. - * config/m68k/m68k.h: Likewise. - * config/m88k/dgux.h: Likewise. - * config/m88k/m88k.h: Likewise. - * config/mcore/mcore-pe.h: Likewise. - * config/mips/mips.h: Likewise. - * config/pa/pa.h: Likewise. - * config/pa/pa-linux.h: Likewise. - * config/romp/romp.h: Likewise. - * config/rs6000/sysv4.h: Likewise. - * config/rs6000/xcoff.h: Likewise. - * config/s390/linux.h: Likewise. - * config/sparc/sparc.h: Likewise. - * config/sparc/sysv4.h: Likewise. - * config/stormy16/stormy16.h: Likewise. - * config/v850/v850.h: Likewise. - * config/vax/vms.h: Likewise. - * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE - and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. - * config/sparc/sparc.c (sparc_elf_asm_named_section): Use - default_elf_asm_named_section for SHF_MERGE sections. - -Tue Sep 11 17:55:54 CEST 2001 Jan Hubicka - - * bb-reorder.c (fixup_reorder_chain): Fallthru edge to exit block - is OK. - -2001-09-11 Joseph S. Myers - - * c-common.c (split_specs_attrs): Allow for empty attributes with - empty TREE_PURPOSE. Fixes PR c/4294. - -Tue Sep 11 11:37:52 CEST 2001 Jan Hubicka - - * basic-block.h (cached_make_edge, make_single_succ): New. - (make_edge): Remove first parameter. - * bb-reroder.c (fixup_reorder_chain): Use make_single_succ_edge. - * cfg.c (cached_make_edge): Rename from make_edge; return newly - created edge; use obstack allocation. - (make_edge, make_single_succ_edge): New. - (first_removed_edge): New static variable. - (init_flow): Initialize first_removed_edge and n_edges. - (clear_edges): Use remove_edge. - (flow_delete_block): Likewise. - (remove_edge): Add removed edges to the removed edges list. - (split_block, redirect_edge_and_branch_force, split_edge): - Use make_edge. - * cfganal.c (flow_call_edges_add): Updaet make_edge call. - (add_noreturn_fake_exit_edges): Likewise. - (connect_infinite_loops_to_exit): Liekwise. - * cfgbuild.c (make_label_edge, make_edges, find_sub_basic_blocks): - Use cached_make_edge. - * cfgcleanup.c (try_crossjump_to_edge): Use make_single_succ_edge. - * profile.c (branch_prob): Update make_edge call. - * ssa-dce.c (ssa_eliminate_dead_code): Likewise. - -2001-09-11 Richard Henderson - - * config/alpha/alpha.c: Tidy formatting. - (local_symbolic_operand): Verify mode. - (alpha_sa_mask): Ignore unicos for eh_return. - (alpha_expand_epilogue): Handle sp_adj2 zero, not NULL. - * config/alpha/alpha.md (umk divsi patterns): Remove. - (extendsfdf2): Remove unicos check. - (tablejump): Merge vms and unicos code; always use direct set - plus label_ref use. - -2001-09-11 Roman Lechtchinsky - - * config.gcc (alpha*-*-unicosmk*): New target. - - * config/alpha/alpha-protos.h (symbolic_operand, - unicosmk_add_call_info_word, unicosmk_add_extern, - unicosmk_defer_case_vector, unicosmk_unique_section, - unicosmk_output_align, unicosmk_text_section, unicosmk_data_section, - unicosmk_asm_file_start, unicosmk_asm_file_end, - unicosmk_output_common): Declare. - - * config/alpha/alpha.c (NUM_ARGS, override_options, call_operand, - direct_return, function_arg, alpha_va_start, alpha_va_arg, - alpha_does_function_need_gp, alpha_end_function): Support Cray - Unicos/Mk. - (alpha_init_machine_status, alpha_mark_machine_status, - alpha_free_machine_status, unicosmk_output_deferred_case_vectors, - unicosmk_gen_dsib, unicosmk_output_ssib, unicosmk_need_dex, - unicosmk_asm_named_section, unicosmk_insert_attributes, - unicosmk_section_type_flags, symbolic_operand, - unicosmk_output_module_name, unicosmk_output_default_externs, - unicosmk_output_dex, unicosmk_output_externs, - unicosmk_output_addr_vec, unicosmk_ssib_name, - unicosmk_initial_elimination_offset, unicosmk_asm_file_start, - unicosmk_asm_file_end, unicosmk_output_common, - unicosmk_section_type_flags, unicosmk_unique_section, - unicosmk_add_call_info_word, unicosmk_text_section, - unicosmk_data_section, unicosmk_extern_list, unicosmk_extern_head, - unicosmk_add_extern, unicosmk_dex, unicosmk_dex_list, - unicosmk_dex_count, unicosmk_special_name): New. - (TARGET_INSERT_ATTRIBUTES, TARGET_SECTION_TYPE_FLAGS): Define for - TARGET_ABI_UNICOSMK. - (get_aligned_mem, alpha_expand_unaligned_load, - alpha_expand_unaligned_store, alpha_expand_unaligned_load_words, - alpha_expand_unaligned_store_words): Support big-endian mode. - (print_operand): Likewise. New format specifier 't'. Use - TARGET_AS_SLASH_BEFORE_SUFFIX. - (alpha_is_stack_procedure): Rename from vms_is_stack_procedure. - (alpha_pv_save_size): Update with above change. - (alpha_sa_mask, alpha_sa_size, alpha_expand_prologue, - alpha_start_function, alpha_expand_epilogue): Likewise. Support Cray - Unicos/Mk. - - * config/alpha/alpha.h (TARGET_ABI_UNICOSMK): New. - (TARGET_ABI_OSF): Exclude TARGET_ABI_UNICOSMK. - (TARGET_AS_SLASH_BEFORE_SUFFIX): New. - (EXTRA_CONSTRAINT): New constraint 'U'. - (PREDICATE_CODES): Add symbolic_operand. - - * config/alpha/alpha.md (UNSPEC_UMK_LAUM, UNSPEC_UMK_LALM, - UNSPEC_UMK_LAL, UNSPEC_UMK_LOAD_CIW): New constants. - (mulsi3, *mulsi_se, mulvsi3): Disable for TARGET_ABI_UNICOSMK. - (integer division and modulus patterns): Split in default and - Unicos/Mk versions. - (*divmodsi_internal, *divmoddi_internal): Disable for - TARGET_ABI_UNICOSMK. - (unaligned_extend?idi, unaligned_load?i, unaligned_store?i): Split in - little-endian and big-endian versions. - (ext, ins, msk): Likewise. - (extv, extzv, insv): Support big-endian mode. - (call, call_value, tablejump): Support TARGET_ABI_UNICOSMK. - (call_umk, call_value_umk, *call_umk, tablejump_umk, - *tablejump_umk_internal, *call_value_umk): New. - (*movdi_nofix): Add pattern for loading an address into a register on - TARGET_ABI_UNICOSMK. - (umk_laum, umk_lal, umk_lalm, *umk_load_ciw): New. - (umk_mismatch_args, arg_home_umk): New. - (various insns): Don't use mov, fmov, nop, fnop and unop. - (realign): Support TARGET_ABI_UNICOSMK. - - * config/alpha/unicosmk.h: New file. - * config/alpha/t-unicosmk: New file. - - * fixinc/inclhack.def (unicosmk_restrict): New. - * fixinc/fixincl.x: Regenerate. - - * ginclude/stddef.h (size_t): Check for and define __SIZE_T__. - (wchar_t): Check for and define __WCHAR_T__. - -2001-09-11 Richard Sandiford - - * combine.c (simplify_shift_const): Treat shifts by the mode - size as undefined. - -2001-09-11 Neil Booth - - * cpphash.h (struct tokenrun): New. - (struct cpp_context): New member bol. - (struct cpp_reader): New members. - (_cpp_init_tokenrun): New. - * cppinit.c (cpp_create_reader): Set up the token runs. - * cpplex.c (lex_directive, lex_token, next_tokenrun): New. - (lex_token): New internalised version of _cpp_lex_token. Don't - handle directives or the multiple include optimization here any - more. Simply lex a token. - * cpplib.c (run_directive): Clear bol. - (_cpp_pop_buffer): Set bol. - * cppmacro.c (funlike_invocation_p): Keep tokens whilst parsing - arguments. - -2001-09-11 Michael Meissner - - * config/mips/mips.h (CC1_SPEC): If -mgp32 default to -mfp32, and - give an error if the user uses -mfp32. - (CPP_FPR_SPEC): Define __mips_fpr to be 32 or 64 depending on the - default options. - (CPP_SPEC): Define __mips_fpr to be 32 or 64, depending on the - floating point register size. - (EXTRA_SPECS): Add CPP_FPR_SPEC. - - * config/mips/netbsd.h (ASM_FINISH_DECLARE_OBJECT): Use - HOST_WIDE_INT_PRINT_DEC to properly print the result of - int_size_in_bytes. - * config/mips/elf.h (ASM_FINISH_DECLARE_OBJECT): Ditto. - * config/mips/elf64.h (ASM_FINISH_DECLARE_OBJECT): Ditto. - -2001-09-11 Hans-Peter Nilsson - - * dbxout.c (dbxout_parms): Fix typo in comment. - * unroll.c (loop_find_equiv_value): Ditto. - * toplev.c (rest_of_compilation): Ditto. - * loop.c (scan_loop): Ditto. - * dwarf2out.c (struct dw_fde_struct): Ditto. - -2001-09-10 Zack Weinberg - - * cpplex.c (parse_identifier): Fast-path optimize. Avoid - copying identifier when we're just going to throw it away. - (parse_identifier_slow): New routine to handle abnormal cases. - (_cpp_lex_token): Update call site. - - * hashtable.c (ht_lookup): Don't assume that the string we've - been given is NUL-terminated. - * system.h: #define __builtin_expect(a, b) to (a) if not - GCC >=3.0. - -2001-09-10 Michael Meissner - - * config.gcc (sparc64-*-solaris2): Add alias to be compatible with - binutils, gdb. - -2001-09-10 David Edelsohn - - * config/rs6000/t-aix43 (SHLIB_INSTALL): Use mode 751 (a+x,r-o). - -Mon Sep 10 16:26:44 2001 Richard Kenner - - * builtins.c (c_getstr): Correct thinko in last change and further - cleanup. - -2001-09-10 Tim Freeman - - * dwarf2out.c (incomplete_types, decl_scope_table): Make them - into varray's and register them as roots with the garbage - collector so they are not collected too soon. - -Mon Sep 10 14:21:26 CEST 2001 Jan Hubicka - - * Makefile.in (cfg.o, cfganal.o, cfgloop.o, cfgbuild.o, cfgcleanup.o): - New. - * basic-block.h (flow_obstack, label_value_list, - tail_recursion_label_list): Declare - (tidy_fallthru_edges): Declare. - (expunge_block, last_loop_beg_note): Delete. - (can_fallthru, flow_nodes_print, flow_edge_list_print): Declare. - * cfg.c: New file - (basic_block_for_insn, label_value_list): Move from flow.c; make global. - (n_basic_blocks, n_edges, basic_block_info, entry_exit_blocks, - init_flow, clear_edges, can_delete_note_p, can_delete_label_p, - flow_delete_insn, flow_delete_insn_chain, create_basic_block, - expunge_block, flow_delete_block, compute_bb_for_insn, - update_bb_for_insn, set_block_for_insn, set_block_for_new_insns, - make_edge, remove_edge, redirect_edge_succ, redirect_edge_succ_nodup, - redirect_edge_pred, split_block, marge_blocks_nomove, block_label, - try_redirect_by_replacing_jump, last_loop_beg_note, - redirect_edge_and_branch, redirect_edge_and_branch_force, - tidy_fallthru_edge, tidy_fallthru_edges, back_edge_of_syntactic_loop_p, - split_edge, insert_insn_on_edge, commit_one_edge_insertion, - commit_edge_insertions, dump_flow_info, debug_flow_info, - dump_edge_info, dump_bb, debug_bb, debug_bb_n, print_rtl_with_bb, - verify_flow_info, purge_dead_edges, purge_all_dead_edges): - Move here from flow.c - * cfganal.c: New file. - (forwarder_block_p, can_fallthru, mark_critical_edges, - mark_dfs_back_edges, need_fake_edge_p, flow_call_edges_add, - find_unreachable_blocks, create_edge_list, free_edge_list, - print_edge_list, verify_edge_list, find_edge_index, flow_nodes_print, - flow_edge_list_print, remove_fake_successors, remove_fake_edges, - add_noreturn_fake_exit_edges, connect_infinite_loops_to_exit, - flow_reverse_top_sort_order_compute, flow_depth_first_order_compute, - flow_dfs_compute_reverse_init, flow_dfs-compute_reverse_add_bb, - flow_dfs-compute_reverse_execute, flow_dfs_compute_reverse_finish); - Move here from flow.c - * cfgbuild.c: New file - (count_basic_blocks, find_label_refs, make_label_edge, make_eh_edge, - make_edges, find_basic_blocks_1, find_basic_blocks, - find_sub_basic_blocks): Move here from flow.c - * cfgcleanup.c: New file. - (try_simplify_condjump, try_forward_edges, tail_recursion_label_p, - merge_blocks_move_predecessor_nojumps, - merge_blocks_move_successor_nojumps, merge_blocks, - flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, - try_crossjump_bb, try_optimize_cfg): Move here from flow.c - (delete_unreachable_blocks, cleanup_cfg): Likewise; return true - if succeeded. - * cfgloop.c: New file - (flow_loops_cfg_dump, flow_loop_nested_p, flow_loop_dump, - flow_loops_dump, flow_loops_free, flow_loop_entry_edges_find, - flow_loop_exit_edges_find, flow_loop_nodes_find, - flow_loop_pre_header_scan, flow_loop_pre_header_find, - flow_loop_tree_node_add, flow_loops_tree_build, - flow_loop_level_compute, flow_loops_level_compute, flow_loop_scan, - flow_loops_find, flow_loops_update, flow_loop_outside_edge_p): - Move here from flow.c - * flow.c: Remove everything moved elsewhere - * output.h (cleanup_cfg): Return bool. - - * bb-reorder.c (reorder_block_def): Remove 'index'. - (insert_intra_1): Add argument BB, set block for new note. - (make_reorder_chain): Do not depdent on BB indexes. - (make_reorder_chain_1): Do not use BB indexes. - (label_for_bb): Likewise; set BB for new insn. - (emit_jump_to_block_after): Likewise. - (fixup_reorder_chain): Sanity check that all basic blocks - are chained; verify newly created insn chain; remove - undocnitional jump simplifying; Do not use BB indexes; - properly initialize count and frequency information; - dump reordered sequence. - (insert_intra_bb_scope_notes): update call of insert_intra_1. - (insert_inter_bb_scope_notes): Set block for new insn. - (reorder_basic_blocks): Dump flow info before reoredering. - -Mon Sep 10 06:47:35 2001 Richard Kenner - - * alias.c (clear_reg_alias_info): Use K&R format definition. - Avoid unsigned warning. - * builtins.c: Use "unsigned int", not "unsigned". - (target_char_cast): Use host_integerp and tree_low_cst. - (expand_builtin_args_info, expand_builtin_frame_address): Likewise. - (c_strlen): Likewise; OFFSET now HOST_WIDE_INT. - (c_getstr): Likewise. - (std_expand_builtin_va_arg): Use int_size_in_bytes. - (builtin_memcpy_read_str): Avoid unsigned warning. - (expand_builtin_memcpy): Alignments are unsigned. - (expand_builtin_strncpy, expand_builtin_memset): Likewise. - (expand_builtin_expect_jump): Use integer_zerop and integer_onep. - * predict.c (expensive_function_p): LIMIT now unsigned. - * resource.c (mark_target_live_regs): Make some vars unsigned. - * sdbout.c: Use "unsigned int", not "unsigned". - (MAKE_LINE_SAFE): Add cast to avoid unsigned warning. - (sdbout_source_line): Likewise. - (sdbout_record_type_name): Remove "const" for NAME declaration. - * config/alpha/alpha.c (alpha_expand_block_move): Whitespace fixes. - -2001-09-10 Richard Sandiford - - * calls.c (store_one_arg): Expand comment. - -2001-09-10 Roman Lechtchinsky - - * calls.c (store_one_arg): Make sure that the entire argument is - pushed if STACK_PARMS_IN_REG_PARM_AREA is defined. - -2001-09-09 Richard Henderson - - * emit-rtl.c (adjust_address): Fix mode for LO_SUM. - -Sun Sep 9 10:43:17 CEST 2001 Jan Hubicka - - * loop.c (combine_givs): Fix computing of benefit once giv is combined. - -2001-09-09 Richard Henderson - - * config/alpha/alpha.c (alpha_next_sequence_number): New. - (alpha_this_literal_sequence_number): New. - (alpha_this_gpdisp_sequence_number): New. - (some_operand, input_operand): Add HIGH. - (local_symbolic_operand): New. - (alpha_encode_section_info): New. - (alpha_legitimate_address_p): Allow LO_SUM. - (alpha_legitimize_address): Generate HIGH+LO_SUM. - (alpha_expand_mov): Likewise. - (secondary_reload_class): Check memory_operand not general_operand - for FP_REGS test. - (alpha_expand_unaligned_load): Force LO_SUM addresses into a register. - (alpha_expand_unaligned_store): Likewise. - (alpha_expand_unaligned_load_words): Likewise. - (alpha_expand_unaligned_store_words): Likewise. - (alpha_expand_block_clear): Likewise. - (print_operand): Handle %#, %*, %H. - (print_operand_address): Handle LO_SUM. - (find_lo_sum): New. - (alpha_does_function_need_gp): Use it. - (alpha_expand_block_move): Fix signed compare warnings. - (alpha_sa_mask, alpha_align_insns): Likewise. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.h (TARGET_EXPLICIT_RELOCS): New. - (MASK_EXPLICIT_RELOCS): New. - (TARGET_SWITCHES): Add -mexplicit-relocs. - (EXTRA_CONSTRAINT): Add 'T'. - (PREFERRED_RELOAD_CLASS): HIGH goes in GENERAL_REGS. - (ASM_APP_ON, ASM_APP_OFF): Turn on and off asm macro expansion. - (ENCODE_SECTION_INFO): Out line. - (REDO_SECTION_INFO_P): New. - (STRIP_NAME_ENCODING): New. - (ASM_OUTPUT_LABELREF): New. - (PRINT_OPERAND_PUNCT_VALID_P): Add #, *. - (PREDICATE_CODES): Update. - * config/alpha/alpha.md (divmodsi_internal_er, divmoddi_internal_er, - call_osf_1_er_noreturn, call_osf_1_er, movdi_er_low, movdi_er_nofix, - movdi_er_fix, prologue_ldgp_1_er, builtin_setjmp_receiver_sub_label_er, - builtin_setjmp_receiver_er, exception_receiver_1_er, - call_value_osf_1_er): New patterns. - (sibcall_osf_1, sibcall_value_osf_1): Remove register alternative. - (movqi, movhi, movsi): Add explicit $31 base register to lda. - * config/alpha/elf.h (ASM_FILE_START): Set nomacro if explicit relocs. - (FINAL_PRESCAN_INSN): New. - -Sat Sep 8 22:00:55 CEST 2001 Jan Hubicka - - * reg-stack.c (subst_stack_regs_pat): Fix fcmov reversal code. - -2001-09-08 Andreas Jaeger - - * i386.h (TARGET_SWITCHES): Fix description. - -2001-09-07 David Edelsohn - - * rs6000.c (num_insns_constant): Compute number of instructions - more accurately. - - * doc/install.texi: Explain AIX exception handling work-around. - Update URL for AIX fixes. - -2001-09-07 Jim Wilson - - * alias.c (clear_reg_alias_info): New. - * flow.c (attempt_auto_inc): Call clear_reg_alias_info. - * rtl.h (clear_reg_alias_info): Declare. - -2001-09-07 Roman Lechtchinsky - - * real.c (EMUSHORT,EMUSHORT_SIZE): Use HImode if no 16-bit type is - available. - (UEMUSHORT): New. Use instead of unsigned EMUSHORT. - (m16m,edivm,emulm): Change declaration to match definition. - -2001-09-07 Roman Lechtchinsky - - * reload.c (push_reload): Check for subreg_lowpart_p instead of - SUBREG_BYTE being 0 when determining if the inner part of a subreg - can be reloaded. - -2001-09-07 Roman Lechtchinsky - - * c-common.c (signed_or_unsigned_type): Handle machine mode types - which have no corresponding C type. - * fold_const.c (target_isinf,target_isnan,target_negative): Update - the representation of 64-bit doubles to work with 64-bit ints. - -2001-09-07 Aldy Hernandez - - * config/mips/mips.c (override_options): Do not override ISA when ABI - specified if MIPS_CPU_STRING_DEFAULT was specified. - -2001-09-07 Richard Henderson - - * loop.c (record_giv): Avoid simplifying MULT to ASHIFT. - (express_from_1): Wrap lines. - * rtlanal.c (commutative_operand_precedence): Rename from - operand_preference; export. - * rtl.h: Declare it. - * simplify-rtx.c (simplify_gen_binary): Tidy +/- const_int handling. - (simplify_binary_operation): Invoke simplify_plus_minus on - (CONST (PLUS ...)) as well. - (struct simplify_plus_minus_op_data): New. - (simplify_plus_minus_op_data_cmp): New. - (simplify_plus_minus): Use them. Avoid infinite recursion with - simplify_binary_operation wrt CONST. - -Fri Sep 7 11:52:30 2001 Kazu Hirata - - * h8300-protos.h (general_operand_dst_push): Remove. - * h8300.c (general_operand_dst_push): Likewise. - * h8300.h (OK_FOR_T): Likewise. - (EXTRA_CONSTRAINTS): Do not use OK_FOR_T. - * h8300.md (pushqi_h8300): New. - (pushqi_h8300hs): Likewise. - (pushqi): Likewise. - (pushhi_h8300): Likewise. - (pushhi_h8300hs): Likewise. - (pushhi): Likewise. - -Fri Sep 7 12:56:26 2001 Richard Kenner - - * genattrtab.c (attr_printf): First arg is unsigned. - Clean up formatting of callers. - -2001-09-06 Aldy Hernandez - - * config/mips/mips.c (override_options): Allow abi32 with 64 bit - registers. - -2001-09-07 Andreas Jaeger - - * i386.h (TARGET_SWITCHES): Fix descriptions. - -2001-09-07 Matt Kraai - - * stor-layout.c (compute_record_mode): Check DECL_SIZE is set. - -2001-09-06 Ira Ruben - - Remove OP_IDENTIFIER. - * tree.def (OP_IDENTIFIER): Remove. - * tree.c (tree_node_kind enum): Remove op_id_kind. - (tree_node_kind_names): Remove "op_identifiers". - (make_node): Remove OP_IDENTIFIER test. - (build_op_identifier): Removed because it isn't being used. - * print-tree.c (print_node): Remove OP_IDENTIFIER case. - * cp/pt.c (tsubst): Remove OP_IDENTIFIER case. - -2001-09-06 Richard Henderson - - * simplify-rtx.c (simplify_binary_operation): Revert last change. - -2001-09-06 Richard Henderson - - * simplify-rtx.c (simplify_binary_operation): Simplify contents - of CONST. - -2001-09-06 Franz Sirl - - * config/rs6000/rs6000.c (rs6000_emit_prologue): Fix DWARF2 register - number used for CR register. - -Thu Sep 6 11:16:35 2001 Jeffrey A Law (law@cygnus.com) - Joern Rennecke (amylaar@cygnus.com) - - * h8300-protos.h (h8300_return_addr_rtx): New prototype. - * h8300.c (initial_offset): Handle offset between RP and FP. - (h8300_return_addr_rtx): New function. - * h8300.h (FIRST_PSEUDO_REGISTER): Bump now that we have a - return register. - (FIXED_REGISTERS, CALL_USED_REGISTERS): Corresponding changes. - (REG_ALLOC_ORDER, RETURN_ADDRESS_POINTER_REGNUM): Likewise. - (REG_CLASS_CONTENTS, ELIMINABLE_REGS): Likewise. - (CAN_ELIMINATE, REGISTER_NAMES): - (RETURN_ADDR_RTX): Call h8300_return_addr_rtx. - -2001-09-06 Nathan Sidwell - - Remove TYPE_NONCOPIED_PARTS. - * tree.h (TYPE_NONCOPIED_PARTS): Remove. - (struct tree_type): Remove noncopied_parts. - * c-tree.h (TYPE_ACTUAL_ARG_TYPES): Map onto TYPE_BINFO. - * expr.c (save_noncopied_parts, init_noncopied_parts): Remove. - (fixed_type_p): Remove. - (expand_expr, INIT_EXPR): Don't deal with noncopied parts. - (expand_expr, MODIFY_EXPR): Likewise. - * ggc-common.c (ggc_mark_trees): Remove TYPE_NONCOPIED_PARTS. - * doc/c-tree.texi: Remove TYPE_NONCOPIED_PARTS FIXME. - -2001-09-06 Alan Modra - - * config/rs6000/rs6000.c (mask_operand): Use signed vars to avoid - compiler warnings. - (mask64_operand): Likewise. - (includes_rldic_lshift_p): Likewise. - (includes_rldicr_lshift_p): Likewise. - -2001-09-05 Ziemowit Laski - - * objc/objc-act.c (build_message_expr): If a class method cannot - be found, do not issue a warning if a corresponding instance - method exists in the root class. - -2001-09-05 Richard Henderson - - * config/alpha/alpha.c (alpha_expand_mov): Initialize temp. - -2001-09-05 Zack Weinberg - - * function.c (ggc_mark_struct_function): Mark f->outer. - * toplev.c (rest_of_compilation): Clear DECL_SAVED_INSNS here... - * integrate.c (output_inline_function): ... not here. - -Wed Sep 5 17:28:49 CEST 2001 Jan Hubicka - - * profile.c (branch_prob): Call add_noreturn_fake_exit_edges. - - * i386.c (size_cost): New static variable. - (override_function): Use size_cost when -Os is specified. - - * i386.c (ix86_expand_prologue): Set use_fast_prologue_epilogue - properly; Use current_function_calls_eh_return. - (ix86_expand_epilogue): Avoid dummy optimize_size tests; - use leave to avoid dependency chain. - - * local-alloc.c (update_equiv_regs): Use CFG to iterate over INSN stream; - get BB loop_depth instead of computing it from LOOP notes. - - * reg-stack.c (subst_stack_reg_pat): Handle reversal of conditional moves. - -2001-09-05 John David Anglin - - * som.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. - * pa.h (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP): Define - -2001-09-05 Jeffrey A Law (law@cygnus.com) - Jason Merrill (jason@redhat.com) - - * stor-layout.c (layout_type): Complain if an array's size can - not be represented in a size_t. - - * config/h8300/elf.h (ENDFILE_SPEC, STARTFILE_SPEC): Define. - -2001-09-05 David Billinghurst - - * gcc.c: (process_command) Add parentheses around assignment - used as truth value. - -2001-09-05 Richard Sandiford - - * config/mips/mips.c (save_restore_insns): Don't mark any register - save slots as unchanging if current_function_calls_eh_return. - -2001-09-05 Richard Henderson - - * config/alpha/alpha.c (alpha_legitimate_address_p): New. - * config/alpha/alpha-protos.h: Declare it. - * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Move to c file. - (NONSTRICT_REG_OK_FOR_BASE_P): Rename from non-strict macro. - (NONSTRICT_REG_OK_FP_BASE_P): Likewise. - (STRICT_REG_OK_FOR_BASE_P): Rename from strict macro. - (REG_OK_FOR_BASE_P): Select one of the above. - -2001-09-05 Richard Sandiford - - * config/mips/t-elf (EXTRA_PARTS): Use EXTRA_MULTILIB_PARTS instead. - (crti.o): Prefix name of object file with $(T). - (crtn.o): Likewise. - -2001-09-05 David S. Miller - - * config/sparc/linux.h: Set CPLUSPLUS_CPP_SPEC. - * config/sparc/linux64.h: Likewise. - -2001-09-05 Andreas Jaeger - - * doc/invoke.texi (i386 Options): -mwide-multiply is not - available anymore, remove the documentation. - (i386 Options): Fix typo, cleanup index entries. - - * prefix.c (concat): Remove, we can use the version from liberty. - -2001-09-05 Richard Henderson - - * config/alpha/alpha.c (alpha_expand_mov, alpha_expand_mov_nobwx): - New functions split out of md file expanders. - * config/alpha/alpha-protos.h: Declare them. - * config/alpha/alpha.md (movqi, movhi, movsi, movdi): Use them. - -2001-09-05 Neil Booth - - * cppmacro.c (funlike_invocation_p): No need to restore context. - -2001-09-04 Richard Henderson - - * reload.c (push_reload): Export. - * reload.h (push_reload): Declare it. - - * config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Move out o' line. - (LEGITIMIZE_RELOAD_ADDRESS): Likewise. - * config/alpha/alpha.c (alpha_legitimize_address): New. - (alpha_legitimize_reload_address): Likewise. - * config/alpha/alpha-protos.h: Declare them. - -2001-09-04 Stan Shebs - - * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Define. - * config/darwin.c (machopic_stub_name): Account for internally - generated lib calls such as memcpy. - -2001-09-04 Richard Henderson - - * unwind.h (_UA_END_OF_STACK): New flag. - * unwind.inc (_Unwind_ForcedUnwind_Phase2): Set it. - -Tue Sep 4 11:16:35 2001 Jeffrey A Law (law@cygnus.com) - - * h8300/elf.h (LINK_SPEC): Redefine appropriately for the H8. - -2001-09-04 Richard Sandiford - - * config/mips/mips.c (save_restore_insns): Change base_offset to - fp_offset in second call to mips_emit_frame_related_store. - -2001-09-04 Hans-Peter Nilsson - - * doc/rtl.texi: Mention that besides as a CODE_LABEL, a label can - sometimes be represented as a NOTE of type - NOTE_INSN_DELETED_LABEL. - (Insns): Document NOTE_INSN_DELETED_LABEL. - -2001-09-04 Nathan Sidwell - - * c-common.h (tree_dump_index): Add more comments. - * c-dump.c (dump_files): Name flags `tree' rather than `ast'. - (dump_option_value_info): New struct. - (dump_options): New array. - (dump_switch_p): Parse switch options symbolically. - * doc/invoke.texi (-fdump-ast): Rename to ... - (-fdump-tree): ... here. Document that options are symbolic, and - not all are applicable. - -2001-09-04 David S. Miller - - * config/sparc/sparc.md (define_splits): Kill constraints. - - Cleanup redundant and unused insn attributes. - * config/sparc/sparc.md (define_attr "insn"): Kill address, unary, - binary, and move. Mark ialu as default. - (commented out define_function_unit "alu"): Kill. - (define_attr "use_clobbered"): Kill. - (whole file): Kill address insn type references. Replace - all unary/binary/move references with ialu. - * config/sparc/sparc.c (whole file): Kill TYPE_ADDRESS - references. Replace TYPE_{UNARY,BINARY,MOVE} references with - TYPE_IALU. - - Simplify length insn attribute and make more judicious use - of insn attribute defaulting. - * config/sparc/sparc.md (all insns with length > one): Mark as - insn type multi if real instructions, else use default if - it is a forced splitter. - (all insns with length == one): Use default insn length. - (all insns of type ialu): Use default insn type. - - Fix erroneous insn attribute settings. - (addx): Set insn type to misc. - (mulsidi3_sp64, const_mulsidi3_sp64, umulsidi3_sp64, - const_umulsidi3_sp64): Set insn type to imul. - - Track SFmode vs DFmode insns according to UltraSPARC - scheduling rules. - * config/sparc/sparc.md ("fptype"): New attribute, default - to "single". - (all DFmode single insns): Mark as fptype "double". - -2001-09-03 Jakub Jelinek - - * loop.c (express_from_1): Fix CONSTANT_P(a) case. - -2001-09-03 Richard Henderson - - * function.h (struct function): Add arg_pointer_save_area_init. - * function.c (expand_function_end): Init arg_pointer_save_area. - (get_arg_pointer_save_area): Do not init arg_pointer_save_area - when called from a nested function. - -2001-09-02 Angela Marie Thomas - - * fixinc/Makefile.in: Regenerate fixincl.x only if maintainer-mode - is enabled. - -Sun Sep 2 18:37:54 CEST 2001 Jan Hubicka - - * reload1.c (fixup_abnormal_edges): Allow NOTEs in the sequence. - -2001-09-01 Geoffrey Keating - - * expr.c (push_block): Make sane use of STACK_GROWS_DOWNWARD. - (emit_push_insn): Use specified padding direction when - STACK_PUSH_CODE is POST_INC. - - * config/stormy16/stormy16.h (DWARF2_UNWIND_INFO): Define to 0. - -2001-09-01 Kaveh R. Ghazi - - * mips.h (INITIAL_ELIMINATION_OFFSET): Add missing `else abort'. - -2001-09-01 Neil Booth - - * cppinit.c (cpp_start_read): Free the imacros list as we - traverse it. Don't free the chains before returning. - (_cpp_push_next_buffer): Only try pushing buffers if we've - completed -imacros handling. - -2001-08-31 Eric Christopher - - * gcc.c (handle_braces): Add explaination for abort. - -2001-08-30 Roman Zippel - - * expmed.c (store_bit_field): Update to patch from 2001-08-27: - move adjustment of bitpos instead. - -2001-08-31 Zack Weinberg - - * function.c: Remove all_functions. Make outer_function_chain - static. - (init_function_start): Don't add new function structure to - all_functions. - (find_function_data, push_function_context_to, - pop_function_context_from, put_var_into_stack, - trampoline_address): Update for changed structure element names. - (push_function_context_to): Disentangle. - (free_after_compilation): Also free F. - (expand_dummy_function_end): Don't free cfun here. - (put_var_into_stack): Comment why we can't use find_function_data here. - (fix_lexical_addr, trampoline_address, ): Use find_function_data. - (mark_function_chain): Split into maybe_mark_struct_function and - ggc_mark_struct_function. Export the latter. - (init_function_once): Mark from cfun and outer_function_chain; - not all_functions. - - * function.h (struct function): Kill next_global. Rename next - to outer. All users updated to match. - (all_functions, outer_function_chain): Don't declare. - - * ggc-common.c (ggc_mark_trees): Mark DECL_SAVED_INSNS. - * integrate.c (output_inline_function): Clear DECL_SAVED_INSNS, - don't touch f->inlinable, after calling rest_of_compilation. - - * tree.h: Forward-declare struct function. Prototype - ggc_mark_struct_function. - -2001-08-31 Kazu Hirata - - * config/h8300/h8300.md (*andorhi3): Fix typos. - -2001-08-31 Kaveh R. Ghazi - - * calls.c (emit_library_call_value): Don't use a fixed - argument after VA_CLOSE, i.e. out of scope in traditional C. - - * emit-rtl.c (gen_rtvec): Likewise. - -2001-08-31 Kaveh R. Ghazi - - * Makefile.in (c-pragma.o): Depend on output.h. - (reorg.o): Depend on except.h. - - * c-pragma.c: Include output.h. - - * reorg.c: Include except.h. - - * unwind-dw2.c: Call __builtin_alloca, not alloca. - -2001-08-31 Richard Henderson - - * sched-deps.c (add_dependence): Don't elide dependency if the - conditional used by insn is modified in elem. - -2001-08-31 Nick Clifton - - * config/v850/v850.h (OUTPUT_ADDR_CONST_EXTRA): Define. - -2001-08-31 Diego Novillo - - * c-decl.c (c_decode_option): Skip '-f' prefix before calling - dump_switch_p. - -2001-08-31 Geoffrey Keating - - * config/stormy16/stormy16.c (stormy16_asm_out_destructor): New - function. - (stormy16_asm_out_constructor): New function. - (TARGET_ASM_CONSTRUCTOR): Define. - (TARGET_ASM_DESTRUCTOR): Define. - -2001-08-31 Andreas Jaeger - - * gcse.c (add_label_notes): REG_LABEL is an INSN_LIST. - * loop.c (add_label_notes): Likewise. - * reload.c (find_reloads): Likewise. - * config/sh/sh.c (machine_dependent_reorg): Likewise. - -2001-08-31 Jason Merrill - - * unwind-pe.h (read_uleb128, read_sleb128): Move actual reading - code here. Take _Unwind_{W,Sw}ord*. - (read_encoded_value_with_base): Use them. - * unwind-dw2.c (_Unwind_FrameState): Make cfa_offset and cfa_reg - words. - (extract_cie_info): Simplify read_?leb128 handling. - (execute_stack_op, execute_cfa_program): Likewise. - * unwind-dw2-fde.c (get_cie_encoding): Likewise. - -2001-08-31 Geoffrey Keating - - * config/stormy16/stormy16.c (stormy16_expand_epilogue): Use - the frame pointer to pop the stack if convenient. - - * config/stormy16/stormy16.c (stormy16_initialize_trampoline): - Don't use post-increment before combine. - * config/stormy16/stormy16.h (STATIC_CHAIN_REGNUM): Don't use - a call-saved register. - -2001-08-31 Andreas Jaeger - - * jump.c (mark_jump_label): Revert patch from 2001-08-28, the - code was correct. - -2001-08-30 Geoffrey Keating - - * config/stormy16/stormy16.md (udivmodhi4): Express using UDIV/UMOD, - not DIV/MOD, of course. - -2001-08-30 Vladimir Makarov - - * rtl.def: Undo my patch commited 2001-08-27. - - * genattrtab.c: Ditto. - - * rtl.h: Ditto. - - * sched-int.h: Ditto. - - * target-def.h: Ditto. - - * target.h: Ditto. - - * haifa-sched.c: Ditto. - - * sched-rgn.c: Ditto. - - * sched-vis.c: Ditto. - - * Makefile.in: Ditto. - - * doc/md.texi: Ditto. - - * doc/tm.texi: Ditto. - - * doc/contrib.texi: Ditto. - - * doc/gcc.texi: Ditto. - - * genattrtab.h: Remove it. - - * genautomata.c: Remove it. - - * genattr.c: Undo my patch and Richard Henderson's patch commited - 2001-08-27. - -Thu Aug 30 19:22:15 2001 J"orn Rennecke - - * config.gcc (h8300-*-elf*): New case. - * h8300.h (CPP_SPEC): Add subtarget_cpp_spec. - (SUBTARGET_CPP_SPEC): Define. - (EXTRA_SPECS): Define. - (SUBTARGET_EXTRA_SPECS): Define. - * config/h8300/crti.asm, config/h8300/crtn.asm: New files. - * config/h8300/elf.h, config/h8300/t-elf: Likewise. - -Thu Aug 30 18:50:37 2001 J"orn Rennecke - - * t-h8300 (LIB1ASMFUNCS): Add _fixunssfdi and _fixunssfsi_asm. - (LIB2FUNCS_EXTRA): Define. - config/h8300/lib1funcs.asm: New part: L_fixunssfsi_asm . - config/h8300/fixunssfsi.c: New file. - -2001-08-30 Kazu Hirata - - * config/h8300/h8300.md (zero_extendqihi2): Changes to - define_expand to accommodate target-specific attributes. - (anonymous zero_extendqihi2 patterns): New. - -Thu Aug 30 18:10:56 2001 J"orn Rennecke - - * h8300.md (*andorhi3): New pattern. - -Thu Aug 30 16:00:31 2001 J"orn Rennecke - - * h8300.c (dosize): Fix test for "sub". - -Thu Aug 30 10:21:43 2001 J"orn Rennecke - - * c-typeck.c (pointer_diff): Try to eliminate common term before - doing conversions. - -2001-08-30 Nick Clifton - - * config/arm/arm.c (arm_compute_initial_elimination_offset): - Account for the saves of the FP registers. - - * config/arm/unknown-elf.h (TEXT_SECTION): Delete. - (TEXT_SECTION_ASM_OP): Define. - (INIT_SECTION_ASM_OP): Define. - (FINI_SECTION_ASM_OP): Define. - (SUBTARGET_EXTRA_SECTIONS): Remove trailing comma. - (RDATA_SECTION_FUNCTION): Provide prototype. - -2001-08-29 Geoffrey Keating - - * reload1.c (move2add_note_store): Correct typo checking for - argument pushes. - -2001-08-29 Andrew MacLeod - - * gcse.c (compute_hash_table): The SRC part of an insn with a RETVAL - note should not be considered outside the libcall block. - -2001-08-29 Kaveh R. Ghazi - - * genattrtab.c (attr_printf): Use VA_OPEN/VA_FIXEDARG/VA_CLOSE. - -2001-08-29 Kazu Hirata - - * config/h8300/h8300.md (movsi_h8300hs): Make it 64-bit safe. - -2001-08-29 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - emit_logical_op. - * config/h8300/h8300.c (emit_logical_op): New. - * config/h8300/h8300.md (andhi3): Use emit_logical_op. - (andsi3): Likewise. - (iorhi3): Likewise. - (iorsi3): Likewise. - (xorhi3): Likewise. - (xorsi3): Likewise. - -2001-08-29 John David Anglin - - * pa.c (move_operand): Cast GET_MODE_SIZE results to HOST_WIDE_INT for - comparison with rtx INTVAL. - (pa_output_function_prologue): Don't mix signed and unsigned in `?' - expression. - * pa.h (FUNCTION_ARG_SIZE): Likewise. - -2001-08-29 Kazu Hirata - - * config/h8300/lib1funcs.asm: Update the copyright. Fix - comment typos. - -2001-08-29 Kazu Hirata - - * config/h8300/h8300.md (anonymous movhi pattern): Don't move - (reg n) to (mem (pre_dec (reg n)) - (anonymous movsi pattern): Likewise. - -2001-08-29 Kazu Hirata - - * config/h8300/h8300.h (RETURN_ADDR_RTX): New. - -2001-08-29 Kazu Hirata - - * config/h8300/h8300.md (movsi_h8300hs): Optimize loading of - several special constants. - -2001-08-29 Kazu Hirata - - * config/h8300/lib1funcs.asm: Fix comment typos. - -2001-08-29 Kaveh R. Ghazi - - * iris6.h (ASM_DECLARE_OBJECT_NAME, ASM_FINISH_DECLARE_OBJECT): - Fix format specifier warnings. - - * irix6-libc-compat.c (inet_ntoa, inet_lnaof, inet_netof, - inet_makeaddr, semctl): Prototype. - - * mips.c (compute_frame_size): Fix signed/unsigned warnings. - (save_restore_insns): Use base_offset, not gp_offset. - - * mips.h (GP_REG_OR_PSEUDO_STRICT_P): Fix signed/unsigned warning. - (ASM_OUTPUT_BYTE): Fix format specifier warning. - -2001-08-29 Richard Henderson - - * bb-reorder.c (function_tail_eff_head): New. - (record_effective_endpoints): Set it. - (fixup_reorder_chain): Use it. - -2001-08-28 Kaveh R. Ghazi - - * dwarf2asm.c (dw2_asm_output_nstring): Fix typo in previous change. - -2001-08-28 Dale Johannesen - - * config/darwin.c (machopic_function_base_name): Add const - qualifier to a string. - (darwin_encode_section_info): Ditto. - -2001-08-28 Kaveh R. Ghazi - - * tree.c (default_valid_attribute_p): Don't use PARAMS on a - function definition. - -2001-08-28 Daniel Berlin - - * df.h (struct df): Add rts_order variable. - - * df.c (df_visit_next_rts): New function. - (df_visit_next): Renamed to df_visit_next_rc - (df_analyse_1): Allocate/compute/free rts_order as well. - (df_rd_global_compute): Use df_visit_next_rc instead of - df_visit_next. - (df_ru_global_compute): Use df_visit_next_rts instead of - df_visit_next. - - * flow.c (flow_reverse_top_sort_order_compute): New function. - - * basic-block.h: Add prototype. - -2001-08-28 Daniel Berlin - - * ssa-ccp.c (ssa_ccp_df_delete_unreachable_insns): For unreachable - blocks, the BB_REACHABLE is now set, rather than aux being - non-NULL. Update the test to reflect this. - -2001-08-28 Eric Christopher - - * config/mips/crtn.asm: Add comment explaining 16 byte alignment. - config/mips/crti.asm: Ditto. - -2001-08-28 Eric Christopher - Richard Henderson - - * c-pragma.h (add_weak): Move prototype from here... - * output.h (add_weak): ... to here. - * varasm.c (add_weak): Fix typo. - * config/mips/crti.asm: New file. - * config/mips/crtn.asm: Ditto. - * config/mips/elf.h (SBSS_SECTION_ASM_OP) Add #undef. - (CTOR_LISTS_DEFINED_EXTERNALLY): Remove. - (INVOKE__main): Ditto. - (INIT_SECTION_ASM_OP): New. - (FINI_SECTION_ASM_OP): Ditto. - (STARTFILE_SPEC): Add crti. - (ENDFILE_SPEC): Add crtn. - * config/mips/elf64.h: Same. - * config/mips/rtems64.h (INVOKE__main, NAME__MAIN, SYMBOL__MAIN): - Remove. - * config/mips/vxworks.h: Ditto. - * config/mips/t-elf: Support crti and crtn. - -2001-08-28 Alexandre Oliva - - * jump.c (mark_jump_label): Fix typo: REG_LABEL is EXPR_LIST, not - INSN_LIST. - -2001-08-28 Richard Henderson - - * config/ia64/ia64.md (andcmbi3, iorcmbi3): Fix typos. - (one_cmplbi2 splitter): Remove redundant test. - -2001-08-28 Dale Johannesen - - * config/rs6000/darwin.h (DEFAULT_SIGNED_CHAR): Define. - -2001-08-28 Danny Smith - - * config/i386/cygwin.h (BIGGEST_FIELD_ALIGNMENT): Set to 64. - -2001-08-28 Stan Shebs - - * config/darwin.h (ASM_OUTPUT_LABELREF): Handle '*' names. - (UNALIGNED_SHORT_ASM_OP): Define. - (UNALIGNED_INT_ASM_OP): Define. - -2001-08-28 Will Cohen - - * config/rs6000/rs6000.md (store_multiple): Correct RTL - generation for first set. - -2001-08-27 Roman Zippel - - * flow.c (redirect_edge_succ_nodup): Return new edge. - (try_simplify_condjump): Use new edge. - * basic-block.h (redirect_edge_succ_nodup): Update prototype. - - * cse.c (cse_basic_block): Skip note instructions. - -2001-08-27 Richard Henderson - - * combine.c (combine_simplify_rtx): Don't reverse condition - if there is no reverse for the condition. - (simplify_comparison): Don't simplify subregs from INT to FP. - - * config/m68k/m68k.md (sordered, sordered_1, sunordered, sunordered_1, - suneq, suneq_1, sunge, sunge_1, sungt, sungt_1, sunle, sunle_1, - sunlt, sunlt_1, sltgt, sltgt_1, fsogt_1, fsoge_1, fsolt_1, fsole_1, - bordered, bunordered, buneq, bunge, bungt, bunle, bunlt, bltgt, - bordered_rev, bunordered_rev, buneq_rev, bunge_rev, bungt_rev, - bunle_rev, bunlt_rev, bltgt_rev): New patterns. - -2001-08-27 Roman Zippel - - * config/m68k/m68k.md (subreghi1ashrdi_const32, bsetmemqi, - bsetmemqi+1, strict_low_part peephole): Fix SUBREG_BYTE offset. - (pushqi1): New. - (adddi_dilshr32, adddi_dishl32): Only data register can be - source for mem destination. - - * expmed.c (store_bit_field): Ignore adjustment to bitpos - and use bitnum to decide about register move. - -2001-08-27 Richard Henderson - - * genattr.c (main): Emit state_t even when not doing scheduling. - -2001-08-27 Roman Zippel - Richard Henderson - - * gcse.c (reg_first_set, reg_last_set): Replace with ... - (reg_avail_info, current_bb): ... these. - (oprs_unchanged_p, record_last_reg_set_info): Use them. - (compute_hash_table): Likewise. - -2001-08-27 Roman Zippel - - * flow.c (verify_flow_info): Use checksums to verify edges. - -2001-08-27 Richard Henderson - - * genautomata.c (expand_automata): Always create a description. - -2001-08-27 Geoffrey Keating - - * optabs.c (expand_binop): Correctly handle the carry in multiword - add/subtract operations. - -2001-08-27 Fred Fish - - * ginclude/stddef.h: Fix typo, __SIZE__TYPE__ should be - __SIZE_TYPE__. - -2001-08-27 Geoffrey Keating - - * reload.c (find_reloads_toplev): Back out this change: - - Wed Jul 26 19:44:05 2000 Hans-Peter Nilsson - - * reload.c (find_reloads_toplev): Reload a paradoxical subreg of a - mem if the address is a mode_dependent_address_p. - -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. - -2001-08-27 Diego Novillo - - * flow.c (flow_loop_dump): Do not display insn UIDs if this is not - an RTL basic block. - -2001-08-27 Richard Henderson - - * function.c (expand_function_end): Don't init arg_pointer_save_area. - (get_arg_pointer_save_area): New. Create an init it here. - (fix_lexical_addr): Use it. - * function.h: Declare it. - * builtins.c (expand_builtin_setjmp_receiver): Use it. - * stmt.c (expand_nl_goto_receiver): Use it. - -2001-08-27 Richard Henderson - - * final.c (final_scan_insn): Don't enter APP_ON mode for - empty asm strings. - - * dwarf2asm.c (dw2_asm_output_encoded_addr_rtx): Use proper - alignment for assemble_integer for DW_EH_PE_aligned. - * except.c (output_function_exception_table): Likewise. - -2001-08-26 Andreas Jaeger - - * c-tree.h: Add prototyp for c_sizeof_nowarn. - -2001-08-25 Dan Nicolaescu - - * ssa-ccp.c (ssa_const_prop): Free ssa_edges. - -2001-08-27 Alan Modra - - * config/rs6000/rs6000.c (mask_operand): Rewrite without - bit-shifting loop. - (mask64_operand): Likewise. - (rldic_operand): Delete. - (includes_lshift64_p): Delete. - (includes_rldic_lshift_p): New function. - (includes_rldicr_lshift_p): New function. - (print_operand): Don't call rldic_operand in case 'W'. - * config/rs6000/rs6000-protos.h (rldic_operand): Remove. - (includes_lshift64_p): Remove. - (includes_rldic_lshift_p): Declare. - (includes_rldicr_lshift_p): Declare. - * config/rs6000/rs6000.h (PREDICATE_CODES): Remove rldic_operand. - * config/rs6000/rs6000.md : - Replace match_operand rldic_operand predicate with - const_int_operand. Replace includes_lshift64_p condition with - includes_rldic_lshift_p. - : New. - -2001-08-27 Andreas Jaeger - - * emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. - * errors.c: Likewise. - * final.c: Likewise. - * dwarf2asm.c: Likewise. - * doprint.c (checkit): Likewise. - * diagnostic.c: Likewise. - * collect2.c: Likewise. - * calls.c: Likewise. - * c-semantics.c (build_stmt): Likewise. - * c-format.c (status_warning): Likewise. - * c-errors.c (pedwarn_c99): Likewise. - * builtins.c (validate_arglist): Likewise. - * config/pj/pj.c (pj_printf): Likewise. - * fix-header.c: Likewise. - * gcc.c: Likewise. - * gcov.c (fnotice): Likewise. - * gensupport.c (message_with_line): Likewise. - * mips-tfile.c: Likewise. - * protoize.c (notice): Likewise. - * read-rtl.c (fatal_with_file_and_line): Likewise. - * rtl-error.c: Likewise. - * tradcpp.c: Likewise. - * tree.c: Likewise. - * cp/tree.c (build_min_nt): Likewise. - (build_min): Likewise. - * cp/lex.c: Likewise. - * cp/errfn.c: Likewise. - * cp/rtti.c (create_pseudo_type_info): Likewise. - -Sun Aug 26 20:25:44 2001 Denis Chertykov - - * df.c (df_uses_record): Return after recording all uses - in ASM_OPERANDS. - -2001-08-26 Daniel Berlin - - * df.c (df_insn_modify): Realloc the INSN table here, if - necessary, here, too. - -2001-08-26 Aldy Hernandez - - * config/mips/mips.c (mips_function_value): Handle complex return - values. - -2001-08-25 Hans-Peter Nilsson - - * reload1.c (reload): Make all entries in reg_equiv_memory_loc - unshared. - * reload.c (make_memloc): Copy result if it is still - reg_equiv_memory_loc[regno] on return. - (subst_reloads) [ENABLE_CHECKING]: Check that none of - reg_equiv_constant, reg_equiv_memory_loc, reg_equiv_address and - reg_equiv_mem are modified by the substitutions. - -Sat Aug 25 23:07:35 CEST 2001 Jan Hubicka - - * predict.c (expensive_function_p): New. - * rtl.h (expensive_function_p): Declare. - * i386.c (FAST_PROLOGUE_INSN_COUNT): New constant. - (use_fast_prologue_epilogue): New static variable. - (expand_prologue): Set it; emit short prologues if unset. - (expand_epilogue): Likewise. - -2001-08-22 Geoffrey Keating - - * config.gcc: Add stormy16-*-elf case. - * config/stormy16/stormy-abi: New file. - * config/stormy16/stormy16-lib2.c: New file. - * config/stormy16/stormy16-protos.h: New file. - * config/stormy16/stormy16.c: New file. - * config/stormy16/stormy16.h: New file. - * config/stormy16/stormy16.md: New file. - * config/stormy16/t-stormy16: New file. - -Sat Aug 25 15:46:51 CEST 2001 Jan Hubicka - - * i386.h (no-accumulate-outgoing-args): Use proper mask. - -2001-08-24 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_initialize_trampoline): Function - descriptor members are pointer size, not constant 4. - * config/rs6000/rs6000.md (define_splits): Remove more unused - constraints. - -2001-08-24 Kaveh R. Ghazi - - * sparc.h (ASM_OUTPUT_BYTE): Fix format specifier warning. - -2001-08-24 Andreas Jaeger , rkl@connect.org.uk - - * cp/rtti.c (VPARAMS): Fix parameter. - -2001-08-24 Zack Weinberg - - * expmed.c: Default-#define HAVE_insv, HAVE_extv, and HAVE_extzv - to zero. - (mode_for_extraction): No need for #ifdefs. Add default-case abort - to switch. - (store_bit_field): Eliminate insv_bitsize variable. Put HAVE_insv - in if controlling use of insv. - (extract_bit_field): Likewise, for extv and extzv. - -Fri Aug 24 17:27:46 CEST 2001 Jan Hubicka - - * i386.md (movcc peep2): Fix load of 0. - -2001-08-24 Kaveh R. Ghazi - - * fold-const.c (tree_expr_nonnegative_p): Handle *_DIV_EXPR, - *_MOD_EXPR, SAVE_EXPR and NON_LVALUE_EXPR. - -2001-08-23 Jason Merrill - - * c-pragma.h: Move weak_syms and weak_decls... - * varasm.c: ...here. Now static. - (declare_weak, weak_finish, remove_from_pending_weak_list): Don't - depend on HANDLE_PRAGMA_WEAK. - - * c-common.c (c_alignof, c_alignof_expr): Move here... - * c-typeck.c: ...from here. - * c-tree.h, c-common.h: Adjust. - -2001-08-23 Bernd Schmidt - - * config/ia64/ia64.c (rws_update): If !pred, set write_count - instead of incrementing it. - - * config/ia64/ia64.c (ia64_sched_reorder): When there's more than one - asm ready, don't try to move them all into the same array element. - -Thu Aug 23 17:21:43 CEST 2001 Jan Hubicka - - * function.c (thread_prologue_and_epilogue_insns): Avoid - fallthru flag on edge to exit. - - * i386.md (trunc?fsi splitter): Conditionionize for non-sse. - - * flow.c (delete_noop_moves, propagate_block_delete_insn): Purge - dead edges. - -2001-08-23 Lars Brinkhoff - - * config/mcore/mcore.h (MACHINE_DEPENDENT_SIMPLIFY): Remove. - * config/mcore/mcore.c (mcore_dependent_simplify_rtx): Likewise. - * config/mcore/mcore-protos.h (mcore_dependent_simplify_rtx): - Remove prototype. - -2001-08-23 Lars Brinkhoff - - * genconstants.c, genpreds.c, libfuncs.h, optabs.h, rtl-error.h: - replace "GNU CC" with "GCC". - -2001-08-23 Richard Henderson - - * config/ia64/ia64.c (ia64_register_move_cost): Add mode arguemnt. - Reorganize. Handle ADDL like GR, add GR_AND_BR. Handle TFmode. - (ia64_secondary_reload_class): Need GR between AR/BR and anything. - Need GR between FR and not GR_AND_FR. - * config/ia64/ia64-protos.h (ia64_register_move_cost): Update. - * config/ia64/ia64.h (reg_class): Add GR_AND_BR_REGS, move - AR regs before GR regs. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update. - (PREFERRED_RELOAD_CLASS): Tweak for reordered classes. - (REGISTER_MOVE_COST): Update. - (MEMORY_MOVE_COST): Add GR_AND_FR_REGS. - -2001-08-23 Richard Henderson - - * regclass.c (init_reg_sets_1): Don't assume cost 2 within - a register class. - -2001-08-22 Geoffrey Keating - - * reload1.c (emit_reload_insns): Don't look for notes - on a NULL store_insn. - -2001-08-22 Kaveh R. Ghazi - - * sparc.c (uns_small_int): Don't reference a constant >32-bit. - (addrs_ok_for_ldd_peep): Fix signed/unsigned warning. - (sparc_flat_function_prologue, sparc_flat_function_epilogue): Fix - format specifier warnings. - (sparc_sched_reorder): Mark parameter with ATTRIBUTE_UNUSED. - -2001-08-22 David Billinghurst - - * config/i386/i386-protos.h: Correct declaration of - i386_pe_asm_named_section. - -2001-08-22 John David Anglin - - * pa32-regs.h (CONDITIONAL_REGISTER_USAGE): Add declaration for - variable i. - * pa64-regs.h (CONDITIONAL_REGISTER_USAGE): Likewise. - -2001-08-22 Neil Booth - - * cpperror.c (print_location): Don't show _Pragma. - * cppfiles.c (_cpp_pop_file_buffer): Handle -include file pushing - and file change callback generation here. - (stack_include_file): Update use of cpp_push_buffer. - * cpphash.h (_cpp_pop_file_buffer): Update prototype. - (struct cpp_buffer): Remove type, pfile members. - * cppinit.c (cpp_handle_option): Use free_chain. - * cpplex.c (_cpp_lex_token): Don't do -include file pushing here. - (skip_escaped_newlines, get_effective_char, lex_percent): Take - a cpp_reader rather than a cpp_buffer. - (skip_escaped_newlines, get_effective_char, skip_block_comment, - skip_line_comment, parse_string, lex_percent, lex_dot, - _cpp_lex_token): Update accordingly. - * cpplib.c (_cpp_pop_buffer): Don't do file change callback - generation here. - (cpp_push_buffer): Update prototype. - (run_directive): Update use of cpp_push_buffer. - (_cpp_do__Pragma, cpp_define, cpp_define_builtin, cpp_undef, - handle_assertion): Update use of run_directive. - * cpplib.h (enum cpp_buffer_type): Remove. - (cpp_push_buffer): Update prototype. - * fix-header.c (read_scan_file): Update. - -2001-08-22 Matt Kraai - - * gcc.c (struct prefix_list): Change prefix to const char *. - -2001-08-22 Matt Kraai - - * final.c (final_scan_insn): Call ADDR_VEC_ALIGN on next insn. - -2001-08-22 Jason Merrill - - * explow.c (set_mem_attributes): Avoid returning a bogus alias set - from a new MEM. - - * jump.c (squeeze_notes): Take parms by reference. Handle END being - a squeezable note. - * rtl.h: Adjust. - * ifcvt.c (dead_or_predicable): Adjust. - * loop.c (find_and_verify_loops): Adjust. - * stmt.c (expand_end_case): Adjust. - * flow.c (merge_blocks_move_successor_nojumps): Adjust. Modify the - head and end insn pointers in the basic block, not just local copies. - (merge_blocks_move_predecessor_nojumps): Likewise. - -2001-08-22 Lars Brinkhoff - - * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, - bitmap.h, builtin-types.def, builtins.c, builtins.def, - c-aux-info.c, c-common.c, c-common.def, c-common.h, - c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, - c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, - c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, - caller-save.c, calls.c, collect2.c, collect2.h, combine.c, - conditions.h, config.gcc, configure.frag, configure.in, - conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, - cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, - dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, - doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, - dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, - emit-rtl.c, errors.c, errors.h, except.c, except.h, - exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, - fixproto, flags.h, flow.c, fold-const.c, fp-test.c, - function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, - gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, - gencheck.c, gencodes.c, genconfig.c, genemit.c, - genextract.c, genflags.c, gengenrtl.c, genmultilib, - genopinit.c, genoutput.c, genpeep.c, genrecog.c, - gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, - ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, - graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, - gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, - gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, - hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, - integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, - libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, - machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, - mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, - mkmap-symver.awk, optabs.c, output.h, params.c, params.def, - params.h, predict.c, predict.def, predict.h, prefix.c, - prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, - read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, - regclass.c, regmove.c, regrename.c, regs.h, reload.c, - reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, - rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, - sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, - sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, - ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, - stringpool.c, system.h, timevar.c, timevar.def, timevar.h, - tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, - tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, - unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, - unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, - xcoffout.h: replace "GNU CC" with "GCC". - -2001-08-21 Richard Henderson - - * final.c (LABEL_ALIGN_AFTER_BARRIER): Default to no alignment. - (final_scan_insn): Consider jump tables data even if we have no - independent text section if !JUMP_TABLES_IN_TEXT_SECTION. Use - ADDR_VEC_ALIGN. - * config/ia64/ia64.h (JUMP_TABLES_IN_TEXT_SECTION): Remove. - (ASM_OUTPUT_CASE_END): Remove. - (ASM_OUTPUT_ADDR_DIFF_ELT): Emit pc-relative references. - * config/ia64/ia64.md (tablejump): Decode pc-relative references. - * config/ia64/sysv4.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove. - -2001-08-21 Richard Henderson - - * config/ia64/ia64.c (emit_all_insn_group_barriers): Flush state - at barrier insns. Emit stop bits before barriers. - - * flow.c (flow_find_cross_jump): Don't consider unconditional - return insns for commoning. - - * final.c (compute_alignments): Fix typo. - - * expmed.c (CODE_FOR_insv, gen_insv): Provide defaults. - (CODE_FOR_extv, gen_extv, CODE_FOR_extzv, gen_extzv): Likewise. - (store_bit_field): Use mode_for_extraction more places. - (extract_bit_field): Likewise. - -2001-08-21 Zack Weinberg - - * caller-save.c: Don't include insn-codes.h. - (reg_save_code, reg_restore_code): Make arrays of int. - All uses updated to match. - (insert_save, insert_restore): No need to initialize "code" - variable upon declaration. - * Makefile.in: update dependencies; fix typo in clean rule. - -2001-08-21 Richard Henderson - - * ifcvt.c (find_if_block): Allow join_bb as EXIT. - (merge_if_block): Handle fallout from same. - -2001-08-21 Kaveh R. Ghazi - - * builtins.c (type_to_class): Fix typo in last change. - -2001-08-21 Richard Henderson - - * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Don't emit '#' if - ia64_asm_output_label. - - * config/ia64/crtbegin.asm (__do_global_dtors_aux): Use saved - copy of gp while the real gp register contains garbage. - -2001-08-21 Zack Weinberg - - * expmed.c (mode_for_extraction): New function. - (store_bit_field, extract_bit_field): Use it. - * expr.h: Prototype it and provide an enum for its first argument. - - * combine.c, function.c, recog.c: Don't include insn-codes.h. - Use mode_for_extraction rather than testing HAVE_insv/extv/extzv - and digging through the insn_data tables. - * Makefile.in: Update dependencies. - -2001-08-22 Neil Booth - - * cppfiles.c (stack_include_file): line-map.c now handles include - depth. - (handle_missing_handler): Similarly. - (_cpp_execute_include): Similarly. - (_cpp_pop_file_buffer): Similarly. - * cpphash.h (struct cpp_reader): Remove system_include_depth, - buffer_stack_depth and include_depth. - * cpplib.c (do_include_common): line-map.c now handles include depth. - (cpp_push_buffer): Similarly. - (_cpp_pop_buffer): Similarly. - * cppmacro.c (builtin_macro): Update. - * line-map.c (init_line_maps): Set depth. - (add_line_map): Increment "used" earlier. Update and use the - include depth. - (trace_include): Use the include depth. - * line-map.h (struct line_maps): New member depth. - -2001-08-21 Neil Booth - - * cppfiles.c (stack_include_file): Don't handle -H here. - * cppinit.c (cpp_start_read): Set include tracing after - cpp_post_options and after stacking the main file. - * line-map.c (trace_include): New. - (init_line_maps, add_line_map): Update. - * line-map.h (struct line_maps): New member trace_includes. - -2001-08-21 Neil Booth - - * cppfiles.c (stack_include_file): Harmonize system headerness tests. - * cppfiles.c (stack_include_file): Only stack a file if there - is something to do. Return a boolean indicating whether a - buffer was stacked or not. - (_cpp_execute_include): Similarly. - (_cpp_read_file): Similarly. - * cpphash.h (_cpp_read_file, _cpp_execute_include): Update prototypes. - -2001-08-21 Sam Steingold - - * tradcpp.c (rescan): define obufp_before_macroname before RECACHE - (RECACHE): keep obufp_before_macroname up to date - -2001-08-21 Zack Weinberg - - * stmt.c: Don't include insn-codes.h. - (expand_end_case): Machine specific logic moved to expr.c. - No need to worry about __builtin_classify_type. - (check_for_full_enumeration_handling, emit_case_nodes): - Kill #if 0 blocks. - - * builtins.o (expand_builtin_classify_type): Split up so code - can be shared with fold_builtin_classify_type. - (type_to_class, fold_builtin_classify_type): New functions. - (fold_builtins): Handle __builtin_classify_type. - - * expr.c (do_tablejump): Now static. - (case_values_threshold, try_casesi, try_tablejump): New; - code mostly from stmt.c (expand_end_case). - (expr.h): Update prototypes. - - * Makefile.in (stmt.o): Update dependencies. - -2001-08-21 Will Cohen - - * configure/alpha/alpha.h (CONDITIONAL_REGISTER_USAGE): Added local - declaration of variable i. - * configure/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Added local - declaration of variable i. - -2001-08-21 Richard Henderson - - * crtstuff.c: Fix thinko last change. Move list tails to start - of CRT_END section. Tidy ifdefs. - (__EH_FRAME_BEGIN__): Always static for ELF. - (__do_global_ctors_1): Rename from __frame_dummy. - * config/mips/iris6.h (LINK_SPEC): Update for __do_global_ctors_1 - name change; don't hide __EH_FRAME_BEGIN__. - -2001-08-21 Richard Henderson - - * gdbinit.in: Move break on exit after break on fancy_abort. - - * config/ia64/ia64.c (ia64_return_in_memory): True for variable - sized types. - -2001-08-21 Neil Booth - - * cpphash.h (_cpp_push_next_buffer): New. - * cppinit.c (do_includes): Remove. - (push_include, free_chain, _cpp_push_next_buffer): New. - (cpp_start_read): Use them to rework command line option handling. - (cpp_handle_option): Combine handling of -include and -imacros. - * cpplex.c (_cpp_lex_token): Push a new -include buffer if - appropriate. Always insert missing \n at EOF. - * cpplib.c (start_directive): Get the directive position right. - * cppmain.c (cb_file_change): Always print the first line, unless - preprocessed. - -2001-08-20 Andreas Jaeger - - * profile.c (compute_branch_probabilities): Remove extra new-line - in error message. - * flow.c (verify_flow_info): Likewise. - -2001-08-20 Diego Novillo - - * basic-block.h (basic_block): Add new field 'flags'. - (BB_REACHABLE): Define. - (expunge_block): Declare. - * flow.c (ENTRY_BLOCK_PTR): Initialize field 'flags'. - (EXIT_BLOCK_PTR): Ditto. - (expunge_block): Remove static declaration. - (cleanup_cfg): Clear bb->aux on every basic block. - (find_unreachable_blocks): Set BB_REACHABLE bit in bb->flags when - computing reachability. - (delete_unreachable_blocks): Delete block b if b->flags has - BB_REACHABLE unset. - -2001-08-20 Diego Novillo - - * doc/invoke.texi: Replace references to -fdump-tree with -fdump-ast. - -2001-08-20 Kaveh R. Ghazi - - * sparc.c (sparc_variable_issue): Fix typo in last change. - -2001-08-20 Richard Henderson - - * varasm.c (assemble_integer): Document ppc-eabi -mrelocatable losage. - -2001-08-20 John David Anglin - - * pa.h (RETURN_IN_MEMORY): Improve comment. - -2001-08-20 Janis Johnson - - * doc/invoke.texi (Profiling options): Clarify the interactions - between -fprofile-arcs and -ftest-coverage, -fprofile-arcs. - -2001-08-20 Jeffrey Oldham - - * crtstuff.c (__do_global_ctors): Fix typo in preprocessing - command. - -2001-08-20 Matt Kraai - - * gcc.c (make_relative_prefix): Allocate a sufficiently large - buffer. - -2001-08-20 Richard Henderson - - * final.c (end_final): Fix typo last change. - -2001-08-20 Neil Booth - - * cppinit.c (init_standard_includes): The returned buffer - is already malloc-ed. - * gcc.c (add_prefix): Similarly. - * prefix.c (translate_name): Update to support clear buffer - ownership rules. - (update_path): Similarly. Be sure to free any newly allocated - key. UPDATE_PATH_HOST_CANONICALIZE takes only one argument. - (tr): New function. - * prefix.h (update_path): Update prototype and document. - * config/i386/xm-djgpp.h (UPDATE_PATH_HOST_CANONICALIZE): Clean - up and update to new buffer ownership rules. - * doc/gcc.texi (UPDATE_PATH_HOST_CANONICALIZE): Update. - -Mon Aug 20 01:44:50 CEST 2001 Jan Hubicka - - * final.c (compute_alignments): New function. - (init_insn_lengths): Do not care label_align. - (LABEL_ALIGN_AFTER_BARRIER): Default to 1. - (LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to 0. - (JUMP_ALIGN, JUMP_ALIGN_MAX_SKIP): New. - (shorted_branches): Realloc label_align array; do - not call init_insn_lengths; Do not care about loop alignments. - * output.h (compute_alignments): Declare. - * toplev.c (rest_of_compilation): Call compute_alignments. - * tm.texi (JUMP_ALIGN, JUMP_ALIGN_MAX_SKIP): Document. - - * predict.c (block_info_def): Add npredecesors, remove nvisited; - change visited to tovisit. - (propagate_freq): Use faster traversing algorithm. - (estimate_loops_at_level, estimate_bb_frequencies): Change visited - to tovisit; reverse meaning. - - * predict.c (struct block_info_def): Remove nvisited. - (propagate_freq): Use EDGE_DFS_BACK to detect irreducible regions. - (estimate_bb_frequencies): Call mark_dfs_back_edges. - -2001-08-19 Geoffrey Keating - - * doc/invoke.texi (MIPS Options): Document -mfused-madd. - * config/mips/mips.h (MASK_NO_FUSED_MADD): New. - (TARGET_FUSED_MADD): New. - (TARGET_SWITCHES): Add -mfused-madd, -mno-fused-madd. - * config/mips/mips.md: Add TARGET_FUSED_MADD as condition to - the multiply-add instructions. - -2001-08-19 Richard Henderson - - * dwarf2asm.c (dw2_output_indirect_constant_1): The symbol ref - is aligned to pointer size. - -2001-08-19 Richard Henderson - - * config/ia64/ia64.c (ia64_cycle_display): Only emit cycle - display markers during final schedule. - -2001-08-19 Richard Henderson - - * function.c (gen_mem_addressof): Don't call get_alias_set if no decl. - -2001-08-19 Richard Henderson - - * config/ia64/ia64.h (STRIP_NAME_ENCODING): Handle @ and * - in the same string. - (ASM_NAME_TO_STRING): Remove. - * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Handle @ and * - in the same string. Remove support for expressions. - -2001-08-19 Richard Henderson - - * config/i386/i386.md (tablejump): Make an expander; handle - pic relative addressing here. - (tablejump_1): Rename from tablejump_pic. - (casesi): Remove. - -2001-08-19 Richard Henderson - - * regclass.c (fix_register): Fix typo. - -2001-08-18 Richard Henderson - - * config/ia64/unwind-ia64.c (UNW_REG_B0): New. - (struct _Unwind_Context): Expand br_loc to hold it. - (uw_frame_state_for): Handle leaf functions better. - (uw_update_reg_address): Update for br_loc change. - -2001-08-18 Richard Henderson - - * crtstuff.c: Move list heads before code that uses them. - (__JCR_LIST__): Remove initial null. - (frame_dummy, __frame_dummy): Do java registration here ... - (__do_global_ctors_aux): ... not here. - - * config/ia64/crtbegin.asm (dtor_ptr): Make gp-relative. - (__do_global_dtors_aux): Update to match. - (__JCR_LIST__, __do_jv_register_classes): New. - (.init): Call it. - * config/ia64/crtend.asm (__JCR_END__): New. - (__do_global_ctors_aux): Use a GPREL64I reloc to __CTOR_END__ - instead of an indirect LTOFF22 reloc. - -2001-08-18 Richard Henderson - - * flow.c (mark_regs_live_at_end): Use regs_invalidated_by_call. - * regclass.c (init_reg_sets_1): Fix typo. - * config/ia64/ia64.c (ar_pfs_reg_operand): New. - (ia64_expand_call): Pass ar.pfs to sibcall expanders. - (ia64_compute_frame_size): Make ar.unat live when in use. - (ia64_epilogue_uses): Reformat; do not check current_function_is_leaf - for ar.pfs; remove ar.unat handling. - * config/ia64/ia64.h (CALL_REALLY_USED_REGISTERS): ar.unat is - call-saved. - (PREDICATE_CODES): Add ar_pfs_reg_operand. - * config/ia64/ia64-protos.h: Update decls. - * config/ia64/ia64.md (sibcall_nopic): Use ar.pfs. - (sibcall_pic): Likewise. - -2001-08-18 Richard Henderson - - * config/ia64/ia64.c (ia64_sched_reorder2): Also skip past - pred_rel_mutex when searching for insn_group_barrier. - * config/ia64/ia64.md (cycle_display): Combine the expander - and insn patterns. - - * config/ia64/ia64.c (ia64_internal_sched_reorder): Emit stop - bit before asm as needed. - -2001-08-18 Richard Henderson - - * timevar.def (TV_MACH_DEP): New. - * toplev.c (rest_of_compilation): Use it. - * config/ia64/ia64.c (ia64_reorg): Push to TV_SCHED2. - -2001-08-18 Zack Weinberg - - * unwind-dw2.c (execute_stack_op): Add default aborts to - the inner switches to prevent warnings. - -2001-08-18 Richard Henderson - - * timevar.h (struct timevar_time_def): Change element type to float. - (ticks_to_msec, clocks_to_msec): Likewise. - (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Rescale to seconds; use type float. - (get_time): Likewise. - (timevar_print): Adjust zero check and printing to match. - -2001-08-18 Zack Weinberg - - * doc/extend.texi, doc/gcc.texi, doc/install-old.texi, - doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/include/gpl.texi: - Eliminate overfull or underfull hboxes. - -2001-08-18 Zack Weinberg - - * cpperror.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. - -2001-08-18 Zack Weinberg - - * haifa-sched.c: Convert to target hooks. Macros replaced - are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, - MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, - MD_SCHED_FINISH, and HAVE_cycle_display. - * target-def.h (TARGET_SCHED_ADJUST_COST, - TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE, - TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT, - TARGET_SCHED_FINISH, TARGET_SCHED_REORDER, - TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY): - New hook #defines to be overridden. - (TARGET_SCHED): Bring them all together. - (TARGET_INITIALIZER): Update. - * target.h: Don't forward declare struct rtx_def. Use 'rtx' - instead of 'struct rtx_def *' throughout. - (struct sched): New set of hooks for the scheduler. - * Makefile.in (haifa-sched.o): Depend on target.h. - * doc/tm.texi: Document the new scheduler hooks, together in - their own section, instead of scattered around. - Fix a bunch of underfull/overfull hboxes. - - * a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h, - ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h, - sparc.h: Don't define any of the old scheduler macros. - - * a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c, - ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c, - sparc.c: Create hook functions from code extracted from - corresponding target header, or make existing hooks static, as - appropriate. Set the appropriate entries in targetm. - - * alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h, - i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h, - rs6000-protos.h, s390-protos.h, sparc-protos.h: - Remove prototypes for functions which are now static. - - * d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and - related gunk; the Haifa scheduler is now the only choice. - -2001-08-18 Zack Weinberg - - * optabs.h (OTI_flodiv, flodiv_optab): Kill. - * genopinit.c: Put floating point divide insns in sdiv_optab. - * expr.c (expand_expr): Use sdiv_optab, not flodiv_optab. - * config/gofast.h, config/c4x/c4x.h, - config/ia64/hpux_longdouble.h, config/mips/mips.h, - config/pa/long_double.h, config/rs6000/sysv4.h, - config/sparc/sparc.h: Put floating point divide libcalls in sdiv_optab. - * optabs.c (init_optab): Break into new_optab, init_optab, init_optabv. - (init_optabs): Use init_optabv for overflow-trapping optabs. - Don't init flodiv_optab. Give mov_optab, movstrict_optab, and - cmp_optab RTX codes so have_insn_for can find them. - - * optabs.c (expand_simple_binop, expand_simple_unop, - have_insn_for, gen_sub3_insn): New interfaces. - * expr.h: Prototype new functions. - (enum optab_methods): Move here from optabs.h. - - * builtins.c, combine.c, doloop.c, function.c, ifcvt.c, - loop.c, profile.c, simplify-rtx.c, stmt.c, unroll.c: - Use new functions instead of working directly with optabs. - * doloop.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c, - unroll.c: Don't include optabs.h. - * caller-save.c, combine.c, function.c, stmt.c: Just include - insn-codes.h, not optabs.h. - * Makefile.in: Update dependencies. - - * combine.c (make_compound_operation, simplify_comparison): - Fix typos testing for this or that instruction. - -2001-08-18 Herman A.J. ten Brugge - - * mklibgcc.in: Prefer LIB1ASMFUNCS over LIB2_DIVMOD_FUNCS when - generating libgcc.a. - -2001-08-18 Kaveh R. Ghazi - - * except.c (TYPE_HASH): Delete. - - * objc/objc-act.c (HASHFUNCTION): Cast to size_t, not - HOST_WIDE_INT. - - * tree.c (TYPE_HASH): Delete. - - * tree.h (TYPE_HASH): Define. - -2001-08-18 Graham Stott - - * config/mips/mips.md (adddi3_internal_2+1): Remove constraints from - define_split. - (adddi3_internal_2+2): Likewise. - (eh_set_lr_di+1): Likewise. - -2001-08-17 Richard Henderson - - * defaults.h (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, - UNALIGNED_DOUBLE_INT_ASM_OP, ASM_BYTE_OP): Move from ... - * dwarf2asm.c: ... here. - * dwarfout.c: Remove them. - - * varasm.c (assemble_integer): Add align parameter. - (assemble_real, output_constant, output_constructor): Likewise. - * output.h: Update decls. - * dwarf2asm.c, final.c, varasm.c, config/darwin.c, config/nextstep.c, - config/alpha/alpha.c, config/arm/arm.md, config/clipper/clipper.c, - config/m88k/m88k.c, config/mcore/mcore.md, config/mips/mips.h, - config/mips/mips.md, config/pa/pa.c, config/rs6000/rs6000.c, - config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.md: - Update all callers. - - * final.c (end_final): Abort profile block generation if we - haven't layed it out properly. - * output.h (assemble_eh_integer): Remove stale decl. - * varasm.c (assemble_zeros): Tidy; use assemble_integer. - (min_align): New. - (assemble_integer): Handle unaligned data. - (assemble_real): Abort on unaligned data. - (output_constructor): Don't assume ASM_OUTPUT_ALIGN 0 does - anything useful. - (default_dtor_section_asm_out_destructor): Use assemble_align. - (default_named_section_asm_out_constructor): Likewise. - (default_ctor_section_asm_out_constructor): Likewise. - * config/darwin.c (machopic_asm_out_constructor): Likewise. - (machopic_asm_out_destructor): Likewise. - * config/nextstep.c (nextstep_asm_out_constructor): Likewise. - (nextstep_asm_out_destructor): Likewise. - * config/alpha/alpha.c (vms_asm_out_constructor): Likewise. - (vms_asm_out_destructor): Likewise. - -2001-08-17 Richard Henderson - - * config/mips/iris6.h (TARGET_IRIX6): New. - (current_section_name, current_section_flags): New. - (ASM_OUTPUT_ALIGN, ASM_FILE_START, ASM_FILE_END): New. - (MAX_OFILE_ALIGNMENT): New. - (ASM_OUTPUT_ALIGNED_LOCAL): Use bss_section. - * config/mips/mips.c (mips_make_temp_file, temp_filename): Remove. - (copy_file_data): Split out from - (mips_asm_file_end): ... here. - (mips_asm_file_start): Remove extra .section directive. Use - tmpfile instead of mips_make_temp_file. - (mips_unique_section): Use const char * as needed for warnings. - (iris6_asm_named_section_1): Renamed from iris6_asm_named_section; - re-add align parameter. - (iris6_asm_named_section): New. - (iris_section_align_entry_eq, iris_section_align_entry_hash): New. - (iris6_asm_output_align, iris6_section_align_1): New. - (iris6_asm_file_start, iris6_asm_file_end): New. - * config/mips/mips-protos.h: Update decls. - -2001-08-17 Janis Johnson - - * doc/install.texi (Install GCC): Add links to build status pages. - (Specific): Ditto. - (Final install): Ditto; request updates for specific info - -2001-08-17 Neil Booth - - * cpperror.c (print_location): Don't take a file name; use the - line map instead. - (_cpp_begin_message): Similarly. - (cpp_ice, cpp_fatal, cpp_error, cpp_error_with_line, cpp_warning, - cpp_warning_with_line, cpp_pedwarn, cpp_pedwarn_with_line): Update. - (cpp_pedwarn_with_file_and_line): Remove. - * cppfiles.c (stack_include_file): Update; set filename to stdin - here when appropriate. - * cpphash.h (struct cpp_buffer): Remove nominal_fname. - (_cpp_begin_message): Don't take a file name. - * cppinit.c: Add comment. - * cpplex.c: Fix end-of-directive indicator. - * cpplib.c: Don't include intl.h. - (run_directive, do_diagnostic): Update. - (do_line): Update to not use nominal_fname. - (cpp_push_buffer): Don't take a filename. - * cpplib.h (struct ht): Remove. - (cpp_push_buffer): Don't take a filename. - (cpp_pedwarn_with_file_and_line): Remove. - * cppmacro.c (struct cpp_macro): Remove file. - (builtin_macro): Update. - (_cpp_create_definition): Update. - * cppmain.c: Correct comment. - * fix-header.c (read_scan_file): Update. - -2001-08-17 Kazu Hirata - - * sbitmap.c: Fix comment formatting. - * sched-deps.c: Likewise. - * sibcall.c: Likewise. - * simplify-rtx.c: Likewise. - * ssa.c: Likewise. - * ssa-ccp.c: Likewise. - * stor-layout.c: Likewise. - * timevar.c: Likewise. - * toplev.c: Likewise. - * unwind-dw2.c: Likewise. - * unwind-dw2-fde.c: Likewise. - * varasm.c: Likewise. - -2001-08-17 John David Anglin - - * pa.h (RETURN_IN_MEMORY): Return types with a size that is varable - or larger than an integer in memory. - -2001-08-17 Zack Weinberg - - * system.h: Forward-declare struct rtx_def, struct rtvec_def, - and union tree_node. Typedef rtx, rtvec, and tree. Fix comment. - * rtl.h: Don't forward-declare union tree_node here. Don't - typedef rtx or rtvec here. Change all uses of struct rtx_def *, - struct rtvec_def *, or union tree_node * to use rtx, rtvec, - and tree respectively. - * tree.h: Don't forward-declare struct rtx_def here. Don't - typedef tree here. Change all uses of struct rtx_def *, - struct rtvec_def *, or union tree_node * to use rtx, rtvec, - and tree respectively. - -2001-08-17 Richard Henderson - - * config/mips/elf.h, config/mips/elf64.h, config/mips/netbsd.h, - config/mips/openbsd.h: Fix typos last change. - -2001-08-17 Gerald Pfeifer - - * doc/invoke.texi (Optimize Options): The default for - -finline-limit is 600. - -2001-08-17 Richard Henderson - - * varasm.c (text_section): Allow TEXT_SECTION to override the - printing of TEXT_SECTION_ASM_OP. - * dwarf2out.c (TEXT_SECTION_NAME): Rename from TEXT_SECTION. - (DATA_SECTION, BSS_SECTION): Remove. - * dwarfout.c (TEXT_SECTION_NAME, DATA_SECTION_NAME, DATA1_SECTION_NAME, - RODATA_SECTION_NAME, RODATA1_SECTION_NAME, BSS_SECTION_NAME): - Rename from s/_NAME//. - * config/mips/mips.h (TARGET_FILE_SWITCHING): Add !TARGET_MIPS16. - (ASM_DECLARE_FUNCTION_NAME): Move file switching ... - (TEXT_SECTION): ... here. New. - * config/mips/elf.h (TEXT_SECTION): New; no file switching. - * config/mips/elf64.h, config/mips/netbsd.h: Likewise. - * config/mips/openbsd.h: Likewise. - * config/mips/mips.c (mips_asm_file_start): Tidy file switching test. - (mips_asm_file_end): Likewise test. - (mips_output_function_epilogue): Likewise. Switch back to data - section after emitting the function. - - * doc/tm.texi (Sections): Document TEXT_SECTION. - -2001-08-17 Richard Henderson - - * dwarf2out.c (dwarf2out_init): Don't emit .debug_loc label here. - (dwarf2out_finish): Do it here. Emit .debug_loc before .debug_info. - -2001-08-17 Richard Henderson - - * varasm.c (assemble_variable): Don't overalign if DECL_USER_ALIGN. - * crtstuff.c (__CTOR_LIST__, __DTOR_LIST__, __EH_FRAME_BEGIN__, - __JCR_LIST__, __CTOR_END__, __DTOR_END__, __FRAME_END__,__JCR_END__): - Add aligned attribute. - -2001-08-17 Andrew Haley - - * config/sh/sh.md: Add modes to unspecs in first insn to match - those in the second. - - * Makefile.in: Fix collect2 copy for Cygwin. - -Fri Aug 17 15:48:57 CEST 2001 Jan Hubicka - - Install the proper patch. - * function.c (put_var_into_stack): Temporarily clear DECL_RTL. - (assign_params): Avoid setting DECL_RTL to unfinished RTX. - (expand_function_start): Likewise. - * stmt.c (expand_decl): Likewise. - * varasm.c (make_decl_rtx): Likewise. - -Fri Aug 17 15:41:35 CEST 2001 Jan Hubicka - - * final.c: Undo my previous accidental checkin. - * output.h: Likewise. - * tm.texi: Likewise. - -2001-08-16 Richard Henderson - - * varasm.c (named_section_flags): Remove align parameter. - * varasm.c, dwarf2out.c: Update all callers. - * output.h: Update prototypes. - - * target.h (target.asm_out.named_section): Remove align parameter. - * varasm.c, config/a29k/a29k.c, config/alpha/alpha.c, - config/arm/arm.c, config/c4x/c4x.c, config/h8300/h8300.c, - config/i386/i386.c, config/i386/winnt.c, config/m68k/m68k.c, - config/mcore/mcore.c, config/mips/mips.c, config/rs6000/rs6000.c, - config/sh/sh.c, config/sparc/sparc.c: Update implementations to match. - - * varasm.c (in_named_entry_eq, in_named_entry_hash): New. - (get_named_section_flags, set_named_section_flags): New. - (named_section_flags): Use them. - (named_section): Do decl vs section flags check here... - (default_section_type_flags): ... not here. - (init_varasm_once): Create in_named_htab. - (resolve_unique_section): Mark reloc unused. - -2001-08-16 Richard Henderson - - * varasm.c (force_const_mem): Keep pool alignment in bits. - (output_constant_pool): Use assemble_align. - -2001-08-16 Zack Weinberg - - * doc/tm.texi: Remove extra @table command. - -2001-08-16 Zack Weinberg - - * final.c (shorten_branches): Clear the end of the label_align - array only if we made it larger. Break up messy expressions - for clarity. - - * diagnostic.c (internal_error): Check for error recursion - before doing ICE suppression. - - * timevar.c: Timing variables now count in milliseconds. - (init_timevar): Set up ticks_to_msec and clocks_to_msec here. - (get_time): Not here. - (timevar_print): Don't print any timer whose user, cpu, and - wall times are all zero as displayed. - * timevar.h: Update comment aboout units. Make timevar - counters unsigned. - -Thu Aug 16 17:39:45 CEST 2001 Jan Hubicka - - * function.c (put_var_into_stack): Temporarily clear DECL_RTL. - (assign_params): Avoid setting DECL_RTL to unfinished RTX. - (expand_function_start): Likewise. - * stmt.c (expand_decl): Likewise. - * varasm.c (make_decl_rtx): Likewise. - -2001-08-16 Jason Merrill - - * stor-layout.c (layout_decl): Don't set DECL_USER_ALIGN. - (finalize_record_size): Don't set TYPE_USER_ALIGN. - -2001-08-16 Matt Kraai - - * config/i386/i386.c (ix86_init_mmx_sse_builtins): Remove unused - variables. - -2001-08-16 Andreas Jaeger - - * config/s390/s390.c: Include "debug.h" for dwarf2out_do_frame - prototype. - -Wed Aug 15 15:22:52 EDT 2001 John Wehle (john@feith.com) - - * rtl.h (only_sets_cc0_p): New prototype. - * jump.c (sets_cc0_p): Handle INSN. - (only_sets_cc0_p): New function. - * flow.c (merge_blocks_nomove): Use only_sets_cc0_p. - (tidy_fallthru_edge): Likewise. - * integrate.c (copy_insn_list): Likewise. - * unroll.c (unroll_loop): Likewise. - (copy_loop_body): Likewise. - -2001-08-15 Jason Eckhardt - - * config/i960/i960.md (trap): Change "faulteq.t" to "faulte.t". - -Wed Aug 15 14:24:22 CEST 2001 Jan Hubicka - - * predict.c (struct block_info_def): Remove nvisited. - (propagate_freq): Use EDGE_DFS_BACK to detect irreducible regions. - (estimate_bb_frequencies): Call mark_dfs_back_edges. - - * i386.c (ix86_agi_dependant): Lea causes AGI only on the Pentium - (ix86_adjust_cost): Teach scheduler that latency to load operand can - be masked. - -Wed Aug 15 12:41:32 CEST 2001 Jan Hubicka - - * predict.def: Update hitrates. - -2001-08-15 Richard Henderson - - * except.c (TYPE_HASH): Cast to size_t, not HOST_WIDE_INT. - -Tue Aug 14 17:30:59 2001 Jeffrey A Law (law@cygnus.com) - - * flow.c (commit_one_edge_insertion): Don't separate a LOOP_BEG - note from its associated jump. - -2001-08-14 Ulrich Weigand - - * config/s390/linux64.h (CPP_PREDEFINES): Define __s390__ - also on 64-bit s390x targets. - -2001-08-14 Nick Clifton - - * config/arm/arm.c (arm_compute_initial_elimination_offset): New - function. - (arm_expand_prologue): Handled nested functions which take a - variable argument list. - * config/arm/arm.h (ARM_INITIAL_ELIMINATION_OFFSET): Replace - macro with an invocation of - arm_compute_initial_elimination_offset. - * config/arm/arm-protos.h: Prototype - arm_compute_initial_elimination_offset. - -2001-08-14 Gerald Pfeifer - - * doc/install.texi (Specific, avr): Fix markup. - (Specific, c4x): Ditto. - -2001-08-14 Matt Kraai - - * predict.c (dump_prediction): Change `bool' parameter to `int'. - -2001-08-14 Gabriel Dos Reis - - * Makefile.in (OBJS): Add rtl-error.o - (rtl-error.o): New rule. - (diagnostic.o): Adjust dependency. - diagnostic.c (file_and_line_for_asm, diagnostic_for_asm, - error_for_asm, _fatal_insn, _fatal_insn_not_found, - warning_for_asm): Move to... - rtl-error.c: ...here. New file. - -2001-08-14 Richard Henderson - - * dwarf2out.c (dwarf2out_frame_finish): Never emit .eh_frame - if USING_SJLJ_EXCEPTIONS. - -2001-08-14 Steve Ellcey - - * tlink.c (scan_linker_output): Check string for unsatisfied in - addition to undefined and unresolved. - -2001-08-14 Graham Stott - - * libgcc2.c (*): Replace EH_FRAME_SECTION with - EH_FRAME_SECTION_NAME. - -Tue Aug 14 14:57:07 CEST 2001 Jan Hubicka - - * genattrtab.c (simplify_test_exp_in_temp): New function. - (simplify_test_exp): Avoid explicit use of temporary obstack. - (simplify_cond, insert_right_side, evaluate_eq_attr, - simplify_and_tree, simplify_or_tree, eliminate_known_true): - Use simplify_test_exp_in_temp. - (optimize_attrs): Iterate until expression stabilizes. - -2001-08-13 Ulrich Weigand : - - * glimits.h: Remove the __LONG_MAX__ special case for s390x. - * config/s390/linux64.h: Define __LONG_MAX__ in CPP_PREDEFINES. - -2001-08-13 Richard Henderson - - * config/arm/unknown-elf.h (CTOR_LIST_BEGIN, CTOR_LIST_END): Remove. - (DTOR_LIST_BEGIN, DTOR_LIST_END): Remove. - * config/arm/conix-elf.h: Likewise. - -2001-08-13 Geoffrey Keating - - * config/svr4.h (LINK_SPEC): Don't do -Wl, here, it is done - in gcc.c. - * config/rs6000/sysv4.h (LINK_SPEC): Likewise. - - * gcse.c (hash_scan_set): Expressions that are set as part of - jump instructions are not available. - -2001-08-13 Ulrich Weigand - - * config/s390/s390.c (print_operand, s390_function_prologue, - s390_va_start): Fixed HOST_WIDE_INT type mismatch. - -2001-08-13 Richard Henderson - - * config/rs6000/xcoff.h (EH_FRAME_IN_DATA_SECTION): New. - * defaults.h (EH_FRAME_SECTION_NAME): Respect it. - * doc/tm.texi (Exception Region Output): Document it. - -2001-08-13 Geoffrey Keating - - * config/rs6000/sysv4.h (PREFERRED_DEBUGGING_TYPE): Use - DWARF2 instead of stabs by default. - -2001-08-13 David Edelsohn - - * config/rs6000/rs6000.c: Include optabs.h. - -2001-08-13 David Edelsohn - - * config/rs6000/eabi.asm: Define 64-bit versions of FPR - save/restore routines. - * ginclude/ppc-asm.h: Define 64-bit FUNC_* macros. - -2001-08-13 Andreas Jaeger - - * gcc.c (init_spec): Revert last patch by Theodore Papadopoulo, - the english is correct. - -2001-08-13 Zack Weinberg - - * expr.h: Split out optab- and libfunc-related code to... - * optabs.h, libfuncs.h: ... these new headers. - - * Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h. - (OPTABS_H): New. - (various .o rules): Add $(OPTABS_H) and/or libfuncs.h to - dependencies. - * mkconfig.sh: Don't include insn-codes.h from config.h. - - * reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether - enum insn_code is available. Move reload_in_optab and - reload_out_optab array declarations to optabs.h. - * regmove.c (gen_add3_insn): Move to optabs.c, export from - there, prototype in expr.h. - * gencodes.c: Cleanup: zap global variables, don't use - printf where puts will do, don't bother defining MAX_INSN_CODE - which nothing uses, let CODE_FOR_nothing get its value implicitly. - - * genemit.c, genopinit.c: Include optabs.h in generated file. - * genoutput.c: Include insn-codes.h in generated file. - * builtins.c, caller-save.c, combine.c, doloop.c, explow.c, - expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c, - reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c, - config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c, - config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c, - config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c: - Include optabs.h. - * builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c, - optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c, - config/m88k/m88k.c, config/sparc/sparc.c: - Include libfuncs.h. - * reload.c: Include expr.h and optabs.h before reload.h. - * config/alpha/alpha.c: Include tree.h before reload.h. - * config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h, - and reload.h in that order. - * config/sparc/sparc.c: Include debug.h. - * recog.c: Include insn-codes.h. - -2001-08-13 Andreas Jaeger - - * config.gcc: Use t-slibgcc-elf to build shared libgcc_s on - s390*linux. - -2000-08-13 Theodore Papadopoulo - - * dwarf2out.c (output_cfa_loc): Fix typo in comment. - * gcc.c (init_spec): Fix typo in comment. - * varasm.c (data_section): Fix typo in comment. - -Mon Aug 13 02:27:39 CEST 2001 Jan Hubicka - - * predict.c (dump_prediction): New argument "USED". - (combine_predictions_for_insn): Determine the used heuristics, - output the case no heuristic applied. - * predict.def (PRED_DS_THEORY, PRED_NO_HEURISTIC): New. - -2001-08-13 Andreas Jaeger - - * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Don't capitalize - register %rip. - -2001-08-13 Kazu Hirata - - * jump.c: Fix formatting. - -2001-08-13 Kazu Hirata - - * config/h8300/h8300.md (zero_extendqihi2): Correct the insn - length. - -2001-08-12 Geoffrey Keating - - * loop.c (check_dbra_loop): Use condjump_label to compute - jump_label. - - * rtl.h: Move prototypes of rtx_alloc and rtvec_alloc around - to better document the files they're in. - -2001-08-12 Zack Weinberg - - * recog.h (struct insn_operand_data): Shrink 'mode' field - to 16 bits. - -2001-08-12 Kazu Hirata - - * gcc.c: Fix comment formatting. - * gccspec.c: Likewise. - * gcov.c: Likewise. - * gcse.c: Likewise. - * genemit.c: Likewise. - * gengenrtl.c: Likewise. - * genrecog.c: Likewise. - * gensupport.c: Likewise. - * ggc-page.c: Likewise. - * global.c: Likewise. - * graph.c: Likewise. - * ifcvt.c: Likewise. - * integrate.c: Likewise. - * lcm.c: Likewise. - * libgcc2.c: Likewise. - * loop.c: Likewise. - * mbchar.c: Likewise. - * optabs.c: Likewise. - * predict.c: Likewise. - * prefix.c: Likewise. - * profile.c: Likewise. - * protoize.c: Likewise. - * real.c: Likewise. - * recog.c: Likewise. - * regclass.c: Likewise. - * regmove.c: Likewise. - * reg-stack.c: Likewise. - * reload1.c: Likewise. - * resource.c: Likewise. - * rtlanal.c: Likewise. - * rtl.c: Likewise. - -2001-08-12 Kazu Hirata - - * doc/tm.texi (ENCODE_SECTION_INFO): Add documentation on how - a tree representing a constant is passed to the macro. - -2001-08-12 Richard Henderson - - * config/rs6000/rs6000.c (rs6000_elf_asm_out_constructor): New. - (rs6000_elf_asm_out_destructor): New. - * config/rs6000/sysv4.h (CTORS_SECTION_ASM_OP): Remove. - (DTORS_SECTION_ASM_OP): Remove. - (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. - (ASM_OUTPUT_INT): Don't hack TARGET_RELOCATABLE for constructors. - -2001-08-12 David Edelsohn - - Revert: - 2001-08-02 Rainer Orth - * gcc.c (set_collect_gcc_options): New function, split out from - main. - Ignore elided switches. - (do_spec_1): Invoke before executing command. - (set_input): Export. - Move declaration ... - * gcc.h (set_input): ... here. - * config/alpha/osf.h (ASM_FINAL_SPEC): Use %U.s to refer to input - file. - -2001-08-12 Richard Henderson - - * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Fix - thinko wrt TARGET_RELOCATABLE. - -2001-08-12 Neil Booth - - * fix-header.c (cb_file_change): Update prototype. - -2001-08-11 Zack Weinberg - - * toplev.c (set_float_handler): Make static. - * toplev.h: Don't prototype set_float_handler. - - * simplify-rtx.c: Don't include setjmp.h. - (simplify_unary_real, simplify_binary_real, simplify_binary_is2orm1): - New functions. - (simplify_unary_operation, simplify_binary_operation): Use them, - via do_float_handler. - - * fold-const.c: Don't include setjmp.h. - (exact_real_inverse_1): New function. - (exact_real_inverse): Use it, via do_float_handler. - - * varasm.c: Don't include setjmp.h. - (assemble_real_1): New function. - (assemble_real): Use it, via do_float_handler. - Call internal_error if we get a trap here. - - * c-parse.in, cse.c, cselib.c, config/i386/i386.c, - config/pj/pj.c, config/s390/s390.c: Don't include setjmp.h. - -2001-08-11 Zack Weinberg - - * defaults.h: Define PREFERRED_STACK_BOUNDARY to - STACK_BOUNDARY if not already defined. - - * calls.c, function.c, reload1.c, explow.c: Don't default - PREFERRED_STACK_BOUNDARY. Remove all #if/#ifdef on - PREFERRRED_STACK_BOUNDARY and/or STACK_BOUNDARY. - - * explow.c (allocate_dynamic_stack_space): Change unsafe #if - to run-time test. - - * doc/tm.texi: Document that STACK_BOUNDARY is required; - clarify difference between it and PREFERRED_STACK_BOUNDARY. - -2001-08-11 Neil Booth - - * cppmacro.c (enter_macro_context): Push macro expansions even - if empty. - -2001-08-11 Franz Sirl - - * config/rs6000/rs6000.c: Include integrate.h to silence warning. - (rs6000_elf_section_type_flags): Actually return a value. - -2001-08-11 Ulrich Weigand - - * s390.c, s390.h, s390.md, s390-protos.h, linux.h, t-linux: - Clean up code: add missing comments and prototypes, fix warnings, - remove obsolete code, fix spacing to conform to coding style. - -2001-08-11 Ulrich Weigand - - * config/s390/s390.c (targetm): Define TARGET_ASM_OPEN_PAREN - and TARGET_ASM_CLOSE_PAREN. - (regclass_map): CC register belongs to class NO_REGS. - (legitimize_pic_address): Don't generate unnecessary moves - (to avoid confusing loop optimization). - (check_and_change_labels): Replace jump_long by indirect_jump. - (s390_final_chunkify): Don't start a new literal pool on section - switch in 64-bit code. - (s390_va_start, s390_va_arg): Fixed incorrect sizes for 64-bit. - - * config/s390/s390.h (TARGET_SWITCHES): Renamed debug_arg to debug. - (MAX_BITS_PER_WORD, MAX_LONG_TYPE_SIZE): Set to 64 (for 64-bit). - (HARD_REGNO_MODE_OK, RETURN_IN_MEMORY): Support complex integer - modes correctly. - (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Remove CC_REGS. - (EH_RETURN_HANDLER_RTX): Fixed incorrect offset for 64-bit. - (CONST_COSTS): Fixed incorrect costs. - - * config/s390/s390.md (fixuns_trunc[sd]f[sd]i2, udivsi3, umodsi3): - Use emit_jump instead of emit_jump_insn (gen_jump). - (divsi3, modsi3): Clobber low word of divmoddisi3 before shifting - (to avoid confusing flow analysis). - (tablejump, tablejump1, tablejump2): Removed. Replaced by casesi. - (casesi, casesi_jump): New. - (jump_long): Removed. Functionality merged into indirect_jump. - (indirect_jump): Accept address_operand, not just register_operand. - (cjump_long, icjump_long): Use same logic as indirect_jump. - (builtin_setjmp_setup, builtin_setjmp_receiver, builtin_longjmp): - Fixed broken setjmp/longjmp handling. - (do_builtin_setjmp_setup): Removed. - - * config/s390/linux.h (ASM_OUTPUT_DOUBLE_INT): Work around - broken GNU as versions that don't accept .quad with large - negative values. Use hexadecimal output instead. - (ASM_OUTPUT_ADDR_DIFF_ELT): Adapt to new casesi insn. - (ASM_OPEN_PAREN, ASM_CLOSE_PAREN, FUNCTION_PROLOGUE, - FUNCTION_EPILOGUE): Removed. Now in targetm. - - * config/s390/linux64.h (CALL_USED_REGISTERS): Add CC register. - - * config/s390/fixdfdi.h: Add missing copyright statement. - Fix type conflicts on 64-bit. Add missing SFmode routines. - - * s390.c, s390.h, s390.md, linux.h, linux64.h: Fixed incorrect - email address. - -2001-08-11 Richard Henderson - - * rtl.h (REG_EH_RETHROW): Remove. - * rtl.c (reg_note_name): Update. - * combine.c (distribute_notes): Don't check for it. - -2001-08-11 Richard Henderson - - * combine.c (distribute_notes): Place REG_SETJMP. - -2001-08-11 Richard Henderson - - * doc/extend.texi (Arrays and pointers implementation): Discourage - relying on sign-extension of pointers. - -2001-08-11 H.J. Lu - - * config/mips/linux.h (EXTRA_SECTIONS): Remove in_ctors and - in_dtors. - (EXTRA_SECTION_FUNCTIONS): Remove DTORS_SECTION_ASM_OP and - RDATA_SECTION_ASM_OP. - -2001-08-11 Gerald Pfeifer - - * doc/install.texi (Specific, c4x): Fix cross-reference to the - main manual to work both for info and HTML versions. - -2001-08-11 Neil Booth - Matt Kraai - - * cpphash.c (_cpp_destroy_hashtable): Use ht_destroy. - * cpphash.h (CPP_IN_SYSTEM_HEADER): Fix. - (struct cpp_pool): New member first. - * cppinit.c (append_include_chain): Plug memory leaks. - * cpplib.c (cpp_register_pragma, cpp_register_pragma_space): - Allocate pragma structures from the (aligned) macro pool to - avoid leaking memory. - * cpplex.c (_cpp_init_pool, _cpp_free_pool): Use pool->first - so we don't leak memory. - * hashtable.c (ht_destroy): New. - * hashtable.h (ht_destroy): New. - -2001-08-11 Neil Booth - Franz Sirl - - * c-lex.c (map): Make const. - (cb_file_change): Update for callback passing a line map. - Don't assume we have a previous map. Remove sanity check - about popping too many files. - * cpperror.c (print_location): Make map const. - * cppfiles.c (stack_include_file): Update; line maps now hold sysp. - (cpp_make_system_header): Similarly. - (search_from): Similarly. - (_cpp_execute_include): Don't remember where we came from. - * cpphash.h (struct cpp_buffer): Remove return_to_line, sysp. - (struct cpp_reader): Make map const. - (CPP_IN_SYSTEM_HEADER, _cpp_do_file_change): Update. - * cpplib.c (do_line): Update; line maps now hold sysp. - (cpp_push_buffer): Similarly. - (_cpp_do_file_change): Similarly; callback with map instead. - (cpp_get_line_maps): Constify return value. - (_cpp_pop_buffer): Update. - * cpplib.h (struct cpp_file_change): Remove. - (struct cpp_callbacks): Update. - (cpp_get_line_maps): Constify return value. - * cppmacro.c (_cpp_create_definition): Update. - * cppmain.c (struct printer): Constify map. - (maybe_print_line): Similarly. - (print_line): Similarly. Deduce flags 1 and 2 here. - (cb_file_change): Update. - * line-map.c (free_line_maps): Warn regardless. - (add_line_map): Return pointer to const. When passed NULL to_file - with LC_LEAVE, use the obvious values for the return point so the - caller doesn't have to figure them out. - (lookup_line): Return pointer to const. - (print_containing_files): Take pointer to const. - * line-map.h (struct line_map): New members reason, sysp. - (add_line_map): Return pointer to const. - (lookup_line): Similarly. - (print_containing_files): Take pointer to const. - -2001-08-10 Roman Zippel - Richard Henderson - - * regmove.c (regmove_optimize): Avoid setting a register twice in - a parallel set. - -2001-08-10 Richard Henderson - - * doc/extend.texi (Arrays and pointers implementation): Document - behavior of pointer/integer conversion. - -2001-08-10 Ulrich Weigand - - * glimits.h (__LONG_MAX__): Add s390x as 64-bit architecture. - -2001-08-10 Richard Henderson - - * doc/extend.texi (C Implementation): New chapter. - * doc/gcc.texi (Top): Link it in. - -2001-08-10 Andrew Cagney - - * doc/install.texi (Specific): Fix CVS merge botch. - -2001-08-10 Richard Henderson - - * config/m68k/m68k.c (m68k_svr3_asm_out_constructor): Protect with - ifdef CTOR_LIST_BEGIN instead of INIT_SECTION_ASM_OP. - -2001-08-10 Zack Weinberg - - * calls.c, function.c: Always define PREFERRED_STACK_BOUNDARY - if not already defined. Remove all #ifdefs on STACK_BOUNDARY; - this macro is now required. - - * cselib.c (cselib_process_insn), flow.c (propagate_block), - loop.c (find_and_verify_loops), reload.c (reload): Check - for rtx code of CALL_INSN, not CALL, when deciding if we - need to check for REG_SETJMP note. - - * gcse.c (compute_hash_table, compute_store_table): Update - the #ifdef NON_SAVING_SETJMP code to the new REG_SETJMP - logic. - - * config/avr/avr.c: Fix typo. - * config/convex/convex.c (expand_movstr): Use adjust_address. - * config/dsp16xx/dsp16xx.c: Define dsp16xx_compare_gen - variable. - * config/dsp16xx/dsp16xx.md: Correct calls to replace_equiv_address. - * config/elxsi/elxsi.c: Include tree.h, expr.h, regs.h, and flags.h. - Fix typo. - * config/elxsi/elxsi.h: Don't define Rmode (typo for Pmode?) - Do define STACK_BOUNDARY. - * config/i370/i370.c: Include expr.h. - * config/i860/sysv3.h, config/i860/sysv4.h, config/m32r/m32r.h, - config/pa/som.h, config/v850/v850.h: Take in_ctors and - in_dtors out of EXTRA_SECTIONS; take CTORS_SECTION_FUNCTION - and DTORS_SECTION_FUNCTION out of EXTRA_SECTION_FUNCTIONS. - * config/m88k/m88k.c: Include c-tree.h after expr.h. - * config/pdp11/pdp11.c: Include expr.h and toplev.h. - * config/romp/romp.c: Include expr.h after tree.h. - Include toplev.h. - (output_fpop): Use xmalloc, not oballoc. - * config/we32k/we32k.c: Include expr.h. - -2001-08-10 Kazu Hirata - - * config/h8300/h8300.h: Fix formatting. - -2001-08-08 Jason Merrill - - * c-common.h (RETURN_NULLIFIED_P): Lose. - * c-semantics.c (genrtl_return_stmt): Don't check it. - -2001-08-10 Richard Sandiford - - * config/mips/mips.c (mips_add_large_offset_to_sp): New function. - (mips_annotate_frame_insn): New function. - (mips_emit_frame_related_store): New function. - (save_restore_insns): Don't mark instructions that set up the base - registers as frame-related. Add REG_FRAME_RELATED_EXPR notes to - the store instructions instead. - (mips_expand_prologue): If the stack size is moved into a temporary - register, do not mark that move as frame-related. Add a - REG_FRAME_RELATED_EXPR note to the stack adjustment instruction. - -2001-08-10 Richard Sandiford - - * config/mips/mips.c (save_restore_insns): Don't mark the RA's - stack slot as unchanging if current_function_calls_eh_return. - -2001-08-10 Richard Sandiford - - * config/mips/mips.md (reload_incc): Use HARD_REGNO_NREGS to - access the second half of the TFmode scratch operand. - -2001-08-10 Anthony Green - - * java/class.c (emit_register_classes): Conditionalize code on - JCR_SECTION_NAME. - -2001-08-10 Gerald Pfeifer - - * doc/install.texi (Specific, avr): Fix cross-reference to the - main manual to work both for info and HTML versions. - -2001-08-09 John David Anglin - - * stmt.c (expand_null_return_1): Remove code to generate simple returns - and "use_goto" argument. - (expand_null_return, expand_value_return): Update all callers. - * function.c (expand_function_end): Remove code to generate simple - return. - * config/vax/vax.md (epilogue): New expander for function return. - * doc/md.texi (epilogue): Remove "if defined". - -2001-08-09 Zack Weinberg - - * Makefile.in: Partially revert my previous change: - put -DGENERATOR_FILE back in HOST_CFLAGS, take it out - of the hashtab.o and safe-ctype.o rules. - -2001-08-09 Richard Henderson - - * Makefile.in (MAYBE_USE_COLLECT2): Remove; purge all uses. - (USE_COLLECT2): Remove duplicate definition. - * config.gcc (a29k-udi, a29k-wrs-vxworks) [tm_file]: Remove a29k/udi.h. - (use_collect2): Remove dead code. - * configure.in (use_collect2): Remove will_use_collect2 and - maybe_use_collect2; add USE_COLLECT2 to host_xm_defines and xm_defines. - * configure: Rebuild. - - * target.h (targetm.asm_out.constructor): New. - (targetm.asm_out.destructor, targetm.have_ctors_dtors): New. - * target-def.h (TARGET_ASM_CONSTRUCTOR): New. - (TARGET_ASM_DESTRUCTOR, TARGET_HAVE_CTORS_DTORS): New. - * varasm.c (in_ctors, in_dtors): New. - (assemble_constructor, assemble_destructor): Remove. - (default_stabs_asm_out_destructor): New. - (default_named_section_asm_out_destructor): New. - (dtors_section, default_dtor_section_asm_out_destructor): New. - (default_stabs_asm_out_constructor): New. - (default_named_section_asm_out_constructor): New. - (ctors_section, default_ctor_section_asm_out_constructor): New. - * output.h: Update declarations. - * c-decl.c (c_expand_body): Use target hooks instead of - assemble_constructor and assemble_destructor. - * profile.c (output_func_start_profiler): Likewise. - * objc/objc-act.c (finish_objc): Likewise. - (build_module_descriptor): Tidy. Set TREE_PUBLIC properly - for the constructor. - * objc/Make-lang.in (objc-act.o): Depend on TARGET_H. - - * crtstuff.c (CTORS_SECTION_ASM_OP): Don't define. - (DTORS_SECTION_ASM_OP): Likewise. - (__CTOR_LIST__): Use attribute section when possible. - (__DTOR_LIST__, __CTOR_END__, __DTOR_END__): Likewise. - - * defaults.h (EH_FRAME_SECTION_NAME): Don't depend on - ASM_OUTPUT_CONSTRUCTOR. - - * config/darwin.c (machopic_asm_out_constructor): New. - (machopic_asm_out_destructor): New. - * config/darwin-protos.h: Update declarations. - * config/darwin.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. - * config/nextstep.c (nextstep_asm_out_constructor): New. - (nextstep_asm_out_destructor): New. - * config/nextstep.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. - * config/nextstep21.h: Undef TARGET_ASM_*STRUCTOR instead of - ASM_OUTPUT_*STRUCTOR. - * config/i386/aix386ng.h: Likewise. - - * config/elfos.h (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Remove. - (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): No ctors/dtors. - (CTORS_SECTION_FUNCTION, DTORS_SECTION_FUNCTION): Remove. - (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Remove. - * config/lynx.h: Likewise. - * config/netware.h: Likewise. - * config/psos.h: Likewise. - * config/alpha/alpha-interix.h: Likewise. - * config/alpha/elf.h: Likewise. - * config/arc/arc.h: Likewise. - * config/arm/aof.h: Likewise. - * config/arm/coff.h: Likewise. - * config/arm/elf.h: Likewise. - * config/c4x/c4x.h: Likewise. - * config/h8300/h8300.h: Likewise. - * config/i386/cygwin.h: Likewise. - * config/i386/djgpp.h: Likewise. - * config/i386/i386-coff.h: Likewise. - * config/i386/i386-interix.h: Likewise. - * config/i386/sco5.h: Likewise. - * config/i386/vsta.h: Likewise. - * config/i386/win32.h: Likewise. - * config/i960/i960-coff.h: Likewise. - * config/ia64/sysv4.h: Likewise. - * config/m68hc11/m68hc11.h: Likewise. - * config/m68k/coff.h: Likewise. - * config/m68k/mot3300.h: Likewise. - * config/m88k/m88k.h: Likewise. - * config/mcore/mcore-pe.h: Likewise. - * config/mcore/mcore.h: Likewise. - * config/mips/elf.h: Likewise. - * config/mips/elf64.h: Likewise. - * config/mips/iris6.h: Likewise. - * config/pa/pa64-hpux.h: Likewise. - * config/rs6000/sysv4.h: Likewise. - * config/sh/sh.h: Likewise. - * config/sparc/litecoff.h: Likewise. - - * config/svr3.h (CTORS_SECTION_ASM_OP): Remove. - (CTORS_SECTION_FUNCTION, DTORS_SECTION_FUNCTION): Remove. - (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Remove. - * config/1750a/1750a.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - * config/a29k/a29k.c: Move include of tree.h. - * config/a29k/udi.h: Delete file. - * config/alpha/alpha.c (vms_asm_out_constructor): New. - (vms_asm_out_destructor): New. - * config/alpha/vms.h (EXTRA_SECTIONS): No ctors/dtors. - (EXTRA_SECTION_FUNCTIONS): Likewise. - (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. - * config/c4x/c4x.c: Move include of tree.h. - * config/clipper/clipper.c (clix_asm_out_constructor): New. - (clix_asm_out_destructor): New. - * config/clipper/clix.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. - * config/i386/aix386.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR): New. - * config/i386/i386.c (ix86_svr3_asm_out_constructor): New. - (sco_asm_out_constructor): New. - * config/i386/sco5.h (TARGET_ASM_CONSTRUCTOR): New. - * config/i386/svr3gas.h: Remove stack grows up code. - Remove code duplicated from i386/sysv3.h. - (TARGET_ASM_CONSTRUCTOR): New. - (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Remove. - (DTORS_SECTION_FUNCTION, CTORS_SECTION_FUNCTION): Remove. - * config/i386/sysv3.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR): New. - * config/m68hc11/m68hc11.c (m68hc11_asm_out_constructor): New. - (m68hc11_asm_out_destructor): New. - * config/m68hc11/m68hc11.h (TARGET_ASM_CONSTRUCTOR): New. - (TARGET_ASM_DESTRUCTOR): New. - * config/m68k/auxgas.h: Don't undef ASM_OUTPUT_*STRUCTOR. - * config/m68k/dpx2.h: Properly undef all the bits inherited from - config/svr3.h pertaining to section manipulation. - * config/m68k/dpx2g.h: Remove #if 0 code. - * config/m68k/m68k.c (m68k_svr3_asm_out_constructor): New. - * config/m68k/tower-as.h (ASM_OUTPUT_SOURCE_LINE): Fix typo. - (ASM_OUTPUT_CONSTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR): New. - * config/m88k/m88k.c (m88k_layout_frame): Don't use assign_stack_local. - (m88k_svr3_asm_out_constructor): New. - (m88k_svr3_asm_out_destructor): New. - * config/m88k/sysv3.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. - * config/mips/mips.h: Remove #if 0 ASM_OUTPUT_*STRUCTOR code. - * config/rs6000/aix.h: Likewise. - * config/mips/rtems64.h: Don't undef removed constructor related bits. - * config/mips/vxworks.h: Likewise. - * config/rs6000/lynx.h: Likewise. - * config/sh/elf.h: Likewise. - * config/rs6000/sysv4.h (CTORS_SECTION_ASM_OP): New. - (DTORS_SECTION_ASM_OP): New. - * config/sparc/linux64.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - * config/sparc/sol2-sld-64.h: Likewise. - * config/vax/vax.c (vms_asm_out_constructor): New. - (vms_asm_out_destructor): New. - * config/vax/vms.h (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): New. - - * doc/tm.texi (@node Initialization): Update. - -2001-08-09 Richard Henderson - - * config/alpha/crtbegin.asm (__JCR_LIST__): New. - (__do_global_dtors_aux): Use gp-relative static data to avoid - one dynamic relocation. - (__do_frame_setup): Register Java classes. - * config/alpha/crtend.asm (__JCR_END__): New. - -2001-08-09 Zack Weinberg - - * Makefile.in (HOST_CFLAGS): Take out -DGENERATOR_FILE. - (CONFIG_H, TCONFIG_H, TM_P_H): Update. - (GEN, STAGESTUFF): Add new files. - (insn-constants.h, s-constants, tm-preds.h, s-preds, - genconstants, genpreds, genconstants.o, genpreds.o): New rules. - (hashtab.o, safe-ctype.o): Add -DGENERATOR_FILE. - * mkconfig.sh: Include tm-preds.h in tm_p.h; insn-constants.h - as well as insn-codes.h and insn-flags.h in config.h; and no - extra headers in tconfig.h and hconfig.h. - - * gencodes.c: Eliminate code to generate predicate declarations - or #defines for md-file constants. - * genconstants.c, genpreds.c: New files. - - * i386.md: Re-order guard expressions such that TARGET_64BIT - comes first, when this permits better optimization. Add - TARGET_64BIT to more x86-64 patterns. Add comment explaining - why this is desirable. - -2001-08-09 Jakub Jelinek - - * config/ia64/fde-glibc.c: Require glibc 2.2.4+ headers. - (find_fde_for_dso): Remove. - (_Unwind_IteratePhdrCallback): New. - (_Unwind_FindTableEntry): Use dl_iterate_phdr. - * config/ia64/crtbegin.asm (__ia64_app_header): Remove. - -Thu Aug 9 11:30:20 2001 Richard Kenner - - * expr.c (emit_single_push_insn): Only exists ifdef PUSH_ROUNDING. - (move_by_pieces_1): If would call it, abort if no PUSH_ROUNDING. - -2001-08-09 Graham Stott - - * sched-vis.c (MAX_VISUAL_NO_UNIT): Define. - (vis_no_unit): Use it. - (visualize_no_unit): Add the insn only if room exists. - -2001-08-09 Graham Stott - - * predict.c (estimate_probability): Replace magic numbers with - appropriate enumeration. - -2001-08-09 Graham Stott - - * cppexp.c (EXTRACT_PRIO): Uppercase and parenthsize macro - parameter. - (EXTRACT_FLAGS): Likewise. - -2001-08-09 Aldy Hernandez - - * config/mips/mips.c (mips_legitimate_address_p): Check for - CONST_INT in last patch. - -2001-08-08 Anthony Green - - * java/class.c (emit_register_classes): Use assemble_jcr if - possible. Keep the original mechanism as a fallback. - * defaults.h (JCR_SECTION_NAME): Define if we have named section - and weak symbol support. - * crtstuff.c (__JCR_LIST__): Define. - (__JCR_END__): Define. - (_Jv_RegiserClasses): Define weak symbol if possible. - (__do_global_ctors_aux): Register classes for ELF targets with - weak symbol support. - -2001-08-08 Kazu Hirata - - * dbxout.c: Fix comment formatting. - * dependence.c: Likewise. - * df.c: Likewise. - * diagnostic.c: Likewise. - * dominance.c: Likewise. - * doprint.c: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * emit-rtl.c: Likewise. - * except.c: Likewise. - * explow.c: Likewise. - * expmed.c: Likewise. - * expr.c: Likewise. - * flow.c: Likewise. - * fold-const.c: Likewise. - * function.c: Likewise. - -2001-08-08 Franz Sirl - - * global.c (retry_global_alloc): Avoid shadowing allocno. - -2001-08-08 Mark Mitchell - - * except.c (remove_fixup_regions): Fix typo. - -2001-08-08 Jan van Male - - * emit-rtl.c (adjust_address, adjust_address_nv): Cast offset to - unsigned HOST_WIDE_INT to avoid warning. - * final.c (final): Cast INSN_UID to unsigned to avoid warning. - * flow.c (set_block_for_new_insns): Likewise. - -Wed Aug 8 21:08:14 CEST 2001 Jan Hubicka - - * sibcall.c (return_value_pseudo): New static variable. - (skip_copy_to_return_value): Handle return_value_pseudo. - (call_ends_block_p): Ensure that return_value_pseudo is set. - (optimize_sibling_and_tail_recursive_call): Discover the - load of pseudo return value in alternate exit block. - -Wed Aug 8 21:06:43 CEST 2001 Jan Hubicka - - * calls.c (ECF_ALWAYS_RETURN): New constant. - (emit_call_1): Add REG_ALWAYS_RETURN note if needed. - (expand_call): Use LCF_ALWAYS_RETURN for __bb_fork_func. - (emit_library_call_value_1): Handle LCT_ALWAYS_RETRUN. - * flow.c (need_fake_edge_p): Handle REG_ALWAYS_RETURN. - * rtl.c (reg_note_name): New name. - * rtl.h (enum reg_note): Add REG_ALWAYS_RETURN. - -2001-08-07 Aldy Hernandez - - * config/mips/mips.c (mips_legitimate_address_p): Limit "la" addresses. - -2001-08-08 Jason Merrill - - * alias.c (get_alias_set): Return a previously calculated - alias set for a VAR_DECL. - * function.c (gen_mem_addressof): Calculate the alias set before - touching the RTL. - -Wed Aug 8 18:44:37 CEST 2001 Jan Hubicka - - * predict.def: Set hitrates according our experimental run. - -Wed Aug 8 18:01:58 CEST 2001 Jan Hubicka - - * i386.h (HARD_REGNO_RENAME_OK): New macro. - -2001-08-08 H.J. Lu - - * config/mips/mips.c (mips_unique_section): New. Copied from - config/mips/elf.h. - - * config/mips/mips-protos.h (mips_unique_section): New - prototype. - - * config/mips/elf.h (UNIQUE_SECTION): Use mips_unique_section. - - * config/mips/little.h: New. Generic little endian mips - targets. Only mips*-*-linux* is converted to use it so far. - - * config/mips/linux.h: Include "gofast.h" and "mips/mips.h". - (WCHAR_TYPE): Defined - (WCHAR_TYPE_SIZE): Likewise. - (INIT_SUBTARGET_OPTABS): Likewise. - (BSS_SECTION_ASM_OP): Likewise. - (SBSS_SECTION_ASM_OP): Likewise. - (ASM_OUTPUT_ALIGNED_BSS): Likewise. - (ASM_DECLARE_OBJECT_NAME): Likewise. - (UNIQUE_SECTION): Likewise. - (EXTRA_SECTIONS): Likewise. - (ASM_OUTPUT_CONSTRUCTOR): Likewise. - (ASM_OUTPUT_DESTRUCTOR): Likewise. - (ASM_OUTPUT_DEF): Likewise. - (HANDLE_SYSV_PRAGMA): Removed. - (NO_IMPLICIT_EXTERN_C): Likewise. - (TARGET_MEM_FUNCTIONS): Likewise. - (STARTFILE_SPEC): Likewise. - (ENDFILE_SPEC): Likewise. - (LIB_SPEC): Likewise. - (INVOKE__main): Likewise. - (CTOR_LIST_BEGIN): Likewise. - (CTOR_LIST_END): Likewise. - (DTOR_LIST_BEGIN): Likewise. - (DTOR_LIST_END): Likewise. - (SET_ASM_OP): Likewise. - (ASM_OUTPUT_SOURCE_LINE): Likewise. - (ASM_OUTPUT_DEF): Likewise. - (ASM_OUTPUT_IDENT): Likewise. - - * config/mips/mips.h (ASM_SPEC): Undefine before define. - (CPLUSPLUS_CPP_SPEC): Likewise. - (ASM_APP_ON) Redefine only if not defined. - (ASM_APP_OFF): Likewise. - (ASM_OUTPUT_SOURCE_LINE): Likewise. - (ASM_OUTPUT_IDENT): Likewise. - - * config.gcc: Update tm_file for Linux/mips. - -2001-08-08 Bernd Schmidt - - * cselib.c (cselib_record_sets): If insn is predicated, turn - sources into IF_THEN_ELSEs. - - * config/ia64/ia64.md (cond_opsi2_internal, cond_opsi2_internal_b): - Turn into define_insn_and_split. - - * sched-deps.c: Include "cselib.h". - (add_insn_mem_dependence, sched_analyze_1, sched_analyze_2): - Use cselib to turn memory addresses into VALUEs. - (sched_analyze): Call cselib_init/cselib_finish if necessary. - * sched-int.h (struct sched_info): New member USE_CSELIB. - * sched-ebb.c (ebb_sched_info): Initialize it. - * sched-rgn.c (rgn_sched_info): Likewise. - * Makefile.in (sched-deps.o): Update dependencies. - - * cselib.h (cselib_subst_to_values): Declare. - * cselib.c (cselib_subst_to_values): No longer static. Allow MEMs - that have no value and autoincs to be handled by generating a new - dummy value. - -2001-08-08 Graham Stott - - * final.c (shorten_branches): Update the INSN_ADDRESSES of insns - within fixed length SEQUENCE. - -2001-08-08 Graham Stott - - * diagnostic.h (diagnostic_format_decoder): Parenthesize macro parameter. - (diagnostic_prefixing_rule): Likewise. - (diagnostic_line_cutoff): Likewise. - (diagnostic_kind_count): Likewise. - -2001-08-08 Graham Stott - - * alias.c (find_base_decl): Delete redundent assignment. - -2001-08-08 Graham Stott - - * dependence.c (INDEX_LIMIT_CHECK): Uppercase macro parameter. - (abs): Uppercase and paranthesize macro parameter. - (MEM_DEPENDENCY): Add whitespace. - -2001-08-08 Graham Stott - - * config/mips/mips.c (mips_legitimate_address_p): Fix enable checking - failure check for CONST_INT - -2001-08-08 Graham Stott - - * flow.c (back_edge_of_syntactic_loop_p): Add whitespace. - (libcall_dead_p): Likewise. - - (mark_used_regs): Constify fmt. - (find_use_as_address): Likewise. - -2001-08-08 Graham Stott - - * c-typeck.c (RESTORE_SPELLING_DEPTH): Uppercase and parenthesize macro - parameter. - -2001-08-08 Graham Stott - - * combine.c (combine_simplify_rtx): Update comment and - remove erroneous test. - -2001-08-07 Neil Booth - - * cppinit.c (cpp_finish): Pop the final buffer without comment. - * cpplex.c (_cpp_lex_token): Don't pop the final buffer; and - take care to avoid multiple no-newline at EOF warnings in that - case. - -Tue Aug 7 22:18:06 CEST 2001 Jan Hubicka - - * calls.c (expand_call): Do not emit INSN_SETJMP note. - (emit_library_call_value_1): Likewise. - (emit_call_1): Emit REG_SETJMP note. - * cse.c (cse_end_of_basic_block): Use REG_SETJMP instead - of INSN_SETJMP - * cselib.c (cselib_process_insn): Likewise. - * flow.c (propagate_block): Likewise. - * loop.c (find_and_verify_loops): Likewise. - * reload.c (find_equiv_regs): Likewise. - * reload1.c (reload): Likewise. - * resource.c (mark_referenced_resources, - mark_set_resources): Likewise. - * sched-deps (sched_analyze_insn, sched_analyze): Likewise. - * final.c (final_scan_insn): Remove NOTE_INSN_SETJMP. - * haifa-sched.c (unlink_other_notes): Likewise. - (reemit_notes): Likewise. - * sched-ebb.c (sched_ebb): Likewise. - * sched-rgc.c (sched_region): Likewise. - * rtl.c (note_insn_name): Likewise. - (reg_note_name): Add REG_SETJMP - * rtl.h (reg_note): Add REG_SETJMP. - (insn_note): Remove NOTE_INSN_SETJMP. - - * profile.c (branch_prob): Add fake edges for setjmp. - -2001-08-07 Daniel Jacobowitz - - * config.gcc: Quote target_cpu_default2 correctly for - powerpc*-*-* targets. - -2001-08-07 Neil Booth - - * cpplib.h, line-map.h: Update comments. - * cppmain.c (printer_init): Move inline. - (maybe_print_line, print_line): Take a map pointer. - (cb_ident, cb_define, cb_undef, cb_include, cb_def_pragma): Update. - (cb_file_change): Don't use prior value of print.map. - -2001-08-07 David Edelsohn - - * doc/install.texi: Document fine-grained multilib configuration. - -Tue Aug 7 16:52:54 CEST 2001 Jan Hubicka - - * rtlanal.c (find_first_parameter_load): Call note_stores - only on the instructions. - -Tue Aug 7 14:56:16 CEST 2001 Jan Hubicka - - * alias.c (nonlocal_mentioned_p): - Rename CONST_CALL_P to CONST_OR_PURE_CALL_P - * calls.c (emit_call_1): Likewise. - * cse.c (cse_insn, invalidate_skipped_block): Likewise. - * cselib.c (cselib_process_insn): Likewise. - * df.c (df_insns_modify): Likewise. - * flow.c (need_fake_edge_p): Likewise. - (propagate_one_insn): Likewise. - * haifa-sched.c (reemit_notes): Likewise. - * integrate.c (copy_insn_list): Likewise. - * jump.c (delete_prior_computation): Likewise. - * local-alloc.c (validate_equiv_mem): Likewise. - * loop.c (scan_loop): Likewise. - * predict.c (estimate_probability): Likewise. - * reload.c (reload): Likewise. - * sched-deps (sched_analyze): Likewise. - * rtl.h (CONST_CALL_P): rename to CONST_OR_PURE_CALL_P. - * gcse.c (compute_hash_table): Likewise. - (mark_call): Likewise. - (store_killed_in_insn): Likewise. - -2001-08-07 Jason Merrill - - * c-semantics.c (make_rtl_for_local_static): Use DECL_RTL_SET_P. - -2001-08-06 Richard Henderson - - * varasm.c (assemble_gc_entry): Remove. - * output.h: Likewise. - -2001-08-06 Richard Henderson - - * varasm.c (assemble_constructor): Take a symbol_ref and a - priority instead of a bare string. Move priority handling - here from cp/decl2.c. - * output.h: Update decls. - - * c-decl.c (c_expand_body): Update calls to assemble_constructor - and assemble_destructor. - * profile.c (output_func_start_profiler): Likewise. - * objc/objc-act.c (finish_objc): Likewise. - (build_module_descriptor): Return the symbol not the symbol name. - -2001-08-06 David Edelsohn - - * config/rs6000/darwin.h (DOUBLE_INT_ASM_OP): Add whitespace. - * config/rs6000/linux64.h (RS6000_MCOUNT): Define. - ({SAVE,RESTORE}_FP_{PREFFIX,SUFFIX}): Define. - * config/rs6000/rs6000.h (ASM_OUTPUT_DOUBLE_INT): Remove whitespace. - * config/rs6000/sysv4.h (DOUBLE_INT_ASM_OP): Add whitespace. - * config/rs6000/xcoff.h (DOUBLE_INT_ASM_OP): Add whitespace. - -2001-08-06 Neil Booth - - * cpperror.c (print_containing_files): Moved to line-map.c. - (print_location): line-map.c handles re-listing or otherwise. - * cpphash.h (struct lexer_state): Remove next_bol. - (struct cpp_buffer): Remove include_stack_listed. - * cpplib.c (do_line, cpp_push_buffer, _cpp_pop_buffer): - Remove faked buffer handling. - (_cpp_do_file_change): Tweak. - * cpplib.h (enum cpp_buffer_type): Remove BUF_FAKE. - * cppmain.c (struct printer): Remove filename. - (print_line, cb_file_change): Update accordingly. - * line-map.c: Include intl.h. - (init_line_maps): Initialize last_listed. - (free_line_maps): Sanity check, warn if ENABLED_CHECKING. - (add_line_map): Sanity check inputs, warn if ENABLED_CHECKING. - (print_containing_files): New. - * line-map.h (struct line_maps): New member last_listed. - (print_containing_files, INCLUDED_FROM): New. - * Makefile.in: Update. - * po/POTFILES.in: Add line-map.c. - -2001-08-06 Richard Henderson - - * except.c (convert_from_eh_region_ranges_1): Never mark - USE or CLOBBER insns as throwing. - - * expr.c (store_constructor): Don't clobber memory targets. - -2001-08-06 Andreas Jaeger - - * profile.c (branch_prob): Remove unused variable insn. - - * Makefile.in (local-alloc.o): Add dependency on except.h. - - * local-alloc.c: Include except.h for can_throw_internal prototype. - -2001-08-06 Richard Henderson - - * config/i386/i386.h (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): New. - * function.c (expand_main_function): Implement it. - * doc/tm.texi: Document it. - -2001-08-06 Stan Shebs - - * doc/install.texi: Document powerpc-*-darwin* details. - -2001-08-06 Daniel Berlin - - * config/rs6000/aix.h (CPP_CPU_SPEC): Move back to rs6000.h - (ASM_CPU_SPEC): Move back to rs6000.h - #undef CPP_DEFAULT_SPEC and ASM_DEFAULT_SPEC before redefining them. - - * config/rs6000/darwin.h (DOUBLE_INT_ASM_OP): New macro. - - * config/rs6000/linux.h: Remove vtable thunks stuff we accidently - readded. - - * config/rs6000/linux64.h: Ditto. - - * config/rs6000/rs6000.h: Move CPP_CPU_SPEC and ASM_CPU_SPEC back - to here. Define default ASM_DEFAULT_SPEC and CPP_DEFAULT SPEC to - nothing. - - Remove accidently readded definitions of FUNCTION_PROLOGUE, - FUNCTION_EPILOGUE, ASM_OPEN_PAREN, ASM_CLOSE_PAREN - - * config/rs6000/sysv4.h: Move CPP_CPU_SPEC and ASM_CPU_SPEC back - to rs6000.h - -2001-08-05 Richard Henderson - - * local-alloc.c (update_equiv_regs): Do not move insns that - can throw. - -2001-08-05 Jan Hubicka - - * Makefile.in (reload1.o): Add dependency on except.h - * basic-block.h (purge_all_dead_edges, purge_dead_edges): Update - prototypes. - * flow.c (purge_dead_edges, purge_all_dead_edges): Return bool - indicating whether edges has been cleaned up. - * reload1.c: Include except.h. - (fixup_abnormal_edges): Accept deleted insns. - * toplev.c (rest_of_compilation): Purge dead edges unconditionally - after combine. - -2001-08-06 Neil Booth - - * cpplib.c (do_line): Correct line number after pop_buffer. - -2001-08-05 Neil Booth - - PR preprocessor/3824 - * line-map.c: Update comments. - * line-map.h: Update comments. - * tradcif.y: Don't consider large numbers unsigned. - -2001-08-05 Neil Booth - - PR preprocessor/3081 - * c-lex.c (map): New. - (cb_file_change): Update map and use it. - (cb_def_pragma, cb_define, cb_undef): Use map and line. - (c_lex): Update to use map. - * cpperror.c (print_location): Move to using logical line numbers. - * cppfiles.c (stack_include_file): Update for new _cpp_do_file_change. - (cpp_make_system_header): Similarly. - (_cpp_execute_include): Stop line numbering hacks. Store the - line we will return to. - * cpphash.h (CPP_BUF_LINE): Remove. - (struct cpp_buffer): Remove lineno and pseudo_newlines. - Add map and return_to_line. - (_cpp_do_file_change): Update. - * cppinit.c (cpp_start_read): Update line kludge. - * cpplex.c (handle_newline): Don't update lineno and pseudo_newlines. - (trigraph_ok): Use logical line numbers for diagnostics. - (skip_block_comment): Likewise. - (skip_whitespace): Likewise. - (skip_line_comment): Use pfile->line instead. - (_cpp_lex_token): Update to use logical line numbering exclusively. - Handle BOL locally. Accept new lines in directives, but keep - pfile->line decremented. Diagnostics use logical lines. Update - directive handling. - * cpplib.c (SEEN_EOL): New. - (skip_rest_of_line, check_eol): Use it. - (end_directive): Increase line number when accepting the newline - at the end of a directive. - (run_directive): Simplify. - (do_line): Bad LC_LEAVEs become LC_RENAMEs. Update. - (_cpp_do_file_change): Update to take buffer line number as an - argument, and store the current map in the cpp_reader. Remove - line number kludges. - (_cpp_do__Pragma): Restore output position after a _Pragma. - (cpp_push_buffer): Don't set output line or lineno. - (_cpp_pop_buffer): Transfer more info from a faked buffer. - Remove line kludge. Set output_line. - * cppmacro.c (builtin_macro): Update handling of __LINE__. - (parse_arg): Use logical lines. - (save_lookahead_token): Save EOFs too now. - * cppmain.c (struct printer): Fix comments. - (printer_init): Simplify, let caller do errors. - (scan_translation_unit, check_multiline_token, dump_macro): Update. - (maybe_print_line): Simplify. - (print_line): Don't print a linemarker if -P. - (cb_define, cb_undef, cb_def_pragma, cb_ident, cb_include): Update. - (cb_file_change): Simplify. - * line-map.h (LAST_SOURCE_LINE): Fix. - (CURRENT_LINE_MAP): New. - -2001-08-05 Bernd Schmidt - - * doloop.c (doloop_modify_runtime): Properly compute number of - iterations if loop was unrolled. - - * alias.c (rtx_equal_for_memref_p): VALUEs are only identical - if their CSELIB_VAL_PTRs are. - - * config/ia64/ia64.c (struct spill_fill_data): New member prev_insn. - (setup_spill_pointers): Initialize it. - (spill_restore_mem): Set it. - (do_spill, do_restore): Use it to add REG_INC note. - * config/ia64/ia64.md (movti_internal): Add REG_INC notes as needed. - - * config/ia64/ia64.c (ia64_sched_reorder): Defer scheduling of - asms if other insns are available. - - * config/ia64/ia64.c (condop_operator): New predicate. - * config/ia64/ia64.h (PREDICATE_CODES): Add it. - * config/ia64/ia64.md (cond_opsi2_internal and splitters): New - patterns. - - * expr.c (expand_expr, case COND_EXPR): Prefer working with a - temporary register than directly using a MEM. - -2001-08-04 Hans-Peter Nilsson - - * config/sh/sh.c (sh_asm_named_section): Fix typo in align - parameter in last change. - -2001-08-04 Zack Weinberg - - * sparc.md: Don't use #if inside C test expression. - -2001-08-04 Richard Henderson - - * i386.c: Revert 07-30 ix86_output_main_function_alignment_hack. - -2001-08-04 Neil Booth - - * cpphash.h (struct cpp_reader): New member directive_line. - * cpplib.h (struct cpp_callbacks): Update prototypes of callbacks. - * cpplib.c (do_define, do_undef, do_ident, do_include_common, - do_pragma): Pass line to callbacks. - (start_directive): Record line of directive. - * cppmain.c (cb_ident, cb_define, cb_undef, cb_def_pragma, - cb_include): Similarly. - * c-lex.c (cb_ident, cb_define, cb_undef, cb_def_pragma): - Similarly. - -2001-08-04 Hans-Peter Nilsson - - * config/d30v/d30v.h: Fix typo in start of UNIQUE_SECTION - comment. - -Sat Aug 4 13:51:36 CEST 2001 Jan Hubicka - - * loop.c (try_copy_prop); Kill invalidated REG_EQUAL notes. - - * reload1.c (fixup_abnormal_edges): New static function. - (reload): Use it. - - * flow.c (need_fake_edge_p): New function. - (flow_call_edges_add): Fix handling of noreturn and sibling calls; - avoid call insn to be very last insn in the insn stream. - - * profile.c (branch_prob): Call flow_call_edges_add instead of - doing that by hand; cleanup cfg to re-merge basic blocks once - we are done. - -2001-08-04 Neil Booth - - * Makefile.in (CPPLIB_H): New, so that dependencies on cpplib.h - are also on line-map.h. - * cppfiles.c (stack_include_file): Update. - * cpphash.h (struct cpp_buffer): New member return_at_eof. - (_cpp_pop_buffer): New. - * cppinit.c (cpp_destroy, cpp_finish): Update. - (do_includes): Mark each buffer to return at EOF. - * cpplex.c (_cpp_lex_token): Pop buffers at EOF. Continue or - return as requested. - * cpplib.c (run_directive, do_line, cpp_push_buffer): Update. - (cpp_pop_buffer): Rename _cpp_pop_buffer. Stop skipping. - * cpplib.h (cpp_pop_buffer): Remove. - (cpp_scan_buffer_nooutput): Rename cpp_scan_nooutput. - * cppmacro.c (cpp_scan_buffer_nooutput): Similarly. No need to pop - buffers. - * cppmain.c (scan_buffer): Rename scan_translation_unit. No need - to pop buffers. - (do_preprocessing): Update. - * fix-header.c (read_scan_file): Update. No need to pop buffers. - * c-parse.in (_yylex): Similarly. - * scan-decls.c (scan_decls): Similarly. - * line-map.h: Update comments. - - * objc/Make-lang.in (objc-act.o): Update dependencies. - -2001-08-04 Stephane Carrez - - * config/m68hc11/m68hc11.md ("cmphi_1", "cmpqi_1"): Allow memory - and soft register for operand 0. - ("cmphi_z_used", "cmpqi_z_used"): Allow memory for operand 0. - -2001-08-04 Stephane Carrez - - * config/m68hc11/m68hc11.md ("bitcmpqi"): Allow memory and soft - register for operand 0. - ("bitcmpqi_z_used"): Allow memory for operand 0. - (split "bitcmpqi"): New split to handle address reg as operand 1. - -2001-08-04 Andreas Jaeger - - * gcse.c: Revert Daniel's last patch. - -2001-08-03 Zack Weinberg - - * sparc-protos.h: Add prototypes for fp_zero_operand and - reg_or_0_operand. - * sh-protos.h: Add prototype for fpul_operand. - -2001-08-04 Hans-Peter Nilsson - - * doc/extend.texi (Other Builtins): Fix typo in last change. - -2001-08-03 Richard Henderson - - * target.h (gcc_target): Add asm_out.named_section, - section_type_flags, have_named_sections. - * target-def.h (TARGET_ASM_NAMED_SECTION): New. - (TARGET_HAVE_NAMED_SECTIONS): New. - (TARGET_SECTION_TYPE_FLAGS): New. - - * Makefile.in (toplev.o): Depend on TARGET_H. - (varasm.o, dbxout.o): Likewise. - * c-common.c (decl_attributes): Check targetm.have_named_sections - instead of ifdef ASM_OUTPUT_SECTION_NAME. - * dbxout.c (dbxout_function_decl): Likewise. - (dbxout_function_end): Likewise. - * toplev.c (compile_file): Likewise. - * varasm.c (exception_section): Likewise. - * cp/decl2.c (finish_objects): Likewise. - - * defaults.h (EH_FRAME_SECTION): Remove. - (EH_FRAME_SECTION_ASM_OP): Remove. - (EH_FRAME_SECTION_NAME): New. - (UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME. - (UNIQUE_SECTION_P): Remove. - * dwarf2out.c (SECTION_FORMAT): Remove. - (ASM_OUTPUT_SECTION): Remove. - (output_call_frame_info): Use named_section_flags. - (output_comp_unit, dwarf2out_start_source_file): Likewise. - (dwarf2out_end_source_file, dwarf2out_define): Likewise. - (dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise. - * varasm.c (in_eh_frame, eh_frame_section): Remove. - (named_section_flags): New. - (named_section): Use it and targetm.section_type_flags. - (resolve_unique_section): New. - (assemble_start_function): Use it. - (asm_emit_uninitialised, assemble_variable): Likewise. - (default_section_type_flags): New. - (default_no_named_section, default_elf_asm_named_section): New. - (default_coff_asm_named_section, default_pe_asm_named_section): New. - * output.h: Update varasm.c decls. - (SECTION_*): New flags. - - * crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP. - (__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section. - - * config/elfos.h (UNIQUE_SECTION_P): Remove. - * config/alpha/elf.h, config/arm/linux-elf.h: Likewise. - * config/arm/pe.h, config/arm/unknown-elf.h: Likewise. - * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. - * config/i386/i386-interix.h, config/i386/win32.h: Likewise. - * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. - * config/mips/elf.h, config/mips/elf64.h: Likewise. - * config/mips/iris6gld.h, config/mips/mips.h: Likewise. - * config/pa/pa64-hpux.h, - - * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. - (TARGET_ASM_NAMED_SECTION): New. - * config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise. - * config/alpha/vms.h, config/arm/coff.h: Likewise. - * config/arm/conix-elf.h, config/arm/elf.h: Likewise. - * config/arm/linux-elf.h, config/arm/pe.h: Likewise. - * config/arm/unknown-elf.h, config/avr/avr.h: Likewise. - * config/c4x/c4x.h, config/h8300/h8300.h: Likewise. - * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. - * config/i386/i386-interix.h, config/i386/i386elf.h : Likewise. - * config/i386/sco5.h, config/i386/win32.h: Likewise. - * config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise. - * config/mcore/mcore.h, config/mips/elf.h: Likewise. - * config/mips/elf64.h, config/mips/iris6.h: Likewise. - * config/mips/netbsd.h, config/mips/openbsd.h: Likewise. - * config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise. - * config/rs6000/xcoff.h, config/sh/sh.h: Likewise. - * config/sparc/sysv4.h: Likewise. - - * config/nextstep.h: Error until named sections implemented. - - * config/a29k/a29k.c (a29k_asm_named_section): New. - * config/alpha/alpha.c (SECTION_VMS_OVERLAY): New. - (vms_section_type_flags, vms_asm_named_section): New. - * config/arm/arm.c (arm_elf_asm_named_section): New. - * config/avr/avr.c (asm_output_section_name): Remove. - * config/avr/avr-protos.h: Update. - * config/c4x/c4x.c (c4x_asm_named_section): New. - * config/h8300/h8300.c (h8300_asm_named_section): New. - * config/i386/i386.c (sco_asm_named_section): New. - * config/i386/winnt.c (SECTION_PE_SHARED): New. - (i386_pe_section_type_flags): New. - (i386_pe_asm_named_section): New. - * config/i386/i386-protos.h: Update. - * config/m68k/m68k.c (m68k_coff_asm_named_section): New. - * config/mcore/mcore.c (mcore_asm_named_section): New. - * config/mips/mips.c (iris6_asm_named_section): New. - * config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY - instead of UNIQUE_SECTION_P. - * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New. - (xcoff_asm_named_section): New. - * config/sh/sh.c (sh_asm_named_section): New. - * config/sparc/sparc.c (sparc_elf_asm_named_section): New. - - * config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove. - * config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove. - (EH_FRAME_SECTION_NAME): New. - (EXCEPTION_SECTION): New. - * config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove. - (DEBUG_*_SECTION): Remove. - * config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove. - * config/mips/iris6.h (DEBUG_*_SECTION): Remove. - (EH_FRAME_SECTION_ASM_OP): Remove. - - * doc/tm.texi (UNIQUE_SECTION_P): Remove. - (ASM_OUTPUT_SECTION_NAME): Remove. - (TARGET_ASM_NAMED_SECTION): New. - (TARGET_HAVE_NAMED_SECTIONS): New. - (TARGET_SECTION_TYPE_FLAGS): New. - (EH_FRAME_SECTION_ASM_OP): Remove. - (EH_FRAME_SECTION_NAME): New. - -2001-08-03 Zack Weinberg - - * builtins.c (fold_builtin_constant_p): Return integer_zero_node - for complex expressions when cfun == 0. - * doc/extend.texi: Document that __builtin_constant_p can be - used in data initializers as well as functions. - -2001-08-03 Alexandre Oliva - - * config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): Declare - variable I locally, instead of expecting a declaration in the - calling context. - -2001-08-03 Richard Henderson - - * except.c (collect_one_action_chain): Add an explicit cleanup - action if regions surrounding a catch were encoded entirely - within the call-site entry. - -2001-08-03 Richard Henderson - - * dbxout.c (dbxout_symbol_location): Flatten subregs first; - don't take REGNO of a non-register. - -2001-08-03 John David Anglin - - * gthr-dce.h (__GTHREAD_MUTEX_INIT_FUNCTION and - __GTHREAD_MUTEX_INIT_DEFAULT): New macros for mutex initialization. - (__gthread_key_delete): Remove code for __PTHREAD_LIBRARY_VERSION_1 >= 1 - (__gthread_mutex_init_function): New function for mutex initialization. - -2001-08-03 Daniel Berlin - - * Makefile.in: Revert screwed up commit. - -2001-08-03 Stephane Carrez - - * config/m68hc11/t-m68hc11-gas (T_CPPFLAGS): Add _ctor and _dtor. - * config/m68hc11/larith.asm (_exit): Split in several sub-sections - merged by linker script to get a final _exit(). - (__do_global_dtors): New for destructor handling in specific exit - section. - (__do_global_ctors): New for constructors in specific install section. - (__map_data_section): Map data sections before running constructors. - * config/m68hc11/m68hc11.h (INT_ASM_OP): Define to use .word. - (CTORS_SECTION_ASM_OP): Define to put in readonly section. - (DTORS_SECTION_ASM_OP): Likewise. - (CTORS_SECTION_FUNCTION): Define to force a reference to - __do_global_ctors. - (DTORS_SECTION_FUNCTION): Likewise for __do_global_dtors. - -2001-08-03 Daniel Berlin - - * ChangeLog: Fix date on previous ChangeLog entry for GCSE. - - * Makefile.in: Add df.h to gcse.c dependencies. - -2001-08-03 John David Anglin - - * varasm.c (output_constant_def_contents): Use for the length of a - string constant either its TREE_STRING_LENGTH or its int_size_in_bytes - depending on which is larger. - -2001-08-03 Daniel Berlin - - * gcse.c: Include df.h for use as a dataflow analyzer. - Remove regvec. - Declaration of reg_set_info: gone. - New df_analyzer variable used by store motion. - (reg_set_info): Deleted. - (mark_mem_regs): New function, analyze regs used by a mem. - (store_ops_ok): Use dataflow analyzer results to determine if - necessary regs are changed in the block. - (find_moveable_store): Remove check for symbol ref, we can handle - much more complex expressions now. - (compute_store_table): Remove most of the code, it's unnecessary - now that the dataflow analyzer records the info for us. - (store_killed_after): Add parameter to say whether to do the - store_ops_okay test, used to speed up testing when we already know - the answer, and just want to know if the store itself was killed. - (build_store_vector): Largely rewritten to calculate the various - vectors properly, and somewhat optimized. - (store_motion): Init the df_analyzer, get REG_DEF chains. - Also handle trapping expressions (since mems almost always trap) - (simple_mem): Redefine what a simple mem is. - -2001-08-03 DJ Delorie - - * ifcvt.c (noce_get_alt_condition): Don't make an auxiliary - set from a constant part of the condition. - -2001-08-01 Andrew Cagney - - * mkdeps.c (deps_add_default_target): Make local variable - ``start'' a const char pointer. - * dwarf2out.c (compute_section_prefix): Localize use of ``p''. - -2001-08-03 Rainer Orth - - * doc/install.texi (Configuration): Fix markup. - (Specific, i?86-*-udk): Likewise. - (Specific, alpha*-dec-osf*): Warn against --with-gnu-as, - --with-gnu-ld. - Document --enable-threads and --enable-libgcj status. - (Specific, mips-sgi-irix*): Canonicalize triples. - (Specific, mips-sgi-irix5): Warn about problems with this config. - Mention required GNU as patch. - Native assembler problems are fixed. - (Specific, mips-sgi-irix6): Update O32 ABI support status. - Document --enable-threads and --enable-libgcj status. - -2001-08-02 Nick Clifton - - * Makefile.in, mklibgcc.in: Restore changes with fixed invocation - of mkinstalldirs. - -2001-08-03 Richard Henderson - - * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Don't write to - constant data. - -2001-08-03 Richard Henderson - - * rtlanal.c (find_first_parameter_load): Stop if we - reach a CODE_LABEL at BOUNDARY. - -2001-08-03 Richard Henderson - - * config/alpha/alpha.md (force_movdi): New insn. - * config/alpha/alpha.c (alpha_expand_prologue): Use it. - Tweek FRP marking of VMS prologue insns. - * config/alpha/vms.h (EPILOGUE_USES): New. - -2001-08-02 Richard Henderson - - * Makefile.in, mklibgcc.in: Revert mkinstalldirs change. - -2001-08-02 Lars Brinkhoff - - * combine.c, config.gcc, cse.c, defaults.h, real.c, reload.c, - simplify-rtx.c, config/alpha/alpha.h, config/avr/avr.h, - config/convex/convex.h, config/d30v/d30v.c, - config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, - config/elxsi/elxsi.h, config/fr30/fr30.h, config/m88k/m88k.c, - config/mips/mips.h, config/mn10200/mn10200.h, - config/mn10300/mn10300.h, config/pdp11/pdp11.md, - config/v850/v850.h, config/vax/openbsd.h, - config/vax/openbsd1.h, config/vax/ultrix.h, - config/vax/vax-protos.h, config/vax/vax.c, config/vax/vax.h, - config/vax/vax.md, config/vax/vaxv.h, config/vax/xm-vms.h, - cp/decl2.c, doc/contrib.texi, doc/cpp.texi, doc/gcc.texi, - doc/install.texi, doc/invoke.texi, doc/md.texi, doc/rtl.texi, - doc/tm.texi: consistently use "VAX", "VAXen", and "MicroVAX" - in comments and documentation. - -2001-08-03 Neil Booth - - * line-map.c: New. - * line-map.h: New. - * Makefile.in (line-map.o): New. - (LIBCPP_OBJS, LIBCPP_DEPS): Update. - * c-lex.c (cb_file_change): Update for new cpp_file_change structure. - * cpperror.c (print_containing_files): Similarly. - (print_location): Update. Don't output a space before _Pragma. - * cppfiles.c (stack_include_file): Set to line 1 immediately. - (stack_include_filee, cpp_make_system_header): Update. - (_cpp_execute_include): Get logical line number right for calling - as-yet-unterminated #include. - * cpphash.h (struct cpp_reader): Add line_maps. - (_cpp_do_file_change): Update. - * cppinit.c (cpp_create_reader): Initialize line maps. - (cpp_destroy): Destroy line maps. - (cpp_start_read): Get logical line number right. - * cpplex.c (parse_string): Only warn once for multi-line strings. - Use boolean variable for null warning. - * cpplib.c (_cpp_handle_directive): End the directive if it isn't - already. - (do_include_common): End the directive early. - (do_line): Don't warn about out-of-range lines in preprocessed - source. Update. Remove unused variables. - (_cpp_do_file_change): Update for new line mapping. - (pragma_cb): New typedef. - (cpp_register_pragma): Stop looking ahead before calling the - handler. Clean up. - (do_pragma_system_header): End directive early. - (cpp_get_line_maps): New. - (cpp_pop_buffer): Fudge logical line. Update. - * cpplib.h: Include line-map.h - (enum cpp_fc_reason): Remove. - (struct cpp_file_change): Update. - (cpp_get_line_maps): New. - * cppmain.c (struct_printer): New member map. - (cb_file_change): Update for new mappings. - * fix-header.c (cb_file_change): Similarly. - -2001-08-02 Nick Clifton - - * Makefile.in (libgcc.mk): Define mkinstalldirs. - * mklibgcc.in: Use mkinstalldirs instead of mkdir. - -2001-08-02 Lars Brinkhoff - - * config/vax/vax.c: include expr.h. - -2001-08-02 Nick Clifton - - * Makefile.in ($(srcdir)/configure): Only rebuild in - maintainer mode. - ($(srcdir)/config.in): Only define in maintainer mode. - ($(srcdir)/cstamp-h.in): Only define in maintainer mode. - -2001-08-02 David Edelsohn - - * doc/install.texi (Install GCC: Binaries): Update Bull info. - -2001-08-02 Rainer Orth - - * gcc.c (set_collect_gcc_options): New function, split out from - main. - Ignore elided switches. - (do_spec_1): Invoke before executing command. - (set_input): Export. - Move declaration ... - * gcc.h (set_input): ... here. - * config/alpha/osf.h (ASM_FINAL_SPEC): Use %U.s to refer to input - file. - -2001-08-02 Nathan Sidwell - - Kill -fhonor-std. - * doc/c-tree.texi (Namespaces): Remove std & -fhonor-std - interaction. - * doc/invoke.texi (C++ Dialect Options): Remove -fno-honor-std. - -2001-08-02 Richard Sandiford - - * mips.md (movdicc): Make conditional on TARGET_64BIT. Likewise - for the unnamed instructions it expands to. - -2001-08-02 Richard Henderson - - * regclass.c (call_really_used_regs): Conditionally define. - (init_reg_sets_1): Don't use it if not defined. - (fix_register): Similarly, don't set it. - -2001-08-01 Gerald Pfeifer - - * params.def (PARAM_MAX_INLINE_INSNS): Change default to 600. - Correct comment that had been missed in the previous change. - -2001-08-01 Stan Shebs - - * config/darwin.c (machopic_stub_name): Try matching by name. - (update_stubs): New function. - (darwin_encode_section_info): Call it and update_non_lazy_ptrs - unconditionally. - -2001-08-01 Richard Henderson - - * except.c (output_function_exception_table): Use assemble_align. - * varasm.c (assemble_eh_label): Remove. - (assemble_eh_align, assemble_eh_integer): Remove. - -2001-08-01 Robert Lipe - - * dwarfout.c: Remove reference to README.DWARF. - -2001-08-01 Andrew MacLeod - - * regclass.c (call_really_used_regs): New array for registers which - are actually used by a call. - (init_reg_sets_1): Initialize regs_invalidated_by_call with the - new array. - (fix_register): Set call_really_used too. - * config/ia64/ia64.h (CALL_REALLY_USED_REGISTERS): Initialize. - * doc/tm.texi (CALL_REALLY_USED_REGISTERS): Document. - -2001-08-01 Richard Henderson - - * read-rtl.c (read_name): Consider \r whitespace. - -2001-07-11 Andrew Cagney - - * config.gcc: Recognize powerpc-*-netbsd*. - - * doc/install.texi (Host/target specific installation notes for - GCC): Mention powerpc-*-netbsd*. - - * config/rs6000/netbsd.h: New file. - (STANDARD_STARTFILE_PREFIX, LINK_SHLIB_SPEC): Redefine. - (LIB_DEFAULT_SPEC, STARTFILE_DEFAULT_SPEC): Redefine. - (ENDFILE_DEFAULT_SPEC, LINK_START_DEFAULT_SPEC): Redefine. - (LINK_OS_DEFAULT_SPEC, CPP_OS_DEFAULT_SPEC): Redefine. - (TARGET_VERSION): Redefine. - - * config/rs6000/t-ppccomm (MULTILIB_MATCHES_SYSV): Recognize - mcall-netbsd as a match for mcall-sysv. - (EXTRA_MULTILIB_PARTS): Add ncrti$(objext) and ncrtn$(objext). - (ncrti.S, ncrtn.S): New targets. - ($(T)ncrti$(objext), $(T)ncrtn$(objext)): New targets. - - * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Recognize - "netbsd' as a V4 ABI. - (ASM_SPEC): Check for -mcall-netbsd. - (CC1_SPEC, CC1_SPEC, LINK_START_SPEC, LINK_OS_SPEC): Ditto. - (CPP_ENDIAN_SPEC, CPP_SPEC, STARTFILE_SPEC): Ditto. - (LIB_SPEC, ENDFILE_SPEC): Ditto. - (LIB_NETBSD_SPEC, STARTFILE_NETBSD_SPEC): Define. - (ENDFILE_NETBSD_SPEC, LINK_START_NETBSD_SPEC): Define. - (LINK_OS_NETBSD_SPEC, CPP_OS_NETBSD_SPEC): Define. - (SUBTARGET_EXTRA_SPECS): Add NetBSD specs. - - * doc/invoke.texi (Option Summary): Add -mcall-netbsd. - (RS/6000 and PowerPC Options): Mention -mcall-netbsd. - -2001-08-01 Mark Kettenis - - * unwind-pe.h (base_of_encoded_value, read_encoded_value): Define - only if NO_BASE_OF_ENCODED_VALUE isn't defined. - * unwind-dw2-fde.c (NO_BASE_OF_ENCODED_VALUE): Define before - including "unwind-pe.h". - -Wed Aug 1 20:01:42 CEST 2001 Jan Hubicka - - * rs6000.md (define_splits): Kill unused constraints. - -Wed Aug 1 20:02:12 CEST 2001 Graham Stott - Jan Hubicka - - * function.c (thread_prologue_and_epilogue_insns): Kill code - dealing with non-existent CFG. - -2001-08-01 Kazu Hirata - - * alias.c: Fix comment formatting. - * bitmap.c: Likewise. - * builtins.c: Likewise. - * calls.c: Likewise. - * c-common.c: Likewise. - * c-decl.c: Likewise. - * c-dump.c: Likewise. - * c-lex.c: Likewise. - * collect2.c: Likewise. - * combine.c: Likewise. - * conflict.c: Likewise. - * cppfiles.c: Likewise. - * cppinit.c: Likewise. - * cpplex.c: Likewise. - * cpplib.c: Likewise. - * cppmacro.c: Likewise. - * cppspec.c: Likewise. - * c-pragma.c: Likewise. - * crtstuff.c: Likewise. - * cse.c: Likewise. - * cselib.c: Likewise. - * c-semantics.c: Likewise. - * c-typeck.c: Likewise. - -2001-08-01 H.J. Lu - - * config/mips/linux.h (ASM_OUTPUT_IDENT): Defined. - -2001-08-01 H.J. Lu - - * gcc/config/mips/linux.h (ASM_OUTPUT_SOURCE_LINE): Defined. - -2001-08-01 Ziemowit Laski - - * c-parse.in (OBJC_NEED_RAW_IDENTIFIER): Define macro and flag for - contextualizing Objective-C class name lookup by the lexer. - (typespec_reserved_nonattr): Disable ObjC class name lookup after - seeing a TYPESPEC. - (protocoldef): Add support for forward @protocol declarations. - (yylexname): Suppress ObjC class name lookup in certain contexts; - re-enable after lookup is complete. - (_yylex): Re-enable ObjC class name lookup when certain - punctuation marks are seen. - - * objc/objc-act.c (check_protocol_recursively): New function used - for finding circular dependencies in protocols. - (objc_declare_protocols): New function for handling forward - @protocol declarations. - (receiver_is_class_object): Detect the case when 'self' is used - inside of a class method. - (build_message_expr): Issue a warning if class method is desired - but instance method is found instead. - (conforms_to_protocol): Streamline. - (objc_comptypes): Detect the fact that 'Bar foo' conforms to - protocol Foo, even if 'Bar foo' does not. - (check_protocols): Streamline. - (start_protocol): Add checks for circular and duplicate protocol - definitions. - (encode_aggregate_within): For typedefs of structs, encode the - underlying struct. - * objc/objc-act.h (PROTOCOL_DEFINED): New tree accessor. - (objc_declare_protocols): New prototype. - -2001-08-01 Neil Booth - - * cpphash.h (struct cpp_reader): New members line, pseudo_newlines. - * cpplex.c (handle_newline): Update prototype. Maintain logical - line number. - (skip_escaped_newlines, skip_block_comment, parse_string): - Update accordingly. - (_cpp_lex_token): Update, and store token position within the token. - * cpplib.h (struct cpp_token): Add line and column entries. - * cppmacro.c (replace_args): Position stringified tokens correctly. - -2001-08-01 Andreas Jaeger - - * basic-block.h: Add prototype for last_loop_beg_note. - -2001-07-31 Alexandre Petit-Bianco - - * expr.c (safe_from_p): Use WITH_CLEANUP_EXPR_RTL instead of - RTL_EXPR_RTL while handling WITH_CLEANUP_EXPR nodes. Fixed typo in - comment. - (expand_expr): Use WITH_CLEANUP_EXPR_RTL instead of RTL_EXPR_RTL - while handling WITH_CLEANUP_EXPR node. Use second operand calling - expand_decl_cleanup. - * tree.c (firt_rtl_op): The third operand of WITH_CLEANUP_EXPR is - the first RTX. - (simple_cst_equal): WITH_CLEANUP_EXPR node to use its second - operand while calling simple_cst_equal. - * tree.def (WITH_CLEANUP_EXPR): Switched operands: the second - operand is the cleanup expression, the third is the RTL_EXPR. - * tree.h (WITH_CLEANUP_EXPR_RTL): New macro. - -2001-07-31 Jeff Sturm - - * except.c (duplicate_eh_regions): Test n_array[i] for NULL. - -2001-07-31 matthew green - - * config.gcc (i386-*-netbsdelf): New description. - * config/i386/netbsd-elf.h: New file. - -2001-07-30 Geoffrey Keating - - * loop.c (check_dbra_loop): Use single_set to compute - jump_label. - -2001-07-31 Daniel Berlin - - PowerPC reorg and support for powerpc64-*-linux*. - - Also fixes emitting of constants on 32 bit and 64 bit - platforms. - - * config.gcc: powerpc64-*-linux* is a new target. - Things that needed aix.h now also include xcoff.h - - * config/rs6000/rs6000.h: Split XCOFF specific stuff into - xcoff.h. - Move AIX specific stuff into aix.h. - (TARGET_AIX): Renamed to TARGET_XCOFF, since the AIX ABI is used - with more than just XCOFF now. - (SET_ASM_OP): Remove, now defined where needed. - (FUNCTION_PROLOGUE): New macro definition. - (FUNCTION_EPILOGUE): New macro definition. - (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): New macro definition. - - * config/rs6000/xcoff.h: New file. - - * config/rs6000/linux64.h: New file. - - * config/rs6000/darwin.h: Copy needed AIX alignment definitions. - -2001-07-31 Alan Modra - - * rs6000.c (print_operand_address): Handle ELF syntax. - (output_toc): Simplify. Use DOUBLE_INT_ASM_OP. - * rs6000.md (load_toc_aix_di): Handle ELF syntax. - * rs6000.h (ASM_OUTPUT_DOUBLE_INT, ASM_LONG): Use DOUBLE_INT_ASM_OP. - -2001-07-31 David Edelsohn - - * rs6000.c (rs6000_override_options): Only disable - flag_function_sections for XCOFF. - (exact_log2_cint_operand): New predicate. - (reg_or_{add,sub}_cint64_operand): New predicates. - (add_operand): Compare CONST_INT with fewer function calls. - (rs6000_emit_set_const, rs6000_emit_set_long_const): New functions. - (print_operand, case 'p'): Ensure positive operand. - (rs6000_emit_load_toc_table): No load_toc_v4_pic_di. - * rs6000.h (CONST_OK_FOR_LETTER_P, case 'N'): Ensure positive value. - (PREDICATE_CODES): Add new predicates. - * rs6000.md (addsi3): Split 32-bit constants more correctly. - (divsi3, modsi3): Ensure positive power-of-2. - (adddi3): Use new predicate. Split 32-bit constants more - correctly. Re-arrange splitter to handle any constant. - (subdi3): Use new predicate. - (divdi3, moddi3): Ensure positive power-of-2. - (movdi): Use rs6000_emit_set_const. - (load_toc_v4_pic_di): Delete. - -2001-07-31 Graham Stott - - * function.c (pad_below): Revert 2001-07-26 patch. - -Tue Jul 31 15:37:35 CEST 2001 Jan Hubicka - - * reg-stack (convert_regs_1): Fix best edge condition. - -Tue Jul 31 15:33:27 CEST 2001 Jan Hubicka - - * jump.c (duplicate_loop_exit_test): Better test for jumps - entering the loop; create loop pre_header. - -2001-07-31 Hartmut Penner - - * doc/install.texi: Add s390 and s390x as new targets. - * doc/invoke.texi: Add documentation of S/390 and zSeries - target options. - * doc/md.texi: Add documentation of S/390 and zSeries constraints. - -2001-07-30 Roman Zippel - - * config/m68k/m68k.md: Replace all general_operand with - nonimmediate_operand for all destinations. - * config/m68k/m68k.c (not_sp_operand): Likewise. - -Mon Jul 30 23:20:34 EDT 2001 John Wehle (john@feith.com) - - * flow.c (merge_blocks): Return 1 if an extra jump is inserted. - -2001-07-30 Richard Henderson - - * config/ia64/ia64.h (DEBUG_RANGES_SECTION): New. - * config/mips/iris6.h (DEBUG_RANGES_SECTION): New. - -2001-07-30 Roman Zippel - - * config/m68k/m68k.h (TARGET_SWITCHES/TARGET_OPTIONS): - Add missing doc strings - * config/m68k/linux-aout.h (SUBTARGET_SWITCHES): Likewise - * config/m68k/linux.h (SUBTARGET_SWITCHES): Likewise - -Mon Jul 30 22:16:08 CEST 2001 Jan Hubicka - - * i386.c (ix86_output_main_function_alignment_hack): New function. - (TARGET_ASM_FUNCTION_PROLOGUE): Default to it. - - * flow.c (mark_dfs_back_edges): Move from loop_p ; mark back - edges by EDGE_DFS_BACK flag. - (dump_edge_info): Add dfs_back flag. - * basic-block.h (EDGE_DFS_BACK): New constant. - (mark_dfs_back_edges): Declare. - * alias.c (loop_p): Remove. - (mark_constant_function): Use mark_dfs_back_edges. - - * reg-stack.c (block_info_def): Add predecessors counter and stack_out. - (reg_to_stack): Call mark_dfs_back_edges; count the predecessors. - (compensate_edge): Break out from ... - (convert_regs_1): ... here; do smart choosing of stack_out to copy. - (convert_regs_2): Set block_done once block is really done; - Do updating of the predecessors counts. - - * toplev.c (rest_of_compilation): Recompute block_for_insn - before post-reload cfg_cleanup. - * function.c (thread_prologue_epilogue_insns): - Call set_block_for_new_insns when emitting prologue directly. - -2001-07-30 Andreas Jaeger - - * jump.c: Add prototype for mark_modified_reg. - - * cse.c (set_live_p): Add unused attribute. - - * gcov.c (calculate_branch_probs): Use gcov_type to avoid - overflow. - (scan_for_source_files): Use long for count to avoid overflow. - (output_data): Likewise. - (output_data): Don't use string concatatenation to silence gcc - -traditional. - - * predict.c: Fix typos and grammar. - - * gcse.c (insert_insn_end_bb): Remove unused variables. - -Mon Jul 30 21:54:53 CEST 2001 Jan Hubicka - - * flow.c (mark_set_1): Use REG_FREQ_FROM_BB. - (attempt_auto_inc): LIkewise. - (mark_used_reg): Likewise. - (try_pre_increment_1): Likewise. - * regclass.c (regclass): Likewise. - * global.c (allocno_compare): Update comment; change scaling factor. - * local-alloc.c (QTY_CMP_PRI): Likewise. - * regs.h (REG_FREQ_FROM_BB): New. - (REG_FREQ_MAX): Likewise. - -2001-07-30 H.J. Lu - - * config/mips/linux.h (CPLUSPLUS_CPP_SPEC): Add - -D_GNU_SOURCE. - -2001-07-30 H.J. Lu (hjl@gnu.org) - - * config/mips/linux.h (ASM_DECLARE_FUNCTION_NAME): Defined. - (ASM_DECLARE_FUNCTION_SIZE): Likewise. - (FUNCTION_NAME_ALREADY_DECLARED): Likewise. - -2001-07-30 Nick Clifton - - * config/arm/t-arm-elf (MULTILIB_EXCEPTIONS): Skip -mthumb as well - as -mthumb-interwork when -mcpu=arm7 is specified. - -Mon Jul 30 17:44:43 CEST 2001 Jan Hubicka - - * predict.def (noreturn, loop branch, loop exit): Mark as first - match heuristics. - -Mon Jul 30 12:52:11 CEST 2001 Jan Hubicka - - * combine.c (try_combine): Avoid barrier after noop jumps. - -2001-07-29 Neil Booth - - * cpphash.h (struct cpp_reader): Remove import_warning. - * cpplib.c (skip_rest_of_line): Don't bother turning off - macro expansion. - (parse_include): Move include handling to... - (do_include_common): ... here. Move import warning from... - (do_import): ... here. - (do_pragma_poison): Don't do a callback for poison identifiers. - * cpplib.h (struct cpp_callbacks): Don't do poison callbacks. - * cppmain.c (setup_callbacks): Similarly. - -Sun Jul 29 23:26:50 CEST 2001 Jan Hubicka - - * rtlanal.c (parms_set, find_first_parameter_load): Break out from...; - handle multiple sets. - * except.c (sjlj_mark_call_sites): .... here. - * gcse.c (insert_insn_end_bb): Use find_first_parameter_load. - -Sun Jul 29 21:38:45 CEST 2001 Jan Hubicka - - Suggested by Richard Henderson and Richard Kenner: - * combine.c (recog_for_combine): Use the fake recog - only if instruction does not match. - * rtl.h (NOOP_MOVE_INSN_CODE): New. - * rtlanal.c (noop_move_p): Always return 1 for NOOP_MOVE_INSN_CODE. - - * combine.c (try_combine): Discover noop jump as direct jump. - -2001-07-29 Daniel Berlin - - * df.c (df_rd_global_compute): Add successors to worklist, not - current item. - (df_ru_global_compute): Ditto. - -2001-07-27 Daniel Berlin - - * regclass.c (reg_scan_mark_refs): Increment REG_N_REFS when we - increment REG_N_SETS. - -2001-07-26 Daniel Berlin - - * sbitmap.h: New prototype for sbitmap_a_xor_b. - - * sbitmap.c (sbitmap_a_xor_b): New function. - ifdef the basic block stuff on IN_GCC. - -2001-07-29 Neil Booth - - * cppexp.c (parse_defined): Always record the macro name. - (lex): Don't worry about identifiers, or special-case - CPP_NOT here. - (_cpp_parse_expr): Figure out at the end of the routine - whether we saw a valid !defined() expression. - * cppfiles.c (stack_include_file): Update for mi_valid. - (_cpp_pop_file_buffer): Similarly. - * cpplex.c (_cpp_lex_token): Similarly. - * cpphash.h (enum mi_state, enum mi_ind, mi_state, - mi_if_not_defined, mi_lexed): Remove. - (mi_valid): New. - * cpplib.c (do_if): Simplify. - (do_endif, push_conditional, _cpp_handle_directive): Update - for renaming of mi_state to mi_valid. -doc: - * cpp.texi: Add index entries for digraphs, and add comment - that C++ refers to them as alternative tokens. - -Sun Jul 29 18:59:13 CEST 2001 Jan Hubicka - - * basic-block.h (CLEANUP_PRE_LOOP): New. - * except.c (finish_eh_generation): Update call of cleanup_cfg. - * sibcall.c (optimize_sibling_calls): Likewise. - * toplev.c (rest_of_compilation): Likewise. - * flow.c (try_forward_edges): Take argument MODE; - do not forward over loop pre-headers if CLEANUP_PRE_LOOP. - (try_optimize_cfg): Update call of try_forward_edges. - -Sun Jul 29 18:59:56 CEST 2001 Roman Zippel - Jan Hubicka - - * (validate_replace_rtx_1): Fix simplification of MINUS. - -2001-07-29 Neil Booth - - PR preprocessor/3669 - * cppinit.c (init_dependency_output): Turn off dump requests - if sending dependencies to stdout. - -2001-07-28 Richard Henderson - - * flow.c (life_analysis): Elide PROP_ALLOW_CFG_CHANGES if - not optimizing. - -2001-07-28 Golubev I. N. - - * config/i386/sco5.h (DWARF2_DEBUGGING_INFO): Define. - -2001-07-28 Kazu Hirata - - * config/h8300/h8300.h (ENCODE_SECTION_INFO): Check to see if DECL - is VAR_DECL first to prevent an ICE. - -2001-07-28 Richard Henderson - - * varasm.c (immed_real_const_1): Don't elide special cases for - nested functions. - (clear_const_double_mem): Clear const_tiny_rtx too. - -2001-07-28 Richard Henderson - - * dwarf2out.c (dw_val_class_offset): New. - (struct dw_ranges_struct, dw_ranges_ref): New. - (ranges_table, ranges_table_allocated): New. - (ranges_table_in_use, RANGES_TABLE_INCREMENT): New. - (add_AT_offset, add_ranges, output_ranges): New. - (print_die, output_die): Handle dw_val_class_offset. - (attr_checksum, size_of_die, value_format): Likewise. - (gen_lexical_block_die): Handle non-contiguous blocks. - (gen_block_die): Likewise. - (dwarf2out_finish): Add a DW_AT_entry_pc to the compilation unit - if needed. Dump the ranges table. - * final.c (final_start_function): Remove unnecessary notes and - rebuild the block tree before numbering the blocks. - * function.c (reorder_blocks_0): Walk the existing block tree - to unmark all blocks. - (reorder_blocks_1): Create block fragments when duplicate block - notes are seen. - (reorder_fix_fragments): New. - (reorder_blocks): Call it. - * tree.h (BLOCK_FRAGMENT_ORIGIN, BLOCK_FRAGMENT_CHAIN): New. - -2001-07-28 Richard Henderson - - * emit-rtl.c (adjust_address): Make a copy of the memory address. - -2001-07-28 Richard Henderson - - * flow.c (add_to_mem_set_list): New function. - (init_propagate_block_info): Use it. - (mark_set_1): Likewise. - (insn_dead_p): Canonicalize memory address for dead store - comparison. Allow wider mode stores to kill narrower mode stores. - (invalidate_mems_from_autoinc): Use invalidate_mems_from_set. - (invalidate_mems_from_set): Don't handle MEMs. - -2001-07-28 Kazu Hirata - - * config/h8300/h8300.h: Fix formatting. - -Sat Jul 28 23:35:22 CEST 2001 Jan Hubicka - - * basic-block.h (EDGE_FREQUENCY): New macro. - * bb-reorder (fixup_reorder_chain): Set counts and frequencies - for new BB/edges. - * flow.c (find_sub_basic_blocks): Likewise. - (try_crossjump_to_edge): Likewise; use EDGE_FREQUENCY - (redirect_edge_and_branch): Use EDGE_FREQUENCY. - - * predict.c (DEF_PREDICTOR): New argument FLAGS. - (HITRATE): New macro. - (PRED_FLAG_FIRST_MATCH): New constant. - (predictor_info): New field flgags. - (combine_predictions_for_insn): Use DS theory to combine - probabilities; set the edge probabilities when finished. - (estimate_probability): Avoid duplicated matches - of LOOP_BRANCH heuristics for nested loops; update comment. - * predict.def: Add flags for each prediction, set probabilities - according to B&L paper. - * predict.h (DEF_PREDICTOR): New argument FLAGS. - - * profile.c (compute_branch_probabilities): Cleanup way the edge - probabilities are computed and REG_BR_PROB notes are dropped; if - values does not match, emit error. - (init_branch_prob): Do error instead of warning when profile driven - feedback is missing or corrupt. - -2001-07-27 DJ Delorie - - * ifcvt.c (noce_get_alt_condition): If the condition is a compare - against a constant, try to adjust the compare to have the desired - constant in it so that min/max optimizations happen more often. - -Fri Jul 27 17:53:00 CEST 2001 Jan Hubicka - - * flow.c (last_loop_beg_note): New function. - (redirect_edge_and_branch): Use it. - (split_edge): Likewise. - - * alias.c (loop_p): Avoid uninitialized memory access. - - * flow.c (try_forward_edges): Avoid accessing freed memory. - - * flow.c (backward_edge_of_syntactic_loop_p): Avoid uninitialized - variable access. - -2001-07-26 Andrew Haley - Joern Rennecke - - * config/sh/linux.h (CPP_DEFAULT_CPU_SPEC): New. - (SUBTARGET_CPP_ENDIAN_SPEC): New. - (SUBTARGET_CPP_SPEC): New. - (CPP_SPEC): Remove. - * config/sh/sh.h (SUBTARGET_CPP_ENDIAN_SPEC): New. - (SUBTARGET_CPP_PTR_SPEC): New. - (CPP_DEFAULT_CPU_SPEC): New. - (EXTRA_SPECS): Add SUBTARGET_CPP_ENDIAN_SPEC, - SUBTARGET_CPP_PTR_SPEC, and CPP_DEFAULT_CPU_SPEC. - (CPP_SPEC): Break out parts into SUBTARGET_CPP_ENDIAN_SPEC, - SUBTARGET_CPP_PTR_SPEC, and CPP_DEFAULT_CPU_SPEC. - (SUBTARGET_CPP_SPEC): Define as an empty string. - -2001-07-27 Gerald Pfeifer - - * doc/install.texi (Configuration): Properly link the host - specific instructions also when generating HTML. - -Fri Jul 27 00:33:35 EDT 2001 John Wehle (john@feith.com) - - * flow.c (redirect_edge_and_branch_force): Test - target->global_live_at_start. - -2001-07-26 Richard Henderson - - * simplify-rtx.c (avoid_constant_pool_reference): Export. - * rtl.h (avoid_constant_pool_reference): Declare it. - * dwarf2out.c (add_location_or_const_value_attribute): Use it. - (add_const_value_attribute): Use add_AT_unsigned for unsigned values. - -Thu Jul 26 22:30:22 CEST 2001 Jan Hubicka - - * rtl.h (cleanup_barriers): Declare. - * jump.c (cleanup_barriers): New function. - * toplev.c (rest_of_compilation): Call cleanup_barriers - before loop optimizer and after bb_reorder. - - * flow.c (back_edge_of_syntactic_loop_p): New. - (split_edge): Use it. - -2001-07-26 Rainer Orth - - * glimits.h (_MACH_MACHLIMITS_H_): Delete. - -Thu Jul 26 22:22:21 2001 Denis Chertykov - - * cse.c (cse_process_notes): Replace any registers if the address - remains valid. - -Thu Jul 26 14:04:03 EDT 2001 John Wehle (john@feith.com) - - * basic-block.h (PROP_ALLOW_CFG_CHANGES): Define. - (PROP_FINAL): Include PROP_ALLOW_CFG_CHANGES. - (propagate_block): Update prototype. - * flow.c (update_life_info): Simplify the CFG and - recalculate the global regs which are alive when - removing dead code during a global update. - (propagate_block): Return nonzero if an INSN is - deleted. - -2001-07-26 Rainer Orth - - * Makefile.in (LIBICONV): Define. - -2001-07-26 Catherine Moore - - * config/v850/v850.h (ENCODE_SECTION_INFO): Change order - of conditional to avoid tree checking errors. - -2001-07-26 Kazu Hirata - - * regmove.c (regmove_optimize): Don't replace a reg with - another reg of a different mode. - -2001-07-26 Andrew MacLeod - - * params.def (PARAM_MAX_PENDING_LIST_LENGTH): Add parameter to - limit length of dependency flush list. - * params.h (MAX_PENDING_LIST_LENGTH): Define. - * sched-int.h (struct deps): Add pending_flush_length field. - * sched-deps.c (flush_pending_lists): Last_pending_memory_flush now - has 1 element in it. - (sched_analyze_1): Use MAX_PENDING_LIST_LENGTH. - (sched_analyze): After a jump, if the pending memory flush list is too - large, flush the pending lists. - (init_deps): Initialize pending_flush_length to 0. - * doc/invoke.texi (max_pending_list_length): Document parameter. - -2001-07-26 Neil Booth - - * toplev.c, varasm.c, final.c: Include xcoffout.h if appropriate. - * dbxout.c (dbxout_global_decl): Move outside #ifdef. - * Makefile.in (varasm.o, final.o, toplev.o): Update dependencies. - -2001-07-26 Neil Booth - - * cpphash.h (struct_lexer_state): Delete was_skipping. - Move skipping here from struct cpp_reader. - * cpplex.c (parse_identifier): Update. - (_cpp_lex_token): Don't skip tokens in a directive. - * cpplib.c (struct if_stack): Update. - (start_directive, end_directive): Don't change skipping state. - (_cpp_handle_directive): Update. - (do_ifdef, do_ifndef, do_if, do_elif): Similarly. - (do_else, do_endif): Update; only check for excess tokens if not - in a skipped conditional block. - (push_conditional): Update for new struct if_stack. - -2001-07-26 Graham Stott - - * function.c (locate_and_pad_parm): Also pad initial offset - so that the total argument size also includes the padding. - -2001-07-26 Graham Stott - - * gensupport.c (alter_output_for_insn): Correct enable checking failure - change XSTR to XTMPL. - - (process_one_cond_exec): Likewise - -2001-07-25 Richard Henderson - - * varasm.c (assemble_variable): Create DECL_RTL before setting - TREE_ASM_WRITTEN. - -Thu Jul 26 00:19:30 CEST 2001 Jan Hubicka - - * predict.c (estimate_probability): Avoid duplicated predictions. - - * loop.c (find_and_verify_loops): Grok multiple barriers. - -Wed Jul 25 18:00:05 2001 Richard Kenner - - * config/alpha/alpha.c (print_operand, case '/'): Don't write '/'. - - * dbxout.c: Consistently use putc instead of fputc. - (print_wide_int): New function; call instead of direct fprintf. - (dbxout_type_index): Adjust calls of CHARS to be more accurate. - (dbxout_type_fields, dbxout_type_method_1): Likewise. - (dbxout_type_methods, dbxout_range_type, dbxout_type): Likewise. - (print_int_cst_octal): Likewise. - (print_octal): Show we wrote characters. - (dbxout_type): Set have_used_extensions in more places. - -2001-07-25 Catherine Moore - - * config/v850/v850.c (v850_va_arg): Use addr - instead of valist to build incr. - -Wed Jul 25 22:48:59 CEST 2001 Jan Hubicka - - * flow.c (delete_dead_jumptables): New function. - (life_analyzis): Call it. - * bb-reorder.c (skip_insns_after_block): Handle contradictory - sequences. - -2001-07-25 Richard Henderson - - * except.c (reachable_handlers): Handle a region being removed - out from under a RESX. - -2001-07-25 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_conditional_move): Always - swap GE/GT if it is an fp comparison. - -2001-07-25 Andrew Haley - - * alias.c (rtx_equal_for_memref_p): Allow strings as types in - operands. - -Wed Jul 25 08:25:01 2001 Jeffrey A Law (law@cygnus.com) - - * ssa.c (rename_insn_1): Do not wrap an assignment to a - paradoxical SUBREG inside a SEQUENCE. Fix minor formatting - glitch. - - * ssa-ccp.c (visit_expression): Handle CALL_INSNs that can - throw an exception. - (visit_expression): When attempting to simplify an expression, - retrieve any modes for arguments before they are simplified - to constants. - -2001-07-25 Andrew MacLeod - Janis Johnson - - * stmt.c (expand_goto): A nonlocal goto can be a call too. - * builtins.c (expand_builtin_longjmp): Reverse label and static chain - pointer parameters to match documented usage of nonlocal_goto. - * config/ia64/ia64.md (nonlocal_goto): Revert label and static chain - parameters to their correct order. - * config/sparc/sparc.md (nonlocal_goto): Revert label and static chain - parameters to their correct order. - -2001-07-25 Andrew MacLeod - - * config/ia64/ia64.h (STRIP_NAME_ENCODING): Strip out '*' as well. - -2001-07-25 Jan Hubicka - Richard Henderson - - * flow.c (find_sub_basic_blocks): Fix handling of the last BB in - the sequence. - (make_edges): New argument update_p; populate the edge cache if set. - (find_basic_blocks): Update make_edges invocation. - -2001-07-24 Joel Sherrill - - * config/i960/i960.h (CPP_SPEC): Define _SOFT_FLOAT for -msoft-float. - -2001-07-24 Joel Sherrill - - * config/sparc/rtems.h (CPP_PREDEFINES): Remove redundant - -Acpu and -Amachine.h. - * config/sparc/rtemself.h (CPP_PREDEFINES): Likewise. - Corrected header to say ELF not a.out. - * config/sparc/sparc.h (CPP_CPU_SPEC): Define _SOFT_FLOAT - when given -msoft-float. - -2001-07-24 Joel Sherrill - - * config.gcc (arm*-*-rtems*): Include crtinit.o and crtfini.o as - extra multilib parts like arm-elf. - (i960-*-coff*, i960-*-rtems): Should not use collect2. - (m68020-*-elf*, m68k-*-elf*, m68k-*-rtems*): Include crtinit.o and - crtfini.o as extra multilib parts. - -2001-07-24 Joel Sherrill - - * configure.in: Add rtems as a supported thread model. - * gthr-rtems.h: Add missing entry point __gthread_active_p. - * configure: Rebuilt. - -2001-07-24 Lars Brinkhoff - - * stor-layout.c (get_mode_alignment): make it work when - BITS_PER_UNIT is not a power of two. - * builtins.c (get_pointer_alignment): Likewise. - -2001-07-24 Richard Henderson - - * simplify-rtx.c (avoid_constant_pool_reference): Coerce - the retrieved constant into the expected mode. - -Wed Jul 25 01:41:27 CEST 2001 Jan Hubicka - - * flow.c (try_simplify_condjump): Avoid duplicated edges. - (verify_flow_info): Check for duplicated edges; clarify - error reporting. - - * flow.c (block_label): Update basic_block_for_insn. - (commit_edge_insertions): Call compute_bb_for_insn. - - * flow.c (purge_dead_edges): Handle conditional jumps and conditional - returns too. - - * flow.c (redirect_edge_and_branch, - try_optimize_cfg): Use redirect_edge_succ_nodup - (redirect_edge_succ_nodup): New. - * basic_block.h (redirect_edge_succ_nodup): Declare. - - * toplev.c (rest_of_compilation): Rebuild CFG before cfg_cleanup - after gcse. - -Wed Jul 25 00:32:49 CEST 2001 Jan Hubicka - - * flow.c (try_forward_edges): Accept fallthru edge; Update comment. - (try_crossjump_to_edge): Update commetns. - (try_crossjump_bb): Likewise. - -2001-07-24 Richard Henderson - - * combine.c (distribute_notes): Move set of need_refresh - for noop_move_p down to catch all cases. - -Tue Jul 24 20:32:44 CEST 2001 Jan Hubicka - - * recog.c (split_all_insns_noflow): New. - * rtl.h (split_all_insns_noflow): Declare. - * ia64.c (ia64_reorg): Use split_all_insns_noflow. - * m68hc11.c (m68hc11_reorg): Likewise. - * sh.c (machine_dependent_reorg): Likewise. - * toplev.c (rest_of_compilation): Likewise for last split_all_insns - call. - -2001-07-18 Andrew Haley - - * config/sh/sh.md (ashlsi3_std splitter): Split only after reload. - (ashlsi3_n splitter): Likewise. - (lshrsi3_n splitter): Likewise. - - (GOTaddr2picreg): Make const SImode. - (sym_label2reg): Likewise. - (symGOT2reg): Likewise. - (symGOTOFF2reg) Likewise. - - (casesi_worker_0): Make unspec SImode. - -2001-07-18 Andrew Haley - - * config/sh/sh.c (barrier_align): Check that an operand really is - an insn before extracting its INSN_CODE. - -2001-07-24 Andrew Haley - - * config/sh/sh.h (OVERRIDE_OPTIONS): Add braces to get rid of - dangling else. - - * config/sh/sh.h (INITIALIZE_TRAMPOLINE): Truncate operands - for SImode to prevent overflow. - -2001-07-24 Rainer Orth - - * config/mips/irix6-libc-compat.c: New file. - * config/mips/t-iris6 (LIB2FUNCS_STATIC_EXTRA): Use it. - * doc/install.texi (Specific, mips*-sgi-irix6): Mention structure - passing workaround. - -2001-07-24 lars brinkhoff - - * rtl.texi (REG_POINTER): Document. - (Machine Modes): Document BImode, OImode, PQImode, PHImode, - QFmode, HFmode, TQFmode, QCmode, and HCmode. - -Tue Jul 24 10:49:40 CEST 2001 Jan Hubicka - - * flow.c (delete_noop_moves): Do not confuse libcall regions. - -2001-07-23 Richard Henderson - - * flow.c (try_simplify_condjump): Use tidy_fallthru_edge. - -2001-07-23 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - general_operand_dst_push. - * config/h8300/h8300.c (general_operand_dst_push): New. - * config/h8300/h8300.h (OK_FOR_T): New. - (EXTRA_CONSTRAINT): Use it. - * config/h8300/h8300.md (movqi_push): Remove and integrate into - the existing movqi pattern. - (movhi_push): Likewise. - - * reload.c: Fix comment typos. - -Mon Jul 23 23:34:07 CEST 2001 Jan Hubicka - - * gcse.c (cprop_insn): Update call of cprop_cc0_jump. - -2001-07-23 H.J. Lu (hjl@gnu.org) - - * doc/extend.texi: Update __builtin_return_address and - __builtin_frame_address. - -2001-07-23 Richard Henderson - - * config/i386/i386.c (ix86_expand_setcc): Don't use method 0 - before CSE. - * config/i386/i386.md: New setcc+movzbl peephole2. - -2001-07-23 Neil Booth - - * objc/Make-lang.in (objc-act.o): Depend on debug.h. - * objc/objc-act.c: Include debug.h. - (synth_module_prologue): Save and restore debug hooks too. - -2001-07-23 lars brinkhoff - - * tm.texi (TARGET_FLOAT_FORMAT): Document IBM_FLOAT_FORMAT - and C4X_FLOAT_FORMAT. - (BOOL_TYPE_SIZE): Document. - -Mon Jul 23 11:54:23 2001 Clinton Popetz - - * unroll.c (loop_iterations): Fix miscalculation of initial - giv offset. - -2001-07-13 Andrew Haley - - * doc/tm.texi (MD_CAN_REDIRECT_BRANCH): New macro. - * config/sh/sh.h (MD_CAN_REDIRECT_BRANCH): New macro. - * config/sh/sh.c (sh_can_redirect_branch): New function. - * config/sh/sh-protos.h (sh_can_redirect_branch): Declare. - * reorg.c (steal_delay_list_from_target): Use - MD_CAN_REDIRECT_BRANCH to see if redirection is possible. - -Mon Jul 23 17:20:18 CEST 2001 Jan Hubicka - - * flow.c (try_simplify_condjump): Unlink insn chain on - fallthru edge; use can_fallthru. - -Mon Jul 23 16:03:19 CEST 2001 Jan Hubicka - - * basic-block.h (find_sub_basic_block): Declare. - * flow.c (make_edges): New arguments MIN and MAX; - (find_sub_basic_blocks): Revamp to use make_edges - and purge_dead_edges. - (find_basic_blocks): Update call of find_sub_basic_block. - - * recog.c (split_all_insns): Always expect CFG to be consistent; - call find_sub_basic_blocks in case something has changed. - * toplev.c (rest_of_compilation): Always call split_all_insns once CFG - has been built. - - * basic-block.h (delete_noop_moves): Declare. - * combine.c (combine_instructions): Call it. - (recog_for_combine): Tolerate noop moves - (distribute_notes): Force refresh when register dies at noop move. - * flow.c (delete_noop_moves): Use BB structure; delete JUMP insns - too. - (life_analysis): Update delete_noop_moves call. - (set_noop_p): Move too ... - * rtlanal.c (noop_move_p): ... here. - * rtl.h (noop_move_p): Declare. - - * basic-block.h (purge_all_dead_edges, purge_dead_edges): New functions. - * toplev.c (rest_of_compilation): Conditionally call purge_all_dead_edges - after combine. - * gcse.c (cprop_cc0_jump, cprop_insn): New argument "basic_block". - (cprop_jump): Likewise; call purge_dead_edges if substitution succeeded. - -2001-07-23 Hans-Peter Nilsson - - * reload.c (push_reload): Fix typo in comment. - (find_reloads_address): Ditto. - (reg_overlap_mentioned_for_reload_p): Ditto in head comment. - -2001-07-22 Richard Henderson - - * flow.c: Grammar check and clarify a lot of comments. - (try_simplify_condjump): Rename variables to be clearer. - (try_forward_edges): Skip complex and fallthru edges. - Rearrange tests to avoid duplicate checks. - (flow_find_cross_jump): Likewise. - (outgoing_edges_match): Allow match if neither branch has - probability data. Loosen probability match to 5%. - (try_crossjump_to_edge): Hoist repeated indirection into - local variables. - (try_crossjump_bb): Don't check complex edges. Eliminate - redundant crossjump tests. - (try_optimize_cfg): Fix use of bool. Reorganize cheaper - checks before more expensive checks. - -2001-07-22 Richard Henderson - - * fold-const.c (fold): Test vs FLOAT_TYPE_P instead of - INTEGRAL_TYPE_P when folding comparisons with operand_equal_p - arguments. - -2001-07-22 Richard Henderson - - * m68k.c (const_uint32_operand): Abort if mode is <= 32 bits. - (const_sint32_operand): Likewise. - * m68k.md (anon mulsi pattern): Use const_int_operand not - const_sint32_operand. - (umulsi3_highpart): Zero extend a constant input. - (smulsi3_highpart): Don't bother checking SImode constant. - (const_umulsi3_highpart): Give op3 DImode. - (const_smulsi3_highpart): Likewise. - -2001-07-22 Richard Henderson - - * flow.c (split_block): Make sure bb_note is included in the - new block when splitting before a label. - -Sun Jul 22 23:28:56 CEST 2001 Jan Hubicka - - * basic-block.h (redirect_edge_and_branch_force, - redirect_edge_and_branch, block_label, forwarder_block_p): Declare. - * flow.c (redirect_edge_and_branch_force, - redirect_edge_and_branch, block_label, forwarder_block_p): Make global. - (redirect_edge_and_branch_force): Fix copying of lifeness information. - (block_label): Handle EXIT_BLOCK_PTR by returning NULL. - * ifcvt.c (dead_or_predictable): Take BB as an new destination - instead of label; update CFG after transformation. - (find_if_case_1): Update call, use redirect_edge_and_branch_force - for finishing the transformation; handle even case where ELSE - does not follow THEN. - (find_if_case_2): Update call of dead_or_predictable; simplify - CFG update. - - * emit-rtl.c (split_branch_probability): New global variable. - (try_split): Take care to set split_branch_probability and - create REG_BR_PROB note for new jump insns. - * md.texi (define_split): Document new feature. - - * i386.c (ix86_split_fp_branch): Redistribute branch probability notes. - -2001-07-22 Neil Booth - - * varasm.c: Don't inlcude dbxout.h, sdbout.h or xcoffout.h. - (asm_out_file): Remove redundant declaration. - (assemble_asm): Remove old #if 0 block. - (assemble_variable): Remove end of function; debug output is - now handled with global_decl. Remove old #if 0 block. Update. - Remove saved_in_section and associated no-op code. - * Makefile.in (varasm.o): Correct dependencies. - -Sun Jul 22 17:55:11 2001 Alexandre Oliva - - * config/i386/freebsd-aout.h (ASM_PREFERRED_EH_DATA_FORMAT): Use - the definition in defaults.h. - -Sun Jul 22 21:31:04 CEST 2001 Jan Hubicka - - * jump.c: Update comments. - (delete_barrier_successors, delete_unreferenced_labels, - delete_noop_moves, tension_vector_labels, delete_from_jump_chain, - delete_labelref_insn, redirect_tablejump, jump_optimize_1, - jump_optimize, jump_optimize_minimal): Kill. - (rebuild_jump_labels): Move code from jump_optimize_1. - (purge_line_number_notes): Likewise. - (copy_loop_headers): Likewise. - * reg-stack.c: Update comment. - * stmt.c: Likewise. - * rtl.h (jump_optimize, jump_optimize_1, JUMP_NOOP_MOVES, - JUMP_AFTER_REGSCAN): Kill. - * toplev.c (rest_of_compilation): Use cleanup_cfg, call - purge_line_number_notes and copy_loop_headers. - -2001-07-22 Neil Booth - Richard Henderson - - * dbxout.c (dbxout_global_decl): New. - (xcoff_debug_hooks, dbx_debug_hooks): Use it. - * sdbout.c (sdbout_finish): New. - (sdbout_debug_hooks): Use it, add comments. - (sdbout_global_decl): Defer initialized public vars to - sdbout_finish. - * varasm.c (assemble_variable): Don't output debug information - for file-scope variables. - -2001-07-22 Richard Henderson - - * config/alpha/alpha.c (get_trap_mode_suffix): New. - (get_round_mode_suffix): New. - (print_operand): Use them for [/]. Remove support for [&'`()+]. - * config/alpha/alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Update. - * config/alpha/alpha.md (attr round_suffix): New. - (attr trap_suffix): New. - (all insns): Set them appropriately. Use %/ instead of the - myriad punctuators. - -2001-07-22 Neil Booth - - * dbxout.c, sdbout.c, varasm.c: Revert most recent debug patch. - -2001-07-22 Richard Henderson - - * regrename.c (regrename_optimize): Compute nregs for each - potential target register. - -2001-07-21 Neil Booth - Richard Henderson - - * dbxout.c (dbxout_global_decl): New. - (xcoff_debug_hooks, dbx_debug_hooks): Use it. - * sdbout.c (sdbout_finish): New. - (sdbout_debug_hooks): Use it, add comments. - (sdbout_global_decl): Defer initialized public vars to - sdbout_finish. - * varasm.c (assemble_variable): Don't output debug information - for file-scope variables. - -2001-07-21 H.J. Lu (hjl@gnu.org) - - * config/mips/mips.c (mips_cpu): Moved into ... - (override_options): Here. - - * config/mips/mips.h (mips_cpu_attr): Replace mips_cpu with - mips_tune. - (mips_cpu): Removed. - -2001-07-21 Stephane Carrez - - * config/m68hc11/m68hc11.md ("andqi3"): Accept d as second operand. - ("iorqi3"): Likewise. - ("xorqi3"): Likewise. - ("*addhi3"): Fix constraint to avoid reloading in a soft register. - ("*subhi3_sp): Likewise. - ("*subhi3"): Likewise. - ("extendhisi2"): Accept D, X and Y as source operand to avoid - reload problems. - -2001-07-21 Nathan Sidwell - - * doc/tm.texi: Remove DEFAULT_VTABLE_THUNKS. - * config/freebsd.h: Likewise. - * config/linux.h: Likewise. - * config/openbsd.h: Likewise. - * config/alpha/linux-elf.h: Likewise. - * config/arm/linux-elf.h: Likewise. - * config/d30v/d30v.h: Likewise. - * config/fr30/fr30.h: Likewise. - * config/ia64/aix.h: Likewise. - * config/ia64/ia64.h: Likewise. - * config/mips/linux.h: Likewise. - * config/pj/pj.h: Likewise. - * config/rs6000/linux.h: Likewise. - * config/sparc/linux.h: Likewise. - * config/sparc/linux64.h: Likewise. - -2001-07-20 Bruce Korb - - * fixinc/fixincl.c(test_for_changes): force unsigned char comparisons - because getc() and char* may disagree on signedness. - -2001-07-20 Richard Henderson - - * doc/rtl.texi (REG_DEAD): Update for current semantics. - - * flow.c (try_redirect_by_replacing_jump): Correctly compute which - insns to delete in the presence of cc0 in a jump insn. - -Fri Jul 20 22:14:49 CEST 2001 Roman Zippel - Jan Hubicka - - * m68k.md (zero_extend?i?i2 expander): Use gen_lowpart instead - of doing the change by hand. - -Fri Jul 20 21:59:42 CEST 2001 Jan Hubicka - - * rtlanal.c (set_noop_p): Return true for noop jumps. - - * expr.c (emit_single_push_insn): Add call to push expander. - * expr.h (optab_index): Add OTI_push - (push_optab): New constant. - * genopinit.c (optabs): Add push_optab. - * optabs.c (init_optab): Init push optab. - * md.texi (push??1): Document - -2001-07-20 Stephane Carrez - - * config/m68hc11/m68hc11.md ("movdi", "movdi_internal"): Use an - expand to emit the pattern; put a REG_INC note for push/pop - instructions. - ("movdf", "movdf_internal"): Likewise. - ("movsi", "movsi_internal"): Likewise. - ("movsf", "movsf_internal"): Likewise. - ("movhi", "movqi"): Emit a REG_INC note for push/pop instructions. - -2001-07-20 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_gen_highpart): Don't use - gen_highpart. - -2001-07-20 Daniel Berlin - - * params.def: Change default max inline insns to 100. - -2001-07-20 Diego Novillo - - * combine.c (combine_simplify_rtx): Generate a new shift operation - when simplifying the first operand of a (neg (ashift)) expression. - -2001-07-20 Roman Lechtchinsky - - * regclass.c (N_REG_INTS): Use only 32 bits per element. - -2001-07-20 Kelley Cook - - * doc/install.texi (sparc-sun-solaris*): Add in 4.x assembler bug - information. Move rest into ... - (*-*-solaris): ... here. Eliminate redundant information and - reword necessary packages section. Delete 4.x assembler bug info. - (sparc-sun-*): Merge into ... - (sparc-sun-sunos*): here. - -2001-07-20 Catherine Moore - - * config/v850/v850.md (casesi): Generate LABEL_REF - with Pmode. - -Fri Jul 20 14:12:57 CEST 2001 Jan Hubicka - - * i386-protos.h (ix86_zero_extend_to_Pmode): Declare. - * i386.c (ix86_zero_extend_to_Pmode): Make global. - * i386.md (strclrsi expander): Use it. - -Fri Jul 20 13:24:16 CEST 2001 Jan Hubicka - - * integrate.c (copy_insn_list): handle - NOTE_INSN_DELETED_LABEL, as if it were CODE_LABEL. - (copy_rtx_and_substitute): Likewise; behave to NOTE_INSN_DELETED_LABEL - identically as to CODE_LABEL. - - * fold-const (fold): Convert A/B/C to A/(B*C) and - A/(B/C) to (A/B)*C - - * except.c (connect_post_landing_pads): Delete the RESX insns. - -2001-07-20 Aldy Hernandez - - * config/mips/mips.h (ISA_HAS_NMADD_NMSUB): New macro. - - * config/mips/mips.md (nmadd/nmsub): Use macro. - -2001-07-20 Nathan Sidwell - - * cppinit.c (remove_dup_dir): Make static. - (remove_dup_dirs): Make static. Only warn about preempting a - system directory with a non-system directory. - -2001-07-19 Geoffrey Keating - - * ifcvt.c (noce_try_store_flag_constants): Correct order - of parameters to trunc_int_for_mode. - -2001-07-19 Mark Mitchell - - * reorg.c (fill_simple_delay_slots): If an instruction might throw - an exception that will be caught within this function, do not fill - its delay slot with any subsequent instruction. - -2001-07-19 Steve Ellcey - - * tm.texi (POINTERS_EXTEND_UNSIGNED) Modify definition. - * optabs.c (can_extend_p) Check HAVE_ptr_extend for a specialized - pointer extension instruction. - * combine.c (nonzero_bits,num_sign_bit_copies) Likewise. - * simplify-rtx.c (simplify_unary_operation) Likewise. - * explow.c (convert_memory_address) Check value of - POINTERS_EXTEND_UNSIGNED to avoid some conversions when - less than zero. - * config/ia64/t-hpux (LIBGCC, INSTALL_LIBGCC, MULTILIB_OPTIONS, - MULTILIB_DIRNAMES, MULTILIB_MATCHES) Add multilib support. - * config/ia64/hpux.h (CPP_SPEC, ASM_SPEC, SUBTARGET_SWITCHES) - Add Multilib Support. - (POINTERS_EXTEND_UNSIGNED) Define for ILP32 support. - * config/ia64/ia64.h (MASK_ILP32, TARGET_ILP32, SUBTARGET_SWITCHES) - Add Multilib Support. - (POINTER_SIZE, LONG_TYPE_SIZE, MAX_LONG_TYPE_SIZE) Modify for ILP32 - support. - * config/ia64/ia64.c (rtx_needs_barrier) Add support for addp4. - * config/ia64/ia64.md (ptr_extend) New instruction to "swizzle" - a 32 bit HP-UX pointer into a 64 bit HP-UX pointer. - -2001-07-19 Alexandre Oliva - - * simplify-rtx.c (simplify_replace_rtx): Try to obtain mode from - old and new operands in `<', `3' and `b'. - -2001-07-19 Neil Booth - - * Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h. - (final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h. - (toplev.o): Don't depend on xcoffout.h. - * c-decl.c: Include debug.h - (duplicate_decls): Use debug hook. - * dbxout.c (dbxout_source_file, dbxout_args): Make static. - (dbx_debug_hooks, xcoff_debug_hooks): Update. - (dbxout_types): Remove. - * dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove. - * debug.c (do_nothing_debug_hooks): Update. - (debug_true_tree, debug_nothing_rtx): New. - * debug.h (struct rtx_def): New. - (struct gcc_debug_hooks): New hooks ignore_block, - outlining_inline_function and label. - (debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init, - dwarf2out_frame_finish): New. - * dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function): - Make static, update prototype. - (dwarf2_debug_hooks): Update. - * dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function, - dwarf2out_frame_init, dwarf2out_frame_finish): Remove. - * dwarfout.c (dwarf_debug_hooks): Update. - * emit-rtl.c: Include debug.h. - (remove_unnecessary_notes): Use debug hook. - * final.c: Don't include dbxout.h, xcoffout.h or sdbout.h. - (final_scan_insn): Use debug hook. - * integrate.c (output_inline_function): Use debug hook. - * sdbout.c (sdbout_toplevel_data, sdbout_label): Make static. - (sdb_debug_hooks): Update. - * sdbout.h (sdbout_label, sdbout_toplevel_data): Remove. - * toplev.c: Don't include xcoffout.h. - (note_outlining_of_inline_function, debug_ignore_block): Remove. - * toplev.h (note_outlining_of_inline_function, debug_ignore_block): - Remove. - * tree.h (dwarf2out_do_frame): Remove. - -2001-07-19 Catherine Moore - - * config/v850/v850.h (ASM_OUTPUT_LABELREF): Restore. - -2001-07-19 Geoffrey Keating - - * reload1.c (eliminate_regs_in_insn): When updating a set - to the frame pointer to the hardware frame pointer, perform - the update always not just when REPLACE is set. - - * reload1.c (choose_reload_regs): Don't inherit a reload - that crosses multiple registers if registers past the first - don't fit in the desired class. - - * ifcvt.c (noce_try_store_flag_constants): Use trunc_int_for_mode - when negating constants. - -2001-07-19 Toon Moene - - * tree.def: Document restriction on {L|R}SHIFT_EXPR's second argument. - * doc/tree.texi: Ditto. - -2001-07-19 Mark Kettenis - Jakub Jelinek - - * unwind-dw2.c (_Unwind_FrameState): Add eh_ptr. - (extract_cie_info): Handle "eh" augmentation properly, - remember eh_ptr. - (struct frame_state, __frame_state_for): New. - -2001-07-19 Rainer Orth - - * config/alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS, ASM_WEAKEN_LABEL, - HANDLE_SYSV_PRAGMA): Define. - * mips-tfile.c (add_ext_symbol): Pass complete symbol ptr, inline - previous args. - (copy_object): Caller changed. - -2001-07-19 Andreas Schwab - - * configure.in (assembler dwarf2 debug_line support): Define nop - insn for m68k. - * configure: Regenerated. - -2001-07-19 Neil Booth - - * Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on - dwarfout.h. - * dbxout.c (dbxout_function): Rename dbxout_function_decl, move - to conditionally compiled block. - (dbx_debug_hooks, xcoff_debug_hooks): Update. - * dbxout.h (dbxout_function): Remove. - * debug.c (do_nothing_debug_hooks): Update. - * debug.h (struct gcc_debug_hooks): New hooks function_decl, - global_decl, deferred_inline_function. - * dwarf2out.c (dwarf2_debug_hooks): Update. - (dwarf2out_global_decl): New. - * dwarfout.c: Don't include dwarfout.h. - (dwarfout_global_decl, dwarfout_function_decl, - dwarfout_deferred_inline_function): New. - (dwarf_debug_hooks): Update. - * dwarfout.h: Remove. - * final.c: Don't include dwarfout.h. - * sdbout.c (sdbout_global_decl): New. - (sdbout_debug_hooks): Update. - * toplev.c: Don't include dwarfout.h. - (check_global_declarations, rest_of_compilation): Use new debug hooks. - (note_deferral_of_defined_inline_function): Remove. - * toplev.h (note_deferral_of_defined_inline_function): Remove. - * ch/Makefile.in (lex.o): No dependence on dwarfout.h. - * ch/lex.c: Don't include dwarfout.h. - * cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h. - (semantics.o, optimize.o): Depend on debug.h not dwarfout.h. - * cp/decl2.c: Don't include dwarfout.h and dwarf2out.h. - * cp/optimize.c: Include debug.h. - (maybe_clone_body): Use debug hook. - * cp/semantics.c: Include debug.h. - (expand_body): Use debug hook. - * po/POTFILES.in: Remove dwarfout.h. - -2001-07-19 Neil Booth - - * c-lex.c (c_lex): Remove CPP_INT, CPP_FLOAT cases. - * c-parse.in (yyerror, _yylex): Similarly. - * cppexp.c (parse_number, parse_defined, lex, _cpp_parse_expr): - Don't use CPP_INT, CPP_FLOAT; CPP_NUMBER is enough. - Update comments. - * cpplib.h (CPP_INT, CPP_FLOAT): Remove. - * cp/spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases. - -2001-07-18 Jeff Sturm - - * dwarf2out.c (dwarf2out_abstract_function): Don't emit - in-class declaration at -g1. Fixes c++/2814. - -2001-07-18 Richard Henderson - - * doc/md.texi (reload_in/out): Document restrictions in predicates - and constraints for these patterns. Document empty string matching - ALL_REGS. - -2001-07-18 Rainer Orth - - * defaults.h (ASM_OUTPUT_WEAK_ALIAS): Check for ASM_WEAKEN_LABEL. - -Wed Jul 18 20:47:36 CEST 2001 Jan Hubicka - - * cse.c: Undo my previous patch. - -2001-07-18 Tom Tromey - - For PR java/2812: - * configure: Rebuilt. - * configure.in: Don't check for iconv.h or iconv(); use AM_ICONV - instead. - * aclocal.m4 (AM_ICONV): New macro from Bruno Haible. - -Wed Jul 18 18:46:30 CEST 2001 Richard Henderson - Jan Hubicka - - * flow.c (redirect_edge_and_branch): Bail out on complex edges. - (try_optimize_cfg): Do not remove tail recursive labels before sibcall. - * jump.c (mark_jump_label): Do not forward branches. - -Wed Jul 18 18:35:01 CEST 2001 Jan Hubicka - - * cse.c (delete_trivially_dead_insns): Delete the libcall block - when return value is unused. - -Wed Jul 18 18:28:16 CEST 2001 Jan Hubicka - - * gcse.c (pre_insert_copy_insn): Call update_ld_motion_stores. - -Wed Jul 18 12:05:29 2001 Nicola Pero - - * gthr-posix.h (__gthread_objc_mutex_trylock): Fixed return value - on error. We can't blindly return the result of - pthread_mutex_trylock because it returns a positive number on - error, while we must return -1 on error. - (__gthread_objc_mutex_lock, __gthread_objc_mutex_unlock): Similar - fixes. - Reported by Stephen Brandon . - -2001-07-18 Andreas Jaeger - - * integrate.c (output_inline_function): Correct type of debug_hooks. - -2001-07-18 Toon Moene - - * combine.c (combine_simplify_rtx): DIV can be treated - associatively for floats if unsafe math optimisations are enabled. - -2001-07-17 Richard Henderson - - * reload.c (push_secondary_reload): Accept empty-string for ALL_REGS. - -2001-07-17 Richard Henderson - - * calls.c (prepare_call_address): New parameter SIBCALLP. If true, - don't force the function address into a register. - (expand_call, emit_library_call_value_1): Update callers. - * builtins.c (expand_builtin_apply): Likewise. - * expr.h (prepare_call_address): Update decl. - -2001-07-17 Chandrakala Chavva - - * config.gcc: For *-*-chorusos triplet, get chorus.h file from - config directory. - * config/i386/chorus.h: Move up. - * config/sparc/chorus.h: Likewise. - * config/rs6000/chorus.h: Likewise. - * config/chorus.h: Moved here. - -2001-07-17 Andreas Schwab - - * configure.in (assembler eh_frame optimization): Handle big - endian. - * configure: Regenerated. - -Tue Jul 17 23:43:31 CEST 2001 Jan Hubicka - - * expr.c (epxand_expr): Convert divisions into multiplications by - reciprocals if -ffast-math. - -2001-07-17 Neil Booth - - * dbxout.c (dbxout_really_begin_function): Rename to - dbxout_begin_function. - (dbx_debug_hooks, xcoff_debug_hooks): Update. - (dbxout_begin_function): Remove. - (dbxout_function): Update. - (dbxout_source_line): Update prototype. - * dbxout.h (dbxout_begin_function): Remove. - * debug.c (do_nothing_debug_hooks): Update. - (debug_nothing_tree): Update. - (debug_nothing_charstar_rtx): Remove. - * debug.h (union tree_node): Declare. - (struct rtx_def): Remove. - (gcc_debug_hooks): New hooks begin_prologue, end_prologue, - begin_function. Change source_line prototype. - (debug_nothing_tree): New. - (debug_nothing_charstar_rtx): Delete. - (dwarf2out_begin_prologue): Moved from ... - * tree.h: ... here. - * dwarf2out.c (dwarf2_debug_hooks): Update. - (dwarf2out_begin_prologue): Update prototype. If genuine dwarf2 - debug info, call dwarf2out_source_line. - (dwarf2out_souce_line): Update prototype. - * dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue. - Change prototype, make static. - (dwarfout_source_line): Update prototype. - (dwarf_debug_hooks): Update. - * dwarfout.h (dwarfout_begin_function): Remove. - * final.c (final_start_function, final_scan_insn): Use appropriate - debug hooks, update to use notice_source_line. - (output_source_line): Rename notice_source_line. Don't call the - source_line debug hook. - * sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue, - make static, update prototype. - (sdbout_mark_begin_function): Rename sdbout_begin_function, update - prototype. - (sdbout_end_prologue): New. - (sdbout_source_line): Update prototype. - (sdbout_debug_hooks): Update. - (sdbout_symbol): Remove unused var. - * sdbout.h (sdbout_begin_function, sdbout_mark_begin_function): - Delete. - * varasm.c: Include debug.h. - (assemble_start_function): Use begin_function debug_hook. - * xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function, - update with prototype. - (xcoffout_source_line): Update prototype. - * xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function, - update prototype. - (xcoffout_source_line): Update prototype. - -2001-07-17 Richard Henderson - - * c-typeck.c (build_binary_op): Do not shorten unsigned - right shift after sign extension. - -Tue Jul 17 16:56:05 CEST 2001 Jan Hubicka - - * combine.c (combine_simplify_rtx): Attempt to simplify - a*(b/c) as (a*b)/c for floats in unsafe_math mode. - - * simplify-rtx.c (avoid_constatn_pool_reference): New static function. - (simplify_binary_operation, simplify_unary_operation, - simplify_relational_operation): Use it. - - * combine.c (combine_simplify_rtx): Don't do associative law - on divisions; allow associative law on floats. - -2001-07-17 H.J. Lu - Rainer Orth - - * c-pragma.h (HANDLE_PRAGMA_WEAK): Define iff ASM_WEAKEN_LABEL and - ASM_OUTPUT_WEAK_ALIAS are defined. - * defaults.h (ASM_OUTPUT_WEAK_ALIAS): Define if possible. - * config/mips/iris6.h (ASM_OUTPUT_WEAK_ALIAS, ASM_WEAKEN_LABEL): - Moved ... - * config/mips/iris5.h: ... here. - (HANDLE_SYSV_PRAGMA): Defined as 1. - * varasm.c (weak_finish): Use ASM_OUTPUT_WEAK_ALIAS. - * doc/tm.texi (ASM_OUTPUT_WEAK_ALIAS): Support the undefined weak - symbol. - -2001-07-17 Joseph S. Myers - - * c-parse.in (all_prefix_attributes): New variable. - (PUSH_DECLSPEC_STACK, POP_DECLSPEC_STACK): New macros. - (maybe_resetattrs): New production. - (c_parse_init, datadef, fndef, datadecl, setspecs, setattrs, decl, - maybe_type_quals_setattrs, initdecls, notype_initdecls, initdcl, - notype_initdcl, nested_function, notype_nested_function, - component_decl, components, components_notype, - component_declarator, component_notype_declarator, - absdcl_maybe_attribute, parm, firstparm, setspecs_fp, ivar_decl, - ivars, mydecl, myparm): Update. Avoid prefix attributes just - after a comma being applied to more than one declarator. - * doc/extend.texi (Attribute Syntax): Update. Remove - documentation of bugs that are no longer present. - -2001-07-13 Eric Christopher - - * config/mips/mips.h: Change TUNE_MIPS* options to use - mips_tune. - (EXTRA_SPECS): Add cc1_cpu_spec. - * config/mips/mips.md (muldf3): Fix typo. - -2001-07-16 Richard Henderson - - * config/m68k/m68k.c: Include expr.h and reload.h. - (print_operand_address) [16 bit int]: Cast INTVAL to int for %d. - [general int]: Use HOST_WIDE_INT_PRINT_DEC. - -2001-07-16 Daniel Berlin - Richard Henderson - - * cse.c (set_live_p): Take INSN argument for cc0; update callers. - (insn_live_p): Fix fall off end of function. - (dead_libcall_p): Remove COUNTS argument; update callers. - (delete_trivially_dead_insns): Remove unused variables. - -2001-07-17 Andreas Jaeger - - * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix output format for - x86-64 pic support. - - * lcm.c (optimize_mode_switching): Avoid warning for unused - variable if !NORMAL_MODE. - - * flow.c (try_crossjump_to_edge): Remove unused variable. - -2001-07-16 John David Anglin - - * inclhack.def (ultrix_atexit_param): New hack to fix ultrix 4.3 - atexit declaration in stdlib.h. - -2001-07-16 Richard Begg - - * fixinc/inclhack.def(hpux_vsnprintf): brokenness in stdio.h - -Mon Jul 16 22:48:00 CEST 2001 Jan Hubicka - - * basic-block.h (CLEANUP_PRE_SIBCALL): New constant. - * except.c (finish_eh_generation): Update call of cleanup_cfg; - do rebuild_jump_labels instead of jump_optimize - * sibcall.c (optimize_sibling_and_tail_recursive_call): Likewise. - * toplev.c (rest_of_compulation): Likewise for -Wreturn_type. - * flow.c (try_optimize_cfg): Remove unneeded code_labels. - - * flow.c: Include timevar.h - (find_basic_block): Push/pop timevar; - (cleanup_cfg): Likewise. - * timevar.def (TV_CFG, TV_CLEANUP_CFG): New. - * Makefile: Add dependencies on timevar.h - - * integrate.c (save_for_inline): Kill all BASIC_BLOCK notes. - (copy_insn_list): Avoid killing of BASIC_BLOCK notes. - - * rtl.h (delete_trivially_dead_insns): Add new parameter. - * toplev.c (rest_of_compilation): Update calls. - * cse.c (set_live_p, insn_live_p, dead_libcall_p): Break out from ... - (delete_trivially_dead_insns): ... here; accept new argument - preserve_basic_blocks; preserve basic blocks if set. - - * reg-stack.c (stack_regs_mentioned): Return 0 if - stack_regs_mentioned_data is not initialized. - (reg_to_stack): Make stack_regs_mentioned survive after the - reg-stack is completted; do not call cleanup_cfg. - * toplev.c (rest_of_compilation): Do cleanup_cfg before bb-reorder; - make cleanup_cfg after bb-reorder to output to debug file. - -2001-07-16 Richard Henderson - - * regclass.c (init_reg_sets): Use only 32 bits per initializer - from int_reg_class_contents. - -2001-07-16 Richard Henderson - - * hard-reg-set.h (regs_invalidated_by_call): Declare. - * regclass.c (regs_invalidated_by_call): Move from cse.c. - (init_reg_sets_1): Move initialization from cse_main. - * cse.c (regs_invalidated_by_call): Move to regclass.c. - (cse_main): Move its initialization also. - * df.c (df_insn_refs_record): Use regs_invalidated_by_call. - * flow.c (propagate_one_insn): Likewise. - * gcse.c (compute_hash_table): Likewise. - (compute_kill_rd, compute_store_table): Likewise. - * sched-deps.c (sched_analyze_1): Likewise. - -Mon Jul 16 18:07:07 2001 J"orn Rennecke - - * gcse.c (pre_insert_copy_insn): Use gen_move_insn instead of - gen_rtx_SET. - -2001-07-16 Steve Ellcey - - * dominance.c (calc_dfs_tree_nonrec): Reverse order of tests - in if statement so we don't access undefined memory. - -2001-07-16 Daniel Berlin - - * gcse.c: Update comment at top. - Update comment on mem handling. - mem_last_set, mem_first_set, mem_set_in_block: gone. - Declaration of reg_set_info: gone. - (oprs_unchanged_p): Don't use mem_*set_* anymore. They are - pointless with load_killed_in_block_p (they are *more* - conservative then it, not less, and less accurate). - (oprs_not_set_p): Ditto. - (alloc_gcse_mem): Don't allocate mem_set_in_block - (free_gcse_mem): Don't free it, either. - (record_last_mem_set_info): Update comment in front, remove - mem_*set_* stuff. Note the reason we don't handle stores directly - here. - (compute_hash_table): Update comments to reflect reality. Remove - mem_*set_* references. - (reset_opr_set_tables): Remove mem_*set_* references. - (mark_call): Ditto. - (mark_set): Ditto. Also remove double sets of bitmaps for REG's. - (mark_clobber): Ditto (on both parts, we double set here too). - (expr_killed_p): Remove mem_set_in_block test. - (compute_transp): Remove mem_set_in_block test. - - * ssa-ccp.c: (optimize_unexecutable_edges): Add note about removal - of edge, and removal of phi alternative to dump file. - (ssa_ccp_substitute_constants): Add note about register now being - constant, and which uses were replaced in what insns to dump file. - -2001-07-16 Andreas Jaeger - - * gcov.c (output_data): Use HOST_WIDEST_INT_PRINT_DEC to output - variables of type HOST_WIDEST_INT. - - * libgcc2.c (__bb_exit_func): Handle gcov_type as long long. - (__bb_exit_func): Correct type of count_max to avoid overflow. - (num_digits): Handle long long argument. - - * combine.c (gen_lowpart_for_combine): Remove unused variable. - -2001-07-16 Neil Booth - - * output.h (sdb_begin_function_line): Restore as an extern - variable. - * sdbout.c (sdb_begin_function_line): Make extern. - -2001-07-15 Richard Henderson - - * machmode.def (Pmode): Redefine if GENERATOR_FILE. - * genrecog.c (maybe_both_true_mode): New. - (maybe_both_true_2): Use it. - (write_switch): Don't put Pmode in a switch. - * rtl.c (mode arrays): Don't explicitly size them. - -Sun Jul 15 14:07:36 CEST 2001 Jan Hubicka - - * toplev.c (rest_of_compilation): Fix register_life_up_to_date - handling; move unconditional splitting before mode switching. - - * i386.md (type): Add fistp type. - (i387, length_attr, scheduling definitions): Handle this type. - (fix_trunc?f?i2): Revamp to use mode switching. - (fix_trunct?f?i_nonmemory, fix_trunc?f?i_memory): New patterns. - * i386.h (fp_cw_mode): New enum - (OPTIMIZE_MODE_SWITCHING, NUM_MODES_FOR_MODE_SWITCHING, MODE_NEEDED, - MODE_PRIORITY_TO_MODE, ENUM_MODE_SET): New macros. - -Sun Jul 15 12:53:51 2001 Richard Kenner - - * Makefile.in (integrate.o): Add debug.h. - * integrate.c (debug.h): Add. - (output_inline_function): Save, reset, and restore debug_hooks. - -2001-07-15 Richard Henderson - - * config/alpha/alpha.c (alpha_emit_xfloating_compare): Use CCmode - instead of COMPARE for the EQUIV expression. - -2001-07-15 Richard Henderson - - * flow.c (redirect_edge_and_branch_force): Initialize - global_live_at_start and global_live_at_end. - (allocate_bb_life_data): Export. - * basic-block.h (allocate_bb_life_data): Declare. - * toplev.c (rest_of_compilation): Call it. - -2001-07-15 Richard Henderson - - * config/alpha/alpha.c (alpha_tablejump_addr_vec): New. - (alpha_tablejump_best_label): New. - * config/alpha/alpha-protos.h: Declare them. - * config/alpha/alpha.md: Use braced strings for code blocks. - (tablejump_osf): Break out add with r29. - (tablejump_osf_internal): Remove. - (tablejump_osf_nt_internal): Rename from tablejump_nt_internal, - use alpha_tablejump_addr_vec and alpha_tablejump_best_label. - -Sun Jul 15 00:53:35 CEST 2001 Jan Hubicka - - * loop.c (scan_loop): Add USEs inside PARALLELs into dependencies - of the movable. - - * toplev.c (rest_of_compilation): Allow new pseudoes for mode switching. - - * i386-protos.h (ix86_split_fp_branch): Update prototype. - (ix86_fp_jump_nontrivial_p): New. - * i386.md (fp_jcc_?): Update call of split_fp_branch; - use ix86_fp_jump_nontrivial_p. - * i386.c (ix86_fp_jump_nontrivial_p): New. - (ix86_split_fp_branch): Accept code instead of rtx. - (ix86_expand_compare): Expand comparison early in case - doing so is resonably cheap. - -2001-07-15 Nick Clifton - - * config/rs6000/sysv4.h (CPP_ENDIAN_BIG_SPEC): Assert 'endian' - not 'machine'. - (CPP_ENDIAN_LITTLE_SPEC): Assert 'endian' not 'machine'. - (CPP_ENDIAN_SOLARIS_SPEC): Assert 'endian' not 'machine'. - -2001-07-15 Neil Booth - - * dbxout.c (dbxout_source_line): Make static, update prototype. - (dbx_debug_hooks, xcoff_debug_hooks): Add new hooks. - (dbxout_init, dbxout_finish, dbxout_source_line, - dbxout_begin_block, dbxout_end_block): Update for new prototypes. - * dbxout.h (dbxout_source_line): Delete. - * debug.c (debug_nothing_file, debug_nothing_file_int, - debug_nothing_file_charstar_rtx): New. - (do_nothing_debug_hooks): Update. - (debug_nothing_void, debug_nothing_charstar_rtx, - dwarf2out_end_epilogue): New. - (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. - * debug.h (struct rtx_def): Declare. - (gcc_debug_hooks): New hooks source_line, end_epilogue - and end_function. - (debug_nothing_void, debug_nothing_charstar_rtx, - dwarf2out_end_epilogue): New. - (debug_nothing_file_charstar, debug_nothing_file_int_int): Rename. - * dwarf2out.c (dwarf2out_source_line): Make static, update prototype. - (dwarf2_debug_hooks): Update. - (dwarf2out_init, dwarf2out_finish, dwarf2out_source_line, - dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes. - * dwarf2out.h (dwarf2out_source_line): Remove. - * dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function): - Make static, update prototype. - (dwarfout_init, dwarfout_finish, dwarfout_source_line, - dwarfout_begin_block, dwarfout_end_block): Update for new prototypes. - (dwarf_debug_hooks): Update. - * dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line, - dwarfout_end_function): Remove. - * final.c (profile_function): Use debug hooks for ending functions - and epilogues. - (output_source_line, final_end_function): Update prototype, - use debug hooks. - (final_start_function, final_scan_insn): Update. - * output.h (sdb_begin_function_line): Remove. - (final_end_function): Update prototype. - * sdbout.c (sdb_begin_function_line): Make static. - (PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue. - (sdbout_source_line): New. - (sdbout_end_epilogue, sdbout_end_function): Make static, update - prototypes. - (sdb_debug_hooks): Update. - (sdbout_init, sdbout_source_line, - sdbout_begin_block, sdbout_end_block): Update for new prototypes. - * sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove. - * toplev.c (compile_file, rest_of_compilation): Update. - * tree.h (dwarf2out_end_epilogue): Move to debug.h. - * xcoffout.c (xcoffout_source_line, xcoffout_begin_block, - xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function): - Update for prototype changes. - * xcoffout.h (xcoffout_source_line, xcoffout_begin_block, - xcoffout_end_block, xcoffout_end_epilogue): Update prototypes. - -2001-07-15 Richard Henderson - - * config/alpha/alpha.h (TARGET_ABI_OSF): New. - (TARGET_ABI_WINDOWS_NT, TARGET_ABI_OPEN_VMS): Rename; update users. - * config/alpha/alpha-protos.h: Update TARGET_ABI_* users. - * config/alpha/alpha.c: Likewise. - * config/alpha/alpha.md: Likewise. - * config/alpha/alpha32.h: Likewise. - * config/alpha/vms.h: Likewise. - (OPEN_VMS): Remove. - -2001-07-14 Richard Henderson - - * config/alpha/alpha.md: Use define_constants for unspec values. - Substitute throughout. - -2001-07-14 Tim Josling - - * tree.def (EXPON_EXPR) remove. Never supported anyway. - -2001-07-14 John David Anglin - - * pa.md: Remove unused constraints from define_split's. - -2001-04-14 Richard Henderson - - * ifcvt.c (find_cond_trap): Test for exit block. - -Sun Jul 15 00:50:20 CEST 2001 Jan Hubicka - - Re-install recently reverted patch. - * emit-rtl.c (try_split): Update mark_jump_label call. - * flow.c (find_sub_basic_blocks): Likewise. - * jump.c (cross_jump_death_matters, find_cross_jump, do_cross_jump, - jump_back_p): Kill. - (mark_all_labels): Kill second parameter. - (jump_optimize, jump_optimize_1): Kill cross_jump parameter. - (rebuild_jump_labels, jump_optimize_minimal): Update call - of jump_optimize_1. - (jump_optimize_1): Kill crossjumping code. - (mark_jump_label): Kill cross_jump parameter. - * rtl.h (mark_jump_label, jump_optimize): Update prototypes. - (JUMP_CROSS_JUMP, JUMP_CROSS_JUMP_DEATH_MATTERS): Kill. - * reg-stack.c (reg_to_stack): Do not rebuild if not needed; do - splitting. - * toplev.c (enum dump_file_index): Kill DFI_jump2; put DFI_stack before - DFI_bpro. - (dump_file_info): Likewise. - (rest_of_compilation): Update calls to jump_optimize; kill jump2 pass; - reorganize passes to do reg-stack first, bb-reorder second. - * invoke.texi (-d letters doc): Remove the jump2 pass. - -2001-07-14 Richard Henderson - - * ifcvt.c (find_cond_trap): New. - (find_if_header): Call it. - (merge_if_block): Relax existing jump sanity check. - * jump.c (jump_optimize_1): Remove conditional trap handling. - -2001-07-14 Alan Modra - - * config/pa/pa.c (emit_hpdiv_const): Return reg is r2 for 64-bit - millicode. - (insn_refs_are_delayed): Correct comment. - * config/pa/pa.h (INSN_REFERENCES_ARE_DELAYED): Likewise. - * config/pa/pa.md (mulsi3): If TARGET_64BIT, clobber r2 - instead of r31. Make associated insn !TARGET_64BIT, and - provide an additional 64-bit insn that clobbers r2. - (divsi3): Likewise. - (udivsi3): Likewise. - (modsi3): Likewise. - (umodsi3): Likewise. - -Sat Jul 14 02:58:38 CEST 2001 Jan Hubicka - - * bb-reorder.c (skip_insn_after_block): Get past the line number notes. - - * flow.c (redirect_edge_and_branch_force, split_edge, - try_crossjump_to_edge): Use set_block_for_new_insns. - * bb-reorder.c (emit_jump_to_block_after): Call set_block_for_new_insns. - -2001-07-13 H.J. Lu (hjl@gnu.org) - - * config/elfos.h (UNIQUE_SECTION): Enable .bss section with - the correct patch. - -2001-07-13 Geoffrey Keating - - Revert H.J. Lu's UNIQUE_SECTION patch of 2001-07-13. - -2001-07-13 Joseph S. Myers - - * c-common.c (decl_attributes): Take a pointer to the node to - which attributes are to be attached, and a flags argument. - * c-common.h (enum attribute_flags): New. - (decl_attributes): Update prototype. - * c-decl.c (start_decl, push_parm_decl, finish_struct, - finish_enum, start_function): Update calls to decl_attributes. - * c-parse.in (component_declarator, component_notype_declarator, - label): Update calls to decl_attributes. - -Fri Jul 13 23:04:00 2001 Denis Chertykov - - * config/avr/avr.md (strlenhi): PARALLEL keyword removed. - * config/avr/avr.c (legitimate_address_p): Return value changed - from letter to register classes. For better debugging. - -2001-07-13 Kazu Hirata - - * jump.c (reversed_comparison_code_parts): Fix comment typos. - -2001-07-13 H.J. Lu (hjl@gnu.org) - - * config/elfos.h (UNIQUE_SECTION): Enable .bss section. - -2001-07-13 Marc Espie - - * config.gcc (*-*-openbsd*): Add fragment to compile libgcc - correctly for shared configurations. - * config/t-libgcc-pic: New. - * config/{i386,m68k,sparc}/t-openbsd: New. - * config/openbsd.h: Include cpu_spec in cpp_spec where needed. - Support -shared. Support debugging libraries with -g. - * config/i386/openbsd.h: Correct ASM_COMMENT_START. Ensure dwarf2 - frame information does not emit pointer diffs. - * config/sparc/openbsd.h: Ensure dwarf2 frame information does not - emit pointer diffs. - -2001-07-13 Geoffrey Keating - - Revert Jan Hubicka's patch of Fri Jul 13 14:46:21 CEST 2001. - -2001-07-13 David Edelsohn - - * combine.c (try_combine): Ensure const_int pow2 is positive. - -2001-07-13 Hartmut Penner - - * config.gcc: Add configuration for s/390. - * config/s390/s390.c: New. Subroutines for code generation. - * config/s390/s390.h: New. Definitions for s/390. - * config/s390/s390-protos.h: New. Prototypes. - * config/s390/linux.h: New. Definitions for linux for s/390. - * config/s390/linux64.h: New. Definitions for linux for zSeries. - * config/s390/t-linux: New. Makefile fragment. - * config/s390/s390.md: New. Machine description for s/390 and zSeries. - * config/s390/fixdfdi.h: New. Fix L_fix*di. - -Fri Jul 13 14:46:21 CEST 2001 Jan Hubicka - - * emit-rtl.c (try_split): Update mark_jump_label call. - * flow.c (find_sub_basic_blocks): Likewise. - * jump.c (cross_jump_death_matters, find_cross_jump, do_cross_jump, - jump_back_p): Kill. - (mark_all_labels): Kill second parameter. - (jump_optimize, jump_optimize_1): Kill cross_jump parameter. - (rebuild_jump_labels, jump_optimize_minimal): Update call - of jump_optimize_1. - (jump_optimize_1): Kill crossjumping code. - (mark_jump_label): Kill cross_jump parameter. - * rtl.h (mark_jump_label, jump_optimize): Update prototypes. - (JUMP_CROSS_JUMP, JUMP_CROSS_JUMP_DEATH_MATTERS): Kill. - * reg-stack.c (reg_to_stack): Do not rebuild if not needed; do - splitting. - * toplev.c (enum dump_file_index): Kill DFI_jump2; put DFI_stack before - DFI_bpro. - (rest_of_compilation): Update calls to jump_optimize; kill jump2 pass; - reorganize passes to do reg-stack first, bb-reorder second. - * invoke.texi (-d letters doc): Remove the jump2 pass. - -2001-07-12 Steve Ellcey - - * toplev.c (compile_file): Put call of ASM_FILE_START inside ifdef. - -Thu Jul 12 17:57:16 CEST 2001 Jan Hubicka - - * flow.c (try_optimize_cfg): Delete whole chain of trivially dead - basic blocks. - (verify_flow_info): Make diagnostics prettier. - -Thu Jul 12 16:48:54 CEST 2001 Jan Hubicka - - * flow.c (find_basic_blocks_1): Do not emit NOP after call. - - * flow.c (outgoing_edges_match): Return early if condition reversal - failed. - -2001-07-06 Richard Sandiford - - * config/mips/mips.c (print_operand): Extend '%D' to memory operands. - (mips_move_2words): When splitting a move into two instructions, - prefix the second address operand with '%D'. - -2001-07-12 Neil Booth - - * Makefile.in (final.o): Depend on debug.h. - * dbxout.c (dbxout_begin_block, dbxout_end_block): New. - (dbx_debug_hooks): Add new hooks. - (xcoff_debug_hooks): New. - * debug.c (debug_nothing_file_int_int): New. - (do_nothing_debug_hooks): Update. - * debug.h (gcc_debug_hooks): New hooks begin_block and end_block. - (debug_nothing_file_int_int): New. - * dwarf2out.c (dwarf2out_begin_block, dwarf2out_end_block): Make - static, update prototype. - (dwarf2_debug_hooks): Update. - * dwarf2out.h (dwarf2out_begin_block, dwarf2out_end_block): Remove. - * dwarfout.c (dwarfout_begin_block, dwarfout_end_block): Make - static, update prototype. - (dwarf_debug_hooks): Update. - * dwarfout.h (dwarfout_begin_block, dwarfout_end_block): Remove. - * final.c: Include debug.h. - (final_scan_insn): Use debug hooks when beginning and ending blocks. - * sdbout.c (sdbout_begin_block, sdbout_end_block): Make - static, update prototype. - (sdb_debug_hooks): Update. - * sdbout.h (sdbout_begin_block, sdbout_end_block): Remove. - * toplev.c: Distinguish between xcoff and dbx. - - * f/lex.c (ffelex_file_pop_, ffelex_file_push_, ffelex_hash_): - Call all debug hooks, not just dwarf ones. - -2001-07-11 Timothy Wall - - * config.gcc: Add configuration for AIX5/IA64. - * config/ia64/aix.h: New. AIX5/IA64-specific configuration. - * config/ia64/crt[in].asm: New. Generic static ctor/dtor - support prefix/suffix code. - * config/ia64/t-aix: New. Makefile fragment. - * config/ia64/unwind-aix.c: New. Unwind table entry lookup. - -2001-07-11 Kazu Hirata - - * recog.c (validate_change): Fix a comment typo. - -2001-07-11 Neil Booth - - * Makefile.in (c-lex.o): Wrap long lines. Depend on debug.h. - * c-lex.c (cb_file_change, cb_define, cb_undef): Use debug - hooks directly. - * dbxout.c (dbx_debug_hooks): Add new hooks. - (dbxout_start_new_source_file): Rename dbxout_start_source_file, - make static. - (dbxout_resume_previous_source_file): Rename dbxout_end_source_file, - make static. - * dbxout.h (dbxout_start_new_source_file, - dbxout_resume_previous_source_file): Delete. - * debug.c (do_nothing_debug_hooks): Add new hooks. - (debug_nothing_init_finish): Rename debug_nothing_file_charstar. - (debug_nothing_int_charstar, debug_nothing_int): New. - * debug.h (gcc_debug_hooks): New hooks define, undef, - start_source_file and end_source_file. - (debug_nothing_init_finish): Rename debug_nothing_file_charstar. - (debug_nothing_int_charstar, debug_nothing_int): New. - * dwarf2out.c (dwarf2_debug_hooks): Add new hooks. Move into - the conditionally compiled section. - (dwarf2out_start_source_file, dwarf2out_end_source_file, - dwarf2out_define, dwarf2out_undef): Make static. - * dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file, - dwarf2out_define, dwarf2out_undef): Remove. - * dwarfout.c (dwarf_debug_hooks): Add new hooks. - (dwarfout_start_source_file, dwarfout_end_source_file, - dwarfout_define, dwarfout_undef): Make static. - (dwarfout_start_source_file_check, - dwarfout_end_source_file_check): New. - (dwarfout_define, dwarfout_finish): Update. - * dwarfout.h (dwarfout_start_new_source_file, - dwarfout_resume_previous_source_file, dwarfout_define, - dwarfout_undef): Remove. - * sdbout.c (sdb_debug_hooks): Add new hooks. - (sdbout_start_new_source_file): Rename sdbout_start_source_file, - make static. - (sdbout_resume_previous_source_file): Rename sdbout_end_source_file, - make static, take an arg. - * sdbout.h (sdbout_start_new_source_file, - sdbout_resume_previous_source_file): Delete. - * toplev.c (debug_start_source_file, debug_end_source_file, - debug_define, debug_undef): Delete. - * toplev.h (debug_start_source_file, debug_end_source_file, - debug_define, debug_undef): Delete. - - * java/jcf-parse.c: Include debug.h. - (parse_class_file): Update to use debug hooks directly. - * java/Make-lang.in (jcf-parse.o): Depend on debug.h. - -Wed Jul 11 10:07:18 2001 Richard Kenner - - * alias.c (set_mem_alias_set): New function. - * rtl.h (set_mem_alias_set): Declare it. - * builtins.c (expand_builtin_return_addr): Call it instead of - using MEM_ALIAS_SET accessor. - (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise. - (get_memory_rtx, expand_builtin_va_arg): Likewise. - (expand_builtin_va_copy):Likewise. - * caller-save.c (setup_save_areas): Likewise. - * calls.c (compute_argument_addresses): Likewise. - * explow.c (set_mem_attributes): Likewise. - * expr.c (emit_single_push_insn, emit_push_insn): Likewise. - (expand_assignment, store_constructor_field, store_field): Likewise. - (expand_expr_unaligned): Likewise. - * function.c (assign_stack_temp_for_type): Likewise. - (put_reg_into_stack, gen_mem_addressof): Likewise. - * ifcvt.c (noce_try_cmove_arith): Likewise. - * reload1.c (reload, alter_reg): Likewise. - * config/alpha/alpha.c (get_aligned_mem): Likewise. - (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise. - (alpha_expand_unaligned_store): Likewise - (alpha_expand_unaligned_load_words): Likewise. - (alpha_expand_unaligned_store_words): Likewise. - (alpha_expand_block_clear, alpha_expand_prologue): Likewise. - (alpha_expand_epilogue): Likewise. - * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. - * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise. - * config/i386/i386.c (legitimize_pic_address): Likewise. - * config/i960/i960.c (setup_incoming_varargs): Likewise. - * config/ia64/ia64.c (spill_restore_mem): Likewise. - * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. - * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise. - * config/mips/mips.c (mips_va_arg): Likewise. - * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. - * config/pa/pa.c (hppa_builtin_saveregs): Likewise. - * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. - (setup_incoming_varargs, rs6000_va_arg): Likewise. - (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise. - (rs6000_emit_epilogue): Likewise. - * config/sh/sh.c (sh_builtin_saveregs): Likewise. - * config/sparc/sparc.c (sparc_va_arg): Likewise. - * config/v850/v850.c (v850_va_arg): Likewise. - -Wed Jul 11 21:27:25 CEST 2001 Jan Hubicka - - * flow.c (merge_blocks_move_successor_nojumps): Do not crash - when fallthru edge is present. - (mege_blocks): Handle case where creation of jump insn - is required. - - * basic-block.h (CLEANUP_EXPENSIVE, CLEANUP_CROSSJUMP, - CLEANUP_POST_REGSTACK): New constants. - * except.c (finish_eh_generation): Update call of cleanup_cfg, - * jump.c (rtx_renumbered_equal_p): Handle 't' fields. - * output.h (cleanup_cfg): Update prototype. - * reg-stack.c (reg_to_stack): Use cleanup_cfg instead of jump_optimize - * sibcall.c (optimize_sibling_and_tail_recursive_call): Update - cleanup_cfg call; kill missleading comment. - * toplev.c (rest_of_compilation): Update all cleanup_cfg calls. - * flow.c (merge_blocks, try_optimize_cfg, cleanup_cfg): Accept mode - parameter; control optimizations performed using it. - (flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, - try_crossjump_bb): New functions. - -2001-07-11 John David Anglin - - * pa.c (pa_output_function_prologue): Delete prototype. Make function - extern. - * pa.h (ASM_OUTPUT_MI_THUNK): Rename output_function_prologue to - pa_output_function_prologue. - * pa-protos.h (pa_output_function_prologue): New prototype. - -2001-07-11 John David Anglin - - * stmt.c (emit_case_nodes): Widen high and low instead of new_bound - and low to get correct sign extension in low+high test. - -2001-07-11 Janis Johnson - - * gcov.c (arcdata): Use gcov_type to fix branch percentage - for large hit count. - - * profile.c (branch_prob): Fix .bbg info for computed gotos - and C++ EH code. - -2001-07-11 Mark Mitchell - - * stmt.c (parse_output_constraint): New function, split out - from ... - (expand_asm_operands): ... here. Use parse_output_constraint. - * tree.h (parse_output_constraint): Declare it. - -2001-07-11 Richard Henderson - - * bitmap.c: Comment some functions; fiddle whitespace. - (bitmap_free): Don't export. - (bitmap_element_allocate): Use memset. - * bitmap.h (bitmap_free): Don't declare. - -2001-07-11 Daniel Berlin - - * gcse.c, lcm.c, sched-deps.c: - s/free on sbitmap vectors/sbitmap_vector_free on sbitmap vectors/g - - * flow.c (flow_loops_find): Free dom if we found no loops, since - we aren't going to save it. - - * lcm.c (pre_edge_rev_lcm): Free st_antin, st_antout when we are - done. - -Wed Jul 11 09:00:48 2001 Jeffrey A Law (law@cygnus.com) - - * ssa-ccp.c (ssa_fast_dce): Free worklist when completed. - -Wed Jul 11 10:07:18 2001 Richard Kenner - - * dwarf2out.c (dwarf2out_init, dwarf2out_finish): Add dummy version - #ifndef DWARF2_DEBUGGING_INFO. - -2001-07-11 Richard Sandiford - - * simplify-rtx.c (simplify_gen_subreg): Return null for QUEUED rtxes. - -2001-07-11 Richard Sandiford - - * config/mips/mips.c (gen_int_relational): Tell the caller not to - reverse a branch if a NE comparison is implemented with GTU. - -2001-07-11 Richard Sandiford - H.J. Lu - - * mips.md (call_internal1): Use CONSTANT_ADDRESS_P to check for - constant addresses. - (call_internal2): Likewise. - (call_value_internal1): Likewise. - (call_value_internal2): Likewise. - (call_value_multiple_internal1): Likewise. - (call_value_multiple_internal2): Likewise. - -2001-07-10 Kazu Hirata - - * calls.c (emit_library_call_value_1): Fix a comment typo. - * dwarf2out.c (mem_loc_descriptor): Likewise. - * config/i386/i386.c (ix86_expand_aligntest): Likewise. - -2001-07-11 David Billinghurst - - * simplify-rtx.c (simplify_subreg): Fix typo in comment - -Tue Jul 10 07:27:53 2001 Richard Kenner - - * recog.c (offsettable_address_p): Handle LO_SUM case. - * config/mips/mips.c (double_memory_operand): Use adjust_address_nv - instead of plus_constant. - -2001-07-10 Stephane Carrez - - * reload1.c (merge_assigned_reloads): After a RELOAD_OTHER merge, - fix setting of the reloads of that reload to RELOAD_FOR_OTHER_ADDRESS. - -Tue Jul 10 07:27:53 2001 Richard Kenner - - * config/rs6000/rs6000.c (print_operand, case 'L', 'Y', 'Z'): Use - adjust_address_nv instead of plus_constant. - -2001-07-10 Neil Booth - - * Makefile.in (toplev.o, sdbout.o, dbxout.o, dwarfout.o, - dwarf2out.o): Depend on debug.h, wrap long lines. - * dbxout.c: Include debug.h. - (dbx_debug_hooks): New. - (dbxout_init): Make static, take just 2 args. - (dbxout_finish): Make static. - * dbxout.h (dbxout_init, dbxout_finish): Delete. - * debug.c: New file. - * debug.h: New file. - * dwarf2out.c: Include debug.h. - (dwarf2_debug_hooks): New. - (dwarf2out_init): Make static. - (dwarf2out_finish): Make static, take 2 args. - * dwarf2out.h (dwarf2out_init, dwarf2out_finish): Delete. - * dwarfout.c: Include debug.h. - (dwarf_debug_hooks): New. - (dwarfout_init): Make static. - (dwarfout_finish): Make static, take 2 args. - * dwarfout.h (dwarfout_init, dwarfout_finish): Delete. - * sdbout.c: Include debug.h. - (sdb_debug_hooks): New. - (sdbout_init): Make static, take 2 args. - * sdbout.h (sdbout_init): Delete. - * toplev.c: Include debug.h. - (debug_hooks): New. - (compile_file): Set deubg_hooks based on command line options. - Use the hooks unconditionally rather than conditional compilation. - -Tue Jul 10 09:04:45 2001 Jeffrey A Law (law@cygnus.com) - - * ssa-ccp.c (first_phi_node): Remove. Replace uses with calls to - first_insn_after_basic_block_note instead. - - * df.c (df_bb_refs_unlink): #if 0 out for now. - -2001-07-10 David Billinghurst - - * diagnostic.c (finish_diagnostic): Rename to - diagnostic_finish. Make it take an 'output_buffer *'. Adjust - calls thourghout. - -2001-07-10 Jason Merrill - - * dwarf2out.c (dwarf2out_line): Emit -dA comment even when we have - .loc support. - - * collect2.c (main): Set COLLECT_NO_DEMANGLE for subprocesses. - (dump_file): Only pad the demangled name with spaces if the - mangled name was padded with spaces. - -2001-07-10 Bernd Schmidt - - * bb-reorder.c (make_reorder_chain_1): Correct branch/fallthru - edge detection. - -Tue Jul 10 07:27:53 2001 Richard Kenner - - * expr.c (expand_expr, case COMPONENT_REF): Don't force using bitfield - extraction if no direct load if either EXPAND_CONST_ADDRESS or - EXPAND_INITIALIZER. - - * emit-rtl.c (adjust_address, adjust_address_nv): Change criteria for - whether can put offset inside LO_SUM to check mode alignment, not size. - -2001-07-10 Gabriel Dos Reis - - * doc/tm.texi (Misc): Fix thinko. - -2001-07-10 Jan van Male - - * regmove.c (replace_in_call_usage): Fix warnings. - * sched-deps.c (add_dependence): Fix warnings. - * simplify-rtx.c (simplify_subreg): Likewise. - Return NULL_RTX instead of NULL. - - * reg-stack.c (emit_swap_insn): Eliminate warnings. - (subst_asm_stack_regs): Likewise. - - * combine.c (num_sign_bit_copies): Cast bitwidth to int to avoid - warnings. - - * dwarf2out.c (output_call_frame_info): Declare i as int. - (build_abbrev_table): Declare n_alloc as int. - (dwarf2out_finish): Initialize die. - * except.c: Declare sjlj_funcdef_number as unsigned. - (connect_post_landing_pads): Declare j as unsigned. - (convert_to_eh_region_ranges): Initialize call_site. - (output_function_exception_table): Initialize tt_format_size. - * expr.c (move_by_pieces_1): Initialize to1. - (store_constructor): Initialize minelt and maxelt. - * flow.c (mark_regs_live_at_end): Declare i as unsigned. - * function.c (instantiate_decls): Avoid signed/unsigned warning. - - * c-decl.c (combine_parm_decls): Unused, remove. - * c-tree.h: Remove prototype for combine_parm_decls. - - * reload.c (push_reload): Fix warning. - (regno_clobbered_p): Likewise. - * reload1.c (replace_pseudos_in_call_usage): Likewise. - (reload_combine): Likewise. - - * bitmap.c: Rename bitmap_zero to bitmap_zero_bits to fix warnings. - * bitmap.h: Rename bitmap_zero to bitmap_zero_bits to fix - warnings. - * bitmap.c (bitmap_operation): Change user. - * bitmap.h (EXECUTE_IF_AND_COMPL_IN_BITMAP): Likewise. - -2001-07-10 Eric Christopher - - * config/mips/mips.c (override_options): Fix typo. - -2001-07-09 Stan Shebs - - * target.h (struct gcc_target): New fields init_builtins and - expand_builtin. - * target-def.h (TARGET_INIT_BUILTINS): New macro. - (TARGET_EXPAND_BUILTIN): New macro. - (TARGET_INITIALIZER): Add them. - * builtins.c: Include target.h. - (expand_builtin): Use targetm.expand_builtin. - (default_init_builtins): New function. - (default_expand_builtin): New function. - * expr.h (default_init_builtins): Declare. - (default_expand_builtin): Declare. - * c-common.c (c_common_nodes_and_builtins): Use - targetm.init_builtins. - * defaults.h (MD_INIT_BUILTINS): Remove. - * Makefile.in (builtins.o): Depend on target.h. - - * config/arm/arm.c (TARGET_INIT_BUILTINS): Define. - (TARGET_EXPAND_BUILTIN): Define. - * config/arm/arm.h (MD_INIT_BUILTINS): Remove. - (MD_EXPAND_BUILTIN): Remove. - - * config/c4x/c4x.c (TARGET_INIT_BUILTINS): Define. - (TARGET_EXPAND_BUILTIN): Define. - (c4x_init_builtins): Make endlink arg a local. - (c4x_print_operand): Fix typos in adjust_address usages. - * config/c4x/c4x-protos.h (c4x_init_builtins): Update decl. - * config/c4x/c4x.h (MD_INIT_BUILTINS): Remove. - (MD_EXPAND_BUILTIN): Remove. - - * config/i386/i386.c (TARGET_INIT_BUILTINS): Define. - (TARGET_EXPAND_BUILTIN): Define. - (ix86_init_mmx_sse_builtins): New function, was ix86_init_builtins. - (ix86_init_builtins): Call new function only if TARGET_MMX. - * config/i386/i386-protos.h (ix86_init_mmx_sse_builtins): Declare. - * config/i386/i386.h (MD_INIT_BUILTINS): Remove. - (MD_EXPAND_BUILTIN): Remove. - - * config/ia64/ia64.c (TARGET_INIT_BUILTINS): Define. - (TARGET_EXPAND_BUILTIN): Define. - * config/ia64/ia64.h (MD_INIT_BUILTINS): Remove. - (MD_EXPAND_BUILTIN): Remove. - - * doc/tm.texi: Document these changes. - -2001-07-09 Diego Novillo - - * basic-block.h (tree_node): Forward declare if needed. - (struct basic_block_def): Add fields 'head_tree' and 'end_tree'. - (BLOCK_HEAD_TREE): Define. - (BLOCK_END_TREE): Define. - (struct loops): Rename field 'tree' to 'tree_root'. - * flow.c (entry_exit_blocks): Add initializers for 'head_tree' and - 'end_tree'. - (flow_loops_tree_build): Rename reference to field 'tree' to - 'tree_root'. - (flow_loops_level_compute): Ditto. - * predict.c (estimate_bb_frequencies): Ditto. - * tree.h (struct tree_common): Add field 'aux'. - -2001-07-09 Stan Shebs - - * config/darwin.c (darwin_encode_section_info): Don't mark any - DECL_EXTERNAL node as defined. - -2001-07-09 John David Anglin - - * pa.c (pa_init_machine_status, pa_mark_machine_status, - pa_free_machine_status, hppa_init_pic_save): Delete. - (hppa_pic_save_rtx): New. Use get_hard_reg_initial_val. - (hppa_profile_hook): Use hppa_pic_save_rtx. - * pa.h (struct machine_function, PIC_OFFSET_TABLE_SAVE_RTX, - hppa_init_pic_save): Delete. - (hppa_pic_save_rtx): Declare. - * pa.md (call, call_value, sibcall, sibcall_value, - builtin_setjmp_receiver): Use hppa_pic_save_rtx. - -2001-07-09 Kazu Hirata - - * config/h8300/t-h8300 (LIB1ASMFUNCS): Add _floatdisf and _fixsfdi. - * config/mn10200/t-mn10200 (LIB1ASMFUNCS): Likewise. - -2001-07-09 Andreas Jaeger - - * output.h: Add declaration of final_forward_branch_p. - - * config/i386/i386.c (output_fix_trunc): Remove unused variable. - - * varray.c: Include errors.h for internal_error and trim_filename - declarations. - - * Makefile.in (varray.o): Add errors.h. - -2001-07-09 Toon Moene - - * expr.h: Adjust prototypes for have_add2_insn, have_sub2_insn. - * optabs.c (have_add2_insn): Check whether the add insn chosen - really accepts the operands. (have_sub2_insn): Ditto for sub insn. - * reload1.c (reload_cse_move2add): Adjust calls of have_add2_insn. - -Mon Jul 9 13:26:40 2001 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (OBJS): Add ssa-ccp.o - (ssa-ccp.o): Add dependencies. - * toplev.c (DFI_ssa_ccp): New dump file enum. - (dump_file): Add entry for dumping after SSA CCP. - (flag_ssa_ccp): New flag variable. - (f_options): Add -fssa-ccp. - (rest_of_compilation): Run SSA CCP if requested. - * timevar.def (TV_SSA_CCP): New timevar. - * ssa.c (mark_phi_and_copy_regs): Handle deleted PHI nodes. - * doc/gcc.texi (Passes): Add documentation for SSA CCP pass. - Fix minor typo in SSA DCE documentation. - * doc/invoke.texi: Add documentation for new flag -fssa-ccp. - Add documentation for new dump option. Renumber dump files - appropriately. - -Mon Jul 9 21:36:00 CEST 2001 Jan Hubicka - - * emit-rtl.c (gen_highpart_mode): New. - * rtl.h (gen_highpart_mode): Declare. - * sparc.md (insn splitters): Use gen_highpart_mode, whenever the - operand can be VOIDmode constant. - -Mon Jul 9 17:23:10 CEST 2001 Jan Hubicka - - * flow.c (redirect_edge_and_branch_force): New. - (can_fallthru): Ensure that basic blocks are succeeding. - (try_optimize_cfg): Do not delete basic block if it is the last one. - - * flow.c (try_redirect_by_replacing_jump): Do not remove - jumps with side effects, unlink chain on fallthru edge; - set block for new jump instruction; avoid basic block to - over by line number note. - - * flow.c (try_simplify_condjump): Verify that the condjump - is not always falling through. - - Re-install patch: - * flow.c (try_redirect_by_replacing_jump): Remove cc0 setter. - - * flow.c (forwarder_block_p): Fix for fallthru blocks. - (try_redirect_by_replacing_jump): Update properly the count - and frequency information. - -Mon Jul 9 06:41:07 2001 Richard Kenner - - * emit-rtl.c (adjust_address, adjust_address_nv): Handle an - address that is a LO_SUM specially. - * explow.c (plus_constant_wide, case LO_SUM): Deleted. - - * c-lang.c (start_cdtor): Remove extra parameter from start_function. - - * emit-rtl.c (adjust_address_nv, replace_equiv_address_nv): New fcns. - (operand_subword): Use them. - (change_address_1): Renamed from change_address; new arg VALIDATE. - * expr.h: Reflect above changes; change_address now macro. - * alias.c (canon_rtx): Use replace_equiv_address_nv instead of - making MEM. - * cselib.c (add_mem_for_addr): Likewise. - * expr.c (protect_from_queue, emit_move_insn_1): Likewise. - * regmove.c (try_apply_stack_adjustment): Likewise. - * reload.c (push_reload, make_memloc): Likewise. - * reload1.c (eliminate_regs): Likewise. - * simplify-rtx.c (simplify_replace_rtx): Likewise. - * caller-save.c (setup_save_areas): Use adjust_address_nv instead of - adjust_addess. - * combine.c (make_extraction, simplify_shift_const): Likewise. - (gen_lowpart_for_combine): Likewise. - * cse.c (gen_lowpart_if_possible): Likewise. - * function.c (fixup_var_refs_1, purge_addressof_1): Likewise. - * expr.c (expand_expr, case COMPONENT_REF): Likewise. - * optabs.c (gen_move_insn): Likewise. - * reload1.c (alter_reg): Likewise. - * simplify-rtx.c (simplify_subreg): Likewise. - * stmt.c (expand_anon_union_decl): Likewise. - * recog.c (validate_replace_rtx_1): Likewise. - (expr.h): Include. - * Makefile.in (recog.o): Add $(EXPR_H). - * explow.c (stabilize): Call replace_equiv_address. - * expr.c (move_by_pieces_1, store_by_pieces_2): Likewise. - * final.c (alter_subreg): OFFSET is HOST_WIDE_INT. - -2001-07-03 Andrew Haley - - * expmed.c (store_fixed_bit_field): Don't use a mode bigger than - the mode of the memory location. - -2001-07-09 Bo Thorsen - - * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix x86-64 vtable support. - -2001-07-09 Neil Booth - - * final.c (output_addr_const): Use target opening and - closing parentheses. - * target-def.h: Define TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN - defaults, add to TARGET_ASM_OUT. - * target.h (struct gcc_target): Add open_paren and close_paren. - * doc/md.texi: Update. - * doc/tm.texi: Document TARGET_ASM_FUNCTION_END_PROLOGUE, - TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, TARGET_ASM_OPEN_PAREN and - TARGET_ASM_CLOSE_PAREN. - * config/i386/i386.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): - Override. - * config/pdp11/pdp11.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): - Override. - * config/1750a/1750a.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove. - * config/a29k/a29k.h: Similarly. - * config/alpha/alpha.h: Similarly. - * config/arc/arc.h: Similarly. - * config/arm/aof.h: Similarly. - * config/arm/aout.h: Similarly. - * config/avr/avr.h: Similarly. - * config/c4x/c4x.h: Similarly. - * config/clipper/clipper.h: Similarly. - * config/convex/convex.h: Similarly. - * config/d30v/d30v.h: Similarly. - * config/dsp16xx/dsp16xx.h: Similarly. - * config/elxsi/elxsi.h: Similarly. - * config/fr30/fr30.h: Similarly. - * config/h8300/h8300.h: Similarly. - * config/i370/i370.h: Similarly. - * config/i386/i386.h: Similarly. - * config/i860/i860.h: Similarly. - * config/i960/i960.h: Similarly. - * config/ia64/ia64.h: Similarly. - * config/m32r/m32r.h: Similarly. - * config/m68hc11/m68hc11.h: Similarly. - * config/m68k/m68k.h: Similarly. - * config/m88k/m88k.h: Similarly. - * config/mcore/mcore.h: Similarly. - * config/mips/mips.h: Similarly. - * config/mn10200/mn10200.h: Similarly. - * config/mn10300/mn10300.h: Similarly. - * config/ns32k/ns32k.h: Similarly. - * config/pa/pa.h: Similarly. - * config/pdp11/pdp11.h: Similarly. - * config/pj/pj.h: Similarly. - * config/romp/romp.h: Similarly. - * config/rs6000/rs6000.h: Similarly. - * config/sh/sh.h: Similarly. - * config/sparc/sparc.h: Similarly. - * config/v850/v850.h: Similarly. - * config/vax/vax.h: Similarly. - * config/we32k/we32k.h: Similarly. - -2001-07-09 Joseph S. Myers - - * doc/c-tree.texi: Document representation of attributes. - -2001-07-08 Joseph S. Myers - - * doc/tm.texi: Update some places for the rename of target to - targetm. Fix typo. - -2001-07-08 Joseph S. Myers - - * target.h (struct gcc_target): Add insert_attributes. - * target-def.h (TARGET_INSERT_ATTRIBUTES): Define. - (TARGET_INITIALIZER): Update. - * tree.c, tree.h (default_insert_attributes): New function. - Update comments on other default functions to refer to targetm, - not target. - * doc/tm.texi (INSERT_ATTRIBUTES): Update to document - TARGET_INSERT_ATTRIBUTES. - (SET_DEFAULT_DECL_ATTRIBUTES): Remove. - * c-common.c (decl_attributes): Use targetm.insert_attributes. - Don't use PRAGMA_INSERT_ATTRIBUTES. - * Makefile.in (c-common.o): Depend on $(TARGET_H). - * c-decl.c (start_decl, start_function): Don't call - SET_DEFAULT_DECL_ATTRIBUTES. - * config/c4x/c4x.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. - * config/c4x/c4x-protos.h (c4x_set_default_attributes): Don't - declare. - * config/c4x/c4x.c (TARGET_INSERT_ATTRIBUTES): Define. - (c4x_check_attribute): Avoid modifying attribute list itself. - (c4x_set_default_attributes): Rename to c4x_insert_attributes. - Make static. - * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Don't define. - * config/sh/sh-protos.h (sh_pragma_insert_attributes): Don't - declare. - * config/sh/sh.c (TARGET_INSERT_ATTRIBUTES): Define. - (sh_pragma_insert_attributes): Rename to sh_insert_attributes. - Make static. - * config/v850/v850.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. - * config/v850/v850-protos.h (v850_set_default_decl_attr): Don't - declare. - * config/v850/v850.c (TARGET_INSERT_ATTRIBUTES): Define. - (v850_set_default_decl_attr): Rename to v850_insert_attributes. - Adjust parameters. Make static. - -2001-07-08 Joseph S. Myers - - * c-common.c (decl_attributes): Only take a single attributes - parameter. - * c-common.h (decl_attributes): Update prototype. - * c-decl.c (start_decl, start_function): Only take a single - attributes parameter. Update calls to decl_attributes. - (finish_struct, finish_enum): Update calls to decl_attributes. - (push_parm_decl): Expect unified list of attributes. Update call - to decl_attributes. - * c-parse.in (fndef, initdcl, notype_initdcl, nested_function, - notype_nested_function, component_declarator, - component_notype_declarator, label): Update calls to - decl_attributes. - (absdcl_maybe_attribute, parm, firstparm, myparm): Unify attribute - lists that are passed to push_parm_decl. - * c-tree.h (start_function, start_decl): Update prototypes. - * config/sh/sh-protos.h, config/sh/sh.c - (sh_pragma_insert_attributes): Only take a single attributes - parameter. - * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Likewise. - * doc/tm.texi (INSERT_ATTRIBUTES): Update. - * objc/objc-act.c (define_decl, generate_objc_symtab_decl, - build_module_descriptor, generate_static_references, - generate_strings, build_selector_translation_table, - generate_descriptor_table, generate_protocols, - generate_ivars_list, generate_dispatch_table, - generate_protocol_list, generate_category, - generate_shared_structures, really_start_method, add_objc_decls, - generate_classref_translation_entry): Update calls to start_decl - and start_function. - (build_tmp_function_decl, start_method_def): Unify attribute lists - that are passed to push_parm_decl. - -2001-07-08 Neil Booth - - * final.c (no_asm_to_stream): New. - (final_scan_insn): Use target structures for prologue ends - and epilogue starts. - * output.h (no_asm_to_stream): New. - * target-def.h (TARGET_ASM_FUNCTION_END_PROLOGUE, - TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): New. - (TARGET_ASM_OUT): Update. - * target.h (struct gcc_target): New members function_end_prologue - and function_begin_epilogue. - * config/1750/1750.h (ASM_OUTPUT_FUNNAM): Delete as unused. - * config/alpha/alpha-protos.h (output_end_prologue): Delete. - * config/alpha/alpha.c (output_end_prologue): Rename to - alpha_output_function_end_prologue. Use in target struct - and make static. - * config/alpha/alpha.h (FUNCTION_END_PROLOGUE): Delete. - * config/ia64/ia64-protos.h (ia64_output_end_prologue): Delete. - * config/ia64/ia64.c (ia64_output_end_prologue): Rename to - ia64_output_function_end_prologue. Use in target struct - and make static. - (ia64_function_prologue, ia64_function_epilogue): Rename - mistyped prototypes. - * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete. - * config/m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): - Delete. - * config/m88k/m88k.c (m88k_end_prologue, m88k_begin_epilogue): Rename - an use in target struct, make static. - * config/ia64/ia64.h (FUNCTION_END_PROLOGUE, FUNCTION_BEGIN_EPILOGUE): - Delete. - -2001-07-08 Richard Henderson - - * stmt.c (emit_case_nodes): Convert modes properly in low+high test. - -2001-07-08 Richard Henderson - - * config/i386/i386.md: Remove constraints strings from define_split - and define_peephole2 patterns. - (eh_return_si, eh_return_di): Split eh_return_1 for modes. - (eh_return): Use them. - -2001-07-08 Richard Henderson - - * doc/tm.texi (Exception Handling): New subnode of Stack and Calling. - Document MD_FALLBACK_FRAME_STATE_FOR. - -2001-07-07 Stephane Carrez - - * config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset): - Take into account m68hc11_sp_correction for FRAME_POINTER_REGNUM - elimination. - * config/m68hc11/m68hc11.h (STARTING_FRAME_OFFSET): Use 0. - -2001-07-07 Nick Clifton - - * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Append # to end - of the label inside NAME as opposed to just the end of NAME. - -2001-07-07 Neil Booth - - * config/alpha/alpha-protos.h (vms_valid_decl_attribute_p): Delete. - * config/alpha/alpha.c (alpha_init_machine_status, - alpha_mark_machine_status, alpha_free_machine_status): Delete. - (TARGET_VALID_DECL_ATTRIBUTE): Define for VMS. - (vms_valid_decl_attribute_p): Make static, conditionally compile. - * config/alpha/alpha.h (VALID_MACHINE_DECL_ATTRIBUTE): Delete. - -2001-07-06 Stan Shebs - - * target.h (targetm): Rename global from "target", so as not to - conflict with local variables. - * c-decl.c: Ditto. - * c-typeck.c: Ditto. - * final.c: Ditto. - * tree.c: Ditto. - * cp/decl.c: Ditto. - * cp/decl2.c: Ditto. - * cp/typeck.c: Ditto. - * 1750a/1750a.c: Ditto. - * a29k/a29k.c: Ditto. - * arc/arc.c: Ditto. - * arm/arm.c: Ditto. - * avr/avr.c: Ditto. - * clipper/clipper.c: Ditto. - * convex/convex.c: Ditto. - * d30v/d30v.c: Ditto. - * dsp16xx/dsp16xx.c: Ditto. - * elxsi/elxsi.c: Ditto. - * fr30/fr30.c: Ditto. - * h8300/h8300.c: Ditto. - * i370/i370.c: Ditto. - * i386/i386.c: Ditto. - * i860/i860.c: Ditto. - * i960/i960.c: Ditto. - * ia64/ia64.c: Ditto. - * m32r/m32r.c: Ditto. - * m68hc11/m68hc11.c: Ditto. - * m68k/m68k.c: Ditto. - * m88k/m88k.c: Ditto. - * mips/mips.c: Ditto. - * ns32k/ns32k.c: Ditto. - * pa/pa.c: Ditto. - * pdp11/pdp11.c: Ditto. - * romp/romp.c: Ditto. - * rs6000/rs6000.c: Ditto. - * sh/sh.c: Ditto. - * sparc/sparc.c: Ditto. - * vax/vax.c: Ditto. - * we32k/we32k.c: Ditto. - * doc/tm.texi: Update the manual to match. - -2001-07-06 Richard Henderson - - * except.h (MUST_USE_SJLJ_EXCEPTIONS): Examine the value of - DWARF2_UNWIND_INFO not just whether it is defined. - -2001-07-06 Diego Novillo - - * combine.c (combine_simplify_rtx): Also recompute 'mode' if the - call to simplify_binary_operation returns a new pattern. - -2001-07-06 Roman Lechtchinsky - - * glimits.h (__SHRT_MAX__): New. - (SHRT_MIN, USHRT_MAX): Define in terms of SHRT_MAX. - (SHRT_MAX): Define in terms of __SHRT_MAX__. - -2001-07-06 Jan van Male - - * alias.c (base_alias_check): Cast GET_MODE_UNIT_SIZE to int to - avoid warnings. - -2001-07-06 Richard Henderson - - * bitmap.c (bitmap_release_memory): Move adjacent to the - allocation functions. - (bitmap_first_set_bit, bitmap_last_set_bit): Streamline knowing - the implementation. Binary search for the set bit. - (bitmap_union_of_diff): Allocate the temporary on the stack - instead of using xmalloc. - -2001-07-06 Richard Henderson - - * genrecog.c (validate_pattern): Warn for constraints in - define_{expand,split,peephole2}. Remove strict_low_part - before looking up match_dup. - -2001-07-06 DJ Delorie - - * doc/gcc.texi (Makefile): Rename to be a more general purpose - chapter about various build hints and history. Add section - talking about the various types of native and cross builds. - -2001-07-06 Neil Booth - - * Makefile.in (final.o): Depend on target.h. - * final.c: Include target.h. - (default_function_pro_epilogue): New. - (final_start_function): Use target structure for function prologues. - (final_end_function): Use target structure for function epilogues. - * fold-const.c (real_hex_to_f): Constify s and p. - * output.h (default_function_pro_epilogue): New. - * real.h (real_hex_to_f): Update prototype. - * target-def.h (TARGET_ASM_FUNCTION_PROLOGUE, - TARGET_ASM_FUNCTION_EPILOGUE, TARGET_ASM_OUT): New. - (TARGET_INITIALIZER): Update. - * target.h (gcc_target): Add struct asm_out. - * doc/tm.texi: Update. - -config: - Update each arch to use TARGET_ASM_FUNCTION_PROLOGUE and - TARGET_ASM_FUNCTION_EPILOGUE. Move macro code to functions - in cpu/cpu.c, or rename old functions consistently. Take - a HOST_WIDE INT not an int as the SIZE parameter. Remove now - redundant macros and prototypes. Make new functions static. - - * 1750a/1750a.c: Similarly. - * 1750a/1750a.h: Similarly. - * a29k/a29k-protos.h: Similarly. - * a29k/a29k.c: Similarly. - * a29k/a29k.h: Similarly. - * arc/arc-protos.h: Similarly. - * arc/arc.c: Similarly. - * arc/arc.h: Similarly. - * arm/arm-protos.h: Similarly. - * arm/arm.c: Similarly. - * arm/arm.h: Similarly. - * avr/avr-protos.h: Similarly. - * avr/avr.c: Similarly. - * avr/avr.h: Similarly. - * clipper/clipper-protos.h: Similarly. - * clipper/clipper.c: Similarly. - * clipper/clipper.h: Similarly. - * convex/convex.c: Similarly. - * convex/convex.h: Similarly. - * d30v/d30v-protos.h: Similarly. - * d30v/d30v.c: Similarly. - * d30v/d30v.h: Similarly. - * d30v/d30v.md: Similarly. - * dsp16xx/dsp16xx-protos.h: Similarly. - * dsp16xx/dsp16xx.c: Similarly. - * dsp16xx/dsp16xx.h: Similarly. - * elxsi/elxsi.c: Similarly. - * elxsi/elxsi.h: Similarly. - * fr30/fr30.c: Similarly. - * fr30/fr30.md: Similarly. - * h8300/h8300-protos.h: Similarly. - * h8300/h8300.c: Similarly. - * h8300/h8300.h: Similarly. - * i370/i370-protos.h: Similarly. - * i370/i370.c: Similarly. - * i370/i370.h: Similarly. - * i386/i386.c: Similarly. - * i386/osf1elf.h: Similarly. - * i386/osfrose.h: Similarly. - * i860/i860-protos.h: Similarly. - * i860/i860.c: Similarly. - * i860/i860.h: Similarly. - * i960/i960-protos.h: Similarly. - * i960/i960.c: Similarly. - * i960/i960.h: Similarly. - * ia64/ia64-protos.h: Similarly. - * ia64/ia64.c: Similarly. - * ia64/ia64.h: Similarly. - * m32r/m32r-protos.h: Similarly. - * m32r/m32r.c: Similarly. - * m32r/m32r.h: Similarly. - * m68hc11/m68hc11-protos.h: Similarly. - * m68hc11/m68hc11.c: Similarly. - * m68hc11/m68hc11.h: Similarly. - * m68k/crds.h: Similarly. - * m68k/dpx2.h: Similarly. - * m68k/m68k-protos.h: Similarly. - * m68k/m68k.c: Similarly. - * m68k/m68k.h: Similarly. - * m68k/news.h: Similarly. - * m88k/m88k-protos.h: Similarly. - * m88k/m88k.c: Similarly. - * m88k/m88k.h: Similarly. - * mips/mips-protos.h: Similarly. - * mips/mips.c: Similarly. - * mips/mips.h: Similarly. - * ns32k/merlin.h: Similarly. - * ns32k/ns32k.c: Similarly. - * ns32k/ns32k.h: Similarly. - * ns32k/tek6000.h: Similarly. - * pa/pa-protos.h: Similarly. - * pa/pa.c: Similarly. - * pa/pa.h: Similarly. - * pdp11/2bsd.h: Similarly. - * pdp11/pdp11-protos.h: Similarly. - * pdp11/pdp11.c: Similarly. - * pdp11/pdp11.h: Similarly. - * romp/romp-protos.h: Similarly. - * romp/romp.c: Similarly. - * romp/romp.h: Similarly. - * rs6000/rs6000-protos.h: Similarly. - * rs6000/rs6000.c: Similarly. - * rs6000/rs6000.h: Similarly. - * rs6000/sysv4.h: Similarly. - * sh/sh-protos.h: Similarly. - * sh/sh.c: Similarly. - * sh/sh.h: Similarly. - * sparc/sparc-protos.h: Similarly. - * sparc/sparc.c: Similarly. - * sparc/sparc.h: Similarly. - * vax/vax.c: Similarly. - * vax/vax.h: Similarly. - * vax/vms.h: Similarly. - * we32k/we32k.c: Similarly. - * we32k/we32k.h: Similarly. - -Fri Jul 6 11:47:59 2001 Jeffrey A Law (law@cygnus.com) - - * basic-block.h (first_insn_after_basic_block_note): Declare. - * flow.c (first_insn_after_basic_block_note): Define. Moved - from... - * ssa.c (first_insn_after_basic_block_note): Remove. - * ssa-dce.c (find_inherently_necessary): Consider BARRIERs - necessary. - (ssa_eliminate_dead_code): Properly update the CFG and PHI - nodes when we find a dead conditional branch. Insert BARRIERs - after any blocks with no successors, but which do not have - any BARRIERs. - -2001-07-06 Zack Weinberg - - * varray.c (varray_check_failed): Use internal_error. - -2001-07-05 Andrew Haley - - * Makefile.in (LIB2_DIVMOD_FUNCS): New. - (LIB2FUNCS): Move divmod functions to LIB2_DIVMOD_FUNCS. - * mklibgcc.in: Compile LIB2_DIVMOD_FUNCS. - -2001-07-02 Jason Merrill - - * dwarf2out.c (mem_loc_descriptor): Only look through a constant pool - reference if the target constant is also a SYMBOL_REF. - -2001-07-05 Eric Christopher - - * config/mips/mips.h (MASK_MIPS3900): Remove. - (MASK_MIPS16,MASK_NO_CHECK_ZERO_DIV,MASK_CHECK_RANGE_DIV, - MASK_UNINIT_CONST_IN_RODATA): Change for 3900 mask removal. - (TARGET_MIPS3900): Change to use mips_arch. - (TARGET_MIPS4000): New. - (TARGET_MIPS4100): New. - (TARGET_MIPS4300): New. - (TARGET_SWITCHES): Change 3900 and 4650 options to NULL. - (SUBTARGET_TARGET_OPTIONS): Add -march. Change help text - for -mipsX. - (GENERATE_BRANCHLIKELY): Move TARGET_MIPS3900. - (ISA_HAS_BRANCHLIKELY): To here. - (CC1_CPU_SPEC): New. - (CC1_SPEC): Use here. Remove 4650 and 3900 options. - (mips_arch_string): Declare. - (mips_arch): Declare. - (TARGET_OPTIONS): Add -march and -mtune. - - * config/mips/mips.c (mips_arch_string): New. - (mips_arch): New. - (override_options): Handle -march for codegen and -mtune - for scheduling. Use mips_arch. Move tx39 target default here. - (mips_parse_cpu): Move error message to override_options. - - * config/mips/r3900.h (TARGET_DEFAULT): Remove. - - * config/mips/mips.md: Use TARGET_MIPS4000 and TARGET_MIPS4300. - - * doc/invoke.texi (Option Summary): Add -march and -mtune entries. - (MIPS Options): Ditto. Change mcpu entry to historical text. - -2001-07-05 H.J. Lu (hjl@gnu.org) - - * config/mips/mips.c (mips_parse_cpu): New function to parse - -march=*/-mcpu=*. - -2001-07-05 Jim Wilson - - * config/ia64/lib1funcs.asm: Revert 2001-07-02 change. - * config/ia64/t-ia64: Likewise. - (LIB1ASMFUNCS): Update comment. - -2001-07-05 David Edelsohn - - * doc/install.texi (Install GCC: Binaries): Fix typo. - -2001-07-04 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*ashlsi3"): Operand 1 can be a memory - reference using the stack pointer, adjust it since we push Y - temporarily. - ("*ashrsi3"): Likewise. - ("*lshrsi3"): Likewise. - -2001-07-05 Stephane Carrez - - * config/m68hc11/m68hc11.h (RETURN_ADDR_RTX): Fix return address - when -fomit-frame-pointer is used. - -2001-07-05 Jeffrey Oldham - - * flow.c: Reverse Jan Hubicka's patch of 02July2001. - (try_redirect_by_replacing_jump): Reverse updating properly the - count and frequency information. Reverse removing cc0 setter. - (forwarder_block_p): Reverse fixing for fallthru blocks. - -2001-07-05 DJ Delorie - - * gcc.c (TARGET_OPTION_TRANSLATE_TABLE): New. - (translate_options): If the above is defined, use it to map - given options to new options. - * doc/tm.texi: Document it. - -2001-07-05 Brad Lucier - Gerald Pfeifer - - * doc/invoke.texi (Optimize Options): Document that -fgcse may - cause programs using computed gotos to run more slowly. - -2001-07-05 Rainer Orth - - * doc/install.texi (Specific): Markup, spelling and typo fixes. - Fixed sorting. - Consistently require binutils 2.11.2, not prereleases. - (Specific, decstation-*): Canonicalize as mips-dec-*. - (Specific, i?86-*-sco3.2v5*): Remove make bootstrap requirement, - always necessary. - (Specific, m68k-altos): Removed reference to README.altos, deleted. - (Specific, mips-*): Reword MIPS C compiler requirements. - (Specific, powerpc*-*-*): New, mention --with-cpu once. - (Specific, sunv5): Removed, obsolete. - -2001-07-05 Nathan Sidwell - - * dwarf2out.c (output_loc_list): Use an all ones mask for - .text asm output and don't rely on long long - literals. Reformat some long lines. - -2001-07-05 Andreas Jaeger - - * doc/gcc.texi (GNU/Linux): Remove accidental re-add of GPL - section. - -2001-07-04 Daniel Berlin - - * dwarf2out.c (dwarf2out_define): Update comment. - (dwarf2out_undef): Ditto. - (dwarf2out_start_source_file): Ditto. - (dwarf2out_end_source_file): Ditto. - (dwarf2out_finish): Output DW_MACINFO_end_file for primary file, - since we never call the start/end debug hook for the primary file. - -2001-07-04 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Remove an extra operand - from shll. - -2001-07-04 Nathan Sidwell - - * cppinit.c (remove_dup_dirs): Inform if a system include - directory is being reordered. - * doc/invoke.texi (Directory Options): GCC warns if you hide a - system include. - * doc/cpp.texi (Search Paths): Likewise. - * doc/gcc.texi (Interoperation): Remove information about - -I/usr/include. - -2001-07-04 Nathan Sidwell - - * varray.h (VARRAY_TOP_GENERIC_PTR): Remove spurious parameter. - (VARRAY_TOP_CHAR_PTR): Likewise. - -2001-07-04 Kaveh R. Ghazi - - * gcc.c (process_command): Don't assign elements of a const char*. - -Wed Jul 4 13:40:02 2001 Richard Kenner - - * emit-rtl.c (change_address): Don't abort if invalid address while - reload is in progress. - -2001-07-04 Daniel Berlin - - * c-lex.c (cb_file_change): Pass line number to - debug_start_source_file. - (cb_undefine): Pass correct line number to debug_undef. - - * toplev.c (debug_start_source_file): Add line number to - parameters. Pass it along to dwarf2out_start_source_file. - (decode_g_option): Stop resetting debug level back to normal when - we change debug formats, unless the current level is - none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than - 3). - - * toplev.h (debug_start_source_file): Add line number to - parameters. - - * dwarf2out.h (dwarf2out_start_source_file): Add line number to - parameters. - - * dwarf2out.c (dwarf2out_start_source_file): Add line number to - parameters. - Output debug_macinfo data for starting file if requested. - (dwarf2out_end_source_file): Output debug_macinfo data for ending - file if requested. - (dwarf2out_define): Output debug_macinfo data for defining a macro - if requested. - (dwarf2out_undef): Output debug_macinfo data for undefining a - macro if requested. - (DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name. - (DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label. - (macinfo_section_label): New. DWARF2 macro info section label. - (dwarf2out_init): If we want macro info, output the start label - for the section. - (dwarf2out_finish): If we want macro info, add a DW_AT_macro_info - attribute to the compilation unit die pointing to the macro info. - -2001-07-04 Daniel Berlin - - * dwarf2out.c (new_loc_list): Move to inside #ifdef - DWARF2_DEBUGGING_INFO. - (add_loc_descr_to_loc_list): Ditto. - (output_loc_list): Ditto. - Also, fix thinko in curr not being initialized. - (gen_internal_sym): Ditto. - -Wed Jul 4 13:40:02 2001 Richard Kenner - - * emit-rtl.c (replace_equiv_address): New function. - * expr.h (replace_equiv_address): New declaration. - * explow.c (validize_mem): Call it instead of change_address and - also call if -fforce-addr and address is constant. - * expr.c: Replace more calls to change_address with adjust_address - and/or replace_equiv_address or to validize_mem. - * function.c, regmove.c, config/alpha/alpha.c: Likewise. - * config/arm/arm.md, config/clipper/clipper.md: Likewise. - * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. - * config/i370/i370.md, config/i860/i860.md: Likewise. - * config/i960/i960.md, config/mips/mips.c: Likewise. - * config/mips/mips.md, config/pa/pa.md: Likewise. - * config/pdp11/pdp11.md, config/rs6000/rs6000.c: Likewise. - * config/rs6000/rs6000.md, config/sh/sh.md: Likewise. - -2001-07-04 Kaveh R. Ghazi - - * bitmap.c (bitmap_union_of_diff): Don't use BITMAP_ALLOCA. - - * bitmap.h (BITMAP_ALLOCA): Don't pass alloca as an argument to a - function. - -2001-07-04 Joseph S. Myers - - * doc/include: New directory. - * doc/fdl.texi: Move to doc/include/fdl.texi. - * doc/texinfo.tex: Move to doc/include/texinfo.tex. - * doc/include/funding.texi, doc/include/gpl.texi: New files. - * doc/gcc.texi: Use funding.texi and gpl.texi. - * Makefile.in ($(docdir)/cpp.info, $(docdir)/gcc.info, - $(docdir)/cppinternals.info, cpp.dvi. gcc.dvi. cppinternals.dvi): - Update dependencies and use -I $(docdir)/include. - -2001-07-04 Anthony Green - - * config/v850/t-v850 (v850-c.o): Add missing dependencies. - -2001-07-04 Gerald Pfeifer - - * doc/install.texi (sparc64-*-*): Remove garbage. - -Wed Jul 4 09:07:44 2001 Jan van Male - - * i386.c (ix86_expand_builtin, case IX86_BUILTIN_SETPS): - Fix typo in last change to use adjust_address. - -2001-07-04 Gerald Pfeifer - - * doc/install.texi (Specific): Update information for *-*-solaris*. - -Tue Jul 3 22:33:15 2001 Richard Kenner - - * explow.c (plus_constant_wide): Reinitialize Y for restart. - -2001-07-03 Stan Shebs - - * config/darwin.h (SECTION_FUNCTION): Remove WAS_TEXT argument, remove - case for flag_no_mach_text_sections. - (EXTRA_SECTION_FUNCTIONS): Remove arg from uses of SECTION_FUNCTION. - * config/darwin.c (flag_no_mach_text_sections): Remove. - * config/darwin-protos.h (darwin_init_pragma): Remove decl. - -Tue Jul 3 15:35:52 2001 Richard Kenner - - * explow.c (plus_constant_wide, case PLUS): Call find_constant_term - and avoid checking for constant as first operand. - * recog.c (find_constant_term_loc): No longer static. - (adj_offettable_operand): Delete. - * rtl.h (adj_offsettable_operand): Delete declaration. - (find_constant_term): Add declaration. - * caller-save.c: Replace calls to adj_offsettable_operand with calls - to adjust_address. - * config/arm/arm.c, config/c4x/c4x.c: Likewise. - * config/clipper/clipper.md, config/h8300/h8300.c: Likewise. - * config/i386/i386.c, config/i386/i386.md: Likewise. - * config/i860/i860.c, config/i960/i960.c: Likewise. - * config/i960/i960.md, config/m68hc11/m68hc11.c: Likewise. - * config/m68k/m68k.c, config/m68k/m68k.md: Likewise. - * config/m88k/m88k.md, config/mcore/mcore.c: Likewise. - * config/mips/mips.c, config/mips/mips.md: Likewise. - * config/mn10200/mn10200.c, config/mn10300/mn10300.c: Likewise. - * config/ns32k/ns32k.c, config/ns32k/ns32k.md: Likewise. - * config/pa/pa.c, config/pdp11/pdp11.c: Likewise. - * config/pdp11/pdp11.md, config/sh/sh.c, config/v850/v850.c: Likewise. - * config/vax/vax.md, config/ns32k/ns32k.c: Likewise. - * config/ns32k/ns32k.md: Likewise. - -2001-07-03 Zack Weinberg - - * rtl.c (copy_rtx): Handle 'T' format letter. - * gensupport.c (collect_insn_data): Likewise. - * print-rtl.c (print_rtx): Print 'T' slots like 's'. - -2001-07-03 Nick Clifton - - * doc/invoke.texi (Directory Options): Specifiy range for in - -B option. Use 'dir' not 'foo' as example directory name. - -2001-07-03 Rainer Orth - - * config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. - Fixes PRs bootstrap/3067, bootstrap/3249, bootstrap/3275. - -2001-07-03 Joseph S. Myers - - * doc/cppinternals.texi: Improve formatting and logical markup. - -2001-07-03 Andreas Jaeger - - * Makefile.in (insn-recog.o): Add dependency on reload.h. - - * genrecog.c (write_header): Include reload.h for prototypes in - insn-recog.c. - -2001-07-03 Neil Booth - -config: - * i386/cygwin.h (VALID_MACHINE_DECL_ATTRIBUTE, - VALID_MACHINE_TYPE_ATTRIBUTE): Remove. - * i386/i386-protos.h (i386_pe_valid_decl_attribute_p, - i386_pe_valid_type_attribute_p): Add. - * i386/i386.c (TARGET_INITIALIZER): Override for cygwin targets. - * i386/winnt.c (i386_valid_decl_attribute_p): Return directly. - -Mon Jul 2 21:52:19 2001 Richard Kenner - - * explow.c (plus_constant_wide, case LO_SUM): New case. - (plus_constant_for_output_wide): Delete. - * rtl.h (plus_constant_for_output): Delete. - * alias.c (canon_rtx, init_alias_analysis): Call plus_constant - instead of plus_constant_for_output. - * recog.c (offsettable_address_p, adj_offsettable_operand): Likewise. - * config/darwin.c, config/arm/arm.c, config/m68k/m68k.c: Likewise. - * config/m88k/m88k.c, config/mips/mips.c, config/pa/pa.c: Likewise. - * config/rs6000/rs6000.c, config/sparc/sparc.c: Likewise. - * config/sparc/sparc.md: Likewise. - Convert some change_address calls to adjust_address. - -2001-07-03 Joseph S. Myers - - * doc/extend.texi, doc/gcc.texi, doc/invoke.texi, doc/md.texi, - doc/rtl.texi, doc/tm.texi: Improve formatting. Improve - documentation of -std and -Wwrite-strings. - -2001-07-02 Geoffrey Keating - - * cse.c (canon_hash): Don't register registers in very small - register classes, as extending their lifetime might cause - reload to fail. - -Mon Jul 2 23:14:00 CEST 2001 Jan Hubicka - - * flow.c (try_redirect_by_replacing_jump): Remove cc0 setter. - - * flow.c (forwarder_block_p): Fix for fallthru blocks. - (try_redirect_by_replacing_jump): Update properly the count - and frequency information. - -Mon Jul 2 14:20:13 2001 Jeffrey A Law (law@cygnus.com) - - * toplev.c (dump_file_index): Move SSA dumps just after first - jump dump. - (dump_file): Corresponding changes. - (rest_of_compilation): Move SSA path to just after the first - jump pass. - * doc/gcc.texi (Passes): Update due to movement of SSA path. - * doc/invoke.texi: Update dump file #s as they were completely - out of date with reality. - -2001-07-02 Geoffrey Keating - - * doc/tm.texi (Frame Layout): Document STACK_PUSH_CODE. - - * expr.c (emit_move_insn_1): Deal with non-default - STACK_PUSH_CODE. - - * expr.c (emit_single_push_insn): Fix warning. - -2001-07-02 Toshiyasu Morita - - * expr.c (emit_move_insn_1): Avoid modifying - cfun->expr->x_stack_pointer when PUSH_ROUNDING is defined. - -Mon Jul 2 15:33:31 2001 Richard Kenner - - * emit-rtl.c (adjust_address): New function. - * expr.h (adjust_address): Add declaration. - * builtins.c: Replace some calls to change_address with calls to it - or to validize_mem. - * caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise. - * function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise. - * config/arm/arm.c, config/convex/convex.c: Likewise. - * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. - * config/i386/i386.c, config/i386/i386.md: Likewise. - * config/ia64/ia64.c, config/ia64/ia64.md: Likewise. - * config/m32r/m32r.c, config/m68k/m68k.md: Likewise. - * config/m88k/m88k.c, config/mips/mips.md: Likewise. - * config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise. - * config/sh/sh.c, config/sparc/sparc.md: Likewise. - -2001-07-02 Jim Wilson - - * config/ia64/ia64.h: Delete obsolete lib1funcs.asm comment. - -2001-07-02 Steve Ellcey - - * config/ia64/t-ia64: Change LIB1ASMFUNCS to use single underscore. - * config/ia64/lib1funcs.asm: Change macro names to match t-ia64. - -2001-07-02 Zack Weinberg - - * cppinit.c (lang_defaults): New table. - (set_lang): Just read from lang_defaults into the live options - structure. - -2001-07-02 Zack Weinberg - - * Makefile.in (doc): Depend on $(GENERATED_MANPAGES). - * doc/.cvsignore: Add gcc.1, cpp.1, gcov.1. - * doc/gcc.1, doc/cpp.1, doc/gcov.1: Removed. - -2001-07-02 Rainer Orth - - * doc/install.texi: Various spelling and markup fixes. - (Installing GCC): Component specific installation instructions are - gone. - Fix reference. - Warn about removing old install dir in the presence of shared libs. - (Configuration): Invoke with options target to match configure - --help. - Consistently refer to gas, gld pathnames. - Invert --enable-multilib documentation. - Remove references to old compiler versions. - -Mon Jul 2 12:50:51 2001 Richard Kenner - - * flow.c (try_simplify_condjump): Fix typo in updating fallthru flags. - -2001-07-02 Rainer Orth - - * doc/install.texi (Specific, mips*-sgi-irix4): Split from IRIX 5 - section. - (Specific, mips*-sgi-irix5): Note IDO download. - Reworded MIPS C hints. - Use GNU as instead of GAS. - Markup fixes. - Removed SGI Freeware reference, IRIX 6 only. - (Specific, mips*-sgi-irix6): Removed ranlib caveats, obsolete. - Note N64 library requirement/workaround. - Update O32 hints. - Complete list of structure passing bug victims. - -2001-07-02 Gerald Pfeifer - - * doc/install.texi: Remove CVS Id. - -2001-07-02 Andreas Jaeger - - * ssa-dce.c (note_inherently_necessary_set): Add unused attribute. - (find_inherently_necessary): Remove unused variable. - -2001-07-02 Nathan Sidwell - - * c-common.h (TDI_inlined): New ast dump phase. - (dump_flag_name): New function. - * c-dump.c (dump_files): Add inlined phase. - (dump_flag_name): Define. - * doc/invoke.texi (-fdump-ast-inlined): Document. - -Mon Jul 2 06:29:36 2001 Richard Kenner - - * stor-layout.c (layout_decl): Revert change to handling of alignment - in packed types. - -Sun Jul 1 11:53:52 2001 Richard Kenner - - * c-common.c (decl_attributes, case A_MODE): Don't call layout_decl - for FIELD_DECL. - -2001-07-01 Geoffrey Keating - - * doc/tm.texi (FUNCTION_ARG): Document that the last call - is special. - -2001-07-01 Nathan Sidwell - - * tlink.c (recompile_files): Remove COMPILER_PATH and - LIBRARY_PATH from the environment. - -2001-07-01 Zack Weinberg - - * c-common.h (enum rid): Add RID_FIRST_AT, RID_LAST_AT, - RID_LAST_PQ. Move RID_FIRST_PQ down with the other FIRST/LAST - enumerators. - (OBJC_IS_AT_KEYWORD, OBJC_IS_PQ_KEYWORD): New macros. - - * c-parse.in (OBJC_STRING): Kill. - (objc_string): Decompose to [objc_string] '@' STRING. - (reswords): Take the leading '@' off all the Objective-C keywords. - (objc_rid_sans_at): Kill. - (init_reswords): Don't initialize it. - (yylexname): Use OBJC_IS_AT_KEYWORD and OBJC_IS_PQ_KEYWORD. - (_yylex): Kill reconsider label. Look ahead one token after - an '@'; if we get an identifier, check whether it's an - Objective-C @-keyword. If so, return the keyword. Otherwise, - put back the token and return the '@' as a terminal. - - * cpplib.c (lex_macro_node): Remove unnecessary check for - leading '@' on identifier. Clarify control flow and commentary. - -Sun Jul 1 11:53:52 2001 Richard Kenner - - * cse.c (new_label_ref): Variable deleted. - (insert): Remove set of new_label_ref. - (check_for_label_ref): New function. - (cse_basic_block): Don't check new_label_ref; call check_for_label_ref. - -See ChangeLog.5 for earlier changes. diff --git a/contrib/gcc/ChangeLog.7 b/contrib/gcc/ChangeLog.7 deleted file mode 100644 index f9c6a7d..0000000 --- a/contrib/gcc/ChangeLog.7 +++ /dev/null @@ -1,21543 +0,0 @@ -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: Include 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 enough. - -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/ChangeLog.8 b/contrib/gcc/ChangeLog.8 deleted file mode 100644 index 37774ee..0000000 --- a/contrib/gcc/ChangeLog.8 +++ /dev/null @@ -1,14448 +0,0 @@ -2002-12-31 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototypes. - * config/h8300/h8300.c (const_le_2_operand): Change to - const_int_le_2_operand. - (const_int_le_6_operand): Change to const_int_le_6_operand. - * config/h8300/h8300.md (two peepholes): Update the function - names. - -2002-12-31 Tom Tromey - - * doc/install.texi (Testing): Fixed typo. - -2002-12-31 Kazu Hirata - - * config/h8300/h8300.h (TRAMPOLINE_TEMPLATE): Remove. - (TRAMPOLINE_SIZE): Support the normal mode. - (INITIALIZE_TRAMPOLINE): Emit the entire trampoline. - -2002-12-31 Mark Mitchell - - * c-common.h (pending_lang_change): Declare. - -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 Gerald Pfeifer - - * doc/install.texi (Configuration): Explicitly refer - gcc/config.gcc for a list of cpu models. - -2002-12-31 Kazu Hirata - - * config/h8300/h8300.h: Fix comment typos. - -2002-12-30 David Edelsohn - - * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Define. - -2002-12-30 Tom Tromey - - * doc/install.texi (Testing): Mention Jacks. - -2002-12-30 Joseph S. Myers - - * doc/gcc.texi, doc/gccint.texi: Update last modification dates. - -2002-12-30 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Use extu.w in more - cases. - (compute_logical_op_length): Update to reflect the change in - output_logical_op. - (compute_logical_op_cc): Likewise. - -2002-12-30 Joseph S. Myers - - * doc/service.texi: Uncomment and update FAQ link. - -2002-12-30 Andreas Jaeger - - * unwind-dw2-fde.h (last_fde): Add unused attribute for obj. - -2002-12-30 Kazu Hirata - - * config/h8300/h8300.md (*addsi3_lshiftrt_16_zexthi): New. - -2002-12-30 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Use extu.w if we - are clearing the most significant byte. - (compute_logical_op_length): Update to reflect the change in - output_logical_op. - (compute_logical_op_cc): Likewise. - -2002-12-29 Kazu Hirata - - * config/h8300/h8300.md: Give internal names to anonymous - insns. - -2002-12-29 Kazu Hirata - - * config/h8300/h8300.md: Reorder some insns. - -2002-12-29 Kazu Hirata - - * config/h8300/h8300-protos.h: Add prototypes for - const_int_qi_operand and const_int_hi_operand. - * config/h8300/h8300.c (const_int_qi_operand): New. - (const_int_hi_operand): Likewise. - * config/h8300/h8300.md (three peepholes): New. - -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-28 Andreas Jaeger - - * config/i386/i386.c (x86_function_profiler): Mark labelno as - possibly unused. - - * c-parse.in (yyprint): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX for - correct format. - -2002-12-27 Kazu Hirata - - * config/h8300/h8300.md (*iorhi_shift_8): Change the name to - *iorhi_ashift_8. - (*iorhi_lshiftrt_8): New. - -2002-12-27 Joseph S. Myers - - * doc/include/texinfo.tex: Update to version 2002-12-26.16. - -2002-12-27 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Add Abramo and Roberto Bagnara. - -2002-12-26 Kazu Hirata - - * config/h8300/h8300-protos.h: Fix comment typos. - Update copyright. - * config/h8300/h8300.c: Fix comment typos. - -2002-12-26 Kazu Hirata - - * config/h8300/h8300.h (IDENT_ASM_OP): End with a tab. - -2002-12-26 Kazu Hirata - - * config/i386/athlon.md: Fix comment typos. - * config/i386/crtdll.h: Likewise. - * config/i386/djgpp.h: Likewise. - * config/i386/i386-interix.h: Likewise. - * config/i386/i386.c: Likewise. - * config/i386/i386.h: Likewise. - * config/i386/i386.md: Likewise. - * config/i386/k6.md: Likewise. - * config/i386/mingw32.h: Likewise. - * config/i386/pentium.md: Likewise. - * config/i386/sco5.h: Likewise. - * config/i386/winnt.c: Likewise. - * config/i386/xmmintrin.h: Likewise. - -2002-12-26 Jose Renau - - * ssa-dce.c (EXECUTE_IF_UNNECESSARY): Verify INSN is an - INSN_P before checking to see if it is dead. - (mark_all_insn_unnecessary): Similarly. - (ssa_eliminate_dead_code): Similarly. - * rtl.h (struct rtx_def): Update comments for in_struct usage - in dead code elimination pass. - (INSN_DEAD_CODE_P): Allow JUMP_INSN and CALL_INSN as well. - -2002-12-26 Andreas Schwab - - * config.gcc (powerpc*-*-*, rs6000-*-*): Fix assignment syntax. - -2002-12-25 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_override_options): Convert to - tartet_flags_explicit. - * config/rs6000/rs6000.h (MASK_MULTIPLE_SET, MASK_STRING_SET): Delete. - Compact target_flags bits. - (TARGET_MULTIPLE_SET, TARGET_STRING_SET): Delete. - (TARGET_SWITCHES): Delete references to *_SET flags. - -Wed Dec 25 20:30:53 CET 2002 Jan Hubicka - - * i386.md (memory attribute): Fix setcc attribute. - -2002-12-25 Kazu Hirata - - * output.h: Fix comment typos. - * predict.c: Likewise. - * print-tree.c: Likewise. - * profile.c: Likewise. - * ra-build.c: Likewise. - * ra-colorize.c: Likewise. - * ra-debug.c: Likewise. - * ra-rewrite.c: Likewise. - * ra.c: Likewise. - * ra.h: Likewise. - * real.c: Likewise. - * recog.c: Likewise. - * reg-stack.c: Likewise. - * regclass.c: Likewise. - -2002-12-25 Kazu Hirata - - * config/h8300/h8300.c (print_operand_address): Do not negate - a negative number when printing one. - -2002-12-25 Kazu Hirata - - * config/h8300/h8300-protos.h: Add prototypes for - output_plussi, compute_plussi_length, and compute_plussi_cc. - * config/h8300/h8300.c (output_plussi): New. - (compute_plussi_length): Likewise. - (compute_plussi_cc): Likewise. - * config/h8300/h8300.md (addsi_h8300h): Call - output_plussi, compute_plussi_length, and compute_plussi_cc. - -2002-12-24 Kazu Hirata - - * config/h8300/h8300.md (two peepholes): Use match_dup instead - of match_operand in the new patterns. - -2002-12-24 Joseph S. Myers - - * doc/include/texinfo.tex: Update to version 2002-11-25.11. - -2002-12-24 Nathan Sidwell - - * configure.in (enable-coverage): Add SELF_COVERAGE. - * profile.c (end_branch_prob): Use SELF_COVERAGE. - -2002-12-24 Jim Wilson - - * alias.c (record_set): Handle multi-reg hard registers. - -2002-12-24 Kazu Hirata - - * regmove.c: Fix comment typos. - * reload.c: Likewise. - * reload1.c: Likewise. - * resource.c: Likewise. - * rtl.def: Likewise. - * rtl.h: Likewise. - * rtlanal.c: Likewise. - * sched-deps.c: Likewise. - * sched-rgn.c: Likewise. - * sibcall.c: Likewise. - * simplify-rtx.c: Likewise. - * ssa-ccp.c: Likewise. - * ssa.c: Likewise. - * stmt.c: Likewise. - * stor-layout.c: Likewise. - * system.h: Likewise. - * tlink.c: Likewise. - * toplev.c: Likewise. - * tracer.c: Likewise. - * tree-inline.c: Likewise. - * tree.c: Likewise. - * tree.h: Likewise. - * unroll.c: Likewise. - * varasm.c: Likewise. - -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: Define DEVELOPMENT. - -2002-12-23 Mark Mitchell - - * stor-layout.c (update_alignment_for_field): Correct handling of - unnamed bitfields on PCC_BITFIELD_TYPE_MATTERS machines. - * doc/tm.texi (PCC_BITFIELD_TYPE_MATTERS): Note that an unnamed - bitfield does not affect alignment. - -2002-12-23 David Edelsohn - - * expr.c (expand_assignment): Apply special treatment to - ARRAY_TYPE. - -2002-12-23 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototype of - expand_a_shift. - * config/h8300/h8300.c (expand_a_shift): Change the return - type to void. - * config/h8300/h8300.md: Update all the uses of - expand_a_shift. - -2002-12-22 Nathan Sidwell - - * tree.c (save_expr): Allow either side of a dyadic operand to be - constant. - - * doc/portability.texi (portability): Update portability goals. - -2002-12-23 Kazu Hirata - - * config/h8300/h8300.c (output_a_shift): Remove unused code. - -2002-12-22 Mark Mitchell - - * stor-layout.c (update_alignment_for_field): Guard use of - ADJUST_FIELD_ALIGN with #ifdef. - - * stor-layout.c (update_alignment_for_field): Use - ADJUST_FIELD_ALIGN when computing the alignment for a zero-width - bitfield when PCC_BITFIELD_TYPE_MATTERS. - -2002-12-22 Kazu Hirata - - * genautomata.c: Fix comment typos. - -Sun Dec 22 18:23:44 CET 2002 Jan Hubicka - - * params.def (tracer-min-branch-probability-feedback): Fix default. - * final.c (compute_alignments): Use profile to avoid code bloat. - -2002-12-22 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Make shift insn - sequences end with a valid cc0 whenever possible. - -2002-12-22 Kazu Hirata - - * config/h8300/h8300.md (negsf2): New. - (*negsf2_h8300): Likewise. - (*negsf2_h8300hs): Likewise. - -2002-12-21 Geoffrey Keating - - * integrate.c (output_inline_function): Don't hold private - pointers to 'struct function' over GC calls. - -2002-12-21 Kaz kojima - - * config/sh/lib1funcs.asm (__fpscr_values): Conditionalize with - NO_FPSCR_VALUES. - * config/sh/t-linux (TARGET_LIBGCC2_CFLAGS): Add -DNO_FPSCR_VALUES. - -2002-12-21 Kazu Hirata - - * config/h8300/h8300.md (zero_extendqisi2): Correct the - length. - -2002-12-21 Kazu Hirata - - * config/h8300/h8300.md (*zero_extendqihi2_h8300): Make the - second alternative "#". - (*zero_extendqihi2_h8300hs): Likewise. - (a define_split): New. - -2002-12-21 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototype for - split_adds_subs. - Add prototypes for const_le_2_operand and const_le_6_operand. - * config/h8300/h8300.c (split_adds_subs): Add an argument to - specify whether inc/dec should be used when possible. - (const_le_2_operand): New. - (const_le_6_operand): Likewise. - * config/h8300/h8300.md (two peepholes): New. - -2002-12-21 Kazu Hirata - - * config/fr30/fr30.md: Fix a comment typo. - * config/i386/i386.c: Likewise. - * config/ip2k/ip2k.h: Likewise. - -2002-12-20 Jim Wilson - - * config/rs6000/spe.h (__ev_subifw): Reverse arguments. - (__ev_subw, __ev_subiw): New. - (ev_mwlssf, ev_mwlsmf, ev_mwlssfa, ev_mwlsmfa, ev_mwlssfaaw, - ev_mwlsmfaaw, ev_mwlssfanw, ev_mwlsmfanw): Delete. - -2002-12-20 John David Anglin - - * pa-linux.h (TARGET_HAS_STUBS_AND_ELF_SECTIONS): Delete define. - * pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Delete define. - * pa.c (pa_function_ok_for_sibcall): Allow non indirect sibcalls on - TARGET_ELF32. Add comment on sibcall issues for TARGET_64BIT. - -2002-12-20 Kazu Hirata - - * config/h8300/h8300-protos.h: Add prototypes for - incdec_operand and eqne_operator. - * config/h8300/h8300.c (incdec_operand): New. - (eqne_operator): Likewise. - * config/h8300/h8300.h (CONST_OK_FOR_M): Likewise. - (CONST_OK_FOR_O): Likewise. - (CONST_OK_FOR_LETTER_P): Use CONST_OK_FOR_M and - CONST_OK_FOR_O. - * config/h8300/h8300.md (UNSPEC_INCDEC): New. - (addhi3_incdec): New. - (addsi3_incdec): Likewise. - (two peepholes): Likewise. - -2002-12-20 Kazu Hirata - - * config/h8300/h8300.c (dosize): Remove warnings. - (print_operand): Likewise. - -2002-12-20 Richard Henderson - - * config/alpha/alpha.c (decl_has_samegp): New. - (samegp_function_operand): Use it. Rename from - current_file_function_operand. - (direct_call_operand): Handle -msmall-text via symbol->jump. - (tls_symbolic_operand_1): Use T for tprel64, t for smaller tprel. - (tls_symbolic_operand_type): Likewise. - (alpha_encode_section_info): Likewise. Handle -msmall-text. - (alpha_function_ok_for_sibcall): Use decl_has_samegp. - (alpha_end_function): Set symbol->jump for functions defined in - the text section. - * config/alpha/alpha-protos.h: Update. - * config/alpha/alpha.h (MASK_SMALL_TEXT, TARGET_SMALL_TEXT): New. - (TARGET_SWITCHES): Add -msmall-text and -mlarge-text. - (PREDICATE_CODES): Update. - * config/alpha/alpha.md (call patterns): Update for - samegp_function_operand rename; use !samegp reloc if - TARGET_EXPLICIT_RELOCS. - * doc/invoke.text: Document -msmall-text and -mlarge-text. - -2002-12-20 Ian Dall - - * config/ns32k/ns32k.md (movdi): Use "l" instead of "f" to match - all registers capable of holding a double float. - (*rcond): change name of "reverse branch" insns to - something more meaningful. - (*rbgt, *rblt, *rbge, *rble): Reverse branches to handle IEEE - comparisons properly. - (*ffs): Change operand 0 from write to read-modify-write. - (*ffsssi2): Drop constraints from define_expand. - - * config/ns32k/ns32k.h (STORE_RATIO, STORE_BY_PIECES): Avoid using - MOVE_RATIO as default for store operations. - - * config/ns32k/ns32k.h (enum reg_class, REG_CLASS_NAMES): Add - LONG_REGS class. - (CANNOT_CHANGE_MODE_CLASS): Can't subreg LONG_REGS. - (GO_IF_LEGITIMATE_ADDRESS): Remove spurious abort(). - * config/ns32k/ns32k.c (regclass_map): Add LONG_REGS class. - - * config/ns32k/STATUS: New File - * config/ns32k/NOTES: New file. - -2002-12-20 Hartmut Penner - - * doc/invoke.texi: Document -mzarch, -mesa, -mcpu= and -march= - option for S/390 and zSeries. - * config/s390/s390.c (s390_cpu, s390_cpu_string, s390_arch, - s390_arch_string): New variables. - (override_options): Checking for options and setting of - appropriate target_flags, cpu and arch flags. - * config/s390/s390.h: (processor_type): New enum. - (TARGET_SWITCHES): New switches -mesa/zarch. - * config/s390/s390.md: New attribute 'cpu'. - -2002-12-19 Kazu Hirata - - * c-pretty-print.h: Fix comment typos. - * integrate.c: Likewise. - * varasm.c: Likewise. - * config/c4x/c4x.h: Likewise. - * config/c4x/c4x.md: Likewise. - * config/fr30/fr30.md: Likewise. - * config/frv/frv.c: Likewise. - * config/h8300/h8300.c: Likewise. - * config/i386/i386.c: Likewise. - * config/i386/i386.h: Likewise. - * config/ia64/ia64.c: Likewise. - * config/ia64/ia64.h: Likewise. - * config/ip2k/ip2k.md: Likewise. - * config/m68hc11/m68hc11-crt0.S: Likewise. - * config/m68hc11/m68hc11.h: Likewise. - * config/m68hc11/m68hc11.md: Likewise. - * config/m68hc11/m68hc12.h: Likewise. - * config/mcore/mcore.md: Likewise. - * config/mips/mips.c: Likewise. - * config/mips/mips.md: Likewise. - * config/mmix/mmix-modes.def: Likewise. - * config/pa/pa.c: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/rs6000/rs6000.h: Likewise. - * config/rs6000/rs6000.md: Likewise. - -2002-12-19 Kazu Hirata - - * config/h8300/h8300.md (output_a_shift): Clean up the code to - output shifts using rotation. - -2002-12-20 Zdenek Dvorak - - * flow.c (allocate_reg_life_data): Reset REG_FREQ. - -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. - -Thu Dec 19 23:44:09 2002 J"orn Rennecke - - * sched-rgn.c (init_regions): Update comment. - -2002-12-19 David Edelsohn - - * config/rs6000/rs6000.md (define_attr type): Remove altivec. - * config/rs6000/altivec.md (movv4si_internal): Set correct instruction - attributes. - (movv8hi_internal,movv16qi_internal,movv4sf_internal): Same. - (get_vrsave_internal,set_vrsave_internal): Same. - (altivec_vspltisb,altivec_vspltish,altivec_vspltisw): Same. - (absv16qi2,absv8hi2,absv4si2,absv4sf2): Same - (altivec_abss_v16qi,altivec_abss_v8hi,altivec_abss_v4si): Same. - -2002-12-19 Casper S. Hornstrup - Danny Smith - Eric Kohl - - * config/i386/i386.c (ix86_handle_cdecl_attribute): Check for - attributes incompatible with fastcall attribute. - (ix86_handle_regparm_attribute): Likewise. - - * config/i386/i386.c (ix86_comp_type_attributes): Check for mismatched - fastcall types. - - * config/i386/cygwin.h (TARGET_OS_CPP_BUILTINS): Add fastcall - attributes. - (ASM_OUTPUT_LABELREF): Define as i386_pe_output_labelref. - * config/i386/i386-protos.h (i386_pe_output_labelref): Declare. - * config/i386/winnt.c (i386_pe_mark_dllimport). Add __imp_ prefix in - i386_pe_output_labelref rather than here. - (gen_fastcall_suffix): New function. Decorates a label name with the - fastcall prefix (@) and the stdcall suffix. - (i386_pe_encode_section_info): Call gen_fastcall_suffix() if a symbol - has a fastcall attribute. - (i386_pe_output_labelref): New function. Outputs a label reference. - * config/i386/i386.c (ix86_attribute_table): Accept 'fastcall' as a - valid attribute. - (ix86_return_pops_args): Fastcall functions pop the stack. - (init_cumulative_args): Reserve registers ECX and EDX if function has - fastcall attribute. - (function_arg): Use registers ECX and EDX if function has fastcall - attribute. - * config/i386/i386.h (CUMULATIVE_ARGS): Add fastcall attribute flag. - (DLL_IMPORT_EXPORT_PREFIX): Redefine as '#'. - (FASTCALL_PREFIX): Define as '@'. - * config/i386/mingw32.h (TARGET_OS_CPP_BUILTINS): Add fastcall - attributes. - * doc/extend.texi: Add documentation of fastcall attribute. - -2002-12-19 Nathanael Nerode - - * configure.in: FORBUILD when build!=host changed from - ../$build-alias to ../build-$build_alias to match change made - in top directory. - * configure: Regenerated. - -2002-12-19 Eric Botcazou - - PR optimization/8988 - * loop.c (maybe_eliminate_biv): Kill REG_EQUAL notes mentioning - the biv when eliminating. - -2002-12-19 Devang Patel - * gcc.c (struct default_compiler): Recognizes input file name with - .CPP extension as C++ source files - * cp/lang-spec.h: Same - * doc/invoke.texi: Add documentation for .CPP support. - -2002-12-19 Aldy Hernandez - - PR 8553 - * config/rs6000/altivec.md ("absv8hi2"): Add & to clobbered - registers. - ("absv16qi2"): Same. - ("absv4si2"): Same. - ("absv4sf2"): Same. - ("altivec_abss_v16qi"): Same. - ("altivec_abss_v8hi"): Same. - ("altivec_abss_v4si"): Same. - -2002-12-19 Ulrich Weigand - - * config/s390/s390.md ("*tsthiCCT", "*tsthiCCT_cconly", - "*tstqiCCT", "*tstqiCCT_cconly"): New insns. - -2002-12-19 Eric Botcazou - - PR target/8340 - * stmt.c (expand_asm_operands): Produce an error when - the PIC register is clobbered. - -2002-12-18 Daniel Berlin - - * Makefile.in (OBJS): Add alloc-pool.o - (alloc-pool.o): New object. - - * alloc-pool.c: New file. - * alloc-pool.h: New file. - -2002-12-18 Loren James Rittle - - * gcc.c (validate_switches): Robustify against skipping past '\0'. - -2002-12-18 Geoffrey Keating - - * config.gcc: Set extra_objs in the generic Darwin rule, - not in the machine-specific rules. - -2002-12-19 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.2: Likewise. - * ChangeLog.4: Likewise. - * ChangeLog.5: Likewise. - * cppexp.c: Likewise. - * df.c: Likewise. - * gcov.c: Likewise. - * gengtype.c: Likewise. - * reload1.c: Likewise. - * sched-rgn.c: Likewise. - * stmt.c: Likewise. - * stor-layout.c: Likewise. - * timevar.c: Likewise. - * toplev.c: Likewise. - * tree.h: Likewise. - * varasm.c: Likewise. - * config/fr30/fr30.md: Likewise. - * config/i386/i386.c: Likewise. - * config/ia64/ia64.c: Likewise. - * config/pa/pa.c: Likewise. - -2002-12-18 Roger Sayle - - * basic-block.h (flow_bb_inside_loop_p): Correct prototype. - -2002-12-18 Aldy Hernandez - - PR 8551 - * config/rs6000/altivec.h (vec_cmplt macro): Reverse arguments in - macro. - (vec_cmplt C++ functions): Reverse arguments. - -2002-12-18 Geoffrey Keating - - * config/rs6000/t-rs6000: Move contents to t-fprules, - add rules for dependencies of rs6000.o and to build rs6000-c.o - * config/rs6000/t-fprules: New file from t-rs6000. - * config/rs6000/t-beos: Remove soft-fp rules. - * config/rs6000/t-ppccomm: Likewise. - * config/rs6000/t-newas: Likewise. - * config/rs6000/t-rs6000-c-rule: Delete. - * config.gcc: Use t-fprules for rs6000/ ports when appropriate. - Use t-rs6000 for all rs6000/ ports instead of t-rs6000-c-rule. - Create generic Darwin rules. - - * gengenrtl.c (gencode): Delete unnecessary rtl_obstack declaration. - -2002-12-18 Doug Evans - - * m32r/m32r.c (addr24_operand): Fix arg to CONSTANT_POOL_ADDRESS_P - and LIT_NAME_P. - (move_src_operand): Remove compile-time warning. - * m32r/m32r.h (ROUND_ADVANCE_ARG): Ditto. - -2002-12-18 Jason Merrill - - * unwind-dw2-fde.c (frame_downheap): Split out from... - (frame_heapsort): Here. - -2002-12-17 Jason Merrill - - * tree.c (make_node): Don't set TREE_TYPE on 's' class nodes. - (build1): Always set TREE_SIDE_EFFECTS on 's' class nodes. - - * gcc.c (do_spec_1) ['W']: End any pending argument from the braces. - - * calls.c (expand_call): Don't try to be clever about expanding - the return slot address. - -2002-12-18 Kaz kojima - - * config/sh/linux.h (NO_IMPLICIT_EXTERN_C, CPLUSPLUS_CPP_SPEC): - Define. - -2002-12-17 Jason Merrill - - * genmultilib: Use 'cd ./foo'. - -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-17 Ulrich Weigand - - * config/s390/s390.c (s390_output_constant_pool): Replace - ASM_OUTPUT_INTERNAL_LABEL by (*targetm.asm_out.internal_label). - -Tue Dec 17 09:47:57 CET 2002 Jan Hubicka - - * convert.c (convert_to_real): Disable function transformation for - now. - -2002-12-16 Geoffrey Keating - - * gcc.c (handle_braces): Allow '@' as a switch name. - -2002-12-16 Jason Merrill - - * calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR - with special struct-return ABIs. - - * c-semantics.c (add_scope_stmt): Abort if the end SCOPE_STMT - doesn't match the begin SCOPE_STMT in partialness. - -2002-12-16 Geoffrey Keating - - * genmultilib: Create temporary files in unique subdirectory. - - * gcc.c (validate_switches): Allow '@' as a switch name. - -2002-12-16 Loren J. Rittle - - * Makefile.in (gcov-iov.h): Improve portability. - -Mon Dec 16 23:39:19 CET 2002 Jan Hubicka - - * mips.h (ASM_OUTPUT_ADDR_DIFF_ELT): Do not use qpword on API_N32/not - gas - * mips.md (tablejump insn): Likewise. - -2002-12-16 Mark Mitchell - - * doc/include/gcc-common.texi: Change version number to 3.4. - -2002-12-16 Bruce Korb - - * fixinc/fixlib.h: add: #include - * fixinc/fixincl.c: remove: #include - -Mon Dec 16 17:20:04 2002 J"orn Rennecke - - * sh.h (EXTRA_CONSTRAINT_Z): New macro. - (EXTRA_CONSTRAINT): Use it. - * sh.md (anddi3): Use 'Z' constraint for alternative 2. - -2002-12-15 Zack Weinberg - - * config.gcc (need_64bit_hwint): New variable. - (alpha*-*-*, x86_64-*-*, ia64-*-*, mips*-*-*, powerpc*-*-*, - mmix-knuth-mmixware, rs6000*-*-*, sparc64*-*-*, s390*-*-*, - sh*-*-*, hppa*64*-*-linux, parisc*64*-*-linux, hppa*64*-*-hpux11*, - sparcv9-*-solaris2*, sparc*-*-solaris2.[789], ultrasparc-*-freebsd*): - Set it. - (powerpc*-*-darwin*): Unset it. - (alpha-*-interix, alpha64-dec-*vms*, i?86-*-interix3*, - i?86-*-interix*, sparc64-*-openbsd*): Remove references to - deleted/nonexistent xm-*.h headers. - * configure.in: AC_DEFINE NEED_64BIT_HOST_WIDE_INT if the - target set need_64bit_hwint in config.gcc. - * configure, config.in: Regenerate. - - * hwint.h: Overhaul. Don't bother trying int for - HOST_WIDE_INT. Do try __int64 if long is not enough. Base - decision to force 64-bit HOST_WIDE_INT on - NEED_64BIT_HOST_WIDE_INT, not (MAX_)LONG_TYPE_SIZE which is - not visible at this point. Don't allow prior definition of - any macro defined by this file. - - * config/alpha/xm-vms.h: Don't define HOST_WIDE_INT or - HOST_BITS_PER_WIDE_INT. - * config/c4x/c4x.h: Adjust redefinition of - HOST_WIDE_INT_PRINT_HEX to match changes to hwint.h. - * config/alpha/xm-alpha-interix.h, config/alpha/xm-vms64.h, - config/i386/xm-i386-interix.h: Delete file. - -2002-12-14 Rodney Brown - John David Anglin - - * pa.c (output_millicode_call): Convert ASM_OUTPUT_INTERNAL_LABEL. - * pa64-hpux.h (ASM_OUTPUT_INTERNAL_LABEL): Delete define. - -2002-12-14 Zack Weinberg - - * mkconfig.sh: Correct comment. Add copyright boilerplate. - -2002-12-14 Zack Weinberg - - * config/t-darwin, config/arm/t-pe, config/arm/t-strongarm-pe, - config/c4x/t-c4x, config/i370/t-i370, config/i386/t-cygwin, - config/i386/t-interix, config/i960/t-960bare, config/ia64/t-ia64, - config/rs6000/t-rs6000-c-rule, config/sparc/t-sol2, - config/v850/t-v850: Correct dependencies and normalize - compilation commands for files that include coretypes.h and tm.h. - - * config/sparc/gmon-sol2.c: Include tconfig.h and tsystem.h, - not config.h and system.h. - -Sat Dec 14 20:43:41 CET 2002 Jan Hubicka - - * i386.c (flags_reg_operand): New function. - * i386.h (PREDICATE_CODES): Add flags_reg_operand. - * i386.md (cmov splitter, movqicc): Use new predicate. - -Sat Dec 14 17:03:17 CET 2002 Jan Hubicka - - * i386.md (movqicc splitter): Fix template. - -2002-12-13 Jason Merrill - - * tree.h (CALL_EXPR_HAS_RETURN_SLOT_ADDR): New macro. - * calls.c (expand_call): Handle it. - * tree-inline.c (struct inline_data): Remove target_exprs field. - (optimize_inline_calls): Don't initialize it. - (expand_call_inline): Don't modify it. Handle - CALL_EXPR_HAS_RETURN_SLOT_ADDR. - (declare_return_variable): Take return slot addr. - * langhooks.h (copy_res_decl_for_inlining): Change target_exprs parm - to return_slot_addr. - * langhooks-def.h, langhooks.c: Adjust. - * explow.c (maybe_set_unchanging): Don't set RTX_UNCHANGING_P for - a decl with no DECL_INITIAL. - - * expr.c (expand_expr): Don't discard the target of a call which - returns in memory. - -2002-12-13 Neil Booth - - * cppinit.c (path_include): Take an environment variable name. - Tidy up. - (init_standard_includes): Simplify environment handling, and - move to ... - (cpp_read_main_file): ...here as -nostdinc should not affect - environment variable paths. - -2002-12-13 John David Anglin - - * pa.c (output_millicode_call): Correct typo. - (output_call): Likewise. - -Fri Dec 13 21:07:18 2002 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. - -Fri Dec 13 16:02:27 2002 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 Zdenek Dvorak - - * hooks.h (hook_tree_tree_bool_false): Declare - hook_bool_tree_tree_false instead. - -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. - -Thu Dec 12 16:24:59 2002 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 Zack Weinberg - - * Makefile.in (GTFILES): Add $(host_xm_file_list) and - $(tm_file_list). - -2002-12-11 David Edelsohn - - * config/rs6000/t-rs6000-c-rule: Add coretypes.h $(TM_H) dependencies. - -Wed Dec 11 15:20:45 CET 2002 Jan Hubicka - - * i386.md (cmove splitters): Avoid creation of unnecesary subregs. - -2002-12-11 John David Anglin - - * pa.h (BIGGEST_ALIGNMENT): Change 32-bit value to 64 bits. - (MAX_PARM_BOUNDARY, STACK_BOUNDARY): Express in terms of - BIGGEST_ALIGNMENT. - (PREFERRED_STACK_BOUNDARY): Express in terms of STACK_BOUNDARY. - (FUNCTION_BOUNDARY): Express in terms of BITS_PER_WORD. - -2002-12-11 Kazu Hirata - - * doc/invoke.texi: Correct dump file names. - -2002-12-09 Steve Ellcey - - * config/ia64/ia64.c (ia64_hpux_asm_file_end): Don't send stripped - name to globalize_label or assemble_name. - -Wed Dec 11 20:15:19 2002 J"orn Rennecke - - * sh.h (REG_CLASS_HAS_GENERAL_REG): Only true for SIBCALL_REGS - if not TARGET_SHMEDIA. - -Wed Dec 11 19:05:05 2002 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. - -Wed Dec 11 18:39:52 2002 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 David Edelsohn - - * haifa-sched.c (rank_for_schedule): Correct style. - -2002-12-10 Per Bothner - - * cpplib.h (struct cpp_hashnode): Split a non-portably-signed field - directive_index into an unsigned field and a new is_directive field. - * cppinit.c (mark_named_operators): Update to set new fields. - * cpplex.c (_cpp_lex_direct): Now directive_field is unsigned. - * cpplib.c [_cpp_handle_directive]: Test is_directive field. - No longer need to subtract 1 from directive_index. - (_cpp_init_directives): No longer need to add 1 to directive_index. - * cpptrad.c (scan_out_logical_line): Use is_directive field. - -2002-12-10 Roger Sayle - - * builtins.c (fold_builtin): Remove -funsafe-math-optimizations - check for evaluating sqrt of a constant at compile time. - * simplify-rtx.c (simplify_unary_operation): Likewise. - -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. - -Mon Dec 9 21:33:38 CET 2002 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-* - -Sun Dec 8 14:57:39 CET 2002 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Use force_operand instead of - constructing insn directly. - -2002-12-06 Per Bothner - - * cpplib.h (struct cpp_hashnode): Change field directive_index from - char to an int bit-field, for hosts where char is unsigned. - -2002-12-07 Roger Sayle - Richard Henderson - - * real.c (ieee_extended_motorola_format, - ieee_extended_intel_96_format, ieee_extended_intel_128_format, - ieee_quad_format, vax_d_format, vax_g_format, i370_double_format): - Provide appropriate values for new signbit field. - -2002-12-07 Roger Sayle - - * real.h (real_format): Add signbit field. - * real.c (ieee_single_format, ieee_double_format, - ieee_extended_motorola_format, ieee_extended_intel_96_format, - ieee_extended_intel_128_format, ibm_extended_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, real_internal_format): - Provide suitable signbit value, or -1 to avoid bit twiddling. - - * optabs.c (expand_unop): Try implementing negation of - floating point modes by flipping the sign bit. - (expand_abs): Try implementing abs of floating point modes - by clearing the sign bit. - -Sat Dec 7 22:29:47 CET 2002 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 Per Bothner - - * cpplib.h (NODE_MACRO_ARG): New flag. - (struct cpp_hashnode): Give _cpp_hashnode_value tag to value union. - Remove value.operator field. Move arg_index field to value union. - (directive_index): Make signed, since also used for C++ operators. - * cppmacro.c (_cpp_save_parameter): Use NODE_MACRO_ARG flag to - check for duplicate parameter. Set NODE_MACRO_ARG flag. - Save node->value, and set node->value.arg_index. - (_cpp_create_definition): For each paramater, restore node->value. - (lex_expansion_token): Use NODE_MACRO_ARG flag, and moved arg_index. - * cpptrad.c (scan_out_logical_line): Likewise. - (scan_out_logical_line): Check for directive > 0. - * cpplib.c (cpp_handle_directive): Likewise. - * cpplex.c (_cpp_lex_direct): Update as value.operator is replaced - by negative of directive_index. - * cppinit.c (mark_named_operators): Likewise. - - * hashtable.h (struct ht_identifier): Swap fields, for better packing. - -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. - -Fri Dec 6 19:36:24 2002 J"orn Rennecke - - * sh.c (dump_table): DImode pool constants need only 32 bit alignment. - DFmode alignment depends on TARGET_FMOVD && TARGET_ALIGN_DOUBLE. - -Fri Dec 6 19:17:49 2002 J"orn Rennecke - - * sh.md (movdi_i): Name. Remove inappropriate comment. - -Fri Dec 6 15:44:46 2002 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. - -Thu Dec 5 16:58:25 CET 2002 Jan Hubicka - - * i386.md (dimode peep2s): Re-add "&& 1". - -Thu Dec 5 14:10:15 CET 2002 Jan Hubicka - - * i386.c (ix86_expand_prologue): Add comment, do not use - fast prologues for cold and normal functions. - -Thu Dec 5 00:52:37 CET 2002 Jan Hubicka - - * i386.c (x86_rep_movl_optimal): New variable. - (ix86_expand_movstr, ix86_expand_clrstr): Use TARGET_REP_MOVL_OPTIMAL - * i386.h (TARGET_REP_MOVL_OPTIMAL): New macro. - - * i386.md (negsf2_ifs, negdf2_ifs, negdf2_ifs_rex64, abssf2_ifs, - absdf2_ifs, absdf2_ifs_rex64): Fix constraints. - neg?f2_ifs, abs?f2_ifs splitters): Refuse memory operand; do not - generate unnecesary subregs. - -2002-12-05 John David Anglin - - * pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): Move define. - * pa.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL): To here. - -2002-12-05 Dale Johannesen - - * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR. - -2002-12-05 Danny Smith - - * config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with - PROFILE_HOOK. - * config/i386/mingw32.h (SUBTARGET_PROLOGUE): Don't undef. - -2002-12-05 Aldy Hernandez - - * config/rs6000/spe.h (__ev_mwlufi): Remove. - (__ev_mwlufia): Remove. - (__ev_mwlumfaaw): Remove. - (__ev_mwlusfaaw): Remove. - (__ev_mwlumfanw): Remove. - (__ev_mwlusfanw): Remove. - -2002-12-05 Kazu Hirata - - * config/h8300/h8300.md (*andorsi3_shift_8): New. - -2002-12-05 Kazu Hirata - - * config/h8300/h8300.c (shift_alg_si): Optimize ashift:HI and - lshiftrt:SI by 28, 29, and 30 bits when !TARGET_H8300. - (get_shift_alg): Return optimal assembly instructions for the - shifts mentioned above. - -Wed Dec 4 11:53:07 CET 2002 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Force operand into register for QImode - condtiional moves. - -2002-12-04 Kazu Hirata - - * config/h8300/h8300.c (h8300_init_once): Do not use loop to - implement ashiftrt:HI by 13 bits on H8S. - -2002-12-04 John David Anglin - - * pa/fptr.c (__canonicalize_funcptr_for_compare): New file and function. - * pa.md (canonicalize_funcptr_for_compare): Output library call to - canonicalize_funcptr_for_compare_libfunc on TARGET_ELF32. - * pa32-linux.h (CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL, - CTOR_LIST_BEGIN): New defines. - * pa/t-linux (LIB2FUNCS_EXTRA): New define. - (fptr.c): Add make rules. - -2002-12-04 Geoffrey Keating - - * combine.c (combine_simplify_rtx): Add new canonicalizations. - * doc/md.texi (Insn Canonicalizations): Document new - canonicalizations for multiply/add combinations. - * config/rs6000/rs6000.md: Add and modify floating add/multiply - patterns to ensure they're used whenever they can be. - -2002-12-04 Kazu Hirata - - * config/h8300/h8300.c: Update the comments related to shifts. - -2002-12-04 Chris Demetriou - - * config/mips/mips.md (get_fnaddr): Correct length attribute. - -2002-12-04 Kazu Hirata - - * config/h8300/h8300.md (*extzv_8_8): New. - (*extzv_8_16): Likewise. - -2002-12-04 Jason Merrill - - PR c++/8461, c++/8625 - * integrate.c (copy_decl_for_inlining): Handle explicit invisible - references. - * tree-inline.c (initialize_inlined_parameters): Likewise. - - * tree.c (variably_modified_type_p): Just return an error_mark_node. - -2002-12-04 Chris Demetriou - - * config/mips/mips.md (get_fnaddr): Avoid placing an "la" - macro instruction in a branch delay slot, to avoid assembler - warnings. - -2002-12-04 Eric Botcazou - - PR c/7622 - * c-semantics (genrtl_scope_stmt): Do not output inlined - nested functions that contain no code. - -Wed Dec 4 15:20:54 CET 2002 Jan Hubicka - - * cfgrtl.c (force_nonfallthru_and_redirect): Allow abnormal edge - to be forced into nonfallthru. - -2002-12-03 Jason Thorpe - - * config/t-netbsd (USER_H): Set to $(EXTRA_HEADERS). - -2002-12-03 Aldy Hernandez - - * config/rs6000/spe.md (*movv1di_const0): New pattern. - -2002-12-03 Richard Henderson - - * libgcc-std.ver: Inherit GCC_3.3 from GCC_3.0. - -2002-12-03 Hans-Peter Nilsson - - * bitmap.c (bitmap_ior_and_compl, bitmap_union_of_diff): - Initialize tmp.using_obstack to 0. - -2002-12-03 Andreas Schwab - - * config/m68k/m68k.h (EH_RETURN_DATA_REGNO): Define. - (EH_RETURN_STACKADJ_RTX): Define. - (EH_RETURN_HANDLER_RTX): Define. - (ASM_PREFERRED_EH_DATA_FORMAT): Define. - * config/m68k/m68k.c (m68k_save_reg): New function. Handle eh - registers and don't save fixed registers. - (m68k_output_function_prologue): Use it. - (use_return_insn): Likewise. - (m68k_output_function_epilogue): Likewise. - -2002-12-03 Kazu Hirata - - * config/h8300/h8300.c (single_one_operand): Fix a warning. - (single_zero_operand): Likewise. - -2002-12-02 Nathanael Nerode - - * Makefile.in configure configure.in dummy-conditions.c fix-header.c - gcov-iov.c gen-protos.c genattr.c genattrtab.c genautomata.c - gencheck.c gencodes.c genconditions.c genconfig.c genconstants.c - genemit.c genextract.c genflags.c gengenrtl.c gengtype-lex.l - gengtype-yacc.y gengtype.c genopinit.c genoutput.c genpeep.c - genpreds.c genrecog.c gensupport.c mkconfig.sh read-rtl.c - scan-decls.c scan.c config/sh/sh.h doc/configfiles.texi - doc/install-old.texi: Replace hconfig.h with bconfig.h. - * Makefile.in: Replace HCONFIG_H with BCONFIG_H. - -2002-12-02 Andrew Pinski - - * config/rs6000/rs6000.md (ffssi): Convert to expander. - (ffsdi): Likewise. - (cntlzw2, cntlzd2): New patterns. - -2002-12-02 H.J. Lu - - * config.gcc (mips*-*-netbsd*): Remove mips/t-netbsd. - (mips*-*-linux*): Remove mips/t-linux. - -Mon Dec 2 19:26:30 CET 2002 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Avoid overflow. - -2002-12-02 Kazu Hirata - - * config/h8300/h8300.c (dosize): Replace argument op with - sign. - (h8300_output_function_prologue): Update the call to dosize. - (h8300_output_function_epilogue): Likewise. - -2002-12-02 Bob Wilson - - * config/xtensa/xtensa.h: Delete ifndefs with nothing inside them. - -2002-12-02 Craig Rodrigues - - * configure.in: Use "missing" script to generate warning if - flex or bison programs not found, instead of invoking "false". - * configure: Rebuilt. - -Mon Dec 2 20:28:48 CET 2002 Jan Hubicka - - * unroll.c (copy_loop_body): Copy CONST_OR_PURE_CALL_P. - -Mon Dec 2 19:42:52 CET 2002 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. - -Mon Dec 2 14:43:22 2002 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. - -Sun Dec 1 16:50:47 CET 2002 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): fix - reversed BRANCH_COST test; be curefull about infinite recursion. - -2002-12-01 Kazu Hirata - - * config/h8300/h8300.c (h8300_output_function_prologue): - Remove variable idx. - (h8300_output_function_epilogue): Likewise. - -2002-12-01 Zack Weinberg - - * config/frv/xm-frv.h: Delete, unnecessary. - -2002-12-01 Kazu Hirata - - * config/h8300/h8300.md: Add comments for define_peephole2. - -2002-12-01 Mark Mitchell - - * builtin-types.def (BT_SIZE): Use size_type_node. - * builtins.c (fold_builtin): Make the builtin strlen returns a - size_t, not a sizetype. - * c-common.c (c_sizeof_or_alignof_type): Use size_type_node, not - c_size_type_node. - (c_alignof_expr): Likewise. - (c_common_nodes_and_builtins): Likewise. - * c-common.h (CTI_C_SIZE_TYPE): Remove. - (c_size_type_node): Likewise. - * c-format.c (T_ST): Use size_type_node, not c_size_type_node. - * tree.h (TI_SIZE_TYPE): New enumeral. - (size_type_node): Likewise. - -2002-11-30 Zack Weinberg - - * configure.in: Don't put ${tm_file} into host_xm_file, - build_xm_file, or xm_file. Do put tm-preds.h into tm_p_file. - Take location of tm-preds.h into account when calculating - tm_p_file_list. - * configure: Regenerate. - * mkconfig.sh: No need for separate TM_DEFINES and XM_DEFINES - arguments. Do not provide rtx, rtvec, tree, or GTY here. - Remove special case code for tm_p.h and *config.h; add new - special case code for tm.h and tconfig.h. Clean up a bit. - - * Makefile.in (tm_file, tm_file_list): New variables set from - @-substitutions. - (GCONFIG_H): Deleted. - (GTM_H, TM_H): New. - (CONFIG_H): Is now just config.h $(host_xm_file_list). - (TM_P_H): Move up with the other mkconfig.sh-generated - headers; don't mention tm-preds.h explicitly. - (tm.h, cs-tm.h): New rule. - (cs-config.h, cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): Adjust - invocations of mkconfig.sh for changes to that program. - (mostlyclean): Delete print-rtl1.c. - (clean): Delete tm.h. - Update dependencies for the files listed below. - - * mklibgcc.in: Add 'coretypes.h $(TM_H)' to libgcc2_c_dep. - - * coretypes.h: New file. - * system.h: #define malloc to xmalloc and realloc to xrealloc - when FLEX_SCANNER or YYBISON is defined, independent of the - value of GCC_VERSION. - * alias.c, attribs.c, bb-reorder.c, bitmap.c, builtins.c, - c-aux-info.c, c-common.c, c-convert.c, c-decl.c, c-dump.c, - c-errors.c, c-format.c, c-lang.c, c-lex.c, c-objc-common.c, - c-opts.c, c-parse.in, c-pragma.c, c-pretty-print.c, - c-semantics.c, c-typeck.c, caller-save.c, calls.c, cfg.c, - cfganal.c, cfgbuild.c, cfgcleanup.c, cfglayout.c, cfgloop.c, - cfgrtl.c, collect2.c, combine.c, conflict.c, convert.c, - cppdefault.c, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, - cppinit.c, cpplex.c, cpplib.c, cppmacro.c, cppmain.c, - cppspec.c, cpptrad.c, crtstuff.c, cse.c, cselib.c, dbxout.c, - debug.c, df.c, diagnostic.c, doloop.c, dominance.c, - dummy-conditions.c, dwarf2asm.c, dwarf2out.c, dwarfout.c, - emit-rtl.c, errors.c, et-forest.c, except.c, explow.c, - expmed.c, expr.c, final.c, fix-header.c, flow.c, fold-const.c, - function.c, gcc.c, gccspec.c, gcov-dump.c, gcov-iov.c, gcov.c, - gcse.c, gen-protos.c, genattr.c, genattrtab.c, genautomata.c, - gencheck.c, gencodes.c, genconditions.c, genconfig.c, - genconstants.c, genemit.c, genextract.c, genflags.c, - gengenrtl.c, gengtype-lex.l, gengtype-yacc.y, gengtype.c, - genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, - gensupport.c, ggc-common.c, ggc-none.c, ggc-page.c, - ggc-simple.c, global.c, graph.c, haifa-sched.c, hashtable.c, - hooks.c, ifcvt.c, integrate.c, intl.c, jump.c, langhooks.c, - lcm.c, libgcc2.c, line-map.c, lists.c, local-alloc.c, loop.c, - main.c, mbchar.c, mips-tdump.c, mips-tfile.c, mkdeps.c, - optabs.c, params.c, predict.c, prefix.c, print-rtl.c, - print-tree.c, profile.c, protoize.c, ra-build.c, - ra-colorize.c, ra-debug.c, ra-rewrite.c, ra.c, read-rtl.c, - real.c, recog.c, reg-stack.c, regclass.c, regmove.c, - regrename.c, reload.c, reload1.c, reorg.c, resource.c, - rtl-error.c, rtl.c, rtlanal.c, sbitmap.c, scan-decls.c, - scan.c, sched-deps.c, sched-ebb.c, sched-rgn.c, sched-vis.c, - sdbout.c, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, - ssa.c, stmt.c, stor-layout.c, stringpool.c, timevar.c, - tlink.c, toplev.c, tracer.c, tree-dump.c, tree-inline.c, - tree.c, unroll.c, varasm.c, varray.c, varray.h, vmsdbgout.c, - xcoffout.c, config/darwin-c.c, config/darwin.c, - config/fp-bit.c, config/alpha/alpha.c, config/alpha/vms-cc.c, - config/alpha/vms-ld.c, config/arc/arc.c, config/arm/arm.c, - config/arm/pe.c, config/avr/avr.c, config/c4x/c4x-c.c, - config/c4x/c4x.c, config/cris/cris.c, config/d30v/d30v.c, - config/dsp16xx/dsp16xx.c, config/fr30/fr30.c, - config/frv/frv.c, config/h8300/h8300.c, config/i370/i370-c.c, - config/i370/i370.c, config/i386/i386.c, config/i386/winnt.c, - config/i960/i960-c.c, config/i960/i960.c, - config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, - config/m32r/m32r.c, config/m68hc11/m68hc11.c, - config/m68k/m68k.c, config/m88k/m88k.c, config/mcore/mcore.c, - config/mips/irix6-libc-compat.c, config/mips/mips.c, - config/mmix/mmix.c, config/mn10200/mn10200.c, - config/mn10300/mn10300.c, config/ns32k/ns32k.c, - config/pa/pa.c, config/pdp11/pdp11.c, config/romp/romp.c, - config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, - config/s390/s390.c, config/sh/sh.c, config/sparc/gmon-sol2.c, - config/sparc/sparc.c, config/stormy16/stormy16.c, - config/v850/v850-c.c, config/v850/v850.c, config/vax/vax.c, - config/xtensa/xtensa.c, objc/objc-act.c, objc/objc-lang.c: - Include coretypes.h and tm.h. - - * genattrtab.c, genconditions.c, genemit.c, genextract.c, - gengenrtl.c, gengtype.c, genopinit.c, genoutput.c, genpeep.c, - genrecog.c: Include coretypes.h and tm.h from the file - generated by this program. - - * unwind-dw2-fde-darwin.c, unwind-dw2-fde-glibc.c, - unwind-dw2-fde.c, unwind-dw2.c, unwind-sjlj.c: Include - coretypes.h and tm.h, and tsystem.h when not already included. - No need to include stddef.h nor stdlib.h. - - * fixinc/fixlib.h: Include coretypes.h and tm.h. Do not - include auto-host.h or ansidecl.h/ - * fixinc/server.h: Do not include stdio.h, unistd.h, or fixlib.h. - * fixinc/procopen.c: Include server.h after fixlib.h. Do not - include auto-host.h, ansidecl.h, or system.h. - * fixinc/server.c: Likewise. Also, do not include signal.h, - and do not redefine volatile. - -Sat Nov 30 17:16:46 CET 2002 Jan Hubicka - - * i386.md (movdf_integer): Always enable in 64bit. - (movdf_nointeger): Always disable in 64bit. - -2002-11-30 John David Anglin - - * cfg.c (dump_flow_info): Use max_reg_num () to determine the largest - pseudo register number plus 1. - -Fri Nov 29 20:10:56 2002 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-11-29 Hans-Peter Nilsson - - * cpplib.c (_cpp_test_assertion): Default *value to 0. - - * cppexp.c (num_part_mul): Initialize result.unsignedp, to 1. - -2002-11-29 Ulrich Weigand - - * config/s390/t-crtstuff: New target makefile fragment. - * config.gcc [s390-*-linux, s390x-*-linux]: Use it. - -2002-11-29 Kazu Hirata - - * config/h8300/h8300.md (movsi_h8300hs): Change the order of - alternatives to correct the length when the memory operand is - either pre_dec or post_inc. - -2002-11-29 Kazu Hirata - - * config/h8300/h8300.md (an anonymous pattern): Give an - internal name *tst_extzv_bitqi_1_n. - Accept bit_operand instead of bit_memory_operand. - Do not accept bit tests with the MSB. - (*tst_extzv_memqi_1_n): New. - -Thu Nov 28 23:56:24 CET 2002 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Add copy_rtx to avoid invalid RTX - sharing when operand is SUBREG. - -Thu Nov 28 08:57:26 CET 2002 Jan Hubicka - - * athlon.md (athlon-decodev): New reservation unit. - (athlon-direct0): New reservation. - (athlon-vector): New use athlon-decodev. - (athlon-double, athlon-direct): Better model. - (athlon_imul_k8): Use athlon-direct0. - (athlon_movlpd_load): New insn reservation. - -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. - -Wed Nov 27 20:34:13 CET 2002 Jan Hubicka - - * i386.c (x86_sse_partial_regs_for_cvtsd2ss): New. - * i386.h (x86_sse_partial_regs_for_cvtsd2ss): Declare. - (TARGET_SSE_PARTIAL_REGS_FOR_CVTSD2SS): New macro. - * i386.md (truncdfsf patterns and splitters): Use - TARGET_SSE_PARTIAL_REGS_FOR_CVTSD2SS - -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. - -Wed Nov 27 14:45:46 CET 2002 Jan Hubicka - - * builtins.def (DEF_C99_BUILTIN): Fix. - -2002-11-26 Kaz Kojima - - * config/sh/lib1funcs.asm (FUNC, ENDFUNC0, ENDFUNC): New macros. - (all): Add .size and .type information. - -Tue Nov 26 22:43:50 CET 2002 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Do not emit lea for short mode on - partial_reg_stall target. - -Tue Nov 26 22:27:47 CET 2002 Jan Hubicka - - * i386.md (movhicc): Allow general operand. - (movqicc): New expander. - (movqicc_noc): New pattern. - * i386.c (ix86_expand_carry_flag_compare): New function. - (ix86_expand_int_movcc): Optimize harder using sbb; support more - HImode conversion; support QImode conditional moves - -Tue Nov 26 16:30:59 CET 2002 Jan Hubicka - - * i386.c (FAST_PROLOGUE_INSN_COUNT): Set to 20. - (ix86_expand_prologue): Multiply the count by amount of registers to be - pushed. - -Tue Nov 26 15:55:27 CET 2002 Jan Hubicka - - * i386.c (override_options): Error about wrong -mcpu on x86-64 - compilation. - -2002-11-26 NIIBE Yutaka - - * config/sh/linux.h (FUNCTION_PROFILER): Implemented. - -Tue Nov 26 00:14:20 CET 2002 Jan Hubicka - - * i386-protos.h (x86_extended_QIreg_mentioned_p, - x86_extended_reg_mentioned_p): Declare. - * i386.c (extended_reg_mentioned_1): New static function. - (x86_extended_QIreg_mentioned_p, - x86_extended_reg_mentioned_p): New global functions. - * i386.h (REX_SSE_REGNO_P): New macro. - * i386.md (prefix_rex): New attribute. - (length attribute): Add rex. - -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. - -Mon Nov 25 18:32:37 CET 2002 Jan Hubicka - - * i386.md (pushsf_rex64): Fix typo. - -2002-11-25 Aldy Hernandez - - * config/rs6000/spe.h (__ev_create_sfix32_fs): Change macro into - new function. - (__ev_create_ufix32_fs): Same. - (__ev_get_sfix32_fs_internal): New. - (__ev_get_sfix32_fs): Define to use function. - (__ev_get_ufix32_fs_internal): New. - (__ev_get_ufix32_fs): Define to use function. - (__ev_get_upper_ufix32_fs): Call __ev_get_ufix32_fs. - (__ev_get_lower_ufix32_fs): Same. - (__ev_get_upper_sfix32_fs): Call __ev_get_sfix32_fs. - (__ev_get_lower_sfix32_fs): Same. - (__ev_set_sfix32_fs_internal): New. - (__ev_set_ufix32_fs_internal): New. - (__ev_set_sfix32_fs): Call __ev_set_sfix32_fs_internal. - (__ev_set_ufix32_fs): Call __ev_set_ufix32_fs_internal. - (__ev_set_upper_sfix32_fs): Call function. - (__ev_set_lower_sfix32_fs): Same. - (__ev_set_upper_ufix32_fs): Same. - (__ev_set_lower_ufix32_fs): Same. - -2002-11-25 Douglas B Rupp - - * gcc.c (do_spec_1): Reset delete_this_arg to zero. - -2002-11-25 Jason Thorpe - - * config/elfos.h (HANDLE_SYSV_PRAGMA): Define as 1. - * config/interix.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/linux-aout.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/lynx-ng.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/lynx.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/netbsd.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/openbsd.h (HANDLE_SYSV_PRAGMA: Likewise. - * config/alpha/elf.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/arm/netbsd.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/cris/aout.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/d30v/d30v.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/frv/frv.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/i386/djgpp.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/i386/i386-interix.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/i386/vxi386.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/ia64/ia64.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/m88k/m88k.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/mmix/mmix.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/rs6000/darwin.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/sparc/linux-aout.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/sparc/vxsparc64.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/stormy16/stormy16.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/alpha/osf.h (HANDLE_SYSV_PRAGMA): Don't undef before - defining. - * config/i386/sco5.h (HANDLE_SYSV_PRAGMA): Likewise. - * config/mips/iris5.h (HANDLE_SYSV_PRAGMA): Likewise. - -2002-11-25 Dave Pitts - - * gcc/fixinc/mkfixinc.sh: add i370-*-openedition to bypass fixinc list - -2002-11-25 Kazu Hirata - - * config/h8300/h8300.md (an anonymous pattern): New. - -2002-11-25 Richard Henderson - - * alias.c (find_base_value): Use new_reg_base_value if it's live. - (copying_arguments): Make boolean. - -2002-11-25 Jason Thorpe - - * gcc.c (static_spec_functions): Add if-exists-else spec - function. - (if_exists_else_spec_function): New function. - * doc/invoke.texi: Document the if-exists-else spec function. - - * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): For -static, use - "%:if-exists-else(crtbeginT%O%s crtbegin%O%s)". - -2002-11-25 Jason Thorpe - - * config.gcc (powerpc-*-netbsd*): Replace "svr4.h" with - "netbsd.h netbsd-elf.h" in tm_file. Set tmake_file to - "${tmake_file} rs6000/t-netbsd". - * config/rs6000/netbsd.h: Rewrite. - * config/rs6000/t-netbsd: New file. - -2002-11-25 Kazu Hirata - - * config/h8300/h8300.md (an anonymous pattern): Relax the - condition for the pattern. - -2002-11-25 Aldy Hernandez - - * config/rs6000/rs6000.h (enum rs6000_builtins): Remove evmwlssf, - evmwlsmf, evmwlssfa, evmwlsmfa, evmwlssfaaw, evmwlsmfaaw, - evmwlssfanw, evmwlsmfanw. - - * config/rs6000/rs6000.c (bdesc_2arg): Same. - - * config/rs6000/spe.md: Same for patterns. - -2002-11-25 Christian Ehrhardt - - PR c/8639 - * fold-const.c (extract_muldiv): Don't propagate division unless - both arguments are multiples of C. - -2002-11-25 Andrew Haley - - * libgcc-std.ver (_Unwind_Find_Enclosing_Function): Add. - * config/ia64/unwind-ia64.c (_Unwind_Find_Enclosing_Function): New. - * unwind-sjlj.c (_Unwind_Find_Enclosing_Function): Likewise. - * unwind-dw2.c (_Unwind_Find_Enclosing_Function): Likewise. - -Sun Nov 24 10:38:04 CET 2002 Jan Hubicka - - * i386.c (x86_use_ffreep): New global variable. - * i386.h (x86_use_frfeep): Declare - (TARGET_USE_FFREEP): New macro - * i386.md (movs?f*): Use freep when asked for. - (push?f): Remove dead code. - -2002-11-24 Kazu Hirata - - * config/h8300/h8300.c (h8300_init_once): Fix a typo in the - target help message. - -2002-11-24 Jason Thorpe - - * config.gcc (*-*-netbsd*1.[7-9]*, *-*-netbsd*[2-9]*): Set - extra_parts to "crtbegin.o crtend.o crtbeginS.o crtendS.o - crtbeginT.o". - (arm*-*-netbsd*, i[34567]86-*-netbsd*, m68k*-*-netbsd*) - (ns32k-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Set extra_parts - to "" for a.out configurations. - * config/t-netbsd (CRTSTUFF_T_CFLAGS): Set to "-fPIC". - -2002-11-24 Jason Thorpe - - * config/alpha/netbsd.h (CPP_SUBTARGET_SPEC): Just use - NETBSD_CPP_SPEC directly. - (SUBTARGET_EXTRA_SPECS): Remove netbsd_cpp_spec. Add - netbsd_endfile_spec. - (ENDFILE_SPEC): Use %(netbsd_endfile_spec). - -2002-11-24 Jason Thorpe - - * config/netbsd-elf.h (STARTFILE_SPEC): Rename to - NETBSD_STARTFILE_SPEC. - (STARTFILE_SPEC): Redefine in terms of NETBSD_STARTFILE_SPEC. - (ENDFILE_SPEC): Likewise. - * config/netbsd.h (LIB_SPEC, LIBGCC_SPEC): Likewise. - -2002-11-24 Andreas Schwab - - * Makefile.in (install-driver): Remove versioned link before - trying to create it. - - * config/m68k/m68k.c: Fix typo in last change defining - TARGET_ASM_CAN_OUTPUT_MI_THUNK. - -2002-11-23 H.J. Lu - - * aclocal.m4: Include ../config/accross.m4. - (gcc_AC_COMPILE_CHECK_SIZEOF): Removed. - (gcc_AC_C_COMPILE_ENDIAN): Removed. - (gcc_AC_C_FLOAT_FORMAT): Check $ac_cv_c_bigendian - instead of $ac_cv_c_compile_endian. - - * configure.in: Replace gcc_AC_COMPILE_CHECK_SIZEOF with - AC_COMPILE_CHECK_SIZEOF. - Replace gcc_AC_C_COMPILE_ENDIAN with AC_C_BIGENDIAN_CROSS. - * configure: Rebuild. - -2002-11-23 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Update the use of - h8300_tiny_constant_address_p. - (h8300_adjust_insn_length): Likewise. - (h8300_tiny_constant_address_p): Check if the given rtx is a - variable declared with __attribute__ ((tiny_data)). - -2002-11-22 Dale Johannesen - - * toplev.c (rest_of_compilation): Fix comments. - -2002-11-22 Geoffrey Keating - - * aclocal.m4 (ac_cv_func_mmap_dev_zero): Darwin does not - allow mmap from /dev/zero. Don't make decisions for the host - based on presence or absence of /dev/zero on the build machine. - (ac_cv_func_mmap_anon): Darwin does have working MMAP_ANON. - (AC_FUNC_MMAP_FILE): Darwin does have mmap of a file. - * configure: Regenerate. - -2002-11-22 Daniel Jacobowitz - - * gcc.c (make_relative_prefix, split_directories) - (free_split_directories): Removed. - -2002-11-22 Daniel Jacobowitz - - * configure.in: Set insn=nop for DWARF-2 tests on ARM. - * configure: Regenerated. - -2002-11-22 Kazu Hirata - - * config/h8300/h8300.c (compute_a_shift_length): Fix the insn - length computation when xor.l is output. - -2002-11-21 Douglas B Rupp - - * alpha.md (movstrdi, clrstrdi): New VMS patterns. - (call_vms_1, call_value_vms_1): Cleanup syntax. - -Thu Nov 21 19:20:27 CET 2002 Jan Hubicka - - * athlon.md (define_atuomaton): Add athlon_load. - (athlon-double): New reservation. - (athlon-ieu0): New CPU unit. - (athlon-load?): Use athlon_load automaton. - (*_k8 reservations): New. - (other insn revervations): Activate for K8. - -Thu Nov 21 15:07:42 CET 2002 Jan Hubicka - - * cfgrtl.c (verify_flow_info): Accept EDGE_CAN_FALLTHRU flag. - -2002-11-21 Jim Wilson - - * config/rs6000/rs6000.c (function_arg): Set inner mode of SPE - vectors to SI. - -2002-11-21 Bob Wilson - - * config/xtensa/xtensa-protos.h (xtensa_copy_incoming_a7): Declare. - * config/xtensa/xtensa.c (struct machine_function): Add - incoming_a7_copied flag. - (xtensa_copy_incoming_a7): Define. - (xtensa_emit_move_sequence): Use xtensa_copy_incoming_a7. - * config/xtensa/xtensa.md (movdi, movsf, movdf): Ditto. - -Thu Nov 21 23:52:04 CET 2002 Jan Hubicka - - * i386-protos.h (x86_64_sign_extended_value): Fix prototype. - * i386.c (x86_64_general_operand, x86_64_szext_general_operand, - x86_64_nonmemory_operand, x86_64_movabs_operand, - x86_64_szext_nonmemory_operand, x86_64_immediate_operand, - ix86_expand_int_movcc): Update call of x86_64_sign_extended_value. - (local_symbolic_operand): Do not care the 64bit limits. - (x86_64_sign_extended_value): Remove allow_rip support. - (legitimate_pic_address_disp_p): Handle all cases allowed - with RIP addressing. - (legitimate_address_p): Use legitimate_pic_address_disp_p for PIC. - (legitimize_pic_address): Reorganize. - * i386.h (EXTRA_CONSTRAINT): Update call of x86_64_sign_extended_value. - -2002-11-21 Jason Thorpe - - * config.gcc (arm*-*-netbsdelf*): Enable configuration. - * config/arm/netbsd-elf.h: New file. - -2002-11-21 Jason Thorpe - - * config/arm/elf.h (SUBTARGET_EXTRA_SPECS): Add - subtarget_asm_float_spec. - (SUBTARGET_ASM_FLOAT_SPEC): Define, moving the - defaults from... - (ASM_SPEC): ...here. Use subtarget_asm_float_spec. - -2002-11-21 Nick Clifton - - * config/fr30/fr30.md (movsf_constant_store): Move code to - detect 0.0 into fr30.c. - * config/fr30/fr30-protos.h (fr30_const_double_is_zero): - Prototype. - * config/fr30/fr30.c (fr30_const_double_is_zero): New - function. Return true if the rtx is 0.0. - -2002-11-21 Jason Thorpe - - * config/arm/elf.h (ASM_SPEC, LINK_SPEC): Pass -EL - if -mlittle-endian is specified. - -2002-11-21 Richard Earnshaw - - PR optimization/2903 - * arm.md (anddi_notzesidi_di): Operand 2 is inverted not operand 1. - (anddi_notsesidi_di): Likewise. - -2002-11-21 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Use - h8300_eightbit_constant_address_p and - h8300_tiny_constant_address_p. - (h8300_adjust_insn_length): Likewise. - * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Remove. - (TINY_CONSTANT_ADDRESS_P): Likewise. - (OK_FOR_U): Use eightbit_constant_address_p. - -2002-11-21 Ulrich Weigand - - * config/s390/libgcc-libc.ver: Add multilib support. - * config/s390/linux.h (MULTILIB_DEFAULT): Define. - * config/s390/t-linux64 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES, - MULTILIB_OSDIRNAMES, LIBGCC, INSTALL_LIBGCC, - EXTRA_MULTILIB_PARTS): Define. - -2002-11-21 Richard Earnshaw - - * arm.c (arm_get_frame_size): A leaf function does not need its - stack padding to an aligned boundary if it has no frame. - (thumb_get_frame_size): Likewise. - -Wed Nov 20 22:25:53 CET 2002 Jan Hubicka - - * x86-64.h (MCOUNT_NAME): Fix typo in my previous patch. - (override_options): Likewise. - -Wed Nov 20 19:07:17 CET 2002 Jan Hubicka - - * config.gcc: Add k8 target alias support - * i386.c (_cost): Declare costs for various variants of divides and - multiplies. - (k8_cost): New. - (m_K8, m_ATHLON_K8): New macros. - (x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen, - x86_cmove, x86_3dnow_a, x86_deep_branch, x86_use_fiop, - x86_promote_QImode, x86_sub_esp_?, x86_add_esp_?, - x86_integer_DFmode_moves, x86_partial_reg_dependency, - x86_memory_mismatch_stall, x86_accumulate_outgoing_args, - x86_prologue_using_move, x86_epilogue_using_move, - x86_arch_always_fancy_math_387, x86_sse_partial_regs, - x86_sse_typeless_stores): Set for K8 - (override_options): Add k8 support; fix athlon alignment; - complain about non-x86-64 capable CPU being used in x86-64 compilation. - (ix86_issue_rate): Set for K8. - (ix86_adjust_cost, ia32_use_dfa_pipeline_interface, - x86_machine_dependent_reorg): Handle K8 like - * i386.h - (x86_costs): Change mult_init and divide into array. - (TARGET_K8, TARGET_ATHLON): New macros. - (MODE_INDEX): New macro. - (RTX_COST): Use new costs. - (TARGET_CPU_CPP_BUILTINS): Define __k8__ and __tune_k8__. - (TARGET_CPU_DEFAULT_NAMES): Add k8 - (TARGET_CPU_DEFAULT_k8): New constant - (enum processor_type): Add PROCESSOR_K8. - * i386.md (cpu attribute): Add k8. - - * invoke.texi: Document -march=k8. - - * i386.md (type attribute): Add leave - (mode attribute): Remove unknownfp. - (length_immediate, modrm, memory attributes): Handle leave correctly. - (fp comparison patterns): Determine FP mode. - (leave, leave_rex64): Remove special cases. - * ppro.md (ppro_uops, ppro_p2): Add leave - * pentiun.md (pent_pop): Handle leave too. - * k6.md (k6_load): Handle leave. - * athlon.md (athlon_leave, athlon_pop): Fix. - (athlon_decode): Handle leave. - -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 Steven Bosscher - - * config/mips/vr.h (DRIVER_SELF_SPECS): Change %{ - - * profile.c (index_counts_file): Fix obvious mistake. - -2002-11-19 Zdenek Dvorak - - * Makefile.in (profile.o): Add hashtab.h dependency. - * gcov-io.h (GCOV_SUMMARY_LENGTH): New. - * profile.c: Include hashtab.h. - (htab_counts_index_hash, htab_counts_index_eq, htab_counts_index_del, - cleanup_counts_index, index_counts_file, struct section_reference, - struct da_index_entry, counts_file_name, counts_file_index): New. - (get_exec_counts, init_branch_prob): Modified. - -2002-11-19 Kaz Kojima - - * config.gcc (sh*-*-linux*): Add t-slibgcc-elf-ver and t-linux - to tmake_file. Remove setting gas and gnu_ld here. - * config/sh/libgcc-glibc.ver: New file. - * config/sh/t-linux (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. - (SHLIB_MAPFILES): New. - * config/sh/linux.h (MD_EXEC_PREFIX): Undefine. - (MD_STARTFILE_PREFIX): Likewise. - (HANDLE_PRAGMA_PACK_PACK_PUSH_POP): Define. - (DWARF2_UNWIND_INFO): Redefine. - (ASM_PREFERRED_EH_DATA_FORMAT): Define. - (LINK_EH_SPEC): Redefine. - (MD_FALLBACK_FRAME_STATE_FOR): Define except for SH-media. - (SH_FALLBACK_FRAME_FLOAT_STATE): Define. - (SH_DWARF_FRAME_GP0, SH_DWARF_FRAME_FP0, SH_DWARF_FRAME_XD0, - SH_DWARF_FRAME_BT0, SH_DWARF_FRAME_PR, SH_DWARF_FRAME_PR_MEDIA, - SH_DWARF_FRAME_GBR, SH_DWARF_FRAME_MACH, SH_DWARF_FRAME_MACL, - SH_DWARF_FRAME_PC, SH_DWARF_FRAME_SR, SH_DWARF_FRAME_FPUL, - SH_DWARF_FRAME_FPSCR): Likewise. - * config/sh/sh-protos.h (sh_set_return_address): Declare. - * config/sh/sh.c (calc_live_regs): Count EH_RETURN_DATA_REGNO - registers if the current function calls EH return. - (sh_expand_epilogue): Handle EH stack adjustments. - (sh_set_return_address): New function. - * config/sh/sh.h (SH_DBX_REGISTER_NUMBER): Handle PR_MEDIA_REG. - Don't abort even if the number is mapped to -1. - (EH_RETURN_DATA_REGNO): Define. - (EH_RETURN_STACKADJ_RTX): Define. - * config/sh/sh.md (UNSPEC_EH_RETURN): New. - (eh_return): New pattern. - (eh_set_ra_di, eh_set_ra_si): Likewise. - Add splitter to perform EH return after reload. - -Tue Nov 19 12:52:07 2002 J"orn Rennecke - - * stor-layout.c (excess_unit_span): New function. - (place_field): Use it. - -2002-11-19 Andreas Schwab - - * unwind.h (_Unwind_GetTextRelBase): Revert last change, this is - not valid in C++. - -2002-11-19 Nathanael Nerode - - * configure.in, Makefile.in: Correct BUILD/HOST confusion. - * configure: Regenerate. - -Tue Nov 19 00:11:44 CET 2002 Jan Hubicka - - * convert.c (strip_float_extensions): New function. - (convert_to_real): Optimize some cases. - -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. - -Tue Nov 19 23:50:56 CET 2002 Jan Hubicka - - * i386.md (length_immediate): Do not refer to insn address. - (jcc*, jmp patterns): Compute length explicitly. - -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. - -Mon Nov 18 21:29:03 CET 2002 Jan Hubicka - - * i386.md (addqi_1_slp): Fix output template. - (subqi_1_slp): Fix type. - -Sun Nov 17 00:01:28 CET 2002 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. - -Sun Nov 17 14:01:09 CET 2002 Jan Hubicka - - * i386.md (negsf2_ifs, negdf2_ifs, negdf2_ifs_rex64, abssf2_ifs, - absdf2_ifs, absdf2_ifs_rex64): Fix constraints. - (neg?f2_ifs, abs?f2_ifs splitters): Refuse memory operand; do not - generate unnecesary subregs. - -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. - -Sat Nov 16 16:49:58 CET 2002 Jan Hubicka - - * i386.md (truncdfsf2_1_sse, truncdfsf2_1_sse_nooverlap, truncdfsf2_2, - floats?dff2_i387): - Work around regclass stupidity. - (truncdfsf_2_1_sse splitter): Accept !TARGET_PARTIAL_SSE_REGS - -Sat Nov 16 02:17:48 CET 2002 Jan Hubicka - - * i386.md (fop_df_6): New pattern. - (fop_xf_4, fop_xf_5): Handle both SF and DFmode extensions. - (fop_xf_6): Rewrite - (fop_xf_7): Delete. - (fop_tf_4, fop_tf_5): Handle both SF and DFmode extensions. - (fop_tf_6): Rewrite - (fop_tf_7): Delete. - -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. - -Sat Nov 16 02:06:02 CET 2002 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. - -Fri Nov 15 14:54:19 CET 2002 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 Devang Patel - * gcc.c (display_help): Two new options -Xpreprocessor and -Xassembler. - (process_command): Same. - * doc/invoke.texi: Info about these two new options. - -2002-11-12 Kazu Hirata - - * config/h8300/h8300.md (*andorsi3): New. - -2002-11-12 Franz Sirl - - * doc/install.texi (powerpc-*-linux-gnu*): Update binutils requirement. - -2002-11-12 Kazu Hirata - - * config/h8300/h8300.c (tiny_constant_address_p): Parenthesize - expressions appropriately. - -2002-11-12 Kazu Hirata - - * gthr-win32.h: Fix formatting. - -2002-11-12 Kazu Hirata - - * config/h8300/h8300.c (single_one_operand): Correctly compute - mask when mode is SImode. - (single_zero_operand): Likewise. - * config/h8300/h8300.md (two new anonymous insns): New. - -2002-11-12 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Use GCJ instead of gcj to refer - to that entire project. - -2002-11-12 Rainer Orth - - * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Restore old - directories. - -2002-11-11 Zack Weinberg - - * params.def (ggc-min-expand, ggc-min-heapsize): New parameters. - * doc/invoke.texi: Document them. - - * ggc-page.c: Include params.h. Remove definitions of - GGC_MIN_EXPAND_FOR_GC, GGC_MIN_LAST_ALLOCATED. Replace - GGC_POISON with ENABLE_GC_CHECKING in ifdefs, delete #define. - (init_gcc): Don't set G.allocated_last_gc here. - (ggc_collect): Use PARAM_VALUE (GGC_MIN_HEAPSIZE) and - PARAM_VALUE (GGC_MIN_EXPAND) to decide whether or not to - perform collection. - * ggc-simple.c: Similarly. - * Makefile.in (ggc-common.o, ggc-simple.o): Add $(PARAMS_H) to - dependencies. - -2002-11-11 Kazu Hirata - - * gthr-dce.h: Fix formatting. - -2002-11-11 Franz Sirl - - PR c/8467 - * stmt.c (tail_recursion_args): Handle DECL_MODE differing from the - mode of DECL_RTL case. - -2002-11-11 Janis Johnson - - * doc/contrib.texi: Merge in the list from the libstdc++ web pages. - -Mon Nov 11 12:06:08 CET 2002 Jan Hubicka - - * i386.c (construct_container): Fix handling of SSE_CLASS. - -2002-11-10 Joel Sherrill - - * config/m68k/t-crtstuff (crti.o): Use this... - ($(T)crti.o): ... instead. - (crtn.o): Use this... - ($(T)crtn.o): ... instead. - -2002-11-10 Eric Botcazou - - PR c/8439 - * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only - if there is something new to be simplified. - -2002-11-10 H.J. Lu - - * calls.c (PUSH_ARGS_REVERSED): Define only if not defined. - * expr.c (PUSH_ARGS_REVERSED): Likewise. - - * config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1. - -2002-11-10 Zack Weinberg - - * config/rs6000/sysv4.h: Define NO_IMPLICIT_EXTERN_C here... - * config/rs6000/linux.h, config/rs6000/linux64.h, - config/rs6000/windiss.h: ... not here. - -2002-11-10 Jason Thorpe - - * config/mips/netbsd.h (TARGET_OS_CPP_BUILTINS): Define - __ABICALLS__ if TARGET_ABICALLS. - -Sun Nov 10 18:49:21 CET 2002 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 Zack Weinberg - - * doc/install.texi: Add *-*-vxworks* specific installation - instructions. - - * config/vxlib.c: Rewrite using generation numbers to identify - valid TSD keys. - -Sat Nov 9 00:10:54 CET 2002 Jan Hubicka - - * i386.c (x86_machine_dependent_reorg): Fix even more side cases. - -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 Roger Sayle - - * real.c (real_sqrt): Update comment with bibliographic reference. - -Fri Nov 8 13:33:58 CET 2002 Jan Hubicka - - * i386.md (sse_loadss, sse2_loadsd): Fix expander. - -Fri Nov 8 13:25:41 CET 2002 Jan Hubicka - - * i386.c (x86_machine_dependent_reorg): Fix handling of empty functions. - -Fri Nov 8 13:01:42 CET 2002 Jan Hubicka - - * builtins.c (expand_builtin_mathfn): Handle floor/ceil/trunc/round/nearbyint - (expand_builtin): Likewise. - * builtins.def: Add - __builtin_floor, __builtin_floorf, __builtin_floorl - __builtin_ceil, __builtin_ceilf, __builtin_ceill - __builtin_round, __builtin_roundf, __builtin_roundl - __builtin_trunc, __builtin_truncf, __builtin_truncl - __builtin_nearbyint, __builtin_nearbyintf, __builtin_nearbyintl. - * genopinit.c (optabs): Initialize the new optabs. - * optab.c (init_optabs): Likewise. - * optabs.h (optab_index): Add OTI_floor, OTI_ceil, OTI_trunc, - OTI_round, OTI_nearbyint. - (floor_optab, ceil_optab, trunc_optab, round_optab, nearbyint_optab): New. - * doc/md.texi: Document new named patterns. - * doc/extend.texi (builtin functions) Document - floor, floorf, floorl, ceil, ceilf, - ceill, round, roundf, roundl, trunc, - truncf, truncl, nearbyint, nearbyintf, nearbyintl. - -Fri Nov 8 11:36:11 CET 2002 Jan Hubicka - - * i386.md (sse_movdfcc, sse_movsfcc): Fix typo in previous patch. - -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. - -Fri Nov 8 11:20:19 CET 2002 Jan Hubicka - - * jump.c (mark_jump_label): Handle subregs of label_refs. - -Thu Nov 7 21:54:22 CET 2002 Jan Hubicka - - * i386.md (sse_movdfcc, sse_movsfcc): Avoid overactive matching. - * i386.c (ix86_expand_fp_movcc): Match the reversed cases. - -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 %. - -Thu Nov 7 15:50:18 2002 J"orn Rennecke - - * sh.h (DWARF_FRAME_RETURN_COLUMN): Use DWARF_FRAME_REGNUM. - -Thu Nov 7 11:18:01 CET 2002 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 Douglas B Rupp - - * config/i386/i386-interix.h (TARGET_SUBTARGET_DEFAULT): Or - MASK_MS_BITFIELD_LAYOUT - (SUBTARGET_OVERRIDE_OPTIONS): Warn about and turn off - MS bitfields for Objective-C. - (PCC_BIT_FIELD_TYPE_TEST, GROUP_BITFIELDS_BY_ALIGN): Remove - defines. - - * config/i386/i386.c (ix86_ms_bitfield_layout): New function. - (TARGET_MS_BITFIELD_LAYOUT_P): Define to above function. - (TARGET_USE_MS_BITFIELD_LAYOUT): Define. - - * config/i386/i386.h (MASK_MS_BITFIELD_LAYOUT: New mask. - TARGET_USE_MS_BITFIELD_LAYOUT): New macro. - (TARGET_SWITCHES): Add above mask. - - * testsuite/gcc.dg/bf-ms-layout.c: New test case. - * testsuite/gcc.dg/bf-no-ms-layout.c: New test case. - * testsuite/gcc.dg/i386-bitfield1.c (dg-options): Add appropriate - flags for interix. - -Wed Nov 6 18:54:47 2002 Alexandre Oliva - - * config/mips/mips.h (ASM_OUTPUT_ADDR_DIFF_ELT): Output - .gpword/.gpdword for ABI_N32 and ABI_64 too, if using the GNU - assembler. - * config/mips/mips.md (tablejump_internal3): Output .cpadd - before jump on ABI_N32 too. - (tablejump_internal4): Ditto on ABI_64. Increase maximum - length to match. - -Wed Nov 6 17:16:48 CET 2002 Jan Hubicka - - * i386.md (negsf splitter): Accept memory operand in second register. - (abssf/absdf splitters): Simplify - (sse_loadss, sse_loadsd): Turn into expander. - -2002-11-06 David Edelsohn - - PR target/8480 - * config/rs6000/rs6000.md (movdi_internal64): Discourage - FPR to FPR moves. - -2002-11-06 Janis Johnson - - * doc/contrib.texi: Merge in the list from the Java web pages. - -2002-11-06 David O'Brien - - * config/sparc/freebsd: Fix typo. - -2002-11-06 John David Anglin - - * pa64-hpux.h (LDD_SUFFIX, PARSE_LDD_OUTPUT): Define. - -2002-11-06 Alexandre Oliva - - * config/mips/mips.md (call_value_multiple_internal2): Use dla for - non-SImode addresses. - -Tue Nov 5 14:34:36 CET 2002 Jan Hubicka - - * i386.md (float_truncate SSE splitter): Ensure that operand is not - stack register. - (float SSE splitters): Reorder conditional. - -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 Zack Weinberg - - * gthr-vxworks.h: Rewritten from scratch. - * config/vxlib.c: New file. - * config/t-vxworks: Add config/vxlib.c to LIB2FUNCS_EXTRA. - * config/rs6000/t-vxworks: Add config/vxlib.c to - LIB2FUNCS_EXTRA here too, because of clash with - config/rs6000/t-ppccomm. - -2002-11-04 Dale Johannesen - - * doloop.c (doloop_modify_runtime): Fix loop count computation - for unrolled loops. - * loop.c (loop_invariant_p): Support calling from unroller. - -2002-11-04 Ulrich Weigand - - * config/s390/s390.c (s390_decompose_address): Use arg_pointer_rtx - for comparison. - -2002-11-04 Aldy Hernandez - - * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. - - * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. - (CLASS_CANNOT_CHANGE_MODE): Remove. - (CANNOT_CHANGE_MODE_CLASS): New. - - * config/alpha/alpha.h: Same. - - * config/ia64/ia64.h: Same. - - * config/mips/mips.h: Same. - - * config/s390/s390.h: Same. - - * config/sh/sh.h: Same. - - * config/pa/pa64-regs.h: Same. - - * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. - - * config/sh/sh.c (sh_cannot_change_mode_class): New. - - * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add - prototype. - - * config/mips/mips.c (mips_cannot_change_mode_class): New. - - * doc/tm.texi (Register Classes): Remove - CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. - Document CANNOT_CHANGE_MODE_CLASS. - - * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. - (push_reload): Same. - - * simplify-rtx.c (simplify_subreg): Same. - - * reload1.c (choose_reload_regs): Same. - - * recog.c (register_operand): Same. - - * regrename.c (mode_change_ok): Change to use new - CANNOT_CHANGE_MODE_CLASS infrastructure. - - * regclass.c (cannot_change_mode_set_regs): New. - Declare subregs_of_mode. - (regclass): Use subregs_of_mode. - Remove references to reg_changes_mode. - (init_reg_sets_1): Remove class_can_change_mode and - reg_changes_mode code. - (invalid_mode_change_p): New. - (dump_regclass): Use invalid_mode_change_p instead of - class_can_change_mode. - (regclass): Same. - (record_operand_costs): Do not set reg_changes_mode. - - * local-alloc.c (struct qty): Remove changes_mode field. - (alloc_qty): Remove changes_mode initialization. - (update_qty_class): Remove set of changes_mode. - (find_free_reg): Use subregs_of_mode. - - * global.c (find_reg): Use subregs_of_mode info. - - * rtl.h (cannot_change_mode_set_regs): New prototype. - (invalid_mode_change_p): Same. - (REG_CANNOT_CHANGE_MODE_P): New macro. - - * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove - REG_CHANGES_MODE. - (life_analysis): Clear subregs_of_mode. - - * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. - Remove use of CLASS_CANNOT_CHANGE_MODE. - (simplify_set): Same. - (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove - REG_CHANGES_MODE. - - * regs.h: Add extern for subregs_of_mode; - Include hard-reg-set and basic-block. - (REG_CHANGES_MODE): Delete. - -2002-11-03 Roger Sayle - - * real.c (real_sqrt): New function to calculate square roots. - * real.h (real_sqrt): Add function prototype. - * builtins.c (fold_builtin): Fold sqrt of constant argument. - * simplify-rtx.c (simplify_unary_operation): Simplify sqrt - of constant argument. - -2002-11-03 John David Anglin - - * jump.c (never_reached_warning): Don't set contains_insn until the - first line note is seen. - -2002-11-03 David Edelsohn - - * config/rs6000/rs6000.md (movti_string): Use string instructions. - -2002-11-03 Roger Sayle - - PR c/7128 - * c-typeck.c (c_expand_asm_operands): Defend against - error_mark_nodes in the output argument to avoid ICE. - -2002-11-03 Eric Botcazou - - PR middle-end/8408 - * genrecog.c (preds): Handle ADDRESSOF. - (validate_pattern): Mark it as an lvalue. - -2002-11-02 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_override_options): Use string - instructions when optimizing for size. - -2002-11-02 Kazu Hirata - - * config/h8300/h8300.h: Fix comment typos. - * config/h8300/h8300.md: Likewise. - * config/h8300/lib1funcs.asm: Likewise. - -2002-11-02 Gerald Pfeifer - - Revert this change: - - *doc/install.texi (Installing GCC: Configuration): Clarify - the only supported ways to configure gcc. - -2002-11-01 Kazu Hirata - - * config/h8300/h8300.md (anonymous and:QI pattern): Use 'n' - instead of 'O' for the constraint for the second operand. - -2002-11-01 Mark Mitchell - - PR c++/8391 - * toplev.c (rest_of_compilation): Do not refuse to output code for - an inline function in a local class. - -2002-11-01 David O'Brien - - * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Define __arch64__. - (TRANSFER_FROM_TRAMPOLINE): Reformat. - Add comment. - -2002-11-01 Kazu Hirata - - * config/h8300/h8300.h (CAN_ELIMINATE): Simplify. - -2002-11-01 Toshiyasu Morita - - * config/h8300/h8300.h (OPTIMIZATION_OPTIONS): New. - -2002-11-01 Steve Ellcey - - * config/ia64/ia64.h (MASK_INLINE_DIV_LAT): Remove. - (MASK_INLINE_DIV_THR): Remove. - (TARGET_INLINE_DIV_LAT): Remove. - (TARGET_INLINE_DIV_THR): Remove. - (TARGET_INLINE_DIV): Remove. - (MASK_INLINE_FLOAT_DIV_LAT): New macro. - (MASK_INLINE_FLOAT_DIV_THR): New macro. - (MASK_INLINE_INT_DIV_LAT): New macro. - (MASK_INLINE_INT_DIV_THR): New macro. - (TARGET_INLINE_FLOAT_DIV_LAT): New macro. - (TARGET_INLINE_FLOAT_DIV_THR): New macro. - (TARGET_INLINE_INT_DIV_LAT): New macro. - (TARGET_INLINE_INT_DIV_THR): New macro. - (TARGET_INLINE_FLOAT_DIV): New macro. - (TARGET_INLINE_INT_DIV): New macro. - * config/ia64/ia64.md (divsi3): Change to use new macros. - (modsi3): Ditto. - (udivsi3): Ditto. - (umodsi3): Ditto. - (divsi3_internal): Ditto. - (divdi3): Ditto. - (moddi3): Ditto. - (udivdi3): Ditto. - (umoddi3): Ditto. - (divdi3_internal_lat): Ditto. - (divdi3_internal_thr): Ditto. - (divsf3): Ditto. - (divsf3_internal_lat): Ditto. - (divsf3_internal_thr): Ditto. - (divdf3): Ditto. - (divdf3_internal_lat): Ditto. - (divdf3_internal_thr): Ditto. - (divtf3): Ditto. - (divtf3_internal_lat): Ditto. - (divtf3_internal_thr): Ditto. - * config/ia64/ia64.c (ia64_override_options): Change - to check new macros for conflicts in settings. - * doc/invoke.texi (-minline-divide-min-latency): Remove. - (-minline-divide-max-throughput): Remove. - (-minline-float-divide-min-latency): New. - (-minline-float-divide-max-throughput): New. - (-minline-int-divide-min-latency): New. - (-minline-int-divide-max-throughput): New. - -2002-11-01 Richard Earnshaw (rearnsha@arm.com) - - PR target/7856 - * arm.c (use_return_insn): Don't use a return insn if there are - saved integer regs, but LR is not one of them. - -Fri Nov 1 10:33:15 CET 2002 Jan Hubicka - - * expr.c (emit_move_insn): Use SCALAR_FLOAT_MODE_P - * machmode.h (SCALAR_FLOAT_MODE_P): New macro. - -Thu Oct 31 18:20:50 CET 2002 Jan Hubicka - - * i386.md (sse_loadss, sse_loadsd): Canonicalize; add expander - (movps, movpd splitters): Use canonical form. - (movv2di): Fix merge problem. - -Thu Oct 31 16:22:31 CET 2002 Jan Hubicka - - * i386.md (negdf2_ifs_rex64): Don't allow GPR operand. - -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. - -Thu Oct 31 18:08:00 CET 2002 Jan Hubicka - - * i386.c (override_options): Set defaults for flag_omit_frame_pointer, - flag_asynchronous_unwind_tables, flag_pcc_struct_return. - * i386.c (optimization_options): Set flag_omit_frame_pointer, - flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2. - Do not clear -momit-leaf-frame-pointer when profiling. - (ix86_frame_pointer_required): Frame pointer is always required when - profiling. - -Thu Oct 31 16:09:44 CET 2002 Jan Hubicka - - * i386.md (negdf2_ifs_rex64): Don't allow GPR operand. - -Thu Oct 31 12:45:55 2002 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 Zack Weinberg - - * gthr.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, - gthr-solaris.h, gthr-win32.h: Remove __gthread_key_dtor. - * unwind-sjlj.c (fc_key_dtor): Delete. - (fc_key_init): Adjust __gthread_key_create call to match. - -2002-10-30 Aldy Hernandez - - * c-common.c: Add GTY to vector_type_node_list. - -2002-10-30 John David Anglin - - * pa-linux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Define. - * pa-protos.h (attr_length_millicode_call, attr_length_call, - pa_init_machine_status): Declare new global functions. - * pa.c (void copy_fp_args, length_fp_args, get_plabel): Declare and - implement new functions. - (attr_length_millicode_call, attr_length_call): Implement. - (total_code_bytes): Change type to long. - (pa_output_function_prologue): Compute total_code_bytes on TARGET_64BIT. - Reset counter if flag_function_sections. - (output_deferred_plabels): Set output alignment to 3 for TARGET_64BIT. - (output_cbranch): Move call to gen_label_rtx. - (output_millicode_call): Rewrite adding long TARGET_64BIT call, expose - delay slot in all variants, shorten pc-relative calls. - (output_call): Rewrite adding long TARGET_64BIT call, improved delay - slot usage and exposure, various new call variants, and shortened - sequences for some variants on TARGET_PA_20. - Miscellaneous format changes. - * pa.h (total_code_bytes): Change type to long. - (MASK_LONG_CALLS, TARGET_LONG_CALLS, TARGET_LONG_ABS_CALL, - TARGET_LONG_PIC_SDIFF_CALL, TARGET_LONG_PIC_PCREL_CALL): Define. - (TARGET_SWITCHES): Add "-mlong-calls" and "-mno-long-calls" options. - (EXTRA_CONSTRAINT, GO_IF_LEGITIMATE_ADDRESS, - LEGITIMIZE_RELOAD_ADDRESS): Don't use long floating point loads and - stores on TARGET_ELF32. - *pa.md (define_delay): Allow insns in delay on TARGET_PORTABLE_RUNTIME. - (unnamed patterns for mulsi3, divsi3, udivsi3, modsi3, umodsi3 and - canonicalize_funcptr_for_compare expanders): Calculate attribute length - attr_length_millicode_call(). - (call_internal_symref, call_value_internal_symref): Clobber register 1. - Calculate attribute length using attr_length_call(). - (call_internal_reg_64bit, call_value_internal_reg_64bit): Move gp load - to delay slot. - (sibcall, sibcall_value): Rewrite. - (sibcall_internal_symref, sibcall_value_internal_symref): Clobber - register 1. Use attr_length_call(). - (sibcall_internal_symref_64bit, sibcall_value_internal_symref_64bit): - New patterns. - (unamed pattern for canonicalize_funcptr_for_compare): Rewrite. - * som.h (MEMBER_TYPE_FORCES_BLK): Define. - * t-pa64 (TARGET_LIBGCC2_CFLAGS): Add "-mlong-calls". - * doc/invoke.texi (mlong-calls): Document. - -2002-10-30 Roger Sayle - - * fold-const.c (fold_binary_op_with_conditional_arg): Improve - handling of cases where one or both branches of the conditional - have void type, i.e. throw an exception or don't return. - (fold): Only apply (and undo) type conversion to the non-void - branches of a COND_EXPR. - -2002-10-30 Mark Mitchell - - PR c++/8333 - * varasm.c (asm_output_aligned_bss): Do not call - ASM_GLOBALIZE_LABEL. - -2002-10-30 David Edelsohn - Torbjorn Granlund - - * config/rs6000/rs6000.md (load_toc_v4_PIC_1): Use preferred form - for addressibility. - (load_toc_v4_PIC_1b): Same. - -2002-10-30 Kazu Hirata - - * config/h8300/h8300.c (h8300_eightbit_constant_address_p): - Truncate the addresses for H8/300 using HImode. - -Tue Oct 29 23:28:10 CET 2002 Jan Hubicka - - * i386.md (negdf splitter): Fix construction of the constant. - -Tue Oct 29 20:47:06 CET 2002 Jan Hubicka - - * i386.md (negsf, negdf): Reorganize to use vector modes - for SSE variants. - (abssf, absdf): Use force_reg. - (movv4sf, movv2df): New splitters. - * i386.h (PREDICATE_CODES): add zero_extended_scalar_load_operand - * i386.c (zero_extended_scalar_load_operand - - * i386-protos.h (ix86_expand_call): Update prototype. - * i386.c (ix86_function_ok_for_sibcall): Handle 64bit - (ix86_expand_call): Use r11 for indirect sibcalls. - * i386.md (call, call_value, untyped_call, call_value_pop): - update x86_expand_call call. - (sibcall, sibcall_value): new patterns - (call_rex64, call_value_rex64): Do not accept sibcalls. - (sibcall_rex64, sibcall_value_rex64, - sibcall_rex64_v, sibcall_value_rex64_v): New. - -Tue Oct 29 15:37:39 CET 2002 Jan Hubicka - - * toplev.c (rest_of_compilation): Reorganize way reg_scan is called - before final pass. - -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. - -Tue Oct 29 19:32:16 CET 2002 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 nonzero - 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. - -Tue Oct 29 15:37:39 CET 2002 Jan Hubicka - - * toplev.c (rest_of_compilation): Reorganize way reg_scan is called - before final pass. - -2002-10-29 Eric Botcazou - - PR optimization/8334 - * expr.c (expand_expr) [PLUS]: Don't use simplify_binary_operation; - check for zero operands explicitly. - -2002-10-29 Richard Sandiford - - * config/mips/mips.md (extv, extzv, insv): Set size of referenced - memory after adjusting to BLKmode. - -2002-10-29 Kazu Hirata - - * config/h8300/h8300.h (MASK_*): New. - (TARGET_*): Use MASK_*. - -2002-10-28 Zack Weinberg - - * config.gcc (*-*-vxworks, powerpc-wrs-vxworks*): New stanzas. - * config/t-vxworks, config/vxworks.h, config/rs6000/t-vxworks, - config/rs6000/vxworks.h: New files. - * config/rs6000/sysv4.h: Rip out -mvxworks and all related code. - - * config.gcc (alpha*-*-vxworks*, arm-*-vxworks*, - i?86-wrs-vxworks*, i960-wrs-vxworks* [all], - m68k-wrs-vxworks*, mips-wrs-vxworks, powerpc-wrs-vxworks*, - powerpcle-wrs-vxworks*, sparc*-wrs-vxworks* [all], - sparc-*-vxsim*): Delete stanzas. - * gthr-vxworks.h: Rip out all substantive code and just - include gthr-single.h. - - * config/alpha/vxworks.h, config/arm/vxarm.h, - config/i386/vxi386.h, config/i960/t-vxworks960, - config/i960/vx960-coff.h, config/i960/vx960.h, - config/m68k/t-vxworks68, config/m68k/vxm68k.h, - config/mips/vxworks.h, config/rs6000/vxppc.h, - config/sparc/t-vxsparc, config/sparc/t-vxsparc64, - config/sparc/vxsim.h, config/sparc/vxsparc.h, - config/sparc/vxsparc64.h: Delete files. - -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. - -Sun Oct 27 10:15:24 CET 2002 Jan Hubicka - - * linux64.h (DEFAULT_PCC_STRUCT_RETURN): Define. - -2002-10-27 Zdenek Dvorak - - * Makefile.in (dwarf2out.o): Add dependendcy on hashtab.h. - * dwarf2out.c: Include hashtab.h. - (is_main_source): New static variable. - (attr_checksum, die_checksum): Modified to handle die references. - (same_loc_p, same_dw_val_p, same_attr_p, same_die_p, same_die_p_wrap, - unmark_all_dies, htab_cu_hash, htab_cu_eq, htab_cu_del, check_duplicate_cu, - record_comdat_symbol_number): New static functions. - (output_comp_unit, compute_section_prefix, is_type_die, break_out_includes, - mark_dies, unmark_dies, dwarf2out_start_source_file): Modified. - * toplev.c (rest_of_decl_compilation): Call of dwarf2out_decl for type - declarations added. - -2002-10-26 Kazu Hirata - - * config/h8300/h8300.c (initial_offset): Change to - h8300_initial_elimination_offset. - * config/h8300/h8300.h (INITIAL_ELIMINATION_OFFSET): Use - h8300_initial_elimination_offset. - * config/h8300/h8300-protos.h: Update the prototype. - -2002-10-26 Hans-Peter Nilsson - - * config/mmix/mmix.h (LIBCALL_VALUE): Use - MMIX_RETURN_VALUE_REGNUM, not MMIX_OUTGOING_RETURN_VALUE_REGNUM. - (FUNCTION_VALUE_REGNO_P): Similar, but move code to... - * config/mmix/mmix.c (mmix_function_value_regno_p): New. - * config/mmix/mmix-protos.h: Remove needless ifdefs on TREE_CODE - and RTX_CODE. - (mmix_function_value_regno_p): Declare. - - * config/mmix/mmix.md ("fixuns_truncdfdi2"): Replace unsigned_fix, - invalid for floating point mode result, with fix. - -Fri Oct 25 00:04:21 2002 Alexandre Oliva - - * Makefile.in (GCC_FOR_TARGET): Add -L$(objdir)/../ld. - (STAGE2_FLAGS_TO_PASS): Pass GCC_FOR_TARGET. - (stage1_build): Likewise. - -2002-10-25 Mike Stump - - Fixes gcc.dg/warn-1.c. - * c-typeck.c (warn_for_assignment): Don't print argument number, - if zero. - -Sat Oct 26 01:44:46 CEST 2002 Jan Hubicka - - * toplev.c (dump_file_index): Add DFI_ce3. - (dump_file_info): Likewise. - (rest_of_compilation): Run first ifcvt pass before tracer. - -2002-10-25 Steve Ellcey - - * config/ia64/hpux.h (BITS_BIG_ENDIAN): Remove. - -2002-10-25 Richard Henderson - - * real.c (real_to_decimal): If the >1 tens reduction loop results - in a negative exponent, fall into the <1 pten computation. - -2002-10-25 Zack Weinberg - - PR middle-end/6994 - * c-objc-common.c (inline_forbidden_p): Can not inline - functions containing structures or unions containing VLAs. - * tree-inline.c (walk_tree): For all class 't' nodes, walk - TYPE_SIZE and TYPE_SIZE_UNIT. - (copy_tree_r): Copy types if they are variably modified. - -2002-10-25 Ulrich Weigand - - * config/s390/s390.md: Remove old-style peepholes. - -2002-10-25 Ulrich Weigand - - * config/s390/s390.c (s390_decompose_address): Do not range check the - displacement if base or index is the argument pointer register. - -2002-10-24 Hans-Peter Nilsson - - PR other/3337 - PR bootstrap/6763 - PR bootstrap/8122 - * fixinc/inclhack.def (libc1_G_va_list): New fix. - * fixinc/fixincl.x: Regenerate. - * config/i386/linux.h: Move MD_FALLBACK_FRAME_STATE_FOR inside - ifndef IN_LIBGCC2. Wrap it together with signal.h and - sys/ucontext.h inclusion in ifndef USE_GNULIBC_1. - * configure.in (gcc_AC_CHECK_DECLS): Check vasprintf too. - * config.in, configure: Regenerate. - -2002-10-24 Igor Shevlyakov - - * varasm.c (struct rtx_const): Array size 16 for V16QImode. - -2002-10-24 Richard Henderson - - * config/i386/i386.c (x86_output_mi_thunk): Fix x86_64 pic jump. - -2002-10-24 Kazu Hirata - - * config/h8300/h8300.c (initial_offset): Simplify by using - round_frame_size. - -2002-10-24 Marek Michalkiewicz - - * doc/install.texi (avr): Update required binutils version. - -2002-10-24 Theodore A. Roth - - * doc/install.texi: Point avr users at more up-to-date information. - -2002-10-24 Ulrich Weigand - - * config/s390/s390.md (movdi, movsi, movhi, movqi): Add peepholes2 - to pull operands out of the literal pool where possible. - -2002-10-24 Denis Chertykov - - * config/avr/avr.c (init_cumulative_args): Test fntype for zero. - -2002-10-24 Steve Ellcey - - * expr.c (convert_move): If unsignedp is less then zero there - is no equivalent code. - -2002-10-24 Zack Weinberg - - * tree.def: Delete mention of nonexistent ARRAY_TYPE fields. - -2002-10-24 Ulrich Weigand - - * config/s390/s390.h: Rework comments; re-sort target macro definitions - according to the sequence they are defined in the manual. - (POINTER_BOUNDARY): Remove. - -2002-10-24 Kazu Hirata - - * config/h8300/h8300.c (round_frame_size): Replace 8 with - BITS_PER_UNIT. - -2002-10-24 Kazu Hirata - - * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Make it - 64-bit safe. - (TINY_CONSTANT_ADDRESS_P): Likewise. - -2002-10-24 Richard Henderson - - * config/ia64/ia64.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): True. - (ia64_output_mi_thunk): Rewrite to use rtl, and to handle the - vcall offset. - -2002-10-24 Richard Henderson - - PR opt/7944 - * reload.c (find_reloads_toplev): Mode of X is not important - when simplifying subregs of constants. - -2002-10-24 Richard Sandiford - - * config.gcc (mips64vr-*-elf*, mips64vrel-*-elf*): Add - MIPS_MARCH_CONTROLS_SOFT_FLOAT=1 to $tm_defines. - * config/mips/mips.c (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Default to 0. - (override_options): Base default setting of MASK_SOFT_FLOAT on -march - if MIPS_MARCH_CONTROLS_SOFT_FLOAT. - -2002-10-24 Richard Sandiford - - * optabs.c (expand_binop): Don't reuse the shift target in the - middle of shift sequences. - -Wed Oct 23 22:48:44 CEST 2002 Jan Hubicka - - * i386.md (abs splitters): Do not produce nested subregs. - -Wed Oct 23 12:42:32 CEST 2002 Jan Hubicka - - * i386.md (movti_rex64): Fix constraints. - -Wed Oct 23 12:01:21 CEST 2002 Jan Hubicka - - * i386.md (abssf,absdf): Use vector operands for SSE - (abssf2_ifs, absdf2_ifs, absdf2_ifs_rex64 and splitters): Update for - vector operand. - -2002-10-23 Ziemowit Laski - - * objc/objc-act.c (get_static_reference): Remove unneeded - TYPE_BINFO initialization. - (get_object-reference): Likewise. - (build_constructor): Tighten precondition check. - (finish_message_expr): Likewise. - -2002-10-23 Jakub Jelinek - - * config/i386/i386.c (local_symbolic_operand): Move LABEL_REF test - after CONST test. - -2002-10-23 Steve Ellcey - - * config/ia64/ia64.c (hfa_element_mode): Don't allow 128 bit floats - in HFAs. - -2002-10-23 Richard Henderson - - * config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): True. - (alpha_output_mi_thunk_osf): Handle vcall_offset. - -2002-10-23 Zack Weinberg - - * langhooks.h (struct lang_hooks_for_tree_inlining): Add - var_mod_type_p. - * langhooks-def.h: Default for tree_inlining.var_mod_type_p is - hook_tree_bool_false. - - * tree.c (variably_modified_type_p): Moved here from - cp/tree.c. Use lang_hooks.tree_inlining.var_mod_type_p for - language-specific cases. Due to this, must weaken some 'if - and only if' checks to merely 'if'. - * tree.h: Prototype variably_modified_type_p. - - * tree-inline.c (walk_tree): #undef WALK_SUBTREE_TAIL at end. - -2002-10-23 Ulrich Weigand - - * config/s390/linux.h (CC1_SPEC, CC1PLUS_SPEC): Remove. - * config/s390/s390.c (optimization_options): Disable -fcaller-saves. - - * config/s390/s390-protos.h (fp_operand): Remove. - * config/s390/s390.c (fp_operand): Remove. - * config/s390/s390.md ("movdi"): Replace fp_operand by FP_REG_P. - ("*movdi_lhi", "*movdi_lli", "*movdi_larl"): Likewise. - ("movsi", "*movsi_lhi", "*movsi_lli"): Likewise. - (movdi_31, movdf_31 splitters): Likewise. - - * config/s390/s390.h (IEEE_FLOAT): Remove. - (TARGET_FLOAT_FORMAT): Define in terms of TARGET_IEEE_FLOAT. - (INT_REGNO_P): Rename to ... - (GENERAL_REGNO_P): ... this. - (FLOAT_REGNO_P): Rename to ... - (FP_REGNO_P): ... this. - (ADDR_REGNO_P): New macro. - (GENERAL_REG_P, ADDR_REG_P, FP_REG_P, CC_REG_P): New macros. - (REGNO_OK_FOR_DATA_P, REGNO_OK_FOR_FP_P): Remove. - (DATA_REG_P, FP_REG_P, ADDRESS_REG_P): Likewise. - (HARD_REGNO_NREGS): Adapt to macro renaming. - (HARD_REGNO_MODE_OK): Likewise. - -2002-10-23 David Edelsohn - Geoff Keating - - * config/rs6000/rs6000.c (rs6000_register_move_cost): New function. - (rs6000_memory_move_cost): New function. - * config/rs6000/rs6000-protos.h: Declare them. - * config/rs6000/rs6000.h: Use them. - -2002-10-23 Ulrich Weigand - - * libgcc2.c (__udiv_w_sdiv): Use attribute ((always_inline)) when - inlining it into other libgcc2 routines. - (__udivmoddi4): Likewise. - -2002-10-22 Nathanael Nerode - - * doc/sourcebuild.texi (Test Suites): Improve. - -2002-10-22 Stan Shebs - - * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Add missing - case for Darwin. - -2002-10-22 Jim Wilson - - * config/i386/i386.md (subdi3_1): Add call to ix86_binary_operator_ok. - -Wed Oct 23 01:52:36 CEST 2002 Jan Hubicka - - PR other/8289 - * xmmintrin.h: Add const to the argument of loads. - - * i386.md (pushv2di): New pattern. - PR target/6890 - * xmmintrin.h (_MM_TRANSPOSE4_PS): New. - -2002-10-22 Richard Henderson - - * target.h (gcc_target.asm_out): Merge output_mi_thunk and - output_mi_vcall_thunk into a single hook. Add can_output_mi_thunk. - * target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Don't conditionalize. - (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove. - (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. - (TARGET_ASM_OUT): Update. - * hooks.c (hook_bool_tree_hwi_hwi_tree_false): New. - (hook_bool_tree_hwi_hwi_tree_true): New. - (default_can_output_mi_thunk_no_vcall): New. - * hooks.h: Declare them. - * system.h (ASM_OUTPUT_MI_THUNK): Poison. - - * config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. - (alpha_output_mi_thunk_osf): Add VCALL_OFFSET parameter. - * config/arm/arm.c, config/cris/cris.c, config/frv/frv.c, - config/i960/i960.c, config/ia64/ia64.c, config/m68k/m68k.c, - config/mmix/mmix.c, config/pa/pa.c, config/sparc/sparc.c, - config/stormy16/stormy16.c: Similarly. - - * config/i386/i386.c (x86_output_mi_thunk): Merge vcall_offset code. - Handle 64-bit properly. Streamline. - (x86_output_mi_vcall_thunk): Remove. - (x86_this_parameter): Rename from ia32_this_parameter; handle 64-bit. - (x86_can_output_mi_thunk): New. - (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove. - (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. - (override_options): Don't zap targetm.asm_out.output_mi_vcall_thunk. - - * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Rename from - output_mi_thunk; make static; always use function_section. - (TARGET_ASM_OUTPUT_MI_THUNK): New. - (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. - (rs6000_ra_ever_killed): Test no_new_pseudos not - targetm.asm_out.output_mi_thunk in conjunction with thunks. - * config/rs6000/rs6000-protos.h: Update. - * config/rs6000/sysv4.h (TARGET_ASM_OUTPUT_MI_THUNK): Remove. - * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't call - xcoffout_declare_function when using rs6000_output_mi_thunk. - - * config/s390/s390.c (s390_output_mi_thunk): Rename from - s390_output_mi_vcall_thunk. - (TARGET_ASM_OUTPUT_MI_THUNK): Remove. - (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. - - * config/vax/vax.c (vax_output_mi_thunk): Static; add vcall_offset. - (TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. - * config/vax/vax-protos.h: Update. - * config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove. - -Wed Oct 23 00:33:11 CEST 2002 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. - -Tue Oct 22 23:51:34 CEST 2002 Jan Hubicka - - * i386.md: FIx typo. - (sse2_cvtsi2sd, sse2_pslrdq): Fix template. - (sse2_umulv2siv2di3): Fix predicate. - (sse2_psadbw, ashrv8hi3, ashrv4si3, lshrv8hi3 lshrv4si3, - lshrv2di3, ashlv8hi3, ashlv4si3, ashlv2di3): Likewise. - * xmmintrin.h (_mm_mul_epu16): Rename to... - (_mm_mul_epu32): This one. - (_mm_cvtsi32_si128, _mm_cvtsi128_si32): New. - - (contains_128bit_aligned_vector_p): Undo accidental checkin. - -2002-10-22 Eric Christopher - - * config/sparc/sparc.h: Add #error. - -2002-10-22 Ulrich Weigand - - * config.gcc [s390-*-linux]: Remove s390/t-linux from tmake_file. - [s390x-*-linux*]: Likewise. - * config/s390/t-linux: Remove. - * config/s390/s390.h: Include fixdfdi.h when building libgcc2. - -Tue Oct 22 19:07:03 CEST 2002 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 - - * config/i386/i386.c (ix86_function_ok_for_sibcall): Look at - the function type, not the return type. - -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. - -Tue Oct 22 00:04:20 CEST 2002 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 Zack Weinberg - - * config/i386/i386.c (ix86_function_ok_for_sibcall): Fix an - inverted test in the conditional determining the possibility - of sibcalls in PIC mode. - -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. - -Sat Oct 19 22:02:28 2002 Alexandre Oliva - Angela Marie Thomas - Brendan Kehoe - Nick Clifton - Andrew Haley - - * configure.in (--with-sysroot): New. Don't inhibit libc if - given. AC_SUBST TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE - and CROSS_SYSTEM_HEADER_DIR. - * configure: Rebuilt. - * Makefile.in (CROSS_SYSTEM_HEADER_DIR): Set in configure. - (TARGET_SYSTEM_ROOT): New. - (DRIVER_DEFINES): Define CROSS_INCLUDE_DIR from - CROSS_SYSTEM_HEADER_DIR. - (install-gcc-tooldir): New target. - (stmp-fixinc): Do not create $(libsubdir), but rather bail out - if SYSTEM_HEADER_DIR does not exist and it's not the default - sys-include directory. - (deduced.h, stmp-fixproto): Quote SYSTEM_HEADER_DIR properly. - (install-mkheaders): Likewise. - * gcc.c (target_system_root): New variable. - (add_sysrooted_prefix): New function. - (process_command): Recompute run-time target_system_root from - gcc_exec_prefix, keeping it unchanged if the relocated sysroot - does not exist. - (do_spec_1): Process 'R' spec. - (main): Add md_exec_prefix to exec_prefixes regardless of - startfile_prefix_spec. Use add_sysrooted_prefix for - startfile_prefixes, and don't skip the default ones when cross - compiling with sysroot enabled. Removed unused case of - non-absolute standard_startfile_prefix. - * config/interix.h: Remove the only potential, yet disabled, - occurrence of non-absolute (empty) standard_startfile_prefix. - * config/sh/linux.h (LIB_SPEC): Add -rpath-link in non-static - linking. - * config/mips/linux.h (LIB_SPEC): Define as in sh/linux.h. - * doc/install.texi (--with-sysroot): Document. - (--with-headers, --with-libs): Deprecate. - -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. - -Sun Oct 20 00:31:31 CEST 2002 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. - -Sat Oct 19 10:46:52 CEST 2002 Jan Hubicka - - * mmintrin.h (__m64): typedef it to v2si. - (_mm_cvtsi32_si64, _mm_cvtsi32_si64_mm_sll_pi16, - _mm_sll_pi32, _mm_sll_pi64, _mm_slli_pi64, _mm_sra_pi16, - _mm_sra_pi32, _mm_srl_pi16, _mm_srl_pi32, _mm_srl_pi64, - _mm_srli_pi64, _mm_and_si64, _mm_andnot_si64, - _mm_or_si64, _mm_xor_si64): Add neccesary casts. - * xmmintrin.h (_mm_setzero_si64): Likewise. - - * i386.h (ALIGN_MODE_128): Update comment; add missing modes - (SSE_REG_MODE_P, MMX_REG_MODE_P): New macros. - - PR target/7693 - Patch by Shawn Wagner - * mmintrin.h: Replace pi64 by si64. - -2002-10-18 David Edelsohn - - * rs6000.md (movdf_hardfloat32): Order alternatives consistently. - Use length of 4 not *. - (movdf_hardfloat64): Same. Support DFmode moves to/from CTR/LR. - (movdf_softfloat64): Likewise. - (movdi_internal32): Use length of 4 not *. - (movti_power): Same. - (ctrsi, ctrdi): Same. - -2002-10-18 Zack Weinberg - - * c-decl.c (start_decl): Point users of the old initialized- - typedef extension at __typeof__. - -2002-10-18 Richard Henderson - - * real.c (cmp_significand_0, rtd_divmod, ten_to_mptwo): New. - (real_to_decimal): Re-implement using the logic from the - gcc 3.2 etoasc. Comment heavily. - (div_significands): Simplify loop startup and comparison logic. - -2002-10-18 Mark Mitchell - - * target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Default to NULL. - (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Likewise. - (TARGET_ASM_OUT): Add them. - * target.h (asm_out): Add output_mi_thunk and - output_mi_vcall_thunk. - * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/arm/arm-protos.h (arm_output_mi_thunk): Declare. - * config/arm/arm.c (arm_output_mi_thunk): Define. - * config/arm/arm.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/cris/cris.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/frv/frv.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/i386/i386-protos.h (x86_output_mi_thunk): Adjust - prototype. - (x86_output_mi_vcall_thunk): Declare. - * config/i386/i386.c (override_options): Clear - output_mi_vcall_thunk in 64-bit mode. - (ix86_fntype_regparm): New function. - (ix86_return_pops_args): Use it. - (ia32_this_parameter): New function. - (x86_output_mi_vcall_thunk): New function. - (x86_output_mi_thunk): Use it - * config/i386/unix.h (TARGET_ASM_OUTPUT_MI_THUNK): Adjust. - (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define. - * config/i960/i960-protos.h (i960_output_mi_thunk): Declare. - * config/i960/i960.c (i960_output_mi_thunk): New function. - * config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Adjust. - * config/ia64/ia64-protos.h (ia64_output_mi_thunk): Declare. - * config/ia64/ia64.c (ia64_output_mi_thunk): Define. - * config/ia64/ia64.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/m68k/m68k-protos.h (m68k_output_mi_thunk): New function. - * config/m68k/linux.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/m68k/netbsd-elf.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/mmix/mmix.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/pa/pa.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/rs6000/sysv4.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/s390/s390-protos.h (s390_output_mi_thunk): Declare. - * config/s390/s390.c (s390_output_mi_thunk): Define. - * config/s390/s390.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/stormy16/stormy16.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * config/vax/vax-protos.h (vax_output_mi_thunk): Declare. - * config/vax/vax.c (vax_output_mi_thunk): Define. - * config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Rename to ... - (TARGET_ASM_OUTPUT_MI_THUNK): ... this. - * doc/tm.texi: Adjust documentation. - -2002-10-18 Jason Thorpe - - * config/netbsd.h (NETBSD_ENABLE_EXECUTE_STACK): Define - __enable_execute_stack function. - * config/alpha/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Define - as NETBSD_ENABLE_EXECUTE_STACK. - * config/i386/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Ditto. - * config/i386/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Ditto. - * config/i386/netbsd64.h (TRANSFER_FROM_TRAMPOLINE): Ditto. - * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Ditto. - * config/sparc/netbsd.h (TRANSFER_FROM_TRAMPOLINE): Ditto. - -2002-10-18 Jason Thorpe - - * config/i386/i386.c (x86_initialize_trampoline): Emit a call - to __enable_execute_stack with the address of the trampoline - if TRANSFER_FROM_TRAMPOLINE is defined. - * config/i386/i386.h (TARGET_64BIT): Expand to a compile-time - constant if building libgcc2. - -Thu Oct 17 17:40:05 CEST 2002 Jan Hubicka - - * i386.c (pentium4_cost): Fix according to Intel recommendations. - (ix86_memory_move_cost): Fix for 64bit compilation. - -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. - -Thu Oct 17 18:40:47 CEST 2002 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. - -Wed Oct 16 15:01:29 CEST 2002 Jan Hubicka - - Really commit patch announced at Oct 14 - PR c/7344 - * predict.c (can_predict_insn_p): New function. - (estimate_probability): Avoid unnecesary work. - (process_note_prediction): Likewise. - * toplev.c (rest_of_compilation): Account early branch prediction pass - as TV_BRANCH_PROB. - - PR other/8048 - Found by Ian Ollmann - * xmmintrin.h (_mm_shuffle_pd): Fix typo. - (_mm_load?_pd): Likewise. - (_mm_store?_pd): Likewise. - - PR target/7386 - * i386.c (builtin_description):Drop cmpg[te]s[sd]. - * xmmintrin.h (__mm_cmpg[te]_s[sd]): Rewrite using - swapped alternative. - - PR opt/7630 - * reload1.c (reload_inner_reg_of_subreg): New argument output; - (push_reload): Update call. - -2002-10-17 Richard Sandiford - - * config.gcc (mips*-*-*): Add OBJECT_FORMAT_ELF to $tm_defines - if using mips/elf.h or mips/elf64.h. - * config/mips/elf.h (OBJECT_FORMAT_ELF): Remove. - * config/mips/elf64.h (OBJECT_FORMAT_ELF): Remove. - -2002-10-16 Aldy Hernandez - - * config/rs6000/rs6000.c (function_arg): Set inner mode of V1DI to - SI. - -2002-10-16 Ulrich Weigand - - * config/s390/linux.h (ASM_DOUBLE, _ASM_OUTPUT_LONG): Remove. - (LPREFIX): Likewise. - (ASM_COMMENT_START, LOCAL_LABEL_PREFIX, ASM_FORMAT_PRIVATE_NAME, - ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT, - ASM_OUTPUT_ALIGN, ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_BSS, - TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, BSS_SECTION_ASM_OP, - GLOBAL_ASM_OP, ASM_OUTPUT_MI_THUNK): Move to s390.h. - - * config/s390/s390.h (ASM_COMMENT_START, LOCAL_LABEL_PREFIX, - ASM_FORMAT_PRIVATE_NAME, ASM_OUTPUT_ALIGN, ASM_OUTPUT_SKIP, - ASM_OUTPUT_ALIGNED_BSS, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, - BSS_SECTION_ASM_OP): Move from linux.h. - (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. - Also, use ASM_GENERATE_INTERNAL_LABEL instead of LPREFIX. - - * config/s390/s390.c (s390_function_profiler): Use - ASM_GENERATE_INTERNAL_LABEL instead of LPREFIX. - -2002-10-15 Eric Christopher - - * stor-layout.c (layout_type): Call GET_MODE_BITSIZE once. - * java/parse.y (obtain_incomplete_type): Make pointer - ptr_mode. - -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. - -Tue Oct 15 22:08:35 CEST 2002 Jan Hubicka - - * expr.c (do_tablejump): Fix typo in my previous commit. - -2002-10-15 Richard Sandiford - - * config/mips/vr.h (DRIVER_SELF_SPECS): Change % - - * config/s390/s390.c (s390_split_branches): Add return - value. Add parameters TEMP_REG and TEMP_USED. Use unspec 104. - - (find_base_register_in_addr): New function. - (find_base_register_ref): New function. - (replace_base_register_ref): New function. - - (struct constant_pool): Add members pool_insn, insns, and anchor. - Remove member last_insn. - (s390_start_pool): Initialize them. - (s390_end_pool): Emit pool placeholder insn. - (s390_add_pool_insn): New function. - (s390_find_pool): Use insns bitmap instead of addresses. - (s390_dump_pool): Replace placeholder insn. Emit anchor. - Replace unspec 104 by local-pool-relative references. - (s390_output_constant_pool): Output anchor label if required. - (s390_output_symbolic_const): Handle unspec 104 and 105. - (s390_add_pool): Remove, replace by ... - (s390_add_constant, s390_find_constant): ... these new functions. - (s390_add_anchor): New function. - - (s390_chunkify_pool): Delete, replace by ... - (s390_chunkify_start, s390_chunkify_finish, - s390_chunkify_cancel): ... these new functions. - (s390_optimize_prolog): Add parameter TEMP_REGNO. - Recompute register live data for special registers. - (s390_fixup_clobbered_return_reg): New function. - (s390_machine_dependent_reorg): Rewrite to use new - s390_chunkify_... routines. - - config/s390/s390.md ("reload_base"): Rename to ... - ("reload_base_31"): ... this. - ("reload_base_64"): New insn. - ("reload_base2"): Remove. - ("reload_anchor"): New insn. - ("pool"): New insn. - - s390.c (s390_pool_overflow): Remove. - s390.h (s390_pool_overflow): Likewise. - s390.md ("cjump", "icjump", "doloop_si"): Remove s390_pool_overflow. - -Tue Oct 15 16:51:04 2002 J"orn Rennecke - - * sh.md (movv8qi_i+2): Don't split if source is -1. - -2002-10-15 Janis Johnson - - * doc/install.texi: Formatting changes for conformance to HTML 4.01. - -2002-10-15 Ulrich Weigand - - PR opt/7409 - * loop.c (loop_regs_scan): Mark registers used for function - argument passing as MAY_NOT_OPTIMIZE. - -Mon Oct 14 19:22:19 CEST 2002 Jan Hubicka - - * gcov-io.h (gcov_info): Fix type. - * profile.c (create_profiler): Fix type mismatch. - -Mon Oct 14 20:33:12 CEST 2002 Jan Hubicka - - * i386.md (movv2di_internal): New pattern. - (movv2df_internal, movv8hi_internal, movv16qi_internal): Fix predicate. - (movv2di): New expander. - * i386.c (ix86_preferred_reload_class): Return NO_REGS for vector operands. - - * i386.c (ix86_expand_timode_binop_builtin): Delete. - (builtin_description): Add SSE1 logicals; rename SSE2 logicals. - (ix86_init_mmx_sse_builtins): Kill SSE1 logicals. - (ix86_expand_builtin): Likewise. - * i386.h (sse_andti4_df_1, sse_andti3_df_2, sse_andti3_sf_1, sse_andti3_sf_2, - sse_andti3, - sse_andnti4_df_1, sse_andti3_df_2, sse_andti3_sf_1, sse_andti3_sf_2, - sse_andnti3, - sse_orti4_df_1, sse_orti3_df_2, sse_orti3_sf_1, sse_orti3_sf_2, - sse_orti3, - sse_xorti4_df_1, sse_xorti3_df_2, sse_xorti3_sf_1, sse_xorti3_sf_2, - sse_xorti3): Kill. - (sse_andv4sf3, sse_andnv4sf3, sse_orv2df3, sse_xorv2df3, sse_andv2df3, - sse_andnv2df3, sse_orv2df3, sse_xorv2df3): New expanders. - (*sse_andv4sf3, *sse_andnv2df3, *sse_orv4sf3, *sse_xorv4sf3, *sse_andv2df3, - *sse_andnv2df3, *sse_orv2df3, *sse_xorv2df3): New patterns. - (*sse_andsf3, *sse_andndf3, *sse_ordf3, *sse_xordf3, *sse_anddf3, - *sse_andndf3, *sse_orv2df3, *sse_xorv2df3): New patterns. - - * xmmintrin.h (__m128i): Define as __v2di. - - PR c++/6419 - (expand_expr): Use DECL_RTL_SET_P. - -2002-10-14 Roger Sayle - - * combine.c (simplify_set): Treat MODE_CC registers like cc0. - -2002-10-14 Roger Sayle - Zack Weinberg - - * config/i386/i386.c (k6_cost): Correct typo. - -2002-10-14 Mark Mitchell - - PR optimization/6631 - * alias.c (objects_must_conflict_p): Check honor_readonly when - examining TYPE_READONLY. - * function.c (assign_stack_temp_for_type): Likewise. - -2002-10-14 Falk Hueffner - - * config/alpha/alpha.md (extendsidi2_nofix, extendsidi2_fix): - Swap zero extension arguments. - (umaxhi3): Fix instruction class. - PR target/7211 - (prefetch): Fix prefetch instructions. - PR target/7238 - (pkwb): Fix output constraint. - -2002-10-14 Alexandre Oliva - - * config/mips/mips.c (print_operand): Increase buffer size for - real numbers. - -2002-10-14 Richard Henderson - - PR opt/8165 - * gcse.c (adjust_libcall_notes): Revert last change. - * simplify-rtx.c (simplify_replace_rtx): Handle LO_SUM. - -2002-10-14 Andrew Haley - - * tree-inline.c (remap_block): All local class initialization - flags go in the outermost scope. - (expand_call_inline): Call java_inlining_map_static_initializers. - (expand_call_inline): Call java_inlining_merge_static_initializers. - * java/lang.c (merge_init_test_initialization): New. - (java_inlining_merge_static_initializers): New. - (inline_init_test_initialization): New. - (java_inlining_map_static_initializers): New. - - * tree-inline.c (expand_call_inline): Convert retvar to expected - type. - -2002-10-14 Graham Stott - - * stmt.c (decl_conflicts_with_clobbers_p): Add REG_P check. - -2002-10-14 Aldy Hernandez - - * stmt.c: Fix typo in comment. - -Mon Oct 14 11:35:49 2002 J"orn Rennecke - - * c-common.c (c_common_type_for_mode): Add V2HImode case. - * tree.c (build_common_tree_nodes_2): Initialize - unsigned_V2HI_type_node and V2HI_type_node. - * tree.h (enum tree_index): Add TI_UV2HI_TYPE and TI_V2HI_TYPE. - (unsigned_V2HI_type_node, V2HI_type_node): Define. - -2002-10-14 Jakub Jelinek - - * config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): - Handle TARGET_64BIT. - -2002-10-14 Richard Sandiford - - * config/mips/vr.h (DRIVER_SELF_SPECS): Define. - * config/mips/t-vr (MULTILIB_OPTIONS): Remove mlong32. - (MULTILIB_DIRNAMES): Remove long32. - (MULTILIB_EXCEPTIONS): Don't build -mabi=32 -mgp32 multilibs. - (MULTILIB_REDUNDANT_DIRS): Remove. - -2002-10-14 Richard Sandiford - - * doc/tm.texi (DRIVER_SELF_SPECS): Document. - * gcc.c (driver_self_specs): New variable. - (do_self_spec): New function. - (main): Use it to process driver_self_specs. - -2002-10-13 Richard Henderson - - * config/i386/i386.c (ix86_function_ok_for_sibcall): Reject - indirect sibcalls when regparm >= 3. - - * config/i386/i386.c (sibcall_insn_operand): New. - * config/i386/i386.h (PREDICATE_CODES): Update. - * config/i386/i386-protos.h: Update. - * config/i386/i386.md (sibcall_1, sibcall_value_1): Use it. - - * rtl.c (shallow_copy_rtx): Use memcpy for the entire node. - -2002-10-12 Roger Sayle - - * simplify-rtx.c (simplify_binary_operation) [ASHIFTRT]: Optimize - arithmetic right shifts of ~0 during RTL simplifications. - -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 Andreas Bauer - - * config/i386/i386.c (ix86_function_ok_for_sibcall): Allow - indirect calls to be sibcall optimized. - * config/i386/i386.md (sibcall_1): New. - (call_1): Add no-sibcalls condition. - (sibcall_value_1): New. - (call_value_1): Add no-sibcalls condition. - -2002-10-11 Eric Christopher - - * output.h (default_valid_pointer_mode): Declare. - * varasm.c (default_valid_pointer_mode): Define. - * target-def.h (TARGET_VALID_POINTER_MODE): Use. - * target.h: Ditto. - * tree.c (build_pointer_type_for_mode): New function. - (build_pointer_type): Use. - (build_reference_type_for_mode): New function. - (build_reference_type): Use. - * tree.h: Declare new functions. - * c-common.c (handle_mode_attribute): Use new functions, check - for type. - * stor-layout.c (layout_type): Depend on machine mode for - REFERENCE_TYPE and POINTER_TYPE. - * dwarf2out.c (simple_type_size_in_bits): Move upward in file. - (modified_type_die): Use instead of PTR_SIZE for POINTER_TYPE - and REFERENCE_TYPE. - * config/mips/mips.c (mips_valid_pointer_mode): New function. - (TARGET_VALID_POINTER_MODE): Use and define. - * config/mips/mips-protos.h (mips_valid_pointer_mode): Declare. - -2002-10-11 Geoffrey Keating - - * cse.c (mention_regs): Set SUBREG_TICKED to the register number, - not the address of the REG. - (struct cse_reg_info): Make subreg_ticked unsigned. - -2002-10-11 Janis Johnson - - * doc/compat.texi: Add info about C++ libraries. - -2002-10-11 Richard Henderson - - PR opt/8165 - * gcse.c (adjust_libcall_notes): Also adjust notes for INSN. - -2002-10-11 John David Anglin - - * cfganal.c (dfs_enumerate_from): Use PARAMS. - * genautomata.c (output_insn_code_cases): Likewise. - * real.c (real_format): Likewise. - * tree.c (tree_size): Revise expressions using TREE_CODE_LENGTH to - ensure value is promoted before doing subtraction. - -Fri Oct 11 22:22:38 CEST 2002 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. - -Fri Oct 11 12:34:33 2002 J"orn Rennecke - - * sh.md (movv8qi_i+2): For V8QI destinations, generate V4HI - register for mperm_w operation. - -Fri Oct 11 10:56:17 2002 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 Diego Novillo - - * calls.c (flags_from_decl_or_type): Make extern. - (ECF_*): Move ... - * rtl.h (ECF_*): ... here. - (flags_from_decl_or_type): Declare. - -2002-10-10 Roger Sayle - Nathan Sidwell - - * fold-const.c (fold) [RSHIFT_EXPR]: Optimize arithmetic right - shifts of the form -1 >> x. - -Thu Oct 10 16:52:55 CEST 2002 Jan Hubicka - - * cfgcleanup.c (insn_match_p): Verify sibcall flag for calls to. - -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. - -Thu Oct 10 19:37:54 CEST 2002 Jan Hubicka - - PR target/5610 - * invoke.texi (-msse-math): Kill - (-msse): Add note to mfpmath=sse. - -Thu Oct 10 17:08:30 CEST 2002 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. - -Wed Oct 9 21:18:43 CEST 2002 Jan Hubicka - - * i386.c (*_cost): Add branch costs. - (override_options): set ix86_branch_cost. - (ix86_expand_int_movcc): Use BRANCH_COST. - * i386.h (costs): Add branch_cost. - -2002-10-09 Zack Weinberg - - PR c/7353 - * c-decl.c (start_decl): Unconditionally issue error for - 'typedef foo = bar'. - (finish_decl): Remove special case for TYPE_DECL with initializer. - - * doc/extend.texi: Delete "Naming Types" section. Change all - cross-references to that section to refer to "Typeof" instead. - Add the useful safe-max()-macro example from "Naming Types" to - "Typeof", rewritten using that extension. Add some compatibility - notes to "Typeof." - -2002-10-09 Kaveh R. Ghazi - - * loop.c: Revert 2002-08-15 change. - (LOOP_REGNO_NREGS): Ensure type is int. - -2002-10-09 David Edelsohn - - * config/rs6000/rs6000.md (extenddftf2): Change to define_insn - which copies first FPR and clears second. - (extendsftf2): Same. - (floatditf2): Fix typo. - (floatsitf2): Same. - (fix_trunctfdi2): Same. - (fix_trunctfsi2): Same. - -2002-10-09 Kaveh R. Ghazi - - * conflict.c (arc_hash): Change return type to hashval_t. - * cselib.c (get_value_hash): Likewise. - * genautomata.c (automaton_decl_hash, insn_decl_hash, decl_hash, - state_hash, automata_list_hash): Likewise. - * read-rtl.c (def_hash): Likewise. - * tree.c (type_hash_hash): Likewise. - -2002-10-08 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Call - prologue_epilogue_contains instead of using REG_MAYBE_DEAD notes. - -Wed Oct 9 15:54:49 2002 J"orn Rennecke - - * sh.md (ffssi2): Fix emitted code. - -2002-10-09 Ulrich Weigand - - * cse.c (insn_live_p): Pass insn pattern, not full insn - to may_trap_p. - -2002-10-09 Neil Booth - - * cppmacro.c (paste_tokens): Only allow / to paste with =. - -2002-10-09 David Edelsohn - - * config/rs6000/rs6000.md (movdf splitter): Use gen_int_mode on - 64-bit hosts. - (movtf_internal): Reference correct displacement for second value - in memory. - (movtf splitter): Correct generation of constants in 64-bit mode. - -2002-10-09 Alan Modra - - * libgcc2.c (__floatdisf): Properly cure double rounding. - -2002-10-09 Gabriel Dos Reis - - * c-common.c (cb_register_builtins): Define __WCHAR_MAX__. - * doc/cpp.texi (Common Predefined Macros): Document. - -2002-10-09 Gabriel Dos Reis - - PR doc/7484 - * doc/invoke.texi (Option Summary): List - -Wmissing-declarations as a C only option. - -2002-10-08 Roger Sayle - - * fold-const.c (fold) [LROTATE_EXPR, RROTATE_EXPR]: Optimize - left and right rotates of ~0, i.e. integer_all_onesp (arg0). - [LSHIFT_EXPR, RSHIFT_EXPR]: Optimize shifts and rotates of zero. - -Tue Oct 8 01:24:19 CEST 2002 Jan Hubicka - - * i386.c (x86_sse_partial_reg_dependency, x86_sse_partial_regs, - x86_sse_typeless_stores, x86_sse_load0_by_pxor): New global - variables. - (safe_vector_operand): Update sse_clrv4sf call. - (ix86_expand_buildin): Likewise - * i386.h (x86_sse_partial_reg_dependency, x86_sse_partial_regs, - x86_sse_typeless_stores, x86_sse_load0_by_pxor): Declare. - (TARGET_SSE_PARTIAL_REG_DEPENDENCY, TARGET_SSE_PARTIAL_REGS, - TARGET_SSE_TYPELESS_STORES, TARGET_SSE_TYPELESS_LOAD0): New - macros. - * i386.md (movsf*, movdf*, movti, movv4sf, movv2df, movv16qi, movv8hi, - movv4si): Obey the new flags. - (floatsi2sf, floatdi2sf, truncatedf2sf): Emit extra load of 0 to avoid - reformating penalty. - (anddf, cmov patterns): Avoid reformating by first converting. - (sse_cvtsd2ss): Fix predicate. - (sse2_clrti): Fix mode, - (sse_clrv4sf): Avoid unspec. - -2002-10-08 Jakub Jelinek - - * config/sparc/t-linux64 (MULTILIB_OPTIONS): Remove - mno-app-regs|mcmodel=medany. - (MULTILIB_DIRNAMES, MULTILIB_OSDIRNAMES): Remove alt. - (MULTILIB_EXCEPTIONS, MULTILIB_EXCLUSIONS, MULTILIB_MATCHES): Remove. - (CRTSTUFF_T_CFLAGS): Define. - -2002-10-08 Roger Sayle - - PR target/8087 - * simplify-rtx.c (avoid_constant_pool_reference): Allow constant - pool references that are constructed using LO_SUM. - -2002-10-08 Nathan Sidwell - - * c-opts.c (c_common_decode_option): Add warn_strict_aliasing to - -Wall. - * c-typeck.c (build_c_cast): Use warn_strict_aliasing, tweak - message. - * flags.h (warn_strict_aliasing): Declare. - * toplev.c (warn_strict_aliasing): Define. - (lang_independent_options): Add it. - * doc/invoke.texi (-Wstrict-aliasing): Document it. - -2002-10-08 Zack Weinberg - - * system.h (GCCBUGURL): Delete. - * version.c (bug_report_url): New. Add commentary about - modifying both these strings in modified distributions. - * version.h: Declare bug_report_url. - - * diagnostic.c, gcc.c, gcov.c: Globally replace GCCBUGURL with - bug_report_url. - -2002-10-08 Nick Clifton - - * config/rs6000/spe.h (__ev_set_acc_u64): Use __ev_create_u64 to - convert uint64_t into __ev64_opaque__. - (__ev_set_acc_s64): Likewise, but using signed types. - -2002-10-08 Ulrich Weigand - - * config/s390/s390.md ("*doloop_si_long"): Add missing operand. - ("*doloop_di_long"): Likewise. - -Tue Oct 8 16:50:10 CEST 2002 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 Richard Henderson - - * cse.c (fixed_base_plus_p): Turn FIXED_BASE_PLUS_P into a - function; cleanup PLUS case by using recursion. Update all users. - (NONZERO_BASE_PLUS_P): Remove. - (find_comparison_args): Use rtx_addr_can_trap_p instead. - (fold_rtx): Use nonzero_address_p. - * rtl.h (nonzero_address_p): Declare. - * rtlanal.c (rtx_varies_p): Handle ADDRESSOF. - (rtx_addr_can_trap_p): Likewise. - (nonzero_address_p): New. - * simplify-rtx.c (NONZERO_BASE_PLUS_P): Remove. - (simplify_relational_operation): Use nonzero_address_p. - -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-06 Andreas Bauer - - * calls.c (expand_call): Fix function-is-volatile check. - -2002-10-05 Naohiko Shimizu - - * t-pdp11: Add MULTILIB support for msoft-float. - * pdp11.h (LEGITIMATE_CONSTANT_P): Fix soft-float case. - - * t-pdp11: Add LIB2FUNCS_EXTRA. - * pdp11.c (pdp11_output_function_prologue): Restrict offset to 16bit, - add preceding 0 to the octal constant, rename 'fp' to 'r5', rename - 'fldd' to 'ldd', rename 'fstd' to 'std'. - (pdp11_output_function_epilogue): Likewise. - (output_move_quad): Make the comment gas compatible. - (output_ascii): Add preceding 0 to the octal constant. - (print_operand_address): Add pre_modify, post_modify. - (output_addr_const_pdp11): Add preceding 0 to the octal constant. - * pdp11.h (GO_IF_LEGITIMATE_ADDRESS) : Add 'movb' pre_modify case - with the indication of Paul Koning. - (PRINT_OPERAND): Fix floating constant. - * pdp11.md (movdi): Restrict matching pattern. - (movqi): Generalize the matching pattern. - (movdf): Restrict matching pattern. - (zero_extendqihi2): Change constant representation. - (floatsidf2): Fix wrong operands. - (addqi3): Fix wrong instruction name. - (subqi3): Fix wrong instruction name. - (andsi3, andhi3, andqi3): Simplify and fix to use 'bic'. - (xorsi3): Fix wrong insn. - (one_cmplqi2): Add two operand pattern. - (lsrsi3): New. - (negsi2): New. - (call): Add register indirect case. - (mod): Fix wrong subreg. - -2002-10-06 Eric Botcazou - Volker Reichelt - - PR c/7411 - * expr.c (expand_expr) [PLUS]: Simplify after the operands - have been expanded in EXPAND_NORMAL mode. - -2002-10-06 Richard Henderson - - * config/rs6000/rs6000.md (load_toc_v4_PIC_2): Fix base constraint. - -2002-10-06 Richard Henderson - - PR optimization/2960 - * toplev.c (rest_of_compilation): Don't copy_loop_headers if - optimize_size. - -2002-10-06 Alexandre Oliva - - * config/mips/mips.h (SIZE_TYPE, PTRDIFF_TYPE): Override - previously definitions. - -2002-10-06 Frank Ch. Eigler - - * cppinit.c (init_standard_includes, parse_option): Use strncmp. - * c-opts.c (find_opt): Similarly. - -Sat Oct 5 22:48:06 CEST 2002 Jan Hubicka - - * athlon.md: rewrite to DFA. - * i386 (ix86_adjust_cost): Drop memory latency code. - (ia32_use_dfa_pipeline_interface): Return true for Athlon. - -2002-10-05 Jakub Jelinek - - * gcc.c (set_multilib_dir): Don't access *end. - Use memcpy instead of strncpy. Don't write beyond malloced buffer. - (print_multilib_info): Don't show paths starting with ".:". - * genmultilib: Add new option, "yes" if multilibs are enabled. - Update comments. If multilibs not enabled, print .:${osdirout} - for each directory. If multilibs are enabled, always print - ${dirout}:${osdirout}, even if the two are the same. - * Makefile.in (s-mlib): Pass @enable_multilib@ to genmultilib. - Pass all MULTILIB_* variables to genmultilib even if - --disable-multilib but MULTILIB_OSDIRNAMES is not empty. - -2002-10-04 Zack Weinberg - - * gcc.c (process_command): Set .validated for -pipe. Correct - grammar in comment. - -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 - -Sat Oct 5 19:42:45 CEST 2002 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 Bauer - - * doc/tm.texi (FUNCTION_OK_FOR_SIBCALL): Remove. - (TARGET_FUNCTION_OK_FOR_SIBCALL): New. - -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. - -Thu Oct 3 23:35:51 CEST 2002 Jan Hubicka - - * i386.c (athlon_cost): Fix the move costs. - -Thu Oct 3 23:20:58 CEST 2002 Jan Hubicka - - * final.c (final): Use symbol name as function name for profiling. - * profile.c (get_exec_counts): Likewise. - (branch_prob): Likewise. - -2002-10-03 Jakub Jelinek - - * longlong.h (__udiv_qrnnd): Remove PARAMS from prototype. - -2002-10-03 Jakub Jelinek - - * gcc.c (print_multi_os_directory): New variable. - (option_map): Support --print-multi-os-directory. - (struct prefix_list): Add os_multilib field. - (multilib_os_dir): New variable. - (static_specs): Add multilib_options. - (find_a_file): Add multilib argument. Search in GCC or OS multilib - subdirs if nonzero. - (read_specs, execute): Update callers. - (find_file): Likewise. Don't prefix name with multilib_dir, instead - pass 1 as multilib option. - (display_help): Include --print-multi-os-directory. - (add_prefix): Add os_multilib argument. Initialize pl->os_multilib. - (process_command): Update callers. Handle --print-multi-os-directory. - (do_spec_1) ['D']: Use multilib_os_directory if pl->os_multilib is - set. - (main): Update find_a_file and add_prefix callers. - Handle print_multi_os_directory. - (struct mdswitchstr): New. - (mdswitches, n_mdswitches): New variables. - (used_arg): Add MULTILIB_DEFAULT switches too if they are not - present on the command line nor their mutually incompatible - switches. - (default_arg): Optimize. - (set_multilib_dir): Compute multilib_os_dir. Initialize mdswitches - array. - (print_multilib_info): Only print GCC multilib dir name, not OS - multilib dirname. - * genmultilib: Add osdirnames parameter. Output multilib_options - variable. If osdirnames is specified, output dirnames as - dirname:osdirname. - * mklibgcc.in: Use MULTILIB_OSDIRNAMES, --print-multi-directory - and --print-multi-os-directory instead of SHLIB_SLIBDIR_SUFFIXES - to compute libgcc_s soname and install path. - * Makefile.in (libgcc.mk): Pass MULTILIB_OSDIRNAMES instead of - SHLIB_SLIBDIR_SUFFIXES to mklibgcc. - (s_mlib): Pass MULTILIB_OSDIRNAMES or nothing as last genmultilib - argument. - - * config/sparc/t-linux64 (MULTILIB_OSDIRNAMES): Set. - (SHLIB_SLIBDIR_SUFFIXES): Remove. - * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64, - ENDFILE_SPEC32, ENDFILE_SPEC64, ENDFILE_COMMON): Remove. - (STARTFILE_SPEC, ENDFILE_SPEC): Don't distinguish between -m32 - and -m64. - * config/sparc/t-sol2-64 (MULTILIB_OSDIRNAMES): Set. - (SHLIB_SLIBDIR_SUFFIXES): Remove. - * config/sparc/sol2-bi.h (STARTFILE_ARCH64_SPEC): Remove. - (STARTFILE_ARCH_SPEC): Remove. - * config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Set. - (SHLIB_SLIBDIR_SUFFIXES): Remove. - * config/i386/linux64.h (STARTFILE_PREFIX_SPEC): Remove. - * config/mips/t-iris6 (MULTILIB_OSDIRNAMES): Set. - (SHLIB_SLIBDIR_SUFFIXES): Remove. - -Thu Oct 3 21:42:20 CEST 2002 Jan Hubicka - - * predict.c (choose_function_section): Avoid choice for linkonce functions. - -Thu Oct 3 15:15:00 CEST 2002 Jan Hubicka - - * i386.md (lea to mul peep2): Fix condition. - -2002-10-02 John David Anglin - - * pa-linux.h (FUNCTION_OK_FOR_SIBCALL): Delete macro. - * pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Define. - -2002-10-02 David Mosberger-Tang - - * unwind.h (_Unwind_GetTextRelBase): Mark _C argument with - attribute "unused". - - * config/t-libunwind: Mention unwind-sjlj.c. - * unwind-libunwind.c: Change #ifdef __USING_LIBUNWIND_EXCEPTIONS__ - to #ifndef __USING_SJLJ_EXCEPTIONS__. - - * configure.in: Move sjlj-exceptions and --enable-libunwind-exceptions - before inclusion of config.gcc, but after configuring the compiler etc. - Determine default value for --enable-libunwind-exceptions based on - whether the host has a libunwind library (not guaranteed to be correct, - but it's a reasonable first guess and can always be overridden with an - explicit --enable/disable-libunwind-exceptions. - * config.gcc: For target ia64*-*-linux*, mention t-libunwind as a - tmake_file when $use_libunwind_exceptions is enabled. - * Makefile.in: Update comment: LIB2ADDEH is updated not just by - ia64 (e.g., config/t-linux also updates it). - * gcc.c (init_spec) [USE_LIBUNWIND_EXCEPTIONS]: Mention -lunwind - along with the shared version of libgcc since the latter requires - the former. - * unwind-libunwind.c: New file. - * config/t-libunwind: Ditto. - -2002-10-02 Nathanael Nerode - - * config.gcc: Remove support for vax-*-vms*. - * config/vax/vms.h: Remove. - * config/vax/xm-vms.h: Remove. - * config/vax/vax-protos.h: Remove VMS-specific code. - * config/vax/vax.c: Remove VMS-specific code. - -2002-10-02 Richard Henderson - - PR opt/7124 - * config/i386/i386.c (ix86_register_move_cost): Increase cost - for secondary_memory_needed pairs. - -2002-10-02 Nathanael Nerode - - * doc/vms.texi: Blow away false include file section. - -2002-10-02 Roger Sayle - - PR optimization/6627 - * toplev.c (force_align_functions_log): New global variable. - * flags.h (force_align_functions_log): Add extern prototype. - * varasm.c (assemble_start_function): Use it to force minimum - function alignment. - * config/i386/i386.h (FUNCTION_BOUNDARY): Set the correct - minimum function alignment to one byte. - (TARGET_PTRMEMFUNC_VBIT_LOCATION): Store the virtual bit in - the least significant bit of vtable member function pointers. - * tree.h (enum ptrmemfunc_vbit_where_t): Move definition to - here from cp/cp-tree.h. - -Wed Oct 2 17:01:36 CEST 2002 Jan Hubicka - - * i386.c (print_operand_address): Use RIP addressing for offsetted - label refs too. - -2002-09-30 David S. Miller - - PR middle-end/7151 - * config/sparc/sparc.md (movdi_insn_sp32_v9): Accept 'e' regs. - (movdi reg/reg split): Match only on sparc32, and v9 when int regs. - -2002-10-01 Andreas Bauer - - * calls.c (expand_call): Remove the `no indirect check' - for sibcall optimization; use function_ok_for_sibcall - target hook; refine check for `function is volatile'. - (FUNCTION_OK_FOR_SIBCALL): Remove the redefinition. - * hooks.c (hook_tree_tree_bool_false): New. - * hooks.h (hook_tree_tree_bool_false): Declare. - * target-def.h (TARGET_FUNCTION_OK_FOR_SIBCALL): New. - (TARGET_INITIALIZER): Add it. - * target.h (struct gcc_target): Add function_ok_for_sibcall. - * config/alpha/alpha.c: (alpha_function_ok_for_sibcall): New. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Redefine accordingly. - * config/alpha/alpha.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/arm/arm-protos.h: (arm_function_ok_for_sibcall): - Remove function declaration. - * config/arm/arm.c: (arm_function_ok_for_sibcall): Make - function static and accept another argument of type `tree'. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Redefine accordingly. - * config/arm/arm.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/frv/frv.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/i386/i386.c: (ix86_function_ok_for_sibcall): New. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Redefine accordingly. - * config/i386/i386.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/pa/pa-linux.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - (TARGET_HAS_STUBS_AND_ELF_SECTIONS): New definition. - * config/pa/pa.c: (pa_function_ok_for_sibcall): New. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Redefine accordingly. - * config/pa/pa.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/rs6000/rs6000-protos.h: (function_ok_for_sibcall): - Remove function declaration. - * config/rs6000/rs6000.c: (rs6000_function_ok_for_sibcall): - Rename function_ok_for_sibcall to rs6000_function_ok_for_sibcall; - rename first argument to `decl'; accept another argument - of type `tree'; make static. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Redefine accordingly. - * config/rs6000/rs6000.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/sh/sh.c: (sh_function_ok_for_sibcall): New. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Redefine accordingly. - * config/sh/sh.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/sparc/sparc.c: (sparc_function_ok_for_sibcall): New. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Redefine accordingly. - * config/sparc/sparc.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - * config/xtensa/xtensa.h: (FUNCTION_OK_FOR_SIBCALL): Remove. - -2002-10-01 Roger Sayle - - * unroll.c (loop_iterations): Revert 2002-09-08 change. - -2002-10-01 Richard Henderson - - * real.c (real_to_decimal): Crop trailing zeros for DIGITS < 0. - (real_to_hexadecimal): Likewise. - * print-rtl.c (print_rtx): If we are linked with real.c, don't - dump the XWINT fields of a floating point CONST_DOUBLE. - -2002-10-01 Jason Thorpe - - * config/vax/elf.h (FUNCTION_PROFILER): Fix __mcount call. - -2002-10-01 Richard Henderson - - * calls.c (precompute_register_parameters): Force non-legitimate - constants into pseudos. - -2002-10-01 Nick Clifton - - * config/rs6000/spe.md (spe_evrlwi): Add missing third operand - to assembler template. - -2002-10-01 Richard Henderson - - * dwarf2out.c (loc_descriptor_from_tree): Relax requirement - for TLS debug info to !DECL_EXTERNAL. - -2002-10-01 Matt Thomas - Jason Thorpe - - * config.gcc (vax-*-netbsdelf*): Enable configuration. - * config/elfos.h (PCC_BITFIELD_TYPE_MATTERS): Define only - if not already defined. - * config/vax/elf.h: New file. - * config/vax/netbsd-elf.h: New file. - * config/vax/vax.c: Include "debug.h". - (vax_output_function_prologue): Add dwarf2 support. Use - MAIN_NAME_P when checking for VMS_TARGET stack adjust. - * config/vax/vax.h (CONST_OK_FOR_LETTER_P): Add cases for - 'J' [0..63], 'K' [-128..127], 'L' [-32768..32767], - 'M' [0..255], 'N' [0..65535], and, 'O' [-63..-1]. - (VAX_ISTREAM_SYNC): Remove. - (INITIALIZE_TRAMPOLINE): Use gen_sync_istream. - (JUMP_TABLES_IN_TEXT_SECTION): Define. - (ASM_OUTPUT_REG_POP): Use reg_names for the stack pointer. - (ASM_OUTPUT_ADDR_VEC_ELT): Use ASM_GENERATE_INTERNAL_LABEL - and assemble_name. - (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise. - (PRINT_OPERAND_PUNCT_VALID_P): Accept '|'. - (PRINT_OPERAND): Output REGISTER_PREFIX for '|'. - (INCOMING_RETURN_ADDR_RTX): Define. - * config/vax/vax.md (VUNSPEC_BLOCKAGE) - (VUNSPEC_SYNC_ISTREAM): Define. - (blockage): Use VUNSPEC_BLOCKAGE. - (sync_istream): New insn. - -2002-10-01 Richard Henderson - - * config/vax/vax.md (call_pop, *call_pop, call_value_pop) - (*call_value_pop, call, call_value): Add dwarf2 EH support. - (*call): New insn. - -2002-10-01 Nathan Sidwell - - PR c/8083 - * c-typeck.c (build_c_cast): Warn about type punning which breaks - type based aliasing. - -2002-10-01 Mark Mitchell - - * stor-layout.c (update_alignment_for_field): New function. - (place_union_field): Use it. - (place_field): Likewise. - -2002-10-01 Nathan Sidwell - - PR other/8077 - * gcc.c (cc1_options): Add space on -auxbase-strip. - -2002-10-01 Jim Wilson - - * config/v850/v850.h (EPILOGUE_USES): Define. - -2002-09-30 Andrew Haley - - * flow.c (insn_dead_p): When using non-call-exceptions, don't - eliminate insns that may trap. - * cse.c (insn_live_p): Likewise. - -2002-10-01 Richard Sandiford - - * config/mips/mips.h (PROCESSOR_R4121): Rename to PROCESSOR_R4120. - (TARGET_MIPS4121): Rename to TARGET_MIPS4120. - * config/mips/mips.c (mips_cpu_info): Rename vr4121 to vr4120. - * config/mips/mips.md: Apply same renaming here. - -2002-10-01 Richard Sandiford - - * config/mips/mips.c (PROCESSOR_R4320, TARGET_MIPS4320): Remove. - (GENERATE_MULT3_SI): Remove use of TARGET_MIPS4320. - * config/mips/mips.c (mips_cpu_info): Remove vr4320 entry. - * config/mips/mips.md (define_attr cpu): Remove r4320. - Remove vr4320 scheduler and uses of TARGET_MIPS4320. - -2002-10-01 Richard Sandiford - - * config/mips/mips.c (mips16_strings): New variable. - (mips_output_function_epilogue): Clear the SYMBOL_REF_FLAG of every - symbol in mips16_strings. Free the list. - (mips_encode_section_info): Keep track of local strings. - -2002-10-01 Richard Sandiford - - * config/mips/mips.md (bunge, bltgt, bungt): New define_expands. - (sordered_df, sordered_sf): Remove. - * config/mips/mips.c (get_float_compare_codes): New fn. - (gen_int_relational, gen_conditional_move): Use it. - -2002-10-01 Richard Sandiford - - * config/mips/mips-protos.h (mips_emit_fcc_reload): Declare. - * config/mips/mips.h (PREDICATE_CODES): Add fcc_register_operand. - * config/mips/mips.c (fcc_register_operand): New function. - (mips_emit_fcc_reload): New function, extracted from reload_incc. - (override_options): Allow TFmode values in float registers - if ISA_HAS_8CC. - * cnfig/mips/mips.md (reload_incc): Change destination prediate - to fcc_register_operand. Remove misleading source constraint. - Use mips_emit_fcc_reload. - (reload_outcc): Duplicate reload_incc. - -2002-09-30 Zack Weinberg - - * gcc.c (validate_switches): Handle all new forms of spec - syntax introduced recently. Now returns a char *. - (validate_all_switches): Repetitive logic broken out to... - (validate_switches_from_spec): ...here. - * mklibgcc.in: Don't @-flag commands to generate .oS files. - -2002-09-30 Ulrich Weigand - - * longlong.h: Partially synchronize with GMP-4.1 version: - Use i370 definitions also for s390. - Add generic definition of umul_ppmm in terms of smul_ppmm. - [s390] (umul_ppmm): Remove. - [s390] (smul_ppmm): Fix incorrect assembler constraints. - [s390] (smul_ppmm, sdiv_qrnnd): Rename __xx to __x. - -2002-09-30 Bob Wilson - - * config/xtensa/xtensa.h (REG_CLASS_NAMES, REG_CLASS_CONTENTS): - Add new RL_REGS register class. - (PREFERRED_RELOAD_CLASS, PREFERRED_OUTPUT_RELOAD_CLASS): - Call xtensa_preferred_reload_class for both input and output reloads. - * config/xtensa/xtensa.c (xtensa_regno_to_class): Use new RL_REGS class. - (xtensa_preferred_reload_class): Handle output reloads; use RL_REGS - instead of either AR_REGS or GR_REGS classes. - (xtensa_secondary_reload_class): Use new RL_REGS class. - * config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class): Update. - -2002-09-30 John David Anglin - - * pa.c (hppa_encode_label): Don't drop '*' from function labels. - (pa_strip_name_encoding): Strip '@' and '*', in that order. - * pa.h (ASM_OUTPUT_LABELREF): Output user_label_prefix except when - there is a '*' prefix in NAME. - -Mon Sep 30 21:33:23 CEST 2002 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. - -Mon Sep 30 14:57:18 CEST 2002 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 Kaveh R. Ghazi - - * openbsd.h: Fix typo in last change. - -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 Kazu Hirata - - * varasm.c (force_data_section): Remove. - (assemble_constant_align): Likewise. - * output.h: Remove corresponding prototypes. - -2002-09-26 Roger Sayle - - * stmt.c (expand_exit_loop_if_false): Expand a simple conditional - jump, if the loop to exit is the top of the current nesting stack. - -2002-09-26 Torbjorn Granlund - - * libgcc2.c (fixunsdfdi, fixunssfdi): Rewrite, avoiding `long long' - arithmetic. - -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 Zack Weinberg - - * gcc.c (input_suffix_matches, switch_matches, - mark_matching_switches, process_marked_switches, - process_brace_body): New functions - split from handle_braces. - (handle_braces): Rewrite; handle %{S:X;T:Y;:D} syntax; accept - and ignore whitespace in more places. - (specs documentation comment): Document %{S:X;T:Y;:D}. - Clarify other %{...} docs. - * doc/invoke.texi: Document %{S:X;T:Y;:D}. Clarify other - %{...} docs. - - * config/arm/aof.h (LINK_SPEC): Change %{ov*,*} to %{ov*}. - * config/rs6000/sysv4.h: Use N-way choice spec syntax. - -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 Nathan Sidwell - - * profile.c (end_branch_prob): Only look for __gcov_init on - weak-enabled native compilers. - -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 Kazu Hirata - - * config/alpha/alpha.h: Remove commented-out macro - definitions of HAVE_{POST|PRE}_{INC|DEC}REMENT. - * config/avr/avr.h: Likewise. - * config/d30v/d30v.h: Likewise. - * config/dsp16xx/dsp16xx.h: Likewise. - * config/i370/i370.h: Likewise. - * config/i386/i386.h: Likewise. - * config/i960/i960.h: Likewise. - * config/m68k/m68k.h: Likewise. - * config/m88k/m88k.h: Likewise. - * config/mips/mips.h: Likewise. - * config/ns32k/ns32k.h: Likewise. - * config/pdp11/pdp11.h: Likewise. - * config/romp/romp.h: Likewise. - * config/rs6000/rs6000.h: Likewise. - * config/s390/s390.h: Likewise. - * config/sh/sh.h: Likewise. - * config/sparc/sparc.h: Likewise. - * config/stormy16/stormy16.h: Likewise. - * config/vax/vax.h: Likewise. - -2002-09-23 Kazu Hirata - - * function.c (push_temp_slots_for_block): Remove. - (push_temp_slots_for_target): Likewise. - (get_target_temp_slot_level): Likewise. - (set_target_temp_slot_level): Likewise. - (get_first_block_beg): Likewise. - * function.h: Remove corresponding prototypes. - -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 Roger Sayle - - * expr.c (STORE_BY_PIECES_P): New target macro. - (can_store_by_pieces, store_by_pieces): Use STORE_BY_PIECES_P - instead of MOVE_BY_PIECES_P. - * doc/tm.texi: Document this new macro. - -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. - -Tue Aug 27 22:26:35 CEST 2002 Jan Hubicka - - * i386.h (BIGGEST_FIELD_ALIGNMENT): Set proper default for x86_64. - -Tue Aug 27 20:07:01 CEST 2002 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 Roger Sayle - - * tree.c (integer_nonzerop): New predicate for nonzero integers. - * tree.h (integer_nonzerop): Add function prototype. - * stmt.c (expand_end_loop): Don't rotate the loop when there - are no instructions in the test, i.e. the loop is unconditional. - (expand_exit_loop_if_false): Optimize RTL generation of loop - tests when the condition is always true or always false. - * c-semantics.c (genrtl_do_stmt): Optimize RTL generation of - do-loops when the condition is always true. - (genrtl_for_stmt): Optimize RTL generation of for-loops when - the for-expression is empty. - -2002-09-19 Zack Weinberg - - * gcc.c (use_pipes): New flag. - (process_command): Set it. Adjust check for -pipe conflicting - with -time or -save-temps. - (do_spec_1): Use it. Handle %|SUFFIX, %mSUFFIX, and - % - - * 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-18 Devang Patel - - * cp/cp-tree.h: New prototype for walk_vtables(). - * cp/decl.c (walk_vtables_r): New function. - (struct cp_binding_level): Add new members, namespaces, - names_size and vtables. - (add_decl_to_level): Add decl in namespaces or vtables - chain, if conditions match. - (walk_vtables): New function. - (walk_namespaces_r): Travers separate namespace chain - for namespace decls. - (wrapup_globals_for_namespace): Use names_size instead - of list_length(). - * cp/decl2.c (finish_file): Use walk_vtables() instead of - walk_globals() to walk vtable decls. - -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 bitfield 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 Kazu Hirata - - * function.c (max_parm_reg_num): Remove. - * stmt.c (in_control_zone_p, stmt_loop_nest_empty, - drop_through_at_end_p, move_cleanups_up, - expand_end_case_dummy, case_index_expr_type): Likewise. - * stor-layout.c (pos_from_byte): Likewise. - * tree.c (chain_member_value, chain_member_purpose, listify, - tree_int_cst_msb, index_type_equal): Likewise. - * tree.h: Remove prototypes for unused functions. - -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. - -Tue Sep 17 13:58:04 2002 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. - -Tue Sep 17 13:40:13 2002 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 Volker Reichelt - - * config/mips/mips.c (save_restore_insns): Remove unused variable. - * gcc.c (make_relative_prefix): Likewise. - * loop.c (check_final_value): Likewise. - * jump.c (init_label_info): Remove return value. - * cse.c (prev_insn): Move variable between #ifdef HAVE_cc0 ... #endif. - -2002-09-16 Kaveh R. Ghazi - - * dsp16xx.h (ASM_FORMAT_PRIVATE_NAME): Delete. - (ASM_PN_FORMAT): Define. - -2002-09-16 Kaveh R. Ghazi - - * alpha.h, alpha/vms.h, arc.h, arm/aof.h, arm/aout.h, avr.h, - c4x.h, cris.h, d30v.h, fr30.h, frv.h, h8300.h, i370.h, i386.h, - i960.h, ia64.h, ip2k.h, m32r.h, m68hc11.h, m68k/3b1.h, - m68k/hp320.h, m68k.h, m68k/mot3300.h, m68k/sgs.h, m68k/tower-as.h, - m88k.h, mcore.h, mips.h, mmix.h, mn10200.h, mn10300.h, ns32k.h, - pa.h, pdp11.h, romp.h, rs6000.h, s390/linux.h, sh.h, sparc.h, - stormy16.h, v850.h, vax.h, xtensa.h (ASM_FORMAT_PRIVATE_NAME): - Delete. - * alpha/vms.h, h8300.h, i370.h, ia64.h, m68k/3b1.h, m68k/hp320.h, - m68k/mot3300.h, m68k/sgs.h, m68k/tower-as.h, mmix.h, mn10200.h, - mn10300.h, pa.h, v850.h (ASM_PN_FORMAT): Define. - - * defaults.h (ASM_PN_FORMAT, ASM_FORMAT_PRIVATE_NAME): Define. - * doc/tm.texi (ASM_FORMAT_PRIVATE_NAME): Update documentation. - -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 Kaveh R. Ghazi - - * Makefile.in (vmsdbgout.o): Depend on $(TARGET_H) - * vmsdbgout.c: Include "target.h". - -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 Kaveh R. Ghazi - - * c-lex.c (cb_ident): Mark variable with ATTRIBUTE_UNUSED. - * collect2.c (ignore_library, aix_std_libs): Move into the context - where it is used. - * m68hc11.c (m68hc11_autoinc_compatible_p): Delete prototype. - (autoinc_mode, m68hc11_make_autoinc_notes): Add prototypes. - * m88k.c (output_call): Wrap variables with macro controlling use. - * rs6000.md: Likewise. Const-ify variable. - * sh.h (ASM_OUTPUT_LABELREF): Likewise. - * final.c (only_leaf_regs_used): Likewise. - * regrename.c (maybe_mode_change): Mark parameter with - ATTRIBUTE_UNUSED. - * reload.c (find_valid_class): Likewise. Likewise for variable. - (find_reloads_address_1): Likewise. - * varasm.c (weak_finish): Wrap variable with macro controlling use. - -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 Roger Sayle - - * stmt.c (struct nexting): Remove unused alt_end_label field. - (expand_start_loop): Delete initialization of alt_end_label. - (expand_start_null_loop): Likewise. - (expand_exit_loop_if_false): Delete updating of alt_end_label. - -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 Volker Reichelt - - * genattrtab.c (simplify_cond): Remove unused variable(s). - * global.c (record_conflicts): Likewise. - * jump.c (rebuild_jump_labels): Likewise. - * loop.c (scan_loop, check_final_value): Likewise. - * ra-colorize.c (colorize_one_web, assign_colors): Likewise. - * reload1.c (eliminate_regs_in_insn, do_input_reload): Likewise. - * rtlanal.c (reg_set_p): Likewise. - * stmt.c (expand_asm_operands, expand_decl): Likewise. - * genautomata.c (empty_reserv): Remove. - * loop.c (max_luid): Likewise. - * sched-rgn.c (bitlst_table_size): Likewise. - -2002-09-11 Nathan Sidwell - - Reimplement gcov format. - * gcov-io.h: Replace. - * gcov.c: Reimplement. - * gcov-iov.c: New file. - * gcov-dump.c: New file. - * libgcc2.c (L_bb): Replace with ... - (L_gcov): ... this. - (struct bb_function_info, struct bb): Remove. - (inhibit_libc): Never inhibit. - (gcov_list, gcov_crc): New static variables. - (gcov_version_mismatch): New static function. - (__bb_exit_func): Renamed to ... - (__gcov_exit): ... here. Made static. Reimplement. - (__gcov_init_func): Rename to ... - (__gcov_init): ... here. Check version, update crc. - (__bb_fork_func): Rename to ... - (__gcov_flush): ... here. - * libgcc2.h (struct bb, __bb_exit_func, __bb_init_func, - __bb_fork_func, gcov_type, __bb_find_arc_counters): Remove. - * calls.c (expand_call): Call __gcov_flush. - * profile.c (bb_file, last_bb_file_name): Remove. - (bbg_file_name): New global variable. - (output_gcov_string): Remove. - (get_exec_counts): Reimplement. - (branch_prob): Reimplement gcov file writing. - (init_branch_prob): Create bbg_file_name, don't create - bb_file_name. - (end_branch_prob): Adjust. Don't remove counter file when - instrumenting ourselves. - (create_profiler): Adjust. - * doc/gcov.texi (Gcov Data Files): Remove detailed specification, - point to gcov-io.h. - * Makefile.in (LANGUAGES): Add gcov-dump. - (coverageexts): Remove .bb. - (STAGESTUFF): Add gcov-dump. - (LIB2FUNCS_ST): Replace _bb with _gcov. - (profile.o): Depend on gcov-iov.h. - (final.o): Don't depend on profile.h, gcov.h. - (gcov.o): Depend on gcov-iov.h. - (gcov-iov.o): New target. - (gcov-iov): New target. - (gcov-iov.h): New target. - (gcov-dump.o): New target. - (GCOV_DUMP_OBJS): New variable. - (gcov-dump): New target. - (distclean): Remove coverageexts. - (stage1): Remove coverageexts. - -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 Kaveh R. Ghazi - - * h8300.md: Fix signed/unsigned warnings. - * mcore.md: Likewise. - * mn10300.c (mask_ok_for_mem_btst): Likewise. - -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 Nathan Sidwell - - * basic_block.h (gcov_type): Explain why it is signed. - * final.c: Don't include profile.h. - (struct function_list, functions_head, functions_tail, - end_final): Moved to profile.c - (final): Move arc chaining code to profile.c. - * function.c (prepare_function_start): Remove duplicate line. - * output.h (end_final): Remove prototype. - * predict.c (estimate_loops_at_level): Use gcov_type. - * profile.c (struct function_list, functions_head, - functions_tail): Moved from final.c - (need_func_profiler): Remove. - (instrument_edges): Don't set need_func_profiler. - (get_exec_counts): Avoid signed/unsigned warning. - (compute_checksum): Use crc32. - (branch_prob): Adjust. Chain onto functions_head. - (init_branch_prob): Absorb init_edge_profiler. - (init_edge_profiler): Remove. - (create_profiler): Moved and renamed from final.c:end_final. - Emit data and constructor. - (output_func_start_profiler): Remove. - * profile.h (struct profile_info): checksum is unsigned. - * rtl.h (output_func_start_profiler): Remove prototype. - (create_profiler): Declare. - * toplev.c (compile_file): Call create_profiler, if instrumenting - arcs. Don't call end_final. - -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 Igor Shevlyakov - - * machmode.def: Add modes for half-float vectors. - -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. - -Fri Sep 6 13:10:08 2002 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. - -Fri Sep 6 16:35:32 2002 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. - -Fri Sep 6 16:17:33 2002 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. - -Thu Sep 5 16:27:47 2002 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 Volker Reichelt - - * c-typeck.c (build_function_call): Remove unused variable(s). - (build_c_cast): Likewise. - * calls.c (rtx_for_function_call): Likewise. - * cfglayout.c (duplicate_insn_chain): Likewise. - * cfgloop.c (flow_loop_nodes_find): Likewise. - * cfgrtl.c (split_edge): Likewise. - * df.c (df_ref_create): Likewise. - * except.c (expand_end_catch): Likewise. - * expr.c (emit_push_insn, store_constructor, expand_expr): Likewise. - * function.c (emit_return_into_block): Likewise. - (reposition_prologue_and_epilogue_notes): Likewise. - * gengtype.c (get_file_basename, write_gc_structure_fields): Likewise. - * combine.c (subst_prev_insn, need_refresh): Remove. - * dwarf2out.c (primary_filename): Remove. - * final.c (new_block): Remove. - * gcse.c (orig_bb_count): Remove. - -2002-09-04 Kaveh R. Ghazi - - * dsp16xx-protos.h (dsp16xx_compare_gen): Change to bool. - * dsp16xx.c (dsp16xx_compare_gen): Likewise. - * dsp16xx.md: Treat dsp16xx_compare_gen as a bool. Call functions - directly instead of using a function pointer. - -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. - -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-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. - -Wed Sep 4 18:48:10 2002 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. - -Wed Sep 4 11:22:14 2002 J"orn Rennecke - - * sh.md (mperm_w_little, mperm_w_big): Supply mode for zero_extract. - -2002-09-03 Roger Sayle - - * builtins.c (build_function_call_expr): Remove prototype, export - as non-static and add a comment above function definition. - (builtin_mathfn_code): New function to check for math builtins. - (fold_builtin): Optimize sqrt(0.0) as 0.0, sqrt(1.0) as 1.0, - exp(0.0) as 1.0, and log(1.0) as 0.0. Optimize exp(log(x)) and - log(exp(x)) as x. Optimize sqrt(exp(x)) as exp(x/2.0) and - log(sqrt(x)) as log(x)/2.0. - - * tree.h: Prototype build_function_call_expr and builtin_mathfn_code - in new "builtins.c" section. Place the build_range_type prototype - with the other prototypes from "tree.c". - - * fold-const.c (fold) [ABS_EXPR]: Fold fabs(sqrt(x)) as sqrt(x) - and fabs(exp(x)) as exp(x). [MULT_EXPR]: Fold sqrt(x)*sqrt(y) - as sqrt(x*y) and exp(x)*exp(y) as exp(x+y). [RDIV_EXPR]: Fold - x/exp(y) as x*exp(-y). - -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. - -Tue Sep 3 11:32:14 2002 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-09-02 Nathan Sidwell - - * stor-layout (finish_builtin_struct): Renamed and moved from c++ - frontend. Take chain of fields. Allow NULL alignment type. - * tree.h (finish_builtin_struct): Declare. - -2002-09-01 Kaveh R. Ghazi - - * config/alpha/alpha.c config/alpha/alpha.h config/alpha/alpha.md - config/alpha/elf.h config/alpha/unicosmk.h config/alpha/vms.h - config/arc/arc.c config/arc/arc.h config/arm/aout.h - config/arm/arm.c config/arm/arm.h config/arm/arm.md - config/avr/avr.h config/d30v/d30v.h config/dbxcoff.h - config/dbxelf.h config/elfos.h config/fr30/fr30.h config/frv/frv.h - config/i386/i386.c config/i386/i386.md config/i386/sco5.h - config/ia64/ia64.h config/ip2k/ip2k.h config/m68hc11/m68hc11.md - config/m68k/hp320.h config/m68k/m68k.c config/m68k/m68k.md - config/m68k/mot3300.h config/m68k/sgs.h config/m68k/tower-as.h - config/m88k/m88k.c config/m88k/m88k.h config/mcore/mcore-pe.h - config/mcore/mcore.c config/mips/mips.c config/mips/mips.h - config/ns32k/ns32k.md config/pa/pa-linux.h config/pa/pa.c - config/pa/pa.h config/pa/pa.md config/romp/romp.h - config/rs6000/linux64.h config/rs6000/lynx.h - config/rs6000/rs6000.c config/rs6000/sysv4.h config/rs6000/xcoff.h - config/s390/s390.c config/s390/s390.md config/sh/sh.c - config/sparc/sparc.c config/sparc/sysv4.h - config/stormy16/stormy16.h dbxout.c defaults.h dwarf2out.c - dwarfout.c except.c final.c varasm.c vmsdbgout.c: Replace - ASM_OUTPUT_INTERNAL_LABEL macro with a call to the target hook. - - * doc/tm.texi: Update docs. - * default.h (ASM_OUTPUT_INTERNAL_LABEL): Don't define. - * system.h (ASM_OUTPUT_INTERNAL_LABEL): Poison. - -2002-08-31 Kaveh R. Ghazi - - * Makefile.in (sdbout.o, insn-output.o): Depend on $(TARGET_H). - * arc.c (arc_internal_label): New function. - (TARGET_ASM_INTERNAL_LABEL): Set. - * arc.h (ASM_OUTPUT_INTERNAL_LABEL): Delete. - * arm.c (arm_internal_label): New function. - (TARGET_ASM_INTERNAL_LABEL): Set. - * arm.h (ASM_OUTPUT_INTERNAL_LABEL): Delete. - * arm/elf.h (ASM_OUTPUT_INTERNAL_LABEL): Delete. - * i370.c (i370_internal_label): New function. - (TARGET_ASM_INTERNAL_LABEL): Set. - * i370.h (ASM_OUTPUT_INTERNAL_LABEL): Delete. - * m68k/hp320.h (ASM_OUTPUT_INTERNAL_LABEL): Delete. - * m68k.c (m68k_hp320_internal_label): New function. - (TARGET_ASM_INTERNAL_LABEL): Set. - * m88k.c (m88k_internal_label): New function. - (TARGET_ASM_INTERNAL_LABEL): Set. - * m88k.h (ASM_OUTPUT_INTERNAL_LABEL): Delete. - * defaults.h (ASM_OUTPUT_INTERNAL_LABEL): Set to target hook. - * genoutput.c (output_prologue): Include target.h in output file. - * output.h (default_internal_label): Declare. - * sdbout.c: Include target.h. - * target-def.h (TARGET_ASM_INTERNAL_LABEL): Set and add to - TARGET_ASM_OUT. - * target.h (internal_label): Add to struct gcc_target. - * varasm.c (default_internal_label): New function. - -2002-08-31 Kaveh R. Ghazi - - * alpha.h (ASM_OUTPUT_INTERNAL_LABEL): Delete. - * avr.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * c4x.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * cris.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * d30v.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * darwin.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * dsp16xx.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * elfos.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * h8300.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * i386/att.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * i386/bsd.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * i386/i386-coff.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * i386/lynx-ng.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * i386/lynx.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * i386/sco5.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * i960/i960.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k/3b1.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k/amix.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k/atari.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k/mot3300.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k/tower-as.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m88k.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * mcore.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * mips.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * mmix-protos.h (mmix_asm_output_internal_label): Likewise. - * mmix.c (mmix_asm_output_internal_label): Likewise. - * mmix.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * ns32k.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * pa.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * pdp11.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * romp.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * rs6000/xcoff.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sh/coff.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sh/elf.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc/freebsd.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc/linux.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc/linux64.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc/netbsd-elf.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc/pbd.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc/sol2.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * sparc/vxsim.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * stormy16.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * svr3.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * vax.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - - * defaults.h (ASM_OUTPUT_INTERNAL_LABEL): Define. - -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. - -Fri Aug 30 00:33:37 2002 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-29 Zack Weinberg - - * config/rs6000/rs6000.c (processor_target_table): Add 405f. - * config/rs6000/rs6000.h (ASM_CPU_SPEC): Likewise. - -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. - -Wed Aug 28 15:35:17 2002 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. - -Tue Aug 27 23:03:52 2002 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. - -Tue Aug 27 18:30:47 2002 J"orn Rennecke - Aldy Hernandez - - * doc/tm.texi: Applied numerous fixes to the automaton based - scheduler descrition. - -Tue Aug 27 19:51:05 CEST 2002 Jan Hubicka - - * i386.c (classify_argument): Handle variable sized objects. - -Tue Aug 27 19:18:16 CEST 2002 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Fix RTL sharing problem - -Tue Aug 27 18:01:45 CEST 2002 Jan Hubicka - - * libgcc2.c (__bb_exit_func): Properly write the summarized statistics. - -Tue Aug 27 18:00:11 CEST 2002 Jan Hubicka - - * i386.c (classify_argument): Properly compute word size of the analyzed object. - -Tue Aug 27 14:39:09 2002 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. - -Tue Aug 27 13:53:57 2002 J"orn Rennecke - - * sh.h (MAX_FIXED_MODE_SIZE): Define. - -2002-08-27 Gabriel Dos Reis - - * doc/cpp.texi (Common Predefined Macros): Don't mess with table - delimiter. - -2002-08-27 Gabriel Dos Reis - - * c-common.c (cpp_define_data_format): New function. - (cb_register_builtins): Call it. - - * doc/cpp.texi (Common Predefined Macros): Document - __TARGET_BITS_ORDER__, __TARGET_BYTES_ORDER__, - __TARGET_INT_WORDS_ORDER__, __TARGET_FLOAT_WORDS_ORDER__, - __TARGET_FLOAT_FORMAT__, __TARGET_USES_VAX_F_FLOAT__, - __TARGET_USES_VAX_D_FLOAT__, __TARGET_USES_VAX_G_FLOAT__, - __TARGET_USES_VAX_H_FLOAT__. - -2002-08-26 Ziemowit Laski - - * objc/objc-act.c (get_super_receiver): If inside a class method - of a category, cast the receiver to 'id' before accessing the 'isa' - field so that is not needed. For NeXT runtime. - -2002-08-26 Ulrich Weigand - - * config/s390/s390-protos.h (s390_function_prologue, - s390_function_epilogue): Remove. - config/s390/s390.c (s390_function_prologue, s390_function_epilogue, - TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE): Remove. - - config/s390/s390.c (s390_machine_dependent_recorg): New function. - config/s390/s390-protos.h (s390_machine_dependent_reorg): Declare it. - config/s390/s390.h (MACHINE_DEPENDENT_REORG): Call it. - config/s390/s390.c (s390_split_branches, s390_chunkify_pool): Adapt - to being called from MACHINE_DEPENDENT_REORG. Update regs_ever_live. - - config/s390/s390.c (s390_frame_info): Inline save_fprs_p. Always - assume BASE_REGISTER and RETURN_REGNUM need to be saved. - (s390_emit_prologue): Assume RETURN_REGNUM to be saved iff - function is not a leaf function. Use save_gprs and restore_gprs. - (s390_emit_epilogue): Likewise. - (save_gprs, restore_gprs): New functions. - (struct s390_frame): Remove return_reg_saved_p member. - (save_fprs_p): Remove. - (s390_optimize_prolog): New function. - (s390_legitimate_reload_constant): Remove now unnecessary check. - - (s390_function_count): Remove. - (s390_output_symbolic_const): Replace s390_function_count by - current_function_funcdef_no. - (s390_output_constant_pool): Likewise. - - (legitimize_pic_address): Use regs_ever_live to track PIC register - instead of current_function_uses_pic_offset_table. - (s390_emit_prologue): Likewise. - config/s390/s390.md ("call", "call_value"): Likewise. - -2002-08-26 Neil Booth - - * c-opts.c (find_opt): Don't complain about wrong languages - here. Return exact matches even for wrong language. - (c_common_decode_option): Complain about wrong languages - here. - -2002-08-24 Stuart Hastings - - * function.h (struct function): Add flag - all_throwers_are_sibcalls. - * except.c (set_nothrow_function_flags): Replaces - nothrow_function_p. Set new flag. - * except.h (set_nothrow_function_flags): Replaces - nothrow_function_p. - * dwarf2out.c (struct dw_fde_struct): Add flag - all_throwers_are_sibcalls. - (output_call_frame_info): Test it. - (dwarf2out_begin_prologue) Propagate it from cfun to - dw_fde_struct. - * toplev.c (rest_of_compilation): Update calls to - nothrow_function_p. - -2002-08-23 Zack Weinberg - - * ggc-page.c (compute_inverse): Short circuit calculation for - object sizes larger than half a page. - -2002-08-23 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_elf_select_section): Treat - DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly - default. - (rs6000_elf_unique_section): Likewise. - -2002-08-23 Kaveh R. Ghazi - - * ns32k.c (ns32k_globalize_label): Delete. - * ns32k.h (ASM_OUTPUT_LABEL, TARGET_ASM_GLOBALIZE_LABEL): Delete. - -2002-08-23 Alan Modra - - * config/rs6000/rs6000.c (output_mi_thunk): Don't determine insns - for loading delta with num_insns_constant_wide. Calculate - delta_low, delta_high without using a conditional. - -2002-08-22 Jason Merrill - - * c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR. - * c-common.def: Adjust. - * c-dump.c (c_dump_tree): Adjust. - * c-semantics.c (genrtl_return_stmt): Adjust. - * c-pretty-print.c (pp_c_statement): Adjust. - * tree-inline.c (copy_body_r): Adjust. - -2002-08-22 Zack Weinberg - - * ggc-page.c: Avoid division in ggc_set_mark. - (DIV_MULT, DIV_SHIFT, OFFSET_TO_BIT, inverse_table, - compute_inverse): New. - (ggc_set_mark, ggc_marked_p): Use OFFSET_TO_BIT. - (init_ggc): Initialize inverse_table. - -2002-08-22 Tom Tromey - - * doc/install.texi (Configuration): Document --datadir. - -2002-08-22 Alexandre Oliva - - * Makefile.in ($(BUILD_PREFIX_1)varray.o): Depend on $(GGC_H). - -2002-08-22 Hans-Peter Nilsson - - * gengtype-lex.l (ID): Allow underscore as first character. - -2002-08-21 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_xcoff_asm_globalize_label): New - function. - (rs6000_xcoff_asm_named_section): Rename. - * config/rs6000/xcoff.h (TARGET_ASM_GLOBALIZE_LABEL): Define. - -2002-08-21 Tom Tromey - - For PR java/6005 and PR java/7611: - * fold-const.c (fold_truthop): Use can_use_bit_fields_p. - (fold): Likewise. - * langhooks.c (lhd_can_use_bit_fields_p): New function. - * langhooks-def.h (lhd_can_use_bit_fields_p): Declare. - (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): New define. - (LANG_HOOKS_INITIALIZER): Use it. - * langhooks.h (struct lang_hooks) [can_use_bit_fields_p]: New - field. - -2002-08-21 Stan Shebs - - * tree.c (finish_vector_type): Fix a typo in a comment. - * Makefile.in: Fix "the the" stutters in comments. - * genautomata.c: Ditto. - * ifcvt.c: Ditto. - * regrename.c: Ditto. - * config/alpha/alpha.c: Ditto. - * config/alpha/vms-crt0-64.c: Ditto. - * config/alpha/vms-crt0.c: Ditto. - * config/alpha/vms-psxcrt0-64.c: Ditto. - * config/alpha/vms-psxcrt0.c: Ditto. - * config/d30v/d30v.h: Ditto. - * config/fr30/fr30.h: Ditto. - * config/rs6000/rs6000.c: Ditto. - * config/stormy16/stormy16.h: Ditto. - * doc/md.texi: Ditto. - -2002-08-21 John David Anglin - - * cppinit.c (remove_dup_nonsys_dirs): Fix warning and return value. - -2002-08-21 Joseph S. Myers - - * c-decl.c (grokdeclarator): Make invalid combinations with long, - short, signed or unsigned into hard errors. Fixes PR c/4319. - Also make duplicate modifiers such as "short short" into hard - errors. - -2002-08-21 Andrew Pinski - Kaveh R. Ghazi - - * doc/tm.texi (TARGET_ASM_GLOBALIZE_LABEL): Move '@end deftypefn' - to the actual end. Add '@end table' and '@table @code'. - -2002-08-20 Geoffrey Keating - - * doc/tm.texi (Label Output): Add missing '@end deftypefn'. - - * unroll.c (biv_total_increment): Don't try to compute the total - increment for FP BIVs. - -2002-08-20 Kaveh R. Ghazi - - * alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk. - * alpha/elf.h (ASM_OUTPUT_EXTERNAL_LIBCALL, - ASM_OUTPUT_ALIGNED_BSS): Use target hook. - * alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS): Likewise. - * alpha/unicosmk.h (ASM_GLOBALIZE_LABEL): Delete. - * arm/aof.h (ASM_GLOBALIZE_LABEL): Likewise. - (GLOBAL_ASM_OP): Define. - * arm.c (aof_globalize_label): New function. - (TARGET_ASM_GLOBALIZE_LABEL): Define for AOF. - * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. - * c4x.c (c4x_globalize_label): New function. - (TARGET_ASM_GLOBALIZE_LABEL): Define for c4x. - * c4x.h (ASM_GLOBALIZE_LABEL): Delete. - (GLOBAL_ASM_OP): Define. - * cris/aout.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. - * darwin-protos.h (darwin_globalize_label): Declare. - * darwin.c (darwin_globalize_label): New function. - * darwin.h (ASM_DECLARE_CLASS_REFERENCE): Use target hook. - (ASM_GLOBALIZE_LABEL): Delete. - (GLOBAL_ASM_OP, TARGET_ASM_GLOBALIZE_LABEL): Define. - * dsp16xx.c (asm_output_common): Use target hook. - * elfos.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. - * frv.h (ASM_GLOBALIZE_LABEL): Delete. - (GLOBAL_ASM_OP): Define. - * i370.c (i370_globalize_label): New function. - (TARGET_ASM_GLOBALIZE_LABEL): Define for i370. - * i370.h (ASM_GLOBALIZE_LABEL): Delete. - * i386.c (ix86_asm_file_end): Use target hook. - * i386/sco5.h (ASM_GLOBALIZE_LABEL): Don't undef. - (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. - * ia64.c (ia64_asm_output_external): Likewise. - * ia64/sysv4.h: Update comment. - * m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. - * mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * mips/iris5.h (ASM_OUTPUT_WEAK_ALIAS): Use target hook. - * mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use target hook. - * mmix-protos.h (mmix_asm_globalize_label): Delete. - * mmix.c (mmix_asm_globalize_label): Likewise. - * mmix.h (ASM_GLOBALIZE_LABEL): Likewise. - (GLOBAL_ASM_OP): Define. - * ns32k.c (ns32k_globalize_label): New function. - * ns32k.h (TARGET_ASM_GLOBALIZE_LABEL): Define for ns32k. - (ASM_GLOBALIZE_LABEL): Delete. - * pa/pa-linux.h (ASM_GLOBALIZE_LABEL): Don't undef. - (TARGET_ASM_GLOBALIZE_LABEL): Undefine. - * pa.c (pa_globalize_label): New function. - * pa.h (ASM_GLOBALIZE_LABEL): Delete. - (TARGET_ASM_GLOBALIZE_LABEL): Define for pa. - * rs6000/darwin.h (ASM_GLOBALIZE_LABEL): Delete. - (GLOBAL_ASM_OP): Define. - (TARGET_ASM_GLOBALIZE_LABEL): Undef. - * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. - * rs6000/xcoff.h (ASM_GLOBALIZE_LABEL): Delete. - (GLOBAL_ASM_OP): Define. - * v850.c (v850_output_aligned_bss): Use target hook. - * vax.c (vms_globalize_label): New function. - (TARGET_ASM_GLOBALIZE_LABEL): Define for vms. - * vax/vms.h (ASM_GLOBALIZE_LABEL): Delete. - (GLOBAL_ASM_OP): Define. - * defaults.h (ASM_GLOBALIZE_LABEL): Delete. - * doc/tm.texi: Update docs. - * dwarf2out.c (default_eh_frame_section, output_die_symbol): Use - target hook. - * final.c (output_alternate_entry_point): Likewise. - * hooks.c (hook_FILEptr_constcharptr_void): New function. - * hooks.h (hook_FILEptr_constcharptr_void): Declare. - * output.h (assemble_global): Delete. - (default_globalize_label): Declare. - * system.h (ASM_GLOBALIZE_LABEL): Poison. - * target-def.h (TARGET_ASM_GLOBALIZE_LABEL): Define. - (TARGET_ASM_OUT): Add TARGET_ASM_GLOBALIZE_LABEL. - * target.h (gcc_target): Add globalize_label member. - * varasm.c (asm_output_bss, asm_output_aligned_bss, - globalize_decl): Use target hook. - (assemble_global): Delete. - (default_globalize_label): New function. - -2002-08-20 Kaveh R. Ghazi - - * dsp16xx.h (dsp16xx_umulhi3_libcall): Delete. - -2002-08-20 Devang Patel - * tree.c (get_qualified_type): Add TYPE_CONTEXT check. - -2002-08-20 Kaveh R. Ghazi - - * arc.c (output_shift): Use stdio instead of asm_fprintf. - * arm.c (thumb_output_function_prologue): Likewise. - * avr.c (print_operand): Likewise. - * c4x.c (c4x_print_operand): Likewise. - * c4x.h (ASM_OUTPUT_INTERNAL_LABEL, TRAMPOLINE_TEMPLATE, - ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Likewise. - * cris.c (cris_target_asm_function_prologue, - cris_asm_output_mi_thunk): Likewise. - * h8300.c (print_operand): Likewise. - * h8300.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. - * ip2k.c (print_operand): Likewise. Fix format specifier. - * m68hc11.c (asm_print_register, print_operand, - print_operand_address): Use stdio instead of asm_fprintf. - (print_operand_address): Fix format specifier. - * m68hc11.h (FUNCTION_PROFILER, ASM_OUTPUT_ADDR_DIFF_ELT, - ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ALIGN): Use stdio instead of - asm_fprintf. - * m68k/amix.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k/atari.h (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - * m68k.c (m68k_output_function_prologue, - m68k_output_function_epilogue, print_operand): Likewise. - * mmix.c (mmix_asm_output_mi_thunk, mmix_asm_weaken_label): - Likewise. Fix format specifier. - * mn10200.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. - * mn10300.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. - * v850.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise. - -2002-08-15 Eric Christopher - Jeff Knaggs - - * config.gcc (mipsisa64sr71k-elf): New target. - * config/mips/sr71k.md: New file. - * config/mips/mips.md: Use it. - (rot*): Add sr71k specifics. - * config/mips/t-sr71k: New file. - * config/mips/mips.h (sr71k): New cpu. - (TARGET_SR71K): Use it. - (TUNE_SR71K): Ditto. - (GENERATE_BRANCHLIKELY): Ditto. - (ISA_HAS_MULHI, ISA_HAS_MULS, ISA_HAS_MSAC, ISA_HAS_MACC, - ISA_HAS_ROTR_SIISA_HAS_ROTR_DI): Ditto. - * config/mips/mips.c (sr71k): New cpu. - (mips_use_dfa_pipeline_interface): Use. - -2002-08-15 Eric Christopher - Richard Sandiford - Aldy Hernandez - Graham Stott - Michael Meissner - Gavin Romig-Koch - Ken Raeburn - Alexandre Oliva - - * config.gcc (mips64vr-elf): New target. - * config/mips/5400.md: New file. - * config/mips/5500.md: Ditto. - * config/mips/mips.md: Use them. - (frsqrt): New. - * config/mips/mips.c (vr4111, vr4121, vr4320, vr5400, vr5500): New - cpus. - (mips_issue_rate): Use them. - (mips_use_dfa_pipeline_interface): New function. Use for 5400 and 5500. - (TARGET_SCHEDUSE_DFA_PIPELINE_INTERFACE): Define. Use above. - * config/mips/mips.h (vr4111, vr4121, vr4320, vr5400, vr5500): New - cpus. - (TARGET_MIPSx): Use them. - (TUNE_MIPSx): Ditto. - (GETNATE_MULT3_SI): Ditto. - (ISA_HAS_BRANCHLIKELY): Ditto. - (ISA_HAS_CONDMOVE): Ditto. - (ISA_HAS_NMADD_NMSUB): Ditto. - (ISA_HAS_MULHI): New. Ditto. - (ISA_HAS_MULS): Ditto. - (ISA_HAS_MSAC): Ditto. - (ISA_HAS_MACC): Ditto. - (ISA_HAS_ROTR_SI): Ditto. - (ISA_HAS_ROTR_DI): Ditto. - (RTX_COSTS): Use. - -2002-08-20 John David Anglin - - * cppinit.c (remove_dup_dir): Add head_ptr argument to handle removal - at head. - (remove_dup_nonsys_dirs): New function. - (remove_dup_dirs): Change argument head to head_ptr. Remove warnings. - (merge_include_chains): Remove non-system include directories from - quote and bracket include chains when they duplicate equivalent system - directories. - * doc/cpp.texi (-I): Update. - * doc/cppopts.texi (-I): Update. - * doc/install.texi (--with-local-prefix): Further document usage of - this option. - * doc/invoke.texi (-I): Update. - -2002-08-20 Richard Henderson - - * expr.c (TARGET_MEM_FUNCTIONS): Transform to boolean. - (emit_block_move): Split out subroutines. - (emit_block_move_via_movstr): New. - (emit_block_move_via_libcall): New. Emit bcopy via normal call also. - (emit_block_move_libcall_fn): New. Construct function prototype for - bcopy as well. - (clear_storage): Split out subroutines. - (clear_storage_via_clrstr): New. - (clear_storage_via_libcall): New. Emit bzero as a normal call also. - (clear_storage_libcall_fn): New. Construct function prototype for - bzero as well. - (emit_push_insn): Use emit_block_move. - (expand_assignment): Booleanize TARGET_MEM_FUNCTIONS. - (store_constructor): Likewise. - -2002-08-19 Ziemowit Laski - - * objc/objc-act.c (building_objc_message_expr): Rename to - current_objc_message_selector. - -2002-08-19 Ziemowit Laski - - * objc/objc-act.c (build_ivar_chain): Remove. - (objc_copy_list): Likewise. - (get_class_ivars): Inline call to removed build_ivar_chain - function. Save off a clean copy of ivars in the CLASS_OWN_IVARS - slot; use that slot (rather than CLASS_IVARS) when accessing - ivars for base classes. Call copy_list and chainon instead of - objc_copy_list. - (build_private_template): Call get_class_ivars instead of - build_ivar_chain. - (start_class): Allocate room for the CLASS_OWN_IVARS slot. - (continue_class): Call get_class_ivars instead of - build_ivar_chain. - (encode_field_decl): Check for DECL_BIT_FIELD_TYPE instead - of DECL_BIT_FIELD (which may have been cleared). - * objc/objc-act.h (CLASS_OWN_IVARS): New accessor macro. - -2002-08-19 Kaveh R. Ghazi - - * genautomata.c (output_translate_vect, output_state_ainsn_table, - output_min_issue_delay_table): Mark variable with ATTRIBUTE_UNUSED - in output file. - (output_internal_min_issue_delay_func): Initialize variable in - output file. - -2002-08-19 Alexandre Oliva - - * Makefile.in (GCC_FOR_TARGET): Prepend STAGE_CC_WRAPPER. - (stage2_build, stage3_build, stage4_build): Likewise, to CC. - -2002-08-19 Geoffrey Keating - Steve Ellcey - - * machmode.h (SCALAR_INT_MODE_P): New macro to test for - scaler integer mode (MODE_INT or MODE_PARTIAL_INT). - * explow.c (trunc_int_for_mode): Abort when the mode is not - a scaler integer mode. - * combine.c (expand_compound_operation): Don't expand Vector - or Complex modes into shifts. - (expand_field_assignment): Don't do bitwise arithmatic and - shifts on Vector or Complex modes. - (simplify_comparison): Don't call trunc_int_for_mode - for VOIDmode. - * recog.c (general_operand): Likewise. - (immediate_operand): Likewise. - (nonmemory_operand): Likewise. - -2002-08-19 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_emit_set_const): Inline - multi-instruction SImode constant. Add REG_EQUAL note. - * config/rs6000/rs6000.md (movsi splitter): Use - rs6000_emit_set_const. - -2002-08-19 Kaveh R. Ghazi - - * tree-inline.c (initialize_inlined_parameters): Wrap variable in - the macro test controlling its use. - -2002-08-18 H.J. Lu (hjl@gnu.org) - - * config.gcc (*-*-linux*): Set extra_parts="crtbegin.o - crtbeginS.o crtbeginT.o crtend.o crtendS.o", gas=yes and - gnu_ld=yes. - (alpha*-*-linux*, cris-*-linux*, i370-*-linux*, - i[34567]86-*-linux*, x86_64-*-linux*, mips*-*-linux*, - s390-*-linux*, s390x-*-linux*, sparc-*-linux*, sparc64-*-linux*, - xtensa-*-linux*): Remove setting extra_parts, gas, and gnu_ld - here. - (cris-*-linux*): Remove setting thread_file here. - -2002-08-18 Neil Booth - - PR preprocessor/7602 - * cppinit.c (path_include): Treat the system environment - variables as being cxx_aware. - -2002-08-17 Joseph S. Myers - - * c-decl.c (flexible_array_type_p): New function. - (grokdeclarator, finish_struct): Use it. - * doc/extend.texi: Document constraints on use of structures with - flexible array members. - -2002-08-17 Richard Sandiford - - * config/mips/t-coff, config/mips/t-elf, config/mips/t-isa3264, - config/mips/t-r3900 (MULTILIB_MATCHES): Define. - * config/mips/mips.h (ASM_SPEC): Use %(endian_spec). - -2002-08-16 Stan Shebs - - * c-common.c (cb_register_builds): Define __NEXT_RUNTIME__ - for ObjC with -fnext-runtime. - * doc/cpp.texi: Document it. - -2002-08-16 Janis Johnson - - * doc/install.texi (Final installation): Replace links to individual - build status pages with a link to a common page that lists them all. - -2002-08-16 Sylvain Pion - - * doc/invoke.texi: Fix typo. - -2002-08-16 David Edelsohn - - * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning. - -2002-08-16 Andrew Haley - - * tree-inline.c: Add includes for Java inliner. - (remap_decl): Don't handle anonymous types for Java. - (remap_block): Add handling for Java trees. - (copy_scope_stmt): Conditionalize for non-Java use only. - (copy_body_r): Handle Java trees. Add handling for - LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, Java blocks. - (initialize_inlined_parameters): Handle Java trees. - (declare_return_variable): Likewise. - (expand_call_inline): Handle Java trees. - (walk_tree): Likewise. - (copy_tree_r): Don't handle SCOPE_STMTs for Java. - (add_stmt_to_compound): New function. - -2002-08-15 Richard Henderson - - * Makefile.in (LOOSE_WARN): Remove -fno-common. - (NOCOMMON_FLAG): New substitution point. - (GCC_WARN_CFLAGS): Include it. - * configure.in (ac_checking): Set nocommon_flag. - (nocommon_flag): New substitution point. - -2002-08-15 Alexandre Oliva - - * c-tree.h (skip_evaluation): Move declaration... - * c-common.h: ... here. - * c-typeck.c (build_external_ref): Don't assemble_external nor - mark a tree as used if skip_evaluation is set. - * c-parse.in (typeof): New non-terminal to set skip_evaluation - around TYPEOF. - (typespec_nonreserved_nonattr): Use it. - -2002-08-15 Douglas B Rupp - - * dbxout.c (dbx_debug_hooks): Update end_prologue, end_epilogue. - (xcoff_debug_hooks): Update end_prologue. - * debug.c (do_nothing_debug_hooks): Update end_prologue, end_epilogue. - * debug.h (end_prologue): Add file arg. - (end_epilogue): Add line and file args. - (dwarf2out_end_epilogue): Add line and file args. - (vmsdbgout_after_prologue): Remove. - * dwarf2out.c (dwarf2out_end_epilogue): Add line and file args. - (dwarf2_debug_hooks): Update end_prologue. - * dwarfout.c (dwarfout_end_epilogue): Add line and file args. - (dwarfout_end_prologue): Add file arg. - * final.c (vmsdbgout_after_prologue): Remove - (final_end_function): Update end_epilogue call. - (final_scan_insn): Update end_prologue call. - * sdbout.c (sdbout_end_epilogue): Add line and file args. - (sdbout_end_prologue): Add file arg. - (sdb_debug_hooks): Update end_prologue. - (sdb_begin_prologue): Update sdbout_end_prologue call. - * vmsdbgout.c (vmsdbg_debug_hooks): Add vmsdbgout_end_prologue, - vmsdbgout_end_function. - (vmsdbgout_end_prologue): New function renamed from - vmsdbgout_after_prologue. Call vmsdbgout_source_line. - (vmsdbgout_end_function): New function. - (vmsdbgout_end_epilogue): Add line and file args. Call - vmsdbgout_source_line. - (write_pclines): Write only valid line numbers. - (write_srccorr): Don't write source correlation records if 0 lines. - * xcoffout.c (xcoffout_end_epilogue): Add line and file args. - -2002-08-15 Steve Ellcey - - * gcc/unwind.h (_Unwind_Ptr): Make 64 bits on IA64 HP-UX. - (_Unwind_Internal_Ptr): 32 bit version for use in - read_encoded_value_with_base. - * gcc/unwind-pe.h (read_encoded_value_with_base): Use - _Unwind_Internal_Ptr instead of _Unwind_Ptr in order to get the - right size. - -2002-08-15 Kaveh R. Ghazi - - * loop.c (scan_loop, move_movables, count_one_set): Cast to avoid - signed/unsigned warnings. - - * regclass.c (init_reg_sets_1, choose_hard_reg_mode, - record_reg_classes): Likewise. - - * reload.c (reload_inner_reg_of_subreg, push_reload, - find_reloads_address_1): Likewise. - -2002-08-15 David Edelsohn - - * rs6000.c (output_mi_thunk): Return to function section on - TARGET_ELF. - - * rs6000-c.c (rs6000_cpu_cpp_builtins): Define __PPC405__ if PPC405. - -2002-08-15 Ulrich Weigand - - * config/s390/s390.c (legitimize_address): Optimize loading - of large displacements. - -2002-08-14 Douglas B Rupp - - * config/alpha/alpha-protos.h: Update. - - * config/alpha/alpha.c: (LINKAGE_SYMBOL_REF_P): New macro. - (alpha_legitimate_address_p): Test LINKAGE_SYMBOL_REF_P. - (alpha_linkage_symbol_p): New static function. - (print_operand_address): Print linkage operand. - - (alpha_funcs_num, alpha_funcs_tree, alpha_links_tree): New static - variables. - (reloc_kind): New enum. - (struct alpha_funcs): New struct. - (struct alpha_links): Add reloc_kind field. Rename links_kind field. - - (alpha_need_linkage): Rewrite. - (alpha_use_linkage): New global function. - (alpha_write_linkage): Rewrite and make static. - (alpha_write_one_linkage): Rewrite - - (alpha_start_function): Remove procedure descriptor output. - (alpha_end_function): Write linkages at end of each function. - - * config/alpha/alpha.md (call_vms, call_value_vms): Rewrite. - (call_vms_1, call_value_vms_1): Rewrite. - - * config/alpha/vms.h (ASM_FILE_END): Remove. - -2002-08-14 Richard Henderson - - * ggc-page.c (RTL_SIZE): New. - (extra_order_size_table): Add specializations for 2 and 10 rtl slots. - * rtl.def (BARRIER, NOTE): Pad to 9 slots. - -2002-08-14 Richard Henderson - - * calls.c: Include target.h. - * Makefile.in (calls.o): Update. - - * config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p. - * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise. - -2002-08-14 Richard Henderson - - * Makefile.in (LOOSE_WARN): Add -fno-common. - * c-common.h (constant_string_class_name): Add missing extern. - -2002-08-15 Neil Booth - - PR preprocessor/7358 - * c-opts.c (check_deps_environment_vars): Ignore main file - for SUNPRO_DEPENDENCIES. - * cppfiles.c (stack_include_file): Ignore main file if - appropriate. - * cpplib.h (struct cpp_options): New member in deps. - * doc/cppenv.texi: Update. - -2002-08-14 Neil Booth - - PR preprocessor/7526 - * cpplib.c (run_directive): Kludge so _Pragma dependency works. - -2002-08-14 Nathan Sidwell - - * doc/invoke.texi (-a): Remove documentation. - (-fprofile-arcs): Remove reference to -a, -ax options. - * doc/gcov.texi (Gcov Data Files): Data might be merged. - -2002-08-14 Gabriel Dos Reis - - Fix PR/7566 - * c-semantics.c (genrtl_case_label): Don't (mis)use - warning_with_decl. - -2002-08-14 Dale Johannesen - - * explow.c (emit_stack_restore): Emit memory clobbers - preceding the stack pop, to prevent the scheduler from - moving refs to variable arrays below this pop. - * reload1.c (reload): Preserve these clobbers for sched2. - * doc/rtl.texi: Document clobber (mem:BLK (scratch)). - -2002-08-14 Neil Booth - - * c-opts.c (c_common_post_options): Correct test. - -2002-08-14 Kaveh R. Ghazi - - * m88k.h (ASM_OUTPUT_SOURCE_FILENAME): Fix incorrect argument - order in call to fprintf. - -2002-08-14 Rainer Orth - - * config/sparc/sol2.h (SUBTARGET_EXTRA_SPECS): Define. - -2002-08-14 Ulrich Weigand - - * reload.c (find_reloads): Handle constraint letters marked by - EXTRA_ADDRESS_CONSTRAINT and EXTRA_MEMORY_CONSTRAINT. - (alternative_allows_memconst): Likewise. - * reload1.c (maybe_fix_stack_asms): Likewise. - * recog.c (asm_operand_ok, preprocess_constraints, - constrain_operands): Likewise. - * regclass.c (record_operand_costs, record_reg_classes): Likewise. - * local-alloc.c (block_alloc, requires_inout): Likewise. - * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. - - * defaults.h (EXTRA_MEMORY_CONSTRAINT): Provide a default. - (EXTRA_ADDRESS_CONSTRAINT): Likewise. - * doc/tm.texi: Document these two new target macros. - - * config/s390/s390.c (s390_expand_plus_operand): Accept already - valid operands. - (q_constraint): New function. - config/s390/s390-protos.h (q_constraint): Declare it. - config/s390/s390.h (EXTRA_CONSTRAINT): Use it. - (EXTRA_MEMORY_CONSTRAINT): New macro. - - * config/s390/s390.md: Throughout the machine description, - replace all instances of the constraint combinations 'Qo' - or 'oQ' with simply 'Q'. - -2002-08-14 Stephane Carrez - - * config/m68hc11/m68hc11.h (LINK_SPEC): Support -mrelax. - * config/m68hc11/t-m68hc11-gas (LIBGCC2_DEBUG_CFLAGS): Can use -g now. - (LIBGCC2_CFLAGS): Compile with -mrelax. - -2002-08-14 Stephane Carrez - - * doc/invoke.texi: Document -minmax for 68HC12. - - * config/m68hc11/m68hc11.md ("umaxqi3"): Use TARGET_MIN_MAX. - ("uminqi3"): Likewise. - ("uminhi3", "umaxhi3"): Likewise. - - * config/m68hc11/m68hc11.h (MASK_MIN_MAX): Define. - (TARGET_MIN_MAX): Define. - (TARGET_SWITCHES): New option -minmax/-mnominmax. - -2002-08-14 Stephane Carrez - - * config/m68hc11/t-m68hc11-gas (LIB1ASMFUNCS): Build __far_trampoline. - (MULTILIB_OPTIONS): Must also generate for -mlong-calls. - - * config/m68hc11/larith.asm: Put a mode for ELF ABI flags. - (ret, declare, farsym): New gas macros. - (__premain, exit, abort, _cleanup, memcpy, memset, ___adddi3, - ___subdi3, ___notdi2, __mulhi32, __mulsi3): Use them to use 'rtc' - and declare the symbol far when compiled with -mlong-calls. - (__far_trampoline): New for 68HC12 trampoline code to invoke a - far handler using jsr/bsr. - - * config/m68hc11/m68hc11-crt0.S: Put a mode for ELF ABI flags. - (jsr): New macro to transform a 'jsr' into a 'call'. - -2002-08-14 Stephane Carrez - - * doc/invoke.texi: Document -mlong-calls for 68HC12. - - * config/m68hc11/m68hc11.h (CPP_SPEC): Pass -D__USE_RTC__ when - -mlong-calls is specified. - (ASM_DECLARE_FUNCTION_NAME): Define to generate .far and .interrupt - assembler directives. - (TARGET_LONG_CALL, MASK_LONG_CALL): Declare. - (TARGET_SWITCHES): Add -mlong-calls options. - (current_function_far): Declare. - - * config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset): Take - into account the page register saved on the stack. - (m68hc11_override_options): Take into account -mlong-calls option. - (m68hc11_asm_file_start): Put a mode for the ELF flags ABI. - - * config/m68hc11/m68hc11.md ("*return_32bit"): Return rtc - if the function is going to be in 68HC12 banked memory (-mlong-calls). - ("*return_16bit"): Likewise. - ("*return_void"): Likewise. - ("call", "call_value"): Use call for a far function call. - -2002-08-14 Neil Booth - - * toplev.c (parse_options_and_default_flags): Don't call - post_options here. - (general_init): Initialize GC, pools and tree hash here, - instead of lang_independent_init. - (lang_independent_init): Rename backend_init. - (do_compile): Call post_options hook; exit early if there - have been errors after switch processing. - (toplev_main): Update. - -2002-08-14 Gabriel Dos Reis - - * c-pretty-print.h: Guard against multiple inclusion. - Robustify macros. - (pp_c_attributes): Declare. - * c-pretty-print.c (pp_c_attributes): New function. - -2002-08-13 Kaveh R. Ghazi - - * m68k.c (m68k_output_function_prologue, - m68k_output_function_epilogue): Delete versions for DPX2/MOTOROLA - and NEWS/MOTOROLA. - * genattrtab.c: Remove dpx2 comment. - * libgcc2.c (__enable_execute_stack): Delete versions for - NeXT/__MACH__, __convex__, __sysV88__, __pyr__ and - sony_news/SYSTYPE_BSD. - * longlong.h: Delete code for __a29k__, _AM29K, __clipper__, - __gmicro__, __i860__, __NeXT__ and __pyr__. - * rtl.h: Remove convex comment. - * varasm.c: Likewise. - -2002-08-13 Kaveh R. Ghazi - - * c-opts.c (lang_flags): Const-ify. - * ra-build.c (undef_table): Likewise. - * ra.c (eliminables): Likewise. - -2002-08-14 Gabriel Dos Reis - - * tree.h: Guard against multiple inclusion. - -2002-08-14 Hans-Peter Nilsson - - * reload1.c (reload_cse_simplify): Before checking - REG_FUNCTION_VALUE_P, check REG_P. - -2002-08-13 Geoffrey Keating - - * Makefile.in (attribs.o): Remove $(OBSTACK_H) dependency. - -2002-08-13 Neil Booth - - * c-opts.c (c_common_init_options): Extra braces needed. - -Tue Aug 13 17:40:25 2002 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. - -Tue Aug 13 14:49:20 2002 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. - -Mon Aug 12 12:48:20 CEST 2002 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. - -Sun Aug 11 14:43:17 CEST 2002 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. - -Sat Aug 10 19:59:43 CEST 2002 Jan Hubicka - Graham Stott - - * cfg.c (redirect_edge_succ_nodup): Avoid overflows due to roundoff - errors. - -2002-08-10 Kaveh R. Ghazi - - * emit-rtl.c (emit_jump_insn_before, emit_call_insn_before, - emit_jump_insn): Fix uninitialized variable. - * gcov.c (init_line_info): Likewise. - * genautomata.c (transform_3): Add braces around ambiguous - else. - * ifcvt.c (cond_exec_process_insns): Mark parameter with - ATTRIBUTE_UNUSED. - * ra-build.c (parts_to_webs_1): Fix uninitialized variable. - * regrename.c (copyprop_hardreg_forward): Fix uninitialized - variable. - - * gengtype.c (write_gc_structure_fields): Avoid signed/unsigned - warnings in output files. - -2002-08-09 Ziemowit Laski - - * c-common.c (flag_objc): New. - * c-common.h (c_language_kind): Get rid of clk_objective_c - enum value. - (flag_objc): New extern declaration. - * c-decl.c (implicitly_declare): Call objc_check_decl - instead of maybe_objc_check_decl. - (finish_decl): Likewise. - (grokfield): Likewise. - (finish_struct): Likewise. - * c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl. - (maybe_objc_comptypes): Rename to objc_comptypes. - (maybe_building_objc_message_expr): Rename to - objc_message_selector. - * c-lex.c (lex_charconst): Remove uses of clk_objective_c, - replace with flag_objc as needed. - * c-opts.c (c_common_init_options): Likewise. - (c_common_decode_option): Likewise. - * c-parse.in (init_reswords): Likewise. - * c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl. - (maybe_objc_comptypes): Rename to objc_comptypes. - (maybe_building_objc_message_expr): Rename to - objc_message_selector. - * c-typeck.c (comptypes): Call objc_comptypes instead of - maybe_objc_comptypes, and/or objc_message_selector instead of - maybe_building_objc_message_expr. - (comp_target_types): Likewise. - (convert_for_assignment): Likewise. - (warn_for_assignment): Likewise. - * cppinit.c (init_builtins): Set __OBJC__ manifest constant - independently of those for other languages. - * objc/objc-act.c (maybe_objc_comptypes): Delete. - (maybe_objc_check_decl): Delete. - (maybe_building_objc_message_expr): Rename to - objc_message_selector. - * objc/objc-lang.c (objc_init_options): Use clk_c instead of - clk_objective_c; set flag_objc flag. - -2002-08-09 Toshiyasu Morita - - * ifcvt.c (find_if_case_2): Test correct basic block for size. - -2002-08-09 Dale Johannesen - - * config/rs6000/rs6000.md: Add sibcall patterns. - * config/rs6000/rs6000.h (FUNCTION_OK_FOR_SIBCALL): Define. - * config/rs6000/rs6000.c (rs6000_ra_ever_killed): - Rewritten to handle sibcalls. - * config/rs6000/rs6000.c (function_ok_for_sibcall): New. - * config/rs6000/rs6000-protos.h (function_ok_for_sibcall): New. - -2002-08-08 Nathan Sidwell - - * profile.c (da_file_name): New static var. - (init_branch_prob): Initialize it. - (end_branch_prob): Remove da file. - - * Makefile.in (stage1_build): Pass empty COVERAGE_FLAGS. - * configure.in (coverage_flags): Default to nothing. - * configure: Rebuilt. - -2002-08-09 Neil Booth - - * Makefile.in (c-opts.o): Update - * c-opts.c: Include intl.h. - (print_help): Move from cppinit.c. Remove unused options. - (COMMAND_LINE_OPTIONS): Move more from cppinit.c. - (missing_arg): Complain for switches without an argument. - (c_common_decode_option): Reject missing joined arguments. - Handle new switches from cppinit.c. - * cppinit.c (COMMAND_LINE_OPTIONS): Move some switches to c-opts.c. - (cpp_handle_option): Similarly. - (print_help): Moved to c-opts.c. - * cpplib.h (struct cpp_options): Remove help_only. - * gcc.c (cpp_unique_options): Remove -$. - * doc/cppopts.texi: Undocument -h. - -2002-08-08 Jakub Jelinek - - * config/i386/i386.c (legitimate_constant_p): UNSPEC_TP is not - legitimate constant. - (legitimate_pic_operand_p): Neither pic operand. - (legitimate_address_p): But legitimate address. - (get_thread_pointer): Generate MEM/u instead of CONST around - UNSPEC_TP. - (print_operand): Remove printing of UNSPEC_TP. - (print_operand_address): And print it here. - -2002-08-08 Devang Patel - - * objc/objc-act.c (build_selector_translation_table): Issue warning, - when -Wselector is used,if method for which selector is being - created does not exist. - -2002-08-08 Stephen Clarke - - * config/sh/sh.c (prepare_move_operands): Only call - target_reg_operand if TARGET_SHMEDIA. - -2002-08-08 Jakub Jelinek - - * config/rs6000/rs6000.h, config/rs6000/aix.h, - config/rs6000/darwin.h, config/rs6000/linux64.h: Revert last - two patches. - * config/rs6000/sysv4.h: Likewise, remove #undef ADJUST_FIELD_ALIGN. - -2002-08-08 Lars Brinkhoff - Richard Henderson - - * emit-rtl.c (gen_rtx_REG): After reload, only return - frame_pointer_rtx or hard_frame_pointer_rtx if frame_pointer_needed. - -2002-08-08 Jakub Jelinek - - * config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove. - * config/rs6000/rs6000.c (rs6000_field_alignment): Move... - * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): ...inline into the - macro. - -2002-08-08 Adam Nemet - - * config/arm/arm.c (thumb_unexpanded_epilogue): Stack the PIC - register. - (thumb_expand_prologue): Likewise. - (thumb_output_function_prologue): Likewise. - * config/arm/arm.h (THUMB_INITIAL_ELIMINATION_OFFSET): Account for - the additional push of the PIC register. - -2002-08-08 Nathan Sidwell - - * configure.in (enable_coverage): New enable switch. - * configure: Rebuilt. - * Makefile.in (COVERAGE_FLAGS, coverageexts): New variables. - (INTERNAL_CFLAGS): Append COVERAGE_FLAGS. - (ALL_FLAGS): Reorder so INTERNAL_CFLAGS comes after CFLAGS. - (mostlyclean): Remove coverage files. - * doc/install.texi: Document enable_coverage. - - * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. - * ada/Make-lang.in (ada.mostlyclean): Remove coverage files. - * f/Make-lang.in (f.mostlyclean): Remove coverage files. - * java/Make-lang.in (java.mostlyclean): Remove coverage files. - * objc/Make-lang.in (objc.mostlyclean): Remove coverage files. - * treelang/Make-lang.in (treelang.mostlyclean): Remove coverage - files. - -2002-08-08 Neil Booth - - * c-opts.c (cpp_opts): New. - (COMMAND_LINE_OPTIONS): Add switches from cppinit.c. - (c_common_decode_options): Handle cpplib switches. - (c_common_init_options): Set cpp_opts. - * cppinit.c (COMMAND_LINE_OPTIONS): Move some switches to c-opts.c. - (cpp_handle_option): Similarly. - -2002-08-08 David Edelsohn - - * config/rs6000/aix.h (TARGET_ALTIVEC): Define to 0. - (TARGET_ALTIVEC_ABI): Same. - (TARGET_ALTIVEC_VRSAVE): Same. - - * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Check - icode not CODE_FOR_nothing. Change switch to if. - -2002-08-08 Alan Modra - - * config/rs6000/rs6000.h (ASM_CPU_SPEC): Pass -mpower4 when cpu=power4. - -2002-08-08 Jakub Jelinek - - * stor-layout.c (place_union_field): For bitfields if - PCC_BITFIELD_TYPE_MATTERS and TYPE_USER_ALIGN, set record's - TYPE_USER_ALIGN. - -2002-08-07 John David Anglin - - * pa.c (struct deferred_plabel): Constify name field. - -2002-08-07 Neil Booth - - * cppmacro.c (_cpp_builtin_macro_text): Remove unused variable. - -2002-08-07 John David Anglin - - * configure.in (PREFIX_INCLUDE_DIR): Don't define if prefix and - local_prefix are the same. - * configure: Rebuilt. - -2002-08-07 Jakub Jelinek - Richard Henderson - - * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN - to type_align when PCC_BITFIELD_TYPE_MATTERS. Only apply - ADJUST_FIELD_ALIGN if not DECL_USER_ALIGN resp. TYPE_USER_ALIGN. - (place_field): Likewise. - * config/i386/i386.c (x86_field_alignment): Don't check - DECL_USER_ALIGN here. - * config/rs6000/rs6000.c (rs6000_field_alignment): New. - * config/rs6000/rs6000-protos.h (rs6000_field_alignment): New - prototype. - * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): Define. - * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Remove. - * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Remove. - * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Remove. - * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove. - * doc/tm.texi (ADJUST_FIELD_ALIGN): Update description. - -2002-08-07 Neil Booth - - * Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update. - * c-common.c: Don't include tree-inline.h. - (c_common_init_options, c_common_post_options): Move to c-opts.c. - * c-common.h (c_common_decode_option): New. - * c-decl.c (c_decode_option): Remove. - * c-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. - * c-opts.c: New file. - * c-tree.h (c_decode_option): Remove. - * doc/passes.texi: Update. - * objc/objc-act.c (objc_decode_option): Remove. - * objc/objc-act.h (objc_decode_option): Remove. - * objc/ojbc-lang.c (LANG_HOOKS_DECODE_OPTION): Use - c_common_decode_option. - -2002-08-07 Chris Demetriou - - * config/mips/mips.md (sunlt_sf, suneq_sf, sunle_sf): Remove - dependency on TARGET_DOUBLE_FLOAT. - -2002-08-07 Stephen Clarke - - * config/sh/lib1funcs.asm (GCC_shcompact_incoming_args): Don't - overwrite callee-save registers. Fix comment. - -2002-08-06 Chris Demetriou - - * config/mips/mips.c (override_options): Set MASK_BRANCHLIKELY - in target_flags based on ISA, if it was not set on the command - line. Warn if MASK_BRANCHLIKLEY is set but the ISA does not - support Branch Likely instructions. - * config/mips/mips.h (MASK_BRANCHLIKLEY): New macro. - (TARGET_BRANCHLIKELY): Likewise. - (TARGET_SWITCHES): Add -mbranch-likely and -mno-branch-likely. - (GENERATE_BRANCHLIKELY): Use TARGET_BRANCHLIKELY rather than - ISA_HAS_BRANCHLIKELY. - (ISA_HAS_BRANCHLIKELY): Do not include MIPS16 check. - * doc/invoke.texi: Document new MIPS -mbranch-likely and - -mno-branch-likely options. - -2002-08-06 Kaveh R. Ghazi - - * ip2k.c (ip2k_set_compare): Add missing iteration variable. - - * Makefile.in (dummy-conditions.o): Depend on $(HCONFIG_H) not - $(GCONFIG_H). - -2002-08-06 Aldy Hernandez - - * c-decl.c (duplicate_decls): Error out for incompatible TLS - declarations. - - * testsuite/gcc.dg/tls/diag-3.c: New. - -2002-08-06 Dale Johannesen - - * c-common.c (fname_decl): Use line number 0 for - __func__, to avoid confusing debuggers. - -2002-08-06 Nathan Sidwell - - * gcov.c: Tidy. - (struct line_info, struct coverage): New structures. - (gcov_file_name, gcov_file): Remove globals. - (output_data): Take source file parameter. Fix memory leak. Break - up into ... - (init_line_info, output_line_info, make_gcov_file_name, - accumulate_branch_counts): ... here. - (calculate_branch_probs, function_summary): Adjust. - (main): Adjust. - (function_*): Remove global variables. - -2002-08-06 Neil Booth - - * dwarf2out.c: Remove unused macros. - -2002-08-06 Neil Booth - - * function.c (TRAMPOLINE_ALIGNMENT): Always defined. - -2002-08-06 Neil Booth - - * cppinit.c (struct lang_flags): Rename trigraphs std. - (set_lang): Update. - * cpplib.h (struct cpp_options): New member std. - * cppmacro.c (_cpp_builtin_macro_text): Use std. - (collect_args): Flag whether to swallow a possible future - comma pasted with varargs. - (replace_args): Use this flag. - * doc/cpp.texi: Update varargs extension documentation. - -2002-08-06 Jakub Jelinek - - * config/i386/mmintrin.h (__m64): Make the type 64-bit aligned. - -2002-08-06 Jakub Jelinek - - * config/i386/i386.c (x86_field_alignment): Apply min for all MODE_INT - and MODE_CLASS_INT modes. - -2002-08-06 Jakub Jelinek - - * config.gcc (*-*-linux*): Default to --enable-threads=posix if no - --{enable,disable}-threads is given to configure. - (alpha*-*-linux*, hppa*-*-linux*, i[34567]86-*-linux*, - x86_64-*-linux*, ia64*-*-linux*, m68k-*-linux*, mips*-*-linux*, - powerpc-*-linux-gnualtivec*, powerpc-*-linux*, s390-*-linux*, - s390x-*-linux*, sh-*-linux*, sparc-*-linux*, sparc64-*-linux*): - Remove thread_file setting here. - -2002-08-06 David Edelsohn - - * doc/install.texi (Binaries): Update Bull Freeware URL. - -2002-08-06 Gerald Pfeifer - - * doc/gcc.texi (Top): Rename Index to Keyword Index. - -2002-08-05 Nathan Sidwell - - * gcov.c (output_data): Round to % to nearest, tweak formatting. - -2002-08-05 Jakub Jelinek - - * fold-const.c (associate_trees): Only optimize NEGATE_EXPR in one - of the operands into MINUS_EXPR if code is PLUS_EXPR. - -2002-08-05 Douglas B Rupp - - * config.gcc (i[34567]86-*-interix*): Replace interix.o with winnt.o - * config/i386/i386-interix.h (TARGET_NOP_FUN_DLLIMPORT, - drectve_section): Define. - * config/i386/t-interix: Replace interix.o rule with winnt.o. - * config/i386/interix.c: Remove. - -2002-08-05 Geoffrey Keating - - * attribs.c: Don't include obstack.h. - * builtins.c: Likewise. - * cfganal.c: Likewise. - * cfgbuild.c: Likewise. - * cfgcleanup.c: Likewise. - * emit-rtl.c: Likewise. - * loop.c: Likewise. - * stmt.c: Likewise. - - * Makefile.in (s-gtype): Re-add dependency on $(GTFILES). - -2002-08-05 Gabriel Dos Reis - - * doc/c-tree.texi (Expression trees): Document VA_ARG_EXPR - -2002-08-04 Chris Demetriou - - * doc/invoke.texi: Remove duplicated paragraph describing - TARGET_SWITCHES. - -2002-08-04 Geoffrey Keating - - * Makefile.in (sdbout.o): Doesn't need $(OBSTACK_H). - * collect2.h (permanent_obstack): Delete declaration. - * collect2.c (permanent_obstack): Delete definition. - (main): Don't initialize permanent_obstack. Use xstrdup instead. - * expr.c: Don't include obstack.h. - (permanent_obstack): Delete declaration. - * function.c: Don't include obstack.h. - (permanent_obstack): Delete declaration. - * integrate.c: Don't include obstack.h. - (function_maybepermanent_obstack): Delete declaration. - * print-tree.c (debug_tree): Use x*alloc not permalloc. - * sdbout.c (gen_fake_label): Use x*alloc not permalloc. - * tlink.c (pfgets): Use xstrdup not permanent_obstack. - * toplev.c (lang_independent_init): Rename init_obstacks to init_ttree. - * tree.h: Rename init_obstacks to init_ttree. Remove declarations - of permalloc, expralloc, perm_calloc. - * tree.c (permanent_obstack): Delete definition. - (init_ttree): Rename from init_obstacks. - (permalloc): Delete. - (perm_calloc): Delete. - (dump_tree_statistics): Don't print information about - permanent_obstack. - * varasm.c (assemble_start_function): Use xstrdup instead of - permalloc/strcpy. - (assemble_variable): Likewise. - * config/alpha/alpha.c (unicosmk_need_dex): Use xmalloc instead of - permalloc. - (unicosmk_add_extern): Likewise. - * config/c4x/c4x.c (c4x_external_ref): Likewise. - (c4x_global_label): Likewise. - * config/frv/frv.c (frv_encode_section_info): Likewise. - * config/i386/winnt.c (i386_pe_record_external_function): Likewise. - (i386_pe_record_exported_symbol): Likewise. - * config/mips/mips.c (mips_output_external): Likewise. - (mips_output_external_libcall): Likewise. - * config/pa/pa.c: (permanent_obstack): Delete declaration. - (output_call): Use ggc_strdup instead of allocating on - permanent_obstack. - * config/romp/romp.c: Include ggc.h. - (get_symref): Don't declare permanent_obstack, use ggc_strdup - intead of permanent_obstack. - * config/rs6000/aix31.h (ASM_OUTPUT_EXTERNAL): Use concat - instead of permalloc. - * config/rs6000/rs6000.c (rs6000_gen_section_name): Use xmalloc - instead of permalloc - * config/rs6000/xcoff.h (ASM_OUTPUT_EXTERNAL): Use concat - instead of permalloc. - * config/vax/vax.c (vms_check_external): Use xmalloc instead of - permalloc. - -2002-08-04 Bernd Schmidt - - Contribute a port developed primarily by Michael Meissner, - Catherine Moore, and Richard Sandiford . - * config.gcc: Add frv-elf target. - * config/frv/cmovd.c: New file. - * config/frv/cmovh.c: New file. - * config/frv/cmovw.c: New file. - * config/frv/frv-abi.h: New file. - * config/frv/frv-asm.h: New file. - * config/frv/frv-modes.def: New file. - * config/frv/frv-protos.h: New file. - * config/frv/frv.c: New file. - * config/frv/frv.h: New file. - * config/frv/frv.md: New file. - * config/frv/frvbegin.c: New file. - * config/frv/frvend.c: New file. - * config/frv/lib1funcs.asm: New file. - * config/frv/media.h: New file. - * config/frv/modi.c: New file. - * config/frv/t-frv: New file. - * config/frv/uitod.c: New file. - * config/frv/uitof.c: New file. - * config/frv/ulltod.c: New file. - * config/frv/ulltof.c: New file. - * config/frv/umodi.c: New file. - * config/frv/xm-frv.h: New file. - - * config/frv/media.h: Removed again. - -2002-08-04 Nathan Sidwell - - * gcov.c (bb_file_time): New static variable. - (object_directory): May also be object file. - (preserve_paths): New static variable. - (print_usage): Adjust. - (options): Adjust. - (process_args): Adjust. - (open_files): Simplify. Cope when OBJECT_DIRECTORY is an object - file. Find modification date on bb file. - (read_profile): Don't rewind a NULL file. - (format_hwint): New static function. - (function_summary): Use format_hwint. - (output_data): SOURCE_FILE_NAME is never relative to - OBJECT_DIRECTORY. Use format_hwint. Adjust gcov file name - mangling. Adjust output format to make it more machine readable. - * doc/gcov.texi: Document & clarify semantics. - -2002-08-04 Joseph S. Myers - - * doc/include/gcc-common.texi (version-GCC): Increase to 3.3. - -2002-08-04 Nathan Sidwell - - * gcc.c (cc1_options): Pass output file as auxbase when - appropriate. - * profile.c (init_branch_prob): FILENAME has already had ending - stripped. - * final.c (end_final): Likewise. - * toplev.c (aux_base_name): New global. - (compile_file): Pass aux_base_name to init init_branch_prob and - end_final. - (independent_decode_option, case 'a'): New auxinfo options. - (case 'd'): Protect against mising basename. - (do_compile): Initialize aux_base_name. - * toplev.h (aux_base_name): New global. - * doc/invoke.texi: Adjust documentation. - -2002-08-04 Nathan Sidwell - - * config/i386/i386.c (x86_field_alignment): Remove duplicate test - of TARGET_ALIGN_DOUBLE. - -2002-08-04 Gabriel Dos Reis - - * diagnostic.c (inform): New function. - * diagnostic.h (inform): Declare. - -2002-08-03 David Edelsohn - - * config/rs6000/rs6000.md (movsi_internal1): Add nop mnemonic. - (movhi_internal): Same. - (movqi_internal): Same. - (movdi_internal64): Same. - - * config/rs6000/t-ppccomm (MULTILIB_MATCHES_FLOAT): Add mcpu=405. - - * config/rs6000/xcoff.h (SKIP_ASM_OP): Define. - (ASM_OUTPUT_SKIP): Use it. SIZE unsigned. - (COMMON_ASM_OP): Define. - (ASM_OUTPUT_ALIGNED_COMMON): Use it. SIZE unsigned. - Use ALIGN parameter. - (LOCAL_COMMON_ASM_OP): Define. - (ASM_OUTPUT_LOCAL): Use it. SIZE unsigned. - -2002-08-03 Roger Sayle - - * builtins.def: Define new builtin functions exp, expf, expl, - log, logf and logl (and their __builtin_* variants). - * optabs.h (enum optab_index): Add new OTI_exp and OTI_log. - Define exp_optab and log_optab. - * optabs.c (init_optans): Initialize exp_optab and log_optab. - * genopinit.c (optabs): Implement exp_optab and log_optab - using exp?f2 and log?f2 patterns. - * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP* - and BUILT_IN_LOG* using exp_optab and log_optab respectively. - (expand_builtin): Ignore the new builtins (and all cos and - sin variants) when not optimizing. Expand new builtins via - expand_builtin_mathfn when flag_unsafe_math_optimizations. - - * doc/extend.texi: Document new exp and log builtins. - * doc/md.texi: Document new exp?f2 and log?f2 patterns - (and previously undocumented cos?f2 and sin?f2 patterns). - -2002-08-03 Jason Merrill - - * explow.c (int_expr_size): New fn. - * expr.c (expand_expr) [CONSTRUCTOR]: Use it. - * expr.h: Declare it. - -2002-08-02 Krister Walfridsson - - * Makefile.in (gengtype-lex.o, gengtype-yacc.o): Add path to - gengtype-* dependencies. - -2002-08-02 Eric Christopher - - * config.gcc (mips*-*-linux*): Fix ordering of tm_file. - * config/mips/mips.h (READONLY_DATA_SECTION_ASM_OP): Change - #ifndef to #undef. - (TARGET_MEM_FUNCTIONS): Define instead of define to 1. - -2002-08-02 David Edelsohn - - PR optimize/7067 - * config/rs6000/rs6000.h (RTX_COSTS): Artificially make MULT - small if optimizing for size. - -2002-08-02 Daniel Jacobowitz - - * configure.in (FORBUILD): Use $build_alias. - * configure: Regenerated. - -2002-08-02 Richard Sandiford - - * config.gcc: Don't include mips/abi64.h in $tm_file. - * hard-reg-set.h (call_really_used_regs): Declare. - * config/mips/abi64.h: Remove file. - * config/mips/linux.h, - * config/mips/iris6.h: Don't include it. - * config/mips/mips-protos.h (mips_conditional_register_usage): Declare. - * config/mips/mips.h (CONDITIONAL_REGISTER_USAGE): Use it. - (REG_PARM_STACK_SPACE, STACK_BOUNDARY, STRICT_ARGUMENT_NAMING, - FUNCTION_ARG_PASS_BY_REFERENCE, FUNCTION_ARG_PADDING, - FUNCTION_ARG_CALLEE_COPIES, MUST_PASS_IN_STACK, MIPS_STACK_ALIGN): - Bring across definitions from abi64.h. - (GP_ARG_LAST, FP_ARG_LAST): Use MAX_ARGS_IN_REGISTERS. - (BIGGEST_MAX_ARGS_IN_REGISTERS): New. - (struct mips_args): Use it. - * config/mips/mips.c (mips_conditional_register_usage): Define. - -2002-08-02 Jason Merrill - - * langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro. - * langhooks.c (lhd_expr_size): Define default. - * langhooks.h (struct lang_hooks): Add expr_size. - * explow.c (expr_size): Call it. - * expr.c (store_expr): Don't copy an expression of size zero. - (expand_expr) [CONSTRUCTOR]: Use expr_size to calculate how much - to store. - * Makefile.in (builtins.o): Depend on langhooks.h. - -2002-08-02 Kaveh R. Ghazi - - * Makefile.in (ra-debug.o): Depend on $(TM_P_H). - * ra-debug.c: Include "tm_p.h". - * ra-rewrite.c (is_partly_live_1): Change return type to bool. - -2002-08-02 Toon Moene - - * simplify-rtx.c (simplify_binary_operation): x * 1 is allowed - when not honoring signalling NaNs. - (simplify_ternary_operation): a == b has a definite value - when not honoring NaNs. - -2002-08-02 Jason Merrill - - * gdbinit.in (pct): New macro. - -2002-08-01 Stan Shebs - Andreas Tobler - - * ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined, - plays nice with Darwin headers. - (_BSD_RUNE_T_DEFINED_): Likewise. - -2002-08-01 Zack Weinberg - - * c-common.c (c_common_init): -Wtraditional also implies -Wlong-long. - * cppinit.c (cpp_post_options): Likewise. - - * cppexp.c (cpp_classify_number): Suppress -Wtraditional - warning about 'LL' suffix (but not 'ULL' etc) when - -Wno-long-long is in effect. - - * cppmacro.c (_cpp_builtin_macro_text) [BT_TIME, BT_DATE]: - Check for failing time()/localtime(), issue a warning, and - make __TIME__ and __DATE__ expand to fallback strings. - - * doc/cpp.texi, doc/extend.texi: Document behavior of __DATE__ - and __TIME__ when the date and time cannot be determined. - -2002-08-02 Alan Modra - - * config/rs6000/rs6000.c (output_cbranch): Hint differently for power4. - -2002-08-01 Daniel Jacobowitz - - * Makefile.in ($(BUILD_PREFIX_1)ggc-none.o): Use $(GGC_H). - -2002-08-01 Chris Demetriou - - * config.gcc (mipsisa64sb1-*-elf*): New configuration. - (mipsisa64sb1el-*-elf*): Likewise. - * config/mips/mips.c (mips_cpu_info_table): Add sb1. - * config/mips/mips.h (processor_type): Add PROCESSOR_SB1. - (TARGET_SB1, TUNE_SB1): New macros. - * doc/invoke.texi: Add sb1 to documentation for MIPS -march and - -mtune flags. - -2002-08-01 David Edelsohn - - * varasm.c (asm_emit_uninitialized): Return false if global BSS - and ASM_EMIT_BSS not supported by target. - (assemble_variable): Do not duplicate uninitialized logic. - Fall through if asm_emit_uninitialized failed. - -2002-08-01 Chris Demetriou - - * config/mips/mips.h (BRANCH_LIKELY_P): Remove unused macro. - -2002-08-02 Alan Modra - - * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Define. - (DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC): Define. - - * config/rs6000/rs6000.c (output_toc): Don't use lshift_double when - HOST_BITS_PER_WIDE_INT == 64. - -2002-08-01 Kaveh R. Ghazi - - * df.c (df_insn_table_realloc): Change parameter to unsigned. - * optabs.c (expand_binop): Make variable unsigned. - * simplify-rtx.c (simplify_subreg): Likewise. - * unroll.c (unroll_loop): Cast to avoid signed/unsigned warnings. - -2002-08-01 Franz Sirl - - * c-common.c (cb_register_builtins): Always define __GXX_ABI_VERSION. - -2002-08-01 Richard Henderson - - * toplev.c (parse_options_and_default_flags): Don't set - flag_reorder_blocks for -Os. - - * config/avr/avr.c (avr_optimization_options): Remove. - * config/avr/avr.h (OPTIMIZATION_OPTIONS): Remove. - * config/m68hc11/m68hc11.c (m68hc11_optimization_options): Remove. - * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Remove. - -2002-08-01 H.J. Lu - Richard Henderson - - * output.h (DECL_READONLY_SECTION): Remove. - (decl_readonly_section): Declare. - * varasm.c (decl_readonly_section): New. - (default_section_type_flags, default_select_section): Use it. - * config/arm/pe.c (arm_pe_unique_section): Likewise. - * config/i386/interix.c (i386_pe_unique_section): Likewise. - * config/i386/winnt.c (i386_pe_unique_section): Likewise. - * config/mcore/mcore.c (mcore_unique_section): Likewise. - * config/mips/mips.c (mips_unique_section): Likewise. - -2002-08-01 Richard Henderson - - * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it - refers to a subroutine parameter. - -2002-08-01 Jakub Jelinek - - * varasm.c (assemble_visibility): Strip name encoding. - -2002-08-01 Ian Dall - - * config/ns32k/ns32k.h (TARGET_IEEE_COMPARE): Correct earlier patch. - (RETURN_ADDR_RTX): Cannot determine return address for FRAME > 0 - when there is no frame pointer. - (INITIAL_FRAME_POINTER_OFFSET): Count stack space for saved fp - registers properly. - * config/ns32k/__unorddf2.c: New file. - * config/ns32k/__unordsf2.c: New file. - * config/ns32k/t-ns32k: New file. - * config.gcc (ns32k-*-netbsd*): Use it. - -2002-08-01 Aldy Hernandez - - * config/rs6000/rs6000.h (SPU_CONST_OFFSET_OK): Change to 0xff. - -2002-08-01 Neil Booth - - * c-common.c (__GXX_ABI_VERSION): Correct spelling. - -2002-08-01 Benjamin Kosnik - - * c-common.c (cb_register_builtins): Set __GXX_ABI_VERSION__ to 102. - -2002-08-01 Richard Sandiford - - * config/mips/mips.md: Add [!]TARGET_MIPS16 to sgtu conditions. - -2002-08-01 Zdenek Dvorak - - * gcse.c (expr_hash_table_size, n_exprs, set_hash_table_size, - n_sets): Removed. - (expr_hash_table, set_hash_table): Type changed to ... - (struct hash_table): New type. - (hash_scan_insn, hash_scan_set, hash_scan_clobber, hash_scan_call, - insert_expr_in_table, insert_set_in_table, compute_hash_table, - dump_hash_table, lookup_expr, lookup_set, compute_local_properties, - compute_ae_gen, compute_ae_kill): Modified to pass the table explicitly. - (alloc_set_hash_table, alloc_expr_hash_table): Merged to ... - (alloc_hash_table): New. - (free_set_hash_table, free_expr_hash_table): Merged to ... - (free_hash_table): New. - (compute_set_hash_table, compute_expr_hash_table): Merged to ... - (compute_hash_table_work): New. - (classic_gcse, one_classic_gcse_pass, compute_cprop_data, - find_avail_set, one_cprop_pass, find_bypass_set, compute_pre_data, - pre_edge_insert, pre_insert_copies, pre_delete, pre_gcse, - one_pre_gcse_pass, compute_transpout, compute_code_hoist_vbeinout, - hoist_code, one_code_hoisting_pass, - trim_ld_motion_mems): Altered due to changed type of hash tables. - -2002-08-01 Zack Weinberg - - * final.c (output_alternate_entry_point): - If ASM_OUTPUT_TYPE_DIRECTIVE is defined, use it. - -2002-08-01 Kaveh R. Ghazi - - * objc/objc-act.c (encode_complete_bitfield): Add prototype and - avoid ISO C style function definition. - - * expr.c (expand_assignment): Delete unused variable. - -2002-08-01 Toon Moene - - * c-common.c (cb_register_builtins): Set - __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only - is given, and to 0 otherwise. - * combine.c (simplify_if_then_else): HONOR_NANS - implies FLOAT_MODE_P. - -2002-08-01 Neil Booth - - * cppinit.c (COMMAND_LINE_OPTIONS): Remove OPT_dollar. - (cpp_handle_option): Don't handle it. - (print_help): Update. - * doc/cppopts.texi: Update. - -2002-08-01 Neil Booth - - * c-common.c (cb_register_builtins): If C++, define - __EXCEPTIONS, __DEPRECATED and __GXX_ABI_VERSION as appropriate. - * gcc.c (cpp_unique_options): Remove __GXX_ABI_VERSION. -cp: - * lang-specs.h: Simplify in accordance with new code in - c-common.c. - -2002-08-01 Neil Booth - - * c-common.c: Define all C/ObjC/C++ warning and flag variables. - * c-common.h: Declare all C/ObjC/C++ warning and flag variables. - * c-decl.c: Move all warning and flag variables to c-common.c. - * c-format.c: Move all warning variables to c-common.c. - * c-tree.h: Move all warning and flag declarations to c-common.h. - * objc/objc-act.c: Move all warning variables to c-common.c. - (flag_warn_protocol): Rename warn_protocol. - -2002-07-31 John David Anglin - - * pa-linux.h (GLOBAL_ASM_OP): Fix typo. - -2002-07-31 Graham Stott - - * config/stormy16/stormy16.h (BSS_SECTION_ASM_OP): Add missing - .section prefix. - -2002-07-31 Stan Shebs - - * config.gcc (i[34567]86-*-darwin*): New configuration. - * config/darwin.h (TARGET_ENCODE_SECTION_INFO): Undefine before - defining. - (TARGET_ENCODE_SECTION_INFO): Ditto. - (ASM_PREFERRED_EH_DATA_FORMAT): Ditto. - * config/darwin.c (machopic_indirect_data_reference): Remove - setting of RTX_UNCHANGING_P. - (machopic_legitimize_pic_address): Move RTX_UNCHANGING_P up so as - not to be applied to sums. - * config/i386/t-darwin: New file. - * config/i386/darwin.h: New file. - * config/i386/i386.h (TARGET_MACHO): Add default definition. - * config/i386/i386.md (tablejump): Add TARGET_MACHO case. - * config/i386/i386.c (output_set_got): For Mach-O, output Mach-O - label and not the GOT add. - (constant_address_p): For Mach-O, seeing a CONST is enough. - (legitimate_pic_address_disp_p): Add a Mach-O case. - (legitimate_address_p): Also test machopic_operand_p if Mach-O. - (legitimize_pic_address): Use generic Mach-O code to legitimize. - (output_pic_addr_const): Suppress @PLT if Mach-O, and parens - if outputting a difference. - (ix86_output_addr_diff_elt): Add Mach-O case. - (ix86_expand_move): Similarly. - (ix86_expand_call): Similarly. - (current_machopic_label_num): New global. - (machopic_output_stub): New function. - (ix86_value_regno): New function. - (ix86_function_value): Use it instead of VALUE_REGNO. - (ix86_libcall_value): Ditto. - * config/i386/unix.h (VALUE_REGNO): Remove. - -2002-07-31 Graham Stott - - * config/rs6000/rs6000.c(rs6000_hash_constant): Fix - hash for LABEL_REF's. - -2002-07-31 Graham Stott - - * config/rs6000/rs6000.c (spe_init_builtins, - altivec_init_builtins, rs6000_common_init_builtins): - Replace ANSI with K&R function def. - -2002-07-31 David Edelsohn - - * rs6000.c (validate_condition_mode): Test flag_finite_math_only - for CCFPmode. - -2002-07-31 Richard Sandiford - - * config/mips/crtn.asm: Don't use __mips16 to determine the - return-address offset. Define RA to a suitable temporary - register for the return address. - -2002-07-31 Richard Sandiford - - * config/mips/mips.md (eh_set_lr_si, eh_set_lr_di): Change - constraints to 'd'. - -2002-07-30 Chris Demetriou - - * config/mips/elf.h (STARTFILE_SPEC): Define differently if - default ABI is MEABI. (Undoes incorrect change in Eric Christopher's - patch on 2002-07-29.) - * config/mips/elf64.h (STARTFILE_SPEC): Likewise. - -2002-07-30 Kaveh R. Ghazi - - * alpha.h, arc.h, arm/aout.h, avr.h, cris.h, d30v.h, dsp16xx.h, - fr30.h, h8300.h, i370.h, i386/sco5.h, i386/unix.h, i960.h, ia64.h, - ip2k.h, m32r.h, mcore.h, mips.h, mn10200.h, mn10300.h, ns32k.h, - openbsd.h, pa/pa-linux.h, pdp11.h, romp.h, rs6000/sysv4.h, - s390/linux.h, sh.h, sparc.h, stormy16.h, v850.h, vax.h, xtensa.h: - (ASM_GLOBALIZE_LABEL): Delete. - (GLOBAL_ASM_OP): Define. - - * m68hc11.h, m68k.h, m88k.h (ASM_GLOBALIZE_LABEL): Delete. - - * defaults.h (ASM_GLOBALIZE_LABEL): Provide a default. - * doc/tm.texi (ASM_GLOBALIZE_LABEL): Update docs. - -2002-07-30 Geoffrey Keating - - * doc/extend.texi (Hints implementation): Document that GCC - mostly ignores `register'. - -2002-07-30 Toon Moene - - * flags.h: Declare flag_finite_math_only. - Use it in definition of HONOR_NANS and - HONOR_INFINITIES. - * c-common.c (cb_register_builtins): Emit - __FINITE_MATH_ONLY__ when flag_finite_math_only - is set. - * combine.c (simplify_if_then_else): If - flag_finite_math_only is set, a == b has a - definite value. - * toplev.c: Initialize flag_finite_math_only. - (set_flags_fast_math): Set it on -ffast-math. - (flag_fast_math_set_p): Test it. - * doc/invoke.texi: Document -ffinite-math-only. - -2002-07-30 Richard Henderson - - * ifcvt.c (noce_get_alt_condition): Use reg_overlap_mentioned_p. - (noce_process_if_block): Likewise. - -2002-07-30 Bernd Schmidt - - * ifcvt.c (cond_exec_process_if_block): Fix a merging error. - Bail out early if false_expr is NULL and we'd crash due to this. - * genemit.c (gen_expand): Recognize return insns even if the return - appears in a parallel. - * libgcc2.c: Expand macro DECLARE_LIBRARY_RENAMES if it is defined. - * config/fp-bit.c: Likewise. - * doc/tm.texi: Document it. - -2002-07-30 David Edelsohn - Zack Weinberg - - * rs6000.c (rs6000_expand_unop_builtin): Check icode not - CODE_FOR_nothing. Change switch to if. - (rs6000_expand_binop_builtin): Same. - (rs6000_expand_builtin): Expand builtin if target support enabled. - (rs6000_init_builtins): Init builtin if target support enabled. - (rs6000_common_init_builtins): Check icode not CODE_FOR_nothing. - -2002-07-30 Franz Sirl - - * gcc.c (cpp_unique_options): Define __GXX_ABI_VERSION, bump it to 101. - -2002-07-30 Richard Sandiford - - * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Fix typo. - -Tue Jul 30 18:31:31 2002 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. - -Tue Jul 30 11:21:44 2002 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. - -Thu Jul 26 23:00:13 2002 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. - -Thu Jul 25 20:34:50 2002 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. - -Thu Jul 25 18:57:50 2002 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. - -Thu Jul 25 10:23:41 2002 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. - -Wed Jul 24 17:59:12 CEST 2002 Jan Hubicka - - * toplev.c (rest_of_compilation): Dump loops before clobbering - the structure. - -Wed Jul 24 17:23:16 CEST 2002 Jan Hubicka - - * rtlanal.c (keep_with_call_p): Avoid overflow in fixed_regs. - -2002-07-24 Frank van der Linden - - PR optimization/7291 - * config/i386/i386.c (ix86_expand_clrstr): Fix bzero alignment - problem on x86_64. - -2002-07-24 Gabriel Dos Reis - - * pretty-print.h: Add macros from cp/error.c - -2002-07-24 Alan Modra - - * config/rs6000/rs6000-protos.h (mask_operand_wrap): Declare. - (mask64_2_operand): Declare. - (build_mask64_2_operands): Declare. - (and64_2_operand): Declare. - (extract_MB): Declare. - (extract_ME): Declare. - * config/rs6000/rs6000.c (mask64_operand): Allow all ones. Remove - CONST_DOUBLE code. - (mask_operand_wrap): New insn predicate. - (mask64_2_operand): Likewise. - (and64_2_operand): Likewise. - (build_mask64_2_operands): New function. - (extract_MB): New function. - (extract_ME): New function. - (print_operand ): Use extract_MB and extract_ME. - (print_operand ): Allow all ones. Remove CONST_DOUBLE support. - * config/rs6000/rs6000.h (EXTRA_CONSTRAINT): Add 't'. - (PREDICATE_CODES): Add and64_2_operand, mask_operand_wrap and - mask64_2_operand. Remove CONST_DOUBLE from mask64_operand. - * config/rs6000/rs6000.md (andsi3_internal3): New - (andsi3_internal3+1): Enable split for powerpc64. - (andsi3_internal3+2): New split. - (andsi3_internal4): Renamed old andsi3_internal3. - (andsi3_internal5): New. - (andsi3_internal5+1): Enable split for powerpc64. - (andsi3_internal5+2): New split. - (andsi3_internal6, andsi3_internal7, andsi3_internal8): New. - (anddi3): Handle 't' constraint. - (anddi3+1): New split. - (anddi3_internal2): Handle 't' constraint. - (anddi3_internal2+1): New split. - (anddi3_internal3): Handle 't' constraint. - (anddi3_internal3+1): New split. - -2002-07-24 Alan Modra - - * config/rs6000/rs6000.md: Remove scratch reg on insns using - addze and similar (plus (comparison r1 r2) r3) insns. Add - missing scratch reg in one case. Formatting fixes. - -2002-07-24 Neil Booth - - * cppexp.c (parse_defined): Mark macro used. - * cpphash.h (struct cpp_macro): New member "used". - (_cpp_mark_macro_used, _cpp_warn_if_unused_macro): New. - (struct cpp_reader): New member. - * cppinit.c (cpp_finish_options): Set first_unused_line. - (cpp_finish): Warn of unused macros if requested. - (OPT_TABLE): New switches. - (cpp_handle_option): Handle them. - * cpplib.c (do_undef): Warn if macro unused. - (do_ifdef, do_ifndef): Mark macro used. - * cpplib.h (struct cpp_options): New member. - * cppmacro.c (_cpp_warn_if_unused_macro): New. - (enter_macro_context): Mark macro used. - (_cpp_create_definition): Mark macro unused; warn if unused - when redefined. - * cpptrad.c (scan_out_logcial_line, push_replacement_text): - Mark macros used. - * doc/cppopts.texi: Update. - -2002-07-23 Neil Booth - - * dwarf2out.c (SECTION_ASM_OP, - ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. - * system.h (SECTION_ASM_OP): Poison. - * tree.c (FILE_FUNCTION_PREFIX_LEN): Remove. - * config/alpha/alpha-interix.h, config/mips/linux.h - (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. - * config/mmix/mmix-protos.h, config/mmix/mmix.c - (mmix_asm_output_define_label_difference_symbol): Remove. - * config/mmix/mmix.h - (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Remove. - * doc/tm.texi: Remove documentation. - -Tue Jul 23 21:49:24 2002 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. - -Tue Jul 23 12:16:58 2002 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. - -Mon Jul 22 15:27:25 2002 J"orn Rennecke - - * rtlanal.c (subreg_regno_offset): Return correct offset for - big endian paradoxical subregs. - - * optabs.c (expand_vector_unop): Don't expand using sub_optab - if we got the wrong mode. - - * hwint.c (define HOST_WIDE_INT_PRINT_DEC_C): New define. - * genrecog.c (write_switch, write_cond): Use it. - * genemit.c (gen_exp): Likewise. - -2002-07-22 Jakub Jelinek - - * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE. - -2002-07-22 Jakub Jelinek - - * c-decl.c (build_compound_literal): Defer compound literal decls - until until file end to emit them only if they are actually used. - -2002-07-21 Kaveh R. Ghazi - - * ra-build.c (check_conflict_numbers): Hide unused function. - (livethrough_conflicts_bb): Avoid automatic aggregate - initialization. - (parts_to_webs_1): Avoid `U' integer constant modifier. - (conflicts_between_webs): Wrap a variable in the macro controlling - its usage. - * ra-debug.c (ra_debug_msg): Use VA_OPEN/VA_CLOSE. - (dump_igraph, dump_graph_cost): Avoid string concatenation - (dump_static_insn_cost): Avoid automatic aggregate - initialization. - * ra-rewrite.c (insert_stores): Avoid automatic aggregate - initialization. - (dump_cost): Avoid string concatenation - -2002-07-21 Richard Henderson - - * expr.c (expand_expr) [TRY_FINALLY_EXPR]: Don't use - GOTO_SUBROUTINE_EXPR when finally_block can be re-expanded. - -2002-07-21 Richard Henderson - - * unroll.c (find_splittable_givs): Do not split DEST_ADDR givs - that are not unrolled completely. - -2002-07-21 Richard Henderson - - * loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS. - * loop.c (strength_reduce): Update. - * toplev.c (rest_of_compilation): Do unrolling in the first - loop pass, not the second. - -2002-07-21 Richard Henderson - - * emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL - when flag_argument_noalias == 2. - * alias.c (nonoverlapping_memrefs_p): Handle that. - * print-rtl.c (print_mem_expr): Likewise. - -2002-07-21 Hartmut Schirmer - - * libgcc2.c (__divdi3, __moddi3): Use unary minus operator - instead of __negdi2 directly. - -2002-07-21 Neil Booth - - * gengenrtl.c (gencode): Don't define obstack_alloc_rtx. - * function.c (SYMBOL__MAIN): Remove definition. - * global.c (SET_CONFLICT, REGBITP, ALLOCNO_LIVE_P): Remove. - * predict.c (PROB_NEVER, PROB_LIKELY, PROB_UNLIKELY): Remove. - * profile.c (GCOV_INDEX_TO_BB): Remove. - * sched-rgn.c (ABS_VALUE, MIN_DIFF_PRIORITY, MIN_PROB_DIFF): Remove. - * simplify-rtx.c (FIXED_BASE_PLUS_P): Remove. - -2002-07-21 Neil Booth - - * c-lex.c (GET_ENVIRONMENT): Remove. - * collect2.c (GET_ENV_PATH_LIST): Remove. - (prefix_from_env): Use GET_ENVIRONMENT. - * cppinit.c (GET_ENV_PATH_LIST): Remove. - (init_standard_includes): Use GET_ENVIRONMENT. - * defaults.h (GET_ENVIRONMENT): Define here if not already. - * gcc.c (GET_ENV_PATH_LIST): Remove. - (make_relative_prefix, process_command): Update. - * protoize.c (GET_ENV_PATH_LIST): Remove. - (do_processing): Update. - -2002-07-21 Gabriel Dos Reis - - * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. - (grokdeclarator): Likewise. - * c-format.c (C_STD_NAME): Likewise. - * c-lex.c (interpret_integer): Likewise. - * c-typeck.c (build_array_ref): Likewise. - * cpplex.c (_cpp_lex_direct): Likewise. - * toplev.c (documented_lang_options): Likewise. - -2002-07-21 Neil Booth - - * c-format.c (T99_I, T99_UI): Remove. - -2002-07-21 Neil Booth - - * c-typeck.c (SAVE_SPELLING_DEPTH): Remove. - -Sun Jul 21 21:36:41 CEST 2002 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. - -Sun Jul 21 00:54:54 CEST 2002 Jan Hubicka - - * gcse.c: Include cselib.h - (constptop_register): Break out from ... - (cprop_insn): ... here; kill basic_block argument. - (do_local_cprop, local_cprop_pass): New functions. - (one_cprop_pass): Call local_cprop_pass. - -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. - -Thu Jul 18 19:39:18 2002 J"orn Rennecke - - * sh-protos.h (sh_expand_unop_v2sf): Move inside #ifdef RTX_CODE guard. - (sh_expand_binop_v2sf): Likewise. - * sh.c (machine_dependent_reorg): Add move for UNSPEC_MOVA. - (int_gpr_dest, trunc_hi_operand): New functions. - * sh.h (PREDICATE_CODES): Add any_register_operand, int_gpr_dest and - trunc_hi_operand. - (SPECIAL_MODE_PREDICATES, any_register_operand): Define. - * sh.md (cmpeqdi_t+1): Remove comments that genrecog warns about. - (adddi3_compact+1, subdi3_compact+1, ashlsi3_n+1, ashlhi3+1): Likewise. - (ashrsi2_16+1, ashrsi2_31+1, lshrsi3_n+1, ashrdi3+[12]): Likewise. - (and_shl_scratch+[12], zero_extendhidi2+1): Likewise. - (zero_extendhisi2_media+1, extendhidi2+1, extendqidi2+1): Likewise. - (extendhisi2_media+1, extendqisi2_media+1): Likewise. - (movsi_media_nofpu+[12], movhi_media+1, movdi_media_nofpu+1): Likewise. - (movdi_const_16bit+[12], movdf_i4+[123], reload_outdf+[2-5]): Likewise. - (movsf_ie+1): Likewise. - (loaddi_trunc): Use int_gpr_dest predicate. - (use_sfunc_addr, indirect_jump_scratch, sibcall_compact): Add mode(s). - (mova, mova_const, GOTaddr2picreg, ptrel, casesi_worker_0): Likewise. - (casesi_worker_0+[12], casesi_worker): Likewise. - (shcompact_preserve_incoming_args): Likewise. - (mov_nop): Use any_register_operand predicate. - (mperm_w0): Use trunc_hi_operand predicate. - -2002-07-18 John David Anglin - - * pa-linux.h (DWARF2_UNWIND_INFO): Delete define. - * pa.h (EH_RETURN_DATA_REGNO): Revise TARGET_64BIT and correct - numbering. - -2002-07-18 John David Anglin - - * pa.c (output_deferred_plabels): Remove unused millicode enum mulU. - -2002-07-18 Richard Henderson - - PR optimization/7147 - * ifcvt.c (noce_get_condition): Make certain that the condition - is valid at JUMP. - -Thu Jul 18 13:44:51 2002 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. - -Thu Jul 18 09:38:59 CEST 2002 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. - -Wed Jul 17 19:23:32 2002 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. - -Wed Jul 17 17:08:06 2002 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. - -Wed Jul 17 00:22:39 CEST 2002 Jan Hubicka - - * m68hc11.c (m68hc11_reorg): Do not rebuild CFG. - -Wed Jul 17 00:20:48 CEST 2002 Jan Hubicka - - * i386.md (prefetch): Fix for 64bit mode. - (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. - -Wed Jul 17 00:19:20 CEST 2002 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. - -Tue Jul 16 19:32:58 2002 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 bitfield 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. - -Tue Jul 16 11:57:45 2002 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. - -Tue Jul 16 12:22:44 CEST 2002 Jan Hubicka - - * i386.md (prefetch): Fix for 64bit mode. - (prefetch_sse_rex, prefetch_3dnow_rex): New patterns. - - * i386.md (movss, movsd): Use xorps/xorpd for Athlon. - -2002-07-16 Marek Michalkiewicz - - * hard-reg-set.h (TEST_HARD_REG_BIT): Return 1 if the bit is set. - -2002-07-15 Zack Weinberg - - * ginclude/varargs.h: Replace with stub which issues #error. - * ginclude/stdarg.h: __builtin_stdarg_start is renamed - __builtin_va_start. - - * builtins.def (BUILT_IN_VARARGS_START): Delete. - (BUILT_IN_VA_START): New. - * builtins.c (expand_builtin_va_start): Eliminate first - argument and code to implement pre-ISO varargs. - (std_expand_builtin_va_start): Ignore first argument; it is - always 1. - (expand_builtin): Handle BUILT_IN_VA_START and - BUILT_IN_STDARG_START identically. Delete - BUILT_IN_VARARGS_START case. - - * function.c (assign_parms): Delete hide_last_arg and all - its uses. - (mark_varargs): Delete function. - * function.h (struct function): Delete 'varargs' bit. - (current_function_varargs): Delete macro. - * tree.h: Don't declare mark_varargs. - - * c-decl.c (c_function_varargs, c_mark_varargs): Delete. - (c_expand_body): Don't call mark_varargs. - * c-objc-common.c: Handle BUILT_IN_VA_START and - BUILT_IN_STDARG_START identically. Delete - BUILT_IN_VARARGS_START case. - * c-tree.h: Don't declare c_mark_varargs. - * c-parse.in: Remove grammar rules for '&...' (which has been - commented out since before 2.7.2) and for '...' in K+R - argument declarations. - - * builtins.c, function.c, integrate.c, sibcall.c, - config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h, - config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c, - config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c, - config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h, - config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h, - config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c, - config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h, - config/stormy16/stormy16.c: Delete all references to - current_function_varargs, and code predicated on that flag. - - * config/alpha/alpha.c (alpha_va_start), - config/arc/arc.c (arc_va_start), - config/i386/i386.c (ix86_va_start), - config/mips/mips.c (mips_va_start), - config/mn10300/mn10300.c (mn10300_va_start), - config/rs6000/rs6000.c (rs6000_va_start), - config/s390/s390.c (s390_va_start), - config/sh/sh.c (sh_va_start), - Ignore first argument; it is always 1. - - * config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start. - * config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start. - * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c: - Delete m68hc11_va_start. - * config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h: - No need to define EXPAND_BUILTIN_VA_START. - - * doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi, - doc/trouble.texi: Remove references to GCC-provided . - -2002-07-15 Eric Botcazou - - PR optimization/7153 - * regmove.c (optimize_reg_copy_3): Don't optimize if the register - dies in more than one insn. - -2002-07-15 Jason Thorpe - - * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove. - -2002-07-15 Michael Matz , - Daniel Berlin , - Denis Chertykov - - Add a new register allocator. - - * ra.c: New file. - * ra.h: New file. - * ra-build.c: New file. - * ra-colorize.c: New file. - * ra-debug.c: New file. - * ra-rewrite.c: New file. - - * Makefile.in (ra.o, ra-build.o, ra-colorize.o, ra-debug.o, - (ra-rewrite.o): New .o files for libbackend.a. - (GTFILES): Add basic-block.h. - - * toplev.c (flag_new_regalloc): New. - (f_options): New option "new-ra". - (rest_of_compilation): Call initialize_uninitialized_subregs() - only for the old allocator. If flag_new_regalloc is set, call - new allocator, instead of local_alloc(), global_alloc() and - friends. - - * doc/invoke.texi: Document -fnew-ra. - * basic-block.h (FOR_ALL_BB): New. - * config/rs6000/rs6000.c (print_operand): Write small constants - as @l+80. - - * df.c (read_modify_subreg_p): Narrow down cases for a rmw subreg. - (df_reg_table_realloc): Make size at least as large as max_reg_num(). - (df_insn_table_realloc): Size argument now is absolute, not relative. - Changed all callers. - - * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". - * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. - - 2002-06-20 Michael Matz - - * df.h (struct ref.id): Make unsigned. - * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. - - 2002-06-13 Michael Matz - - * df.h (DF_REF_MODE_CHANGE): New flag. - * df.c (df_def_record_1, df_uses_record): Set this flag for refs - involving subregs with invalid mode changes, when - CLASS_CANNOT_CHANGE_MODE is defined. - - 2002-05-07 Michael Matz - - * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. - - 2002-05-03 Michael Matz - - * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. - - Sat Feb 2 18:58:07 2002 Denis Chertykov - - * regclass.c (regclass): Work with all regs which have sets or - refs. - (reg_scan_mark_refs): Count regs inside (clobber ...). - - 2002-01-04 Michael Matz - - * df.c (df_ref_record): Correctly calculate SUBREGs of hardregs. - (df_bb_reg_def_chain_create, df_bb_reg_use_chain_create): Only - add new refs. - (df_bb_refs_update): Don't clear insns_modified here, ... - (df_analyse): ... but here. - - * sbitmap.c (dump_sbitmap_file): New. - (debug_sbitmap): Use it. - - * sbitmap.h (dump_sbitmap_file): Add prototype. - - 2001-08-07 Daniel Berlin - - * df.c (df_insn_modify): Grow the UID table if necessary, rather - than assume all emits go through df_insns_modify. - - 2001-07-26 Daniel Berlin - - * regclass.c (reg_scan_mark_refs): When we increase REG_N_SETS, - increase REG_N_REFS (like flow does), so that regclass doesn't - think a reg is useless, and thus, not calculate a class, when it - really should have. - - 2001-01-28 Daniel Berlin - - * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for - dataflow analysis. - -2002-07-15 Jakub Jelinek - - PR middle-end/7245 - * config/i386/i386.c (const_int_1_31_operand): New. - * config/i386/i386.h (PREDICATE_CODES): Add it. - * config/i386/i386.md (ashlsi3_cmp, ashlsi3_cmp_zext, ashlhi3_cmp, - ashlqi3_cmp, ashrsi3_cmp, ashrsi3_cmp_zext, ashrhi3_cmp, ashrqi3_cmp, - lshrsi3_cmp, lshrsi3_cmp_zext, lshrhi3_cmp, lshrqi3_cmp): Use it. - -2002-07-14 Alan Modra - - PR target/7282 - * config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64. - (floatunssidf2): Likewise. - (floatsidf_ppc64): New insn_and_split. - (floatunssidf_ppc64): Likewise. - -2002-07-14 Andreas Jaeger - - * config.gcc (sh64): Remove unused - target_requires_64bit_host_wide_int. - -2002-07-12 Roger Sayle - - * expr.c [CLEAR_RATIO]: New macro defining the maximum number - of move instructions to use when clearing memory, c.f. MOVE_RATIO. - [CLEAR_BY_PIECES]: New macro, using CLEAR_RATIO, to determine - whether clear_by_pieces should be used to clear storage. - (clear_storage): Use CLEAR_BY_PIECES instead of MOVE_BY_PIECES. - - * doc/tm.texi: Document these two new target macros. - -2002-07-12 Stephane Carrez - - * config/m68hc11/m68hc11.md ("zero_extendsidi2"): Use D_REG only for - the scratch register. - ("*movhi2_push"): Accept Z_REG because a split pattern can make use - of it, forbid reload to use it. - -2002-07-12 Marek Michalkiewicz - - * config/avr/avr.c (test_hard_reg_class): Fix TEST_HARD_REG_BIT - usage on 64-bit hosts, return value was truncated to 32 bits. - -Fri Jul 12 00:49:36 2002 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. - -Thu Jul 11 22:02:57 2002 J"orn Rennecke - - * combine.c (try_combine): When converting a paradoxical subreg - to an extension, take LOAD_EXTEND_OP into account. - -2002-07-11 Rainer Orth - - * config.gcc (mips-sgi-irix6*o32): New configuration. - - * configure.in (libgcc_visibility): Disable for mips-sgi-irix6*o32 - configurations. - * configure: Regenerate. - - * config/mips/iris6-o32-as.h: New file. - * config/mips/iris6-o32.h: New file. - - * config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Define. - (NM_FLAGS): Define. - (HAVE_AS_SHF_MERGE): Undefine. - - * config/mips/t-iris5-as: New file. - * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it. - - * config/mips/t-iris6 (SHLIB_EXT, SHLIB_SOLINK, SHLIB_SONAME, - SHLIB_NAME, SHLIB_MAP, SHLIB_OBJS, SHLIB_SLIBDIR_QUAL, SHLIB_LINK, - SHLIB_INSTALL, SHLIB_MKMAP, SHLIB_MAPFILES, FPBIT, DPBIT, - dp-bit.c, fp-bit.c): Move ... - * config/mips/t-iris5-6: ... here. - New file, shared by IRIX 5 and IRIX 6. - * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix6*, - mips-sgi-irix5*): Use it. - - * config/mips/iris6.h: Remove duplicate comment. - - * config/mips/mips.c (TARGET_ASM_UNALIGNED_DI_OP) [TARGET_IRIX5 && - !TARGET_IRIX6]: Define. - (mips_asm_file_start): Don't emit mdebug. sections on IRIX 5/6. - - * config/mips/mips.h (ASM_DECLARE_FUNCTION_NAME): Fix comment. - -2002-07-11 John David Anglin - - * pa.md (adddi3): Change predicate of operand 2 to adddi3_operand - and delete code to force constant to register. - * pa-protos.h (adddi3_operand): Add prototype. - * pa.c (adddi3_operand): New function. - -2002-07-11 Roger Sayle - - * c-decl.c (duplicate_decls): Preserve the noreturn attribute on - non-ANSI builtin functions. - -Thu Jul 11 11:31:12 2002 J"orn Rennecke - - * rtl.h (gen_rtx_CONST_VECTOR): Declare. - * gengenrtl.c (special_rtx): Check for CONST_VECTOR. - * emit-rtl.c (gen_rtx_CONST_VECTOR): New function. - (gen_const_vector_0): Use it. - -2002-07-11 John David Anglin - - * pa.md (adddi3): For 32-bit targets, force constants to a register - if they don't fit in an 11-bit immediate. Change insn predicate to - arith11_operand. Remove comment. - * pa.c (cint_ok_for_move): Fix comment. - (emit_move_sequence): Don't directly split DImode constants on 32-bit - targets. - -2002-07-11 Tim Josling - - Remove front end hard coding from gengtype.c. - - * Makefile.in - (STAGESTUFF): add gtyp-gen.h - (GTFILES): Remove front end specific files. - (GTFILES_FILES_LANGS): New, from configure.. - (GTFILES_FILES_FILES): Likewise. - (GTFILES_LANG_DIR_NAMES): Likewise. - (GTFILES_SRCDIR): Likewise. - (gtyp-gen.h): Build from configure information. - (s-gtype): Remove command line parameters from gengtype. - (gengtype.o): Remove dependency on GTFILES. Depend on gtyp-gen.h. - (mostlyclean): Delete files generated by and for gengtype. - - * c-config-lang.in: New file. - - * configure.in (all_gtfiles_files_langs): New. Accumulate files - for each language. - (all_gtfiles_files_files): New. Accumulate language for each file - accumulated. - (gtfiles): Pick up value for C. - (srcdir): AC-SUBST this variable. - (all_gtfiles_files_langs): AC-SUBST this variable. - (all_gtfiles_files_files): AC-SUBST this variable. - - * configure: Regenerate. - - * gengtype-lex.l (parse_file): Make parameter const. - - * gengtype.c (toplevel): include gtyp-gen.h. - (BASE_FILE_ unnamed enum): Delete. - (lang_names): Delete (replaced by gtyp-gen.h) - (lang_dir_names): From gtyp-gen.h, replaces lang_names; changed - all references. - (NUM_GT_FILES): New. - (NUM_LANG_FILES): New. - (srcdir_len): New. - (NUM_BASE_FILES): Change calculation. - (open_base_files): Change prototype to avoid warning. - (startswith): Delete. - (get_file_basename): Iterate through generated language list not - hard coded list. - (get_base_file_bitmap): Use generated list of files and languages. - (close_output_files): Add prototype to rmove warning. - (main): Iterate through list of generated files from gtyp-gen.h - rather than command line paramaters. Ignore duplicated file - names. - - * gengtype.h (parse_file): Amend prototype for const parameter. - - * doc/sourcebuild.texi: Document gtfiles variable. - - * doc/gty.texi: Document changes to gtfiles variable for front - ends. - - * objc/config-lang.in (gtfiles): Add files needed for objc front - end. - -2002-07-10 Roger Sayle - - PR c/2454 - * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply - to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. - -2002-07-10 Roger Sayle - Zack Weinberg - - * builtins.def: Make the argument types of abort and exit - independent of the front-end. - -2002-07-11 Alan Modra - - * config/rs6000/linux64.h (ASM_SPEC): Define. - -2002-07-10 Aldy Hernandez - - * config/rs6000/rs6000.c (emit_frame_save): New. - (rs6000_frame_related): Replace reg2 before reg. - (rs6000_emit_prologue): Use emit_frame_save for saving gprs, fprs, - and eh_return registers. - -2002-07-10 Toon Moene - - Revert all patches for optimization of Complex .op. Real. - * complex_part_zero_p: Remove - * expand_cmplxdiv_straight: Replace complex_part_zero_p(x) - with x. - * expand_cmplxdiv_wide: Ditto. - * expand_binop: Ditto. - -2002-07-10 Marek Michalkiewicz - - * config/avr/avr.md: Fix two 0x80000000 constants to make them - negative also on 64-bit hosts. - - Default to -fno-reorder-blocks when optimizing for size. - * config/avr/avr-protos.h (avr_optimization_options): Declare. - * config/avr/avr.c (avr_optimization_options): New function. - * config/avr/avr.h (OPTIMIZATION_OPTIONS): New. - - Optimize returning from simple functions. - * config/avr/avr-protos.h (avr_simple_epilogue): Declare. - * config/avr/avr.c (avr_simple_epilogue): New function. - * config/avr/avr.md (return): New insn. - -2002-07-10 Douglas B Rupp - - * config/i386/i386.c (ix86_svr3_asm_out_constructor): Add - HAS_INIT_SECTION to protection. - -2002-07-10 Mark Mitchell - - * doc/invoke.texi (Debugging Options): Mention that -gdwarf is - deprecated. - -Wed Jul 10 19:50:03 2002 J"orn Rennecke - - * combine.c (gen_lowpart_for_combine): Handle vector modes. - Supply non-VOID mode to simplify_gen_subreg. - -Wed Jul 10 18:48:55 CEST 2002 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. - -Wed Jul 10 16:06:00 2002 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. - -Tue Jul 9 22:37:44 2002 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. - -Tue Jul 9 21:39:50 2002 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. - -Sun Jul 7 20:38:38 2002 J"orn Rennecke - - * sh.h (PRINT_OPERAND_PUNCT_VALID_P): Allow '\''. - (PREDICATE_CODES): Add entries for equality_comparison_operator, - greater_comparison_operator and less_comparison_operator. - * sh.c (print_operand): Add '\'' code. Make 'o' handle - more operators. - (equality_comparison_operator): New function. - (greater_comparison_operator, less_comparison_operator): Likewise. - * sh.md (beq_media_i): Disable generator function generation. - Use match_operator to handle a whole class of comparisons. Add - modifier in output template to provide branch prediction. Add type. - (bgt_media_i, ble_media_i): Likewise. Allow zero operands. - (bne_media_i, bge_media_i, bgtu_media_i, bgeu_media_i): Delete. - (blt_media_i, bleu_media_i, bltu_media_i): Likewise. - (bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu): Allow zero operands. - -2002-07-07 Hans-Peter Nilsson - - Emit MMIX function prologue and epilogue as rtl. - * config/mmix/mmix.md ("call"): Use mmix_get_hard_reg_initial_val, - not unprototyped get_hard_reg_initial_val. - ("call_value", "nonlocal_goto_receiver"): Ditto. - ("return"): Make define_expand. Move real insn to... - ("*expanded_return"): New pattern. - ("prologue", "epilogue"): New define_expands. - * config/mmix/mmix.h (MMIX_rO_REGNUM): New macro. - (struct machine_function): New member in_prologue. - (FIRST_PSEUDO_REGISTER): Adjust for including rO as register. - (FIXED_REGISTERS, CALL_USED_REGISTERS): Ditto. - (MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Ditto. - (MMIX_GNU_ABI_REG_ALLOC_ORDER, REG_CLASS_CONTENTS): Ditto. - (REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): Ditto. - (LOCAL_REGNO): Define. Adjust comment. - * config/mmix/mmix.c (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): - Consider regs_ever_live[MMIX_rJ_REGNUM], not just - leaf_function_p. - (MMIX_OUTPUT_REGNO): Don't translate registers while outputting - the prologue. - (mmix_target_asm_function_prologue): Make static. Just mark that - the prologue is being emitted. Move guts to... - (mmix_expand_prologue): New function. Adjust for emitting - prologue as rtl. For sizes, use HOST_WIDE_INT only. - (mmix_target_asm_function_epilogue): Make static. Simply emit a - \n. Move guts to... - (mmix_expand_epilogue): New function. Adjust for emitting - epilogue as rtl. For sizes, use HOST_WIDE_INT only. - (mmix_target_asm_function_end_prologue): Mark that the prologue - has ended. - (TARGET_ASM_FUNCTION_END_PROLOGUE): Define. - (mmix_conditional_register_usage): Improve comments. - (mmix_local_regno): New function. - (mmix_emit_sp_add, mmix_get_hard_reg_initial_val): Ditto. - * config/mmix/mmix-protos.h (mmix_local_regno): Prototype. - (mmix_expand_prologue, mmix_expand_epilogue): Ditto. - (mmix_get_hard_reg_initial_val): Ditto. - -2002-07-06 Andreas Jaeger - - * toplev.c (set_fast_math_flags): Don't use ISO C style function - definitions. - * gengtype.c (open_base_files): Likewise. - (close_output_files): Likewise. - * tracer.c (find_best_predecessor): Likewise. - (find_best_successor): Likewise. - (ignore_bb_p): Likewise. - -2002-07-05 Roger Sayle - - PR c++/7099 - * builtin-attrs.def: Define new attribute lists for use in - builtins.def. - * builtins.def [DEF_BUILTIN]: Modify to take an additional - ATTRS argument, an enumerated value defined in builtin-attrs.def - that represents the attribute list for the builtins. Modify - all builtin functions to pass an appropriate attribute list. - Specify "abort", "exit", "_exit" and "_Exit" builtins here with - their required noreturn attributes. - * tree.h (enum_builtin_function): Ignore the additional parameter - to DEF_BUILTIN. - * builtins.c (built_in_names): Likewise. - * c-common.c: (builtin_function_2): Replace the "int noreturn_p" - argument with a tree representing the functions attribute list. - Pass this "attrs" argument to builtin_function. No longer handle - the noreturn_p processing manually. - (built_in_attributes): Move the definitions from builtin-attrs.def - before c_common_nodes_and_builtins. - (c_common_nodes_and_builtins): Handle the new ATTRS parameter in - DEF_BUILTIN, passing it to both builtin_function and the changed - builtin_function_2. - - * doc/extend.texi: Document __builtin_abort, __builtin_exit, - __builtin__exit and __builtin__Exit. - -2002-07-05 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*movqi_68hc12"): Avoid allocating - QI mode registers in soft registers. - ("zero_extendqihi2"): Do not take into account soft registers - for register allocation (use '*' constraint). - -2002-07-05 Stephane Carrez - - * config/m68hc11/m68hc11.md ("*ashlsi3"): Avoid saving y if we know - it is dead. - ("*ashrsi3"): Likewise. - ("*lshrsi3"): Likewise. - -2002-07-05 Vladimir Makarov - - * genautomata.c (output_max_insn_queue_index_def): Take latencies - into account. - -2002-07-05 Stephane Carrez - - * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize - address computation and memory moves. - -2002-07-03 Mark Mitchell - - PR c++/6706 - * dwarfout.c (output_reg_number): Fix warning message. - (output_bound_representation): Check SAVE_EXPR_RTL is not NULL - before using it. - -2002-07-05 Rainer Orth - - * gcc/gcc.c (asm_debug): Move initialization ... - (init_spec): ... here. - -2002-07-05 Nathan Sidwell - - * c-parse.in (extdef): Append ';'. - (old_style_parm_decls): Append ';'. - -2002-07-04 Daniel Jacobowitz - - * configure.in: Correct typos: gcc_cv_as_gdwarf2_debug_flag to - gcc_cv_as_gdwarf2_flag and gcc_cv_as_gstabs_debug_flag - to gcc_cv_as_gstabs_flag. - * configure: Rebuilt. - -2002-07-04 Geoffrey Keating - - * ggc.h (ggc_add_root): Document as obsolete. - -Thu Jul 4 07:58:01 2002 J"orn Rennecke - - * sh.md (mshfhi_b, mshflo_b, mshfhi_l, mshflo_l, mshfhi_w): Add DONE. - (mshflo_w): Likewise. - -Thu Jul 4 07:36:29 2002 J"orn Rennecke - - * simplify-rtx.c (simplify_subreg): Reduce problem of finding - vector mode subregs of constants to finding integer mode - subregs of constants. - * cse.c (cse_insn): Use simplify_gen_subreg. - * convert.c (convert_to_integer): Don't strip a NOP_EXPR - From a vector mode expression of different size than the - target mode. - -2002-07-03 Eric Christopher - - * config/mips/linux.h: Add #undef for SUBTARGET_CPP_SPEC. - * config/mips/mips.h: Remove deprecated -m options - and cc1_cpu_spec associated. - (CONSTANT_ADDRESS_P): Fix last patch. - (ASM_DECLARE_FUNCTION_NAME): Declare. Fix comment. - * config/mips/mips.md (bungt, bunge, sungt_df, sungt_sf, sunge_df, - sunge_sf): Remove. - -2002-07-03 Stan Shebs - - * config/darwin.h (APPLE_CC): Remove, not meaningful in FSF GCC. - (STRINGIFY_THIS, REALLY_STRINGIFY): Remove. - (CPP_SPEC): Remove insertion of APPLE_CC definition. - -2002-07-03 Roger Sayle - - * combine.c (struct_undo): Change types of recorded substitutions - to be either "int" or "rtx", instead of "unsigned int" and "rtx". - (do_SUBST_INT): Change types of the substitution from unsigned int - to int, to avoid compilation warning from SUBST_INT's only caller. - - (make_extraction): Add cast to avoid compilation warning. - (force_to_mode): Remove cast to avoid compilation warning. - -2002-07-03 Eric Botcazou - Jeff Law - - * i386.md (length_immediate attribute): Fix typo. - (length_address attribute): Likewise. - (modrm attribute): Set it to 0 for immediate call instructions. - (jcc_1 pattern): Set modrm attribute to 0. - (jcc_2 pattern ): Likewise. - (jump pattern): Likewise. - (doloop_end_internal pattern): Explicitly set length. - (leave pattern): Fix typo. - (leave_rex64 pattern): Likewise. - -2002-07-03 David Edelsohn - - * config/rs6000/rs6000.md (fix_truncdfsi2_internal): Ignore DImode - in FPR as preference. - (fctiwz): Same. - (floatdidf2, fix_truncdfdi2): Same. - (floatdisf2, floatditf2, fix_trunctfdi2): Same. - (floatditf2): Same. - (floatsitf2, fix_trunctfsi2): SImode in GPR. - (ctrdi): Remove FPR alternative and splitter. - -2002-07-03 Will Cohen - - * config/i386/i386.c (x86_integer_DFmode_moves): Disable for PPro. - -Wed Jul 3 10:24:16 2002 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. - -Tue Jul 2 18:45:45 2002 J"orn Rennecke - - * sh.c (print_operand, case 'N'): Allow zero vector. - (arith_reg_or_0_operand): Likewise. - (zero_vec_operand): Check for CONST_VECTOR, not PARALLEL. - * sh.h (CONST_COSTS): 0 has 0 cost. Check OUTER_CODE for - IOR, XOR, PLUS and SET and take their respective constant - ranges into account. - (PREDICATE_CODES, arith_reg_or_0_operand): Can be CONST_VECTOR. - * sh.md (subdi3, subdi3_media): Allow zero operand. - (movv8qi_i+3): Only vector that is not split is the zero vector. - Fix operand 3 to simplify_subreg. - (movv2si_i): Split alternative 1. - (mshfhi_l_di_rev+1): New splitter. - -2002-07-02 Neil Booth - - PR preprocessor/7029 - * cppinit.c (cpp_handle_option): Suppress warnings with an - implicit "-w" for "-M" and "-MM". - * doc/cppopts.texi: Update. - -2002-07-01 Roger Sayle - - * config/sh/sh.c (sh_media_init_builtins): Change use of poisoned - identifier "bzero" to "memset". Pass extra NULL_TREE argument to - builtin_function. - -2002-07-02 Alan Modra - - * README.Portability: Fix typos. - -2002-07-01 Hans-Peter Nilsson - - PR target/7177 - * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Correct number - of indirections for register inside sign-extended mem part. - -2002-07-01 Roger Sayle - - * tree.h: Modify builtin_function interface to take an extra - argument ATTRS, which is a tree representing an attribute list. - - * c-decl.c (builtin_function): Accept additional parameter. - * objc/objc-act.c (builtin_function): Likewise. - * f/com.c (builtin_function): Likewise. - * java/decl.c (builtin_function): Likewise. - * ada/utils.c (builtin_function): Likewise. - * cp/decl.c (builtin_function): Likewise. - (builtin_function_1): Likewise. - - * c-common.c (c_common_nodes_and_builtins): Pass an additional - NULL_TREE argument to builtin_function. (builtin_function_2): - Likewise. - * cp/call.c (build_java_interface_fn_ref): Likewise. - * objc/objc-act.c (synth_module_prologue): Likewise. - * java/decl.c (java_init_decl_processing): Likewise. - * f/com.c (ffe_com_init_0): Likewise. - - * config/alpha/alpha.c (alpha_init_builtins): Pass an additional - NULL_TREE argument to builtin_function. - * config/arm/arm.c (def_builtin): Likewise. - * config/c4x/c4x.c (c4x_init_builtins): Likewise. - * config/i386/i386.c (def_builtin): Likewise. - * config/ia64/ia64.c (def_builtin): Likewise. - * config/rs6000/rs6000.c (def_builtin): Likewise. - -2002-07-01 Zack Weinberg - - * config/ip2k/t-ip2k: Remove LIBGCC1, CROSS_LIBGCC1, and LIBGCC1_TEST. - * config/mips/t-isa3264: Likewise. - * config/mmix/t-mmix: Likewise. - -2002-07-01 John David Anglin - - * emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT. - -2002-07-01 Roger Sayle - - PR opt/4046 - * fold-const.c (fold) [COND_EXPR]: Simplify A ? 0 : 1 to !A, - A ? B : 0 to A && B and A ? B : 1 into !A || B if both A and - B are truth values. - -2002-07-01 Nathanael Nerode - - * config/mmix/t-mmix: Eliminate last reference to LIBGCC1_TEST. - -2002-07-01 Matt Kraai - - * README.Portability (Function prototypes): Give an example of - declaring and defining a function with no arguments. - - * README.Portability (Function prototypes): Document new - variable-argument function macros. - -Mon Jul 1 19:55:17 2002 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.9 b/contrib/gcc/ChangeLog.9 deleted file mode 100644 index 8eed245..0000000 --- a/contrib/gcc/ChangeLog.9 +++ /dev/null @@ -1,21488 +0,0 @@ -2003-06-30 Bruno Haible - - PR middle-end/6578 - * libgcc2.c (__subvsi3): Remove simplification that would not work - when subtracting -0x80000000. - (__subvdi3): Remove simplification that would return a wrong result. - (__mulvsi3): Fix overflow check. - (__absvdi2): Fix simplification that would return a wrong result. - (__mulvdi3): Fix overflow check. - -2003-06-30 Jeff Law - - * stmt.c (any_pending_cleanups): Lose argument THIS_CONTOUR, it - was always passed in the value '1'. Simplify body appropriately. - * tree.h (any_pending_cleanups): Corresponding changes. - * calls.c: (expand_call): Corresponding changes. - -2003-06-30 Kazu Hirata - - * combine.c (distribute_notes): Don't bother REG_WAS_0. - * cse.c (cse_insn): Likewise. - * final.c (final_scan_insn): Likewise. - * jump.c (duplicate_loop_exit_test): Likewise. - * rtl.c (reg_note_name): Remove REG_WAS_0. - * rtl.h (REG_WAS_0): Remove. - * unroll.c (final_reg_note_copy): Don't bother REG_WAS_0. - * config/avr/avr.c (output_movqi): Don't use reg_was_0. - (output_movhi): Likewise. - (output_movsisf): Likewise. - (reg_was_0): Remove. - * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Don't use - REG_WAS_0. - (m68hc11_gen_movqi): Likewise. - * config/vax/vax-protos.h: Remove the prototype for - reg_was_0_p. - * config/vax/vax.c (follows_p): Remove. - (reg_was_0_p): Likewise. - * config/vax/vax.md (movsi): Don't use reg_was_0_p. - (movhi): Likewise. - (movqi): Likewise. - * doc/rtl.texi (REG_WAS_0): Remove. - -2003-06-30 Mark Mitchell - - * config/rs6000/spe.h (__ev_set_spefscr_frmc): Set the flag. - -2003-06-30 Bob Wilson - - * config/xtensa/lib1funcs.asm: Use "xtensa-config.h" from - top-level include directory. - * config/xtensa/lib2funcs.S: Likewise. - * config/xtensa/xtensa.h: Likewise. - * config/xtensa/xtensa-config.h: Remove. - * doc/install.texi: Update location of "xtensa-config.h" header. - -2003-06-30 Ulrich Weigand - - * config/s390/s390.c (s390_extra_constraint): New function. - * config/s390/s390-protos.h (s390_extra_constraint): Declare it. - * config/s390/s390.h (EXTRA_CONSTRAINT): Use it. - * config/s390/s390.c (q_constraint): Remove. - * config/s390/s390-protos.h (q_constraint): Likewise. - * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Add 'R', 'S', 'T'. - (EXTRA_ADDRESS_CONSTRAINT): Define. - - * config/s390/s390.c (larl_operand): Refuse out-of-range operands. - (DISP_IN_RANGE, s390_short_displacement): New. - (legitimate_reload_operand_p): Support long displacements. - (s390_decompose_address): Likewise. - (legitimize_pic_address): Likewise. - (legitimize_address): Likewise. - (s390_fixup_clobbered_return_reg): Likewise. - (s390_emit_prologue, s390_emit_epilogue): Likewise. - (s390_output_mi_thunk): Likewise. - - * config/s390/s390.md (attr "op_type"): Add "RXY", "RSY", "SIY". - (attr "atype", attr "length"): Add defaults for new op_types. - (all insns): Change op_type attribute where appropriate. - - ("*movdi_lay", "*movsi_lay", "*extendqidi2", "*extendqisi2"): New insns. - ("*tmqi_ext", "*tmdi_mem", "*tmsi_mem", "*tmhi_mem", *tmqi_mem", - "*tstsi", "*tstsi_cconly", "*tsthiCCT", "*tsthiCCT_cconly", - "*tsthi", "*tsthi_cconly", "*tstqiCCT", "*tstqiCCT_cconly", - "*tstqi", "*tstqi_cconly", "*cmpsi_ccs_sign", "*cmpsi_ccs", - "*cmpsi_ccu", "*cmphi_ccu", "*cmpqi_ccu", "*cli", - "movti", "*movdi_64", "*movdi_31", "*movsi", "movhi", "movqi_64", - "movqi", "*movstrictqi", "*movstricthi", "movstrictsi", - "*movdf_64", "*movdf_31", "*movsf", - "*load_multiple_si", "*store_multiple_di", - "*sethighqisi", "*sethighhisi", "*sethighqidi_31", "*extendhisi2", - "*la_64", "*la_31", "*la_31_and", "force_la_31", - "*addsi3_carry1_cc", *addsi3_carry1_cconly", - "*addsi3_carry2_cc", *addsi3_carry2_cconly", - "*addsi3_cc", "*addsi3_cconly", "*addsi3_cconly2", - "*addsi3_sign", "*addsi3_sub", "addsi3", - "*subsi3_borrow_cc", "*subsi3_borrow_cconly", "*subsi3_cc", - "*subsi3_cconly", "*subsi3_sign", "*subsi3_sub", "subsi3", - "mulsi3" - "*andsi3_cc", "*andsi3_cconly", "andsi3", - "*andqi3_ss", "*andqi3_ss_inv", - "*iorsi3_cc", "*iorsi3_cconly", "iorsi3", - "*iorqi3_ss", "*iorqi3_ss_inv", - "*xorsi3_cc", "*xorsi3_cconly", "xorsi3", - "*xorqi3_ss", "*xorqi3_ss_inv", - "*tls_load_31"): Add alternatives for long-displacement instructions. - - ("*cmpdf_ccs", "*cmpdf_ccs_ibm", "*cmpsf_ccs", "*cmpsf_ccs_ibm", - "*load_multiple_di", "*store_multiple_di", - "*sethighqidi_64", "*zero_extendhisi2_31", - "truncdfsf2_ibm", "extendsfdf2_ieee", "extendsfdf2_ibm", - "adddf3", "*adddf3", "*adddf3_ibm", - "addsf3", "*addsf3", "*addsf3_ibm", - "subdf3", "*subdf3", "*subdf3_ibm", - "subsf3", "*subsf3", "*subsf3_ibm", - "mulsi_6432", "divmoddisi3", - "muldf3", "*muldf3", "*muldf3_ibm", - "mulsf3", "*mulsf3", "*mulsf3_ibm", - "divdf3", "*divdf3", "*divdf3_ibm", - "divsf3", "div*sf3", "*divsf3_ibm", - "sqrtdf2", "sqrtsf2", - "*cjump_long", "*icjump_long", "indirect_jump", "casesi_jump", - "*doloop_si_long", "*doloop_di_long", "bas_64", "bas_31", - "bas_r_64", "bas_r_31", "bas_tls_31", "bas_tls_64"): Adapt memory - and address constraints for instructions that do not accept long - displacements. - -2003-06-30 Hartmut Penner - Ulrich Weigand - - * config/s390/2084.md: New file. - * config/s390/s390.md: Include it. - * config/s390/s390.c (s390_adjust_priority): New function. - (TARGET_SCHED_ADJUST_PRIORITY): Define. - (s390_first_cycle_multipass_dfa_lookahead): New function. - (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD): Define. - (s390_sched_reorder2): New function. - (TARGET_SCHED_REORDER2): Define. - (s390_adjust_cost): Support PROCESSOR_2084_Z990 cpu type. - (s390_issue_rate): Likewise. - -Mon Jun 30 23:47:33 CEST 2003 Jan Hubicka - - * Makefile.in (GTFILES): Add cgraph.h. - * cgraph.c (known_decls): Remove. - (cgraph_hash, cgraph_nodes, cgraph_nodes_queue, - cgraph_varpool_hash, cgraph_varpool_nodes_queue): GTYize. - (cgraph_node): Do not allocate known_decls; use polutate hashtable. - (cgraph_varpool_node): Likewise; add next pointer. - (cgraph_varpool_nodes): New static variable. - * cgraph.h (cgraph_local_info, cgraph_global_info, cgraph_rtl_info, - cgraph_node, cgraph_edge, cgraph_varpool_node, cgraph_nodes, cgraph_n_nodes, - cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): GTYize. - * gengtype.c (open_base_files): Include cgraph.h - -2003-06-30 Volker Reichelt - - * Changelog: Remove ">>>>>>>" from previous change. - -2003-06-30 Volker Reichelt - - * config/cris/cris.c: Fix spelling for "testcase". - * config/cris/cris.h: Likewise. - * config/cris/cris.md: Likewise. - * config/mmix/crti.asm: Likewise. - * config/mmix/mmix.h: Likewise. - * config/mmix/mmix.md: Likewise. - -2003-06-30 Kazu Hirata - - * config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Make it always - 1. - -2003-06-30 Ulrich Weigand - - * config.gcc [s390*-*-*]: Support --with-arch, --with-tune, and - --with-mode configure options. - * config/s390/s390.h (OPTION_DEFAULT_SPECS): Define. - (DRIVER_SELF_SPECS): Define. - * config/s390/linux.h (ASM_SPEC): Pass architecture mode and cpu - architecture to assembler. - (LINK_SPEC): Merge 31-bit and 64-bit variants. - (LINK_ARCH31_SPEC, LINK_ARCH64_SPEC, EXTRA_SPECS): Remove. - * config/s390/s390.c (override_options): New default rules for - architecture mode and cpu architecture selection. - * doc/invoke.texi (-mesa, -mzarch, -march, -mtune): Document - new default rules. - - * config/s390/s390.h (enum processor_type): Add PROCESSOR_2084_Z990. - * config/s390/s390.md (attr "cpu"): Add "z990" processor type. - * config/s390/s390.c (override_options): Add "z990" to - processor_alias_table. - * doc/invoke.texi (-march): Document "z990" processor type. - - * config/s390/s390.c (s390_tune_flags, s390_arch_flags): New variables. - * config/s390/s390.h (s390_tune_flags, s390_arch_flags): Declare. - (enum processor_flags, TARGET_CPU_IEEE_FLOAT, TARGET_CPU_ZARCH, - TARGET_CPU_LONG_DISPLACEMENT, TARGET_LONG_DISPLACEMENT): New. - * config/s390/s390.c (override_options): Replace enum pta_flags by - enum processor_flags. Fill in s390_tune_flags and s390_arch_flags. - - * config/s390/s390.c (s390_cpu): Rename to ... - (s390_tune): ... this. - * config/s390/s390.h (s390_cpu, s390_tune): Likewise. - * config/s390/s390.c (s390_issue_rate, override_options): Likewise. - * config/s390/s390.md (attr "cpu"): Likewise. - -2003-06-30 Neil Booth - - * c-common.c (enum c_language_kind, flag_objc): Remove. - (fix_string_type, check_case_value, c_common_nodes_and_builtins, - c_add_case_label, finish_label_addr_expr, boolean_increment): - Use c_dialect_ macros. - * c-common.h (enum c_language_kind): Extend. - (c_dialect_cxx, c_dialect_objc): New. - (flag_objc): Remove. - (c_common_init_options): Update prototype. - * c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_ - macros. - * c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_ - macros. - * c-format.c (C_STD_VER, C_STD_NAME): Similarly. - * c-lang.c (c_init_options): Remove. - (c_language): Define. - (LANG_HOOKS_INIT_OPTIONS): Use common hook. - * c-lex.c (lex_charconst): Use c_dialect_ macros. - * c-opts.c (lang_flags): Make function-local. - (c_common_init_options): Use c_dialect_ macros. Handle - C++ diagnostic requirements. - (c_common_handle_option, c_common_post_options): Use flag_cxx. - * c-parse.in (init_reswords): Use c_dialect_objc (). - * c-pch.c (get_ident): Use c_language. - * c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros. - * c-typeck.c (comptypes, build_c_cast): Similarly. - * objc/objc-lang.c (c_language): Define. - (LANG_HOOKS_INIT_OPTIONS): Use common hook. - (objc_init_options): Remove. - -2003-06-30 Kazu Hirata - - * config/alpha/alpha.h (FUNCTION_ARG_PADDING): Remove. - * config/alpha/unicosmk.h: Don't #undef FUNCTION_ARG_PADDING. - -2003-06-30 Wolfgang Bangerth - - * doc/sourcebuild.texi: Don't reference gnats.html any more. - -2003-06-30 Kazu Hirata - - * config/h8300/h8300.c (compute_mov_length): Fix length of - mov:SF on H8/300. - -2003-06-30 Nick Clifton - - * config/arm/arm.h (BIGGEST_FIELD_ALIGNMENT): Make defintion - constant. - -Mon Jun 30 15:36:29 CEST 2003 Jan Hubicka - - (fyl2x_sfxf3, fyl2x_dfxf3, fscale_sfxf3, fscale_dfxf3): Fix condition. - -2003-06-30 Hartmut Penner - - * config/rs6000/rs6000.c (rs6000_split_altivec_in_gprs): New function. - (altivec_in_gprs_p): New function. - - * config/rs6000/rs6000-protos (rs6000_split_altivec_in_gprs): New - prototype. - (altivec_in_gprs_p): New prototype. - - * config/rs6000/altivec.md (*movv4si_internal): Change - multi-assembler alternative to '#'. Add postreload splitter to - handle this cases. - (*movv4hi_internal): Likewise. - (*movv4qi_internal): Likewise. - (*movv4sf_internal): Likewise. - -2003-06-30 Jason Merrill - - * defaults.h (PUSH_ARGS_REVERSED): Define default here. - * calls.c: Not here. - -2003-06-30 Ben Elliston - - * config/arm/arm.c (arm_rtx_costs): Remove #if 0 block. - (bad_signed_byte_operand): Likewise. - (arm_output_epilogue): Likewise. - (arm_final_prescan_insn): Likewise. - -2003-06-30 Rainer Orth - - * cfgrtl.c (mark_killed_regs): Cast HARD_REGNO_NREGS to int. - -2003-06-30 Rainer Orth - - * c-pch.c (c_common_write_pch): Flush asm_out_file to allow for - subsequent writes. - -Mon Jun 30 10:03:02 CEST 2003 Jan Hubicka - - * cfgrtl.c (verify_flow_info): Accept degenerated condjumps - in cfglayout mode. - -Mon Jun 30 09:52:39 CEST 2003 Jan Hubicka - - * i386.c (standard_80387_constant_p): Accept TFmode constants too. - (init_ext_80387_constants): Likewise. - (standard_80387_constant_rtx): Likewise. - * i386.md (atanxf): Disable for TARGET_128BIT_LONG_LONG - (atantf): Disable for !TARGET_128BIT_LONG_LONG - (fyl2x_sfxf3, fyl2x_dfxf3): Accept TFmode operands. - (fyl2x_xfxf3, fyl2x_tfxf3): Enable/disable as needed. - (fscale_sfxf3, fscale_dfxf3): Accept TFmode operands. - (fscale_xfxf3, fscale_tfxf3): Enable/disable as needed. - (frndinttf2): New. - (f2xm1tf2): New. - (exp?f2): Use expsf2_tf when needed. - (exp?f2_tf): New. - (exptf): New. - -2003-06-29 Uwe Stieber - - * config.gcc (sh*-*-kaos*): Put tm_file setting in separate case - statement from tmake_file set. - -2003-06-29 James E Wilson - - * reload.c (find_reloads): Change push_reloads to push_reload in - comment. - * reload1.c (eliminate_regs): Likewise. - (dump_needs): Delete prototype for deleted function. - -2003-06-29 Kaveh R. Ghazi - - * builtin-attrs.def (gcc_diag, gcc_cdiag, gcc_cxxdiag): New - format attributes. - * c-format.c (enum format_type): Add gcc_diag_format_type, - gcc_cdiag_format_type, and gcc_cxxdiag_format_type. - (gcc_diag_length_specs, gcc_cdiag_length_specs, - gcc_cxxdiag_length_specs, gcc_diag_flag_pairs, - gcc_cdiag_flag_pairs, gcc_cxxdiag_flag_pairs, gcc_diag_flag_specs, - gcc_cdiag_flag_specs, gcc_cxxdiag_flag_specs, gcc_diag_char_table, - gcc_cdiag_char_table, gcc_cxxdiag_char_table): New. - (format_types_orig): Add new data. - (find_char_info_specifier_index, init_dynamic_diag_info): New - functions. - (handle_format_attribute): Update to handle new format attributes. - -2003-06-29 Dara Hazeghi - - * doc/install.texi: Remove install documentation for obsoleted targets - i?86-*-sco, i?86-*-sco3.2v4, powerpcle-*-pe, powerpcle-*-winnt, - arm-*-aof. - Update information about IA64 toolchain, AIX make requirements, - and binutils for m68k-*-hpux and *-*-linuxaout targets. - -Mon Jun 30 00:50:43 CEST 2003 Jan Hubicka - - * regmove.c (regmove_optimize): Don't try to make src and dst match - when they are in different modes. - -Sun Jun 29 23:06:32 CEST 2003 Jan Hubicka - - * builtins.c (expand_builtin_mathfn, expand_builtin_mathfn_2): Avoid - busy work when builtin is not supported by the backend. - -2003-06-29 Zdenek Dvorak - - * loop.c (count_one_set): Fix detection of registers set in more - than one basic block. - -2003-06-29 Andreas Jaeger - - * target-def.h: Remove usage of OBJECT_FORMAT_ROSE. - * system.h: Poison OBJ_FORMAT_ROSE. - * doc/tm.texi (Macros for Initialization): Remove documentatin of - OBJECT_FORMAT_ROSE. - * config/rs6000/lynx.h: Remove undef of OBJECT_FORMAT_ROSE. - * collect2.c: Remove usage of OBJECT_FORMAT_ROSE. - -2003-06-29 John David Anglin - - * pa.c (update_total_code_bytes): New function. - (last_address): Number of bytes output for a function and its - associated thunks. - (compute_frame_size): Use BITS_PER_UNIT. - (pa_output_function_epilogue): Compute last_address. Use - update_total_code_bytes. - (output_lbranch): Handle long branch on portable runtime. - (attr_length_millicode_call, attr_length_call, - attr_length_indirect_call): Only use total_code_bytes for calls in - the text section. - (output_call): Only use an indirect call sequence when the target is - not local. - (pa_asm_output_mi_thunk): Handle updating of total_code_bytes. Improve - test to determine when an IA-relative branch can be used. Add various - long branch sequences. Avoid using an indirect branch on all ports - except SOM. - -2003-06-29 Ulrich Weigand - - * expr.c (clear_by_pieces): Fix prototype. - -2003-06-29 Andreas Jaeger - - * cse.c: Convert prototypes to ISO C90. - * cselib.c: Likewise. - * cselib.h: Likewise. - * dbxout.c: Likewise. - * debug.c: Likewise. - * df.c: Likewise. - * df.h: Likewise. - * dojump.c: Likewise. - * doloop.c: Likewise. - * dominance.c: Likewise. - * dwarf2asm.c: Likewise. - * dwarf2out.c: Likewise. - * dwarf2out.h: Likewise. - * dwarfout.c: Likewise. - * except.c: Likewise. - * except.h: Likewise. - * emit-rtl.c: Likewise. - * et-forest.c: Likewise. - * et-forest.h: Likewise. - * except.c: Likewise. - * explow.c: Likewise. - * expmed.c: Likewise. - * expr.c: Likewise. - * expr.h: Likewise. - -2003-06-29 Kazu Hirata - - * alloc-pool.c: Fix comment formatting. - * bitmap.c: Likewise. - * bitmap.h: Likewise. - * bt-load.c: Likewise. - * builtins.c: Likewise. - * caller-save.c: Likewise. - * cfganal.c: Likewise. - * cfgrtl.c: Likewise. - * collect2.c: Likewise. - * cse.c: Likewise. - * df.c: Likewise. - * diagnostic.c: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * expmed.c: Likewise. - * final.c: Likewise. - * flags.h: Likewise. - * fold-const.c: Likewise. - * gcc.c: Likewise. - * gcov-io.h: Likewise. - * gcov.c: Likewise. - * genattrtab.c: Likewise. - * genautomata.c: Likewise. - * libgcov.c: Likewise. - * mips-tfile.c: Likewise. - * optabs.c: Likewise. - * prefix.c: Likewise. - * rtlanal.c: Likewise. - * stmt.c: Likewise. - * stor-layout.c: Likewise. - * toplev.c: Likewise. - * varasm.c: Likewise. - * vmsdbgout.c: Likewise. - -2003-06-29 Kazu Hirata - - * expr.c (emit_single_push_insn): If padding is needed - downward, adjust the stack pointer first, and then store the - data into the stack location using an offset. - -2003-06-29 Andreas Jaeger - - * collect2.h: Convert prototypes to ISO C90. - * collect2.c: Likewise. - * conflict.c: Likewise. - * coverage.c: Likewise. - * convert.h: Likewise. - * convert.c: Likewise. - -2003-06-29 Nathan Sidwell - - * c-decl.c (c_init_decl_processing): Use a location_t. Set input - filename to . - * tree.c (make_node): Just copy the current location. - -2003-06-29 Eric Botcazou - - PR optimization/11210 - * fold-const (decode_field_reference): Revert 2003-06-26 patch. - -2003-06-29 Neil Booth - - * toplev.c (flag_dummy): Remove. - (f_options): Restore flag pointers. - -2003-06-29 David Edelsohn - - * config/rs6000/rs6000.c (processor_target_table): Add 970. - * config.gcc: Add 970. - -2003-06-29 Kazu Hirata - - * dwarf2out.c (add_AT_string): Replace ggc_alloc_string (X, - -1) with ggc_strdup. - * stmt.c (expand_asm_operands): Likewise. - * config/rs6000/rs6000.md (builtin_setjmp_receiver): Likewise. - -2003-06-28 Kazu Hirata - - * config/ip2k/ip2k.c (ip2k_reorg): Use INSN_P instead of its - definition. - -2003-06-29 Franz Sirl - - * opts.c: Include insn-attr.h. - * Makefile.in (opts.o): Depend on INSN_ATTR_H. - -2003-06-27 J"orn Rennecke - - * flow.c (propagate_one_insn): Use proper test for a register - being part of the return value. - -2003-06-28 Kazu Hirata - - * config/avr/avr.c: Fix a comment typo. - -2003-06-28 Kazu Hirata - - * config/avr/avr-protos.h: Replace avr_simplify_comparision_p - with avr_simplify_comparison_p. - * config/avr/avr.c: Likewise. - -2003-06-28 Kazu Hirata - - * builtins.c: Follow spelling conventions. - * cgraph.c: Likewise. - * cpplex.c: Likewise. - * config/arm/arm.c: Likewise. - * config/arm/iwmmxt.md: Likewise. - * config/c4x/c4x-modes.def: Likewise. - * config/c4x/c4x.c: Likewise. - * config/c4x/c4x.h: Likewise. - * config/c4x/c4x.md: Likewise. - * config/i386/i386-interix.h: Likewise. - * config/mips/mips.h: Likewise. - -2003-06-28 Neil Booth - - * config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Predicate - __mc68020__ on TARGET_68020. - -2003-06-28 Kazu Hirata - - * config/h8300/h8300.c: Fix a comment typo. - -2003-06-28 Nathan Sidwell - - * c-parse.in (yylexstring): Use a location_t. - - * diagnostic.h (diagnostic_set_info): Replace file and lineno - parameters with a location_t. - * diagnostic.c (diagnostic_set_info): Replace file and lineno - parameters with a location_t. - (inform, warning, pedwarn, error, sorry, fatal_error, - internal_error, warning_with_decl, pedwarn_with_decl, - error_with_decl): Adjust. - * c-error.c (pedwarn_c99): Adjust. - * c-format.c (status_warning): Adjust. - * rtl-error.c (file_and_line_for_asm): Rename to ... - (location_for_asm): Return a location_t. - (diagnostic_for_asm): Adjust. - -2003-06-28 Neil Booth - - * cpptrad.c (skip_macro_block_comment): New. - (copy_comment): Use it if appropriate. - -2003-06-28 Kazu Hirata - - * gcse.c (compute_ld_motion_mems): Use INSN_P instead of its - definition. - (store_killed_in_insn): Likewise. - * print-rtl.c (print_rtx): Likewise. - * config/frv/frv.c (frv_final_prescan_insn): Likewise. - * config/m68hc11/m68hc11.c (dead_register_here): Likewise. - (m68hc11_reassign_regs): Likewise. - (m68hc11_reorg): Likewise. - -2003-06-28 Gabriel Dos Reis - - * diagnostic.c (output_integer_with_precision): New macro. - (output_format): Use it. Handle more format specifiers. - (output_long_decimal): Remove. - (output_unsigned_decimal): Likewise. - (output_long_unsigned_decimal): Likewise. - (output_octal): Likewise. - (output_long_octal): Likewise. - (output_hexadecimal): Likewise. - (output_long_hexadecimal): Likewise. - (output_long_long_decimal): Likewise. - -2003-06-28 Andreas Schwab - - * config/ia64/ia64.md: Follow recent emit_note API change. - -2003-06-28 Nathan Sidwell - - * c-parse.in (%union): Replace filename & lineno with location. - (save_filename, save_lineno): Remove. - (save_location): New. - (fndef, old_style_parm_decls_1, lineno_datadecl, lineno_decl, - nested_function, notype_nested_function, if_prefix, lineno_stmt, - lineno_label, label): Adjust. - -2003-06-28 Jakub Jelinek - - * builtins.c (c_strlen): Add only_value argument. - Handle COND_EXPR and COMPOUND_EXPR. - (expand_builtin_strlen): Optimize also strlen (i++ ? "foo" : "bar"). - Adjust c_strlen callers. - (expand_builtin_strcpy, expand_builtin_strncpy, - expand_builtin_strcmp, expand_builtin_strncmp, - expand_builtin_fputs, expand_builtin_sprintf, - fold_builtin): Adjust c_strlen callers. - -2003-06-28 Josef Zlomek - - * bb-reorder.c (find_traces_1_round): Do not send basic block - to next round when we are in the last round. - -2003-06-28 Neil Booth - - * Makefile.in: Update. - * opts.c: Include tm_p.h. - (handle_options): Make static. - (decode_options): Copied from toplev.c. - * opts.h (decode_options): New. - * toplev.c (parse_options_and_default_flags): Move most to opts.c, - some to... - (general_init): ...here. - (toplev_main): Use decode_options instead. - * toplev.h (save_argc, save_argv): New. - -2003-06-28 Kazu Hirata - - * explow.c (find_next_ref): Remove. - * rtl.h: Remove the prototype for find_next_ref. - -2003-06-27 Roger Sayle - - * config/alpha/alpha.md (anonymous define_split): Adjust emit_note - call to match recent API change. - -2003-06-27 Zack Weinberg - - * dbxout.c (flag_debug_only_used_symbols): Delete redundant - declaration. - - * c-format.c (check_format_string, get_constant) - * cfgrtl.c (rtl_split_edge): - Mark the definition static, matching the forward declaration. - -2003-06-27 Gunther Nikl - - * unwind-c.c (PERSONALITY_FUNCTION): Delete duplicate define. - - PR target/11014 - * config/m68k/m68k.c (m68k_output_mi_thunk): Use correct assembly - syntax for MIT / MOTOROLA. - - PR other/10240 - * configure.in: Removed $(XCFLAGS) from BUILD_CFLAGS for build != host. - * configure: Rebuilt. - -2003-06-27 Chris Demetriou - - * config/mips/mips.c (mips_build_va_list): Make padding in - va_list structure explicit to avoid -Wpadded warnings. - -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 Kazu Hirata - - * combine.c (force_to_mode): Replace the equality comparison - of INTVALs with a pointer equality comparison. - (simplify_comparison): Likewise. - -2003-06-27 Kazu Hirata - - * jump.c (rtx_renumbered_equal_p): Replace an expression that - is known to be 0 with 0. - -2003-06-27 Kazu Hirata - - * gcse.c (expr_equiv_p): Replace expressions that are known to - be 0 with 0. - -2003-06-27 Kazu Hirata - - * cse.c (fold_rtx): Replace the equality comparison of INTVALs - with a pointer equality comparison. - -2003-06-27 Kazu Hirata - - * rtlanal.c (reg_mentioned_p): Return 0 earlier if REG and IN - are known to be not equivalent. - -2003-06-27 Richard Henderson - - * config/alpha/alpha.c (function_arg): Don't pass small aggregates - in floating point registers. Validate that we don't receive complex - values here. Use #elif. - (return_in_memory, function_value): New. - (alpha_va_arg): Handle complex values as two arguments. - * config/alpha/alpha.h (RETURN_IN_MEMORY): Use return_in_memory. - (FUNCTION_VALUE, LIBCALL_VALUE): Use function_value. - (SPLIT_COMPLEX_ARGS): New. - * config/alpha/alpha-protos.h: Update. - -2003-06-27 Ulrich Weigand - - * ggc-page.c (inverse_table): Change type of mult to size_t. - (compute_inverse): Compute inverse using size_t, not unsigned int. - Compute inverse also for sizes larger than half a machine page. - -Fri Jun 27 18:36:12 CEST 2003 Jan Hubicka - - * toplev.c (rest_of_decl_compilation): Only varpoolize argument - when called before cgraph_optimize. - -2003-06-27 Zack Weinberg - - * config/darwin.h, config/elfos.h, config/i960/i960-coff.h - * config/m68k/coff.h: ASM_FILE_START_FILE_DIRECTIVE should - be TARGET_ASM_FILE_START_FILE_DIRECTIVE. - -Fri Jun 27 17:41:16 CEST 2003 Jan Hubicka - - * cgraph.c (cgraph_node, cgraph_varpool_node): Avoid re-initializing - of known_decls. - -2003-06-27 Hans-Peter Nilsson - - * defaults.h (REGISTER_MOVE_COST): Define default here. - * regclass.c: Don't define default REGISTER_MOVE_COST here. - * reload.c, reload1.c: Ditto. - -2003-06-27 Richard Earnshaw - - * flags.h: Really install previous change. - -2003-06-27 Nathan Sidwell - - * rtl.h (emit_note): Remove FILE parameter. - * emit-rtl.c (emit_line_note): Adjust emit_note call. - (emit_note): Remove FILE parameter. Adjust. - * builtins.c (expand_builtin_expect): Adjust emit_note call. - * c-semantics.c (genrtl_scope_stmt): Likewise. - (expand_stmt): Likewise. - * cfglayout.c (reemit_insn_block_notes): Likewise. - (duplicate_insn_chain): Likewise. - * except.c (expand_eh_region_start, expand_eh_region_end, - sjlj_emit_function_enter): Likewise. - * explow.c (probe_stack_range): Likewise. - * expr.c (emit_block_move_via_loop): Likewise. - * function.c (init_function_start, expand_function_start, - expand_function_end, thread_prologue_and_epilogue_insns): Likewise. - * integrate.c (expand_inline_function, copy_insn_list): Likewise. - * reg-stack.c (compensate_edge): Likewise. - * reload1.c (reload): Likewise. - * rtlanal.c (hoist_insn_to_edge): Likewise. - * stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop, - expand_loop_continue_here, expand_end_loop, expand_continue_loop, - expand_exit_loop_top_cond, expand_value_return, - expand_start_bindings_and_block, expand_end_bindings, - expand_decl_cleanup, expand_start_case): Likewise. - * unroll.c (copy_loop_body - * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. - * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. - * config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore, - rs6000_emit_allocate_stack, rs6000_output_function_prologue, - rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise. - * config/sh/sh.c (sh_output_mi_thunk): Likewise. - * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. - -2003-06-27 Nathan Sidwell - - * c-tree.h (grokfield): Remove unused filename and line parameters. - * c-decl.c (grokfield): Remove unused filename and line parameters. - * c-parse.in (component_decl): Adjust field grokking rules, adjust - grokfield calls. - (component_declarator): Likewise. - (component_notype_declarator): Likewise. - * objc/objc-act.c (build_module_descriptor): Adjust grokfield - calls. - (build_protocol_template, build_method_prototype_list_template, - build_method_prototype_template, build_category_template, - build_selector_template, build_class_template, - build_super_template, build_ivar_template, - build_ivar_list_template, build_method_list_template, - build_method_template, add_instance_variable): Likewise. - -2003-06-27 Kazu Hirata - - * stmt.c (do_jump_if_equal): Return 0 earlier if OP1 and - OP2 are known to be not equivalent. - -2003-06-26 Devang Patel - - * final.c (debug_flush_symbol_queue): New function. - (debug_queue_symbol): New function. - (debug_free_queue): New function. - (debug_nesting): New variable. - (symbol_queue): New variable. - (symbol_queue_index): Same. - (symbol_queue_size): Same. - * debug.h (debug_flush_symbol_queue): New. - (debug_queue_symbol): New. - (debug_free_queue): New. - (debug_nesting): New. - (symbol_queue_index): New. - * dbxout.c (DBXOUT_DECR_NESTING): New macro. - (DBXOUT_DECR_NESTING_AND_RETURN): New macro. - (dbxout_init): Delay symbol output. - (dbxout_global_decl): Save, set and reset TREE_USED bit around - dbxout_symbol() call. - (dbxout_begin_function): Same. - (dbxout_finish): Free symbol queue. - (dbxout_type): Put appropriate symbols in queue. - (dbxout_symbol): Put info for symbol's type in queue. - Decrement/Increment nesting counts flush symbol queue appropriately. - (dbxout_parms): Increment dbxout nesting. - (dbxout_reg_parms): Same. - * flags.h (flag_debug_only_used_symbols): New. - * toplev.c (flag_debug_only_used_symbols): New variable. - (lang_independent_options): Add entries for new option - -feliminate-unused-debug-symbols. - * common.opt: Add entry for -feliminate-unused-debug-symbols. - * opts.c (common_handle_options): Same. - * config/rs6000/darwin.h (CC1_SPEC): Interpret -gused as - -feliminate-unused-debug-symbols. - * doc/invoke.texi (Debugging Options): Document - -feliminate-unused-debug-symbols. - -2003-06-26 Roger Sayle - Jakub Jelinek - - * builtins.c (expand_builtin_sprintf): Use c_getstr and strlen to - obtain the format string instead of using TREE_STRING_POINTER and - TREE_STRING_LENGTH. Only optimize sprintf(dst,"%s",src) when the - return value is unused or the length of src is a known constant. - -2003-06-26 Richard Henderson - - * config/ia64/ia64.h (REGISTER_NAMES): R0 is really AP. - -2003-06-26 Richard Henderson - - * config/ia64/ia64.c (ia64_expand_call): Don't add ar.pfs for sibcalls. - (ia64_split_call): Only load descriptor for GP register inputs. - (ia64_expand_epilogue): Check current_frame_info.mask not - current_function_is_leaf to restore ar.pfs. - -2003-06-26 Richard Henderson - - * emit-rtl.c (try_split): Append to new CALL_INSN_FUNCTION_USAGE - instead of replacing it. - -2003-06-26 Richard Henderson - - * flow.c (propagate_one_insn): Kill function return value - registers across tail calls. - - * flow.c (propagate_one_insn): Preserve live-at-end registers - across tail calls. - -2003-06-26 J"orn Rennecke - - * reload.c (can_reload_into): New function. - (push_reload): Use it. - -2003-06-26 Kazu Hirata - - * config/h8300/h8300.c (compute_a_rotate_length): Fix the - references to the amount of a rotation. - -2003-06-26 Nathanael Nerode - - * config/sh/coff.h: Don't include dbxcoff.h. - * config.gcc: List it here. - -2003-06-26 Kazu Hirata - - * postreload.c (reload_cse_simplify_set): Call cselib_lookup - earlier. Don't check if SRC is a constant. - -2003-06-26 Kazu Hirata - - * Makefile.in (OBJS): Add postreload.o. - Remove cselib.h from the dependency list for reload1.o. - Add a dependency list for postreload.o. - * reload.h: Change the comment for the prototype of - reload_cse_regs. - * reload1.c: Don't include cselib.h. - (reload_cse_regs): Move to postreload.c - (reload_cse_regs_1): Likewise. - (reload_cse_noop_set_p): Likewise. - (reload_cse_simplify_set): Likewise. - (reload_cse_simplify_operands): Likewise. - (RELOAD_COMBINE_MAX_USES): Likewise. - (reload_combine_ruid): Likewise. - (LABEL_LIVE): Likewise. - (reload_combine): Likewise. - (reload_combine_note_use): Likewise. - (reload_combine_note_store): Likewise. - (reg_set_luid): Likewise. - (reg_offset): Likewise. - (reg_base_reg): Likewise. - (reg_mode): Likewise. - (move2add_luid): Likewise. - (move2add_last_label_luid): Likewise. - (MODES_OK_FOR_MOVE2ADD): Likewise. - (reload_cse_move2add): Likewise. - (move2add_note_store): Likewise. - (reload_cse_simplify): Likewise. - * postreload.c: New. - -2003-06-26 Kazu Hirata - - * config/avr/avr.c (final_prescan_insn): Remove support for - -mrtl. - * config/avr/avr.h (MASK_RTL_DUMP): Remove. - (TARGET_RTL_DUMP): Likewise. - (TARGET_SWITCHES): Remove -mrtl. - -2003-06-26 Kazu Hirata - - * config/h8300/h8300-protos.h: Change emit_a_rotate to - output_a_rotate. Add a prototype for compute_a_rotate_length. - * config/h8300/h8300.c (emit_a_rotate): Change to - output_a_rotate. - (compute_a_rotate_length): New. - (h8300_adjust_insn_length): Remove. - * config/h8300/h8300.h (ADJUST_INSN_LENGTH): Remove. - * config/h8300/h8300.md (adjust_length): Remove. - (*rotlqi3_1): Use output_a_rotate and compute_a_rotate_length. - (*rotlhi3_1): Likewise. - (*rotlsi3_1): Likewise. - -2003-06-26 Roger Sayle - Richard Henderson - - * builtins.c (expand_builtin_mathfn): Always stabilize the argument - list against re-evaluation. If expand_unop fails, call expand_call - with the stabilized argument list rather than return NULL_RTX. - (expand_builtin_mathfn2): Likewise, always stabilize the argument - list, and call expand_call ourselves if expand_binop fails. - -2003-06-26 Eric Botcazou - - PR optimization/11210 - * fold-const (decode_field_reference): Strip only NOPs that - don't affect the sign. - -2003-06-26 Dhananjay Deshpande - - * gcc/config/sh/sh.md (push_fpscr): Enable for TARGET_SH2E. - (pop_fpscr, fpu_switch): Likewise. - -2003-06-26 Zdenek Dvorak - - * value-prof.c: New. - * value-prof.h: New. - * Makefile.in (value-prof.o): New. - (LIBGCOV): Add _gcov_merge_single and _gcov_merge_delta - (profile.o): Add value-prof.h and tree.h dependency. - * flags.h (flag_profile_values): Declare. - * gcov-io.h (GCOV_COUNTERS, GCOV_COUNTER_NAMES, GCOV_MERGE_FUNCTIONS): - Add new counters. - (GCOV_COUNTER_V_INTERVAL, GCOV_COUNTER_V_POW2, GCOV_COUNTER_V_SINGLE, - GCOV_COUNTER_V_DELTA): New counter sections. - (__gcov_merge_single, __gcov_merge_delta): Declare. - * flow.c (mark_used_regs): Set subregs_of_mode only when the - structure is initialized. - * libgcov.c (__gcov_merge_single, __gcov_merge_delta): New functions. - * profile.c: Include value-prof.h and tree.h. - (gen_interval_profiler, gen_pow2_profiler, gen_one_value_profiler, - gen_const_delta_profiler, instrument_values): New static functions. - (get_exec_counts): Fix comment. - (branch_prob): Invoke instrument_values. - * toplev.c (flag_profile_values): New flag. - * doc/invoke.texi (-fprofile-values): Document. - -2003-06-26 Zdenek Dvorak - - * Makefile.in (cfgrtl.o): Add expr.h dependency. - * cfgrtl.c: Include expr.h. - (mark_killed_regs, safe_insert_insn_on_edge): New - functions. - * config/i386/i386.h (AVOID_CCMODE_COPIES): Define. - * basic-block.h (safe_insert_insn_on_edge): Declare. - -2003-06-26 Neil Booth - - * c-opts.c (missing_arg): Make non-static. - (c_common_handle_option): Don't check for missing arguments. - * opts.c (handle_option): Check for missing arguments. - -2003-06-26 David Edelsohn - - * config/rs6000/power4.md (power4-veccomplex): Correct latency. - -2003-06-25 Loren James Rittle - - * configure.in (ld_vers): Portability [sed]. - * configure: Regenerate with autoconf213. - -2003-06-25 H.J. Lu - - * doc/extend.texi: Document new builtin functions for Intel - Prescott New Intrunctions. - - * doc/invoke.texi: Document new command-line options, -mpni and - -mno-pni, for Intel Prescott New Intrunctions. - - * config.gcc (extra_headers): Add pmmintrin.h for i[34567]86-*-*. - - * config/i386/i386.c (override_options): Turn on MASK_SSE2 - for -mpni. Turn on MASK_SSE for -msse2. - (bdesc_2arg): Add PNI builtins with 2 args. - (bdesc_1arg): Add PNI builtins with 1 arg. - (ix86_init_mmx_sse_builtins): Handle PNI builtins. - (ix86_expand_builtin): Likewise. - - * config/i386/i386.h (MASK_3DNOW, MASK_3DNOW_A, - MASK_128BIT_LONG_DOUBLE, MASK_64BIT, MASK_MS_BITFIELD_LAYOUT, - MASK_TLS_DIRECT_SEG_REFS): Renumbered. - (TARGET_PNI): New. - (TARGET_SWITCHES): Don't enable MASK_SSE for -msse2 here. Add - -mpni and -mno-pni. - (TARGET_CPU_CPP_BUILTINS): Defined __PNI__ for PNI. - (ix86_builtins): Add PNI builtins. - (config/i386/i386.md): Add PNI patterns. - - * config/i386/pmmintrin.h: New file. - -2003-06-25 Kazu Hirata - - * config/h8300/h8300.md (call): Fix the insn lengths. - (call_value): Likewise. - -Thu Jun 26 00:13:35 CEST 2003 Jan Hubicka - - * c-common.c (handle_used_attribute): Use mark_referenced. - * varasm.c (mark_referenced): Break out from ... - (assemble_name): ... here. - * tree.h (mark_referenced): Declare. - -2003-06-25 Wolfgang Bangerth - - * gccbug.in: Add PCH to list of categories. - -2003-06-25 Martin Schaffner - - * cppfiles.c: Clarify comments. - * cpphash.h: Likewise. - * cpplib.h: Likewise. - * cppmacro.c: Likewise. - * mkdeps.h: Likewise. - -2003-06-25 Neil Booth - - * c-opts.c (complain_wrong_lang, write_langs): Remove. - (c_common_handle_option): Complaints about wrong language are - handled in opts.c now. - * opts.c (complain_wrong_lang, write_langs, handle_options): New. - (find_opt): Fix thinko. - (handle_option): Update prototype. Complain about switches for - a different front end. - * opts.h (lang_names, handle_options): New. - (handle_option): Remove. - * opts.sh: Write out language names array. - * toplev.c (parse_options_and_default_flags): Use handle_options. - -2003-06-25 H.J. Lu - - * config/i386/i386.c (MASK_SSE1): Removed. - (MASK_SSE164): Removed. - (MASK_SSE264): Removed. - (bdesc_2arg): Replace MASK_SSE1 with MASK_SSE. Replace - MASK_SSE164 with MASK_SSE | MASK_64BIT. Replace MASK_SSE264 - with MASK_SSE2 | MASK_64BIT. - (bdesc_1arg): Likewise. - (ix86_init_mmx_sse_builtins): Likewise. - - * config/i386/i386.h (TARGET_SSE): Remove MASK_SSE2. - (TARGET_SWITCHES): Enable both MASK_SSE and MASK_SSE2 for - -msse2. - -2003-06-25 Kaveh R. Ghazi - - * hwint.h (HOST_WIDE_INT_PRINT, HOST_WIDE_INT_PRINT_C): New macros. - (HOST_WIDE_INT_PRINT_DEC_SPACE, - HOST_WIDE_INT_PRINT_UNSIGNED_SPACE, - HOST_WIDEST_INT_PRINT_DEC_SPACE, - HOST_WIDEST_INT_PRINT_UNSIGNED_SPACE): Delete. - (HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_PRINT_DEC_C, - HOST_WIDE_INT_PRINT_UNSIGNED, HOST_WIDE_INT_PRINT_HEX): Define in - terms of HOST_WIDE_INT_PRINT and possibly HOST_WIDE_INT_PRINT_C. - - * final.c (asm_fprintf): Use HOST_WIDE_INT_PRINT. - * ra-debug.c (dump_static_insn_cost): Likewise. - -2003-06-26 Nick Clifton - - * config/arm/arm.h (BIGGEST_FIELD_ALIGNMENT): Define instead - of ADJUST_FIELD_ALIGN if IN_TARGET_LIBS. - Replace occurances of '???' with 'XXX' incase they are - mistaken for trigraphs. - (THUMB_PRINT_OPERAND_ADDRESS): abort if a compound address - does not have a register for the first operand. - -2003-06-25 Dhananjay Deshpande - - * config/sh/sh.c (sh_register_move_cost): - Add case for moving between MAC_REGS. - -2003-06-25 Zack Weinberg - - PR 10178 - * langhooks.h (struct lang_hooks): Add no_body_blocks bool. - * langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): New; default false. - * c-lang.c, objc/objc-lang.c: Override LANG_HOOKS_NO_BODY_BLOCKS - to true. - * stmt.c (is_body_block): If lang_hooks.no_body_blocks, always - return 0. - -2003-06-25 Kaveh R. Ghazi - - * Makefile.in (bt-load.o): Depend on $(TM_P_H). - * bt-load.c: Include "tm_p.h". - -2003-06-25 Kazu Hirata - - * config/h8300/h8300.c (compute_mov_length): Adjust for the - new optimization. - * config/h8300/h8300.md (*movsi_h8300): Optimize the load of - an SImode constant whose upper and lower are the same. - -Wed Jun 25 11:31:59 CEST 2003 Jan Hubicka - - * varasm.c (assemble_name): Mark needed variables even when - global info is ready. - -2003-06-24 Jerry Quinn - - PR other/11280 - * gcc/doc/invoke.texi (Optimization Options): Remove -Os from - -freorder-functions description. - -2003-06-25 Josef Zlomek - - * dwarf2out.c (gen_field_die): Return if type of decl is error mark. - -2003-06-25 Neil Booth - - * opts.c (common_handle_option): Add missing break;s. - -2003-06-24 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - compute_mov_length. - * config/h8300/h8300.c (compute_mov_length): New. - * config/h8300/h8300.md (*movqi_h8300): Use it. - (*movqi_h8300hs): Likewise. - (movstrictqi): Likewise. - (*movhi_h8300): Likewise. - (*movhi_h8300hs): Likewise. - (movstricthi): Likewise. - (*movsi_h8300): Likewise. - (*movsf_h8300): Likewise. - (*movsi_h8300hs): Likewise. - (*movsf_h8300hs): Likewise. - -2003-06-24 Kazu Hirata - - * jump.c (next_nondeleted_insn): Remove. - * rtl.h: Remove the prototype for next_nondeleted_insn. - -2003-06-24 Roger Sayle - - PR optimization/11311 - * builtins.c (powi_cost): Fix typo. The number of multiplications - required is the number to reduce the argument, result, plus the - cost of calculating the residual, val [not n, the original value]. - -2003-06-24 Roger Sayle - - * config/alpha/osf5.h (TARGET_C99_FUNCTIONS): Define. - -2003-06-24 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-06-24 Kazu Hirata - - * config/h8300/h8300.md (4 anonymous patterns): Give internal - names. - (movsi_h8300): Change the name to *movsi_h8300. - (movsi_h8300hs): Change the name to *movsi_h8300hs. - (movsf_h8300): Change the name to *movsf_h8300. - (movsf_h8300hs): Change the name to *movsf_h8300hs. - -2003-06-24 Jakub Jelinek - - * builtins.c (expand_builtin_strcpy): Don't evaluate side-effects in - src twice. - -2003-06-24 J"orn Rennecke - - Back out these patches: - 2003-06-02 J"orn Rennecke - * sh.h (OLD_ARG_MODE): New macro. - (FUNCTION_ARG_ADVANCE, FUNCTION_ARG_PASS_BY_REFERENCE): Use it. - (FUNCTION_ARG_1): Break out of: - (FUNCTION_ARG). Use OLD_ARG_MODE. - 2003-06-06 J"orn Rennecke - * sh.h (FUNCTION_ARG_1): Consistently use NEW_MODE for the mode - of the generated register. - - * sh.h (FUNCTION_ARG_SCmode_WART): Define. - (FUNCTION_ARG): Unless FUNCTION_ARG_SCmode_WART is defined and - an even number of floating point regs are in use, use the same - sequence of argument passing registers for SCmode as would be - used for two SFmode values. - * sh.c (sh_va_arg): If FUNCTION_ARG_SCmode_WART is defined, - swap real / imaginary parts in incoming SCmode values passed - in registers. - -2003-06-24 Falk Hueffner - - PR target/11260 - * config/alpha/alpha.md (sqrtdf2): Fix operand substitution. - -Tue Jun 24 18:49:33 CEST 2003 Jan Hubicka - - * Makefile.in (cgraph.o): Depend on output.h, not depend on - tree-inline.h - * cgraph.c: Do not include tree-inline.h; include output.h - (known_fns): Rename to ... - (known_decls): ... this one; update all uses. - (cgraph_varpool_hash): New static variable. - (cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): New global - variables. - (cgraph_varpool_hash_node, eq_cgraph_varpool_node, cgraph_varpool_node, - cgraph_varpool_node_for_identifier, cgraph_varpool_mark_needed_node, - cgraph_varpool_finalize_decl, cgraph_varpool_assemble_pending_decls): - New functions. - * cgraph.h (cgraph_varpool_node): New structure. - (cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): Declare. - (cgraph_varpool_node, cgraph_varpool_node_for_identifier, - cgraph_varpool_finalize_decl, cgraph_varpool_mark_needed_node, - cgraph_varpool_asemble_pending_decls): Declare. - * cgraphunit.c (record_call_1): Notice variable references. - (cgraph_finalize_compilation_unit): Assemble pending variables. - * toplev.c (wrapup_global_declarations): Use varpool. - (compile_file): Assemble pending declarations. - (rest_of_decl_compilation): Use varpool in unit-at-a-time mode. - * varasm.c (assemble_name): Notice varpool references. - -Tue Jun 24 13:52:11 CEST 2003 Jan Hubicka - - * langhooks-def.h (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): New macro. - * langhooks.h (lang_hooks_for_decls): Add prepare_assemble_variable. - * varasm.c (assemble_variable): Call prepare_assemble_variable. - -2003-06-23 Roger Sayle - - * builtins.c (expand_builtin): Use expand_builtin_pow to expand - calls for pow, powf, powl and their __builtin_ variants. - (expand_builtin_pow): If the second argument is a constant - integer and compiling with -ffast-math, use expand_powi to - generate RTL if powi_cost is less than POWI_MAX_MULTS. - (powi_cost): New function to return the number of multiplications - necessary to evaluate an Nth power, for integer constant N. - (expand_powi): New function to expand the RTL for evaluating - the Nth power of a floating point value, for integer constant N. - - * doc/tm.texi (POWI_MAX_MULTS): Document new target macro. - -Mon Jun 23 23:07:35 CEST 2003 Jan Hubicka - - * cgraph.c (cgraph_nodes_queue): Declare. - (eq_node): Take identifier as p2. - (cgraph_node): Update htab_find_slot_with_hash call. - (cgraph_node_for_identifier): New. - (cgraph_mark_needed_node): Move here from cgraphunit.c. - * cgraph.h (cgraph_nodes_queue): Declare. - (cgraph_node_for_identifier): Declare. - * cgraphunit.c (cgraph_finalize_function): Collect entry points here - instead of in cgraph_finalize_compilation_unit; constructors and - destructors are entry points. - (cgraph_finalize_compilation_unit): Reorganize debug outout; - examine nested functions after lowerng; call collect_functions hook. - (cgraph_mark_local_functions): DECL_COMDAT functions are not local. - (cgraph_finalize_compilation_unit): Do not collect entry points. - * varasm.c: Include cgraph.h - (assemble_name): Mark referenced identifier as needed. - - * cgraphunit.c (record_call_1): Use get_callee_fndecl. - -2003-06-23 Jakub Jelinek - - * config/i386/i386.c (x86_output_mi_thunk): Don't pass MEM to %P0, - just SYMBOL_REF. - * config/s390/s390.c (s390_output_mi_thunk): Avoid .plt in -m31 - mode, as it requires pic register loaded. - - * varasm.c (resolve_unique_section): Remove prototype. No longer - static. - * tree.h (resolve_unique_section): New prototype. - -2003-06-23 Andreas Schwab - - PR debug/9905 - * dwarf2out.c (loc_descriptor_from_tree): Handle MODIFY_EXPR by - recursing through first argument. - -2003-06-23 Kazu Hirata - - * ChangeLog.1: Fix a typo. - * cfgrtl.c: Fix comment typos. - * dwarf2out.c: Likewise. - * expmed.c: Likewise. - * genrecog.c: Likewise. - * jump.c: Likewise. - * rtlanal.c: Likewise. - * ssa-dce.c: Likewise. - * toplev.c: Likewise. - -2003-06-23 Kazu Hirata - - * doc/extend.texi: Fix typos. - * doc/md.texi: Likewise. - * doc/tm.texi: Likewise. - -2003-06-23 Kazu Hirata - - * basic-block.h: Fix comment formatting. - * bt-load.c: Likewise. - * builtins.c: Likewise. - * c-common.c: Likewise. - * c-common.h: Likewise. - * c-format.c: Likewise. - * coverage.c: Likewise. - * cpplib.h: Likewise. - * cpppch.c: Likewise. - * dbxout.c: Likewise. - * diagnostic.c: Likewise. - * dwarf2out.c: Likewise. - * expr.c: Likewise. - * fold-const.c: Likewise. - * function.c: Likewise. - * gcc.c: Likewise. - * gcov-io.c: Likewise. - * gcov-io.h: Likewise. - * gcov.c: Likewise. - * profile.c: Likewise. - * real.h: Likewise. - * sched-deps.c: 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 Nick Clifton - - * read-rtl.c (read_braced_string): Check for EOF. If - encountered issue an error message. - -2003-06-23 Kazu Hirata - - * doc/invoke.texi: Document dump options, dT and dW. - -2003-06-23 Kazu Hirata - - * genrecog.c (pred_table): Remove the entry for - mode_independent_operand. - * recog.c (next_insns_test_no_inequality): Remove. - (mode_independent_operand): Likewise. - * recog.h: Remove the prototype for mode_independent_operand. - -2003-06-22 Kazu Hirata - - * config/h8300/h8300.c (output_simode_bld): Use rotxl.l to - store into bit 0. - * config/h8300/h8300.md (*extzv_1_r_h8300hs): Change cc of the - second alternative to set_znv. - (*extzv_1_r_inv_h8300hs): Likewise. - -2003-06-23 Hans-Peter Nilsson - - * configure.in (in_tree_gas): Find out here whether GAS is ELF, - set in_tree_gas_is_elf accordingly. - (in_tree_ld): Find out whether LD emulation is ELF, set - in_tree_ld_is_elf accordingly. - (gcc_cv_as_subsections, gcc_cv_as_hidden, gcc_cv_as_leb128) - (gcc_cv_as_eh_frame, gcc_cv_as_shf_merge) - (gcc_cv_as_dwarf2_debug_line, gcc_cv_as_gdwarf2_flag) - (gcc_cv_as_gstabs_flag): Use $in_tree_gas_is_elf instead of - grepping gas/Makefile. - (gcc_cv_ld_ro_rw_mix, gcc_cv_ld_eh_frame_hdr, gcc_cv_ld_pie): Use - $in_tree_ld_is_elf instead of grepping ld/Makefile. - * configure: Regenerate. - -2003-06-22 Roger Sayle - - * builtins.c (expand_builtin_mathfn_2): Use tree_cons to build - up the stabilized argument list, not build_tree_list. - (expand_builtin_strcpy): Construct new argument list manually - instead of using chainon to modify the original argument list. - (expand_builtin_stpcpy): Construct new argument list manually - instead of using copy_list and chainon. - (expand_builtin_sprintf): New function. Optimize calls to - sprintf when the format is "%s" or doesn't contain a '%'. - (expand_builtin): Expand BUILT_IN_SPRINTF using the new function - expand_builtin_sprintf. - -2003-06-22 Andreas Schwab - - * function.c (set_insn_locators): Mark as unused. - -2003-06-22 Neil Booth - - * common.opt: Add -finline-limit. - * opts.c (common_handle_options): Handle it. - * opts.sh: Temporary kludge for -finline-limit. - * toplev.c (decode_f_option, independent_decode_option): Die. - (parse_options_and_default_flags): No independent_decode_option. - -2003-06-22 Andreas Jaeger - - * calls.c (emit_call_1): Readd lost ATTRIBUTE_UNUSED. - -2003-06-22 Kazu Hirata - - * doc/invoke.texi: Document dumps, .btl, .cfg, and .bypass. - -2003-06-22 Andreas Schwab - - * doc/invoke.texi: Remove leading `-' from options in index. - -2003-06-22 Kazu Hirata - - * bt-load.c: Follow spelling conventions. - -2003-06-22 Kazu Hirata - - * expr.c (emit_move_insn_1): Fix a comment typo. - -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/invoke.texi: Update dump file names. - -2003-06-22 Zack Weinberg - - * config/i370/i370.c, config/i370/i370.h: Use HOST_CHARSET_ASCII - and HOST_CHARSET_EBCDIC, not HC_ASCII and HC_EBCDIC. - -2003-06-22 Kazu Hirata - - * doc/rtl.texi: Fix the @findex for pre_modify. - -2003-06-22 Andreas Jaeger - - * caller-save.c: Convert to ISO C90. - * calls.c: Likewise. - * cfg.c: Likewise. - * cfganal.c: Likewise. - * cfgbuild.c: Likewise. - * cfgcleanup.c: Likewise. - * cfghooks.c: Likewise. - * cfglayout.c: Likewise. - * cfglayout.h: Likewise. - * cfgloop.c: Likewise. - * cfgloop.h: Likewise. - * cfgloopanal.c: Likewise. - * cfgloopmainip.c: Likewise. - * cfgrtl.c: Likewise. - -2003-06-22 Richard Earnshaw - - * arm.h (BIGGEST_ALIGNMENT): Use TARGET_REALLY_IWMMXT for selecting - 64-bit alignment. - -2003-06-22 Richard Earnshaw - - * arm.md (all call_value patterns): Remove register constraints on - value operand. - -2003-06-22 Neil Booth - - * common.opt: More -f switches. - * opts.c (common_handle_options): Handle them. - * toplev.c (time_report): Make extern. - (f_options): USe flag_dummy. - (decode_f_option): No need to use f_options now. - * toplev.h (flag_cprop_registers, flag_ssa, flag_ssa_ccp, - flag_ssa_dce, time_report, flag_new_regalloc): Make extern. - -2003-06-22 Andreas Jaeger - - * c-lex.c: Convert to ISO C90. - * c-objc-common.c: Likewise. - * c-opts.c: Likewise. - * c-pch.c: Likewise. - * c-ppoutput.c: Likewise. - * c-pragma.h: Likewise. - * c-pretty-print.c: Likewise. - * c-pretty-print.h: Likewise. - * c-semantics.c: Likewise. - * c-tree.h: Likewise. - * c-typeck.c: Likewise. - - * c-lang.c: Convert to ISO C90. - -2003-06-22 Neil Booth - - * opts.c (find_opt): Fix to always guarantee a find of a - switch with joined parameter. - * opts.h (struct cl_option): New member back_chain. - * opts.sh: Update to calculate and add back_chain member. - -2003-06-22 Gabriel Dos Reis - - * diagnostic.h (output_host_wide_integer): Declare. - * diagnostic.c (output_long_long_decicaml): New function. - (output_host_wide_integer): Likewise. - (output_format): Use them. Handle "%ll" and "%w". - -2003-06-21 Jason Thorpe - - * config.gcc (*-*-netbsd*): Add t-libgcc-pic to tmake_file. - -2003-06-21 Zack Weinberg - - * aclocal.m4 (gcc_AC_C_CHARSET): Delete. - * configure.in: Don't use gcc_AC_C_CHARSET. - * configure, config.in: Regenerate. - * config/i370/i370.c, config/i370/i370.h: Use - (HOST_CHARSET == HC_EBCDIC) or (HOST_CHARSET == HC_ASCII) - instead of HOST_EBCDIC or !HOST_EBCDIC. Clarify comments a tad. - -2003-06-21 Neil Booth - - * Makefile.in: Update. - * common.opt: New switches. - * opts.c: Include diagnostic.h. - (common_handle_option): Handle new switches. - * toplev.c (flag_loop_optimize, flag_crossjumping, flag_if_conversion, - flag_if_conversion2, flag_delete_null_pointer_checks, - flag_rerun_cse_after_loop): Make extern. - (flag_dummy): New. - (f_options): Update to use flag_dummy for moved options. - (decode_f_option): Some switches moved to opts.c. - * toplev.h (flag_loop_optimize, flag_crossjumping, flag_if_conversion, - flag_if_conversion2, flag_delete_null_pointer_checks, - flag_rerun_cse_after_loop, flag_keep_static_consts, flag_peel_loops, - flag_tracer, flag_thread_jumps, flag_unroll_loops, - flag_unroll_all_loops, flag_unswitch_loops): New. - -Sat Jun 21 13:41:00 CEST 2003 Jan Hubicka - - * i386.c (ix86_va_arg): Fix allocation of temporary slot. - -2003-06-20 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - same_cmp_preceding_p. - * config/h8300/h8300.c (same_cmp_preceding): New. - * config/h8300/h8300.md: Extend peephole2's that transform - compare:SI into shorter sequences so that they can deal with - signed comparisons. - -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-21 Nathanael Nerode - - * mkconfig.sh: Add multiple inclusion guards to generated headers. - -2003-06-20 Neil Booth - - * c-decl.c (store_parm_decls): Make saved_warn_shadow boolean. - * common.opt: Add remaining -W options and -g. - * diagnostic.c (warnings_are_errors): Remove. - * flags.h: Make most warning flags boolean. - * opts.c (common_handle_option): Handle remaining -W options, and -g. - Move many warning flags from toplev.c, making them boolean. - * toplev.c: Remove many warning flags. - (decode_W_option): Remove. - (decode_g_option): Make extern. Error on unknown switch. - (lang_independent_W_options): Use warn_dummy. - (independent_decode_option): Just handle -f switches now. - * toplev.h (decode_g_option): New. - -2003-06-20 Aldy Hernandez - - PR/11092 - * config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Adjust for - vectors. - -2003-06-20 Kelley Cook - - * opts.sh: Tweak awk script for portability. - -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 Richard Henderson - - * config/alpha/alpha.c (alpha_file_start): Disable - file_start_file_directive for ELF and not MDEBUG. - -2003-06-20 J"orn Rennecke - - * sh.h (ROUND_TYPE_ALIGN): Remove. - -2003-06-20 Richard Henderson - - * hooks.c (hook_int_void_no_regs): Rename from - hook_reg_class_void_no_regs; change return type. - * hooks.h: Update. - * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Update. - * target.h (branch_target_register_class): Change return type to int. - Add documentation. - * config/sh/sh.c (sh_target_reg_class): Change return type. - * doc/tm.texi (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. - -2003-06-20 Andreas Tobler - - * c-format.c: Change _Bool to bool reverting part of the last - patch. - -2003-06-20 John David Anglin - - * som.h (ASM_OUTPUT_SOURCE_LINE): Use targetm.strip_name_encoding to - strip name encoding. - -2003-06-20 Rainer Orth - - * configure.in (gcc_cv_as_gstabs_flag): Disable if assembler warns. - * configure: Regenerate. - Fixes PR driver/9362. - -2003-06-20 Richard Kenner - - * config/alpha/alpha.c (alpha_file_start): Fix typo. - -2003-06-20 Rainer Orth - - * config/mips/mips.h (PUT_SDB_FUNCTION_END): Pass 0 as third arg - to ASM_OUTPUT_SOURCE_LINE. - -2003-06-20 Daniel Egger - Gerald Pfeifer - - * doc/install.texi (Building): Correct and improve statement - about parallel builds. - -2003-06-20 Andreas Jaeger - - * c-common.c: Change _Bool to bool reverting part of the last - patch. - -2003-06-20 Nathan Sidwell - - * tree.h (expand_function_end): Remove all parameters. - * function.c (expand_function_end): Remove all parameters. - Use input_location. Never expand_end_bindings. - * c-decl.c (c_expand_body_1): Adjust expand_function_end call. - * coverage.c (create_coverage): Likewise. - -2003-06-20 Nick Clifton - - * doc/extend.texi (ARM Built-in Functions): New node. Document - ARM builtin functions for iWMMXt support. - -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 Zack Weinberg - - * doc/tm.texi: Uniformly use @defmac for macros, rather than - @table items. Minor formatting and editorial corrections. - -2003-06-20 Neil Booth - - * line-map.c, line-map.h: Convert to ISO prototypes. - -2003-06-20 Zdenek Dvorak - - * gcse.c (store_killed_in_insn): Fix. - -2003-06-19 Zack Weinberg - - * target.h (asm_out.file_start, file_start_app_off, - file_start_file_directive): New hooks. - * target-def.h (TARGET_ASM_FILE_START_FILE_DIRECTIVE, - TARGET_ASM_FILE_START_APP_OFF, TARGET_ASM_FILE_START): - New hook-definition macros. - * doc/tm.texi: Document new hooks; remove docs of ASM_FILE_START. - * varasm.c (default_file_start): New. - * output.h: Prototype it. - * toplev.c (init_asm_output): Use targetm.asm_out.file_start. - * system.h: Poison ASM_FILE_START. - - * config/alpha/alpha.c (alpha_write_verstamp): Delete. - (alpha_file_start): New, define if !TARGET_ABI_UNICOSMK. - (unicosmk_asm_file_start): Rename unicosmk_file_start, - make static, take no arguments. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_END, - TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set as appropriate. - * config/alpha/unicosmk.h: Don't define ASM_FILE_START nor - TARGET_ASM_FILE_END. Remove reference to ASM_FILE_START in - comment. - * config/arc/arc.c (arc_asm_file_start): Rename - arc_file_start, take no arguments, make static. - (TARGET_ASM_FILE_START): Set it. - * config/arm/arm.c (aof_file_start): New static function. - (TARGET_ASM_FILE_START): Set it, when appropriate. - * config/arm/coff.h, config/arm/elf.h: - Set TARGET_ASM_FILE_START_APP_OFF to true. - * config/avr/avr.c (asm_file_start): Rename avr_file_start, - take no arguments, make static. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): - Set them. - * config/c4x/c4x.c (c4x_file_start): New static function. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): - Set them. - * config/cris/cris.c (cris_file_start): New static function. - (TARGET_ASM_FILE_START): Set it. - * config/dsp16xx/dsp16xx.c (coff_dsp16xx_file_start): Rename - dsp16xx_file_start, make static. - (luxworks_dsp16xx_file_start): Delete. - (TARGET_ASM_FILE_START): Set it. - * config/h8300/h8300.c (asm_file_start): Rename - h8300_file_start, make static, take no arguments. - (TARGET_ASM_FILE_START): Set it. - * config/i370/i370.c (i370_file_start): New static function. - (TARGET_ASM_FILE_START): Set it. - * config/i386/i386.c (x86_file_start): New static function. - (TARGET_ASM_FILE_START): Set it. - * config/i386/i386.h (X86_FILE_START_VERSION_DIRECTIVE, - X86_FILE_START_FLTUSED): New macros, default to false. - * config/i386/i386-interix.h: Override X86_FILE_START_FLTUSED to 1. - * config/i386/sysv4.h, config/i386/sco5.h: Override - X86_FILE_START_VERSION_DIRECTIVE to true. - * config/ia64/ia64.c (ia64_file_start): New static function. - (TARGET_ASM_FILE_START): Set it. - (emit_safe_across_calls): Take no arguments. - * config/ia64/ia64.md: Update to match. - * config/m32r/m32r.c (m32r_asm_file_start): Rename - m32r_file_start, make static, take no arguments. - (TARGET_ASM_FILE_START): Set it. - * config/m68hc11/m68hc11.c (m68hc11_asm_file_start): Rename - m68hc11_file_start, make static, take no arguments. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. - (print_options): Delete. - * config/m68k/m68k.c (m68k_hp320_file_start): New static function. - (TARGET_ASM_FILE_START_APP_OFF): Set. - * config/m68k/hp320.h: Set TARGET_ASM_FILE_START to - m68k_hp320_file_start. - * config/mips/mips.c (iris6_asm_file_start, mips_asm_file_start): - Make static, take no arguments. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. - * config/mmix/mmix.c (mmix_asm_file_start): Rename - mmix_file_start, make static, take no arguments. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. - * config/mn10300/mn10300.c (asm_file_start): Rename - mn10300_file_start, make static, take no arguments. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. - * config/ns32k/ns32k.c (TARGET_ASM_FILE_START_APP_OFF): Set. - * config/pa/pa.c (pa_file_start_level, pa_file_start_space, - pa_file_start_file, pa_file_start_mcount, pa_elf_file_start, - pa_som_file_start, pa_linux_file_start, pa_hpux64_gas_file_start, - pa_hpux64_hpas_file_start): New static functions. - * config/pa/elf.h: Set TARGET_ASM_FILE_START to pa_elf_file_start. - * config/pa/pa-linux.h: Set TARGET_ASM_FILE_START to - pa_linux_file_start. - * config/pa/pa64-hpux.h: Set TARGET_ASM_FILE_START to - pa_hpux64_gas_file_start or pa_hpux64_hpas_file_start, as - appropriate. - * config/pa/som.h: Set TARGET_ASM_FILE_START to pa_som_file_start. - * config/rs6000/rs6000.c: Include xcoffout.h when TARGET_XCOFF. - (rs6000_file_start): Make static, take no arguments. Reset - default_cpu under certain conditions. - (rs6000_xcoff_file_start): New function. - * config/rs6000/rs6000.h (TARGET_ASM_FILE_START): Set. - * config/rs6000/xcoff.h (TARGET_ASM_FILE_START, - TARGET_ASM_FILE_START_FILE_DIRECTIVE): Override. - * config/sh/sh.c (output_file_start): Rename - sh_file_start, make static, take no arguments. Merge in old - code from sh/elf.h's ASM_FILE_START, conditioned on TARGET_ELF. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. - * config/sh/sh.c (TARGET_ELF): Define to 0. - * config/sh/elf.h (TARGET_ELF): Redefine to 1. - * config/v850/v850.c (asm_file_start): Delete. - (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Set. - * config/vax/vax.c (vax_file_start): New static function. - (TARGET_ASM_FILE_START, TARGET_ASM_FILE_START_APP_OFF): Set. - - * config/darwin.h: Override ASM_FILE_START_FILE_DIRECTIVE to false. - * config/elfos.h, config/svr3.h, config/arm/elf.h, config/arm/pe.h - * config/i386/att.h, config/i386/gas.h, config/i386/linux.h - * config/i386/sysv4.h, config/i386/sco5.h, config/i960/i960-coff.h - * config/m68k/coff.h, config/m68k/hp320.h, config/mcore/mcore-pe.h - * config/vax/vaxv.h: Set ASM_FILE_START_FILE_DIRECTIVE to true. - - * config/darwin.h, config/elfos.h, config/alpha/elf.h - * config/alpha/openbsd.h, config/alpha/osf.h, config/alpha/vms.h - * config/arc/arc.h, config/arm/aof.h, config/arm/aout.h - * config/arm/coff.h, config/arm/elf.h, config/arm/pe.h - * config/avr/avr.h, config/c4x/c4x.h, config/cris/cris.h - * config/dsp16xx/dsp16xx.h, config/h8300/elf.h, config/h8300/h8300.h - * config/i370/i370.h, config/i386/att.h, config/i386/gas.h - * config/i386/i386-interix.h, config/i386/linux.h, config/i386/sysv4.h - * config/i386/sco5.h, config/i960/i960-coff.h, config/i960/i960.h - * config/ia64/ia64.h, config/ia64/sysv4.h, config/m32r/m32r.h - * config/m68hc11/m68hc11.h, config/m68k/coff.h, config/m68k/m68k.h - * config/mcore/mcore-pe.h, config/mips/iris6.h, config/mips/mips.h - * config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h - * config/pa/elf.h, config/pa/pa-linux.h, config/pa/pa64-hpux.h - * config/pa/som.h, config/pdp11/pdp11.h, config/rs6000/linux64.h - * config/rs6000/lynx.h, config/rs6000/xcoff.h, config/sh/elf.h - * config/sh/sh.h, config/sparc/sparc.h, config/v850/v850.h - * config/vax/vax.h, config/vax/vaxv.h: Don't (re)define ASM_FILE_START. - - * config/alpha/alpha-protos.h, config/arc/arc-protos.h - * config/avr/avr-protos.h, config/dsp16xx/dsp16xx-protos.h - * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h - * config/m32r/m32r-protos.h, config/m68hc11/m68hc11-protos.h - * config/mips/mips-protos.h, config/mmix/mmix-protos.h - * config/mn10300/mn10300-protos.h, config/rs6000/rs6000-protos.h - * config/sh/sh-protos.h, config/v850/v850-protos.h: Update. - - * xcoffout.h, config/rs6000/aix.h, config/rs6000/xcoff.h: - Remove reference to ASM_FILE_START in comment. - * config/arm/aof.h, config/arm/aout.h, config/arm/freebsd.h - * config/arm/linux-gas.h, config/arm/netbsd-elf.h - * config/arm/netbsd.h: Delete definition of ARM_OS_NAME. - -2003-06-19 Graeme Peterson - - * gcc.c (target_sysroot_suffix, target_sysroot_hdrs_suffix, - SYSROOT_SUFFIX_SPEC, SYSROOT_HEADERS_SUFFIX_SPEC, sysroot_suffix_spec, - sysroot_hdrs_suffix_spec): New. - (static_specs): Initialize new variables. - (add_sysroot_suffix_prefix, do_spec_1, main): Use new variables. - * doc/tm.texi (SYSROOT_SUFFIX_SPEC, SYSROOT_HEADERS_SUFFIX_SPEC): - New macros. - -2003-06-19 Andreas Jaeger - - * c-aux-info.c: Convert to ISO C90. - * c-pragma.c: Likewise. - * c-common.c: Likewise. - * c-common.h: Likewise. - * c-convert.c: Likewise. - * c-cppbuiltin.c: Likewise. - * c-dump.c: Likewise. - * c-decl.c: Likewise - * c-format.c: Likewise. - * c-incpath.c: Likewise. - * c-incpath.h: Likewise. - -2003-06-19 Roger Sayle - - * builtins.c (expand_errno_check): Assume that flag_errno_math - and HONOR_NANS have been tested before calling here. Only try - to set errno ourselves if the decl can't throw an exception. - (expand_builtin_mathfn): Move the code to stabilize the arg - after the main switch, so that that its only done when needed. - BUILT_IN_SQRT{,F,L} doesn't set errno if its arg is nonnegative. - Don't modify the original expr when stabilizing the argument. - (expand_builtin_mathfn_2): Likewise, move the code to stabilize - the args after the main switch, and don't modify the orginal exp. - -2003-06-19 Aldy Hernandez - - * expr.c (const_vector_from_tree): Initialize remaining elements - to 0. - -2003-06-19 Aldy Hernandez - - * config/rs6000/spe.md ("spe_evfscfsi"): Change operand types. - Change "fix" to "float". - -2003-06-19 Andreas Jaeger - - * c-tree.h: Remove declaration of poplevel. - - * tree.h: Remove declaration of approx_sqrt. - - * c-lex.c: Remove redundant declaration of asm_out_file. - - * flags.h: Remove declaration of warn_unknown_pragma and - main_input_filename. - - * rtl.h: Remove functions from fold-const.c since they're already - declared in tree.h. - - * regs.h: Remove redundant declaration of reg_names. - - * bt-load.c (migrate_btr_defs): Correct printf arguments. - - * protoize.c: Fix breakage from last patch. - -2003-06-19 J"orn Rennecke - - * hooks.h (hook_reg_class_void_no_regs): Only declare if tm.h - has been included. - -2003-06-18 James A Morrison - - * config/sparc/sparc.c: Update copyright year. - -2003-06-19 David Edelsohn - - * config/rs6000/rs6000.c (init_cumulative_args): Limit CALL_LIBCALL - to ABI_V4. - -2003-06-18 Joseph S. Myers - - PR bootstrap/4068 - * config/i386/liunx.h: Don't include sys/ucontext.h for glibc 2.0. - -2003-06-19 Kazu Hirata - - * config/h8300/h8300.c (TARGET_INITIALIZER and friends): Move - to the end of the file. Remove unnecessary prototypes. - -2003-06-19 Hans-Peter Nilsson - - * bt-load.c (migrate_btr_def) [INSN_SCHEDULING]: Conditionalize - calls to insn_default_latency and result_ready_cost. Initialize - def_latency to 1. - -2003-06-18 Richard Henderson - - * config/ia64/unwind-ia64.c (_Unwind_GetCFA): New. - (_Unwind_FindEnclosingFunction): Implement. - -2003-06-18 Kazu Hirata - - * toplev.c (rest_of_handle_sched): Hide the entire function if - INSN_SCHEDULING is not defined. - (rest_of_compilation): Call rest_of_handle_sched() only when - INSN_SCHEDULING is defined. - -2003-06-18 Stephen Clarke - J"orn Rennecke - - * bt-load.c: New file. - * Makefile.in (OBJS): Include bt-load.o - (bt-load.o): Add dependencies. - * flags.h (flag_branch_target_load_optimize): Declare. - (flag_branch_target_load_optimize2): Likewise. - * hooks.c (hook_reg_class_void_no_regs): New function. - (hook_bool_bool_false): Likewise. - * hooks.h (hook_reg_class_void_no_regs, hook_bool_bool_false): Declare. - * rtl.h (branch_target_load_optimize): Declare. - * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define. - (TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise. - (TARGET_INITIALIZER): Include these. - * target.h (struct gcc_target): Add branch_target_register_class - and branch_target_register_callee_saved members. - * toplev.c (enum dump_file_index): Add DFI_branch_target_load - (dump_file) Add "tars" entry. - (flag_branch_target_load_optimize): New variable. - (flag_branch_target_load_optimize2): Likewise. - (lang_independent_options): Add entries for new options. - (rest_of_compilation): Call branch_target_load_optimize. - * doc/tm.texi (TARGET_BRANCH_TARGET_REGISTER_CLASS): Document. - (TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise. - * doc/invoke.texi: Document -fbranch-target-load-optimize and - -fbranch-target-load-optimize2. - * rtl.h (epilogue_completed): Declare. - * recog.c (epilogue_completed): New variable. - * toplev.c (rest_of_compilation): Set it. - * flow.c (mark_regs_live_at_end): Use it. - * config/ia64/ia64.c (ia64_output_mi_thunk): Set it. - * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. - * config/sh/sh.c (sh_output_mi_thunk): Likewise. - * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. - - * sh.c (shmedia_space_reserved_for_target_registers): New variable. - (sh_target_reg_class): New function. - (sh_optimize_target_register_callee_saved): Likwise. - (shmedia_target_regs_stack_space): Likewise. - (shmedia_reserve_space_for_target_registers_p): Likewise. - (shmedia_target_regs_stack_adjust): Likewise. - (TARGET_BRANCH_TARGET_REGISTER_CLASS): Override. - (TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise. - (calc_live_regs): If flag_branch_target_load_optimize2 and - TARGET_SAVE_ALL_TARGET_REGS is enabled, and we have space reserved - for target registers, make sure that we save all target registers. - (sh_expand_prologue, sh_expand_epilogue): Take target register - optimizations into account. Collapse stack adjustments if that - is beneficial. - (initial_elimination_offset): Reserve space for target registers - if necessary. - * sh.h (SAVE_ALL_TR_BIT, TARGET_SAVE_ALL_TARGET_REGS): Define. - (OPTIMIZATION_OPTIONS): Enable flag_branch_target_load_optimize. - -2003-06-18 Nick Clifton - - * config.gcc: Add an extra_header for ARM targets. - Support configuring with --with-cpu=iwmmxt. - * doc/invoke.texi: Document new value for -mcpu= ARM switch. - * config/arm/aof.h (REGISTER_NAMES): Add iwmmxt register - names. Fix formatting. - * config/arm/aout.h (REGISTER_NAMES): Add iwmmxt register - names. - * config/arm/arm-protos.h (arm_emit_vector_const): New - prototype. - (arm_output_load_gr): New prototype. - * config/arm/arm.c (extra_reg_names1): Delete. - (TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN, FL_IWMMXT, - * arch_is_iwmmxt): Define. - (all_cores, all_architecture): Add entry for iwmmxt. - (arm_override_options): Add support for iwmmxt. - (use_return_insn, arm_function_arg, arm_legitimate_index_p, - arm_print_value, arm_rtx_costs_1, output_move_double, - arm_compute_save_reg_mask, arm_output_epilogue, - arm_get_frame_size, arm_expand_prologue, arm_print_operand, - arm_assemble_integer, arm_hard_regno_ok, arm_regno_class): - Likewise. - (arm_init_cumulative_args): Count iwmmxt registers. - (arm_function_ok_for_sibcall): Return false of sibcall_blocked - has been set. - (struct minipool_node): Add fix_size field. - (add_minipool_forward_ref): Add support for 8-byte aligning of - the pool. - (add_minipool_backward_ref, add_minipool_offsets, - dump_minipool, push_minipool_fix): Likewise. - (struct builtin_description): New struct. - (builtin_description): New array of iwmmxt builtin functions. - (arm_init_iwmmxt_builtins): New function. - (arm_init_builtins): New function. - (safe_vector_operand): New function. - (arm_expand_binop_builtin): New function. - (arm_expand_unop_builtin): New function. - (arm_expand_builtin): New function. - (arm_emit_vector_const): New function. - (arm_output_load_gr): New function. - * config/arm/arm.h (TARGET_CPU_iwmmxt, TARGET_IWMMXT, - TARGET_REALLY_IWMMXT, arm_arch_iwmmxt, IWMMXT_ALIGNMENT, - TYPE_NEEDS_IWMMXT_ALIGNMENT, ADJUST_FIELD_ALIGN, - DATA_ALIGNMENT, LOCAL_ALIGNMENT, VECTOR_MODE_SUPPORTED_P): Define. - (BIGGEST_ALIGNMENT): Set to 64 if ATPCS support is enabled. - (CPP_CPU_ARCH_SPEC): Add entries for iwmmxt. - (FIXED_REGISTERS, CALL_USED_REGISTERS, REG_ALLOC_ORDER, - reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS, - REG_CLASS_FOR_LETTER): Add iwmmxt registers. - (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Disable iwmmxt - registers unless the iwmmxt target is selected. - (FIRST_IWMMXT_GR_REGNUM, LAST_IWMMXT_GR_REGNUM, - FIRST_IWMMXT_REGNUM, LAST_IWMMXT_REGNUM, IS_IWMMXT_REGNUM, - IS_IWMMXT_GR_REGNUM): Define. - (FIRST_PSEUDO_REGISTER): Bump to 63. - (struct machine_function): Add sibcall_blocked field. - (Struct CUMULATIVE_ARGS): Add iwmmxt_nregs, named_count and - nargs fields. - (enum arm_builtins): New enum list. - * config/arm/arm.md (UNSPEC_WSHUFH, UNSPEC_WACC, - UNSPEC_TMOVMSK, UNSPEC_WSAD, UNSPEC_WSADZ, UNSPEC_WMACS, - UNSPEC_WMACU, UNSPEC_WMACSZ, UNSPEC_WMACUZ, UNSPEC_CLRDI, - UNSPEC_WMADDS, UNSPEC_WMADDU): New unspecs. - (VUNSPEC_TMRC, VUNSPEC_TMCR, VUNSPEC_ALIGN8, VUNSPEC_WCMP_EQ, - VUNSPEC_WCMP_GTU, VUNSPEC_WCMP_GT): New vunspecs. - (movv2si, movv4hi, movv8qi): New expands for vector moves. - Include iwmmxt.md. - * config/arm/t-xscale-elf (MULTILIB_OPITONS): Add iwmmxt - multilib. - (MULTILIB_DIRNAMES, MULTILIB_REDUNDANT_DIRS): Likewise. - * config/arm/mmintrin.h: New ARM specific header file. - * config/arm/iwmmx.md: New iWMMXt specific machine patterns. - -2003-06-18 J"orn Rennecke - - * toplev.c (Remaining -d letters summary): Update. - -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-18 Neil Booth - - * Makefile.in: Update. - * common.opt: New options. - * opts.c (maybe_warn_unused_parameter, set_Wextra, handle_param, - set_Wunused): New. - (common_handle_option): Handle new options. - * toplev.c (set_target_switch): Export. - (set_Wextra, set_Wunused, maybe_warn_unused_parameter): Move to opts.c. - (decode_W_option): -Wunused and -Wextra handled in opts.c now. - (independent_decode_option): More options handled in opts.c now. - Change prototype. - * toplev.h (set_target_switch): New. - -2003-06-17 Robert Abeles - - PR debug/4252 - * c-opts.c (c_common_handle_option): Pass -fdump argument suffix - to dump_switch_p(). - * tree-dump.c (dump_switch_p): Remove redundant 'dump-' prefix - from static strings in dump_files. - -2003-06-17 Kaveh R. Ghazi - - * system.h (ANSI_PROTOTYPES, PTR_CONST, LONG_DOUBLE, VPARAMS, - VA_OPEN, VA_FIXEDARG, VA_CLOSE, VA_START): undef and poison these - libiberty macros. - -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 Kazu Hirata - - * config/h8300/h8300-protos.h: Update to ISO C. - * config/h8300/h8300.c: Likewise. - * config/h8300/h8300.h: Likewise. - * config/h8300/h8300.md: Likewise. - -2003-06-16 Nathanael Nerode - - * configure.in: Replace BUILD_CC references with CC_FOR_BUILD. - * configure: Regenerate. - * Makefile.in: Replace BUILD_CC references with CC_FOR_BUILD. - -2003-06-17 Ranjit Mathew - - * install.texi (Testing): Add information on how to run Java - runtime tests separately. - -2003-06-17 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. - -2003-06-17 Christopher Faylor - - * doc/install.texi: Add msvc rebuild caveat. - -2003-06-17 Kazu Hirata - - * config/sh/coff.h: Replace Hitachi with Renesas. - * config/sh/elf.h: Likewise. - * config/sh/embed-elf.h: Likewise. - * config/sh/lib1funcs.asm: Likewise. - * config/sh/sh-protos.h: Likewise. - * config/sh/sh.c: Likewise. - * config/sh/sh.h: Likewise. - * config/sh/sh.md: Likewise. - -2003-06-17 Kazu Hirata - - * ChangeLog.3: Fix comment typos. - * ChangeLog.6: Likewise. - * config/d30v/d30v.c: Likewise. - * config/h8300/h8300.md: Likewise. - * config/m32r/m32r.md: Likewise. - * config/mips/mips.c: Likewise. - * config/mips/mips.md: Likewise. - * config/ns32k/NOTES: Likewise. - -2003-06-17 Ranjit Mathew - Gerald Pfeifer - - * doc/sourcebuild.texi (libgcj Tests): Simplify instructions on how - to run Java runtime tests separately. - -2003-06-17 Kazu Hirata - - * config/h8300/h8300-protos.h: Update a comment. - -2003-06-17 J"orn Rennecke - - * sh.h (ROUND_TYPE_ALIGN, LOCAL_ALIGNMENT): Complex modes - are aligned like integral modes. - (SH5_WOULD_BE_PARTIAL_NREGS): Also test for CDImode and DCmode. - - * sh.h (EXTRA_CONSTRAINT_Csy): Allow PIC_DIRECT_ADDR_P. - (LEGITIMATE_PIC_OPERAND_P): Allow LABEL_REF. - * sh.md (*pt): Remove. - - * sh.h (REG_ALLOC_ORDER): Avoid squandering call-saved registers. - - * sh.md (return_media_rte): New pattern. - (return_media): Use it. - -2003-06-17 Kazu Hirata - - * doc/contrib.texi: Replace Hitachi with Renesas. - * doc/install.texi: Likewise. - * doc/invoke.texi: Likewise. - -2003-06-17 J"orn Rennecke - - * sh.h (CONST_OK_FOR_J16): Fix HOST_BITS_PER_WIDE_INT >= 64 - behaviour. - -2003-06-17 Franz Sirl - - * doc/tm.texi (MD_FALLBACK_FRAME_STATE_FOR): Mention MAKE_THROW_FRAME. - - * 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. - - * gcc/config/rs6000/sysv4.h (USE_LIBC_1): Delete all uses. - -2003-06-17 Kaveh R. Ghazi - - * alloc-pool.c: Don't check HAVE_LONG_DOUBLE. - * fixinc/gnu-regex.c: Don't define `volatile'. - * ggc-page.c: Don't check HAVE_LONG_DOUBLE. - * ggc-simple.c: Likewise. - * system.h: Don't define `volatile'. - - * aclocal.m4 (gcc_AC_C_VOLATILE, gcc_AC_C_LONG_DOUBLE): Delete. - * configure.in (gcc_AC_C_VOLATILE, gcc_AC_C_LONG_DOUBLE): Don't - call these macros. - * config.in, configure: Regenerated. - -2003-06-17 Richard Kenner - - * config/ia64/ia64.c (ia64_expand_builtin, case IA64_BUILTIN_BSP): - Handle POINTERS_EXTEND_UNSIGNED. - -2003-06-17 Rainer Orth - - * config/mips/mips.c (TARGET_ASM_UNALIGNED_DI_OP) [TARGET_IRIX5 && - !TARGET_IRIX6]: Define as NULL. - -2003-06-17 Eric Botcazou - - * config/sparc/sparc.c (sparc_va_arg): Don't align 16-byte+ structures. - -2003-06-17 Eric Botcazou - - * dbxout.c (dbxout_source_line_counter): New global variable. - Mark it with GTY(()). - (dbxout_source_line): Increment dbxout_source_line_counter - and pass it to ASM_OUTPUT_SOURCE_LINE. - * sdbout.c (sdbout_source_line_counter): New global variable. - Mark it with GTY(()). - (unnamed_struct_number): Mark it with GTY(()). - (sdbout_source_line): Increment sdbout_source_line_counter - and pass it to ASM_OUTPUT_SOURCE_LINE. - * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Add third parameter - (xcoffout_source_line): Pass 0 as third argument to - ASM_OUTPUT_SOURCE_LINE. - (xcoffout_begin_prologue): Likewise. - * config/dbxout.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. - Use it instead of 'sym_lineno' but without incrementing it. - * config/dbxelf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/lynx.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/ptx4.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/alpha/alpha.c (alpha_start_function): Pass 0 as third - argument to ASM_OUTPUT_SOURCE_LINE. - * config/alpha/alpha.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. - * config/arm/aout.h: Remove useless comment. - * config/avr/avr.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. - * config/i960/i960.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/m32r/m32r.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. - Use it instead of 'sym_lineno' but without incrementing it. - * config/m68k/hp320.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. - * config/mcore/mcore-pe.h (ASM_OUTPUT_SOURCE_LINE): Add third - parameter. Use it instead of 'sym_lineno' but without incrementing it. - * config/mips/mips.c (mips_output_function_prologue): Pass 0 as third - argument to ASM_OUTPUT_SOURCE_LINE. - * config/mips/mips.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. - * config/mmix/mmix.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/pa/som.h (ASM_OUTPUT_SOURCE_LINE): Add third parameter. - Use it instead of 'sym_lineno' but without incrementing it. - * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/sh/elf.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/sparc/aout.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * config/sparc/pbd.h (ASM_OUTPUT_SOURCE_LINE): Likewise. - * doc/tm.texi (ASM_OUTPUT_SOURCE_LINE): Document third parameter. - -2003-06-17 Richard Sandiford - - * config/mips/mips-protos.h (mips_expand_block_move): Declare. - (expand_block_move, output_block_move): Remove. - * config/mips/mips.h (enum block_move_type): Remove. - * config/mips/mips.c (block_move_call, output_block_move): Remove. - (mips_block_move_straight, mips_adjust_block_mem): New function. - (mips_block_move_loop): Renamed and reworked from block_move_loop. - (mips_expand_block_move): Likewise expand_block_move. Return false - to fall back on the target-independent code. - * config/mips/mips.md (movstrsi): Use mips_expand_block_move. - (movstrsi_internal*): Remove. - -2003-06-16 Zack Weinberg - - * cpplib.h, cpphash.h, cppcharset.c, cpperror.c, cppexp.c - * cppfiles.c, cpphash.c, cppinit.c, cpplex.c, cpplib.c - * cppmacro.c, cpppch.c, cpptrad.c, cppspec.c: Convert to - ISO C: new-style function declarations, no need for PARAMS, - no special punctuation on indirect function calls, use string - constant concatenation where convenient. - -2003-06-17 Andreas Jaeger - - * rtl.h: Remove declarations from coverage.h. - * toplev.c: Include coverage.h. - * Makefile.in (toplev.o): Depend on coverage.h. - - * toplev.h: Remove extra declaration of print_time. - - * gengtype.c (close_output_files): Remove duplicated declaration. - -2003-06-16 Nathanael Nerode - - * config/sparc/sysv4.h: Remove target-independent comment; - replace "GNU CC" with "GCC". - * config/vxworks.h: Replace "GNU compiler" with "GCC". - * config/sparc/aout.h, config/sparc/biarch64.h, config/sparc/elf.h, - config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, - config/sparc/lite.h, config/sparc/litecoff.h, config/sparc/liteelf.h, - config/sparc/netbsd-elf.h, config/sparc/openbsd.h, - config/sparc/rtemself.h, config/sparc/sol2-64.h, - config/sparc/sol2-bi.h, config/sparc/sol2-gas-bi.h, - config/sparc/sol2-gld-bi.h, config/sparc/sol2-gld.h, - config/sparc/sol2.h, config/sparc/sp64-aout.h, - config/sparc/sp64-elf.h, config/sparc/sp86x-elf.h, - config/sparc/sparc-protos.h, config/sparc/sysv4-only.h: Replace - "GNU compiler", "GNU CC" with "GCC". - * config/sparc/cypress.md, config/sparc/hypersparc.md, - config/sparc/sparc-modes.def, config/sparc/sparc.c, - config/sparc/sparc.md, config/sparc/sparclet.md, - config/sparc/supersparc.md, config/sparc/ultra1_2.md, - config/sparc/ultra3.md: Replace "GNU CC", "GNU Compiler", and - "GNU C Compiler" with "GCC". - * config/ip2k/ip2k.h: Replace "GNU CC" and "GNU compiler" with "GCC". - -2003-06-16 Aldy Hernandez - - * simplify-rtx.c (simplify_subreg): Do not over-extend vector - constants. - - * testsuite/gcc.c-torture/execute/simd-4.c: New. - -2003-06-16 Nathanael Nerode - - * config/ip2k/ip2k.h: Remove target-independent comments. - - * config.gcc: Explicitly mention elfos.h in ip2k entry. - * config/ip2k/ip2k.h: Don't #include it here. - -2003-06-16 Kaveh R. Ghazi - - * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, - config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, - dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, - function.c, gcc.c, genoutput.c, gensupport.c, global.c, - haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, - loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, - read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, - stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use - the PTR macro. - - * gengtype.c: Don't use UNION_INIT_ZERO. - * system.h (UNION_INIT_ZERO): Delete. - -2003-06-16 Richard Henderson - - * simplify-rtx.c (simplify_subreg): Use GET_MODE_SIZE instead of - GET_MODE_UNIT_SIZE when simplifying constant vectors. - -2003-06-16 Andreas Jaeger - - * timevar.c (get_run_time): Remove function provided also by - libiberty. - * timevar.h: Remove get_run_time declaration. - -2003-06-16 Kazu Hirata - - * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): Remove - unreachable code. - -2003-06-16 Kaveh R. Ghazi - - * builtin-attrs.def, builtin-attrs.def, builtins.c, cpplex.c, - cpplib.c, gencheck.c, gengenrtl.c, machmode.def, protoize.c: Don't - use macros from "symcat.h", instead rely on ISO C. - - * system.h: Don't include "symcat.h". - * configure.in (AC_C_STRINGIZE): Delete. - * config.in, configure: Regenerate. - -2003-06-16 Richard Kenner - - * Makefile.in (install-mkheaders): Use INSTALL_SCRIPT for scripts. - - * tree.h (STMT_CHECK): New macro. - Also upper-case argument names on all checking macros and - fix some whitespace problems; assume CODE argument does not - have side-effects. - -2003-06-16 Kaveh R. Ghazi - - * scan.h: Convert to ISO C. - * system.h: Likewise. - - * c-format.c (dynamic_format_types): New pointer for dynamic data. - (find_length_info_modifier_index, init_dynamic_asm_fprintf_info): - New functions split out of... - (handle_format_attribute): ...here. - -2003-06-16 J"orn Rennecke - - * sh.h (REG_CLASS_FROM_LETTER): Change to: - (REG_CLASS_FROM_CONSTRAINT). - (CONST_OK_FOR_I): Rename to: - (CONST_OK_FOR_I08). Changed all users. - (CONST_OK_FOR_J): Rename to: - (CONST_OK_FOR_I16). Changed all users. - (CONST_OK_FOR_K): Rename to: - (CONST_OK_FOR_P27). Changed all users. - (CONST_OK_FOR_L): Rename to: - (CONST_OK_FOR_K08). Changed all users. - (CONST_OK_FOR_O): Rename to: - (CONST_OK_FOR_I06). Changed all users. - (CONST_OK_FOR_P): Rename to: - (CONST_OK_FOR_I10). Changed all users. - (CONSTRAINT_LEN, CONST_OK_FOR_I, CONST_OK_FOR_J16): Define. - (CONST_OK_FOR_J, CONST_OK_FOR_K, CONST_OK_FOR_P): Likewise. - (EXTRA_CONSTRAINT_A, EXTRA_CONSTRAINT_Bsc): Likewise. - (EXTRA_CONSTRAINT_B, PIC_OFFSET_P, PIC_DIRECT_ADDR_P): Likewise. - (EXTRA_CONSTRAINT_Cpg, EXTRA_CONSTRAINT_C): Likewise. - (EXTRA_MEMORY_CONSTRAINT,(EXTRA_CONSTRAINT_Sr0): Likewise. - (CONST_OK_FOR_LETTER_P): Replace with - (CONST_OK_FOR_CONSTRAINT_P). - (EXTRA_CONSTRAINT_S): Rename to: - (EXTRA_CONSTRAINT_C16). Changed all users. - (MOVI_SHORI_BASE_OPERAND_P): Don't allow direct addresses. - (EXTRA_CONSTRAINT_T): Rename to: - (EXTRA_CONSTRAINT_Csy). Changed all users. - (EXTRA_CONSTRAINT_Z): Remove. - (EXTRA_CONSTRAINT): Replace with: - (EXTRA_CONSTRAINT_STR). - (EXTRA_CONSTRAINT_U): Rename to: - (EXTRA_CONSTRAINT_Z). Changed all users. - * sh.c (and_operand): Use CONST_OK_FOR_J16. - * sh.md (cmpeqsi_t-1, cmpeqsi_t, adddi3_media): Use new constraints. - (addsi3_media, addsi3_compact, andsi3_compact, anddi3): Likewise. - (iorsi3, iordi3, xorsi3, xordi3, ashlsi3_std, ashlhi3_k): Likewise. - (lshrsi3_k, movsi_i, movsi_ie, movsi_i_lowpart, movsi_media): Likewise. - (movsi_media_nofpu, movqi_media, movhi_i, movhi_media): Likewise. - (*movdi_i, movdi_media, movdi_media_nofpu, shori_media): Likewise. - (movdf_media, movdf_media_nofpu, movv2sf_i, movv4sf_i): Likewise. - (movsf_media, movsf_media_nofpu, movsi_y, beq_media): Likewise. - (beq_media_i, bne_media, pt, ptb, movv8qi_i, movv2hi_i): Likewise. - (movv4hi_i, movv2si_i, negcmpeqv8qi, negcmpeqv2si): Likewise. - (negcmpeqv4hi, negcmpgtuv8qi, negcmpgtv2si, negcmpgtv4hi): Likewise. - (mcmv, mcnvs_lw, mcnvs_wb, mcnvs_wub, mextr_rl, mextr_lr): Likewise. - (mextr1, mextr2, mextr3, mextr4, mextr5, mextr6, mextr7): Likewise. - (mperm_w, mperm_w_little, mperm_w_big, msad_ubq_i): Likewise. - (mshards_q, mshfhi_b, mshflo_b, mshf4_b, mshf0_b, mshfhi_l): Likewise. - (mshflo_l, mshf4_l, mshf0_l, mshfhi_w, mshflo_w, mshf4_w): Likewise. - (mshf0_w, mshflo_w_x, mshfhi_l_di, mshfhi_l_di_rev): Likewise. - (mshflo_l_di_rev, mshflo_l_di_x, concat_v2sf): Likewise. - (mshflo_l_di_x_rev, subv2si3, subv4hi3, sssubv2si3): Likewise. - (sssubv4hi3): Likewise. - (movsf_i): Change I[08]/r to G/r. - (movsf_ie): Change f/{G,H}/c/X to f/{G,H}/c/Bsc. - - * sh.c (sh_output_mi_thunk): Use CONST_OK_FOR_ADD. - -2003-06-16 Vladimir Makarov - - * config/i386/i386.c (ix86_memory_move_cost): Fix typo. - -2003-06-16 Andreas Jaeger - - * basic-block.h: Remove duplicate prototype of - note_prediction_to_br_prob. - - * tree.h: Remove duplicate prototype of strip_float_extensions. - -2003-06-16 Kaveh R. Ghazi - - * config/c4x/c4x.c: Don't include "c-tree.h". - * config/pa/pa.c: Likewise. - * langhooks.c: Likewise. - * tree.h (poplevel): Declare. - -2003-06-16 Kazu Hirata - - * config/h8300/h8300.c (const_costs): Move this to ... - (h8300_rtx_costs): ... here. - -2003-06-16 Roger Sayle - - * optabs.h (enum optab_index): Add new OTI_tan and OTI_atan. - (tan_optab, atan_optab): Define corresponding macros. - * optabs.c (init_optabs): Initialize tan_optab and atan_optab. - * genopinit.c (optabs): Implement tan_optab and atan_optab - using tan?f2 and atan?f2 patterns. - * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_TAN{,F,L} - using tan_optab, and BUILT_IN_ATAN{,F,L} using atan_optab. - Change the default value of errno_set to false. - (expand_builtin): Expand BUILT_IN_TAN{,F,L} and BUILT_IN_ATAN{,F,L} - using expand_builtin_mathfn. - - * config/i386/i386.md (atansf2, atandf2, atanxf2, atantf2): New - expander patterns implemented using existing atan2?f3 patterns. - -2003-06-16 Roger Sayle - - * expr.c (expand_expr ): If operand_equal_p considers - both operands of the addition equal, reuse the expanded RTL. - (expand_expr ): Likewise for multiplication. - -2003-06-16 Roger Sayle - Jeff Law - - * fold-const.c (operand_equal_p): Consider two calls to "const" - functions with identical non-volatile arguments to be equal. - Consider the FUNCTION_DECL for the "__builtin_foo" form of a - built-in function to be equal to the "foo" form. - -2003-06-16 Nathanael Nerode - - * config/rs6000/sysv4le.h: Remove target-independent comment. - Replace "GNU compiler" with "GCC" in comment. - -2003-06-16 Andreas Jaeger - - * tracer.c: Remove duplicate declaration. - - * toplev.c: Remove extra declaration of decode_d_option. - - * ssa.c: Remove duplicate declaration. - - * sreal.c: Remove extra declaration of dump_sreal. - - * reload1.c: Remove duplicate declarations. - - * integrate.c: Remove extra declaration of - set_decl_abstract_flags. - - * flow.c: Remove extra declaration of dump_flow_info. - - * alias.c: Remove extra declaration of get_addr. - -2003-06-16 Nathanael Nerode - - * config/rtems.h, config/sol2.h, config/svr4.h, config/usegas.h, - config/vxworks.h: GNU CC -> GCC. - - * convert.c, dwarf2out.c, dwarfout.c, emit-rtl.c, function.c, - lists.c, print-rtl.c, print-tree.c, read-rtl.c, rtl-error.c, - stmt.c, toplev.c, integrate.h, loop.h, machmode.h, rtl.h, - ssa.h, tree.def: Replace overly specific references to "GNU C" - and "GNU C Compiler" with references to "GCC". - -2003-06-16 J"orn Rennecke - - * sh.c (prepare_move_operand): Check if operand 0 is an invalid - memory reference. Fix test that checks if operand 1 is using r0. - * sh.md (movhi_i): Don't allow st.w r0,@(rX,rY) . - - * defaults.h (REG_CLASS_FROM_CONSTRAINT): Only define if not already - defined. - -2003-06-15 Nathan Sidwell - - * function.h (struct emit_status): Remove x_last_linenum, - x_last_filename. Add x_last_location. - * rtl.h: #include "input.h". - (NOTE_DATA): New. - * cfglayout.c (duplicate_insn_chain): Use emit_line_note for line - number notes. - * emit-rtl.c (last_linenum, last_filename): Remove. - (last_location): New. - (emit_line_note_after): LINE must always be >= 0. - (emit_line_note): Likewise. Check not duplicate here... - (emit_note): ... rather than here. - (emit_line_note_force, force_next_line_note, init_emit): Adjust. - * integrate.c (expand_inline_function): Use emit_line_note for - line number notes. - (copy_insn_list): Likewise. - * unroll.c (copy_loop_body): Likewise. - * Makefile.in (RTL_H): Add input.h. - -2003-06-16 Richard Sandiford - - * optabs.c (emit_libcall_block): Don't hoist insns past a label. - -2003-06-16 Richard Henderson - - * config/alpha/alpha-protos.h, config/alpha/elf.h, - config/alpha/osf.h, config/alpha/unicosmk.h, config/alpha/vms.h, - config/alpha/vms-cc.c, config/alpha/vms-ld.c: Update to ISO C. - * config/alpha/alpha.c: Likewise. Move targetm init to end of file. - Remove unneeded static function decls. - -2003-06-16 Neil Booth - - * c-opts.c (c_common_handle_option): s/on/value/. - (OPT_fabi_version_, OPT_ftabstop_, OPT_ftemplate_depth_): Use value - directly rather than converting the argument. - * c.opt: Update docs. Use UInteger where appropriate. - * common.opt: Use UInteger where appropriate. - * opts.c (integral_argument): New. - (handle_argument): Handle integral arguments, and optional - joined arguments. - (common_handle_option): Update. - * opts.h (CL_MISSING_OK, CL_UINTEGER): New. - * opts.sh: Handle JoinedOrMissing and UInteger flags. - -2003-06-16 Neil Booth - - * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Remove - unnecessary extern declaration. - -2003-06-15 Nathanael Nerode - - * config/gofast.h, config/interix.h, config/interix3.h, - config/libgloss.h, config/linux-aout.h, config/linux.h, - config/lynx-ng.h, config/lynx.h: GNU CC -> GCC. - * config/kaos.h: "GNU compiler" -> GCC. - * config/linux-aout.h, config/lynx.h: Clarify comment describing file. - - * config/ip2k/crt0.S, config/ip2k/ip2k-protos.h, - config/ip2k/ip2k.c, config/ip2k/ip2k.md, config/ip2k/libgcc.S: - GNU CC -> GCC. - - * config/svr3.h: Remove #if 0 code, misleading comments. - GNU CC -> GCC. - -2003-06-15 Zack Weinberg - - * vmsdbgout.c (vmsdbgout_finish): Rename parameter to - main_input_filename to avoid conflict with input_filename macro. - -2003-06-15 Neil Booth - - * config/mips/mips.h (asm_file_name, g_switch_set, - g_switch_value): Remove. - * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Remove - unnecessary extern declarations. - -2003-06-15 Neil Booth - - * config/frv/frv.h: Remove declaration of g_switch_value. - * config/m32r/m32r.h: Remove declaration of g_switch_value. - * config/m68hc11/m68hc11.c: Remove declaration of asm_file_name. - -2003-06-15 Neil Booth - - * opts.sh: Quote '+' in regex. - -2003-06-15 Andrew Pinski - - * config/rs6000/t-rs6000: Add dependence of cfglayout.h to rs6000.o. - * config/rs6000/rs6000.c: Include cfglayout.h. - * config/alpha/alpha.c: Likewise. - * config/ia64/ia64.c: Likewise. - * config/sparc/sparc.c: Likewise. - * config/sh/sh.c: Likewise. - -2003-06-15 Neil Booth - - * opts.sh: Quote '+' in regex. - -2003-06-15 Neil Booth - - * c-opts.c (lang_flags): Update for new spelling of flags. - (write_langs): Similarly. - * c.opt: Specify languages. - * opts.h: Remove languages. - * opts.sh: Recognise front-end defined languages. - * doc/sourcebuild.texi: Update. - -2003-06-15 Andreas Jaeger - - * alloc-pool.c: Convert to ISO C90 prototypes. - * alloc-pool.h: Likewise. - * alias.c: Likewise. - * attribs.c: Likewise. - * bb-reorder.c: Likewise. - * bitmap.h: Likewise. - * bitmap.c: Likewise. - * builtins.c: Likewise. - - * tree.h: Convert prototypes of attribs.c to ISO C90. - * basic-block.h: Convert prototypes of bb-reorder.c to ISO C90. - * rtl.h: Convert prototypes of alias.c and builtins.c to ISO C90. - * expr.h: Convert prototypes of builtins.c to ISO C90. - -2003-06-15 Roger Sayle - - * config/i386/i386.md (expsf2, expdf2, expxf2): New patterns to - implement exp, expf and expl built-ins as inline x87 intrinsics. - (UNSPEC_FSCALE, UNSPEC_FRNDINT, UNSPEC_F2XM1): New unspecs to - represent x87's fscale, frndint and f2xm1 insns respectively. - (*fscale_sfxf3, *fscale_dfxf3, *fscale_xf3): New insn patterns - to encode x87's "fscale" instruction followed by a pop. - (*frndintxf2): New insn pattern for "frndint". - (*f2xm1xf2): New insn pattern for "f2xm1". - - * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FRNDINT and - UNSPEC_F2XM1 like UNSPEC_{SIN,COS} and handle UNSPEC_FSCALE like - UNSPEC_FPATAN. - -2003-06-15 Richard Kenner - - * gencheck.c (main): Avoid generating duplicate macros. - - * Makefile.in (stagefeedback-start): Use $(SUBDIRS) instead of - knowing names of language subdirectories. - -2003-06-15 Neil Booth - - * c-pch.c (asm_file_name): Remove. - * common.opt: Add more switches. - * flags.h (g_switch_set): Boolify. - * opts.c (g_switch_value, g_switch_set, exit_after_options, - version_flag): Move from toplev.c. - (common_handle_option): Handle more switches from toplev.c. - * toplev.c (display_help, display_target_options, decode_d_option, - print_version): Make non-static, remove prototypes. - (aux_base_name, asm_file_name, aux_info_file_name): Constify. - (version_flag, g_switch_value, g_switch_set, exit_after_options): - Remove. - (independent_decode_option): Move some handlers to opts.c. - * toplev.h (aux_info_file_name, aux_base_name, asm_file_name, - exit_after_options, version_flag, display_help, display_target_options, - print_version, decode_d_option): New. - -2003-06-15 Kazu Hirata - - * config/alpha/alpha.md: Follow spelling conventions. - * config/arm/arm.c: Likewise. - * config/arm/arm.h: Likewise. - * config/arm/arm.md: Likewise. - * config/arm/crtn.asm: Likewise. - * config/m32r/m32r.c: Likewise. - * config/m32r/m32r.md: Likewise. - * config/rs6000/rs6000.c: Likewise. - -2003-06-15 Richard Henderson - - * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Call - insn_locators_initialize. - * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. - * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. - * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. - * config/sh/sh.c (sh_output_mi_thunk): Do it later. - -2003-06-15 Kazu Hirata - - * builtins.c (expand_builtin_expect_jump): Remove redundant - tests that are also in any_condjump_p(). - -2003-06-15 Kaveh R. Ghazi - - * libgcc2.c: Delete sysV68 L_trampoline section. - * config/m68k/mot3300-crt0.S: Delete file. - * config/m68k/mot3300Mcrt0.S: Likewise. - -2003-06-15 Nathanael Nerode - - * config/aoutos.h: Remove. - * config.gcc: Remove reference to aoutos.h. - * config/m68k/m68k-aout.h: Remove reference to aoutos.h. - -2003-06-14 Kazu Hirata - - * doc/install.texi: Follow spelling conventions. - * doc/tm.texi: Likewise. - * config/fp-bit.c: Likewise. - * config/arm/arm.c: Likewise. - * config/frv/frv.c: Likewise. - * config/ns32k/NOTES: Likewise. - * config/ns32k/STATUS: Likewise. - -2003-06-14 Roger Sayle - Zack Weinberg - - * rtl.h (STORE_FLAG_VALUE): Remove default definition from here. - * defaults.h (STORE_FLAG_VALUE): Move default definition to here. - * doc/tm.texi (STORE_FLAG_VALUE): Document the default value. - - * config/alpha/alpha.h (STORE_FLAG_VALUE): Remove definition. - * config/arc/arc.h (STORE_FLAG_VALUE): Likewise. - * config/arm/arm.h (STORE_FLAG_VALUE): Likewise. - * config/cris/cris.h (STORE_FLAG_VALUE): Likewise. - * config/i370/i370.h (STORE_FLAG_VALUE): Likewise. - * config/i386/i386.h (STORE_FLAG_VALUE): Likewise. - * config/i960/i960.h (STORE_FLAG_VALUE): Likewise. - * config/ia64/ia64.h (STORE_FLAG_VALUE): Likewise. - * config/ip2k/ip2k.h (STORE_FLAG_VALUE): Likewise. - * config/m32r/m32r.h (STORE_FLAG_VALUE): Likewise. - * config/mcore/mcore.h (STORE_FLAG_VALUE): Likewise. - * config/mips/mips.h (STORE_FLAG_VALUE): Likewise. - * config/mmix/mmix.h (STORE_FLAG_VALUE): Likewise. - * config/ns32k/ns32k.h (STORE_FLAG_VALUE): Likewise. - * config/pa/pa.h (STORE_FLAG_VALUE): Likewise. - * config/pdp11/pdp11.h (STORE_FLAG_VALUE): Likewise. - * config/sh/sh.h (STORE_FLAG_VALUE): Likewise. - * config/sparc/sparc.h (STORE_FLAG_VALUE): Likewise. - * config/v850/v850.h (STORE_FLAG_VALUE): Likewise. - * config/xtensa/xtensa.h (STORE_FLAG_VALUE): Likewise. - -2003-06-14 Nathan Sidwell - - * opts.sh (POSIXLY_CORRECT): Unset it. - - * tree.h (init_function_start): Remove filename and line paramters. - * function.c (init_function_start): Remove filename and line - parameters. Use DECL_SOURCE_LOCATION. - * c-decl.c (store_parm_decls): Adjust init_function_start call. - (c_expand_body_1): Likewise. - * coverage.c (create_coverage): Likewise. - * objc/objc-act.c (build_tmp_function_decl): Set line number to - zero. - (hack_method_prototype): Adjust init_function_start call. - -2003-06-14 Richard Earnshaw - - PR target/3724 - * arm/linux-elf.h (PROFILE_HOOK): Define. - -2003-06-14 Richard Earnshaw - - PR target/11183 - * arm.h (CANNOT_CHANGE_MODE_CLASS): Define. - -2003-06-14 Roger Sayle - - * opts.sh: Work around a mysterious feature in cygwin's gawk - where specifying the input files explicitly has a different - behavior to piping them via stdin. - -2003-06-14 Neil Booth - - * doc/sourcebuild.texi: Update. - -2003-06-14 Richard Earnshaw - - PR target/11183 - * arm.c (output_move_double): Pass SImode to adjust_address. - -2003-06-14 Neil Booth - - * Makefile.in: Update to use common.opt and lang_opt_files. - (c-options.c, c-options.h): Remove. - (options.c, options.h): Add. - * c-opts.c: Include options.h not c-options.h. - * common.opt: New file. - * configure, configure.in: Add lang_opt_files. - * opts.c: Include flags.h and diagnostic.h. - (common_handle_option): New. - (handle_option): Update to recognize common options and all - language-dependent options. - * opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New. - (struct cl_option): Make flags of type int. - * opts.h: Flag option with front ends to which it applies. - Handle duplicate options. - * toplev.c (filename): Remove. - (independent_decode_option): Don't handle filenames and -quiet. - (process_options, do_compile): Update. - -2003-06-14 Nick Clifton - - * doc/install.texi (Specific): Add description of different - ARM supported file format targets. - -Sat Jun 14 11:12:04 CEST 2003 Jan Hubicka - - * reorg.c (emit_delay_sequence, dbr_schedule): Clear insn locators - inside delay slots. - -2003-06-13 Matt Kraai - - * unwind-c.c: Define NO_SIZE_OF_ENCODED_VALUE. - * unwind-pe.h (size_of_encoded_value): Do not define if - NO_SIZE_OF_ENCODED_VALUE is defined. - -2003-06-13 Roger Sayle - - * expr.c (expand_expr ): Handle the case of - expanding a complex constant into a CONCAT target. - -2003-06-13 Zack Weinberg - - * config/svr3.h (ASM_FILE_START): Don't use ASM_FILE_START_1. - (ASM_FILE_START_1): Delete. - * config/i386/att.h, config/i386/sco5.h, - config/i386/sysv3.h - (ASM_FILE_START_1): Delete. - -2003-06-13 Kelley Cook - - * config/i386/bsd.h: Remove ASM_FILE_START. - * config/i386/djgpp.h: Likewise. - * config/i386/gas.h (ASM_FILE_START): Output .file before .intel_syntax. - - * config/i386/djgpp.h: Move included unix.h, bsd.h, gas.h to ... - * config.gcc (i[34567]86-pc-msdosdjgpp): ... here. - -2003-06-13 Vladimir Makarov - - PR bootstrap/10835 - * haifa-sched.c (max_lookahead_tries, - cached_first_cycle_multipass_dfa_lookahead, - cached_issue_rate): New variables. - (max_issue): Check the number of tries. - (choose_ready): Calculate max_lookahead_tries. - (sched_init): Check cached_issue_rate. - -2003-06-13 Richard Henderson - - * cfgbuild.c (make_edges): Set ABNORMAL with SIBCALL. - * cfgrtl.c (purge_dead_edges): Expect it too. - -2003-06-13 Jim Wilson - Eric Botcazou - - PR bootstrap/10983 - * combine.c (make_extraction): Use gen_lowpart_for_combine - when extracting from a REG and not in the destination of a SET. - -2003-06-13 Doug Evans - - * tsystem.h (abort): Declare in inhibit_libc case to remove build - warnings for addvsi3, et.al. - -2003-06-13 Aldy Hernandez - - * c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro. - - * simplify-rtx.c (simplify_subreg): Same. - - * emit-rtl.c (gen_lowpart_common): Same. - -2003-06-13 Kazu Hirata - - * builtins.c: Fix comment typos. - * fold-const.c: Likewise. - -2003-06-13 Doug Evans - Kazuhiro Inaoka - - * config/m32r/m32r-protos.h (m32r_pass_by_reference): Declare. - * config/m32r/m32r.c (m32r_pass_by_reference): New fn. - (m32r_va_arg): Use it. - * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Ditto. - (RETURN_IN_MEMORY): Ditto. - -2003-06-13 Nathanael Nerode - - * c-typeck.c: Remove #if 0 clauses. - - PR other/1494 - * config/alpha/openbsd.h, config/i386/openbsd.h, - config/m68k/openbsd.h, config/sparc/openbsd.h: Remove - residual reference to EGCS. - -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-13 Kaveh R. Ghazi - - * c-format.c (format_types_orig): Disallow '*' width/precision in - asm_fprintf format checks. - -2003-06-13 Ulrich Weigand - - * config/s390/s390.c (s390_va_arg): Fix alignment when retrieving - non-integral types from integer register save area slots. - -2003-06-13 Nathanael Nerode - - * config/i386/svr3dbx.h: GNU CC -> GCC; Intel 385 -> Intel 386. - -2003-06-13 Florian Weimer - - * doc/invoke.texi (SPARC Options): Document ``-mimpure-text''. - -2003-06-13 Kaz Kojima - - * config/sh/linux.h (TARGET_ASM_FILE_END): Set TARGET_ASM_FILE_END - to file_end_indicate_exec_stack. - -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-13 Doug Evans - - Remove some build warnings. - * config/m32r/initfini.c (__CTOR_LIST__,__DTOR_LIST__): Attribute used. - (__do_global_ctors,__do_global_dtors): Ditto. - -2003-06-12 Richard Henderson - - PR middle-end/10557 - * rtlanal.c (subreg_offset_representable_p): Relax subreg check. - -2003-06-13 Kazu Hirata - - * config/m32r/m32r.md: Fix a comment typo. - -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 Aldy Hernandez - - * config/rs6000/rs6000.c (function_arg): Remove typo. - -2003-06-12 Richard Henderson - - * config/i386/i386.c (legitimate_constant_p): Handle UNSPEC_NTPOFF - and UNSPEC_DTPOFF. - -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 Aldy Hernandez - - * config/rs6000/rs6000.c (function_arg): Always split vectors for - e500 if it's a stdarg function. - (function_arg_advance): Advance 2 registers for vectors in a - stdarg function. - (init_cumulative_args): Initialize stdarg. - (rs6000_spe_function_arg): New. - - * config/rs6000/rs6000.h (rs6000_args): Add stdarg. - -2003-06-12 Aldy Hernandez - - * config/rs6000/rs6000.h (MODES_TIEABLE_P): Add SPE vectors. - -2003-06-12 Roger Sayle - - PR middle-end/168 - * fold-const.c (tree_expr_nonnegative_p): Handle addition - and multiplication of zero extensions, floating point division, - and integer<->fp, fp<->fp and zero extension conversions. - The built-in ceil and floor functions preserve signedness. - -2003-06-12 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.2: Likewise. - * c-decl.c: Likewise. - * cfgloop.h: Likewise. - * cgraph.c: Likewise. - * coverage.c: Likewise. - * cppcharset.c: Likewise. - * cpphash.h: Likewise. - * cpplex.c: Likewise. - * cpplib.c: Likewise. - * dbxout.c: Likewise. - * df.c: Likewise. - * dwarf2out.c: Likewise. - * dwarfout.c: Likewise. - * emit-rtl.c: Likewise. - * explow.c: Likewise. - * gcov-io.c: Likewise. - * gcov-io.h: Likewise. - * gcov.c: Likewise. - * gengtype.c: Likewise. - * ggc.h: Likewise. - * opts.c: Likewise. - * real.c: Likewise. - * reload.c: Likewise. - * stmt.c: Likewise. - -2003-06-12 Janis Johnson - - * doc/install.texi (m32r-*-elf): Change company to Renesas. - -Thu Jun 12 20:00:55 CEST 2003 Jan Hubicka - - * basic-block.h (flow_delete_block_noexpunge): Kill. - * cfgrtl.c (flow_delete_block_noexpunge): Merge to - rtl_delete_block. - -2003-06-10 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 Aldy Hernandez - - * config/rs6000/spe.md: Change all clobbers of the accumulator to sets. - -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-12 Ulrich Weigand - - * config/s390/s390.c (s390_emit_prologue): Use LA instead of AR - to initialize GOT register. - -2003-06-12 Roger Sayle - - * fold-const.c (tree_expr_nonnegative_p): Add support for - floating point constants, addition and multiplication. - -2003-06-12 J"orn Rennecke - - * sh.md (adddi3_compact, subdi3_compact): Add earlyclobber - constraint modifier for operand 0. - -2003-06-12 Hans-Peter Nilsson - - Don't warn on dollars in builtin macro definitions, - e.g. __REGISTER_PREFIX__. - * cpphash.h (struct cpp_reader): Move member warn_dollars... - * cpplib.h (struct cpp_options): ...to here. Change type to - unsigned char. - * cppinit.c (cpp_create_reader): Set it to 1 here. - (post_options): Don't set it here. - * c-opts.c (c_common_init_options): Reset it to 0 here. - (finish_options): Set it here. - * cpplex.c (forms_identifier_p): Tweak for new location of - warn_dollars. - - * configure.in (assembler dwarf2 debug_line support): Define insn - for cris-*-* and mmix-*-*. - * configure: Regenerate. - -2003-06-11 Uwe Stieber - - * config.gcc (arm*-*-kaos*, i[34567]86-*-kaos*, powerpc-*-kaos*, - powerpcle-*-kaos*, strongarm-*-kaos*): New targets. - (sh-*-elf*): Add sh*-*-kaos* support. - * config/kaos.h, config/arm/kaos-strongarm.h, config/arm/kaos-arm.h, - config/i386/kaos-i386.h, config/rs6000/kaos-ppc.h, - config/sh/kaos-sh.h: New files. - -2003-06-12 Kazu Hirata - - * gcse.c (fis_get_condition): Make it a global function. - * reload1.c (reload_cse_move2add): Detect implicit sets. - * rtl.h: Add a prototype for fis_get_condition. - -2003-06-11 Richard Henderson - - * stmt.c (expand_asm_operands): Don't warn for memories with - queued addresses. - -2003-06-11 Kaz Kojima - - * config/sh/sh.h (SUBTARGET_ASM_RELAX_SPEC): Rewrite without - brackets. - -2003-06-11 Neil Booth - - * hooks.c (hook_int_size_t_constcharptr_int_0): New. - * hooks.h (hook_int_size_t_constcharptr_int_0): New. - * langhooks-def.h (lhd_decode_option, LANG_HOOKS_DECODE_OPTION): Die. - (LANG_HOOKS_HANDLE_OPTION, LANG_HOOKS_INITIALIZER): Update. - * langhooks.c (lhd_decode_option): Remove. - * langhooks.h (struct lang_hooks): Remove decode_option. - * opts.c (handle_option): No longer use decode_option. - -2003-06-11 Zdenek Dvorak - - * cfgloopanal.c (variable_initial_value): Update the set of altered - registers correctly. - -2003-06-11 Roger Sayle - Kaveh R. Ghazi - - * config/d30v/d30v.h: Delete reference to ASM_FINAL_SPEC. - * config/i386/netbsd-elf.h: Likewise. - * config/m32r/m32r.h: Likewise. - * config/mn10300/mn10300.h: Likewise. - * config/stormy16/stormy16.h: Likewise. - * config/v850/v850.h: Likewise. - * config/vax/netbsd-elf.h: Likewise. - * config/xtensa/elf.h: Likewise. - * config/xtensa/linux.h: Likewise. - -2003-06-11 Rainer Orth - - * 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-11 Ulrich Weigand - - * expr.c (can_move_by_pieces): align argument may be unused. - -2003-06-11 J"orn Rennecke - - * expr.c (convert_move): Handle moves between two CONCATs. - -2003-06-11 Kazu Hirata - - * config/h8300/h8300.h (RETURN_IN_MEMORY): Accept DImode if - !TARGET_H8300. - -2003-06-11 Kazu Hirata - - * config/h8300/h8300.c (final_prescan_insn): Don't dump rtl. - * config/h8300/h8300.h (MASK_RTL_DUMP): Remove. - (TARGET_RTL_DUMP): Likewise. - (TARGET_SWITHCES): Remove -mrtl-dump. - -2003-06-10 Richard Henderson - - * optabs.c (gen_cond_trap): Fix prepare_operand typo. - -2003-06-10 Richard Henderson - - * config/ia64/ia64.md (call_gp): Fix memory mode. - -2003-06-10 James E Wilson - - PR target/8812 - * reload1.c (choose_reload_regs): For equiv reg, add loop over all - hard regs for reload_reg_used_at_all and reg_class_contents checks. - -2003-06-10 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Remove support for - operand character 'b'. - Add the AND case to operand character 'c'. - * config/h8300/h8300.md (two anonymous patterns): Replace - operand character 'b' with 'c'. - -2003-06-10 Kazu Hirata - - * config/h8300/h8300.c (print_operand): Remove support for - operand character 'u'. - -2003-06-10 Nathanael Nerode - - * configure.in: Fix typo. - * configure: Regenerate. - -2003-06-10 Loren James Rittle - - * config/alpha/alpha.c (unicosmk_file_end): Add conditional - compilation guard. - -2003-06-10 J"orn Rennecke - - * sh-protos.h (function_symbol): Declare. - * sh.c (expand_block_move, expand_ashiftrt): Use it. - (sh_expand_prologue, sh_expand_epilogue): Likewise. - (sh_initialize_trampoline): Likewise. - (function_symbol): New function. - * sh.md (udivsi3, divsi3, mulsi3, ic_invalidate_line): Use it. - (initialize_trampoline, call, call_pop, call_value, sibcall): Likewise. - (call_value_pop, shcompact_return_tramp): Likewise. - - * sh.h (OVERRIDE_OPTIONS): Don't suppress --profile-arc-flag. - - * sh.md (GOTaddr2picreg): Use gen_lowpart to get lowpart of - target register. - -2003-06-10 DJ Delorie - - * doc/md.texi (Machine Constraints): Document stormy's Z - constraint. - -2003-06-10 Geoffrey Keating - - * except.c (call_site_base): Mark with GTY. - -2003-06-10 Richard Earnshaw - - * arm-proto.h: Convert to ISO C90 prototypes. - * arm.c: Likewise. - -2003-06-10 J"orn Rennecke - - * sh.c (sh_output_mi_thunk): Call insn_locators_initialize. - -2003-06-10 Steve Ellcey - - * calls.c (expand_call): Convert structure_value_addr to Pmode if - necessary. - -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-10 DJ Delorie - - * config/stormy16/stormy16.c (xstormy16_extra_constraint_p): Add Z, - which matches (const_int 0) for addhi3. - * config/stormy16/stormy16.md: Document known constraints. - (addhi3): Handle adding zero. - -2003-06-10 Kazuhiro Inaoka - - * config/m32r/m32r.h (HARD_REGNO_RENAME_OK): New. - * config/m32r/m32r.c (m32r_hard_regno_rename_ok): New. - * config/m32r/m32r-protos.h: Prototype it. - -2003-06-10 Janis Johnson - - * config/rs6000/eabi.h (TARGET_OS_CPP_BUILTINS): Define builtins - common to rs6000 sysv targets. - * config/rs6000/eabisim.h (TARGET_OS_CPP_BUILTINS): Ditto. - * config/rs6000/rtems.h (TARGET_OS_CPP_BUILTINS): Ditto. - -2003-06-10 Nick Clifton - - * config.gcc: Add arm-wince-pe target. - * config/arm/pe.h (MULTILIB_DEFAULTS): Define. - Add comment about default apcs26 support. - * config/arm/t-pe (MULTILIB_OPTIONS): Add an -mapcs-32 - multilib. - (MULTILIB_DIRNAMES): Add 'apcs32'. - * config/arm/t-wince-pe: New makefile fragment. - * config/arm/wince-pe.h: New file. Overrides a few definitions - in arm/pe.h - -2003-06-10 Roger Sayle - - * builtins.c (fold_builtin): Optimize cos(-x) as cos(x). - * fold-const.c (fold ): Convert -f(x) into f(-x) - when x is easily negated and f is sin, tan or atan. - (fold ): Optimize tan(x)*cos(x) and cos(x)*tan(x) as - sin(x) with flag_unsafe_math_optimizations. - (fold ): With flag_unsafe_math_optimizations fold - sin(x)/cos(x) as tan(x) and cos(x)/sin(x) as 1.0/tan(x). - -2003-06-10 Roger Sayle - - * fold-const.c (fold ): Don't fold x == x only if x - is a floating point type *and* we currently honor NaNs. - (fold ): Likewise. - -2003-06-10 Mark Mitchell - - PR c++/11131 - * tree-inline.c (inlinable_function_p): Call the language-specific - hook early. - -2003-06-09 David Taylor - - * config/rs6000/rs6000.c (rs6000_va_start, rs6000_va_arg): Skip over - the f_res field. - -2003-06-09 Nathanael Nerode - - * configure.in: Remove references to host_truncate_target. - * configure: Regenerate. - * config.gcc: Remove references to truncate_target, - host_truncate_target. - - * Makefile.in, configure.in, config/m68hc11/t-m68hc11-gas: - Replace "build_canonical" with build, "host_canonical" with host. - * configure.in: Use GCC_TOPLEV_SUBDIRS. - * aclocal.m4: Include ../config/acx.m4. - * configure: Regenerate. - -2003-06-09 David Taylor - - * config/rs6000/rs6000.c (rs6000_build_va_list): Give the two - bytes of padding in the __va_list_tag structure a name (reserved). - -2003-06-09 Jason Merrill - - * fold-const.c (operand_equal_p): Handle ADDR_EXPR and TRUTH_NOT_EXPR. - -2003-06-09 Osku Salerma - - * c-format.c (check_format_string, get_constant): New. - (handle_format_attribute, handle_format_arg_attribute, - decode_format_attr): Change to use above functions. - -2003-06-09 Richard Henderson - - * stmt.c (expand_asm_operands): Re-word warning. - -2003-06-08 Andrew Pinski - - PR target/8787 - * config/i386/djgpp.h (ASM_FILE_START): emit `.intel_syntax' - if -masm=intel. - -2003-06-09 James E Wilson - - * config/frv/cmovc.c, config/frv/cmovh.c, config/frv/cmovw.c, - config/frv/frvbegin.c, config/frv/frvend.c, config/frv/lib1funcs.asm: - Add libgcc exception. - -2003-06-09 David Edelsohn - Ayal Zaks - - * config/rs6000/rs6000.md (define_attr "type"): Add insert_word. - (insvsi*): Add insert_word attribute. - * config/rs6000/rs6000.c (rs6000_variable_issue): Add TYPE_INSERT_WORD. - * config/rs6000/{40x.md,603.md,6xx.md,7450.md,7xx.md,mpc.md, - power4.md,rios1.md,rios2.md,rs64.md}: Add insert_word. - -2003-06-09 Kazu Hirata - - * fold-const.c (fold): Fix a comment typo. - -2003-06-09 Nathan Sidwell - - * tree-inline.c (expand_call_inline): DECL_SOURCE_LINE_FIRST is - removed. - -2003-06-09 J"orn Rennecke - - * sh.c (gen_block_redirect): Use locators. - -2003-06-09 Richard Earnshaw - - * arm.h (THUMB_PRINT_OPERAND_ADDRESS): Use %wd in format and remove - cast to int. - -2003-06-09 Richard Sandiford - - * configure.in: Assume gas 2.14 and above can handle MIPS relocation - operators. - * configure: Regenerated. - -2003-06-09 Richard Sandiford - Alexandre Oliva - - * config/mips/mips.h (GLOBAL_POINTER_REGNUM): New macro. - (PIC_OFFSET_TABLE_REGNUM): Look at pic_offset_table_rtx after reload. - (STARTING_FRAME_OFFSET): Don't allocate a cprestore slot for - n32/64 PIC. - (MUST_SAVE_REGISTERS): Delete. - * config/mips/mips.c (mips_frame_info): Remove extra_size field. - (machine_function): Add global_pointer field. - (mips_classify_constant): Check for (const $gp) using pointer equality - with pic_offset_table_rtx. - (mips_classify_constant): Handle RELOC_LOADGP_HI and RELOC_LOADGP_LO. - (mips_restore_gp): Use current_function_outgoing_args_size. - (print_operand): Use PIC_OFFSET_TABLE_REGNUM instead of - GP_REG_FIRST + 28. Handle relocation strings that have - more than one '('. - (mips_reloc_string): Handle RELOC_LOADGP_HI and RELOC_LOADGP_LO. - (mips_global_pointer): New function. - (mips_save_reg_p): New function, mostly split out from... - (compute_frame_size): ...here. Remove handling of extra_size. - Reclaim args_size if no variables depend on it. Don't treat gp - as a special case: handle it in the main GPR loop. - (mips_initial_elimination_offset): Fix comment. - (save_restore_insns): Save every register in the GPR mask, - removing distinction between mask and real_mask. - (mips_output_function_prologue): Update .frame psuedo-op after - the removal of extra_size. Move the SVR4 PIC stack allocation - and cprestore instructions to mips_expand_prologue. - (mips_gp_insn): New function. - (mips_expand_prologue): Set REGNO (pic_offset_table_rtx) to - the chosen global pointer. Handle SVR4 PIC stack allocation - in the same way as other ABIs. Adjust varargs code accordingly. - Emit a cprestore insn after allocating the stack. Use mips_gp_insn - to emit the loadgp sequence. Follow it with a loadgp_blockage - if not using explicit relocs. - (mips_output_function_epilogue): Reinstate the default gp register. - (mips16_gp_pseudo_reg): Use pic_offset_table_rtx. - (mips16_optimize_gp): Likewise. - * config/mips/mips.md (UNSPEC_LOADGP): Remove. - (UNSPEC_SETJMP, UNSPEC_LONGJMP): Remove. - (UNSPEC_CPRESTORE, RELOC_LOADGP_HI, RELOC_LOADGP_LO): New. - (loadgp): Remove. - (loadgp_blockage, cprestore): New instructions. - (builtin_setjmp_setup): Implement using emit_move_insn. Use - pic_offset_table_rtx. - (builtin_setjmp_setup_32, builtin_setjmp_setup_64): Remove. - (builtin_longjmp): Use gen_raw_REG to force use of $28. - -2003-06-09 Richard Sandiford - - * config/mips/mips-protos.h (mips_output_division): Declare. - * config/mips/mips.h (MASK_CHECK_RANGE_DIV): Remove. - (MASK_BRANCHLIKELY): Use MASK_CHECK_RANGE_DIV's old number. - (TARGET_NO_CHECK_ZERO_DIV, TARGET_CHECK_RANGE_DIV): Remove. - (TARGET_CHECK_ZERO_DIV): New macro. - (TARGET_SWITCHES): Remove -mcheck-range-div & -mno-check-range-div. - * config/mips/mips.c (mips_output_division): New function. - * config/mips/mips.md (length): Take TARGET_CHECK_ZERO_DIV into - account when calculating the default length of a division. - (divmodsi4, divmoddi4, udivmodsi4, udivmoddi4): Turn into define_insns. - Enable regardless of optimization level. Use mips_output_division. - (divmodsi4_internal, divmoddi4_internal, udivmodsi4_internal, - udivmoddi4_internal, div_trap, div_trap_normal, div_trap_mips16, - divsi3, divsi3_internal, divdi3, divdi3_internal, modsi3, - modsi3_internal, moddi3, moddi3_internal, udivsi3, udivsi3_internal, - udivdi3, udivdi3_internal, umodsi3, umodsi3_internal, umoddi3, - umoddi3_internal): Remove. - -2003-06-09 Richard Sandiford - - * config/mips/mips.c (mips_reg_names): Change hilo entry to "". - (mips_sw_reg_names): Likewise. - (mips_regno_to_class): Change hilo entry to NO_REGS. - (hilo_operand): Use MD_REG_P. - (extend_operator): New predicate. - (override_options): Remove 'a' constraint. - (mips_secondary_reload_class): Remove hilo handling. Also remove - handling of (plus sp reg) reloads for mips16. - (mips_register_move_cost): Remove hilo handling. - * config/mips/mips.h (FIXED_REGISTERS): Make hilo entry fixed. - (MD_REG_LAST): Remove hilo from range. - (HILO_REGNUM): Delete. - (reg_class): Remove HILO_REG and HILO_AND_GR_REGS. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly. - (PREDICATE_CODES): Add entry for extend_operator. - (DEBUG_REGISTER_NAMES): Change hilo entry to "". - * config/mips/mips.md: Remove hilo clobbers wherever they occur. - Remove constraints from multiplication define_expands. Remove - clobbers from "decorative" define_expand patterns. - (UNSPEC_HILO_DELAY): Delete. - (*mul_acc_si, *mul_sub_si): Add early-clobber to operand 6. - (mulsidi3, umulsidi3): Change pattern to match the TARGET_64BIT case. - Adjust C code to just emit insns for !TARGET_64BIT. - (mulsidi3_internal): Rename to mulsidi3_32bit. - (mulsidi3_64bit): Use a "d" constraint for the destination. - Use extend_operator so that the pattern can handle umulsidi3 as well. - Split the instruction after reload. - (*mulsidi3_64bit_parts): New pattern, generated by mulsidi3_64bit. - (umulsidi3_internal): Rename to umulsidi3_32bit. - (umulsidi3_64bit): Remove. - (*smsac_di, *umsac_di): Line-wrap fixes. - (udivsi3_internal): Don't allow operand 2 to be constant. - (udivdi3_internal, umodsi3_internal, umoddi3_internal): Likewise. - (movdi_internal2, movsi_internal): Remove hilo alternatives. - (reload_in[sd]i, reload_out[sd]i, hilo_delay): Remove. - -2003-06-09 Richard Sandiford - - PR target/10913 - * config/mips/mips.h (TARGET_FILE_SWITCHING, NO_DBX_FUNCTION_END, - PUT_SDB_SCL, PUT_SDB_INT_VAL, PUT_SDB_VAL, PUT_SDB_ENDEF, - PUT_SDB_TYPE, PUT_SDB_SIZE, PUT_SDB_DIM, PUT_SDB_START_DIM, - PUT_SDB_NEXT_DIM, PUT_SDB_LAST_DIM, PUT_SDB_TAG, PUT_SDB_SRC_FILE, - SDB_GENERATE_FAKE, TEXT_SECTION): Delete. - (PUT_SDB_DEF, PUT_SDB_PLAIN_DEF, PUT_SDB_BLOCK_START, - PUT_SDB_BLOCK_END, PUT_SDB_FUNCTION_END): Replace use of - asm_out_text_file with asm_out_file. - * config/mips/iris5gas.h (PUT_SDB_SIZE, PUT_SDB_TYPE): Likewise. - * config/mips/elf.h (TEXT_SECTION): Undefine. - * config/mips/elf64.h (TEXT_SECION): Undefine. - * config/mips/openbsd.h (TEXT_SECION): Undefine. - * config/mips/mips.c (asm_out_text_file, asm_out_data_file): Delete. - (override_options): Disable small-data optimizations unless using - gas or explicit relocations. - (mips_asm_file_start, mips_asm_file_end, mips_output_function_epilogue, - iris6_asm_named_section, iris6_asm_file_start): Remove code for - handling TARGET_FILE_SWITCHING. - (copy_file_data): Move into TARGET_IRIX6 block. - -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-08 Kaveh R. Ghazi - - * varasm.c: Don't include c-tree.h. - -2003-06-08 Andreas Jaeger - - * predict.h: Convert to ISO C90 prototypes. - * predict.c: Likewise. - * tree-dump.h: Likewise. - * tree-dump.c: Likewise. - * diagnostic.h: Likewise. - * diagnostic.c: Likewise. - * combine.c: Likewise. - - * rtl.h: Convert prototypes of combine.c to ISO C90. - -Sun Jun 8 21:27:41 CEST 2003 Jan Hubicka - - * cfglayout.c (insn_scope): New static function - (block_locators_*, line_locators*, file_locators*): New static varrays. - (scope_to_insns_initialize): Use them. - (insn_line, insn_file): New functions. - (scope_to_insns_finalize): Use insn_scope. - (prologue_locator, epilogue_locator): New global variables. - * emit-rt.c (try_split, make_insn_raw, make_jump_insn_raw, - make_call_insn_raw, emit_copy_of_insn_after): Use locators. - (emit_insn_after_scope, emit_insn_before_scope - emit_jump_insn_after_scope, emit_jump_insn_before_scope - emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to... - (emit_insn_after_setloc, emit_insn_before_setloc - emit_jump_insn_after_setloc, emit_jump_insn_before_setloc - emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these; - use locators. - * final.c (notice_source_line): Use locators. - (final_start_function): Set initial source file and line. - (final_scan_insn): Use locators. - * ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants, - noce_try_addcc, 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): Likewise. - * integrate.c (copy_insn_list): Likewise. - * jump.c (duplicate_loop_exit_test): LIkewise. - * print-rtl.c (print_rtx): Print locators. - * recog.c (peephole2_optimize): Likewise. - * rtl.h (INSN_SCOPE): Remove. - (emit_insn_after_scope, emit_insn_before_scope - emit_jump_insn_after_scope, emit_jump_insn_before_scope - emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to... - (emit_insn_after_setloc, emit_insn_before_setloc - emit_jump_insn_after_setloc, emit_jump_insn_before_setloc - emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these; - (insn_file, insn_line, prologue_locator, epilogue_locator): Declare. - * unroll.c (copy_loop_body): Use locators. - * function.c (set_insn_locators): New function. - (thread_prologue_and_epilogue_insns): Set the locators accordingly. - -2003-06-08 Kazu Hirata - - * config/h8300/h8300.h (LONG_LONG_TYPE_SIZE): Set to 64. - * config/h8300/t-h8300 (LIB1ASMFUNCS): Remove _floatdisf - _fixsfdi _fixunssfdi. - (LIB2FUNCS_EXTRA): Add entries for clzhi2, ctzhi2, parityhi2, - popcounthi2. - (TARGET_LIBGCC2_CFLAGS): Remove -DDI=SI. - * config/h8300/clzhi2.c: New. - * config/h8300/ctzhi2.c: Likewise. - * config/h8300/parityhi2.c: Likewise. - * config/h8300/popcounthi2.c: Likewise. - -Sun Jun 8 15:52:17 CEST 2003 Jan Hubicka - - * i386.md (subsi_3_zext, sse2_nandv2di3): Fix predicates. - * i386.c (k8_avoid_jump_misspredicts): Fix debug output. - - * cfg.c (verify_flow_info): Move IL independent checks from cfgrtl here. - (dump_bb): New based on old dump_bb in cfgrtl.c - (debug_bb, debug_bb_n): Move the functions from cfgrtl.c here. - * cfghooks.h (cfgh_verify_flow_info): Return status. - * cfglayout.c (cfg_layout_finalize): Verify CFG correctness. - * cfgrtl.c (debug_bb, debug_bb_n): Move to cfg.c - (dump_bb): Remove generic parts. - (rtl_verify_flow_info_1): Break out from rtl_verify_flow_info. - (rtl_verify_flow_info): Only check things dependeing on linearized RTL. - -2003-06-08 Neil Booth - - * Makefile.in: Rename options.c and options.h to c-options.c and - c-options.h. - (OBJS): Remove options.o. - * c-opts.c: Don'tInclude c-options.h instead of options.h. - * opts.c: Don't include options.h. - (find_opt): Can't use enum opt_code or N_OPTS. - * opts.h (struct cl_option, cl_options, cl_options_count): Move from... - * opts.sh: ... here. - -2003-06-07 Eric Botcazou - Ulrich Weigand - - PR pch/9830 - * ggc-common.c (HAVE_MMAP_FILE): Include sys/types.h - if HAVE_MINCORE is defined. - (MAP_FAILED): Define if not defined. - (gt_pch_save): Test against MAP_FAILED. - (gt_pch_restore): If HAVE_MINCORE, use MAP_FIXED to force - the mapping address to the preferred base after checking it - is possible to do so. Test against MAP_FAILED. - * configure.in: Test for the presence of mincore in libc. - * config.in: Regenerate. - * configure: Regenerate. - -2003-06-07 Richard Henderson - - * config/alpha/alpha.c (alpha_setup_incoming_varargs): Fix - conditional compilation guard. - -2003-06-08 Kazu Hirata - - * optabs.c (expand_abs): Set result_unsignedp to 1 if - flag_trav is zero. - -2003-06-07 Richard Henderson - - * c-cppbuiltin.c (c_cpp_builtins): Define __EXCEPTIONS for C also. - -2003-06-07 Richard Henderson - - * basic-block.h (EDGE_SIBCALL): New. - (EDGE_ALL_FLAGS): Update. - * cfg.c (dump_edge_info): Add sibcall name. - * cfgbuild.c (make_edges): Use EDGE_SIBCALL. - * cfgrtl.c (purge_dead_edges): Handle sibcalls. - -2003-06-07 Andreas Jaeger - - * mklibgcc.in (lib2funcs): Remove _exit. - * libgcc2.c: Remove L_exit. - * gbl-ctors.h: Remove declarations dependend on NEED_ATEXIT. - - * system.h: Poison NEED_ATEXIT, ON_EXIT, EXIT_BODY. - - * doc/tm.texi (Misc): Remove NEED_ATEXIT, ON_EXIT, EXIT_BODY. - - * ggc.h: Convert to ISO C90 prototypes. - * ggc-none.c: Likewise. - * ggc-common.c: Likewise. - * ggc-page.c: Likewise. - * ggc-simple.c: Likewise. - - * crtstuff.c: Remove undefined usage of INIT_SECTION_PREAMBLE. - - * system.h: Poison INIT_SECTION_PREAMBLE. - -2003-06-07 Zack Weinberg - - * config.gcc (with_cpu handling): Translate sparc64 in - $machine to --with-cpu=v9. - * config/alpha/alpha.c - (TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition. - (alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK. - - * target.h: New hook asm_out.file_end. - * target.h: Update to match. New hook macro TARGET_ASM_FILE_END. - * toplev.c (compile_file): Use targetm.asm_out.file_end. - * system.h: Poison ASM_FILE_END. - * varasm.c (file_end_indicate_exec_stack): New. - * output.h: Prototype it. - * doc/tm.texi: Document TARGET_ASM_FILE_END and - file_end_indicate_exec_stack. Delete references to attasm.h. - - * config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end. - (ASM_FILE_END): Delete; move code... - * config/darwin.c (darwin_file_end): Here; new function. - * config/darwin-protos.h: Prototype it. - * config/alpha/alpha.c (unicosmk_asm_file_end): Make static, - rename unicosmk_file_end. - * config/arm/aof.h (ASM_FILE_END): Delete; move code... - * config/arm/arm.c (aof_file_end): ... here; new static function. - Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER. - Make aof_dump_imports and aof_dump_pic_table static. - * config/avr/avr.c (asm_file_end): Rename avr_file_end, make static. - Set TARGET_ASM_FILE_END to avr_file_end. - * config/c4x/c4x.c (c4x_file_end): Make static. Take no arguments. - Set TARGET_ASM_FILE_END to c4x_file_end. - * config/h8300/h8300.c (asm_file_end): Rename h8300_file_end, - make static. Take no arguments. Set TARGET_ASM_FILE_END to - h8300_file_end. - * config/i370/i370.h (ASM_FILE_END): Delete; move code... - * config/i370/i370.c (i370_file_end): ... here; new static function. - Set TARGET_ASM_FILE_END to i370_file_end. - * config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end. - Take no arguments. Call file_end_indicate_exec_stack if - NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END. - * config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END. - Define NEED_INDICATE_EXEC_STACK to 0. - * config/i386/linux.h, config/i386/linux64.h: Redefine - NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END. - * config/i386/winnt.c (i386_pe_asm_file_end): Rename to - i386_pe_file_end. Take no arguments. Use ix86_file_end. - * config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to - ia64_hpux_file_end, make static. Take no arguments. - * config/ip2k/ip2k.c (asm_file_start, asm_file_end, - commands_in_prologues, commands_in_epilogues): Delete. - (function_epilogue): Update to match. - * config/mips/mips.c (mips_asm_file_end): Rename mips_file_end, - make static. Take no arguments. - (iris6_asm_file_end): Rename iris6_file_end, make static, use - mips_file_end, take no arguments. - Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as - appropriate. - * config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end, - make static, take no arguments. Set TARGET_ASM_FILE_END to - mmix_file_end. - * config/pa/pa.c (output_deferred_plabels): Make static, take - no arguments. Set TARGET_ASM_FILE_END to output_deferred_plabels. - * config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it. - (ASM_FILE_END): Delete; move code... - * config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here; - new static function. - - * config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h - * config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h: - Don't set ASM_FILE_END. - * config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h - * config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h - * config/sparc/linux64.h: Set TARGET_ASM_FILE_END to - file_end_indicate_exec_stack; don't set ASM_FILE_END. - * config/alpha/unicosmk.h, config/i386/cygming.h - * config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END. - * config/arm/arm-protos.h, config/alpha/alpha-protos.h - * config/avr/avr-protos.h, config/c4x/c4x-protos.h - * config/h8300/h8300-protos.h, config/ia64/ia64-protos.h - * config/ip2k/ip2k-protos.h, config/mips/mips-protos.h - * config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update. - -Sat Jun 7 18:32:13 CEST 2003 Jan Hubicka - - * i386.h (OPTION_DEFAULT_SPECS): Avoid -mcpu default when -march is - specified. - -Sat Jun 7 15:20:01 CEST 2003 Jan Hubicka - - * Makefile.in (stageprofile_build): Kill redundant target. - * i386.c (mdep_reorg): Don't pad jumps for Athlon. - -2003-06-07 Andreas Jaeger - - * doc/tm.texi (Costs): Remove DONT_REDUCE_ADDR documentation. - - * config/avr/avr.h: Remove comment regarding DONT_REDUCE_ADDR. - * config/dsp16xx/dsp16xx.h: Likewise. - * config/i386/i386.h: Likewise. - * config/ip2k/ip2k.h: Likewise. - -2003-06-07 Neil Booth - - * Makefile.in (OJBS, c-opts.o): Update. - (c-options.c, c-options.h): Rename options.h and options.c. - (options.h): Rename options_.h. - (opts.o): New. - * c-common.h (c_common_handle_option): Replace c_common_decode_option. - (c_common_init_options): Update prototype. - * c-lang.c (c_init_options): Update prototype. - (LANG_HOOKS_HANDLE_OPTION): Override. - (LANG_HOOKS_DECODE_OPTION): Drop. - * c-opts.c: Include opts.h and options.h instead of c-options.h - and c-options.c. - (lang_flags): Move to file scope. - (find_opt, c_common_decode_option): Remove. - (CL_C, CL_OBJC, CL_CXX, CL_OBJCXX, CL_JOINED, CL_SEPARATE, - CL_REJECT_NEGATIVE): Move to opts.h. - (missing_arg): Update prototype. - (c_common_init_options): Update for new prototype. - (c_common_handle_options): Filenames are passed as N_OPTS. - * hooks.c (hook_int_void_0): New. - * hooks.h (hook_int_void_0): New. - * langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): New default. - (LANG_HOOKS_HANDLE_OPTION): Default to NULL for now. - (LANG_HOOKS_INITIALIZER): Update. - * langhooks.h (init_options): Update. - (handle_option): New. - * opts.c, opts.h: New files. - * opts.sh: Update c file to include opts.h and options.h. - * toplev.c: Include opts.h; change options.h to options_.h. - (parse_options_and_default_flags): Get lang_mask, use - handle_option for language-specific handling. - * objc/objc-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. - (LANG_HOOKS_HANDLE_OPTION): Override. - (objc_init_options): Update. - -2003-06-07 Magnus Kreth - Thibaud Gaillard - - PR other/7031 - * Makefile.in (install-common): Remove GCOV_INSTALL_NAME instead of - gcov. - -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 Nathanael Nerode - - * configure.in: Make $(target_subdir) correspond with top level usage. - * Makefile.in: Likewise. - * configure: Regenerate. - -2003-06-06 John David Anglin - - * pa.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_COMMON, - ASM_OUTPUT_ALIGNED_LOCAL): Cast `SIZE' and `ALIGNED' parameters to - unsigned HOST_WIDE_INT. - * pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMOM, ASM_OUTPUT_ALIGNED_LOCAL): - Likewise. - * pa64-hpux.h (ASM_OUTPUT_ALIGNED_COMMON, ASM_OUTPUT_ALIGNED_LOCAL): - Likewise. - -2003-06-06 Kaveh R. Ghazi - - * doc/install.texi (Prerequisites): New section documenting - tools and packages necessary prior to building and/or - modifying GCC. - * doc/install.texi2html: Also generate prerequisites.html. - -2003-06-06 Richard Earnshaw - - PR target/11052 - * ifcvt.c (noce_process_if_block): Fail if the destination has - side-effects. - -2003-06-06 Jason Merrill - - * stmt.c (resolve_asm_operand_names): Rename from - resolve_operand_names. No longer static. Avoid needless copying. - Don't build array of constraints. - (expand_asm_operands): Build it here. - * tree.h: Declare resolve_asm_operand_names. - - * stmt.c (expand_decl): Put artificial vars into registers even - when not optimizing, and don't mark the regs as user vars. - -2003-06-06 J"orn Rennecke - - * sh.h (FUNCTION_ARG_1): Consistently use NEW_MODE for the mode - of the generated register. - -2003-06-06 Daniel Jacobowitz - - * config.gcc: Add a missing sparc64 case. - -2003-06-06 Jakub Jelinek - - * mklibgcc.in: Propagate .note.GNU-stack section if needed into - the .hidden assembly stubs. - -2003-06-06 H.J. Lu - - * config.gcc (extra_headers): Add emmintrin.h for i[34567]86-*-* - and x86_64-*-*. - - * config/i386/mmintrin.h: Update version and add alternate - intrinsic names. - * config/i386/xmmintrin.h: Likewise. - - * config/i386/xmmintrin.h: Include . Move SSE2 - intrinsics to ... - * config/i386/emmintrin.h: Here. New file. - -2003-06-06 Roger Sayle - - * fold-const.c (fold ): Re-fold the result of folding - fabs(-x) into fabs(x). Use tree_expr_nonnegative_p to determine - when the ABS_EXPR (fabs or abs) is not required. - (tree_expr_nonnegative_p): Move the logic that sqrt and exp are - always nonnegative from fold to here. Additionally, cabs and fabs - are always non-negative, and pow and atan are non-negative if - their first argument is non-negative. - - * builtins.c (fold_builtin_cabs): New function to fold cabs{,f,l}. - Evaluate cabs of a constant at compile-time. Convert cabs of a - non-complex argument into fabs. Convert cabs(z) into - sqrt(z.r*z.r + z.i*z.i) at the tree-level with -ffast-math or - -funsafe-math-optimizations or -ffast-math. - (fold_builtin): Convert BUILT_IN_FABS{,F,L} into an ABS_EXPR. - Fold BUILT_IN_CABS{,F,L} using fold_builtin_cabs. - -Thu Jun 5 20:51:09 CEST 2003 Jan Hubicka - - * sourcebuild.texi (Front End Directory): Document new hooks. - -Fri Jun 6 11:02:35 CEST 2003 Jan Hubicka - - * function.c (FLOOR_ROUND, CEIL_ROUND): Fix. - * i386.md (gen_pro_epilogue_adjust_stack): Deal with gigantic - stack frames. - (pro_epilogue_adjust_stack_rex64_2): New pattern - -Fri Jun 6 11:03:14 CEST 2003 Jan Hubicka - Pop Sebastian - Zdenek Dvorak - - * cfghooks.h, cfghooks.c: New files. - * Makefile.in (BASIC_BLOCK_H): Depends on cfghooks.h. - (OBJS): Add cfghooks.o. - (cfghooks.o): New rule. - * basic-block.h (split_edge): Rename to rtl_split_edge. - (verify_flow_info): Rename to rtl_verify_flow_info. - (cfghooks.h): Included here. - * cfgrtl.c (split_edge): Renamed rtl_split_edge. - (verify_flow_info): Renamed rtl_verify_flow_info. - * toplev.c (rest_of_compilation): Call rtl_register_cfg_hooks. - - * basic-block.h (split_block, split_edge, flow_delete_block, - redirect_edge_and_branch, redirect_edge_and_branch_force): Delete. - (flow_delete_block_noexpunge): Return void. - * cfg.c (verify_flow_info): New function. - * cfgcleanup.c (try_simplify_condjump, outgoing_edges_match, - try_crossjump_to_edge, try_optimize_cfg, delete_unreachable_blocks): - Use delete_block. - * cfglayout.c (function_footer): Rename to... - (cfg_layout_function_footer): ... this variable - (unlink_insn_chain): Make global. - (fixup_reorder_chain, record_effective_endpoints): Update. - (cleanup_unconditional_jumps): Use delete_block. - (cfg_layout_redirect_edge, cfg_layout_split_block): Move to cfgrtl.c - (cfg_layout_duplicate_bb): Use redirect_edge_and_branch_force. - (cfg_layout_initialize, cfg_layout_finalize): Update hooks. - * cfglayout.h (cfg_layout_redirect_edge, cfg_layout_split_block): Delete. - (cfg_layout_function_footer): Declare. - * cfgloopmanip (split_loop_bb): Do not update RBI. - (remove_bbs): Use delete_block. - (loop_reidrect_edge, loop_delete_branch_edge): Use - redirect_edge_and_branch. - (create_preheader): Use split_block and redirect_edge_and_branch_force. - (split_edge_with): Likewise. - * cfgrtl.c: Include cfglayout.h - (split_edge): Rename to ... - (rtl_split_edge) ... this one; make local. - (redirect_edge_and_branch): Rename to ... - (rtl_redirect_edge_and_branch) ... this one; make local. - (redirect_edge_and_branch_force): Rename to ... - (rtl_redirect_edge_and_branch_force) ... this one; make local. - (cfg_layout_delete_block, cfg_layout_delete_edge_and_branch_force): New. - (cfg_layout_redirect_edge_and_branch, cfg_layout_split_block): Move here from - cfglayout.c; update to directly call RTL counterparts. - (rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): New functions. - * ifcvt.c (find_cond_trap): Use delete_block. - (find_if_case_1): Use delete_block. - (find_if_case_2): Use delete_block. - * rtl.h (unlink_insn_chain): Declare. - * toplev.c (rtl_reigster_cfg_hooks): New. - -2003-06-05 Richard Henderson - - * recog.c (peephole2_optimize): Revert last change. - -2003-06-05 Richard Henderson - - * recog.c (peephole2_optimize): Don't split block unless - can_throw_internal. - -2003-06-06 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Correct the syntax of rotxl. - * config/h8300/h8300.md (*addsi3_lshiftrt_16_zexthi): Likewise. - -2003-06-05 Kelley Cook - - PR optimization/4490 - * config/i386/i386.md: Don't use XFMode if TARGET_128BIT_LONG_DOUBLE. - * doc/invoke.texi (m96bit-long-double, m128bit-long-double): Reword - documentation to accurately reflect what these options do. - -2003-06-06 Kaz Kojima - - * config/sh/linux.h (STARTFILE_SPEC): Handle -pie. Simplify. - (ENDFILE_SPEC): Redefine to handle -pie. - -2003-06-05 Phil Edwards - - * Makefile.in (qmtest-g++): Use target_alias, not target. - -2003-06-05 Per Bothner - - * toplev.c (push_srcloc): Simplify behavior to save current location - and set current location to parameters. - (pop_srcloc): Simplify semantics. - (lang_dependent_init): Remove now-useless initial push_srcloc. - -2003-05-06 Richard Henderson - - * dwarf2out.c (loc_descriptor_from_tree): Return 0 for - language-specific tree codes. - -2003-06-05 John David Anglin - - PR middle-end/9986 - * pa.c (pa_init_builtins): Also set implicit_built_in_decls for - BUILT_IN_FPUTC_UNLOCKED to NULL_TREE. - -Thu Jun 5 18:32:46 CEST 2003 Jan Hubicka - - * install.tex: Document profiledbootstrap. - - * configure.in: Add support for lang.stageprofile and - lang.stagefeedback - * Makefile.in (clean, distclean): Kill new stages - (POSTSTAGE1_FLAGS_TO_PASS): Break from ... - (STAGE2_FLAGS_TO_PASS): ... this one. - (STAGEPROFILE_FLAGS_TO_PASS, STAGEFEEDBACK_FLAGS_TO_PASS): New. - (stage[2-4]_build): Add POSTSTAGE1_FLAGS_TO_PASS. - (stageprofile_build, stageprofile_copy, stagefeedback_build, - stagefeedback_copy): New. - (restageprofile, restagefeedback, stageprofile-start, - stageprofile, stagefeedback-start): Likewise. - -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. - -Thu Jun 5 14:59:44 CEST 2003 Jan Hubicka - - * combine.c (simplify_if_then_else): (IF_THEN_ELSE (NE REG 0) (0) (8)) - is REG for nonzero_bits (REG) == 8. - -Thu Jun 5 13:23:51 CEST 2003 Jan Hubicka - - * i386.md (align): Fix warning; clarify what to do when no p2align - is available. - -2003-06-05 Nick Clifton - - * config.gcc (m32r-elf): Revert previous delta. - * config/m32r/t-m32r (crtinit.o): Fix rule to work with - multilibs. Remove m32rx specific version. - (crtfini.o): Likewise. - (EXTRA_MULTILIB_PARTS): Define. - -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 Richard Henderson - - * config/i386/i386.c (struct ix86_address): Add seg. - (no_seg_address_operand): New. - (ix86_decompose_address): Restructure PLUS loop. Accept one - UNSPEC_TP if TARGET_TLS_DIRECT_SEG_REFS. Adjust ESP swap test - to test for a regnum, not stack_pointer_rtx. - (ix86_address_cost): Reduce cost if non-default segment. - (legitimate_address_p): Remove UNSPEC_TP check. - (get_thread_pointer): Add to_reg argument. Don't represent - the thread pointer as a memory load. - (legitimize_tls_address): Split out of ... - (legitimize_address): ... here. - (print_operand_address): Handle parts.seg. - (ix86_expand_move): Use legitimize_tls_address. - (ix86_rtx_costs): Handle UNSPEC_TP. - * config/i386/i386.h (MASK_TLS_DIRECT_SEG_REFS): New. - (TARGET_TLS_DIRECT_SEG_REFS): New. - (TARGET_SWITCHES): Add tls-direct-seg-refs. - (TARGET_TLS_DIRECT_SEG_REFS_DEFAULT): Default. - (PREDICATE_CODES): Add no_seg_address_operand. - * config/i386/i386.md (lea_1): Use it. - (lea_1_rex64, lea_1_zext, lea_2_rex64): Likewise. - (load_tp_si, add_tp_si, load_tp_di, add_tp_di): New. - * config/i386/linux.h (TARGET_TLS_DIRECT_SEG_REFS_DEFAULT): New. - * config/i386/linux64.h (TARGET_TLS_DIRECT_SEG_REFS_DEFAULT): New. - * doc/invoke.texi: Add -mtls-direct-seg-refs. - -2003-06-04 Mark Mitchell - - * Makefile.in (QMTESTRUNFLAGS): Set for DejaGNU emulation. - (QMTEST_GPP_TESTS): Use "g++" by default. - (stamp-qmtest): Tweak database creation. - (QMTEST_DIR/context): Update context file format. - (qmtest-g++): Tweak command-line. - -2003-06-04 Kaveh R. Ghazi - - * Makefile.in (varasm.o): Don't set -Wno-error. - * rs6000/t-rs6000 (varasm.o, out_object_file): Don't clear. - -2003-06-04 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. - -2003-06-04 Kaveh R. Ghazi - - * arm/aout.h (ASM_OUTPUT_SKIP): Fix cast for format specifier warning. - * arm.c (arm_output_function_prologue): Fix format specifiers. - * arm.h (ARM_PRINT_OPERAND_ADDRESS): Likewise. - * m68k.c (m68k_output_mi_thunk): Use more readable %wd instead of - HOST_WIDE_INT_PRINT_DEC. - * vax.c (vax_output_function_prologue): Fix format specifiers. - -2003-06-04 Richard Henderson - - * cse.c (find_best_addr): Consider binary operators even if second - argument is not CONST_INT. - -2003-06-04 Zdenek Dvorak - - * doc/invoke.texi (max-cse-path-length): Document. - -2003-06-04 Richard Henderson - - * config/i386/i386.md (align): Use ASM_OUTPUT_*ALIGN macros. - -2003-06-04 Andrew Pinski - - * config/rs6000/darwin.h (RS6000_OUTPUT_BASENAME): - Remove semi-colon at the end of the expression. - -2003-06-04 Kaveh R. Ghazi - - * i370.c (mvs_function_name_length): Fix signed/unsigned warnings. - * i370.h (mvs_function_name_length): Likewise. - * i960.h (CONSTANT_ALIGNMENT): Likewise. - * mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - * pa.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - * rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Delete unused - variable. - -2003-06-04 Daniel Jacobowitz - - * config.gcc: Reorganize --with-cpu logic. Set - configure_default_options according to the default CPU, --with-cpu, - --with-arch, --with-tune, --with-schedule, --with-abi, and - --with-float. Check for legal values of various options. - * configure.in: Define configure_default_options in configargs.h. - * configure: Regenerated. - * config/mips/mips.h (TARGET_DEFAULT_ARCH_P) - (TARGET_DEFAULT_FLOAT_P): New macros. - * gcc.c (do_option_spec): New function. - (struct default_spec, option_default_specs): New. - (main): Call do_option_spec. - * config/alpha/alpha.h, config/arm/arm.h, config/i386/i386.h, - config/mips/mips.h, config/pa/pa.h, config/rs6000/rs6000.h, - config/sparc/sparc.h (OPTION_DEFAULT_SPECS): Define. - - * doc/install.texi: Update --with-cpu documentation. Mention - --with-arch, --with-schedule, --with-tune, --with-abi, and - --with-float. - * doc/tm.texi (Driver): Document OPTION_DEFAULT_SPECS. - -2003-06-04 Daniel Jacobowitz - - * config.gcc: Only process --with-cpu logic in the third pass. - -2003-06-04 Daniel Jacobowitz - - * config.gcc: Reorganize --with-cpu section. Remove an - obsolete comment about the default CPU for x86-64. Fix - a typo for the ep9312. Update the list of supported PowerPC - CPUs. Support a limited set of new --with-cpu options - for i386. - -2003-06-04 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_complex_function_value): Unpack - complex numbers <= 32 bits into two registers. - -2003-06-04 Kaveh R. Ghazi - - * alpha.c (print_operand_address): Fix format specifier warnings. - * alpha/elf.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - * alpha/vms.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - * arm/aof.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. - * arm/pe.h (ASM_OUTPUT_COMMON): Likewise. - * avr.h (ASM_OUTPUT_COMMON, ASM_GENERATE_INTERNAL_LABEL, - ASM_OUTPUT_SKIP): Likewise. - * c4x.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * dsp16xx.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * h8300.h (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_COMMON): - Likewise. - * i370.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * i386/cygming.h (ASM_OUTPUT_COMMON): Likewise. - * i386/darwin.h (ASM_OUTPUT_COMMON): Likewise. - * i960.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * m68k/hp320.h (PRINT_OPERAND_ADDRESS): Likewise. - * mcore.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - * pdp11.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * ptx4.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - * sparc/freebsd.h (ASM_GENERATE_INTERNAL_LABEL): Likewise. - * svr3.h (ASM_OUTPUT_COMMON): Likewise. - -2003-06-04 J"orn Rennecke - - * c-decl.c (c_init_decl_processing): Clear input_file_name - while building common nodes. - * dwarf2out.c (gen_compile_unit_die, dwarf2out_finish): - Don't add working directory for strings like . - -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 Jakub Jelinek - - * function.c (trampolines_created): New variable. - (expand_function_end): Set it when doing INITIALIZE_TRAMPOLINE. - * function.h (trampolines_created): Add. - * config/s390/linux.h (ASM_FILE_END): Define. - * config/alpha/linux-elf.h (ASM_FILE_END): Define. - * config/m68k/linux.h (ASM_FILE_END): Define. - * config/rs6000/linux.h (ASM_FILE_END): Define. - * config/rs6000/linux64.h (ASM_FILE_END): Define. - * config/rs6000/ppc-asm.h: Add .note.GNU-stack on powerpc-linux. - * config/sparc/linux.h (ASM_FILE_END): Define. - * config/sparc/linux64.h (ASM_FILE_END): Define. - * config/i386/i386.c (ix86_asm_file_end): Use SUBTARGET_FILE_END. - * config/i386/linux.h (SUBTARGET_FILE_END): Define. - * config/i386/linux64.h (SUBTARGET_FILE_END): Define. - -Wed Jun 4 18:39:33 CEST 2003 Jan Hubicka - - * i386.c (min_insn_size, k8_avoid_jump_misspredicts): New functions - (ix86_reorg): Use it. - * i386.md (align): New insn pattern. - -2003-06-04 Kaveh R. Ghazi - - * toplev.c (rest_of_type_compilation): Fix typo. - -2003-06-04 Jakub Jelinek - Alan Modra - - * config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1. - * config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise. - * config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise. - * config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise. - * config/darwin.h (NO_PROFILE_COUNTERS): Likewise. - * final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined. - (profile_function): Allow NO_PROFILE_COUNTERS to be non-constant. - * config/rs6000/rs6000.c (output_profile_hook): Likewise. - - * configure.in (powerpc*-*, s390*-*): Set tls_as_opt. - Pass it to $gcc_cv_as. - * configure: Rebuilt. - - * config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer. - (print_operand): Allow TARGET_AIX to be non-constant. - (rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore): - Define unconditionally. - (rs6000_elf_declare_function_name): New function. - * config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be - non-constant. - * config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define - to 1. - (DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define. - [IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__ - is defined. - (TARGET_AIX): Define to 1 if TARGET_64BIT. - (PROCESSOR_DEFAULT): Remove. - (TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT, - INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define. - [RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define. - (ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both - -m32 and -m64. - (MULTILIB_DEFAULTS): Define. - (SUBSUBTARGET_EXTRA_SPECS): Define. - (ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define. - (TARGET_TOC): Define only if !RS6000_BI_ARCH. - (TARGET_NO_TOC): Remove. - [!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI, - TARGET_PROTOTYPE): Define to 0. - (NO_PROFILE_COUNTERS): Define to TARGET_64BIT. - (PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT. - (ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly - if !TARGET_64BIT. - (USER_LABEL_PREFIX): Remove. - (JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT. - (SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init - if TARGET_64BIT. - (TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64. - (LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define. - (STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove. - (TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT. - (MINIMAL_TOC_SECTION_ASM_OP): Likewise. - (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on - TARGET_64BIT. - (RS6000_CALL_GLUE): Likewise. - (SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX, - RESTORE_FP_SUFFIX): Likewise. - (ASM_DECLARE_FUNCTION_NAME): Remove. - (ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE, - DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function - name if TARGET_64BIT. - (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and - !TARGET_64BIT. - (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs. - (ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account. - (DRAFT_V4_STRUCT_RET): Define. - (SIGNAL_FRAMESIZE): New enum value. - (MD_FALLBACK_FRAME_STATE_FOR): Define. - * config/rs6000/default64.h: New file. - * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64 - options. - (SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it - to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc - if !TARGET_64BIT. - [!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define. - (ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name - function. - (TARGET_OS_SYSV_CPP_BUILTINS): Define. - (TARGET_OS_CPP_BUILTINS): Use it. - (CPP_SYSV_SPEC): Remove. - (CPP_SPEC): Remove cpp_sysv. - (SUBTARGET_EXTRA_SPECS): Remove cpp_sysv. - Add SUBSUBTARGET_EXTRA_SPECS. - (SUBSUBTARGET_EXTRA_SPECS): Define. - * config/rs6000/biarch64.h: New file. - * config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name): - New prototype. - * config/rs6000/x-linux64: New file. - * config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float - multilibs. - * config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__. - * config/rs6000/eabi-cn.asm: Likewise. - * config/rs6000/tramp.asm: Likewise. - * config/rs6000/sol-ci.asm: Likewise. - * config/rs6000/sol-cn.asm: Likewise. - * config/rs6000/linux.h (TARGET_64BIT): Define to 0. - (TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS. - * config/rs6000/ppc-asm.h: Move __powerpc64__ section before - _CALL_AIXDESC section. - * config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler, - defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs - or default32. - -2003-06-04 Daniel Jacobowitz - - * config.gcc: Revert accidentally committed ARM changes. - -2003-06-04 Roger Sayle - - * builtins.c (dconstpi, dconste): New mathematical constants. - (init_builtin_dconsts): New function to initialize dconstpi - and dconste. - (fold_builtin): Optimize exp(1.0) = e. Evaluate exp(x) at - compile time with -ffast-math when x is an integer constant. - Optimize tan(0.0) = 0.0. Optimize atan(0.0) = 0.0, - atan(1.0) = pi/4 and tan(atan(x)) = x with -ffast-math. - -2003-06-04 Roger Sayle - - * calls.c (expand_call): Avoid calling pure or const functions - when the result is ignored (or void) and none of the arguments - are volatile. Move warning diagnostic earlier in function. - -2003-06-04 Andreas Jaeger - - * system.h: Do not poison TDESC_SECTION_ASM_OP, - RDATA_SECTION_ASM_OP and SUBTARGET_PROLOGUE. - -2003-06-04 Kaveh R. Ghazi - - * final.c (asm_fprintf): Update comments, accept "-+ #0" flags, - optimize '%' case, handle %c, don't accept %p, %e, %f or %g, - handle %ll, optimize regular character case. - -2003-06-04 Zdenek Dvorak - - * Makefile.in (cse.o): Add params.h dependency. - * cse.c: Include params.h. - (PATHLENGTH): Removed. - (struct cse_basic_block_data): Make path array dynamic. - (cse_end_of_basic_block): Use PARAM_MAX_CSE_PATH_LENGTH instead - of PATHLENGTH. - (cse_main, cse_basic_block): Allocate path array. - * params.def (PARAM_MAX_CSE_PATH_LENGTH): New. - -Wed Jun 4 09:49:21 CEST 2003 Jan Hubicka - - * i386.c (ix86_reorg): Replace the jump instead of adding nop. - * i386.md (UNSPEC_REP): New constant. - (return_internal_long): New pattern. - -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 Chris Demetriou - - * config/mips/t-linux64 (CRTSTUFF_T_CFLAGS_S): Define. - -2003-06-04 Andreas Jaeger - - * config/i386/uwin.h: Remove SUBTARGET_PROLOGUE. - - * config/i386/i386.c (ix86_expand_prologue): Do not use - SUBTARGET_PROLOGUE. - - * system.h: Poision SUBTARGET_PROLOGUE. - - * config/arm/arm-protos.h: Remove unused rdate_section prototype. - - * output.h: Remove TDESC_SECTION_ASM_OP and RDATA_SECTION_ASM_OP - dependend code. - - * system.h: Poison TDESC_SECTION_ASM_OP and RDATA_SECTION_ASM_OP. - - * system.h: Poison INSN_CACHE_DEPTH, INSN_CACHE_SIZE and - INSN_CACHE_LINE_WIDTH. - - * libgcc2.c (INSN_CACHE_PLANE_SIZE): Removed. - (__clear_cache): Remove code dependend on INSN_CACHE_DEPTH, - INSN_CACHE_SIZE and INSN_CACHE_LINE_WIDTH. - - * doc/tm.texi (Trampolines): Remove INSN_CACHE_DEPTH, - INSN_CACHE_SIZE and INSN_CACHE_LINE_WIDTH. - - * dbxout.c (dbxout_type): Remove usage of DBX_OUTPUT_ENUM. - (dbxout_symbol): Remove usage of DBX_OUTPUT_CONSTANT_SYMBOL. - (dbxout_block): Remove usage of DBX_OUTPUT_CATCH. - (dbxout_block): Remove usage of DBX_LBRAC_FIRST. - (dbxout_source_file): Remove usage of DBX_OUTPUT_SOURCE_FILENAME. - (dbxout_init): Remove test for DBX_WORKING_DIRECTORY. - - * doc/tm.texi (DBX Options): Do not document DBX_LBRAC_FIRST, - DBX_OUTPUT_SOURCE_FILENAME and DBX_OUTPUT_ENUM and - DBX_WORKING_DIRECTORY. - - * system.h: Poison DBX_LBRAC_FIRST, DBX_OUTPUT_ENUM, - DBX_OUTPUT_SOURCE_FILENAME and DBX_WORKING_DIRECTORY. - - * config/frv/frv-protos.h: Remove unused const_section - declaration. - * config/vax/vax-protos.h: Likewise. - - * output.h: Remove CONST_SECTION_ASM_OP usage. - - * system.h: Poison CONST_SECTION_ASM_OP. - - * crtstuff.c (__do_global_dtors_aux): Remove usage of - CRT_GET_RFIB_TEXT. - (frame_dummy): Likewise. - * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Likewise. - * system.h: Poison CRT_GET_RFIB_TEXT. - - * collect2.c (is_ctor_dtor): Remove CFRONT_LOSSAGE dependend code. - - * fix-header.c: Remove ADD_MISSING_EXTERN_C dependend variables. - (write_lbrac): Remove ADD_MISSING_EXTERN_C dependend code. - (recognized_function): Likewise. - (read_scan_file): Likewise. - -2003-06-03 Roger Sayle - - * optabs.c (expand_binop): Optimize complex multiplication for - the case of squaring a complex argument. - -2003-06-03 Roger Sayle - - * optabs.c (expand_binop): Attempt to reuse pseudos for duplicate - non-volatile operands of binary operations. - (prepare_cmp_insn): Likewise. - -2003-06-03 Roger Sayle - - * varasm.c (force_const_mem): Handle alignment of constants not - representable as a type in the front-end language. - -2003-06-03 Kazu Hirata - - * flow.c (initialize_uninitialized_subregs): Use - emit_move_insn instead of emitting a hardcoded move. - -2003-06-03 Richard Henderson - - * optabs.c (expand_abs_nojump): Split out from ... - (expand_abs): ... here. - * optabs.h (expand_abs_nojump): Declare. - * ifcvt.c: (noce_try_abs): Use expand_abs_nojump. - * Makefile.in (ifcvt.o): Depend on optabs.h. - -2003-06-03 Alan Modra - - * dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Heed flag_merge_constants. - -2003-06-03 Jason Thorpe - - * config.gcc (default_use_cxa_atexit): New variable, defaults to no. - (*-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*): Set default_use_cxa_atexit - to yes. - * configure.in: Allow default_use_cxa_atexit to determine the - value of DEFAULT_USE_CXA_ATEXIT if not explicitly enabled or - disabled. - * configure: Regenerate. - -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-05-23 J"orn Rennecke - - * configure.in (inhibit_libc): Don't define when configuring - with --with-newlib --with-headers. - * configure: Regenerate. - - * t-sh: Remove LIB2FUNCS_EXTRA and embed-bb.c rules. - -2003-06-03 Rainer Orth - - * configure.in (gcc_cv_as_hidden): Disable .hidden completely on - IRIX 6 without GNU ld. - * configure: Regenerate. - -2003-06-03 Roger Sayle - - * expr.c (emit_move_insn_1): Use emit_move_insn to move the parts - of a complex number rather than invoke mov_optab directly. - -2003-06-03 Kazu Hirata - - * combine.c (simplify_set): Don't move a subreg in SET_SRC to - SET_DEST if WORD_REGISTER_OPERATIONS is not defined. - -2003-06-03 Nathanael Nerode - - * config/i386/x86-64.h: Remove two target-independent comments; - replace "GNU CC" with "GCC". - -2003-06-03 Anthony Green - - * config/frv/t-frv (EXTRA_HEADERS): Remove media.h - -2003-06-03 Roger Sayle - - * builtins.def (BUILT_IN_CABS, BUILT_IN_CABSF, BUILT_IN_CABSL): - New builtins representing ISO C99's cabs, cabsf and cabsl. - * builtins.c (expand_builtin_fabs): New function. - (expand_builtin_cabs): New function. - (expand_builtin): Expand BUILT_IN_FABS{,F,L} and BUILT_IN_CABS{,F,L} - using expand_builtin_fabs and expand_builtin_cabs respectively. - - * doc/extend.texi: Document new cabs, cabsf and cabsl builtins. - -2003-06-03 Aldy Hernandez - - * function.c (assign_parms): Split complex arguments. - - * doc/tm.texi (SPLIT_COMPLEX_ARGS): Document. - - * expr.h (SPLIT_COMPLEX_ARGS): Define. - (split_complex_types): Protoize. - (split_complex_values): Protoize. - - * calls.c (expand_call): Split complex arguments on architectures - that require it. - (split_complex_values): New. - (split_complex_types): New. - - * config/rs6000/rs6000.c (rs6000_libcall_value): New. - (rs6000_function_value): Handle complex values on AIX. - (rs6000_complex_function_value): New. - - * config/rs6000/rs6000-protos.h (rs6000_libcall_value): Protoize. - - * config/rs6000/rs6000.h (LIBCALL_VALUE): Call function. - (SPLIT_COMPLEX_ARGS): New. - -2003-06-03 Jakub Jelinek - - * configure.in (HAVE_LD_PIE): Check for ld -pie. - * config.in: Rebuilt. - * configure: Rebuilt. - * toplev.c (flag_pie, flag_shlib): New variables. - (f_options): Add -fpie and -fPIE. - (parse_options_and_default_flags): Set flag_pic if -fpie/-fPIE. - Set flag_shlib if flag_pic and not -fpie/-fPIE. - * flags.h (flag_pic, flag_shlib): Add. - * varasm.c (default_binds_local_p): Use flag_shlib instead of - flag_pic. - * gcc.c (LINK_PIE_SPEC): Define. - (LINK_COMMAND_SPEC): Use LINK_PIE_SPEC. - (option_map): Add --pie -> -pie mapping. - * config/sol2.h (ASM_SPEC): Handle -fpie the same way as -fpic - and -fPIE the same way as -fPIC. - * config/openbsd.h (ASM_SPEC): Likewise. - * config/frv/frv.h (ASM_SPEC): Likewise. - * config/arm/linux-gas.h (SUBTARGET_CPP_SPEC): Likewise. - * config/arm/semi.h (ASM_SPEC): Likewise. - * config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. - * config/freebsd-spec.h (FBSD_CPP_SPEC): Likewise. - * config/i386/beos-elf.h (CC1_SPEC): Likewise. - * config/i386/freebsd-aout.h (ASM_SPEC): Likewise. - * config/m68k/linux.h (CPP_SPEC): Likewise. - * config/m68k/netbsd.h (ASM_SPEC): Likewise. - * config/m68k/openbsd.h (ASM_SPEC): Likewise. - * config/m68k/netbsd-elf.h (ASM_SPEC): Likewise. - * config/mips/linux.h (SUBTARGET_CPP_SPEC): Likewise. - * config/mips/openbsd.h (SUBTARGET_ASM_SPEC): Likewise. - * config/pa/pa-linux.h (CPP_SPEC): Likewise. - * config/netbsd-aout.h (ASM_SPEC): Likewise. - * config/rs6000/sysv4.h (ASM_SPEC, CPP_SYSV_SPEC): Likewise. - * config/rs6000/vxworks.h (CPP_SPEC): Likewise. - * config/sparc/linux.h (CPP_SUBTARGET_SPEC, ASM_SPEC): Likewise. - * config/sparc/linux64.h (CPP_SUBTARGET_SPEC, ASM_SPEC): Likewise. - * config/sparc/sparc.h (ASM_SPEC): Likewise. - * config/sparc/sp64-elf.h (ASM_SPEC): Likewise. - * config/sparc/sysv4.h (ASM_SPEC): Likewise. - * config/sparc/netbsd-elf.h (ASM_SPEC): Likewise. - * config/sparc/openbsd64.h (ASM_SPEC): Likewise. - * config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise. - * config/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Handle -pie. - Simplify. - * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. - * config/i386/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. - * config/ia64/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. - * config/rs6000/sysv4.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. - * config/rs6000/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. - * config/sparc/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. - * config/sparc/linux64.h (STARTFILE_SPEC, ENDFILE_SPEC): Likewise. - * doc/invoke.texi: Document -pie, -fpie and -fPIE options. - -2003-06-03 Jakub Jelinek - - * builtins.c (expand_builtin_memcpy): Remove endp argument and endp - != 0 handling. Pass 0 to store_by_pieces. - (expand_builtin_mempcpy): Add endp argument. Don't call - expand_builtin_memcpy, call store_by_pieces resp. move_by_pieces - directly. If ignoring result, only do expand_call. - (expand_builtin_stpcpy): Likewise. Call expand_builtin_mempcpy - otherwise. - (expand_builtin_strncpy, expand_builtin_memset): Adjust - store_by_pices callers. - (expand_builtin): Adjust expand_builtin_memcpy and - expand_builtin_mempcpy callers. - * expr.c (can_move_by_pieces): New function. - (move_by_pieces): Add endp argument, return to resp. memory at end - or one byte earlier depending on endp. - (store_by_pieces): Likewise. - (emit_block_move): Adjust call to move_by_pieces. - (emit_push_insn): Adjust move_by_pieces caller. - * expr.h (can_move_by_pieces): New prototype. - (store_by_pieces): Adjust prototypes. - * rtl.h (move_by_pieces): Adjust prototype. - * config/mips/mips.c (expand_block_move): Adjust move_by_pieces - caller. - -2003-06-03 Ben Elliston - - * doc/md.texi (Processor pipeline description): Improve wording. - -2003-06-03 Neil Booth - - * c-opts.c (c_common_handle_option): New, pulled out of - c_common_decode_option. Substitute uses of argv. - (c_common_decode_option): Broken into two. - -2003-06-02 Roger Sayle - Zack Weinberg - - * emit-rtl.c (gen_complex_constant_part): Remove unnecessary - test of TREE_CONSTANT_POOL_ADDRESS_P. - -2003-06-02 Kaveh R. Ghazi - - * mips.c: Don't include output.h twice. - * stormy16.c: Likewise. - * xtensa.c: Likewise. - * output.h: Protect against multiple inclusion. - -2003-06-02 J"orn Rennecke - - * sh.h (OLD_ARG_MODE): New macro. - (FUNCTION_ARG_ADVANCE, FUNCTION_ARG_PASS_BY_REFERENCE): Use it. - (FUNCTION_ARG_1): Break out of: - (FUNCTION_ARG). Use OLD_ARG_MODE. - -2003-06-02 Kazuhiro Inaoka - - * gcc/config.gcc Add support multilib parts for m32rx processor. - -2003-06-02 Kaveh R. Ghazi - - * Makefile.in (c-options.c): Pass in $(AWK) to opts.sh. - (mostlyclean): Delete c-options.c and c-options.h. - -2003-06-02 Neil Booth - - * c-opts.c (CL_REJECT_NEGATIVE): New. - (c_common_decode_option): Update to use it. - * c.opt: Update documentation; use RejectNegative. - * opts.sh: Handle RejectNegative. - -2003-06-01 Zack Weinberg - - * ggc-page.c (init_ggc): Give better diagnostics on failure to - open /dev/zero. - * toplev.c (crash_signal): Reset handling for received signal - to SIG_DFL. - -2003-06-02 Ben Elliston - - * config/arm/arm.c (arm_use_dfa_pipeline_interface): Declare. - (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE): Define if not already. - (arm_use_dfa_pipeline_interface): Implement. - * config/arm/arm.md (arm): New automaton. - (write_buf): Remove function units; new cpu unit. - (write_blockage): Remove function units; new cpu unit. - (core): Remove function units; new cpu unit. - (r_mem_f_wbuf): New instruction reservation. - (store1_wbuf, store2_wbuf, store3_wbuf, store4_wbuf): Likewise. - (store1_ldsched, store2, store3, store4): Likewise. - (load_ldsched, load_ldsched_xscale, load_or_store): Likewise. - (mult, mult_ldsched, mult_ldsched_strongarm): Likewise. - (multi_cycle, single_cycle): Likewise. - * config/arm/fpa.md (armfp): New automaton. - (fpa): Remove function units; new cpu unit. - (fpa_mem): Remove function unit; new cpu unit. - (fdivx, fdivd, fdivs, fmul, ffmul, farith, ffarith): New reservations. - (r_2_f, f_2_r, f_load, f_store, r_mem_f, f_mem_r): Likewise. - -2003-06-01 Kaveh R. Ghazi - - * builtin-attrs.def (ATTR_ASM_FPRINTF): New. - * c-format.c (enum format_type): Add asm_fprintf_format_type. - (NOARGUMENTS, asm_fprintf_length_specs, asm_fprintf_flag_specs, - asm_fprintf_flag_pairs, asm_fprintf_char_table): New. - (format_types_orig): Renamed from format_types. Add new data. - (format_types): Declare as pointer. - (handle_format_attribute): Move later in file so we have all - necessary declarations. Add section to capture HOST_WIDE_INT. - * output.h (ATTRIBUTE_ASM_FPRINTF, __gcc_host_wide_int__): New. - (asm_fprintf): Mark with ATTRIBUTE_ASM_FPRINTF. - -2003-06-01 Andreas Jaeger - - * doc/tm.texi (Storage Layout): Remove ROUND_TYPE_SIZE and - ROUND_TYPE_SIZE_UNIT. - - * stor-layout.c (finalize_record_size): Remove usages of - ROUND_TYPE_SIZE and ROUND_TYPE_SIZE_UNIT. - (finalize_type_size): Likewise. - (layout_type): Likewise. - - * system.h: Poison ROUND_TYPE_SIZE and ROUND_TYPE_SIZE_UNIT. - - * loop.c (check_insn_for_givs): Remove DONT_REDUCE_ADDR macro. - - * config/d30v/d30v.h: Remove text copied from the manual. - -2003-06-01 Roger Sayle - John David Anglin - Geoffrey Keating - - * emit-rtl.c (gen_lowpart_common): Handle interpreting integer - constants as condition code values. - -2003-06-01 DJ Delorie - - * cppmacro.c (warn_of_redefinition): Handle cases where the two - definitions have different numbers of tokens. - -2003-06-01 Andreas Jaeger - - * gen-protos.c (main): Readd unused attribute for argc. - -2003-06-01 Neil Booth - - * Makefile.in (c-options.c, c-options.h): Parallel make safe. - * c.opt: End in blank line. - * opts.sh: Take AWK from environment if available; use C locale. - -2003-06-01 Andreas Schwab - - * config/m68k/linux.h: Remove code protected by USE_GNULIBC_1. - -2003-06-01 Andreas Jaeger - - * gen-protos.c (main): Revert patch to check for argument. - -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 Andreas Jaeger - - * toplev.c: Use ISO C90 prototypes. - - * toplev.h: Use ISO C90 prototypes. - - * genrecog.c: Use ISO C90 prototypes. - (nodes_identical): Correct declaration to match prototype. - (maybe_both_true): Likewise. - (merge_trees): Likewise. - - * genpeep.c (gen_peephole): Remove #if 0 code. - Use ISO C90 prototypes. - - * genattrtab.c (copy_rtx_unchanging): Remove #if 0'ed code. - Remove #if 0'ed function simplify_by_alternatives. - (optimize_attrs): Remove #if 0'ed code. - Remove ^L. - Use ISO C90 prototypes. - (make_canonical): Remove #if 0'ed code. - (convert_const_symbol_ref): Remove #if 0'ed function. - - * gen-protos.c (main): Check for argument. - - * rtl.h: Use ISO C90 prototypes for functions from lists.c. - - * params.h: Use ISO C90 prototypes. - * params.c: Likewise. - * intl.c: Likewise. - * intl.h: Likewise. - * lists.c: Likewise. - * errors.c: Likewise. - * errors.h: Likewise. - * gencodes.c: Likewise. - * genpreds.c: Likewise. - * genattr.c: Likewise. - * gen-protos.c: Likewise. - * genflags.c: Likewise - * genconditions.c: Likewise. - * genautomata.c: Likewise. - * gencheck.c: Likewise. - * genconfig.c: Likewise. - * genconstants.c: Likewise. - * genemit.c: Likewise. - * genextract.c: Likewise. - * gengenrtl.c: Likewise. - * gengtype.c: Likewise. - * gengtype.h: Likewise. - * genopinit.c: Likewise. - * genoutput.c: Likewise. - * gensupport.c: Likewise. - * gensupport.h: Likewise. - - * sdbout.h: Use ISO C90 prototypes. - - * sdbout.c (CONTIN): Removed empty macro. - (sdbout_one_type): Remove CONTIN usages. - Remove ^Ls. - (tag_of_ru_type): Remove #if 0'ed function. - (sdbout_symbol): Remove #if 0'ed code. - (sdbout_one_type): Remove a #if 1. - (sdbout_one_type): Remove #if 0'ed code. - (sdbout_init): Remove RMS_QUICK_HACK_1 code. - Remove PARAMS, use ISO C90 prototypes for all functions. - -2003-06-01 Josef Zlomek - - * rtl.def (CONST_DOUBLE): Update comment. - -2003-06-01 Neil Booth - - * opts.sh: Remove path from sort. - -2003-06-01 Aldy Hernandez - - PR/9680 - * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Require - TARGET_SPE for SPE_VECTOR_MODE. - -2003-05-31 Aldy Hernandez - - * toplev.c (botch): Remove. - (do_abort): Remove. - (set_Wunused): Comment. - (set_Wextra): Comment. - Remove ^L's. - (rest_of_compilation): Factor out common code into functions. - (rest_of_handle_inlining): New. - (rest_of_handle_ssa): New. - (rest_of_handle_cse): New. - (rest_of_handle_gcse): New. - (rest_of_handle_loop_optimize): New. - (rest_of_handle_jump_bypass): New. - (rest_of_handle_sibling_calls): New. - (rest_of_handle_null_pointer): New. - (rest_of_handle_addresof): New. - (rest_of_handle_flow): New. - (rest_of_handle_branch_prob): New. - (rest_of_handle_if_conversion): New. - (rest_of_handle_tracer): New. - (rest_of_handle_loop2): New. - (rest_of_handle_cse2): New. - (rest_of_handle_life): New. - (rest_of_handle_combine): New. - (rest_of_handle_if_after_combine): New. - (rest_of_handle_regmove): New. - (rest_of_handle_sched): New. - (rest_of_handle_old_regalloc): New. - (rest_of_handle_new_regalloc): New. - (rest_of_handle_regrename): New. - (rest_of_handle_reorder_blocks): New. - (rest_of_handle_sched2): New. - (rest_of_handle_new_regalloc): New. - (rest_of_handle_old_regalloc): New. - (rest_of_handle_regrename): New. - (rest_of_handle_reorder_blocks): New. - (rest_of_handle_stack_regs): New. - (rest_of_handle_machine_reorg): New. - (rest_of_handle_delay_slots): New. - (rest_of_handle_final): New. - - * toplev.h (botch): Remove prototype. - (do_abort): Same. - -2003-05-31 Neil Booth - - * Makefile.in (c-opts.o, c-options.h): Update dependencies. - * c-opts.c: Include c-options.h and c-options.c. - (CL_C_ONLY, CL_OBJC_ONLY, CL_CXX_ONLY, CL_OBJCXX_ONLY): - Rename CL_C, CL_OBJC, CL_CXX, CL_OBJCXX. - (CL_ARG, CL_ALL, COMMAND_LINE_OPTIONS, struct cl_option, - OPT, opt_comp): Remove. - (missing_arg, c_common_init_options, c_common_decode_option, - write_langs): Update for macro redefinitions and enumeration - name changes. - * c.opt, opts.sh: New files. - * doc/passes.texi: Update. - -2003-05-31 Andreas Jaeger - - * function.c (trampoline_address): Remove ALLOCATE_TRAMPOLINE - usage. - - * doc/tm.texi (Trampolines): Remove ALLOCATE_TRAMPOLINE. - - * config/d30v/d30v.h: Remove traces of ALLOCATE_TRAMPOLINE. - - * system.h: Poison ALLOCATE_TRAMPOLINE. - - * doc/tm.texi (Misc): Remove HANDLE_PRAGMA. - * system.h: Poison HANDLE_PRAGMA. - -2003-05-31 Kazu Hirata - - * doc/invoke.texi: Update dump file names. - -2003-05-31 Kaveh R. Ghazi - - * c-format.c (format_length_info, format_char_info, - format_flag_spec, format_flag_pair, format_kind_info): - De-const-ify structure members. - -2003-05-31 Roger Sayle - - * flags.h (flag_wrapv): New flag controlling overflow semantics. - * toplev.c (flag_wrapv): Declare the variable with default false. - (lang_independent_options): New option "-fwrapv" to set the above. - - * fold-const.c (extract_muldiv_1): Disable optimization of (2*x)/2 - as x, when signed arithmetic overflow wraps around. - (fold): Optimize "-A - B" as "-B - A" if overflow wraps around. - * loop.c (basic_induction_var): Ignore BIVs that rely on undefined - overflow when flag_wrapv is true. - - * doc/invoke.texi: Document new -fwrapv command line option. - * doc/c-tree.texi: Mention that the overflow semantics of - NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR and MULT_EXPR is dependent - upon both flag_wrapv and flag_trapv. - -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 Stan Shebs - - * system.h: Poison OBJC_PROLOGUE. - -2003-05-30 Roger Sayle - - * emit-rtl.c (gen_complex_constant_part): New function for getting - the constant real or imaginary part of a complex constant. - (gen_realpart): Use it. - (gen_imagpart): Likewise. - -2003-05-30 Kazu Hirata - - * doc/invoke.texi: Fix typos. - * doc/rtl.texi: Likewise. - -2003-05-30 Dhananjay Deshpande - - * config/h8300/crti.asm: Use .h8300hn and .h8300sn for normal - mode. - * config/h8300/crtn.asm: Likewise. - * config/h8300/lib1funcs.asm: Likewise. - * config/h8300/h8300.c (asm_file_start): Likewise. - * config/h8300/elf.h (LINK_SPEC): Use h8300hnelf and - h8300snelf emulations for normal mode. - * config/h8300/h8300.h (LINK_SPEC): Use h8300hn and h8300sn - emulations for normal mode. - -2003-05-30 Dhananjay Deshpande - - * config/h8300/h8300.c (h8300_tiny_constant_address_p): Return - true if TARGET_NORMAL_MODE. - -2003-05-30 Roger Sayle - - * cse.c (cse_insn): Simplify REG_EQUAL note on libcalls when - making a substitution. - (dead_libcall_p): If directly replacing a libcall with a - constant value produces an invalid instruction, also try forcing - the constant into the constant pool. - * expr.c (emit_move_insn): Add a REG_EQUAL note when it is not - obvious that the source is a constant. - (compress_float_constant): Use set_unique_reg_note to place - REG_EQUAL notes on instructions. - -2003-05-30 Eric Christopher - - * config/mips/mips.c (extern_list): Add GTY marker. - (extern_head): Separate out definition. Add marker. - (mips_output_external): Use ggc_alloc for extern_list - allocation. - (mips_output_external_libcall): Ditto. - -2003-05-30 Florian Weimer - - * doc/install.texi: Ada-enabled bootstrap requires GNAT 3.14 or - later. - -2003-05-30 Kaveh R. Ghazi - - * vax.h (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier - warnings. - (PRINT_OPERAND): Likewise. - -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. - -2003-05-29 Matt Kraai - - * gthr-gnat.c: Remove #undef UNUSED. - (__gnat_default_lock, __gnat_default_unlock): Prototype. - (__gnat_task_lock, __gnat_task_unlock): Make declarations - prototypes. - (__gnat_install_locks): Convert declaration to ISO C90, make - parameter declarations prototypes, and remove blank line. - * gthr-gnat.h (__gnat_install_locks): Make parameter - declarations prototypes. - -2003-05-29 Jason Merrill - - * Makefile.in (unstrap): Remove stage_last after make unstage1. - -2003-05-29 Roger Sayle - - * mips-tfile.c (PAGE_SIZE): Increase page size to 32K. - -2003-05-29 Roger Sayle - Kaveh Ghazi - - PR bootstrap/10169 - * mips-tfile.c (main): Use getopt_long instead of getopt. - Add new command line option --version to display version. - Treat --verbose like -v to report a single line version. - (options): New global variable for getopt_long. - * mips-tdump.c (main): Use getopt_long instead of getopt. - New command line options -v, --version and -verbose to display - the program version number (to match mips-tfile's behavior). - (options): New global variable for getopt_long. - - * gcov.c (options): Zero-terminate getopt_long array. - * gcov-dump.c (options): Likewise. - - * Makefile.in (mips-tdump.o): Add dependency on version.h. - -2003-05-29 Stan Shebs - - Remove OBJC_PROLOGUE everywhere. - * objc/objc-act.c (finish_objc): Remove use of OBJC_PROLOGUE. - * config/avr/avr.h: Remove no-op ref to OBJC_PROLOGUE. - * config/d30v/d30v.h: Similarly. - * config/ip2k/ip2k.h: Similarly. - * doc/tm.texi: Remove doc of OBJC_PROLOGUE. - -2003-05-29 Roger Sayle - - * c-semantics.c (genrtl_do_stmt_1): New function split out from... - (gen_rtl_do_stmt): ... here. Call genrtl_do_stmt_1. - (expand_unreachable_stmt): Expand unreachable while statements - using genrtl_do_stmt_1. - -2003-05-29 Richard Sandiford - - * config/mips/mips-protos.h (mips_output_load_label): Declare. - * config/mips/mips.c (mips_output_load_label): New function. - (mips_output_conditional_branch): Use it. - * config/mips/mips.md (jump): And here. - -2003-05-28 Bob Wilson - - * config/xtensa/xtensa-protos.h (smalloffset_double_mem_p): Delete. - (xtensa_split_operand_pair): New proto. - * config/xtensa/xtensa.c (move_operand): Handle DFmode and DImode. - (smalloffset_double_mem_p): Delete. - (gen_float_relational, printx, print_operand, xtensa_va_arg): - Fix whitespace. - (xtensa_split_operand_pair): New. - (xtensa_dbx_register_number): Fix formatting. - * config/xtensa/xtensa.h (EXTRA_CONSTRAINT): Remove 'S' constraint. - * config/xtensa/xtensa.md (movdi, movdf): Force constants to memory - instead of splitting them into single-word moves. Remove unnecessary - checks for reload_in_progress and reload_completed. - (movdi_internal, movdf_internal): Change to post-reload split patterns. - Add constraints to allow constant operands. - (movsf_internal): Allow CONST_INT operands. - -2003-05-27 Danny Smith - - * config.gcc (i[34567]86-*-mingw32*): Add host makefile - fragment i386/x-mingw32. - * config/i386/x-mingw32: New file. Make local_includedir - relative to EXEC_PREFIX. - -2003-05-27 Aaron W. LaFramboise - - * config/i386/mingw32.h (STANDARD_INCLUDE_DIR): Update. - (MD_STARTFILE_PREFIX): Define. - -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-28 Daniel Jacobowitz - - * config/mips/linux.h (LIB_SPEC): Add missing -lc and correct - -lthread to -lpthread. - -2003-05-28 Eric Botcazou - Bruce Korb - Arno Klaassen - - * fixinc/inclhack.def: Add missing declaration of getpagesize() - to unistd.h on Solaris 2.5.1. - Fix prototype of recv() and send() in sys/socket.h on - Solaris 2.5.1 and 2.6. - * fixinc/tests/base/unistd.h: Add solaris_unistd fix test. - * fixinc/tests/base/sys/socket.h: Add solaris_socket test. - * fixinc/check.tpl: Use 'diff -c', not 'diff -u'. - * fixinc/fixincl.x: Regenerate. - -2003-05-27 Jason Merrill - - * tree.c (expr_first, expr_length): New fns. - * tree.h: Declare them. - - * tree.c (iterative_hash_expr): Hash commutative expressions - consistently. - -2003-05-27 Richard Kenner - - * tree.h (contains_placeholder_p): Now returns bool. - (CONTAINS_PLACEHOLDER_P): New macro. - (type_contains_placeholder_p): New function. - * tree.c (save_expr): Remove code avoiding folding COMPONENT_REF. - (contains_placeholder_p): Now returns bool. - Rework to use CONTAINS_PLACEHOLDER_P macro. - (type_contains_placeholder_p): New function. - * fold-const.c (fold, case COMPONENT_REF): Don't fold if - type_contains_placeholder_p. - (fold_range_test, fold_mathfn_compare, fold_inf_compare, fold): - Use CONTAINS_PLACEHOLDER_P macro. - * builtins.c (fold_builtin): Likewise. - * calls.c (initialize_argument_information): Likewise. - * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. - * explow.c (expr_size): Likewise. - * expr.c (store_constructor, get_inner_reference): Likewise. - * function.c (assign_parms): Likewise. - * stor-layout.c (variable_size): Likewise. - -2003-05-25 Gabriel Dos Reis - - * diagnostic.h (output_verbatim, verbatim): Remove printf - attribute. - -2003-05-25 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Update Kean Johnston. - -2003-05-24 David Edelsohn - - * config/rs6000/rs6000.md (save_fpregs_{si,di}): Add length attribute. - -2003-05-24 Nathanael Nerode - - * config/rs6000/440.md, config/stormy16/stormy16protos.h, - config/stormy16/stormy16.c, config/stormy16/stormy16.md: - Replace "GNU CC" with "GCC". - -2003-05-24 Matt Kraai - - * builtins.c (expand_builtin_memcpy): Use mode of dest_addr for - intermediate computation. - -2003-05-23 Eric Christopher - - * config/mips/mips.md (clzsi, clzdi): New patterns. - -2003-05-23 Geoffrey Keating - - * gcc.c (default_compilers): Use -o to specify preprocessor's output - file. Make -no-integrated-cpp work when building PCH files. - * objc/lang-specs.h: Likewise. - -2003-05-23 Nathanael Nerode - - * fixinc/Makefile.in: Correct description. - * fixinc/Makefile.in, fixinc/fixfixes.c, fixinc/fixincl.c, - fixinc/fixlib.c, fixinc/fixlib.h, fixinc/fixtests.c, - fixinc/genfixes: Replace "GNU CC" with "GCC". - -2003-05-23 Roger Sayle - - * builtins.def: Define atan, atanf, atanl, tan, tanf and tanl - builtin functions (and their __builtin_* variants). - * builtins.c (mathfn_built_in): Handle tan{,f,l} and atan{,f,l}. - (expand_builtin): Don't expand tan{,f,l} or atan{,f,l} when not - optimizing. - - * doc/extend.texi: Document new tan and atan builtins, and - their float and long double variants. - -2003-05-23 Jason Thorpe - - * config/sparc/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define - __sparcv9 in the TARGET_ARCH64 case. - -Fri May 23 22:17:32 CEST 2003 Jan Hubicka - - * i386.c (ix86_reorg): Calls are also jumps. - -2003-05-23 J"orn Rennecke - - * cse.c (count_reg_usage): When processing an INSNs REG_EQUAL - note containing an EXPR_LIST, process all the arguments. - -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. - -2003-05-23 Mike Stump - - * tlink.c (scan_linker_output): Add support for darwin linker, as it - emits unresolved symbols one per line, consuming the entire line. - -2003-05-23 Larin Hennessy - Zack Weinberg - - * explow.c (allocate_dynamic_stack_space): Remove call to gen_probe. - * config/m68k/m68k.c (m68k_output_function_prologue): - Remove code under #if NEED_PROBE. - * config/m68k/m68k.h: Don't define NEED_PROBE. - * config/m68k/m68k.md: Remove "probe" insn. - * doc/md.texi: Remove documentation of "probe" pattern. - -2003-05-23 Dorit Naishlos - - * config/rs6000/rs6000.md (save_fpregs_{si,di}): Add branch attribute. - -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 Roger Sayle - - * real.c (real_maxval): New function to return the largest finite - value representable in a given mode (i.e. FLT_MAX and DBL_MAX). - * real.h (real_maxval): Prototype here. - * fold-const.c (fold_inf_compare): Transform comparisons against - +-Infinity into comparisons against DBL_MAX (or equivalent). - -2003-05-22 Mike Stump - - * config.gcc (*-*-darwin*): Remove use_collect2=no, as it is the - default. - -2003-05-22 DJ Delorie - - * calls.c (expand_call): If the arg block is going to grow - downward, we need argblock to point to the top of the block, - not the bottom. - -2003-05-22 Richard Kenner - - * c-decl.c (duplicate_decls): Test DECL for ERROR_MARK. - - * expr.c (expand_expr, case CONSTRUCTOR): Put into memory if - constant and EXPAND_CONST_ADDRESS, not just EXPAND_INITIALIZER. - -2003-05-22 Kaveh R. Ghazi - - * m68hc11.c: Don't use the `0' flag for asm_fprintf specifiers. - * m68k.c: Likewise. - * m68k.h: Likewise. - -2003-05-22 Zack Weinberg - - PR other/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-05-22 Rekha Bhintade - - * gcc/config/sh/sh.h (TARGET_SWITCHES): Display all the target - switches when --target-help option is specified. - -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-05-21 Loren James Rittle - - * config/sparc/freebsd.h (CPP_CPU64_DEFAULT_SPEC): Add -D__sparcv9 - to match system compiler convention. - -2003-05-21 Danny Smith - - * gthr-win32.h (__GTHREAD_HIDE_WIN32API): Test for nonzero - value, not just if defined. - Update copyright year. - -2003-05-21 John David Anglin - - PR target/6428 - * pa-hpux10.h (LINK_SPEC, LIB_SPEC): Move -L options for profiling - directories from LIB_SPEC to LINK_SPEC. Emit warning if `-p' or `-pg' - option is used without `-static'. - * pa-hpux11.h (LINK_SPEC, LIB_SPEC): Likewise. - * pa64-hpux.h (LINK_SPEC, LIB_SPEC): Likewise. - -2003-05-21 Bob Wilson - - * config/xtensa/xtensa.h (MASK_SERIALIZE_VOLATILE, - TARGET_SERIALIZE_VOLATILE): Delete. - (MASK_CONST16, MASK_ABS, MASK_ADDX): Renumber flag bits. - (TARGET_DEFAULT): Remove MASK_SERIALIZE_VOLATILE. - (TARGET_SWITCHES): Remove "-mserialize-volatile" and - "-mno-serialize-volatile". - * config/xtensa/xtensa.c (print_operand): Remove checks of - TARGET_SERIALIZE_VOLATILE. - * config/xtensa/xtensa.md (*lsiu, *ssiu): Likewise. - * doc/invoke.texi (Option Summary, Xtensa Options): Remove - "-mserialize-volatile" and "-mno-serialize-volatile" options. - -2003-05-21 Nathan Sidwell - - * c-parse.in (fndef): Set DECL_SOURCE_LINE and FILE earlier. - (nested_function): Likewise. - (notype_nested_function): Likewise. - -2003-05-21 Nick Clifton - - * config/stormy16/stormy-abi: Update overflow type for - R_XSTORMY16_16 reloc. - -2003-05-21 Nathan Sidwell - - * c-common.h (enum rid): Remove RID_BOUNDED, RID_UNBOUNDED. - * c-parse.in (reswords): Remove __bounded__ and __unbounded__. - (rid_to_yy): Remove RID_BOUNDED, RID_UNBOUNDED slots. - * print-tree.c (print_node): Remove ambient-boundedness. - * tree.h (tree_common): Remove bounded_flag. - (BOUNDED_INDIRECT_YPE_P, BOUNDED_POINTER_TYPE_P, - BOUNDED_REFERENCE_TYPE_P, MAYBE_BOUNDED_INDIRECT_TYPE_P, - MAYBE_BOUNDED_POINTER_TYPE_P, MAYBE_BOUNDED_REFERENCE_TYPE_P, - TREE_BOUNDED, TYPE_MAIN_VARIANTS_PHYSICALLY_EQUAL_P, - TYPE_MAIN_PHYSICAL_VARIANT, TYPE_BOUNDED, TYPE_QUAL_BOUNDED): - Remove. - (TYPE_QUALS): Remove BOUNDED. - (TREE_EXPR_QUALS, TREE_FUNC_QUALS): Remove. - (TYPE_BOUNDED_VALUE, TYPE_BOUNDED_BASE, TYPE_BOUNDED_EXTENT, - TYPE_BOUNDED_SUBTYPE, TYPE_UNBOUNDED_VARIANT, TYPE_POINTER_DEPTH, - TYPE_AMBIENT_BOUNDEDNESS, MAX_POINTER_DEPT, - VA_LIST_POINTER_DEPTH): Remove. - (struct tree_type): Remove pointer_depth. - -2003-05-20 Kaveh R. Ghazi - - * c-pretty-print.c (pp_c_integer_literal): Use - HOST_WIDE_INT_PRINT_DOUBLE_HEX. - -2003-05-20 Roger Sayle - Kazu Hirata - Joern Rennecke - - * gcse.c (cprop_jump): Make use of REG_EQUAL notes on both - setcc and jump, if they exist. If substituted instruction - fails to validate, store current effort in a REG_EQUAL note. - (cprop_insn): Don't attempt further substitutions if the - current instruction has been deleted. - (local_cprop_pass): Likewise. - - * jump.c (redirect_jump): Also update REG_EQUAL note, if - one is attached to the jump instruction. - (invert_jump): Delete REG_EQUAL note on jump, if one exists. - -2003-05-21 Danny Smith - - PR c++/9738 - * config/i386/winnt.c (i386_pe_encode_section_info): Enable - even if not first. - -2003-05-20 Kaveh R. Ghazi - - * genautomata.c (output_description, output_automaton_units, - output_state_arcs): Add missing specifiers. - -2003-05-20 Bob Wilson - - * config/xtensa/lib1funcs.asm: Avoid use of .Lfe* in .size directives. - (do_abs, do_addx2, do_addx4, do_addx8): New assembler macros. - (__mulsi3): Use do_addx* instead of ADDX* instructions. Formatting. - (nsau): Rename to do_nsau. Provide alternate version for use when - the NSAU instruction is available. - (__udivsi3, __divsi3, __umodsi3, __modsi3): Use do_nsau macro. - (__divsi3, __modsi3): Use do_abs macro instead of ABS instruction. - * config/xtensa/xtensa-config.h: Update comments to match binutils. - (XCHAL_HAVE_ABS, XCHAL_HAVE_ADDX): Define. - * config/xtensa/xtensa.h (MASK_ABS, MASK_ADDX): Define. - (TARGET_ABS, TARGET_ADDX): Define. - (TARGET_DEFAULT): Conditionally add MASK_ABS and MASK_ADDX. - (TARGET_SWITCHES): Add "abs", "no-abs", "addx", and "no-addx". - * config/xtensa/xtensa.md (*addx2, *addx4, *addx8, *subx2, *subx4, - *subx8): Set predicate condition to TARGET_ADDX. - (abssi2): Set predicate condition to TARGET_ABS. - * doc/invoke.texi (Option Summary): Document new "-mabs", "-mno-abs", - "-maddx", and "-mno-addx" options. - (Xtensa Options): Likewise. Also tag some opcode names with @code. - -2003-05-20 Kevin Ryde - Wolfgang Bangerth - - PR/10355 - * doc/extend.texi: Put a warning into the documentation - of attribute regparm. - -2003-05-20 Jason Merrill - - * tree.c (expr_last): New fn. - * tree.h: Declare it. - * objc/objc-act (expr_last): Rename to objc_expr_last. - -2003-05-20 J"orn Rennecke - - * sh.c (sh_register_move_cost): Add clase for moving between - FP registers and MAC registers. - -2003-05-19 John David Anglin - - * pa/milli64.S ($$mulI): Fix typo. - -2003-05-19 Matt Kraai - - * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p) - (nonlocal_set_p): Remove initial blank line. - * dwarf2out.c (simple_type_size_in_bits): Likewise. - * et-forest.c (et_forest_create): Likewise. - * explow.c (stabilize): Likewise. - * fix-header.c (write_lbrac): Likewise. - * graph.c (start_fct, node_data): Likewise. - * jump.c (only_sets_cc0_p, sets_cc0_p): Likewise. - * rtlanal.c (global_reg_mentioned_p): Likewise. - * tree.c (bit_position): Likewise. - -2003-05-19 Alexandre Oliva - - * config/mips/linux64.h (LIB_SPEC): Add missing -lc and correct - -lthread to -lpthread. - -2003-05-19 Neil Booth - - * c-opts.c (c_common_decode_option): Don't accept dollars - as identifier characters in assembly. - * doc/cpp.texi: Document this. - -2003-05-19 Seth Arnold - Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_stack_info): Do not add - vrsave_size twice. - -2003-05-19 Aldy Hernandez - - * doc/tm.texi (function_arg): Fix typo. - -2003-05-19 Matt Austern - - * c-opts.c (COMMAND_LINE_OPTIONS): Add -Winvalid-offsetof option. - * c-common.h (warn_invalid_offsetof): Declare. - * c-common.c (warn_invalid_offsetof): Define. - * doc/invoke.texi: Document -Winvalid-offsetof. - * testsuite/g++.dg/other/offsetof3.C: New. - * testsuite/g++.dg/other/offsetof4.C: New. - -2003-05-19 Kevin B. Hendricks - David Edelsohn - - * config/rs6000/rs6000.c (rs6000_alignment_string, - rs6000_alignment_flags): New variables. - (rs6000_parse_alignment_option): New function. - (rs6000_override_options): Call it. - * config/rs6000/rs6000.h (TARGET_OPTIONS): Add -malign-XXX option. - (MASK_ALIGN_POWER, MASK_ALIGN_NATURAL, TARGET_ALIGN_NATURAL): New - macros. - * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Always use COMPUTED - natural alignment if TARGET_NATURAL_ALIGNMENT - (ROUND_TYPE_ALIGN): Always use default record alignment if - TAGET_NATURAL_ALIGNMENT. - * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Same - (ROUND_TYPE_ALIGN): Same. - * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Same - (ROUND_TYPE_ALIGN): Same. - * doc/invoke.texi (Option Summary, PowerPC Options): Document - new options. - -2003-05-19 J"orn Rennecke - - * c-decl.c (finish_decl): When setting the DECL_ASSEMBLER_NAME - of a function using ASMSPEC, prepend a star. - -2003-05-19 Jason Merrill - - * tree-inline.c (copy_body_r): Avoid generating &* during inline - substitution. - -2003-05-19 Andrew Macleod - - * config/stormy16/stormy16.c (xstormy16_expand_prologue): Do - not mark assignments to the hard frame pointer as being stack - frame related. - (xstormy16_expand_epilogue): Mark adjustments to the stack - pointer as being stack frame related. - -2003-05-19 Richard Sandiford - - * config/mips/mips.h (ISA_HAS_LOAD_DELAY, ISA_HAS_XFER_DELAY, - ISA_HAS_FCMP_DELAY, ISA_HAS_HILO_INTERLOCKS): New macros. - (PREDICATE_CODES): Add hilo_operand. - * config/mips/mips.c (hilo_operand): New predicate. - (mips_adjust_insn_length): Account for the number nops that might - be needed to avoid hardware hazards. - * config/mips/mips.md (dslot): Remove attribute. - (hazard): New attribute. - (can_delay): Use it. Check for calls, branches & jumps. - (muldi3): Use the standard dmult pattern for mips16 code. - (muldi3_internal, muldi3_internal2): Adjust conditions accordingly. - -2003-05-19 Richard Sandiford - - * config/mips/mips-protos.h (final_prescan_insn, - mips_count_memory_refs, mips_fill_delay_slot): Remove. - * config/mips/mips.h (delay_type, dslots_load_total, - dslots_load_filled, dslots_jump_total, dslots_jump_filled, - dslots_number_nops, num_refs, mips_load_reg, mips_load_reg2, - mips_load_reg3, mips_load_reg4): Remove. - (MASK_STATS): Remove. - (MASK_EXPLICIT_RELOCS): Reuse its value. - (TARGET_STATS): Remove. - (TARGET_SWITCHES): Turn -mstats and -mno-stats into no-ops. - Warn that -mstats is now ignored. - (FINAL_PRESCAN_INSN): Undefine. - (DBR_OUTPUT_SEQEND): Remove handling of dslot statistics. - (ASM_OUTPUT_REG_POP): Likewise. - * config/mips/mips.c (dslots_load_total, dslots_load_filled, - dslots_jump_total, dslots_jump_filled, dslots_number_nops, num_refs, - mips_load_reg, mips_load_reg2, mips_load_reg3, mips_load_reg4, - mips_fill_delay_slot, mips_count_memory_refs, - final_prescan_insn): Remove. - (output_block_move): Remove calls to mips_count_memory_refs. - (print_operand): Remove printing of #nop for TARGET_STATS. - (mips_output_function_epilogue): Remove TARGET_STATS code. - Reorganize setting of fnnmae. - * config/mips/mips.md: Remove handling of dslot statistics - throughout file. Change all fcmp patterns into normal asm - templates, removing calls to mips_fill_delay_slot. - * doc/invoke.texi: Remove documentation of -mstats. - -2003-05-19 Richard Sandiford - - * config/mips/mips.c (mips_class_max_nregs): Return the number of - words in the mode. - -2003-05-19 Richard Sandiford - - * config/mips/mips.c (override_options): Disable explicit - relocs for old ABIs unless using gas. - -2003-05-18 Eric Christopher - - * config/mips/mips.h: Remove definition of g_switch_value. - -2003-05-18 Matt Kraai - - * flags.h (g_switch_value): Change to an unsigned - HOST_WIDE_INT. - * toplev.c (g_switch_value): Likewise. - - * config/alpha/alpha.c (small_symbolic_operand): Remove - g_switch_value cast. - (alpha_in_small_data_p): Cast size to an unsigned - HOST_WIDE_INT. - - * config/frv/frv.c (frv_in_small_data_p): Cast size to an - unsigned HOST_WIDE_INT. - * config/frv/frv.h (g_switch_value, g_switch_set): Remove. - (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Declare g_switch_set. - - * config/m32r/m32r.c (m32r_in_small_data_p): Cast size to an - unsigned HOST_WIDE_INT. - (m32r_asm_file_start): Use HOST_WIDE_INT_PRINT_UNSIGNED. - * config/m32r/m32r.h (g_switch_value, g_switch_set): Remove. - (ASM_OUTPUT_ALIGNED_COMMON): Declare g_switch_value. - - * config/rs6000/rs6000.c (rs6000_file_start): Use - HOST_WIDE_INT_PRINT_UNSIGNED. - (small_data_operand): Cast summand to unsigned HOST_WIDE_INT. - (rs6000_elf_in_small_data_p): Cast size to unsigned - HOST_WIDE_INT. - * config/rs6000/sysv4.h (g_switch_value, g_switch_set): - Remove. - (SUBTARGET_OVERRIDE_OPTIONS): Declare g_switch_value and - g_switch_set. - (ASM_OUTPUT_ALIGNED_LOCAL): Declare g_switch_value and remove - g_switch_value cast. - -2003-05-18 Roger Sayle - Zack Weinberg - - PR middle-end/10472 - * builtins.c (expand_builtin_memcpy): Call force_operand on - expressions and use simplify_gen_binary to create the addition. - -2003-05-18 Andreas Schwab - - * config/m68k/m68k.md: Use define_constants for unspec numbers. - -2003-05-18 Neil Booth - - * config/sparc/sparc.h: Define sparc for now. - -2003-05-18 Nathanael Nerode - - * config.gcc: Clear xm_file, md_file at the beginning of each pass. - - * config/stormy16/stormy16.h: Remove about 3000 lines of - target-independent comments. Update copyright notice. - - * doc/collect2.texi: GNU CC -> GCC. - * doc/headerdirs.texi: GNU CC -> GCC. - -2003-05-18 Gabriel Dos Reis - - * hashtable.h (struct ht_identifier): Add data member "hash_value". - * hashtable.c (ht_lookup): Use it when searching, remember. - (ht_expand): Do not recompute. - * tree.h (IDENTIFIER_HASH_VALUE): New macro. - -2003-05-18 Nathan Sidwell - - * gcov-io.c (gcov_read_bytes): Fix fread thinko. - -2003-05-18 Neil Booth - - * c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, TARGET_OBJFMT_CPP_BUILTINS): - Default here. - (c_cpp_builtins): Invoke TARGET_OBJFMT_CPP_BUILTINS(). - * defaults.h: Don't default TARGET_OS_CPP_BUILTINS here. - * config/elfos.h (TARGET_OBJFMT_CPP_BUILTINS): Define __ELF__. - * config/freebsd-spec.h, config/netbsd-elf.h, config/alpha/gnu.h, - config/arm/linux-elf.h, config/arm/rtems-elf.h, - config/arm/unknown-elf.h, config/cris/cris.h, config/cris/linux.h, - config/h8300/elf.h, config/i370/linux.h, config/i386/beos-elf.h, - config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h, - config/i386/moss.h, config/i386/rtemself.h, config/ia64/ia64.h, - config/m68k/rtemself.h, config/mcore/mcore-elf.h, config/mips/linux.h, - config/pa/pa-linux.h, config/rs6000/linux.h, config/rs6000/linux64.h, - config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h, - config/sh/coff.h, config/sh/elf.h, config/sh/rtemself.h, - config/sh/sh.h, config/sparc/linux.h, config/sparc/linux64.h, - config/sparc/openbsd64.h, config/sparc/sp64-elf.h, - config/sparc/sp86x-elf.h, config/xtensa/elf.h, config/xtensa/linux.h: - Don't define __ELF__. - * config/alpha.h, config/m68k/linux.h (TARGET_OBJFMT_CPP_BUILTINS): - Define __ELF__. - * doc/cpp.texi: Document __ELF__. - * doc/tm.texi: Document TARGET_OBJFMT_CPP_BUILTINS. * - -2003-05-17 Kaveh R. Ghazi - - * builtins.c (validate_arglist): Eliminate libiberty VA_ macros, - always use stdarg. - * c-errors.c (pedwarn_c99): Likewise. - * c-format.c (status_warning): Likewise. - * c-semantics.c (build_stmt): Likewise. - * calls.c (emit_library_call, emit_library_call_value): Likewise. - * collect2.c (notice, fatal_perror, fatal, error): Likewise. - * cpperror.c (cpp_error, cpp_error_with_line): Likewise. - * diagnostic.c (build_message_string, output_printf, - output_verbatim, verbatim, inform, warning, pedwarn, error, sorry, - fatal_error, internal_error, warning_with_decl, pedwarn_with_decl, - error_with_decl, fnotice): Likewise. - * dwarf2asm.c (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_nstring, - dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128, - dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128, - dw2_asm_output_encoded_addr_rtx): Likewise. - * emit-rtl.c (gen_rtx, gen_rtvec): Likewise. - * errors.c (warning, error, fatal, internal_error): Likewise. - * final.c (output_operand_lossage, asm_fprintf): Likewise. - * fix-header.c (fatal): Likewise. - * gcc.c (fatal, error, notice): Likewise. - * gcov.c (fnotice): Likewise. - * genattrtab.c (attr_rtx, attr_printf): Likewise. - * gengtype.c (error_at_line, xasprintf, oprintf): Likewise. - * gensupport.c (message_with_line): Likewise. - * mips-tfile.c (fatal, error): Likewise. - * protoize.c (notice): Likewise. - * ra-debug.c (ra_debug_msg): Likewise. - * read-rtl.c (fatal_with_file_and_line): Likewise. - * rtl-error.c (error_for_asm, warning_for_asm): Likewise. - * tree.c (build, build_nt, build_function_type_list): Likewise. - -2003-05-17 Neil Booth - - * defaults.h (TARGET_CPU_CPP_BUILTINS, CPP_PREDEFINES): Remove. - * gcc.c (cpp_predefines): Remove. - (cpp_unique_options, do_spec_1): Remove handling of CPP_PREDEFINES. - (static_specs): Remove predefines. - * system.h: Poison CPP_PREDEFINES. - * config/freebsd.h, config/openbsd.h, config/ptx4.h, config/svr3.h, - config/svr4.h, doc/tm.texi: Remove references to CPP_PREDEFINES. - -2003-05-17 Neil Booth - - * config/m68k/hp320.h, config/m68k/linux.h, config/m68k/m68k-none.h, - config/m68k/m68k.h, config/m68k/m68kemb.h, config/m68k/m68kv4.h, - config/m68k/openbsd.h, config/m68k/rtemself.h: Remove CPP_PREDEFINES, - use TARGET_OS_CPP_BUILTINS and TARGET_CPU_CPP_BUILTINS instead. - -2003-05-17 Neil Booth - - PR c/9209 - * c-common.c, c-common.h (dollars_in_ident): Remove. - * c-opts.c (DOLLARS_IN_IDENTIFIERS): Default to true. - (c_common_init_options, c_common_decode_option): Set dollars_in_ident. - * cpphash.h (warned_dollar): Rename warn_dollars. - * cppinit.c (struct lang_flags, lang_defaults, cpp_set_lang) - Permit dollars regardless of -std=. - (post_options): Set warn_dollars. - * cpplex.c (forms_identifier_p): Use warn_dollars. - * config/darwin.h, config/alpha/vms.h, config/m68hc11/m68hc11.h: - Remove redundant definitions of DOLLARS_IN_IDENTIFIERS. - * doc/cpp.texi, doc/cppopts.texi, doc/invoke.texi, doc/tm.texi: - Update documentation. - -2003-05-17 Andreas Schwab - - * config/m68k/m68k.c (m68k_output_function_prologue): Use - HOST_WIDE_INT_PRINT_DEC for fprintf and %wd for asm_fprintf when - formatting a HOST_WIDE_INT. - (m68k_output_function_epilogue): Likewise. - -2003-05-17 Zack Weinberg - - * doc/install.texi: Remove information about desupported targets. - -2003-05-17 Andreas Schwab - - * config/m68k/coff.h: Remove support for Sun FPA and Sun SKY board. - * config/m68k/linux.h: Likewise. - * config/m68k/m68k-none.h: Likewise. - * config/m68k/netbsd-elf.h: Likewise. - * config/m68k/sgs.h: Likewise. - * config/m68k/m68k.h: Likewise. - * config/m68k/m68k.md: Likewise. - * config/m68k/m68k.c: Likewise. - * doc/md.texi (Machine Constraints): Remove Sun FPA specific - constraints. - * doc/invoke.texi (Option Summary): Remove -mfpa. - (M680x0 Options): Likewise. - -2003-05-17 David Edelsohn - - * rs6000.c (rs6000_function_value): Simplify REAL_TYPE logic. - -2003-05-17 Neil Booth - - * config/sol2.h: Add TARGET_SUB_OS_CPP_BUILTINS. - * config/sparc/liteelf.h, config/sparc/openbsd64.h, - config/sparc/rtemself.h, config/sparc/sol2-64.h, - config/sparc/sp64-elf.h, config/sparc/sp86x-elf.h: - Update for use of TARGET_SUB_OS_CPP_BUILTINS. - -2003-05-17 Neil Booth - - * i960/i960.h, i960/rtems.h: Use TARGET_OS_CPP_BUILTINS and - TARGET_CPU_CPP_BUILTINS in preference to CPP_PREDEFINES. - -2003-05-17 Neil Booth - - * config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h. - * sparc/aout.h, sparc/elf.h, sparc/freebsd.h, sparc/linux.h, - sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, sparc/liteelf.h, - sparc/netbsd-elf.h, sparc/openbsd.h, sparc/openbsd64.h, - sparc/pbd.h, sparc/rtemself.h, sparc/sol2-64.h, sparc/sol2-bi.h, - sparc/sol2.h, sparc/sp64-elf.h, sparc/sp86-elf.h, sparc/sparc.h, - sparc/sysv4.h, - * sparc/sysv4-only.h: New. - -2003-05-17 Alan Modra - - * function.c (assign_parms): Check for zero size args. - -2003-05-16 Kaveh R. Ghazi - - * cfgloopanal.c (test_for_iteration): Use string concatentation on - HOST_WIDE_INT_PRINT_* format specifier to collapse multiple - function calls into one. - * dbxout.c (dbxout_symbol): Likewise. - * defaults.h (ASM_OUTPUT_SIZE_DIRECTIVE): Likewise. - * dwarf2asm.c (dw2_asm_output_data_uleb128, - dw2_asm_output_data_sleb128): Likewise. - * genrecog.c (debug_decision_2): Likewise. - * loop.c (emit_prefetch_instructions): Likewise. - * print-rtl.c (print_rtx): Likewise. - * print-tree.c (print_node_brief, print_node): Likewise. - * ra-debug.c (dump_igraph, dump_graph_cost, - dump_static_insn_cost): Likewise. - * ra-rewrite.c (dump_cost): Likewise. - * sdbout.c (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise. - * sreal.c (dump_sreal): Likewise. - * unroll.c (unroll_loop, precondition_loop_p): Likewise. - * varasm.c (assemble_vtable_entry): Likewise. - - * avr.c (avr_output_function_prologue, - avr_output_function_epilogue, print_operand): Fix format specifier - warnings. - (init_cumulative_args): Mark parameter with ATTRIBUTE_UNUSED. - * avr.h (FUNCTION_VALUE_REGNO_P): Fix signed/unsigned warnings. - -2003-05-16 Geoffrey Keating - - * config/rs6000/rs6000.c (expand_block_move): Unify the TARGET_STRING - and ! TARGET_STRING cases. - - * doc/cppopts.texi (-undef): Fix texinfo warning. - - * doc/cppopts.texi (-H): Document that -H works for PCH files too. - * cppfiles.c (validate_pch): When -H is used, print some information - about PCH files found. - -2003-05-16 Richard Kenner - - * config/mips/t-elf: Remove obsolete rules adding dependencies on tm.h. - * config/mips/t-isa3264, config/mips/t-r3900: Likewise. - * config/mips/t-sr71k: Likewise. - -2003-05-16 Kaveh R. Ghazi - - * arc.c (arc_output_function_prologue, - arc_output_function_epilogue): Fix format specifier warnings. - * arc.h (LARGE_INT): Fix signed/unsigned warnings. - - * v850.c (print_operand): Fix format specifier warnings. - - * ns32k.c (ADJSP, ns32k_output_function_prologue): Fix format - specifier warnings. - - * mcore.c (mcore_print_operand_address, mcore_print_operand): Fix - format specifier warnings. - - * ip2k.c (function_prologue, function_epilogue, print_operand): - Fix format specifier warnings. - * ip2k.md: Likewise. - - * i960.c (i960_output_function_prologue, i960_print_operand, - i960_print_operand_addr): Fix format specifier warnings. - - * i370.c (ascebc, ebcasc): Wrap in macros controlling usage. - (i370_output_function_prologue): Fix format specifier warnings. - * i370.h (PRINT_OPERAND): Likewise. - - * fr30.c (fr30_print_operand): Fix format specifier warnings. - - * dsp16xx.c (print_operand_address): Fix format specifier warning. - * dsp16xx.h (INCLUDE_DEFAULTS): Add missing initializers. - - * c4x.c (c4x_print_operand, c4x_print_operand_address): Fix format - specifier warnings. - - * alpha.c (print_operand_address, alpha_start_function, - unicosmk_output_ssib): Use string concatentation on - HOST_WIDE_INT_PRINT_* format specifier to collapse multiple - function calls into one. - * arm.c (arm_print_operand): Likewise. - * cris.c (cris_asm_output_mi_thunk): Likewise. - * frv.c (frv_asm_output_mi_thunk): Likewise. - * ia64.c (ia64_print_operand, process_set): Likewise. - * m68k.c (m68k_output_function_epilogue, m68k_output_mi_thunk): - Likewise. - * mips/iris5gas.h (PUT_SDB_SIZE): Likewise. - * mips.h (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise. - * pa.c (output_div_insn, pa_asm_output_mi_thunk): Likewise. - * pa.h (PRINT_OPERAND_ADDRESS): Likewise. - * rs6000.c (rs6000_va_start, print_operand_address): Likewise. - * s390.c (s390_assemble_integer): Likewise. - * sparc.c (sparc_flat_function_prologue, - sparc_flat_function_epilogue): Likewise. - * stormy16.c (xstormy16_print_operand_address, xstormy16_print_operand): Likewise. - * vax.c (vax_output_mi_thunk): Likewise. - - * frv.c (frv_print_operand_memory_reference): Fix format specifier - warning. - (frv_rtx_costs): Mark parameter with ATTRIBUTE_UNUSED. - - * m68k.c (m68k_output_function_epilogue): Fix format specifier - warnings. - - * stormy16-protos.h (xs_hi_general_operand, - xs_hi_nonmemory_operand): Prototype. - * stormy16.c (xstormy16_output_shift): Fix format specifier - warnings. - - * cris.c: Fix format specifier warnings. - -2003-05-16 Nick Clifton - - * config/arm/lib1funcs.asm: Fix typo: LSM instead of LSYM. - -2003-05-16 Wolfgang Bangerth - - * doc/bugreport.texi: Remove most of the of the preface of the - bugs section. - -2003-05-16 Jakub Jelinek - - * config/ia64/unwind-ia64.c (uw_update_reg_address): Handle - .save XX, r0. - -2003-05-15 Roger Sayle - - * config/alpha/alpha.h (ASM_OUTPUT_SKIP): Fix typo. - -2003-05-15 Eric Christopher - - * cfgcleanup.c (merge_blocks): Fix return value. - -2003-05-15 Eric Christopher - - * combine.c (expand_compound_operation): Make sure - that zero_extend operation is profitable. - -2003-05-15 Richard Henderson - - * config/alpha/linux.h, config/alpha/linux-elf.h: Remove - code protected by USE_GNULIBC_1. - -2003-05-15 Zack Weinberg - - * config.gcc: Purge all targets obsoleted in GCC 3.3. Also - remove hppa*-*-mpeix* which could not be built, and prune - files from tmake_file= or tm_file= lists that don't exist. - - * config/alpha/alpha-interix.h, config/alpha/alpha32.h - * config/alpha/t-interix, config/arm/conix-elf.h - * config/arm/t-arm-aout, config/arm/t-strongarm-coff - * config/arm/unknown-elf-oabi.h, config/i386/win32.h - * config/m68k/3b1.h, config/m68k/3b1g.h, config/m68k/amix.h - * config/m68k/atari.h, config/m68k/ccur-GAS.h, config/m68k/crds.h - * config/m68k/hp2bsd.h, config/m68k/hp3bsd.h - * config/m68k/hp3bsd44.h, config/m68k/linux-aout.h - * config/m68k/m68k-psos.h, config/m68k/mot3300.h - * config/m68k/pbb.h, config/m68k/plexus.h, config/m68k/sun2.h - * config/m68k/sun2o4.h, config/m68k/sun3.h, config/m68k/sun3mach.h - * config/m68k/sun3n.h, config/m68k/sun3n3.h, config/m68k/sun3o3.h - * config/m68k/t-mot3300, config/m68k/t-mot3300-gald - * config/m68k/t-mot3300-gas, config/m68k/t-mot3300-gld - * config/m68k/tower-as.h, config/m68k/tower.h - * config/m88k/aout-dbx.h, config/m88k/m88k-aout.h - * config/m88k/m88k-modes.def, config/m88k/m88k-move.sh - * config/m88k/m88k-protos.h, config/m88k/m88k.c - * config/m88k/m88k.h, config/m88k/m88k.md, config/m88k/openbsd.h - * config/m88k/sysv4.h, config/m88k/t-luna, config/m88k/t-luna-gas - * config/m88k/t-m88k, config/m88k/t-sysv4, config/mcore/gfloat.h - * config/mips/rtems64.h, config/mips/sni-gas.h - * config/mips/sni-svr4.h, config/mips/t-ecoff - * config/mn10200/lib1funcs.asm, config/mn10200/mn10200-protos.h - * config/mn10200/mn10200.c, config/mn10200/mn10200.h - * config/mn10200/mn10200.md, config/mn10200/t-mn10200 - * config/pa/pa-hiux.h, config/pa/pa-hpux7.h, config/pa/pa-hpux9.h - * config/pa/pa-oldas.h, config/pa/t-mpeix, config/psos.h - * config/romp/romp-protos.h, config/romp/romp.c - * config/romp/romp.h, config/romp/romp.md, config/rs6000/aix31.h - * config/rs6000/aix3newas.h, config/rs6000/mach.h - * config/sparc/bsd.h, config/sparc/hal.h - * config/sparc/linux-aout.h, config/sparc/lynx-ng.h - * config/sparc/lynx.h, config/sparc/netbsd.h - * config/sparc/sp86x-aout.h, config/sparc/splet.h - * config/sparc/sun4gas.h, config/sparc/sun4o3.h - * config/sparc/sunos4.h, config/sparc/t-chorus-elf - * config/sparc/t-halos, config/sparc/t-sparcbare - * config/sparc/t-splet, config/sparc/t-sunos41 - * config/v850/rtems.h: Delete file. - -2003-05-15 Aldy Hernandez - - * config/rs6000/rs6000-protos.h (function_value): Protoize. - - * config/rs6000/rs6000.h (FUNCTION_VALUE): Call function. - - * config/rs6000/rs6000.c (rs6000_function_value): New. - -2003-05-15 Philip Blundell - - * config/arm/arm.c (arm_is_xscale): Rename to arm_arch_xscale. - All uses updated. - (arm_tune_xscale): New variable. - (arm_override_options): Set it. - (arm_adjust_cost): Use it in place of arm_arch_xscale. - (arm_gen_load_multiple): Likewise. - (arm_gen_store_multiple): Likewise. - * config/arm/arm.md (is_xscale): Likewise. - * config/arm/arm.h (arm_tune_xscale): Declare. - -2003-05-15 Philip Blundell - - PR target/10730 - * config/arm/arm.c (adjacent_mem_locations): Reject offsets - involving invalid constants. - -2003-05-15 John David Anglin - - * pa.c (hppa_expand_prologue): Remove blockage. - -2003-05-15 Wolfgang Bangerth - - * doc/bugreport.texi: Remove most of the bug reporting - instructions and merge them into bugs.html. - -2003-05-14 Matt Kraai - - * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Cast - g_switch_value to unsigned HOST_WIDE_INT. - -2003-05-14 Eric Christopher - - * combine.c: Fix header comments. - (distribute_notes): Remove usage of elim_i1, elim_i2. Propagate - to all calls and prototype. - -2003-05-14 Roger Sayle - - PR optimization/10764 - * config/i386/i386.md (atan2df3, atan2sf3, atan2xf3, atan2tf3): - Add an explicit clobber to show that UNSPEC_FPATAN clobbers st(1). - (*fyl2x_sfxf3, *fyl2x_dfxf3, *fyl2x_xf3, *fyl2x_tfxf3): Likewise, - add an explicit clobber to show that UNSPEC_FYL2X clobbers st(1). - (logsf2, logdf2, logxf2, logtf2): Update expander patterns to match - the corresponding *fyl2x_?fxf3 instructions. - -2003-05-14 Bob Wilson - - * config/xtensa/lib2funcs.S (TRAMPOLINE_SIZE): Change from 49 to 59. - * config/xtensa/xtensa-config.h (XCHAL_HAVE_CONST16, - XCHAL_HAVE_L32R): New. - * config/xtensa/xtensa-protos.h (non_const_move_operand, - xtensa_load_constant, xtensa_function_prologue, - xtensa_function_epilogue): Delete prototypes. - (xtensa_expand_prologue): New. - * config/xtensa/xtensa.c (frame_size_const, - TARGET_ASM_FUNCTION_PROLOGUE, TARGET_MACHINE_DEPENDENT_REORG, - non_const_move_operand, xtensa_load_constant, xtensa_reorg, - xtensa_function_prologue): Delete. - (add_operand, xtensa_mem_offset): Formatting. - (move_operand): If the const16 option is available, allow any SFmode - and SImode constants. - (xtensa_emit_move_sequence): Inline the former contents of - xtensa_load_constant with modifications to handle the const16 option. - (override_options): Add xtensa_char_to_class['W'] and set it to - the general register class only if the const16 option is enabled. - Fix formatting. Disallow PIC when using the const16 option. - (print_operand): Reorganize to switch on "letter" instead of the - RTL code. Add output_operand_lossage calls for invalid cases. - Add support for 't' and 'b' letters. - (xtensa_expand_prologue): New function to replace - xtensa_function_prologue and xtensa_reorg. - (xtensa_function_epilogue): Declare this as static. Delete code - to print the retw.n or retw instruction. - (xtensa_return_addr): Use A0_REG instead of 0. - (xtensa_rtx_costs): Add costs for using the const16 option. - * config/xtensa/xtensa.h (MASK_CONST16, TARGET_CONST16): New. - (TARGET_DEFAULT): Add CONST16 if L32R instructions not available. - (TARGET_SWITCHES): Add "const16" and "no-const16". - (REG_CLASS_FROM_LETTER): Add comment about new 'W' letter. - (EXTRA_CONSTRAINT): Change 'T' constraint to only apply when not - using the const16 option. - (TRAMPOLINE_TEMPLATE): Rewrite to avoid hardwired use of l32r insn. - (TRAMPOLINE_SIZE): Change from 49 to 59. - (INITIALIZE_TRAMPOLINE): Adjust offsets to match new trampoline. - (GO_IF_LEGITIMATE_ADDRESS): Do not allow constant pool addresses - when using the const16 option. - (PREDICATE_CODES): Delete non_const_move_operand. - * config/xtensa/xtensa.md (define_constants): Add A1_REG, A8_REG, and - UNSPECV_ENTRY. - (movdi, movdf): If the source is a constant, always expand to a - sequence of movsi insns. - (movdi_internal, movdf_internal): Remove alternative using l32r insns. - (movsi_internal, movsf_internal): Add alternative using const16 insns. - (movsf): Add const16 support. - (entry, prologue, epilogue): New. - (set_frame_ptr): Add missing mode for unspec_volatile operation. - Likewise for subsequent split pattern. - * doc/invoke.texi (Option Summary, Xtensa Options): Document new - "-mconst16" and "-mno-const16" options. - -2003-05-14 Richard Henderson - - * config/ia64/ia64.c (ia64_expand_load_address): Force destination - to be DImode register. Merge load_symptr. - * config/ia64/ia64.md (load_symptr): Remove. - -2003-05-14 Richard Henderson - - * rtl.h (TREE_CONSTANT_POOL_ADDRESS_P): Rename from - DEFERRED_CONSTANT_P. - * integrate.c (copy_rtx_and_substitute): Update use. - * varasm.c (build_constant_desc): Set SYMBOL_REF_DECL - to the copy generated. - (maybe_output_constant_def_contents): Examine TREE_ASM_WRITTEN - of the constant to see if we should emit. - (mark_constant): Similarly. - (output_constant_def_contents): Set TREE_ASM_WRITTEN. - -2003-05-14 David Edelsohn - - * config/rs6000/rs6000.md (movsi_internal2): Use compare for self - move record condition. - (movdi_internal2): Same. - -2003-05-14 Nathan Sidwell - - * gcov-io.h (gcov_write_bytes, gcov_read_bytes): Remove here. - (GCOV_TAG_*) Force type to gcov_unsigned_t. - (GCOV_CHECK, GCOV_CHECK_READING, GCOV_CHECK_WRITING): New. - (struct gcov_var): Remove modified. Add start, length, offset, - overread. Have buffer array for libgcov. - (gcov_sync, gcov_seek): Definitions moved to gcov-io.c. - (gcov_position, gcov_rewrite, gcov_is_eof): Adjust. - * gcov-io.c (gcov_open): Set mode, do not read anything. - (gcov_close): Write final block. - (gcov_write_block, gcov_allocate): New. - (gcov_write_bytes): Make static. Write or allocate buffer. - (gcov_write_unsigned, gcov_write_counter): Buffer can never be - null. - (gcov_write_string): Adjust. - (gcov_write_tag) - (gcov_write_length): Adjust. Flush the block. - (gcov_write_tag_length): Buffer can never be null. - (gcov_read_bytes): Make static. Read in block. - (gcov_sync): Moved here. Adjust. - (gcov_seek): Moved here. Adjust. - * coverage.c (read_counts_file): Adjust. - * gcov-dump.c (print_prefix): Add position parameter. - (flag_dump_positions): New flag. - (options, main, print_usage): Add it. - (dump_file, tag_blocks, tag_arcs, tag_lines, tag_counters, - tag_summary): Adjust. - * gcov.c (read_graph_file, read_count_file): Adjust. - * libgcov.c (gcov_exit): Adjust. - - * Makefile.in (LIBGCC_DEPS): Use $(srcdir) on gcov files - (libgcov.a): Depend on libgcc.a. - (gcov.o, gcov-dump.o): Add gcov-io.c. - * mklibgcc.in (libgcov_c_dep): Use $(srcdir). - - * loop.c (check_dbra_loop): Factor common test. - -2003-05-14 Ben Elliston - - * doc/md.texi (Automaton pipeline description): Grammar fixes. - -2003-05-14 Richard Sandiford - - * target-def.h (TARGET_MACHINE_DEPENDENT_REORG): Define. - (TARGET_INITIALIZER): Include it. - * target.h (struct gcc_target): Add machine_dependent_reorg field. - * toplev.c (rest_of_compilation): Use targetm.machine_dependent_reorg. - * system.h: Poison MACHINE_DEPENDENT_REORG. - - * config/alpha/alpha-protos.h (alpha_reorg): Remove declaration. - * config/alpha/alpha.h (MACHINE_DEPENDENT_REORG): Remove. - * config/alpha/alpha.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (alpha_handle_trap_shadows): Remove "first insn" parameter. - (alpha_align_insns): Likewise. - (alpha_reorg): Likewise. Make static. Update calls to above - functions. - - * config/arm/arm-protos.h (arm_reorg): Remove declaration. - * config/arm/arm.h (MACHINE_DEPENDENT_REORG): Remove. - * config/arm/arm.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (arm_reorg): Remove parameter. Make static. - - * config/avr/avr-protos.h (machine_dependent_reorg): Remove. - * config/avr/avr.h (MACHINE_DEPENDENT_REORG): Remove. - * config/avr/avr.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (avr_reorg): Renamed from machine_dependent_reorg. Make static. - Remove parameter. - - * config/c4x/c4x-protos.h (c4x_process_after_reload): Remove. - * config/c4x/c4x.h (MACHINE_DEPENDENT_REORG): Remove. - * config/c4x/c4x.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (c4x_reorg): Renamed from c4x_process_after_reload. Make static. - Remove parameter. - - * config/d30v/d30v-protos.h (d30v_machine_dependent_reorg): Remove. - * config/d30v/d30v.h (MACHINE_DEPENDENT_REORG): Remove. - * config/d30v/d30v.c (d30v_machine_dependent_reorg): Remove. - - * config/frv/frv-protos.h (frv_machine_dependent_reorg): Remove. - * config/frv/frv.c: Remove orphaned comment. - - * config/i386/i386-protos.h (x86_machine_dependent_reorg): Remove. - * config/i386/i386.h (MACHINE_DEPENDENT_REORG): Remove. - * config/i386/i386.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (ix86_reorg): Renamed from x86_machine_dependent_reorg. Make static. - Remove parameter. - - * config/ia64/ia64-protos.h (ia64_reorg): Remove declaration. - * config/ia64/ia64.h (MACHINE_DEPENDENT_REORG): Remove. - * config/ia64/ia64.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (emit_insn_group_barriers): Remove "first insn" parameter. - (emit_all_insn_group_barriers): Likewise. - (ia64_reorg): Likewise. Make static. Update calls to above functions. - (ia64_output_mi_thunk): Update call to emit_all_insn_group_barriers. - - * config/ip2k/ip2k-protos.h (machine_dependent_reorg): Remove. - * config/ip2k/ip2k.h (MACHINE_DEPENDENT_REORG): Remove. - * config/ip2k/ip2k.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (ip2k_reorg): Renamed from machine_dependent_reorg. Make static. - Remove parameter. - - * config/m68hc11/m68hc11-protos.h (m68hc11_reorg): Remove declaration. - * config/m68hc11/m68hc11.h (MACHINE_DEPENDENT_REORG): Remove. - * config/m68hc11/m68hc11.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (m68hc11_reorg): Make static. Remove parameter. - - * config/mcore/mcore-protos.h (mcore_dependent_reorg): Remove. - * config/mcore/mcore.h (MACHINE_DEPENDENT_REORG): Remove. - * config/mcore/mcore.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (conditionalize_optimization): Remove parameter. - (mcore_reorg): Renamed from mcore_dependent_reorg. Remove parameter. - Make static. Update call to conditionalize_optimization. - - * config/mips/mips-protos.h (machine_dependent_reorg): Remove. - * config/mips/mips.h (MACHINE_DEPENDENT_REORG): Remove. - * config/mips/mips.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (mips_reorg): Renamed from machine_dependent_reorg. Remove parameter. - Make static. - - * config/mmix/mmix-protos.h (mmix_machine_dependent_reorg): Remove. - * config/mmix/mmix.h (MACHINE_DEPENDENT_REORG): Remove. - * config/mmix/mmix.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (mmix_reorg): Renamed from mmix_machine_dependent_reorg. Make static. - Remove parameter. - - * config/pa/pa-protos.h (pa_reorg): Remove declaration. - * config/pa/pa.h (MACHINE_DEPENDENT_REORG): Remove. - * config/pa/pa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (pa_combine_instructions): Remove "first insn" parameter. - (remove_useless_addtr_insns): Likewise. - (pa_reorg): Likewise. Make static. Update calls to above functions. - - * config/rs6000/rs6000.h (MACHINE_DEPENDENT_REORG): Remove - commented-out definition. - - * config/s390/s390-protos.h (s390_machine_dependent_reorg): Remove. - * config/s390/s390.h (MACHINE_DEPENDENT_REORG): Remove. - * config/s390/s390.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (s390_reorg): Renamed from s390_machine_dependent_reorg. Make static. - Remove parameter. - - * config/sh/sh-protos.h (machine_dependent_reorg): Remove. - * config/sh/sh.h (MACHINE_DEPENDENT_REORG): Remove. - * config/sh/sh.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (sh_reorg): Renamed from machine_dependent_reorg. Make static. - Remove parameter. - (sh_output_mi_thunk): Call sh_reorg directly. - * config/sh/sh.md: Update comment. - - * config/stormy16/stormy16.h (MACHINE_DEPENDENT_REORG): Remove - commented-out definition. - - * config/v850/v850-protos.h (v850_reorg): Remove declaration. - * config/v850/v850.h (MACHINE_DEPENDENT_REORG): Remove. - * config/v850/v850.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (v850_reorg): Make static. Remove parameter. - - * config/xtensa/xtensa-protos.h (xtensa_reorg): Remove declaration. - * config/xtensa/xtensa.h (MACHINE_DEPENDENT_REORG): Remove. - * config/xtensa/xtensa.c (TARGET_MACHINE_DEPENDENT_REORG): Define. - (xtensa_reorg): Make static. Remove parameter. - - * doc/tm.texi (MACHINE_DEPENDENT_REORG): Remove. - (TARGET_MACHINE_DEPENDENT_REORG): Document. - -2003-05-13 Richard Henderson - - * c-decl.c (duplicate_decls): Re-invoke make_decl_rtl if - the old decl had instantiated DECL_RTL. - -2003-05-13 Mike Stump - - * doc/invoke.texi (Option Summary): Kill off documentation for -$. - -2003-05-13 Janis Johnson - - * config/rs6000/sysv4.h (OUTPUT_ASM_ALIGNED_LOCAL): Expect - HOST_WIDE_INT argument. - -2003-05-13 Jason Merrill - - * tree.h (STRIP_MAIN_TYPE_NOPS): New macro. - - * tree.c (iterative_hash_expr): New fn. - - * c-semantics.c (emit_local_var): Don't mess with temp slots if - there's no initializer. - -2003-05-13 Richard Sandiford - - * final.c (final_scan_insn): Apply the effects of frame-related - delay slot insns before emitting a delayed branch. - -2003-05-13 Nick Clifton - - * config/mcore/mcore.md (jump): Use emit_jump_insn. - -2003-05-13 Ulrich Weigand - - * config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Second - parameter of ASM_OUTPUT_SKIP must have type unsigned HOST_WIDE_INT. - -2003-05-12 DJ Delorie - - * expr.c (move_by_pieces): Honor the alignment of TO and FROM. - (emit_push_insn): Don't use push when the source alignment is less - than the stack's push rounding. - -2003-05-13 Zack Weinberg - - * diagnostic.c (output_format): Add support for %m. - (output_printf, output_verbatim, diagnostic_set_info, - verbatim): Set err_no field of the text_info structure being - initialized. - (fatal_io_error): Delete function. - * diagnostic.h (text_info): Add err_no field. - * toplev.h (fatal_io_error): Delete prototype. - - * c-opts.c, c-pch.c, dwarfout.c, ggc-common.c, ggc-page.c, graph.c - * toplev.c, config/mips/mips.c, config/rs6000/host-darwin.c - * objc/objc-act.c: Replace all calls to fatal_io_error with - calls to fatal_error; add ": %m" to the end of all the affected - error messages. - -2003-05-13 Zack Weinberg - - * varasm.c (notice_rtl_inlining_of_deferred_constant): New function. - * rtl.h: Prototype it. - * integrate.c (copy_rtx_and_substitute ): Call it - when appropriate. - -2003-05-13 Ulrich Weigand - - * config/s390/s390.md ("*iordi3_oi"): Do not mark commutative. - ("*iorsi3_oi"): Likewise. - -2003-05-13 Richard Earnshaw - - * arm.md (compare_scc): Use shorter sequence for EQ case. - (ior_scc_scc_cmp, and_scc_scc_cmp): New insn-and-split patterns. - (and_scc_scc): Ensure split only applies when there is a dominance - of the comparisons. - (and_scc_scc_nodom): New insn-and-split pattern. - -2003-05-13 Richard Sandiford - - * unwind-dw2.c (uw_init_context_1): Don't pass &outer_cfa directly - to _Unwind_SetGRPtr(). - -2003-05-13 Michael Eager - - * Makefile.in: Initialize program_transform_cross_name from - @program_transform_name@ instead of target_alias. - -2003-05-12 Janis Johnson - Alan Modra - Jakub Jelinek - - * configure.in (HAVE_AS_TLS): Add powerpc and powerpc64 tests. - * configure: Rebuild. - * config/rs6000/rs6000-protos.h: Update. - * config/rs6000/rs6000.c (rs6000_tls_size): New. - (rs6000_tls_size_string): New. - (rs6000_parse_tls_size_option): New. - (rs6000_legitimize_tls_address): New. - (rs6000_tls_get_addr): New. - (rs6000_got_sym): New. - (rs6000_tls_symbol_ref): New. - (rs6000_tls_symbol_ref_1): New. - (rs6000_get_some_local_dynamic_name): New. - (rs6000_get_some_local_dynamic_name_1): New. - (TARGET_HAVE_TLS): New. - (TARGET_CANNOT_FORCE_CONST_MEM): New. - (rs6000_override_options): Handle -mtls-size option. - (constant_pool_expr_1): Handle TLS symbols. - (rs6000_legitimize_address): Handle TLS symbols. - (rs6000_tls_referenced_p): New. - (rs6000_legitimate_address): Handle TLS symbols. - (rs6000_emit_move): Handle TLS symbols. - (print_operand): Handle TLS symbols. - (uses_TOC): Handle TLS symbols. - (rs6000_emit_prologue): Use symbol for unspec constant. - * config/rs6000/rs6000.h (HAVE_AS_TLS): New. - (some_ld_name): New. - (LEGITIMATE_CONSTANT_P): Handle TLS symbols. - (PRINT_OPERAND_PUNCT_VALID_P): Handle TLS symbols. - (PREDICATE_CODES): Add rs6000_tls_symbol_ref. - * config/rs6000/rs6000.md (load_toc_v4_PIC_1, load_toc_v4_PIC_1b): - Support TLS. - (tls_gd_32, tls_gd_64, tls_ld_32, tls_ld_64, tls_dtprel_32, - tls_dtprel_64, tls_dtprel_ha_32, tls_dtprel_ha_64, tls_dtprel_lo_32, - tls_dtprel_lo_64, tls_got_dtprel_32, tls_got_dtprel_64, tls_tprel_32, - tls_tprel_64, tls_tprel_ha_32, tls_tprel_ha_64, tls_tprel_lo_32, - tls_tprel_lo_64, tls_got_tprel_32, tls_got_tprel_64, tls_tls_32, - tls_tls_64): New. - * config/rs6000/sysv4.h (SUBTARGET_OPTIONS): Add tls_size. - -2003-05-12 Neil Booth - - * Makefile.in (stage2_build, stage3_build, stage4_build): - Set BUILD_CC to the same as CC. - -2003-05-12 Neil Booth - - * alloc-pool.c (last_id): Put in ENABLE_CHECKING guards. - -2003-05-12 Andreas Schwab - - * config/ia64/ia64.c (ia64_function_ok_for_sibcall): Mark 'exp' - as unused. - (bundling): Initialize 'pos'. - (ia64_expand_builtin): Initialize 'rmode'. - -2003-05-12 David Edelsohn - - * config/rs6000/xcoff.h (ASM_OUTPUT_SKIP): Accept HOST_WIDE_INT. - (ASM_OUTPUT_ALIGNED_COMMON): Same. - (ASM_OUTPUT_LOCAL): Same. - -Mon May 12 21:53:29 CEST 2003 Jan Hubicka - - * varasm.c (output_constant): Fix underflow. - -2003-05-12 Mark Mitchell - - PR other/10745 - * configure.in: Correct detection of GNU ld version number. - * configure: Regenerated. - -2003-05-12 Zack Weinberg - - * diagnostic.c (diagnostic_for_decl): Take a - diagnostic_context argument. Restructure to be consistent - with diagnostic_report_diagnostic. - (diagnostic_count_diagnostic): Now static. Take a - diagnostic_info argument, not just a diagnostic_t. Some code - moved here from internal_error. Move a case label for - clarity. - (diagnostic_action_after_output): New function. Code moved - here from internal_error and fatal_error. - (bug_report_request): New #define so that this text appears in - only one place. - (diagnostic_report_diagnostic): Update to match changes to - diagnostic_count_diagnostic. Call diagnostic_action_after_output. - (diagnostic_set_info): Call gettext here. - - (pedwarn): Update comment. Don't call gettext here. - (sorry): Use report_diagnostic. Don't call gettext here. - (fatal_error): Remove final fnotice and exit, but call - real_abort to prevent warnings about noreturn function returning. - (internal_error): Likewise. Don't do ICE suppression here nor - call context->internal_error. - (warning_with_decl): Suppress for decls in system headers. - Adjust call to diagnostic_for_decl. - (pedwarn_with_decl): Likewise. - (error_with_decl): Adjust call to diagnostic_for_decl. - (error_recursion): Use bug_report_request. - - * diagnostic.h: Remove prototype of diagnostic_count_diagnostic. - * objc/objc-act.c (error_with_ivar, warn_with_method): Don't call - diagnostic_count_diagnostic. - -2003-05-12 John David Anglin - - * pa64-hpux.h (ASM_OUTPUT_ALIGNED_COMMON): Correct last patch. - -Mon May 12 15:57:54 CEST 2003 Jan Hubicka - - * rs6000/darwin.h (ASM_OUTPUT_COMMON): Accept HOST_WIDE_INT - * mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Fix warning. - * mips/mips.h (ASM_OUTPUT_SKIP): Fix typo in the previous patch. - -2003-05-12 Roger Sayle - - * doc/rtl.texi: Document zero_extract as a valid destination - of a set insn. - -2003-05-12 Richard Earnshaw - - * arm/lib1funcs.asm (LSYM): Define -- on ELF prefix a local symbol with - '.'. Change all local symbol definitions and references to use LSYM. - -Mon May 12 11:32:53 CEST 2003 Jan Hubicka - - * expr.h (assemble_static_space): Update prototype. - * output.h (assemble_zeros, output_constant): Likewise. - * elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean - * alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make - it 64bit clean. - * elf.h (ASM_OTUPUT_SKIP): Likewise. - * unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise. - * arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): - Expect HOST_WIDE_INT operand. - * aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): - Expect HOST_WIDE_INT operand. - * unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): - Expect HOST_WIDE_INT operand. - * avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect - HOST_WIDE_INT operand. - * c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP, - ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand. - * aout.h (ASM_OTUPUT_SKIP): Likewise. - * cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. - * darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise. - * dsp16xx.h (ASM_OTUPUT_SKIP): Likewise. - * frv.h (ASM_OTUPUT_SKIP): Likewise. - * h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise. - * 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): - Make it 64bit - clean. - * att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand. - * bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): - Make it 64bit clean. - * darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean.. - * sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect - HOST_WIDE_INT operand - * svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): - Expect HOST_WIDE_INT operand - * sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand - * i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, - ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand - * ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): - Likewise. - * m32r.h (ASM_OUTPUT_COMMON): Likewise. - * 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): - Likewise. - * amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise. - * crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise. - * hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, - ASM_OUTPUT_SKIP): Likewise. - * m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): - Likewise. - * m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, - ASM_OUTPUT_SKIP): Likewise. - * m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, - ASM_OUTPUT_SKIP): Likewise. - * mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. - * netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, - ASM_OUTPUT_SKIP): Likewise. - * sgs.h (ASM_OUTPUT_SKIP): Likewise. - * tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, - ASM_OUTPUT_SKIP): Likewise. - * m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): - Likewise. - * mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise. - * iris.h (ASM_OUTPUT_LOCAL): Likewise. - * mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise. - * ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, - ASM_OUTPUT_SKIP): Make it 64bit clean. - * pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): - Make it 64bit clean. - * pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL, - ASM_OUTPUT_SKIP): Make it 64bit clean. - * hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it - 64bit clean. - * romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect - HOST_WIDE_INT argument - * s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument. - * sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect - HOST_WIDE_INT argument - * sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument - * sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument - * svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument - * vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): - HOST_WIDE_INT argument - * vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument - * xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument - * varasm.c (asm_output_bss, asm_output_aligned_bss, - asm_emit_uninitialized, assemble_zeros, assemble_static_space): - HOST_WIDE_INT argument - -2003-05-10 Steven Bosscher - - * cgraphunit.c (cgraph_create_edges): Drop walk_tree in - favor of walk_tree_without_duplicates. Add comments. - -2003-05-12 Josef Zlomek - - * alloc-pool.h (ALLOC_POOL_ID_TYPE): New type. - (struct alloc_pool_def): New element 'id'. - * alloc-pool.c (fancy_abort): Extern function prototype. - (abort): Macro which uses fancy_abort. - (struct allocation_object_def): New structure. - (ALLOCATION_OBJECT_PTR_FROM_USER_PTR): New macro. - (USER_PTR_FROM_ALLOCATION_OBJECT_PTR): New macro. - (last_id): New variable. - (create_alloc_pool): Add the offset of u.data to size of element, - increase and use last_id. - (free_alloc_pool): Do the checking only when ENABLE_CHECKING. - (pool_alloc): Likewise. Set ID for elements. - (pool_free): Check whether the PTR was allocated from POOL. - -2003-05-11 Richard Henderson - - PR c/10675 - * c-decl.c: Include hashtab.h. - (detect_field_duplicates): New. - (finish_struct): Use it. - * Makefile.in (c-decl.o): Update. - * c-parse.in (structsp_attr): Nreverse component_decl_list results. - (component_decl_list, component_decl_list2, - components, components_notype): Build list in reverse order. - (enumlist): Clarify docs. Use TREE_CHAIN not chainon. - - * tree.c (chainon): Special case op2 null as well. - Reorg for clarity. - -2003-05-11 Roger Sayle - - * config/i386/i386.md (logsf2, logdf2, logxf2, logdf2): New patterns - to implement log, logf and logl built-ins as inline x87 intrinsics. - (UNSPEC_FYL2X): New unspec to represent x87's "fyl2x" instruction. - (*fyl2x_sfxf3, *fyl2x_dfxf3, *fyl2x_xf3, *fyl2x_tfxf3): New insn - patterns for x87's "fyl2x" instruction, used by log?f2 patterns. - - * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FYL2X like - UNSPEC_FPATAN, i.e. replaces two stack operands with single result. - -2003-05-11 Kaveh R. Ghazi - - * Makefile.in (out_object_file): Don't set -Wno-error for ${cpu}.o. - - * sparc.c (print_operand): Fix uninitialized warning. - -2003-05-12 Zdenek Dvorak - - * cfgloopanal.c (num_loop_insns, average_num_loop_insns): Count only - real insns. - * loop-unroll.c (unroll_loop_runtime_iterations): Remove superfluous - condition. - -2003-05-11 Neil Booth - - * doc/cpp.texi: Fix typos. - -2003-05-11 Ulrich Weigand - - * config/s390/s390.c (s390_function_arg_float): New function. - (s390_function_arg_pass_by_reference): Use it. - (s390_function_arg_advance): Likewise. - (s390_function_arg): Likewise. - (s390_va_arg): Likewise - -2003-05-11 Nathan Sidwell - - * coverage.h (coverage_counter_alloc): New function. - * function.h (struct function): Remove arc_profile flag. - * coverage.c (fn_ident): Remove. - (fn_b_ctrs, no_coverage): New. - (get_coverage_counts): Use current_function_funcdef_no. - (coverage_counter_alloc): New. - (coverage_counter_ref): Adjust. - (coverage_begin_output): Check no_coverage. Use - current_function_funcdef_no. - (coverage_end_function): Likewise. - (create_coverage): Set no_coverage. Set DECL_UNINLINEABLE rather - than clearing flag_inline_functions. Do not clear arc_profile - flag. - * function.c (prepare_function_start): Do not set arc_profile - flag. - * profile.c (instrument_edges): Return number of instrumented - edges. Use a for loop. - (branch_prob): Call coverage_counter_alloc. Make BB_TO_GCOV_INDEX - local to here and simplify. Use profile_arc_flag not arc_profile - flag. - (find_spanning_tree): Reformat. - * toplev.c (rest_of_compilation): Use profile_arc_flags and - flag_test_coverage rather than arc_profile flag. - -2003-05-11 Gabriel Dos Reis - - * doc/invoke.texi (Wctor-dtor-privacy): Update documentation. - -2003-05-11 Richard Kenner - - * varasm.c (copy_constant, case VIEW_CONVERT_EXPR): New case. - -2003-05-11 Bruno Haible - - * cppfiles.c (find_or_create_entry): Preserve errno. - -2003-05-11 Neil Booth - - * c-cppbuiltin.c (c_cpp_builtins): Move __STDC_HOSTED__ into - cpplib as it's a Standard Predefined Macro. - * c-opts.c (finish_options): Pass flag_hosted to cpp_init_builtins. - * cppinit.c (_cpp_init_builtins): Take HOSTED. Define - __STDC_HOSTED__ appropriately. - * cpplib.h (_cpp_init_builtins): Update. - * fix-header.c (read_scan_file): Update. - * doc/cpp.texi, doc/cppopts.texi: Update documentation. - -2003-05-11 Gabriel Dos Reis - - PR C++/689 - PR C++/9257 - * c-opts.c (c_common_decode_option): Don't set - warn_ctor_dtor_privacy wen -Wall. - * c-common.c (warn_ctor_dtor_privacy): Don't turn on by default. - -2003-05-10 Alexandre Oliva - - * reload1.c (reload_cse_move2add): Revert part of my 2003-05-09's - patch. - -2003-05-10 Zack Weinberg - - * diagnostic.c: Reorder functions for clarity, putting all the - functions in the "error" family next to each other, and - likewise all the functions in the "error_with_decl" family. - Some other routines were moved too. Add comments. - (vbuild_message_string): Fold into sole caller. - - -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-05-10 Alexander Aganichev - - * config/i386/i386.h (MODES_TIEABLE_P): Fix typo. - -2003-05-10 Nathan Sidwell - - * defaults.h (GCOV_TYPE_SIZE): Remove. - * gcov-io.h (gcov_type): Set to specific mode int on target. - (gcov_unsigned_t, gcov_position_t): New. - (GCOV_TYPE_NODE): New. - (GCOV_TAG_SUMMARY_LENGTH): Adjust. - (GCOV_COUNTERS_SUMMABLE): New. - (gcov_ctr_summary, gcov_sumary, gcov_fn_info, gcov_merge_fn, - gcov_ctr_info, gcov_info): Adjust types. - (gcov_var): Adjust types. - (gcov_write_unsigned, gcov_write_tag, - gcov_write_length, gcov_write_tag_length, gcov_write_summary, - gcov_read_unsigned, gcov_read_summary): Adjust gcov types. - (gcov_position, gcov_sync, gcov_seek): Adjust gcov types. - * gcov-io.c (gcov_write_unsigned, gcov_write_tag, - gcov_write_length, gcov_write_tag_length, gcov_write_summary, - gcov_read_unsigned, gcov_read_summary): Adjust gcov types. - * libgcov.c (gcov_crc32, gcov_version_mismatch, gcov_exit, - __gcov_init, __gcov_merge_add): Adjust gcov types. - * coverage.c (ctr_merge_functions): Constify. - (ctr_names): New. - (read_counts_file): Adjust gcov types. Only summarize & merge - summable counters. - (coverage_counter_ref): Use GCOV_TYPE_NODE. - (build_fn_info_type, build_fn_info_value, build_ctr_info_type, - build_ctr_info_value, build_gcov_info): Adjust types. - * profile.c (branch_prob): Adjust gcov types. - * gcov_dump (dump_file): Adjust gcov types. - -2003-05-10 Richard Earnshaw - - * arm.md (DOM_CC_X_AND_Y, DOM_CC_NX_OR_Y, DOM_CC_X_OR_Y): New - constants. - (ior_scc_scc, and_scc_scc): New insn_and_split patterns. - * arm.c (arm_select_dominance_cc_mode): Renamed from - select_dominance_cc_mode, no-longer static. Use DOM_CC... constants. - Callers updated. - * arm-protos.h (arm_select_dominance_cc_mode): Add prototype. - -2003-05-09 Roger Sayle - - * config/alpha/alpha.c (alpha_start_function): Declare frame_size - as unsigned to avoid signed/unsigned comparison warnings. - -2003-05-09 Bob Wilson - - * config/xtensa/xtensa.c (xtensa_emit_loop_end): Only use "nop.n" - instruction if the Xtensa density option is enabled. - -2003-05-09 Matt Kraai - - * mklibgcc.in: Remove extra quotes. - -2003-05-09 Mark Mitchell - - * config/rs6000/rs6000.c (spe_init_builtins): Fix typo in creation - of int_ftype_void. - -2003-05-09 Alexandre Oliva - - * reload1.c (reload_cse_move2add): Don't turn an implicit - truncation into a self-set in the narrow mode. - -2003-05-09 Richard Earnshaw - - * arm.md (clzsi2): The CLZ instruction is predicable. - -2003-05-09 Bob Wilson - - * config/xtensa/xtensa.c: Formatting. - -2003-05-09 Diego Novillo - - * tree-dump.c (dequeue_and_dump): Use CONSTRUCTOR_ELTS, - instead of TREE_OPERAND to access the operand of a - CONSTRUCTOR node. - -2003-05-09 Diego Novillo - - * tree-dump.c (dequeue_and_dump): CONSTRUCTOR nodes contain only - one operand. - -2003-05-09 Gabriel Dos Reis - - * toplev.h (warning_with_file_and_line): Don't declare. - (error_with_file_and_line): Likewise. - * diagnostic.c (error_with_file_and_line): Remove. - (warning_with_file_and_line): Likewise. - -2003-05-09 Gabriel Dos Reis - - * c-parse.in (if_stmt_locus): New object. - (if_prefix rule): Use it. Don't use warning_with_file_and_line. - (select_or_iter_stmt rule): Likewise. - (if_stmt_file): Remove. - (if_stmt_line): Likewise. - * jump.c: include "diagnostic.h" - (never_reached_warning): Don't use warning_with_file_and_line. - * Makefile.in (jump.o): Add dependce on diagnostic.h - -2003-05-09 Alan Modra - - * expr.c (move_block_from_reg): Remove "size" parm. Localize vars. - Move code handling pieces not larger than a word to.. - * function.c (assign_parms): ..here, but use change_address instead - of adjust_address and operand_subword, and expand_binop instead of - expand_shift. Adjust calls to move_block_from_reg. - * expr.h (move_block_from_reg): Update declaration. - (copy_blkmode_from_reg): Formatting. - * Makefile.in (function.o): Add $(OPTABS_H) to deps. - * config/alpha/alpha.c (alpha_setup_incoming_varargs): Adjust - move_block_from_reg calls. - * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. - * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. - * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. - * config/m88k/m88k.c (m88k_builtin_saveregsk): Likewise. - * config/mips/mips.c (mips_setup_incoming_varargs): Likewise. - * config/pa/pa.c (hppa_builtin_saveregs): Likewise. - * config/romp/romp.h (SETUP_INCOMING_VARARGS): Likewise. - * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. - * config/sh/sh.c (sh_builtin_saveregs): Likewise. - -2003-05-08 DJ Delorie - - * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_arg): Fix - to handle arguments for which MUST_PASS_IN_STACK is true (e.g., - variable-sized types). - (xstormy16_function_arg): New. Pass them that way too. - * config/stormy16/stormy16-protos.h (xstormy16_function_arg): New. - * config/stormy16/stormy16.h (FUNCTION_ARG): Call it. - -2003-05-08 Aldy Hernandez - - * mklibgcc.in: Use mkinstalldirs when installing multilib - directories. - -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-08 Gabriel Dos Reis - - * objc/objc-act.c (error_with_ivar): Don't use - error_with_file_and_line. - (warn_with_method): Don't use warning_with_file_and_line. - -2003-05-08 Gabriel Dos Reis - - * stmt.c (emit_locus): New macro. - (emit_filename): Remove. - (emit_lineno): Likewise. - (struct stmt_status): Replace members x_emit_filename and - x_emit_lineno with x_emit_locus. - (set_file_and_line_for_stmt): Adjust. - (expand_expr_stmt_value): Don't use warning_with_file_and_line. - (warn_if_unused_value): Likewise. - (check_seenlabel): Likewise. - -2003-05-08 Gabriel Dos Reis - - * c-decl.c (define_label): Tidy. Don't use any of - error_with_file_and_line or warning_with_file_and_file. - (pending_xref_error): Likewise. - (store_parm_decls): Likewise. - (current_function_prototype_locus): New object. Package from - current_function_prototype_file and current_function_prototype_line. - (start_function): Use it. - (current_function_prototype_file): Remove. - (current_function_prototype_line): Remove; - -2003-05-08 Kaveh R. Ghazi - - * builtins.c (readonly_data_expr): New function. - (expand_builtin_memmove): Optimize any rodata source, not just - strings. - -2003-05-07 David Mosberger - - * unwind-libunwind.c (_Unwind_FindEnclosingFunction): New. - -2003-05-07 Richard Henderson - - * config/i386/i386.c (ix86_split_long_move): Fix base register - mode for XFmode splits for TARGET_64BIT. - -2003-05-07 Richard Henderson - - * sched-ebb.c (schedule_ebb): Supply the correct starting - block number to save_line_notes. - -2003-05-07 Richard Henderson - - * toplev.c (enum dump_file_index): Swap DFI_ce3, DFI_bbro. - (dump_file): Likewise. - -2003-05-07 David Mosberger - - * config/ia64/crtbegin.asm (__do_jv_register_classes): Don't - forget to preserve gp. - * config/ia64/crtend.asm (__do_global_ctors_au): Ditto. - - * config/ia64/crtbegin.asm (__do_jv_register_classes): Add missing - .prologue directive. - Use .skip instead of data8 for .bss section to make Intel - Assembler (ias) happy. Minor whitespace fixups. Make "nop 0" - explicit in the .mib bundles and remove the unnecessary stop - bits. Replace local labels with normal labels, to make ias - happy. Don't register __do_global_ctors_aux here, do it in - crtend.asm instead. - - * config/ia64/crtend.asm [HAVE_INIT_FINI_ARRAY]: Register - __do_global_ctors_aux in .init_array section instead of - declaring it as a hidden global. Replace local labels with - ordinary labels to make ias happy. - -2003-05-07 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-07 Richard Henderson - - * unwind-dw2.c (_Unwind_GetCFA): Cast pointer to _Unwind_Ptr, - not _Unwind_Word. - -2003-05-07 Zack Weinberg - - * stmt.c (force_label_rtx): New function, based on logic - formerly found in expand_expr. - * expr.h: Prototype it. - * expr.c (expand_expr ): Use force_label_rtx if - appropriate. - * varasm.c (decode_addr_const ): Use force_label_rtx. - - * print-tree.c (debug_tree): Free the table after we're done - with it. Use putc. - -2003-05-07 Aldy Hernandez - - * config/rs6000/spe.h: Reverse arguments for __ev_subfw. - Unreverse arguments for __ev_subw. - - * config/rs6000/spe.md (evsubfw): Reverse arguments of assembly. - -2003-05-07 Nick Clifton - - * config/stormy16/stormy-abi: Update to include - R_XSTORMY16_FPTR16, R_XSTORMY16_LO16, R_XSTORMY16_HI16 and - R_XSTORMY16_12 relocs. - -2003-05-07 Alan Modra - - * function.c (assign_parms): Correct reversed reg_parm_stack_space - test. Add partial in-regs size to stack_args_size. - -2003-05-07 Gerald Pfeifer - - * doc/invoke.texi (Warning Options): Mark -Wmissing-declarations - as a C only option. - -2003-05-07 Nathan Sidwell - - * gcov-io.h (GCOV_LOCKED): New #define. - (GCOV_LINKAGE): Make sure it is #defined. - (gcov_write_string, gcov_write_tag, gcov_write_length, - gcov_read_string, gcov_time): Poison in libgcov. - (gcov_seek_end): Remove. - (gcov_write_tag_length, gcov_sync, gcov_rewrite): New. - (GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH, - GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH, - GCOV_TAG_SUMMARY_LENGTH): New #defines. - (gcov_write_tag, gcov_write_length): Not in libgcov. - * gcov-io.c (gcov_open): Use GCOV_LOCKED. - (gcov_write_tag, gcov_write_length): Not in libgcov. - (gcov_write_tag_length): New. - (gcov_write_summary): Use gcov_write_tag_length. - * libgcov.c: Always #include gcov-io.h. - (IN_LIBGCOV): -1 for inhibit_libc, +1 otherwise. - (GCOV_LINKAGE): Define to nothing for L_gcov. - (gcov_exit): Replace gcov_write_tag, gcov_write_length with - gcov_write_tag_length. Use gcov_rewrite & gcov_seek. - * gcov.c (read_graph_file): Replace gcov_seek by gcov_sync. - (read_count_file): Likewise. - * gcov-dump.c (dump_file): Likewise. - * coverag.c (read_counts_file): Likewise. - -2003-05-06 Mark Mitchell - - PR other/10658 - * gcc.c (process_command): Update copyright date. - -2003-05-06 Phil Edwards - - * doc/install.texi (mips-*-*): Add note about libstdc++. - -2003-05-06 DJ Delorie - - * config/stormy16/stormy16.c (xstormy16_function_profiler): New. - * config/stormy16/stormy16.h (FUNCTION_PROFILER): Call it. - * config/stormy16/stormy16-protos.h (xstormy16_function_profiler): New. - -2003-05-06 - - * c-opts.c (COMMAND_LINE_OPTIONS): Reject -Wmissing-prototypes - and -Wstrict-prototypes if C++. - -2003-05-06 Aldy Hernandez - - * config/rs6000/linuxspe.h: New file. - - * config.gcc: Add powerpc-*-linux-gnuspe* target. - -2003-05-06 Richard Henderson - - * unwind-dw2.c (uw_update_context_1): Only set cfa as sp if - previous frame didn't save sp. Clear sp for next frame. - (uw_install_context_1): Honor saved sp from frame. - -2003-05-06 Richard Sandiford - - * config/mips/mips-protos.h (mips_subword, mips_output_move): Declare. - (mips_move_1word, mips_move_2words): Remove declaration. - (mips_split_64bit_move_p, mips_split_64bit_move): Declare. - (mips_restore_gp): Remove insn argument. - * config/mips/mips.h (FP_REG_RTX_P): New macro. - * config/mips/mips.c (volatile_buffer): Remove. - (mips_subword, mips_split_64bit_move_p, mips_split_64bit_move): New. - (mips_move_1word, mips_move_2words): Remove, replacing with... - (mips_output_move): ...this new function. - (mips_restore_gp): Remove insn argument. Adjust for above changes. - (print_operand): Make '%h' print %hi(op) for HIGH operands. Remove - handling of floating-point constants. Handle zero CONST_DOUBLE - arguments. - (mips_annotate_frame_insn): Replace with... - (mips_set_frame_expr): ...this, which just takes one argument. - (mips_frame_set): Change the register argument to an rtx. - (mips_emit_frame_related_store): Use mips_split_64bit_move_p to - check whether moves should be split. Use mips_split_64bit_move - to split them. Use mips_subword to generate the high and low - parts of a paired FPR. Adjust calls to frame_set and - mips_set_frame_expr. - (mips_expand_prologue): Simplify due to above changes. - * config/mips/mips.md: Add splitters for 64-bit moves on 32-bit - targets, replacing xisting register-only versions. - (UNSPEC_STORE_DF_HIGH): New unspec. - (UNSPEC_LOAD_DF_LOW, UNSPEC_LOAD_DF_HIGH): New unspecs. - (mulsi3_r4000, muldi3_internal2): Avoid use of mips_move_1word. - (*paradoxical_extendhidi2): Remove. - (movdi_internal, movdi_internal2): Use mips_output_move. - (*movdi_internal2_mips16, movsi_internal, movcc): Likewise. - (movsf_internal1, movsf_internal2): Likewise. - (movdf_internal1a): Likewise. Fix length and type of f <- G case. - (movdf_internal1b): Use mips_output_move. Fix type of f <- G case. - (movdf_internal2): Use mips_output_move. Fix lengths of FPR moves. - Add m <- G alternative. - (load_df_low, load_df_high, store_df_low): New patterns. - (movhi_internal): Use @ template instead of calling a function. - Remove unnecessary 'z' alternatives. - (movqi_internal): Likewise. - (exception_receiver): Update call to mips_restore_gp. - -2003-05-06 Richard Sandiford - - * config/mips/mips-protos.h (mips_simplify_dwarf_addr): Remove. - (mips_delegitimize_address): Declare. - * config/mips/mips.h (ASM_SIMPLIFY_DWARF_ADDR): Undefine. - (FIND_BASE_TERM): Define. - * config/mips/mips.c (TARGET_DELEGITIMIZE_ADDRESS): Defi~e. - (mips_delegitimize_address): Renamed from mips_simplify_dwarf_addr. - Handle small-data addresses. - -2003-05-05 Roger Sayle - - * real.c (real_powi): New function to calculate the value of - a real raised to an integer power, i.e. pow(x,n) for int n. - (real_sqrt): Convert to using the faster do_add, do_multiply - and do_divide API for consistency with the rest of real.c. - * real.h (real_powi): Prototype here. - * builtins.c (fold_builtin): Avoid local variable mode when - evaluating sqrt at compile time. Attempt to evaluate pow at - compile-time, by checking for an integral exponent. - -2003-05-05 Richard Henderson - - * doc/extend.texi (Variable Attributes): Re-sort table and tidy. - -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. - (_LITTLE_ENDIAN): Use __LITTLE_ENDIAN__ instead. - -2003-05-05 Janis Johnson - - * Makefile.in: (site.exp): Add ALT_CC_UNDER_TEST, add quotes around - expanded variables. - * doc/sourcebuild.texi (C tests): Describe gcc.dg/compat tests. - -2003-05-05 Zack Weinberg - - * rtl.h (STRING_POOL_ADDRESS_P): Rename to DEFERRED_CONSTANT_P. - * varasm.c (struct varasm_status): Add deferred_constants field. - (n_deferred_strings): Delete variable. - (n_deferred_constants): New #define. - (struct constant_descriptor_tree): Kill next and label fields. - (const_hash_table, MAX_HASH_TABLE): Delete. - (const_desc_htab): New static variable. - (const_hash): Rename const_desc_hash, and make it fit the - hashtab.h interface. - (const_desc_eq): New. - (const_hash_1, compare_constant): Const-ify arguments. - (build_constant_desc): Set DEFERRED_CONSTANT_P on all new - SYMBOL_REFs. Clarify comments. Don't set desc->label. - (output_constant_def): Do the lookup/insert using the - hashtab.h interface. Don't muck with n_deferred_constants or - DEFERRED_CONSTANT_P here. - Always call maybe_output_constant_def_contents. - (maybe_output_constant_def_contents): Take a pointer to the - descriptor, not the EXP and RTL separately. Return - immediately if this constant is not deferred. Defer output of - everything, except writable string constants. Update - n_deferred_constants here. - (output_constant_def_contents): Now takes just one argument, - an rtx. Clear DEFERRED_CONSTANT_P here. - (mark_constant_pool): Update for rename of n_deferred_strings. - (mark_constant): Don't clear DEFERRED_CONSTANT_P here. - - (init_varasm_status): Clear p->deferred_constants. - (init_varasm_once): Call htab_create_ggc for const_desc_htab. - -2003-05-05 Kaveh R. Ghazi - - * builtins.c (expand_builtin_stpcpy): Only expand when the length - of the source string can be evaluated at compile-time. - -2003-05-05 Aldy Hernandez - - * testsuite/gcc.c-torture/compile/simd-6.c: New. - - * c-typeck.c (digest_init): Handle arrays of vector constants. - -2003-05-05 Jakub Jelinek - - * builtins.c (expand_builtin_mempcpy): New function. - (expand_builtin_stpcpy): Optimize stpcpy whose return value is - ignored into strcpy no matter what arguments it has. - (expand_builtin) : Call - expand_builtin_mempcpy. - -2003-05-05 Aldy Hernandez - - * testsuite/gcc.dg/20030505.c: New. - - * c-typeck.c (convert_for_assignment): Opaque pointers can - interconvert. - - * config/rs6000/rs6000.c: New global opaque_p_V2SI_type_node. - (rs6000_init_builtins): Initialize opaque_p_V2SI_type_node. - (spe_init_builtins): Rename all pv2si_type_node to - opaque_p_V2SI_type_node. - Remove declaration of pv2si_type_node. - (is_ev64_opaque_type): Accept opaque pointers. - -2003-05-05 Geoffrey Keating - - * config/rs6000/rs6000.c (validate_condition_mode): Use - flag_finite_math_only. - (rs6000_reverse_condition): Never return UNKNOWN; use - flag_finite_math_only. - (rs6000_generate_compare): Use flag_finite_math_only. - (rs6000_emit_cmove): Handle UNLE. Support UNEQ under -ffast-math. - Use HONOR_* rather than flag_unsafe_math_optimizations. Correct - UNGE and GT cases. Handle UNEQ and LTGT when ! HONOR_NANS. - - * toplev.c (check_global_declarations): Suppress not-used warning - for volatile variables. - -2003-05-05 Olivier Hainque - - * expr.c (expand_expr, case BIT_FIELD_REF): Refine the test forcing - usage of bitfield instructions for mode1 != BLKmode, only ignoring - SLOW_UNALIGNED_ACCESS if the field is not byte aligned. - (store_field): Likewise. - -2003-05-05 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add - evsubifw to builtins accepting 5-bit unsigned constants. - (easy_vector_constant): Return if V1DImode. Fix typo. - -2003-05-05 Aldy Hernandez - - * config/rs6000/spe.h: Revert licensing change from last patch. - -2003-05-05 DJ Delorie - - * config/stormy16/stormy16.md (negsi2): Allocate the pseudos - before reload, but defer the split until after. - * config/stormy16/stormy16.c (xstormy16_expand_arith): Modify - to match. - -2003-05-05 David Edelsohn - - * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add 440 support. - * config/rs6000/vxworks.h (CC1_SPEC): Use -mcpu=440 for t440. - -2003-05-05 Zdenek Dvorak - - * libgcov.c (__gcov_merge_add): Do not use gcov_type when inhibit_libc - is defined. - -2003-05-04 Kaveh R. Ghazi - - * builtin-attrs.def (ATTR_NOTHROW_NONNULL_1, - ATTR_NOTHROW_NONNULL_2, ATTR_NOTHROW_NONNULL_3): Renamed from - ATTR_NONNULL_1, ATTR_NONNULL_2 and ATTR_NONNULL_3. - - (ATTR_NOTHROW_NONNULL_1_2, ATTR_NOTHROW_NONNULL_1_4, - ATTR_CONST_NOTHROW_NONNULL_1, ATTR_PURE_NOTHROW_NONNULL_1, - ATTR_PURE_NOTHROW_NONNULL_1_2, ATTR_MALLOC_NOTHROW_NONNULL_1): - New. - - * builtins.def (DEF_EXT_FALLBACK_BUILTIN): Accept ATTRS argument. - (BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Update comment - - (BUILT_IN_INDEX, BUILT_IN_RINDEX, BUILT_IN_MEMCPY, - BUILT_IN_MEMMOVE, BUILT_IN_MEMCMP, BUILT_IN_MEMSET, - BUILT_IN_MEMPCPY, BUILT_IN_STRCAT, BUILT_IN_STRNCAT, - BUILT_IN_STPCPY, BUILT_IN_STRCPY, BUILT_IN_STRNCPY, - BUILT_IN_STRCMP, BUILT_IN_STRNCMP, BUILT_IN_STRLEN, - BUILT_IN_STRSTR, BUILT_IN_STRPBRK, BUILT_IN_STRSPN, - BUILT_IN_STRCSPN, BUILT_IN_STRCHR, BUILT_IN_STRRCHR, BUILT_IN_NAN, - BUILT_IN_NANF, BUILT_IN_NANL, BUILT_IN_NANS, BUILT_IN_NANSF, - BUILT_IN_NANSL, BUILT_IN_PUTS, BUILT_IN_FPUTC, BUILT_IN_FPUTS, - BUILT_IN_FWRITE, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED, - BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED, - BUILT_IN_STRDUP): Add "nonnull" attribute. - -2003-05-04 Richard Kenner - - * expr.c (store_field): Don't clobber TEMP in shift: it might be - a variable. - (get_inner_reference): Don't go through a VIEW_CONVERT_EXPR - whose purpose is to step up the alignment. - (expand_expr, case ADDR_EXPR): Force LO_SUM into memory, just like REG. - - * stor-layout.c (compute_record_mode): Relax restriction - on fields crossing word boundaries forcing BLKmode. - -2003-05-04 Neil Booth - - * cppinit.c (cpp_create_reader, post_options): Warn about - trigraphs unless explicity set or -trigraphs. - * cpplex.c (warn_in_comment): New. - (_cpp_process_line_notes): Better handling of -Wtrigraphs. - (_cpp_skip_block_comment): Add call to _cpp_process_line_notes. - * doc/cppopts.texi, doc/cpp.texi: Update. - -2003-05-04 Zdenek Dvorak - - * Makefile.in (LIBGCOV): Add _gcov_merge_add. - * gcov-io.h: Make GCOV_LINKAGE extern in libgcov and prevent resulting - namespace clash. - (GCOV_MERGE_FUNCTIONS): New. - (gcov_merge_fn): Declare. - (struct gcov_ctr_info): New field "merge". - (__gcov_merge_add): Declare. - * coverage.c (ctr_merge_functions): New. - (build_ctr_info_type, build_ctr_info_value): Initialize merge field - of gcov_ctr_info type. - * libgcov.c (__gcov_merge_add): New. - (gcov_exit): Call a hook to merge values of counters. - -2003-05-04 Gabriel Dos Reis - - * toplev.h (pedwarn_with_file_and_line): Don't declare. - * diagnostic.c (pedwarn_with_file_and_line): Remove. - -2003-05-04 Gabriel Dos Reis - - * varasm.c (assemble_variable): Don't use error_with_file_and_line. - -2003-05-04 Kaveh R. Ghazi - - * builtins.c (expand_builtin_constant_p, expand_builtin_strlen, - expand_builtin_frame_address): Update prototypes. - (expand_builtin_constant_p, expand_builtin_strlen, - expand_builtin_strcpy, expand_builtin_memset, - expand_builtin_bzero, expand_builtin_args_info, - expand_builtin_frame_address): Pass in just the argument(s) - needed, not the entire expression `exp'. - (expand_builtin): Update all calls to these functions. - -2003-05-03 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-03 Richard Henderson - - * config/rs6000/rs6000.c (constant_pool_expr_p): Make static and - return bool. - (toc_relative_expr_p): Likewise. - (SPE_CONST_OFFSET_OK): Move from rs6000.h. - (legitimate_constant_pool_address_p): Move from rs6000.h, change - into a function, downcase all users. - (legitimate_small_data_p): Likewise. - (legitimate_offset_address_p): Likewise. - (legitimate_indexed_address_p): Likewise. - (legitimate_indirect_address_p): Likewise. - (legitimate_lo_sum_address_p): Likewise. - (rs6000_mode_dependent_address): Likewise. - * rs6000.h (CONSTANT_POOL_EXPR_P, TOC_RELATIVE_EXPR_P): Remove. - (SPE_CONST_OFFSET_OK, LEGITIMATE_CONSTANT_POOL_ADDRESS_P, - LEGITIMATE_SMALL_DATA_P, LEGITIMATE_OFFSET_ADDRESS_P, - LEGITIMATE_INDEXED_ADDRESS_P, LEGITIMATE_INDIRECT_ADDRESS_P, - LEGITIMATE_LO_SUM_ADDRESS_P): Move into rs6000.c. - (LEGITIMATE_ADDRESS_INTEGER_P): Remove. - (GO_IF_MODE_DEPENDENT_ADDRESS): Use rs6000_mode_dependent_address. - * config/rs6000/rs6000-protos.h: Update. - -2003-05-03 Geoffrey Keating - - * config/rs6000/rs6000.h (REVERSIBLE_CC_MODE): Define. - (REVERSE_CONDITION): Define. - - * config/rs6000/rs6000.c (scc_comparison_operator): Make equivalent - to branch_positive_comparison_operator. - (ccr_bit): Check that sCOND conditions are actually a positive bit. - (print_operand): Remove %D substitution. - (rs6000_emit_sCOND): Generate complement operation to ensure that - sCOND input is a positive bit. - * config/rs6000/rs6000.md: Rearrange sCOND templates to be in the - same order as bCOND, and add the missing ones. Remove the %D - substitutions from the scc patterns. - - * simplify-rtx.c (simplify_relational_operation): Add case for - ! (fabs(x) < 0.0). - -2003-05-03 Bruce Korb - - * gcc/fixinc/fixincl.tpl(dne): restore this to force merge conflicts - in fixincl.x - * gcc/fixinc/inclhack.def(bsd_stdio_attrs_conflict): fix placement - -2003-05-03 Aldy Hernandez - - * config/rs6000/spe.h: Remove unecessary casts. Misc cleanups. - -2003-05-03 Zack Weinberg - - PR c/10604 - * c-common.c (warn_sign_compare): Initialize to -1. - * c-opts.c (c_common_init_options): Don't set warn_sign_compare here. - (c_common_decode_option ): Set warn_sign_compare - for C++ only. - (c_common_post_options): Set warn_sign_compare from extra_warnings - if it's still -1 at this point. - - * toplev.c (maybe_warn_unused_parameter): New static variable. - (set_Wextra): New static function. - (W_options): Remove "extra". - (decode_W_option): Call set_Wextra. - (independent_decode_option): Likewise. - (set_Wunused): Cooperate with set_Wextra in setting - warn_unused_parameter. - (rest_of_compilation): No need to check extra_warnings as - well as warn_uninitialized. - - * c-typeck.c (build_binary_op, build_conditional_expr): - No need to check extra_warnings as well as warn_sign_compare. - (internal_build_compound_expr): No need to check extra_warnings - as well as warn_unused_value. - * function.c (expand_function_end): No need to check extra_warnings - as well as warn_unused_parameter. - * stmt.c (expand_expr_stmt_value): No need to check extra_warnings - as well as warn_unused_value. - - * doc/invoke.texi: Clarify documentation of -Wsign-compare. - - * Makefile.in: Disable -Werror for gengtype-lex.o. - -2003-05-03 Olivier Hainque - - * emit-rtl.c (last_call_insn, add_function_usage_to): New functions. - * rtl.h (last_call_insn, add_function_usage_to): New prototypes. - * builtins.c (expand_builtin_apply): Use the new emit-rtl functions. - * calls.c (emit_call_1): Likewise. - (expand_call): For calls initializing constant memory, replace - emission of standalone mem /u clobber with function usage entry. - * expr.c (emit_block_move_via_libcall): Likewise. - * cse.c (count_reg_usage, case EXPR_LIST): New case. - * flow.c (propagate_one_insn): Pass entire operand of - CALL_INSN_FUNCTION_USAGE to mark_used_regs. - * integrate.c (try_constants): For CALL_INSNs, substitute constants - within the FUNCTION_USAGE also. - * loop.c (prescan_loop): Note clobbers of const mem mentioned in - FUNCTION_USAGE lists. - * reload1.c (replace_pseudos_in): Renamed. - (reload): Use it for clobbers surviving until the end of the reload. - -2003-05-03 Richard Kenner - - * expr.c (expand_expr, case VIEW_CONVERT_EXPR): Don't use - gen_lowpart on non-integer modes. - - * stor-layout.c (place_field): When adjusting offset_align, use - desired_align, not DECL_ALIGN. - -2003-05-03 Nathan Sidwell - - * c-decl.c (pending_invalid_xref_file): Remove. - (pending_invalid_xref_line): Remove. - (pending_invalid_xref_location): New. - (lookup_label): Use location_t and input_location directly. - (lookup_tag): Likewise. - (pending_xref_error): Likewise. - (c_expand_body_1): Likewise. - * c-common.c (x_expand_start_cond): Likewise. - * c-semantics.c (genrtl_for_stmt): Likewise. - (find_reachable_label): Likewise. - * expr.c (expand_expr): Likewise. - * integrate.c (output_inline_function): Likewise. - * tree-inline.c (find_alloca_call): Likewise. - (find_builtin_longjmp_call): Likewise. - * gcc.c (input_filename): Make static. - -2003-05-03 Richard Sandiford - - * config/mips/mips.md: Fix comment typo. - - * config/mips/mips.c (mips_integer_op): New structure. - (MIPS_MAX_INTEGER_OPS): Define. - (mips_const_insns): Use mips_build_integer to determine the number - of instructions needed to load a CONST_INT. - (move_operand): Reject compound CONST_INTs. - (mips_build_shift, mips_build_lower, mips_build_integer): New fns. - (mips_move_integer): New fn. - (mips_legitimize_const_move): Pass CONST_INTs to mips_move_integer. - (mips_legitimize_move): Only legitimize constants when moving - word or subword values. - -2003-05-02 Matt Kraai - - * Makefile.in (gcov-iov.h): Use move-if-change and a stamp. - -2003-05-02 Kaveh R. Ghazi - - * builtins.c (expand_builtin_stpcpy): Copy `arglist' before - modifying it. - -2003-05-03 Falk Hueffner - Gerald Pfeifer - - * doc/contrib.texi (Contributors): Add Zdenek Dvorak, Aldy - Hernandez, and Kazu Hirata. Update Richard Henderson. - -2003-05-02 Geoffrey Keating - - * config/rs6000/rs6000.c (rs6000_attribute_table): Add 'extern' - to tentative declaration. - - * config/rs6000/sysv4.h (SYMBOL_FLAG_SMALL_V4): Delete. - (SYMBOL_FLAG_SMALL_V4): Delete. - * config/rs6000/rs6000.c (small_data_operand): Use SYMBOL_REF_SMALL_P. - (rs6000_elf_encode_section_info): Don't set SYMBOL_FLAG_SMALL_V4. - (rs6000_elf_in_small_data_p): Add extra section names. Add - comment about TREE_PUBLIC test. - - * c-semantics.c (genrtl_switch_stmt, genrtl_if_stmt): Call - expand_stmt on result of expand_unreachable_stmt. - -2003-05-02 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Add Daniel Berlin. - -2003-05-02 David Edelsohn - - * config/rs6000/{603.md,6xx.md,7450.md,7xx.md,rs64.md}: Decrease - number of automata. - - * config/rs6000/rs6000.c (symbol_ref_operand): Check - SYMBOL_REF_FUNCTION_P on AIX. - (current_file_function_operand): Same. - * config/rs6000/rs6000.md (call,call_value): Force non-function - symbol_ref into register on AIX. - -2003-05-02 Alan Modra - - * calls.c (struct arg_data): Move offset, slot_offset, size and - alignment_pad to struct locate_and_pad_arg_data. Update all refs. - (initialize_argument_information): Adjust call to locate_and_pad_parm. - Delete alignment_pad var. Don't calculate slot_offset here. - (emit_library_call_value_1): Delete alignment_pad, offset and size - vars. Use struct locate_and_pad_arg_data instead. Adjust refs. - Adjust call to locate_and_pad_parm. Don't tweak arg size for - partial in-regs here. Formatting fixes. - * expr.h (struct locate_and_pad_arg_data): New struct. - (locate_and_pad_parm): Adjust declaration. - * function.c (assign_parms): Localize vars. Use "locate" instead of - other arg location vars. Don't invoke FUNCTION_ARG or - FUNCTION_INCOMING_ARG unless pretend_named is different from - named_arg. Heed MUST_PASS_IN_STACK and set up "partial" before - calling locate_and_pad_parm. Adjust locate_and_pad_parm call. - Use slot_offset for stack home of reg parms. Correct test for - parm passed in memory. Formatting fixes. - (locate_and_pad_parm): Add "partial" to params. Replace offset_ptr - arg_size_ptr and alignment pad with "locate". Set slot_offset here. - Correct initial_offset_ptr handling. Localize vars. Always pad - locate->offset even when in_regs. - -2003-05-02 Nathan Sidwell - - * Makefile.in (TREE_H): Replace location.h with input.h. - (GTFILES) Remove location.h - (gt-lists.h): Replace gt-location.h with gt-input.h - * input.h (input_filename, input_line): Remove variables. - (location_s, location_t): Move from location.h. - (input_location): New. - (input_filename, input_line): New #defines. - * location.h: Remove. - * tree.h: Replace location.h with input.h. - (input_filename, input_line): Remove. - * diagnostic.h: Replace location.h with input.h. - * gcc.h (input_filename, input_filename_length): Remove declarations. - * toplev.c (input_filename, input_line): Remove. - (input_location): Define. - (push_srcloc, pop_srcloc): Adjust. - * diagnostic.c (diagnostic_report_current_module): Adjust. - -2003-05-02 Nick Clifton - - * configure.in: Add xstormy16 to list of targets that has a nop - instruction and hence which can be tested to see if the - assembler supports the --gdwarf2 switch. - * configure: Regenerate. - -2003-05-01 Falk Hueffner - - PR target/8257 - * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue, - alpha_start_function, alpha_expand_epilogue, unicosmk_gen_dsib): - Avoid undefined shifts by making the shift operand unsigned. - -2003-05-01 DJ Delorie - - * reload.c (find_reloads): Also check that all of a multi-reg - value is in the class. - -2003-05-01 Nathan Sidwell - - * scan.h (lineno): Revert the rename here. - -2003-05-01 Stan Shebs - - * config/darwin.c (darwin_encode_section_info): Call - default_encode_section_info. - -2003-05-01 David Edelsohn - - * config/rs6000/rs6000.md (define_attr "type"): Add mfjmpr. - (movsi_internal1): Use new mfjmpr attribute. - (movhi_internal): Same. - (movqi_internal): Same. - (movcc_internal1): Same. - (movdi_internal64): Same. - * config/rs6000/{40x.md,603.md,6xx.md,7450.md,7xx.md,mpc.md, - power4.md,rios1.md,rios2.md,rs64.md}: Add mfjmpr. - * config/rs6000/40x.md: Add fpu_405. - * config/rs6000/power4.md: Merge power4lsu and power4disp automata - into power4misc automata. Remove extraneous parentheses. - * config/rs6000/440.md: New file. - * config/rs6000/rs6000.c (processor_target_table): Add 440, - 440fp. Rename 405f to 405fp. - (function_arg_padding): Correct formatting. - (rs6000_rtx_costs): Add PROCESSOR_PPC440 cases. - -2003-05-01 Nathan Sidwell - - * input.h (lineno): Rename to ... - (input_line): ... here. - * tree.h (lineno): Rename to ... - (input_line): ... here. - * scan.h (lineno): Rename to ... - (input_line): ... here. - * toplev.c (lineno): Rename to ... - (input_line): ... here. - (push_srcloc, pop_srcloc): Rename lineno to input_line. - * c-common.c (c_expand_start_cond, fname_decl): Likewise. - * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, - store_parm_decls, c_expand_body_1): Likewise. - * c-errors.c (pedwarn_c99): Likewise. - * c-format.c (status_warning): Likewise. - * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. - * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. - * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. - * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, - gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, - genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, - genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, - build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, - prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. - * coverage.c (create_coverage): Likewise. - * diagnostic.c (pedwarn, sorry, error, fatal_error, - internal_error, warning, diagnostic_report_current_module, - inform): Likewise. - * expr.c (expand_expr): Likewise. - * integrate.c (expand_inline_function, - output_inline_function): Likewise. - * rtl-error.c (file_and_line_for_asm): Likewise. - * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, - walk_tree): Likewise. - * tree.c (make_node): Likewise. - * ada, cp, f, java, objc, treelang: Likewise. - * objc/objc-act.c (objc_init): Rename lineno to input_line. - (build_module_descriptor, build_selector_translation_table, - build_protocol_template, build_method_prototype_list_template, - build_category_template, build_selector_table, - build_class_template, build_super_template, build_ivar_template, - build_ivar_list_template, build_method_list_template, - build_method_template, add_instance_variable): Likewise. - - * dwarf2out.c (dwarf2out_init, dwarf2out_finish): Change parameter - name from input_filename. - -2003-04-30 Eric Christopher - Richard Sandiford - - * configure: Regenerate from patches below. - * combine.c (gen_lowpart_for_combine): Fix comment and add tests - for all symbolic operands. - * config/mips/mips.c: Migrate RTX_COSTS and CONST_COSTS - to function. - * config/mips/linux.h: Fix typo. - * Merge from mips-3_4-rewrite branch: - - 2003-04-07 Richard Sandiford - - * config/mips/mips.c (mips_classify_symbol): Add catch-all case for - handling local labels when TARGET_ABICALLS. - - 2003-04-04 Richard Sandiford - - * config/mips/mips-protos.h (mips_expand_epilogue): Add an - integer argument. - (mips_expand_call): Likewise. - * config/mips/mips.h (TARGET_SIBCALLS): New macro. - (FIXED_REGISTERS): Clear $31 entry. - (CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTER): Likewise. - (EPILOGUE_USES): Define. - * config/mips/mips.c (mips_function_ok_for_sibcall): New function. - (TARGET_FUNCTION_OK_FOR_SIBCALL): Use it. - (override_options): Add a 'j' register class. - (mips_expand_call): Handle sibcalls - (mips_expand_epilogue): Handle epilogues for sibcalls. - * config/mips/mips.md (epilogue): Adjust call to mips_expand_epilogue. - (sibcall_epilogue): New pattern. - (call, call_value): Adjust calls to mips_expand_call. - (sibcall, sibcall_value): New expanders. - (sibcall_internal, sibcall_value_internal): New patterns. - (sibcall_value_multiple_internal): New pattern. - - 2003-03-25 Richard Sandiford - - * config/mips/mips.md (extended_mips16): New attribute. - (define_attr length): Default to 8 if extended_mips16 == yes. - (truncdisi2): Set extended_mips16 to yes for the sll alternative. - (truncdihi2, truncdiqi2, *extendsidi2): Likewise. - (call_internal): Set extended_mips16 to yes for direct jumps. - Remove redundant mode attribute. - (call_value_internal, call_value_multiple_internal): Likewise. - (call_split): Remove redundant mode attribute. - (call_value_split, call_value_multiple_split): Likewise. - - * config/mips/mips.c (mips_symbol_insns): Rework. Fix handling - of unaligned offsets. - - * config/mips/mips.c (mips_splittable_symbol_p): Fix handling - of SYMBOL_GENERAL. - - 2003-03-22 Richard Sandiford - - * config/mips/mips.h (TARGET_EXPLICIT_RELOCS): Add commentary. - * config/mips/mips.c (override_options): Disable -mexplicit-relocs - for mips16 code. - - 2003-03-22 Richard Sandiford - - * config/mips/mips.h (ADDRESS_COST): Define. - - 2003-03-20 Richard Sandiford - - * config/mips/mips.h (EXTRA_CONSTRAINT): Give existing meaning of - 'R' to 'U'. Make 'R' mean a single-instruction memory reference. - * config/mips/mips.md: Replace 'R' constraints with 'U'. - - 2003-03-18 Richard Sandiford - - * config/mips/mips.md (truncdisi2): Add commentary. Use sll instead - of a two-instruction sequence. Add register->memory alternative. - (truncdihi2, truncdiqi2): Likewise. - Rework shift/truncate instructions so that they only handle right - shifts of 32 (or more, in the case of arithmetic shifts). - Add patterns for truncate/sign-extend. - - 2003-03-13 Richard Sandiford - - * configure.in (mips*-*-*): Check for explicit relocation support. - * configure: Regenerate. - - 2003-03-13 Richard Sandiford - - * config/mips/mips.h (TARGET_SWITCHES): Add -mexplicit-relocs - and -mno-explicit-relocs. - (MASK_EXPLICIT_RELOCS): Define. - (TARGET_EXPLICIT_RELOCS): Use it. - (mips_split_addresses): Remove declaration. - * config/mips/mips.c (override_options): Update comment for - mips_split_addresses. Clear MASK_EXPLICIT_RELOCS for non-PIC n64. - - 2003-03-13 Richard Sandiford - - * combine.c (gen_lowpart_for_combine): Treat the lowpart Pmode of - a CONST as identity. Check the return value of gen_lowpart_common. - - 2003-03-13 Richard Sandiford - - * config/mips/mips.c (mips_legitimize_symbol): Handle small data - references for TARGET_EXPLICIT_RELOCS. - (mips_reloc_string): Return "%gp_rel(" for RELOC_GPREL16 if - !TARGET_MIPS16. - - 2003-03-13 Richard Sandiford - - * config/mips/mips.md: Replace 'IQ' mips16 constraints with just 'Q'. - (addsi3): Remove redundant constraints. - (addsi3_internal): Use separate register & constant alternatives. - Use a 'Q' constraint and "addiu" insn for the latter. - (adddi3_internal_3, addsi3_internal_2): Likewise. - - 2003-03-13 Richard Sandiford - - * config/mips/mips-protos.h (mips_expand_unaligned_load): Declare. - (mips_expand_unaligned_store): Declare. - * config/mips/mips.c (mips_get_unaligned_mem): New fn. - (mips_expand_unaligned_load, mips_expand_unaligned_store): New fns. - * config/mips/mips.md (UNSPEC_ULW, UNSPEC_USW): Remove. - (UNSPEC_ULD, UNSPEC_USD): Remove. - (UNSPEC_LWL, UNSPEC_LWR, UNSPEC_SWL, UNSPEC_SWR): New. - (UNSPEC_LDL, UNSPEC_LDR, UNSPEC_SDL, UNSPEC_SDR): New. - (extv, extzv): Use mips_expand_unaligned_load. - (insv): Use mips_expand_unaligned_store. Use a reg_or_0_operand - predicate for operand 3. - (movsi_ulw, movsi_usw): Replace with... - (mov_lwl, mov_lwr, mov_swl, move_swr): ...these new insns. - (movdi_uld, movdi_usd): Likewise replace with... - (mov_ldl, mov_ldr, mov_sdl, move_sdr): ...these insns. - - 2003-02-26 Richard Sandiford - - * config/mips/mips-protos.h (mips_global_pic_constant_p): Declare. - * config/mips/mips.h (LEA_REGS): New register class. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Add entries for it. - (GR_REG_CLASS_P): Include LEA_REGS. - (DANGEROUS_FOR_LA25_P): New macro. - (EXTRA_CONSTRAINT): Add !DANGEROUS_FOR_LA25_P to R's condition. - Add a T constraint for the DANGEROUS_FOR_LA25_P case. - * config/mips/mips.c (mips_regno_to_class): Change GR_REGS - entries to LEA_REGS. - (mips_global_pic_constant_p): New function. - (override_options): Add 'e' register constraint. - (mips_secondary_reload_class): Return LEA_REGS when reloading - a dangerous constant into a class containing $25. - * config/mips/mips.md (movdi_internal2): Add an e <- T alternative. - (movsi_internal): Likewise. - - 2003-02-23 Richard Sandiford - - * config/mips/mips.h (TARGET_SPLIT_CALLS): New macro. - * config/mips/mips.md (call_split): New insn. - (call_value_split, call_value_multiple_split): New insns. - (call_internal): Turn into a define_insn_and_split. Split the - instruction into a call and $gp load if TARGET_SPLIT_CALLS. - (call_value_internal, call_value_multiple_internal): Likewise. - - 2003-02-23 Richard Sandiford - - * config/mips/mips.c (mips_reloc_string): Return "%got(" for - RELOC_GOT_PAGE and RELOC_GOT_DISP if !TARGET_NEWABI. - (mips_encode_section_info): Don't take symbol visibility into - account if TARGET_ABICALLS. Add more commentary. - * config/mips/mips.md: Add commentary above reloc constants. - - 2003-02-12 Richard Sandiford - - * config/mips/mips.c (mips_legitimize_const_move): New, extracted - from mips_legitimize_move. Legitimize constant pool references. - (mips_legitimize_move): Call mips_legitimize_const_move. Attach - a REG_EQUAL note to the last instruction. - - 2003-02-11 Richard Sandiford - - * config/mips/mips-protos.h (mips_simplify_dwarf_addr): Declare. - * config/mips/mips.h (TARGET_EXPLICIT_RELOCS, TARGET_NEWABI): New. - (ASM_SIMPLIFY_DWARF_ADDR): Define to mips_simplify_dwarf_addr. - (EXTRA_CONSTRAINT): Allow symbolic call addresses for TARGET_ABICALLS. - * config/mips/mips.md (UNSPEC_HIGH): New constant. - (UNSPEC_RELOC_GPREL16): Rename to... - (RELOC_GPREL16): ...this. - (RELOC_GOT_HI, RELOC_GOT_LO, RELOC_GOT_PAGE, RELOC_GOT_DISP): New. - (RELOC_CALL16, RELOC_CALL_HI, RELOC_CALL_LO): New. - (macro_calls): New attribute. - (length): Use it to set the default length of calls. Don't allow - calls to have delay slots if macro_calls is "yes". - (luisi, luidi): New patterns. - (lowsi, lowdi): Use '%R' to print the relocation. - (lowdi_extend): Remove. - (loadgp): Remove mode from operand 0. Use '%0' instead of '%a0'. - (call_internal): Merge alternatives. Always use "jal". - (call_value_internal, call_value_multiple_internal): Likewise. - (reloc_gprel16): Remove. - * config/mips/mips.c (mips_got_alias_set): New variable. - (mips_classify_constant): Handle the new relocation constants. - (mips_classify_symbol): Reverse the sense of SYMBOL_REF_FLAG for PIC. - (mips_symbolic_address_p): Return false if generating explicit relocs. - Otherwise allow local PIC symbols to have an offset. - (mips_splittable_symbol_p): New function. - (mips_classify_address): Use it to check whether a LO_SUM is valid. - (mips_const_insns): Always accept HIGH. - (call_insn_operand): Don't accept global symbols if using explicit - relocs. - (move_operand): Don't accept HIGH when generating PIC. - (mips_reloc, mips_lui_reloc): New functions. - (mips_force_temporary): Remove MODE argument. Expect VALUE to - be a valid right-hand-side for a SET pattern. - (mips_load_got, mips_load_got16, mips_load_got32): New functions. - (mips_emit_high): New function. - (mips_legitimize_symbol): Use mips_reloc for the mips16 gp-relative - case. Use mips_splittable_symbol_p to check whether a LO_SUM - address should be used. Use mips_emit_high to generate the - high part of such an address. Adjust the global symbol + offset - case to match the change to mips_force_temprorary. - (mips_legitimize_move): Shuffle call to mips_legitimize_symbol. - If generating explicit-reloc PIC, load the address of global - symbols from the GOT. Use mips_emit_high to emit the high part - of an address. - (mips_simplify_dwarf_addr): New function. - (mips_move_1word): Use lwc1 instead of l.s and swc1 instead of s.s. - (mips_move_2words): Likewise ldc1/l.d and sdc1/s.d if TARGET_64BIT. - (mips_expand_call): Load the addresses of global functions using - %call* relocs if generating explicit-reloc PIC. Don't generate - an exception_receiver pattern. - (override_options): Initialize mips_got_alias_set. - (print_relocation): Remove in favor of... - (mips_reloc_string): ...this new function. - (print_operand): Handle '%R'. Use mips_reloc_string. - (print_operand_address): Use print_operand to print the symbolic - part of a LO_SUM address. - (mips_output_function_prologue): Use .cprestore, reverting last patch. - (mips_encode_section_info): Factor out DECL_RTL accesses. Reverse - sense of SYMBOL_REF_FLAG for PIC, using binds_local_p to check - for local symbols. - - 2003-02-02 Eric Christopher - - * config/mips/mips.c (mips_sign_extend): Remove. - * config/mips/mips-protos.h: Ditto. - * config/mips/mips.md (movdi_internal2_extend): Remove. - (extendsidi2): Fix mode of convert_memory_address. - - 2003-01-24 Eric Christopher - - * config/mips/mips.md: Rewrite zero_extend* and extend* - patterns. Use explicit instructions and split after reload - for register extensions. - (ashlsi3_internal1_extend): New combiner pattern for - shift and extend combinations. - * config/mips/mips.h: Change Pmode back to ptr_mode - for performance enhancement. - * combine.c (expand_compound_operation): Make sure - that zero_extend operation is profitable. - - 2003-01-14 Richard Sandiford - - * config/mips/mips.h (TRAMPOLINE_TEMPLATE): Make size of stored - addresses depend on ptr_mode rather than Pmode. - (TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT): Update acoordingly. - (INITIALIZE_TRAMPOLINE): Rework to handle Pmode != ptr_mode. - (CASE_VECTOR_MODE): Use ptr_mode for !TARGET_MIPS16. - (ASM_OUTPUT_ADDR_VEC_ELT): Update accordingly. - * config/mips/mips.md (tablejump): Likewise. Remove Pmode - condition for selecting cpaddsi or cpadddi: use cpadd instead. - (tablejump_internal1): Remove condition. - (tablejump_internal2): Change condition to TARGET_64BIT. - (cpaddsi): Rename to... - (cpadd): ...this. - (cpadddi): Remove. - - 2003-01-09 Richard Sandiford - - * config/mips/mips-protos.h (mips16_constant_after_function_p, - mips_address_cost, mips_check_split, double_memory_operand, - mips16_gp_offset, mips16_gp_offset_p, mips16_constant, - pic_address_needs_scratch, symbolic_operand): Remove declarations. - (mips_legitimate_address_p): Return bool. - (mips_address_insns, mips_fetch_insns, mips_const_insns, - mips_legitimize_address, mips_legitimize_move, - mips_expand_call): Declare. - (mips_return_addr): Move outside #ifdef RTX_CODE. - - * config/mips/mips.h (ABI_HAS_64BIT_SYMBOLS): New macro. - (PIC_FN_ADDR_REG): New reg_class. - (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Add corresponding entries. - (GR_REG_CLASS_P): True for PIC_FN_ADDR_REG. - (SMALL_OPERAND, SMALL_OPERAND_UNSIGNED, LUI_OPERAND, - CONST_HIGH_PART, CONST_LOW_PART, LUI_INT): New macros. - (SMALL_INT, SMALL_INT_UNSIGNED, CONST_OK_FOR_LETTER_P): Use new macros. - (EXTRA_CONSTRAINTS): Give new meanings to Q, R and S. - (CONSTANT_ADDRESS_P): Use mips_legitimate_address_p. - (LEGITIMATE_PIC_OPERAND): Undefine. - (LEGITIMATE_CONSTANT_P): Use mips_const_insns. - (LEGITIMIZE_ADDRESS): Use mips_legitimize_address. - (CONSTANT_AFTER_FUNCTION_P): Remove definition in #if 0 block. - (FUNCTION_MODE): Change to SImode. - (CONST_COSTS): Use mips_const_insns to calculate the cost of - most constants. Treat const_artih_operands specially if they - occur in a PLUS or MINUS. - (CONSTANT_POOL_COST): New macro. - (RTX_COSTS): Use mips_address_insns for MEMs, with a base cost of 2. - Add LO_SUM handling. - (ADDRESS_COST): Undefine. - (PREDICATE_CODES): Add symbolic_operand and const_arith_operand. - Add CONST to the list of codes for arith_operand. Add LABEL_REF - to call_insn_operand and remove CONST_INT. - - * config/mips/mips.c: Include integrate.h. - (SINGLE_WORD_MODE_P): New macro. - (mips_constant_type, mips_symbol_type, mips_address_type): New enums. - (mips_constant_info, mips_address_info): New structs. - (mips_regno_to_class): Map $25 to PIC_FN_ADDR_REG. - (mips_classify_constant, mips_classify_symbol, - mips_valid_base_register_p, mips_symbolic_address_p, - mips_classify_address, mips_symbol_insns, - mips16_unextended_reference_p, mips_address_insns, mips_const_insns, - mips_fetch_insns, mips_force_temporary, mips_add_offset, - mips_legitimize_symbol, mips_legitimize_address, mips_legitimize_move, - mips_print_relocation): New functions. - (const_arith_operand): New operand predicate. - (arith_operand): Use it. - (mips_const_double_ok, mips16_simple_memory_operand, - simple_memory_operand, double_memory_operand, mips_check_split, - mips_address_cost, pic_address_needs_scratch, mips16_gp_offset, - mips16_gp_offset_p, mips16_output_gp_offset, - mips16_constant_after_function_p, mips16_constant): Remove. - (call_insn_operand): Be more fussy about symbolic constants. - Use register_operand. - (move_operand): Use mips_symbolic_address_p to check symbolic - operands and general_operand to check the rest. - (symbolic_operand): Use mips_classify_constant. - (mips_legitimate_address_p): Use mips_classify_address. - (mips_move_1word): Combine handling of symbolic addresses. - Remove special treatment of gp-relative loads for TARGET_MIPS16. - (move_move_2words): Likewise. Assume addresses are offsettable - if they need to refer to more than one word. Add HIGH handling. - (mips_restore_gp): Use ptr_mode for the GP save slot. - (mips_expand_call): New function, combining the old mips.md - call and call_internal define_expands. If the address isn't - a call_insn_operand, force it into a register. For SVR4 PIC, - emit an exception_receiver instruction after the call. - (override_options): Only override flag_pic for TARGET_ABICALLS - if it is currently zero. Allow mips_split_addresses when - Pmode == DImode too, except when ABI_HAS_64BIT_SYMBOLS. - Add new register class letter, 'c'. - (print_operand): Use mips_classify_constant for constant operands. - (print_operand_address): Use mips_classify_address. - (mips_output_function_prologue): Don't use .cprestore. - (mips_expand_epilogue): For TARGET_MIPS16, only adjust the stack - via the frame pointer if current_function_calls_eh_return. - (mips_encode_section_info): For TARGET_ABICALLS, use SYMBOL_REF_FLAG - to mark whether a symbol is local or global. - (build_mips16_call_stub): Expect the address of the function rather - than a MEM reference to it. Update call generation sequences. - (mips16_optimize_gp): Remove Pmode checks. Temporarily disable - small-data adjustments. - - * config/mips/mips.md: Remove 'R'/'m' memory distinction. Use default - length for loads and stores. - (UNSPEC_CPADD, UNSPEC_RELOC_GPREL16): New constants. - (define_attr type): Add const and prefetch. - (define_attr length): Use mips_const_insns for const instructions. - Use mips_fetch_insns for load and store instructions. - (define_attr single_insn): New. - (define_attr can_delay): Use it. - (define_attr abicalls): Remove. - (define_delay): Use can_delay. Always allow calls to have delay slots. - (addsi3_internal_2): Add 'Q' constraint. - (movsi_ulw, movsi_usw, movdi_uld, movdi_usd): Set length to 8. - (high): Remove. - (lowsi): Renamed from low. - (lowdi): New pattern. - (movdi, movsi): Use mips_legitimize_move. Remove define_split. - (lwxc1, ldxc1, swxc1, sdxc1): Set length to 4. - (loadgp): Change operand 0 to an immediate_operand. - (tablejump): Use the same patterns for SVR4 PIC but emit a cpadd - beforehand. - (cpaddsi, cpadddi): New patterns. - (tablejump_internal3, tablejump_internal4): Remove define_expands - and associated define_splits. - (call, call_value): Use mips_expand_call. - (call_internal): New, replacing all existing call_internal* insns. - (call_value_internal): Likewise call_value_internal*. - (call_value_multiple_internal): Likewise call_value_multiple_internal*. - (untyped_call): Remove if (operands[0]) magic. - (prefetch_si_address, prefetch_si): Change type to "prefetch". - (prefetch_di_address, prefetch_di): Likewise. - (leasi, leadi): Remove. - (reloc_gprel16): New. - - * config/mips/5400.md (ir_vr54_hilo): Include const type. - * config/mips/5500.md (ir_vr55_hilo): Likewise. - * config/mips/sr71k.md (ir_sr70_hilo): Likewise. - - 2003-01-08 Eric Christopher - - * config.gcc (mipsisa32*): Change ABI_MEABI to ABI_EABI. - * config/mips/elf.h (STARTFILE_SPEC): Remove ABI_MEABI references and - configure check for libgloss. - * config/mips/elf64.h: Ditto. - * config/mips/mips.c: Remove ABI_MEABI. - * config/mips/mips.h: Ditto. - - 2002-11-05 Richard Sandiford - - Fix merge fallout. - * config/mips/mips.md (mul_acc_si): Reapply 2002-10-16 change. - (muldi3_internal): Remove outdated comment. - (*muls_di, *umuls_di): Fix comment and 64-bitness. - (*smsac_di, *umsac_di): Likewise. Reformat. - (umulsi3_highpart): Minor formatting tweaks. - (umulsi3_highpart_internal): Use only if !ISA_HAS_MULHI. Remove - redundant scratch operand. Minor formatting tweak. - (umulsi3_highpart_mulhi_internal): Use for !TARGET_64BIT as well. - (umulsi3_highpart_neg_mulhi_internal): Likewise. Fix asm template. - (smulsi3_highpart): As for the unsigned version. - (smulsi3_highpart_internal): Likewise. - (smulsi3_highpart_mulhi_internal): Likewise. - (smulsi3_highpart_neg_mulhi_internal): Likewise. - (smuldi3_highpart, umuldi3_highpart): Minor formatting tweaks. - (*smul_acc_di): Remove duplicated pattern. - (*umul_acc_di, *smul_acc_di): Reapply 2002-10-16 change. - (anddi3) [unnamed mips16 pattern]: Remove reintroduced length. - (zero_extendsidi2_internal2): Remove new, but commented-out pattern. - - 2002-10-22 Eric Christopher - - * config/mips/mips-protos.h (mips_return_addr): New. - * config/mips/mips.c (mips_return_addr): New. - (movdi_operand): Remove. - (se_register_operand): Ditto. - (se_reg_or_0_operand): Ditto. - (se_uns_arith_operand): Ditto. - (se_arith_operand): Ditto. - (se_nonmemory_operand): Ditto. - (extend_operator): Ditto. - (highpart_shift_operator): Ditto. - (mips_initial_elimination_offset): Remove return address pointer - elimination. - (mips_reg_names): Remove $ra. - (mips_regno_to_class): Ditto. - * config/mips/mips.h (POINTER_SIZE): Define based on TARGET_LONG64 - and TARGET_64BIT. - (POINTER_BOUNDARY): Remove. - (POINTERS_EXTEND_UNSIGNED): Define to 0. - (PROMOTE_MODE): Promote to Pmode. - (SHORT_IMMEDIATES_SIGN_EXTEND): Define. - (Pmode): Define to TARGET_64BIT. - (FUNCTION_MODE): Define as Pmode. - (mips_args): Remove deleted functions. - (SIZE_TYPE): Depend on POINTER_SIZE. - (PTRDIFF_TYPE): Ditto. - (FIXED_REGISTERS): Fix extra registers. - (CALL_USED_REGISTERS): Ditto. - (CALL_REALLY_USED_REGISTERS): Ditto. - (RAP_REG_NUM): Remove. - (RETURN_ADDRESS_POINTER_REGNUM): Ditto. - (RETURN_ADDR_RTX): Define to mips_return_addr. - (ELIMINABLE_REGS): Remove RETURN_ADDRESS_POINTER_REGNUM. - (CAN_ELIMINATE): Ditto. - * config/mips/mips.md: For DImode patterns, take into account - deletions above. Split mulsidi patterns into sign_extend and - zero_extend. - - 2002-10-16 Richard Sandiford - Michael Meissner - - * config/mips/mips.h (ISA_HAS_MACC): True for normal-mode vr4120 code. - * config/mips/mips.md (mulsi3_mult3): Add a define_peephole2 to - mop up unnecessarly moves through LO. - (*mul_acc_si): Remove vr5400 and vr5500 handling from here. - (*macc): New pattern for ISA_HAS_MACC. Add define_peephole2s to - change mtlo/macc sequences into mul/add sequences when a three- - address mul is available. - (*macc2): New pattern. Add a define_peephole2 to generate it. - (*mul_sub_si): Fix contraint for operand 5. - (*muls): Use in 32-bit code as well. - (*msac): Likewise. Use msub instead of msac in vr5500 code - if the destination is LO. Remove duplicate define_split. - (*muls_di): Use only in 32-bit code. Adjust rtl accordingly. - (*msac_di): Likewise. Fix formatting. - (smulsi3_highpart, umulsi3_highpart): Use mulhi in 32-bit code too. - (*xmulsi3_highpart_internal): Use only if !ISA_HAS_MULHI. - (*xmulsi3_highpart_mulhi): Use even if !TARGET_64BIT. - (*xmulsi3_neg_highpart_mulhi): Likewise. - (*mul_acc_64bit_di): Remove. - (*mul_acc_di): Use only in 32-bit code. Handle ISA_HAS_MACC as well. - - 2002-10-14 Richard Sandiford - - * config/mips/vr.h (DRIVER_SELF_SPECS): Define. - * config/mips/t-vr (MULTILIB_OPTIONS): Remove mlong32. - (MULTILIB_DIRNAMES): Remove long32. - (MULTILIB_EXCEPTIONS): Don't build -mabi=32 -mgp32 multilibs. - (MULTILIB_REDUNDANT_DIRS): Remove. - - 2002-10-14 Richard Sandiford - - * doc/tm.texi (DRIVER_SELF_SPECS): Document. - * gcc.c (driver_self_specs): New variable. - (do_self_spec): New function. - (main): Use it to process driver_self_specs. - - 2002-10-09 Richard Sandiford - - * config/mips/mips.md (one_cmpldi2): Use only if TARGET_64BIT. - Remove DImode define_split for !TARGET_64BIT. - (anddi3): Remove !TARGET_64BIT support from here as well. - Change operand 2's predicate to se_uns_arith_operand. - Add constant alternatives to define_insn. - (iordi3, xordi3, *nordi3): Likewise. - (anddi3_internal1, xordi3_immed): Remove. - - 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. - - -2003-04-30 Diego Novillo - - * builtins.def (BUILTIN_CONSTANT_P): Mark as constant. - -2003-04-30 Geoffrey Keating - - * tree-inline.c (inlinable_function_p): Back out last change, it's - unnecessary. - -2003-04-30 Steven Bosscher - - * ggc-page.c (TREE_EXP_SIZE): Define. - (extra_order_size_table): New entry for expr trees with - two operands. - -2003-04-30 Gabriel Dos Reis - - * c-common.c (if_elt): Use location_t in lieu of "file, line" pair. - (c_expand_start_cond): Adjust. - (c_expand_end_cond): Don't use warning_with_file_and_file. - (shadow_warning): Likewise. - -2003-04-30 Nathan Sidwell - - * tree.h (DECL_POINTER_DEPTH): Remove. - (struct tree_decl): Remove pointer_depth. - -2003-04-30 Janis Johnson - - * config/rs6000/linux64.h (ASM_OUTPUT_LABELREF): Remove. - * config/rs6000/rs6000.c (rs6000_elf_strip_name_encoding): Remove. - (rs6000_xcoff_encode_section_info): Remove. - (current_file_function_operand): Use SYMBOL_REF_FLAGS; fix latent bug. - (rs6000_output_mi_thunk): Remove dead code; use SYMBOL_REF_FLAGS. - (small_data_operand, rs6000_emit_move, rs6000_elf_in_small_data_p,): - Use SYMBOL_REF_FLAGS. - (rs6000_elf_encode_section_info): Call default_encode_section_info for - generic flags, use SYMBOL_REF_FLAGS; code cleanups. - * sysv4.h (TARGET_STRIP_NAME_ENCODING, ASM_OUTPUT_LABELREF): Remove. - (SYMBOL_FLAG_SMALL_V4, SYMBOL_REF_SMALL_V4_P): New. - * xcoff.h (TARGET_ENCODE_SECTION_INFO): Remove. - (ASM_DECLARE_FUNCTION_NAME): Remove setting of SYMBOL_REF_FLAG. - -2003-04-30 Gabriel Dos Reis - - * diagnostic.c (output_pointer): Use HOST_PTR_PRINTF. - -2003-04-30 Andreas Schwab - - * doc/extend.texi (Other Builtins): Enclose multiple word data - type in braces for @deftypefn. - -2003-04-30 Richard Kenner - - * stor-layout.c (mode_for_size_tree): Use BLKmode if SIZE overflows. - - * doc/install.texi (--enable-threads): Document "gnat" option. - -2003-04-30 Gabriel Dos Reis - - * diagnostic.h (output_formatted_scalar): Tweak. - * diagnostic.c (output_long_decimal): Likewise. - (output_unsigned_decimal): Likewise. - (output_long_unsigned_decimal): Likewise. - (output_octal): Likewise. - (output_long_octal): Likewise. - (output_hexadecimal): Likewise. - (output_long_hexadecimal): Likewise. - (output_pointer): New function. - (output_format): Use it. Recognize "%p" format specifier. - -2003-04-30 Zdenek Dvorak - - * function.c (purge_addressof_1): Postpone insn in fewer cases. - -2003-04-29 Geoffrey Keating - - * config/rs6000/host-darwin.c (segv_handler): When -dH is used, - call abort() after running out of stack space. - - * c-typeck.c (function_types_compatible_p): Ignore incompatible - 'volatile' qualifiers on a function's return type in GNU mode. - -2003-04-29 Aldy Hernandez - - * expr.c (emit_group_load): Dump parallels of simd types to - memory. - -2003-04-29 Vladimir Makarov - - * genautomata.c (add_vect): Check undefined value for range type - too. - -2003-04-29 Phil Edwards - - * configure.in: More general test for cmp --ignore-initial. - * configure: Regenerate. - -2003-04-29 Richard Kenner - - * stor-layout.c (mode_for_size_tree): Use tree_low_cst. - (layout_decl, place_field): Likewise. - Also make minor type and whitespace changes. - - * tree.c (save_expr): Don't fold a COMPONENT_REF. - -2003-04-29 Olivier Hainque - - * calls.c (expand_call): When modes of target and valreg match, force - sibcall failure when target is a MEM. - -2003-04-29 Geoffrey Keating - - * tree-inline.c (inlinable_function_p): Don't support inlining - functions using varargs. - - * doc/invoke.texi (Overall Options): Mention -x objective-c-header. - - * dwarf2out.c (output_call_frame_info): No need to output EH - unwind information if all_throwers_are_sibcalls. - - * c-semantics.c (expand_unreachable_stmt): Return a tree. - (expand_stmt): Update for change to expand_unreachable_stmt. - (expand_unreachable_if_stmt): Likewise. - - * Makefile.in (quickstrap): Pass BOOT_CFLAGS to submake. - -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. - -2003-04-29 Bob Wilson - - * config/xtensa/elf.h (SIZE_TYPE, PTRDIFF_TYPE, USER_LABEL_PREFIX): - Remove redundant macros. - (WCHAR_TYPE, WCHAR_TYPE_SIZE): Change to "short unsigned int". - (LOCAL_LABEL_PREFIX): Define unconditionally. - (NO_DOT_IN_LABEL): Clarify comment. - * config/xtensa/linux.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Add explicit - definition to "long int". - -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 Zack Weinberg - - * tree.h: Delete no-checking definition of CST_OR_CONSTRUCTOR_CHECK. - -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 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 Zack Weinberg - - * tree.h (TREE_CST_RTL, CST_OR_CONSTRUCTOR_CHECK): Delete. - (struct tree_int_cst, struct tree_real_cst, struct tree_string, - struct tree_complex, struct tree_vector): Remove RTL field. - (CONSTRUCTOR_ELTS): Use elt 0. - * tree.def (CONSTRUCTOR): Delete first of its two operands. - * varasm.c (output_constant_def): Remove early exit if - TREE_CST_RTL is set. Don't set TREE_CST_RTL. - (decode_addr_const): Don't mention TREE_CST_RTL in comment. - * target.h (select_section): Don't mention TREE_CST_RTL in comment. - * doc/tm.texi (encode_section_info): Don't talk about TREE_CST_RTL. - -2003-04-28 Jakub Jelinek - - * c-decl.c (finish_decl): When prototype with asmspec is found - for built-in, adjust built_in_decls as well as expr.c decls. - * expr.c (init_block_move_fn, init_block_clear_fn): New functions. - (emit_block_move_libcall_fn, clear_storage_libcall_fn): Use it. - * expr.c (init_block_move_fn, init_block_clear_fn): New prototypes. - -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/x86-64.h (NO_PROFILE_COUNTERS, HAVE_AS_DWARF2_DEBUG_LINE): - Define as 1. - -2003-04-28 David O'Brien - - * config/i386/i386.h (builtin_define): Add __amd64 and __amd64__. - -2003-04-28 Jakub Jelinek - - * builtins.def (BUILT_IN_BCOPY, BUILT_IN_MEMMOVE): New. - * builtin-types.def (BT_FN_VOID_CONST_PTR_PTR_SIZE): New. - * builtins.c (expand_builtin_memmove, expand_builtin_bcopy): New - functions. - (expand_builtin): Handle BUILT_IN_BCOPY and BUILT_IN_MEMMOVE. - -2003-04-28 Nick Clifton - - * config/arm/elf.h (ASM_OUTPUT_ALIGNED_COMMON): Remove definition. - -2003-04-27 Zack Weinberg - - * expr.c (expand_expr ): Always call - output_constant_def, use its result instead of TREE_CST_RTL (exp). - Can assume it has the form (mem (symbol_ref ".LCxxx")). - (expand_expr ): Can always just extract the - relevant field of a CONSTRUCTOR. - (expand_expr ): Make control flow explicit. - * varasm.c (output_constant_def): Can look at TREE_CST_RTL of - an INTEGER_CST. - -2003-04-27 Kazu Hirata - - * reload1.c (reg_set_luid): Fix a comment typo. - -2003-04-27 Zack Weinberg - - * varasm.c (const_str_htab_hash, const_str_htab_eq, STRHASH, - struct deferred_string, const_str_htab): Kill. - (n_deferred_strings): New static variable. - (build_constant_desc): Set SYMBOL_REF_DECL of the new - symbol_ref to point to the constant. - (output_constant_def): When a deferred string is forced out, - just clear STRING_POOL_ADDRESS_P and decrement n_deferred_strings. - (mark_constant): Likewise. - (maybe_output_constant_def_contents): When deferring a string - constant, just set STRING_POOL_ADDRESS_P and increment - n_deferred_strings. - (mark_constant_pool): Check n_deferred_strings, not the size - of const_str_htab. - (init_varasm_once): No need to create const_str_htab. - - * rtl.def, rtl.h, doc/rtl.texi: Document possibility that - SYMBOL_REF_DECL points to a constant. - -2003-04-26 Zack Weinberg - - * varasm.c (output_constant_def): Split out two new static - functions, build_constant_desc and maybe_output_constant_def_contents. - Restructure for comprehensibility. Don't call - output_addressed_constants. Treat defstr being non-NULL for - STRING_POOL_ADDRESS_P constants as an invariant. - (struct deferred_string): Remove labelno field. - (output_constant_def_contents): Kill labelno argument. Call - output_addressed_constants here. Use ASM_OUTPUT_LABEL, not - asm_out.internal_label. - (mark_constant): Update call to output_constant_def_contents. - Treat defstr being non-NULL for STRING_POOL_ADDRESS_P - constants as an invariant. - -2003-04-26 Richard Henderson - - * config/i386/i386.c (output_pic_addr_const): Use SYMBOL_REF_LOCAL_P. - (ix86_expand_call, ix86_rtx_consts): Likewise. - -2003-04-26 Kaveh R. Ghazi - - * doc/md.texi (cmpstr): Document additional restrictions. - -2003-04-26 Neil Booth - - * flags.h (time_report): Remove. - * timevar.c (timevar_enable): New. - (TIMEVAR_ENABLE): Remove, use timevar_enable. - (timevar_init): Rename from init_timevar. - * timevar.h (timevar_init): Rename from init_timevar. - * toplev.c (time_report): Make static. - (do_compile): Conditionally call init_timevar first. - (preprocess_options): Move some code to do_compile. - -2003-04-26 Stephane Carrez - - * doc/install.texi (Binaries): Mention binaries for HC11/HC12. - -2003-04-26 Neil Booth - - * _cpp_lex_direct: Remove pointless code. - -2003-04-26 Stephane Carrez - - * doc/extend.texi (Function Attributes): Document "near" and "far" - for 68HC11 and 68HC12. - -2003-04-25 Richard Kenner - - * expr.c (store_field): When making temporary for store, don't - make it TYPE_QUAL_CONST. - -2003-04-25 Phil Edwards - - * toplev.c (read_integral_parameter): Use "argument" in error - message to distinguish it from actual invalid options. - -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 H.J. Lu - - * config/ia64/ia64.c (ia64_expand_compare_and_swap): Add rmode - for return mode. - (ia64_expand_builtin): Set rmode to SImode for - IA64_BUILTIN_BOOL_COMPARE_AND_SWAP_SI, - IA64_BUILTIN_VAL_COMPARE_AND_SWAP_SI and - IA64_BUILTIN_BOOL_COMPARE_AND_SWAP_DI. Set remode to DImode - for IA64_BUILTIN_VAL_COMPARE_AND_SWAP_DI. - -2003-04-25 Phil Edwards - - * configure.in (make_compare_target): Test for GNU cmp and set this - variable appropriately. - * Makefile.in (compare, compare3, compare4, compare-lean, compare3-lean, - compare4-lean): Rename actual targets to slowcompare*. New compare* - targets depend on names based on make_compare_target. - * configure: Regenerated. - -2003-04-25 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-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. - -2003-04-26 Ben Elliston - - * config/arm/arm.c (arm_adjust_cost): Correct logic that tests the - return values from recog_memoized(). - -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 Neil Booth - - * cpplex.c (cpp_token_len): Tighten up. - (cpp_token_as_text): Need extra byte now. - * cpplib.c (glue_header_name): Need extra 2 bytes. - * cppmacro.c (cpp_macro_definition): Need extra byte. - -2003-04-24 Alexander Kabaev - - * 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. - -Thu Apr 24 20:42:12 CEST 2003 Jan Hubicka - - * i386.md (cvtsi2sdq): Fix typo in previous patch. - -2003-04-24 Krister Walfridsson - - * configure.in: Check whether mbstowcs works. - * configure, config.in: Regenerate. - * intl.c: Use HAVE_WORKING_MBSTOWCS. - -2003-04-24 H.J. Lu - - * config/ia64/ia64.c (ia64_init_builtins): Add si_ftype_pdi_di_di - for __sync_bool_compare_and_swap_di for int return type. - - * config/ia64/ia64intrin.h (__sync_bool_compare_and_swap_di): - Change return type to int. - (__sync_bool_compare_and_swap): Likewise. - -Thu Apr 24 16:55:26 CEST 2003 Jan Hubicka - - * cfgbuild.c (make_edges): Do not use next_nonnote_insn when - looking for fallthru edge. - - * athlon.md (athlon-agu, athlon-store, athlon-fany, athlon-faddmul): - Fix. - (athlon-load2, athlon-store2, athlon-fpsched, athlon-fpload, - athlon-fvector): New. - (athlon_*): Revisit to match new optimization guide. - * i386.c (ix86_adjust_cost): Fix memory operand costs on Athlon/k8 - * i386.md (cvt??2?? patterns): Fix modes. - (fistp patterns): Set modes. - - Accidentaly commited with my earlier reload patch: - PR c/10308 - * reload.c (find_reloads_address_1): Reload plus at the place of - index register. - -2003-04-24 Nathan Sidwell - - New GCOV_TAG_FUNCTION layout - * coverage.c (struct function_list): Replace name with ident. - (struct counts_entry): Likewise. - (fn_ident): New. - (htab_counts_entry_hash, htab_counts_entry_eq, - htab_counts_entry_del): Adjust. - (reads_count_file, get_coverage_counts, - coverage_begin_output, coverage_end_function): Adjust. - (build_fn_info_type, build_fn_info_value): Likewise. - * gcov-dump.c (tag_function): Adjust. - * gcov-io.c (gcov_write_string, gcov_read_string): Not in LIBGCOV. - * gcov-io.h (gcov_write_string, gcov_read_string): Not in LIBGCOV. - * gcov.c (struct function_info): Add ident. - (read_graph_file, read_count_file): Adjust. - * libgcov.c (gcov_exit): Adjust. - -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 Neil Booth - - * Makefile.in (c-lex.o, LIBCPP_OBJS, cpplex.o): Update. - * c-lex.c (MULTIBYTE_CHARS): Remove conditionals. - (lex_string): Take cpp_string with full spelling. - (cb_ident): Update. - (c_lex): Update diagnostics. - * cpplex.c (SPELL_NUMBER, SPELL_STRING): Combine into SPELL_LITERAL. - (create_literal): New. - (lex_string): Unterminated literals have type CPP_OTHER. - (_cpp_lex_direct): Update calls to lex_string. Use create_literal - for CPP_OTHER. - (cpp_token_len, cpp_spell_token, cpp_output_token): Simplify. - (_cpp_equiv_tokens, cpp_interpret_charconst): Update. - * cpplib.c (parse_include, do_line, do_linemarker, - destringize_and_run): Update for token storing full spelling. - * cpplib.h: Update token spelling types. - * cppmacro.c (stringify_arg, check_trad_stringification): - Update for token storing full spelling. - -2003-04-23 Ulrich Weigand - - * config/s390/s390.c (s390_expand_cmpstr): Disable CLC loop. - -2003-04-23 Richard Earnshaw - - * arm.h (TARGET_OPTIONS): Add value field. - -2003-04-23 Mark Mitchell - - * doc/extend.texi: Remove duplicate 2003 copyright date. - -2003-04-23 Nathan Sidwell - - * Makefile.in (LIBGCC_DEPS): Add gcov headers. - (libgcov.a): Depends on LIBGCC_DEPS. - * basic-block.h (profile_info): Moved here from coverage.h. Made - a pointer. - * coverage.c (struct function_list): Fixed array of counter types. - (struct counts_entry): Keyed by counter type, contains summary. - (profile_info): Moved to profile.c. - (prg_ctr_mask, prg_n_ctrs, fn_ctr_mask, fn_n_ctrs): New global - vars. - (profiler_label): Remove. - (ctr_labels): New. - (set_purpose, label_for_tag, build_counter_section_fields, - build_counter_section_value, build_counter_section_data_fields, - build_counter_section_data_values, build_function_info_fields, - build_function_info_value, gcov_info_fields, gcov_info_value): Remove. - (build_fn_info_type, build_fn_info_value, build_ctr_info_type, - build_ctr_info_value, build_gcov_info): New. - (htab_counts_entry_hash, htab_counts_entry_eq): Adjust. - (reads_counts_file): Adjust. - (get_coverage_counts): Takes counter number. Add summary - parameter. Adjust. - (coverage_counter_ref): Tkaes counter number. Adjust. Lazily - create counter array labels. - (coverage_end_function): Adjust. - (create_coverage): Adjust. - (find_counters_section): Remove. - * coverage.h (MAX_COUNTER_SECTIONS): Remove. - (struct section_info, struct profile_info): Remove. - (profile_info): Moved to basic-block.h. - (coverage_counter_ref): Takes a counter number. - (get_coverage_counts): Takes a counter number. Added summary - parameter. - (find_counters_section): Remove. - * gcov-dump.c (tag_arc_counts): Rename to ... - (tag_counters): ... here. Adjust. - (tag_table): Move tag_counters to 3rd entry. Remove - PROGRAM_PLACEHOLDER and PROGRAM_INCORRECT entries. - (dump_file): Check for counter tag values here. - (tag_summary): Adjust. - * gcov-io.c (gcov_write_summary, gcov_read_summary): Adjust. - * gcov-io.h (GCOV_LOCKED): New. - (GCOV_TAG_ARC_COUNTS): Rename to ... - (GCOV_TAG_COUNTS_BASE): ... here. - (GCOV_TAG_PLACEHOLDER_SUMMARY, GCOV_TAG_INCORRECT_SUMMARY): - Remove. - (GCOV_COUNTER_ARCS, GCOV_COUNTERS, GCOV_NAMES): New. - (GCOV_TAG_FOR_COUNTER, GCOV_COUNTER_FOR_TAG, - GCOV_TAG_IS_COUNTER): New. - (struct gcov_ctr_summary): New. - (struct gcov_summary): Adjust. - (struct gcov_counter_section): Remove. - struct gcov_counter_section_data): Remove. - (struct gcov_function_info): Rename to ... - (struct gcov_fn_info): ... here. Adjust. - (struct gcov_ctr_info): New. - (struct gcov_info): Adjust. - * gcov.c (read_count_file): Adjust. - (output_lines): Adjust. - * libgcov.c (gcov_exit): Adjust. - (__gcov_flush): Adjust. - * mklibgcc.in (libgcc2_c_dep): Add gcov headers. - * predict.c (maybe_hot_bb_p, probably_cold_bb_p, - probably_never_executed_bb_p, compute_frequency_function): Adjust - profile_info use. - * profile.c (struct counts_entry): Remove. - (profile_info): Define here. - (get_exec_counts): Adjust get_coverage_counts call. - (compute_branch_probablilities): Remove find_counters_section - call. - (gen_edge_profiler): Adjust coverage_counter_ref call. - * tracer.c (tail_duplicate): Adjust profile_info use. - -2003-04-23 Roger Sayle - - PR optimization/10339 - * builtins.c (expand_builtin_strcmp): Try to emit cmpstrsi insn - directly instead of unsafely transforming call into a memcmp. - (expand_builtin_strncmp): Likewise. - -2003-04-22 Roger Sayle - - * alias.c (mark_constant_function): Check for constancy and - purity even of void functions. Update both the function decl - and the cgraph RTL info with the results. - -2003-04-22 Roger Sayle - - * real.c (do_add): Change to return a bool indicating that the - result of the operation may be inexact due to loss of precision. - (do_multiply): Likewise. - (do_divide): Likewise. - -2003-04-22 Geoffrey Keating - Loren James Rittle - - * dwarf2out.c (fde_table_allocated): Mark with GTY. - (decl_die_table_allocated): Likewise. - (abbrev_die_table_allocated): Likewise. - (line_info_table_allocated): Likewise. - (separate_line_info_table_allocated): Likewise. - (pubname_table_allocated): Likewise. - (arange_table_allocated): Likewise. - (ranges_table_allocated): Likewise. - (decl_die_table_in_use): Unconditionalize; mark with GTY. - (abbrev_die_table_in_use): Likewise. - (line_info_table_in_use): Likewise. - (separate_line_info_table_in_use): Likewise. - (pubname_table_in_use): Likewise. - (arange_table_in_use): Likewise. - (ranges_table_in_use): Likewise. - (have_location_lists): Likewise. - (emitcount): New GTY-marked static, moved... - (maybe_emit_file): ...from here. - (label_num): New GTY-marked static, moved... - (gen_internal_sym): ...from here. - -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. - * doc/rtl.texi (Flags): Document it. - - * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. - -2003-04-22 Olivier Hainque - - * config/alpha/alpha.c (alpha_expand_prologue [OPEN_VMS_ABI]): Don't - set FRP on stack adjustment for outgoing args if frame_pointer_needed. - -2003-04-22 Vincent Celier - - * gthr-gnat.h, gthr-gnat.c: new sources for implementation of - --enable-threads=gnat. - * Makefile.in: Add gthr-gnat.c to LIB2ADDEH. - * configure.in: Add gnat to the list of thread packages - * configure: Rebuild. - * config/t-linux: Add gthr-gnat.c to LIB2ADDEH and LIB2ADDEHDEP - -2003-04-22 Neil Booth - - * cpplex.c (_cpp_get_fresh_line): Pop the buffer if return_at_eof. - -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 Neil Booth - - * c-lex.c (c_lex): Handle CPP_OTHER differently. - * cppexp.c (_cpp_parse_expr): Similarly. - * cpplex.c (SPELL_CHAR): Remove. - (_cpp_lex_direct): Stray chars are saved as byte strings. - (cpp_spell_token, cpp_output_token, _cpp_equiv_token): Don't - handle SPELL_CHAR. - (cpp_avoid_paste): Update handling of CPP_OTHER. - * cpplib.h: Spell CPP_OTHER like a number. - (struct cpp_token): Remove member c. - * cppmacro.c (stringify_arg): Update handling of CPP_OTHER. - -2003-04-22 David Turner - - * gbl-ctors.h: Add special license exception. - * libgcc2.h: Likewise. - * tsystem.h: Likewise. - * gcov-io.h: Likewise. - -2003-04-22 David Edelsohn - - * fold-const.c (fold_range_test): Use RANGE_TEST_NON_SHORT_CIRCUIT - macro defaulting to original BRANCH_COST heuristic. - * doc/tm.texi (RANGE_TEST_NON_SHORT_CIRCUIT): Document. - - * config/rs6000/rs6000.h (RANGE_TEST_NON_SHORT_CIRCUIT): Define. - -2003-04-22 Aldy Hernandez - - * config/rs6000/t-spe: Merge in t-fprules into file. - - * config.gcc: Add t-spe to powerpc-eabispe. - -2003-04-22 Kean Johnston - - * tlink.c (recompile_files): Add missing '=' to putenv calls - -2003-04-22 Nathan Sidwell - - * ginclude/stddef.h: Provide C++ safe offsetof. - -2003-04-22 J"orn Rennecke - - * function.c (purge_addressof_1): In (mem (addressof (reg))) case - for reg notes, if there are no substitutions, just use a SUBREG. - -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 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_override_options): No SPE means - 64-bit long doubles. - -2003-04-21 Olivier Hainque - - * fold-const.c (fold, case PLUS_EXPR and case MULT_EXPR): Restore - a number of conversions required for type consistency and previously - stripped off by STRIP_NOPS. - - * calls.c (expand_call): Prevent sibcall optimization for calls to - nested subprograms. - - * expmed.c (extract_bit_field): Reverse operands of && condition to - prevent a potential division by zero in the previously first branch. - * config/pa/pa.md (extv, extzv): FAIL if the bitfield length is zero. - -2003-04-21 Joel Brobecker - - * dwarf2out.c (is_ada, is_ada_subrange_type): New functions. - (subrange_type_die): Likewise. - (modified_type_die): Emit a subrange_type DIE for Ada subrange types. - (is_c_family, is_cxx, is_java, is_fortran): Return bool and clean up. - -2003-04-21 Nathan Sidwell - - Break out coverage routines to new file. - * Makefile.in (COVERAGE_H): New variable - (C_OBJS): Add coverage.o - (coverage.o): New target. - (profile.o, loop-init.o, sched-ebb.o, predict.o, tracer.o): Adjust - dependencies. - (GTFILES): Adjust. - (gt-coverage.h): New target. - (gt-profile.h): Remove. - * profile.h: Remove. Move to ... - * coverage.h: ... here. New. #include gcov-io.h. - * gcov-io.h: Move function definitions to ... - * gcov-io.c: ... here. New. - * profile.c: Move coverage routines to coverage.c. - (instrument_edges, get_exec_counts, branch_prob, init_branch_prob, - end_branch_prob): Adjust. - * coverage.c: New. Coverage routines from profile.c - (coverage_counter_ref, coverage_init, coverage_finish, - coverage_end_function, coverage_begin_output, - coverage_counter_ref, get_coverage_counts): Define. - * gcov-dump.c, gcov.c: #include gcov-io.c. - * libgcov.c: Likewise. Adjust. - * loop-init.c: Don't #include profile.h - * tracer.c, predict.c, sched-ebb.c: Adjust #includes. - * rtl.h: Add coverage prototypes. - * toplev.c (compile_file): Init coverage, not branch_prob. - Always call coverage_finish. - (rest_of_compilation): Call coverage_end_function. - -2003-04-21 Matt Kraai - - * config/rs6000/rs6000.md (*movsf_softfloat): Add "h" <- "0" case. - -2003-04-21 Neil Booth - - * c-ppoutput.c (cb_include): Don't take a cpp_token. - * cppfiles.c: Don't undef strcmp. - (find_include_file): Don't take a cpp_token. Check for empty - file names. - (_cpp_execute_include, _cpp_compare_file_date): Don't take a cpp_token. - (cpp_push_include): Simplify. - * cpphash.h (_cpp_execute_include, _cpp_compare_file_date): Update. - * cpplib.c (glue_header_name): Return the file name, not a cpp_token. - (parse_include): Similary. Don't check for zero-length filenames. - (do_include_common, do_pragma_dependency): Update accordingly. - * cpplib.h (struct cpp_callbacks): Change prototype of include. - -2003-04-21 Richard Kenner - - * doc/rtl.texi (RTX_UNCHANGING_P): Point to true_dependence for - details of conflict handling. - - * fold-const.c (extract_muldiv, case CONVERT_EXPR): Detect case - when conversion overflows. - - * stor-layout.c (layout_decl): Don't set DECL_SIZE_UNIT if already set. - - * expr.c (store_constructor): Set RTX_UNCHANGING_P if readonly_field_p - before clearing. - -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-21 Andreas Jaeger - - * cppcharset.c (_cpp_valid_ucn): Cast field precision to int. - -2003-04-20 Chris Lattner - Zack Weinberg - - * c-common.h, c-semantics.c: Rename genrtl_decl_cleanup to - genrtl_cleanup_stmt. Correct comment at head of - genrtl_cleanup_stmt (no such thing as a DECL_CLEANUP). - - * stmt.c (struct nesting): Kill n_function_calls. - (expand_start_bindings): Don't set - thisblock->data.block.n_function_calls. - (expand_end_bindings): Compare function_call_count against 0. - (expand_cleanups): Kill DONT_DO argument; all callers passed - NULL_TREE. All callers updated to match. - -2003-04-20 Zack Weinberg - - * varasm.c (struct deferred_constant, defer_addressed_constants_flag) - (defer_addressed_constants, output_deferred_addressed_constants): Kill. - (output_constant_def): Remove code predicated on - defer_addressed_constants_flag. - - * output.h: Remove prototypes of deleted functions. - * c-typeck.c (constructor_subconstants_deferred): Kill. - (struct initializer_stack): Remove 'deferred' field. - (start_init): Remove all references to the above. - (finish_init): Likewise. Also remove never-executed call to - output_deferred_addressed_constants. Pull assignment to - defstr out of if expression. - -2003-04-20 Neil Booth - - * cpphash.h (NOTE_ESC_NL, NOTE_ESC_SPACE_NL, NOTE_TRIGRAPH, - NOTE_NEWLINE): Remove. - * cpplex.c (_cpp_clean_line, _cpp_process_line_notes): Update - to handle new form of line note type. - -2003-04-20 Zack Weinberg - - * target.h (encode_section_info): Add new argument carrying - the RTL to be modified by the hook. - - * varasm.c (make_decl_rtl, output_constant_def): Update calls - to encode_section_info. - (default_encode_section_info): Take and use RTL argument, - don't use TREE_CST_RTL or DECL_RTL. - * output.h: Update prototype of default_encode_section_info. - * config/darwin.h (ASM_DECLARE_OBJECT_NAME) - (ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): - Update calls to encode_section_info. - - * config/darwin.c, config/arm/arm.c, config/arm/pe.c - * config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c - * config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c - * config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c - * config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c - * config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions): - Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL, - except for PE dllimport/dllexport. Update calls to - default_encode_section_info. - - * config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h: - Update prototypes. - - * doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update. - -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-20 Nathan Sidwell - - * cpplex.c (_cpp_lex_direct): Set BOL for CPP_EOF tokens. - * gcov.c (output_lines): Don't be so fussy about going past EOF. - -2003-04-20 Neil Booth - - * Makefile.in (LIBCPP_OBJS): Add cppcharset.o. - (cppcharset.o): New target. - * c-lex.c (is_extended_char): Move to cppcharset.c. - (utf8_extend_token): Delete. - * cppcharset.c: New file. - * cpphash.h (_cpp_valid_ucn): New. - * cpplex.c (lex_identifier): Update prototype. - (continues_identifier_p): Rename forms_identifier_p. Handle UCN - escapes. - (maybe_read_ucs): Rename maybe_read_ucn. Update to use code - in cppcharset.c. - (lex_number, lex_identifier, cpp_parse_escape): Update. - (_cpp_lex_direct): Update to handle UCNs. - (cpp_avoid_paste): Don't paste to form a UCN. - -2003-04-19 Roger Sayle - - * builtins.c (expand_builtin): Don't expand a pure or const - built-in function if the result will be ignored and none of - its arguments are volatile. - -2003-04-19 Kean Johnston - - * unwind-dw2.c (_Unwind_GetCFA): cast return to avoid warning - * config.gcc: make SCO use dbxelf.h and elfos.h; only use one - target fragment now: t-sco5; dont compile crti.o. - * config/i386/sco5.h: major overhaul to remove all COFF remnants - and to use elfos.h for most definitions. - (BSS_SECTION_ASM_OP): set correct segment attributes. - (PREFERED_DEBUGGING_TYPE): set to DWARF-2. - (DWARF2_UNWIND_INFO): Always set to 1. - (MD_STARTFILE_PREFIX): Make /usr/gnu/lib the default. - (MD_STARTFILE_PREFIX_1): Define. - (MD_EXEC_PREFIX): Adjust to /usr/gnu/bin if using GAS. - (DEFAULT_LINKER): Define if not specified to configure. - (CTORS_SECTION_ASM_OP): Remove COFF crud. - (DTORS_SECTION_ASM_OP): Remove COFF crud. - (WINT_TYPE): Define. - (SDB_DEBUGGING_INFO): Remove. - (EXTRA_SECTIONS): Likewise. - (EXTRA_SECTION_FUNCTIONS): Likewise. - (CTOR_LIST_BEGIN): Likewise. - (CTOR_LIST_END): Likewise. - (INIT_SECTION_FUNCTION): Likewise. - (FINI_SECTION_FUNCTION): Likewise. - (SUBTARGET_FRAME_POINTER_REQUIRED): Likewise. - (LOCAL_LABEL_PREFIX): Likewise. - (NON_SAVING_SETJMP): Likewise. - (RETURN_POPS_ARGS): Likewise. - (ASM_OUTPUT_SKIP): Likewise. - (TARGET_ASM_NAMED_SECTION): Likewise. - (ASM_OUTPUT_INTERNAL_LABEL): Likewise. - (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. - (ASM_OUTPUT_IDENT): Likewise. - (ASM_OUTPUT_CASE_LABEL): Likewise. - (ASM_OUTPUT_ASCII): Likewise. - (ASM_OUTPUT_LIMITED_STRING): Likewise. - (ASM_OUTPUT_ALIGNED_LOCAL): Likewise. - (ASM_OUTPUT_ALIGNED_COMMON): Likewise. - (ASM_GENERATE_INTERNAL_LABEL): Likewise. - (ASM_FINISH_DECLARE_OBJECT): Likewise. - (ASM_DECLARE_OBJECT_NAME): Likewise. - (ASM_DECLARE_FUNCTION_SIZE): Likewise. - (ASM_DECLARE_FUNCTION_NAME): Likewise. - (ASM_DECLARE_RESULT): Likewise. - (ASM_WEAKEN_LABEL): Likewise. - (SUPPORTS_WEAK): Likewise. - (APPLY_RESULT_SIZE): Likewise. - (LPREFIX): Likewise. - (ALIGN_ASM_OP): Likewise. - (ASCII_DATA_ASM_OP): Likewise. - (IDENT_ASM_OP): Likewise. - (ASM_SHORT): Likewise. - (ASM_LONG): Likewise. - (TYPE_ASM_OP): Likewise. - (SIZE_ASM_OP): Likewise. - (STRING_ASM_OP): Likewise. - (SKIP_ASM_OP): Likewise. - (EH_FRAME_SECTION_ASM_OP): Likewise. - (READONLY_DATA_SECTION_ASM_OP): Likewise. - (INIT_SECTION_ASM_OP): Likewise. - (FINI_SECTION_ASM_OP): Likewise. - (TEXT_SECTION_ASM_OP): Likewise. - (DATA_SECTION_ASM_OP): Likewise. - (TYPE_OPERANT_FORMAT): Likewise. - (ASM_SPEC): Remove COFF code. - (STARTFILE_SPEC): Likewise. Always use crti.o; add -p and -pp support; - cause -pg to emit an error; use pcrt1elf.o with -pp - (ENDFILE_SPEC): Likewise. - (TARGET_OS_CPP_BUILTINS): Add _SCO_DS_LL. - (CPP_SPEC): Remove COFF crud; always look in /usr/gnu/include first. - (LINK_SPEC): Remove COFF crud; use -E for environment switch not -R; - add -z alt_resolve to support weak symbols the way GCC wants them. - (LIB_SPEC): Use the profiler libraries in -p or -pp mode. - (LIBGCC_SPEC): Dont use -lgcc in -G mode. - (ASM_PREFERED_EH_DATA_FORMAT): Remove. - * config/i386/t-sco5 (TARGET_LIBGCC2_CFLAGS): Remove. - (CRTSTUFF_T_CFLAGS_S): Define. - (MULTILIB_OPTIONS): Likewise. - (MULTILIB_DIRNAMES): Likewise. - (MULTILIB_MATCHES): Likewise. - (MULTILIB_EXTRA_OPTS): Likewise. - (LIBGCC): Likewise. - (INSTALL_LIBGCC): Likewise. - (crti.o): Remove. - * config/i386/t-sco5gas: Remove. - * doc/install.texi: Updated for new OpenServer instructions. - * testsuite/gcc.dg/nest.c: Allow failure on SCO (-pg not supported) - -2003-04-19 Kean Johnston - - * fixinc/check.tpl: Allow user to over-ride diff program. - * fixinc/inclhack.def: Removed extraneous #ifndef SVR5. - (sco_math): Added test for SCO math header files. - (sco_regset): Added check for conflicts with ieeefp.h. - (svr4_disable_opt): Removed extraneous #ifdef SVR4. - * fixinc/fixincl.x: Regenerated - * fixinc/tests/base/math.h: Added sco_math tests. - * fixinc/tests/base/string.h: New file. - * fixinc/tests/base/sys/regset.h: New file. - -2003-04-19 Neil Booth - - * cpphash.h (struct cpp_buffer): Remove backup_to. - * cpplex.c (BACKUP, get_effective_char): Die. - (_cpp_skip_block_comment): Assume '*' is location on entry. - (continues_identifier_p): Respect -fno-dollars-in-identifiers. - (IF_NEXT_IS): Update. - (_cpp_lex_direct): Don't use backup_to; look ahead directly. - -2003-04-19 Matt Kraai - - * README.Portability: Move to a new section and obsolete K+R - portability issues. - -Sat Apr 19 14:56:17 CEST 2003 Jan Hubicka - - * rtlanal.c (subreg_offset_representable_p): Fix call of - subreg_lowpart. - -2003-04-19 Neil Booth - - * cpphash.h (struct cpp_reader): New member warned_dollar. - * cpplex.c (continues_identifier_p): New function. - (parse_identifier, parse_number, parse_string): Rename lex_identifer, - lex_number and lex_string, and simplify. - (parse_slow, unescaped_terminator_p): Die. - (_cpp_lex_direct): Update. - -2003-04-19 Richard Kenner - - * calls.c (expand_call): Provide init for old_stack_pointer_delta. - -2003-04-19 Nathan Sidwell - - * doc/invoke.texi (-fprofile-arcs): Mention -lgcov, locking and - fork behavior. - -2003-04-19 Neil Booth - - * cppexp.c (eval_token): Permit true and false even if pedantic. - -2003-04-19 Neil Booth - - * cpplex.c (skip_whitespace): Rearrange to avoid stage1 ICE. - -2003-04-19 Neil Booth - - * cppfiles.c (ENABLE_VALGRIND_CHECKING, VALGRIND_DISCARD, - MMAP_THRESHOLD, TEST_THRESHOLD, SHOULD_MMAP): Remove. - (struct include_file): Remove fefcnt, mapped members. - (open_file, stack_include_file, _cpp_pop_file_buffer): Disable caching. - (read_include_file): Don't use mmap, terminate buffers in '\r'. - (purge_cache): Don't use munmap. - * cpphash.h (CPP_BUF_COLUMN): Update. - (lexer_state): Remove lexing_comment. - (struct _cpp_line_note): New. - (struct cpp_buffer): New members cur_note, notes_used, notes_cap, - next_line and need_line. Remove col_adjust and saved_flags. - (_cpp_process_line_notes, _cpp_clean_line, _cpp_get_fresh_line, - _cpp_skip_block_comment, scan_out_logical_line): New. - (_cpp_init_mbchar): Remove. - * cppinit.c (init_library): Remove call to _cpp_init_mbchar. - (cpp_read_main_file): Set line to 1 earlier. - (post_options): -traditional-cpp doesn't want trigraphs. - * cpplex.c (MULTIBYTE_CHARS): Remove code predicated on this. - (add_line_note, _cpp_clean_line, _cpp_process_line_notes, - _cpp_get_fresh_line): New. - (handle_newline, skip_escaped_newlines, trigraph_p, - continue_after_nul, _cpp_init_mbchar): Remove. - (get_effective_char): Update. - (_cpp_skip_block_comment): Rename from skip_block_comment, simplify. - (skip_line_comment): Simplify. - (skip_whitespace, parse_identifier, parse_slow, parse_number, - parse_string): Update. - (cpp_lex_direct): Use clean lines and process line notes. Update. - (cpp_interpret_charconst): No MULTIBYTE_CHARS. - * cpplib.c (prepare_directive_trad): Call scan_out_logical_line - directly. - (_cpp_handle_directive): Don't set saved_flags. - (run_directive, destringize_and_run, cpp_define, cpp_define_builtin, - cpp_undef, handle_assertion, cpp_push_buffer): Update. - (_cpp_pop_buffer): Free notes. - * cppmacro.c (builtin_macro, paste_tokens): \n terminate buffer. - * cpppch.c (cpp_read_state): \n terminate buffer. - * cpptrad.c (skip_escaped_newlines, handle_newline): Remove. - (copy_comment): Use _cpp_skip_block_comment. - (skip_whitespace, lex_identifier, _cpp_read_logical_line_trad): - Simplify. - (_cpp_overlay_buffer, _cpp_remove_overlay, push_replacement_text, - save_replacement_text): Update. - (scan_out_logical_line): Update to use clean lines and process - line notes. - * fix-header.c (read_scan_file): Update. - -2003-04-18 Douglas B Rupp - - * unwind-dw2-fde.c (__register_frame_info_bases): Check for - null begin parameter (as well as pointer to null). - (__deregister_frame_info_bases): Likewise. - -2003-04-18 Richard Kenner - - * function.c (purge_addressof_1): For ADDRESSOF, see if SUB is a - hard or virtual register and copy into pseudo if replacement fails. - - * cfgcleanup.c (flow_find_cross_jump): Use INSN_P, not active_insn_p. - - * expmed.c (mask_rtx): Avoid undefined shifts for BITSIZE of 0. - -2003-04-18 Olivier Hainque - - * calls.c (expand_call): Move special case for constructor calls - to right place. Ensures constructor calls used to initialize - arguments get a clean outgoing argument block for themselves. - Move check for stack deallocation completeness until after last - deallocation. Add stack_pointer_delta to set of state - variables saved and restored along with current stack_level. - - * integrate.c (expand_inline_function): Ensure non-const actuals - don't end up const in the caller's flow after conversion to possibly - const formal type. - -2003-04-18 Vincent Celier - - * dwarf2out.c (loc_descriptor_from_tree): Treat all *_MOD_EXPR - and *_DIV_EXPR as TRUNC_*_EXPR. - -2003-04-18 Mark Mitchell - - * cfgrtl.c (try_redirect_by_replacing_jump): Create a basic block - for orphaned jump tables. - -2003-04-18 Kazu Hirata - - * reload1.c: Revert my previous patch on 2002-04-17. - -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 Richard Henderson - - * config/alpha/alpha.c (SYMBOL_FLAG_NEAR, SYMBOL_FLAG_SAMEGP): Remove. - (alpha_end_function): Don't set them. - (decl_in_text_section): Remove. - (alpha_encode_section_info): Remove. - (samegp_function_operand): Use SYMBOL_REF LOCAL_P and EXTERNAL_P. - (direct_call_operand): Use SYMBOL_REF_DECL and compare actual - sections, rather than decl_in_text_section results. - -2003-04-18 Roger Sayle - - * rtlanal.c (reg_overlap_mentioned_p): Handle ZERO_EXTRACT - and SIGN_EXTRACT. - -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-18 Hans-Peter Nilsson - - * gcse.c (compute_ld_motion_mems): For MEM destinations, only - consider those to be movable where the source matches - want_to_gcse_p. - (update_ld_motion_stores): In comment, refer to - compute_ld_motion_mems for validity of replacement. - -Fri Apr 18 01:28:51 CEST 2003 Jan Hubicka - - * gcov-dump.c (tag_summary): Remove max_sum - * gcov-io.h (gcov_summary, gcov_write_summary, - gcov_read_summary): Kill max_sum. - * libgcov.c (gcov_exit): Do one pass over the data. Make error - message more verbose. - - * 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. - - * profile.c (compute_branch_probabilities): Cleanup sanity checking; - allow negative probabilities for edges from the call to exit. - (branch_prob): Do not add fake edges for functions that may return - twice. - -2003-04-17 DJ Delorie - - * toplev.c (target_options): Add value field. - (set_target_switch): Handle target options with values. - * doc/tm.texi: Document how fixed vs variable target - options work. - * config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h, - config/c4x/c4x.h, config/cris/aout.h, config/cris/cris.h, - config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, - config/frv/frv.h, config/i386/i386.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/pa/pa.h, - config/rs6000/rs6000.h, config/rs6000/sysv4.h, - config/s390/s390.h, config/sparc/sparc.h, config/v850/v850.h: - Add value initializer to target options. - -2003-04-07 Loren James Rittle - - * cpppch.c (cpp_valid_state): Unconditionally initialize nl. - -2003-04-17 Kazu Hirata - - * reload1.c (move2add_last_cc0): New. - (reload_cse_move2add): Detect implicit sets. - (move2add_note_store): Notice a store into cc0. - -2003-04-17 Roger Sayle - - PR c/10375 - * c-decl.c (duplicate_decls): Preserve "const" and "noreturn" - function attributes. - -2003-04-17 Janis Johnson - - * doc/sourcebuild.texi (Test Suites): Document support for testing - binary compatibility (moved from testsuite/README.compat). - -2003-04-17 Richard Henderson - - * config/ia64/ia64.c (ia64_in_small_data_p): Disallow strings. - -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 Richard Henderson - - * config/xtensa/xtensa.c (xtensa_encode_section_info): Remove. - (call_insn_operand): Use SYMBOL_REF_LOCAL_P. - * config/xtensa/xtensa.md (call, call_value): Likewise. - -2003-04-17 Richard Henderson - - * config/v850/v850.c (print_operand): Use SYMBOL_REF_[ZST]DA. - (print_operand_address): Likewise. - (ep_memory_operand): Likewise. - (special_symbolref_operand): Likewise. - (v850_encode_data_area): Use SYMBOL_REF_FLAGS. - (v850_encode_section_info): Call default_encode_section_info. - (v850_strip_name_encoding): Remove. - * config/v850/v850.h (EXTRA_CONSTRAINT): Use SYMBOL_REF_[ZST]DA. - (ASM_OUTPUT_LABELREF): Remove. - (ZDA_NAME_FLAG_CHAR, ZDA_NAME_P): Remove. - (SDA_NAME_FLAG_CHAR, SDA_NAME_P): Remove. - (TDA_NAME_FLAG_CHAR, TDA_NAME_P): Remove. - (ENCODED_NAME_P): Remove. - (SYMBOL_FLAG_ZDA, SYMBOL_REF_ZDA_P): New. - (SYMBOL_FLAG_SDA, SYMBOL_REF_SDA_P): New. - (SYMBOL_FLAG_TDA, SYMBOL_REF_TDA_P): New. - -2003-04-17 Richard Henderson - - * config/stormy16/stormy16.c (xstormy16_encode_section_info): Kill. - * config/stormy16/stormy16.h (ASM_OUTPUT_SYMBOL_REF): Use - SYMBOL_REF_FUNCTION_P. - -2003-04-17 Richard Henderson - - * config/sparc/sparc.c (sparc_encode_section_info): Remove. - (data_segment_operand): Use SYMBOL_REF_FUNCTION_P. - (text_segment_operand): Likewise. - -2003-04-17 Richard Henderson - - * config/sh/sh.c (gen_datalabel_ref): Don't add SH_DATALABEL_ENCODING. - (tls_symbolic_operand): Use SYMBOL_REF_TLS_MODEL. - (legitimize_pic_address): Use SYMBOL_REF_LOCAL_P. - (sh_encode_section_info): Remove. - (sh_strip_name_encoding): Remove. - * config/sh/sh.h (SH_DATALABEL_ENCODING): Remove. - (DATALABEL_SYMNAME_P, STRIP_DATALABEL_ENCODING): Remove. - (SH_TLS_ENCODING, TLS_SYMNAME_P, STRIP_TLS_ENCODING): Remove. - (ASM_OUTPUT_LABELREF): Remove. - (ASM_OUTPUT_SYMBOL_REF): Use SYMBOL_REF_FUNCTION_P. - * config/sh/sh.md (*): Use SYMBOL_REF_LOCAL_P. - -2003-04-17 Richard Henderson - - * config/s390/s390.c (SYMBOL_FLAG_ALIGN1): New. - (tls_model_chars): Remove. - (larl_operand): Use SYMBOL_REF_FLAGS. - (tls_symbolic_operand): Use SYMBOL_REF_TLS_MODEL. - (legitimize_pic_address): Use SYMBOL_REF_LOCAL_P. - (s390_output_mi_thunk): Likewise. - (s390_emit_prologue): Set SYMBOL_FLAG_LOCAL as needed. - (s390_function_profiler): Likewise. - (s390_encode_section_info): Use default_encode_section_info - and SYMBOL_FLAG_ALIGN1. - (s390_strip_name_encoding): Remove. - * config/s390/s390.h (ASM_OUTPUT_LABELREF): Remove. - * config/s390/s390.md (call, call_value): Use SYMBOL_REF_LOCAL_P. - (builtin_setjmp_receiver): Set SYMBOL_FLAG_LOCAL as needed. - -2003-04-17 Richard Henderson - - * config/ns32k/ns32k.c (ns32k_encode_section_info): Remove. - (global_symbolic_reference_mentioned_p): Use SYMBOL_REF_LOCAL_P. - (print_operand_address): Likewise. - - * config/ns32k/ns32k.h (CANNOT_CHANGE_MODE_CLASS): Add CLASS argument. - * config/ns32k/ns32k.c (expand_block_move): Don't check - flag_unroll_loops. - -2003-04-17 Richard Henderson - - * config/mcore/mcore.c (mcore_encode_section_info): Don't set - SYMBOL_REF_FLAG. - -2003-04-17 Richard Henderson - - * rtl.h (SYMBOL_FLAG_MACH_DEP_SHIFT): New. - - * config/m32r/m32r.c (SYMBOL_FLAG_MODEL_SHIFT): New. - (SYMBOL_REF_MODEL): New. - (LIT_NAME_P): Move from m32r.h. - (m32r_select_section): Remove. - (m32r_encode_section_info): Use SYMBOL_REF_FLAGS. - (m32r_strip_name_encoding): Remove. - (m32r_in_small_data_p): New. - (small_data_operand): Use SYMBOL_REF_SMALL_P. - (addr24_operand): Use SYMBOL_REF_MODEL. - (call26_operand): Likewise. - (addr32_operand): Tidy. - (m32r_print_operand): Use HOST_WIDE_INT_PRINT_HEX. - * config/m32r/m32r.h (RODATA_SECTION_ASM_OP): Remove. - (SDATA_SECTION_ASM_OP, SBSS_SECTION_ASM_OP): Remove. - (READONLY_DATA_SECTION_ASM_OP): Remove. - (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove. - (SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Remove. - (TARGET_ASM_SELECT_SECTION): Remove. - (SDATA_FLAG_CHAR, MEDIUM_FLAG_CHAR, LARGE_FLAG_CHAR): Remove. - (SDATA_NAME_P, SMALL_NAME_P, MEDIUM_NAME_P): Remove. - (LARGE_NAME_P, ENCODED_NAME_P): Remove. - (ASM_OUTPUT_LABELREF): Remove. - -2003-04-17 Richard Henderson - - * config/ip2k/ip2k.c (is_regfile_address): Use SYMBOL_REF_FUNCTION_P. - (encode_section_info): Remove. - * config/ip2k/ip2k-protos.h: Update. - -2003-04-17 Richard Henderson - - * varasm.c (default_encode_section_info): Don't set - SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC. - * config/i370/i370.c (i370_encode_section_info): Remove. - * config/i370/i370.h (CONSTANT_ADDRESS_P): Use SYMBOL_REF_EXTERNAL_P. - (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Likewise. - * config/i370/i370.md (movsi): Likewise. - - * config/i370/t-i370: Add missing backslash. - -2003-04-17 Eric Botcazou - - * doc/invoke.texi (inline-limit): Fix pasto. - -2003-04-17 Richard Henderson - - * config/h8300/h8300.c (SYMBOL_FLAG_FUNCVEC_FUNCTION): New. - (small_call_insn_operand): Use it. - (SYMBOL_FLAG_EIGHTBIT_DATA): New. - (h8300_eightbit_constant_address_p): Use it. - (SYMBOL_FLAG_TINY_DATA): New. - (h8300_tiny_constant_address_p): Use it. - (h8300_encode_label, h8300_strip_name_encoding): Remove. - (h8300_encode_section_info): Set SYMBOL_REF_FLAGS. - * config/h8300/h8300.h (TINY_DATA_NAME_P): Remove. - (ASM_OUTPUT_LABELREF): Remove. - -2003-04-16 Richard Henderson - - * config/frv/frv.c (symbol_ref_small_data_p): Remove. Replace - all users with SYMBOL_REF_SMALL_P. - (const_small_data_p): Use SYMBOL_REF_SMALL_P. - (frv_encode_section_info): Remove. - (frv_strip_name_encoding): Remove. - (frv_in_small_data_p): Merge tests from encode_section_info. - (frv_print_operand): Use '@' not SDATA_FLAG_CHAR. - * config/frv/frv.h (SDATA_FLAG_CHAR): Remove. - (SDATA_NAME_P): Remove. - (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use SIZE not SDATA_NAME_P. - (ASM_OUTPUT_LABELREF): Remove. - (PRINT_OPERAND_PUNCT_VALID_P): Use '@' not SDATA_FLAG_CHAR. - - * config/frv/frv.c (frv_asm_out_constructor): New. - (frv_asm_out_destructor): New. - * config/frv/frv.h (CTORS_SECTION_ASM_OP): New. - (DTORS_SECTION_ASM_OP): New. - (ASM_OUTPUT_CONSTRUCTOR): Remove. - (ASM_OUTPUT_DESTRUCTOR): Remove. - -2003-04-16 Richard Henderson - - * config/cris/cris.c (cris_gotless_symbol, cris_got_symbol): Use - SYMBOL_REF_LOCAL_P; abort if not pic. - (cris_encode_section_info): Remove. - -2003-04-16 Richard Henderson - - * config/c4x/c4x.c (c4x_encode_section_info): Remove. - (c4x_T_constraint): Use SYMBOL_REF_FUNCTION_P. - - * config/c4x/c4x.h (TARGET_CPU_CPP_BUILTINS): Declare - flag_inline_trees. - -2003-04-16 Richard Henderson - - * config/avr/avr.c (avr_encode_section_info): Remove. - (avr_insert_attributes): New. - (print_operand_address): Use SYMBOL_REF_FUNCTION_P. - (avr_assemble_integer): Likewise. - -2003-04-16 Richard Henderson - - * arc.c (arc_encode_section_info): Remove. - (arc_assemble_integer): Use SYMBOL_REF_FUNCTION_P. - (arc_print_operand, arc_print_operand_address): Likewise. - * arc.h (EXTRA_CONSTRAINT): Likewise. - -2003-04-16 Roger Sayle - - * c-semantics.c (find_reachable_label): New function to find a - potentially reachable label in an expression. - (expand_unreachable_if_stmt): Similar to expand_if_stmt but - assumes the start of the IF_STMT is unreachable (dead) code. - (expand_unreachable_stmt): Similar to expand_stmt but assumes - the start of the statement list is unreachable (dead) code. - (genrtl_if_stmt): If the controlling expression of the IF - is constant, use expand_unreachable_stmt for the THEN or ELSE - clause as appropriate. - (genrtl_switch_stmt): Use expand_unreachable_stmt to expand - the body of a SWITCH statement. - (expand_stmt): The code immediately following a "return", - "break", "continue" or "goto" is unreachable. - * Makefile.in (c-semantics.o): Depend upon tree-inline.h. - -2003-04-16 Richard Henderson - - * rtl.h (MEM_ALIAS_SET): Update documentation. - * doc/rtl.texi (Special Accessors): New node. - (SYMBOL_REF_FLAG): Note relationship with SYMBOL_REF_FLAGS. - -2003-04-16 Alexandre Oliva - - * reload1.c (reload_cse_noop_set_p): Return false if mode of - SET_DEST is not the same as that returned by... - * cselib.h (cselib_reg_set_mode): ... new function. - * cselib.c (cselib_reg_set_mode): Define it. - (REG_VALUES): Document semantics of first element as set mode. - (cselib_subst_to_values): Skip first element if ELT is NULL. - (cselib_lookup): Likewise. Insert past the first element. - (cselib_invalidate_regno): NULLify first element. - (cselib_record_set): Set first element. - -2003-04-16 Olivier Hainque - - * tree.c (skip_simple_arithmetics_at, saved_expr_p): New functions. - (save_expr): Replace loop by call to skip_simple_arithmetics_at. - * tree.h: Add prototypes for the two new functions. - * fold-const.c (fold_binary_op_with_conditional_arg): Replace test - updates introduced in the previous revision by call to saved_expr_p. - * stor-layout.c (put_pending_size): Use skip_simple_arithmetics_at. - - * expr.c (store_field): Force usage of bitfield instructions when - the field position requires it, whatever SLOW_UNALIGNED_ACCESS. - (expand_expr, case BIT_FIELD_REF): likewise. - -2003-04-16 Mark Mitchell - - PR middle-end/8866 - * cfgtrl.c (try_redirect_by_replacing_jump): Do not delete - jumptables. - -2003-04-16 Richard Henderson - - * config/ia64/ia64.c (sdata_symbolic_operand): Use - SYMBOL_REF_SMALL_P and SYMBOL_REF_LOCAL_P. - (tls_symbolic_operand): Use SYMBOL_REF_TLS_MODEL. - (function_operand): Use SYMBOL_REF_FUNCTION_P. - (ia64_expand_load_address): Likewise. - (ia64_assemble_integer): Likewise. - (ia64_encode_section_info): Remove. - (ia64_strip_name_encoding): Remove. - * config/ia64/ia64.h (ENCODE_SECTION_INFO_CHAR): Remove. - * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Don't strip it. - -2003-04-16 Richard Henderson - - * config/alpha/alpha.c (SYMBOL_FLAG_NEAR, SYMBOL_FLAG_SAMEGP): New. - (samegp_function_operand): Use SYMBOL_FLAG_SAMEGP. - (direct_call_operand): Use SYMBOL_FLAG_NEAR. - (local_symbolic_operand): Use SYMBOL_REF_LOCAL_P. - (small_symbolic_operand): Use SYMBOL_REF_SMALL_P. - (global_symbolic_operand): Similarly. - (tls_symbolic_operand_1): Use SYMBOL_REF_TLS_MODEL. - (tls_symbolic_operand_type): Likewise. - (alpha_encode_section_info): Use default_encode_section_info. - (alpha_strip_name_encoding): Remove. - (get_tls_get_addr): Split out from ... - (alpha_legitimize_address): ... here. - (alpha_emit_xfloating_libcall): Use init_one_libfunc. - (get_some_local_dynamic_name_1): Use SYMBOL_REF_TLS_MODEL. - (alpha_initialize_trampoline): Use init_one_libfunc. - (alpha_setup_incoming_varargs): Mark unused parameters. - (alpha_initial_elimination_offset): Likewise. - (alpha_end_function): Use SYMBOL_FLAG_NEAR, SYMBOL_FLAG_SAMEGP. - (unicosmk_unique_section): Use default_strip_name_encoding. - (unicosmk_ssib_name, unicosmk_output_externs): Likewise. - -2003-04-16 Aldy Hernandez - - * config.gcc: Add t-spe for eabispe. - - * config/rs6000/t-spe: New. - -2003-04-16 J"orn Rennecke - - Re-apply this patch: - - 2002-05-16 Dale Johannesen - * combine.c (cant_combine_insn_p): Reenable combinations - involving hard regs unless CLASS_LIKELY_SPILLED_P. - -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 Zack Weinberg - - * configure.in: Unify the code which creates symlinks to a - just-built as, ld, objdump, and nm with the code that detects - their presence for purposes of feature tests. - * configure: Regenerate. - -2003-04-15 Zack Weinberg - - * varasm.c (output_constant_def): Do not consult - CONSTANT_AFTER_FUNCTION_P. Remove all code predicated on it. - (after_function_constants, output_after_function_constants): Delete. - * doc/tm.texi: Delete documentation of CONSTANT_AFTER_FUNCTION_P. - * config/mips/mips-protos.h, config/mips/mips.c - (mips16_constant_after_function_p): Delete. - * config/mips/mips.h: Delete #if-0-ed definition of - CONSTANT_AFTER_FUNCTION_P. - * config/d30v/d30v.h, config/stormy16/stormy16.h: Remove - mention of CONSTANT_AFTER_FUNCTION_P in comment. - -2003-04-15 Geoffrey Keating - - * tree.c (next_decl_uid): Mark with GTY. - (next_type_uid): Likewise. - -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. - -2003-04-15 Mark Mitchell - - * c-decl.c (implicitly_declare): Copy declarations that are going - to be placed in a local scope. - -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-14 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 J"orn Rennecke - - * i386.md (abssf2_if+1): Make condition agree with abssf2_1 . - -2003-04-15 Richard Kenner - - * optabs.c (expand_binop): In multi-word add cases, ensure - XTARGET is copied to TARGET if they are different. - -2003-04-15 Olivier Hainque - - * except.c (resolve_fixup_regions): Avoid dereferencing null pointer - to region, possible after integration of function with unreachable - regions that were optimized away. - -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 Mark Mitchell - - * doc/extend.texi (Empty Structures): Correct description of G++'s - handling of these structures. - - * c-decl.c (grokdeclarator): Reject extern redeclarations of - static variables. - -2003-04-14 Janis Johnson - - * config/rs6000/rs6000.md (define_constants): Define constants for - all UNSPEC usage, including new values for TLS support. - (aux_truncdfsf2, fctiwz, movsi_got, movsi_got_internal, - load_toc_aix_si, load_toc_aix_di, load_toc_v4_pic_si, - load_toc_v4_PIC_1, load_toc_v4_PIC_1b, load_macho_picbase, - macho_correct_pic, blockage, move_from_CR_ov_bit, movesi_from_cr, - stack_tie, movsi_to_cr_one, movsi_to_cr, mtcrfsi, eh_set_lr_si, - eh_set_lr_di): Use them. - * rs6000.c: (mtcrf_operation, uses_TOC, rs6000_emit_prologue, - rs6000_emit_epilogue) Use them. - - * rtl.h (SYMBOL_REF_TLS_MODEL): Fix mask value. - -2003-04-14 Neil Booth - - * Makefile.in (c-opts.o): Use custom action. - -2003-04-14 Douglas B Rupp - - * ifcvt.c (noce_process_if_block): Fail on BLKmode move. - -2003-04-14 Richard Kenner - - * stor-layout.c (layout_type, case ARRAY_TYPE): Add missing code to - handle "superflat arrays" in Ada. - - * integrate.c (expand_inline_function): Don't inline if would - lose /u on a BLKmode TARGET. - -2003-04-14 Joel Brobecker - - * dbxout.c (print_int_cst_bounds_in_octal_p): New function, - extracted from dbxout_type. - (dbxout_range_type): print large bounds in octal format. - (dbxout_type): Replace extracted code by call to - print_int_cst_bounds_in_octal_p. - - * dwarf2out.c (gen_compile_unit_die): Emit DW_LANG_Ada95 instead - of DW_LANG_Ada83 for Ada units. - -2003-04-14 Olivier Hainque - - * explow.c (round_push): Use HOST_WIDE_INT instead of int for the - temporary used to round CONST_INT sizes. - - * tree.c (int_fits_type_p): Extract generic checks from the case - of constant type bounds. Refine the checks against constant type - bounds to allow for possible decisions against each of these bounds - without requiring both bounds to be constant. - (tree_int_cst_msb): Put back. - * tree.h (tree_int_cst_msb): Likewise. - - * global.c (global_conflicts): Prevent allocation of call clobbered - hard regs to pseudos live across abnormal edges, as later passes are - not ready to handle them. - - * fold-const.c (fold): Reorder tests for conditional expressions. - - * expr.c (highest_pow2_factor): Return unsigned. - * expr.h (offset_address): Likewise. - * emit-rtl.c (offset_address): POW2 argument now unsigned. - -2003-04-14 Roger Sayle - - * builtins.c (expand_builtin_strlen): Evaluate the lengths of - string literals at compile-time. - -2003-04-14 Roger Sayle - - * fold-const.c (fold): Transform (c1 - x) cmp c2, where cmp is a - comparison operation and c1/c2 are floating point constants into - x swap(cmp) (c1 - c2). - -2003-04-14 Vladimir Makarov - - * genautomata.c (output_translate_vect): Fix a typo in loop - condition. - -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:18: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-13 Roger Sayle - - * tree.h (DECL_BUILT_IN_NONANSI): Remove. - * c-common.c (builtin_function_2): Don't set DECL_BUILT_IN_NONANSI. - * c-decl.c (duplicate_decls): Use invariant DECL_BUILT_IN_NONANSI - implies DECL_BUILT_IN to simplify logic. - * print-tree.c (print_node): Don't dump DECL_BUILT_IN_NONANSI. - -2003-04-13 Roger Sayle - - * builtin-types.def (BT_FN_STRING_CONST_STRING): New builtin type. - (BT_FN_PTR_SIZE_SIZE): Likewise. - * builtins.def (BUILT_IN_MALLOC, BUILT_IN_CALLOC, BUILT_IN_STRDUP): - New built-in functions for malloc, calloc and strdup respectively. - * calls.c (special_function_p): No need to handle malloc-like - functions any longer. ECF_MALLOC is set via built-in attributes. - - * c-decl.c (duplicate_decls): Preserve pure and malloc attributes. - - * doc/extend.texi: Document these new built-in functions. - -2003-04-13 Kaveh R. Ghazi - - * builtins.c (expand_builtin_memcpy): Add `endp' argument, use it. - (expand_builtin_stpcpy): New. - (expand_builtin): Add BUILT_IN_MEMPCPY & BUILT_IN_STPCPY. - * builtins.def: Add mempcpy & stpcpy support. - * doc/extend.texi (mempcpy, stpcpy): Document new builtins. - -2003-04-13 Nick Clifton - - * config/rs6000/rs6000.c: Replace occurrences of "GNU CC" with - "GCC". - * config/rs6000/40x.md, config/rs6000/603.md, - config/rs6000/6xx.md, config/rs6000/7450.md, config/rs6000/7xx.md, - config/rs6000/8540.md, config/rs6000/aix.h, config/rs6000/aix31.h, - config/rs6000/aix3newas.h, config/rs6000/aix41.h, - config/rs6000/aix43.h, config/rs6000/aix51.h, - config/rs6000/aix52.h, config/rs6000/altivec-defs.h, - config/rs6000/altivec.h, config/rs6000/altivec.md, - config/rs6000/beos.h, config/rs6000/darwin.h, - config/rs6000/eabi.h, config/rs6000/eabialtivec.h, - config/rs6000/eabisim.h, config/rs6000/eabispe.h, - config/rs6000/freebsd.h, config/rs6000/gnu.h, - config/rs6000/host-darwin.c, config/rs6000/linux.h, - config/rs6000/linux64.h, config/rs6000/linuxaltivec.h, - config/rs6000/lynx.h, config/rs6000/mach.h, config/rs6000/mpc.md, - config/rs6000/netbsd.h, config/rs6000/power4.md, - config/rs6000/rios1.md, config/rs6000/rios2.md, - config/rs6000/rs6000-c.c, config/rs6000/rs6000-modes.def, - config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, - config/rs6000/rs6000.h, config/rs6000/rs6000.md, - config/rs6000/rs64.md, config/rs6000/rtems.h, config/rs6000/spe.h, - config/rs6000/spe.md, config/rs6000/sysv4.h, - config/rs6000/sysv4le.h, config/rs6000/vxworks.h, - config/rs6000/windiss.h, config/rs6000/xcoff.h: Likewise. - -2003-04-13 Nick Clifton - - * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Delete - support for -mcall-aix switch. - * config/rs6000/eabiaix.h: Delete. - * config/rs6000/rs6000.h (rs6000_abi): Remove ABI_AIX_NODESC. - (RS6000_REG_SAVE, RS6000_SAVE_AREA, FP_ARGS_MAX_REG, - RETURN_ADDRESS_OFFSET): Remove use of ABI_AIX_NODESC. - * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Likewise. - * config/rs6000/rs6000.c (print_operand, rs6000_stack_info, - debug_stack_info, output_function_profiler, - rs6000_trampoline_size, rs6000_initialise_trampoline): Likewise. - * config/rs6000/rs6000.md (call, call_value, call_nonlocal_sysv, - call_indirect_nonlocal_sysv, call_value_indirect_nonlocal_sysv, - call_value_nonlocal_sysv, sibcall_value_nonlocal_sysv, - sibcall_nonlocal_sysv, sibcall_value_local64): Likewise. - * config/rs6000/t-ppcgas (MULTILIB_OPTIONS): Remove mcall-aix - multilibs. - (MULTILIB_DIRNAMES): Remove mcall-aix directories. - (MULTILIB_EXCEPTIONS): Delete. - (MULTILIB_MATCHES): Remove mcall-aix matches. - - * doc/fragments.texi: Replace -mcall-aix example with an ARM - one. - * doc/install.texi: Delete powerpc-*-eabiaix target. - * doc/invoke.texi: Remove documentation of mcall-aix switch. - * doc/tm.texi: Remove mcall-aix from example CPP_SPEC. - * config.gcc: Delete powerpc-*-eabiaix target. - -2003-04-13 Kazu Hirata - - * doc/invoke.texi: Fix typos. - * doc/tm.texi: Likewise. - -2003-04-12 Zack Weinberg - - * c-typeck.c (digest_init, push_init_level): Use CONSTRUCTOR_ELTS. - -2003-04-12 Zack Weinberg - - * tree.c (build_constructor): New function. - * tree.h: Prototype it. - - * c-typeck.c (build_c_cast, pop_init_level) - * profile.c (build_function_info_value, build_gcov_info_value) - (create_profiler): - Use build_constructor. - - * builtins.c (expand_builtin_args_info): Remove #if 0 blocks. - - * objc/objc-act.c (build_constructor): - Rename objc_build_constructor. Use build_constructor. - (build_objc_string_object, objc_add_static_instance) - (init_def_list, init_objc_symtab, init_module_descriptor) - (generate_static_references, build_selector_translation_table) - (build_descriptor_table_initializer, generate_descriptor_table) - (build_protocol_initializer, build_ivar_list_initializer) - (generate_ivars_list, build_dispatch_table_initializer) - (generate_dispatch_table, generate_protocol_list) - (build_category_initializer, build_shared_structure_initializer): - Update to match. - -2003-04-12 Zack Weinberg - - * intl.h: #define gcc_gettext_width to strlen when !ENABLE_NLS. - -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 Zack Weinberg - - * configure.in: Check for wchar.h, mbstowcs, and wcswidth. - * configure, config.in: Regenerate. - * intl.c (gcc_gettext_width): New function. - * intl.h: Prototype it. - -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-12 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_hash_constant): Skip '0' fields. - -2003-04-12 Alexandre Oliva - - * mklibgcc.in (libgcc-stage-start): For every multilib directory - containing a libgcc.a, move lib* to the corresponding stage dir. - - * Makefile.in (stage1-start, stage2-start, stage3-start, - stage4-start): Move $(SPECS) to specs in stage dir. - (unstage1 unstage2 unstage3 unstage4): Move specs in stage dir - back as $(SPECS). - - * mklibgcc.in (libgcc-stage-start): Move into the stage directory - object files from the non-libgcc/ multilib directories as well. - -2003-04-11 Geoffrey Keating - - * profile.c (read_counts_file): Initialise 'checksum'. - - * emit-rtl.c (gen_rtx): Really correct typo. - - 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. - * config/alpha/t-crtfm: Use -frandom-seed. - - * doc/extend.texi (Empty Structures): New. - - * c-pch.c: Include flags.h. Add comments to routines. - (struct c_pch_validity): New. - (get_ident): Update PCH file version number. - (pch_init): Output current debugging type. - (c_common_valid_pch): Check debugging type. - * Makefile.in (c-pch.o): Update dependencies. - * flags.h (debug_type_names): Declare. - * toplev.c (debug_type_names): Move out of decode_g_option. - -2003-04-11 Eric Christopher - - * emit-rtl.c (gen_rtx): Fix typos. - -2003-04-11 Richard Henderson - - * emit-rtl.c (gen_rtx): Zero '0' fields. - -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 - - * config/i386/i386.c (tls_model_chars): Remove. - (ix86_encode_section_info, ix86_strip_name_encoding): Remove. - (local_symbolic_operand): Use SYMBOL_REF_LOCAL_P. - (tls_symbolic_operand): Use SYMBOL_REF_TLS_MODEL. - (tls_symbolic_operand_1): Likewise. - (legitimate_pic_address_disp_p): Use SYMBOL_REF_LOCAL_P. - * config/i386/i386.h (TARGET_ENCODE_SECTION_INFO): Remove. - (TARGET_STRIP_NAME_ENCODING, ASM_OUTPUT_LABELREF): Remove. - * config/i386/winnt.c (i386_pe_encode_section_info): Replace - bits "copied from i386.h" with default_encode_section_info. - -2003-04-11 Richard Henderson - - * rtl.def (SYMBOL_REF): Add two 0 fields. - * gengtype.c (adjust_field_rtx_def): Handle them. - * print-rtl.c (print_rtx): Print them. - * rtl.h (SYMBOL_REF_DECL, SYMBOL_REF_FLAGS): New. - (SYMBOL_FLAG_FUNCTION, SYMBOL_REF_FUNCTION_P): New. - (SYMBOL_FLAG_LOCAL, SYMBOL_REF_LOCAL_P): New. - (SYMBOL_FLAG_SMALL, SYMBOL_REF_SMALL_P): New. - (SYMBOL_FLAG_TLS_SHIFT, SYMBOL_REF_TLS_MODEL): New. - (SYMBOL_FLAG_EXTERNAL, SYMBOL_REF_EXTERNAL_P): New. - (SYMBOL_FLAG_MACH_DEP): New. - * optabs.c (init_one_libfunc): Zap fake SYMBOL_REF_DECL. - * varasm.c (make_decl_rtl): Set SYMBOL_REF_DECL. - (assemble_static_space): Set SYMBOL_REF_FLAGS. - (assemble_trampoline_template): Likewise. - (output_constant_def, force_const_mem): Likewise. - (default_encode_section_info): New. - * output.h: Declare it. - * target-def.h (TARGET_ENCODE_SECTION_INFO): Use it. - -2003-04-11 Richard Henderson - - * libfuncs.h (LTI_setbits, LTI_gcov_flush, LTI_gcov_init): New. - (setbits_libfunc, gcov_flush_libfunc, gcov_init_libfunc): New. - * optabs.c (init_optabs): Initialize them. - (init_libfuncs): Use init_one_libfunc. - * calls.c (expand_call): Use gcov_flush_libfunc. - * expr.c (store_constructor): Use setbits_libfunc. - * function.c (expand_main_function): Use init_one_libfunc. - * profile.c (create_profiler): Use gcov_init_libfunc and DECL_RTL. - -2003-04-11 Mark Mitchell - - * doc/c-tree.texi (Functions): Remove DECL_REAL_CONTEXT - documentation; add DECL_FRIEND_CONTEXT. - -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-11 Zack Weinberg - - * config/darwin-c.c (darwin_pragma_unused): Use lookup_name, - not IDENTIFIER_LOCAL_VALUE. - -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 James A. Morrison - - * doc/invoke.texi: Eliminate extra white-space caused by - @gccoptlist{ on its own line. - * doc/invoke.texi: Ensured there are two spaces between each option. - * doc/invoke.texi: Re-wrapped option lines that were too wide. - Added @gol to options that didn't have them. - -2003-04-11 Nathan Sidwell - - * Makefile.in (loop-init.o): Do not depend on gcov-io.h, - gcov-iov.h. - - Simplify interface to gcov reading and writing. - * gcov-io.h (gcov_file, gcov_position, gcov_length, gcov_buffer, - gcov_alloc, gcov_modified, gcov_errored): Move into ... - (struct gcov_var gcov_var): ... this static structure. - (gcov_write_unsigned, gcov_write_counter, gcov_write_string): - Return void. - (gcov_read_unsigned, gcov_read_couter, gcov_read_string): Return - read object. - (gcov_read_bytes, gcov_write_bytes): Set error flag on error. - (gcov_reserve_length): Remove. - (gcov_write_tag): New. - (gcov_write_length): Adjust. - (gcov_read_summary, gcov_write_summary): Adjust. - (gcov_eof, gcov_ok): Rename to ... - (gcov_is_eof, gcov_is_error): ... here. Return error code. - (gcov_save_position, gcov_resync): Rename to ... - (gcov_position, gcov_seek): ... here. - (gcov_skip, gcov_skip_string): Remove. - (gcov_error): Remove. - (gcov_open, gcov_close): Adjust. - * gcov.c (find_source): Take const char *, copy it on allocation. - (read_graph_file): Adjust. - (read_count_file): Adjust. - * libgcov.c (gcov_exit): Adjust. - * gcov-dump.c (tag_function, tag_blocks, tag_arcs, tag_lines, - tag_arc_counts, tag_summary): Return void. Adjust. - (struct tag_format): Adjust proc member. - (dump_file): Adjust gcov calls. - -2003-04-11 Alexandre Oliva - - * Makefile.in (fixinc.sh): Pass BUILD_LIBERTY as LIBERTY to - mkfixinc.sh. - * fixinc/mkfixinc.sh (defs): Add LIBERTY. - * configure.in (STMP_FIXINC, STMP_FIXPROTO): Don't disable on - build != host sysrooted builds. - * configure.in (SYSTEM_HEADER_DIR): Make sure it contains - TARGET_SYSTEM_ROOT even on sysrooted natives. - * configure: Rebuilt. - -2003-04-10 Zack Weinberg - - * c-decl.c (struct binding_level): Add shadowed_tags and - function_body; remove this_block, tag_transparent, and - subblocks_tag_transparent; update comments. - (clear_binding_level, lookup_tag_reverse): Kill. - (make_binding_level): Use ggc_alloc_cleared or memset. - (lookup_tag): Remove struct binding_level* parameter. All - callers changed. Just look at IDENTIFIER_TAG_VALUE, and - current_binding_level->tags if asked for thislevel_only or if - we might have to diagnose "struct foo; union foo;" - (pushlevel): Ignore argument. Do not push another binding - level on the transition from the parameters to the top level - of the function body; just tweak the flags and proceed. - (poplevel): Overhaul. Clear IDENTIFIER_TAG_VALUEs; on exiting - a function body, separate the parameter list from the - top-level local variables. - (set_block): Do nothing. - (pushtag): Set IDENTIFIER_TAG_VALUE and add an entry to - shadowed_tags if necessary. - (warn_if_shadowing): Nuke the special case for local shadowing - parameter. - (pushdecl): Do not create a shadow entry if we are replacing - an older decl in the same binding level. - (pushdecl_function_level): Tweak for new way of indicating - function scope. - (shadow_tag_warned): Use TYPE_NAME, not lookup_tag_reverse. - (start_function): Don't set subblocks_tag_transparent. - (finish_function): Fix up the binding_level stack for totally - empty functions. Otherwise, don't call poplevel. - - * c-common.c (shadow_warning): MANDATORY argument is no longer - necessary. Always use plain warning. - * c-common.h: Update to match. - - * cfglayout.c (scope_to_insns_initialize): Clear block when we - hit the FUNCTION_DECL. - * function.c: Do not create cyclic tree structure. - -2003-04-10 Zack Weinberg - - * c-tree.h (struct lang_identifier): Replace global_value, - local_value members with symbol_value, tag_value. Kill - implicit_decl and limbo_value. - (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_LOCAL_VALUE, - IDENTIFIER_LIMBO_VALUE, IDENTIFIER_IMPLICIT_DECL, - C_MISSING_PROTOTYPE_WARNED): Kill. - (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE, - C_DECL_IMPLICIT, C_DECL_ISNT_PROTOTYPE): New. - (C_DECL_ANTICIPATED): Rename to C_DECL_INVISIBLE. - (implicit_decl_warning, lookup_name_current_level, - record_function_scope_shadow): Don't prototype. - (pushdecl_function_level): Prototype. - - * c-decl.c (truly_local_externals): New variable. - (struct binding_level): Adjust commentary. - (get_function_binding_level, clear_limbo_values, - record_function_scope_shadow): Kill. - (lookup_name_current_level, implicit_decl_warning): Are now static. - (any_external_decl, record_external_decl): New static functions. - (clone_underlying type): Split out of pushdecl. - (c_print_identifier): Update to match changes to struct - lang_identifier. - (poplevel): Delete #if 0 block. Make externals invisible - instead of clearing their IDENTIFIER_SYMBOL_VALUEs. Don't - call clear_limbo_values. Refer to IDENTIFIER_SYMBOL_VALUE not - IDENTIFIER_GLOBAL_VALUE or IDENTIFIER_LOCAL_VALUE. - (duplicate-decls): For real parm decl after a forward decl, - set TREE_ASM_WRITTEN here. Allow void foo(...) followed by - foo(...) { } with only a warning. Say whether a previous - declaration was implicit. - (warn_if_shadowing): Now handles all shadowing, not just - local-over-local. Clarify comments. - (pushdecl): Rewritten. There is no longer a distinction - between global and local symbol values; they're all - IDENTIFIER_SYMBOL_VALUE. Call record_external_decl on all - DECL_EXTERNAL decls, and use any_external_decl to check - against previous externals. Kill #if 0 blocks. Don't - tolerate error_mark_node being NULL. - (pushdecl_top_level): Handle only those cases which - Objective C (the only user) needs. - (pushdecl_function_level): New function. - (implicitly_declare): Create ordinary decls with - C_DECL_IMPLICIT set. Recycle old decls, however they got - created. - (lookup_name): It's always IDENTIFIER_SYMBOL_VALUE. Return 0 - for C_DECL_INVISIBLE symbols. - (lookup_name_current_level): Likewise. Use chain_member. - (c_make_fname_decl): Don't muck with DECL_CONTEXT. - Use pushdecl_function_level. - (builtin_function): Use C_DECL_INVISIBLE. - (start_function): Don't muck with IDENTIFIER_IMPLICIT_DECL. - Use C_DECL_ISNT_PROTOTYPE and C_DECL_IMPLICIT. - (store_parm_decls): It's IDENTIFIER_SYMBOL_VALUE now. - (identifier_global_value): Same. Must scan - global_binding_level in extremis. - - * c-typeck.c (undeclared_variable): New static function, split - from build_external_ref. - (build_external_ref): Use DECL_CONTEXT, not - IDENTIFIER_LOCAL_VALUE, to decide whether a local hides - an instance variable. Restructure for clarity. - * objc/objc-act.c: Use identifier_global_value, not - IDENTIFIER_GLOBAL_VALUE. - -2003-04-08 Jonathan Wakely - - * doc/extend.texi (Template Instantiation): Refer to ISO standard, - not Working Paper. - * doc/invoke.texi (C++ Dialect Options): Same. - -2003-04-10 Zack Weinberg - - * tree.c (tree_operand_check_failed): New function. - * tree.h (TREE_OPERAND_CHECK, TREE_OPERAND_CHECK_CODE, - TREE_RTL_OPERAND_CHECK): New checking macros. - (TREE_OPERAND, SAVE_EXPR_CONTEXT, SAVE_EXPR_RTL, - RTL_EXPR_SEQUENCE, RTL_EXPR_RTL, WITH_CLEANUP_EXPR_RTL, - CONSTRUCTOR_ELTS, LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, - EXIT_BLOCK_RETURN, LOOP_EXPR_BODY, EXPR_WFL_NODE, - EXPR_WFL_FILENAME_NODE, EXPR_WFL_FILENAME, TARGET_EXPR_SLOT, - TARGET_EXPR_INITIAL, TARGET_EXPR_CLEANUP): Use the new - checking macros. - -Thu Apr 10 23:52:30 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 Douglas B Rupp - - * config/i386/i386.c (ix86_ms_bitfield_layout_p): Fix formatting. - -2003-04-10 Bob Wilson - - * config/xtensa/lib2funcs.S (__xtensa_sync_caches): Flush data cache - even if it is configured to be write-through. - -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 Steven Bosscher - - * c-common.h (lang_statement_code_p): Remove declaration. - (statement_code_p): Ditto. - (c_common_stmt_codes): Define; list of c-common statement codes. - (statement_code_p): New extern declaration. - (STATEMENT_CODE_P): Define. - (INIT_STATEMENT_CODES): Define. - * c-common.c (statement_code_p): Kill the function, declare - as an array of bools instead. - (lang_statement_code_p): Remove. - (walk_stmt_tree): Use STATEMENT_CODE_P not statement_code_p. - (c_safe_from_p): Ditto. - * c-objc-common.c (c_objc_common_init): Use INIT_STATEMENT_CODES - to initialize the statement_code_p array. - * tree-inline.c (walk_tree): Use STATEMENT_CODE_P instead of - statement_code_p. - (copy_tree_r): Ditto. - * cp/cp-tree.h (cp_stmt_codes): Define; list of C++ specific - statement tree codes. - * cp/lex.c (cxx_init): Add missing print line break. Use - INIT_STATEMENT_CODES to initialize the statement_code_p array. - * cp/parser.c (cp_parser_statement): Use STATEMENT_CODE_P - instead of statement_code_p. - * cp/pt.c (tsubst_expr): Ditto. - * cp/tree.c (verify_stmt_tree_r): Ditto. - (cp_statement_code_p): Remove. - (init_tree): Don't set lang_statement_code_p, it's gone. - -2003-04-09 Dan Nicolaescu - Zack Weinberg - - * regrename.c (struct du_chain): Use a bitfield for reg_class. - * cse.c (struct qty_table_elem, struct table_elt, struct set): - Use bitfields for fields holding enum rtx_code or - enum machine_mode values. Add comments explaining size choices. - -2003-04-09 Alexandre Oliva - - * config/fp-bit.c (unpack_d): Handle pair of doubles with - different signs correctly. - -2003-04-09 Vladimir Makarov - - * sched-deps.c (reg_pending_barrier_mode): New enumeration. - (reg_pending_barrier): Make it of the enumeration type. - (sched_analyze_2): Define the barrier as MOVE_BARRIER or - TRUE_BARRIER. - (sched_analyze): Ditto. - (sched_analyze_insn): Ditto. Use anti-dependencies for - MOVE_BARRIER and true-dependencies as TRUE_BARRIER. - (init_deps_global): Initialize the barrier as NO_BARRIER. - -2003-04-09 Vladimir Makarov - - * config/ia64/ia64.c (issue_nops_and_insn): Add new parameter. - Check that asm insn starts on a new cycle. Add nops after asm - insn to end bundle. - (bundling): Move insn type evaluation from the loop. Call - issue_nops_and_insn with the new parameter. Ignore changing - position for nops after asm insn. - -2003-04-09 Alexandre Oliva - - * optabs.c: Comment that gen_add2_insn and others may actually - return emitted insns, if the gen functions turn out to return - emitted insns. - * reload1.c (reload_cse_move2add): Cope with emitted insns from - gen_add2_insn. - -2003-04-09 Richard Henderson - - * config/ia64/ia64.c (move_operand): Allow symbolic_operand, - but not tls_symbolic_operand. - (ia64_expand_load_address): Remove scratch operand. - (ia64_expand_tls_address): Split out from ia64_expand_move. - (ia64_expand_move): Split symbolics only after reload. - (ia64_emit_cond_move): New. - * config/ia64/ia64-protos.h: Update. - * config/ia64/ia64.md (movsi_symbolic, movdi_symbolic): Remove. - (symbolic splitter): Accept SImode operands too. - (cmove splitter): Use ia64_emit_cond_move. - -2003-04-09 Nick Clifton - - * doc/install.texi: Note that ARM toolchains need binutils 2.13 or - newer. - * config/arm/elf.h (SUBTARGET_ASM_FLOAT_SPEC): Pass -mfpu=softfpa - instead of -mno-fpu. - * config/arm/semi.h (ASM_SPEC): Likewise. - * config/arm/xscale-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise, - but only if -msoft-float is specified pass. Otherwise pass - -mfpu=softvfp. - -2003-04-09 Zdenek Dvorak - - * function.c (purge_addressof): Use free_INSN_LIST_node instead of - free_EXPR_LIST_node. - -2003-04-08 Roger Sayle - - * fold-const.c (fold): Use "fold" following build in more places. - Optimize sqrt(x)*sqrt(x) as x, pow(x,y)*pow(z,y) as pow(x*z,y), - pow(x,y)*pow(x,z) as pow(x,y+z) and x/pow(y,z) as x*pow(y,-z). - -2003-04-08 Roger Sayle - - * builtins.c (fold_builtin): Constant fold expressions as x*0.5 - instead of x/2.0. Optimize sqrt(pow(x,y)) as pow(x,y*0.5), - log(pow(x,y)) as y*log(x), pow(exp(x),y) as exp(x*y), - pow(sqrt(x),y) as pow(x,y*0.5) and pow(pow(x,y),z) as pow(x,y*z). - Delete function scope "fcode" variable to avoid shadowing. - -2003-04-08 Kevin Buettner - - * dwarf2out.c (DWARF_ARANGES_HEADER_SIZE, DWARF_ARANGES_PAD_SIZE): - Take into account DWARF_INITIAL_LENGTH_SIZE. - -2003-04-08 Hans-Peter Nilsson - - * reorg.c (fill_slots_from_thread): When considering changing the - insn following a reg-to-reg copy insn to use the source reg of the - copy, bail out if there's overlap between the registers. - -2003-04-08 Zdenek Dvorak - - * function.c (postponed_insns): New. - (purge_addressof_1): Postpone processing of insns if addressofs - are not put into stack. - (purge_addressof): Process postponed insns. - -2003-04-08 J"orn Rennecke - - * sh.h (NORMAL_MODE): If interrupt handler and TARGET_FMOVD, - this is FP_MODE_DOUBLE . - * sh.c (ra.h): #include. - (push_regs): Add second parameter. Changed all callers. - If necessary, set fpscr before saving floating point registers. - (calc_live_regs): If interrupt handler and TARGET_FMOVD, always - do saves / restores with SZ == 1. - (sh_expand_prologue): If interrupt handler, don't use gen_toggle_sz. - (sh_expand_epilogue): Likewise. For TARGET_FMOVD, if floating point - registers are being restored, restore FPSCR only after restoring them. - -2003-04-08 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_init_builtins): Set opaque types - regardless of architecture. - (spe_init_builtins): Change V2SI and V2SF types to opaque types. - -2003-04-08 J"orn Rennecke - - * sh.c (push_regs, calc_live_regs): Return int. Take single - HARD_REG_SET * parameter. Changed all callers. - -Tue Apr 8 11:12:07 CEST 2003 Jan Hubicka - - * i386.c (legitimate_pic_address_disp_p): Do not accept PLUS in the - GOTOFF operand. - (legitimize_pic_address): Move plus outside the unspec. - * i386.c (legitimate_constant_p): Check (CONST (PLUS (UNSPEC ... - for validity. - -2003-04-08 Nathan Sidwell - - * gcov-io.h (gcov_save_position): Remove __inline__ from - declaration. - -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 - favor of looping and tail recursion for TREE_LIST and binops. - -2003-04-08 Zdenek Dvorak - - * loop.h (REGNO_FIRST_LUID, REGNO_LAST_LUID): Provide defaults - for insns without luid. - -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. - -Mon Apr 7 22:19:59 CEST 2003 Jan Hubicka - - PR target/10077 - * i386.md (movsi_1, movsi_nointerunit_1): Fix SSEMOV alternative. - -2003-04-07 Eric Botcazou - - * doc/rtl.texi (Comparison operations): Update to - record the allowed comparison modes. - -2003-04-07 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_common_init_builtins): Rename all - V2SI_type_node to opaque_V2SI_type_node. Rename all - V2SF_type_node to opaque_V2SF_type_node. - (rs6000_init_builtins): Define opaque_V2SI_type_node and - opaque_V2SF_type_node. - (is_ev64_opaque_type): The types opaque_V2SI_type_node and - opaque_V2SF_type_node are opaque types. - -2003-04-07 J"orn Rennecke - - * gcse.c (replace_store_insn): Use single_set. - -2003-04-07 Nathan Sidwell - - Change gcov file interface to single file at a time. - * gcov-io.h: Replace IN_LIBGCC1 with IN_LIBGCOV. Use IN_GCOV. - Convert to C89 prototypes. - (gcov_file, gcov_length, gcov_position, gcov_buffer, gcov_alloc, - gcov_error, gcov_modified): New static variables. - (gcov_open, gcov_close, gcov_read_bytes, gcov_write_bytes): New - functions. - (gcov_write_unsigned, gcov_write_counter, gcov_write_string, - gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust. - (gcov_read_summary, gcov_write_summary): Adjust. - (gcov_save_position, gcov_reserve_length, gcov_write_length): - Adjust. - (gcov_resync, gcov_skip, gcov_skip_string): Adjust. - (da_file_open, da_file_close, da_file_eof, da_file_error): Remove. - (da_file_position, da_file_seek, da_file_write, da_file_read): - Remove. - (gcov_error, gcov_eof, gcov_ok, gcov_time): New functions. - * gcov.c (gcov_type): Don't typedef here. - (IN_GCOV): #define - (read_graph_file, read_count_file): Adjust. - * gcov-dump.c (gcov_type): Don't typedef here. - (IN_GCOV): #define. - (tag_function, tag_blocks, tag_arcs, tag_lines, tag_arc_counts): - Remove FILE parameter, adjust. - (struct tag_format): Adjust proc member. - (dump_file): Adjust. - * libgcov.c (IN_LIBGCOV): #define. - (gcov_exit): Adjust. - * loop-init.c: Don't #include gcov-io.h - * profile.c (struct counts_entry): New structure to hold counter - values. - (struct section_reference, struct da_index_entry): Remove. - (bbg_file, da_file): Remove. - (htab_counts_index_hash, htab_counts_index_eq, - htab_counts_index_del): Replace with ... - (htab_counts_entry_hash, htab_counts_entry_eq, - htab_counts_entry_del): ... these. - (cleanup_counts_index, index_counts_file): Remove. - (read_counts_file): New function. - (get_exec_counts): Adjust. - (compute_branch_probabilities): Don't free the exec counts here. - (branch_prob): Adjust. - (init_branch_prob): Adjust. - (end_branch_prob): Adjust. - -2003-04-07 Aldy Hernandez - - * doc/invoke.texi (RS/6000 and PowerPC Options): Document - -mfloat-gprs. - - * config/rs6000/rs6000.c: Delete rs6000_fprs. - Declare rs6000_float_gprs. - Declare rs6000_float_gprs_string. - (rs6000_parse_float_gprs_option): New. - (rs6000_override_options): Genericize rs6000_parse_* calls to use - rs6000_parse_yes_no_option. - Change check for cpu=8540, to use TARGET_E500. - (rs6000_parse_isel_option): Delete. - (rs6000_parse_spe_option): Delete. - (rs6000_parse_vrsave_option): Delete. - - * config/rs6000/rs6000.h: Rename rs6000_fprs to rs6000_float_gprs. - Define rs6000_float_gprs_string. - (TARGET_OPTIONS): Add rs6000_float_gprs option. - - * config/rs6000/eabi.h (TARGET_FPRS): Change to use rs6000_float_gprs. - - * config/rs6000/eabispe.h: Set rs6000_float_gprs. - -Mon Apr 7 14:36:24 CEST 2003 Jan Hubicka - - PR opt/10024 - * 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 J"orn Rennecke - - * c-typeck.c (output_init_element): Check for type == error_mark_node. - -2003-04-07 Kazu Hirata - - * config/h8300/h8300.md (*zero_extendqisi2_h8300hs): Always - split. - (a splitter): Do zero-extension via HImode. - -2003-04-07 James A. Morrison - - * doc/invoke.texi: Eliminate extra white-space caused by - @gccoptlist{ on its own line. - * doc/invoke.texi: Ensured there are two spaces between each option. - * doc/invoke.texi: Re-wrapped option lines that were too wide. - Added @gol to options that didn't have them. - -2003-04-07 James A Morrison - - * doc/extend.texi (Darwin Pragmas): Fix spelling of Mac OS. - -2003-04-06 Zack Weinberg - - * tree.c (tree_size): For all 'c' and 'x' nodes, look directly - at the sizes of the relevant structures, rather than relying - on TREE_CODE_LENGTH. Call lang_hooks.tree_size to get the - sizes of any such we don't know about. Use - lang_hooks.identifier_size for IDENTIFIER_NODE. - - (initializer_zerop): Use CONSTRUCTOR_ELTS. - * tree.def: Update commentary. Make fourth element of - the definition for all 'c' and 'x' nodes zero. - - * langhooks.h: New hook, tree_size / LANG_HOOKS_TREE_SIZE. - * langhooks-def.h: Update to match. - * langhooks.c: New default, lhd_tree_size. - - * c-common.def (SRCLOC): Kill. - * c-pretty-print.c (pp_c_postfix_expression [case SRCLOC]): - Remove entirely - was already #if-ed out. - - -2003-04-06 Zack Weinberg - - * mklibgcc.in: Use a here document to avoid running afoul of - shells that generate control-A from "echo \1". - -2003-04-06 Aldy Hernandez - - * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mspe - option. - - * config/rs6000/eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Set - rs6000_spe. - - * config/rs6000/eabi.h (TARGET_E500): Define. - - * config/rs6000/rs6000.h (TARGET_E500): Define. - (TARGET_OPTIONS): Add spe= option. - Declare rs6000_spe and rs6000_spe_string extern. - - * config/rs6000/rs6000.c (branch_positive_comparison_operator): - Change TARGET_SPE to TARGET_E500. - (ccr_bit): Change TARGET_SPE to TARGET_E500. Check for - !TARGET_FPRS. - (print_operand): Same. - (rs6000_generate_compare): Same. - (output_cbranch): Same. - (rs6000_spe): Declare. - (rs6000_spe_string): Declare. - (rs6000_override_options): Call rs6000_parse_spe_option. - (rs6000_parse_spe_option): New. - -2003-04-06 Steven Bosscher - - * hashtable.c (gcc_obstack_init): Delete this function - and everything related to it. - * hashtable.h: Remove prototype. - * bitmap.c (bitmap_element_allocate): Cleanup redundant - defines. Cleanup some unnecessary whitespace. - * defaults.h (obstack_chunk_alloc): Redefine with - appropriate casts for libiberty obstacks. - (obstack_chunk_free): Ditto. - (OBSTACK_CHUNK_SIZE): Define, default to 0. - (gcc_obstack_init): Define as a call to _obstack_begin. - * tree.c (print_obstack_statistics): Delete this unused - function. - * tree.h (obstack): Don't forward-declare. - (print_obstack_statistics): Delete prototype. - (print_obstack_name): Ditto. - (gcc_obstack_init): Ditto. - * rtl.h (gcc_obstack_init): Ditto. - * java/jv-scan.c (gcc_obstack_init): Delete this - function, its prototype and related defines. - * java/jvgenmain.c (gcc_obstack_init): Delete this - function, and related defines. - * java/parse-scan.y (obstack_chunk_alloc): Don't define. - (obstack_chunk_free): Ditto - -2003-04-06 Geoffrey Keating - - * dbxout.c (dbxout_handle_pch): Move prototype out from - #if defined DBX_DEBUGGING_INFO. - -2003-04-05 Nathan Sidwell - - * gcov.c (struct arc_info): Replace local_span with cycle. - (struct block_info): Replace u.span with u.cycle. Add is_call_return. - (solve_flow_graph): Set is_call_return. - (add_line_counts): Adjust. In block mode, blocks attach to last line. - (accumulate_line_counts): Find graph cycles, not spanning tree. - (output_branch_count): Adjust. - (output_lines): Adjust. - * doc/gcov.texi: Update. - -2003-04-06 Kazu Hirata - - * config/h8300/h8300.md (*zero_extendqisi2_h8300hs): Change - the second alternative to "#". - -2003-04-05 Kazu Hirata - - * config/h8300/h8300.c (single_one_operand): Use GET_MODE_MASK. - (single_zero_operand): Likewise. - -2003-04-05 Daniel Berlin - - * Makefile.in (df.o): Depend on alloc-pool.h, not obstack.h. - * df.c: Include alloc-pool.h, not obstack.h. - (df_ref_obstack): Remove. - (df_ref_pool, df_link_pool): Add pools. - (df_alloc): Init the new pools. - (df_free): And free them. - (df_link_create): Use the pools. - (df_ref_create): Ditto. - -2003-04-05 Kazu Hirata - - * simplify-rtx.c: Fix formatting. - -2003-04-05 Andrew Pinski - - * config/rs6000/rs6000.c (addrs_ok_for_quad_peep): Allow addr2 - reg with reg1 == reg2 and offset1 = -8. - -2003-04-05 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_rtx_costs): Halve Power4 - multiply costs. Correct Power4 divide costs. - * config/rs6000/power4.md: Restore multiply and FP latency. - -2003-04-05 Zdenek Dvorak - - * alias.c (find_base_term): Export. - * rtl.h (find_base_term): Declare. - * gcse.c (find_moveable_store): Test for flag_non_call_exceptions - instead of flag_exceptions. Move test for parameter passing ... - (store_killed_in_insn): ... here. - -2003-04-05 Gerald Pfeifer - - PR bootstrap/10267 - * doc/install.texi (*-*-solaris2): /bin/ksh is not just recommended - for configuring. - -2003-04-04 Geoffrey Keating - - * dbxout.c (scope_labelno): Add GTY. - (have_used_extensions): Add GTY. - (source_label_number): Add GTY. - (lastfile): Add GTY. - (lastfile_is_base): New. - (base_input_file): New. - (dbxout_handle_pch): New. - (dbx_debug_hooks): Add handle_pch. - (xcoff_debug_hooks): Likewise. - (dbxout_function_end): Remove scope_labelno. - (dbxout_init): Set base_input_file. - (dbxout_handle_pch): New. - (dbxout_source_file): Honour lastfile_is_base. - * dwarfout.c (dwarf_debug_hooks): Add dummy handle_pch. - * sdbout.c (sdb_debug_hooks): Add dummy handle_pch. - * vmsdbgout.c (vmsdbg_debug_hooks): Add dummy handle_pch. - * dwarf2out.c (dwarf2_debug_hooks): Add dummy handle_pch. - * debug.c (do_nothing_debug_hooks): Add dummy handle_pch. - * debug.h (struct gcc_debug_hooks): Add handle_pch. - * c-pch.c (pch_init): Don't call start_source_file, but do call - handle_pch. - (c_common_write_pch): Call handle_pch. - (c_common_read_pch): Don't call start_source_file, - or end_source_file. - -Fri Apr 4 17:43:52 2003 Olivier Hainque - - * emit-rtl.c (get_mem_attrs): Adjust alignment tests determining - use of default attributes to agree MEM_ALIGN macro. - -Fri Apr 4 17:33:24 2003 Joel Brobecker - - * dbxout.c (dbxout_type): When printing type index of range type - whose bounds are printed in octal format, print type of parent type if - it exists so enumerated type descriptions are not transformed - into unsigned types. - -2003-04-04 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - compute_a_shift_cc. - * config/h8300/h8300.c (shift_one): Update the CC status. - (shift_two): Likewise. - (output_a_shift_cc): Set cc_inline and cc_special. - (compute_a_shift_cc): New. - * config/h8300/h8300.md (shift insns): Use compute_a_shift_cc. - -2003-04-04 Richard Henderson - - * cse.c (fold_rtx): Fix 03-30 change; do check insn non-null. - -2003-04-04 Loren James Rittle - - * fixinc/inclhack.def (bsd_stdio_attrs_conflict): New. - * fixinc/fixincl.x: Rebuilt. - * fixinc/tests/base/stdio.h: Regenerated. - -2003-04-04 Nathan Sidwell - - * gcov.c (accumulate_line_counts): Fix span tree merge bug. - -Fri Apr 4 15:58:52 2003 J"orn Rennecke - - * sh.h (ACTUAL_NORMAL_MODE): New macro, broken out of - (NORMAL_MODE). - * sh.c (fpscr_set_from_mem): Use ACTUAL_NORMAL_MODE. - -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 Nick Clifton - - * config/sparc/sol2-bi.h: Revert previous delta. - * config/sparc/sol2-gas-bi.h (AS_SPARC64_FLAG): Prepend -TSO - -2003-04-04 Nick Clifton - - * config/v850/v850.c (expand_prologue): Only use register save - helper functions if long calls are not being used. - Add a clobber of r11 id using long calls. - (pattern_is_ok_for_prologue): Account for the extra clobber. - (construct_save_jarl): Likewise. - * config/v850/v850.md (prolog pattern): Do not use this pattern - for v850e's. - -2003-04-04 Andreas Schwab - - * stor-layout.c (layout_decl): Avoid syntax error in last change - when PCC_BITFIELD_TYPE_MATTERS is defined but not - EMPTY_FIELD_BOUNDARY. - -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-03 Neil Booth - - * fix-header.c (read_scan_file): Defer switch processing. - -2003-04-03 Matt Austern - - * cpppch.c (reset_ht): Remove. - (cpp_read_state): Remove loop to reset hashtable identifiers. - * ggc-common.c (gt_pch_save): Add call to gt_pch_fixup_stringpool - after pch file is written. - * ggc.h (gt_pch_fixup_stringpool): Declare. - * stringpool.c (ht_copy_and_clear): Define. Callback. Copy - hashnode's value to another hashtable, then clear the original. - (saved_ident_hash): Define. - (gt_pch_save_stringpool): Create saved_ident_hash, use it to - store definitions in ident_hash, and clear ident_hash. - (gt_pch_fixup_stringpool): Define. Restore definitions from - saved_ident_hash to ident_hash, then destroy saved_ident_hash. - -Thu Apr 3 22:27:40 CEST 2003 Jan Hubicka - - * cfgrtl.c (update_bb_for_insn): Do not set block for barriers. - -2003-04-03 Eric Botcazou - - PR optimization/10157 - * gcse.c (can_copy_p): Rename it to can_copy. - (can_copy_init_p): Remove. - (compute_can_copy): Use can_copy instead of can_copy_p. - (can_copy_p): New exported function. Call compute_can_copy. - (hash_scan_set): Use it. - (gcse_main): Don't call compute_can_copy. - (bypass_jumps): Don't call compute_can_copy. - * rtl.h (can_copy_p): Declare. - * loop.c (scan_loop): Don't move the source and add a reg-to-reg - copy if the mode doesn't support copy operations. - -2003-04-03 Jason Merrill - - * Makefile.in (unstrap): Also remove stage_last. - - * dwarf2out.c (lookup_filename): Don't check for "". - (dwarf2out_source_line): Don't do anything if line==0. - - * stor-layout.c (do_type_align): New fn, split out from... - (layout_decl): ...here. Do all alignment calculations for - FIELD_DECLs here. - (update_alignment_for_field): Not here. - (start_record_layout, debug_rli): Remove unpadded_align. - * tree.h (struct record_layout_info_s): Remove unpadded_align. - * c-decl.c (finish_enum): Don't set DECL_SIZE, DECL_ALIGN - or DECL_MODE on the CONST_DECLs. - (finish_struct): Don't mess with DECL_ALIGN. - -Thu Apr 3 18:57:19 CEST 2003 Jan Hubicka - - * i386.c (print_operand): Do not bypass output_addr_const at flag_pic. - -Thu Apr 3 17:08:09 2003 J"orn Rennecke - - * sh.c (sh_function_ok_for_sibcall): Return 0 if the current - function is an interrupt handler. - - * sh.c (sh_expand_epilogue): Avoid clash of temp register for - restoring target registers with EH_RETURN_STACKADJ_RTX; use - multiple registers in round-robin fashion. - -2003-04-03 Kaveh R. Ghazi - - * gengtype-lex.l (IWORD): Add CHAR_BITFIELD. - * system.h (CHAR_BITFIELD): New. - -2003-04-03 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Generalize to accept GT - and LE. - (another peephole2): Likewise. - -2003-04-03 Nick Clifton - - * config/sparc/sol2-bi.h (ASM_CPU64_DEFAULT_SPEC): Add -TSO. - (DEF_ARCH64_SPEC): Likewise. - -Thu Apr 3 09:53:40 CEST 2003 Jan Hubicka - - * i386.c (constant_address_p): Use legitimate_constant_p. - (legitimate_address_p): Do not use CONSTANT_ADDRESS_P. - -2003-04-02 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - gtle_operator. - * config/h8300/h8300.c (gtle_operator): New. - * config/h8300/h8300.h (PREDICATE_CODES): Add an entry for - gtle_operator. - * config/h8300/h8300.md (a peephole2): Generalize to accept GT - and LE. - -2003-04-02 Richard Henderson - - * libgcc-std.ver (_Unwind_GetCFA): New. - * unwind-dw2.c (_Unwind_GetCFA): New. - * unwind-libunwind.c (_Unwind_GetCFA): New. - * unwind-sjlj.c (_Unwind_GetCFA): New. - * unwind.h: Declare it. - -Thu Apr 3 00:31:21 CEST 2003 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 Mike Stump - - * doc/install.texi (Specific): Update pointers to apple.com. - -Thu Apr 3 00:18:49 CEST 2003 Jan Hubicka - - * i386.c (override_options): Disable red zone by default on i386. - (compute_frame_layout, ix86_force_to_memory, ix86_free_from_memory): - Do not test TARGET_64BIT together with TARGET_RED_ZONE - -2003-04-02 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Tighten the condition. - -2003-04-02 Richard Henderson - - * longlong.h (umul_ppmm) [alpha]: Use __builtin_alpha_umulh. - -2003-04-02 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -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-02 Vladimir Makarov - - * config/rs6000/rs6000.c - (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD): Redefine the - macros. - (rs6000_issue_rate): Add case for 8540. - (rs6000_use_sched_lookahead): New function. - - * config/rs6000/8540.md: Rename SIU units into SU ones and MIU - units into MU ones. - (ppc8540_branch, ppc8540_cr_logical): Add one cycle in the - reservation before retirement. - (ppc8540_multiply, ppc8540_load, ppc8540_store, - ppc8540_simple_float, ppc8540_vector_load, ppc8540_vector_store): - Remove additional cycle in the reservation before retirement. - (ppc8540_mfcr, ppc8540_mtcrf, ppc8540_mtjmpr): Add missed - reservation of ppc8540_issue. - -2003-04-02 Andreas Schwab - - * real.c (decode_ieee_single): Fix decoding of SNaN bit. - -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.text: Add it. - -2003-04-01 David Mosberger - - * config/ia64/crti.asm: Clean up trailing whitespace. - Remove trailing hashes (#) from identifiers. - - * config/ia64/crtn.asm: Ditto. - - * config/ia64/crtend.asm: Remove trailing hashes (#) from - identifiers. - (__do_global_ctors_aux): Align to 32-byte boundary. Add unwind - directives. Drop explicit bundling---it just makes the code - harder to read. Don't save/restore gp needlessly. - - * config/ia64/crtbegin.asm: Remove trailing hashes (#) from - identifiers (they're only needed if the identifier would clash - with a register name otherwise). - (__do_global_dtors_aux): Align to 32-byte boundary. Add unwind - directives. Drop explicit bundling---it just makes the code - harder to read. - (__do_jv_register_classes): Ditto. - (.fini_array): Remove "progbits" (newer - assemblers don't like wrong section-types). - (.init_array): Ditto. - -2003-04-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-01 Alexandre Oliva - - * real.h (EXP_BITS): Make room for... - (struct real_value): ... added canonical bit. - (struct real_format): Added pnan. - (mips_single_format, mips_double_format, mips_extended_format, - mips_quad_format): New. - * real.c: Copy p to pnan in all formats. - (get_canonical_qnan, get_canonical_snan): Set canonical bit. - (real_nan): Use pnan to compute significand's shift. - (real_identical): Disregard significand in canonical - NaNs. - (real_hash): Likewise. Take signalling into account. - (encode_ieee_single, encode_ieee_double, encode_ieee_quad): - Disregard significand bits in canonical NaNs. Set all bits of - canonical NaN if !qnan_msb_set. - (encode_ibm_extended, decode_ibm_extended): Likewise. Use - qnan_msb_set to tell the base double format. - (ibm_extended_format): Use 53 as pnan. - (mips_single_format, mips_double_format, mips_extended_format, - mips_quad_format): Copied from the corresponding ieee/ibm - formats, with qnan_msb_set false. - * config/mips/iris6.h (MIPS_TFMODE_FORMAT): Use mips_extended_format. - * config/mips/linux64.h (MIPS_TFMODE_FORMAT): Use mips_quad_format. - * config/mips/mips.c (override_options): Use mips_single_format - and mips_double_format. Default TFmode to mips_quad_format. - * config/mips/t-linux64 (tp-bit.c): Define QUIET_NAN_NEGATED. - * config/mips/t-irix6: Likewise. - * config/mips/t-mips (fp-bit.c, dp-bit.c): Likewise. - * config/fp-bit.c (pack_d, unpack_d): Obey 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 Eric Botcazou - - * config/sparc/sparc.c (input_operand): Accept bare - CONSTANT_P_RTX operands. - -2003-04-01 Zdenek Dvorak - - * gcse.c (struct ls_expr): Added pattern_regs field. - (ldst_entry): Initialize it. - (extract_mentioned_regs, extract_mentioned_regs_helper): New. - (store_ops_ok): Use regs precomputed by them. - (find_loads, store_killed_in_insn, load_kills_store): Change return - type to bool. - (store_killed_before, store_killed_after): Take position of register - set in account. - (reg_set_info): Store position of the setter. - (gcse_main): Enable store motion. - (mems_conflict_for_gcse_p): Enable load motion of non-symbol mems. - (pre_insert_copy_insn, update_ld_motion_stores, insert_store): Prevent rtl - sharing. - (simple_mem): Enable store motion of non-symbol mems. - (regvec): Type changed. - (LAST_AVAIL_CHECK_FAILURE): New. - (compute_store_table_current_insn): New. - (build_store_vectors): Computation of availability and anticipatability - moved ... - (compute_store_table, find_moveable_store): ... here. - (delete_store): Remove senseless comment. - (store_motion): Reorganize. - -2003-04-01 Kevin Buettner - - * config/mips/mips.c (override_options): Provide mappings for - HI_REGNUM and LO_REGNUM. - * config/mips/mips.h (MD_DBX_FIRST): Define. - -2003-04-01 Franz Sirl - - * combine.c (merge_outer_ops): Fix typo. - - * varasm.c (make_decl_one_only): Revert 2003-03-09 patch. - -2003-04-01 David Edelsohn - - * config/rs6000/{40x.md,603.md,6xx.md,7450.md,7xx.md,mpc.md, - power4.md,rios1.md,rios2.md,rs64.md}: Change mult_compare to - imul_compare. Add lmul_compare. - * config/rs6000/power4.md: Bump some latencies. Model extra cycle - in second pair of dispatch slots. Model stores more accurately. - Tweak multiply model. Add bypasses for CR instructions dependent - on complicated compares. - * config/rs6000/rs6000.md (mulsi3): Name imul_compare patterns. - (muldi3): Add lmul_compare patterns. - * config/rs6000/rs6000.c (rs6000_variable_issue): Move FPLOAD_UX - and FPSTORE_UX to split instructions and add COMPARE, - DELAYED_COMPARE, IMUL_COMPARE, LMUL_COMPARE, IDIV, LDIV. - (rs6000_adjust_cost): Add IMUL_COMPARE and LMUL_COMPARE. - (rs6000_rtx_costs): Separate POWER4 multiply case. - -2003-04-01 Ulrich Weigand - - * config/s390/s390.c (s390_fixup_clobbered_return_reg): - Do nothing if __builtin_return_address was not used. - -Tue Apr 1 18:18:23 CEST 2003 Jan Hubicka - - * i386.md (test patterns): Allow memory operand in operand1. - -2003-04-01 Aldy Hernandez - - * testsuite/gcc.c-torture/execute/simd-3.c: New. - - * expr.c (expand_expr): Handle VECTOR_CST. - (const_vector_from_tree): New. - - * varasm.c (output_constant): Handle VECTOR_CST. - - * c-typeck.c (digest_init): Build a vector constant from a - VECTOR_TYPE. - - * config/rs6000/rs6000.c: Remove prototype for - easy_vector_constant. - (easy_vector_constant): Add mode parameter. Rewrite to handle - more easy constants. - (rs6000_emit_move): Pass mode to easy_vector_constant. - Call emit_easy_vector_insn for SPE V2SI vector constant moves. - (emit_easy_vector_insn): New. - (easy_vector_same): New. - (EASY_VECTOR_15): New macro. - (EASY_VECTOR_15_ADD_SELF): New macro. - (bdesc_2arg): Rename to xorv2si3. - (easy_vector_constant_add_self): New. - (input_operand): Allow vector constants. - - * config/rs6000/rs6000.h (PREDICATE_CODES): Add - easy_vector_constant, easy_vector_constant_add_self. - (EXTRA_CONSTRAINT): Add 'W'. - - * config/rs6000/rs6000-protos.h: Add prototype for - easy_vector_constant, emit_easy_vector_insn. - - * config/rs6000/altivec.md (xorv8hi3): New. - (xorv16qi3): New. - Remove all _const0 patterns. - (movv4si_internal): Rewrite to use code. Add vector constant to - vector alternative. Add splitter. - (movv8hi_internal): Same. - (movv16qi_internal): Same. - (movv4sf_internal): Same. - Change the unspecs for vspltis* to use constants. - - * config/rs6000/spe.md ("xorv4hi3"): New. - ("spe_evxor"): Rename to xorv2si3. - ("xorv1di3"): New. - Remove all _const0 patterns. - (movv2si_internal): Rewrite to use code. Add vector constant to - alternatives. Add splitter. - (movv4hi_internal): Add vector constant to alternatives. - (movv1di_internal): Same. - (movv2sf_internal): Same. - -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 Eric Christopher - - * combine.c (can_combine_p): Allow ZERO_EXTRACT and STRICT_LOW_PART. - (combinable_i3pat): Remove call to expand_field_assignment and - #if 0'd code. - -2003-03-31 Mark Mitchell - - PR c++/10278 - * c-common.c (finish_label_address_expr): Handle the - error_mark_node. - -2003-03-31 Richard Henderson - - * real.c (real_identical): Reorg so as to not compare - signalling for normals. - -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-31 Matt Austern - - * cpppch.c (struct cpp_savedstate): Add defs and n_defs members. - (count_defs): Keep track of number of defs as well as total size. - (write_defs): Put every definition in cpp_savedstate's defs array. - (comp_hashnode): Define. Comparison function for qsort. - (cpp_write_pch_deps): Sort definitions before writing them. - (struct ht_node_list): Define. Like cpp_savedstate but simpler. - (collect_ht_nodes): Define. - (cpp_valid_state): When verifying that undefined identifiers in - the pch file are still undefined, read a sorted list of undefined - identifiers, collect all defined identifiers into a sorted list, - and walk through both lists to make sure there's no match. - -2003-03-31 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-03-31 Michael Matz - - * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): Change 1 into 0. - -2003-03-31 Segher Boessenkool - - PR target/10177 - * config/rs6000/rs6000.h (HARD_REGNO_RENAME_OK): New. - * config/rs6000/rs6000.c (compute_vrsave_mask): Don't mark - all call-clobbered registers as used. - -2003-03-31 Michael Matz - - * cppexp.c (cpp_classify_number): Accept '.' after "0x". - * testsuite/gcc.dg/cpp/c99-hexfloat-3.c: New file. - -2003-03-31 Nathan Sidwell - - * gcov.c: Add -a & -u options. - (struct arc_info): Add local_span, is_call_non_return, - is_nonlocal_return, is_unconditional flags, remove is_call flag. - (struct block_info): Add flags, is_call_site, is_nonlocal_return - members. Make encodings a union with span member. - (struct function_info): Add blocks_executed, line, src, line_next - members. - (struct coverage_info): Make branches a union with blocks member. - (struct source_info): Add functions member. - (object_summary, program_count): New global variables. - (flag_all_blocks, flag_unconditional): New flags. - (find_source, output_branch_count): New functions. - (print_usage): Adjust. - (options): Adjust. - (process_args): Adjust. - (read_graph_file) : Adjust. - : Read flags. - : Adjust. - (read_count_file): Process SUMMARY tags. - (solve_flow_graph): Set is_unconditional and clear is_call_site - appropriately. - (add_branch_counts): Adjust. Don't count unconditional branches. - (add_line_counts): Deal with all-blocks mode, accumulate block - coverage. - (accumulate_line_counts): Adjust, generate local spanning tree for - all-blocks mode. - (output_lines): Adjust. - * profile.c (branch_prob): Alter GCOV_FUNCTION_TAG record. - * doc/gcov.texi: Document. - -2003-03-31 Kazu Hirata - - * config/h8300/h8300.md: Organize peephole2's that transform - (compare (reg:HI) (const_int)). - -2003-03-31 Roger Sayle - - * emit-rtl.c (dconstm2, dconsthalf): New real constants. - (init_emit_once): Initialize dconstm2 and dconsthalf here. - * real.h (dconstm2, dconsthalf): Add prototypes here. - * real.c (real_sqrt): Use dconsthalf rather than local copy. - * builtins.c (fold_builtin): When optimizing sqrt(exp(x)) as - exp(x/2.0) remember to fold the division if possible. - Fold sin(0.0) as 0.0, cos(0.0) as 1.0, pow(x,1.0) as x, - pow(x,-1.0) as 1.0/x, pow(x,2.0) as x*x, pow(x,-2.0) as - 1.0/(x*x) and pow(x,0.5) as sqrt(x). - -2003-03-31 Kazu Hirata - - * config/h8300/h8300.md (a new peephole2): New. - -2003-03-31 Richard Sandiford - - * gcse.c (simple_mem): Return false for floating-point accesses - if flag_float_store is true. - -2003-03-30 Roger Sayle - - * gcse.c (gcse_constant_p): New function to identify constants - suitable for constant propagation, including COMPARE with two - integer constant arguments. - (hash_scan_set): Use gcse_constant_p. - (find_avail_set): Likewise. - (cprop_insn): Likewise. - (do_local_cprop): Likewise. - (find_implicit_sets): Likewise. - (find_bypass_set): Likewise. - -2003-03-30 Matt Kraai - - * except.h: Remove definition of varray_type. - -2003-03-30 Richard Henderson - - PR opt/10011, opt/10252: - * toplev.c (rest_of_compilation): Run purge_builtin_constant_p - before post-gcse cse pass. - -2003-03-30 Roger Sayle - - * dojump.c (do_jump): Copy SUBREGs into a pseudo for comparison. - -2003-03-30 DJ Delorie - - * profile.c (instrument_edges): Make sure any newly created - jump insns have correct jump label info. - -2003-03-30 Richard Henderson - - * cfgbuild.c (make_edges): Use tablejump_p. - * cfgcleanup.c (label_is_jump_target_p): Likewise. - * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise. - * cfgrtl.c (flow_delete_block_noexpunge): Likewise. - (try_redirect_by_replacing_jump): Likewise. - (redirect_edge_and_branch): Likewise. - * cse.c (fold_rtx): Likewise. - * jump.c (delete_related_insns): Likewise. - * rtlanal.c (get_jump_table_offset): Likewise. - * ssa-ccp.c (ssa_ccp_df_delete_unreachable_insns): Likewise. - -2003-03-30 Gabriel Dos Reis - - * Makefile.in (STRICT_WARN): Don't warn for ISO C constructs. - (STRICT2_WARN): Likewise. - -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-30 Kazu Hirata - - * reload1.c (reload_cse_move2add): Fix a comment typo. - -2003-03-30 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Remove useless code. - -2003-03-29 Kazu Hirata - - * config/h8300/h8300.md (*iorsi3_and_ashift): New. - (*iorsi3_and_lshiftrt): Likewise. - (*iorsi3_zero_extract): Likewise. - -2003-03-29 Kazu Hirata - - * config/h8300/h8300.md (*insv_si_8_8): New. - (*insv_si_8_8_lshiftrt_8): Likewise. - (a peephole2): Likewise. - -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-28 Albert Chin-A-Young - - * gcc/fixinc/inclhack.def: Update solaris_mutex_init_1 to - work on Solaris 2.5.1. - -2003-03-28 Kazu Hirata - - * config/h8300/h8300.md (*addsi3_and_r_1): Put under plus:SI - section of h8300.md - (*addsi3_and_nor_r_1): Likewise. - -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 Nathanael Nerode - - * configure.in: Clarify comments. - * configure: Regenerate. - -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 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 Alan Modra - - * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_BSS): Remove unnecessary - globalize_label. - * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * config/i960/i960.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * config/mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * config/mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * config/sparc/sparc.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. - * config/v850/v850.c (v850_output_aligned_bss): Likewise. - -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 - Richard Henderson - - PR target/10114 and PR target/10084 - * dwarf2out.c (mem_loc_descriptor): Handle LO_SUM. - -2003-03-27 Richard Henderson - - * config/alpha/alpha.md (adddi_er_high_l): Valid only after reload. - -2003-03-27 Roger Sayle - - * fold-const.c (fold_inf_compare): New function to simplify FP - comparisons against +Infinity or -Infinity. - (fold): Optimize floating point comparisons against Infs and NaNs. - -2003-03-27 Janis Johnson - - * libgcov.c: Provide only dummy functions if libc is not available. - -2003-03-27 Richard Henderson - - * real.h (struct real_value): Add signalling. - (EXP_BITS): Decrement. - * real.c (get_canonical_qnan): Don't set MSB-1. - (get_canonical_snan): Likewise. Set signalling. - (real_identical): Compare signalling. - (round_for_format): Remove force-one-bit on code. - (real_nan): Likewise. Set signalling. - (encode_ieee_single): Add force-one-bit code; honor signalling. - (encode_ieee_double, encode_ieee_extended, encode_ieee_quad): Likewise. - (decode_ieee_single): Set signalling. - (decode_ieee_double, decode_ieee_extended, decode_ieee_quad): Likewise. - -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-27 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-27 David Mosberger - - * unwind-libunwind.c (uw_frame_state_for): Adjust for libunwind - v0.9 API change: replace read of UNW_REG_HANDLER with - unw_get_proc_info(). - (_Unwind_GetLanguageSpecificData): Replace read of UNW_REG_LSDA - with unw_get_proc_info(). - (_Unwind_GetRegionStart): Replace UNW_REG_PROC_START with - unw_get_proc_info(). - -2003-03-27 Vladimir Makarov - - * config/rs6000/8540.md: Use presence_set instead of absence_set. - -2003-03-26 Richard Henderson - - * c-decl.c (finish_function): Always defer if DECL_DECLARED_INLINE_P. - -2003-03-26 Roger Sayle - - PR bootstrap/10051, PR bootstrap/10169. - * mips-tfile.c (init_file): Don't provide a static initializer. - (initialize_init_file): Initialize the contents of init_file. - (add_file): Call initialize_init_file if not already initialized. - -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 Vladimir Makarov - - * config/rs6000/8540.md: New file. - - * config/rs6000/{40x.md, 603.md, 6xx.md, 7450.md, 7xx.md, mpc.md, - power4.md, rios1.md, rios2.md, rs64.md}: Add mult_compare to - reservations for imul. - - * config/rs6000/rs6000.md: Include 8540.md. Change - delayed_compare onto mult_compare for insns generating - multiplication. - (mult_compare, fpsimple, brinc, vecdiv, veccmpsimple, vecfdiv): - New type attribute values. - - * config/rs6000/spe.md (*negsf2_gp, *abssf2_gpr): Use type - fpsimple instead of fp. - (*divsf3_gpr): Use type vecfdiv instead of fp. - (spe_evfsabs, spe_evfsnabs, spe_evfsneg): Use type vecsimple - instead of vecfloat. - (spe_evfsdive): Use type vecfdiv instead of vecfloat. - (spe_brinc): Use type brinc instead of veccomplex. - (spe_evaddw, spe_evaddiw): Use type vecsimple instead of - veccomplex. - (spe_evdivws, spe_evdivwu): Use type vecdiv instead of veccomplex. - (*movv2si_internal, *movv1di_internal, *movv4hi_internal, - *movv2sf_internal): Define type attribute values for all - alternatives. - (cmpsfeq_gpr, cmpsfgt_gpr, cmpsflt_gpr): Use type veccmp instead - of fpcompare. - (tstsfeq_gpr, tstsfgt_gpr, tstsflt_gpr): Use type veccmpsimple - instead of fpcompare. - -2003-03-26 David Edelsohn - - * config/rs6000/power4.md: Allow delay between dispatch and - function units for simple instructions. Correct store units. - Allow branch to occupy as many dispatch slots as necessary. - -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-26 Alan Modra - - * c-incpath.c (add_standard_paths): Add both "translated" and - non-translated header paths. - -2003-03-25 Loren James Rittle - - * doc/install.texi (*-*-freebsd*): Update with known status. - -2003-03-21 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. - -Tue Mar 25 20:35:51 CET 2003 Jan Hubicka - - * i386.c (ix86_rtx_costs): For -fpic and x86-64 local symbolic - constants are not expensive. - -Mon Mar 24 20:03:03 CET 2003 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. - -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 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Extend to support loads - in QImode and HImode. - -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-24 Neil Booth - - * toplev.c (independent_decode_option): Don't skip a 'Y' prefix. - -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. - * config/ia64/ia64.c (spill_tfmode_operand): Likewise. - -2003-03-24 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-03-24 Jakub Jelinek - - * dojump.c (do_jump): Handle UNSAVE_EXPR specially. - -2003-03-24 Gerald Pfeifer - - * doc/contrib.texi (Contributors): Update Janis Johnson. - -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-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-24 Alan Modra - - * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Remove unnecessary - globalize_label. - -2003-03-23 Roger Sayle - - PR c/10178 - * stmt.c (expand_end_case_type): Check for overflow in range when - determining whether to use a bit-test implementation. - -2003-03-23 Richard Henderson - - * cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps - before flow2. - * cfgrtl.c (try_redirect_by_replacing_jump): Similarly. - -2003-03-23 Richard Henderson - - PR opt/10116 - * ifcvt.c (find_if_block): Disallow tablejump insns outgoing - from then_bb or else_bb after flow2. - -2003-03-23 Zack Weinberg - - * configure.in: Check whether it is necessary to link against - libm to use ldexp. - * configure: Regenerate. - * Makefile.in: Add LDEXP_LIB substitution variable. - -2003-03-23 Kazu Hirata - - * config/h8300/h8300.md: Fix comment typos. - -2003-03-22 John David Anglin - - * pa.c (output_cbranch): Fix typo in comment. - -2003-03-22 Richard Henderson - - * cfgcleanup.c (insns_match_p): Do not do EQUIV substitution - after reload. - -2003-03-22 DJ Delorie , - Bruce Korb - - * fixinc/inclhack.def (solaris_mutex_init_1): New; Fix - buggy Solaris 2.6 mutex/cond initializers. - (solaris_mutex_init): Rename to solaris_mutex_init_2. - * fixinc/fixincl.x: Regenerate. - * fixinc/tests/base/pthread.h: Update. - * fixinc/fixincl.c(initialize): be explicit about the default case - and indicate verbose level when being very, very verbose. - * fixinc/check.tpl(VERBOSE): provide a means for passing the value in - -2003-03-22 Andreas Jaeger - - * config/i386/i386.c (ix86_init_machine_status): Return value. - -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 Kazu Hirata - - * config/h8300/h8300.c (notice_update_cc): Correctly handle - the case where the set destination is STRICT_LOW_PART. - -2003-03-22 Svein E. Seldal - - * config/c4x/t-c4x (INSTALL_LIBGCC): Make gcc recognize a c33 as a - c30 instead of a c40 processor. - -2003-03-22 Alan Modra - - * combine.c (simplify_comparison ): Use gen_int_mode. Tidy. - -2003-03-21 Zack Weinberg - - * c-common.c: Include intl.h. - (shadow_warning): Rewrite to allow better diagnostic translations. - * c-common.h: Update prototype of shadow_warning. Declare sw_kind enum. - * c-decl.c (warn_if_shadowing): Update calls to shadow_warning; - use it throughout. - * Makefile.in (c-common.o): Add intl.h. - -2003-03-21 Nathanael Nerode - - * config.gcc: Remove 'float_format'. - - * fixproto: Define NULL and size_t in generated stdlib.h and - unistd.h. Kill unused required_stdlib_h, required_unistd_h. - Rearrange file generation loop for readability. Generate time.h, - string.h if missing. - * tsystem.h: Include , unconditionally. - * config.gcc: Blow away POSIX defines. - -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 - - * i386.c (ix86_compute_frame_layout): Recompute fast prologues - only when amount of saved regs changed. - (ix86_init_machine_status): Initialize use_fast_prologue_epilgoue_nregs. - * i386.h (machine_function): New fields use_fast_prologue_epilgoue_nregs. - -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 Kazu Hirata - - * combine.c (make_field_assignment): Fix a warning. - -2003-03-21 Kazu Hirata - - * config/h8300/h8300.md (*insv_si_1_n_lshiftrt_16): New. - -2003-03-21 Dale Johannesen - - * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Increase - priority for R2 on Darwin. - (HARD_REGNO_MODE_OK): Don't accept R31 for DFmode. - -2003-03-21 Kazu Hirata - - * combine.c (make_field_assignment): Remove unnecessary AND - when storing into zero_extract. - -2003-03-21 Zack Weinberg - - * aclocal.m4 (gcc_AC_EXAMINE_OBJECT, gcc_AC_C_FLOAT_FORMAT): Delete. - * configure.in: Don't call gcc_AC_C_FLOAT_FORMAT. - * defaults.h: Remove reference to HOST_FLOAT_WORDS_BIG_ENDIAN - in comment. - -2003-03-21 DJ Delorie - - * optabs.c (init_integral_libfuncs): Make sure we init at least up - to "long long" size words. - -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 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-21 DJ Delorie - - * config/stormy16/stormy16.c (xstormy16_expand_arith): Make - sure we always emit at least one insn. - -2003-03-21 Christopher Faylor - - * config.gcc (i[34567]86-*-cygwin*): Use new common makefile - stub t-cygming. Use common target header cygming.h. Add extra - c_target_obj and cxx_target_obj file. Default cygwin to posix - threading. Enforce i386 as float format. - (i[34567]86-*-mingw*): Use new common makefile stub t-cygming. - Remove cygwin.h as target header. Use common target header - cygming.h Enforce i386 as float format. Correct typo. - * config/i386/cygming.h: New file, containing definitions - common to mingw32 and cygwin. - * config/i386/cygwin.h: Remove definitions common to cygwin and - mingw. Simplify special spec logic. Define "wrappers" around - certain include path defines to accommodate -mno-cygwin. - Remove some #if 0'ed code. - (STANDARD_INCLUDE_DIR) Always define when not cross-compiling. - (LINK_SPEC): Don't use cyg search prefix when -mno-cygwin. - (GCC_DRIVER_HOST_INITIALIZATION): Define as call to mingw_scan. - * config/i386/mingw32.h: Remove definitions common to cygwin and - mingw. - (EXTRA_OS_CPP_BUILTINS): Adjust. - (TARGET_VERSION): Define. - * config/i386/crtdll.h (EXTRA_OS_CPP_BUILTINS): Override - mingw32.h definitions. - (LIBGCC_SPEC): Add libmingwex.a as in mingw32.h. - * config/i386/t-cygwin (EXTRA_GCC_OBJS): Define as cygwin1.o. - Add compilation rules for cygwin1.o cygwin2.o. - * config/i386/cygwin1.c: New file. - * config/i386/cygwin2.c: New file. - * config/i386/t-cygming: New makefile stub. - -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 Daniel Berlin - Merge changes from new-regalloc-branch - - From Michael Matz - * df.c (df_ref_record_1): Move init of loc to safe point. - Only recurse on interesting things in parallels. - Handle CLASS_CANNOT_CHANGE_MODE smarter. - (df_uses_record): Ditto. - - * df.h (DF_REF_MEM_OK): New enum member, used to mark ref's which - it's already okay to use memory operands in (IE doesn't require - adding another insn or anything). - -2003-03-20 Richard Henderson - - PR middle-end/6348 - * explow.c (allocate_dynamic_stack_space): Handle STACK_SIZE_MODE - different from word_mode. - -2003-03-20 Kazu Hirata - - * config/h8300/h8300.md (*insv_si_1_n_lshiftrt): Restrict the - source operand to those that can be extracted with bld. - -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-20 Kazu Hirata - - * config/h8300/h8300.md (*insv_si_1_n): New. - (*insv_si_1_n_lshiftrt): Likewise. - -2003-03-20 Roger Sayle - - * fold-const.c (fold_mathfn_compare): New function to simplify - comparisons against built-in math functions. Fold comparisons - of sqrt against constants. - (fold): Call fold_mathfn_compare when appropriate. - -2003-03-20 Richard Earnshaw - - * ifcvt.c (find_if_case_1): If we add a new bb, update the dominance - information. - -2003-03-20 Per Bothner - - Various cleanups to help compile server. - - * cppinit.c (cpp_create_reader): Take extra hash_table* argument, - and pass that to _cpp_init_hashtable. - (cpp_read_main_file): Drop hash_table* argument; don't call - _cpp_init_hashtable. - * cpplib.h: Update declarations to match. - * c-opts.c (c_common_init_options): Pass ident_hash to - cpp_create_reader. - (c_common_post_options): Don't pass ident_hash to cpp_read_main_file. - * fix-header.c (read_scan_file): Likewise pass NULL table to - cpp_create_reader rather than cpp_read_main_file. - - * cppfiles.c (cpp_rename_file): Generalized and renamed - to cpp_change_file. - * cpplib.h: Update declaration to match. - * c-opts.c (push_command_line_line, finish_options): Change - cpp_rename_file calls to cpp_change_file. - - * line-map.c (add_line_map): Allow leaving the outermost file. - Allowing entering an outermost-file after the initial time. - - * toplev.c (pop_srcloc): Allow popping from initial file. - -2003-03-20 Kazu Hirata - - * fold-const.c (fold): Fold A - (A & B) into ~B & A. - -2003-03-20 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-03-20 Kazu Hirata - - * config/h8300/h8300.md (*addsi3_and_r_1): New. - (*addsi3_and_not_r_1): Likewise. - -2003-03-19 Loren James Rittle - - * Makefile.in (STRICT2_WARN): Add @WERROR@. - (GCC_WARN_CFLAGS): Remove $(WERROR). - (fixinc.sh-warn): New. - * ada/Make-lang.in (ada-warn): Add $(WERROR). - * cp/Make-lang.in (cp-warn): Add $(WERROR). - * f/Make-lang.in (f-warn): Add $(WERROR). - * java/Make-lang.in (java-warn): Add $(WERROR). - * treelang/Make-lang.in (treelang-warn): Add $(WERROR). - -2003-03-19 Nathanael Nerode - - * c-common.h (c_dump_tree), c-dump.c (c_dump_tree), - langhooks-def.h (lhd_tree_dump_dump_tree), - langhooks.c (lhd_tree_dump_dump_tree), langhooks.h (*dump_tree): - Change return type from 'int' to 'bool'. Replace 0 and 1 with - true and false in return statements. - -2003-03-19 Kevin Buettner - - * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE): Define. - (DWARF_COMPILE_UNIT_HEADER_SIZE): Take into account - DWARF_INITIAL_LENGTH_SIZE. - (output_compilation_unit_header, output_pubnames, output_aranges) - (output_line_info): Output 0xffffffff escape value for 64-bit - DWARF extension. - * config/mips/iris6.h (DWARF_INITIAL_LENGTH_SIZE): Define. - -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 Jan Hubicka - - * i386.h (machine_function): New fields use_fast_prologue_epilogue. - * i386.c (use_fast_prologue_epilogue): Remove. - (ix86_frame): New field save_regs-using_mov; - (ix86_compute_frame_layout): Decide on fast prologues; - allocate saved registers in red zone. - (ix86_expand_epilogue, ix86_expand_prolgoues): Obey new parameters. - -2003-03-19 Nick Clifton - - * config/mcore/mcore.h (CPP_SPEC): Remove trailing semi-colon. - -2003-03-18 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-19 Alan Modra - - * config/rs6000/rs6000.c (rs6000_stack_info): Only require a frame - when debugging on XCOFF targets. Delete "abi" temp. - - PR target/10073 - * combine.c (force_to_mode ): Use gen_int_mode. - -2003-03-18 Jakub Jelinek - - * config/s390/s390.c (s390_output_dwarf_dtprel): New. - * config/s390/s390-protos.h (s390_output_dwarf_dtprel): New proto. - * config/s390/s390.h (ASM_OUTPUT_DWARF_DTPREL): Define. - - * config/ia64/ia64.c (ia64_output_dwarf_dtprel): New. - * config/ia64/ia64-protos.h (ia64_output_dwarf_dtprel): New proto. - * config/ia64/ia64.h (ASM_OUTPUT_DWARF_DTPREL): Define. - -2003-03-18 Geoffrey Keating - - * config/rs6000/rs6000.c (rs6000_emit_prologue): Don't clone - the result of machopic_function_base_name. - * config/darwin.c (machopic_function_base_name): Use a gc-allocated - string rather than a static array. - - * Makefile.in (emit-rtl.o): Add gt-emit-rtl.h to dependencies. - - * gengtype.c: Include rtl.h. - (enum rtx_code): Don't define. - (rtx_format): Make declaration match rtl.h. - (rtx_next_new): Rename from rtx_next to avoid conflict. Change all - users. - (adjust_field_rtx_def): Describe strings in NOTE_LINE_NUMBER notes. - * Makefile.in (gengtype.o): Update dependencies. - -2003-03-18 Andreas Schwab - - * config/m68k/m68k.md (iordi3): Fix setting low half to -1. From - martin@blom.org. - -2003-03-18 Geoffrey Keating - - * function.c (next_block_index): Mark with GTY. - - * config/rs6000/rs6000.md (macho_correct_pic): Correct pattern. - -2003-03-18 Richard Henderson - - * config/ia64/ia64.md (UNSPECV_SETJMP_RECEIVER): New. - (builtin_setjmp_receiver): Delay call to ia64_reload_gp - until after reload. - -2003-03-18 Richard Henderson - - * builtins.c (expand_builtin_unop): New target_mode operand; - use it to convert the result to the correct mode. - (expand_builtin): Update all callers. - -2003-03-18 Ulrich Weigand - - * config/s390/s390.md ("movti", "movhi", "movqi"): Add "type" attribute. - -2003-03-18 Jan Hubicka - - * i386.md: Fix previous commit that mistakely applied the patch - twice. - - * alias.c (rtx_equal_for_memref_p): Assume that X and Y has been - canonicalized. - (memrefs_conflict_p): Likewise. - (addr_side_effect_eval): Canonicalize the constructed address. - -2003-03-18 Jan Hubicka - - * i386.md (cvtts?2si peep2): New. - -2003-03-18 Kazu Hirata - - * config/h8300/h8300.md (*iorsi3_two_qi_zext): New. - -2003-03-18 Andreas Schwab - - * dwarf2out.c (output_file_names): Cast size_t to unsigned long - for format. - -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-18 Alan Modra - - * config/rs6000/linux64.h (MASK_PROFILE_KERNEL): Define. - (TARGET_PROFILE_KERNEL): Define. - (SUBTARGET_SWITCHES): Handle -mprofile-kernel. - (PROFILE_BEFORE_PROLOGUE): Don't define. - (PROFILE_KERNEL): Remove hacks. - * config/rs6000/rs6000.c (TARGET_PROFILE_KERNEL): Define default. - (rs6000_stack_info): No need to save lr if just for profiling when - TARGET_PROFILE_KERNEL. - (output_profile_hook): Output nothing when TARGET_PROFILE_KERNEL. - (output_function_profiler): Localize label generation. Emit code - for kernel profiling. - -2003-03-17 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - byte_accesses_mergeable_p. - * config/h8300/h8300.c (byte_accesses_mergeable_p): New. - * config/h8300/h8300.md (*iorhi3_two_qi_mem): Likewise. - (a splitter): Likewise. - (*iorsi3_ashift_16_ashift_24): Likewise. - (*iorsi3_ashift_16_ashift_24_mem): Likewise. - -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 Zack Weinberg - - * c-tree.h (struct lang_identifier): Remove error_locus field. - (IDENTIFIER_ERROR_LOCUS): Kill. - (record_function_scope_shadow): New prototype. - * c-typeck.c (build_external_ref): Don't complain if - decl is error_mark_node. When not at file scope, bind the - decl's local value to error_mark_node to suppress further - warnings, instead of setting IDENTIFIER_ERROR_LOCUS. - - * c-decl.c (get_function_binding_level): New static function. - (record_function_scope_shadow): New exported function. - (c_make_fname_decl): Use get_function_binding_level. - -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 Zdenek Dvorak - - * loop-unroll.c (decide_peel_completely, - decide_unroll_constant_iterations, decide_unroll_stupid, - decide_unroll_runtime_iterations, decide_peel_simple): Set - loop->has_desc. - -2003-03-17 Jan Hubicka - - * ggc-common.c (ggc_mark_roots): Use htab_traverse_noresize. - -2003-03-17 Olivier Hainque - - * function.c (assign_parms): For a struct value address passed as - first argument, delay the function's result RTL setup code until - after the emission of parameter conversions. - -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 Neil Booth - - * c-opts.c: Default TARGET_EBCDIC to 0 if not defined. - (c_common_init): Set EBCDIC in cpp options. - * cpplex.c (maybe_read_ucs, cpp_parse_escape): Use EBCDIC option, - not conditional compilation. - * cpplib.h (struct cpp_options): New entry EBCDIC. - -2003-03-17 Neil Booth - - * fix-header.c (read_scan_file): Need to malloc arguments to add_path. - -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-17 Andreas Jaeger - - * Makefile.in (TAGS): Remove obsolete handling of =*.[chy]. - -2003-03-17 Alan Modra - - * config/rs6000/linux64.h (TARGET_64BIT): Redefine. - (TARGET_RELOCATABLE, TARGET_EABI, TARGET_PROTOTYPE): Likewise. - (SUBTARGET_SWITCHES, SUBTARGET_OPTIONS): Likewise. - (SUBTARGET_OVERRIDE_OPTIONS, CPP_SYSV_SPEC): Likewise. - -2003-03-16 Richard Henderson - - * simplify-rtx (simplify_binary_operation): Don't abort for - SS_PLUS, US_PLUS, SS_MINUS, US_MINUS. - -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 Andreas Jaeger - - * configure.in: Improve check for memcheck.h. - * configure: Regenerated. - -2003-03-16 Neil Booth - - * doc/cppopts.texi: Remove documentation of -A-. - -2003-03-15 Zack Weinberg - - * doc/libgcc.texi: Remove @tie. - -2003-03-15 Josef Zlomek - - * rtl.h (subrtx_p): Renamed to rtx_referenced_p. - (rtx_pair): Added new element update_label_nuses, renamed to - replace_label_data. - * cfgcleanup.c (outgoing_edges_match, try_crossjump_to_edge): Use - replace_label_data instead of rtx_pair. - * loop.c (load_mems): Likewise. - * rtlanal.c (replace_label): Replace label in pool constants and in - INSN_LIST (in REG_LABEL note). - (subrtx_p): Renamed to rtx_referenced_p. - (subrtx_p_1): Renamed to rtx_referenced_p_1, compare the interior of - LABEL_REF with CODE_LABEL, traverse constants from pool. - -2003-03-15 Aldy Hernandez - Zack Weinberg - - * Makefile.in (TEXI_GCCINT_FILES): Add libgcc.texi. - * doc/libgcc.texi: New file. - * doc/interface.texi: Delete paragraph about libgcc interface. - * doc/gccint.texi: Add libgcc menu entry and @include libgcc.texi. - -2003-03-15 Jason Merrill - - PR debug/9039 - * dwarf2out.c (gen_decl_die): Ignore frontend tree codes. - - 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 Neil Booth - - * fix-header.c (read_scan_file): Read main file before handling -D. - -2003-03-15 Roger Sayle - - * c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace. - * c-typeck.c (c_tree_expr_nonnegative_p): Likewise. - * cfgbuild.c (find_many_sub_basic_blocks): Likewise. - (find_sub_basic_blocks): Likewise. - * cgraphunit.c (cgraph_expand_functions): Likewise. - * dwarf2out.c (prune_unused_types): Likewise. - * expr.c (store_field): Likewise. - * genextract.c (print_path): Likewise. - * haifa-sched.c (schedule_insn): Likewise. - * lcm.c (compute_antinout_edge): Likewise. - * loop-unroll.c (decide_peel_once_rolling): Likewise. - * ra-colorize.c (ra_colorize_free_all): Likewise. - * ra-debug.c (dump_igraph): Likewise. - (debug_hard_reg_set): Likewise. - * reg-stack.c (reg_to_stack): Likewise. - * rtlanal.c (refers_to_regno_p): Likewise. - * tracer.c (layout_superblocks): Likewise. - -2003-03-15 Neil Booth - - * fix-header.c (read_scan_file): Fix thinko. - -2003-03-15 Glen Nakamura - - * reload1.c (choose_reload_regs): Use && instead of || - with REG_CANNOT_CHANGE_MODE_P condition. - -2003-03-15 Neil Booth - - * Makefile.in: Update. - * c-common.h (cb_register_builtins): Rename c_cpp_builtins. - * c-lex.c (init_c_lex): Register builtins hook is dead. - * c-opts.c (COMMAND_LINE_OPTIONS, missing_arg): Handle -A, -D and -U. - (c_common_decode_option): Don't call cpp_handle_option. - Handle -A, -D and -U. - (handle_deferred_opts): Simplify. - (finish_options): Define builtins and command line macros. - * c-ppoutput.c (init_pp_output): Register builtins hook is dead. - * cppinit.c: Don't include intl.h. - (init_builtins): Rename cpp_init_builtins. No hook to call. - (init_library): Don't need to sort options. - (cpp_create_reader): Don't set pending. - (cpp_destroy): Don't free pending. - (struct pending_option, cl_directive_handler, struct cpp_pending, - APPEND, free_chain, new_pending_directive, parse_option, opt_comp, - cpp_finish_options, COMMAND_LINE_OPTIONS, DEF_OPT, struct cl_option, - cl_options, cpp_handle_option): Remove. - * cpplib.h (struct cpp_pending, register_builtins, cpp_handle_option, - cpp_finish_options): Remove. - (cpp_init_builtins): New. - * fix-header.c (read_scan_file): Update to handle -D. Fix - handling of -I. Replace call to cpp_finish_options. - -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-14 Neil Booth - - * c-opts.c (finish_options): New. - (COMMAND_LINE_OPTIONS, c_common_decode_option): Add -imacros. - (missing_arg): Handle OPT_include and OPT_imacros. - (c_common_init, c_common_parse_file): Use finish_options. - (handle_deferred_opts): Update. - * cppinit.c (struct cpp_pending): Remove imacros_head and imacros_tail. - (cpp_finish_options): Don't handle -imacros here. - (no_fil): Remove. - (COMMAND_LINE_OPTIONS, cpp_handle_option): Don't handle -imacros. - -2003-03-14 Jakub Jelinek - - * config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Don't call - rs6000_maybe_dead if !fromprolog. - -2003-03-14 Neil Booth - - * Makefile.in: Update. - * c-common.h (fe_file_change, pp_file_change): New. - * c-lex.c (init_c_lex): Don't set cb_file_change. - (c_common_parse_file): Move to c-opts.c. - (cb_file_change): Rename fe_file_change. - * c-opts.c: Include debug.h. - (warn_unused_macros, include_cursor): New. - (push_command_line_include, cb_file_change): New. - (COMMAND_LINE_OPTIONS): Handle -include. - (c_common_decode_option): Use local warn_unused_macros. - Handle OPT_include. - (c_common_post_options): Set file change callback. - (handle_deferred_opts): Skip -include. Don't free the array. - (c_common_init): Call cpp_finish_options here, and push an - initial -include file. - * c-ppoutput.c (cb_file_change): Rename pp_file_change. - (preprocess_file): Don't call cpp_finish_options. - (init_pp_output): Don't set the file change callback. - (pp_file_change): Return if no line commands or no output. - * cpphash.h (next_include_file, first_unused_line): Remove. - * cppinit.c (include_head, include_tail): Remove. - (cpp_destroy): Don't free -include chain. - (cpp_finish_options): Don't handle -include, or worry about - -Wunused-macros. - (_cpp_maybe_push_include_file): Remove. - (COMMAND_LINE_OPTIONS, cpp_handle_option): Don't handle -include. - * cpplib.c (_cpp_pop_buffer): Don't handle -include. - * cppmacro.c (_cpp_warn_if_unused_macro, _cpp_create_definition): - Used flag is set based upon the state of the warn_unused_macros - flag, and so use of first_unused_line is unnecessary. - -2003-03-13 Jan Hubicka - - * cselib.c (clear_table): Do not take argument; always clear just - used slots. - (cselib_process_insn): Update call of clear_table - (cselib_init): Do not call clear_table. - (cselib_finish): Clear table. - - * cse.c (count_reg_usage): Do not check side_effects_p. - * rtlanal.c (set_noop_p): Check side_effects_p only when set looks - like noop. - (find_reg_equal_equiv_note): Do not use find_reg_note. - -2003-03-14 Richard Henderson - - PR target/9700 - * config/alpha/alpha.c (alpha_va_start): Account for - current_function_pretend_args_size in the AP offset. - - * config/alpha/alpha.h (SETUP_INCOMING_VARARGS): Move out of line. - (INITIAL_ELIMINATION_OFFSET): Move out of line. - * config/alpha/alpha.c (alpha_setup_incoming_varargs): New. - (alpha_initial_elimination_offset) New. - * config/alpha/alpha-protos.h: Update. - -2003-03-14 Jakub Jelinek - - * stmt.c (expand_start_case): Call emit_queue (). - -2003-03-14 Chris Demetriou - Alexandre Oliva - - * config/mips/mips.h (FUNCTION_PROFILER): _mcount() doesn't pop 2 - words in new abis. - -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 Steven Bosscher - - * doc/extend.texi (Function Names): Make the example compilable. - -2003-03-13 David Edelsohn - - * config/rs6000/rs6000.c (processor_target_table): Really allow - GP optional instructions on Power4. - -2003-03-13 Roger Sayle - - * calls.c (flags_from_decl_or_type): Factor and remove redundant - conditional tests. - -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. - (move_ptes_to_front): 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. - (ggc_pch_read): Likewise. - * Makefile.in (ggc-page.o): Remove varray.h. - -2003-03-13 Nathanael Nerode - - * ChangeLog: Rotated last year's entries to... - * ChangeLog.8: New. - - * config/ia64/fde-glibc.c, config/ia64/freebsd.h, - config/ia64/hpux.h, config/ia64/hpux_longdouble.h, - config/ia64/ia64-c.c, config/ia64/ia64-modes.def, - config/ia64/ia64-protos.h, config/ia64/ia64.c, - config/ia64/ia64.h, config/ia64/ia64.md, - config/ia64/itanium1.md, config/ia64/itanium2.md, - config/ia64/quadlib.c, config/ia64/unwind-ia64.c, - config/ia64/unwind-ia64.h: It's GCC, not GNU CC. - -2003-03-13 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_dwarf_register_span): - Differentiate endianness. - (s6000_override_options): Use cpu type instead of TARGET_SPE. - -2003-03-13 Nick Clifton - - * config/arm/arm.c (print_multi_reg): Do not generate a type 2 - LDM instructions with writeback enabled. - (output_return_instruction): Likewise. - - * config/arm/pe.h (FIXED_REGISTERS): Remove definition. - (CALL_USED_REGISTERS): Remove definition. - (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Define. - -2003-03-13 Alan Modra - - * config/rs6000/rs6000.c (rs6000_flag_pic): Delete. - (rs6000_xcoff_encode_section_info): #ifdef TARGET_XCOFF. - (rs6000_binds_local_p, TARGET_BINDS_LOCAL_P): #if TARGET_MACHO. - (rs6000_override_options): Don't clear flag_pic for ABI_AIX. - (rs6000_legitimize_address): Formatting. - (rs6000_emit_move): Likewise. - (rs6000_return_addr): Test ABI_AIX as well as flag_pic. - (rs6000_emit_prologue ): Likewise. - (rs6000_elf_select_section): Comment reason for shlib being - set for ABI_AIX. - (rs6000_elf_unique_section): Likewise. - (rs6000_elf_encode_section_info): Test !TARGET_AIX as well as ABI_AIX. - * config/rs6000/rs6000.h (LEGITIMATE_LO_SUM_ADDRESS_P): Test ABI_AIX - as well as flag_pic. - * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Likewise. - (MINIMAL_TOC_SECTION_ASM_OP): Likewise. - * config/rs6000/linux64.h (TARGET_ENCODE_SECTION_INFO): Don't define. - -2003-03-13 Richard Henderson - - * 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-03-12 Nathanael Nerode - - * config/dsp16xx/dsp16xx-protos.h, config/dsp16xx/dsp16xx.c, - config/dsp16xx/dsp16xx.h, config/dsp16xx/dsp16xx.md: Replace - "GNU CC" with "GCC". - - * config/c4x/c4x-c.c, config/c4x/c4x-modes.def, - config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, - config/c4x/c4x.md, config/c4x/libgcc.S, config/c4x/rtems.h: - GCC, not GNU CC. - - * genattrtab.h, hosthooks-def.h, hosthooks.h, langhooks-def.h, - langhooks.h, tree-inline.h: Replace "GNU CC" with "GCC". - - * c-pch.c, dummy-conditions.c, genautomata.c, genconditions.c, - langhooks.c, tree-inline.c, unwind-dw2-fde-darwin.c, - unwind-dw2-fde-glibc.c, unwind-libunwind.c, vmsdbgout.c: Replace - "GNU CC" with "GCC". - - * config/v850/lib1funcs.asm, config/v850/rtems.h, - config/v850/v850-c.c, config/v850/v850-protos.h, - config/v850/v850.c, config/v850/v850.h, config/v850/v850.md: - GCC, not GNU CC. - - * config/vax/bsd.h, config/vax/elf.h, config/vax/netbsd-elf.h, - config/vax/netbsd.h, config/vax/openbsd.h, config/vax/openbsd1.h, - config/vax/ultrix.h, config/vax/vax-protos.h, config/vax/vax.c, - config/vax/vax.h, config/vax/vax.md, config/vax/vaxv.h: GCC, not - GNU CC. - -2003-03-12 Benjamin Kosnik - - * cpppch.c (cpp_valid_state): Use DL_WARNING_SYSHDR, not DL_WARNING. - -2003-03-12 Nathanael Nerode - - * fixinc/fixinc.interix: Remove dead code (most of it). - * fixinc/fixinc.dgux: Remove. - - * ginclude/float.h, ginclude/iso646.h, ginclude/stdarg.h, - ginclude/stdbool.h, ginclude/stddef.h: GCC, not GNU CC. - -2003-03-12 John David Anglin - - * pa.c (pa_init_builtins): Fix warning. - -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 Neil Booth - - * cppfiles.c (cpp_rename_file, cpp_push_include): New. - * cppinit.c (push_include): Move with changes to cppfiles.c. - (cpp_read_main_file): Mark named operators here... - (cpp_finish_options): ...not here. Update. - (_cpp_maybe_push_include_file): Update. - * cpplib.h (cpp_push_include, cpp_rename_file): New. - -2003-03-12 Nathanael Nerode - - * aclocal.m4: Introduce gcc_GAS_VERSION_GTE_IFELSE, - _gcc_COMPUTE_GAS_VERSION. - * configure.in: Use them. - * configure: Regenerate. - -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 Andreas Jaeger - - * config/i386/netbsd64.h (TARGET_OS_CPP_BUILTINS): Remove call to - NETBSD_OS_CPP_BUILTINS_LP64. - -2003-03-12 Nathanael Nerode - - * Makefile.in: Eliminate all.indirect. Update and clean up comments. - Rearrange. Reorganize. - * configure.in: Rearrange. - * configure: Regenerate. - -2003-03-12 Andreas Jaeger - - * c-cppbuiltin.c (cb_register_builtins): Define LP64 builtins for - LP64 targets. - - * doc/cpp.texi (Common Predefined Macros): Document __LP64__ and - _LP64. - - * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Do not define - _LP64 macros here. - * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Likewise. - - * config/alpha/netbsd.h (TARGET_OS_CPP_BUILTINS): Remove call to - NETBSD_OS_CPP_BUILTINS_LP64. - * config/sh/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Likewise. - * config/sparc/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Likewise. - - * config/netbsd.h (NETBSD_OS_CPP_BUILTINS_LP64): Remove. - -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 J"orn Rennecke - - * sh.c: Include basic-block.h. - (sh_output_mi_thunk, emit_load_ptr): New functions. - (TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Redefine. - -2003-03-12 Nick Clifton - - * config/arm/pe.h (FIXED_REGISTERS): Add Maverick registers. - (CALL_USED_REGISTERS): Likewise. - * config/arm/arm.h (FIRST_PSEUDO_REGISTER): Update comment - describing how this value is calculated. - -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 Neil Booth - - * config/mcore/mcore-elf.h (CPP_PREDEFINES): Replace with - TARGET_OS_CPP_BUILTINS. - * config/mcore/mcore-pe.h: Similarly. - * config/mcore/mcore.h: Replace CPP_PREDEFINES and part of - CPP_SPEC with TARGET_CPU_CPP_BUILTINS. - -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 Danny Smith - - * config/i386/winnt.c (DLL_IMPORT_PREFIX): New define. - Use throughout instead of DLL_IMPORT_EXPORT_PREFIX and "e." - (DLL_EXPORT_PREFIX): New define. Use throughout instead of - DLL_IMPORT_EXPORT_PREFIX and "i." - (i386_pe_dllexport_name_p): Here. - (i386_pe_dllimport_name_p): Here. - (i386_pe_mark_dllexport): Here. Remove DLL_IMPORT_PREFIX, - not 9 chars when getting identifier name. - (i386_pe_mark_dllimport): Here. - (i386_pe_encode_section_info): Here. Remove DLL_IMPORT_PREFIX, - not 9 chars when getting identifier name. Correct comment. - (i386_pe_strip_name_encoding): Here. Add comments for different - cases. - (gen_fastcall_suffix): Break down xmalloc() argument to - components. - (gen_stdcall_suffix): Likewise. - Update copyright year. - -2003-03-12 Eric Botcazou - - PR optimization/9888 - * config/i386/i386.md (movsi_1): Remove special alternatives - for %eax register. - (movsi_1_nointernunit): Likewise. - (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-12 Neil Booth - - * c-cppbuiltin.c (builtin_define_std): Make non-static. - -2003-03-11 Loren James Rittle - - * 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 Geoffrey Keating - - * c-cppbuiltin.c (builtin_define_std): Add ATTRIBUTE_UNUSED. - -2003-03-11 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_stack_info): Remove - insn_chain_scanned. Use insn_chain_scanned_p in machine_function. - - * config/rs6000/rs6000.h (machine_function): Add insn_chain_scanned_p. - -2003-03-11 Alexandre Oliva - - * toplev.c (independent_decode_option): Return success for --help, - --target-help and --version. - -2003-03-11 Alexandre Oliva - - * config/mips/linux64.h (DRIVER_SELF_SPECS): Add endian_spec. - Default to -mips3 on -mabi=64. Don't add -mips* flag if -march is - specified. - (SUBTARGET_ASM_SPEC): Remove -mips*-adding code obviated by - DRIVER_SELF_SPECS. - (LINK_SPEC): Let endian options affect the linker emulation name. - -2003-03-11 J"orn Rennecke - - * sh.md (reload_inqi): Fix mode for source in second set. - -2003-03-11 Jan Hubicka - - * cselib.c (cselib_invalidate_mem_1): Move too ... - (cselib_invalidate_mem): ... here; use new list - (dummy_val, first_containing_mem): New static variables. - (clear_table): Initialize first_containing_mem. - (discard_useless_values): Compact the containing_mem list. - (add_mem_for_addr): Add to the list. - * cselib.h (cselib_val): Add next_containing_mem. - -2003-03-11 Aldy Hernandez - - * config/rs6000/rs6000.c (rs6000_override_options): Disable string - instructions for e500. - -2003-03-11 Neil Booth - - * Makefile.in: Update. - * c-cppbuiltin.c: Include tm_p.h. - -2003-03-11 Aldy Hernandez - - * doc/tm.texi (Frame Registers): Document DWARF_REG_TO_UNWIND_COLUMN. - - * unwind-dw2.c (DWARF_REG_TO_UNWIND_COLUMN): Define. - (_Unwind_GetGR): Use DWARF_REG_TO_UNWIND_COLUMN. - (_Unwind_SetGR): Same. - (_Unwind_GetGRPtr): New. - (_Unwind_SetGRPtr): New. - (uw_update_context_1): Use accesor functions instead of accessing - context->reg[] directly. - (uw_install_context_1): Same. - (execute_cfa_program): Same. - (__frame_state_for): Same. - - * config/rs6000/rs6000.c (spe_synthesize_frame_save): Use 1200 as - the synthetic register offset. - - * config/rs6000/rs6000.h (DWARF_REG_TO_UNWIND_COLUMN): New. - -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. - -2003-03-11 Hartmut Penner - - * df.c (read_modify_subreg_p): Change from static to global. - * df.h (read_modify_subreg_p): Add prototype. - * sched-deps.c (sched_analyze_1): Generate true dependency for - strict_low_part, certain subregs and zero/sign_extract. - -2003-03-11 Neil Booth - - * Makefile.in: Update. - * c-common.c: Don't include real.h or except.h. - (REGISTER_PREFIX): Remove. - (builtin_define_std, builtin_define_with_value, - builtin_define_with_int_value, builtin_define_with_hex_fp_value, - builtin_define_type_max, builtin_define_type_precision, - builtin_define_float_constants): Move to c-cppbuiltin.c. - (c_stddef_cpp_builtins): New. - * c-common.h (builtin_define_with_value, c_stddef_cpp_builtins): New. - * c-cppbuiltin.c: New, extracted from c-common.c. - (define__GNUC__): New. - * cppspec.c (lang_specific_driver): Remove support of -no-gcc. - * gcc.c: Remove support of %v1, %v2 and %v3 specs. - (cpp_unique_options): Don't support no-gcc. - (do_spec_1): Remove support of version specs. - * doc/invoke.texi: Remove documentation of %v1, %v2 and %v3. - * doc/passes.texi: Update. - * doc/tm.texi: Update. - -2003-03-10 Aldy Hernandez - - * dwarf2out.c (multiple_reg_loc_descriptor): Fix thinko. - -2003-03-10 Andrew Pinski - - * config/darwin.c (machopic_function_base_name): If dynamic-no-pic - is on should not get here. - (machopic_indirect_data_reference): If dynamic-no-pic is on just - generate high/low parts of the address. - (machopic_legitimize_pic_address): Change MACHOPIC_PURE to - MACHOPIC_INDIRECT. Dynamic-no-pic uses 0 as the pic base. Generate - symbol and labels with a new reg. Dynamic-no-pic does not have a - pic_offset_table_rtx. - (machopic_select_section): Change references of flag_pic to - MACHOPIC_INDIRECT. - (machopic_asm_out_destructor): Likewise. - * config/darwin.h (ASM_DECLARE_UNRESOLVED_REFERENCE): Change - reference of flag_pic to MACHOPIC_INDIRECT. - (MACHO_DYNAMIC_NO_PIC_P): Define as TARGET_DYNAMIC_NO_PIC. - (MACHOPIC_INDIRECT): Is also true when dynamic-no-pic is on. - (MACHOPIC_JUST_INDIRECT): Is also true when dynamic-no-pic is on. - (MACHOPIC_PURE): Is not pure when dynamic-no-pic is on. - * config/i386/darwin.h (MASK_MACHO_DYNAMIC_NO_PIC): Define as - 0 for right now as dynamic-no-pic is not implemented on Darwin/ia32. - * config/rs6000/darwin.h (MASK_MACHO_DYNAMIC_NO_PIC): Define. - (TARGET_DYNAMIC_NO_PIC): Define. - (SUBTARGET_SWITCHES): Define, have sub-target switches for - dynamic-no-pic. - (SUBTARGET_OVERRIDE_OPTIONS): Move check for -fpic from - rs6000_override_options to here. Dynamic-no-pic overrides - pic. - (CC1_SPEC): Change from not static then pic to not static and not - dynamic-no-pic then pic. - * config/rs6000/rs6000.c (rs6000_override_options): Move the - check for -fpic and DARWIN_ABI to config/rs6000/darwin.h - (rs6000_legitimize_reload_address): Add case for loading floating in - dynamic-no-pic. - (rs6000_emit_move): Add case for dynamic-no-pic. Change reference - of flag_pic to MACHOPIC_INDIRECT. - (secondary_reload_class): Conditional change the reference of - flag_pic to MACHOPIC_INDIRECT. - (rs6000_output_mi_thunk): Change reference of flag_pic to - MACHOPIC_INDIRECT. - (output_profile_hook): Likewise. - (machopic_output_stub): Non-pure (dynamic-no-pic) is now supported. - * config/rs6000/rs6000.md (movdf_low): Add the case for - MACHO_DYNAMIC_NO_PIC_P. - (call): Change references for flag_pic in TARGET_MACHO to - MACHOPIC_INDIRECT. - (SUBTARGET_OVERRIDE_OPTIONS): Add case where -fpic is on and - -mdynamic-no-pic is on. Also move case for -fpic from rs6000.c. - * doc/invoke.texi (-mdynamic-no-pic): Document. - -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_SWITCH_TAKES_ARG): Remove. - (DEFAULT_WORD_SWITCH_TAKES_ARG): Remove. - -2003-03-10 Steven Bosscher - - PR optimization/7189 - * toplev.c (rest_of_compilation): Move - check_function_return_warnings up to just after - delete_unreachable_blocks. - -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 Zack Weinberg - - * c-opts.c (add_prefixed_path): Don't use concat. When - prefixing with cpp_GCC_INCLUDE_DIR, copy only the first - cpp_GCC_INCLUDE_DIR_len characters. - -2003-03-10 Segher Boessenkool - - * testsuite/gcc.dg/altivec-9.c: New file. - - * config/rs6000/rs6000.c (altivec_frame_fixup): Remove. - (rs6000_emit_prologue): Use rs6000_frame_related instead. - -2003-03-10 Aldy Hernandez - - * config/rs6000/spe.h: Define __ev64_*64__ to use single element - vectors. - (__ev_convert_u64): Remove macro. Define as inline. - (__ev_convert_s64): Same. - -2003-03-10 Aldy Hernandez - - * config/rs6000/rs6000.h (DWARF_FRAME_REGISTERS): Define. - (rs6000_stack_t): Add spe_64bit_regs_used. - - * config/rs6000/rs6000.c (rs6000_stack_info): Calculate - spe_64bit_regs_used, and use it to determine the size of the - frame. - (spe_func_has_64bit_regs_p): New. - (spe_synthesize_frame_save): New. - (rs6000_frame_related): Handle SPE synthetic registers. - (rs6000_emit_prologue): Only save in 64-bits if the function used - any registers in 64-bit mode. - (rs6000_emit_epilogue): Same, but for restore. - -2003-03-10 Richard Earnshaw - - * arm.h (enum floating_point_type): Delete. Replace with... - (enum fputype): ... new. - (FPUTYPE_DEFAULT): Renamed from FP_DEFAULT. Values reworked. - * linux-elf.h (FPUTYPE_DEFAULT): Likewise. - * arm.md (attr fpu): Reworked for new underlying enum values. - * arm.c (arm_fpu_arch): Now enum fputype. - (arm_fpu_tune): Renamed from arm_fpu. Now enum fputype. - (arm_override_options, arm_output_epilogue, arm_expand_prologue): - Update uses of arm_fpu_arch and arm_fpu_tune. - -2003-03-10 Josef Zlomek - - * cfgcleanup.c (outgoing_edges_match): Compare the jump tables. - (try_crossjump_to_edge): Replace refereces to one jump table by - references to identical jump table. - * loop.c (load_mems): Moved setting the JUMP_LABEL to replace_label. - (replace_label): Moved to rtlanal.c. - (struct rtx_pair): Moved to rtl.h. - * rtl.h (struct rtx_pair): Moved from loop.c. - (replace_label): New extern function. - (subrtx_p): New extern function. - (tablejump_p): New extern function. - * rtlanal.c (replace_label): Moved from loop.c. - (subrtx_p_1): New static function. - (subrtx_p): New function. - (tablejump_p): New function. - -2003-03-10 Jan Hubicka - - * cfgcleanup.c (try_optimize_cfg): Fix thinko in previous patch. - - * cfgcleanup.c (merge_blocks): Return where to iterate next. - (try_optimize_cfg): Use return value of merge_blocks - -2003-03-10 Michael Matz - - * cfg.c (unchecked_make_edge): New. - (cached_make_edge): Use it. - * basic-block.h (unchecked_make_edge): Declare. - * cfglayout.c (cfg_layout_duplicate_bb): Use it. - -2003-03-10 Richard Earnshaw - - * fpa.md: New file. Move all patterns relating to FPA co-processor - to here... - * arm.md: ... from here. - (cirrus.md, fpa.md): Include at end of description. - (divsf3, divdf3, modsf3, movdf3, sqrtsf2, sqrtdf2): New expands. - (pic_load_addr_based): Remove register constraint from expander. - (seq, sne, sgt, sle, slt, sge, sgeu, sleu, sgtu, sltu, sunordered) - (sordered, sungt, sunle, sunge, sunlt): Likewise. - (eh_epilogue, tablejump): Likewise. - -2003-03-09 Richard Kenner - - * tree.c (substitute_in_expr, case 'e'): Only make recursive call - on operands if it has a PLACEHOLDER_EXPR. - -2003-03-09 David Edelsohn - Mostafa Hagog - - * config/rs6000/rs6000.md (movsi_update1): Add TARGET_UPDATE final - condition. - -2003-03-09 Neil Booth - - * config/frv/frv.h: Use TARGET_CPU_CPP_BUILTINS, not CPP_PREDEFINES. - * config/ip2k/ip2k.h: Similarly. - * config/m32r/m32r.h: Similarly. - * config/m68hc11/m68hc11.h: Similarly. - * config/mn10200/mn10200.h: Similarly. - * config/mn10300/mn10300.h: Similarly. - * config/pdp11/pdp11.h: Similarly. - * config/v850/v850.h: Similarly. - * config/rs6000/vxworks.h: Similarly for TARGET_OS_CPP_BUILTINS. - * config/v850/retms.h: Similarly for TARGET_OS_CPP_BUILTINS. - * config/mips/iris3.h: Remove #if 0 block. - -2003-03-09 Roger Sayle - Joern Rennecke - - * gcc.c (do_spec_1) ['{']: Revert 2003-02-24 patch. Don't handle - pending argument upon return from handle_braces here. - (do_spec_2): Instead handle it upon return from do_spec_1 here. - -2003-03-09 Roger Sayle - Joern Rennecke - - * gcc.c (do_spec_1) ['{']: Revert 2003-02-24 patch. Don't handle - pending argument upon return from handle_braces here. - (do_spec_2): Instead handle it upon return from do_spec_1 here. - -2003-03-09 Franz Sirl - - * varasm.c (make_decl_one_only): Use declare_weak(). - -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-09 DJ Delorie - - * config/stormy16/stormy16.h (DWARF_LINE_MIN_INSTR_LENGTH): Revert. - -2003-03-09 Richard Earnshaw - - * arm.md (fix_truncsfsi2, fix_truncdfsi2, arm_fix_truncsfsi2) - (arm_fix_truncdfsi2): Add missing fix in floating point mode before - conversion to integer. - * cirrus.md (cirrus_truncsfsi2, cirrus_truncdfsi2): Likewise. - -2003-03-09 Roger Sayle - - * builtins.def: Fix typo and improve grammar. - * loop-unroll.c (decide_peel_completely): Tidy log message. - -2003-03-09 Kazu Hirata - - * config/h8300/h8300.md (*tstsi_upper_bit): New. - (*iorsi3_e2f): Likewise. - -2003-03-08 Kazu Hirata - - * config/h8300/h8300.c (h8300_and_costs): Return the number of - assembly instructions needed. - (h8300_shift_costs): Likewise. - -2003-03-09 Hans-Peter Nilsson - - * config/cris/aout.h (ENDFILE_SPEC): Undef. - - * optabs.c (gen_move_insn): Move logic for synthesizing MODE_CC - moves from here ... - * expr.c (emit_move_insn_1): ... to here. - - * config/cris/aout.h (CRIS_CPP_SUBTARGET_SPEC): Move -D__AOUT__ to... - (TARGET_OS_CPP_BUILTINS): New macro. - * 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. - - * flags.h (flag_leading_underscore): Declare. - - * c-opts.c (c_common_post_options): On fopen failure, return - false, not NULL. - -2003-03-08 Hans-Peter Nilsson - - * config/cris/cris_abi_symbol.c: #include tconfig.h and tm.h, not - config.h. - * config/cris/cris.h (HAVE_GAS_HIDDEN): Don't define here. - * config/cris/aout.h (HAVE_GAS_HIDDEN): Undef. - -2003-03-08 Neil Booth - - * config/sh/rtemself.h (TARGET_OS_CPP_BUILTINS): Use instead of - CPP_PREDEFINES. - * config/sh/rtems.h (TARGET_OS_CPP_BUILTINS): Use instead of - CPP_PREDEFINES. - -2003-03-08 Neil Booth - - * c-common.h (c_common_init, c_common_post_options): Update. - * c-objc-common.c (c_objc_common_init): Update for new prototype. - * c-opts.c (saved_lineno): New. - (c_common_post_options, c_common_init): Update prototypes, - move call to cpp_read_main_file from latter to former. - * c-tree.h (c_ojbc_common_init): Update. - * langhooks-def.h (lhd_post_options): New. - (LANG_HOOKS_INIT, LANG_HOOKS_POST_OPTIONS): Update. - * langhooks.c (lhd_post_options): New. - * langhooks.h (struct lang_hooks): Update post_options and init hooks. - * toplev.c (no_backend): New. - (process_options): Call post_options hook and set main_input_filename - and input_filename here. - (lang_dependent_init, do_compile): post_options hook moved to - process_options. - * objc/objc-act.c (objc_init): Update prototype. - * objc/objc-act.h (objc_init): Update prototype. - -2003-03-08 Roger Sayle - - * emit-rtl.c (gen_lowpart): Don't attempt to load a part of - a complex or vector type, using a load in the original mode. - -2003-03-08 Jan Hubicka - - * Makefile.in (cgraph.o): Depend on gt-cgraph.h and varray.h. - * gt-cgraph.h: New GC file. - * cgraph.c (known_fns): New static variable. - (cgraph_node): Add the decl into varray. - -2003-03-08 Hans-Peter Nilsson - - * config/mmix/mmix.md ("*movcc_expanded"): Add missing alternatives. - -2003-03-08 Richard Earnshaw - - * arm.c (fpa_rhs_operand, fpa_add_operand, const_double_rtx_ok_for_fpa) - (neg_const_double_ok_for_fpa, output_mov_long_double_fpa_from_arm) - (output_mov_long_double_arm_from_fpa, output_mov_double_fpa_from_arm) - (output_mov_double_arm_from_fpa): Renamed to use fpa instead of fpu. - All callers changed. - * arm.md, arm.h, arm-protos.h: Updated. - - * arm.h (enum reg_class FPA_REGS): Renamed from FPU_REGS. - (CLASS_MAX_NREGS, REGISTER_MOVE_COST, REG_CLASS_FROM_LETTER): Updated. - * arm.c (arm_regno_class, f_register_operand): Updated. - -2003-03-08 Hans-Peter Nilsson - - * config/cris/cris.h: Remove EGCS references. - (CPP_SPEC): Remove "-$". - (INIT_CUMULATIVE_ARGS): Adjust parameter name to FNDECL. - -2003-03-08 Neil Booth - - * config/stormy16/stormy16.h (TARGET_CPU_CPP_BUILTINS): Use in - preference to CPP_PREDEFINES. - -2003-03-08 Neil Booth - - * cppinit.c (cpp_finish_options): Set first_unused_line to -1. - -2003-03-08 Kazu Hirata - - * config/h8300/h8300.md (*extzv_16_8): New. - -2003-03-08 Jan Hubicka - - * c-decl.c: (finish_function): Update call of tree_inlinable_function_p. - * cgraph.h: (cgraph_local_info): Add can_inline_once - (cgraph_global_info): Add inline_once. - (cgraph_node): Add previous. - (cgraph_remove_node): New. - * cgraphunit.c (cgraph_mark_functions_to_inline_once): New static - function. - (cgraph_optimize): Call it. - (cgraph_finalize_function): Set inlinable flags. - (cgraph_finalize_compilation_unit): Actually remove the reclaimed nodes. - (cgraph_mark_functions_to_output): Use new inlining heuristics flags. - (cgraph_expand_function): Likewise. - * cgraph.c - (cgraph_node): Put nodes into doubly linked chain. - (cgraph_remove_node): New function. - * flags.h (flag_inline_functions_called_once): Declare. - * tree-inline.c: Include cgraph.h - (inlinable_functions_p): Add extra argument to bypass limits. - (expand_call_inline): Obey cgraph flag. - * tree-inline.h (tree_inlinable_function_p): Update prototype. - -2003-03-08 Zdenek Dvorak - - * gcse.c (bypass_block, bypass_conditional_jumps): Do not create - irreducible loops. - - * loop-unroll.c (unroll_loop_runtime_iterations): Update irreducible - loops info correctly. - -2003-03-08 Eric Botcazou - - PR middle-end/7796 - * unroll.c (calculate_giv_inc): Handle constants being - loaded with LSHIFTRT. - -2003-03-07 David Edelsohn - - * config/rs6000/rs6000.c (processor_target_table): Do not disable - GP optional instructions on Power3, Power4, 620, and 630. - -2003-03-07 Kazu Hirata - - * calls.c: Fix comment formatting. - * cfgloopanal.c: Likewise. - * cfgloopmanip.c: Likewise. - * combine.c: Likewise. - * dwarf2out.c: Likewise. - * ggc-common.c: Likewise. - * langhooks.c: Likewise. - * loop-unroll.c: Likewise. - * loop.c: Likewise. - * ra-build.c: Likewise. - * sbitmap.c: Likewise. - * toplev.c: Likewise. - -2003-03-07 James E Wilson - - * config/sh/sh.h (HARD_REGNO_NREGS): Round up the XD register count. - -2003-03-07 Geoffrey Keating - - * objc/lang-specs.h (objective-c-header): Use .gch not .pch; - support -no-integrated-cpp. - - * c-pch.c (get_ident): Use c_language_kind and flag_objc rather - than langhooks.name. - -2003-03-07 Michael Matz - - * df.h (enum df_ref_flags.DF_REF_STRIPPED): New. - (DF_FOR_REGALLOC): New. - * df.c (df_ref_record): Set DF_REF_STRIPPED. - (read_modify_subreg_p): Simplify. - (df_def_record_1, df_uses_record): Set DF_REF_MODE_CHANGE more often. - Use DF_FOR_REGALLOC. - * ra.h (struct web): New member subreg_stripped. - (invalid_mode_change_regs): Declare. - * ra.c (invalid_mode_change_regs): New. - (init_ra): Initialize it. - * ra-build.c (init_one_web_common, remember_web_was_spilled): Use it. - Use CANNOT_CHANGE_MODE_CLASS as ifdef guard. - (reinit_one_web, parts_to_web_1): Deal with subreg_stripped. - * ra-colorize.c (colorize_one_web): Use invalid_mode_change_regs. - Use CANNOT_CHANGE_MODE_CLASS as ifdef guard. - -2003-03-07 Richard Earnshaw - - * arm.md (addsf3, adddf3, subsf3, subdf3, mulsf3, muldf3, negsf2) - (negdf2, abssi2, abssf2, absdf2, floatsisf2, floatsidf2) - (fix_truncsfsi2, fix_truncdfsi2, truncdfsf2): Moved back into main - machine description file from ... - * cirrus.md: ... here. - -2003-03-06 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Don't use - reg_overlap_mentioned_p. - -2003-03-06 Geoffrey Keating - - * c-pch.c: Include langhooks.h. - (IDENT_LENGTH): New. - (get_ident): New. - (pch_ident): Delete. - (pch_init): Use get_ident, IDENT_LENGTH. - (c_common_valid_pch): Likewise. Also, use actual language - in warning message. - * Makefile.in (c-pch.o): Add langhooks.h to dependencies. - - * objc/config-lang.in (gtfiles): Add objc-act.c. Remove duplicate - c-parse.in. - * objc/Make-lang.in (objc/objc-act.o): Add dependency on - gt-objc-objc-act.h. - (gt-objc-objc-act.h): New rule. - * objc/lang-specs.h: Support PCH. - * objc/objc-act.c: Include gt-objc-objc-act.h. - (objc_add_static_instance): Move num_static_inst out, mark for PCH. - (build_selector_reference_decl): Move idx out, mark for PCH. - (build_class_reference_decl): Likewise. - (build_objc_string_decl): Move *_idx out, mark for PCH. - (build_tmp_function_decl): Move xxx out, mark for PCH. - -2003-03-06 Dale Johannesen - - * config/rs6000/rs6000.c (rs6000_binds_local_p): Consider - global functions for inlining on Darwin. - -2003-03-06 Vladimir Makarov - - * haifa-sched.c (schedule_block): Don't call reorder when sorting - is prohibited. - -2003-03-06 Neil Booth - - * Makefile.in (c-ppoutput.o): Update. - * c-common.h (init_pp_output): New. - (preprocess_file): Update. - * c-lex.c (init_c_lex): Move mbchar initialization to cpplib. - Register builtins. - * c-opts.c (c_common_init): Call init_pp_output if preprocessing. - Make call to cpp_read_main_file common to whether preprocessing - or not. Don't register builtins. - * c-ppoutput.c: Include c-pragma.h. - (setup_callbacks): Rename init_pp_output. - (preprocess_file): No longer setup callbacks or call - cpp_read_main_file. - * cpphash.h (_cpp_init_mbchar): New. - * cppinit.c (init_library): Call _cpp_init_mbchar. - * cpplex.c (_cpp_init_mbchar): New. - -2003-03-06 Roger Sayle - - * emit-rtl.c (gen_lowpart): When requesting the low-part of a - MEM, try loading the MEM into a register and taking the low-part - of that, to help CSE see the use of the MEM in its true mode. - -2003-03-05 Tom Tromey - - * config/stormy16/stormy16.h (DWARF_LINE_MIN_INSTR_LENGTH): - Define. - -2003-03-05 Nick Clifton - - * config/stormy16/stormy16.md ("*eqbranchsi"): Remove '+' on - operand 2. - ("*ineqbranchsi"): Likewise. - -2003-03-05 Andrew Haley - - * config/stormy16/stormy16.c (xstormy16_expand_prologue): Delete - mem_fake_push_rtx. Instead construct a SEQUENCE to show the - register store followed by a stack increment. - -2003-03-05 Chris Moller - - * config/stormy16/stormy16.c (REG_NEEDS_SAVE): added a term - to inhibit saving CARRY_REGS. - - * config/stormy16/stormy16.c (xs_hi_general_operand): - added predicate to detect and error-out on out-of-range - const_ints for movhi. - * config/stormy16/stormy16.md (movhi): use - xs_hi_general_operand. - - * config/stormy16/stormy16.c (xstormy16_expand_prologue): - added a check for local vbl size overflow. - * config/stormy16/stormy16.c (xs_hi_nonmemory_operand): - added predicate to detect and error-out on out-of-range - const_ints for addhi and subhi. - * config/stormy16/stormy16.md (addhi3, addchi4, addchi5, - subhi3, subchi4, subchi5): used xs_hi_nonmemory_operand. - - * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): - add a term to accept PRE_MODIFY addresses. - * config/stormy16/stormy16.c (xstormy16_expand_move): - add code to expand PRE_MODIFY addresses to an add followed - by a move. - -2003-03-06 Jason Merrill - - * tree-inline.c (inlinable_function_p): Revert earlier change - pending investigation. - -2003-03-06 Kazu Hirata - - * config/h8300/h8300.md (a new peephole2): New. - -2003-03-06 Jan Hubicka - - * cgraph.c (cgraph_node): Do not confuse nested functions and methods. - -2003-03-06 Zdenek Dvorak - - * dwarf2out.c (size_of_die): Compute size of external reference to - die correctly. - -2003-03-06 Hans-Peter Nilsson - - * config/mmix/mmix.md ("*movcc_expanded"): New pattern. - ("movcc", "movcc_uns", "movcc_fp", "movcc_fpeq", "movcc_fun"): New - expanders. - -2003-03-05 Roger Sayle - - * expr.h (lang_expand_expr): Delete obsolete prototype. - -2003-03-05 Kazu Hirata - - * emit-rtl.c (gen_highpart_mode): Fix a comment typo. - -2003-03-05 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Generalize to - accept a memory operand. - -2003-03-05 Olivier Hainque - - * config/alpha/alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Add '+'. - * config/alpha/alpha.c (print_operand, case '+'): New. - * config/alpha/alpha.md (call_osf_1_noreturn): Document and use. - (call_value_osf_1_noreturn): Likewise. - -2003-03-05 Richard Kenner - - * stmt.c (fixup_gotos): Change meaning of DONT_JUMP_IN. - (expand_end_bindings): Likewise. - -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 Aldy Hernandez - - * doc/tm.texi: Document TARGET_DWARF_REGISTER_SPAN. - - * config/rs6000/rs6000.c (rs6000_dwarf_register_span): New. - - * hooks.c (hook_rtx_rtx_null): New. - - * hooks.h (hook_rtx_rtx_null): Protoize. - - * target-def.h (TARGET_DWARF_REGISTER_SPAN): New macro. - (TARGET_INITIALIZER): Add TARGET_DWARF_REGISTER_SPAN. - - * target.h (struct gcc_target): Add dwarf_register_span. - - * dwarf2out.c (multiple_reg_loc_descriptor): New. - (one_reg_loc_descriptor): New. - (reg_loc_descriptor): Add support for values that span more than - one register. - -2003-03-05 Jan Hubicka - - * Makefile.in (calls.o, toplev.o alias.o): Depend on cgraph.h - * alias.c: Include cgraph.h - (mark_constant_function): Use cgraph_rtl_info. - * calls.c: Include cgraph.h - (flags_from_decl_or_type): Use cgraph_rtl_info to find pure and const - calls. - (expand_call): Use cgraph_rtl_info to set preferred stack boundary. - * cgraph.c (cgraph_rtl_info): New function. - * cgraph.h (cgraph_rtl_info): Declare - (cgraph_rtl_info): Likewise. - * function.h (struct function): Add recursive_call_emit. - * toplev.c: Include cgraph.h. - (rest_of_compilation): Set preferred_incoming_stack_boundary. - -2003-03-05 Kazu Hirata - - * config/h8300/h8300.c (output_simode_bld): Clear the - destination first if possible. - * config/h8300/h8300.md (extzv_1_r_h8300hs): Add an - alternative. - (extzv_1_r_inv_h8300hs): Likewise. - -2003-03-05 Zdenek Dvorak - - * basic-block.h (EDGE_IRREDUCIBLE_LOOP, EDGE_ALL_FLAGS): New. - * cfg.c (dump_edge_info): Add EDGE_IRREDUCIBLE_LOOP flag dump. - * cfgloop.c (flow_loop_free): Made global. - (establish_preds): New static function. - (flow_loop_tree_node_add): Handle subloops of added loop correctly. - (get_loop_exit_edges): New. - (verify_loop_structure): Verify EDGE_IRREDUCIBLE_LOOP flags. - * cfgloop.h (flow_loop_free, get_loop_exit_edges, unloop): Declare. - * cfgloopanal.c (mark_irreducible_loops): Mark edges in irreducible - loops. - * cfgloopmanip.c (loop_delete_branch_edge): Allow to test for - removability of an edge. - (fix_irreducible_loops): New static function. - (find_path, remove_path): Add ability to remove enclosing loops. - (unloop): New. - (copy_bbs, duplicate_loop_to_header_edge): Use EDGE_IRREDUCIBLE_LOOP - flags. - * cfgrtl.c (verify_flow_info): Handle EDGE_IRREDUCIBLE_LOOP flag. - * loop-unroll.c (peel_loops_completely): Do not duplicate loop if - not neccessary. - (decide_peel_completely, peel_loops_completely): Allow complete peeling - of non-duplicable once rolling loops. - * loop-unswitch.c (unswitch_loop): Update EDGE_IRREDUCIBLE_LOOP flags. - -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-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 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_variable_issue): Remove unnecessary - else clauses. - -2003-03-05 Michael Matz - - * i386/i386.c (ix86_save_reg): Also test - current_function_uses_const_pool. - -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-05 Jan Hubicka - - * toplev.c (rest_of_compilation): Defer RTL compilation only when - RTL inlining is done. - - * cgraphunit.c (cgraph_mark_local_functions): New local function. - (cgraph_optimize): Mark local functions. - * i386-protos.h (init_cumulative_args): Update prototype. - * i386.c (init_cumulative_args): Use register passing convention for - local functions. - - * cgraph.c (cgraph_global_info_ready): New global variable - (cgraph_local_info, cgraph_global_info): New functions. - * cgraph.h (struct cgraph_local_info, cgraph_global_info): New - structures. - (cgraph_local_info, cgraph_global_info, cgraph_global_info_ready): - Declare. - * cgraphunit.c (cgraph_finalize_function): Set inline_many. - (cgraph_mark_functions_to_output): Use inline_many. - (cgraph_expand_function): Free DECL_SAVED_TREE uncondtionally. - (cgraph_expand_functions): Expand inline functions last. - (cgraph_optimize): Do not emit uneeded functions. - -2003-03-04 Steve Ellcey - - * expr.c (convert_modes): Check for legal hard register. - -2003-03-04 Tom Tromey - - * doc/sourcebuild.texi (Front End Directory): Document tags. - * configure: Rebuilt. - * configure.in (target_list): Added tags. - * Makefile.in (TAGS): Depend on lang.clean. Include subdirectory - TAGS files by reference. - * objc/Make-lang.in (objc.tags): New target. - -2003-03-04 Zdenek Dvorak - - * gcov-io.h (gcov_save_position, gcov_reserve_length, gcov_resync, - gcov_skip, gcov_skip_string, gcov_write_unsigned, gcov_write_counter, - gcov_write_string, gcov_read_unsigned, gcov_read_counter, - gcov_read_string, gcov_write_length): Modified to enable reading/ - writing of whole .da file just once. - (da_file_open, da_file_close, da_file_eof, da_file_error, - da_file_position, da_file_seek, da_file_write, da_file_read): New - functions. - (actual_da_file, actual_da_file_position, actual_da_file_length, - actual_da_file_buffer, actual_da_file_buffer_size): New static - functions. - * libgcov.c (gcov_exit): Modified to read/write the whole .da file at - just once. - - -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 Daniel Jacobowitz - - * configure.in: Don't always define TARGET_SYSTEM_ROOT. - * configure: Regenerated. - * gcc.c: Check whether TARGET_SYSTEM_ROOT is defined. - -2003-03-04 Andreas Jaeger - - * configure.in: Check for . - * configure: Regenerated. - - * config.in: Define HAVE_MEMCHECK_H. - - * ggc-common.c: Use if available instead of - . - * ggc-page.c: Likewise. - * cppfiles.c: Likewise. - -2003-03-04 Kazu Hirata - - * config/h8300/h8300.md (*extzv_8_8): Fix cc and lengths. - -2003-03-04 Eric Botcazou - - PR c/9262 - * c-typeck.c (do_case): Attach the first case label to the SWITCH_BODY. - (c_finish_case): Rechain the next statements to the SWITCH_STMT. - -2003-03-04 Jan Hubicka - - * doc/invoke.texi: Document that unit-at-a-time is enabled for -O3 - * toplev.c (parse_options_and_default_flags): Enable flag_unit_at_a_time - for -O3. - -2003-03-04 Nathanael Nerode - - * configure.in: Delete three unused variables. Move a variable - definition closer to its use. Simplify use_collect2 logic. Start to - organize. Simplify tests for in-tree gas and ld. - * configure: Regenerate. - -2003-03-04 Neil Booth - - * Makefile.in: Update. - * c-common.c (flag_no_line_commands, flag_no_output, - flag_dump_macros, flag_dump_includes): New. - * c-common.h (flag_no_line_commands, flag_no_output, - flag_dump_macros, flag_dump_includes, preprocess_file): New. - (init_c_lex): Update prototype. - * c-lex.c (init_c_lex): Update prototype; move some code to - c_common_init. - * c-opts.c (preprocess_file): Subsume into c_common_init. - (c_common_decode_option): Update flags. - (c_common_init): Move code from preprocess_file and init_c_lex. - (sanitize_cpp_opts): Update. - * c-ppoutput.c: New, cppmain.c almost verbatim. - * cpphash.h (struct printer): Remove. - (struct cpp_reader): Remove print. - * cpplib.h (dump_none, dump_only, dump_names, dump_definitions, - cpp_preprocess_file): Remove. - (struct cpp_options): Remove no_output, no_line_commands, dump_macros - and dump_includes. - * cppmain.c: Remove. - * doc/passes.texi: Update. - -2003-03-04 John David Anglin - - * function.c (STACK_ALIGNMENT_NEEDED): New macro. Default to 1. - (assign_stack_local_1): Perform overall stack alignment only when - STACK_ALIGNMENT_NEEDED is nonzero. - * doc/tm.texi (STACK_ALIGNMENT_NEEDED): Document. - - * pa.c (compute_frame_size): Rename fsize to size. Account for - alignment to a word boundary before general register save block. Only - account for double-word alignment before floating point register save - block if one or more are saved. Don't allocate space for %r3 when - frame pointer is needed. - (hppa_expand_prologue): Include alignment to word boundary in local - frame size. - * pa.h (STARTING_FRAME_OFFSET): Define to 8 on both 32 and 64-bit ports. - (STACK_ALIGNMENT_NEEDED): Define. - -2003-03-04 Kevin Buettner - - * dwarf2out.c (rtl_for_decl_location): Don't return NULL_RTX for - global register variables. - -2003-03-04 Alexandre Oliva - - * reload.c (reload_adjust_reg_for_mode): New function. - (subst_reloads): Call it. - (operands_match_p): Adjust registers using HARD_REGNO_NREGS. - * reload.h (reload_adjust_reg_for_mode): Declare. - * reload1.c (emit_input_reload_insns, emit_output_reload_insns): - Call it. - -2003-03-03 James E Wilson - - * optabs.c (add_equal_note): Delete SUBREG_REG use. - Fixes PR c/7872. - -2003-03-03 Kazu Hirata - - * config/h8300/h8300.md (*ixorsi3_ashift_16): New. - (*ixorsi3_lshiftrt_16): New. - (*iorsi3_ashift_16): Remove. - -2003-03-03 Kazu Hirata - - * config/h8300/h8300.md (*extzv_8_8): Use '?' to simplify the - pattern. - -2003-03-03 Geoffrey Keating - - * doc/install.texi (Specific): Update entry for powerpc-darwin. - -2003-03-03 Richard Henderson - - * config/ia64/ia64.h (HAVE_AS_LTOFFX_LDXMOV_RELOCS): Default to 0. - -2003-03-03 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_multipass_dfa_lookahead): Delete. - (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD): Delete. - (rs6000_variable_issue): Do not return negative value. - (rs6000_issue_rate): Uniformly set issue rate to 1 for first - scheduling pass. - -2003-03-03 Zdenek Dvorak - - * dwarf2out.c (dwarf2out_finish): Swap order of break_out_includes and - prune_unused_types calls. - -2003-03-03 Jason Merrill - - * tree-inline.c (find_builtin_longjmp_call): Save and restore - lineno and input_filename. - (find_alloca_call): Likewise. - (inlinable_function_p): Run the langhook earlier. - - * calls.c (compute_argument_addresses): Give the new MEMs a - minimum alignment of PARM_BOUNDARY. - -2003-03-03 J"orn Rennecke - - * config/sh/sh.h (EXTRA_SPECS): Add subtarget_asm_relax_spec and - subtarget_asm_isa_spec. - (SUBTARGET_ASM_RELAX_SPEC, SUBTARGET_ASM_ISA_SPEC): Define. - (ASM_SPEC): Define as SH_ASM_SPEC. - (SH_ASM_SPEC): New; take the role of ASM_SPEC, but safe from svr4.h. - Use subtarget_asm_relax_spec and subtarget_asm_isa_spec. - * config/sh/elf.h (ASM_SPEC): Use SH_ASM_SPEC. - (SUBTARGET_ASM_ISA_SPEC): Undef / define. - - * 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-03-03 Jan Hubicka - - * calls.c (rtx_for_function_call): Take the address as an argument - (expand_call): Do not modify the expression. - - * toplev.c (rest_of_compilation): Avoid cfg_cleanup calls when not - optimizing. - -2003-03-03 Kazu Hirata - - * config/h8300/h8300.md (*ixorsi3_zext_hi): Restrict to - TARGET_H8300H and TARGET_H8300S. - -2003-03-03 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-03-03 Kazu Hirata - - * config/h8300/h8300.md (*extzv_8_8): Use shorter code when - operands[0] and operands[1] are different. - -2003-03-03 Kazu Hirata - - * reload1.c (reload_cse_move2add): Remove variable success. - -2003-03-02 Kaveh R. Ghazi - - * ggc-common.c (ggc_rlimit_bound): Cast RLIM_INFINITY to avoid - warnings. - -2003-03-02 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. - -2003-03-02 Neil Booth - - * c-incpath.c (add_path): Fix sysp assignment. - -2003-03-02 Kurt Garloff - - * 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-02 Geoffrey Keating - - * fix-header.c (read_scan_file): Don't reference simplify_path. - -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 Neil Booth - - * toplev.c (aux_base_name): Moved from toplev.h. - (filename): Constify. - (lang_dependent_init): Don't duplicate name. - (process_options): Set aux_base_name here, not... - (do_compile): ...here. Change protoype. - (toplev_main): Move some code from do_compile. - * toplev.h: Remove aux_base_name. - -2003-03-02 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - iorxor_operator. - * config/h8300/h8300.c (print_operand): Handle 'c'. - (iorxor_operator): New. - * config/h8300/h8300.h (PREDICATE_CODES): Add iorxor_operator. - * config/h8300/h8300.md (*iorhi3_zext): Remove. - (*iorsi3_zexthi): Likewise. - (*iorsi3_zextsi): Likewise. - (*xorhi3_zextqi): Likewise. - (*xorsi3_zexthi): Likewise. - (*xorsi3_zextsi): Likewise. - (*ixorhi3_zext): New. - (*ixorsi3_zext_qi): Likewise. - (*ixorsi3_zext_hi): Likewise. - -2003-03-02 Neil Booth - - * c-incpath.c (remove_component_p, simplify_path): Move back to - cppfiles.c. - (remove_duplicates): Use cpp_simplify_path. - * c-incpath.h (simplify_path): Remove. - * c-lex.c: Don't include c-incpath.h. - (init_c_lex): Remove simplify_path. - * cppfiles.c (remove_component_p, cpp_simplify_path): Restore. - (find_or_create_entry, validate_pch): Revert. - -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-02 Kazu Hirata - - * config/h8300/h8300.md (zero_extendqisi2): Change to an - expander. - (*zero_extendqisi2_h8300): New. - (*zero_extendqisi2_h8300hs): New. - (two splitters): New. - -2003-03-02 Kaveh R. Ghazi - - * fp-bit.h (float_to_usi): Fix condition wrapping prototype. - -2003-03-01 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Remove dead code. - -2003-03-01 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-01 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-03-01 Richard Earnshaw - - * predict.c (estimate_bb_frequencies): Correctly set - real_values_initialized after initialization. - -2003-03-01 Neil Booth - - * Makefile.in (C_AND_OBJC_OBJS, c-incpath.o, c-lex.o, LIBCPP_OBJS, - cppinit.o, cppdefault.o, fix-header): Update. - * c-incpath.c: New file. - * c-incpath.h: New file. - * c-lex.c: Include c-incpath.h. - (init_c_lex): Register path simplifier. - * c-opts.c: Include cppdefault.h and c-incpath.h. - (TARGET_SYSTEM_ROOT, verbose, iprefix, sysroot, std_inc, - std_cxx_inc, quote_chain_split, add_prefixed_path): New. - (COMMAND_LINE_OPTIONS): Add more options from cpplib. - (missing_arg, c_common_decode_option): Handle them. - (c_common_post_options): Register include chains. - (print_help): Update. - * cppdefault.h (struct default include): Update. - Move some macros to ... - * cppdefault.c: ... here. - (cpp_include_defaults): Add extra field add_sysroot. - * cppfiles.c (include_file, search_from, find_or_create_entry, - cpp_included, find_include_file, remap_filename): Update for - renaming of search_path to cpp_path, and of the chain headers. - (remove_component_p, _cpp_simplify_pathname): Move to c-incpath.c. - * cpphash.h (struct search_path): Move to cpplib.h. - (struct cpp_buffer, struct cpp_reader): Update. - (_cpp_simplify_pathname): Remove. - * cppinit.c: Don't include prefix.h and cppdefault.h. - (INO_T_EQ, INO_T_COPY, path_include, append_include_chain, - remove_dup_dir, remove_dup_nonsys_dirs, remove_dup_dirs, - init_standard_includes, BRACKET, SYSTEM, AFTER, no_dir, - no_pth, cpp_handle_options): Remove. - (struct pending_option): Remove chain members. - (cpp_destroy, cpp_read_main_file, COMMAND_LINE_OPTIONS, - cpp_handle_option): Update. - * cpplib.h (struct cpp_path, cpp_set_include_chains): New. - (struct cpp_options): Remove quote_include, bracket_include, - include_prefix, include_prefix_len, verbose, ignore_srcdir, - no_standard_includes, no_standard_cplusplus_includes. - (struct cpp_callbacks): Add simplify_path. - (cpp_handle_options): Remove. - * fix-header.c: Include c-incpath.h. - (read_scan_file): Update to use c-incpath functionality. - * doc/passes.texi: Update. - -2003-03-01 Kazu Hirata - - * config/h8300/h8300.c (bit_operand): Accept MEM only if it - satisfies EXTRA_CONSTRAINT 'U'. - -2003-03-01 Kazu Hirata - - * config/h8300/h8300.md (*tst_extzv_bitqi_1_n): Take a scratch - register. - (*tst_extzv_memqi_1_n): Change to a splitter. - (a peephole2): Update. - -2003-03-01 Richard Earnshaw - - * predict.c (estimate_bb_frequencies): Initialize the sreal - constants once per compilation. - -2003-02-28 Richard Henderson - - * toplev.c (flag_eliminate_unused_debug_types): Enable by default. - -2003-02-28 scott snyder - - * flags.h: Add flag_eliminate_unused_debug_types. - * toplev.c: Add flag_eliminate_unused_debug_types. - (f_options): Add -feliminate-unused-debug-types. - * dwarf2out.c (struct file_table): Add emitted member. - (splice_child_die): Fix the parent pointer for the child being - spliced. - (lookup_filename): Maintain file_table.emitted array. Don't - output .file directive here. - (maybe_emit_file): (new) - (init_file_table): Set up file_table.emitted. - (dwarf2out_source_line): Use maybe_emit_file. - (dwarf2out_start_source_file): Use maybe_emit_file. - (dwarf2out_init): Use maybe_emit_file. - (prune_unused_types_walk_attribs): (new) - (prune_unused_types_mark): (new) - (prune_unused_types_walk): (new) - (prune_unused_types_prune): (new) - (prune_unused_types): (new) - (dwarf2out_finish): Call prune_unused_types if - flag_eliminate_unused_debug_types is set. - * doc/invoke.texi (Option Summary): Add - -feliminate-unused-debug-types. - (Debugging Options): Likewise. - -2003-02-28 Geoffrey Keating - - * doc/invoke.texi: Change .pch to .gch. - * cppfiles.c (open_file_pch): Likewise. - * gcc.c (default_compilers): Likewise. - -2003-02-28 Aldy Hernandez - - * floatlib.c: Remove. - -2003-02-28 Jason Merrill - - * stor-layout.c (variable_size): Leave a "minus 1" outside the - SAVE_EXPR. - -2003-02-28 David Edelsohn - - * config/rs6000/power4.md: Add compare bypass. - -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 Dale Johannesen - - * loop.c (struct movable): Add insert_temp, shrink savemode. - (scan_loop): Accept invariants that require copying; mark as - insert_temp. - (combine_movables): Don't combine insert_temp movables. - (move_movables): Insert copies for insert_temp movables. - Don't record the info based on regno for insert_temp's. - -2003-02-28 Joel Sherrill - - PR 9638/other - * config/i386/i386.c (DEFAULT_PCC_STRUCT_RETURN): Ensure the - this constant defaults to 1. - -2003-02-28 Bob Wilson - - * config.gcc (xtensa-*-linux*): Add t-slibgcc-elf-ver to tmake_file. - -2003-02-28 Richard Earnshaw - - * arm.md (mulhisi3, mulhisi3addsi, mulhidi3adddi): Enable for any - ARMv5e processor, not just for XScale. Instructions are predicable. - (mulhisi3tb, mulhisi3bt, mulhisi3tt): New patterns for ARMv5e. - -2003-02-28 Nick Clifton - - * config/arm/arm.c (note_invalid_constants): Change parameter type - from bool to int. - -2003-02-28 Kazu Hirata - - * config/h8300/h8300.md (*tst_extzv_bitqi_1_n): Accept the - test of bit 7. - (*tst_extzv_memqi_1_n): Likewise. - (a peephole2): New. - -2003-02-28 Richard Sandiford - - * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Wrap in - #ifndef __mips16. - -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 Josef Zlomek - - * emit-rtl.c (set_reg_attrs_for_parm): New function. - * rtl.h (set_reg_attrs_for_parm): New exported function. - * function.c (assign_parms): Use set_reg_attrs_for_parm instead of - set_reg_attrs_from_mem. - -2003-02-27 Roger Sayle - Zack Weinberg - - * gcc.c (do_spec_1): Treat %U like %u for unique associations. - -2003-02-27 Kazu Hirata - - * reload1.c (sext_for_mode): Remove. - (reload_cse_move2add): Use trunc_int_for_mode instead of - sext_for_mode. - (move2add_note_store): Likewise. - Reset register information if we see a set in non-integer - mode. - -2003-02-27 David Edelsohn - - * config/rs6000/aix43.h (ASM_SPEC): Only emit -mppc64 if no -mcpu - option. - (ASM_CPU_SPEC): Use -m620 for Power3, Power4, 620, 630. - * config/rs6000/aix51.h: Same. - * config/rs6000/aix52.h: Same. - * config/rs6000/power4.md: Additional VMX bypasses. - -2003-02-27 Geert Bosch - - * toplev.c (print_version): Add indentation for GGC heuristics and - output after printing version information. - -2003-02-27 James E Wilson - - * combine.c (simplify_comparison): Require integral mode when - permuting SUBREG with AND. - -2003-02-27 Steve Ellcey - - * config/ia64/hpux.h (STARTFILE_PREFIX_SPEC): Remove. - -2003-02-27 Nick Clifton - - * config/arm/arm.md (extendsfdf2): Add pattern accidentally - deleted when cirrus instructions were added. - -2003-02-27 Jason Thorpe - - * config.gcc (*-*-netbsd[2-9]*, *-*-netbsdelf[2-9]*): Enable - POSIX thread support by default. - -2003-02-27 Roger Sayle - - * config/i386/cygwin.h: Don't include any other files directly. - * config/i386/mingw32.h: Don't include cygwin.h directly. - * config.gcc (cygwin, mingw32, uwin): Instead make these files - explicit in the tm_files variable. - -2003-02-27 Alan Modra - - * config/rs6000/rs6000.md: Add TI constant splitter. - -2003-02-26 Alexandre Oliva - - * builtins.c (purge_builtin_constant_p): Handle subreg of - constant_p_rtx too. - - * function.c (assign_stack_local_1): Truncate constant added to - frame_pointer_rtx or virtual_stack_vars_rtx for Pmode. - -2003-02-26 David Edelsohn - - * config.gcc: Add power4 to PowerPC with_cpu list. - -2003-02-26 Jan Hubicka - - * objc-act.c: (mark_referenced_methods): Fix compilation problem. - -2003-02-26 Zdenek Dvorak - - * gcov-dump.c (print_prefix): Fix signedness warning. - * gcov-io.h (struct counter_section, struct counter_section_data): New. - (struct function_info): n_arc_counts field removed, n_counter_sections, - counter_sections fields added. - (struct gcov_info): arc_counts, n_arc_counts fields removed, - n_counter_sections, counter_sections fields added. - * libgcov.c (gcov_exit, __gcov_flush): Add support for multiple - profile sections. - * profile.h (MAX_COUNTER_SECTIONS): New. - (struct section_info): New. - (struct profile_info): count_instrumented_edges, - count_edges_instrumented_now fields removed, n_sections, section_info - fields added. - (find_counters_section): Declare. - * profile.c (struct function_list): count_edges field removed, - n_counter_sections, counter_sections fields added. - (set_purpose, label_for_tag, build_counter_section_fields, - build_counter_section_value, build_counter_section_data_fields, - build_counter_section_data_value, build_function_info_fields, - build_function_info_value, build_gcov_info_fields, - build_gcov_info_value): New static functions. - (find_counters_section): New function. - (instrument_edges, get_exec_counts, compute_branch_probabilities, - branch_prob, create_profiler): Modified to support multiple profile - sections. - -2003-02-26 John David Anglin - - * pa.c (compute_frame_size): Don't assume PREFERRED_STACK_BOUNDARY - is 8 * STACK_BOUNDARY. - * pa.h (PREFERRED_STACK_BOUNDARY): Change to 128 on 64-bit port. - -2003-02-26 Michael Matz - - * ra-colorize.c (merge_moves): Fix list handling. - -2003-02-26 Nick Clifton - - * config/arm/arm.c (is_load_address): Rename to... - (arm_memory_load_p) ... this and make it check for SUBREGs and - constant loads that will be converted into loads from the - minipool. - (is_cirrus_insn): Rename to ... - (arm_cirrus_insn_p): ... this, for consistency. Replace test - of CIRRUS_NO with CIRRUS_NOT. - (cirrus_reorg): Use renamed functions. - (note_invalid_constants): Change from a void function to bool. - Add an extra parameter, saying whether the fixups should be - pushed. Return true if fixups are needed. - (arm_reorg): Use renamed functions. Use INSN_P. Replace test - of CIRRUS_NO with CIRRUS_NOT. - * config/arm/arm.h (FLOAT_WORDS_BIG_ENDIAN): Mention that - other floating point co-processors can also affect this. - * config/arm/arm.md ("type" attribute): Add mav_farith and - mav_dmult. Replace references to "cirrus_type" attribute with - "type". - * config/arm/cirrus.md ("cirrus_fpu" attribute): Delete. - ("cirrus_type" attribute): Delete - use "type" instead. - ("cirrus" attribute): Replace 'no' with 'not' and 'yes' with - 'normal'. - -2003-02-25 Jan Hubicka - - * objc-act.c: Include cgraph.h - (mark_referenced_methods): New function. - (objc_init): Call it. - * objc-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Set. - - * c-decl.c (finish_function): Honor can_defer_p even in unit-at-a-time - mode. - - * optabs.c (expand_fix): Do not widen the input operand. - - * expr.c (emit_group_store): Fix crash when converting single - register into complex register. - - * Makefile.in (jump.o, regclass.o, alias.o): Add dependency on timevar.h - * alias.c: Include timevar.h - (init_alias_analysis): Set timevar - * jump.c: Include timevar.h - (rebuild_jump_labels): Set timevar - * regcalss.c: Include timevar.h - (reg_scan): Set timevar - * timevar.def (TV_ALIAS_ANALYSIS, TV_REG_SCAN, TV_REBUILD_JUMP): New - -2003-02-26 Zdenek Dvorak - - * cse.c (count_reg_usage): Fix handling of REG_EQUAL notes. - - * Makefile.in (loop-unroll.o): New. - * cfgloop.h (UAP_PEEL, UAP_UNROLL, UAP_UNROLL_ALL): New. - (unroll_and_peel_loops): Declare. - * alias.c (init_alias_analysis): Flag_unroll_loops renamed to - flag_old_unroll_loops. - * loop.c (loop_invariant_p): Ditto. - * unroll.c (unroll_loop): Flag_unroll_all_loops renamed to - flag_old_unroll_all_loops. - * flags.h (flag_unroll_loops): Renamed to flag_old_unroll_loops. - (flag_unroll_all_loops): Renamed to flag_old_unroll_all_loops. - * params.def (PARAM_MAX_UNROLLED_INSNS): Default value changed. - (PARAM_MAX_AVERAGE_UNROLLED_INSNS, PARAM_MAX_UNROLL_TIMES, - PARAM_MAX_PEELED_INSNS, PARAM_MAX_PEEL_TIMES, - PARAM_MAX_COMPLETELY_PEELED_INSNS, PARAM_MAX_COMPLETELY_PEEL_TIMES, - PARAM_MAX_ONCE_PEELED_INSNS): New. - * toplev.h (flag_old_unroll_loops, flag_old_unroll_all_loops): New. - (flag_unroll_loops, flag_unroll_all_loops): Used for new unroller - instead of old one. - (flag_peel_loops): New. - (lang_independent_options): The new flags added. - (rest_of_compilation): Call new unroller. - (process_options): Setup flags for coexistence of old and new unroller. - * doc/invoke.texi: Document new options. - * doc/passes.texi: Document new unroller pass. - -2003-02-26 David Billinghurst - - * fixinc/fixincl.x: Regenerate - -2003-02-26 Josef Zlomek - - * function.c (assign_parms): Set reg_attrs for parameters passed in - registers. - -2003-02-26 Alan Modra - - PR target/9681 - * tlink.c (scan_linker_output): Drop leading '.' from symbol names. - -2003-02-25 David Edelsohn - - * config/rs6000/xcoff.h (ASM_FILE_START): Do not emit machine - pseudo-op. - -2003-02-25 Roger Sayle - - * combine.c (combine_simplify_rtx, simplfy_comparison): Use CC0_P. - * cse.c (invalidate_skipped_set): Likewise. - * integrate.c (subst_constants): Likewise. - * jump.c (reversed_comparison_code_parts): Likewise. - * loop.c (canonicalize_condition): Likewise. - * simplify-rtx.c (simplify_relational_operation): Likewise. - -2003-02-25 Roger Sayle - - * builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete. - (abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use - the appropriate macro to define built-in function. - (fmod,fmodf,fmodl): New built-in functions. - - * doc/extend.texi (fmod,fmodf,fmodl): Document new built-ins. - -2003-02-25 Richard Henderson - - * config/i386/i386.c (function_arg): Pass variable sized - structures correctly on the stack. - -2003-02-25 Kazu Hirata - - * reload1.c (reload_cse_move2add): Use STRICT_LOW_PART if PLUS - does not reduce the cost of SET. - -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 Kazu Hirata - - * gcse.c (cprop_jump): Revert the 2003-02-23 change. - -2003-02-25 Vladimir Makarov - Richard Henderson - - * sched-ebb.c (add_deps_for_risky_insns): Add the dependence when - there is no similar load. - -2003-02-25 Vladimir Makarov - Richard Henderson - - * sched-int.h (INSN_TRAP_CLASS, WORST_CLASS): Move them from - sched-rgn.c. - (add_forward_dependence): New function prototype. - - * sched-rgn.c (INSN_TRAP_CLASS, WORST_CLASS): Move them to - sched-init.h. - (CONST_BASED_ADDRESS_P, may_trap_exp, haifa_classify_insn): Move - them to haifa-sched.c. - - * haifa-sched.c (CONST_BASED_ADDRESS_P, may_trap_exp, - haifa_classify_insn): Move them from sched-rgn.c. - - * sched-deps.c (add_dependence): Return flag of creating a new - entry. - (add_forward_dependence): New function. - (compute_forward_dependences): Use the function. - - * sched-ebb.c (earliest_block_with_similiar_load): New function. - (add_deps_for_risky_insns): New function. - (schedule_ebb): Call the function. - -2003-02-20 Aldy Hernandez - - * doc/tm.texi: Document Rename TARGET_VECTOR_TYPES_COMPATIBLE to - TARGET_VECTOR_OPAQUE_P. Document accordingly. - - * testsuite/gcc.dg/20030218-1.c: Check that initialization of - opaque types fail. - - * c-typeck.c (comptypes): Change call to vector_types_compatible - to vector_opaque_p. - (convert_for_assignment): Call vector_opaque_p instead of - vector_types_compatible. - (really_start_incremental_init): Disallow initialization of opaque - types. - - * target-def.h: Remove TARGET_VECTOR_TYPES_COMPATIBLE. - Define TARGET_VECTOR_OPAQUE_P. - (TARGET_INITIALIZER): Same. - - * target.h (struct gcc_target): Remove vector_types_compatible. - Add vector_opaque_p. - - * config/rs6000/rs6000.c (rs6000_spe_vector_types_compatible): - Remove. - (is_ev64_opaque_type): Check for TARGET_SPE and make sure type is - a vector type. Change return type to bool. - (TARGET_VECTOR_TYPES_COMPATIBLE): Remove. - (TARGET_VECTOR_OPAQUE_P): Define. - - * cp/parser.c (cp_parser_init_declarator): Call vector_opaque_p - target hook. - Include target.h. - (cp_parser_init_declarator): Fix typo in function comments. - -2003-02-25 Jan Hubicka - - * Makefile.in (lcm.o): Add dependency on function.h - * lcm.c (function.h): Include. - * i386.c (machine_function, ix86_stack_locals, - * ix86_save_varrargs_registers) : Move to - ... - * i386.h (machine_function, ix86_stack_locals, - ix86_save_varrargs_registers): ... here; add optimize_mode_switching - (ix86_optimize_mode_switching): New. - * i386.md (fix patterns): Set ix86_optimize_mode_switching - -2003-02-25 Nick Clifton - - * config/d30v/d30v.c (d30v_init_cumulative_args): Fix typo. Name - of fourth arg is 'fndecl' not 'indirect'. Update comment - describing the function's parameters. - -2003-02-24 Jan Hubicka - - * combine.c (simplify_shift_const): Fix previous patch. - -2003-02-24 Jeff Law - - * i386.md (testdi_1_rex64): Discourage reload from using the %eax - alternative. - (testsi_1, testhi_1, testqi_1): Likewise. - -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 Roger Sayle - - * gcc.c (do_spec_1) ['{']: Handle pending argument upon return - from handle_braces in "%{...}". - -2003-02-24 Kaz Kojima - - * config/sh/sh.c (TARGET_HAVE_TLS): Conditionally define. - (prepare_move_operands): Handle TLS operands. - (tls_symbolic_operand): New. - (nonpic_symbol_mentioned_p): Handle TLS UNSPECs. - (legitimize_pic_address): Do nothing for the TLS symbol. - (sh_encode_section_info): Handle TLS case. - (sh_strip_name_encoding): Drop TLS encoding. - * config/sh/sh-protos.h (tls_symbolic_operand): Add prototype. - * config/sh/sh.h (SH_TLS_ENCODING): Define. - (TLS_SYMNAME_P, STRIP_TLS_ENCODING): Likewise. - (ASM_OUTPUT_LABELREF): Drop TLS encoding. - (OUTPUT_ADDR_CONST_EXTRA): Handle TLS UNSPECs. - * config/sh/sh.md: Define TLS UNSPEC constants. - (type): Add tls_load. - ("tls_global_dynamic", "tls_local_dynamic"): New insns. - ("sym2DTPOFF", "symDTPOFF2reg", "sym2GOTTPOFF"): New expanders. - ("tls_initial_exec"): New insn. - ("sym2TPOFF", "symTPOFF2reg"): New expanders. - ("load_gbr"): New insn. - - * configure.in (HAVE_AS_TLS): Add sh-*-* and sh[34]*-*-* cases. - * configure: Regenerate. - -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 Kazu Hirata - - * gcse.c (cprop_jump): Use the REG_EQUAL note if available. - -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 Richard Henderson - - * i386.c, i386.h (TUNEMASK): Rename from CPUMASK. - -2003-02-22 Kelley Cook - - * i386.h, i386.c, i386.md (ix86_tune): Rename from ix86_cpu. - (ix86_tune_string): Rename from ix86_cpu_string. - -2003-02-22 Kelley Cook - - * config/i386/i386.c: Replace "mcpu" with "mtune". - * config/i386/i386.h (TARGET_OPTIONS): Likewise. - (CC1_CPU_SPEC): Likewise. New warning for "-mcpu". - * doc/invoke.texi (i386 and x86-64 Options): Replace "mcpu" - with "mtune". Note that "mcpu" is a deprecated synonym for "mtune". - -2003-02-23 Andreas Schwab - - * config.gcc: Delete references to m68k/t-linux and - m68k/t-linux-aout. - * config/m68k/t-linux, config/m68k/t-linux-aout: Removed. - -2003-02-22 Jan Hubicka - - * toplev.c (rest_of_compilation): Apply fotgotten hunk - of track scheduling patch. - -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 Jan Hubicka - - * c-decl.c (c_expand_body_1): Fix. - -2003-02-22 Jan Hubicka - - * expmed.c (expand_divmod): Undo sign extensions for unsigned operands - - * cfgcleanup.c (try_forward_edges): Don't check loop structures - when not optimizing. - (cleanup_cfg): Do not iterate trought delete_trivially_dead_insns - when not expensive. - * toplev.c (rest_of_compilation): Duplicate loop headers only when - optimizing; Delete trivially dead insns early; fix optimize check. - - * Makefile.in (c-decl.o, c-objc-common.o, cgraph.o, tree-inline.o): Add - dependency on cgraph.h - * c-decl.c: Include cgraph.h - (finish_function): Update call of tree_inlinable_function_p. - * c-objc-common.c: Include cgraph.h - * cgraph.h: New file. - * cgraphunit.c: New file. - * cgraph.c (cgraph_node, cgraph_edge): Move into cgraph.h - (cgraph_nodes, cgraph_n_nodes): Globalize. - (cgraph_finalize_function, cgraph_finalize_compilation_unit - cgraph_create_edges, cgraph_optimize, cgraph_mark_needed_node): - Move into cgraphunit.c - * tree-inline.c: Include cgraph.h - * tree-inline.c: Include cgraph.h - -2003-02-22 Josef Zlomek - - * config/i386/i386.md: Use gen_lowpart instead of gen_rtx_REG - for copying a register. - -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 Roger Sayle - - * fold-const.c (omit_one_operand): No longer static. - * tree.h (omit_one_operand): Prototype here. - (div_and_round_double): Keep fold-const.c prototypes together. - * builtins.c (builtin_mathfn_code): Handle binary built-in - funtions, such as "pow" and "atan2". - (fold_builtin): Optimize both pow(x,0.0) and pow(1.0,y) to 1.0. - Simplify optimizations using "type" the builtin's return type. - -2003-02-22 Hans-Peter Nilsson - - * config/cris/cris.c (cris_rtx_costs): Blockify dangling else. - Fix functionalization typo. - - * regmove.c (optimize_reg_copy_1): Do not replace a hard register - in an asm. - -2003-02-21 Kaveh R. Ghazi - - * Makefile.in (ggc-common.o): Depend on $(PARAMS_H) - * 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-22 Jan Hubicka - - * 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. - -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. - - * 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. - -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 J"orn Rennecke - - * sh.h (OVERRIDE_OPTIONS): Fix code that clears 'e' register class. - - * sh.md (binary_sf_op): Use extra constant operand instead of - negating constant operand 4. - * sh.c (sh_expand_binop_v2sf): Supply it. - -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 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -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 Jan Hubicka - - * toplev.c (parse_options_and_default_flags): Undo accidental commit. - -2003-02-21 Glen Nakamura - - PR optimization/8613 - * builtins.c (expand_builtin): Emit postincrements before expanding - builtin functions. - -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 Alexandre Oliva - - * configure.in (TARGET_SYSTEM_ROOT): Set default to - ${exec_prefix}/${target_alias}/sys-root. Match explicit - '${exec_prefix}' (in addition to the expansion thereof) as - relocatable. - * configure: Rebuilt. - -2003-02-20 Kazu Hirata - - * config/h8300/h8300.md (addhi3_incdec): Change the name to - *addhi3_incdec. - (addsi3_incdec): Change the name to *addsi3_incdec. - -2003-02-20 Roger Sayle - - * explow.c (force_reg): Avoid useless REG_EQUAL notes. - -2003-02-20 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-20 Jan Hubicka - - * toplev.c (flag_sched2_use_superblocks, flag_sched2_use_traces): New - global variables. - (lang_independent_options): Add -fsched2-use-superblocks - -fsced2-use-traces. - (rest_of_compilation): Deal with it. - * invoke.texi (-fsched2-use-traces, fsched2-use-superblocks): Declare. - * flags.h (flag_sched2_use_superblocks, flag_sched2_use_traces): - Declare. - * rtl.h (reg_to_stack): Update prototype. - * reg-stack.c (reg_to_stack): Return when something has changed; - update liveness when executing after superblock scheduling. - - * combine.c (simplify_shift_const): Simplify few special cases - into constants. - -2003-02-20 David Edelsohn - - * config/rs6000/rs6000.md: (attr "type"): Add fast_compare. - (add.,subf.,neg.): Change attribute to fast_compare. - All DFA descriptions updated. - -2003-02-20 Nathan Sidwell - - Change base class access representation. - * tree.h (TREE_VIA_PUBLIC, TREE_VIA_PROTECTED, - TREE_VIA_PRIVATE): Remove. - (BINFO_BASEACCESSES): New binfo elt. - (BINFO_BASEACCESS): New accessor. - (BINFO_ELTS): Increase. - (TI_ACCESS_PUBLIC, TI_ACCESS_PROTECTED, TI_ACCESS_PRIVATE): New. - (access_public_node, access_protected_node, - access_private_node): New global nodes. - * tree.c (build_common_tree_nodes_2): Initialize access nodes. - * dbxout.c (dbxout_type): Adjust. - * dwarf2out.c (gen_inheritance_die): Add access parameter. - (gen_member_die): Adjust. - * dwarfout.c (output_inheritance_die): ARG is array of two trees. - (output_type): Adjust. - * tree-dump.c (dequeue_and_dump): Adjust binfo dumping. - - Change base class access representation. Share virtual base - binfos. - * cp/call.c (build_special_member_call): Remove binfo_for_vbase - call. - * cp/class.c (build_base_path): Likewise. - (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use. - (build_secondary_vtable): Remove FOR_TYPE arg. Adjust. - (make_new_vtable): Adjust. - (force_canonical_binfo_r): Delete. - (force_canonical_binfo): Delete. - (mark_primary_virtual_base): Delete. - (dfs_unshared_virtual_bases): Delete. - (mark_primary_bases): Adjust. - (maybe_warn_about_overly_private_class): Adjust. - (dfs_base_derived_from): Delete. - (base_derived_from): Follow the inheritance chain. - (struct find_final_overrider_data): Add vpath member. - (dfs_find_final_overrider): Adjust. - (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New. - (find_final_overrider): Adjust. - (update_vtable_entry_for_fn): Adjust. - (modify_all_vtables): Adjust. - (walk_subobject_offsets): Adjust. - (layout_nonempty_base_or_field): Adjust. - (layout_empty_base): Remove last parameter. Adjust. - (build_base_field): Adjust. - (build_base_fields): Adjust. - (propagate_binfo_offsets): Remove last parameter. Adjust. - (dfs_set_offset_for_unshared_vbases): Delete. - (layout_virtual_bases): Adjust. - (finish_struct_1): Adjust. - (init_class_processing): Don't init access nodes. - (dfs_get_primary_binfo): Delete. - (get_primary_binfo): Adjust. - (dump_class_hierarchy_r): Remove most derived arg, add IGO - parameter. Adjust. - (dump_class_hierarchy): Adjust. - (finish_vtbls): Adjust. - (get_original_base): Delete. - (build_vtt_inits): Adjust. - (dfs_build_secondary_vptr_vtt_inits): Adjust. - (dfs_ctor_vtable_bases_queue_p): Adjust. - (build_ctor_vtbl_group): Adjust. - (dfs_accumulate_vtbl_inits): Adjust. - (build_vtbl_initializer): Adjust. - (build_vbase_offset_vtbl_entries): Adjust. - (add_vcall_offset_vtbl_entries_1): Adjust. - * cp/cp-tree.h (CPTI_ACCESS_*): Remove. - (access_*_node): Remove. - (CANONICAL_BINFO): Delete. - (BINFO_UNSHARED_MARKED): Remove. - (BINFO_MARKED): Set LANG_FLAG_0 directly. - (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete. - (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly. - (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED): - Delete. - (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly. - (SET_BINFO_NEW_VTABLE_MARKED): Adjust. - (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED): - Delete. - (BINFO_DEPENDENT_BASE_P): New. - (dfs_walk, dfs_walk_real): Queue function takes derived binfo and - index. - (markedp, unmarkedp): Adjust. - (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p, - dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp, - find_vbase_instance, binfo_for_vbase): Delete. - (copied_binfo, original_binfo): Declare. - (finish_base_specifier): Add virtual_p arg. - (unshare_base_binfos): Delete. - (copy_base_binfos): Declare. - (reverse_path): Delete. - * cp/decl.c (xref_basetypes): Access and virtuality passed - differently. Don't copy direct base binfos here. Call - copy_base_binfos. - * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust. - (initialize_vtbl_ptrs): Adjust. - (expand_member_init): Adjust. - * cp/parser.c (cp_parser_base_specifier): Adjust. - * cp/pt.c (instantiate_class_template): Adjust. - (get_template_base_recursive): Adjust. - * cp/rtti.c (get_pseudo_ti_init): Adjust. - (get_pseudo_ti_desc): Adjust. - * cp/tree.c (unshare_base_binfos): Rename to ... - (copy_base_binfos): ... here, reimplement. - (make_binfo): Set BINFO_DEPENDENT_BASE_P. - (reverse_path): Remove. - * cp/typeck.c (get_delta_difference): Adjust error messages. - * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust. - * cp/search.c (lookup_base_r): Adjust. - (dynamic_cast_base_recurse): Adjust. - (canonical_binfo): Remove. - (dfs_canonical_queue): Remove. - (dfs_assert_unmarked_p): Remove. - (assert_canonical_unmarked): Remove. - (shared_marked_p, shared_unmarked_p): Remove. - (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE. - (dfs_access_in_type): Adjust. - (access_in_type): Adjust. - (dfs_accessible_queue_p): Adjust. - (dfs_accessible_p): Adjust. - (is_subobject_of_p_1, is_subobject_of_p): Remove. - (struct lookup_field_info): Remove from_dep_base_p field. - (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P. - (lookup_field_r): Remove dependent base code. - (lookup_member): Likewise. - (dfs_walk, dfs_walk_real): Add access arg to queue fn. - (dfs_unmarked_real_bases_queue_p): Remove. - (dfs_marked_real_bases_queue_p): Remove. - (dfs_skip_vbases): Remove. - (dfs_get_pure_virtuals): Adjust. - (markedp, unmarkedp): Adjust. - (marked_vtable_pathp, unmarked_vtable_pathp): Remove. - (marked_pushdecls_p, unmarked_pushdecls_p): Adjust. - (dfs_unmark): Adjust. - (dfs_get_vbase_types):Remove. - (dfs_build_inheritance_graph_order): Remove. - (get_vbase_types): Remove - (dfs_find_vbase_instance): Remove. - (find_vbase_instance): Remove. - (dfs_debug_unmarkedp): Adjust. - (dependent_base_p): Remove. - (dfs_push_type_decls): Adjust. - (dfs_push_decls): Adjust. - (dfs_no_overlap_yet): Adjust. - (copied_binfo): New function. - (original_binfo): New function. - (binfo_for_vbase): Remove. - - Change base class access representation. - * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC. - (add_interface_do): Likewise. - -2003-02-20 David Edelsohn - - * config/rs6000/sysv4.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Define. - * config/rs6000/power4.md (power4-store,power4-vecstore): New - insn reservations. - (power4-fpstore): Compact. - -2003-02-20 Kazu Hirata - - * config/h8300/h8300.md (*iorsi3_w): New. - -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-02-20 Josef Zlomek - - * bb-reorder.c (find_traces_1_round): Fix comment typo. - -2003-02-19 Roger Sayle - - * fold-const.c (fold_real_zero_addition_p): Don't fold a zero - addition in the presence of signaling NaNs. - -2003-02-19 Krister Walfridsson - - * tm.texi (INIT_CUMULATIVE_ARGS): Fix typo. - -2003-02-19 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Optimize or.l when - ORing with 0xffff??00 with the highest bit of the ?? part set. - (compute_logical_op_length): Update. - (compute_logical_op_cc): Likewise. - -2003-02-19 Josef Zlomek - - * bb-reorder.c (find_traces_1_round): Fixed condition for small - destination block with multiple predecessors. - (connect_traces): Check whether the block is a start of trace. - -2003-02-19 Jan Hubicka - - * calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS - * function.c (assign_params): Likewise. - * arm-protos.h (arm_init_cumulative_args): Update prototype. - * arm.c (arm_init_cumulative_args): Update function. - * arm.h (INIT_CUMULATIVE_ARGS): Update. - * avr-protos.h (init_cumulative_args): Update prototype. - * avr.c (init_cumulative_args): Update function. - * avr.h (INIT_CUMULATIVE_ARGS): Update. - * d30v-protos.h (d30v_init_cumulative_args): Update prototype. - * d30v.c (d30v_init_cumulative_args): Update function. - * d30v.h (INIT_CUMULATIVE_ARGS): Update. - * frv-protos.h (frv_init_cumulative_args): Update prototype. - * frv.c (frv_init_cumulative_args): Update function. - * frv.h (INIT_CUMULATIVE_ARGS): Update. - * mips.c (mips_expand_prolgue): Update call of INIT_CUMULATIVE_ARGS. - * pa.h (INIT_CUMULATIVE_ARGS): Update. - * sparc-protos.h (init_cumulative_args): Update prototype. - * sparc.c (init_cumulative_args): Update function. - * sparc.h (INIT_CUMULATIVE_ARGS): Update. - * tm.texi (INIT_CUMULATIVE_ARGS): Update documentation. - -2003-02-19 Kazu Hirata - - * config/h8300/h8300.md (*iorsi3_two_qi_sext): New. - (*ashiftsi_sextqi_7): Likewise. - -2003-02-19 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-19 Jan Hubicka - - * i386.md (movsfcc_1, movdfcc_1): Fix constrains. - -2003-02-19 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_override_options): Initialize - align_jumps_max_skip and align_loops_max_skip. - -2003-02-19 Thierry Moreau - - * config/rs6000/rs6000.c (rs6000_encode_section_info): Do not - test size if named section. - -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-19 Kazu Hirata - - * config/h8300/h8300.md (extendqisi2): Change to an expander. - (*extendqisi2_h8300): New. - (*extendqisi2_h8300hs): Likewise. - -2003-02-19 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototype for - split_adds_subs. Remove the prototypes for - const_int_le_2_operand and const_int_le_6_operand. - * config/h8300/h8300.c (split_adds_sub): Don't output inc/dec. - (const_int_le_2_operand): Remove. - (const_int_le_6_operand): Likewise. - * config/h8300/h8300.h (PREDICATE_CODES): Remove the entries - for const_int_le_2_operand and const_int_le_6_operand. - * config/h8300/h8300.md: Update all uses of split_adds_subs. - (a peephole2): New. - -2003-02-18 Jan Hubicka - - * cgraph.c (NPREDECESORC, SET_NPREDECESORS): Kill. - (cgraph_expand_function): Rewrite. - -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 Roger Sayle - - * convert.c (convert_to_real): Also optimize (float)log(x) into - logf(x) where x is a float, i.e. also handle BUILT_IN_LOG{,L}. - -2003-02-18 Kaz Kojima - - * config/sh/sh.c (unspec_caller_rtx_p): New. - (sh_cannot_copy_insn_p): New. - (TARGET_CANNOT_COPY_INSN_P): New. - -2003-02-18 Richard Henderson - - * c-common.c (handle_used_attribute): Accept static data too. - -2003-02-18 Nick Clifton - Aldy Hernandez - - * testsuite/gcc.dg/20030218-1.c: New. - - * doc/tm.texi: Document TARGET_VECTOR_TYPES_COMPATIBLE. - - * target-def.h (TARGET_INITIALIZER): Add - TARGET_VECTOR_TYPES_COMPATIBLE. - (TARGET_VECTOR_TYPES_COMPATIBLE): New macro. - - * target.h (struct gcc_target): Add field vector_types_compatible. - - * c-typeck.c (comptypes): Take into account - TARGET_VECTOR_TYPES_COMPATIBLE. - (convert_for_assignment): Same. - - * config/rs6000/rs6000.c (is_ev64_opaque_type): New. - (rs6000_spe_vector_types_compatible): New. - (TARGET_VECTOR_TYPES_COMPATIBLE): Define. - -2003-02-19 Andreas Schwab - - * Makefile.in (toplev.o): Depend on $(LANGHOOKS_DEF_H). - * toplev.c: Include langhooks-def.h. - -2003-02-18 Chris Demetriou - - * config/mips/mips.h (enum processor_type): Sort entries - alphabetically. - * config/mips/mips.md (define_attr cpu): Sync with processor_type - enum values, including adding entries that were missing. - -2003-02-18 J"orn Rennecke - - * sh.c (calc_live_regs): Also check GET_CODE when checking if - initial value for PR_REG is still the PR_REG register. - -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 Krister Walfridsson - - * inclhack.def (netbsd_bogus_semicolon): New fix. - * fixincl.x: Rebuilt. - * tests/base/ctype.h: Update. - -2003-02-18 Roger Sayle - - * fold-const.c (negate_expr_p): New function to determine whether - an expression can be negated cheaply. - (fold) [MINUS_EXPR]: Use it to determine whether to transform - -A - B into -B - A for floating point types. - -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. - -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-18 Geoffrey Keating - - * gcc.c (validate_switches): Don't scan past closing '}'. - -2003-02-18 Ben Elliston - - PR c++/1607 - * doc/extend.texi (Function Attributes): Document the effect of - the C++ "this" parameter on the counting of arguments for the - "format" and "format_arg" attributes. - -2003-02-17 Aldy Hernandez - - * config/rs6000/spe.h (__ev_stdd): Cast 2nd arg. - (__ev_stdw): Same. - (__ev_stdh): Same. - -2003-02-17 Jan Hubicka - - * recog.c (split_all_insns): Fix memory overflow. - -2003-02-17 Kazu Hirata - - * config/h8300/h8300.md (cmpqi): Remove mode from compare. - (cmphi): Likewise. - (*cmphi_h8300): Likewise. - (*cmphi_h8300hs): Likewise. - (cmpsi): Likewise. - (7 peephole2): Likewise. - -2003-02-16 Jan Hubicka - - * c-typeck.c (build_c_cast): Fold constant variables into - initial values. - -2003-02-16 Gerald Pfeifer - - * doc/install.texi (Specific): Fix link for m68k-att-sysv. - (Binaries): Ditto for Sinix/Reliant Unix. - -2003-02-16 Richard Earnshaw - - * arm.c (arm_reload_in_hi): Ensure that the scratch register does - not overlap the final result register. - -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 Roger Sayle - - * config/i386/i386.c (x86_ext_80387_constants): Use 80387 insns - to load mathematical constants on K6, Athlon, Pentium 4 and PPro. - (ext_80387_constants_table): Global table of 80387 special constants - guarded by ext_80387_constants_init flag when not initialized. - (init_ext_80387_constants): New function to initialize this table. - (standard_80387_constant_p): Extend to recognize extra 80387 - constants, in XFmode, on processors where this is a win. - (standard_80387_constant_opcode): New function to return the - opcode associated with standard_80387_constant_p. - (standard_80387_constant_rtx): New function to return the XFmode - CONST_DOUBLE associated with standard_80387_constant_p. - (ix86_rtx_costs): Give the new constants the same cost as 1.0. - - * config/i386/i386-protos.h (standard_80387_constant_opcode): - Prototype here. - (standard_80387_constant_rtx): Likewise. - - * config/i386/i386.md (*movsf1, *movsf1_nointerunit, *movdf_nointeger, - *movdf_integer, *movxf_nointeger, *movtf_nointeger, *movxf_integer, - *movtf_integer): Simplify using new standard_80387_constant_opcode. - -2003-02-15 Geoffrey Keating - - * doc/invoke.texi (Optimize Options): Correct @option syntax. - -2003-02-15 Richard Henderson - - * Makefile.in (cfglayout.o): Depend on TARGET_H. - * cfglayout.c: Include target.h. - (cfg_layout_can_duplicate_bb_p): Check targetm.cannot_copy_insn_p. - * target-def.h (TARGET_CANNOT_COPY_INSN_P): New. - * target.h (struct gcc_target): Add cannot_copy_insn_p. - - * config/alpha/alpha.c (alpha_cannot_copy_insn_p): New. - (TARGET_CANNOT_COPY_INSN_P): New. - (override_options): Revert 2003-02-08 hack. - -2003-02-15 Richard Henderson - - * gcse.c (bypass_block): Use BLOCK_FOR_INSN for resolving LABEL_REFs. - (bypass_conditional_jumps): Accept computed_jump_p insns as well. - -2003-02-15 David Edelsohn - - * config/rs6000/rs6000.h (processor_type): Add PPC440. - * config/rs6000/rs6000.c (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, - TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, - TARGET_SCHED_VARIABLE_ISSUE): Define. - (rs6000_use_dfa_pipeline_interface): New function. - (rs6000_multipass_dfa_lookahead): New Function. - (rs6000_variable_issue): New function. - (rs6000_adjust_cost): Add CMP and DELAYED_CR types. - (rs6000_issue_rate): Add PPC440. - * config/rs6000/rs6000.md (unspec list): Correct typo. - (attr "type"): Add load_ext, load_ext_u, load_ext_ux, load_u, - store_ux, store_u, fpload_ux, fpload_u, fpstore_ux, fpstore_u, - cmp, delayed_cr, mfcr, mtcr. - (automata_option): Set "ndfa". - (extendMMNN2): Update attributes. - (movcc_internal1): Discourage move to non-cr0. Update - attributes. - (movMM_update): Update attributes. - (cmpMM_internal): Update attributes. - (sCC CR materialization): Update attributes. - (branch patterns): Do not discourage non-cr0. - (cr logical patterns): Prefer destructive register allocation. - Update attributes. - (movesi_from_cr): Update attribute. - (mtcrf_operation): Update attribute. - (mtcrfsi): Update attribute. - * config/rs6000/40x.md: New file. - * config/rs6000/603.md: New file. - * config/rs6000/6xx.md: New file. - * config/rs6000/7450.md: New file. - * config/rs6000/7xx.md: New file. - * config/rs6000/mpc.md: New file. - * config/rs6000/power4.md: New file. - * config/rs6000/rios1.md: New file. - * config/rs6000/rios2.md: New file. - * config/rs6000/rs64.md: New file. - [Some DFA descriptions based on work by Michael Hayes] - -2003-02-15 Richard Henderson - - * bb-reorder.c (find_traces_1_round): Don't connect easy to copy - successors with multiple predecessors. - (connect_traces): Try harder to copy traces of length 1. - - * 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-02-15 Richard Henderson - - * 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-02-15 Richard Henderson - - * recog.c (split_all_insns): Include new blocks in life update; - do a global life update. - -2003-02-15 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-02-14 Falk Hueffner - - PR optimization/7702 - * reload1.c (reload_cse_simplify_set): Honor - CANNOT_CHANGE_MODE_CLASS. - -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-14 Kazu Hirata - - * simplify-rtx.c (simplify_binary_operation): Simplify ~y when - (x - (x & y)) is found. - -2003-02-14 Rainer Orth - - * configure.in: Fix typo. - * configure: Regenerate. - -2003-02-14 Kazu Hirata - - * config/h8300/h8300.md (*iorsi2_and_1_lshiftrt_1): New. - -2003-02-13 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-13 Zack Weinberg - - * emit-rtl.c (init_emit): Use ggc_alloc for regno_reg_rtx. - * function.h (struct emit_status): Length of regno_pointer_align - and x_regno_reg_rtx as seen by gengtype is only x_reg_rtx_no, - not regno_pointer_align_length (i.e. length actually used, not - length as allocated) - - * config/i386/i386.c (struct stack_local_entry): New. - (struct machine_function): Replace huge array with alist. - (assign_386_stack_local): Change to match. - -2003-02-13 John David Anglin - - * inclhack.def (hpux_long_double): Tighten select and add bypass - regexp. - * fixincl.x: Rebuilt. - -2003-02-13 Josef Zlomek - - * cfgcleanup.c (outgoing_edges_match): When there is single outgoing - edge and block ends with a jump insn it must be simple jump. - -2003-02-13 Daniel Jacobowitz - - * Makefile.in (PREPROCESSOR_DEFINES): Add - @TARGET_SYSTEM_ROOT_DEFINE@. - * configure.in (PREFIX_INCLUDE_DIR): Don't define if $with_sysroot - is specified or if building a cross compiler. - (TARGET_SYSTEM_ROOT_DEFINE): Add TARGET_SYSTEM_ROOT_RELOCATABLE - if the sysroot is under $exec_prefix. - * configure: Regenerated. - * cppdefault.h: Use native include paths if TARGET_SYSTEM_ROOT is - defined. - (struct default_include): Add add_sysroot field. - (cpp_SYSROOT): Declare. - * cppdefault.c (cpp_include_defaults): Fill in add_sysroot - field. - (cpp_SYSROOT): New variable. - * cppinit.c (cpp_create_reader): Initialize - CPP_OPTION (pfile, sysroot). - (init_standard_includes): Handle add_sysroot. Do not - add unrelocated copies of relocated directories. - (COMMAND_LINE_OPTIONS): Add -isysroot. - (cpp_handle_option): Handle -isysroot. - * cpplib.h (struct cpp_options): Add sysroot member. - * gcc.c (The Specs Language): Update description of %I. - (target_system_root_changed): New variable. - (process_command): Conditionalize make_relative_prefix call - on !VMS and TARGET_SYSTEM_ROOT_RELOCATABLE. Set - target_system_root_changed. - (do_spec_1): Add -isysroot to %I. - * doc/invoke.texi (Spec Files): Update description of %I. - * doc/install.texi (--with-sysroot): Update comment about - relocation. - -2003-02-13 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-02-13 Robert Lipe - Gerald Pfeifer - - * doc/install.texi (Specific): Update three SCO-related URLs. - -2003-02-13 Andreas Schwab - - * cgraph.c (SET_NPREDECESORS): Add intermediate cast to size_t. - Parenthesize properly. - (NPREDECESORS): Parenthesize properly. - -2003-02-13 Gabriel Dos Reis - - * timevar.h (POP_TIMEVAR_AND_RETURN): New macro. - -2003-02-12 Roger Sayle - - * config/i386/i386.md (UNSPEC_FPATAN): New UNSPEC constant. - (atan2sf3, atan2df3, atan2xf3, atan2tf3): New patterns. - - * reg-stack.c (subst_stack_regs_pat): Add support for binary - UNSPEC instructions (e.g. "fpatan"). - -2003-02-12 Mike Stump - - * varray.c (element_size): Remove. - (uses_ggc): Remove. - (element): Add. - (varray_init): Use new interface. - (varray_grow): Use new interface. - (varray_clear): Use new interface. - -2003-02-12 Aldy Hernandez - - * config/rs6000/spe.h: Add casts to the arguments of the following - macros: evfsabs, evfsnabs, evfsneg, evfsadd, evfssub, evfsmul, - evfsdiv, evfscfui, evfscfsi evfscfuf evfscfsf, evfsctui, evfsctsi, - evfsctuf, evfsctsf, evfsctuiz, evfsctsiz, __ev_get_upper*, - __ev_get_lower*, __ev_get_u32, __ev_get_s32, __ev_get_fs, - __ev_get_u16, __ev_get_s16. - -2003-02-12 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): New. - -2003-02-12 Jan Hubicka - - * Makefile.in (CRTSTUFF_CFLAGS): Add -fno-unit-at-a-time - (OBJS): Add cgraph.o - (cgraph.o): New. - * c-decl.c (expand_body_1): Break out from ... - (expand_body): This one; change calling convention - (finish_function): Move some of expand_body logic here. - (c_expand_deferred_function): Update call of expand_body - (c_expand_stmt): Use c_expand_body_1. - * c-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define. - * c-objc-commin.c (c_objc_common_finish_file): Use callgraph code. - * c-tree.h (c_expand_body): Declare. - * cgraph.c: New file. - * flags.h (flag_unit_at_a_time): Declare. - * langhooks.h (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION, - LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, - LANG_HOOKS_CALLGRAPH_INITIALIZER): New macros. - * langhooks.h (struct lang_hooks_for_callgraph): New. - (struct lang_hooks): Add callgraph field. - * toplev.c (flag_unit_at_a_time): New. - (lang_independent_options): Add flag_unit_at_a_time. - (process_options): Disable unit-at-a-time mode for frontends not - supporting callgraph. - * tree-inline.c (typedef struct inline_data): Add "decl" - (expand_call_inline): Update callgraph. - (optimize_inline_calls): Set id.decl. - * tree.h (cgraph_finalize_function, cgraph_finalize_compilation_unit, - cgraph_create_edges, dump_cgraph, cgraph_optimize, cgraph_remove_call - cgraph_calls_p): Declare. - * invoke.texi (-funit-at-a-time): Document. - -2003-02-12 Aldy Hernandez - - * config/rs6000/spe.h: Fix misc formatting. - (__ev_create_ufix32_fs): Cast ev argument. - (__ev_create_sfix32_fs): Same. - (__ev_get_sfix32_fs_internal): Cast arguments to builtins. - (__ev_get_ufix32_fs_internal): Same. - -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-12 Zack Weinberg - - * cpplib.c (do_include_common): Move warnings for - #include_next and #import out to callers. Use early-return - instead of nested ifs. Don't do check_eol here. - (parse_include): Do check_eol here with the rest of the - parsing stuff. - (do_include_next, do_import): Now handle warnings. - -2003-02-11 Gerald Pfeifer - - * doc/install.texi (Specific): Update AVR- and Darwin-related URLs. - -2003-02-12 Jan Hubicka - - * predict.c (estimate_probability): Fix roundoff error. - -2003-02-12 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Don't handle 65535. - (two peephole2): New. - -2003-02-12 Kazu Hirata - - * config/h8300/h8300.md (several peephole2): Replace - find_regno_note with peep2_reg_dead_p. - -2003-02-11 Richard Henderson - - * gcse.c (lookup_set): Remove unused argument PAT. Update - both callers. - -2003-02-11 Geoffrey Keating - - * diagnostic.c (real_abort): New. - (diagnostic_report_diagnostic): Call real_abort on error. - * diagnostic.h (diagnostic_abort_on_error): New. - (struct diagnostic_context): Add abort_on_error field. - * toplev.c (setup_core_dumping): New. - (decode_d_option): Handle 'H' case. - * doc/invoke.texi (Debugging Options): Document -dH. - -2003-02-11 Nathanael Nerode - - * Makefile.in: Remove pointless setting of CXXFLAGS for dejagnu - which refers to obsolete directories. - -2003-02-11 Richard Henderson - - * config/alpha/linux.h (TARGET_C99_FUNCTIONS): New. - -2002-10-21 Jan Hubicka - - * i386.c (contains_128bit_aligned_vector_p): New function. - (ix86_function_arg_boundary): Properly align vector modes. - -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 Roger Sayle - - * builtins.c: Fix failure caused by commiting wrong patch. - -2003-02-11 Dale Johannesen - * ra-build.c (compare_and_free_webs): Relax checking. - * config/rs6000/darwin.h (HOT_TEXT_SECTION_NAME): Define. - (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Define. - -2003-02-11 Falk Hueffner - - PR optimization/9651 - * rtlanal.c (may_trap_p): Handle FIX. - -2003-02-11 Dave Jones - - * config/i386/i386.c (override_options): Define c3-2 as a 686 with SSE. - * doc/invoke.texi: Extra alias. - -2003-02-11 Geoffrey Keating - - * config/rs6000/host-darwin.c: Fix comment. - -2003-02-11 David Edelsohn - - * config/rs6000/rs6000.md (divmodsi4): Use register_operand - predicate for mod result. - -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 Jan Hubicka - - * emit-rtl.c (emit_copy_of_insn_after): Copy insn recog cache too. - -2003-02-11 Richard Henderson - - * config/i386/i386.c (ix86_expand_movstr): Fail if esi or edi - appropriated as globals. - (ix86_expand_clrstr): Similarly. - * config/i386/i386.md (cmpstrsi): Similarly. - -2003-02-11 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Add a case of 255. - -2003-02-11 Roger Sayle - - * optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2. - (pow_optab, atan2_optab): Define corresponding macros. - * optabs.c (init_optabs): Initialize pow_optab and atan2_optab. - * genopinit.c (optabs): Implement pow_optab and atan2_optab - using pow?f3 and atan2?f3 patterns. - * builtins.c (expand_errno_check): New function to update errno - if necessary, split out from expand_builtin_mathfn. - (expand_builtin_mathfn): Use expand_errno_check. - (expand_builtin_mathfn_2): New function to handle expanding binary - math functions, reusing the code in expand_errno_check. - (expand_builtin): Handle the pow and atan2 math built-ins, - BUILT_IN_{POW,POWF,POWL,ATAN2,ATAN2F,ATAN2L} via the new function - expand_builtin_mathfn_2. - - * doc/md.texi: Document new pow?f3 and atan2?f3 patterns. - -2003-02-11 Jan Hubicka - - * combine.c (combine_simplify_rtx): Fix folding of - nested float_truncates. - -2003-02-11 Kazu Hirata - - * config/h8300/h8300.md (a peephole2): Fix a typo. - -2003-02-11 Richard Earnshaw - - * arm.mc (return_address_mask): Use CC_REGNUM for the condition code - register number. - -2003-02-11 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - gtuleu_operator. - * config/h8300/h8300.c (gtuleu_operator): New. - * config/h8300/h8300.h (PREDICATE_CODES): Add gtuleu_operator. - * config/h8300/h8300.md (a peephole2): New. - -2003-02-11 Jan Hubicka - - * sched-ebb.c (schedule_ebbs): Do not verify_flow_info. - -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 Roger Sayle - - * mips-tfile.c (init_file): Add missing initializers in the - "#ifdef __alpha" case. - (file_offset, max_file_offset): Declare as unsigned long. - (write_varray): Cast to "unsigned long" in comparisons against - either file_offset or max_file_offset. - (write_object): Likewise. - (read_seek): Likewise. - (copy_object): Likewise. Declare "ifd" as int to match its use - in add_ext_symbol, and avoid signed/unsigned conditional warning. - -2003-02-10 Nick Clifton - Aldy Hernandez - - * config/rs6000/eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Do not - override options which have been specified on the command line. - -2003-02-10 Kazu Hirata - - * config/h8300/h8300.md (abssf2): New. - (*abssf2_h8300): Likewise. - (*abssf2_h8300hs): Likewise. - -2003-02-10 Phil Edwards - - * tree.c (build_tree_list): Fix parameter names in comment. - -2003-02-10 Janis Johnson - - * config/rs6000/ppc64-fp.c: New file. - * config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Add ppc64-fp.c. - -2003-02-10 Josef Zlomek - - * Makefile.in (bb-reorder.o): Add dependency on $(FIBHEAP_H). - * bb-reorder.c (make_reorder_chain): Deleted. - (make_reorder_chain_1): Deleted. - (find_traces): New function. - (rotate_loop): New function. - (mark_bb_visited): New function. - (find_traces_1_round): New function. - (copy_bb): New function. - (bb_to_key): New function. - (better_edge_p): New function. - (connect_traces): New function. - (copy_bb_p): New function. - (get_uncond_jump_length): New function. - (reorder_basic_blocks): Use new functions (Software Trace Cache). - * cfgcleanup.c (outgoing_edges_match): Enable crossjumping across loop - boundaries. - -2003-02-10 Aldy Hernandez - - * config/rs6000/rs6000.c (bdesc_2arg): Change spe_evxor to xorv2si3. - -2003-02-09 Dan Nicolaescu - - * tree.h (struct tree_decl): Remove unused live_range_rtl field. - (DECL_LIVE_RANGE_RTL): Remove. - -2003-02-10 Nick Clifton - - * config/arm/aof.h, config/arm/aout.h, config/arm/arm-modes.def, - config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, - config/arm/arm.md, config/arm/cirrus.md, config/arm/coff.h, - config/arm/conix-elf.h, config/arm/ecos-elf.h, config/arm/elf.h, - config/arm/freebsd.h, config/arm/linux-elf.h, - config/arm/linux-gas.h, config/arm/netbsd-elf.h, - config/arm/netbsd.h, config/arm/pe.c, config/arm/pe.h, - config/arm/rtems-elf.h, config/arm/semi.h, config/arm/semiaof.h, - config/arm/strongarm-coff.h, config/arm/strongarm-elf.h, - config/arm/strongarm-pe.h, config/arm/uclinux-elf.h, - config/arm/unknown-elf-oabi.h, config/arm/unknown-elf.h, - config/arm/xscale-elf.h: Replace occurances of "GNU CC" with "GCC" - and reformat as appropriate. - -2003-02-10 Kazu Hirata - - * config/h8300/clzsi2.c: Remove. - * config/h8300/ctzsi2.c: Likewise. - * config/h8300/paritysi2.c: Likewise. - * config/h8300/popcountsi2.c: Likewise. - * config/h8300/t-h8300 (LIB2FUNCS_EXTRA): Remove clzsi2, - ctzsi2, paritysi2, and popcountsi2. - -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-10 Josef Zlomek - - * Makefile.in (sreal.o): Added. - (predict.o): Depends on sreal.h instead of real.h. - * sreal.c: New file. - * sreal.h: New file. - * predict.c: Use sreal.c instead of real.c. - -2003-02-10 Nick Clifton - - * Contributed support for the Cirrus EP9312 "Maverick" - floating point co-processor. Written by Aldy Hernandez - . - (config/arm/arm.c): Add Cirrus support. - (config/arm/arm.h): Likewise. - (config/arm/aout.h): Likewise. - (config/arm/arm.md): Likewise. - (config/arm/arm-protos.h): Likewise. - (config.gcc): Likewise. - (doc/invoke.texi): Describe new -mcpu value and new - -mcirrus-fix-invalid-insns switch, - (cirrus.md): New file. - -2003-02-10 Jan Hubicka - - * combine.c (combine_simplify_rtx): Simplify using - (float_truncate (float x)) is (float x) - (float_extend (float_extend x)) is (float_extend x). - -2003-02-10 Alan Modra - - * calls.c (try_to_integrate): Tidy stack_usage_map access. - (emit_library_call_value_1): Likewise. Formatting. - (store_one_arg): Likewise. - -2003-02-09 Nick Clifton - Aldy Hernandez - - * config/rs6000/spe.md: spe_evlhhesplat, spe_evlhhossplat, - spe_evlhhousplat, spe_evlwhsplat, spe_evlwwsplat, spe_evldd, - spe_evldh, spe_evldw, spe_evlwhe, spe_evlwhos, spe_evlwhou, - spe_evstdd, spe_evstdh, spe_evstdw, spe_evstdwx, spe_evstwhe, - spe_evstwho, spe_evstwwe, spe_evstwwo: Fix syntax to match newest - docs. Add range test for immediate value. - -2003-02-09 Aldy Hernandez - - Rename spe_evxor to xorv2si3. - (xorv4hi3): New. - (xorv1di3): New. - -2003-02-10 Glen Nakamura - - * doc/extend.texi (C++98 Thread-Local Edits): Add missing @item - tag. - -2003-02-10 Jan Hubicka - - * i386.c (vector_move_operand): New predicate. - (ix86_expand_vector_move): Be happy about 0. - * i386.h (PREDICATE_CODES): Add sse-move_operand. - * i386.md (mov*_internal): Add 'C' alternative. - -2003-02-09 Jan Hubicka - - * i386.md (floathi*): Deal with SSE. - -2003-02-09 Jan Hubicka - - * simplify-rtx.c (simplify_unary_operation, - simplify_binary_operation): Deal with vector modes - (simplify_ternary_operation): Deal with no-op VEC_MERGE. - -2003-02-09 Richard Sandiford - - * toplev.c (rest_of_compilation): Recompute register usage after - split_all_insns. - -2003-02-09 Richard Henderson - - * libgcc-std.ver (__clztf2): New. - (__ctztf2, __popcounttf2, __paritytf2): New. - * libgcc2.c (__clzSI2, __clzDI2, __ctzSI2, __ctzDI2, __popcountSI2, - __popcountDI2, __paritySI2, __parityDI2): Use UWmode and UDWmode; - adjust code to match the different type sizes. - * libgcc2.h (__clzSI2, __ctzSI2, __popcountSI2, __paritySI2, - __clzDI2, __ctzDI2, __popcountDI2, __parityDI2): New macros. - - * optabs.c (init_integral_libfuncs): Don't hard-code SImode and - TImode; select word_mode and twice that. - (init_floating_libfuncs): Don't hard-code SFmode and TFmode; - select the modes from float, double, and long double. - (init_optabs): Remove duplicate initializations. - -2003-02-09 Wolfgang Bangerth - - * doc/install.texi: Squeeze and streamline section on - testing and regression checking. - -2003-02-09 Jan Hubicka - - * i386.md (ahi?v*3): Set third operand type to TImode. - * i386.c (ix86_expand_binop_builtin): Extend operand when needed. - - * 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. - - * i386.md (vmaskcmp, pinsrw, movd patterns): Fix RTL representation. - -2003-02-08 Jan Hubicka - - * cfgrtl.c (verify_flow_info): Use control_flow_insn_p. - * reload1.c (fixup_abnormal_edges): Split basic blocks when EH edges - possibly got duplicated. - -2003-02-08 Richard Henderson - - * config/alpha/alpha.c (override_options): Turn off explicit - relocs until post-peep2 code duplication resolved. - -2003-02-08 Kazu Hirata - - * optabs.c (expand_unop): Widen clz properly when clz is done - via libcall. - -2003-02-08 Kazu Hirata - - * config/h8300/clzsi2.c: Replace "GNU CC" with "GCC". - * config/h8300/crti.asm: Likewise. - * config/h8300/crtn.asm: Likewise. - * config/h8300/ctzsi2.c: Likewise. - * config/h8300/fixunssfsi.c: Likewise. - * config/h8300/h8300-protos.h: Likewise. - * config/h8300/h8300.c: Likewise. - * config/h8300/h8300.h: Likewise. - * config/h8300/h8300.md: Likewise. - * config/h8300/paritysi2.c: Likewise. - * config/h8300/popcountsi2.c: Likewise. - * config/h8300/rtems.h: Likewise. - -2003-02-08 Zdenek Dvorak - - * doc/invoke.texi: Documentation for my previous commit. - * doc/passes.texi: Ditto. - -2003-02-08 Zdenek Dvorak - - * cfgloop.h (fix_loop_placement, can_duplicate_loop_p, - duplicate_loop_to_header_edge, loopify, remove_path, split_loop_bb): - Declare. - (DLTHE_FLAG_UPDATE_FREQ): New. - * cfgloopmanip.c (duplicate_loop, duplicate_subloops, copy_loops_to, - loop_redirect_edge, loop_delete_branch_edge, copy_bbs, remove_bbs, - rpe_enum_p, find_branch, alp_enum_p, add_loop, fix_loop_placements, - fix_bb_placement, fix_bb_placements, place_new_loop, - scale_loop_frequencies, scale_bbs_frequencies, record_exit_edges): - New static functions. - (fix_loop_placement, can_duplicate_loop_p, - duplicate_loop_to_header_edge, loopify, remove_path, split_loop_bb): - New functions. - - * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize, - unswitch_loops): Declare. - * loop-init.c: New file. - * loop-unswitch.c: New file. - * Makefile.in (loop-init.o, loop-unswitch.o): New. - * params.def (PARAM_MAX_UNSWITCH_INSNS, PARAM_MAX_UNSWITCH_LEVEL): New. - * toplev.c (DFI_loop2): New dump. - (flag_unswitch_loops): New. - (lang_independent_options): Add it. - (rest_of_compilation): Call new loop optimizer. - (parse_options_and_default_flags): Turn flag_unswitch_loops on with -O3. - -2003-02-08 Kazu Hirata - - * config/h8300/clzsi2.c: New. - * config/h8300/ctzsi2.c: Likewise. - * config/h8300/paritysi2.c: Likewise. - * config/h8300/popcountsi2.c: Likewise. - * config/h8300/t-h8300 (LIB2FUNCS_EXTRA): Add above files. - -2003-02-07 David Edelsohn - - * config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Define. - * config/rs6000/rs6000.md (clzsi2): Rename from cntlzw2. - (ctzsi2): New pattern. - (ffssi2): Use clz instead of unspec. - (clzdi2): Rename from cntlzd2. - (ctzdi2): New pattern. - (ffsdi2): Use clz instead of unspec. - -2003-02-07 Loren James Rittle - - * config/alpha/freebsd.h (LINK_SPEC): Weaken error to notice. - * config/ia64/freebsd.h (LINK_SPEC): Likewise. - * config/sparc/freebsd.h (LINK_SPEC): Likewise. - * config/i386/freebsd.h (LINK_SPEC): Add clause to mirror other arches. - -2003-02-07 Wolfgang Bangerth - - * doc/trouble.texi: Document pitfalls of two-stage name lookup. - -2003-02-07 Richard Henderson - - PR 9226 - * gcse.c (local_cprop_find_used_regs): New. - (local_cprop_pass): Use it. - -2003-02-07 Fred Fish - - * mips-tfile.c (parse_def): Parenthesize assignments to fix - precedence bugs. - -2003-02-07 Segher Boessenkool - - * genoutput.c (output_get_insn_name): Handle NOOP_MOVE_INSN_CODE. - -2003-02-07 Roger Sayle - - * builtin-types.def (BT_FN_FLOAT_FLOAT_FLOAT): New built-in type. - (BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE): Likewise. - (BT_FN_DOUBLE_DOUBLE_DOUBLE): Likewise. - * builtins.def: Define pow, powf, powl, atan2, atan2f and atan2l - builtin functions (and their __builtin_* variants). - * builtins.c (mathfn_built_in): Handle missing log{,f,l} cases. - (expand_builtin): Don't expand log{,f,l}, pow{,f,l} or atan2{,f,l} - when not optimizing. - - * doc/extend.texi: Document new pow and atan2 builtins, and - their float and long double variants. Realphabetize builtins. - -2003-02-07 Jan Hubicka - - * i386.md (sse2_nandv2di3): Fix. - -2003-03-07 Danny Smith - - * config/i386/i386.h (MS_AGGREGATE_RETURN): New define. - * config/i386/cygwin.h (MS_AGGREGATE_RETURN): Override default - definition. - * config/i386/i386.h (ix86_return_in_memory): Return aggregate - types of up to 8 bytes via registers if MS_AGGREGATE_RETURN. - -2003-02-07 Jan Hubicka - - * i386.md (movdi_rex64_1): Fix mmx<->int move opcode. - -2003-02-07 Daniel Berlin - - * cfg.c (dump_flow_info): Add back accidently deleted line. - -2003-02-07 Andrey Petrov - - * optabs.c (expand_float): Search wider integer modes first. - -2003-02-07 Bob Wilson - - * config/xtensa/xtensa.h (LIBGCC2_WORDS_BIG_ENDIAN): Set this - based on preprocessor flag. - -2003-02-07 Roger Sayle - Richard Henderson - - * gcse.c (implicit_sets): New. - (compute_hash_table_work): Include them in hash table. - (find_implicit_sets, fis_get_condition): New. - (one_cprop_pass): Allocate and free implicit_sets; call - find_implicit_sets before building hash table. - -2003-02-07 Jason Thorpe - - * config/t-netbsd (USER_H): Revert previous change. - -2003-02-07 Gabor Greif - - * doc/c-tree.texi (Namespaces): Fix typo. - -2003-02-07 Jan Hubicka - - * regrename.c (do_replace, find_oldest_value_reg, - copyprop_hardreg_forward_1): Update register attributes. - -2003-02-06 Vladimir Makarov - - * genautomata.c (VLA_PTR_CREATE, VLA_PTR_EXPAND, VLA_PTR_ADD, - VLA_HWINT_CREATE, VLA_HWINT_EXPAND, VLA_HWINT_ADD): Use temporay - variables starting with underscore. - (struct unit_usage): New structure. - (unit_usages, cycle_alt_unit_usages): New global variables. - (check_unit_distribution_in_reserv): Remove it. - (store_alt_unit_usage): New function. - (check_regexp_units_distribution): Rewrite it. - -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 Richard Henderson - - * combine.c (nonzero_bits): Fix double break. - -2003-02-06 Eric Botcazou - Richard Henderson - - PR c/9530 - * config/i386/i386.c (ix86_function_ok_for_sibcall): Forbid sibcalls - from functions that return a float to functions that don't. - -2003-02-06 Jan Hubicka - - * i386.c (x86_inter_unit_moves): New variable. - (ix86_secondary_memory_needed): Fix 64bit case, honor - TARGET_INTER_UNIT_MOVES - * i386.h (x86_inter_unit_moves): Declare. - (TARGET_INTER_UNIT_MOVES): New macro. - * i386.md (movsi_1): Cleanup constraints; disable - when not doing inter-unit moves. - (movsi_1_nointernunit): New. - (movdi_1_rex64): Fix constraints; deal with SSE->GPR moves. - (movdi_1_rex64_nointerunit): New. - (mivsf_1): disable when not doing inter-unit moves. - (movsf_1_nointerunit): New. - - * basic-block.h (inside_basic_block_p): Declare. - * cfgbuild.c (inside_basic_block_p): Make global. - * haifa-sched.c (unlink_other_notes): Deal with NOT_INSN_BASIC_BLOCK. - * scheudle-ebb.c (schedule_ebb): Return last basic block of trace; - update CFG. - (fix_basic_block_boundaries, add_missing_bbs): New. - (rank): Use profile. - (scheudle_ebbs): Rely on CFG; update coments. - -2003-02-05 Geoffrey Keating - - * Makefile.in (host_hook_obj): New. - (OBJS): Add $(host_hook_obj). - (host_default.o): New rule. - * config.gcc (host_hook_obj): New, default to host-default.o. - (powerpc-*-darwin*): Use host-darwin.o. - (out_host_hook_obj): New. - * configure: Regenerate. - * configure.in: Print information about out_host_hook_obj, substitute - into output files. - * host-default.c: New file. - * hosthooks.h: New file. - * toplev.c (general_init): Call host_hooks.extra_signals. - * config/rs6000/host-darwin.c: New file. - * config/rs6000/x-darwin: New file. - * doc/hostconfig.texi: Add documentation for new host hook. - Rearrange existing documentation. - -2003-02-05 Roger Sayle - - * dwarf2out.c (mem_loc_descriptor): Replace ASM_SIMPLIFY_DWARF_ADDR - with *targetm.delegitimize_address. - (rtl_for_decl_location): Likewise. - * dwarfout.c (output_mem_loc_descriptor): Likewise. Include target.h. - * Makefile.in (dwarf2out.c, dwarfout.c): Depend upon $(TARGET_H) - - * config/i386/i386.h (ASM_SIMPLIFY_DWARF_ADDR): Remove definition. - * config/i386/i386-protos.h (i386_simplify_dwarf_addr): Remove - prototype. - * config/i386/i386.c (ix86_delegitimize_address): Renamed from - i386_simplify_dwarf_addr. Made static. Prototyped. - (TARGET_DELEGITIMIZE_ADDRESS): Update definition from - i386_simplify_dwarf_addr to ix86_delegitimize_address. - (ix86_find_base_term): Likewise. - (maybe_get_pool_constant): Likewise. - - * config/s390/s390.h (ASM_SIMPLIFY_DWARF_ADDR): Remove definition. - * config/s390/s390-protos.h (s390_simplify_dwarf_addr): Remove - prototype. - * config/s390/s390.c (s390_delegitimize_address): Renamed from - s390_simplify_dwarf_addr. Made static. Prototyped. - (TARGET_DELEGITIMIZE_ADDRESS): Define as s390_delegitimize_address. - -2003-02-05 Richard Henderson - - PR c/8602 - * integrate.c (output_inline_function): Reset input_filename - and lineno from the decl before rest_of_compilation. - -2003-02-05 Richard Henderson - - * defaults.h (CLZ_DEFINED_VALUE_AT_ZERO): New. - (CTZ_DEFINED_VALUE_AT_ZERO): New. - * doc/rtl.texi, doc/tm.texi: Document them. - - * combine.c (nonzero_bits) [CLZ, CTZ]: Handle the definedness - of the value at zero properly. - * fold-const.c (tree_expr_nonnegative_p): Likewise. - * simplify-rtx.c (simplify_unary_operation): Likewise. - - * config/alpha/alpha.h (CLZ_DEFINED_VALUE_AT_ZERO): New. - (CTZ_DEFINED_VALUE_AT_ZERO): New. - - * config/arm/arm.c (TARGET_INIT_BUILTINS): Remove. - (TARGET_EXPAND_BUILTIN): Remove. - (def_builtin, arm_init_builtins, arm_expand_builtin): Remove. - * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO): New. - (enum arm_builtins): Remove. - * config/arm/arm.md (UNSPEC_CLZ): Remove. - (clzsi2): Rename from clz; use clz instead of unspec. - (ctzsi2): New. - * config/arm/arm-protos.h: Update. - -2003-02-05 Jan Hubicka - - * i386-protos.h (x86_emit_floatuns): Declare. - * i386.c (x86_emit_floatuns): New global function. - * i386.md (floatunssisf2, floatunsdisf2, - floatunsdidf2): New patterns. - -2003-01-25 Zdenek Dvorak - - * cfgloopmanip.c (force_single_succ_latches): Fix missindentation. - -2003-02-05 Hans Boehm - - * config/ia64/unwind-ia64.c: include coretypes.h, tm.h to get - config/ia64/linux.h - -2003-02-05 Roger Sayle - - * cfgloop.h (flow_bb_inside_loop_p): Correct prototype again. - -2003-02-05 Jakub Jelinek - - PR optimization/8555 - * config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case - instead of aborting. - -2003-02-04 Richard Henderson - - * config/i386/i386.md (UNSPEC_BSF): Remove. - (ffssi2): Split into cmove and no_cmove insns and splitters; - lose pentium float trick for now. - (ffssi_1): Add * to name; use CTZ instead of UNSPEC. - (ctzsi2, clzsi2, bsr): New. - -2003-02-04 Richard Henderson - - * config/ia64/ia64.c (rtx_needs_barrier): Handle POPCOUNT, - UNSPEC_GETF_EXP; remove UNSPEC_POPCNT. - * config/ia64/ia64.md (UNSPEC_POPCNT): Remove. - (ffsdi2): Use popcount instead of unspec. - (popcountdi2): Rename from *popcnt. - (ctzdi2, clzdi2, getf_exp_tf): New. - -2003-02-04 Kazu Hirata - - * genconfig.c (main): Generate CC0_P. - * rtl.h (CC0_P): Remove. - -2003-02-04 Richard Henderson - - * libgcc2.h, libgcc2.c (__ffsSI2): New. - (__ffsDI2): Rename from __ffsdi2. - * mklibgcc.in (lib2funcs): Add _ffssi2. - -2003-02-04 Richard Henderson - - * libgcc2.c (__paritysi2, __paritydi2): Replace last two reduction - rounds with a "bit table" lookup. - -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 Richard Henderson - - * longlong.h [alpha] (count_leading_zeros, count_trailing_zeros): Use - builtins instead of inline assembly. - -2003-02-04 Falk Hueffner - - PR c/9376 - * libgcc2.c (__subvdi3): Fix typo. - -2003-02-04 Jan Hubicka - - * i386.md (movti_rex64): Fix constraint. - -2003-02-04 Jan Hubicka - - * i386.md (vector push splitters): Fix typo in resolving conflict. - -2003-02-04 Rodney Brown - - * config/i386/i386.c (x86_function_profiler): Fix typo in format. - -2003-02-04 Phil Edwards - - * doc/install.texi (*-*-linux-gnu): Mention glibc requirements - for recent libstdc++. Remove formatting cruft. - -2003-02-04 Jakub Jelinek - - * dwarf2out.c (dwarf2out_finish): Add AT_comp_dir - attribute even if input file name is absolute, but one of the - includes is relative. - -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 Richard Henderson - - * libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2, - __popcountsi2, __popcountdi2, __paritysi2, __paritydi2): Change - return type to "int". Shuffle declarations and undef int trap. - * libgcc2.h: Remove their declarations. - * optabs.c (expand_unop): Force outmode to int for bitops. - -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 Roger Sayle - - * hooks.c (hook_rtx_rtx_identity): Generic hook function that - takes a single rtx and returns it unmodified. - * hooks.h (hook_rtx_rtx_identity): Prototype here. - * target.h (struct gcc_target): Add "delegitimize_address" - field to target structure. - * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Provide default - for delegitimize_address target using hook_rtx_rtx_identity. - (TARGET_INITIALIZER): Initialize delegitimize_address field - using TARGET_DELEGITIMIZE_ADDRESS macro. - * simplify-rtx.c (avoid_constant_pool_reference): Handle float - extensions of constant pool references. Use delegitimize_address - to undo the obfuscation of "-fpic". - * Makefile.in (simplify-rtx.o): Add dependency on target.h. - - * config/i386/i386.c (TARGET_DELEGITIMIZE_ADDRESS): Define as - i386_simplify_dwarf_addr. - (ix86_find_base_term): Simplify using i386_simplify_dwarf_addr. - (maybe_get_pool_constant): Likewise. - -2003-02-03 Jan Hubicka - - * i386.c (ix86_expand_int_movcc): Fix setcc sign bit case. - -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 or defaults.h. Don't - define LIBGCC2_WORDS_BIG_ENDIAN. Include coretypes.h and tm.h. - -2003-02-02 Andreas Schwab - - * varasm.c (asm_output_aligned_bss): Declare as possibly unused. - -2003-02-02 Richard Earnshaw - - * arm.md (sibcall_epilogue): Set the "conds" to "clob". - (epilogue_insns): Likewise. - -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 John David Anglin - - * collect2.c (pexecute_pid): Rename to pid. - (collect_wait, collect_execute, scan_prog_file, scan_libraries): Use - pid. - -2003-02-01 Geoffrey Keating - - * doc/extend.texi (Function Attributes): Remove documentation - for PowerPC Windows NT function attributes.. - -2003-02-01 Daniel Jacobowitz - - * dwarf2out.c (gen_type_die): Check for typedefs before calling - for TYPE_MAIN_VARIANT. - -2003-02-01 Richard Henderson - - * libgcc2.c: Include auto-host.h. - (ATTRIBUTE_HIDDEN): New. - (__clz_tab): Don't declare here for clz and ctz. - (__clzsi2, __clzdi2): Use count_leading_zeros. - (__ctzsi2, __ctzdi2): Use count_trailing_zeros. - (__popcount_tab): Mark ATTRIBUTE_HIDDEN. - (__paritysi2, __paritydi2): Use shifts instead of __popcount_tab. - * longlong.h (__clz_tab): Mark ATTRIBUTE_HIDDEN. - -2003-02-01 Richard Henderson - - * config/i386/i386.md (addsi_1_zext splitter): Add TARGET_64BIT - to the conditional. - (ashlsi3_1_zext splitter): Likewise. - -2003-02-01 Richard Henderson - - * optabs.c (expand_unop): Use word_mode for outmode of bit scaners. - * libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2, - __popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change - return type to Wtype. - - * libgcc-std.ver (GCC_3.4): Fix inheritance. - - * config/i386/i386.md (ffssi2): Use nonimmediate_operand for - expander input constraint. - -2003-02-01 Falk Hueffner - - * optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and - OTI_parity. - (clz_optab, ctz_optab, popcount_optab, parity_optab): New. - * optabs.c (widen_clz, expand_parity): New. - (expand_unop): Handle clz and parity. Hardcode SImode as outmode - for libcalls to clz, ctz, popcount, and parity. - (init_optabs): Init clz_optab, ctz_optab, popcount_optab and - parity_optab, and set up libfunc handlers. - * libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2, - __popcountsi2, __popcountdi2, __paritysi2 __paritydi2, - __popcount_tab): New. - * libgcc2.h: Declare them. - * libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c. - * genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab - and parity_optab. - * builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New. - * builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT, - BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL, - BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL, - BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL, - BUILT_IN_PARITYLL): New. - * builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs - and add optab argument. - (expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*. - * tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New. - * expr.c (expand_expr): Handle them. - * fold-const.c (tree_expr_nonnegative_p): Likewise. - * rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New. - * reload1.c (eliminate_regs): Handle them. - (elimination_effects): Likewise. - * function.c (instantiate_virtual_regs_1): Likewise - * genattrtab.c (check_attr_value): Likewise. - * simplify-rtx.c (simplify_unary_operation): Likewise. - * c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR. - * combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY. - (nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY. - * config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New. - * config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to - __builtin_arm_clz. - * Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move... - * mklibgcc.in (lib2funcs): ...here and merge. Add new members. - * doc/extend.texi (Other Builtins): Add new builtins. - * doc/md.texi (Standard Names): Add new patterns. - -2003-02-01 Ulrich Weigand - - * reload.c: Revert 2003-01-31 change. - -2003-02-01 Jan Hubicka - - * combine.c (combine_simplify_rtx): Use reversed_comparison_code_parts. - -2003-02-01 Richard Sandiford - - * flags.h (flag_volatile): Remove declaration. - (flag_volatile_global, flag_volatile_static): Likewise. - * c-typeck.c (build_indirect_ref): Don't check flag_volatile. - * toplev.c (flag_volatile): Remove definition. - (flag_volatile_global, flag_volatile_static): Likewise. - (f_options): Remove corresponding entries here. - * varasm.c (make_decl_rtl): Don't check flag_volatile_global - or flag_volatile_static. - * doc/invoke.texi: Remove documentation of -fvolatile, - -fvolatile-global and -fvolatile-static. - -2003-01-31 John David Anglin - - * pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move - updating of total_code_bytes from prologue to epilogue. - -2003-01-31 Ulrich Weigand - - * 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 Geoffrey Keating - - * config/darwin.h (LINK_COMMAND_SPEC): Update for Nathan's recent - change to LINK_COMMAND_SPEC in gcc.c. - -2003-01-31 Jan Hubicka - - PR c/9506 - * i386.c (override_options): Use DEFAULT_PCC_STRUCT_RETURN. - -2003-01-31 John David Anglin - - * pa32-regs.h (REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Delete - duplicated code. - -2003-01-31 Nathan Sidwell - - * tree.h (TYPE_BINFO_SIZE, TYPE_BINFO_SIZE_UNIT): Remove. - (BINFO_ELTS): New #define. - * stor-layout.c (finalize_record_size): Don't set them. - * cp/cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, - BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS. - (BINFO_LANG_ELTS): New #define. - * cp/tree.c (make_binfo): Use BINFO_LANG_ELTS. - * java/class.c (make_class): Use BINFO_ELTS. - (set_super_info): Likewse. - (add_interface_do): Likewise. - * objc/objc-act.c (start_class): Use BINFO_ELTS. - -2003-01-31 Danny Smith - - * timevar.c (getrusage): Don't ever declare if not HAVE_GETRUSAGE. - (times): Don't ever declare if not HAVE_TIMES. - (clock): Don't ever declare if not HAVE_CLOCK. - -2003-01-30 Richard Henderson - - * flow.c (update_life_info): Zap life info after cleanup_cfg. - (regno_uninitialized): Use correct live at function entry set. - (regno_clobbered_at_setjmp): Likewise. - - * expr.c (store_expr): Promote all MEM intermediates to regs. - -2003-01-30 Kazu Hirata - - * config/arm/arm.c: Fix comment typos. - * config/arm/arm.h: Likewise. - * config/arm/netbsd-elf.h: Likewise. - * config/arm/netbsd.h: Likewise. - -2003-01-30 Geoffrey Keating - - * gengtype.c (struct walk_type_data): Add needs_cast_p. - (walk_type): Set needs_cast_p in walk_type_data. - (write_types_process_field): Supply casts when required to suppress - warnings. - (write_root): Cast gt_pch_n_S to suppress warning. - * Makefile.in: Remove -Wno-error from gtype-desc.o and c-decl.o. - * config/rs6000/rs6000.c (print_operand): Mask off high bits only - when they might exist. - * config/rs6000/t-rs6000: Remove -Wno-error from varasm.o, - insn-conditions.o, and rs6000.o. - -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-30 Richard Henderson - - * tree-inline.c (walk_tree): Streamline duplicate hash table lookup. - -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 Kazu Hirata - - * config/h8300/h8300-protos.h: Update the prototype for - compute_plussi_cc. - (cpp_reader): Declare before it is used. - * config/h8300/h8300.c (compute_plussi_cc): Change the return - type to int. - * config/h8300/h8300.md (monitor_prologue): Call abort() if we - see an unknown H8 variant. - -2003-01-30 Ralf Corsepius - - PR target/9316 - * config/rs6000/rtems.h: Add CPP_OS_DEFAULT_SPEC. - * config/rs6000/sysv4.h: Add CPP_OS_RTEMS_SPEC. - * config/rs6000/t-rtems: New file. multilib variants to match OS. - * config.gcc (powerpc-*-rtems*): Use rs6000/t-rtems instead of - rs6000/t-ppcgas so we get the desired multilibs. - -2003-01-30 Nick Clifton - - * config/arm/arm.c (arm_output_epilogue): Update stack pointer - when popping saved IP register off the stack. - -2003-01-30 Kazu Hirata - - * config/rs6000/aix43.h: Fix comment typos. - * config/rs6000/aix51.h: Likewise. - * config/rs6000/aix52.h: Likewise. - * config/rs6000/altivec.h: Likewise. - * config/rs6000/rs6000.c: Likewise. - * config/rs6000/rs6000.h: Likewise. - * config/rs6000/rs6000.md: Likewise. - * config/rs6000/spe.md: Likewise. - -2003-01-29 Mark Mitchell - - * c-common.c (builtin_define_float_constants): Define - ___HAS_INFINITY__ and ___HAS_QUIET_NAN__. - -2003-01-30 Kazu Hirata - - * config/sh/lib1funcs.asm: Fix comment typos. - * config/sh/linux.h: Likewise. - * config/sh/sh.c: Likewise. - * config/sh/sh.md: Likewise. - -2003-01-30 Loren James Rittle - - * objc/Make-lang.in (objc-parse.y): Find c-parse.in in $(srcdir). - -2003-01-30 Alexandre Oliva - - * config/fp-bit.h (__make_dp): Declare if TMODES. - -2003-01-29 Kazu Hirata - - * config/h8300/h8300.h (PREDICATE_CODES): Add entries for - general_operand_src and general_operand_dst. - -2003-01-29 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-01-29 Richard Earnshaw - - * arm.c (arm_legtimize_address): New function. - * arm-protos.h (arm_legtimize_address): Add prototype. - * arm.h (ARM_LEGITIMIZE_ADDRESS): Use arm_legitimize_address. - (LEGITIMIZE_ADDRESS, THUMB_LEGITIMIZE_ADDRESS): Wrap with - do ... while (0) - -2003-01-29 Joel Sherrill - - PR bootstrap/9296 - * gthr-rtems.h: Define __GTHREAD_MUTEX_INIT. Apparently no code - depended on it being defined until now. - -2003-01-29 Joel Sherrill - - PR target/9295 - * config/mips/rtems.h: Predefine __USE_INIT_FINI__ so generic - RTEMS code knows which C++ initialization style the toolset - configuration is using. - -2003-01-29 Joel Sherrill - - PR bootstrap/9293 - * config/m68k/t-crtstuff: Replace spaces with tabs, add - $(MULTILIB_CFLAGS) as compiler option and multilib crtbegin/end.o. - -2003-01-29 Joel Sherrill - - PR bootstrap/9292 - * config.gcc (hppa1.1-rtems): Did not include t-rtems nor enable - RTEMS threads. - * config/pa/rtems.h (LIB_SPEC): Use -N when linking. - -2003-01-29 Nick Clifton - - * Makefile.in (c-parse.o): Locate source file in $(parsedir) - not $(srcdir). - -2003-01-29 Andrew Haley - - * tree-inline.c (walk_tree): Add CHAR_TYPE. - -2003-01-29 Jan Hubicka - - * i386.md (subdi3_carry_rex64): Fix typo. - -2003-01-28 Stan Shebs - - * coretypes.h (cpp_reader): Forward declare struct. - * c-pragma.h (cpp_reader): Remove forward declaration. - * hashtable.h (cpp_reader): Likewise. - * scan.h (cpp_reader): Likewise. - * tree.h (cpp_reader): Likewise. - * config/darwin-protos.h (cpp_reader): Likewise. - * config/arm/arm-protos.h (cpp_reader): Likewise. - * config/rs6000/rs6000-protos.h: Remove GCC_CPPLIB_H ifdef, use - struct cpp_reader in prototypes. - -2003-01-28 Christian Cornelssen - - * doc/install.texi: Add documentation for installation into - tooldirs and with DESTDIR. - -2003-01-28 Richard Henderson - - * config.gcc (ia64*-*-aix*): Remove. - * config/ia64/aix.h, config/ia64/t-aix: Remove file. - * config/ia64/unwind-aix.c: Remove file. - -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 Richard Sandiford - - * combine.c (nonzero_bits): Fix check for negative divide operands. - -2003-01-28 Richard Henderson - - * config/ia64/ia64.c (ia64_rwreloc_section_type_flags): New. - * config/ia64/hpux.h (TARGET_SECTION_TYPE_FLAGS): New. - -2003-01-28 Richard Henderson - - * cse.c (find_best_addr): Kill !ADDRESS_COST code. - - * config/cris/cris.c (cris_address_cost): Make static. - (TARGET_RTX_COSTS, TARGET_ADDRESS_COST): New. - * config/cris/cris.h (ADDRESS_COST): Remove. - * config/cris/cris-protos.h: Update. - -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-01-28 Jason Merrill - - * cpplib.h (struct cpp_options): Add warn_deprecated field. - * cppinit.c (cpp_create_reader): Turn it on by default. - * c-opts.c (c_common_decode_option): Set it. - * cpplib.c (do_pragma_once): Only complain about #pragma once - if warn_deprecated is set. - -2003-01-28 Dale Johannesen - - * emit-rtl.c (const_double_htab_hash): Use mode in the hash. - * loop.c (scan_loop): Move movables on -Os rich-register targets. - * config/rs6000/rs6000.md (sibcall*): Use match_operand for LR. - -2003-01-28 Richard Henderson - - * target.h (targetm.address_cost): New. - * target-def.h (TARGET_ADDRESS_COST): New. - (TARGET_RTX_COSTS): Uncomment. Oops. - * cse.c (address_cost): Use new target hook. - (default_address_cost): New. - * output.h (default_address_cost): Declare. - * hooks.c (hook_int_rtx_0): New. - * hooks.h (hook_int_rtx_0): Declare. - * loop.c (combine_givs_p): Remove if 0 code. - * system.h (ADDRESS_COST): Poison. - - * config/alpha/alpha.c, config/alpha/alpha.h, config/d30v/d30v.c, - config/d30v/d30v.h, 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/mmix/mmix.c, config/mmix/mmix.h, - config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/sparc/sparc.c, - config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h, - config/xtensa/xtensa.c, config/xtensa/xtensa.h - (TARGET_ADDRESS_COST): Define as hook_int_rtx_0. - (ADDRESS_COST): Remove. - - * config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.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/dsp16xx/dsp16xx-protos.h, config/dsp16xx/dsp16xx.c, - config/dsp16xx/dsp16xx.h, config/i386/i386-protos.h, - config/i386/i386.c, config/i386/i386.h, config/i960/i960-protos.h, - config/i960/i960.c, config/i960/i960.h, config/ip2k/ip2k-protos.h, - config/ip2k/ip2k.c, config/ip2k/ip2k.h, config/mips/mips-protos.h, - config/mips/mips.c, config/mips/mips.h, - config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, - config/m68hc11/m68hc11.h, config/ns32k/ns32k-protos.h, - config/ns32k/ns32k.c, config/ns32k/ns32k.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/vax/vax-protos.h, - config/vax/vax.c, config/vax/vax.h - (foo_address_cost): Make static. - (TARGET_ADDRESS_COST): New. - (ADDRESS_COST): Remove. - - * config/arm/arm.h, config/arm/arm.c, config/m88k/m88k.h, - config/m88k/m88k.c, config/romp/romp.h, config/romp/romp.c, - config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, - config/stormy16/stormy16.h - (ADDRESS_COST): Move code ... - (foo_address_cost): ... here. - (TARGET_ADDRESS_COST): New. - - * config/m32r/m32r.c (m32r_address_cost): Remove. - * config/m32r/m32r-protos.h: Update. - - * config/mmix/mmix.c (mmix_address_cost): Remove. - * config/mmix/mmix-protos.h: Update. - - * config/mn10300/mn10300.c (mn10300_address_cost_1): Rename from - mn10300_address_cost; move unsig allocation ... - (mn10300_address_cost): ... here. - (TARGET_ADDRESS_COST): New. - * config/mn10300/mn10300-protos.h: Update. - * config/mn10300/mn10300.h (ADDRESS_COST): Remove. - - * doc/tm.texi: Update. - -2003-01-28 Vladimir Makarov - - * haifa-sched.c (schedule_insn): Return necessary cycle advance - after issuing the insn. - (rank_for_schedule): Make a insn with /S the highest priority - insn. - (move_insn): Ignore schedule groups. Clear SCHED_GROUP_P. - (choose_ready): Check SCHED_GROUP_P. - (schedule_block): Advance cycle after issuing insn if it is - necessary. Don't reorder insns if there is an insn with /S. - (set_priorities): Ignore schedule groups. - - * sched-deps.c (remove_dependence, group_leader): Remove the - functions. - (add_dependence): Ignore schedule groups. - (set_sched_group_p): Don't make copy of dependencies from previous - insn of the schedule group. Add anti-dependency to the previous - insn of the schedule group. - (compute_forward_dependences): Ignore schedule groups. - - * sched-ebb.c (init_ready_list): Ignore schedule groups. - - * sched-rgn.c (init_ready_list): Ditto. - (can_schedule_ready_p): Ditto. - -2003-01-28 Vladimir Makarov - - * config/i386/i386.md (*movsi_1): Use movdqa to move one xmm - register to another one. - -2003-01-28 Richard Henderson - - * calls.c (default_must_pass_in_stack): Fix typo in !type case. - -2003-01-28 Roger Sayle - - * cse.c (cse_insn): Avoid redundant REG_EQUAL notes. - -2003-01-28 Richard Sandiford - - * config/sh/sh.h (CLASS_MAX_NREGS): If TARGET_SHMEDIA, and the given - class contains a floating-point register, return the size of the - mode in half words. - -2003-01-28 Jan Hubicka - - * i386.c (ix86_carry_flag_operator): New predicate. - (fcmov_operator): Fix whitespace. - (ix86_expand_carry_flag_compare): Deal with floating point. - (ix86_expand_int_movcc): Deal with fp; update insn expansion - (ix86_expand_int_addcc): Likewise. - (ix86_expand_strlensi_unroll_1): likewsie. - * i386.h (PREDICATE_CODES): Add ix86_carry_flag_operator. - * i386.md (add?i_carry_rex64): Use new predicate. - (sub?i3_carry_rex64): Likewise. - (x86_mov?icc_0_m1*): Likewise. - -2003-01-28 Andreas Schwab - - * cfgloopmanip.c (create_preheader): Initialize src to avoid - warning. - - * expmed.c (emit_store_flag): Fix cast to avoid sign - comparison warning. - - * combine.c (force_to_mode): Add cast to fix warning when - STORE_FLAG_VALUE is negative. - -2003-01-27 Richard Henderson - - * Makefile.in (cse.o): Depend on TARGET_H. - * cse.c (rtx_cost): Use targetm.rtx_costs. - * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. - * doc/tm.texi: Update. - - * target.h (targetm.rtx_costs): New. - * target-def.h (TARGET_RTX_COSTS): New. - * hooks.c (hook_bool_rtx_int_int_intp_false): New. - * hooks.h: Update. - - * config/alpha/alpha.c (alpha_rtx_cost_data): New. - (alpha_rtx_costs, TARGET_RTX_COSTS): New. - * config/alpha/alpha.h (PROCESSOR_MAX): New. - (CONST_COSTS, RTX_COSTS): Remove. - - * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, - config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, - config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, - config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, - config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, - config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, - config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, - config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, - config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, - config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, - config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, - config/mn10200/mn10200.h, config/mn10300/mn10300.c, - config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, - config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, - config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, - config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, - config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, - config/stormy16/stormy16.c, config/stormy16/stormy16.h, - config/v850/v850.c, config/v850/v850.h, - config/xtensa/xtensa.c, config/xtensa/xtensa.h - (CONST_COSTS, RTX_COSTS): Move code ... - (foo_rtx_costs, TARGET_RTX_COSTS): ... here. - - * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. - (arm_rtx_costs, TARGET_RTX_COSTS): New. - * config/arm/arm-protos.h: Update. - * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. - - * config/avr/avr.h (CONST_COSTS): Move code ... - * config/avr/avr.c (avr_rtx_costs): ... here. - (default_rtx_costs): Make static. - * config/avr/avr-protos.h: Update. - - * config/h8300/h8300.c (const_costs): Make static. - (h8300_and_costs, h8300_shift_costs): Likewise. - * config/h8300/h8300-protos.h: Update. - - * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. - (CONST_COSTS): Move code ... - * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from - default_rtx_costs; update for signature change. - * config/ip2k/ip2k-protos.h: Update. - - * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. - (CONST_COSTS): Move code ... - * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. - (TARGET_RTX_COSTS): New. - (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. - * config/m68hc11/m68hc11-protos.h: Update. - - * config/m68k/m68k.c (const_int_cost): Make static. - * config/m68k/m68k-protos.h: Update. - - * config/mcore/mcore.c (mcore_const_costs): Make static. - (mcore_and_cost, mcore_ior_cost): Likewise. - * config/mcore/mcore-protos.h: Update. - - * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. - (mmix_rtx_cost_recalculated): Remove. - * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. - * config/mmix/mmix-protos.h: Update. - - * config/sh/sh.c (shiftcosts): Make static. - (addsubcosts, andcosts, multcosts): Likewise. - * config/sh/sh-protos.h: Update. - - * config/sparc/sparc.c (TARGET_RTX_COSTS): New. - (sparc_rtx_costs): Make static; update for change in signature. - * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. - * config/sparc/sparc-protos.h: Update. - - * config/v850/v850.c (const_costs): Make static. - * config/v850/v850-protos.h: Update. - - * config/vax/vax.h (RTX_COSTS): Remove. - (CONST_COSTS): Move code ... - * config/vax/vax.c (vax_rtx_costs_1): ... here; rename - from vax_rtx_cost. - (vax_rtx_costs, TARGET_RTX_COSTS): New. - -2003-01-27 Richard Henderson - - * config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove. Really. - * config/vax/vax-protos.h: Update. Really. - -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/mips.c (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-28 Gabriel Dos Reis - - * c-parse.in: Remove '%expect 32' directive in objc mode. - -2003-01-27 Nathan Sidwell - - * Makefile.in (LIB2FUNCS_ST): Remove _gcov. - (LIBGCOV): New variable. - (libgcc.mk): Add LIBGCOV. - (LIBGCC_DEPS): Add libgcov.c. - (libgcov.a): New target. - (clean): Remove libgcov.a. - (install-libgcc): Do libgcov too. - (stage1-start, stage2-start, stage3-start, stage4-start): Deal - with libgcov.a. - * libgcc2.c (L_gcov): Move into ... - * libgcov.c: ... here. New file. - * mklibgcc.in: Add libgcov rules. - * gcc.c (LINK_COMMAND_SPEC): Add -lgcov when profiling. - - * doc/invoke.texi (profile-arcs, test-coverage): Update and - clarify. - - * profile.c (index_counts_file): Remove duplicate check for open file. - -2003-01-27 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-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 Gabriel Dos Reis - - * timevar.def (TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION): New - timevar_id enumerations. - -2003-01-26 Kazu Hirata - - * combine.c: Fix formatting. - -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. - * doc/tm.texi: Likewise. - -2003-01-26 Kazu Hirata - - * config/ia64/fde-glibc.c: Fix comment typos. - * config/ia64/hpux.h: Likewise. - * config/ia64/ia64.c: Likewise. - * config/ia64/ia64.h: Likewise. - * config/ia64/unwind-ia64.c: Likewise. - -2003-01-26 Kazu Hirata - - * config/i386/i386-modes.def: Fix comment typos. - * config/i386/i386.c: Likewise. - * config/i386/i386.md: Likewise. - -2003-01-26 Steven Bosscher - - * config/avr/avr.h, config/cris/aout.h, config/elfos.h, - config/i386/freebsd-aout.h, config/mips/iris6.h: Undefine - ASM_FINISH_DECLARE_OBJECT before defining it. - * toplev.c (rest_of_decl_compilation): Don't define - ASM_FINISH_DECLARE_OBJECT. Only use it if it is defined. - (rest_of_type_compilation): Don't ATTRIBUTE_UNUSED function - parameters for DWARF2 targets because they _are_ used. - -2003-01-26 Alexandre Oliva - - * fp-bit.h: Define macros for TFmode floating-point constants - in IBM-extended TFmode types. - (TMODES): Define if __LDBL_MANT_DIG__ has the newly-supported - widths. - * config/fp-bit.c (pack_d, unpack_d): Support IBM-extended - TFmode type. - - * config/fp-bit.h: Define macros for TFmode floating-point - constants in IEEE quad TFmode type. Declare functions according - to L_ macros. - (TMODES): Define if __LDBL_MANT_DIG__ is 113. - (TFtype, TItype, UTItype): Define if TMODES is defined. - (MAX_UDI_INT, MAX_DI_INT, BITS_PER_DI): Likewise. - (F_T_BITOFF, D_T_BITOFF): Define. - (IMPLICIT_1, IMPLICIT_2): Cast constants to types that are - guaranteed to be wide enough. - * config/fp-bit.c: Check for L_ macros for tf functions. - (__thenan_tf): New. - (nan): Adjust. - (pack_d, unpack_d): Support IEEE 854 quad type. - (_fpmul_parts): Support TFmode. Compute exponent adjustment - from FRAC_NBITS, FRAC_BITS and NGARDS. - (usi_to_float): Cast constants to be shifted to fractype - instead of assuming long long is wide enough. - (sf_to_tf, df_to_tf, __make_tp, tf_to_df, tf_to_sf): New. - -2003-01-26 Andreas Jaeger - - * df.c: Remove prototype of unused function df_regno_rtl_debug. - -2003-01-26 Alexandre Oliva - - * Makefile.in (FPBIT_FUNCS): Added _sf_to_tf. - (DBBIT_FUNCS): Added _df_to_tf. - (TPBIT_FUNCS): New. - (libgcc.mk): Pass TPBIT and TPBIT_FUNCS down. - (LIBGCC_DEPS): Added TPBIT. - * mklibgcc.in: Support TPBIT and TPBIT_FUNCS. - - * optabs.c (expand_binop) : Return xtarget if we haven't - been able to move the result to target. - - * expr.c (emit_group_store): Initialize dst with CONST0_RTX - for the appropriate mode. - - * calls.c (emit_library_call_value_1): Handle return values - in a PARALLEL. - - * rtl.c (get_mode_alignment): Moved to... - * stor-layout.c: ... here. - - * print-rtl.c (print_rtx): Don't print MEM details in - GENERATOR_FILEs. - -2003-01-26 Michael Hayes - - * df.h: Update comments, tidy formatting. - (DF_FORWARD, DF_REVERSE, DF_UNION, DF_INTERSECTION): Rename from FORWARD, - REVERSE, UNION, INTERSECTION. All uses updated. - (OLD_DF_INTERFACE): Remove. - (struct insn_info): Remove commented out insn field. - * df.c: Update comments, tidy formatting. - (df_def_table_realloc): Remove. - - -2003-01-26 Alan Modra - - * calls.c (save_fixed_argument_area): Tidy. - (restore_fixed_argument_area): Tidy. Set alignment of stack_area. - (expand_call): Comment typo fixes. Don't init low_to_save. Start - call chain loop at 1 if !try_tail_call. Formatting. - (emit_library_call_value_1): Don't init low_to_save or high_to_save. - Use save_fixed_argument_area and restore_fixed_argument_area. - -2003-01-26 Michael Hayes - - * df.c (df_uses_record): Handle CC0. - -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 Kazu Hirata - - * config/m68hc11/m68hc11.md: Fix a comment typo. - -2003-01-25 Andreas Jaeger - - * config/i386/i386.c (x86_output_mi_thunk): Correct test for - TARGET_MACHO. - -2003-01-25 Roger Sayle - - * gcse.c (bypass_last_basic_block): New global variable. - (bypass_block): Use redirect_edge_and_branch_force to redirect - fall-through edges. Use bypass_last_basic_block to determine - which blocks have valid PRE information. - (bypass_conditional_jumps): Initialize bypass_last_basic_block. - -2003-01-25 Jan Hubicka - - * gcse.c (local_cprop_pass): Update reg_sets table when needed. - -2003-01-25 Jan Hubicka - Eric Botcazou - - PR opt/8492 - * gcse.c (one_cprop_pass): Delete unreachable blocks. - -2003-01-25 Richard Henderson - - * 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-25 Kazu Hirata - - * config/h8300/h8300.c (h8300_shift_needs_scratch_p): Update a - comment. - -2003-01-25 Richard Henderson - - * config/m68k/m68k-none.h (ASM_SPEC): Adjust inter-option spacing. - -2003-01-25 Kelley Cook - - * ggc-simple.c (debug_ggc_tree): Add PTR cast. - -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-01-25 Richard Henderson - - 2002-02-19 Robert Lipe - * config/i386/t-sco5gas: (CRTSTUFF_T_CFLAGS_S): Delete -mcoff. - -2003-01-25 Roger Sayle - - * builtins.c (purge_builtin_constant_p): Scan insn stream - sequentially rather than by basic block. - * function.c (purge_addressof): Simplify test with INSN_P. - -2003-01-25 Kazu Hirata - - * combine.c (simplify_comparison, case AND): Remove a redundant test. - -2003-01-25 Roger Sayle - - * function.h (struct function): New field calls_constant_p. - (current_function_calls_constant_p): New macro for above. - * function.c (prepare_function_start): Initialize calls_eh_return - and calls_constant_p. - * builtins.c (expand_builtin_constant_p): Set calls_constant_p. - * toplev.c (rest_of_compilation): Only call purge_builtin_constant_p - when the current_function_calls_constant_p. - * integrate.c (expand_inline_function): Set calls_constant_p if - the function being inlined has calls_constant_p set. - -2003-01-25 Roger Sayle - - * cse.c (fold_rtx): Instantiate CONSTANT_P_RTX to 0 when not - optimizing, even if flag_gcse is true. - * toplev.c (rest_of_compilation): purge_builtin_constant_p - only needs to be called when "optimize > 0 && flag_gcse". - -2003-01-25 Roger Sayle - - * stmt.c (emit_case_bit_tests): New routine to implement suitable - switch statements using the equivalent of "if ((1< - - * 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 Jan Hubicka - - * df.c (read_modify_subreg_p): When osize == UNITS_PER_WORD, - subreg is read/modify. - -2003-01-25 Jan Hubicka - - * i386.c (ix86_expand_movstr, ix86_expand_clrstr): Consistently - do libcall for large blocks. - * i386.md (comi patterns): Set type to ssecomi. - (sse2_unpck?pd): Fix mode of vec_select. - - * cse.c: Include except.h - (cse_set_around_loop): Do not create new basic blocks. - * Makefile.in (cse.o): Add dependnecy on except.h - -2003-01-25 Jan Hubicka - - * builtins.c (fold_trunc_transparent_mathfn): New function. - (fold_builtin): Use it. - * convert.c (convert_to_real): Re-enable code to convert - math functions; add support for floor familly functions. - -2003-01-25 Zdenek Dvorak - - * Makefile.in (cfgloop.o, cfgloopanal.o, cfgloopmanip.o): Add - dependencies on coretypes.h and $(TM_H). - -2003-01-25 Jan Hubicka - - * builtins.c (fold_trunc_transparent_mathfn): Undo accidental commit. - -2003-01-24 Stuart Hastings - - * config/i386/i386.c (x86_output_mi_thunk): Add Darwin/x86 support. - -2003-01-25 Michael Hayes - - * config/c4x/c4x.md (UNSPEC_BU): New constants. - (UNSPEC_RPTS, UNSPEC_LSH, UNSPEC_CMPHI, UNSPEC_RCPF): Likewise. - (UNSPEC_RND, UNSPEC_RPTB_FILL, UNSPEC_LOADHF_INT): Likewise. - (UNSPEC_STOREHF_INT, UNSPEC_RSQRF, UNSPEC_LOADQF_INT): Likewise. - (UNSPEC_STOREQF_INT, UNSPEC_LDIV, UNSPEC_PUSH_ST): Likewise. - (UNSPEC_POP_ST, UNSPEC_PUSH_DP, UNSPEC_POP_DP): Likewise. - (UNSPEC_POPQI, UNSPEC_POPQF, UNSPEC_ANDN_ST): Likewise. - (UNSPEC_RPTB_INIT, UNSPEC_TOIEEE, UNSPEC_FRIEEE): Likewise. - -2003-01-24 Jan Hubicka - - * emit-rtl.c (reg_attrs_htab): New static variable. - (reg_attrs_htab_hash, reg_attrs_htab_eq, get_reg_attrs): New static - functions. - (reg_rtx): Do not maintain regno_decl. - (gen_rtx_REG_offset, set_reg_attrs_from_mem, set_delc_rtx, - set_mem_attrs_from_reg): New global function. - (init_emit): Do not initialize regno_decl. - (init_emit_once): initialize reg_attrs_htab. - * final.c (alter_subreg): Do not replace REG by SUBREG. - (gen_mem_expr_from_op): Improve output. - (output_asm_operands): Likewise. - * function.c (assign_params): Do not set REGNO_DECL. - * function.h (struct function): Kill regno_decl. - (REGNO_DECL): Kill. - * gengtype.c (adjust_field_rtx_def): Handle new field of reg. - * print_rtl.c (print_rtx): Output REG information. - * regclass.c (reg_scan_mark_refs): Update attrs. - * reload1.c (alter_reg): Likewise. - * simplify_rtx.c (simplify_subreg): Likewise. - * stmt.c (expand_decl): Likewise. - * rtl.def (REG): Add new field. - * rtl.h (struct reg_attrs): New. - (rtunion_def): At rtreg. - (X0MEMATTR): Add checking. - (X0REGATTR, REG_ATTRS, REG_EXPR, REG_OFFSET): New macro. - (set_reg_attrs_from_mem, set_mem_attrs_from_reg, gen_rtx_REG_offset): - Declare. - * tree.h (SET_DECL_RTL): Call set_decl_rtl. - -2003-01-24 Bob Wilson - - * config/xtensa/xtensa.c: Remove unused include of machmode.h. - (xtensa_emit_call, print_operand): Fix printf format strings - to avoid compile warnings. - (xtensa_function_prologue, xtensa_function_epilogue): Change type - of "size" argument to HOST_WIDE_INT to fix compile warnings. - * config/xtensa/xtensa-protos.h - (xtensa_function_prologue, xtensa_function_epilogue): Ditto. - -2003-01-24 Jan Hubicka - - * builtins.c (DEF_BUILTIN): Accept 10 arguments. - (implicit_built_in_decls): New global array. - (mathfn_built_in): New global function. - (fold_trunc_transparent_mathfn): New static function - (expand_builtin_strstr, expand_bultin_strchr, - expand_builtin_strpbrk, expand_builtin_strcpy, - expand_builtin_strncpy, expand_bultin_strcmp, - expand_bultin_strncat, expand_builtin_fputs): Use - implicint_built_in_decls. - (fold_builtin): Fold floor/trunc/round/ceil/nearbyint. - * builtins.def: Fix comments. - (DEF_GCC_BUILTIN, DEF_FALLBACK_BUILTIN, DEF_EXT_FALLBACK_BUILTIN, - DEF_LIB_BUILTIN, DEF_LIB_ALWAYS_BUILTIN, DEF_EXT_LIB_BUILTIN, - DEF_C99_BULTIN, DEF_FRONT_END_LIB_BUILTIN, - DEF_EXT_FRONT_END_LIB_BUILTIN): Pass implicit as needed. - (DEF_C99_C90RES_BULTIN): New. - (*f, *l builtins): Update. - * c-common.c (DEF_BUILTIN): Initialize implicit array. - (c_expand_builtin_printf, c_expand_builtin_fprintf): Update. - * convert.c (strip_float_extensions): New global function. - * tree.h (DEF_BUILTIN): Accept 10 arguments. - (implicit_built_in_decls, mathfn_built_in, strip_float_extension): - Declare. - * java/builtins.c (define_builtin): Handle implicit. - (DEF_BUILTIN): Update. - * tm.texi (TARGET_C99_FUNCTIONS): Document. - * defaults.h (TARGET_C99_FUNCTIONS): Default to 0. - * config/linux.h (TARGET_C99_FUNCTIONS): Default to 1 - when using glibc2. - -2003-01-24 Bob Wilson - - * config.gcc (xtensa-*-elf*): Removed assignments to with_newlib, - extra_parts, and fixincludes. Add xtensa/t-elf tmake_file. - (xtensa-*-linux*): Add xtensa/t-linux tmake_file. - * config/xtensa/crti.asm: New file. - * config/xtensa/crtn.asm: New file. - * config/xtensa/t-elf: New file. - * config/xtensa/t-linux: New file. - * config/xtensa/t-xtensa: Add rules for crti.o and crtn.o. - Move various CFLAGS settings to new t-elf file. - -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 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-01-24 Zdenek Dvorak - - * cfgloopanal.c: New file. - * cfgloopmanip.c: New file. - * Makefile.in (cfgloopanal.o, cfgloopmanip.o): New. - (toplev.o, loop.o, doloop.o, unroll.o, cfgloop.o, predict.o, - cfglayout.o): Add dependency on cfgloop.h. - (cfgloop.o): Add flags.h dependency. - * basic-block.h (BB_IRREDUCIBLE_LOOP, BB_SUPERBLOCK): New flags. - (VLS_EXPECT_PREHEADERS, VLS_EXPECT_SIMPLE_LATCHES): Removed. - (struct loop, struct loops, flow_loops_find, flow_loops_update, - flow_loops_free, flow_loops_dump, flow_loop_dump, - flow_loop_scan, flow_loop_tree_node_add, flow_loop_tree_node_remove, - LOOP_TREE,,LOOP_PRE_HEADER, LOOP_ENTRY_EDGES, LOOP_EXIT_EDGES, - LOOP_ALL, flow_loop_outside_edge_p, flow_loop_nested_p, - flow_bb_inside_loop_p, get_loop_body, loop_preheader_edge, - loop_latch_edge, add_bb_to_loop, remove_bb_from_loops, - find_common_loop, verify_loop_structure): Declarations moved to ... - * cfgloop.h: New file. - * bb-reorder.c (reorder_basic_blocks): Modified. - * cfglayout.c: Include cfgloop.h. - (cleanup_unconditional_jumps, cfg_layout_redirect_edge, - cfg_layout_duplicate_bb, cfg_layout_initialize): Update loop structure. - (break_superblocks): New static function. - (cfg_layout_finalize): Use it. - (cfg_layout_split_block): New function. - * cfglayout.h (struct reorder_block_def): Add copy and duplicated - fields. - (cfg_layout_initialize, cfg_layout_redirect_edge): Declaration - changed. - (cfg_layout_split_block): Declare. - * cfgloop.c: Include cfgloop.h and flags.h. - (flow_loop_dump, flow_loops_free, flow_loop_exit_edges_find, - get_loop_body): Avoid signed versus unsigned comparison warnings. - (make_forwarder_block, flow_loops_find, loop_preheader_edge, - loop_latch_edge): Modified. - (verify_loop_structure): Modified to use flags stored in loop structure; - check irreducible loops. - (cancel_loop, cancel_loop_tree): New functions. - (estimate_probability): Use loop analysis code for predictions. - (estimate_loops_at_level): Avoid signed versus unsigned comparison - warnings. - * doloop.c: Include cfgloop.h. - * loop.c: Include cfgloop.h. - * predict.c: Include cfgloop.h. - * toplev.c: Include cfgloop.h. - * unroll.c: Include cfgloop.h. - * tracer.c (tracer): Modified. - -2003-01-24 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Fix a typo. - -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 Nathan Sidwell - - * config/rs6000/rs6000.c (rs6000_parse_abi_options): Make sure - spe ABI is configured, if requested. - -2003-01-24 Volker Reichelt - - * doc/passes.texi: Fix typo. - -2003-01-24 Andreas Schwab - - * stor-layout.c (excess_unit_span): Only define if used. - -2003-01-24 Jerry Quinn - - * gcc/doc/invoke.texi (Optimization Options): List -O levels - for each optimization flag. - -2003-01-24 Kazu Hirata - - * config/h8300/h8300.md (*andsi3_ashift_n_lower): New. - -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-24 Nick Clifton - - * config/arm/arm.c (use_return_insn): Do not use a single return - instruction for interrupt handelrs 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-01-24 Nick Clifton - - * Add sh2e support: - - 2002-08-12 Alexandre Oliva - - * config/sh/sh.c (output_branch) [TARGET_SH2E]: Handle - med_cbranches. Fix logic in short_cbranches. - - 2002-04-03 Alexandre Oliva - - * config/sh/sh.md (delay for cbranch): Don't annul delay - slots on SH2e. - * config/sh/sh.c (sh_insn_length_adjustment): Add 2 for - cbranch with unfilled delay slot on SH2e. - (output_branch): Fill with a nop the delay slot of a - branch that required a delay slot but didn't get one. - - 2002-04-02 Alexandre Oliva - - * doc/invoke.texi (SH options): Document -m2e. - * config/sh/crt1.asm: Add __SH2E__ Next to __SH3E__. - * config/sh/lib1funcs.asm: Likewise. - * config/sh/sh.c: Replace all uses of TARGET_SH3E with SH2E. - * config/sh/sh.h (CPP_SPEC): Define __SH2E__ for -m2e, and - not __sh1__. - (CONDITIONAL_REGISTER_USAGE): Don't disable FP regs from - SH2E up. - (SH3E_BIT): Renamed to... - (SH_E_BIT): ... this. Replace all uses. - (TARGET_SH2E): Define from SH_E_BIT and TARGET_SH2. - Replace all uses of TARGET_SH3E with TARGET_SH2E. - (TARGET_SWITCHES): Added 2e. - (OVERRIDE_OPTIONS): Set sh_cpu for SH2E. - (processor_type): Added PROCESSOR_SH2E. - * config/sh/sh.md: Replace all uses of TARGET_SH3E with - TARGET_SH2E, except in sqrtsf2_i. - (attribute cpu): Added sh2e. - * config/sh/t-sh (MULTILIB_OPTIONS): Replace m3e with m2e. - (MULTILIB_MATCHES): Use m2e multilib for m3e. - * config.gcc: Add sh2e target support. - -2003-01-24 Phil Edwards - - Rename -W to -Wextra. - * c-decl.c: Update comments. - * c-typeck.c: Likewise. - * flags.h: Likewise. - * function.c: Likewise. - * stmt.c: Likewise. - * toplev.c: Update comments. - (W_options): Add 'extra'. - (display_help): Remove '-W'. - (decode_W_option): Special warn_uninitialized treatment in the case - of -Wextra. - * doc/invoke.texi: Update with new entries. - -2003-01-23 Richard Henderson - - * ifcvt.c (noce_process_if_block): Re-add check vs X being changed - in no-else-block case. Add commentary. - -2003-01-23 Kaveh R. Ghazi - - * configure.in: Revert last change. - -2003-01-23 Kaveh R. Ghazi - - * configure.in: Don't include ansidecl.h in tconfig.h. - * gcov-io.h (PARAMS, ATTRIBUTE_UNUSED): Define if IN_LIBGCC2. - * unwind-dw2-fde.h (last_fde): Use __attribute__, not - ATTRIBUTE_UNUSED. - - * configure: Regenerate. - -2003-01-23 Franz Sirl - - PR java/6748 - * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Don't destroy - regs->nip. Fix rt_sigreturn frame layout. Add support for newer - kernels. - -2003-01-23 Kaveh R. Ghazi - - * cpplex.c (cpp_interpret_charconst): Squelch warning with cast. - -2003-01-23 Ulrich Weigand - - * genattrtab.c (write_attr_get): Mark 'insn' paramter - as ATTRIBUTE_UNUSED. - -2003-01-23 Richard Earnshaw - - * arm.c (thumb_base_register_rtx_p): New function. - (thumb_index_register_rtx_p): New function. - (thumb_legitimate_address_p): New function. - (thumb_legitimate_offset_p): New function. - * arm.h (REG_STRICT_P): Define according to setting of REG_OK_STRICT. - (ARM_GO_IF_LEGITIMATE_ADDRESS): Use REG_STRICT_P to avoid duplicate - definitions. - (THUMB_GO_IF_LEGITIMATE_ADDRESS): Use thumb_legitimate_address_p. - (THUMB_LEGITIMATE_OFFSET): Delte. - (THUMB_LEGITIMIZE_RELOAD_ADDRESS): Use thumb_legitimate_offset. - * arm-protos.h (thumb_legitimate_address_p): Add prototype. - (thumb_legitimate_offset_p): Likewise. - -2003-01-23 Andreas Schwab - - * unwind.h (_Unwind_GetTextRelBase): Mark parameter as unused. - -2003-01-23 Kaveh R. Ghazi - - * fixinc/Makefile.in (FL_LIST): Revert last change. - -2003-01-23 Volker Reichelt - - PR other/7341 - * invoke.texi (ftest-coverage): Fix broken cross-reference. - Change @code to @command for gcov command. - - * gcc.texi: Adjust title of gcov section. - Adjust copyright. - * gcov.texi: Likewise. - -2003-01-22 Roger Sayle - - PR optimization/8423 - * cse.c (fold_rtx): Only eliminate a CONSTANT_P_RTX to 1 when - its argument is constant, or 0 if !flag_gcse. - * simplify-rtx.c (simplify_rtx): Convert CONSTANT_P_RTX to 1 - if it's argument is constant. - * gcse.c (want_to_gcse_p): Ignore CONSTANT_P_RTX nodes. - (hash_scan_set): Don't record CONSTANT_P_RTX expressions. - (do_local_cprop): Don't propagate CONSTANT_P_RTX constants. - * builtins.c (purge_builtin_constant_p): New function to force - instantiation of any remaining CONSTANT_P_RTX nodes. - * rtl.h (purge_builtin_constant_p): Prototype here. - * toplev.c (rest_of_compilation): Invoke purge_builtin_constant_p - pass after GCSE and before loop. - (flag_gcse): No longer static. - * flags.h (flag_gcse): Prototype here. - -2003-01-22 Ulrich Weigand - - * config/s390/s390.h (HARD_REGNO_MODE_OK): Fix warning regression - introduced by last change. - -2003-01-22 Andreas Schwab - - * ra-rewrite.c (rewrite_program2): Initialize bb to avoid warning. - -2003-01-22 Kazu Hirata - - * config/h8300/h8300.c (h8300_shift_needs_scratch_p): Don't - request a scratch reg on H8S when the shift count is 8. - -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-22 Richard Earnshaw - - * arm.c (arm_address_register_rtx_p): New function. - (arm_legitimate_address_p): New function. - (arm_legitimate_index_p): New function. - (legitimize_pic_address): Use arm_legitimate_index_p. - * arm-protos.h (arm_legtimate_address_p): Add prototype. - * arm.h (ARM_GO_IF_LEGITIMATE_INDEX): Delete. - (ARM_GO_IF_LEGITIMATE_ADDRESS): Call arm_legitimate_address_p. - -2003-01-22 Hartmut Penner - - * config/s390/s390.md (floatdfdi2): Insn has type 'itof'. - * config/s390/2064.md (define_bypass): Correct 'Load' and - 'Load-address' bypass values. - -2003-01-22 Andreas Schwab - - * config/ia64/t-ia64 (insn-attrtab.o-warn): Define as -Wno-error. - -2003-01-21 Zack Weinberg - - * genautomata.c (output_internal_insn_latency_func, - output_print_reservation_func): Short circuit when there is no - automaton to generate code for. - -2003-01-21 Kaveh R. Ghazi - - * Makefile.in (ssa-ccp.o): Depend on coretypes.h $(TM_H). - (df.o): Delete duplicate dependency on coretypes.h $(TM_H). - -2003-01-21 Geoffrey Keating - - * config/rs6000/rs6000.md: Remove warning. - (builtin_setjmp_receiver): Likewise. - * config/darwin.c (update_stubs): Slightly improve terrible hack - with identifiers. Add comment pointing out problems with it. - (update_non_lazy_ptrs): Likewise. - -2003-01-21 Richard Henderson - - * dwarf2out.c (lookup_filename): Fix printf format warning. - * system.h (fread_unlocked, fwrite_unlocked): Undef. - - * fixinc/Makefile.in (FL_LIST): Add $($@-warn) hook. - (fixincl.o-warn, gnu-regex.o-warn): New. - * fixinc/fixfixes.c (FIX_PROC_HEAD): Mark parameters unused. - * fixinc/fixtests.c (TEST_FOR_FIX_PROC_HEAD): Likewise. - * fixinc/fixincl.c (process): Fix printf format warning. - -2003-01-21 Ulrich Weigand - - * dwarf2out (output_file_names): Don't crash if called - with empty file_table. - -2003-01-21 Zack Weinberg - - * genautomata.c (output_internal_insn_latency_func): Add - missing break statement to generated code. - -2003-01-21 Roger Sayle - - * stmt.c (same_case_target_p): New function to determine whether - two case labels branch to the same target. Split out from... - (group_case_nodes): ... here. Use same_case_target_p instead. - (strip_default_case_nodes): Remove explicit case nodes - that branch to the default destination. - (expand_end_case_type): Call strip_default_case_nodes after - group_case_nodes, to simplify the case-list before we count it. - Only generate table_label RTX when actually needed. Try to share - thiscase->exit_label and thiscase->data.case_stmt.default_label - when a switch has no explicit default case. Simplify test for - constant index. - -2003-01-21 Kazu Hirata - - * config/h8300/h8300.md (*negsf2_h8300): Use \\t instead of - \t. - (*negsf2_h8300hs): Likewise. - (*addsi3_lshiftrt_16_zexthi): Likewise. - (*iorhi3_lshiftrt_8): Likewise. - -2003-01-21 Ulrich Weigand - - * dwarf2out.c (fde_table_in_use): Mark GTY. - (dwarf2out_cfi_label_num): New variable, marked GTY. - (dwarf2out_cfi_label): Use it instead of static label_num. - * emit-rtl.c (label_num): Mark GTY. - -2003-01-21 Kazu Hirata - - * config/h8300/h8300.c (output_plussi): Support H8/300. - (compute_plussi_length): Likewise. - (compute_plussi_cc): Likewise. - * config/h8300/h8300.md (addsi_h8300): Use output_plussi to - output assembly instructions. - -2003-01-21 Kaveh R. Ghazi - - * calls.c (fix_unsafe_tree): Prototype. - - * Makefile.in (GCC_WARN_CFLAGS): Add $(WERROR) $($@-warn) - (gtype-desc.o-warn, c-decl.o-warn, varasm.o-warn, gcc.o-warn, - insn-conditions.o-warn, out_object_file, gengtype-yacc.o-warn, - c-parse.o-warn): Add -Wno-error. - (STAGE2_FLAGS_TO_PASS): Add WERROR="@WERROR@". - - * configure.in (--enable-werror): Add new flag. - * doc/install.texi (--enable-werror): Document. - * configure: Regenerate. - - * objc/Make-lang.in (objc/objc-parse.o-warn): Add -Wno-error. - -2003-01-21 Andreas Schwab - - * genautomata.c (output_internal_insn_latency_func): Fix missing - close paren in output. - -2003-01-21 Zack Weinberg - - * genautomata.c: Space savings in generated code: - (output_dfa_insn_code_func): Split out the table-enlargement - path to an out-of-line static function, dfa_insn_code_enlarge. - (output_internal_insn_latency_func): Use a lookup table for the - default latencies. - (output_print_reservation_func): Use a lookup table for the - strings. - -2003-01-21 Christian Ehrhardt - - PR opt/7507 - * calls.c (fix_unsafe_tree): Split out from ... - (expand_call): ... here. Use it on the function address too. - -2003-01-20 Richard Henderson - - * expr.h (default_must_pass_in_stack): Move decl outside ifdef. - -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 Kazu Hirata - - * config/h8300/h8300.c (const_costs): Remove a warning. - (output_plussi): Likewise. - (compute_plussi_length): Likewise. - (compute_plussi_cc): Likewise. - -2003-01-20 Kazu Hirata - - * config/h8300/h8300.md (addsi_h8300): Remove the last - alternative. - -2003-01-20 Kazu Hirata - - * config/h8300/h8300.c (get_shift_alg): Remove redundant code. - -2003-01-20 Kaveh R. Ghazi - - * system.h (__NO_STRING_INLINES): Define. - -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 Roger Sayle - - * cse.c (cse_insn): Avoid RTL sharing when updating the RETVAL - insn's notes following a substitution inside a libcall. - -2003-01-20 Zack Weinberg - - * configure.in: Check for system-provided 'uchar' type. - * configure, config.in: Regenerate. - * cpphash.h: Only typedef 'uchar' if the system doesn't. - -2003-01-20 Richard Henderson - - * expr.h (MUST_PASS_IN_STACK): Move implementation... - * calls.c (default_must_pass_in_stack): ... here. - -2003-01-20 Vladimir Makarov - - * genattrtab.h (INSN_ALTS_FUNC_NAME): Move it from genautomata.c. - - * genautomata.c (INSN_ALTS_FUNC_NAME): Move it into genattrtab.h. - - * genattr.c (main): Output default definition of AUTOMATON_ALTS. - Wrap up definition of `insn_alts'. - - * genattrtab.c (main): Wrap up `insn_alts'. - -2003-01-20 Kaveh R. Ghazi - - * collect2.c (ldgetname): Check HAVE_DECL_LDGETNAME before - prototyping. - * configure.in: Check for and ldgetname() prototype. - - * config.in, configure: Regenerate. - -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-01-20 Jan Hubicka - - * i386.md (SSE cmov splitter): Handle memory operand in operand 5. - -2003-01-20 Andreas Schwab - - * system.h: Don't declare strsignal if the decl test hasn't been - run yet. - -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 David Edelsohn - - * collect2.c (ldgetname): Expand declaration to prototype. - * read-rtl.c (atoll): Add prototype. - * system.h (strsignal): Also declare if no declaration found. - -2003-01-19 Alexandre Oliva - - * config.gcc (mips64*-*-linux*): Added. - * config/mips/linux64.h, config/mips/t-linux64: New file. - * config/mips/iris6.h (MIPS_TFMODE_FORMAT): Define. - * config/mips/mips.c (override_options): Use it. - * config/mips/mips.h (TARGET_SWITCHES): Added... - (SUBTARGET_TARGET_SWITCHES): New, empty by default. - * Makefile.in (SPECS): New. - (STAGESTUFF, specs, mostlyclean, install-common): Use it. - * gcc.c (process_command): Move self-spec processing past spec - file loading. - * doc/tm.texi (DRIVER_SELF_SPECS): Document the change. - * doc/fragments.texi (MULTILIB_EXTRA_OPTS): Document need for - CRTSTUFF_T_CFLAGS. - (SPECS): Document. - * doc/invoke.texi (-mabi-fake-default): Document. - -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. - * 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 Kazu Hirata - - * basic-block.h: Fix comment formatting. - * calls.c: Likewise. - * combine.c: Likewise. - * convert.c: Likewise. - * gcov.c: Likewise. - * haifa-sched.c: Likewise. - * libgcc2.c: Likewise. - * loop.c: Likewise. - * profile.c: Likewise. - * system.h: Likewise. - -2003-01-18 Roger Sayle - - * config/pa/pa.md (muldi3): Avoid invalid sharing of SUBREG RTXs. - -2003-01-17 Kaveh R. Ghazi - - * ra-build.c (undef_to_size_word): Avoid `switch' warning. - -2003-01-17 Dale Johannesen - - * config/rs6000/rs6000.md (*floatsidf2_internal): Add earlyclobbers. - (*floatunssidf2_internal): Ditto. - -2003-01-17 Kazu Hirata - - * alias.c: Fix comment typos. - * basic-block.h: Likewise. - * c-common.c: Likewise. - * c-common.h: Likewise. - * c-decl.c: Likewise. - * c-opts.c: Likewise. - * c-pragma.c: Likewise. - * c-pretty-print.h: Likewise. - * cfg.c: Likewise. - * cfganal.c: Likewise. - * cfgbuild.c: Likewise. - * cfgcleanup.c: Likewise. - * cfglayout.c: Likewise. - * cfgrtl.c: Likewise. - * convert.c: Likewise. - * cpphash.h: Likewise. - * cpplex.c: Likewise. - * cpplib.h: Likewise. - * df.h: Likewise. - * diagnostic.c: Likewise. - * diagnostic.h: Likewise. - * dwarf2.h: Likewise. - -2003-01-17 Stan Shebs - - * config/darwin-protos.h: Forward-declare struct cpp_reader. - -2003-01-17 Douglas B Rupp - - * config/alpha/alpha.c (alpha_need_linkage): Fix obvious - mistake in last checkin. - -2003-01-17 Kazu Hirata - - * et-forest.c: Fix comment typos. - * et-forest.h: Likewise. - * except.c: Likewise. - * expr.c: Likewise. - * flags.h: Likewise. - * flow.c: Likewise. - * gcc.c: Likewise. - * gcse.c: Likewise. - * genattrtab.c: Likewise. - * genautomata.c: Likewise. - * gengtype.c: Likewise. - * genrecog.c: Likewise. - * global.c: Likewise. - * gthr-rtems.h: Likewise. - -2003-01-17 Kaveh R. Ghazi - - * i386.c (x86_function_profiler): Fix format specifier. - -2003-01-17 Richard Henderson - - * gengtype.c (walk_type): Allow paramN_is. - -2003-01-17 Nick Clifton - - * config/i960/t-960bare (i960-c.o): Add missing newline escape. - -2003-01-16 Richard Henderson - - * config/alpha/linux-elf.h (LIB_SPEC): Adjust inter-option spacing. - -2003-01-16 Richard Henderson - - * config/alpha/alpha.c (alpha_sr_alias_set): Mark GTY. - (alpha_next_sequence_number): Likewise. - (alpha_this_literal_sequence_number): Likewise. - (alpha_this_gpdisp_sequence_number): Likewise. - (struct alpha_funcs, alpha_funcs_num): Likewise. - (struct alpha_links): Fix branch merge error. - (alpha_need_linkage, alpha_use_linkage): Use GC for alpha_funcs. - -2003-01-17 Alexandre Oliva - - * config/mips/mips.h: Don't use #elif. Reported by Kaveh - R. Ghazi. - -2003-01-16 Kazu Hirata - - * ifcvt.c: Fix comment typos. - * lcm.c: Likewise. - * libgcc2.c: Likewise. - * local-alloc.c: Likewise. - * loop.c: Likewise. - * predict.c: Likewise. - * ra-build.c: Likewise. - * ra.c: Likewise. - * ra-colorize.c: Likewise. - * ra.h: Likewise. - * ra-rewrite.c: Likewise. - * regmove.c: Likewise. - * reload.h: Likewise. - * rtlanal.c: Likewise. - * toplev.c: Likewise. - * tree.h: Likewise. - * unwind-dw2-fde-glibc.c: Likewise. - * vmsdbgout.c: Likewise. - -2003-01-16 Richard Henderson - - * dwarf2out.c (struct file_table): Remove. - (FILE_TABLE_INCREMENT): Remove. - (file_table): Make a varray; mark for GC. Update all users. - (file_table_last_lookup_index): Extract from struct file_table. - (output_file_names): Fix unsigned compare warnings. - (add_name_attribute): Remove inline marker. - (add_comp_dir_attribute): Split out from gen_compile_unit_die. - (lookup_filename): Don't manage size of file_table. - (init_file_table): Allocate file_table with GC. - (dwarf2out_init): Don't record main_input_filename here. - (dwarf2out_finish): Do it here instead. - -2003-01-16 Bruce Korb - - * gcc/fixinc/inclhack.def(limits_ifndef): QNX needs a bypass, too. - -2003-01-16 Kaz Kojima - - * config/sh/sh.c (sh_initialize_trampoline): Emit rotrdi3_mextr - instead of rotldi3_mextr. - -2003-01-16 Vladimir Makarov - - * haifa-sched.c (move_insn): Restore moving all schedule group. - (set_priorities): Restore taking SCHED_GROUP_P into account. - - * sched-deps.c (add_dependence): Restore processing the last group - insn. - (remove_dependence, group_leader): Restore the functions. - (set_sched_group_p): Restore adding dependencies from previous insn - in the group. - (compute_forward_dependences): Restore usage of group_leader. - - * sched-ebb.c (init_ready_list): Restore taking SCHED_GROUP_P into - account. - - * sched-rgn.c (init_ready_list): Restore taking SCHED_GROUP_P into - account. - (can_schedule_ready_p): Ditto. - (add_branch_dependences): Restore skipping over the group insns. - -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 J"orn Rennecke - - * sh.md (mshflo_w_x): Fix description of operation. - -2003-01-16 Zack Weinberg - - * config/rs6000/rs6000.h: Mention Altivec registers in - commentary. Fix typo. - -2003-01-16 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-16 Kaveh R. Ghazi - - * ra-colorize.c (colorize_one_web): Initialize variable. - * regmove.c (fixup_match_1): Likewise. - * reload1.c (reload_as_needed): Likewise. - * sdbout.c (SET_KNOWN_TYPE_TAG): Add cast. - -2003-01-16 Zdenek Dvorak - - * cfgloop.c (flow_loops_find): Fix handling of abnormal edges. - -2003-01-16 Kaveh R. Ghazi - - * dbxout.c (lastfile, cwd): Fix `unused' warning. - * dwarf2out.c (fde_table_in_use, current_funcdef_fde, - dw_cfi_oprnd1_desc, dw_cfi_oprnd2_desc, next_die_offset, - is_main_source, file_table, decl_die_table_in_use, - abbrev_die_table_in_use, line_info_table_in_use, - separate_line_info_table_in_use, pubname_table_in_use, - arange_table_in_use, ranges_table_in_use, - current_function_has_inlines): Likewise. - * flow.c (life_analysis): Likewise. - * genemit.c (gen_insn): Likewise. - * protoize.c (cplus_suffix): Likewise. - - * arm.c (ROUND_UP_WORD): Renamed from ROUND_UP. - * arm.h (ROUND_UP_WORD): Likewise. - - * arm.h (CONDITIONAL_REGISTER_USAGE): Avoid signed/unsigned - warning. - * emit-rtl.c (gen_rtx_REG, set_mem_attributes_minus_bitpos, - init_emit_once): Likewise. - * flow.c (mark_regs_live_at_end, calculate_global_regs_live): - Likewise. - * function.c (assign_stack_temp_for_type): Likewise. - * loop.c (loop_invariant_p): Likewise. - * recog.c (push_operand): Likewise. - * regclass.c (init_reg_sets_1): Likewise. - * reload.c (update_auto_inc_notes): Likewise. - * reload1.c (reload_as_needed, emit_input_reload_insns): Likewise. - * stmt.c (expand_asm_operands): Likewise. - * stor-layout.c (start_record_layout): Likewise. - -2003-01-16 Herman A.J. ten Brugge - - * config/c4x/c4x.md (epilogue): Correct last patch. - -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-01-15 Roger Sayle - - * gcse.c (one_cprop_pass): Change function arguments to take both - cprop_jumps and bypass_jumps flags instead of just alter_jumps. - (gcse_main): Update calls to one_cprop_pass, disabling bypassing. - (bypass_jumps): New function to perform separate jump bypassing pass. - * rtl.h (bypass_jumps): Add function prototype. - * timevar.def (TV_BYPASS): New timing variable. - * toplev.c (enum dump_file_index): Add new entry DFI_bypass. - (dump_file): New entry for the bypass RTL dump file. - (rest_of_compilation): Insert new jump bypassing optimization - pass after loop. - * doc/passes.texi: Document new pass. - -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-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 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 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 Roger Sayle - - * c-semantics.c (genrtl_while_stmt): Improve initial RTL generation - when loop condition is known true, i.e. "while (1) { ... }". - (genrtl_for_stmt): Similarly for "for" statements. - -2003-01-15 Roger Sayle - - * real.c (real_sqrt): Return a bool result indicating whether - a floating point exception or trap should be raised. - * real.h (real_sqrt): Update function prototype. - * builtins.c (fold_builtin): Only fold non-trapping square - roots unless we're ignoring errno and trapping math. - -2003-01-15 John David Anglin - - * expr.h (emit_conditional_add): Add PARAMS to declaration. - * gengtype-lex.l (malloc, realloc): Move defines after include of - system.h. Remove duplicate include of system.h. - -2003-01-15 Roger Sayle - - PR middle-end/9009 - * optabs.c (expand_unop): When manipulating the FP sign bit - using integer operations, account for targets with different - integer and FP word orders. - (expand_abs): Likewise. - -2003-01-15 David Edelsohn - - * config/rs6000/rs6000.c (rs6000_gen_section_name): Do not include - file extension in section name. - -2003-01-15 Richard Earnshaw - - * flow.c (find_auto_inc): Also try to generate a PRE_MODIFY with - constant offset. - -2003-01-15 Richard Earnshaw - - * arm.h (HAVE_PRE_MODIFY_DISP, HAVE_PRE_MODIFY_REG): Define. - (HAVE_POST_MODIFY_DISP, HAVE_POST_MODIFY_REG): Define. - (ARM_GO_IF_LEGITIMATE_ADDRESS): Handle pre/post-modify addresses. - (ARM_PRINT_OPERAND_ADDRESS): Likewise. - -2003-01-15 Jan Hubicka - - PR f/9258 - * global.c (struct allocno): Add no_stack_reg. - (global_conflicts): Set no_stack_reg. - (find_reg): Use it. - - * convert.c (convert_to_real): Fold - and abs only when profitable. - * fold-const.c (fold): Fold truncates in - and abs. - -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. - -2003-01-15 Hartmut Penner - - * config/s390/s390.c (s390_safe_attr_type): New function. - (s390_use_dfa_pipeline_interface): New function, return true for z900. - (s390_issue_rate): New function. - (s390_agen_dep_p): New function. - (addr_generation_dependency_p): Use 's390_safe_attr_type'. - (s390_adjust_cost): Return 'cost' if new DFA is used. - (s390_adjust_priority): Delete function. - * config/s390/s390-protos.h: (s390_agen_dep_p): New prototype. - * config/s390/s390.md (atype attribute): Attribute 'atype' default - determined by 'op_type'. - (type attribute): Added more type attributes. - * config/s390/2064.md: New DFA description for z900 pipeline. - -2003-01-15 Alexandre Oliva - - * config/i386/i386.c (ix86_expand_vector_move): Validize constant - forced to memory. Fixes PR bootstrap/9036. - - * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Define so as - to set $gp before the call. - -2003-01-14 Richard Henderson - - * config/alpha/alpha.c (alpha_expand_mov): Use correct mode - for force_const_mem. - -2003-01-14 Kaveh R. Ghazi - - * genattr.c (main): Rearrange output to avoid prototype warning. - * genautomata.c (transform_3): Fix ambiguous-else warning. - * local-alloc.c (requires_inout): Add parentheses around - assignment used as truth-value. - * timevar.c: Move system includes above local includes. Include - toplev.h - * Makefile.in (timevar.o): Depend on toplev.h. - -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-10 Andrew Haley - - * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Rename - registers to be in correct order. Add rip. - -2003-01-14 Kazu Hirata - - * config/h8300/h8300.md (*andsi3_lshiftrt_9_sb): New. - (*iorsi3_and_lshiftrt_9_sb): Likewise. - -2003-01-14 Jan Hubicka - - * convert.c (strip_float_extensions): Look for narrowest type handling - FP constants. - - * fold-const.c (fold): Fold (double)float1 CMP (double)float2 into - float1 CMP float2. - * convert.c (strip_float_extensions): Make global. - * tree.h (strip_float_extensions): Declare. - -2003-01-14 Gabriel Dos Reis - - * timevar.def: define TV_NAME_LOOKUP. - * timevar.c (timevar_pop): Be verbose when aborting. - -2003-01-13 Andreas Schwab - - * Makefile.in ($(parsedir)/gengtype-lex.c): Don't change to - $(parsedir), just move the temporary file at the end. - ($(parsedir)/gengtype-yacc.c): Likewise. - -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-13 Kaveh R. Ghazi - - * config/sparc/gmon-sol2.c (moncontrol, monstartup, _mcleanup, - internal_mcount): Don't use PARAMS. - (monstartup, _mcleanup, internal_mcount, moncontrol): Convert to - ISO C style. - (internal_mcount): Use __attribute__, not ATTRIBUTE_UNUSED. - -2003-01-13 Andreas Schwab - - * config/rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Output type - directive. - -2003-01-13 Kazu Hirata - - * config/h8300/h8300.md (*andsi3_lshift_n_sb): New. - (*iorsi3_and_lshiftrt_n_sb): Likewise. - -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-01-12 Kaveh R. Ghazi - - * c-pch.c (asm_file_startpos): Change to `long'. - (pch_init): Use ftell, not ftello. - (c_common_write_pch): Use ftell/fseek, not ftello/fseeko. - Use `long' instead of `off_t'. - (c_common_read_pch): Likewise. - * ggc-common.c (gt_pch_save): Use long/ftell instead of - off_t/ftello. - -2003-01-12 Alan Modra - - * expr.c (expand_expr ): Correct recursive call args. - -2003-01-11 Richard Earnshaw (rearnsha@arm.com) - - * arm-protos.h (struct cpp_reader): Add declaration. - -2003-01-11 Jan Hubicka - - PR target/9068 - * i386.c (output_fp_compare): Fix typo. - -2003-01-10 David Edelsohn - - * config/rs6000/rs6000.c (common_mode_defined): Mark for PCH. - -2003-01-10 Geoffrey Keating - - * Makefile.in (parsedir): New variable. - (docobjdir): New variable. - (c-parse.o, c-parse.c, c-parse.y, gengtype-lex.o, gengtype-yacc.o, - gengtype-lex.c, gengtype-yacc.c): Use parsedir. - (info, cpp.info, gcc.info, gccint.info, gccinstall.info, - cppinternals.info, generated-manpages, gcov.1, cpp.1, gcc.1, gfdl.7, - gpl.7, fsf-funding.7, maintainer-clean, install-info, install-man): - Use docobjdir. - * objc/Make-lang.in (objc/objc-parse.c, objc/objc-parse.y, - objc.maintainer-clean): Use parsedir. - - * varasm.c (struct constant_descriptor_rtx): Remove unused - `label' field. - - * toplev.c (documented_lang_options): Document -Winvalid-pch. - -2003-01-10 Richard Henderson - - * config/alpha/alpha.h (NO_PROFILE_COUNTERS): Set. - (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Kill. - -2003-01-10 Richard Henderson - - * combine.c (make_compound_operation): Use SCALAR_INT_MODE_P, - not INTEGRAL_MODE_P when widening extensions. - -2003-01-10 Richard Henderson - - * config/alpha/alpha.c (decl_has_samegp): True for !TREE_PUBLIC. - -2003-01-10 Geoffrey Keating - - * ggc-page.c (ggc_collect): Avoid overflow computing - min_expand. - - * Makefile.in (RANLIB_FOR_TARGET): Use RANLIB when native. - (RANLIB_TEST_FOR_TARGET): Delete. Don't pass down to sub-makes. - Remove calls. - * mklibgcc.in: Remove uses of RANLIB_TEST_FOR_TARGET. - -2003-01-10 Jan Hubicka - - * ifcvt.c (noce_try_addcc): Do not call emit_conditional_add - with weird operands. - -2003-01-10 Dale Johannesen - - * calls.c (load_register_parameters): Add is_sibcall, sibcall_failure - parameters. Call check_sibcall_argument_overlap if indicated. - (check_sibcall_argument_overlap): Add mark_stored_args_map - parameter. Don't mark parameter area as clobbered if not set. - (expand_call): Adjust calls to above. - -2003-01-10 Kelley Cook - - * configure.in (linker read-only and read-write section mixing): - Squelch some assembler warnings. - * configure: Likewise. - -2003-01-10 Hartmut Penner - - * doc/invoke.texi: Document -mtune, delete -mcpu - option for S/390 and zSeries. - * config/s390/s390.c (s390_tune_string) New variable. - (s390_cpu_string) Delete variable. - (override_options): Use s390_tune_string instead of - s390_cpu_string. - * config/s390/s390.h: (TARGET_OPTIONS) '-mtune' instead of '-mcpu'. - -2003-01-10 Kazu Hirata - - * config/h8300/h8300.md (*iorsi3_ashift_31): New. - -2003-01-10 Josef Zlomek - - * jump.c (next_nonnote_insn_in_loop): New function. - (copy_loop_headers): Use next_nonnote_insn_in_loop instead of - next_nonnote_insn. - (duplicate_loop_exit_test). Likewise. - -2003-01-09 Geoffrey Keating - - Merge from pch-branch: - - 2003-01-06 Geoffrey Keating - - * ggc-page.c (ggc_pch_read): Update the statistics after a PCH - load. - - 2002-12-24 Geoffrey Keating - - * cpplib.c (count_registered_pragmas): New function. - (save_registered_pragmas): New function. - (_cpp_save_pragma_names): New function. - (restore_registered_pragmas): New function. - (_cpp_restore_pragma_names): New function. - * cpphash.h (_cpp_save_pragma_names): Prototype. - (_cpp_restore_pragma_names): Likewise. - * cpppch.c (struct save_macro_item): Split from save_macro_data. - (struct save_macro_data): New field 'saved_pragmas'. - (save_macros): Update for changes to struct save_macro_data. - (cpp_prepare_state): Call _cpp_save_pragma_names, update - for changes to struct save_macro_data. - (cpp_read_state): Call _cpp_restore_pragma_names, update - for changes to struct save_macro_data. - - * cpppch.c (cpp_read_state): Restore the hashtable references - in the cpp_reader. - - * tree.h (built_in_decls): Mark for PCH. - - * dbxout.c (lastfile): Don't mark for PCH. - - * ggc.h: Document PCH calls into memory managers. - - 2002-12-18 Geoffrey Keating - - * doc/invoke.texi (Precompiled Headers): Document the - directory form of PCH. - * cppfiles.c (validate_pch): New function. - (open_file_pch): Search suitably-named directories for PCH files. - - 2002-12-14 Geoffrey Keating - - * doc/gty.texi (GTY Options): Document chain_next, chain_prev, - reorder options. - (Type Information): Mention that the information is also - used to implement PCH. - * doc/passes.texi (Passes): Improve documentation of - language-specific files. - - 2002-12-11 Geoffrey Keating - - * gengtype.c (struct write_types_data): Add reorder_note_routine field. - (struct walk_type_data): Add reorder_fn field. - (walk_type): Process 'reorder' option. - (write_types_process_field): Reorder parameters to gt_pch_note_object, - call reorder_note_routine. - (write_func_for_structure): Reorder parameters to gt_pch_note_object. - (ggc_wtd): Update for change to struct write_types_data. - (pch_wtd): Likewise. - * ggc.h (gt_pch_note_object): Reorder parameters. - (gt_handle_reorder): New definition. - (gt_pch_note_reorder): New prototype. - * ggc-common.c (struct ptr_data): Add reorder_fn. - (gt_pch_note_object): Reorder parameters. - (gt_pch_note_reorder): New. - (gt_pch_save): Call reorder_fn. - * stringpool.c (gt_pch_n_S): Update for change to gt_pch_note_object. - - * dbxout.c (cwd): Don't mark for PCH. - - 2002-12-09 Geoffrey Keating - - * gengtype.c (finish_root_table): Fix some warnings. - (write_root): Handle TYPE_STRING. - * ggc.h (gt_ggc_m_S): Add prototype. - * stringpool.c (gt_ggc_m_S): New function. - - 2002-11-30 Geoffrey Keating - - * dwarf2out.c (dw2_string_counter): New. - (AT_string_form): Use it. - (same_dw_val_p): Update for removal of hashtable.h hash tables. - - 2002-11-22 Geoffrey Keating - - * dbxout.c: Include gt-dbxout.h. - (lastfile): Mark for PCH/GGC. - (cwd): Likewise. - (struct typeinfo): Likewise. - (typevec): Likewise. - (typevec_len): Likewise. - (next_type_number): Likewise. - (struct dbx_file): Likewise. - (current_file): Likewise. - (next_file_number): Likewise. - (dbxout_init): Allocate typevec, struct dbx_file with GGC. - (dbxout_start_source_file): Allocate struct dbx_file with GGC. - (dbxout_end_source_file): Don't free struct dbx_file. - (dbxout_type): Use GGC to allocate typevec. - * Makefile.in (dbxout.o): Depend on gt-dbxout.h, $(GGC_H). - (GTFILES): Add dbxout.c. - (gt-dbxout.h): New rule. - - * Makefile.in (c-pch.o): Add debug.h as dependency. - * c-pch.c: Include debug.h. - (pch_init): Call start_source_file to keep nesting right. - (c_common_read_pch): Add orig_name parameter. Call - start_source_file debug hook. Call end_source_file debug hook. - * c-common.h (c_common_read_pch): Update prototype. - * cpplib.h (struct cpp_callbacks): Add fourth field to read_pch - callback. - * cppfiles.c (struct include_file): Add new field `header_name'. - (find_or_create_entry): Default it to `name'. - (open_file_pch): Set it to the original header file searched for. - (stack_include_file): Don't stack an empty buffer, just handle - PCH files immediately. Pass header_name field to read_pch callback. - - 2002-11-19 Geoffrey Keating - - * function.c (funcdef_no): Mark to be saved in a PCH. - - 2002-11-15 Geoffrey Keating - - * ggc-page.c (ggc_pch_read): Remove unused 'bmap_size'. - - * cpppch.c (cpp_read_state): Correct size reallocated for 'defn'. - - 2002-11-14 Geoffrey Keating - - * optabs.h (code_to_optab): Add GTY marker. - - 2002-11-13 Geoffrey Keating - - * Makefile.in (GTFILES): Add cpplib.h. - * c-common.h (struct c_common_identifier): Don't skip 'node' field. - * c-decl.c (build_compound_literal): Don't use var_labelno. - * cpplib.h (struct cpp_hashnode): Use gengtype to mark. - * dwarf2asm.c (dw2_force_const_mem): Don't use const_labelno. - * varasm.c (const_labelno): Use gengtype to mark. - (var_labelno): Likewise. - (in_section): Likewise. - (in_named_name): Likewise. - (struct in_named_entry): Likewise. - (in_named_htab): Likewise. - (set_named_section_flags): Use GGC to allocate struct in_named_entry. - (init_varasm_once): Use GGC to allocate in_named_htab. - * config/darwin.c (current_pic_label_num): Mark for PCH. - - 2002-11-11 Geoffrey Keating - - * ggc-simple.c (init_ggc_pch): New stub procedure. - (ggc_pch_count_object): Likewise. - (ggc_pch_total_size): Likewise. - (ggc_pch_this_base): Likewise. - (ggc_pch_alloc_object): Likewise. - (ggc_pch_prepare_write): Likewise. - (ggc_pch_write_object): Likewise - (ggc_pch_finish): Likewise. - (ggc_pch_read): Likewise. - - 2002-11-08 Geoffrey Keating - - * c-pch.c (c_common_write_pch): Write the macro definitions after - the GCed data. - (c_common_read_pch): Call cpp_prepare_state. Restore the macro - definitions after the GCed data. - * cpplib.c (save_macros): New. - (reset_ht): New. - (cpp_write_pch_deps): Split out of cpp_write_pch. - (cpp_write_pch_state): Split out of cpp_write_pch. - (cpp_write_pch): Delete. - (struct save_macro_data): Delete. - (cpp_prepare_state): New. - (cpp_read_state): Erase and restore initial macro definitions. - * cpplib.h (struct save_macro_data): Forward-declare. - (cpp_write_pch_deps): Prototype. - (cpp_write_pch_state): Prototype. - (cpp_write_pch): Delete prototype. - (cpp_prepare_state): Prototype. - (cpp_read_state): Add fourth argument. - - 2002-11-04 Geoffrey Keating - - * gengtype.c (adjust_field_rtx_def): Don't use skip on valid fields. - (write_array): Remove warning. - - * gengtype.c (contains_scalar_p): New. - (finish_root_table): Add the table to all languages, even if it's - empty. - (write_roots): Output gt_pch_scalar_rtab. - * ggc-common.c (gt_pch_save): Write out scalars. - (gt_pch_restore): Read scalars back. - - * ggc-page.c (OBJECTS_IN_PAGE): New macro. - (struct page_entry): Delete pch_page field. - (ggc_recalculate_in_use_p): Use OBJECTS_IN_PAGE. - (clear_marks): Likewise. - (sweep_pages): Likewise. - (poison_pages): Likewise. - (ggc_print_statistics): Likewise. - (ggc_pch_read): Don't free objects read from a PCH. - Properly set up in_use_p and page_tails. - - 2002-10-25 Geoffrey Keating - - * gengtype.c (struct write_types_data): New. - (struct walk_type_data): Make `cookie' const; add extra - prev_val item; add `orig_s' field. - (walk_type): Update prev_val[3]. - (write_types_process_field): New. - (write_func_for_structure): Take write_types_data structure. - (write_types): New. - (ggc_wtd): New. - (pch_wtd): New. - (write_types_local_process_field): New. - (gc_mark_process_field): Delete. - (write_local_func_for_structure): New. - (gc_mark_func_name): Delete. - (write_gc_types): Delete. - (write_local): New. - (finish_root_table): Don't include 'ggc_' in PFX. - (write_root): Rename from write_root. Fill pchw field of structures. - (write_array): New. - (write_roots): Rename from write_gc_roots. Split out to write_array. - Update to changes to other routines. Write gt_pch_cache_rtab table. - (main): Write PCH walking routines. - * ggc-common.c: Include toplev.h, sys/mman.h. - (ggc_mark_roots): For cache hashtables, also mark the hash table - and the array of entries. - (saving_htab): New. - (struct ptr_data): New. - (POINTER_HASH): New. - (gt_pch_note_object): New. - (saving_htab_hash): New. - (saving_htab_eq): New. - (struct traversal_state): New. - (call_count): New. - (call_alloc): New. - (compare_ptr_data): New. - (relocate_ptrs): New. - (write_pch_globals): New. - (struct mmap_info): New. - (gt_pch_save): New. - (gt_pch_restore): New. - * ggc-page.c (ROUND_UP_VALUE): New. - (ROUND_UP): New. - (struct page_entry): Add field `pch_page'. - (init_ggc): Use ROUND_UP. - (struct ggc_pch_data): Declare. - (init_ggc_pch): New. - (ggc_pch_count_object): New. - (ggc_pch_total_size): New. - (ggc_pch_this_base): New. - (ggc_pch_alloc_object): New. - (ggc_pch_prepare_write): New. - (ggc_pch_write_object): New. - (ggc_pch_finish): New. - (ggc_pch_read): New. - * ggc.h (gt_pointer_operator): New. - (gt_note_pointers): New. - (gt_pch_note_object): New prototype. - (gt_pointer_walker): New. - (struct ggc_root_tab): Use gt_pointer_walker, add `pchw' field. - (LAST_GGC_ROOT_TAB): Update. - (gt_pch_cache_rtab): Declare. - (gt_pch_scalar_rtab): Declare. - (struct ggc_cache_tab): Use gt_pointer_walker, add `pchw' field. - (LAST_GGC_CACHE_TAB): Update. - (gt_pch_save_stringpool): Declare. - (gt_pch_restore_stringpool): Declare. - (gt_pch_p_S): Declare. - (gt_pch_n_S): Declare. - (struct ggc_pch_data): Forward-declare. - (init_ggc_pch): Declare. - (ggc_pch_count_object): Declare. - (ggc_pch_total_size): Declare. - (ggc_pch_this_base): Declare. - (ggc_pch_alloc_object): Declare. - (ggc_pch_prepare_write): Declare. - (ggc_pch_write_object): Declare. - (ggc_pch_finish): Declare. - (ggc_pch_read): Declare. - (gt_pch_save): Declare. - (gt_pch_restore): Declare. - * fold-const.c (size_int_type_wide): Allocate size_htab using GGC. - * emit-rtl.c (init_emit_once): Allocate const_int_htab, - const_double_htab, mem_attrs_htab using GGC. - * c-pch.c: Include ggc.h. - (pch_init): Allow reading PCH file back. - (c_common_write_pch): Call gt_pch_save. - (c_common_read_pch): Call gt_pch_restore. - * c-parse.in (init_reswords): Delete now-untrue comment. - Allocate ridpointers using GGC. - * c-objc-common.c (c_objc_common_finish_file): Write PCH before - calling expand_deferred_fns. - * c-common.h (ridpointers): Mark for GTY machinery. - * Makefile.in (stringpool.o): Update dependencies. - (c-pch.o): Update dependencies. - (ggc-common.o): Update dependencies. - * stringpool.c: Include gt-stringpool.h. - (gt_pch_p_S): New. - (gt_pch_n_S): New. - (struct string_pool_data): New. - (spd): New. - (gt_pch_save_stringpool): New. - (gt_pch_restore_stringpool): New. - * tree.c (init_ttree): Make type_hash_table allocated using GC. - - 2002-10-04 Geoffrey Keating - - * gengtype.c (adjust_field_rtx_def): Don't pass size_t to printf. - (output_mangled_typename): Don't pass size_t to printf. - - * tree.h (union tree_type_symtab): Add tag to `address' field. - (union tree_decl_u2): Add tag to 'i' field. - * varasm.c (union rtx_const_un): Add tags to all fields. - * gengtype.c (struct walk_type_data): New. - (output_escaped_param): Take struct walk_type_data parameter. - (write_gc_structure_fields): Delete. - (walk_type): New. - (write_gc_marker_routine_for_structure): Delete. - (write_func_for_structure): New. - (gc_mark_process_field): New. - (gc_mark_func_name): New. - (gc_counter): Delete. - (write_gc_types): Use write_func_for_structure. - (write_gc_roots): Use walk_type. - - 2002-10-02 Geoffrey Keating - - * ggc-common.c (ggc_mark_roots): Delete 'x'. - (ggc_splay_dont_free): Fix warning about unused 'x'. - (ggc_print_common_statistics): Remove warnings. - - 2002-10-01 Mike Stump - - * ggc-common.c (ggc_splay_alloc): Actually return the allocated area. - * gengtype.c (write_gc_structure_fields): Handle param[digit]_is. - - 2002-09-01 Geoffrey Keating - Catherine Moore - - * Makefile (c-pch.o): Update dependencies. - (LIBCPP_OBJS): Add cpppch.o. - (cpppch.o): New. - * c-common.c (c_common_init): Don't call pch_init here. - * c-common.h (c_common_read_pch): Update prototype. - * c-lex.c (c_common_parse_file): Call pch_init here. - * c-opts.c (COMMAND_LINE_OPTIONS): Add -Winvalid-pch, -fpch-deps. - (c_common_decode_option): Handle them. - * c-pch.c: Include c-pragma.h. - (save_asm_offset): Delete. - (pch_init): Move contents of save_asm_offset into here, call - cpp_save_state. - (c_common_write_pch): Call cpp_write_pch. - (c_common_valid_pch): Warn only when -Winvalid-pch. Call - cpp_valid_state. - (c_common_read_pch): Add NAME parameter. Call cpp_read_state. - * cppfiles.c (stack_include_file): Update for change to - parameters of cb.read_pch. - * cpphash.h (struct cpp_reader): Add `savedstate' field. - * cpplib.h (struct cpp_options): Add `warn_invalid_pch' and - `restore_pch_deps' fields. - (struct cpp_callbacks): Add NAME parameter to `read_pch'. - (cpp_save_state): Prototype. - (cpp_write_pch): Prototype. - (cpp_valid_state): Prototype. - (cpp_read_state): Prototype. - * cpppch.c: New file. - * flags.h (version_flag): Remove prototype. - * mkdeps.c (deps_save): New. - (deps_restore): New. - * mkdeps.h (deps_save): Prototype. - (deps_restore): Prototype. - * toplev.c (late_init_hook): Delete. - (version_flag): Make static again. - (compile_file): Don't call late_init_hook. - * toplev.h (late_init_hook): Delete. - * doc/cppopts.texi: Document -fpch-deps. - * doc/invoke.texi (Warning Options): Document -Winvalid-pch. - - 2002-08-27 Geoffrey Keating - - * c-pch.c (c_common_write_pch): Rename from c_write_pch, change - callers. - (c_common_valid_pch): Rename from c_valid_pch, change callers. - (c_common_read_pch): Rename from c_read_pch, change callers. - - * c-opts.c (COMMAND_LINE_OPTIONS): Allow -output-pch= to have - a space between it and its argument. - - 2002-08-24 Geoffrey Keating - - * c-pch.c: New file. - * toplev.h (late_init_hook): Declare. - * toplev.c (late_init_hook): Define. - (version_flag): Make globally visible. - (compile_file): Call late_init_hook. - (init_asm_output): Make output file seekable. - * gcc.c (default_compilers): Update c-header rule. - * flags.h (version_flag): Declare. - * cpplib.h (struct cpp_callbacks): Add 'valid_pch' and 'read_pch' - fields. - * cppfiles.c (struct include_file): Add 'pch' field. - (INCLUDE_PCH_P): New. - (open_file_pch): New. - (stack_include_file): Handle PCH files specially. - (find_include_file): Call open_file_pch instead of open_file. - (_cpp_read_file): Explain why open_file is used instead of - open_file_pch. - * c-opts.c (c_common_decode_option): Correct OPT__output_pch case. - * c-objc-common.c (c_objc_common_finish_file): Call c_write_pch. - * c-lex.c (init_c_lex): Set valid_pch and read_pch fields - in cpplib callbacks. - * c-common.c (pch_file): Correct comment. - (allow_pch): Define. - (c_common_init): Call pch_init. - * c-common.h (allow_pch): Declare. - (pch_init): Declare. - (c_valid_pch): Declare. - (c_read_pch): Declare. - (c_write_pch): Declare. - * Makefile.in (c-pch.o): New. - (C_AND_OBJC_OBJS): Add c-pch.o. - * doc/invoke.texi (Precompiled Headers): Add index entries, - complete truncated paragraph. - - 2002-08-17 Geoffrey Keating - - * c-common.c: (pch_file): Define. - * c-common.h (pch_file): Declare. - * c-opts.c (COMMAND_LINE_OPTIONS): Add --output-pch=. - (missing_arg): Require --output-pch= to have an argument. - (c_common_decode_option): Handle --output-pch=. - * gcc.c: Document new %V. - (default_compilers): Handle compiling C header files. - (do_spec_1): Implement %V. - (main): Handle "gcc foo.h" without trying to run linker. - * doc/invoke.texi (Invoking GCC): Add new menu item for PCH. - (Overall Options): Document what the driver does with header files, - document new -x option possibilities. - (Invoking G++): More documentation for PCH. - (Precompiled Headers): New. - - 2002-08-09 Geoffrey Keating - - * ggc.h: Don't include varray.h. Rearrange functions to be more - organized. - (ggc_add_root): Delete. - (ggc_mark_rtx): Delete. - (ggc_mark_tree): Delete. - (struct ggc_statistics): Remove contents. - * ggc-common.c: Remove unneeded includes. - (struct ggc_root): Delete. - (roots): Delete. - (ggc_add_root): Delete. - (ggc_mark_roots): Don't mark `roots'. Call ggc_mark_stringpool. - (ggc_print_common_statistics): Remove most of the contents. - * Makefile.in (GGC_H): No longer uses varray.h. - (ggc-common.o): Update dependencies. - (c-parse.o): Add varray.h to dependencies. - (c-common.o): Add varray.h. - * stringpool.c (mark_ident): Use mangled name for tree marker routine. - (mark_ident_hash): Rename to ggc_mark_stringpool. - (init_stringpool): Don't use ggc_add_root. - * c-parse.in: Include varray.h. - * c-common.c: Include varray.h. - * objc/Make-lang.in (objc-act.o): Add varray.h. - * objc/objc-act.c: Include varray.h. - - 2002-07-25 Geoffrey Keating - - * dwarf2out.c (dw_cfi_oprnd2_desc): Fix ISO-only function definition. - (dw_cfi_oprnd1_desc): Likewise. - - 2002-07-17 Geoffrey Keating - - * config/alpha/alpha.c (struct alpha_links): Use gengtype to mark; - move out of ifdef. - (alpha_links): Use gengtype to mark; move out of ifdef. - (mark_alpha_links_node): Delete. - (mark_alpha_links): Delete. - (alpha_need_linkage): Use GGC to allocate splay tree, struct - alpha_links, strings. Don't use ggc_add_root. - * ggc-common.c (ggc_splay_alloc): New. - (ggc_splay_dont_free): New. - * ggc.h (ggc_mark_rtx): Update for changed name mangling. - (ggc_mark_tree): Likewise. - (splay_tree_new_ggc): New. - (ggc_splay_alloc): Declare. - (ggc_splay_dont_free): Declare. - * dwarf2asm.c: Include gt-dwarf2asm.h. - (mark_indirect_pool_entry): Delete. - (mark_indirect_pool): Delete. - (indirect_pool): Use gengtype to mark. - (dw2_force_const_mem): Don't use ggc_add_root. - * Makefile.in (dwarf2asm.o): Depend on gt-dwarf2asm.h. - (GTFILES): Add SPLAY_TREE_H, dwarf2asm.c. - (gt-dwarf2asm.h): Depend on s-gtype. - - 2002-07-08 Geoffrey Keating - - * tree.h (union tree_type_symtab): Mark `die' field. - * Makefile.in (dwarf2out.o): Update dependencies. - * dwarf2out.c: Use GGC to allocate all structures. Convert to htab_t - hash tables. - (dw_cfi_oprnd1_desc): New function. - (dw_cfi_oprnd2_desc): New function. - (indirect_string_alloc): Delete. - (debug_str_do_hash): New function. - (debug_str_eq): New function. - (mark_limbo_die_list): Delete. - (dwarf2out_init): Don't call ggc_add_root. - -2003-01-09 Vladimir Makarov - - The following changes are merged from itanium-sched-branch: - - 2003-01-08 David Edelsohn - - * doc/md.texi: Clarify assignment of units to automata description. - - 2003-01-08 Vladimir Makarov - - * genautomata.c (unit_decl): Remove members - `the_same_automaton_unit' and - `the_same_automaton_message_reported_p'. - (process_unit_to_form_the_same_automaton_unit_lists, - form_the_same_automaton_unit_lists_from_regexp, - form_the_same_automaton_unit_lists, the_same_automaton_lists): - Remove them. - (annotation_message_reported_p): New global variable. - (check_unit_distribution_in_reserv, - check_regexp_units_distribution): New functions. - (check_unit_distributions_to_automata): Rewrite it. - - 2003-01-04 Vladimir Makarov - - * genautomata.c (form_the_same_automaton_unit_lists_from_regexp): - Use continue instead of break if cycle is too big. - - 2002-12-20 Vladimir Makarov - - * genautomata.c (check_unit_distributions_to_automata): Output at - most one message for a unit. - (process_unit_to_form_the_same_automaton_unit_lists): Check - automaton of units instead of units themself. - - * doc/md.texi: Describe the constraint about assigning unit to - automata. - - 2002-12-20 Jan Hubicka - Vladimir Makarov - - * genautomata.c (unit_decl): Add new members `min_occ_cycle_num' - and `in_set_p'. - (gen_cpu_unit): Initialize the new members. - (process_regexp_cycles): Calculate minimal finish cycle too. Set - up `min_occ_cycle_num'. - (evaluate_max_reserv_cycles): Change the function call. - (CLEAR_BIT): New macro. - (states_union, state_shift): Use the mask. - (initiate_excl_sets, form_reserv_sets_list): Set up `in_set_p'. - (form_reservs_matter): New function. - (make_automaton): Call the function and use the mask. - (estimate_one_automaton_bound): Take `min_occ_cycle_num' into - account. - - 2002-12-17 Vladimir Makarov - - * config/ia64/itanium2.md (lfetch): Change the insn reservation. - - 2002-12-17 Vladimir Makarov - - * config/ia64/ia64.c (bundling): Try to insert 2 nops for M insn - for Itanium. - - 2002-12-17 Vladimir Makarov - - * config/ia64/ia64.c (ia64_override_options): Make itanium2 as - default cpu. - - 2002-12-17 Vladimir Makarov - 2002-10-31 Dale Johannesen - - * haifa-sched.c (find_set_reg_weight): New function. - (find_insn_reg_weight): Use the new function. - (schedule_block): Do sorting ready queue always - after insn issue. - - 2002-11-27 Vladimir Makarov - - * config/ia64/ia64.c (bundling): Use MFI template instead of MLX. - - 2002-11-19 Vladimir Makarov - - * haifa-sched.c (choice_entry): New structure. - (choice_stack, cycle_issued_insns): New variables. - (max_issue): Rewrite it. - (choose_ready): Set up ready_try for unknown insns too. - (schedule_block): Allocate and free choice_stack. Set up - and modify cycle_issued_insns. - - * config/ia64/ia64.c (issue_nops_and_insn): Combine insn issue - with and without filling the bundle. - (bundling): Combine calls of issue_nops_and_insn. - - 2002-10-17 Vladimir Makarov - - * config/ia64/itanium1.md: New file. - - * config/ia64/itanium2.md: New file. - - * config/ia64/ia64.md: Move DFA descriptions into the new files. - Remove the old pipeline description. - - * config/ia64/ia64.c (ia64_override_options): Add aliases of - itanium processor names. - - 2002-10-16 Vladimir Makarov - - * config/ia64/ia64.c (bundling): Print states for Itanium2 too. - (ia64_reorg): Set up queried unit codes for Itanium2 too. - - * config/ia64/ia64.md: Add descriptions for Itanium2. - - 2002-10-08 Vladimir Makarov - - * config/ia64/ia64.h (processor_type): New enumeration. - (ia64_tune, ia64_tune_string): New external declarations. - (TARGET_OPTIONS): Add option `tune='. - - * config/ia64/ia64.c (ia64_tune, ia64_tune_string): New global - variables. - (ia64_override_options): Set up `ia64_tune'. - (ia64_sched_reorder2): Set up `clocks' only for Itanium. - (ia64_dfa_new_cycle): Set up `add_cycles' only for Itanium. - (bundling): Add nops for MM-insns only for Itanium. - (ia64_reorg): Allocate and free `clocks' and `add_cycles' only for - Itanium. - - * config/ia64/ia64.md (cpu): New attribute. - (DFA description): Enable it only for Itanium. - - 2002-10-08 Vladimir Makarov - Richard Henderson - - * config/ia64/ia64.h (MASK_TUNE_STOP_BITS): Rename it to - MASK_EARLY_STOP_BITS. - (TARGET_TUNE_STOP_BITS): Rename it to TARGET_EARLY_STOP_BITS. - (TARGET_SWITCHES): Rename option `tune-stop-bits' to - `early-stop-bits'. - - * config/ia64/ia64.c (ia64_dfa_new_cycle, - final_emit_insn_group_barriers): Use TARGET_EARLY_STOP_BITS - instead of TARGET_TUNE_STOP_BITS. - - * doc/invoke.texi: Rename option `-mtune-stop-bits' to - `-mearly-stop-bits'. - - * config/ia64/ia64.c (automata_option "v"): Comment it. - - 2002-10-07 Vladimir Makarov - - * config/ia64/ia64.h (MASK_TUNE_STOP_BITS, TARGET_TUNE_STOP_BITS): - New macros. - (TARGET_SWITCHES): Add entries for the new option. - - * config/ia64/ia64.c (dfa_stop_insn, last_scheduled_insn, rtx - dfa_pre_cycle_insn, ia64_nop): Don't make them as roots for GC. - (stops_p, stop_before_p, clocks_length, clocks, add_cycles): New - global variables. - (ia64_sched_reorder2): Set up `clocks'. - (ia64_variable_issue): Set up `stops_p' and reset `stop_before_p'. - (ia64_dfa_new_cycle): Set up add_cycle. Permit sorting ready - queue when TARGET_TUNE_STOP_BITS. - (bundling): Insert additional nops for MM-insns. - (final_emit_insn_group_barriers): Add insertion of stop bits - according `stops_p'. - (ia64_reorg): Initiate the new varibales. - - * doc/invoke.texi: Add description of option `-mtune-stop-bits'. - - 2002-10-02 Vladimir Makarov - - * haifa-sched.c (schedule_block): Modify INSN_TICK of depended - insns at the end of block insn scheduling. - - 2002-09-30 Vladimir Makarov - - * sched-deps.c (remove_dependence, group_leader): Remove it. - (add_dependence): Add dependence to group leader to. - (set_sched_group_p): Add dependence to the first insn of the - schedule group too. - (sched_analyze_insn): Make dependence to jump as anti-dependence. - Change true dependence by anti-dependence when - `reg_pending_barrier'. - - * sched-rgn.c (init_ready_list, can_schedule_ready_p, - add_branch_dependences): Ignore schedule groups. - - * sched-ebb.c (init_ready_list): Ditto. - - * (move_insn, set_priorities): Ditto. - - * config/ia64/ia64.c (ia64_sched_init): Check that schedule group - flag is clear after reload. - (adjust_cost): Change cost only for output dependencies. - - * config/ia64/ia64.md: Add more insns into bypass for MM-insns. - - 2002-09-26 Vladimir Makarov - - * Makefile.in (sched-ebb.o): Add `$(TARGET_H)' to the entry. - - * target.h (gcc_target): Add member - `dependencies_evaluation_hook'. - - * target-def.h (TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK): New - macro. - (TARGET_SCHED): Add initiatialization of the new member. - - * sched-ebb.c: Include `target.h'. - (schedule_ebb): Call `dependencies_evaluation_hook'. - - * sched-rgn.c (schedule_region): Call - `dependencies_evaluation_hook'. - - * config/ia64/ia64.c (TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK): - New macro. - (ia64_dependencies_evaluation_hook): New function. - - * doc/tm.texi (TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK): - Describe the new hook. - - 2002-09-25 Vladimir Makarov - - * target.h (gcc_target): Add members - `first_cycle_multipass_dfa_lookahead_guard' and `dfa_new_cycle'. - - * target-def.h (TARGET_SCHED_DFA_NEW_CYCLE, - TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD): New - macros. - (TARGET_SCHED): Add initiatialization of the new members. - - * haifa-sched.c (schedule_insn): Update last_clock_var for the 1st - insn scheduling too. - (choose_ready): Use `first_cycle_multipass_dfa_lookahead_guard' to - initialize `ready_try'. - (schedule_block): Use `dfa_new_cycle'. Sort `ready' only unless - `dfa_new_cycle' says not to do it. - - * config/ia64/ia64.md: Add DFA Itanium 1 description for insn - bundling. - - * config/ia64/ia64.h (CPU_UNITS_QUERY): New macro. - - * config/ia64/ia64.c: Include `hashtab.h'. - (ia64_first_cycle_multipass_dfa_lookahead_guard, - ia64_dfa_new_cycle, final_emit_insn_group_barriers, - ia64_dfa_sched_reorder, get_free_bundle_state, free_bundle_state, - initiate_bundle_states, finish_bundle_states, bundle_state_hash, - bundle_state_eq_p, insert_bundle_state, - initiate_bundle_state_table, finish_bundle_state_table, - try_issue_nops, try_issue_insn, issue_nops_and_insn, get_max_pos, - get_template, get_next_important_insn, bundling): New functions. - (ia64_internal_sched_reorder): Remove it. - (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD, - TARGET_SCHED_DFA_NEW_CYCLE): New macros. - (ia64_safe_itanium_requires_unit0): Remove it. - (group_barrier_needed_p): Place group barrier right before a real - insn. - (bundle, ia64_packet, NR_PACKETS, type_names, packets, packets): - Remove them. - (bundle_name): New variable. - (_0mii_, _0mmi_, _0mfi_, _0mmf_, _0bbb_, _0mbb_, _0mib_, _0mmb_, - _0mfb_, _0mlx_, _1mii_, _1mmi_, _1mfi_, _1mmf_, _1bbb_, _1mbb_, - _1mib_, _1mmb_, _1mfb_, _1mlx_, pos_1, pos_2, pos_3, pos_4, pos_5, - pos_6, dfa_stop_insn, last_scheduled_insn, dfa_state_size, - temp_dfa_state, prev_cycle_state): New global variables. - (insn_matches_slot, maybe_rotate, finish_last_head, - rotate_one_bundle, rotate_one_bundles, nop_cycles_until, - cycle_end_fill_slots, packet_matches_p, get_split, find_best_insn, - find_best_packet, itanium_reorder, dump_current_packet, - schedule_stop, gen_nop_type, ia64_emit_nops): Remove them. - (sched_data, sched_ready, sched_types): Remove them. - (ia64_sched_init): Initiate only `last_scheduled_insn' and call - `init_insn_group_barriers'. - (ia64_sched_reorder, ia64_sched_reorder2): Call - ia64_dfa_sched_reorder. - (ia64_variable_issue): Rewrite it. - (bundle_state): New structure. - (index_to_bundle_states, bundle_states_num, - allocated_bundle_states_chain, free_bundle_state_chain): New - global variables. - (ia64_sched_finish): Add stop bits and call `bundling' after the - 2nd insn scheduling. - (ia64_use_dfa_pipeline_interface): Return zero always. - (ia64_first_cycle_multipass_dfa_lookahead): Return 6 for the 2nd - insn scheduling. - (ia64_init_dfa_pre_cycle_insn): Initialize `dfa_state_size', - `temp_dfa_state', `prev_cycle_state', and `dfa_stop_insn'. - (ia64_reorg): Add bundling insns. - - * doc/tm.texi - (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD, - TARGET_SCHED_DFA_NEW_CYCLE): Describe the new hooks. - - 2002-09-23 Vladimir Makarov - - * config/ia64/ia64.md: Add Itanium1 DFA description. - (itanium_class): Add `nop' and `pre_cycle'. Add - define_function_unit for `nop'. - (nop): Change attribute `itanium_class'. - (pre_cycle): New define_insn. - - * config/ia64/ia64-protos.h (bundling_p): New external variable. - (ia64_st_address_bypass_p, ia64_ld_address_bypass_p, - ia64_produce_address_p): New function prototypes. - - * config/ia64/ia64.c (bundling_p): New global variable. - (ia64_use_dfa_pipeline_interface, - ia64_first_cycle_multipass_dfa_lookahead, - ia64_init_dfa_pre_cycle_insn, ia64_dfa_pre_cycle_insn): New - functions. - (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE, - TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, - TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN, - TARGET_SCHED_DFA_PRE_CYCLE_INSN): New macros. - (ia64_sched_init, ia64_sched_reorder, ia64_sched_reorder2, - ia64_variable_issue, ia64_sched_finish): Do nothing before reload. - (dfa_pre_cycle_insn): New variable. - - 2002-09-20 Vladimir Makarov - - * rtl.def (FINAL_PRESENCE_SET, FINAL_ABSENCE_SET): New - constructions. - - * genattrtab.h (gen_final_presence_set, gen_final_absence_set): - New function prototypes. - - * genattrtab.c (main): Process the new constructions. - - * genautomata.c (gen_presence_absence_set, - process_presence_absence_names, process_presence_absence_patterns, - add_presence_absence, check_absence_pattern_sets): Add parameter - `final_p'. - (unit_decl): Add new members `final_presence_list' and - `final_absence_list'. - (unit_pattern_rel_decl): Add new member `final_p'. - (gen_final_presence_set, gen_final_absence_set): New functions. - (process_decls): Use member `final_p'. - (temp_reserv): New global variable. - (reserv_sets_are_intersected): Add processing `final_presence_set' - and `final_absence_set'. - (initiate_states): Allocate `temp_reserv'. - (unit_final_presence_set_table, unit_final_absence_set_table): New - gloabal variables. - (initiate_presence_absence_pattern_sets): Initiate them. - (NDFA_to_DFA): Fix typo. - (output_description): Output `final_presence_set' and - `final_absence_set'. - - * doc/md.texi (final_presence_set, final_absence_set): Describe - them. - - 2002-09-20 Vladimir Makarov - - * genautomata.c (transform_3): Process a missing case (nothing on - unit place). - - 2002-09-20 Vladimir Makarov - - * rtl.def (DEFINE_QUERY_CPU_UNIT, AUTOMATA_OPTION): Change - comments about queried units and the minimization. - - * doc/md.texi: Ditto. - - * genautomata.c (create_composed_state): Return nonzero if the new - state has been created. - (first_cycle_unit_presence): New function. - (state_is_differed): Add new parameter. Use the new function. - Take queried units into account. - (partition_equiv_class): Pass additional parameter to - `state_is_differed'. - (merge_states): Process composed states too. - (build_automaton, create_automata, output_min_issue_delay_table, - output_tables, output_statistics): Output more information. - (output_reserved_units_table): Use function - `first_cycle_unit_presence'. - (output_tables): Output table of queried units even if the - minimization is switched on. - (write_automata): Output code for querying units even if the - minimization is switched on. - - 2002-09-19 Vladimir Makarov - - * rtl.def (PRESENCE_SET, ABSENCE_SET): Add comments about extended - syntax of the constructions. - - * doc/md.texi (PRESENCE_SET, ABSENCE_SET): Add description of - extended syntax of the constructions. - - * genautomata.c (unit_rel_decl): Rename it to - `unit_pattern_rel_decl'. - (pattern_set_el, pattern_reserv): New structures. - (pattern_set_el_t, pattern_reserv_t): New types. - (gen_presence_absence_set): New function. - (process_presence_absence): Remove it. - (process_presence_absence_names, - process_presence_absence_patterns): New functions. - (get_presence_absence_set): Remove it. - (initiate_presence_absence_sets): Rename it on - `initiate_presence_absence_pattern_sets'. Use new function - `form_reserv_sets_list'. - (form_reserv_sets_list, check_presence_pattern_sets, - check_absence_pattern_sets, output_pattern_set_el_list): New - functions. - (unit_decl): Change types of members `presence_list' and - `absence_list'. - (unit_rel_decl): Rename member `names_num' to `all_names_num'. - (decl): Change types of members `excl', `presence', and `absence'. - (get_str_vect): Rename `par_flag' to `paren_p'. Add null element - at the end of the vector. - (gen_cpu_unit, gen_query_cpu_unit, gen_bypass, gen_excl_set, - gen_automaton, gen_regexp_repeat, gen_regexp_allof, - gen_regexp_oneof, gen_regexp_sequence): Use boolean values. - (gen_presence_set, gen_absence_set): Use new function - `gen_presence_absence_set'. - (add_presence_absence): Process `pattern_list' instead of - `source_list'. - (process_decls): USe new functions - `process_presence_absence_names' and - `process_presence_absence_patterns'. - (reserv_sets_are_intersected): Use new function - `check_presence_pattern_sets'. - (presence_set, absence_set): Remove them. - (unit_presence_set_table, unit_absence_set_table): New global - variables. - (output_description): Use new function - `output_pattern_set_el_list'. - (generate): Use `initiate_presence_absence_pattern_sets'. - - 2002-09-18 Vladimir Makarov - - * genattr.c (main): Add output of prototype of new interface - function `dfa_clean_insn_cache'. - - * genautomata.c (output_dfa_clean_insn_cache_func): New function. - (DFA_CLEAN_INSN_CACHE_FUNC_NAME): New macro. - (output_dfa_start_func): Use function `dfa_clean_insn_cache' in - the generated code. - (write_automata): Call the new function. - -2003-01-09 Jan Hubicka - - * i386.md (unit, prefix_0f, memory attributes): Hanlde sseicvt - correctly. - -2003-01-09 Paolo Carlini - - * doc/tm.texi (EXTRA_ADDRESS_CONSTRAINT): Fix typo. - -2003-01-09 J"orn Rennecke - - * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. - (EXTRA_ADDRESS_CONSTRAINT): Likewise. - (CONSTRAINT_LEN): Provide default definition. - (CONST_OK_FOR_CONSTRAINT_P): Likewise. - (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. - (EXTRA_CONSTRAINT_STR): Likewise. - (REG_CLASS_FROM_CONSTRAINT): Define. - * genoutput.c (check_constraint_len, constraint_len): New functions. - (validate_insn_alternatives): Check CONSTRAINT_LEN for each - constraint / modifier. - (gen_insn): Call check_constraint_len. - * local-alloc.c (block_alloc): Update to use new macros / pass - second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. - * ra-build.c (handle_asm_insn): Likewise. - * recog.c (asm_operand_ok, preprocess_constraints): Likewise. - (constrain_operands, peep2_find_free_register): Likewise. - * regclass.c (record_operand_costs, record_reg_classes): Likewise. - * regmove.c (find_matches): Likewise. - * reload.c (push_secondary_reload, find_reloads): Likewise. - (alternative_allows_memconst): Likewise. - * reload1.c (maybe_fix_stack_asms): Likewise. - (reload_cse_simplify_operands): Likewise. - * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. - * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. - (CONST_OK_FOR_CONSTRAINT_P): Likewise. - (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. - (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. - * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. - - * sh.h (OVERRIDE_OPTIONS): Allow first scheduling pass for SH5. - -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 Kazu Hirata - - * config/h8300/h8300.h (PREDICATE_CODES): New. - -2003-01-09 Kazu Hirata - - * config/h8300/h8300.md (*addsi3_upper): New. - (*iorsi3_shift): Likewise. - (two splitters): Likewise. - (*addsi3_shift): Likewise. - (two splitters): 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 Eric Botcazou - - PR inline-asm/8832 - * tree.h (expand_asm): New prototype. - * stmt.c (expand_asm): Set the MEM_VOLATILE_P flag if instructed - to do so. - * c-semantics (genrtl_asm_stmt): Pass the RID_VOLATILE qualifier - down to expand_asm. - * c-typeck.c (simple_asm_stmt): Set the RID_VOLATILE qualifier. - * rtlanal.c (volatile_insn_p) [ASM_INPUT]: Test the MEM_VOLATILE_P flag. - (volatile_refs_p) [ASM_INPUT]: Likewise. - (side_effects_p) [ASM_INPUT]: Likewise. - -2003-01-09 Jan Hubicka - - * i386.md (*mul*): FIx constraints; remove confused comment; fix - athlon_decode attributes - (imul/k8 optimization peep2s): New. - - * athlon.md (athlon_ssecmp*): Handle ssecomi as well. - * i386.md (type attribute): Add ssecomi. - (unit, memory, prefix attributes): Handle ssecomi. - (cvt?2? patterns): Fix athlon_decode attribute - (comi patterns): Set attribute to ssecomi. - - PR target/8343 - * m68k.md (umulsidi, mulsidi expanders): Use register operand. - -2003-01-09 Richard Sandiford - - * config/mips/mips.h (PREDICATE_CODES): Add ADDRESSOF for predicates - that match register_operands. - * config/mips/mips.c (reg_or_0_operand, true_reg_or_0_operand): Make - register_operand the default case. - -2003-01-09 Eric Botcazou - - PR c/8032 - * c-typeck.c (process_init_element) [RECORD_TYPE]: For - an empty element, do not advance the pointer to unfilled - fields if there are pending initializers. - -2003-01-09 Christian Cornelssen - - * Makefile.in (ORDINARY_FLAGS_TO_PASS): Also pass DESTDIR. - (install-gcc-tooldir, install-cpp, installdirs, - install-common, install-driver, install-info, install-man, - install-headers, install-include-dir, install-headers-tar, - install-headers-cpio, install-headers-cp, install-mkheaders, - install-collect2, uninstall): Prepend $(DESTDIR) to - destination paths in all (un)installation commands. - (install-driver): Rewrite $(LN) commands to support DESTDIR - with "ln" as well as with "ln -s". - (installdirs): Simply use mkinstalldirs. - (install-libgcc, install-multilib): Also pass DESTDIR. - * mklibgcc.in: Prepend $(DESTDIR) to $(libsubdir) in the - installation destination variable ldir. - * config/alpha/t-osf4, config/arm/t-netbsd, - config/ia64/t-hpux, config/mips/t-iris5-6, - config/pa/t-hpux-shlib, config/rs6000/t-aix43, - config/rs6000/t-aix52, config/t-slibgcc-elf-ver, - config/t-slibgcc-sld: Prepend $$(DESTDIR) to $$(slibdir) - in the definition of SHLIB_INSTALL. - * config/arc/t-arc (install-multilib-arc): Prepend $(DESTDIR) to - $(libsubdir) in the installation commands. - -2003-01-08 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-08 Douglas B Rupp - - * config/i386/i386.c (ix86_attribute_table): Add new attributes - ms_struct and gcc_struct. - (ix86_handle_struct_attribute): New function. - (ix86_ms_bitfield_layout_p): Update to take new attributes - into account. - * doc/extend.texi: Document new attributes. - * testsuite/gcc.dg/bf-ms-attrib.c: New test. - -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 Dale Johannesen - - * config/rs6000/rs6000.md: Replace *store_multiple_string - with *stmsi[3-8]. - -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 Dale Johannesen - - * function.c (assign_parms): Don't set pretend_args_size if - REG_PARM_STACK_SPACE. - config/rs6000/rs6000.c (setup_incoming_varargs): Don't set - pretend_args_size. - -2003-01-08 Nathanael Nerode - - * gcc.hlp: Delete. - -2003-01-09 Jan Hubicka - - * i386.c (ix86_expand_int_addcc): Fix thinko. - -2003-01-08 David Edelsohn - - * config/rs6000/rs6000.h (FUNCTION_MODE): Always use SImode. - * config/rs6000/rs6000.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Redefine - as hook_bool_tree_hwi_hwi_tree_true. - (rs6000_emit_allocate_stack): Use TARGET_32BIT. - (rs6000_emit_epilogue): Same. - (rs6000_output_mi_thunk): Re-implement as RTL. - * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Call - xcoffout_declare_function if any debugging enabled. - -2003-01-08 Chris Demetriou - - * config.gcc (mipsisa32r2-*-elf*, mipsisa32r2el-*-elf*): New - targets, to support MIPS32 Release 2 (MIPS32R2) configurations. - * config/mips/mips.h (enum processor_type): Rename - PROCESSOR_R4KC to PROCESSOR_4KC, PROCESSOR_R5KC to - PROCESSOR_5KC, and PROCESSOR_R20KC to PROCESSOR_20KC. - Add PROCESSOR_M4K. - (TARGET_MIPS4KC, TARGET_MIPS5KC): Update for the renaming. - (ISA_MIPS32R2): New define. - (GENERATE_MULT3_SI, ISA_HAS_CONDMOVE, ISA_HAS_8CC) - (ISA_HAS_MADD_MSUB, ISA_HAS_CLZ_CLO) - (ISA_HAS_PREFETCH): Add support for MIPS32R2. - (MIPS_ISA_DEFAULT): Likewise. Also, fix indentation. - (TARGET_CPU_CPP_BUILTINS): Add support for MIPS32R2. Add new - predefine __mips_isa_rev for MIPS32, MIPS32R2, and MIPS64. - (ISA_HAS_ROTR_SI): Add support for MIPS32R2, and avoid if - compiling MIPS16 code. - (ISA_HAS_ROTR_DI): Do not use if compiling MIPS16 code, and fix - comment. - (ISA_HAS_SEB_SEH): New define. - (ASM_SPEC, LINK_SPEC): Pass -mips32r2 to assembler and linker. - * config/mips/mips.c (mips_cpu_info_table): Adjust for enum - processor_type value renaming. Add support for MIPS32R2. - Clean up comments, and move "sb1" entry with other MIPS64 CPU - entries. - (override_options): Reimplement -mipsN option handling so that - it will work correctly for -mips32r2. Avoid branch-likely - instructions on MIPS32R2. - * config/mips/mips.md (mulsi3_mult3): Add support for MIPS32R2. - (extendhisi2): Use extendhisi2_hw if ISA_HAS_SEB_SEH. - (extendqisi2): Use extendqisi2_hw if ISA_HAS_SEB_SEH. - (extendhisi2_hw, extendqisi2_hw): New. - * config/mips/netbsd.h (TARGET_CPU_CPP_BUILTINS): Add support - for MIPS32R2. Add new predefine __mips_isa_rev for MIPS32, - MIPS32R2, and MIPS64. - (LINK_SPEC): Pass -mips32r2 to linker. - * config/mips/t-isa3264: Built -mips32r2 multilibs. - * doc/invoke.texi (MIPS Options): Add -mips32r2, add support - for mips32r2 in the -march description. Alphabetically sort - CPU names in the -march description. Add long-missed -mips32 - and -mips64 to MIPS option summary. - - * config.gcc: Update copyright years to include 2003. - * config/mips/mips.c: Likewise. - * config/mips/mips.h: Likewise. - * config/mips/mips.md: Likewise. - * config/mips/netbsd.h: Likewise. - * doc/invoke.texi: Likewise. - -2003-01-08 Andreas Schwab - - * aclocal.m4 (gcc_AC_INITFINI_ARRAY): Fix spelling of cache - variable. - * configure: Regenerated. - -2003-01-08 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Replace byte/word - extraction of det with b0, b1, w0, w2, etc. - (compute_logical_op_length): Likewise. - (compute_logical_op_cc): Likewise. - -2003-01-08 Kazu Hirata - - * config/h8300/h8300.h (CONSTANT_ADDRESS_P): Allow CONST and - HIGH on all variants. - -2003-01-08 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-08 Richard Earnshaw - - * arm.h (ENABLE_XF_PATTERNS): Delete. - * arm.md (addxf3, subxf3, mulxf3, divxf3, modxf3, negxf2, absxf2) - (sqrtxf2, floatsixf2, fix_truncxfsi2, truncxfsf2, truncxfdf2) - (extendsfxf2, extenddfxf2, movxf, cmpxf, cmpxf_insn) - (cmpxf_trap): Delete. - (movxf_hard_insn): Remove test of ENABLE_XF_PATTERNS. - -2003-01-08 Jan Hubicka - - * i386.md (adddi3_carry_rex64, subdi3_carry_rex64): Name pattern. - (addhi3_carry, addqi3_carry, subhi3_carry, subqi3_carry): New patterns. - (add??cc): New expanders. - * i386.c (expand_int_addcc): New function. - * i386-protos.h (expand_int_addcc): Declare. - - * alias.c (memory_modified_1): New static function. - (memory_modified): New static varaible. - (memory_modified_in_insn_p): New global function. - * rtl.h (memory_modified_in_insn_p): Declare. - * rtlanal.c (modified_between_p, modified_in_p): Be smart about memory - references. - - * expr.h (emit_conditional_add): Declare. - -2003-01-07 Janis Johnson - - PR other/8947 - * doc/invoke.texi (-malign-double): Explain that the option breaks - binary compatibility. - -2003-01-08 Andreas Schwab - - * config.gcc (m68k-*-linux*): Don't set extra_parts and gnu_ld, - should come from the generic *-*-linux* entry. - -2003-01-07 Jan Hubicka - - * 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 David Edelsohn - - * doc/tm.texi (TARGET_SCHED_VARIABLE_ISSUE): CLOBBER and USE do - not normally affect to issue rate. - -2003-01-07 Jan Hubicka - - * genopinit.c (optabs): Add addc_optab. - * ifcvt.c (noce_try_store_flag): Rename to ... - (noce_try_addcc): ... this one; handle generic conditional increment. - (noce_process_if_block): Update noce_try_addcc call. - * optabs.c (emit_conditional_add): New. - (init_obtabs): Initialize addc_optab. - * optabs.h (optab_index): Add OTI_addcc. - (addcc_optab): New macro. - * md.texi: Document addMcc - - PR target/8322 - * i386.c (ix86_init_mmx_sse_builtins): Constify arguments of loads. - * xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts. - * xmmintrin.h (_mm_load*_si128. _mm_store*_si128): Add casts. - - * reload1.c (delete_output_reload): Avoid repeated attempts - to delete insn. - -2003-01-07 Andreas Schwab - - * configure.in: Restore CFLAGS before gcc_AC_INITFINI_ARRAY. - Move --enable-initfini-array check ... - * aclocal.m4 (gcc_AC_INITFINI_ARRAY): ... here. Define - HAVE_INITFINI_ARRAY also when --enable-initfini-array is given. - Don't AC_SUBST gcc_cv_initfinit_array. Use AC_TRY_RUN. - * configure: Rebuild. - -2003-01-07 Richard Henderson - - * alias.c (find_base_value): Only use new_reg_base_value shortcut - if the register is set once. - -2003-01-07 Sylvain Pion - - * config/i386/i386.c (ix86_init_mmx_sse_builtins): - __builtin_ia32_ldmxcsr and __builtin_ia32_stmxcsr are SSE, not MXX. - * config/i386/i386.md (ldmxcsr, stmxcsr): SSE, not MMX. - -2003-01-07 Benjamin Kosnik - Sunil Davasam - - PR libstdc++/9076 - * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, - DW_CFA_same_value, read next and ignore. - -2003-01-07 Richard Henderson - - * cfganal.c (flow_call_edges_add): Don't crash on noreturn call. - -2003-01-07 Daniel Berlin - - * cfg.c: Include alloc-pool.h - (edge_pool): New pool. - (bb_pool): New pool. - (first_deleted_edge): Remove. - (first_deleted_block): Remove. - (init_flow): Alloc/free the pools. - (free_edge): Use pools. - (alloc_block): Ditto. - (expunge_block): Ditto. - (cached_make_edge): Ditto. - - * Makefile.in (cfg.o): Add alloc-pool.h dependency. - -2003-01-07 Daniel Berlin - - * et-forest.c: Include alloc-pool.h. - (struct et_forest): Add node_pool and occur_pool. - (et_forest_create): Create the new pools. - (et_forest_delete): Delete them. - (et_forest_add_node): Allocate and free using pools. - (et_forest_add_edge): Ditto. - (et_forest_remove_node): Ditto. - (et_forest_remove_edge): Ditto. - - * Makefile.in (et-forest.o): Add alloc-pool.h dependency. - -2003-01-07 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Simplify and - optimize the handling of SImode. - * config/h8300/h8300.c (compute_logical_op_length): Update - accordingly. - * config/h8300/h8300.c (compute_logical_op_cc): Likewise. - -2003-01-07 Richard Sandiford - - * config/mips/mips.c (mips_va_arg): In the EABI code, apply the - big-endian correction to indirect arguments too. - -2003-01-06 Aldy Hernandez - - Segher Boessenkool - - * config/rs6000/rs6000.c (rs6000_reg_names): Add missing registers. - (alt_reg_names): Ditto, fix formatting. - * config/rs6000/rs6000.h (DEBUG_REGISTER_NAMES): Fix formatting. - -2003-01-06 Kazu Hirata - - * config/h8300/h8300.c (final_prescan_insn): Constify uid. - (output_logical_op): Constify intval and det. - (compute_logical_length): Likewise. - (compute_logical_cc): Likewise. - (output_a_shift): Constify mask. - (h8300_encode_label): Constify len. - -2003-01-06 Kazu Hirata - - * config/h8300/h8300.c (h8300_expand_prologue): Remove fsize. - (h8300_expand_epilogue): Likewise. - -2003-01-06 Aldy Hernandez - - Segher Boessenkool - - * config/rs6000/altivec.md: Remove spaces from assembler - instruction argument lists. - -2003-01-07 Michael Hayes - - * config/c4x/c4x.c (c4x_naked_function_p): Rename from - c4x_assembler_function_p. - (c4x_null_epilogue_p): Complement return value, all uses updated. - (c4x_insert_attributes): Add naked. - * config/c4x/c4x.md (c4x_null_epilogue_p): Changes uses. - * doc/extend.texi: Update C4x function attributes. - -2003-01-06 Richard Henderson - - * config/alpha/alpha.c (alpha_encode_section_info): Adjust symbol_str - properly when changing "local-ness". - * config/alpha/alpha.md (movdi_er_high_g): Allow all symbols. - -2003-01-06 Dale Johannesen - - * config/darwin-protos.h: Add prototypes for new section functions. - -2003-01-06 Chris Demetriou - - * config.gcc (mipsisa32-*-elf*, mipsisa32el-*-elf*): Default ABI - to EABI. - -2003-01-06 Zack Weinberg - - * hwint.h: If the current compiler has no 64-bit type at all, - make HOST_WIDEST_INT 32 bits. - -2003-01-06 Eric Christopher - - * config/mips/mips.md (movdf_internal2): Fix constraints. - -2003-01-06 Kazu Hirata - - * config/h8300/h8300.md (*twoshifts_l16_r1): New. - -2003-01-06 Richard Sandiford - - * config/mips/mips.md (leadi): Use dla rather than la. - -2003-01-06 Svein E. Seldal - - * config/c4x/c4x.h: Updated specs for new gas format. Fixed bug - in C33_FLAG. Added proper C33 support in ASM_FILE_START macro. - -2003-01-06 Herman A.J. ten Brugge - - * config/c4x/c4x.h: Remove hwint.h include and HOST_WIDE_INT_PRINT_HEX - redefinition. - -2003-01-05 Kazu Hirata - - * config/h8300/h8300.md (*extzv_8_23): New. - -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-05 Kazu Hirata - - * config/h8300/h8300.c (output_a_shift): Do not output a - variable shift. - * config/h8300/h8300.md (two splitters): New. - -2003-01-05 Richard Sandiford - - * config/mips/mips.md: Disable the movstrsi define_split. - -2003-01-05 Kaveh R. Ghazi - - * alloc-pool.c: Don't include "libiberty.h". - * config/sparc/gmon-sol2.c: Include . - * convert.c (convert_to_real): Hide unused variable. - -2003-01-04 Kaveh R. Ghazi - - * Makefile.in (gtyp-gen.h): Const-ify. - * gcov-dump.c (tag_table): Likewise. - -2003-01-04 Bruce Korb - - * fixinc/fixfixes.c(wrap_fix): the wrapper guard must be a function - of *both* the file name and the fix name. - -2003-01-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. - -2002-12-31 Larin Hennessy - - * fixinc/fixinc.svr4: Remove references to i860, Sony NewsOS, and spur. - * fixinc/inclhack.def: Remove tests for Apple A/UX, ARM/RISCiX, DG/UX, - m88k-*-sysv3*, Sony NewsOS. Remove references to i860. - Cleanup handling of replacement text. - * fixinc/mkfixinc.sh: Remove reference to i?86-*-osf1* - -2003-01-04 Bruce Korb - - * fixinc/tests/base/math.h: removed obsolete results - * fixinc/tests/base/stdlib.h: ditto - * fixinc/tests/base/sys/param.h: ditto - * fixinc/tests/base/sys/stat.h: ditto - * fixinc/tests/base/time.h: ditto - * fixinc/tests/base/X11/Intrinsic.h: removed obsolete file - * fixinc/tests/base/sys/byteorder.h: ditto - * fixinc/inclhack.def: Remove superfluous backslashes - -2003-01-04 Kazu Hirata - - * config/h8300/h8300-protos.h: Add prototypes for - the new functions defined below. - * config/h8300/h8300.c (TARGET_ASM_FUNCTION_PROLOGUE): Do not - define. - (dosize): Emit RTL instead of assembly code. - (push): Likewise. - (pop): Likewise. - (h8300_output_function_prologue): Remove. - (h8300_expand_prologue): New. - (h8300_expand_epilogue): New. - (h8300_output_function_epilogue): Do only the reset of - pragma_saveall. - * config/h8300/h8300.md (push_h8300): New. - (push_h8300hs): Likewise. - (pop_h8300): Likewise. - (pop_h8300hs): Likewise. - (*stm_h8300s_2): Change the name to stm_h8300s_2. - (*stm_h8300s_3): Change the name to stm_h8300s_3. - (*stm_h8300s_4): Change the name to stm_h8300s_4. - (*ldm_h8300s_2): New. - (*ldm_h8300s_3): Likewise. - (*ldm_h8300s_4): Likewise. - (return): Likewise. - (*return_1): Likewise. - (prologue): Likewise. - (epilogue): Likewise. - (monitor_prologue): Likewise. - -2003-01-03 Dale Johannesen - - * config/darwin.h: (EXTRA_SECTIONS): Add machopic_symbol_stub1, - machopic_picsymbol_stub1. - (EXTRA_SECTION_FUNCTIONS): Ditto. - * rs6000/rs6000.c: Update copyright. - (machopic_output_stub): Use them. Remove an insn from stub code. - -2003-01-02 Jason Merrill - - * fold-const.c (fold) [COND_EXPR]: Avoid NOP_EXPRs better. - - * integrate.c (copy_decl_for_inlining): Don't clear the rtl for - static/external decls. - - * c-common.c (finish_fname_decls): Put the DECL_STMTs inside the - outermost scope. - * c-decl.c (c_make_fname_decl): Push the decls there, too. - -2003-01-03 Kazu Hirata - - * config/h8300/h8300-protos.h: Add a prototype for - h8300_current_function_interrupt_function_p. - * config/h8300/h8300.c (interrupt_handler): Remove. - (os_task): Likewise. - (monitor): Likewise. - (pragma_interrupt): New. - (WORD_REG_USED): Use - h8300_current_function_interrupt_function_p. - (dosize): Likewise. - (h8300_output_function_prologue): Likewise. - Do not set interrupt_handler, os_task, monitor. - (h8300_output_function_prologue): Use - h8300_current_function_interrupt_function_p. - Do not set interrupt_handler, os_task, monitor. - (h8300_current_function_interrupt_function_p): New. - (h8300_pr_interrupt): Set pragma_interrupt. - (h8300_insert_attributes): Reset pragma_interrupt. - -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.md (*iorhi3_zext): Relax the condition. - (*iorhi3_two_qi): Likewise. - (*iorsi3_zexthi): Likewise. - (*xorhi3_zextqi): Likewise. - (*xorsi3_zexthi): Likewise. - (*xorsi3_zextqi): Likewise. - -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 Steven Bosscher - - * objc/Make-lang.in, objc/config-lang.in, objc/lang-specs.h, - objc/objc-act.h: Fix copyright years. - -2003-01-02 Steven Bosscher - - * doc/passes.texi: Fix documentation for -fssa-ccp - -2003-01-02 Neil Booth - - * gccbug.in: Update for new categories. - -2003-01-01 Kazu Hirata - - * config/h8300/h8300.md: Reorder some patterns. - -2003-01-01 Kazu Hirata - - * config/h8300/h8300.c (output_logical_op): Fix a warning. - -2003-01-01 Neil Booth - - * config/darwin-protos.h, config/c4x/c4x-protos.h, - config/cris/cris-protos.h, config/i370/i370-protos.h, - config/i960/i960-protos.h, config/ia64/ia64-protos.h, - config/v850/v850-protos.h: Use struct, and don't conditionally - compile on GCC_C_PRAGMA_H. - -2003-01-01 Kazu Hirata - - * config/arm/arm-protos.h: Remove #ifdef GCC_C_PRAGMA_H. - * config/h8300/h8300-protos.h: Likewise. - * config/sh/sh-protos.h: Likewise. - -2003-01-01 Kazu Hirata - - * config/arm/arm-protos.h: Use struct cpp_reader instead of - cpp_reader. - * config/h8300/h8300-protos.h: Likewise. - * config/sh/sh-protos.h: Likewise. - -2003-01-01 Neil Booth - - * config/arm/arm.c (arm_pr_long_calls, arm_pr_no_long_calls, - arm_pr_long_calls_off): Use struct. - * config/h8300/h8300.c (h8300_pr-interrupt, h8300_pr_saveall) - : Similarly. - Don't include cpplib.h. - * config/sh/sh.c (sh_pr_interrupt, sh_pr_trapa, - sh_pr_nosave_low_regs): Similarly. - -2003-01-01 Kazu Hirata - - * config/h8300/h8300.c: Include cpplib.h. - -2003-01-01 Steven Bosscher - - * objc/Make-lang.in, objc/config-lang.in, objc/lang-options.h, - objc/lang-specs.h, objc/objc-act.c, objc/objc-act.h, - objc/objc-lang.c, objc/objc-tree.def: Replace "GNU CC" with - "GCC" in the copyright header. - -2003-01-01 Neil Booth - - * c-pragma.c (c_register_pragma): New. - (init_pragma): Use it. - * c-pragma.h (cpp_register_pragma): Don't declare. - (c_register_pragma): New. - * cpplib.h: Remove #ifdef GCC_C_PRAGMA_H. - * config/darwin.h (REGISTER_TARGET_PRAGMAS): Update. - * config/arm/arm.h (REGISTER_TARGET_PRAGMAS): Update. - * config/c4x/c4x.h (REGISTER_TARGET_PRAGMAS): Update. - * config/h8300/h8300.h (REGISTER_TARGET_PRAGMAS): Update. - * config/i370/i370.h (REGISTER_TARGET_PRAGMAS): Update. - * config/i960/i960.h (REGISTER_TARGET_PRAGMAS): Update. - * config/ia64/hpux.h (REGISTER_TARGET_PRAGMAS): Update. - * config/rs6000/rs6000.h (REGISTER_TARGET_PRAGMAS): Update. - * config/sh/sh.h (REGISTER_TARGET_PRAGMAS): Update. - * config/v850/v850.h (REGISTER_TARGET_PRAGMAS): Update. - * doc/tm.texi (REGISTER_TARGET_PRAGMAS): Update - -See ChangeLog.8 for earlier changes. diff --git a/contrib/gcc/README-fixinc b/contrib/gcc/README-fixinc deleted file mode 100644 index 7086a77..0000000 --- a/contrib/gcc/README-fixinc +++ /dev/null @@ -1,14 +0,0 @@ -This README file is copied into the directory for GCC-only header files -when fixincludes is run by the makefile for GCC. - -Many of the files in this directory were automatically edited from the -standard system header files by the fixincludes process. They are -system-specific, and will not work on any other kind of system. They -are also not part of GCC. The reason we have to do this is because -GCC requires ANSI C headers and many vendors supply ANSI-incompatible -headers. - -Because this is an automated process, sometimes headers get "fixed" -that do not, strictly speaking, need a fix. As long as nothing is broken -by the process, it is just an unfortunate collateral inconvenience. -We would like to rectify it, if it is not "too inconvenient". diff --git a/contrib/gcc/ansidecl.h b/contrib/gcc/ansidecl.h deleted file mode 100644 index ee0aecf..0000000 --- a/contrib/gcc/ansidecl.h +++ /dev/null @@ -1,324 +0,0 @@ -/* ANSI and traditional C compatability macros - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* ANSI and traditional C compatibility macros - - ANSI C is assumed if __STDC__ is #defined. - - Macro ANSI C definition Traditional C definition - ----- ---- - ---------- ----------- - ---------- - ANSI_PROTOTYPES 1 not defined - PTR `void *' `char *' - PTRCONST `void *const' `char *' - LONG_DOUBLE `long double' `double' - const not defined `' - volatile not defined `' - signed not defined `' - VA_START(ap, var) va_start(ap, var) va_start(ap) - - Note that it is safe to write "void foo();" indicating a function - with no return value, in all K+R compilers we have been able to test. - - For declaring functions with prototypes, we also provide these: - - PARAMS ((prototype)) - -- for functions which take a fixed number of arguments. Use this - when declaring the function. When defining the function, write a - K+R style argument list. For example: - - char *strcpy PARAMS ((char *dest, char *source)); - ... - char * - strcpy (dest, source) - char *dest; - char *source; - { ... } - - - VPARAMS ((prototype, ...)) - -- for functions which take a variable number of arguments. Use - PARAMS to declare the function, VPARAMS to define it. For example: - - int printf PARAMS ((const char *format, ...)); - ... - int - printf VPARAMS ((const char *format, ...)) - { - ... - } - - For writing functions which take variable numbers of arguments, we - also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These - hide the differences between K+R and C89 more - thoroughly than the simple VA_START() macro mentioned above. - - VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end. - Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls - corresponding to the list of fixed arguments. Then use va_arg - normally to get the variable arguments, or pass your va_list object - around. You do not declare the va_list yourself; VA_OPEN does it - for you. - - Here is a complete example: - - int - printf VPARAMS ((const char *format, ...)) - { - int result; - - VA_OPEN (ap, format); - VA_FIXEDARG (ap, const char *, format); - - result = vfprintf (stdout, format, ap); - VA_CLOSE (ap); - - return result; - } - - - You can declare variables either before or after the VA_OPEN, - VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning - and end of a block. They must appear at the same nesting level, - and any variables declared after VA_OPEN go out of scope at - VA_CLOSE. Unfortunately, with a K+R compiler, that includes the - argument list. You can have multiple instances of VA_OPEN/VA_CLOSE - pairs in a single function in case you need to traverse the - argument list more than once. - - For ease of writing code which uses GCC extensions but needs to be - portable to other compilers, we provide the GCC_VERSION macro that - simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various - wrappers around __attribute__. Also, __extension__ will be #defined - to nothing if it doesn't work. See below. - - This header also defines a lot of obsolete macros: - CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, - AND, DOTS, NOARGS. Don't use them. */ - -#ifndef _ANSIDECL_H -#define _ANSIDECL_H 1 - -/* Every source file includes this file, - so they will all get the switch for lint. */ -/* LINTLIBRARY */ - -/* Using MACRO(x,y) in cpp #if conditionals does not work with some - older preprocessors. Thus we can't define something like this: - -#define HAVE_GCC_VERSION(MAJOR, MINOR) \ - (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR))) - -and then test "#if HAVE_GCC_VERSION(2,7)". - -So instead we use the macro below and test it against specific values. */ - -/* This macro simplifies testing whether we are using gcc, and if it - is of a particular minimum version. (Both major & minor numbers are - significant.) This macro will evaluate to 0 if we are not using - gcc at all. */ -#ifndef GCC_VERSION -#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) -#endif /* GCC_VERSION */ - -#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (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 * -#define PTRCONST void *const -#define LONG_DOUBLE long double - -#define PARAMS(ARGS) ARGS -#define VPARAMS(ARGS) ARGS -#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR) - -/* variadic function helper macros */ -/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's - use without inhibiting further decls and without declaring an - actual variable. */ -#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy -#define VA_CLOSE(AP) } va_end(AP); } -#define VA_FIXEDARG(AP, T, N) struct Qdmy - -#undef const -#undef volatile -#undef signed - -/* inline requires special treatment; it's in C99, and GCC >=2.7 supports - it too, but it's not in C89. */ -#undef inline -#if __STDC_VERSION__ > 199901L -/* it's a keyword */ -#else -# if GCC_VERSION >= 2007 -# define inline __inline__ /* __inline__ prevents -pedantic warnings */ -# else -# define inline /* nothing */ -# endif -#endif - -/* These are obsolete. Do not use. */ -#ifndef IN_GCC -#define CONST const -#define VOLATILE volatile -#define SIGNED signed - -#define PROTO(type, name, arglist) type name arglist -#define EXFUN(name, proto) name proto -#define DEFUN(name, arglist, args) name(args) -#define DEFUN_VOID(name) name(void) -#define AND , -#define DOTS , ... -#define NOARGS void -#endif /* ! IN_GCC */ - -#else /* Not ANSI C. */ - -#undef ANSI_PROTOTYPES -#define PTR char * -#define PTRCONST PTR -#define LONG_DOUBLE double - -#define PARAMS(args) () -#define VPARAMS(args) (va_alist) va_dcl -#define VA_START(va_list, var) va_start(va_list) - -#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy -#define VA_CLOSE(AP) } va_end(AP); } -#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE) - -/* some systems define these in header files for non-ansi mode */ -#undef const -#undef volatile -#undef signed -#undef inline -#define const -#define volatile -#define signed -#define inline - -#ifndef IN_GCC -#define CONST -#define VOLATILE -#define SIGNED - -#define PROTO(type, name, arglist) type name () -#define EXFUN(name, proto) name() -#define DEFUN(name, arglist, args) name arglist args; -#define DEFUN_VOID(name) name() -#define AND ; -#define DOTS -#define NOARGS -#endif /* ! IN_GCC */ - -#endif /* ANSI C. */ - -/* Define macros for some gcc attributes. This permits us to use the - macros freely, and know that they will come into play for the - version of gcc in which they are supported. */ - -#if (GCC_VERSION < 2007) -# define __attribute__(x) -#endif - -/* Attribute __malloc__ on functions was valid as of gcc 2.96. */ -#ifndef ATTRIBUTE_MALLOC -# if (GCC_VERSION >= 2096) -# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -# else -# define ATTRIBUTE_MALLOC -# endif /* GNUC >= 2.96 */ -#endif /* ATTRIBUTE_MALLOC */ - -/* Attributes on labels were valid as of gcc 2.93. */ -#ifndef ATTRIBUTE_UNUSED_LABEL -# if (GCC_VERSION >= 2093) -# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED -# else -# define ATTRIBUTE_UNUSED_LABEL -# endif /* GNUC >= 2.93 */ -#endif /* ATTRIBUTE_UNUSED_LABEL */ - -#ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#endif /* ATTRIBUTE_UNUSED */ - -#ifndef ATTRIBUTE_NORETURN -#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#endif /* ATTRIBUTE_NORETURN */ - -/* 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))) 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) -#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5) -#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 */ - - -#ifndef ATTRIBUTE_ALIGNED_ALIGNOF -# if (GCC_VERSION >= 3000) -# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m)))) -# else -# define ATTRIBUTE_ALIGNED_ALIGNOF(m) -# endif /* GNUC >= 3.0 */ -#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */ - -/* We use __extension__ in some places to suppress -pedantic warnings - about GCC extensions. This feature didn't work properly before - gcc 2.8. */ -#if GCC_VERSION < 2008 -#define __extension__ -#endif - -#endif /* ansidecl.h */ diff --git a/contrib/gcc/c-parse.in b/contrib/gcc/c-parse.in deleted file mode 100644 index 66d27ac..0000000 --- a/contrib/gcc/c-parse.in +++ /dev/null @@ -1,3789 +0,0 @@ -/* YACC parser for C syntax and for Objective C. -*-c-*- - Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, 2003, 2004 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 defines the grammar of C and that of Objective C. - @@ifobjc ... @@end_ifobjc conditionals contain code for Objective C only. - @@ifc ... @@end_ifc conditionals contain code for C only. - Sed commands in Makefile.in are used to convert this file into - c-parse.y and into objc-parse.y. */ - -/* To whomever it may concern: I have heard that such a thing was once - written by AT&T, but I have never seen it. */ - -@@ifc -%expect 10 /* shift/reduce conflicts, and no reduce/reduce conflicts. */ -@@end_ifc - -%{ -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "tree.h" -#include "input.h" -#include "cpplib.h" -#include "intl.h" -#include "timevar.h" -#include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */ -#include "c-tree.h" -#include "flags.h" -#include "varray.h" -#include "output.h" -#include "toplev.h" -#include "ggc.h" - -@@ifobjc -#include "objc-act.h" -@@end_ifobjc - -/* Like YYERROR but do call yyerror. */ -#define YYERROR1 { yyerror ("syntax error"); YYERROR; } - -/* Like the default stack expander, except (1) use realloc when possible, - (2) impose no hard maxiumum on stack size, (3) REALLY do not use alloca. - - Irritatingly, YYSTYPE is defined after this %{ %} block, so we cannot - give malloced_yyvs its proper type. This is ok since all we need from - it is to be able to free it. */ - -static short *malloced_yyss; -static void *malloced_yyvs; - -#define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ) \ -do { \ - size_t newsize; \ - short *newss; \ - YYSTYPE *newvs; \ - newsize = *(YYSSZ) *= 2; \ - if (malloced_yyss) \ - { \ - newss = really_call_realloc (*(SS), newsize * sizeof (short)); \ - newvs = really_call_realloc (*(VS), newsize * sizeof (YYSTYPE)); \ - } \ - else \ - { \ - newss = really_call_malloc (newsize * sizeof (short)); \ - newvs = 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 - -%union {long itype; tree ttype; enum tree_code code; - location_t location; } - -/* All identifiers that are not reserved words - and are not declared typedefs in the current block */ -%token IDENTIFIER - -/* All identifiers that are declared typedefs in the current block. - In some contexts, they are treated just like IDENTIFIER, - but they can also serve as typespecs in declarations. */ -%token TYPENAME - -/* Reserved words that specify storage class. - yylval contains an IDENTIFIER_NODE which indicates which one. */ -%token SCSPEC /* Storage class other than static. */ -%token STATIC /* Static storage class. */ - -/* Reserved words that specify type. - yylval contains an IDENTIFIER_NODE which indicates which one. */ -%token TYPESPEC - -/* Reserved words that qualify type: "const", "volatile", or "restrict". - yylval contains an IDENTIFIER_NODE which indicates which one. */ -%token TYPE_QUAL - -/* Character or numeric constants. - yylval is the node for the constant. */ -%token CONSTANT - -/* String constants in raw form. - yylval is a STRING_CST node. */ - -%token STRING - -/* "...", used for functions with variable arglists. */ -%token ELLIPSIS - -/* the reserved words */ -/* SCO include files test "ASM", so use something else. */ -%token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT -%token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF -%token ATTRIBUTE EXTENSION LABEL -%token REALPART IMAGPART VA_ARG CHOOSE_EXPR TYPES_COMPATIBLE_P -%token PTR_VALUE PTR_BASE PTR_EXTENT -%token FUNC_NAME - -/* Add precedence rules to solve dangling else s/r conflict */ -%nonassoc IF -%nonassoc ELSE - -/* Define the operator tokens and their precedences. - The value is an integer because, if used, it is the tree code - to use in the expression made from the operator. */ - -%right ASSIGN '=' -%right '?' ':' -%left OROR -%left ANDAND -%left '|' -%left '^' -%left '&' -%left EQCOMPARE -%left ARITHCOMPARE -%left LSHIFT RSHIFT -%left '+' '-' -%left '*' '/' '%' -%right UNARY PLUSPLUS MINUSMINUS -%left HYPERUNARY -%left POINTSAT '.' '(' '[' - -/* The Objective-C keywords. These are included in C and in - Objective C, so that the token codes are the same in both. */ -%token INTERFACE IMPLEMENTATION END SELECTOR DEFS ENCODE -%token CLASSNAME PUBLIC PRIVATE PROTECTED PROTOCOL OBJECTNAME CLASS ALIAS -%token AT_THROW AT_TRY AT_CATCH AT_FINALLY AT_SYNCHRONIZED -%token OBJC_STRING - -%type unop -%type ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT -%type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF - -%type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist -%type expr_no_commas cast_expr unary_expr primary STRING -%type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea -%type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea -%type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea -%type declspecs_nosc_ts_sa_noea declspecs_nosc_ts_sa_ea -%type declspecs_sc_nots_nosa_noea declspecs_sc_nots_nosa_ea -%type declspecs_sc_nots_sa_noea declspecs_sc_nots_sa_ea -%type declspecs_sc_ts_nosa_noea declspecs_sc_ts_nosa_ea -%type declspecs_sc_ts_sa_noea declspecs_sc_ts_sa_ea -%type declspecs_ts declspecs_nots -%type declspecs_ts_nosa declspecs_nots_nosa -%type declspecs_nosc_ts declspecs_nosc_nots declspecs_nosc declspecs -%type maybe_type_quals_attrs typespec_nonattr typespec_attr -%type typespec_reserved_nonattr typespec_reserved_attr -%type typespec_nonreserved_nonattr - -%type scspec SCSPEC STATIC TYPESPEC TYPE_QUAL maybe_type_qual -%type initdecls notype_initdecls initdcl notype_initdcl -%type init maybeasm -%type asm_operands nonnull_asm_operands asm_operand asm_clobbers -%type maybe_attribute attributes attribute attribute_list attrib -%type any_word - -%type compstmt compstmt_start compstmt_nostart compstmt_primary_start -%type do_stmt_start poplevel stmt label - -%type c99_block_start c99_block_end -%type declarator -%type notype_declarator after_type_declarator -%type parm_declarator -%type parm_declarator_starttypename parm_declarator_nostarttypename -%type array_declarator - -%type structsp_attr structsp_nonattr -%type component_decl_list component_decl_list2 -%type component_decl components components_notype component_declarator -%type component_notype_declarator -%type enumlist enumerator -%type struct_head union_head enum_head -%type typename absdcl absdcl1 absdcl1_ea absdcl1_noea -%type direct_absdcl1 absdcl_maybe_attribute -%type xexpr parms parm firstparm identifiers - -%type parmlist parmlist_1 parmlist_2 -%type parmlist_or_identifiers parmlist_or_identifiers_1 -%type identifiers_or_typenames - -%type setspecs setspecs_fp extension - -%type save_location - -@@ifobjc -/* the Objective-C nonterminals */ - -%type ivar_decl_list ivar_decls ivar_decl ivars ivar_declarator -%type methoddecl unaryselector keywordselector selector -%type keyworddecl receiver objcmessageexpr messageargs -%type keywordexpr keywordarglist keywordarg -%type myparms myparm optparmlist reservedwords objcselectorexpr -%type selectorarg keywordnamelist keywordname objcencodeexpr -%type non_empty_protocolrefs protocolrefs identifier_list objcprotocolexpr - -%type CLASSNAME OBJECTNAME OBJC_STRING - -%type superclass -%type objc_try_catch_stmt objc_finally_block -@@end_ifobjc - -%{ -/* Number of statements (loosely speaking) and compound statements - seen so far. */ -static int stmt_count; -static int compstmt_count; - -/* Input location of the end of the body of last simple_if; - used by the stmt-rule immediately after simple_if returns. */ -static location_t if_stmt_locus; - - -/* List of types and structure classes of the current declaration. */ -static GTY(()) tree current_declspecs; -static GTY(()) tree prefix_attributes; - -/* List of all the attributes applying to the identifier currently being - declared; includes prefix_attributes and possibly some more attributes - just after a comma. */ -static GTY(()) tree all_prefix_attributes; - -/* Stack of saved values of current_declspecs, prefix_attributes and - all_prefix_attributes. */ -static GTY(()) tree declspec_stack; - -/* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK - should be called from the productions making use of setspecs. */ -#define PUSH_DECLSPEC_STACK \ - do { \ - declspec_stack = tree_cons (build_tree_list (prefix_attributes, \ - all_prefix_attributes), \ - current_declspecs, \ - declspec_stack); \ - } while (0) - -#define POP_DECLSPEC_STACK \ - do { \ - current_declspecs = TREE_VALUE (declspec_stack); \ - prefix_attributes = TREE_PURPOSE (TREE_PURPOSE (declspec_stack)); \ - all_prefix_attributes = TREE_VALUE (TREE_PURPOSE (declspec_stack)); \ - declspec_stack = TREE_CHAIN (declspec_stack); \ - } while (0) - -/* For __extension__, save/restore the warning flags which are - controlled by __extension__. */ -#define SAVE_EXT_FLAGS() \ - (pedantic \ - | (warn_pointer_arith << 1) \ - | (warn_traditional << 2) \ - | (flag_iso << 3)) - -#define RESTORE_EXT_FLAGS(val) \ - do { \ - pedantic = val & 1; \ - warn_pointer_arith = (val >> 1) & 1; \ - warn_traditional = (val >> 2) & 1; \ - flag_iso = (val >> 3) & 1; \ - } while (0) - -@@ifobjc -/* Objective-C specific parser/lexer information */ - -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 - exists. */ -static int objc_need_raw_identifier; -#define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL -@@end_ifobjc - -@@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) - -static void yyprint (FILE *, int, YYSTYPE); -static void yyerror (const char *); -static int yylexname (void); -static inline int _yylex (void); -static int yylex (void); -static void init_reswords (void); - - /* Initialisation routine for this file. */ -void -c_parse_init (void) -{ - init_reswords (); -} - -%} - -%% -program: /* empty */ - { if (pedantic) - pedwarn ("ISO C forbids an empty source file"); - } - | extdefs - ; - -/* the reason for the strange actions in this rule - is so that notype_initdecls when reached via datadef - can find a valid list of type and sc specs in $0. */ - -extdefs: - {$$ = NULL_TREE; } extdef - | extdefs {$$ = NULL_TREE; ggc_collect(); } extdef - ; - -extdef: - extdef_1 - { parsing_iso_function_signature = false; } /* Reset after any external definition. */ - ; - -extdef_1: - fndef - | datadef -@@ifobjc - | objcdef -@@end_ifobjc - | ASM_KEYWORD '(' expr ')' ';' - { STRIP_NOPS ($3); - if ((TREE_CODE ($3) == ADDR_EXPR - && TREE_CODE (TREE_OPERAND ($3, 0)) == STRING_CST) - || TREE_CODE ($3) == STRING_CST) - assemble_asm ($3); - else - error ("argument of `asm' is not a constant string"); } - | extension extdef - { RESTORE_EXT_FLAGS ($1); } - ; - -datadef: - setspecs notype_initdecls ';' - { if (pedantic) - error ("ISO C forbids data definition with no type or storage class"); - else - warning ("data definition has no type or storage class"); - - POP_DECLSPEC_STACK; } - | declspecs_nots setspecs notype_initdecls ';' - { POP_DECLSPEC_STACK; } - | declspecs_ts setspecs initdecls ';' - { POP_DECLSPEC_STACK; } - | declspecs ';' - { shadow_tag ($1); } - | error ';' - | error '}' - | ';' - { if (pedantic) - pedwarn ("ISO C does not allow extra `;' outside of a function"); } - ; - -fndef: - declspecs_ts setspecs declarator - { if (! start_function (current_declspecs, $3, - all_prefix_attributes)) - YYERROR1; - } - old_style_parm_decls save_location - { DECL_SOURCE_LOCATION (current_function_decl) = $6; - store_parm_decls (); } - compstmt_or_error - { finish_function (); - POP_DECLSPEC_STACK; } - | declspecs_ts setspecs declarator error - { POP_DECLSPEC_STACK; } - | declspecs_nots setspecs notype_declarator - { if (! start_function (current_declspecs, $3, - all_prefix_attributes)) - YYERROR1; - } - old_style_parm_decls save_location - { DECL_SOURCE_LOCATION (current_function_decl) = $6; - store_parm_decls (); } - compstmt_or_error - { finish_function (); - POP_DECLSPEC_STACK; } - | declspecs_nots setspecs notype_declarator error - { POP_DECLSPEC_STACK; } - | setspecs notype_declarator - { if (! start_function (NULL_TREE, $2, - all_prefix_attributes)) - YYERROR1; - } - old_style_parm_decls save_location - { DECL_SOURCE_LOCATION (current_function_decl) = $5; - store_parm_decls (); } - compstmt_or_error - { finish_function (); - POP_DECLSPEC_STACK; } - | setspecs notype_declarator error - { POP_DECLSPEC_STACK; } - ; - -identifier: - IDENTIFIER - | TYPENAME -@@ifobjc - | OBJECTNAME - | CLASSNAME -@@end_ifobjc - ; - -unop: '&' - { $$ = ADDR_EXPR; } - | '-' - { $$ = NEGATE_EXPR; } - | '+' - { $$ = CONVERT_EXPR; -@@ifc - if (warn_traditional && !in_system_header) - warning ("traditional C rejects the unary plus operator"); -@@end_ifc - } - | PLUSPLUS - { $$ = PREINCREMENT_EXPR; } - | MINUSMINUS - { $$ = PREDECREMENT_EXPR; } - | '~' - { $$ = BIT_NOT_EXPR; } - | '!' - { $$ = TRUTH_NOT_EXPR; } - ; - -expr: nonnull_exprlist - { $$ = build_compound_expr ($1); } - ; - -exprlist: - /* empty */ - { $$ = NULL_TREE; } - | nonnull_exprlist - ; - -nonnull_exprlist: - expr_no_commas - { $$ = build_tree_list (NULL_TREE, $1); } - | nonnull_exprlist ',' expr_no_commas - { chainon ($1, build_tree_list (NULL_TREE, $3)); } - ; - -unary_expr: - primary - | '*' cast_expr %prec UNARY - { $$ = build_indirect_ref ($2, "unary *"); } - /* __extension__ turns off -pedantic for following primary. */ - | extension cast_expr %prec UNARY - { $$ = $2; - RESTORE_EXT_FLAGS ($1); } - | unop cast_expr %prec UNARY - { $$ = build_unary_op ($1, $2, 0); - overflow_warning ($$); } - /* Refer to the address of a label as a pointer. */ - | ANDAND identifier - { $$ = finish_label_address_expr ($2); } - | sizeof unary_expr %prec UNARY - { skip_evaluation--; - if (TREE_CODE ($2) == COMPONENT_REF - && DECL_C_BIT_FIELD (TREE_OPERAND ($2, 1))) - error ("`sizeof' applied to a bit-field"); - $$ = c_sizeof (TREE_TYPE ($2)); } - | sizeof '(' typename ')' %prec HYPERUNARY - { skip_evaluation--; - $$ = c_sizeof (groktypename ($3)); } - | alignof unary_expr %prec UNARY - { skip_evaluation--; - $$ = c_alignof_expr ($2); } - | alignof '(' typename ')' %prec HYPERUNARY - { skip_evaluation--; - $$ = c_alignof (groktypename ($3)); } - | REALPART cast_expr %prec UNARY - { $$ = build_unary_op (REALPART_EXPR, $2, 0); } - | IMAGPART cast_expr %prec UNARY - { $$ = build_unary_op (IMAGPART_EXPR, $2, 0); } - ; - -sizeof: - SIZEOF { skip_evaluation++; } - ; - -alignof: - ALIGNOF { skip_evaluation++; } - ; - -typeof: - TYPEOF { skip_evaluation++; } - ; - -cast_expr: - unary_expr - | '(' typename ')' cast_expr %prec UNARY - { $$ = c_cast_expr ($2, $4); } - ; - -expr_no_commas: - cast_expr - | expr_no_commas '+' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas '-' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas '*' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas '/' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas '%' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas LSHIFT expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas RSHIFT expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas ARITHCOMPARE expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas EQCOMPARE expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas '&' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas '|' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas '^' expr_no_commas - { $$ = parser_build_binary_op ($2, $1, $3); } - | expr_no_commas ANDAND - { $1 = c_common_truthvalue_conversion - (default_conversion ($1)); - skip_evaluation += $1 == truthvalue_false_node; } - expr_no_commas - { skip_evaluation -= $1 == truthvalue_false_node; - $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } - | expr_no_commas OROR - { $1 = c_common_truthvalue_conversion - (default_conversion ($1)); - skip_evaluation += $1 == truthvalue_true_node; } - expr_no_commas - { skip_evaluation -= $1 == truthvalue_true_node; - $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } - | expr_no_commas '?' - { $1 = c_common_truthvalue_conversion - (default_conversion ($1)); - skip_evaluation += $1 == truthvalue_false_node; } - expr ':' - { skip_evaluation += (($1 == truthvalue_true_node) - - ($1 == truthvalue_false_node)); } - expr_no_commas - { skip_evaluation -= $1 == truthvalue_true_node; - $$ = build_conditional_expr ($1, $4, $7); } - | expr_no_commas '?' - { if (pedantic) - pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); - /* Make sure first operand is calculated only once. */ - $2 = save_expr ($1); - $1 = c_common_truthvalue_conversion - (default_conversion ($2)); - skip_evaluation += $1 == truthvalue_true_node; } - ':' expr_no_commas - { skip_evaluation -= $1 == truthvalue_true_node; - $$ = build_conditional_expr ($1, $2, $5); } - | expr_no_commas '=' expr_no_commas - { char class; - $$ = build_modify_expr ($1, NOP_EXPR, $3); - class = TREE_CODE_CLASS (TREE_CODE ($$)); - if (IS_EXPR_CODE_CLASS (class)) - C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); - } - | expr_no_commas ASSIGN expr_no_commas - { char class; - $$ = build_modify_expr ($1, $2, $3); - /* This inhibits warnings in - c_common_truthvalue_conversion. */ - class = TREE_CODE_CLASS (TREE_CODE ($$)); - if (IS_EXPR_CODE_CLASS (class)) - C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); - } - ; - -primary: - IDENTIFIER - { - if (yychar == YYEMPTY) - yychar = YYLEX; - $$ = build_external_ref ($1, yychar == '('); - } - | CONSTANT - | STRING - | FUNC_NAME - { $$ = fname_decl (C_RID_CODE ($$), $$); } - | '(' typename ')' '{' - { start_init (NULL_TREE, NULL, 0); - $2 = groktypename ($2); - really_start_incremental_init ($2); } - initlist_maybe_comma '}' %prec UNARY - { tree constructor = pop_init_level (0); - tree type = $2; - finish_init (); - - if (pedantic && ! flag_isoc99) - pedwarn ("ISO C90 forbids compound literals"); - $$ = build_compound_literal (type, constructor); - } - | '(' expr ')' - { char class = TREE_CODE_CLASS (TREE_CODE ($2)); - if (IS_EXPR_CODE_CLASS (class)) - C_SET_EXP_ORIGINAL_CODE ($2, ERROR_MARK); - $$ = $2; } - | '(' error ')' - { $$ = error_mark_node; } - | compstmt_primary_start compstmt_nostart ')' - { tree saved_last_tree; - - if (pedantic) - pedwarn ("ISO C forbids braced-groups within expressions"); - saved_last_tree = COMPOUND_BODY ($1); - RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); - last_tree = saved_last_tree; - TREE_CHAIN (last_tree) = NULL_TREE; - if (!last_expr_type) - last_expr_type = void_type_node; - $$ = build1 (STMT_EXPR, last_expr_type, $1); - TREE_SIDE_EFFECTS ($$) = 1; - } - | compstmt_primary_start error ')' - { - last_tree = COMPOUND_BODY ($1); - TREE_CHAIN (last_tree) = NULL_TREE; - $$ = error_mark_node; - } - | primary '(' exprlist ')' %prec '.' - { $$ = build_function_call ($1, $3); } - | VA_ARG '(' expr_no_commas ',' typename ')' - { $$ = build_va_arg ($3, groktypename ($5)); } - - | CHOOSE_EXPR '(' expr_no_commas ',' expr_no_commas ',' expr_no_commas ')' - { - tree c; - - c = fold ($3); - STRIP_NOPS (c); - if (TREE_CODE (c) != INTEGER_CST) - error ("first argument to __builtin_choose_expr not a constant"); - $$ = integer_zerop (c) ? $7 : $5; - } - | TYPES_COMPATIBLE_P '(' typename ',' typename ')' - { - tree e1, e2; - - e1 = TYPE_MAIN_VARIANT (groktypename ($3)); - e2 = TYPE_MAIN_VARIANT (groktypename ($5)); - - $$ = comptypes (e1, e2, COMPARE_STRICT) - ? build_int_2 (1, 0) : build_int_2 (0, 0); - } - | primary '[' expr ']' %prec '.' - { $$ = build_array_ref ($1, $3); } - | primary '.' identifier - { -@@ifobjc - if (!is_public ($1, $3)) - $$ = error_mark_node; - else -@@end_ifobjc - $$ = build_component_ref ($1, $3); - } - | primary POINTSAT identifier - { - tree expr = build_indirect_ref ($1, "->"); - -@@ifobjc - if (!is_public (expr, $3)) - $$ = error_mark_node; - else -@@end_ifobjc - $$ = build_component_ref (expr, $3); - } - | primary PLUSPLUS - { $$ = build_unary_op (POSTINCREMENT_EXPR, $1, 0); } - | primary MINUSMINUS - { $$ = build_unary_op (POSTDECREMENT_EXPR, $1, 0); } -@@ifobjc - | objcmessageexpr - { $$ = build_message_expr ($1); } - | objcselectorexpr - { $$ = build_selector_expr ($1); } - | objcprotocolexpr - { $$ = build_protocol_expr ($1); } - | objcencodeexpr - { $$ = build_encode_expr ($1); } - | OBJC_STRING - { $$ = build_objc_string_object ($1); } -@@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"); - if (warn_old_style_definition && !in_system_header - && !parsing_iso_function_signature) - warning ("old-style parameter declaration"); - parsing_iso_function_signature = false; /* Reset after warning. */ - } - | datadecls - { - if (warn_old_style_definition && !in_system_header) - warning ("old-style parameter declaration"); - } - ; - -/* The following are analogous to lineno_decl, decls and decl - except that they do not allow nested functions. - They are used for old-style parm decls. */ -lineno_datadecl: - save_location datadecl - { } - ; - -datadecls: - lineno_datadecl - | errstmt - | datadecls lineno_datadecl - | lineno_datadecl errstmt - ; - -/* We don't allow prefix attributes here because they cause reduce/reduce - conflicts: we can't know whether we're parsing a function decl with - attribute suffix, or function defn with attribute prefix on first old - style parm. */ -datadecl: - declspecs_ts_nosa setspecs initdecls ';' - { POP_DECLSPEC_STACK; } - | declspecs_nots_nosa setspecs notype_initdecls ';' - { POP_DECLSPEC_STACK; } - | declspecs_ts_nosa ';' - { shadow_tag_warned ($1, 1); - pedwarn ("empty declaration"); } - | declspecs_nots_nosa ';' - { pedwarn ("empty declaration"); } - ; - -/* This combination which saves a lineno before a decl - is the normal thing to use, rather than decl itself. - This is to avoid shift/reduce conflicts in contexts - where statement labels are allowed. */ -lineno_decl: - save_location decl - { } - ; - -/* records the type and storage class specs to use for processing - the declarators that follow. - Maintains a stack of outer-level values of current_declspecs, - for the sake of parm declarations nested in function declarators. */ -setspecs: /* empty */ - { pending_xref_error (); - PUSH_DECLSPEC_STACK; - split_specs_attrs ($0, - ¤t_declspecs, &prefix_attributes); - all_prefix_attributes = prefix_attributes; } - ; - -/* Possibly attributes after a comma, which should reset all_prefix_attributes - to prefix_attributes with these ones chained on the front. */ -maybe_resetattrs: - maybe_attribute - { all_prefix_attributes = chainon ($1, prefix_attributes); } - ; - -decl: - declspecs_ts setspecs initdecls ';' - { POP_DECLSPEC_STACK; } - | declspecs_nots setspecs notype_initdecls ';' - { POP_DECLSPEC_STACK; } - | declspecs_ts setspecs nested_function - { POP_DECLSPEC_STACK; } - | declspecs_nots setspecs notype_nested_function - { POP_DECLSPEC_STACK; } - | declspecs ';' - { shadow_tag ($1); } - | extension decl - { RESTORE_EXT_FLAGS ($1); } - ; - -/* A list of declaration specifiers. These are: - - - Storage class specifiers (scspec), which for GCC currently includes - function specifiers ("inline"). - - - Type specifiers (typespec_*). - - - Type qualifiers (TYPE_QUAL). - - - Attribute specifier lists (attributes). - - These are stored as a TREE_LIST; the head of the list is the last - item in the specifier list. Each entry in the list has either a - TREE_PURPOSE that is an attribute specifier list, or a TREE_VALUE that - is a single other specifier or qualifier; and a TREE_CHAIN that is the - rest of the list. TREE_STATIC is set on the list if something other - than a storage class specifier or attribute has been seen; this is used - to warn for the obsolescent usage of storage class specifiers other than - at the start of the list. (Doing this properly would require function - specifiers to be handled separately from storage class specifiers.) - - The various cases below are classified according to: - - (a) Whether a storage class specifier is included or not; some - places in the grammar disallow storage class specifiers (_sc or _nosc). - - (b) Whether a type specifier has been seen; after a type specifier, - a typedef name is an identifier to redeclare (_ts or _nots). - - (c) Whether the list starts with an attribute; in certain places, - the grammar requires specifiers that don't start with an attribute - (_sa or _nosa). - - (d) Whether the list ends with an attribute (or a specifier such that - any following attribute would have been parsed as part of that specifier); - this avoids shift-reduce conflicts in the parsing of attributes - (_ea or _noea). - - TODO: - - (i) Distinguish between function specifiers and storage class specifiers, - at least for the purpose of warnings about obsolescent usage. - - (ii) Halve the number of productions here by eliminating the _sc/_nosc - distinction and instead checking where required that storage class - specifiers aren't present. */ - -/* Declspecs which contain at least one type specifier or typedef name. - (Just `const' or `volatile' is not enough.) - A typedef'd name following these is taken as a name to be declared. - Declspecs have a non-NULL TREE_VALUE, attributes do not. */ - -declspecs_nosc_nots_nosa_noea: - TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -declspecs_nosc_nots_nosa_ea: - declspecs_nosc_nots_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_nosc_nots_sa_noea: - declspecs_nosc_nots_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -declspecs_nosc_nots_sa_ea: - attributes - { $$ = tree_cons ($1, NULL_TREE, NULL_TREE); - TREE_STATIC ($$) = 0; } - | declspecs_nosc_nots_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_nosc_ts_nosa_noea: - typespec_nonattr - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -declspecs_nosc_ts_nosa_ea: - typespec_attr - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_nosc_ts_nosa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -declspecs_nosc_ts_sa_noea: - declspecs_nosc_ts_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_sa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_sa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_sa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_sa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -declspecs_nosc_ts_sa_ea: - declspecs_nosc_ts_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_nosc_ts_sa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_sa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_sa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_sa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -declspecs_sc_nots_nosa_noea: - scspec - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); - TREE_STATIC ($$) = 0; } - | declspecs_sc_nots_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_nosc_nots_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_nots_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_nots_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_sc_nots_nosa_ea: - declspecs_sc_nots_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_sc_nots_sa_noea: - declspecs_sc_nots_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_nots_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_nosc_nots_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_nots_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_nots_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_sc_nots_sa_ea: - declspecs_sc_nots_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_sc_ts_nosa_noea: - declspecs_sc_ts_nosa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_nosa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_nosa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_nosa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_nosa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_nosa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_nosc_ts_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_ts_nosa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_ts_nosa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_sc_ts_nosa_ea: - declspecs_sc_ts_nosa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_ts_nosa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_nosa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_nosa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_nosa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -declspecs_sc_ts_sa_noea: - declspecs_sc_ts_sa_noea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_sa_ea TYPE_QUAL - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_sa_noea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_sa_ea typespec_reserved_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_sa_noea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_sa_ea typespec_nonattr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_nosc_ts_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_nosc_ts_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_ts_sa_noea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_ts_sa_ea scspec - { if (extra_warnings && TREE_STATIC ($1)) - warning ("`%s' is not at beginning of declaration", - IDENTIFIER_POINTER ($2)); - $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - ; - -declspecs_sc_ts_sa_ea: - declspecs_sc_ts_sa_noea attributes - { $$ = tree_cons ($2, NULL_TREE, $1); - TREE_STATIC ($$) = TREE_STATIC ($1); } - | declspecs_sc_ts_sa_noea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_ts_sa_ea typespec_reserved_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_sa_noea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - | declspecs_sc_nots_sa_ea typespec_attr - { $$ = tree_cons (NULL_TREE, $2, $1); - TREE_STATIC ($$) = 1; } - ; - -/* Particular useful classes of declspecs. */ -declspecs_ts: - declspecs_nosc_ts_nosa_noea - | declspecs_nosc_ts_nosa_ea - | declspecs_nosc_ts_sa_noea - | declspecs_nosc_ts_sa_ea - | declspecs_sc_ts_nosa_noea - | declspecs_sc_ts_nosa_ea - | declspecs_sc_ts_sa_noea - | declspecs_sc_ts_sa_ea - ; - -declspecs_nots: - declspecs_nosc_nots_nosa_noea - | declspecs_nosc_nots_nosa_ea - | declspecs_nosc_nots_sa_noea - | declspecs_nosc_nots_sa_ea - | declspecs_sc_nots_nosa_noea - | declspecs_sc_nots_nosa_ea - | declspecs_sc_nots_sa_noea - | declspecs_sc_nots_sa_ea - ; - -declspecs_ts_nosa: - declspecs_nosc_ts_nosa_noea - | declspecs_nosc_ts_nosa_ea - | declspecs_sc_ts_nosa_noea - | declspecs_sc_ts_nosa_ea - ; - -declspecs_nots_nosa: - declspecs_nosc_nots_nosa_noea - | declspecs_nosc_nots_nosa_ea - | declspecs_sc_nots_nosa_noea - | declspecs_sc_nots_nosa_ea - ; - -declspecs_nosc_ts: - declspecs_nosc_ts_nosa_noea - | declspecs_nosc_ts_nosa_ea - | declspecs_nosc_ts_sa_noea - | declspecs_nosc_ts_sa_ea - ; - -declspecs_nosc_nots: - declspecs_nosc_nots_nosa_noea - | declspecs_nosc_nots_nosa_ea - | declspecs_nosc_nots_sa_noea - | declspecs_nosc_nots_sa_ea - ; - -declspecs_nosc: - declspecs_nosc_ts_nosa_noea - | declspecs_nosc_ts_nosa_ea - | declspecs_nosc_ts_sa_noea - | declspecs_nosc_ts_sa_ea - | declspecs_nosc_nots_nosa_noea - | declspecs_nosc_nots_nosa_ea - | declspecs_nosc_nots_sa_noea - | declspecs_nosc_nots_sa_ea - ; - -declspecs: - declspecs_nosc_nots_nosa_noea - | declspecs_nosc_nots_nosa_ea - | declspecs_nosc_nots_sa_noea - | declspecs_nosc_nots_sa_ea - | declspecs_nosc_ts_nosa_noea - | declspecs_nosc_ts_nosa_ea - | declspecs_nosc_ts_sa_noea - | declspecs_nosc_ts_sa_ea - | declspecs_sc_nots_nosa_noea - | declspecs_sc_nots_nosa_ea - | declspecs_sc_nots_sa_noea - | declspecs_sc_nots_sa_ea - | declspecs_sc_ts_nosa_noea - | declspecs_sc_ts_nosa_ea - | declspecs_sc_ts_sa_noea - | declspecs_sc_ts_sa_ea - ; - -/* A (possibly empty) sequence of type qualifiers and attributes. */ -maybe_type_quals_attrs: - /* empty */ - { $$ = NULL_TREE; } - | declspecs_nosc_nots - { $$ = $1; } - ; - -/* A type specifier (but not a type qualifier). - Once we have seen one of these in a declaration, - if a typedef name appears then it is being redeclared. - - The _reserved versions start with a reserved word and may appear anywhere - in the declaration specifiers; the _nonreserved versions may only - appear before any other type specifiers, and after that are (if names) - being redeclared. - - FIXME: should the _nonreserved version be restricted to names being - redeclared only? The other entries there relate only the GNU extensions - and Objective C, and are historically parsed thus, and don't make sense - after other type specifiers, but it might be cleaner to count them as - _reserved. - - _attr means: specifiers that either end with attributes, - or are such that any following attributes would - be parsed as part of the specifier. - - _nonattr: specifiers. */ - -typespec_nonattr: - typespec_reserved_nonattr - | typespec_nonreserved_nonattr - ; - -typespec_attr: - typespec_reserved_attr - ; - -typespec_reserved_nonattr: - TYPESPEC - { OBJC_NEED_RAW_IDENTIFIER (1); } - | structsp_nonattr - ; - -typespec_reserved_attr: - structsp_attr - ; - -typespec_nonreserved_nonattr: - TYPENAME - { /* For a typedef name, record the meaning, not the name. - In case of `foo foo, bar;'. */ - $$ = lookup_name ($1); } -@@ifobjc - | CLASSNAME protocolrefs - { $$ = get_static_reference ($1, $2); } - | OBJECTNAME protocolrefs - { $$ = get_object_reference ($2); } - -/* Make "" equivalent to "id " - - nisse@lysator.liu.se */ - | non_empty_protocolrefs - { $$ = get_object_reference ($1); } -@@end_ifobjc - | typeof '(' expr ')' - { skip_evaluation--; - if (TREE_CODE ($3) == COMPONENT_REF - && DECL_C_BIT_FIELD (TREE_OPERAND ($3, 1))) - error ("`typeof' applied to a bit-field"); - $$ = TREE_TYPE ($3); } - | typeof '(' typename ')' - { skip_evaluation--; $$ = groktypename ($3); } - ; - -/* typespec_nonreserved_attr does not exist. */ - -initdecls: - initdcl - | initdecls ',' maybe_resetattrs initdcl - ; - -notype_initdecls: - notype_initdcl - | notype_initdecls ',' maybe_resetattrs notype_initdcl - ; - -maybeasm: - /* empty */ - { $$ = NULL_TREE; } - | ASM_KEYWORD '(' STRING ')' - { $$ = $3; } - ; - -initdcl: - declarator maybeasm maybe_attribute '=' - { $$ = start_decl ($1, current_declspecs, 1, - chainon ($3, all_prefix_attributes)); - start_init ($$, $2, global_bindings_p ()); } - init -/* Note how the declaration of the variable is in effect while its init is parsed! */ - { finish_init (); - finish_decl ($5, $6, $2); } - | declarator maybeasm maybe_attribute - { tree d = start_decl ($1, current_declspecs, 0, - chainon ($3, all_prefix_attributes)); - finish_decl (d, NULL_TREE, $2); - } - ; - -notype_initdcl: - notype_declarator maybeasm maybe_attribute '=' - { $$ = start_decl ($1, current_declspecs, 1, - chainon ($3, all_prefix_attributes)); - start_init ($$, $2, global_bindings_p ()); } - init -/* Note how the declaration of the variable is in effect while its init is parsed! */ - { finish_init (); - finish_decl ($5, $6, $2); } - | notype_declarator maybeasm maybe_attribute - { tree d = start_decl ($1, current_declspecs, 0, - chainon ($3, all_prefix_attributes)); - finish_decl (d, NULL_TREE, $2); } - ; -/* the * rules are dummies to accept the Apollo extended syntax - so that the header files compile. */ -maybe_attribute: - /* empty */ - { $$ = NULL_TREE; } - | attributes - { $$ = $1; } - ; - -attributes: - attribute - { $$ = $1; } - | attributes attribute - { $$ = chainon ($1, $2); } - ; - -attribute: - ATTRIBUTE '(' '(' attribute_list ')' ')' - { $$ = $4; } - ; - -attribute_list: - attrib - { $$ = $1; } - | attribute_list ',' attrib - { $$ = chainon ($1, $3); } - ; - -attrib: - /* empty */ - { $$ = NULL_TREE; } - | any_word - { $$ = build_tree_list ($1, NULL_TREE); } - | any_word '(' IDENTIFIER ')' - { $$ = build_tree_list ($1, build_tree_list (NULL_TREE, $3)); } - | any_word '(' IDENTIFIER ',' nonnull_exprlist ')' - { $$ = build_tree_list ($1, tree_cons (NULL_TREE, $3, $5)); } - | any_word '(' exprlist ')' - { $$ = build_tree_list ($1, $3); } - ; - -/* This still leaves out most reserved keywords, - shouldn't we include them? */ - -any_word: - identifier - | scspec - | TYPESPEC - | TYPE_QUAL - ; - -scspec: - STATIC - | SCSPEC - ; - -/* Initializers. `init' is the entry point. */ - -init: - expr_no_commas - | '{' - { really_start_incremental_init (NULL_TREE); } - initlist_maybe_comma '}' - { $$ = pop_init_level (0); } - | error - { $$ = error_mark_node; } - ; - -/* `initlist_maybe_comma' is the guts of an initializer in braces. */ -initlist_maybe_comma: - /* empty */ - { if (pedantic) - pedwarn ("ISO C forbids empty initializer braces"); } - | initlist1 maybecomma - ; - -initlist1: - initelt - | initlist1 ',' initelt - ; - -/* `initelt' is a single element of an initializer. - It may use braces. */ -initelt: - designator_list '=' initval - { if (pedantic && ! flag_isoc99) - pedwarn ("ISO C90 forbids specifying subobject to initialize"); } - | designator initval - { if (pedantic) - pedwarn ("obsolete use of designated initializer without `='"); } - | identifier ':' - { set_init_label ($1); - if (pedantic) - pedwarn ("obsolete use of designated initializer with `:'"); } - initval - {} - | initval - ; - -initval: - '{' - { push_init_level (0); } - initlist_maybe_comma '}' - { process_init_element (pop_init_level (0)); } - | expr_no_commas - { process_init_element ($1); } - | error - ; - -designator_list: - designator - | designator_list designator - ; - -designator: - '.' identifier - { set_init_label ($2); } - | '[' 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); } - ; - -nested_function: - declarator - { if (pedantic) - pedwarn ("ISO C forbids nested functions"); - - push_function_context (); - if (! start_function (current_declspecs, $1, - all_prefix_attributes)) - { - pop_function_context (); - YYERROR1; - } - parsing_iso_function_signature = false; /* Don't warn about nested functions. */ - } - old_style_parm_decls save_location - { tree decl = current_function_decl; - DECL_SOURCE_LOCATION (decl) = $4; - store_parm_decls (); } -/* This used to use compstmt_or_error. - That caused a bug with input `f(g) int g {}', - where the use of YYERROR1 above caused an error - which then was handled by compstmt_or_error. - There followed a repeated execution of that same rule, - which called YYERROR1 again, and so on. */ - compstmt - { tree decl = current_function_decl; - finish_function (); - pop_function_context (); - add_decl_stmt (decl); } - ; - -notype_nested_function: - notype_declarator - { if (pedantic) - pedwarn ("ISO C forbids nested functions"); - - push_function_context (); - if (! start_function (current_declspecs, $1, - all_prefix_attributes)) - { - pop_function_context (); - YYERROR1; - } - parsing_iso_function_signature = false; /* Don't warn about nested functions. */ - } - old_style_parm_decls save_location - { tree decl = current_function_decl; - DECL_SOURCE_LOCATION (decl) = $4; - store_parm_decls (); } -/* This used to use compstmt_or_error. - That caused a bug with input `f(g) int g {}', - where the use of YYERROR1 above caused an error - which then was handled by compstmt_or_error. - There followed a repeated execution of that same rule, - which called YYERROR1 again, and so on. */ - compstmt - { tree decl = current_function_decl; - finish_function (); - pop_function_context (); - add_decl_stmt (decl); } - ; - -/* Any kind of declarator (thus, all declarators allowed - after an explicit typespec). */ - -declarator: - after_type_declarator - | notype_declarator - ; - -/* A declarator that is allowed only after an explicit typespec. */ - -after_type_declarator: - '(' maybe_attribute after_type_declarator ')' - { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } - | after_type_declarator '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } -/* | after_type_declarator '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); - poplevel (0, 0, 0); } */ - | after_type_declarator array_declarator %prec '.' - { $$ = set_array_declarator_type ($2, $1, 0); } - | '*' maybe_type_quals_attrs after_type_declarator %prec UNARY - { $$ = make_pointer_declarator ($2, $3); } - | TYPENAME -@@ifobjc - | OBJECTNAME -@@end_ifobjc - ; - -/* Kinds of declarator that can appear in a parameter list - in addition to notype_declarator. This is like after_type_declarator - but does not allow a typedef name in parentheses as an identifier - (because it would conflict with a function with that typedef as arg). */ -parm_declarator: - parm_declarator_starttypename - | parm_declarator_nostarttypename - ; - -parm_declarator_starttypename: - parm_declarator_starttypename '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } -/* | parm_declarator_starttypename '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); - poplevel (0, 0, 0); } */ - | parm_declarator_starttypename array_declarator %prec '.' - { $$ = set_array_declarator_type ($2, $1, 0); } - | TYPENAME -@@ifobjc - | OBJECTNAME -@@end_ifobjc - ; - -parm_declarator_nostarttypename: - parm_declarator_nostarttypename '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } -/* | parm_declarator_nostarttypename '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); - poplevel (0, 0, 0); } */ - | parm_declarator_nostarttypename array_declarator %prec '.' - { $$ = set_array_declarator_type ($2, $1, 0); } - | '*' maybe_type_quals_attrs parm_declarator_starttypename %prec UNARY - { $$ = make_pointer_declarator ($2, $3); } - | '*' maybe_type_quals_attrs parm_declarator_nostarttypename %prec UNARY - { $$ = make_pointer_declarator ($2, $3); } - | '(' maybe_attribute parm_declarator_nostarttypename ')' - { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } - ; - -/* A declarator allowed whether or not there has been - an explicit typespec. These cannot redeclare a typedef-name. */ - -notype_declarator: - notype_declarator '(' parmlist_or_identifiers %prec '.' - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } -/* | notype_declarator '(' error ')' %prec '.' - { $$ = build_nt (CALL_EXPR, $1, NULL_TREE, NULL_TREE); - poplevel (0, 0, 0); } */ - | '(' maybe_attribute notype_declarator ')' - { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } - | '*' maybe_type_quals_attrs notype_declarator %prec UNARY - { $$ = make_pointer_declarator ($2, $3); } - | notype_declarator array_declarator %prec '.' - { $$ = set_array_declarator_type ($2, $1, 0); } - | IDENTIFIER - ; - -struct_head: - STRUCT - { $$ = NULL_TREE; } - | STRUCT attributes - { $$ = $2; } - ; - -union_head: - UNION - { $$ = NULL_TREE; } - | UNION attributes - { $$ = $2; } - ; - -enum_head: - ENUM - { $$ = NULL_TREE; } - | ENUM attributes - { $$ = $2; } - ; - -/* structsp_attr: struct/union/enum specifiers that either - end with attributes, or are such that any following attributes would - be parsed as part of the struct/union/enum specifier. - - structsp_nonattr: other struct/union/enum specifiers. */ - -structsp_attr: - struct_head identifier '{' - { $$ = start_struct (RECORD_TYPE, $2); - /* Start scope of tag before parsing components. */ - } - component_decl_list '}' maybe_attribute - { $$ = finish_struct ($4, nreverse ($5), - chainon ($1, $7)); } - | struct_head '{' component_decl_list '}' maybe_attribute - { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), - nreverse ($3), chainon ($1, $5)); - } - | union_head identifier '{' - { $$ = start_struct (UNION_TYPE, $2); } - component_decl_list '}' maybe_attribute - { $$ = finish_struct ($4, nreverse ($5), - chainon ($1, $7)); } - | union_head '{' component_decl_list '}' maybe_attribute - { $$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE), - nreverse ($3), chainon ($1, $5)); - } - | enum_head identifier '{' - { $$ = start_enum ($2); } - enumlist maybecomma_warn '}' maybe_attribute - { $$ = finish_enum ($4, nreverse ($5), - chainon ($1, $8)); } - | enum_head '{' - { $$ = start_enum (NULL_TREE); } - enumlist maybecomma_warn '}' maybe_attribute - { $$ = finish_enum ($3, nreverse ($4), - chainon ($1, $7)); } - ; - -structsp_nonattr: - struct_head identifier - { $$ = xref_tag (RECORD_TYPE, $2); } - | union_head identifier - { $$ = xref_tag (UNION_TYPE, $2); } - | enum_head identifier - { $$ = xref_tag (ENUMERAL_TYPE, $2); - /* In ISO C, enumerated types can be referred to - only if already defined. */ - if (pedantic && !COMPLETE_TYPE_P ($$)) - pedwarn ("ISO C forbids forward references to `enum' types"); } - ; - -maybecomma: - /* empty */ - | ',' - ; - -maybecomma_warn: - /* empty */ - | ',' - { if (pedantic && ! flag_isoc99) - pedwarn ("comma at end of enumerator list"); } - ; - -/* We chain the components in reverse order. They are put in forward - order in structsp_attr. - - Note that component_declarator returns single decls, so components - and components_notype can use TREE_CHAIN directly, wheras components - and components_notype return lists (of comma separated decls), so - component_decl_list and component_decl_list2 must use chainon. - - The theory behind all this is that there will be more semicolon - separated fields than comma separated fields, and so we'll be - minimizing the number of node traversals required by chainon. */ - -component_decl_list: - component_decl_list2 - { $$ = $1; } - | component_decl_list2 component_decl - { $$ = chainon ($2, $1); - pedwarn ("no semicolon at end of struct or union"); } - ; - -component_decl_list2: /* empty */ - { $$ = NULL_TREE; } - | component_decl_list2 component_decl ';' - { $$ = chainon ($2, $1); } - | component_decl_list2 ';' - { if (pedantic) - pedwarn ("extra semicolon in struct or union specified"); } -@@ifobjc - /* foo(sizeof(struct{ @defs(ClassName)})); */ - | DEFS '(' CLASSNAME ')' - { $$ = nreverse (get_class_ivars_from_name ($3)); } -@@end_ifobjc - ; - -component_decl: - declspecs_nosc_ts setspecs components - { $$ = $3; - POP_DECLSPEC_STACK; } - | declspecs_nosc_ts setspecs - { - /* 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"); - - $$ = grokfield(NULL, current_declspecs, NULL_TREE); - POP_DECLSPEC_STACK; } - | declspecs_nosc_nots setspecs components_notype - { $$ = $3; - POP_DECLSPEC_STACK; } - | declspecs_nosc_nots - { if (pedantic) - pedwarn ("ISO C forbids member declarations with no members"); - shadow_tag_warned ($1, pedantic); - $$ = NULL_TREE; } - | error - { $$ = NULL_TREE; } - | extension component_decl - { $$ = $2; - RESTORE_EXT_FLAGS ($1); } - ; - -components: - component_declarator - | components ',' maybe_resetattrs component_declarator - { TREE_CHAIN ($4) = $1; $$ = $4; } - ; - -components_notype: - component_notype_declarator - | components_notype ',' maybe_resetattrs component_notype_declarator - { TREE_CHAIN ($4) = $1; $$ = $4; } - ; - -component_declarator: - declarator maybe_attribute - { $$ = grokfield ($1, current_declspecs, NULL_TREE); - decl_attributes (&$$, - chainon ($2, all_prefix_attributes), 0); } - | declarator ':' expr_no_commas maybe_attribute - { $$ = grokfield ($1, current_declspecs, $3); - decl_attributes (&$$, - chainon ($4, all_prefix_attributes), 0); } - | ':' expr_no_commas maybe_attribute - { $$ = grokfield (NULL_TREE, current_declspecs, $2); - decl_attributes (&$$, - chainon ($3, all_prefix_attributes), 0); } - ; - -component_notype_declarator: - notype_declarator maybe_attribute - { $$ = grokfield ($1, current_declspecs, NULL_TREE); - decl_attributes (&$$, - chainon ($2, all_prefix_attributes), 0); } - | notype_declarator ':' expr_no_commas maybe_attribute - { $$ = grokfield ($1, current_declspecs, $3); - decl_attributes (&$$, - chainon ($4, all_prefix_attributes), 0); } - | ':' expr_no_commas maybe_attribute - { $$ = grokfield (NULL_TREE, current_declspecs, $2); - decl_attributes (&$$, - chainon ($3, all_prefix_attributes), 0); } - ; - -/* We chain the enumerators in reverse order. - They are put in forward order in structsp_attr. */ - -enumlist: - enumerator - | enumlist ',' enumerator - { if ($1 == error_mark_node) - $$ = $1; - else - TREE_CHAIN ($3) = $1, $$ = $3; } - | error - { $$ = error_mark_node; } - ; - - -enumerator: - identifier - { $$ = build_enumerator ($1, NULL_TREE); } - | identifier '=' expr_no_commas - { $$ = build_enumerator ($1, $3); } - ; - -typename: - declspecs_nosc - { pending_xref_error (); - $$ = $1; } - absdcl - { $$ = build_tree_list ($2, $3); } - ; - -absdcl: /* an absolute declarator */ - /* empty */ - { $$ = NULL_TREE; } - | absdcl1 - ; - -absdcl_maybe_attribute: /* absdcl maybe_attribute, but not just attributes */ - /* empty */ - { $$ = build_tree_list (build_tree_list (current_declspecs, - NULL_TREE), - all_prefix_attributes); } - | absdcl1 - { $$ = build_tree_list (build_tree_list (current_declspecs, - $1), - all_prefix_attributes); } - | absdcl1_noea attributes - { $$ = build_tree_list (build_tree_list (current_declspecs, - $1), - chainon ($2, all_prefix_attributes)); } - ; - -absdcl1: /* a nonempty absolute declarator */ - absdcl1_ea - | absdcl1_noea - ; - -absdcl1_noea: - direct_absdcl1 - | '*' maybe_type_quals_attrs absdcl1_noea - { $$ = make_pointer_declarator ($2, $3); } - ; - -absdcl1_ea: - '*' maybe_type_quals_attrs - { $$ = make_pointer_declarator ($2, NULL_TREE); } - | '*' maybe_type_quals_attrs absdcl1_ea - { $$ = make_pointer_declarator ($2, $3); } - ; - -direct_absdcl1: - '(' maybe_attribute absdcl1 ')' - { $$ = $2 ? tree_cons ($2, $3, NULL_TREE) : $3; } - | direct_absdcl1 '(' parmlist - { $$ = build_nt (CALL_EXPR, $1, $3, NULL_TREE); } - | direct_absdcl1 array_declarator - { $$ = set_array_declarator_type ($2, $1, 1); } - | '(' parmlist - { $$ = build_nt (CALL_EXPR, NULL_TREE, $2, NULL_TREE); } - | array_declarator - { $$ = set_array_declarator_type ($1, NULL_TREE, 1); } - ; - -/* The [...] part of a declarator for an array type. */ - -array_declarator: - '[' maybe_type_quals_attrs expr_no_commas ']' - { $$ = build_array_declarator ($3, $2, 0, 0); } - | '[' maybe_type_quals_attrs ']' - { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } - | '[' maybe_type_quals_attrs '*' ']' - { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } - | '[' STATIC maybe_type_quals_attrs expr_no_commas ']' - { $$ = build_array_declarator ($4, $3, 1, 0); } - /* declspecs_nosc_nots is a synonym for type_quals_attrs. */ - | '[' declspecs_nosc_nots STATIC expr_no_commas ']' - { $$ = build_array_declarator ($4, $2, 1, 0); } - ; - -/* A nonempty series of declarations and statements (possibly followed by - some labels) that can form the body of a compound statement. - NOTE: we don't allow labels on declarations; this might seem like a - natural extension, but there would be a conflict between attributes - on the label and prefix attributes on the declaration. */ - -stmts_and_decls: - lineno_stmt_decl_or_labels_ending_stmt - | lineno_stmt_decl_or_labels_ending_decl - | lineno_stmt_decl_or_labels_ending_label - { - error ("label at end of compound statement"); - } - | lineno_stmt_decl_or_labels_ending_error - ; - -lineno_stmt_decl_or_labels_ending_stmt: - lineno_stmt - | lineno_stmt_decl_or_labels_ending_stmt lineno_stmt - | lineno_stmt_decl_or_labels_ending_decl lineno_stmt - | lineno_stmt_decl_or_labels_ending_label lineno_stmt - | lineno_stmt_decl_or_labels_ending_error lineno_stmt - ; - -lineno_stmt_decl_or_labels_ending_decl: - lineno_decl - | lineno_stmt_decl_or_labels_ending_stmt lineno_decl - { - if ((pedantic && !flag_isoc99) - || warn_declaration_after_statement) - pedwarn_c90 ("ISO C90 forbids mixed declarations and code"); - } - | lineno_stmt_decl_or_labels_ending_decl lineno_decl - | lineno_stmt_decl_or_labels_ending_error lineno_decl - ; - -lineno_stmt_decl_or_labels_ending_label: - lineno_label - | lineno_stmt_decl_or_labels_ending_stmt lineno_label - | lineno_stmt_decl_or_labels_ending_decl lineno_label - | lineno_stmt_decl_or_labels_ending_label lineno_label - | lineno_stmt_decl_or_labels_ending_error lineno_label - ; - -lineno_stmt_decl_or_labels_ending_error: - errstmt - | lineno_stmt_decl_or_labels errstmt - ; - -lineno_stmt_decl_or_labels: - lineno_stmt_decl_or_labels_ending_stmt - | lineno_stmt_decl_or_labels_ending_decl - | lineno_stmt_decl_or_labels_ending_label - | lineno_stmt_decl_or_labels_ending_error - ; - -errstmt: error ';' - ; - -pushlevel: /* empty */ - { pushlevel (0); - clear_last_expr (); - add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); - } - ; - -poplevel: /* empty */ - { -@@ifobjc - if (c_dialect_objc ()) - objc_clear_super_receiver (); -@@end_ifobjc - $$ = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); - } - ; - -/* Start and end blocks created for the new scopes of C99. */ -c99_block_start: /* empty */ - { if (flag_isoc99) - { - $$ = c_begin_compound_stmt (); - pushlevel (0); - clear_last_expr (); - add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); - } - else - $$ = NULL_TREE; - } - ; - -/* Productions using c99_block_start and c99_block_end will need to do what's - in compstmt: RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); $$ = $2; where - $1 is the value of c99_block_start and $2 of c99_block_end. */ -c99_block_end: /* empty */ - { if (flag_isoc99) - { - tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); - $$ = poplevel (KEEP_MAYBE, 0, 0); - SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) - = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) - = $$; - } - else - $$ = NULL_TREE; } - ; - -/* Read zero or more forward-declarations for labels - that nested functions can jump to. */ -maybe_label_decls: - /* empty */ - | label_decls - { if (pedantic) - pedwarn ("ISO C forbids label declarations"); } - ; - -label_decls: - label_decl - | label_decls label_decl - ; - -label_decl: - LABEL identifiers_or_typenames ';' - { tree link; - for (link = $2; link; link = TREE_CHAIN (link)) - { - tree label = declare_label (TREE_VALUE (link)); - C_DECLARED_LABEL_FLAG (label) = 1; - add_decl_stmt (label); - } - } - ; - -/* This is the body of a function definition. - It causes syntax errors to ignore to the next openbrace. */ -compstmt_or_error: - compstmt - {} - | error compstmt - ; - -compstmt_start: '{' { compstmt_count++; - $$ = c_begin_compound_stmt (); } - ; - -compstmt_nostart: '}' - { $$ = convert (void_type_node, integer_zero_node); } - | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel - { $$ = poplevel (KEEP_MAYBE, 0, 0); - SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) - = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) - = $$; } - ; - -compstmt_contents_nonempty: - stmts_and_decls - | error - ; - -compstmt_primary_start: - '(' '{' - { if (last_tree == NULL) - { - error ("braced-group within expression allowed only inside a function"); - YYERROR; - } - /* We must force a BLOCK for this level - so that, if it is not expanded later, - there is a way to turn off the entire subtree of blocks - that are contained in it. */ - keep_next_level (); - compstmt_count++; - $$ = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); - last_expr_type = NULL_TREE; - } - ; - -compstmt: compstmt_start compstmt_nostart - { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); - last_expr_type = NULL_TREE; - $$ = $1; } - ; - -/* Value is number of statements counted as of the closeparen. */ -simple_if: - if_prefix c99_block_lineno_labeled_stmt - { c_finish_then (); } -/* Make sure c_expand_end_cond is run once - for each call to c_expand_start_cond. - Otherwise a crash is likely. */ - | if_prefix error - ; - -if_prefix: - /* We must build the IF_STMT node before parsing its - condition so that STMT_LINENO refers to the line - containing the "if", and not the line containing - the close-parenthesis. - - c_begin_if_stmt returns the IF_STMT node, which - we later pass to c_expand_start_cond to fill - in the condition and other tidbits. */ - IF - { $$ = c_begin_if_stmt (); } - '(' expr ')' - { c_expand_start_cond (c_common_truthvalue_conversion ($4), - compstmt_count,$2); - $$ = stmt_count; - if_stmt_locus = $-1; } - ; - -/* This is a subroutine of stmt. - It is used twice, once for valid DO statements - and once for catching errors in parsing the end test. */ -do_stmt_start: - DO - { stmt_count++; - compstmt_count++; - c_in_iteration_stmt++; - $$ - = add_stmt (build_stmt (DO_STMT, NULL_TREE, - NULL_TREE)); - /* In the event that a parse error prevents - parsing the complete do-statement, set the - condition now. Otherwise, we can get crashes at - RTL-generation time. */ - DO_COND ($$) = error_mark_node; } - c99_block_lineno_labeled_stmt WHILE - { $$ = $2; - RECHAIN_STMTS ($$, DO_BODY ($$)); - c_in_iteration_stmt--; } - ; - -/* The forced readahead in here is because we might be at the end of a - line, and the line and file won't be bumped until yylex absorbs the - first token on the next line. */ - -save_location: - { if (yychar == YYEMPTY) - yychar = YYLEX; - $$ = input_location; } - ; - -lineno_labeled_stmt: - lineno_stmt - | lineno_label lineno_labeled_stmt - ; - -/* Like lineno_labeled_stmt, but a block in C99. */ -c99_block_lineno_labeled_stmt: - c99_block_start lineno_labeled_stmt c99_block_end - { if (flag_isoc99) - RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); } - ; - -lineno_stmt: - save_location stmt - { if ($2) - { - STMT_LINENO ($2) = $1.line; - /* ??? We currently have no way of recording - the filename for a statement. This probably - matters little in practice at the moment, - but I suspect that problems will occur when - doing inlining at the tree level. */ - } - } - ; - -lineno_label: - save_location label - { if ($2) - { - STMT_LINENO ($2) = $1.line; - } - } - ; - -select_or_iter_stmt: - simple_if ELSE - { c_expand_start_else (); - $1 = stmt_count; } - c99_block_lineno_labeled_stmt - { c_finish_else (); - c_expand_end_cond (); - if (extra_warnings && stmt_count == $1) - warning ("empty body in an else-statement"); } - | simple_if %prec IF - { c_expand_end_cond (); - /* This warning is here instead of in simple_if, because we - do not want a warning if an empty if is followed by an - else statement. Increment stmt_count so we don't - give a second error if this is a nested `if'. */ - if (extra_warnings && stmt_count++ == $1) - warning ("%Hempty body in an if-statement", - &if_stmt_locus); } -/* Make sure c_expand_end_cond is run once - for each call to c_expand_start_cond. - Otherwise a crash is likely. */ - | simple_if ELSE error - { c_expand_end_cond (); } - /* We must build the WHILE_STMT node before parsing its - condition so that STMT_LINENO refers to the line - containing the "while", and not the line containing - the close-parenthesis. - - c_begin_while_stmt returns the WHILE_STMT node, which - we later pass to c_finish_while_stmt_cond to fill - in the condition and other tidbits. */ - | WHILE - { stmt_count++; - $$ = c_begin_while_stmt (); } - '(' expr ')' - { c_in_iteration_stmt++; - $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 - { c_in_iteration_stmt--; - RECHAIN_STMTS ($6, WHILE_BODY ($6)); } - | do_stmt_start - '(' expr ')' ';' - { DO_COND ($1) = c_common_truthvalue_conversion ($3); } - | do_stmt_start error - { } - | FOR - { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, - NULL_TREE, NULL_TREE); - add_stmt ($$); } - '(' for_init_stmt - { stmt_count++; - RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } - xexpr ';' - { if ($6) - FOR_COND ($2) - = c_common_truthvalue_conversion ($6); } - xexpr ')' - { c_in_iteration_stmt++; - FOR_EXPR ($2) = $9; } - c99_block_lineno_labeled_stmt - { RECHAIN_STMTS ($2, FOR_BODY ($2)); - c_in_iteration_stmt--;} - | SWITCH '(' expr ')' - { stmt_count++; - $$ = c_start_case ($3); - c_in_case_stmt++; } - c99_block_lineno_labeled_stmt - { c_finish_case (); - c_in_case_stmt--; } - ; - -for_init_stmt: - xexpr ';' - { add_stmt (build_stmt (EXPR_STMT, $1)); } - | decl - { check_for_loop_decls (); } - ; - -/* Parse a single real statement, not including any labels. */ -stmt: - compstmt - { stmt_count++; $$ = $1; } - | expr ';' - { stmt_count++; - $$ = c_expand_expr_stmt ($1); } - | c99_block_start select_or_iter_stmt c99_block_end - { if (flag_isoc99) - RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); - $$ = NULL_TREE; } - | BREAK ';' - { stmt_count++; - if (!(c_in_iteration_stmt || c_in_case_stmt)) - { - error ("break statement not within loop or switch"); - $$ = NULL_TREE; - } - else - $$ = add_stmt (build_break_stmt ()); } - | CONTINUE ';' - { stmt_count++; - if (!c_in_iteration_stmt) - { - error ("continue statement not within a loop"); - $$ = NULL_TREE; - } - else - $$ = add_stmt (build_continue_stmt ()); } - | RETURN ';' - { stmt_count++; - $$ = c_expand_return (NULL_TREE); } - | RETURN expr ';' - { stmt_count++; - $$ = c_expand_return ($2); } - | ASM_KEYWORD maybe_type_qual '(' expr ')' ';' - { stmt_count++; - $$ = simple_asm_stmt ($4); } - /* This is the case with just output operands. */ - | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ')' ';' - { stmt_count++; - $$ = build_asm_stmt ($2, $4, $6, NULL_TREE, NULL_TREE); } - /* This is the case with input operands as well. */ - | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' - asm_operands ')' ';' - { stmt_count++; - $$ = build_asm_stmt ($2, $4, $6, $8, NULL_TREE); } - /* This is the case with clobbered registers as well. */ - | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' - asm_operands ':' asm_clobbers ')' ';' - { stmt_count++; - $$ = build_asm_stmt ($2, $4, $6, $8, $10); } - | GOTO identifier ';' - { tree decl; - stmt_count++; - decl = lookup_label ($2); - if (decl != 0) - { - TREE_USED (decl) = 1; - $$ = add_stmt (build_stmt (GOTO_STMT, decl)); - } - else - $$ = NULL_TREE; - } - | GOTO '*' expr ';' - { if (pedantic) - pedwarn ("ISO C forbids `goto *expr;'"); - stmt_count++; - $3 = convert (ptr_type_node, $3); - $$ = add_stmt (build_stmt (GOTO_STMT, $3)); } - | ';' - { $$ = NULL_TREE; } -@@ifobjc - | AT_THROW expr ';' - { stmt_count++; - $$ = objc_build_throw_stmt ($2); - } - | AT_THROW ';' - { stmt_count++; - $$ = objc_build_throw_stmt (NULL_TREE); - } - | objc_try_catch_stmt - { objc_build_finally_prologue (); } - objc_finally_block - { $$ = objc_build_try_catch_finally_stmt ($1, $3); } - | AT_SYNCHRONIZED '(' expr ')' - { objc_build_synchronized_prologue ($3); } - compstmt - { $$ = objc_build_synchronized_epilogue (); } - ; - -objc_try_catch_stmt: - objc_try_stmt - { objc_build_try_epilogue (1); } - objc_catch_list - { objc_build_catch_epilogue (); $$ = 1; } - | objc_try_stmt - { objc_build_try_epilogue (0); $$ = 0; } - ; - - -objc_try_stmt: - AT_TRY - { objc_build_try_prologue (); } - compstmt - ; - -objc_catch_list: - objc_catch_list objc_catch_block - | objc_catch_block - ; - -objc_catch_block: - AT_CATCH '(' parm ')' - { objc_build_catch_stmt ($3); } - compstmt - { stmt_count++; } - ; - -objc_finally_block: - AT_FINALLY compstmt - { $$ = 1; } - | /* NULL */ - { $$ = 0; } -@@end_ifobjc - ; - -/* Any kind of label, including jump labels and case labels. - ANSI C accepts labels only before statements, but we allow them - also at the end of a compound statement. */ - -label: CASE expr_no_commas ':' - { stmt_count++; - $$ = do_case ($2, NULL_TREE); } - | CASE expr_no_commas ELLIPSIS expr_no_commas ':' - { stmt_count++; - $$ = do_case ($2, $4); } - | DEFAULT ':' - { stmt_count++; - $$ = do_case (NULL_TREE, NULL_TREE); } - | identifier save_location ':' maybe_attribute - { tree label = define_label ($2, $1); - stmt_count++; - if (label) - { - decl_attributes (&label, $4, 0); - $$ = add_stmt (build_stmt (LABEL_STMT, label)); - } - else - $$ = NULL_TREE; - } - ; - -/* Either a type-qualifier or nothing. First thing in an `asm' statement. */ - -maybe_type_qual: - /* empty */ - { $$ = NULL_TREE; } - | TYPE_QUAL - { } - ; - -xexpr: - /* empty */ - { $$ = NULL_TREE; } - | expr - ; - -/* These are the operands other than the first string and colon - in asm ("addextend %2,%1": "=dm" (x), "0" (y), "g" (*x)) */ -asm_operands: /* empty */ - { $$ = NULL_TREE; } - | nonnull_asm_operands - ; - -nonnull_asm_operands: - asm_operand - | nonnull_asm_operands ',' asm_operand - { $$ = chainon ($1, $3); } - ; - -asm_operand: - STRING '(' expr ')' - { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } - | '[' identifier ']' STRING '(' expr ')' - { $2 = build_string (IDENTIFIER_LENGTH ($2), - IDENTIFIER_POINTER ($2)); - $$ = build_tree_list (build_tree_list ($2, $4), $6); } - ; - -asm_clobbers: - STRING - { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } - | asm_clobbers ',' STRING - { $$ = tree_cons (NULL_TREE, $3, $1); } - ; - -/* This is what appears inside the parens in a function declarator. - Its value is a list of ..._TYPE nodes. Attributes must appear here - to avoid a conflict with their appearance after an open parenthesis - in an abstract declarator, as in - "void bar (int (__attribute__((__mode__(SI))) int foo));". */ -parmlist: - maybe_attribute - { pushlevel (0); - declare_parm_level (); } - parmlist_1 - { $$ = $3; - poplevel (0, 0, 0); } - ; - -parmlist_1: - parmlist_2 ')' - | parms ';' - { mark_forward_parm_decls (); } - maybe_attribute - { /* Dummy action so attributes are in known place - on parser stack. */ } - parmlist_1 - { $$ = $6; } - | error ')' - { $$ = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); } - ; - -/* This is what appears inside the parens in a function declarator. - Is value is represented in the format that grokdeclarator expects. */ -parmlist_2: /* empty */ - { $$ = get_parm_info (0); } - | ELLIPSIS - { $$ = get_parm_info (0); - /* Gcc used to allow this as an extension. However, it does - not work for all targets, and thus has been disabled. - Also, since func (...) and func () are indistinguishable, - it caused problems with the code in expand_builtin which - tries to verify that BUILT_IN_NEXT_ARG is being used - correctly. */ - error ("ISO C requires a named argument before `...'"); - parsing_iso_function_signature = true; - } - | parms - { $$ = get_parm_info (1); - parsing_iso_function_signature = true; - } - | parms ',' ELLIPSIS - { $$ = get_parm_info (0); - parsing_iso_function_signature = true; - } - ; - -parms: - firstparm - { push_parm_decl ($1); } - | parms ',' parm - { push_parm_decl ($3); } - ; - -/* A single parameter declaration or parameter type name, - as found in a parmlist. */ -parm: - declspecs_ts setspecs parm_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $3), - chainon ($4, all_prefix_attributes)); - POP_DECLSPEC_STACK; } - | declspecs_ts setspecs notype_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $3), - chainon ($4, all_prefix_attributes)); - POP_DECLSPEC_STACK; } - | declspecs_ts setspecs absdcl_maybe_attribute - { $$ = $3; - POP_DECLSPEC_STACK; } - | declspecs_nots setspecs notype_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $3), - chainon ($4, all_prefix_attributes)); - POP_DECLSPEC_STACK; } - - | declspecs_nots setspecs absdcl_maybe_attribute - { $$ = $3; - POP_DECLSPEC_STACK; } - ; - -/* The first parm, which must suck attributes from off the top of the parser - stack. */ -firstparm: - declspecs_ts_nosa setspecs_fp parm_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $3), - chainon ($4, all_prefix_attributes)); - POP_DECLSPEC_STACK; } - | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $3), - chainon ($4, all_prefix_attributes)); - POP_DECLSPEC_STACK; } - | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute - { $$ = $3; - POP_DECLSPEC_STACK; } - | declspecs_nots_nosa setspecs_fp notype_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $3), - chainon ($4, all_prefix_attributes)); - POP_DECLSPEC_STACK; } - - | declspecs_nots_nosa setspecs_fp absdcl_maybe_attribute - { $$ = $3; - POP_DECLSPEC_STACK; } - ; - -setspecs_fp: - setspecs - { prefix_attributes = chainon (prefix_attributes, $-2); - all_prefix_attributes = prefix_attributes; } - ; - -/* This is used in a function definition - where either a parmlist or an identifier list is ok. - Its value is a list of ..._TYPE nodes or a list of identifiers. */ -parmlist_or_identifiers: - maybe_attribute - { pushlevel (0); - declare_parm_level (); } - parmlist_or_identifiers_1 - { $$ = $3; - poplevel (0, 0, 0); } - ; - -parmlist_or_identifiers_1: - parmlist_1 - | identifiers ')' - { tree t; - for (t = $1; t; t = TREE_CHAIN (t)) - if (TREE_VALUE (t) == NULL_TREE) - error ("`...' in old-style identifier list"); - $$ = tree_cons (NULL_TREE, NULL_TREE, $1); - - /* Make sure we have a parmlist after attributes. */ - if ($-1 != 0 - && (TREE_CODE ($$) != TREE_LIST - || TREE_PURPOSE ($$) == 0 - || TREE_CODE (TREE_PURPOSE ($$)) != PARM_DECL)) - YYERROR1; - } - ; - -/* A nonempty list of identifiers. */ -identifiers: - IDENTIFIER - { $$ = build_tree_list (NULL_TREE, $1); } - | identifiers ',' IDENTIFIER - { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } - ; - -/* A nonempty list of identifiers, including typenames. */ -identifiers_or_typenames: - identifier - { $$ = build_tree_list (NULL_TREE, $1); } - | identifiers_or_typenames ',' identifier - { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } - ; - -extension: - EXTENSION - { $$ = SAVE_EXT_FLAGS(); - pedantic = 0; - warn_pointer_arith = 0; - warn_traditional = 0; - flag_iso = 0; } - ; - -@@ifobjc -/* Objective-C productions. */ - -objcdef: - classdef - | classdecl - | aliasdecl - | protocoldef - | methoddef - | END - { - if (objc_implementation_context) - { - finish_class (objc_implementation_context); - objc_ivar_chain = NULL_TREE; - objc_implementation_context = NULL_TREE; - } - else - warning ("`@end' must appear in an implementation context"); - } - ; - -/* A nonempty list of identifiers. */ -identifier_list: - identifier - { $$ = build_tree_list (NULL_TREE, $1); } - | identifier_list ',' identifier - { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } - ; - -classdecl: - CLASS identifier_list ';' - { - objc_declare_class ($2); - } - ; - -aliasdecl: - ALIAS identifier identifier ';' - { - objc_declare_alias ($2, $3); - } - ; - -superclass: - ':' identifier { $$ = $2; } - | /* NULL */ %prec HYPERUNARY { $$ = NULL_TREE; } - ; - -class_ivars: - '{' ivar_decl_list '}' - | /* NULL */ - ; - -classdef: - INTERFACE identifier superclass protocolrefs - { - objc_interface_context = objc_ivar_context - = start_class (CLASS_INTERFACE_TYPE, $2, $3, $4); - objc_public_flag = 0; - } - class_ivars - { - continue_class (objc_interface_context); - } - methodprotolist END - { - finish_class (objc_interface_context); - objc_interface_context = NULL_TREE; - } - - | IMPLEMENTATION identifier superclass - { - objc_implementation_context = objc_ivar_context - = start_class (CLASS_IMPLEMENTATION_TYPE, $2, $3, NULL_TREE); - objc_public_flag = 0; - } - class_ivars - { - objc_ivar_chain - = continue_class (objc_implementation_context); - } - - | INTERFACE identifier '(' identifier ')' protocolrefs - { - objc_interface_context - = start_class (CATEGORY_INTERFACE_TYPE, $2, $4, $6); - continue_class (objc_interface_context); - } - methodprotolist END - { - finish_class (objc_interface_context); - objc_interface_context = NULL_TREE; - } - - | IMPLEMENTATION identifier '(' identifier ')' - { - objc_implementation_context - = start_class (CATEGORY_IMPLEMENTATION_TYPE, $2, $4, NULL_TREE); - objc_ivar_chain - = continue_class (objc_implementation_context); - } - ; - -protocoldef: - PROTOCOL identifier protocolrefs - { - objc_pq_context = 1; - objc_interface_context - = start_protocol(PROTOCOL_INTERFACE_TYPE, $2, $3); - } - methodprotolist END - { - objc_pq_context = 0; - finish_protocol(objc_interface_context); - objc_interface_context = NULL_TREE; - } - /* The @protocol forward-declaration production introduces a - reduce/reduce conflict on ';', which should be resolved in - favor of the production 'identifier_list -> identifier'. */ - | PROTOCOL identifier_list ';' - { - objc_declare_protocols ($2); - } - ; - -protocolrefs: - /* empty */ - { - $$ = NULL_TREE; - } - | non_empty_protocolrefs - ; - -non_empty_protocolrefs: - ARITHCOMPARE identifier_list ARITHCOMPARE - { - if ($1 == LT_EXPR && $3 == GT_EXPR) - $$ = $2; - else - YYERROR1; - } - ; - -ivar_decl_list: - ivar_decl_list visibility_spec ivar_decls - | ivar_decls - ; - -visibility_spec: - PRIVATE { objc_public_flag = 2; } - | PROTECTED { objc_public_flag = 0; } - | PUBLIC { objc_public_flag = 1; } - ; - -ivar_decls: - /* empty */ - { - $$ = NULL_TREE; - } - | ivar_decls ivar_decl ';' - | ivar_decls ';' - { - if (pedantic) - pedwarn ("extra semicolon in struct or union specified"); - } - ; - - -/* There is a shift-reduce conflict here, because `components' may - start with a `typename'. It happens that shifting (the default resolution) - does the right thing, because it treats the `typename' as part of - a `typed_typespecs'. - - It is possible that this same technique would allow the distinction - between `notype_initdecls' and `initdecls' to be eliminated. - But I am being cautious and not trying it. */ - -ivar_decl: - declspecs_nosc_ts setspecs ivars - { $$ = $3; - POP_DECLSPEC_STACK; } - | declspecs_nosc_nots setspecs ivars - { $$ = $3; - POP_DECLSPEC_STACK; } - | error - { $$ = NULL_TREE; } - ; - -ivars: - /* empty */ - { $$ = NULL_TREE; } - | ivar_declarator - | ivars ',' maybe_resetattrs ivar_declarator - ; - -ivar_declarator: - declarator - { - $$ = add_instance_variable (objc_ivar_context, - objc_public_flag, - $1, current_declspecs, - NULL_TREE); - } - | declarator ':' expr_no_commas - { - $$ = add_instance_variable (objc_ivar_context, - objc_public_flag, - $1, current_declspecs, $3); - } - | ':' expr_no_commas - { - $$ = add_instance_variable (objc_ivar_context, - objc_public_flag, - NULL_TREE, - current_declspecs, $2); - } - ; - -methodtype: - '+' - { objc_inherit_code = CLASS_METHOD_DECL; } - | '-' - { objc_inherit_code = INSTANCE_METHOD_DECL; } - ; - -methoddef: - methodtype - { - objc_pq_context = 1; - if (!objc_implementation_context) - fatal_error ("method definition not in class context"); - } - methoddecl - { - objc_pq_context = 0; - objc_add_method (objc_implementation_context, - $3, - objc_inherit_code == CLASS_METHOD_DECL); - start_method_def ($3); - } - optarglist - { - continue_method_def (); - } - compstmt_or_error - { - finish_method_def (); - } - ; - -/* the reason for the strange actions in this rule - is so that notype_initdecls when reached via datadef - can find a valid list of type and sc specs in $0. */ - -methodprotolist: - /* empty */ - | methodprotolist methodproto - | methodprotolist { $$ = NULL_TREE; } datadef - ; - -semi_or_error: - ';' - | error - ; - -methodproto: - methodtype - { - /* Remember protocol qualifiers in prototypes. */ - objc_pq_context = 1; - } - methoddecl - { - /* Forget protocol qualifiers here. */ - objc_pq_context = 0; - objc_add_method (objc_interface_context, - $3, - objc_inherit_code == CLASS_METHOD_DECL); - } - semi_or_error - ; - -methoddecl: - '(' typename ')' unaryselector - { - $$ = build_method_decl (objc_inherit_code, $2, $4, NULL_TREE); - } - - | unaryselector - { - $$ = build_method_decl (objc_inherit_code, NULL_TREE, $1, NULL_TREE); - } - - | '(' typename ')' keywordselector optparmlist - { - $$ = build_method_decl (objc_inherit_code, $2, $4, $5); - } - - | keywordselector optparmlist - { - $$ = build_method_decl (objc_inherit_code, NULL_TREE, $1, $2); - } - ; - -/* "optarglist" assumes that start_method_def has already been called... - if it is not, the "xdecls" will not be placed in the proper scope */ - -optarglist: - /* empty */ - | ';' myxdecls - ; - -/* to get around the following situation: "int foo (int a) int b; {}" that - is synthesized when parsing "- a:a b:b; id c; id d; { ... }" */ - -myxdecls: - /* empty */ - | mydecls - ; - -mydecls: - mydecl - | errstmt - | mydecls mydecl - | mydecl errstmt - ; - -mydecl: - declspecs_ts setspecs myparms ';' - { POP_DECLSPEC_STACK; } - | declspecs_ts ';' - { shadow_tag ($1); } - | declspecs_nots ';' - { pedwarn ("empty declaration"); } - ; - -myparms: - myparm - { push_parm_decl ($1); } - | myparms ',' myparm - { push_parm_decl ($3); } - ; - -/* A single parameter declaration or parameter type name, - as found in a parmlist. DOES NOT ALLOW AN INITIALIZER OR ASMSPEC */ - -myparm: - parm_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $1), - chainon ($2, all_prefix_attributes)); } - | notype_declarator maybe_attribute - { $$ = build_tree_list (build_tree_list (current_declspecs, - $1), - chainon ($2, all_prefix_attributes)); } - | absdcl_maybe_attribute - { $$ = $1; } - ; - -optparmlist: - /* empty */ - { - $$ = NULL_TREE; - } - | ',' ELLIPSIS - { - /* oh what a kludge! */ - $$ = objc_ellipsis_node; - } - | ',' - { - pushlevel (0); - } - parmlist_2 - { - /* returns a tree list node generated by get_parm_info */ - $$ = $3; - poplevel (0, 0, 0); - } - ; - -unaryselector: - selector - ; - -keywordselector: - keyworddecl - - | keywordselector keyworddecl - { - $$ = chainon ($1, $2); - } - ; - -selector: - IDENTIFIER - | TYPENAME - | CLASSNAME - | OBJECTNAME - | reservedwords - ; - -reservedwords: - ENUM | STRUCT | UNION | IF | ELSE | WHILE | DO | FOR - | SWITCH | CASE | DEFAULT | BREAK | CONTINUE | RETURN - | GOTO | ASM_KEYWORD | SIZEOF | TYPEOF | ALIGNOF - | TYPESPEC | TYPE_QUAL - ; - -keyworddecl: - selector ':' '(' typename ')' identifier - { - $$ = build_keyword_decl ($1, $4, $6); - } - - | selector ':' identifier - { - $$ = build_keyword_decl ($1, NULL_TREE, $3); - } - - | ':' '(' typename ')' identifier - { - $$ = build_keyword_decl (NULL_TREE, $3, $5); - } - - | ':' identifier - { - $$ = build_keyword_decl (NULL_TREE, NULL_TREE, $2); - } - ; - -messageargs: - selector - | keywordarglist - ; - -keywordarglist: - keywordarg - | keywordarglist keywordarg - { - $$ = chainon ($1, $2); - } - ; - - -keywordexpr: - nonnull_exprlist - { - if (TREE_CHAIN ($1) == NULL_TREE) - /* just return the expr., remove a level of indirection */ - $$ = TREE_VALUE ($1); - else - /* we have a comma expr., we will collapse later */ - $$ = $1; - } - ; - -keywordarg: - selector ':' keywordexpr - { - $$ = build_tree_list ($1, $3); - } - | ':' keywordexpr - { - $$ = build_tree_list (NULL_TREE, $2); - } - ; - -receiver: - expr - | CLASSNAME - { - $$ = get_class_reference ($1); - } - | TYPENAME - { - $$ = get_class_reference ($1); - } - ; - -objcmessageexpr: - '[' receiver messageargs ']' - { $$ = build_tree_list ($2, $3); } - ; - -selectorarg: - selector - | keywordnamelist - ; - -keywordnamelist: - keywordname - | keywordnamelist keywordname - { - $$ = chainon ($1, $2); - } - ; - -keywordname: - selector ':' - { - $$ = build_tree_list ($1, NULL_TREE); - } - | ':' - { - $$ = build_tree_list (NULL_TREE, NULL_TREE); - } - ; - -objcselectorexpr: - SELECTOR '(' selectorarg ')' - { - $$ = $3; - } - ; - -objcprotocolexpr: - PROTOCOL '(' identifier ')' - { - $$ = $3; - } - ; - -/* extension to support C-structures in the archiver */ - -objcencodeexpr: - ENCODE '(' typename ')' - { - $$ = groktypename ($3); - } - ; - -@@end_ifobjc -%% - -/* yylex() is a thin wrapper around c_lex(), all it does is translate - cpplib.h's token codes into yacc's token codes. */ - -static enum cpp_ttype last_token; - -/* The reserved keyword table. */ -struct resword -{ - const char *word; - ENUM_BITFIELD(rid) rid : 16; - unsigned int disable : 16; -}; - -/* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is - _true_. */ -#define D_C89 0x01 /* not in C89 */ -#define D_EXT 0x02 /* GCC extension */ -#define D_EXT89 0x04 /* GCC extension incorporated in C99 */ -#define D_OBJC 0x08 /* Objective C only */ - -static const struct resword reswords[] = -{ - { "_Bool", RID_BOOL, 0 }, - { "_Complex", RID_COMPLEX, 0 }, - { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, - { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, - { "__alignof", RID_ALIGNOF, 0 }, - { "__alignof__", RID_ALIGNOF, 0 }, - { "__asm", RID_ASM, 0 }, - { "__asm__", RID_ASM, 0 }, - { "__attribute", RID_ATTRIBUTE, 0 }, - { "__attribute__", RID_ATTRIBUTE, 0 }, - { "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 }, - { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 }, - { "__builtin_va_arg", RID_VA_ARG, 0 }, - { "__complex", RID_COMPLEX, 0 }, - { "__complex__", RID_COMPLEX, 0 }, - { "__const", RID_CONST, 0 }, - { "__const__", RID_CONST, 0 }, - { "__extension__", RID_EXTENSION, 0 }, - { "__func__", RID_C99_FUNCTION_NAME, 0 }, - { "__imag", RID_IMAGPART, 0 }, - { "__imag__", RID_IMAGPART, 0 }, - { "__inline", RID_INLINE, 0 }, - { "__inline__", RID_INLINE, 0 }, - { "__label__", RID_LABEL, 0 }, - { "__ptrbase", RID_PTRBASE, 0 }, - { "__ptrbase__", RID_PTRBASE, 0 }, - { "__ptrextent", RID_PTREXTENT, 0 }, - { "__ptrextent__", RID_PTREXTENT, 0 }, - { "__ptrvalue", RID_PTRVALUE, 0 }, - { "__ptrvalue__", RID_PTRVALUE, 0 }, - { "__real", RID_REALPART, 0 }, - { "__real__", RID_REALPART, 0 }, - { "__restrict", RID_RESTRICT, 0 }, - { "__restrict__", RID_RESTRICT, 0 }, - { "__signed", RID_SIGNED, 0 }, - { "__signed__", RID_SIGNED, 0 }, - { "__thread", RID_THREAD, 0 }, - { "__typeof", RID_TYPEOF, 0 }, - { "__typeof__", RID_TYPEOF, 0 }, - { "__volatile", RID_VOLATILE, 0 }, - { "__volatile__", RID_VOLATILE, 0 }, - { "asm", RID_ASM, D_EXT }, - { "auto", RID_AUTO, 0 }, - { "break", RID_BREAK, 0 }, - { "case", RID_CASE, 0 }, - { "char", RID_CHAR, 0 }, - { "const", RID_CONST, 0 }, - { "continue", RID_CONTINUE, 0 }, - { "default", RID_DEFAULT, 0 }, - { "do", RID_DO, 0 }, - { "double", RID_DOUBLE, 0 }, - { "else", RID_ELSE, 0 }, - { "enum", RID_ENUM, 0 }, - { "extern", RID_EXTERN, 0 }, - { "float", RID_FLOAT, 0 }, - { "for", RID_FOR, 0 }, - { "goto", RID_GOTO, 0 }, - { "if", RID_IF, 0 }, - { "inline", RID_INLINE, D_EXT89 }, - { "int", RID_INT, 0 }, - { "long", RID_LONG, 0 }, - { "register", RID_REGISTER, 0 }, - { "restrict", RID_RESTRICT, D_C89 }, - { "return", RID_RETURN, 0 }, - { "short", RID_SHORT, 0 }, - { "signed", RID_SIGNED, 0 }, - { "sizeof", RID_SIZEOF, 0 }, - { "static", RID_STATIC, 0 }, - { "struct", RID_STRUCT, 0 }, - { "switch", RID_SWITCH, 0 }, - { "typedef", RID_TYPEDEF, 0 }, - { "typeof", RID_TYPEOF, D_EXT }, - { "union", RID_UNION, 0 }, - { "unsigned", RID_UNSIGNED, 0 }, - { "void", RID_VOID, 0 }, - { "volatile", RID_VOLATILE, 0 }, - { "while", RID_WHILE, 0 }, -@@ifobjc - { "id", RID_ID, D_OBJC }, - - /* These objc keywords are recognized only immediately after - an '@'. */ - { "class", RID_AT_CLASS, D_OBJC }, - { "compatibility_alias", RID_AT_ALIAS, D_OBJC }, - { "defs", RID_AT_DEFS, D_OBJC }, - { "encode", RID_AT_ENCODE, D_OBJC }, - { "end", RID_AT_END, D_OBJC }, - { "implementation", RID_AT_IMPLEMENTATION, D_OBJC }, - { "interface", RID_AT_INTERFACE, D_OBJC }, - { "private", RID_AT_PRIVATE, D_OBJC }, - { "protected", RID_AT_PROTECTED, D_OBJC }, - { "protocol", RID_AT_PROTOCOL, D_OBJC }, - { "public", RID_AT_PUBLIC, D_OBJC }, - { "selector", RID_AT_SELECTOR, D_OBJC }, - { "throw", RID_AT_THROW, D_OBJC }, - { "try", RID_AT_TRY, D_OBJC }, - { "catch", RID_AT_CATCH, D_OBJC }, - { "finally", RID_AT_FINALLY, D_OBJC }, - { "synchronized", RID_AT_SYNCHRONIZED, D_OBJC }, - /* These are recognized only in protocol-qualifier context - (see above) */ - { "bycopy", RID_BYCOPY, D_OBJC }, - { "byref", RID_BYREF, D_OBJC }, - { "in", RID_IN, D_OBJC }, - { "inout", RID_INOUT, D_OBJC }, - { "oneway", RID_ONEWAY, D_OBJC }, - { "out", RID_OUT, D_OBJC }, -@@end_ifobjc -}; -#define N_reswords (sizeof reswords / sizeof (struct resword)) - -/* Table mapping from RID_* constants to yacc token numbers. - Unfortunately we have to have entries for all the keywords in all - three languages. */ -static const short rid_to_yy[RID_MAX] = -{ - /* RID_STATIC */ STATIC, - /* RID_UNSIGNED */ TYPESPEC, - /* RID_LONG */ TYPESPEC, - /* RID_CONST */ TYPE_QUAL, - /* RID_EXTERN */ SCSPEC, - /* RID_REGISTER */ SCSPEC, - /* RID_TYPEDEF */ SCSPEC, - /* RID_SHORT */ TYPESPEC, - /* RID_INLINE */ SCSPEC, - /* RID_VOLATILE */ TYPE_QUAL, - /* RID_SIGNED */ TYPESPEC, - /* RID_AUTO */ SCSPEC, - /* RID_RESTRICT */ TYPE_QUAL, - - /* C extensions */ - /* RID_COMPLEX */ TYPESPEC, - /* RID_THREAD */ SCSPEC, - - /* C++ */ - /* RID_FRIEND */ 0, - /* RID_VIRTUAL */ 0, - /* RID_EXPLICIT */ 0, - /* RID_EXPORT */ 0, - /* RID_MUTABLE */ 0, - - /* ObjC */ - /* RID_IN */ TYPE_QUAL, - /* RID_OUT */ TYPE_QUAL, - /* RID_INOUT */ TYPE_QUAL, - /* RID_BYCOPY */ TYPE_QUAL, - /* RID_BYREF */ TYPE_QUAL, - /* RID_ONEWAY */ TYPE_QUAL, - - /* C */ - /* RID_INT */ TYPESPEC, - /* RID_CHAR */ TYPESPEC, - /* RID_FLOAT */ TYPESPEC, - /* RID_DOUBLE */ TYPESPEC, - /* RID_VOID */ TYPESPEC, - /* RID_ENUM */ ENUM, - /* RID_STRUCT */ STRUCT, - /* RID_UNION */ UNION, - /* RID_IF */ IF, - /* RID_ELSE */ ELSE, - /* RID_WHILE */ WHILE, - /* RID_DO */ DO, - /* RID_FOR */ FOR, - /* RID_SWITCH */ SWITCH, - /* RID_CASE */ CASE, - /* RID_DEFAULT */ DEFAULT, - /* RID_BREAK */ BREAK, - /* RID_CONTINUE */ CONTINUE, - /* RID_RETURN */ RETURN, - /* RID_GOTO */ GOTO, - /* RID_SIZEOF */ SIZEOF, - - /* C extensions */ - /* RID_ASM */ ASM_KEYWORD, - /* RID_TYPEOF */ TYPEOF, - /* RID_ALIGNOF */ ALIGNOF, - /* RID_ATTRIBUTE */ ATTRIBUTE, - /* RID_VA_ARG */ VA_ARG, - /* RID_EXTENSION */ EXTENSION, - /* RID_IMAGPART */ IMAGPART, - /* RID_REALPART */ REALPART, - /* RID_LABEL */ LABEL, - /* RID_PTRBASE */ PTR_BASE, - /* RID_PTREXTENT */ PTR_EXTENT, - /* RID_PTRVALUE */ PTR_VALUE, - - /* RID_CHOOSE_EXPR */ CHOOSE_EXPR, - /* RID_TYPES_COMPATIBLE_P */ TYPES_COMPATIBLE_P, - - /* RID_FUNCTION_NAME */ FUNC_NAME, - /* RID_PRETTY_FUNCTION_NAME */ FUNC_NAME, - /* RID_C99_FUNCTION_NAME */ FUNC_NAME, - - /* C++ */ - /* RID_BOOL */ TYPESPEC, - /* RID_WCHAR */ 0, - /* RID_CLASS */ 0, - /* RID_PUBLIC */ 0, - /* RID_PRIVATE */ 0, - /* RID_PROTECTED */ 0, - /* RID_TEMPLATE */ 0, - /* RID_NULL */ 0, - /* RID_CATCH */ 0, - /* RID_DELETE */ 0, - /* RID_FALSE */ 0, - /* RID_NAMESPACE */ 0, - /* RID_NEW */ 0, - /* RID_OFFSETOF */ 0, - /* RID_OPERATOR */ 0, - /* RID_THIS */ 0, - /* RID_THROW */ 0, - /* RID_TRUE */ 0, - /* RID_TRY */ 0, - /* RID_TYPENAME */ 0, - /* RID_TYPEID */ 0, - /* RID_USING */ 0, - - /* casts */ - /* RID_CONSTCAST */ 0, - /* RID_DYNCAST */ 0, - /* RID_REINTCAST */ 0, - /* RID_STATCAST */ 0, - - /* Objective C */ - /* RID_ID */ OBJECTNAME, - /* RID_AT_ENCODE */ ENCODE, - /* RID_AT_END */ END, - /* RID_AT_CLASS */ CLASS, - /* RID_AT_ALIAS */ ALIAS, - /* RID_AT_DEFS */ DEFS, - /* RID_AT_PRIVATE */ PRIVATE, - /* RID_AT_PROTECTED */ PROTECTED, - /* RID_AT_PUBLIC */ PUBLIC, - /* RID_AT_PROTOCOL */ PROTOCOL, - /* RID_AT_SELECTOR */ SELECTOR, - /* RID_AT_THROW */ AT_THROW, - /* RID_AT_TRY */ AT_TRY, - /* RID_AT_CATCH */ AT_CATCH, - /* RID_AT_FINALLY */ AT_FINALLY, - /* RID_AT_SYNCHRONIZED */ AT_SYNCHRONIZED, - /* RID_AT_INTERFACE */ INTERFACE, - /* RID_AT_IMPLEMENTATION */ IMPLEMENTATION -}; - -static void -init_reswords (void) -{ - unsigned int i; - tree id; - int mask = (flag_isoc99 ? 0 : D_C89) - | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); - - if (!c_dialect_objc ()) - mask |= D_OBJC; - - ridpointers = ggc_calloc ((int) RID_MAX, sizeof (tree)); - for (i = 0; i < N_reswords; i++) - { - /* If a keyword is disabled, do not enter it into the table - and so create a canonical spelling that isn't a keyword. */ - if (reswords[i].disable & mask) - continue; - - id = get_identifier (reswords[i].word); - C_RID_CODE (id) = reswords[i].rid; - C_IS_RESERVED_WORD (id) = 1; - ridpointers [(int) reswords[i].rid] = id; - } -} - -#define NAME(type) cpp_type2name (type) - -static void -yyerror (const char *msgid) -{ - c_parse_error (msgid, last_token, yylval.ttype); -} - -static int -yylexname (void) -{ - 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); - -@@ifobjc - /* Turn non-typedefed refs to "id" into plain identifiers; this - allows constructs like "void foo(id id);" to work. */ - if (rid_code == RID_ID) - { - decl = lookup_name (yylval.ttype); - if (decl == NULL_TREE || TREE_CODE (decl) != TYPE_DECL) - return IDENTIFIER; - } - - if (!OBJC_IS_AT_KEYWORD (rid_code) - && (!OBJC_IS_PQ_KEYWORD (rid_code) || objc_pq_context)) -@@end_ifobjc - { - /* Return the canonical spelling for this keyword. */ - yylval.ttype = ridpointers[(int) rid_code]; - return rid_to_yy[(int) rid_code]; - } - } - - decl = lookup_name (yylval.ttype); - if (decl) - { - if (TREE_CODE (decl) == TYPE_DECL) - return TYPENAME; - } -@@ifobjc - else - { - tree objc_interface_decl = is_class_name (yylval.ttype); - /* ObjC class names are in the same namespace as variables and - typedefs, and hence are shadowed by local declarations. */ - if (objc_interface_decl - && (global_bindings_p () - || (!objc_force_identifier && !decl))) - { - yylval.ttype = objc_interface_decl; - return CLASSNAME; - } - } -@@end_ifobjc - - return IDENTIFIER; -} - -static inline int -_yylex (void) -{ - get_next: - last_token = c_lex (&yylval.ttype); - switch (last_token) - { - case CPP_EQ: return '='; - case CPP_NOT: return '!'; - case CPP_GREATER: yylval.code = GT_EXPR; return ARITHCOMPARE; - case CPP_LESS: yylval.code = LT_EXPR; return ARITHCOMPARE; - case CPP_PLUS: yylval.code = PLUS_EXPR; return '+'; - case CPP_MINUS: yylval.code = MINUS_EXPR; return '-'; - case CPP_MULT: yylval.code = MULT_EXPR; return '*'; - case CPP_DIV: yylval.code = TRUNC_DIV_EXPR; return '/'; - case CPP_MOD: yylval.code = TRUNC_MOD_EXPR; return '%'; - case CPP_AND: yylval.code = BIT_AND_EXPR; return '&'; - case CPP_OR: yylval.code = BIT_IOR_EXPR; return '|'; - case CPP_XOR: yylval.code = BIT_XOR_EXPR; return '^'; - case CPP_RSHIFT: yylval.code = RSHIFT_EXPR; return RSHIFT; - case CPP_LSHIFT: yylval.code = LSHIFT_EXPR; return LSHIFT; - - case CPP_COMPL: return '~'; - case CPP_AND_AND: return ANDAND; - case CPP_OR_OR: return OROR; - case CPP_QUERY: return '?'; - case CPP_OPEN_PAREN: return '('; - case CPP_EQ_EQ: yylval.code = EQ_EXPR; return EQCOMPARE; - case CPP_NOT_EQ: yylval.code = NE_EXPR; return EQCOMPARE; - case CPP_GREATER_EQ:yylval.code = GE_EXPR; return ARITHCOMPARE; - case CPP_LESS_EQ: yylval.code = LE_EXPR; return ARITHCOMPARE; - - case CPP_PLUS_EQ: yylval.code = PLUS_EXPR; return ASSIGN; - case CPP_MINUS_EQ: yylval.code = MINUS_EXPR; return ASSIGN; - case CPP_MULT_EQ: yylval.code = MULT_EXPR; return ASSIGN; - case CPP_DIV_EQ: yylval.code = TRUNC_DIV_EXPR; return ASSIGN; - case CPP_MOD_EQ: yylval.code = TRUNC_MOD_EXPR; return ASSIGN; - case CPP_AND_EQ: yylval.code = BIT_AND_EXPR; return ASSIGN; - case CPP_OR_EQ: yylval.code = BIT_IOR_EXPR; return ASSIGN; - case CPP_XOR_EQ: yylval.code = BIT_XOR_EXPR; return ASSIGN; - case CPP_RSHIFT_EQ: yylval.code = RSHIFT_EXPR; return ASSIGN; - case CPP_LSHIFT_EQ: yylval.code = LSHIFT_EXPR; return ASSIGN; - - case CPP_OPEN_SQUARE: return '['; - case CPP_CLOSE_SQUARE: return ']'; - case CPP_OPEN_BRACE: return '{'; - case CPP_CLOSE_BRACE: return '}'; - case CPP_ELLIPSIS: return ELLIPSIS; - - case CPP_PLUS_PLUS: return PLUSPLUS; - case CPP_MINUS_MINUS: return MINUSMINUS; - case CPP_DEREF: return POINTSAT; - case CPP_DOT: return '.'; - - /* The following tokens may affect the interpretation of any - identifiers following, if doing Objective-C. */ - case CPP_COLON: OBJC_NEED_RAW_IDENTIFIER (0); return ':'; - case CPP_COMMA: OBJC_NEED_RAW_IDENTIFIER (0); return ','; - case CPP_CLOSE_PAREN: OBJC_NEED_RAW_IDENTIFIER (0); return ')'; - case CPP_SEMICOLON: OBJC_NEED_RAW_IDENTIFIER (0); return ';'; - - case CPP_EOF: - return 0; - - case CPP_NAME: - return yylexname (); - - case CPP_AT_NAME: - /* This only happens in Objective-C; it must be a keyword. */ - return rid_to_yy [(int) C_RID_CODE (yylval.ttype)]; - - case CPP_NUMBER: - case CPP_CHAR: - case CPP_WCHAR: - return CONSTANT; - - case CPP_STRING: - case CPP_WSTRING: - return STRING; - - case CPP_OBJC_STRING: - return OBJC_STRING; - - /* These tokens are C++ specific (and will not be generated - in C mode, but let's be cautious). */ - case CPP_SCOPE: - case CPP_DEREF_STAR: - case CPP_DOT_STAR: - case CPP_MIN_EQ: - case CPP_MAX_EQ: - case CPP_MIN: - case CPP_MAX: - /* These tokens should not survive translation phase 4. */ - case CPP_HASH: - case CPP_PASTE: - error ("syntax error at '%s' token", NAME(last_token)); - goto get_next; - - default: - abort (); - } - /* NOTREACHED */ -} - -static int -yylex (void) -{ - int r; - timevar_push (TV_LEX); - r = _yylex(); - timevar_pop (TV_LEX); - return r; -} - -/* Function used when yydebug is set, to print a token in more detail. */ - -static void -yyprint (FILE *file, int yychar, YYSTYPE yyl) -{ - tree t = yyl.ttype; - - fprintf (file, " [%s]", NAME(last_token)); - - switch (yychar) - { - case IDENTIFIER: - case TYPENAME: - case OBJECTNAME: - case TYPESPEC: - case TYPE_QUAL: - case SCSPEC: - case STATIC: - if (IDENTIFIER_POINTER (t)) - fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); - break; - - case CONSTANT: - fprintf (file, " %s", GET_MODE_NAME (TYPE_MODE (TREE_TYPE (t)))); - if (TREE_CODE (t) == INTEGER_CST) - { - fputs (" ", file); - fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, - TREE_INT_CST_HIGH (t), TREE_INT_CST_LOW (t)); - } - break; - } -} - -/* 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. */ - -/* Parse the file. */ -void -c_parse_file (void) -{ - yyparse (); - /* In case there were missing closebraces, get us back to the global - binding level. */ - while (! global_bindings_p ()) - poplevel (0, 0, 0); - /* __FUNCTION__ is defined at file scope (""). This - call may not be necessary as my tests indicate it - still works without it. */ - finish_fname_decls (); - - if (malloced_yyss) - { - free (malloced_yyss); - free (malloced_yyvs); - malloced_yyss = 0; - } -} - -#include "gt-c-parse.h" diff --git a/contrib/gcc/choose-temp.c b/contrib/gcc/choose-temp.c deleted file mode 100644 index 5c2c614..0000000 --- a/contrib/gcc/choose-temp.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Utility to pick a temporary filename prefix. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. - -This file is part of the libiberty library. -Libiberty is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -Libiberty is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with libiberty; see the file COPYING.LIB. If not, -write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include /* May get P_tmpdir. */ -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - -#include "libiberty.h" -extern char *choose_tmpdir PARAMS ((void)); - -/* Name of temporary file. - mktemp requires 6 trailing X's. */ -#define TEMP_FILE "ccXXXXXX" -#define TEMP_FILE_LEN (sizeof(TEMP_FILE) - 1) - -/* - -@deftypefn Extension char* choose_temp_base (void) - -Return a prefix for temporary file names or @code{NULL} if unable to -find one. The current directory is chosen if all else fails so the -program is exited if a temporary directory can't be found (@code{mktemp} -fails). The buffer for the result is obtained with @code{xmalloc}. - -This function is provided for backwards compatability only. Its use is -not recommended. - -@end deftypefn - -*/ - -char * -choose_temp_base () -{ - const char *base = choose_tmpdir (); - char *temp_filename; - int len; - - len = strlen (base); - temp_filename = xmalloc (len + TEMP_FILE_LEN + 1); - strcpy (temp_filename, base); - strcpy (temp_filename + len, TEMP_FILE); - - mktemp (temp_filename); - if (strlen (temp_filename) == 0) - abort (); - return temp_filename; -} diff --git a/contrib/gcc/concat.c b/contrib/gcc/concat.c deleted file mode 100644 index 98b20e1..0000000 --- a/contrib/gcc/concat.c +++ /dev/null @@ -1,236 +0,0 @@ -/* Concatenate variable number of strings. - Copyright (C) 1991, 1994, 2001 Free Software Foundation, Inc. - Written by Fred Fish @ Cygnus Support - -This file is part of the libiberty library. -Libiberty is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -Libiberty is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with libiberty; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - - -/* - -@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @dots{}, @code{NULL}) - -Concatenate zero or more of strings and return the result in freshly -@code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is -available. The argument list is terminated by the first @code{NULL} -pointer encountered. Pointers to empty strings are ignored. - -@end deftypefn - -NOTES - - This function uses xmalloc() which is expected to be a front end - function to malloc() that deals with low memory situations. In - typical use, if malloc() returns NULL then xmalloc() diverts to an - error handler routine which never returns, and thus xmalloc will - never return a NULL pointer. If the client application wishes to - deal with low memory situations itself, it should supply an xmalloc - that just directly invokes malloc and blindly returns whatever - malloc returns. - -*/ - - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "ansidecl.h" -#include "libiberty.h" -#include /* size_t */ - -#ifdef ANSI_PROTOTYPES -#include -#else -#include -#endif - -# if HAVE_STRING_H -# include -# else -# if HAVE_STRINGS_H -# include -# endif -# endif - -#if HAVE_STDLIB_H -#include -#endif - -static inline unsigned long vconcat_length PARAMS ((const char *, va_list)); -static inline unsigned long -vconcat_length (first, args) - const char *first; - va_list args; -{ - unsigned long length = 0; - const char *arg; - - for (arg = first; arg ; arg = va_arg (args, const char *)) - length += strlen (arg); - - return length; -} - -static inline char *vconcat_copy PARAMS ((char *, const char *, va_list)); -static inline char * -vconcat_copy (dst, first, args) - char *dst; - const char *first; - va_list args; -{ - char *end = dst; - const char *arg; - - for (arg = first; arg ; arg = va_arg (args, const char *)) - { - unsigned long length = strlen (arg); - memcpy (end, arg, length); - end += length; - } - *end = '\000'; - - return dst; -} - -/* @undocumented concat_length */ - -unsigned long -concat_length VPARAMS ((const char *first, ...)) -{ - unsigned long length; - - VA_OPEN (args, first); - VA_FIXEDARG (args, const char *, first); - length = vconcat_length (first, args); - VA_CLOSE (args); - - return length; -} - -/* @undocumented concat_copy */ - -char * -concat_copy VPARAMS ((char *dst, const char *first, ...)) -{ - char *save_dst; - - VA_OPEN (args, first); - VA_FIXEDARG (args, char *, dst); - VA_FIXEDARG (args, const char *, first); - vconcat_copy (dst, first, args); - save_dst = dst; /* With K&R C, dst goes out of scope here. */ - VA_CLOSE (args); - - return save_dst; -} - -char *libiberty_concat_ptr; - -/* @undocumented concat_copy2 */ - -char * -concat_copy2 VPARAMS ((const char *first, ...)) -{ - VA_OPEN (args, first); - VA_FIXEDARG (args, const char *, first); - vconcat_copy (libiberty_concat_ptr, first, args); - VA_CLOSE (args); - - return libiberty_concat_ptr; -} - -char * -concat VPARAMS ((const char *first, ...)) -{ - char *newstr; - - /* First compute the size of the result and get sufficient memory. */ - VA_OPEN (args, first); - VA_FIXEDARG (args, const char *, first); - newstr = (char *) xmalloc (vconcat_length (first, args) + 1); - VA_CLOSE (args); - - /* Now copy the individual pieces to the result string. */ - VA_OPEN (args, first); - VA_FIXEDARG (args, const char *, first); - vconcat_copy (newstr, first, args); - VA_CLOSE (args); - - return newstr; -} - -/* - -@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL}) - -Same as @code{concat}, except that if @var{optr} is not @code{NULL} it -is freed after the string is created. This is intended to be useful -when you're extending an existing string or building up a string in a -loop: - -@example - str = reconcat (str, "pre-", str, NULL); -@end example - -@end deftypefn - -*/ - -char * -reconcat VPARAMS ((char *optr, const char *first, ...)) -{ - char *newstr; - - /* First compute the size of the result and get sufficient memory. */ - VA_OPEN (args, first); - VA_FIXEDARG (args, char *, optr); - VA_FIXEDARG (args, const char *, first); - newstr = (char *) xmalloc (vconcat_length (first, args) + 1); - VA_CLOSE (args); - - /* Now copy the individual pieces to the result string. */ - VA_OPEN (args, first); - VA_FIXEDARG (args, char *, optr); - VA_FIXEDARG (args, const char *, first); - vconcat_copy (newstr, first, args); - if (optr) /* Done before VA_CLOSE so optr stays in scope for K&R C. */ - free (optr); - VA_CLOSE (args); - - return newstr; -} - -#ifdef MAIN -#define NULLP (char *)0 - -/* Simple little test driver. */ - -#include - -int -main () -{ - printf ("\"\" = \"%s\"\n", concat (NULLP)); - printf ("\"a\" = \"%s\"\n", concat ("a", NULLP)); - printf ("\"ab\" = \"%s\"\n", concat ("a", "b", NULLP)); - printf ("\"abc\" = \"%s\"\n", concat ("a", "b", "c", NULLP)); - printf ("\"abcd\" = \"%s\"\n", concat ("ab", "cd", NULLP)); - printf ("\"abcde\" = \"%s\"\n", concat ("ab", "c", "de", NULLP)); - printf ("\"abcdef\" = \"%s\"\n", concat ("", "a", "", "bcd", "ef", NULLP)); - return 0; -} - -#endif diff --git a/contrib/gcc/config/alpha/alpha-modes.def b/contrib/gcc/config/alpha/alpha-modes.def deleted file mode 100644 index 8e9e698..0000000 --- a/contrib/gcc/config/alpha/alpha-modes.def +++ /dev/null @@ -1,23 +0,0 @@ -/* Alpha extra machine modes. - Copyright (C) 2003 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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. */ - -/* 128-bit floating point. This gets reset in alpha_override_options - if VAX float format is in use. */ -FLOAT_MODE (TF, 16, ieee_quad_format); diff --git a/contrib/gcc/config/alpha/alpha-protos.h b/contrib/gcc/config/alpha/alpha-protos.h deleted file mode 100644 index 95f1ad2..0000000 --- a/contrib/gcc/config/alpha/alpha-protos.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Prototypes for alpha.c functions used in the md file & elsewhere. - Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -extern int alpha_next_sequence_number; - -extern void literal_section (void); -extern void override_options (void); -extern int zap_mask (HOST_WIDE_INT); -extern int direct_return (void); - -extern int alpha_sa_size (void); -extern HOST_WIDE_INT alpha_initial_elimination_offset (unsigned int, - unsigned int); -extern int alpha_pv_save_size (void); -extern int alpha_using_fp (void); -extern void alpha_expand_prologue (void); -extern void alpha_expand_epilogue (void); -extern void alpha_output_filename (FILE *, const char *); -extern void alpha_output_lineno (FILE *, int); - -extern bool alpha_const_ok_for_letter_p (HOST_WIDE_INT, int); -extern bool alpha_const_double_ok_for_letter_p (rtx, int); -extern bool alpha_extra_constraint (rtx, int); - -extern rtx alpha_tablejump_addr_vec (rtx); -extern rtx alpha_tablejump_best_label (rtx); - -extern bool alpha_legitimate_address_p (enum machine_mode, rtx, int); -extern rtx alpha_legitimize_address (rtx, rtx, enum machine_mode); -extern rtx alpha_legitimize_reload_address (rtx, enum machine_mode, - int, int, int); - -extern rtx split_small_symbolic_operand (rtx); - -extern void get_aligned_mem (rtx, rtx *, rtx *); -extern rtx get_unaligned_address (rtx, int); -extern enum reg_class alpha_preferred_reload_class (rtx, enum reg_class); -extern enum reg_class secondary_reload_class (enum reg_class, - enum machine_mode, rtx, int); - -extern void alpha_set_memflags (rtx, rtx); -extern rtx alpha_emit_set_const (rtx, enum machine_mode, HOST_WIDE_INT, int); -extern rtx alpha_emit_set_long_const (rtx, HOST_WIDE_INT, HOST_WIDE_INT); -extern bool alpha_expand_mov (enum machine_mode, rtx *); -extern bool alpha_expand_mov_nobwx (enum machine_mode, rtx *); -extern void alpha_emit_floatuns (rtx[]); -extern rtx alpha_emit_conditional_move (rtx, enum machine_mode); -extern void alpha_split_tfmode_pair (rtx[]); -extern void alpha_split_tfmode_frobsign (rtx[], rtx (*)(rtx, rtx, rtx)); -extern void alpha_expand_unaligned_load (rtx, rtx, HOST_WIDE_INT, - HOST_WIDE_INT, int); -extern void alpha_expand_unaligned_store (rtx, rtx, HOST_WIDE_INT, - HOST_WIDE_INT); -extern int alpha_expand_block_move (rtx []); -extern int alpha_expand_block_clear (rtx []); -extern rtx alpha_expand_zap_mask (HOST_WIDE_INT); -extern void alpha_expand_builtin_vector_binop (rtx (*)(rtx, rtx, rtx), - enum machine_mode, - rtx, rtx, rtx); -extern rtx alpha_return_addr (int, rtx); -extern rtx alpha_gp_save_rtx (void); -extern void print_operand (FILE *, rtx, int); -extern void print_operand_address (FILE *, rtx); -extern void alpha_initialize_trampoline (rtx, rtx, rtx, int, int, int); - -extern void alpha_va_start (tree, rtx); -extern rtx alpha_va_arg (tree, tree); -extern rtx function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int); -extern rtx function_value (tree, tree, enum machine_mode); - -extern void alpha_start_function (FILE *, const char *, tree); -extern void alpha_end_function (FILE *, const char *, tree); - -extern int alpha_find_lo_sum_using_gp (rtx); - -#ifdef REAL_VALUE_TYPE -extern int check_float_value (enum machine_mode, REAL_VALUE_TYPE *, int); -#endif - -#ifdef RTX_CODE -extern rtx alpha_emit_conditional_branch (enum rtx_code); -extern rtx alpha_emit_setcc (enum rtx_code); -extern int alpha_split_conditional_move (enum rtx_code, rtx, rtx, rtx, rtx); -extern void alpha_emit_xfloating_arith (enum rtx_code, rtx[]); -extern void alpha_emit_xfloating_cvt (enum rtx_code, rtx[]); -#endif - -extern rtx alpha_need_linkage (const char *, int); -extern rtx alpha_use_linkage (rtx, tree, int, int); - -#if TARGET_ABI_OPEN_VMS -extern enum avms_arg_type alpha_arg_type (enum machine_mode); -extern rtx alpha_arg_info_reg_val (CUMULATIVE_ARGS); -#endif - -extern rtx unicosmk_add_call_info_word (rtx); - -#if TARGET_ABI_UNICOSMK -extern void unicosmk_defer_case_vector (rtx, rtx); -extern void unicosmk_add_extern (const char *); -extern void unicosmk_output_align (FILE *, int); -extern char * unicosmk_text_section (void); -extern char * unicosmk_data_section (void); -extern void unicosmk_output_common (FILE *, const char *, int, int); -extern int unicosmk_initial_elimination_offset (int, int); -#endif diff --git a/contrib/gcc/config/alpha/alpha.c b/contrib/gcc/config/alpha/alpha.c deleted file mode 100644 index f9aef99..0000000 --- a/contrib/gcc/config/alpha/alpha.c +++ /dev/null @@ -1,10308 +0,0 @@ -/* Subroutines used for code generation on the DEC Alpha. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - -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 "coretypes.h" -#include "tm.h" -#include "rtl.h" -#include "tree.h" -#include "regs.h" -#include "hard-reg-set.h" -#include "real.h" -#include "insn-config.h" -#include "conditions.h" -#include "output.h" -#include "insn-attr.h" -#include "flags.h" -#include "recog.h" -#include "expr.h" -#include "optabs.h" -#include "reload.h" -#include "obstack.h" -#include "except.h" -#include "function.h" -#include "toplev.h" -#include "ggc.h" -#include "integrate.h" -#include "tm_p.h" -#include "target.h" -#include "target-def.h" -#include "debug.h" -#include "langhooks.h" -#include -#include "cfglayout.h" - -/* Specify which cpu to schedule for. */ - -enum processor_type alpha_cpu; -static const char * const alpha_cpu_name[] = -{ - "ev4", "ev5", "ev6" -}; - -/* Specify how accurate floating-point traps need to be. */ - -enum alpha_trap_precision alpha_tp; - -/* Specify the floating-point rounding mode. */ - -enum alpha_fp_rounding_mode alpha_fprm; - -/* Specify which things cause traps. */ - -enum alpha_fp_trap_mode alpha_fptm; - -/* Specify bit size of immediate TLS offsets. */ - -int alpha_tls_size = 32; - -/* Strings decoded into the above options. */ - -const char *alpha_cpu_string; /* -mcpu= */ -const char *alpha_tune_string; /* -mtune= */ -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; - -/* Nonzero if inside of a function, because the Alpha asm can't - handle .files inside of functions. */ - -static int inside_function = FALSE; - -/* The number of cycles of latency we should assume on memory reads. */ - -int alpha_memory_latency = 3; - -/* Whether the function needs the GP. */ - -static int alpha_function_needs_gp; - -/* The alias set for prologue/epilogue register save/restore. */ - -static GTY(()) int alpha_sr_alias_set; - -/* The assembler name of the current function. */ - -static const char *alpha_fnname; - -/* The next explicit relocation sequence number. */ -extern GTY(()) int alpha_next_sequence_number; -int alpha_next_sequence_number = 1; - -/* The literal and gpdisp sequence numbers for this insn, as printed - by %# and %* respectively. */ -extern GTY(()) int alpha_this_literal_sequence_number; -extern GTY(()) int alpha_this_gpdisp_sequence_number; -int alpha_this_literal_sequence_number; -int alpha_this_gpdisp_sequence_number; - -/* Costs of various operations on the different architectures. */ - -struct alpha_rtx_cost_data -{ - unsigned char fp_add; - unsigned char fp_mult; - unsigned char fp_div_sf; - unsigned char fp_div_df; - unsigned char int_mult_si; - unsigned char int_mult_di; - unsigned char int_shift; - unsigned char int_cmov; -}; - -static struct alpha_rtx_cost_data const alpha_rtx_cost_data[PROCESSOR_MAX] = -{ - { /* EV4 */ - COSTS_N_INSNS (6), /* fp_add */ - COSTS_N_INSNS (6), /* fp_mult */ - COSTS_N_INSNS (34), /* fp_div_sf */ - COSTS_N_INSNS (63), /* fp_div_df */ - COSTS_N_INSNS (23), /* int_mult_si */ - COSTS_N_INSNS (23), /* int_mult_di */ - COSTS_N_INSNS (2), /* int_shift */ - COSTS_N_INSNS (2), /* int_cmov */ - }, - { /* EV5 */ - COSTS_N_INSNS (4), /* fp_add */ - COSTS_N_INSNS (4), /* fp_mult */ - COSTS_N_INSNS (15), /* fp_div_sf */ - COSTS_N_INSNS (22), /* fp_div_df */ - COSTS_N_INSNS (8), /* int_mult_si */ - COSTS_N_INSNS (12), /* int_mult_di */ - COSTS_N_INSNS (1) + 1, /* int_shift */ - COSTS_N_INSNS (1), /* int_cmov */ - }, - { /* EV6 */ - COSTS_N_INSNS (4), /* fp_add */ - COSTS_N_INSNS (4), /* fp_mult */ - COSTS_N_INSNS (12), /* fp_div_sf */ - COSTS_N_INSNS (15), /* fp_div_df */ - COSTS_N_INSNS (7), /* int_mult_si */ - COSTS_N_INSNS (7), /* int_mult_di */ - COSTS_N_INSNS (1), /* int_shift */ - COSTS_N_INSNS (2), /* int_cmov */ - }, -}; - -/* Get the number of args of a function in one of two ways. */ -#if TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK -#define NUM_ARGS current_function_args_info.num_args -#else -#define NUM_ARGS current_function_args_info -#endif - -#define REG_PV 27 -#define REG_RA 26 - -/* Declarations of static functions. */ -static struct machine_function *alpha_init_machine_status (void); -static rtx alpha_emit_xfloating_compare (enum rtx_code, rtx, rtx); - -#if TARGET_ABI_OPEN_VMS -static void alpha_write_linkage (FILE *, const char *, tree); -#endif - -static void unicosmk_output_deferred_case_vectors (FILE *); -static void unicosmk_gen_dsib (unsigned long *); -static void unicosmk_output_ssib (FILE *, const char *); -static int unicosmk_need_dex (rtx); - -/* Parse target option strings. */ - -void -override_options (void) -{ - int i; - static const struct cpu_table { - const char *const name; - const enum processor_type processor; - const int flags; - } cpu_table[] = { -#define EV5_MASK (MASK_CPU_EV5) -#define EV6_MASK (MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX) - { "ev4", PROCESSOR_EV4, 0 }, - { "ev45", PROCESSOR_EV4, 0 }, - { "21064", PROCESSOR_EV4, 0 }, - { "ev5", PROCESSOR_EV5, EV5_MASK }, - { "21164", PROCESSOR_EV5, EV5_MASK }, - { "ev56", PROCESSOR_EV5, EV5_MASK|MASK_BWX }, - { "21164a", PROCESSOR_EV5, EV5_MASK|MASK_BWX }, - { "pca56", PROCESSOR_EV5, EV5_MASK|MASK_BWX|MASK_MAX }, - { "21164PC",PROCESSOR_EV5, EV5_MASK|MASK_BWX|MASK_MAX }, - { "21164pc",PROCESSOR_EV5, EV5_MASK|MASK_BWX|MASK_MAX }, - { "ev6", PROCESSOR_EV6, EV6_MASK }, - { "21264", PROCESSOR_EV6, EV6_MASK }, - { "ev67", PROCESSOR_EV6, EV6_MASK|MASK_CIX }, - { "21264a", PROCESSOR_EV6, EV6_MASK|MASK_CIX }, - { 0, 0, 0 } - }; - - /* Unicos/Mk doesn't have shared libraries. */ - if (TARGET_ABI_UNICOSMK && flag_pic) - { - warning ("-f%s ignored for Unicos/Mk (not supported)", - (flag_pic > 1) ? "PIC" : "pic"); - flag_pic = 0; - } - - /* On Unicos/Mk, the native compiler consistently generates /d suffices for - floating-point instructions. Make that the default for this target. */ - if (TARGET_ABI_UNICOSMK) - alpha_fprm = ALPHA_FPRM_DYN; - else - alpha_fprm = ALPHA_FPRM_NORM; - - alpha_tp = ALPHA_TP_PROG; - alpha_fptm = ALPHA_FPTM_N; - - /* We cannot use su and sui qualifiers for conversion instructions on - Unicos/Mk. I'm not sure if this is due to assembler or hardware - limitations. Right now, we issue a warning if -mieee is specified - and then ignore it; eventually, we should either get it right or - disable the option altogether. */ - - if (TARGET_IEEE) - { - if (TARGET_ABI_UNICOSMK) - warning ("-mieee not supported on Unicos/Mk"); - else - { - alpha_tp = ALPHA_TP_INSN; - alpha_fptm = ALPHA_FPTM_SU; - } - } - - if (TARGET_IEEE_WITH_INEXACT) - { - if (TARGET_ABI_UNICOSMK) - warning ("-mieee-with-inexact not supported on Unicos/Mk"); - else - { - alpha_tp = ALPHA_TP_INSN; - alpha_fptm = ALPHA_FPTM_SUI; - } - } - - if (alpha_tp_string) - { - if (! strcmp (alpha_tp_string, "p")) - alpha_tp = ALPHA_TP_PROG; - else if (! strcmp (alpha_tp_string, "f")) - alpha_tp = ALPHA_TP_FUNC; - else if (! strcmp (alpha_tp_string, "i")) - alpha_tp = ALPHA_TP_INSN; - else - error ("bad value `%s' for -mtrap-precision switch", alpha_tp_string); - } - - if (alpha_fprm_string) - { - if (! strcmp (alpha_fprm_string, "n")) - alpha_fprm = ALPHA_FPRM_NORM; - else if (! strcmp (alpha_fprm_string, "m")) - alpha_fprm = ALPHA_FPRM_MINF; - else if (! strcmp (alpha_fprm_string, "c")) - alpha_fprm = ALPHA_FPRM_CHOP; - else if (! strcmp (alpha_fprm_string,"d")) - alpha_fprm = ALPHA_FPRM_DYN; - else - error ("bad value `%s' for -mfp-rounding-mode switch", - alpha_fprm_string); - } - - if (alpha_fptm_string) - { - if (strcmp (alpha_fptm_string, "n") == 0) - alpha_fptm = ALPHA_FPTM_N; - else if (strcmp (alpha_fptm_string, "u") == 0) - alpha_fptm = ALPHA_FPTM_U; - else if (strcmp (alpha_fptm_string, "su") == 0) - alpha_fptm = ALPHA_FPTM_SU; - else if (strcmp (alpha_fptm_string, "sui") == 0) - alpha_fptm = ALPHA_FPTM_SUI; - else - 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); - - if (alpha_cpu_string) - { - for (i = 0; cpu_table [i].name; i++) - if (! strcmp (alpha_cpu_string, cpu_table [i].name)) - { - alpha_cpu = cpu_table [i].processor; - target_flags &= ~ (MASK_BWX | MASK_MAX | MASK_FIX | MASK_CIX - | MASK_CPU_EV5 | MASK_CPU_EV6); - target_flags |= cpu_table [i].flags; - break; - } - if (! cpu_table [i].name) - error ("bad value `%s' for -mcpu switch", alpha_cpu_string); - } - - if (alpha_tune_string) - { - for (i = 0; cpu_table [i].name; i++) - if (! strcmp (alpha_tune_string, cpu_table [i].name)) - { - alpha_cpu = cpu_table [i].processor; - break; - } - if (! cpu_table [i].name) - error ("bad value `%s' for -mcpu switch", alpha_tune_string); - } - - /* Do some sanity checks on the above options. */ - - if (TARGET_ABI_UNICOSMK && alpha_fptm != ALPHA_FPTM_N) - { - warning ("trap mode not supported on Unicos/Mk"); - alpha_fptm = ALPHA_FPTM_N; - } - - if ((alpha_fptm == ALPHA_FPTM_SU || alpha_fptm == ALPHA_FPTM_SUI) - && alpha_tp != ALPHA_TP_INSN && ! TARGET_CPU_EV6) - { - warning ("fp software completion requires -mtrap-precision=i"); - alpha_tp = ALPHA_TP_INSN; - } - - if (TARGET_CPU_EV6) - { - /* Except for EV6 pass 1 (not released), we always have precise - arithmetic traps. Which means we can do software completion - without minding trap shadows. */ - alpha_tp = ALPHA_TP_PROG; - } - - if (TARGET_FLOAT_VAX) - { - if (alpha_fprm == ALPHA_FPRM_MINF || alpha_fprm == ALPHA_FPRM_DYN) - { - warning ("rounding mode not supported for VAX floats"); - alpha_fprm = ALPHA_FPRM_NORM; - } - if (alpha_fptm == ALPHA_FPTM_SUI) - { - warning ("trap mode not supported for VAX floats"); - alpha_fptm = ALPHA_FPTM_SU; - } - if (target_flags_explicit & MASK_LONG_DOUBLE_128) - warning ("128-bit long double not supported for VAX floats"); - target_flags &= ~MASK_LONG_DOUBLE_128; - } - - { - char *end; - int lat; - - if (!alpha_mlat_string) - alpha_mlat_string = "L1"; - - if (ISDIGIT ((unsigned char)alpha_mlat_string[0]) - && (lat = strtol (alpha_mlat_string, &end, 10), *end == '\0')) - ; - else if ((alpha_mlat_string[0] == 'L' || alpha_mlat_string[0] == 'l') - && ISDIGIT ((unsigned char)alpha_mlat_string[1]) - && alpha_mlat_string[2] == '\0') - { - static int const cache_latency[][4] = - { - { 3, 30, -1 }, /* ev4 -- Bcache is a guess */ - { 2, 12, 38 }, /* ev5 -- Bcache from PC164 LMbench numbers */ - { 3, 12, 30 }, /* ev6 -- Bcache from DS20 LMbench. */ - }; - - lat = alpha_mlat_string[1] - '0'; - if (lat <= 0 || lat > 3 || cache_latency[alpha_cpu][lat-1] == -1) - { - warning ("L%d cache latency unknown for %s", - lat, alpha_cpu_name[alpha_cpu]); - lat = 3; - } - else - lat = cache_latency[alpha_cpu][lat-1]; - } - else if (! strcmp (alpha_mlat_string, "main")) - { - /* Most current memories have about 370ns latency. This is - a reasonable guess for a fast cpu. */ - lat = 150; - } - else - { - warning ("bad value `%s' for -mmemory-latency", alpha_mlat_string); - lat = 3; - } - - alpha_memory_latency = lat; - } - - /* Default the definition of "small data" to 8 bytes. */ - if (!g_switch_set) - g_switch_value = 8; - - /* Infer TARGET_SMALL_DATA from -fpic/-fPIC. */ - if (flag_pic == 1) - target_flags |= MASK_SMALL_DATA; - else if (flag_pic == 2) - target_flags &= ~MASK_SMALL_DATA; - - /* Align labels and loops for optimal branching. */ - /* ??? Kludge these by not doing anything if we don't optimize and also if - we are writing ECOFF symbols to work around a bug in DEC's assembler. */ - if (optimize > 0 && write_symbols != SDB_DEBUG) - { - if (align_loops <= 0) - align_loops = 16; - if (align_jumps <= 0) - align_jumps = 16; - } - if (align_functions <= 0) - align_functions = 16; - - /* Acquire a unique set number for our register saves and restores. */ - alpha_sr_alias_set = new_alias_set (); - - /* Register variables and functions with the garbage collector. */ - - /* Set up function hooks. */ - init_machine_status = alpha_init_machine_status; - - /* Tell the compiler when we're using VAX floating point. */ - if (TARGET_FLOAT_VAX) - { - REAL_MODE_FORMAT (SFmode) = &vax_f_format; - REAL_MODE_FORMAT (DFmode) = &vax_g_format; - REAL_MODE_FORMAT (TFmode) = NULL; - } -} - -/* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */ - -int -zap_mask (HOST_WIDE_INT value) -{ - int i; - - for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR; - i++, value >>= 8) - if ((value & 0xff) != 0 && (value & 0xff) != 0xff) - return 0; - - return 1; -} - -/* Returns 1 if OP is either the constant zero or a register. If a - register, it must be in the proper mode unless MODE is VOIDmode. */ - -int -reg_or_0_operand (rtx op, enum machine_mode mode) -{ - return op == CONST0_RTX (mode) || register_operand (op, mode); -} - -/* Return 1 if OP is a constant in the range of 0-63 (for a shift) or - any register. */ - -int -reg_or_6bit_operand (rtx op, enum machine_mode mode) -{ - return ((GET_CODE (op) == CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (op) < 64) - || register_operand (op, mode)); -} - - -/* Return 1 if OP is an 8-bit constant or any register. */ - -int -reg_or_8bit_operand (rtx op, enum machine_mode mode) -{ - return ((GET_CODE (op) == CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (op) < 0x100) - || register_operand (op, mode)); -} - -/* Return 1 if OP is a constant or any register. */ - -int -reg_or_const_int_operand (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 -cint8_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return ((GET_CODE (op) == CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (op) < 0x100)); -} - -/* Return 1 if the operand is a valid second operand to an add insn. */ - -int -add_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT) - /* Constraints I, J, O and P are covered by K. */ - return (CONST_OK_FOR_LETTER_P (INTVAL (op), 'K') - || CONST_OK_FOR_LETTER_P (INTVAL (op), 'L')); - - return register_operand (op, mode); -} - -/* Return 1 if the operand is a valid second operand to a sign-extending - add insn. */ - -int -sext_add_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT) - return (CONST_OK_FOR_LETTER_P (INTVAL (op), 'I') - || CONST_OK_FOR_LETTER_P (INTVAL (op), 'O')); - - return reg_not_elim_operand (op, mode); -} - -/* Return 1 if OP is the constant 4 or 8. */ - -int -const48_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return (GET_CODE (op) == CONST_INT - && (INTVAL (op) == 4 || INTVAL (op) == 8)); -} - -/* Return 1 if OP is a valid first operand to an AND insn. */ - -int -and_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode) - return (zap_mask (CONST_DOUBLE_LOW (op)) - && zap_mask (CONST_DOUBLE_HIGH (op))); - - if (GET_CODE (op) == CONST_INT) - return ((unsigned HOST_WIDE_INT) INTVAL (op) < 0x100 - || (unsigned HOST_WIDE_INT) ~ INTVAL (op) < 0x100 - || zap_mask (INTVAL (op))); - - return register_operand (op, mode); -} - -/* Return 1 if OP is a valid first operand to an IOR or XOR insn. */ - -int -or_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT) - return ((unsigned HOST_WIDE_INT) INTVAL (op) < 0x100 - || (unsigned HOST_WIDE_INT) ~ INTVAL (op) < 0x100); - - return register_operand (op, mode); -} - -/* Return 1 if OP is a constant that is the width, in bits, of an integral - mode smaller than DImode. */ - -int -mode_width_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return (GET_CODE (op) == CONST_INT - && (INTVAL (op) == 8 || INTVAL (op) == 16 - || INTVAL (op) == 32 || INTVAL (op) == 64)); -} - -/* Return 1 if OP is a constant that is the width of an integral machine mode - smaller than an integer. */ - -int -mode_mask_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) == CONST_INT) - { - HOST_WIDE_INT value = INTVAL (op); - - if (value == 0xff) - return 1; - if (value == 0xffff) - return 1; - if (value == 0xffffffff) - return 1; - if (value == -1) - return 1; - } - else if (HOST_BITS_PER_WIDE_INT == 32 && GET_CODE (op) == CONST_DOUBLE) - { - if (CONST_DOUBLE_LOW (op) == 0xffffffff && CONST_DOUBLE_HIGH (op) == 0) - return 1; - } - - return 0; -} - -/* Return 1 if OP is a multiple of 8 less than 64. */ - -int -mul8_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return (GET_CODE (op) == CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (op) < 64 - && (INTVAL (op) & 7) == 0); -} - -/* Return 1 if OP is the zero constant for MODE. */ - -int -const0_operand (rtx op, enum machine_mode mode) -{ - return op == CONST0_RTX (mode); -} - -/* Return 1 if OP is a hard floating-point register. */ - -int -hard_fp_register_operand (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - - if (GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - return GET_CODE (op) == REG && REGNO_REG_CLASS (REGNO (op)) == FLOAT_REGS; -} - -/* Return 1 if OP is a hard general register. */ - -int -hard_int_register_operand (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - - if (GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - return GET_CODE (op) == REG && REGNO_REG_CLASS (REGNO (op)) == GENERAL_REGS; -} - -/* Return 1 if OP is a register or a constant integer. */ - - -int -reg_or_cint_operand (rtx op, enum machine_mode mode) -{ - return (GET_CODE (op) == CONST_INT - || register_operand (op, mode)); -} - -/* Return 1 if OP is something that can be reloaded into a register; - if it is a MEM, it need not be valid. */ - -int -some_operand (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - - switch (GET_CODE (op)) - { - case REG: - case MEM: - case CONST_INT: - case CONST_DOUBLE: - case CONST_VECTOR: - case LABEL_REF: - case SYMBOL_REF: - case CONST: - case HIGH: - return 1; - - case SUBREG: - return some_operand (SUBREG_REG (op), VOIDmode); - - default: - break; - } - - return 0; -} - -/* Likewise, but don't accept constants. */ - -int -some_ni_operand (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode) - return 0; - - if (GET_CODE (op) == SUBREG) - op = SUBREG_REG (op); - - return (GET_CODE (op) == REG || GET_CODE (op) == MEM); -} - -/* Return 1 if OP is a valid operand for the source of a move insn. */ - -int -input_operand (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - - if (GET_MODE_CLASS (mode) == MODE_FLOAT && GET_MODE (op) != mode) - return 0; - - switch (GET_CODE (op)) - { - case LABEL_REF: - case SYMBOL_REF: - case CONST: - if (TARGET_EXPLICIT_RELOCS) - { - /* We don't split symbolic operands into something unintelligable - until after reload, but we do not wish non-small, non-global - symbolic operands to be reconstructed from their high/lo_sum - form. */ - return (small_symbolic_operand (op, mode) - || global_symbolic_operand (op, mode) - || gotdtp_symbolic_operand (op, mode) - || gottp_symbolic_operand (op, mode)); - } - - /* This handles both the Windows/NT and OSF cases. */ - return mode == ptr_mode || mode == DImode; - - case HIGH: - return (TARGET_EXPLICIT_RELOCS - && local_symbolic_operand (XEXP (op, 0), mode)); - - case REG: - case ADDRESSOF: - return 1; - - case SUBREG: - if (register_operand (op, mode)) - return 1; - /* ... fall through ... */ - case MEM: - return ((TARGET_BWX || (mode != HImode && mode != QImode)) - && general_operand (op, mode)); - - case CONST_DOUBLE: - case CONST_VECTOR: - return op == CONST0_RTX (mode); - - case CONST_INT: - return mode == QImode || mode == HImode || add_operand (op, mode); - - case CONSTANT_P_RTX: - return 1; - - default: - break; - } - - return 0; -} - -/* Return 1 if OP is a SYMBOL_REF for a function known to be in this - file, and in the same section as the current function. */ - -int -samegp_function_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) != SYMBOL_REF) - return false; - - /* Easy test for recursion. */ - if (op == XEXP (DECL_RTL (current_function_decl), 0)) - return true; - - /* Functions that are not local can be overridden, and thus may - not share the same gp. */ - if (! SYMBOL_REF_LOCAL_P (op)) - return false; - - /* If -msmall-data is in effect, assume that there is only one GP - for the module, and so any local symbol has this property. We - need explicit relocations to be able to enforce this for symbols - not defined in this unit of translation, however. */ - if (TARGET_EXPLICIT_RELOCS && TARGET_SMALL_DATA) - return true; - - /* Functions that are not external are defined in this UoT, - and thus must share the same gp. */ - return ! SYMBOL_REF_EXTERNAL_P (op); -} - -/* Return 1 if OP is a SYMBOL_REF for which we can make a call via bsr. */ - -int -direct_call_operand (rtx op, enum machine_mode mode) -{ - tree op_decl, cfun_sec, op_sec; - - /* Must share the same GP. */ - if (!samegp_function_operand (op, mode)) - return false; - - /* If profiling is implemented via linker tricks, we can't jump - to the nogp alternate entry point. Note that current_function_profile - would not be correct, since that doesn't indicate if the target - function uses profiling. */ - /* ??? TARGET_PROFILING_NEEDS_GP isn't really the right test, - but is approximately correct for the OSF ABIs. Don't know - what to do for VMS, NT, or UMK. */ - if (!TARGET_PROFILING_NEEDS_GP && profile_flag) - return false; - - /* Must be a function. In some cases folks create thunks in static - data structures and then make calls to them. If we allow the - direct call, we'll get an error from the linker about !samegp reloc - against a symbol without a .prologue directive. */ - if (!SYMBOL_REF_FUNCTION_P (op)) - return false; - - /* Must be "near" so that the branch is assumed to reach. With - -msmall-text, this is assumed true of all local symbols. Since - we've already checked samegp, locality is already assured. */ - if (TARGET_SMALL_TEXT) - return true; - - /* Otherwise, a decl is "near" if it is defined in the same section. */ - if (flag_function_sections) - return false; - - op_decl = SYMBOL_REF_DECL (op); - if (DECL_ONE_ONLY (current_function_decl) - || (op_decl && DECL_ONE_ONLY (op_decl))) - return false; - - cfun_sec = DECL_SECTION_NAME (current_function_decl); - op_sec = op_decl ? DECL_SECTION_NAME (op_decl) : NULL; - return ((!cfun_sec && !op_sec) - || (cfun_sec && op_sec - && strcmp (TREE_STRING_POINTER (cfun_sec), - TREE_STRING_POINTER (op_sec)) == 0)); -} - -/* Return true if OP is a LABEL_REF, or SYMBOL_REF or CONST referencing - a (non-tls) variable known to be defined in this file. */ - -int -local_symbolic_operand (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - - if (GET_CODE (op) == LABEL_REF) - return 1; - - if (GET_CODE (op) == CONST - && GET_CODE (XEXP (op, 0)) == PLUS - && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) - op = XEXP (XEXP (op, 0), 0); - - if (GET_CODE (op) != SYMBOL_REF) - return 0; - - return SYMBOL_REF_LOCAL_P (op) && !SYMBOL_REF_TLS_MODEL (op); -} - -/* Return true if OP is a SYMBOL_REF or CONST referencing a variable - known to be defined in this file in the small data area. */ - -int -small_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (! TARGET_SMALL_DATA) - return 0; - - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - - if (GET_CODE (op) == CONST - && GET_CODE (XEXP (op, 0)) == PLUS - && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) - op = XEXP (XEXP (op, 0), 0); - - if (GET_CODE (op) != SYMBOL_REF) - return 0; - - /* ??? There's no encode_section_info equivalent for the rtl - constant pool, so SYMBOL_FLAG_SMALL never gets set. */ - if (CONSTANT_POOL_ADDRESS_P (op)) - return GET_MODE_SIZE (get_pool_mode (op)) <= g_switch_value; - - return (SYMBOL_REF_LOCAL_P (op) - && SYMBOL_REF_SMALL_P (op) - && SYMBOL_REF_TLS_MODEL (op) == 0); -} - -/* Return true if OP is a SYMBOL_REF or CONST referencing a variable - not known (or known not) to be defined in this file. */ - -int -global_symbolic_operand (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - - if (GET_CODE (op) == CONST - && GET_CODE (XEXP (op, 0)) == PLUS - && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) - op = XEXP (XEXP (op, 0), 0); - - if (GET_CODE (op) != SYMBOL_REF) - return 0; - - return !SYMBOL_REF_LOCAL_P (op) && !SYMBOL_REF_TLS_MODEL (op); -} - -/* Return 1 if OP is a valid operand for the MEM of a CALL insn. */ - -int -call_operand (rtx op, enum machine_mode mode) -{ - if (mode != Pmode) - return 0; - - if (GET_CODE (op) == REG) - { - if (TARGET_ABI_OSF) - { - /* Disallow virtual registers to cope with pathological test cases - such as compile/930117-1.c in which the virtual reg decomposes - to the frame pointer. Which is a hard reg that is not $27. */ - return (REGNO (op) == 27 || REGNO (op) > LAST_VIRTUAL_REGISTER); - } - else - return 1; - } - if (TARGET_ABI_UNICOSMK) - return 0; - if (GET_CODE (op) == SYMBOL_REF) - return 1; - - return 0; -} - -/* Returns 1 if OP is a symbolic operand, i.e. a symbol_ref or a label_ref, - possibly with an offset. */ - -int -symbolic_operand (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return 0; - if (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == LABEL_REF) - return 1; - if (GET_CODE (op) == CONST - && GET_CODE (XEXP (op,0)) == PLUS - && GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF - && GET_CODE (XEXP (XEXP (op,0), 1)) == CONST_INT) - return 1; - return 0; -} - -/* Return true if OP is valid for a particular TLS relocation. */ - -static int -tls_symbolic_operand_1 (rtx op, enum machine_mode mode, int size, int unspec) -{ - 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; - - if (SYMBOL_REF_LOCAL_P (op)) - { - if (alpha_tls_size > size) - return 0; - } - else - { - if (size != 64) - return 0; - } - - switch (SYMBOL_REF_TLS_MODEL (op)) - { - case TLS_MODEL_LOCAL_DYNAMIC: - return unspec == UNSPEC_DTPREL; - case TLS_MODEL_INITIAL_EXEC: - return unspec == UNSPEC_TPREL && size == 64; - case TLS_MODEL_LOCAL_EXEC: - return unspec == UNSPEC_TPREL; - default: - abort (); - } -} - -/* Return true if OP is valid for 16-bit DTP relative relocations. */ - -int -dtp16_symbolic_operand (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 (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 (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 (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 (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 (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. */ - -int -alpha_comparison_operator (rtx op, enum machine_mode mode) -{ - enum rtx_code code = GET_CODE (op); - - if (mode != GET_MODE (op) && mode != VOIDmode) - return 0; - - return (code == EQ || code == LE || code == LT - || code == LEU || code == LTU); -} - -/* Return 1 if OP is a valid Alpha comparison operator against zero. - Here we know which comparisons are valid in which insn. */ - -int -alpha_zero_comparison_operator (rtx op, enum machine_mode mode) -{ - enum rtx_code code = GET_CODE (op); - - if (mode != GET_MODE (op) && mode != VOIDmode) - return 0; - - return (code == EQ || code == NE || code == LE || code == LT - || code == LEU || code == LTU); -} - -/* Return 1 if OP is a valid Alpha swapped comparison operator. */ - -int -alpha_swapped_comparison_operator (rtx op, enum machine_mode mode) -{ - enum rtx_code code = GET_CODE (op); - - if ((mode != GET_MODE (op) && mode != VOIDmode) - || GET_RTX_CLASS (code) != '<') - return 0; - - code = swap_condition (code); - return (code == EQ || code == LE || code == LT - || code == LEU || code == LTU); -} - -/* Return 1 if OP is a signed comparison operation. */ - -int -signed_comparison_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - enum rtx_code code = GET_CODE (op); - - if (mode != GET_MODE (op) && mode != VOIDmode) - return 0; - - return (code == EQ || code == NE - || code == LE || code == LT - || code == GE || code == GT); -} - -/* Return 1 if OP is a valid Alpha floating point comparison operator. - Here we know which comparisons are valid in which insn. */ - -int -alpha_fp_comparison_operator (rtx op, enum machine_mode mode) -{ - enum rtx_code code = GET_CODE (op); - - if (mode != GET_MODE (op) && mode != VOIDmode) - return 0; - - return (code == EQ || code == LE || code == LT || code == UNORDERED); -} - -/* Return 1 if this is a divide or modulus operator. */ - -int -divmod_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - enum rtx_code code = GET_CODE (op); - - return (code == DIV || code == MOD || code == UDIV || code == UMOD); -} - -/* Return 1 if this is a float->int conversion operator. */ - -int -fix_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - enum rtx_code code = GET_CODE (op); - - return (code == FIX || code == UNSIGNED_FIX); -} - -/* Return 1 if this memory address is a known aligned register plus - a constant. It must be a valid address. This means that we can do - this as an aligned reference plus some offset. - - Take into account what reload will do. */ - -int -aligned_memory_operand (rtx op, enum machine_mode mode) -{ - rtx base; - - if (reload_in_progress) - { - rtx tmp = op; - if (GET_CODE (tmp) == SUBREG) - tmp = SUBREG_REG (tmp); - if (GET_CODE (tmp) == REG - && REGNO (tmp) >= FIRST_PSEUDO_REGISTER) - { - op = reg_equiv_memory_loc[REGNO (tmp)]; - if (op == 0) - return 0; - } - } - - if (GET_CODE (op) != MEM) - return 0; - if (MEM_ALIGN (op) >= 32) - return 1; - op = XEXP (op, 0); - - /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo) - sorts of constructs. Dig for the real base register. */ - if (reload_in_progress - && GET_CODE (op) == PLUS - && GET_CODE (XEXP (op, 0)) == PLUS) - base = XEXP (XEXP (op, 0), 0); - else - { - if (! memory_address_p (mode, op)) - return 0; - base = (GET_CODE (op) == PLUS ? XEXP (op, 0) : op); - } - - return (GET_CODE (base) == REG && REGNO_POINTER_ALIGN (REGNO (base)) >= 32); -} - -/* Similar, but return 1 if OP is a MEM which is not alignable. */ - -int -unaligned_memory_operand (rtx op, enum machine_mode mode) -{ - rtx base; - - if (reload_in_progress) - { - rtx tmp = op; - if (GET_CODE (tmp) == SUBREG) - tmp = SUBREG_REG (tmp); - if (GET_CODE (tmp) == REG - && REGNO (tmp) >= FIRST_PSEUDO_REGISTER) - { - op = reg_equiv_memory_loc[REGNO (tmp)]; - if (op == 0) - return 0; - } - } - - if (GET_CODE (op) != MEM) - return 0; - if (MEM_ALIGN (op) >= 32) - return 0; - op = XEXP (op, 0); - - /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo) - sorts of constructs. Dig for the real base register. */ - if (reload_in_progress - && GET_CODE (op) == PLUS - && GET_CODE (XEXP (op, 0)) == PLUS) - base = XEXP (XEXP (op, 0), 0); - else - { - if (! memory_address_p (mode, op)) - return 0; - base = (GET_CODE (op) == PLUS ? XEXP (op, 0) : op); - } - - return (GET_CODE (base) == REG && REGNO_POINTER_ALIGN (REGNO (base)) < 32); -} - -/* Return 1 if OP is either a register or an unaligned memory location. */ - -int -reg_or_unaligned_mem_operand (rtx op, enum machine_mode mode) -{ - return register_operand (op, mode) || unaligned_memory_operand (op, mode); -} - -/* Return 1 if OP is any memory location. During reload a pseudo matches. */ - -int -any_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return (GET_CODE (op) == MEM - || (GET_CODE (op) == SUBREG && GET_CODE (SUBREG_REG (op)) == REG) - || (reload_in_progress && GET_CODE (op) == REG - && REGNO (op) >= FIRST_PSEUDO_REGISTER) - || (reload_in_progress && GET_CODE (op) == SUBREG - && GET_CODE (SUBREG_REG (op)) == REG - && REGNO (SUBREG_REG (op)) >= FIRST_PSEUDO_REGISTER)); -} - -/* Returns 1 if OP is not an eliminable register. - - This exists to cure a pathological abort in the s8addq (et al) patterns, - - long foo () { long t; bar(); return (long) &t * 26107; } - - which run afoul of a hack in reload to cure a (presumably) similar - problem with lea-type instructions on other targets. But there is - one of us and many of them, so work around the problem by selectively - preventing combine from making the optimization. */ - -int -reg_not_elim_operand (rtx op, enum machine_mode mode) -{ - rtx inner = op; - if (GET_CODE (op) == SUBREG) - inner = SUBREG_REG (op); - if (inner == frame_pointer_rtx || inner == arg_pointer_rtx) - return 0; - - return register_operand (op, mode); -} - -/* Return 1 is OP is a memory location that is not a reference (using - an AND) to an unaligned location. Take into account what reload - will do. */ - -int -normal_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (reload_in_progress) - { - rtx tmp = op; - if (GET_CODE (tmp) == SUBREG) - tmp = SUBREG_REG (tmp); - if (GET_CODE (tmp) == REG - && REGNO (tmp) >= FIRST_PSEUDO_REGISTER) - { - op = reg_equiv_memory_loc[REGNO (tmp)]; - - /* This may not have been assigned an equivalent address if it will - be eliminated. In that case, it doesn't matter what we do. */ - if (op == 0) - return 1; - } - } - - return GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) != AND; -} - -/* Accept a register, but not a subreg of any kind. This allows us to - avoid pathological cases in reload wrt data movement common in - int->fp conversion. */ - -int -reg_no_subreg_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) != REG) - return 0; - return register_operand (op, mode); -} - -/* Recognize an addition operation that includes a constant. Used to - convince reload to canonize (plus (plus reg c1) c2) during register - elimination. */ - -int -addition_operation (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode) - return 0; - if (GET_CODE (op) == PLUS - && register_operand (XEXP (op, 0), mode) - && GET_CODE (XEXP (op, 1)) == CONST_INT - && CONST_OK_FOR_LETTER_P (INTVAL (XEXP (op, 1)), 'K')) - return 1; - return 0; -} - -/* Implements CONST_OK_FOR_LETTER_P. Return true if the value matches - the range defined for C in [I-P]. */ - -bool -alpha_const_ok_for_letter_p (HOST_WIDE_INT value, int c) -{ - switch (c) - { - case 'I': - /* An unsigned 8 bit constant. */ - return (unsigned HOST_WIDE_INT) value < 0x100; - case 'J': - /* The constant zero. */ - return value == 0; - case 'K': - /* A signed 16 bit constant. */ - return (unsigned HOST_WIDE_INT) (value + 0x8000) < 0x10000; - case 'L': - /* A shifted signed 16 bit constant appropriate for LDAH. */ - return ((value & 0xffff) == 0 - && ((value) >> 31 == -1 || value >> 31 == 0)); - case 'M': - /* A constant that can be AND'ed with using a ZAP insn. */ - return zap_mask (value); - case 'N': - /* A complemented unsigned 8 bit constant. */ - return (unsigned HOST_WIDE_INT) (~ value) < 0x100; - case 'O': - /* A negated unsigned 8 bit constant. */ - return (unsigned HOST_WIDE_INT) (- value) < 0x100; - case 'P': - /* The constant 1, 2 or 3. */ - return value == 1 || value == 2 || value == 3; - - default: - return false; - } -} - -/* Implements CONST_DOUBLE_OK_FOR_LETTER_P. Return true if VALUE - matches for C in [GH]. */ - -bool -alpha_const_double_ok_for_letter_p (rtx value, int c) -{ - switch (c) - { - case 'G': - /* The floating point zero constant. */ - return (GET_MODE_CLASS (GET_MODE (value)) == MODE_FLOAT - && value == CONST0_RTX (GET_MODE (value))); - - case 'H': - /* A valid operand of a ZAP insn. */ - return (GET_MODE (value) == VOIDmode - && zap_mask (CONST_DOUBLE_LOW (value)) - && zap_mask (CONST_DOUBLE_HIGH (value))); - - default: - return false; - } -} - -/* Implements CONST_DOUBLE_OK_FOR_LETTER_P. Return true if VALUE - matches for C. */ - -bool -alpha_extra_constraint (rtx value, int c) -{ - switch (c) - { - case 'Q': - return normal_memory_operand (value, VOIDmode); - case 'R': - return direct_call_operand (value, Pmode); - case 'S': - return (GET_CODE (value) == CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (value) < 64); - case 'T': - 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; - } -} - -/* Return 1 if this function can directly return via $26. */ - -int -direct_return (void) -{ - return (! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK - && reload_completed - && alpha_sa_size () == 0 - && get_frame_size () == 0 - && current_function_outgoing_args_size == 0 - && current_function_pretend_args_size == 0); -} - -/* Return the ADDR_VEC associated with a tablejump insn. */ - -rtx -alpha_tablejump_addr_vec (rtx insn) -{ - rtx tmp; - - tmp = JUMP_LABEL (insn); - if (!tmp) - return NULL_RTX; - tmp = NEXT_INSN (tmp); - if (!tmp) - return NULL_RTX; - if (GET_CODE (tmp) == JUMP_INSN - && GET_CODE (PATTERN (tmp)) == ADDR_DIFF_VEC) - return PATTERN (tmp); - return NULL_RTX; -} - -/* Return the label of the predicted edge, or CONST0_RTX if we don't know. */ - -rtx -alpha_tablejump_best_label (rtx insn) -{ - rtx jump_table = alpha_tablejump_addr_vec (insn); - rtx best_label = NULL_RTX; - - /* ??? Once the CFG doesn't keep getting completely rebuilt, look - there for edge frequency counts from profile data. */ - - if (jump_table) - { - int n_labels = XVECLEN (jump_table, 1); - int best_count = -1; - int i, j; - - for (i = 0; i < n_labels; i++) - { - int count = 1; - - for (j = i + 1; j < n_labels; j++) - if (XEXP (XVECEXP (jump_table, 1, i), 0) - == XEXP (XVECEXP (jump_table, 1, j), 0)) - count++; - - if (count > best_count) - best_count = count, best_label = XVECEXP (jump_table, 1, i); - } - } - - return best_label ? best_label : const0_rtx; -} - -/* Return the TLS model to use for SYMBOL. */ - -static enum tls_model -tls_symbolic_operand_type (rtx symbol) -{ - enum tls_model model; - - if (GET_CODE (symbol) != SYMBOL_REF) - return 0; - model = SYMBOL_REF_TLS_MODEL (symbol); - - /* Local-exec with a 64-bit size is the same code as initial-exec. */ - if (model == TLS_MODEL_LOCAL_EXEC && alpha_tls_size == 64) - model = TLS_MODEL_INITIAL_EXEC; - - return model; -} - -/* Return true if the function DECL will share the same GP as any - function in the current unit of translation. */ - -static bool -decl_has_samegp (tree decl) -{ - /* Functions that are not local can be overridden, and thus may - not share the same gp. */ - if (!(*targetm.binds_local_p) (decl)) - return false; - - /* If -msmall-data is in effect, assume that there is only one GP - for the module, and so any local symbol has this property. We - need explicit relocations to be able to enforce this for symbols - not defined in this unit of translation, however. */ - if (TARGET_EXPLICIT_RELOCS && TARGET_SMALL_DATA) - return true; - - /* Functions that are not external are defined in this UoT. */ - /* ??? Irritatingly, static functions not yet emitted are still - marked "external". Apply this to non-static functions only. */ - return !TREE_PUBLIC (decl) || !DECL_EXTERNAL (decl); -} - -/* Return true if EXP should be placed in the small data section. */ - -static bool -alpha_in_small_data_p (tree exp) -{ - /* We want to merge strings, so we never consider them small data. */ - if (TREE_CODE (exp) == STRING_CST) - return false; - - /* Functions are never in the small data area. Duh. */ - if (TREE_CODE (exp) == FUNCTION_DECL) - 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 && (unsigned HOST_WIDE_INT) size <= g_switch_value) - return true; - } - - return false; -} - -#if TARGET_ABI_OPEN_VMS -static bool -alpha_linkage_symbol_p (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. - - For Alpha, we have either a constant address or the sum of a - register and a constant address, or just a register. For DImode, - any of those forms can be surrounded with an AND that clear the - low-order three bits; this is an "unaligned" access. */ - -bool -alpha_legitimate_address_p (enum machine_mode mode, rtx x, int strict) -{ - /* If this is an ldq_u type address, discard the outer AND. */ - if (mode == DImode - && GET_CODE (x) == AND - && GET_CODE (XEXP (x, 1)) == CONST_INT - && INTVAL (XEXP (x, 1)) == -8) - x = XEXP (x, 0); - - /* Discard non-paradoxical subregs. */ - if (GET_CODE (x) == SUBREG - && (GET_MODE_SIZE (GET_MODE (x)) - < GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))) - x = SUBREG_REG (x); - - /* Unadorned general registers are valid. */ - if (REG_P (x) - && (strict - ? STRICT_REG_OK_FOR_BASE_P (x) - : NONSTRICT_REG_OK_FOR_BASE_P (x))) - return true; - - /* Constant addresses (i.e. +/- 32k) are valid. */ - 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) - { - rtx ofs = XEXP (x, 1); - x = XEXP (x, 0); - - /* Discard non-paradoxical subregs. */ - if (GET_CODE (x) == SUBREG - && (GET_MODE_SIZE (GET_MODE (x)) - < GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))) - x = SUBREG_REG (x); - - if (REG_P (x)) - { - if (! strict - && NONSTRICT_REG_OK_FP_BASE_P (x) - && GET_CODE (ofs) == CONST_INT) - return true; - if ((strict - ? STRICT_REG_OK_FOR_BASE_P (x) - : NONSTRICT_REG_OK_FOR_BASE_P (x)) - && CONSTANT_ADDRESS_P (ofs)) - return true; - } - else if (GET_CODE (x) == ADDRESSOF - && GET_CODE (ofs) == CONST_INT) - return true; - } - - /* If we're managing explicit relocations, LO_SUM is valid, as - are small data symbols. */ - else if (TARGET_EXPLICIT_RELOCS) - { - if (small_symbolic_operand (x, Pmode)) - return true; - - if (GET_CODE (x) == LO_SUM) - { - rtx ofs = XEXP (x, 1); - x = XEXP (x, 0); - - /* Discard non-paradoxical subregs. */ - if (GET_CODE (x) == SUBREG - && (GET_MODE_SIZE (GET_MODE (x)) - < GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))) - x = SUBREG_REG (x); - - /* Must have a valid base register. */ - if (! (REG_P (x) - && (strict - ? STRICT_REG_OK_FOR_BASE_P (x) - : NONSTRICT_REG_OK_FOR_BASE_P (x)))) - return false; - - /* The symbol must be local. */ - if (local_symbolic_operand (ofs, Pmode) - || dtp32_symbolic_operand (ofs, Pmode) - || tp32_symbolic_operand (ofs, Pmode)) - return true; - } - } - - return false; -} - -/* Build the SYMBOL_REF for __tls_get_addr. */ - -static GTY(()) rtx tls_get_addr_libfunc; - -static rtx -get_tls_get_addr (void) -{ - if (!tls_get_addr_libfunc) - tls_get_addr_libfunc = init_one_libfunc ("__tls_get_addr"); - return tls_get_addr_libfunc; -} - -/* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. */ - -rtx -alpha_legitimize_address (rtx x, rtx scratch, - enum machine_mode mode ATTRIBUTE_UNUSED) -{ - HOST_WIDE_INT addend; - - /* If the address is (plus reg const_int) and the CONST_INT is not a - valid offset, compute the high part of the constant and add it to - the register. Then our address is (plus temp low-part-const). */ - if (GET_CODE (x) == PLUS - && GET_CODE (XEXP (x, 0)) == REG - && GET_CODE (XEXP (x, 1)) == CONST_INT - && ! CONSTANT_ADDRESS_P (XEXP (x, 1))) - { - addend = INTVAL (XEXP (x, 1)); - x = XEXP (x, 0); - goto split_addend; - } - - /* If the address is (const (plus FOO const_int)), find the low-order - part of the CONST_INT. Then load FOO plus any high-order part of the - CONST_INT into a register. Our address is (plus reg low-part-const). - This is done to reduce the number of GOT entries. */ - if (!no_new_pseudos - && GET_CODE (x) == CONST - && GET_CODE (XEXP (x, 0)) == PLUS - && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT) - { - addend = INTVAL (XEXP (XEXP (x, 0), 1)); - x = force_reg (Pmode, XEXP (XEXP (x, 0), 0)); - goto split_addend; - } - - /* If we have a (plus reg const), emit the load as in (2), then add - the two registers, and finally generate (plus reg low-part-const) as - our address. */ - if (!no_new_pseudos - && GET_CODE (x) == PLUS - && GET_CODE (XEXP (x, 0)) == REG - && GET_CODE (XEXP (x, 1)) == CONST - && GET_CODE (XEXP (XEXP (x, 1), 0)) == PLUS - && GET_CODE (XEXP (XEXP (XEXP (x, 1), 0), 1)) == CONST_INT) - { - addend = INTVAL (XEXP (XEXP (XEXP (x, 1), 0), 1)); - x = expand_simple_binop (Pmode, PLUS, XEXP (x, 0), - XEXP (XEXP (XEXP (x, 1), 0), 0), - NULL_RTX, 1, OPTAB_LIB_WIDEN); - goto split_addend; - } - - /* 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 = get_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 = get_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)) - return x; - else - { - if (!no_new_pseudos) - scratch = gen_reg_rtx (Pmode); - emit_insn (gen_rtx_SET (VOIDmode, scratch, - gen_rtx_HIGH (Pmode, x))); - return gen_rtx_LO_SUM (Pmode, scratch, x); - } - } - } - - return NULL; - - split_addend: - { - HOST_WIDE_INT low, high; - - low = ((addend & 0xffff) ^ 0x8000) - 0x8000; - addend -= low; - high = ((addend & 0xffffffff) ^ 0x80000000) - 0x80000000; - addend -= high; - - if (addend) - x = expand_simple_binop (Pmode, PLUS, x, GEN_INT (addend), - (no_new_pseudos ? scratch : NULL_RTX), - 1, OPTAB_LIB_WIDEN); - if (high) - x = expand_simple_binop (Pmode, PLUS, x, GEN_INT (high), - (no_new_pseudos ? scratch : NULL_RTX), - 1, OPTAB_LIB_WIDEN); - - return plus_constant (x, low); - } -} - -/* Primarily this is required for TLS symbols, but given that our move - patterns *ought* to be able to handle any symbol at any time, we - should never be spilling symbolic operands to the constant pool, ever. */ - -static bool -alpha_cannot_force_const_mem (rtx x) -{ - enum rtx_code code = GET_CODE (x); - return code == SYMBOL_REF || code == LABEL_REF || code == CONST; -} - -/* We do not allow indirect calls to be optimized into sibling calls, nor - can we allow a call to a function with a different GP to be optimized - into a sibcall. */ - -static bool -alpha_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) -{ - /* Can't do indirect tail calls, since we don't know if the target - uses the same GP. */ - if (!decl) - return false; - - /* Otherwise, we can make a tail call if the target function shares - the same GP. */ - return decl_has_samegp (decl); -} - -/* For TARGET_EXPLICIT_RELOCS, we don't obfuscate a SYMBOL_REF to a - small symbolic operand until after reload. At which point we need - to replace (mem (symbol_ref)) with (mem (lo_sum $29 symbol_ref)) - so that sched2 has the proper dependency information. */ - -static int -some_small_symbolic_operand_1 (rtx *px, void *data ATTRIBUTE_UNUSED) -{ - rtx x = *px; - - /* Don't re-split. */ - if (GET_CODE (x) == LO_SUM) - return -1; - - return small_symbolic_operand (x, Pmode) != 0; -} - -int -some_small_symbolic_operand (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return for_each_rtx (&x, some_small_symbolic_operand_1, NULL); -} - -static int -split_small_symbolic_operand_1 (rtx *px, void *data ATTRIBUTE_UNUSED) -{ - rtx x = *px; - - /* Don't re-split. */ - if (GET_CODE (x) == LO_SUM) - return -1; - - if (small_symbolic_operand (x, Pmode)) - { - x = gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, x); - *px = x; - return -1; - } - - return 0; -} - -rtx -split_small_symbolic_operand (rtx x) -{ - x = copy_insn (x); - for_each_rtx (&x, split_small_symbolic_operand_1, NULL); - return x; -} - -/* Indicate that INSN cannot be duplicated. This is true for any insn - that we've marked with gpdisp relocs, since those have to stay in - 1-1 correspondence with one another. - - Technically we could copy them if we could set up a mapping from one - sequence number to another, across the set of insns to be duplicated. - This seems overly complicated and error-prone since interblock motion - from sched-ebb could move one of the pair of insns to a different block. - - Also cannot allow jsr insns to be duplicated. If they throw exceptions, - then they'll be in a different block from their ldgp. Which could lead - the bb reorder code to think that it would be ok to copy just the block - containing the call and branch to the block containing the ldgp. */ - -static bool -alpha_cannot_copy_insn_p (rtx insn) -{ - if (!reload_completed || !TARGET_EXPLICIT_RELOCS) - return false; - if (recog_memoized (insn) >= 0) - return get_attr_cannot_copy (insn); - else - return false; -} - - -/* Try a machine-dependent way of reloading an illegitimate address - operand. If we find one, push the reload and return the new rtx. */ - -rtx -alpha_legitimize_reload_address (rtx x, - enum machine_mode mode ATTRIBUTE_UNUSED, - int opnum, int type, - int ind_levels ATTRIBUTE_UNUSED) -{ - /* We must recognize output that we have already generated ourselves. */ - if (GET_CODE (x) == PLUS - && GET_CODE (XEXP (x, 0)) == PLUS - && GET_CODE (XEXP (XEXP (x, 0), 0)) == REG - && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT - && GET_CODE (XEXP (x, 1)) == CONST_INT) - { - push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL, - BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0, - opnum, type); - return x; - } - - /* We wish to handle large displacements off a base register by - splitting the addend across an ldah and the mem insn. This - cuts number of extra insns needed from 3 to 1. */ - if (GET_CODE (x) == PLUS - && GET_CODE (XEXP (x, 0)) == REG - && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER - && REGNO_OK_FOR_BASE_P (REGNO (XEXP (x, 0))) - && GET_CODE (XEXP (x, 1)) == CONST_INT) - { - HOST_WIDE_INT val = INTVAL (XEXP (x, 1)); - HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000; - HOST_WIDE_INT high - = (((val - low) & 0xffffffff) ^ 0x80000000) - 0x80000000; - - /* Check for 32-bit overflow. */ - if (high + low != val) - return NULL_RTX; - - /* Reload the high part into a base reg; leave the low part - in the mem directly. */ - x = gen_rtx_PLUS (GET_MODE (x), - gen_rtx_PLUS (GET_MODE (x), XEXP (x, 0), - GEN_INT (high)), - GEN_INT (low)); - - push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL, - BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0, - opnum, type); - return x; - } - - return NULL_RTX; -} - -/* Compute a (partial) cost for rtx X. Return true if the complete - cost has been computed, and false if subexpressions should be - scanned. In either case, *TOTAL contains the cost result. */ - -static bool -alpha_rtx_costs (rtx x, int code, int outer_code, int *total) -{ - enum machine_mode mode = GET_MODE (x); - bool float_mode_p = FLOAT_MODE_P (mode); - - switch (code) - { - /* If this is an 8-bit constant, return zero since it can be used - nearly anywhere with no cost. If it is a valid operand for an - ADD or AND, likewise return 0 if we know it will be used in that - context. Otherwise, return 2 since it might be used there later. - All other constants take at least two insns. */ - case CONST_INT: - if (INTVAL (x) >= 0 && INTVAL (x) < 256) - { - *total = 0; - return true; - } - /* FALLTHRU */ - - case CONST_DOUBLE: - if (x == CONST0_RTX (mode)) - *total = 0; - else if ((outer_code == PLUS && add_operand (x, VOIDmode)) - || (outer_code == AND && and_operand (x, VOIDmode))) - *total = 0; - else if (add_operand (x, VOIDmode) || and_operand (x, VOIDmode)) - *total = 2; - else - *total = COSTS_N_INSNS (2); - return true; - - case CONST: - case SYMBOL_REF: - case LABEL_REF: - if (TARGET_EXPLICIT_RELOCS && small_symbolic_operand (x, VOIDmode)) - *total = COSTS_N_INSNS (outer_code != MEM); - else if (TARGET_EXPLICIT_RELOCS && local_symbolic_operand (x, VOIDmode)) - *total = COSTS_N_INSNS (1 + (outer_code != MEM)); - else if (tls_symbolic_operand_type (x)) - /* Estimate of cost for call_pal rduniq. */ - *total = COSTS_N_INSNS (15); - else - /* Otherwise we do a load from the GOT. */ - *total = COSTS_N_INSNS (alpha_memory_latency); - return true; - - case PLUS: - case MINUS: - if (float_mode_p) - *total = alpha_rtx_cost_data[alpha_cpu].fp_add; - else if (GET_CODE (XEXP (x, 0)) == MULT - && const48_operand (XEXP (XEXP (x, 0), 1), VOIDmode)) - { - *total = (rtx_cost (XEXP (XEXP (x, 0), 0), outer_code) - + rtx_cost (XEXP (x, 1), outer_code) + 2); - return true; - } - return false; - - case MULT: - if (float_mode_p) - *total = alpha_rtx_cost_data[alpha_cpu].fp_mult; - else if (mode == DImode) - *total = alpha_rtx_cost_data[alpha_cpu].int_mult_di; - else - *total = alpha_rtx_cost_data[alpha_cpu].int_mult_si; - return false; - - case ASHIFT: - if (GET_CODE (XEXP (x, 1)) == CONST_INT - && INTVAL (XEXP (x, 1)) <= 3) - { - *total = COSTS_N_INSNS (1); - return false; - } - /* FALLTHRU */ - - case ASHIFTRT: - case LSHIFTRT: - *total = alpha_rtx_cost_data[alpha_cpu].int_shift; - return false; - - case IF_THEN_ELSE: - if (float_mode_p) - *total = alpha_rtx_cost_data[alpha_cpu].fp_add; - else - *total = alpha_rtx_cost_data[alpha_cpu].int_cmov; - return false; - - case DIV: - case UDIV: - case MOD: - case UMOD: - if (!float_mode_p) - *total = COSTS_N_INSNS (70); /* ??? */ - else if (mode == SFmode) - *total = alpha_rtx_cost_data[alpha_cpu].fp_div_sf; - else - *total = alpha_rtx_cost_data[alpha_cpu].fp_div_df; - return false; - - case MEM: - *total = COSTS_N_INSNS (alpha_memory_latency); - return true; - - case NEG: - if (! float_mode_p) - { - *total = COSTS_N_INSNS (1); - return false; - } - /* FALLTHRU */ - - case ABS: - if (! float_mode_p) - { - *total = COSTS_N_INSNS (1) + alpha_rtx_cost_data[alpha_cpu].int_cmov; - return false; - } - /* FALLTHRU */ - - case FLOAT: - case UNSIGNED_FLOAT: - case FIX: - case UNSIGNED_FIX: - case FLOAT_EXTEND: - case FLOAT_TRUNCATE: - *total = alpha_rtx_cost_data[alpha_cpu].fp_add; - return false; - - default: - return false; - } -} - -/* REF is an alignable memory location. Place an aligned SImode - reference into *PALIGNED_MEM and the number of bits to shift into - *PBITNUM. SCRATCH is a free register for use in reloading out - of range stack slots. */ - -void -get_aligned_mem (rtx ref, rtx *paligned_mem, rtx *pbitnum) -{ - rtx base; - HOST_WIDE_INT offset = 0; - - if (GET_CODE (ref) != MEM) - abort (); - - if (reload_in_progress - && ! memory_address_p (GET_MODE (ref), XEXP (ref, 0))) - { - base = find_replacement (&XEXP (ref, 0)); - - if (! memory_address_p (GET_MODE (ref), base)) - abort (); - } - else - { - base = XEXP (ref, 0); - } - - if (GET_CODE (base) == PLUS) - offset += INTVAL (XEXP (base, 1)), base = XEXP (base, 0); - - *paligned_mem - = widen_memory_access (ref, SImode, (offset & ~3) - offset); - - if (WORDS_BIG_ENDIAN) - *pbitnum = GEN_INT (32 - (GET_MODE_BITSIZE (GET_MODE (ref)) - + (offset & 3) * 8)); - else - *pbitnum = GEN_INT ((offset & 3) * 8); -} - -/* Similar, but just get the address. Handle the two reload cases. - Add EXTRA_OFFSET to the address we return. */ - -rtx -get_unaligned_address (rtx ref, int extra_offset) -{ - rtx base; - HOST_WIDE_INT offset = 0; - - if (GET_CODE (ref) != MEM) - abort (); - - if (reload_in_progress - && ! memory_address_p (GET_MODE (ref), XEXP (ref, 0))) - { - base = find_replacement (&XEXP (ref, 0)); - - if (! memory_address_p (GET_MODE (ref), base)) - abort (); - } - else - { - base = XEXP (ref, 0); - } - - if (GET_CODE (base) == PLUS) - offset += INTVAL (XEXP (base, 1)), base = XEXP (base, 0); - - return plus_constant (base, offset + extra_offset); -} - -/* On the Alpha, all (non-symbolic) constants except zero go into - a floating-point register via memory. Note that we cannot - return anything that is not a subset of CLASS, and that some - symbolic constants cannot be dropped to memory. */ - -enum reg_class -alpha_preferred_reload_class(rtx x, enum reg_class class) -{ - /* Zero is present in any register class. */ - if (x == CONST0_RTX (GET_MODE (x))) - return class; - - /* These sorts of constants we can easily drop to memory. */ - if (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE) - { - if (class == FLOAT_REGS) - return NO_REGS; - if (class == ALL_REGS) - return GENERAL_REGS; - return class; - } - - /* All other kinds of constants should not (and in the case of HIGH - cannot) be dropped to memory -- instead we use a GENERAL_REGS - secondary reload. */ - if (CONSTANT_P (x)) - return (class == ALL_REGS ? GENERAL_REGS : class); - - return class; -} - -/* Loading and storing HImode or QImode values to and from memory - usually requires a scratch register. The exceptions are loading - QImode and HImode from an aligned address to a general register - unless byte instructions are permitted. - - We also cannot load an unaligned address or a paradoxical SUBREG - into an FP register. - - We also cannot do integral arithmetic into FP regs, as might result - from register elimination into a DImode fp register. */ - -enum reg_class -secondary_reload_class (enum reg_class class, enum machine_mode mode, - rtx x, int in) -{ - if ((mode == QImode || mode == HImode) && ! TARGET_BWX) - { - if (GET_CODE (x) == MEM - || (GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER) - || (GET_CODE (x) == SUBREG - && (GET_CODE (SUBREG_REG (x)) == MEM - || (GET_CODE (SUBREG_REG (x)) == REG - && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER)))) - { - if (!in || !aligned_memory_operand(x, mode)) - return GENERAL_REGS; - } - } - - if (class == FLOAT_REGS) - { - if (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == AND) - return GENERAL_REGS; - - if (GET_CODE (x) == SUBREG - && (GET_MODE_SIZE (GET_MODE (x)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))) - return GENERAL_REGS; - - if (in && INTEGRAL_MODE_P (mode) - && ! (memory_operand (x, mode) || x == const0_rtx)) - return GENERAL_REGS; - } - - return NO_REGS; -} - -/* Subfunction of the following function. Update the flags of any MEM - found in part of X. */ - -static void -alpha_set_memflags_1 (rtx x, int in_struct_p, int volatile_p, int unchanging_p) -{ - int i; - - 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, - unchanging_p); - break; - - case INSN: - alpha_set_memflags_1 (PATTERN (x), in_struct_p, volatile_p, - unchanging_p); - break; - - case SET: - alpha_set_memflags_1 (SET_DEST (x), in_struct_p, volatile_p, - unchanging_p); - alpha_set_memflags_1 (SET_SRC (x), in_struct_p, volatile_p, - unchanging_p); - break; - - case MEM: - MEM_IN_STRUCT_P (x) = in_struct_p; - MEM_VOLATILE_P (x) = volatile_p; - RTX_UNCHANGING_P (x) = unchanging_p; - /* Sadly, we cannot use alias sets because the extra aliasing - produced by the AND interferes. Given that two-byte quantities - are the only thing we would be able to differentiate anyway, - there does not seem to be any point in convoluting the early - out of the alias check. */ - break; - - default: - break; - } -} - -/* 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 (rtx insn, rtx ref) -{ - int in_struct_p, volatile_p, unchanging_p; - - if (GET_CODE (ref) != MEM) - return; - - in_struct_p = MEM_IN_STRUCT_P (ref); - volatile_p = MEM_VOLATILE_P (ref); - unchanging_p = RTX_UNCHANGING_P (ref); - - /* This is only called from alpha.md, after having had something - generated from one of the insn patterns. So if everything is - zero, the pattern is already up-to-date. */ - if (! in_struct_p && ! volatile_p && ! unchanging_p) - return; - - alpha_set_memflags_1 (insn, in_struct_p, volatile_p, unchanging_p); -} - -/* Internal routine for alpha_emit_set_const to check for N or below insns. */ - -static rtx -alpha_emit_set_const_1 (rtx target, enum machine_mode mode, - HOST_WIDE_INT c, int n) -{ - HOST_WIDE_INT new; - int i, bits; - /* Use a pseudo if highly optimizing and still generating RTL. */ - rtx subtarget - = (flag_expensive_optimizations && !no_new_pseudos ? 0 : target); - rtx temp, insn; - - /* If this is a sign-extended 32-bit constant, we can do this in at most - three insns, so do it if we have enough insns left. We always have - a sign-extended 32-bit constant when compiling on a narrow machine. */ - - if (HOST_BITS_PER_WIDE_INT != 64 - || c >> 31 == -1 || c >> 31 == 0) - { - HOST_WIDE_INT low = ((c & 0xffff) ^ 0x8000) - 0x8000; - HOST_WIDE_INT tmp1 = c - low; - HOST_WIDE_INT high = (((tmp1 >> 16) & 0xffff) ^ 0x8000) - 0x8000; - HOST_WIDE_INT extra = 0; - - /* If HIGH will be interpreted as negative but the constant is - positive, we must adjust it to do two ldha insns. */ - - if ((high & 0x8000) != 0 && c >= 0) - { - extra = 0x4000; - tmp1 -= 0x40000000; - high = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); - } - - if (c == low || (low == 0 && extra == 0)) - { - /* We used to use copy_to_suggested_reg (GEN_INT (c), target, mode) - but that meant that we can't handle INT_MIN on 32-bit machines - (like NT/Alpha), because we recurse indefinitely through - emit_move_insn to gen_movdi. So instead, since we know exactly - what we want, create it explicitly. */ - - if (target == NULL) - target = gen_reg_rtx (mode); - emit_insn (gen_rtx_SET (VOIDmode, target, GEN_INT (c))); - return target; - } - else if (n >= 2 + (extra != 0)) - { - if (no_new_pseudos) - { - emit_insn (gen_rtx_SET (VOIDmode, target, GEN_INT (high << 16))); - temp = target; - } - else - temp = copy_to_suggested_reg (GEN_INT (high << 16), - subtarget, mode); - - /* As of 2002-02-23, addsi3 is only available when not optimizing. - This means that if we go through expand_binop, we'll try to - generate extensions, etc, which will require new pseudos, which - will fail during some split phases. The SImode add patterns - still exist, but are not named. So build the insns by hand. */ - - if (extra != 0) - { - if (! subtarget) - subtarget = gen_reg_rtx (mode); - insn = gen_rtx_PLUS (mode, temp, GEN_INT (extra << 16)); - insn = gen_rtx_SET (VOIDmode, subtarget, insn); - emit_insn (insn); - temp = subtarget; - } - - if (target == NULL) - target = gen_reg_rtx (mode); - insn = gen_rtx_PLUS (mode, temp, GEN_INT (low)); - insn = gen_rtx_SET (VOIDmode, target, insn); - emit_insn (insn); - return target; - } - } - - /* If we couldn't do it that way, try some other methods. But if we have - no instructions left, don't bother. Likewise, if this is SImode and - we can't make pseudos, we can't do anything since the expand_binop - and expand_unop calls will widen and try to make pseudos. */ - - if (n == 1 || (mode == SImode && no_new_pseudos)) - return 0; - - /* Next, see if we can load a related constant and then shift and possibly - negate it to get the constant we want. Try this once each increasing - numbers of insns. */ - - for (i = 1; i < n; i++) - { - /* First, see if minus some low bits, we've an easy load of - high bits. */ - - new = ((c & 0xffff) ^ 0x8000) - 0x8000; - if (new != 0 - && (temp = alpha_emit_set_const (subtarget, mode, c - new, i)) != 0) - return expand_binop (mode, add_optab, temp, GEN_INT (new), - target, 0, OPTAB_WIDEN); - - /* Next try complementing. */ - if ((temp = alpha_emit_set_const (subtarget, mode, ~ c, i)) != 0) - return expand_unop (mode, one_cmpl_optab, temp, target, 0); - - /* Next try to form a constant and do a left shift. We can do this - if some low-order bits are zero; the exact_log2 call below tells - us that information. The bits we are shifting out could be any - value, but here we'll just try the 0- and sign-extended forms of - the constant. To try to increase the chance of having the same - constant in more than one insn, start at the highest number of - bits to shift, but try all possibilities in case a ZAPNOT will - be useful. */ - - if ((bits = exact_log2 (c & - c)) > 0) - for (; bits > 0; bits--) - if ((temp = (alpha_emit_set_const - (subtarget, mode, c >> bits, i))) != 0 - || ((temp = (alpha_emit_set_const - (subtarget, mode, - ((unsigned HOST_WIDE_INT) c) >> bits, i))) - != 0)) - return expand_binop (mode, ashl_optab, temp, GEN_INT (bits), - target, 0, OPTAB_WIDEN); - - /* Now try high-order zero bits. Here we try the shifted-in bits as - all zero and all ones. Be careful to avoid shifting outside the - mode and to avoid shifting outside the host wide int size. */ - /* On narrow hosts, don't shift a 1 into the high bit, since we'll - confuse the recursive call and set all of the high 32 bits. */ - - if ((bits = (MIN (HOST_BITS_PER_WIDE_INT, GET_MODE_SIZE (mode) * 8) - - floor_log2 (c) - 1 - (HOST_BITS_PER_WIDE_INT < 64))) > 0) - for (; bits > 0; bits--) - if ((temp = alpha_emit_set_const (subtarget, mode, - c << bits, i)) != 0 - || ((temp = (alpha_emit_set_const - (subtarget, mode, - ((c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1)), - i))) - != 0)) - return expand_binop (mode, lshr_optab, temp, GEN_INT (bits), - target, 1, OPTAB_WIDEN); - - /* Now try high-order 1 bits. We get that with a sign-extension. - But one bit isn't enough here. Be careful to avoid shifting outside - the mode and to avoid shifting outside the host wide int size. */ - - if ((bits = (MIN (HOST_BITS_PER_WIDE_INT, GET_MODE_SIZE (mode) * 8) - - floor_log2 (~ c) - 2)) > 0) - for (; bits > 0; bits--) - if ((temp = alpha_emit_set_const (subtarget, mode, - c << bits, i)) != 0 - || ((temp = (alpha_emit_set_const - (subtarget, mode, - ((c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1)), - i))) - != 0)) - return expand_binop (mode, ashr_optab, temp, GEN_INT (bits), - target, 0, OPTAB_WIDEN); - } - -#if HOST_BITS_PER_WIDE_INT == 64 - /* Finally, see if can load a value into the target that is the same as the - constant except that all bytes that are 0 are changed to be 0xff. If we - can, then we can do a ZAPNOT to obtain the desired constant. */ - - new = c; - for (i = 0; i < 64; i += 8) - if ((new & ((HOST_WIDE_INT) 0xff << i)) == 0) - new |= (HOST_WIDE_INT) 0xff << i; - - /* We are only called for SImode and DImode. If this is SImode, ensure that - we are sign extended to a full word. */ - - if (mode == SImode) - new = ((new & 0xffffffff) ^ 0x80000000) - 0x80000000; - - if (new != c && new != -1 - && (temp = alpha_emit_set_const (subtarget, mode, new, n - 1)) != 0) - return expand_binop (mode, and_optab, temp, GEN_INT (c | ~ new), - target, 0, OPTAB_WIDEN); -#endif - - return 0; -} - -/* 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 - where the output has been placed if it can be done and the insns have been - emitted. If it would take more than N insns, zero is returned and no - insns and emitted. */ - -rtx -alpha_emit_set_const (rtx target, enum machine_mode mode, - HOST_WIDE_INT c, int n) -{ - rtx result = 0; - rtx orig_target = target; - int i; - - /* If we can't make any pseudos, TARGET is an SImode hard register, we - can't load this constant in one insn, do this in DImode. */ - if (no_new_pseudos && mode == SImode - && GET_CODE (target) == REG && REGNO (target) < FIRST_PSEUDO_REGISTER - && (result = alpha_emit_set_const_1 (target, mode, c, 1)) == 0) - { - target = gen_lowpart (DImode, target); - mode = DImode; - } - - /* Try 1 insn, then 2, then up to N. */ - for (i = 1; i <= n; i++) - { - result = alpha_emit_set_const_1 (target, mode, c, i); - if (result) - { - rtx insn = get_last_insn (); - rtx set = single_set (insn); - if (! CONSTANT_P (SET_SRC (set))) - set_unique_reg_note (get_last_insn (), REG_EQUAL, GEN_INT (c)); - break; - } - } - - /* Allow for the case where we changed the mode of TARGET. */ - if (result == target) - result = orig_target; - - return result; -} - -/* Having failed to find a 3 insn sequence in alpha_emit_set_const, - fall back to a straight forward decomposition. We do this to avoid - exponential run times encountered when looking for longer sequences - with alpha_emit_set_const. */ - -rtx -alpha_emit_set_long_const (rtx target, HOST_WIDE_INT c1, HOST_WIDE_INT c2) -{ - HOST_WIDE_INT d1, d2, d3, d4; - - /* Decompose the entire word */ -#if HOST_BITS_PER_WIDE_INT >= 64 - if (c2 != -(c1 < 0)) - abort (); - d1 = ((c1 & 0xffff) ^ 0x8000) - 0x8000; - c1 -= d1; - d2 = ((c1 & 0xffffffff) ^ 0x80000000) - 0x80000000; - c1 = (c1 - d2) >> 32; - d3 = ((c1 & 0xffff) ^ 0x8000) - 0x8000; - c1 -= d3; - d4 = ((c1 & 0xffffffff) ^ 0x80000000) - 0x80000000; - if (c1 != d4) - abort (); -#else - d1 = ((c1 & 0xffff) ^ 0x8000) - 0x8000; - c1 -= d1; - d2 = ((c1 & 0xffffffff) ^ 0x80000000) - 0x80000000; - if (c1 != d2) - abort (); - c2 += (d2 < 0); - d3 = ((c2 & 0xffff) ^ 0x8000) - 0x8000; - c2 -= d3; - d4 = ((c2 & 0xffffffff) ^ 0x80000000) - 0x80000000; - if (c2 != d4) - abort (); -#endif - - /* Construct the high word */ - if (d4) - { - emit_move_insn (target, GEN_INT (d4)); - if (d3) - emit_move_insn (target, gen_rtx_PLUS (DImode, target, GEN_INT (d3))); - } - else - emit_move_insn (target, GEN_INT (d3)); - - /* Shift it into place */ - emit_move_insn (target, gen_rtx_ASHIFT (DImode, target, GEN_INT (32))); - - /* Add in the low bits. */ - if (d2) - emit_move_insn (target, gen_rtx_PLUS (DImode, target, GEN_INT (d2))); - if (d1) - emit_move_insn (target, gen_rtx_PLUS (DImode, target, GEN_INT (d1))); - - return target; -} - -/* Expand a move instruction; return true if all work is done. - We don't handle non-bwx subword loads here. */ - -bool -alpha_expand_mov (enum machine_mode mode, rtx *operands) -{ - /* If the output is not a register, the input must be. */ - if (GET_CODE (operands[0]) == MEM - && ! reg_or_0_operand (operands[1], mode)) - operands[1] = force_reg (mode, operands[1]); - - /* Allow legitimize_address to perform some simplifications. */ - if (mode == Pmode && symbolic_operand (operands[1], mode)) - { - rtx tmp; - - /* With RTL inlining, at -O3, rtl is generated, stored, then actually - compiled at the end of compilation. In the meantime, someone can - re-encode-section-info on some symbol changing it e.g. from global - to local-not-small. If this happens, we'd have emitted a plain - load rather than a high+losum load and not recognize the insn. - - So if rtl inlining is in effect, we delay the global/not-global - decision until rest_of_compilation by wrapping it in an - UNSPEC_SYMBOL. */ - if (TARGET_EXPLICIT_RELOCS && flag_inline_functions - && rtx_equal_function_value_matters - && global_symbolic_operand (operands[1], mode)) - { - emit_insn (gen_movdi_er_maybe_g (operands[0], operands[1])); - return true; - } - - tmp = alpha_legitimize_address (operands[1], operands[0], mode); - if (tmp) - { - if (tmp == operands[0]) - return true; - operands[1] = tmp; - return false; - } - } - - /* Early out for non-constants and valid constants. */ - if (! CONSTANT_P (operands[1]) || input_operand (operands[1], mode)) - return false; - - /* Split large integers. */ - if (GET_CODE (operands[1]) == CONST_INT - || GET_CODE (operands[1]) == CONST_DOUBLE) - { - HOST_WIDE_INT i0, i1; - rtx temp = NULL_RTX; - - if (GET_CODE (operands[1]) == CONST_INT) - { - i0 = INTVAL (operands[1]); - i1 = -(i0 < 0); - } - else if (HOST_BITS_PER_WIDE_INT >= 64) - { - i0 = CONST_DOUBLE_LOW (operands[1]); - i1 = -(i0 < 0); - } - else - { - i0 = CONST_DOUBLE_LOW (operands[1]); - i1 = CONST_DOUBLE_HIGH (operands[1]); - } - - if (HOST_BITS_PER_WIDE_INT >= 64 || i1 == -(i0 < 0)) - temp = alpha_emit_set_const (operands[0], mode, i0, 3); - - if (!temp && TARGET_BUILD_CONSTANTS) - temp = alpha_emit_set_long_const (operands[0], i0, i1); - - if (temp) - { - if (rtx_equal_p (operands[0], temp)) - return true; - operands[1] = temp; - return false; - } - } - - /* Otherwise we've nothing left but to drop the thing to memory. */ - operands[1] = force_const_mem (mode, operands[1]); - if (reload_in_progress) - { - emit_move_insn (operands[0], XEXP (operands[1], 0)); - operands[1] = copy_rtx (operands[1]); - XEXP (operands[1], 0) = operands[0]; - } - else - operands[1] = validize_mem (operands[1]); - return false; -} - -/* Expand a non-bwx QImode or HImode move instruction; - return true if all work is done. */ - -bool -alpha_expand_mov_nobwx (enum machine_mode mode, rtx *operands) -{ - /* If the output is not a register, the input must be. */ - if (GET_CODE (operands[0]) == MEM) - operands[1] = force_reg (mode, operands[1]); - - /* Handle four memory cases, unaligned and aligned for either the input - or the output. The only case where we can be called during reload is - for aligned loads; all other cases require temporaries. */ - - if (GET_CODE (operands[1]) == MEM - || (GET_CODE (operands[1]) == SUBREG - && GET_CODE (SUBREG_REG (operands[1])) == MEM) - || (reload_in_progress && GET_CODE (operands[1]) == REG - && REGNO (operands[1]) >= FIRST_PSEUDO_REGISTER) - || (reload_in_progress && GET_CODE (operands[1]) == SUBREG - && GET_CODE (SUBREG_REG (operands[1])) == REG - && REGNO (SUBREG_REG (operands[1])) >= FIRST_PSEUDO_REGISTER)) - { - if (aligned_memory_operand (operands[1], mode)) - { - if (reload_in_progress) - { - emit_insn ((mode == QImode - ? gen_reload_inqi_help - : gen_reload_inhi_help) - (operands[0], operands[1], - gen_rtx_REG (SImode, REGNO (operands[0])))); - } - else - { - rtx aligned_mem, bitnum; - rtx scratch = gen_reg_rtx (SImode); - rtx subtarget; - bool copyout; - - get_aligned_mem (operands[1], &aligned_mem, &bitnum); - - subtarget = operands[0]; - if (GET_CODE (subtarget) == REG) - subtarget = gen_lowpart (DImode, subtarget), copyout = false; - else - subtarget = gen_reg_rtx (DImode), copyout = true; - - emit_insn ((mode == QImode - ? gen_aligned_loadqi - : gen_aligned_loadhi) - (subtarget, aligned_mem, bitnum, scratch)); - - if (copyout) - emit_move_insn (operands[0], gen_lowpart (mode, subtarget)); - } - } - else - { - /* Don't pass these as parameters since that makes the generated - code depend on parameter evaluation order which will cause - bootstrap failures. */ - - rtx temp1, temp2, seq, subtarget; - bool copyout; - - temp1 = gen_reg_rtx (DImode); - temp2 = gen_reg_rtx (DImode); - - subtarget = operands[0]; - if (GET_CODE (subtarget) == REG) - subtarget = gen_lowpart (DImode, subtarget), copyout = false; - else - subtarget = gen_reg_rtx (DImode), copyout = true; - - seq = ((mode == QImode - ? gen_unaligned_loadqi - : gen_unaligned_loadhi) - (subtarget, get_unaligned_address (operands[1], 0), - temp1, temp2)); - alpha_set_memflags (seq, operands[1]); - emit_insn (seq); - - if (copyout) - emit_move_insn (operands[0], gen_lowpart (mode, subtarget)); - } - return true; - } - - if (GET_CODE (operands[0]) == MEM - || (GET_CODE (operands[0]) == SUBREG - && GET_CODE (SUBREG_REG (operands[0])) == MEM) - || (reload_in_progress && GET_CODE (operands[0]) == REG - && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER) - || (reload_in_progress && GET_CODE (operands[0]) == SUBREG - && GET_CODE (SUBREG_REG (operands[0])) == REG - && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER)) - { - if (aligned_memory_operand (operands[0], mode)) - { - rtx aligned_mem, bitnum; - rtx temp1 = gen_reg_rtx (SImode); - rtx temp2 = gen_reg_rtx (SImode); - - get_aligned_mem (operands[0], &aligned_mem, &bitnum); - - emit_insn (gen_aligned_store (aligned_mem, operands[1], bitnum, - temp1, temp2)); - } - else - { - rtx temp1 = gen_reg_rtx (DImode); - rtx temp2 = gen_reg_rtx (DImode); - rtx temp3 = gen_reg_rtx (DImode); - rtx seq = ((mode == QImode - ? gen_unaligned_storeqi - : gen_unaligned_storehi) - (get_unaligned_address (operands[0], 0), - operands[1], temp1, temp2, temp3)); - - alpha_set_memflags (seq, operands[0]); - emit_insn (seq); - } - return true; - } - - return false; -} - -/* Generate an unsigned DImode to FP conversion. This is the same code - optabs would emit if we didn't have TFmode patterns. - - For SFmode, this is the only construction I've found that can pass - gcc.c-torture/execute/ieee/rbug.c. No scenario that uses DFmode - intermediates will work, because you'll get intermediate rounding - that ruins the end result. Some of this could be fixed by turning - on round-to-positive-infinity, but that requires diddling the fpsr, - which kills performance. I tried turning this around and converting - to a negative number, so that I could turn on /m, but either I did - it wrong or there's something else cause I wound up with the exact - same single-bit error. There is a branch-less form of this same code: - - srl $16,1,$1 - and $16,1,$2 - cmplt $16,0,$3 - or $1,$2,$2 - cmovge $16,$16,$2 - itoft $3,$f10 - itoft $2,$f11 - cvtqs $f11,$f11 - adds $f11,$f11,$f0 - fcmoveq $f10,$f11,$f0 - - I'm not using it because it's the same number of instructions as - this branch-full form, and it has more serialized long latency - instructions on the critical path. - - For DFmode, we can avoid rounding errors by breaking up the word - into two pieces, converting them separately, and adding them back: - - LC0: .long 0,0x5f800000 - - itoft $16,$f11 - lda $2,LC0 - cmplt $16,0,$1 - cpyse $f11,$f31,$f10 - cpyse $f31,$f11,$f11 - s4addq $1,$2,$1 - lds $f12,0($1) - cvtqt $f10,$f10 - cvtqt $f11,$f11 - addt $f12,$f10,$f0 - addt $f0,$f11,$f0 - - This doesn't seem to be a clear-cut win over the optabs form. - It probably all depends on the distribution of numbers being - converted -- in the optabs form, all but high-bit-set has a - much lower minimum execution time. */ - -void -alpha_emit_floatuns (rtx operands[2]) -{ - rtx neglab, donelab, i0, i1, f0, in, out; - enum machine_mode mode; - - out = operands[0]; - in = force_reg (DImode, operands[1]); - mode = GET_MODE (out); - neglab = gen_label_rtx (); - donelab = gen_label_rtx (); - i0 = gen_reg_rtx (DImode); - i1 = gen_reg_rtx (DImode); - f0 = gen_reg_rtx (mode); - - emit_cmp_and_jump_insns (in, const0_rtx, LT, const0_rtx, DImode, 0, neglab); - - emit_insn (gen_rtx_SET (VOIDmode, out, gen_rtx_FLOAT (mode, in))); - emit_jump_insn (gen_jump (donelab)); - emit_barrier (); - - emit_label (neglab); - - emit_insn (gen_lshrdi3 (i0, in, const1_rtx)); - emit_insn (gen_anddi3 (i1, in, const1_rtx)); - emit_insn (gen_iordi3 (i0, i0, i1)); - emit_insn (gen_rtx_SET (VOIDmode, f0, gen_rtx_FLOAT (mode, i0))); - emit_insn (gen_rtx_SET (VOIDmode, out, gen_rtx_PLUS (mode, f0, f0))); - - emit_label (donelab); -} - -/* Generate the comparison for a conditional branch. */ - -rtx -alpha_emit_conditional_branch (enum rtx_code code) -{ - enum rtx_code cmp_code, branch_code; - enum machine_mode cmp_mode, branch_mode = VOIDmode; - rtx op0 = alpha_compare.op0, op1 = alpha_compare.op1; - rtx tem; - - if (alpha_compare.fp_p && GET_MODE (op0) == TFmode) - { - if (! TARGET_HAS_XFLOATING_LIBS) - abort (); - - /* X_floating library comparison functions return - -1 unordered - 0 false - 1 true - Convert the compare against the raw return value. */ - - switch (code) - { - case UNORDERED: - cmp_code = EQ; - code = LT; - break; - case ORDERED: - cmp_code = EQ; - code = GE; - break; - case NE: - cmp_code = NE; - code = NE; - break; - default: - cmp_code = code; - code = GT; - break; - } - - op0 = alpha_emit_xfloating_compare (cmp_code, op0, op1); - op1 = const0_rtx; - alpha_compare.fp_p = 0; - } - - /* The general case: fold the comparison code to the types of compares - that we have, choosing the branch as necessary. */ - switch (code) - { - case EQ: case LE: case LT: case LEU: case LTU: - case UNORDERED: - /* We have these compares: */ - cmp_code = code, branch_code = NE; - break; - - case NE: - case ORDERED: - /* These must be reversed. */ - cmp_code = reverse_condition (code), branch_code = EQ; - break; - - case GE: case GT: case GEU: case GTU: - /* For FP, we swap them, for INT, we reverse them. */ - if (alpha_compare.fp_p) - { - cmp_code = swap_condition (code); - branch_code = NE; - tem = op0, op0 = op1, op1 = tem; - } - else - { - cmp_code = reverse_condition (code); - branch_code = EQ; - } - break; - - default: - abort (); - } - - if (alpha_compare.fp_p) - { - cmp_mode = DFmode; - if (flag_unsafe_math_optimizations) - { - /* When we are not as concerned about non-finite values, and we - are comparing against zero, we can branch directly. */ - if (op1 == CONST0_RTX (DFmode)) - cmp_code = NIL, branch_code = code; - else if (op0 == CONST0_RTX (DFmode)) - { - /* Undo the swap we probably did just above. */ - tem = op0, op0 = op1, op1 = tem; - branch_code = swap_condition (cmp_code); - cmp_code = NIL; - } - } - else - { - /* ??? We mark the branch mode to be CCmode to prevent the - compare and branch from being combined, since the compare - insn follows IEEE rules that the branch does not. */ - branch_mode = CCmode; - } - } - else - { - cmp_mode = DImode; - - /* The following optimizations are only for signed compares. */ - if (code != LEU && code != LTU && code != GEU && code != GTU) - { - /* Whee. Compare and branch against 0 directly. */ - if (op1 == const0_rtx) - cmp_code = NIL, branch_code = code; - - /* If the constants doesn't fit into an immediate, but can - be generated by lda/ldah, we adjust the argument and - compare against zero, so we can use beq/bne directly. */ - /* ??? Don't do this when comparing against symbols, otherwise - we'll reduce (&x == 0x1234) to (&x-0x1234 == 0), which will - be declared false out of hand (at least for non-weak). */ - else if (GET_CODE (op1) == CONST_INT - && (code == EQ || code == NE) - && !(symbolic_operand (op0, VOIDmode) - || (GET_CODE (op0) == REG && REG_POINTER (op0)))) - { - HOST_WIDE_INT v = INTVAL (op1), n = -v; - - if (! CONST_OK_FOR_LETTER_P (v, 'I') - && (CONST_OK_FOR_LETTER_P (n, 'K') - || CONST_OK_FOR_LETTER_P (n, 'L'))) - { - cmp_code = PLUS, branch_code = code; - op1 = GEN_INT (n); - } - } - } - - if (!reg_or_0_operand (op0, DImode)) - op0 = force_reg (DImode, op0); - if (cmp_code != PLUS && !reg_or_8bit_operand (op1, DImode)) - op1 = force_reg (DImode, op1); - } - - /* Emit an initial compare instruction, if necessary. */ - tem = op0; - if (cmp_code != NIL) - { - tem = gen_reg_rtx (cmp_mode); - emit_move_insn (tem, gen_rtx_fmt_ee (cmp_code, cmp_mode, op0, op1)); - } - - /* Zero the operands. */ - memset (&alpha_compare, 0, sizeof (alpha_compare)); - - /* Return the branch comparison. */ - return gen_rtx_fmt_ee (branch_code, branch_mode, tem, CONST0_RTX (cmp_mode)); -} - -/* Certain simplifications can be done to make invalid setcc operations - valid. Return the final comparison, or NULL if we can't work. */ - -rtx -alpha_emit_setcc (enum rtx_code code) -{ - enum rtx_code cmp_code; - rtx op0 = alpha_compare.op0, op1 = alpha_compare.op1; - int fp_p = alpha_compare.fp_p; - rtx tmp; - - /* Zero the operands. */ - memset (&alpha_compare, 0, sizeof (alpha_compare)); - - if (fp_p && GET_MODE (op0) == TFmode) - { - if (! TARGET_HAS_XFLOATING_LIBS) - abort (); - - /* X_floating library comparison functions return - -1 unordered - 0 false - 1 true - Convert the compare against the raw return value. */ - - if (code == UNORDERED || code == ORDERED) - cmp_code = EQ; - else - cmp_code = code; - - op0 = alpha_emit_xfloating_compare (cmp_code, op0, op1); - op1 = const0_rtx; - fp_p = 0; - - if (code == UNORDERED) - code = LT; - else if (code == ORDERED) - code = GE; - else - code = GT; - } - - if (fp_p && !TARGET_FIX) - return NULL_RTX; - - /* The general case: fold the comparison code to the types of compares - that we have, choosing the branch as necessary. */ - - cmp_code = NIL; - switch (code) - { - case EQ: case LE: case LT: case LEU: case LTU: - case UNORDERED: - /* We have these compares. */ - if (fp_p) - cmp_code = code, code = NE; - break; - - case NE: - if (!fp_p && op1 == const0_rtx) - break; - /* FALLTHRU */ - - case ORDERED: - cmp_code = reverse_condition (code); - code = EQ; - break; - - case GE: case GT: case GEU: case GTU: - /* These normally need swapping, but for integer zero we have - special patterns that recognize swapped operands. */ - if (!fp_p && op1 == const0_rtx) - break; - code = swap_condition (code); - if (fp_p) - cmp_code = code, code = NE; - tmp = op0, op0 = op1, op1 = tmp; - break; - - default: - abort (); - } - - if (!fp_p) - { - if (!register_operand (op0, DImode)) - op0 = force_reg (DImode, op0); - if (!reg_or_8bit_operand (op1, DImode)) - op1 = force_reg (DImode, op1); - } - - /* Emit an initial compare instruction, if necessary. */ - if (cmp_code != NIL) - { - enum machine_mode mode = fp_p ? DFmode : DImode; - - tmp = gen_reg_rtx (mode); - emit_insn (gen_rtx_SET (VOIDmode, tmp, - gen_rtx_fmt_ee (cmp_code, mode, op0, op1))); - - op0 = fp_p ? gen_lowpart (DImode, tmp) : tmp; - op1 = const0_rtx; - } - - /* Return the setcc comparison. */ - return gen_rtx_fmt_ee (code, DImode, op0, op1); -} - - -/* Rewrite a comparison against zero CMP of the form - (CODE (cc0) (const_int 0)) so it can be written validly in - a conditional move (if_then_else CMP ...). - If both of the operands that set cc0 are nonzero we must emit - an insn to perform the compare (it can't be done within - the conditional move). */ - -rtx -alpha_emit_conditional_move (rtx cmp, enum machine_mode mode) -{ - enum rtx_code code = GET_CODE (cmp); - enum rtx_code cmov_code = NE; - rtx op0 = alpha_compare.op0; - rtx op1 = alpha_compare.op1; - int fp_p = alpha_compare.fp_p; - enum machine_mode cmp_mode - = (GET_MODE (op0) == VOIDmode ? DImode : GET_MODE (op0)); - enum machine_mode cmp_op_mode = fp_p ? DFmode : DImode; - enum machine_mode cmov_mode = VOIDmode; - int local_fast_math = flag_unsafe_math_optimizations; - rtx tem; - - /* Zero the operands. */ - memset (&alpha_compare, 0, sizeof (alpha_compare)); - - if (fp_p != FLOAT_MODE_P (mode)) - { - enum rtx_code cmp_code; - - if (! TARGET_FIX) - return 0; - - /* If we have fp<->int register move instructions, do a cmov by - performing the comparison in fp registers, and move the - zero/nonzero value to integer registers, where we can then - use a normal cmov, or vice-versa. */ - - switch (code) - { - case EQ: case LE: case LT: case LEU: case LTU: - /* We have these compares. */ - cmp_code = code, code = NE; - break; - - case NE: - /* This must be reversed. */ - cmp_code = EQ, code = EQ; - break; - - case GE: case GT: case GEU: case GTU: - /* These normally need swapping, but for integer zero we have - special patterns that recognize swapped operands. */ - if (!fp_p && op1 == const0_rtx) - cmp_code = code, code = NE; - else - { - cmp_code = swap_condition (code); - code = NE; - tem = op0, op0 = op1, op1 = tem; - } - break; - - default: - abort (); - } - - tem = gen_reg_rtx (cmp_op_mode); - emit_insn (gen_rtx_SET (VOIDmode, tem, - gen_rtx_fmt_ee (cmp_code, cmp_op_mode, - op0, op1))); - - cmp_mode = cmp_op_mode = fp_p ? DImode : DFmode; - op0 = gen_lowpart (cmp_op_mode, tem); - op1 = CONST0_RTX (cmp_op_mode); - fp_p = !fp_p; - local_fast_math = 1; - } - - /* We may be able to use a conditional move directly. - This avoids emitting spurious compares. */ - if (signed_comparison_operator (cmp, VOIDmode) - && (!fp_p || local_fast_math) - && (op0 == CONST0_RTX (cmp_mode) || op1 == CONST0_RTX (cmp_mode))) - return gen_rtx_fmt_ee (code, VOIDmode, op0, op1); - - /* We can't put the comparison inside the conditional move; - emit a compare instruction and put that inside the - conditional move. Make sure we emit only comparisons we have; - swap or reverse as necessary. */ - - if (no_new_pseudos) - return NULL_RTX; - - switch (code) - { - case EQ: case LE: case LT: case LEU: case LTU: - /* We have these compares: */ - break; - - case NE: - /* This must be reversed. */ - code = reverse_condition (code); - cmov_code = EQ; - break; - - case GE: case GT: case GEU: case GTU: - /* These must be swapped. */ - if (op1 != CONST0_RTX (cmp_mode)) - { - code = swap_condition (code); - tem = op0, op0 = op1, op1 = tem; - } - break; - - default: - abort (); - } - - if (!fp_p) - { - if (!reg_or_0_operand (op0, DImode)) - op0 = force_reg (DImode, op0); - if (!reg_or_8bit_operand (op1, DImode)) - op1 = force_reg (DImode, op1); - } - - /* ??? We mark the branch mode to be CCmode to prevent the compare - and cmov from being combined, since the compare insn follows IEEE - rules that the cmov does not. */ - if (fp_p && !local_fast_math) - cmov_mode = CCmode; - - tem = gen_reg_rtx (cmp_op_mode); - emit_move_insn (tem, gen_rtx_fmt_ee (code, cmp_op_mode, op0, op1)); - return gen_rtx_fmt_ee (cmov_code, cmov_mode, tem, CONST0_RTX (cmp_op_mode)); -} - -/* Simplify a conditional move of two constants into a setcc with - arithmetic. This is done with a splitter since combine would - just undo the work if done during code generation. It also catches - cases we wouldn't have before cse. */ - -int -alpha_split_conditional_move (enum rtx_code code, rtx dest, rtx cond, - rtx t_rtx, rtx f_rtx) -{ - HOST_WIDE_INT t, f, diff; - enum machine_mode mode; - rtx target, subtarget, tmp; - - mode = GET_MODE (dest); - t = INTVAL (t_rtx); - f = INTVAL (f_rtx); - diff = t - f; - - if (((code == NE || code == EQ) && diff < 0) - || (code == GE || code == GT)) - { - code = reverse_condition (code); - diff = t, t = f, f = diff; - diff = t - f; - } - - subtarget = target = dest; - if (mode != DImode) - { - target = gen_lowpart (DImode, dest); - if (! no_new_pseudos) - subtarget = gen_reg_rtx (DImode); - else - subtarget = target; - } - /* Below, we must be careful to use copy_rtx on target and subtarget - in intermediate insns, as they may be a subreg rtx, which may not - be shared. */ - - if (f == 0 && exact_log2 (diff) > 0 - /* On EV6, we've got enough shifters to make non-arithmetic shifts - viable over a longer latency cmove. On EV5, the E0 slot is a - scarce resource, and on EV4 shift has the same latency as a cmove. */ - && (diff <= 8 || alpha_cpu == PROCESSOR_EV6)) - { - tmp = gen_rtx_fmt_ee (code, DImode, cond, const0_rtx); - emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (subtarget), tmp)); - - tmp = gen_rtx_ASHIFT (DImode, copy_rtx (subtarget), - GEN_INT (exact_log2 (t))); - emit_insn (gen_rtx_SET (VOIDmode, target, tmp)); - } - else if (f == 0 && t == -1) - { - tmp = gen_rtx_fmt_ee (code, DImode, cond, const0_rtx); - emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (subtarget), tmp)); - - emit_insn (gen_negdi2 (target, copy_rtx (subtarget))); - } - else if (diff == 1 || diff == 4 || diff == 8) - { - rtx add_op; - - tmp = gen_rtx_fmt_ee (code, DImode, cond, const0_rtx); - emit_insn (gen_rtx_SET (VOIDmode, copy_rtx (subtarget), tmp)); - - if (diff == 1) - emit_insn (gen_adddi3 (target, copy_rtx (subtarget), GEN_INT (f))); - else - { - add_op = GEN_INT (f); - if (sext_add_operand (add_op, mode)) - { - tmp = gen_rtx_MULT (DImode, copy_rtx (subtarget), - GEN_INT (diff)); - tmp = gen_rtx_PLUS (DImode, tmp, add_op); - emit_insn (gen_rtx_SET (VOIDmode, target, tmp)); - } - else - return 0; - } - } - else - return 0; - - return 1; -} - -/* Look up the function X_floating library function name for the - given operation. */ - -static const char * -alpha_lookup_xfloating_lib_func (enum rtx_code code) -{ - struct xfloating_op - { - const enum rtx_code code; - const char *const func; - }; - - static const struct xfloating_op vms_xfloating_ops[] = - { - { PLUS, "OTS$ADD_X" }, - { MINUS, "OTS$SUB_X" }, - { MULT, "OTS$MUL_X" }, - { DIV, "OTS$DIV_X" }, - { EQ, "OTS$EQL_X" }, - { NE, "OTS$NEQ_X" }, - { LT, "OTS$LSS_X" }, - { LE, "OTS$LEQ_X" }, - { GT, "OTS$GTR_X" }, - { GE, "OTS$GEQ_X" }, - { FIX, "OTS$CVTXQ" }, - { FLOAT, "OTS$CVTQX" }, - { UNSIGNED_FLOAT, "OTS$CVTQUX" }, - { FLOAT_EXTEND, "OTS$CVT_FLOAT_T_X" }, - { FLOAT_TRUNCATE, "OTS$CVT_FLOAT_X_T" }, - }; - - static const struct xfloating_op osf_xfloating_ops[] = - { - { PLUS, "_OtsAddX" }, - { MINUS, "_OtsSubX" }, - { MULT, "_OtsMulX" }, - { DIV, "_OtsDivX" }, - { EQ, "_OtsEqlX" }, - { NE, "_OtsNeqX" }, - { LT, "_OtsLssX" }, - { LE, "_OtsLeqX" }, - { GT, "_OtsGtrX" }, - { GE, "_OtsGeqX" }, - { FIX, "_OtsCvtXQ" }, - { FLOAT, "_OtsCvtQX" }, - { UNSIGNED_FLOAT, "_OtsCvtQUX" }, - { FLOAT_EXTEND, "_OtsConvertFloatTX" }, - { FLOAT_TRUNCATE, "_OtsConvertFloatXT" }, - }; - - const struct xfloating_op *ops; - const long n = ARRAY_SIZE (osf_xfloating_ops); - long i; - - /* How irritating. Nothing to key off for the table. Hardcode - knowledge of the G_floating routines. */ - if (TARGET_FLOAT_VAX) - { - if (TARGET_ABI_OPEN_VMS) - { - if (code == FLOAT_EXTEND) - return "OTS$CVT_FLOAT_G_X"; - if (code == FLOAT_TRUNCATE) - return "OTS$CVT_FLOAT_X_G"; - } - else - { - if (code == FLOAT_EXTEND) - return "_OtsConvertFloatGX"; - if (code == FLOAT_TRUNCATE) - return "_OtsConvertFloatXG"; - } - } - - if (TARGET_ABI_OPEN_VMS) - ops = vms_xfloating_ops; - else - ops = osf_xfloating_ops; - - for (i = 0; i < n; ++i) - if (ops[i].code == code) - return ops[i].func; - - abort(); -} - -/* Most X_floating operations take the rounding mode as an argument. - Compute that here. */ - -static int -alpha_compute_xfloating_mode_arg (enum rtx_code code, - enum alpha_fp_rounding_mode round) -{ - int mode; - - switch (round) - { - case ALPHA_FPRM_NORM: - mode = 2; - break; - case ALPHA_FPRM_MINF: - mode = 1; - break; - case ALPHA_FPRM_CHOP: - mode = 0; - break; - case ALPHA_FPRM_DYN: - mode = 4; - break; - default: - abort (); - - /* XXX For reference, round to +inf is mode = 3. */ - } - - if (code == FLOAT_TRUNCATE && alpha_fptm == ALPHA_FPTM_N) - mode |= 0x10000; - - return mode; -} - -/* Emit an X_floating library function call. - - Note that these functions do not follow normal calling conventions: - TFmode arguments are passed in two integer registers (as opposed to - indirect); TFmode return values appear in R16+R17. - - FUNC is the function name to call. - TARGET is where the output belongs. - OPERANDS are the inputs. - NOPERANDS is the count of inputs. - EQUIV is the expression equivalent for the function. -*/ - -static void -alpha_emit_xfloating_libcall (const char *func, rtx target, rtx operands[], - int noperands, rtx equiv) -{ - rtx usage = NULL_RTX, tmp, reg; - int regno = 16, i; - - start_sequence (); - - for (i = 0; i < noperands; ++i) - { - switch (GET_MODE (operands[i])) - { - case TFmode: - reg = gen_rtx_REG (TFmode, regno); - regno += 2; - break; - - case DFmode: - reg = gen_rtx_REG (DFmode, regno + 32); - regno += 1; - break; - - case VOIDmode: - if (GET_CODE (operands[i]) != CONST_INT) - abort (); - /* FALLTHRU */ - case DImode: - reg = gen_rtx_REG (DImode, regno); - regno += 1; - break; - - default: - abort (); - } - - emit_move_insn (reg, operands[i]); - usage = alloc_EXPR_LIST (0, gen_rtx_USE (VOIDmode, reg), usage); - } - - switch (GET_MODE (target)) - { - case TFmode: - reg = gen_rtx_REG (TFmode, 16); - break; - case DFmode: - reg = gen_rtx_REG (DFmode, 32); - break; - case DImode: - reg = gen_rtx_REG (DImode, 0); - break; - default: - abort (); - } - - tmp = gen_rtx_MEM (QImode, init_one_libfunc (func)); - tmp = emit_call_insn (GEN_CALL_VALUE (reg, tmp, const0_rtx, - const0_rtx, const0_rtx)); - CALL_INSN_FUNCTION_USAGE (tmp) = usage; - - tmp = get_insns (); - end_sequence (); - - emit_libcall_block (tmp, target, reg, equiv); -} - -/* Emit an X_floating library function call for arithmetic (+,-,*,/). */ - -void -alpha_emit_xfloating_arith (enum rtx_code code, rtx operands[]) -{ - const char *func; - int mode; - rtx out_operands[3]; - - func = alpha_lookup_xfloating_lib_func (code); - mode = alpha_compute_xfloating_mode_arg (code, alpha_fprm); - - out_operands[0] = operands[1]; - out_operands[1] = operands[2]; - out_operands[2] = GEN_INT (mode); - alpha_emit_xfloating_libcall (func, operands[0], out_operands, 3, - gen_rtx_fmt_ee (code, TFmode, operands[1], - operands[2])); -} - -/* Emit an X_floating library function call for a comparison. */ - -static rtx -alpha_emit_xfloating_compare (enum rtx_code code, rtx op0, rtx op1) -{ - const char *func; - rtx out, operands[2]; - - func = alpha_lookup_xfloating_lib_func (code); - - operands[0] = op0; - operands[1] = op1; - out = gen_reg_rtx (DImode); - - /* ??? Strange mode for equiv because what's actually returned - is -1,0,1, not a proper boolean value. */ - alpha_emit_xfloating_libcall (func, out, operands, 2, - gen_rtx_fmt_ee (code, CCmode, op0, op1)); - - return out; -} - -/* Emit an X_floating library function call for a conversion. */ - -void -alpha_emit_xfloating_cvt (enum rtx_code orig_code, rtx operands[]) -{ - int noperands = 1, mode; - rtx out_operands[2]; - const char *func; - enum rtx_code code = orig_code; - - if (code == UNSIGNED_FIX) - code = FIX; - - func = alpha_lookup_xfloating_lib_func (code); - - out_operands[0] = operands[1]; - - switch (code) - { - case FIX: - mode = alpha_compute_xfloating_mode_arg (code, ALPHA_FPRM_CHOP); - out_operands[1] = GEN_INT (mode); - noperands = 2; - break; - case FLOAT_TRUNCATE: - mode = alpha_compute_xfloating_mode_arg (code, alpha_fprm); - out_operands[1] = GEN_INT (mode); - noperands = 2; - break; - default: - break; - } - - alpha_emit_xfloating_libcall (func, operands[0], out_operands, noperands, - gen_rtx_fmt_e (orig_code, - GET_MODE (operands[0]), - operands[1])); -} - -/* Split a TFmode OP[1] into DImode OP[2,3] and likewise for - OP[0] into OP[0,1]. Naturally, output operand ordering is - little-endian. */ - -void -alpha_split_tfmode_pair (rtx operands[4]) -{ - if (GET_CODE (operands[1]) == REG) - { - operands[3] = gen_rtx_REG (DImode, REGNO (operands[1]) + 1); - operands[2] = gen_rtx_REG (DImode, REGNO (operands[1])); - } - else if (GET_CODE (operands[1]) == MEM) - { - operands[3] = adjust_address (operands[1], DImode, 8); - operands[2] = adjust_address (operands[1], DImode, 0); - } - else if (operands[1] == CONST0_RTX (TFmode)) - operands[2] = operands[3] = const0_rtx; - else - abort (); - - if (GET_CODE (operands[0]) == REG) - { - operands[1] = gen_rtx_REG (DImode, REGNO (operands[0]) + 1); - operands[0] = gen_rtx_REG (DImode, REGNO (operands[0])); - } - else if (GET_CODE (operands[0]) == MEM) - { - operands[1] = adjust_address (operands[0], DImode, 8); - operands[0] = adjust_address (operands[0], DImode, 0); - } - else - abort (); -} - -/* Implement negtf2 or abstf2. Op0 is destination, op1 is source, - op2 is a register containing the sign bit, operation is the - logical operation to be performed. */ - -void -alpha_split_tfmode_frobsign (rtx operands[3], rtx (*operation) (rtx, rtx, rtx)) -{ - rtx high_bit = operands[2]; - rtx scratch; - int move; - - alpha_split_tfmode_pair (operands); - - /* Detect three flavors of operand overlap. */ - move = 1; - if (rtx_equal_p (operands[0], operands[2])) - move = 0; - else if (rtx_equal_p (operands[1], operands[2])) - { - if (rtx_equal_p (operands[0], high_bit)) - move = 2; - else - move = -1; - } - - if (move < 0) - emit_move_insn (operands[0], operands[2]); - - /* ??? If the destination overlaps both source tf and high_bit, then - assume source tf is dead in its entirety and use the other half - for a scratch register. Otherwise "scratch" is just the proper - destination register. */ - scratch = operands[move < 2 ? 1 : 3]; - - emit_insn ((*operation) (scratch, high_bit, operands[3])); - - if (move > 0) - { - emit_move_insn (operands[0], operands[2]); - if (move > 1) - emit_move_insn (operands[1], scratch); - } -} - -/* Use ext[wlq][lh] as the Architecture Handbook describes for extracting - unaligned data: - - unsigned: signed: - word: ldq_u r1,X(r11) ldq_u r1,X(r11) - ldq_u r2,X+1(r11) ldq_u r2,X+1(r11) - lda r3,X(r11) lda r3,X+2(r11) - extwl r1,r3,r1 extql r1,r3,r1 - extwh r2,r3,r2 extqh r2,r3,r2 - or r1.r2.r1 or r1,r2,r1 - sra r1,48,r1 - - long: ldq_u r1,X(r11) ldq_u r1,X(r11) - ldq_u r2,X+3(r11) ldq_u r2,X+3(r11) - lda r3,X(r11) lda r3,X(r11) - extll r1,r3,r1 extll r1,r3,r1 - extlh r2,r3,r2 extlh r2,r3,r2 - or r1.r2.r1 addl r1,r2,r1 - - quad: ldq_u r1,X(r11) - ldq_u r2,X+7(r11) - lda r3,X(r11) - extql r1,r3,r1 - extqh r2,r3,r2 - or r1.r2.r1 -*/ - -void -alpha_expand_unaligned_load (rtx tgt, rtx mem, HOST_WIDE_INT size, - HOST_WIDE_INT ofs, int sign) -{ - rtx meml, memh, addr, extl, exth, tmp, mema; - enum machine_mode mode; - - meml = gen_reg_rtx (DImode); - memh = gen_reg_rtx (DImode); - addr = gen_reg_rtx (DImode); - extl = gen_reg_rtx (DImode); - exth = gen_reg_rtx (DImode); - - mema = XEXP (mem, 0); - if (GET_CODE (mema) == LO_SUM) - mema = force_reg (Pmode, mema); - - /* AND addresses cannot be in any alias set, since they may implicitly - alias surrounding code. Ideally we'd have some alias set that - covered all types except those with alignment 8 or higher. */ - - tmp = change_address (mem, DImode, - gen_rtx_AND (DImode, - plus_constant (mema, ofs), - GEN_INT (-8))); - set_mem_alias_set (tmp, 0); - emit_move_insn (meml, tmp); - - tmp = change_address (mem, DImode, - gen_rtx_AND (DImode, - plus_constant (mema, ofs + size - 1), - GEN_INT (-8))); - set_mem_alias_set (tmp, 0); - emit_move_insn (memh, tmp); - - if (WORDS_BIG_ENDIAN && sign && (size == 2 || size == 4)) - { - emit_move_insn (addr, plus_constant (mema, -1)); - - emit_insn (gen_extqh_be (extl, meml, addr)); - emit_insn (gen_extxl_be (exth, memh, GEN_INT (64), addr)); - - addr = expand_binop (DImode, ior_optab, extl, exth, tgt, 1, OPTAB_WIDEN); - addr = expand_binop (DImode, ashr_optab, addr, GEN_INT (64 - size*8), - addr, 1, OPTAB_WIDEN); - } - else if (sign && size == 2) - { - emit_move_insn (addr, plus_constant (mema, ofs+2)); - - emit_insn (gen_extxl_le (extl, meml, GEN_INT (64), addr)); - emit_insn (gen_extqh_le (exth, memh, addr)); - - /* We must use tgt here for the target. Alpha-vms port fails if we use - addr for the target, because addr is marked as a pointer and combine - knows that pointers are always sign-extended 32 bit values. */ - addr = expand_binop (DImode, ior_optab, extl, exth, tgt, 1, OPTAB_WIDEN); - addr = expand_binop (DImode, ashr_optab, addr, GEN_INT (48), - addr, 1, OPTAB_WIDEN); - } - else - { - if (WORDS_BIG_ENDIAN) - { - emit_move_insn (addr, plus_constant (mema, ofs+size-1)); - switch ((int) size) - { - case 2: - emit_insn (gen_extwh_be (extl, meml, addr)); - mode = HImode; - break; - - case 4: - emit_insn (gen_extlh_be (extl, meml, addr)); - mode = SImode; - break; - - case 8: - emit_insn (gen_extqh_be (extl, meml, addr)); - mode = DImode; - break; - - default: - abort (); - } - emit_insn (gen_extxl_be (exth, memh, GEN_INT (size*8), addr)); - } - else - { - emit_move_insn (addr, plus_constant (mema, ofs)); - emit_insn (gen_extxl_le (extl, meml, GEN_INT (size*8), addr)); - switch ((int) size) - { - case 2: - emit_insn (gen_extwh_le (exth, memh, addr)); - mode = HImode; - break; - - case 4: - emit_insn (gen_extlh_le (exth, memh, addr)); - mode = SImode; - break; - - case 8: - emit_insn (gen_extqh_le (exth, memh, addr)); - mode = DImode; - break; - - default: - abort(); - } - } - - addr = expand_binop (mode, ior_optab, gen_lowpart (mode, extl), - gen_lowpart (mode, exth), gen_lowpart (mode, tgt), - sign, OPTAB_WIDEN); - } - - if (addr != tgt) - emit_move_insn (tgt, gen_lowpart(GET_MODE (tgt), addr)); -} - -/* Similarly, use ins and msk instructions to perform unaligned stores. */ - -void -alpha_expand_unaligned_store (rtx dst, rtx src, - HOST_WIDE_INT size, HOST_WIDE_INT ofs) -{ - rtx dstl, dsth, addr, insl, insh, meml, memh, dsta; - - dstl = gen_reg_rtx (DImode); - dsth = gen_reg_rtx (DImode); - insl = gen_reg_rtx (DImode); - insh = gen_reg_rtx (DImode); - - dsta = XEXP (dst, 0); - if (GET_CODE (dsta) == LO_SUM) - dsta = force_reg (Pmode, dsta); - - /* AND addresses cannot be in any alias set, since they may implicitly - alias surrounding code. Ideally we'd have some alias set that - covered all types except those with alignment 8 or higher. */ - - meml = change_address (dst, DImode, - gen_rtx_AND (DImode, - plus_constant (dsta, ofs), - GEN_INT (-8))); - set_mem_alias_set (meml, 0); - - memh = change_address (dst, DImode, - gen_rtx_AND (DImode, - plus_constant (dsta, ofs + size - 1), - GEN_INT (-8))); - set_mem_alias_set (memh, 0); - - emit_move_insn (dsth, memh); - emit_move_insn (dstl, meml); - if (WORDS_BIG_ENDIAN) - { - addr = copy_addr_to_reg (plus_constant (dsta, ofs+size-1)); - - if (src != const0_rtx) - { - switch ((int) size) - { - case 2: - emit_insn (gen_inswl_be (insh, gen_lowpart (HImode,src), addr)); - break; - case 4: - emit_insn (gen_insll_be (insh, gen_lowpart (SImode,src), addr)); - break; - case 8: - emit_insn (gen_insql_be (insh, gen_lowpart (DImode,src), addr)); - break; - } - emit_insn (gen_insxh (insl, gen_lowpart (DImode, src), - GEN_INT (size*8), addr)); - } - - switch ((int) size) - { - case 2: - emit_insn (gen_mskxl_be (dsth, dsth, GEN_INT (0xffff), addr)); - break; - case 4: - { - rtx msk = immed_double_const (0xffffffff, 0, DImode); - emit_insn (gen_mskxl_be (dsth, dsth, msk, addr)); - break; - } - case 8: - emit_insn (gen_mskxl_be (dsth, dsth, constm1_rtx, addr)); - break; - } - - emit_insn (gen_mskxh (dstl, dstl, GEN_INT (size*8), addr)); - } - else - { - addr = copy_addr_to_reg (plus_constant (dsta, ofs)); - - if (src != const0_rtx) - { - emit_insn (gen_insxh (insh, gen_lowpart (DImode, src), - GEN_INT (size*8), addr)); - - switch ((int) size) - { - case 2: - emit_insn (gen_inswl_le (insl, gen_lowpart (HImode, src), addr)); - break; - case 4: - emit_insn (gen_insll_le (insl, gen_lowpart (SImode, src), addr)); - break; - case 8: - emit_insn (gen_insql_le (insl, src, addr)); - break; - } - } - - emit_insn (gen_mskxh (dsth, dsth, GEN_INT (size*8), addr)); - - switch ((int) size) - { - case 2: - emit_insn (gen_mskxl_le (dstl, dstl, GEN_INT (0xffff), addr)); - break; - case 4: - { - rtx msk = immed_double_const (0xffffffff, 0, DImode); - emit_insn (gen_mskxl_le (dstl, dstl, msk, addr)); - break; - } - case 8: - emit_insn (gen_mskxl_le (dstl, dstl, constm1_rtx, addr)); - break; - } - } - - if (src != const0_rtx) - { - dsth = expand_binop (DImode, ior_optab, insh, dsth, dsth, 0, OPTAB_WIDEN); - dstl = expand_binop (DImode, ior_optab, insl, dstl, dstl, 0, OPTAB_WIDEN); - } - - if (WORDS_BIG_ENDIAN) - { - emit_move_insn (meml, dstl); - emit_move_insn (memh, dsth); - } - else - { - /* Must store high before low for degenerate case of aligned. */ - emit_move_insn (memh, dsth); - emit_move_insn (meml, dstl); - } -} - -/* The block move code tries to maximize speed by separating loads and - stores at the expense of register pressure: we load all of the data - before we store it back out. There are two secondary effects worth - mentioning, that this speeds copying to/from aligned and unaligned - buffers, and that it makes the code significantly easier to write. */ - -#define MAX_MOVE_WORDS 8 - -/* Load an integral number of consecutive unaligned quadwords. */ - -static void -alpha_expand_unaligned_load_words (rtx *out_regs, rtx smem, - HOST_WIDE_INT words, HOST_WIDE_INT ofs) -{ - rtx const im8 = GEN_INT (-8); - rtx const i64 = GEN_INT (64); - rtx ext_tmps[MAX_MOVE_WORDS], data_regs[MAX_MOVE_WORDS+1]; - rtx sreg, areg, tmp, smema; - HOST_WIDE_INT i; - - smema = XEXP (smem, 0); - if (GET_CODE (smema) == LO_SUM) - smema = force_reg (Pmode, smema); - - /* Generate all the tmp registers we need. */ - for (i = 0; i < words; ++i) - { - data_regs[i] = out_regs[i]; - ext_tmps[i] = gen_reg_rtx (DImode); - } - data_regs[words] = gen_reg_rtx (DImode); - - if (ofs != 0) - smem = adjust_address (smem, GET_MODE (smem), ofs); - - /* Load up all of the source data. */ - for (i = 0; i < words; ++i) - { - tmp = change_address (smem, DImode, - gen_rtx_AND (DImode, - plus_constant (smema, 8*i), - im8)); - set_mem_alias_set (tmp, 0); - emit_move_insn (data_regs[i], tmp); - } - - tmp = change_address (smem, DImode, - gen_rtx_AND (DImode, - plus_constant (smema, 8*words - 1), - im8)); - set_mem_alias_set (tmp, 0); - emit_move_insn (data_regs[words], tmp); - - /* Extract the half-word fragments. Unfortunately DEC decided to make - extxh with offset zero a noop instead of zeroing the register, so - we must take care of that edge condition ourselves with cmov. */ - - sreg = copy_addr_to_reg (smema); - areg = expand_binop (DImode, and_optab, sreg, GEN_INT (7), NULL, - 1, OPTAB_WIDEN); - if (WORDS_BIG_ENDIAN) - emit_move_insn (sreg, plus_constant (sreg, 7)); - for (i = 0; i < words; ++i) - { - if (WORDS_BIG_ENDIAN) - { - emit_insn (gen_extqh_be (data_regs[i], data_regs[i], sreg)); - emit_insn (gen_extxl_be (ext_tmps[i], data_regs[i+1], i64, sreg)); - } - else - { - emit_insn (gen_extxl_le (data_regs[i], data_regs[i], i64, sreg)); - emit_insn (gen_extqh_le (ext_tmps[i], data_regs[i+1], sreg)); - } - emit_insn (gen_rtx_SET (VOIDmode, ext_tmps[i], - gen_rtx_IF_THEN_ELSE (DImode, - gen_rtx_EQ (DImode, areg, - const0_rtx), - const0_rtx, ext_tmps[i]))); - } - - /* Merge the half-words into whole words. */ - for (i = 0; i < words; ++i) - { - out_regs[i] = expand_binop (DImode, ior_optab, data_regs[i], - ext_tmps[i], data_regs[i], 1, OPTAB_WIDEN); - } -} - -/* Store an integral number of consecutive unaligned quadwords. DATA_REGS - may be NULL to store zeros. */ - -static void -alpha_expand_unaligned_store_words (rtx *data_regs, rtx dmem, - HOST_WIDE_INT words, HOST_WIDE_INT ofs) -{ - rtx const im8 = GEN_INT (-8); - rtx const i64 = GEN_INT (64); - rtx ins_tmps[MAX_MOVE_WORDS]; - rtx st_tmp_1, st_tmp_2, dreg; - rtx st_addr_1, st_addr_2, dmema; - HOST_WIDE_INT i; - - dmema = XEXP (dmem, 0); - if (GET_CODE (dmema) == LO_SUM) - dmema = force_reg (Pmode, dmema); - - /* Generate all the tmp registers we need. */ - if (data_regs != NULL) - for (i = 0; i < words; ++i) - ins_tmps[i] = gen_reg_rtx(DImode); - st_tmp_1 = gen_reg_rtx(DImode); - st_tmp_2 = gen_reg_rtx(DImode); - - if (ofs != 0) - dmem = adjust_address (dmem, GET_MODE (dmem), ofs); - - st_addr_2 = change_address (dmem, DImode, - gen_rtx_AND (DImode, - plus_constant (dmema, words*8 - 1), - im8)); - set_mem_alias_set (st_addr_2, 0); - - st_addr_1 = change_address (dmem, DImode, - gen_rtx_AND (DImode, dmema, im8)); - set_mem_alias_set (st_addr_1, 0); - - /* Load up the destination end bits. */ - emit_move_insn (st_tmp_2, st_addr_2); - emit_move_insn (st_tmp_1, st_addr_1); - - /* Shift the input data into place. */ - dreg = copy_addr_to_reg (dmema); - if (WORDS_BIG_ENDIAN) - emit_move_insn (dreg, plus_constant (dreg, 7)); - if (data_regs != NULL) - { - for (i = words-1; i >= 0; --i) - { - if (WORDS_BIG_ENDIAN) - { - emit_insn (gen_insql_be (ins_tmps[i], data_regs[i], dreg)); - emit_insn (gen_insxh (data_regs[i], data_regs[i], i64, dreg)); - } - else - { - emit_insn (gen_insxh (ins_tmps[i], data_regs[i], i64, dreg)); - emit_insn (gen_insql_le (data_regs[i], data_regs[i], dreg)); - } - } - for (i = words-1; i > 0; --i) - { - ins_tmps[i-1] = expand_binop (DImode, ior_optab, data_regs[i], - ins_tmps[i-1], ins_tmps[i-1], 1, - OPTAB_WIDEN); - } - } - - /* Split and merge the ends with the destination data. */ - if (WORDS_BIG_ENDIAN) - { - emit_insn (gen_mskxl_be (st_tmp_2, st_tmp_2, constm1_rtx, dreg)); - emit_insn (gen_mskxh (st_tmp_1, st_tmp_1, i64, dreg)); - } - else - { - emit_insn (gen_mskxh (st_tmp_2, st_tmp_2, i64, dreg)); - emit_insn (gen_mskxl_le (st_tmp_1, st_tmp_1, constm1_rtx, dreg)); - } - - if (data_regs != NULL) - { - st_tmp_2 = expand_binop (DImode, ior_optab, st_tmp_2, ins_tmps[words-1], - st_tmp_2, 1, OPTAB_WIDEN); - st_tmp_1 = expand_binop (DImode, ior_optab, st_tmp_1, data_regs[0], - st_tmp_1, 1, OPTAB_WIDEN); - } - - /* Store it all. */ - if (WORDS_BIG_ENDIAN) - emit_move_insn (st_addr_1, st_tmp_1); - else - emit_move_insn (st_addr_2, st_tmp_2); - for (i = words-1; i > 0; --i) - { - rtx tmp = change_address (dmem, DImode, - gen_rtx_AND (DImode, - plus_constant(dmema, - WORDS_BIG_ENDIAN ? i*8-1 : i*8), - im8)); - set_mem_alias_set (tmp, 0); - emit_move_insn (tmp, data_regs ? ins_tmps[i-1] : const0_rtx); - } - if (WORDS_BIG_ENDIAN) - emit_move_insn (st_addr_2, st_tmp_2); - else - emit_move_insn (st_addr_1, st_tmp_1); -} - - -/* Expand string/block move operations. - - operands[0] is the pointer to the destination. - operands[1] is the pointer to the source. - operands[2] is the number of bytes to move. - operands[3] is the alignment. */ - -int -alpha_expand_block_move (rtx operands[]) -{ - rtx bytes_rtx = operands[2]; - rtx align_rtx = operands[3]; - HOST_WIDE_INT orig_bytes = INTVAL (bytes_rtx); - HOST_WIDE_INT bytes = orig_bytes; - HOST_WIDE_INT src_align = INTVAL (align_rtx) * BITS_PER_UNIT; - HOST_WIDE_INT dst_align = src_align; - rtx orig_src = operands[1]; - rtx orig_dst = operands[0]; - rtx data_regs[2 * MAX_MOVE_WORDS + 16]; - rtx tmp; - unsigned int i, words, ofs, nregs = 0; - - if (orig_bytes <= 0) - return 1; - else if (orig_bytes > MAX_MOVE_WORDS * UNITS_PER_WORD) - return 0; - - /* Look for additional alignment information from recorded register info. */ - - tmp = XEXP (orig_src, 0); - if (GET_CODE (tmp) == REG) - src_align = MAX (src_align, REGNO_POINTER_ALIGN (REGNO (tmp))); - else if (GET_CODE (tmp) == PLUS - && GET_CODE (XEXP (tmp, 0)) == REG - && GET_CODE (XEXP (tmp, 1)) == CONST_INT) - { - unsigned HOST_WIDE_INT c = INTVAL (XEXP (tmp, 1)); - unsigned int a = REGNO_POINTER_ALIGN (REGNO (XEXP (tmp, 0))); - - if (a > src_align) - { - if (a >= 64 && c % 8 == 0) - src_align = 64; - else if (a >= 32 && c % 4 == 0) - src_align = 32; - else if (a >= 16 && c % 2 == 0) - src_align = 16; - } - } - - tmp = XEXP (orig_dst, 0); - if (GET_CODE (tmp) == REG) - dst_align = MAX (dst_align, REGNO_POINTER_ALIGN (REGNO (tmp))); - else if (GET_CODE (tmp) == PLUS - && GET_CODE (XEXP (tmp, 0)) == REG - && GET_CODE (XEXP (tmp, 1)) == CONST_INT) - { - unsigned HOST_WIDE_INT c = INTVAL (XEXP (tmp, 1)); - unsigned int a = REGNO_POINTER_ALIGN (REGNO (XEXP (tmp, 0))); - - if (a > dst_align) - { - if (a >= 64 && c % 8 == 0) - dst_align = 64; - else if (a >= 32 && c % 4 == 0) - dst_align = 32; - else if (a >= 16 && c % 2 == 0) - dst_align = 16; - } - } - - /* Load the entire block into registers. */ - if (GET_CODE (XEXP (orig_src, 0)) == ADDRESSOF) - { - enum machine_mode mode; - - tmp = XEXP (XEXP (orig_src, 0), 0); - - /* Don't use the existing register if we're reading more than - is held in the register. Nor if there is not a mode that - handles the exact size. */ - mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 1); - if (GET_CODE (tmp) == REG - && mode != BLKmode - && GET_MODE_SIZE (GET_MODE (tmp)) >= bytes) - { - if (mode == TImode) - { - data_regs[nregs] = gen_lowpart (DImode, tmp); - data_regs[nregs + 1] = gen_highpart (DImode, tmp); - nregs += 2; - } - else - data_regs[nregs++] = gen_lowpart (mode, tmp); - - goto src_done; - } - - /* No appropriate mode; fall back on memory. */ - orig_src = replace_equiv_address (orig_src, - copy_addr_to_reg (XEXP (orig_src, 0))); - src_align = GET_MODE_BITSIZE (GET_MODE (tmp)); - } - - ofs = 0; - if (src_align >= 64 && bytes >= 8) - { - words = bytes / 8; - - for (i = 0; i < words; ++i) - data_regs[nregs + i] = gen_reg_rtx (DImode); - - for (i = 0; i < words; ++i) - emit_move_insn (data_regs[nregs + i], - adjust_address (orig_src, DImode, ofs + i * 8)); - - nregs += words; - bytes -= words * 8; - ofs += words * 8; - } - - if (src_align >= 32 && bytes >= 4) - { - words = bytes / 4; - - for (i = 0; i < words; ++i) - data_regs[nregs + i] = gen_reg_rtx (SImode); - - for (i = 0; i < words; ++i) - emit_move_insn (data_regs[nregs + i], - adjust_address (orig_src, SImode, ofs + i * 4)); - - nregs += words; - bytes -= words * 4; - ofs += words * 4; - } - - if (bytes >= 8) - { - words = bytes / 8; - - for (i = 0; i < words+1; ++i) - data_regs[nregs + i] = gen_reg_rtx (DImode); - - alpha_expand_unaligned_load_words (data_regs + nregs, orig_src, - words, ofs); - - nregs += words; - bytes -= words * 8; - ofs += words * 8; - } - - if (! TARGET_BWX && bytes >= 4) - { - data_regs[nregs++] = tmp = gen_reg_rtx (SImode); - alpha_expand_unaligned_load (tmp, orig_src, 4, ofs, 0); - bytes -= 4; - ofs += 4; - } - - if (bytes >= 2) - { - if (src_align >= 16) - { - do { - data_regs[nregs++] = tmp = gen_reg_rtx (HImode); - emit_move_insn (tmp, adjust_address (orig_src, HImode, ofs)); - bytes -= 2; - ofs += 2; - } while (bytes >= 2); - } - else if (! TARGET_BWX) - { - data_regs[nregs++] = tmp = gen_reg_rtx (HImode); - alpha_expand_unaligned_load (tmp, orig_src, 2, ofs, 0); - bytes -= 2; - ofs += 2; - } - } - - while (bytes > 0) - { - data_regs[nregs++] = tmp = gen_reg_rtx (QImode); - emit_move_insn (tmp, adjust_address (orig_src, QImode, ofs)); - bytes -= 1; - ofs += 1; - } - - src_done: - - if (nregs > ARRAY_SIZE (data_regs)) - abort (); - - /* Now save it back out again. */ - - i = 0, ofs = 0; - - if (GET_CODE (XEXP (orig_dst, 0)) == ADDRESSOF) - { - enum machine_mode mode; - tmp = XEXP (XEXP (orig_dst, 0), 0); - - mode = mode_for_size (orig_bytes * BITS_PER_UNIT, MODE_INT, 1); - if (GET_CODE (tmp) == REG && GET_MODE (tmp) == mode) - { - if (nregs == 1) - { - emit_move_insn (tmp, data_regs[0]); - i = 1; - goto dst_done; - } - - else if (nregs == 2 && mode == TImode) - { - /* Undo the subregging done above when copying between - two TImode registers. */ - if (GET_CODE (data_regs[0]) == SUBREG - && GET_MODE (SUBREG_REG (data_regs[0])) == TImode) - emit_move_insn (tmp, SUBREG_REG (data_regs[0])); - else - { - rtx seq; - - start_sequence (); - emit_move_insn (gen_lowpart (DImode, tmp), data_regs[0]); - emit_move_insn (gen_highpart (DImode, tmp), data_regs[1]); - seq = get_insns (); - end_sequence (); - - emit_no_conflict_block (seq, tmp, data_regs[0], - data_regs[1], NULL_RTX); - } - - i = 2; - goto dst_done; - } - } - - /* ??? If nregs > 1, consider reconstructing the word in regs. */ - /* ??? Optimize mode < dst_mode with strict_low_part. */ - - /* No appropriate mode; fall back on memory. We can speed things - up by recognizing extra alignment information. */ - orig_dst = replace_equiv_address (orig_dst, - copy_addr_to_reg (XEXP (orig_dst, 0))); - dst_align = GET_MODE_BITSIZE (GET_MODE (tmp)); - } - - /* Write out the data in whatever chunks reading the source allowed. */ - if (dst_align >= 64) - { - while (i < nregs && GET_MODE (data_regs[i]) == DImode) - { - emit_move_insn (adjust_address (orig_dst, DImode, ofs), - data_regs[i]); - ofs += 8; - i++; - } - } - - if (dst_align >= 32) - { - /* If the source has remaining DImode regs, write them out in - two pieces. */ - while (i < nregs && GET_MODE (data_regs[i]) == DImode) - { - tmp = expand_binop (DImode, lshr_optab, data_regs[i], GEN_INT (32), - NULL_RTX, 1, OPTAB_WIDEN); - - emit_move_insn (adjust_address (orig_dst, SImode, ofs), - gen_lowpart (SImode, data_regs[i])); - emit_move_insn (adjust_address (orig_dst, SImode, ofs + 4), - gen_lowpart (SImode, tmp)); - ofs += 8; - i++; - } - - while (i < nregs && GET_MODE (data_regs[i]) == SImode) - { - emit_move_insn (adjust_address (orig_dst, SImode, ofs), - data_regs[i]); - ofs += 4; - i++; - } - } - - if (i < nregs && GET_MODE (data_regs[i]) == DImode) - { - /* Write out a remaining block of words using unaligned methods. */ - - for (words = 1; i + words < nregs; words++) - if (GET_MODE (data_regs[i + words]) != DImode) - break; - - if (words == 1) - alpha_expand_unaligned_store (orig_dst, data_regs[i], 8, ofs); - else - alpha_expand_unaligned_store_words (data_regs + i, orig_dst, - words, ofs); - - i += words; - ofs += words * 8; - } - - /* Due to the above, this won't be aligned. */ - /* ??? If we have more than one of these, consider constructing full - words in registers and using alpha_expand_unaligned_store_words. */ - while (i < nregs && GET_MODE (data_regs[i]) == SImode) - { - alpha_expand_unaligned_store (orig_dst, data_regs[i], 4, ofs); - ofs += 4; - i++; - } - - if (dst_align >= 16) - while (i < nregs && GET_MODE (data_regs[i]) == HImode) - { - emit_move_insn (adjust_address (orig_dst, HImode, ofs), data_regs[i]); - i++; - ofs += 2; - } - else - while (i < nregs && GET_MODE (data_regs[i]) == HImode) - { - alpha_expand_unaligned_store (orig_dst, data_regs[i], 2, ofs); - i++; - ofs += 2; - } - - while (i < nregs && GET_MODE (data_regs[i]) == QImode) - { - emit_move_insn (adjust_address (orig_dst, QImode, ofs), data_regs[i]); - i++; - ofs += 1; - } - - dst_done: - - if (i != nregs) - abort (); - - return 1; -} - -int -alpha_expand_block_clear (rtx operands[]) -{ - rtx bytes_rtx = operands[1]; - rtx align_rtx = operands[2]; - HOST_WIDE_INT orig_bytes = INTVAL (bytes_rtx); - HOST_WIDE_INT bytes = orig_bytes; - HOST_WIDE_INT align = INTVAL (align_rtx) * BITS_PER_UNIT; - HOST_WIDE_INT alignofs = 0; - rtx orig_dst = operands[0]; - rtx tmp; - int i, words, ofs = 0; - - if (orig_bytes <= 0) - return 1; - if (orig_bytes > MAX_MOVE_WORDS * UNITS_PER_WORD) - return 0; - - /* Look for stricter alignment. */ - tmp = XEXP (orig_dst, 0); - if (GET_CODE (tmp) == REG) - align = MAX (align, REGNO_POINTER_ALIGN (REGNO (tmp))); - else if (GET_CODE (tmp) == PLUS - && GET_CODE (XEXP (tmp, 0)) == REG - && GET_CODE (XEXP (tmp, 1)) == CONST_INT) - { - HOST_WIDE_INT c = INTVAL (XEXP (tmp, 1)); - int a = REGNO_POINTER_ALIGN (REGNO (XEXP (tmp, 0))); - - if (a > align) - { - if (a >= 64) - align = a, alignofs = 8 - c % 8; - else if (a >= 32) - align = a, alignofs = 4 - c % 4; - else if (a >= 16) - align = a, alignofs = 2 - c % 2; - } - } - else if (GET_CODE (tmp) == ADDRESSOF) - { - enum machine_mode mode; - - mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 1); - if (GET_MODE (XEXP (tmp, 0)) == mode) - { - emit_move_insn (XEXP (tmp, 0), const0_rtx); - return 1; - } - - /* No appropriate mode; fall back on memory. */ - orig_dst = replace_equiv_address (orig_dst, copy_addr_to_reg (tmp)); - align = GET_MODE_BITSIZE (GET_MODE (XEXP (tmp, 0))); - } - - /* Handle an unaligned prefix first. */ - - if (alignofs > 0) - { -#if HOST_BITS_PER_WIDE_INT >= 64 - /* Given that alignofs is bounded by align, the only time BWX could - generate three stores is for a 7 byte fill. Prefer two individual - stores over a load/mask/store sequence. */ - if ((!TARGET_BWX || alignofs == 7) - && align >= 32 - && !(alignofs == 4 && bytes >= 4)) - { - enum machine_mode mode = (align >= 64 ? DImode : SImode); - int inv_alignofs = (align >= 64 ? 8 : 4) - alignofs; - rtx mem, tmp; - HOST_WIDE_INT mask; - - mem = adjust_address (orig_dst, mode, ofs - inv_alignofs); - set_mem_alias_set (mem, 0); - - mask = ~(~(HOST_WIDE_INT)0 << (inv_alignofs * 8)); - if (bytes < alignofs) - { - mask |= ~(HOST_WIDE_INT)0 << ((inv_alignofs + bytes) * 8); - ofs += bytes; - bytes = 0; - } - else - { - bytes -= alignofs; - ofs += alignofs; - } - alignofs = 0; - - tmp = expand_binop (mode, and_optab, mem, GEN_INT (mask), - NULL_RTX, 1, OPTAB_WIDEN); - - emit_move_insn (mem, tmp); - } -#endif - - if (TARGET_BWX && (alignofs & 1) && bytes >= 1) - { - emit_move_insn (adjust_address (orig_dst, QImode, ofs), const0_rtx); - bytes -= 1; - ofs += 1; - alignofs -= 1; - } - if (TARGET_BWX && align >= 16 && (alignofs & 3) == 2 && bytes >= 2) - { - emit_move_insn (adjust_address (orig_dst, HImode, ofs), const0_rtx); - bytes -= 2; - ofs += 2; - alignofs -= 2; - } - if (alignofs == 4 && bytes >= 4) - { - emit_move_insn (adjust_address (orig_dst, SImode, ofs), const0_rtx); - bytes -= 4; - ofs += 4; - alignofs = 0; - } - - /* If we've not used the extra lead alignment information by now, - we won't be able to. Downgrade align to match what's left over. */ - if (alignofs > 0) - { - alignofs = alignofs & -alignofs; - align = MIN (align, alignofs * BITS_PER_UNIT); - } - } - - /* Handle a block of contiguous long-words. */ - - if (align >= 64 && bytes >= 8) - { - words = bytes / 8; - - for (i = 0; i < words; ++i) - emit_move_insn (adjust_address (orig_dst, DImode, ofs + i * 8), - const0_rtx); - - bytes -= words * 8; - ofs += words * 8; - } - - /* If the block is large and appropriately aligned, emit a single - store followed by a sequence of stq_u insns. */ - - if (align >= 32 && bytes > 16) - { - rtx orig_dsta; - - emit_move_insn (adjust_address (orig_dst, SImode, ofs), const0_rtx); - bytes -= 4; - ofs += 4; - - orig_dsta = XEXP (orig_dst, 0); - if (GET_CODE (orig_dsta) == LO_SUM) - orig_dsta = force_reg (Pmode, orig_dsta); - - words = bytes / 8; - for (i = 0; i < words; ++i) - { - rtx mem - = change_address (orig_dst, DImode, - gen_rtx_AND (DImode, - plus_constant (orig_dsta, ofs + i*8), - GEN_INT (-8))); - set_mem_alias_set (mem, 0); - emit_move_insn (mem, const0_rtx); - } - - /* Depending on the alignment, the first stq_u may have overlapped - with the initial stl, which means that the last stq_u didn't - write as much as it would appear. Leave those questionable bytes - unaccounted for. */ - bytes -= words * 8 - 4; - ofs += words * 8 - 4; - } - - /* Handle a smaller block of aligned words. */ - - if ((align >= 64 && bytes == 4) - || (align == 32 && bytes >= 4)) - { - words = bytes / 4; - - for (i = 0; i < words; ++i) - emit_move_insn (adjust_address (orig_dst, SImode, ofs + i * 4), - const0_rtx); - - bytes -= words * 4; - ofs += words * 4; - } - - /* An unaligned block uses stq_u stores for as many as possible. */ - - if (bytes >= 8) - { - words = bytes / 8; - - alpha_expand_unaligned_store_words (NULL, orig_dst, words, ofs); - - bytes -= words * 8; - ofs += words * 8; - } - - /* Next clean up any trailing pieces. */ - -#if HOST_BITS_PER_WIDE_INT >= 64 - /* Count the number of bits in BYTES for which aligned stores could - be emitted. */ - words = 0; - for (i = (TARGET_BWX ? 1 : 4); i * BITS_PER_UNIT <= align ; i <<= 1) - if (bytes & i) - words += 1; - - /* If we have appropriate alignment (and it wouldn't take too many - instructions otherwise), mask out the bytes we need. */ - if (TARGET_BWX ? words > 2 : bytes > 0) - { - if (align >= 64) - { - rtx mem, tmp; - HOST_WIDE_INT mask; - - mem = adjust_address (orig_dst, DImode, ofs); - set_mem_alias_set (mem, 0); - - mask = ~(HOST_WIDE_INT)0 << (bytes * 8); - - tmp = expand_binop (DImode, and_optab, mem, GEN_INT (mask), - NULL_RTX, 1, OPTAB_WIDEN); - - emit_move_insn (mem, tmp); - return 1; - } - else if (align >= 32 && bytes < 4) - { - rtx mem, tmp; - HOST_WIDE_INT mask; - - mem = adjust_address (orig_dst, SImode, ofs); - set_mem_alias_set (mem, 0); - - mask = ~(HOST_WIDE_INT)0 << (bytes * 8); - - tmp = expand_binop (SImode, and_optab, mem, GEN_INT (mask), - NULL_RTX, 1, OPTAB_WIDEN); - - emit_move_insn (mem, tmp); - return 1; - } - } -#endif - - if (!TARGET_BWX && bytes >= 4) - { - alpha_expand_unaligned_store (orig_dst, const0_rtx, 4, ofs); - bytes -= 4; - ofs += 4; - } - - if (bytes >= 2) - { - if (align >= 16) - { - do { - emit_move_insn (adjust_address (orig_dst, HImode, ofs), - const0_rtx); - bytes -= 2; - ofs += 2; - } while (bytes >= 2); - } - else if (! TARGET_BWX) - { - alpha_expand_unaligned_store (orig_dst, const0_rtx, 2, ofs); - bytes -= 2; - ofs += 2; - } - } - - while (bytes > 0) - { - emit_move_insn (adjust_address (orig_dst, QImode, ofs), const0_rtx); - bytes -= 1; - ofs += 1; - } - - return 1; -} - -/* Returns a mask so that zap(x, value) == x & mask. */ - -rtx -alpha_expand_zap_mask (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 (rtx (*gen) (rtx, rtx, rtx), - enum machine_mode mode, - rtx op0, rtx op1, rtx 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. */ - -static int -alpha_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) -{ - enum attr_type insn_type, dep_insn_type; - - /* If the dependence is an anti-dependence, there is no cost. For an - output dependence, there is sometimes a cost, but it doesn't seem - worth handling those few cases. */ - if (REG_NOTE_KIND (link) != 0) - return cost; - - /* If we can't recognize the insns, we can't really do anything. */ - if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0) - return cost; - - insn_type = get_attr_type (insn); - dep_insn_type = get_attr_type (dep_insn); - - /* Bring in the user-defined memory latency. */ - if (dep_insn_type == TYPE_ILD - || dep_insn_type == TYPE_FLD - || dep_insn_type == TYPE_LDSYM) - cost += alpha_memory_latency-1; - - /* Everything else handled in DFA bypasses now. */ - - return cost; -} - -/* The number of instructions that can be issued per cycle. */ - -static int -alpha_issue_rate (void) -{ - return (alpha_cpu == PROCESSOR_EV4 ? 2 : 4); -} - -static int -alpha_use_dfa_pipeline_interface (void) -{ - 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 arithmetic insn can be issued to U0/U1/L0/L1. */ - -static int -alpha_multipass_dfa_lookahead (void) -{ - return (alpha_cpu == PROCESSOR_EV6 ? 4 : 2); -} - -/* Machine-specific function data. */ - -struct machine_function GTY(()) -{ - /* For unicosmk. */ - /* List of call information words for calls from this function. */ - struct rtx_def *first_ciw; - struct rtx_def *last_ciw; - int ciw_count; - - /* List of deferred case vectors. */ - struct rtx_def *addr_list; - - /* For OSF. */ - const char *some_ld_name; -}; - -/* How to allocate a 'struct machine_function'. */ - -static struct machine_function * -alpha_init_machine_status (void) -{ - return ((struct machine_function *) - ggc_alloc_cleared (sizeof (struct machine_function))); -} - -/* Functions to save and restore alpha_return_addr_rtx. */ - -/* Start the ball rolling with RETURN_ADDR_RTX. */ - -rtx -alpha_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) -{ - if (count != 0) - return const0_rtx; - - return get_hard_reg_initial_val (Pmode, REG_RA); -} - -/* Return or create a pseudo containing the gp value for the current - function. Needed only if TARGET_LD_BUGGY_LDGP. */ - -rtx -alpha_gp_save_rtx (void) -{ - rtx r = get_hard_reg_initial_val (DImode, 29); - if (GET_CODE (r) != MEM) - r = gen_mem_addressof (r, NULL_TREE, /*rescan=*/true); - return r; -} - -static int -alpha_ra_ever_killed (void) -{ - rtx top; - - if (!has_hard_reg_initial_val (Pmode, REG_RA)) - return regs_ever_live[REG_RA]; - - push_topmost_sequence (); - top = get_insns (); - pop_topmost_sequence (); - - return reg_set_between_p (gen_rtx_REG (Pmode, REG_RA), top, NULL_RTX); -} - - -/* Return the trap mode suffix applicable to the current - instruction, or NULL. */ - -static const char * -get_trap_mode_suffix (void) -{ - enum attr_trap_suffix s = get_attr_trap_suffix (current_output_insn); - - switch (s) - { - case TRAP_SUFFIX_NONE: - return NULL; - - case TRAP_SUFFIX_SU: - if (alpha_fptm >= ALPHA_FPTM_SU) - return "su"; - return NULL; - - case TRAP_SUFFIX_SUI: - if (alpha_fptm >= ALPHA_FPTM_SUI) - return "sui"; - return NULL; - - case TRAP_SUFFIX_V_SV: - switch (alpha_fptm) - { - case ALPHA_FPTM_N: - return NULL; - case ALPHA_FPTM_U: - return "v"; - case ALPHA_FPTM_SU: - case ALPHA_FPTM_SUI: - return "sv"; - } - break; - - case TRAP_SUFFIX_V_SV_SVI: - switch (alpha_fptm) - { - case ALPHA_FPTM_N: - return NULL; - case ALPHA_FPTM_U: - return "v"; - case ALPHA_FPTM_SU: - return "sv"; - case ALPHA_FPTM_SUI: - return "svi"; - } - break; - - case TRAP_SUFFIX_U_SU_SUI: - switch (alpha_fptm) - { - case ALPHA_FPTM_N: - return NULL; - case ALPHA_FPTM_U: - return "u"; - case ALPHA_FPTM_SU: - return "su"; - case ALPHA_FPTM_SUI: - return "sui"; - } - break; - } - abort (); -} - -/* Return the rounding mode suffix applicable to the current - instruction, or NULL. */ - -static const char * -get_round_mode_suffix (void) -{ - enum attr_round_suffix s = get_attr_round_suffix (current_output_insn); - - switch (s) - { - case ROUND_SUFFIX_NONE: - return NULL; - case ROUND_SUFFIX_NORMAL: - switch (alpha_fprm) - { - case ALPHA_FPRM_NORM: - return NULL; - case ALPHA_FPRM_MINF: - return "m"; - case ALPHA_FPRM_CHOP: - return "c"; - case ALPHA_FPRM_DYN: - return "d"; - } - break; - - case ROUND_SUFFIX_C: - return "c"; - } - 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 int -get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED) -{ - rtx x = *px; - - if (GET_CODE (x) == SYMBOL_REF - && SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC) - { - cfun->machine->some_ld_name = XSTR (x, 0); - return 1; - } - - return 0; -} - -static const char * -get_some_local_dynamic_name (void) -{ - 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 (); -} - -/* Print an operand. Recognize special options, documented below. */ - -void -print_operand (FILE *file, rtx x, int code) -{ - int i; - - switch (code) - { - case '~': - /* Print the assembler name of the current function. */ - assemble_name (file, alpha_fnname); - break; - - case '&': - assemble_name (file, get_some_local_dynamic_name ()); - break; - - case '/': - { - const char *trap = get_trap_mode_suffix (); - const char *round = get_round_mode_suffix (); - - if (trap || round) - fprintf (file, (TARGET_AS_SLASH_BEFORE_SUFFIX ? "/%s%s" : "%s%s"), - (trap ? trap : ""), (round ? round : "")); - break; - } - - case ',': - /* Generates single precision instruction suffix. */ - fputc ((TARGET_FLOAT_VAX ? 'f' : 's'), file); - break; - - case '-': - /* Generates double precision instruction suffix. */ - fputc ((TARGET_FLOAT_VAX ? 'g' : 't'), file); - break; - - case '+': - /* Generates a nop after a noreturn call at the very end of the - function. */ - if (next_real_insn (current_output_insn) == 0) - fprintf (file, "\n\tnop"); - break; - - case '#': - if (alpha_this_literal_sequence_number == 0) - alpha_this_literal_sequence_number = alpha_next_sequence_number++; - fprintf (file, "%d", alpha_this_literal_sequence_number); - break; - - case '*': - if (alpha_this_gpdisp_sequence_number == 0) - alpha_this_gpdisp_sequence_number = alpha_next_sequence_number++; - fprintf (file, "%d", alpha_this_gpdisp_sequence_number); - break; - - case 'H': - if (GET_CODE (x) == HIGH) - output_addr_const (file, XEXP (x, 0)); - else - output_operand_lossage ("invalid %%H value"); - break; - - case 'J': - { - const char *lituse; - - if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSGD_CALL) - { - x = XVECEXP (x, 0, 0); - lituse = "lituse_tlsgd"; - } - else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLSLDM_CALL) - { - x = XVECEXP (x, 0, 0); - lituse = "lituse_tlsldm"; - } - else if (GET_CODE (x) == CONST_INT) - lituse = "lituse_jsr"; - else - { - output_operand_lossage ("invalid %%J value"); - break; - } - - if (x != const0_rtx) - fprintf (file, "\t\t!%s!%d", lituse, (int) INTVAL (x)); - } - break; - - case 'j': - { - const char *lituse; - -#ifdef HAVE_AS_JSRDIRECT_RELOCS - lituse = "lituse_jsrdirect"; -#else - lituse = "lituse_jsr"; -#endif - - if (INTVAL (x) == 0) - abort (); - fprintf (file, "\t\t!%s!%d", lituse, (int) INTVAL (x)); - } - break; - case 'r': - /* If this operand is the constant zero, write it as "$31". */ - if (GET_CODE (x) == REG) - fprintf (file, "%s", reg_names[REGNO (x)]); - else if (x == CONST0_RTX (GET_MODE (x))) - fprintf (file, "$31"); - else - output_operand_lossage ("invalid %%r value"); - break; - - case 'R': - /* Similar, but for floating-point. */ - if (GET_CODE (x) == REG) - fprintf (file, "%s", reg_names[REGNO (x)]); - else if (x == CONST0_RTX (GET_MODE (x))) - fprintf (file, "$f31"); - else - output_operand_lossage ("invalid %%R value"); - break; - - case 'N': - /* Write the 1's complement of a constant. */ - if (GET_CODE (x) != CONST_INT) - output_operand_lossage ("invalid %%N value"); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~ INTVAL (x)); - break; - - case 'P': - /* Write 1 << C, for a constant C. */ - if (GET_CODE (x) != CONST_INT) - output_operand_lossage ("invalid %%P value"); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) 1 << INTVAL (x)); - break; - - case 'h': - /* Write the high-order 16 bits of a constant, sign-extended. */ - if (GET_CODE (x) != CONST_INT) - output_operand_lossage ("invalid %%h value"); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) >> 16); - break; - - case 'L': - /* Write the low-order 16 bits of a constant, sign-extended. */ - if (GET_CODE (x) != CONST_INT) - output_operand_lossage ("invalid %%L value"); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, - (INTVAL (x) & 0xffff) - 2 * (INTVAL (x) & 0x8000)); - break; - - case 'm': - /* Write mask for ZAP insn. */ - if (GET_CODE (x) == CONST_DOUBLE) - { - HOST_WIDE_INT mask = 0; - HOST_WIDE_INT value; - - value = CONST_DOUBLE_LOW (x); - for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR; - i++, value >>= 8) - if (value & 0xff) - mask |= (1 << i); - - value = CONST_DOUBLE_HIGH (x); - for (i = 0; i < HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR; - i++, value >>= 8) - if (value & 0xff) - mask |= (1 << (i + sizeof (int))); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, mask & 0xff); - } - - else if (GET_CODE (x) == CONST_INT) - { - HOST_WIDE_INT mask = 0, value = INTVAL (x); - - for (i = 0; i < 8; i++, value >>= 8) - if (value & 0xff) - mask |= (1 << i); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, mask); - } - else - output_operand_lossage ("invalid %%m value"); - break; - - case 'M': - /* 'b', 'w', 'l', or 'q' as the value of the constant. */ - if (GET_CODE (x) != CONST_INT - || (INTVAL (x) != 8 && INTVAL (x) != 16 - && INTVAL (x) != 32 && INTVAL (x) != 64)) - output_operand_lossage ("invalid %%M value"); - - fprintf (file, "%s", - (INTVAL (x) == 8 ? "b" - : INTVAL (x) == 16 ? "w" - : INTVAL (x) == 32 ? "l" - : "q")); - break; - - case 'U': - /* Similar, except do it from the mask. */ - if (GET_CODE (x) == CONST_INT) - { - HOST_WIDE_INT value = INTVAL (x); - - if (value == 0xff) - { - fputc ('b', file); - break; - } - if (value == 0xffff) - { - fputc ('w', file); - break; - } - if (value == 0xffffffff) - { - fputc ('l', file); - break; - } - if (value == -1) - { - fputc ('q', file); - break; - } - } - else if (HOST_BITS_PER_WIDE_INT == 32 - && GET_CODE (x) == CONST_DOUBLE - && CONST_DOUBLE_LOW (x) == 0xffffffff - && CONST_DOUBLE_HIGH (x) == 0) - { - fputc ('l', file); - break; - } - output_operand_lossage ("invalid %%U value"); - break; - - case 's': - /* Write the constant value divided by 8 for little-endian mode or - (56 - value) / 8 for big-endian mode. */ - - if (GET_CODE (x) != CONST_INT - || (unsigned HOST_WIDE_INT) INTVAL (x) >= (WORDS_BIG_ENDIAN - ? 56 - : 64) - || (INTVAL (x) & 7) != 0) - output_operand_lossage ("invalid %%s value"); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, - WORDS_BIG_ENDIAN - ? (56 - INTVAL (x)) / 8 - : INTVAL (x) / 8); - break; - - case 'S': - /* Same, except compute (64 - c) / 8 */ - - if (GET_CODE (x) != CONST_INT - && (unsigned HOST_WIDE_INT) INTVAL (x) >= 64 - && (INTVAL (x) & 7) != 8) - output_operand_lossage ("invalid %%s value"); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, (64 - INTVAL (x)) / 8); - break; - - case 't': - { - /* On Unicos/Mk systems: use a DEX expression if the symbol - clashes with a register name. */ - int dex = unicosmk_need_dex (x); - if (dex) - fprintf (file, "DEX(%d)", dex); - else - output_addr_const (file, x); - } - break; - - case 'C': case 'D': case 'c': case 'd': - /* Write out comparison name. */ - { - enum rtx_code c = GET_CODE (x); - - if (GET_RTX_CLASS (c) != '<') - output_operand_lossage ("invalid %%C value"); - - else if (code == 'D') - c = reverse_condition (c); - else if (code == 'c') - c = swap_condition (c); - else if (code == 'd') - c = swap_condition (reverse_condition (c)); - - if (c == LEU) - fprintf (file, "ule"); - else if (c == LTU) - fprintf (file, "ult"); - else if (c == UNORDERED) - fprintf (file, "un"); - else - fprintf (file, "%s", GET_RTX_NAME (c)); - } - break; - - case 'E': - /* Write the divide or modulus operator. */ - switch (GET_CODE (x)) - { - case DIV: - fprintf (file, "div%s", GET_MODE (x) == SImode ? "l" : "q"); - break; - case UDIV: - fprintf (file, "div%su", GET_MODE (x) == SImode ? "l" : "q"); - break; - case MOD: - fprintf (file, "rem%s", GET_MODE (x) == SImode ? "l" : "q"); - break; - case UMOD: - fprintf (file, "rem%su", GET_MODE (x) == SImode ? "l" : "q"); - break; - default: - output_operand_lossage ("invalid %%E value"); - break; - } - break; - - case 'A': - /* Write "_u" for unaligned access. */ - if (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == AND) - fprintf (file, "_u"); - break; - - case 0: - if (GET_CODE (x) == REG) - fprintf (file, "%s", reg_names[REGNO (x)]); - else if (GET_CODE (x) == MEM) - output_address (XEXP (x, 0)); - else if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == 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; - - default: - output_operand_lossage ("invalid %%xn code"); - } -} - -void -print_operand_address (FILE *file, rtx addr) -{ - int basereg = 31; - HOST_WIDE_INT offset = 0; - - if (GET_CODE (addr) == AND) - addr = XEXP (addr, 0); - - if (GET_CODE (addr) == PLUS - && GET_CODE (XEXP (addr, 1)) == CONST_INT) - { - offset = INTVAL (XEXP (addr, 1)); - addr = XEXP (addr, 0); - } - - if (GET_CODE (addr) == LO_SUM) - { - const char *reloc16, *reloclo; - rtx op1 = XEXP (addr, 1); - - if (GET_CODE (op1) == CONST && GET_CODE (XEXP (op1, 0)) == UNSPEC) - { - op1 = XEXP (op1, 0); - switch (XINT (op1, 1)) - { - case UNSPEC_DTPREL: - reloc16 = NULL; - reloclo = (alpha_tls_size == 16 ? "dtprel" : "dtprello"); - break; - case UNSPEC_TPREL: - reloc16 = NULL; - reloclo = (alpha_tls_size == 16 ? "tprel" : "tprello"); - break; - default: - output_operand_lossage ("unknown relocation unspec"); - return; - } - - output_addr_const (file, XVECEXP (op1, 0, 0)); - } - else - { - reloc16 = "gprel"; - reloclo = "gprellow"; - output_addr_const (file, op1); - } - - if (offset) - fprintf (file, "+" HOST_WIDE_INT_PRINT_DEC, offset); - - addr = XEXP (addr, 0); - if (GET_CODE (addr) == REG) - basereg = REGNO (addr); - else if (GET_CODE (addr) == SUBREG - && GET_CODE (SUBREG_REG (addr)) == REG) - basereg = subreg_regno (addr); - else - abort (); - - fprintf (file, "($%d)\t\t!%s", basereg, - (basereg == 29 ? reloc16 : reloclo)); - return; - } - - if (GET_CODE (addr) == REG) - basereg = REGNO (addr); - else if (GET_CODE (addr) == SUBREG - && GET_CODE (SUBREG_REG (addr)) == REG) - 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+" HOST_WIDE_INT_PRINT_DEC, - XSTR (XEXP (XEXP (addr, 0), 0), 0), - INTVAL (XEXP (XEXP (addr, 0), 1))); - return; - } -#endif - - else - abort (); - - fprintf (file, HOST_WIDE_INT_PRINT_DEC "($%d)", offset, basereg); -} - -/* Emit RTL insns to initialize the variable parts of a trampoline at - TRAMP. FNADDR is an RTX for the address of the function's pure - code. CXT is an RTX for the static chain value for the function. - - The three offset parameters are for the individual template's - layout. A JMPOFS < 0 indicates that the trampoline does not - contain instructions at all. - - We assume here that a function will be called many more times than - its address is taken (e.g., it might be passed to qsort), so we - take the trouble to initialize the "hint" field in the JMP insn. - Note that the hint field is PC (new) + 4 * bits 13:0. */ - -void -alpha_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt, - int fnofs, int cxtofs, int jmpofs) -{ - rtx temp, temp1, addr; - /* VMS really uses DImode pointers in memory at this point. */ - enum machine_mode mode = TARGET_ABI_OPEN_VMS ? Pmode : ptr_mode; - -#ifdef POINTERS_EXTEND_UNSIGNED - fnaddr = convert_memory_address (mode, fnaddr); - cxt = convert_memory_address (mode, cxt); -#endif - - /* Store function address and CXT. */ - addr = memory_address (mode, plus_constant (tramp, fnofs)); - emit_move_insn (gen_rtx_MEM (mode, addr), fnaddr); - addr = memory_address (mode, plus_constant (tramp, cxtofs)); - emit_move_insn (gen_rtx_MEM (mode, addr), cxt); - - /* This has been disabled since the hint only has a 32k range, and in - no existing OS is the stack within 32k of the text segment. */ - if (0 && jmpofs >= 0) - { - /* Compute hint value. */ - temp = force_operand (plus_constant (tramp, jmpofs+4), NULL_RTX); - temp = expand_binop (DImode, sub_optab, fnaddr, temp, temp, 1, - OPTAB_WIDEN); - temp = expand_shift (RSHIFT_EXPR, Pmode, temp, - build_int_2 (2, 0), NULL_RTX, 1); - temp = expand_and (SImode, gen_lowpart (SImode, temp), - GEN_INT (0x3fff), 0); - - /* Merge in the hint. */ - addr = memory_address (SImode, plus_constant (tramp, jmpofs)); - temp1 = force_reg (SImode, gen_rtx_MEM (SImode, addr)); - temp1 = expand_and (SImode, temp1, GEN_INT (0xffffc000), NULL_RTX); - temp1 = expand_binop (SImode, ior_optab, temp1, temp, temp1, 1, - OPTAB_WIDEN); - emit_move_insn (gen_rtx_MEM (SImode, addr), temp1); - } - -#ifdef ENABLE_EXECUTE_STACK - emit_library_call (init_one_libfunc ("__enable_execute_stack"), - 0, VOIDmode, 1, tramp, Pmode); -#endif - - if (jmpofs >= 0) - emit_insn (gen_imb ()); -} - -/* Determine where to put an argument to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). - - On Alpha the first 6 words of args are normally in registers - and the rest are pushed. */ - -rtx -function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode, tree type, - int named ATTRIBUTE_UNUSED) -{ - int basereg; - int num_args; - - /* Don't get confused and pass small structures in FP registers. */ - if (type && AGGREGATE_TYPE_P (type)) - basereg = 16; - else - { -#ifdef ENABLE_CHECKING - /* With alpha_split_complex_arg, we shouldn't see any raw complex - values here. */ - if (COMPLEX_MODE_P (mode)) - abort (); -#endif - - /* Set up defaults for FP operands passed in FP registers, and - integral operands passed in integer registers. */ - if (TARGET_FPREGS && GET_MODE_CLASS (mode) == MODE_FLOAT) - basereg = 32 + 16; - else - basereg = 16; - } - - /* ??? Irritatingly, the definition of CUMULATIVE_ARGS is different for - the three platforms, so we can't avoid conditional compilation. */ -#if TARGET_ABI_OPEN_VMS - { - if (mode == VOIDmode) - return alpha_arg_info_reg_val (cum); - - num_args = cum.num_args; - if (num_args >= 6 || MUST_PASS_IN_STACK (mode, type)) - return NULL_RTX; - } -#elif TARGET_ABI_UNICOSMK - { - int size; - - /* If this is the last argument, generate the call info word (CIW). */ - /* ??? We don't include the caller's line number in the CIW because - I don't know how to determine it if debug infos are turned off. */ - if (mode == VOIDmode) - { - int i; - HOST_WIDE_INT lo; - HOST_WIDE_INT hi; - rtx ciw; - - lo = 0; - - for (i = 0; i < cum.num_reg_words && i < 5; i++) - if (cum.reg_args_type[i]) - lo |= (1 << (7 - i)); - - if (cum.num_reg_words == 6 && cum.reg_args_type[5]) - lo |= 7; - else - lo |= cum.num_reg_words; - -#if HOST_BITS_PER_WIDE_INT == 32 - hi = (cum.num_args << 20) | cum.num_arg_words; -#else - lo = lo | ((HOST_WIDE_INT) cum.num_args << 52) - | ((HOST_WIDE_INT) cum.num_arg_words << 32); - hi = 0; -#endif - ciw = immed_double_const (lo, hi, DImode); - - return gen_rtx_UNSPEC (DImode, gen_rtvec (1, ciw), - UNSPEC_UMK_LOAD_CIW); - } - - size = ALPHA_ARG_SIZE (mode, type, named); - num_args = cum.num_reg_words; - if (MUST_PASS_IN_STACK (mode, type) - || cum.num_reg_words + size > 6 || cum.force_stack) - return NULL_RTX; - else if (type && TYPE_MODE (type) == BLKmode) - { - rtx reg1, reg2; - - reg1 = gen_rtx_REG (DImode, num_args + 16); - reg1 = gen_rtx_EXPR_LIST (DImode, reg1, const0_rtx); - - /* The argument fits in two registers. Note that we still need to - reserve a register for empty structures. */ - if (size == 0) - return NULL_RTX; - else if (size == 1) - return gen_rtx_PARALLEL (mode, gen_rtvec (1, reg1)); - else - { - reg2 = gen_rtx_REG (DImode, num_args + 17); - reg2 = gen_rtx_EXPR_LIST (DImode, reg2, GEN_INT (8)); - return gen_rtx_PARALLEL (mode, gen_rtvec (2, reg1, reg2)); - } - } - } -#elif TARGET_ABI_OSF - { - if (cum >= 6) - return NULL_RTX; - num_args = cum; - - /* VOID is passed as a special flag for "last argument". */ - if (type == void_type_node) - basereg = 16; - else if (MUST_PASS_IN_STACK (mode, type)) - return NULL_RTX; - else if (FUNCTION_ARG_PASS_BY_REFERENCE (cum, mode, type, named)) - basereg = 16; - } -#else -#error Unhandled ABI -#endif - - return gen_rtx_REG (mode, num_args + basereg); -} - -/* Return true if TYPE must be returned in memory, instead of in registers. */ - -static bool -alpha_return_in_memory (tree type, tree fndecl ATTRIBUTE_UNUSED) -{ - enum machine_mode mode = VOIDmode; - int size; - - if (type) - { - mode = TYPE_MODE (type); - - /* All aggregates are returned in memory. */ - if (AGGREGATE_TYPE_P (type)) - return true; - } - - size = GET_MODE_SIZE (mode); - switch (GET_MODE_CLASS (mode)) - { - case MODE_VECTOR_FLOAT: - /* Pass all float vectors in memory, like an aggregate. */ - return true; - - case MODE_COMPLEX_FLOAT: - /* We judge complex floats on the size of their element, - not the size of the whole type. */ - size = GET_MODE_UNIT_SIZE (mode); - break; - - case MODE_INT: - case MODE_FLOAT: - case MODE_COMPLEX_INT: - case MODE_VECTOR_INT: - break; - - default: - /* ??? We get called on all sorts of random stuff from - aggregate_value_p. We can't abort, but it's not clear - what's safe to return. Pretend it's a struct I guess. */ - return true; - } - - /* Otherwise types must fit in one register. */ - return size > UNITS_PER_WORD; -} - -/* Define how to find the value returned by a function. VALTYPE is the - data type of the value (as a tree). If the precise function being - called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0. - MODE is set instead of VALTYPE for libcalls. - - On Alpha the value is found in $0 for integer functions and - $f0 for floating-point functions. */ - -rtx -function_value (tree valtype, tree func ATTRIBUTE_UNUSED, - enum machine_mode mode) -{ - unsigned int regnum; - enum mode_class class; - -#ifdef ENABLE_CHECKING - if (valtype && alpha_return_in_memory (valtype, func)) - abort (); -#endif - - if (valtype) - mode = TYPE_MODE (valtype); - - class = GET_MODE_CLASS (mode); - switch (class) - { - case MODE_INT: - /* Do the same thing as PROMOTE_MODE. */ - mode = DImode; - /* FALLTHRU */ - - case MODE_COMPLEX_INT: - case MODE_VECTOR_INT: - regnum = 0; - break; - - case MODE_FLOAT: - regnum = 32; - break; - - case MODE_COMPLEX_FLOAT: - { - enum machine_mode cmode = GET_MODE_INNER (mode); - - return gen_rtx_PARALLEL - (VOIDmode, - gen_rtvec (2, - gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (cmode, 32), - GEN_INT (0)), - gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (cmode, 33), - GEN_INT (GET_MODE_SIZE (cmode))))); - } - - default: - abort (); - } - - return gen_rtx_REG (mode, regnum); -} - -/* TCmode complex values are passed by invisible reference. We - should not split these values. */ - -static bool -alpha_split_complex_arg (tree type) -{ - return TYPE_MODE (type) != TCmode; -} - -static tree -alpha_build_builtin_va_list (void) -{ - tree base, ofs, space, record, type_decl; - - if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK) - return ptr_type_node; - - record = (*lang_hooks.types.make_type) (RECORD_TYPE); - type_decl = build_decl (TYPE_DECL, get_identifier ("__va_list_tag"), record); - TREE_CHAIN (record) = type_decl; - TYPE_NAME (record) = type_decl; - - /* C++? SET_IS_AGGR_TYPE (record, 1); */ - - /* Dummy field to prevent alignment warnings. */ - space = build_decl (FIELD_DECL, NULL_TREE, integer_type_node); - DECL_FIELD_CONTEXT (space) = record; - DECL_ARTIFICIAL (space) = 1; - DECL_IGNORED_P (space) = 1; - - ofs = build_decl (FIELD_DECL, get_identifier ("__offset"), - integer_type_node); - DECL_FIELD_CONTEXT (ofs) = record; - TREE_CHAIN (ofs) = space; - - base = build_decl (FIELD_DECL, get_identifier ("__base"), - ptr_type_node); - DECL_FIELD_CONTEXT (base) = record; - TREE_CHAIN (base) = ofs; - - TYPE_FIELDS (record) = base; - layout_type (record); - - return record; -} - -/* Perform any needed actions needed for a function that is receiving a - variable number of arguments. */ - -static void -alpha_setup_incoming_varargs (CUMULATIVE_ARGS *pcum, - enum machine_mode mode ATTRIBUTE_UNUSED, - tree type ATTRIBUTE_UNUSED, - int *pretend_size, int no_rtl) -{ -#if TARGET_ABI_UNICOSMK - /* 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. */ - int num_reg_words = pcum->num_reg_words; - if (num_reg_words < 6) - { - if (!no_rtl) - { - emit_insn (gen_umk_mismatch_args (GEN_INT (num_reg_words + 1))); - emit_insn (gen_arg_home_umk ()); - } - *pretend_size = 0; - } -#elif TARGET_ABI_OPEN_VMS - /* For VMS, we allocate space for all 6 arg registers plus a count. - - However, if NO registers need to be saved, don't allocate any space. - This is not only because we won't need the space, but because AP - includes the current_pretend_args_size and we don't want to mess up - any ap-relative addresses already made. */ - if (pcum->num_args < 6) - { - if (!no_rtl) - { - emit_move_insn (gen_rtx_REG (DImode, 1), virtual_incoming_args_rtx); - emit_insn (gen_arg_home ()); - } - *pretend_size = 7 * UNITS_PER_WORD; - } -#else - /* On OSF/1 and friends, we allocate space for all 12 arg registers, but - only push those that are remaining. However, if NO registers need to - be saved, don't allocate any space. This is not only because we won't - need the space, but because AP includes the current_pretend_args_size - and we don't want to mess up any ap-relative addresses already made. - - If we are not to use the floating-point registers, save the integer - registers where we would put the floating-point registers. This is - not the most efficient way to implement varargs with just one register - class, but it isn't worth doing anything more efficient in this rare - case. */ - CUMULATIVE_ARGS cum = *pcum; - - if (cum >= 6) - return; - - if (!no_rtl) - { - int set = get_varargs_alias_set (); - rtx tmp; - - tmp = gen_rtx_MEM (BLKmode, - plus_constant (virtual_incoming_args_rtx, - (cum + 6) * UNITS_PER_WORD)); - set_mem_alias_set (tmp, set); - move_block_from_reg (16 + cum, tmp, 6 - cum); - - tmp = gen_rtx_MEM (BLKmode, - plus_constant (virtual_incoming_args_rtx, - cum * UNITS_PER_WORD)); - set_mem_alias_set (tmp, set); - move_block_from_reg (16 + (TARGET_FPREGS ? 32 : 0) + cum, tmp, - 6 - cum); - } - *pretend_size = 12 * UNITS_PER_WORD; -#endif -} - -void -alpha_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) -{ - HOST_WIDE_INT offset; - tree t, offset_field, base_field; - - if (TREE_CODE (TREE_TYPE (valist)) == ERROR_MARK) - return; - - if (TARGET_ABI_UNICOSMK) - std_expand_builtin_va_start (valist, nextarg); - - /* For Unix, SETUP_INCOMING_VARARGS moves the starting address base - up by 48, storing fp arg registers in the first 48 bytes, and the - integer arg registers in the next 48 bytes. This is only done, - however, if any integer registers need to be stored. - - If no integer registers need be stored, then we must subtract 48 - in order to account for the integer arg registers which are counted - in argsize above, but which are not actually stored on the stack. - Must further be careful here about structures straddling the last - integer argument register; that futzes with pretend_args_size, - which changes the meaning of AP. */ - - if (NUM_ARGS <= 6) - offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD; - else - offset = -6 * UNITS_PER_WORD + current_function_pretend_args_size; - - if (TARGET_ABI_OPEN_VMS) - { - nextarg = plus_constant (nextarg, offset); - nextarg = plus_constant (nextarg, NUM_ARGS * UNITS_PER_WORD); - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, - make_tree (ptr_type_node, nextarg)); - TREE_SIDE_EFFECTS (t) = 1; - - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - } - else - { - base_field = TYPE_FIELDS (TREE_TYPE (valist)); - offset_field = TREE_CHAIN (base_field); - - base_field = build (COMPONENT_REF, TREE_TYPE (base_field), - valist, base_field); - offset_field = build (COMPONENT_REF, TREE_TYPE (offset_field), - valist, offset_field); - - t = make_tree (ptr_type_node, virtual_incoming_args_rtx); - t = build (PLUS_EXPR, ptr_type_node, t, build_int_2 (offset, 0)); - t = build (MODIFY_EXPR, TREE_TYPE (base_field), base_field, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - t = build_int_2 (NUM_ARGS * UNITS_PER_WORD, 0); - t = build (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - } -} - -rtx -alpha_va_arg (tree valist, tree type) -{ - rtx addr; - tree t, type_size, rounded_size; - tree offset_field, base_field, addr_tree, addend; - tree wide_type, wide_ofs; - int indirect = 0; - - if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK) - return std_expand_builtin_va_arg (valist, type); - - if (type == error_mark_node - || (type_size = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type))) == NULL - || TREE_OVERFLOW (type_size)) - rounded_size = size_zero_node; - else - rounded_size = fold (build (MULT_EXPR, sizetype, - fold (build (TRUNC_DIV_EXPR, sizetype, - fold (build (PLUS_EXPR, sizetype, - type_size, - size_int (7))), - size_int (8))), - size_int (8))); - - base_field = TYPE_FIELDS (TREE_TYPE (valist)); - offset_field = TREE_CHAIN (base_field); - - base_field = build (COMPONENT_REF, TREE_TYPE (base_field), - valist, base_field); - offset_field = build (COMPONENT_REF, TREE_TYPE (offset_field), - valist, offset_field); - - /* If the type could not be passed in registers, skip the block - reserved for the registers. */ - if (MUST_PASS_IN_STACK (TYPE_MODE (type), type)) - { - t = build (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field, - build (MAX_EXPR, TREE_TYPE (offset_field), - offset_field, build_int_2 (6*8, 0))); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - } - - wide_type = make_signed_type (64); - wide_ofs = save_expr (build1 (CONVERT_EXPR, wide_type, offset_field)); - - addend = wide_ofs; - - if (TYPE_MODE (type) == TFmode || TYPE_MODE (type) == TCmode) - { - indirect = 1; - rounded_size = size_int (UNITS_PER_WORD); - } - else if (TREE_CODE (type) == COMPLEX_TYPE) - { - rtx real_part, imag_part, value, tmp; - - real_part = alpha_va_arg (valist, TREE_TYPE (type)); - imag_part = alpha_va_arg (valist, TREE_TYPE (type)); - - /* ??? Most irritatingly, we're not returning the value here, - but the address. Since real_part and imag_part are not - necessarily contiguous, we must copy to local storage. */ - - real_part = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (type)), real_part); - imag_part = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (type)), imag_part); - value = gen_rtx_CONCAT (TYPE_MODE (type), real_part, imag_part); - - tmp = assign_temp (type, 0, 1, 0); - emit_move_insn (tmp, value); - - return XEXP (tmp, 0); - } - else if (TREE_CODE (type) == REAL_TYPE) - { - tree fpaddend, cond; - - fpaddend = fold (build (PLUS_EXPR, TREE_TYPE (addend), - addend, build_int_2 (-6*8, 0))); - - cond = fold (build (LT_EXPR, integer_type_node, - wide_ofs, build_int_2 (6*8, 0))); - - addend = fold (build (COND_EXPR, TREE_TYPE (addend), cond, - fpaddend, addend)); - } - - addr_tree = build (PLUS_EXPR, TREE_TYPE (base_field), - base_field, addend); - - addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL); - addr = copy_to_reg (addr); - - t = build (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field, - build (PLUS_EXPR, TREE_TYPE (offset_field), - offset_field, rounded_size)); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - if (indirect) - { - addr = force_reg (Pmode, addr); - addr = gen_rtx_MEM (Pmode, addr); - } - - 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 (void) -{ - 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 (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. */ - -/* Compute the size of the save area in the stack. */ - -/* These variables are used for communication between the following functions. - They indicate various things about the current function being compiled - that are used to tell what kind of prologue, epilogue and procedure - descriptor to generate. */ - -/* Nonzero if we need a stack procedure. */ -enum alpha_procedure_types {PT_NULL = 0, PT_REGISTER = 1, PT_STACK = 2}; -static enum alpha_procedure_types alpha_procedure_type; - -/* Register number (either FP or SP) that is used to unwind the frame. */ -static int vms_unwind_regno; - -/* Register number used to save FP. We need not have one for RA since - we don't modify it for register procedures. This is only defined - for register frame procedures. */ -static int vms_save_fp_regno; - -/* Register number used to reference objects off our PV. */ -static int vms_base_regno; - -/* Compute register masks for saved registers. */ - -static void -alpha_sa_mask (unsigned long *imaskP, unsigned long *fmaskP) -{ - unsigned long imask = 0; - unsigned long fmask = 0; - unsigned int i; - - /* When outputting a thunk, we don't have valid register life info, - but assemble_start_function wants to output .frame and .mask - directives. */ - if (current_function_is_thunk) - { - *imaskP = 0; - *fmaskP = 0; - return; - } - - if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_STACK) - imask |= (1UL << HARD_FRAME_POINTER_REGNUM); - - /* One for every register we have to save. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (! fixed_regs[i] && ! call_used_regs[i] - && regs_ever_live[i] && i != REG_RA - && (!TARGET_ABI_UNICOSMK || i != HARD_FRAME_POINTER_REGNUM)) - { - if (i < 32) - imask |= (1UL << i); - else - fmask |= (1UL << (i - 32)); - } - - /* We need to restore these for the handler. */ - if (current_function_calls_eh_return) - { - for (i = 0; ; ++i) - { - unsigned regno = EH_RETURN_DATA_REGNO (i); - if (regno == INVALID_REGNUM) - break; - imask |= 1UL << regno; - } - } - - /* If any register spilled, then spill the return address also. */ - /* ??? This is required by the Digital stack unwind specification - and isn't needed if we're doing Dwarf2 unwinding. */ - if (imask || fmask || alpha_ra_ever_killed ()) - imask |= (1UL << REG_RA); - - *imaskP = imask; - *fmaskP = fmask; -} - -int -alpha_sa_size (void) -{ - unsigned long mask[2]; - int sa_size = 0; - int i, j; - - alpha_sa_mask (&mask[0], &mask[1]); - - if (TARGET_ABI_UNICOSMK) - { - if (mask[0] || mask[1]) - sa_size = 14; - } - else - { - for (j = 0; j < 2; ++j) - for (i = 0; i < 32; ++i) - if ((mask[j] >> i) & 1) - sa_size++; - } - - if (TARGET_ABI_UNICOSMK) - { - /* We might not need to generate a frame if we don't make any calls - (including calls to __T3E_MISMATCH if this is a vararg function), - don't have any local variables which require stack slots, don't - use alloca and have not determined that we need a frame for other - reasons. */ - - alpha_procedure_type - = (sa_size || get_frame_size() != 0 - || current_function_outgoing_args_size - || current_function_stdarg || current_function_calls_alloca - || frame_pointer_needed) - ? PT_STACK : PT_REGISTER; - - /* Always reserve space for saving callee-saved registers if we - need a frame as required by the calling convention. */ - if (alpha_procedure_type == PT_STACK) - sa_size = 14; - } - else if (TARGET_ABI_OPEN_VMS) - { - /* Start by assuming we can use a register procedure if we don't - make any calls (REG_RA not used) or need to save any - registers and a stack procedure if we do. */ - if ((mask[0] >> REG_RA) & 1) - alpha_procedure_type = PT_STACK; - else if (get_frame_size() != 0) - alpha_procedure_type = PT_REGISTER; - else - alpha_procedure_type = PT_NULL; - - /* Don't reserve space for saving FP & RA yet. Do that later after we've - made the final decision on stack procedure vs register procedure. */ - if (alpha_procedure_type == PT_STACK) - sa_size -= 2; - - /* Decide whether to refer to objects off our PV via FP or PV. - If we need FP for something else or if we receive a nonlocal - goto (which expects PV to contain the value), we must use PV. - Otherwise, start by assuming we can use FP. */ - - vms_base_regno - = (frame_pointer_needed - || current_function_has_nonlocal_label - || alpha_procedure_type == PT_STACK - || current_function_outgoing_args_size) - ? REG_PV : HARD_FRAME_POINTER_REGNUM; - - /* If we want to copy PV into FP, we need to find some register - in which to save FP. */ - - vms_save_fp_regno = -1; - if (vms_base_regno == HARD_FRAME_POINTER_REGNUM) - for (i = 0; i < 32; i++) - if (! fixed_regs[i] && call_used_regs[i] && ! regs_ever_live[i]) - vms_save_fp_regno = i; - - if (vms_save_fp_regno == -1 && alpha_procedure_type == PT_REGISTER) - vms_base_regno = REG_PV, alpha_procedure_type = PT_STACK; - else if (alpha_procedure_type == PT_NULL) - vms_base_regno = REG_PV; - - /* Stack unwinding should be done via FP unless we use it for PV. */ - vms_unwind_regno = (vms_base_regno == REG_PV - ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM); - - /* If this is a stack procedure, allow space for saving FP and RA. */ - if (alpha_procedure_type == PT_STACK) - sa_size += 2; - } - else - { - /* Our size must be even (multiple of 16 bytes). */ - if (sa_size & 1) - sa_size++; - } - - return sa_size * 8; -} - -/* Define the offset between two registers, one to be eliminated, - and the other its replacement, at the start of a routine. */ - -HOST_WIDE_INT -alpha_initial_elimination_offset (unsigned int from, - unsigned int to ATTRIBUTE_UNUSED) -{ - HOST_WIDE_INT ret; - - ret = alpha_sa_size (); - ret += ALPHA_ROUND (current_function_outgoing_args_size); - - if (from == FRAME_POINTER_REGNUM) - ; - else if (from == ARG_POINTER_REGNUM) - ret += (ALPHA_ROUND (get_frame_size () - + current_function_pretend_args_size) - - current_function_pretend_args_size); - else - abort (); - - return ret; -} - -int -alpha_pv_save_size (void) -{ - alpha_sa_size (); - return alpha_procedure_type == PT_STACK ? 8 : 0; -} - -int -alpha_using_fp (void) -{ - alpha_sa_size (); - return vms_unwind_regno == HARD_FRAME_POINTER_REGNUM; -} - -#if TARGET_ABI_OPEN_VMS - -const struct attribute_spec vms_attribute_table[] = -{ - /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ - { "overlaid", 0, 0, true, false, false, NULL }, - { "global", 0, 0, true, false, false, NULL }, - { "initialize", 0, 0, true, false, false, NULL }, - { NULL, 0, 0, false, false, false, NULL } -}; - -#endif - -static int -find_lo_sum_using_gp (rtx *px, void *data ATTRIBUTE_UNUSED) -{ - return GET_CODE (*px) == LO_SUM && XEXP (*px, 0) == pic_offset_table_rtx; -} - -int -alpha_find_lo_sum_using_gp (rtx insn) -{ - return for_each_rtx (&PATTERN (insn), find_lo_sum_using_gp, NULL) > 0; -} - -static int -alpha_does_function_need_gp (void) -{ - rtx insn; - - /* The GP being variable is an OSF abi thing. */ - if (! TARGET_ABI_OSF) - return 0; - - /* We need the gp to load the address of __mcount. */ - if (TARGET_PROFILING_NEEDS_GP && current_function_profile) - return 1; - - /* The code emitted by alpha_output_mi_thunk_osf uses the gp. */ - if (current_function_is_thunk) - return 1; - - /* The nonlocal receiver pattern assumes that the gp is valid for - the nested function. Reasonable because it's almost always set - correctly already. For the cases where that's wrong, make sure - the nested function loads its gp on entry. */ - if (current_function_has_nonlocal_goto) - return 1; - - /* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first. - Even if we are a static function, we still need to do this in case - our address is taken and passed to something like qsort. */ - - push_topmost_sequence (); - insn = get_insns (); - pop_topmost_sequence (); - - for (; insn; insn = NEXT_INSN (insn)) - if (INSN_P (insn) - && GET_CODE (PATTERN (insn)) != USE - && GET_CODE (PATTERN (insn)) != CLOBBER - && get_attr_usegp (insn)) - return 1; - - return 0; -} - - -/* Helper function to set RTX_FRAME_RELATED_P on instructions, including - sequences. */ - -static rtx -set_frame_related_p (void) -{ - rtx seq = get_insns (); - rtx insn; - - end_sequence (); - - if (!seq) - return NULL_RTX; - - if (INSN_P (seq)) - { - insn = seq; - while (insn != NULL_RTX) - { - RTX_FRAME_RELATED_P (insn) = 1; - insn = NEXT_INSN (insn); - } - seq = emit_insn (seq); - } - else - { - seq = emit_insn (seq); - RTX_FRAME_RELATED_P (seq) = 1; - } - return seq; -} - -#define FRP(exp) (start_sequence (), exp, set_frame_related_p ()) - -/* Generates a store with the proper unwind info attached. VALUE is - stored at BASE_REG+BASE_OFS. If FRAME_BIAS is non-zero, then BASE_REG - contains SP+FRAME_BIAS, and that is the unwind info that should be - generated. If FRAME_REG != VALUE, then VALUE is being stored on - behalf of FRAME_REG, and FRAME_REG should be present in the unwind. */ - -static void -emit_frame_store_1 (rtx value, rtx base_reg, HOST_WIDE_INT frame_bias, - HOST_WIDE_INT base_ofs, rtx frame_reg) -{ - rtx addr, mem, insn; - - addr = plus_constant (base_reg, base_ofs); - mem = gen_rtx_MEM (DImode, addr); - set_mem_alias_set (mem, alpha_sr_alias_set); - - insn = emit_move_insn (mem, value); - RTX_FRAME_RELATED_P (insn) = 1; - - if (frame_bias || value != frame_reg) - { - if (frame_bias) - { - addr = plus_constant (stack_pointer_rtx, frame_bias + base_ofs); - mem = gen_rtx_MEM (DImode, addr); - } - - REG_NOTES (insn) - = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, - gen_rtx_SET (VOIDmode, mem, frame_reg), - REG_NOTES (insn)); - } -} - -static void -emit_frame_store (unsigned int regno, rtx base_reg, - HOST_WIDE_INT frame_bias, HOST_WIDE_INT base_ofs) -{ - rtx reg = gen_rtx_REG (DImode, regno); - emit_frame_store_1 (reg, base_reg, frame_bias, base_ofs, reg); -} - -/* Write function prologue. */ - -/* On vms we have two kinds of functions: - - - stack frame (PROC_STACK) - these are 'normal' functions with local vars and which are - calling other functions - - register frame (PROC_REGISTER) - keeps all data in registers, needs no stack - - We must pass this to the assembler so it can generate the - proper pdsc (procedure descriptor) - This is done with the '.pdesc' command. - - On not-vms, we don't really differentiate between the two, as we can - simply allocate stack without saving registers. */ - -void -alpha_expand_prologue (void) -{ - /* Registers to save. */ - unsigned long imask = 0; - unsigned long fmask = 0; - /* Stack space needed for pushing registers clobbered by us. */ - HOST_WIDE_INT sa_size; - /* Complete stack size needed. */ - HOST_WIDE_INT frame_size; - /* Offset from base reg to register save area. */ - HOST_WIDE_INT reg_offset; - rtx sa_reg; - int i; - - sa_size = alpha_sa_size (); - - frame_size = get_frame_size (); - if (TARGET_ABI_OPEN_VMS) - frame_size = ALPHA_ROUND (sa_size - + (alpha_procedure_type == PT_STACK ? 8 : 0) - + frame_size - + current_function_pretend_args_size); - else if (TARGET_ABI_UNICOSMK) - /* We have to allocate space for the DSIB if we generate a frame. */ - frame_size = ALPHA_ROUND (sa_size - + (alpha_procedure_type == PT_STACK ? 48 : 0)) - + ALPHA_ROUND (frame_size - + current_function_outgoing_args_size); - else - frame_size = (ALPHA_ROUND (current_function_outgoing_args_size) - + sa_size - + ALPHA_ROUND (frame_size - + current_function_pretend_args_size)); - - if (TARGET_ABI_OPEN_VMS) - reg_offset = 8; - else - reg_offset = ALPHA_ROUND (current_function_outgoing_args_size); - - alpha_sa_mask (&imask, &fmask); - - /* Emit an insn to reload GP, if needed. */ - if (TARGET_ABI_OSF) - { - alpha_function_needs_gp = alpha_does_function_need_gp (); - if (alpha_function_needs_gp) - emit_insn (gen_prologue_ldgp ()); - } - - /* TARGET_PROFILING_NEEDS_GP actually implies that we need to insert - the call to mcount ourselves, rather than having the linker do it - magically in response to -pg. Since _mcount has special linkage, - don't represent the call as a call. */ - if (TARGET_PROFILING_NEEDS_GP && current_function_profile) - emit_insn (gen_prologue_mcount ()); - - if (TARGET_ABI_UNICOSMK) - unicosmk_gen_dsib (&imask); - - /* Adjust the stack by the frame size. If the frame size is > 4096 - bytes, we need to be sure we probe somewhere in the first and last - 4096 bytes (we can probably get away without the latter test) and - every 8192 bytes in between. If the frame size is > 32768, we - do this in a loop. Otherwise, we generate the explicit probe - instructions. - - Note that we are only allowed to adjust sp once in the prologue. */ - - if (frame_size <= 32768) - { - if (frame_size > 4096) - { - int probed = 4096; - - do - emit_insn (gen_probe_stack (GEN_INT (TARGET_ABI_UNICOSMK - ? -probed + 64 - : -probed))); - while ((probed += 8192) < frame_size); - - /* We only have to do this probe if we aren't saving registers. */ - if (sa_size == 0 && probed + 4096 < frame_size) - emit_insn (gen_probe_stack (GEN_INT (-frame_size))); - } - - if (frame_size != 0) - FRP (emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx, - GEN_INT (TARGET_ABI_UNICOSMK - ? -frame_size + 64 - : -frame_size)))); - } - else - { - /* Here we generate code to set R22 to SP + 4096 and set R23 to the - number of 8192 byte blocks to probe. We then probe each block - in the loop and then set SP to the proper location. If the - amount remaining is > 4096, we have to do one more probe if we - are not saving any registers. */ - - HOST_WIDE_INT blocks = (frame_size + 4096) / 8192; - HOST_WIDE_INT leftover = frame_size + 4096 - blocks * 8192; - rtx ptr = gen_rtx_REG (DImode, 22); - rtx count = gen_rtx_REG (DImode, 23); - rtx seq; - - emit_move_insn (count, GEN_INT (blocks)); - emit_insn (gen_adddi3 (ptr, stack_pointer_rtx, - GEN_INT (TARGET_ABI_UNICOSMK ? 4096 - 64 : 4096))); - - /* Because of the difficulty in emitting a new basic block this - late in the compilation, generate the loop as a single insn. */ - emit_insn (gen_prologue_stack_probe_loop (count, ptr)); - - if (leftover > 4096 && sa_size == 0) - { - rtx last = gen_rtx_MEM (DImode, plus_constant (ptr, -leftover)); - MEM_VOLATILE_P (last) = 1; - emit_move_insn (last, const0_rtx); - } - - if (TARGET_ABI_WINDOWS_NT) - { - /* For NT stack unwind (done by 'reverse execution'), it's - not OK to take the result of a loop, even though the value - is already in ptr, so we reload it via a single operation - and subtract it to sp. - - Yes, that's correct -- we have to reload the whole constant - into a temporary via ldah+lda then subtract from sp. */ - - HOST_WIDE_INT lo, hi; - lo = ((frame_size & 0xffff) ^ 0x8000) - 0x8000; - hi = frame_size - lo; - - emit_move_insn (ptr, GEN_INT (hi)); - emit_insn (gen_adddi3 (ptr, ptr, GEN_INT (lo))); - seq = emit_insn (gen_subdi3 (stack_pointer_rtx, stack_pointer_rtx, - ptr)); - } - else - { - seq = emit_insn (gen_adddi3 (stack_pointer_rtx, ptr, - GEN_INT (-leftover))); - } - - /* This alternative is special, because the DWARF code cannot - possibly intuit through the loop above. So we invent this - note it looks at instead. */ - RTX_FRAME_RELATED_P (seq) = 1; - REG_NOTES (seq) - = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, - gen_rtx_SET (VOIDmode, stack_pointer_rtx, - gen_rtx_PLUS (Pmode, stack_pointer_rtx, - GEN_INT (TARGET_ABI_UNICOSMK - ? -frame_size + 64 - : -frame_size))), - REG_NOTES (seq)); - } - - if (!TARGET_ABI_UNICOSMK) - { - HOST_WIDE_INT sa_bias = 0; - - /* Cope with very large offsets to the register save area. */ - sa_reg = stack_pointer_rtx; - if (reg_offset + sa_size > 0x8000) - { - int low = ((reg_offset & 0xffff) ^ 0x8000) - 0x8000; - rtx sa_bias_rtx; - - if (low + sa_size <= 0x8000) - sa_bias = reg_offset - low, reg_offset = low; - else - sa_bias = reg_offset, reg_offset = 0; - - sa_reg = gen_rtx_REG (DImode, 24); - sa_bias_rtx = GEN_INT (sa_bias); - - if (add_operand (sa_bias_rtx, DImode)) - emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_bias_rtx)); - else - { - emit_move_insn (sa_reg, sa_bias_rtx); - emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_reg)); - } - } - - /* Save regs in stack order. Beginning with VMS PV. */ - if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_STACK) - emit_frame_store (REG_PV, stack_pointer_rtx, 0, 0); - - /* Save register RA next. */ - if (imask & (1UL << REG_RA)) - { - emit_frame_store (REG_RA, sa_reg, sa_bias, reg_offset); - imask &= ~(1UL << REG_RA); - reg_offset += 8; - } - - /* Now save any other registers required to be saved. */ - for (i = 0; i < 31; i++) - if (imask & (1UL << i)) - { - emit_frame_store (i, sa_reg, sa_bias, reg_offset); - reg_offset += 8; - } - - for (i = 0; i < 31; i++) - if (fmask & (1UL << i)) - { - emit_frame_store (i+32, sa_reg, sa_bias, reg_offset); - reg_offset += 8; - } - } - else if (TARGET_ABI_UNICOSMK && alpha_procedure_type == PT_STACK) - { - /* The standard frame on the T3E includes space for saving registers. - We just have to use it. We don't have to save the return address and - the old frame pointer here - they are saved in the DSIB. */ - - reg_offset = -56; - for (i = 9; i < 15; i++) - if (imask & (1UL << i)) - { - emit_frame_store (i, hard_frame_pointer_rtx, 0, reg_offset); - reg_offset -= 8; - } - for (i = 2; i < 10; i++) - if (fmask & (1UL << i)) - { - emit_frame_store (i+32, hard_frame_pointer_rtx, 0, reg_offset); - reg_offset -= 8; - } - } - - if (TARGET_ABI_OPEN_VMS) - { - if (alpha_procedure_type == PT_REGISTER) - /* Register frame procedures save the fp. - ?? Ought to have a dwarf2 save for this. */ - emit_move_insn (gen_rtx_REG (DImode, vms_save_fp_regno), - hard_frame_pointer_rtx); - - if (alpha_procedure_type != PT_NULL && vms_base_regno != REG_PV) - emit_insn (gen_force_movdi (gen_rtx_REG (DImode, vms_base_regno), - gen_rtx_REG (DImode, REG_PV))); - - if (alpha_procedure_type != PT_NULL - && vms_unwind_regno == HARD_FRAME_POINTER_REGNUM) - FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx)); - - /* If we have to allocate space for outgoing args, do it now. */ - if (current_function_outgoing_args_size != 0) - { - rtx seq - = emit_move_insn (stack_pointer_rtx, - plus_constant - (hard_frame_pointer_rtx, - - (ALPHA_ROUND - (current_function_outgoing_args_size)))); - - /* Only set FRAME_RELATED_P on the stack adjustment we just emitted - if ! frame_pointer_needed. Setting the bit will change the CFA - computation rule to use sp again, which would be wrong if we had - frame_pointer_needed, as this means sp might move unpredictably - later on. - - Also, note that - frame_pointer_needed - => vms_unwind_regno == HARD_FRAME_POINTER_REGNUM - and - current_function_outgoing_args_size != 0 - => alpha_procedure_type != PT_NULL, - - so when we are not setting the bit here, we are guaranteed to - have emitted an FRP frame pointer update just before. */ - RTX_FRAME_RELATED_P (seq) = ! frame_pointer_needed; - } - } - else if (!TARGET_ABI_UNICOSMK) - { - /* If we need a frame pointer, set it from the stack pointer. */ - if (frame_pointer_needed) - { - if (TARGET_CAN_FAULT_IN_PROLOGUE) - FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx)); - else - /* This must always be the last instruction in the - prologue, thus we emit a special move + clobber. */ - FRP (emit_insn (gen_init_fp (hard_frame_pointer_rtx, - stack_pointer_rtx, sa_reg))); - } - } - - /* The ABIs for VMS and OSF/1 say that while we can schedule insns into - the prologue, for exception handling reasons, we cannot do this for - any insn that might fault. We could prevent this for mems with a - (clobber:BLK (scratch)), but this doesn't work for fp insns. So we - have to prevent all such scheduling with a blockage. - - Linux, on the other hand, never bothered to implement OSF/1's - exception handling, and so doesn't care about such things. Anyone - planning to use dwarf2 frame-unwind info can also omit the blockage. */ - - if (! TARGET_CAN_FAULT_IN_PROLOGUE) - emit_insn (gen_blockage ()); -} - -/* Output the textual info surrounding the prologue. */ - -void -alpha_start_function (FILE *file, const char *fnname, - tree decl ATTRIBUTE_UNUSED) -{ - unsigned long imask = 0; - unsigned long fmask = 0; - /* Stack space needed for pushing registers clobbered by us. */ - HOST_WIDE_INT sa_size; - /* Complete stack size needed. */ - unsigned HOST_WIDE_INT frame_size; - /* Offset from base reg to register save area. */ - HOST_WIDE_INT reg_offset; - char *entry_label = (char *) alloca (strlen (fnname) + 6); - int i; - - /* Don't emit an extern directive for functions defined in the same file. */ - if (TARGET_ABI_UNICOSMK) - { - tree name_tree; - name_tree = get_identifier (fnname); - TREE_ASM_WRITTEN (name_tree) = 1; - } - - alpha_fnname = fnname; - sa_size = alpha_sa_size (); - - frame_size = get_frame_size (); - if (TARGET_ABI_OPEN_VMS) - frame_size = ALPHA_ROUND (sa_size - + (alpha_procedure_type == PT_STACK ? 8 : 0) - + frame_size - + current_function_pretend_args_size); - else if (TARGET_ABI_UNICOSMK) - frame_size = ALPHA_ROUND (sa_size - + (alpha_procedure_type == PT_STACK ? 48 : 0)) - + ALPHA_ROUND (frame_size - + current_function_outgoing_args_size); - else - frame_size = (ALPHA_ROUND (current_function_outgoing_args_size) - + sa_size - + ALPHA_ROUND (frame_size - + current_function_pretend_args_size)); - - if (TARGET_ABI_OPEN_VMS) - reg_offset = 8; - else - reg_offset = ALPHA_ROUND (current_function_outgoing_args_size); - - alpha_sa_mask (&imask, &fmask); - - /* Ecoff can handle multiple .file directives, so put out file and lineno. - We have to do that before the .ent directive as we cannot switch - files within procedures with native ecoff because line numbers are - linked to procedure descriptors. - Outputting the lineno helps debugging of one line functions as they - would otherwise get no line number at all. Please note that we would - like to put out last_linenum from final.c, but it is not accessible. */ - - if (write_symbols == SDB_DEBUG) - { -#ifdef ASM_OUTPUT_SOURCE_FILENAME - ASM_OUTPUT_SOURCE_FILENAME (file, - DECL_SOURCE_FILE (current_function_decl)); -#endif -#ifdef ASM_OUTPUT_SOURCE_LINE - if (debug_info_level != DINFO_LEVEL_TERSE) - ASM_OUTPUT_SOURCE_LINE (file, - DECL_SOURCE_LINE (current_function_decl), 0); -#endif - } - - /* Issue function start and label. */ - if (TARGET_ABI_OPEN_VMS - || (!TARGET_ABI_UNICOSMK && !flag_inhibit_size_directive)) - { - fputs ("\t.ent ", file); - assemble_name (file, fnname); - putc ('\n', file); - - /* If the function needs GP, we'll write the "..ng" label there. - Otherwise, do it here. */ - if (TARGET_ABI_OSF - && ! alpha_function_needs_gp - && ! current_function_is_thunk) - { - putc ('$', file); - assemble_name (file, fnname); - fputs ("..ng:\n", file); - } - } - - strcpy (entry_label, fnname); - if (TARGET_ABI_OPEN_VMS) - strcat (entry_label, "..en"); - - /* For public functions, the label must be globalized by appending an - additional colon. */ - if (TARGET_ABI_UNICOSMK && TREE_PUBLIC (decl)) - strcat (entry_label, ":"); - - ASM_OUTPUT_LABEL (file, entry_label); - inside_function = TRUE; - - if (TARGET_ABI_OPEN_VMS) - fprintf (file, "\t.base $%d\n", vms_base_regno); - - if (!TARGET_ABI_OPEN_VMS && !TARGET_ABI_UNICOSMK && TARGET_IEEE_CONFORMANT - && !flag_inhibit_size_directive) - { - /* Set flags in procedure descriptor to request IEEE-conformant - math-library routines. The value we set it to is PDSC_EXC_IEEE - (/usr/include/pdsc.h). */ - fputs ("\t.eflag 48\n", file); - } - - /* Set up offsets to alpha virtual arg/local debugging pointer. */ - alpha_auto_offset = -frame_size + current_function_pretend_args_size; - alpha_arg_offset = -frame_size + 48; - - /* Describe our frame. If the frame size is larger than an integer, - print it as zero to avoid an assembler error. We won't be - properly describing such a frame, but that's the best we can do. */ - if (TARGET_ABI_UNICOSMK) - ; - else if (TARGET_ABI_OPEN_VMS) - fprintf (file, "\t.frame $%d," HOST_WIDE_INT_PRINT_DEC ",$26," - HOST_WIDE_INT_PRINT_DEC "\n", - vms_unwind_regno, - frame_size >= (1UL << 31) ? 0 : frame_size, - reg_offset); - else if (!flag_inhibit_size_directive) - fprintf (file, "\t.frame $%d," HOST_WIDE_INT_PRINT_DEC ",$26,%d\n", - (frame_pointer_needed - ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM), - frame_size >= (1UL << 31) ? 0 : frame_size, - current_function_pretend_args_size); - - /* Describe which registers were spilled. */ - if (TARGET_ABI_UNICOSMK) - ; - else if (TARGET_ABI_OPEN_VMS) - { - if (imask) - /* ??? Does VMS care if mask contains ra? The old code didn't - set it, so I don't here. */ - fprintf (file, "\t.mask 0x%lx,0\n", imask & ~(1UL << REG_RA)); - if (fmask) - fprintf (file, "\t.fmask 0x%lx,0\n", fmask); - if (alpha_procedure_type == PT_REGISTER) - fprintf (file, "\t.fp_save $%d\n", vms_save_fp_regno); - } - else if (!flag_inhibit_size_directive) - { - if (imask) - { - fprintf (file, "\t.mask 0x%lx," HOST_WIDE_INT_PRINT_DEC "\n", imask, - frame_size >= (1UL << 31) ? 0 : reg_offset - frame_size); - - for (i = 0; i < 32; ++i) - if (imask & (1UL << i)) - reg_offset += 8; - } - - if (fmask) - fprintf (file, "\t.fmask 0x%lx," HOST_WIDE_INT_PRINT_DEC "\n", fmask, - frame_size >= (1UL << 31) ? 0 : reg_offset - frame_size); - } - -#if TARGET_ABI_OPEN_VMS - /* Ifdef'ed cause link_section are only available then. */ - readonly_data_section (); - fprintf (file, "\t.align 3\n"); - assemble_name (file, fnname); fputs ("..na:\n", file); - fputs ("\t.ascii \"", file); - assemble_name (file, fnname); - fputs ("\\0\"\n", file); - alpha_need_linkage (fnname, 1); - text_section (); -#endif -} - -/* Emit the .prologue note at the scheduled end of the prologue. */ - -static void -alpha_output_function_end_prologue (FILE *file) -{ - if (TARGET_ABI_UNICOSMK) - ; - else if (TARGET_ABI_OPEN_VMS) - fputs ("\t.prologue\n", file); - else if (TARGET_ABI_WINDOWS_NT) - fputs ("\t.prologue 0\n", file); - else if (!flag_inhibit_size_directive) - fprintf (file, "\t.prologue %d\n", - alpha_function_needs_gp || current_function_is_thunk); -} - -/* Write function epilogue. */ - -/* ??? At some point we will want to support full unwind, and so will - need to mark the epilogue as well. At the moment, we just confuse - dwarf2out. */ -#undef FRP -#define FRP(exp) exp - -void -alpha_expand_epilogue (void) -{ - /* Registers to save. */ - unsigned long imask = 0; - unsigned long fmask = 0; - /* Stack space needed for pushing registers clobbered by us. */ - HOST_WIDE_INT sa_size; - /* Complete stack size needed. */ - HOST_WIDE_INT frame_size; - /* Offset from base reg to register save area. */ - HOST_WIDE_INT reg_offset; - int fp_is_frame_pointer, fp_offset; - rtx sa_reg, sa_reg_exp = NULL; - rtx sp_adj1, sp_adj2, mem; - rtx eh_ofs; - int i; - - sa_size = alpha_sa_size (); - - frame_size = get_frame_size (); - if (TARGET_ABI_OPEN_VMS) - frame_size = ALPHA_ROUND (sa_size - + (alpha_procedure_type == PT_STACK ? 8 : 0) - + frame_size - + current_function_pretend_args_size); - else if (TARGET_ABI_UNICOSMK) - frame_size = ALPHA_ROUND (sa_size - + (alpha_procedure_type == PT_STACK ? 48 : 0)) - + ALPHA_ROUND (frame_size - + current_function_outgoing_args_size); - else - frame_size = (ALPHA_ROUND (current_function_outgoing_args_size) - + sa_size - + ALPHA_ROUND (frame_size - + current_function_pretend_args_size)); - - if (TARGET_ABI_OPEN_VMS) - { - if (alpha_procedure_type == PT_STACK) - reg_offset = 8; - else - reg_offset = 0; - } - else - reg_offset = ALPHA_ROUND (current_function_outgoing_args_size); - - alpha_sa_mask (&imask, &fmask); - - fp_is_frame_pointer - = ((TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_STACK) - || (!TARGET_ABI_OPEN_VMS && frame_pointer_needed)); - fp_offset = 0; - sa_reg = stack_pointer_rtx; - - if (current_function_calls_eh_return) - eh_ofs = EH_RETURN_STACKADJ_RTX; - else - eh_ofs = NULL_RTX; - - if (!TARGET_ABI_UNICOSMK && sa_size) - { - /* If we have a frame pointer, restore SP from it. */ - if ((TARGET_ABI_OPEN_VMS - && vms_unwind_regno == HARD_FRAME_POINTER_REGNUM) - || (!TARGET_ABI_OPEN_VMS && frame_pointer_needed)) - FRP (emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx)); - - /* Cope with very large offsets to the register save area. */ - if (reg_offset + sa_size > 0x8000) - { - int low = ((reg_offset & 0xffff) ^ 0x8000) - 0x8000; - HOST_WIDE_INT bias; - - if (low + sa_size <= 0x8000) - bias = reg_offset - low, reg_offset = low; - else - bias = reg_offset, reg_offset = 0; - - sa_reg = gen_rtx_REG (DImode, 22); - sa_reg_exp = plus_constant (stack_pointer_rtx, bias); - - FRP (emit_move_insn (sa_reg, sa_reg_exp)); - } - - /* Restore registers in order, excepting a true frame pointer. */ - - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset)); - if (! eh_ofs) - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (gen_rtx_REG (DImode, REG_RA), mem)); - - reg_offset += 8; - imask &= ~(1UL << REG_RA); - - for (i = 0; i < 31; ++i) - if (imask & (1UL << i)) - { - if (i == HARD_FRAME_POINTER_REGNUM && fp_is_frame_pointer) - fp_offset = reg_offset; - else - { - mem = gen_rtx_MEM (DImode, plus_constant(sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (gen_rtx_REG (DImode, i), mem)); - } - reg_offset += 8; - } - - for (i = 0; i < 31; ++i) - if (fmask & (1UL << i)) - { - mem = gen_rtx_MEM (DFmode, plus_constant(sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (gen_rtx_REG (DFmode, i+32), mem)); - reg_offset += 8; - } - } - else if (TARGET_ABI_UNICOSMK && alpha_procedure_type == PT_STACK) - { - /* Restore callee-saved general-purpose registers. */ - - reg_offset = -56; - - for (i = 9; i < 15; i++) - if (imask & (1UL << i)) - { - mem = gen_rtx_MEM (DImode, plus_constant(hard_frame_pointer_rtx, - reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (gen_rtx_REG (DImode, i), mem)); - reg_offset -= 8; - } - - for (i = 2; i < 10; i++) - if (fmask & (1UL << i)) - { - mem = gen_rtx_MEM (DFmode, plus_constant(hard_frame_pointer_rtx, - reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (gen_rtx_REG (DFmode, i+32), mem)); - reg_offset -= 8; - } - - /* Restore the return address from the DSIB. */ - - mem = gen_rtx_MEM (DImode, plus_constant(hard_frame_pointer_rtx, -8)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (gen_rtx_REG (DImode, REG_RA), mem)); - } - - if (frame_size || eh_ofs) - { - sp_adj1 = stack_pointer_rtx; - - if (eh_ofs) - { - sp_adj1 = gen_rtx_REG (DImode, 23); - emit_move_insn (sp_adj1, - gen_rtx_PLUS (Pmode, stack_pointer_rtx, eh_ofs)); - } - - /* If the stack size is large, begin computation into a temporary - register so as not to interfere with a potential fp restore, - which must be consecutive with an SP restore. */ - if (frame_size < 32768 - && ! (TARGET_ABI_UNICOSMK && current_function_calls_alloca)) - sp_adj2 = GEN_INT (frame_size); - else if (TARGET_ABI_UNICOSMK) - { - sp_adj1 = gen_rtx_REG (DImode, 23); - FRP (emit_move_insn (sp_adj1, hard_frame_pointer_rtx)); - sp_adj2 = const0_rtx; - } - else if (frame_size < 0x40007fffL) - { - int low = ((frame_size & 0xffff) ^ 0x8000) - 0x8000; - - sp_adj2 = plus_constant (sp_adj1, frame_size - low); - if (sa_reg_exp && rtx_equal_p (sa_reg_exp, sp_adj2)) - sp_adj1 = sa_reg; - else - { - sp_adj1 = gen_rtx_REG (DImode, 23); - FRP (emit_move_insn (sp_adj1, sp_adj2)); - } - sp_adj2 = GEN_INT (low); - } - else - { - rtx tmp = gen_rtx_REG (DImode, 23); - FRP (sp_adj2 = alpha_emit_set_const (tmp, DImode, frame_size, 3)); - if (!sp_adj2) - { - /* We can't drop new things to memory this late, afaik, - so build it up by pieces. */ - FRP (sp_adj2 = alpha_emit_set_long_const (tmp, frame_size, - -(frame_size < 0))); - if (!sp_adj2) - abort (); - } - } - - /* From now on, things must be in order. So emit blockages. */ - - /* Restore the frame pointer. */ - if (TARGET_ABI_UNICOSMK) - { - emit_insn (gen_blockage ()); - mem = gen_rtx_MEM (DImode, - plus_constant (hard_frame_pointer_rtx, -16)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (hard_frame_pointer_rtx, mem)); - } - else if (fp_is_frame_pointer) - { - emit_insn (gen_blockage ()); - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, fp_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (hard_frame_pointer_rtx, mem)); - } - else if (TARGET_ABI_OPEN_VMS) - { - emit_insn (gen_blockage ()); - FRP (emit_move_insn (hard_frame_pointer_rtx, - gen_rtx_REG (DImode, vms_save_fp_regno))); - } - - /* Restore the stack pointer. */ - emit_insn (gen_blockage ()); - if (sp_adj2 == const0_rtx) - FRP (emit_move_insn (stack_pointer_rtx, sp_adj1)); - else - FRP (emit_move_insn (stack_pointer_rtx, - gen_rtx_PLUS (DImode, sp_adj1, sp_adj2))); - } - else - { - if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_REGISTER) - { - emit_insn (gen_blockage ()); - FRP (emit_move_insn (hard_frame_pointer_rtx, - gen_rtx_REG (DImode, vms_save_fp_regno))); - } - else if (TARGET_ABI_UNICOSMK && alpha_procedure_type != PT_STACK) - { - /* Decrement the frame pointer if the function does not have a - frame. */ - - emit_insn (gen_blockage ()); - FRP (emit_insn (gen_adddi3 (hard_frame_pointer_rtx, - hard_frame_pointer_rtx, GEN_INT (-1)))); - } - } -} - -/* Output the rest of the textual info surrounding the epilogue. */ - -void -alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED) -{ - /* End the function. */ - if (!TARGET_ABI_UNICOSMK && !flag_inhibit_size_directive) - { - fputs ("\t.end ", file); - assemble_name (file, fnname); - putc ('\n', file); - } - inside_function = FALSE; - -#if TARGET_ABI_OPEN_VMS - alpha_write_linkage (file, fnname, decl); -#endif - - /* Output jump tables and the static subroutine information block. */ - if (TARGET_ABI_UNICOSMK) - { - unicosmk_output_ssib (file, fnname); - unicosmk_output_deferred_case_vectors (file); - } -} - -#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 - lots of code loading up large constants, generate rtl and emit it - instead of going straight to text. - - Not sure why this idea hasn't been explored before... */ - -static void -alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, - HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, - tree function) -{ - HOST_WIDE_INT hi, lo; - rtx this, insn, funexp; - - /* We always require a valid GP. */ - emit_insn (gen_prologue_ldgp ()); - emit_note (NOTE_INSN_PROLOGUE_END); - - /* Find the "this" pointer. If the function returns a structure, - the structure return pointer is in $16. */ - if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function)) - this = gen_rtx_REG (Pmode, 17); - else - this = gen_rtx_REG (Pmode, 16); - - /* Add DELTA. When possible we use ldah+lda. Otherwise load the - entire constant for the add. */ - lo = ((delta & 0xffff) ^ 0x8000) - 0x8000; - hi = (((delta - lo) & 0xffffffff) ^ 0x80000000) - 0x80000000; - if (hi + lo == delta) - { - if (hi) - emit_insn (gen_adddi3 (this, this, GEN_INT (hi))); - if (lo) - emit_insn (gen_adddi3 (this, this, GEN_INT (lo))); - } - else - { - rtx tmp = alpha_emit_set_long_const (gen_rtx_REG (Pmode, 0), - delta, -(delta < 0)); - 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)) - { - assemble_external (function); - TREE_USED (function) = 1; - } - funexp = XEXP (DECL_RTL (function), 0); - funexp = gen_rtx_MEM (FUNCTION_MODE, funexp); - insn = emit_call_insn (gen_sibcall (funexp, const0_rtx)); - SIBLING_CALL_P (insn) = 1; - - /* Run just enough of rest_of_compilation to get the insns emitted. - There's not really enough bulk here to make other passes such as - instruction scheduling worth while. Note that use_thunk calls - assemble_start_function and assemble_end_function. */ - insn = get_insns (); - insn_locators_initialize (); - shorten_branches (insn); - final_start_function (insn, file, 1); - final (insn, file, 1, 0); - final_end_function (); -} -#endif /* TARGET_ABI_OSF */ - -/* Debugging support. */ - -#include "gstab.h" - -/* Count the number of sdb related labels are generated (to find block - start and end boundaries). */ - -int sdb_label_count = 0; - -/* Next label # for each statement. */ - -static int sym_lineno = 0; - -/* Count the number of .file directives, so that .loc is up to date. */ - -static int num_source_filenames = 0; - -/* Name of the file containing the current function. */ - -static const char *current_function_file = ""; - -/* Offsets to alpha virtual arg/local debugging pointers. */ - -long alpha_arg_offset; -long alpha_auto_offset; - -/* Emit a new filename to a stream. */ - -void -alpha_output_filename (FILE *stream, const char *name) -{ - static int first_time = TRUE; - char ltext_label_name[100]; - - if (first_time) - { - first_time = FALSE; - ++num_source_filenames; - current_function_file = name; - fprintf (stream, "\t.file\t%d ", num_source_filenames); - output_quoted_string (stream, name); - fprintf (stream, "\n"); - if (!TARGET_GAS && write_symbols == DBX_DEBUG) - fprintf (stream, "\t#@stabs\n"); - } - - else if (write_symbols == DBX_DEBUG) - { - ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0); - fprintf (stream, "%s", ASM_STABS_OP); - output_quoted_string (stream, name); - fprintf (stream, ",%d,0,0,%s\n", N_SOL, <ext_label_name[1]); - } - - else if (name != current_function_file - && strcmp (name, current_function_file) != 0) - { - if (inside_function && ! TARGET_GAS) - fprintf (stream, "\t#.file\t%d ", num_source_filenames); - else - { - ++num_source_filenames; - current_function_file = name; - fprintf (stream, "\t.file\t%d ", num_source_filenames); - } - - output_quoted_string (stream, name); - fprintf (stream, "\n"); - } -} - -/* Emit a linenumber to a stream. */ - -void -alpha_output_lineno (FILE *stream, int line) -{ - if (write_symbols == DBX_DEBUG) - { - /* mips-tfile doesn't understand .stabd directives. */ - ++sym_lineno; - fprintf (stream, "$LM%d:\n%s%d,0,%d,$LM%d\n", - sym_lineno, ASM_STABN_OP, N_SLINE, line, sym_lineno); - } - else - fprintf (stream, "\n\t.loc\t%d %d\n", num_source_filenames, line); -} - -/* Structure to show the current status of registers and memory. */ - -struct shadow_summary -{ - struct { - unsigned int i : 31; /* Mask of int regs */ - unsigned int fp : 31; /* Mask of fp regs */ - unsigned int mem : 1; /* mem == imem | fpmem */ - } used, defd; -}; - -/* Summary the effects of expression X on the machine. Update SUM, a pointer - to the summary structure. SET is nonzero if the insn is setting the - object, otherwise zero. */ - -static void -summarize_insn (rtx x, struct shadow_summary *sum, int set) -{ - const char *format_ptr; - int i, j; - - if (x == 0) - return; - - switch (GET_CODE (x)) - { - /* ??? Note that this case would be incorrect if the Alpha had a - ZERO_EXTRACT in SET_DEST. */ - case SET: - summarize_insn (SET_SRC (x), sum, 0); - summarize_insn (SET_DEST (x), sum, 1); - break; - - case CLOBBER: - summarize_insn (XEXP (x, 0), sum, 1); - break; - - case USE: - summarize_insn (XEXP (x, 0), sum, 0); - break; - - case ASM_OPERANDS: - for (i = ASM_OPERANDS_INPUT_LENGTH (x) - 1; i >= 0; i--) - summarize_insn (ASM_OPERANDS_INPUT (x, i), sum, 0); - break; - - case PARALLEL: - for (i = XVECLEN (x, 0) - 1; i >= 0; i--) - summarize_insn (XVECEXP (x, 0, i), sum, 0); - break; - - case SUBREG: - summarize_insn (SUBREG_REG (x), sum, 0); - break; - - case REG: - { - int regno = REGNO (x); - unsigned long mask = ((unsigned long) 1) << (regno % 32); - - if (regno == 31 || regno == 63) - break; - - if (set) - { - if (regno < 32) - sum->defd.i |= mask; - else - sum->defd.fp |= mask; - } - else - { - if (regno < 32) - sum->used.i |= mask; - else - sum->used.fp |= mask; - } - } - break; - - case MEM: - if (set) - sum->defd.mem = 1; - else - sum->used.mem = 1; - - /* Find the regs used in memory address computation: */ - summarize_insn (XEXP (x, 0), sum, 0); - break; - - case CONST_INT: case CONST_DOUBLE: - case SYMBOL_REF: case LABEL_REF: case CONST: - case SCRATCH: case ASM_INPUT: - break; - - /* Handle common unary and binary ops for efficiency. */ - case COMPARE: case PLUS: case MINUS: case MULT: case DIV: - case MOD: case UDIV: case UMOD: case AND: case IOR: - case XOR: case ASHIFT: case ROTATE: case ASHIFTRT: case LSHIFTRT: - case ROTATERT: case SMIN: case SMAX: case UMIN: case UMAX: - case NE: case EQ: case GE: case GT: case LE: - case LT: case GEU: case GTU: case LEU: case LTU: - summarize_insn (XEXP (x, 0), sum, 0); - summarize_insn (XEXP (x, 1), sum, 0); - break; - - case NEG: case NOT: case SIGN_EXTEND: case ZERO_EXTEND: - case TRUNCATE: case FLOAT_EXTEND: case FLOAT_TRUNCATE: case FLOAT: - case FIX: case UNSIGNED_FLOAT: case UNSIGNED_FIX: case ABS: - case SQRT: case FFS: - summarize_insn (XEXP (x, 0), sum, 0); - break; - - default: - format_ptr = GET_RTX_FORMAT (GET_CODE (x)); - for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) - switch (format_ptr[i]) - { - case 'e': - summarize_insn (XEXP (x, i), sum, 0); - break; - - case 'E': - for (j = XVECLEN (x, i) - 1; j >= 0; j--) - summarize_insn (XVECEXP (x, i, j), sum, 0); - break; - - case 'i': - break; - - default: - abort (); - } - } -} - -/* Ensure a sufficient number of `trapb' insns are in the code when - the user requests code with a trap precision of functions or - instructions. - - In naive mode, when the user requests a trap-precision of - "instruction", a trapb is needed after every instruction that may - generate a trap. This ensures that the code is resumption safe but - it is also slow. - - When optimizations are turned on, we delay issuing a trapb as long - as possible. In this context, a trap shadow is the sequence of - instructions that starts with a (potentially) trap generating - instruction and extends to the next trapb or call_pal instruction - (but GCC never generates call_pal by itself). We can delay (and - therefore sometimes omit) a trapb subject to the following - conditions: - - (a) On entry to the trap shadow, if any Alpha register or memory - location contains a value that is used as an operand value by some - instruction in the trap shadow (live on entry), then no instruction - in the trap shadow may modify the register or memory location. - - (b) Within the trap shadow, the computation of the base register - for a memory load or store instruction may not involve using the - result of an instruction that might generate an UNPREDICTABLE - result. - - (c) Within the trap shadow, no register may be used more than once - as a destination register. (This is to make life easier for the - trap-handler.) - - (d) The trap shadow may not include any branch instructions. */ - -static void -alpha_handle_trap_shadows (void) -{ - struct shadow_summary shadow; - int trap_pending, exception_nesting; - rtx i, n; - - trap_pending = 0; - exception_nesting = 0; - shadow.used.i = 0; - shadow.used.fp = 0; - shadow.used.mem = 0; - shadow.defd = shadow.used; - - for (i = get_insns (); i ; i = NEXT_INSN (i)) - { - if (GET_CODE (i) == NOTE) - { - switch (NOTE_LINE_NUMBER (i)) - { - case NOTE_INSN_EH_REGION_BEG: - exception_nesting++; - if (trap_pending) - goto close_shadow; - break; - - case NOTE_INSN_EH_REGION_END: - exception_nesting--; - if (trap_pending) - goto close_shadow; - break; - - case NOTE_INSN_EPILOGUE_BEG: - if (trap_pending && alpha_tp >= ALPHA_TP_FUNC) - goto close_shadow; - break; - } - } - else if (trap_pending) - { - if (alpha_tp == ALPHA_TP_FUNC) - { - if (GET_CODE (i) == JUMP_INSN - && GET_CODE (PATTERN (i)) == RETURN) - goto close_shadow; - } - else if (alpha_tp == ALPHA_TP_INSN) - { - if (optimize > 0) - { - struct shadow_summary sum; - - sum.used.i = 0; - sum.used.fp = 0; - sum.used.mem = 0; - sum.defd = sum.used; - - switch (GET_CODE (i)) - { - case INSN: - /* Annoyingly, get_attr_trap will abort on these. */ - if (GET_CODE (PATTERN (i)) == USE - || GET_CODE (PATTERN (i)) == CLOBBER) - break; - - summarize_insn (PATTERN (i), &sum, 0); - - if ((sum.defd.i & shadow.defd.i) - || (sum.defd.fp & shadow.defd.fp)) - { - /* (c) would be violated */ - goto close_shadow; - } - - /* Combine shadow with summary of current insn: */ - shadow.used.i |= sum.used.i; - shadow.used.fp |= sum.used.fp; - shadow.used.mem |= sum.used.mem; - shadow.defd.i |= sum.defd.i; - shadow.defd.fp |= sum.defd.fp; - shadow.defd.mem |= sum.defd.mem; - - if ((sum.defd.i & shadow.used.i) - || (sum.defd.fp & shadow.used.fp) - || (sum.defd.mem & shadow.used.mem)) - { - /* (a) would be violated (also takes care of (b)) */ - if (get_attr_trap (i) == TRAP_YES - && ((sum.defd.i & sum.used.i) - || (sum.defd.fp & sum.used.fp))) - abort (); - - goto close_shadow; - } - break; - - case JUMP_INSN: - case CALL_INSN: - case CODE_LABEL: - goto close_shadow; - - default: - abort (); - } - } - else - { - close_shadow: - n = emit_insn_before (gen_trapb (), i); - PUT_MODE (n, TImode); - PUT_MODE (i, TImode); - trap_pending = 0; - shadow.used.i = 0; - shadow.used.fp = 0; - shadow.used.mem = 0; - shadow.defd = shadow.used; - } - } - } - - if ((exception_nesting > 0 || alpha_tp >= ALPHA_TP_FUNC) - && GET_CODE (i) == INSN - && GET_CODE (PATTERN (i)) != USE - && GET_CODE (PATTERN (i)) != CLOBBER - && get_attr_trap (i) == TRAP_YES) - { - if (optimize && !trap_pending) - summarize_insn (PATTERN (i), &shadow, 0); - trap_pending = 1; - } - } -} - -/* Alpha can only issue instruction groups simultaneously if they are - suitably aligned. This is very processor-specific. */ - -enum alphaev4_pipe { - EV4_STOP = 0, - EV4_IB0 = 1, - EV4_IB1 = 2, - EV4_IBX = 4 -}; - -enum alphaev5_pipe { - EV5_STOP = 0, - EV5_NONE = 1, - EV5_E01 = 2, - EV5_E0 = 4, - EV5_E1 = 8, - EV5_FAM = 16, - EV5_FA = 32, - EV5_FM = 64 -}; - -static enum alphaev4_pipe -alphaev4_insn_pipe (rtx insn) -{ - if (recog_memoized (insn) < 0) - return EV4_STOP; - if (get_attr_length (insn) != 4) - return EV4_STOP; - - switch (get_attr_type (insn)) - { - case TYPE_ILD: - case TYPE_FLD: - return EV4_IBX; - - case TYPE_LDSYM: - case TYPE_IADD: - case TYPE_ILOG: - case TYPE_ICMOV: - case TYPE_ICMP: - case TYPE_IST: - case TYPE_FST: - case TYPE_SHIFT: - case TYPE_IMUL: - case TYPE_FBR: - return EV4_IB0; - - case TYPE_MISC: - case TYPE_IBR: - case TYPE_JSR: - case TYPE_CALLPAL: - case TYPE_FCPYS: - case TYPE_FCMOV: - case TYPE_FADD: - case TYPE_FDIV: - case TYPE_FMUL: - return EV4_IB1; - - default: - abort (); - } -} - -static enum alphaev5_pipe -alphaev5_insn_pipe (rtx insn) -{ - if (recog_memoized (insn) < 0) - return EV5_STOP; - if (get_attr_length (insn) != 4) - return EV5_STOP; - - switch (get_attr_type (insn)) - { - case TYPE_ILD: - case TYPE_FLD: - case TYPE_LDSYM: - case TYPE_IADD: - case TYPE_ILOG: - case TYPE_ICMOV: - case TYPE_ICMP: - return EV5_E01; - - case TYPE_IST: - case TYPE_FST: - case TYPE_SHIFT: - case TYPE_IMUL: - case TYPE_MISC: - case TYPE_MVI: - return EV5_E0; - - case TYPE_IBR: - case TYPE_JSR: - case TYPE_CALLPAL: - return EV5_E1; - - case TYPE_FCPYS: - return EV5_FAM; - - case TYPE_FBR: - case TYPE_FCMOV: - case TYPE_FADD: - case TYPE_FDIV: - return EV5_FA; - - case TYPE_FMUL: - return EV5_FM; - - default: - abort(); - } -} - -/* IN_USE is a mask of the slots currently filled within the insn group. - The mask bits come from alphaev4_pipe above. If EV4_IBX is set, then - the insn in EV4_IB0 can be swapped by the hardware into EV4_IB1. - - LEN is, of course, the length of the group in bytes. */ - -static rtx -alphaev4_next_group (rtx insn, int *pin_use, int *plen) -{ - int len, in_use; - - len = in_use = 0; - - if (! INSN_P (insn) - || GET_CODE (PATTERN (insn)) == CLOBBER - || GET_CODE (PATTERN (insn)) == USE) - goto next_and_done; - - while (1) - { - enum alphaev4_pipe pipe; - - pipe = alphaev4_insn_pipe (insn); - switch (pipe) - { - case EV4_STOP: - /* Force complex instructions to start new groups. */ - if (in_use) - goto done; - - /* If this is a completely unrecognized insn, its an asm. - We don't know how long it is, so record length as -1 to - signal a needed realignment. */ - if (recog_memoized (insn) < 0) - len = -1; - else - len = get_attr_length (insn); - goto next_and_done; - - case EV4_IBX: - if (in_use & EV4_IB0) - { - if (in_use & EV4_IB1) - goto done; - in_use |= EV4_IB1; - } - else - in_use |= EV4_IB0 | EV4_IBX; - break; - - case EV4_IB0: - if (in_use & EV4_IB0) - { - if (!(in_use & EV4_IBX) || (in_use & EV4_IB1)) - goto done; - in_use |= EV4_IB1; - } - in_use |= EV4_IB0; - break; - - case EV4_IB1: - if (in_use & EV4_IB1) - goto done; - in_use |= EV4_IB1; - break; - - default: - abort(); - } - len += 4; - - /* Haifa doesn't do well scheduling branches. */ - if (GET_CODE (insn) == JUMP_INSN) - goto next_and_done; - - next: - insn = next_nonnote_insn (insn); - - if (!insn || ! INSN_P (insn)) - goto done; - - /* Let Haifa tell us where it thinks insn group boundaries are. */ - if (GET_MODE (insn) == TImode) - goto done; - - if (GET_CODE (insn) == CLOBBER || GET_CODE (insn) == USE) - goto next; - } - - next_and_done: - insn = next_nonnote_insn (insn); - - done: - *plen = len; - *pin_use = in_use; - return insn; -} - -/* IN_USE is a mask of the slots currently filled within the insn group. - The mask bits come from alphaev5_pipe above. If EV5_E01 is set, then - the insn in EV5_E0 can be swapped by the hardware into EV5_E1. - - LEN is, of course, the length of the group in bytes. */ - -static rtx -alphaev5_next_group (rtx insn, int *pin_use, int *plen) -{ - int len, in_use; - - len = in_use = 0; - - if (! INSN_P (insn) - || GET_CODE (PATTERN (insn)) == CLOBBER - || GET_CODE (PATTERN (insn)) == USE) - goto next_and_done; - - while (1) - { - enum alphaev5_pipe pipe; - - pipe = alphaev5_insn_pipe (insn); - switch (pipe) - { - case EV5_STOP: - /* Force complex instructions to start new groups. */ - if (in_use) - goto done; - - /* If this is a completely unrecognized insn, its an asm. - We don't know how long it is, so record length as -1 to - signal a needed realignment. */ - if (recog_memoized (insn) < 0) - len = -1; - else - len = get_attr_length (insn); - goto next_and_done; - - /* ??? Most of the places below, we would like to abort, as - it would indicate an error either in Haifa, or in the - scheduling description. Unfortunately, Haifa never - schedules the last instruction of the BB, so we don't - have an accurate TI bit to go off. */ - case EV5_E01: - if (in_use & EV5_E0) - { - if (in_use & EV5_E1) - goto done; - in_use |= EV5_E1; - } - else - in_use |= EV5_E0 | EV5_E01; - break; - - case EV5_E0: - if (in_use & EV5_E0) - { - if (!(in_use & EV5_E01) || (in_use & EV5_E1)) - goto done; - in_use |= EV5_E1; - } - in_use |= EV5_E0; - break; - - case EV5_E1: - if (in_use & EV5_E1) - goto done; - in_use |= EV5_E1; - break; - - case EV5_FAM: - if (in_use & EV5_FA) - { - if (in_use & EV5_FM) - goto done; - in_use |= EV5_FM; - } - else - in_use |= EV5_FA | EV5_FAM; - break; - - case EV5_FA: - if (in_use & EV5_FA) - goto done; - in_use |= EV5_FA; - break; - - case EV5_FM: - if (in_use & EV5_FM) - goto done; - in_use |= EV5_FM; - break; - - case EV5_NONE: - break; - - default: - abort(); - } - len += 4; - - /* Haifa doesn't do well scheduling branches. */ - /* ??? If this is predicted not-taken, slotting continues, except - that no more IBR, FBR, or JSR insns may be slotted. */ - if (GET_CODE (insn) == JUMP_INSN) - goto next_and_done; - - next: - insn = next_nonnote_insn (insn); - - if (!insn || ! INSN_P (insn)) - goto done; - - /* Let Haifa tell us where it thinks insn group boundaries are. */ - if (GET_MODE (insn) == TImode) - goto done; - - if (GET_CODE (insn) == CLOBBER || GET_CODE (insn) == USE) - goto next; - } - - next_and_done: - insn = next_nonnote_insn (insn); - - done: - *plen = len; - *pin_use = in_use; - return insn; -} - -static rtx -alphaev4_next_nop (int *pin_use) -{ - int in_use = *pin_use; - rtx nop; - - if (!(in_use & EV4_IB0)) - { - in_use |= EV4_IB0; - nop = gen_nop (); - } - else if ((in_use & (EV4_IBX|EV4_IB1)) == EV4_IBX) - { - in_use |= EV4_IB1; - nop = gen_nop (); - } - else if (TARGET_FP && !(in_use & EV4_IB1)) - { - in_use |= EV4_IB1; - nop = gen_fnop (); - } - else - nop = gen_unop (); - - *pin_use = in_use; - return nop; -} - -static rtx -alphaev5_next_nop (int *pin_use) -{ - int in_use = *pin_use; - rtx nop; - - if (!(in_use & EV5_E1)) - { - in_use |= EV5_E1; - nop = gen_nop (); - } - else if (TARGET_FP && !(in_use & EV5_FA)) - { - in_use |= EV5_FA; - nop = gen_fnop (); - } - else if (TARGET_FP && !(in_use & EV5_FM)) - { - in_use |= EV5_FM; - nop = gen_fnop (); - } - else - nop = gen_unop (); - - *pin_use = in_use; - return nop; -} - -/* The instruction group alignment main loop. */ - -static void -alpha_align_insns (unsigned int max_align, - rtx (*next_group) (rtx, int *, int *), - rtx (*next_nop) (int *)) -{ - /* ALIGN is the known alignment for the insn group. */ - unsigned int align; - /* OFS is the offset of the current insn in the insn group. */ - int ofs; - int prev_in_use, in_use, len, ldgp; - rtx i, next; - - /* Let shorten branches care for assigning alignments to code labels. */ - shorten_branches (get_insns ()); - - if (align_functions < 4) - align = 4; - else if ((unsigned int) align_functions < max_align) - align = align_functions; - else - align = max_align; - - ofs = prev_in_use = 0; - i = get_insns (); - if (GET_CODE (i) == NOTE) - i = next_nonnote_insn (i); - - ldgp = alpha_function_needs_gp ? 8 : 0; - - while (i) - { - next = (*next_group) (i, &in_use, &len); - - /* When we see a label, resync alignment etc. */ - if (GET_CODE (i) == CODE_LABEL) - { - unsigned int new_align = 1 << label_to_alignment (i); - - if (new_align >= align) - { - align = new_align < max_align ? new_align : max_align; - ofs = 0; - } - - else if (ofs & (new_align-1)) - ofs = (ofs | (new_align-1)) + 1; - if (len != 0) - abort(); - } - - /* Handle complex instructions special. */ - else if (in_use == 0) - { - /* Asms will have length < 0. This is a signal that we have - lost alignment knowledge. Assume, however, that the asm - will not mis-align instructions. */ - if (len < 0) - { - ofs = 0; - align = 4; - len = 0; - } - } - - /* If the known alignment is smaller than the recognized insn group, - realign the output. */ - else if ((int) align < len) - { - unsigned int new_log_align = len > 8 ? 4 : 3; - rtx prev, where; - - where = prev = prev_nonnote_insn (i); - if (!where || GET_CODE (where) != CODE_LABEL) - where = i; - - /* Can't realign between a call and its gp reload. */ - if (! (TARGET_EXPLICIT_RELOCS - && prev && GET_CODE (prev) == CALL_INSN)) - { - emit_insn_before (gen_realign (GEN_INT (new_log_align)), where); - align = 1 << new_log_align; - ofs = 0; - } - } - - /* We may not insert padding inside the initial ldgp sequence. */ - else if (ldgp > 0) - ldgp -= len; - - /* If the group won't fit in the same INT16 as the previous, - we need to add padding to keep the group together. Rather - than simply leaving the insn filling to the assembler, we - can make use of the knowledge of what sorts of instructions - were issued in the previous group to make sure that all of - the added nops are really free. */ - else if (ofs + len > (int) align) - { - int nop_count = (align - ofs) / 4; - rtx where; - - /* Insert nops before labels, branches, and calls to truly merge - the execution of the nops with the previous instruction group. */ - where = prev_nonnote_insn (i); - if (where) - { - if (GET_CODE (where) == CODE_LABEL) - { - rtx where2 = prev_nonnote_insn (where); - if (where2 && GET_CODE (where2) == JUMP_INSN) - where = where2; - } - else if (GET_CODE (where) == INSN) - where = i; - } - else - where = i; - - do - emit_insn_before ((*next_nop)(&prev_in_use), where); - while (--nop_count); - ofs = 0; - } - - ofs = (ofs + len) & (align - 1); - prev_in_use = in_use; - i = next; - } -} - -/* Machine dependent reorg pass. */ - -static void -alpha_reorg (void) -{ - if (alpha_tp != ALPHA_TP_PROG || flag_exceptions) - alpha_handle_trap_shadows (); - - /* Due to the number of extra trapb insns, don't bother fixing up - alignment when trap precision is instruction. Moreover, we can - only do our job when sched2 is run. */ - if (optimize && !optimize_size - && alpha_tp != ALPHA_TP_INSN - && flag_schedule_insns_after_reload) - { - if (alpha_cpu == PROCESSOR_EV4) - alpha_align_insns (8, alphaev4_next_group, alphaev4_next_nop); - else if (alpha_cpu == PROCESSOR_EV5) - alpha_align_insns (16, alphaev5_next_group, alphaev5_next_nop); - } -} - -#if !TARGET_ABI_UNICOSMK - -#ifdef HAVE_STAMP_H -#include -#endif - -static void -alpha_file_start (void) -{ -#ifdef OBJECT_FORMAT_ELF - /* If emitting dwarf2 debug information, we cannot generate a .file - directive to start the file, as it will conflict with dwarf2out - file numbers. So it's only useful when emitting mdebug output. */ - targetm.file_start_file_directive = (write_symbols == DBX_DEBUG); -#endif - - default_file_start (); -#ifdef MS_STAMP - fprintf (asm_out_file, "\t.verstamp %d %d\n", MS_STAMP, LS_STAMP); -#endif - - fputs ("\t.set noreorder\n", asm_out_file); - fputs ("\t.set volatile\n", asm_out_file); - if (!TARGET_ABI_OPEN_VMS) - fputs ("\t.set noat\n", asm_out_file); - if (TARGET_EXPLICIT_RELOCS) - fputs ("\t.set nomacro\n", asm_out_file); - if (TARGET_SUPPORT_ARCH | TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX) - fprintf (asm_out_file, - "\t.arch %s\n", - TARGET_CPU_EV6 ? "ev6" - : (TARGET_CPU_EV5 - ? (TARGET_MAX ? "pca56" : TARGET_BWX ? "ev56" : "ev5") - : "ev4")); -} -#endif - -#ifdef OBJECT_FORMAT_ELF - -/* Switch to the section to which we should output X. The only thing - special we do here is to honor small data. */ - -static void -alpha_elf_select_rtx_section (enum machine_mode mode, rtx x, - unsigned HOST_WIDE_INT align) -{ - if (TARGET_SMALL_DATA && GET_MODE_SIZE (mode) <= g_switch_value) - /* ??? Consider using mergeable sdata sections. */ - sdata_section (); - else - default_elf_select_rtx_section (mode, x, align); -} - -#endif /* OBJECT_FORMAT_ELF */ - -/* Structure to collect function names for final output in link section. */ -/* Note that items marked with GTY can't be ifdef'ed out. */ - -enum links_kind {KIND_UNUSED, KIND_LOCAL, KIND_EXTERN}; -enum reloc_kind {KIND_LINKAGE, KIND_CODEADDR}; - -struct alpha_links GTY(()) -{ - int num; - rtx linkage; - enum links_kind lkind; - enum reloc_kind rkind; -}; - -struct alpha_funcs GTY(()) -{ - int num; - splay_tree GTY ((param1_is (char *), param2_is (struct alpha_links *))) - links; -}; - -static GTY ((param1_is (char *), param2_is (struct alpha_links *))) - splay_tree alpha_links_tree; -static GTY ((param1_is (tree), param2_is (struct alpha_funcs *))) - splay_tree alpha_funcs_tree; - -static GTY(()) int alpha_funcs_num; - -#if TARGET_ABI_OPEN_VMS - -/* Return the VMS argument type corresponding to MODE. */ - -enum avms_arg_type -alpha_arg_type (enum machine_mode mode) -{ - switch (mode) - { - case SFmode: - return TARGET_FLOAT_VAX ? FF : FS; - case DFmode: - return TARGET_FLOAT_VAX ? FD : FT; - default: - return I64; - } -} - -/* Return an rtx for an integer representing the VMS Argument Information - register value. */ - -rtx -alpha_arg_info_reg_val (CUMULATIVE_ARGS cum) -{ - unsigned HOST_WIDE_INT regval = cum.num_args; - int i; - - for (i = 0; i < 6; i++) - regval |= ((int) cum.atypes[i]) << (i * 3 + 8); - - return GEN_INT (regval); -} - -/* Make (or fake) .linkage entry for function call. - - IS_LOCAL is 0 if name is used in call, 1 if name is used in definition. - - Return an SYMBOL_REF rtx for the linkage. */ - -rtx -alpha_need_linkage (const char *name, int is_local) -{ - splay_tree_node node; - struct alpha_links *al; - - if (name[0] == '*') - name++; - - if (is_local) - { - struct alpha_funcs *cfaf; - - if (!alpha_funcs_tree) - alpha_funcs_tree = splay_tree_new_ggc ((splay_tree_compare_fn) - splay_tree_compare_pointers); - - cfaf = (struct alpha_funcs *) ggc_alloc (sizeof (struct alpha_funcs)); - - cfaf->links = 0; - cfaf->num = ++alpha_funcs_num; - - splay_tree_insert (alpha_funcs_tree, - (splay_tree_key) current_function_decl, - (splay_tree_value) cfaf); - } - - if (alpha_links_tree) - { - /* Is this name already defined? */ - - node = splay_tree_lookup (alpha_links_tree, (splay_tree_key) name); - if (node) - { - al = (struct alpha_links *) node->value; - if (is_local) - { - /* Defined here but external assumed. */ - if (al->lkind == KIND_EXTERN) - al->lkind = KIND_LOCAL; - } - else - { - /* Used here but unused assumed. */ - if (al->lkind == KIND_UNUSED) - al->lkind = KIND_LOCAL; - } - return al->linkage; - } - } - else - alpha_links_tree = splay_tree_new_ggc ((splay_tree_compare_fn) strcmp); - - al = (struct alpha_links *) ggc_alloc (sizeof (struct alpha_links)); - name = ggc_strdup (name); - - /* Assume external if no definition. */ - al->lkind = (is_local ? KIND_UNUSED : KIND_EXTERN); - - /* Ensure we have an IDENTIFIER so assemble_name can mark it used. */ - get_identifier (name); - - /* Construct a SYMBOL_REF for us to call. */ - { - size_t name_len = strlen (name); - char *linksym = alloca (name_len + 6); - linksym[0] = '$'; - memcpy (linksym + 1, name, name_len); - memcpy (linksym + 1 + name_len, "..lk", 5); - al->linkage = gen_rtx_SYMBOL_REF (Pmode, - ggc_alloc_string (linksym, name_len + 5)); - } - - splay_tree_insert (alpha_links_tree, (splay_tree_key) name, - (splay_tree_value) al); - - return al->linkage; -} - -rtx -alpha_use_linkage (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_ggc ((splay_tree_compare_fn) strcmp); - - 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 *) ggc_alloc (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 (splay_tree_node node, void *data) -{ - const char *const name = (const char *) node->key; - struct alpha_links *link = (struct alpha_links *) node->value; - FILE *stream = (FILE *) data; - - fprintf (stream, "$%d..%s..lk:\n", link->num, name); - if (link->rkind == KIND_CODEADDR) - { - if (link->lkind == KIND_LOCAL) - { - /* Local and used */ - fprintf (stream, "\t.quad %s..en\n", name); - } - else - { - /* External and used, request code address. */ - fprintf (stream, "\t.code_address %s\n", name); - } - } - else - { - if (link->lkind == KIND_LOCAL) - { - /* Local and used, build linkage pair. */ - fprintf (stream, "\t.quad %s..en\n", name); - fprintf (stream, "\t.quad %s\n", name); - } - else - { - /* External and used, request linkage pair. */ - fprintf (stream, "\t.linkage %s\n", name); - } - } - - return 0; -} - -static void -alpha_write_linkage (FILE *stream, const char *funname, tree fundecl) -{ - splay_tree_node node; - struct alpha_funcs *func; - - link_section (); - fprintf (stream, "\t.align 3\n"); - node = splay_tree_lookup (alpha_funcs_tree, (splay_tree_key) fundecl); - func = (struct alpha_funcs *) node->value; - - fputs ("\t.name ", stream); - assemble_name (stream, funname); - fputs ("..na\n", stream); - ASM_OUTPUT_LABEL (stream, funname); - fprintf (stream, "\t.pdesc "); - assemble_name (stream, funname); - fprintf (stream, "..en,%s\n", - alpha_procedure_type == PT_STACK ? "stack" - : alpha_procedure_type == PT_REGISTER ? "reg" : "null"); - - if (func->links) - { - splay_tree_foreach (func->links, alpha_write_one_linkage, stream); - /* splay_tree_delete (func->links); */ - } -} - -/* Given a decl, a section name, and whether the decl initializer - has relocs, choose attributes for the section. */ - -#define SECTION_VMS_OVERLAY SECTION_FORGET -#define SECTION_VMS_GLOBAL SECTION_MACH_DEP -#define SECTION_VMS_INITIALIZE (SECTION_VMS_GLOBAL << 1) - -static unsigned int -vms_section_type_flags (tree decl, const char *name, int reloc) -{ - unsigned int flags = default_section_type_flags (decl, name, reloc); - - if (decl && DECL_ATTRIBUTES (decl) - && lookup_attribute ("overlaid", DECL_ATTRIBUTES (decl))) - flags |= SECTION_VMS_OVERLAY; - if (decl && DECL_ATTRIBUTES (decl) - && lookup_attribute ("global", DECL_ATTRIBUTES (decl))) - flags |= SECTION_VMS_GLOBAL; - if (decl && DECL_ATTRIBUTES (decl) - && lookup_attribute ("initialize", DECL_ATTRIBUTES (decl))) - flags |= SECTION_VMS_INITIALIZE; - - return flags; -} - -/* Switch to an arbitrary section NAME with attributes as specified - by FLAGS. ALIGN specifies any known alignment requirements for - the section; 0 if the default should be used. */ - -static void -vms_asm_named_section (const char *name, unsigned int flags) -{ - fputc ('\n', asm_out_file); - fprintf (asm_out_file, ".section\t%s", name); - - if (flags & SECTION_VMS_OVERLAY) - fprintf (asm_out_file, ",OVR"); - if (flags & SECTION_VMS_GLOBAL) - fprintf (asm_out_file, ",GBL"); - if (flags & SECTION_VMS_INITIALIZE) - fprintf (asm_out_file, ",NOMOD"); - if (flags & SECTION_DEBUG) - fprintf (asm_out_file, ",NOWRT"); - - fputc ('\n', asm_out_file); -} - -/* Record an element in the table of global constructors. SYMBOL is - a SYMBOL_REF of the function to be called; PRIORITY is a number - between 0 and MAX_INIT_PRIORITY. - - Differs from default_ctors_section_asm_out_constructor in that the - width of the .ctors entry is always 64 bits, rather than the 32 bits - used by a normal pointer. */ - -static void -vms_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) -{ - ctors_section (); - assemble_align (BITS_PER_WORD); - assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1); -} - -static void -vms_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED) -{ - dtors_section (); - assemble_align (BITS_PER_WORD); - assemble_integer (symbol, UNITS_PER_WORD, BITS_PER_WORD, 1); -} -#else - -rtx -alpha_need_linkage (const char *name ATTRIBUTE_UNUSED, - int is_local ATTRIBUTE_UNUSED) -{ - return NULL_RTX; -} - -rtx -alpha_use_linkage (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 - -/* Define the offset between two registers, one to be eliminated, and the - other its replacement, at the start of a routine. */ - -int -unicosmk_initial_elimination_offset (int from, int to) -{ - int fixed_size; - - fixed_size = alpha_sa_size(); - if (fixed_size != 0) - fixed_size += 48; - - if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) - return -fixed_size; - else if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) - return 0; - else if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - return (ALPHA_ROUND (current_function_outgoing_args_size) - + ALPHA_ROUND (get_frame_size())); - else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - return (ALPHA_ROUND (fixed_size) - + ALPHA_ROUND (get_frame_size() - + current_function_outgoing_args_size)); - else - abort (); -} - -/* Output the module name for .ident and .end directives. We have to strip - directories and add make sure that the module name starts with a letter - or '$'. */ - -static void -unicosmk_output_module_name (FILE *file) -{ - const char *name = lbasename (main_input_filename); - unsigned len = strlen (name); - char *clean_name = alloca (len + 2); - char *ptr = clean_name; - - /* CAM only accepts module names that start with a letter or '$'. We - prefix the module name with a '$' if necessary. */ - - if (!ISALPHA (*name)) - *ptr++ = '$'; - memcpy (ptr, name, len + 1); - clean_symbol_name (clean_name); - fputs (clean_name, file); -} - -/* Output the definition of a common variable. */ - -void -unicosmk_output_common (FILE *file, const char *name, int size, int align) -{ - tree name_tree; - printf ("T3E__: common %s\n", name); - - common_section (); - fputs("\t.endp\n\n\t.psect ", file); - assemble_name(file, name); - fprintf(file, ",%d,common\n", floor_log2 (align / BITS_PER_UNIT)); - fprintf(file, "\t.byte\t0:%d\n", size); - - /* Mark the symbol as defined in this module. */ - name_tree = get_identifier (name); - TREE_ASM_WRITTEN (name_tree) = 1; -} - -#define SECTION_PUBLIC SECTION_MACH_DEP -#define SECTION_MAIN (SECTION_PUBLIC << 1) -static int current_section_align; - -static unsigned int -unicosmk_section_type_flags (tree decl, const char *name, - int reloc ATTRIBUTE_UNUSED) -{ - unsigned int flags = default_section_type_flags (decl, name, reloc); - - if (!decl) - return flags; - - if (TREE_CODE (decl) == FUNCTION_DECL) - { - current_section_align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT); - if (align_functions_log > current_section_align) - current_section_align = align_functions_log; - - if (! strcmp (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), "main")) - flags |= SECTION_MAIN; - } - else - current_section_align = floor_log2 (DECL_ALIGN (decl) / BITS_PER_UNIT); - - if (TREE_PUBLIC (decl)) - flags |= SECTION_PUBLIC; - - return flags; -} - -/* Generate a section name for decl and associate it with the - declaration. */ - -static void -unicosmk_unique_section (tree decl, int reloc ATTRIBUTE_UNUSED) -{ - const char *name; - int len; - - if (!decl) - abort (); - - name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - name = default_strip_name_encoding (name); - len = strlen (name); - - if (TREE_CODE (decl) == FUNCTION_DECL) - { - char *string; - - /* It is essential that we prefix the section name here because - otherwise the section names generated for constructors and - destructors confuse collect2. */ - - string = alloca (len + 6); - sprintf (string, "code@%s", name); - DECL_SECTION_NAME (decl) = build_string (len + 5, string); - } - else if (TREE_PUBLIC (decl)) - DECL_SECTION_NAME (decl) = build_string (len, name); - else - { - char *string; - - string = alloca (len + 6); - sprintf (string, "data@%s", name); - DECL_SECTION_NAME (decl) = build_string (len + 5, string); - } -} - -/* Switch to an arbitrary section NAME with attributes as specified - by FLAGS. ALIGN specifies any known alignment requirements for - the section; 0 if the default should be used. */ - -static void -unicosmk_asm_named_section (const char *name, unsigned int flags) -{ - const char *kind; - - /* Close the previous section. */ - - fputs ("\t.endp\n\n", asm_out_file); - - /* Find out what kind of section we are opening. */ - - if (flags & SECTION_MAIN) - fputs ("\t.start\tmain\n", asm_out_file); - - if (flags & SECTION_CODE) - kind = "code"; - else if (flags & SECTION_PUBLIC) - kind = "common"; - else - kind = "data"; - - if (current_section_align != 0) - fprintf (asm_out_file, "\t.psect\t%s,%d,%s\n", name, - current_section_align, kind); - else - fprintf (asm_out_file, "\t.psect\t%s,%s\n", name, kind); -} - -static void -unicosmk_insert_attributes (tree decl, tree *attr_ptr ATTRIBUTE_UNUSED) -{ - if (DECL_P (decl) - && (TREE_PUBLIC (decl) || TREE_CODE (decl) == FUNCTION_DECL)) - unicosmk_unique_section (decl, 0); -} - -/* Output an alignment directive. We have to use the macro 'gcc@code@align' - in code sections because .align fill unused space with zeroes. */ - -void -unicosmk_output_align (FILE *file, int align) -{ - if (inside_function) - fprintf (file, "\tgcc@code@align\t%d\n", align); - else - fprintf (file, "\t.align\t%d\n", align); -} - -/* Add a case vector to the current function's list of deferred case - vectors. Case vectors have to be put into a separate section because CAM - does not allow data definitions in code sections. */ - -void -unicosmk_defer_case_vector (rtx lab, rtx vec) -{ - struct machine_function *machine = cfun->machine; - - vec = gen_rtx_EXPR_LIST (VOIDmode, lab, vec); - machine->addr_list = gen_rtx_EXPR_LIST (VOIDmode, vec, - machine->addr_list); -} - -/* Output a case vector. */ - -static void -unicosmk_output_addr_vec (FILE *file, rtx vec) -{ - rtx lab = XEXP (vec, 0); - rtx body = XEXP (vec, 1); - int vlen = XVECLEN (body, 0); - int idx; - - (*targetm.asm_out.internal_label) (file, "L", CODE_LABEL_NUMBER (lab)); - - for (idx = 0; idx < vlen; idx++) - { - ASM_OUTPUT_ADDR_VEC_ELT - (file, CODE_LABEL_NUMBER (XEXP (XVECEXP (body, 0, idx), 0))); - } -} - -/* Output current function's deferred case vectors. */ - -static void -unicosmk_output_deferred_case_vectors (FILE *file) -{ - struct machine_function *machine = cfun->machine; - rtx t; - - if (machine->addr_list == NULL_RTX) - return; - - data_section (); - for (t = machine->addr_list; t; t = XEXP (t, 1)) - unicosmk_output_addr_vec (file, XEXP (t, 0)); -} - -/* Generate the name of the SSIB section for the current function. */ - -#define SSIB_PREFIX "__SSIB_" -#define SSIB_PREFIX_LEN 7 - -static const char * -unicosmk_ssib_name (void) -{ - /* This is ok since CAM won't be able to deal with names longer than that - anyway. */ - - static char name[256]; - - rtx x; - const char *fnname; - int len; - - x = DECL_RTL (cfun->decl); - if (GET_CODE (x) != MEM) - abort (); - x = XEXP (x, 0); - if (GET_CODE (x) != SYMBOL_REF) - abort (); - fnname = XSTR (x, 0); - - len = strlen (fnname); - if (len + SSIB_PREFIX_LEN > 255) - len = 255 - SSIB_PREFIX_LEN; - - strcpy (name, SSIB_PREFIX); - strncpy (name + SSIB_PREFIX_LEN, fnname, len); - name[len + SSIB_PREFIX_LEN] = 0; - - return name; -} - -/* Set up the dynamic subprogram information block (DSIB) and update the - frame pointer register ($15) for subroutines which have a frame. If the - subroutine doesn't have a frame, simply increment $15. */ - -static void -unicosmk_gen_dsib (unsigned long *imaskP) -{ - if (alpha_procedure_type == PT_STACK) - { - const char *ssib_name; - rtx mem; - - /* Allocate 64 bytes for the DSIB. */ - - FRP (emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx, - GEN_INT (-64)))); - emit_insn (gen_blockage ()); - - /* Save the return address. */ - - mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 56)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_RA))); - (*imaskP) &= ~(1UL << REG_RA); - - /* Save the old frame pointer. */ - - mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 48)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, hard_frame_pointer_rtx)); - (*imaskP) &= ~(1UL << HARD_FRAME_POINTER_REGNUM); - - emit_insn (gen_blockage ()); - - /* Store the SSIB pointer. */ - - ssib_name = ggc_strdup (unicosmk_ssib_name ()); - mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 32)); - set_mem_alias_set (mem, alpha_sr_alias_set); - - FRP (emit_move_insn (gen_rtx_REG (DImode, 5), - gen_rtx_SYMBOL_REF (Pmode, ssib_name))); - FRP (emit_move_insn (mem, gen_rtx_REG (DImode, 5))); - - /* Save the CIW index. */ - - mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 24)); - set_mem_alias_set (mem, alpha_sr_alias_set); - FRP (emit_move_insn (mem, gen_rtx_REG (DImode, 25))); - - emit_insn (gen_blockage ()); - - /* Set the new frame pointer. */ - - FRP (emit_insn (gen_adddi3 (hard_frame_pointer_rtx, - stack_pointer_rtx, GEN_INT (64)))); - - } - else - { - /* Increment the frame pointer register to indicate that we do not - have a frame. */ - - FRP (emit_insn (gen_adddi3 (hard_frame_pointer_rtx, - hard_frame_pointer_rtx, GEN_INT (1)))); - } -} - -/* Output the static subroutine information block for the current - function. */ - -static void -unicosmk_output_ssib (FILE *file, const char *fnname) -{ - int len; - int i; - rtx x; - rtx ciw; - struct machine_function *machine = cfun->machine; - - ssib_section (); - fprintf (file, "\t.endp\n\n\t.psect\t%s%s,data\n", user_label_prefix, - unicosmk_ssib_name ()); - - /* Some required stuff and the function name length. */ - - len = strlen (fnname); - fprintf (file, "\t.quad\t^X20008%2.2X28\n", len); - - /* Saved registers - ??? We don't do that yet. */ - - fputs ("\t.quad\t0\n", file); - - /* Function address. */ - - fputs ("\t.quad\t", file); - assemble_name (file, fnname); - putc ('\n', file); - - fputs ("\t.quad\t0\n", file); - fputs ("\t.quad\t0\n", file); - - /* Function name. - ??? We do it the same way Cray CC does it but this could be - simplified. */ - - for( i = 0; i < len; i++ ) - fprintf (file, "\t.byte\t%d\n", (int)(fnname[i])); - if( (len % 8) == 0 ) - fputs ("\t.quad\t0\n", file); - else - fprintf (file, "\t.bits\t%d : 0\n", (8 - (len % 8))*8); - - /* All call information words used in the function. */ - - for (x = machine->first_ciw; x; x = XEXP (x, 1)) - { - ciw = XEXP (x, 0); -#if HOST_BITS_PER_WIDE_INT == 32 - fprintf (file, "\t.quad\t" HOST_WIDE_INT_PRINT_DOUBLE_HEX "\n", - CONST_DOUBLE_HIGH (ciw), CONST_DOUBLE_LOW (ciw)); -#else - fprintf (file, "\t.quad\t" HOST_WIDE_INT_PRINT_HEX "\n", INTVAL (ciw)); -#endif - } -} - -/* Add a call information word (CIW) to the list of the current function's - CIWs and return its index. - - X is a CONST_INT or CONST_DOUBLE representing the CIW. */ - -rtx -unicosmk_add_call_info_word (rtx x) -{ - rtx node; - struct machine_function *machine = cfun->machine; - - node = gen_rtx_EXPR_LIST (VOIDmode, x, NULL_RTX); - if (machine->first_ciw == NULL_RTX) - machine->first_ciw = node; - else - XEXP (machine->last_ciw, 1) = node; - - machine->last_ciw = node; - ++machine->ciw_count; - - return GEN_INT (machine->ciw_count - + strlen (current_function_name ())/8 + 5); -} - -static char unicosmk_section_buf[100]; - -char * -unicosmk_text_section (void) -{ - static int count = 0; - sprintf (unicosmk_section_buf, "\t.endp\n\n\t.psect\tgcc@text___%d,code", - count++); - return unicosmk_section_buf; -} - -char * -unicosmk_data_section (void) -{ - static int count = 1; - sprintf (unicosmk_section_buf, "\t.endp\n\n\t.psect\tgcc@data___%d,data", - count++); - return unicosmk_section_buf; -} - -/* The Cray assembler doesn't accept extern declarations for symbols which - are defined in the same file. We have to keep track of all global - symbols which are referenced and/or defined in a source file and output - extern declarations for those which are referenced but not defined at - the end of file. */ - -/* List of identifiers for which an extern declaration might have to be - emitted. */ -/* FIXME: needs to use GC, so it can be saved and restored for PCH. */ - -struct unicosmk_extern_list -{ - struct unicosmk_extern_list *next; - const char *name; -}; - -static struct unicosmk_extern_list *unicosmk_extern_head = 0; - -/* Output extern declarations which are required for every asm file. */ - -static void -unicosmk_output_default_externs (FILE *file) -{ - static const char *const externs[] = - { "__T3E_MISMATCH" }; - - int i; - int n; - - n = ARRAY_SIZE (externs); - - for (i = 0; i < n; i++) - fprintf (file, "\t.extern\t%s\n", externs[i]); -} - -/* Output extern declarations for global symbols which are have been - referenced but not defined. */ - -static void -unicosmk_output_externs (FILE *file) -{ - struct unicosmk_extern_list *p; - const char *real_name; - int len; - tree name_tree; - - len = strlen (user_label_prefix); - for (p = unicosmk_extern_head; p != 0; p = p->next) - { - /* We have to strip the encoding and possibly remove user_label_prefix - from the identifier in order to handle -fleading-underscore and - explicit asm names correctly (cf. gcc.dg/asm-names-1.c). */ - real_name = default_strip_name_encoding (p->name); - if (len && p->name[0] == '*' - && !memcmp (real_name, user_label_prefix, len)) - real_name += len; - - name_tree = get_identifier (real_name); - if (! TREE_ASM_WRITTEN (name_tree)) - { - TREE_ASM_WRITTEN (name_tree) = 1; - fputs ("\t.extern\t", file); - assemble_name (file, p->name); - putc ('\n', file); - } - } -} - -/* Record an extern. */ - -void -unicosmk_add_extern (const char *name) -{ - struct unicosmk_extern_list *p; - - p = (struct unicosmk_extern_list *) - xmalloc (sizeof (struct unicosmk_extern_list)); - p->next = unicosmk_extern_head; - p->name = name; - unicosmk_extern_head = p; -} - -/* The Cray assembler generates incorrect code if identifiers which - conflict with register names are used as instruction operands. We have - to replace such identifiers with DEX expressions. */ - -/* Structure to collect identifiers which have been replaced by DEX - expressions. */ -/* FIXME: needs to use GC, so it can be saved and restored for PCH. */ - -struct unicosmk_dex { - struct unicosmk_dex *next; - const char *name; -}; - -/* List of identifiers which have been replaced by DEX expressions. The DEX - number is determined by the position in the list. */ - -static struct unicosmk_dex *unicosmk_dex_list = NULL; - -/* The number of elements in the DEX list. */ - -static int unicosmk_dex_count = 0; - -/* Check if NAME must be replaced by a DEX expression. */ - -static int -unicosmk_special_name (const char *name) -{ - if (name[0] == '*') - ++name; - - if (name[0] == '$') - ++name; - - if (name[0] != 'r' && name[0] != 'f' && name[0] != 'R' && name[0] != 'F') - return 0; - - switch (name[1]) - { - case '1': case '2': - return (name[2] == '\0' || (ISDIGIT (name[2]) && name[3] == '\0')); - - case '3': - return (name[2] == '\0' - || ((name[2] == '0' || name[2] == '1') && name[3] == '\0')); - - default: - return (ISDIGIT (name[1]) && name[2] == '\0'); - } -} - -/* Return the DEX number if X must be replaced by a DEX expression and 0 - otherwise. */ - -static int -unicosmk_need_dex (rtx x) -{ - struct unicosmk_dex *dex; - const char *name; - int i; - - if (GET_CODE (x) != SYMBOL_REF) - return 0; - - name = XSTR (x,0); - if (! unicosmk_special_name (name)) - return 0; - - i = unicosmk_dex_count; - for (dex = unicosmk_dex_list; dex; dex = dex->next) - { - if (! strcmp (name, dex->name)) - return i; - --i; - } - - dex = (struct unicosmk_dex *) xmalloc (sizeof (struct unicosmk_dex)); - dex->name = name; - dex->next = unicosmk_dex_list; - unicosmk_dex_list = dex; - - ++unicosmk_dex_count; - return unicosmk_dex_count; -} - -/* Output the DEX definitions for this file. */ - -static void -unicosmk_output_dex (FILE *file) -{ - struct unicosmk_dex *dex; - int i; - - if (unicosmk_dex_list == NULL) - return; - - fprintf (file, "\t.dexstart\n"); - - i = unicosmk_dex_count; - for (dex = unicosmk_dex_list; dex; dex = dex->next) - { - fprintf (file, "\tDEX (%d) = ", i); - assemble_name (file, dex->name); - putc ('\n', file); - --i; - } - - fprintf (file, "\t.dexend\n"); -} - -/* Output text that to appear at the beginning of an assembler file. */ - -static void -unicosmk_file_start (void) -{ - int i; - - fputs ("\t.ident\t", asm_out_file); - unicosmk_output_module_name (asm_out_file); - fputs ("\n\n", asm_out_file); - - /* The Unicos/Mk assembler uses different register names. Instead of trying - to support them, we simply use micro definitions. */ - - /* CAM has different register names: rN for the integer register N and fN - for the floating-point register N. Instead of trying to use these in - alpha.md, we define the symbols $N and $fN to refer to the appropriate - register. */ - - for (i = 0; i < 32; ++i) - fprintf (asm_out_file, "$%d <- r%d\n", i, i); - - for (i = 0; i < 32; ++i) - fprintf (asm_out_file, "$f%d <- f%d\n", i, i); - - putc ('\n', asm_out_file); - - /* The .align directive fill unused space with zeroes which does not work - in code sections. We define the macro 'gcc@code@align' which uses nops - instead. Note that it assumes that code sections always have the - biggest possible alignment since . refers to the current offset from - the beginning of the section. */ - - fputs ("\t.macro gcc@code@align n\n", asm_out_file); - fputs ("gcc@n@bytes = 1 << n\n", asm_out_file); - fputs ("gcc@here = . % gcc@n@bytes\n", asm_out_file); - fputs ("\t.if ne, gcc@here, 0\n", asm_out_file); - fputs ("\t.repeat (gcc@n@bytes - gcc@here) / 4\n", asm_out_file); - fputs ("\tbis r31,r31,r31\n", asm_out_file); - fputs ("\t.endr\n", asm_out_file); - fputs ("\t.endif\n", asm_out_file); - fputs ("\t.endm gcc@code@align\n\n", asm_out_file); - - /* Output extern declarations which should always be visible. */ - unicosmk_output_default_externs (asm_out_file); - - /* Open a dummy section. We always need to be inside a section for the - section-switching code to work correctly. - ??? This should be a module id or something like that. I still have to - figure out what the rules for those are. */ - fputs ("\n\t.psect\t$SG00000,data\n", asm_out_file); -} - -/* Output text to appear at the end of an assembler file. This includes all - pending extern declarations and DEX expressions. */ - -static void -unicosmk_file_end (void) -{ - fputs ("\t.endp\n\n", asm_out_file); - - /* Output all pending externs. */ - - unicosmk_output_externs (asm_out_file); - - /* Output dex definitions used for functions whose names conflict with - register names. */ - - unicosmk_output_dex (asm_out_file); - - fputs ("\t.end\t", asm_out_file); - unicosmk_output_module_name (asm_out_file); - putc ('\n', asm_out_file); -} - -#else - -static void -unicosmk_output_deferred_case_vectors (FILE *file ATTRIBUTE_UNUSED) -{} - -static void -unicosmk_gen_dsib (unsigned long *imaskP ATTRIBUTE_UNUSED) -{} - -static void -unicosmk_output_ssib (FILE * file ATTRIBUTE_UNUSED, - const char * fnname ATTRIBUTE_UNUSED) -{} - -rtx -unicosmk_add_call_info_word (rtx x ATTRIBUTE_UNUSED) -{ - return NULL_RTX; -} - -static int -unicosmk_need_dex (rtx x ATTRIBUTE_UNUSED) -{ - return 0; -} - -#endif /* TARGET_ABI_UNICOSMK */ - -static void -alpha_init_libfuncs (void) -{ - if (TARGET_ABI_UNICOSMK) - { - /* Prevent gcc from generating calls to __divsi3. */ - set_optab_libfunc (sdiv_optab, SImode, 0); - set_optab_libfunc (udiv_optab, SImode, 0); - - /* Use the functions provided by the system library - for DImode integer division. */ - set_optab_libfunc (sdiv_optab, DImode, "$sldiv"); - set_optab_libfunc (udiv_optab, DImode, "$uldiv"); - } - else if (TARGET_ABI_OPEN_VMS) - { - /* Use the VMS runtime library functions for division and - remainder. */ - set_optab_libfunc (sdiv_optab, SImode, "OTS$DIV_I"); - set_optab_libfunc (sdiv_optab, DImode, "OTS$DIV_L"); - set_optab_libfunc (udiv_optab, SImode, "OTS$DIV_UI"); - set_optab_libfunc (udiv_optab, DImode, "OTS$DIV_UL"); - set_optab_libfunc (smod_optab, SImode, "OTS$REM_I"); - set_optab_libfunc (smod_optab, DImode, "OTS$REM_L"); - set_optab_libfunc (umod_optab, SImode, "OTS$REM_UI"); - set_optab_libfunc (umod_optab, DImode, "OTS$REM_UL"); - } -} - - -/* Initialize the GCC target structure. */ -#if TARGET_ABI_OPEN_VMS -# undef TARGET_ATTRIBUTE_TABLE -# define TARGET_ATTRIBUTE_TABLE vms_attribute_table -# undef TARGET_SECTION_TYPE_FLAGS -# 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 - -#if TARGET_ABI_UNICOSMK -# 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_void_FILEptr_constcharptr -#endif - -#undef TARGET_ASM_ALIGNED_HI_OP -#define TARGET_ASM_ALIGNED_HI_OP "\t.word\t" -#undef TARGET_ASM_ALIGNED_DI_OP -#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t" - -/* Default unaligned ops are provided for ELF systems. To get unaligned - data for non-ELF systems, we have to turn off auto alignment. */ -#ifndef OBJECT_FORMAT_ELF -#undef TARGET_ASM_UNALIGNED_HI_OP -#define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.word\t" -#undef TARGET_ASM_UNALIGNED_SI_OP -#define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.long\t" -#undef TARGET_ASM_UNALIGNED_DI_OP -#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 - -#undef TARGET_INIT_LIBFUNCS -#define TARGET_INIT_LIBFUNCS alpha_init_libfuncs - -#if TARGET_ABI_UNICOSMK -#undef TARGET_ASM_FILE_START -#define TARGET_ASM_FILE_START unicosmk_file_start -#undef TARGET_ASM_FILE_END -#define TARGET_ASM_FILE_END unicosmk_file_end -#else -#undef TARGET_ASM_FILE_START -#define TARGET_ASM_FILE_START alpha_file_start -#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE -#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true -#endif - -#undef TARGET_SCHED_ADJUST_COST -#define TARGET_SCHED_ADJUST_COST alpha_adjust_cost -#undef TARGET_SCHED_ISSUE_RATE -#define TARGET_SCHED_ISSUE_RATE alpha_issue_rate -#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE -#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \ - alpha_use_dfa_pipeline_interface -#undef TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD -#define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD \ - alpha_multipass_dfa_lookahead - -#undef TARGET_HAVE_TLS -#define TARGET_HAVE_TLS HAVE_AS_TLS - -#undef TARGET_INIT_BUILTINS -#define TARGET_INIT_BUILTINS alpha_init_builtins -#undef TARGET_EXPAND_BUILTIN -#define TARGET_EXPAND_BUILTIN alpha_expand_builtin - -#undef TARGET_FUNCTION_OK_FOR_SIBCALL -#define TARGET_FUNCTION_OK_FOR_SIBCALL alpha_function_ok_for_sibcall -#undef TARGET_CANNOT_COPY_INSN_P -#define TARGET_CANNOT_COPY_INSN_P alpha_cannot_copy_insn_p -#undef TARGET_CANNOT_FORCE_CONST_MEM -#define TARGET_CANNOT_FORCE_CONST_MEM alpha_cannot_force_const_mem - -#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 - -#undef TARGET_RTX_COSTS -#define TARGET_RTX_COSTS alpha_rtx_costs -#undef TARGET_ADDRESS_COST -#define TARGET_ADDRESS_COST hook_int_rtx_0 - -#undef TARGET_MACHINE_DEPENDENT_REORG -#define TARGET_MACHINE_DEPENDENT_REORG alpha_reorg - -#undef TARGET_PROMOTE_FUNCTION_ARGS -#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true -#undef TARGET_PROMOTE_FUNCTION_RETURN -#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true -#undef TARGET_PROMOTE_PROTOTYPES -#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false -#undef TARGET_STRUCT_VALUE_RTX -#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null -#undef TARGET_RETURN_IN_MEMORY -#define TARGET_RETURN_IN_MEMORY alpha_return_in_memory -#undef TARGET_SETUP_INCOMING_VARARGS -#define TARGET_SETUP_INCOMING_VARARGS alpha_setup_incoming_varargs -#undef TARGET_STRICT_ARGUMENT_NAMING -#define TARGET_STRICT_ARGUMENT_NAMING hook_bool_CUMULATIVE_ARGS_true -#undef TARGET_PRETEND_OUTGOING_VARARGS_NAMED -#define TARGET_PRETEND_OUTGOING_VARARGS_NAMED hook_bool_CUMULATIVE_ARGS_true -#undef TARGET_SPLIT_COMPLEX_ARG -#define TARGET_SPLIT_COMPLEX_ARG alpha_split_complex_arg - -#undef TARGET_BUILD_BUILTIN_VA_LIST -#define TARGET_BUILD_BUILTIN_VA_LIST alpha_build_builtin_va_list - -struct gcc_target targetm = TARGET_INITIALIZER; - - -#include "gt-alpha.h" diff --git a/contrib/gcc/config/alpha/alpha.h b/contrib/gcc/config/alpha/alpha.h deleted file mode 100644 index ae3a349..0000000 --- a/contrib/gcc/config/alpha/alpha.h +++ /dev/null @@ -1,1843 +0,0 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2004 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - -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. */ - -/* 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"); \ - if (TARGET_LONG_DOUBLE_128) \ - builtin_define ("__LONG_DOUBLE_128__"); \ - \ - /* Macros dependent on the C dialect. */ \ - SUBTARGET_LANGUAGE_CPP_BUILTINS(); \ -} while (0) - -#ifndef SUBTARGET_LANGUAGE_CPP_BUILTINS -#define SUBTARGET_LANGUAGE_CPP_BUILTINS() \ - do \ - { \ - if (preprocessing_asm_p ()) \ - builtin_define_std ("LANGUAGE_ASSEMBLY"); \ - else if (c_dialect_cxx ()) \ - { \ - builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \ - builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \ - } \ - else \ - builtin_define_std ("LANGUAGE_C"); \ - if (c_dialect_objc ()) \ - { \ - builtin_define ("__LANGUAGE_OBJECTIVE_C"); \ - builtin_define ("__LANGUAGE_OBJECTIVE_C__"); \ - } \ - } \ - while (0) -#endif - -#define CPP_SPEC "%(cpp_subtarget)" - -#ifndef CPP_SUBTARGET_SPEC -#define CPP_SUBTARGET_SPEC "" -#endif - -#define WORD_SWITCH_TAKES_ARG(STR) \ - (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR)) - -/* Print subsidiary information on the compiler version in use. */ -#define TARGET_VERSION - -/* Run-time compilation parameters selecting different hardware subsets. */ - -/* Which processor to schedule for. The cpu attribute defines a list that - mirrors this list, so changes to alpha.md must be made at the same time. */ - -enum processor_type -{ - PROCESSOR_EV4, /* 2106[46]{a,} */ - PROCESSOR_EV5, /* 21164{a,pc,} */ - PROCESSOR_EV6, /* 21264 */ - PROCESSOR_MAX -}; - -extern enum processor_type alpha_cpu; - -enum alpha_trap_precision -{ - ALPHA_TP_PROG, /* No precision (default). */ - ALPHA_TP_FUNC, /* Trap contained within originating function. */ - ALPHA_TP_INSN /* Instruction accuracy and code is resumption safe. */ -}; - -enum alpha_fp_rounding_mode -{ - ALPHA_FPRM_NORM, /* Normal rounding mode. */ - ALPHA_FPRM_MINF, /* Round towards minus-infinity. */ - ALPHA_FPRM_CHOP, /* Chopped rounding mode (towards 0). */ - ALPHA_FPRM_DYN /* Dynamic rounding mode. */ -}; - -enum alpha_fp_trap_mode -{ - ALPHA_FPTM_N, /* Normal trap mode. */ - ALPHA_FPTM_U, /* Underflow traps enabled. */ - ALPHA_FPTM_SU, /* Software completion, w/underflow traps */ - ALPHA_FPTM_SUI /* Software completion, w/underflow & inexact traps */ -}; - -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. */ -#define MASK_FP (1 << 0) -#define TARGET_FP (target_flags & MASK_FP) - -/* This means that floating-point registers are allowed to be used. Note - that Alpha implementations without FP operations are required to - provide the FP registers. */ - -#define MASK_FPREGS (1 << 1) -#define TARGET_FPREGS (target_flags & MASK_FPREGS) - -/* This means that gas is used to process the assembler file. */ - -#define MASK_GAS (1 << 2) -#define TARGET_GAS (target_flags & MASK_GAS) - -/* This means that we should mark procedures as IEEE conformant. */ - -#define MASK_IEEE_CONFORMANT (1 << 3) -#define TARGET_IEEE_CONFORMANT (target_flags & MASK_IEEE_CONFORMANT) - -/* This means we should be IEEE-compliant except for inexact. */ - -#define MASK_IEEE (1 << 4) -#define TARGET_IEEE (target_flags & MASK_IEEE) - -/* This means we should be fully IEEE-compliant. */ - -#define MASK_IEEE_WITH_INEXACT (1 << 5) -#define TARGET_IEEE_WITH_INEXACT (target_flags & MASK_IEEE_WITH_INEXACT) - -/* This means we must construct all constants rather than emitting - them as literal data. */ - -#define MASK_BUILD_CONSTANTS (1 << 6) -#define TARGET_BUILD_CONSTANTS (target_flags & MASK_BUILD_CONSTANTS) - -/* This means we handle floating points in VAX F- (float) - or G- (double) Format. */ - -#define MASK_FLOAT_VAX (1 << 7) -#define TARGET_FLOAT_VAX (target_flags & MASK_FLOAT_VAX) - -/* This means that the processor has byte and half word loads and stores - (the BWX extension). */ - -#define MASK_BWX (1 << 8) -#define TARGET_BWX (target_flags & MASK_BWX) - -/* This means that the processor has the MAX extension. */ -#define MASK_MAX (1 << 9) -#define TARGET_MAX (target_flags & MASK_MAX) - -/* This means that the processor has the FIX extension. */ -#define MASK_FIX (1 << 10) -#define TARGET_FIX (target_flags & MASK_FIX) - -/* This means that the processor has the CIX extension. */ -#define MASK_CIX (1 << 11) -#define TARGET_CIX (target_flags & MASK_CIX) - -/* This means use !literal style explicit relocations. */ -#define MASK_EXPLICIT_RELOCS (1 << 12) -#define TARGET_EXPLICIT_RELOCS (target_flags & MASK_EXPLICIT_RELOCS) - -/* This means use 16-bit relocations to .sdata/.sbss. */ -#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 use direct branches to local functions. */ -#define MASK_SMALL_TEXT (1 << 15) -#define TARGET_SMALL_TEXT (target_flags & MASK_SMALL_TEXT) - -/* This means use IEEE quad-format for long double. Assumes the - presence of the GEM support library routines. */ -#define MASK_LONG_DOUBLE_128 (1 << 16) -#define TARGET_LONG_DOUBLE_128 (target_flags & MASK_LONG_DOUBLE_128) - -/* 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) -#define TARGET_CPU_EV5 (target_flags & MASK_CPU_EV5) - -/* Likewise for EV6. */ -#define MASK_CPU_EV6 (1 << 29) -#define TARGET_CPU_EV6 (target_flags & MASK_CPU_EV6) - -/* This means we support the .arch directive in the assembler. Only - defined in TARGET_CPU_DEFAULT. */ -#define MASK_SUPPORT_ARCH (1 << 30) -#define TARGET_SUPPORT_ARCH (target_flags & MASK_SUPPORT_ARCH) - -/* These are for target os support and cannot be changed at runtime. */ -#define TARGET_ABI_WINDOWS_NT 0 -#define TARGET_ABI_OPEN_VMS 0 -#define TARGET_ABI_UNICOSMK 0 -#define TARGET_ABI_OSF (!TARGET_ABI_WINDOWS_NT \ - && !TARGET_ABI_OPEN_VMS \ - && !TARGET_ABI_UNICOSMK) - -#ifndef TARGET_AS_CAN_SUBTRACT_LABELS -#define TARGET_AS_CAN_SUBTRACT_LABELS TARGET_GAS -#endif -#ifndef TARGET_AS_SLASH_BEFORE_SUFFIX -#define TARGET_AS_SLASH_BEFORE_SUFFIX TARGET_GAS -#endif -#ifndef TARGET_CAN_FAULT_IN_PROLOGUE -#define TARGET_CAN_FAULT_IN_PROLOGUE 0 -#endif -#ifndef TARGET_HAS_XFLOATING_LIBS -#define TARGET_HAS_XFLOATING_LIBS TARGET_LONG_DOUBLE_128 -#endif -#ifndef TARGET_PROFILING_NEEDS_GP -#define TARGET_PROFILING_NEEDS_GP 0 -#endif -#ifndef TARGET_LD_BUGGY_LDGP -#define TARGET_LD_BUGGY_LDGP 0 -#endif -#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, - each pair being { "NAME", VALUE } - where VALUE is the bits to set or minus the bits to clear. - An empty string NAME is used to identify the default VALUE. */ - -#define TARGET_SWITCHES \ - { {"no-soft-float", MASK_FP, N_("Use hardware fp")}, \ - {"soft-float", - MASK_FP, N_("Do not use hardware fp")}, \ - {"fp-regs", MASK_FPREGS, N_("Use fp registers")}, \ - {"no-fp-regs", - (MASK_FP|MASK_FPREGS), \ - N_("Do not use fp registers")}, \ - {"alpha-as", -MASK_GAS, N_("Do not assume GAS")}, \ - {"gas", MASK_GAS, N_("Assume GAS")}, \ - {"ieee-conformant", MASK_IEEE_CONFORMANT, \ - N_("Request IEEE-conformant math library routines (OSF/1)")}, \ - {"ieee", MASK_IEEE|MASK_IEEE_CONFORMANT, \ - N_("Emit IEEE-conformant code, without inexact exceptions")}, \ - {"ieee-with-inexact", MASK_IEEE_WITH_INEXACT|MASK_IEEE_CONFORMANT, \ - N_("Emit IEEE-conformant code, with inexact exceptions")}, \ - {"build-constants", MASK_BUILD_CONSTANTS, \ - N_("Do not emit complex integer constants to read-only memory")}, \ - {"float-vax", MASK_FLOAT_VAX, N_("Use VAX fp")}, \ - {"float-ieee", -MASK_FLOAT_VAX, N_("Do not use VAX fp")}, \ - {"bwx", MASK_BWX, N_("Emit code for the byte/word ISA extension")}, \ - {"no-bwx", -MASK_BWX, ""}, \ - {"max", MASK_MAX, \ - N_("Emit code for the motion video ISA extension")}, \ - {"no-max", -MASK_MAX, ""}, \ - {"fix", MASK_FIX, \ - N_("Emit code for the fp move and sqrt ISA extension")}, \ - {"no-fix", -MASK_FIX, ""}, \ - {"cix", MASK_CIX, N_("Emit code for the counting ISA extension")}, \ - {"no-cix", -MASK_CIX, ""}, \ - {"explicit-relocs", MASK_EXPLICIT_RELOCS, \ - N_("Emit code using explicit relocation directives")}, \ - {"no-explicit-relocs", -MASK_EXPLICIT_RELOCS, ""}, \ - {"small-data", MASK_SMALL_DATA, \ - 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")}, \ - {"small-text", MASK_SMALL_TEXT, \ - N_("Emit direct branches to local functions")}, \ - {"large-text", -MASK_SMALL_TEXT, ""}, \ - {"tls-kernel", MASK_TLS_KERNEL, \ - N_("Emit rdval instead of rduniq for thread pointer")}, \ - {"long-double-128", MASK_LONG_DOUBLE_128, \ - N_("Use 128-bit long double")}, \ - {"long-double-64", -MASK_LONG_DOUBLE_128, \ - N_("Use 64-bit long double")}, \ - {"", TARGET_DEFAULT | TARGET_CPU_DEFAULT \ - | TARGET_DEFAULT_EXPLICIT_RELOCS, ""} } - -#define TARGET_DEFAULT MASK_FP|MASK_FPREGS - -#ifndef TARGET_CPU_DEFAULT -#define TARGET_CPU_DEFAULT 0 -#endif - -#ifndef TARGET_DEFAULT_EXPLICIT_RELOCS -#ifdef HAVE_AS_EXPLICIT_RELOCS -#define TARGET_DEFAULT_EXPLICIT_RELOCS MASK_EXPLICIT_RELOCS -#else -#define TARGET_DEFAULT_EXPLICIT_RELOCS 0 -#endif -#endif - -extern const char *alpha_cpu_string; /* For -mcpu= */ -extern const char *alpha_tune_string; /* For -mtune= */ -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 \ -{ \ - {"cpu=", &alpha_cpu_string, \ - N_("Use features of and schedule given CPU"), 0}, \ - {"tune=", &alpha_tune_string, \ - N_("Schedule given CPU"), 0}, \ - {"fp-rounding-mode=", &alpha_fprm_string, \ - N_("Control the generated fp rounding mode"), 0}, \ - {"fp-trap-mode=", &alpha_fptm_string, \ - N_("Control the IEEE trap mode"), 0}, \ - {"trap-precision=", &alpha_tp_string, \ - N_("Control the precision given to fp exceptions"), 0}, \ - {"memory-latency=", &alpha_mlat_string, \ - N_("Tune expected memory latency"), 0}, \ - {"tls-size=", &alpha_tls_size_string, \ - N_("Specify bit size of immediate TLS offsets"), 0}, \ -} - -/* Support for a compile-time default CPU, et cetera. The rules are: - --with-cpu is ignored if -mcpu is specified. - --with-tune is ignored if -mtune is specified. */ -#define OPTION_DEFAULT_SPECS \ - {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }, \ - {"tune", "%{!mtune=*:-mtune=%(VALUE)}" } - -/* This macro defines names of additional specifications to put in the - specs that can be used in various specifications like CC1_SPEC. Its - definition is an initializer with a subgrouping for each command option. - - Each subgrouping contains a string constant, that defines the - specification name, and a string constant that used by the GCC driver - program. - - Do not define this macro if it does not need to do anything. */ - -#ifndef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS -#endif - -#define EXTRA_SPECS \ - { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \ - SUBTARGET_EXTRA_SPECS - - -/* Sometimes certain combinations of command options do not make sense - on a particular target machine. You can define a macro - `OVERRIDE_OPTIONS' to take account of this. This macro, if - defined, is executed once just after all the command options have - been parsed. - - On the Alpha, it is used to translate target-option strings into - numeric values. */ - -#define OVERRIDE_OPTIONS override_options () - - -/* Define this macro to change register usage conditional on target flags. - - On the Alpha, we use this to disable the floating-point registers when - they don't exist. */ - -#define CONDITIONAL_REGISTER_USAGE \ -{ \ - int i; \ - if (! TARGET_FPREGS) \ - for (i = 32; i < 63; i++) \ - fixed_regs[i] = call_used_regs[i] = 1; \ -} - - -/* Show we can debug even without a frame pointer. */ -#define CAN_DEBUG_WITHOUT_FP - -/* target machine storage layout */ - -/* Define the size of `int'. The default is the same as the word size. */ -#define INT_TYPE_SIZE 32 - -/* Define the size of `long long'. The default is the twice the word size. */ -#define LONG_LONG_TYPE_SIZE 64 - -/* We're IEEE unless someone says to use VAX. */ -#define TARGET_FLOAT_FORMAT \ - (TARGET_FLOAT_VAX ? VAX_FLOAT_FORMAT : IEEE_FLOAT_FORMAT) - -/* The two floating-point formats we support are S-floating, which is - 4 bytes, and T-floating, which is 8 bytes. `float' is S and `double' - and `long double' are T. */ - -#define FLOAT_TYPE_SIZE 32 -#define DOUBLE_TYPE_SIZE 64 -#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) - -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#ifdef __LONG_DOUBLE_128__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - -/* Work around target_flags dependency in ada/targtyps.c. */ -#define WIDEST_HARDWARE_FP_SIZE 64 - -#define WCHAR_TYPE "unsigned int" -#define WCHAR_TYPE_SIZE 32 - -/* Define this macro if it is advisable to hold scalars in registers - in a wider mode than that declared by the program. In such cases, - the value is constrained to be within the bounds of the declared - type, but kept valid in the wider mode. The signedness of the - extension may differ from that of the type. - - For Alpha, we always store objects in a full register. 32-bit objects - are always sign-extended, but smaller objects retain their signedness. */ - -#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ - { \ - if ((MODE) == SImode) \ - (UNSIGNEDP) = 0; \ - (MODE) = DImode; \ - } - -/* Define this if most significant bit is lowest numbered - in instructions that operate on numbered bit-fields. - - There are no such instructions on the Alpha, but the documentation - is little endian. */ -#define BITS_BIG_ENDIAN 0 - -/* Define this if most significant byte of a word is the lowest numbered. - This is false on the Alpha. */ -#define BYTES_BIG_ENDIAN 0 - -/* Define this if most significant word of a multiword number is lowest - numbered. - - For Alpha we can decide arbitrarily since there are no machine instructions - for them. Might as well be consistent with bytes. */ -#define WORDS_BIG_ENDIAN 0 - -/* Width of a word, in units (bytes). */ -#define UNITS_PER_WORD 8 - -/* Width in bits of a pointer. - See also the macro `Pmode' defined below. */ -#define POINTER_SIZE 64 - -/* Allocation boundary (in *bits*) for storing arguments in argument list. */ -#define PARM_BOUNDARY 64 - -/* Boundary (in *bits*) on which stack pointer should be aligned. */ -#define STACK_BOUNDARY 128 - -/* Allocation boundary (in *bits*) for the code of a function. */ -#define FUNCTION_BOUNDARY 32 - -/* Alignment of field after `int : 0' in a structure. */ -#define EMPTY_FIELD_BOUNDARY 64 - -/* Every structure's size must be a multiple of this. */ -#define STRUCTURE_SIZE_BOUNDARY 8 - -/* A bit-field declared as `int' forces `int' alignment for the struct. */ -#define PCC_BITFIELD_TYPE_MATTERS 1 - -/* No data type wants to be aligned rounder than this. */ -#define BIGGEST_ALIGNMENT 128 - -/* For atomic access to objects, must have at least 32-bit alignment - unless the machine has byte operations. */ -#define MINIMUM_ATOMIC_ALIGNMENT ((unsigned int) (TARGET_BWX ? 8 : 32)) - -/* Align all constants and variables to at least a word boundary so - we can pick up pieces of them faster. */ -/* ??? Only if block-move stuff knows about different source/destination - alignment. */ -#if 0 -#define CONSTANT_ALIGNMENT(EXP, ALIGN) MAX ((ALIGN), BITS_PER_WORD) -#define DATA_ALIGNMENT(EXP, ALIGN) MAX ((ALIGN), BITS_PER_WORD) -#endif - -/* Set this nonzero if move instructions will actually fail to work - when given unaligned data. - - Since we get an error message when we do one, call them invalid. */ - -#define STRICT_ALIGNMENT 1 - -/* Set this nonzero if unaligned move instructions are extremely slow. - - On the Alpha, they trap. */ - -#define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) 1 - -/* Standard register usage. */ - -/* Number of actual hardware registers. - The hardware registers are assigned numbers for the compiler - from 0 to just below FIRST_PSEUDO_REGISTER. - All registers that the compiler knows about must be given numbers, - even those that are not normally considered general registers. - - We define all 32 integer registers, even though $31 is always zero, - and all 32 floating-point registers, even though $f31 is also - always zero. We do not bother defining the FP status register and - there are no other registers. - - Since $31 is always zero, we will use register number 31 as the - argument pointer. It will never appear in the generated code - because we will always be eliminating it in favor of the stack - pointer or hardware frame pointer. - - Likewise, we use $f31 for the frame pointer, which will always - be eliminated in favor of the hardware frame pointer or the - stack pointer. */ - -#define FIRST_PSEUDO_REGISTER 64 - -/* 1 for registers that have pervasive standard uses - and are not available for the register allocator. */ - -#define FIXED_REGISTERS \ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } - -/* 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. */ -#define CALL_USED_REGISTERS \ - {1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, \ - 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - -/* List the order in which to allocate registers. Each register must be - listed once, even those in FIXED_REGISTERS. */ - -#define REG_ALLOC_ORDER { \ - 1, 2, 3, 4, 5, 6, 7, 8, /* nonsaved integer registers */ \ - 22, 23, 24, 25, 28, /* likewise */ \ - 0, /* likewise, but return value */ \ - 21, 20, 19, 18, 17, 16, /* likewise, but input args */ \ - 27, /* likewise, but OSF procedure value */ \ - \ - 42, 43, 44, 45, 46, 47, /* nonsaved floating-point registers */ \ - 54, 55, 56, 57, 58, 59, /* likewise */ \ - 60, 61, 62, /* likewise */ \ - 32, 33, /* likewise, but return values */ \ - 53, 52, 51, 50, 49, 48, /* likewise, but input args */ \ - \ - 9, 10, 11, 12, 13, 14, /* saved integer registers */ \ - 26, /* return address */ \ - 15, /* hard frame pointer */ \ - \ - 34, 35, 36, 37, 38, 39, /* saved floating-point registers */ \ - 40, 41, /* likewise */ \ - \ - 29, 30, 31, 63 /* gp, sp, ap, sfp */ \ -} - -/* Return number of consecutive hard regs needed starting at reg REGNO - to hold something of mode MODE. - This is ordinarily the length in words of a value of mode MODE - but can be less for certain modes in special long registers. */ - -#define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - -/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. - On Alpha, the integer registers can hold any mode. The floating-point - registers can hold 64-bit integers as well, but not smaller values. */ - -#define HARD_REGNO_MODE_OK(REGNO, MODE) \ - ((REGNO) >= 32 && (REGNO) <= 62 \ - ? (MODE) == SFmode || (MODE) == DFmode || (MODE) == DImode \ - || (MODE) == SCmode || (MODE) == DCmode \ - : 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. - - This asymmetric test is true when MODE1 could be put - in an FP register but MODE2 could not. */ - -#define MODES_TIEABLE_P(MODE1, MODE2) \ - (HARD_REGNO_MODE_OK (32, (MODE1)) \ - ? HARD_REGNO_MODE_OK (32, (MODE2)) \ - : 1) - -/* Specify the registers used for certain standard purposes. - The values of these macros are register numbers. */ - -/* Alpha pc isn't overloaded on a register that the compiler knows about. */ -/* #define PC_REGNUM */ - -/* Register to use for pushing function arguments. */ -#define STACK_POINTER_REGNUM 30 - -/* Base register for access to local variables of the function. */ -#define HARD_FRAME_POINTER_REGNUM 15 - -/* Value should be nonzero if functions must have frame pointers. - Zero means the frame pointer need not be set up (and parms - may be accessed via the stack pointer) in functions that seem suitable. - This is computed in `reload', in reload1.c. */ -#define FRAME_POINTER_REQUIRED 0 - -/* Base register for access to arguments of the function. */ -#define ARG_POINTER_REGNUM 31 - -/* Base register for access to local variables of function. */ -#define FRAME_POINTER_REGNUM 63 - -/* Register in which static-chain is passed to a function. - - For the Alpha, this is based on an example; the calling sequence - doesn't seem to specify this. */ -#define STATIC_CHAIN_REGNUM 1 - -/* The register number of the register used to address a table of - static data addresses in memory. */ -#define PIC_OFFSET_TABLE_REGNUM 29 - -/* Define this macro if the register defined by `PIC_OFFSET_TABLE_REGNUM' - is clobbered by calls. */ -/* ??? It is and it isn't. It's required to be valid for a given - function when the function returns. It isn't clobbered by - current_file functions. Moreover, we do not expose the ldgp - until after reload, so we're probably safe. */ -/* #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED */ - -/* Define the classes of registers for register constraints in the - machine description. Also define ranges of constants. - - One of the classes must always be named ALL_REGS and include all hard regs. - If there is more than one class, another class must be named NO_REGS - and contain no registers. - - The name GENERAL_REGS must be the name of a class (or an alias for - another name such as ALL_REGS). This is the class of registers - that is allowed by "g" or "r" in a register constraint. - Also, registers outside this class are allocated only when - instructions express preferences for them. - - The classes must be numbered in nondecreasing order; that is, - a larger-numbered class must never be contained completely - in a smaller-numbered class. - - For any two classes, it is very desirable that there be another - class that represents their union. */ - -enum reg_class { - NO_REGS, R0_REG, R24_REG, R25_REG, R27_REG, - GENERAL_REGS, FLOAT_REGS, ALL_REGS, - LIM_REG_CLASSES -}; - -#define N_REG_CLASSES (int) LIM_REG_CLASSES - -/* Give names of register classes as strings for dump file. */ - -#define REG_CLASS_NAMES \ - {"NO_REGS", "R0_REG", "R24_REG", "R25_REG", "R27_REG", \ - "GENERAL_REGS", "FLOAT_REGS", "ALL_REGS" } - -/* Define which registers fit in which classes. - This is an initializer for a vector of HARD_REG_SET - of length N_REG_CLASSES. */ - -#define REG_CLASS_CONTENTS \ -{ {0x00000000, 0x00000000}, /* NO_REGS */ \ - {0x00000001, 0x00000000}, /* R0_REG */ \ - {0x01000000, 0x00000000}, /* R24_REG */ \ - {0x02000000, 0x00000000}, /* R25_REG */ \ - {0x08000000, 0x00000000}, /* R27_REG */ \ - {0xffffffff, 0x80000000}, /* GENERAL_REGS */ \ - {0x00000000, 0x7fffffff}, /* FLOAT_REGS */ \ - {0xffffffff, 0xffffffff} } - -/* The same information, inverted: - Return the class number of the smallest class containing - reg number REGNO. This could be a conditional expression - or could index an array. */ - -#define REGNO_REG_CLASS(REGNO) \ - ((REGNO) == 0 ? R0_REG \ - : (REGNO) == 24 ? R24_REG \ - : (REGNO) == 25 ? R25_REG \ - : (REGNO) == 27 ? R27_REG \ - : (REGNO) >= 32 && (REGNO) <= 62 ? FLOAT_REGS \ - : GENERAL_REGS) - -/* The class value for index registers, and the one for base regs. */ -#define INDEX_REG_CLASS NO_REGS -#define BASE_REG_CLASS GENERAL_REGS - -/* Get reg_class from a letter such as appears in the machine description. */ - -#define REG_CLASS_FROM_LETTER(C) \ - ((C) == 'a' ? R24_REG \ - : (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. */ -/* #define CONDITIONAL_REGISTER_USAGE */ - -/* The letters I, J, K, L, M, N, O, and P in a register constraint string - can be used to stand for particular ranges of immediate operands. - This macro defines what the ranges are. - C is the letter, and VALUE is a constant value. - Return 1 if VALUE is in the range specified by C. - - For Alpha: - `I' is used for the range of constants most insns can contain. - `J' is the constant zero. - `K' is used for the constant in an LDA insn. - `L' is used for the constant in a LDAH insn. - `M' is used for the constants that can be AND'ed with using a ZAP insn. - `N' is used for complemented 8-bit constants. - `O' is used for negated 8-bit constants. - `P' is used for the constants 1, 2 and 3. */ - -#define CONST_OK_FOR_LETTER_P alpha_const_ok_for_letter_p - -/* Similar, but for floating or large integer constants, and defining letters - G and H. Here VALUE is the CONST_DOUBLE rtx itself. - - For Alpha, `G' is the floating-point constant zero. `H' is a CONST_DOUBLE - that is the operand of a ZAP insn. */ - -#define CONST_DOUBLE_OK_FOR_LETTER_P alpha_const_double_ok_for_letter_p - -/* Optional extra constraints for this machine. - - For the Alpha, `Q' means that this is a memory operand but not a - reference to an unaligned location. - - `R' is a SYMBOL_REF that has SYMBOL_REF_FLAG set or is the current - function. - - 'S' is a 6-bit constant (valid for a shift insn). - - 'T' is a HIGH. - - 'U' is a symbolic operand. - - 'W' is a vector zero. */ - -#define EXTRA_CONSTRAINT alpha_extra_constraint - -/* Given an rtx X being reloaded into a reg required to be - in class CLASS, return the class of reg to actually use. - In general this is just CLASS; but on some machines - in some cases it is preferable to use a more restrictive class. */ - -#define PREFERRED_RELOAD_CLASS alpha_preferred_reload_class - -/* Loading and storing HImode or QImode values to and from memory - usually requires a scratch register. The exceptions are loading - QImode and HImode from an aligned address to a general register - unless byte instructions are permitted. - We also cannot load an unaligned address or a paradoxical SUBREG into an - FP register. */ - -#define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,IN) \ - secondary_reload_class((CLASS), (MODE), (IN), 1) - -#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,OUT) \ - secondary_reload_class((CLASS), (MODE), (OUT), 0) - -/* If we are copying between general and FP registers, we need a memory - location unless the FIX extension is available. */ - -#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) \ - (! TARGET_FIX && (((CLASS1) == FLOAT_REGS && (CLASS2) != FLOAT_REGS) \ - || ((CLASS2) == FLOAT_REGS && (CLASS1) != FLOAT_REGS))) - -/* Specify the mode to be used for memory when a secondary memory - location is needed. If MODE is floating-point, use it. Otherwise, - widen to a word like the default. This is needed because we always - store integers in FP registers in quadword format. This whole - area is very tricky! */ -#define SECONDARY_MEMORY_NEEDED_MODE(MODE) \ - (GET_MODE_CLASS (MODE) == MODE_FLOAT ? (MODE) \ - : GET_MODE_SIZE (MODE) >= 4 ? (MODE) \ - : mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (MODE), 0)) - -/* Return the maximum number of consecutive registers - needed to represent mode MODE in a register of class CLASS. */ - -#define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - -/* Return the class of registers that cannot change mode from FROM to TO. */ - -#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ - (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ - ? reg_classes_intersect_p (FLOAT_REGS, CLASS) : 0) - -/* Define the cost of moving between registers of various classes. Moving - between FLOAT_REGS and anything else except float regs is expensive. - In fact, we make it quite expensive because we really don't want to - do these moves unless it is clearly worth it. Optimizations may - reduce the impact of not being able to allocate a pseudo to a - hard register. */ - -#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ - (((CLASS1) == FLOAT_REGS) == ((CLASS2) == FLOAT_REGS) \ - ? 2 \ - : TARGET_FIX ? 3 : 4+2*alpha_memory_latency) - -/* A C expressions returning the cost of moving data of MODE from a register to - or from memory. - - On the Alpha, bump this up a bit. */ - -extern int alpha_memory_latency; -#define MEMORY_MOVE_COST(MODE,CLASS,IN) (2*alpha_memory_latency) - -/* Provide the cost of a branch. Exact meaning under development. */ -#define BRANCH_COST 5 - -/* Stack layout; function entry, exit and calling. */ - -/* Define this if pushing a word on the stack - makes the stack pointer a smaller address. */ -#define STACK_GROWS_DOWNWARD - -/* Define this if the nominal address of the stack frame - is at the high-address end of the local variables; - that is, each additional local variable allocated - goes at a more negative offset in the frame. */ -/* #define FRAME_GROWS_DOWNWARD */ - -/* Offset within stack frame to start allocating local variables at. - If FRAME_GROWS_DOWNWARD, this is the offset to the END of the - first local allocated. Otherwise, it is the offset to the BEGINNING - of the first local allocated. */ - -#define STARTING_FRAME_OFFSET 0 - -/* If we generate an insn to push BYTES bytes, - this says how many the stack pointer really advances by. - On Alpha, don't define this because there are no push insns. */ -/* #define PUSH_ROUNDING(BYTES) */ - -/* Define this to be nonzero if stack checking is built into the ABI. */ -#define STACK_CHECK_BUILTIN 1 - -/* Define this if the maximum size of all the outgoing args is to be - accumulated and pushed during the prologue. The amount can be - found in the variable current_function_outgoing_args_size. */ -#define ACCUMULATE_OUTGOING_ARGS 1 - -/* Offset of first parameter from the argument pointer register value. */ - -#define FIRST_PARM_OFFSET(FNDECL) 0 - -/* Definitions for register eliminations. - - We have two registers that can be eliminated on the Alpha. First, the - frame pointer register can often be eliminated in favor of the stack - pointer register. Secondly, the argument pointer register can always be - eliminated; it is replaced with either the stack or frame pointer. */ - -/* This is an array of structures. Each structure initializes one pair - of eliminable registers. The "from" register number is given first, - followed by "to". Eliminations of the same "from" register are listed - in order of preference. */ - -#define ELIMINABLE_REGS \ -{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ - { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}} - -/* Given FROM and TO register numbers, say whether this elimination is allowed. - Frame pointer elimination is automatically handled. - - All eliminations are valid since the cases where FP can't be - eliminated are already handled. */ - -#define CAN_ELIMINATE(FROM, TO) 1 - -/* Round up to a multiple of 16 bytes. */ -#define ALPHA_ROUND(X) (((X) + 15) & ~ 15) - -/* Define the offset between two registers, one to be eliminated, and the other - its replacement, at the start of a routine. */ -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - ((OFFSET) = alpha_initial_elimination_offset(FROM, TO)) - -/* Define this if stack space is still allocated for a parameter passed - in a register. */ -/* #define REG_PARM_STACK_SPACE */ - -/* Value is the number of bytes of arguments automatically - popped when returning from a subroutine call. - FUNDECL is the declaration node of the function (as a tree), - FUNTYPE is the data type of the function (as a tree), - or for a library call it is an identifier node for the subroutine name. - SIZE is the number of bytes of arguments passed on the stack. */ - -#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 - -/* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. - - On Alpha the value is found in $0 for integer functions and - $f0 for floating-point functions. */ - -#define FUNCTION_VALUE(VALTYPE, FUNC) \ - function_value (VALTYPE, FUNC, VOIDmode) - -/* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - -#define LIBCALL_VALUE(MODE) \ - function_value (NULL, NULL, MODE) - -/* 1 if N is a possible register number for a function value - as seen by the caller. */ - -#define FUNCTION_VALUE_REGNO_P(N) \ - ((N) == 0 || (N) == 1 || (N) == 32 || (N) == 33) - -/* 1 if N is a possible register number for function argument passing. - On Alpha, these are $16-$21 and $f16-$f21. */ - -#define FUNCTION_ARG_REGNO_P(N) \ - (((N) >= 16 && (N) <= 21) || ((N) >= 16 + 32 && (N) <= 21 + 32)) - -/* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - On Alpha, this is a single integer, which is a number of words - of arguments scanned so far. - Thus 6 or more means all following args should go on the stack. */ - -#define CUMULATIVE_ARGS int - -/* Initialize a variable CUM of type CUMULATIVE_ARGS - for a call to a function whose data type is FNTYPE. - For a library call, FNTYPE is 0. */ - -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ - (CUM) = 0 - -/* Define intermediate macro to compute the size (in registers) of an argument - for the Alpha. */ - -#define ALPHA_ARG_SIZE(MODE, TYPE, NAMED) \ - ((MODE) == TFmode || (MODE) == TCmode ? 1 \ - : (((MODE) == BLKmode ? int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE)) \ - + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) - -/* Update the data in CUM to advance over an argument - of mode MODE and data type TYPE. - (TYPE is null for libcalls where that information may not be available.) */ - -#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - if (MUST_PASS_IN_STACK (MODE, TYPE)) \ - (CUM) = 6; \ - else \ - (CUM) += ALPHA_ARG_SIZE (MODE, TYPE, NAMED) - -/* Determine where to put an argument to a function. - Value is zero to push the argument on the stack, - or a hard register in which to store the argument. - - MODE is the argument's machine mode. - TYPE is the data type of the argument (as a tree). - This is null for libcalls where that information may - not be available. - CUM is a variable of type CUMULATIVE_ARGS which gives info about - the preceding args and about the function being called. - NAMED is nonzero if this argument is a named parameter - (otherwise it is an extra parameter matching an ellipsis). - - On Alpha the first 6 words of args are normally in registers - and the rest are pushed. */ - -#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - function_arg((CUM), (MODE), (TYPE), (NAMED)) - -/* 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) \ - ((MODE) == TFmode || (MODE) == TCmode) - -/* For an arg passed partly in registers and partly in memory, - this is the number of registers used. - For args passed entirely in registers or entirely in memory, zero. */ - -#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ -((CUM) < 6 && 6 < (CUM) + ALPHA_ARG_SIZE (MODE, TYPE, NAMED) \ - ? 6 - (CUM) : 0) - -/* 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 - where the output has been placed if it can be done and the insns have been - emitted. If it would take more than N insns, zero is returned and no - insns and emitted. */ - -/* Define the information needed to generate branch and scc insns. This is - stored from the compare operation. Note that we can't use "rtx" here - since it hasn't been defined! */ - -struct alpha_compare -{ - struct rtx_def *op0, *op1; - int fp_p; -}; - -extern struct alpha_compare alpha_compare; - -/* Make (or fake) .linkage entry for function call. - IS_LOCAL is 0 if name is used in call, 1 if name is used in definition. */ - -/* This macro defines the start of an assembly comment. */ - -#define ASM_COMMENT_START " #" - -/* This macro produces the initial definition of a function. */ - -#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ - alpha_start_function(FILE,NAME,DECL); - -/* This macro closes up a function definition for the assembler. */ - -#define ASM_DECLARE_FUNCTION_SIZE(FILE,NAME,DECL) \ - alpha_end_function(FILE,NAME,DECL) - -/* Output any profiling code before the prologue. */ - -#define PROFILE_BEFORE_PROLOGUE 1 - -/* Never use profile counters. */ - -#define NO_PROFILE_COUNTERS 1 - -/* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. Under OSF/1, profiling is enabled - by simply passing -pg to the assembler and linker. */ - -#define FUNCTION_PROFILER(FILE, LABELNO) - -/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, - the stack pointer does not matter. The value is tested only in - functions that have frame pointers. - No definition is equivalent to always zero. */ - -#define EXIT_IGNORE_STACK 1 - -/* Define registers used by the epilogue and return instruction. */ - -#define EPILOGUE_USES(REGNO) ((REGNO) == 26) - -/* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. - - The trampoline should set the static chain pointer to value placed - into the trampoline and should branch to the specified routine. - Note that $27 has been set to the address of the trampoline, so we can - use it for addressability of the two data items. */ - -#define TRAMPOLINE_TEMPLATE(FILE) \ -do { \ - fprintf (FILE, "\tldq $1,24($27)\n"); \ - fprintf (FILE, "\tldq $27,16($27)\n"); \ - fprintf (FILE, "\tjmp $31,($27),0\n"); \ - fprintf (FILE, "\tnop\n"); \ - fprintf (FILE, "\t.quad 0,0\n"); \ -} while (0) - -/* Section in which to place the trampoline. On Alpha, instructions - may only be placed in a text segment. */ - -#define TRAMPOLINE_SECTION text_section - -/* Length in units of the trampoline for entering a nested function. */ - -#define TRAMPOLINE_SIZE 32 - -/* The alignment of a trampoline, in bits. */ - -#define TRAMPOLINE_ALIGNMENT 64 - -/* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. */ - -#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 16, 24, 8) - -/* A C expression whose value is RTL representing the value of the return - address for the frame COUNT steps up from the current frame. - FRAMEADDR is the frame pointer of the COUNT frame, or the frame pointer of - the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME is defined. */ - -#define RETURN_ADDR_RTX alpha_return_addr - -/* Before the prologue, RA lives in $26. */ -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 26) -#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26) -#define DWARF_ALT_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (64) -#define DWARF_ZERO_REG 31 - -/* Describe how we implement __builtin_eh_return. */ -#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 16 : INVALID_REGNUM) -#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 28) -#define EH_RETURN_HANDLER_RTX \ - gen_rtx_MEM (Pmode, plus_constant (stack_pointer_rtx, \ - current_function_outgoing_args_size)) - -/* Addressing modes, and classification of registers for them. */ - -/* Macros to check register numbers against specific register classes. */ - -/* These assume that REGNO is a hard or pseudo reg number. - They give nonzero only if REGNO is a hard reg of the suitable class - or a pseudo reg currently allocated to a suitable hard reg. - Since they use reg_renumber, they are safe only once reg_renumber - has been allocated, which happens in local-alloc.c. */ - -#define REGNO_OK_FOR_INDEX_P(REGNO) 0 -#define REGNO_OK_FOR_BASE_P(REGNO) \ -((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32 \ - || (REGNO) == 63 || reg_renumber[REGNO] == 63) - -/* Maximum number of registers that can appear in a valid memory address. */ -#define MAX_REGS_PER_ADDRESS 1 - -/* Recognize any constant value that is a valid address. For the Alpha, - there are only constants none since we want to use LDA to load any - symbolic addresses into registers. */ - -#define CONSTANT_ADDRESS_P(X) \ - (GET_CODE (X) == CONST_INT \ - && (unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000) - -/* Include all constant integers and constant doubles, but not - floating-point, except for floating-point zero. */ - -#define LEGITIMATE_CONSTANT_P(X) \ - (GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT \ - || (X) == CONST0_RTX (GET_MODE (X))) - -/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - -/* Nonzero if X is a hard reg that can be used as an index - or if it is a pseudo reg. */ -#define REG_OK_FOR_INDEX_P(X) 0 - -/* Nonzero if X is a hard reg that can be used as a base reg - or if it is a pseudo reg. */ -#define NONSTRICT_REG_OK_FOR_BASE_P(X) \ - (REGNO (X) < 32 || REGNO (X) == 63 || REGNO (X) >= FIRST_PSEUDO_REGISTER) - -/* ??? Nonzero if X is the frame pointer, or some virtual register - that may eliminate to the frame pointer. These will be allowed to - have offsets greater than 32K. This is done because register - elimination offsets will change the hi/lo split, and if we split - before reload, we will require additional instructions. */ -#define NONSTRICT_REG_OK_FP_BASE_P(X) \ - (REGNO (X) == 31 || REGNO (X) == 63 \ - || (REGNO (X) >= FIRST_PSEUDO_REGISTER \ - && REGNO (X) < LAST_VIRTUAL_REGISTER)) - -/* Nonzero if X is a hard reg that can be used as a base reg. */ -#define STRICT_REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) - -#ifdef REG_OK_STRICT -#define REG_OK_FOR_BASE_P(X) STRICT_REG_OK_FOR_BASE_P (X) -#else -#define REG_OK_FOR_BASE_P(X) NONSTRICT_REG_OK_FOR_BASE_P (X) -#endif - -/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a - valid memory address for an instruction. */ - -#ifdef REG_OK_STRICT -#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN) \ -do { \ - if (alpha_legitimate_address_p (MODE, X, 1)) \ - goto WIN; \ -} while (0) -#else -#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN) \ -do { \ - if (alpha_legitimate_address_p (MODE, X, 0)) \ - goto WIN; \ -} while (0) -#endif - -/* Try machine-dependent ways of modifying an illegitimate address - to be legitimate. If we find one, return the new, valid address. - This macro is used in only one place: `memory_address' in explow.c. */ - -#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ -do { \ - rtx new_x = alpha_legitimize_address (X, NULL_RTX, MODE); \ - if (new_x) \ - { \ - X = new_x; \ - goto WIN; \ - } \ -} while (0) - -/* Try a machine-dependent way of reloading an illegitimate address - operand. If we find one, push the reload and jump to WIN. This - macro is used in only one place: `find_reloads_address' in reload.c. */ - -#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_L,WIN) \ -do { \ - rtx new_x = alpha_legitimize_reload_address (X, MODE, OPNUM, TYPE, IND_L); \ - if (new_x) \ - { \ - X = new_x; \ - goto WIN; \ - } \ -} while (0) - -/* Go to LABEL if ADDR (a legitimate address expression) - has an effect that depends on the machine mode it is used for. - On the Alpha this is true only for the unaligned modes. We can - simplify this test since we know that the address must be valid. */ - -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ -{ if (GET_CODE (ADDR) == AND) goto LABEL; } - -/* Specify the machine mode that this machine uses - for the index in the tablejump instruction. */ -#define CASE_VECTOR_MODE SImode - -/* Define as C expression which evaluates to nonzero if the tablejump - instruction expects the table to contain offsets from the address of the - table. - - Do not define this if the table should contain absolute addresses. - On the Alpha, the table is really GP-relative, not relative to the PC - of the table, but we pretend that it is PC-relative; this should be OK, - but we should try to find some better way sometime. */ -#define CASE_VECTOR_PC_RELATIVE 1 - -/* Define this as 1 if `char' should by default be signed; else as 0. */ -#define DEFAULT_SIGNED_CHAR 1 - -/* Max number of bytes we can move to or from memory - in one reasonably fast instruction. */ - -#define MOVE_MAX 8 - -/* If a memory-to-memory move would take MOVE_RATIO or more simple - move-instruction pairs, we will do a movstr or libcall instead. - - Without byte/word accesses, we want no more than four instructions; - with, several single byte accesses are better. */ - -#define MOVE_RATIO (TARGET_BWX ? 7 : 2) - -/* Largest number of bytes of an object that can be placed in a register. - On the Alpha we have plenty of registers, so use TImode. */ -#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TImode) - -/* Nonzero if access to memory by bytes is no faster than for words. - Also 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 - masking operations to access fields; these will save instructions. */ - -#define SLOW_BYTE_ACCESS 1 - -/* Define if operations between registers always perform the operation - on the full register even if a narrower mode is specified. */ -#define WORD_REGISTER_OPERATIONS - -/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD - will either zero-extend or sign-extend. The value of this macro should - be the code that says which one of the two operations is implicitly - done, NIL if none. */ -#define LOAD_EXTEND_OP(MODE) ((MODE) == SImode ? SIGN_EXTEND : ZERO_EXTEND) - -/* Define if loading short immediate values into registers sign extends. */ -#define SHORT_IMMEDIATES_SIGN_EXTEND - -/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits - is done just by pretending it is already truncated. */ -#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - -/* The CIX ctlz and cttz instructions return 64 for zero. */ -#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 64, TARGET_CIX) -#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 64, TARGET_CIX) - -/* Define the value returned by a floating-point comparison instruction. */ - -#define FLOAT_STORE_FLAG_VALUE(MODE) \ - REAL_VALUE_ATOF ((TARGET_FLOAT_VAX ? "0.5" : "2.0"), (MODE)) - -/* Canonicalize a comparison from one we don't have to one we do have. */ - -#define CANONICALIZE_COMPARISON(CODE,OP0,OP1) \ - do { \ - if (((CODE) == GE || (CODE) == GT || (CODE) == GEU || (CODE) == GTU) \ - && (GET_CODE (OP1) == REG || (OP1) == const0_rtx)) \ - { \ - rtx tem = (OP0); \ - (OP0) = (OP1); \ - (OP1) = tem; \ - (CODE) = swap_condition (CODE); \ - } \ - if (((CODE) == LT || (CODE) == LTU) \ - && GET_CODE (OP1) == CONST_INT && INTVAL (OP1) == 256) \ - { \ - (CODE) = (CODE) == LT ? LE : LEU; \ - (OP1) = GEN_INT (255); \ - } \ - } while (0) - -/* Specify the machine mode that pointers have. - After generation of rtl, the compiler makes no further distinction - between pointers and any other objects of this machine mode. */ -#define Pmode DImode - -/* Mode of a function address in a call instruction (for indexing purposes). */ - -#define FUNCTION_MODE Pmode - -/* Define this if addresses of constant functions - shouldn't be put through pseudo regs where they can be cse'd. - Desirable on machines where ordinary constants are expensive - but a CALL with constant address is cheap. - - We define this on the Alpha so that gen_call and gen_call_value - get to see the SYMBOL_REF (for the hint field of the jsr). It will - then copy it into a register, thus actually letting the address be - cse'ed. */ - -#define NO_FUNCTION_CSE - -/* Define this to be nonzero if shift instructions ignore all but the low-order - few bits. */ -#define SHIFT_COUNT_TRUNCATED 1 - -/* Control the assembler format that we output. */ - -/* Output to assembler file text saying following lines - may contain character constants, extra white space, comments, etc. */ -#define ASM_APP_ON (TARGET_EXPLICIT_RELOCS ? "\t.set\tmacro\n" : "") - -/* Output to assembler file text saying following lines - no longer contain unusual constructs. */ -#define ASM_APP_OFF (TARGET_EXPLICIT_RELOCS ? "\t.set\tnomacro\n" : "") - -#define TEXT_SECTION_ASM_OP "\t.text" - -/* Output before read-only data. */ - -#define READONLY_DATA_SECTION_ASM_OP "\t.rdata" - -/* Output before writable data. */ - -#define DATA_SECTION_ASM_OP "\t.data" - -/* How to refer to registers in assembler output. - This sequence is indexed by compiler's hard-register-number (see above). */ - -#define REGISTER_NAMES \ -{"$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ - "$9", "$10", "$11", "$12", "$13", "$14", "$15", \ - "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23", \ - "$24", "$25", "$26", "$27", "$28", "$29", "$30", "AP", \ - "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8", \ - "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15", \ - "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",\ - "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "FP"} - -/* Strip name encoding when emitting labels. */ - -#define ASM_OUTPUT_LABELREF(STREAM, NAME) \ -do { \ - const char *name_ = NAME; \ - if (*name_ == '@' || *name_ == '%') \ - name_ += 2; \ - if (*name_ == '*') \ - name_++; \ - else \ - fputs (user_label_prefix, STREAM); \ - fputs (name_, STREAM); \ -} while (0) - -/* Globalizing directive for a label. */ -#define GLOBAL_ASM_OP "\t.globl " - -/* The prefix to add to user-visible assembler symbols. */ - -#define USER_LABEL_PREFIX "" - -/* This is how to output a label for a jump table. Arguments are the same as - for (*targetm.asm_out.internal_label), except the insn for the jump table is - passed. */ - -#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \ -{ ASM_OUTPUT_ALIGN (FILE, 2); (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); } - -/* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - -#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM)) - -/* 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. */ - -#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ - do { \ - FILE *_hide_asm_out_file = (MYFILE); \ - const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \ - int _hide_thissize = (MYLENGTH); \ - int _size_so_far = 0; \ - { \ - FILE *asm_out_file = _hide_asm_out_file; \ - const unsigned char *p = _hide_p; \ - int thissize = _hide_thissize; \ - int i; \ - fprintf (asm_out_file, "\t.ascii \""); \ - \ - for (i = 0; i < thissize; i++) \ - { \ - register int c = p[i]; \ - \ - if (_size_so_far ++ > 50 && i < thissize - 4) \ - _size_so_far = 0, fprintf (asm_out_file, "\"\n\t.ascii \""); \ - \ - if (c == '\"' || c == '\\') \ - putc ('\\', asm_out_file); \ - if (c >= ' ' && c < 0177) \ - putc (c, asm_out_file); \ - else \ - { \ - fprintf (asm_out_file, "\\%o", c); \ - /* After an octal-escape, if a digit follows, \ - terminate one string constant and start another. \ - The VAX assembler fails to stop reading the escape \ - after three digits, so this is the only way we \ - can get it to parse the data properly. */ \ - if (i < thissize - 1 && ISDIGIT (p[i + 1])) \ - _size_so_far = 0, fprintf (asm_out_file, "\"\n\t.ascii \""); \ - } \ - } \ - fprintf (asm_out_file, "\"\n"); \ - } \ - } \ - while (0) - -/* This is how to output an element of a case-vector that is absolute. - (Alpha does not use such vectors, but we must define this macro anyway.) */ - -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) abort () - -/* This is how to output an element of a case-vector that is relative. */ - -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.%s $L%d\n", TARGET_ABI_WINDOWS_NT ? "long" : "gprel32", \ - (VALUE)) - -/* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - -#define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG) != 0) \ - fprintf (FILE, "\t.align %d\n", LOG); - -/* This is how to advance the location counter by SIZE bytes. */ - -#define ASM_OUTPUT_SKIP(FILE,SIZE) \ - fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE)) - -/* This says how to output an assembler line - to define a global common symbol. */ - -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ -( fputs ("\t.comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))) - -/* This says how to output an assembler line - to define a local common symbol. */ - -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \ -( fputs ("\t.lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))) - - -/* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. - For `%' followed by punctuation, CODE is the punctuation and X is null. */ - -#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE) - -/* Determine which codes are valid without a following integer. These must - not be alphabetic. - - ~ Generates the name of the current function. - - / Generates the instruction suffix. The TRAP_SUFFIX and ROUND_SUFFIX - attributes are examined to determine what is appropriate. - - , Generates single precision suffix for floating point - instructions (s for IEEE, f for VAX) - - - Generates double precision suffix for floating point - instructions (t for IEEE, g for VAX) - - + Generates a nop instruction after a noreturn call at the very end - of the function - */ - -#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ - ((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \ - || (CODE) == '#' || (CODE) == '*' || (CODE) == '&' || (CODE) == '+') - -/* Print a memory address as an operand to reference that memory location. */ - -#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - print_operand_address((FILE), (ADDR)) - -/* Define the codes that are matched by predicates in alpha.c. */ - -#define PREDICATE_CODES \ - {"reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_DOUBLE, \ - CONST_VECTOR}}, \ - {"reg_or_6bit_operand", {SUBREG, REG, CONST_INT}}, \ - {"reg_or_8bit_operand", {SUBREG, REG, CONST_INT}}, \ - {"reg_or_const_int_operand", {SUBREG, REG, CONST_INT}}, \ - {"cint8_operand", {CONST_INT}}, \ - {"reg_or_cint_operand", {SUBREG, REG, CONST_INT}}, \ - {"add_operand", {SUBREG, REG, CONST_INT}}, \ - {"sext_add_operand", {SUBREG, REG, CONST_INT}}, \ - {"const48_operand", {CONST_INT}}, \ - {"and_operand", {SUBREG, REG, CONST_INT}}, \ - {"or_operand", {SUBREG, REG, CONST_INT}}, \ - {"mode_mask_operand", {CONST_INT}}, \ - {"mul8_operand", {CONST_INT}}, \ - {"mode_width_operand", {CONST_INT}}, \ - {"alpha_comparison_operator", {EQ, LE, LT, LEU, LTU}}, \ - {"alpha_zero_comparison_operator", {EQ, NE, LE, LT, LEU, LTU}}, \ - {"alpha_swapped_comparison_operator", {EQ, GE, GT, GEU, GTU}}, \ - {"signed_comparison_operator", {EQ, NE, LE, LT, GE, GT}}, \ - {"alpha_fp_comparison_operator", {EQ, LE, LT, UNORDERED}}, \ - {"divmod_operator", {DIV, MOD, UDIV, UMOD}}, \ - {"fix_operator", {FIX, UNSIGNED_FIX}}, \ - {"const0_operand", {CONST_INT, CONST_DOUBLE, CONST_VECTOR}}, \ - {"samegp_function_operand", {SYMBOL_REF}}, \ - {"direct_call_operand", {SYMBOL_REF}}, \ - {"local_symbolic_operand", {SYMBOL_REF, CONST, LABEL_REF}}, \ - {"small_symbolic_operand", {SYMBOL_REF, CONST}}, \ - {"global_symbolic_operand", {SYMBOL_REF, CONST}}, \ - {"dtp16_symbolic_operand", {CONST}}, \ - {"dtp32_symbolic_operand", {CONST}}, \ - {"gotdtp_symbolic_operand", {CONST}}, \ - {"tp16_symbolic_operand", {CONST}}, \ - {"tp32_symbolic_operand", {CONST}}, \ - {"gottp_symbolic_operand", {CONST}}, \ - {"call_operand", {REG, SYMBOL_REF}}, \ - {"input_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \ - CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}},\ - {"some_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE, \ - CONST_VECTOR, SYMBOL_REF, CONST, LABEL_REF, HIGH}}, \ - {"some_ni_operand", {SUBREG, REG, MEM}}, \ - {"aligned_memory_operand", {MEM}}, \ - {"unaligned_memory_operand", {MEM}}, \ - {"reg_or_unaligned_mem_operand", {SUBREG, REG, MEM}}, \ - {"any_memory_operand", {MEM}}, \ - {"normal_memory_operand", {MEM}}, \ - {"hard_fp_register_operand", {SUBREG, REG}}, \ - {"hard_int_register_operand", {SUBREG, REG}}, \ - {"reg_not_elim_operand", {SUBREG, REG}}, \ - {"reg_no_subreg_operand", {REG}}, \ - {"addition_operation", {PLUS}}, \ - {"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \ - {"some_small_symbolic_operand", {SET, PARALLEL, PREFETCH, UNSPEC, \ - UNSPEC_VOLATILE}}, - -/* Implement `va_start' for varargs and stdarg. */ -#define EXPAND_BUILTIN_VA_START(valist, nextarg) \ - alpha_va_start (valist, nextarg) - -/* Implement `va_arg'. */ -#define EXPAND_BUILTIN_VA_ARG(valist, type) \ - alpha_va_arg (valist, type) - -/* Tell collect that the object format is ECOFF. */ -#define OBJECT_FORMAT_COFF -#define EXTENDED_COFF - -/* If we use NM, pass -g to it so it only lists globals. */ -#define NM_FLAGS "-pg" - -/* Definitions for debugging. */ - -#define SDB_DEBUGGING_INFO 1 /* generate info for mips-tfile */ -#define DBX_DEBUGGING_INFO 1 /* generate embedded stabs */ -#define MIPS_DEBUGGING_INFO 1 /* MIPS specific debugging info */ - -#ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ -#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG -#endif - - -/* Correct the offset of automatic variables and arguments. Note that - the Alpha debug format wants all automatic variables and arguments - to be in terms of two different offsets from the virtual frame pointer, - which is the stack pointer before any adjustment in the function. - The offset for the argument pointer is fixed for the native compiler, - it is either zero (for the no arguments case) or large enough to hold - all argument registers. - The offset for the auto pointer is the fourth argument to the .frame - directive (local_offset). - To stay compatible with the native tools we use the same offsets - from the virtual frame pointer and adjust the debugger arg/auto offsets - accordingly. These debugger offsets are set up in output_prolog. */ - -extern long alpha_arg_offset; -extern long alpha_auto_offset; -#define DEBUGGER_AUTO_OFFSET(X) \ - ((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) + alpha_auto_offset) -#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET + alpha_arg_offset) - - -#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \ - alpha_output_lineno (STREAM, LINE) - -#define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \ - alpha_output_filename (STREAM, NAME) - -/* mips-tfile.c limits us to strings of one page. We must underestimate this - number, because the real length runs past this up to the next - continuation point. This is really a dbxout.c bug. */ -#define DBX_CONTIN_LENGTH 3000 - -/* By default, turn on GDB extensions. */ -#define DEFAULT_GDB_EXTENSIONS 1 - -/* Stabs-in-ECOFF can't handle dbxout_function_end(). */ -#define NO_DBX_FUNCTION_END 1 - -/* If we are smuggling stabs through the ALPHA ECOFF object - format, put a comment in front of the .stab operation so - that the ALPHA assembler does not choke. The mips-tfile program - will correctly put the stab into the object file. */ - -#define ASM_STABS_OP ((TARGET_GAS) ? "\t.stabs\t" : " #.stabs\t") -#define ASM_STABN_OP ((TARGET_GAS) ? "\t.stabn\t" : " #.stabn\t") -#define ASM_STABD_OP ((TARGET_GAS) ? "\t.stabd\t" : " #.stabd\t") - -/* Forward references to tags are allowed. */ -#define SDB_ALLOW_FORWARD_REFERENCES - -/* Unknown tags are also allowed. */ -#define SDB_ALLOW_UNKNOWN_REFERENCES - -#define PUT_SDB_DEF(a) \ -do { \ - fprintf (asm_out_file, "\t%s.def\t", \ - (TARGET_GAS) ? "" : "#"); \ - ASM_OUTPUT_LABELREF (asm_out_file, a); \ - fputc (';', asm_out_file); \ -} while (0) - -#define PUT_SDB_PLAIN_DEF(a) \ -do { \ - fprintf (asm_out_file, "\t%s.def\t.%s;", \ - (TARGET_GAS) ? "" : "#", (a)); \ -} while (0) - -#define PUT_SDB_TYPE(a) \ -do { \ - fprintf (asm_out_file, "\t.type\t0x%x;", (a)); \ -} while (0) - -/* For block start and end, we create labels, so that - later we can figure out where the correct offset is. - The normal .ent/.end serve well enough for functions, - so those are just commented out. */ - -extern int sdb_label_count; /* block start/end next label # */ - -#define PUT_SDB_BLOCK_START(LINE) \ -do { \ - fprintf (asm_out_file, \ - "$Lb%d:\n\t%s.begin\t$Lb%d\t%d\n", \ - sdb_label_count, \ - (TARGET_GAS) ? "" : "#", \ - sdb_label_count, \ - (LINE)); \ - sdb_label_count++; \ -} while (0) - -#define PUT_SDB_BLOCK_END(LINE) \ -do { \ - fprintf (asm_out_file, \ - "$Le%d:\n\t%s.bend\t$Le%d\t%d\n", \ - sdb_label_count, \ - (TARGET_GAS) ? "" : "#", \ - sdb_label_count, \ - (LINE)); \ - sdb_label_count++; \ -} while (0) - -#define PUT_SDB_FUNCTION_START(LINE) - -#define PUT_SDB_FUNCTION_END(LINE) - -#define PUT_SDB_EPILOGUE_END(NAME) ((void)(NAME)) - -/* Macros for mips-tfile.c to encapsulate stabs in ECOFF, and for - mips-tdump.c to print them out. - - These must match the corresponding definitions in gdb/mipsread.c. - Unfortunately, gcc and gdb do not currently share any directories. */ - -#define CODE_MASK 0x8F300 -#define MIPS_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK) -#define MIPS_MARK_STAB(code) ((code)+CODE_MASK) -#define MIPS_UNMARK_STAB(code) ((code)-CODE_MASK) - -/* Override some mips-tfile definitions. */ - -#define SHASH_SIZE 511 -#define THASH_SIZE 55 - -/* Align ecoff symbol tables to avoid OSF1/1.3 nm complaints. */ - -#define ALIGN_SYMTABLE_OFFSET(OFFSET) (((OFFSET) + 7) & ~7) - -/* The system headers under Alpha systems are generally C++-aware. */ -#define NO_IMPLICIT_EXTERN_C - -/* Generate calls to memcpy, etc., not bcopy, etc. */ -#define TARGET_MEM_FUNCTIONS 1 diff --git a/contrib/gcc/config/alpha/alpha.md b/contrib/gcc/config/alpha/alpha.md deleted file mode 100644 index cca51ba..0000000 --- a/contrib/gcc/config/alpha/alpha.md +++ /dev/null @@ -1,8099 +0,0 @@ -;; Machine description for DEC Alpha for GNU C compiler -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) -;; -;; 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. - -;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - -;; Uses of UNSPEC in this file: - -(define_constants - [(UNSPEC_ARG_HOME 0) - (UNSPEC_CTTZ 1) - (UNSPEC_INSXH 2) - (UNSPEC_MSKXH 3) - (UNSPEC_CVTQL 4) - (UNSPEC_CVTLQ 5) - (UNSPEC_UMK_LAUM 6) - (UNSPEC_UMK_LALM 7) - (UNSPEC_UMK_LAL 8) - (UNSPEC_UMK_LOAD_CIW 9) - (UNSPEC_LDGP2 10) - (UNSPEC_LITERAL 11) - (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: - -(define_constants - [(UNSPECV_IMB 0) - (UNSPECV_BLOCKAGE 1) - (UNSPECV_SETJMPR 2) ; builtin_setjmp_receiver - (UNSPECV_LONGJMP 3) ; builtin_longjmp - (UNSPECV_TRAPB 4) - (UNSPECV_PSPL 5) ; prologue_stack_probe_loop - (UNSPECV_REALIGN 6) - (UNSPECV_EHR 7) ; exception_receiver - (UNSPECV_MCOUNT 8) - (UNSPECV_FORCE_MOV 9) - (UNSPECV_LDGP1 10) - (UNSPECV_PLDGP2 11) ; prologue ldgp - (UNSPECV_SET_TP 12) - (UNSPECV_RPCC 13) - (UNSPECV_SETJMPR_ER 14) ; builtin_setjmp_receiver fragment - ]) - -;; Where necessary, the suffixes _le and _be are used to distinguish between -;; little-endian and big-endian patterns. -;; -;; Note that the Unicos/Mk assembler does not support the following -;; opcodes: mov, fmov, nop, fnop, unop. - -;; Processor type -- this attribute must exactly match the processor_type -;; enumeration in alpha.h. - -(define_attr "cpu" "ev4,ev5,ev6" - (const (symbol_ref "alpha_cpu"))) - -;; Define an insn type attribute. This is used in function unit delay -;; computations, among other purposes. For the most part, we use the names -;; defined in the EV4 documentation, but add a few that we have to know about -;; separately. - -(define_attr "type" - "ild,fld,ldsym,ist,fst,ibr,callpal,fbr,jsr,iadd,ilog,shift,icmov,fcmov, - icmp,imul,fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" - (const_string "iadd")) - -;; Describe a user's asm statement. -(define_asm_attributes - [(set_attr "type" "multi")]) - -;; Define the operand size an insn operates on. Used primarily by mul -;; and div operations that have size dependent timings. - -(define_attr "opsize" "si,di,udi" - (const_string "di")) - -;; The TRAP attribute marks instructions that may generate traps -;; (which are imprecise and may need a trapb if software completion -;; is desired). - -(define_attr "trap" "no,yes" - (const_string "no")) - -;; The ROUND_SUFFIX attribute marks which instructions require a -;; rounding-mode suffix. The value NONE indicates no suffix, -;; the value NORMAL indicates a suffix controlled by alpha_fprm. - -(define_attr "round_suffix" "none,normal,c" - (const_string "none")) - -;; The TRAP_SUFFIX attribute marks instructions requiring a trap-mode suffix: -;; NONE no suffix -;; SU accepts only /su (cmpt et al) -;; SUI accepts only /sui (cvtqt and cvtqs) -;; V_SV accepts /v and /sv (cvtql only) -;; V_SV_SVI accepts /v, /sv and /svi (cvttq only) -;; U_SU_SUI accepts /u, /su and /sui (most fp instructions) -;; -;; The actual suffix emitted is controlled by alpha_fptm. - -(define_attr "trap_suffix" "none,su,sui,v_sv,v_sv_svi,u_su_sui" - (const_string "none")) - -;; The length of an instruction sequence in bytes. - -(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"))) - -;; The CANNOT_COPY attribute marks instructions with relocations that -;; cannot easily be duplicated. This includes insns with gpdisp relocs -;; since they have to stay in 1-1 correspondence with one another. This -;; also includes jsr insns, since they must stay in correspondence with -;; the immediately following gpdisp instructions. - -(define_attr "cannot_copy" "false,true" - (const_string "false")) - -;; 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. - -;; Handle 32-64 bit extension from memory to a floating point register -;; specially, since this occurs frequently in int->double conversions. -;; -;; Note that while we must retain the =f case in the insn for reload's -;; benefit, it should be eliminated after reload, so we should never emit -;; code for that case. But we don't reject the possibility. - -(define_expand "extendsidi2" - [(set (match_operand:DI 0 "register_operand" "") - (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))] - "" - "") - -(define_insn "*cvtlq" - [(set (match_operand:DI 0 "register_operand" "=f") - (unspec:DI [(match_operand:SF 1 "reg_or_0_operand" "fG")] - UNSPEC_CVTLQ))] - "" - "cvtlq %1,%0" - [(set_attr "type" "fadd")]) - -(define_insn "*extendsidi2_1" - [(set (match_operand:DI 0 "register_operand" "=r,r,!*f") - (sign_extend:DI - (match_operand:SI 1 "nonimmediate_operand" "r,m,m")))] - "" - "@ - addl $31,%1,%0 - ldl %0,%1 - lds %0,%1\;cvtlq %0,%0" - [(set_attr "type" "iadd,ild,fld") - (set_attr "length" "*,*,8")]) - -(define_split - [(set (match_operand:DI 0 "hard_fp_register_operand" "") - (sign_extend:DI (match_operand:SI 1 "memory_operand" "")))] - "reload_completed" - [(set (match_dup 2) (match_dup 1)) - (set (match_dup 0) (unspec:DI [(match_dup 2)] UNSPEC_CVTLQ))] -{ - operands[1] = adjust_address (operands[1], SFmode, 0); - operands[2] = gen_rtx_REG (SFmode, REGNO (operands[0])); -}) - -;; Optimize sign-extension of SImode loads. This shows up in the wake of -;; reload when converting fp->int. - -(define_peephole2 - [(set (match_operand:SI 0 "hard_int_register_operand" "") - (match_operand:SI 1 "memory_operand" "")) - (set (match_operand:DI 2 "hard_int_register_operand" "") - (sign_extend:DI (match_dup 0)))] - "true_regnum (operands[0]) == true_regnum (operands[2]) - || peep2_reg_dead_p (2, operands[0])" - [(set (match_dup 2) - (sign_extend:DI (match_dup 1)))] - "") - -;; Don't say we have addsi3 if optimizing. This generates better code. We -;; have the anonymous addsi3 pattern below in case combine wants to make it. -(define_expand "addsi3" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "add_operand" "")))] - "! optimize" - "") - -(define_insn "*addsi_internal" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ,rJ,rJ,rJ") - (match_operand:SI 2 "add_operand" "rI,O,K,L")))] - "" - "@ - addl %r1,%2,%0 - subl %r1,%n2,%0 - lda %0,%2(%r1) - ldah %0,%h2(%r1)") - -(define_split - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (match_operand:SI 1 "register_operand" "") - (match_operand:SI 2 "const_int_operand" "")))] - "! add_operand (operands[2], SImode)" - [(set (match_dup 0) (plus:SI (match_dup 1) (match_dup 3))) - (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 4)))] -{ - HOST_WIDE_INT val = INTVAL (operands[2]); - HOST_WIDE_INT low = (val & 0xffff) - 2 * (val & 0x8000); - HOST_WIDE_INT rest = val - low; - - operands[3] = GEN_INT (rest); - operands[4] = GEN_INT (low); -}) - -(define_insn "*addsi_se" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ,rJ") - (match_operand:SI 2 "sext_add_operand" "rI,O"))))] - "" - "@ - addl %r1,%2,%0 - subl %r1,%n2,%0") - -(define_insn "*addsi_se2" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (subreg:SI (plus:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ") - (match_operand:DI 2 "sext_add_operand" "rI,O")) - 0)))] - "" - "@ - addl %r1,%2,%0 - subl %r1,%n2,%0") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (sign_extend:DI - (plus:SI (match_operand:SI 1 "reg_not_elim_operand" "") - (match_operand:SI 2 "const_int_operand" "")))) - (clobber (match_operand:SI 3 "reg_not_elim_operand" ""))] - "! sext_add_operand (operands[2], SImode) && INTVAL (operands[2]) > 0 - && INTVAL (operands[2]) % 4 == 0" - [(set (match_dup 3) (match_dup 4)) - (set (match_dup 0) (sign_extend:DI (plus:SI (mult:SI (match_dup 3) - (match_dup 5)) - (match_dup 1))))] -{ - HOST_WIDE_INT val = INTVAL (operands[2]) / 4; - int mult = 4; - - if (val % 2 == 0) - val /= 2, mult = 8; - - operands[4] = GEN_INT (val); - operands[5] = GEN_INT (mult); -}) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (sign_extend:DI - (plus:SI (match_operator:SI 1 "comparison_operator" - [(match_operand 2 "" "") - (match_operand 3 "" "")]) - (match_operand:SI 4 "add_operand" "")))) - (clobber (match_operand:DI 5 "register_operand" ""))] - "" - [(set (match_dup 5) (match_dup 6)) - (set (match_dup 0) (sign_extend:DI (plus:SI (match_dup 7) (match_dup 4))))] -{ - operands[6] = gen_rtx_fmt_ee (GET_CODE (operands[1]), DImode, - operands[2], operands[3]); - operands[7] = gen_lowpart (SImode, operands[5]); -}) - -(define_insn "addvsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ,rJ") - (match_operand:SI 2 "sext_add_operand" "rI,O"))) - (trap_if (ne (plus:DI (sign_extend:DI (match_dup 1)) - (sign_extend:DI (match_dup 2))) - (sign_extend:DI (plus:SI (match_dup 1) - (match_dup 2)))) - (const_int 0))] - "" - "@ - addlv %r1,%2,%0 - sublv %r1,%n2,%0") - -(define_expand "adddi3" - [(set (match_operand:DI 0 "register_operand" "") - (plus:DI (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "add_operand" "")))] - "" - "") - -(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 && reload_completed" - "ldah %0,%2(%1)\t\t!gprelhigh" - [(set_attr "usegp" "yes")]) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (high:DI (match_operand:DI 1 "local_symbolic_operand" "")))] - "TARGET_EXPLICIT_RELOCS && reload_completed" - [(set (match_dup 0) - (plus:DI (match_dup 2) (high:DI (match_dup 1))))] - "operands[2] = pic_offset_table_rtx;") - -;; We used to expend quite a lot of effort choosing addq/subq/lda. -;; With complications like -;; -;; The NT stack unwind code can't handle a subq to adjust the stack -;; (that's a bug, but not one we can do anything about). As of NT4.0 SP3, -;; the exception handling code will loop if a subq is used and an -;; exception occurs. -;; -;; The 19980616 change to emit prologues as RTL also confused some -;; versions of GDB, which also interprets prologues. This has been -;; fixed as of GDB 4.18, but it does not harm to unconditionally -;; use lda here. -;; -;; and the fact that the three insns schedule exactly the same, it's -;; just not worth the effort. - -(define_insn "*adddi_internal" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (plus:DI (match_operand:DI 1 "register_operand" "%r,r,r") - (match_operand:DI 2 "add_operand" "r,K,L")))] - "" - "@ - addq %1,%2,%0 - lda %0,%2(%1) - ldah %0,%h2(%1)") - -;; ??? Allow large constants when basing off the frame pointer or some -;; virtual register that may eliminate to the frame pointer. This is -;; done because register elimination offsets will change the hi/lo split, -;; and if we split before reload, we will require additional instructions. - -(define_insn "*adddi_fp_hack" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (plus:DI (match_operand:DI 1 "reg_no_subreg_operand" "r,r,r") - (match_operand:DI 2 "const_int_operand" "K,L,n")))] - "NONSTRICT_REG_OK_FP_BASE_P (operands[1]) - && INTVAL (operands[2]) >= 0 - /* This is the largest constant an lda+ldah pair can add, minus - an upper bound on the displacement between SP and AP during - register elimination. See INITIAL_ELIMINATION_OFFSET. */ - && INTVAL (operands[2]) - < (0x7fff8000 - - FIRST_PSEUDO_REGISTER * UNITS_PER_WORD - - ALPHA_ROUND(current_function_outgoing_args_size) - - (ALPHA_ROUND (get_frame_size () - + max_reg_num () * UNITS_PER_WORD - + current_function_pretend_args_size) - - current_function_pretend_args_size))" - "@ - lda %0,%2(%1) - ldah %0,%h2(%1) - #") - -;; Don't do this if we are adjusting SP since we don't want to do it -;; in two steps. Don't split FP sources for the reason listed above. -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (plus:DI (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "const_int_operand" "")))] - "! add_operand (operands[2], DImode) - && operands[0] != stack_pointer_rtx - && operands[1] != frame_pointer_rtx - && operands[1] != arg_pointer_rtx" - [(set (match_dup 0) (plus:DI (match_dup 1) (match_dup 3))) - (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 4)))] -{ - HOST_WIDE_INT val = INTVAL (operands[2]); - HOST_WIDE_INT low = (val & 0xffff) - 2 * (val & 0x8000); - HOST_WIDE_INT rest = val - low; - - operands[4] = GEN_INT (low); - if (CONST_OK_FOR_LETTER_P (rest, 'L')) - operands[3] = GEN_INT (rest); - else if (! no_new_pseudos) - { - operands[3] = gen_reg_rtx (DImode); - emit_move_insn (operands[3], operands[2]); - emit_insn (gen_adddi3 (operands[0], operands[1], operands[3])); - DONE; - } - else - FAIL; -}) - -(define_insn "*saddl" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (plus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r,r") - (match_operand:SI 2 "const48_operand" "I,I")) - (match_operand:SI 3 "sext_add_operand" "rI,O")))] - "" - "@ - s%2addl %1,%3,%0 - s%2subl %1,%n3,%0") - -(define_insn "*saddl_se" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (plus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r,r") - (match_operand:SI 2 "const48_operand" "I,I")) - (match_operand:SI 3 "sext_add_operand" "rI,O"))))] - "" - "@ - s%2addl %1,%3,%0 - s%2subl %1,%n3,%0") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (sign_extend:DI - (plus:SI (mult:SI (match_operator:SI 1 "comparison_operator" - [(match_operand 2 "" "") - (match_operand 3 "" "")]) - (match_operand:SI 4 "const48_operand" "")) - (match_operand:SI 5 "sext_add_operand" "")))) - (clobber (match_operand:DI 6 "reg_not_elim_operand" ""))] - "" - [(set (match_dup 6) (match_dup 7)) - (set (match_dup 0) - (sign_extend:DI (plus:SI (mult:SI (match_dup 8) (match_dup 4)) - (match_dup 5))))] -{ - operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[1]), DImode, - operands[2], operands[3]); - operands[8] = gen_lowpart (SImode, operands[6]); -}) - -(define_insn "*saddq" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (plus:DI (mult:DI (match_operand:DI 1 "reg_not_elim_operand" "r,r") - (match_operand:DI 2 "const48_operand" "I,I")) - (match_operand:DI 3 "sext_add_operand" "rI,O")))] - "" - "@ - s%2addq %1,%3,%0 - s%2subq %1,%n3,%0") - -(define_insn "addvdi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (plus:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ") - (match_operand:DI 2 "sext_add_operand" "rI,O"))) - (trap_if (ne (plus:TI (sign_extend:TI (match_dup 1)) - (sign_extend:TI (match_dup 2))) - (sign_extend:TI (plus:DI (match_dup 1) - (match_dup 2)))) - (const_int 0))] - "" - "@ - addqv %r1,%2,%0 - subqv %r1,%n2,%0") - -(define_insn "negsi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (neg:SI (match_operand:SI 1 "reg_or_8bit_operand" "rI")))] - "" - "subl $31,%1,%0") - -(define_insn "*negsi_se" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI (neg:SI - (match_operand:SI 1 "reg_or_8bit_operand" "rI"))))] - "" - "subl $31,%1,%0") - -(define_insn "negvsi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (neg:SI (match_operand:SI 1 "register_operand" "r"))) - (trap_if (ne (neg:DI (sign_extend:DI (match_dup 1))) - (sign_extend:DI (neg:SI (match_dup 1)))) - (const_int 0))] - "" - "sublv $31,%1,%0") - -(define_insn "negdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (neg:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")))] - "" - "subq $31,%1,%0") - -(define_insn "negvdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (neg:DI (match_operand:DI 1 "register_operand" "r"))) - (trap_if (ne (neg:TI (sign_extend:TI (match_dup 1))) - (sign_extend:TI (neg:DI (match_dup 1)))) - (const_int 0))] - "" - "subqv $31,%1,%0") - -(define_expand "subsi3" - [(set (match_operand:SI 0 "register_operand" "") - (minus:SI (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_8bit_operand" "")))] - "! optimize" - "") - -(define_insn "*subsi_internal" - [(set (match_operand:SI 0 "register_operand" "=r") - (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") - (match_operand:SI 2 "reg_or_8bit_operand" "rI")))] - "" - "subl %r1,%2,%0") - -(define_insn "*subsi_se" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") - (match_operand:SI 2 "reg_or_8bit_operand" "rI"))))] - "" - "subl %r1,%2,%0") - -(define_insn "*subsi_se2" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (subreg:SI (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "reg_or_8bit_operand" "rI")) - 0)))] - "" - "subl %r1,%2,%0") - -(define_insn "subvsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ") - (match_operand:SI 2 "reg_or_8bit_operand" "rI"))) - (trap_if (ne (minus:DI (sign_extend:DI (match_dup 1)) - (sign_extend:DI (match_dup 2))) - (sign_extend:DI (minus:SI (match_dup 1) - (match_dup 2)))) - (const_int 0))] - "" - "sublv %r1,%2,%0") - -(define_insn "subdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "reg_or_8bit_operand" "rI")))] - "" - "subq %r1,%2,%0") - -(define_insn "*ssubl" - [(set (match_operand:SI 0 "register_operand" "=r") - (minus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r") - (match_operand:SI 2 "const48_operand" "I")) - (match_operand:SI 3 "reg_or_8bit_operand" "rI")))] - "" - "s%2subl %1,%3,%0") - -(define_insn "*ssubl_se" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (minus:SI (mult:SI (match_operand:SI 1 "reg_not_elim_operand" "r") - (match_operand:SI 2 "const48_operand" "I")) - (match_operand:SI 3 "reg_or_8bit_operand" "rI"))))] - "" - "s%2subl %1,%3,%0") - -(define_insn "*ssubq" - [(set (match_operand:DI 0 "register_operand" "=r") - (minus:DI (mult:DI (match_operand:DI 1 "reg_not_elim_operand" "r") - (match_operand:DI 2 "const48_operand" "I")) - (match_operand:DI 3 "reg_or_8bit_operand" "rI")))] - "" - "s%2subq %1,%3,%0") - -(define_insn "subvdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "reg_or_8bit_operand" "rI"))) - (trap_if (ne (minus:TI (sign_extend:TI (match_dup 1)) - (sign_extend:TI (match_dup 2))) - (sign_extend:TI (minus:DI (match_dup 1) - (match_dup 2)))) - (const_int 0))] - "" - "subqv %r1,%2,%0") - -;; The Unicos/Mk assembler doesn't support mull. - -(define_insn "mulsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ") - (match_operand:SI 2 "reg_or_8bit_operand" "rI")))] - "!TARGET_ABI_UNICOSMK" - "mull %r1,%2,%0" - [(set_attr "type" "imul") - (set_attr "opsize" "si")]) - -(define_insn "*mulsi_se" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ") - (match_operand:SI 2 "reg_or_8bit_operand" "rI"))))] - "!TARGET_ABI_UNICOSMK" - "mull %r1,%2,%0" - [(set_attr "type" "imul") - (set_attr "opsize" "si")]) - -(define_insn "mulvsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ") - (match_operand:SI 2 "reg_or_8bit_operand" "rI"))) - (trap_if (ne (mult:DI (sign_extend:DI (match_dup 1)) - (sign_extend:DI (match_dup 2))) - (sign_extend:DI (mult:SI (match_dup 1) - (match_dup 2)))) - (const_int 0))] - "!TARGET_ABI_UNICOSMK" - "mullv %r1,%2,%0" - [(set_attr "type" "imul") - (set_attr "opsize" "si")]) - -(define_insn "muldi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (mult:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ") - (match_operand:DI 2 "reg_or_8bit_operand" "rI")))] - "" - "mulq %r1,%2,%0" - [(set_attr "type" "imul")]) - -(define_insn "mulvdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (mult:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ") - (match_operand:DI 2 "reg_or_8bit_operand" "rI"))) - (trap_if (ne (mult:TI (sign_extend:TI (match_dup 1)) - (sign_extend:TI (match_dup 2))) - (sign_extend:TI (mult:DI (match_dup 1) - (match_dup 2)))) - (const_int 0))] - "" - "mulqv %r1,%2,%0" - [(set_attr "type" "imul")]) - -(define_expand "umuldi3_highpart" - [(set (match_operand:DI 0 "register_operand" "") - (truncate:DI - (lshiftrt:TI - (mult:TI (zero_extend:TI - (match_operand:DI 1 "register_operand" "")) - (match_operand:DI 2 "reg_or_8bit_operand" "")) - (const_int 64))))] - "" -{ - if (REG_P (operands[2])) - operands[2] = gen_rtx_ZERO_EXTEND (TImode, operands[2]); -}) - -(define_insn "*umuldi3_highpart_reg" - [(set (match_operand:DI 0 "register_operand" "=r") - (truncate:DI - (lshiftrt:TI - (mult:TI (zero_extend:TI - (match_operand:DI 1 "register_operand" "r")) - (zero_extend:TI - (match_operand:DI 2 "register_operand" "r"))) - (const_int 64))))] - "" - "umulh %1,%2,%0" - [(set_attr "type" "imul") - (set_attr "opsize" "udi")]) - -(define_insn "*umuldi3_highpart_const" - [(set (match_operand:DI 0 "register_operand" "=r") - (truncate:DI - (lshiftrt:TI - (mult:TI (zero_extend:TI (match_operand:DI 1 "register_operand" "r")) - (match_operand:TI 2 "cint8_operand" "I")) - (const_int 64))))] - "" - "umulh %1,%2,%0" - [(set_attr "type" "imul") - (set_attr "opsize" "udi")]) - -;; The divide and remainder operations take their inputs from r24 and -;; r25, put their output in r27, and clobber r23 and r28 on all -;; systems except Unicos/Mk. On Unicos, the standard library provides -;; subroutines which use the standard calling convention and work on -;; DImode operands. - -;; ??? Force sign-extension here because some versions of OSF/1 and -;; Interix/NT don't do the right thing if the inputs are not properly -;; sign-extended. But Linux, for instance, does not have this -;; problem. Is it worth the complication here to eliminate the sign -;; extension? - -(define_expand "divsi3" - [(set (match_dup 3) - (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) - (set (match_dup 4) - (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) - (parallel [(set (match_dup 5) - (sign_extend:DI (div:SI (match_dup 3) (match_dup 4)))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))]) - (set (match_operand:SI 0 "nonimmediate_operand" "") - (subreg:SI (match_dup 5) 0))] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" -{ - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); -}) - -(define_expand "udivsi3" - [(set (match_dup 3) - (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) - (set (match_dup 4) - (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) - (parallel [(set (match_dup 5) - (sign_extend:DI (udiv:SI (match_dup 3) (match_dup 4)))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))]) - (set (match_operand:SI 0 "nonimmediate_operand" "") - (subreg:SI (match_dup 5) 0))] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" -{ - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); -}) - -(define_expand "modsi3" - [(set (match_dup 3) - (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) - (set (match_dup 4) - (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) - (parallel [(set (match_dup 5) - (sign_extend:DI (mod:SI (match_dup 3) (match_dup 4)))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))]) - (set (match_operand:SI 0 "nonimmediate_operand" "") - (subreg:SI (match_dup 5) 0))] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" -{ - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); -}) - -(define_expand "umodsi3" - [(set (match_dup 3) - (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" ""))) - (set (match_dup 4) - (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" ""))) - (parallel [(set (match_dup 5) - (sign_extend:DI (umod:SI (match_dup 3) (match_dup 4)))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))]) - (set (match_operand:SI 0 "nonimmediate_operand" "") - (subreg:SI (match_dup 5) 0))] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" -{ - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); -}) - -(define_expand "divdi3" - [(parallel [(set (match_operand:DI 0 "register_operand" "") - (div:DI (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "register_operand" ""))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))])] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" - "") - -(define_expand "udivdi3" - [(parallel [(set (match_operand:DI 0 "register_operand" "") - (udiv:DI (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "register_operand" ""))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))])] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" - "") - -(define_expand "moddi3" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:DI 1 "register_operand" "")) - (use (match_operand:DI 2 "register_operand" ""))] - "!TARGET_ABI_OPEN_VMS" -{ - if (TARGET_ABI_UNICOSMK) - emit_insn (gen_moddi3_umk (operands[0], operands[1], operands[2])); - else - emit_insn (gen_moddi3_dft (operands[0], operands[1], operands[2])); - DONE; -}) - -(define_expand "moddi3_dft" - [(parallel [(set (match_operand:DI 0 "register_operand" "") - (mod:DI (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "register_operand" ""))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))])] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" - "") - -;; On Unicos/Mk, we do as the system's C compiler does: -;; compute the quotient, multiply and subtract. - -(define_expand "moddi3_umk" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:DI 1 "register_operand" "")) - (use (match_operand:DI 2 "register_operand" ""))] - "TARGET_ABI_UNICOSMK" -{ - rtx div, mul = gen_reg_rtx (DImode); - - div = expand_binop (DImode, sdiv_optab, operands[1], operands[2], - NULL_RTX, 0, OPTAB_LIB); - div = force_reg (DImode, div); - emit_insn (gen_muldi3 (mul, operands[2], div)); - emit_insn (gen_subdi3 (operands[0], operands[1], mul)); - DONE; -}) - -(define_expand "umoddi3" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:DI 1 "register_operand" "")) - (use (match_operand:DI 2 "register_operand" ""))] - "! TARGET_ABI_OPEN_VMS" -{ - if (TARGET_ABI_UNICOSMK) - emit_insn (gen_umoddi3_umk (operands[0], operands[1], operands[2])); - else - emit_insn (gen_umoddi3_dft (operands[0], operands[1], operands[2])); - DONE; -}) - -(define_expand "umoddi3_dft" - [(parallel [(set (match_operand:DI 0 "register_operand" "") - (umod:DI (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "register_operand" ""))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))])] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" - "") - -(define_expand "umoddi3_umk" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:DI 1 "register_operand" "")) - (use (match_operand:DI 2 "register_operand" ""))] - "TARGET_ABI_UNICOSMK" -{ - rtx div, mul = gen_reg_rtx (DImode); - - div = expand_binop (DImode, udiv_optab, operands[1], operands[2], - NULL_RTX, 1, OPTAB_LIB); - div = force_reg (DImode, div); - emit_insn (gen_muldi3 (mul, operands[2], div)); - emit_insn (gen_subdi3 (operands[0], operands[1], mul)); - DONE; -}) - -;; Lengths of 8 for ldq $t12,__divq($gp); jsr $t9,($t12),__divq as -;; expanded by the assembler. - -(define_insn_and_split "*divmodsi_internal_er" - [(set (match_operand:DI 0 "register_operand" "=c") - (sign_extend:DI (match_operator:SI 3 "divmod_operator" - [(match_operand:DI 1 "register_operand" "a") - (match_operand:DI 2 "register_operand" "b")]))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))] - "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" - "#" - "&& reload_completed" - [(parallel [(set (match_dup 0) - (sign_extend:DI (match_dup 3))) - (use (match_dup 0)) - (use (match_dup 4)) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))])] -{ - const char *str; - switch (GET_CODE (operands[3])) - { - case DIV: - str = "__divl"; - break; - case UDIV: - str = "__divlu"; - break; - case MOD: - str = "__reml"; - break; - case UMOD: - str = "__remlu"; - break; - default: - abort (); - } - operands[4] = GEN_INT (alpha_next_sequence_number++); - emit_insn (gen_movdi_er_high_g (operands[0], pic_offset_table_rtx, - gen_rtx_SYMBOL_REF (DImode, str), - operands[4])); -} - [(set_attr "type" "jsr") - (set_attr "length" "8")]) - -(define_insn "*divmodsi_internal_er_1" - [(set (match_operand:DI 0 "register_operand" "=c") - (sign_extend:DI (match_operator:SI 3 "divmod_operator" - [(match_operand:DI 1 "register_operand" "a") - (match_operand:DI 2 "register_operand" "b")]))) - (use (match_operand:DI 4 "register_operand" "c")) - (use (match_operand 5 "const_int_operand" "")) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))] - "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" - "jsr $23,($27),__%E3%j5" - [(set_attr "type" "jsr") - (set_attr "length" "4")]) - -(define_insn "*divmodsi_internal" - [(set (match_operand:DI 0 "register_operand" "=c") - (sign_extend:DI (match_operator:SI 3 "divmod_operator" - [(match_operand:DI 1 "register_operand" "a") - (match_operand:DI 2 "register_operand" "b")]))) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" - "%E3 %1,%2,%0" - [(set_attr "type" "jsr") - (set_attr "length" "8")]) - -(define_insn_and_split "*divmoddi_internal_er" - [(set (match_operand:DI 0 "register_operand" "=c") - (match_operator:DI 3 "divmod_operator" - [(match_operand:DI 1 "register_operand" "a") - (match_operand:DI 2 "register_operand" "b")])) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))] - "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" - "#" - "&& reload_completed" - [(parallel [(set (match_dup 0) (match_dup 3)) - (use (match_dup 0)) - (use (match_dup 4)) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))])] -{ - const char *str; - switch (GET_CODE (operands[3])) - { - case DIV: - str = "__divq"; - break; - case UDIV: - str = "__divqu"; - break; - case MOD: - str = "__remq"; - break; - case UMOD: - str = "__remqu"; - break; - default: - abort (); - } - operands[4] = GEN_INT (alpha_next_sequence_number++); - emit_insn (gen_movdi_er_high_g (operands[0], pic_offset_table_rtx, - gen_rtx_SYMBOL_REF (DImode, str), - operands[4])); -} - [(set_attr "type" "jsr") - (set_attr "length" "8")]) - -(define_insn "*divmoddi_internal_er_1" - [(set (match_operand:DI 0 "register_operand" "=c") - (match_operator:DI 3 "divmod_operator" - [(match_operand:DI 1 "register_operand" "a") - (match_operand:DI 2 "register_operand" "b")])) - (use (match_operand:DI 4 "register_operand" "c")) - (use (match_operand 5 "const_int_operand" "")) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))] - "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" - "jsr $23,($27),__%E3%j5" - [(set_attr "type" "jsr") - (set_attr "length" "4")]) - -(define_insn "*divmoddi_internal" - [(set (match_operand:DI 0 "register_operand" "=c") - (match_operator:DI 3 "divmod_operator" - [(match_operand:DI 1 "register_operand" "a") - (match_operand:DI 2 "register_operand" "b")])) - (clobber (reg:DI 23)) - (clobber (reg:DI 28))] - "! TARGET_ABI_OPEN_VMS && ! TARGET_ABI_UNICOSMK" - "%E3 %1,%2,%0" - [(set_attr "type" "jsr") - (set_attr "length" "8")]) - -;; Next are the basic logical operations. These only exist in DImode. - -(define_insn "anddi3" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (and:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ,rJ") - (match_operand:DI 2 "and_operand" "rI,N,MH")))] - "" - "@ - and %r1,%2,%0 - bic %r1,%N2,%0 - zapnot %r1,%m2,%0" - [(set_attr "type" "ilog,ilog,shift")]) - -;; There are times when we can split an AND into two AND insns. This occurs -;; when we can first clear any bytes and then clear anything else. For -;; example "I & 0xffff07" is "(I & 0xffffff) & 0xffffffffffffff07". -;; Only do this when running on 64-bit host since the computations are -;; too messy otherwise. - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (and:DI (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "const_int_operand" "")))] - "HOST_BITS_PER_WIDE_INT == 64 && ! and_operand (operands[2], DImode)" - [(set (match_dup 0) (and:DI (match_dup 1) (match_dup 3))) - (set (match_dup 0) (and:DI (match_dup 0) (match_dup 4)))] -{ - unsigned HOST_WIDE_INT mask1 = INTVAL (operands[2]); - unsigned HOST_WIDE_INT mask2 = mask1; - int i; - - /* For each byte that isn't all zeros, make it all ones. */ - for (i = 0; i < 64; i += 8) - if ((mask1 & ((HOST_WIDE_INT) 0xff << i)) != 0) - mask1 |= (HOST_WIDE_INT) 0xff << i; - - /* Now turn on any bits we've just turned off. */ - mask2 |= ~ mask1; - - operands[3] = GEN_INT (mask1); - operands[4] = GEN_INT (mask2); -}) - -(define_expand "zero_extendqihi2" - [(set (match_operand:HI 0 "register_operand" "") - (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))] - "" -{ - if (! TARGET_BWX) - operands[1] = force_reg (QImode, operands[1]); -}) - -(define_insn "*zero_extendqihi2_bwx" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] - "TARGET_BWX" - "@ - and %1,0xff,%0 - ldbu %0,%1" - [(set_attr "type" "ilog,ild")]) - -(define_insn "*zero_extendqihi2_nobwx" - [(set (match_operand:HI 0 "register_operand" "=r") - (zero_extend:HI (match_operand:QI 1 "register_operand" "r")))] - "! TARGET_BWX" - "and %1,0xff,%0" - [(set_attr "type" "ilog")]) - -(define_expand "zero_extendqisi2" - [(set (match_operand:SI 0 "register_operand" "") - (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))] - "" -{ - if (! TARGET_BWX) - operands[1] = force_reg (QImode, operands[1]); -}) - -(define_insn "*zero_extendqisi2_bwx" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] - "TARGET_BWX" - "@ - and %1,0xff,%0 - ldbu %0,%1" - [(set_attr "type" "ilog,ild")]) - -(define_insn "*zero_extendqisi2_nobwx" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (match_operand:QI 1 "register_operand" "r")))] - "! TARGET_BWX" - "and %1,0xff,%0" - [(set_attr "type" "ilog")]) - -(define_expand "zero_extendqidi2" - [(set (match_operand:DI 0 "register_operand" "") - (zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "")))] - "" -{ - if (! TARGET_BWX) - operands[1] = force_reg (QImode, operands[1]); -}) - -(define_insn "*zero_extendqidi2_bwx" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (zero_extend:DI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] - "TARGET_BWX" - "@ - and %1,0xff,%0 - ldbu %0,%1" - [(set_attr "type" "ilog,ild")]) - -(define_insn "*zero_extendqidi2_nobwx" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI (match_operand:QI 1 "register_operand" "r")))] - "! TARGET_BWX" - "and %1,0xff,%0" - [(set_attr "type" "ilog")]) - -(define_expand "zero_extendhisi2" - [(set (match_operand:SI 0 "register_operand" "") - (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))] - "" -{ - if (! TARGET_BWX) - operands[1] = force_reg (HImode, operands[1]); -}) - -(define_insn "*zero_extendhisi2_bwx" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))] - "TARGET_BWX" - "@ - zapnot %1,3,%0 - ldwu %0,%1" - [(set_attr "type" "shift,ild")]) - -(define_insn "*zero_extendhisi2_nobwx" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (match_operand:HI 1 "register_operand" "r")))] - "! TARGET_BWX" - "zapnot %1,3,%0" - [(set_attr "type" "shift")]) - -(define_expand "zero_extendhidi2" - [(set (match_operand:DI 0 "register_operand" "") - (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "")))] - "" -{ - if (! TARGET_BWX) - operands[1] = force_reg (HImode, operands[1]); -}) - -(define_insn "*zero_extendhidi2_bwx" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (zero_extend:DI (match_operand:HI 1 "nonimmediate_operand" "r,m")))] - "TARGET_BWX" - "@ - zapnot %1,3,%0 - ldwu %0,%1" - [(set_attr "type" "shift,ild")]) - -(define_insn "*zero_extendhidi2_nobwx" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI (match_operand:HI 1 "register_operand" "r")))] - "" - "zapnot %1,3,%0" - [(set_attr "type" "shift")]) - -(define_insn "zero_extendsidi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI (match_operand:SI 1 "register_operand" "r")))] - "" - "zapnot %1,15,%0" - [(set_attr "type" "shift")]) - -(define_insn "andnotdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI (not:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")) - (match_operand:DI 2 "reg_or_0_operand" "rJ")))] - "" - "bic %r2,%1,%0" - [(set_attr "type" "ilog")]) - -(define_insn "iordi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (ior:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ") - (match_operand:DI 2 "or_operand" "rI,N")))] - "" - "@ - bis %r1,%2,%0 - ornot %r1,%N2,%0" - [(set_attr "type" "ilog")]) - -(define_insn "one_cmpldi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (not:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")))] - "" - "ornot $31,%1,%0" - [(set_attr "type" "ilog")]) - -(define_insn "*iornot" - [(set (match_operand:DI 0 "register_operand" "=r") - (ior:DI (not:DI (match_operand:DI 1 "reg_or_8bit_operand" "rI")) - (match_operand:DI 2 "reg_or_0_operand" "rJ")))] - "" - "ornot %r2,%1,%0" - [(set_attr "type" "ilog")]) - -(define_insn "xordi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (xor:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ") - (match_operand:DI 2 "or_operand" "rI,N")))] - "" - "@ - xor %r1,%2,%0 - eqv %r1,%N2,%0" - [(set_attr "type" "ilog")]) - -(define_insn "*xornot" - [(set (match_operand:DI 0 "register_operand" "=r") - (not:DI (xor:DI (match_operand:DI 1 "register_operand" "%rJ") - (match_operand:DI 2 "register_operand" "rI"))))] - "" - "eqv %r1,%2,%0" - [(set_attr "type" "ilog")]) - -;; Handle FFS and related insns iff we support CIX. - -(define_expand "ffsdi2" - [(set (match_dup 2) - (unspec:DI [(match_operand:DI 1 "register_operand" "")] UNSPEC_CTTZ)) - (set (match_dup 3) - (plus:DI (match_dup 2) (const_int 1))) - (set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI (eq (match_dup 1) (const_int 0)) - (const_int 0) (match_dup 3)))] - "TARGET_CIX" -{ - operands[2] = gen_reg_rtx (DImode); - operands[3] = gen_reg_rtx (DImode); -}) - -(define_insn "*cttz" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "register_operand" "r")] UNSPEC_CTTZ))] - "TARGET_CIX" - "cttz %1,%0" - ; EV6 calls all mvi and cttz/ctlz/popc class imisc, so just - ; reuse the existing type name. - [(set_attr "type" "mvi")]) - -(define_insn "clzdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (clz:DI (match_operand:DI 1 "register_operand" "r")))] - "TARGET_CIX" - "ctlz %1,%0" - [(set_attr "type" "mvi")]) - -(define_insn "ctzdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (ctz:DI (match_operand:DI 1 "register_operand" "r")))] - "TARGET_CIX" - "cttz %1,%0" - [(set_attr "type" "mvi")]) - -(define_insn "popcountdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (popcount:DI (match_operand:DI 1 "register_operand" "r")))] - "TARGET_CIX" - "ctpop %1,%0" - [(set_attr "type" "mvi")]) - -;; Next come the shifts and the various extract and insert operations. - -(define_insn "ashldi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ,rJ") - (match_operand:DI 2 "reg_or_6bit_operand" "P,rS")))] - "" -{ - switch (which_alternative) - { - case 0: - if (operands[2] == const1_rtx) - return "addq %r1,%r1,%0"; - else - return "s%P2addq %r1,0,%0"; - case 1: - return "sll %r1,%2,%0"; - default: - abort(); - } -} - [(set_attr "type" "iadd,shift")]) - -(define_insn "*ashldi_se" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (subreg:SI (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "const_int_operand" "P")) - 0)))] - "INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 3" -{ - if (operands[2] == const1_rtx) - return "addl %r1,%r1,%0"; - else - return "s%P2addl %r1,0,%0"; -} - [(set_attr "type" "iadd")]) - -(define_insn "lshrdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (lshiftrt:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "reg_or_6bit_operand" "rS")))] - "" - "srl %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "ashrdi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashiftrt:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "reg_or_6bit_operand" "rS")))] - "" - "sra %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_expand "extendqihi2" - [(set (match_dup 2) - (ashift:DI (match_operand:QI 1 "some_operand" "") - (const_int 56))) - (set (match_operand:HI 0 "register_operand" "") - (ashiftrt:DI (match_dup 2) - (const_int 56)))] - "" -{ - if (TARGET_BWX) - { - emit_insn (gen_extendqihi2x (operands[0], - force_reg (QImode, operands[1]))); - DONE; - } - - /* If we have an unaligned MEM, extend to DImode (which we do - specially) and then copy to the result. */ - if (unaligned_memory_operand (operands[1], HImode)) - { - rtx temp = gen_reg_rtx (DImode); - - emit_insn (gen_extendqidi2 (temp, operands[1])); - emit_move_insn (operands[0], gen_lowpart (HImode, temp)); - DONE; - } - - operands[0] = gen_lowpart (DImode, operands[0]); - operands[1] = gen_lowpart (DImode, force_reg (QImode, operands[1])); - operands[2] = gen_reg_rtx (DImode); -}) - -(define_insn "extendqidi2x" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI (match_operand:QI 1 "register_operand" "r")))] - "TARGET_BWX" - "sextb %1,%0" - [(set_attr "type" "shift")]) - -(define_insn "extendhidi2x" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI (match_operand:HI 1 "register_operand" "r")))] - "TARGET_BWX" - "sextw %1,%0" - [(set_attr "type" "shift")]) - -(define_insn "extendqisi2x" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI (match_operand:QI 1 "register_operand" "r")))] - "TARGET_BWX" - "sextb %1,%0" - [(set_attr "type" "shift")]) - -(define_insn "extendhisi2x" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI (match_operand:HI 1 "register_operand" "r")))] - "TARGET_BWX" - "sextw %1,%0" - [(set_attr "type" "shift")]) - -(define_insn "extendqihi2x" - [(set (match_operand:HI 0 "register_operand" "=r") - (sign_extend:HI (match_operand:QI 1 "register_operand" "r")))] - "TARGET_BWX" - "sextb %1,%0" - [(set_attr "type" "shift")]) - -(define_expand "extendqisi2" - [(set (match_dup 2) - (ashift:DI (match_operand:QI 1 "some_operand" "") - (const_int 56))) - (set (match_operand:SI 0 "register_operand" "") - (ashiftrt:DI (match_dup 2) - (const_int 56)))] - "" -{ - if (TARGET_BWX) - { - emit_insn (gen_extendqisi2x (operands[0], - force_reg (QImode, operands[1]))); - DONE; - } - - /* If we have an unaligned MEM, extend to a DImode form of - the result (which we do specially). */ - if (unaligned_memory_operand (operands[1], QImode)) - { - rtx temp = gen_reg_rtx (DImode); - - emit_insn (gen_extendqidi2 (temp, operands[1])); - emit_move_insn (operands[0], gen_lowpart (SImode, temp)); - DONE; - } - - operands[0] = gen_lowpart (DImode, operands[0]); - operands[1] = gen_lowpart (DImode, force_reg (QImode, operands[1])); - operands[2] = gen_reg_rtx (DImode); -}) - -(define_expand "extendqidi2" - [(set (match_dup 2) - (ashift:DI (match_operand:QI 1 "some_operand" "") - (const_int 56))) - (set (match_operand:DI 0 "register_operand" "") - (ashiftrt:DI (match_dup 2) - (const_int 56)))] - "" -{ - if (TARGET_BWX) - { - emit_insn (gen_extendqidi2x (operands[0], - force_reg (QImode, operands[1]))); - DONE; - } - - if (unaligned_memory_operand (operands[1], QImode)) - { - rtx seq - = gen_unaligned_extendqidi (operands[0], - get_unaligned_address (operands[1], 1)); - - alpha_set_memflags (seq, operands[1]); - emit_insn (seq); - DONE; - } - - operands[1] = gen_lowpart (DImode, force_reg (QImode, operands[1])); - operands[2] = gen_reg_rtx (DImode); -}) - -(define_expand "extendhisi2" - [(set (match_dup 2) - (ashift:DI (match_operand:HI 1 "some_operand" "") - (const_int 48))) - (set (match_operand:SI 0 "register_operand" "") - (ashiftrt:DI (match_dup 2) - (const_int 48)))] - "" -{ - if (TARGET_BWX) - { - emit_insn (gen_extendhisi2x (operands[0], - force_reg (HImode, operands[1]))); - DONE; - } - - /* If we have an unaligned MEM, extend to a DImode form of - the result (which we do specially). */ - if (unaligned_memory_operand (operands[1], HImode)) - { - rtx temp = gen_reg_rtx (DImode); - - emit_insn (gen_extendhidi2 (temp, operands[1])); - emit_move_insn (operands[0], gen_lowpart (SImode, temp)); - DONE; - } - - operands[0] = gen_lowpart (DImode, operands[0]); - operands[1] = gen_lowpart (DImode, force_reg (HImode, operands[1])); - operands[2] = gen_reg_rtx (DImode); -}) - -(define_expand "extendhidi2" - [(set (match_dup 2) - (ashift:DI (match_operand:HI 1 "some_operand" "") - (const_int 48))) - (set (match_operand:DI 0 "register_operand" "") - (ashiftrt:DI (match_dup 2) - (const_int 48)))] - "" -{ - if (TARGET_BWX) - { - emit_insn (gen_extendhidi2x (operands[0], - force_reg (HImode, operands[1]))); - DONE; - } - - if (unaligned_memory_operand (operands[1], HImode)) - { - rtx seq - = gen_unaligned_extendhidi (operands[0], - get_unaligned_address (operands[1], 2)); - - alpha_set_memflags (seq, operands[1]); - emit_insn (seq); - DONE; - } - - operands[1] = gen_lowpart (DImode, force_reg (HImode, operands[1])); - operands[2] = gen_reg_rtx (DImode); -}) - -;; Here's how we sign extend an unaligned byte and halfword. Doing this -;; as a pattern saves one instruction. The code is similar to that for -;; the unaligned loads (see below). -;; -;; Operand 1 is the address + 1 (+2 for HI), operand 0 is the result. -(define_expand "unaligned_extendqidi" - [(use (match_operand:QI 0 "register_operand" "")) - (use (match_operand:DI 1 "address_operand" ""))] - "" -{ - if (WORDS_BIG_ENDIAN) - emit_insn (gen_unaligned_extendqidi_be (operands[0], operands[1])); - else - emit_insn (gen_unaligned_extendqidi_le (operands[0], operands[1])); - DONE; -}) - -(define_expand "unaligned_extendqidi_le" - [(set (match_dup 2) (match_operand:DI 1 "address_operand" "")) - (set (match_dup 3) - (mem:DI (and:DI (plus:DI (match_dup 2) (const_int -1)) - (const_int -8)))) - (set (match_dup 4) - (ashift:DI (match_dup 3) - (minus:DI (const_int 64) - (ashift:DI - (and:DI (match_dup 2) (const_int 7)) - (const_int 3))))) - (set (subreg:DI (match_operand:QI 0 "register_operand" "") 0) - (ashiftrt:DI (match_dup 4) (const_int 56)))] - "! WORDS_BIG_ENDIAN" -{ - operands[2] = gen_reg_rtx (DImode); - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); -}) - -(define_expand "unaligned_extendqidi_be" - [(set (match_dup 2) (match_operand:DI 1 "address_operand" "")) - (set (match_dup 3) (plus:DI (match_dup 2) (const_int -1))) - (set (match_dup 4) - (mem:DI (and:DI (match_dup 3) - (const_int -8)))) - (set (match_dup 5) (plus:DI (match_dup 2) (const_int -2))) - (set (match_dup 6) - (ashift:DI (match_dup 4) - (ashift:DI - (and:DI - (plus:DI (match_dup 5) (const_int 1)) - (const_int 7)) - (const_int 3)))) - (set (subreg:DI (match_operand:QI 0 "register_operand" "") 0) - (ashiftrt:DI (match_dup 6) (const_int 56)))] - "WORDS_BIG_ENDIAN" -{ - operands[2] = gen_reg_rtx (DImode); - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); - operands[6] = gen_reg_rtx (DImode); -}) - -(define_expand "unaligned_extendhidi" - [(use (match_operand:QI 0 "register_operand" "")) - (use (match_operand:DI 1 "address_operand" ""))] - "" -{ - operands[0] = gen_lowpart (DImode, operands[0]); - emit_insn ((WORDS_BIG_ENDIAN - ? gen_unaligned_extendhidi_be - : gen_unaligned_extendhidi_le) (operands[0], operands[1])); - DONE; -}) - -(define_expand "unaligned_extendhidi_le" - [(set (match_dup 2) (match_operand:DI 1 "address_operand" "")) - (set (match_dup 3) - (mem:DI (and:DI (plus:DI (match_dup 2) (const_int -2)) - (const_int -8)))) - (set (match_dup 4) - (ashift:DI (match_dup 3) - (minus:DI (const_int 64) - (ashift:DI - (and:DI (match_dup 2) (const_int 7)) - (const_int 3))))) - (set (match_operand:DI 0 "register_operand" "") - (ashiftrt:DI (match_dup 4) (const_int 48)))] - "! WORDS_BIG_ENDIAN" -{ - operands[2] = gen_reg_rtx (DImode); - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); -}) - -(define_expand "unaligned_extendhidi_be" - [(set (match_dup 2) (match_operand:DI 1 "address_operand" "")) - (set (match_dup 3) (plus:DI (match_dup 2) (const_int -2))) - (set (match_dup 4) - (mem:DI (and:DI (match_dup 3) - (const_int -8)))) - (set (match_dup 5) (plus:DI (match_dup 2) (const_int -3))) - (set (match_dup 6) - (ashift:DI (match_dup 4) - (ashift:DI - (and:DI - (plus:DI (match_dup 5) (const_int 1)) - (const_int 7)) - (const_int 3)))) - (set (match_operand:DI 0 "register_operand" "") - (ashiftrt:DI (match_dup 6) (const_int 48)))] - "WORDS_BIG_ENDIAN" -{ - operands[2] = gen_reg_rtx (DImode); - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - operands[5] = gen_reg_rtx (DImode); - operands[6] = gen_reg_rtx (DImode); -}) - -(define_insn "*extxl_const" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "mode_width_operand" "n") - (match_operand:DI 3 "mul8_operand" "I")))] - "" - "ext%M2l %r1,%s3,%0" - [(set_attr "type" "shift")]) - -(define_insn "extxl_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "mode_width_operand" "n") - (ashift:DI (match_operand:DI 3 "reg_or_8bit_operand" "rI") - (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "ext%M2l %r1,%3,%0" - [(set_attr "type" "shift")]) - -(define_insn "extxl_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (match_operand:DI 2 "mode_width_operand" "n") - (minus:DI - (const_int 56) - (ashift:DI - (match_operand:DI 3 "reg_or_8bit_operand" "rI") - (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "ext%M2l %r1,%3,%0" - [(set_attr "type" "shift")]) - -;; Combine has some strange notion of preserving existing undefined behavior -;; in shifts larger than a word size. So capture these patterns that it -;; should have turned into zero_extracts. - -(define_insn "*extxl_1_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI (lshiftrt:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3))) - (match_operand:DI 3 "mode_mask_operand" "n")))] - "! WORDS_BIG_ENDIAN" - "ext%U3l %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "*extxl_1_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI (lshiftrt:DI - (match_operand:DI 1 "reg_or_0_operand" "rJ") - (minus:DI (const_int 56) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3)))) - (match_operand:DI 3 "mode_mask_operand" "n")))] - "WORDS_BIG_ENDIAN" - "ext%U3l %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "*extql_2_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (lshiftrt:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "extql %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "*extql_2_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (lshiftrt:DI - (match_operand:DI 1 "reg_or_0_operand" "rJ") - (minus:DI (const_int 56) - (ashift:DI - (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "extql %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "extqh_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI - (match_operand:DI 1 "reg_or_0_operand" "rJ") - (minus:DI (const_int 64) - (ashift:DI - (and:DI - (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 7)) - (const_int 3)))))] - "! WORDS_BIG_ENDIAN" - "extqh %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "extqh_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI - (match_operand:DI 1 "reg_or_0_operand" "rJ") - (ashift:DI - (and:DI - (plus:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 1)) - (const_int 7)) - (const_int 3))))] - "WORDS_BIG_ENDIAN" - "extqh %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "extlh_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI - (and:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (const_int 2147483647)) - (minus:DI (const_int 64) - (ashift:DI - (and:DI - (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 7)) - (const_int 3)))))] - "! WORDS_BIG_ENDIAN" - "extlh %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "extlh_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI - (ashift:DI - (match_operand:DI 1 "reg_or_0_operand" "rJ") - (ashift:DI - (and:DI - (plus:DI - (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 1)) - (const_int 7)) - (const_int 3))) - (const_int 2147483647)))] - "WORDS_BIG_ENDIAN" - "extlh %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "extwh_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI - (and:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (const_int 65535)) - (minus:DI (const_int 64) - (ashift:DI - (and:DI - (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 7)) - (const_int 3)))))] - "! WORDS_BIG_ENDIAN" - "extwh %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "extwh_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI - (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (ashift:DI - (and:DI - (plus:DI - (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 1)) - (const_int 7)) - (const_int 3))) - (const_int 65535)))] - "WORDS_BIG_ENDIAN" - "extwh %r1,%2,%0" - [(set_attr "type" "shift")]) - -;; This converts an extXl into an extXh with an appropriate adjustment -;; to the address calculation. - -;;(define_split -;; [(set (match_operand:DI 0 "register_operand" "") -;; (ashift:DI (zero_extract:DI (match_operand:DI 1 "register_operand" "") -;; (match_operand:DI 2 "mode_width_operand" "") -;; (ashift:DI (match_operand:DI 3 "" "") -;; (const_int 3))) -;; (match_operand:DI 4 "const_int_operand" ""))) -;; (clobber (match_operand:DI 5 "register_operand" ""))] -;; "INTVAL (operands[4]) == 64 - INTVAL (operands[2])" -;; [(set (match_dup 5) (match_dup 6)) -;; (set (match_dup 0) -;; (ashift:DI (zero_extract:DI (match_dup 1) (match_dup 2) -;; (ashift:DI (plus:DI (match_dup 5) -;; (match_dup 7)) -;; (const_int 3))) -;; (match_dup 4)))] -;; " -;;{ -;; operands[6] = plus_constant (operands[3], -;; INTVAL (operands[2]) / BITS_PER_UNIT); -;; operands[7] = GEN_INT (- INTVAL (operands[2]) / BITS_PER_UNIT); -;;}") - -(define_insn "*insbl_const" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:QI 1 "register_operand" "r")) - (match_operand:DI 2 "mul8_operand" "I")))] - "" - "insbl %1,%s2,%0" - [(set_attr "type" "shift")]) - -(define_insn "*inswl_const" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:HI 1 "register_operand" "r")) - (match_operand:DI 2 "mul8_operand" "I")))] - "" - "inswl %1,%s2,%0" - [(set_attr "type" "shift")]) - -(define_insn "*insll_const" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) - (match_operand:DI 2 "mul8_operand" "I")))] - "" - "insll %1,%s2,%0" - [(set_attr "type" "shift")]) - -(define_insn "insbl_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:QI 1 "register_operand" "r")) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "insbl %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "insbl_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:QI 1 "register_operand" "r")) - (minus:DI (const_int 56) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "insbl %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "inswl_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:HI 1 "register_operand" "r")) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "inswl %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "inswl_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:HI 1 "register_operand" "r")) - (minus:DI (const_int 56) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "inswl %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "insll_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "insll %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "insll_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) - (minus:DI (const_int 56) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "insll %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "insql_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (match_operand:DI 1 "register_operand" "r") - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "insql %1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "insql_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI (match_operand:DI 1 "register_operand" "r") - (minus:DI (const_int 56) - (ashift:DI (match_operand:DI 2 "reg_or_8bit_operand" "rI") - (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "insql %1,%2,%0" - [(set_attr "type" "shift")]) - -;; Combine has this sometimes habit of moving the and outside of the -;; shift, making life more interesting. - -(define_insn "*insxl" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI (ashift:DI (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "mul8_operand" "I")) - (match_operand:DI 3 "immediate_operand" "i")))] - "HOST_BITS_PER_WIDE_INT == 64 - && GET_CODE (operands[3]) == CONST_INT - && (((unsigned HOST_WIDE_INT) 0xff << INTVAL (operands[2]) - == (unsigned HOST_WIDE_INT) INTVAL (operands[3])) - || ((unsigned HOST_WIDE_INT) 0xffff << INTVAL (operands[2]) - == (unsigned HOST_WIDE_INT) INTVAL (operands[3])) - || ((unsigned HOST_WIDE_INT) 0xffffffff << INTVAL (operands[2]) - == (unsigned HOST_WIDE_INT) INTVAL (operands[3])))" -{ -#if HOST_BITS_PER_WIDE_INT == 64 - if ((unsigned HOST_WIDE_INT) 0xff << INTVAL (operands[2]) - == (unsigned HOST_WIDE_INT) INTVAL (operands[3])) - return "insbl %1,%s2,%0"; - if ((unsigned HOST_WIDE_INT) 0xffff << INTVAL (operands[2]) - == (unsigned HOST_WIDE_INT) INTVAL (operands[3])) - return "inswl %1,%s2,%0"; - if ((unsigned HOST_WIDE_INT) 0xffffffff << INTVAL (operands[2]) - == (unsigned HOST_WIDE_INT) INTVAL (operands[3])) - return "insll %1,%s2,%0"; -#endif - abort(); -} - [(set_attr "type" "shift")]) - -;; We do not include the insXh insns because they are complex to express -;; and it does not appear that we would ever want to generate them. -;; -;; Since we need them for block moves, though, cop out and use unspec. - -(define_insn "insxh" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "mode_width_operand" "n") - (match_operand:DI 3 "reg_or_8bit_operand" "rI")] - UNSPEC_INSXH))] - "" - "ins%M2h %1,%3,%0" - [(set_attr "type" "shift")]) - -(define_insn "mskxl_le" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI (not:DI (ashift:DI - (match_operand:DI 2 "mode_mask_operand" "n") - (ashift:DI - (match_operand:DI 3 "reg_or_8bit_operand" "rI") - (const_int 3)))) - (match_operand:DI 1 "reg_or_0_operand" "rJ")))] - "! WORDS_BIG_ENDIAN" - "msk%U2l %r1,%3,%0" - [(set_attr "type" "shift")]) - -(define_insn "mskxl_be" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI (not:DI (ashift:DI - (match_operand:DI 2 "mode_mask_operand" "n") - (minus:DI (const_int 56) - (ashift:DI - (match_operand:DI 3 "reg_or_8bit_operand" "rI") - (const_int 3))))) - (match_operand:DI 1 "reg_or_0_operand" "rJ")))] - "WORDS_BIG_ENDIAN" - "msk%U2l %r1,%3,%0" - [(set_attr "type" "shift")]) - -;; We do not include the mskXh insns because it does not appear we would -;; ever generate one. -;; -;; Again, we do for block moves and we use unspec again. - -(define_insn "mskxh" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "mode_width_operand" "n") - (match_operand:DI 3 "reg_or_8bit_operand" "rI")] - UNSPEC_MSKXH))] - "" - "msk%M2h %1,%3,%0" - [(set_attr "type" "shift")]) - -;; Prefer AND + NE over LSHIFTRT + AND. - -(define_insn_and_split "*ze_and_ne" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (const_int 1) - (match_operand 2 "const_int_operand" "I")))] - "(unsigned HOST_WIDE_INT) INTVAL (operands[2]) < 8" - "#" - "(unsigned HOST_WIDE_INT) INTVAL (operands[2]) < 8" - [(set (match_dup 0) - (and:DI (match_dup 1) (match_dup 3))) - (set (match_dup 0) - (ne:DI (match_dup 0) (const_int 0)))] - "operands[3] = GEN_INT (1 << INTVAL (operands[2]));") - -;; Floating-point operations. All the double-precision insns can extend -;; from single, so indicate that. The exception are the ones that simply -;; play with the sign bits; it's not clear what to do there. - -(define_insn "abssf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (abs:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "cpys $f31,%R1,%0" - [(set_attr "type" "fcpys")]) - -(define_insn "*nabssf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (neg:SF (abs:SF (match_operand:SF 1 "reg_or_0_operand" "fG"))))] - "TARGET_FP" - "cpysn $f31,%R1,%0" - [(set_attr "type" "fadd")]) - -(define_insn "absdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (abs:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "cpys $f31,%R1,%0" - [(set_attr "type" "fcpys")]) - -(define_insn "*nabsdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (neg:DF (abs:DF (match_operand:DF 1 "reg_or_0_operand" "fG"))))] - "TARGET_FP" - "cpysn $f31,%R1,%0" - [(set_attr "type" "fadd")]) - -(define_expand "abstf2" - [(parallel [(set (match_operand:TF 0 "register_operand" "") - (abs:TF (match_operand:TF 1 "reg_or_0_operand" ""))) - (use (match_dup 2))])] - "TARGET_HAS_XFLOATING_LIBS" -{ -#if HOST_BITS_PER_WIDE_INT >= 64 - operands[2] = force_reg (DImode, GEN_INT ((HOST_WIDE_INT) 1 << 63)); -#else - operands[2] = force_reg (DImode, immed_double_const (0, 0x80000000, DImode)); -#endif -}) - -(define_insn_and_split "*abstf_internal" - [(set (match_operand:TF 0 "register_operand" "=r") - (abs:TF (match_operand:TF 1 "reg_or_0_operand" "rG"))) - (use (match_operand:DI 2 "register_operand" "r"))] - "TARGET_HAS_XFLOATING_LIBS" - "#" - "&& reload_completed" - [(const_int 0)] - "alpha_split_tfmode_frobsign (operands, gen_andnotdi3); DONE;") - -(define_insn "negsf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (neg:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "cpysn %R1,%R1,%0" - [(set_attr "type" "fadd")]) - -(define_insn "negdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (neg:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "cpysn %R1,%R1,%0" - [(set_attr "type" "fadd")]) - -(define_expand "negtf2" - [(parallel [(set (match_operand:TF 0 "register_operand" "") - (neg:TF (match_operand:TF 1 "reg_or_0_operand" ""))) - (use (match_dup 2))])] - "TARGET_HAS_XFLOATING_LIBS" -{ -#if HOST_BITS_PER_WIDE_INT >= 64 - operands[2] = force_reg (DImode, GEN_INT ((HOST_WIDE_INT) 1 << 63)); -#else - operands[2] = force_reg (DImode, immed_double_const (0, 0x80000000, DImode)); -#endif -}) - -(define_insn_and_split "*negtf_internal" - [(set (match_operand:TF 0 "register_operand" "=r") - (neg:TF (match_operand:TF 1 "reg_or_0_operand" "rG"))) - (use (match_operand:DI 2 "register_operand" "r"))] - "TARGET_HAS_XFLOATING_LIBS" - "#" - "&& reload_completed" - [(const_int 0)] - "alpha_split_tfmode_frobsign (operands, gen_xordi3); DONE;") - -(define_insn "*addsf_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (plus:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "add%,%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "addsf3" - [(set (match_operand:SF 0 "register_operand" "=f") - (plus:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "add%,%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*adddf_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (plus:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "add%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "adddf3" - [(set (match_operand:DF 0 "register_operand" "=f") - (plus:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "add%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*adddf_ext1" - [(set (match_operand:DF 0 "register_operand" "=f") - (plus:DF (float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "fG")) - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "add%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*adddf_ext2" - [(set (match_operand:DF 0 "register_operand" "=f") - (plus:DF (float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "%fG")) - (float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG"))))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "add%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_expand "addtf3" - [(use (match_operand 0 "register_operand" "")) - (use (match_operand 1 "general_operand" "")) - (use (match_operand 2 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_arith (PLUS, operands); DONE;") - -;; Define conversion operators between DFmode and SImode, using the cvtql -;; instruction. To allow combine et al to do useful things, we keep the -;; operation as a unit until after reload, at which point we split the -;; instructions. -;; -;; Note that we (attempt to) only consider this optimization when the -;; ultimate destination is memory. If we will be doing further integer -;; processing, it is cheaper to do the truncation in the int regs. - -(define_insn "*cvtql" - [(set (match_operand:SF 0 "register_operand" "=f") - (unspec:SF [(match_operand:DI 1 "reg_or_0_operand" "fG")] - UNSPEC_CVTQL))] - "TARGET_FP" - "cvtql%/ %R1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "v_sv")]) - -(define_insn_and_split "*fix_truncdfsi_ieee" - [(set (match_operand:SI 0 "memory_operand" "=m") - (subreg:SI - (match_operator:DI 4 "fix_operator" - [(match_operand:DF 1 "reg_or_0_operand" "fG")]) 0)) - (clobber (match_scratch:DI 2 "=&f")) - (clobber (match_scratch:SF 3 "=&f"))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "#" - "&& reload_completed" - [(set (match_dup 2) (match_op_dup 4 [(match_dup 1)])) - (set (match_dup 3) (unspec:SF [(match_dup 2)] UNSPEC_CVTQL)) - (set (match_dup 5) (match_dup 3))] -{ - operands[5] = adjust_address (operands[0], SFmode, 0); -} - [(set_attr "type" "fadd") - (set_attr "trap" "yes")]) - -(define_insn_and_split "*fix_truncdfsi_internal" - [(set (match_operand:SI 0 "memory_operand" "=m") - (subreg:SI - (match_operator:DI 3 "fix_operator" - [(match_operand:DF 1 "reg_or_0_operand" "fG")]) 0)) - (clobber (match_scratch:DI 2 "=f"))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "#" - "&& reload_completed" - [(set (match_dup 2) (match_op_dup 3 [(match_dup 1)])) - (set (match_dup 4) (unspec:SF [(match_dup 2)] UNSPEC_CVTQL)) - (set (match_dup 5) (match_dup 4))] -{ - operands[4] = gen_rtx_REG (SFmode, REGNO (operands[2])); - operands[5] = adjust_address (operands[0], SFmode, 0); -} - [(set_attr "type" "fadd") - (set_attr "trap" "yes")]) - -(define_insn "*fix_truncdfdi_ieee" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "=&f") - (match_operator:DI 2 "fix_operator" - [(match_operand:DF 1 "reg_or_0_operand" "fG")]))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cvt%-q%/ %R1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "c") - (set_attr "trap_suffix" "v_sv_svi")]) - -(define_insn "*fix_truncdfdi2" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "=f") - (match_operator:DI 2 "fix_operator" - [(match_operand:DF 1 "reg_or_0_operand" "fG")]))] - "TARGET_FP" - "cvt%-q%/ %R1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "c") - (set_attr "trap_suffix" "v_sv_svi")]) - -(define_expand "fix_truncdfdi2" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "") - (fix:DI (match_operand:DF 1 "reg_or_0_operand" "")))] - "TARGET_FP" - "") - -(define_expand "fixuns_truncdfdi2" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "") - (unsigned_fix:DI (match_operand:DF 1 "reg_or_0_operand" "")))] - "TARGET_FP" - "") - -;; Likewise between SFmode and SImode. - -(define_insn_and_split "*fix_truncsfsi_ieee" - [(set (match_operand:SI 0 "memory_operand" "=m") - (subreg:SI - (match_operator:DI 4 "fix_operator" - [(float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "fG"))]) 0)) - (clobber (match_scratch:DI 2 "=&f")) - (clobber (match_scratch:SF 3 "=&f"))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "#" - "&& reload_completed" - [(set (match_dup 2) (match_op_dup 4 [(float_extend:DF (match_dup 1))])) - (set (match_dup 3) (unspec:SF [(match_dup 2)] UNSPEC_CVTQL)) - (set (match_dup 5) (match_dup 3))] -{ - operands[5] = adjust_address (operands[0], SFmode, 0); -} - [(set_attr "type" "fadd") - (set_attr "trap" "yes")]) - -(define_insn_and_split "*fix_truncsfsi_internal" - [(set (match_operand:SI 0 "memory_operand" "=m") - (subreg:SI - (match_operator:DI 3 "fix_operator" - [(float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "fG"))]) 0)) - (clobber (match_scratch:DI 2 "=f"))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "#" - "&& reload_completed" - [(set (match_dup 2) (match_op_dup 3 [(float_extend:DF (match_dup 1))])) - (set (match_dup 4) (unspec:SF [(match_dup 2)] UNSPEC_CVTQL)) - (set (match_dup 5) (match_dup 4))] -{ - operands[4] = gen_rtx_REG (SFmode, REGNO (operands[2])); - operands[5] = adjust_address (operands[0], SFmode, 0); -} - [(set_attr "type" "fadd") - (set_attr "trap" "yes")]) - -(define_insn "*fix_truncsfdi_ieee" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "=&f") - (match_operator:DI 2 "fix_operator" - [(float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG"))]))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cvt%-q%/ %R1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "c") - (set_attr "trap_suffix" "v_sv_svi")]) - -(define_insn "*fix_truncsfdi2" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "=f") - (match_operator:DI 2 "fix_operator" - [(float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG"))]))] - "TARGET_FP" - "cvt%-q%/ %R1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "c") - (set_attr "trap_suffix" "v_sv_svi")]) - -(define_expand "fix_truncsfdi2" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "") - (fix:DI (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" ""))))] - "TARGET_FP" - "") - -(define_expand "fixuns_truncsfdi2" - [(set (match_operand:DI 0 "reg_no_subreg_operand" "") - (unsigned_fix:DI - (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" ""))))] - "TARGET_FP" - "") - -(define_expand "fix_trunctfdi2" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:TF 1 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_cvt (FIX, operands); DONE;") - -(define_expand "fixuns_trunctfdi2" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:TF 1 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_cvt (UNSIGNED_FIX, operands); DONE;") - -(define_insn "*floatdisf_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (float:SF (match_operand:DI 1 "reg_no_subreg_operand" "f")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cvtq%,%/ %1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "sui")]) - -(define_insn "floatdisf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (float:SF (match_operand:DI 1 "reg_no_subreg_operand" "f")))] - "TARGET_FP" - "cvtq%,%/ %1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "sui")]) - -(define_insn_and_split "*floatsisf2_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (float:SF (match_operand:SI 1 "memory_operand" "m"))) - (clobber (match_scratch:DI 2 "=&f")) - (clobber (match_scratch:SF 3 "=&f"))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "#" - "&& reload_completed" - [(set (match_dup 3) (match_dup 1)) - (set (match_dup 2) (unspec:DI [(match_dup 3)] UNSPEC_CVTLQ)) - (set (match_dup 0) (float:SF (match_dup 2)))] -{ - operands[1] = adjust_address (operands[1], SFmode, 0); -}) - -(define_insn_and_split "*floatsisf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (float:SF (match_operand:SI 1 "memory_operand" "m")))] - "TARGET_FP" - "#" - "&& reload_completed" - [(set (match_dup 0) (match_dup 1)) - (set (match_dup 2) (unspec:DI [(match_dup 0)] UNSPEC_CVTLQ)) - (set (match_dup 0) (float:SF (match_dup 2)))] -{ - operands[1] = adjust_address (operands[1], SFmode, 0); - operands[2] = gen_rtx_REG (DImode, REGNO (operands[0])); -}) - -(define_insn "*floatdidf_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (float:DF (match_operand:DI 1 "reg_no_subreg_operand" "f")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cvtq%-%/ %1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "sui")]) - -(define_insn "floatdidf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (float:DF (match_operand:DI 1 "reg_no_subreg_operand" "f")))] - "TARGET_FP" - "cvtq%-%/ %1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "sui")]) - -(define_insn_and_split "*floatsidf2_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (float:DF (match_operand:SI 1 "memory_operand" "m"))) - (clobber (match_scratch:DI 2 "=&f")) - (clobber (match_scratch:SF 3 "=&f"))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "#" - "&& reload_completed" - [(set (match_dup 3) (match_dup 1)) - (set (match_dup 2) (unspec:DI [(match_dup 3)] UNSPEC_CVTLQ)) - (set (match_dup 0) (float:DF (match_dup 2)))] -{ - operands[1] = adjust_address (operands[1], SFmode, 0); -}) - -(define_insn_and_split "*floatsidf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (float:DF (match_operand:SI 1 "memory_operand" "m")))] - "TARGET_FP" - "#" - "&& reload_completed" - [(set (match_dup 3) (match_dup 1)) - (set (match_dup 2) (unspec:DI [(match_dup 3)] UNSPEC_CVTLQ)) - (set (match_dup 0) (float:DF (match_dup 2)))] -{ - operands[1] = adjust_address (operands[1], SFmode, 0); - operands[2] = gen_rtx_REG (DImode, REGNO (operands[0])); - operands[3] = gen_rtx_REG (SFmode, REGNO (operands[0])); -}) - -(define_expand "floatditf2" - [(use (match_operand:TF 0 "register_operand" "")) - (use (match_operand:DI 1 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_cvt (FLOAT, operands); DONE;") - -(define_expand "floatunsdisf2" - [(use (match_operand:SF 0 "register_operand" "")) - (use (match_operand:DI 1 "register_operand" ""))] - "TARGET_FP" - "alpha_emit_floatuns (operands); DONE;") - -(define_expand "floatunsdidf2" - [(use (match_operand:DF 0 "register_operand" "")) - (use (match_operand:DI 1 "register_operand" ""))] - "TARGET_FP" - "alpha_emit_floatuns (operands); DONE;") - -(define_expand "floatunsditf2" - [(use (match_operand:TF 0 "register_operand" "")) - (use (match_operand:DI 1 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_cvt (UNSIGNED_FLOAT, operands); DONE;") - -(define_expand "extendsfdf2" - [(set (match_operand:DF 0 "register_operand" "") - (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "")))] - "TARGET_FP" -{ - if (alpha_fptm >= ALPHA_FPTM_SU) - operands[1] = force_reg (SFmode, operands[1]); -}) - -;; The Unicos/Mk assembler doesn't support cvtst, but we've already -;; asserted that alpha_fptm == ALPHA_FPTM_N. - -(define_insn "*extendsfdf2_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (float_extend:DF (match_operand:SF 1 "register_operand" "f")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cvtsts %1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes")]) - -(define_insn "*extendsfdf2_internal" - [(set (match_operand:DF 0 "register_operand" "=f,f,m") - (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "f,m,f")))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "@ - cpys %1,%1,%0 - ld%, %0,%1 - st%- %1,%0" - [(set_attr "type" "fcpys,fld,fst")]) - -(define_expand "extendsftf2" - [(use (match_operand:TF 0 "register_operand" "")) - (use (match_operand:SF 1 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" -{ - rtx tmp = gen_reg_rtx (DFmode); - emit_insn (gen_extendsfdf2 (tmp, operands[1])); - emit_insn (gen_extenddftf2 (operands[0], tmp)); - DONE; -}) - -(define_expand "extenddftf2" - [(use (match_operand:TF 0 "register_operand" "")) - (use (match_operand:DF 1 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_cvt (FLOAT_EXTEND, operands); DONE;") - -(define_insn "*truncdfsf2_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (float_truncate:SF (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cvt%-%,%/ %R1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "truncdfsf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (float_truncate:SF (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "cvt%-%,%/ %R1,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_expand "trunctfdf2" - [(use (match_operand:DF 0 "register_operand" "")) - (use (match_operand:TF 1 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_cvt (FLOAT_TRUNCATE, operands); DONE;") - -(define_expand "trunctfsf2" - [(use (match_operand:SF 0 "register_operand" "")) - (use (match_operand:TF 1 "general_operand" ""))] - "TARGET_FP && TARGET_HAS_XFLOATING_LIBS" -{ - rtx tmpf, sticky, arg, lo, hi; - - tmpf = gen_reg_rtx (DFmode); - sticky = gen_reg_rtx (DImode); - arg = copy_to_mode_reg (TFmode, operands[1]); - lo = gen_lowpart (DImode, arg); - hi = gen_highpart (DImode, arg); - - /* Convert the low word of the TFmode value into a sticky rounding bit, - then or it into the low bit of the high word. This leaves the sticky - bit at bit 48 of the fraction, which is representable in DFmode, - which prevents rounding error in the final conversion to SFmode. */ - - emit_insn (gen_rtx_SET (VOIDmode, sticky, - gen_rtx_NE (DImode, lo, const0_rtx))); - emit_insn (gen_iordi3 (hi, hi, sticky)); - emit_insn (gen_trunctfdf2 (tmpf, arg)); - emit_insn (gen_truncdfsf2 (operands[0], tmpf)); - DONE; -}) - -(define_insn "*divsf3_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (div:SF (match_operand:SF 1 "reg_or_0_operand" "fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "div%,%/ %R1,%R2,%0" - [(set_attr "type" "fdiv") - (set_attr "opsize" "si") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "divsf3" - [(set (match_operand:SF 0 "register_operand" "=f") - (div:SF (match_operand:SF 1 "reg_or_0_operand" "fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "div%,%/ %R1,%R2,%0" - [(set_attr "type" "fdiv") - (set_attr "opsize" "si") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*divdf3_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (div:DF (match_operand:DF 1 "reg_or_0_operand" "fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "div%-%/ %R1,%R2,%0" - [(set_attr "type" "fdiv") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "divdf3" - [(set (match_operand:DF 0 "register_operand" "=f") - (div:DF (match_operand:DF 1 "reg_or_0_operand" "fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "div%-%/ %R1,%R2,%0" - [(set_attr "type" "fdiv") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*divdf_ext1" - [(set (match_operand:DF 0 "register_operand" "=f") - (div:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG")) - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "div%-%/ %R1,%R2,%0" - [(set_attr "type" "fdiv") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*divdf_ext2" - [(set (match_operand:DF 0 "register_operand" "=f") - (div:DF (match_operand:DF 1 "reg_or_0_operand" "fG") - (float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG"))))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "div%-%/ %R1,%R2,%0" - [(set_attr "type" "fdiv") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*divdf_ext3" - [(set (match_operand:DF 0 "register_operand" "=f") - (div:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG")) - (float_extend:DF (match_operand:SF 2 "reg_or_0_operand" "fG"))))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "div%-%/ %R1,%R2,%0" - [(set_attr "type" "fdiv") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_expand "divtf3" - [(use (match_operand 0 "register_operand" "")) - (use (match_operand 1 "general_operand" "")) - (use (match_operand 2 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_arith (DIV, operands); DONE;") - -(define_insn "*mulsf3_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (mult:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "mul%,%/ %R1,%R2,%0" - [(set_attr "type" "fmul") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "mulsf3" - [(set (match_operand:SF 0 "register_operand" "=f") - (mult:SF (match_operand:SF 1 "reg_or_0_operand" "%fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "mul%,%/ %R1,%R2,%0" - [(set_attr "type" "fmul") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*muldf3_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (mult:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "mul%-%/ %R1,%R2,%0" - [(set_attr "type" "fmul") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "muldf3" - [(set (match_operand:DF 0 "register_operand" "=f") - (mult:DF (match_operand:DF 1 "reg_or_0_operand" "%fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "mul%-%/ %R1,%R2,%0" - [(set_attr "type" "fmul") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*muldf_ext1" - [(set (match_operand:DF 0 "register_operand" "=f") - (mult:DF (float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "fG")) - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "mul%-%/ %R1,%R2,%0" - [(set_attr "type" "fmul") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*muldf_ext2" - [(set (match_operand:DF 0 "register_operand" "=f") - (mult:DF (float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "%fG")) - (float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG"))))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "mul%-%/ %R1,%R2,%0" - [(set_attr "type" "fmul") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_expand "multf3" - [(use (match_operand 0 "register_operand" "")) - (use (match_operand 1 "general_operand" "")) - (use (match_operand 2 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_arith (MULT, operands); DONE;") - -(define_insn "*subsf3_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (minus:SF (match_operand:SF 1 "reg_or_0_operand" "fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "sub%,%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "subsf3" - [(set (match_operand:SF 0 "register_operand" "=f") - (minus:SF (match_operand:SF 1 "reg_or_0_operand" "fG") - (match_operand:SF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "sub%,%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*subdf3_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (minus:DF (match_operand:DF 1 "reg_or_0_operand" "fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "sub%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "subdf3" - [(set (match_operand:DF 0 "register_operand" "=f") - (minus:DF (match_operand:DF 1 "reg_or_0_operand" "fG") - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP" - "sub%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*subdf_ext1" - [(set (match_operand:DF 0 "register_operand" "=f") - (minus:DF (float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "fG")) - (match_operand:DF 2 "reg_or_0_operand" "fG")))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "sub%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*subdf_ext2" - [(set (match_operand:DF 0 "register_operand" "=f") - (minus:DF (match_operand:DF 1 "reg_or_0_operand" "fG") - (float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG"))))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "sub%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*subdf_ext3" - [(set (match_operand:DF 0 "register_operand" "=f") - (minus:DF (float_extend:DF - (match_operand:SF 1 "reg_or_0_operand" "fG")) - (float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG"))))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "sub%-%/ %R1,%R2,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_expand "subtf3" - [(use (match_operand 0 "register_operand" "")) - (use (match_operand 1 "general_operand" "")) - (use (match_operand 2 "general_operand" ""))] - "TARGET_HAS_XFLOATING_LIBS" - "alpha_emit_xfloating_arith (MINUS, operands); DONE;") - -(define_insn "*sqrtsf2_ieee" - [(set (match_operand:SF 0 "register_operand" "=&f") - (sqrt:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP && TARGET_FIX && alpha_fptm >= ALPHA_FPTM_SU" - "sqrt%,%/ %R1,%0" - [(set_attr "type" "fsqrt") - (set_attr "opsize" "si") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "sqrtsf2" - [(set (match_operand:SF 0 "register_operand" "=f") - (sqrt:SF (match_operand:SF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP && TARGET_FIX" - "sqrt%,%/ %R1,%0" - [(set_attr "type" "fsqrt") - (set_attr "opsize" "si") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "*sqrtdf2_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (sqrt:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP && TARGET_FIX && alpha_fptm >= ALPHA_FPTM_SU" - "sqrt%-%/ %R1,%0" - [(set_attr "type" "fsqrt") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -(define_insn "sqrtdf2" - [(set (match_operand:DF 0 "register_operand" "=f") - (sqrt:DF (match_operand:DF 1 "reg_or_0_operand" "fG")))] - "TARGET_FP && TARGET_FIX" - "sqrt%-%/ %R1,%0" - [(set_attr "type" "fsqrt") - (set_attr "trap" "yes") - (set_attr "round_suffix" "normal") - (set_attr "trap_suffix" "u_su_sui")]) - -;; Next are all the integer comparisons, and conditional moves and branches -;; and some of the related define_expand's and define_split's. - -(define_insn "*setcc_internal" - [(set (match_operand 0 "register_operand" "=r") - (match_operator 1 "alpha_comparison_operator" - [(match_operand:DI 2 "register_operand" "r") - (match_operand:DI 3 "reg_or_8bit_operand" "rI")]))] - "GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_INT - && GET_MODE_SIZE (GET_MODE (operands[0])) <= 8 - && GET_MODE (operands[0]) == GET_MODE (operands[1])" - "cmp%C1 %2,%3,%0" - [(set_attr "type" "icmp")]) - -;; Yes, we can technically support reg_or_8bit_operand in operand 2, -;; but that's non-canonical rtl and allowing that causes inefficiencies -;; from cse on. -(define_insn "*setcc_swapped_internal" - [(set (match_operand 0 "register_operand" "=r") - (match_operator 1 "alpha_swapped_comparison_operator" - [(match_operand:DI 2 "register_operand" "r") - (match_operand:DI 3 "reg_or_0_operand" "rJ")]))] - "GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_INT - && GET_MODE_SIZE (GET_MODE (operands[0])) <= 8 - && GET_MODE (operands[0]) == GET_MODE (operands[1])" - "cmp%c1 %r3,%2,%0" - [(set_attr "type" "icmp")]) - -;; Use match_operator rather than ne directly so that we can match -;; multiple integer modes. -(define_insn "*setne_internal" - [(set (match_operand 0 "register_operand" "=r") - (match_operator 1 "signed_comparison_operator" - [(match_operand:DI 2 "register_operand" "r") - (const_int 0)]))] - "GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_INT - && GET_MODE_SIZE (GET_MODE (operands[0])) <= 8 - && GET_CODE (operands[1]) == NE - && GET_MODE (operands[0]) == GET_MODE (operands[1])" - "cmpult $31,%2,%0" - [(set_attr "type" "icmp")]) - -;; The mode folding trick can't be used with const_int operands, since -;; reload needs to know the proper mode. -;; -;; Use add_operand instead of the more seemingly natural reg_or_8bit_operand -;; in order to create more pairs of constants. As long as we're allowing -;; two constants at the same time, and will have to reload one of them... - -(define_insn "*movqicc_internal" - [(set (match_operand:QI 0 "register_operand" "=r,r,r,r") - (if_then_else:QI - (match_operator 2 "signed_comparison_operator" - [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") - (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) - (match_operand:QI 1 "add_operand" "rI,0,rI,0") - (match_operand:QI 5 "add_operand" "0,rI,0,rI")))] - "(operands[3] == const0_rtx || operands[4] == const0_rtx)" - "@ - cmov%C2 %r3,%1,%0 - cmov%D2 %r3,%5,%0 - cmov%c2 %r4,%1,%0 - cmov%d2 %r4,%5,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movhicc_internal" - [(set (match_operand:HI 0 "register_operand" "=r,r,r,r") - (if_then_else:HI - (match_operator 2 "signed_comparison_operator" - [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") - (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) - (match_operand:HI 1 "add_operand" "rI,0,rI,0") - (match_operand:HI 5 "add_operand" "0,rI,0,rI")))] - "(operands[3] == const0_rtx || operands[4] == const0_rtx)" - "@ - cmov%C2 %r3,%1,%0 - cmov%D2 %r3,%5,%0 - cmov%c2 %r4,%1,%0 - cmov%d2 %r4,%5,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movsicc_internal" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (if_then_else:SI - (match_operator 2 "signed_comparison_operator" - [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") - (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) - (match_operand:SI 1 "add_operand" "rI,0,rI,0") - (match_operand:SI 5 "add_operand" "0,rI,0,rI")))] - "(operands[3] == const0_rtx || operands[4] == const0_rtx)" - "@ - cmov%C2 %r3,%1,%0 - cmov%D2 %r3,%5,%0 - cmov%c2 %r4,%1,%0 - cmov%d2 %r4,%5,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movdicc_internal" - [(set (match_operand:DI 0 "register_operand" "=r,r,r,r") - (if_then_else:DI - (match_operator 2 "signed_comparison_operator" - [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") - (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) - (match_operand:DI 1 "add_operand" "rI,0,rI,0") - (match_operand:DI 5 "add_operand" "0,rI,0,rI")))] - "(operands[3] == const0_rtx || operands[4] == const0_rtx)" - "@ - cmov%C2 %r3,%1,%0 - cmov%D2 %r3,%5,%0 - cmov%c2 %r4,%1,%0 - cmov%d2 %r4,%5,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movqicc_lbc" - [(set (match_operand:QI 0 "register_operand" "=r,r") - (if_then_else:QI - (eq (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:QI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:QI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbc %r2,%1,%0 - cmovlbs %r2,%3,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movhicc_lbc" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (if_then_else:HI - (eq (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:HI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:HI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbc %r2,%1,%0 - cmovlbs %r2,%3,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movsicc_lbc" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (if_then_else:SI - (eq (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:SI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:SI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbc %r2,%1,%0 - cmovlbs %r2,%3,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movdicc_lbc" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (if_then_else:DI - (eq (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:DI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:DI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbc %r2,%1,%0 - cmovlbs %r2,%3,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movqicc_lbs" - [(set (match_operand:QI 0 "register_operand" "=r,r") - (if_then_else:QI - (ne (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:QI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:QI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbs %r2,%1,%0 - cmovlbc %r2,%3,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movhicc_lbs" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (if_then_else:HI - (ne (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:HI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:HI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbs %r2,%1,%0 - cmovlbc %r2,%3,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movsicc_lbs" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (if_then_else:SI - (ne (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:SI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:SI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbs %r2,%1,%0 - cmovlbc %r2,%3,%0" - [(set_attr "type" "icmov")]) - -(define_insn "*movdicc_lbs" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (if_then_else:DI - (ne (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (match_operand:DI 1 "reg_or_8bit_operand" "rI,0") - (match_operand:DI 3 "reg_or_8bit_operand" "0,rI")))] - "" - "@ - cmovlbs %r2,%1,%0 - cmovlbc %r2,%3,%0" - [(set_attr "type" "icmov")]) - -;; For ABS, we have two choices, depending on whether the input and output -;; registers are the same or not. -(define_expand "absdi2" - [(set (match_operand:DI 0 "register_operand" "") - (abs:DI (match_operand:DI 1 "register_operand" "")))] - "" -{ - if (rtx_equal_p (operands[0], operands[1])) - emit_insn (gen_absdi2_same (operands[0], gen_reg_rtx (DImode))); - else - emit_insn (gen_absdi2_diff (operands[0], operands[1])); - DONE; -}) - -(define_expand "absdi2_same" - [(set (match_operand:DI 1 "register_operand" "") - (neg:DI (match_operand:DI 0 "register_operand" ""))) - (set (match_dup 0) - (if_then_else:DI (ge (match_dup 0) (const_int 0)) - (match_dup 0) - (match_dup 1)))] - "" - "") - -(define_expand "absdi2_diff" - [(set (match_operand:DI 0 "register_operand" "") - (neg:DI (match_operand:DI 1 "register_operand" ""))) - (set (match_dup 0) - (if_then_else:DI (lt (match_dup 1) (const_int 0)) - (match_dup 0) - (match_dup 1)))] - "" - "") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (abs:DI (match_dup 0))) - (clobber (match_operand:DI 1 "register_operand" ""))] - "" - [(set (match_dup 1) (neg:DI (match_dup 0))) - (set (match_dup 0) (if_then_else:DI (ge (match_dup 0) (const_int 0)) - (match_dup 0) (match_dup 1)))] - "") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (abs:DI (match_operand:DI 1 "register_operand" "")))] - "! rtx_equal_p (operands[0], operands[1])" - [(set (match_dup 0) (neg:DI (match_dup 1))) - (set (match_dup 0) (if_then_else:DI (lt (match_dup 1) (const_int 0)) - (match_dup 0) (match_dup 1)))] - "") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (neg:DI (abs:DI (match_dup 0)))) - (clobber (match_operand:DI 1 "register_operand" ""))] - "" - [(set (match_dup 1) (neg:DI (match_dup 0))) - (set (match_dup 0) (if_then_else:DI (le (match_dup 0) (const_int 0)) - (match_dup 0) (match_dup 1)))] - "") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (neg:DI (abs:DI (match_operand:DI 1 "register_operand" ""))))] - "! rtx_equal_p (operands[0], operands[1])" - [(set (match_dup 0) (neg:DI (match_dup 1))) - (set (match_dup 0) (if_then_else:DI (gt (match_dup 1) (const_int 0)) - (match_dup 0) (match_dup 1)))] - "") - -(define_insn "sminqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (smin:QI (match_operand:QI 1 "reg_or_0_operand" "%rJ") - (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "minsb8 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_insn "uminqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (umin:QI (match_operand:QI 1 "reg_or_0_operand" "%rJ") - (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "minub8 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_insn "smaxqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (smax:QI (match_operand:QI 1 "reg_or_0_operand" "%rJ") - (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "maxsb8 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_insn "umaxqi3" - [(set (match_operand:QI 0 "register_operand" "=r") - (umax:QI (match_operand:QI 1 "reg_or_0_operand" "%rJ") - (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "maxub8 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_insn "sminhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (smin:HI (match_operand:HI 1 "reg_or_0_operand" "%rJ") - (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "minsw4 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_insn "uminhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (umin:HI (match_operand:HI 1 "reg_or_0_operand" "%rJ") - (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "minuw4 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_insn "smaxhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (smax:HI (match_operand:HI 1 "reg_or_0_operand" "%rJ") - (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "maxsw4 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_insn "umaxhi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (umax:HI (match_operand:HI 1 "reg_or_0_operand" "%rJ") - (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] - "TARGET_MAX" - "maxuw4 %r1,%2,%0" - [(set_attr "type" "mvi")]) - -(define_expand "smaxdi3" - [(set (match_dup 3) - (le:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI (eq (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "" - { operands[3] = gen_reg_rtx (DImode); }) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (smax:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (clobber (match_operand:DI 3 "register_operand" ""))] - "operands[2] != const0_rtx" - [(set (match_dup 3) (le:DI (match_dup 1) (match_dup 2))) - (set (match_dup 0) (if_then_else:DI (eq (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "") - -(define_insn "*smax_const0" - [(set (match_operand:DI 0 "register_operand" "=r") - (smax:DI (match_operand:DI 1 "register_operand" "0") - (const_int 0)))] - "" - "cmovlt %0,0,%0" - [(set_attr "type" "icmov")]) - -(define_expand "smindi3" - [(set (match_dup 3) - (lt:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI (ne (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "" - { operands[3] = gen_reg_rtx (DImode); }) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (smin:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (clobber (match_operand:DI 3 "register_operand" ""))] - "operands[2] != const0_rtx" - [(set (match_dup 3) (lt:DI (match_dup 1) (match_dup 2))) - (set (match_dup 0) (if_then_else:DI (ne (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "") - -(define_insn "*smin_const0" - [(set (match_operand:DI 0 "register_operand" "=r") - (smin:DI (match_operand:DI 1 "register_operand" "0") - (const_int 0)))] - "" - "cmovgt %0,0,%0" - [(set_attr "type" "icmov")]) - -(define_expand "umaxdi3" - [(set (match_dup 3) - (leu:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI (eq (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "" - "operands[3] = gen_reg_rtx (DImode);") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (umax:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (clobber (match_operand:DI 3 "register_operand" ""))] - "operands[2] != const0_rtx" - [(set (match_dup 3) (leu:DI (match_dup 1) (match_dup 2))) - (set (match_dup 0) (if_then_else:DI (eq (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "") - -(define_expand "umindi3" - [(set (match_dup 3) - (ltu:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI (ne (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "" - "operands[3] = gen_reg_rtx (DImode);") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (umin:DI (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" ""))) - (clobber (match_operand:DI 3 "register_operand" ""))] - "operands[2] != const0_rtx" - [(set (match_dup 3) (ltu:DI (match_dup 1) (match_dup 2))) - (set (match_dup 0) (if_then_else:DI (ne (match_dup 3) (const_int 0)) - (match_dup 1) (match_dup 2)))] - "") - -(define_insn "*bcc_normal" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "rJ") - (const_int 0)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "b%C1 %r2,%0" - [(set_attr "type" "ibr")]) - -(define_insn "*bcc_reverse" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(match_operand:DI 2 "register_operand" "r") - (const_int 0)]) - - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - "b%c1 %2,%0" - [(set_attr "type" "ibr")]) - -(define_insn "*blbs_normal" - [(set (pc) - (if_then_else - (ne (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "blbs %r1,%0" - [(set_attr "type" "ibr")]) - -(define_insn "*blbc_normal" - [(set (pc) - (if_then_else - (eq (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "blbc %r1,%0" - [(set_attr "type" "ibr")]) - -(define_split - [(parallel - [(set (pc) - (if_then_else - (match_operator 1 "comparison_operator" - [(zero_extract:DI (match_operand:DI 2 "register_operand" "") - (const_int 1) - (match_operand:DI 3 "const_int_operand" "")) - (const_int 0)]) - (label_ref (match_operand 0 "" "")) - (pc))) - (clobber (match_operand:DI 4 "register_operand" ""))])] - "INTVAL (operands[3]) != 0" - [(set (match_dup 4) - (lshiftrt:DI (match_dup 2) (match_dup 3))) - (set (pc) - (if_then_else (match_op_dup 1 - [(zero_extract:DI (match_dup 4) - (const_int 1) - (const_int 0)) - (const_int 0)]) - (label_ref (match_dup 0)) - (pc)))] - "") - -;; The following are the corresponding floating-point insns. Recall -;; we need to have variants that expand the arguments from SFmode -;; to DFmode. - -(define_insn "*cmpdf_ieee" - [(set (match_operand:DF 0 "register_operand" "=&f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(match_operand:DF 2 "reg_or_0_operand" "fG") - (match_operand:DF 3 "reg_or_0_operand" "fG")]))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*cmpdf_internal" - [(set (match_operand:DF 0 "register_operand" "=f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(match_operand:DF 2 "reg_or_0_operand" "fG") - (match_operand:DF 3 "reg_or_0_operand" "fG")]))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*cmpdf_ieee_ext1" - [(set (match_operand:DF 0 "register_operand" "=&f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG")) - (match_operand:DF 3 "reg_or_0_operand" "fG")]))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*cmpdf_ext1" - [(set (match_operand:DF 0 "register_operand" "=f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG")) - (match_operand:DF 3 "reg_or_0_operand" "fG")]))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*cmpdf_ieee_ext2" - [(set (match_operand:DF 0 "register_operand" "=&f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(match_operand:DF 2 "reg_or_0_operand" "fG") - (float_extend:DF - (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*cmpdf_ext2" - [(set (match_operand:DF 0 "register_operand" "=f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(match_operand:DF 2 "reg_or_0_operand" "fG") - (float_extend:DF - (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*cmpdf_ieee_ext3" - [(set (match_operand:DF 0 "register_operand" "=&f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG")) - (float_extend:DF - (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] - "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*cmpdf_ext3" - [(set (match_operand:DF 0 "register_operand" "=f") - (match_operator:DF 1 "alpha_fp_comparison_operator" - [(float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG")) - (float_extend:DF - (match_operand:SF 3 "reg_or_0_operand" "fG"))]))] - "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU" - "cmp%-%C1%/ %R2,%R3,%0" - [(set_attr "type" "fadd") - (set_attr "trap" "yes") - (set_attr "trap_suffix" "su")]) - -(define_insn "*movdfcc_internal" - [(set (match_operand:DF 0 "register_operand" "=f,f") - (if_then_else:DF - (match_operator 3 "signed_comparison_operator" - [(match_operand:DF 4 "reg_or_0_operand" "fG,fG") - (match_operand:DF 2 "const0_operand" "G,G")]) - (match_operand:DF 1 "reg_or_0_operand" "fG,0") - (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] - "TARGET_FP" - "@ - fcmov%C3 %R4,%R1,%0 - fcmov%D3 %R4,%R5,%0" - [(set_attr "type" "fcmov")]) - -(define_insn "*movsfcc_internal" - [(set (match_operand:SF 0 "register_operand" "=f,f") - (if_then_else:SF - (match_operator 3 "signed_comparison_operator" - [(match_operand:DF 4 "reg_or_0_operand" "fG,fG") - (match_operand:DF 2 "const0_operand" "G,G")]) - (match_operand:SF 1 "reg_or_0_operand" "fG,0") - (match_operand:SF 5 "reg_or_0_operand" "0,fG")))] - "TARGET_FP" - "@ - fcmov%C3 %R4,%R1,%0 - fcmov%D3 %R4,%R5,%0" - [(set_attr "type" "fcmov")]) - -(define_insn "*movdfcc_ext1" - [(set (match_operand:DF 0 "register_operand" "=f,f") - (if_then_else:DF - (match_operator 3 "signed_comparison_operator" - [(match_operand:DF 4 "reg_or_0_operand" "fG,fG") - (match_operand:DF 2 "const0_operand" "G,G")]) - (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG,0")) - (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] - "TARGET_FP" - "@ - fcmov%C3 %R4,%R1,%0 - fcmov%D3 %R4,%R5,%0" - [(set_attr "type" "fcmov")]) - -(define_insn "*movdfcc_ext2" - [(set (match_operand:DF 0 "register_operand" "=f,f") - (if_then_else:DF - (match_operator 3 "signed_comparison_operator" - [(float_extend:DF - (match_operand:SF 4 "reg_or_0_operand" "fG,fG")) - (match_operand:DF 2 "const0_operand" "G,G")]) - (match_operand:DF 1 "reg_or_0_operand" "fG,0") - (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] - "TARGET_FP" - "@ - fcmov%C3 %R4,%R1,%0 - fcmov%D3 %R4,%R5,%0" - [(set_attr "type" "fcmov")]) - -(define_insn "*movdfcc_ext3" - [(set (match_operand:SF 0 "register_operand" "=f,f") - (if_then_else:SF - (match_operator 3 "signed_comparison_operator" - [(float_extend:DF - (match_operand:SF 4 "reg_or_0_operand" "fG,fG")) - (match_operand:DF 2 "const0_operand" "G,G")]) - (match_operand:SF 1 "reg_or_0_operand" "fG,0") - (match_operand:SF 5 "reg_or_0_operand" "0,fG")))] - "TARGET_FP" - "@ - fcmov%C3 %R4,%R1,%0 - fcmov%D3 %R4,%R5,%0" - [(set_attr "type" "fcmov")]) - -(define_insn "*movdfcc_ext4" - [(set (match_operand:DF 0 "register_operand" "=f,f") - (if_then_else:DF - (match_operator 3 "signed_comparison_operator" - [(float_extend:DF - (match_operand:SF 4 "reg_or_0_operand" "fG,fG")) - (match_operand:DF 2 "const0_operand" "G,G")]) - (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG,0")) - (match_operand:DF 5 "reg_or_0_operand" "0,fG")))] - "TARGET_FP" - "@ - fcmov%C3 %R4,%R1,%0 - fcmov%D3 %R4,%R5,%0" - [(set_attr "type" "fcmov")]) - -(define_expand "maxdf3" - [(set (match_dup 3) - (le:DF (match_operand:DF 1 "reg_or_0_operand" "") - (match_operand:DF 2 "reg_or_0_operand" ""))) - (set (match_operand:DF 0 "register_operand" "") - (if_then_else:DF (eq (match_dup 3) (match_dup 4)) - (match_dup 1) (match_dup 2)))] - "TARGET_FP" -{ - operands[3] = gen_reg_rtx (DFmode); - operands[4] = CONST0_RTX (DFmode); -}) - -(define_expand "mindf3" - [(set (match_dup 3) - (lt:DF (match_operand:DF 1 "reg_or_0_operand" "") - (match_operand:DF 2 "reg_or_0_operand" ""))) - (set (match_operand:DF 0 "register_operand" "") - (if_then_else:DF (ne (match_dup 3) (match_dup 4)) - (match_dup 1) (match_dup 2)))] - "TARGET_FP" -{ - operands[3] = gen_reg_rtx (DFmode); - operands[4] = CONST0_RTX (DFmode); -}) - -(define_expand "maxsf3" - [(set (match_dup 3) - (le:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "")) - (float_extend:DF (match_operand:SF 2 "reg_or_0_operand" "")))) - (set (match_operand:SF 0 "register_operand" "") - (if_then_else:SF (eq (match_dup 3) (match_dup 4)) - (match_dup 1) (match_dup 2)))] - "TARGET_FP" -{ - operands[3] = gen_reg_rtx (DFmode); - operands[4] = CONST0_RTX (DFmode); -}) - -(define_expand "minsf3" - [(set (match_dup 3) - (lt:DF (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "")) - (float_extend:DF (match_operand:SF 2 "reg_or_0_operand" "")))) - (set (match_operand:SF 0 "register_operand" "") - (if_then_else:SF (ne (match_dup 3) (match_dup 4)) - (match_dup 1) (match_dup 2)))] - "TARGET_FP" -{ - operands[3] = gen_reg_rtx (DFmode); - operands[4] = CONST0_RTX (DFmode); -}) - -(define_insn "*fbcc_normal" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(match_operand:DF 2 "reg_or_0_operand" "fG") - (match_operand:DF 3 "const0_operand" "G")]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "TARGET_FP" - "fb%C1 %R2,%0" - [(set_attr "type" "fbr")]) - -(define_insn "*fbcc_ext_normal" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(float_extend:DF - (match_operand:SF 2 "reg_or_0_operand" "fG")) - (match_operand:DF 3 "const0_operand" "G")]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "TARGET_FP" - "fb%C1 %R2,%0" - [(set_attr "type" "fbr")]) - -;; These are the main define_expand's used to make conditional branches -;; and compares. - -(define_expand "cmpdf" - [(set (cc0) (compare (match_operand:DF 0 "reg_or_0_operand" "") - (match_operand:DF 1 "reg_or_0_operand" "")))] - "TARGET_FP" -{ - alpha_compare.op0 = operands[0]; - alpha_compare.op1 = operands[1]; - alpha_compare.fp_p = 1; - DONE; -}) - -(define_expand "cmptf" - [(set (cc0) (compare (match_operand:TF 0 "general_operand" "") - (match_operand:TF 1 "general_operand" "")))] - "TARGET_HAS_XFLOATING_LIBS" -{ - alpha_compare.op0 = operands[0]; - alpha_compare.op1 = operands[1]; - alpha_compare.fp_p = 1; - DONE; -}) - -(define_expand "cmpdi" - [(set (cc0) (compare (match_operand:DI 0 "general_operand" "") - (match_operand:DI 1 "general_operand" "")))] - "" -{ - alpha_compare.op0 = operands[0]; - alpha_compare.op1 = operands[1]; - alpha_compare.fp_p = 0; - DONE; -}) - -(define_expand "beq" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (EQ); }") - -(define_expand "bne" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (NE); }") - -(define_expand "blt" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (LT); }") - -(define_expand "ble" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (LE); }") - -(define_expand "bgt" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (GT); }") - -(define_expand "bge" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (GE); }") - -(define_expand "bltu" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (LTU); }") - -(define_expand "bleu" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (LEU); }") - -(define_expand "bgtu" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (GTU); }") - -(define_expand "bgeu" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (GEU); }") - -(define_expand "bunordered" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (UNORDERED); }") - -(define_expand "bordered" - [(set (pc) - (if_then_else (match_dup 1) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - "{ operands[1] = alpha_emit_conditional_branch (ORDERED); }") - -(define_expand "seq" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (EQ)) == NULL_RTX) FAIL; }") - -(define_expand "sne" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (NE)) == NULL_RTX) FAIL; }") - -(define_expand "slt" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (LT)) == NULL_RTX) FAIL; }") - -(define_expand "sle" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (LE)) == NULL_RTX) FAIL; }") - -(define_expand "sgt" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (GT)) == NULL_RTX) FAIL; }") - -(define_expand "sge" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (GE)) == NULL_RTX) FAIL; }") - -(define_expand "sltu" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (LTU)) == NULL_RTX) FAIL; }") - -(define_expand "sleu" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (LEU)) == NULL_RTX) FAIL; }") - -(define_expand "sgtu" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (GTU)) == NULL_RTX) FAIL; }") - -(define_expand "sgeu" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (GEU)) == NULL_RTX) FAIL; }") - -(define_expand "sunordered" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (UNORDERED)) == NULL_RTX) FAIL; }") - -(define_expand "sordered" - [(set (match_operand:DI 0 "register_operand" "") - (match_dup 1))] - "" - "{ if ((operands[1] = alpha_emit_setcc (ORDERED)) == NULL_RTX) FAIL; }") - -;; These are the main define_expand's used to make conditional moves. - -(define_expand "movsicc" - [(set (match_operand:SI 0 "register_operand" "") - (if_then_else:SI (match_operand 1 "comparison_operator" "") - (match_operand:SI 2 "reg_or_8bit_operand" "") - (match_operand:SI 3 "reg_or_8bit_operand" "")))] - "" -{ - if ((operands[1] = alpha_emit_conditional_move (operands[1], SImode)) == 0) - FAIL; -}) - -(define_expand "movdicc" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI (match_operand 1 "comparison_operator" "") - (match_operand:DI 2 "reg_or_8bit_operand" "") - (match_operand:DI 3 "reg_or_8bit_operand" "")))] - "" -{ - if ((operands[1] = alpha_emit_conditional_move (operands[1], DImode)) == 0) - FAIL; -}) - -(define_expand "movsfcc" - [(set (match_operand:SF 0 "register_operand" "") - (if_then_else:SF (match_operand 1 "comparison_operator" "") - (match_operand:SF 2 "reg_or_8bit_operand" "") - (match_operand:SF 3 "reg_or_8bit_operand" "")))] - "" -{ - if ((operands[1] = alpha_emit_conditional_move (operands[1], SFmode)) == 0) - FAIL; -}) - -(define_expand "movdfcc" - [(set (match_operand:DF 0 "register_operand" "") - (if_then_else:DF (match_operand 1 "comparison_operator" "") - (match_operand:DF 2 "reg_or_8bit_operand" "") - (match_operand:DF 3 "reg_or_8bit_operand" "")))] - "" -{ - if ((operands[1] = alpha_emit_conditional_move (operands[1], DFmode)) == 0) - FAIL; -}) - -;; These define_split definitions are used in cases when comparisons have -;; not be stated in the correct way and we need to reverse the second -;; comparison. For example, x >= 7 has to be done as x < 6 with the -;; comparison that tests the result being reversed. We have one define_split -;; for each use of a comparison. They do not match valid insns and need -;; not generate valid insns. -;; -;; We can also handle equality comparisons (and inequality comparisons in -;; cases where the resulting add cannot overflow) by doing an add followed by -;; a comparison with zero. This is faster since the addition takes one -;; less cycle than a compare when feeding into a conditional move. -;; For this case, we also have an SImode pattern since we can merge the add -;; and sign extend and the order doesn't matter. -;; -;; We do not do this for floating-point, since it isn't clear how the "wrong" -;; operation could have been generated. - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI - (match_operator 1 "comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "") - (match_operand:DI 3 "reg_or_cint_operand" "")]) - (match_operand:DI 4 "reg_or_cint_operand" "") - (match_operand:DI 5 "reg_or_cint_operand" ""))) - (clobber (match_operand:DI 6 "register_operand" ""))] - "operands[3] != const0_rtx" - [(set (match_dup 6) (match_dup 7)) - (set (match_dup 0) - (if_then_else:DI (match_dup 8) (match_dup 4) (match_dup 5)))] -{ - enum rtx_code code = GET_CODE (operands[1]); - int unsignedp = (code == GEU || code == LEU || code == GTU || code == LTU); - - /* If we are comparing for equality with a constant and that constant - appears in the arm when the register equals the constant, use the - register since that is more likely to match (and to produce better code - if both would). */ - - if (code == EQ && GET_CODE (operands[3]) == CONST_INT - && rtx_equal_p (operands[4], operands[3])) - operands[4] = operands[2]; - - else if (code == NE && GET_CODE (operands[3]) == CONST_INT - && rtx_equal_p (operands[5], operands[3])) - operands[5] = operands[2]; - - if (code == NE || code == EQ - || (extended_count (operands[2], DImode, unsignedp) >= 1 - && extended_count (operands[3], DImode, unsignedp) >= 1)) - { - if (GET_CODE (operands[3]) == CONST_INT) - operands[7] = gen_rtx_PLUS (DImode, operands[2], - GEN_INT (- INTVAL (operands[3]))); - else - operands[7] = gen_rtx_MINUS (DImode, operands[2], operands[3]); - - operands[8] = gen_rtx_fmt_ee (code, VOIDmode, operands[6], const0_rtx); - } - - else if (code == EQ || code == LE || code == LT - || code == LEU || code == LTU) - { - operands[7] = gen_rtx_fmt_ee (code, DImode, operands[2], operands[3]); - operands[8] = gen_rtx_NE (VOIDmode, operands[6], const0_rtx); - } - else - { - operands[7] = gen_rtx_fmt_ee (reverse_condition (code), DImode, - operands[2], operands[3]); - operands[8] = gen_rtx_EQ (VOIDmode, operands[6], const0_rtx); - } -}) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI - (match_operator 1 "comparison_operator" - [(match_operand:SI 2 "reg_or_0_operand" "") - (match_operand:SI 3 "reg_or_cint_operand" "")]) - (match_operand:DI 4 "reg_or_8bit_operand" "") - (match_operand:DI 5 "reg_or_8bit_operand" ""))) - (clobber (match_operand:DI 6 "register_operand" ""))] - "operands[3] != const0_rtx - && (GET_CODE (operands[1]) == EQ || GET_CODE (operands[1]) == NE)" - [(set (match_dup 6) (match_dup 7)) - (set (match_dup 0) - (if_then_else:DI (match_dup 8) (match_dup 4) (match_dup 5)))] -{ - enum rtx_code code = GET_CODE (operands[1]); - int unsignedp = (code == GEU || code == LEU || code == GTU || code == LTU); - rtx tem; - - if ((code != NE && code != EQ - && ! (extended_count (operands[2], DImode, unsignedp) >= 1 - && extended_count (operands[3], DImode, unsignedp) >= 1))) - FAIL; - - if (GET_CODE (operands[3]) == CONST_INT) - tem = gen_rtx_PLUS (SImode, operands[2], - GEN_INT (- INTVAL (operands[3]))); - else - tem = gen_rtx_MINUS (SImode, operands[2], operands[3]); - - operands[7] = gen_rtx_SIGN_EXTEND (DImode, tem); - operands[8] = gen_rtx_fmt_ee (GET_CODE (operands[1]), VOIDmode, - operands[6], const0_rtx); -}) - -(define_split - [(set (pc) - (if_then_else - (match_operator 1 "comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "") - (match_operand:DI 3 "reg_or_cint_operand" "")]) - (label_ref (match_operand 0 "" "")) - (pc))) - (clobber (match_operand:DI 4 "register_operand" ""))] - "operands[3] != const0_rtx" - [(set (match_dup 4) (match_dup 5)) - (set (pc) (if_then_else (match_dup 6) (label_ref (match_dup 0)) (pc)))] -{ - enum rtx_code code = GET_CODE (operands[1]); - int unsignedp = (code == GEU || code == LEU || code == GTU || code == LTU); - - if (code == NE || code == EQ - || (extended_count (operands[2], DImode, unsignedp) >= 1 - && extended_count (operands[3], DImode, unsignedp) >= 1)) - { - if (GET_CODE (operands[3]) == CONST_INT) - operands[5] = gen_rtx_PLUS (DImode, operands[2], - GEN_INT (- INTVAL (operands[3]))); - else - operands[5] = gen_rtx_MINUS (DImode, operands[2], operands[3]); - - operands[6] = gen_rtx_fmt_ee (code, VOIDmode, operands[4], const0_rtx); - } - - else if (code == EQ || code == LE || code == LT - || code == LEU || code == LTU) - { - operands[5] = gen_rtx_fmt_ee (code, DImode, operands[2], operands[3]); - operands[6] = gen_rtx_NE (VOIDmode, operands[4], const0_rtx); - } - else - { - operands[5] = gen_rtx_fmt_ee (reverse_condition (code), DImode, - operands[2], operands[3]); - operands[6] = gen_rtx_EQ (VOIDmode, operands[4], const0_rtx); - } -}) - -(define_split - [(set (pc) - (if_then_else - (match_operator 1 "comparison_operator" - [(match_operand:SI 2 "reg_or_0_operand" "") - (match_operand:SI 3 "const_int_operand" "")]) - (label_ref (match_operand 0 "" "")) - (pc))) - (clobber (match_operand:DI 4 "register_operand" ""))] - "operands[3] != const0_rtx - && (GET_CODE (operands[1]) == EQ || GET_CODE (operands[1]) == NE)" - [(set (match_dup 4) (match_dup 5)) - (set (pc) (if_then_else (match_dup 6) (label_ref (match_dup 0)) (pc)))] -{ - rtx tem; - - if (GET_CODE (operands[3]) == CONST_INT) - tem = gen_rtx_PLUS (SImode, operands[2], - GEN_INT (- INTVAL (operands[3]))); - else - tem = gen_rtx_MINUS (SImode, operands[2], operands[3]); - - operands[5] = gen_rtx_SIGN_EXTEND (DImode, tem); - operands[6] = gen_rtx_fmt_ee (GET_CODE (operands[1]), VOIDmode, - operands[4], const0_rtx); -}) - -;; We can convert such things as "a > 0xffff" to "t = a & ~ 0xffff; t != 0". -;; This eliminates one, and sometimes two, insns when the AND can be done -;; with a ZAP. -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operator:DI 1 "comparison_operator" - [(match_operand:DI 2 "register_operand" "") - (match_operand:DI 3 "const_int_operand" "")])) - (clobber (match_operand:DI 4 "register_operand" ""))] - "exact_log2 (INTVAL (operands[3]) + 1) >= 0 - && (GET_CODE (operands[1]) == GTU - || GET_CODE (operands[1]) == LEU - || ((GET_CODE (operands[1]) == GT || GET_CODE (operands[1]) == LE) - && extended_count (operands[2], DImode, 1) > 0))" - [(set (match_dup 4) (and:DI (match_dup 2) (match_dup 5))) - (set (match_dup 0) (match_dup 6))] -{ - operands[5] = GEN_INT (~ INTVAL (operands[3])); - operands[6] = gen_rtx_fmt_ee (((GET_CODE (operands[1]) == GTU - || GET_CODE (operands[1]) == GT) - ? NE : EQ), - DImode, operands[4], const0_rtx); -}) - -;; Prefer to use cmp and arithmetic when possible instead of a cmove. - -(define_split - [(set (match_operand 0 "register_operand" "") - (if_then_else (match_operator 1 "signed_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "") - (const_int 0)]) - (match_operand 3 "const_int_operand" "") - (match_operand 4 "const_int_operand" "")))] - "" - [(const_int 0)] -{ - if (alpha_split_conditional_move (GET_CODE (operands[1]), operands[0], - operands[2], operands[3], operands[4])) - DONE; - else - FAIL; -}) - -;; ??? Why combine is allowed to create such non-canonical rtl, I don't know. -;; Oh well, we match it in movcc, so it must be partially our fault. -(define_split - [(set (match_operand 0 "register_operand" "") - (if_then_else (match_operator 1 "signed_comparison_operator" - [(const_int 0) - (match_operand:DI 2 "reg_or_0_operand" "")]) - (match_operand 3 "const_int_operand" "") - (match_operand 4 "const_int_operand" "")))] - "" - [(const_int 0)] -{ - if (alpha_split_conditional_move (swap_condition (GET_CODE (operands[1])), - operands[0], operands[2], operands[3], - operands[4])) - DONE; - else - FAIL; -}) - -(define_insn_and_split "*cmp_sadd_di" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI (if_then_else:DI - (match_operator 1 "alpha_zero_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "rJ") - (const_int 0)]) - (match_operand:DI 3 "const48_operand" "I") - (const_int 0)) - (match_operand:DI 4 "sext_add_operand" "rIO"))) - (clobber (match_scratch:DI 5 "=r"))] - "" - "#" - "! no_new_pseudos || reload_completed" - [(set (match_dup 5) - (match_op_dup:DI 1 [(match_dup 2) (const_int 0)])) - (set (match_dup 0) - (plus:DI (mult:DI (match_dup 5) (match_dup 3)) - (match_dup 4)))] -{ - if (! no_new_pseudos) - operands[5] = gen_reg_rtx (DImode); - else if (reg_overlap_mentioned_p (operands[5], operands[4])) - operands[5] = operands[0]; -}) - -(define_insn_and_split "*cmp_sadd_si" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (if_then_else:SI - (match_operator 1 "alpha_zero_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "rJ") - (const_int 0)]) - (match_operand:SI 3 "const48_operand" "I") - (const_int 0)) - (match_operand:SI 4 "sext_add_operand" "rIO"))) - (clobber (match_scratch:SI 5 "=r"))] - "" - "#" - "! no_new_pseudos || reload_completed" - [(set (match_dup 5) - (match_op_dup:SI 1 [(match_dup 2) (const_int 0)])) - (set (match_dup 0) - (plus:SI (mult:SI (match_dup 5) (match_dup 3)) - (match_dup 4)))] -{ - if (! no_new_pseudos) - operands[5] = gen_reg_rtx (DImode); - else if (reg_overlap_mentioned_p (operands[5], operands[4])) - operands[5] = operands[0]; -}) - -(define_insn_and_split "*cmp_sadd_sidi" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (plus:SI (if_then_else:SI - (match_operator 1 "alpha_zero_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "rJ") - (const_int 0)]) - (match_operand:SI 3 "const48_operand" "I") - (const_int 0)) - (match_operand:SI 4 "sext_add_operand" "rIO")))) - (clobber (match_scratch:SI 5 "=r"))] - "" - "#" - "! no_new_pseudos || reload_completed" - [(set (match_dup 5) - (match_op_dup:SI 1 [(match_dup 2) (const_int 0)])) - (set (match_dup 0) - (sign_extend:DI (plus:SI (mult:SI (match_dup 5) (match_dup 3)) - (match_dup 4))))] -{ - if (! no_new_pseudos) - operands[5] = gen_reg_rtx (DImode); - else if (reg_overlap_mentioned_p (operands[5], operands[4])) - operands[5] = operands[0]; -}) - -(define_insn_and_split "*cmp_ssub_di" - [(set (match_operand:DI 0 "register_operand" "=r") - (minus:DI (if_then_else:DI - (match_operator 1 "alpha_zero_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "rJ") - (const_int 0)]) - (match_operand:DI 3 "const48_operand" "I") - (const_int 0)) - (match_operand:DI 4 "reg_or_8bit_operand" "rI"))) - (clobber (match_scratch:DI 5 "=r"))] - "" - "#" - "! no_new_pseudos || reload_completed" - [(set (match_dup 5) - (match_op_dup:DI 1 [(match_dup 2) (const_int 0)])) - (set (match_dup 0) - (minus:DI (mult:DI (match_dup 5) (match_dup 3)) - (match_dup 4)))] -{ - if (! no_new_pseudos) - operands[5] = gen_reg_rtx (DImode); - else if (reg_overlap_mentioned_p (operands[5], operands[4])) - operands[5] = operands[0]; -}) - -(define_insn_and_split "*cmp_ssub_si" - [(set (match_operand:SI 0 "register_operand" "=r") - (minus:SI (if_then_else:SI - (match_operator 1 "alpha_zero_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "rJ") - (const_int 0)]) - (match_operand:SI 3 "const48_operand" "I") - (const_int 0)) - (match_operand:SI 4 "reg_or_8bit_operand" "rI"))) - (clobber (match_scratch:SI 5 "=r"))] - "" - "#" - "! no_new_pseudos || reload_completed" - [(set (match_dup 5) - (match_op_dup:SI 1 [(match_dup 2) (const_int 0)])) - (set (match_dup 0) - (minus:SI (mult:SI (match_dup 5) (match_dup 3)) - (match_dup 4)))] -{ - if (! no_new_pseudos) - operands[5] = gen_reg_rtx (DImode); - else if (reg_overlap_mentioned_p (operands[5], operands[4])) - operands[5] = operands[0]; -}) - -(define_insn_and_split "*cmp_ssub_sidi" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (minus:SI (if_then_else:SI - (match_operator 1 "alpha_zero_comparison_operator" - [(match_operand:DI 2 "reg_or_0_operand" "rJ") - (const_int 0)]) - (match_operand:SI 3 "const48_operand" "I") - (const_int 0)) - (match_operand:SI 4 "reg_or_8bit_operand" "rI")))) - (clobber (match_scratch:SI 5 "=r"))] - "" - "#" - "! no_new_pseudos || reload_completed" - [(set (match_dup 5) - (match_op_dup:SI 1 [(match_dup 2) (const_int 0)])) - (set (match_dup 0) - (sign_extend:DI (minus:SI (mult:SI (match_dup 5) (match_dup 3)) - (match_dup 4))))] -{ - if (! no_new_pseudos) - operands[5] = gen_reg_rtx (DImode); - else if (reg_overlap_mentioned_p (operands[5], operands[4])) - operands[5] = operands[0]; -}) - -;; Here are the CALL and unconditional branch insns. Calls on NT and OSF -;; work differently, so we have different patterns for each. - -;; On Unicos/Mk a call information word (CIW) must be generated for each -;; call. The CIW contains information about arguments passed in registers -;; and is stored in the caller's SSIB. Its offset relative to the beginning -;; of the SSIB is passed in $25. Handling this properly is quite complicated -;; in the presence of inlining since the CIWs for calls performed by the -;; inlined function must be stored in the SSIB of the function it is inlined -;; into as well. We encode the CIW in an unspec and append it to the list -;; of the CIWs for the current function only when the instruction for loading -;; $25 is generated. - -(define_expand "call" - [(use (match_operand:DI 0 "" "")) - (use (match_operand 1 "" "")) - (use (match_operand 2 "" "")) - (use (match_operand 3 "" ""))] - "" -{ - if (TARGET_ABI_WINDOWS_NT) - emit_call_insn (gen_call_nt (operands[0], operands[1])); - else if (TARGET_ABI_OPEN_VMS) - emit_call_insn (gen_call_vms (operands[0], operands[2])); - else if (TARGET_ABI_UNICOSMK) - emit_call_insn (gen_call_umk (operands[0], operands[2])); - else - emit_call_insn (gen_call_osf (operands[0], operands[1])); - DONE; -}) - -(define_expand "sibcall" - [(parallel [(call (mem:DI (match_operand 0 "" "")) - (match_operand 1 "" "")) - (unspec [(reg:DI 29)] UNSPEC_SIBCALL)])] - "TARGET_ABI_OSF" -{ - if (GET_CODE (operands[0]) != MEM) - abort (); - operands[0] = XEXP (operands[0], 0); -}) - -(define_expand "call_osf" - [(parallel [(call (mem:DI (match_operand 0 "" "")) - (match_operand 1 "" "")) - (use (reg:DI 29)) - (clobber (reg:DI 26))])] - "" -{ - if (GET_CODE (operands[0]) != MEM) - abort (); - - operands[0] = XEXP (operands[0], 0); - if (! call_operand (operands[0], Pmode)) - operands[0] = copy_to_mode_reg (Pmode, operands[0]); -}) - -(define_expand "call_nt" - [(parallel [(call (mem:DI (match_operand 0 "" "")) - (match_operand 1 "" "")) - (clobber (reg:DI 26))])] - "" -{ - if (GET_CODE (operands[0]) != MEM) - abort (); - - operands[0] = XEXP (operands[0], 0); - if (GET_CODE (operands[0]) != SYMBOL_REF && GET_CODE (operands[0]) != REG) - operands[0] = force_reg (DImode, operands[0]); -}) - -;; Calls on Unicos/Mk are always indirect. -;; op 0: symbol ref for called function -;; op 1: CIW for $25 represented by an unspec - -(define_expand "call_umk" - [(parallel [(call (mem:DI (match_operand 0 "" "")) - (match_operand 1 "" "")) - (use (reg:DI 25)) - (clobber (reg:DI 26))])] - "" -{ - if (GET_CODE (operands[0]) != MEM) - abort (); - - /* Always load the address of the called function into a register; - load the CIW in $25. */ - - operands[0] = XEXP (operands[0], 0); - if (GET_CODE (operands[0]) != REG) - operands[0] = force_reg (DImode, operands[0]); - - emit_move_insn (gen_rtx_REG (DImode, 25), operands[1]); -}) - -;; -;; call openvms/alpha -;; op 0: symbol ref for called function -;; op 1: next_arg_reg (argument information value for R25) -;; -(define_expand "call_vms" - [(parallel [(call (mem:DI (match_operand 0 "" "")) - (match_operand 1 "" "")) - (use (match_dup 2)) - (use (reg:DI 25)) - (use (reg:DI 26)) - (clobber (reg:DI 27))])] - "" -{ - if (GET_CODE (operands[0]) != MEM) - abort (); - - operands[0] = XEXP (operands[0], 0); - - /* Always load AI with argument information, then handle symbolic and - indirect call differently. Load RA and set operands[2] to PV in - both cases. */ - - emit_move_insn (gen_rtx_REG (DImode, 25), operands[1]); - if (GET_CODE (operands[0]) == SYMBOL_REF) - { - alpha_need_linkage (XSTR (operands[0], 0), 0); - - operands[2] = const0_rtx; - } - else - { - emit_move_insn (gen_rtx_REG (Pmode, 26), - gen_rtx_MEM (Pmode, plus_constant (operands[0], 8))); - operands[2] = operands[0]; - } - -}) - -(define_expand "call_value" - [(use (match_operand 0 "" "")) - (use (match_operand:DI 1 "" "")) - (use (match_operand 2 "" "")) - (use (match_operand 3 "" "")) - (use (match_operand 4 "" ""))] - "" -{ - if (TARGET_ABI_WINDOWS_NT) - emit_call_insn (gen_call_value_nt (operands[0], operands[1], operands[2])); - else if (TARGET_ABI_OPEN_VMS) - emit_call_insn (gen_call_value_vms (operands[0], operands[1], - operands[3])); - else if (TARGET_ABI_UNICOSMK) - emit_call_insn (gen_call_value_umk (operands[0], operands[1], - operands[3])); - else - emit_call_insn (gen_call_value_osf (operands[0], operands[1], - operands[2])); - DONE; -}) - -(define_expand "sibcall_value" - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand 1 "" "")) - (match_operand 2 "" ""))) - (unspec [(reg:DI 29)] UNSPEC_SIBCALL)])] - "TARGET_ABI_OSF" -{ - if (GET_CODE (operands[1]) != MEM) - abort (); - operands[1] = XEXP (operands[1], 0); -}) - -(define_expand "call_value_osf" - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand 1 "" "")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))])] - "" -{ - if (GET_CODE (operands[1]) != MEM) - abort (); - - operands[1] = XEXP (operands[1], 0); - if (! call_operand (operands[1], Pmode)) - operands[1] = copy_to_mode_reg (Pmode, operands[1]); -}) - -(define_expand "call_value_nt" - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand 1 "" "")) - (match_operand 2 "" ""))) - (clobber (reg:DI 26))])] - "" -{ - if (GET_CODE (operands[1]) != MEM) - abort (); - - operands[1] = XEXP (operands[1], 0); - if (GET_CODE (operands[1]) != SYMBOL_REF && GET_CODE (operands[1]) != REG) - operands[1] = force_reg (DImode, operands[1]); -}) - -(define_expand "call_value_vms" - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "" "")) - (match_operand 2 "" ""))) - (use (match_dup 3)) - (use (reg:DI 25)) - (use (reg:DI 26)) - (clobber (reg:DI 27))])] - "" -{ - if (GET_CODE (operands[1]) != MEM) - abort (); - - operands[1] = XEXP (operands[1], 0); - - /* Always load AI with argument information, then handle symbolic and - indirect call differently. Load RA and set operands[3] to PV in - both cases. */ - - emit_move_insn (gen_rtx_REG (DImode, 25), operands[2]); - if (GET_CODE (operands[1]) == SYMBOL_REF) - { - alpha_need_linkage (XSTR (operands[1], 0), 0); - - operands[3] = const0_rtx; - } - else - { - emit_move_insn (gen_rtx_REG (Pmode, 26), - gen_rtx_MEM (Pmode, plus_constant (operands[1], 8))); - operands[3] = operands[1]; - } -}) - -(define_expand "call_value_umk" - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand 1 "" "")) - (match_operand 2 "" ""))) - (use (reg:DI 25)) - (clobber (reg:DI 26))])] - "" -{ - if (GET_CODE (operands[1]) != MEM) - abort (); - - operands[1] = XEXP (operands[1], 0); - if (GET_CODE (operands[1]) != REG) - operands[1] = force_reg (DImode, operands[1]); - - emit_move_insn (gen_rtx_REG (DImode, 25), operands[2]); -}) - -(define_insn "*call_osf_1_er" - [(call (mem:DI (match_operand:DI 0 "call_operand" "c,R,s")) - (match_operand 1 "" "")) - (use (reg:DI 29)) - (clobber (reg:DI 26))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - jsr $26,(%0),0\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%* - bsr $26,%0\t\t!samegp - ldq $27,%0($29)\t\t!literal!%#\;jsr $26,($27),%0\t\t!lituse_jsr!%#\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*" - [(set_attr "type" "jsr") - (set_attr "length" "12,*,16")]) - -;; We must use peep2 instead of a split because we need accurate life -;; information for $gp. Consider the case of { bar(); while (1); }. -(define_peephole2 - [(parallel [(call (mem:DI (match_operand:DI 0 "call_operand" "")) - (match_operand 1 "" "")) - (use (reg:DI 29)) - (clobber (reg:DI 26))])] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed - && ! samegp_function_operand (operands[0], Pmode) - && (peep2_regno_dead_p (1, 29) - || find_reg_note (insn, REG_NORETURN, NULL_RTX))" - [(parallel [(call (mem:DI (match_dup 2)) - (match_dup 1)) - (set (reg:DI 26) (plus:DI (pc) (const_int 4))) - (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) - (use (match_dup 0)) - (use (match_dup 3))])] -{ - if (CONSTANT_P (operands[0])) - { - operands[2] = gen_rtx_REG (Pmode, 27); - operands[3] = GEN_INT (alpha_next_sequence_number++); - emit_insn (gen_movdi_er_high_g (operands[2], pic_offset_table_rtx, - operands[0], operands[3])); - } - else - { - operands[2] = operands[0]; - operands[0] = const0_rtx; - operands[3] = const0_rtx; - } -}) - -(define_peephole2 - [(parallel [(call (mem:DI (match_operand:DI 0 "call_operand" "")) - (match_operand 1 "" "")) - (use (reg:DI 29)) - (clobber (reg:DI 26))])] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed - && ! samegp_function_operand (operands[0], Pmode) - && ! (peep2_regno_dead_p (1, 29) - || find_reg_note (insn, REG_NORETURN, NULL_RTX))" - [(parallel [(call (mem:DI (match_dup 2)) - (match_dup 1)) - (set (reg:DI 26) (plus:DI (pc) (const_int 4))) - (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) - (use (match_dup 0)) - (use (match_dup 4))]) - (set (reg:DI 29) - (unspec_volatile:DI [(reg:DI 26) (match_dup 3)] UNSPECV_LDGP1)) - (set (reg:DI 29) - (unspec:DI [(reg:DI 29) (match_dup 3)] UNSPEC_LDGP2))] -{ - if (CONSTANT_P (operands[0])) - { - operands[2] = gen_rtx_REG (Pmode, 27); - operands[4] = GEN_INT (alpha_next_sequence_number++); - emit_insn (gen_movdi_er_high_g (operands[2], pic_offset_table_rtx, - operands[0], operands[4])); - } - else - { - operands[2] = operands[0]; - operands[0] = const0_rtx; - operands[4] = const0_rtx; - } - operands[3] = GEN_INT (alpha_next_sequence_number++); -}) - -;; We add a blockage unspec_volatile to prevent insns from moving down -;; from above the call to in between the call and the ldah gpdisp. - -(define_insn "*call_osf_2_er" - [(call (mem:DI (match_operand:DI 0 "register_operand" "c")) - (match_operand 1 "" "")) - (set (reg:DI 26) (plus:DI (pc) (const_int 4))) - (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) - (use (match_operand 2 "" "")) - (use (match_operand 3 "const_int_operand" ""))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "jsr $26,(%0),%2%J3" - [(set_attr "type" "jsr") - (set_attr "cannot_copy" "true")]) - -;; We output a nop after noreturn calls at the very end of the function to -;; ensure that the return address always remains in the caller's code range, -;; as not doing so might confuse unwinding engines. -;; -;; The potential change in insn length is not reflected in the length -;; attributes at this stage. Since the extra space is only actually added at -;; the very end of the compilation process (via final/print_operand), it -;; really seems harmless and not worth the trouble of some extra computation -;; cost and complexity. - -(define_insn "*call_osf_1_noreturn" - [(call (mem:DI (match_operand:DI 0 "call_operand" "c,R,s")) - (match_operand 1 "" "")) - (use (reg:DI 29)) - (clobber (reg:DI 26))] - "! TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF - && find_reg_note (insn, REG_NORETURN, NULL_RTX)" - "@ - jsr $26,($27),0%+ - bsr $26,$%0..ng%+ - jsr $26,%0%+" - [(set_attr "type" "jsr") - (set_attr "length" "*,*,8")]) - -(define_insn "*call_osf_1" - [(call (mem:DI (match_operand:DI 0 "call_operand" "c,R,s")) - (match_operand 1 "" "")) - (use (reg:DI 29)) - (clobber (reg:DI 26))] - "! TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - jsr $26,($27),0\;ldgp $29,0($26) - bsr $26,$%0..ng - jsr $26,%0\;ldgp $29,0($26)" - [(set_attr "type" "jsr") - (set_attr "length" "12,*,16")]) - -;; Note that the DEC assembler expands "jmp foo" with $at, which -;; doesn't do what we want. -(define_insn "*sibcall_osf_1_er" - [(call (mem:DI (match_operand:DI 0 "symbolic_operand" "R,s")) - (match_operand 1 "" "")) - (unspec [(reg:DI 29)] UNSPEC_SIBCALL)] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - br $31,%0\t\t!samegp - ldq $27,%0($29)\t\t!literal!%#\;jmp $31,($27),%0\t\t!lituse_jsr!%#" - [(set_attr "type" "jsr") - (set_attr "length" "*,8")]) - -(define_insn "*sibcall_osf_1" - [(call (mem:DI (match_operand:DI 0 "symbolic_operand" "R,s")) - (match_operand 1 "" "")) - (unspec [(reg:DI 29)] UNSPEC_SIBCALL)] - "! TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - br $31,$%0..ng - lda $27,%0\;jmp $31,($27),%0" - [(set_attr "type" "jsr") - (set_attr "length" "*,8")]) - -(define_insn "*call_nt_1" - [(call (mem:DI (match_operand:DI 0 "call_operand" "r,R,s")) - (match_operand 1 "" "")) - (clobber (reg:DI 26))] - "TARGET_ABI_WINDOWS_NT" - "@ - jsr $26,(%0) - bsr $26,%0 - jsr $26,%0" - [(set_attr "type" "jsr") - (set_attr "length" "*,*,12")]) - -; GAS relies on the order and position of instructions output below in order -; to generate relocs for VMS link to potentially optimize the call. -; Please do not molest. -(define_insn "*call_vms_1" - [(call (mem:DI (match_operand:DI 0 "call_operand" "r,s")) - (match_operand 1 "" "")) - (use (match_operand:DI 2 "nonmemory_operand" "r,n")) - (use (reg:DI 25)) - (use (reg:DI 26)) - (clobber (reg:DI 27))] - "TARGET_ABI_OPEN_VMS" -{ - switch (which_alternative) - { - case 0: - return "mov %2,$27\;jsr $26,0\;ldq $27,0($29)"; - case 1: - operands [2] = alpha_use_linkage (operands [0], cfun->decl, 1, 0); - operands [3] = alpha_use_linkage (operands [0], cfun->decl, 0, 0); - return "ldq $26,%3\;ldq $27,%2\;jsr $26,%0\;ldq $27,0($29)"; - default: - abort(); - } -} - [(set_attr "type" "jsr") - (set_attr "length" "12,16")]) - -(define_insn "*call_umk_1" - [(call (mem:DI (match_operand:DI 0 "call_operand" "r")) - (match_operand 1 "" "")) - (use (reg:DI 25)) - (clobber (reg:DI 26))] - "TARGET_ABI_UNICOSMK" - "jsr $26,(%0)" - [(set_attr "type" "jsr")]) - -;; Call subroutine returning any type. - -(define_expand "untyped_call" - [(parallel [(call (match_operand 0 "" "") - (const_int 0)) - (match_operand 1 "" "") - (match_operand 2 "" "")])] - "" -{ - int i; - - emit_call_insn (GEN_CALL (operands[0], const0_rtx, NULL, const0_rtx)); - - for (i = 0; i < XVECLEN (operands[2], 0); i++) - { - rtx set = XVECEXP (operands[2], 0, i); - emit_move_insn (SET_DEST (set), SET_SRC (set)); - } - - /* The optimizer does not know that the call sets the function value - registers we stored in the result block. We avoid problems by - claiming that all hard registers are used and clobbered at this - point. */ - emit_insn (gen_blockage ()); - - DONE; -}) - -;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and -;; all of memory. This blocks insns from being moved across this point. - -(define_insn "blockage" - [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)] - "" - "" - [(set_attr "length" "0") - (set_attr "type" "none")]) - -(define_insn "jump" - [(set (pc) - (label_ref (match_operand 0 "" "")))] - "" - "br $31,%l0" - [(set_attr "type" "ibr")]) - -(define_expand "return" - [(return)] - "direct_return ()" - "") - -(define_insn "*return_internal" - [(return)] - "reload_completed" - "ret $31,($26),1" - [(set_attr "type" "ibr")]) - -(define_insn "indirect_jump" - [(set (pc) (match_operand:DI 0 "register_operand" "r"))] - "" - "jmp $31,(%0),0" - [(set_attr "type" "ibr")]) - -(define_expand "tablejump" - [(parallel [(set (pc) - (match_operand 0 "register_operand" "")) - (use (label_ref:DI (match_operand 1 "" "")))])] - "" -{ - if (TARGET_ABI_WINDOWS_NT) - { - rtx dest = gen_reg_rtx (DImode); - emit_insn (gen_extendsidi2 (dest, operands[0])); - operands[0] = dest; - } - else if (TARGET_ABI_OSF) - { - rtx dest = gen_reg_rtx (DImode); - emit_insn (gen_extendsidi2 (dest, operands[0])); - emit_insn (gen_adddi3 (dest, pic_offset_table_rtx, dest)); - operands[0] = dest; - } -}) - -(define_insn "*tablejump_osf_nt_internal" - [(set (pc) - (match_operand:DI 0 "register_operand" "r")) - (use (label_ref:DI (match_operand 1 "" "")))] - "(TARGET_ABI_OSF || TARGET_ABI_WINDOWS_NT) - && alpha_tablejump_addr_vec (insn)" -{ - operands[2] = alpha_tablejump_best_label (insn); - return "jmp $31,(%0),%2"; -} - [(set_attr "type" "ibr")]) - -(define_insn "*tablejump_internal" - [(set (pc) - (match_operand:DI 0 "register_operand" "r")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jmp $31,(%0),0" - [(set_attr "type" "ibr")]) - -;; Cache flush. Used by INITIALIZE_TRAMPOLINE. 0x86 is PAL_imb, but we don't -;; want to have to include pal.h in our .s file. -;; -;; Technically the type for call_pal is jsr, but we use that for determining -;; if we need a GP. Use ibr instead since it has the same EV5 scheduling -;; characteristics. -(define_insn "imb" - [(unspec_volatile [(const_int 0)] UNSPECV_IMB)] - "" - "call_pal 0x86" - [(set_attr "type" "callpal")]) - -;; BUGCHK is documented common to OSF/1 and VMS PALcode. -;; NT does not document anything at 0x81 -- presumably it would generate -;; the equivalent of SIGILL, but this isn't that important. -;; ??? Presuming unicosmk uses either OSF/1 or VMS PALcode. -(define_insn "trap" - [(trap_if (const_int 1) (const_int 0))] - "!TARGET_ABI_WINDOWS_NT" - "call_pal 0x81" - [(set_attr "type" "callpal")]) - -;; For userland, we load the thread pointer from the TCB. -;; For the kernel, we load the per-cpu private value. - -(define_insn "load_tp" - [(set (match_operand:DI 0 "register_operand" "=v") - (unspec:DI [(const_int 0)] UNSPEC_TP))] - "TARGET_ABI_OSF" -{ - if (TARGET_TLS_KERNEL) - return "call_pal 0x32"; - else - return "call_pal 0x9e"; -} - [(set_attr "type" "callpal")]) - -;; For completeness, and possibly a __builtin function, here's how to -;; set the thread pointer. Since we don't describe enough of this -;; quantity for CSE, we have to use a volatile unspec, and then there's -;; not much point in creating an R16_REG register class. - -(define_expand "set_tp" - [(set (reg:DI 16) (match_operand:DI 0 "input_operand" "")) - (unspec_volatile [(reg:DI 16)] UNSPECV_SET_TP)] - "TARGET_ABI_OSF" - "") - -(define_insn "*set_tp" - [(unspec_volatile [(reg:DI 16)] UNSPECV_SET_TP)] - "TARGET_ABI_OSF" -{ - if (TARGET_TLS_KERNEL) - return "call_pal 0x31"; - else - return "call_pal 0x9f"; -} - [(set_attr "type" "callpal")]) - -;; Finally, we have the basic data motion insns. The byte and word insns -;; are done via define_expand. Start with the floating-point insns, since -;; they are simpler. - -(define_insn "*movsf_nofix" - [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,*r,*r,m,m") - (match_operand:SF 1 "input_operand" "fG,m,*rG,m,fG,*r"))] - "TARGET_FPREGS && ! TARGET_FIX - && (register_operand (operands[0], SFmode) - || reg_or_0_operand (operands[1], SFmode))" - "@ - cpys %R1,%R1,%0 - ld%, %0,%1 - bis $31,%r1,%0 - ldl %0,%1 - st%, %R1,%0 - stl %r1,%0" - [(set_attr "type" "fcpys,fld,ilog,ild,fst,ist")]) - -(define_insn "*movsf_fix" - [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,*r,*r,m,m,f,*r") - (match_operand:SF 1 "input_operand" "fG,m,*rG,m,fG,*r,*r,f"))] - "TARGET_FPREGS && TARGET_FIX - && (register_operand (operands[0], SFmode) - || reg_or_0_operand (operands[1], SFmode))" - "@ - cpys %R1,%R1,%0 - ld%, %0,%1 - bis $31,%r1,%0 - ldl %0,%1 - st%, %R1,%0 - stl %r1,%0 - itofs %1,%0 - ftois %1,%0" - [(set_attr "type" "fcpys,fld,ilog,ild,fst,ist,itof,ftoi")]) - -(define_insn "*movsf_nofp" - [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m") - (match_operand:SF 1 "input_operand" "rG,m,r"))] - "! TARGET_FPREGS - && (register_operand (operands[0], SFmode) - || reg_or_0_operand (operands[1], SFmode))" - "@ - bis $31,%r1,%0 - ldl %0,%1 - stl %r1,%0" - [(set_attr "type" "ilog,ild,ist")]) - -(define_insn "*movdf_nofix" - [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,*r,*r,m,m") - (match_operand:DF 1 "input_operand" "fG,m,*rG,m,fG,*r"))] - "TARGET_FPREGS && ! TARGET_FIX - && (register_operand (operands[0], DFmode) - || reg_or_0_operand (operands[1], DFmode))" - "@ - cpys %R1,%R1,%0 - ld%- %0,%1 - bis $31,%r1,%0 - ldq %0,%1 - st%- %R1,%0 - stq %r1,%0" - [(set_attr "type" "fcpys,fld,ilog,ild,fst,ist")]) - -(define_insn "*movdf_fix" - [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,*r,*r,m,m,f,*r") - (match_operand:DF 1 "input_operand" "fG,m,*rG,m,fG,*r,*r,f"))] - "TARGET_FPREGS && TARGET_FIX - && (register_operand (operands[0], DFmode) - || reg_or_0_operand (operands[1], DFmode))" - "@ - cpys %R1,%R1,%0 - ld%- %0,%1 - bis $31,%r1,%0 - ldq %0,%1 - st%- %R1,%0 - stq %r1,%0 - itoft %1,%0 - ftoit %1,%0" - [(set_attr "type" "fcpys,fld,ilog,ild,fst,ist,itof,ftoi")]) - -(define_insn "*movdf_nofp" - [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m") - (match_operand:DF 1 "input_operand" "rG,m,r"))] - "! TARGET_FPREGS - && (register_operand (operands[0], DFmode) - || reg_or_0_operand (operands[1], DFmode))" - "@ - bis $31,%r1,%0 - ldq %0,%1 - stq %r1,%0" - [(set_attr "type" "ilog,ild,ist")]) - -;; Subregs suck for register allocation. Pretend we can move TFmode -;; data between general registers until after reload. - -(define_insn_and_split "*movtf_internal" - [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o") - (match_operand:TF 1 "input_operand" "roG,rG"))] - "register_operand (operands[0], TFmode) - || reg_or_0_operand (operands[1], TFmode)" - "#" - "reload_completed" - [(set (match_dup 0) (match_dup 2)) - (set (match_dup 1) (match_dup 3))] -{ - alpha_split_tfmode_pair (operands); - if (reg_overlap_mentioned_p (operands[0], operands[3])) - { - rtx tmp; - tmp = operands[0], operands[0] = operands[1], operands[1] = tmp; - tmp = operands[2], operands[2] = operands[3], operands[3] = tmp; - } -}) - -(define_expand "movsf" - [(set (match_operand:SF 0 "nonimmediate_operand" "") - (match_operand:SF 1 "general_operand" ""))] - "" -{ - if (GET_CODE (operands[0]) == MEM - && ! reg_or_0_operand (operands[1], SFmode)) - operands[1] = force_reg (SFmode, operands[1]); -}) - -(define_expand "movdf" - [(set (match_operand:DF 0 "nonimmediate_operand" "") - (match_operand:DF 1 "general_operand" ""))] - "" -{ - if (GET_CODE (operands[0]) == MEM - && ! reg_or_0_operand (operands[1], DFmode)) - operands[1] = force_reg (DFmode, operands[1]); -}) - -(define_expand "movtf" - [(set (match_operand:TF 0 "nonimmediate_operand" "") - (match_operand:TF 1 "general_operand" ""))] - "" -{ - if (GET_CODE (operands[0]) == MEM - && ! reg_or_0_operand (operands[1], TFmode)) - operands[1] = force_reg (TFmode, operands[1]); -}) - -(define_insn "*movsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,m") - (match_operand:SI 1 "input_operand" "rJ,K,L,m,rJ"))] - "(TARGET_ABI_OSF || TARGET_ABI_UNICOSMK) - && (register_operand (operands[0], SImode) - || reg_or_0_operand (operands[1], SImode))" - "@ - bis $31,%r1,%0 - lda %0,%1($31) - ldah %0,%h1($31) - ldl %0,%1 - stl %r1,%0" - [(set_attr "type" "ilog,iadd,iadd,ild,ist")]) - -(define_insn "*movsi_nt_vms" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,m") - (match_operand:SI 1 "input_operand" "rJ,K,L,s,m,rJ"))] - "(TARGET_ABI_WINDOWS_NT || TARGET_ABI_OPEN_VMS) - && (register_operand (operands[0], SImode) - || reg_or_0_operand (operands[1], SImode))" - "@ - bis $31,%1,%0 - lda %0,%1 - ldah %0,%h1 - lda %0,%1 - ldl %0,%1 - stl %r1,%0" - [(set_attr "type" "ilog,iadd,iadd,ldsym,ild,ist")]) - -(define_insn "*movhi_nobwx" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (match_operand:HI 1 "input_operand" "rJ,n"))] - "! TARGET_BWX - && (register_operand (operands[0], HImode) - || register_operand (operands[1], HImode))" - "@ - bis $31,%r1,%0 - lda %0,%L1($31)" - [(set_attr "type" "ilog,iadd")]) - -(define_insn "*movhi_bwx" - [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m") - (match_operand:HI 1 "input_operand" "rJ,n,m,rJ"))] - "TARGET_BWX - && (register_operand (operands[0], HImode) - || reg_or_0_operand (operands[1], HImode))" - "@ - bis $31,%r1,%0 - lda %0,%L1($31) - ldwu %0,%1 - stw %r1,%0" - [(set_attr "type" "ilog,iadd,ild,ist")]) - -(define_insn "*movqi_nobwx" - [(set (match_operand:QI 0 "register_operand" "=r,r") - (match_operand:QI 1 "input_operand" "rJ,n"))] - "! TARGET_BWX - && (register_operand (operands[0], QImode) - || register_operand (operands[1], QImode))" - "@ - bis $31,%r1,%0 - lda %0,%L1($31)" - [(set_attr "type" "ilog,iadd")]) - -(define_insn "*movqi_bwx" - [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,m") - (match_operand:QI 1 "input_operand" "rJ,n,m,rJ"))] - "TARGET_BWX - && (register_operand (operands[0], QImode) - || reg_or_0_operand (operands[1], QImode))" - "@ - bis $31,%r1,%0 - lda %0,%L1($31) - ldbu %0,%1 - stb %r1,%0" - [(set_attr "type" "ilog,iadd,ild,ist")]) - -;; We do two major things here: handle mem->mem and construct long -;; constants. - -(define_expand "movsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "") - (match_operand:SI 1 "general_operand" ""))] - "" -{ - if (alpha_expand_mov (SImode, operands)) - DONE; -}) - -;; Split a load of a large constant into the appropriate two-insn -;; sequence. - -(define_split - [(set (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "const_int_operand" ""))] - "! add_operand (operands[1], SImode)" - [(set (match_dup 0) (match_dup 2)) - (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 3)))] -{ - rtx tem - = alpha_emit_set_const (operands[0], SImode, INTVAL (operands[1]), 2); - - if (tem == operands[0]) - DONE; - else - FAIL; -}) - -;; Split the load of an address into a four-insn sequence on Unicos/Mk. -;; Always generate a REG_EQUAL note for the last instruction to facilitate -;; optimizations. If the symbolic operand is a label_ref, generate REG_LABEL -;; notes and update LABEL_NUSES because this is not done automatically. -;; Labels may be incorrectly deleted if we don't do this. -;; -;; Describing what the individual instructions do correctly is too complicated -;; so use UNSPECs for each of the three parts of an address. - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "symbolic_operand" ""))] - "TARGET_ABI_UNICOSMK && reload_completed" - [(const_int 0)] -{ - rtx insn1, insn2, insn3; - - insn1 = emit_insn (gen_umk_laum (operands[0], operands[1])); - emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32))); - insn2 = emit_insn (gen_umk_lalm (operands[0], operands[0], operands[1])); - insn3 = emit_insn (gen_umk_lal (operands[0], operands[0], operands[1])); - REG_NOTES (insn3) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1], - REG_NOTES (insn3)); - if (GET_CODE (operands[1]) == LABEL_REF) - { - rtx label; - - label = XEXP (operands[1], 0); - REG_NOTES (insn1) = gen_rtx_EXPR_LIST (REG_LABEL, label, - REG_NOTES (insn1)); - REG_NOTES (insn2) = gen_rtx_EXPR_LIST (REG_LABEL, label, - REG_NOTES (insn2)); - REG_NOTES (insn3) = gen_rtx_EXPR_LIST (REG_LABEL, label, - REG_NOTES (insn3)); - LABEL_NUSES (label) += 3; - } - DONE; -}) - -;; Instructions for loading the three parts of an address on Unicos/Mk. - -(define_insn "umk_laum" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] - UNSPEC_UMK_LAUM))] - "TARGET_ABI_UNICOSMK" - "laum %r0,%t1($31)" - [(set_attr "type" "iadd")]) - -(define_insn "umk_lalm" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI (match_operand:DI 1 "register_operand" "r") - (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] - UNSPEC_UMK_LALM)))] - "TARGET_ABI_UNICOSMK" - "lalm %r0,%t2(%r1)" - [(set_attr "type" "iadd")]) - -(define_insn "umk_lal" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI (match_operand:DI 1 "register_operand" "r") - (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] - UNSPEC_UMK_LAL)))] - "TARGET_ABI_UNICOSMK" - "lal %r0,%t2(%r1)" - [(set_attr "type" "iadd")]) - -;; Add a new call information word to the current function's list of CIWs -;; and load its index into $25. Doing it here ensures that the CIW will be -;; associated with the correct function even in the presence of inlining. - -(define_insn "*umk_load_ciw" - [(set (reg:DI 25) - (unspec:DI [(match_operand 0 "" "")] UNSPEC_UMK_LOAD_CIW))] - "TARGET_ABI_UNICOSMK" -{ - operands[0] = unicosmk_add_call_info_word (operands[0]); - return "lda $25,%0"; -} - [(set_attr "type" "iadd")]) - -(define_insn "*movdi_er_low_l" - [(set (match_operand:DI 0 "register_operand" "=r") - (lo_sum:DI (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "local_symbolic_operand" "")))] - "TARGET_EXPLICIT_RELOCS" -{ - if (true_regnum (operands[1]) == 29) - 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" "") - (match_operand:DI 1 "small_symbolic_operand" ""))] - "TARGET_EXPLICIT_RELOCS && reload_completed" - [(set (match_dup 0) - (lo_sum:DI (match_dup 2) (match_dup 1)))] - "operands[2] = pic_offset_table_rtx;") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "local_symbolic_operand" ""))] - "TARGET_EXPLICIT_RELOCS && reload_completed" - [(set (match_dup 0) - (plus:DI (match_dup 2) (high:DI (match_dup 1)))) - (set (match_dup 0) - (lo_sum:DI (match_dup 0) (match_dup 1)))] - "operands[2] = pic_offset_table_rtx;") - -(define_split - [(match_operand 0 "some_small_symbolic_operand" "")] - "TARGET_EXPLICIT_RELOCS && reload_completed" - [(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 "symbolic_operand" "") - (match_operand 3 "const_int_operand" "")] - UNSPEC_LITERAL))] - "TARGET_EXPLICIT_RELOCS" -{ - if (INTVAL (operands[3]) == 0) - return "ldq %0,%2(%1)\t\t!literal"; - else - return "ldq %0,%2(%1)\t\t!literal!%3"; -} - [(set_attr "type" "ldsym")]) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "global_symbolic_operand" ""))] - "TARGET_EXPLICIT_RELOCS && reload_completed" - [(set (match_dup 0) - (unspec:DI [(match_dup 2) - (match_dup 1) - (const_int 0)] UNSPEC_LITERAL))] - "operands[2] = pic_offset_table_rtx;") - -;; With RTL inlining, at -O3, rtl is generated, stored, then actually -;; compiled at the end of compilation. In the meantime, someone can -;; re-encode-section-info on some symbol changing it e.g. from global -;; to local-not-small. If this happens, we'd have emitted a plain -;; load rather than a high+losum load and not recognize the insn. -;; -;; So if rtl inlining is in effect, we delay the global/not-global -;; decision until rest_of_compilation by wrapping it in an UNSPEC_SYMBOL. - -(define_insn_and_split "movdi_er_maybe_g" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] - UNSPEC_SYMBOL))] - "TARGET_EXPLICIT_RELOCS && flag_inline_functions" - "#" - "" - [(set (match_dup 0) (match_dup 1))] -{ - if (local_symbolic_operand (operands[1], Pmode) - && !small_symbolic_operand (operands[1], Pmode)) - { - rtx subtarget = no_new_pseudos ? operands[0] : gen_reg_rtx (Pmode); - rtx tmp; - - tmp = gen_rtx_HIGH (Pmode, operands[1]); - if (reload_completed) - tmp = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, tmp); - emit_insn (gen_rtx_SET (VOIDmode, subtarget, tmp)); - - tmp = gen_rtx_LO_SUM (Pmode, subtarget, operands[1]); - emit_insn (gen_rtx_SET (VOIDmode, operands[0], tmp)); - DONE; - } -}) - -(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"))] - "TARGET_EXPLICIT_RELOCS && ! TARGET_FIX - && (register_operand (operands[0], DImode) - || reg_or_0_operand (operands[1], DImode))" - "@ - mov %r1,%0 - lda %0,%1($31) - ldah %0,%h1($31) - # - # - ldq%A1 %0,%1 - stq%A0 %r1,%0 - fmov %R1,%0 - ldt %0,%1 - stt %R1,%0" - [(set_attr "type" "ilog,iadd,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst") - (set_attr "usegp" "*,*,*,yes,*,*,*,*,*,*")]) - -;; The 'U' constraint matches symbolic operands on Unicos/Mk. Those should -;; have been split up by the rules above but we shouldn't reject the -;; possibility of them getting through. - -(define_insn "*movdi_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,U,s,m,rJ,*fJ,Q,*f"))] - "! TARGET_FIX - && (register_operand (operands[0], DImode) - || reg_or_0_operand (operands[1], DImode))" - "@ - bis $31,%r1,%0 - lda %0,%1($31) - ldah %0,%h1($31) - laum %0,%t1($31)\;sll %0,32,%0\;lalm %0,%t1(%0)\;lal %0,%t1(%0) - lda %0,%1 - ldq%A1 %0,%1 - stq%A0 %r1,%0 - cpys %R1,%R1,%0 - ldt %0,%1 - stt %R1,%0" - [(set_attr "type" "ilog,iadd,iadd,ldsym,ldsym,ild,ist,fcpys,fld,fst") - (set_attr "length" "*,*,*,16,*,*,*,*,*,*")]) - -(define_insn "*movdi_er_fix" - [(set (match_operand:DI 0 "nonimmediate_operand" - "=r,r,r,r,r,r, m, *f,*f, Q, r,*f") - (match_operand:DI 1 "input_operand" - "rJ,K,L,T,s,m,rJ,*fJ, Q,*f,*f, r"))] - "TARGET_EXPLICIT_RELOCS && TARGET_FIX - && (register_operand (operands[0], DImode) - || reg_or_0_operand (operands[1], DImode))" - "@ - mov %r1,%0 - lda %0,%1($31) - ldah %0,%h1($31) - # - # - ldq%A1 %0,%1 - stq%A0 %r1,%0 - fmov %R1,%0 - ldt %0,%1 - stt %R1,%0 - ftoit %1,%0 - itoft %1,%0" - [(set_attr "type" "ilog,iadd,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst,ftoi,itof") - (set_attr "usegp" "*,*,*,yes,*,*,*,*,*,*,*,*")]) - -(define_insn "*movdi_fix" - [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,r,m,*f,*f,Q,r,*f") - (match_operand:DI 1 "input_operand" "rJ,K,L,s,m,rJ,*fJ,Q,*f,*f,r"))] - "! TARGET_EXPLICIT_RELOCS && TARGET_FIX - && (register_operand (operands[0], DImode) - || reg_or_0_operand (operands[1], DImode))" - "@ - bis $31,%r1,%0 - lda %0,%1($31) - ldah %0,%h1($31) - lda %0,%1 - ldq%A1 %0,%1 - stq%A0 %r1,%0 - cpys %R1,%R1,%0 - ldt %0,%1 - stt %R1,%0 - ftoit %1,%0 - itoft %1,%0" - [(set_attr "type" "ilog,iadd,iadd,ldsym,ild,ist,fcpys,fld,fst,ftoi,itof")]) - -;; VMS needs to set up "vms_base_regno" for unwinding. This move -;; often appears dead to the life analysis code, at which point we -;; abort for emitting dead prologue instructions. Force this live. - -(define_insn "force_movdi" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "r")] - UNSPECV_FORCE_MOV))] - "" - "mov %1,%0" - [(set_attr "type" "ilog")]) - -;; We do three major things here: handle mem->mem, put 64-bit constants in -;; memory, and construct long 32-bit constants. - -(define_expand "movdi" - [(set (match_operand:DI 0 "nonimmediate_operand" "") - (match_operand:DI 1 "general_operand" ""))] - "" -{ - if (alpha_expand_mov (DImode, operands)) - DONE; -}) - -;; Split a load of a large constant into the appropriate two-insn -;; sequence. - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "const_int_operand" ""))] - "! add_operand (operands[1], DImode)" - [(set (match_dup 0) (match_dup 2)) - (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 3)))] -{ - rtx tem - = alpha_emit_set_const (operands[0], DImode, INTVAL (operands[1]), 2); - - if (tem == operands[0]) - DONE; - else - FAIL; -}) - -;; These are the partial-word cases. -;; -;; First we have the code to load an aligned word. Operand 0 is the register -;; in which to place the result. It's mode is QImode or HImode. Operand 1 -;; is an SImode MEM at the low-order byte of the proper word. Operand 2 is the -;; number of bits within the word that the value is. Operand 3 is an SImode -;; scratch register. If operand 0 is a hard register, operand 3 may be the -;; same register. It is allowed to conflict with operand 1 as well. - -(define_expand "aligned_loadqi" - [(set (match_operand:SI 3 "register_operand" "") - (match_operand:SI 1 "memory_operand" "")) - (set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (subreg:DI (match_dup 3) 0) - (const_int 8) - (match_operand:DI 2 "const_int_operand" "")))] - - "" - "") - -(define_expand "aligned_loadhi" - [(set (match_operand:SI 3 "register_operand" "") - (match_operand:SI 1 "memory_operand" "")) - (set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (subreg:DI (match_dup 3) 0) - (const_int 16) - (match_operand:DI 2 "const_int_operand" "")))] - - "" - "") - -;; Similar for unaligned loads, where we use the sequence from the -;; Alpha Architecture manual. We have to distinguish between little-endian -;; and big-endian systems as the sequences are different. -;; -;; Operand 1 is the address. Operands 2 and 3 are temporaries, where -;; operand 3 can overlap the input and output registers. - -(define_expand "unaligned_loadqi" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:DI 1 "address_operand" "")) - (use (match_operand:DI 2 "register_operand" "")) - (use (match_operand:DI 3 "register_operand" ""))] - "" -{ - if (WORDS_BIG_ENDIAN) - emit_insn (gen_unaligned_loadqi_be (operands[0], operands[1], - operands[2], operands[3])); - else - emit_insn (gen_unaligned_loadqi_le (operands[0], operands[1], - operands[2], operands[3])); - DONE; -}) - -(define_expand "unaligned_loadqi_le" - [(set (match_operand:DI 2 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 1 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 3 "register_operand" "") - (match_dup 1)) - (set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (match_dup 2) - (const_int 8) - (ashift:DI (match_dup 3) (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "") - -(define_expand "unaligned_loadqi_be" - [(set (match_operand:DI 2 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 1 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 3 "register_operand" "") - (match_dup 1)) - (set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (match_dup 2) - (const_int 8) - (minus:DI - (const_int 56) - (ashift:DI (match_dup 3) (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "") - -(define_expand "unaligned_loadhi" - [(use (match_operand:DI 0 "register_operand" "")) - (use (match_operand:DI 1 "address_operand" "")) - (use (match_operand:DI 2 "register_operand" "")) - (use (match_operand:DI 3 "register_operand" ""))] - "" -{ - if (WORDS_BIG_ENDIAN) - emit_insn (gen_unaligned_loadhi_be (operands[0], operands[1], - operands[2], operands[3])); - else - emit_insn (gen_unaligned_loadhi_le (operands[0], operands[1], - operands[2], operands[3])); - DONE; -}) - -(define_expand "unaligned_loadhi_le" - [(set (match_operand:DI 2 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 1 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 3 "register_operand" "") - (match_dup 1)) - (set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (match_dup 2) - (const_int 16) - (ashift:DI (match_dup 3) (const_int 3))))] - "! WORDS_BIG_ENDIAN" - "") - -(define_expand "unaligned_loadhi_be" - [(set (match_operand:DI 2 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 1 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 3 "register_operand" "") - (plus:DI (match_dup 1) (const_int 1))) - (set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (match_dup 2) - (const_int 16) - (minus:DI - (const_int 56) - (ashift:DI (match_dup 3) (const_int 3)))))] - "WORDS_BIG_ENDIAN" - "") - -;; Storing an aligned byte or word requires two temporaries. Operand 0 is the -;; aligned SImode MEM. Operand 1 is the register containing the -;; byte or word to store. Operand 2 is the number of bits within the word that -;; the value should be placed. Operands 3 and 4 are SImode temporaries. - -(define_expand "aligned_store" - [(set (match_operand:SI 3 "register_operand" "") - (match_operand:SI 0 "memory_operand" "")) - (set (subreg:DI (match_dup 3) 0) - (and:DI (subreg:DI (match_dup 3) 0) (match_dup 5))) - (set (subreg:DI (match_operand:SI 4 "register_operand" "") 0) - (ashift:DI (zero_extend:DI (match_operand 1 "register_operand" "")) - (match_operand:DI 2 "const_int_operand" ""))) - (set (subreg:DI (match_dup 4) 0) - (ior:DI (subreg:DI (match_dup 4) 0) (subreg:DI (match_dup 3) 0))) - (set (match_dup 0) (match_dup 4))] - "" -{ - operands[5] = GEN_INT (~ (GET_MODE_MASK (GET_MODE (operands[1])) - << INTVAL (operands[2]))); -}) - -;; For the unaligned byte and halfword cases, we use code similar to that -;; in the ;; Architecture book, but reordered to lower the number of registers -;; required. Operand 0 is the address. Operand 1 is the data to store. -;; Operands 2, 3, and 4 are DImode temporaries, where operands 2 and 4 may -;; be the same temporary, if desired. If the address is in a register, -;; operand 2 can be that register. - -(define_expand "unaligned_storeqi" - [(use (match_operand:DI 0 "address_operand" "")) - (use (match_operand:QI 1 "register_operand" "")) - (use (match_operand:DI 2 "register_operand" "")) - (use (match_operand:DI 3 "register_operand" "")) - (use (match_operand:DI 4 "register_operand" ""))] - "" -{ - if (WORDS_BIG_ENDIAN) - emit_insn (gen_unaligned_storeqi_be (operands[0], operands[1], - operands[2], operands[3], - operands[4])); - else - emit_insn (gen_unaligned_storeqi_le (operands[0], operands[1], - operands[2], operands[3], - operands[4])); - DONE; -}) - -(define_expand "unaligned_storeqi_le" - [(set (match_operand:DI 3 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 0 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 2 "register_operand" "") - (match_dup 0)) - (set (match_dup 3) - (and:DI (not:DI (ashift:DI (const_int 255) - (ashift:DI (match_dup 2) (const_int 3)))) - (match_dup 3))) - (set (match_operand:DI 4 "register_operand" "") - (ashift:DI (zero_extend:DI (match_operand:QI 1 "register_operand" "")) - (ashift:DI (match_dup 2) (const_int 3)))) - (set (match_dup 4) (ior:DI (match_dup 4) (match_dup 3))) - (set (mem:DI (and:DI (match_dup 0) (const_int -8))) - (match_dup 4))] - "! WORDS_BIG_ENDIAN" - "") - -(define_expand "unaligned_storeqi_be" - [(set (match_operand:DI 3 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 0 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 2 "register_operand" "") - (match_dup 0)) - (set (match_dup 3) - (and:DI (not:DI (ashift:DI (const_int 255) - (minus:DI (const_int 56) - (ashift:DI (match_dup 2) (const_int 3))))) - (match_dup 3))) - (set (match_operand:DI 4 "register_operand" "") - (ashift:DI (zero_extend:DI (match_operand:QI 1 "register_operand" "")) - (minus:DI (const_int 56) - (ashift:DI (match_dup 2) (const_int 3))))) - (set (match_dup 4) (ior:DI (match_dup 4) (match_dup 3))) - (set (mem:DI (and:DI (match_dup 0) (const_int -8))) - (match_dup 4))] - "WORDS_BIG_ENDIAN" - "") - -(define_expand "unaligned_storehi" - [(use (match_operand:DI 0 "address_operand" "")) - (use (match_operand:HI 1 "register_operand" "")) - (use (match_operand:DI 2 "register_operand" "")) - (use (match_operand:DI 3 "register_operand" "")) - (use (match_operand:DI 4 "register_operand" ""))] - "" -{ - if (WORDS_BIG_ENDIAN) - emit_insn (gen_unaligned_storehi_be (operands[0], operands[1], - operands[2], operands[3], - operands[4])); - else - emit_insn (gen_unaligned_storehi_le (operands[0], operands[1], - operands[2], operands[3], - operands[4])); - DONE; -}) - -(define_expand "unaligned_storehi_le" - [(set (match_operand:DI 3 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 0 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 2 "register_operand" "") - (match_dup 0)) - (set (match_dup 3) - (and:DI (not:DI (ashift:DI (const_int 65535) - (ashift:DI (match_dup 2) (const_int 3)))) - (match_dup 3))) - (set (match_operand:DI 4 "register_operand" "") - (ashift:DI (zero_extend:DI (match_operand:HI 1 "register_operand" "")) - (ashift:DI (match_dup 2) (const_int 3)))) - (set (match_dup 4) (ior:DI (match_dup 4) (match_dup 3))) - (set (mem:DI (and:DI (match_dup 0) (const_int -8))) - (match_dup 4))] - "! WORDS_BIG_ENDIAN" - "") - -(define_expand "unaligned_storehi_be" - [(set (match_operand:DI 3 "register_operand" "") - (mem:DI (and:DI (match_operand:DI 0 "address_operand" "") - (const_int -8)))) - (set (match_operand:DI 2 "register_operand" "") - (plus:DI (match_dup 0) (const_int 1))) - (set (match_dup 3) - (and:DI (not:DI (ashift:DI - (const_int 65535) - (minus:DI (const_int 56) - (ashift:DI (match_dup 2) (const_int 3))))) - (match_dup 3))) - (set (match_operand:DI 4 "register_operand" "") - (ashift:DI (zero_extend:DI (match_operand:HI 1 "register_operand" "")) - (minus:DI (const_int 56) - (ashift:DI (match_dup 2) (const_int 3))))) - (set (match_dup 4) (ior:DI (match_dup 4) (match_dup 3))) - (set (mem:DI (and:DI (match_dup 0) (const_int -8))) - (match_dup 4))] - "WORDS_BIG_ENDIAN" - "") - -;; Here are the define_expand's for QI and HI moves that use the above -;; patterns. We have the normal sets, plus the ones that need scratch -;; registers for reload. - -(define_expand "movqi" - [(set (match_operand:QI 0 "nonimmediate_operand" "") - (match_operand:QI 1 "general_operand" ""))] - "" -{ - if (TARGET_BWX - ? alpha_expand_mov (QImode, operands) - : alpha_expand_mov_nobwx (QImode, operands)) - DONE; -}) - -(define_expand "movhi" - [(set (match_operand:HI 0 "nonimmediate_operand" "") - (match_operand:HI 1 "general_operand" ""))] - "" -{ - if (TARGET_BWX - ? alpha_expand_mov (HImode, operands) - : alpha_expand_mov_nobwx (HImode, operands)) - DONE; -}) - -;; Here are the versions for reload. Note that in the unaligned cases -;; we know that the operand must not be a pseudo-register because stack -;; slots are always aligned references. - -(define_expand "reload_inqi" - [(parallel [(match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "any_memory_operand" "m") - (match_operand:TI 2 "register_operand" "=&r")])] - "! TARGET_BWX" -{ - rtx scratch, seq; - - if (aligned_memory_operand (operands[1], QImode)) - { - seq = gen_reload_inqi_help (operands[0], operands[1], - gen_rtx_REG (SImode, REGNO (operands[2]))); - } - else - { - rtx addr; - - /* It is possible that one of the registers we got for operands[2] - might coincide with that of operands[0] (which is why we made - it TImode). Pick the other one to use as our scratch. */ - if (REGNO (operands[0]) == REGNO (operands[2])) - scratch = gen_rtx_REG (DImode, REGNO (operands[2]) + 1); - else - scratch = gen_rtx_REG (DImode, REGNO (operands[2])); - - addr = get_unaligned_address (operands[1], 0); - operands[0] = gen_rtx_REG (DImode, REGNO (operands[0])); - seq = gen_unaligned_loadqi (operands[0], addr, scratch, operands[0]); - alpha_set_memflags (seq, operands[1]); - } - emit_insn (seq); - DONE; -}) - -(define_expand "reload_inhi" - [(parallel [(match_operand:HI 0 "register_operand" "=r") - (match_operand:HI 1 "any_memory_operand" "m") - (match_operand:TI 2 "register_operand" "=&r")])] - "! TARGET_BWX" -{ - rtx scratch, seq; - - if (aligned_memory_operand (operands[1], HImode)) - { - seq = gen_reload_inhi_help (operands[0], operands[1], - gen_rtx_REG (SImode, REGNO (operands[2]))); - } - else - { - rtx addr; - - /* It is possible that one of the registers we got for operands[2] - might coincide with that of operands[0] (which is why we made - it TImode). Pick the other one to use as our scratch. */ - if (REGNO (operands[0]) == REGNO (operands[2])) - scratch = gen_rtx_REG (DImode, REGNO (operands[2]) + 1); - else - scratch = gen_rtx_REG (DImode, REGNO (operands[2])); - - addr = get_unaligned_address (operands[1], 0); - operands[0] = gen_rtx_REG (DImode, REGNO (operands[0])); - seq = gen_unaligned_loadhi (operands[0], addr, scratch, operands[0]); - alpha_set_memflags (seq, operands[1]); - } - emit_insn (seq); - DONE; -}) - -(define_expand "reload_outqi" - [(parallel [(match_operand:QI 0 "any_memory_operand" "=m") - (match_operand:QI 1 "register_operand" "r") - (match_operand:TI 2 "register_operand" "=&r")])] - "! TARGET_BWX" -{ - if (aligned_memory_operand (operands[0], QImode)) - { - emit_insn (gen_reload_outqi_help - (operands[0], operands[1], - gen_rtx_REG (SImode, REGNO (operands[2])), - gen_rtx_REG (SImode, REGNO (operands[2]) + 1))); - } - else - { - rtx addr = get_unaligned_address (operands[0], 0); - rtx scratch1 = gen_rtx_REG (DImode, REGNO (operands[2])); - rtx scratch2 = gen_rtx_REG (DImode, REGNO (operands[2]) + 1); - rtx scratch3 = scratch1; - rtx seq; - - if (GET_CODE (addr) == REG) - scratch1 = addr; - - seq = gen_unaligned_storeqi (addr, operands[1], scratch1, - scratch2, scratch3); - alpha_set_memflags (seq, operands[0]); - emit_insn (seq); - } - DONE; -}) - -(define_expand "reload_outhi" - [(parallel [(match_operand:HI 0 "any_memory_operand" "=m") - (match_operand:HI 1 "register_operand" "r") - (match_operand:TI 2 "register_operand" "=&r")])] - "! TARGET_BWX" -{ - if (aligned_memory_operand (operands[0], HImode)) - { - emit_insn (gen_reload_outhi_help - (operands[0], operands[1], - gen_rtx_REG (SImode, REGNO (operands[2])), - gen_rtx_REG (SImode, REGNO (operands[2]) + 1))); - } - else - { - rtx addr = get_unaligned_address (operands[0], 0); - rtx scratch1 = gen_rtx_REG (DImode, REGNO (operands[2])); - rtx scratch2 = gen_rtx_REG (DImode, REGNO (operands[2]) + 1); - rtx scratch3 = scratch1; - rtx seq; - - if (GET_CODE (addr) == REG) - scratch1 = addr; - - seq = gen_unaligned_storehi (addr, operands[1], scratch1, - scratch2, scratch3); - alpha_set_memflags (seq, operands[0]); - emit_insn (seq); - } - DONE; -}) - -;; Helpers for the above. The way reload is structured, we can't -;; always get a proper address for a stack slot during reload_foo -;; expansion, so we must delay our address manipulations until after. - -(define_insn_and_split "reload_inqi_help" - [(set (match_operand:QI 0 "register_operand" "=r") - (match_operand:QI 1 "memory_operand" "m")) - (clobber (match_operand:SI 2 "register_operand" "=r"))] - "! TARGET_BWX && (reload_in_progress || reload_completed)" - "#" - "! TARGET_BWX && reload_completed" - [(const_int 0)] -{ - rtx aligned_mem, bitnum; - get_aligned_mem (operands[1], &aligned_mem, &bitnum); - operands[0] = gen_lowpart (DImode, operands[0]); - emit_insn (gen_aligned_loadqi (operands[0], aligned_mem, bitnum, - operands[2])); - DONE; -}) - -(define_insn_and_split "reload_inhi_help" - [(set (match_operand:HI 0 "register_operand" "=r") - (match_operand:HI 1 "memory_operand" "m")) - (clobber (match_operand:SI 2 "register_operand" "=r"))] - "! TARGET_BWX && (reload_in_progress || reload_completed)" - "#" - "! TARGET_BWX && reload_completed" - [(const_int 0)] -{ - rtx aligned_mem, bitnum; - get_aligned_mem (operands[1], &aligned_mem, &bitnum); - operands[0] = gen_lowpart (DImode, operands[0]); - emit_insn (gen_aligned_loadhi (operands[0], aligned_mem, bitnum, - operands[2])); - DONE; -}) - -(define_insn_and_split "reload_outqi_help" - [(set (match_operand:QI 0 "memory_operand" "=m") - (match_operand:QI 1 "register_operand" "r")) - (clobber (match_operand:SI 2 "register_operand" "=r")) - (clobber (match_operand:SI 3 "register_operand" "=r"))] - "! TARGET_BWX && (reload_in_progress || reload_completed)" - "#" - "! TARGET_BWX && reload_completed" - [(const_int 0)] -{ - rtx aligned_mem, bitnum; - get_aligned_mem (operands[0], &aligned_mem, &bitnum); - emit_insn (gen_aligned_store (aligned_mem, operands[1], bitnum, - operands[2], operands[3])); - DONE; -}) - -(define_insn_and_split "reload_outhi_help" - [(set (match_operand:HI 0 "memory_operand" "=m") - (match_operand:HI 1 "register_operand" "r")) - (clobber (match_operand:SI 2 "register_operand" "=r")) - (clobber (match_operand:SI 3 "register_operand" "=r"))] - "! TARGET_BWX && (reload_in_progress || reload_completed)" - "#" - "! TARGET_BWX && reload_completed" - [(const_int 0)] -{ - rtx aligned_mem, bitnum; - get_aligned_mem (operands[0], &aligned_mem, &bitnum); - emit_insn (gen_aligned_store (aligned_mem, operands[1], bitnum, - operands[2], operands[3])); - 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" - [(set (match_operand:DI 0 "register_operand" "") - (sign_extract:DI (match_operand:QI 1 "memory_operand" "") - (match_operand:DI 2 "immediate_operand" "") - (match_operand:DI 3 "immediate_operand" "")))] - "" -{ - int ofs; - - /* We can do 16, 32 and 64 bit fields, if aligned on byte boundaries. */ - if (INTVAL (operands[3]) % 8 != 0 - || (INTVAL (operands[2]) != 16 - && INTVAL (operands[2]) != 32 - && INTVAL (operands[2]) != 64)) - FAIL; - - /* From mips.md: extract_bit_field doesn't verify that our source - matches the predicate, so we force it to be a MEM here. */ - if (GET_CODE (operands[1]) != MEM) - FAIL; - - /* The bit number is relative to the mode of operand 1 which is - usually QImode (this might actually be a bug in expmed.c). Note - that the bit number is negative in big-endian mode in this case. - We have to convert that to the offset. */ - if (WORDS_BIG_ENDIAN) - ofs = GET_MODE_BITSIZE (GET_MODE (operands[1])) - - INTVAL (operands[2]) - INTVAL (operands[3]); - else - ofs = INTVAL (operands[3]); - - ofs = ofs / 8; - - alpha_expand_unaligned_load (operands[0], operands[1], - INTVAL (operands[2]) / 8, - ofs, 1); - DONE; -}) - -(define_expand "extzv" - [(set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (match_operand:DI 1 "nonimmediate_operand" "") - (match_operand:DI 2 "immediate_operand" "") - (match_operand:DI 3 "immediate_operand" "")))] - "" -{ - /* We can do 8, 16, 32 and 64 bit fields, if aligned on byte boundaries. */ - if (INTVAL (operands[3]) % 8 != 0 - || (INTVAL (operands[2]) != 8 - && INTVAL (operands[2]) != 16 - && INTVAL (operands[2]) != 32 - && INTVAL (operands[2]) != 64)) - FAIL; - - if (GET_CODE (operands[1]) == MEM) - { - int ofs; - - /* Fail 8 bit fields, falling back on a simple byte load. */ - if (INTVAL (operands[2]) == 8) - FAIL; - - /* The bit number is relative to the mode of operand 1 which is - usually QImode (this might actually be a bug in expmed.c). Note - that the bit number is negative in big-endian mode in this case. - We have to convert that to the offset. */ - if (WORDS_BIG_ENDIAN) - ofs = GET_MODE_BITSIZE (GET_MODE (operands[1])) - - INTVAL (operands[2]) - INTVAL (operands[3]); - else - ofs = INTVAL (operands[3]); - - ofs = ofs / 8; - - alpha_expand_unaligned_load (operands[0], operands[1], - INTVAL (operands[2]) / 8, - ofs, 0); - DONE; - } -}) - -(define_expand "insv" - [(set (zero_extract:DI (match_operand:QI 0 "memory_operand" "") - (match_operand:DI 1 "immediate_operand" "") - (match_operand:DI 2 "immediate_operand" "")) - (match_operand:DI 3 "register_operand" ""))] - "" -{ - int ofs; - - /* We can do 16, 32 and 64 bit fields, if aligned on byte boundaries. */ - if (INTVAL (operands[2]) % 8 != 0 - || (INTVAL (operands[1]) != 16 - && INTVAL (operands[1]) != 32 - && INTVAL (operands[1]) != 64)) - FAIL; - - /* From mips.md: store_bit_field doesn't verify that our source - matches the predicate, so we force it to be a MEM here. */ - if (GET_CODE (operands[0]) != MEM) - FAIL; - - /* The bit number is relative to the mode of operand 1 which is - usually QImode (this might actually be a bug in expmed.c). Note - that the bit number is negative in big-endian mode in this case. - We have to convert that to the offset. */ - if (WORDS_BIG_ENDIAN) - ofs = GET_MODE_BITSIZE (GET_MODE (operands[0])) - - INTVAL (operands[1]) - INTVAL (operands[2]); - else - ofs = INTVAL (operands[2]); - - ofs = ofs / 8; - - alpha_expand_unaligned_store (operands[0], operands[3], - INTVAL (operands[1]) / 8, ofs); - DONE; -}) - -;; Block move/clear, see alpha.c for more details. -;; Argument 0 is the destination -;; Argument 1 is the source -;; Argument 2 is the length -;; Argument 3 is the alignment - -(define_expand "movstrqi" - [(parallel [(set (match_operand:BLK 0 "memory_operand" "") - (match_operand:BLK 1 "memory_operand" "")) - (use (match_operand:DI 2 "immediate_operand" "")) - (use (match_operand:DI 3 "immediate_operand" ""))])] - "" -{ - if (alpha_expand_block_move (operands)) - DONE; - else - FAIL; -}) - -(define_expand "movstrdi" - [(parallel [(set (match_operand:BLK 0 "memory_operand" "") - (match_operand:BLK 1 "memory_operand" "")) - (use (match_operand:DI 2 "immediate_operand" "")) - (use (match_operand:DI 3 "immediate_operand" "")) - (use (match_dup 4)) - (clobber (reg:DI 25)) - (clobber (reg:DI 16)) - (clobber (reg:DI 17)) - (clobber (reg:DI 18)) - (clobber (reg:DI 19)) - (clobber (reg:DI 20)) - (clobber (reg:DI 26)) - (clobber (reg:DI 27))])] - "TARGET_ABI_OPEN_VMS" -{ - operands[4] = gen_rtx_SYMBOL_REF (Pmode, "OTS$MOVE"); - alpha_need_linkage (XSTR (operands[4], 0), 0); -}) - -(define_insn "*movstrdi_1" - [(set (match_operand:BLK 0 "memory_operand" "=m,=m") - (match_operand:BLK 1 "memory_operand" "m,m")) - (use (match_operand:DI 2 "nonmemory_operand" "r,i")) - (use (match_operand:DI 3 "immediate_operand" "")) - (use (match_operand:DI 4 "call_operand" "i,i")) - (clobber (reg:DI 25)) - (clobber (reg:DI 16)) - (clobber (reg:DI 17)) - (clobber (reg:DI 18)) - (clobber (reg:DI 19)) - (clobber (reg:DI 20)) - (clobber (reg:DI 26)) - (clobber (reg:DI 27))] - "TARGET_ABI_OPEN_VMS" -{ - operands [5] = alpha_use_linkage (operands [4], cfun->decl, 0, 1); - switch (which_alternative) - { - case 0: - return "lda $16,%0\;bis $31,%2,$17\;lda $18,%1\;ldq $26,%5\;lda $25,3($31)\;jsr $26,%4\;ldq $27,0($29)"; - case 1: - return "lda $16,%0\;lda $17,%2($31)\;lda $18,%1\;ldq $26,%5\;lda $25,3($31)\;jsr $26,%4\;ldq $27,0($29)"; - default: - abort(); - } -} - [(set_attr "type" "multi") - (set_attr "length" "28")]) - -(define_expand "clrstrqi" - [(parallel [(set (match_operand:BLK 0 "memory_operand" "") - (const_int 0)) - (use (match_operand:DI 1 "immediate_operand" "")) - (use (match_operand:DI 2 "immediate_operand" ""))])] - "" -{ - if (alpha_expand_block_clear (operands)) - DONE; - else - FAIL; -}) - -(define_expand "clrstrdi" - [(parallel [(set (match_operand:BLK 0 "memory_operand" "") - (const_int 0)) - (use (match_operand:DI 1 "immediate_operand" "")) - (use (match_operand:DI 2 "immediate_operand" "")) - (use (match_dup 3)) - (clobber (reg:DI 25)) - (clobber (reg:DI 16)) - (clobber (reg:DI 17)) - (clobber (reg:DI 26)) - (clobber (reg:DI 27))])] - "TARGET_ABI_OPEN_VMS" -{ - operands[3] = gen_rtx_SYMBOL_REF (Pmode, "OTS$ZERO"); - alpha_need_linkage (XSTR (operands[3], 0), 0); -}) - -(define_insn "*clrstrdi_1" - [(set (match_operand:BLK 0 "memory_operand" "=m,=m") - (const_int 0)) - (use (match_operand:DI 1 "nonmemory_operand" "r,i")) - (use (match_operand:DI 2 "immediate_operand" "")) - (use (match_operand:DI 3 "call_operand" "i,i")) - (clobber (reg:DI 25)) - (clobber (reg:DI 16)) - (clobber (reg:DI 17)) - (clobber (reg:DI 26)) - (clobber (reg:DI 27))] - "TARGET_ABI_OPEN_VMS" -{ - operands [4] = alpha_use_linkage (operands [3], cfun->decl, 0, 1); - switch (which_alternative) - { - case 0: - return "lda $16,%0\;bis $31,%1,$17\;ldq $26,%4\;lda $25,2($31)\;jsr $26,%3\;ldq $27,0($29)"; - case 1: - return "lda $16,%0\;lda $17,%1($31)\;ldq $26,%4\;lda $25,2($31)\;jsr $26,%3\;ldq $27,0($29)"; - default: - abort(); - } -} - [(set_attr "type" "multi") - (set_attr "length" "24")]) - - -;; Subroutine of stack space allocation. Perform a stack probe. -(define_expand "probe_stack" - [(set (match_dup 1) (match_operand:DI 0 "const_int_operand" ""))] - "" -{ - operands[1] = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, - INTVAL (operands[0]))); - MEM_VOLATILE_P (operands[1]) = 1; - - operands[0] = const0_rtx; -}) - -;; This is how we allocate stack space. If we are allocating a -;; constant amount of space and we know it is less than 4096 -;; bytes, we need do nothing. -;; -;; If it is more than 4096 bytes, we need to probe the stack -;; periodically. -(define_expand "allocate_stack" - [(set (reg:DI 30) - (plus:DI (reg:DI 30) - (match_operand:DI 1 "reg_or_cint_operand" ""))) - (set (match_operand:DI 0 "register_operand" "=r") - (match_dup 2))] - "" -{ - if (GET_CODE (operands[1]) == CONST_INT - && INTVAL (operands[1]) < 32768) - { - if (INTVAL (operands[1]) >= 4096) - { - /* We do this the same way as in the prologue and generate explicit - probes. Then we update the stack by the constant. */ - - int probed = 4096; - - emit_insn (gen_probe_stack (GEN_INT (- probed))); - while (probed + 8192 < INTVAL (operands[1])) - emit_insn (gen_probe_stack (GEN_INT (- (probed += 8192)))); - - if (probed + 4096 < INTVAL (operands[1])) - emit_insn (gen_probe_stack (GEN_INT (- INTVAL(operands[1])))); - } - - operands[1] = GEN_INT (- INTVAL (operands[1])); - operands[2] = virtual_stack_dynamic_rtx; - } - else - { - rtx out_label = 0; - rtx loop_label = gen_label_rtx (); - rtx want = gen_reg_rtx (Pmode); - rtx tmp = gen_reg_rtx (Pmode); - rtx memref; - - emit_insn (gen_subdi3 (want, stack_pointer_rtx, - force_reg (Pmode, operands[1]))); - emit_insn (gen_adddi3 (tmp, stack_pointer_rtx, GEN_INT (-4096))); - - if (GET_CODE (operands[1]) != CONST_INT) - { - out_label = gen_label_rtx (); - emit_insn (gen_cmpdi (want, tmp)); - emit_jump_insn (gen_bgeu (out_label)); - } - - emit_label (loop_label); - memref = gen_rtx_MEM (DImode, tmp); - MEM_VOLATILE_P (memref) = 1; - emit_move_insn (memref, const0_rtx); - emit_insn (gen_adddi3 (tmp, tmp, GEN_INT(-8192))); - emit_insn (gen_cmpdi (tmp, want)); - emit_jump_insn (gen_bgtu (loop_label)); - - memref = gen_rtx_MEM (DImode, want); - MEM_VOLATILE_P (memref) = 1; - emit_move_insn (memref, const0_rtx); - - if (out_label) - emit_label (out_label); - - emit_move_insn (stack_pointer_rtx, want); - emit_move_insn (operands[0], virtual_stack_dynamic_rtx); - DONE; - } -}) - -;; This is used by alpha_expand_prolog to do the same thing as above, -;; except we cannot at that time generate new basic blocks, so we hide -;; the loop in this one insn. - -(define_insn "prologue_stack_probe_loop" - [(unspec_volatile [(match_operand:DI 0 "register_operand" "r") - (match_operand:DI 1 "register_operand" "r")] - UNSPECV_PSPL)] - "" -{ - operands[2] = gen_label_rtx (); - (*targetm.asm_out.internal_label) (asm_out_file, "L", - CODE_LABEL_NUMBER (operands[2])); - - return "stq $31,-8192(%1)\;subq %0,1,%0\;lda %1,-8192(%1)\;bne %0,%l2"; -} - [(set_attr "length" "16") - (set_attr "type" "multi")]) - -(define_expand "prologue" - [(clobber (const_int 0))] - "" -{ - alpha_expand_prologue (); - DONE; -}) - -;; These take care of emitting the ldgp insn in the prologue. This will be -;; an lda/ldah pair and we want to align them properly. So we have two -;; unspec_volatile insns, the first of which emits the ldgp assembler macro -;; and the second of which emits nothing. However, both are marked as type -;; IADD (the default) so the alignment code in alpha.c does the right thing -;; with them. - -(define_expand "prologue_ldgp" - [(set (match_dup 0) - (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1)) - (set (match_dup 0) - (unspec_volatile:DI [(match_dup 0) (match_dup 2)] UNSPECV_PLDGP2))] - "" -{ - operands[0] = pic_offset_table_rtx; - operands[1] = gen_rtx_REG (Pmode, 27); - operands[2] = (TARGET_EXPLICIT_RELOCS - ? GEN_INT (alpha_next_sequence_number++) - : const0_rtx); -}) - -(define_insn "*ldgp_er_1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand 2 "const_int_operand" "")] - UNSPECV_LDGP1))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "ldah %0,0(%1)\t\t!gpdisp!%2" - [(set_attr "cannot_copy" "true")]) - -(define_insn "*ldgp_er_2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand 2 "const_int_operand" "")] - UNSPEC_LDGP2))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "lda %0,0(%1)\t\t!gpdisp!%2" - [(set_attr "cannot_copy" "true")]) - -(define_insn "*prologue_ldgp_er_2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand 2 "const_int_operand" "")] - UNSPECV_PLDGP2))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "lda %0,0(%1)\t\t!gpdisp!%2\n$%~..ng:" - [(set_attr "cannot_copy" "true")]) - -(define_insn "*prologue_ldgp_1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand 2 "const_int_operand" "")] - UNSPECV_LDGP1))] - "" - "ldgp %0,0(%1)\n$%~..ng:" - [(set_attr "cannot_copy" "true")]) - -(define_insn "*prologue_ldgp_2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "r") - (match_operand 2 "const_int_operand" "")] - UNSPECV_PLDGP2))] - "" - "") - -;; The _mcount profiling hook has special calling conventions, and -;; does not clobber all the registers that a normal call would. So -;; hide the fact this is a call at all. - -(define_insn "prologue_mcount" - [(unspec_volatile [(const_int 0)] UNSPECV_MCOUNT)] - "" -{ - if (TARGET_EXPLICIT_RELOCS) - /* Note that we cannot use a lituse_jsr reloc, since _mcount - cannot be called via the PLT. */ - return "ldq $28,_mcount($29)\t\t!literal\;jsr $28,($28),_mcount"; - else - return "lda $28,_mcount\;jsr $28,($28),_mcount"; -} - [(set_attr "type" "multi") - (set_attr "length" "8")]) - -(define_insn "init_fp" - [(set (match_operand:DI 0 "register_operand" "=r") - (match_operand:DI 1 "register_operand" "r")) - (clobber (mem:BLK (match_operand:DI 2 "register_operand" "=r")))] - "" - "bis $31,%1,%0") - -(define_expand "epilogue" - [(return)] - "" -{ - alpha_expand_epilogue (); -}) - -(define_expand "sibcall_epilogue" - [(return)] - "TARGET_ABI_OSF" -{ - alpha_expand_epilogue (); - DONE; -}) - -(define_expand "builtin_longjmp" - [(use (match_operand:DI 0 "register_operand" "r"))] - "TARGET_ABI_OSF" -{ - /* The elements of the buffer are, in order: */ - rtx fp = gen_rtx_MEM (Pmode, operands[0]); - rtx lab = gen_rtx_MEM (Pmode, plus_constant (operands[0], 8)); - rtx stack = gen_rtx_MEM (Pmode, plus_constant (operands[0], 16)); - rtx pv = gen_rtx_REG (Pmode, 27); - - /* This bit is the same as expand_builtin_longjmp. */ - emit_move_insn (hard_frame_pointer_rtx, fp); - emit_move_insn (pv, lab); - emit_stack_restore (SAVE_NONLOCAL, stack, NULL_RTX); - emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx)); - emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx)); - - /* Load the label we are jumping through into $27 so that we know - where to look for it when we get back to setjmp's function for - restoring the gp. */ - emit_jump_insn (gen_builtin_longjmp_internal (pv)); - emit_barrier (); - DONE; -}) - -;; This is effectively a copy of indirect_jump, but constrained such -;; that register renaming cannot foil our cunning plan with $27. -(define_insn "builtin_longjmp_internal" - [(set (pc) - (unspec_volatile [(match_operand:DI 0 "register_operand" "c")] - UNSPECV_LONGJMP))] - "" - "jmp $31,(%0),0" - [(set_attr "type" "ibr")]) - -(define_expand "builtin_setjmp_receiver" - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)] - "TARGET_ABI_OSF" - "") - -(define_insn_and_split "*builtin_setjmp_receiver_1" - [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR)] - "TARGET_ABI_OSF" -{ - if (TARGET_EXPLICIT_RELOCS) - return "#"; - else - return "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)"; -} - "&& TARGET_EXPLICIT_RELOCS && reload_completed" - [(unspec_volatile [(match_dup 0)] UNSPECV_SETJMPR_ER) - (set (match_dup 1) - (unspec_volatile:DI [(match_dup 2) (match_dup 3)] UNSPECV_LDGP1)) - (set (match_dup 1) - (unspec:DI [(match_dup 1) (match_dup 3)] UNSPEC_LDGP2))] -{ - operands[1] = pic_offset_table_rtx; - operands[2] = gen_rtx_REG (Pmode, 27); - operands[3] = GEN_INT (alpha_next_sequence_number++); -} - [(set_attr "length" "12") - (set_attr "type" "multi")]) - -(define_insn "*builtin_setjmp_receiver_er_sl_1" - [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)] - "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS && TARGET_AS_CAN_SUBTRACT_LABELS" - "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:") - -(define_insn "*builtin_setjmp_receiver_er_1" - [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)] - "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS" - "br $27,$LSJ%=\n$LSJ%=:" - [(set_attr "type" "ibr")]) - -(define_expand "exception_receiver" - [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)] - "TARGET_ABI_OSF" -{ - if (TARGET_LD_BUGGY_LDGP) - operands[0] = alpha_gp_save_rtx (); - else - operands[0] = const0_rtx; -}) - -(define_insn "*exception_receiver_2" - [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)] - "TARGET_ABI_OSF && TARGET_LD_BUGGY_LDGP" - "ldq $29,%0" - [(set_attr "type" "ild")]) - -(define_insn_and_split "*exception_receiver_1" - [(unspec_volatile [(const_int 0)] UNSPECV_EHR)] - "TARGET_ABI_OSF" -{ - if (TARGET_EXPLICIT_RELOCS) - return "ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*"; - else - return "ldgp $29,0($26)"; -} - "&& TARGET_EXPLICIT_RELOCS && reload_completed" - [(set (match_dup 0) - (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1)) - (set (match_dup 0) - (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))] -{ - operands[0] = pic_offset_table_rtx; - operands[1] = gen_rtx_REG (Pmode, 26); - operands[2] = GEN_INT (alpha_next_sequence_number++); -} - [(set_attr "length" "8") - (set_attr "type" "multi")]) - -(define_expand "nonlocal_goto_receiver" - [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE) - (set (reg:DI 27) (mem:DI (reg:DI 29))) - (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE) - (use (reg:DI 27))] - "TARGET_ABI_OPEN_VMS" - "") - -(define_insn "arg_home" - [(unspec [(const_int 0)] UNSPEC_ARG_HOME) - (use (reg:DI 1)) - (use (reg:DI 25)) - (use (reg:DI 16)) - (use (reg:DI 17)) - (use (reg:DI 18)) - (use (reg:DI 19)) - (use (reg:DI 20)) - (use (reg:DI 21)) - (use (reg:DI 48)) - (use (reg:DI 49)) - (use (reg:DI 50)) - (use (reg:DI 51)) - (use (reg:DI 52)) - (use (reg:DI 53)) - (clobber (mem:BLK (const_int 0))) - (clobber (reg:DI 24)) - (clobber (reg:DI 25)) - (clobber (reg:DI 0))] - "TARGET_ABI_OPEN_VMS" - "lda $0,OTS$HOME_ARGS\;ldq $0,8($0)\;jsr $0,OTS$HOME_ARGS" - [(set_attr "length" "16") - (set_attr "type" "multi")]) - -;; Load the CIW into r2 for calling __T3E_MISMATCH - -(define_expand "umk_mismatch_args" - [(set:DI (match_dup 1) (mem:DI (plus:DI (reg:DI 15) (const_int -16)))) - (set:DI (match_dup 2) (mem:DI (plus:DI (match_dup 1) (const_int -32)))) - (set:DI (reg:DI 1) (match_operand:DI 0 "const_int_operand" "")) - (set:DI (match_dup 3) (plus:DI (mult:DI (reg:DI 25) - (const_int 8)) - (match_dup 2))) - (set:DI (reg:DI 2) (mem:DI (match_dup 3)))] - "TARGET_ABI_UNICOSMK" -{ - operands[1] = gen_reg_rtx (DImode); - operands[2] = gen_reg_rtx (DImode); - operands[3] = gen_reg_rtx (DImode); -}) - -(define_insn "arg_home_umk" - [(unspec [(const_int 0)] UNSPEC_ARG_HOME) - (use (reg:DI 1)) - (use (reg:DI 2)) - (use (reg:DI 16)) - (use (reg:DI 17)) - (use (reg:DI 18)) - (use (reg:DI 19)) - (use (reg:DI 20)) - (use (reg:DI 21)) - (use (reg:DI 48)) - (use (reg:DI 49)) - (use (reg:DI 50)) - (use (reg:DI 51)) - (use (reg:DI 52)) - (use (reg:DI 53)) - (clobber (mem:BLK (const_int 0))) - (parallel [ - (clobber (reg:DI 22)) - (clobber (reg:DI 23)) - (clobber (reg:DI 24)) - (clobber (reg:DI 0)) - (clobber (reg:DI 1)) - (clobber (reg:DI 2)) - (clobber (reg:DI 3)) - (clobber (reg:DI 4)) - (clobber (reg:DI 5)) - (clobber (reg:DI 6)) - (clobber (reg:DI 7)) - (clobber (reg:DI 8))])] - "TARGET_ABI_UNICOSMK" - "laum $4,__T3E_MISMATCH($31)\;sll $4,32,$4\;lalm $4,__T3E_MISMATCH($4)\;lal $4,__T3E_MISMATCH($4)\;jsr $3,($4)" - [(set_attr "length" "16") - (set_attr "type" "multi")]) - -;; Prefetch data. -;; -;; On EV4, these instructions are nops -- no load occurs. -;; -;; On EV5, these instructions act as a normal load, and thus can trap -;; if the address is invalid. The OS may (or may not) handle this in -;; the entMM fault handler and suppress the fault. If so, then this -;; has the effect of a read prefetch instruction. -;; -;; On EV6, these become official prefetch instructions. - -(define_insn "prefetch" - [(prefetch (match_operand:DI 0 "address_operand" "p") - (match_operand:DI 1 "const_int_operand" "n") - (match_operand:DI 2 "const_int_operand" "n"))] - "TARGET_FIXUP_EV5_PREFETCH || TARGET_CPU_EV6" -{ - /* Interpret "no temporal locality" as this data should be evicted once - it is used. The "evict next" alternatives load the data into the cache - and leave the LRU eviction counter pointing to that block. */ - static const char * const alt[2][2] = { - { - "ldq $31,%a0", /* read, evict next */ - "ldl $31,%a0", /* read, evict last */ - }, - { - "ldt $f31,%a0", /* write, evict next */ - "lds $f31,%a0", /* write, evict last */ - } - }; - - bool write = INTVAL (operands[1]) != 0; - bool lru = INTVAL (operands[2]) != 0; - - return alt[write][lru]; -} - [(set_attr "type" "ild")]) - -;; Close the trap shadow of preceding instructions. This is generated -;; by alpha_reorg. - -(define_insn "trapb" - [(unspec_volatile [(const_int 0)] UNSPECV_TRAPB)] - "" - "trapb" - [(set_attr "type" "misc")]) - -;; No-op instructions used by machine-dependent reorg to preserve -;; alignment for instruction issue. -;; The Unicos/Mk assembler does not support these opcodes. - -(define_insn "nop" - [(const_int 0)] - "" - "bis $31,$31,$31" - [(set_attr "type" "ilog")]) - -(define_insn "fnop" - [(const_int 1)] - "TARGET_FP" - "cpys $f31,$f31,$f31" - [(set_attr "type" "fcpys")]) - -(define_insn "unop" - [(const_int 2)] - "" - "ldq_u $31,0($30)") - -;; On Unicos/Mk we use a macro for aligning code. - -(define_insn "realign" - [(unspec_volatile [(match_operand 0 "immediate_operand" "i")] - UNSPECV_REALIGN)] - "" -{ - if (TARGET_ABI_UNICOSMK) - return "gcc@code@align %0"; - 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) (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) (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) (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) (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) (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) (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) (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) (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) (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) (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) (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) (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) (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) (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) (rtx, rtx, rtx, rtx); - rtx mask; - if (WORDS_BIG_ENDIAN) - gen = gen_mskxl_be; - else - gen = gen_mskxl_le; - mask = constm1_rtx; - emit_insn ((*gen) (operands[0], operands[1], mask, operands[2])); - DONE; -}) - -(define_expand "builtin_mskwh" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" "")] - "" -{ - emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (16), operands[2])); - DONE; -}) - -(define_expand "builtin_msklh" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" "")] - "" -{ - emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (32), operands[2])); - DONE; -}) - -(define_expand "builtin_mskqh" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "reg_or_8bit_operand" "")] - "" -{ - emit_insn (gen_mskxh (operands[0], operands[1], GEN_INT (64), operands[2])); - DONE; -}) - -(define_expand "builtin_zap" - [(set (match_operand:DI 0 "register_operand" "") - (and:DI (unspec:DI - [(match_operand:DI 2 "reg_or_const_int_operand" "")] - UNSPEC_ZAP) - (match_operand:DI 1 "reg_or_const_int_operand" "")))] - "" -{ - if (GET_CODE (operands[2]) == CONST_INT) - { - rtx mask = alpha_expand_zap_mask (INTVAL (operands[2])); - - if (mask == const0_rtx) - { - emit_move_insn (operands[0], const0_rtx); - DONE; - } - if (mask == constm1_rtx) - { - emit_move_insn (operands[0], operands[1]); - DONE; - } - - operands[1] = force_reg (DImode, operands[1]); - emit_insn (gen_anddi3 (operands[0], operands[1], mask)); - DONE; - } - - operands[1] = force_reg (DImode, operands[1]); - operands[2] = gen_lowpart (QImode, operands[2]); -}) - -(define_insn "*builtin_zap_1" - [(set (match_operand:DI 0 "register_operand" "=r,r,r,r") - (and:DI (unspec:DI - [(match_operand:QI 2 "reg_or_const_int_operand" "n,n,r,r")] - UNSPEC_ZAP) - (match_operand:DI 1 "reg_or_const_int_operand" "n,r,J,r")))] - "" - "@ - # - # - bis $31,$31,%0 - zap %r1,%2,%0" - [(set_attr "type" "shift,shift,ilog,shift")]) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (and:DI (unspec:DI - [(match_operand:QI 2 "const_int_operand" "")] - UNSPEC_ZAP) - (match_operand:DI 1 "const_int_operand" "")))] - "" - [(const_int 0)] -{ - rtx mask = alpha_expand_zap_mask (INTVAL (operands[2])); - if (HOST_BITS_PER_WIDE_INT >= 64 || GET_CODE (mask) == CONST_INT) - operands[1] = gen_int_mode (INTVAL (operands[1]) & INTVAL (mask), DImode); - else - { - HOST_WIDE_INT c_lo = INTVAL (operands[1]); - HOST_WIDE_INT c_hi = (c_lo < 0 ? -1 : 0); - operands[1] = immed_double_const (c_lo & CONST_DOUBLE_LOW (mask), - c_hi & CONST_DOUBLE_HIGH (mask), - DImode); - } - emit_move_insn (operands[0], operands[1]); - DONE; -}) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (and:DI (unspec:DI - [(match_operand:QI 2 "const_int_operand" "")] - UNSPEC_ZAP) - (match_operand:DI 1 "register_operand" "")))] - "" - [(set (match_dup 0) - (and:DI (match_dup 1) (match_dup 2)))] -{ - operands[2] = alpha_expand_zap_mask (INTVAL (operands[2])); - if (operands[2] == const0_rtx) - { - emit_move_insn (operands[0], const0_rtx); - DONE; - } - if (operands[2] == constm1_rtx) - { - emit_move_insn (operands[0], operands[1]); - DONE; - } -}) - -(define_expand "builtin_zapnot" - [(set (match_operand:DI 0 "register_operand" "") - (and:DI (unspec:DI - [(not:QI (match_operand:DI 2 "reg_or_const_int_operand" ""))] - UNSPEC_ZAP) - (match_operand:DI 1 "reg_or_const_int_operand" "")))] - "" -{ - if (GET_CODE (operands[2]) == CONST_INT) - { - rtx mask = alpha_expand_zap_mask (~ INTVAL (operands[2])); - - if (mask == const0_rtx) - { - emit_move_insn (operands[0], const0_rtx); - DONE; - } - if (mask == constm1_rtx) - { - emit_move_insn (operands[0], operands[1]); - DONE; - } - - operands[1] = force_reg (DImode, operands[1]); - emit_insn (gen_anddi3 (operands[0], operands[1], mask)); - DONE; - } - - operands[1] = force_reg (DImode, operands[1]); - operands[2] = gen_lowpart (QImode, operands[2]); -}) - -(define_insn "*builtin_zapnot_1" - [(set (match_operand:DI 0 "register_operand" "=r") - (and:DI (unspec:DI - [(not:QI (match_operand:QI 2 "register_operand" "r"))] - UNSPEC_ZAP) - (match_operand:DI 1 "reg_or_0_operand" "rJ")))] - "" - "zapnot %r1,%2,%0" - [(set_attr "type" "shift")]) - -(define_insn "builtin_amask" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_8bit_operand" "rI")] - UNSPEC_AMASK))] - "" - "amask %1,%0" - [(set_attr "type" "ilog")]) - -(define_insn "builtin_implver" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(const_int 0)] UNSPEC_IMPLVER))] - "" - "implver %0" - [(set_attr "type" "ilog")]) - -(define_insn "builtin_rpcc" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec_volatile:DI [(const_int 0)] UNSPECV_RPCC))] - "" - "rpcc %0" - [(set_attr "type" "ilog")]) - -(define_expand "builtin_minub8" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_uminv8qi3, V8QImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_expand "builtin_minsb8" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_sminv8qi3, V8QImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_expand "builtin_minuw4" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_uminv4hi3, V4HImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_expand "builtin_minsw4" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_sminv4hi3, V4HImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_expand "builtin_maxub8" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_umaxv8qi3, V8QImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_expand "builtin_maxsb8" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_smaxv8qi3, V8QImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_expand "builtin_maxuw4" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_umaxv4hi3, V4HImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_expand "builtin_maxsw4" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "TARGET_MAX" -{ - alpha_expand_builtin_vector_binop (gen_smaxv4hi3, V4HImode, operands[0], - operands[1], operands[2]); - DONE; -}) - -(define_insn "builtin_perr" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "%rJ") - (match_operand:DI 2 "reg_or_8bit_operand" "rJ")] - UNSPEC_PERR))] - "TARGET_MAX" - "perr %r1,%r2,%0" - [(set_attr "type" "mvi")]) - -(define_expand "builtin_pklb" - [(set (match_operand:DI 0 "register_operand" "") - (vec_concat:V8QI - (vec_concat:V4QI - (truncate:V2QI (match_operand:DI 1 "register_operand" "")) - (match_dup 2)) - (match_dup 3)))] - "TARGET_MAX" -{ - operands[0] = gen_lowpart (V8QImode, operands[0]); - operands[1] = gen_lowpart (V2SImode, operands[1]); - operands[2] = CONST0_RTX (V2QImode); - operands[3] = CONST0_RTX (V4QImode); -}) - -(define_insn "*pklb" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_concat:V8QI - (vec_concat:V4QI - (truncate:V2QI (match_operand:V2SI 1 "register_operand" "r")) - (match_operand:V2QI 2 "const0_operand" "")) - (match_operand:V4QI 3 "const0_operand" "")))] - "TARGET_MAX" - "pklb %r1,%0" - [(set_attr "type" "mvi")]) - -(define_expand "builtin_pkwb" - [(set (match_operand:DI 0 "register_operand" "") - (vec_concat:V8QI - (truncate:V4QI (match_operand:DI 1 "register_operand" "")) - (match_dup 2)))] - "TARGET_MAX" -{ - operands[0] = gen_lowpart (V8QImode, operands[0]); - operands[1] = gen_lowpart (V4HImode, operands[1]); - operands[2] = CONST0_RTX (V4QImode); -}) - -(define_insn "*pkwb" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_concat:V8QI - (truncate:V4QI (match_operand:V4HI 1 "register_operand" "r")) - (match_operand:V4QI 2 "const0_operand" "")))] - "TARGET_MAX" - "pkwb %r1,%0" - [(set_attr "type" "mvi")]) - -(define_expand "builtin_unpkbl" - [(set (match_operand:DI 0 "register_operand" "") - (zero_extend:V2SI - (vec_select:V2QI (match_operand:DI 1 "register_operand" "") - (parallel [(const_int 0) (const_int 1)]))))] - "TARGET_MAX" -{ - operands[0] = gen_lowpart (V2SImode, operands[0]); - operands[1] = gen_lowpart (V8QImode, operands[1]); -}) - -(define_insn "*unpkbl" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (zero_extend:V2SI - (vec_select:V2QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") - (parallel [(const_int 0) (const_int 1)]))))] - "TARGET_MAX" - "unpkbl %r1,%0" - [(set_attr "type" "mvi")]) - -(define_expand "builtin_unpkbw" - [(set (match_operand:DI 0 "register_operand" "") - (zero_extend:V4HI - (vec_select:V4QI (match_operand:DI 1 "register_operand" "") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3)]))))] - "TARGET_MAX" -{ - operands[0] = gen_lowpart (V4HImode, operands[0]); - operands[1] = gen_lowpart (V8QImode, operands[1]); -}) - -(define_insn "*unpkbw" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (zero_extend:V4HI - (vec_select:V4QI (match_operand:V8QI 1 "reg_or_0_operand" "rW") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3)]))))] - "TARGET_MAX" - "unpkbw %r1,%0" - [(set_attr "type" "mvi")]) - -(define_expand "builtin_cttz" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI [(match_operand:DI 1 "register_operand" "")] - UNSPEC_CTTZ))] - "TARGET_CIX" - "") - -(define_insn "builtin_ctlz" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "register_operand" "r")] - UNSPEC_CTLZ))] - "TARGET_CIX" - "ctlz %1,%0" - [(set_attr "type" "mvi")]) - -(define_insn "builtin_ctpop" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "register_operand" "r")] - UNSPEC_CTPOP))] - "TARGET_CIX" - "ctpop %1,%0" - [(set_attr "type" "mvi")]) - -;; The call patterns are at the end of the file because their -;; wildcard operand0 interferes with nice recognition. - -(define_insn "*call_value_osf_1_er" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "c,R,s")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - jsr $26,(%1),0\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%* - bsr $26,%1\t\t!samegp - ldq $27,%1($29)\t\t!literal!%#\;jsr $26,($27),0\t\t!lituse_jsr!%#\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*" - [(set_attr "type" "jsr") - (set_attr "length" "12,*,16")]) - -;; We must use peep2 instead of a split because we need accurate life -;; information for $gp. Consider the case of { bar(); while (1); }. -(define_peephole2 - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))])] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed - && ! samegp_function_operand (operands[1], Pmode) - && (peep2_regno_dead_p (1, 29) - || find_reg_note (insn, REG_NORETURN, NULL_RTX))" - [(parallel [(set (match_dup 0) - (call (mem:DI (match_dup 3)) - (match_dup 2))) - (set (reg:DI 26) (plus:DI (pc) (const_int 4))) - (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) - (use (match_dup 1)) - (use (match_dup 4))])] -{ - if (CONSTANT_P (operands[1])) - { - operands[3] = gen_rtx_REG (Pmode, 27); - operands[4] = GEN_INT (alpha_next_sequence_number++); - emit_insn (gen_movdi_er_high_g (operands[3], pic_offset_table_rtx, - operands[1], operands[4])); - } - else - { - operands[3] = operands[1]; - operands[1] = const0_rtx; - operands[4] = const0_rtx; - } -}) - -(define_peephole2 - [(parallel [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))])] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && reload_completed - && ! samegp_function_operand (operands[1], Pmode) - && ! (peep2_regno_dead_p (1, 29) - || find_reg_note (insn, REG_NORETURN, NULL_RTX))" - [(parallel [(set (match_dup 0) - (call (mem:DI (match_dup 3)) - (match_dup 2))) - (set (reg:DI 26) (plus:DI (pc) (const_int 4))) - (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) - (use (match_dup 1)) - (use (match_dup 5))]) - (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))] -{ - if (CONSTANT_P (operands[1])) - { - operands[3] = gen_rtx_REG (Pmode, 27); - operands[5] = GEN_INT (alpha_next_sequence_number++); - emit_insn (gen_movdi_er_high_g (operands[3], pic_offset_table_rtx, - operands[1], operands[5])); - } - else - { - operands[3] = operands[1]; - operands[1] = const0_rtx; - operands[5] = const0_rtx; - } - operands[4] = GEN_INT (alpha_next_sequence_number++); -}) - -;; We add a blockage unspec_volatile to prevent insns from moving down -;; from above the call to in between the call and the ldah gpdisp. -(define_insn "*call_value_osf_2_er" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "register_operand" "c")) - (match_operand 2 "" ""))) - (set (reg:DI 26) - (plus:DI (pc) (const_int 4))) - (unspec_volatile [(reg:DI 29)] UNSPECV_BLOCKAGE) - (use (match_operand 3 "" "")) - (use (match_operand 4 "" ""))] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "jsr $26,(%1),%3%J4" - [(set_attr "type" "jsr") - (set_attr "cannot_copy" "true")]) - -(define_insn "*call_value_osf_1_noreturn" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "c,R,s")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))] - "! TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF - && find_reg_note (insn, REG_NORETURN, NULL_RTX)" - "@ - jsr $26,($27),0%+ - bsr $26,$%1..ng%+ - jsr $26,%1%+" - [(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")) - (match_operand 2 "" ""))) - (use (reg:DI 29)) - (clobber (reg:DI 26))] - "! TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - jsr $26,($27),0\;ldgp $29,0($26) - bsr $26,$%1..ng - jsr $26,%1\;ldgp $29,0($26)" - [(set_attr "type" "jsr") - (set_attr "length" "12,*,16")]) - -(define_insn "*sibcall_value_osf_1_er" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "symbolic_operand" "R,s")) - (match_operand 2 "" ""))) - (unspec [(reg:DI 29)] UNSPEC_SIBCALL)] - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - br $31,%1\t\t!samegp - ldq $27,%1($29)\t\t!literal!%#\;jmp $31,($27),%1\t\t!lituse_jsr!%#" - [(set_attr "type" "jsr") - (set_attr "length" "*,8")]) - -(define_insn "*sibcall_value_osf_1" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "symbolic_operand" "R,s")) - (match_operand 2 "" ""))) - (unspec [(reg:DI 29)] UNSPEC_SIBCALL)] - "! TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" - "@ - br $31,$%1..ng - lda $27,%1\;jmp $31,($27),%1" - [(set_attr "type" "jsr") - (set_attr "length" "*,8")]) - -(define_insn "*call_value_nt_1" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "r,R,s")) - (match_operand 2 "" ""))) - (clobber (reg:DI 26))] - "TARGET_ABI_WINDOWS_NT" - "@ - jsr $26,(%1) - bsr $26,%1 - jsr $26,%1" - [(set_attr "type" "jsr") - (set_attr "length" "*,*,12")]) - -; GAS relies on the order and position of instructions output below in order -; to generate relocs for VMS link to potentially optimize the call. -; Please do not molest. -(define_insn "*call_value_vms_1" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "r,s")) - (match_operand 2 "" ""))) - (use (match_operand:DI 3 "nonmemory_operand" "r,n")) - (use (reg:DI 25)) - (use (reg:DI 26)) - (clobber (reg:DI 27))] - "TARGET_ABI_OPEN_VMS" -{ - switch (which_alternative) - { - case 0: - return "mov %3,$27\;jsr $26,0\;ldq $27,0($29)"; - case 1: - operands [3] = alpha_use_linkage (operands [1], cfun->decl, 1, 0); - operands [4] = alpha_use_linkage (operands [1], cfun->decl, 0, 0); - return "ldq $26,%4\;ldq $27,%3\;jsr $26,%1\;ldq $27,0($29)"; - default: - abort(); - } -} - [(set_attr "type" "jsr") - (set_attr "length" "12,16")]) - -(define_insn "*call_value_umk" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:DI 1 "call_operand" "r")) - (match_operand 2 "" ""))) - (use (reg:DI 25)) - (clobber (reg:DI 26))] - "TARGET_ABI_UNICOSMK" - "jsr $26,(%1)" - [(set_attr "type" "jsr")]) diff --git a/contrib/gcc/config/alpha/crtfastmath.c b/contrib/gcc/config/alpha/crtfastmath.c deleted file mode 100644 index 4651ee7..0000000 --- a/contrib/gcc/config/alpha/crtfastmath.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2001 Free Software Foundation, Inc. - * Contributed by Richard Henderson (rth@redhat.com) - * - * This file is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * In addition to the permissions in the GNU General Public License, the - * Free Software Foundation gives you unlimited permission to link the - * compiled version of this file with other programs, and to distribute - * those programs without any restriction coming from the use of this - * file. (The General Public License restrictions do apply in other - * respects; for example, they cover modification of the file, and - * distribution when not linked into another program.) - * - * This file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * As a special exception, if you link this library with files - * compiled with GCC to produce an executable, this does not cause - * the resulting executable to be covered by the GNU General Public License. - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - */ - -/* Assume OSF/1 compatible interfaces. */ - -extern void __ieee_set_fp_control (unsigned long int); - -#define IEEE_MAP_DMZ (1UL<<12) /* Map denorm inputs to zero */ -#define IEEE_MAP_UMZ (1UL<<13) /* Map underflowed outputs to zero */ - -static void __attribute__((constructor)) -set_fast_math (void) -{ - __ieee_set_fp_control (IEEE_MAP_DMZ | IEEE_MAP_UMZ); -} diff --git a/contrib/gcc/config/alpha/elf.h b/contrib/gcc/config/alpha/elf.h deleted file mode 100644 index 34bba3e..0000000 --- a/contrib/gcc/config/alpha/elf.h +++ /dev/null @@ -1,457 +0,0 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. - Contributed by Richard Henderson (rth@tamu.edu). - -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. */ - -#undef OBJECT_FORMAT_COFF -#undef EXTENDED_COFF -#define OBJECT_FORMAT_ELF - -/* ??? Move all SDB stuff from alpha.h to osf.h. */ -#undef SDB_DEBUGGING_INFO - -#define DBX_DEBUGGING_INFO 1 -#define DWARF2_DEBUGGING_INFO 1 - -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG - -#undef ASM_FINAL_SPEC - -/* alpha/ doesn't use elfos.h for some reason. */ -#define TARGET_OBJFMT_CPP_BUILTINS() \ - do \ - { \ - builtin_define ("__ELF__"); \ - } \ - while (0) - -#undef CC1_SPEC -#define CC1_SPEC "%{G*}" - -#undef ASM_SPEC -#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" - -#undef IDENT_ASM_OP -#define IDENT_ASM_OP "\t.ident\t" - -/* Output #ident as a .ident. */ -#undef ASM_OUTPUT_IDENT -#define ASM_OUTPUT_IDENT(FILE, NAME) \ - fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME); - -/* This is how to allocate empty space in some section. The .zero - pseudo-op is used for this on most svr4 assemblers. */ - -#undef SKIP_ASM_OP -#define SKIP_ASM_OP "\t.zero\t" - -#undef ASM_OUTPUT_SKIP -#define ASM_OUTPUT_SKIP(FILE, SIZE) \ - fprintf (FILE, "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n", SKIP_ASM_OP, (SIZE)) - -/* Output the label which precedes a jumptable. Note that for all svr4 - systems where we actually generate jumptables (which is to say every - svr4 target except i386, where we use casesi instead) we put the jump- - tables into the .rodata section and since other stuff could have been - put into the .rodata section prior to any given jumptable, we have to - make sure that the location counter for the .rodata section gets pro- - perly re-aligned prior to the actual beginning of the jump table. */ - -#undef ALIGN_ASM_OP -#define ALIGN_ASM_OP "\t.align\t" - -#ifndef ASM_OUTPUT_BEFORE_CASE_LABEL -#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \ - ASM_OUTPUT_ALIGN ((FILE), 2); -#endif - -#undef ASM_OUTPUT_CASE_LABEL -#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE) \ - do { \ - ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE) \ - (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); \ - } while (0) - -/* The standard SVR4 assembler seems to require that certain builtin - library routines (e.g. .udiv) be explicitly declared as .globl - in each assembly file where they are referenced. */ - -#undef ASM_OUTPUT_EXTERNAL_LIBCALL -#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ - (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)) - -/* This says how to output assembler code to declare an - uninitialized external linkage data object. Under SVR4, - the linker seems to want the alignment of data objects - to depend on their types. We do exactly that here. */ - -#undef COMMON_ASM_OP -#define COMMON_ASM_OP "\t.comm\t" - -#undef ASM_OUTPUT_ALIGNED_COMMON -#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ -do { \ - fprintf ((FILE), "%s", COMMON_ASM_OP); \ - assemble_name ((FILE), (NAME)); \ - fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ -} while (0) - -/* This says how to output assembler code to declare an - uninitialized internal linkage data object. Under SVR4, - the linker seems to want the alignment of data objects - to depend on their types. We do exactly that here. */ - -#undef ASM_OUTPUT_ALIGNED_LOCAL -#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ -do { \ - if ((SIZE) <= g_switch_value) \ - sbss_section(); \ - else \ - bss_section(); \ - ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ - if (!flag_inhibit_size_directive) \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ - ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ - ASM_OUTPUT_LABEL(FILE, NAME); \ - ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ -} while (0) - -/* This says how to output assembler code to declare an - uninitialized external linkage data object. */ - -#undef ASM_OUTPUT_ALIGNED_BSS -#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ -do { \ - ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \ -} while (0) - -/* Biggest alignment supported by the object file format of this - machine. Use this macro to limit the alignment which can be - specified using the `__attribute__ ((aligned (N)))' construct. If - not defined, the default value is `BIGGEST_ALIGNMENT'. - - This value is really 2^63. Since gcc figures the alignment in bits, - we could only potentially get to 2^60 on suitable hosts. Due to other - considerations in varasm, we must restrict this to what fits in an int. */ - -#undef MAX_OFILE_ALIGNMENT -#define MAX_OFILE_ALIGNMENT \ - (1 << (HOST_BITS_PER_INT < 64 ? HOST_BITS_PER_INT - 2 : 62)) - -/* This is the pseudo-op used to generate a contiguous sequence of byte - values from a double-quoted string WITHOUT HAVING A TERMINATING NUL - AUTOMATICALLY APPENDED. This is the same for most svr4 assemblers. */ - -#undef ASCII_DATA_ASM_OP -#define ASCII_DATA_ASM_OP "\t.ascii\t" - -#undef READONLY_DATA_SECTION_ASM_OP -#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata" -#undef BSS_SECTION_ASM_OP -#define BSS_SECTION_ASM_OP "\t.section\t.bss" -#undef SBSS_SECTION_ASM_OP -#define SBSS_SECTION_ASM_OP "\t.section\t.sbss,\"aw\"" -#undef SDATA_SECTION_ASM_OP -#define SDATA_SECTION_ASM_OP "\t.section\t.sdata,\"aw\"" - -/* On svr4, we *do* have support for the .init and .fini sections, and we - can put stuff in there to be executed before and after `main'. We let - crtstuff.c and other files know this by defining the following symbols. - The definitions say how to change sections to the .init and .fini - sections. This is the same for all known svr4 assemblers. */ - -#undef INIT_SECTION_ASM_OP -#define INIT_SECTION_ASM_OP "\t.section\t.init" -#undef FINI_SECTION_ASM_OP -#define FINI_SECTION_ASM_OP "\t.section\t.fini" - -#ifdef HAVE_GAS_SUBSECTION_ORDERING - -#define ASM_SECTION_START_OP "\t.subsection\t-1" - -/* Output assembly directive to move to the beginning of current section. */ -#define ASM_OUTPUT_SECTION_START(FILE) \ - fprintf ((FILE), "%s\n", ASM_SECTION_START_OP) - -#endif - -/* A default list of other sections which we might be "in" at any given - time. For targets that use additional sections (e.g. .tdesc) you - should override this definition in the target-specific file which - includes this file. */ - -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sbss, in_sdata - -/* A default list of extra section function definitions. For targets - that use additional sections (e.g. .tdesc) you should override this - definition in the target-specific file which includes this file. */ - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - 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 (void); -extern void sdata_section (void); - -#undef SECTION_FUNCTION_TEMPLATE -#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \ -void FN (void) \ -{ \ - if (in_section != ENUM) \ - { \ - fprintf (asm_out_file, "%s\n", OP); \ - in_section = ENUM; \ - } \ -} - -/* Switch into a generic section. */ -#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section -#define TARGET_ASM_SELECT_SECTION default_elf_select_section - -#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) - -/* Define the strings used for the special svr4 .type and .size directives. - These strings generally do not vary from one system running svr4 to - another, but if a given system (e.g. m88k running svr) needs to use - different pseudo-op names for these, they may be overridden in the - file which includes this one. */ - -#undef TYPE_ASM_OP -#define TYPE_ASM_OP "\t.type\t" -#undef SIZE_ASM_OP -#define SIZE_ASM_OP "\t.size\t" - -/* This is how we tell the assembler that a symbol is weak. */ - -#undef ASM_WEAKEN_LABEL -#define ASM_WEAKEN_LABEL(FILE, NAME) \ - do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ - fputc ('\n', FILE); } while (0) - -/* This is how we tell the assembler that two symbols have the same value. */ - -#undef ASM_OUTPUT_DEF -#define ASM_OUTPUT_DEF(FILE, ALIAS, NAME) \ - do { \ - assemble_name(FILE, ALIAS); \ - fputs(" = ", FILE); \ - assemble_name(FILE, NAME); \ - fputc('\n', FILE); \ - } while (0) - -#undef ASM_OUTPUT_DEF_FROM_DECLS -#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \ - do { \ - const char *alias = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ - const char *name = IDENTIFIER_POINTER (TARGET); \ - if (TREE_CODE (DECL) == FUNCTION_DECL) \ - { \ - fputc ('$', FILE); \ - assemble_name (FILE, alias); \ - fputs ("..ng = $", FILE); \ - assemble_name (FILE, name); \ - fputs ("..ng\n", FILE); \ - } \ - assemble_name(FILE, alias); \ - fputs(" = ", FILE); \ - assemble_name(FILE, name); \ - fputc('\n', FILE); \ - } while (0) - -/* The following macro defines the format used to output the second - operand of the .type assembler directive. Different svr4 assemblers - expect various different forms for this operand. The one given here - is just a default. You may need to override it in your machine- - specific tm.h file (depending upon the particulars of your assembler). */ - -#undef TYPE_OPERAND_FMT -#define TYPE_OPERAND_FMT "@%s" - -/* Write the extra assembler code needed to declare a function's result. - Most svr4 assemblers don't require any special declaration of the - result value, but there are exceptions. */ - -#ifndef ASM_DECLARE_RESULT -#define ASM_DECLARE_RESULT(FILE, RESULT) -#endif - -/* These macros generate the special .type and .size directives which - are used to set the corresponding fields of the linker symbol table - entries in an ELF object file under SVR4. These macros also output - the starting labels for the relevant functions/objects. */ - -/* Write the extra assembler code needed to declare an object properly. */ - -#undef ASM_DECLARE_OBJECT_NAME -#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ - do { \ - HOST_WIDE_INT size; \ - ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ - size_directive_output = 0; \ - if (!flag_inhibit_size_directive \ - && DECL_SIZE (DECL) \ - && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \ - { \ - size_directive_output = 1; \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ - } \ - ASM_OUTPUT_LABEL(FILE, NAME); \ - } while (0) - -/* Output the size directive for a decl in rest_of_decl_compilation - in the case where we did not do so before the initializer. - Once we find the error_mark_node, we know that the value of - size_directive_output was set - by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ - -#undef ASM_FINISH_DECLARE_OBJECT -#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ - do { \ - const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ - HOST_WIDE_INT size; \ - if (!flag_inhibit_size_directive \ - && DECL_SIZE (DECL) \ - && ! AT_END && TOP_LEVEL \ - && DECL_INITIAL (DECL) == error_mark_node \ - && !size_directive_output \ - && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \ - { \ - size_directive_output = 1; \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ - } \ - } while (0) - -/* A table of bytes codes used by the ASM_OUTPUT_ASCII and - ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table - corresponds to a particular byte value [0..255]. For any - given byte value, if the value in the corresponding table - position is zero, the given character can be output directly. - If the table value is 1, the byte must be output as a \ooo - octal escape. If the tables value is anything else, then the - byte value should be output as a \ followed by the value - in the table. Note that we can use standard UN*X escape - sequences for many control characters, but we don't use - \a to represent BEL because some svr4 assemblers (e.g. on - the i386) don't know about that. Also, we don't use \v - since some versions of gas, such as 2.2 did not accept it. */ - -#undef ESCAPES -#define ESCAPES \ -"\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -\0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ -\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\ -\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\ -\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\ -\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1" - -/* Some svr4 assemblers have a limit on the number of characters which - can appear in the operand of a .string directive. If your assembler - has such a limitation, you should define STRING_LIMIT to reflect that - limit. Note that at least some svr4 assemblers have a limit on the - actual number of bytes in the double-quoted string, and that they - count each character in an escape sequence as one byte. Thus, an - escape sequence like \377 would count as four bytes. - - If your target assembler doesn't support the .string directive, you - should define this to zero. */ - -#undef STRING_LIMIT -#define STRING_LIMIT ((unsigned) 256) -#undef STRING_ASM_OP -#define STRING_ASM_OP "\t.string\t" - -/* GAS is the only Alpha/ELF assembler. */ -#undef TARGET_GAS -#define TARGET_GAS (1) - -/* Provide a STARTFILE_SPEC appropriate for ELF. Here we add the - (even more) magical crtbegin.o file which provides part of the - support for getting C++ file-scope static object constructed - before entering `main'. */ - -#undef STARTFILE_SPEC -#ifdef HAVE_LD_PIE -#define STARTFILE_SPEC \ - "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -#else -#define STARTFILE_SPEC \ - "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -#endif - -/* Provide a ENDFILE_SPEC appropriate for ELF. Here we tack on the - magical crtend.o file which provides part of the support for - getting C++ file-scope static object constructed before entering - `main', followed by a normal ELF "finalizer" file, `crtn.o'. */ - -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ - "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ - %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" - -/* We support #pragma. */ -#define HANDLE_SYSV_PRAGMA 1 - -/* Select a format to encode pointers in exception handling data. CODE - is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is - true if the symbol may be affected by dynamic relocations. - - Since application size is already constrained to <2GB by the form of - the ldgp relocation, we can use a 32-bit pc-relative relocation to - static data. Dynamic data is accessed indirectly to allow for read - only EH sections. */ -#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ - (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) - -/* If defined, a C statement to be executed just prior to the output of - assembler code for INSN. */ -#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ - (alpha_this_literal_sequence_number = 0, \ - alpha_this_gpdisp_sequence_number = 0) -extern int alpha_this_literal_sequence_number; -extern int alpha_this_gpdisp_sequence_number; - -/* Since the bits of the _init and _fini function is spread across - many object files, each potentially with its own GP, we must assume - we need to load our GP. Further, the .init/.fini section can - easily be more than 4MB away from the function to call so we can't - use bsr. */ -#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ - asm (SECTION_OP "\n" \ -" br $29,1f\n" \ -"1: ldgp $29,0($29)\n" \ -" unop\n" \ -" jsr $26," USER_LABEL_PREFIX #FUNC "\n" \ -" .align 3\n" \ -" .previous"); - -/* If we have the capability create headers for efficient EH lookup. - As of Jan 2002, only glibc 2.2.4 can actually make use of this, but - I imagine that other systems will catch up. In the meantime, it - doesn't harm to make sure that the data exists to be used later. */ -#if defined(HAVE_LD_EH_FRAME_HDR) -#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -#endif diff --git a/contrib/gcc/config/alpha/ev4.md b/contrib/gcc/config/alpha/ev4.md deleted file mode 100644 index cee3ae6..0000000 --- a/contrib/gcc/config/alpha/ev4.md +++ /dev/null @@ -1,147 +0,0 @@ -;; Scheduling description for Alpha EV4. -;; Copyright (C) 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. - -; 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 deleted file mode 100644 index 20757e1..0000000 --- a/contrib/gcc/config/alpha/ev5.md +++ /dev/null @@ -1,190 +0,0 @@ -;; Scheduling description for Alpha EV5. -;; Copyright (C) 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. - -;; 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 deleted file mode 100644 index 23a09b0..0000000 --- a/contrib/gcc/config/alpha/ev6.md +++ /dev/null @@ -1,173 +0,0 @@ -;; Scheduling description for Alpha EV6. -;; Copyright (C) 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. - -; 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 deleted file mode 100644 index 0b29361..0000000 --- a/contrib/gcc/config/alpha/freebsd.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Definitions for DEC Alpha/AXP running FreeBSD using the ELF format - Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. - Contributed by David E. O'Brien and BSDi. - -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. */ - - -#undef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS \ - { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } - -/* Provide a FBSD_TARGET_CPU_CPP_BUILTINS and CPP_SPEC appropriate for - FreeBSD/alpha. Besides the dealing with - the GCC option `-posix', and PIC issues as on all FreeBSD platforms, we must - deal with the Alpha's FP issues. */ - -#undef FBSD_TARGET_CPU_CPP_BUILTINS -#define FBSD_TARGET_CPU_CPP_BUILTINS() \ - do \ - { \ - if (flag_pic) \ - { \ - builtin_define ("__PIC__"); \ - builtin_define ("__pic__"); \ - } \ - } \ - while (0) - -#undef CPP_SPEC -#define CPP_SPEC "%(cpp_subtarget) %{posix:-D_POSIX_SOURCE}" - -#define LINK_SPEC "%{G*} %{relax:-relax} \ - %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ - %{Wl,*:%*} \ - %{assert*} %{R*} %{rpath*} %{defsym*} \ - %{shared:-Bshareable %{h*} %{soname*}} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ - %{static:-Bstatic}} \ - %{symbolic:-Bsymbolic}" - - -/************************[ Target stuff ]***********************************/ - -/* Define the actual types of some ANSI-mandated types. - Needs to agree with . GCC defaults come from c-decl.c, - c-common.c, and config//.h. */ - -/* alpha.h gets this wrong for FreeBSD. We use the GCC defaults instead. */ -#undef WCHAR_TYPE - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE 32 - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (FreeBSD/alpha ELF)"); - -#define TARGET_ELF 1 - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS) - -#undef HAS_INIT_SECTION - -/* Show that we need a GP when profiling. */ -#undef TARGET_PROFILING_NEEDS_GP -#define TARGET_PROFILING_NEEDS_GP 1 - -/* This is the char to use for continuation (in case we need to turn - continuation back on). */ - -#undef DBX_CONTIN_CHAR -#define DBX_CONTIN_CHAR '?' - -/* Don't default to pcc-struct-return, we want to retain compatibility with - older FreeBSD releases AND pcc-struct-return may not be reentrant. */ - -#undef DEFAULT_PCC_STRUCT_RETURN -#define DEFAULT_PCC_STRUCT_RETURN 0 diff --git a/contrib/gcc/config/alpha/gnu.h b/contrib/gcc/config/alpha/gnu.h deleted file mode 100644 index 40348c6..0000000 --- a/contrib/gcc/config/alpha/gnu.h +++ /dev/null @@ -1,26 +0,0 @@ -/* 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 { \ - HURD_TARGET_OS_CPP_BUILTINS(); \ - builtin_define ("_LONGLONG"); \ - } 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/lib1funcs.asm b/contrib/gcc/config/alpha/lib1funcs.asm deleted file mode 100644 index a2abb1f..0000000 --- a/contrib/gcc/config/alpha/lib1funcs.asm +++ /dev/null @@ -1,320 +0,0 @@ -/* DEC Alpha division and remainder support. - Copyright (C) 1994, 1999 Free Software Foundation, Inc. - -This file is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combine -executable.) - -This file is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* This had to be written in assembler because the division functions - use a non-standard calling convention. - - This file provides an implementation of __divqu, __divq, __divlu, - __divl, __remqu, __remq, __remlu and __reml. CPP macros control - the exact operation. - - Operation performed: $27 := $24 o $25, clobber $28, return address to - caller in $23, where o one of the operations. - - The following macros need to be defined: - - SIZE, the number of bits, 32 or 64. - - TYPE, either UNSIGNED or SIGNED - - OPERATION, either DIVISION or REMAINDER - - SPECIAL_CALLING_CONVENTION, 0 or 1. It is useful for debugging to - define this to 0. That removes the `__' prefix to make the function - name not collide with the existing libc.a names, and uses the - standard Alpha procedure calling convention. -*/ - -#ifndef SPECIAL_CALLING_CONVENTION -#define SPECIAL_CALLING_CONVENTION 1 -#endif - -#ifdef L_divl -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __divl -#else -#define FUNCTION_NAME divl -#endif -#define SIZE 32 -#define TYPE SIGNED -#define OPERATION DIVISION -#endif - -#ifdef L_divlu -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __divlu -#else -#define FUNCTION_NAME divlu -#endif -#define SIZE 32 -#define TYPE UNSIGNED -#define OPERATION DIVISION -#endif - -#ifdef L_divq -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __divq -#else -#define FUNCTION_NAME divq -#endif -#define SIZE 64 -#define TYPE SIGNED -#define OPERATION DIVISION -#endif - -#ifdef L_divqu -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __divqu -#else -#define FUNCTION_NAME divqu -#endif -#define SIZE 64 -#define TYPE UNSIGNED -#define OPERATION DIVISION -#endif - -#ifdef L_reml -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __reml -#else -#define FUNCTION_NAME reml -#endif -#define SIZE 32 -#define TYPE SIGNED -#define OPERATION REMAINDER -#endif - -#ifdef L_remlu -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __remlu -#else -#define FUNCTION_NAME remlu -#endif -#define SIZE 32 -#define TYPE UNSIGNED -#define OPERATION REMAINDER -#endif - -#ifdef L_remq -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __remq -#else -#define FUNCTION_NAME remq -#endif -#define SIZE 64 -#define TYPE SIGNED -#define OPERATION REMAINDER -#endif - -#ifdef L_remqu -#if SPECIAL_CALLING_CONVENTION -#define FUNCTION_NAME __remqu -#else -#define FUNCTION_NAME remqu -#endif -#define SIZE 64 -#define TYPE UNSIGNED -#define OPERATION REMAINDER -#endif - -#define tmp0 $3 -#define tmp1 $28 -#define cnt $1 -#define result_sign $2 - -#if SPECIAL_CALLING_CONVENTION -#define N $24 -#define D $25 -#define Q RETREG -#define RETREG $27 -#else -#define N $16 -#define D $17 -#define Q RETREG -#define RETREG $0 -#endif - -/* Misc symbols to make alpha assembler easier to read. */ -#define zero $31 -#define sp $30 - -/* Symbols to make interface nicer. */ -#define UNSIGNED 0 -#define SIGNED 1 -#define DIVISION 0 -#define REMAINDER 1 - - .set noreorder - .set noat -.text - .align 3 - .globl FUNCTION_NAME - .ent FUNCTION_NAME -FUNCTION_NAME: - - .frame $30,0,$26,0 - .prologue 0 - -/* Under the special calling convention, we have to preserve all register - values but $23 and $28. */ -#if SPECIAL_CALLING_CONVENTION - lda sp,-64(sp) -#if OPERATION == DIVISION - stq N,0(sp) -#endif - stq D,8(sp) - stq cnt,16(sp) - stq result_sign,24(sp) - stq tmp0,32(sp) -#endif - -/* If we are computing the remainder, move N to the register that is used - for the return value, and redefine what register is used for N. */ -#if OPERATION == REMAINDER - bis N,N,RETREG -#undef N -#define N RETREG -#endif - -/* Perform conversion from 32 bit types to 64 bit types. */ -#if SIZE == 32 -#if TYPE == SIGNED - /* If there are problems with the signed case, add these instructions. - The caller should already have done this. - addl N,0,N # sign extend N - addl D,0,D # sign extend D - */ -#else /* UNSIGNED */ - zap N,0xf0,N # zero extend N (caller required to sign extend) - zap D,0xf0,D # zero extend D -#endif -#endif - -/* Check for divide by zero. */ - bne D,$34 - lda $16,-2(zero) - call_pal 0xaa -$34: - -#if TYPE == SIGNED -#if OPERATION == DIVISION - xor N,D,result_sign -#else - bis N,N,result_sign -#endif -/* Get the absolute values of N and D. */ - subq zero,N,tmp0 - cmovlt N,tmp0,N - subq zero,D,tmp0 - cmovlt D,tmp0,D -#endif - -/* Compute CNT = ceil(log2(N)) - ceil(log2(D)). This is the number of - divide iterations we will have to perform. Should you wish to optimize - this, check a few bits at a time, preferably using zap/zapnot. Be - careful though, this code runs fast fro the most common cases, when the - quotient is small. */ - bge N,$35 - bis zero,1,cnt - blt D,$40 - .align 3 -$39: addq D,D,D - addl cnt,1,cnt - bge D,$39 - br zero,$40 -$35: cmpult N,D,tmp0 - bis zero,zero,cnt - bne tmp0,$42 - .align 3 -$44: addq D,D,D - cmpult N,D,tmp0 - addl cnt,1,cnt - beq tmp0,$44 -$42: srl D,1,D -$40: - subl cnt,1,cnt - - -/* Actual divide. Could be optimized with unrolling. */ -#if OPERATION == DIVISION - bis zero,zero,Q -#endif - blt cnt,$46 - .align 3 -$49: cmpule D,N,tmp1 - subq N,D,tmp0 - srl D,1,D - subl cnt,1,cnt - cmovne tmp1,tmp0,N -#if OPERATION == DIVISION - addq Q,Q,Q - bis Q,tmp1,Q -#endif - bge cnt,$49 -$46: - - -/* The result is now in RETREG. NOTE! It was written to RETREG using - either N or Q as a synonym! */ - - -/* Change the sign of the result as needed. */ -#if TYPE == SIGNED - subq zero,RETREG,tmp0 - cmovlt result_sign,tmp0,RETREG -#endif - - -/* Restore clobbered registers. */ -#if SPECIAL_CALLING_CONVENTION -#if OPERATION == DIVISION - ldq N,0(sp) -#endif - ldq D,8(sp) - ldq cnt,16(sp) - ldq result_sign,24(sp) - ldq tmp0,32(sp) - - lda sp,64(sp) -#endif - - -/* Sign extend an *unsigned* 32 bit result, as required by the Alpha - conventions. */ -#if TYPE == UNSIGNED && SIZE == 32 - /* This could be avoided by adding some CPP hair to the divide loop. - It is probably not worth the added complexity. */ - addl RETREG,0,RETREG -#endif - - -#if SPECIAL_CALLING_CONVENTION - ret zero,($23),1 -#else - ret zero,($26),1 -#endif - .end FUNCTION_NAME diff --git a/contrib/gcc/config/alpha/linux-elf.h b/contrib/gcc/config/alpha/linux-elf.h deleted file mode 100644 index 025b9a2..0000000 --- a/contrib/gcc/config/alpha/linux-elf.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Definitions of target machine for GNU compiler - for Alpha Linux-based GNU systems using ELF. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. - Contributed by Richard Henderson. - -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. */ - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ELF)"); - -#undef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS \ -{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, - -#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" - -#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}}" - -#undef LIB_SPEC -#define LIB_SPEC \ -"%{pthread:-lpthread} %{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}} " - -#define TARGET_ASM_FILE_END file_end_indicate_exec_stack diff --git a/contrib/gcc/config/alpha/linux.h b/contrib/gcc/config/alpha/linux.h deleted file mode 100644 index a4bc3d3..0000000 --- a/contrib/gcc/config/alpha/linux.h +++ /dev/null @@ -1,124 +0,0 @@ -/* Definitions of target machine for GNU compiler, - for Alpha Linux-based GNU systems. - Copyright (C) 1996, 1997, 1998, 2002, 2003 Free Software Foundation, Inc. - Contributed by Richard Henderson. - -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. */ - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS) - -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define ("__gnu_linux__"); \ - builtin_define ("_LONGLONG"); \ - builtin_define_std ("linux"); \ - builtin_define_std ("unix"); \ - builtin_assert ("system=linux"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=posix"); \ - /* The GNU C++ standard library requires this. */ \ - if (c_dialect_cxx ()) \ - builtin_define ("_GNU_SOURCE"); \ - } while (0) - -#undef LIB_SPEC -#define LIB_SPEC \ - "%{pthread:-lpthread} \ - %{shared:-lc} \ - %{!shared: %{profile:-lc_p}%{!profile:-lc}}" - -/* Show that we need a GP when profiling. */ -#undef TARGET_PROFILING_NEEDS_GP -#define TARGET_PROFILING_NEEDS_GP 1 - -/* Don't care about faults in the prologue. */ -#undef TARGET_CAN_FAULT_IN_PROLOGUE -#define TARGET_CAN_FAULT_IN_PROLOGUE 1 - -/* OS fixes up EV5 data fault on prefetch. */ -#undef TARGET_FIXUP_EV5_PREFETCH -#define TARGET_FIXUP_EV5_PREFETCH 1 - -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -/* Define this so that all GNU/Linux targets handle the same pragmas. */ -#define HANDLE_PRAGMA_PACK_PUSH_POP - -/* Determine whether the the entire c99 runtime is present in the - runtime library. */ -#define TARGET_C99_FUNCTIONS 1 - -#define TARGET_HAS_F_SETLKW - -#define LINK_GCC_C_SEQUENCE_SPEC \ - "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" - -/* Do code reading to identify a signal frame, and set the frame - state data appropriately. See unwind-dw2.c for the structs. */ - -#ifdef IN_LIBGCC2 -#include -#include -#endif - -#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ - do { \ - unsigned int *pc_ = (CONTEXT)->ra; \ - struct sigcontext *sc_; \ - long new_cfa_, i_; \ - \ - if (pc_[0] != 0x47fe0410 /* mov $30,$16 */ \ - || pc_[2] != 0x00000083 /* callsys */) \ - break; \ - if ((CONTEXT)->cfa == 0) \ - break; \ - if (pc_[1] == 0x201f0067) /* lda $0,NR_sigreturn */ \ - sc_ = (CONTEXT)->cfa; \ - else if (pc_[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ \ - { \ - struct rt_sigframe { \ - struct siginfo info; \ - struct ucontext uc; \ - } *rt_ = (CONTEXT)->cfa; \ - sc_ = &rt_->uc.uc_mcontext; \ - } \ - else \ - break; \ - new_cfa_ = sc_->sc_regs[30]; \ - (FS)->cfa_how = CFA_REG_OFFSET; \ - (FS)->cfa_reg = 30; \ - (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \ - for (i_ = 0; i_ < 30; ++i_) \ - { \ - (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[i_].loc.offset \ - = (long)&sc_->sc_regs[i_] - new_cfa_; \ - } \ - for (i_ = 0; i_ < 31; ++i_) \ - { \ - (FS)->regs.reg[i_+32].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[i_+32].loc.offset \ - = (long)&sc_->sc_fpregs[i_] - new_cfa_; \ - } \ - (FS)->regs.reg[64].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[64].loc.offset = (long)&sc_->sc_pc - new_cfa_; \ - (FS)->retaddr_column = 64; \ - goto SUCCESS; \ - } while (0) diff --git a/contrib/gcc/config/alpha/netbsd.h b/contrib/gcc/config/alpha/netbsd.h deleted file mode 100644 index d4f833a..0000000 --- a/contrib/gcc/config/alpha/netbsd.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Definitions of target machine for GNU compiler, - for Alpha NetBSD systems. - Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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. */ - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS) - -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - NETBSD_OS_CPP_BUILTINS_ELF(); \ - } 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. */ -#undef TARGET_PROFILING_NEEDS_GP -#define TARGET_PROFILING_NEEDS_GP 1 - - -/* Provide a CPP_SUBTARGET_SPEC appropriate for NetBSD/alpha. We use - this to pull in CPP specs that all NetBSD configurations need. */ - -#undef CPP_SUBTARGET_SPEC -#define CPP_SUBTARGET_SPEC NETBSD_CPP_SPEC - -#undef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS \ - { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \ - { "netbsd_entry_point", NETBSD_ENTRY_POINT }, \ - { "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC }, - - -/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target. */ - -#undef LINK_SPEC -#define LINK_SPEC \ - "%{G*} %{relax:-relax} \ - %{O*:-O3} %{!O*:-O1} \ - %(netbsd_link_spec)" - -#define NETBSD_ENTRY_POINT "__start" - - -/* Provide an ENDFILE_SPEC appropriate for NetBSD/alpha ELF. Here we - add crtend.o, which provides part of the support for getting - C++ file-scope static objects deconstructed after exiting "main". - - We also need to handle the GCC option `-ffast-math'. */ - -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ - "%{ffast-math|funsafe-math-optimizations:crtfm%O%s} \ - %(netbsd_endfile_spec)" - - -/* Attempt to enable execute permissions on the stack. */ - -#define ENABLE_EXECUTE_STACK NETBSD_ENABLE_EXECUTE_STACK - - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (NetBSD/alpha ELF)"); diff --git a/contrib/gcc/config/alpha/openbsd.h b/contrib/gcc/config/alpha/openbsd.h deleted file mode 100644 index b9df2e4..0000000 --- a/contrib/gcc/config/alpha/openbsd.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Configuration file for an alpha OpenBSD target. - Copyright (C) 1999, 2003 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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. */ - -/* We settle for little endian for now. */ -#define TARGET_ENDIAN_DEFAULT 0 - -/* Controlling the compilation driver. */ - -/* alpha needs __start. */ -#undef LINK_SPEC -#define LINK_SPEC \ - "%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{assert*}" - -/* run-time target specifications */ -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define ("__OpenBSD__"); \ - builtin_define ("__ANSI_COMPAT"); \ - builtin_define ("__unix__"); \ - builtin_assert ("system=unix"); \ - } while (0) - -/* Layout of source language data types. */ - -/* This must agree with */ -#undef SIZE_TYPE -#define SIZE_TYPE "long unsigned int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "long int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE 32 - - -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - -#define LOCAL_LABEL_PREFIX "." - -/* We don't have an init section yet. */ -#undef HAS_INIT_SECTION - -/* collect2 support (assembler format: macros for initialization). */ - -/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld - library with the proper functions to handle this -> collect2 will - default to using nm. */ -#undef OBJECT_FORMAT_COFF -#undef EXTENDED_COFF - -/* Assembler format: exception region output. */ - -/* All configurations that don't use elf must be explicit about not using - dwarf unwind information. */ -#ifdef INCOMING_RETURN_ADDR_RTX -#undef DWARF2_UNWIND_INFO -#define DWARF2_UNWIND_INFO 0 -#endif - -/* Assembler format: label output. */ - -/* alpha ecoff supports only weak aliases. */ -#undef ASM_WEAKEN_LABEL -#define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS (FILE,NAME,0) - -#define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \ - do { \ - fputs ("\t.weakext\t", FILE); \ - assemble_name (FILE, NAME); \ - if (VALUE) \ - { \ - fputs (" , ", FILE); \ - assemble_name (FILE, VALUE); \ - } \ - fputc ('\n', FILE); \ - } while (0) - - diff --git a/contrib/gcc/config/alpha/osf.h b/contrib/gcc/config/alpha/osf.h deleted file mode 100644 index 1ae6db3..0000000 --- a/contrib/gcc/config/alpha/osf.h +++ /dev/null @@ -1,214 +0,0 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, - 2004 Free Software Foundation, Inc. - Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* As of OSF 4.0, as can subtract adjacent labels. */ - -#undef TARGET_AS_CAN_SUBTRACT_LABELS -#define TARGET_AS_CAN_SUBTRACT_LABELS 1 - -/* The GEM libraries for X_float are present, though not used by C. */ - -#undef TARGET_HAS_XFLOATING_LIBS -#define TARGET_HAS_XFLOATING_LIBS 1 - -/* Names to predefine in the preprocessor for this target machine. */ - -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define_std ("unix"); \ - builtin_define_std ("SYSTYPE_BSD"); \ - builtin_define ("_SYSTYPE_BSD"); \ - builtin_define ("__osf__"); \ - builtin_define ("__digital__"); \ - builtin_define ("__arch64__"); \ - builtin_define ("_LONGLONG"); \ - builtin_define ("__PRAGMA_EXTERN_PREFIX"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=xpg4"); \ - /* Tru64 UNIX V5 has a 16 byte long \ - double type and requires __X_FLOAT \ - to be defined for . */ \ - if (LONG_DOUBLE_TYPE_SIZE == 128) \ - builtin_define ("__X_FLOAT"); \ - \ - /* Tru64 UNIX V4/V5 provide several ISO C94 \ - features protected by the corresponding \ - __STDC_VERSION__ macro. libstdc++ v3 \ - needs them as well. */ \ - if (c_dialect_cxx ()) \ - builtin_define ("__STDC_VERSION__=199409L"); \ - } 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 - doesn't invade the users' namespace. */ - -#undef CPP_SUBTARGET_SPEC -#define CPP_SUBTARGET_SPEC \ -"%{pthread|threads:-D_REENTRANT} %{threads:-D_PTHREAD_USE_D4}" - -/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */ - -#define LIB_SPEC \ -"%{p|pg:-lprof1%{pthread|threads:_r} -lpdf} %{a:-lprof2} \ - %{threads: -lpthreads} %{pthread|threads: -lpthread -lmach -lexc} -lc" - -/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are - optimizing, -O1 if we are not. Pass -S to silence `weak symbol - multiply defined' warnings. Pass -shared, -non_shared or - -call_shared as appropriate. Pass -hidden_symbol so that our - constructor and call-frame data structures are not accidentally - overridden. */ -#define LINK_SPEC \ - "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \ - %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \ - %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}" - -#define STARTFILE_SPEC \ - "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" - -#define ENDFILE_SPEC \ - "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" - -#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" - -/* Tru64 UNIX V5.1 requires a special as flag. Empty by default. */ - -#define ASM_OLDAS_SPEC "" - -/* In OSF/1 v3.2c, the assembler by default does not output file names which - causes mips-tfile to fail. Passing -g to the assembler fixes this problem. - ??? Strictly speaking, we need -g only if the user specifies -g. Passing - it always means that we get slightly larger than necessary object files - if the user does not specify -g. If we don't pass -g, then mips-tfile - will need to be fixed to work in this case. Pass -O0 since some - optimization are broken and don't help us anyway. Pass -nocpp because - there's no point in running CPP on our assembler output. */ -#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 -#define ASM_SPEC "%{malpha-as:-g %(asm_oldas) -nocpp %{pg} -O0}" -#else -#define ASM_SPEC "%{!mgas:-g %(asm_oldas) -nocpp %{pg} -O0}" -#endif - -/* Specify to run a post-processor, mips-tfile after the assembler - has run to stuff the ecoff debug information into the object file. - This is needed because the Alpha assembler provides no way - of specifying such information in the assembly file. */ - -#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0 - -#define ASM_FINAL_SPEC "\ -%{malpha-as: %{!mno-mips-tfile: \ - \n mips-tfile %{v*: -v} \ - %{K: -I %b.o~} \ - %{!K: %{save-temps: -I %b.o~}} \ - %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ - %{.s:%i} %{!.s:%g.s}}}" - -#else -#define ASM_FINAL_SPEC "\ -%{!mgas: %{!mno-mips-tfile: \ - \n mips-tfile %{v*: -v} \ - %{K: -I %b.o~} \ - %{!K: %{save-temps: -I %b.o~}} \ - %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ - %{.s:%i} %{!.s:%g.s}}}" - -#endif - -#undef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS { "asm_oldas", ASM_OLDAS_SPEC } - -/* Indicate that we have a stamp.h to use. */ -#ifndef CROSS_COMPILE -#define HAVE_STAMP_H 1 -#endif - -/* Attempt to turn on access permissions for the stack. */ - -#define ENABLE_EXECUTE_STACK \ -void \ -__enable_execute_stack (void *addr) \ -{ \ - extern int mprotect (const void *, size_t, int); \ - long size = getpagesize (); \ - long mask = ~(size-1); \ - char *page = (char *) (((long) addr) & mask); \ - char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \ - \ - /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \ - if (mprotect (page, end - page, 7) < 0) \ - perror ("mprotect of trampoline code"); \ -} - -/* Digital UNIX V4.0E (1091)/usr/include/sys/types.h 4.3.49.9 1997/08/14 */ -#define SIZE_TYPE "long unsigned int" -#define PTRDIFF_TYPE "long int" - -/* The linker will stick __main into the .init section. */ -#define HAS_INIT_SECTION -#define LD_INIT_SWITCH "-init" -#define LD_FINI_SWITCH "-fini" - -/* The linker needs a space after "-o". This allows -oldstyle_liblookup to - be passed to ld. */ -#define SWITCHES_NEED_SPACES "o" - -/* Select a format to encode pointers in exception handling data. CODE - is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is - true if the symbol may be affected by dynamic relocations. - - We really ought to be using the SREL32 relocations that ECOFF has, - but no version of the native assembler supports creating such things, - and Compaq has no plans to rectify this. Worse, the dynamic loader - cannot handle unaligned relocations, so we have to make sure that - things get padded appropriately. */ -#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ - (TARGET_GAS \ - ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \ - : DW_EH_PE_aligned) - -/* This is how we tell the assembler that a symbol is weak. */ - -#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \ - do \ - { \ - (*targetm.asm_out.globalize_label) (FILE, NAME); \ - fputs ("\t.weakext\t", FILE); \ - assemble_name (FILE, NAME); \ - if (VALUE) \ - { \ - fputc (' ', FILE); \ - assemble_name (FILE, VALUE); \ - } \ - fputc ('\n', FILE); \ - } \ - while (0) - -#define ASM_WEAKEN_LABEL(FILE, NAME) ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, 0) - -/* Handle #pragma weak and #pragma pack. */ -#define HANDLE_SYSV_PRAGMA 1 - -/* Handle #pragma extern_prefix. Technically only needed for Tru64 5.x, - but easier to manipulate preprocessor bits from here. */ -#define HANDLE_PRAGMA_EXTERN_PREFIX 1 diff --git a/contrib/gcc/config/alpha/osf5.h b/contrib/gcc/config/alpha/osf5.h deleted file mode 100644 index e96ae7e..0000000 --- a/contrib/gcc/config/alpha/osf5.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha on Tru64 5. - Copyright (C) 2000, 2001, 2004 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. */ - -/* Tru64 5.1 uses IEEE QUAD format. */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_FP | MASK_FPREGS | MASK_LONG_DOUBLE_128 - -/* In Tru64 UNIX V5.1, Compaq introduced a new assembler - (/usr/lib/cmplrs/cc/adu) which currently (versions between 3.04.29 and - 3.04.32) breaks mips-tfile. Passing the undocumented -oldas flag reverts - to using the old assembler (/usr/lib/cmplrs/cc/as[01]). - - The V5.0 and V5.0A assemblers silently ignore -oldas, so it can be - specified here. - - It is clearly not desirable to depend on this undocumented flag, and - Compaq wants -oldas to go away soon, but until they have released a - new adu that works with mips-tfile, this is the only option. - - In some versions of the DTK, the assembler driver invokes ld after - assembly. This has been fixed in current versions, but adding -c - works as expected for all versions. */ - -#undef ASM_OLDAS_SPEC -#define ASM_OLDAS_SPEC "-oldas -c" - -/* The linker appears to perform invalid code optimizations that result - in the ldgp emitted for the exception_receiver pattern being incorrectly - linked. */ -#undef TARGET_LD_BUGGY_LDGP -#define TARGET_LD_BUGGY_LDGP 1 - -/* Tru64 v5.1 has the float and long double forms of math functions. */ -#undef TARGET_C99_FUNCTIONS -#define TARGET_C99_FUNCTIONS 1 - diff --git a/contrib/gcc/config/alpha/qrnnd.asm b/contrib/gcc/config/alpha/qrnnd.asm deleted file mode 100644 index da9c4bc..0000000 --- a/contrib/gcc/config/alpha/qrnnd.asm +++ /dev/null @@ -1,167 +0,0 @@ - # Alpha 21064 __udiv_qrnnd - # Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc. - - # This file is part of GCC. - - # The GNU MP Library is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or (at your - # option) any later version. - - # In addition to the permissions in the GNU General Public License, the - # Free Software Foundation gives you unlimited permission to link the - # compiled version of this file with other programs, and to distribute - # those programs without any restriction coming from the use of this - # file. (The General Public License restrictions do apply in other - # respects; for example, they cover modification of the file, and - # distribution when not linked into another program.) - - # This file is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 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, Inc., 59 Temple Place - Suite 330, Boston, - # MA 02111-1307, USA. - -#ifdef __ELF__ -.section .note.GNU-stack,"" -#endif - - .set noreorder - .set noat - - .text - - .globl __udiv_qrnnd - .ent __udiv_qrnnd -__udiv_qrnnd: - .frame $30,0,$26,0 - .prologue 0 - -#define cnt $2 -#define tmp $3 -#define rem_ptr $16 -#define n1 $17 -#define n0 $18 -#define d $19 -#define qb $20 -#define AT $at - - ldiq cnt,16 - blt d,$largedivisor - -$loop1: cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule d,n1,qb - subq n1,d,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule d,n1,qb - subq n1,d,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule d,n1,qb - subq n1,d,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule d,n1,qb - subq n1,d,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - subq cnt,1,cnt - bgt cnt,$loop1 - stq n1,0(rem_ptr) - bis $31,n0,$0 - ret $31,($26),1 - -$largedivisor: - and n0,1,$4 - - srl n0,1,n0 - sll n1,63,tmp - or tmp,n0,n0 - srl n1,1,n1 - - and d,1,$6 - srl d,1,$5 - addq $5,$6,$5 - -$loop2: cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule $5,n1,qb - subq n1,$5,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule $5,n1,qb - subq n1,$5,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule $5,n1,qb - subq n1,$5,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - cmplt n0,0,tmp - addq n1,n1,n1 - bis n1,tmp,n1 - addq n0,n0,n0 - cmpule $5,n1,qb - subq n1,$5,tmp - cmovne qb,tmp,n1 - bis n0,qb,n0 - subq cnt,1,cnt - bgt cnt,$loop2 - - addq n1,n1,n1 - addq $4,n1,n1 - bne $6,$Odd - stq n1,0(rem_ptr) - bis $31,n0,$0 - ret $31,($26),1 - -$Odd: - /* q' in n0. r' in n1 */ - addq n1,n0,n1 - - cmpult n1,n0,tmp # tmp := carry from addq - subq n1,d,AT - addq n0,tmp,n0 - cmovne tmp,AT,n1 - - cmpult n1,d,tmp - addq n0,1,AT - cmoveq tmp,AT,n0 - subq n1,d,AT - cmoveq tmp,AT,n1 - - stq n1,0(rem_ptr) - bis $31,n0,$0 - ret $31,($26),1 - - .end __udiv_qrnnd diff --git a/contrib/gcc/config/alpha/t-alpha b/contrib/gcc/config/alpha/t-alpha deleted file mode 100644 index d0b58d6..0000000 --- a/contrib/gcc/config/alpha/t-alpha +++ /dev/null @@ -1,2 +0,0 @@ -# This is a support routine for longlong.h, used by libgcc2.c. -LIB2FUNCS_EXTRA = $(srcdir)/config/alpha/qrnnd.asm diff --git a/contrib/gcc/config/alpha/t-crtfm b/contrib/gcc/config/alpha/t-crtfm deleted file mode 100644 index 5ca8c3f..0000000 --- a/contrib/gcc/config/alpha/t-crtfm +++ /dev/null @@ -1,5 +0,0 @@ -EXTRA_PARTS += crtfastmath.o - -crtfastmath.o: $(srcdir)/config/alpha/crtfastmath.c $(GCC_PASSES) - $(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/t-ieee b/contrib/gcc/config/alpha/t-ieee deleted file mode 100644 index fe549df..0000000 --- a/contrib/gcc/config/alpha/t-ieee +++ /dev/null @@ -1,2 +0,0 @@ -# All alphas get an IEEE complaint set of libraries. -TARGET_LIBGCC2_CFLAGS += -mieee diff --git a/contrib/gcc/config/alpha/t-osf-pthread b/contrib/gcc/config/alpha/t-osf-pthread deleted file mode 100644 index 968e65c..0000000 --- a/contrib/gcc/config/alpha/t-osf-pthread +++ /dev/null @@ -1,5 +0,0 @@ -# Provide dummy POSIX threads functions -LIB2FUNCS_EXTRA += $(srcdir)/gthr-posix.c - -# Compile libgcc2 with POSIX threads supports -TARGET_LIBGCC2_CFLAGS=-pthread diff --git a/contrib/gcc/config/alpha/t-osf4 b/contrib/gcc/config/alpha/t-osf4 deleted file mode 100644 index 58ce6c2..0000000 --- a/contrib/gcc/config/alpha/t-osf4 +++ /dev/null @@ -1,30 +0,0 @@ -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = -fPIC - -# Compile libgcc2.a with pic. -TARGET_LIBGCC2_CFLAGS = -fPIC - -# Build a shared libgcc library. -SHLIB_EXT = .so -SHLIB_NAME = @shlib_base_name@.so -SHLIB_SONAME = @shlib_base_name@.so.1 -SHLIB_OBJS = @shlib_objs@ - -# Hide all POSIX threads related symbols provided by gthr-posix.c. This -# only has an effect if t-osf-pthread is in use. -SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ - -Wl,-hidden_symbol,pthread\* -Wl,-hidden_symbol,__pthread\* \ - -Wl,-hidden_symbol,sched_get_\* -Wl,-hidden_symbol,sched_yield \ - -Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \ - -o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \ - rm -f $(SHLIB_SONAME) && \ - if [ -f $(SHLIB_NAME) ]; then \ - mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \ - else true; fi && \ - mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ - $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME) -# $(slibdir) double quoted to protect it from expansion while building -# libgcc.mk. We want this delayed until actual install time. -SHLIB_INSTALL = $(INSTALL_DATA) $(SHLIB_NAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_SONAME); \ - rm -f $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME); \ - $(LN_S) $(SHLIB_SONAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME) diff --git a/contrib/gcc/config/alpha/t-unicosmk b/contrib/gcc/config/alpha/t-unicosmk deleted file mode 100644 index 9c52b98..0000000 --- a/contrib/gcc/config/alpha/t-unicosmk +++ /dev/null @@ -1,2 +0,0 @@ -# This file is empty for now. - diff --git a/contrib/gcc/config/alpha/t-vms b/contrib/gcc/config/alpha/t-vms deleted file mode 100644 index 516d3ec..0000000 --- a/contrib/gcc/config/alpha/t-vms +++ /dev/null @@ -1,26 +0,0 @@ -LIB2FUNCS_EXTRA = $(srcdir)/config/alpha/vms_tramp.asm - -# VMS_EXTRA_PARTS is defined in x-vms and represent object files that -# are only needed for VMS targets, but can only be compiled on a VMS host -# (because they need DEC C). -EXTRA_PARTS = vms-dwarf2.o vms-dwarf2eh.o $(VMS_EXTRA_PARTS) - -# This object must be linked with in order to make the executable debuggable. -# vms-ld handles it automatically when passed -g. -vms-dwarf2.o : $(srcdir)/config/alpha/vms-dwarf2.asm - gcc -c -x assembler $< -o $@ - -vms-dwarf2eh.o : $(srcdir)/config/alpha/vms-dwarf2eh.asm - gcc -c -x assembler $< -o $@ - -# Assemble startup files. -vcrt0.o: $(CRT0_S) $(GCC_PASSES) - decc -c /names=as_is $(srcdir)/config/alpha/vms-crt0.c -o vcrt0.o - -pcrt0.o: $(CRT0_S) $(GCC_PASSES) - decc -c /names=as_is $(srcdir)/config/alpha/vms-psxcrt0.c -o pcrt0.o - -MULTILIB_OPTIONS = mcpu=ev6 -MULTILIB_DIRNAMES = ev6 -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib diff --git a/contrib/gcc/config/alpha/t-vms64 b/contrib/gcc/config/alpha/t-vms64 deleted file mode 100644 index e3fc3be..0000000 --- a/contrib/gcc/config/alpha/t-vms64 +++ /dev/null @@ -1,8 +0,0 @@ -# Assemble startup files. -vcrt0.o: $(CRT0_S) $(GCC_PASSES) - decc -c /names=as_is /pointer_size=64 \ - $(srcdir)/config/alpha/vms-crt0-64.c -o vcrt0.o - -pcrt0.o: $(CRT0_S) $(GCC_PASSES) - decc -c /names=as_is /pointer_size=64 \ - $(srcdir)/config/alpha/vms-psxcrt0-64.c -o pcrt0.o diff --git a/contrib/gcc/config/alpha/unicosmk.h b/contrib/gcc/config/alpha/unicosmk.h deleted file mode 100644 index 9d966d6..0000000 --- a/contrib/gcc/config/alpha/unicosmk.h +++ /dev/null @@ -1,501 +0,0 @@ -/* Definitions of target machine for GNU compiler, for DEC Alpha on Cray - T3E running Unicos/Mk. - Copyright (C) 2001, 2002 - Free Software Foundation, Inc. - Contributed by Roman Lechtchinsky (rl@cs.tu-berlin.de) - -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. */ - -#undef TARGET_ABI_UNICOSMK -#define TARGET_ABI_UNICOSMK 1 - -/* CAM requires a slash before floating-pointing instruction suffixes. */ - -#undef TARGET_AS_SLASH_BEFORE_SUFFIX -#define TARGET_AS_SLASH_BEFORE_SUFFIX 1 - -/* The following defines are necessary for the standard headers to work - correctly. */ - -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define ("__unix"); \ - builtin_define ("_UNICOS=205"); \ - builtin_define ("_CRAY"); \ - builtin_define ("_CRAYT3E"); \ - builtin_define ("_CRAYMPP"); \ - builtin_define ("_CRAYIEEE"); \ - builtin_define ("_ADDR64"); \ - builtin_define ("_LD64"); \ - builtin_define ("__UNICOSMK__"); \ - } while (0) - -#define SHORT_TYPE_SIZE 32 - -#undef INT_TYPE_SIZE -#define INT_TYPE_SIZE 64 - -/* This is consistent with the definition Cray CC uses. */ -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE 64 - -/* -#define SIZE_TYPE "unsigned int" -#define PTRDIFF_TYPE "int" -*/ - -/* Alphas are operated in big endian mode on the Cray T3E. */ - -#undef BITS_BIG_ENDIAN -#undef BYTES_BIG_ENDIAN -#undef WORDS_BIG_ENDIAN -#define BITS_BIG_ENDIAN 0 -#define BYTES_BIG_ENDIAN 1 -#define WORDS_BIG_ENDIAN 1 - - -/* Every structure's size must be a multiple of this. */ - -#undef STRUCTURE_SIZE_BOUNDARY -#define STRUCTURE_SIZE_BOUNDARY 64 - -/* No data type wants to be aligned rounder than this. */ - -#undef BIGGEST_ALIGNMENT -#define BIGGEST_ALIGNMENT 256 - -/* Include the frame pointer in fixed_regs and call_used_regs as it can't be - used as a general-purpose register even in frameless functions. - ??? The global_regs hack is needed for now because -O2 sometimes tries to - eliminate $15 increments/decrements in frameless functions. */ - -#undef CONDITIONAL_REGISTER_USAGE -#define CONDITIONAL_REGISTER_USAGE \ - do { \ - fixed_regs[15] = 1; \ - call_used_regs[15] = 1; \ - global_regs[15] = 1; \ - } while(0) - -/* The stack frame grows downward. */ - -#define FRAME_GROWS_DOWNWARD - -/* Define the offset between two registers, one to be eliminated, and the - other its replacement, at the start of a routine. This is somewhat - complicated on the T3E which is why we use a function. */ - -#undef INITIAL_ELIMINATION_OFFSET -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - do { \ - (OFFSET) = unicosmk_initial_elimination_offset ((FROM), (TO)); \ - } while (0) - - -/* Define this if stack space is still allocated for a parameter passed - in a register. On the T3E, stack space is preallocated for all outgoing - arguments, including those passed in registers. To avoid problems, we - assume that at least 48 bytes (i.e. enough space for all arguments passed - in registers) are allocated. */ - -#define REG_PARM_STACK_SPACE(DECL) 48 -#define OUTGOING_REG_PARM_STACK_SPACE - -/* If an argument can't be passed in registers even though not all argument - registers have been used yet, it is passed on the stack in the space - preallocated for these registers. */ - -#define STACK_PARMS_IN_REG_PARM_AREA - -/* This evaluates to nonzero if we do not know how to pass TYPE solely in - registers. This is the case for all arguments that do not fit in two - registers. */ - -#define MUST_PASS_IN_STACK(MODE,TYPE) \ - ((TYPE) != 0 \ - && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ - || (TREE_ADDRESSABLE (TYPE) || ALPHA_ARG_SIZE (MODE, TYPE, 0) > 2))) - -/* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - On Unicos/Mk, this is a structure that contains various information for - the static subroutine information block (SSIB) and the call information - word (CIW). */ - -typedef struct { - - /* The overall number of arguments. */ - int num_args; - - /* The overall size of the arguments in words. */ - int num_arg_words; - - /* The number of words passed in registers. */ - int num_reg_words; - - /* If an argument must be passed in the stack, all subsequent arguments - must be passed there, too. This flag indicates whether this is the - case. */ - int force_stack; - - /* This array indicates whether a word is passed in an integer register or - a floating point one. */ - - /* For each of the 6 register arguments, the corresponding flag in this - array indicates whether the argument is passed in an integer or a - floating point register. */ - int reg_args_type[6]; - -} unicosmk_arg_info; - -#undef CUMULATIVE_ARGS -#define CUMULATIVE_ARGS unicosmk_arg_info - -/* 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. */ - -#undef INIT_CUMULATIVE_ARGS -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ - do { (CUM).num_args = 0; \ - (CUM).num_arg_words = 0; \ - (CUM).num_reg_words = 0; \ - (CUM).force_stack = 0; \ - } while(0) - -/* Update the data in CUM to advance over an argument of mode MODE and data - type TYPE. (TYPE is null for libcalls where that information may not be - available.) - - On Unicos/Mk, at most 6 words can be passed in registers. Structures - which fit in two words are passed in registers, larger structures are - passed on stack. */ - -#undef FUNCTION_ARG_ADVANCE -#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ -do { \ - int size; \ - \ - size = ALPHA_ARG_SIZE (MODE, TYPE, NAMED); \ - \ - if (size > 2 || MUST_PASS_IN_STACK (MODE, TYPE) \ - || (CUM).num_reg_words + size > 6) \ - (CUM).force_stack = 1; \ - \ - if (! (CUM).force_stack) \ - { \ - int i; \ - int isfloat; \ - isfloat = (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \ - || GET_MODE_CLASS (MODE) == MODE_FLOAT); \ - for (i = 0; i < size; i++) \ - { \ - (CUM).reg_args_type[(CUM).num_reg_words] = isfloat; \ - ++(CUM).num_reg_words; \ - } \ - } \ - (CUM).num_arg_words += size; \ - ++(CUM).num_args; \ -} while(0) - -/* An argument is passed either entirely in registers or entirely on stack. */ - -#undef FUNCTION_ARG_PARTIAL_NREGS -/* #define FUNCTION_ARG_PARTIAL_NREGS(CUM,MODE,TYPE,NAMED) 0 */ - -/* This ensures that $15 increments/decrements in leaf functions won't get - eliminated. */ - -#undef EPILOGUE_USES -#define EPILOGUE_USES(REGNO) ((REGNO) == 26 || (REGNO) == 15) - -/* Would have worked, only the stack doesn't seem to be executable -#undef TRAMPOLINE_TEMPLATE -#define TRAMPOLINE_TEMPLATE(FILE) \ -do { fprintf (FILE, "\tbr $1,0\n"); \ - fprintf (FILE, "\tldq $0,12($1)\n"); \ - fprintf (FILE, "\tldq $1,20($1)\n"); \ - fprintf (FILE, "\tjmp $31,(r0)\n"); \ - fprintf (FILE, "\tbis $31,$31,$31\n"); \ - fprintf (FILE, "\tbis $31,$31,$31\n"); \ -} while (0) */ - -/* We don't support nested functions (yet). */ - -#undef TRAMPOLINE_TEMPLATE -#define TRAMPOLINE_TEMPLATE(FILE) abort () - -/* Specify the machine mode that this machine uses for the index in the - tablejump instruction. On Unicos/Mk, we don't support relative case - vectors yet, thus the entries should be absolute addresses. */ - -#undef CASE_VECTOR_MODE -#define CASE_VECTOR_MODE DImode - -#undef CASE_VECTOR_PC_RELATIVE - -/* Define this as 1 if `char' should by default be signed; else as 0. */ -/* #define DEFAULT_SIGNED_CHAR 1 */ - -/* The Cray assembler is really weird with respect to sections. It has only - named sections and you can't reopen a section once it has been closed. - This means that we have to generate unique names whenever we want to - reenter the text or the data section. The following is a rather bad hack - as TEXT_SECTION_ASM_OP and DATA_SECTION_ASM_OP are supposed to be - constants. */ - -#undef TEXT_SECTION_ASM_OP -#define TEXT_SECTION_ASM_OP unicosmk_text_section () - -#undef DATA_SECTION_ASM_OP -#define DATA_SECTION_ASM_OP unicosmk_data_section () - -/* There are no read-only sections on Unicos/Mk. */ - -#undef READONLY_DATA_SECTION_ASM_OP -#define READONLY_DATA_SECTION data_section - -/* Define extra sections for common data and SSIBs (static subroutine - information blocks). The actual section header is output by the callers - of these functions. */ - -#undef EXTRA_SECTIONS -#undef EXTRA_SECTION_FUNCTIONS - -#define EXTRA_SECTIONS in_common, in_ssib -#define EXTRA_SECTION_FUNCTIONS \ -COMMON_SECTION \ -SSIB_SECTION - -extern void common_section (void); -#define COMMON_SECTION \ -void \ -common_section (void) \ -{ \ - in_section = in_common; \ -} - -extern void ssib_section (void); -#define SSIB_SECTION \ -void \ -ssib_section (void) \ -{ \ - in_section = in_ssib; \ -} - -/* We take care of this in unicosmk_file_start. */ - -#undef ASM_OUTPUT_SOURCE_FILENAME - -/* This is how to output a label for a jump table. Arguments are the same as - for (*targetm.asm_out.internal_label), except the insn for the jump table is - passed. */ - -#undef ASM_OUTPUT_CASE_LABEL -#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \ - (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM) - -/* CAM has some restrictions with respect to string literals. It won't - accept lines with more that 256 characters which means that we have - to split long strings. Moreover, it only accepts escape sequences of - the form \nnn in the range 0 to 127. We generate .byte directives for - escapes characters greater than 127. And finally, ` must be escaped. */ - -#undef ASM_OUTPUT_ASCII -#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ - do { \ - FILE *_hide_asm_out_file = (MYFILE); \ - const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \ - int _hide_thissize = (MYLENGTH); \ - int _size_so_far = 0; \ - { \ - FILE *asm_out_file = _hide_asm_out_file; \ - const unsigned char *p = _hide_p; \ - int thissize = _hide_thissize; \ - int in_ascii = 0; \ - int i; \ - \ - for (i = 0; i < thissize; i++) \ - { \ - register int c = p[i]; \ - \ - if (c > 127) \ - { \ - if (in_ascii) \ - { \ - fprintf (asm_out_file, "\"\n"); \ - in_ascii = 0; \ - } \ - \ - fprintf (asm_out_file, "\t.byte\t%d\n", c); \ - } \ - else \ - { \ - if (! in_ascii) \ - { \ - fprintf (asm_out_file, "\t.ascii\t\""); \ - in_ascii = 1; \ - _size_so_far = 0; \ - } \ - else if (_size_so_far >= 64) \ - { \ - fprintf (asm_out_file, "\"\n\t.ascii\t\""); \ - _size_so_far = 0; \ - } \ - \ - if (c == '\"' || c == '\\' || c == '`') \ - putc ('\\', asm_out_file); \ - if (c >= ' ') \ - putc (c, asm_out_file); \ - else \ - fprintf (asm_out_file, "\\%.3o", c); \ - ++ _size_so_far; \ - } \ - } \ - if (in_ascii) \ - fprintf (asm_out_file, "\"\n"); \ - } \ - } while(0) - -/* This is how to output an element of a case-vector that is absolute. */ - -#undef ASM_OUTPUT_ADDR_VEC_ELT -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.quad $L%d\n", (VALUE)) - -/* This is how to output an element of a case-vector that is relative. - (Unicos/Mk does not use such vectors yet). */ - -#undef ASM_OUTPUT_ADDR_DIFF_ELT -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort () - -/* We can't output case vectors in the same section as the function code - because CAM doesn't allow data definitions in code sections. Thus, we - simply record the case vectors and put them in a separate section after - the function. */ - -#define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \ - unicosmk_defer_case_vector ((LAB),(VEC)) - -#define ASM_OUTPUT_ADDR_DIFF_VEC(LAB,VEC) abort () - -/* This is how to output an assembler line that says to advance the location - counter to a multiple of 2**LOG bytes. Annoyingly, CAM always uses zeroes - to fill the unused space which does not work in code sections. We have to - be careful not to use the .align directive in code sections. */ - -#undef ASM_OUTPUT_ALIGN -#define ASM_OUTPUT_ALIGN(STREAM,LOG) unicosmk_output_align (STREAM, LOG) - -/* This is how to advance the location counter by SIZE bytes. */ - -#undef ASM_OUTPUT_SKIP -#define ASM_OUTPUT_SKIP(STREAM,SIZE) \ - fprintf ((STREAM), "\t.byte\t0:"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\ - (SIZE)); - -/* This says how to output an assembler line to define a global common - symbol. We need the alignment information because it has to be supplied - in the section header. */ - -#undef ASM_OUTPUT_COMMON -#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ - unicosmk_output_common ((FILE), (NAME), (SIZE), (ALIGN)) - -/* This says how to output an assembler line to define a local symbol. */ - -#undef ASM_OUTPUT_LOCAL -#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ - do { data_section (); \ - fprintf (FILE, "\t.align\t%d\n", floor_log2 ((ALIGN) / BITS_PER_UNIT));\ - ASM_OUTPUT_LABEL ((FILE), (NAME)); \ - fprintf (FILE, "\t.byte 0:"HOST_WIDE_INT_PRINT_UNSIGNED"\n",(SIZE));\ - } while (0) - -/* CAM does not allow us to declare a symbol as external first and then - define it in the same file later. Thus, we keep a list of all external - references, remove all symbols defined locally from it and output it at - the end of the asm file. */ - -#define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \ - unicosmk_add_extern ((NAME)) - -#define ASM_OUTPUT_EXTERNAL_LIBCALL(STREAM,SYMREF) \ - unicosmk_add_extern (XSTR ((SYMREF), 0)) - -/* This is how to declare an object. We don't have to output anything if - it is a global variable because those go into unique `common' sections - and the section name is globally visible. For local variables, we simply - output the label. In any case, we have to record that no extern - declaration should be generated for the symbol. */ - -#define ASM_DECLARE_OBJECT_NAME(STREAM,NAME,DECL) \ - do { tree name_tree; \ - name_tree = get_identifier ((NAME)); \ - TREE_ASM_WRITTEN (name_tree) = 1; \ - if (!TREE_PUBLIC (DECL)) \ - { \ - assemble_name (STREAM, NAME); \ - fputs (":\n", STREAM); \ - } \ - } while(0) - -/* -#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \ - unicosmk_output_section_name ((STREAM), (DECL), (NAME), (RELOC)) -*/ - -/* Switch into a generic section. */ -#define TARGET_ASM_NAMED_SECTION unicosmk_asm_named_section - -#undef ASM_OUTPUT_MAX_SKIP_ALIGN -#define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,POWER,MAXSKIP) - -#undef NM_FLAGS - -#undef OBJECT_FORMAT_COFF - -/* We cannot generate debugging information on Unicos/Mk. */ - -#undef SDB_DEBUGGING_INFO -#undef MIPS_DEBUGGING_INFO -#undef DBX_DEBUGGING_INFO -#undef DWARF2_DEBUGGING_INFO -#undef DWARF2_UNWIND_INFO -#undef INCOMING_RETURN_ADDR_RTX -#undef ASM_OUTPUT_SOURCE_LINE - -/* We don't need a start file. */ - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "" - -/* These are the libraries we have to link with. - ??? The Craylibs directory should be autoconfed. */ -#undef LIB_SPEC -#define LIB_SPEC "-L/opt/ctl/craylibs/craylibs -lu -lm -lc -lsma" - -#undef EXPAND_BUILTIN_VA_START -#undef EXPAND_BUILTIN_VA_ARG - -#define EH_FRAME_IN_DATA_SECTION 1 diff --git a/contrib/gcc/config/alpha/va_list.h b/contrib/gcc/config/alpha/va_list.h deleted file mode 100644 index df58ed0..0000000 --- a/contrib/gcc/config/alpha/va_list.h +++ /dev/null @@ -1,19 +0,0 @@ -/* A replacement for Digital Unix's . */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef __builtin_va_list __gnuc_va_list; -#endif - -#if !defined(_VA_LIST) && !defined(_HIDDEN_VA_LIST) -#define _VA_LIST -typedef __gnuc_va_list va_list; - -#elif defined(_HIDDEN_VA_LIST) && !defined(_HIDDEN_VA_LIST_DONE) -#define _HIDDEN_VA_LIST_DONE -typedef __gnuc_va_list __va_list; - -#elif defined(_HIDDEN_VA_LIST) && defined(_VA_LIST) -#undef _HIDDEN_VA_LIST - -#endif diff --git a/contrib/gcc/config/alpha/vms-cc.c b/contrib/gcc/config/alpha/vms-cc.c deleted file mode 100644 index 672a30f..0000000 --- a/contrib/gcc/config/alpha/vms-cc.c +++ /dev/null @@ -1,356 +0,0 @@ -/* VMS DEC C wrapper. - Copyright (C) 2001, 2003 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* This program is a wrapper around the VMS DEC C compiler. - It translates Unix style command line options into corresponding - VMS style qualifiers and then spawns the DEC C compiler. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" - -#undef PATH_SEPARATOR -#undef PATH_SEPARATOR_STR -#define PATH_SEPARATOR ',' -#define PATH_SEPARATOR_STR "," - -/* These can be set by command line arguments */ -static int verbose = 0; -static int save_temps = 0; - -static int comp_arg_max = -1; -static const char **comp_args = 0; -static int comp_arg_index = -1; -static char *objfilename = 0; - -static char *system_search_dirs = (char *) ""; -static char *search_dirs; - -static char *default_defines = (char *) ""; -static char *defines; - -/* Translate a Unix syntax directory specification into VMS syntax. - If indicators of VMS syntax found, return input string. */ -static char *to_host_dir_spec (char *); - -/* Translate a Unix syntax file specification into VMS syntax. - If indicators of VMS syntax found, return input string. */ -static char *to_host_file_spec (char *); - -/* Add a translated arg to the list to be passed to DEC CC. */ -static void addarg (const char *); - -/* Preprocess the number of args in P_ARGC and contained in ARGV. - Look for special flags, etc. that must be handled first. */ -static void preprocess_args (int *, char **); - -/* Process the number of args in P_ARGC and contained in ARGV. Look - for special flags, etc. that must be handled for the VMS compiler. */ -static void process_args (int *, char **); - -/* Action routine called by decc$to_vms */ -static int translate_unix (char *, int); - -/* Add the argument contained in STR to the list of arguments to pass to the - compiler. */ - -static void -addarg (const char *str) -{ - int i; - - if (++comp_arg_index >= comp_arg_max) - { - const char **new_comp_args - = (const char **) xcalloc (comp_arg_max + 1000, sizeof (char *)); - - for (i = 0; i <= comp_arg_max; i++) - new_comp_args [i] = comp_args [i]; - - if (comp_args) - free (comp_args); - - comp_arg_max += 1000; - comp_args = new_comp_args; - } - - comp_args [comp_arg_index] = str; -} - -static void -preprocess_args (int *p_argc, char *argv[]) -{ - int i; - - for (i = 1; i < *p_argc; i++) - { - if (strcmp (argv[i], "-o") == 0) - { - char *buff, *ptr; - - i++; - ptr = to_host_file_spec (argv[i]); - objfilename = xstrdup (ptr); - buff = concat ("/obj=", ptr, NULL); - addarg (buff); - } - } -} - -static void -process_args (int *p_argc, char *argv[]) -{ - int i; - - for (i = 1; i < *p_argc; i++) - { - if (strlen (argv[i]) < 2) - continue; - - if (strncmp (argv[i], "-I", 2) == 0) - { - char *ptr; - int new_len, search_dirs_len; - - ptr = to_host_dir_spec (&argv[i][2]); - new_len = strlen (ptr); - search_dirs_len = strlen (search_dirs); - - search_dirs = xrealloc (search_dirs, search_dirs_len + new_len + 2); - if (search_dirs_len > 0) - strcat (search_dirs, PATH_SEPARATOR_STR); - strcat (search_dirs, ptr); - } - else if (strncmp (argv[i], "-D", 2) == 0) - { - char *ptr; - int new_len, defines_len; - - ptr = &argv[i][2]; - new_len = strlen (ptr); - defines_len = strlen (defines); - - defines = xrealloc (defines, defines_len + new_len + 4); - if (defines_len > 0) - strcat (defines, ","); - - strcat (defines, "\""); - strcat (defines, ptr); - strcat (defines, "\""); - } - else if (strcmp (argv[i], "-v") == 0) - verbose = 1; - else if (strcmp (argv[i], "-g0") == 0) - addarg ("/nodebug"); - else if (strcmp (argv[i], "-O0") == 0) - addarg ("/noopt"); - else if (strncmp (argv[i], "-g", 2) == 0) - addarg ("/debug"); - else if (strcmp (argv[i], "-E") == 0) - addarg ("/preprocess"); - else if (strcmp (argv[i], "-save-temps") == 0) - save_temps = 1; - } -} - -/* The main program. Spawn the VMS DEC C compiler after fixing up the - Unix-like flags and args to be what VMS DEC C wants. */ - -typedef struct dsc {unsigned short len, mbz; char *adr; } Descr; - -int -main (int argc, char **argv) -{ - int i; - char cwdev [128], *devptr; - int devlen; - char *cwd = getcwd (0, 1024); - - devptr = strchr (cwd, ':'); - devlen = (devptr - cwd) + 1; - strncpy (cwdev, cwd, devlen); - cwdev [devlen] = '\0'; - - search_dirs = xstrdup (system_search_dirs); - defines = xstrdup (default_defines); - - addarg ("cc"); - preprocess_args (&argc , argv); - process_args (&argc , argv); - - if (strlen (search_dirs) > 0) - { - addarg ("/include=("); - addarg (search_dirs); - addarg (")"); - } - - if (strlen (defines) > 0) - { - addarg ("/define=("); - addarg (defines); - addarg (")"); - } - - for (i = 1; i < argc; i++) - { - int arg_len = strlen (argv[i]); - - if (strcmp (argv[i], "-o") == 0) - i++; - else if (strcmp (argv[i], "-v" ) == 0 - || strcmp (argv[i], "-E") == 0 - || strcmp (argv[i], "-c") == 0 - || strncmp (argv[i], "-g", 2 ) == 0 - || strncmp (argv[i], "-O", 2 ) == 0 - || strcmp (argv[i], "-save-temps") == 0 - || (arg_len > 2 && strncmp (argv[i], "-I", 2) == 0) - || (arg_len > 2 && strncmp (argv[i], "-D", 2) == 0)) - ; - - /* Unix style file specs and VMS style switches look alike, so assume - an arg consisting of one and only one slash, and that being first, is - really a switch. */ - else if ((argv[i][0] == '/') && (strchr (&argv[i][1], '/') == 0)) - addarg (argv[i]); - else - { - /* Assume filename arg */ - char buff [256], *ptr; - - ptr = to_host_file_spec (argv[i]); - arg_len = strlen (ptr); - - if (ptr[0] == '[') - sprintf (buff, "%s%s", cwdev, ptr); - else if (strchr (ptr, ':')) - sprintf (buff, "%s", ptr); - else - sprintf (buff, "%s%s", cwd, ptr); - - ptr = xstrdup (buff); - addarg (ptr); - } - } - - addarg (NULL); - - if (verbose) - { - int i; - - for (i = 0; i < comp_arg_index; i++) - printf ("%s ", comp_args [i]); - - putchar ('\n'); - } - - { - int i; - int len = 0; - - for (i = 0; comp_args[i]; i++) - len = len + strlen (comp_args[i]) + 1; - - { - char *allargs = (char *) alloca (len + 1); - Descr cmd; - int status; - int status1 = 1; - - for (i = 0; i < len + 1; i++) - allargs [i] = 0; - - for (i = 0; comp_args [i]; i++) - { - strcat (allargs, comp_args [i]); - strcat (allargs, " "); - } - - cmd.adr = allargs; - cmd.len = len; - cmd.mbz = 0; - - i = LIB$SPAWN (&cmd, 0, 0, 0, 0, 0, &status); - - if ((i & 1) != 1) - { - LIB$SIGNAL (i); - exit (1); - } - - if ((status & 1) == 1 && (status1 & 1) == 1) - exit (0); - - exit (1); - } - } -} - -static char new_host_filespec [255]; -static char new_host_dirspec [255]; -static char filename_buff [256]; - -static int -translate_unix (char *name, int type ATTRIBUTE_UNUSED) -{ - strcpy (filename_buff, name); - return 0; -} - -static char * -to_host_dir_spec (char *dirspec) -{ - int len = strlen (dirspec); - - strcpy (new_host_dirspec, dirspec); - - if (strchr (new_host_dirspec, ']') || strchr (new_host_dirspec, ':')) - return new_host_dirspec; - - while (len > 1 && new_host_dirspec [len-1] == '/') - { - new_host_dirspec [len-1] = 0; - len--; - } - - decc$to_vms (new_host_dirspec, translate_unix, 1, 2); - strcpy (new_host_dirspec, filename_buff); - - return new_host_dirspec; - -} - -static char * -to_host_file_spec (char *filespec) -{ - strcpy (new_host_filespec, ""); - if (strchr (filespec, ']') || strchr (filespec, ':')) - strcpy (new_host_filespec, filespec); - else - { - decc$to_vms (filespec, translate_unix, 1, 1); - strcpy (new_host_filespec, filename_buff); - } - - return new_host_filespec; -} diff --git a/contrib/gcc/config/alpha/vms-crt0-64.c b/contrib/gcc/config/alpha/vms-crt0-64.c deleted file mode 100644 index 9792f92..0000000 --- a/contrib/gcc/config/alpha/vms-crt0-64.c +++ /dev/null @@ -1,99 +0,0 @@ -/* VMS 64bit crt0 returning VMS style condition codes . - Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combine -executable.) - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#if !defined(__DECC) -You Lose! This file can only be compiled with DEC C. -#else - -/* This file can only be compiled with DEC C, due to the call to - lib$establish and the pragmas pointer_size. */ - -#pragma __pointer_size short - -#include -#include -#include - -extern void decc$main (); - -extern int main (); - -static int -handler (sigargs, mechargs) - void *sigargs; - void *mechargs; -{ - return SS$_RESIGNAL; -} - -int -__main (arg1, arg2, arg3, image_file_desc, arg5, arg6) - void *arg1, *arg2, *arg3; - void *image_file_desc; - void *arg5, *arg6; -{ - int argc; - char **argv; - char **envp; - -#pragma __pointer_size long - - int i; - char **long_argv; - char **long_envp; - -#pragma __pointer_size short - - lib$establish (handler); - decc$main (arg1, arg2, arg3, image_file_desc, - arg5, arg6, &argc, &argv, &envp); - -#pragma __pointer_size long - - /* Reallocate argv with 64 bit pointers. */ - long_argv = (char **) malloc (sizeof (char *) * (argc + 1)); - - for (i = 0; i < argc; i++) - long_argv[i] = strdup (argv[i]); - - long_argv[argc] = (char *) 0; - - long_envp = (char **) malloc (sizeof (char *) * 5); - - for (i = 0; envp[i]; i++) - long_envp[i] = strdup (envp[i]); - - long_envp[i] = (char *) 0; - -#pragma __pointer_size short - - return main (argc, long_argv, long_envp); -} -#endif diff --git a/contrib/gcc/config/alpha/vms-crt0.c b/contrib/gcc/config/alpha/vms-crt0.c deleted file mode 100644 index 88896c6..0000000 --- a/contrib/gcc/config/alpha/vms-crt0.c +++ /dev/null @@ -1,71 +0,0 @@ -/* VMS crt0 returning VMS style condition codes . - Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combine -executable.) - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#if !defined(__DECC) -You Lose! This file can only be compiled with DEC C. -#else - -/* This file can only be compiled with DEC C, due to the call to - lib$establish. */ - -#include -#include -#include - -extern void decc$main (); - -extern int main (); - -static int -handler (sigargs, mechargs) - void *sigargs; - void *mechargs; -{ - return SS$_RESIGNAL; -} - -int -__main (arg1, arg2, arg3, image_file_desc, arg5, arg6) - void *arg1, *arg2, *arg3; - void *image_file_desc; - void *arg5, *arg6; -{ - int argc; - char **argv; - char **envp; - - lib$establish (handler); - - decc$main(arg1, arg2, arg3, image_file_desc, arg5, arg6, - &argc, &argv, &envp); - - return main (argc, argv, envp); -} -#endif diff --git a/contrib/gcc/config/alpha/vms-dwarf2.asm b/contrib/gcc/config/alpha/vms-dwarf2.asm deleted file mode 100644 index 1f68a80..0000000 --- a/contrib/gcc/config/alpha/vms-dwarf2.asm +++ /dev/null @@ -1,82 +0,0 @@ -/* VMS dwarf2 section sequentializer. - Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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. */ - -/* Linking with this file forces Dwarf2 debug sections to be - sequentially loaded by the VMS linker, enabling GDB to read them. */ - -.section .debug_abbrev,NOWRT - .align 0 - .globl $dwarf2.debug_abbrev -$dwarf2.debug_abbrev: - -.section .debug_aranges,NOWRT - .align 0 - .globl $dwarf2.debug_aranges -$dwarf2.debug_aranges: - -.section .debug_frame,NOWRT - .align 0 - .globl $dwarf2.debug_frame -$dwarf2.debug_frame: - -.section .debug_info,NOWRT - .align 0 - .globl $dwarf2.debug_info -$dwarf2.debug_info: - -.section .debug_line,NOWRT - .align 0 - .globl $dwarf2.debug_line -$dwarf2.debug_line: - -.section .debug_loc,NOWRT - .align 0 - .globl $dwarf2.debug_loc -$dwarf2.debug_loc: - -.section .debug_macinfo,NOWRT - .align 0 - .globl $dwarf2.debug_macinfo -$dwarf2.debug_macinfo: - -.section .debug_pubnames,NOWRT - .align 0 - .globl $dwarf2.debug_pubnames -$dwarf2.debug_pubnames: - -.section .debug_str,NOWRT - .align 0 - .globl $dwarf2.debug_str -$dwarf2.debug_str: - -.section .debug_zzzzzz,NOWRT - .align 0 - .globl $dwarf2.debug_zzzzzz -$dwarf2.debug_zzzzzz: diff --git a/contrib/gcc/config/alpha/vms-dwarf2eh.asm b/contrib/gcc/config/alpha/vms-dwarf2eh.asm deleted file mode 100644 index 2cdbeb1..0000000 --- a/contrib/gcc/config/alpha/vms-dwarf2eh.asm +++ /dev/null @@ -1,37 +0,0 @@ -/* VMS dwarf2 exception handling section sequentializer. - Copyright (C) 2002 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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. */ - -/* Linking with this file forces the Dwarf2 EH section to be - individually loaded by the VMS linker an the unwinder to read it. */ - -.section .eh_frame,NOWRT - .align 0 - .global __EH_FRAME_BEGIN__ -__EH_FRAME_BEGIN__: diff --git a/contrib/gcc/config/alpha/vms-ld.c b/contrib/gcc/config/alpha/vms-ld.c deleted file mode 100644 index cb1d4c9..0000000 --- a/contrib/gcc/config/alpha/vms-ld.c +++ /dev/null @@ -1,764 +0,0 @@ -/* VMS linker wrapper. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* This program is a wrapper around the VMS linker. - It translates Unix style command line options into corresponding - VMS style qualifiers and then spawns the VMS linker. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" - -typedef struct dsc {unsigned short len, mbz; char *adr; } Descr; - -#undef PATH_SEPARATOR -#undef PATH_SEPARATOR_STR -#define PATH_SEPARATOR ',' -#define PATH_SEPARATOR_STR "," - -/* Local variable declarations. */ - -/* File specification for vms-dwarf2.o. */ -static char *vmsdwarf2spec = 0; - -/* File specification for vms-dwarf2eh.o. */ -static char *vmsdwarf2ehspec = 0; - -/* verbose = 1 if -v passed. */ -static int verbose = 0; - -/* save_temps = 1 if -save-temps passed. */ -static int save_temps = 0; - -/* By default don't generate executable file if there are errors - in the link. Override with --noinhibit-exec. */ -static int inhibit_exec = 1; - -/* debug = 1 if -g passed. */ -static int debug = 0; - -/* By default prefer to link with shareable image libraries. - Override with -static. */ -static int staticp = 0; - -/* By default generate an executable, not a shareable image library. - Override with -shared. */ -static int share = 0; - -/* Remember if IDENTIFICATION given on command line. */ -static int ident = 0; - -/* Keep track of arg translations. */ -static int link_arg_max = -1; -static const char **link_args = 0; -static int link_arg_index = -1; - -/* Keep track of filenames */ -static char optfilefullname [267]; -static char *sharefilename = 0; -static char *exefilename = 0; - -/* System search dir list. Leave blank since link handles this - internally. */ -static char *system_search_dirs = ""; - -/* Search dir list passed on command line (with -L). */ -static char *search_dirs; - -/* Local function declarations. */ - -/* Add STR to the list of arguments to pass to the linker. Expand the list as - necessary to accommodate. */ -static void addarg (const char *); - -/* Check to see if NAME is a regular file, i.e. not a directory */ -static int is_regular_file (char *); - -/* Translate a Unix syntax file specification FILESPEC into VMS syntax. - If indicators of VMS syntax found, return input string. */ -static char *to_host_file_spec (char *); - -/* Locate the library named LIB_NAME in the set of paths PATH_VAL. */ -static char *locate_lib (char *, char *); - -/* Given a library name NAME, i.e. foo, Look for libfoo.lib and then - libfoo.a in the set of directories we are allowed to search in. */ -static const char *expand_lib (char *); - -/* Preprocess the number of args P_ARGC in ARGV. - Look for special flags, etc. that must be handled first. */ -static void preprocess_args (int *, char **); - -/* Preprocess the number of args P_ARGC in ARGV. Look for - special flags, etc. that must be handled for the VMS linker. */ -static void process_args (int *, char **); - -/* Action routine called by decc$to_vms. NAME is a file name or - directory name. TYPE is unused. */ -static int translate_unix (char *, int); - -int main (int, char **); - -static void -addarg (const char *str) -{ - int i; - - if (++link_arg_index >= link_arg_max) - { - const char **new_link_args - = (const char **) xcalloc (link_arg_max + 1000, sizeof (char *)); - - for (i = 0; i <= link_arg_max; i++) - new_link_args [i] = link_args [i]; - - if (link_args) - free (link_args); - - link_arg_max += 1000; - link_args = new_link_args; - } - - link_args [link_arg_index] = str; -} - -static char * -locate_lib (char *lib_name, char *path_val) -{ - int lib_len = strlen (lib_name); - char *eptr, *sptr; - - for (sptr = path_val; *sptr; sptr = eptr) - { - char *buf, *ptr; - - while (*sptr == PATH_SEPARATOR) - sptr ++; - - eptr = strchr (sptr, PATH_SEPARATOR); - if (eptr == 0) - eptr = strchr (sptr, 0); - - buf = alloca ((eptr-sptr) + lib_len + 4 + 2); - strncpy (buf, sptr, eptr-sptr); - buf [eptr-sptr] = 0; - strcat (buf, "/"); - strcat (buf, lib_name); - ptr = strchr (buf, 0); - - if (debug || staticp) - { - /* For debug or static links, look for shareable image libraries - last. */ - strcpy (ptr, ".a"); - if (is_regular_file (buf)) - return xstrdup (to_host_file_spec (buf)); - - strcpy (ptr, ".olb"); - if (is_regular_file (buf)) - return xstrdup (to_host_file_spec (buf)); - - strcpy (ptr, ".exe"); - if (is_regular_file (buf)) - return xstrdup (to_host_file_spec (buf)); - } - else - { - /* Otherwise look for shareable image libraries first. */ - strcpy (ptr, ".exe"); - if (is_regular_file (buf)) - return xstrdup (to_host_file_spec (buf)); - - strcpy (ptr, ".a"); - if (is_regular_file (buf)) - return xstrdup (to_host_file_spec (buf)); - - strcpy (ptr, ".olb"); - if (is_regular_file (buf)) - return xstrdup (to_host_file_spec (buf)); - } - } - - return 0; -} - -static const char * -expand_lib (char *name) -{ - char *lib, *lib_path; - - if (strcmp (name, "c") == 0) - /* IEEE VAX C compatible library for non-prefixed (e.g. no DECC$) - C RTL functions. */ - return "sys$library:vaxcrtltx.olb"; - - else if (strcmp (name, "m") == 0) - /* No separate library for math functions */ - return ""; - - else - { - lib = xmalloc (strlen (name) + 14); - - strcpy (lib, "lib"); - strcat (lib, name); - lib_path = locate_lib (lib, search_dirs); - - if (lib_path) - return lib_path; - } - - fprintf (stderr, - "Couldn't locate library: lib%s.exe, lib%s.a or lib%s.olb\n", - name, name, name); - - exit (1); -} - -static int -is_regular_file (char *name) -{ - int ret; - struct stat statbuf; - - ret = stat (name, &statbuf); - return !ret && S_ISREG (statbuf.st_mode); -} - -static void -preprocess_args (int *p_argc, char **argv) -{ - int i; - - for (i = 1; i < *p_argc; i++) - if (strlen (argv[i]) >= 6 && strncmp (argv[i], "-shared", 7) == 0) - share = 1; - - for (i = 1; i < *p_argc; i++) - if (strcmp (argv[i], "-o") == 0) - { - char *buff, *ptr; - int out_len; - int len; - - i++; - ptr = to_host_file_spec (argv[i]); - exefilename = xstrdup (ptr); - out_len = strlen (ptr); - buff = xmalloc (out_len + 18); - - if (share) - strcpy (buff, "/share="); - else - strcpy (buff, "/exe="); - - strcat (buff, ptr); - addarg (buff); - - if (share) - { - sharefilename = xmalloc (out_len+5); - if (ptr == strchr (argv[i], ']')) - strcpy (sharefilename, ++ptr); - else if (ptr == strchr (argv[i], ':')) - strcpy (sharefilename, ++ptr); - else if (ptr == strrchr (argv[i], '/')) - strcpy (sharefilename, ++ptr); - else - strcpy (sharefilename, argv[i]); - - len = strlen (sharefilename); - if (strncasecmp (&sharefilename[len-4], ".exe", 4) == 0) - sharefilename[len-4] = 0; - - for (ptr = sharefilename; *ptr; ptr++) - *ptr = TOUPPER (*ptr); - } - } -} - -static void -process_args (int *p_argc, char **argv) -{ - int i; - - for (i = 1; i < *p_argc; i++) - { - if (strlen (argv[i]) < 2) - continue; - - if (strncmp (argv[i], "-L", 2) == 0) - { - char *nbuff, *ptr; - int new_len, search_dirs_len; - - ptr = &argv[i][2]; - new_len = strlen (ptr); - search_dirs_len = strlen (search_dirs); - - nbuff = xmalloc (new_len + 1); - strcpy (nbuff, ptr); - - /* Remove trailing slashes. */ - while (new_len > 1 && nbuff [new_len - 1] == '/') - { - nbuff [new_len - 1] = 0; - new_len--; - } - - search_dirs = xrealloc (search_dirs, search_dirs_len + new_len + 2); - if (search_dirs_len > 0) - strcat (search_dirs, PATH_SEPARATOR_STR); - - strcat (search_dirs, nbuff); - free (nbuff); - } - - /* -v turns on verbose option here and is passed on to gcc. */ - else if (strcmp (argv[i], "-v") == 0) - verbose = 1; - else if (strcmp (argv[i], "-g0") == 0) - addarg ("/notraceback"); - else if (strncmp (argv[i], "-g", 2) == 0) - { - addarg ("/debug"); - debug = 1; - } - else if (strcmp (argv[i], "-static") == 0) - staticp = 1; - else if (strcmp (argv[i], "-map") == 0) - { - char *buff, *ptr; - - buff = xmalloc (strlen (exefilename) + 5); - strcpy (buff, exefilename); - ptr = strchr (buff, '.'); - if (ptr) - *ptr = 0; - - strcat (buff, ".map"); - addarg ("/map="); - addarg (buff); - addarg ("/full"); - } - else if (strcmp (argv[i], "-save-temps") == 0) - save_temps = 1; - else if (strcmp (argv[i], "--noinhibit-exec") == 0) - inhibit_exec = 0; - } -} - -/* The main program. Spawn the VMS linker after fixing up the Unix-like flags - and args to be what the VMS linker wants. */ - -int -main (int argc, char **argv) -{ - int i; - char cwdev [128], *devptr; - int devlen; - int optfd; - FILE *optfile; - char *cwd = getcwd (0, 1024); - char *optfilename; - - devptr = strchr (cwd, ':'); - devlen = (devptr - cwd) + 1; - strncpy (cwdev, cwd, devlen); - cwdev [devlen] = '\0'; - - search_dirs = xstrdup (system_search_dirs); - - addarg ("link"); - - /* Pass to find args that have to be append first. */ - preprocess_args (&argc , argv); - - /* Pass to find the rest of the args. */ - process_args (&argc , argv); - - /* Create a temp file to hold args, otherwise we can easily exceed the VMS - command line length limits. */ - optfilename = alloca (strlen ("LDXXXXXX") + 1); - strcpy (optfilename, "LDXXXXXX"); - optfd = mkstemp (optfilename); - getcwd (optfilefullname, 256, 1); /* VMS style cwd. */ - strcat (optfilefullname, optfilename); - strcat (optfilefullname, "."); - optfile = fdopen (optfd, "w"); - - /* Write out the IDENTIFICATION argument first so that it can be overridden - by an options file. */ - for (i = 1; i < argc; i++) - { - int arg_len = strlen (argv[i]); - - if (arg_len > 6 && strncasecmp (argv[i], "IDENT=", 6) == 0) - { - /* Comes from command line. If present will always appear before - IDENTIFICATION=... and will override. */ - - if (!ident) - ident = 1; - } - else if (arg_len > 15 - && strncasecmp (argv[i], "IDENTIFICATION=", 15) == 0) - { - /* Comes from pragma Ident (). */ - - if (!ident) - { - fprintf (optfile, "case_sensitive=yes\n"); - fprintf (optfile, "IDENTIFICATION=\"%15.15s\"\n", &argv[i][15]); - fprintf (optfile, "case_sensitive=NO\n"); - ident = 1; - } - } - } - - for (i = 1; i < argc; i++) - { - int arg_len = strlen (argv[i]); - - if (strcmp (argv[i], "-o") == 0) - i++; - else if (arg_len > 2 && strncmp (argv[i], "-l", 2) == 0) - { - const char *libname = expand_lib (&argv[i][2]); - const char *ext; - int len; - - if ((len = strlen (libname)) > 0) - { - char buff [256]; - - if (len > 4 && strcasecmp (&libname [len-4], ".exe") == 0) - ext = "/shareable"; - else - ext = "/library"; - - if (libname[0] == '[') - sprintf (buff, "%s%s", cwdev, libname); - else - sprintf (buff, "%s", libname); - - fprintf (optfile, "%s%s\n", buff, ext); - } - } - - else if (strcmp (argv[i], "-v" ) == 0 - || strncmp (argv[i], "-g", 2 ) == 0 - || strcmp (argv[i], "-static" ) == 0 - || strcmp (argv[i], "-map" ) == 0 - || strcmp (argv[i], "-save-temps") == 0 - || strcmp (argv[i], "--noinhibit-exec") == 0 - || (arg_len > 2 && strncmp (argv[i], "-L", 2) == 0) - || (arg_len >= 6 && strncmp (argv[i], "-share", 6) == 0)) - ; - else if (arg_len > 1 && argv[i][0] == '@') - { - FILE *atfile; - char *ptr, *ptr1; - struct stat statbuf; - char *buff; - int len; - - if (stat (&argv[i][1], &statbuf)) - { - fprintf (stderr, "Couldn't open linker response file: %s\n", - &argv[i][1]); - exit (1); - } - - buff = xmalloc (statbuf.st_size + 1); - atfile = fopen (&argv[i][1], "r"); - fgets (buff, statbuf.st_size + 1, atfile); - fclose (atfile); - - len = strlen (buff); - if (buff [len - 1] == '\n') - { - buff [len - 1] = 0; - len--; - } - - ptr = buff; - - do - { - ptr1 = strchr (ptr, ' '); - if (ptr1) - *ptr1 = 0; - ptr = to_host_file_spec (ptr); - if (ptr[0] == '[') - fprintf (optfile, "%s%s\n", cwdev, ptr); - else - fprintf (optfile, "%s\n", ptr); - ptr = ptr1 + 1; - } while (ptr1); - } - - /* Unix style file specs and VMS style switches look alike, so assume an - arg consisting of one and only one slash, and that being first, is - really a switch. */ - else if ((argv[i][0] == '/') && (strchr (&argv[i][1], '/') == 0)) - addarg (argv[i]); - else if (arg_len > 4 - && strncasecmp (&argv[i][arg_len-4], ".OPT", 4) == 0) - { - FILE *optfile1; - char buff [256]; - - optfile1 = fopen (argv[i], "r"); - while (fgets (buff, 256, optfile1)) - fputs (buff, optfile); - - fclose (optfile1); - } - else if (arg_len > 7 && strncasecmp (argv[i], "GSMATCH", 7) == 0) - fprintf (optfile, "%s\n", argv[i]); - else if (arg_len > 6 && strncasecmp (argv[i], "IDENT=", 6) == 0) - { - /* Comes from command line and will override pragma. */ - fprintf (optfile, "case_sensitive=yes\n"); - fprintf (optfile, "IDENT=\"%15.15s\"\n", &argv[i][6]); - fprintf (optfile, "case_sensitive=NO\n"); - ident = 1; - } - else if (arg_len > 15 - && strncasecmp (argv[i], "IDENTIFICATION=", 15) == 0) - ; - else - { - /* Assume filename arg. */ - const char *addswitch = ""; - char buff [256]; - int buff_len; - int is_cld = 0; - - argv[i] = to_host_file_spec (argv[i]); - arg_len = strlen (argv[i]); - - if (arg_len > 4 && strcasecmp (&argv[i][arg_len-4], ".exe") == 0) - addswitch = "/shareable"; - - if (arg_len > 4 && strcasecmp (&argv[i][arg_len-4], ".cld") == 0) - { - addswitch = "/shareable"; - is_cld = 1; - } - - if (arg_len > 2 && strcasecmp (&argv[i][arg_len-2], ".a") == 0) - addswitch = "/lib"; - - if (arg_len > 4 && strcasecmp (&argv[i][arg_len-4], ".olb") == 0) - addswitch = "/lib"; - - if (argv[i][0] == '[') - sprintf (buff, "%s%s%s\n", cwdev, argv[i], addswitch); - else if (strchr (argv[i], ':')) - sprintf (buff, "%s%s\n", argv[i], addswitch); - else - sprintf (buff, "%s%s%s\n", cwd, argv[i], addswitch); - - buff_len = strlen (buff); - - if (buff_len >= 15 - && strcasecmp (&buff[buff_len - 15], "vms-dwarf2eh.o\n") == 0) - vmsdwarf2ehspec = xstrdup (buff); - else if (buff_len >= 13 - && strcasecmp (&buff[buff_len - 13],"vms-dwarf2.o\n") == 0) - vmsdwarf2spec = xstrdup (buff); - else if (is_cld) - { - addarg (buff); - addarg (","); - } - else - fprintf (optfile, buff); - } - } - -#if 0 - if (share) - fprintf (optfile, "symbol_vector=(main=procedure)\n"); -#endif - - if (vmsdwarf2ehspec) - { - fprintf (optfile, "case_sensitive=yes\n"); - fprintf (optfile, "cluster=DWARF2eh,,,%s", vmsdwarf2ehspec); - fprintf (optfile, "collect=DWARF2eh,eh_frame\n"); - fprintf (optfile, "case_sensitive=NO\n"); - } - - if (debug && vmsdwarf2spec) - { - fprintf (optfile, "case_sensitive=yes\n"); - fprintf (optfile, "cluster=DWARF2debug,,,%s", vmsdwarf2spec); - fprintf (optfile, "collect=DWARF2debug,debug_abbrev,debug_aranges,-\n"); - fprintf (optfile, " debug_frame,debug_info,debug_line,debug_loc,-\n"); - fprintf (optfile, " debug_macinfo,debug_pubnames,debug_str,-\n"); - fprintf (optfile, " debug_zzzzzz\n"); - fprintf (optfile, "case_sensitive=NO\n"); - } - - if (debug && share) - { - fprintf (optfile, "case_sensitive=yes\n"); - fprintf (optfile, "symbol_vector=(-\n"); - fprintf (optfile, - "%s$DWARF2.DEBUG_ABBREV/$dwarf2.debug_abbrev=DATA,-\n", - sharefilename); - fprintf (optfile, - "%s$DWARF2.DEBUG_ARANGES/$dwarf2.debug_aranges=DATA,-\n", - sharefilename); - fprintf (optfile, "%s$DWARF2.DEBUG_FRAME/$dwarf2.debug_frame=DATA,-\n", - sharefilename); - fprintf (optfile, "%s$DWARF2.DEBUG_INFO/$dwarf2.debug_info=DATA,-\n", - sharefilename); - fprintf (optfile, "%s$DWARF2.DEBUG_LINE/$dwarf2.debug_line=DATA,-\n", - sharefilename); - fprintf (optfile, "%s$DWARF2.DEBUG_LOC/$dwarf2.debug_loc=DATA,-\n", - sharefilename); - fprintf (optfile, - "%s$DWARF2.DEBUG_MACINFO/$dwarf2.debug_macinfo=DATA,-\n", - sharefilename); - fprintf (optfile, - "%s$DWARF2.DEBUG_PUBNAMES/$dwarf2.debug_pubnames=DATA,-\n", - sharefilename); - fprintf (optfile, "%s$DWARF2.DEBUG_STR/$dwarf2.debug_str=DATA,-\n", - sharefilename); - fprintf (optfile, "%s$DWARF2.DEBUG_ZZZZZZ/$dwarf2.debug_zzzzzz=DATA)\n", - sharefilename); - fprintf (optfile, "case_sensitive=NO\n"); - } - - fclose (optfile); - addarg (optfilefullname); - addarg ("/opt"); - - addarg (NULL); - - if (verbose) - { - int i; - - for (i = 0; i < link_arg_index; i++) - printf ("%s ", link_args [i]); - putchar ('\n'); - } - - { - int i; - int len = 0; - - for (i = 0; link_args[i]; i++) - len = len + strlen (link_args[i]) + 1; - - { - char *allargs = (char *) alloca (len + 1); - Descr cmd; - int status; - int status1 = 1; - - for (i = 0; i < len + 1; i++) - allargs [i] = 0; - - for (i = 0; link_args [i]; i++) - { - strcat (allargs, link_args [i]); - strcat (allargs, " "); - } - - cmd.adr = allargs; - cmd.len = len; - cmd.mbz = 0; - - i = LIB$SPAWN (&cmd, 0, 0, 0, 0, 0, &status); - if ((i & 1) != 1) - { - LIB$SIGNAL (i); - exit (1); - } - - if (debug && !share) - { - strcpy (allargs, "@gnu:[bin]set_exe "); - strcat (allargs, exefilename); - strcat (allargs, " /nodebug /silent"); - len = strlen (allargs); - cmd.adr = allargs; - cmd.len = len; - cmd.mbz = 0; - - if (verbose) - printf (allargs); - - i = LIB$SPAWN (&cmd, 0, 0, 0, 0, 0, &status1); - - if ((i & 1) != 1) - { - LIB$SIGNAL (i); - exit (1); - } - } - - if (!save_temps) - remove (optfilefullname); - - if ((status & 1) == 1 && (status1 & 1) == 1) - exit (0); - - if (exefilename && inhibit_exec == 1) - remove (exefilename); - - exit (1); - } - } -} - -static char new_host_filespec [255]; -static char filename_buff [256]; - -static int -translate_unix (char *name, int type ATTRIBUTE_UNUSED) -{ - strcpy (filename_buff, name); - return 0; -} - -static char * -to_host_file_spec (char *filespec) -{ - strcpy (new_host_filespec, ""); - if (strchr (filespec, ']') || strchr (filespec, ':')) - strcpy (new_host_filespec, filespec); - else - { - decc$to_vms (filespec, translate_unix, 1, 1); - strcpy (new_host_filespec, filename_buff); - } - - return new_host_filespec; -} diff --git a/contrib/gcc/config/alpha/vms-psxcrt0-64.c b/contrib/gcc/config/alpha/vms-psxcrt0-64.c deleted file mode 100644 index 8ca9e1d..0000000 --- a/contrib/gcc/config/alpha/vms-psxcrt0-64.c +++ /dev/null @@ -1,128 +0,0 @@ -/* VMS 64bit crt0 returning Unix style condition codes . - Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combine -executable.) - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#if !defined(__DECC) -You Lose! This file can only be compiled with DEC C. -#else - -/* This file can only be compiled with DEC C, due to the call to - lib$establish and the pragmas pointer_size. */ - -#pragma __pointer_size short - -#include -#include -#include -#include -#include - -extern void decc$main (); -extern int main (); - -static int -handler (sigargs, mechargs) - void *sigargs; - void *mechargs; -{ - return SS$_RESIGNAL; -} - -int -__main (arg1, arg2, arg3, image_file_desc, arg5, arg6) - void *arg1, *arg2, *arg3; - void *image_file_desc; - void *arg5, *arg6) -{ - int argc; - char **argv; - char **envp; - -#pragma __pointer_size long - - int i; - char **long_argv; - char **long_envp; - int status; - -#pragma __pointer_size short - - lib$establish (handler); - decc$main (arg1, arg2, arg3, image_file_desc, - arg5, arg6, &argc, &argv, &envp); - -#pragma __pointer_size long - - /* Reallocate argv with 64 bit pointers. */ - long_argv = (char **) malloc (sizeof (char *) * (argc + 1)); - - for (i = 0; i < argc; i++) - long_argv[i] = strdup (argv[i]); - - long_argv[argc] = (char *) 0; - - long_envp = (char **) malloc (sizeof (char *) * 5); - - for (i = 0; envp[i]; i++) - long_envp[i] = strdup (envp[i]); - - long_envp[i] = (char *) 0; - -#pragma __pointer_size short - - status = main (argc, long_argv, long_envp); - - /* Map into a range of 0 - 255. */ - status = status & 255; - - if (status > 0) - { - int save_status = status; - - status = C$_EXIT1 + ((status - 1) << STS$V_MSG_NO); - - /* An exit failure status requires a "severe" error. All status values - are defined in errno with a successful (1) severity but can be - changed to an error (2) severity by adding 1. In addition for - compatibility with UNIX exit() routines we inhibit a run-time error - message from being generated on exit(1). */ - - if (save_status == 1) - { - status++; - status |= STS$M_INHIB_MSG; - } - } - - if (status == 0) - status = SS$_NORMAL; - - return status; -} -#endif diff --git a/contrib/gcc/config/alpha/vms-psxcrt0.c b/contrib/gcc/config/alpha/vms-psxcrt0.c deleted file mode 100644 index 65962ee..0000000 --- a/contrib/gcc/config/alpha/vms-psxcrt0.c +++ /dev/null @@ -1,99 +0,0 @@ -/* VMS crt0 returning Unix style condition codes . - Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combine -executable.) - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#if !defined(__DECC) -You Lose! This file can only be compiled with DEC C. -#else - -/* This file can only be compiled with DEC C, due to the call to - lib$establish. */ - -#include -#include -#include -#include -#include - -extern void decc$main (); -extern int main (); - -static int -handler (sigargs, mechargs) - void *sigargs; - void *mechargs; -{ - return SS$_RESIGNAL; -} - -int -__main (arg1, arg2, arg3, image_file_desc, arg5, arg6) - void *arg1, *arg2, *arg3; - void *image_file_desc; - void *arg5, *arg6; -{ - int argc; - char **argv; - char **envp; - int status; - - lib$establish (handler); - decc$main (arg1, arg2, arg3, image_file_desc, arg5, arg6, - &argc, &argv, &envp); - - status = main (argc, argv, envp); - - /* Map into a range of 0 - 255. */ - status = status & 255; - - if (status > 0) - { - int save_status = status; - - status = C$_EXIT1 + ((status - 1) << STS$V_MSG_NO); - - /* An exit failure status requires a "severe" error - All status values are defined in errno with a successful - (1) severity but can be changed to an error (2) severity by adding 1. - In addition for compatibility with UNIX exit() routines we inhibit - a run-time error message from being generated on exit(1). */ - - if (save_status == 1) - { - status++; - status |= STS$M_INHIB_MSG; - } - } - - if (status == 0) - status = SS$_NORMAL; - - return status; -} -#endif diff --git a/contrib/gcc/config/alpha/vms.h b/contrib/gcc/config/alpha/vms.h deleted file mode 100644 index f7058f3..0000000 --- a/contrib/gcc/config/alpha/vms.h +++ /dev/null @@ -1,450 +0,0 @@ -/* Output variables, constants and external declarations, for GNU compiler. - Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004 - 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. */ - -#define TARGET_OBJECT_SUFFIX ".obj" -#define TARGET_EXECUTABLE_SUFFIX ".exe" - -/* This enables certain macros in alpha.h, which will make an indirect - reference to an external symbol an invalid address. This needs to be - defined before we include alpha.h, since it determines which macros - are used for GO_IF_*. */ - -#define NO_EXTERNAL_INDIRECT_ADDRESS - -#define TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define_std ("vms"); \ - builtin_define_std ("VMS"); \ - builtin_define ("__ALPHA"); \ - builtin_assert ("system=vms"); \ - if (TARGET_FLOAT_VAX) \ - builtin_define ("__G_FLOAT"); \ - else \ - builtin_define ("__IEEE_FLOAT"); \ - } while (0) - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_FP|MASK_FPREGS|MASK_GAS) -#undef TARGET_ABI_OPEN_VMS -#define TARGET_ABI_OPEN_VMS 1 - -#undef TARGET_NAME -#define TARGET_NAME "OpenVMS/Alpha" -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME); - -#undef PCC_STATIC_STRUCT_RETURN - -/* "long" is 32 bits, but 64 bits for Ada. */ -#undef LONG_TYPE_SIZE -#define LONG_TYPE_SIZE 32 -#define ADA_LONG_TYPE_SIZE 64 - -/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */ -#undef POINTER_SIZE -#define POINTER_SIZE 32 -#define POINTERS_EXTEND_UNSIGNED 0 - -#define MAX_OFILE_ALIGNMENT 524288 /* 8 x 2^16 by DEC Ada Test CD40VRA */ - -#undef FIXED_REGISTERS -#define FIXED_REGISTERS \ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } - -#undef CALL_USED_REGISTERS -#define CALL_USED_REGISTERS \ - {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - -/* List the order in which to allocate registers. Each register must be - listed once, even those in FIXED_REGISTERS. - - We allocate in the following order: - $f1 (nonsaved floating-point register) - $f10-$f15 (likewise) - $f22-$f30 (likewise) - $f21-$f16 (likewise, but input args) - $f0 (nonsaved, but return value) - $f2-$f9 (saved floating-point registers) - $1 (nonsaved integer registers) - $22-$25 (likewise) - $28 (likewise) - $0 (likewise, but return value) - $21-$16 (likewise, but input args) - $27 (procedure value in OSF, nonsaved in NT) - $2-$8 (saved integer registers) - $9-$14 (saved integer registers) - $26 (return PC) - $15 (frame pointer) - $29 (global pointer) - $30, $31, $f31 (stack pointer and always zero/ap & fp) */ - -#undef REG_ALLOC_ORDER -#define REG_ALLOC_ORDER \ - {33, \ - 42, 43, 44, 45, 46, 47, \ - 54, 55, 56, 57, 58, 59, 60, 61, 62, \ - 53, 52, 51, 50, 49, 48, \ - 32, \ - 34, 35, 36, 37, 38, 39, 40, 41, \ - 1, \ - 22, 23, 24, 25, \ - 28, \ - 0, \ - 21, 20, 19, 18, 17, 16, \ - 27, \ - 2, 3, 4, 5, 6, 7, 8, \ - 9, 10, 11, 12, 13, 14, \ - 26, \ - 15, \ - 29, \ - 30, 31, 63 } - -#undef HARD_FRAME_POINTER_REGNUM -#define HARD_FRAME_POINTER_REGNUM 29 - -/* Define registers used by the epilogue and return instruction. */ -#undef EPILOGUE_USES -#define EPILOGUE_USES(REGNO) ((REGNO) == 26 || (REGNO) == 29) - -#undef CAN_ELIMINATE -#define CAN_ELIMINATE(FROM, TO) \ -((TO) != STACK_POINTER_REGNUM || ! alpha_using_fp ()) - -#undef INITIAL_ELIMINATION_OFFSET -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ -{ if ((FROM) == FRAME_POINTER_REGNUM) \ - (OFFSET) = alpha_sa_size () + alpha_pv_save_size (); \ - else if ((FROM) == ARG_POINTER_REGNUM) \ - (OFFSET) = (ALPHA_ROUND (alpha_sa_size () + alpha_pv_save_size () \ - + get_frame_size () \ - + current_function_pretend_args_size) \ - - current_function_pretend_args_size); \ - else \ - abort(); \ - if ((TO) == STACK_POINTER_REGNUM) \ - (OFFSET) += ALPHA_ROUND (current_function_outgoing_args_size); \ -} - -/* Define a data type for recording info about an argument list - during the scan of that argument list. This data type should - hold all necessary information about the function itself - and about the args processed so far, enough to enable macros - such as FUNCTION_ARG to determine where the next arg should go. - - On Alpha/VMS, this is a structure that contains the number of - arguments and, for each argument, the datatype of that argument. - - The number of arguments is a number of words of arguments scanned so far. - Thus 6 or more means all following args should go on the stack. */ - -enum avms_arg_type {I64, FF, FD, FG, FS, FT}; -typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info; - -#undef CUMULATIVE_ARGS -#define CUMULATIVE_ARGS avms_arg_info - -/* 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. */ - -#undef INIT_CUMULATIVE_ARGS -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ - (CUM).num_args = 0; \ - (CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64; \ - (CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64; - -#undef FUNCTION_ARG_ADVANCE -#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - if (MUST_PASS_IN_STACK (MODE, TYPE)) \ - (CUM).num_args += 6; \ - else \ - { \ - if ((CUM).num_args < 6) \ - (CUM).atypes[(CUM).num_args] = alpha_arg_type (MODE); \ - \ - (CUM).num_args += ALPHA_ARG_SIZE (MODE, TYPE, NAMED); \ - } - -/* For an arg passed partly in registers and partly in memory, - this is the number of registers used. - For args passed entirely in registers or entirely in memory, zero. */ - -#undef FUNCTION_ARG_PARTIAL_NREGS -#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ -((CUM).num_args < 6 && 6 < (CUM).num_args \ - + ALPHA_ARG_SIZE (MODE, TYPE, NAMED) \ - ? 6 - (CUM).num_args : 0) - -/* ABI has stack checking, but it's broken. */ -#undef STACK_CHECK_BUILTIN -#define STACK_CHECK_BUILTIN 0 - -#define LINK_SECTION_ASM_OP "\t.link" -#define READONLY_DATA_SECTION_ASM_OP "\t.rdata" -#define LITERALS_SECTION_ASM_OP "\t.literals" -#define CTORS_SECTION_ASM_OP "\t.ctors" -#define DTORS_SECTION_ASM_OP "\t.dtors" - -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_link, in_literals - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ -void \ -link_section (void) \ -{ \ - if (in_section != in_link) \ - { \ - fprintf (asm_out_file, "%s\n", LINK_SECTION_ASM_OP); \ - in_section = in_link; \ - } \ -} \ -void \ -literals_section (void) \ -{ \ - if (in_section != in_literals) \ - { \ - fprintf (asm_out_file, "%s\n", LITERALS_SECTION_ASM_OP); \ - in_section = in_literals; \ - } \ -} - -extern void link_section (void); -extern void literals_section (void); - -#undef ASM_OUTPUT_ADDR_DIFF_ELT -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort () - -#undef ASM_OUTPUT_ADDR_VEC_ELT -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.quad $L%d\n", (VALUE)) - -#undef CASE_VECTOR_MODE -#define CASE_VECTOR_MODE DImode -#undef CASE_VECTOR_PC_RELATIVE - -#undef ASM_OUTPUT_CASE_LABEL -#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \ -{ ASM_OUTPUT_ALIGN (FILE, 3); (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); } - -/* This says how to output assembler code to declare an - uninitialized external linkage data object. */ - -#define COMMON_ASM_OP "\t.comm\t" - -#undef ASM_OUTPUT_ALIGNED_COMMON -#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ -do { \ - fprintf ((FILE), "%s", COMMON_ASM_OP); \ - assemble_name ((FILE), (NAME)); \ - fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ -} while (0) - - -/* Output assembler code for a block containing the constant parts - of a trampoline, leaving space for the variable parts. - - The trampoline should set the static chain pointer to value placed - into the trampoline and should branch to the specified routine. - Note that $27 has been set to the address of the trampoline, so we can - use it for addressability of the two data items. */ - -#undef TRAMPOLINE_TEMPLATE -#define TRAMPOLINE_TEMPLATE(FILE) \ -{ \ - fprintf (FILE, "\t.quad 0\n"); \ - fprintf (FILE, "\t.linkage __tramp\n"); \ - fprintf (FILE, "\t.quad 0\n"); \ -} - -/* Length in units of the trampoline for entering a nested function. */ - -#undef TRAMPOLINE_SIZE -#define TRAMPOLINE_SIZE 32 - -/* The alignment of a trampoline, in bits. */ - -#undef TRAMPOLINE_ALIGNMENT -#define TRAMPOLINE_ALIGNMENT 64 - -/* Emit RTL insns to initialize the variable parts of a trampoline. - FNADDR is an RTX for the address of the function's pure code. - CXT is an RTX for the static chain value for the function. */ - -#undef INITIALIZE_TRAMPOLINE -#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ - alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 16, 24, -1) - -/* Control how constructors and destructors are emitted. */ -#define TARGET_ASM_CONSTRUCTOR vms_asm_out_constructor -#define TARGET_ASM_DESTRUCTOR vms_asm_out_destructor - -#undef SDB_DEBUGGING_INFO -#undef MIPS_DEBUGGING_INFO -#undef DBX_DEBUGGING_INFO - -#define DWARF2_DEBUGGING_INFO 1 -#define VMS_DEBUGGING_INFO 1 - -#define DWARF2_UNWIND_INFO 1 - -#undef EH_RETURN_HANDLER_RTX -#define EH_RETURN_HANDLER_RTX \ - gen_rtx_MEM (Pmode, plus_constant (stack_pointer_rtx, 8)) - -#define LINK_EH_SPEC "vms-dwarf2eh.o%s " - -#ifdef IN_LIBGCC2 -#include - -#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ - do { \ - PDSCDEF *pv = *((PDSCDEF **) (CONTEXT)->reg [29]); \ - \ - if (pv && ((long) pv & 0x7) == 0) /* low bits 0 means address */ \ - pv = *(PDSCDEF **) pv; \ - \ - if (pv && ((pv->pdsc$w_flags & 0xf) == PDSC$K_KIND_FP_STACK)) \ - { \ - int i, j; \ - \ - (FS)->cfa_offset = pv->pdsc$l_size; \ - (FS)->cfa_reg = pv->pdsc$w_flags & PDSC$M_BASE_REG_IS_FP ? 29 : 30; \ - (FS)->retaddr_column = 26; \ - (FS)->cfa_how = CFA_REG_OFFSET; \ - (FS)->regs.reg[27].loc.offset = -pv->pdsc$l_size; \ - (FS)->regs.reg[27].how = REG_SAVED_OFFSET; \ - (FS)->regs.reg[26].loc.offset \ - = -(pv->pdsc$l_size - pv->pdsc$w_rsa_offset); \ - (FS)->regs.reg[26].how = REG_SAVED_OFFSET; \ - \ - for (i = 0, j = 0; i < 32; i++) \ - if (1<pdsc$l_ireg_mask) \ - { \ - (FS)->regs.reg[i].loc.offset \ - = -(pv->pdsc$l_size - pv->pdsc$w_rsa_offset - 8 * ++j); \ - (FS)->regs.reg[i].how = REG_SAVED_OFFSET; \ - } \ - \ - goto SUCCESS; \ - } \ - else if (pv && ((pv->pdsc$w_flags & 0xf) == PDSC$K_KIND_FP_REGISTER)) \ - { \ - (FS)->cfa_offset = pv->pdsc$l_size; \ - (FS)->cfa_reg = pv->pdsc$w_flags & PDSC$M_BASE_REG_IS_FP ? 29 : 30; \ - (FS)->retaddr_column = 26; \ - (FS)->cfa_how = CFA_REG_OFFSET; \ - (FS)->regs.reg[26].loc.reg = pv->pdsc$b_save_ra; \ - (FS)->regs.reg[26].how = REG_SAVED_REG; \ - (FS)->regs.reg[29].loc.reg = pv->pdsc$b_save_fp; \ - (FS)->regs.reg[29].how = REG_SAVED_REG; \ - \ - goto SUCCESS; \ - } \ -} while (0) -#endif - -/* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ - -#undef ASM_OUTPUT_ALIGN -#define ASM_OUTPUT_ALIGN(FILE,LOG) \ - fprintf (FILE, "\t.align %d\n", LOG); - -/* Switch into a generic section. */ -#define TARGET_ASM_NAMED_SECTION vms_asm_named_section - -#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ - do { literals_section(); \ - fprintf ((FILE), "\t"); \ - assemble_name (FILE, LABEL1); \ - fprintf (FILE, " = "); \ - assemble_name (FILE, LABEL2); \ - fprintf (FILE, "\n"); \ - } while (0) - -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG - -#define ASM_PN_FORMAT "%s___%lu" - -/* ??? VMS uses different linkage. */ -#undef TARGET_ASM_OUTPUT_MI_THUNK - -#undef ASM_SPEC -#undef ASM_FINAL_SPEC - -/* The VMS convention is to always provide minimal debug info - for a traceback unless specifically overridden. Defaulting this here - is a kludge. */ - -#define OPTIMIZATION_OPTIONS(OPTIMIZE, OPTIMIZE_SIZE) \ -{ \ - write_symbols = VMS_DEBUG; \ - debug_info_level = (enum debug_info_level) 1; \ -} - -/* Override traceback debug info on -g0. */ -#undef OVERRIDE_OPTIONS -#define OVERRIDE_OPTIONS \ -{ \ - if (write_symbols == NO_DEBUG) \ - debug_info_level = (enum debug_info_level) 0; \ - override_options (); \ -} - -/* Link with vms-dwarf2.o if -g (except -g0). This causes the - VMS link to pull all the dwarf2 debug sections together. */ -#undef LINK_SPEC -#define LINK_SPEC "%{g:-g vms-dwarf2.o%s} %{g0} %{g1:-g1 vms-dwarf2.o%s} \ -%{g2:-g2 vms-dwarf2.o%s} %{g3:-g3 vms-dwarf2.o%s} %{shared} %{v} %{map}" - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{!shared:%{mvms-return-codes:vcrt0.o%s} \ -%{!mvms-return-codes:pcrt0.o%s}}" - -#undef LIB_SPEC -#define LIB_SPEC "-lc" - -#define NAME__MAIN "__gccmain" -#define SYMBOL__MAIN __gccmain - -#define MD_EXEC_PREFIX "/gnu/lib/gcc-lib/" -#define MD_STARTFILE_PREFIX "/gnu/lib/gcc-lib/" - -/* Specify the list of include file directories. */ -#define INCLUDE_DEFAULTS \ -{ \ - { "/gnu/lib/gcc-lib/include", 0, 0, 0 }, \ - { "/gnu_gxx_include", 0, 1, 1 }, \ - { "/gnu_cc_include", 0, 0, 0 }, \ - { "/gnu/include", 0, 0, 0 }, \ - { 0, 0, 0, 0 } \ -} - -#define LONGLONG_STANDALONE 1 diff --git a/contrib/gcc/config/alpha/vms64.h b/contrib/gcc/config/alpha/vms64.h deleted file mode 100644 index 29de9a5..0000000 --- a/contrib/gcc/config/alpha/vms64.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Output variables, constants and external declarations, for GNU compiler. - Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Douglas Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Defaults to BITS_PER_WORD, e.g. 64 which is what is wanted. - This is incompatible with DEC C, but matches DEC Ada */ -#undef LONG_TYPE_SIZE - -/* Defaults to "long int" */ -#undef SIZE_TYPE -#undef PTRDIFF_TYPE - -#undef POINTERS_EXTEND_UNSIGNED -#undef POINTER_SIZE -#define POINTER_SIZE 64 diff --git a/contrib/gcc/config/alpha/vms_tramp.asm b/contrib/gcc/config/alpha/vms_tramp.asm deleted file mode 100644 index 1eb1e2b..0000000 --- a/contrib/gcc/config/alpha/vms_tramp.asm +++ /dev/null @@ -1,52 +0,0 @@ -/* VMS trampoline for nested functions - Copyright (C) 2001 Free Software Foundation, Inc. - Contributed by Douglas B. Rupp (rupp@gnat.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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. */ - -;# Alpha OpenVMS trampoline -;# - .set noreorder - .set volatile - .set noat - .file 1 "vms_tramp.asm" -.text - .align 3 - .globl __tramp - .ent __tramp -__tramp..en: - -.link - .align 3 -__tramp: - .pdesc __tramp..en,null -.text - ldq $1,24($27) - ldq $27,16($27) - ldq $28,8($27) - jmp $31,($28),0 - .end __tramp diff --git a/contrib/gcc/config/alpha/x-vms b/contrib/gcc/config/alpha/x-vms deleted file mode 100644 index c98f03d..0000000 --- a/contrib/gcc/config/alpha/x-vms +++ /dev/null @@ -1,24 +0,0 @@ -# Under VMS, directory names cannot contain dots. -version:=$(shell echo $(gcc_version) | sed -e 's/\./_/g') - -libsubdir=$(libdir)/gcc-lib - -# Rules for linker and compiler wrappers. These are only useful on -# a VMS host. -EXTRA_PROGRAMS=ld.exe decc.exe -vms-ld.o : $(srcdir)/config/alpha/vms-ld.c - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) -ld.exe : vms-ld.o - $(CC) -o $@ vms-ld.o ../libiberty/libiberty.a - -vms-cc.o : $(srcdir)/config/alpha/vms-cc.c - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) -decc.exe : vms-cc.o - $(CC) -o $@ vms-cc.o ../libiberty/libiberty.a - -# These extra parts can only be compiled on a VMS host and are only needed -# on a VMS target. The rules are in t-vms. -VMS_EXTRA_PARTS=vcrt0.o pcrt0.o - -# Doesn't work on VMS -USE_COLLECT2= diff --git a/contrib/gcc/config/alpha/xm-vms.h b/contrib/gcc/config/alpha/xm-vms.h deleted file mode 100644 index bdac52e..0000000 --- a/contrib/gcc/config/alpha/xm-vms.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Configuration for GNU C-compiler for openVMS/Alpha. - Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. - Contributed by Klaus Kaempf (kkaempf@progis.de). - -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. */ - -/* A couple of conditionals for execution machine are controlled here. */ -#ifndef VMS -#define VMS -#endif - -/* Define a local equivalent (sort of) for unlink */ -#define unlink remove - -/* Causes exit() to be redefined to __posix_exit() and - Posix compatible failure and success codes to be used */ -#define _POSIX_EXIT 1 - -/* Open files in stream mode if not otherwise explicitly specified */ -#define __UNIX_FOPEN 1 - -/* Write to stdout using fputc to avoid record terminators in pipes */ -#define __UNIX_FWRITE 1 - -#define STDC_HEADERS 1 - -#define HOST_EXECUTABLE_SUFFIX ".exe" -#define HOST_OBJECT_SUFFIX ".obj" - -#define DUMPFILE_FORMAT "_%02d_" diff --git a/contrib/gcc/config/frv/cmovd.c b/contrib/gcc/config/frv/cmovd.c deleted file mode 100644 index 8ce986e..0000000 --- a/contrib/gcc/config/frv/cmovd.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Move double-word library function. - Copyright (C) 2000, 2003 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC is free software ; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation * either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY ; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable - to be covered by the GNU General Public License. - This exception does not however invalidate any other reasons why - the executable file might be covered by the GNU General Public License. */ - -void -__cmovd (long long *dest, const long long *src, unsigned len) -{ - unsigned i; - unsigned num = len >> 3; - unsigned xlen = len & ~7; - char *dest_byte = (char *)dest; - const char *src_byte = (const char *)src; - - if (dest_byte < src_byte || dest_byte > src_byte+len) - { - for (i = 0; i < num; i++) - dest[i] = src[i]; - - while (len > xlen) - { - dest_byte[xlen] = src_byte[xlen]; - xlen++; - } - } - else - { - while (len-- > 0) - dest_byte[len] = src_byte[len]; - } -} diff --git a/contrib/gcc/config/frv/cmovh.c b/contrib/gcc/config/frv/cmovh.c deleted file mode 100644 index 97e1f11..0000000 --- a/contrib/gcc/config/frv/cmovh.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Move half-word library function. - Copyright (C) 2000, 2003 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC is free software ; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation * either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY ; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable - to be covered by the GNU General Public License. - This exception does not however invalidate any other reasons why - the executable file might be covered by the GNU General Public License. */ - -void -__cmovh (short *dest, const short *src, unsigned len) -{ - unsigned i; - unsigned num = len >> 1; - char *dest_byte = (char *)dest; - const char *src_byte = (const char *)src; - - if (dest_byte < src_byte || dest_byte > src_byte+len) - { - for (i = 0; i < num; i++) - dest[i] = src[i]; - - if ((len & 1) != 0) - dest_byte[len-1] = src_byte[len-1]; - } - else - { - while (len-- > 0) - dest_byte[len] = src_byte[len]; - } -} diff --git a/contrib/gcc/config/frv/cmovw.c b/contrib/gcc/config/frv/cmovw.c deleted file mode 100644 index 8bc5801..0000000 --- a/contrib/gcc/config/frv/cmovw.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Move word library function. - Copyright (C) 2000, 2003 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC is free software ; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation * either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY ; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable - to be covered by the GNU General Public License. - This exception does not however invalidate any other reasons why - the executable file might be covered by the GNU General Public License. */ - -void -__cmovw (int *dest, const int *src, unsigned len) -{ - unsigned i; - unsigned num = len >> 2; - unsigned xlen = len & ~3; - char *dest_byte = (char *)dest; - const char *src_byte = (const char *)src; - - if (dest_byte < src_byte || dest_byte > src_byte+len) - { - for (i = 0; i < num; i++) - dest[i] = src[i]; - - while (len > xlen) - { - dest_byte[xlen] = src_byte[xlen]; - xlen++; - } - } - else - { - while (len-- > 0) - dest_byte[len] = src_byte[len]; - } -} diff --git a/contrib/gcc/config/frv/frv-abi.h b/contrib/gcc/config/frv/frv-abi.h deleted file mode 100644 index a38dd16..0000000 --- a/contrib/gcc/config/frv/frv-abi.h +++ /dev/null @@ -1,181 +0,0 @@ -/* Frv map GCC names to FR-V ABI. - Copyright (C) 2000 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* For each of the functions in the library that has a corresponding name in - the ABI, add an equivalence between the GCC name and the ABI name. This is - in a separate file from frv.h so that fp-bit.c can be made to include it. */ - -#ifdef __GNUC__ -#ifdef __FRV_UNDERSCORE__ -#define RENAME_LIBRARY(OLD,NEW) \ -__asm__ (".globl\t_" #NEW "\n" \ - "_" #NEW "=_" #OLD "\n" \ - "\t.type\t_" #NEW ",@function\n"); - -#else -#define RENAME_LIBRARY(OLD,NEW) \ -__asm__ (".globl\t" #NEW "\n" \ - #NEW "=" #OLD "\n" \ - "\t.type\t" #NEW ",@function\n"); -#endif - -#define CREATE_DOUBLE_SHIFT(OLD,NEW) \ -__asm__ (".text\n" \ - "\t.globl\t" #NEW "\n" \ - "\t.type\t" #NEW ",@function\n" \ - #NEW ":\n" \ - "\tor\tgr11, gr0, gr10\n" \ - "\tbra\t" #OLD "\n"); - -#ifdef L_sf_to_df -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__extendsfdf2,__ftod) -#endif - -#ifdef L_sf_to_si -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfsi,__ftoi) -#endif - -#ifdef L_sf_to_usi -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui) -#endif - -#ifdef L_df_to_si -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfsi,__dtoi) -#endif - -#ifdef L_fixunssfsi -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfsi,__ftoui) -#endif - -#ifdef L_fixunsdfsi -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfsi,__dtoui) -#endif - -#ifdef L_fixsfdi -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixsfdi,__ftoll) -#endif - -#ifdef L_fixdfdi -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixdfdi,__dtoll) -#endif - -#ifdef L_fixunssfdi -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunssfdi,__ftoull) -#endif - -#ifdef L_fixunsdfdi -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__fixunsdfdi,__dtoull) -#endif - -#ifdef L_si_to_sf -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsisf,__itof) -#endif - -#ifdef L_di_to_sf -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof) -#endif - -#ifdef L_df_to_sf -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__truncdfsf2,__dtof) -#endif - -#ifdef L_si_to_df -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatsidf,__itod) -#endif - -#ifdef L_floatdisf -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdisf,__lltof) -#endif - -#ifdef L_floatdidf -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__floatdidf,__lltod) -#endif - -#ifdef L_addsub_df -#define DECLARE_LIBRARY_RENAMES \ - RENAME_LIBRARY(__adddf3,__addd) - RENAME_LIBRARY(__subdf3,__subd) -#endif - -#ifdef L_mul_df -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__muldf3,__muld) -#endif - -#ifdef L_div_df -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdf3,__divd) -#endif - -#ifdef L_addsub_sf -#define DECLARE_LIBRARY_RENAMES \ - RENAME_LIBRARY(__addsf3,__addf) \ - RENAME_LIBRARY(__subsf3,__subf) -#endif - -#ifdef L_mul_sf -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__mulsf3,__mulf) -#endif - -#ifdef L_div_sf -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divsf3,__divf) -#endif - -#ifdef L_ashldi3 -#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashldi3,__sllll) -#endif - -#ifdef L_lshrdi3 -#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__lshrdi3,__srlll) -#endif - -#ifdef L_ashrdi3 -#define DECLARE_LIBRARY_RENAMES CREATE_DOUBLE_SHIFT (__ashrdi3,__srall) -#endif - -#ifdef L_adddi3 -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__adddi3,__addll) -#endif - -#ifdef L_subdi3 -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__subdi3,__subll) -#endif - -#ifdef L_muldi3 -#define DECLARE_LIBRARY_RENAMES \ - RENAME_LIBRARY(__muldi3,__mulll) - RENAME_LIBRARY(__muldi3,__umulll) -#endif - -#ifdef L_divdi3 -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__divdi3,__divll) -#endif - -#ifdef L_udivdi3 -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__udivdi3,__udivll) -#endif - -#ifdef L_moddi3 -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__moddi3,__modll) -#endif - -#ifdef L_umoddi3 -#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY(__umoddi3,__umodll) -#endif -#endif /* __GNUC__ */ diff --git a/contrib/gcc/config/frv/frv-asm.h b/contrib/gcc/config/frv/frv-asm.h deleted file mode 100644 index b4305a4..0000000 --- a/contrib/gcc/config/frv/frv-asm.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Assembler Support. - Copyright (C) 2000 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC is free software ; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation * either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY ; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* P(INSN): Emit INSN.P for VLIW machines, otherwise emit plain INSN. - P2(INSN): Emit INSN.P on the FR500 and above, otherwise emit plain INSN. */ -#ifdef __FRV_VLIW__ -#ifdef __STDC__ -#define P(A) A.p -#else -#define P(A) A/**/.p -#endif -#if __FRV_VLIW__ > 2 -#define P2(A) P(A) -#else -#define P2(A) A -#endif -#else -#define P(A) A -#define P2(A) A -#endif - -/* Add underscore if necessary to external name. */ -#ifdef __FRV_UNDERSCORE__ -#ifdef __STDC__ -#define EXT(NAME) _##NAME -#else -#define EXT(NAME) _/**/NAME -#endif -#else -#define EXT(NAME) NAME -#endif diff --git a/contrib/gcc/config/frv/frv-modes.def b/contrib/gcc/config/frv/frv-modes.def deleted file mode 100644 index 3985099..0000000 --- a/contrib/gcc/config/frv/frv-modes.def +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of target machine for GNU compiler for FRV. - Copyright (C) 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. */ - -/* On the FRV, the CC modes used are: - - CCmode set ICC's from comparing signed integers - CC_UNSmode set ICC's from comparing unsigned integers - CC_FPmode set FCC's from comparing floating point - CC_CCRmode set CCR's to do conditional execution */ - -CC_MODE (CC_UNS); -CC_MODE (CC_FP); -CC_MODE (CC_CCR); diff --git a/contrib/gcc/config/frv/frv-protos.h b/contrib/gcc/config/frv/frv-protos.h deleted file mode 100644 index 90292b1..0000000 --- a/contrib/gcc/config/frv/frv-protos.h +++ /dev/null @@ -1,238 +0,0 @@ -/* Frv prototypes. - Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Define the information needed to generate branch and scc insns. This is - stored from the compare operation. Note that we can't use "rtx" here - since it hasn't been defined! */ - -/* Define global data defined in frv.c. */ -extern const char *frv_branch_cost_string; /* -mbranch-cost option */ -extern int frv_branch_cost_int; /* value of -mbranch_cost */ - -extern const char *frv_cpu_string; /* -mcpu= option */ - -extern const char *frv_condexec_insns_str; /* -mcond-exec-insns= option */ -extern int frv_condexec_insns; /* value of -mcond-exec-insns */ - -extern const char *frv_condexec_temps_str; /* -mcond-exec-temps= option */ -extern int frv_condexec_temps; /* value of -mcond-exec-temps */ - -extern const char *frv_sched_lookahead_str; /* -msched-lookahead= option */ -extern int frv_sched_lookahead; /* value -msched-lookahead= */ - -/* CPU type. This must be identical to the cpu enumeration in frv.md. */ -typedef enum frv_cpu -{ - FRV_CPU_GENERIC, - FRV_CPU_FR500, - FRV_CPU_FR400, - FRV_CPU_FR300, - FRV_CPU_SIMPLE, - FRV_CPU_TOMCAT -} frv_cpu_t; - -extern frv_cpu_t frv_cpu_type; /* value of -mcpu= */ - -/* Define functions defined in frv.c */ -extern void frv_expand_prologue (void); -extern void frv_expand_epilogue (int); -extern void frv_override_options (void); -extern void frv_optimization_options (int, int); -extern void frv_conditional_register_usage (void); -extern frv_stack_t *frv_stack_info (void); -extern void frv_debug_stack (frv_stack_t *); -extern int frv_frame_pointer_required (void); -extern int frv_initial_elimination_offset (int, int); - -#ifdef RTX_CODE -extern int frv_legitimate_address_p (enum machine_mode, rtx, - int, int); -extern rtx frv_legitimize_address (rtx, rtx, enum machine_mode); - -#ifdef TREE_CODE -extern void frv_init_cumulative_args (CUMULATIVE_ARGS *, tree, - rtx, tree, int); - -extern int frv_function_arg_boundary (enum machine_mode, tree); -extern rtx frv_function_arg (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int, int); - -extern void frv_function_arg_advance (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int); - -extern int frv_function_arg_partial_nregs (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int); - -extern int frv_function_arg_pass_by_reference (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int); - -extern int frv_function_arg_callee_copies (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int); - -extern int frv_function_arg_keep_as_reference (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int); - -extern rtx frv_expand_builtin_saveregs (void); -extern void frv_setup_incoming_varargs (CUMULATIVE_ARGS *, - enum machine_mode, - tree, int *, int); - -extern void frv_expand_builtin_va_start (tree, rtx); -extern rtx frv_expand_builtin_va_arg (tree, tree); -#endif /* TREE_CODE */ - -extern int frv_expand_block_move (rtx *); -extern int frv_expand_block_clear (rtx *); -extern rtx frv_dynamic_chain_address (rtx); -extern rtx frv_return_addr_rtx (int, rtx); -extern rtx frv_index_memory (rtx, enum machine_mode, int); -extern const char *frv_asm_output_opcode - (FILE *, const char *); -extern void frv_final_prescan_insn (rtx, rtx *, int); -extern void frv_print_operand (FILE *, rtx, int); -extern void frv_print_operand_address (FILE *, rtx); -extern int frv_emit_movsi (rtx, rtx); -extern const char *output_move_single (rtx *, rtx); -extern const char *output_move_double (rtx *, rtx); -extern const char *output_condmove_single - (rtx *, rtx); -extern int frv_emit_cond_branch (enum rtx_code, rtx); -extern int frv_emit_scc (enum rtx_code, rtx); -extern rtx frv_split_scc (rtx, rtx, rtx, rtx, HOST_WIDE_INT); -extern int frv_emit_cond_move (rtx, rtx, rtx, rtx); -extern rtx frv_split_cond_move (rtx *); -extern rtx frv_split_minmax (rtx *); -extern rtx frv_split_abs (rtx *); -extern void frv_split_double_load (rtx, rtx); -extern void frv_split_double_store (rtx, rtx); -#ifdef BLOCK_HEAD -extern void frv_ifcvt_init_extra_fields (ce_if_block_t *); -extern void frv_ifcvt_modify_tests (ce_if_block_t *, rtx *, rtx *); -extern void frv_ifcvt_modify_multiple_tests - (ce_if_block_t *, basic_block, - rtx *, rtx *); -extern rtx frv_ifcvt_modify_insn (ce_if_block_t *, rtx, rtx); -extern void frv_ifcvt_modify_final (ce_if_block_t *); -extern void frv_ifcvt_modify_cancel (ce_if_block_t *); -#endif -extern int frv_trampoline_size (void); -extern void frv_initialize_trampoline (rtx, rtx, rtx); -extern enum reg_class frv_secondary_reload_class - (enum reg_class class, - enum machine_mode mode, - rtx x, int); -extern int frv_class_likely_spilled_p (enum reg_class class); -extern int frv_hard_regno_mode_ok (int, enum machine_mode); -extern int frv_hard_regno_nregs (int, enum machine_mode); -extern int frv_class_max_nregs (enum reg_class class, - enum machine_mode mode); -extern int frv_legitimate_constant_p (rtx); -#endif /* RTX_CODE */ - -extern int direct_return_p (void); -extern int frv_register_move_cost (enum reg_class, enum reg_class); - -#ifdef TREE_CODE -extern int frv_adjust_field_align (tree, int); -#endif - -extern void fixup_section (void); -extern void sdata_section (void); -extern void sbss_section (void); -extern void data_section (void); - -#ifdef RTX_CODE -extern int integer_register_operand (rtx, enum machine_mode); -extern int frv_load_operand (rtx, enum machine_mode); -extern int gpr_or_fpr_operand (rtx, enum machine_mode); -extern int gpr_no_subreg_operand (rtx, enum machine_mode); -extern int gpr_or_int6_operand (rtx, enum machine_mode); -extern int fpr_or_int6_operand (rtx, enum machine_mode); -extern int gpr_or_int_operand (rtx, enum machine_mode); -extern int gpr_or_int12_operand (rtx, enum machine_mode); -extern int gpr_fpr_or_int12_operand (rtx, enum machine_mode); -extern int gpr_or_int10_operand (rtx, enum machine_mode); -extern int move_source_operand (rtx, enum machine_mode); -extern int move_destination_operand (rtx, enum machine_mode); -extern int condexec_source_operand (rtx, enum machine_mode); -extern int condexec_dest_operand (rtx, enum machine_mode); -extern int lr_operand (rtx, enum machine_mode); -extern int gpr_or_memory_operand (rtx, enum machine_mode); -extern int fpr_or_memory_operand (rtx, enum machine_mode); -extern int reg_or_0_operand (rtx, enum machine_mode); -extern int fcc_operand (rtx, enum machine_mode); -extern int icc_operand (rtx, enum machine_mode); -extern int cc_operand (rtx, enum machine_mode); -extern int fcr_operand (rtx, enum machine_mode); -extern int icr_operand (rtx, enum machine_mode); -extern int cr_operand (rtx, enum machine_mode); -extern int call_operand (rtx, enum machine_mode); -extern int fpr_operand (rtx, enum machine_mode); -extern int even_reg_operand (rtx, enum machine_mode); -extern int odd_reg_operand (rtx, enum machine_mode); -extern int even_gpr_operand (rtx, enum machine_mode); -extern int odd_gpr_operand (rtx, enum machine_mode); -extern int quad_fpr_operand (rtx, enum machine_mode); -extern int even_fpr_operand (rtx, enum machine_mode); -extern int odd_fpr_operand (rtx, enum machine_mode); -extern int dbl_memory_one_insn_operand (rtx, enum machine_mode); -extern int dbl_memory_two_insn_operand (rtx, enum machine_mode); -extern int int12_operand (rtx, enum machine_mode); -extern int int6_operand (rtx, enum machine_mode); -extern int int5_operand (rtx, enum machine_mode); -extern int uint5_operand (rtx, enum machine_mode); -extern int uint4_operand (rtx, enum machine_mode); -extern int uint1_operand (rtx, enum machine_mode); -extern int int_2word_operand (rtx, enum machine_mode); -extern int pic_register_operand (rtx, enum machine_mode); -extern int pic_symbolic_operand (rtx, enum machine_mode); -extern int small_data_register_operand (rtx, enum machine_mode); -extern int small_data_symbolic_operand (rtx, enum machine_mode); -extern int upper_int16_operand (rtx, enum machine_mode); -extern int uint16_operand (rtx, enum machine_mode); -extern int relational_operator (rtx, enum machine_mode); -extern int signed_relational_operator (rtx, enum machine_mode); -extern int unsigned_relational_operator (rtx, enum machine_mode); -extern int float_relational_operator (rtx, enum machine_mode); -extern int ccr_eqne_operator (rtx, enum machine_mode); -extern int minmax_operator (rtx, enum machine_mode); -extern int condexec_si_binary_operator (rtx, enum machine_mode); -extern int condexec_si_media_operator (rtx, enum machine_mode); -extern int condexec_si_divide_operator (rtx, enum machine_mode); -extern int condexec_si_unary_operator (rtx, enum machine_mode); -extern int condexec_sf_conv_operator (rtx, enum machine_mode); -extern int condexec_sf_add_operator (rtx, enum machine_mode); -extern int condexec_memory_operand (rtx, enum machine_mode); -extern int intop_compare_operator (rtx, enum machine_mode); -extern int condexec_intop_cmp_operator (rtx, enum machine_mode); -extern int acc_operand (rtx, enum machine_mode); -extern int even_acc_operand (rtx, enum machine_mode); -extern int quad_acc_operand (rtx, enum machine_mode); -extern int accg_operand (rtx, enum machine_mode); -extern rtx frv_matching_accg_for_acc (rtx); -#endif - diff --git a/contrib/gcc/config/frv/frv.c b/contrib/gcc/config/frv/frv.c deleted file mode 100644 index 1a75042..0000000 --- a/contrib/gcc/config/frv/frv.c +++ /dev/null @@ -1,9566 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 - Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "rtl.h" -#include "tree.h" -#include "regs.h" -#include "hard-reg-set.h" -#include "real.h" -#include "insn-config.h" -#include "conditions.h" -#include "insn-flags.h" -#include "output.h" -#include "insn-attr.h" -#include "flags.h" -#include "recog.h" -#include "reload.h" -#include "expr.h" -#include "obstack.h" -#include "except.h" -#include "function.h" -#include "optabs.h" -#include "toplev.h" -#include "basic-block.h" -#include "tm_p.h" -#include "ggc.h" -#include -#include "target.h" -#include "target-def.h" - -#ifndef FRV_INLINE -#define FRV_INLINE inline -#endif - -/* Temporary register allocation support structure. */ -typedef struct frv_tmp_reg_struct - { - HARD_REG_SET regs; /* possible registers to allocate */ - int next_reg[N_REG_CLASSES]; /* next register to allocate per class */ - } -frv_tmp_reg_t; - -/* Register state information for VLIW re-packing phase. These values must fit - within an unsigned char. */ -#define REGSTATE_DEAD 0x00 /* register is currently dead */ -#define REGSTATE_CC_MASK 0x07 /* Mask to isolate CCn for cond exec */ -#define REGSTATE_LIVE 0x08 /* register is live */ -#define REGSTATE_MODIFIED 0x10 /* reg modified in current VLIW insn */ -#define REGSTATE_IF_TRUE 0x20 /* reg modified in cond exec true */ -#define REGSTATE_IF_FALSE 0x40 /* reg modified in cond exec false */ -#define REGSTATE_UNUSED 0x80 /* bit for hire */ -#define REGSTATE_MASK 0xff /* mask for the bits to set */ - - /* conditional expression used */ -#define REGSTATE_IF_EITHER (REGSTATE_IF_TRUE | REGSTATE_IF_FALSE) - -/* The following is not sure in the reg_state bytes, so can have a larger value - than 0xff. */ -#define REGSTATE_CONDJUMP 0x100 /* conditional jump done in VLIW insn */ - -/* Used in frv_frame_accessor_t to indicate the direction of a register-to- - memory move. */ -enum frv_stack_op -{ - FRV_LOAD, - FRV_STORE -}; - -/* Information required by frv_frame_access. */ -typedef struct -{ - /* This field is FRV_LOAD if registers are to be loaded from the stack and - FRV_STORE if they should be stored onto the stack. FRV_STORE implies - the move is being done by the prologue code while FRV_LOAD implies it - is being done by the epilogue. */ - enum frv_stack_op op; - - /* The base register to use when accessing the stack. This may be the - frame pointer, stack pointer, or a temporary. The choice of register - depends on which part of the frame is being accessed and how big the - frame is. */ - rtx base; - - /* The offset of BASE from the bottom of the current frame, in bytes. */ - int base_offset; -} frv_frame_accessor_t; - -/* Define the information needed to generate branch and scc insns. This is - stored from the compare operation. */ -rtx frv_compare_op0; -rtx frv_compare_op1; - -/* Conditional execution support gathered together in one structure. */ -typedef struct - { - /* Linked list of insns to add if the conditional execution conversion was - successful. Each link points to an EXPR_LIST which points to the pattern - of the insn to add, and the insn to be inserted before. */ - rtx added_insns_list; - - /* Identify which registers are safe to allocate for if conversions to - conditional execution. We keep the last allocated register in the - register classes between COND_EXEC statements. This will mean we allocate - different registers for each different COND_EXEC group if we can. This - might allow the scheduler to intermix two different COND_EXEC sections. */ - frv_tmp_reg_t tmp_reg; - - /* For nested IFs, identify which CC registers are used outside of setting - via a compare isnsn, and using via a check insn. This will allow us to - know if we can rewrite the register to use a different register that will - be paired with the CR register controlling the nested IF-THEN blocks. */ - HARD_REG_SET nested_cc_ok_rewrite; - - /* Temporary registers allocated to hold constants during conditional - execution. */ - rtx scratch_regs[FIRST_PSEUDO_REGISTER]; - - /* Current number of temp registers available. */ - int cur_scratch_regs; - - /* Number of nested conditional execution blocks. */ - int num_nested_cond_exec; - - /* Map of insns that set up constants in scratch registers. */ - bitmap scratch_insns_bitmap; - - /* Conditional execution test register (CC0..CC7). */ - rtx cr_reg; - - /* Conditional execution compare register that is paired with cr_reg, so that - nested compares can be done. The csubcc and caddcc instructions don't - have enough bits to specify both a CC register to be set and a CR register - to do the test on, so the same bit number is used for both. Needless to - say, this is rather inconvenient for GCC. */ - rtx nested_cc_reg; - - /* Extra CR registers used for &&, ||. */ - rtx extra_int_cr; - rtx extra_fp_cr; - - /* Previous CR used in nested if, to make sure we are dealing with the same - nested if as the previous statement. */ - rtx last_nested_if_cr; - } -frv_ifcvt_t; - -static /* GTY(()) */ frv_ifcvt_t frv_ifcvt; - -/* Map register number to smallest register class. */ -enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER]; - -/* Map class letter into register class. */ -enum reg_class reg_class_from_letter[256]; - -/* Cached value of frv_stack_info. */ -static frv_stack_t *frv_stack_cache = (frv_stack_t *)0; - -/* -mbranch-cost= support */ -const char *frv_branch_cost_string; -int frv_branch_cost_int = DEFAULT_BRANCH_COST; - -/* -mcpu= support */ -const char *frv_cpu_string; /* -mcpu= option */ -frv_cpu_t frv_cpu_type = CPU_TYPE; /* value of -mcpu= */ - -/* -mcond-exec-insns= support */ -const char *frv_condexec_insns_str; /* -mcond-exec-insns= option */ -int frv_condexec_insns = DEFAULT_CONDEXEC_INSNS; /* value of -mcond-exec-insns*/ - -/* -mcond-exec-temps= support */ -const char *frv_condexec_temps_str; /* -mcond-exec-temps= option */ -int frv_condexec_temps = DEFAULT_CONDEXEC_TEMPS; /* value of -mcond-exec-temps*/ - -/* -msched-lookahead=n */ -const char *frv_sched_lookahead_str; /* -msched-lookahead=n */ -int frv_sched_lookahead = 4; /* -msched-lookahead=n */ - -/* Forward references */ -static int frv_default_flags_for_cpu (void); -static int frv_string_begins_with (tree, const char *); -static FRV_INLINE int const_small_data_p (rtx); -static FRV_INLINE int plus_small_data_p (rtx, rtx); -static void frv_print_operand_memory_reference_reg - (FILE *, rtx); -static void frv_print_operand_memory_reference (FILE *, rtx, int); -static int frv_print_operand_jump_hint (rtx); -static FRV_INLINE int frv_regno_ok_for_base_p (int, int); -static rtx single_set_pattern (rtx); -static int frv_function_contains_far_jump (void); -static rtx frv_alloc_temp_reg (frv_tmp_reg_t *, - enum reg_class, - enum machine_mode, - int, int); -static rtx frv_frame_offset_rtx (int); -static rtx frv_frame_mem (enum machine_mode, rtx, int); -static rtx frv_dwarf_store (rtx, int); -static void frv_frame_insn (rtx, rtx); -static void frv_frame_access (frv_frame_accessor_t*, - rtx, int); -static void frv_frame_access_multi (frv_frame_accessor_t*, - frv_stack_t *, int); -static void frv_frame_access_standard_regs (enum frv_stack_op, - frv_stack_t *); -static struct machine_function *frv_init_machine_status (void); -static int frv_legitimate_memory_operand (rtx, enum machine_mode, int); -static rtx frv_int_to_acc (enum insn_code, int, rtx); -static enum machine_mode frv_matching_accg_mode (enum machine_mode); -static rtx frv_read_argument (tree *); -static int frv_check_constant_argument (enum insn_code, int, rtx); -static rtx frv_legitimize_target (enum insn_code, rtx); -static rtx frv_legitimize_argument (enum insn_code, int, rtx); -static rtx frv_expand_set_builtin (enum insn_code, tree, rtx); -static rtx frv_expand_unop_builtin (enum insn_code, tree, rtx); -static rtx frv_expand_binop_builtin (enum insn_code, tree, rtx); -static rtx frv_expand_cut_builtin (enum insn_code, tree, rtx); -static rtx frv_expand_binopimm_builtin (enum insn_code, tree, rtx); -static rtx frv_expand_voidbinop_builtin (enum insn_code, tree); -static rtx frv_expand_voidtriop_builtin (enum insn_code, tree); -static rtx frv_expand_voidaccop_builtin (enum insn_code, tree); -static rtx frv_expand_mclracc_builtin (tree); -static rtx frv_expand_mrdacc_builtin (enum insn_code, tree); -static rtx frv_expand_mwtacc_builtin (enum insn_code, tree); -static rtx frv_expand_noargs_builtin (enum insn_code); -static rtx frv_emit_comparison (enum rtx_code, rtx, rtx); -static int frv_clear_registers_used (rtx *, void *); -static void frv_ifcvt_add_insn (rtx, rtx, int); -static rtx frv_ifcvt_rewrite_mem (rtx, enum machine_mode, rtx); -static rtx frv_ifcvt_load_value (rtx, rtx); -static void frv_registers_update (rtx, unsigned char [], - int [], int *, int); -static int frv_registers_used_p (rtx, unsigned char [], int); -static int frv_registers_set_p (rtx, unsigned char [], int); -static int frv_issue_rate (void); -static int frv_use_dfa_pipeline_interface (void); -static void frv_pack_insns (void); -static void frv_function_prologue (FILE *, HOST_WIDE_INT); -static void frv_function_epilogue (FILE *, HOST_WIDE_INT); -static bool frv_assemble_integer (rtx, unsigned, int); -static void frv_init_builtins (void); -static rtx frv_expand_builtin (tree, rtx, rtx, enum machine_mode, int); -static void frv_init_libfuncs (void); -static bool frv_in_small_data_p (tree); -static void frv_asm_output_mi_thunk - (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree); -static bool frv_rtx_costs (rtx, int, int, int*); -static void frv_asm_out_constructor (rtx, int); -static void frv_asm_out_destructor (rtx, int); - -/* Initialize the GCC target structure. */ -#undef TARGET_ASM_FUNCTION_PROLOGUE -#define TARGET_ASM_FUNCTION_PROLOGUE frv_function_prologue -#undef TARGET_ASM_FUNCTION_EPILOGUE -#define TARGET_ASM_FUNCTION_EPILOGUE frv_function_epilogue -#undef TARGET_ASM_INTEGER -#define TARGET_ASM_INTEGER frv_assemble_integer -#undef TARGET_INIT_BUILTINS -#define TARGET_INIT_BUILTINS frv_init_builtins -#undef TARGET_EXPAND_BUILTIN -#define TARGET_EXPAND_BUILTIN frv_expand_builtin -#undef TARGET_INIT_LIBFUNCS -#define TARGET_INIT_LIBFUNCS frv_init_libfuncs -#undef TARGET_IN_SMALL_DATA_P -#define TARGET_IN_SMALL_DATA_P frv_in_small_data_p -#undef TARGET_RTX_COSTS -#define TARGET_RTX_COSTS frv_rtx_costs -#undef TARGET_ASM_CONSTRUCTOR -#define TARGET_ASM_CONSTRUCTOR frv_asm_out_constructor -#undef TARGET_ASM_DESTRUCTOR -#define TARGET_ASM_DESTRUCTOR frv_asm_out_destructor - -#undef TARGET_ASM_OUTPUT_MI_THUNK -#define TARGET_ASM_OUTPUT_MI_THUNK frv_asm_output_mi_thunk -#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK -#define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall - -#undef TARGET_SCHED_ISSUE_RATE -#define TARGET_SCHED_ISSUE_RATE frv_issue_rate -#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE -#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE frv_use_dfa_pipeline_interface - -struct gcc_target targetm = TARGET_INITIALIZER; - -/* Given a CONST, return true if the symbol_ref points to small data. */ - -static FRV_INLINE int -const_small_data_p (rtx x) -{ - rtx x0, x1; - - if (GET_CODE (XEXP (x, 0)) != PLUS) - return FALSE; - - x0 = XEXP (XEXP (x, 0), 0); - if (GET_CODE (x0) != SYMBOL_REF || !SYMBOL_REF_SMALL_P (x0)) - return FALSE; - - x1 = XEXP (XEXP (x, 0), 1); - if (GET_CODE (x1) != CONST_INT - || !IN_RANGE_P (INTVAL (x1), -2048, 2047)) - return FALSE; - - return TRUE; -} - -/* Given a PLUS, return true if this is a small data reference. */ - -static FRV_INLINE int -plus_small_data_p (rtx op0, rtx op1) -{ - if (GET_MODE (op0) == SImode - && GET_CODE (op0) == REG - && REGNO (op0) == SDA_BASE_REG) - { - if (GET_CODE (op1) == SYMBOL_REF) - return SYMBOL_REF_SMALL_P (op1); - - if (GET_CODE (op1) == CONST) - return const_small_data_p (op1); - } - - return FALSE; -} - - -static int -frv_default_flags_for_cpu (void) -{ - switch (frv_cpu_type) - { - case FRV_CPU_GENERIC: - return MASK_DEFAULT_FRV; - - case FRV_CPU_FR500: - case FRV_CPU_TOMCAT: - return MASK_DEFAULT_FR500; - - case FRV_CPU_FR400: - return MASK_DEFAULT_FR400; - - case FRV_CPU_FR300: - case FRV_CPU_SIMPLE: - return MASK_DEFAULT_SIMPLE; - } - abort (); -} - -/* Sometimes certain combinations of command options do not make - sense on a particular target machine. You can define a macro - `OVERRIDE_OPTIONS' to take account of this. This macro, if - defined, is executed once just after all the command options have - been parsed. - - Don't use this macro to turn on various extra optimizations for - `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ - -void -frv_override_options (void) -{ - int regno, i; - - /* Set the cpu type. */ - if (frv_cpu_string) - { - if (strcmp (frv_cpu_string, "simple") == 0) - frv_cpu_type = FRV_CPU_SIMPLE; - - else if (strcmp (frv_cpu_string, "tomcat") == 0) - frv_cpu_type = FRV_CPU_TOMCAT; - - else if (strncmp (frv_cpu_string, "fr", sizeof ("fr")-1) != 0) - error ("Unknown cpu: -mcpu=%s", frv_cpu_string); - - else - { - const char *p = frv_cpu_string + sizeof ("fr") - 1; - if (strcmp (p, "500") == 0) - frv_cpu_type = FRV_CPU_FR500; - - else if (strcmp (p, "400") == 0) - frv_cpu_type = FRV_CPU_FR400; - - else if (strcmp (p, "300") == 0) - frv_cpu_type = FRV_CPU_FR300; - - else if (strcmp (p, "v") == 0) - frv_cpu_type = FRV_CPU_GENERIC; - - else - error ("Unknown cpu: -mcpu=%s", frv_cpu_string); - } - } - - target_flags |= (frv_default_flags_for_cpu () & ~target_flags_explicit); - - /* -mlibrary-pic sets -fPIC and -G0 and also suppresses warnings from the - linker about linking pic and non-pic code. */ - if (TARGET_LIBPIC) - { - if (!flag_pic) /* -fPIC */ - flag_pic = 2; - - if (! g_switch_set) /* -G0 */ - { - g_switch_set = 1; - g_switch_value = 0; - } - } - - /* Both -fpic and -gdwarf want to use .previous and the assembler only keeps - one level. */ - if (write_symbols == DWARF_DEBUG && flag_pic) - error ("-fpic and -gdwarf are incompatible (-fpic and -g/-gdwarf-2 are fine)"); - - /* Change the branch cost value. */ - if (frv_branch_cost_string) - frv_branch_cost_int = atoi (frv_branch_cost_string); - - /* Change the # of insns to be converted to conditional execution. */ - if (frv_condexec_insns_str) - frv_condexec_insns = atoi (frv_condexec_insns_str); - - /* Change # of temporary registers used to hold integer constants. */ - if (frv_condexec_temps_str) - frv_condexec_temps = atoi (frv_condexec_temps_str); - - /* Change scheduling look ahead. */ - if (frv_sched_lookahead_str) - frv_sched_lookahead = atoi (frv_sched_lookahead_str); - - /* A C expression whose value is a register class containing hard - register REGNO. In general there is more than one such class; - choose a class which is "minimal", meaning that no smaller class - also contains the register. */ - - for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - { - enum reg_class class; - - if (GPR_P (regno)) - { - int gpr_reg = regno - GPR_FIRST; - if ((gpr_reg & 3) == 0) - class = QUAD_REGS; - - else if ((gpr_reg & 1) == 0) - class = EVEN_REGS; - - else - class = GPR_REGS; - } - - else if (FPR_P (regno)) - { - int fpr_reg = regno - GPR_FIRST; - if ((fpr_reg & 3) == 0) - class = QUAD_FPR_REGS; - - else if ((fpr_reg & 1) == 0) - class = FEVEN_REGS; - - else - class = FPR_REGS; - } - - else if (regno == LR_REGNO) - class = LR_REG; - - else if (regno == LCR_REGNO) - class = LCR_REG; - - else if (ICC_P (regno)) - class = ICC_REGS; - - else if (FCC_P (regno)) - class = FCC_REGS; - - else if (ICR_P (regno)) - class = ICR_REGS; - - else if (FCR_P (regno)) - class = FCR_REGS; - - else if (ACC_P (regno)) - { - int r = regno - ACC_FIRST; - if ((r & 3) == 0) - class = QUAD_ACC_REGS; - else if ((r & 1) == 0) - class = EVEN_ACC_REGS; - else - class = ACC_REGS; - } - - else if (ACCG_P (regno)) - class = ACCG_REGS; - - else - class = NO_REGS; - - regno_reg_class[regno] = class; - } - - /* Check for small data option */ - if (!g_switch_set) - g_switch_value = SDATA_DEFAULT_SIZE; - - /* A C expression which defines the machine-dependent operand - constraint letters for register classes. If CHAR is such a - letter, the value should be the register class corresponding to - it. Otherwise, the value should be `NO_REGS'. The register - letter `r', corresponding to class `GENERAL_REGS', will not be - passed to this macro; you do not need to handle it. - - The following letters are unavailable, due to being used as - constraints: - '0'..'9' - '<', '>' - 'E', 'F', 'G', 'H' - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P' - 'Q', 'R', 'S', 'T', 'U' - 'V', 'X' - 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */ - - for (i = 0; i < 256; i++) - reg_class_from_letter[i] = NO_REGS; - - reg_class_from_letter['a'] = ACC_REGS; - reg_class_from_letter['b'] = EVEN_ACC_REGS; - reg_class_from_letter['c'] = CC_REGS; - reg_class_from_letter['d'] = GPR_REGS; - reg_class_from_letter['e'] = EVEN_REGS; - reg_class_from_letter['f'] = FPR_REGS; - reg_class_from_letter['h'] = FEVEN_REGS; - reg_class_from_letter['l'] = LR_REG; - reg_class_from_letter['q'] = QUAD_REGS; - reg_class_from_letter['t'] = ICC_REGS; - reg_class_from_letter['u'] = FCC_REGS; - reg_class_from_letter['v'] = ICR_REGS; - reg_class_from_letter['w'] = FCR_REGS; - reg_class_from_letter['x'] = QUAD_FPR_REGS; - reg_class_from_letter['y'] = LCR_REG; - reg_class_from_letter['z'] = SPR_REGS; - reg_class_from_letter['A'] = QUAD_ACC_REGS; - reg_class_from_letter['B'] = ACCG_REGS; - reg_class_from_letter['C'] = CR_REGS; - - /* There is no single unaligned SI op for PIC code. Sometimes we - need to use ".4byte" and sometimes we need to use ".picptr". - See frv_assemble_integer for details. */ - if (flag_pic) - targetm.asm_out.unaligned_op.si = 0; - - init_machine_status = frv_init_machine_status; -} - - -/* Some machines may desire to change what optimizations are performed for - various optimization levels. This macro, if defined, is executed once just - after the optimization level is determined and before the remainder of the - command options have been parsed. Values set in this macro are used as the - default values for the other command line options. - - LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if - `-O' is specified, and 0 if neither is specified. - - SIZE is nonzero if `-Os' is specified, 0 otherwise. - - You should not use this macro to change options that are not - machine-specific. These should uniformly selected by the same optimization - level on all supported machines. Use this macro to enable machbine-specific - optimizations. - - *Do not examine `write_symbols' in this macro!* The debugging options are - *not supposed to alter the generated code. */ - -/* On the FRV, possibly disable VLIW packing which is done by the 2nd - scheduling pass at the current time. */ -void -frv_optimization_options (int level, int size ATTRIBUTE_UNUSED) -{ - if (level >= 2) - { -#ifdef DISABLE_SCHED2 - flag_schedule_insns_after_reload = 0; -#endif -#ifdef ENABLE_RCSP - flag_rcsp = 1; -#endif - } -} - - -/* Return true if NAME (a STRING_CST node) begins with PREFIX. */ - -static int -frv_string_begins_with (tree name, const char *prefix) -{ - int prefix_len = strlen (prefix); - - /* Remember: NAME's length includes the null terminator. */ - return (TREE_STRING_LENGTH (name) > prefix_len - && strncmp (TREE_STRING_POINTER (name), prefix, prefix_len) == 0); -} - -/* Zero or more C statements that may conditionally modify two variables - `fixed_regs' and `call_used_regs' (both of type `char []') after they have - been initialized from the two preceding macros. - - This is necessary in case the fixed or call-clobbered registers depend on - target flags. - - You need not define this macro if it has no work to do. - - If the usage of an entire class of registers depends on the target flags, - you may indicate this to GCC by using this macro to modify `fixed_regs' and - `call_used_regs' to 1 for each of the registers in the classes which should - not be used by GCC. Also define the macro `REG_CLASS_FROM_LETTER' to return - `NO_REGS' if it is called with a letter for a class that shouldn't be used. - - (However, if this class is not included in `GENERAL_REGS' and all of the - insn patterns whose constraints permit this class are controlled by target - switches, then GCC will automatically avoid using these registers when the - target switches are opposed to them.) */ - -void -frv_conditional_register_usage (void) -{ - int i; - - for (i = GPR_FIRST + NUM_GPRS; i <= GPR_LAST; i++) - fixed_regs[i] = call_used_regs[i] = 1; - - for (i = FPR_FIRST + NUM_FPRS; i <= FPR_LAST; i++) - fixed_regs[i] = call_used_regs[i] = 1; - - for (i = ACC_FIRST + NUM_ACCS; i <= ACC_LAST; i++) - fixed_regs[i] = call_used_regs[i] = 1; - - for (i = ACCG_FIRST + NUM_ACCS; i <= ACCG_LAST; i++) - fixed_regs[i] = call_used_regs[i] = 1; - - /* Reserve the registers used for conditional execution. At present, we need - 1 ICC and 1 ICR register. */ - fixed_regs[ICC_TEMP] = call_used_regs[ICC_TEMP] = 1; - fixed_regs[ICR_TEMP] = call_used_regs[ICR_TEMP] = 1; - - if (TARGET_FIXED_CC) - { - fixed_regs[ICC_FIRST] = call_used_regs[ICC_FIRST] = 1; - fixed_regs[FCC_FIRST] = call_used_regs[FCC_FIRST] = 1; - fixed_regs[ICR_FIRST] = call_used_regs[ICR_FIRST] = 1; - fixed_regs[FCR_FIRST] = call_used_regs[FCR_FIRST] = 1; - } - -#if 0 - /* If -fpic, SDA_BASE_REG is the PIC register. */ - if (g_switch_value == 0 && !flag_pic) - fixed_regs[SDA_BASE_REG] = call_used_regs[SDA_BASE_REG] = 0; - - if (!flag_pic) - fixed_regs[PIC_REGNO] = call_used_regs[PIC_REGNO] = 0; -#endif -} - - -/* - * Compute the stack frame layout - * - * Register setup: - * +---------------+-----------------------+-----------------------+ - * |Register |type |caller-save/callee-save| - * +---------------+-----------------------+-----------------------+ - * |GR0 |Zero register | - | - * |GR1 |Stack pointer(SP) | - | - * |GR2 |Frame pointer(FP) | - | - * |GR3 |Hidden parameter | caller save | - * |GR4-GR7 | - | caller save | - * |GR8-GR13 |Argument register | caller save | - * |GR14-GR15 | - | caller save | - * |GR16-GR31 | - | callee save | - * |GR32-GR47 | - | caller save | - * |GR48-GR63 | - | callee save | - * |FR0-FR15 | - | caller save | - * |FR16-FR31 | - | callee save | - * |FR32-FR47 | - | caller save | - * |FR48-FR63 | - | callee save | - * +---------------+-----------------------+-----------------------+ - * - * Stack frame setup: - * Low - * SP-> |-----------------------------------| - * | Argument area | - * |-----------------------------------| - * | Register save area | - * |-----------------------------------| - * | Local variable save area | - * FP-> |-----------------------------------| - * | Old FP | - * |-----------------------------------| - * | Hidden parameter save area | - * |-----------------------------------| - * | Return address(LR) storage area | - * |-----------------------------------| - * | Padding for alignment | - * |-----------------------------------| - * | Register argument area | - * OLD SP-> |-----------------------------------| - * | Parameter area | - * |-----------------------------------| - * High - * - * Argument area/Parameter area: - * - * When a function is called, this area is used for argument transfer. When - * the argument is set up by the caller function, this area is referred to as - * the argument area. When the argument is referenced by the callee function, - * this area is referred to as the parameter area. The area is allocated when - * all arguments cannot be placed on the argument register at the time of - * argument transfer. - * - * Register save area: - * - * This is a register save area that must be guaranteed for the caller - * function. This area is not secured when the register save operation is not - * needed. - * - * Local variable save area: - * - * This is the area for local variables and temporary variables. - * - * Old FP: - * - * This area stores the FP value of the caller function. - * - * Hidden parameter save area: - * - * This area stores the start address of the return value storage - * area for a struct/union return function. - * When a struct/union is used as the return value, the caller - * function stores the return value storage area start address in - * register GR3 and passes it to the caller function. - * The callee function interprets the address stored in the GR3 - * as the return value storage area start address. - * When register GR3 needs to be saved into memory, the callee - * function saves it in the hidden parameter save area. This - * area is not secured when the save operation is not needed. - * - * Return address(LR) storage area: - * - * This area saves the LR. The LR stores the address of a return to the caller - * function for the purpose of function calling. - * - * Argument register area: - * - * This area saves the argument register. This area is not secured when the - * save operation is not needed. - * - * Argument: - * - * Arguments, the count of which equals the count of argument registers (6 - * words), are positioned in registers GR8 to GR13 and delivered to the callee - * function. When a struct/union return function is called, the return value - * area address is stored in register GR3. Arguments not placed in the - * argument registers will be stored in the stack argument area for transfer - * purposes. When an 8-byte type argument is to be delivered using registers, - * it is divided into two and placed in two registers for transfer. When - * argument registers must be saved to memory, the callee function secures an - * argument register save area in the stack. In this case, a continuous - * argument register save area must be established in the parameter area. The - * argument register save area must be allocated as needed to cover the size of - * the argument register to be saved. If the function has a variable count of - * arguments, it saves all argument registers in the argument register save - * area. - * - * Argument Extension Format: - * - * When an argument is to be stored in the stack, its type is converted to an - * extended type in accordance with the individual argument type. The argument - * is freed by the caller function after the return from the callee function is - * made. - * - * +-----------------------+---------------+------------------------+ - * | Argument Type |Extended Type |Stack Storage Size(byte)| - * +-----------------------+---------------+------------------------+ - * |char |int | 4 | - * |signed char |int | 4 | - * |unsigned char |int | 4 | - * |[signed] short int |int | 4 | - * |unsigned short int |int | 4 | - * |[signed] int |No extension | 4 | - * |unsigned int |No extension | 4 | - * |[signed] long int |No extension | 4 | - * |unsigned long int |No extension | 4 | - * |[signed] long long int |No extension | 8 | - * |unsigned long long int |No extension | 8 | - * |float |double | 8 | - * |double |No extension | 8 | - * |long double |No extension | 8 | - * |pointer |No extension | 4 | - * |struct/union |- | 4 (*1) | - * +-----------------------+---------------+------------------------+ - * - * When a struct/union is to be delivered as an argument, the caller copies it - * to the local variable area and delivers the address of that area. - * - * Return Value: - * - * +-------------------------------+----------------------+ - * |Return Value Type |Return Value Interface| - * +-------------------------------+----------------------+ - * |void |None | - * |[signed|unsigned] char |GR8 | - * |[signed|unsigned] short int |GR8 | - * |[signed|unsigned] int |GR8 | - * |[signed|unsigned] long int |GR8 | - * |pointer |GR8 | - * |[signed|unsigned] long long int|GR8 & GR9 | - * |float |GR8 | - * |double |GR8 & GR9 | - * |long double |GR8 & GR9 | - * |struct/union |(*1) | - * +-------------------------------+----------------------+ - * - * When a struct/union is used as the return value, the caller function stores - * the start address of the return value storage area into GR3 and then passes - * it to the callee function. The callee function interprets GR3 as the start - * address of the return value storage area. When this address needs to be - * saved in memory, the callee function secures the hidden parameter save area - * and saves the address in that area. - */ - -frv_stack_t * -frv_stack_info (void) -{ - static frv_stack_t info, zero_info; - frv_stack_t *info_ptr = &info; - tree fndecl = current_function_decl; - int varargs_p = 0; - tree cur_arg; - tree next_arg; - int range; - int alignment; - int offset; - - /* If we've already calculated the values and reload is complete, - just return now. */ - if (frv_stack_cache) - return frv_stack_cache; - - /* Zero all fields. */ - info = zero_info; - - /* Set up the register range information. */ - info_ptr->regs[STACK_REGS_GPR].name = "gpr"; - info_ptr->regs[STACK_REGS_GPR].first = LAST_ARG_REGNUM + 1; - info_ptr->regs[STACK_REGS_GPR].last = GPR_LAST; - info_ptr->regs[STACK_REGS_GPR].dword_p = TRUE; - - info_ptr->regs[STACK_REGS_FPR].name = "fpr"; - info_ptr->regs[STACK_REGS_FPR].first = FPR_FIRST; - info_ptr->regs[STACK_REGS_FPR].last = FPR_LAST; - info_ptr->regs[STACK_REGS_FPR].dword_p = TRUE; - - info_ptr->regs[STACK_REGS_LR].name = "lr"; - info_ptr->regs[STACK_REGS_LR].first = LR_REGNO; - info_ptr->regs[STACK_REGS_LR].last = LR_REGNO; - info_ptr->regs[STACK_REGS_LR].special_p = 1; - - info_ptr->regs[STACK_REGS_CC].name = "cc"; - info_ptr->regs[STACK_REGS_CC].first = CC_FIRST; - info_ptr->regs[STACK_REGS_CC].last = CC_LAST; - info_ptr->regs[STACK_REGS_CC].field_p = TRUE; - - info_ptr->regs[STACK_REGS_LCR].name = "lcr"; - info_ptr->regs[STACK_REGS_LCR].first = LCR_REGNO; - info_ptr->regs[STACK_REGS_LCR].last = LCR_REGNO; - - info_ptr->regs[STACK_REGS_STDARG].name = "stdarg"; - info_ptr->regs[STACK_REGS_STDARG].first = FIRST_ARG_REGNUM; - info_ptr->regs[STACK_REGS_STDARG].last = LAST_ARG_REGNUM; - info_ptr->regs[STACK_REGS_STDARG].dword_p = 1; - info_ptr->regs[STACK_REGS_STDARG].special_p = 1; - - info_ptr->regs[STACK_REGS_STRUCT].name = "struct"; - info_ptr->regs[STACK_REGS_STRUCT].first = STRUCT_VALUE_REGNUM; - info_ptr->regs[STACK_REGS_STRUCT].last = STRUCT_VALUE_REGNUM; - info_ptr->regs[STACK_REGS_STRUCT].special_p = 1; - - info_ptr->regs[STACK_REGS_FP].name = "fp"; - info_ptr->regs[STACK_REGS_FP].first = FRAME_POINTER_REGNUM; - info_ptr->regs[STACK_REGS_FP].last = FRAME_POINTER_REGNUM; - info_ptr->regs[STACK_REGS_FP].special_p = 1; - - /* Determine if this is a stdarg function. If so, allocate space to store - the 6 arguments. */ - if (cfun->stdarg) - varargs_p = 1; - - else - { - /* Find the last argument, and see if it is __builtin_va_alist. */ - for (cur_arg = DECL_ARGUMENTS (fndecl); cur_arg != (tree)0; cur_arg = next_arg) - { - next_arg = TREE_CHAIN (cur_arg); - if (next_arg == (tree)0) - { - if (DECL_NAME (cur_arg) - && !strcmp (IDENTIFIER_POINTER (DECL_NAME (cur_arg)), "__builtin_va_alist")) - varargs_p = 1; - - break; - } - } - } - - /* Iterate over all of the register ranges. */ - for (range = 0; range < STACK_REGS_MAX; range++) - { - frv_stack_regs_t *reg_ptr = &(info_ptr->regs[range]); - int first = reg_ptr->first; - int last = reg_ptr->last; - int size_1word = 0; - int size_2words = 0; - int regno; - - /* Calculate which registers need to be saved & save area size. */ - switch (range) - { - default: - for (regno = first; regno <= last; regno++) - { - if ((regs_ever_live[regno] && !call_used_regs[regno]) - || (current_function_calls_eh_return - && (regno >= FIRST_EH_REGNUM && regno <= LAST_EH_REGNUM)) - || (flag_pic && cfun->uses_pic_offset_table && regno == PIC_REGNO)) - { - info_ptr->save_p[regno] = REG_SAVE_1WORD; - size_1word += UNITS_PER_WORD; - } - } - break; - - /* Calculate whether we need to create a frame after everything else - has been processed. */ - case STACK_REGS_FP: - break; - - case STACK_REGS_LR: - if (regs_ever_live[LR_REGNO] - || profile_flag - || frame_pointer_needed - || (flag_pic && cfun->uses_pic_offset_table)) - { - info_ptr->save_p[LR_REGNO] = REG_SAVE_1WORD; - size_1word += UNITS_PER_WORD; - } - break; - - case STACK_REGS_STDARG: - if (varargs_p) - { - /* If this is a stdarg function with a non varardic - argument split between registers and the stack, - adjust the saved registers downward. */ - last -= (ADDR_ALIGN (cfun->pretend_args_size, UNITS_PER_WORD) - / UNITS_PER_WORD); - - for (regno = first; regno <= last; regno++) - { - info_ptr->save_p[regno] = REG_SAVE_1WORD; - size_1word += UNITS_PER_WORD; - } - - info_ptr->stdarg_size = size_1word; - } - break; - - case STACK_REGS_STRUCT: - if (cfun->returns_struct) - { - info_ptr->save_p[STRUCT_VALUE_REGNUM] = REG_SAVE_1WORD; - size_1word += UNITS_PER_WORD; - } - break; - } - - - if (size_1word) - { - /* If this is a field, it only takes one word. */ - if (reg_ptr->field_p) - size_1word = UNITS_PER_WORD; - - /* Determine which register pairs can be saved together. */ - else if (reg_ptr->dword_p && TARGET_DWORD) - { - for (regno = first; regno < last; regno += 2) - { - if (info_ptr->save_p[regno] && info_ptr->save_p[regno+1]) - { - size_2words += 2 * UNITS_PER_WORD; - size_1word -= 2 * UNITS_PER_WORD; - info_ptr->save_p[regno] = REG_SAVE_2WORDS; - info_ptr->save_p[regno+1] = REG_SAVE_NO_SAVE; - } - } - } - - reg_ptr->size_1word = size_1word; - reg_ptr->size_2words = size_2words; - - if (! reg_ptr->special_p) - { - info_ptr->regs_size_1word += size_1word; - info_ptr->regs_size_2words += size_2words; - } - } - } - - /* Set up the sizes of each each field in the frame body, making the sizes - of each be divisible by the size of a dword if dword operations might - be used, or the size of a word otherwise. */ - alignment = (TARGET_DWORD? 2 * UNITS_PER_WORD : UNITS_PER_WORD); - - info_ptr->parameter_size = ADDR_ALIGN (cfun->outgoing_args_size, alignment); - info_ptr->regs_size = ADDR_ALIGN (info_ptr->regs_size_2words - + info_ptr->regs_size_1word, - alignment); - info_ptr->vars_size = ADDR_ALIGN (get_frame_size (), alignment); - - info_ptr->pretend_size = cfun->pretend_args_size; - - /* Work out the size of the frame, excluding the header. Both the frame - body and register parameter area will be dword-aligned. */ - info_ptr->total_size - = (ADDR_ALIGN (info_ptr->parameter_size - + info_ptr->regs_size - + info_ptr->vars_size, - 2 * UNITS_PER_WORD) - + ADDR_ALIGN (info_ptr->pretend_size - + info_ptr->stdarg_size, - 2 * UNITS_PER_WORD)); - - /* See if we need to create a frame at all, if so add header area. */ - if (info_ptr->total_size > 0 - || info_ptr->regs[STACK_REGS_LR].size_1word > 0 - || info_ptr->regs[STACK_REGS_STRUCT].size_1word > 0) - { - offset = info_ptr->parameter_size; - info_ptr->header_size = 4 * UNITS_PER_WORD; - info_ptr->total_size += 4 * UNITS_PER_WORD; - - /* Calculate the offsets to save normal register pairs. */ - for (range = 0; range < STACK_REGS_MAX; range++) - { - frv_stack_regs_t *reg_ptr = &(info_ptr->regs[range]); - if (! reg_ptr->special_p) - { - int first = reg_ptr->first; - int last = reg_ptr->last; - int regno; - - for (regno = first; regno <= last; regno++) - if (info_ptr->save_p[regno] == REG_SAVE_2WORDS - && regno != FRAME_POINTER_REGNUM - && (regno < FIRST_ARG_REGNUM - || regno > LAST_ARG_REGNUM)) - { - info_ptr->reg_offset[regno] = offset; - offset += 2 * UNITS_PER_WORD; - } - } - } - - /* Calculate the offsets to save normal single registers. */ - for (range = 0; range < STACK_REGS_MAX; range++) - { - frv_stack_regs_t *reg_ptr = &(info_ptr->regs[range]); - if (! reg_ptr->special_p) - { - int first = reg_ptr->first; - int last = reg_ptr->last; - int regno; - - for (regno = first; regno <= last; regno++) - if (info_ptr->save_p[regno] == REG_SAVE_1WORD - && regno != FRAME_POINTER_REGNUM - && (regno < FIRST_ARG_REGNUM - || regno > LAST_ARG_REGNUM)) - { - info_ptr->reg_offset[regno] = offset; - offset += UNITS_PER_WORD; - } - } - } - - /* Calculate the offset to save the local variables at. */ - offset = ADDR_ALIGN (offset, alignment); - if (info_ptr->vars_size) - { - info_ptr->vars_offset = offset; - offset += info_ptr->vars_size; - } - - /* Align header to a dword-boundary. */ - offset = ADDR_ALIGN (offset, 2 * UNITS_PER_WORD); - - /* Calculate the offsets in the fixed frame. */ - info_ptr->save_p[FRAME_POINTER_REGNUM] = REG_SAVE_1WORD; - info_ptr->reg_offset[FRAME_POINTER_REGNUM] = offset; - info_ptr->regs[STACK_REGS_FP].size_1word = UNITS_PER_WORD; - - info_ptr->save_p[LR_REGNO] = REG_SAVE_1WORD; - info_ptr->reg_offset[LR_REGNO] = offset + 2*UNITS_PER_WORD; - info_ptr->regs[STACK_REGS_LR].size_1word = UNITS_PER_WORD; - - if (cfun->returns_struct) - { - info_ptr->save_p[STRUCT_VALUE_REGNUM] = REG_SAVE_1WORD; - info_ptr->reg_offset[STRUCT_VALUE_REGNUM] = offset + UNITS_PER_WORD; - info_ptr->regs[STACK_REGS_STRUCT].size_1word = UNITS_PER_WORD; - } - - /* Calculate the offsets to store the arguments passed in registers - for stdarg functions. The register pairs are first and the single - register if any is last. The register save area starts on a - dword-boundary. */ - if (info_ptr->stdarg_size) - { - int first = info_ptr->regs[STACK_REGS_STDARG].first; - int last = info_ptr->regs[STACK_REGS_STDARG].last; - int regno; - - /* Skip the header. */ - offset += 4 * UNITS_PER_WORD; - for (regno = first; regno <= last; regno++) - { - if (info_ptr->save_p[regno] == REG_SAVE_2WORDS) - { - info_ptr->reg_offset[regno] = offset; - offset += 2 * UNITS_PER_WORD; - } - else if (info_ptr->save_p[regno] == REG_SAVE_1WORD) - { - info_ptr->reg_offset[regno] = offset; - offset += UNITS_PER_WORD; - } - } - } - } - - if (reload_completed) - frv_stack_cache = info_ptr; - - return info_ptr; -} - - -/* Print the information about the frv stack offsets, etc. when debugging. */ - -void -frv_debug_stack (frv_stack_t *info) -{ - int range; - - if (!info) - info = frv_stack_info (); - - fprintf (stderr, "\nStack information for function %s:\n", - ((current_function_decl && DECL_NAME (current_function_decl)) - ? IDENTIFIER_POINTER (DECL_NAME (current_function_decl)) - : "")); - - fprintf (stderr, "\ttotal_size\t= %6d\n", info->total_size); - fprintf (stderr, "\tvars_size\t= %6d\n", info->vars_size); - fprintf (stderr, "\tparam_size\t= %6d\n", info->parameter_size); - fprintf (stderr, "\tregs_size\t= %6d, 1w = %3d, 2w = %3d\n", - info->regs_size, info->regs_size_1word, info->regs_size_2words); - - fprintf (stderr, "\theader_size\t= %6d\n", info->header_size); - fprintf (stderr, "\tpretend_size\t= %6d\n", info->pretend_size); - fprintf (stderr, "\tvars_offset\t= %6d\n", info->vars_offset); - fprintf (stderr, "\tregs_offset\t= %6d\n", info->regs_offset); - - for (range = 0; range < STACK_REGS_MAX; range++) - { - frv_stack_regs_t *regs = &(info->regs[range]); - if ((regs->size_1word + regs->size_2words) > 0) - { - int first = regs->first; - int last = regs->last; - int regno; - - fprintf (stderr, "\t%s\tsize\t= %6d, 1w = %3d, 2w = %3d, save =", - regs->name, regs->size_1word + regs->size_2words, - regs->size_1word, regs->size_2words); - - for (regno = first; regno <= last; regno++) - { - if (info->save_p[regno] == REG_SAVE_1WORD) - fprintf (stderr, " %s (%d)", reg_names[regno], - info->reg_offset[regno]); - - else if (info->save_p[regno] == REG_SAVE_2WORDS) - fprintf (stderr, " %s-%s (%d)", reg_names[regno], - reg_names[regno+1], info->reg_offset[regno]); - } - - fputc ('\n', stderr); - } - } - - fflush (stderr); -} - - - - -/* The following variable value is TRUE if the next output insn should - finish cpu cycle. In order words the insn will have packing bit - (which means absence of asm code suffix `.p' on assembler. */ - -static int frv_insn_packing_flag; - -/* True if the current function contains a far jump. */ - -static int -frv_function_contains_far_jump (void) -{ - rtx insn = get_insns (); - while (insn != NULL - && !(GET_CODE (insn) == JUMP_INSN - /* Ignore tablejump patterns. */ - && GET_CODE (PATTERN (insn)) != ADDR_VEC - && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC - && get_attr_far_jump (insn) == FAR_JUMP_YES)) - insn = NEXT_INSN (insn); - return (insn != NULL); -} - -/* For the FRV, this function makes sure that a function with far jumps - will return correctly. It also does the VLIW packing. */ - -static void -frv_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED) -{ - /* If no frame was created, check whether the function uses a call - instruction to implement a far jump. If so, save the link in gr3 and - replace all returns to LR with returns to GR3. GR3 is used because it - is call-clobbered, because is not available to the register allocator, - and because all functions that take a hidden argument pointer will have - a stack frame. */ - if (frv_stack_info ()->total_size == 0 && frv_function_contains_far_jump ()) - { - rtx insn; - - /* Just to check that the above comment is true. */ - if (regs_ever_live[GPR_FIRST + 3]) - abort (); - - /* Generate the instruction that saves the link register. */ - fprintf (file, "\tmovsg lr,gr3\n"); - - /* Replace the LR with GR3 in *return_internal patterns. The insn - will now return using jmpl @(gr3,0) rather than bralr. We cannot - simply emit a different assembly directive because bralr and jmpl - execute in different units. */ - for (insn = get_insns(); insn != NULL; insn = NEXT_INSN (insn)) - if (GET_CODE (insn) == JUMP_INSN) - { - rtx pattern = PATTERN (insn); - if (GET_CODE (pattern) == PARALLEL - && XVECLEN (pattern, 0) >= 2 - && GET_CODE (XVECEXP (pattern, 0, 0)) == RETURN - && GET_CODE (XVECEXP (pattern, 0, 1)) == USE) - { - rtx address = XEXP (XVECEXP (pattern, 0, 1), 0); - if (GET_CODE (address) == REG && REGNO (address) == LR_REGNO) - REGNO (address) = GPR_FIRST + 3; - } - } - } - - frv_pack_insns (); - frv_insn_packing_flag = TRUE; -} - - -/* Return the next available temporary register in a given class. */ - -static rtx -frv_alloc_temp_reg ( - frv_tmp_reg_t *info, /* which registers are available */ - enum reg_class class, /* register class desired */ - enum machine_mode mode, /* mode to allocate register with */ - int mark_as_used, /* register not available after allocation */ - int no_abort) /* return NULL instead of aborting */ -{ - int regno = info->next_reg[ (int)class ]; - int orig_regno = regno; - HARD_REG_SET *reg_in_class = ®_class_contents[ (int)class ]; - int i, nr; - - for (;;) - { - if (TEST_HARD_REG_BIT (*reg_in_class, regno) - && TEST_HARD_REG_BIT (info->regs, regno)) - break; - - if (++regno >= FIRST_PSEUDO_REGISTER) - regno = 0; - if (regno == orig_regno) - { - if (no_abort) - return NULL_RTX; - else - abort (); - } - } - - nr = HARD_REGNO_NREGS (regno, mode); - info->next_reg[ (int)class ] = regno + nr; - - if (mark_as_used) - for (i = 0; i < nr; i++) - CLEAR_HARD_REG_BIT (info->regs, regno+i); - - return gen_rtx_REG (mode, regno); -} - - -/* Return an rtx with the value OFFSET, which will either be a register or a - signed 12-bit integer. It can be used as the second operand in an "add" - instruction, or as the index in a load or store. - - The function returns a constant rtx if OFFSET is small enough, otherwise - it loads the constant into register OFFSET_REGNO and returns that. */ -static rtx -frv_frame_offset_rtx (int offset) -{ - rtx offset_rtx = GEN_INT (offset); - if (IN_RANGE_P (offset, -2048, 2047)) - return offset_rtx; - else - { - rtx reg_rtx = gen_rtx_REG (SImode, OFFSET_REGNO); - if (IN_RANGE_P (offset, -32768, 32767)) - emit_insn (gen_movsi (reg_rtx, offset_rtx)); - else - { - emit_insn (gen_movsi_high (reg_rtx, offset_rtx)); - emit_insn (gen_movsi_lo_sum (reg_rtx, offset_rtx)); - } - return reg_rtx; - } -} - -/* Generate (mem:MODE (plus:Pmode BASE (frv_frame_offset OFFSET)))). The - prologue and epilogue uses such expressions to access the stack. */ -static rtx -frv_frame_mem (enum machine_mode mode, rtx base, int offset) -{ - return gen_rtx_MEM (mode, gen_rtx_PLUS (Pmode, - base, - frv_frame_offset_rtx (offset))); -} - -/* Generate a frame-related expression: - - (set REG (mem (plus (sp) (const_int OFFSET)))). - - Such expressions are used in FRAME_RELATED_EXPR notes for more complex - instructions. Marking the expressions as frame-related is superfluous if - the note contains just a single set. But if the note contains a PARALLEL - or SEQUENCE that has several sets, each set must be individually marked - as frame-related. */ -static rtx -frv_dwarf_store (rtx reg, int offset) -{ - rtx set = gen_rtx_SET (VOIDmode, - gen_rtx_MEM (GET_MODE (reg), - plus_constant (stack_pointer_rtx, - offset)), - reg); - RTX_FRAME_RELATED_P (set) = 1; - return set; -} - -/* Emit a frame-related instruction whose pattern is PATTERN. The - instruction is the last in a sequence that cumulatively performs the - operation described by DWARF_PATTERN. The instruction is marked as - frame-related and has a REG_FRAME_RELATED_EXPR note containing - DWARF_PATTERN. */ -static void -frv_frame_insn (rtx pattern, rtx dwarf_pattern) -{ - rtx insn = emit_insn (pattern); - RTX_FRAME_RELATED_P (insn) = 1; - REG_NOTES (insn) = alloc_EXPR_LIST (REG_FRAME_RELATED_EXPR, - dwarf_pattern, - REG_NOTES (insn)); -} - -/* Emit instructions that transfer REG to or from the memory location (sp + - STACK_OFFSET). The register is stored in memory if ACCESSOR->OP is - FRV_STORE and loaded if it is FRV_LOAD. Only the prologue uses this - function to store registers and only the epilogue uses it to load them. - - The caller sets up ACCESSOR so that BASE is equal to (sp + BASE_OFFSET). - The generated instruction will use BASE as its base register. BASE may - simply be the stack pointer, but if several accesses are being made to a - region far away from the stack pointer, it may be more efficient to set - up a temporary instead. - - Store instructions will be frame-related and will be annotated with the - overall effect of the store. Load instructions will be followed by a - (use) to prevent later optimizations from zapping them. - - The function takes care of the moves to and from SPRs, using TEMP_REGNO - as a temporary in such cases. */ -static void -frv_frame_access (frv_frame_accessor_t *accessor, rtx reg, int stack_offset) -{ - enum machine_mode mode = GET_MODE (reg); - rtx mem = frv_frame_mem (mode, - accessor->base, - stack_offset - accessor->base_offset); - - if (accessor->op == FRV_LOAD) - { - if (SPR_P (REGNO (reg))) - { - rtx temp = gen_rtx_REG (mode, TEMP_REGNO); - emit_insn (gen_rtx_SET (VOIDmode, temp, mem)); - emit_insn (gen_rtx_SET (VOIDmode, reg, temp)); - } - else - emit_insn (gen_rtx_SET (VOIDmode, reg, mem)); - emit_insn (gen_rtx_USE (VOIDmode, reg)); - } - else - { - if (SPR_P (REGNO (reg))) - { - rtx temp = gen_rtx_REG (mode, TEMP_REGNO); - emit_insn (gen_rtx_SET (VOIDmode, temp, reg)); - frv_frame_insn (gen_rtx_SET (Pmode, mem, temp), - frv_dwarf_store (reg, stack_offset)); - } - else if (GET_MODE (reg) == DImode) - { - /* For DImode saves, the dwarf2 version needs to be a SEQUENCE - with a separate save for each register. */ - rtx reg1 = gen_rtx_REG (SImode, REGNO (reg)); - rtx reg2 = gen_rtx_REG (SImode, REGNO (reg) + 1); - rtx set1 = frv_dwarf_store (reg1, stack_offset); - rtx set2 = frv_dwarf_store (reg2, stack_offset + 4); - frv_frame_insn (gen_rtx_SET (Pmode, mem, reg), - gen_rtx_PARALLEL (VOIDmode, - gen_rtvec (2, set1, set2))); - } - else - frv_frame_insn (gen_rtx_SET (Pmode, mem, reg), - frv_dwarf_store (reg, stack_offset)); - } -} - -/* A function that uses frv_frame_access to transfer a group of registers to - or from the stack. ACCESSOR is passed directly to frv_frame_access, INFO - is the stack information generated by frv_stack_info, and REG_SET is the - number of the register set to transfer. */ -static void -frv_frame_access_multi (frv_frame_accessor_t *accessor, - frv_stack_t *info, - int reg_set) -{ - frv_stack_regs_t *regs_info; - int regno; - - regs_info = &info->regs[reg_set]; - for (regno = regs_info->first; regno <= regs_info->last; regno++) - if (info->save_p[regno]) - frv_frame_access (accessor, - info->save_p[regno] == REG_SAVE_2WORDS - ? gen_rtx_REG (DImode, regno) - : gen_rtx_REG (SImode, regno), - info->reg_offset[regno]); -} - -/* Save or restore callee-saved registers that are kept outside the frame - header. The function saves the registers if OP is FRV_STORE and restores - them if OP is FRV_LOAD. INFO is the stack information generated by - frv_stack_info. */ -static void -frv_frame_access_standard_regs (enum frv_stack_op op, frv_stack_t *info) -{ - frv_frame_accessor_t accessor; - - accessor.op = op; - accessor.base = stack_pointer_rtx; - accessor.base_offset = 0; - frv_frame_access_multi (&accessor, info, STACK_REGS_GPR); - frv_frame_access_multi (&accessor, info, STACK_REGS_FPR); - frv_frame_access_multi (&accessor, info, STACK_REGS_LCR); -} - - -/* Called after register allocation to add any instructions needed for the - prologue. Using a prologue insn is favored compared to putting all of the - instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler - to intermix instructions with the saves of the caller saved registers. In - some cases, it might be necessary to emit a barrier instruction as the last - insn to prevent such scheduling. - - Also any insns generated here should have RTX_FRAME_RELATED_P(insn) = 1 - so that the debug info generation code can handle them properly. */ -void -frv_expand_prologue (void) -{ - frv_stack_t *info = frv_stack_info (); - rtx sp = stack_pointer_rtx; - rtx fp = frame_pointer_rtx; - frv_frame_accessor_t accessor; - - if (TARGET_DEBUG_STACK) - frv_debug_stack (info); - - if (info->total_size == 0) - return; - - /* We're interested in three areas of the frame here: - - A: the register save area - B: the old FP - C: the header after B - - If the frame pointer isn't used, we'll have to set up A, B and C - using the stack pointer. If the frame pointer is used, we'll access - them as follows: - - A: set up using sp - B: set up using sp or a temporary (see below) - C: set up using fp - - We set up B using the stack pointer if the frame is small enough. - Otherwise, it's more efficient to copy the old stack pointer into a - temporary and use that. - - Note that it's important to make sure the prologue and epilogue use the - same registers to access A and C, since doing otherwise will confuse - the aliasing code. */ - - /* Set up ACCESSOR for accessing region B above. If the frame pointer - isn't used, the same method will serve for C. */ - accessor.op = FRV_STORE; - if (frame_pointer_needed && info->total_size > 2048) - { - rtx insn; - - accessor.base = gen_rtx_REG (Pmode, OLD_SP_REGNO); - accessor.base_offset = info->total_size; - insn = emit_insn (gen_movsi (accessor.base, sp)); - } - else - { - accessor.base = stack_pointer_rtx; - accessor.base_offset = 0; - } - - /* Allocate the stack space. */ - { - rtx asm_offset = frv_frame_offset_rtx (-info->total_size); - rtx dwarf_offset = GEN_INT (-info->total_size); - - frv_frame_insn (gen_stack_adjust (sp, sp, asm_offset), - gen_rtx_SET (Pmode, - sp, - gen_rtx_PLUS (Pmode, sp, dwarf_offset))); - } - - /* If the frame pointer is needed, store the old one at (sp + FP_OFFSET) - and point the new one to that location. */ - if (frame_pointer_needed) - { - int fp_offset = info->reg_offset[FRAME_POINTER_REGNUM]; - - /* ASM_SRC and DWARF_SRC both point to the frame header. ASM_SRC is - based on ACCESSOR.BASE but DWARF_SRC is always based on the stack - pointer. */ - rtx asm_src = plus_constant (accessor.base, - fp_offset - accessor.base_offset); - rtx dwarf_src = plus_constant (sp, fp_offset); - - /* Store the old frame pointer at (sp + FP_OFFSET). */ - frv_frame_access (&accessor, fp, fp_offset); - - /* Set up the new frame pointer. */ - frv_frame_insn (gen_rtx_SET (VOIDmode, fp, asm_src), - gen_rtx_SET (VOIDmode, fp, dwarf_src)); - - /* Access region C from the frame pointer. */ - accessor.base = fp; - accessor.base_offset = fp_offset; - } - - /* Set up region C. */ - frv_frame_access_multi (&accessor, info, STACK_REGS_STRUCT); - frv_frame_access_multi (&accessor, info, STACK_REGS_LR); - frv_frame_access_multi (&accessor, info, STACK_REGS_STDARG); - - /* Set up region A. */ - frv_frame_access_standard_regs (FRV_STORE, info); - - /* If this is a varargs/stdarg function, issue a blockage to prevent the - scheduler from moving loads before the stores saving the registers. */ - if (info->stdarg_size > 0) - emit_insn (gen_blockage ()); - - /* Set up pic register/small data register for this function. */ - if (flag_pic && cfun->uses_pic_offset_table) - emit_insn (gen_pic_prologue (gen_rtx_REG (Pmode, PIC_REGNO), - gen_rtx_REG (Pmode, LR_REGNO), - gen_rtx_REG (SImode, OFFSET_REGNO))); -} - - -/* Under frv, all of the work is done via frv_expand_epilogue, but - this function provides a convenient place to do cleanup. */ - -static void -frv_function_epilogue (FILE *file ATTRIBUTE_UNUSED, - HOST_WIDE_INT size ATTRIBUTE_UNUSED) -{ - frv_stack_cache = (frv_stack_t *)0; - - /* Zap last used registers for conditional execution. */ - memset (&frv_ifcvt.tmp_reg, 0, sizeof (frv_ifcvt.tmp_reg)); - - /* Release the bitmap of created insns. */ - BITMAP_XFREE (frv_ifcvt.scratch_insns_bitmap); -} - - -/* Called after register allocation to add any instructions needed for the - epilogue. Using an epilogue insn is favored compared to putting all of the - instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler - to intermix instructions with the saves of the caller saved registers. In - some cases, it might be necessary to emit a barrier instruction as the last - insn to prevent such scheduling. - - If SIBCALL_P is true, the final branch back to the calling function is - omitted, and is used for sibling call (aka tail call) sites. For sibcalls, - we must not clobber any arguments used for parameter passing or any stack - slots for arguments passed to the current function. */ - -void -frv_expand_epilogue (int sibcall_p) -{ - frv_stack_t *info = frv_stack_info (); - rtx fp = frame_pointer_rtx; - rtx sp = stack_pointer_rtx; - rtx return_addr; - int fp_offset; - - fp_offset = info->reg_offset[FRAME_POINTER_REGNUM]; - - /* Restore the stack pointer to its original value if alloca or the like - is used. */ - if (! current_function_sp_is_unchanging) - emit_insn (gen_addsi3 (sp, fp, frv_frame_offset_rtx (-fp_offset))); - - /* Restore the callee-saved registers that were used in this function. */ - frv_frame_access_standard_regs (FRV_LOAD, info); - - /* Set RETURN_ADDR to the address we should return to. Set it to NULL if - no return instruction should be emitted. */ - if (sibcall_p) - return_addr = 0; - else if (info->save_p[LR_REGNO]) - { - int lr_offset; - rtx mem; - - /* Use the same method to access the link register's slot as we did in - the prologue. In other words, use the frame pointer if available, - otherwise use the stack pointer. - - LR_OFFSET is the offset of the link register's slot from the start - of the frame and MEM is a memory rtx for it. */ - lr_offset = info->reg_offset[LR_REGNO]; - if (frame_pointer_needed) - mem = frv_frame_mem (Pmode, fp, lr_offset - fp_offset); - else - mem = frv_frame_mem (Pmode, sp, lr_offset); - - /* Load the old link register into a GPR. */ - return_addr = gen_rtx_REG (Pmode, TEMP_REGNO); - emit_insn (gen_rtx_SET (VOIDmode, return_addr, mem)); - } - else - return_addr = gen_rtx_REG (Pmode, LR_REGNO); - - /* Restore the old frame pointer. Emit a USE afterwards to make sure - the load is preserved. */ - if (frame_pointer_needed) - { - emit_insn (gen_rtx_SET (VOIDmode, fp, gen_rtx_MEM (Pmode, fp))); - emit_insn (gen_rtx_USE (VOIDmode, fp)); - } - - /* Deallocate the stack frame. */ - if (info->total_size != 0) - { - rtx offset = frv_frame_offset_rtx (info->total_size); - emit_insn (gen_stack_adjust (sp, sp, offset)); - } - - /* If this function uses eh_return, add the final stack adjustment now. */ - if (current_function_calls_eh_return) - emit_insn (gen_stack_adjust (sp, sp, EH_RETURN_STACKADJ_RTX)); - - if (return_addr) - emit_jump_insn (gen_epilogue_return (return_addr)); -} - - -/* A C compound statement that outputs the assembler code for a thunk function, - used to implement C++ virtual function calls with multiple inheritance. The - thunk acts as a wrapper around a virtual function, adjusting the implicit - object parameter before handing control off to the real function. - - First, emit code to add the integer DELTA to the location that contains the - incoming first argument. Assume that this argument contains a pointer, and - is the one used to pass the `this' pointer in C++. This is the incoming - argument *before* the function prologue, e.g. `%o0' on a sparc. The - addition must preserve the values of all other incoming arguments. - - After the addition, emit code to jump to FUNCTION, which is a - `FUNCTION_DECL'. This is a direct pure jump, not a call, and does not touch - the return address. Hence returning from FUNCTION will return to whoever - called the current `thunk'. - - The effect must be as if FUNCTION had been called directly with the adjusted - first argument. This macro is responsible for emitting all of the code for - a thunk function; `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE' are not - invoked. - - The THUNK_FNDECL is redundant. (DELTA and FUNCTION have already been - extracted from it.) It might possibly be useful on some targets, but - probably not. - - If you do not define this macro, the target-independent code in the C++ - frontend will generate a less efficient heavyweight thunk that calls - FUNCTION instead of jumping to it. The generic approach does not support - varargs. */ - -static void -frv_asm_output_mi_thunk (FILE *file, - tree thunk_fndecl ATTRIBUTE_UNUSED, - HOST_WIDE_INT delta, - HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED, - tree function) -{ - const char *name_func = XSTR (XEXP (DECL_RTL (function), 0), 0); - const char *name_arg0 = reg_names[FIRST_ARG_REGNUM]; - const char *name_jmp = reg_names[JUMP_REGNO]; - const char *parallel = ((PACKING_FLAG_USED_P ()) ? ".p" : ""); - - /* Do the add using an addi if possible. */ - if (IN_RANGE_P (delta, -2048, 2047)) - fprintf (file, "\taddi %s,#%d,%s\n", name_arg0, (int) delta, name_arg0); - else - { - const char *const name_add = reg_names[TEMP_REGNO]; - fprintf (file, "\tsethi%s #hi(" HOST_WIDE_INT_PRINT_DEC "),%s\n", - parallel, delta, name_add); - fprintf (file, "\tsetlo #lo(" HOST_WIDE_INT_PRINT_DEC "),%s\n", - delta, name_add); - fprintf (file, "\tadd %s,%s,%s\n", name_add, name_arg0, name_arg0); - } - - if (!flag_pic) - { - fprintf (file, "\tsethi%s #hi(", parallel); - assemble_name (file, name_func); - fprintf (file, "),%s\n", name_jmp); - - fprintf (file, "\tsetlo #lo("); - assemble_name (file, name_func); - fprintf (file, "),%s\n", name_jmp); - } - else - { - /* Use JUMP_REGNO as a temporary PIC register. */ - const char *name_lr = reg_names[LR_REGNO]; - const char *name_gppic = name_jmp; - const char *name_tmp = reg_names[TEMP_REGNO]; - - fprintf (file, "\tmovsg %s,%s\n", name_lr, name_tmp); - fprintf (file, "\tcall 1f\n"); - fprintf (file, "1:\tmovsg %s,%s\n", name_lr, name_gppic); - fprintf (file, "\tmovgs %s,%s\n", name_tmp, name_lr); - fprintf (file, "\tsethi%s #gprelhi(1b),%s\n", parallel, name_tmp); - fprintf (file, "\tsetlo #gprello(1b),%s\n", name_tmp); - fprintf (file, "\tsub %s,%s,%s\n", name_gppic, name_tmp, name_gppic); - - fprintf (file, "\tsethi%s #gprelhi(", parallel); - assemble_name (file, name_func); - fprintf (file, "),%s\n", name_tmp); - - fprintf (file, "\tsetlo #gprello("); - assemble_name (file, name_func); - fprintf (file, "),%s\n", name_tmp); - - fprintf (file, "\tadd %s,%s,%s\n", name_gppic, name_tmp, name_jmp); - } - - /* Jump to the function address. */ - fprintf (file, "\tjmpl @(%s,%s)\n", name_jmp, reg_names[GPR_FIRST+0]); -} - - -/* A C expression which is nonzero if a function must have and use a frame - pointer. This expression is evaluated in the reload pass. If its value is - nonzero the function will have a frame pointer. - - The expression can in principle examine the current function and decide - according to the facts, but on most machines the constant 0 or the constant - 1 suffices. Use 0 when the machine allows code to be generated with no - frame pointer, and doing so saves some time or space. Use 1 when there is - no possible advantage to avoiding a frame pointer. - - In certain cases, the compiler does not know how to produce valid code - without a frame pointer. The compiler recognizes those cases and - automatically gives the function a frame pointer regardless of what - `FRAME_POINTER_REQUIRED' says. You don't need to worry about them. - - In a function that does not require a frame pointer, the frame pointer - register can be allocated for ordinary usage, unless you mark it as a fixed - register. See `FIXED_REGISTERS' for more information. */ - -/* On frv, create a frame whenever we need to create stack. */ - -int -frv_frame_pointer_required (void) -{ - if (! current_function_is_leaf) - return TRUE; - - if (get_frame_size () != 0) - return TRUE; - - if (cfun->stdarg) - return TRUE; - - if (!current_function_sp_is_unchanging) - return TRUE; - - if (flag_pic && cfun->uses_pic_offset_table) - return TRUE; - - if (profile_flag) - return TRUE; - - if (cfun->machine->frame_needed) - return TRUE; - - return FALSE; -} - - -/* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It specifies the - initial difference between the specified pair of registers. This macro must - be defined if `ELIMINABLE_REGS' is defined. */ - -/* See frv_stack_info for more details on the frv stack frame. */ - -int -frv_initial_elimination_offset (int from, int to) -{ - frv_stack_t *info = frv_stack_info (); - int ret = 0; - - if (to == STACK_POINTER_REGNUM && from == ARG_POINTER_REGNUM) - ret = info->total_size - info->pretend_size; - - else if (to == STACK_POINTER_REGNUM && from == FRAME_POINTER_REGNUM) - ret = info->reg_offset[FRAME_POINTER_REGNUM]; - - else if (to == FRAME_POINTER_REGNUM && from == ARG_POINTER_REGNUM) - ret = (info->total_size - - info->reg_offset[FRAME_POINTER_REGNUM] - - info->pretend_size); - - else - abort (); - - if (TARGET_DEBUG_STACK) - fprintf (stderr, "Eliminate %s to %s by adding %d\n", - reg_names [from], reg_names[to], ret); - - return ret; -} - - -/* This macro offers an alternative to using `__builtin_saveregs' and defining - the macro `EXPAND_BUILTIN_SAVEREGS'. Use it to store the anonymous register - arguments into the stack so that all the arguments appear to have been - passed consecutively on the stack. Once this is done, you can use the - standard implementation of varargs that works for machines that pass all - their arguments on the stack. - - The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing - the values that obtain after processing of the named arguments. The - arguments MODE and TYPE describe the last named argument--its machine mode - and its data type as a tree node. - - The macro implementation should do two things: first, push onto the stack - all the argument registers *not* used for the named arguments, and second, - store the size of the data thus pushed into the `int'-valued variable whose - name is supplied as the argument PRETEND_ARGS_SIZE. The value that you - store here will serve as additional offset for setting up the stack frame. - - Because you must generate code to push the anonymous arguments at compile - time without knowing their data types, `SETUP_INCOMING_VARARGS' is only - useful on machines that have just a single category of argument register and - use it uniformly for all data types. - - If the argument SECOND_TIME is nonzero, it means that the arguments of the - function are being analyzed for the second time. This happens for an inline - function, which is not actually compiled until the end of the source file. - The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in - this case. */ - -void -frv_setup_incoming_varargs (CUMULATIVE_ARGS *cum, - enum machine_mode mode, - tree type ATTRIBUTE_UNUSED, - int *pretend_size, - int second_time) -{ - if (TARGET_DEBUG_ARG) - fprintf (stderr, - "setup_vararg: words = %2d, mode = %4s, pretend_size = %d, second_time = %d\n", - *cum, GET_MODE_NAME (mode), *pretend_size, second_time); -} - - -/* If defined, is a C expression that produces the machine-specific code for a - call to `__builtin_saveregs'. This code will be moved to the very beginning - of the function, before any parameter access are made. The return value of - this function should be an RTX that contains the value to use as the return - of `__builtin_saveregs'. - - If this macro is not defined, the compiler will output an ordinary call to - the library function `__builtin_saveregs'. */ - -rtx -frv_expand_builtin_saveregs (void) -{ - int offset = UNITS_PER_WORD * FRV_NUM_ARG_REGS; - - if (TARGET_DEBUG_ARG) - fprintf (stderr, "expand_builtin_saveregs: offset from ap = %d\n", - offset); - - return gen_rtx (PLUS, Pmode, virtual_incoming_args_rtx, GEN_INT (- offset)); -} - - -/* Expand __builtin_va_start to do the va_start macro. */ - -void -frv_expand_builtin_va_start (tree valist, rtx nextarg) -{ - tree t; - int num = cfun->args_info - FIRST_ARG_REGNUM - FRV_NUM_ARG_REGS; - - nextarg = gen_rtx_PLUS (Pmode, virtual_incoming_args_rtx, - GEN_INT (UNITS_PER_WORD * num)); - - if (TARGET_DEBUG_ARG) - { - fprintf (stderr, "va_start: args_info = %d, num = %d\n", - cfun->args_info, num); - - debug_rtx (nextarg); - } - - t = build (MODIFY_EXPR, TREE_TYPE (valist), valist, - make_tree (ptr_type_node, nextarg)); - TREE_SIDE_EFFECTS (t) = 1; - - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); -} - - -/* Expand __builtin_va_arg to do the va_arg macro. */ - -rtx -frv_expand_builtin_va_arg (tree valist, tree type) -{ - rtx addr; - rtx mem; - rtx reg; - - if (TARGET_DEBUG_ARG) - { - fprintf (stderr, "va_arg:\n"); - debug_tree (type); - } - - if (! AGGREGATE_TYPE_P (type)) - return std_expand_builtin_va_arg (valist, type); - - addr = std_expand_builtin_va_arg (valist, ptr_type_node); - mem = gen_rtx_MEM (Pmode, addr); - reg = gen_reg_rtx (Pmode); - - set_mem_alias_set (mem, get_varargs_alias_set ()); - emit_move_insn (reg, mem); - - return reg; -} - - -/* Expand a block move operation, and return 1 if successful. Return 0 - if we should let the compiler generate normal code. - - operands[0] is the destination - operands[1] is the source - operands[2] is the length - operands[3] is the alignment */ - -/* Maximum number of loads to do before doing the stores */ -#ifndef MAX_MOVE_REG -#define MAX_MOVE_REG 4 -#endif - -/* Maximum number of total loads to do. */ -#ifndef TOTAL_MOVE_REG -#define TOTAL_MOVE_REG 8 -#endif - -int -frv_expand_block_move (rtx operands[]) -{ - rtx orig_dest = operands[0]; - rtx orig_src = operands[1]; - rtx bytes_rtx = operands[2]; - rtx align_rtx = operands[3]; - int constp = (GET_CODE (bytes_rtx) == CONST_INT); - int align; - int bytes; - int offset; - int num_reg; - int i; - rtx src_reg; - rtx dest_reg; - rtx src_addr; - rtx dest_addr; - rtx src_mem; - rtx dest_mem; - rtx tmp_reg; - rtx stores[MAX_MOVE_REG]; - int move_bytes; - enum machine_mode mode; - - /* If this is not a fixed size move, just call memcpy. */ - if (! constp) - return FALSE; - - /* If this is not a fixed size alignment, abort. */ - if (GET_CODE (align_rtx) != CONST_INT) - abort (); - - align = INTVAL (align_rtx); - - /* Anything to move? */ - bytes = INTVAL (bytes_rtx); - if (bytes <= 0) - return TRUE; - - /* Don't support real large moves. */ - if (bytes > TOTAL_MOVE_REG*align) - return FALSE; - - /* Move the address into scratch registers. */ - dest_reg = copy_addr_to_reg (XEXP (orig_dest, 0)); - src_reg = copy_addr_to_reg (XEXP (orig_src, 0)); - - num_reg = offset = 0; - for ( ; bytes > 0; (bytes -= move_bytes), (offset += move_bytes)) - { - /* Calculate the correct offset for src/dest. */ - if (offset == 0) - { - src_addr = src_reg; - dest_addr = dest_reg; - } - else - { - src_addr = plus_constant (src_reg, offset); - dest_addr = plus_constant (dest_reg, offset); - } - - /* Generate the appropriate load and store, saving the stores - for later. */ - if (bytes >= 4 && align >= 4) - mode = SImode; - else if (bytes >= 2 && align >= 2) - mode = HImode; - else - mode = QImode; - - move_bytes = GET_MODE_SIZE (mode); - tmp_reg = gen_reg_rtx (mode); - src_mem = change_address (orig_src, mode, src_addr); - dest_mem = change_address (orig_dest, mode, dest_addr); - emit_insn (gen_rtx_SET (VOIDmode, tmp_reg, src_mem)); - stores[num_reg++] = gen_rtx_SET (VOIDmode, dest_mem, tmp_reg); - - if (num_reg >= MAX_MOVE_REG) - { - for (i = 0; i < num_reg; i++) - emit_insn (stores[i]); - num_reg = 0; - } - } - - for (i = 0; i < num_reg; i++) - emit_insn (stores[i]); - - return TRUE; -} - - -/* Expand a block clear operation, and return 1 if successful. Return 0 - if we should let the compiler generate normal code. - - operands[0] is the destination - operands[1] is the length - operands[2] is the alignment */ - -int -frv_expand_block_clear (rtx operands[]) -{ - rtx orig_dest = operands[0]; - rtx bytes_rtx = operands[1]; - rtx align_rtx = operands[2]; - int constp = (GET_CODE (bytes_rtx) == CONST_INT); - int align; - int bytes; - int offset; - int num_reg; - rtx dest_reg; - rtx dest_addr; - rtx dest_mem; - int clear_bytes; - enum machine_mode mode; - - /* If this is not a fixed size move, just call memcpy. */ - if (! constp) - return FALSE; - - /* If this is not a fixed size alignment, abort. */ - if (GET_CODE (align_rtx) != CONST_INT) - abort (); - - align = INTVAL (align_rtx); - - /* Anything to move? */ - bytes = INTVAL (bytes_rtx); - if (bytes <= 0) - return TRUE; - - /* Don't support real large clears. */ - if (bytes > TOTAL_MOVE_REG*align) - return FALSE; - - /* Move the address into a scratch register. */ - dest_reg = copy_addr_to_reg (XEXP (orig_dest, 0)); - - num_reg = offset = 0; - for ( ; bytes > 0; (bytes -= clear_bytes), (offset += clear_bytes)) - { - /* Calculate the correct offset for src/dest. */ - dest_addr = ((offset == 0) - ? dest_reg - : plus_constant (dest_reg, offset)); - - /* Generate the appropriate store of gr0. */ - if (bytes >= 4 && align >= 4) - mode = SImode; - else if (bytes >= 2 && align >= 2) - mode = HImode; - else - mode = QImode; - - clear_bytes = GET_MODE_SIZE (mode); - dest_mem = change_address (orig_dest, mode, dest_addr); - emit_insn (gen_rtx_SET (VOIDmode, dest_mem, const0_rtx)); - } - - return TRUE; -} - - -/* The following variable is used to output modifiers of assembler - code of the current output insn. */ - -static rtx *frv_insn_operands; - -/* The following function is used to add assembler insn code suffix .p - if it is necessary. */ - -const char * -frv_asm_output_opcode (FILE *f, const char *ptr) -{ - int c; - - if (! PACKING_FLAG_USED_P()) - return ptr; - - for (; *ptr && *ptr != ' ' && *ptr != '\t';) - { - c = *ptr++; - if (c == '%' && ((*ptr >= 'a' && *ptr <= 'z') - || (*ptr >= 'A' && *ptr <= 'Z'))) - { - int letter = *ptr++; - - c = atoi (ptr); - frv_print_operand (f, frv_insn_operands [c], letter); - while ((c = *ptr) >= '0' && c <= '9') - ptr++; - } - else - fputc (c, f); - } - - if (!frv_insn_packing_flag) - fprintf (f, ".p"); - - return ptr; -} - -/* The following function sets up the packing bit for the current - output insn. Remember that the function is not called for asm - insns. */ - -void -frv_final_prescan_insn (rtx insn, rtx *opvec, int noperands ATTRIBUTE_UNUSED) -{ - if (! PACKING_FLAG_USED_P()) - return; - - if (!INSN_P (insn)) - return; - - frv_insn_operands = opvec; - - /* Look for the next printable instruction. frv_pack_insns () has set - things up so that any printable instruction will have TImode if it - starts a new packet and VOIDmode if it should be packed with the - previous instruction. - - Printable instructions will be asm_operands or match one of the .md - patterns. Since asm instructions cannot be packed -- and will - therefore have TImode -- this loop terminates on any recognizable - instruction, and on any unrecognizable instruction with TImode. */ - for (insn = NEXT_INSN (insn); insn; insn = NEXT_INSN (insn)) - { - if (NOTE_P (insn)) - continue; - else if (!INSN_P (insn)) - break; - else if (GET_MODE (insn) == TImode || INSN_CODE (insn) != -1) - break; - } - - /* Set frv_insn_packing_flag to FALSE if the next instruction should - be packed with this one. Set it to TRUE otherwise. If the next - instruction is an asm instruction, this statement will set the - flag to TRUE, and that value will still hold when the asm operands - themselves are printed. */ - frv_insn_packing_flag = ! (insn && INSN_P (insn) - && GET_MODE (insn) != TImode); -} - - - -/* A C expression whose value is RTL representing the address in a stack frame - where the pointer to the caller's frame is stored. Assume that FRAMEADDR is - an RTL expression for the address of the stack frame itself. - - If you don't define this macro, the default is to return the value of - FRAMEADDR--that is, the stack frame address is also the address of the stack - word that points to the previous frame. */ - -/* The default is correct, but we need to make sure the frame gets created. */ -rtx -frv_dynamic_chain_address (rtx frame) -{ - cfun->machine->frame_needed = 1; - return frame; -} - - -/* A C expression whose value is RTL representing the value of the return - address for the frame COUNT steps up from the current frame, after the - prologue. FRAMEADDR is the frame pointer of the COUNT frame, or the frame - pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME' is - defined. - - The value of the expression must always be the correct address when COUNT is - zero, but may be `NULL_RTX' if there is not way to determine the return - address of other frames. */ - -rtx -frv_return_addr_rtx (int count ATTRIBUTE_UNUSED, rtx frame) -{ - cfun->machine->frame_needed = 1; - return gen_rtx_MEM (Pmode, plus_constant (frame, 8)); -} - -/* Given a memory reference MEMREF, interpret the referenced memory as - an array of MODE values, and return a reference to the element - specified by INDEX. Assume that any pre-modification implicit in - MEMREF has already happened. - - MEMREF must be a legitimate operand for modes larger than SImode. - GO_IF_LEGITIMATE_ADDRESS forbids register+register addresses, which - this function cannot handle. */ -rtx -frv_index_memory (rtx memref, enum machine_mode mode, int index) -{ - rtx base = XEXP (memref, 0); - if (GET_CODE (base) == PRE_MODIFY) - base = XEXP (base, 0); - return change_address (memref, mode, - plus_constant (base, index * GET_MODE_SIZE (mode))); -} - - -/* Print a memory address as an operand to reference that memory location. */ -void -frv_print_operand_address (FILE * stream, rtx x) -{ - if (GET_CODE (x) == MEM) - x = XEXP (x, 0); - - switch (GET_CODE (x)) - { - case REG: - fputs (reg_names [ REGNO (x)], stream); - return; - - case CONST_INT: - fprintf (stream, "%ld", (long) INTVAL (x)); - return; - - case SYMBOL_REF: - assemble_name (stream, XSTR (x, 0)); - return; - - case LABEL_REF: - case CONST: - output_addr_const (stream, x); - return; - - default: - break; - } - - fatal_insn ("Bad insn to frv_print_operand_address:", x); -} - - -static void -frv_print_operand_memory_reference_reg (FILE * stream, rtx x) -{ - int regno = true_regnum (x); - if (GPR_P (regno)) - fputs (reg_names[regno], stream); - else - fatal_insn ("Bad register to frv_print_operand_memory_reference_reg:", x); -} - -/* Print a memory reference suitable for the ld/st instructions. */ - -static void -frv_print_operand_memory_reference (FILE * stream, rtx x, int addr_offset) -{ - rtx x0 = NULL_RTX; - rtx x1 = NULL_RTX; - - switch (GET_CODE (x)) - { - case SUBREG: - case REG: - x0 = x; - break; - - case PRE_MODIFY: /* (pre_modify (reg) (plus (reg) (reg))) */ - x0 = XEXP (x, 0); - x1 = XEXP (XEXP (x, 1), 1); - break; - - case CONST_INT: - x1 = x; - break; - - case PLUS: - x0 = XEXP (x, 0); - x1 = XEXP (x, 1); - if (GET_CODE (x0) == CONST_INT) - { - x0 = XEXP (x, 1); - x1 = XEXP (x, 0); - } - break; - - default: - fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); - break; - - } - - if (addr_offset) - { - if (!x1) - x1 = const0_rtx; - else if (GET_CODE (x1) != CONST_INT) - fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); - } - - fputs ("@(", stream); - if (!x0) - fputs (reg_names[GPR_R0], stream); - else if (GET_CODE (x0) == REG || GET_CODE (x0) == SUBREG) - frv_print_operand_memory_reference_reg (stream, x0); - else - fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); - - fputs (",", stream); - if (!x1) - fputs (reg_names [GPR_R0], stream); - - else - { - switch (GET_CODE (x1)) - { - case SUBREG: - case REG: - frv_print_operand_memory_reference_reg (stream, x1); - break; - - case CONST_INT: - fprintf (stream, "%ld", (long) (INTVAL (x1) + addr_offset)); - break; - - case SYMBOL_REF: - if (x0 && GET_CODE (x0) == REG && REGNO (x0) == SDA_BASE_REG - && SYMBOL_REF_SMALL_P (x1)) - { - fputs ("#gprel12(", stream); - assemble_name (stream, XSTR (x1, 0)); - fputs (")", stream); - } - else - fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); - break; - - case CONST: - if (x0 && GET_CODE (x0) == REG && REGNO (x0) == SDA_BASE_REG - && const_small_data_p (x1)) - { - fputs ("#gprel12(", stream); - assemble_name (stream, XSTR (XEXP (XEXP (x1, 0), 0), 0)); - fprintf (stream, "+"HOST_WIDE_INT_PRINT_DEC")", - INTVAL (XEXP (XEXP (x1, 0), 1))); - } - else - fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); - break; - - default: - fatal_insn ("Bad insn to frv_print_operand_memory_reference:", x); - } - } - - fputs (")", stream); -} - - -/* Return 2 for likely branches and 0 for non-likely branches */ - -#define FRV_JUMP_LIKELY 2 -#define FRV_JUMP_NOT_LIKELY 0 - -static int -frv_print_operand_jump_hint (rtx insn) -{ - rtx note; - rtx labelref; - int ret; - HOST_WIDE_INT prob = -1; - enum { UNKNOWN, BACKWARD, FORWARD } jump_type = UNKNOWN; - - if (GET_CODE (insn) != JUMP_INSN) - abort (); - - /* Assume any non-conditional jump is likely. */ - if (! any_condjump_p (insn)) - ret = FRV_JUMP_LIKELY; - - else - { - labelref = condjump_label (insn); - if (labelref) - { - rtx label = XEXP (labelref, 0); - jump_type = (insn_current_address > INSN_ADDRESSES (INSN_UID (label)) - ? BACKWARD - : FORWARD); - } - - note = find_reg_note (insn, REG_BR_PROB, 0); - if (!note) - ret = ((jump_type == BACKWARD) ? FRV_JUMP_LIKELY : FRV_JUMP_NOT_LIKELY); - - else - { - prob = INTVAL (XEXP (note, 0)); - ret = ((prob >= (REG_BR_PROB_BASE / 2)) - ? FRV_JUMP_LIKELY - : FRV_JUMP_NOT_LIKELY); - } - } - -#if 0 - if (TARGET_DEBUG) - { - char *direction; - - switch (jump_type) - { - default: - case UNKNOWN: direction = "unknown jump direction"; break; - case BACKWARD: direction = "jump backward"; break; - case FORWARD: direction = "jump forward"; break; - } - - fprintf (stderr, - "%s: uid %ld, %s, probability = %ld, max prob. = %ld, hint = %d\n", - IDENTIFIER_POINTER (DECL_NAME (current_function_decl)), - (long)INSN_UID (insn), direction, (long)prob, - (long)REG_BR_PROB_BASE, ret); - } -#endif - - return ret; -} - - -/* Print an operand to an assembler instruction. - - `%' followed by a letter and a digit says to output an operand in an - alternate fashion. Four letters have standard, built-in meanings described - below. The machine description macro `PRINT_OPERAND' can define additional - letters with nonstandard meanings. - - `%cDIGIT' can be used to substitute an operand that is a constant value - without the syntax that normally indicates an immediate operand. - - `%nDIGIT' is like `%cDIGIT' except that the value of the constant is negated - before printing. - - `%aDIGIT' can be used to substitute an operand as if it were a memory - reference, with the actual operand treated as the address. This may be - useful when outputting a "load address" instruction, because often the - assembler syntax for such an instruction requires you to write the operand - as if it were a memory reference. - - `%lDIGIT' is used to substitute a `label_ref' into a jump instruction. - - `%=' outputs a number which is unique to each instruction in the entire - compilation. This is useful for making local labels to be referred to more - than once in a single template that generates multiple assembler - instructions. - - `%' followed by a punctuation character specifies a substitution that does - not use an operand. Only one case is standard: `%%' outputs a `%' into the - assembler code. Other nonstandard cases can be defined in the - `PRINT_OPERAND' macro. You must also define which punctuation characters - are valid with the `PRINT_OPERAND_PUNCT_VALID_P' macro. */ - -void -frv_print_operand (FILE * file, rtx x, int code) -{ - HOST_WIDE_INT value; - int offset; - - if (code != 0 && !isalpha (code)) - value = 0; - - else if (GET_CODE (x) == CONST_INT) - value = INTVAL (x); - - else if (GET_CODE (x) == CONST_DOUBLE) - { - if (GET_MODE (x) == SFmode) - { - REAL_VALUE_TYPE rv; - long l; - - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); - value = l; - } - - else if (GET_MODE (x) == VOIDmode) - value = CONST_DOUBLE_LOW (x); - - else - fatal_insn ("Bad insn in frv_print_operand, bad const_double", x); - } - - else - value = 0; - - switch (code) - { - - case '.': - /* Output r0. */ - fputs (reg_names[GPR_R0], file); - break; - - case '#': - fprintf (file, "%d", frv_print_operand_jump_hint (current_output_insn)); - break; - - case '@': - /* Output small data area base register (gr16). */ - fputs (reg_names[SDA_BASE_REG], file); - break; - - case '~': - /* Output pic register (gr17). */ - fputs (reg_names[PIC_REGNO], file); - break; - - case '*': - /* Output the temporary integer CCR register. */ - fputs (reg_names[ICR_TEMP], file); - break; - - case '&': - /* Output the temporary integer CC register. */ - fputs (reg_names[ICC_TEMP], file); - break; - - /* case 'a': print an address. */ - - case 'C': - /* Print appropriate test for integer branch false operation. */ - switch (GET_CODE (x)) - { - default: - fatal_insn ("Bad insn to frv_print_operand, 'C' modifier:", x); - - case EQ: fputs ("ne", file); break; - case NE: fputs ("eq", file); break; - case LT: fputs ("ge", file); break; - case LE: fputs ("gt", file); break; - case GT: fputs ("le", file); break; - case GE: fputs ("lt", file); break; - case LTU: fputs ("nc", file); break; - case LEU: fputs ("hi", file); break; - case GTU: fputs ("ls", file); break; - case GEU: fputs ("c", file); break; - } - break; - - /* case 'c': print a constant without the constant prefix. If - CONSTANT_ADDRESS_P(x) is not true, PRINT_OPERAND is called. */ - - case 'c': - /* Print appropriate test for integer branch true operation. */ - switch (GET_CODE (x)) - { - default: - fatal_insn ("Bad insn to frv_print_operand, 'c' modifier:", x); - - case EQ: fputs ("eq", file); break; - case NE: fputs ("ne", file); break; - case LT: fputs ("lt", file); break; - case LE: fputs ("le", file); break; - case GT: fputs ("gt", file); break; - case GE: fputs ("ge", file); break; - case LTU: fputs ("c", file); break; - case LEU: fputs ("ls", file); break; - case GTU: fputs ("hi", file); break; - case GEU: fputs ("nc", file); break; - } - break; - - case 'e': - /* Print 1 for a NE and 0 for an EQ to give the final argument - for a conditional instruction. */ - if (GET_CODE (x) == NE) - fputs ("1", file); - - else if (GET_CODE (x) == EQ) - fputs ("0", file); - - else - fatal_insn ("Bad insn to frv_print_operand, 'e' modifier:", x); - break; - - case 'F': - /* Print appropriate test for floating point branch false operation. */ - switch (GET_CODE (x)) - { - default: - fatal_insn ("Bad insn to frv_print_operand, 'F' modifier:", x); - - case EQ: fputs ("ne", file); break; - case NE: fputs ("eq", file); break; - case LT: fputs ("uge", file); break; - case LE: fputs ("ug", file); break; - case GT: fputs ("ule", file); break; - case GE: fputs ("ul", file); break; - } - break; - - case 'f': - /* Print appropriate test for floating point branch true operation. */ - switch (GET_CODE (x)) - { - default: - fatal_insn ("Bad insn to frv_print_operand, 'f' modifier:", x); - - case EQ: fputs ("eq", file); break; - case NE: fputs ("ne", file); break; - case LT: fputs ("lt", file); break; - case LE: fputs ("le", file); break; - case GT: fputs ("gt", file); break; - case GE: fputs ("ge", file); break; - } - break; - - case 'I': - /* Print 'i' if the operand is a constant, or is a memory reference that - adds a constant. */ - if (GET_CODE (x) == MEM) - x = ((GET_CODE (XEXP (x, 0)) == PLUS) - ? XEXP (XEXP (x, 0), 1) - : XEXP (x, 0)); - - switch (GET_CODE (x)) - { - default: - break; - - case CONST_INT: - case SYMBOL_REF: - case CONST: - fputs ("i", file); - break; - } - break; - - case 'i': - /* For jump instructions, print 'i' if the operand is a constant or - is an expression that adds a constant. */ - if (GET_CODE (x) == CONST_INT) - fputs ("i", file); - - else - { - if (GET_CODE (x) == CONST_INT - || (GET_CODE (x) == PLUS - && (GET_CODE (XEXP (x, 1)) == CONST_INT - || GET_CODE (XEXP (x, 0)) == CONST_INT))) - fputs ("i", file); - } - break; - - case 'L': - /* Print the lower register of a double word register pair */ - if (GET_CODE (x) == REG) - fputs (reg_names[ REGNO (x)+1 ], file); - else - fatal_insn ("Bad insn to frv_print_operand, 'L' modifier:", x); - break; - - /* case 'l': print a LABEL_REF. */ - - case 'M': - case 'N': - /* Print a memory reference for ld/st/jmp, %N prints a memory reference - for the second word of double memory operations. */ - offset = (code == 'M') ? 0 : UNITS_PER_WORD; - switch (GET_CODE (x)) - { - default: - fatal_insn ("Bad insn to frv_print_operand, 'M/N' modifier:", x); - - case MEM: - frv_print_operand_memory_reference (file, XEXP (x, 0), offset); - break; - - case REG: - case SUBREG: - case CONST_INT: - case PLUS: - case SYMBOL_REF: - frv_print_operand_memory_reference (file, x, offset); - break; - } - break; - - case 'O': - /* Print the opcode of a command. */ - switch (GET_CODE (x)) - { - default: - fatal_insn ("Bad insn to frv_print_operand, 'O' modifier:", x); - - case PLUS: fputs ("add", file); break; - case MINUS: fputs ("sub", file); break; - case AND: fputs ("and", file); break; - case IOR: fputs ("or", file); break; - case XOR: fputs ("xor", file); break; - case ASHIFT: fputs ("sll", file); break; - case ASHIFTRT: fputs ("sra", file); break; - case LSHIFTRT: fputs ("srl", file); break; - } - break; - - /* case 'n': negate and print a constant int. */ - - case 'P': - /* Print PIC label using operand as the number. */ - if (GET_CODE (x) != CONST_INT) - fatal_insn ("Bad insn to frv_print_operand, P modifier:", x); - - fprintf (file, ".LCF%ld", (long)INTVAL (x)); - break; - - case 'U': - /* Print 'u' if the operand is a update load/store. */ - if (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == PRE_MODIFY) - fputs ("u", file); - break; - - case 'z': - /* If value is 0, print gr0, otherwise it must be a register. */ - if (GET_CODE (x) == CONST_INT && INTVAL (x) == 0) - fputs (reg_names[GPR_R0], file); - - else if (GET_CODE (x) == REG) - fputs (reg_names [REGNO (x)], file); - - else - fatal_insn ("Bad insn in frv_print_operand, z case", x); - break; - - case 'x': - /* Print constant in hex. */ - if (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE) - { - fprintf (file, "%s0x%.4lx", IMMEDIATE_PREFIX, (long) value); - break; - } - - /* Fall through. */ - - case '\0': - if (GET_CODE (x) == REG) - fputs (reg_names [REGNO (x)], file); - - else if (GET_CODE (x) == CONST_INT - || GET_CODE (x) == CONST_DOUBLE) - fprintf (file, "%s%ld", IMMEDIATE_PREFIX, (long) value); - - else if (GET_CODE (x) == MEM) - frv_print_operand_address (file, XEXP (x, 0)); - - else if (CONSTANT_ADDRESS_P (x)) - frv_print_operand_address (file, x); - - else - fatal_insn ("Bad insn in frv_print_operand, 0 case", x); - - break; - - default: - fatal_insn ("frv_print_operand: unknown code", x); - break; - } - - return; -} - - -/* A C statement (sans semicolon) for initializing the variable CUM for the - state at the beginning of the argument list. The variable has type - `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type - of the function which will receive the args, or 0 if the args are to a - compiler support library function. The value of INDIRECT is nonzero when - processing an indirect call, for example a call through a function pointer. - The value of INDIRECT is zero for a call to an explicitly named function, a - library function call, or when `INIT_CUMULATIVE_ARGS' is used to find - arguments for the function being compiled. - - When processing a call to a compiler support library function, LIBNAME - identifies which one. It is a `symbol_ref' rtx which contains the name of - the function, as a string. LIBNAME is 0 when an ordinary C function call is - being processed. Thus, each time this macro is called, either LIBNAME or - FNTYPE is nonzero, but never both of them at once. */ - -void -frv_init_cumulative_args (CUMULATIVE_ARGS *cum, - tree fntype, - rtx libname, - tree fndecl, - int incoming) -{ - *cum = FIRST_ARG_REGNUM; - - if (TARGET_DEBUG_ARG) - { - fprintf (stderr, "\ninit_cumulative_args:"); - if (!fndecl && fntype) - fputs (" indirect", stderr); - - if (incoming) - fputs (" incoming", stderr); - - if (fntype) - { - tree ret_type = TREE_TYPE (fntype); - fprintf (stderr, " return=%s,", - tree_code_name[ (int)TREE_CODE (ret_type) ]); - } - - if (libname && GET_CODE (libname) == SYMBOL_REF) - fprintf (stderr, " libname=%s", XSTR (libname, 0)); - - if (cfun->returns_struct) - fprintf (stderr, " return-struct"); - - putc ('\n', stderr); - } -} - - -/* If defined, a C expression that gives the alignment boundary, in bits, of an - argument with the specified mode and type. If it is not defined, - `PARM_BOUNDARY' is used for all arguments. */ - -int -frv_function_arg_boundary (enum machine_mode mode ATTRIBUTE_UNUSED, - tree type ATTRIBUTE_UNUSED) -{ - return BITS_PER_WORD; -} - - -/* A C expression that controls whether a function argument is passed in a - register, and which register. - - The arguments are CUM, of type CUMULATIVE_ARGS, which summarizes (in a way - defined by INIT_CUMULATIVE_ARGS and FUNCTION_ARG_ADVANCE) all of the previous - arguments so far passed in registers; MODE, the machine mode of the argument; - TYPE, the data type of the argument as a tree node or 0 if that is not known - (which happens for C support library functions); and NAMED, which is 1 for an - ordinary argument and 0 for nameless arguments that correspond to `...' in the - called function's prototype. - - The value of the expression should either be a `reg' RTX for the hard - register in which to pass the argument, or zero to pass the argument on the - stack. - - For machines like the VAX and 68000, where normally all arguments are - pushed, zero suffices as a definition. - - The usual way to make the ANSI library `stdarg.h' work on a machine where - some arguments are usually passed in registers, is to cause nameless - arguments to be passed on the stack instead. This is done by making - `FUNCTION_ARG' return 0 whenever NAMED is 0. - - You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of - this macro to determine if this argument is of a type that must be passed in - the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' - returns nonzero for such an argument, the compiler will abort. If - `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the - stack and then loaded into a register. */ - -rtx -frv_function_arg (CUMULATIVE_ARGS *cum, - enum machine_mode mode, - tree type ATTRIBUTE_UNUSED, - int named, - int incoming ATTRIBUTE_UNUSED) -{ - enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; - int arg_num = *cum; - rtx ret; - const char *debstr; - - /* Return a marker for use in the call instruction. */ - if (xmode == VOIDmode) - { - ret = const0_rtx; - debstr = "<0>"; - } - - else if (arg_num <= LAST_ARG_REGNUM) - { - ret = gen_rtx (REG, xmode, arg_num); - debstr = reg_names[arg_num]; - } - - else - { - ret = NULL_RTX; - debstr = "memory"; - } - - if (TARGET_DEBUG_ARG) - fprintf (stderr, - "function_arg: words = %2d, mode = %4s, named = %d, size = %3d, arg = %s\n", - arg_num, GET_MODE_NAME (mode), named, GET_MODE_SIZE (mode), debstr); - - return ret; -} - - -/* A C statement (sans semicolon) to update the summarizer variable CUM to - advance past an argument in the argument list. The values MODE, TYPE and - NAMED describe that argument. Once this is done, the variable CUM is - suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. - - This macro need not do anything if the argument in question was passed on - the stack. The compiler knows how to track the amount of stack space used - for arguments without any special help. */ - -void -frv_function_arg_advance (CUMULATIVE_ARGS *cum, - enum machine_mode mode, - tree type ATTRIBUTE_UNUSED, - int named) -{ - enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; - int bytes = GET_MODE_SIZE (xmode); - int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; - int arg_num = *cum; - - *cum = arg_num + words; - - if (TARGET_DEBUG_ARG) - fprintf (stderr, - "function_adv: words = %2d, mode = %4s, named = %d, size = %3d\n", - arg_num, GET_MODE_NAME (mode), named, words * UNITS_PER_WORD); -} - - -/* A C expression for the number of words, at the beginning of an argument, - must be put in registers. The value must be zero for arguments that are - passed entirely in registers or that are entirely pushed on the stack. - - On some machines, certain arguments must be passed partially in registers - and partially in memory. On these machines, typically the first N words of - arguments are passed in registers, and the rest on the stack. If a - multi-word argument (a `double' or a structure) crosses that boundary, its - first few words must be passed in registers and the rest must be pushed. - This macro tells the compiler when this occurs, and how many of the words - should go in registers. - - `FUNCTION_ARG' for these arguments should return the first register to be - used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for - the called function. */ - -int -frv_function_arg_partial_nregs (CUMULATIVE_ARGS *cum, - enum machine_mode mode, - tree type ATTRIBUTE_UNUSED, - int named ATTRIBUTE_UNUSED) -{ - enum machine_mode xmode = (mode == BLKmode) ? SImode : mode; - int bytes = GET_MODE_SIZE (xmode); - int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; - int arg_num = *cum; - int ret; - - ret = ((arg_num <= LAST_ARG_REGNUM && arg_num + words > LAST_ARG_REGNUM+1) - ? LAST_ARG_REGNUM - arg_num + 1 - : 0); - - if (TARGET_DEBUG_ARG && ret) - fprintf (stderr, "function_arg_partial_nregs: %d\n", ret); - - return ret; - -} - - - -/* A C expression that indicates when an argument must be passed by reference. - If nonzero for an argument, a copy of that argument is made in memory and a - pointer to the argument is passed instead of the argument itself. The - pointer is passed in whatever way is appropriate for passing a pointer to - that type. - - On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable - definition of this macro might be - #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - MUST_PASS_IN_STACK (MODE, TYPE) */ - -int -frv_function_arg_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, - enum machine_mode mode, - tree type, - int named ATTRIBUTE_UNUSED) -{ - return MUST_PASS_IN_STACK (mode, type); -} - -/* If defined, a C expression that indicates when it is the called function's - responsibility to make a copy of arguments passed by invisible reference. - Normally, the caller makes a copy and passes the address of the copy to the - routine being called. When FUNCTION_ARG_CALLEE_COPIES is defined and is - nonzero, the caller does not make a copy. Instead, it passes a pointer to - the "live" value. The called function must not modify this value. If it - can be determined that the value won't be modified, it need not make a copy; - otherwise a copy must be made. */ - -int -frv_function_arg_callee_copies (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, - enum machine_mode mode ATTRIBUTE_UNUSED, - tree type ATTRIBUTE_UNUSED, - int named ATTRIBUTE_UNUSED) -{ - return 0; -} - -/* If defined, a C expression that indicates when it is more desirable to keep - an argument passed by invisible reference as a reference, rather than - copying it to a pseudo register. */ - -int -frv_function_arg_keep_as_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, - enum machine_mode mode ATTRIBUTE_UNUSED, - tree type ATTRIBUTE_UNUSED, - int named ATTRIBUTE_UNUSED) -{ - return 0; -} - - -/* Return true if a register is ok to use as a base or index register. */ - -static FRV_INLINE int -frv_regno_ok_for_base_p (int regno, int strict_p) -{ - if (GPR_P (regno)) - return TRUE; - - if (strict_p) - return (reg_renumber[regno] >= 0 && GPR_P (reg_renumber[regno])); - - if (regno == ARG_POINTER_REGNUM) - return TRUE; - - return (regno >= FIRST_PSEUDO_REGISTER); -} - - -/* A C compound statement with a conditional `goto LABEL;' executed if X (an - RTX) is a legitimate memory address on the target machine for a memory - operand of mode MODE. - - It usually pays to define several simpler macros to serve as subroutines for - this one. Otherwise it may be too complicated to understand. - - This macro must exist in two variants: a strict variant and a non-strict - one. The strict variant is used in the reload pass. It must be defined so - that any pseudo-register that has not been allocated a hard register is - considered a memory reference. In contexts where some kind of register is - required, a pseudo-register with no hard register must be rejected. - - The non-strict variant is used in other passes. It must be defined to - accept all pseudo-registers in every context where some kind of register is - required. - - Compiler source files that want to use the strict variant of this macro - define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' - conditional to define the strict variant in that case and the non-strict - variant otherwise. - - Subroutines to check for acceptable registers for various purposes (one for - base registers, one for index registers, and so on) are typically among the - subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these - subroutine macros need have two variants; the higher levels of macros may be - the same whether strict or not. - - Normally, constant addresses which are the sum of a `symbol_ref' and an - integer are stored inside a `const' RTX to mark them as constant. - Therefore, there is no need to recognize such sums specifically as - legitimate addresses. Normally you would simply recognize any `const' as - legitimate. - - Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that - are not marked with `const'. It assumes that a naked `plus' indicates - indexing. If so, then you *must* reject such naked constant sums as - illegitimate addresses, so that none of them will be given to - `PRINT_OPERAND_ADDRESS'. - - On some machines, whether a symbolic address is legitimate depends on the - section that the address refers to. On these machines, define the macro - `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and - then check for it here. When you see a `const', you will have to look - inside it to find the `symbol_ref' in order to determine the section. - - The best way to modify the name string is by adding text to the beginning, - with suitable punctuation to prevent any ambiguity. Allocate the new name - in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to - remove and decode the added text and output the name accordingly, and define - `(* targetm.strip_name_encoding)' to access the original name string. - - You can check the information stored here into the `symbol_ref' in the - definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and - `PRINT_OPERAND_ADDRESS'. */ - -int -frv_legitimate_address_p (enum machine_mode mode, - rtx x, - int strict_p, - int condexec_p) -{ - rtx x0, x1; - int ret = 0; - HOST_WIDE_INT value; - unsigned regno0; - - switch (GET_CODE (x)) - { - default: - break; - - case SUBREG: - x = SUBREG_REG (x); - if (GET_CODE (x) != REG) - break; - - /* Fall through. */ - - case REG: - ret = frv_regno_ok_for_base_p (REGNO (x), strict_p); - break; - - case PRE_MODIFY: - x0 = XEXP (x, 0); - x1 = XEXP (x, 1); - if (GET_CODE (x0) != REG - || ! frv_regno_ok_for_base_p (REGNO (x0), strict_p) - || GET_CODE (x1) != PLUS - || ! rtx_equal_p (x0, XEXP (x1, 0)) - || GET_CODE (XEXP (x1, 1)) != REG - || ! frv_regno_ok_for_base_p (REGNO (XEXP (x1, 1)), strict_p)) - break; - - ret = 1; - break; - - case CONST_INT: - /* 12 bit immediate */ - if (condexec_p) - ret = FALSE; - else - { - ret = IN_RANGE_P (INTVAL (x), -2048, 2047); - - /* If we can't use load/store double operations, make sure we can - address the second word. */ - if (ret && GET_MODE_SIZE (mode) > UNITS_PER_WORD) - ret = IN_RANGE_P (INTVAL (x) + GET_MODE_SIZE (mode) - 1, - -2048, 2047); - } - break; - - case PLUS: - x0 = XEXP (x, 0); - x1 = XEXP (x, 1); - - if (GET_CODE (x0) == SUBREG) - x0 = SUBREG_REG (x0); - - if (GET_CODE (x0) != REG) - break; - - regno0 = REGNO (x0); - if (!frv_regno_ok_for_base_p (regno0, strict_p)) - break; - - switch (GET_CODE (x1)) - { - default: - break; - - case SUBREG: - x1 = SUBREG_REG (x1); - if (GET_CODE (x1) != REG) - break; - - /* Fall through. */ - - case REG: - /* Do not allow reg+reg addressing for modes > 1 word if we - can't depend on having move double instructions. */ - if (GET_MODE_SIZE (mode) > UNITS_PER_WORD) - ret = FALSE; - else - ret = frv_regno_ok_for_base_p (REGNO (x1), strict_p); - break; - - case CONST_INT: - /* 12 bit immediate */ - if (condexec_p) - ret = FALSE; - else - { - value = INTVAL (x1); - ret = IN_RANGE_P (value, -2048, 2047); - - /* If we can't use load/store double operations, make sure we can - address the second word. */ - if (ret && GET_MODE_SIZE (mode) > UNITS_PER_WORD) - ret = IN_RANGE_P (value + GET_MODE_SIZE (mode) - 1, -2048, 2047); - } - break; - - case SYMBOL_REF: - if (!condexec_p - && regno0 == SDA_BASE_REG - && SYMBOL_REF_SMALL_P (x1)) - ret = TRUE; - break; - - case CONST: - if (!condexec_p && regno0 == SDA_BASE_REG && const_small_data_p (x1)) - ret = TRUE; - break; - - } - break; - } - - if (TARGET_DEBUG_ADDR) - { - fprintf (stderr, "\n========== GO_IF_LEGITIMATE_ADDRESS, mode = %s, result = %d, addresses are %sstrict%s\n", - GET_MODE_NAME (mode), ret, (strict_p) ? "" : "not ", - (condexec_p) ? ", inside conditional code" : ""); - debug_rtx (x); - } - - return ret; -} - - -/* A C compound statement that attempts to replace X with a valid memory - address for an operand of mode MODE. WIN will be a C statement label - elsewhere in the code; the macro definition may use - - GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); - - to avoid further processing if the address has become legitimate. - - X will always be the result of a call to `break_out_memory_refs', and OLDX - will be the operand that was given to that function to produce X. - - The code generated by this macro should not alter the substructure of X. If - it transforms X into a more legitimate form, it should assign X (which will - always be a C variable) a new value. - - It is not necessary for this macro to come up with a legitimate address. - The compiler has standard ways of doing so in all cases. In fact, it is - safe for this macro to do nothing. But often a machine-dependent strategy - can generate better code. */ - -rtx -frv_legitimize_address (rtx x, - rtx oldx ATTRIBUTE_UNUSED, - enum machine_mode mode ATTRIBUTE_UNUSED) -{ - rtx ret = NULL_RTX; - - /* Don't try to legitimize addresses if we are not optimizing, since the - address we generate is not a general operand, and will horribly mess - things up when force_reg is called to try and put it in a register because - we aren't optimizing. */ - if (optimize - && ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_SMALL_P (x)) - || (GET_CODE (x) == CONST && const_small_data_p (x)))) - { - ret = gen_rtx_PLUS (Pmode, gen_rtx_REG (Pmode, SDA_BASE_REG), x); - if (flag_pic) - cfun->uses_pic_offset_table = TRUE; - } - - if (TARGET_DEBUG_ADDR && ret != NULL_RTX) - { - fprintf (stderr, "\n========== LEGITIMIZE_ADDRESS, mode = %s, modified address\n", - GET_MODE_NAME (mode)); - debug_rtx (ret); - } - - return ret; -} - -/* Return 1 if operand is a valid FRV address. CONDEXEC_P is true if - the operand is used by a predicated instruction. */ - -static int -frv_legitimate_memory_operand (rtx op, enum machine_mode mode, int condexec_p) -{ - return ((GET_MODE (op) == mode || mode == VOIDmode) - && GET_CODE (op) == MEM - && frv_legitimate_address_p (mode, XEXP (op, 0), - reload_completed, condexec_p)); -} - - -/* Return 1 is OP is a memory operand, or will be turned into one by - reload. */ - -int -frv_load_operand (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (reload_in_progress) - { - rtx tmp = op; - if (GET_CODE (tmp) == SUBREG) - tmp = SUBREG_REG (tmp); - if (GET_CODE (tmp) == REG - && REGNO (tmp) >= FIRST_PSEUDO_REGISTER) - op = reg_equiv_memory_loc[REGNO (tmp)]; - } - - return op && memory_operand (op, mode); -} - - -/* Return 1 if operand is a GPR register or a FPR register. */ - -int -gpr_or_fpr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (GPR_P (regno) || FPR_P (regno) || regno >= FIRST_PSEUDO_REGISTER) - return TRUE; - - return FALSE; -} - -/* Return 1 if operand is a GPR register or 12 bit signed immediate. */ - -int -gpr_or_int12_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT) - return IN_RANGE_P (INTVAL (op), -2048, 2047); - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - return GPR_OR_PSEUDO_P (REGNO (op)); -} - -/* Return 1 if operand is a GPR register, or a FPR register, or a 12 bit - signed immediate. */ - -int -gpr_fpr_or_int12_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_CODE (op) == CONST_INT) - return IN_RANGE_P (INTVAL (op), -2048, 2047); - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (GPR_P (regno) || FPR_P (regno) || regno >= FIRST_PSEUDO_REGISTER) - return TRUE; - - return FALSE; -} - -/* Return 1 if operand is a register or 6 bit signed immediate. */ - -int -fpr_or_int6_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT) - return IN_RANGE_P (INTVAL (op), -32, 31); - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - return FPR_OR_PSEUDO_P (REGNO (op)); -} - -/* Return 1 if operand is a register or 10 bit signed immediate. */ - -int -gpr_or_int10_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT) - return IN_RANGE_P (INTVAL (op), -512, 511); - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - return GPR_OR_PSEUDO_P (REGNO (op)); -} - -/* Return 1 if operand is a register or an integer immediate. */ - -int -gpr_or_int_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) == CONST_INT) - return TRUE; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - return GPR_OR_PSEUDO_P (REGNO (op)); -} - -/* Return 1 if operand is a 12 bit signed immediate. */ - -int -int12_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) != CONST_INT) - return FALSE; - - return IN_RANGE_P (INTVAL (op), -2048, 2047); -} - -/* Return 1 if operand is a 6 bit signed immediate. */ - -int -int6_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) != CONST_INT) - return FALSE; - - return IN_RANGE_P (INTVAL (op), -32, 31); -} - -/* Return 1 if operand is a 5 bit signed immediate. */ - -int -int5_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), -16, 15); -} - -/* Return 1 if operand is a 5 bit unsigned immediate. */ - -int -uint5_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), 0, 31); -} - -/* Return 1 if operand is a 4 bit unsigned immediate. */ - -int -uint4_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), 0, 15); -} - -/* Return 1 if operand is a 1 bit unsigned immediate (0 or 1). */ - -int -uint1_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - return GET_CODE (op) == CONST_INT && IN_RANGE_P (INTVAL (op), 0, 1); -} - -/* Return 1 if operand is an integer constant that takes 2 instructions - to load up and can be split into sethi/setlo instructions.. */ - -int -int_2word_operand(rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - HOST_WIDE_INT value; - REAL_VALUE_TYPE rv; - long l; - - switch (GET_CODE (op)) - { - default: - break; - - case LABEL_REF: - return (flag_pic == 0); - - case CONST: - /* small data references are already 1 word */ - return (flag_pic == 0) && (! const_small_data_p (op)); - - case SYMBOL_REF: - /* small data references are already 1 word */ - return (flag_pic == 0) && (! SYMBOL_REF_SMALL_P (op)); - - case CONST_INT: - return ! IN_RANGE_P (INTVAL (op), -32768, 32767); - - case CONST_DOUBLE: - if (GET_MODE (op) == SFmode) - { - REAL_VALUE_FROM_CONST_DOUBLE (rv, op); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); - value = l; - return ! IN_RANGE_P (value, -32768, 32767); - } - else if (GET_MODE (op) == VOIDmode) - { - value = CONST_DOUBLE_LOW (op); - return ! IN_RANGE_P (value, -32768, 32767); - } - break; - } - - return FALSE; -} - -/* Return 1 if operand is the pic address register. */ -int -pic_register_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (! flag_pic) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - if (REGNO (op) != PIC_REGNO) - return FALSE; - - return TRUE; -} - -/* Return 1 if operand is a symbolic reference when a PIC option is specified - that takes 3 separate instructions to form. */ - -int -pic_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (! flag_pic) - return FALSE; - - switch (GET_CODE (op)) - { - default: - break; - - case LABEL_REF: - return TRUE; - - case SYMBOL_REF: - /* small data references are already 1 word */ - return ! SYMBOL_REF_SMALL_P (op); - - case CONST: - /* small data references are already 1 word */ - return ! const_small_data_p (op); - } - - return FALSE; -} - -/* Return 1 if operand is the small data register. */ -int -small_data_register_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) != REG) - return FALSE; - - if (REGNO (op) != SDA_BASE_REG) - return FALSE; - - return TRUE; -} - -/* Return 1 if operand is a symbolic reference to a small data area static or - global object. */ - -int -small_data_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - switch (GET_CODE (op)) - { - default: - break; - - case CONST: - return const_small_data_p (op); - - case SYMBOL_REF: - return SYMBOL_REF_SMALL_P (op); - } - - return FALSE; -} - -/* Return 1 if operand is a 16 bit unsigned immediate. */ - -int -uint16_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) != CONST_INT) - return FALSE; - - return IN_RANGE_P (INTVAL (op), 0, 0xffff); -} - -/* Return 1 if operand is an integer constant with the bottom 16 bits - clear. */ - -int -upper_int16_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) -{ - if (GET_CODE (op) != CONST_INT) - return FALSE; - - return ((INTVAL (op) & 0xffff) == 0); -} - -/* Return true if operand is a GPR register. */ - -int -integer_register_operand (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - return GPR_OR_PSEUDO_P (REGNO (op)); -} - -/* Return true if operand is a GPR register. Do not allow SUBREG's - here, in order to prevent a combine bug. */ - -int -gpr_no_subreg_operand (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - return GPR_OR_PSEUDO_P (REGNO (op)); -} - -/* Return true if operand is a FPR register. */ - -int -fpr_operand (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - return FPR_OR_PSEUDO_P (REGNO (op)); -} - -/* Return true if operand is an even GPR or FPR register. */ - -int -even_reg_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (regno >= FIRST_PSEUDO_REGISTER) - return TRUE; - - if (GPR_P (regno)) - return (((regno - GPR_FIRST) & 1) == 0); - - if (FPR_P (regno)) - return (((regno - FPR_FIRST) & 1) == 0); - - return FALSE; -} - -/* Return true if operand is an odd GPR register. */ - -int -odd_reg_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - /* Assume that reload will give us an even register. */ - if (regno >= FIRST_PSEUDO_REGISTER) - return FALSE; - - if (GPR_P (regno)) - return (((regno - GPR_FIRST) & 1) != 0); - - if (FPR_P (regno)) - return (((regno - FPR_FIRST) & 1) != 0); - - return FALSE; -} - -/* Return true if operand is an even GPR register. */ - -int -even_gpr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (regno >= FIRST_PSEUDO_REGISTER) - return TRUE; - - if (! GPR_P (regno)) - return FALSE; - - return (((regno - GPR_FIRST) & 1) == 0); -} - -/* Return true if operand is an odd GPR register. */ - -int -odd_gpr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - /* Assume that reload will give us an even register. */ - if (regno >= FIRST_PSEUDO_REGISTER) - return FALSE; - - if (! GPR_P (regno)) - return FALSE; - - return (((regno - GPR_FIRST) & 1) != 0); -} - -/* Return true if operand is a quad aligned FPR register. */ - -int -quad_fpr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (regno >= FIRST_PSEUDO_REGISTER) - return TRUE; - - if (! FPR_P (regno)) - return FALSE; - - return (((regno - FPR_FIRST) & 3) == 0); -} - -/* Return true if operand is an even FPR register. */ - -int -even_fpr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (regno >= FIRST_PSEUDO_REGISTER) - return TRUE; - - if (! FPR_P (regno)) - return FALSE; - - return (((regno - FPR_FIRST) & 1) == 0); -} - -/* Return true if operand is an odd FPR register. */ - -int -odd_fpr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - /* Assume that reload will give us an even register. */ - if (regno >= FIRST_PSEUDO_REGISTER) - return FALSE; - - if (! FPR_P (regno)) - return FALSE; - - return (((regno - FPR_FIRST) & 1) != 0); -} - -/* Return true if operand is a 2 word memory address that can be loaded in one - instruction to load or store. We assume the stack and frame pointers are - suitably aligned, and variables in the small data area. FIXME -- at some we - should recognize other globals and statics. We can't assume that any old - pointer is aligned, given that arguments could be passed on an odd word on - the stack and the address taken and passed through to another function. */ - -int -dbl_memory_one_insn_operand (rtx op, enum machine_mode mode) -{ - rtx addr; - rtx addr_reg; - - if (! TARGET_DWORD) - return FALSE; - - if (GET_CODE (op) != MEM) - return FALSE; - - if (mode != VOIDmode && GET_MODE_SIZE (mode) != 2*UNITS_PER_WORD) - return FALSE; - - addr = XEXP (op, 0); - if (GET_CODE (addr) == REG) - addr_reg = addr; - - else if (GET_CODE (addr) == PLUS) - { - rtx addr0 = XEXP (addr, 0); - rtx addr1 = XEXP (addr, 1); - - if (GET_CODE (addr0) != REG) - return FALSE; - - if (plus_small_data_p (addr0, addr1)) - return TRUE; - - if (GET_CODE (addr1) != CONST_INT) - return FALSE; - - if ((INTVAL (addr1) & 7) != 0) - return FALSE; - - addr_reg = addr0; - } - - else - return FALSE; - - if (addr_reg == frame_pointer_rtx || addr_reg == stack_pointer_rtx) - return TRUE; - - return FALSE; -} - -/* Return true if operand is a 2 word memory address that needs to - use two instructions to load or store. */ - -int -dbl_memory_two_insn_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) != MEM) - return FALSE; - - if (mode != VOIDmode && GET_MODE_SIZE (mode) != 2*UNITS_PER_WORD) - return FALSE; - - if (! TARGET_DWORD) - return TRUE; - - return ! dbl_memory_one_insn_operand (op, mode); -} - -/* Return true if operand is something that can be an output for a move - operation. */ - -int -move_destination_operand (rtx op, enum machine_mode mode) -{ - rtx subreg; - enum rtx_code code; - - switch (GET_CODE (op)) - { - default: - break; - - case SUBREG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - subreg = SUBREG_REG (op); - code = GET_CODE (subreg); - if (code == MEM) - return frv_legitimate_address_p (mode, XEXP (subreg, 0), - reload_completed, FALSE); - - return (code == REG); - - case REG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - return TRUE; - - case MEM: - if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) - return TRUE; - - return frv_legitimate_memory_operand (op, mode, FALSE); - } - - return FALSE; -} - -/* Return true if operand is something that can be an input for a move - operation. */ - -int -move_source_operand (rtx op, enum machine_mode mode) -{ - rtx subreg; - enum rtx_code code; - - switch (GET_CODE (op)) - { - default: - break; - - case CONST_INT: - case CONST_DOUBLE: - case SYMBOL_REF: - case LABEL_REF: - case CONST: - return immediate_operand (op, mode); - - case SUBREG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - subreg = SUBREG_REG (op); - code = GET_CODE (subreg); - if (code == MEM) - return frv_legitimate_address_p (mode, XEXP (subreg, 0), - reload_completed, FALSE); - - return (code == REG); - - case REG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - return TRUE; - - case MEM: - if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) - return TRUE; - - return frv_legitimate_memory_operand (op, mode, FALSE); - } - - return FALSE; -} - -/* Return true if operand is something that can be an output for a conditional - move operation. */ - -int -condexec_dest_operand (rtx op, enum machine_mode mode) -{ - rtx subreg; - enum rtx_code code; - - switch (GET_CODE (op)) - { - default: - break; - - case SUBREG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - subreg = SUBREG_REG (op); - code = GET_CODE (subreg); - if (code == MEM) - return frv_legitimate_address_p (mode, XEXP (subreg, 0), - reload_completed, TRUE); - - return (code == REG); - - case REG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - return TRUE; - - case MEM: - if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) - return TRUE; - - return frv_legitimate_memory_operand (op, mode, TRUE); - } - - return FALSE; -} - -/* Return true if operand is something that can be an input for a conditional - move operation. */ - -int -condexec_source_operand (rtx op, enum machine_mode mode) -{ - rtx subreg; - enum rtx_code code; - - switch (GET_CODE (op)) - { - default: - break; - - case CONST_INT: - case CONST_DOUBLE: - return ZERO_P (op); - - case SUBREG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - subreg = SUBREG_REG (op); - code = GET_CODE (subreg); - if (code == MEM) - return frv_legitimate_address_p (mode, XEXP (subreg, 0), - reload_completed, TRUE); - - return (code == REG); - - case REG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - return TRUE; - - case MEM: - if (GET_CODE (XEXP (op, 0)) == ADDRESSOF) - return TRUE; - - return frv_legitimate_memory_operand (op, mode, TRUE); - } - - return FALSE; -} - -/* Return true if operand is a register of any flavor or a 0 of the - appropriate type. */ - -int -reg_or_0_operand (rtx op, enum machine_mode mode) -{ - switch (GET_CODE (op)) - { - default: - break; - - case REG: - case SUBREG: - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - return register_operand (op, mode); - - case CONST_INT: - case CONST_DOUBLE: - return ZERO_P (op); - } - - return FALSE; -} - -/* Return true if operand is the link register. */ - -int -lr_operand (rtx op, enum machine_mode mode) -{ - if (GET_CODE (op) != REG) - return FALSE; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (REGNO (op) != LR_REGNO && REGNO (op) < FIRST_PSEUDO_REGISTER) - return FALSE; - - return TRUE; -} - -/* Return true if operand is a gpr register or a valid memory operation. */ - -int -gpr_or_memory_operand (rtx op, enum machine_mode mode) -{ - return (integer_register_operand (op, mode) - || frv_legitimate_memory_operand (op, mode, FALSE)); -} - -/* Return true if operand is a fpr register or a valid memory operation. */ - -int -fpr_or_memory_operand (rtx op, enum machine_mode mode) -{ - return (fpr_operand (op, mode) - || frv_legitimate_memory_operand (op, mode, FALSE)); -} - -/* Return true if operand is an icc register. */ - -int -icc_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - return ICC_OR_PSEUDO_P (regno); -} - -/* Return true if operand is an fcc register. */ - -int -fcc_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - return FCC_OR_PSEUDO_P (regno); -} - -/* Return true if operand is either an fcc or icc register. */ - -int -cc_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (CC_OR_PSEUDO_P (regno)) - return TRUE; - - return FALSE; -} - -/* Return true if operand is an integer CCR register. */ - -int -icr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - return ICR_OR_PSEUDO_P (regno); -} - -/* Return true if operand is an fcc register. */ - -int -fcr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - return FCR_OR_PSEUDO_P (regno); -} - -/* Return true if operand is either an fcc or icc register. */ - -int -cr_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - if (CR_OR_PSEUDO_P (regno)) - return TRUE; - - return FALSE; -} - -/* Return true if operand is a memory reference suitable for a call. */ - -int -call_operand (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode && GET_CODE (op) != CONST_INT) - return FALSE; - - if (GET_CODE (op) == SYMBOL_REF) - return TRUE; - - /* Note this doesn't allow reg+reg or reg+imm12 addressing (which should - never occur anyway), but prevents reload from not handling the case - properly of a call through a pointer on a function that calls - vfork/setjmp, etc. due to the need to flush all of the registers to stack. */ - return gpr_or_int12_operand (op, mode); -} - -/* Return true if operator is a kind of relational operator. */ - -int -relational_operator (rtx op, enum machine_mode mode) -{ - rtx op0; - rtx op1; - int regno; - - if (mode != VOIDmode && mode != GET_MODE (op)) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case EQ: - case NE: - case LE: - case LT: - case GE: - case GT: - case LEU: - case LTU: - case GEU: - case GTU: - break; - } - - op1 = XEXP (op, 1); - if (op1 != const0_rtx) - return FALSE; - - op0 = XEXP (op, 0); - if (GET_CODE (op0) != REG) - return FALSE; - - regno = REGNO (op0); - switch (GET_MODE (op0)) - { - default: - break; - - case CCmode: - case CC_UNSmode: - return ICC_OR_PSEUDO_P (regno); - - case CC_FPmode: - return FCC_OR_PSEUDO_P (regno); - - case CC_CCRmode: - return CR_OR_PSEUDO_P (regno); - } - - return FALSE; -} - -/* Return true if operator is a signed integer relational operator. */ - -int -signed_relational_operator (rtx op, enum machine_mode mode) -{ - rtx op0; - rtx op1; - int regno; - - if (mode != VOIDmode && mode != GET_MODE (op)) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case EQ: - case NE: - case LE: - case LT: - case GE: - case GT: - break; - } - - op1 = XEXP (op, 1); - if (op1 != const0_rtx) - return FALSE; - - op0 = XEXP (op, 0); - if (GET_CODE (op0) != REG) - return FALSE; - - regno = REGNO (op0); - if (GET_MODE (op0) == CCmode && ICC_OR_PSEUDO_P (regno)) - return TRUE; - - if (GET_MODE (op0) == CC_CCRmode && CR_OR_PSEUDO_P (regno)) - return TRUE; - - return FALSE; -} - -/* Return true if operator is a signed integer relational operator. */ - -int -unsigned_relational_operator (rtx op, enum machine_mode mode) -{ - rtx op0; - rtx op1; - int regno; - - if (mode != VOIDmode && mode != GET_MODE (op)) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case LEU: - case LTU: - case GEU: - case GTU: - break; - } - - op1 = XEXP (op, 1); - if (op1 != const0_rtx) - return FALSE; - - op0 = XEXP (op, 0); - if (GET_CODE (op0) != REG) - return FALSE; - - regno = REGNO (op0); - if (GET_MODE (op0) == CC_UNSmode && ICC_OR_PSEUDO_P (regno)) - return TRUE; - - if (GET_MODE (op0) == CC_CCRmode && CR_OR_PSEUDO_P (regno)) - return TRUE; - - return FALSE; -} - -/* Return true if operator is a floating point relational operator. */ - -int -float_relational_operator (rtx op, enum machine_mode mode) -{ - rtx op0; - rtx op1; - int regno; - - if (mode != VOIDmode && mode != GET_MODE (op)) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case EQ: case NE: - case LE: case LT: - case GE: case GT: -#if 0 - case UEQ: case UNE: - case ULE: case ULT: - case UGE: case UGT: - case ORDERED: - case UNORDERED: -#endif - break; - } - - op1 = XEXP (op, 1); - if (op1 != const0_rtx) - return FALSE; - - op0 = XEXP (op, 0); - if (GET_CODE (op0) != REG) - return FALSE; - - regno = REGNO (op0); - if (GET_MODE (op0) == CC_FPmode && FCC_OR_PSEUDO_P (regno)) - return TRUE; - - if (GET_MODE (op0) == CC_CCRmode && CR_OR_PSEUDO_P (regno)) - return TRUE; - - return FALSE; -} - -/* Return true if operator is EQ/NE of a conditional execution register. */ - -int -ccr_eqne_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - rtx op0; - rtx op1; - int regno; - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case EQ: - case NE: - break; - } - - op1 = XEXP (op, 1); - if (op1 != const0_rtx) - return FALSE; - - op0 = XEXP (op, 0); - if (GET_CODE (op0) != REG) - return FALSE; - - regno = REGNO (op0); - if (op_mode == CC_CCRmode && CR_OR_PSEUDO_P (regno)) - return TRUE; - - return FALSE; -} - -/* Return true if operator is a minimum or maximum operator (both signed and - unsigned). */ - -int -minmax_operator (rtx op, enum machine_mode mode) -{ - if (mode != VOIDmode && mode != GET_MODE (op)) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case SMIN: - case SMAX: - case UMIN: - case UMAX: - break; - } - - if (! integer_register_operand (XEXP (op, 0), mode)) - return FALSE; - - if (! gpr_or_int10_operand (XEXP (op, 1), mode)) - return FALSE; - - return TRUE; -} - -/* Return true if operator is an integer binary operator that can executed - conditionally and takes 1 cycle. */ - -int -condexec_si_binary_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case PLUS: - case MINUS: - case AND: - case IOR: - case XOR: - case ASHIFT: - case ASHIFTRT: - case LSHIFTRT: - return TRUE; - } -} - -/* Return true if operator is an integer binary operator that can be - executed conditionally by a media instruction. */ - -int -condexec_si_media_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case AND: - case IOR: - case XOR: - return TRUE; - } -} - -/* Return true if operator is an integer division operator that can executed - conditionally. */ - -int -condexec_si_divide_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case DIV: - case UDIV: - return TRUE; - } -} - -/* Return true if operator is an integer unary operator that can executed - conditionally. */ - -int -condexec_si_unary_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case NEG: - case NOT: - return TRUE; - } -} - -/* Return true if operator is a conversion-type expression that can be - evaluated conditionally by floating-point instructions. */ - -int -condexec_sf_conv_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case NEG: - case ABS: - return TRUE; - } -} - -/* Return true if operator is an addition or subtraction expression. - Such expressions can be evaluated conditionally by floating-point - instructions. */ - -int -condexec_sf_add_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case PLUS: - case MINUS: - return TRUE; - } -} - -/* Return true if the memory operand is one that can be conditionally - executed. */ - -int -condexec_memory_operand (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - rtx addr; - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (op_mode) - { - default: - return FALSE; - - case QImode: - case HImode: - case SImode: - case SFmode: - break; - } - - if (GET_CODE (op) != MEM) - return FALSE; - - addr = XEXP (op, 0); - if (GET_CODE (addr) == ADDRESSOF) - return TRUE; - - return frv_legitimate_address_p (mode, addr, reload_completed, TRUE); -} - -/* Return true if operator is an integer binary operator that can be combined - with a setcc operation. Do not allow the arithmetic operations that could - potentially overflow since the FR-V sets the condition code based on the - "true" value of the result, not the result after truncating to a 32-bit - register. */ - -int -intop_compare_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case AND: - case IOR: - case XOR: - case ASHIFTRT: - case LSHIFTRT: - break; - } - - if (! integer_register_operand (XEXP (op, 0), SImode)) - return FALSE; - - if (! gpr_or_int10_operand (XEXP (op, 1), SImode)) - return FALSE; - - return TRUE; -} - -/* Return true if operator is an integer binary operator that can be combined - with a setcc operation inside of a conditional execution. */ - -int -condexec_intop_cmp_operator (rtx op, enum machine_mode mode) -{ - enum machine_mode op_mode = GET_MODE (op); - - if (mode != VOIDmode && op_mode != mode) - return FALSE; - - switch (GET_CODE (op)) - { - default: - return FALSE; - - case AND: - case IOR: - case XOR: - case ASHIFTRT: - case LSHIFTRT: - break; - } - - if (! integer_register_operand (XEXP (op, 0), SImode)) - return FALSE; - - if (! integer_register_operand (XEXP (op, 1), SImode)) - return FALSE; - - return TRUE; -} - -/* Return 1 if operand is a valid ACC register number. */ - -int -acc_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - return ACC_OR_PSEUDO_P (regno); -} - -/* Return 1 if operand is a valid even ACC register number. */ - -int -even_acc_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - return (ACC_OR_PSEUDO_P (regno) && ((regno - ACC_FIRST) & 1) == 0); -} - -/* Return 1 if operand is zero or four. */ - -int -quad_acc_operand (rtx op, enum machine_mode mode) -{ - int regno; - - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - regno = REGNO (op); - return (ACC_OR_PSEUDO_P (regno) && ((regno - ACC_FIRST) & 3) == 0); -} - -/* Return 1 if operand is a valid ACCG register number. */ - -int -accg_operand (rtx op, enum machine_mode mode) -{ - if (GET_MODE (op) != mode && mode != VOIDmode) - return FALSE; - - if (GET_CODE (op) == SUBREG) - { - if (GET_CODE (SUBREG_REG (op)) != REG) - return register_operand (op, mode); - - op = SUBREG_REG (op); - } - - if (GET_CODE (op) != REG) - return FALSE; - - return ACCG_OR_PSEUDO_P (REGNO (op)); -} - - -/* Return true if the bare return instruction can be used outside of the - epilog code. For frv, we only do it if there was no stack allocation. */ - -int -direct_return_p (void) -{ - frv_stack_t *info; - - if (!reload_completed) - return FALSE; - - info = frv_stack_info (); - return (info->total_size == 0); -} - - -/* Emit code to handle a MOVSI, adding in the small data register or pic - register if needed to load up addresses. Return TRUE if the appropriate - instructions are emitted. */ - -int -frv_emit_movsi (rtx dest, rtx src) -{ - int base_regno = -1; - - if (!reload_in_progress - && !reload_completed - && !register_operand (dest, SImode) - && (!reg_or_0_operand (src, SImode) - /* Virtual registers will almost always be replaced by an - add instruction, so expose this to CSE by copying to - an intermediate register. */ - || (GET_CODE (src) == REG - && IN_RANGE_P (REGNO (src), - FIRST_VIRTUAL_REGISTER, - LAST_VIRTUAL_REGISTER)))) - { - emit_insn (gen_rtx_SET (VOIDmode, dest, copy_to_mode_reg (SImode, src))); - return TRUE; - } - - /* Explicitly add in the PIC or small data register if needed. */ - switch (GET_CODE (src)) - { - default: - break; - - case LABEL_REF: - if (flag_pic) - base_regno = PIC_REGNO; - - break; - - case CONST: - if (const_small_data_p (src)) - base_regno = SDA_BASE_REG; - - else if (flag_pic) - base_regno = PIC_REGNO; - - break; - - case SYMBOL_REF: - if (SYMBOL_REF_SMALL_P (src)) - base_regno = SDA_BASE_REG; - - else if (flag_pic) - base_regno = PIC_REGNO; - - break; - } - - if (base_regno >= 0) - { - emit_insn (gen_rtx_SET (VOIDmode, dest, - gen_rtx_PLUS (Pmode, - gen_rtx_REG (Pmode, base_regno), - src))); - - if (base_regno == PIC_REGNO) - cfun->uses_pic_offset_table = TRUE; - - return TRUE; - } - - return FALSE; -} - - -/* Return a string to output a single word move. */ - -const char * -output_move_single (rtx operands[], rtx insn) -{ - rtx dest = operands[0]; - rtx src = operands[1]; - - if (GET_CODE (dest) == REG) - { - int dest_regno = REGNO (dest); - enum machine_mode mode = GET_MODE (dest); - - if (GPR_P (dest_regno)) - { - if (GET_CODE (src) == REG) - { - /* gpr <- some sort of register */ - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - return "mov %1, %0"; - - else if (FPR_P (src_regno)) - return "movfg %1, %0"; - - else if (SPR_P (src_regno)) - return "movsg %1, %0"; - } - - else if (GET_CODE (src) == MEM) - { - /* gpr <- memory */ - switch (mode) - { - default: - break; - - case QImode: - return "ldsb%I1%U1 %M1,%0"; - - case HImode: - return "ldsh%I1%U1 %M1,%0"; - - case SImode: - case SFmode: - return "ld%I1%U1 %M1, %0"; - } - } - - else if (GET_CODE (src) == CONST_INT - || GET_CODE (src) == CONST_DOUBLE) - { - /* gpr <- integer/floating constant */ - HOST_WIDE_INT value; - - if (GET_CODE (src) == CONST_INT) - value = INTVAL (src); - - else if (mode == SFmode) - { - REAL_VALUE_TYPE rv; - long l; - - REAL_VALUE_FROM_CONST_DOUBLE (rv, src); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); - value = l; - } - - else - value = CONST_DOUBLE_LOW (src); - - if (IN_RANGE_P (value, -32768, 32767)) - return "setlos %1, %0"; - - return "#"; - } - - else if (GET_CODE (src) == SYMBOL_REF - || GET_CODE (src) == LABEL_REF - || GET_CODE (src) == CONST) - { - /* Silently fix up instances where the small data pointer is not - used in the address. */ - if (small_data_symbolic_operand (src, GET_MODE (src))) - return "addi %@, #gprel12(%1), %0"; - - return "#"; - } - } - - else if (FPR_P (dest_regno)) - { - if (GET_CODE (src) == REG) - { - /* fpr <- some sort of register */ - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - return "movgf %1, %0"; - - else if (FPR_P (src_regno)) - { - if (TARGET_HARD_FLOAT) - return "fmovs %1, %0"; - else - return "mor %1, %1, %0"; - } - } - - else if (GET_CODE (src) == MEM) - { - /* fpr <- memory */ - switch (mode) - { - default: - break; - - case QImode: - return "ldbf%I1%U1 %M1,%0"; - - case HImode: - return "ldhf%I1%U1 %M1,%0"; - - case SImode: - case SFmode: - return "ldf%I1%U1 %M1, %0"; - } - } - - else if (ZERO_P (src)) - return "movgf %., %0"; - } - - else if (SPR_P (dest_regno)) - { - if (GET_CODE (src) == REG) - { - /* spr <- some sort of register */ - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - return "movgs %1, %0"; - } - } - } - - else if (GET_CODE (dest) == MEM) - { - if (GET_CODE (src) == REG) - { - int src_regno = REGNO (src); - enum machine_mode mode = GET_MODE (dest); - - if (GPR_P (src_regno)) - { - switch (mode) - { - default: - break; - - case QImode: - return "stb%I0%U0 %1, %M0"; - - case HImode: - return "sth%I0%U0 %1, %M0"; - - case SImode: - case SFmode: - return "st%I0%U0 %1, %M0"; - } - } - - else if (FPR_P (src_regno)) - { - switch (mode) - { - default: - break; - - case QImode: - return "stbf%I0%U0 %1, %M0"; - - case HImode: - return "sthf%I0%U0 %1, %M0"; - - case SImode: - case SFmode: - return "stf%I0%U0 %1, %M0"; - } - } - } - - else if (ZERO_P (src)) - { - switch (GET_MODE (dest)) - { - default: - break; - - case QImode: - return "stb%I0%U0 %., %M0"; - - case HImode: - return "sth%I0%U0 %., %M0"; - - case SImode: - case SFmode: - return "st%I0%U0 %., %M0"; - } - } - } - - fatal_insn ("Bad output_move_single operand", insn); - return ""; -} - - -/* Return a string to output a double word move. */ - -const char * -output_move_double (rtx operands[], rtx insn) -{ - rtx dest = operands[0]; - rtx src = operands[1]; - enum machine_mode mode = GET_MODE (dest); - - if (GET_CODE (dest) == REG) - { - int dest_regno = REGNO (dest); - - if (GPR_P (dest_regno)) - { - if (GET_CODE (src) == REG) - { - /* gpr <- some sort of register */ - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - return "#"; - - else if (FPR_P (src_regno)) - { - if (((dest_regno - GPR_FIRST) & 1) == 0 - && ((src_regno - FPR_FIRST) & 1) == 0) - return "movfgd %1, %0"; - - return "#"; - } - } - - else if (GET_CODE (src) == MEM) - { - /* gpr <- memory */ - if (dbl_memory_one_insn_operand (src, mode)) - return "ldd%I1%U1 %M1, %0"; - - return "#"; - } - - else if (GET_CODE (src) == CONST_INT - || GET_CODE (src) == CONST_DOUBLE) - return "#"; - } - - else if (FPR_P (dest_regno)) - { - if (GET_CODE (src) == REG) - { - /* fpr <- some sort of register */ - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - { - if (((dest_regno - FPR_FIRST) & 1) == 0 - && ((src_regno - GPR_FIRST) & 1) == 0) - return "movgfd %1, %0"; - - return "#"; - } - - else if (FPR_P (src_regno)) - { - if (TARGET_DOUBLE - && ((dest_regno - FPR_FIRST) & 1) == 0 - && ((src_regno - FPR_FIRST) & 1) == 0) - return "fmovd %1, %0"; - - return "#"; - } - } - - else if (GET_CODE (src) == MEM) - { - /* fpr <- memory */ - if (dbl_memory_one_insn_operand (src, mode)) - return "lddf%I1%U1 %M1, %0"; - - return "#"; - } - - else if (ZERO_P (src)) - return "#"; - } - } - - else if (GET_CODE (dest) == MEM) - { - if (GET_CODE (src) == REG) - { - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - { - if (((src_regno - GPR_FIRST) & 1) == 0 - && dbl_memory_one_insn_operand (dest, mode)) - return "std%I0%U0 %1, %M0"; - - return "#"; - } - - if (FPR_P (src_regno)) - { - if (((src_regno - FPR_FIRST) & 1) == 0 - && dbl_memory_one_insn_operand (dest, mode)) - return "stdf%I0%U0 %1, %M0"; - - return "#"; - } - } - - else if (ZERO_P (src)) - { - if (dbl_memory_one_insn_operand (dest, mode)) - return "std%I0%U0 %., %M0"; - - return "#"; - } - } - - fatal_insn ("Bad output_move_double operand", insn); - return ""; -} - - -/* Return a string to output a single word conditional move. - Operand0 -- EQ/NE of ccr register and 0 - Operand1 -- CCR register - Operand2 -- destination - Operand3 -- source */ - -const char * -output_condmove_single (rtx operands[], rtx insn) -{ - rtx dest = operands[2]; - rtx src = operands[3]; - - if (GET_CODE (dest) == REG) - { - int dest_regno = REGNO (dest); - enum machine_mode mode = GET_MODE (dest); - - if (GPR_P (dest_regno)) - { - if (GET_CODE (src) == REG) - { - /* gpr <- some sort of register */ - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - return "cmov %z3, %2, %1, %e0"; - - else if (FPR_P (src_regno)) - return "cmovfg %3, %2, %1, %e0"; - } - - else if (GET_CODE (src) == MEM) - { - /* gpr <- memory */ - switch (mode) - { - default: - break; - - case QImode: - return "cldsb%I3%U3 %M3, %2, %1, %e0"; - - case HImode: - return "cldsh%I3%U3 %M3, %2, %1, %e0"; - - case SImode: - case SFmode: - return "cld%I3%U3 %M3, %2, %1, %e0"; - } - } - - else if (ZERO_P (src)) - return "cmov %., %2, %1, %e0"; - } - - else if (FPR_P (dest_regno)) - { - if (GET_CODE (src) == REG) - { - /* fpr <- some sort of register */ - int src_regno = REGNO (src); - - if (GPR_P (src_regno)) - return "cmovgf %3, %2, %1, %e0"; - - else if (FPR_P (src_regno)) - { - if (TARGET_HARD_FLOAT) - return "cfmovs %3,%2,%1,%e0"; - else - return "cmor %3, %3, %2, %1, %e0"; - } - } - - else if (GET_CODE (src) == MEM) - { - /* fpr <- memory */ - if (mode == SImode || mode == SFmode) - return "cldf%I3%U3 %M3, %2, %1, %e0"; - } - - else if (ZERO_P (src)) - return "cmovgf %., %2, %1, %e0"; - } - } - - else if (GET_CODE (dest) == MEM) - { - if (GET_CODE (src) == REG) - { - int src_regno = REGNO (src); - enum machine_mode mode = GET_MODE (dest); - - if (GPR_P (src_regno)) - { - switch (mode) - { - default: - break; - - case QImode: - return "cstb%I2%U2 %3, %M2, %1, %e0"; - - case HImode: - return "csth%I2%U2 %3, %M2, %1, %e0"; - - case SImode: - case SFmode: - return "cst%I2%U2 %3, %M2, %1, %e0"; - } - } - - else if (FPR_P (src_regno) && (mode == SImode || mode == SFmode)) - return "cstf%I2%U2 %3, %M2, %1, %e0"; - } - - else if (ZERO_P (src)) - { - enum machine_mode mode = GET_MODE (dest); - switch (mode) - { - default: - break; - - case QImode: - return "cstb%I2%U2 %., %M2, %1, %e0"; - - case HImode: - return "csth%I2%U2 %., %M2, %1, %e0"; - - case SImode: - case SFmode: - return "cst%I2%U2 %., %M2, %1, %e0"; - } - } - } - - fatal_insn ("Bad output_condmove_single operand", insn); - return ""; -} - - -/* Emit the appropriate code to do a comparison, returning the register the - comparison was done it. */ - -static rtx -frv_emit_comparison (enum rtx_code test, rtx op0, rtx op1) -{ - enum machine_mode cc_mode; - rtx cc_reg; - - /* Floating point doesn't have comparison against a constant. */ - if (GET_MODE (op0) == CC_FPmode && GET_CODE (op1) != REG) - op1 = force_reg (GET_MODE (op0), op1); - - /* Possibly disable using anything but a fixed register in order to work - around cse moving comparisons past function calls. */ - cc_mode = SELECT_CC_MODE (test, op0, op1); - cc_reg = ((TARGET_ALLOC_CC) - ? gen_reg_rtx (cc_mode) - : gen_rtx_REG (cc_mode, - (cc_mode == CC_FPmode) ? FCC_FIRST : ICC_FIRST)); - - emit_insn (gen_rtx_SET (VOIDmode, cc_reg, - gen_rtx_COMPARE (cc_mode, op0, op1))); - - return cc_reg; -} - - -/* Emit code for a conditional branch. The comparison operands were previously - stored in frv_compare_op0 and frv_compare_op1. - - XXX: I originally wanted to add a clobber of a CCR register to use in - conditional execution, but that confuses the rest of the compiler. */ - -int -frv_emit_cond_branch (enum rtx_code test, rtx label) -{ - rtx test_rtx; - rtx label_ref; - rtx if_else; - rtx cc_reg = frv_emit_comparison (test, frv_compare_op0, frv_compare_op1); - enum machine_mode cc_mode = GET_MODE (cc_reg); - - /* Branches generate: - (set (pc) - (if_then_else (, , (const_int 0)) - (label_ref ) - (pc))) */ - label_ref = gen_rtx_LABEL_REF (VOIDmode, label); - test_rtx = gen_rtx (test, cc_mode, cc_reg, const0_rtx); - if_else = gen_rtx_IF_THEN_ELSE (cc_mode, test_rtx, label_ref, pc_rtx); - emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, if_else)); - return TRUE; -} - - -/* Emit code to set a gpr to 1/0 based on a comparison. The comparison - operands were previously stored in frv_compare_op0 and frv_compare_op1. */ - -int -frv_emit_scc (enum rtx_code test, rtx target) -{ - rtx set; - rtx test_rtx; - rtx clobber; - rtx cr_reg; - rtx cc_reg = frv_emit_comparison (test, frv_compare_op0, frv_compare_op1); - - /* SCC instructions generate: - (parallel [(set (, , (const_int 0)) - (clobber ())]) */ - test_rtx = gen_rtx_fmt_ee (test, SImode, cc_reg, const0_rtx); - set = gen_rtx_SET (VOIDmode, target, test_rtx); - - cr_reg = ((TARGET_ALLOC_CC) - ? gen_reg_rtx (CC_CCRmode) - : gen_rtx_REG (CC_CCRmode, - ((GET_MODE (cc_reg) == CC_FPmode) - ? FCR_FIRST - : ICR_FIRST))); - - clobber = gen_rtx_CLOBBER (VOIDmode, cr_reg); - emit_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, set, clobber))); - return TRUE; -} - - -/* Split a SCC instruction into component parts, returning a SEQUENCE to hold - the separate insns. */ - -rtx -frv_split_scc (rtx dest, rtx test, rtx cc_reg, rtx cr_reg, HOST_WIDE_INT value) -{ - rtx ret; - - start_sequence (); - - /* Set the appropriate CCR bit. */ - emit_insn (gen_rtx_SET (VOIDmode, - cr_reg, - gen_rtx_fmt_ee (GET_CODE (test), - GET_MODE (cr_reg), - cc_reg, - const0_rtx))); - - /* Move the value into the destination. */ - emit_move_insn (dest, GEN_INT (value)); - - /* Move 0 into the destination if the test failed */ - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_EQ (GET_MODE (cr_reg), - cr_reg, - const0_rtx), - gen_rtx_SET (VOIDmode, dest, const0_rtx))); - - /* Finish up, return sequence. */ - ret = get_insns (); - end_sequence (); - return ret; -} - - -/* Emit the code for a conditional move, return TRUE if we could do the - move. */ - -int -frv_emit_cond_move (rtx dest, rtx test_rtx, rtx src1, rtx src2) -{ - rtx set; - rtx clobber_cc; - rtx test2; - rtx cr_reg; - rtx if_rtx; - enum rtx_code test = GET_CODE (test_rtx); - rtx cc_reg = frv_emit_comparison (test, frv_compare_op0, frv_compare_op1); - enum machine_mode cc_mode = GET_MODE (cc_reg); - - /* Conditional move instructions generate: - (parallel [(set - (if_then_else ( (const_int 0)) - - )) - (clobber ())]) */ - - /* Handle various cases of conditional move involving two constants. */ - if (GET_CODE (src1) == CONST_INT && GET_CODE (src2) == CONST_INT) - { - HOST_WIDE_INT value1 = INTVAL (src1); - HOST_WIDE_INT value2 = INTVAL (src2); - - /* Having 0 as one of the constants can be done by loading the other - constant, and optionally moving in gr0. */ - if (value1 == 0 || value2 == 0) - ; - - /* If the first value is within an addi range and also the difference - between the two fits in an addi's range, load up the difference, then - conditionally move in 0, and then unconditionally add the first - value. */ - else if (IN_RANGE_P (value1, -2048, 2047) - && IN_RANGE_P (value2 - value1, -2048, 2047)) - ; - - /* If neither condition holds, just force the constant into a - register. */ - else - { - src1 = force_reg (GET_MODE (dest), src1); - src2 = force_reg (GET_MODE (dest), src2); - } - } - - /* If one value is a register, insure the other value is either 0 or a - register. */ - else - { - if (GET_CODE (src1) == CONST_INT && INTVAL (src1) != 0) - src1 = force_reg (GET_MODE (dest), src1); - - if (GET_CODE (src2) == CONST_INT && INTVAL (src2) != 0) - src2 = force_reg (GET_MODE (dest), src2); - } - - test2 = gen_rtx_fmt_ee (test, cc_mode, cc_reg, const0_rtx); - if_rtx = gen_rtx_IF_THEN_ELSE (GET_MODE (dest), test2, src1, src2); - - set = gen_rtx_SET (VOIDmode, dest, if_rtx); - - cr_reg = ((TARGET_ALLOC_CC) - ? gen_reg_rtx (CC_CCRmode) - : gen_rtx_REG (CC_CCRmode, - (cc_mode == CC_FPmode) ? FCR_FIRST : ICR_FIRST)); - - clobber_cc = gen_rtx_CLOBBER (VOIDmode, cr_reg); - emit_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, set, clobber_cc))); - return TRUE; -} - - -/* Split a conditional move into constituent parts, returning a SEQUENCE - containing all of the insns. */ - -rtx -frv_split_cond_move (rtx operands[]) -{ - rtx dest = operands[0]; - rtx test = operands[1]; - rtx cc_reg = operands[2]; - rtx src1 = operands[3]; - rtx src2 = operands[4]; - rtx cr_reg = operands[5]; - rtx ret; - enum machine_mode cr_mode = GET_MODE (cr_reg); - - start_sequence (); - - /* Set the appropriate CCR bit. */ - emit_insn (gen_rtx_SET (VOIDmode, - cr_reg, - gen_rtx_fmt_ee (GET_CODE (test), - GET_MODE (cr_reg), - cc_reg, - const0_rtx))); - - /* Handle various cases of conditional move involving two constants. */ - if (GET_CODE (src1) == CONST_INT && GET_CODE (src2) == CONST_INT) - { - HOST_WIDE_INT value1 = INTVAL (src1); - HOST_WIDE_INT value2 = INTVAL (src2); - - /* Having 0 as one of the constants can be done by loading the other - constant, and optionally moving in gr0. */ - if (value1 == 0) - { - emit_move_insn (dest, src2); - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (cr_mode, cr_reg, - const0_rtx), - gen_rtx_SET (VOIDmode, dest, src1))); - } - - else if (value2 == 0) - { - emit_move_insn (dest, src1); - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_EQ (cr_mode, cr_reg, - const0_rtx), - gen_rtx_SET (VOIDmode, dest, src2))); - } - - /* If the first value is within an addi range and also the difference - between the two fits in an addi's range, load up the difference, then - conditionally move in 0, and then unconditionally add the first - value. */ - else if (IN_RANGE_P (value1, -2048, 2047) - && IN_RANGE_P (value2 - value1, -2048, 2047)) - { - rtx dest_si = ((GET_MODE (dest) == SImode) - ? dest - : gen_rtx_SUBREG (SImode, dest, 0)); - - emit_move_insn (dest_si, GEN_INT (value2 - value1)); - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (cr_mode, cr_reg, - const0_rtx), - gen_rtx_SET (VOIDmode, dest_si, - const0_rtx))); - emit_insn (gen_addsi3 (dest_si, dest_si, src1)); - } - - else - abort (); - } - else - { - /* Emit the conditional move for the test being true if needed. */ - if (! rtx_equal_p (dest, src1)) - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (cr_mode, cr_reg, const0_rtx), - gen_rtx_SET (VOIDmode, dest, src1))); - - /* Emit the conditional move for the test being false if needed. */ - if (! rtx_equal_p (dest, src2)) - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_EQ (cr_mode, cr_reg, const0_rtx), - gen_rtx_SET (VOIDmode, dest, src2))); - } - - /* Finish up, return sequence. */ - ret = get_insns (); - end_sequence (); - return ret; -} - - -/* Split (set DEST SOURCE), where DEST is a double register and SOURCE is a - memory location that is not known to be dword-aligned. */ -void -frv_split_double_load (rtx dest, rtx source) -{ - int regno = REGNO (dest); - rtx dest1 = gen_highpart (SImode, dest); - rtx dest2 = gen_lowpart (SImode, dest); - rtx address = XEXP (source, 0); - - /* If the address is pre-modified, load the lower-numbered register - first, then load the other register using an integer offset from - the modified base register. This order should always be safe, - since the pre-modification cannot affect the same registers as the - load does. - - The situation for other loads is more complicated. Loading one - of the registers could affect the value of ADDRESS, so we must - be careful which order we do them in. */ - if (GET_CODE (address) == PRE_MODIFY - || ! refers_to_regno_p (regno, regno + 1, address, NULL)) - { - /* It is safe to load the lower-numbered register first. */ - emit_move_insn (dest1, change_address (source, SImode, NULL)); - emit_move_insn (dest2, frv_index_memory (source, SImode, 1)); - } - else - { - /* ADDRESS is not pre-modified and the address depends on the - lower-numbered register. Load the higher-numbered register - first. */ - emit_move_insn (dest2, frv_index_memory (source, SImode, 1)); - emit_move_insn (dest1, change_address (source, SImode, NULL)); - } -} - -/* Split (set DEST SOURCE), where DEST refers to a dword memory location - and SOURCE is either a double register or the constant zero. */ -void -frv_split_double_store (rtx dest, rtx source) -{ - rtx dest1 = change_address (dest, SImode, NULL); - rtx dest2 = frv_index_memory (dest, SImode, 1); - if (ZERO_P (source)) - { - emit_move_insn (dest1, CONST0_RTX (SImode)); - emit_move_insn (dest2, CONST0_RTX (SImode)); - } - else - { - emit_move_insn (dest1, gen_highpart (SImode, source)); - emit_move_insn (dest2, gen_lowpart (SImode, source)); - } -} - - -/* Split a min/max operation returning a SEQUENCE containing all of the - insns. */ - -rtx -frv_split_minmax (rtx operands[]) -{ - rtx dest = operands[0]; - rtx minmax = operands[1]; - rtx src1 = operands[2]; - rtx src2 = operands[3]; - rtx cc_reg = operands[4]; - rtx cr_reg = operands[5]; - rtx ret; - enum rtx_code test_code; - enum machine_mode cr_mode = GET_MODE (cr_reg); - - start_sequence (); - - /* Figure out which test to use. */ - switch (GET_CODE (minmax)) - { - default: - abort (); - - case SMIN: test_code = LT; break; - case SMAX: test_code = GT; break; - case UMIN: test_code = LTU; break; - case UMAX: test_code = GTU; break; - } - - /* Issue the compare instruction. */ - emit_insn (gen_rtx_SET (VOIDmode, - cc_reg, - gen_rtx_COMPARE (GET_MODE (cc_reg), - src1, src2))); - - /* Set the appropriate CCR bit. */ - emit_insn (gen_rtx_SET (VOIDmode, - cr_reg, - gen_rtx_fmt_ee (test_code, - GET_MODE (cr_reg), - cc_reg, - const0_rtx))); - - /* If are taking the min/max of a nonzero constant, load that first, and - then do a conditional move of the other value. */ - if (GET_CODE (src2) == CONST_INT && INTVAL (src2) != 0) - { - if (rtx_equal_p (dest, src1)) - abort (); - - emit_move_insn (dest, src2); - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (cr_mode, cr_reg, const0_rtx), - gen_rtx_SET (VOIDmode, dest, src1))); - } - - /* Otherwise, do each half of the move. */ - else - { - /* Emit the conditional move for the test being true if needed. */ - if (! rtx_equal_p (dest, src1)) - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (cr_mode, cr_reg, const0_rtx), - gen_rtx_SET (VOIDmode, dest, src1))); - - /* Emit the conditional move for the test being false if needed. */ - if (! rtx_equal_p (dest, src2)) - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_EQ (cr_mode, cr_reg, const0_rtx), - gen_rtx_SET (VOIDmode, dest, src2))); - } - - /* Finish up, return sequence. */ - ret = get_insns (); - end_sequence (); - return ret; -} - - -/* Split an integer abs operation returning a SEQUENCE containing all of the - insns. */ - -rtx -frv_split_abs (rtx operands[]) -{ - rtx dest = operands[0]; - rtx src = operands[1]; - rtx cc_reg = operands[2]; - rtx cr_reg = operands[3]; - rtx ret; - - start_sequence (); - - /* Issue the compare < 0 instruction. */ - emit_insn (gen_rtx_SET (VOIDmode, - cc_reg, - gen_rtx_COMPARE (CCmode, src, const0_rtx))); - - /* Set the appropriate CCR bit. */ - emit_insn (gen_rtx_SET (VOIDmode, - cr_reg, - gen_rtx_fmt_ee (LT, CC_CCRmode, cc_reg, const0_rtx))); - - /* Emit the conditional negate if the value is negative. */ - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (CC_CCRmode, cr_reg, const0_rtx), - gen_negsi2 (dest, src))); - - /* Emit the conditional move for the test being false if needed. */ - if (! rtx_equal_p (dest, src)) - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_EQ (CC_CCRmode, cr_reg, const0_rtx), - gen_rtx_SET (VOIDmode, dest, src))); - - /* Finish up, return sequence. */ - ret = get_insns (); - end_sequence (); - return ret; -} - - -/* An internal function called by for_each_rtx to clear in a hard_reg set each - register used in an insn. */ - -static int -frv_clear_registers_used (rtx *ptr, void *data) -{ - if (GET_CODE (*ptr) == REG) - { - int regno = REGNO (*ptr); - HARD_REG_SET *p_regs = (HARD_REG_SET *)data; - - if (regno < FIRST_PSEUDO_REGISTER) - { - int reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (*ptr)); - - while (regno < reg_max) - { - CLEAR_HARD_REG_BIT (*p_regs, regno); - regno++; - } - } - } - - return 0; -} - - -/* Initialize the extra fields provided by IFCVT_EXTRA_FIELDS. */ - -/* On the FR-V, we don't have any extra fields per se, but it is useful hook to - initialize the static storage. */ -void -frv_ifcvt_init_extra_fields (ce_if_block_t *ce_info ATTRIBUTE_UNUSED) -{ - frv_ifcvt.added_insns_list = NULL_RTX; - frv_ifcvt.cur_scratch_regs = 0; - frv_ifcvt.num_nested_cond_exec = 0; - frv_ifcvt.cr_reg = NULL_RTX; - frv_ifcvt.nested_cc_reg = NULL_RTX; - frv_ifcvt.extra_int_cr = NULL_RTX; - frv_ifcvt.extra_fp_cr = NULL_RTX; - frv_ifcvt.last_nested_if_cr = NULL_RTX; -} - - -/* Internal function to add a potenial insn to the list of insns to be inserted - if the conditional execution conversion is successful. */ - -static void -frv_ifcvt_add_insn (rtx pattern, rtx insn, int before_p) -{ - rtx link = alloc_EXPR_LIST (VOIDmode, pattern, insn); - - link->jump = before_p; /* Mark to add this before or after insn. */ - frv_ifcvt.added_insns_list = alloc_EXPR_LIST (VOIDmode, link, - frv_ifcvt.added_insns_list); - - if (TARGET_DEBUG_COND_EXEC) - { - fprintf (stderr, - "\n:::::::::: frv_ifcvt_add_insn: add the following %s insn %d:\n", - (before_p) ? "before" : "after", - (int)INSN_UID (insn)); - - debug_rtx (pattern); - } -} - - -/* A C expression to modify the code described by the conditional if - information CE_INFO, possibly updating the tests in TRUE_EXPR, and - FALSE_EXPR for converting if-then and if-then-else code to conditional - instructions. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if the - tests cannot be converted. */ - -void -frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false) -{ - basic_block test_bb = ce_info->test_bb; /* test basic block */ - basic_block then_bb = ce_info->then_bb; /* THEN */ - basic_block else_bb = ce_info->else_bb; /* ELSE or NULL */ - basic_block join_bb = ce_info->join_bb; /* join block or NULL */ - rtx true_expr = *p_true; - rtx cr; - rtx cc; - rtx nested_cc; - enum machine_mode mode = GET_MODE (true_expr); - int j; - basic_block *bb; - int num_bb; - frv_tmp_reg_t *tmp_reg = &frv_ifcvt.tmp_reg; - rtx check_insn; - rtx sub_cond_exec_reg; - enum rtx_code code; - enum rtx_code code_true; - enum rtx_code code_false; - enum reg_class cc_class; - enum reg_class cr_class; - int cc_first; - int cc_last; - - /* Make sure we are only dealing with hard registers. Also honor the - -mno-cond-exec switch, and -mno-nested-cond-exec switches if - applicable. */ - if (!reload_completed || TARGET_NO_COND_EXEC - || (TARGET_NO_NESTED_CE && ce_info->pass > 1)) - goto fail; - - /* Figure out which registers we can allocate for our own purposes. Only - consider registers that are not preserved across function calls and are - not fixed. However, allow the ICC/ICR temporary registers to be allocated - if we did not need to use them in reloading other registers. */ - memset (&tmp_reg->regs, 0, sizeof (tmp_reg->regs)); - COPY_HARD_REG_SET (tmp_reg->regs, call_used_reg_set); - AND_COMPL_HARD_REG_SET (tmp_reg->regs, fixed_reg_set); - SET_HARD_REG_BIT (tmp_reg->regs, ICC_TEMP); - SET_HARD_REG_BIT (tmp_reg->regs, ICR_TEMP); - - /* If this is a nested IF, we need to discover whether the CC registers that - are set/used inside of the block are used anywhere else. If not, we can - change them to be the CC register that is paired with the CR register that - controls the outermost IF block. */ - if (ce_info->pass > 1) - { - CLEAR_HARD_REG_SET (frv_ifcvt.nested_cc_ok_rewrite); - for (j = CC_FIRST; j <= CC_LAST; j++) - if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) - { - if (REGNO_REG_SET_P (then_bb->global_live_at_start, j)) - continue; - - if (else_bb && REGNO_REG_SET_P (else_bb->global_live_at_start, j)) - continue; - - if (join_bb && REGNO_REG_SET_P (join_bb->global_live_at_start, j)) - continue; - - SET_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, j); - } - } - - for (j = 0; j < frv_ifcvt.cur_scratch_regs; j++) - frv_ifcvt.scratch_regs[j] = NULL_RTX; - - frv_ifcvt.added_insns_list = NULL_RTX; - frv_ifcvt.cur_scratch_regs = 0; - - bb = (basic_block *) alloca ((2 + ce_info->num_multiple_test_blocks) - * sizeof (basic_block)); - - if (join_bb) - { - int regno; - - /* Remove anything live at the beginning of the join block from being - available for allocation. */ - EXECUTE_IF_SET_IN_REG_SET (join_bb->global_live_at_start, 0, regno, - { - if (regno < FIRST_PSEUDO_REGISTER) - CLEAR_HARD_REG_BIT (tmp_reg->regs, regno); - }); - } - - /* Add in all of the blocks in multiple &&/|| blocks to be scanned. */ - num_bb = 0; - if (ce_info->num_multiple_test_blocks) - { - basic_block multiple_test_bb = ce_info->last_test_bb; - - while (multiple_test_bb != test_bb) - { - bb[num_bb++] = multiple_test_bb; - multiple_test_bb = multiple_test_bb->pred->src; - } - } - - /* Add in the THEN and ELSE blocks to be scanned. */ - bb[num_bb++] = then_bb; - if (else_bb) - bb[num_bb++] = else_bb; - - sub_cond_exec_reg = NULL_RTX; - frv_ifcvt.num_nested_cond_exec = 0; - - /* Scan all of the blocks for registers that must not be allocated. */ - for (j = 0; j < num_bb; j++) - { - rtx last_insn = BB_END (bb[j]); - rtx insn = BB_HEAD (bb[j]); - int regno; - - if (rtl_dump_file) - fprintf (rtl_dump_file, "Scanning %s block %d, start %d, end %d\n", - (bb[j] == else_bb) ? "else" : ((bb[j] == then_bb) ? "then" : "test"), - (int) bb[j]->index, - (int) INSN_UID (BB_HEAD (bb[j])), - (int) INSN_UID (BB_END (bb[j]))); - - /* Anything live at the beginning of the block is obviously unavailable - for allocation. */ - EXECUTE_IF_SET_IN_REG_SET (bb[j]->global_live_at_start, 0, regno, - { - if (regno < FIRST_PSEUDO_REGISTER) - CLEAR_HARD_REG_BIT (tmp_reg->regs, regno); - }); - - /* Loop through the insns in the block. */ - for (;;) - { - /* Mark any new registers that are created as being unavailable for - allocation. Also see if the CC register used in nested IFs can be - reallocated. */ - if (INSN_P (insn)) - { - rtx pattern; - rtx set; - int skip_nested_if = FALSE; - - for_each_rtx (&PATTERN (insn), frv_clear_registers_used, - (void *)&tmp_reg->regs); - - pattern = PATTERN (insn); - if (GET_CODE (pattern) == COND_EXEC) - { - rtx reg = XEXP (COND_EXEC_TEST (pattern), 0); - - if (reg != sub_cond_exec_reg) - { - sub_cond_exec_reg = reg; - frv_ifcvt.num_nested_cond_exec++; - } - } - - set = single_set_pattern (pattern); - if (set) - { - rtx dest = SET_DEST (set); - rtx src = SET_SRC (set); - - if (GET_CODE (dest) == REG) - { - int regno = REGNO (dest); - enum rtx_code src_code = GET_CODE (src); - - if (CC_P (regno) && src_code == COMPARE) - skip_nested_if = TRUE; - - else if (CR_P (regno) - && (src_code == IF_THEN_ELSE - || GET_RTX_CLASS (src_code) == '<')) - skip_nested_if = TRUE; - } - } - - if (! skip_nested_if) - for_each_rtx (&PATTERN (insn), frv_clear_registers_used, - (void *)&frv_ifcvt.nested_cc_ok_rewrite); - } - - if (insn == last_insn) - break; - - insn = NEXT_INSN (insn); - } - } - - /* If this is a nested if, rewrite the CC registers that are available to - include the ones that can be rewritten, to increase the chance of being - able to allocate a paired CC/CR register combination. */ - if (ce_info->pass > 1) - { - for (j = CC_FIRST; j <= CC_LAST; j++) - if (TEST_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, j)) - SET_HARD_REG_BIT (tmp_reg->regs, j); - else - CLEAR_HARD_REG_BIT (tmp_reg->regs, j); - } - - if (rtl_dump_file) - { - int num_gprs = 0; - fprintf (rtl_dump_file, "Available GPRs: "); - - for (j = GPR_FIRST; j <= GPR_LAST; j++) - if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) - { - fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); - if (++num_gprs > GPR_TEMP_NUM+2) - break; - } - - fprintf (rtl_dump_file, "%s\nAvailable CRs: ", - (num_gprs > GPR_TEMP_NUM+2) ? " ..." : ""); - - for (j = CR_FIRST; j <= CR_LAST; j++) - if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) - fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); - - fputs ("\n", rtl_dump_file); - - if (ce_info->pass > 1) - { - fprintf (rtl_dump_file, "Modifiable CCs: "); - for (j = CC_FIRST; j <= CC_LAST; j++) - if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) - fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); - - fprintf (rtl_dump_file, "\n%d nested COND_EXEC statements\n", - frv_ifcvt.num_nested_cond_exec); - } - } - - /* Allocate the appropriate temporary condition code register. Try to - allocate the ICR/FCR register that corresponds to the ICC/FCC register so - that conditional cmp's can be done. */ - if (mode == CCmode || mode == CC_UNSmode) - { - cr_class = ICR_REGS; - cc_class = ICC_REGS; - cc_first = ICC_FIRST; - cc_last = ICC_LAST; - } - else if (mode == CC_FPmode) - { - cr_class = FCR_REGS; - cc_class = FCC_REGS; - cc_first = FCC_FIRST; - cc_last = FCC_LAST; - } - else - { - cc_first = cc_last = 0; - cr_class = cc_class = NO_REGS; - } - - cc = XEXP (true_expr, 0); - nested_cc = cr = NULL_RTX; - if (cc_class != NO_REGS) - { - /* For nested IFs and &&/||, see if we can find a CC and CR register pair - so we can execute a csubcc/caddcc/cfcmps instruction. */ - int cc_regno; - - for (cc_regno = cc_first; cc_regno <= cc_last; cc_regno++) - { - int cr_regno = cc_regno - CC_FIRST + CR_FIRST; - - if (TEST_HARD_REG_BIT (frv_ifcvt.tmp_reg.regs, cc_regno) - && TEST_HARD_REG_BIT (frv_ifcvt.tmp_reg.regs, cr_regno)) - { - frv_ifcvt.tmp_reg.next_reg[ (int)cr_class ] = cr_regno; - cr = frv_alloc_temp_reg (tmp_reg, cr_class, CC_CCRmode, TRUE, - TRUE); - - frv_ifcvt.tmp_reg.next_reg[ (int)cc_class ] = cc_regno; - nested_cc = frv_alloc_temp_reg (tmp_reg, cc_class, CCmode, - TRUE, TRUE); - break; - } - } - } - - if (! cr) - { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Could not allocate a CR temporary register\n"); - - goto fail; - } - - if (rtl_dump_file) - fprintf (rtl_dump_file, - "Will use %s for conditional execution, %s for nested comparisons\n", - reg_names[ REGNO (cr)], - (nested_cc) ? reg_names[ REGNO (nested_cc) ] : ""); - - /* Set the CCR bit. Note for integer tests, we reverse the condition so that - in an IF-THEN-ELSE sequence, we are testing the TRUE case against the CCR - bit being true. We don't do this for floating point, because of NaNs. */ - code = GET_CODE (true_expr); - if (GET_MODE (cc) != CC_FPmode) - { - code = reverse_condition (code); - code_true = EQ; - code_false = NE; - } - else - { - code_true = NE; - code_false = EQ; - } - - check_insn = gen_rtx_SET (VOIDmode, cr, - gen_rtx_fmt_ee (code, CC_CCRmode, cc, const0_rtx)); - - /* Record the check insn to be inserted later. */ - frv_ifcvt_add_insn (check_insn, BB_END (test_bb), TRUE); - - /* Update the tests. */ - frv_ifcvt.cr_reg = cr; - frv_ifcvt.nested_cc_reg = nested_cc; - *p_true = gen_rtx_fmt_ee (code_true, CC_CCRmode, cr, const0_rtx); - *p_false = gen_rtx_fmt_ee (code_false, CC_CCRmode, cr, const0_rtx); - return; - - /* Fail, don't do this conditional execution. */ - fail: - *p_true = NULL_RTX; - *p_false = NULL_RTX; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Disabling this conditional execution.\n"); - - return; -} - - -/* A C expression to modify the code described by the conditional if - information CE_INFO, for the basic block BB, possibly updating the tests in - TRUE_EXPR, and FALSE_EXPR for converting the && and || parts of if-then or - if-then-else code to conditional instructions. Set either TRUE_EXPR or - FALSE_EXPR to a null pointer if the tests cannot be converted. */ - -/* p_true and p_false are given expressions of the form: - - (and (eq:CC_CCR (reg:CC_CCR) - (const_int 0)) - (eq:CC (reg:CC) - (const_int 0))) */ - -void -frv_ifcvt_modify_multiple_tests (ce_if_block_t *ce_info, - basic_block bb, - rtx *p_true, - rtx *p_false) -{ - rtx old_true = XEXP (*p_true, 0); - rtx old_false = XEXP (*p_false, 0); - rtx true_expr = XEXP (*p_true, 1); - rtx false_expr = XEXP (*p_false, 1); - rtx test_expr; - rtx old_test; - rtx cr = XEXP (old_true, 0); - rtx check_insn; - rtx new_cr = NULL_RTX; - rtx *p_new_cr = (rtx *)0; - rtx if_else; - rtx compare; - rtx cc; - enum reg_class cr_class; - enum machine_mode mode = GET_MODE (true_expr); - rtx (*logical_func)(rtx, rtx, rtx); - - if (TARGET_DEBUG_COND_EXEC) - { - fprintf (stderr, - "\n:::::::::: frv_ifcvt_modify_multiple_tests, before modification for %s\ntrue insn:\n", - ce_info->and_and_p ? "&&" : "||"); - - debug_rtx (*p_true); - - fputs ("\nfalse insn:\n", stderr); - debug_rtx (*p_false); - } - - if (TARGET_NO_MULTI_CE) - goto fail; - - if (GET_CODE (cr) != REG) - goto fail; - - if (mode == CCmode || mode == CC_UNSmode) - { - cr_class = ICR_REGS; - p_new_cr = &frv_ifcvt.extra_int_cr; - } - else if (mode == CC_FPmode) - { - cr_class = FCR_REGS; - p_new_cr = &frv_ifcvt.extra_fp_cr; - } - else - goto fail; - - /* Allocate a temp CR, reusing a previously allocated temp CR if we have 3 or - more &&/|| tests. */ - new_cr = *p_new_cr; - if (! new_cr) - { - new_cr = *p_new_cr = frv_alloc_temp_reg (&frv_ifcvt.tmp_reg, cr_class, - CC_CCRmode, TRUE, TRUE); - if (! new_cr) - goto fail; - } - - if (ce_info->and_and_p) - { - old_test = old_false; - test_expr = true_expr; - logical_func = (GET_CODE (old_true) == EQ) ? gen_andcr : gen_andncr; - *p_true = gen_rtx_NE (CC_CCRmode, cr, const0_rtx); - *p_false = gen_rtx_EQ (CC_CCRmode, cr, const0_rtx); - } - else - { - old_test = old_false; - test_expr = false_expr; - logical_func = (GET_CODE (old_false) == EQ) ? gen_orcr : gen_orncr; - *p_true = gen_rtx_EQ (CC_CCRmode, cr, const0_rtx); - *p_false = gen_rtx_NE (CC_CCRmode, cr, const0_rtx); - } - - /* First add the andcr/andncr/orcr/orncr, which will be added after the - conditional check instruction, due to frv_ifcvt_add_insn being a LIFO - stack. */ - frv_ifcvt_add_insn ((*logical_func) (cr, cr, new_cr), BB_END (bb), TRUE); - - /* Now add the conditional check insn. */ - cc = XEXP (test_expr, 0); - compare = gen_rtx_fmt_ee (GET_CODE (test_expr), CC_CCRmode, cc, const0_rtx); - if_else = gen_rtx_IF_THEN_ELSE (CC_CCRmode, old_test, compare, const0_rtx); - - check_insn = gen_rtx_SET (VOIDmode, new_cr, if_else); - - /* Add the new check insn to the list of check insns that need to be - inserted. */ - frv_ifcvt_add_insn (check_insn, BB_END (bb), TRUE); - - if (TARGET_DEBUG_COND_EXEC) - { - fputs ("\n:::::::::: frv_ifcvt_modify_multiple_tests, after modification\ntrue insn:\n", - stderr); - - debug_rtx (*p_true); - - fputs ("\nfalse insn:\n", stderr); - debug_rtx (*p_false); - } - - return; - - fail: - *p_true = *p_false = NULL_RTX; - - /* If we allocated a CR register, release it. */ - if (new_cr) - { - CLEAR_HARD_REG_BIT (frv_ifcvt.tmp_reg.regs, REGNO (new_cr)); - *p_new_cr = NULL_RTX; - } - - if (TARGET_DEBUG_COND_EXEC) - fputs ("\n:::::::::: frv_ifcvt_modify_multiple_tests, failed.\n", stderr); - - return; -} - - -/* Return a register which will be loaded with a value if an IF block is - converted to conditional execution. This is used to rewrite instructions - that use constants to ones that just use registers. */ - -static rtx -frv_ifcvt_load_value (rtx value, rtx insn ATTRIBUTE_UNUSED) -{ - int num_alloc = frv_ifcvt.cur_scratch_regs; - int i; - rtx reg; - - /* We know gr0 == 0, so replace any errant uses. */ - if (value == const0_rtx) - return gen_rtx_REG (SImode, GPR_FIRST); - - /* First search all registers currently loaded to see if we have an - applicable constant. */ - if (CONSTANT_P (value) - || (GET_CODE (value) == REG && REGNO (value) == LR_REGNO)) - { - for (i = 0; i < num_alloc; i++) - { - if (rtx_equal_p (SET_SRC (frv_ifcvt.scratch_regs[i]), value)) - return SET_DEST (frv_ifcvt.scratch_regs[i]); - } - } - - /* Have we exhausted the number of registers available? */ - if (num_alloc >= GPR_TEMP_NUM) - { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Too many temporary registers allocated\n"); - - return NULL_RTX; - } - - /* Allocate the new register. */ - reg = frv_alloc_temp_reg (&frv_ifcvt.tmp_reg, GPR_REGS, SImode, TRUE, TRUE); - if (! reg) - { - if (rtl_dump_file) - fputs ("Could not find a scratch register\n", rtl_dump_file); - - return NULL_RTX; - } - - frv_ifcvt.cur_scratch_regs++; - frv_ifcvt.scratch_regs[num_alloc] = gen_rtx_SET (VOIDmode, reg, value); - - if (rtl_dump_file) - { - if (GET_CODE (value) == CONST_INT) - fprintf (rtl_dump_file, "Register %s will hold %ld\n", - reg_names[ REGNO (reg)], (long)INTVAL (value)); - - else if (GET_CODE (value) == REG && REGNO (value) == LR_REGNO) - fprintf (rtl_dump_file, "Register %s will hold LR\n", - reg_names[ REGNO (reg)]); - - else - fprintf (rtl_dump_file, "Register %s will hold a saved value\n", - reg_names[ REGNO (reg)]); - } - - return reg; -} - - -/* Update a MEM used in conditional code that might contain an offset to put - the offset into a scratch register, so that the conditional load/store - operations can be used. This function returns the original pointer if the - MEM is valid to use in conditional code, NULL if we can't load up the offset - into a temporary register, or the new MEM if we were successful. */ - -static rtx -frv_ifcvt_rewrite_mem (rtx mem, enum machine_mode mode, rtx insn) -{ - rtx addr = XEXP (mem, 0); - - if (!frv_legitimate_address_p (mode, addr, reload_completed, TRUE)) - { - if (GET_CODE (addr) == PLUS) - { - rtx addr_op0 = XEXP (addr, 0); - rtx addr_op1 = XEXP (addr, 1); - - if (plus_small_data_p (addr_op0, addr_op1)) - addr = frv_ifcvt_load_value (addr, insn); - - else if (GET_CODE (addr_op0) == REG && CONSTANT_P (addr_op1)) - { - rtx reg = frv_ifcvt_load_value (addr_op1, insn); - if (!reg) - return NULL_RTX; - - addr = gen_rtx_PLUS (Pmode, addr_op0, reg); - } - - else - return NULL_RTX; - } - - else if (CONSTANT_P (addr)) - addr = frv_ifcvt_load_value (addr, insn); - - else - return NULL_RTX; - - if (addr == NULL_RTX) - return NULL_RTX; - - else if (XEXP (mem, 0) != addr) - return change_address (mem, mode, addr); - } - - return mem; -} - - -/* Given a PATTERN, return a SET expression if this PATTERN has only a single - SET, possibly conditionally executed. It may also have CLOBBERs, USEs. */ - -static rtx -single_set_pattern (rtx pattern) -{ - rtx set; - int i; - - if (GET_CODE (pattern) == COND_EXEC) - pattern = COND_EXEC_CODE (pattern); - - if (GET_CODE (pattern) == SET) - return pattern; - - else if (GET_CODE (pattern) == PARALLEL) - { - for (i = 0, set = 0; i < XVECLEN (pattern, 0); i++) - { - rtx sub = XVECEXP (pattern, 0, i); - - switch (GET_CODE (sub)) - { - case USE: - case CLOBBER: - break; - - case SET: - if (set) - return 0; - else - set = sub; - break; - - default: - return 0; - } - } - return set; - } - - return 0; -} - - -/* A C expression to modify the code described by the conditional if - information CE_INFO with the new PATTERN in INSN. If PATTERN is a null - pointer after the IFCVT_MODIFY_INSN macro executes, it is assumed that that - insn cannot be converted to be executed conditionally. */ - -rtx -frv_ifcvt_modify_insn (ce_if_block_t *ce_info, - rtx pattern, - rtx insn) -{ - rtx orig_ce_pattern = pattern; - rtx set; - rtx op0; - rtx op1; - rtx test; - - if (GET_CODE (pattern) != COND_EXEC) - abort (); - - test = COND_EXEC_TEST (pattern); - if (GET_CODE (test) == AND) - { - rtx cr = frv_ifcvt.cr_reg; - rtx test_reg; - - op0 = XEXP (test, 0); - if (! rtx_equal_p (cr, XEXP (op0, 0))) - goto fail; - - op1 = XEXP (test, 1); - test_reg = XEXP (op1, 0); - if (GET_CODE (test_reg) != REG) - goto fail; - - /* Is this the first nested if block in this sequence? If so, generate - an andcr or andncr. */ - if (! frv_ifcvt.last_nested_if_cr) - { - rtx and_op; - - frv_ifcvt.last_nested_if_cr = test_reg; - if (GET_CODE (op0) == NE) - and_op = gen_andcr (test_reg, cr, test_reg); - else - and_op = gen_andncr (test_reg, cr, test_reg); - - frv_ifcvt_add_insn (and_op, insn, TRUE); - } - - /* If this isn't the first statement in the nested if sequence, see if we - are dealing with the same register. */ - else if (! rtx_equal_p (test_reg, frv_ifcvt.last_nested_if_cr)) - goto fail; - - COND_EXEC_TEST (pattern) = test = op1; - } - - /* If this isn't a nested if, reset state variables. */ - else - { - frv_ifcvt.last_nested_if_cr = NULL_RTX; - } - - set = single_set_pattern (pattern); - if (set) - { - rtx dest = SET_DEST (set); - rtx src = SET_SRC (set); - enum machine_mode mode = GET_MODE (dest); - - /* Check for normal binary operators. */ - if (mode == SImode - && (GET_RTX_CLASS (GET_CODE (src)) == '2' - || GET_RTX_CLASS (GET_CODE (src)) == 'c')) - { - op0 = XEXP (src, 0); - op1 = XEXP (src, 1); - - /* Special case load of small data address which looks like: - r16+symbol_ref */ - if (GET_CODE (src) == PLUS && plus_small_data_p (op0, op1)) - { - src = frv_ifcvt_load_value (src, insn); - if (src) - COND_EXEC_CODE (pattern) = gen_rtx_SET (VOIDmode, dest, src); - else - goto fail; - } - - else if (integer_register_operand (op0, SImode) && CONSTANT_P (op1)) - { - op1 = frv_ifcvt_load_value (op1, insn); - if (op1) - COND_EXEC_CODE (pattern) - = gen_rtx_SET (VOIDmode, dest, gen_rtx_fmt_ee (GET_CODE (src), - GET_MODE (src), - op0, op1)); - else - goto fail; - } - } - - /* For multiply by a constant, we need to handle the sign extending - correctly. Add a USE of the value after the multiply to prevent flow - from cratering because only one register out of the two were used. */ - else if (mode == DImode && GET_CODE (src) == MULT) - { - op0 = XEXP (src, 0); - op1 = XEXP (src, 1); - if (GET_CODE (op0) == SIGN_EXTEND && GET_CODE (op1) == CONST_INT) - { - op1 = frv_ifcvt_load_value (op1, insn); - if (op1) - { - op1 = gen_rtx_SIGN_EXTEND (DImode, op1); - COND_EXEC_CODE (pattern) - = gen_rtx_SET (VOIDmode, dest, - gen_rtx_MULT (DImode, op0, op1)); - } - else - goto fail; - } - - frv_ifcvt_add_insn (gen_rtx_USE (VOIDmode, dest), insn, FALSE); - } - - /* If we are just loading a constant created for a nested conditional - execution statement, just load the constant without any conditional - execution, since we know that the constant will not interfere with any - other registers. */ - else if (frv_ifcvt.scratch_insns_bitmap - && bitmap_bit_p (frv_ifcvt.scratch_insns_bitmap, - INSN_UID (insn)) - /* We must not unconditionally set a reg set used as - scratch in the THEN branch if the same reg is live - in the ELSE branch. */ - && REG_P (SET_DEST (set)) - && (! ce_info->else_bb - || BLOCK_FOR_INSN (insn) == ce_info->else_bb - || ! (REGNO_REG_SET_P - (ce_info->else_bb->global_live_at_start, - REGNO (SET_DEST (set)))))) - pattern = set; - - else if (mode == QImode || mode == HImode || mode == SImode - || mode == SFmode) - { - int changed_p = FALSE; - - /* Check for just loading up a constant */ - if (CONSTANT_P (src) && integer_register_operand (dest, mode)) - { - src = frv_ifcvt_load_value (src, insn); - if (!src) - goto fail; - - changed_p = TRUE; - } - - /* See if we need to fix up stores */ - if (GET_CODE (dest) == MEM) - { - rtx new_mem = frv_ifcvt_rewrite_mem (dest, mode, insn); - - if (!new_mem) - goto fail; - - else if (new_mem != dest) - { - changed_p = TRUE; - dest = new_mem; - } - } - - /* See if we need to fix up loads */ - if (GET_CODE (src) == MEM) - { - rtx new_mem = frv_ifcvt_rewrite_mem (src, mode, insn); - - if (!new_mem) - goto fail; - - else if (new_mem != src) - { - changed_p = TRUE; - src = new_mem; - } - } - - /* If either src or destination changed, redo SET. */ - if (changed_p) - COND_EXEC_CODE (pattern) = gen_rtx_SET (VOIDmode, dest, src); - } - - /* Rewrite a nested set cccr in terms of IF_THEN_ELSE. Also deal with - rewriting the CC register to be the same as the paired CC/CR register - for nested ifs. */ - else if (mode == CC_CCRmode && GET_RTX_CLASS (GET_CODE (src)) == '<') - { - int regno = REGNO (XEXP (src, 0)); - rtx if_else; - - if (ce_info->pass > 1 - && regno != (int)REGNO (frv_ifcvt.nested_cc_reg) - && TEST_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, regno)) - { - src = gen_rtx_fmt_ee (GET_CODE (src), - CC_CCRmode, - frv_ifcvt.nested_cc_reg, - XEXP (src, 1)); - } - - if_else = gen_rtx_IF_THEN_ELSE (CC_CCRmode, test, src, const0_rtx); - pattern = gen_rtx_SET (VOIDmode, dest, if_else); - } - - /* Remap a nested compare instruction to use the paired CC/CR reg. */ - else if (ce_info->pass > 1 - && GET_CODE (dest) == REG - && CC_P (REGNO (dest)) - && REGNO (dest) != REGNO (frv_ifcvt.nested_cc_reg) - && TEST_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, - REGNO (dest)) - && GET_CODE (src) == COMPARE) - { - PUT_MODE (frv_ifcvt.nested_cc_reg, GET_MODE (dest)); - COND_EXEC_CODE (pattern) - = gen_rtx_SET (VOIDmode, frv_ifcvt.nested_cc_reg, copy_rtx (src)); - } - } - - if (TARGET_DEBUG_COND_EXEC) - { - rtx orig_pattern = PATTERN (insn); - - PATTERN (insn) = pattern; - fprintf (stderr, - "\n:::::::::: frv_ifcvt_modify_insn: pass = %d, insn after modification:\n", - ce_info->pass); - - debug_rtx (insn); - PATTERN (insn) = orig_pattern; - } - - return pattern; - - fail: - if (TARGET_DEBUG_COND_EXEC) - { - rtx orig_pattern = PATTERN (insn); - - PATTERN (insn) = orig_ce_pattern; - fprintf (stderr, - "\n:::::::::: frv_ifcvt_modify_insn: pass = %d, insn could not be modified:\n", - ce_info->pass); - - debug_rtx (insn); - PATTERN (insn) = orig_pattern; - } - - return NULL_RTX; -} - - -/* A C expression to perform any final machine dependent modifications in - converting code to conditional execution in the code described by the - conditional if information CE_INFO. */ - -void -frv_ifcvt_modify_final (ce_if_block_t *ce_info ATTRIBUTE_UNUSED) -{ - rtx existing_insn; - rtx check_insn; - rtx p = frv_ifcvt.added_insns_list; - int i; - - /* Loop inserting the check insns. The last check insn is the first test, - and is the appropriate place to insert constants. */ - if (! p) - abort (); - - do - { - rtx check_and_insert_insns = XEXP (p, 0); - rtx old_p = p; - - check_insn = XEXP (check_and_insert_insns, 0); - existing_insn = XEXP (check_and_insert_insns, 1); - p = XEXP (p, 1); - - /* The jump bit is used to say that the new insn is to be inserted BEFORE - the existing insn, otherwise it is to be inserted AFTER. */ - if (check_and_insert_insns->jump) - { - emit_insn_before (check_insn, existing_insn); - check_and_insert_insns->jump = 0; - } - else - emit_insn_after (check_insn, existing_insn); - - free_EXPR_LIST_node (check_and_insert_insns); - free_EXPR_LIST_node (old_p); - } - while (p != NULL_RTX); - - /* Load up any constants needed into temp gprs */ - for (i = 0; i < frv_ifcvt.cur_scratch_regs; i++) - { - rtx insn = emit_insn_before (frv_ifcvt.scratch_regs[i], existing_insn); - if (! frv_ifcvt.scratch_insns_bitmap) - frv_ifcvt.scratch_insns_bitmap = BITMAP_XMALLOC (); - bitmap_set_bit (frv_ifcvt.scratch_insns_bitmap, INSN_UID (insn)); - frv_ifcvt.scratch_regs[i] = NULL_RTX; - } - - frv_ifcvt.added_insns_list = NULL_RTX; - frv_ifcvt.cur_scratch_regs = 0; -} - - -/* A C expression to cancel any machine dependent modifications in converting - code to conditional execution in the code described by the conditional if - information CE_INFO. */ - -void -frv_ifcvt_modify_cancel (ce_if_block_t *ce_info ATTRIBUTE_UNUSED) -{ - int i; - rtx p = frv_ifcvt.added_insns_list; - - /* Loop freeing up the EXPR_LIST's allocated. */ - while (p != NULL_RTX) - { - rtx check_and_jump = XEXP (p, 0); - rtx old_p = p; - - p = XEXP (p, 1); - free_EXPR_LIST_node (check_and_jump); - free_EXPR_LIST_node (old_p); - } - - /* Release any temporary gprs allocated. */ - for (i = 0; i < frv_ifcvt.cur_scratch_regs; i++) - frv_ifcvt.scratch_regs[i] = NULL_RTX; - - frv_ifcvt.added_insns_list = NULL_RTX; - frv_ifcvt.cur_scratch_regs = 0; - return; -} - -/* A C expression for the size in bytes of the trampoline, as an integer. - The template is: - - setlo #0, - setlo #0, - sethi #0, - sethi #0, - jmpl @(gr0,) */ - -int -frv_trampoline_size (void) -{ - return 5 /* instructions */ * 4 /* instruction size */; -} - - -/* A C statement to initialize the variable parts of a trampoline. ADDR is an - RTX for the address of the trampoline; FNADDR is an RTX for the address of - the nested function; STATIC_CHAIN is an RTX for the static chain value that - should be passed to the function when it is called. - - The template is: - - setlo #0, - setlo #0, - sethi #0, - sethi #0, - jmpl @(gr0,) */ - -void -frv_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain) -{ - rtx sc_reg = force_reg (Pmode, static_chain); - - emit_library_call (gen_rtx_SYMBOL_REF (SImode, "__trampoline_setup"), - FALSE, VOIDmode, 4, - addr, Pmode, - GEN_INT (frv_trampoline_size ()), SImode, - fnaddr, Pmode, - sc_reg, Pmode); -} - - -/* Many machines have some registers that cannot be copied directly to or from - memory or even from other types of registers. An example is the `MQ' - register, which on most machines, can only be copied to or from general - registers, but not memory. Some machines allow copying all registers to and - from memory, but require a scratch register for stores to some memory - locations (e.g., those with symbolic address on the RT, and those with - certain symbolic address on the SPARC when compiling PIC). In some cases, - both an intermediate and a scratch register are required. - - You should define these macros to indicate to the reload phase that it may - need to allocate at least one register for a reload in addition to the - register to contain the data. Specifically, if copying X to a register - CLASS in MODE requires an intermediate register, you should define - `SECONDARY_INPUT_RELOAD_CLASS' to return the largest register class all of - whose registers can be used as intermediate registers or scratch registers. - - If copying a register CLASS in MODE to X requires an intermediate or scratch - register, `SECONDARY_OUTPUT_RELOAD_CLASS' should be defined to return the - largest register class required. If the requirements for input and output - reloads are the same, the macro `SECONDARY_RELOAD_CLASS' should be used - instead of defining both macros identically. - - The values returned by these macros are often `GENERAL_REGS'. Return - `NO_REGS' if no spare register is needed; i.e., if X can be directly copied - to or from a register of CLASS in MODE without requiring a scratch register. - Do not define this macro if it would always return `NO_REGS'. - - If a scratch register is required (either with or without an intermediate - register), you should define patterns for `reload_inM' or `reload_outM', as - required.. These patterns, which will normally be implemented with a - `define_expand', should be similar to the `movM' patterns, except that - operand 2 is the scratch register. - - Define constraints for the reload register and scratch register that contain - a single register class. If the original reload register (whose class is - CLASS) can meet the constraint given in the pattern, the value returned by - these macros is used for the class of the scratch register. Otherwise, two - additional reload registers are required. Their classes are obtained from - the constraints in the insn pattern. - - X might be a pseudo-register or a `subreg' of a pseudo-register, which could - either be in a hard register or in memory. Use `true_regnum' to find out; - it will return -1 if the pseudo is in memory and the hard register number if - it is in a register. - - These macros should not be used in the case where a particular class of - registers can only be copied to memory and not to another class of - registers. In that case, secondary reload registers are not needed and - would not be helpful. Instead, a stack location must be used to perform the - copy and the `movM' pattern should use memory as an intermediate storage. - This case often occurs between floating-point and general registers. */ - -enum reg_class -frv_secondary_reload_class (enum reg_class class, - enum machine_mode mode ATTRIBUTE_UNUSED, - rtx x, - int in_p ATTRIBUTE_UNUSED) -{ - enum reg_class ret; - - switch (class) - { - default: - ret = NO_REGS; - break; - - /* Accumulators/Accumulator guard registers need to go through floating - point registers. */ - case QUAD_REGS: - case EVEN_REGS: - case GPR_REGS: - ret = NO_REGS; - if (x && GET_CODE (x) == REG) - { - int regno = REGNO (x); - - if (ACC_P (regno) || ACCG_P (regno)) - ret = FPR_REGS; - } - break; - - /* Nonzero constants should be loaded into an FPR through a GPR. */ - case QUAD_FPR_REGS: - case FEVEN_REGS: - case FPR_REGS: - if (x && CONSTANT_P (x) && !ZERO_P (x)) - ret = GPR_REGS; - else - ret = NO_REGS; - break; - - /* All of these types need gpr registers. */ - case ICC_REGS: - case FCC_REGS: - case CC_REGS: - case ICR_REGS: - case FCR_REGS: - case CR_REGS: - case LCR_REG: - case LR_REG: - ret = GPR_REGS; - break; - - /* The accumulators need fpr registers */ - case ACC_REGS: - case EVEN_ACC_REGS: - case QUAD_ACC_REGS: - case ACCG_REGS: - ret = FPR_REGS; - break; - } - - return ret; -} - - -/* A C expression whose value is nonzero if pseudos that have been assigned to - registers of class CLASS would likely be spilled because registers of CLASS - are needed for spill registers. - - The default value of this macro returns 1 if CLASS has exactly one register - and zero otherwise. On most machines, this default should be used. Only - define this macro to some other expression if pseudo allocated by - `local-alloc.c' end up in memory because their hard registers were needed - for spill registers. If this macro returns nonzero for those classes, those - pseudos will only be allocated by `global.c', which knows how to reallocate - the pseudo to another register. If there would not be another register - available for reallocation, you should not change the definition of this - macro since the only effect of such a definition would be to slow down - register allocation. */ - -int -frv_class_likely_spilled_p (enum reg_class class) -{ - switch (class) - { - default: - break; - - case ICC_REGS: - case FCC_REGS: - case CC_REGS: - case ICR_REGS: - case FCR_REGS: - case CR_REGS: - case LCR_REG: - case LR_REG: - case SPR_REGS: - case QUAD_ACC_REGS: - case EVEN_ACC_REGS: - case ACC_REGS: - case ACCG_REGS: - return TRUE; - } - - return FALSE; -} - - -/* An expression for the alignment of a structure field FIELD if the - alignment computed in the usual way is COMPUTED. GCC uses this - value instead of the value in `BIGGEST_ALIGNMENT' or - `BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only. */ - -/* The definition type of the bit field data is either char, short, long or - long long. The maximum bit size is the number of bits of its own type. - - The bit field data is assigned to a storage unit that has an adequate size - for bit field data retention and is located at the smallest address. - - Consecutive bit field data are packed at consecutive bits having the same - storage unit, with regard to the type, beginning with the MSB and continuing - toward the LSB. - - If a field to be assigned lies over a bit field type boundary, its - assignment is completed by aligning it with a boundary suitable for the - type. - - When a bit field having a bit length of 0 is declared, it is forcibly - assigned to the next storage unit. - - e.g) - struct { - int a:2; - int b:6; - char c:4; - int d:10; - int :0; - int f:2; - } x; - - +0 +1 +2 +3 - &x 00000000 00000000 00000000 00000000 - MLM----L - a b - &x+4 00000000 00000000 00000000 00000000 - M--L - c - &x+8 00000000 00000000 00000000 00000000 - M----------L - d - &x+12 00000000 00000000 00000000 00000000 - ML - f -*/ - -int -frv_adjust_field_align (tree field, int computed) -{ - /* Make sure that the bitfield is not wider than the type. */ - if (DECL_BIT_FIELD (field) - && !DECL_ARTIFICIAL (field)) - { - tree parent = DECL_CONTEXT (field); - tree prev = NULL_TREE; - tree cur; - - for (cur = TYPE_FIELDS (parent); cur && cur != field; cur = TREE_CHAIN (cur)) - { - if (TREE_CODE (cur) != FIELD_DECL) - continue; - - prev = cur; - } - - if (!cur) - abort (); - - /* If this isn't a :0 field and if the previous element is a bitfield - also, see if the type is different, if so, we will need to align the - bit-field to the next boundary. */ - if (prev - && ! DECL_PACKED (field) - && ! integer_zerop (DECL_SIZE (field)) - && DECL_BIT_FIELD_TYPE (field) != DECL_BIT_FIELD_TYPE (prev)) - { - int prev_align = TYPE_ALIGN (TREE_TYPE (prev)); - int cur_align = TYPE_ALIGN (TREE_TYPE (field)); - computed = (prev_align > cur_align) ? prev_align : cur_align; - } - } - - return computed; -} - - -/* A C expression that is nonzero if it is permissible to store a value of mode - MODE in hard register number REGNO (or in several registers starting with - that one). For a machine where all registers are equivalent, a suitable - definition is - - #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 - - It is not necessary for this macro to check for the numbers of fixed - registers, because the allocation mechanism considers them to be always - occupied. - - On some machines, double-precision values must be kept in even/odd register - pairs. The way to implement that is to define this macro to reject odd - register numbers for such modes. - - The minimum requirement for a mode to be OK in a register is that the - `movMODE' instruction pattern support moves between the register and any - other hard register for which the mode is OK; and that moving a value into - the register and back out not alter it. - - Since the same instruction used to move `SImode' will work for all narrower - integer modes, it is not necessary on any machine for `HARD_REGNO_MODE_OK' - to distinguish between these modes, provided you define patterns `movhi', - etc., to take advantage of this. This is useful because of the interaction - between `HARD_REGNO_MODE_OK' and `MODES_TIEABLE_P'; it is very desirable for - all integer modes to be tieable. - - Many machines have special registers for floating point arithmetic. Often - people assume that floating point machine modes are allowed only in floating - point registers. This is not true. Any registers that can hold integers - can safely *hold* a floating point machine mode, whether or not floating - arithmetic can be done on it in those registers. Integer move instructions - can be used to move the values. - - On some machines, though, the converse is true: fixed-point machine modes - may not go in floating registers. This is true if the floating registers - normalize any value stored in them, because storing a non-floating value - there would garble it. In this case, `HARD_REGNO_MODE_OK' should reject - fixed-point machine modes in floating registers. But if the floating - registers do not automatically normalize, if you can store any bit pattern - in one and retrieve it unchanged without a trap, then any machine mode may - go in a floating register, so you can define this macro to say so. - - The primary significance of special floating registers is rather that they - are the registers acceptable in floating point arithmetic instructions. - However, this is of no concern to `HARD_REGNO_MODE_OK'. You handle it by - writing the proper constraints for those instructions. - - On some machines, the floating registers are especially slow to access, so - that it is better to store a value in a stack frame than in such a register - if floating point arithmetic is not being done. As long as the floating - registers are not in class `GENERAL_REGS', they will not be used unless some - pattern's constraint asks for one. */ - -int -frv_hard_regno_mode_ok (int regno, enum machine_mode mode) -{ - int base; - int mask; - - switch (mode) - { - case CCmode: - case CC_UNSmode: - return ICC_P (regno) || GPR_P (regno); - - case CC_CCRmode: - return CR_P (regno) || GPR_P (regno); - - case CC_FPmode: - return FCC_P (regno) || GPR_P (regno); - - default: - break; - } - - /* Set BASE to the first register in REGNO's class. Set MASK to the - bits that must be clear in (REGNO - BASE) for the register to be - well-aligned. */ - if (INTEGRAL_MODE_P (mode) || FLOAT_MODE_P (mode) || VECTOR_MODE_P (mode)) - { - if (ACCG_P (regno)) - { - /* ACCGs store one byte. Two-byte quantities must start in - even-numbered registers, four-byte ones in registers whose - numbers are divisible by four, and so on. */ - base = ACCG_FIRST; - mask = GET_MODE_SIZE (mode) - 1; - } - else - { - /* The other registers store one word. */ - if (GPR_P (regno) || regno == AP_FIRST) - base = GPR_FIRST; - - else if (FPR_P (regno)) - base = FPR_FIRST; - - else if (ACC_P (regno)) - base = ACC_FIRST; - - else if (SPR_P (regno)) - return mode == SImode; - - /* Fill in the table. */ - else - return 0; - - /* Anything smaller than an SI is OK in any word-sized register. */ - if (GET_MODE_SIZE (mode) < 4) - return 1; - - mask = (GET_MODE_SIZE (mode) / 4) - 1; - } - return (((regno - base) & mask) == 0); - } - - return 0; -} - - -/* A C expression for the number of consecutive hard registers, starting at - register number REGNO, required to hold a value of mode MODE. - - On a machine where all registers are exactly one word, a suitable definition - of this macro is - - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ - / UNITS_PER_WORD)) */ - -/* On the FRV, make the CC_FP mode take 3 words in the integer registers, so - that we can build the appropriate instructions to properly reload the - values. Also, make the byte-sized accumulator guards use one guard - for each byte. */ - -int -frv_hard_regno_nregs (int regno, enum machine_mode mode) -{ - if (ACCG_P (regno)) - return GET_MODE_SIZE (mode); - else - return (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; -} - - -/* A C expression for the maximum number of consecutive registers of - class CLASS needed to hold a value of mode MODE. - - This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value - of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of - `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS. - - This macro helps control the handling of multiple-word values in - the reload pass. - - This declaration is required. */ - -int -frv_class_max_nregs (enum reg_class class, enum machine_mode mode) -{ - if (class == ACCG_REGS) - /* An N-byte value requires N accumulator guards. */ - return GET_MODE_SIZE (mode); - else - return (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; -} - - -/* A C expression that is nonzero if X is a legitimate constant for an - immediate operand on the target machine. You can assume that X satisfies - `CONSTANT_P', so you need not check this. In fact, `1' is a suitable - definition for this macro on machines where anything `CONSTANT_P' is valid. */ - -int -frv_legitimate_constant_p (rtx x) -{ - enum machine_mode mode = GET_MODE (x); - - /* All of the integer constants are ok. */ - if (GET_CODE (x) != CONST_DOUBLE) - return TRUE; - - /* double integer constants are ok. */ - if (mode == VOIDmode || mode == DImode) - return TRUE; - - /* 0 is always ok. */ - if (x == CONST0_RTX (mode)) - return TRUE; - - /* If floating point is just emulated, allow any constant, since it will be - constructed in the GPRs. */ - if (!TARGET_HAS_FPRS) - return TRUE; - - if (mode == DFmode && !TARGET_DOUBLE) - return TRUE; - - /* Otherwise store the constant away and do a load. */ - return FALSE; -} - -/* A C expression for the cost of moving data from a register in class FROM to - one in class TO. The classes are expressed using the enumeration values - such as `GENERAL_REGS'. A value of 4 is the default; other values are - interpreted relative to that. - - It is not required that the cost always equal 2 when FROM is the same as TO; - on some machines it is expensive to move between registers if they are not - general registers. - - If reload sees an insn consisting of a single `set' between two hard - registers, and if `REGISTER_MOVE_COST' applied to their classes returns a - value of 2, reload does not check to ensure that the constraints of the insn - are met. Setting a cost of other than 2 will allow reload to verify that - the constraints are met. You should do this if the `movM' pattern's - constraints do not allow such copying. */ - -#define HIGH_COST 40 -#define MEDIUM_COST 3 -#define LOW_COST 1 - -int -frv_register_move_cost (enum reg_class from, enum reg_class to) -{ - switch (from) - { - default: - break; - - case QUAD_REGS: - case EVEN_REGS: - case GPR_REGS: - switch (to) - { - default: - break; - - case QUAD_REGS: - case EVEN_REGS: - case GPR_REGS: - return LOW_COST; - - case FEVEN_REGS: - case FPR_REGS: - return LOW_COST; - - case LCR_REG: - case LR_REG: - case SPR_REGS: - return LOW_COST; - } - - case FEVEN_REGS: - case FPR_REGS: - switch (to) - { - default: - break; - - case QUAD_REGS: - case EVEN_REGS: - case GPR_REGS: - case ACC_REGS: - case EVEN_ACC_REGS: - case QUAD_ACC_REGS: - case ACCG_REGS: - return MEDIUM_COST; - - case FEVEN_REGS: - case FPR_REGS: - return LOW_COST; - } - - case LCR_REG: - case LR_REG: - case SPR_REGS: - switch (to) - { - default: - break; - - case QUAD_REGS: - case EVEN_REGS: - case GPR_REGS: - return MEDIUM_COST; - } - - case ACC_REGS: - case EVEN_ACC_REGS: - case QUAD_ACC_REGS: - case ACCG_REGS: - switch (to) - { - default: - break; - - case FEVEN_REGS: - case FPR_REGS: - return MEDIUM_COST; - - } - } - - return HIGH_COST; -} - -/* Implementation of TARGET_ASM_INTEGER. In the FRV case we need to - use ".picptr" to generate safe relocations for PIC code. We also - need a fixup entry for aligned (non-debugging) code. */ - -static bool -frv_assemble_integer (rtx value, unsigned int size, int aligned_p) -{ - if (flag_pic && size == UNITS_PER_WORD) - { - if (GET_CODE (value) == CONST - || GET_CODE (value) == SYMBOL_REF - || GET_CODE (value) == LABEL_REF) - { - if (aligned_p) - { - static int label_num = 0; - char buf[256]; - const char *p; - - ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", label_num++); - p = (* targetm.strip_name_encoding) (buf); - - fprintf (asm_out_file, "%s:\n", p); - fprintf (asm_out_file, "%s\n", FIXUP_SECTION_ASM_OP); - fprintf (asm_out_file, "\t.picptr\t%s\n", p); - fprintf (asm_out_file, "\t.previous\n"); - } - assemble_integer_with_op ("\t.picptr\t", value); - return true; - } - if (!aligned_p) - { - /* We've set the unaligned SI op to NULL, so we always have to - handle the unaligned case here. */ - assemble_integer_with_op ("\t.4byte\t", value); - return true; - } - } - return default_assemble_integer (value, size, aligned_p); -} - -/* Function to set up the backend function structure. */ - -static struct machine_function * -frv_init_machine_status (void) -{ - return ggc_alloc_cleared (sizeof (struct machine_function)); -} - -/* Implement TARGET_SCHED_ISSUE_RATE. */ - -static int -frv_issue_rate (void) -{ - if (!TARGET_PACK) - return 1; - - switch (frv_cpu_type) - { - default: - case FRV_CPU_FR300: - case FRV_CPU_SIMPLE: - return 1; - - case FRV_CPU_FR400: - return 2; - - case FRV_CPU_GENERIC: - case FRV_CPU_FR500: - case FRV_CPU_TOMCAT: - return 4; - } -} - - -/* Implement TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE. */ - -static int -frv_use_dfa_pipeline_interface (void) -{ - return true; -} - -/* Update the register state information, to know about which registers are set - or clobbered. */ - -static void -frv_registers_update (rtx x, - unsigned char reg_state[], - int modified[], - int *p_num_mod, - int flag) -{ - int regno, reg_max; - rtx reg; - rtx cond; - const char *format; - int length; - int j; - - switch (GET_CODE (x)) - { - default: - break; - - /* Clobber just modifies a register, it doesn't make it live. */ - case CLOBBER: - frv_registers_update (XEXP (x, 0), reg_state, modified, p_num_mod, - flag | REGSTATE_MODIFIED); - return; - - /* Pre modify updates the first argument, just references the second. */ - case PRE_MODIFY: - case SET: - frv_registers_update (XEXP (x, 0), reg_state, modified, p_num_mod, - flag | REGSTATE_MODIFIED | REGSTATE_LIVE); - frv_registers_update (XEXP (x, 1), reg_state, modified, p_num_mod, flag); - return; - - /* For COND_EXEC, pass the appropriate flag to evaluate the conditional - statement, but just to be sure, make sure it is the type of cond_exec - we expect. */ - case COND_EXEC: - cond = XEXP (x, 0); - if ((GET_CODE (cond) == EQ || GET_CODE (cond) == NE) - && GET_CODE (XEXP (cond, 0)) == REG - && CR_P (REGNO (XEXP (cond, 0))) - && GET_CODE (XEXP (cond, 1)) == CONST_INT - && INTVAL (XEXP (cond, 1)) == 0 - && (flag & (REGSTATE_MODIFIED | REGSTATE_IF_EITHER)) == 0) - { - frv_registers_update (cond, reg_state, modified, p_num_mod, flag); - flag |= ((REGNO (XEXP (cond, 0)) - CR_FIRST) - | ((GET_CODE (cond) == NE) - ? REGSTATE_IF_TRUE - : REGSTATE_IF_FALSE)); - - frv_registers_update (XEXP (x, 1), reg_state, modified, p_num_mod, - flag); - return; - } - else - fatal_insn ("frv_registers_update", x); - - /* MEM resets the modification bits. */ - case MEM: - flag &= ~REGSTATE_MODIFIED; - break; - - /* See if we need to set the modified flag. */ - case SUBREG: - reg = SUBREG_REG (x); - if (GET_CODE (reg) == REG) - { - regno = subreg_regno (x); - reg_max = REGNO (reg) + HARD_REGNO_NREGS (regno, GET_MODE (reg)); - goto reg_common; - } - break; - - case REG: - regno = REGNO (x); - reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); - /* Fall through. */ - - reg_common: - if (flag & REGSTATE_MODIFIED) - { - flag &= REGSTATE_MASK; - while (regno < reg_max) - { - int rs = reg_state[regno]; - - if (flag != rs) - { - if ((rs & REGSTATE_MODIFIED) == 0) - { - modified[ *p_num_mod ] = regno; - (*p_num_mod)++; - } - - /* If the previous register state had the register as - modified, possibly in some conditional execution context, - and the current insn modifies in some other context, or - outside of conditional execution, just mark the variable - as modified. */ - else - flag &= ~(REGSTATE_IF_EITHER | REGSTATE_CC_MASK); - - reg_state[regno] = (rs | flag); - } - regno++; - } - } - return; - } - - - length = GET_RTX_LENGTH (GET_CODE (x)); - format = GET_RTX_FORMAT (GET_CODE (x)); - - for (j = 0; j < length; ++j) - { - switch (format[j]) - { - case 'e': - frv_registers_update (XEXP (x, j), reg_state, modified, p_num_mod, - flag); - break; - - case 'V': - case 'E': - if (XVEC (x, j) != 0) - { - int k; - for (k = 0; k < XVECLEN (x, j); ++k) - frv_registers_update (XVECEXP (x, j, k), reg_state, modified, - p_num_mod, flag); - } - break; - - default: - /* Nothing to do. */ - break; - } - } - - return; -} - - -/* Return if any registers in a hard register set were used an insn. */ - -static int -frv_registers_used_p (rtx x, unsigned char reg_state[], int flag) -{ - int regno, reg_max; - rtx reg; - rtx cond; - rtx dest; - const char *format; - int result; - int length; - int j; - - switch (GET_CODE (x)) - { - default: - break; - - /* Skip clobber, that doesn't use the previous value. */ - case CLOBBER: - return FALSE; - - /* For SET, if a conditional jump has occurred in the same insn, only - allow a set of a CR register if that register is not currently live. - This is because on the FR-V, B0/B1 instructions are always last. - Otherwise, don't look at the result, except within a MEM, but do look - at the source. */ - case SET: - dest = SET_DEST (x); - if (flag & REGSTATE_CONDJUMP - && GET_CODE (dest) == REG && CR_P (REGNO (dest)) - && (reg_state[ REGNO (dest) ] & REGSTATE_LIVE) != 0) - return TRUE; - - if (GET_CODE (dest) == MEM) - { - result = frv_registers_used_p (XEXP (dest, 0), reg_state, flag); - if (result) - return result; - } - - return frv_registers_used_p (SET_SRC (x), reg_state, flag); - - /* For COND_EXEC, pass the appropriate flag to evaluate the conditional - statement, but just to be sure, make sure it is the type of cond_exec - we expect. */ - case COND_EXEC: - cond = XEXP (x, 0); - if ((GET_CODE (cond) == EQ || GET_CODE (cond) == NE) - && GET_CODE (XEXP (cond, 0)) == REG - && CR_P (REGNO (XEXP (cond, 0))) - && GET_CODE (XEXP (cond, 1)) == CONST_INT - && INTVAL (XEXP (cond, 1)) == 0 - && (flag & (REGSTATE_MODIFIED | REGSTATE_IF_EITHER)) == 0) - { - result = frv_registers_used_p (cond, reg_state, flag); - if (result) - return result; - - flag |= ((REGNO (XEXP (cond, 0)) - CR_FIRST) - | ((GET_CODE (cond) == NE) - ? REGSTATE_IF_TRUE - : REGSTATE_IF_FALSE)); - - return frv_registers_used_p (XEXP (x, 1), reg_state, flag); - } - else - fatal_insn ("frv_registers_used_p", x); - - /* See if a register or subreg was modified in the same VLIW insn. */ - case SUBREG: - reg = SUBREG_REG (x); - if (GET_CODE (reg) == REG) - { - regno = subreg_regno (x); - reg_max = REGNO (reg) + HARD_REGNO_NREGS (regno, GET_MODE (reg)); - goto reg_common; - } - break; - - case REG: - regno = REGNO (x); - reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); - /* Fall through. */ - - reg_common: - while (regno < reg_max) - { - int rs = reg_state[regno]; - - if (rs & REGSTATE_MODIFIED) - { - int rs_if = rs & REGSTATE_IF_EITHER; - int flag_if = flag & REGSTATE_IF_EITHER; - - /* Simple modification, no conditional execution */ - if ((rs & REGSTATE_IF_EITHER) == 0) - return TRUE; - - /* See if the variable is only modified in a conditional - execution expression opposite to the conditional execution - expression that governs this expression (ie, true vs. false - for the same CC register). If this isn't two halves of the - same conditional expression, consider the register - modified. */ - if (((rs_if == REGSTATE_IF_TRUE && flag_if == REGSTATE_IF_FALSE) - || (rs_if == REGSTATE_IF_FALSE && flag_if == REGSTATE_IF_TRUE)) - && ((rs & REGSTATE_CC_MASK) == (flag & REGSTATE_CC_MASK))) - ; - else - return TRUE; - } - - regno++; - } - return FALSE; - } - - - length = GET_RTX_LENGTH (GET_CODE (x)); - format = GET_RTX_FORMAT (GET_CODE (x)); - - for (j = 0; j < length; ++j) - { - switch (format[j]) - { - case 'e': - result = frv_registers_used_p (XEXP (x, j), reg_state, flag); - if (result != 0) - return result; - break; - - case 'V': - case 'E': - if (XVEC (x, j) != 0) - { - int k; - for (k = 0; k < XVECLEN (x, j); ++k) - { - result = frv_registers_used_p (XVECEXP (x, j, k), reg_state, - flag); - if (result != 0) - return result; - } - } - break; - - default: - /* Nothing to do. */ - break; - } - } - - return 0; -} - -/* Return if any registers in a hard register set were set in an insn. */ - -static int -frv_registers_set_p (rtx x, unsigned char reg_state[], int modify_p) -{ - int regno, reg_max; - rtx reg; - rtx cond; - const char *format; - int length; - int j; - - switch (GET_CODE (x)) - { - default: - break; - - case CLOBBER: - return frv_registers_set_p (XEXP (x, 0), reg_state, TRUE); - - case PRE_MODIFY: - case SET: - return (frv_registers_set_p (XEXP (x, 0), reg_state, TRUE) - || frv_registers_set_p (XEXP (x, 1), reg_state, FALSE)); - - case COND_EXEC: - cond = XEXP (x, 0); - /* Just to be sure, make sure it is the type of cond_exec we - expect. */ - if ((GET_CODE (cond) == EQ || GET_CODE (cond) == NE) - && GET_CODE (XEXP (cond, 0)) == REG - && CR_P (REGNO (XEXP (cond, 0))) - && GET_CODE (XEXP (cond, 1)) == CONST_INT - && INTVAL (XEXP (cond, 1)) == 0 - && !modify_p) - return frv_registers_set_p (XEXP (x, 1), reg_state, modify_p); - else - fatal_insn ("frv_registers_set_p", x); - - /* MEM resets the modification bits. */ - case MEM: - modify_p = FALSE; - break; - - /* See if we need to set the modified modify_p. */ - case SUBREG: - reg = SUBREG_REG (x); - if (GET_CODE (reg) == REG) - { - regno = subreg_regno (x); - reg_max = REGNO (reg) + HARD_REGNO_NREGS (regno, GET_MODE (reg)); - goto reg_common; - } - break; - - case REG: - regno = REGNO (x); - reg_max = regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); - /* Fall through. */ - - reg_common: - if (modify_p) - while (regno < reg_max) - { - int rs = reg_state[regno]; - - if (rs & REGSTATE_MODIFIED) - return TRUE; - regno++; - } - return FALSE; - } - - - length = GET_RTX_LENGTH (GET_CODE (x)); - format = GET_RTX_FORMAT (GET_CODE (x)); - - for (j = 0; j < length; ++j) - { - switch (format[j]) - { - case 'e': - if (frv_registers_set_p (XEXP (x, j), reg_state, modify_p)) - return TRUE; - break; - - case 'V': - case 'E': - if (XVEC (x, j) != 0) - { - int k; - for (k = 0; k < XVECLEN (x, j); ++k) - if (frv_registers_set_p (XVECEXP (x, j, k), reg_state, - modify_p)) - return TRUE; - } - break; - - default: - /* Nothing to do. */ - break; - } - } - - return FALSE; -} - - -/* On the FR-V, this pass is used to rescan the insn chain, and pack - conditional branches/calls/jumps, etc. with previous insns where it can. It - does not reorder the instructions. We assume the scheduler left the flow - information in a reasonable state. */ - -static void -frv_pack_insns (void) -{ - state_t frv_state; /* frv state machine */ - int cur_start_vliw_p; /* current insn starts a VLIW insn */ - int next_start_vliw_p; /* next insn starts a VLIW insn */ - int cur_condjump_p; /* flag if current insn is a cond jump*/ - int next_condjump_p; /* flag if next insn is a cond jump */ - rtx insn; - rtx link; - int j; - int num_mod = 0; /* # of modified registers */ - int modified[FIRST_PSEUDO_REGISTER]; /* registers modified in current VLIW */ - /* register state information */ - unsigned char reg_state[FIRST_PSEUDO_REGISTER]; - - /* If we weren't going to pack the insns, don't bother with this pass. */ - if (!optimize - || !flag_schedule_insns_after_reload - || TARGET_NO_VLIW_BRANCH - || frv_issue_rate () == 1) - return; - - /* Set up the instruction and register states. */ - dfa_start (); - frv_state = (state_t) xmalloc (state_size ()); - memset (reg_state, REGSTATE_DEAD, sizeof (reg_state)); - - /* Go through the insns, and repack the insns. */ - state_reset (frv_state); - cur_start_vliw_p = FALSE; - next_start_vliw_p = TRUE; - cur_condjump_p = 0; - next_condjump_p = 0; - - for (insn = get_insns (); insn != NULL_RTX; insn = NEXT_INSN (insn)) - { - enum rtx_code code = GET_CODE (insn); - enum rtx_code pattern_code; - - /* For basic block begin notes redo the live information, and skip other - notes. */ - if (code == NOTE) - { - if (NOTE_LINE_NUMBER (insn) == (int)NOTE_INSN_BASIC_BLOCK) - { - regset live; - - for (j = 0; j < FIRST_PSEUDO_REGISTER; j++) - reg_state[j] &= ~ REGSTATE_LIVE; - - live = NOTE_BASIC_BLOCK (insn)->global_live_at_start; - EXECUTE_IF_SET_IN_REG_SET(live, 0, j, - { - reg_state[j] |= REGSTATE_LIVE; - }); - } - - continue; - } - - /* Things like labels reset everything. */ - if (GET_RTX_CLASS (code) != 'i') - { - next_start_vliw_p = TRUE; - continue; - } - - /* Clear the VLIW start flag on random USE and CLOBBER insns, which is - set on the USE insn that precedes the return, and potentially on - CLOBBERs for setting multiword variables. Also skip the ADDR_VEC - holding the case table labels. */ - pattern_code = GET_CODE (PATTERN (insn)); - if (pattern_code == USE || pattern_code == CLOBBER - || pattern_code == ADDR_VEC || pattern_code == ADDR_DIFF_VEC) - { - CLEAR_VLIW_START (insn); - continue; - } - - cur_start_vliw_p = next_start_vliw_p; - next_start_vliw_p = FALSE; - - cur_condjump_p |= next_condjump_p; - next_condjump_p = 0; - - /* Unconditional branches and calls end the current VLIW insn. */ - if (code == CALL_INSN) - { - next_start_vliw_p = TRUE; - - /* On a TOMCAT, calls must be alone in the VLIW insns. */ - if (frv_cpu_type == FRV_CPU_TOMCAT) - cur_start_vliw_p = TRUE; - } - else if (code == JUMP_INSN) - { - if (any_condjump_p (insn)) - next_condjump_p = REGSTATE_CONDJUMP; - else - next_start_vliw_p = TRUE; - } - - /* Only allow setting a CCR register after a conditional branch. */ - else if (((cur_condjump_p & REGSTATE_CONDJUMP) != 0) - && get_attr_type (insn) != TYPE_CCR) - cur_start_vliw_p = TRUE; - - /* Determine if we need to start a new VLIW instruction. */ - if (cur_start_vliw_p - /* Do not check for register conflicts in a setlo instruction - because any output or true dependencies will be with the - partnering sethi instruction, with which it can be packed. - - Although output dependencies are rare they are still - possible. So check output dependencies in VLIW insn. */ - || (get_attr_type (insn) != TYPE_SETLO - && (frv_registers_used_p (PATTERN (insn), - reg_state, - cur_condjump_p) - || frv_registers_set_p (PATTERN (insn), reg_state, FALSE))) - || state_transition (frv_state, insn) >= 0) - { - SET_VLIW_START (insn); - state_reset (frv_state); - state_transition (frv_state, insn); - cur_condjump_p = 0; - - /* Update the modified registers. */ - for (j = 0; j < num_mod; j++) - reg_state[ modified[j] ] &= ~(REGSTATE_CC_MASK - | REGSTATE_IF_EITHER - | REGSTATE_MODIFIED); - - num_mod = 0; - } - else - CLEAR_VLIW_START (insn); - - /* Record which registers are modified. */ - frv_registers_update (PATTERN (insn), reg_state, modified, &num_mod, 0); - - /* Process the death notices. */ - for (link = REG_NOTES (insn); - link != NULL_RTX; - link = XEXP (link, 1)) - { - rtx reg = XEXP (link, 0); - - if (REG_NOTE_KIND (link) == REG_DEAD && GET_CODE (reg) == REG) - { - int regno = REGNO (reg); - int n = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg)); - for (; regno < n; regno++) - reg_state[regno] &= ~REGSTATE_LIVE; - } - } - } - - free (frv_state); - dfa_finish (); - return; -} - - -#define def_builtin(name, type, code) \ - builtin_function ((name), (type), (code), BUILT_IN_MD, NULL, NULL) - -struct builtin_description -{ - enum insn_code icode; - const char *name; - enum frv_builtins code; - enum rtx_code comparison; - unsigned int flag; -}; - -/* Media intrinsics that take a single, constant argument. */ - -static struct builtin_description bdesc_set[] = -{ - { CODE_FOR_mhdsets, "__MHDSETS", FRV_BUILTIN_MHDSETS, 0, 0 } -}; - -/* Media intrinsics that take just one argument. */ - -static struct builtin_description bdesc_1arg[] = -{ - { CODE_FOR_mnot, "__MNOT", FRV_BUILTIN_MNOT, 0, 0 }, - { CODE_FOR_munpackh, "__MUNPACKH", FRV_BUILTIN_MUNPACKH, 0, 0 }, - { CODE_FOR_mbtoh, "__MBTOH", FRV_BUILTIN_MBTOH, 0, 0 }, - { CODE_FOR_mhtob, "__MHTOB", FRV_BUILTIN_MHTOB, 0, 0 }, - { CODE_FOR_mabshs, "__MABSHS", FRV_BUILTIN_MABSHS, 0, 0 } -}; - -/* Media intrinsics that take two arguments. */ - -static struct builtin_description bdesc_2arg[] = -{ - { CODE_FOR_mand, "__MAND", FRV_BUILTIN_MAND, 0, 0 }, - { CODE_FOR_mor, "__MOR", FRV_BUILTIN_MOR, 0, 0 }, - { CODE_FOR_mxor, "__MXOR", FRV_BUILTIN_MXOR, 0, 0 }, - { CODE_FOR_maveh, "__MAVEH", FRV_BUILTIN_MAVEH, 0, 0 }, - { CODE_FOR_msaths, "__MSATHS", FRV_BUILTIN_MSATHS, 0, 0 }, - { CODE_FOR_msathu, "__MSATHU", FRV_BUILTIN_MSATHU, 0, 0 }, - { CODE_FOR_maddhss, "__MADDHSS", FRV_BUILTIN_MADDHSS, 0, 0 }, - { CODE_FOR_maddhus, "__MADDHUS", FRV_BUILTIN_MADDHUS, 0, 0 }, - { CODE_FOR_msubhss, "__MSUBHSS", FRV_BUILTIN_MSUBHSS, 0, 0 }, - { CODE_FOR_msubhus, "__MSUBHUS", FRV_BUILTIN_MSUBHUS, 0, 0 }, - { CODE_FOR_mqaddhss, "__MQADDHSS", FRV_BUILTIN_MQADDHSS, 0, 0 }, - { CODE_FOR_mqaddhus, "__MQADDHUS", FRV_BUILTIN_MQADDHUS, 0, 0 }, - { CODE_FOR_mqsubhss, "__MQSUBHSS", FRV_BUILTIN_MQSUBHSS, 0, 0 }, - { CODE_FOR_mqsubhus, "__MQSUBHUS", FRV_BUILTIN_MQSUBHUS, 0, 0 }, - { CODE_FOR_mpackh, "__MPACKH", FRV_BUILTIN_MPACKH, 0, 0 }, - { CODE_FOR_mdpackh, "__MDPACKH", FRV_BUILTIN_MDPACKH, 0, 0 }, - { CODE_FOR_mcop1, "__Mcop1", FRV_BUILTIN_MCOP1, 0, 0 }, - { CODE_FOR_mcop2, "__Mcop2", FRV_BUILTIN_MCOP2, 0, 0 }, - { CODE_FOR_mwcut, "__MWCUT", FRV_BUILTIN_MWCUT, 0, 0 }, - { CODE_FOR_mqsaths, "__MQSATHS", FRV_BUILTIN_MQSATHS, 0, 0 } -}; - -/* Media intrinsics that take two arguments, the first being an ACC number. */ - -static struct builtin_description bdesc_cut[] = -{ - { CODE_FOR_mcut, "__MCUT", FRV_BUILTIN_MCUT, 0, 0 }, - { CODE_FOR_mcutss, "__MCUTSS", FRV_BUILTIN_MCUTSS, 0, 0 }, - { CODE_FOR_mdcutssi, "__MDCUTSSI", FRV_BUILTIN_MDCUTSSI, 0, 0 } -}; - -/* Two-argument media intrinsics with an immediate second argument. */ - -static struct builtin_description bdesc_2argimm[] = -{ - { CODE_FOR_mrotli, "__MROTLI", FRV_BUILTIN_MROTLI, 0, 0 }, - { CODE_FOR_mrotri, "__MROTRI", FRV_BUILTIN_MROTRI, 0, 0 }, - { CODE_FOR_msllhi, "__MSLLHI", FRV_BUILTIN_MSLLHI, 0, 0 }, - { CODE_FOR_msrlhi, "__MSRLHI", FRV_BUILTIN_MSRLHI, 0, 0 }, - { CODE_FOR_msrahi, "__MSRAHI", FRV_BUILTIN_MSRAHI, 0, 0 }, - { CODE_FOR_mexpdhw, "__MEXPDHW", FRV_BUILTIN_MEXPDHW, 0, 0 }, - { CODE_FOR_mexpdhd, "__MEXPDHD", FRV_BUILTIN_MEXPDHD, 0, 0 }, - { CODE_FOR_mdrotli, "__MDROTLI", FRV_BUILTIN_MDROTLI, 0, 0 }, - { CODE_FOR_mcplhi, "__MCPLHI", FRV_BUILTIN_MCPLHI, 0, 0 }, - { CODE_FOR_mcpli, "__MCPLI", FRV_BUILTIN_MCPLI, 0, 0 }, - { CODE_FOR_mhsetlos, "__MHSETLOS", FRV_BUILTIN_MHSETLOS, 0, 0 }, - { CODE_FOR_mhsetloh, "__MHSETLOH", FRV_BUILTIN_MHSETLOH, 0, 0 }, - { CODE_FOR_mhsethis, "__MHSETHIS", FRV_BUILTIN_MHSETHIS, 0, 0 }, - { CODE_FOR_mhsethih, "__MHSETHIH", FRV_BUILTIN_MHSETHIH, 0, 0 }, - { CODE_FOR_mhdseth, "__MHDSETH", FRV_BUILTIN_MHDSETH, 0, 0 } -}; - -/* Media intrinsics that take two arguments and return void, the first argument - being a pointer to 4 words in memory. */ - -static struct builtin_description bdesc_void2arg[] = -{ - { CODE_FOR_mdunpackh, "__MDUNPACKH", FRV_BUILTIN_MDUNPACKH, 0, 0 }, - { CODE_FOR_mbtohe, "__MBTOHE", FRV_BUILTIN_MBTOHE, 0, 0 }, -}; - -/* Media intrinsics that take three arguments, the first being a const_int that - denotes an accumulator, and that return void. */ - -static struct builtin_description bdesc_void3arg[] = -{ - { CODE_FOR_mcpxrs, "__MCPXRS", FRV_BUILTIN_MCPXRS, 0, 0 }, - { CODE_FOR_mcpxru, "__MCPXRU", FRV_BUILTIN_MCPXRU, 0, 0 }, - { CODE_FOR_mcpxis, "__MCPXIS", FRV_BUILTIN_MCPXIS, 0, 0 }, - { CODE_FOR_mcpxiu, "__MCPXIU", FRV_BUILTIN_MCPXIU, 0, 0 }, - { CODE_FOR_mmulhs, "__MMULHS", FRV_BUILTIN_MMULHS, 0, 0 }, - { CODE_FOR_mmulhu, "__MMULHU", FRV_BUILTIN_MMULHU, 0, 0 }, - { CODE_FOR_mmulxhs, "__MMULXHS", FRV_BUILTIN_MMULXHS, 0, 0 }, - { CODE_FOR_mmulxhu, "__MMULXHU", FRV_BUILTIN_MMULXHU, 0, 0 }, - { CODE_FOR_mmachs, "__MMACHS", FRV_BUILTIN_MMACHS, 0, 0 }, - { CODE_FOR_mmachu, "__MMACHU", FRV_BUILTIN_MMACHU, 0, 0 }, - { CODE_FOR_mmrdhs, "__MMRDHS", FRV_BUILTIN_MMRDHS, 0, 0 }, - { CODE_FOR_mmrdhu, "__MMRDHU", FRV_BUILTIN_MMRDHU, 0, 0 }, - { CODE_FOR_mqcpxrs, "__MQCPXRS", FRV_BUILTIN_MQCPXRS, 0, 0 }, - { CODE_FOR_mqcpxru, "__MQCPXRU", FRV_BUILTIN_MQCPXRU, 0, 0 }, - { CODE_FOR_mqcpxis, "__MQCPXIS", FRV_BUILTIN_MQCPXIS, 0, 0 }, - { CODE_FOR_mqcpxiu, "__MQCPXIU", FRV_BUILTIN_MQCPXIU, 0, 0 }, - { CODE_FOR_mqmulhs, "__MQMULHS", FRV_BUILTIN_MQMULHS, 0, 0 }, - { CODE_FOR_mqmulhu, "__MQMULHU", FRV_BUILTIN_MQMULHU, 0, 0 }, - { CODE_FOR_mqmulxhs, "__MQMULXHS", FRV_BUILTIN_MQMULXHS, 0, 0 }, - { CODE_FOR_mqmulxhu, "__MQMULXHU", FRV_BUILTIN_MQMULXHU, 0, 0 }, - { CODE_FOR_mqmachs, "__MQMACHS", FRV_BUILTIN_MQMACHS, 0, 0 }, - { CODE_FOR_mqmachu, "__MQMACHU", FRV_BUILTIN_MQMACHU, 0, 0 }, - { CODE_FOR_mqxmachs, "__MQXMACHS", FRV_BUILTIN_MQXMACHS, 0, 0 }, - { CODE_FOR_mqxmacxhs, "__MQXMACXHS", FRV_BUILTIN_MQXMACXHS, 0, 0 }, - { CODE_FOR_mqmacxhs, "__MQMACXHS", FRV_BUILTIN_MQMACXHS, 0, 0 } -}; - -/* Media intrinsics that take two accumulator numbers as argument and - return void. */ - -static struct builtin_description bdesc_voidacc[] = -{ - { CODE_FOR_maddaccs, "__MADDACCS", FRV_BUILTIN_MADDACCS, 0, 0 }, - { CODE_FOR_msubaccs, "__MSUBACCS", FRV_BUILTIN_MSUBACCS, 0, 0 }, - { CODE_FOR_masaccs, "__MASACCS", FRV_BUILTIN_MASACCS, 0, 0 }, - { CODE_FOR_mdaddaccs, "__MDADDACCS", FRV_BUILTIN_MDADDACCS, 0, 0 }, - { CODE_FOR_mdsubaccs, "__MDSUBACCS", FRV_BUILTIN_MDSUBACCS, 0, 0 }, - { CODE_FOR_mdasaccs, "__MDASACCS", FRV_BUILTIN_MDASACCS, 0, 0 } -}; - -/* Initialize media builtins. */ - -static void -frv_init_builtins (void) -{ - tree endlink = void_list_node; - tree accumulator = integer_type_node; - tree integer = integer_type_node; - tree voidt = void_type_node; - tree uhalf = short_unsigned_type_node; - tree sword1 = long_integer_type_node; - tree uword1 = long_unsigned_type_node; - tree sword2 = long_long_integer_type_node; - tree uword2 = long_long_unsigned_type_node; - tree uword4 = build_pointer_type (uword1); - -#define UNARY(RET, T1) \ - build_function_type (RET, tree_cons (NULL_TREE, T1, endlink)) - -#define BINARY(RET, T1, T2) \ - build_function_type (RET, tree_cons (NULL_TREE, T1, \ - tree_cons (NULL_TREE, T2, endlink))) - -#define TRINARY(RET, T1, T2, T3) \ - build_function_type (RET, tree_cons (NULL_TREE, T1, \ - tree_cons (NULL_TREE, T2, \ - tree_cons (NULL_TREE, T3, endlink)))) - - tree void_ftype_void = build_function_type (voidt, endlink); - - tree void_ftype_acc = UNARY (voidt, accumulator); - tree void_ftype_uw4_uw1 = BINARY (voidt, uword4, uword1); - tree void_ftype_uw4_uw2 = BINARY (voidt, uword4, uword2); - tree void_ftype_acc_uw1 = BINARY (voidt, accumulator, uword1); - tree void_ftype_acc_acc = BINARY (voidt, accumulator, accumulator); - tree void_ftype_acc_uw1_uw1 = TRINARY (voidt, accumulator, uword1, uword1); - tree void_ftype_acc_sw1_sw1 = TRINARY (voidt, accumulator, sword1, sword1); - tree void_ftype_acc_uw2_uw2 = TRINARY (voidt, accumulator, uword2, uword2); - tree void_ftype_acc_sw2_sw2 = TRINARY (voidt, accumulator, sword2, sword2); - - tree uw1_ftype_uw1 = UNARY (uword1, uword1); - tree uw1_ftype_sw1 = UNARY (uword1, sword1); - tree uw1_ftype_uw2 = UNARY (uword1, uword2); - tree uw1_ftype_acc = UNARY (uword1, accumulator); - tree uw1_ftype_uh_uh = BINARY (uword1, uhalf, uhalf); - tree uw1_ftype_uw1_uw1 = BINARY (uword1, uword1, uword1); - tree uw1_ftype_uw1_int = BINARY (uword1, uword1, integer); - tree uw1_ftype_acc_uw1 = BINARY (uword1, accumulator, uword1); - tree uw1_ftype_acc_sw1 = BINARY (uword1, accumulator, sword1); - tree uw1_ftype_uw2_uw1 = BINARY (uword1, uword2, uword1); - tree uw1_ftype_uw2_int = BINARY (uword1, uword2, integer); - - tree sw1_ftype_int = UNARY (sword1, integer); - tree sw1_ftype_sw1_sw1 = BINARY (sword1, sword1, sword1); - tree sw1_ftype_sw1_int = BINARY (sword1, sword1, integer); - - tree uw2_ftype_uw1 = UNARY (uword2, uword1); - tree uw2_ftype_uw1_int = BINARY (uword2, uword1, integer); - tree uw2_ftype_uw2_uw2 = BINARY (uword2, uword2, uword2); - tree uw2_ftype_uw2_int = BINARY (uword2, uword2, integer); - tree uw2_ftype_acc_int = BINARY (uword2, accumulator, integer); - - tree sw2_ftype_sw2_sw2 = BINARY (sword2, sword2, sword2); - - def_builtin ("__MAND", uw1_ftype_uw1_uw1, FRV_BUILTIN_MAND); - def_builtin ("__MOR", uw1_ftype_uw1_uw1, FRV_BUILTIN_MOR); - def_builtin ("__MXOR", uw1_ftype_uw1_uw1, FRV_BUILTIN_MXOR); - def_builtin ("__MNOT", uw1_ftype_uw1, FRV_BUILTIN_MNOT); - def_builtin ("__MROTLI", uw1_ftype_uw1_int, FRV_BUILTIN_MROTLI); - def_builtin ("__MROTRI", uw1_ftype_uw1_int, FRV_BUILTIN_MROTRI); - def_builtin ("__MWCUT", uw1_ftype_uw2_uw1, FRV_BUILTIN_MWCUT); - def_builtin ("__MAVEH", uw1_ftype_uw1_uw1, FRV_BUILTIN_MAVEH); - def_builtin ("__MSLLHI", uw1_ftype_uw1_int, FRV_BUILTIN_MSLLHI); - def_builtin ("__MSRLHI", uw1_ftype_uw1_int, FRV_BUILTIN_MSRLHI); - def_builtin ("__MSRAHI", sw1_ftype_sw1_int, FRV_BUILTIN_MSRAHI); - def_builtin ("__MSATHS", sw1_ftype_sw1_sw1, FRV_BUILTIN_MSATHS); - def_builtin ("__MSATHU", uw1_ftype_uw1_uw1, FRV_BUILTIN_MSATHU); - def_builtin ("__MADDHSS", sw1_ftype_sw1_sw1, FRV_BUILTIN_MADDHSS); - def_builtin ("__MADDHUS", uw1_ftype_uw1_uw1, FRV_BUILTIN_MADDHUS); - def_builtin ("__MSUBHSS", sw1_ftype_sw1_sw1, FRV_BUILTIN_MSUBHSS); - def_builtin ("__MSUBHUS", uw1_ftype_uw1_uw1, FRV_BUILTIN_MSUBHUS); - def_builtin ("__MMULHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMULHS); - def_builtin ("__MMULHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMULHU); - def_builtin ("__MMULXHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMULXHS); - def_builtin ("__MMULXHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMULXHU); - def_builtin ("__MMACHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMACHS); - def_builtin ("__MMACHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMACHU); - def_builtin ("__MMRDHS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MMRDHS); - def_builtin ("__MMRDHU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MMRDHU); - def_builtin ("__MQADDHSS", sw2_ftype_sw2_sw2, FRV_BUILTIN_MQADDHSS); - def_builtin ("__MQADDHUS", uw2_ftype_uw2_uw2, FRV_BUILTIN_MQADDHUS); - def_builtin ("__MQSUBHSS", sw2_ftype_sw2_sw2, FRV_BUILTIN_MQSUBHSS); - def_builtin ("__MQSUBHUS", uw2_ftype_uw2_uw2, FRV_BUILTIN_MQSUBHUS); - def_builtin ("__MQMULHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMULHS); - def_builtin ("__MQMULHU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQMULHU); - def_builtin ("__MQMULXHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMULXHS); - def_builtin ("__MQMULXHU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQMULXHU); - def_builtin ("__MQMACHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMACHS); - def_builtin ("__MQMACHU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQMACHU); - def_builtin ("__MCPXRS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MCPXRS); - def_builtin ("__MCPXRU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MCPXRU); - def_builtin ("__MCPXIS", void_ftype_acc_sw1_sw1, FRV_BUILTIN_MCPXIS); - def_builtin ("__MCPXIU", void_ftype_acc_uw1_uw1, FRV_BUILTIN_MCPXIU); - def_builtin ("__MQCPXRS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQCPXRS); - def_builtin ("__MQCPXRU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQCPXRU); - def_builtin ("__MQCPXIS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQCPXIS); - def_builtin ("__MQCPXIU", void_ftype_acc_uw2_uw2, FRV_BUILTIN_MQCPXIU); - def_builtin ("__MCUT", uw1_ftype_acc_uw1, FRV_BUILTIN_MCUT); - def_builtin ("__MCUTSS", uw1_ftype_acc_sw1, FRV_BUILTIN_MCUTSS); - def_builtin ("__MEXPDHW", uw1_ftype_uw1_int, FRV_BUILTIN_MEXPDHW); - def_builtin ("__MEXPDHD", uw2_ftype_uw1_int, FRV_BUILTIN_MEXPDHD); - def_builtin ("__MPACKH", uw1_ftype_uh_uh, FRV_BUILTIN_MPACKH); - def_builtin ("__MUNPACKH", uw2_ftype_uw1, FRV_BUILTIN_MUNPACKH); - def_builtin ("__MDPACKH", uw2_ftype_uw2_uw2, FRV_BUILTIN_MDPACKH); - def_builtin ("__MDUNPACKH", void_ftype_uw4_uw2, FRV_BUILTIN_MDUNPACKH); - def_builtin ("__MBTOH", uw2_ftype_uw1, FRV_BUILTIN_MBTOH); - def_builtin ("__MHTOB", uw1_ftype_uw2, FRV_BUILTIN_MHTOB); - def_builtin ("__MBTOHE", void_ftype_uw4_uw1, FRV_BUILTIN_MBTOHE); - def_builtin ("__MCLRACC", void_ftype_acc, FRV_BUILTIN_MCLRACC); - def_builtin ("__MCLRACCA", void_ftype_void, FRV_BUILTIN_MCLRACCA); - def_builtin ("__MRDACC", uw1_ftype_acc, FRV_BUILTIN_MRDACC); - def_builtin ("__MRDACCG", uw1_ftype_acc, FRV_BUILTIN_MRDACCG); - def_builtin ("__MWTACC", void_ftype_acc_uw1, FRV_BUILTIN_MWTACC); - def_builtin ("__MWTACCG", void_ftype_acc_uw1, FRV_BUILTIN_MWTACCG); - def_builtin ("__Mcop1", uw1_ftype_uw1_uw1, FRV_BUILTIN_MCOP1); - def_builtin ("__Mcop2", uw1_ftype_uw1_uw1, FRV_BUILTIN_MCOP2); - def_builtin ("__MTRAP", void_ftype_void, FRV_BUILTIN_MTRAP); - def_builtin ("__MQXMACHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQXMACHS); - def_builtin ("__MQXMACXHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQXMACXHS); - def_builtin ("__MQMACXHS", void_ftype_acc_sw2_sw2, FRV_BUILTIN_MQMACXHS); - def_builtin ("__MADDACCS", void_ftype_acc_acc, FRV_BUILTIN_MADDACCS); - def_builtin ("__MSUBACCS", void_ftype_acc_acc, FRV_BUILTIN_MSUBACCS); - def_builtin ("__MASACCS", void_ftype_acc_acc, FRV_BUILTIN_MASACCS); - def_builtin ("__MDADDACCS", void_ftype_acc_acc, FRV_BUILTIN_MDADDACCS); - def_builtin ("__MDSUBACCS", void_ftype_acc_acc, FRV_BUILTIN_MDSUBACCS); - def_builtin ("__MDASACCS", void_ftype_acc_acc, FRV_BUILTIN_MDASACCS); - def_builtin ("__MABSHS", uw1_ftype_sw1, FRV_BUILTIN_MABSHS); - def_builtin ("__MDROTLI", uw2_ftype_uw2_int, FRV_BUILTIN_MDROTLI); - def_builtin ("__MCPLHI", uw1_ftype_uw2_int, FRV_BUILTIN_MCPLHI); - def_builtin ("__MCPLI", uw1_ftype_uw2_int, FRV_BUILTIN_MCPLI); - def_builtin ("__MDCUTSSI", uw2_ftype_acc_int, FRV_BUILTIN_MDCUTSSI); - def_builtin ("__MQSATHS", sw2_ftype_sw2_sw2, FRV_BUILTIN_MQSATHS); - def_builtin ("__MHSETLOS", sw1_ftype_sw1_int, FRV_BUILTIN_MHSETLOS); - def_builtin ("__MHSETHIS", sw1_ftype_sw1_int, FRV_BUILTIN_MHSETHIS); - def_builtin ("__MHDSETS", sw1_ftype_int, FRV_BUILTIN_MHDSETS); - def_builtin ("__MHSETLOH", uw1_ftype_uw1_int, FRV_BUILTIN_MHSETLOH); - def_builtin ("__MHSETHIH", uw1_ftype_uw1_int, FRV_BUILTIN_MHSETHIH); - def_builtin ("__MHDSETH", uw1_ftype_uw1_int, FRV_BUILTIN_MHDSETH); - -#undef UNARY -#undef BINARY -#undef TRINARY -} - -/* Set the names for various arithmetic operations according to the - FRV ABI. */ -static void -frv_init_libfuncs (void) -{ - set_optab_libfunc (smod_optab, SImode, "__modi"); - set_optab_libfunc (umod_optab, SImode, "__umodi"); - - set_optab_libfunc (add_optab, DImode, "__addll"); - set_optab_libfunc (sub_optab, DImode, "__subll"); - set_optab_libfunc (smul_optab, DImode, "__mulll"); - set_optab_libfunc (sdiv_optab, DImode, "__divll"); - set_optab_libfunc (smod_optab, DImode, "__modll"); - set_optab_libfunc (umod_optab, DImode, "__umodll"); - set_optab_libfunc (and_optab, DImode, "__andll"); - set_optab_libfunc (ior_optab, DImode, "__orll"); - set_optab_libfunc (xor_optab, DImode, "__xorll"); - set_optab_libfunc (one_cmpl_optab, DImode, "__notll"); - - set_optab_libfunc (add_optab, SFmode, "__addf"); - set_optab_libfunc (sub_optab, SFmode, "__subf"); - set_optab_libfunc (smul_optab, SFmode, "__mulf"); - set_optab_libfunc (sdiv_optab, SFmode, "__divf"); - - set_optab_libfunc (add_optab, DFmode, "__addd"); - set_optab_libfunc (sub_optab, DFmode, "__subd"); - set_optab_libfunc (smul_optab, DFmode, "__muld"); - set_optab_libfunc (sdiv_optab, DFmode, "__divd"); - - set_conv_libfunc (sext_optab, DFmode, SFmode, "__ftod"); - set_conv_libfunc (trunc_optab, SFmode, DFmode, "__dtof"); - - set_conv_libfunc (sfix_optab, SImode, SFmode, "__ftoi"); - set_conv_libfunc (sfix_optab, DImode, SFmode, "__ftoll"); - set_conv_libfunc (sfix_optab, SImode, DFmode, "__dtoi"); - set_conv_libfunc (sfix_optab, DImode, DFmode, "__dtoll"); - - set_conv_libfunc (ufix_optab, SImode, SFmode, "__ftoui"); - set_conv_libfunc (ufix_optab, DImode, SFmode, "__ftoull"); - set_conv_libfunc (ufix_optab, SImode, DFmode, "__dtoui"); - set_conv_libfunc (ufix_optab, DImode, DFmode, "__dtoull"); - - set_conv_libfunc (sfloat_optab, SFmode, SImode, "__itof"); - set_conv_libfunc (sfloat_optab, SFmode, DImode, "__lltof"); - set_conv_libfunc (sfloat_optab, DFmode, SImode, "__itod"); - set_conv_libfunc (sfloat_optab, DFmode, DImode, "__lltod"); -} - -/* Convert an integer constant to an accumulator register. ICODE is the - code of the target instruction, OPNUM is the number of the - accumulator operand and OPVAL is the constant integer. Try both - ACC and ACCG registers; only report an error if neither fit the - instruction. */ - -static rtx -frv_int_to_acc (enum insn_code icode, int opnum, rtx opval) -{ - rtx reg; - - if (GET_CODE (opval) != CONST_INT) - { - error ("accumulator is not a constant integer"); - return NULL_RTX; - } - if (! IN_RANGE_P (INTVAL (opval), 0, NUM_ACCS - 1)) - { - error ("accumulator number is out of bounds"); - return NULL_RTX; - } - - reg = gen_rtx_REG (insn_data[icode].operand[opnum].mode, - ACC_FIRST + INTVAL (opval)); - if (! (*insn_data[icode].operand[opnum].predicate) (reg, VOIDmode)) - REGNO (reg) = ACCG_FIRST + INTVAL (opval); - - if (! (*insn_data[icode].operand[opnum].predicate) (reg, VOIDmode)) - { - error ("inappropriate accumulator for `%s'", insn_data[icode].name); - return NULL_RTX; - } - return reg; -} - -/* If an ACC rtx has mode MODE, return the mode that the matching ACCG - should have. */ - -static enum machine_mode -frv_matching_accg_mode (enum machine_mode mode) -{ - switch (mode) - { - case V4SImode: - return V4QImode; - - case DImode: - return HImode; - - case SImode: - return QImode; - - default: - abort (); - } -} - -/* Return the accumulator guard that should be paired with accumulator - register ACC. The mode of the returned register is in the same - class as ACC, but is four times smaller. */ - -rtx -frv_matching_accg_for_acc (rtx acc) -{ - return gen_rtx_REG (frv_matching_accg_mode (GET_MODE (acc)), - REGNO (acc) - ACC_FIRST + ACCG_FIRST); -} - -/* Read a value from the head of the tree list pointed to by ARGLISTPTR. - Return the value as an rtx and replace *ARGLISTPTR with the tail of the - list. */ - -static rtx -frv_read_argument (tree *arglistptr) -{ - tree next = TREE_VALUE (*arglistptr); - *arglistptr = TREE_CHAIN (*arglistptr); - return expand_expr (next, NULL_RTX, VOIDmode, 0); -} - -/* Return true if OPVAL can be used for operand OPNUM of instruction ICODE. - The instruction should require a constant operand of some sort. The - function prints an error if OPVAL is not valid. */ - -static int -frv_check_constant_argument (enum insn_code icode, int opnum, rtx opval) -{ - if (GET_CODE (opval) != CONST_INT) - { - error ("`%s' expects a constant argument", insn_data[icode].name); - return FALSE; - } - if (! (*insn_data[icode].operand[opnum].predicate) (opval, VOIDmode)) - { - error ("constant argument out of range for `%s'", insn_data[icode].name); - return FALSE; - } - return TRUE; -} - -/* Return a legitimate rtx for instruction ICODE's return value. Use TARGET - if it's not null, has the right mode, and satisfies operand 0's - predicate. */ - -static rtx -frv_legitimize_target (enum insn_code icode, rtx target) -{ - enum machine_mode mode = insn_data[icode].operand[0].mode; - - if (! target - || GET_MODE (target) != mode - || ! (*insn_data[icode].operand[0].predicate) (target, mode)) - return gen_reg_rtx (mode); - else - return target; -} - -/* Given that ARG is being passed as operand OPNUM to instruction ICODE, - check whether ARG satisfies the operand's constraints. If it doesn't, - copy ARG to a temporary register and return that. Otherwise return ARG - itself. */ - -static rtx -frv_legitimize_argument (enum insn_code icode, int opnum, rtx arg) -{ - enum machine_mode mode = insn_data[icode].operand[opnum].mode; - - if ((*insn_data[icode].operand[opnum].predicate) (arg, mode)) - return arg; - else - return copy_to_mode_reg (mode, arg); -} - -/* Expand builtins that take a single, constant argument. At the moment, - only MHDSETS falls into this category. */ - -static rtx -frv_expand_set_builtin (enum insn_code icode, tree arglist, rtx target) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - - if (! frv_check_constant_argument (icode, 1, op0)) - return NULL_RTX; - - target = frv_legitimize_target (icode, target); - pat = GEN_FCN (icode) (target, op0); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return target; -} - -/* Expand builtins that take one operand. */ - -static rtx -frv_expand_unop_builtin (enum insn_code icode, tree arglist, rtx target) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - - target = frv_legitimize_target (icode, target); - op0 = frv_legitimize_argument (icode, 1, op0); - pat = GEN_FCN (icode) (target, op0); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return target; -} - -/* Expand builtins that take two operands. */ - -static rtx -frv_expand_binop_builtin (enum insn_code icode, tree arglist, rtx target) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - rtx op1 = frv_read_argument (&arglist); - - target = frv_legitimize_target (icode, target); - op0 = frv_legitimize_argument (icode, 1, op0); - op1 = frv_legitimize_argument (icode, 2, op1); - pat = GEN_FCN (icode) (target, op0, op1); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return target; -} - -/* Expand cut-style builtins, which take two operands and an implicit ACCG - one. */ - -static rtx -frv_expand_cut_builtin (enum insn_code icode, tree arglist, rtx target) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - rtx op1 = frv_read_argument (&arglist); - rtx op2; - - target = frv_legitimize_target (icode, target); - op0 = frv_int_to_acc (icode, 1, op0); - if (! op0) - return NULL_RTX; - - if (icode == CODE_FOR_mdcutssi || GET_CODE (op1) == CONST_INT) - { - if (! frv_check_constant_argument (icode, 2, op1)) - return NULL_RTX; - } - else - op1 = frv_legitimize_argument (icode, 2, op1); - - op2 = frv_matching_accg_for_acc (op0); - pat = GEN_FCN (icode) (target, op0, op1, op2); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return target; -} - -/* Expand builtins that take two operands and the second is immediate. */ - -static rtx -frv_expand_binopimm_builtin (enum insn_code icode, tree arglist, rtx target) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - rtx op1 = frv_read_argument (&arglist); - - if (! frv_check_constant_argument (icode, 2, op1)) - return NULL_RTX; - - target = frv_legitimize_target (icode, target); - op0 = frv_legitimize_argument (icode, 1, op0); - pat = GEN_FCN (icode) (target, op0, op1); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return target; -} - -/* Expand builtins that take two operands, the first operand being a pointer to - ints and return void. */ - -static rtx -frv_expand_voidbinop_builtin (enum insn_code icode, tree arglist) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - rtx op1 = frv_read_argument (&arglist); - enum machine_mode mode0 = insn_data[icode].operand[0].mode; - rtx addr; - - if (GET_CODE (op0) != MEM) - { - rtx reg = op0; - - if (! offsettable_address_p (0, mode0, op0)) - { - reg = gen_reg_rtx (Pmode); - emit_insn (gen_rtx_SET (VOIDmode, reg, op0)); - } - - op0 = gen_rtx_MEM (SImode, reg); - } - - addr = XEXP (op0, 0); - if (! offsettable_address_p (0, mode0, addr)) - addr = copy_to_mode_reg (Pmode, op0); - - op0 = change_address (op0, V4SImode, addr); - op1 = frv_legitimize_argument (icode, 1, op1); - pat = GEN_FCN (icode) (op0, op1); - if (! pat) - return 0; - - emit_insn (pat); - return 0; -} - -/* Expand builtins that take three operands and return void. The first - argument must be a constant that describes a pair or quad accumulators. A - fourth argument is created that is the accumulator guard register that - corresponds to the accumulator. */ - -static rtx -frv_expand_voidtriop_builtin (enum insn_code icode, tree arglist) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - rtx op1 = frv_read_argument (&arglist); - rtx op2 = frv_read_argument (&arglist); - rtx op3; - - op0 = frv_int_to_acc (icode, 0, op0); - if (! op0) - return NULL_RTX; - - op1 = frv_legitimize_argument (icode, 1, op1); - op2 = frv_legitimize_argument (icode, 2, op2); - op3 = frv_matching_accg_for_acc (op0); - pat = GEN_FCN (icode) (op0, op1, op2, op3); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return NULL_RTX; -} - -/* Expand builtins that perform accumulator-to-accumulator operations. - These builtins take two accumulator numbers as argument and return - void. */ - -static rtx -frv_expand_voidaccop_builtin (enum insn_code icode, tree arglist) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - rtx op1 = frv_read_argument (&arglist); - rtx op2; - rtx op3; - - op0 = frv_int_to_acc (icode, 0, op0); - if (! op0) - return NULL_RTX; - - op1 = frv_int_to_acc (icode, 1, op1); - if (! op1) - return NULL_RTX; - - op2 = frv_matching_accg_for_acc (op0); - op3 = frv_matching_accg_for_acc (op1); - pat = GEN_FCN (icode) (op0, op1, op2, op3); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return NULL_RTX; -} - -/* Expand the MCLRACC builtin. This builtin takes a single accumulator - number as argument. */ - -static rtx -frv_expand_mclracc_builtin (tree arglist) -{ - enum insn_code icode = CODE_FOR_mclracc; - rtx pat; - rtx op0 = frv_read_argument (&arglist); - - op0 = frv_int_to_acc (icode, 0, op0); - if (! op0) - return NULL_RTX; - - pat = GEN_FCN (icode) (op0); - if (pat) - emit_insn (pat); - - return NULL_RTX; -} - -/* Expand builtins that take no arguments. */ - -static rtx -frv_expand_noargs_builtin (enum insn_code icode) -{ - rtx pat = GEN_FCN (icode) (GEN_INT (0)); - if (pat) - emit_insn (pat); - - return NULL_RTX; -} - -/* Expand MRDACC and MRDACCG. These builtins take a single accumulator - number or accumulator guard number as argument and return an SI integer. */ - -static rtx -frv_expand_mrdacc_builtin (enum insn_code icode, tree arglist) -{ - rtx pat; - rtx target = gen_reg_rtx (SImode); - rtx op0 = frv_read_argument (&arglist); - - op0 = frv_int_to_acc (icode, 1, op0); - if (! op0) - return NULL_RTX; - - pat = GEN_FCN (icode) (target, op0); - if (! pat) - return NULL_RTX; - - emit_insn (pat); - return target; -} - -/* Expand MWTACC and MWTACCG. These builtins take an accumulator or - accumulator guard as their first argument and an SImode value as their - second. */ - -static rtx -frv_expand_mwtacc_builtin (enum insn_code icode, tree arglist) -{ - rtx pat; - rtx op0 = frv_read_argument (&arglist); - rtx op1 = frv_read_argument (&arglist); - - op0 = frv_int_to_acc (icode, 0, op0); - if (! op0) - return NULL_RTX; - - op1 = frv_legitimize_argument (icode, 1, op1); - pat = GEN_FCN (icode) (op0, op1); - if (pat) - emit_insn (pat); - - return NULL_RTX; -} - -/* Expand builtins. */ - -static rtx -frv_expand_builtin (tree exp, - rtx target, - rtx subtarget ATTRIBUTE_UNUSED, - enum machine_mode mode ATTRIBUTE_UNUSED, - int ignore ATTRIBUTE_UNUSED) -{ - tree arglist = TREE_OPERAND (exp, 1); - tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); - unsigned fcode = (unsigned)DECL_FUNCTION_CODE (fndecl); - unsigned i; - struct builtin_description *d; - - if (! TARGET_MEDIA) - { - error ("media functions are not available unless -mmedia is used"); - return NULL_RTX; - } - - switch (fcode) - { - case FRV_BUILTIN_MCOP1: - case FRV_BUILTIN_MCOP2: - case FRV_BUILTIN_MDUNPACKH: - case FRV_BUILTIN_MBTOHE: - if (! TARGET_MEDIA_REV1) - { - error ("this media function is only available on the fr500"); - return NULL_RTX; - } - break; - - case FRV_BUILTIN_MQXMACHS: - case FRV_BUILTIN_MQXMACXHS: - case FRV_BUILTIN_MQMACXHS: - case FRV_BUILTIN_MADDACCS: - case FRV_BUILTIN_MSUBACCS: - case FRV_BUILTIN_MASACCS: - case FRV_BUILTIN_MDADDACCS: - case FRV_BUILTIN_MDSUBACCS: - case FRV_BUILTIN_MDASACCS: - case FRV_BUILTIN_MABSHS: - case FRV_BUILTIN_MDROTLI: - case FRV_BUILTIN_MCPLHI: - case FRV_BUILTIN_MCPLI: - case FRV_BUILTIN_MDCUTSSI: - case FRV_BUILTIN_MQSATHS: - case FRV_BUILTIN_MHSETLOS: - case FRV_BUILTIN_MHSETLOH: - case FRV_BUILTIN_MHSETHIS: - case FRV_BUILTIN_MHSETHIH: - case FRV_BUILTIN_MHDSETS: - case FRV_BUILTIN_MHDSETH: - if (! TARGET_MEDIA_REV2) - { - error ("this media function is only available on the fr400"); - return NULL_RTX; - } - break; - - default: - break; - } - - /* Expand unique builtins. */ - - switch (fcode) - { - case FRV_BUILTIN_MTRAP: - return frv_expand_noargs_builtin (CODE_FOR_mtrap); - - case FRV_BUILTIN_MCLRACC: - return frv_expand_mclracc_builtin (arglist); - - case FRV_BUILTIN_MCLRACCA: - if (TARGET_ACC_8) - return frv_expand_noargs_builtin (CODE_FOR_mclracca8); - else - return frv_expand_noargs_builtin (CODE_FOR_mclracca4); - - case FRV_BUILTIN_MRDACC: - return frv_expand_mrdacc_builtin (CODE_FOR_mrdacc, arglist); - - case FRV_BUILTIN_MRDACCG: - return frv_expand_mrdacc_builtin (CODE_FOR_mrdaccg, arglist); - - case FRV_BUILTIN_MWTACC: - return frv_expand_mwtacc_builtin (CODE_FOR_mwtacc, arglist); - - case FRV_BUILTIN_MWTACCG: - return frv_expand_mwtacc_builtin (CODE_FOR_mwtaccg, arglist); - - default: - break; - } - - /* Expand groups of builtins. */ - - for (i = 0, d = bdesc_set; i < ARRAY_SIZE (bdesc_set); i++, d++) - if (d->code == fcode) - return frv_expand_set_builtin (d->icode, arglist, target); - - for (i = 0, d = bdesc_1arg; i < ARRAY_SIZE (bdesc_1arg); i++, d++) - if (d->code == fcode) - return frv_expand_unop_builtin (d->icode, arglist, target); - - for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++) - if (d->code == fcode) - return frv_expand_binop_builtin (d->icode, arglist, target); - - for (i = 0, d = bdesc_cut; i < ARRAY_SIZE (bdesc_cut); i++, d++) - if (d->code == fcode) - return frv_expand_cut_builtin (d->icode, arglist, target); - - for (i = 0, d = bdesc_2argimm; i < ARRAY_SIZE (bdesc_2argimm); i++, d++) - if (d->code == fcode) - return frv_expand_binopimm_builtin (d->icode, arglist, target); - - for (i = 0, d = bdesc_void2arg; i < ARRAY_SIZE (bdesc_void2arg); i++, d++) - if (d->code == fcode) - return frv_expand_voidbinop_builtin (d->icode, arglist); - - for (i = 0, d = bdesc_void3arg; i < ARRAY_SIZE (bdesc_void3arg); i++, d++) - if (d->code == fcode) - return frv_expand_voidtriop_builtin (d->icode, arglist); - - for (i = 0, d = bdesc_voidacc; i < ARRAY_SIZE (bdesc_voidacc); i++, d++) - if (d->code == fcode) - return frv_expand_voidaccop_builtin (d->icode, arglist); - - return 0; -} - -static bool -frv_in_small_data_p (tree decl) -{ - HOST_WIDE_INT size; - tree section_name; - - /* Don't apply the -G flag to internal compiler structures. We - should leave such structures in the main data section, partly - for efficiency and partly because the size of some of them - (such as C++ typeinfos) is not known until later. */ - if (TREE_CODE (decl) != VAR_DECL || DECL_ARTIFICIAL (decl)) - return false; - - /* If we already know which section the decl should be in, see if - it's a small data section. */ - section_name = DECL_SECTION_NAME (decl); - if (section_name) - { - if (TREE_CODE (section_name) != STRING_CST) - abort (); - if (frv_string_begins_with (section_name, ".sdata")) - return true; - if (frv_string_begins_with (section_name, ".sbss")) - return true; - return false; - } - - size = int_size_in_bytes (TREE_TYPE (decl)); - if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value) - return true; - - return false; -} - -static bool -frv_rtx_costs (rtx x, - int code ATTRIBUTE_UNUSED, - int outer_code ATTRIBUTE_UNUSED, - int *total) -{ - switch (code) - { - case CONST_INT: - /* Make 12 bit integers really cheap. */ - if (IN_RANGE_P (INTVAL (x), -2048, 2047)) - { - *total = 0; - return true; - } - /* Fall through. */ - - case CONST: - case LABEL_REF: - case SYMBOL_REF: - case CONST_DOUBLE: - *total = COSTS_N_INSNS (2); - return true; - - case PLUS: - case MINUS: - case AND: - case IOR: - case XOR: - case ASHIFT: - case ASHIFTRT: - case LSHIFTRT: - case NOT: - case NEG: - case COMPARE: - if (GET_MODE (x) == SImode) - *total = COSTS_N_INSNS (1); - else if (GET_MODE (x) == DImode) - *total = COSTS_N_INSNS (2); - else - *total = COSTS_N_INSNS (3); - return true; - - case MULT: - if (GET_MODE (x) == SImode) - *total = COSTS_N_INSNS (2); - else - *total = COSTS_N_INSNS (6); /* guess */ - return true; - - case DIV: - case UDIV: - case MOD: - case UMOD: - *total = COSTS_N_INSNS (18); - return true; - - default: - return false; - } -} - -static void -frv_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED) -{ - ctors_section (); - assemble_align (POINTER_SIZE); - assemble_integer_with_op ("\t.picptr\t", symbol); -} - -static void -frv_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED) -{ - dtors_section (); - assemble_align (POINTER_SIZE); - assemble_integer_with_op ("\t.picptr\t", symbol); -} diff --git a/contrib/gcc/config/frv/frv.h b/contrib/gcc/config/frv/frv.h deleted file mode 100644 index 0b87404..0000000 --- a/contrib/gcc/config/frv/frv.h +++ /dev/null @@ -1,3358 +0,0 @@ -/* Target macros for the FRV port of GCC. - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. - Contributed by Red Hat Inc. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 2, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - -#ifndef __FRV_H__ -#define __FRV_H__ - -/* Frv general purpose macros. */ -/* Align an address. */ -#define ADDR_ALIGN(addr,align) (((addr) + (align) - 1) & ~((align) - 1)) - -/* Return true if a value is inside a range. */ -#define IN_RANGE_P(VALUE, LOW, HIGH) \ - ( (((HOST_WIDE_INT)(VALUE)) >= (HOST_WIDE_INT)(LOW)) \ - && (((HOST_WIDE_INT)(VALUE)) <= ((HOST_WIDE_INT)(HIGH)))) - - -/* Driver configuration. */ - -/* A C expression which determines whether the option `-CHAR' takes arguments. - The value should be the number of arguments that option takes-zero, for many - options. - - By default, this macro is defined to handle the standard options properly. - You need not define it unless you wish to add additional options which take - arguments. - - Defined in svr4.h. */ -#undef SWITCH_TAKES_ARG -#define SWITCH_TAKES_ARG(CHAR) \ - (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G') - -/* A C expression which determines whether the option `-NAME' takes arguments. - The value should be the number of arguments that option takes-zero, for many - options. This macro rather than `SWITCH_TAKES_ARG' is used for - multi-character option names. - - By default, this macro is defined as `DEFAULT_WORD_SWITCH_TAKES_ARG', which - handles the standard options properly. You need not define - `WORD_SWITCH_TAKES_ARG' unless you wish to add additional options which take - arguments. Any redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and - then check for additional options. - - Defined in svr4.h. */ -#undef WORD_SWITCH_TAKES_ARG - -/* A C string constant that tells the GCC driver program options to pass to - the assembler. It can also specify how to translate options you give to GNU - CC into options for GCC to pass to the assembler. See the file `sun3.h' - for an example of this. - - Do not define this macro if it does not need to do anything. - - Defined in svr4.h. */ -#undef ASM_SPEC -#define ASM_SPEC "\ -%{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ -%{mtomcat-stats} \ -%{!mno-eflags: \ - %{mcpu=*} \ - %{mgpr-*} %{mfpr-*} \ - %{msoft-float} %{mhard-float} \ - %{mdword} %{mno-dword} \ - %{mdouble} %{mno-double} \ - %{mmedia} %{mno-media} \ - %{mmuladd} %{mno-muladd} \ - %{mpack} %{mno-pack} \ - %{fpic|fpie: -mpic} %{fPIC|fPIE: -mPIC} %{mlibrary-pic}}" - -/* Another C string constant used much like `LINK_SPEC'. The difference - between the two is that `STARTFILE_SPEC' is used at the very beginning of - the command given to the linker. - - If this macro is not defined, a default is provided that loads the standard - C startup file from the usual place. See `gcc.c'. - - Defined in svr4.h. */ -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "crt0%O%s frvbegin%O%s" - -/* Another C string constant used much like `LINK_SPEC'. The difference - between the two is that `ENDFILE_SPEC' is used at the very end of the - command given to the linker. - - Do not define this macro if it does not need to do anything. - - Defined in svr4.h. */ -#undef ENDFILE_SPEC -#define ENDFILE_SPEC "frvend%O%s" - -/* A C string constant that tells the GCC driver program options to pass to - CPP. It can also specify how to translate options you give to GCC into - options for GCC to pass to the CPP. - - Do not define this macro if it does not need to do anything. */ - -/* The idea here is to use the -mcpu option to define macros based on the - processor's features, using the features of the default processor if - no -mcpu option is given. These macros can then be overridden by - other -m options. */ -#define CPP_SPEC "\ -%{mcpu=frv: %(cpp_frv)} \ -%{mcpu=fr500: %(cpp_fr500)} \ -%{mcpu=fr400: %(cpp_fr400)} \ -%{mcpu=fr300: %(cpp_simple)} \ -%{mcpu=tomcat: %(cpp_fr500)} \ -%{mcpu=simple: %(cpp_simple)} \ -%{!mcpu*: %(cpp_cpu_default)} \ -%{mno-media: -D__FRV_ACC__=0 %{msoft-float: -D__FRV_FPR__=0}} \ -%{mhard-float: -D__FRV_HARD_FLOAT__} \ -%{msoft-float: -U__FRV_HARD_FLOAT__} \ -%{mgpr-32: -U__FRV_GPR__ -D__FRV_GPR__=32} \ -%{mgpr-64: -U__FRV_GPR__ -D__FRV_GPR__=64} \ -%{mfpr-32: -U__FRV_FPR__ -D__FRV_FPR__=32} \ -%{mfpr-64: -U__FRV_FPR__ -D__FRV_FPR__=64} \ -%{macc-4: -U__FRV_ACC__ -D__FRV_ACC__=4} \ -%{macc-8: -U__FRV_ACC__ -D__FRV_ACC__=8} \ -%{mdword: -D__FRV_DWORD__} \ -%{mno-dword: -U__FRV_DWORD__} \ -%{mno-pack: -U__FRV_VLIW__} \ -%{fleading-underscore: -D__FRV_UNDERSCORE__}" - -/* CPU defaults. Each CPU has its own CPP spec that defines the default - macros for that CPU. Each CPU also has its own default target mask. - - CPU GPRs FPRs ACCs FPU MulAdd ldd/std Issue rate - --- ---- ---- ---- --- ------ ------- ---------- - FRV 64 64 8 double yes yes 4 - FR500 64 64 8 single no yes 4 - FR400 32 32 4 none no yes 2 - Simple 32 0 0 none no no 1 */ - - -#define CPP_FRV_SPEC "\ --D__FRV_GPR__=64 \ --D__FRV_FPR__=64 \ --D__FRV_ACC__=8 \ --D__FRV_HARD_FLOAT__ \ --D__FRV_DWORD__ \ --D__FRV_VLIW__=4" - -#define CPP_FR500_SPEC "\ --D__FRV_GPR__=64 \ --D__FRV_FPR__=64 \ --D__FRV_ACC__=8 \ --D__FRV_HARD_FLOAT__ \ --D__FRV_DWORD__ \ --D__FRV_VLIW__=4" - -#define CPP_FR400_SPEC "\ --D__FRV_GPR__=32 \ --D__FRV_FPR__=32 \ --D__FRV_ACC__=4 \ --D__FRV_DWORD__ \ --D__FRV_VLIW__=2" - -#define CPP_SIMPLE_SPEC "\ --D__FRV_GPR__=32 \ --D__FRV_FPR__=0 \ --D__FRV_ACC__=0 \ -%{mmedia: -D__FRV_ACC__=8} \ -%{mhard-float|mmedia: -D__FRV_FPR__=64}" - -#define MASK_DEFAULT_FRV \ - (MASK_MEDIA \ - | MASK_DOUBLE \ - | MASK_MULADD \ - | MASK_DWORD \ - | MASK_PACK) - -#define MASK_DEFAULT_FR500 \ - (MASK_MEDIA | MASK_DWORD | MASK_PACK) - -#define MASK_DEFAULT_FR400 \ - (MASK_GPR_32 \ - | MASK_FPR_32 \ - | MASK_MEDIA \ - | MASK_ACC_4 \ - | MASK_SOFT_FLOAT \ - | MASK_DWORD \ - | MASK_PACK) - -#define MASK_DEFAULT_SIMPLE \ - (MASK_GPR_32 | MASK_SOFT_FLOAT) - -/* A C string constant that tells the GCC driver program options to pass to - `cc1'. It can also specify how to translate options you give to GCC into - options for GCC to pass to the `cc1'. - - Do not define this macro if it does not need to do anything. */ -/* For ABI compliance, we need to put bss data into the normal data section. */ -#define CC1_SPEC "%{G*}" - -/* A C string constant that tells the GCC driver program options to pass to - the linker. It can also specify how to translate options you give to GCC - into options for GCC to pass to the linker. - - Do not define this macro if it does not need to do anything. - - Defined in svr4.h. */ -/* Override the svr4.h version with one that dispenses without the svr4 - shared library options, notably -G. */ -#undef LINK_SPEC -#define LINK_SPEC "\ -%{h*} %{v:-V} \ -%{b} %{Wl,*:%*} \ -%{static:-dn -Bstatic} \ -%{shared:-Bdynamic} \ -%{symbolic:-Bsymbolic} \ -%{G*} \ -%{YP,*} \ -%{Qy:} %{!Qn:-Qy}" - -/* Another C string constant used much like `LINK_SPEC'. The difference - between the two is that `LIB_SPEC' is used at the end of the command given - to the linker. - - If this macro is not defined, a default is provided that loads the standard - C library from the usual place. See `gcc.c'. - - Defined in svr4.h. */ - -#undef LIB_SPEC -#define LIB_SPEC "--start-group -lc -lsim --end-group" - -/* This macro defines names of additional specifications to put in the specs - that can be used in various specifications like CC1_SPEC. Its definition - is an initializer with a subgrouping for each command option. - - Each subgrouping contains a string constant, that defines the - specification name, and a string constant that used by the GCC driver - program. - - Do not define this macro if it does not need to do anything. */ - -#ifndef SUBTARGET_EXTRA_SPECS -#define SUBTARGET_EXTRA_SPECS -#endif - -#define EXTRA_SPECS \ - { "cpp_frv", CPP_FRV_SPEC }, \ - { "cpp_fr500", CPP_FR500_SPEC }, \ - { "cpp_fr400", CPP_FR400_SPEC }, \ - { "cpp_simple", CPP_SIMPLE_SPEC }, \ - { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \ - SUBTARGET_EXTRA_SPECS - -#ifndef CPP_CPU_DEFAULT_SPEC -#define CPP_CPU_DEFAULT_SPEC CPP_FR500_SPEC -#define CPU_TYPE FRV_CPU_FR500 -#endif - -/* Allow us to easily change the default for -malloc-cc. */ -#ifndef DEFAULT_NO_ALLOC_CC -#define MASK_DEFAULT_ALLOC_CC MASK_ALLOC_CC -#else -#define MASK_DEFAULT_ALLOC_CC 0 -#endif - -/* Run-time target specifications */ - -#define TARGET_CPU_CPP_BUILTINS() \ - do \ - { \ - builtin_define ("__frv__"); \ - builtin_assert ("machine=frv"); \ - } \ - while (0) - - -/* This declaration should be present. */ -extern int target_flags; - -/* This series of macros is to allow compiler command arguments to enable or - disable the use of optional features of the target machine. For example, - one machine description serves both the 68000 and the 68020; a command - argument tells the compiler whether it should use 68020-only instructions or - not. This command argument works by means of a macro `TARGET_68020' that - tests a bit in `target_flags'. - - Define a macro `TARGET_FEATURENAME' for each such option. Its definition - should test a bit in `target_flags'; for example: - - #define TARGET_68020 (target_flags & 1) - - One place where these macros are used is in the condition-expressions of - instruction patterns. Note how `TARGET_68020' appears frequently in the - 68000 machine description file, `m68k.md'. Another place they are used is - in the definitions of the other macros in the `MACHINE.h' file. */ - -#define MASK_GPR_32 0x00000001 /* Limit gprs to 32 registers */ -#define MASK_FPR_32 0x00000002 /* Limit fprs to 32 registers */ -#define MASK_SOFT_FLOAT 0x00000004 /* Use software floating point */ -#define MASK_ALLOC_CC 0x00000008 /* Dynamically allocate icc/fcc's */ -#define MASK_DWORD 0x00000010 /* Change ABi to allow dbl word insns*/ -#define MASK_DOUBLE 0x00000020 /* Use double precision instructions */ -#define MASK_MEDIA 0x00000040 /* Use media instructions */ -#define MASK_MULADD 0x00000080 /* Use multiply add/subtract insns */ -#define MASK_LIBPIC 0x00000100 /* -fpic that can be linked w/o pic */ -#define MASK_ACC_4 0x00000200 /* Only use four media accumulators */ -#define MASK_PACK 0x00000400 /* Set to enable packed output */ - - /* put debug masks up high */ -#define MASK_DEBUG_ARG 0x40000000 /* debug argument handling */ -#define MASK_DEBUG_ADDR 0x20000000 /* debug go_if_legitimate_address */ -#define MASK_DEBUG_STACK 0x10000000 /* debug stack frame */ -#define MASK_DEBUG 0x08000000 /* general debugging switch */ -#define MASK_DEBUG_LOC 0x04000000 /* optimize line # table */ -#define MASK_DEBUG_COND_EXEC 0x02000000 /* debug cond exec code */ -#define MASK_NO_COND_MOVE 0x01000000 /* disable conditional moves */ -#define MASK_NO_SCC 0x00800000 /* disable set conditional codes */ -#define MASK_NO_COND_EXEC 0x00400000 /* disable conditional execution */ -#define MASK_NO_VLIW_BRANCH 0x00200000 /* disable repacking branches */ -#define MASK_NO_MULTI_CE 0x00100000 /* disable multi-level cond exec */ -#define MASK_NO_NESTED_CE 0x00080000 /* disable nested cond exec */ - -#define MASK_DEFAULT MASK_DEFAULT_ALLOC_CC - -#define TARGET_GPR_32 ((target_flags & MASK_GPR_32) != 0) -#define TARGET_FPR_32 ((target_flags & MASK_FPR_32) != 0) -#define TARGET_SOFT_FLOAT ((target_flags & MASK_SOFT_FLOAT) != 0) -#define TARGET_ALLOC_CC ((target_flags & MASK_ALLOC_CC) != 0) -#define TARGET_DWORD ((target_flags & MASK_DWORD) != 0) -#define TARGET_DOUBLE ((target_flags & MASK_DOUBLE) != 0) -#define TARGET_MEDIA ((target_flags & MASK_MEDIA) != 0) -#define TARGET_MULADD ((target_flags & MASK_MULADD) != 0) -#define TARGET_LIBPIC ((target_flags & MASK_LIBPIC) != 0) -#define TARGET_ACC_4 ((target_flags & MASK_ACC_4) != 0) -#define TARGET_DEBUG_ARG ((target_flags & MASK_DEBUG_ARG) != 0) -#define TARGET_DEBUG_ADDR ((target_flags & MASK_DEBUG_ADDR) != 0) -#define TARGET_DEBUG_STACK ((target_flags & MASK_DEBUG_STACK) != 0) -#define TARGET_DEBUG ((target_flags & MASK_DEBUG) != 0) -#define TARGET_DEBUG_LOC ((target_flags & MASK_DEBUG_LOC) != 0) -#define TARGET_DEBUG_COND_EXEC ((target_flags & MASK_DEBUG_COND_EXEC) != 0) -#define TARGET_NO_COND_MOVE ((target_flags & MASK_NO_COND_MOVE) != 0) -#define TARGET_NO_SCC ((target_flags & MASK_NO_SCC) != 0) -#define TARGET_NO_COND_EXEC ((target_flags & MASK_NO_COND_EXEC) != 0) -#define TARGET_NO_VLIW_BRANCH ((target_flags & MASK_NO_VLIW_BRANCH) != 0) -#define TARGET_NO_MULTI_CE ((target_flags & MASK_NO_MULTI_CE) != 0) -#define TARGET_NO_NESTED_CE ((target_flags & MASK_NO_NESTED_CE) != 0) -#define TARGET_PACK ((target_flags & MASK_PACK) != 0) - -#define TARGET_GPR_64 (! TARGET_GPR_32) -#define TARGET_FPR_64 (! TARGET_FPR_32) -#define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) -#define TARGET_FIXED_CC (! TARGET_ALLOC_CC) -#define TARGET_COND_MOVE (! TARGET_NO_COND_MOVE) -#define TARGET_SCC (! TARGET_NO_SCC) -#define TARGET_COND_EXEC (! TARGET_NO_COND_EXEC) -#define TARGET_VLIW_BRANCH (! TARGET_NO_VLIW_BRANCH) -#define TARGET_MULTI_CE (! TARGET_NO_MULTI_CE) -#define TARGET_NESTED_CE (! TARGET_NO_NESTED_CE) -#define TARGET_ACC_8 (! TARGET_ACC_4) - -#define TARGET_HAS_FPRS (TARGET_HARD_FLOAT || TARGET_MEDIA) - -#define NUM_GPRS (TARGET_GPR_32? 32 : 64) -#define NUM_FPRS (!TARGET_HAS_FPRS? 0 : TARGET_FPR_32? 32 : 64) -#define NUM_ACCS (!TARGET_MEDIA? 0 : TARGET_ACC_4? 4 : 8) - -/* Macros to identify the blend of media instructions available. Revision 1 - is the one found on the FR500. Revision 2 includes the changes made for - the FR400. - - Treat the generic processor as a revision 1 machine for now, for - compatibility with earlier releases. */ - -#define TARGET_MEDIA_REV1 \ - (TARGET_MEDIA \ - && (frv_cpu_type == FRV_CPU_GENERIC \ - || frv_cpu_type == FRV_CPU_FR500)) - -#define TARGET_MEDIA_REV2 \ - (TARGET_MEDIA && frv_cpu_type == FRV_CPU_FR400) - -/* This macro defines names of command options to set and clear bits in - `target_flags'. Its definition is an initializer with a subgrouping for - each command option. - - Each subgrouping contains a string constant, that defines the option name, - a number, which contains the bits to set in `target_flags', and an optional - second string which is the textual description that will be displayed when - the user passes --help on the command line. If the number entry is negative - then the specified bits will be cleared instead of being set. If the second - string entry is present but empty, then no help information will be displayed - for that option, but it will not count as an undocumented option. The actual - option name, asseen on the command line is made by appending `-m' to the - specified name. - - One of the subgroupings should have a null string. The number in this - grouping is the default value for `target_flags'. Any target options act - starting with that value. - - Here is an example which defines `-m68000' and `-m68020' with opposite - meanings, and picks the latter as the default: - - #define TARGET_SWITCHES \ - { { "68020", 1, ""}, \ - { "68000", -1, "Compile for the m68000"}, \ - { "", 1, }} - - This declaration must be present. */ - -#define TARGET_SWITCHES \ -{{ "gpr-32", MASK_GPR_32, "Only use 32 gprs"}, \ - { "gpr-64", -MASK_GPR_32, "Use 64 gprs"}, \ - { "fpr-32", MASK_FPR_32, "Only use 32 fprs"}, \ - { "fpr-64", -MASK_FPR_32, "Use 64 fprs"}, \ - { "hard-float", -MASK_SOFT_FLOAT, "Use hardware floating point" },\ - { "soft-float", MASK_SOFT_FLOAT, "Use software floating point" },\ - { "alloc-cc", MASK_ALLOC_CC, "Dynamically allocate cc's" }, \ - { "fixed-cc", -MASK_ALLOC_CC, "Just use icc0/fcc0" }, \ - { "dword", MASK_DWORD, "Change ABI to allow double word insns" }, \ - { "no-dword", -MASK_DWORD, "Do not use double word insns" }, \ - { "double", MASK_DOUBLE, "Use fp double instructions" }, \ - { "no-double", -MASK_DOUBLE, "Do not use fp double insns" }, \ - { "media", MASK_MEDIA, "Use media instructions" }, \ - { "no-media", -MASK_MEDIA, "Do not use media insns" }, \ - { "muladd", MASK_MULADD, "Use multiply add/subtract instructions" }, \ - { "no-muladd", -MASK_MULADD, "Do not use multiply add/subtract insns" }, \ - { "library-pic", MASK_LIBPIC, "PIC support for building libraries" }, \ - { "acc-4", MASK_ACC_4, "Use 4 media accumulators" }, \ - { "acc-8", -MASK_ACC_4, "Use 8 media accumulators" }, \ - { "pack", MASK_PACK, "Pack VLIW instructions" }, \ - { "no-pack", -MASK_PACK, "Do not pack VLIW instructions" }, \ - { "no-eflags", 0, "Do not mark ABI switches in e_flags" }, \ - { "debug-arg", MASK_DEBUG_ARG, "Internal debug switch" }, \ - { "debug-addr", MASK_DEBUG_ADDR, "Internal debug switch" }, \ - { "debug-stack", MASK_DEBUG_STACK, "Internal debug switch" }, \ - { "debug", MASK_DEBUG, "Internal debug switch" }, \ - { "debug-cond-exec", MASK_DEBUG_COND_EXEC, "Internal debug switch" }, \ - { "debug-loc", MASK_DEBUG_LOC, "Internal debug switch" }, \ - { "cond-move", -MASK_NO_COND_MOVE, "Enable conditional moves" }, \ - { "no-cond-move", MASK_NO_COND_MOVE, "Disable conditional moves" }, \ - { "scc", -MASK_NO_SCC, "Enable setting gprs to the result of comparisons" }, \ - { "no-scc", MASK_NO_SCC, "Disable setting gprs to the result of comparisons" }, \ - { "cond-exec", -MASK_NO_COND_EXEC, "Enable conditional execution other than moves/scc" }, \ - { "no-cond-exec", MASK_NO_COND_EXEC, "Disable conditional execution other than moves/scc" }, \ - { "vliw-branch", -MASK_NO_VLIW_BRANCH, "Run pass to pack branches into VLIW insns" }, \ - { "no-vliw-branch", MASK_NO_VLIW_BRANCH, "Do not run pass to pack branches into VLIW insns" }, \ - { "multi-cond-exec", -MASK_NO_MULTI_CE, "Disable optimizing &&/|| in conditional execution" }, \ - { "no-multi-cond-exec", MASK_NO_MULTI_CE, "Enable optimizing &&/|| in conditional execution" }, \ - { "nested-cond-exec", -MASK_NO_NESTED_CE, "Enable nested conditional execution optimizations" }, \ - { "no-nested-cond-exec" ,MASK_NO_NESTED_CE, "Disable nested conditional execution optimizations" }, \ - { "tomcat-stats", 0, "Cause gas to print tomcat statistics" }, \ - { "", MASK_DEFAULT, "" }} \ - -/* This macro is similar to `TARGET_SWITCHES' but defines names of command - options that have values. Its definition is an initializer with a - subgrouping for each command option. - - Each subgrouping contains a string constant, that defines the fixed part of - the option name, the address of a variable, and an optional description string. - The variable, of type `char *', is set to the text following the fixed part of - the option as it is specified on the command line. The actual option name is - made by appending `-m' to the specified name. - - Here is an example which defines `-mshort-data-NUMBER'. If the given option - is `-mshort-data-512', the variable `m88k_short_data' will be set to the - string `"512"'. - - extern char *m88k_short_data; - #define TARGET_OPTIONS \ - { { "short-data-", & m88k_short_data, \ - "Specify the size of the short data section" } } - - This declaration is optional. */ -#define TARGET_OPTIONS \ -{ \ - { "cpu=", &frv_cpu_string, "Set cpu type", 0}, \ - { "branch-cost=", &frv_branch_cost_string, "Internal debug switch", 0}, \ - { "cond-exec-insns=", &frv_condexec_insns_str, "Internal debug switch", 0}, \ - { "cond-exec-temps=", &frv_condexec_temps_str, "Internal debug switch", 0}, \ - { "sched-lookahead=", &frv_sched_lookahead_str,"Internal debug switch", 0}, \ -} - -/* This macro is a C statement to print on `stderr' a string describing the - particular machine description choice. Every machine description should - define `TARGET_VERSION'. For example: - - #ifdef MOTOROLA - #define TARGET_VERSION \ - fprintf (stderr, " (68k, Motorola syntax)"); - #else - #define TARGET_VERSION \ - fprintf (stderr, " (68k, MIT syntax)"); - #endif */ -#define TARGET_VERSION fprintf (stderr, _(" (frv)")) - -/* Sometimes certain combinations of command options do not make sense on a - particular target machine. You can define a macro `OVERRIDE_OPTIONS' to - take account of this. This macro, if defined, is executed once just after - all the command options have been parsed. - - Don't use this macro to turn on various extra optimizations for `-O'. That - is what `OPTIMIZATION_OPTIONS' is for. */ - -#define OVERRIDE_OPTIONS frv_override_options () - -/* Some machines may desire to change what optimizations are performed for - various optimization levels. This macro, if defined, is executed once just - after the optimization level is determined and before the remainder of the - command options have been parsed. Values set in this macro are used as the - default values for the other command line options. - - LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if - `-O' is specified, and 0 if neither is specified. - - SIZE is nonzero if `-Os' is specified, 0 otherwise. - - You should not use this macro to change options that are not - machine-specific. These should uniformly selected by the same optimization - level on all supported machines. Use this macro to enable machbine-specific - optimizations. - - *Do not examine `write_symbols' in this macro!* The debugging options are - *not supposed to alter the generated code. */ -#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) frv_optimization_options (LEVEL, SIZE) - - -/* Define this macro if debugging can be performed even without a frame - pointer. If this macro is defined, GCC will turn on the - `-fomit-frame-pointer' option whenever `-O' is specified. */ -/* Frv needs a specific frame layout that includes the frame pointer. */ - -#define CAN_DEBUG_WITHOUT_FP - - -/* Small Data Area Support. */ -/* Maximum size of variables that go in .sdata/.sbss. - The -msdata=foo switch also controls how small variables are handled. */ -#ifndef SDATA_DEFAULT_SIZE -#define SDATA_DEFAULT_SIZE 8 -#endif - - -/* Storage Layout */ - -/* Define this macro to have the value 1 if the most significant bit in a byte - has the lowest number; otherwise define it to have the value zero. This - means that bit-field instructions count from the most significant bit. If - the machine has no bit-field instructions, then this must still be defined, - but it doesn't matter which value it is defined to. This macro need not be - a constant. - - This macro does not affect the way structure fields are packed into bytes or - words; that is controlled by `BYTES_BIG_ENDIAN'. */ -#define BITS_BIG_ENDIAN 1 - -/* Define this macro to have the value 1 if the most significant byte in a word - has the lowest number. This macro need not be a constant. */ -#define BYTES_BIG_ENDIAN 1 - -/* Define this macro to have the value 1 if, in a multiword object, the most - significant word has the lowest number. This applies to both memory - locations and registers; GCC fundamentally assumes that the order of - words in memory is the same as the order in registers. This macro need not - be a constant. */ -#define WORDS_BIG_ENDIAN 1 - -/* Number of storage units in a word; normally 4. */ -#define UNITS_PER_WORD 4 - -/* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and - which has the specified mode and signedness is to be stored in a register. - This macro is only called when TYPE is a scalar type. - - On most RISC machines, which only have operations that operate on a full - register, define this macro to set M to `word_mode' if M is an integer mode - narrower than `BITS_PER_WORD'. In most cases, only integer modes should be - widened because wider-precision floating-point operations are usually more - expensive than their narrower counterparts. - - For most machines, the macro definition does not change UNSIGNEDP. However, - some machines, have instructions that preferentially handle either signed or - unsigned quantities of certain modes. For example, on the DEC Alpha, 32-bit - loads from memory and 32-bit add instructions sign-extend the result to 64 - bits. On such machines, set UNSIGNEDP according to which kind of extension - is more efficient. - - Do not define this macro if it would never modify MODE. */ -#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ - do \ - { \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < 4) \ - (MODE) = SImode; \ - } \ - while (0) - -/* Normal alignment required for function parameters on the stack, in bits. - All stack parameters receive at least this much alignment regardless of data - type. On most machines, this is the same as the size of an integer. */ -#define PARM_BOUNDARY 32 - -/* Define this macro if you wish to preserve a certain alignment for the stack - pointer. The definition is a C expression for the desired alignment - (measured in bits). - - If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the - specified boundary. If `PUSH_ROUNDING' is defined and specifies a less - strict alignment than `STACK_BOUNDARY', the stack may be momentarily - unaligned while pushing arguments. */ -#define STACK_BOUNDARY 64 - -/* Alignment required for a function entry point, in bits. */ -#define FUNCTION_BOUNDARY 128 - -/* Biggest alignment that any data type can require on this machine, - in bits. */ -#define BIGGEST_ALIGNMENT 64 - -/* @@@ A hack, needed because libobjc wants to use ADJUST_FIELD_ALIGN for - some reason. */ -#ifdef IN_TARGET_LIBS -#define BIGGEST_FIELD_ALIGNMENT 64 -#else -/* An expression for the alignment of a structure field FIELD if the - alignment computed in the usual way is COMPUTED. GCC uses this - value instead of the value in `BIGGEST_ALIGNMENT' or - `BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only. */ -#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ - frv_adjust_field_align (FIELD, COMPUTED) -#endif - -/* If defined, a C expression to compute the alignment for a static variable. - TYPE is the data type, and ALIGN is the alignment that the object - would ordinarily have. The value of this macro is used instead of that - alignment to align the object. - - If this macro is not defined, then ALIGN is used. - - One use of this macro is to increase alignment of medium-size data to make - it all fit in fewer cache lines. Another is to cause character arrays to be - word-aligned so that `strcpy' calls that copy constants to character arrays - can be done inline. */ -#define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ - && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) - -/* If defined, a C expression to compute the alignment given to a constant that - is being placed in memory. CONSTANT is the constant and ALIGN is the - alignment that the object would ordinarily have. The value of this macro is - used instead of that alignment to align the object. - - If this macro is not defined, then ALIGN is used. - - The typical use of this macro is to increase alignment for string constants - to be word aligned so that `strcpy' calls that copy constants can be done - inline. */ -#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ - (TREE_CODE (EXP) == STRING_CST \ - && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) - -/* Define this macro to be the value 1 if instructions will fail to work if - given data not on the nominal alignment. If instructions will merely go - slower in that case, define this macro as 0. */ -#define STRICT_ALIGNMENT 1 - -/* Define this if you wish to imitate the way many other C compilers handle - alignment of bitfields and the structures that contain them. - - The behavior is that the type written for a bit-field (`int', `short', or - other integer type) imposes an alignment for the entire structure, as if the - structure really did contain an ordinary field of that type. In addition, - the bit-field is placed within the structure so that it would fit within such - a field, not crossing a boundary for it. - - Thus, on most machines, a bit-field whose type is written as `int' would not - cross a four-byte boundary, and would force four-byte alignment for the - whole structure. (The alignment used may not be four bytes; it is - controlled by the other alignment parameters.) - - If the macro is defined, its definition should be a C expression; a nonzero - value for the expression enables this behavior. - - Note that if this macro is not defined, or its value is zero, some bitfields - may cross more than one alignment boundary. The compiler can support such - references if there are `insv', `extv', and `extzv' insns that can directly - reference memory. - - The other known way of making bitfields work is to define - `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'. Then every - structure can be accessed with fullwords. - - Unless the machine has bit-field instructions or you define - `STRUCTURE_SIZE_BOUNDARY' that way, you must define - `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value. - - If your aim is to make GCC use the same conventions for laying out - bitfields as are used by another compiler, here is how to investigate what - the other compiler does. Compile and run this program: - - struct foo1 - { - char x; - char :0; - char y; - }; - - struct foo2 - { - char x; - int :0; - char y; - }; - - main () - { - printf ("Size of foo1 is %d\n", - sizeof (struct foo1)); - printf ("Size of foo2 is %d\n", - sizeof (struct foo2)); - exit (0); - } - - If this prints 2 and 5, then the compiler's behavior is what you would get - from `PCC_BITFIELD_TYPE_MATTERS'. - - Defined in svr4.h. */ -#define PCC_BITFIELD_TYPE_MATTERS 1 - - -/* Layout of Source Language Data Types. */ - -#define CHAR_TYPE_SIZE 8 -#define SHORT_TYPE_SIZE 16 -#define INT_TYPE_SIZE 32 -#define LONG_TYPE_SIZE 32 -#define LONG_LONG_TYPE_SIZE 64 -#define FLOAT_TYPE_SIZE 32 -#define DOUBLE_TYPE_SIZE 64 -#define LONG_DOUBLE_TYPE_SIZE 64 - -/* An expression whose value is 1 or 0, according to whether the type `char' - should be signed or unsigned by default. The user can always override this - default with the options `-fsigned-char' and `-funsigned-char'. */ -#define DEFAULT_SIGNED_CHAR 1 - - -/* General purpose registers. */ -#define GPR_FIRST 0 /* First gpr */ -#define GPR_LAST (GPR_FIRST + 63) /* Last gpr */ -#define GPR_R0 GPR_FIRST /* R0, constant 0 */ -#define GPR_FP (GPR_FIRST + 2) /* Frame pointer */ -#define GPR_SP (GPR_FIRST + 1) /* Stack pointer */ - /* small data register */ -#define SDA_BASE_REG ((unsigned)(flag_pic ? PIC_REGNO : (GPR_FIRST+16))) -#define PIC_REGNO (GPR_FIRST + 17) /* PIC register */ - -#define FPR_FIRST 64 /* First FP reg */ -#define FPR_LAST 127 /* Last FP reg */ - -#define DEFAULT_CONDEXEC_TEMPS 4 /* reserve 4 regs by default */ -#define GPR_TEMP_NUM frv_condexec_temps /* # gprs to reserve for temps */ - -/* We reserve the last CR and CCR in each category to be used as a reload - register to reload the CR/CCR registers. This is a kludge. */ -#define CC_FIRST 128 /* First ICC/FCC reg */ -#define CC_LAST 135 /* Last ICC/FCC reg */ -#define ICC_FIRST (CC_FIRST + 4) /* First ICC reg */ -#define ICC_LAST (CC_FIRST + 7) /* Last ICC reg */ -#define ICC_TEMP (CC_FIRST + 7) /* Temporary ICC reg */ -#define FCC_FIRST (CC_FIRST) /* First FCC reg */ -#define FCC_LAST (CC_FIRST + 3) /* Last FCC reg */ - -/* Amount to shift a value to locate a ICC or FCC register in the CCR - register and shift it to the bottom 4 bits. */ -#define CC_SHIFT_RIGHT(REGNO) (((REGNO) - CC_FIRST) << 2) - -/* Mask to isolate a single ICC/FCC value. */ -#define CC_MASK 0xf - -/* Masks to isolate the various bits in an ICC field. */ -#define ICC_MASK_N 0x8 /* negative */ -#define ICC_MASK_Z 0x4 /* zero */ -#define ICC_MASK_V 0x2 /* overflow */ -#define ICC_MASK_C 0x1 /* carry */ - -/* Mask to isolate the N/Z flags in an ICC. */ -#define ICC_MASK_NZ (ICC_MASK_N | ICC_MASK_Z) - -/* Mask to isolate the Z/C flags in an ICC. */ -#define ICC_MASK_ZC (ICC_MASK_Z | ICC_MASK_C) - -/* Masks to isolate the various bits in a FCC field. */ -#define FCC_MASK_E 0x8 /* equal */ -#define FCC_MASK_L 0x4 /* less than */ -#define FCC_MASK_G 0x2 /* greater than */ -#define FCC_MASK_U 0x1 /* unordered */ - -/* For CCR registers, the machine wants CR4..CR7 to be used for integer - code and CR0..CR3 to be used for floating point. */ -#define CR_FIRST 136 /* First CCR */ -#define CR_LAST 143 /* Last CCR */ -#define CR_NUM (CR_LAST-CR_FIRST+1) /* # of CCRs (8) */ -#define ICR_FIRST (CR_FIRST + 4) /* First integer CCR */ -#define ICR_LAST (CR_FIRST + 7) /* Last integer CCR */ -#define ICR_TEMP ICR_LAST /* Temp integer CCR */ -#define FCR_FIRST (CR_FIRST + 0) /* First float CCR */ -#define FCR_LAST (CR_FIRST + 3) /* Last float CCR */ - -/* Amount to shift a value to locate a CR register in the CCCR special purpose - register and shift it to the bottom 2 bits. */ -#define CR_SHIFT_RIGHT(REGNO) (((REGNO) - CR_FIRST) << 1) - -/* Mask to isolate a single CR value. */ -#define CR_MASK 0x3 - -#define ACC_FIRST 144 /* First acc register */ -#define ACC_LAST 151 /* Last acc register */ - -#define ACCG_FIRST 152 /* First accg register */ -#define ACCG_LAST 159 /* Last accg register */ - -#define AP_FIRST 160 /* fake argument pointer */ - -#define SPR_FIRST 161 -#define SPR_LAST 162 -#define LR_REGNO (SPR_FIRST) -#define LCR_REGNO (SPR_FIRST + 1) - -#define GPR_P(R) IN_RANGE_P (R, GPR_FIRST, GPR_LAST) -#define GPR_OR_AP_P(R) (GPR_P (R) || (R) == ARG_POINTER_REGNUM) -#define FPR_P(R) IN_RANGE_P (R, FPR_FIRST, FPR_LAST) -#define CC_P(R) IN_RANGE_P (R, CC_FIRST, CC_LAST) -#define ICC_P(R) IN_RANGE_P (R, ICC_FIRST, ICC_LAST) -#define FCC_P(R) IN_RANGE_P (R, FCC_FIRST, FCC_LAST) -#define CR_P(R) IN_RANGE_P (R, CR_FIRST, CR_LAST) -#define ICR_P(R) IN_RANGE_P (R, ICR_FIRST, ICR_LAST) -#define FCR_P(R) IN_RANGE_P (R, FCR_FIRST, FCR_LAST) -#define ACC_P(R) IN_RANGE_P (R, ACC_FIRST, ACC_LAST) -#define ACCG_P(R) IN_RANGE_P (R, ACCG_FIRST, ACCG_LAST) -#define SPR_P(R) IN_RANGE_P (R, SPR_FIRST, SPR_LAST) - -#define GPR_OR_PSEUDO_P(R) (GPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define FPR_OR_PSEUDO_P(R) (FPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define GPR_AP_OR_PSEUDO_P(R) (GPR_OR_AP_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define CC_OR_PSEUDO_P(R) (CC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define ICC_OR_PSEUDO_P(R) (ICC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define FCC_OR_PSEUDO_P(R) (FCC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define CR_OR_PSEUDO_P(R) (CR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define ICR_OR_PSEUDO_P(R) (ICR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define FCR_OR_PSEUDO_P(R) (FCR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define ACC_OR_PSEUDO_P(R) (ACC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) -#define ACCG_OR_PSEUDO_P(R) (ACCG_P (R) || (R) >= FIRST_PSEUDO_REGISTER) - -#define MAX_STACK_IMMEDIATE_OFFSET 2047 - - -/* Register Basics. */ - -/* Number of hardware registers known to the compiler. They receive numbers 0 - through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number - really is assigned the number `FIRST_PSEUDO_REGISTER'. */ -#define FIRST_PSEUDO_REGISTER (SPR_LAST + 1) - -/* The first/last register that can contain the arguments to a function. */ -#define FIRST_ARG_REGNUM (GPR_FIRST + 8) -#define LAST_ARG_REGNUM (FIRST_ARG_REGNUM + FRV_NUM_ARG_REGS - 1) - -/* Registers used by the exception handling functions. These should be - registers that are not otherwised used by the calling sequence. */ -#define FIRST_EH_REGNUM 14 -#define LAST_EH_REGNUM 15 - -/* Scratch registers used in the prologue, epilogue and thunks. - OFFSET_REGNO is for loading constant addends that are too big for a - single instruction. TEMP_REGNO is used for transferring SPRs to and from - the stack, and various other activities. */ -#define OFFSET_REGNO 4 -#define TEMP_REGNO 5 - -/* Registers used in the prologue. OLD_SP_REGNO is the old stack pointer, - which is sometimes used to set up the frame pointer. */ -#define OLD_SP_REGNO 6 - -/* Registers used in the epilogue. STACKADJ_REGNO stores the exception - handler's stack adjustment. */ -#define STACKADJ_REGNO 6 - -/* Registers used in thunks. JMP_REGNO is used for loading the target - address. */ -#define JUMP_REGNO 6 - -#define EH_RETURN_DATA_REGNO(N) ((N) <= (LAST_EH_REGNUM - FIRST_EH_REGNUM)? \ - (N) + FIRST_EH_REGNUM : INVALID_REGNUM) -#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, STACKADJ_REGNO) -#define EH_RETURN_HANDLER_RTX RETURN_ADDR_RTX (0, frame_pointer_rtx) - -/* An initializer that says which registers are used for fixed purposes all - throughout the compiled code and are therefore not available for general - allocation. These would include the stack pointer, the frame pointer - (except on machines where that can be used as a general register when no - frame pointer is needed), the program counter on machines where that is - considered one of the addressable registers, and any other numbered register - with a standard use. - - This information is expressed as a sequence of numbers, separated by commas - and surrounded by braces. The Nth number is 1 if register N is fixed, 0 - otherwise. - - The table initialized from this macro, and the table initialized by the - following one, may be overridden at run time either automatically, by the - actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the - command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */ - -/* gr0 -- Hard Zero - gr1 -- Stack Pointer - gr2 -- Frame Pointer - gr3 -- Hidden Parameter - gr16 -- Small Data reserved - gr17 -- Pic reserved - gr28 -- OS reserved - gr29 -- OS reserved - gr30 -- OS reserved - gr31 -- OS reserved - cr3 -- reserved to reload FCC registers. - cr7 -- reserved to reload ICC registers. */ -#define FIXED_REGISTERS \ -{ /* Integer Registers */ \ - 1, 1, 1, 1, 0, 0, 0, 0, /* 000-007, gr0 - gr7 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 008-015, gr8 - gr15 */ \ - 1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ - 0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 032-039, gr32 - gr39 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 040-040, gr48 - gr47 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ - /* Float Registers */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 064-071, fr0 - fr7 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 072-079, fr8 - fr15 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 096-103, fr32 - fr39 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 104-111, fr48 - fr47 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ - /* Condition Code Registers */ \ - 0, 0, 0, 0, /* 128-131, fcc0 - fcc3 */ \ - 0, 0, 0, 1, /* 132-135, icc0 - icc3 */ \ - /* Conditional execution Registers (CCR) */ \ - 0, 0, 0, 0, 0, 0, 0, 1, /* 136-143, cr0 - cr7 */ \ - /* Accumulators */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 152-159, accg0 - accg7 */ \ - /* Other registers */ \ - 1, /* 160, AP - fake arg ptr */ \ - 0, /* 161, LR - Link register*/ \ - 0, /* 162, LCR - Loop count reg*/ \ -} - -/* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in - general) by function calls as well as for fixed registers. This macro - therefore identifies the registers that are not available for general - allocation of values that must live across function calls. - - If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically - saves it on function entry and restores it on function exit, if the register - is used within the function. */ -#define CALL_USED_REGISTERS \ -{ /* Integer Registers */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 000-007, gr0 - gr7 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 008-015, gr8 - gr15 */ \ - 1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ - 0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 032-039, gr32 - gr39 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 040-040, gr48 - gr47 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ - /* Float Registers */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 064-071, fr0 - fr7 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 072-079, fr8 - fr15 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 096-103, fr32 - fr39 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 104-111, fr48 - fr47 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ - /* Condition Code Registers */ \ - 1, 1, 1, 1, /* 128-131, fcc0 - fcc3 */ \ - 1, 1, 1, 1, /* 132-135, icc0 - icc3 */ \ - /* Conditional execution Registers (CCR) */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 136-143, cr0 - cr7 */ \ - /* Accumulators */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, /* 152-159, accg0 - accg7 */ \ - /* Other registers */ \ - 1, /* 160, AP - fake arg ptr */ \ - 1, /* 161, LR - Link register*/ \ - 1, /* 162, LCR - Loop count reg */ \ -} - -/* Zero or more C statements that may conditionally modify two variables - `fixed_regs' and `call_used_regs' (both of type `char []') after they have - been initialized from the two preceding macros. - - This is necessary in case the fixed or call-clobbered registers depend on - target flags. - - You need not define this macro if it has no work to do. - - If the usage of an entire class of registers depends on the target flags, - you may indicate this to GCC by using this macro to modify `fixed_regs' and - `call_used_regs' to 1 for each of the registers in the classes which should - not be used by GCC. Also define the macro `REG_CLASS_FROM_LETTER' to return - `NO_REGS' if it is called with a letter for a class that shouldn't be used. - - (However, if this class is not included in `GENERAL_REGS' and all of the - insn patterns whose constraints permit this class are controlled by target - switches, then GCC will automatically avoid using these registers when the - target switches are opposed to them.) */ - -#define CONDITIONAL_REGISTER_USAGE frv_conditional_register_usage () - - -/* Order of allocation of registers. */ - -/* If defined, an initializer for a vector of integers, containing the numbers - of hard registers in the order in which GCC should prefer to use them - (from most preferred to least). - - If this macro is not defined, registers are used lowest numbered first (all - else being equal). - - One use of this macro is on machines where the highest numbered registers - must always be saved and the save-multiple-registers instruction supports - only sequences of consecutive registers. On such machines, define - `REG_ALLOC_ORDER' to be an initializer that lists the highest numbered - allocatable register first. */ - -/* On the FRV, allocate GR16 and GR17 after other saved registers so that we - have a better chance of allocating 2 registers at a time and can use the - double word load/store instructions in the prologue. */ -#define REG_ALLOC_ORDER \ -{ \ - /* volatile registers */ \ - GPR_FIRST + 4, GPR_FIRST + 5, GPR_FIRST + 6, GPR_FIRST + 7, \ - GPR_FIRST + 8, GPR_FIRST + 9, GPR_FIRST + 10, GPR_FIRST + 11, \ - GPR_FIRST + 12, GPR_FIRST + 13, GPR_FIRST + 14, GPR_FIRST + 15, \ - GPR_FIRST + 32, GPR_FIRST + 33, GPR_FIRST + 34, GPR_FIRST + 35, \ - GPR_FIRST + 36, GPR_FIRST + 37, GPR_FIRST + 38, GPR_FIRST + 39, \ - GPR_FIRST + 40, GPR_FIRST + 41, GPR_FIRST + 42, GPR_FIRST + 43, \ - GPR_FIRST + 44, GPR_FIRST + 45, GPR_FIRST + 46, GPR_FIRST + 47, \ - \ - FPR_FIRST + 0, FPR_FIRST + 1, FPR_FIRST + 2, FPR_FIRST + 3, \ - FPR_FIRST + 4, FPR_FIRST + 5, FPR_FIRST + 6, FPR_FIRST + 7, \ - FPR_FIRST + 8, FPR_FIRST + 9, FPR_FIRST + 10, FPR_FIRST + 11, \ - FPR_FIRST + 12, FPR_FIRST + 13, FPR_FIRST + 14, FPR_FIRST + 15, \ - FPR_FIRST + 32, FPR_FIRST + 33, FPR_FIRST + 34, FPR_FIRST + 35, \ - FPR_FIRST + 36, FPR_FIRST + 37, FPR_FIRST + 38, FPR_FIRST + 39, \ - FPR_FIRST + 40, FPR_FIRST + 41, FPR_FIRST + 42, FPR_FIRST + 43, \ - FPR_FIRST + 44, FPR_FIRST + 45, FPR_FIRST + 46, FPR_FIRST + 47, \ - \ - ICC_FIRST + 0, ICC_FIRST + 1, ICC_FIRST + 2, ICC_FIRST + 3, \ - FCC_FIRST + 0, FCC_FIRST + 1, FCC_FIRST + 2, FCC_FIRST + 3, \ - CR_FIRST + 0, CR_FIRST + 1, CR_FIRST + 2, CR_FIRST + 3, \ - CR_FIRST + 4, CR_FIRST + 5, CR_FIRST + 6, CR_FIRST + 7, \ - \ - /* saved registers */ \ - GPR_FIRST + 18, GPR_FIRST + 19, \ - GPR_FIRST + 20, GPR_FIRST + 21, GPR_FIRST + 22, GPR_FIRST + 23, \ - GPR_FIRST + 24, GPR_FIRST + 25, GPR_FIRST + 26, GPR_FIRST + 27, \ - GPR_FIRST + 48, GPR_FIRST + 49, GPR_FIRST + 50, GPR_FIRST + 51, \ - GPR_FIRST + 52, GPR_FIRST + 53, GPR_FIRST + 54, GPR_FIRST + 55, \ - GPR_FIRST + 56, GPR_FIRST + 57, GPR_FIRST + 58, GPR_FIRST + 59, \ - GPR_FIRST + 60, GPR_FIRST + 61, GPR_FIRST + 62, GPR_FIRST + 63, \ - GPR_FIRST + 16, GPR_FIRST + 17, \ - \ - FPR_FIRST + 16, FPR_FIRST + 17, FPR_FIRST + 18, FPR_FIRST + 19, \ - FPR_FIRST + 20, FPR_FIRST + 21, FPR_FIRST + 22, FPR_FIRST + 23, \ - FPR_FIRST + 24, FPR_FIRST + 25, FPR_FIRST + 26, FPR_FIRST + 27, \ - FPR_FIRST + 28, FPR_FIRST + 29, FPR_FIRST + 30, FPR_FIRST + 31, \ - FPR_FIRST + 48, FPR_FIRST + 49, FPR_FIRST + 50, FPR_FIRST + 51, \ - FPR_FIRST + 52, FPR_FIRST + 53, FPR_FIRST + 54, FPR_FIRST + 55, \ - FPR_FIRST + 56, FPR_FIRST + 57, FPR_FIRST + 58, FPR_FIRST + 59, \ - FPR_FIRST + 60, FPR_FIRST + 61, FPR_FIRST + 62, FPR_FIRST + 63, \ - \ - /* special or fixed registers */ \ - GPR_FIRST + 0, GPR_FIRST + 1, GPR_FIRST + 2, GPR_FIRST + 3, \ - GPR_FIRST + 28, GPR_FIRST + 29, GPR_FIRST + 30, GPR_FIRST + 31, \ - ACC_FIRST + 0, ACC_FIRST + 1, ACC_FIRST + 2, ACC_FIRST + 3, \ - ACC_FIRST + 4, ACC_FIRST + 5, ACC_FIRST + 6, ACC_FIRST + 7, \ - ACCG_FIRST + 0, ACCG_FIRST + 1, ACCG_FIRST + 2, ACCG_FIRST + 3, \ - ACCG_FIRST + 4, ACCG_FIRST + 5, ACCG_FIRST + 6, ACCG_FIRST + 7, \ - AP_FIRST, LR_REGNO, LCR_REGNO \ -} - - -/* How Values Fit in Registers. */ - -/* A C expression for the number of consecutive hard registers, starting at - register number REGNO, required to hold a value of mode MODE. - - On a machine where all registers are exactly one word, a suitable definition - of this macro is - - #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ - / UNITS_PER_WORD)) */ - -/* On the FRV, make the CC modes take 3 words in the integer registers, so that - we can build the appropriate instructions to properly reload the values. */ -#define HARD_REGNO_NREGS(REGNO, MODE) frv_hard_regno_nregs (REGNO, MODE) - -/* A C expression that is nonzero if it is permissible to store a value of mode - MODE in hard register number REGNO (or in several registers starting with - that one). For a machine where all registers are equivalent, a suitable - definition is - - #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 - - It is not necessary for this macro to check for the numbers of fixed - registers, because the allocation mechanism considers them to be always - occupied. - - On some machines, double-precision values must be kept in even/odd register - pairs. The way to implement that is to define this macro to reject odd - register numbers for such modes. - - The minimum requirement for a mode to be OK in a register is that the - `movMODE' instruction pattern support moves between the register and any - other hard register for which the mode is OK; and that moving a value into - the register and back out not alter it. - - Since the same instruction used to move `SImode' will work for all narrower - integer modes, it is not necessary on any machine for `HARD_REGNO_MODE_OK' - to distinguish between these modes, provided you define patterns `movhi', - etc., to take advantage of this. This is useful because of the interaction - between `HARD_REGNO_MODE_OK' and `MODES_TIEABLE_P'; it is very desirable for - all integer modes to be tieable. - - Many machines have special registers for floating point arithmetic. Often - people assume that floating point machine modes are allowed only in floating - point registers. This is not true. Any registers that can hold integers - can safely *hold* a floating point machine mode, whether or not floating - arithmetic can be done on it in those registers. Integer move instructions - can be used to move the values. - - On some machines, though, the converse is true: fixed-point machine modes - may not go in floating registers. This is true if the floating registers - normalize any value stored in them, because storing a non-floating value - there would garble it. In this case, `HARD_REGNO_MODE_OK' should reject - fixed-point machine modes in floating registers. But if the floating - registers do not automatically normalize, if you can store any bit pattern - in one and retrieve it unchanged without a trap, then any machine mode may - go in a floating register, so you can define this macro to say so. - - The primary significance of special floating registers is rather that they - are the registers acceptable in floating point arithmetic instructions. - However, this is of no concern to `HARD_REGNO_MODE_OK'. You handle it by - writing the proper constraints for those instructions. - - On some machines, the floating registers are especially slow to access, so - that it is better to store a value in a stack frame than in such a register - if floating point arithmetic is not being done. As long as the floating - registers are not in class `GENERAL_REGS', they will not be used unless some - pattern's constraint asks for one. */ -#define HARD_REGNO_MODE_OK(REGNO, MODE) frv_hard_regno_mode_ok (REGNO, MODE) - -/* A C expression that is nonzero if it is desirable to choose register - allocation so as to avoid move instructions between a value of mode MODE1 - and a value of mode MODE2. - - If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are - ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be - zero. */ -#define MODES_TIEABLE_P(MODE1, MODE2) (MODE1 == MODE2) - -/* Define this macro if the compiler should avoid copies to/from CCmode - registers. You should only define this macro if support fo copying to/from - CCmode is incomplete. */ -#define AVOID_CCMODE_COPIES - - -/* Register Classes. */ - -/* An enumeral type that must be defined with all the register class names as - enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last - register class, followed by one more enumeral value, `LIM_REG_CLASSES', - which is not a register class but rather tells how many classes there are. - - Each register class has a number, which is the value of casting the class - name to type `int'. The number serves as an index in many of the tables - described below. */ -enum reg_class -{ - NO_REGS, - ICC_REGS, - FCC_REGS, - CC_REGS, - ICR_REGS, - FCR_REGS, - CR_REGS, - LCR_REG, - LR_REG, - SPR_REGS, - QUAD_ACC_REGS, - EVEN_ACC_REGS, - ACC_REGS, - ACCG_REGS, - QUAD_FPR_REGS, - FEVEN_REGS, - FPR_REGS, - QUAD_REGS, - EVEN_REGS, - GPR_REGS, - ALL_REGS, - LIM_REG_CLASSES -}; - -#define GENERAL_REGS GPR_REGS - -/* The number of distinct register classes, defined as follows: - - #define N_REG_CLASSES (int) LIM_REG_CLASSES */ -#define N_REG_CLASSES ((int) LIM_REG_CLASSES) - -/* An initializer containing the names of the register classes as C string - constants. These names are used in writing some of the debugging dumps. */ -#define REG_CLASS_NAMES { \ - "NO_REGS", \ - "ICC_REGS", \ - "FCC_REGS", \ - "CC_REGS", \ - "ICR_REGS", \ - "FCR_REGS", \ - "CR_REGS", \ - "LCR_REG", \ - "LR_REG", \ - "SPR_REGS", \ - "QUAD_ACC_REGS", \ - "EVEN_ACC_REGS", \ - "ACC_REGS", \ - "ACCG_REGS", \ - "QUAD_FPR_REGS", \ - "FEVEN_REGS", \ - "FPR_REGS", \ - "QUAD_REGS", \ - "EVEN_REGS", \ - "GPR_REGS", \ - "ALL_REGS" \ -} - -/* An initializer containing the contents of the register classes, as integers - which are bit masks. The Nth integer specifies the contents of class N. - The way the integer MASK is interpreted is that register R is in the class - if `MASK & (1 << R)' is 1. - - When the machine has more than 32 registers, an integer does not suffice. - Then the integers are replaced by sub-initializers, braced groupings - containing several integers. Each sub-initializer must be suitable as an - initializer for the type `HARD_REG_SET' which is defined in - `hard-reg-set.h'. */ -#define REG_CLASS_CONTENTS \ -{ /* gr0-gr31 gr32-gr63 fr0-fr31 fr32-fr-63 cc/ccr/acc ap/spr */ \ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* NO_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x000000f0,0x0}, /* ICC_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000000f,0x0}, /* FCC_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x000000ff,0x0}, /* CC_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000f000,0x0}, /* ICR_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000f00,0x0}, /* FCR_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000ff00,0x0}, /* CR_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x4}, /* LCR_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x2}, /* LR_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x6}, /* SPR_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* QUAD_ACC */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* EVEN_ACC */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* ACC_REGS */\ - { 0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0x0}, /* ACCG_REGS*/\ - { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* QUAD_FPR */\ - { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* FEVEN_REG*/\ - { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* FPR_REGS */\ - { 0x0ffffffc,0xffffffff,0x00000000,0x00000000,0x00000000,0x0}, /* QUAD_REGS*/\ - { 0xfffffffc,0xffffffff,0x00000000,0x00000000,0x00000000,0x0}, /* EVEN_REGS*/\ - { 0xffffffff,0xffffffff,0x00000000,0x00000000,0x00000000,0x1}, /* GPR_REGS */\ - { 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7}, /* ALL_REGS */\ -} - -/* A C expression whose value is a register class containing hard register - REGNO. In general there is more than one such class; choose a class which - is "minimal", meaning that no smaller class also contains the register. */ - -extern enum reg_class regno_reg_class[]; -#define REGNO_REG_CLASS(REGNO) regno_reg_class [REGNO] - -/* A macro whose definition is the name of the class to which a valid base - register must belong. A base register is one used in an address which is - the register value plus a displacement. */ -#define BASE_REG_CLASS GPR_REGS - -/* A macro whose definition is the name of the class to which a valid index - register must belong. An index register is one used in an address where its - value is either multiplied by a scale factor or added to another register - (as well as added to a displacement). */ -#define INDEX_REG_CLASS GPR_REGS - -/* A C expression which defines the machine-dependent operand constraint - letters for register classes. If CHAR is such a letter, the value should be - the register class corresponding to it. Otherwise, the value should be - `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS', - will not be passed to this macro; you do not need to handle it. - - The following letters are unavailable, due to being used as - constraints: - '0'..'9' - '<', '>' - 'E', 'F', 'G', 'H' - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P' - 'Q', 'R', 'S', 'T', 'U' - 'V', 'X' - 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */ - -extern enum reg_class reg_class_from_letter[]; -#define REG_CLASS_FROM_LETTER(CHAR) reg_class_from_letter [(unsigned char)(CHAR)] - -/* A C expression which is nonzero if register number NUM is suitable for use - as a base register in operand addresses. It may be either a suitable hard - register or a pseudo register that has been allocated such a hard register. */ -#define REGNO_OK_FOR_BASE_P(NUM) \ - ((NUM) < FIRST_PSEUDO_REGISTER \ - ? GPR_P (NUM) \ - : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM]))) - -/* A C expression which is nonzero if register number NUM is suitable for use - as an index register in operand addresses. It may be either a suitable hard - register or a pseudo register that has been allocated such a hard register. - - The difference between an index register and a base register is that the - index register may be scaled. If an address involves the sum of two - registers, neither one of them scaled, then either one may be labeled the - "base" and the other the "index"; but whichever labeling is used must fit - the machine's constraints of which registers may serve in each capacity. - The compiler will try both labelings, looking for one that is valid, and - will reload one or both registers only if neither labeling works. */ -#define REGNO_OK_FOR_INDEX_P(NUM) \ - ((NUM) < FIRST_PSEUDO_REGISTER \ - ? GPR_P (NUM) \ - : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM]))) - -/* A C expression that places additional restrictions on the register class to - use when it is necessary to copy value X into a register in class CLASS. - The value is a register class; perhaps CLASS, or perhaps another, smaller - class. On many machines, the following definition is safe: - - #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS - - Sometimes returning a more restrictive class makes better code. For - example, on the 68000, when X is an integer constant that is in range for a - `moveq' instruction, the value of this macro is always `DATA_REGS' as long - as CLASS includes the data registers. Requiring a data register guarantees - that a `moveq' will be used. - - If X is a `const_double', by returning `NO_REGS' you can force X into a - memory constant. This is useful on certain machines where immediate - floating values cannot be loaded into certain kinds of registers. - - This declaration must be present. */ -#define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS - -#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ - frv_secondary_reload_class (CLASS, MODE, X, TRUE) - -#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ - frv_secondary_reload_class (CLASS, MODE, X, FALSE) - -/* A C expression whose value is nonzero if pseudos that have been assigned to - registers of class CLASS would likely be spilled because registers of CLASS - are needed for spill registers. - - The default value of this macro returns 1 if CLASS has exactly one register - and zero otherwise. On most machines, this default should be used. Only - define this macro to some other expression if pseudo allocated by - `local-alloc.c' end up in memory because their hard registers were needed - for spill registers. If this macro returns nonzero for those classes, those - pseudos will only be allocated by `global.c', which knows how to reallocate - the pseudo to another register. If there would not be another register - available for reallocation, you should not change the definition of this - macro since the only effect of such a definition would be to slow down - register allocation. */ -#define CLASS_LIKELY_SPILLED_P(CLASS) frv_class_likely_spilled_p (CLASS) - -/* A C expression for the maximum number of consecutive registers of - class CLASS needed to hold a value of mode MODE. - - This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value - of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of - `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS. - - This macro helps control the handling of multiple-word values in - the reload pass. - - This declaration is required. */ -#define CLASS_MAX_NREGS(CLASS, MODE) frv_class_max_nregs (CLASS, MODE) - -#define ZERO_P(x) (x == CONST0_RTX (GET_MODE (x))) - -/* 6 bit signed immediate. */ -#define CONST_OK_FOR_I(VALUE) IN_RANGE_P(VALUE, -32, 31) -/* 10 bit signed immediate. */ -#define CONST_OK_FOR_J(VALUE) IN_RANGE_P(VALUE, -512, 511) -/* Unused */ -#define CONST_OK_FOR_K(VALUE) 0 -/* 16 bit signed immediate. */ -#define CONST_OK_FOR_L(VALUE) IN_RANGE_P(VALUE, -32768, 32767) -/* 16 bit unsigned immediate. */ -#define CONST_OK_FOR_M(VALUE) IN_RANGE_P (VALUE, 0, 65535) -/* 12 bit signed immediate that is negative. */ -#define CONST_OK_FOR_N(VALUE) IN_RANGE_P(VALUE, -2048, -1) -/* Zero */ -#define CONST_OK_FOR_O(VALUE) ((VALUE) == 0) -/* 12 bit signed immediate that is negative. */ -#define CONST_OK_FOR_P(VALUE) IN_RANGE_P(VALUE, 1, 2047) - -/* A C expression that defines the machine-dependent operand constraint letters - (`I', `J', `K', .. 'P') that specify particular ranges of integer values. - If C is one of those letters, the expression should check that VALUE, an - integer, is in the appropriate range and return 1 if so, 0 otherwise. If C - is not one of those letters, the value should be 0 regardless of VALUE. */ -#define CONST_OK_FOR_LETTER_P(VALUE, C) \ - ( (C) == 'I' ? CONST_OK_FOR_I (VALUE) \ - : (C) == 'J' ? CONST_OK_FOR_J (VALUE) \ - : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ - : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \ - : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \ - : (C) == 'N' ? CONST_OK_FOR_N (VALUE) \ - : (C) == 'O' ? CONST_OK_FOR_O (VALUE) \ - : (C) == 'P' ? CONST_OK_FOR_P (VALUE) \ - : 0) - - -/* A C expression that defines the machine-dependent operand constraint letters - (`G', `H') that specify particular ranges of `const_double' values. - - If C is one of those letters, the expression should check that VALUE, an RTX - of code `const_double', is in the appropriate range and return 1 if so, 0 - otherwise. If C is not one of those letters, the value should be 0 - regardless of VALUE. - - `const_double' is used for all floating-point constants and for `DImode' - fixed-point constants. A given letter can accept either or both kinds of - values. It can use `GET_MODE' to distinguish between these kinds. */ - -#define CONST_DOUBLE_OK_FOR_G(VALUE) \ - ((GET_MODE (VALUE) == VOIDmode \ - && CONST_DOUBLE_LOW (VALUE) == 0 \ - && CONST_DOUBLE_HIGH (VALUE) == 0) \ - || ((GET_MODE (VALUE) == SFmode \ - || GET_MODE (VALUE) == DFmode) \ - && (VALUE) == CONST0_RTX (GET_MODE (VALUE)))) - -#define CONST_DOUBLE_OK_FOR_H(VALUE) 0 - -#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ - ( (C) == 'G' ? CONST_DOUBLE_OK_FOR_G (VALUE) \ - : (C) == 'H' ? CONST_DOUBLE_OK_FOR_H (VALUE) \ - : 0) - -/* A C expression that defines the optional machine-dependent constraint - letters (`Q', `R', `S', `T', `U') that can be used to segregate specific - types of operands, usually memory references, for the target machine. - Normally this macro will not be defined. If it is required for a particular - target machine, it should return 1 if VALUE corresponds to the operand type - represented by the constraint letter C. If C is not defined as an extra - constraint, the value returned should be 0 regardless of VALUE. - - For example, on the ROMP, load instructions cannot have their output in r0 - if the memory reference contains a symbolic address. Constraint letter `Q' - is defined as representing a memory address that does *not* contain a - symbolic address. An alternative is specified with a `Q' constraint on the - input and `r' on the output. The next alternative specifies `m' on the - input and a register class that does not include r0 on the output. */ - -/* Small data references */ -#define EXTRA_CONSTRAINT_FOR_Q(VALUE) \ - (small_data_symbolic_operand (VALUE, GET_MODE (VALUE))) - -/* Double word memory ops that take one instruction. */ -#define EXTRA_CONSTRAINT_FOR_R(VALUE) \ - (dbl_memory_one_insn_operand (VALUE, GET_MODE (VALUE))) - -/* SYMBOL_REF */ -#define EXTRA_CONSTRAINT_FOR_S(VALUE) (GET_CODE (VALUE) == SYMBOL_REF) - -/* Double word memory ops that take two instructions. */ -#define EXTRA_CONSTRAINT_FOR_T(VALUE) \ - (dbl_memory_two_insn_operand (VALUE, GET_MODE (VALUE))) - -/* Memory operand for conditional execution. */ -#define EXTRA_CONSTRAINT_FOR_U(VALUE) \ - (condexec_memory_operand (VALUE, GET_MODE (VALUE))) - -#define EXTRA_CONSTRAINT(VALUE, C) \ - ( (C) == 'Q' ? EXTRA_CONSTRAINT_FOR_Q (VALUE) \ - : (C) == 'R' ? EXTRA_CONSTRAINT_FOR_R (VALUE) \ - : (C) == 'S' ? EXTRA_CONSTRAINT_FOR_S (VALUE) \ - : (C) == 'T' ? EXTRA_CONSTRAINT_FOR_T (VALUE) \ - : (C) == 'U' ? EXTRA_CONSTRAINT_FOR_U (VALUE) \ - : 0) - - -/* Basic Stack Layout. */ - -/* Structure to describe information about a saved range of registers */ - -typedef struct frv_stack_regs { - const char * name; /* name of the register ranges */ - int first; /* first register in the range */ - int last; /* last register in the range */ - int size_1word; /* # of bytes to be stored via 1 word stores */ - int size_2words; /* # of bytes to be stored via 2 word stores */ - unsigned char field_p; /* true if the registers are a single SPR */ - unsigned char dword_p; /* true if we can do dword stores */ - unsigned char special_p; /* true if the regs have a fixed save loc. */ -} frv_stack_regs_t; - -/* Register ranges to look into saving. */ -#define STACK_REGS_GPR 0 /* Gprs (normally gr16..gr31, gr48..gr63) */ -#define STACK_REGS_FPR 1 /* Fprs (normally fr16..fr31, fr48..fr63) */ -#define STACK_REGS_LR 2 /* LR register */ -#define STACK_REGS_CC 3 /* CCrs (normally not saved) */ -#define STACK_REGS_LCR 5 /* lcr register */ -#define STACK_REGS_STDARG 6 /* stdarg registers */ -#define STACK_REGS_STRUCT 7 /* structure return (gr3) */ -#define STACK_REGS_FP 8 /* FP register */ -#define STACK_REGS_MAX 9 /* # of register ranges */ - -/* Values for save_p field. */ -#define REG_SAVE_NO_SAVE 0 /* register not saved */ -#define REG_SAVE_1WORD 1 /* save the register */ -#define REG_SAVE_2WORDS 2 /* save register and register+1 */ - -/* Structure used to define the frv stack. */ - -typedef struct frv_stack { - int total_size; /* total bytes allocated for stack */ - int vars_size; /* variable save area size */ - int parameter_size; /* outgoing parameter size */ - int stdarg_size; /* size of regs needed to be saved for stdarg */ - int regs_size; /* size of the saved registers */ - int regs_size_1word; /* # of bytes to be stored via 1 word stores */ - int regs_size_2words; /* # of bytes to be stored via 2 word stores */ - int header_size; /* size of the old FP, struct ret., LR save */ - int pretend_size; /* size of pretend args */ - int vars_offset; /* offset to save local variables from new SP*/ - int regs_offset; /* offset to save registers from new SP */ - /* register range information */ - frv_stack_regs_t regs[STACK_REGS_MAX]; - /* offset to store each register */ - int reg_offset[FIRST_PSEUDO_REGISTER]; - /* whether to save register (& reg+1) */ - unsigned char save_p[FIRST_PSEUDO_REGISTER]; -} frv_stack_t; - -/* Define this macro if pushing a word onto the stack moves the stack pointer - to a smaller address. */ -#define STACK_GROWS_DOWNWARD 1 - -/* Define this macro if the addresses of local variable slots are at negative - offsets from the frame pointer. */ -#define FRAME_GROWS_DOWNWARD - -/* Offset from the frame pointer to the first local variable slot to be - allocated. - - If `FRAME_GROWS_DOWNWARD', find the next slot's offset by subtracting the - first slot's length from `STARTING_FRAME_OFFSET'. Otherwise, it is found by - adding the length of the first slot to the value `STARTING_FRAME_OFFSET'. */ -#define STARTING_FRAME_OFFSET 0 - -/* Offset from the stack pointer register to the first location at which - outgoing arguments are placed. If not specified, the default value of zero - is used. This is the proper value for most machines. - - If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first - location at which outgoing arguments are placed. */ -#define STACK_POINTER_OFFSET 0 - -/* Offset from the argument pointer register to the first argument's address. - On some machines it may depend on the data type of the function. - - If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first - argument's address. */ -#define FIRST_PARM_OFFSET(FUNDECL) 0 - -/* A C expression whose value is RTL representing the address in a stack frame - where the pointer to the caller's frame is stored. Assume that FRAMEADDR is - an RTL expression for the address of the stack frame itself. - - If you don't define this macro, the default is to return the value of - FRAMEADDR--that is, the stack frame address is also the address of the stack - word that points to the previous frame. */ -#define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) frv_dynamic_chain_address (FRAMEADDR) - -/* A C expression whose value is RTL representing the value of the return - address for the frame COUNT steps up from the current frame, after the - prologue. FRAMEADDR is the frame pointer of the COUNT frame, or the frame - pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME' is - defined. - - The value of the expression must always be the correct address when COUNT is - zero, but may be `NULL_RTX' if there is not way to determine the return - address of other frames. */ -#define RETURN_ADDR_RTX(COUNT, FRAMEADDR) frv_return_addr_rtx (COUNT, FRAMEADDR) - -/* This function contains machine specific function data. */ -struct machine_function GTY(()) -{ - /* True if we have created an rtx that relies on the stack frame. */ - int frame_needed; -}; - -#define RETURN_POINTER_REGNUM LR_REGNO - -/* A C expression whose value is RTL representing the location of the incoming - return address at the beginning of any function, before the prologue. This - RTL is either a `REG', indicating that the return value is saved in `REG', - or a `MEM' representing a location in the stack. - - You only need to define this macro if you want to support call frame - debugging information like that provided by DWARF 2. */ -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RETURN_POINTER_REGNUM) - - -/* Register That Address the Stack Frame. */ - -/* The register number of the stack pointer register, which must also be a - fixed register according to `FIXED_REGISTERS'. On most machines, the - hardware determines which register this is. */ -#define STACK_POINTER_REGNUM (GPR_FIRST + 1) - -/* The register number of the frame pointer register, which is used to access - automatic variables in the stack frame. On some machines, the hardware - determines which register this is. On other machines, you can choose any - register you wish for this purpose. */ -#define FRAME_POINTER_REGNUM (GPR_FIRST + 2) - -/* The register number of the arg pointer register, which is used to access the - function's argument list. On some machines, this is the same as the frame - pointer register. On some machines, the hardware determines which register - this is. On other machines, you can choose any register you wish for this - purpose. If this is not the same register as the frame pointer register, - then you must mark it as a fixed register according to `FIXED_REGISTERS', or - arrange to be able to eliminate it. */ - -/* On frv this is a fake register that is eliminated in - terms of either the frame pointer or stack pointer. */ -#define ARG_POINTER_REGNUM AP_FIRST - -/* Register numbers used for passing a function's static chain pointer. If - register windows are used, the register number as seen by the called - function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as - seen by the calling function is `STATIC_CHAIN_REGNUM'. If these registers - are the same, `STATIC_CHAIN_INCOMING_REGNUM' need not be defined. - - The static chain register need not be a fixed register. - - If the static chain is passed in memory, these macros should not be defined; - instead, the next two macros should be defined. */ -#define STATIC_CHAIN_REGNUM (GPR_FIRST + 7) -#define STATIC_CHAIN_INCOMING_REGNUM (GPR_FIRST + 7) - - -/* Eliminating the Frame Pointer and the Arg Pointer. */ - -/* A C expression which is nonzero if a function must have and use a frame - pointer. This expression is evaluated in the reload pass. If its value is - nonzero the function will have a frame pointer. - - The expression can in principle examine the current function and decide - according to the facts, but on most machines the constant 0 or the constant - 1 suffices. Use 0 when the machine allows code to be generated with no - frame pointer, and doing so saves some time or space. Use 1 when there is - no possible advantage to avoiding a frame pointer. - - In certain cases, the compiler does not know how to produce valid code - without a frame pointer. The compiler recognizes those cases and - automatically gives the function a frame pointer regardless of what - `FRAME_POINTER_REQUIRED' says. You don't need to worry about them. - - In a function that does not require a frame pointer, the frame pointer - register can be allocated for ordinary usage, unless you mark it as a fixed - register. See `FIXED_REGISTERS' for more information. */ -#define FRAME_POINTER_REQUIRED frv_frame_pointer_required () - -/* If defined, this macro specifies a table of register pairs used to eliminate - unneeded registers that point into the stack frame. If it is not defined, - the only elimination attempted by the compiler is to replace references to - the frame pointer with references to the stack pointer. - - The definition of this macro is a list of structure initializations, each of - which specifies an original and replacement register. - - On some machines, the position of the argument pointer is not known until - the compilation is completed. In such a case, a separate hard register must - be used for the argument pointer. This register can be eliminated by - replacing it with either the frame pointer or the argument pointer, - depending on whether or not the frame pointer has been eliminated. - - In this case, you might specify: - #define ELIMINABLE_REGS \ - {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ - {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} - - Note that the elimination of the argument pointer with the stack pointer is - specified first since that is the preferred elimination. */ - -#define ELIMINABLE_REGS \ -{ \ - {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ - {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \ -} - -/* A C expression that returns nonzero if the compiler is allowed to try to - replace register number FROM with register number TO. This macro need only - be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant - 1, since most of the cases preventing register elimination are things that - the compiler already knows about. */ - -#define CAN_ELIMINATE(FROM, TO) \ - ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM \ - ? ! frame_pointer_needed \ - : 1) - -/* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It specifies the - initial difference between the specified pair of registers. This macro must - be defined if `ELIMINABLE_REGS' is defined. */ - -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - (OFFSET) = frv_initial_elimination_offset (FROM, TO) - - -/* Passing Function Arguments on the Stack. */ - -/* If defined, the maximum amount of space required for outgoing arguments will - be computed and placed into the variable - `current_function_outgoing_args_size'. No space will be pushed onto the - stack for each call; instead, the function prologue should increase the - stack frame size by this amount. - - Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not - proper. */ -#define ACCUMULATE_OUTGOING_ARGS 1 - -/* A C expression that should indicate the number of bytes of its own arguments - that a function pops on returning, or 0 if the function pops no arguments - and the caller must therefore pop them all after the function returns. - - FUNDECL is a C variable whose value is a tree node that describes the - function in question. Normally it is a node of type `FUNCTION_DECL' that - describes the declaration of the function. From this it is possible to - obtain the DECL_ATTRIBUTES of the function. - - FUNTYPE is a C variable whose value is a tree node that describes the - function in question. Normally it is a node of type `FUNCTION_TYPE' that - describes the data type of the function. From this it is possible to obtain - the data types of the value and arguments (if known). - - When a call to a library function is being considered, FUNTYPE will contain - an identifier node for the library function. Thus, if you need to - distinguish among various library functions, you can do so by their names. - Note that "library function" in this context means a function used to - perform arithmetic, whose name is known specially in the compiler and was - not mentioned in the C code being compiled. - - STACK-SIZE is the number of bytes of arguments passed on the stack. If a - variable number of bytes is passed, it is zero, and argument popping will - always be the responsibility of the calling function. - - On the VAX, all functions always pop their arguments, so the definition of - this macro is STACK-SIZE. On the 68000, using the standard calling - convention, no functions pop their arguments, so the value of the macro is - always 0 in this case. But an alternative calling convention is available - in which functions that take a fixed number of arguments pop them but other - functions (such as `printf') pop nothing (the caller pops all). When this - convention is in use, FUNTYPE is examined to determine whether a function - takes a fixed number of arguments. */ -#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0 - - -/* Function Arguments in Registers. */ - -/* Nonzero if we do not know how to pass TYPE solely in registers. - We cannot do so in the following cases: - - - if the type has variable size - - if the type is marked as addressable (it is required to be constructed - into the stack) - - if the type is a structure or union. */ - -#define MUST_PASS_IN_STACK(MODE,TYPE) \ - (((MODE) == BLKmode) \ - || ((TYPE) != 0 \ - && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ - || TREE_CODE (TYPE) == RECORD_TYPE \ - || TREE_CODE (TYPE) == UNION_TYPE \ - || TREE_CODE (TYPE) == QUAL_UNION_TYPE \ - || TREE_ADDRESSABLE (TYPE)))) - -/* The number of register assigned to holding function arguments. */ - -#define FRV_NUM_ARG_REGS 6 - -/* A C expression that controls whether a function argument is passed in a - register, and which register. - - The arguments are CUM, of type CUMULATIVE_ARGS, which summarizes (in a way - defined by INIT_CUMULATIVE_ARGS and FUNCTION_ARG_ADVANCE) all of the previous - arguments so far passed in registers; MODE, the machine mode of the argument; - TYPE, the data type of the argument as a tree node or 0 if that is not known - (which happens for C support library functions); and NAMED, which is 1 for an - ordinary argument and 0 for nameless arguments that correspond to `...' in the - called function's prototype. - - The value of the expression should either be a `reg' RTX for the hard - register in which to pass the argument, or zero to pass the argument on the - stack. - - For machines like the VAX and 68000, where normally all arguments are - pushed, zero suffices as a definition. - - The usual way to make the ANSI library `stdarg.h' work on a machine where - some arguments are usually passed in registers, is to cause nameless - arguments to be passed on the stack instead. This is done by making - `FUNCTION_ARG' return 0 whenever NAMED is 0. - - You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of - this macro to determine if this argument is of a type that must be passed in - the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' - returns nonzero for such an argument, the compiler will abort. If - `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the - stack and then loaded into a register. */ -#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ - frv_function_arg (&CUM, MODE, TYPE, NAMED, FALSE) - -/* Define this macro if the target machine has "register windows", so that the - register in which a function sees an arguments is not necessarily the same - as the one in which the caller passed the argument. - - For such machines, `FUNCTION_ARG' computes the register in which the caller - passes the value, and `FUNCTION_INCOMING_ARG' should be defined in a similar - fashion to tell the function being called where the arguments will arrive. - - If `FUNCTION_INCOMING_ARG' is not defined, `FUNCTION_ARG' serves both - purposes. */ - -#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ - frv_function_arg (&CUM, MODE, TYPE, NAMED, TRUE) - -/* A C expression for the number of words, at the beginning of an argument, - must be put in registers. The value must be zero for arguments that are - passed entirely in registers or that are entirely pushed on the stack. - - On some machines, certain arguments must be passed partially in registers - and partially in memory. On these machines, typically the first N words of - arguments are passed in registers, and the rest on the stack. If a - multi-word argument (a `double' or a structure) crosses that boundary, its - first few words must be passed in registers and the rest must be pushed. - This macro tells the compiler when this occurs, and how many of the words - should go in registers. - - `FUNCTION_ARG' for these arguments should return the first register to be - used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for - the called function. */ -#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ - frv_function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED) - -/* extern int frv_function_arg_partial_nregs (CUMULATIVE_ARGS, int, Tree, int); */ - -/* A C expression that indicates when an argument must be passed by reference. - If nonzero for an argument, a copy of that argument is made in memory and a - pointer to the argument is passed instead of the argument itself. The - pointer is passed in whatever way is appropriate for passing a pointer to - that type. - - On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable - definition of this macro might be - #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - MUST_PASS_IN_STACK (MODE, TYPE) */ -#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - frv_function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED) - -/* If defined, a C expression that indicates when it is the called function's - responsibility to make a copy of arguments passed by invisible reference. - Normally, the caller makes a copy and passes the address of the copy to the - routine being called. When FUNCTION_ARG_CALLEE_COPIES is defined and is - nonzero, the caller does not make a copy. Instead, it passes a pointer to - the "live" value. The called function must not modify this value. If it - can be determined that the value won't be modified, it need not make a copy; - otherwise a copy must be made. */ -#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \ - frv_function_arg_callee_copies (&CUM, MODE, TYPE, NAMED) - -/* If defined, a C expression that indicates when it is more desirable to keep - an argument passed by invisible reference as a reference, rather than - copying it to a pseudo register. */ -#define FUNCTION_ARG_KEEP_AS_REFERENCE(CUM, MODE, TYPE, NAMED) \ - frv_function_arg_keep_as_reference (&CUM, MODE, TYPE, NAMED) - -/* A C type for declaring a variable that is used as the first argument of - `FUNCTION_ARG' and other related values. For some target machines, the type - `int' suffices and can hold the number of bytes of argument so far. - - There is no need to record in `CUMULATIVE_ARGS' anything about the arguments - that have been passed on the stack. The compiler has other variables to - keep track of that. For target machines on which all arguments are passed - on the stack, there is no need to store anything in `CUMULATIVE_ARGS'; - however, the data structure must exist and should not be empty, so use - `int'. */ -#define CUMULATIVE_ARGS int - -/* A C statement (sans semicolon) for initializing the variable CUM for the - state at the beginning of the argument list. The variable has type - `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type - of the function which will receive the args, or 0 if the args are to a - compiler support library function. The value of INDIRECT is nonzero when - processing an indirect call, for example a call through a function pointer. - The value of INDIRECT is zero for a call to an explicitly named function, a - library function call, or when `INIT_CUMULATIVE_ARGS' is used to find - arguments for the function being compiled. - - When processing a call to a compiler support library function, LIBNAME - identifies which one. It is a `symbol_ref' rtx which contains the name of - the function, as a string. LIBNAME is 0 when an ordinary C function call is - being processed. Thus, each time this macro is called, either LIBNAME or - FNTYPE is nonzero, but never both of them at once. */ - -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ - frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, FALSE) - -/* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the - arguments for the function being compiled. If this macro is undefined, - `INIT_CUMULATIVE_ARGS' is used instead. - - The value passed for LIBNAME is always 0, since library routines with - special calling conventions are never compiled with GCC. The argument - LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'. */ - -#define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \ - frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE) - -/* A C statement (sans semicolon) to update the summarizer variable CUM to - advance past an argument in the argument list. The values MODE, TYPE and - NAMED describe that argument. Once this is done, the variable CUM is - suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. - - This macro need not do anything if the argument in question was passed on - the stack. The compiler knows how to track the amount of stack space used - for arguments without any special help. */ -#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ - frv_function_arg_advance (&CUM, MODE, TYPE, NAMED) - -/* If defined, a C expression that gives the alignment boundary, in bits, of an - argument with the specified mode and type. If it is not defined, - `PARM_BOUNDARY' is used for all arguments. */ - -#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ - frv_function_arg_boundary (MODE, TYPE) - -/* A C expression that is nonzero if REGNO is the number of a hard register in - which function arguments are sometimes passed. This does *not* include - implicit arguments such as the static chain and the structure-value address. - On many machines, no registers can be used for this purpose since all - function arguments are pushed on the stack. */ -#define FUNCTION_ARG_REGNO_P(REGNO) \ - ((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) <= LAST_ARG_REGNUM)) - - -/* How Scalar Function Values are Returned. */ - -/* The number of the hard register that is used to return a scalar value from a - function call. */ -#define RETURN_VALUE_REGNUM (GPR_FIRST + 8) - -/* A C expression to create an RTX representing the place where a function - returns a value of data type VALTYPE. VALTYPE is a tree node representing a - data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode used to - represent that type. On many machines, only the mode is relevant. - (Actually, on most machines, scalar values are returned in the same place - regardless of mode). - - If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same promotion - rules specified in `PROMOTE_MODE' if VALTYPE is a scalar type. - - If the precise function being called is known, FUNC is a tree node - (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This makes it - possible to use a different value-returning convention for specific - functions when all their calls are known. - - `FUNCTION_VALUE' is not used for return vales with aggregate data types, - because these are returned in another way. See `STRUCT_VALUE_REGNUM' and - related macros, below. */ -#define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx (REG, TYPE_MODE (VALTYPE), RETURN_VALUE_REGNUM) - -/* A C expression to create an RTX representing the place where a library - function returns a value of mode MODE. - - Note that "library function" in this context means a compiler support - routine, used to perform arithmetic, whose name is known specially by the - compiler and was not mentioned in the C code being compiled. - - The definition of `LIBRARY_VALUE' need not be concerned aggregate data - types, because none of the library functions returns such types. */ -#define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, RETURN_VALUE_REGNUM) - -/* A C expression that is nonzero if REGNO is the number of a hard register in - which the values of called function may come back. - - A register whose use for returning values is limited to serving as the - second of a pair (for a value of type `double', say) need not be recognized - by this macro. So for most machines, this definition suffices: - - #define FUNCTION_VALUE_REGNO_P(N) ((N) == RETURN) - - If the machine has register windows, so that the caller and the called - function use different registers for the return value, this macro should - recognize only the caller's register numbers. */ -#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM) - - -/* How Large Values are Returned. */ - -/* If the structure value address is passed in a register, then - `STRUCT_VALUE_REGNUM' should be the number of that register. */ -#define STRUCT_VALUE_REGNUM (GPR_FIRST + 3) - - -/* Function Entry and Exit. */ - -/* Define this macro as a C expression that is nonzero if the return - instruction or the function epilogue ignores the value of the stack pointer; - in other words, if it is safe to delete an instruction to adjust the stack - pointer before a return from the function. - - Note that this macro's value is relevant only for functions for which frame - pointers are maintained. It is never safe to delete a final stack - adjustment in a function that has no frame pointer, and the compiler knows - this regardless of `EXIT_IGNORE_STACK'. */ -#define EXIT_IGNORE_STACK 1 - -/* Generating Code for Profiling. */ - -/* A C statement or compound statement to output to FILE some assembler code to - call the profiling subroutine `mcount'. Before calling, the assembler code - must load the address of a counter variable into a register where `mcount' - expects to find the address. The name of this variable is `LP' followed by - the number LABELNO, so you would generate the name using `LP%d' in a - `fprintf'. - - The details of how the address should be passed to `mcount' are determined - by your operating system environment, not by GCC. To figure them out, - compile a small program for profiling using the system's installed C - compiler and look at the assembler code that results. - - This declaration must be present, but it can be an abort if profiling is - not implemented. */ - -#define FUNCTION_PROFILER(FILE, LABELNO) - - -/* Implementing the Varargs Macros. */ - -/* If defined, is a C expression that produces the machine-specific code for a - call to `__builtin_saveregs'. This code will be moved to the very beginning - of the function, before any parameter access are made. The return value of - this function should be an RTX that contains the value to use as the return - of `__builtin_saveregs'. - - If this macro is not defined, the compiler will output an ordinary call to - the library function `__builtin_saveregs'. */ - -#define EXPAND_BUILTIN_SAVEREGS() frv_expand_builtin_saveregs () - -/* This macro offers an alternative to using `__builtin_saveregs' and defining - the macro `EXPAND_BUILTIN_SAVEREGS'. Use it to store the anonymous register - arguments into the stack so that all the arguments appear to have been - passed consecutively on the stack. Once this is done, you can use the - standard implementation of varargs that works for machines that pass all - their arguments on the stack. - - The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing - the values that obtain after processing of the named arguments. The - arguments MODE and TYPE describe the last named argument--its machine mode - and its data type as a tree node. - - The macro implementation should do two things: first, push onto the stack - all the argument registers *not* used for the named arguments, and second, - store the size of the data thus pushed into the `int'-valued variable whose - name is supplied as the argument PRETEND_ARGS_SIZE. The value that you - store here will serve as additional offset for setting up the stack frame. - - Because you must generate code to push the anonymous arguments at compile - time without knowing their data types, `SETUP_INCOMING_VARARGS' is only - useful on machines that have just a single category of argument register and - use it uniformly for all data types. - - If the argument SECOND_TIME is nonzero, it means that the arguments of the - function are being analyzed for the second time. This happens for an inline - function, which is not actually compiled until the end of the source file. - The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in - this case. */ -#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \ - frv_setup_incoming_varargs (& ARGS_SO_FAR, (int) MODE, TYPE, \ - & PRETEND_ARGS_SIZE, SECOND_TIME) - -/* Implement the stdarg/varargs va_start macro. STDARG_P is nonzero if this - is stdarg.h instead of varargs.h. VALIST is the tree of the va_list - variable to initialize. NEXTARG is the machine independent notion of the - 'next' argument after the variable arguments. If not defined, a standard - implementation will be defined that works for arguments passed on the stack. */ - -#define EXPAND_BUILTIN_VA_START(VALIST, NEXTARG) \ - (frv_expand_builtin_va_start(VALIST, NEXTARG)) - -/* Implement the stdarg/varargs va_arg macro. VALIST is the variable of type - va_list as a tree, TYPE is the type passed to va_arg. */ - -#define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE) \ - (frv_expand_builtin_va_arg (VALIST, TYPE)) - - -/* Trampolines for Nested Functions. */ - -/* A C expression for the size in bytes of the trampoline, as an integer. */ -#define TRAMPOLINE_SIZE frv_trampoline_size () - -/* Alignment required for trampolines, in bits. - - If you don't define this macro, the value of `BIGGEST_ALIGNMENT' is used for - aligning trampolines. */ -#define TRAMPOLINE_ALIGNMENT 32 - -/* A C statement to initialize the variable parts of a trampoline. ADDR is an - RTX for the address of the trampoline; FNADDR is an RTX for the address of - the nested function; STATIC_CHAIN is an RTX for the static chain value that - should be passed to the function when it is called. */ -#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \ - frv_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN) - -/* Define this macro if trampolines need a special subroutine to do their work. - The macro should expand to a series of `asm' statements which will be - compiled with GCC. They go in a library function named - `__transfer_from_trampoline'. - - If you need to avoid executing the ordinary prologue code of a compiled C - function when you jump to the subroutine, you can do so by placing a special - label of your own in the assembler code. Use one `asm' statement to - generate an assembler label, and another to make the label global. Then - trampolines can use that label to jump directly to your special assembler - code. */ - -#ifdef __FRV_UNDERSCORE__ -#define TRAMPOLINE_TEMPLATE_NAME "___trampoline_template" -#else -#define TRAMPOLINE_TEMPLATE_NAME "__trampoline_template" -#endif - -#define TRANSFER_FROM_TRAMPOLINE \ -extern int _write (int, const void *, unsigned); \ - \ -void \ -__trampoline_setup (short * addr, int size, int fnaddr, int sc) \ -{ \ - extern short __trampoline_template[]; \ - short * to = addr; \ - short * from = &__trampoline_template[0]; \ - int i; \ - \ - if (size < 20) \ - { \ - _write (2, "__trampoline_setup bad size\n", \ - sizeof ("__trampoline_setup bad size\n") - 1); \ - exit (-1); \ - } \ - \ - to[0] = from[0]; \ - to[1] = (short)(fnaddr); \ - to[2] = from[2]; \ - to[3] = (short)(sc); \ - to[4] = from[4]; \ - to[5] = (short)(fnaddr >> 16); \ - to[6] = from[6]; \ - to[7] = (short)(sc >> 16); \ - to[8] = from[8]; \ - to[9] = from[9]; \ - \ - for (i = 0; i < 20; i++) \ - __asm__ volatile ("dcf @(%0,%1)\n\tici @(%0,%1)" :: "r" (to), "r" (i)); \ -} \ - \ -__asm__("\n" \ - "\t.globl " TRAMPOLINE_TEMPLATE_NAME "\n" \ - "\t.text\n" \ - TRAMPOLINE_TEMPLATE_NAME ":\n" \ - "\tsetlos #0, gr6\n" /* jump register */ \ - "\tsetlos #0, gr7\n" /* static chain */ \ - "\tsethi #0, gr6\n" \ - "\tsethi #0, gr7\n" \ - "\tjmpl @(gr0,gr6)\n"); - - -/* Addressing Modes. */ - -/* A C expression that is 1 if the RTX X is a constant which is a valid - address. On most machines, this can be defined as `CONSTANT_P (X)', but a - few machines are more restrictive in which constant addresses are supported. - - `CONSTANT_P' accepts integer-values expressions whose values are not - explicitly known, such as `symbol_ref', `label_ref', and `high' expressions - and `const' arithmetic expressions, in addition to `const_int' and - `const_double' expressions. */ -#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) - -/* A number, the maximum number of registers that can appear in a valid memory - address. Note that it is up to you to specify a value equal to the maximum - number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */ -#define MAX_REGS_PER_ADDRESS 2 - -/* A C compound statement with a conditional `goto LABEL;' executed if X (an - RTX) is a legitimate memory address on the target machine for a memory - operand of mode MODE. - - It usually pays to define several simpler macros to serve as subroutines for - this one. Otherwise it may be too complicated to understand. - - This macro must exist in two variants: a strict variant and a non-strict - one. The strict variant is used in the reload pass. It must be defined so - that any pseudo-register that has not been allocated a hard register is - considered a memory reference. In contexts where some kind of register is - required, a pseudo-register with no hard register must be rejected. - - The non-strict variant is used in other passes. It must be defined to - accept all pseudo-registers in every context where some kind of register is - required. - - Compiler source files that want to use the strict variant of this macro - define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT' - conditional to define the strict variant in that case and the non-strict - variant otherwise. - - Subroutines to check for acceptable registers for various purposes (one for - base registers, one for index registers, and so on) are typically among the - subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these - subroutine macros need have two variants; the higher levels of macros may be - the same whether strict or not. - - Normally, constant addresses which are the sum of a `symbol_ref' and an - integer are stored inside a `const' RTX to mark them as constant. - Therefore, there is no need to recognize such sums specifically as - legitimate addresses. Normally you would simply recognize any `const' as - legitimate. - - Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that - are not marked with `const'. It assumes that a naked `plus' indicates - indexing. If so, then you *must* reject such naked constant sums as - illegitimate addresses, so that none of them will be given to - `PRINT_OPERAND_ADDRESS'. - - On some machines, whether a symbolic address is legitimate depends on the - section that the address refers to. On these machines, define the macro - `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and - then check for it here. When you see a `const', you will have to look - inside it to find the `symbol_ref' in order to determine the section. - - The best way to modify the name string is by adding text to the beginning, - with suitable punctuation to prevent any ambiguity. Allocate the new name - in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to - remove and decode the added text and output the name accordingly, and define - `(* targetm.strip_name_encoding)' to access the original name string. - - You can check the information stored here into the `symbol_ref' in the - definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and - `PRINT_OPERAND_ADDRESS'. */ - -#ifdef REG_OK_STRICT -#define REG_OK_STRICT_P 1 -#else -#define REG_OK_STRICT_P 0 -#endif - -#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \ - do \ - { \ - if (frv_legitimate_address_p (MODE, X, REG_OK_STRICT_P, FALSE)) \ - goto LABEL; \ - } \ - while (0) - -/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for - use as a base register. For hard registers, it should always accept those - which the hardware permits and reject the others. Whether the macro accepts - or rejects pseudo registers must be controlled by `REG_OK_STRICT' as - described above. This usually requires two variant definitions, of which - `REG_OK_STRICT' controls the one actually used. */ -#ifdef REG_OK_STRICT -#define REG_OK_FOR_BASE_P(X) GPR_P (REGNO (X)) -#else -#define REG_OK_FOR_BASE_P(X) GPR_AP_OR_PSEUDO_P (REGNO (X)) -#endif - -/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for - use as an index register. - - The difference between an index register and a base register is that the - index register may be scaled. If an address involves the sum of two - registers, neither one of them scaled, then either one may be labeled the - "base" and the other the "index"; but whichever labeling is used must fit - the machine's constraints of which registers may serve in each capacity. - The compiler will try both labelings, looking for one that is valid, and - will reload one or both registers only if neither labeling works. */ -#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) - -/* A C compound statement that attempts to replace X with a valid memory - address for an operand of mode MODE. WIN will be a C statement label - elsewhere in the code; the macro definition may use - - GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); - - to avoid further processing if the address has become legitimate. - - X will always be the result of a call to `break_out_memory_refs', and OLDX - will be the operand that was given to that function to produce X. - - The code generated by this macro should not alter the substructure of X. If - it transforms X into a more legitimate form, it should assign X (which will - always be a C variable) a new value. - - It is not necessary for this macro to come up with a legitimate address. - The compiler has standard ways of doing so in all cases. In fact, it is - safe for this macro to do nothing. But often a machine-dependent strategy - can generate better code. */ - -/* On the FRV, we use it to convert small data and pic references into using - the appropriate pointer in the address. */ -#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ - do \ - { \ - rtx newx = frv_legitimize_address (X, OLDX, MODE); \ - \ - if (newx) \ - { \ - (X) = newx; \ - goto WIN; \ - } \ - } \ - while (0) - -/* A C statement or compound statement with a conditional `goto LABEL;' - executed if memory address X (an RTX) can have different meanings depending - on the machine mode of the memory reference it is used for or if the address - is valid for some modes but not others. - - Autoincrement and autodecrement addresses typically have mode-dependent - effects because the amount of the increment or decrement is the size of the - operand being addressed. Some machines have other mode-dependent addresses. - Many RISC machines have no mode-dependent addresses. - - You may assume that ADDR is a valid address for the machine. */ -#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) - -/* A C expression that is nonzero if X is a legitimate constant for an - immediate operand on the target machine. You can assume that X satisfies - `CONSTANT_P', so you need not check this. In fact, `1' is a suitable - definition for this macro on machines where anything `CONSTANT_P' is valid. */ -#define LEGITIMATE_CONSTANT_P(X) frv_legitimate_constant_p (X) - -/* The load-and-update commands allow pre-modification in addresses. - The index has to be in a register. */ -#define HAVE_PRE_MODIFY_REG 1 - - -/* Returns a mode from class `MODE_CC' to be used when comparison operation - code OP is applied to rtx X and Y. For example, on the SPARC, - `SELECT_CC_MODE' is defined as (see *note Jump Patterns::. for a - description of the reason for this definition) - - #define SELECT_CC_MODE(OP,X,Y) \ - (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ - ? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode) \ - : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \ - || GET_CODE (X) == NEG) \ - ? CC_NOOVmode : CCmode)) - - You need not define this macro if `EXTRA_CC_MODES' is not defined. */ -#define SELECT_CC_MODE(OP, X, Y) \ - (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \ - ? CC_FPmode \ - : (((OP) == LEU || (OP) == GTU || (OP) == LTU || (OP) == GEU) \ - ? CC_UNSmode \ - : CCmode)) - -/* A C expression whose value is one if it is always safe to reverse a - comparison whose mode is MODE. If `SELECT_CC_MODE' can ever return MODE for - a floating-point inequality comparison, then `REVERSIBLE_CC_MODE (MODE)' - must be zero. - - You need not define this macro if it would always returns zero or if the - floating-point format is anything other than `IEEE_FLOAT_FORMAT'. For - example, here is the definition used on the SPARC, where floating-point - inequality comparisons are always given `CCFPEmode': - - #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) */ - -/* On frv, don't consider floating point comparisons to be reversible. In - theory, fp equality comparisons can be reversible. */ -#define REVERSIBLE_CC_MODE(MODE) ((MODE) == CCmode || (MODE) == CC_UNSmode) - -/* Frv CCR_MODE's are not reversible. */ -#define REVERSE_CONDEXEC_PREDICATES_P(x,y) 0 - - -/* Describing Relative Costs of Operations. */ - -/* A C expression for the cost of moving data from a register in class FROM to - one in class TO. The classes are expressed using the enumeration values - such as `GENERAL_REGS'. A value of 4 is the default; other values are - interpreted relative to that. - - It is not required that the cost always equal 2 when FROM is the same as TO; - on some machines it is expensive to move between registers if they are not - general registers. - - If reload sees an insn consisting of a single `set' between two hard - registers, and if `REGISTER_MOVE_COST' applied to their classes returns a - value of 2, reload does not check to ensure that the constraints of the insn - are met. Setting a cost of other than 2 will allow reload to verify that - the constraints are met. You should do this if the `movM' pattern's - constraints do not allow such copying. */ -#define REGISTER_MOVE_COST(MODE, FROM, TO) frv_register_move_cost (FROM, TO) - -/* A C expression for the cost of moving data of mode M between a register and - memory. A value of 2 is the default; this cost is relative to those in - `REGISTER_MOVE_COST'. - - If moving between registers and memory is more expensive than between two - registers, you should define this macro to express the relative cost. */ -#define MEMORY_MOVE_COST(M,C,I) 4 - -/* A C expression for the cost of a branch instruction. A value of 1 is the - default; other values are interpreted relative to that. */ - -/* Here are additional macros which do not specify precise relative costs, but - only that certain actions are more expensive than GCC would ordinarily - expect. */ - -/* We used to default the branch cost to 2, but I changed it to 1, to avoid - generating SCC instructions and or/and-ing them together, and then doing the - branch on the result, which collectively generate much worse code. */ -#ifndef DEFAULT_BRANCH_COST -#define DEFAULT_BRANCH_COST 1 -#endif - -#define BRANCH_COST frv_branch_cost_int - -/* Define this macro as a C expression which is nonzero if accessing less than - a word of memory (i.e. a `char' or a `short') is no faster than accessing a - word of memory, i.e., if such access require more than one instruction or if - there is no difference in cost between byte and (aligned) word loads. - - When this macro is not defined, the compiler will access a field by finding - the smallest containing object; when it is defined, a fullword load will be - used if alignment permits. Unless bytes accesses are faster than word - accesses, using word accesses is preferable since it may eliminate - subsequent memory access if subsequent accesses occur to other fields in the - same word of the structure, but to different bytes. */ -#define SLOW_BYTE_ACCESS 1 - -/* Define this macro if it is as good or better to call a constant function - address than to call an address kept in a register. */ -#define NO_FUNCTION_CSE - -/* Define this macro if it is as good or better for a function to call itself - with an explicit address than to call an address kept in a register. */ -#define NO_RECURSIVE_FUNCTION_CSE - - -/* Dividing the output into sections. */ - -/* A C expression whose value is a string containing the assembler operation - that should precede instructions and read-only data. Normally `".text"' is - right. */ -#define TEXT_SECTION_ASM_OP "\t.text" - -/* A C expression whose value is a string containing the assembler operation to - identify the following data as writable initialized data. Normally - `".data"' is right. */ -#define DATA_SECTION_ASM_OP "\t.data" - -/* If defined, a C expression whose value is a string containing the - assembler operation to identify the following data as - uninitialized global data. If not defined, and neither - `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined, - uninitialized global data will be output in the data section if - `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be - used. */ -#define BSS_SECTION_ASM_OP "\t.section .bss,\"aw\"" - -/* Short Data Support */ -#define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\"" - -/* On svr4, we *do* have support for the .init and .fini sections, and we - can put stuff in there to be executed before and after `main'. We let - crtstuff.c and other files know this by defining the following symbols. - The definitions say how to change sections to the .init and .fini - sections. This is the same for all known svr4 assemblers. - - The standard System V.4 macros will work, but they look ugly in the - assembly output, so redefine them. */ - -#undef INIT_SECTION_ASM_OP -#undef FINI_SECTION_ASM_OP -#define INIT_SECTION_ASM_OP "\t.section .init,\"ax\"" -#define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\"" - -#undef CTORS_SECTION_ASM_OP -#undef DTORS_SECTION_ASM_OP -#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\"" -#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\"" - -/* A C expression whose value is a string containing the assembler operation to - switch to the fixup section that records all initialized pointers in a -fpic - program so they can be changed program startup time if the program is loaded - at a different address than linked for. */ -#define FIXUP_SECTION_ASM_OP "\t.section .rofixup,\"a\"" - -/* A list of names for sections other than the standard two, which are - `in_text' and `in_data'. You need not define this macro - on a system with no other sections (that GCC needs to use). */ -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_const, in_fixup - -/* One or more functions to be defined in "varasm.c". These - functions should do jobs analogous to those of `text_section' and - `data_section', for your additional sections. Do not define this - macro if you do not define `EXTRA_SECTIONS'. */ -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - SDATA_SECTION_FUNCTION \ - FIXUP_SECTION_FUNCTION - -#define SDATA_SECTION_FUNCTION \ -void \ -sdata_section (void) \ -{ \ - if (in_section != in_sdata) \ - { \ - fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ - in_section = in_sdata; \ - } \ -} - -#define FIXUP_SECTION_FUNCTION \ -void \ -fixup_section (void) \ -{ \ - if (in_section != in_fixup) \ - { \ - fprintf (asm_out_file, "%s\n", FIXUP_SECTION_ASM_OP); \ - in_section = in_fixup; \ - } \ -} - -/* Position Independent Code. */ - -/* A C expression that is nonzero if X is a legitimate immediate operand on the - target machine when generating position independent code. You can assume - that X satisfies `CONSTANT_P', so you need not check this. You can also - assume FLAG_PIC is true, so you need not check it either. You need not - define this macro if all constants (including `SYMBOL_REF') can be immediate - operands when generating position independent code. */ -#define LEGITIMATE_PIC_OPERAND_P(X) \ - ( GET_CODE (X) == CONST_INT \ - || GET_CODE (X) == CONST_DOUBLE \ - || (GET_CODE (X) == HIGH && GET_CODE (XEXP (X, 0)) == CONST_INT) \ - || GET_CODE (X) == CONSTANT_P_RTX) - - -/* The Overall Framework of an Assembler File. */ - -/* A C string constant describing how to begin a comment in the target - assembler language. The compiler assumes that the comment will end at the - end of the line. */ -#define ASM_COMMENT_START ";" - -/* A C string constant for text to be output before each `asm' statement or - group of consecutive ones. Normally this is `"#APP"', which is a comment - that has no effect on most assemblers but tells the GNU assembler that it - must check the lines that follow for all valid assembler constructs. */ -#define ASM_APP_ON "#APP\n" - -/* A C string constant for text to be output after each `asm' statement or - group of consecutive ones. Normally this is `"#NO_APP"', which tells the - GNU assembler to resume making the time-saving assumptions that are valid - for ordinary compiler output. */ -#define ASM_APP_OFF "#NO_APP\n" - - -/* Output of Data. */ - -/* This is how to output a label to dwarf/dwarf2. */ -#define ASM_OUTPUT_DWARF_ADDR(STREAM, LABEL) \ -do { \ - fprintf (STREAM, "\t.picptr\t"); \ - assemble_name (STREAM, LABEL); \ -} while (0) - -/* Whether to emit the gas specific dwarf2 line number support. */ -#define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DEBUG_LOC) - -/* Output of Uninitialized Variables. */ - -/* A C statement (sans semicolon) to output to the stdio stream STREAM the - assembler definition of a local-common-label named NAME whose size is SIZE - bytes. The variable ROUNDED is the size rounded up to whatever alignment - the caller wants. - - Use the expression `assemble_name (STREAM, NAME)' to output the name itself; - before and after that, output the additional assembler syntax for defining - the name, and a newline. - - This macro controls how the assembler definitions of uninitialized static - variables are output. */ -#undef ASM_OUTPUT_LOCAL - -/* Like `ASM_OUTPUT_LOCAL' except takes the required alignment as a separate, - explicit argument. If you define this macro, it is used in place of - `ASM_OUTPUT_LOCAL', and gives you more flexibility in handling the required - alignment of the variable. The alignment is specified as the number of - bits. - - Defined in svr4.h. */ -#undef ASM_OUTPUT_ALIGNED_LOCAL - -/* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME. */ -extern int size_directive_output; - -/* Like `ASM_OUTPUT_ALIGNED_LOCAL' except that it takes an additional - parameter - the DECL of variable to be output, if there is one. - This macro can be called with DECL == NULL_TREE. If you define - this macro, it is used in place of `ASM_OUTPUT_LOCAL' and - `ASM_OUTPUT_ALIGNED_LOCAL', and gives you more flexibility in - handling the destination of the variable. */ -#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL -#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \ -do { \ - if ((SIZE) > 0 && (SIZE) <= g_switch_value) \ - named_section (0, ".sbss", 0); \ - else \ - bss_section (); \ - ASM_OUTPUT_ALIGN (STREAM, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \ - ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL); \ - ASM_OUTPUT_SKIP (STREAM, (SIZE) ? (SIZE) : 1); \ -} while (0) - - -/* Output and Generation of Labels. */ - -/* A C statement (sans semicolon) to output to the stdio stream STREAM the - assembler definition of a label named NAME. Use the expression - `assemble_name (STREAM, NAME)' to output the name itself; before and after - that, output the additional assembler syntax for defining the name, and a - newline. */ -#define ASM_OUTPUT_LABEL(STREAM, NAME) \ -do { \ - assemble_name (STREAM, NAME); \ - fputs (":\n", STREAM); \ -} while (0) - -/* Globalizing directive for a label. */ -#define GLOBAL_ASM_OP "\t.globl " - -/* A C statement to store into the string STRING a label whose name is made - from the string PREFIX and the number NUM. - - This string, when output subsequently by `assemble_name', should produce the - output that `(*targetm.asm_out.internal_label)' would produce with the same PREFIX - and NUM. - - If the string begins with `*', then `assemble_name' will output the rest of - the string unchanged. It is often convenient for - `ASM_GENERATE_INTERNAL_LABEL' to use `*' in this way. If the string doesn't - start with `*', then `ASM_OUTPUT_LABELREF' gets to output the string, and - may change it. (Of course, `ASM_OUTPUT_LABELREF' is also part of your - machine description, so you should know what it does on your machine.) - - Defined in svr4.h. */ -#undef ASM_GENERATE_INTERNAL_LABEL -#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ -do { \ - sprintf (LABEL, "*.%s%ld", PREFIX, (long)NUM); \ -} while (0) - - -/* Macros Controlling Initialization Routines. */ - -/* If defined, a C string constant for the assembler operation to identify the - following data as initialization code. If not defined, GCC will assume - such a section does not exist. When you are using special sections for - initialization and termination functions, this macro also controls how - `crtstuff.c' and `libgcc2.c' arrange to run the initialization functions. - - Defined in svr4.h. */ -#undef INIT_SECTION_ASM_OP - -/* If defined, `main' will call `__main' despite the presence of - `INIT_SECTION_ASM_OP'. This macro should be defined for systems where the - init section is not actually run automatically, but is still useful for - collecting the lists of constructors and destructors. */ -#define INVOKE__main - -/* Output of Assembler Instructions. */ - -/* A C initializer containing the assembler's names for the machine registers, - each one as a C string constant. This is what translates register numbers - in the compiler into assembler language. */ -#define REGISTER_NAMES \ -{ \ - "gr0", "sp", "fp", "gr3", "gr4", "gr5", "gr6", "gr7", \ - "gr8", "gr9", "gr10", "gr11", "gr12", "gr13", "gr14", "gr15", \ - "gr16", "gr17", "gr18", "gr19", "gr20", "gr21", "gr22", "gr23", \ - "gr24", "gr25", "gr26", "gr27", "gr28", "gr29", "gr30", "gr31", \ - "gr32", "gr33", "gr34", "gr35", "gr36", "gr37", "gr38", "gr39", \ - "gr40", "gr41", "gr42", "gr43", "gr44", "gr45", "gr46", "gr47", \ - "gr48", "gr49", "gr50", "gr51", "gr52", "gr53", "gr54", "gr55", \ - "gr56", "gr57", "gr58", "gr59", "gr60", "gr61", "gr62", "gr63", \ - \ - "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", \ - "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15", \ - "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", \ - "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31", \ - "fr32", "fr33", "fr34", "fr35", "fr36", "fr37", "fr38", "fr39", \ - "fr40", "fr41", "fr42", "fr43", "fr44", "fr45", "fr46", "fr47", \ - "fr48", "fr49", "fr50", "fr51", "fr52", "fr53", "fr54", "fr55", \ - "fr56", "fr57", "fr58", "fr59", "fr60", "fr61", "fr62", "fr63", \ - \ - "fcc0", "fcc1", "fcc2", "fcc3", "icc0", "icc1", "icc2", "icc3", \ - "cc0", "cc1", "cc2", "cc3", "cc4", "cc5", "cc6", "cc7", \ - "acc0", "acc1", "acc2", "acc3", "acc4", "acc5", "acc6", "acc7", \ - "accg0","accg1","accg2","accg3","accg4","accg5","accg6","accg7", \ - "ap", "lr", "lcr" \ -} - -/* Define this macro if you are using an unusual assembler that - requires different names for the machine instructions. - - The definition is a C statement or statements which output an - assembler instruction opcode to the stdio stream STREAM. The - macro-operand PTR is a variable of type `char *' which points to - the opcode name in its "internal" form--the form that is written - in the machine description. The definition should output the - opcode name to STREAM, performing any translation you desire, and - increment the variable PTR to point at the end of the opcode so - that it will not be output twice. - - In fact, your macro definition may process less than the entire - opcode name, or more than the opcode name; but if you want to - process text that includes `%'-sequences to substitute operands, - you must take care of the substitution yourself. Just be sure to - increment PTR over whatever text should not be output normally. - - If you need to look at the operand values, they can be found as the - elements of `recog_operand'. - - If the macro definition does nothing, the instruction is output in - the usual way. */ - -#define ASM_OUTPUT_OPCODE(STREAM, PTR)\ - (PTR) = frv_asm_output_opcode (STREAM, PTR) - -/* If defined, a C statement to be executed just prior to the output - of assembler code for INSN, to modify the extracted operands so - they will be output differently. - - Here the argument OPVEC is the vector containing the operands - extracted from INSN, and NOPERANDS is the number of elements of - the vector which contain meaningful data for this insn. The - contents of this vector are what will be used to convert the insn - template into assembler code, so you can change the assembler - output by changing the contents of the vector. - - This macro is useful when various assembler syntaxes share a single - file of instruction patterns; by defining this macro differently, - you can cause a large class of instructions to be output - differently (such as with rearranged operands). Naturally, - variations in assembler syntax affecting individual insn patterns - ought to be handled by writing conditional output routines in - those patterns. - - If this macro is not defined, it is equivalent to a null statement. */ - -#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\ - frv_final_prescan_insn (INSN, OPVEC, NOPERANDS) - - -/* A C compound statement to output to stdio stream STREAM the assembler syntax - for an instruction operand X. X is an RTL expression. - - CODE is a value that can be used to specify one of several ways of printing - the operand. It is used when identical operands must be printed differently - depending on the context. CODE comes from the `%' specification that was - used to request printing of the operand. If the specification was just - `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is - the ASCII code for LTR. - - If X is a register, this macro should print the register's name. The names - can be found in an array `reg_names' whose type is `char *[]'. `reg_names' - is initialized from `REGISTER_NAMES'. - - When the machine description has a specification `%PUNCT' (a `%' followed by - a punctuation character), this macro is called with a null pointer for X and - the punctuation character for CODE. */ -#define PRINT_OPERAND(STREAM, X, CODE) frv_print_operand (STREAM, X, CODE) - -/* A C expression which evaluates to true if CODE is a valid punctuation - character for use in the `PRINT_OPERAND' macro. If - `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation - characters (except for the standard one, `%') are used in this way. */ -/* . == gr0 - # == hint operand -- always zero for now - @ == small data base register (gr16) - ~ == pic register (gr17) - * == temporary integer CCR register (cr3) - & == temporary integer ICC register (icc3) */ -#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ -((CODE) == '.' || (CODE) == '#' || (CODE) == '@' || (CODE) == '~' \ - || (CODE) == '*' || (CODE) == '&') - -/* A C compound statement to output to stdio stream STREAM the assembler syntax - for an instruction operand that is a memory reference whose address is X. X - is an RTL expression. - - On some machines, the syntax for a symbolic address depends on the section - that the address refers to. On these machines, define the macro - `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and - then check for it here. - - This declaration must be present. */ -#define PRINT_OPERAND_ADDRESS(STREAM, X) frv_print_operand_address (STREAM, X) - -/* If defined, C string expressions to be used for the `%R', `%L', `%U', and - `%I' options of `asm_fprintf' (see `final.c'). These are useful when a - single `md' file must support multiple assembler formats. In that case, the - various `tm.h' files can define these macros differently. - - USER_LABEL_PREFIX is defined in svr4.h. */ -#undef USER_LABEL_PREFIX -#define USER_LABEL_PREFIX "" -#define REGISTER_PREFIX "" -#define LOCAL_LABEL_PREFIX "." -#define IMMEDIATE_PREFIX "#" - - -/* Output of dispatch tables. */ - -/* This macro should be provided on machines where the addresses in a dispatch - table are relative to the table's own address. - - The definition should be a C statement to output to the stdio stream STREAM - an assembler pseudo-instruction to generate a difference between two labels. - VALUE and REL are the numbers of two internal labels. The definitions of - these labels are output using `(*targetm.asm_out.internal_label)', and they must be - printed in the same way here. For example, - - fprintf (STREAM, "\t.word L%d-L%d\n", VALUE, REL) */ -#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ -fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL) - -/* This macro should be provided on machines where the addresses in a dispatch - table are absolute. - - The definition should be a C statement to output to the stdio stream STREAM - an assembler pseudo-instruction to generate a reference to a label. VALUE - is the number of an internal label whose definition is output using - `(*targetm.asm_out.internal_label)'. For example, - - fprintf (STREAM, "\t.word L%d\n", VALUE) */ -#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ -fprintf (STREAM, "\t.word .L%d\n", VALUE) - -/* Define this if the label before a jump-table needs to be output specially. - The first three arguments are the same as for `(*targetm.asm_out.internal_label)'; - the fourth argument is the jump-table which follows (a `jump_insn' - containing an `addr_vec' or `addr_diff_vec'). - - This feature is used on system V to output a `swbeg' statement for the - table. - - If this macro is not defined, these labels are output with - `(*targetm.asm_out.internal_label)'. - - Defined in svr4.h. */ -/* When generating embedded PIC or mips16 code we want to put the jump - table in the .text section. In all other cases, we want to put the - jump table in the .rdata section. Unfortunately, we can't use - JUMP_TABLES_IN_TEXT_SECTION, because it is not conditional. - Instead, we use ASM_OUTPUT_CASE_LABEL to switch back to the .text - section if appropriate. */ - -#undef ASM_OUTPUT_CASE_LABEL -#define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) \ -do { \ - if (flag_pic) \ - function_section (current_function_decl); \ - (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM); \ -} while (0) - -/* Define this to determine whether case statement labels are relative to - the start of the case statement or not. */ - -#define CASE_VECTOR_PC_RELATIVE (flag_pic) - - -/* Assembler Commands for Exception Regions. */ - -/* Define this macro to 0 if your target supports DWARF 2 frame unwind - information, but it does not yet work with exception handling. Otherwise, - if your target supports this information (if it defines - `INCOMING_RETURN_ADDR_RTX' and either `UNALIGNED_INT_ASM_OP' or - `OBJECT_FORMAT_ELF'), GCC will provide a default definition of 1. - - If this macro is defined to 1, the DWARF 2 unwinder will be the default - exception handling mechanism; otherwise, setjmp/longjmp will be used by - default. - - If this macro is defined to anything, the DWARF 2 unwinder will be used - instead of inline unwinders and __unwind_function in the non-setjmp case. */ -#define DWARF2_UNWIND_INFO 1 - -#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LR_REGNO) - -/* Assembler Commands for Alignment. */ - -/* A C statement to output to the stdio stream STREAM an assembler instruction - to advance the location counter by NBYTES bytes. Those bytes should be zero - when loaded. NBYTES will be a C expression of type `int'. - - Defined in svr4.h. */ -#undef ASM_OUTPUT_SKIP -#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \ - fprintf (STREAM, "\t.zero\t%u\n", (int)(NBYTES)) - -/* A C statement to output to the stdio stream STREAM an assembler command to - advance the location counter to a multiple of 2 to the POWER bytes. POWER - will be a C expression of type `int'. */ -#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ - fprintf ((STREAM), "\t.p2align %d\n", (POWER)) - -/* Inside the text section, align with unpacked nops rather than zeros. */ -#define ASM_OUTPUT_ALIGN_WITH_NOP(STREAM, POWER) \ - fprintf ((STREAM), "\t.p2alignl %d,0x80880000\n", (POWER)) - -/* Macros Affecting all Debug Formats. */ - -/* A C expression that returns the DBX register number for the compiler - register number REGNO. In simple cases, the value of this expression may be - REGNO itself. But sometimes there are some registers that the compiler - knows about and DBX does not, or vice versa. In such cases, some register - may need to have one number in the compiler and another for DBX. - - If two registers have consecutive numbers inside GCC, and they can be - used as a pair to hold a multiword value, then they *must* have consecutive - numbers after renumbering with `DBX_REGISTER_NUMBER'. Otherwise, debuggers - will be unable to access such a pair, because they expect register pairs to - be consecutive in their own numbering scheme. - - If you find yourself defining `DBX_REGISTER_NUMBER' in way that does not - preserve register pairs, then what you must do instead is redefine the - actual register numbering scheme. - - This declaration is required. */ -#define DBX_REGISTER_NUMBER(REGNO) (REGNO) - -/* A C expression that returns the type of debugging output GCC produces - when the user specifies `-g' or `-ggdb'. Define this if you have arranged - for GCC to support more than one format of debugging output. Currently, - the allowable values are `DBX_DEBUG', `SDB_DEBUG', `DWARF_DEBUG', - `DWARF2_DEBUG', and `XCOFF_DEBUG'. - - The value of this macro only affects the default debugging output; the user - can always get a specific type of output by using `-gstabs', `-gcoff', - `-gdwarf-1', `-gdwarf-2', or `-gxcoff'. - - Defined in svr4.h. */ -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG - -/* Miscellaneous Parameters. */ - -/* Define this if you have defined special-purpose predicates in the file - `MACHINE.c'. This macro is called within an initializer of an array of - structures. The first field in the structure is the name of a predicate and - the second field is an array of rtl codes. For each predicate, list all rtl - codes that can be in expressions matched by the predicate. The list should - have a trailing comma. Here is an example of two entries in the list for a - typical RISC machine: - - #define PREDICATE_CODES \ - {"gen_reg_rtx_operand", {SUBREG, REG}}, \ - {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}}, - - Defining this macro does not affect the generated code (however, incorrect - definitions that omit an rtl code that may be matched by the predicate can - cause the compiler to malfunction). Instead, it allows the table built by - `genrecog' to be more compact and efficient, thus speeding up the compiler. - The most important predicates to include in the list specified by this macro - are thoses used in the most insn patterns. */ -#define PREDICATE_CODES \ - { "integer_register_operand", { REG, SUBREG }}, \ - { "frv_load_operand", { REG, SUBREG, MEM }}, \ - { "gpr_no_subreg_operand", { REG }}, \ - { "gpr_or_fpr_operand", { REG, SUBREG }}, \ - { "gpr_or_int12_operand", { REG, SUBREG, CONST_INT }}, \ - { "gpr_fpr_or_int12_operand", { REG, SUBREG, CONST_INT }}, \ - { "gpr_or_int10_operand", { REG, SUBREG, CONST_INT }}, \ - { "gpr_or_int_operand", { REG, SUBREG, CONST_INT }}, \ - { "move_source_operand", { REG, SUBREG, CONST_INT, MEM, \ - CONST_DOUBLE, CONST, \ - SYMBOL_REF, LABEL_REF }}, \ - { "move_destination_operand", { REG, SUBREG, MEM }}, \ - { "condexec_source_operand", { REG, SUBREG, CONST_INT, MEM, \ - CONST_DOUBLE }}, \ - { "condexec_dest_operand", { REG, SUBREG, MEM }}, \ - { "reg_or_0_operand", { REG, SUBREG, CONST_INT }}, \ - { "lr_operand", { REG }}, \ - { "gpr_or_memory_operand", { REG, SUBREG, MEM }}, \ - { "fpr_or_memory_operand", { REG, SUBREG, MEM }}, \ - { "int12_operand", { CONST_INT }}, \ - { "int_2word_operand", { CONST_INT, CONST_DOUBLE, \ - SYMBOL_REF, LABEL_REF, CONST }}, \ - { "pic_register_operand", { REG }}, \ - { "pic_symbolic_operand", { SYMBOL_REF, LABEL_REF, CONST }}, \ - { "small_data_register_operand", { REG }}, \ - { "small_data_symbolic_operand", { SYMBOL_REF, CONST }}, \ - { "icc_operand", { REG }}, \ - { "fcc_operand", { REG }}, \ - { "cc_operand", { REG }}, \ - { "icr_operand", { REG }}, \ - { "fcr_operand", { REG }}, \ - { "cr_operand", { REG }}, \ - { "fpr_operand", { REG, SUBREG }}, \ - { "even_reg_operand", { REG, SUBREG }}, \ - { "odd_reg_operand", { REG, SUBREG }}, \ - { "even_gpr_operand", { REG, SUBREG }}, \ - { "odd_gpr_operand", { REG, SUBREG }}, \ - { "quad_fpr_operand", { REG, SUBREG }}, \ - { "even_fpr_operand", { REG, SUBREG }}, \ - { "odd_fpr_operand", { REG, SUBREG }}, \ - { "dbl_memory_one_insn_operand", { MEM }}, \ - { "dbl_memory_two_insn_operand", { MEM }}, \ - { "call_operand", { REG, SUBREG, PLUS, CONST_INT, \ - SYMBOL_REF, LABEL_REF, CONST }}, \ - { "upper_int16_operand", { CONST_INT }}, \ - { "uint16_operand", { CONST_INT }}, \ - { "relational_operator", { EQ, NE, LE, LT, GE, GT, \ - LEU, LTU, GEU, GTU }}, \ - { "signed_relational_operator", { EQ, NE, LE, LT, GE, GT }}, \ - { "unsigned_relational_operator", { LEU, LTU, GEU, GTU }}, \ - { "float_relational_operator", { EQ, NE, LE, LT, GE, GT }}, \ - { "ccr_eqne_operator", { EQ, NE }}, \ - { "minmax_operator", { SMIN, SMAX, UMIN, UMAX }}, \ - { "condexec_si_binary_operator", { PLUS, MINUS, AND, IOR, XOR, \ - ASHIFT, ASHIFTRT, LSHIFTRT }}, \ - { "condexec_si_media_operator", { AND, IOR, XOR }}, \ - { "condexec_si_divide_operator", { DIV, UDIV }}, \ - { "condexec_si_unary_operator", { NOT, NEG }}, \ - { "condexec_sf_add_operator", { PLUS, MINUS }}, \ - { "condexec_sf_conv_operator", { ABS, NEG }}, \ - { "intop_compare_operator", { PLUS, MINUS, AND, IOR, XOR, \ - ASHIFT, ASHIFTRT, LSHIFTRT }}, \ - { "condexec_intop_cmp_operator", { PLUS, MINUS, AND, IOR, XOR, \ - ASHIFT, ASHIFTRT, LSHIFTRT }}, \ - { "fpr_or_int6_operand", { REG, SUBREG, CONST_INT }}, \ - { "int6_operand", { CONST_INT }}, \ - { "int5_operand", { CONST_INT }}, \ - { "uint5_operand", { CONST_INT }}, \ - { "uint4_operand", { CONST_INT }}, \ - { "uint1_operand", { CONST_INT }}, \ - { "acc_operand", { REG, SUBREG }}, \ - { "even_acc_operand", { REG, SUBREG }}, \ - { "quad_acc_operand", { REG, SUBREG }}, \ - { "accg_operand", { REG, SUBREG }}, - -/* An alias for a machine mode name. This is the machine mode that elements of - a jump-table should have. */ -#define CASE_VECTOR_MODE SImode - -/* Define this macro if operations between registers with integral mode smaller - than a word are always performed on the entire register. Most RISC machines - have this property and most CISC machines do not. */ -#define WORD_REGISTER_OPERATIONS - -/* Define this macro to be a C expression indicating when insns that read - memory in MODE, an integral mode narrower than a word, set the bits outside - of MODE to be either the sign-extension or the zero-extension of the data - read. Return `SIGN_EXTEND' for values of MODE for which the insn - sign-extends, `ZERO_EXTEND' for which it zero-extends, and `NIL' for other - modes. - - This macro is not called with MODE non-integral or with a width greater than - or equal to `BITS_PER_WORD', so you may return any value in this case. Do - not define this macro if it would always return `NIL'. On machines where - this macro is defined, you will normally define it as the constant - `SIGN_EXTEND' or `ZERO_EXTEND'. */ -#define LOAD_EXTEND_OP(MODE) SIGN_EXTEND - -/* Define if loading short immediate values into registers sign extends. */ -#define SHORT_IMMEDIATES_SIGN_EXTEND - -/* The maximum number of bytes that a single instruction can move quickly from - memory to memory. */ -#define MOVE_MAX 8 - -/* A C expression which is nonzero if on this machine it is safe to "convert" - an integer of INPREC bits to one of OUTPREC bits (where OUTPREC is smaller - than INPREC) by merely operating on it as if it had only OUTPREC bits. - - On many machines, this expression can be 1. - - When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for modes for - which `MODES_TIEABLE_P' is 0, suboptimal code can result. If this is the - case, making `TRULY_NOOP_TRUNCATION' return 0 in such cases may improve - things. */ -#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - -/* An alias for the machine mode for pointers. On most machines, define this - to be the integer mode corresponding to the width of a hardware pointer; - `SImode' on 32-bit machine or `DImode' on 64-bit machines. On some machines - you must define this to be one of the partial integer modes, such as - `PSImode'. - - The width of `Pmode' must be at least as large as the value of - `POINTER_SIZE'. If it is not equal, you must define the macro - `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to `Pmode'. */ -#define Pmode SImode - -/* An alias for the machine mode used for memory references to functions being - called, in `call' RTL expressions. On most machines this should be - `QImode'. */ -#define FUNCTION_MODE QImode - -/* Define this macro to handle System V style pragmas: #pragma pack and - #pragma weak. Note, #pragma weak will only be supported if SUPPORT_WEAK is - defined. - - Defined in svr4.h. */ -#define HANDLE_SYSV_PRAGMA 1 - -/* A C expression for the maximum number of instructions to execute via - conditional execution instructions instead of a branch. A value of - BRANCH_COST+1 is the default if the machine does not use - cc0, and 1 if it does use cc0. */ -#define MAX_CONDITIONAL_EXECUTE frv_condexec_insns - -/* Default value of MAX_CONDITIONAL_EXECUTE if no -mcond-exec-insns= */ -#define DEFAULT_CONDEXEC_INSNS 8 - -/* A C expression to modify the code described by the conditional if - information CE_INFO, possibly updating the tests in TRUE_EXPR, and - FALSE_EXPR for converting if-then and if-then-else code to conditional - instructions. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if the - tests cannot be converted. */ -#define IFCVT_MODIFY_TESTS(CE_INFO, TRUE_EXPR, FALSE_EXPR) \ -frv_ifcvt_modify_tests (CE_INFO, &TRUE_EXPR, &FALSE_EXPR) - -/* A C expression to modify the code described by the conditional if - information CE_INFO, for the basic block BB, possibly updating the tests in - TRUE_EXPR, and FALSE_EXPR for converting the && and || parts of if-then or - if-then-else code to conditional instructions. OLD_TRUE and OLD_FALSE are - the previous tests. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if - the tests cannot be converted. */ -#define IFCVT_MODIFY_MULTIPLE_TESTS(CE_INFO, BB, TRUE_EXPR, FALSE_EXPR) \ -frv_ifcvt_modify_multiple_tests (CE_INFO, BB, &TRUE_EXPR, &FALSE_EXPR) - -/* A C expression to modify the code described by the conditional if - information CE_INFO with the new PATTERN in INSN. If PATTERN is a null - pointer after the IFCVT_MODIFY_INSN macro executes, it is assumed that that - insn cannot be converted to be executed conditionally. */ -#define IFCVT_MODIFY_INSN(CE_INFO, PATTERN, INSN) \ -(PATTERN) = frv_ifcvt_modify_insn (CE_INFO, PATTERN, INSN) - -/* A C expression to perform any final machine dependent modifications in - converting code to conditional execution in the code described by the - conditional if information CE_INFO. */ -#define IFCVT_MODIFY_FINAL(CE_INFO) frv_ifcvt_modify_final (CE_INFO) - -/* A C expression to cancel any machine dependent modifications in converting - code to conditional execution in the code described by the conditional if - information CE_INFO. */ -#define IFCVT_MODIFY_CANCEL(CE_INFO) frv_ifcvt_modify_cancel (CE_INFO) - -/* Initialize the extra fields provided by IFCVT_EXTRA_FIELDS. */ -#define IFCVT_INIT_EXTRA_FIELDS(CE_INFO) frv_ifcvt_init_extra_fields (CE_INFO) - -/* Indicate how many instructions can be issued at the same time. */ -#define ISSUE_RATE \ -(! TARGET_PACK ? 1 \ - : (frv_cpu_type == FRV_CPU_GENERIC \ - || frv_cpu_type == FRV_CPU_FR500 \ - || frv_cpu_type == FRV_CPU_TOMCAT) ? 4 \ - : frv_cpu_type == FRV_CPU_FR400 ? 2 : 1) - -/* Set and clear whether this insn begins a VLIW insn. */ -#define CLEAR_VLIW_START(INSN) PUT_MODE (INSN, VOIDmode) -#define SET_VLIW_START(INSN) PUT_MODE (INSN, TImode) - -/* The definition of the following macro results in that the 2nd jump - optimization (after the 2nd insn scheduling) is minimal. It is - necessary to define when start cycle marks of insns (TImode is used - for this) is used for VLIW insn packing. Some jump optimizations - make such marks invalid. These marks are corrected for some - (minimal) optimizations. ??? Probably the macro is temporary. - Final solution could making the 2nd jump optimizations before the - 2nd instruction scheduling or corrections of the marks for all jump - optimizations. Although some jump optimizations are actually - deoptimizations for VLIW (super-scalar) processors. */ - -#define MINIMAL_SECOND_JUMP_OPTIMIZATION - -/* Return true if parallel operations are expected to be emitted via the - packing flag. */ -#define PACKING_FLAG_USED_P() \ -(optimize && flag_schedule_insns_after_reload && ISSUE_RATE > 1) - -/* If the following macro is defined and nonzero and deterministic - finite state automata are used for pipeline hazard recognition, the - code making resource-constrained software pipelining is on. */ -#define RCSP_SOFTWARE_PIPELINING 1 - -/* If the following macro is defined and nonzero and deterministic - finite state automata are used for pipeline hazard recognition, we - will try to exchange insns in queue ready to improve the schedule. - The more macro value, the more tries will be made. */ -#define FIRST_CYCLE_MULTIPASS_SCHEDULING 1 - -/* The following macro is used only when value of - FIRST_CYCLE_MULTIPASS_SCHEDULING is nonzero. The more macro value, - the more tries will be made to choose better schedule. If the - macro value is zero or negative there will be no multi-pass - scheduling. */ -#define FIRST_CYCLE_MULTIPASS_SCHEDULING_LOOKAHEAD frv_sched_lookahead - -enum frv_builtins -{ - FRV_BUILTIN_MAND, - FRV_BUILTIN_MOR, - FRV_BUILTIN_MXOR, - FRV_BUILTIN_MNOT, - FRV_BUILTIN_MAVEH, - FRV_BUILTIN_MSATHS, - FRV_BUILTIN_MSATHU, - FRV_BUILTIN_MADDHSS, - FRV_BUILTIN_MADDHUS, - FRV_BUILTIN_MSUBHSS, - FRV_BUILTIN_MSUBHUS, - FRV_BUILTIN_MPACKH, - FRV_BUILTIN_MQADDHSS, - FRV_BUILTIN_MQADDHUS, - FRV_BUILTIN_MQSUBHSS, - FRV_BUILTIN_MQSUBHUS, - FRV_BUILTIN_MUNPACKH, - FRV_BUILTIN_MDPACKH, - FRV_BUILTIN_MBTOH, - FRV_BUILTIN_MHTOB, - FRV_BUILTIN_MCOP1, - FRV_BUILTIN_MCOP2, - FRV_BUILTIN_MROTLI, - FRV_BUILTIN_MROTRI, - FRV_BUILTIN_MWCUT, - FRV_BUILTIN_MSLLHI, - FRV_BUILTIN_MSRLHI, - FRV_BUILTIN_MSRAHI, - FRV_BUILTIN_MEXPDHW, - FRV_BUILTIN_MEXPDHD, - FRV_BUILTIN_MMULHS, - FRV_BUILTIN_MMULHU, - FRV_BUILTIN_MMULXHS, - FRV_BUILTIN_MMULXHU, - FRV_BUILTIN_MMACHS, - FRV_BUILTIN_MMACHU, - FRV_BUILTIN_MMRDHS, - FRV_BUILTIN_MMRDHU, - FRV_BUILTIN_MQMULHS, - FRV_BUILTIN_MQMULHU, - FRV_BUILTIN_MQMULXHU, - FRV_BUILTIN_MQMULXHS, - FRV_BUILTIN_MQMACHS, - FRV_BUILTIN_MQMACHU, - FRV_BUILTIN_MCPXRS, - FRV_BUILTIN_MCPXRU, - FRV_BUILTIN_MCPXIS, - FRV_BUILTIN_MCPXIU, - FRV_BUILTIN_MQCPXRS, - FRV_BUILTIN_MQCPXRU, - FRV_BUILTIN_MQCPXIS, - FRV_BUILTIN_MQCPXIU, - FRV_BUILTIN_MCUT, - FRV_BUILTIN_MCUTSS, - FRV_BUILTIN_MWTACC, - FRV_BUILTIN_MWTACCG, - FRV_BUILTIN_MRDACC, - FRV_BUILTIN_MRDACCG, - FRV_BUILTIN_MTRAP, - FRV_BUILTIN_MCLRACC, - FRV_BUILTIN_MCLRACCA, - FRV_BUILTIN_MDUNPACKH, - FRV_BUILTIN_MBTOHE, - FRV_BUILTIN_MQXMACHS, - FRV_BUILTIN_MQXMACXHS, - FRV_BUILTIN_MQMACXHS, - FRV_BUILTIN_MADDACCS, - FRV_BUILTIN_MSUBACCS, - FRV_BUILTIN_MASACCS, - FRV_BUILTIN_MDADDACCS, - FRV_BUILTIN_MDSUBACCS, - FRV_BUILTIN_MDASACCS, - FRV_BUILTIN_MABSHS, - FRV_BUILTIN_MDROTLI, - FRV_BUILTIN_MCPLHI, - FRV_BUILTIN_MCPLI, - FRV_BUILTIN_MDCUTSSI, - FRV_BUILTIN_MQSATHS, - FRV_BUILTIN_MHSETLOS, - FRV_BUILTIN_MHSETLOH, - FRV_BUILTIN_MHSETHIS, - FRV_BUILTIN_MHSETHIH, - FRV_BUILTIN_MHDSETS, - FRV_BUILTIN_MHDSETH -}; - -/* Enable prototypes on the call rtl functions. */ -#define MD_CALL_PROTOTYPES 1 - -extern GTY(()) rtx frv_compare_op0; /* operand save for */ -extern GTY(()) rtx frv_compare_op1; /* comparison generation */ - -#endif /* __FRV_H__ */ diff --git a/contrib/gcc/config/frv/frv.md b/contrib/gcc/config/frv/frv.md deleted file mode 100644 index aef10bc..0000000 --- a/contrib/gcc/config/frv/frv.md +++ /dev/null @@ -1,7455 +0,0 @@ -;; Frv Machine Description -;; Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. -;; Contributed by Red Hat, Inc. - -;; This file is part of GCC. - -;; GCC is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GCC is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING. If not, write to -;; the Free Software Foundation, 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. - - -;; :::::::::::::::::::: -;; :: -;; :: Unspec's used -;; :: -;; :::::::::::::::::::: - -(define_constants - [(UNSPEC_BLOCKAGE 0) - (UNSPEC_CC_TO_GPR 1) - (UNSPEC_GPR_TO_CC 2) - (UNSPEC_PIC_PROLOGUE 3) - (UNSPEC_CR_LOGIC 4) - (UNSPEC_STACK_ADJUST 5) - (UNSPEC_EH_RETURN_EPILOGUE 6)]) - - - -;; :::::::::::::::::::: -;; :: -;; :: Constraints -;; :: -;; :::::::::::::::::::: - -;; Standard Constraints -;; -;; `m' A memory operand is allowed, with any kind of address that the -;; machine supports in general. -;; -;; `o' A memory operand is allowed, but only if the address is -;; "offsettable". This means that adding a small integer (actually, the -;; width in bytes of the operand, as determined by its machine mode) may be -;; added to the address and the result is also a valid memory address. -;; -;; `V' A memory operand that is not offsettable. In other words, -;; anything that would fit the `m' constraint but not the `o' constraint. -;; -;; `<' A memory operand with autodecrement addressing (either -;; predecrement or postdecrement) is allowed. -;; -;; `>' A memory operand with autoincrement addressing (either -;; preincrement or postincrement) is allowed. -;; -;; `r' A register operand is allowed provided that it is in a general -;; register. -;; -;; `d', `a', `f', ... -;; Other letters can be defined in machine-dependent fashion to stand for -;; particular classes of registers. `d', `a' and `f' are defined on the -;; 68000/68020 to stand for data, address and floating point registers. -;; -;; `i' An immediate integer operand (one with constant value) is allowed. -;; This includes symbolic constants whose values will be known only at -;; assembly time. -;; -;; `n' An immediate integer operand with a known numeric value is allowed. -;; Many systems cannot support assembly-time constants for operands less -;; than a word wide. Constraints for these operands should use `n' rather -;; than `i'. -;; -;; 'I' First machine-dependent integer constant (6 bit signed ints). -;; 'J' Second machine-dependent integer constant (10 bit signed ints). -;; 'K' Third machine-dependent integer constant (-2048). -;; 'L' Fourth machine-dependent integer constant (16 bit signed ints). -;; 'M' Fifth machine-dependent integer constant (16 bit unsigned ints). -;; 'N' Sixth machine-dependent integer constant (-2047..-1). -;; 'O' Seventh machine-dependent integer constant (zero). -;; 'P' Eighth machine-dependent integer constant (1..2047). -;; -;; Other letters in the range `I' through `P' may be defined in a -;; machine-dependent fashion to permit immediate integer operands with -;; explicit integer values in specified ranges. For example, on the 68000, -;; `I' is defined to stand for the range of values 1 to 8. This is the -;; range permitted as a shift count in the shift instructions. -;; -;; `E' An immediate floating operand (expression code `const_double') is -;; allowed, but only if the target floating point format is the same as -;; that of the host machine (on which the compiler is running). -;; -;; `F' An immediate floating operand (expression code `const_double') is -;; allowed. -;; -;; 'G' First machine-dependent const_double. -;; 'H' Second machine-dependent const_double. -;; -;; `s' An immediate integer operand whose value is not an explicit -;; integer is allowed. -;; -;; This might appear strange; if an insn allows a constant operand with a -;; value not known at compile time, it certainly must allow any known -;; value. So why use `s' instead of `i'? Sometimes it allows better code -;; to be generated. -;; -;; For example, on the 68000 in a fullword instruction it is possible to -;; use an immediate operand; but if the immediate value is between -128 and -;; 127, better code results from loading the value into a register and -;; using the register. This is because the load into the register can be -;; done with a `moveq' instruction. We arrange for this to happen by -;; defining the letter `K' to mean "any integer outside the range -128 to -;; 127", and then specifying `Ks' in the operand constraints. -;; -;; `g' Any register, memory or immediate integer operand is allowed, -;; except for registers that are not general registers. -;; -;; `X' Any operand whatsoever is allowed, even if it does not satisfy -;; `general_operand'. This is normally used in the constraint of a -;; `match_scratch' when certain alternatives will not actually require a -;; scratch register. -;; -;; `0' Match operand 0. -;; `1' Match operand 1. -;; `2' Match operand 2. -;; `3' Match operand 3. -;; `4' Match operand 4. -;; `5' Match operand 5. -;; `6' Match operand 6. -;; `7' Match operand 7. -;; `8' Match operand 8. -;; `9' Match operand 9. -;; -;; An operand that matches the specified operand number is allowed. If a -;; digit is used together with letters within the same alternative, the -;; digit should come last. -;; -;; This is called a "matching constraint" and what it really means is that -;; the assembler has only a single operand that fills two roles considered -;; separate in the RTL insn. For example, an add insn has two input -;; operands and one output operand in the RTL, but on most CISC machines an -;; add instruction really has only two operands, one of them an -;; input-output operand: -;; -;; addl #35,r12 -;; -;; Matching constraints are used in these circumstances. More precisely, -;; the two operands that match must include one input-only operand and one -;; output-only operand. Moreover, the digit must be a smaller number than -;; the number of the operand that uses it in the constraint. -;; -;; For operands to match in a particular case usually means that they are -;; identical-looking RTL expressions. But in a few special cases specific -;; kinds of dissimilarity are allowed. For example, `*x' as an input -;; operand will match `*x++' as an output operand. For proper results in -;; such cases, the output template should always use the output-operand's -;; number when printing the operand. -;; -;; `p' An operand that is a valid memory address is allowed. This is for -;; "load address" and "push address" instructions. -;; -;; `p' in the constraint must be accompanied by `address_operand' as the -;; predicate in the `match_operand'. This predicate interprets the mode -;; specified in the `match_operand' as the mode of the memory reference for -;; which the address would be valid. -;; -;; `Q` First non constant, non register machine-dependent insns -;; `R` Second non constant, non register machine-dependent insns -;; `S` Third non constant, non register machine-dependent insns -;; `T` Fourth non constant, non register machine-dependent insns -;; `U` Fifth non constant, non register machine-dependent insns -;; -;; Letters in the range `Q' through `U' may be defined in a -;; machine-dependent fashion to stand for arbitrary operand types. The -;; machine description macro `EXTRA_CONSTRAINT' is passed the operand as -;; its first argument and the constraint letter as its second operand. -;; -;; A typical use for this would be to distinguish certain types of memory -;; references that affect other insn operands. -;; -;; Do not define these constraint letters to accept register references -;; (`reg'); the reload pass does not expect this and would not handle it -;; properly. - -;; Multiple Alternative Constraints -;; `?' Disparage slightly the alternative that the `?' appears in, as a -;; choice when no alternative applies exactly. The compiler regards this -;; alternative as one unit more costly for each `?' that appears in it. -;; -;; `!' Disparage severely the alternative that the `!' appears in. This -;; alternative can still be used if it fits without reloading, but if -;; reloading is needed, some other alternative will be used. - -;; Constraint modifiers -;; `=' Means that this operand is write-only for this instruction: the -;; previous value is discarded and replaced by output data. -;; -;; `+' Means that this operand is both read and written by the -;; instruction. -;; -;; When the compiler fixes up the operands to satisfy the constraints, it -;; needs to know which operands are inputs to the instruction and which are -;; outputs from it. `=' identifies an output; `+' identifies an operand -;; that is both input and output; all other operands are assumed to be -;; input only. -;; -;; `&' Means (in a particular alternative) that this operand is written -;; before the instruction is finished using the input operands. Therefore, -;; this operand may not lie in a register that is used as an input operand -;; or as part of any memory address. -;; -;; `&' applies only to the alternative in which it is written. In -;; constraints with multiple alternatives, sometimes one alternative -;; requires `&' while others do not. -;; -;; `&' does not obviate the need to write `='. -;; -;; `%' Declares the instruction to be commutative for this operand and the -;; following operand. This means that the compiler may interchange the two -;; operands if that is the cheapest way to make all operands fit the -;; constraints. This is often used in patterns for addition instructions -;; that really have only two operands: the result must go in one of the -;; arguments. -;; -;; `#' Says that all following characters, up to the next comma, are to be -;; ignored as a constraint. They are significant only for choosing -;; register preferences. -;; -;; `*' Says that the following character should be ignored when choosing -;; register preferences. `*' has no effect on the meaning of the -;; constraint as a constraint, and no effect on reloading. - - -;; :::::::::::::::::::: -;; :: -;; :: Attributes -;; :: -;; :::::::::::::::::::: - -;; The `define_attr' expression is used to define each attribute required by -;; the target machine. It looks like: -;; -;; (define_attr NAME LIST-OF-VALUES DEFAULT) - -;; NAME is a string specifying the name of the attribute being defined. - -;; LIST-OF-VALUES is either a string that specifies a comma-separated list of -;; values that can be assigned to the attribute, or a null string to indicate -;; that the attribute takes numeric values. - -;; DEFAULT is an attribute expression that gives the value of this attribute -;; for insns that match patterns whose definition does not include an explicit -;; value for this attribute. - -;; For each defined attribute, a number of definitions are written to the -;; `insn-attr.h' file. For cases where an explicit set of values is specified -;; for an attribute, the following are defined: - -;; * A `#define' is written for the symbol `HAVE_ATTR_NAME'. -;; -;; * An enumeral class is defined for `attr_NAME' with elements of the -;; form `UPPER-NAME_UPPER-VALUE' where the attribute name and value are first -;; converted to upper case. -;; -;; * A function `get_attr_NAME' is defined that is passed an insn and -;; returns the attribute value for that insn. - -;; For example, if the following is present in the `md' file: -;; -;; (define_attr "type" "branch,fp,load,store,arith" ...) -;; -;; the following lines will be written to the file `insn-attr.h'. -;; -;; #define HAVE_ATTR_type -;; enum attr_type {TYPE_BRANCH, TYPE_FP, TYPE_LOAD, TYPE_STORE, TYPE_ARITH}; -;; extern enum attr_type get_attr_type (); - -;; If the attribute takes numeric values, no `enum' type will be defined and -;; the function to obtain the attribute's value will return `int'. - -(define_attr "length" "" (const_int 4)) - -;; Processor type -- this attribute must exactly match the processor_type -;; enumeration in frv-protos.h. - -(define_attr "cpu" "generic,fr500,fr400,fr300,simple,tomcat" - (const (symbol_ref "frv_cpu_type"))) - -;; Attribute is "yes" for branches and jumps that span too great a distance -;; to be implemented in the most natural way. Such instructions will use -;; a call instruction in some way. - -(define_attr "far_jump" "yes,no" (const_string "no")) - -;; Instruction type - -;; The table below summarizes the types of media instruction and their -;; scheduling classification. Headings are: - -;; Type: the name of the define_attr type -;; Conditions: "yes" if conditional variants are available -;; FR500: Fujitsu's categorisation for the FR500 -;; FR400: Fujitsu's categorisation for the FR400 (but see below). - -;; On the FR400, media instructions are divided into 2 broad categories. -;; Category 1 instructions can execute in either the M0 or M1 unit and can -;; execute in parallel with other category 1 instructions. Category 2 -;; instructions must use the M0 unit, and therefore cannot run in parallel -;; with other media instructions. - -;; The FR400 documentation also divides media instructions into one of seven -;; categories (m1 to m7). m1 to m4 contain both Category 1 and Category 2 -;; instructions, so we use a combination of the categories here. - -;; Type Conditional FR500 FR400 -;; ---- ---------- ----- ----- -;; mlogic yes m1 m1:1 -;; mrdacc no m2 m4:1 -;; mwtacc no m3 m5:1 -;; maveh no m1 m1:1 -;; msath no m1 m1:1 -;; maddh yes m1 m1:1 -;; mqaddh yes m1 m1:2 -;; mpackh no m2 m3:1 -;; munpackh no m2 m3:2 -;; mdpackh no m5 m3:2 -;; mbhconv yes m2 m3:2 -;; mrot no m2 m3:1 -;; mshift no m2 m3:1 -;; mexpdhw yes m2 m3:1 -;; mexpdhd yes m2 m3:2 -;; mwcut no m2 m3:2 -;; mmulh yes m4 m2:1 -;; mmulxh no m4 m2:1 -;; mmach yes m4 m2:1 -;; mmrdh no m4 m2:1 -;; mqmulh yes m4 m2:2 -;; mqmulxh no m4 m2:2 -;; mqmach yes m4 m2:2 -;; mcpx yes m4 m2:1 -;; mqcpx yes m4 m2:2 -;; mcut no m2 m4:1 -;; mclracc no m3 m4:1 -;; mclracca no m6 m4:2 -;; mdunpackh no m2 n/a -;; mbhconve no m2 n/a -;; maddacc no n/a m2:1 -;; mdaddacc no n/a m2:2 -;; mabsh no n/a m1:1 -;; mdrot no n/a m3:2 -;; mcpl no n/a m3:2 -;; mdcut no n/a m4:2 -;; mqsath no n/a m1:2 -;; mset no n/a m1:1 - -(define_attr "type" - "int,sethi,setlo,mul,div,gload,gstore,fload,fstore,movfg,movgf,branch,jump,jumpl,call,spr,trap,fsconv,fsadd,fsmul,fmas,fsdiv,sqrt_single,fdconv,fdadd,fdmul,fddiv,sqrt_double,mlogic,maveh,msath,maddh,mqaddh,mpackh,munpackh,mdpackh,mbhconv,mrot,mshift,mexpdhw,mexpdhd,mwcut,mmulh,mmulxh,mmach,mmrdh,mqmulh,mqmulxh,mqmach,mcpx,mqcpx,mcut,mclracc,mclracca,mdunpackh,mbhconve,mrdacc,mwtacc,maddacc,mdaddacc,mabsh,mdrot,mcpl,mdcut,mqsath,mset,m7,ccr,multi,unknown" - (const_string "unknown")) - - - -/* This is description of pipeline hazards based on DFA. The - following constructions can be used for this: - - o define_cpu_unit string [string]) describes a cpu functional unit - (separated by comma). - - 1st operand: Names of cpu function units. - 2nd operand: Name of automaton (see comments for - DEFINE_AUTOMATON). - - All define_reservations and define_cpu_units should have unique - names which can not be "nothing". - - o (exclusion_set string string) means that each CPU function unit - in the first string can not be reserved simultaneously with each - unit whose name is in the second string and vise versa. CPU - units in the string are separated by commas. For example, it is - useful for description CPU with fully pipelined floating point - functional unit which can execute simultaneously only single - floating point insns or only double floating point insns. - - o (presence_set string string) means that each CPU function unit in - the first string can not be reserved unless at least one of units - whose names are in the second string is reserved. This is an - asymmetric relation. CPU units in the string are separated by - commas. For example, it is useful for description that slot1 is - reserved after slot0 reservation for a VLIW processor. - - o (absence_set string string) means that each CPU function unit in - the first string can not be reserved only if each unit whose name - is in the second string is not reserved. This is an asymmetric - relation (actually exclusion set is analogous to this one but it - is symmetric). CPU units in the string are separated by commas. - For example, it is useful for description that slot0 can not be - reserved after slot1 or slot2 reservation for a VLIW processor. - - o (define_bypass number out_insn_names in_insn_names) names bypass with - given latency (the first number) from insns given by the first - string (see define_insn_reservation) into insns given by the - second string. Insn names in the strings are separated by - commas. - - o (define_automaton string) describes names of an automaton - generated and used for pipeline hazards recognition. The names - are separated by comma. Actually it is possibly to generate the - single automaton but unfortunately it can be very large. If we - use more one automata, the summary size of the automata usually - is less than the single one. The automaton name is used in - define_cpu_unit. All automata should have unique names. - - o (define_reservation string string) names reservation (the first - string) of cpu functional units (the 2nd string). Sometimes unit - reservations for different insns contain common parts. In such - case, you describe common part and use one its name (the 1st - parameter) in regular expression in define_insn_reservation. All - define_reservations, define results and define_cpu_units should - have unique names which can not be "nothing". - - o (define_insn_reservation name default_latency condition regexpr) - describes reservation of cpu functional units (the 3nd operand) - for instruction which is selected by the condition (the 2nd - parameter). The first parameter is used for output of debugging - information. The reservations are described by a regular - expression according the following syntax: - - regexp = regexp "," oneof - | oneof - - oneof = oneof "|" allof - | allof - - allof = allof "+" repeat - | repeat - - repeat = element "*" number - | element - - element = cpu_function_name - | reservation_name - | result_name - | "nothing" - | "(" regexp ")" - - 1. "," is used for describing start of the next cycle in - reservation. - - 2. "|" is used for describing the reservation described by the - first regular expression *or* the reservation described by - the second regular expression *or* etc. - - 3. "+" is used for describing the reservation described by the - first regular expression *and* the reservation described by - the second regular expression *and* etc. - - 4. "*" is used for convenience and simply means sequence in - which the regular expression are repeated NUMBER times with - cycle advancing (see ","). - - 5. cpu function unit name which means reservation. - - 6. reservation name -- see define_reservation. - - 7. string "nothing" means no units reservation. - -*/ - -(define_automaton "nodiv, idiv, div") - -;; An FR500 packet can contain a single control instruction or a sequence -;; of up to four operations matching the regular expression: - -;; (I FM? I? FM? | FM? FM?) B? B? - -;; where I denotes an integer operation, FM a floating-point or media -;; operation, and B a branch operation. There are two units for each type -;; of instruction: I0 and I1, FM0 and FM1, and B0 and B1. Units are -;; allocated left-to-right: the first integer instruction uses I0, the -;; second uses I1, and so on. - -;; The FR400 is similar to the FR500 except that it allows only 2 operations -;; per packet and has only one branch unit. We can use the FR500 conflict -;; description for the FR400, but need to define different cpu_units -;; later. - -;; Slot/unit combinations available on the FR400 and above: -(define_cpu_unit "sl0_i0, sl0_fm0, sl0_b0, sl0_c" "nodiv") -(define_cpu_unit "sl1_fm0, sl1_i1, sl1_fm1, sl1_b0" "nodiv") - -;; These are available on the FR500 and above: -(define_cpu_unit "sl1_b1" "nodiv") -(define_cpu_unit "sl2_i1, sl2_fm1, sl2_b0, sl2_b1" "nodiv") -(define_cpu_unit "sl3_fm1, sl3_b0, sl3_b1" "nodiv") - -;; The following describes conlicts by slots -;; slot0 -(exclusion_set "sl0_i0" "sl0_fm0,sl0_b0,sl0_c") -(exclusion_set "sl0_fm0" "sl0_b0,sl0_c") -(exclusion_set "sl0_b0" "sl0_c") - -;; slot1 -(exclusion_set "sl1_fm0" "sl1_i1,sl1_fm1,sl1_b0,sl1_b1") -(exclusion_set "sl1_i1" "sl1_fm1,sl1_b0,sl1_b1") -(exclusion_set "sl1_fm1" "sl1_b0,sl1_b1") -(exclusion_set "sl1_b0" "sl1_b1") - -;; slot2 -(exclusion_set "sl2_i1" "sl2_fm1,sl2_b0,sl2_b1") -(exclusion_set "sl2_fm1" "sl2_b0,sl2_b1") -(exclusion_set "sl2_b0" "sl2_b1") - -;; slot3 -(exclusion_set "sl3_fm1" "sl3_b0,sl3_b1") -(exclusion_set "sl3_b0" "sl3_b1") - -;; The following describes conlicts by units -;; fm0 -(exclusion_set "sl0_fm0" "sl1_fm0") - -;; b0 -(exclusion_set "sl0_b0" "sl1_b0,sl2_b0,sl3_b0") -(exclusion_set "sl1_b0" "sl2_b0,sl3_b0") -(exclusion_set "sl2_b0" "sl3_b0") - -;; i1 -(exclusion_set "sl1_i1" "sl2_i1") - -;; fm1 -(exclusion_set "sl1_fm1" "sl2_fm1,sl3_fm1") -(exclusion_set "sl2_fm1" "sl3_fm1") - -;; b1 -(exclusion_set "sl1_b1" "sl2_b1,sl3_b1") -(exclusion_set "sl2_b1" "sl3_b1") - -;; The following describes remaining combinations of conflicts -;; slot0 -(exclusion_set "sl0_i0" "sl1_fm1,sl1_b1") -(exclusion_set "sl0_fm0" "sl1_i1,sl1_b1,sl2_i1,sl2_fm1,sl3_fm1,sl3_b0") -(exclusion_set "sl0_b0" "sl1_fm0,sl1_i1,sl1_fm1,sl2_i1,sl2_fm1,sl2_b1,\ - sl3_fm1,sl3_b1") -(exclusion_set "sl0_c" "sl1_fm0,sl1_i1,sl1_fm1,sl1_b0,sl1_b1,sl2_i1,sl2_fm1,\ - sl2_b0,sl2_b1,sl3_fm1,sl3_b0,sl3_b1") - - -;; slot1 -(exclusion_set "sl1_fm0" "sl2_b1") -(exclusion_set "sl1_i1" "sl2_fm1,sl2_b1,sl3_fm1,sl3_b0") -(exclusion_set "sl1_fm1" "sl2_i1,sl2_b1,sl3_b0") -(exclusion_set "sl1_b0" "sl2_i1,sl2_fm1,sl3_fm1,sl3_b1") -(exclusion_set "sl1_b1" "sl2_i1,sl2_fm1,sl2_b0,sl3_fm1,sl3_b0") - -;; slot2 -(exclusion_set "sl2_i1" "sl3_b1") -(exclusion_set "sl2_fm1" "sl3_b1") -(exclusion_set "sl2_b0" "sl3_fm1") -(exclusion_set "sl2_b1" "sl3_fm1,sl3_b0") - -;; slot3 -(exclusion_set "sl1_fm0" "sl2_i1,sl2_fm1,sl2_b0,sl2_b1,sl3_fm1,sl3_b0,sl3_b1") -(exclusion_set "sl3_fm1" "sl2_i1,sl2_fm1,sl2_b0,sl2_b1,sl3_b0,sl3_b1") - -;; :::::::::::::::::::: -;; :: -;; :: Generic/FR500 scheduler description -;; :: -;; :::::::::::::::::::: - -;; Define reservation in order to describe only in terms of units. - -(define_reservation "i0" "sl0_i0") -(define_reservation "f0" "sl0_fm0|sl1_fm0") -(define_reservation "m0" "f0") -(define_reservation "b0" "sl0_b0|sl1_b0|sl2_b0|sl3_b0") -(define_reservation "c" "sl0_c") -(define_reservation "i1" "sl1_i1|sl2_i1") -(define_reservation "f1" "sl1_fm1|sl2_fm1|sl3_fm1") -(define_reservation "m1" "f1") -(define_reservation "b1" "sl1_b1|sl2_b1|sl3_b1") - -;; Integer insns -;; It is not possibly to issue load & store in one VLIW insn. -(define_cpu_unit "idiv1" "idiv") -(define_cpu_unit "idiv2" "idiv") -(define_cpu_unit "l0" "nodiv") -(define_cpu_unit "l1" "nodiv") -(define_cpu_unit "s0" "nodiv") - -(exclusion_set "l1,l0" "s0") - -;; We set the default_latency of sethi to be 0 to allow sethi and setlo to be -;; combined in the same VLIW instruction as allowed by the architecture. This -;; assumes the only use of sethi is always followed by a setlo of the same -;; register. -(define_insn_reservation "i1_sethi" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "sethi")) - "i0|i1") - -(define_insn_reservation "i1_setlo" 1 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "setlo")) - "i0|i1") - -(define_insn_reservation "i1_int" 1 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "int")) - "i0|i1") - -(define_insn_reservation "i1_mul" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "mul")) - "i0|i1") - -(define_insn_reservation "i1_div" 19 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "div")) - "(i0|i1),(idiv1*18|idiv2*18)") - -(define_insn_reservation "i2_gload" 4 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "gload")) - "(i0|i1)+(l0|l1)") - -(define_insn_reservation "i2_fload" 4 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "fload")) - "(i0|i1)+(l0|l1)") - -(define_insn_reservation "i3_gstore" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "gstore")) - "i0+s0") - -(define_insn_reservation "i3_fstore" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "fstore")) - "i0+s0") - -(define_insn_reservation "i4_move_gf" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "movgf")) - "i0") - -(define_insn_reservation "i4_move_fg" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "movfg")) - "i0") - -(define_insn_reservation "i5" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "jumpl")) - "i0") - -;; Clear/commit is not generated now: -(define_insn_reservation "i6" 0 (const_int 0) "i0|i1") - -;; -;; Branch-instructions -;; -(define_insn_reservation "b1/b3" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "jump,branch,ccr")) - "b0|b1") - -;; The following insn is not generated now. - -(define_insn_reservation "b2" 0 (const_int 0) "b0") - -(define_insn_reservation "b4" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "call")) - "b0") - -;; The following insns are not generated now. -(define_insn_reservation "b5" 0 (const_int 0) "b0|b1") -(define_insn_reservation "b6" 0 (const_int 0) "b0|b1") - -;; Control insns -(define_insn_reservation "trap" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "trap")) - "c") - -(define_insn_reservation "control" 0 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "spr")) - "c") - -;; Floating point insns -(define_cpu_unit "add0" "nodiv") -(define_cpu_unit "add1" "nodiv") -(define_cpu_unit "mul0" "nodiv") -(define_cpu_unit "mul1" "nodiv") -(define_cpu_unit "div1" "div") -(define_cpu_unit "div2" "div") -(define_cpu_unit "root" "div") - -(define_bypass 4 "f1" "m1,m2,m3,m4,m5,m6,m7") -(define_insn_reservation "f1" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "fsconv,fdconv")) - "(f0|f1)") - -(define_bypass 4 "f2" "m1,m2,m3,m4,m5,m6,m7") -(define_insn_reservation "f2" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "fsadd,fdadd")) - "(f0|f1)+(add0|add1)") - -(define_bypass 4 "f3" "m1,m2,m3,m4,m5,m6,m7") -(define_insn_reservation "f3" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "fsmul,fdmul")) - "(f0|f1)+(mul0|mul1)") - -(define_bypass 11 "f4_div" "m1,m2,m3,m4,m5,m6,m7") -(define_insn_reservation "f4_div" 10 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "fsdiv,fddiv")) - "(f0|f1),(div1*9|div2*9)") - -(define_bypass 16 "f4_root" "m1,m2,m3,m4,m5,m6,m7") -(define_insn_reservation "f4_root" 15 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "sqrt_single,sqrt_double")) - "(f0|f1)+root*15") - -(define_bypass 4 "f5" "m1,m2,m3,m4,m5,m6,m7") -(define_insn_reservation "f5" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "fmas")) - "(f0|f1)+(add0|add1)+(mul0|mul1)") - -;; The following insns are not generated by gcc now: -(define_insn_reservation "f6" 0 (const_int 0) "(f0|f1)+add0+add1") -(define_insn_reservation "f7" 0 (const_int 0) "(f0|f1)+mul0+mul1") - -;; Media insns. Now they are all not generated now. -(define_cpu_unit "m1_0" "nodiv") -(define_cpu_unit "m1_1" "nodiv") -(define_cpu_unit "m2_0" "nodiv") -(define_cpu_unit "m2_1" "nodiv") -(define_cpu_unit "m3_0" "nodiv") -(define_cpu_unit "m3_1" "nodiv") -(define_cpu_unit "m4_0" "nodiv") -(define_cpu_unit "m4_1" "nodiv") -(define_cpu_unit "m5" "nodiv") -(define_cpu_unit "m6" "nodiv") -(define_cpu_unit "m7" "nodiv") - -(exclusion_set "m5,m6,m7" "m2_0,m2_1,m3_0,m3_1") -(exclusion_set "m5" "m6,m7") -(exclusion_set "m6" "m4_0,m4_1,m7") -(exclusion_set "m7" "m1_0,m1_1,add0,add1,mul0,mul1") - -(define_bypass 2 "m1" "m1,m2,m3,m4,m5,m6,m7") -(define_bypass 4 "m1" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") -(define_insn_reservation "m1" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "mlogic,maveh,msath,maddh,mqaddh")) - "(m0|m1)+(m1_0|m1_1)") - -(define_bypass 2 "m2" "m1,m2,m3,m4,m5,m6,m7") -(define_bypass 4 "m2" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") -(define_insn_reservation "m2" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "mrdacc,mpackh,munpackh,mbhconv,mrot,mshift,mexpdhw,mexpdhd,mwcut,mcut,mdunpackh,mbhconve")) - "(m0|m1)+(m2_0|m2_1)") - -(define_bypass 1 "m3" "m4") -(define_insn_reservation "m3" 2 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "mclracc,mwtacc")) - "(m0|m1)+(m3_0|m3_1)") - -(define_bypass 1 "m4" "m4") -(define_insn_reservation "m4" 2 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "mmulh,mmulxh,mmach,mmrdh,mqmulh,mqmulxh,mqmach,mcpx,mqcpx")) - "(m0|m1)+(m4_0|m4_1)") - -(define_bypass 2 "m5" "m1,m2,m3,m4,m5,m6,m7") -(define_bypass 4 "m5" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") -(define_insn_reservation "m5" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "mdpackh")) - "(m0|m1)+m5") - -(define_bypass 1 "m6" "m4") -(define_insn_reservation "m6" 2 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "mclracca")) - "(m0|m1)+m6") - -(define_bypass 2 "m7" "m1,m2,m3,m4,m5,m6,m7") -(define_bypass 4 "m7" "f1,f2,f3,f4_div,f4_root,f5,f6,f7") - -(define_insn_reservation "m7" 3 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "m7")) - "(m0|m1)+m7") - -;; Unknown & multi insns starts on new cycle and the next insn starts -;; on new cycle. To describe this we consider as a control insn. -(define_insn_reservation "unknown" 1 - (and (eq_attr "cpu" "generic,fr500,tomcat") - (eq_attr "type" "unknown,multi")) - "c") - -;; :::::::::::::::::::: -;; :: -;; :: FR400 scheduler description -;; :: -;; :::::::::::::::::::: - -;; Category 2 media instructions use both media units, but can be packed -;; with non-media instructions. Use fr400_m1unit to claim the M1 unit -;; without claiming a slot. - -(define_cpu_unit "fr400_m1unit" "nodiv") - -(define_reservation "fr400_i0" "sl0_i0") -(define_reservation "fr400_i1" "sl1_i1") -(define_reservation "fr400_m0" "sl0_fm0|sl1_fm0") -(define_reservation "fr400_m1" "sl1_fm1") -(define_reservation "fr400_meither" "fr400_m0|(fr400_m1+fr400_m1unit)") -(define_reservation "fr400_mboth" "fr400_m0+fr400_m1unit") -(define_reservation "fr400_b" "sl0_b0|sl1_b0") -(define_reservation "fr400_c" "sl0_c") - -;; Name Class Units Latency -;; ==== ===== ===== ======= -;; int I1 I0/I1 1 -;; sethi I1 I0/I1 0 -- does not interfere with setlo -;; setlo I1 I0/I1 1 -;; mul I1 I0 3 (*) -;; div I1 I0 20 (*) -;; gload I2 I0 4 (*) -;; fload I2 I0 4 -- only 3 if read by a media insn -;; gstore I3 I0 0 -- provides no result -;; fstore I3 I0 0 -- provides no result -;; movfg I4 I0 3 (*) -;; movgf I4 I0 3 (*) -;; jumpl I5 I0 0 -- provides no result -;; -;; (*) The results of these instructions can be read one cycle earlier -;; than indicated. The penalty given is for instructions with write-after- -;; write dependencies. - -;; The FR400 can only do loads and stores in I0, so we there's no danger -;; of memory unit collision in the same packet. There's only one divide -;; unit too. - -(define_insn_reservation "fr400_i1_int" 1 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "int")) - "fr400_i0|fr400_i1") - -(define_insn_reservation "fr400_i1_sethi" 0 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "sethi")) - "fr400_i0|fr400_i1") - -(define_insn_reservation "fr400_i1_setlo" 1 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "setlo")) - "fr400_i0|fr400_i1") - -(define_insn_reservation "fr400_i1_mul" 3 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mul")) - "fr400_i0") - -(define_insn_reservation "fr400_i1_div" 20 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "div")) - "fr400_i0+idiv1*19") - -(define_insn_reservation "fr400_i2_gload" 4 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "gload")) - "fr400_i0") - -(define_insn_reservation "fr400_i2_fload" 4 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "fload")) - "fr400_i0") - -(define_insn_reservation "fr400_i3_gstore" 0 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "gstore")) - "fr400_i0") - -(define_insn_reservation "fr400_i3_fstore" 0 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "fstore")) - "fr400_i0") - -(define_insn_reservation "fr400_i4_movfg" 3 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "movfg")) - "fr400_i0") - -(define_insn_reservation "fr400_i4_movgf" 3 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "movgf")) - "fr400_i0") - -(define_insn_reservation "fr400_i5_jumpl" 0 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "jumpl")) - "fr400_i0") - -;; The bypass between FPR loads and media instructions, described above. - -(define_bypass 3 - "fr400_i2_fload" - "fr400_m1_1,fr400_m1_2,\ - fr400_m2_1,fr400_m2_2,\ - fr400_m3_1,fr400_m3_2,\ - fr400_m4_1,fr400_m4_2,\ - fr400_m5") - -;; The branch instructions all use the B unit and produce no result. - -(define_insn_reservation "fr400_b" 0 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "jump,branch,ccr,call")) - "fr400_b") - -;; Control instructions use the C unit, which excludes all the others. - -(define_insn_reservation "fr400_c" 0 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "spr,trap")) - "fr400_c") - -;; Unknown instructions use the C unit, since it requires single-operation -;; packets. - -(define_insn_reservation "fr400_unknown" 1 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "unknown,multi")) - "fr400_c") - -;; FP->FP moves are marked as "fsconv" instructions in the define_insns -;; below, but are implemented on the FR400 using "mlogic" instructions. -;; It's easier to class "fsconv" as a "m1:1" instruction than provide -;; separate define_insns for the FR400. - -;; M1 instructions store their results in FPRs. Any instruction can read -;; the result in the following cycle, so no penalty occurs. - -(define_insn_reservation "fr400_m1_1" 1 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "fsconv,mlogic,maveh,msath,maddh,mabsh,mset")) - "fr400_meither") - -(define_insn_reservation "fr400_m1_2" 1 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mqaddh,mqsath")) - "fr400_mboth") - -;; M2 instructions store their results in accumulators, which are read -;; by M2 or M4 media commands. M2 instructions can read the results in -;; the following cycle, but M4 instructions must wait a cycle more. - -(define_bypass 1 - "fr400_m2_1,fr400_m2_2" - "fr400_m2_1,fr400_m2_2") - -(define_insn_reservation "fr400_m2_1" 2 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mmulh,mmulxh,mmach,mmrdh,mcpx,maddacc")) - "fr400_meither") - -(define_insn_reservation "fr400_m2_2" 2 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mqmulh,mqmulxh,mqmach,mqcpx,mdaddacc")) - "fr400_mboth") - -;; For our purposes, there seems to be little real difference between -;; M1 and M3 instructions. Keep them separate anyway in case the distinction -;; is needed later. - -(define_insn_reservation "fr400_m3_1" 1 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mpackh,mrot,mshift,mexpdhw")) - "fr400_meither") - -(define_insn_reservation "fr400_m3_2" 1 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "munpackh,mdpackh,mbhconv,mexpdhd,mwcut,mdrot,mcpl")) - "fr400_mboth") - -;; M4 instructions write to accumulators or FPRs. MOVFG and STF -;; instructions can read an FPR result in the following cycle, but -;; M-unit instructions must wait a cycle more for either kind of result. - -(define_bypass 1 - "fr400_m4_1,fr400_m4_2" - "fr400_i3_fstore,fr400_i4_movfg") - -(define_insn_reservation "fr400_m4_1" 2 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mrdacc,mcut,mclracc")) - "fr400_meither") - -(define_insn_reservation "fr400_m4_2" 2 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mclracca,mdcut")) - "fr400_mboth") - -;; M5 instructions always incur a 1-cycle penalty. - -(define_insn_reservation "fr400_m5" 2 - (and (eq_attr "cpu" "fr400") - (eq_attr "type" "mwtacc")) - "fr400_mboth") - -;; :::::::::::::::::::: -;; :: -;; :: Simple/FR300 scheduler description -;; :: -;; :::::::::::::::::::: - -;; Fr300 or simple processor. To describe it as 1 insn issue -;; processor, we use control unit. - -(define_insn_reservation "fr300_lat1" 1 - (and (eq_attr "cpu" "fr300,simple") - (eq_attr "type" "!gload,fload,movfg,movgf")) - "c") - -(define_insn_reservation "fr300_lat2" 2 - (and (eq_attr "cpu" "fr300,simple") - (eq_attr "type" "gload,fload,movfg,movgf")) - "c") - - -;; :::::::::::::::::::: -;; :: -;; :: Delay Slots -;; :: -;; :::::::::::::::::::: - -;; The insn attribute mechanism can be used to specify the requirements for -;; delay slots, if any, on a target machine. An instruction is said to require -;; a "delay slot" if some instructions that are physically after the -;; instruction are executed as if they were located before it. Classic -;; examples are branch and call instructions, which often execute the following -;; instruction before the branch or call is performed. - -;; On some machines, conditional branch instructions can optionally "annul" -;; instructions in the delay slot. This means that the instruction will not be -;; executed for certain branch outcomes. Both instructions that annul if the -;; branch is true and instructions that annul if the branch is false are -;; supported. - -;; Delay slot scheduling differs from instruction scheduling in that -;; determining whether an instruction needs a delay slot is dependent only -;; on the type of instruction being generated, not on data flow between the -;; instructions. See the next section for a discussion of data-dependent -;; instruction scheduling. - -;; The requirement of an insn needing one or more delay slots is indicated via -;; the `define_delay' expression. It has the following form: -;; -;; (define_delay TEST -;; [DELAY-1 ANNUL-TRUE-1 ANNUL-FALSE-1 -;; DELAY-2 ANNUL-TRUE-2 ANNUL-FALSE-2 -;; ...]) - -;; TEST is an attribute test that indicates whether this `define_delay' applies -;; to a particular insn. If so, the number of required delay slots is -;; determined by the length of the vector specified as the second argument. An -;; insn placed in delay slot N must satisfy attribute test DELAY-N. -;; ANNUL-TRUE-N is an attribute test that specifies which insns may be annulled -;; if the branch is true. Similarly, ANNUL-FALSE-N specifies which insns in -;; the delay slot may be annulled if the branch is false. If annulling is not -;; supported for that delay slot, `(nil)' should be coded. - -;; For example, in the common case where branch and call insns require a single -;; delay slot, which may contain any insn other than a branch or call, the -;; following would be placed in the `md' file: - -;; (define_delay (eq_attr "type" "branch,call") -;; [(eq_attr "type" "!branch,call") (nil) (nil)]) - -;; Multiple `define_delay' expressions may be specified. In this case, each -;; such expression specifies different delay slot requirements and there must -;; be no insn for which tests in two `define_delay' expressions are both true. - -;; For example, if we have a machine that requires one delay slot for branches -;; but two for calls, no delay slot can contain a branch or call insn, and any -;; valid insn in the delay slot for the branch can be annulled if the branch is -;; true, we might represent this as follows: - -;; (define_delay (eq_attr "type" "branch") -;; [(eq_attr "type" "!branch,call") -;; (eq_attr "type" "!branch,call") -;; (nil)]) -;; -;; (define_delay (eq_attr "type" "call") -;; [(eq_attr "type" "!branch,call") (nil) (nil) -;; (eq_attr "type" "!branch,call") (nil) (nil)]) - -;; Note - it is the backend's responsibility to fill any unfilled delay slots -;; at assembler generation time. This is usually done by adding a special print -;; operand to the delayed instruction, and then in the PRINT_OPERAND function -;; calling dbr_sequence_length() to determine how many delay slots were filled. -;; For example: -;; -;; --------------.md----------------- -;; (define_insn "call" -;; [(call (match_operand 0 "memory_operand" "m") -;; (match_operand 1 "" ""))] -;; "" -;; "call_delayed %0,%1,%2%#" -;; [(set_attr "length" "4") -;; (set_attr "type" "call")]) -;; -;; -------------.h------------------- -;; #define PRINT_OPERAND_PUNCT_VALID_P(CODE) (CODE == '#') -;; -;; ------------.c------------------ -;; void -;; machine_print_operand (file, x, code) -;; FILE * file; -;; rtx x; -;; int code; -;; { -;; switch (code) -;; { -;; case '#': -;; if (dbr_sequence_length () == 0) -;; fputs ("\n\tnop", file); -;; return; - -;; :::::::::::::::::::: -;; :: -;; :: Notes on Patterns -;; :: -;; :::::::::::::::::::: - -;; If you need to construct a sequence of assembler instructions in order -;; to implement a pattern be sure to escape any backslashes and double quotes -;; that you use, eg: -;; -;; (define_insn "an example" -;; [(some rtl)] -;; "" -;; "* -;; { static char buffer [100]; -;; sprintf (buffer, \"insn \\t %d\", REGNO (operands[1])); -;; return buffer; -;; }" -;; ) -;; -;; Also if there is more than one instruction, they can be separated by \\; -;; which is a space saving synonym for \\n\\t: -;; -;; (define_insn "another example" -;; [(some rtl)] -;; "" -;; "* -;; { static char buffer [100]; -;; sprintf (buffer, \"insn1 \\t %d\\;insn2 \\t %%1\", -;; REGNO (operands[1])); -;; return buffer; -;; }" -;; ) -;; - - -;; :::::::::::::::::::: -;; :: -;; :: Moves -;; :: -;; :::::::::::::::::::: - -;; Wrap moves in define_expand to prevent memory->memory moves from being -;; generated at the RTL level, which generates better code for most machines -;; which can't do mem->mem moves. - -;; If operand 0 is a `subreg' with mode M of a register whose own mode is wider -;; than M, the effect of this instruction is to store the specified value in -;; the part of the register that corresponds to mode M. The effect on the rest -;; of the register is undefined. - -;; This class of patterns is special in several ways. First of all, each of -;; these names *must* be defined, because there is no other way to copy a datum -;; from one place to another. - -;; Second, these patterns are not used solely in the RTL generation pass. Even -;; the reload pass can generate move insns to copy values from stack slots into -;; temporary registers. When it does so, one of the operands is a hard -;; register and the other is an operand that can need to be reloaded into a -;; register. - -;; Therefore, when given such a pair of operands, the pattern must -;; generate RTL which needs no reloading and needs no temporary -;; registers--no registers other than the operands. For example, if -;; you support the pattern with a `define_expand', then in such a -;; case the `define_expand' mustn't call `force_reg' or any other such -;; function which might generate new pseudo registers. - -;; This requirement exists even for subword modes on a RISC machine -;; where fetching those modes from memory normally requires several -;; insns and some temporary registers. Look in `spur.md' to see how -;; the requirement can be satisfied. - -;; During reload a memory reference with an invalid address may be passed as an -;; operand. Such an address will be replaced with a valid address later in the -;; reload pass. In this case, nothing may be done with the address except to -;; use it as it stands. If it is copied, it will not be replaced with a valid -;; address. No attempt should be made to make such an address into a valid -;; address and no routine (such as `change_address') that will do so may be -;; called. Note that `general_operand' will fail when applied to such an -;; address. -;; -;; The global variable `reload_in_progress' (which must be explicitly declared -;; if required) can be used to determine whether such special handling is -;; required. -;; -;; The variety of operands that have reloads depends on the rest of -;; the machine description, but typically on a RISC machine these can -;; only be pseudo registers that did not get hard registers, while on -;; other machines explicit memory references will get optional -;; reloads. -;; -;; If a scratch register is required to move an object to or from memory, it -;; can be allocated using `gen_reg_rtx' prior to reload. But this is -;; impossible during and after reload. If there are cases needing scratch -;; registers after reload, you must define `SECONDARY_INPUT_RELOAD_CLASS' and -;; perhaps also `SECONDARY_OUTPUT_RELOAD_CLASS' to detect them, and provide -;; patterns `reload_inM' or `reload_outM' to handle them. - -;; The constraints on a `moveM' must permit moving any hard register to any -;; other hard register provided that `HARD_REGNO_MODE_OK' permits mode M in -;; both registers and `REGISTER_MOVE_COST' applied to their classes returns a -;; value of 2. - -;; It is obligatory to support floating point `moveM' instructions -;; into and out of any registers that can hold fixed point values, -;; because unions and structures (which have modes `SImode' or -;; `DImode') can be in those registers and they may have floating -;; point members. - -;; There may also be a need to support fixed point `moveM' instructions in and -;; out of floating point registers. Unfortunately, I have forgotten why this -;; was so, and I don't know whether it is still true. If `HARD_REGNO_MODE_OK' -;; rejects fixed point values in floating point registers, then the constraints -;; of the fixed point `moveM' instructions must be designed to avoid ever -;; trying to reload into a floating point register. - -(define_expand "movqi" - [(set (match_operand:QI 0 "general_operand" "") - (match_operand:QI 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress - && !reload_completed - && !register_operand (operands[0], QImode) - && !reg_or_0_operand (operands[1], QImode)) - operands[1] = copy_to_mode_reg (QImode, operands[1]); -}") - -(define_insn "*movqi_load" - [(set (match_operand:QI 0 "register_operand" "=d,f") - (match_operand:QI 1 "frv_load_operand" "m,m"))] - "" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "gload,fload")]) - -(define_insn "*movqi_internal" - [(set (match_operand:QI 0 "move_destination_operand" "=d,d,m,m,?f,?f,?d,?m,f") - (match_operand:QI 1 "move_source_operand" "L,d,d,O, d, f, f, f,GO"))] - "register_operand(operands[0], QImode) || reg_or_0_operand (operands[1], QImode)" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "int,int,gstore,gstore,movgf,fsconv,movfg,fstore,movgf")]) - -(define_expand "movhi" - [(set (match_operand:HI 0 "general_operand" "") - (match_operand:HI 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress - && !reload_completed - && !register_operand (operands[0], HImode) - && !reg_or_0_operand (operands[1], HImode)) - operands[1] = copy_to_mode_reg (HImode, operands[1]); -}") - -(define_insn "*movhi_load" - [(set (match_operand:HI 0 "register_operand" "=d,f") - (match_operand:HI 1 "frv_load_operand" "m,m"))] - "" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "gload,fload")]) - -(define_insn "*movhi_internal" - [(set (match_operand:HI 0 "move_destination_operand" "=d,d,d,m,m,?f,?f,?d,?m,f") - (match_operand:HI 1 "move_source_operand" "L,i,d,d,O, d, f, f, f,GO"))] - "register_operand(operands[0], HImode) || reg_or_0_operand (operands[1], HImode)" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4,8,4,4,4,4,4,4,4,4") - (set_attr "type" "int,multi,int,gstore,gstore,movgf,fsconv,movfg,fstore,movgf")]) - -;; Split 2 word load of constants into sethi/setlo instructions -(define_split - [(set (match_operand:HI 0 "integer_register_operand" "") - (match_operand:HI 1 "int_2word_operand" ""))] - "reload_completed" - [(set (match_dup 0) - (high:HI (match_dup 1))) - (set (match_dup 0) - (lo_sum:HI (match_dup 0) - (match_dup 1)))] - "") - -(define_insn "movhi_high" - [(set (match_operand:HI 0 "integer_register_operand" "=d") - (high:HI (match_operand:HI 1 "int_2word_operand" "i")))] - "" - "sethi #hi(%1), %0" - [(set_attr "type" "sethi") - (set_attr "length" "4")]) - -(define_insn "movhi_lo_sum" - [(set (match_operand:HI 0 "integer_register_operand" "+d") - (lo_sum:HI (match_dup 0) - (match_operand:HI 1 "int_2word_operand" "i")))] - "" - "setlo #lo(%1), %0" - [(set_attr "type" "setlo") - (set_attr "length" "4")]) - -(define_expand "movsi" - [(set (match_operand:SI 0 "move_destination_operand" "") - (match_operand:SI 1 "move_source_operand" ""))] - "" - " -{ - if (frv_emit_movsi (operands[0], operands[1])) - DONE; -}") - -;; Note - it is best to only have one movsi pattern and to handle -;; all the various contingencies by the use of alternatives. This -;; allows reload the greatest amount of flexibility (since reload will -;; only choose amoungst alternatives for a selected insn, it will not -;; replace the insn with another one). - -;; Unfortunately, we do have to separate out load-type moves from the rest, -;; and only allow memory source operands in the former. If we do memory and -;; constant loads in a single pattern, reload will be tempted to force -;; constants into memory when the destination is a floating-point register. -;; That may make a function use a PIC pointer when it didn't before, and we -;; cannot change PIC usage (and hence stack layout) so late in the game. -;; The resulting sequences for loading constants into FPRs are preferable -;; even when we're not generating PIC code. - -(define_insn "*movsi_load" - [(set (match_operand:SI 0 "register_operand" "=d,f") - (match_operand:SI 1 "frv_load_operand" "m,m"))] - "" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "gload,fload")]) - -(define_insn "*movsi_internal" - [(set (match_operand:SI 0 "move_destination_operand" "=d,d,d,m,m,z,d,d,f,f,m,?f,?z") - (match_operand:SI 1 "move_source_operand" "LQ,i,d,d,O,d,z,f,d,f,f,GO,GO"))] - "register_operand (operands[0], SImode) || reg_or_0_operand (operands[1], SImode)" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4,8,4,4,4,4,4,4,4,4,4,4,4") - (set_attr "type" "int,multi,int,gstore,gstore,spr,spr,movfg,movgf,fsconv,fstore,movgf,spr")]) - -(define_insn "*movsi_lda_sdata" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (plus:SI (match_operand:SI 1 "small_data_register_operand" "d") - (match_operand:SI 2 "small_data_symbolic_operand" "Q")))] - "" - "addi %1, #gprel12(%2), %0" - [(set_attr "type" "int") - (set_attr "length" "4")]) - -;; Split 2 word load of constants into sethi/setlo instructions -(define_split - [(set (match_operand:SI 0 "integer_register_operand" "") - (match_operand:SI 1 "int_2word_operand" ""))] - "reload_completed" - [(set (match_dup 0) - (high:SI (match_dup 1))) - (set (match_dup 0) - (lo_sum:SI (match_dup 0) - (match_dup 1)))] - "") - -(define_insn "movsi_high" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (high:SI (match_operand:SI 1 "int_2word_operand" "i")))] - "" - "sethi #hi(%1), %0" - [(set_attr "type" "sethi") - (set_attr "length" "4")]) - -(define_insn "movsi_lo_sum" - [(set (match_operand:SI 0 "integer_register_operand" "+d") - (lo_sum:SI (match_dup 0) - (match_operand:SI 1 "int_2word_operand" "i")))] - "" - "setlo #lo(%1), %0" - [(set_attr "type" "setlo") - (set_attr "length" "4")]) - -;; Split loads of addresses with PIC specified into 3 separate instructions -(define_insn_and_split "*movsi_pic" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (plus:SI (match_operand:SI 1 "pic_register_operand" "d") - (match_operand:SI 2 "pic_symbolic_operand" "")))] - "" - "#" - "reload_completed" - [(set (match_dup 0) - (high:SI (match_dup 2))) - (set (match_dup 0) - (lo_sum:SI (match_dup 0) - (match_dup 2))) - (set (match_dup 0) - (plus:SI (match_dup 0) (match_dup 1)))] - - "" - [(set_attr "type" "multi") - (set_attr "length" "12")]) - -(define_insn "movsi_high_pic" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (high:SI (match_operand:SI 1 "pic_symbolic_operand" "")))] - "" - "sethi #gprelhi(%1), %0" - [(set_attr "type" "sethi") - (set_attr "length" "4")]) - -(define_insn "movsi_lo_sum_pic" - [(set (match_operand:SI 0 "integer_register_operand" "+d") - (lo_sum:SI (match_dup 0) - (match_operand:SI 1 "pic_symbolic_operand" "")))] - "" - "setlo #gprello(%1), %0" - [(set_attr "type" "setlo") - (set_attr "length" "4")]) - -(define_expand "movdi" - [(set (match_operand:DI 0 "nonimmediate_operand" "") - (match_operand:DI 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress - && !reload_completed - && !register_operand (operands[0], DImode) - && !reg_or_0_operand (operands[1], DImode)) - operands[1] = copy_to_mode_reg (DImode, operands[1]); -}") - -(define_insn "*movdi_double" - [(set (match_operand:DI 0 "move_destination_operand" "=e,?h,??d,??f,R,?R,??m,??m,e,?h,??d,??f,?e,??d,?h,??f,R,m,e,??d,e,??d,?h,??f") - (match_operand:DI 1 "move_source_operand" " e,h,d,f,e,h,d,f,R,R,m,m,h,f,e,d,GO,GO,GO,GO,nF,nF,GO,GO"))] - "TARGET_DOUBLE - && (register_operand (operands[0], DImode) - || reg_or_0_operand (operands[1], DImode))" - "* return output_move_double (operands, insn);" - [(set_attr "length" "8,4,8,8,4,4,8,8,4,4,8,8,4,8,4,8,4,8,8,8,16,16,8,8") - (set_attr "type" "multi,fdconv,multi,multi,gstore,fstore,gstore,fstore,gload,fload,gload,fload,movfg,movfg,movgf,movgf,gstore,gstore,multi,multi,multi,multi,movgf,movgf")]) - -(define_insn "*movdi_nodouble" - [(set (match_operand:DI 0 "move_destination_operand" "=e,?h,??d,??f,R,?R,??m,??m,e,?h,??d,??f,?e,??d,?h,??f,R,m,e,??d,e,??d,?h,??f") - (match_operand:DI 1 "move_source_operand" " e,h,d,f,e,h,d,f,R,R,m,m,h,f,e,d,GO,GO,GO,GO,nF,nF,GO,GO"))] - "!TARGET_DOUBLE - && (register_operand (operands[0], DImode) - || reg_or_0_operand (operands[1], DImode))" - "* return output_move_double (operands, insn);" - [(set_attr "length" "8,8,8,8,4,4,8,8,4,4,8,8,8,8,8,8,4,8,8,8,16,16,8,8") - (set_attr "type" "multi,multi,multi,multi,gstore,fstore,gstore,fstore,gload,fload,gload,fload,movfg,movfg,movgf,movgf,gstore,gstore,multi,multi,multi,multi,movgf,movgf")]) - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "dbl_memory_two_insn_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_load (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DI 0 "odd_reg_operand" "") - (match_operand:DI 1 "memory_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_load (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DI 0 "dbl_memory_two_insn_operand" "") - (match_operand:DI 1 "reg_or_0_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_store (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DI 0 "memory_operand" "") - (match_operand:DI 1 "odd_reg_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_store (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "register_operand" ""))] - "reload_completed - && (odd_reg_operand (operands[0], DImode) - || odd_reg_operand (operands[1], DImode) - || (integer_register_operand (operands[0], DImode) - && integer_register_operand (operands[1], DImode)) - || (!TARGET_DOUBLE - && fpr_operand (operands[0], DImode) - && fpr_operand (operands[1], DImode)))" - [(set (match_dup 2) (match_dup 4)) - (set (match_dup 3) (match_dup 5))] - " -{ - rtx op0 = operands[0]; - rtx op0_low = gen_lowpart (SImode, op0); - rtx op0_high = gen_highpart (SImode, op0); - rtx op1 = operands[1]; - rtx op1_low = gen_lowpart (SImode, op1); - rtx op1_high = gen_highpart (SImode, op1); - - /* We normally copy the low-numbered register first. However, if the first - register operand 0 is the same as the second register of operand 1, we - must copy in the opposite order. */ - - if (REGNO (op0_high) == REGNO (op1_low)) - { - operands[2] = op0_low; - operands[3] = op0_high; - operands[4] = op1_low; - operands[5] = op1_high; - } - else - { - operands[2] = op0_high; - operands[3] = op0_low; - operands[4] = op1_high; - operands[5] = op1_low; - } -}") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "const_int_operand" ""))] - "reload_completed" - [(set (match_dup 2) (match_dup 4)) - (set (match_dup 3) (match_dup 1))] - " -{ - rtx op0 = operands[0]; - rtx op1 = operands[1]; - - operands[2] = gen_highpart (SImode, op0); - operands[3] = gen_lowpart (SImode, op0); - operands[4] = GEN_INT ((INTVAL (op1) < 0) ? -1 : 0); -}") - -(define_split - [(set (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "const_double_operand" ""))] - "reload_completed" - [(set (match_dup 2) (match_dup 4)) - (set (match_dup 3) (match_dup 5))] - " -{ - rtx op0 = operands[0]; - rtx op1 = operands[1]; - - operands[2] = gen_highpart (SImode, op0); - operands[3] = gen_lowpart (SImode, op0); - operands[4] = GEN_INT (CONST_DOUBLE_HIGH (op1)); - operands[5] = GEN_INT (CONST_DOUBLE_LOW (op1)); -}") - -;; Floating Point Moves -;; -;; Note - Patterns for SF mode moves are compulsory, but -;; patterns for DF are optional, as GCC can synthesize them. - -(define_expand "movsf" - [(set (match_operand:SF 0 "general_operand" "") - (match_operand:SF 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress - && !reload_completed - && !register_operand (operands[0], SFmode) - && !reg_or_0_operand (operands[1], SFmode)) - operands[1] = copy_to_mode_reg (SFmode, operands[1]); -}") - -(define_split - [(set (match_operand:SF 0 "integer_register_operand" "") - (match_operand:SF 1 "int_2word_operand" ""))] - "reload_completed" - [(set (match_dup 0) - (high:SF (match_dup 1))) - (set (match_dup 0) - (lo_sum:SF (match_dup 0) - (match_dup 1)))] - "") - -(define_insn "*movsf_load_has_fprs" - [(set (match_operand:SF 0 "register_operand" "=f,d") - (match_operand:SF 1 "frv_load_operand" "m,m"))] - "TARGET_HAS_FPRS" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "fload,gload")]) - -(define_insn "*movsf_internal_has_fprs" - [(set (match_operand:SF 0 "move_destination_operand" "=f,f,m,m,?f,?d,?d,m,?d") - (match_operand:SF 1 "move_source_operand" "f,OG,f,OG,d,f,d,d,F"))] - "TARGET_HAS_FPRS - && (register_operand (operands[0], SFmode) || reg_or_0_operand (operands[1], SFmode))" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4,4,4,4,4,4,4,4,8") - (set_attr "type" "fsconv,movgf,fstore,gstore,movgf,movfg,int,gstore,multi")]) - -;; If we don't support the double instructions, prefer gprs over fprs, since it -;; will all be emulated -(define_insn "*movsf_internal_no_fprs" - [(set (match_operand:SF 0 "move_destination_operand" "=d,d,m,d,d") - (match_operand:SF 1 "move_source_operand" " d,OG,dOG,m,F"))] - "!TARGET_HAS_FPRS - && (register_operand (operands[0], SFmode) || reg_or_0_operand (operands[1], SFmode))" - "* return output_move_single (operands, insn);" - [(set_attr "length" "4,4,4,4,8") - (set_attr "type" "int,int,gstore,gload,multi")]) - -(define_insn "movsf_high" - [(set (match_operand:SF 0 "integer_register_operand" "=d") - (high:SF (match_operand:SF 1 "int_2word_operand" "i")))] - "" - "sethi #hi(%1), %0" - [(set_attr "type" "sethi") - (set_attr "length" "4")]) - -(define_insn "movsf_lo_sum" - [(set (match_operand:SF 0 "integer_register_operand" "+d") - (lo_sum:SF (match_dup 0) - (match_operand:SF 1 "int_2word_operand" "i")))] - "" - "setlo #lo(%1), %0" - [(set_attr "type" "setlo") - (set_attr "length" "4")]) - -(define_expand "movdf" - [(set (match_operand:DF 0 "nonimmediate_operand" "") - (match_operand:DF 1 "general_operand" ""))] - "" - " -{ - if (!reload_in_progress - && !reload_completed - && !register_operand (operands[0], DFmode) - && !reg_or_0_operand (operands[1], DFmode)) - operands[1] = copy_to_mode_reg (DFmode, operands[1]); -}") - -(define_insn "*movdf_double" - [(set (match_operand:DF 0 "move_destination_operand" "=h,?e,??f,??d,R,?R,??m,??m,h,?e,??f,??d,?h,??f,?e,??d,R,m,h,??f,e,??d") - (match_operand:DF 1 "move_source_operand" " h,e,f,d,h,e,f,d,R,R,m,m,e,d,h,f,GO,GO,GO,GO,GO,GO"))] - "TARGET_DOUBLE - && (register_operand (operands[0], DFmode) - || reg_or_0_operand (operands[1], DFmode))" - "* return output_move_double (operands, insn);" - [(set_attr "length" "4,8,8,8,4,4,8,8,4,4,8,8,4,8,4,8,4,8,8,8,8,8") - (set_attr "type" "fdconv,multi,multi,multi,fstore,gstore,fstore,gstore,fload,gload,fload,gload,movgf,movgf,movfg,movfg,gstore,gstore,movgf,movgf,multi,multi")]) - -;; If we don't support the double instructions, prefer gprs over fprs, since it -;; will all be emulated -(define_insn "*movdf_nodouble" - [(set (match_operand:DF 0 "move_destination_operand" "=e,?h,??d,??f,R,?R,??m,??m,e,?h,??d,??f,?e,??d,?h,??f,R,m,e,??d,e,??d,?h,??f") - (match_operand:DF 1 "move_source_operand" " e,h,d,f,e,h,d,f,R,R,m,m,h,f,e,d,GO,GO,GO,GO,nF,nF,GO,GO"))] - "!TARGET_DOUBLE - && (register_operand (operands[0], DFmode) - || reg_or_0_operand (operands[1], DFmode))" - "* return output_move_double (operands, insn);" - [(set_attr "length" "8,8,8,8,4,4,8,8,4,4,8,8,8,8,8,8,4,8,8,8,16,16,8,8") - (set_attr "type" "multi,multi,multi,multi,gstore,fstore,gstore,fstore,gload,fload,gload,fload,movfg,movfg,movgf,movgf,gstore,gstore,multi,multi,multi,multi,movgf,movgf")]) - -(define_split - [(set (match_operand:DF 0 "register_operand" "") - (match_operand:DF 1 "dbl_memory_two_insn_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_load (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DF 0 "odd_reg_operand" "") - (match_operand:DF 1 "memory_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_load (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DF 0 "dbl_memory_two_insn_operand" "") - (match_operand:DF 1 "reg_or_0_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_store (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DF 0 "memory_operand" "") - (match_operand:DF 1 "odd_reg_operand" ""))] - "reload_completed" - [(const_int 0)] - "frv_split_double_store (operands[0], operands[1]);") - -(define_split - [(set (match_operand:DF 0 "register_operand" "") - (match_operand:DF 1 "register_operand" ""))] - "reload_completed - && (odd_reg_operand (operands[0], DFmode) - || odd_reg_operand (operands[1], DFmode) - || (integer_register_operand (operands[0], DFmode) - && integer_register_operand (operands[1], DFmode)) - || (!TARGET_DOUBLE - && fpr_operand (operands[0], DFmode) - && fpr_operand (operands[1], DFmode)))" - [(set (match_dup 2) (match_dup 4)) - (set (match_dup 3) (match_dup 5))] - " -{ - rtx op0 = operands[0]; - rtx op0_low = gen_lowpart (SImode, op0); - rtx op0_high = gen_highpart (SImode, op0); - rtx op1 = operands[1]; - rtx op1_low = gen_lowpart (SImode, op1); - rtx op1_high = gen_highpart (SImode, op1); - - /* We normally copy the low-numbered register first. However, if the first - register operand 0 is the same as the second register of operand 1, we - must copy in the opposite order. */ - - if (REGNO (op0_high) == REGNO (op1_low)) - { - operands[2] = op0_low; - operands[3] = op0_high; - operands[4] = op1_low; - operands[5] = op1_high; - } - else - { - operands[2] = op0_high; - operands[3] = op0_low; - operands[4] = op1_high; - operands[5] = op1_low; - } -}") - -(define_split - [(set (match_operand:DF 0 "register_operand" "") - (match_operand:DF 1 "const_int_operand" ""))] - "reload_completed" - [(set (match_dup 2) (match_dup 4)) - (set (match_dup 3) (match_dup 1))] - " -{ - rtx op0 = operands[0]; - rtx op1 = operands[1]; - - operands[2] = gen_highpart (SImode, op0); - operands[3] = gen_lowpart (SImode, op0); - operands[4] = GEN_INT ((INTVAL (op1) < 0) ? -1 : 0); -}") - -(define_split - [(set (match_operand:DF 0 "register_operand" "") - (match_operand:DF 1 "const_double_operand" ""))] - "reload_completed" - [(set (match_dup 2) (match_dup 4)) - (set (match_dup 3) (match_dup 5))] - " -{ - rtx op0 = operands[0]; - rtx op1 = operands[1]; - REAL_VALUE_TYPE rv; - long l[2]; - - REAL_VALUE_FROM_CONST_DOUBLE (rv, op1); - REAL_VALUE_TO_TARGET_DOUBLE (rv, l); - - operands[2] = gen_highpart (SImode, op0); - operands[3] = gen_lowpart (SImode, op0); - operands[4] = GEN_INT (l[0]); - operands[5] = GEN_INT (l[1]); -}") - -;; String/block move insn. -;; Argument 0 is the destination -;; Argument 1 is the source -;; Argument 2 is the length -;; Argument 3 is the alignment - -(define_expand "movstrsi" - [(parallel [(set (match_operand:BLK 0 "" "") - (match_operand:BLK 1 "" "")) - (use (match_operand:SI 2 "" "")) - (use (match_operand:SI 3 "" ""))])] - "" - " -{ - if (frv_expand_block_move (operands)) - DONE; - else - FAIL; -}") - -;; String/block clear insn. -;; Argument 0 is the destination -;; Argument 1 is the length -;; Argument 2 is the alignment - -(define_expand "clrstrsi" - [(parallel [(set (match_operand:BLK 0 "" "") - (const_int 0)) - (use (match_operand:SI 1 "" "")) - (use (match_operand:SI 2 "" ""))])] - "" - " -{ - if (frv_expand_block_clear (operands)) - DONE; - else - FAIL; -}") - - -;; :::::::::::::::::::: -;; :: -;; :: Reload CC registers -;; :: -;; :::::::::::::::::::: - -;; Use as a define_expand so that cse/gcse/combine can't accidentally -;; create movcc insns. - -(define_expand "movcc" - [(parallel [(set (match_operand:CC 0 "move_destination_operand" "") - (match_operand:CC 1 "move_source_operand" "")) - (clobber (match_dup 2))])] - "" - " -{ - if (! reload_in_progress && ! reload_completed) - FAIL; - - operands[2] = gen_rtx_REG (CC_CCRmode, ICR_TEMP); -}") - -(define_insn "*internal_movcc" - [(set (match_operand:CC 0 "move_destination_operand" "=t,d,d,m,d") - (match_operand:CC 1 "move_source_operand" "d,d,m,d,t")) - (clobber (match_scratch:CC_CCR 2 "=X,X,X,X,&v"))] - "reload_in_progress || reload_completed" - "@ - cmpi %1, #0, %0 - mov %1, %0 - ld%I1%U1 %M1, %0 - st%I0%U0 %1, %M0 - #" - [(set_attr "length" "4,4,4,4,20") - (set_attr "type" "int,int,gload,gstore,multi")]) - -;; To move an ICC value to a GPR for a signed comparison, we create a value -;; that when compared to 0, sets the N and Z flags appropriately (we don't care -;; about the V and C flags, since these comparisons are signed). - -(define_split - [(set (match_operand:CC 0 "integer_register_operand" "") - (match_operand:CC 1 "icc_operand" "")) - (clobber (match_operand:CC_CCR 2 "icr_operand" ""))] - "reload_in_progress || reload_completed" - [(match_dup 3)] - " -{ - rtx dest = simplify_gen_subreg (SImode, operands[0], CCmode, 0); - rtx icc = operands[1]; - rtx icr = operands[2]; - - start_sequence (); - - emit_insn (gen_rtx_SET (VOIDmode, icr, - gen_rtx_LT (CC_CCRmode, icc, const0_rtx))); - - emit_insn (gen_movsi (dest, const1_rtx)); - - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (CC_CCRmode, icr, const0_rtx), - gen_rtx_SET (VOIDmode, dest, - gen_rtx_NEG (SImode, dest)))); - - emit_insn (gen_rtx_SET (VOIDmode, icr, - gen_rtx_EQ (CC_CCRmode, icc, const0_rtx))); - - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (CC_CCRmode, icr, const0_rtx), - gen_rtx_SET (VOIDmode, dest, const0_rtx))); - - operands[3] = get_insns (); - end_sequence (); -}") - -(define_expand "reload_incc" - [(parallel [(set (match_operand:CC 2 "integer_register_operand" "=&d") - (match_operand:CC 1 "memory_operand" "m")) - (clobber (match_scratch:CC_CCR 3 ""))]) - (parallel [(set (match_operand:CC 0 "icc_operand" "=t") - (match_dup 2)) - (clobber (match_scratch:CC_CCR 4 ""))])] - "" - "") - -(define_expand "reload_outcc" - [(parallel [(set (match_operand:CC 2 "integer_register_operand" "=&d") - (match_operand:CC 1 "icc_operand" "t")) - (clobber (match_dup 3))]) - (parallel [(set (match_operand:CC 0 "memory_operand" "=m") - (match_dup 2)) - (clobber (match_scratch:CC_CCR 4 ""))])] - "" - "operands[3] = gen_rtx_REG (CC_CCRmode, ICR_TEMP);") - -;; Reload CC_UNSmode for unsigned integer comparisons -;; Use define_expand so that cse/gcse/combine can't create movcc_uns insns - -(define_expand "movcc_uns" - [(parallel [(set (match_operand:CC_UNS 0 "move_destination_operand" "") - (match_operand:CC_UNS 1 "move_source_operand" "")) - (clobber (match_dup 2))])] - "" - " -{ - if (! reload_in_progress && ! reload_completed) - FAIL; - operands[2] = gen_rtx_REG (CC_CCRmode, ICR_TEMP); -}") - -(define_insn "*internal_movcc_uns" - [(set (match_operand:CC_UNS 0 "move_destination_operand" "=t,d,d,m,d") - (match_operand:CC_UNS 1 "move_source_operand" "d,d,m,d,t")) - (clobber (match_scratch:CC_CCR 2 "=X,X,X,X,&v"))] - "reload_in_progress || reload_completed" - "@ - cmpi %1, #1, %0 - mov %1, %0 - ld%I1%U1 %M1, %0 - st%I0%U0 %1, %M0 - #" - [(set_attr "length" "4,4,4,4,20") - (set_attr "type" "int,int,gload,gstore,multi")]) - -;; To move an ICC value to a GPR for an unsigned comparison, we create a value -;; that when compared to 1, sets the Z, V, and C flags appropriately (we don't -;; care about the N flag, since these comparisons are unsigned). - -(define_split - [(set (match_operand:CC_UNS 0 "integer_register_operand" "") - (match_operand:CC_UNS 1 "icc_operand" "")) - (clobber (match_operand:CC_CCR 2 "icr_operand" ""))] - "reload_in_progress || reload_completed" - [(match_dup 3)] - " -{ - rtx dest = simplify_gen_subreg (SImode, operands[0], CC_UNSmode, 0); - rtx icc = operands[1]; - rtx icr = operands[2]; - - start_sequence (); - - emit_insn (gen_rtx_SET (VOIDmode, icr, - gen_rtx_GTU (CC_CCRmode, icc, const0_rtx))); - - emit_insn (gen_movsi (dest, const1_rtx)); - - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (CC_CCRmode, icr, const0_rtx), - gen_addsi3 (dest, dest, dest))); - - emit_insn (gen_rtx_SET (VOIDmode, icr, - gen_rtx_LTU (CC_CCRmode, icc, const0_rtx))); - - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_NE (CC_CCRmode, icr, const0_rtx), - gen_rtx_SET (VOIDmode, dest, const0_rtx))); - - operands[3] = get_insns (); - end_sequence (); -}") - -(define_expand "reload_incc_uns" - [(parallel [(set (match_operand:CC_UNS 2 "integer_register_operand" "=&d") - (match_operand:CC_UNS 1 "memory_operand" "m")) - (clobber (match_scratch:CC_CCR 3 ""))]) - (parallel [(set (match_operand:CC_UNS 0 "icc_operand" "=t") - (match_dup 2)) - (clobber (match_scratch:CC_CCR 4 ""))])] - "" - "") - -(define_expand "reload_outcc_uns" - [(parallel [(set (match_operand:CC_UNS 2 "integer_register_operand" "=&d") - (match_operand:CC_UNS 1 "icc_operand" "t")) - (clobber (match_dup 3))]) - (parallel [(set (match_operand:CC_UNS 0 "memory_operand" "=m") - (match_dup 2)) - (clobber (match_scratch:CC_CCR 4 ""))])] - "" - "operands[3] = gen_rtx_REG (CC_CCRmode, ICR_TEMP);") - -;; Reload CC_FPmode for floating point comparisons -;; We use a define_expand here so that cse/gcse/combine can't accidentally -;; create movcc insns. If this was a named define_insn, we would not be able -;; to make it conditional on reload. - -(define_expand "movcc_fp" - [(set (match_operand:CC_FP 0 "move_destination_operand" "") - (match_operand:CC_FP 1 "move_source_operand" ""))] - "TARGET_HAS_FPRS" - " -{ - if (! reload_in_progress && ! reload_completed) - FAIL; -}") - -(define_insn "*movcc_fp_internal" - [(set (match_operand:CC_FP 0 "move_destination_operand" "=d,d,d,m") - (match_operand:CC_FP 1 "move_source_operand" "u,d,m,d"))] - "TARGET_HAS_FPRS && (reload_in_progress || reload_completed)" - "@ - # - mov %1, %0 - ld%I1%U1 %M1, %0 - st%I0%U0 %1, %M0" - [(set_attr "length" "12,4,4,4") - (set_attr "type" "multi,int,gload,gstore")]) - - -(define_expand "reload_incc_fp" - [(match_operand:CC_FP 0 "fcc_operand" "=u") - (match_operand:CC_FP 1 "memory_operand" "m") - (match_operand:TI 2 "integer_register_operand" "=&d")] - "TARGET_HAS_FPRS" - " -{ - rtx cc_op2 = simplify_gen_subreg (CC_FPmode, operands[2], TImode, 0); - rtx int_op2 = simplify_gen_subreg (SImode, operands[2], TImode, 0); - rtx temp1 = simplify_gen_subreg (SImode, operands[2], TImode, 4); - rtx temp2 = simplify_gen_subreg (SImode, operands[2], TImode, 8); - int shift = CC_SHIFT_RIGHT (REGNO (operands[0])); - HOST_WIDE_INT mask; - - emit_insn (gen_movcc_fp (cc_op2, operands[1])); - if (shift) - emit_insn (gen_ashlsi3 (int_op2, int_op2, GEN_INT (shift))); - - mask = ~ ((HOST_WIDE_INT)CC_MASK << shift); - emit_insn (gen_movsi (temp1, GEN_INT (mask))); - emit_insn (gen_update_fcc (operands[0], int_op2, temp1, temp2)); - DONE; -}") - -(define_expand "reload_outcc_fp" - [(set (match_operand:CC_FP 2 "integer_register_operand" "=&d") - (match_operand:CC_FP 1 "fcc_operand" "u")) - (set (match_operand:CC_FP 0 "memory_operand" "=m") - (match_dup 2))] - "TARGET_HAS_FPRS" - "") - -;; Convert a FCC value to gpr -(define_insn "read_fcc" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (unspec:SI [(match_operand:CC_FP 1 "fcc_operand" "u")] - UNSPEC_CC_TO_GPR))] - "TARGET_HAS_FPRS" - "movsg ccr, %0" - [(set_attr "type" "spr") - (set_attr "length" "4")]) - -(define_split - [(set (match_operand:CC_FP 0 "integer_register_operand" "") - (match_operand:CC_FP 1 "fcc_operand" ""))] - "reload_completed && TARGET_HAS_FPRS" - [(match_dup 2)] - " -{ - rtx int_op0 = simplify_gen_subreg (SImode, operands[0], CC_FPmode, 0); - int shift = CC_SHIFT_RIGHT (REGNO (operands[1])); - - start_sequence (); - - emit_insn (gen_read_fcc (int_op0, operands[1])); - if (shift) - emit_insn (gen_lshrsi3 (int_op0, int_op0, GEN_INT (shift))); - - emit_insn (gen_andsi3 (int_op0, int_op0, GEN_INT (CC_MASK))); - - operands[2] = get_insns (); - end_sequence (); -}") - -;; Move a gpr value to FCC. -;; Operand0 = FCC -;; Operand1 = reloaded value shifted appropriately -;; Operand2 = mask to eliminate current register -;; Operand3 = temporary to load/store ccr -(define_insn "update_fcc" - [(set (match_operand:CC_FP 0 "fcc_operand" "=u") - (unspec:CC_FP [(match_operand:SI 1 "integer_register_operand" "d") - (match_operand:SI 2 "integer_register_operand" "d")] - UNSPEC_GPR_TO_CC)) - (clobber (match_operand:SI 3 "integer_register_operand" "=&d"))] - "TARGET_HAS_FPRS" - "movsg ccr, %3\;and %2, %3, %3\;or %1, %3, %3\;movgs %3, ccr" - [(set_attr "type" "multi") - (set_attr "length" "16")]) - -;; Reload CC_CCRmode for conditional execution registers -(define_insn "movcc_ccr" - [(set (match_operand:CC_CCR 0 "move_destination_operand" "=d,d,d,m,v,?w,C,d") - (match_operand:CC_CCR 1 "move_source_operand" "C,d,m,d,n,n,C,L"))] - "" - "@ - # - mov %1, %0 - ld%I1%U1 %M1, %0 - st%I0%U0 %1, %M0 - # - # - orcr %1, %1, %0 - setlos #%1, %0" - [(set_attr "length" "8,4,4,4,8,12,4,4") - (set_attr "type" "multi,int,gload,gstore,multi,multi,ccr,int")]) - -(define_expand "reload_incc_ccr" - [(match_operand:CC_CCR 0 "cr_operand" "=C") - (match_operand:CC_CCR 1 "memory_operand" "m") - (match_operand:CC_CCR 2 "integer_register_operand" "=&d")] - "" - " -{ - rtx icc = gen_rtx_REG (CCmode, ICC_TEMP); - rtx int_op2 = simplify_gen_subreg (SImode, operands[2], CC_CCRmode, 0); - rtx icr = (ICR_P (REGNO (operands[0])) - ? operands[0] : gen_rtx_REG (CC_CCRmode, ICR_TEMP)); - - emit_insn (gen_movcc_ccr (operands[2], operands[1])); - emit_insn (gen_cmpsi_cc (icc, int_op2, const0_rtx)); - emit_insn (gen_movcc_ccr (icr, gen_rtx_NE (CC_CCRmode, icc, const0_rtx))); - - if (! ICR_P (REGNO (operands[0]))) - emit_insn (gen_movcc_ccr (operands[0], icr)); - - DONE; -}") - -(define_expand "reload_outcc_ccr" - [(set (match_operand:CC_CCR 2 "integer_register_operand" "=&d") - (match_operand:CC_CCR 1 "cr_operand" "C")) - (set (match_operand:CC_CCR 0 "memory_operand" "=m") - (match_dup 2))] - "" - "") - -(define_split - [(set (match_operand:CC_CCR 0 "integer_register_operand" "") - (match_operand:CC_CCR 1 "cr_operand" ""))] - "reload_completed" - [(match_dup 2)] - " -{ - rtx int_op0 = simplify_gen_subreg (SImode, operands[0], CC_CCRmode, 0); - - start_sequence (); - emit_move_insn (operands[0], const1_rtx); - emit_insn (gen_rtx_COND_EXEC (VOIDmode, - gen_rtx_EQ (CC_CCRmode, - operands[1], - const0_rtx), - gen_rtx_SET (VOIDmode, int_op0, - const0_rtx))); - - operands[2] = get_insns (); - end_sequence (); -}") - -(define_split - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (match_operand:CC_CCR 1 "const_int_operand" ""))] - "reload_completed" - [(match_dup 2)] - " -{ - rtx icc = gen_rtx_REG (CCmode, ICC_TEMP); - rtx r0 = gen_rtx_REG (SImode, GPR_FIRST); - rtx icr = (ICR_P (REGNO (operands[0])) - ? operands[0] : gen_rtx_REG (CC_CCRmode, ICR_TEMP)); - - start_sequence (); - - emit_insn (gen_cmpsi_cc (icc, r0, const0_rtx)); - - emit_insn (gen_movcc_ccr (icr, - gen_rtx_fmt_ee (((INTVAL (operands[1]) == 0) - ? EQ : NE), CC_CCRmode, - r0, const0_rtx))); - - if (! ICR_P (REGNO (operands[0]))) - emit_insn (gen_movcc_ccr (operands[0], icr)); - - operands[2] = get_insns (); - end_sequence (); -}") - - -;; :::::::::::::::::::: -;; :: -;; :: Conversions -;; :: -;; :::::::::::::::::::: - -;; Signed conversions from a smaller integer to a larger integer -;; -;; These operations are optional. If they are not -;; present GCC will synthesize them for itself -;; Even though frv does not provide these instructions, we define them -;; to allow load + sign extend to be collapsed together -(define_insn "extendqihi2" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d") - (sign_extend:HI (match_operand:QI 1 "gpr_or_memory_operand" "d,m")))] - "" - "@ - # - ldsb%I1%U1 %M1,%0" - [(set_attr "length" "8,4") - (set_attr "type" "multi,gload")]) - -(define_split - [(set (match_operand:HI 0 "integer_register_operand" "") - (sign_extend:HI (match_operand:QI 1 "integer_register_operand" "")))] - "reload_completed" - [(match_dup 2) - (match_dup 3)] - " -{ - rtx op0 = gen_lowpart (SImode, operands[0]); - rtx op1 = gen_lowpart (SImode, operands[1]); - rtx shift = GEN_INT (24); - - operands[2] = gen_ashlsi3 (op0, op1, shift); - operands[3] = gen_ashrsi3 (op0, op0, shift); -}") - -(define_insn "extendqisi2" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (sign_extend:SI (match_operand:QI 1 "gpr_or_memory_operand" "d,m")))] - "" - "@ - # - ldsb%I1%U1 %M1,%0" - [(set_attr "length" "8,4") - (set_attr "type" "multi,gload")]) - -(define_split - [(set (match_operand:SI 0 "integer_register_operand" "") - (sign_extend:SI (match_operand:QI 1 "integer_register_operand" "")))] - "reload_completed" - [(match_dup 2) - (match_dup 3)] - " -{ - rtx op0 = gen_lowpart (SImode, operands[0]); - rtx op1 = gen_lowpart (SImode, operands[1]); - rtx shift = GEN_INT (24); - - operands[2] = gen_ashlsi3 (op0, op1, shift); - operands[3] = gen_ashrsi3 (op0, op0, shift); -}") - -;;(define_insn "extendqidi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (sign_extend:DI (match_operand:QI 1 "general_operand" "g")))] -;; "" -;; "extendqihi2 %0,%1" -;; [(set_attr "length" "4")]) - -(define_insn "extendhisi2" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (sign_extend:SI (match_operand:HI 1 "gpr_or_memory_operand" "d,m")))] - "" - "@ - # - ldsh%I1%U1 %M1,%0" - [(set_attr "length" "8,4") - (set_attr "type" "multi,gload")]) - -(define_split - [(set (match_operand:SI 0 "integer_register_operand" "") - (sign_extend:SI (match_operand:HI 1 "integer_register_operand" "")))] - "reload_completed" - [(match_dup 2) - (match_dup 3)] - " -{ - rtx op0 = gen_lowpart (SImode, operands[0]); - rtx op1 = gen_lowpart (SImode, operands[1]); - rtx shift = GEN_INT (16); - - operands[2] = gen_ashlsi3 (op0, op1, shift); - operands[3] = gen_ashrsi3 (op0, op0, shift); -}") - -;;(define_insn "extendhidi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (sign_extend:DI (match_operand:HI 1 "general_operand" "g")))] -;; "" -;; "extendhihi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "extendsidi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (sign_extend:DI (match_operand:SI 1 "general_operand" "g")))] -;; "" -;; "extendsidi2 %0,%1" -;; [(set_attr "length" "4")]) - -;; Unsigned conversions from a smaller integer to a larger integer -(define_insn "zero_extendqihi2" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") - (zero_extend:HI - (match_operand:QI 1 "gpr_or_memory_operand" "d,L,m")))] - "" - "@ - andi %1,#0xff,%0 - setlos %1,%0 - ldub%I1%U1 %M1,%0" - [(set_attr "length" "4") - (set_attr "type" "int,int,gload")]) - -(define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") - (zero_extend:SI - (match_operand:QI 1 "gpr_or_memory_operand" "d,L,m")))] - "" - "@ - andi %1,#0xff,%0 - setlos %1,%0 - ldub%I1%U1 %M1,%0" - [(set_attr "length" "4") - (set_attr "type" "int,int,gload")]) - -;;(define_insn "zero_extendqidi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (zero_extend:DI (match_operand:QI 1 "general_operand" "g")))] -;; "" -;; "zero_extendqihi2 %0,%1" -;; [(set_attr "length" "4")]) - -;; Do not set the type for the sethi to "sethi", since the scheduler will think -;; the sethi takes 0 cycles as part of allowing sethi/setlo to be in the same -;; VLIW instruction. -(define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (zero_extend:SI (match_operand:HI 1 "gpr_or_memory_operand" "0,m")))] - "" - "@ - sethi #hi(#0),%0 - lduh%I1%U1 %M1,%0" - [(set_attr "length" "4") - (set_attr "type" "int,gload")]) - -;;(define_insn "zero_extendhidi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (zero_extend:DI (match_operand:HI 1 "general_operand" "g")))] -;; "" -;; "zero_extendhihi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "zero_extendsidi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (zero_extend:DI (match_operand:SI 1 "general_operand" "g")))] -;; "" -;; "zero_extendsidi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;;; Convert between floating point types of different sizes. -;; -;;(define_insn "extendsfdf2" -;; [(set (match_operand:DF 0 "register_operand" "=r") -;; (float_extend:DF (match_operand:SF 1 "register_operand" "r")))] -;; "" -;; "extendsfdf2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "truncdfsf2" -;; [(set (match_operand:SF 0 "register_operand" "=r") -;; (float_truncate:SF (match_operand:DF 1 "register_operand" "r")))] -;; "" -;; "truncdfsf2 %0,%1" -;; [(set_attr "length" "4")]) - -;;;; Convert between signed integer types and floating point. -(define_insn "floatsisf2" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (float:SF (match_operand:SI 1 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fitos %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fsconv")]) - -(define_insn "floatsidf2" - [(set (match_operand:DF 0 "fpr_operand" "=h") - (float:DF (match_operand:SI 1 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fitod %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fdconv")]) - -;;(define_insn "floatdisf2" -;; [(set (match_operand:SF 0 "register_operand" "=r") -;; (float:SF (match_operand:DI 1 "register_operand" "r")))] -;; "" -;; "floatdisf2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "floatdidf2" -;; [(set (match_operand:DF 0 "register_operand" "=r") -;; (float:DF (match_operand:DI 1 "register_operand" "r")))] -;; "" -;; "floatdidf2 %0,%1" -;; [(set_attr "length" "4")]) - -(define_insn "fix_truncsfsi2" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (fix:SI (match_operand:SF 1 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fstoi %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fsconv")]) - -(define_insn "fix_truncdfsi2" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (fix:SI (match_operand:DF 1 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fdtoi %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fdconv")]) - -;;(define_insn "fix_truncsfdi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (fix:DI (match_operand:SF 1 "register_operand" "r")))] -;; "" -;; "fix_truncsfdi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "fix_truncdfdi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (fix:DI (match_operand:DF 1 "register_operand" "r")))] -;; "" -;; "fix_truncdfdi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;;; Convert between unsigned integer types and floating point. -;; -;;(define_insn "floatunssisf2" -;; [(set (match_operand:SF 0 "register_operand" "=r") -;; (unsigned_float:SF (match_operand:SI 1 "register_operand" "r")))] -;; "" -;; "floatunssisf2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "floatunssidf2" -;; [(set (match_operand:DF 0 "register_operand" "=r") -;; (unsigned_float:DF (match_operand:SI 1 "register_operand" "r")))] -;; "" -;; "floatunssidf2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "floatunsdisf2" -;; [(set (match_operand:SF 0 "register_operand" "=r") -;; (unsigned_float:SF (match_operand:DI 1 "register_operand" "r")))] -;; "" -;; "floatunsdisf2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "floatunsdidf2" -;; [(set (match_operand:DF 0 "register_operand" "=r") -;; (unsigned_float:DF (match_operand:DI 1 "register_operand" "r")))] -;; "" -;; "floatunsdidf2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "fixuns_truncsfsi2" -;; [(set (match_operand:SI 0 "register_operand" "=r") -;; (unsigned_fix:SI (match_operand:SF 1 "register_operand" "r")))] -;; "" -;; "fixuns_truncsfsi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "fixuns_truncdfsi2" -;; [(set (match_operand:SI 0 "register_operand" "=r") -;; (unsigned_fix:SI (match_operand:DF 1 "register_operand" "r")))] -;; "" -;; "fixuns_truncdfsi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "fixuns_truncsfdi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (unsigned_fix:DI (match_operand:SF 1 "register_operand" "r")))] -;; "" -;; "fixuns_truncsfdi2 %0,%1" -;; [(set_attr "length" "4")]) -;; -;;(define_insn "fixuns_truncdfdi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (unsigned_fix:DI (match_operand:DF 1 "register_operand" "r")))] -;; "" -;; "fixuns_truncdfdi2 %0,%1" -;; [(set_attr "length" "4")]) - - -;; :::::::::::::::::::: -;; :: -;; :: 32 bit Integer arithmetic -;; :: -;; :::::::::::::::::::: - -;; Addition -(define_insn "addsi3" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (plus:SI (match_operand:SI 1 "integer_register_operand" "%d") - (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] - "" - "add%I2 %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Subtraction. No need to worry about constants, since the compiler -;; canonicalizes them into addsi3's. We prevent SUBREG's here to work around a -;; combine bug, that combines the 32x32->upper 32 bit multiply that uses a -;; SUBREG with a minus that shows up in modulus by constants. -(define_insn "subsi3" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (minus:SI (match_operand:SI 1 "gpr_no_subreg_operand" "d") - (match_operand:SI 2 "gpr_no_subreg_operand" "d")))] - "" - "sub %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Signed multiplication producing 64 bit results from 32 bit inputs -;; Note, frv doesn't have a 32x32->32 bit multiply, but the compiler -;; will do the 32x32->64 bit multiply and use the bottom word. -(define_expand "mulsidi3" - [(set (match_operand:DI 0 "integer_register_operand" "") - (mult:DI (sign_extend:DI (match_operand:SI 1 "integer_register_operand" "")) - (sign_extend:DI (match_operand:SI 2 "gpr_or_int12_operand" ""))))] - "" - " -{ - if (GET_CODE (operands[2]) == CONST_INT) - { - emit_insn (gen_mulsidi3_const (operands[0], operands[1], operands[2])); - DONE; - } -}") - -(define_insn "*mulsidi3_reg" - [(set (match_operand:DI 0 "even_gpr_operand" "=e") - (mult:DI (sign_extend:DI (match_operand:SI 1 "integer_register_operand" "%d")) - (sign_extend:DI (match_operand:SI 2 "integer_register_operand" "d"))))] - "" - "smul %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "mul")]) - -(define_insn "mulsidi3_const" - [(set (match_operand:DI 0 "even_gpr_operand" "=e") - (mult:DI (sign_extend:DI (match_operand:SI 1 "integer_register_operand" "d")) - (match_operand:SI 2 "int12_operand" "NOP")))] - "" - "smuli %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "mul")]) - -;; Unsigned multiplication producing 64 bit results from 32 bit inputs -(define_expand "umulsidi3" - [(set (match_operand:DI 0 "even_gpr_operand" "") - (mult:DI (zero_extend:DI (match_operand:SI 1 "integer_register_operand" "")) - (zero_extend:DI (match_operand:SI 2 "gpr_or_int12_operand" ""))))] - "" - " -{ - if (GET_CODE (operands[2]) == CONST_INT) - { - emit_insn (gen_umulsidi3_const (operands[0], operands[1], operands[2])); - DONE; - } -}") - -(define_insn "*mulsidi3_reg" - [(set (match_operand:DI 0 "even_gpr_operand" "=e") - (mult:DI (zero_extend:DI (match_operand:SI 1 "integer_register_operand" "%d")) - (zero_extend:DI (match_operand:SI 2 "integer_register_operand" "d"))))] - "" - "umul %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "mul")]) - -(define_insn "umulsidi3_const" - [(set (match_operand:DI 0 "even_gpr_operand" "=e") - (mult:DI (zero_extend:DI (match_operand:SI 1 "integer_register_operand" "d")) - (match_operand:SI 2 "int12_operand" "NOP")))] - "" - "umuli %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "mul")]) - -;; Signed Division -(define_insn "divsi3" - [(set (match_operand:SI 0 "register_operand" "=d,d") - (div:SI (match_operand:SI 1 "register_operand" "d,d") - (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] - "" - "sdiv%I2 %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "div")]) - -;; Unsigned Division -(define_insn "udivsi3" - [(set (match_operand:SI 0 "register_operand" "=d,d") - (udiv:SI (match_operand:SI 1 "register_operand" "d,d") - (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] - "" - "udiv%I2 %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "div")]) - -;; Negation -(define_insn "negsi2" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (neg:SI (match_operand:SI 1 "integer_register_operand" "d")))] - "" - "sub %.,%1,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Find first one bit -;; (define_insn "ffssi2" -;; [(set (match_operand:SI 0 "register_operand" "=r") -;; (ffs:SI (match_operand:SI 1 "register_operand" "r")))] -;; "" -;; "ffssi2 %0,%1" -;; [(set_attr "length" "4")]) - - -;; :::::::::::::::::::: -;; :: -;; :: 64 bit Integer arithmetic -;; :: -;; :::::::::::::::::::: - -;; Addition -(define_expand "adddi3" - [(parallel [(set (match_operand:DI 0 "integer_register_operand" "") - (plus:DI (match_operand:DI 1 "integer_register_operand" "") - (match_operand:DI 2 "gpr_or_int10_operand" ""))) - (clobber (match_scratch:CC 3 ""))])] - "" - " -{ - if (GET_CODE (operands[2]) == CONST_INT - && INTVAL (operands[2]) == -2048 - && !no_new_pseudos) - operands[2] = force_reg (DImode, operands[2]); -}") - -(define_insn_and_split "*adddi3_internal" - [(set (match_operand:DI 0 "integer_register_operand" "=&e,e,e,&e,e,&e,e") - (plus:DI (match_operand:DI 1 "integer_register_operand" "%e,0,e,e,0,e,0") - (match_operand:DI 2 "gpr_or_int10_operand" "e,e,0,N,N,OP,OP"))) - (clobber (match_scratch:CC 3 "=t,t,t,t,t,t,t"))] - "GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != -2048" - "#" - "reload_completed" - [(match_dup 4) - (match_dup 5)] - " -{ - rtx op0_high = gen_highpart (SImode, operands[0]); - rtx op1_high = gen_highpart (SImode, operands[1]); - rtx op0_low = gen_lowpart (SImode, operands[0]); - rtx op1_low = gen_lowpart (SImode, operands[1]); - rtx op2 = operands[2]; - rtx op3 = operands[3]; - - if (GET_CODE (op2) != CONST_INT) - { - rtx op2_high = gen_highpart (SImode, operands[2]); - rtx op2_low = gen_lowpart (SImode, operands[2]); - operands[4] = gen_adddi3_lower (op0_low, op1_low, op2_low, op3); - operands[5] = gen_adddi3_upper (op0_high, op1_high, op2_high, op3); - } - else if (INTVAL (op2) >= 0) - { - operands[4] = gen_adddi3_lower (op0_low, op1_low, op2, op3); - operands[5] = gen_adddi3_upper (op0_high, op1_high, const0_rtx, op3); - } - else - { - operands[4] = gen_subdi3_lower (op0_low, op1_low, - GEN_INT (- INTVAL (op2)), op3); - operands[5] = gen_subdi3_upper (op0_high, op1_high, const0_rtx, op3); - } -}" - [(set_attr "length" "8") - (set_attr "type" "multi")]) - -;; Subtraction No need to worry about constants, since the compiler -;; canonicalizes them into adddi3's. -(define_insn_and_split "subdi3" - [(set (match_operand:DI 0 "integer_register_operand" "=&e,e,e") - (minus:DI (match_operand:DI 1 "integer_register_operand" "e,0,e") - (match_operand:DI 2 "integer_register_operand" "e,e,0"))) - (clobber (match_scratch:CC 3 "=t,t,t"))] - "" - "#" - "reload_completed" - [(match_dup 4) - (match_dup 5)] - " -{ - rtx op0_high = gen_highpart (SImode, operands[0]); - rtx op1_high = gen_highpart (SImode, operands[1]); - rtx op2_high = gen_highpart (SImode, operands[2]); - rtx op0_low = gen_lowpart (SImode, operands[0]); - rtx op1_low = gen_lowpart (SImode, operands[1]); - rtx op2_low = gen_lowpart (SImode, operands[2]); - rtx op3 = operands[3]; - - operands[4] = gen_subdi3_lower (op0_low, op1_low, op2_low, op3); - operands[5] = gen_subdi3_upper (op0_high, op1_high, op2_high, op3); -}" - [(set_attr "length" "8") - (set_attr "type" "multi")]) - -;; Patterns for addsi3/subdi3 after spliting -(define_insn "adddi3_lower" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (plus:SI (match_operand:SI 1 "integer_register_operand" "d") - (match_operand:SI 2 "gpr_or_int10_operand" "dOP"))) - (set (match_operand:CC 3 "icc_operand" "=t") - (compare:CC (plus:SI (match_dup 1) - (match_dup 2)) - (const_int 0)))] - "GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) >= 0" - "add%I2cc %1,%2,%0,%3" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "adddi3_upper" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (plus:SI (match_operand:SI 1 "integer_register_operand" "d,d") - (plus:SI (match_operand:SI 2 "reg_or_0_operand" "d,O") - (match_operand:CC 3 "icc_operand" "t,t"))))] - "" - "@ - addx %1,%2,%0,%3 - addx %1,%.,%0,%3" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "subdi3_lower" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (minus:SI (match_operand:SI 1 "integer_register_operand" "d") - (match_operand:SI 2 "gpr_or_int10_operand" "dOP"))) - (set (match_operand:CC 3 "icc_operand" "=t") - (compare:CC (plus:SI (match_dup 1) - (match_dup 2)) - (const_int 0)))] - "GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) >= 0" - "sub%I2cc %1,%2,%0,%3" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "subdi3_upper" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (minus:SI (match_operand:SI 1 "integer_register_operand" "d,d") - (minus:SI (match_operand:SI 2 "reg_or_0_operand" "d,O") - (match_operand:CC 3 "icc_operand" "t,t"))))] - "" - "@ - subx %1,%2,%0,%3 - subx %1,%.,%0,%3" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn_and_split "negdi2" - [(set (match_operand:DI 0 "integer_register_operand" "=&e,e") - (neg:DI (match_operand:DI 1 "integer_register_operand" "e,0"))) - (clobber (match_scratch:CC 2 "=t,t"))] - "" - "#" - "reload_completed" - [(match_dup 3) - (match_dup 4)] - " -{ - rtx op0_high = gen_highpart (SImode, operands[0]); - rtx op1_high = gen_rtx_REG (SImode, GPR_FIRST); - rtx op2_high = gen_highpart (SImode, operands[1]); - rtx op0_low = gen_lowpart (SImode, operands[0]); - rtx op1_low = op1_high; - rtx op2_low = gen_lowpart (SImode, operands[1]); - rtx op3 = operands[2]; - - operands[3] = gen_subdi3_lower (op0_low, op1_low, op2_low, op3); - operands[4] = gen_subdi3_upper (op0_high, op1_high, op2_high, op3); -}" - [(set_attr "length" "8") - (set_attr "type" "multi")]) - -;; Multiplication (same size) -;; (define_insn "muldi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (mult:DI (match_operand:DI 1 "register_operand" "%r") -;; (match_operand:DI 2 "nonmemory_operand" "ri")))] -;; "" -;; "muldi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Signed Division -;; (define_insn "divdi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (div:DI (match_operand:DI 1 "register_operand" "r") -;; (match_operand:DI 2 "nonmemory_operand" "ri")))] -;; "" -;; "divdi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Undsgned Division -;; (define_insn "udivdi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (udiv:DI (match_operand:DI 1 "register_operand" "r") -;; (match_operand:DI 2 "nonmemory_operand" "ri")))] -;; "" -;; "udivdi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Negation -;; (define_insn "negdi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (neg:DI (match_operand:DI 1 "register_operand" "r")))] -;; "" -;; "negdi2 %0,%1" -;; [(set_attr "length" "4")]) - -;; Find first one bit -;; (define_insn "ffsdi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (ffs:DI (match_operand:DI 1 "register_operand" "r")))] -;; "" -;; "ffsdi2 %0,%1" -;; [(set_attr "length" "4")]) - - -;; :::::::::::::::::::: -;; :: -;; :: 32 bit floating point arithmetic -;; :: -;; :::::::::::::::::::: - -;; Addition -(define_insn "addsf3" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (plus:SF (match_operand:SF 1 "fpr_operand" "%f") - (match_operand:SF 2 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fadds %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fsadd")]) - -;; Subtraction -(define_insn "subsf3" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (minus:SF (match_operand:SF 1 "fpr_operand" "f") - (match_operand:SF 2 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fsubs %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fsadd")]) - -;; Multiplication -(define_insn "mulsf3" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (mult:SF (match_operand:SF 1 "fpr_operand" "%f") - (match_operand:SF 2 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fmuls %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fsmul")]) - -;; Multiplication with addition/subtraction -(define_insn "*muladdsf4" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (plus:SF (mult:SF (match_operand:SF 1 "fpr_operand" "%f") - (match_operand:SF 2 "fpr_operand" "f")) - (match_operand:SF 3 "fpr_operand" "0")))] - "TARGET_HARD_FLOAT && TARGET_MULADD" - "fmadds %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fmas")]) - -(define_insn "*mulsubsf4" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (minus:SF (mult:SF (match_operand:SF 1 "fpr_operand" "%f") - (match_operand:SF 2 "fpr_operand" "f")) - (match_operand:SF 3 "fpr_operand" "0")))] - "TARGET_HARD_FLOAT && TARGET_MULADD" - "fmsubs %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fmas")]) - -;; Division -(define_insn "divsf3" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (div:SF (match_operand:SF 1 "fpr_operand" "f") - (match_operand:SF 2 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fdivs %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fsdiv")]) - -;; Negation -(define_insn "negsf2" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (neg:SF (match_operand:SF 1 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fnegs %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fsconv")]) - -;; Absolute value -(define_insn "abssf2" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (abs:SF (match_operand:SF 1 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fabss %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fsconv")]) - -;; Square root -(define_insn "sqrtsf2" - [(set (match_operand:SF 0 "fpr_operand" "=f") - (sqrt:SF (match_operand:SF 1 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fsqrts %1,%0" - [(set_attr "length" "4") - (set_attr "type" "sqrt_single")]) - - -;; :::::::::::::::::::: -;; :: -;; :: 64 bit floating point arithmetic -;; :: -;; :::::::::::::::::::: - -;; Addition -(define_insn "adddf3" - [(set (match_operand:DF 0 "even_fpr_operand" "=h") - (plus:DF (match_operand:DF 1 "fpr_operand" "%h") - (match_operand:DF 2 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "faddd %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fdadd")]) - -;; Subtraction -(define_insn "subdf3" - [(set (match_operand:DF 0 "even_fpr_operand" "=h") - (minus:DF (match_operand:DF 1 "fpr_operand" "h") - (match_operand:DF 2 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fsubd %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fdadd")]) - -;; Multiplication -(define_insn "muldf3" - [(set (match_operand:DF 0 "even_fpr_operand" "=h") - (mult:DF (match_operand:DF 1 "fpr_operand" "%h") - (match_operand:DF 2 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fmuld %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fdmul")]) - -;; Multiplication with addition/subtraction -(define_insn "*muladddf4" - [(set (match_operand:DF 0 "fpr_operand" "=f") - (plus:DF (mult:DF (match_operand:DF 1 "fpr_operand" "%f") - (match_operand:DF 2 "fpr_operand" "f")) - (match_operand:DF 3 "fpr_operand" "0")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE && TARGET_MULADD" - "fmaddd %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fmas")]) - -(define_insn "*mulsubdf4" - [(set (match_operand:DF 0 "fpr_operand" "=f") - (minus:DF (mult:DF (match_operand:DF 1 "fpr_operand" "%f") - (match_operand:DF 2 "fpr_operand" "f")) - (match_operand:DF 3 "fpr_operand" "0")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE && TARGET_MULADD" - "fmsubd %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fmas")]) - -;; Division -(define_insn "divdf3" - [(set (match_operand:DF 0 "even_fpr_operand" "=h") - (div:DF (match_operand:DF 1 "fpr_operand" "h") - (match_operand:DF 2 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fdivd %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fddiv")]) - -;; Negation -(define_insn "negdf2" - [(set (match_operand:DF 0 "even_fpr_operand" "=h") - (neg:DF (match_operand:DF 1 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fnegd %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fdconv")]) - -;; Absolute value -(define_insn "absdf2" - [(set (match_operand:DF 0 "even_fpr_operand" "=h") - (abs:DF (match_operand:DF 1 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fabsd %1,%0" - [(set_attr "length" "4") - (set_attr "type" "fdconv")]) - -;; Square root -(define_insn "sqrtdf2" - [(set (match_operand:DF 0 "even_fpr_operand" "=h") - (sqrt:DF (match_operand:DF 1 "fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fsqrtd %1,%0" - [(set_attr "length" "4") - (set_attr "type" "sqrt_double")]) - - -;; :::::::::::::::::::: -;; :: -;; :: 32 bit Integer Shifts and Rotates -;; :: -;; :::::::::::::::::::: - -;; Arithmetic Shift Left -(define_insn "ashlsi3" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (ashift:SI (match_operand:SI 1 "integer_register_operand" "d,d") - (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] - "" - "sll%I2 %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Arithmetic Shift Right -(define_insn "ashrsi3" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (ashiftrt:SI (match_operand:SI 1 "integer_register_operand" "d,d") - (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] - "" - "sra%I2 %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Logical Shift Right -(define_insn "lshrsi3" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (lshiftrt:SI (match_operand:SI 1 "integer_register_operand" "d,d") - (match_operand:SI 2 "gpr_or_int12_operand" "d,NOP")))] - "" - "srl%I2 %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Rotate Left -;; (define_insn "rotlsi3" -;; [(set (match_operand:SI 0 "register_operand" "=r") -;; (rotate:SI (match_operand:SI 1 "register_operand" "r") -;; (match_operand:SI 2 "nonmemory_operand" "ri")))] -;; "" -;; "rotlsi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Rotate Right -;; (define_insn "rotrsi3" -;; [(set (match_operand:SI 0 "register_operand" "=r") -;; (rotatert:SI (match_operand:SI 1 "register_operand" "r") -;; (match_operand:SI 2 "nonmemory_operand" "ri")))] -;; "" -;; "rotrsi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - - -;; :::::::::::::::::::: -;; :: -;; :: 64 bit Integer Shifts and Rotates -;; :: -;; :::::::::::::::::::: - -;; Arithmetic Shift Left -;; (define_insn "ashldi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (ashift:DI (match_operand:DI 1 "register_operand" "r") -;; (match_operand:SI 2 "nonmemory_operand" "ri")))] -;; "" -;; "ashldi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Arithmetic Shift Right -;; (define_insn "ashrdi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (ashiftrt:DI (match_operand:DI 1 "register_operand" "r") -;; (match_operand:SI 2 "nonmemory_operand" "ri")))] -;; "" -;; "ashrdi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Logical Shift Right -;; (define_insn "lshrdi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (lshiftrt:DI (match_operand:DI 1 "register_operand" "r") -;; (match_operand:SI 2 "nonmemory_operand" "ri")))] -;; "" -;; "lshrdi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Rotate Left -;; (define_insn "rotldi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (rotate:DI (match_operand:DI 1 "register_operand" "r") -;; (match_operand:SI 2 "nonmemory_operand" "ri")))] -;; "" -;; "rotldi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Rotate Right -;; (define_insn "rotrdi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (rotatert:DI (match_operand:DI 1 "register_operand" "r") -;; (match_operand:SI 2 "nonmemory_operand" "ri")))] -;; "" -;; "rotrdi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - - -;; :::::::::::::::::::: -;; :: -;; :: 32 Bit Integer Logical operations -;; :: -;; :::::::::::::::::::: - -;; Logical AND, 32 bit integers -(define_insn "andsi3_media" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") - (and:SI (match_operand:SI 1 "gpr_or_fpr_operand" "%d,f") - (match_operand:SI 2 "gpr_fpr_or_int12_operand" "dNOP,f")))] - "TARGET_MEDIA" - "@ - and%I2 %1, %2, %0 - mand %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int,mlogic")]) - -(define_insn "andsi3_nomedia" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (and:SI (match_operand:SI 1 "integer_register_operand" "%d") - (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] - "!TARGET_MEDIA" - "and%I2 %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_expand "andsi3" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") - (and:SI (match_operand:SI 1 "gpr_or_fpr_operand" "") - (match_operand:SI 2 "gpr_fpr_or_int12_operand" "")))] - "" - "") - -;; Inclusive OR, 32 bit integers -(define_insn "iorsi3_media" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") - (ior:SI (match_operand:SI 1 "gpr_or_fpr_operand" "%d,f") - (match_operand:SI 2 "gpr_fpr_or_int12_operand" "dNOP,f")))] - "TARGET_MEDIA" - "@ - or%I2 %1, %2, %0 - mor %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int,mlogic")]) - -(define_insn "iorsi3_nomedia" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (ior:SI (match_operand:SI 1 "integer_register_operand" "%d") - (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] - "!TARGET_MEDIA" - "or%I2 %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_expand "iorsi3" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") - (ior:SI (match_operand:SI 1 "gpr_or_fpr_operand" "") - (match_operand:SI 2 "gpr_fpr_or_int12_operand" "")))] - "" - "") - -;; Exclusive OR, 32 bit integers -(define_insn "xorsi3_media" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") - (xor:SI (match_operand:SI 1 "gpr_or_fpr_operand" "%d,f") - (match_operand:SI 2 "gpr_fpr_or_int12_operand" "dNOP,f")))] - "TARGET_MEDIA" - "@ - xor%I2 %1, %2, %0 - mxor %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int,mlogic")]) - -(define_insn "xorsi3_nomedia" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (xor:SI (match_operand:SI 1 "integer_register_operand" "%d") - (match_operand:SI 2 "gpr_or_int12_operand" "dNOP")))] - "!TARGET_MEDIA" - "xor%I2 %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_expand "xorsi3" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") - (xor:SI (match_operand:SI 1 "gpr_or_fpr_operand" "") - (match_operand:SI 2 "gpr_fpr_or_int12_operand" "")))] - "" - "") - -;; One's complement, 32 bit integers -(define_insn "one_cmplsi2_media" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "=d,f") - (not:SI (match_operand:SI 1 "gpr_or_fpr_operand" "d,f")))] - "TARGET_MEDIA" - "@ - not %1, %0 - mnot %1, %0" - [(set_attr "length" "4") - (set_attr "type" "int,mlogic")]) - -(define_insn "one_cmplsi2_nomedia" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (not:SI (match_operand:SI 1 "integer_register_operand" "d")))] - "!TARGET_MEDIA" - "not %1,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_expand "one_cmplsi2" - [(set (match_operand:SI 0 "gpr_or_fpr_operand" "") - (not:SI (match_operand:SI 1 "gpr_or_fpr_operand" "")))] - "" - "") - - -;; :::::::::::::::::::: -;; :: -;; :: 64 Bit Integer Logical operations -;; :: -;; :::::::::::::::::::: - -;; Logical AND, 64 bit integers -;; (define_insn "anddi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (and:DI (match_operand:DI 1 "register_operand" "%r") -;; (match_operand:DI 2 "nonmemory_operand" "ri")))] -;; "" -;; "anddi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Inclusive OR, 64 bit integers -;; (define_insn "iordi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (ior:DI (match_operand:DI 1 "register_operand" "%r") -;; (match_operand:DI 2 "nonmemory_operand" "ri")))] -;; "" -;; "iordi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; Excludive OR, 64 bit integers -;; (define_insn "xordi3" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (xor:DI (match_operand:DI 1 "register_operand" "%r") -;; (match_operand:DI 2 "nonmemory_operand" "ri")))] -;; "" -;; "xordi3 %0,%1,%2" -;; [(set_attr "length" "4")]) - -;; One's complement, 64 bit integers -;; (define_insn "one_cmpldi2" -;; [(set (match_operand:DI 0 "register_operand" "=r") -;; (not:DI (match_operand:DI 1 "register_operand" "r")))] -;; "" -;; "notdi3 %0,%1" -;; [(set_attr "length" "4")]) - - -;; :::::::::::::::::::: -;; :: -;; :: Combination of integer operation with comparison -;; :: -;; :::::::::::::::::::: - -(define_insn "*combo_intop_compare1" - [(set (match_operand:CC 0 "icc_operand" "=t") - (compare:CC (match_operator:SI 1 "intop_compare_operator" - [(match_operand:SI 2 "integer_register_operand" "d") - (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) - (const_int 0)))] - "" - "%O1%I3cc %2, %3, %., %0" - [(set_attr "type" "int") - (set_attr "length" "4")]) - -(define_insn "*combo_intop_compare2" - [(set (match_operand:CC_UNS 0 "icc_operand" "=t") - (compare:CC_UNS (match_operator:SI 1 "intop_compare_operator" - [(match_operand:SI 2 "integer_register_operand" "d") - (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) - (const_int 0)))] - "" - "%O1%I3cc %2, %3, %., %0" - [(set_attr "type" "int") - (set_attr "length" "4")]) - -(define_insn "*combo_intop_compare3" - [(set (match_operand:CC 0 "icc_operand" "=t") - (compare:CC (match_operator:SI 1 "intop_compare_operator" - [(match_operand:SI 2 "integer_register_operand" "d") - (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) - (const_int 0))) - (set (match_operand:SI 4 "integer_register_operand" "=d") - (match_operator:SI 5 "intop_compare_operator" - [(match_dup 2) - (match_dup 3)]))] - "GET_CODE (operands[1]) == GET_CODE (operands[5])" - "%O1%I3cc %2, %3, %4, %0" - [(set_attr "type" "int") - (set_attr "length" "4")]) - -(define_insn "*combo_intop_compare4" - [(set (match_operand:CC_UNS 0 "icc_operand" "=t") - (compare:CC_UNS (match_operator:SI 1 "intop_compare_operator" - [(match_operand:SI 2 "integer_register_operand" "d") - (match_operand:SI 3 "gpr_or_int10_operand" "dJ")]) - (const_int 0))) - (set (match_operand:SI 4 "integer_register_operand" "=d") - (match_operator:SI 5 "intop_compare_operator" - [(match_dup 2) - (match_dup 3)]))] - "GET_CODE (operands[1]) == GET_CODE (operands[5])" - "%O1%I3cc %2, %3, %4, %0" - [(set_attr "type" "int") - (set_attr "length" "4")]) - - -;; :::::::::::::::::::: -;; :: -;; :: Comparisons -;; :: -;; :::::::::::::::::::: - -;; Note, we store the operands in the comparison insns, and use them later -;; when generating the branch or scc operation. - -;; First the routines called by the machine independent part of the compiler -(define_expand "cmpsi" - [(set (cc0) - (compare (match_operand:SI 0 "integer_register_operand" "") - (match_operand:SI 1 "gpr_or_int10_operand" "")))] - "" - " -{ - frv_compare_op0 = operands[0]; - frv_compare_op1 = operands[1]; - DONE; -}") - -;(define_expand "cmpdi" -; [(set (cc0) -; (compare (match_operand:DI 0 "register_operand" "") -; (match_operand:DI 1 "nonmemory_operand" "")))] -; "" -; " -;{ -; frv_compare_op0 = operands[0]; -; frv_compare_op1 = operands[1]; -; DONE; -;}") - -(define_expand "cmpsf" - [(set (cc0) - (compare (match_operand:SF 0 "fpr_operand" "") - (match_operand:SF 1 "fpr_operand" "")))] - "TARGET_HARD_FLOAT" - " -{ - frv_compare_op0 = operands[0]; - frv_compare_op1 = operands[1]; - DONE; -}") - -(define_expand "cmpdf" - [(set (cc0) - (compare (match_operand:DF 0 "fpr_operand" "") - (match_operand:DF 1 "fpr_operand" "")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - " -{ - frv_compare_op0 = operands[0]; - frv_compare_op1 = operands[1]; - DONE; -}") - -;; Now, the actual comparisons, generated by the branch and/or scc operations - -(define_insn "cmpsi_cc" - [(set (match_operand:CC 0 "icc_operand" "=t,t") - (compare:CC (match_operand:SI 1 "integer_register_operand" "d,d") - (match_operand:SI 2 "gpr_or_int10_operand" "d,J")))] - "" - "cmp%I2 %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "*cmpsi_cc_uns" - [(set (match_operand:CC_UNS 0 "icc_operand" "=t,t") - (compare:CC_UNS (match_operand:SI 1 "integer_register_operand" "d,d") - (match_operand:SI 2 "gpr_or_int10_operand" "d,J")))] - "" - "cmp%I2 %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "*cmpsf_cc_fp" - [(set (match_operand:CC_FP 0 "fcc_operand" "=u") - (compare:CC_FP (match_operand:SF 1 "fpr_operand" "f") - (match_operand:SF 2 "fpr_operand" "f")))] - "TARGET_HARD_FLOAT" - "fcmps %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fsadd")]) - -(define_insn "*cmpdf_cc_fp" - [(set (match_operand:CC_FP 0 "fcc_operand" "=u") - (compare:CC_FP (match_operand:DF 1 "even_fpr_operand" "h") - (match_operand:DF 2 "even_fpr_operand" "h")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE" - "fcmpd %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "fdadd")]) - - -;; :::::::::::::::::::: -;; :: -;; :: Branches -;; :: -;; :::::::::::::::::::: - -;; Define_expands called by the machine independent part of the compiler -;; to allocate a new comparison register. Each of these named patterns -;; must be present, and they cannot be amalgamated into one pattern. -;; -;; If a fixed condition code register is being used, (as opposed to, say, -;; using cc0), then the expands should look like this: -;; -;; (define_expand "" -;; [(set (reg:CC ) -;; (compare:CC (match_dup 1) -;; (match_dup 2))) -;; (set (pc) -;; (if_then_else (eq:CC (reg:CC ) -;; (const_int 0)) -;; (label_ref (match_operand 0 "" "")) -;; (pc)))] -;; "" -;; "{ -;; operands[1] = frv_compare_op0; -;; operands[2] = frv_compare_op1; -;; }" -;; ) - -(define_expand "beq" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (EQ, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "bne" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (NE, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "blt" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (LT, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "ble" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (LE, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "bgt" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (GT, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "bge" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (GE, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "bltu" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (LTU, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "bleu" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (LEU, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "bgtu" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (GTU, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "bgeu" - [(use (match_operand 0 "" ""))] - "" - " -{ - if (! frv_emit_cond_branch (GEU, operands[0])) - FAIL; - - DONE; -}") - -;; Actual branches. We must allow for the (label_ref) and the (pc) to be -;; swapped. If they are swapped, it reverses the sense of the branch. -;; -;; Note - unlike the define expands above, these patterns can be amalgamated -;; into one pattern for branch-if-true and one for branch-if-false. This does -;; require an operand operator to select the correct branch mnemonic. -;; -;; If a fixed condition code register is being used, (as opposed to, say, -;; using cc0), then the expands could look like this: -;; -;; (define_insn "*branch_true" -;; [(set (pc) -;; (if_then_else (match_operator:CC 0 "comparison_operator" -;; [(reg:CC ) -;; (const_int 0)]) -;; (label_ref (match_operand 1 "" "")) -;; (pc)))] -;; "" -;; "b%B0 %1" -;; [(set_attr "length" "4")] -;; ) -;; -;; In the above example the %B is a directive to frv_print_operand() -;; to decode and print the correct branch mnemonic. - -(define_insn "*branch_signed_true" - [(set (pc) - (if_then_else (match_operator:CC 0 "signed_relational_operator" - [(match_operand 1 "icc_operand" "t") - (const_int 0)]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "* -{ - if (get_attr_length (insn) == 4) - return \"b%c0 %1,%#,%l2\"; - else - return \"b%C0 %1,%#,1f\;call %l2\\n1:\"; -}" - [(set (attr "length") - (if_then_else - (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) - (le (minus (match_dup 2) (pc)) (const_int 32764))) - (const_int 4) - (const_int 8))) - (set (attr "far_jump") - (if_then_else - (eq_attr "length" "4") - (const_string "no") - (const_string "yes"))) - (set (attr "type") - (if_then_else - (eq_attr "length" "4") - (const_string "branch") - (const_string "multi")))]) - -(define_insn "*branch_signed_false" - [(set (pc) - (if_then_else (match_operator:CC 0 "signed_relational_operator" - [(match_operand 1 "icc_operand" "t") - (const_int 0)]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "* -{ - if (get_attr_length (insn) == 4) - return \"b%C0 %1,%#,%l2\"; - else - return \"b%c0 %1,%#,1f\;call %l2\\n1:\"; -}" - [(set (attr "length") - (if_then_else - (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) - (le (minus (match_dup 2) (pc)) (const_int 32764))) - (const_int 4) - (const_int 8))) - (set (attr "far_jump") - (if_then_else - (eq_attr "length" "4") - (const_string "no") - (const_string "yes"))) - (set (attr "type") - (if_then_else - (eq_attr "length" "4") - (const_string "branch") - (const_string "multi")))]) - -(define_insn "*branch_unsigned_true" - [(set (pc) - (if_then_else (match_operator:CC_UNS 0 "unsigned_relational_operator" - [(match_operand 1 "icc_operand" "t") - (const_int 0)]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "* -{ - if (get_attr_length (insn) == 4) - return \"b%c0 %1,%#,%l2\"; - else - return \"b%C0 %1,%#,1f\;call %l2\\n1:\"; -}" - [(set (attr "length") - (if_then_else - (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) - (le (minus (match_dup 2) (pc)) (const_int 32764))) - (const_int 4) - (const_int 8))) - (set (attr "far_jump") - (if_then_else - (eq_attr "length" "4") - (const_string "no") - (const_string "yes"))) - (set (attr "type") - (if_then_else - (eq_attr "length" "4") - (const_string "branch") - (const_string "multi")))]) - -(define_insn "*branch_unsigned_false" - [(set (pc) - (if_then_else (match_operator:CC_UNS 0 "unsigned_relational_operator" - [(match_operand 1 "icc_operand" "t") - (const_int 0)]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "* -{ - if (get_attr_length (insn) == 4) - return \"b%C0 %1,%#,%l2\"; - else - return \"b%c0 %1,%#,1f\;call %l2\\n1:\"; -}" - [(set (attr "length") - (if_then_else - (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) - (le (minus (match_dup 2) (pc)) (const_int 32764))) - (const_int 4) - (const_int 8))) - (set (attr "far_jump") - (if_then_else - (eq_attr "length" "4") - (const_string "no") - (const_string "yes"))) - (set (attr "type") - (if_then_else - (eq_attr "length" "4") - (const_string "branch") - (const_string "multi")))]) - -(define_insn "*branch_fp_true" - [(set (pc) - (if_then_else (match_operator:CC_FP 0 "float_relational_operator" - [(match_operand 1 "fcc_operand" "u") - (const_int 0)]) - (label_ref (match_operand 2 "" "")) - (pc)))] - "" - "* -{ - if (get_attr_length (insn) == 4) - return \"fb%f0 %1,%#,%l2\"; - else - return \"fb%F0 %1,%#,1f\;call %l2\\n1:\"; -}" - [(set (attr "length") - (if_then_else - (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) - (le (minus (match_dup 2) (pc)) (const_int 32764))) - (const_int 4) - (const_int 8))) - (set (attr "far_jump") - (if_then_else - (eq_attr "length" "4") - (const_string "no") - (const_string "yes"))) - (set (attr "type") - (if_then_else - (eq_attr "length" "4") - (const_string "branch") - (const_string "multi")))]) - -(define_insn "*branch_fp_false" - [(set (pc) - (if_then_else (match_operator:CC_FP 0 "float_relational_operator" - [(match_operand 1 "fcc_operand" "u") - (const_int 0)]) - (pc) - (label_ref (match_operand 2 "" ""))))] - "" - "* -{ - if (get_attr_length (insn) == 4) - return \"fb%F0 %1,%#,%l2\"; - else - return \"fb%f0 %1,%#,1f\;call %l2\\n1:\"; -}" - [(set (attr "length") - (if_then_else - (and (ge (minus (match_dup 2) (pc)) (const_int -32768)) - (le (minus (match_dup 2) (pc)) (const_int 32764))) - (const_int 4) - (const_int 8))) - (set (attr "far_jump") - (if_then_else - (eq_attr "length" "4") - (const_string "no") - (const_string "yes"))) - (set (attr "type") - (if_then_else - (eq_attr "length" "4") - (const_string "branch") - (const_string "multi")))]) - - -;; :::::::::::::::::::: -;; :: -;; :: Set flag operations -;; :: -;; :::::::::::::::::::: - -;; Define_expands called by the machine independent part of the compiler -;; to allocate a new comparison register - -(define_expand "seq" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (EQ, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sne" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (NE, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "slt" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (LT, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sle" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (LE, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sgt" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (GT, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sge" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (GE, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sltu" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (LTU, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sleu" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (LEU, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sgtu" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (GTU, operands[0])) - FAIL; - - DONE; -}") - -(define_expand "sgeu" - [(match_operand:SI 0 "integer_register_operand" "")] - "TARGET_SCC" - " -{ - if (! frv_emit_scc (GEU, operands[0])) - FAIL; - - DONE; -}") - -(define_insn "*scc_signed" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (match_operator:SI 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t") - (const_int 0)])) - (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] - "" - "#" - [(set_attr "length" "12") - (set_attr "type" "multi")]) - -(define_insn "*scc_unsigned" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (match_operator:SI 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t") - (const_int 0)])) - (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] - "" - "#" - [(set_attr "length" "12") - (set_attr "type" "multi")]) - -(define_insn "*scc_float" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (match_operator:SI 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u") - (const_int 0)])) - (clobber (match_operand:CC_CCR 3 "fcr_operand" "=w"))] - "" - "#" - [(set_attr "length" "12") - (set_attr "type" "multi")]) - -;; XXX -- add reload_completed to the splits, because register allocation -;; currently isn't ready to see cond_exec packets. -(define_split - [(set (match_operand:SI 0 "integer_register_operand" "") - (match_operator:SI 1 "relational_operator" - [(match_operand 2 "cc_operand" "") - (const_int 0)])) - (clobber (match_operand 3 "cr_operand" ""))] - "reload_completed" - [(match_dup 4)] - "operands[4] = frv_split_scc (operands[0], operands[1], operands[2], - operands[3], (HOST_WIDE_INT) 1);") - -(define_insn "*scc_neg1_signed" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (neg:SI (match_operator:SI 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t") - (const_int 0)]))) - (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] - "" - "#" - [(set_attr "length" "12") - (set_attr "type" "multi")]) - -(define_insn "*scc_neg1_unsigned" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (neg:SI (match_operator:SI 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t") - (const_int 0)]))) - (clobber (match_operand:CC_CCR 3 "icr_operand" "=v"))] - "" - "#" - [(set_attr "length" "12") - (set_attr "type" "multi")]) - -(define_insn "*scc_neg1_float" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (neg:SI (match_operator:SI 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u") - (const_int 0)]))) - (clobber (match_operand:CC_CCR 3 "fcr_operand" "=w"))] - "" - "#" - [(set_attr "length" "12") - (set_attr "type" "multi")]) - -(define_split - [(set (match_operand:SI 0 "integer_register_operand" "") - (neg:SI (match_operator:SI 1 "relational_operator" - [(match_operand 2 "cc_operand" "") - (const_int 0)]))) - (clobber (match_operand 3 "cr_operand" ""))] - "reload_completed" - [(match_dup 4)] - "operands[4] = frv_split_scc (operands[0], operands[1], operands[2], - operands[3], (HOST_WIDE_INT) -1);") - - -;; :::::::::::::::::::: -;; :: -;; :: Conditionally executed instructions -;; :: -;; :::::::::::::::::::: - -;; Convert ICC/FCC comparison into CCR bits so we can do conditional execution -(define_insn "*ck_signed" - [(set (match_operand:CC_CCR 0 "icr_operand" "=v") - (match_operator:CC_CCR 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t") - (const_int 0)]))] - "" - "ck%c1 %2, %0" - [(set_attr "length" "4") - (set_attr "type" "ccr")]) - -(define_insn "*ck_unsigned" - [(set (match_operand:CC_CCR 0 "icr_operand" "=v") - (match_operator:CC_CCR 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t") - (const_int 0)]))] - "" - "ck%c1 %2, %0" - [(set_attr "length" "4") - (set_attr "type" "ccr")]) - -(define_insn "*fck_float" - [(set (match_operand:CC_CCR 0 "fcr_operand" "=w") - (match_operator:CC_CCR 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u") - (const_int 0)]))] - "TARGET_HAS_FPRS" - "fck%c1 %2, %0" - [(set_attr "length" "4") - (set_attr "type" "ccr")]) - -;; Conditionally convert ICC/FCC comparison into CCR bits to provide && and || -;; tests in conditional execution -(define_insn "cond_exec_ck" - [(set (match_operand:CC_CCR 0 "cr_operand" "=v,w") - (if_then_else:CC_CCR (match_operator 1 "ccr_eqne_operator" - [(match_operand 2 "cr_operand" "C,C") - (const_int 0)]) - (match_operator 3 "relational_operator" - [(match_operand 4 "cc_operand" "t,u") - (const_int 0)]) - (const_int 0)))] - "" - "@ - cck%c3 %4, %0, %2, %e1 - cfck%f3 %4, %0, %2, %e1" - [(set_attr "length" "4") - (set_attr "type" "ccr")]) - -;; Conditionally set a register to either 0 or another register -(define_insn "*cond_exec_movqi" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C,C,C,C,C,C") - (const_int 0)]) - (set (match_operand:QI 2 "condexec_dest_operand" "=d,d,U,?f,?f,?d") - (match_operand:QI 3 "condexec_source_operand" "dO,U,dO,f,d,f")))] - "register_operand(operands[2], QImode) || reg_or_0_operand (operands[3], QImode)" - "* return output_condmove_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "int,gload,gstore,fsconv,movgf,movfg")]) - -(define_insn "*cond_exec_movhi" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C,C,C,C,C,C") - (const_int 0)]) - (set (match_operand:HI 2 "condexec_dest_operand" "=d,d,U,?f,?f,?d") - (match_operand:HI 3 "condexec_source_operand" "dO,U,dO,f,d,f")))] - "register_operand(operands[2], HImode) || reg_or_0_operand (operands[3], HImode)" - "* return output_condmove_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "int,gload,gstore,fsconv,movgf,movfg")]) - -(define_insn "*cond_exec_movsi" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C,C,C,C,C,C,C,C") - (const_int 0)]) - (set (match_operand:SI 2 "condexec_dest_operand" "=d,d,U,?f,?f,?d,?f,?m") - (match_operand:SI 3 "condexec_source_operand" "dO,U,dO,f,d,f,m,f")))] - "register_operand(operands[2], SImode) || reg_or_0_operand (operands[3], SImode)" - "* return output_condmove_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "int,gload,gstore,fsconv,movgf,movfg,fload,fstore")]) - - -(define_insn "*cond_exec_movsf_has_fprs" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C,C,C,C,C,C,C,C,C,C") - (const_int 0)]) - (set (match_operand:SF 2 "condexec_dest_operand" "=f,?d,?d,?f,f,f,?d,U,?U,U") - (match_operand:SF 3 "condexec_source_operand" "f,d,f,d,G,U,U,f,d,G")))] - "TARGET_HAS_FPRS" - "* return output_condmove_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "fsconv,int,movgf,movfg,movgf,fload,gload,fstore,gstore,gstore")]) - -(define_insn "*cond_exec_movsf_no_fprs" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C,C,C") - (const_int 0)]) - (set (match_operand:SF 2 "condexec_dest_operand" "=d,d,U") - (match_operand:SF 3 "condexec_source_operand" "d,U,dG")))] - "! TARGET_HAS_FPRS" - "* return output_condmove_single (operands, insn);" - [(set_attr "length" "4") - (set_attr "type" "int,gload,gstore")]) - -(define_insn "*cond_exec_si_binary1" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "integer_register_operand" "=d") - (match_operator:SI 3 "condexec_si_binary_operator" - [(match_operand:SI 4 "integer_register_operand" "d") - (match_operand:SI 5 "integer_register_operand" "d")])))] - "" - "* -{ - switch (GET_CODE (operands[3])) - { - case PLUS: return \"cadd %4, %z5, %2, %1, %e0\"; - case MINUS: return \"csub %4, %z5, %2, %1, %e0\"; - case AND: return \"cand %4, %z5, %2, %1, %e0\"; - case IOR: return \"cor %4, %z5, %2, %1, %e0\"; - case XOR: return \"cxor %4, %z5, %2, %1, %e0\"; - case ASHIFT: return \"csll %4, %z5, %2, %1, %e0\"; - case ASHIFTRT: return \"csra %4, %z5, %2, %1, %e0\"; - case LSHIFTRT: return \"csrl %4, %z5, %2, %1, %e0\"; - default: abort (); - } -}" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "*cond_exec_si_binary2" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "fpr_operand" "=f") - (match_operator:SI 3 "condexec_si_media_operator" - [(match_operand:SI 4 "fpr_operand" "f") - (match_operand:SI 5 "fpr_operand" "f")])))] - "TARGET_MEDIA" - "* -{ - switch (GET_CODE (operands[3])) - { - case AND: return \"cmand %4, %5, %2, %1, %e0\"; - case IOR: return \"cmor %4, %5, %2, %1, %e0\"; - case XOR: return \"cmxor %4, %5, %2, %1, %e0\"; - default: abort (); - } -}" - [(set_attr "length" "4") - (set_attr "type" "mlogic")]) - -;; Note, flow does not (currently) know how to handle an operation that uses -;; only part of the hard registers allocated for a multiregister value, such as -;; DImode in this case if the user is only interested in the lower 32-bits. So -;; we emit a USE of the entire register after the csmul instruction so it won't -;; get confused. See frv_ifcvt_modify_insn for more details. - -(define_insn "*cond_exec_si_smul" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:DI 2 "even_gpr_operand" "=e") - (mult:DI (sign_extend:DI (match_operand:SI 3 "integer_register_operand" "%d")) - (sign_extend:DI (match_operand:SI 4 "integer_register_operand" "d")))))] - "" - "csmul %3, %4, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "mul")]) - -(define_insn "*cond_exec_si_divide" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "integer_register_operand" "=d") - (match_operator:SI 3 "condexec_si_divide_operator" - [(match_operand:SI 4 "integer_register_operand" "d") - (match_operand:SI 5 "integer_register_operand" "d")])))] - "" - "* -{ - switch (GET_CODE (operands[3])) - { - case DIV: return \"csdiv %4, %z5, %2, %1, %e0\"; - case UDIV: return \"cudiv %4, %z5, %2, %1, %e0\"; - default: abort (); - } -}" - [(set_attr "length" "4") - (set_attr "type" "div")]) - -(define_insn "*cond_exec_si_unary1" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "integer_register_operand" "=d") - (match_operator:SI 3 "condexec_si_unary_operator" - [(match_operand:SI 4 "integer_register_operand" "d")])))] - "" - "* -{ - switch (GET_CODE (operands[3])) - { - case NOT: return \"cnot %4, %2, %1, %e0\"; - case NEG: return \"csub %., %4, %2, %1, %e0\"; - default: abort (); - } -}" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "*cond_exec_si_unary2" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "fpr_operand" "=f") - (not:SI (match_operand:SI 3 "fpr_operand" "f"))))] - "TARGET_MEDIA" - "cmnot %3, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "mlogic")]) - -(define_insn "*cond_exec_cmpsi_cc" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:CC 2 "icc_operand" "=t") - (compare:CC (match_operand:SI 3 "integer_register_operand" "d") - (match_operand:SI 4 "reg_or_0_operand" "dO"))))] - "reload_completed - && REGNO (operands[1]) == REGNO (operands[2]) - ICC_FIRST + ICR_FIRST" - "ccmp %3, %z4, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "*cond_exec_cmpsi_cc_uns" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:CC_UNS 2 "icc_operand" "=t") - (compare:CC_UNS (match_operand:SI 3 "integer_register_operand" "d") - (match_operand:SI 4 "reg_or_0_operand" "dO"))))] - "reload_completed - && REGNO (operands[1]) == REGNO (operands[2]) - ICC_FIRST + ICR_FIRST" - "ccmp %3, %z4, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -(define_insn "*cond_exec_sf_conv" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SF 2 "fpr_operand" "=f") - (match_operator:SF 3 "condexec_sf_conv_operator" - [(match_operand:SF 4 "fpr_operand" "f")])))] - "TARGET_HARD_FLOAT" - "* -{ - switch (GET_CODE (operands[3])) - { - case ABS: return \"cfabss %4, %2, %1, %e0\"; - case NEG: return \"cfnegs %4, %2, %1, %e0\"; - default: abort (); - } -}" - [(set_attr "length" "4") - (set_attr "type" "fsconv")]) - -(define_insn "*cond_exec_sf_add" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SF 2 "fpr_operand" "=f") - (match_operator:SF 3 "condexec_sf_add_operator" - [(match_operand:SF 4 "fpr_operand" "f") - (match_operand:SF 5 "fpr_operand" "f")])))] - "TARGET_HARD_FLOAT" - "* -{ - switch (GET_CODE (operands[3])) - { - case PLUS: return \"cfadds %4, %5, %2, %1, %e0\"; - case MINUS: return \"cfsubs %4, %5, %2, %1, %e0\"; - default: abort (); - } -}" - [(set_attr "length" "4") - (set_attr "type" "fsadd")]) - -(define_insn "*cond_exec_sf_mul" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SF 2 "fpr_operand" "=f") - (mult:SF (match_operand:SF 3 "fpr_operand" "f") - (match_operand:SF 4 "fpr_operand" "f"))))] - "TARGET_HARD_FLOAT" - "cfmuls %3, %4, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "fsmul")]) - -(define_insn "*cond_exec_sf_div" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SF 2 "fpr_operand" "=f") - (div:SF (match_operand:SF 3 "fpr_operand" "f") - (match_operand:SF 4 "fpr_operand" "f"))))] - "TARGET_HARD_FLOAT" - "cfdivs %3, %4, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "fsdiv")]) - -(define_insn "*cond_exec_sf_sqrt" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SF 2 "fpr_operand" "=f") - (sqrt:SF (match_operand:SF 3 "fpr_operand" "f"))))] - "TARGET_HARD_FLOAT" - "cfsqrts %3, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "fsdiv")]) - -(define_insn "*cond_exec_cmpsi_cc_fp" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:CC_FP 2 "fcc_operand" "=u") - (compare:CC_FP (match_operand:SF 3 "fpr_operand" "f") - (match_operand:SF 4 "fpr_operand" "f"))))] - "reload_completed && TARGET_HARD_FLOAT - && REGNO (operands[1]) == REGNO (operands[2]) - FCC_FIRST + FCR_FIRST" - "cfcmps %3, %4, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "fsconv")]) - - -;; :::::::::::::::::::: -;; :: -;; :: Logical operations on CR registers -;; :: -;; :::::::::::::::::::: - -;; We use UNSPEC to encode andcr/iorcr/etc. rather than the normal RTL -;; operations, since the RTL operations only have an idea of TRUE and FALSE, -;; while the CRs have TRUE, FALSE, and UNDEFINED. - -(define_expand "andcr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 0)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "orcr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 1)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "xorcr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 2)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "nandcr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 3)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "norcr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 4)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "andncr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 5)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "orncr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 6)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "nandncr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 7)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "norncr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_operand:CC_CCR 2 "cr_operand" "") - (const_int 8)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_expand "notcr" - [(set (match_operand:CC_CCR 0 "cr_operand" "") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "") - (match_dup 1) - (const_int 9)] UNSPEC_CR_LOGIC))] - "" - "") - -(define_insn "*logical_cr" - [(set (match_operand:CC_CCR 0 "cr_operand" "=C") - (unspec:CC_CCR [(match_operand:CC_CCR 1 "cr_operand" "C") - (match_operand:CC_CCR 2 "cr_operand" "C") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_CR_LOGIC))] - "" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case 0: return \"andcr %1, %2, %0\"; - case 1: return \"orcr %1, %2, %0\"; - case 2: return \"xorcr %1, %2, %0\"; - case 3: return \"nandcr %1, %2, %0\"; - case 4: return \"norcr %1, %2, %0\"; - case 5: return \"andncr %1, %2, %0\"; - case 6: return \"orncr %1, %2, %0\"; - case 7: return \"nandncr %1, %2, %0\"; - case 8: return \"norncr %1, %2, %0\"; - case 9: return \"notcr %1, %0\"; - } - - fatal_insn (\"logical_cr\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "ccr")]) - - -;; :::::::::::::::::::: -;; :: -;; :: Conditional move instructions -;; :: -;; :::::::::::::::::::: - - -;; - conditional moves based on floating-point comparisons require -;; TARGET_HARD_FLOAT, because an FPU is required to do the comparison. - -;; - conditional moves between FPRs based on integer comparisons -;; require TARGET_HAS_FPRS. - -(define_expand "movqicc" - [(set (match_operand:QI 0 "integer_register_operand" "") - (if_then_else:QI (match_operand 1 "" "") - (match_operand:QI 2 "gpr_or_int_operand" "") - (match_operand:QI 3 "gpr_or_int_operand" "")))] - "TARGET_COND_MOVE" - " -{ - if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) - FAIL; - - DONE; -}") - -(define_insn "*movqicc_internal1_signed" - [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d") - (if_then_else:QI (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:QI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:QI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movqicc_internal1_unsigned" - [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d") - (if_then_else:QI (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:QI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:QI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movqicc_internal1_float" - [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d") - (if_then_else:QI (match_operator:CC_FP 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u,u,u") - (const_int 0)]) - (match_operand:QI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:QI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] - "TARGET_HARD_FLOAT" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movqicc_internal2_signed" - [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:QI (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t,t,t") - (const_int 0)]) - (match_operand:QI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:QI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] - "(INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movqicc_internal2_unsigned" - [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:QI (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t") - (const_int 0)]) - (match_operand:QI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:QI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] - "(INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movqicc_internal2_float" - [(set (match_operand:QI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:QI (match_operator:CC_FP 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u") - (const_int 0)]) - (match_operand:QI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:QI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w"))] - "TARGET_HARD_FLOAT - && (INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_split - [(set (match_operand:QI 0 "integer_register_operand" "") - (if_then_else:QI (match_operator 1 "relational_operator" - [(match_operand 2 "cc_operand" "") - (const_int 0)]) - (match_operand:QI 3 "gpr_or_int_operand" "") - (match_operand:QI 4 "gpr_or_int_operand" ""))) - (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_cond_move (operands);") - -(define_expand "movhicc" - [(set (match_operand:HI 0 "integer_register_operand" "") - (if_then_else:HI (match_operand 1 "" "") - (match_operand:HI 2 "gpr_or_int_operand" "") - (match_operand:HI 3 "gpr_or_int_operand" "")))] - "TARGET_COND_MOVE" - " -{ - if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) - FAIL; - - DONE; -}") - -(define_insn "*movhicc_internal1_signed" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") - (if_then_else:HI (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:HI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:HI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movhicc_internal1_unsigned" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") - (if_then_else:HI (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:HI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:HI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movhicc_internal1_float" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d") - (if_then_else:HI (match_operator:CC_FP 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u,u,u") - (const_int 0)]) - (match_operand:HI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:HI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] - "TARGET_HARD_FLOAT" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movhicc_internal2_signed" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:HI (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t,t,t") - (const_int 0)]) - (match_operand:HI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:HI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] - "(INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movhicc_internal2_unsigned" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:HI (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t") - (const_int 0)]) - (match_operand:HI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:HI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] - "(INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movhicc_internal2_float" - [(set (match_operand:HI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:HI (match_operator:CC_FP 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u") - (const_int 0)]) - (match_operand:HI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:HI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w"))] - "TARGET_HARD_FLOAT - && (INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_split - [(set (match_operand:HI 0 "integer_register_operand" "") - (if_then_else:HI (match_operator 1 "relational_operator" - [(match_operand 2 "cc_operand" "") - (const_int 0)]) - (match_operand:HI 3 "gpr_or_int_operand" "") - (match_operand:HI 4 "gpr_or_int_operand" ""))) - (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_cond_move (operands);") - -(define_expand "movsicc" - [(set (match_operand:SI 0 "integer_register_operand" "") - (if_then_else:SI (match_operand 1 "" "") - (match_operand:SI 2 "gpr_or_int_operand" "") - (match_operand:SI 3 "gpr_or_int_operand" "")))] - "TARGET_COND_MOVE" - " -{ - if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) - FAIL; - - DONE; -}") - -(define_insn "*movsicc_internal1_signed" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") - (if_then_else:SI (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:SI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:SI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movsicc_internal1_unsigned" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") - (if_then_else:SI (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:SI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:SI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movsicc_internal1_float" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d") - (if_then_else:SI (match_operator:CC_FP 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u,u,u") - (const_int 0)]) - (match_operand:SI 3 "reg_or_0_operand" "0,dO,dO") - (match_operand:SI 4 "reg_or_0_operand" "dO,0,dO"))) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] - "TARGET_HARD_FLOAT" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movsicc_internal2_signed" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:SI (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t,t,t") - (const_int 0)]) - (match_operand:SI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:SI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] - "(INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movsicc_internal2_unsigned" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:SI (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t") - (const_int 0)]) - (match_operand:SI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:SI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v"))] - "(INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movsicc_internal2_float" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,d,d,d") - (if_then_else:SI (match_operator:CC_FP 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u") - (const_int 0)]) - (match_operand:SI 3 "const_int_operand" "O,O,L,n,n") - (match_operand:SI 4 "const_int_operand" "L,n,O,O,n"))) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w"))] - "TARGET_HARD_FLOAT - && (INTVAL (operands[3]) == 0 - || INTVAL (operands[4]) == 0 - || (IN_RANGE_P (INTVAL (operands[3]), -2048, 2047) - && IN_RANGE_P (INTVAL (operands[4]) - INTVAL (operands[3]), -2048, 2047)))" - "#" - [(set_attr "length" "8,12,8,12,12") - (set_attr "type" "multi")]) - -(define_split - [(set (match_operand:SI 0 "integer_register_operand" "") - (if_then_else:SI (match_operator 1 "relational_operator" - [(match_operand 2 "cc_operand" "") - (const_int 0)]) - (match_operand:SI 3 "gpr_or_int_operand" "") - (match_operand:SI 4 "gpr_or_int_operand" ""))) - (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_cond_move (operands);") - -(define_expand "movsfcc" - [(set (match_operand:SF 0 "register_operand" "") - (if_then_else:SF (match_operand 1 "" "") - (match_operand:SF 2 "register_operand" "") - (match_operand:SF 3 "register_operand" "")))] - "TARGET_COND_MOVE" - " -{ - if (!frv_emit_cond_move (operands[0], operands[1], operands[2], operands[3])) - FAIL; - - DONE; -}") - -(define_insn "*movsfcc_has_fprs_signed" - [(set (match_operand:SF 0 "register_operand" "=f,f,f,?f,?f,?d") - (if_then_else:SF (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t,t,t,t") - (const_int 0)]) - (match_operand:SF 3 "register_operand" "0,f,f,f,d,fd") - (match_operand:SF 4 "register_operand" "f,0,f,d,fd,fd"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v,v"))] - "TARGET_HAS_FPRS" - "#" - [(set_attr "length" "8,8,12,12,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movsfcc_has_fprs_unsigned" - [(set (match_operand:SF 0 "register_operand" "=f,f,f,?f,?f,?d") - (if_then_else:SF (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t,t,t,t") - (const_int 0)]) - (match_operand:SF 3 "register_operand" "0,f,f,f,d,fd") - (match_operand:SF 4 "register_operand" "f,0,f,d,fd,fd"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v,v,v,v"))] - "TARGET_HAS_FPRS" - "#" - [(set_attr "length" "8,8,12,12,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movsfcc_hardfloat_float" - [(set (match_operand:SF 0 "register_operand" "=f,f,f,?f,?f,?d") - (if_then_else:SF (match_operator:CC_FP 1 "float_relational_operator" - [(match_operand:CC_FP 2 "fcc_operand" "u,u,u,u,u,u") - (const_int 0)]) - (match_operand:SF 3 "register_operand" "0,f,f,f,d,fd") - (match_operand:SF 4 "register_operand" "f,0,f,d,fd,fd"))) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w,w,w,w"))] - "TARGET_HARD_FLOAT" - "#" - [(set_attr "length" "8,8,12,12,12,12") - (set_attr "type" "multi")]) - -(define_insn "*movsfcc_no_fprs_signed" - [(set (match_operand:SF 0 "integer_register_operand" "=d,d,d") - (if_then_else:SF (match_operator:CC 1 "signed_relational_operator" - [(match_operand:CC 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:SF 3 "integer_register_operand" "0,d,d") - (match_operand:SF 4 "integer_register_operand" "d,0,d"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "! TARGET_HAS_FPRS" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_insn "*movsfcc_no_fprs_unsigned" - [(set (match_operand:SF 0 "integer_register_operand" "=d,d,d") - (if_then_else:SF (match_operator:CC_UNS 1 "unsigned_relational_operator" - [(match_operand:CC_UNS 2 "icc_operand" "t,t,t") - (const_int 0)]) - (match_operand:SF 3 "integer_register_operand" "0,d,d") - (match_operand:SF 4 "integer_register_operand" "d,0,d"))) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "! TARGET_HAS_FPRS" - "#" - [(set_attr "length" "8,8,12") - (set_attr "type" "multi")]) - -(define_split - [(set (match_operand:SF 0 "register_operand" "") - (if_then_else:SF (match_operator 1 "relational_operator" - [(match_operand 2 "cc_operand" "") - (const_int 0)]) - (match_operand:SF 3 "register_operand" "") - (match_operand:SF 4 "register_operand" ""))) - (clobber (match_operand:CC_CCR 5 "cr_operand" ""))] - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_cond_move (operands);") - - -;; :::::::::::::::::::: -;; :: -;; :: Minimum, maximum, and integer absolute value -;; :: -;; :::::::::::::::::::: - -;; These 'instructions' are provided to give the compiler a slightly better -;; nudge at register allocation, then it would if it constructed the -;; instructions from basic building blocks (since it indicates it prefers one -;; of the operands to be the same as the destination. It also helps the -;; earlier passes of the compiler, by not breaking things into small basic -;; blocks. - -(define_expand "abssi2" - [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") - (abs:SI (match_operand:SI 1 "integer_register_operand" ""))) - (clobber (match_dup 2)) - (clobber (match_dup 3))])] - "TARGET_COND_MOVE" - " -{ - operands[2] = gen_reg_rtx (CCmode); - operands[3] = gen_reg_rtx (CC_CCRmode); -}") - -(define_insn_and_split "*abssi2_internal" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d") - (abs:SI (match_operand:SI 1 "integer_register_operand" "0,d"))) - (clobber (match_operand:CC 2 "icc_operand" "=t,t")) - (clobber (match_operand:CC_CCR 3 "icr_operand" "=v,v"))] - "TARGET_COND_MOVE" - "#" - "reload_completed" - [(match_dup 4)] - "operands[4] = frv_split_abs (operands);" - [(set_attr "length" "12,16") - (set_attr "type" "multi")]) - -(define_expand "sminsi3" - [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") - (smin:SI (match_operand:SI 1 "integer_register_operand" "") - (match_operand:SI 2 "gpr_or_int10_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE" - " -{ - operands[3] = gen_reg_rtx (CCmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_expand "smaxsi3" - [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") - (smax:SI (match_operand:SI 1 "integer_register_operand" "") - (match_operand:SI 2 "gpr_or_int10_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE" - " -{ - operands[3] = gen_reg_rtx (CCmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_insn_and_split "*minmax_si_signed" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,&d") - (match_operator:SI 1 "minmax_operator" - [(match_operand:SI 2 "integer_register_operand" "%0,dO,d") - (match_operand:SI 3 "gpr_or_int10_operand" "dO,0,dJ")])) - (clobber (match_operand:CC 4 "icc_operand" "=t,t,t")) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "TARGET_COND_MOVE" - "#" - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_minmax (operands);" - [(set_attr "length" "12,12,16") - (set_attr "type" "multi")]) - -(define_expand "uminsi3" - [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") - (umin:SI (match_operand:SI 1 "integer_register_operand" "") - (match_operand:SI 2 "gpr_or_int10_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE" - " -{ - operands[3] = gen_reg_rtx (CC_UNSmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_expand "umaxsi3" - [(parallel [(set (match_operand:SI 0 "integer_register_operand" "") - (umax:SI (match_operand:SI 1 "integer_register_operand" "") - (match_operand:SI 2 "gpr_or_int10_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE" - " -{ - operands[3] = gen_reg_rtx (CC_UNSmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_insn_and_split "*minmax_si_unsigned" - [(set (match_operand:SI 0 "integer_register_operand" "=d,d,&d") - (match_operator:SI 1 "minmax_operator" - [(match_operand:SI 2 "integer_register_operand" "%0,dO,d") - (match_operand:SI 3 "gpr_or_int10_operand" "dO,0,dJ")])) - (clobber (match_operand:CC_UNS 4 "icc_operand" "=t,t,t")) - (clobber (match_operand:CC_CCR 5 "icr_operand" "=v,v,v"))] - "TARGET_COND_MOVE" - "#" - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_minmax (operands);" - [(set_attr "length" "12,12,16") - (set_attr "type" "multi")]) - -(define_expand "sminsf3" - [(parallel [(set (match_operand:SF 0 "fpr_operand" "") - (smin:SF (match_operand:SF 1 "fpr_operand" "") - (match_operand:SF 2 "fpr_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE && TARGET_HARD_FLOAT" - " -{ - operands[3] = gen_reg_rtx (CC_FPmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_expand "smaxsf3" - [(parallel [(set (match_operand:SF 0 "fpr_operand" "") - (smax:SF (match_operand:SF 1 "fpr_operand" "") - (match_operand:SF 2 "fpr_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE && TARGET_HARD_FLOAT" - " -{ - operands[3] = gen_reg_rtx (CC_FPmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_insn_and_split "*minmax_sf" - [(set (match_operand:SF 0 "fpr_operand" "=f,f,f") - (match_operator:SF 1 "minmax_operator" - [(match_operand:SF 2 "fpr_operand" "%0,f,f") - (match_operand:SF 3 "fpr_operand" "f,0,f")])) - (clobber (match_operand:CC_FP 4 "fcc_operand" "=u,u,u")) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] - "TARGET_COND_MOVE && TARGET_HARD_FLOAT" - "#" - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_minmax (operands);" - [(set_attr "length" "12,12,16") - (set_attr "type" "multi")]) - -(define_expand "smindf3" - [(parallel [(set (match_operand:DF 0 "fpr_operand" "") - (smin:DF (match_operand:DF 1 "fpr_operand" "") - (match_operand:DF 2 "fpr_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE && TARGET_HARD_FLOAT && TARGET_DOUBLE" - " -{ - operands[3] = gen_reg_rtx (CC_FPmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_expand "smaxdf3" - [(parallel [(set (match_operand:DF 0 "fpr_operand" "") - (smax:DF (match_operand:DF 1 "fpr_operand" "") - (match_operand:DF 2 "fpr_operand" ""))) - (clobber (match_dup 3)) - (clobber (match_dup 4))])] - "TARGET_COND_MOVE && TARGET_HARD_FLOAT && TARGET_DOUBLE" - " -{ - operands[3] = gen_reg_rtx (CC_FPmode); - operands[4] = gen_reg_rtx (CC_CCRmode); -}") - -(define_insn_and_split "*minmax_df" - [(set (match_operand:DF 0 "fpr_operand" "=f,f,f") - (match_operator:DF 1 "minmax_operator" - [(match_operand:DF 2 "fpr_operand" "%0,f,f") - (match_operand:DF 3 "fpr_operand" "f,0,f")])) - (clobber (match_operand:CC_FP 4 "fcc_operand" "=u,u,u")) - (clobber (match_operand:CC_CCR 5 "fcr_operand" "=w,w,w"))] - "TARGET_COND_MOVE && TARGET_HARD_FLOAT && TARGET_DOUBLE" - "#" - "reload_completed" - [(match_dup 6)] - "operands[6] = frv_split_minmax (operands);" - [(set_attr "length" "12,12,16") - (set_attr "type" "multi")]) - - -;; :::::::::::::::::::: -;; :: -;; :: Call and branch instructions -;; :: -;; :::::::::::::::::::: - -;; Subroutine call instruction returning no value. Operand 0 is the function -;; to call; operand 1 is the number of bytes of arguments pushed (in mode -;; `SImode', except it is normally a `const_int'); operand 2 is the number of -;; registers used as operands. - -;; On most machines, operand 2 is not actually stored into the RTL pattern. It -;; is supplied for the sake of some RISC machines which need to put this -;; information into the assembler code; they can put it in the RTL instead of -;; operand 1. - -(define_expand "call" - [(use (match_operand:QI 0 "" "")) - (use (match_operand 1 "" "")) - (use (match_operand 2 "" "")) - (use (match_operand 3 "" ""))] - "" - " -{ - rtx lr = gen_rtx_REG (Pmode, LR_REGNO); - rtx addr; - - if (GET_CODE (operands[0]) != MEM) - abort (); - - addr = XEXP (operands[0], 0); - if (! call_operand (addr, Pmode)) - addr = force_reg (Pmode, addr); - - if (! operands[2]) - operands[2] = const0_rtx; - - emit_call_insn (gen_call_internal (addr, operands[1], operands[2], lr)); - DONE; -}") - -(define_insn "call_internal" - [(call (mem:QI (match_operand:SI 0 "call_operand" "S,dNOP")) - (match_operand 1 "" "")) - (use (match_operand 2 "" "")) - (clobber (match_operand:SI 3 "lr_operand" "=l,l"))] - "" - "@ - call %0 - call%i0l %M0" - [(set_attr "length" "4") - (set_attr "type" "call,jumpl")]) - -;; Subroutine call instruction returning a value. Operand 0 is the hard -;; register in which the value is returned. There are three more operands, the -;; same as the three operands of the `call' instruction (but with numbers -;; increased by one). - -;; Subroutines that return `BLKmode' objects use the `call' insn. - -(define_expand "call_value" - [(use (match_operand 0 "" "")) - (use (match_operand:QI 1 "" "")) - (use (match_operand 2 "" "")) - (use (match_operand 3 "" "")) - (use (match_operand 4 "" ""))] - "" - " -{ - rtx lr = gen_rtx_REG (Pmode, LR_REGNO); - rtx addr; - - if (GET_CODE (operands[1]) != MEM) - abort (); - - addr = XEXP (operands[1], 0); - if (! call_operand (addr, Pmode)) - addr = force_reg (Pmode, addr); - - if (! operands[3]) - operands[3] = const0_rtx; - - emit_call_insn (gen_call_value_internal (operands[0], addr, operands[2], - operands[3], lr)); - DONE; -}") - -(define_insn "call_value_internal" - [(set (match_operand 0 "register_operand" "=d,d") - (call (mem:QI (match_operand:SI 1 "call_operand" "S,dNOP")) - (match_operand 2 "" ""))) - (use (match_operand 3 "" "")) - (clobber (match_operand:SI 4 "lr_operand" "=l,l"))] - "" - "@ - call %1 - call%i1l %M1" - [(set_attr "length" "4") - (set_attr "type" "call,jumpl")]) - -;; return instruction generated instead of jmp to epilog -(define_expand "return" - [(parallel [(return) - (use (match_dup 0)) - (use (const_int 1))])] - "direct_return_p ()" - " -{ - operands[0] = gen_rtx_REG (Pmode, LR_REGNO); -}") - -;; return instruction generated by the epilogue -(define_expand "epilogue_return" - [(parallel [(return) - (use (match_operand:SI 0 "register_operand" "")) - (use (const_int 0))])] - "" - "") - -(define_insn "*return_internal" - [(return) - (use (match_operand:SI 0 "register_operand" "l,d")) - (use (match_operand:SI 1 "immediate_operand" "n,n"))] - "" - "@ - ret - jmpl @(%0,%.)" - [(set_attr "length" "4") - (set_attr "type" "jump,jumpl")]) - -;; A version of addsi3 for deallocating stack space at the end of the -;; epilogue. The addition is done in parallel with an (unspec_volatile), -;; which represents the clobbering of the deallocated space. -(define_insn "stack_adjust" - [(set (match_operand:SI 0 "register_operand" "=d") - (plus:SI (match_operand:SI 1 "register_operand" "d") - (match_operand:SI 2 "general_operand" "dNOP"))) - (unspec_volatile [(const_int 0)] UNSPEC_STACK_ADJUST)] - "" - "add%I2 %1,%2,%0" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Normal unconditional jump - -;; Use the "call" instruction for long branches, but prefer to use "bra" for -;; short ones since it does not force us to save the link register. - -;; This define_insn uses the branch-shortening code to decide which -;; instruction it emits. Since the main branch-shortening interface is -;; through get_attr_length(), the two alternatives must be given different -;; lengths. Here we pretend that the far jump is 8 rather than 4 bytes -;; long, though both alternatives are really the same size. -(define_insn "jump" - [(set (pc) (label_ref (match_operand 0 "" "")))] - "" - "* -{ - if (get_attr_length (insn) == 4) - return \"bra %l0\"; - else - return \"call %l0\"; -}" - [(set (attr "length") - (if_then_else - (and (ge (minus (match_dup 0) (pc)) (const_int -32768)) - (le (minus (match_dup 0) (pc)) (const_int 32764))) - (const_int 4) - (const_int 8))) - (set (attr "far_jump") - (if_then_else - (eq_attr "length" "4") - (const_string "no") - (const_string "yes"))) - (set (attr "type") - (if_then_else - (eq_attr "length" "4") - (const_string "jump") - (const_string "call")))]) - -;; Indirect jump through a register -(define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "register_operand" "d,l"))] - "" - "@ - jmpl @(%0,%.) - bralr" - [(set_attr "length" "4") - (set_attr "type" "jumpl,branch")]) - -;; Instruction to jump to a variable address. This is a low-level capability -;; which can be used to implement a dispatch table when there is no `casesi' -;; pattern. Either the 'casesi' pattern or the 'tablejump' pattern, or both, -;; MUST be present in this file. - -;; This pattern requires two operands: the address or offset, and a label which -;; should immediately precede the jump table. If the macro -;; `CASE_VECTOR_PC_RELATIVE' is defined then the first operand is an offset -;; which counts from the address of the table; otherwise, it is an absolute -;; address to jump to. In either case, the first operand has mode `Pmode'. - -;; The `tablejump' insn is always the last insn before the jump table it uses. -;; Its assembler code normally has no need to use the second operand, but you -;; should incorporate it in the RTL pattern so that the jump optimizer will not -;; delete the table as unreachable code. - -(define_expand "tablejump" - [(parallel [(set (pc) (match_operand:SI 0 "address_operand" "p")) - (use (label_ref (match_operand 1 "" "")))])] - "!flag_pic" - "") - -(define_insn "tablejump_insn" - [(set (pc) (match_operand:SI 0 "address_operand" "p")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jmp%I0l %M0" - [(set_attr "length" "4") - (set_attr "type" "jumpl")]) - -;; Implement switch statements when generating PIC code. Switches are -;; implemented by `tablejump' when not using -fpic. - -;; Emit code here to do the range checking and make the index zero based. -;; operand 0 is the index -;; operand 1 is the lower bound -;; operand 2 is the range of indices (highest - lowest + 1) -;; operand 3 is the label that precedes the table itself -;; operand 4 is the fall through label - -(define_expand "casesi" - [(use (match_operand:SI 0 "integer_register_operand" "")) - (use (match_operand:SI 1 "const_int_operand" "")) - (use (match_operand:SI 2 "const_int_operand" "")) - (use (match_operand 3 "" "")) - (use (match_operand 4 "" ""))] - "flag_pic" - " -{ - rtx indx; - rtx scale; - rtx low = operands[1]; - rtx range = operands[2]; - rtx table = operands[3]; - rtx treg; - rtx fail = operands[4]; - rtx mem; - rtx reg2; - rtx reg3; - - if (GET_CODE (operands[1]) != CONST_INT) - abort (); - - if (GET_CODE (operands[2]) != CONST_INT) - abort (); - - /* If we can't generate an immediate instruction, promote to register. */ - if (! IN_RANGE_P (INTVAL (range), -2048, 2047)) - range = force_reg (SImode, range); - - /* If low bound is 0, we don't have to subtract it. */ - if (INTVAL (operands[1]) == 0) - indx = operands[0]; - else - { - indx = gen_reg_rtx (SImode); - if (IN_RANGE_P (INTVAL (low), -2047, 2048)) - emit_insn (gen_addsi3 (indx, operands[0], GEN_INT (- INTVAL (low)))); - else - emit_insn (gen_subsi3 (indx, operands[0], force_reg (SImode, low))); - } - - /* Do an unsigned comparison (in the proper mode) between the index - expression and the value which represents the length of the range. - Since we just finished subtracting the lower bound of the range - from the index expression, this comparison allows us to simultaneously - check that the original index expression value is both greater than - or equal to the minimum value of the range and less than or equal to - the maximum value of the range. */ - - emit_cmp_and_jump_insns (indx, range, GTU, NULL_RTX, SImode, 1, fail); - - /* Move the table address to a register. */ - treg = gen_reg_rtx (Pmode); - emit_insn (gen_movsi (treg, gen_rtx_LABEL_REF (VOIDmode, table))); - - /* Scale index-low by wordsize. */ - scale = gen_reg_rtx (SImode); - emit_insn (gen_ashlsi3 (scale, indx, GEN_INT (2))); - - /* Load the address, add the start of the table back in, - and jump to it. */ - mem = gen_rtx_MEM (SImode, gen_rtx_PLUS (Pmode, scale, treg)); - reg2 = gen_reg_rtx (SImode); - reg3 = gen_reg_rtx (SImode); - emit_insn (gen_movsi (reg2, mem)); - emit_insn (gen_addsi3 (reg3, reg2, treg)); - emit_jump_insn (gen_tablejump_insn (reg3, table)); - DONE; -}") - - -;; :::::::::::::::::::: -;; :: -;; :: Prologue and Epilogue instructions -;; :: -;; :::::::::::::::::::: - -;; Called after register allocation to add any instructions needed for the -;; prologue. Using a prologue insn is favored compared to putting all of the -;; instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler -;; to intermix instructions with the saves of the caller saved registers. In -;; some cases, it might be necessary to emit a barrier instruction as the last -;; insn to prevent such scheduling. -(define_expand "prologue" - [(const_int 1)] - "" - " -{ - frv_expand_prologue (); - DONE; -}") - -;; Called after register allocation to add any instructions needed for the -;; epilogue. Using an epilogue insn is favored compared to putting all of the -;; instructions in the FUNCTION_EPILOGUE macro, since it allows the scheduler -;; to intermix instructions with the restires of the caller saved registers. -;; In some cases, it might be necessary to emit a barrier instruction as the -;; first insn to prevent such scheduling. -(define_expand "epilogue" - [(const_int 2)] - "" - " -{ - frv_expand_epilogue (FALSE); - DONE; -}") - -;; This pattern, if defined, emits RTL for exit from a function without the final -;; branch back to the calling function. This pattern will be emitted before any -;; sibling call (aka tail call) sites. -;; -;; The sibcall_epilogue pattern must not clobber any arguments used for -;; parameter passing or any stack slots for arguments passed to the current -;; function. -(define_expand "sibcall_epilogue" - [(const_int 3)] - "" - " -{ - frv_expand_epilogue (TRUE); - DONE; -}") - -;; Set up the pic register to hold the address of the pic table -(define_insn "pic_prologue" - [(set (match_operand:SI 0 "integer_register_operand" "=d") - (unspec_volatile:SI [(const_int 0)] UNSPEC_PIC_PROLOGUE)) - (clobber (match_operand:SI 1 "lr_operand" "=l")) - (clobber (match_operand:SI 2 "integer_register_operand" "=d"))] - "" - "* -{ - static int frv_pic_labelno = 0; - - operands[3] = GEN_INT (frv_pic_labelno++); - return \"call %P3\\n%P3:\;movsg %1, %0\;sethi #gprelhi(%P3), %2\;setlo #gprello(%P3), %2\;sub %0,%2,%0\"; -}" - [(set_attr "length" "16") - (set_attr "type" "multi")]) - -;; :::::::::::::::::::: -;; :: -;; :: Miscellaneous instructions -;; :: -;; :::::::::::::::::::: - -;; No operation, needed in case the user uses -g but not -O. -(define_insn "nop" - [(const_int 0)] - "" - "nop" - [(set_attr "length" "4") - (set_attr "type" "int")]) - -;; Pseudo instruction that prevents the scheduler from moving code above this -;; point. Note, type unknown is used to make sure the VLIW instructions are -;; not continued past this point. -(define_insn "blockage" - [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] - "" - "# blockage" - [(set_attr "length" "0") - (set_attr "type" "unknown")]) - -;; :::::::::::::::::::: -;; :: -;; :: Media instructions -;; :: -;; :::::::::::::::::::: - -;; Unimplemented instructions: -;; - MCMPSH, MCMPUH - -(define_constants - [(UNSPEC_MLOGIC 100) - (UNSPEC_MNOT 101) - (UNSPEC_MAVEH 102) - (UNSPEC_MSATH 103) - (UNSPEC_MADDH 104) - (UNSPEC_MQADDH 105) - (UNSPEC_MPACKH 106) - (UNSPEC_MUNPACKH 107) - (UNSPEC_MDPACKH 108) - (UNSPEC_MBTOH 109) - (UNSPEC_MHTOB 110) - (UNSPEC_MROT 111) - (UNSPEC_MSHIFT 112) - (UNSPEC_MEXPDHW 113) - (UNSPEC_MEXPDHD 114) - (UNSPEC_MWCUT 115) - (UNSPEC_MMULH 116) - (UNSPEC_MMULXH 117) - (UNSPEC_MMACH 118) - (UNSPEC_MMRDH 119) - (UNSPEC_MQMULH 120) - (UNSPEC_MQMULXH 121) - (UNSPEC_MQMACH 122) - (UNSPEC_MCPX 123) - (UNSPEC_MQCPX 124) - (UNSPEC_MCUT 125) - (UNSPEC_MRDACC 126) - (UNSPEC_MRDACCG 127) - (UNSPEC_MWTACC 128) - (UNSPEC_MWTACCG 129) - (UNSPEC_MTRAP 130) - (UNSPEC_MCLRACC 131) - (UNSPEC_MCLRACCA 132) - (UNSPEC_MCOP1 133) - (UNSPEC_MCOP2 134) - (UNSPEC_MDUNPACKH 135) - (UNSPEC_MDUNPACKH_INTERNAL 136) - (UNSPEC_MBTOHE 137) - (UNSPEC_MBTOHE_INTERNAL 138) - (UNSPEC_MBTOHE 137) - (UNSPEC_MBTOHE_INTERNAL 138) - (UNSPEC_MQMACH2 139) - (UNSPEC_MADDACC 140) - (UNSPEC_MDADDACC 141) - (UNSPEC_MABSHS 142) - (UNSPEC_MDROTLI 143) - (UNSPEC_MCPLHI 144) - (UNSPEC_MCPLI 145) - (UNSPEC_MDCUTSSI 146) - (UNSPEC_MQSATHS 147) - (UNSPEC_MHSETLOS 148) - (UNSPEC_MHSETLOH 149) - (UNSPEC_MHSETHIS 150) - (UNSPEC_MHSETHIH 151) - (UNSPEC_MHDSETS 152) - (UNSPEC_MHDSETH 153) -]) - -;; Logic operations: type "mlogic" - -(define_expand "mand" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "fpr_operand" "") - (match_dup 3)] - UNSPEC_MLOGIC))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MAND);") - -(define_expand "mor" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "fpr_operand" "") - (match_dup 3)] - UNSPEC_MLOGIC))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MOR);") - -(define_expand "mxor" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "fpr_operand" "") - (match_dup 3)] - UNSPEC_MLOGIC))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MXOR);") - -(define_insn "*mlogic" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MLOGIC))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MAND: return \"mand %1, %2, %0\"; - case FRV_BUILTIN_MOR: return \"mor %1, %2, %0\"; - case FRV_BUILTIN_MXOR: return \"mxor %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mlogic\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mlogic")]) - -(define_insn "*cond_exec_mlogic" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") - (match_operand:SI 4 "fpr_operand" "f") - (match_operand:SI 5 "const_int_operand" "n")] - UNSPEC_MLOGIC)))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[5])) - { - default: break; - case FRV_BUILTIN_MAND: return \"cmand %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MOR: return \"cmor %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MXOR: return \"cmxor %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_mlogic\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mlogic")]) - -;; Logical not: type "mlogic" - -(define_insn "mnot" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MNOT))] - "TARGET_MEDIA" - "mnot %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mlogic")]) - -(define_insn "*cond_exec_mnot" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 3 "fpr_operand" "f")] UNSPEC_MNOT)))] - "TARGET_MEDIA" - "cmnot %3, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "mlogic")]) - -;; Dual average (halfword): type "maveh" - -(define_insn "maveh" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f")] - UNSPEC_MAVEH))] - "TARGET_MEDIA" - "maveh %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "maveh")]) - -;; Dual saturation (halfword): type "msath" - -(define_expand "msaths" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 3)] - UNSPEC_MSATH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MSATHS);") - -(define_expand "msathu" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 3)] - UNSPEC_MSATH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MSATHU);") - -(define_insn "*msath" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MSATH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MSATHS: return \"msaths %1, %2, %0\"; - case FRV_BUILTIN_MSATHU: return \"msathu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, msath\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "msath")]) - -;; Dual addition/subtraction with saturation (halfword): type "maddh" - -(define_expand "maddhss" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 3)] - UNSPEC_MADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MADDHSS);") - -(define_expand "maddhus" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 3)] - UNSPEC_MADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MADDHUS);") - -(define_expand "msubhss" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 3)] - UNSPEC_MADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MSUBHSS);") - -(define_expand "msubhus" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 3)] - UNSPEC_MADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MSUBHUS);") - -(define_insn "*maddh" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MADDH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MADDHSS: return \"maddhss %1, %2, %0\"; - case FRV_BUILTIN_MADDHUS: return \"maddhus %1, %2, %0\"; - case FRV_BUILTIN_MSUBHSS: return \"msubhss %1, %2, %0\"; - case FRV_BUILTIN_MSUBHUS: return \"msubhus %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, maddh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "maddh")]) - -(define_insn "*cond_exec_maddh" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") - (match_operand:SI 4 "fpr_operand" "f") - (match_operand:SI 5 "const_int_operand" "n")] - UNSPEC_MADDH)))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[5])) - { - default: break; - case FRV_BUILTIN_MADDHSS: return \"cmaddhss %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MADDHUS: return \"cmaddhus %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MSUBHSS: return \"cmsubhss %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MSUBHUS: return \"cmsubhus %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_maddh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "maddh")]) - -;; Quad addition/subtraction with saturation (halfword): type "mqaddh" - -(define_expand "mqaddhss" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 3)] - UNSPEC_MQADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MQADDHSS);") - -(define_expand "mqaddhus" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 3)] - UNSPEC_MQADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MQADDHUS);") - -(define_expand "mqsubhss" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 3)] - UNSPEC_MQADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MQSUBHSS);") - -(define_expand "mqsubhus" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 3)] - UNSPEC_MQADDH))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MQSUBHUS);") - -(define_insn "*mqaddh" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MQADDH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MQADDHSS: return \"mqaddhss %1, %2, %0\"; - case FRV_BUILTIN_MQADDHUS: return \"mqaddhus %1, %2, %0\"; - case FRV_BUILTIN_MQSUBHSS: return \"mqsubhss %1, %2, %0\"; - case FRV_BUILTIN_MQSUBHUS: return \"mqsubhus %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mqaddh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqaddh")]) - -(define_insn "*cond_exec_mqaddh" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:DI 2 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 3 "even_fpr_operand" "h") - (match_operand:DI 4 "even_fpr_operand" "h") - (match_operand:SI 5 "const_int_operand" "n")] - UNSPEC_MQADDH)))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[5])) - { - default: break; - case FRV_BUILTIN_MQADDHSS: return \"cmqaddhss %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MQADDHUS: return \"cmqaddhus %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MQSUBHSS: return \"cmqsubhss %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MQSUBHUS: return \"cmqsubhus %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_mqaddh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqaddh")]) - -;; Pack halfword: type "mpackh" - -(define_insn "mpackh" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:HI 1 "fpr_operand" "f") - (match_operand:HI 2 "fpr_operand" "f")] - UNSPEC_MPACKH))] - "TARGET_MEDIA" - "mpackh %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mpackh")]) - -;; Unpack halfword: type "mpackh" - -(define_insn "munpackh" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f")] - UNSPEC_MUNPACKH))] - "TARGET_MEDIA" - "munpackh %1, %0" - [(set_attr "length" "4") - (set_attr "type" "munpackh")]) - -;; Dual pack halfword: type "mdpackh" - -(define_insn "mdpackh" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h")] - UNSPEC_MDPACKH))] - "TARGET_MEDIA" - "mdpackh %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mdpackh")]) - -;; Byte-halfword conversion: type "mbhconv" - -(define_insn "mbtoh" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f")] - UNSPEC_MBTOH))] - "TARGET_MEDIA" - "mbtoh %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mbhconv")]) - -(define_insn "*cond_exec_mbtoh" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:DI 2 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:SI 3 "fpr_operand" "f")] - UNSPEC_MBTOH)))] - "TARGET_MEDIA" - "cmbtoh %3, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "mbhconv")]) - -(define_insn "mhtob" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:DI 1 "even_fpr_operand" "h")] - UNSPEC_MHTOB))] - "TARGET_MEDIA" - "mhtob %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mbhconv")]) - -(define_insn "*cond_exec_mhtob" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "fpr_operand" "=f") - (unspec:SI [(match_operand:DI 3 "even_fpr_operand" "h")] - UNSPEC_MHTOB)))] - "TARGET_MEDIA" - "cmhtob %3, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "mbhconv")]) - -;; Rotate: type "mrot" - -(define_expand "mrotli" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "uint5_operand" "") - (match_dup 3)] - UNSPEC_MROT))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MROTLI);") - -(define_expand "mrotri" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "uint5_operand" "") - (match_dup 3)] - UNSPEC_MROT))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MROTRI);") - -(define_insn "*mrot" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "uint5_operand" "I") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MROT))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MROTLI: return \"mrotli %1, %2, %0\"; - case FRV_BUILTIN_MROTRI: return \"mrotri %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mrot\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mrot")]) - -;; Dual shift halfword: type "msh" - -(define_expand "msllhi" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "uint4_operand" "") - (match_dup 3)] - UNSPEC_MSHIFT))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MSLLHI);") - -(define_expand "msrlhi" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "uint4_operand" "") - (match_dup 3)] - UNSPEC_MSHIFT))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MSRLHI);") - -(define_expand "msrahi" - [(set (match_operand:SI 0 "fpr_operand" "") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "") - (match_operand:SI 2 "uint4_operand" "") - (match_dup 3)] - UNSPEC_MSHIFT))] - "TARGET_MEDIA" - "operands[3] = GEN_INT (FRV_BUILTIN_MSRAHI);") - -(define_insn "*mshift" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "uint4_operand" "I") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MSHIFT))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MSLLHI: return \"msllhi %1, %2, %0\"; - case FRV_BUILTIN_MSRLHI: return \"msrlhi %1, %2, %0\"; - case FRV_BUILTIN_MSRAHI: return \"msrahi %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mshift\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mshift")]) - -;; Expand halfword to word: type "mexpdhw" - -(define_insn "mexpdhw" - [(set (match_operand:SI 0 "even_fpr_operand" "=h") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "uint1_operand" "I")] - UNSPEC_MEXPDHW))] - "TARGET_MEDIA" - "mexpdhw %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mexpdhw")]) - -(define_insn "*cond_exec_mexpdhw" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:SI 2 "even_fpr_operand" "=h") - (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") - (match_operand:SI 4 "uint1_operand" "I")] - UNSPEC_MEXPDHW)))] - "TARGET_MEDIA" - "cmexpdhw %3, %4, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "mexpdhw")]) - -;; Expand halfword to double: type "mexpdhd" - -(define_insn "mexpdhd" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "uint1_operand" "I")] - UNSPEC_MEXPDHD))] - "TARGET_MEDIA" - "mexpdhd %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mexpdhd")]) - -(define_insn "*cond_exec_mexpdhd" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (set (match_operand:DI 2 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:SI 3 "fpr_operand" "f") - (match_operand:SI 4 "uint1_operand" "I")] - UNSPEC_MEXPDHD)))] - "TARGET_MEDIA" - "cmexpdhd %3, %4, %2, %1, %e0" - [(set_attr "length" "4") - (set_attr "type" "mexpdhd")]) - -;; FR cut: type "mwcut" - -(define_insn "mwcut" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:DI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_or_int6_operand" "fI")] - UNSPEC_MWCUT))] - "TARGET_MEDIA" - "mwcut%i2 %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mwcut")]) - -;; Dual multiplication (halfword): type "mmulh" - -(define_expand "mmulhs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MMULH)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MMULH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMULHS);") - -(define_expand "mmulhu" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MMULH)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MMULH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMULHU);") - -(define_insn "*mmulh" - [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MMULH)) - (set (match_operand:HI 4 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MMULH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MMULHS: return \"mmulhs %1, %2, %0\"; - case FRV_BUILTIN_MMULHU: return \"mmulhu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mmulh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mmulh")]) - -(define_insn "*cond_exec_mmulh" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (parallel [(set (match_operand:DI 2 "even_acc_operand" "=b") - (unspec:DI [(match_operand:SI 3 "fpr_operand" "f") - (match_operand:SI 4 "fpr_operand" "f") - (match_operand:SI 5 "const_int_operand" "n")] - UNSPEC_MMULH)) - (set (match_operand:HI 6 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MMULH))]))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[5])) - { - default: break; - case FRV_BUILTIN_MMULHS: return \"cmmulhs %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MMULHU: return \"cmmulhu %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_mmulh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mmulh")]) - -;; Dual cross multiplication (halfword): type "mmulxh" - -(define_expand "mmulxhs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MMULXH)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MMULXH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMULXHS);") - -(define_expand "mmulxhu" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MMULXH)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MMULXH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMULXHU);") - -(define_insn "*mmulxh" - [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MMULXH)) - (set (match_operand:HI 4 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MMULXH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MMULXHS: return \"mmulxhs %1, %2, %0\"; - case FRV_BUILTIN_MMULXHU: return \"mmulxhu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mmulxh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mmulxh")]) - -;; Dual product-sum (halfword): type "mmach" - -(define_expand "mmachs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") - (unspec:DI [(match_dup 0) - (match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:HI 3 "accg_operand" "+B") - (match_dup 4)] - UNSPEC_MMACH)) - (set (match_dup 3) - (unspec:HI [(const_int 0)] UNSPEC_MMACH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMACHS);") - -(define_expand "mmachu" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") - (unspec:DI [(match_dup 0) - (match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:HI 3 "accg_operand" "+B") - (match_dup 4)] - UNSPEC_MMACH)) - (set (match_dup 3) - (unspec:HI [(const_int 0)] UNSPEC_MMACH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMACHU);") - -(define_insn "*mmach" - [(set (match_operand:DI 0 "even_acc_operand" "+b") - (unspec:DI [(match_dup 0) - (match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:HI 3 "accg_operand" "+B") - (match_operand:SI 4 "const_int_operand" "n")] - UNSPEC_MMACH)) - (set (match_dup 3) (unspec:HI [(const_int 0)] UNSPEC_MMACH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[4])) - { - default: break; - case FRV_BUILTIN_MMACHS: return \"mmachs %1, %2, %0\"; - case FRV_BUILTIN_MMACHU: return \"mmachu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mmach\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mmach")]) - -(define_insn "*cond_exec_mmach" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (parallel [(set (match_operand:DI 2 "even_acc_operand" "+b") - (unspec:DI [(match_dup 2) - (match_operand:SI 3 "fpr_operand" "f") - (match_operand:SI 4 "fpr_operand" "f") - (match_operand:HI 5 "accg_operand" "+B") - (match_operand:SI 6 "const_int_operand" "n")] - UNSPEC_MMACH)) - (set (match_dup 5) - (unspec:HI [(const_int 0)] UNSPEC_MMACH))]))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[6])) - { - default: break; - case FRV_BUILTIN_MMACHS: return \"cmmachs %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MMACHU: return \"cmmachu %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_mmach\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mmach")]) - -;; Dual product-difference: type "mmrdh" - -(define_expand "mmrdhs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") - (unspec:DI [(match_dup 0) - (match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:HI 3 "accg_operand" "+B") - (match_dup 4)] - UNSPEC_MMRDH)) - (set (match_dup 3) - (unspec:HI [(const_int 0)] UNSPEC_MMRDH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMRDHS);") - -(define_expand "mmrdhu" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "+b") - (unspec:DI [(match_dup 0) - (match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:HI 3 "accg_operand" "+B") - (match_dup 4)] - UNSPEC_MMRDH)) - (set (match_dup 3) - (unspec:HI [(const_int 0)] UNSPEC_MMRDH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MMRDHU);") - -(define_insn "*mmrdh" - [(set (match_operand:DI 0 "even_acc_operand" "+b") - (unspec:DI [(match_dup 0) - (match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:HI 3 "accg_operand" "+B") - (match_operand:SI 4 "const_int_operand" "n")] - UNSPEC_MMRDH)) - (set (match_dup 3) - (unspec:HI [(const_int 0)] UNSPEC_MMRDH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[4])) - { - default: break; - case FRV_BUILTIN_MMRDHS: return \"mmrdhs %1, %2, %0\"; - case FRV_BUILTIN_MMRDHU: return \"mmrdhu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mrdh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mmrdh")]) - -;; Quad multiply (halfword): type "mqmulh" - -(define_expand "mqmulhs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 4)] - UNSPEC_MQMULH)) - (set (match_operand:V4QI 3 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQMULHS);") - -(define_expand "mqmulhu" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 4)] - UNSPEC_MQMULH)) - (set (match_operand:V4QI 3 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQMULHU);") - -(define_insn "*mqmulh" - [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MQMULH)) - (set (match_operand:V4QI 4 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MQMULHS: return \"mqmulhs %1, %2, %0\"; - case FRV_BUILTIN_MQMULHU: return \"mqmulhu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mqmulh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqmulh")]) - -(define_insn "*cond_exec_mqmulh" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (parallel [(set (match_operand:V4SI 2 "quad_acc_operand" "=A") - (unspec:V4SI [(match_operand:DI 3 "even_fpr_operand" "h") - (match_operand:DI 4 "even_fpr_operand" "h") - (match_operand:SI 5 "const_int_operand" "n")] - UNSPEC_MQMULH)) - (set (match_operand:V4QI 6 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MQMULH))]))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[5])) - { - default: break; - case FRV_BUILTIN_MQMULHS: return \"cmqmulhs %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MQMULHU: return \"cmqmulhu %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_mqmulh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqmulh")]) - -;; Quad cross multiply (halfword): type "mqmulxh" - -(define_expand "mqmulxhs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 4)] - UNSPEC_MQMULXH)) - (set (match_operand:V4QI 3 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MQMULXH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQMULXHS);") - -(define_expand "mqmulxhu" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_dup 4)] - UNSPEC_MQMULXH)) - (set (match_operand:V4QI 3 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MQMULXH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQMULXHU);") - -(define_insn "*mqmulxh" - [(set (match_operand:V4SI 0 "quad_acc_operand" "=A") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MQMULXH)) - (set (match_operand:V4QI 4 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MQMULXH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MQMULXHS: return \"mqmulxhs %1, %2, %0\"; - case FRV_BUILTIN_MQMULXHU: return \"mqmulxhu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mqmulxh\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqmulxh")]) - -;; Quad product-sum (halfword): type "mqmach" - -(define_expand "mqmachs" - [(parallel [(set (match_operand:V4SI 0 "even_acc_operand" "+A") - (unspec:V4SI [(match_dup 0) - (match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_operand:V4QI 3 "accg_operand" "+B") - (match_dup 4)] - UNSPEC_MQMACH)) - (set (match_dup 3) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQMACHS);") - -(define_expand "mqmachu" - [(parallel [(set (match_operand:V4SI 0 "even_acc_operand" "+A") - (unspec:V4SI [(match_dup 0) - (match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_operand:V4QI 3 "accg_operand" "+B") - (match_dup 4)] - UNSPEC_MQMACH)) - (set (match_dup 3) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQMACHU);") - -(define_insn "*mqmach" - [(set (match_operand:V4SI 0 "even_acc_operand" "+A") - (unspec:V4SI [(match_dup 0) - (match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_operand:V4QI 3 "accg_operand" "+B") - (match_operand:SI 4 "const_int_operand" "n")] - UNSPEC_MQMACH)) - (set (match_dup 3) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[4])) - { - default: break; - case FRV_BUILTIN_MQMACHS: return \"mqmachs %1, %2, %0\"; - case FRV_BUILTIN_MQMACHU: return \"mqmachu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mqmach\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqmach")]) - -(define_insn "*cond_exec_mqmach" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (parallel [(set (match_operand:V4SI 2 "even_acc_operand" "+A") - (unspec:V4SI [(match_dup 2) - (match_operand:DI 3 "even_fpr_operand" "h") - (match_operand:DI 4 "even_fpr_operand" "h") - (match_operand:V4QI 5 "accg_operand" "+B") - (match_operand:SI 6 "const_int_operand" "n")] - UNSPEC_MQMACH)) - (set (match_dup 5) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH))]))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[6])) - { - default: break; - case FRV_BUILTIN_MQMACHS: return \"cmqmachs %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MQMACHU: return \"cmqmachu %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_mqmach\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqmach")]) - -;; Dual complex number product-sum (halfword) - -(define_expand "mcpxrs" - [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MCPX)) - (set (match_operand:QI 3 "accg_operand" "=B") - (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MCPXRS);") - -(define_expand "mcpxru" - [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MCPX)) - (set (match_operand:QI 3 "accg_operand" "=B") - (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MCPXRU);") - -(define_expand "mcpxis" - [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MCPX)) - (set (match_operand:QI 3 "accg_operand" "=B") - (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MCPXIS);") - -(define_expand "mcpxiu" - [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MCPX)) - (set (match_operand:QI 3 "accg_operand" "=B") - (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MCPXIU);") - -(define_insn "*mcpx" - [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MCPX)) - (set (match_operand:QI 4 "accg_operand" "=B") - (unspec:QI [(const_int 0)] UNSPEC_MCPX))])] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MCPXRS: return \"mcpxrs %1, %2, %0\"; - case FRV_BUILTIN_MCPXRU: return \"mcpxru %1, %2, %0\"; - case FRV_BUILTIN_MCPXIS: return \"mcpxis %1, %2, %0\"; - case FRV_BUILTIN_MCPXIU: return \"mcpxiu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mcpx\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mcpx")]) - -(define_insn "*cond_exec_mcpx" - [(cond_exec - (match_operator 0 "ccr_eqne_operator" - [(match_operand 1 "cr_operand" "C") - (const_int 0)]) - (parallel [(set (match_operand:SI 2 "acc_operand" "=a") - (unspec:SI [(match_operand:SI 3 "fpr_operand" "f") - (match_operand:SI 4 "fpr_operand" "f") - (match_operand:SI 5 "const_int_operand" "n")] - UNSPEC_MCPX)) - (set (match_operand:QI 6 "accg_operand" "=B") - (unspec:QI [(const_int 0)] UNSPEC_MCPX))]))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[5])) - { - default: break; - case FRV_BUILTIN_MCPXRS: return \"cmcpxrs %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MCPXRU: return \"cmcpxru %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MCPXIS: return \"cmcpxis %3, %4, %2, %1, %e0\"; - case FRV_BUILTIN_MCPXIU: return \"cmcpxiu %3, %4, %2, %1, %e0\"; - } - - fatal_insn (\"Bad media insn, cond_exec_mcpx\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mcpx")]) - -;; Quad complex number product-sum (halfword): type "mqcpx" - -(define_expand "mqcpxrs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") - (match_operand:DI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MQCPX)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXRS);") - -(define_expand "mqcpxru" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") - (match_operand:DI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MQCPX)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXRU);") - -(define_expand "mqcpxis" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") - (match_operand:DI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MQCPX)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXIS);") - -(define_expand "mqcpxiu" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") - (match_operand:DI 2 "fpr_operand" "f") - (match_dup 4)] - UNSPEC_MQCPX)) - (set (match_operand:HI 3 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MQCPX))])] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MQCPXIU);") - -(define_insn "*mqcpx" - [(set (match_operand:DI 0 "even_acc_operand" "=b") - (unspec:DI [(match_operand:DI 1 "fpr_operand" "f") - (match_operand:DI 2 "fpr_operand" "f") - (match_operand:SI 3 "const_int_operand" "n")] - UNSPEC_MQCPX)) - (set (match_operand:HI 4 "accg_operand" "=B") - (unspec:HI [(const_int 0)] UNSPEC_MQCPX))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[3])) - { - default: break; - case FRV_BUILTIN_MQCPXRS: return \"mqcpxrs %1, %2, %0\"; - case FRV_BUILTIN_MQCPXRU: return \"mqcpxru %1, %2, %0\"; - case FRV_BUILTIN_MQCPXIS: return \"mqcpxis %1, %2, %0\"; - case FRV_BUILTIN_MQCPXIU: return \"mqcpxiu %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mqcpx\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqcpx")]) - -;; Cut: type "mcut" - -(define_expand "mcut" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "acc_operand" "a") - (match_operand:SI 2 "fpr_or_int6_operand" "fI") - (match_operand:QI 3 "accg_operand" "B") - (match_dup 4)] - UNSPEC_MCUT))] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MCUT);") - -(define_expand "mcutss" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "acc_operand" "a") - (match_operand:SI 2 "fpr_or_int6_operand" "fI") - (match_operand:QI 3 "accg_operand" "B") - (match_dup 4)] - UNSPEC_MCUT))] - "TARGET_MEDIA" - "operands[4] = GEN_INT (FRV_BUILTIN_MCUTSS);") - -(define_insn "*mcut" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "acc_operand" "a") - (match_operand:SI 2 "fpr_or_int6_operand" "fI") - (match_operand:QI 3 "accg_operand" "B") - (match_operand:SI 4 "const_int_operand" "n")] - UNSPEC_MCUT))] - "TARGET_MEDIA" - "* -{ - switch (INTVAL (operands[4])) - { - default: break; - case FRV_BUILTIN_MCUT: return \"mcut%i2 %1, %2, %0\"; - case FRV_BUILTIN_MCUTSS: return \"mcutss%i2 %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mcut\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mcut")]) - -;; Accumulator read: type "mrdacc" - -(define_insn "mrdacc" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "acc_operand" "a")] UNSPEC_MRDACC))] - "TARGET_MEDIA" - "mrdacc %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mrdacc")]) - -(define_insn "mrdaccg" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:QI 1 "accg_operand" "B")] UNSPEC_MRDACCG))] - "TARGET_MEDIA" - "mrdaccg %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mrdacc")]) - -;; Accumulator write: type "mwtacc" - -(define_insn "mwtacc" - [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MWTACC))] - "TARGET_MEDIA" - "mwtacc %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mwtacc")]) - -(define_insn "mwtaccg" - [(set (match_operand:QI 0 "accg_operand" "=B") - (unspec:QI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MWTACCG))] - "TARGET_MEDIA" - "mwtaccg %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mwtacc")]) - -;; Trap: This one executes on the control unit, not the media units. - -(define_insn "mtrap" - [(unspec_volatile [(const_int 0)] UNSPEC_MTRAP)] - "TARGET_MEDIA" - "mtrap" - [(set_attr "length" "4") - (set_attr "type" "trap")]) - -;; Clear single accumulator: type "mclracc" - -(define_insn "mclracc_internal" - [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(const_int 0)] UNSPEC_MCLRACC)) - (set (match_operand:QI 1 "accg_operand" "=B") - (unspec:QI [(const_int 0)] UNSPEC_MCLRACC))] - "TARGET_MEDIA" - "mclracc %0,#0" - [(set_attr "length" "4") - (set_attr "type" "mclracc")]) - -(define_expand "mclracc" - [(parallel [(set (match_operand:SI 0 "acc_operand" "=a") - (unspec:SI [(const_int 0)] UNSPEC_MCLRACC)) - (set (match_dup 1) - (unspec:QI [(const_int 0)] UNSPEC_MCLRACC))])] - "TARGET_MEDIA" - " -{ - if (GET_CODE (operands[0]) != REG || !ACC_P (REGNO (operands[0]))) - FAIL; - - operands[1] = frv_matching_accg_for_acc (operands[0]); -}") - -;; Clear all accumulators: type "mclracca" - -(define_insn "mclracca8_internal" - [(set (match_operand:V4SI 0 "quad_acc_operand" "=b") - (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_operand:V4SI 1 "quad_acc_operand" "=b") - (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_operand:V4QI 2 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_operand:V4QI 3 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))] - "TARGET_MEDIA && TARGET_ACC_8" - "mclracc acc0,#1" - [(set_attr "length" "4") - (set_attr "type" "mclracca")]) - -(define_insn "mclracca4_internal" - [(set (match_operand:V4SI 0 "quad_acc_operand" "=b") - (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_operand:V4QI 1 "accg_operand" "=B") - (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))] - "TARGET_MEDIA && TARGET_ACC_4" - "mclracc acc0,#1" - [(set_attr "length" "4") - (set_attr "type" "mclracca")]) - -(define_expand "mclracca8" - [(parallel [(set (match_dup 0) (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_dup 1) (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_dup 2) (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_dup 3) (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))])] - "TARGET_MEDIA && TARGET_ACC_8" - " -{ - operands[0] = gen_rtx_REG (V4SImode, ACC_FIRST); - operands[1] = gen_rtx_REG (V4SImode, ACC_FIRST + 4); - operands[2] = gen_rtx_REG (V4QImode, ACCG_FIRST); - operands[3] = gen_rtx_REG (V4QImode, ACCG_FIRST + 4); -}") - -(define_expand "mclracca4" - [(parallel [(set (match_dup 0) (unspec:V4SI [(const_int 0)] UNSPEC_MCLRACCA)) - (set (match_dup 1) (unspec:V4QI [(const_int 0)] UNSPEC_MCLRACCA))])] - "TARGET_MEDIA && TARGET_ACC_4" - " -{ - operands[0] = gen_rtx_REG (V4SImode, ACC_FIRST); - operands[1] = gen_rtx_REG (V4QImode, ACCG_FIRST); -}") - -(define_insn "mcop1" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f")] UNSPEC_MCOP1))] - "TARGET_MEDIA_REV1" - "mcop1 %1, %2, %0" - [(set_attr "length" "4") -;; What is the class of the insn ??? - (set_attr "type" "multi")]) - -(define_insn "mcop2" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f") - (match_operand:SI 2 "fpr_operand" "f")] UNSPEC_MCOP2))] - "TARGET_MEDIA_REV1" - "mcop2 %1, %2, %0" - [(set_attr "length" "4") -;; What is the class of the insn ??? - (set_attr "type" "multi")]) - -(define_insn "*mdunpackh_internal" - [(set (match_operand:V4SI 0 "quad_fpr_operand" "=x") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h")] - UNSPEC_MDUNPACKH_INTERNAL))] - "TARGET_MEDIA_REV1" - "mdunpackh %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mdunpackh")]) - -(define_insn_and_split "mdunpackh" - [(set (match_operand:V4SI 0 "memory_operand" "=o") - (unspec:V4SI [(match_operand:DI 1 "even_fpr_operand" "h")] - UNSPEC_MDUNPACKH)) - (clobber (match_scratch:V4SI 2 "=x"))] - "TARGET_MEDIA_REV1" - "#" - "reload_completed" - [(set (match_dup 2) - (unspec:V4SI [(match_dup 1)] UNSPEC_MDUNPACKH_INTERNAL)) - (set (match_dup 3) - (match_dup 4)) - (set (match_dup 5) - (match_dup 6))] - " -{ - operands[3] = change_address (operands[0], DImode, NULL_RTX); - operands[4] = gen_rtx_REG (DImode, REGNO (operands[2])); - operands[5] = frv_index_memory (operands[0], DImode, 1); - operands[6] = gen_rtx_REG (DImode, REGNO (operands[2])+2); -}" - [(set_attr "length" "20") - (set_attr "type" "multi")]) - -(define_insn "*mbtohe_internal" - [(set (match_operand:V4SI 0 "quad_fpr_operand" "=x") - (unspec:V4SI [(match_operand:SI 1 "fpr_operand" "f")] - UNSPEC_MBTOHE_INTERNAL))] - "TARGET_MEDIA_REV1" - "mbtohe %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mbhconve")]) - -(define_insn_and_split "mbtohe" - [(set (match_operand:V4SI 0 "memory_operand" "=o") - (unspec:V4SI [(match_operand:SI 1 "fpr_operand" "f")] - UNSPEC_MBTOHE)) - (clobber (match_scratch:V4SI 2 "=x"))] - "TARGET_MEDIA_REV1" - "#" - "reload_completed" - [(set (match_dup 2) - (unspec:V4SI [(match_dup 1)] UNSPEC_MBTOHE_INTERNAL)) - (set (match_dup 3) - (match_dup 4)) - (set (match_dup 5) - (match_dup 6))] - " -{ - operands[3] = change_address (operands[0], DImode, NULL_RTX); - operands[4] = gen_rtx_REG (DImode, REGNO (operands[2])); - operands[5] = frv_index_memory (operands[0], DImode, 1); - operands[6] = gen_rtx_REG (DImode, REGNO (operands[2])+2); -}" - [(set_attr "length" "20") - (set_attr "type" "multi")]) - -;; Quad product-sum (halfword) instructions only found on the FR400. -;; type "mqmach" - -(define_expand "mqxmachs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") - (unspec:V4SI [(match_dup 0) - (match_operand:DI 1 "even_fpr_operand" "") - (match_operand:DI 2 "even_fpr_operand" "") - (match_operand:V4QI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MQMACH2)) - (set (match_dup 3) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MQXMACHS);") - -(define_expand "mqxmacxhs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") - (unspec:V4SI [(match_dup 0) - (match_operand:DI 1 "even_fpr_operand" "") - (match_operand:DI 2 "even_fpr_operand" "") - (match_operand:V4QI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MQMACH2)) - (set (match_dup 3) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MQXMACXHS);") - -(define_expand "mqmacxhs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") - (unspec:V4SI [(match_dup 0) - (match_operand:DI 1 "even_fpr_operand" "") - (match_operand:DI 2 "even_fpr_operand" "") - (match_operand:V4QI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MQMACH2)) - (set (match_dup 3) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MQMACXHS);") - -(define_insn "*mqmach2" - [(set (match_operand:V4SI 0 "quad_acc_operand" "+A") - (unspec:V4SI [(match_dup 0) - (match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h") - (match_operand:V4QI 3 "accg_operand" "+B") - (match_operand:SI 4 "const_int_operand" "n")] - UNSPEC_MQMACH2)) - (set (match_dup 3) - (unspec:V4QI [(const_int 0)] UNSPEC_MQMACH2))] - "TARGET_MEDIA_REV2" - "* -{ - switch (INTVAL (operands[4])) - { - default: break; - case FRV_BUILTIN_MQXMACHS: return \"mqxmachs %1, %2, %0\"; - case FRV_BUILTIN_MQXMACXHS: return \"mqxmacxhs %1, %2, %0\"; - case FRV_BUILTIN_MQMACXHS: return \"mqmacxhs %1, %2, %0\"; - } - - fatal_insn (\"Bad media insn, mqmach2\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mqmach")]) - -;; Accumulator addition/subtraction: type "maddacc" - -(define_expand "maddaccs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "") - (unspec:DI [(match_dup 0) - (match_operand:DI 1 "even_acc_operand" "")] - UNSPEC_MADDACC)) - (set (match_operand:HI 2 "accg_operand" "") - (unspec:HI [(match_dup 2) - (match_operand:HI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MADDACC))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MADDACCS);") - -(define_expand "msubaccs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "") - (unspec:DI [(match_dup 0) - (match_operand:DI 1 "even_acc_operand" "")] - UNSPEC_MADDACC)) - (set (match_operand:HI 2 "accg_operand" "") - (unspec:HI [(match_dup 2) - (match_operand:HI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MADDACC))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MSUBACCS);") - -(define_expand "masaccs" - [(parallel [(set (match_operand:DI 0 "even_acc_operand" "") - (unspec:DI [(match_dup 0) - (match_operand:DI 1 "even_acc_operand" "")] - UNSPEC_MADDACC)) - (set (match_operand:HI 2 "accg_operand" "") - (unspec:HI [(match_dup 2) - (match_operand:HI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MADDACC))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MASACCS);") - -(define_insn "*maddacc" - [(set (match_operand:DI 0 "even_acc_operand" "+b") - (unspec:DI [(match_dup 0) - (match_operand:DI 1 "even_acc_operand" "b")] - UNSPEC_MADDACC)) - (set (match_operand:HI 2 "accg_operand" "+B") - (unspec:HI [(match_dup 2) - (match_operand:HI 3 "accg_operand" "B") - (match_operand:SI 4 "const_int_operand" "n")] - UNSPEC_MADDACC))] - "TARGET_MEDIA_REV2" - "* -{ - switch (INTVAL (operands[4])) - { - default: break; - case FRV_BUILTIN_MADDACCS: return \"maddaccs %1, %0\"; - case FRV_BUILTIN_MSUBACCS: return \"msubaccs %1, %0\"; - case FRV_BUILTIN_MASACCS: return \"masaccs %1, %0\"; - } - - fatal_insn (\"Bad media insn, maddacc\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "maddacc")]) - -;; Dual accumulator addition/subtraction: type "mdaddacc" - -(define_expand "mdaddaccs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") - (unspec:V4SI [(match_dup 0) - (match_operand:V4SI 1 "quad_acc_operand" "")] - UNSPEC_MDADDACC)) - (set (match_operand:V4QI 2 "accg_operand" "") - (unspec:V4QI [(match_dup 2) - (match_operand:V4QI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MDADDACC))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MDADDACCS);") - -(define_expand "mdsubaccs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") - (unspec:V4SI [(match_dup 0) - (match_operand:V4SI 1 "quad_acc_operand" "")] - UNSPEC_MDADDACC)) - (set (match_operand:V4QI 2 "accg_operand" "") - (unspec:V4QI [(match_dup 2) - (match_operand:V4QI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MDADDACC))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MDSUBACCS);") - -(define_expand "mdasaccs" - [(parallel [(set (match_operand:V4SI 0 "quad_acc_operand" "") - (unspec:V4SI [(match_dup 0) - (match_operand:V4SI 1 "quad_acc_operand" "")] - UNSPEC_MDADDACC)) - (set (match_operand:V4QI 2 "accg_operand" "") - (unspec:V4QI [(match_dup 2) - (match_operand:V4QI 3 "accg_operand" "") - (match_dup 4)] - UNSPEC_MDADDACC))])] - "TARGET_MEDIA_REV2" - "operands[4] = GEN_INT (FRV_BUILTIN_MDASACCS);") - -(define_insn "*mdaddacc" - [(set (match_operand:V4SI 0 "quad_acc_operand" "+A") - (unspec:V4SI [(match_dup 0) - (match_operand:V4SI 1 "quad_acc_operand" "A")] - UNSPEC_MDADDACC)) - (set (match_operand:V4QI 2 "accg_operand" "+B") - (unspec:V4QI [(match_dup 2) - (match_operand:V4QI 3 "accg_operand" "B") - (match_operand:SI 4 "const_int_operand" "n")] - UNSPEC_MDADDACC))] - "TARGET_MEDIA_REV2" - "* -{ - switch (INTVAL (operands[4])) - { - default: break; - case FRV_BUILTIN_MDADDACCS: return \"mdaddaccs %1, %0\"; - case FRV_BUILTIN_MDSUBACCS: return \"mdsubaccs %1, %0\"; - case FRV_BUILTIN_MDASACCS: return \"mdasaccs %1, %0\"; - } - - fatal_insn (\"Bad media insn, mdaddacc\", insn); -}" - [(set_attr "length" "4") - (set_attr "type" "mdaddacc")]) - -;; Dual absolute (halfword): type "mabsh" - -(define_insn "mabshs" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "f")] UNSPEC_MABSHS))] - "TARGET_MEDIA_REV2" - "mabshs %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mabsh")]) - -;; Dual rotate: type "mdrot" - -(define_insn "mdrotli" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:SI 2 "uint5_operand" "I")] - UNSPEC_MDROTLI))] - "TARGET_MEDIA_REV2" - "mdrotli %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mdrot")]) - -;; Dual coupling (concatenation): type "mcpl" - -(define_insn "mcplhi" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:DI 1 "fpr_operand" "h") - (match_operand:SI 2 "uint4_operand" "I")] - UNSPEC_MCPLHI))] - "TARGET_MEDIA_REV2" - "mcplhi %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mcpl")]) - -(define_insn "mcpli" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:DI 1 "fpr_operand" "h") - (match_operand:SI 2 "uint5_operand" "I")] - UNSPEC_MCPLI))] - "TARGET_MEDIA_REV2" - "mcpli %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mcpl")]) - -;; Dual cut: type "mdcut" - -(define_insn "mdcutssi" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_acc_operand" "b") - (match_operand:SI 2 "int6_operand" "I") - (match_operand:HI 3 "accg_operand" "B")] - UNSPEC_MDCUTSSI))] - "TARGET_MEDIA_REV2" - "mdcutssi %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mdcut")]) - -;; Quad saturate (halfword): type "mqsath" - -(define_insn "mqsaths" - [(set (match_operand:DI 0 "even_fpr_operand" "=h") - (unspec:DI [(match_operand:DI 1 "even_fpr_operand" "h") - (match_operand:DI 2 "even_fpr_operand" "h")] - UNSPEC_MQSATHS))] - "TARGET_MEDIA_REV2" - "mqsaths %1, %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mqsath")]) - -;; Set hi/lo instructions: type "mset" - -(define_insn "mhsetlos" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") - (match_operand:SI 2 "int12_operand" "NOP")] - UNSPEC_MHSETLOS))] - "TARGET_MEDIA_REV2" - "mhsetlos %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mset")]) - -(define_insn "mhsetloh" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") - (match_operand:SI 2 "int5_operand" "I")] - UNSPEC_MHSETLOH))] - "TARGET_MEDIA_REV2" - "mhsetloh %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mset")]) - -(define_insn "mhsethis" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") - (match_operand:SI 2 "int12_operand" "NOP")] - UNSPEC_MHSETHIS))] - "TARGET_MEDIA_REV2" - "mhsethis %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mset")]) - -(define_insn "mhsethih" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") - (match_operand:SI 2 "int5_operand" "I")] - UNSPEC_MHSETHIH))] - "TARGET_MEDIA_REV2" - "mhsethih %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mset")]) - -(define_insn "mhdsets" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "int12_operand" "NOP")] - UNSPEC_MHDSETS))] - "TARGET_MEDIA_REV2" - "mhdsets %1, %0" - [(set_attr "length" "4") - (set_attr "type" "mset")]) - -(define_insn "mhdseth" - [(set (match_operand:SI 0 "fpr_operand" "=f") - (unspec:SI [(match_operand:SI 1 "fpr_operand" "0") - (match_operand:SI 2 "int5_operand" "I")] - UNSPEC_MHDSETH))] - "TARGET_MEDIA_REV2" - "mhdseth %2, %0" - [(set_attr "length" "4") - (set_attr "type" "mset")]) diff --git a/contrib/gcc/config/frv/frvbegin.c b/contrib/gcc/config/frv/frvbegin.c deleted file mode 100644 index d021b35..0000000 --- a/contrib/gcc/config/frv/frvbegin.c +++ /dev/null @@ -1,157 +0,0 @@ -/* Frv initialization file linked before all user modules - Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC is free software ; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation * either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY ; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - This file was originally taken from the file crtstuff.c in the - main compiler directory, and simplified. */ - -/* As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable - to be covered by the GNU General Public License. - This exception does not however invalidate any other reasons why - the executable file might be covered by the GNU General Public License. */ - -#include "defaults.h" -#include -#include "unwind-dw2-fde.h" -#include "gbl-ctors.h" - -/* Declare a pointer to void function type. */ -#define STATIC static - -#ifdef __FRV_UNDERSCORE__ -#define UNDERSCORE "_" -#else -#define UNDERSCORE "" -#endif - -#define INIT_SECTION_NEG_ONE(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".word -1\n\t" \ - ".previous") - -#define INIT_SECTION(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".previous") - -/* Beginning of .ctor/.dtor sections that provides a list of constructors and - destructors to run. */ - -INIT_SECTION_NEG_ONE (".ctors", "\"aw\"", "__CTOR_LIST__"); -INIT_SECTION_NEG_ONE (".dtors", "\"aw\"", "__DTOR_LIST__"); - -/* Beginning of .eh_frame section that provides all of the exception handling - tables. */ - -INIT_SECTION (".eh_frame", "\"aw\"", "__EH_FRAME_BEGIN__"); - -/* Beginning of .rofixup section that provides a list of pointers that we - need to adjust. */ - -INIT_SECTION (".rofixup", "\"a\"", "__ROFIXUP_LIST__"); - -extern void __frv_register_eh(void) __attribute__((__constructor__)); -extern void __frv_deregister_eh(void) __attribute__((__destructor__)); - -extern func_ptr __EH_FRAME_BEGIN__[]; - -/* Register the exception handling table as the first constructor. */ -void -__frv_register_eh (void) -{ - static struct object object; - if (__register_frame_info) - __register_frame_info (__EH_FRAME_BEGIN__, &object); -} - -/* Note, do not declare __{,de}register_frame_info weak as it seems - to interfere with the pic support. */ - -/* Unregister the exception handling table as a deconstructor. */ -void -__frv_deregister_eh (void) -{ - static int completed = 0; - - if (completed) - return; - - if (__deregister_frame_info) - __deregister_frame_info (__EH_FRAME_BEGIN__); - - completed = 1; -} - -/* Run the global destructors. */ -void -__do_global_dtors (void) -{ - static func_ptr *p = __DTOR_LIST__ + 1; - while (*p) - { - p++; - (*(p-1)) (); - } -} - -/* Run the global constructors. */ -void -__do_global_ctors (void) -{ - unsigned long nptrs = (unsigned long) __CTOR_LIST__[0]; - unsigned i; - - if (nptrs == (unsigned long)-1) - for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++); - - for (i = nptrs; i >= 1; i--) - __CTOR_LIST__[i] (); - - atexit (__do_global_dtors); -} - -/* Subroutine called automatically by `main'. - Compiling a global function named `main' - produces an automatic call to this function at the beginning. - - For many systems, this routine calls __do_global_ctors. - For systems which support a .init section we use the .init section - to run __do_global_ctors, so we need not do anything here. */ - -void -__main (void) -{ - /* Support recursive calls to `main': run initializers just once. */ - static int initialized; - if (! initialized) - { - initialized = 1; - __do_global_ctors (); - } -} diff --git a/contrib/gcc/config/frv/frvend.c b/contrib/gcc/config/frv/frvend.c deleted file mode 100644 index 6709cdb..0000000 --- a/contrib/gcc/config/frv/frvend.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Frv initialization file linked after all user modules - Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC is free software ; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation * either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY ; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable - to be covered by the GNU General Public License. - This exception does not however invalidate any other reasons why - the executable file might be covered by the GNU General Public License. */ - -#include "defaults.h" -#include -#include "unwind-dw2-fde.h" - -#ifdef __FRV_UNDERSCORE__ -#define UNDERSCORE "_" -#else -#define UNDERSCORE "" -#endif - -#define FINI_SECTION_ZERO(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".word 0\n\t" \ - ".previous") - -#define FINI_SECTION(SECTION, FLAGS, NAME) \ -__asm__ (".section " SECTION "," FLAGS "\n\t" \ - ".globl " UNDERSCORE NAME "\n\t" \ - ".type " UNDERSCORE NAME ",@object\n\t" \ - ".p2align 2\n" \ - UNDERSCORE NAME ":\n\t" \ - ".previous") - -/* End of .ctor/.dtor sections that provides a list of constructors and - destructors to run. */ - -FINI_SECTION_ZERO (".ctors", "\"aw\"", "__CTOR_END__"); -FINI_SECTION_ZERO (".dtors", "\"aw\"", "__DTOR_END__"); - -/* End of .eh_frame section that provides all of the exception handling - tables. */ - -FINI_SECTION_ZERO (".eh_frame", "\"aw\"", "__FRAME_END__"); - -/* End of .rofixup section that provides a list of pointers that we - need to adjust. */ - -FINI_SECTION (".rofixup", "\"a\"", "__ROFIXUP_END__"); diff --git a/contrib/gcc/config/frv/lib1funcs.asm b/contrib/gcc/config/frv/lib1funcs.asm deleted file mode 100644 index 87666f4..0000000 --- a/contrib/gcc/config/frv/lib1funcs.asm +++ /dev/null @@ -1,282 +0,0 @@ -/* Library functions. - Copyright (C) 2000, 2003 Free Software Foundation, Inc. - Contributed by Red Hat, Inc. - - This file is part of GCC. - - GCC is free software ; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation * either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY ; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable - to be covered by the GNU General Public License. - This exception does not however invalidate any other reasons why - the executable file might be covered by the GNU General Public License. */ - -#include - - -#ifdef L_cmpll -/* icc0 = __cmpll (long long a, long long b) */ - - .file "_cmpll.s" - .globl EXT(__cmpll) - .type EXT(__cmpll),@function - .text - .p2align 4 -EXT(__cmpll): - cmp gr8, gr10, icc0 - ckeq icc0, cc4 - P(ccmp) gr9, gr11, cc4, 1 - ret -.Lend: - .size EXT(__cmpll),.Lend-EXT(__cmpll) -#endif /* L_cmpll */ - -#ifdef L_cmpf -/* icc0 = __cmpf (float a, float b) */ -/* Note, because this function returns the result in ICC0, it means it can't - handle NaNs. */ - - .file "_cmpf.s" - .globl EXT(__cmpf) - .type EXT(__cmpf),@function - .text - .p2align 4 -EXT(__cmpf): -#ifdef __FRV_HARD_FLOAT__ /* floating point instructions available */ - movgf gr8, fr0 - P(movgf) gr9, fr1 - setlos #1, gr8 - fcmps fr0, fr1, fcc0 - P(fcklt) fcc0, cc0 - fckeq fcc0, cc1 - csub gr0, gr8, gr8, cc0, 1 - cmov gr0, gr8, cc1, 1 - cmpi gr8, 0, icc0 - ret -#else /* no floating point instructions available */ - movsg lr, gr4 - addi sp, #-16, sp - sti gr4, @(sp, 8) - st fp, @(sp, gr0) - mov sp, fp - call EXT(__cmpsf2) - cmpi gr8, #0, icc0 - ldi @(sp, 8), gr4 - movgs gr4, lr - ld @(sp,gr0), fp - addi sp, #16, sp - ret -#endif -.Lend: - .size EXT(__cmpf),.Lend-EXT(__cmpf) -#endif - -#ifdef L_cmpd -/* icc0 = __cmpd (double a, double b) */ -/* Note, because this function returns the result in ICC0, it means it can't - handle NaNs. */ - - .file "_cmpd.s" - .globl EXT(__cmpd) - .type EXT(__cmpd),@function - .text - .p2align 4 -EXT(__cmpd): - movsg lr, gr4 - addi sp, #-16, sp - sti gr4, @(sp, 8) - st fp, @(sp, gr0) - mov sp, fp - call EXT(__cmpdf2) - cmpi gr8, #0, icc0 - ldi @(sp, 8), gr4 - movgs gr4, lr - ld @(sp,gr0), fp - addi sp, #16, sp - ret -.Lend: - .size EXT(__cmpd),.Lend-EXT(__cmpd) -#endif - -#ifdef L_addll -/* gr8,gr9 = __addll (long long a, long long b) */ -/* Note, gcc will never call this function, but it is present in case an - ABI program calls it. */ - - .file "_addll.s" - .globl EXT(__addll) - .type EXT(__addll),@function - .text - .p2align -EXT(__addll): - addcc gr9, gr11, gr9, icc0 - addx gr8, gr10, gr8, icc0 - ret -.Lend: - .size EXT(__addll),.Lend-EXT(__addll) -#endif - -#ifdef L_subll -/* gr8,gr9 = __subll (long long a, long long b) */ -/* Note, gcc will never call this function, but it is present in case an - ABI program calls it. */ - - .file "_subll.s" - .globl EXT(__subll) - .type EXT(__subll),@function - .text - .p2align 4 -EXT(__subll): - subcc gr9, gr11, gr9, icc0 - subx gr8, gr10, gr8, icc0 - ret -.Lend: - .size EXT(__subll),.Lend-EXT(__subll) -#endif - -#ifdef L_andll -/* gr8,gr9 = __andll (long long a, long long b) */ -/* Note, gcc will never call this function, but it is present in case an - ABI program calls it. */ - - .file "_andll.s" - .globl EXT(__andll) - .type EXT(__andll),@function - .text - .p2align 4 -EXT(__andll): - P(and) gr9, gr11, gr9 - P2(and) gr8, gr10, gr8 - ret -.Lend: - .size EXT(__andll),.Lend-EXT(__andll) -#endif - -#ifdef L_orll -/* gr8,gr9 = __orll (long long a, long long b) */ -/* Note, gcc will never call this function, but it is present in case an - ABI program calls it. */ - - .file "_orll.s" - .globl EXT(__orll) - .type EXT(__orll),@function - .text - .p2align 4 -EXT(__orll): - P(or) gr9, gr11, gr9 - P2(or) gr8, gr10, gr8 - ret -.Lend: - .size EXT(__orll),.Lend-EXT(__orll) -#endif - -#ifdef L_xorll -/* gr8,gr9 = __xorll (long long a, long long b) */ -/* Note, gcc will never call this function, but it is present in case an - ABI program calls it. */ - - .file "_xorll.s" - .globl EXT(__xorll) - .type EXT(__xorll),@function - .text - .p2align 4 -EXT(__xorll): - P(xor) gr9, gr11, gr9 - P2(xor) gr8, gr10, gr8 - ret -.Lend: - .size EXT(__xorll),.Lend-EXT(__xorll) -#endif - -#ifdef L_notll -/* gr8,gr9 = __notll (long long a) */ -/* Note, gcc will never call this function, but it is present in case an - ABI program calls it. */ - - .file "_notll.s" - .globl EXT(__notll) - .type EXT(__notll),@function - .text - .p2align 4 -EXT(__notll): - P(not) gr9, gr9 - P2(not) gr8, gr8 - ret -.Lend: - .size EXT(__notll),.Lend-EXT(__notll) -#endif - -#ifdef L_cmov -/* (void) __cmov (char *dest, const char *src, size_t len) */ -/* - * void __cmov (char *dest, const char *src, size_t len) - * { - * size_t i; - * - * if (dest < src || dest > src+len) - * { - * for (i = 0; i < len; i++) - * dest[i] = src[i]; - * } - * else - * { - * while (len-- > 0) - * dest[len] = src[len]; - * } - * } - */ - - .file "_cmov.s" - .globl EXT(__cmov) - .type EXT(__cmov),@function - .text - .p2align 4 -EXT(__cmov): - P(cmp) gr8, gr9, icc0 - add gr9, gr10, gr4 - P(cmp) gr8, gr4, icc1 - bc icc0, 0, .Lfwd - bls icc1, 0, .Lback -.Lfwd: - /* move bytes in a forward direction */ - P(setlos) #0, gr5 - cmp gr0, gr10, icc0 - P(subi) gr9, #1, gr9 - P2(subi) gr8, #1, gr8 - bnc icc0, 0, .Lret -.Lfloop: - /* forward byte move loop */ - addi gr5, #1, gr5 - P(ldsb) @(gr9, gr5), gr4 - cmp gr5, gr10, icc0 - P(stb) gr4, @(gr8, gr5) - bc icc0, 0, .Lfloop - ret -.Lbloop: - /* backward byte move loop body */ - ldsb @(gr9,gr10),gr4 - stb gr4,@(gr8,gr10) -.Lback: - P(cmpi) gr10, #0, icc0 - addi gr10, #-1, gr10 - bne icc0, 0, .Lbloop -.Lret: - ret -.Lend: - .size EXT(__cmov),.Lend-EXT(__cmov) -#endif diff --git a/contrib/gcc/config/frv/modi.c b/contrib/gcc/config/frv/modi.c deleted file mode 100644 index d5a91fc..0000000 --- a/contrib/gcc/config/frv/modi.c +++ /dev/null @@ -1,4 +0,0 @@ -int __modi (int a, int b) -{ - return a % b; -} diff --git a/contrib/gcc/config/frv/t-frv b/contrib/gcc/config/frv/t-frv deleted file mode 100644 index a9130ff..0000000 --- a/contrib/gcc/config/frv/t-frv +++ /dev/null @@ -1,93 +0,0 @@ -# Name of assembly file containing libgcc1 functions. -# This entry must be present, but it can be empty if the target does -# not need any assembler functions to support its code generation. -# -# Alternatively if assembler functions *are* needed then define the -# entries below: -CROSS_LIBGCC1 = libgcc1-asm.a -LIB1ASMSRC = frv/lib1funcs.asm -LIB1ASMFUNCS = _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov -LIB2FUNCS_EXTRA = cmovh.c cmovw.c cmovd.c modi.c umodi.c uitof.c uitod.c ulltof.c ulltod.c - -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -# If any special flags are necessary when building libgcc2 put them here. -TARGET_LIBGCC2_CFLAGS = - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#include "config/frv/frv-abi.h"' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#include "config/frv/frv-abi.h"' > dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -cmovh.c: $(srcdir)/config/frv/cmovh.c - $(LN_S) $(srcdir)/config/frv/cmovh.c . - -cmovw.c: $(srcdir)/config/frv/cmovw.c - $(LN_S) $(srcdir)/config/frv/cmovw.c . - -cmovd.c: $(srcdir)/config/frv/cmovd.c - $(LN_S) $(srcdir)/config/frv/cmovd.c . - -modi.c: $(srcdir)/config/frv/modi.c - $(LN_S) $(srcdir)/config/frv/modi.c . - -umodi.c: $(srcdir)/config/frv/umodi.c - $(LN_S) $(srcdir)/config/frv/umodi.c . - -uitof.c: $(srcdir)/config/frv/uitof.c - $(LN_S) $(srcdir)/config/frv/uitof.c . - -uitod.c: $(srcdir)/config/frv/uitod.c - $(LN_S) $(srcdir)/config/frv/uitod.c . - -ulltof.c: $(srcdir)/config/frv/ulltof.c - $(LN_S) $(srcdir)/config/frv/ulltof.c . - -ulltod.c: $(srcdir)/config/frv/ulltod.c - $(LN_S) $(srcdir)/config/frv/ulltod.c . - -# Build frvbegin.o and frvend.o -EXTRA_MULTILIB_PARTS=frvbegin.o frvend.o - -# Compile two additional files that are linked with every program -# linked using GCC on systems using COFF or ELF, for the sake of C++ -# constructors. - -FRVSTUFF_CFLAGS = $(TARGET_LIBGCC2_CFLAGS) - -$(T)frvbegin$(objext): $(srcdir)/config/frv/frvbegin.c $(GCC_PASSES) \ - $(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \ - -c $(srcdir)/config/frv/frvbegin.c -o $(T)frvbegin$(objext) - -$(T)frvend$(objext): $(srcdir)/config/frv/frvend.c $(GCC_PASSES) \ - $(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \ - -c $(srcdir)/config/frv/frvend.c -o $(T)frvend$(objext) - -# Enable the following if multilibs are needed. -# See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a -# description of the options and their values. -# -#MULTILIB_OPTIONS = mcpu=fr500/mcpu=tomcat/mcpu=simple/mcpu=frv msoft-float mdword/mno-dword -#MULTILIB_DIRNAMES = fr500 tomcat simple frv nof dw no-dw -#MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 mno-double=mcpu?fr500 mcpu?frv=mdouble -#MULTILIB_EXCEPTIONS = *mcpu=simple/*msoft-float* *mcpu=frv/*msoft-float* -#MULTILIB_EXTRA_OPTS = mlibrary-pic - -MULTILIB_OPTIONS = mcpu=frv/mcpu=fr400/mcpu=simple mno-pack mlibrary-pic -MULTILIB_DIRNAMES = frv fr400 simple unpacked pic -MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 mlibrary-pic=fpic mlibrary-pic=fPIC -MULTILIB_EXCEPTIONS = mcpu=frv/mno-pack* mcpu=simple/mno-pack* - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib - -EXTRA_HEADERS = $(srcdir)/config/frv/frv-asm.h diff --git a/contrib/gcc/config/frv/uitod.c b/contrib/gcc/config/frv/uitod.c deleted file mode 100644 index 14290ab..0000000 --- a/contrib/gcc/config/frv/uitod.c +++ /dev/null @@ -1,4 +0,0 @@ -double __uitod (unsigned int a) -{ - return a; -} diff --git a/contrib/gcc/config/frv/uitof.c b/contrib/gcc/config/frv/uitof.c deleted file mode 100644 index 059bc7c..0000000 --- a/contrib/gcc/config/frv/uitof.c +++ /dev/null @@ -1,4 +0,0 @@ -float __uitof (unsigned int a) -{ - return a; -} diff --git a/contrib/gcc/config/frv/ulltod.c b/contrib/gcc/config/frv/ulltod.c deleted file mode 100644 index e6bee12..0000000 --- a/contrib/gcc/config/frv/ulltod.c +++ /dev/null @@ -1,4 +0,0 @@ -double __ulltod (unsigned long long a) -{ - return a; -} diff --git a/contrib/gcc/config/frv/ulltof.c b/contrib/gcc/config/frv/ulltof.c deleted file mode 100644 index 29cdfd4..0000000 --- a/contrib/gcc/config/frv/ulltof.c +++ /dev/null @@ -1,4 +0,0 @@ -float __ulltof (unsigned long long a) -{ - return a; -} diff --git a/contrib/gcc/config/frv/umodi.c b/contrib/gcc/config/frv/umodi.c deleted file mode 100644 index 4ffe5ad..0000000 --- a/contrib/gcc/config/frv/umodi.c +++ /dev/null @@ -1,4 +0,0 @@ -unsigned int __umodi (unsigned int a, unsigned int b) -{ - return a % b; -} diff --git a/contrib/gcc/config/i386/freebsd-aout.h b/contrib/gcc/config/i386/freebsd-aout.h deleted file mode 100644 index 663ed8d..0000000 --- a/contrib/gcc/config/i386/freebsd-aout.h +++ /dev/null @@ -1,230 +0,0 @@ -/* Definitions of target machine for GNU compiler for Intel 80386 - running FreeBSD. - Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2002, 2003 - Free Software Foundation, Inc. - Contributed by Poul-Henning Kamp - Continued development by David O'Brien - -This file is part of 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. */ - -/* Don't assume anything about the header files. */ -#define NO_IMPLICIT_EXTERN_C - -/* This goes away when the math-emulator is fixed */ -#undef TARGET_SUBTARGET_DEFAULT -#define TARGET_SUBTARGET_DEFAULT \ - (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) - -/* The macro defined in i386.h doesn't work with the old gas of - FreeBSD 2.x. The definition in sco.h and sol2.h appears to work, - but it turns out that, even though the assembler doesn't complain, - we get incorrect results. Fortunately, the definition in - defaults.h works. */ -#undef ASM_PREFERRED_EH_DATA_FORMAT - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("unix"); \ - builtin_define ("__FreeBSD__"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=bsd"); \ - builtin_assert ("system=FreeBSD"); \ - } \ - while (0) - -/* Like the default, except no -lg. */ -#define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}" - -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE BITS_PER_WORD - -/* Override the default comment-starter of "/". */ - -#undef ASM_COMMENT_START -#define ASM_COMMENT_START "#" - -#undef ASM_APP_ON -#define ASM_APP_ON "#APP\n" - -#undef ASM_APP_OFF -#define ASM_APP_OFF "#NO_APP\n" - -/* FreeBSD using a.out does not support DWARF2 unwinding mechanisms. */ -#define DWARF2_UNWIND_INFO 0 - -/* Don't default to pcc-struct-return, because in FreeBSD we prefer the - superior nature of the older gcc way. */ -#define DEFAULT_PCC_STRUCT_RETURN 0 - -/* Ensure we the configuration knows our system correctly so we can link with - libraries compiled with the native cc. */ -#undef NO_DOLLAR_IN_LABEL - -/* i386 freebsd still uses old binutils that don't insert nops by default - when the .align directive demands to insert extra space in the text - segment. */ -#undef ASM_OUTPUT_ALIGN -#define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG)) - -/* Profiling routines, partially copied from i386/osfrose.h. */ - -/* Tell final.c that we don't need a label passed to mcount. */ -#define NO_PROFILE_COUNTERS 1 - -#undef MCOUNT_NAME -#define MCOUNT_NAME "mcount" -#undef PROFILE_COUNT_REGISTER -#define PROFILE_COUNT_REGISTER "eax" - -/* - * Some imports from svr4.h in support of shared libraries. - * Currently, we need the DECLARE_OBJECT_SIZE stuff. - */ - -/* Define the strings used for the special svr4 .type and .size directives. - These strings generally do not vary from one system running svr4 to - another, but if a given system (e.g. m88k running svr) needs to use - different pseudo-op names for these, they may be overridden in the - file which includes this one. */ - -#define TYPE_ASM_OP "\t.type\t" -#define SIZE_ASM_OP "\t.size\t" -#define SET_ASM_OP "\t.set\t" - -/* The following macro defines the format used to output the second - operand of the .type assembler directive. Different svr4 assemblers - expect various different forms for this operand. The one given here - is just a default. You may need to override it in your machine- - specific tm.h file (depending upon the particulars of your assembler). */ - -#define TYPE_OPERAND_FMT "@%s" - -#define HANDLE_SYSV_PRAGMA 1 - -#define ASM_WEAKEN_LABEL(FILE,NAME) \ - do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ - fputc ('\n', FILE); } while (0) - -/* Write the extra assembler code needed to declare a function's result. - Most svr4 assemblers don't require any special declaration of the - result value, but there are exceptions. */ - -#ifndef ASM_DECLARE_RESULT -#define ASM_DECLARE_RESULT(FILE, RESULT) -#endif - -/* These macros generate the special .type and .size directives which - are used to set the corresponding fields of the linker symbol table - entries in an ELF object file under SVR4. These macros also output - the starting labels for the relevant functions/objects. */ - -/* Write the extra assembler code needed to declare a function properly. - Some svr4 assemblers need to also have something extra said about the - function's return value. We allow for that here. */ - -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ - do \ - { \ - ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ - ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ - } \ - while (0) - -/* Write the extra assembler code needed to declare an object properly. */ - -#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ - do \ - { \ - HOST_WIDE_INT size; \ - \ - ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ - \ - size_directive_output = 0; \ - if (!flag_inhibit_size_directive \ - && (DECL) && DECL_SIZE (DECL)) \ - { \ - size_directive_output = 1; \ - size = int_size_in_bytes (TREE_TYPE (DECL)); \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ - } \ - \ - ASM_OUTPUT_LABEL (FILE, NAME); \ - } \ - while (0) - -/* Output the size directive for a decl in rest_of_decl_compilation - in the case where we did not do so before the initializer. - Once we find the error_mark_node, we know that the value of - size_directive_output was set - by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ - -#undef ASM_FINISH_DECLARE_OBJECT -#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ -do { \ - const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ - HOST_WIDE_INT size; \ - if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ - && ! AT_END && TOP_LEVEL \ - && DECL_INITIAL (DECL) == error_mark_node \ - && !size_directive_output) \ - { \ - size_directive_output = 1; \ - size = int_size_in_bytes (TREE_TYPE (DECL)); \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ - } \ - } while (0) - -/* This is how to declare the size of a function. */ - -#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ - do { \ - if (!flag_inhibit_size_directive) \ - ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ - } while (0) - -#define AS_NEEDS_DASH_FOR_PIPED_INPUT -#define ASM_SPEC "%{fpic|fpie|fPIC|fPIE:-k}" -#define LINK_SPEC \ - "%{p:%e`-p' not supported; use `-pg' and gprof(1)} \ - %{shared:-Bshareable} \ - %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \ - %{pg:-Bstatic} %{Z}} \ - %{assert*} %{R*}" - -#define STARTFILE_SPEC \ - "%{shared:c++rt0.o%s} \ - %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}" - -/* Define this so we can compile MS code for use with WINE. */ -#define HANDLE_PRAGMA_PACK_PUSH_POP - -/* FreeBSD 2.2.7's assembler does not support .quad properly. Do not - use it. */ -#undef ASM_QUAD diff --git a/contrib/gcc/config/i386/kfreebsdgnu.h b/contrib/gcc/config/i386/kfreebsdgnu.h deleted file mode 100644 index 66b231d..0000000 --- a/contrib/gcc/config/i386/kfreebsdgnu.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Definitions for Intel 386 running GNU/KFreeBSD systems with ELF format. - Copyright (C) 2002 Free Software Foundation, Inc. - Contributed by Bruno Haible. - -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. */ - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (i386 KFreeBSD/ELF)"); - -/* FIXME: Is a KFreeBSD-specific fallback mechanism necessary? */ -#undef MD_FALLBACK_FRAME_STATE_FOR - -#undef LINK_SPEC -#define LINK_SPEC "-m elf_i386_fbsd %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ - %{static:-static}}}" diff --git a/contrib/gcc/config/i386/linux-aout.h b/contrib/gcc/config/i386/linux-aout.h deleted file mode 100644 index d7be93c..0000000 --- a/contrib/gcc/config/i386/linux-aout.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions for Intel 386 running Linux-based GNU systems using a.out. - Copyright (C) 1992, 1994, 1995, 1997, 1998, 2002 - Free Software Foundation, Inc. - Contributed by H.J. Lu (hjl@nynexst.com) - -This file is part of 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. */ - -#undef ASM_COMMENT_START -#define ASM_COMMENT_START "#" - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - LINUX_TARGET_OS_CPP_BUILTINS(); \ - if (flag_pic) \ - { \ - builtin_define ("__PIC__"); \ - builtin_define ("__pic__"); \ - } \ - } \ - while (0) - -#undef CPP_SPEC -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" - -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "long int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE BITS_PER_WORD - -/* Don't default to pcc-struct-return, because gcc is the only compiler, - and we want to retain compatibility with older gcc versions. */ -#define DEFAULT_PCC_STRUCT_RETURN 0 - -#undef LIB_SPEC - -#if 1 -/* We no longer link with libc_p.a or libg.a by default. If you - want to profile or debug the GNU/Linux C library, please add - -lc_p or -ggdb to LDFLAGS at the link time, respectively. */ -#define LIB_SPEC \ -"%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}" -#else -#define LIB_SPEC \ -"%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ - %{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}" -#endif - - -#undef LINK_SPEC -#define LINK_SPEC "-m i386linux" diff --git a/contrib/gcc/config/i386/lynx-ng.h b/contrib/gcc/config/i386/lynx-ng.h deleted file mode 100644 index 536aa7a..0000000 --- a/contrib/gcc/config/i386/lynx-ng.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Definitions for Intel 386 running LynxOS, using Lynx's old as and ld. - Copyright (C) 1993, 1995, 2002 Free Software Foundation, Inc. - -This file is part of 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. */ - -#define TARGET_VERSION fprintf (stderr, " (80386, LYNX BSD syntax)"); - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("unix"); \ - builtin_define_std ("I386"); \ - builtin_define_std ("Lynx"); \ - builtin_define_std ("IBITS32"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=lynx"); \ - } \ - while (0) - -/* Provide required defaults for linker switches. */ - -#undef LINK_SPEC -#define LINK_SPEC "-P1000 %{msystem-v:-V} %{mcoff:-k}" - -/* Apparently LynxOS clobbers ebx when you call into the OS. */ - -#undef CALL_USED_REGISTERS -#define CALL_USED_REGISTERS \ -/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \ -{ 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - -/* Prefix for internally generated assembler labels. If we aren't using - underscores, we are using prefix `.'s to identify labels that should - be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ - -#undef LPREFIX -#define LPREFIX ".L" - -/* The prefix to add to user-visible assembler symbols. */ - -#undef USER_LABEL_PREFIX -#define USER_LABEL_PREFIX "" - -/* If user-symbols don't have underscores, - then it must take more than `L' to identify - a label that should be ignored. */ - -/* This is how to store into the string BUF - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - -#undef ASM_GENERATE_INTERNAL_LABEL -#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER)) diff --git a/contrib/gcc/config/i386/moss.h b/contrib/gcc/config/i386/moss.h deleted file mode 100644 index 3b748cf..0000000 --- a/contrib/gcc/config/i386/moss.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Definitions for Intel 386 running MOSS - Copyright (C) 1996, 2001 Free Software Foundation, Inc. - Contributed by Bryan Ford - -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. */ - -#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h. */ -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("moss"); \ - builtin_assert ("system=posix"); \ - if (flag_pic) \ - { \ - builtin_define ("__PIC__"); \ - builtin_define ("__pic__"); \ - } \ - } \ - while (0) - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "crt0.o%s" - -#undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtn.o%s" - -#undef LINK_SPEC - diff --git a/contrib/gcc/config/i386/svr3.ifile b/contrib/gcc/config/i386/svr3.ifile deleted file mode 100644 index 32b3ddc..0000000 --- a/contrib/gcc/config/i386/svr3.ifile +++ /dev/null @@ -1,48 +0,0 @@ -/* - * svr3.ifile - for collectless G++ on i386 System V. - * Leaves memory configured at address 0. - * - * Install this file as $prefix/gcc-lib/TARGET/VERSION/gcc.ifile - * - * BLOCK to an offset that leaves room for many headers ( the value - * here allows for a file header, an outheader, and up to 11 section - * headers on most systems. - * BIND to an address that includes page 0 in mapped memory. The value - * used for BLOCK should be or'd into this value. Here I'm setting BLOCK - * to 0x200 and BIND to ( value_used_for(BLOCK) ) - * If you are using shared libraries, watch that you don't overlap the - * address ranges assigned for shared libs. - * - * GROUP BIND to a location in the next segment. Here, the only value - * that you should change (I think) is that within NEXT, which I've set - * to my hardware segment size. You can always use a larger size, but not - * a smaller one. - */ -SECTIONS -{ - .text BIND(0x000200) BLOCK (0x200) : - { - /* plenty for room for headers */ - *(.init) - *(.text) - vfork = fork; /* I got tired of editing peoples sloppy code */ - *(.fini) - } - .stab BIND(ADDR(.text) + SIZEOF(.text)): { } - .stabstr BIND(ADDR(.stab) + SIZEOF(.stab)): { } - GROUP BIND( NEXT(0x400000) + - (ADDR(.stabstr) + (SIZEOF(.stabstr)) % 0x1000)): - { - .data : { - __CTOR_LIST__ = . ; - . += 4 ; /* leading NULL */ - *(.ctor) - . += 4 ; /* trailing NULL */ - __DTOR_LIST__ = . ; - . += 4 ; /* leading NULL */ - *(.dtor) - . += 4 ; /* trailing NULL */ - } - .bss : { } - } -} diff --git a/contrib/gcc/config/i386/svr3dbx.h b/contrib/gcc/config/i386/svr3dbx.h deleted file mode 100644 index d06d911..0000000 --- a/contrib/gcc/config/i386/svr3dbx.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Definitions for Intel 386 running system V, using dbx-in-coff encapsulation. - Copyright (C) 1992, 1995, 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. */ - -/* We do not want to output SDB debugging information. */ - -#undef SDB_DEBUGGING_INFO - -/* We want to output DBX debugging information. */ - -#define DBX_DEBUGGING_INFO 1 - -/* Compensate for botch in dbxout_init/dbxout_source_file which - unconditionally drops the first character from ltext_label_name */ - -#undef ASM_GENERATE_INTERNAL_LABEL -#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ - sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER)) - -/* With the current gas, .align N aligns to an N-byte boundary. - This is done to be compatible with the system assembler. - You must specify -DOTHER_ALIGN when building gas-1.38.1. */ - -#undef ASM_OUTPUT_ALIGN -#define ASM_OUTPUT_ALIGN(FILE,LOG) \ - if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG)) - -/* Align labels, etc. at 4-byte boundaries. - For the 486, align to 16-byte boundary for sake of cache. */ - -#undef LABEL_ALIGN_AFTER_BARRIER -#define LABEL_ALIGN_AFTER_BARRIER(LABEL) (i386_align_jumps) - -/* Align start of loop at 4-byte boundary. */ - -#undef LOOP_ALIGN -#define LOOP_ALIGN(LABEL) (i386_align_loops) - - -/* Additional overrides needed for dbx-in-coff gas, mostly taken from pbb.h */ - -/* Although the gas we use can create .ctor and .dtor sections from N_SETT - stabs, it does not support section directives, so we need to have the loader - define the lists. - */ -#define CTOR_LISTS_DEFINED_EXTERNALLY - -/* Use crt1.o as a startup file and crtn.o as a closing file. */ -/* - * The loader directive file svr3.ifile defines how to merge the constructor - * sections into the data section. Also, since gas only puts out those - * sections in response to N_SETT stabs, and does not (yet) have a - * ".sections" directive, svr3.ifile also defines the list symbols - * __DTOR_LIST__ and __CTOR_LIST__. - */ -#undef STARTFILE_SPEC -#define STARTFILE_SPEC \ - "%{!r:%{!z:svr3.ifile%s}%{z:svr3z.ifile%s}}\ - %{pg:gcrt1.o%s}%{!pg:%{posix:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}%{!posix:%{p:mcrt1.o%s}%{!p:crt1.o%s}}} \ - %{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}" - -#define ENDFILE_SPEC "crtn.o%s" - -#undef LIB_SPEC -#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc -lg" diff --git a/contrib/gcc/config/i386/svr3gas.h b/contrib/gcc/config/i386/svr3gas.h deleted file mode 100644 index 81428ae..0000000 --- a/contrib/gcc/config/i386/svr3gas.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Definitions for Intel 386 running system V, using gas. - Copyright (C) 1992, 1996, 2000, 2002 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)"); - -/* Add stuff that normally comes from i386/sysv3.h */ - -/* longjmp may fail to restore the registers if called from the same - function that called setjmp. To compensate, the compiler avoids - putting variables in registers in functions that use both setjmp - and longjmp. */ - -#define NON_SAVING_SETJMP \ - (current_function_calls_setjmp && current_function_calls_longjmp) - -/* longjmp may fail to restore the stack pointer if the saved frame - pointer is the same as the caller's frame pointer. Requiring a frame - pointer in any function that calls setjmp or longjmp avoids this - problem, unless setjmp and longjmp are called from the same function. - Since a frame pointer will be required in such a function, it is OK - that the stack pointer is not restored. */ - -#undef SUBTARGET_FRAME_POINTER_REQUIRED -#define SUBTARGET_FRAME_POINTER_REQUIRED \ - (current_function_calls_setjmp || current_function_calls_longjmp) - -/* Modify ASM_OUTPUT_LOCAL slightly to test -msvr3-shlib, adapted to gas */ -#undef ASM_OUTPUT_LOCAL -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - do { \ - int align = exact_log2 (ROUNDED); \ - if (align > 2) align = 2; \ - if (TARGET_SVR3_SHLIB) \ - { \ - data_section (); \ - ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \ - ASM_OUTPUT_LABEL ((FILE), (NAME)); \ - fprintf ((FILE), "\t.set .,.+%u\n", (int)(ROUNDED)); \ - } \ - else \ - { \ - fputs (".lcomm ", (FILE)); \ - assemble_name ((FILE), (NAME)); \ - fprintf ((FILE), ",%u\n", (int)(ROUNDED)); \ - } \ - } while (0) - -/* Add stuff that normally comes from i386/sysv3.h via svr3.h */ - -/* Define the actual types of some ANSI-mandated types. These - definitions should work for most SVR3 systems. */ - -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "long int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE BITS_PER_WORD - -/* ??? This stuff is copied from config/svr3.h. In the future, - this file should be rewritten to include config/svr3.h - and override what isn't right. */ - -#define INIT_SECTION_ASM_OP "\t.section\t.init" -#define FINI_SECTION_ASM_OP "\t.section .fini,\"x\"" -#define CTORS_SECTION_ASM_OP INIT_SECTION_ASM_OP -#define DTORS_SECTION_ASM_OP FINI_SECTION_ASM_OP - -/* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent - because they push on the stack. */ -/* This is copied from i386/sysv3.h. */ - -#define CTOR_LIST_BEGIN \ - asm (INIT_SECTION_ASM_OP); \ - asm ("pushl $0") -#define CTOR_LIST_END CTOR_LIST_BEGIN - -/* Constructor list on stack is in reverse order. Go to the end of the - list and go backwards to call constructors in the right order. */ -#define DO_GLOBAL_CTORS_BODY \ -do { \ - func_ptr *p, *beg = alloca (0); \ - for (p = beg; *p; p++) \ - ; \ - while (p != beg) \ - (*--p) (); \ -} while (0) - -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_init, in_fini - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - INIT_SECTION_FUNCTION \ - FINI_SECTION_FUNCTION - -#define INIT_SECTION_FUNCTION \ -void \ -init_section () \ -{ \ - if (in_section != in_init) \ - { \ - fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP); \ - in_section = in_init; \ - } \ -} - -#define FINI_SECTION_FUNCTION \ -void \ -fini_section () \ -{ \ - if (in_section != in_fini) \ - { \ - fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \ - in_section = in_fini; \ - } \ -} - -#define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor diff --git a/contrib/gcc/config/i386/svr3z.ifile b/contrib/gcc/config/i386/svr3z.ifile deleted file mode 100644 index 4946051..0000000 --- a/contrib/gcc/config/i386/svr3z.ifile +++ /dev/null @@ -1,48 +0,0 @@ -/* - * svr3z.ifile - for collectless G++ on i386 System V. - * Leaves memory unconfigured at address 0. - * - * Install this file as $prefix/gcc-lib/TARGET/VERSION/gccz.ifile - * - * BLOCK to an offset that leaves room for many headers ( the value - * here allows for a file header, an outheader, and up to 11 section - * headers on most systems. - * BIND to an address that excludes page 0 from being mapped. The value - * used for BLOCK should be or'd into this value. Here I'm setting BLOCK - * to 0x200 and BIND to ( 0x400000 | value_used_for(BLOCK) ) - * If you are using shared libraries, watch that you don't overlap the - * address ranges assigned for shared libs. - * - * GROUP BIND to a location in the next segment. Here, the only value - * that you should change (I think) is that within NEXT, which I've set - * to my hardware segment size. You can always use a larger size, but not - * a smaller one. - */ -SECTIONS -{ - .text BIND(0x400200) BLOCK (0x200) : - { - /* plenty for room for headers */ - *(.init) - *(.text) - vfork = fork; /* I got tired of editing peoples sloppy code */ - *(.fini) - } - .stab BIND(ADDR(.text) + SIZEOF(.text)): { } - .stabstr BIND(ADDR(.stab) + SIZEOF(.stab)): { } - GROUP BIND( NEXT(0x400000) + - (ADDR(.stabstr) + (SIZEOF(.stabstr)) % 0x1000)): - { - .data : { - __CTOR_LIST__ = . ; - . += 4 ; /* leading NULL */ - *(.ctor) - . += 4 ; /* trailing NULL */ - __DTOR_LIST__ = . ; - . += 4 ; /* leading NULL */ - *(.dtor) - . += 4 ; /* trailing NULL */ - } - .bss : { } - } -} diff --git a/contrib/gcc/config/i386/sysv3.h b/contrib/gcc/config/i386/sysv3.h deleted file mode 100644 index b2643b1..0000000 --- a/contrib/gcc/config/i386/sysv3.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Definitions for Intel 386 running system V. - Copyright (C) 1988, 1996, 2000, 2002 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)"); - -/* Use crt1.o as a startup file and crtn.o as a closing file. */ - -#define STARTFILE_SPEC \ - "%{pg:gcrt1.o%s}%{!pg:%{posix:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}%{!posix:%{p:mcrt1.o%s}%{!p:crt1.o%s}}} crtbegin.o%s\ - %{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}" - -/* ??? There is a suggestion that -lg is needed here. - Does anyone know whether this is right? */ -#define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc crtend.o%s crtn.o%s" - -/* Specify predefined symbols in preprocessor. */ - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("unix"); \ - builtin_assert ("system=svr3"); \ - } \ - while (0) - -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" - -/* Writing `int' for a bit-field forces int alignment for the structure. */ - -#define PCC_BITFIELD_TYPE_MATTERS 1 - -/* We want to be able to get DBX debugging information via -gstabs. */ - -#define DBX_DEBUGGING_INFO 1 - -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG - -/* longjmp may fail to restore the registers if called from the same - function that called setjmp. To compensate, the compiler avoids - putting variables in registers in functions that use both setjmp - and longjmp. */ - -#define NON_SAVING_SETJMP \ - (current_function_calls_setjmp && current_function_calls_longjmp) - -/* longjmp may fail to restore the stack pointer if the saved frame - pointer is the same as the caller's frame pointer. Requiring a frame - pointer in any function that calls setjmp or longjmp avoids this - problem, unless setjmp and longjmp are called from the same function. - Since a frame pointer will be required in such a function, it is OK - that the stack pointer is not restored. */ - -#undef SUBTARGET_FRAME_POINTER_REQUIRED -#define SUBTARGET_FRAME_POINTER_REQUIRED \ - (current_function_calls_setjmp || current_function_calls_longjmp) - -/* Modify ASM_OUTPUT_LOCAL slightly to test -msvr3-shlib. */ -#undef ASM_OUTPUT_LOCAL -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - do { \ - int align = exact_log2 (ROUNDED); \ - if (align > 2) align = 2; \ - if (TARGET_SVR3_SHLIB) \ - data_section (); \ - else \ - bss_section (); \ - ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \ - ASM_OUTPUT_LABEL ((FILE), (NAME)); \ - fprintf ((FILE), "\t.set .,.+%u\n", (int)(ROUNDED));\ - } while (0) - -/* Define a few machine-specific details of the implementation of - constructors. - - The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN - and CTOR_LIST_END to contribute to the .init section an instruction to - push a word containing 0 (or some equivalent of that). */ - -#undef INIT_SECTION_ASM_OP -#define INIT_SECTION_ASM_OP "\t.section .init,\"x\"" - -#define CTOR_LIST_BEGIN \ - asm (INIT_SECTION_ASM_OP); \ - asm ("pushl $0") -#define CTOR_LIST_END CTOR_LIST_BEGIN - -#define TARGET_ASM_CONSTRUCTOR ix86_svr3_asm_out_constructor diff --git a/contrib/gcc/config/i386/t-udk b/contrib/gcc/config/i386/t-udk deleted file mode 100644 index 96e1864..0000000 --- a/contrib/gcc/config/i386/t-udk +++ /dev/null @@ -1,2 +0,0 @@ -# Tell fixincludes to work on this set of headers -SYSTEM_HEADER_DIR = /udk/usr/include diff --git a/contrib/gcc/config/i386/udk.h b/contrib/gcc/config/i386/udk.h deleted file mode 100644 index 66f5b87..0000000 --- a/contrib/gcc/config/i386/udk.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Configuration for i386 interfacing with SCO's Universal Development Kit - probably running on OpenServer 5, Unixware 2, or Unixware 5 - */ - - -/* We're very much the SVR4 target with "/udk" prepended to everything that's - interesting */ - -#undef MD_EXEC_PREFIX -#define MD_EXEC_PREFIX "/udk/usr/ccs/bin/" - -#undef MD_STARTFILE_PREFIX -#define MD_STARTFILE_PREFIX "/udk/usr/ccs/lib/" - -#define STANDARD_INCLUDE_DIR "/udk/usr/include" - -#undef LINK_SPEC -#define LINK_SPEC "%{h*} %{v:-V} \ - %{b} %{Wl,*:%*} \ - %{static:-dn -Bstatic} \ - %{shared:-G -dy -z text} \ - %{symbolic:-Bsymbolic -G -dy -z text} \ - %{G:-G} \ - %{YP,*} \ - %{!YP,*:%{p:-Y P,/udk/usr/ccs/lib/libp:/udk/usr/lib/libp:/udk/usr/ccs/lib:/udk/usr/lib} \ - %{!p:-Y P,/udk/usr/ccs/lib:/udk/usr/lib}} \ - %{Qy:} %{!Qn:-Qy}" - diff --git a/contrib/gcc/config/i386/vsta.h b/contrib/gcc/config/i386/vsta.h deleted file mode 100644 index f9c4710..0000000 --- a/contrib/gcc/config/i386/vsta.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Configuration for an i386 running VSTa micro-kernel. - Copyright (C) 1994, 2002 Free Software Foundation, Inc. - Contributed by Rob Savoye (rob@cygnus.com). - -This file is part of 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. */ - -#define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)"); - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("unix"); \ - builtin_define ("VSTA"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=vsta"); \ - } \ - while (0) diff --git a/contrib/gcc/config/kfreebsdgnu.h b/contrib/gcc/config/kfreebsdgnu.h deleted file mode 100644 index ad8d68c..0000000 --- a/contrib/gcc/config/kfreebsdgnu.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Definitions for GNU/KFreeBSD systems with ELF format. - Copyright (C) 2002 Free Software Foundation, Inc. - Contributed by Bruno Haible. - -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. */ - -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -#undef TARGET_OS_CPP_BUILTINS -#define TARGET_OS_CPP_BUILTINS() \ - builtin_define ("__GNU_KFreeBSD__=0"); \ - builtin_define ("__gnu_kfreebsd__=0"); \ - builtin_define ("__FreeBSD_kernel__=5"); \ - builtin_define ("__ELF__"); \ - builtin_define_std ("unix"); \ - builtin_assert ("system=posix"); - -#undef TARGET_CPU_CPP_BUILTINS -#define TARGET_CPU_CPP_BUILTINS() \ - builtin_define ("__i386__"); \ - builtin_define_std ("i386"); \ - builtin_assert ("cpu=i386"); \ - builtin_assert ("machine=i386"); - -/* do {} while (0) */ diff --git a/contrib/gcc/config/linux-aout.h b/contrib/gcc/config/linux-aout.h deleted file mode 100644 index 5701fd9..0000000 --- a/contrib/gcc/config/linux-aout.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Definitions for Linux-based GNU systems with a.out binaries. - Copyright (C) 1995, 1997, 1999, 2000 Free Software Foundation, Inc. - Contributed by H.J. Lu (hjl@nynexst.com) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Don't assume anything about the header files. */ -#define NO_IMPLICIT_EXTERN_C - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}" - -#undef ASM_APP_ON -#define ASM_APP_ON "#APP\n" - -#undef ASM_APP_OFF -#define ASM_APP_OFF "#NO_APP\n" - -#define SET_ASM_OP "\t.set\t" - -/* We need that too. */ -#define HANDLE_SYSV_PRAGMA 1 diff --git a/contrib/gcc/config/lynx-ng.h b/contrib/gcc/config/lynx-ng.h deleted file mode 100644 index c23ad39..0000000 --- a/contrib/gcc/config/lynx-ng.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Target independent definitions for LynxOS, using Lynx's old as and ld. - Copyright (C) 1993, 1999 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 is for backwards compatibility with older Lynx tools, which use - a version of a.out format. */ - -#undef ASM_SPEC -#define ASM_SPEC "%{mcoff:-C}" - -#undef CPP_SPEC -#define CPP_SPEC "%{mthreads:-D_MULTITHREADED} \ - %{mposix:-D_POSIX_SOURCE} \ - %{msystem-v:-I/usr/include_v}" - -/* Provide required defaults for linker switches. */ - -#undef LINK_SPEC -#define LINK_SPEC "%{msystem-v:-V} %{mcoff:-k}" - -#undef LIB_SPEC -#define LIB_SPEC "%{mthreads:-L/lib/thread/}%{msystem-v:-lc_v}%{!msystem-v:%{mposix:-lc_p} -lc}" - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "%{p:%{mcoff:pinit1.o%s}%{!mcoff:pinit.o%s}}%{!p:%{msystem-v:%{mcoff:vinit1.o%s}%{!mcoff:vinit.o%s}}%{!msystem-v:%{mcoff:init1.o%s}%{!mcoff:init.o%s}}}" - -#undef ENDFILE_SPEC -#define ENDFILE_SPEC "%{mcoff:initn.o%s} %{p:_etext.o%s}" - -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "long int" - -/* We want to output DBX debugging information. */ - -#define DBX_DEBUGGING_INFO 1 -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - -/* We optionally want to be able to produce SDB debugging output so that - we can create debuggable SDB/coff files. This won't be needed when - stabs-in-coff works. */ - -#define SDB_DEBUGGING_INFO 1 - -/* Generate calls to memcpy, memcmp and memset. */ - -#define TARGET_MEM_FUNCTIONS - -/* Handle #pragma pack and sometimes #pragma weak. */ - -#define HANDLE_SYSV_PRAGMA 1 - -#define TARGET_THREADS (target_flags & MASK_THREADS) -#define MASK_THREADS 0x40000000 - -#define TARGET_POSIX (target_flags & MASK_POSIX) -#define MASK_POSIX 0x20000000 - -#define TARGET_SYSTEM_V (target_flags & MASK_SYSTEM_V) -#define MASK_SYSTEM_V 0x10000000 - -#define TARGET_COFF (target_flags & MASK_COFF) -#define MASK_COFF 0x08000000 - -#undef SUBTARGET_SWITCHES -#define SUBTARGET_SWITCHES \ - {"threads", MASK_THREADS}, \ - {"posix", MASK_POSIX}, \ - {"system-v", MASK_SYSTEM_V}, \ - {"coff", MASK_COFF}, - -#undef SUBTARGET_OVERRIDE_OPTIONS -#define SUBTARGET_OVERRIDE_OPTIONS \ -{ if (TARGET_SYSTEM_V && profile_flag) \ - warning ("-msystem-v and -p are incompatible"); \ - if (TARGET_SYSTEM_V && TARGET_THREADS) \ - warning ("-msystem-v and -mthreads are incompatible"); } - -/* This is defined only so that we can find the assembler. Everything else - is in /bin. */ - -#define MD_EXEC_PREFIX "/usr/local/lib/gcc-" - -/* This is needed because /bin/ld does not handle -L options correctly. */ - -#define LINK_LIBGCC_SPECIAL_1 - -/* The Lynx linker considers __main to be a possible entry point, so we - must use a different name. */ - -#define NAME__MAIN "____main" -#define SYMBOL__MAIN ____main diff --git a/contrib/gcc/config/rs6000/altivec-defs.h b/contrib/gcc/config/rs6000/altivec-defs.h deleted file mode 100644 index 4fa1e0d..0000000 --- a/contrib/gcc/config/rs6000/altivec-defs.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Target definitions for GNU compiler for PowerPC with AltiVec. - Copyright (C) 2001, 2003 Free Software Foundation, Inc. - Contributed by Aldy Hernandez (aldyh@redhat.com). - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 2, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. */ - -#undef SUBSUBTARGET_OVERRIDE_OPTIONS -#define SUBSUBTARGET_OVERRIDE_OPTIONS \ -do { \ - rs6000_altivec_abi = 1; \ - target_flags |= MASK_ALTIVEC; \ -} while (0) diff --git a/contrib/gcc/config/rs6000/darwin-ldouble-shared.c b/contrib/gcc/config/rs6000/darwin-ldouble-shared.c deleted file mode 100644 index 8ceea0a..0000000 --- a/contrib/gcc/config/rs6000/darwin-ldouble-shared.c +++ /dev/null @@ -1,2 +0,0 @@ -#define IN_LIBGCC2_S 1 -#include "darwin-ldouble.c" diff --git a/contrib/gcc/config/rs6000/lynxbase.h b/contrib/gcc/config/rs6000/lynxbase.h deleted file mode 100644 index 02a2552..0000000 --- a/contrib/gcc/config/rs6000/lynxbase.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Definitions for Rs6000 running LynxOS. - Copyright (C) 2003 Free Software Foundation, Inc. - Contributed by David Henkel-Wallace, Cygnus Support (gumby@cygnus.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 2, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. */ - -/* Definitions we want to override with those from rs6000.h: */ -#undef LIB_SPEC -#undef PTRDIFF_TYPE -#undef SIZE_TYPE -#undef WCHAR_TYPE -#undef WCHAR_TYPE_SIZE -#undef EXTRA_SECTIONS -#undef READONLY_DATA_SECTION -#undef READONLY_DATA_SECTION_ASM_OP -#undef EXTRA_SECTION_FUNCTIONS -#undef TARGET_ASM_SELECT_RTX_SECTION -#undef TARGET_ASM_SELECT_SECTION -#undef USER_LABEL_PREFIX -#undef ASM_OUTPUT_LABELREF -#undef ASM_GENERATE_INTERNAL_LABEL -#undef ASM_OUTPUT_COMMON -#undef ASM_OUTPUT_LOCAL - -#undef SDB_DEBUGGING_INFO -#undef DBX_DEBUGGING_INFO -#undef PREFERRED_DEBUGGING_TYPE - -#undef FUNCTION_PROFILER -#undef SUBTARGET_SWITCHES diff --git a/contrib/gcc/config/sparc/aout.h b/contrib/gcc/config/sparc/aout.h deleted file mode 100644 index 1031048..0000000 --- a/contrib/gcc/config/sparc/aout.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Definitions of target machine for GCC, for SPARC using a.out. - Copyright (C) 1994, 1996, 2002 Free Software Foundation, Inc. - Contributed by Michael Tiemann (tiemann@cygnus.com). - -This file is part of 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. */ - -/* Print subsidiary information on the compiler version in use. */ - -#define TARGET_VERSION fprintf (stderr, " (sparc)"); - -/* These compiler options take an argument. We ignore -target for now. */ - -#define WORD_SWITCH_TAKES_ARG(STR) \ - (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ - || !strcmp (STR, "target") || !strcmp (STR, "assert")) - -#define TARGET_ASM_SELECT_SECTION sparc_aout_select_section -#define TARGET_ASM_SELECT_RTX_SECTION sparc_aout_select_rtx_section - -/* Output the label for a function definition. */ - -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ -do { \ - ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ -} while (0) - -/* Output before read-only data. */ - -#define TEXT_SECTION_ASM_OP "\t.text" - -/* Output before writable data. */ - -#define DATA_SECTION_ASM_OP "\t.data" - -/* How to renumber registers for dbx and gdb. In the flat model, the frame - pointer is really %i7. */ - -#define DBX_REGISTER_NUMBER(REGNO) \ - (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO) - -/* This is how to output a note to DBX telling it the line number - to which the following sequence of instructions corresponds. - - This is needed for SunOS 4.0, and should not hurt for 3.2 - versions either. */ -#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \ - fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \ - line, counter, counter) diff --git a/contrib/gcc/config/sparc/elf.h b/contrib/gcc/config/sparc/elf.h deleted file mode 100644 index 5f01a34..0000000 --- a/contrib/gcc/config/sparc/elf.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Definitions of target machine for GCC, - for SPARC running in an embedded environment using the ELF file format. - Copyright (C) 1997 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. */ - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s" - -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ - "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ - crtend.o%s crtn.o%s" - -/* Use the default. */ -#undef LINK_SPEC - -/* Don't set the target flags, this is done by the linker script */ -#undef LIB_SPEC -#define LIB_SPEC "" - -/* FIXME: until fixed */ -#undef LONG_DOUBLE_TYPE_SIZE -#define LONG_DOUBLE_TYPE_SIZE 64 - -/* This solaris2 define does not apply. */ -#undef STDC_0_IN_SYSTEM_HEADERS - -/* We don't want to use the Solaris2 specific long long int conversion - routines or 64-bit integer multiply and divide routines. */ -#undef SUN_CONVERSION_LIBFUNCS -#define SUN_CONVERSION_LIBFUNCS 0 - -#undef SUN_INTEGER_MULTIPLY_64 -#define SUN_INTEGER_MULTIPLY_64 0 diff --git a/contrib/gcc/config/sparc/lite.h b/contrib/gcc/config/sparc/lite.h deleted file mode 100644 index cac67ec..0000000 --- a/contrib/gcc/config/sparc/lite.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Definitions of target machine for GCC, for SPARClite w/o FPU. - Copyright (C) 1993, 1996 Free Software Foundation, Inc. - Contributed by Jim Wilson (wilson@cygnus.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (sparclite)"); - -/* Enable app-regs and epilogue options. Do not enable the fpu. */ - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_APP_REGS - -/* Enable US Software GOFAST library support. */ -#define US_SOFTWARE_GOFAST diff --git a/contrib/gcc/config/sparc/litecoff.h b/contrib/gcc/config/sparc/litecoff.h deleted file mode 100644 index e31a0b4..0000000 --- a/contrib/gcc/config/sparc/litecoff.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Definitions of target machine for GCC, for SPARClite w/o FPU, COFF. - Copyright (C) 1994, 1996, 2000, 2002 Free Software Foundation, Inc. - Written by Ken Raeburn (raeburn@cygnus.com). - -This file is part of 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. */ - -#define BSS_SECTION_ASM_OP "\t.section\t\".bss\"" - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("sparc"); \ - builtin_define_std ("sparclite"); \ - } \ - while (0) - -/* Default to stabs in COFF. */ - -#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG - -/* Support the ctors and dtors sections for g++. */ - -#undef INIT_SECTION_ASM_OP - -#undef DO_GLOBAL_CTORS_BODY -#undef DO_GLOBAL_DTORS_BODY - -/* These compiler options take an argument. We ignore -target for now. */ - -#define WORD_SWITCH_TAKES_ARG(STR) \ - (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ - || !strcmp (STR, "target") || !strcmp (STR, "assert")) - -/* Output the label for a function definition. */ - -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ -do { \ - ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ -} while (0) - -/* Output before read-only data. */ - -#define TEXT_SECTION_ASM_OP "\t.text" - -/* Output before writable data. */ - -#define DATA_SECTION_ASM_OP "\t.data" - -/* How to renumber registers for dbx and gdb. In the flat model, the frame - pointer is really %i7. */ - -#define DBX_REGISTER_NUMBER(REGNO) \ - (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO) diff --git a/contrib/gcc/config/sparc/liteelf.h b/contrib/gcc/config/sparc/liteelf.h deleted file mode 100644 index 49a2089..0000000 --- a/contrib/gcc/config/sparc/liteelf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Definitions of target machine for GCC, for SPARClite w/o FPU, ELF. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. - Contributed by Stan Cox (scox@cygnus.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#undef TARGET_SUB_OS_CPP_BUILTINS -#define TARGET_SUB_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define ("__sparclite__"); \ - } \ - while (0) - -/* Default to dwarf2 in ELF. */ - -#define DWARF2_DEBUGGING_INFO 1 - -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (sparclite)"); - -/* Enable app-regs and epilogue options. Do not enable the fpu. */ - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_APP_REGS - -/* Enable US Software GOFAST library support. */ -#define US_SOFTWARE_GOFAST - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "crti.o%s crtbegin.o%s" - -/* Use __main method of constructor invocation. */ -#undef INIT_SECTION_ASM_OP -#undef FINI_SECTION_ASM_OP diff --git a/contrib/gcc/config/sparc/openbsd.h b/contrib/gcc/config/sparc/openbsd.h deleted file mode 100644 index e36f51e..0000000 --- a/contrib/gcc/config/sparc/openbsd.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Configuration file for sparc OpenBSD target. - Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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. */ - -/* Target OS builtins. */ -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define ("__unix__"); \ - builtin_define ("__OpenBSD__"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=OpenBSD"); \ - } \ - while (0) - -/* Layout of source language data types */ - -/* This must agree with */ -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE 32 - -/* Specific options for DBX Output. */ - -/* This is BSD, so it wants DBX format. */ -#define DBX_DEBUGGING_INFO 1 - -/* This is the char to use for continuation */ -#define DBX_CONTIN_CHAR '?' - -/* Stack & calling: aggregate returns. */ - -/* Don't default to pcc-struct-return, because gcc is the only compiler, and - we want to retain compatibility with older gcc versions. */ -#undef DEFAULT_PCC_STRUCT_RETURN -#define DEFAULT_PCC_STRUCT_RETURN 0 - -/* Assembler format: exception region output. */ - -/* All configurations that don't use elf must be explicit about not using - dwarf unwind information. */ -#define DWARF2_UNWIND_INFO 0 - -#undef ASM_PREFERRED_EH_DATA_FORMAT diff --git a/contrib/gcc/config/sparc/pbd.h b/contrib/gcc/config/sparc/pbd.h deleted file mode 100644 index e9344a0..0000000 --- a/contrib/gcc/config/sparc/pbd.h +++ /dev/null @@ -1,147 +0,0 @@ -/* Definitions of target machine for GNU compiler, Citicorp/TTI Unicom PBD - version (using GAS and COFF (encapsulated is unacceptable) ) - Copyright (C) 1990, 1996, 2000 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Target OS builtins. */ -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("unix"); \ - builtin_define_std ("UnicomPBD"); \ - builtin_assert ("system=unix"); \ - } \ - while (0) - -/* We want DBX format for use with gdb under COFF. */ - -#define DBX_DEBUGGING_INFO 1 - -/* Generate calls to memcpy, memcmp and memset. */ - -#define TARGET_MEM_FUNCTIONS - -/* we use /lib/libp/lib* when profiling */ - -#undef LIB_SPEC -#define LIB_SPEC "%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp} -lc" - - -/* Use crt1.o as a startup file and crtn.o as a closing file. */ -/* - * The loader directive file gcc.ifile defines how to merge the constructor - * sections into the data section. Also, since gas only puts out those - * sections in response to N_SETT stabs, and does not (yet) have a - * ".sections" directive, gcc.ifile also defines the list symbols - * __DTOR_LIST__ and __CTOR_LIST__. - * - * Finally, we must explicitly specify the file from libgcc.a that defines - * exit(), otherwise if the user specifies (for example) "-lc_s" on the - * command line, the wrong exit() will be used and global destructors will - * not get called . - */ - -#define STARTFILE_SPEC \ -"%{!r: gcc.ifile%s} %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \ -%{!r:_exit.o%s}" - -#define ENDFILE_SPEC "crtn.o%s" - -/* LINK_SPEC is needed only for SunOS 4. */ - -#undef LINK_SPEC - -/* Although the gas we use can create .ctor and .dtor sections from N_SETT - stabs, it does not support section directives, so we need to have the loader - define the lists. - */ -#define CTOR_LISTS_DEFINED_EXTERNALLY - -/* similar to default, but allows for the table defined by ld with gcc.ifile. - nptrs is always 0. So we need to instead check that __DTOR_LIST__[1] != 0. - The old check is left in so that the same macro can be used if and when - a future version of gas does support section directives. */ - -#define DO_GLOBAL_DTORS_BODY {int nptrs = *(int *)__DTOR_LIST__; int i; \ - if (nptrs == -1 || (__DTOR_LIST__[0] == 0 && __DTOR_LIST__[1] != 0)) \ - for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++); \ - for (i = nptrs; i >= 1; i--) \ - __DTOR_LIST__[i] (); } - -/* - * Here is an example gcc.ifile. I've tested it on PBD sparc - * systems. The NEXT(0x200000) works on just about all 386 and m68k systems, - * but can be reduced to any power of 2 that is >= NBPS (0x40000 on a pbd). - - SECTIONS { - .text BIND(0x41000200) BLOCK (0x200) : - { *(.init) *(.text) vfork = fork; *(.fini) } - - GROUP BIND( NEXT(0x200000) + ADDR(.text) + SIZEOF(.text)): - { .data : { __CTOR_LIST__ = . ; . += 4; *(.ctor) . += 4 ; - __DTOR_LIST__ = . ; . += 4; *(.dtor) . += 4 ; } - .bss : { } - } - } - */ - -/* The prefix to add to user-visible assembler symbols. */ - -#undef USER_LABEL_PREFIX -#define USER_LABEL_PREFIX "" - -/* fixes: */ -/* - * Internal labels are prefixed with a period. - */ - -#undef LOCAL_LABEL_PREFIX -#define LOCAL_LABEL_PREFIX "." - -/* This is how to store into the string LABEL - the symbol_ref name of an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. - This is suitable for output with `assemble_name'. */ - -#undef ASM_GENERATE_INTERNAL_LABEL -#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*.%s%ld", PREFIX, (long)(NUM)) - -/* This is how to output an element of a case-vector that is relative. */ - -#undef ASM_OUTPUT_ADDR_DIFF_ELT -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL) - -/* This is how to output an element of a case-vector that is absolute. - (The 68000 does not use such vectors, - but we must define this macro anyway.) */ - -#undef ASM_OUTPUT_ADDR_VEC_ELT -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.word .L%d\n", VALUE) - -/* This is needed for SunOS 4.0, and should not hurt for 3.2 - versions either. */ -#undef ASM_OUTPUT_SOURCE_LINE -#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \ - fprintf (file, ".stabn 68,0,%d,.LM%d\n.LM%d:\n", \ - line, counter, counter) - -#define ASM_INT_OP "\t.long " diff --git a/contrib/gcc/config/sparc/sp64-aout.h b/contrib/gcc/config/sparc/sp64-aout.h deleted file mode 100644 index 376cfa8..0000000 --- a/contrib/gcc/config/sparc/sp64-aout.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Definitions of target machine for GCC, for SPARC64, a.out. - Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. - Contributed by Doug Evans, dje@cygnus.com. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (sparc64-aout)") - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT \ - (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \ - + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS) - -/* The only code model supported is Medium/Low. */ -#undef SPARC_DEFAULT_CMODEL -#define SPARC_DEFAULT_CMODEL CM_MEDLOW diff --git a/contrib/gcc/config/sparc/sp86x-elf.h b/contrib/gcc/config/sparc/sp86x-elf.h deleted file mode 100644 index 593400d..0000000 --- a/contrib/gcc/config/sparc/sp86x-elf.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Definitions of target machine for GCC, for sparclite 86x w/o FPU. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. - Contributed by Stan Cox (scox@cygnus.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#undef TARGET_SUB_OS_CPP_BUILTINS -#define TARGET_SUB_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define ("__sparclite86x__"); \ - } \ - while (0) - -/* Default to dwarf2 in ELF. */ - -#define DWARF2_DEBUGGING_INFO 1 - -#undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG - -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (sparclite 86x)"); - -/* Enable app-regs and epilogue options. Do not enable the fpu. */ - -#undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_APP_REGS - -#undef ASM_SPEC -#define ASM_SPEC "%{v:-V} %{mlittle-endian-data:--little-endian-data} %(asm_cpu)" - -/* Enable US Software GOFAST library support. */ -#define US_SOFTWARE_GOFAST - -#undef STARTFILE_SPEC -#define STARTFILE_SPEC "crti.o%s crtbegin.o%s" - -#undef LINK_SPEC -#define LINK_SPEC "%{v:-V} %{mlittle-endian-data:-EL}" - -#undef BYTES_BIG_ENDIAN -#define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN_DATA) -#undef WORDS_BIG_ENDIAN -#define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN_DATA) - -/* Use __main method of constructor invocation */ -#undef INIT_SECTION_ASM_OP - -#define TARGET_LITTLE_ENDIAN_DATA (target_flags & MASK_LITTLE_ENDIAN) -#undef SUBTARGET_SWITCHES -#define SUBTARGET_SWITCHES \ - { "little-endian-data", MASK_LITTLE_ENDIAN, N_("Use little-endian byte order for data")}, diff --git a/contrib/gcc/config/sparc/t-openbsd b/contrib/gcc/config/sparc/t-openbsd deleted file mode 100644 index 898a24e..0000000 --- a/contrib/gcc/config/sparc/t-openbsd +++ /dev/null @@ -1,5 +0,0 @@ -# The native linker doesn't handle linking -fpic code with -fPIC code. Ugh. -# We cope by building both variants of libgcc. -MULTILIB_OPTIONS = fpic/fPIC -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib diff --git a/contrib/gcc/config/sparc/t-sp86x b/contrib/gcc/config/sparc/t-sp86x deleted file mode 100644 index 6dd5c03..0000000 --- a/contrib/gcc/config/sparc/t-sp86x +++ /dev/null @@ -1,23 +0,0 @@ -LIB1ASMSRC = sparc/lb1spc.asm -LIB1ASMFUNCS = _divsi3 _modsi3 - -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define US_SOFTWARE_GOFAST' > dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -MULTILIB_OPTIONS = mlittle-endian-data -MULTILIB_DIRNAMES = little - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib - diff --git a/contrib/gcc/config/sparc/t-sparclite b/contrib/gcc/config/sparc/t-sparclite deleted file mode 100644 index 03c44b5..0000000 --- a/contrib/gcc/config/sparc/t-sparclite +++ /dev/null @@ -1,23 +0,0 @@ -LIB1ASMSRC = sparc/lb1spl.asm -LIB1ASMFUNCS = _divsi3 _udivsi3 _modsi3 _umodsi3 - -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define US_SOFTWARE_GOFAST' > dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#define US_SOFTWARE_GOFAST' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -MULTILIB_OPTIONS = mfpu mflat -MULTILIB_DIRNAMES = -MULTILIB_MATCHES = mfpu=mhard-float mfpu=mcpu?f934 - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib diff --git a/contrib/gcc/config/t-kfreebsd-gnu b/contrib/gcc/config/t-kfreebsd-gnu deleted file mode 100644 index a40dc7a..0000000 --- a/contrib/gcc/config/t-kfreebsd-gnu +++ /dev/null @@ -1,16 +0,0 @@ -# glibc provides a limits.h, which must be combined with gcc's limits.h. -LIMITS_H_TEST = true - -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = -fPIC -# Compile libgcc2.a with pic. -TARGET_LIBGCC2_CFLAGS = -fPIC - -# Override t-slibgcc-elf-ver to export some libgcc symbols with -# the symbol versions that glibc used. -SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver - -# Use unwind-dw2-fde-glibc -LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ - $(srcdir)/unwind-sjlj.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c diff --git a/contrib/gcc/config/t-linux-gnulibc1 b/contrib/gcc/config/t-linux-gnulibc1 deleted file mode 100644 index 52effd5..0000000 --- a/contrib/gcc/config/t-linux-gnulibc1 +++ /dev/null @@ -1,7 +0,0 @@ -# We are building for the Linux C library 5. -T_CFLAGS = -DUSE_GNULIBC_1 - -# Use unwind-dw2-fde -LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ - $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h diff --git a/contrib/gcc/cp-demangle.c b/contrib/gcc/cp-demangle.c deleted file mode 100644 index 59e561d..0000000 --- a/contrib/gcc/cp-demangle.c +++ /dev/null @@ -1,4459 +0,0 @@ -/* Demangler for g++ V3 ABI. - Copyright (C) 2003, 2004 Free Software Foundation, Inc. - Written by Ian Lance Taylor . - - This file is part of the libiberty library, which is part of GCC. - - This file is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - 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 combined - executable.) - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -/* This code implements a demangler for the g++ V3 ABI. The ABI is - described on this web page: - http://www.codesourcery.com/cxx-abi/abi.html#mangling - - This code was written while looking at the demangler written by - Alex Samuel . - - This code first pulls the mangled name apart into a list of - components, and then walks the list generating the demangled - name. - - This file will normally define the following functions, q.v.: - char *cplus_demangle_v3(const char *mangled, int options) - char *java_demangle_v3(const char *mangled) - enum gnu_v3_ctor_kinds is_gnu_v3_mangled_ctor (const char *name) - enum gnu_v3_dtor_kinds is_gnu_v3_mangled_dtor (const char *name) - - Also, the interface to the component list is public, and defined in - demangle.h. The interface consists of these types, which are - defined in demangle.h: - enum demangle_component_type - struct demangle_component - and these functions defined in this file: - cplus_demangle_fill_name - cplus_demangle_fill_extended_operator - cplus_demangle_fill_ctor - cplus_demangle_fill_dtor - cplus_demangle_print - and other functions defined in the file cp-demint.c. - - This file also defines some other functions and variables which are - only to be used by the file cp-demint.c. - - Preprocessor macros you can define while compiling this file: - - IN_LIBGCC2 - If defined, this file defines the following function, q.v.: - char *__cxa_demangle (const char *mangled, char *buf, size_t *len, - int *status) - instead of cplus_demangle_v3() and java_demangle_v3(). - - IN_GLIBCPP_V3 - If defined, this file defines only __cxa_demangle(), and no other - publically visible functions or variables. - - STANDALONE_DEMANGLER - If defined, this file defines a main() function which demangles - any arguments, or, if none, demangles stdin. - - CP_DEMANGLE_DEBUG - If defined, turns on debugging mode, which prints information on - stdout about the mangled string. This is not generally useful. -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - -#include "ansidecl.h" -#include "libiberty.h" -#include "demangle.h" -#include "cp-demangle.h" - -/* If IN_GLIBCPP_V3 is defined, some functions are made static. We - also rename them via #define to avoid compiler errors when the - static definition conflicts with the extern declaration in a header - file. */ -#ifdef IN_GLIBCPP_V3 - -#define CP_STATIC_IF_GLIBCPP_V3 static - -#define cplus_demangle_fill_name d_fill_name -static int -d_fill_name PARAMS ((struct demangle_component *, const char *, int)); - -#define cplus_demangle_fill_extended_operator d_fill_extended_operator -static int -d_fill_extended_operator PARAMS ((struct demangle_component *, int, - struct demangle_component *)); - -#define cplus_demangle_fill_ctor d_fill_ctor -static int -d_fill_ctor PARAMS ((struct demangle_component *, enum gnu_v3_ctor_kinds, - struct demangle_component *)); - -#define cplus_demangle_fill_dtor d_fill_dtor -static int -d_fill_dtor PARAMS ((struct demangle_component *, enum gnu_v3_dtor_kinds, - struct demangle_component *)); - -#define cplus_demangle_mangled_name d_mangled_name -static struct demangle_component * -d_mangled_name PARAMS ((struct d_info *, int)); - -#define cplus_demangle_type d_type -static struct demangle_component * -d_type PARAMS ((struct d_info *)); - -#define cplus_demangle_print d_print -static char * -d_print PARAMS ((int, const struct demangle_component *, int, size_t *)); - -#define cplus_demangle_init_info d_init_info -static void -d_init_info PARAMS ((const char *, int, size_t, struct d_info *)); - -#else /* ! defined(IN_GLIBCPP_V3) */ -#define CP_STATIC_IF_GLIBCPP_V3 -#endif /* ! defined(IN_GLIBCPP_V3) */ - -/* See if the compiler supports dynamic arrays. */ - -#ifdef __GNUC__ -#define CP_DYNAMIC_ARRAYS -#else -#ifdef __STDC__ -#ifdef __STDC_VERSION__ -#if __STDC_VERSION__ >= 199901L -#define CP_DYNAMIC_ARRAYS -#endif /* __STDC__VERSION >= 199901L */ -#endif /* defined (__STDC_VERSION__) */ -#endif /* defined (__STDC__) */ -#endif /* ! defined (__GNUC__) */ - -/* We avoid pulling in the ctype tables, to prevent pulling in - additional unresolved symbols when this code is used in a library. - FIXME: Is this really a valid reason? This comes from the original - V3 demangler code. - - As of this writing this file has the following undefined references - when compiled with -DIN_GLIBCPP_V3: malloc, realloc, free, memcpy, - strcpy, strcat, strlen. */ - -#define IS_DIGIT(c) ((c) >= '0' && (c) <= '9') -#define IS_UPPER(c) ((c) >= 'A' && (c) <= 'Z') -#define IS_LOWER(c) ((c) >= 'a' && (c) <= 'z') - -/* The prefix prepended by GCC to an identifier represnting the - anonymous namespace. */ -#define ANONYMOUS_NAMESPACE_PREFIX "_GLOBAL_" -#define ANONYMOUS_NAMESPACE_PREFIX_LEN \ - (sizeof (ANONYMOUS_NAMESPACE_PREFIX) - 1) - -/* Information we keep for the standard substitutions. */ - -struct d_standard_sub_info -{ - /* The code for this substitution. */ - char code; - /* The simple string it expands to. */ - const char *simple_expansion; - /* The length of the simple expansion. */ - int simple_len; - /* The results of a full, verbose, expansion. This is used when - qualifying a constructor/destructor, or when in verbose mode. */ - const char *full_expansion; - /* The length of the full expansion. */ - int full_len; - /* What to set the last_name field of d_info to; NULL if we should - not set it. This is only relevant when qualifying a - constructor/destructor. */ - const char *set_last_name; - /* The length of set_last_name. */ - int set_last_name_len; -}; - -/* Accessors for subtrees of struct demangle_component. */ - -#define d_left(dc) ((dc)->u.s_binary.left) -#define d_right(dc) ((dc)->u.s_binary.right) - -/* A list of templates. This is used while printing. */ - -struct d_print_template -{ - /* Next template on the list. */ - struct d_print_template *next; - /* This template. */ - const struct demangle_component *template; -}; - -/* A list of type modifiers. This is used while printing. */ - -struct d_print_mod -{ - /* Next modifier on the list. These are in the reverse of the order - in which they appeared in the mangled string. */ - struct d_print_mod *next; - /* The modifier. */ - const struct demangle_component *mod; - /* Whether this modifier was printed. */ - int printed; - /* The list of templates which applies to this modifier. */ - struct d_print_template *templates; -}; - -/* We use this structure to hold information during printing. */ - -struct d_print_info -{ - /* The options passed to the demangler. */ - int options; - /* Buffer holding the result. */ - char *buf; - /* Current length of data in buffer. */ - size_t len; - /* Allocated size of buffer. */ - size_t alc; - /* The current list of templates, if any. */ - struct d_print_template *templates; - /* The current list of modifiers (e.g., pointer, reference, etc.), - if any. */ - struct d_print_mod *modifiers; - /* Set to 1 if we had a memory allocation failure. */ - int allocation_failure; -}; - -#define d_print_saw_error(dpi) ((dpi)->buf == NULL) - -#define d_append_char(dpi, c) \ - do \ - { \ - if ((dpi)->buf != NULL && (dpi)->len < (dpi)->alc) \ - (dpi)->buf[(dpi)->len++] = (c); \ - else \ - d_print_append_char ((dpi), (c)); \ - } \ - while (0) - -#define d_append_buffer(dpi, s, l) \ - do \ - { \ - if ((dpi)->buf != NULL && (dpi)->len + (l) <= (dpi)->alc) \ - { \ - memcpy ((dpi)->buf + (dpi)->len, (s), (l)); \ - (dpi)->len += l; \ - } \ - else \ - d_print_append_buffer ((dpi), (s), (l)); \ - } \ - while (0) - -#define d_append_string_constant(dpi, s) \ - d_append_buffer (dpi, (s), sizeof (s) - 1) - -#define d_last_char(dpi) \ - ((dpi)->buf == NULL || (dpi)->len == 0 ? '\0' : (dpi)->buf[(dpi)->len - 1]) - -#ifdef CP_DEMANGLE_DEBUG -static void -d_dump PARAMS ((struct demangle_component *, int)); -#endif - -static struct demangle_component * -d_make_empty PARAMS ((struct d_info *)); - -static struct demangle_component * -d_make_comp PARAMS ((struct d_info *, enum demangle_component_type, - struct demangle_component *, - struct demangle_component *)); - -static struct demangle_component * -d_make_name PARAMS ((struct d_info *, const char *, int)); - -static struct demangle_component * -d_make_builtin_type PARAMS ((struct d_info *, - const struct demangle_builtin_type_info *)); - -static struct demangle_component * -d_make_operator PARAMS ((struct d_info *, - const struct demangle_operator_info *)); - -static struct demangle_component * -d_make_extended_operator PARAMS ((struct d_info *, int, - struct demangle_component *)); - -static struct demangle_component * -d_make_ctor PARAMS ((struct d_info *, enum gnu_v3_ctor_kinds, - struct demangle_component *)); - -static struct demangle_component * -d_make_dtor PARAMS ((struct d_info *, enum gnu_v3_dtor_kinds, - struct demangle_component *)); - -static struct demangle_component * -d_make_template_param PARAMS ((struct d_info *, long)); - -static struct demangle_component * -d_make_sub PARAMS ((struct d_info *, const char *, int)); - -static int -has_return_type PARAMS ((struct demangle_component *)); - -static int -is_ctor_dtor_or_conversion PARAMS ((struct demangle_component *)); - -static struct demangle_component * -d_encoding PARAMS ((struct d_info *, int)); - -static struct demangle_component * -d_name PARAMS ((struct d_info *)); - -static struct demangle_component * -d_nested_name PARAMS ((struct d_info *)); - -static struct demangle_component * -d_prefix PARAMS ((struct d_info *)); - -static struct demangle_component * -d_unqualified_name PARAMS ((struct d_info *)); - -static struct demangle_component * -d_source_name PARAMS ((struct d_info *)); - -static long -d_number PARAMS ((struct d_info *)); - -static struct demangle_component * -d_identifier PARAMS ((struct d_info *, int)); - -static struct demangle_component * -d_operator_name PARAMS ((struct d_info *)); - -static struct demangle_component * -d_special_name PARAMS ((struct d_info *)); - -static int -d_call_offset PARAMS ((struct d_info *, int)); - -static struct demangle_component * -d_ctor_dtor_name PARAMS ((struct d_info *)); - -static struct demangle_component ** -d_cv_qualifiers PARAMS ((struct d_info *, struct demangle_component **, int)); - -static struct demangle_component * -d_function_type PARAMS ((struct d_info *)); - -static struct demangle_component * -d_bare_function_type PARAMS ((struct d_info *, int)); - -static struct demangle_component * -d_class_enum_type PARAMS ((struct d_info *)); - -static struct demangle_component * -d_array_type PARAMS ((struct d_info *)); - -static struct demangle_component * -d_pointer_to_member_type PARAMS ((struct d_info *)); - -static struct demangle_component * -d_template_param PARAMS ((struct d_info *)); - -static struct demangle_component * -d_template_args PARAMS ((struct d_info *)); - -static struct demangle_component * -d_template_arg PARAMS ((struct d_info *)); - -static struct demangle_component * -d_expression PARAMS ((struct d_info *)); - -static struct demangle_component * -d_expr_primary PARAMS ((struct d_info *)); - -static struct demangle_component * -d_local_name PARAMS ((struct d_info *)); - -static int -d_discriminator PARAMS ((struct d_info *)); - -static int -d_add_substitution PARAMS ((struct d_info *, struct demangle_component *)); - -static struct demangle_component * -d_substitution PARAMS ((struct d_info *, int)); - -static void -d_print_resize PARAMS ((struct d_print_info *, size_t)); - -static void -d_print_append_char PARAMS ((struct d_print_info *, int)); - -static void -d_print_append_buffer PARAMS ((struct d_print_info *, const char *, size_t)); - -static void -d_print_error PARAMS ((struct d_print_info *)); - -static void -d_print_comp PARAMS ((struct d_print_info *, - const struct demangle_component *)); - -static void -d_print_java_identifier PARAMS ((struct d_print_info *, const char *, int)); - -static void -d_print_mod_list PARAMS ((struct d_print_info *, struct d_print_mod *, int)); - -static void -d_print_mod PARAMS ((struct d_print_info *, - const struct demangle_component *)); - -static void -d_print_function_type PARAMS ((struct d_print_info *, - const struct demangle_component *, - struct d_print_mod *)); - -static void -d_print_array_type PARAMS ((struct d_print_info *, - const struct demangle_component *, - struct d_print_mod *)); - -static void -d_print_expr_op PARAMS ((struct d_print_info *, - const struct demangle_component *)); - -static void -d_print_cast PARAMS ((struct d_print_info *, - const struct demangle_component *)); - -static char * -d_demangle PARAMS ((const char *, int, size_t *)); - -#ifdef CP_DEMANGLE_DEBUG - -static void -d_dump (dc, indent) - struct demangle_component *dc; - int indent; -{ - int i; - - if (dc == NULL) - return; - - for (i = 0; i < indent; ++i) - putchar (' '); - - switch (dc->type) - { - case DEMANGLE_COMPONENT_NAME: - printf ("name '%.*s'\n", dc->u.s_name.len, dc->u.s_name.s); - return; - case DEMANGLE_COMPONENT_TEMPLATE_PARAM: - printf ("template parameter %ld\n", dc->u.s_number.number); - return; - case DEMANGLE_COMPONENT_CTOR: - printf ("constructor %d\n", (int) dc->u.s_ctor.kind); - d_dump (dc->u.s_ctor.name, indent + 2); - return; - case DEMANGLE_COMPONENT_DTOR: - printf ("destructor %d\n", (int) dc->u.s_dtor.kind); - d_dump (dc->u.s_dtor.name, indent + 2); - return; - case DEMANGLE_COMPONENT_SUB_STD: - printf ("standard substitution %s\n", dc->u.s_string.string); - return; - case DEMANGLE_COMPONENT_BUILTIN_TYPE: - printf ("builtin type %s\n", dc->u.s_builtin.type->name); - return; - case DEMANGLE_COMPONENT_OPERATOR: - printf ("operator %s\n", dc->u.s_operator.op->name); - return; - case DEMANGLE_COMPONENT_EXTENDED_OPERATOR: - printf ("extended operator with %d args\n", - dc->u.s_extended_operator.args); - d_dump (dc->u.s_extended_operator.name, indent + 2); - return; - - case DEMANGLE_COMPONENT_QUAL_NAME: - printf ("qualified name\n"); - break; - case DEMANGLE_COMPONENT_LOCAL_NAME: - printf ("local name\n"); - break; - case DEMANGLE_COMPONENT_TYPED_NAME: - printf ("typed name\n"); - break; - case DEMANGLE_COMPONENT_TEMPLATE: - printf ("template\n"); - break; - case DEMANGLE_COMPONENT_VTABLE: - printf ("vtable\n"); - break; - case DEMANGLE_COMPONENT_VTT: - printf ("VTT\n"); - break; - case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE: - printf ("construction vtable\n"); - break; - case DEMANGLE_COMPONENT_TYPEINFO: - printf ("typeinfo\n"); - break; - case DEMANGLE_COMPONENT_TYPEINFO_NAME: - printf ("typeinfo name\n"); - break; - case DEMANGLE_COMPONENT_TYPEINFO_FN: - printf ("typeinfo function\n"); - break; - case DEMANGLE_COMPONENT_THUNK: - printf ("thunk\n"); - break; - case DEMANGLE_COMPONENT_VIRTUAL_THUNK: - printf ("virtual thunk\n"); - break; - case DEMANGLE_COMPONENT_COVARIANT_THUNK: - printf ("covariant thunk\n"); - break; - case DEMANGLE_COMPONENT_JAVA_CLASS: - printf ("java class\n"); - break; - case DEMANGLE_COMPONENT_GUARD: - printf ("guard\n"); - break; - case DEMANGLE_COMPONENT_REFTEMP: - printf ("reference temporary\n"); - break; - case DEMANGLE_COMPONENT_RESTRICT: - printf ("restrict\n"); - break; - case DEMANGLE_COMPONENT_VOLATILE: - printf ("volatile\n"); - break; - case DEMANGLE_COMPONENT_CONST: - printf ("const\n"); - break; - case DEMANGLE_COMPONENT_RESTRICT_THIS: - printf ("restrict this\n"); - break; - case DEMANGLE_COMPONENT_VOLATILE_THIS: - printf ("volatile this\n"); - break; - case DEMANGLE_COMPONENT_CONST_THIS: - printf ("const this\n"); - break; - case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL: - printf ("vendor type qualifier\n"); - break; - case DEMANGLE_COMPONENT_POINTER: - printf ("pointer\n"); - break; - case DEMANGLE_COMPONENT_REFERENCE: - printf ("reference\n"); - break; - case DEMANGLE_COMPONENT_COMPLEX: - printf ("complex\n"); - break; - case DEMANGLE_COMPONENT_IMAGINARY: - printf ("imaginary\n"); - break; - case DEMANGLE_COMPONENT_VENDOR_TYPE: - printf ("vendor type\n"); - break; - case DEMANGLE_COMPONENT_FUNCTION_TYPE: - printf ("function type\n"); - break; - case DEMANGLE_COMPONENT_ARRAY_TYPE: - printf ("array type\n"); - break; - case DEMANGLE_COMPONENT_PTRMEM_TYPE: - printf ("pointer to member type\n"); - break; - case DEMANGLE_COMPONENT_ARGLIST: - printf ("argument list\n"); - break; - case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST: - printf ("template argument list\n"); - break; - case DEMANGLE_COMPONENT_CAST: - printf ("cast\n"); - break; - case DEMANGLE_COMPONENT_UNARY: - printf ("unary operator\n"); - break; - case DEMANGLE_COMPONENT_BINARY: - printf ("binary operator\n"); - break; - case DEMANGLE_COMPONENT_BINARY_ARGS: - printf ("binary operator arguments\n"); - break; - case DEMANGLE_COMPONENT_TRINARY: - printf ("trinary operator\n"); - break; - case DEMANGLE_COMPONENT_TRINARY_ARG1: - printf ("trinary operator arguments 1\n"); - break; - case DEMANGLE_COMPONENT_TRINARY_ARG2: - printf ("trinary operator arguments 1\n"); - break; - case DEMANGLE_COMPONENT_LITERAL: - printf ("literal\n"); - break; - case DEMANGLE_COMPONENT_LITERAL_NEG: - printf ("negative literal\n"); - break; - } - - d_dump (d_left (dc), indent + 2); - d_dump (d_right (dc), indent + 2); -} - -#endif /* CP_DEMANGLE_DEBUG */ - -/* Fill in a DEMANGLE_COMPONENT_NAME. */ - -CP_STATIC_IF_GLIBCPP_V3 -int -cplus_demangle_fill_name (p, s, len) - struct demangle_component *p; - const char *s; - int len; -{ - if (p == NULL || s == NULL || len == 0) - return 0; - p->type = DEMANGLE_COMPONENT_NAME; - p->u.s_name.s = s; - p->u.s_name.len = len; - return 1; -} - -/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */ - -CP_STATIC_IF_GLIBCPP_V3 -int -cplus_demangle_fill_extended_operator (p, args, name) - struct demangle_component *p; - int args; - struct demangle_component *name; -{ - if (p == NULL || args < 0 || name == NULL) - return 0; - p->type = DEMANGLE_COMPONENT_EXTENDED_OPERATOR; - p->u.s_extended_operator.args = args; - p->u.s_extended_operator.name = name; - return 1; -} - -/* Fill in a DEMANGLE_COMPONENT_CTOR. */ - -CP_STATIC_IF_GLIBCPP_V3 -int -cplus_demangle_fill_ctor (p, kind, name) - struct demangle_component *p; - enum gnu_v3_ctor_kinds kind; - struct demangle_component *name; -{ - if (p == NULL - || name == NULL - || (kind < gnu_v3_complete_object_ctor - && kind > gnu_v3_complete_object_allocating_ctor)) - return 0; - p->type = DEMANGLE_COMPONENT_CTOR; - p->u.s_ctor.kind = kind; - p->u.s_ctor.name = name; - return 1; -} - -/* Fill in a DEMANGLE_COMPONENT_DTOR. */ - -CP_STATIC_IF_GLIBCPP_V3 -int -cplus_demangle_fill_dtor (p, kind, name) - struct demangle_component *p; - enum gnu_v3_dtor_kinds kind; - struct demangle_component *name; -{ - if (p == NULL - || name == NULL - || (kind < gnu_v3_deleting_dtor - && kind > gnu_v3_base_object_dtor)) - return 0; - p->type = DEMANGLE_COMPONENT_DTOR; - p->u.s_dtor.kind = kind; - p->u.s_dtor.name = name; - return 1; -} - -/* Add a new component. */ - -static struct demangle_component * -d_make_empty (di) - struct d_info *di; -{ - struct demangle_component *p; - - if (di->next_comp >= di->num_comps) - return NULL; - p = &di->comps[di->next_comp]; - ++di->next_comp; - return p; -} - -/* Add a new generic component. */ - -static struct demangle_component * -d_make_comp (di, type, left, right) - struct d_info *di; - enum demangle_component_type type; - struct demangle_component *left; - struct demangle_component *right; -{ - struct demangle_component *p; - - /* We check for errors here. A typical error would be a NULL return - from a subroutine. We catch those here, and return NULL - upward. */ - switch (type) - { - /* These types require two parameters. */ - case DEMANGLE_COMPONENT_QUAL_NAME: - case DEMANGLE_COMPONENT_LOCAL_NAME: - case DEMANGLE_COMPONENT_TYPED_NAME: - case DEMANGLE_COMPONENT_TEMPLATE: - case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE: - case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL: - case DEMANGLE_COMPONENT_PTRMEM_TYPE: - case DEMANGLE_COMPONENT_UNARY: - case DEMANGLE_COMPONENT_BINARY: - case DEMANGLE_COMPONENT_BINARY_ARGS: - case DEMANGLE_COMPONENT_TRINARY: - case DEMANGLE_COMPONENT_TRINARY_ARG1: - case DEMANGLE_COMPONENT_TRINARY_ARG2: - case DEMANGLE_COMPONENT_LITERAL: - case DEMANGLE_COMPONENT_LITERAL_NEG: - if (left == NULL || right == NULL) - return NULL; - break; - - /* These types only require one parameter. */ - case DEMANGLE_COMPONENT_VTABLE: - case DEMANGLE_COMPONENT_VTT: - case DEMANGLE_COMPONENT_TYPEINFO: - case DEMANGLE_COMPONENT_TYPEINFO_NAME: - case DEMANGLE_COMPONENT_TYPEINFO_FN: - case DEMANGLE_COMPONENT_THUNK: - case DEMANGLE_COMPONENT_VIRTUAL_THUNK: - case DEMANGLE_COMPONENT_COVARIANT_THUNK: - case DEMANGLE_COMPONENT_JAVA_CLASS: - case DEMANGLE_COMPONENT_GUARD: - case DEMANGLE_COMPONENT_REFTEMP: - case DEMANGLE_COMPONENT_POINTER: - case DEMANGLE_COMPONENT_REFERENCE: - case DEMANGLE_COMPONENT_COMPLEX: - case DEMANGLE_COMPONENT_IMAGINARY: - case DEMANGLE_COMPONENT_VENDOR_TYPE: - case DEMANGLE_COMPONENT_ARGLIST: - case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST: - case DEMANGLE_COMPONENT_CAST: - if (left == NULL) - return NULL; - break; - - /* This needs a right parameter, but the left parameter can be - empty. */ - case DEMANGLE_COMPONENT_ARRAY_TYPE: - if (right == NULL) - return NULL; - break; - - /* These are allowed to have no parameters--in some cases they - will be filled in later. */ - case DEMANGLE_COMPONENT_FUNCTION_TYPE: - case DEMANGLE_COMPONENT_RESTRICT: - case DEMANGLE_COMPONENT_VOLATILE: - case DEMANGLE_COMPONENT_CONST: - case DEMANGLE_COMPONENT_RESTRICT_THIS: - case DEMANGLE_COMPONENT_VOLATILE_THIS: - case DEMANGLE_COMPONENT_CONST_THIS: - break; - - /* Other types should not be seen here. */ - default: - return NULL; - } - - p = d_make_empty (di); - if (p != NULL) - { - p->type = type; - p->u.s_binary.left = left; - p->u.s_binary.right = right; - } - return p; -} - -/* Add a new name component. */ - -static struct demangle_component * -d_make_name (di, s, len) - struct d_info *di; - const char *s; - int len; -{ - struct demangle_component *p; - - p = d_make_empty (di); - if (! cplus_demangle_fill_name (p, s, len)) - return NULL; - return p; -} - -/* Add a new builtin type component. */ - -static struct demangle_component * -d_make_builtin_type (di, type) - struct d_info *di; - const struct demangle_builtin_type_info *type; -{ - struct demangle_component *p; - - if (type == NULL) - return NULL; - p = d_make_empty (di); - if (p != NULL) - { - p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE; - p->u.s_builtin.type = type; - } - return p; -} - -/* Add a new operator component. */ - -static struct demangle_component * -d_make_operator (di, op) - struct d_info *di; - const struct demangle_operator_info *op; -{ - struct demangle_component *p; - - p = d_make_empty (di); - if (p != NULL) - { - p->type = DEMANGLE_COMPONENT_OPERATOR; - p->u.s_operator.op = op; - } - return p; -} - -/* Add a new extended operator component. */ - -static struct demangle_component * -d_make_extended_operator (di, args, name) - struct d_info *di; - int args; - struct demangle_component *name; -{ - struct demangle_component *p; - - p = d_make_empty (di); - if (! cplus_demangle_fill_extended_operator (p, args, name)) - return NULL; - return p; -} - -/* Add a new constructor component. */ - -static struct demangle_component * -d_make_ctor (di, kind, name) - struct d_info *di; - enum gnu_v3_ctor_kinds kind; - struct demangle_component *name; -{ - struct demangle_component *p; - - p = d_make_empty (di); - if (! cplus_demangle_fill_ctor (p, kind, name)) - return NULL; - return p; -} - -/* Add a new destructor component. */ - -static struct demangle_component * -d_make_dtor (di, kind, name) - struct d_info *di; - enum gnu_v3_dtor_kinds kind; - struct demangle_component *name; -{ - struct demangle_component *p; - - p = d_make_empty (di); - if (! cplus_demangle_fill_dtor (p, kind, name)) - return NULL; - return p; -} - -/* Add a new template parameter. */ - -static struct demangle_component * -d_make_template_param (di, i) - struct d_info *di; - long i; -{ - struct demangle_component *p; - - p = d_make_empty (di); - if (p != NULL) - { - p->type = DEMANGLE_COMPONENT_TEMPLATE_PARAM; - p->u.s_number.number = i; - } - return p; -} - -/* Add a new standard substitution component. */ - -static struct demangle_component * -d_make_sub (di, name, len) - struct d_info *di; - const char *name; - int len; -{ - struct demangle_component *p; - - p = d_make_empty (di); - if (p != NULL) - { - p->type = DEMANGLE_COMPONENT_SUB_STD; - p->u.s_string.string = name; - p->u.s_string.len = len; - } - return p; -} - -/* ::= _Z - - TOP_LEVEL is non-zero when called at the top level. */ - -CP_STATIC_IF_GLIBCPP_V3 -struct demangle_component * -cplus_demangle_mangled_name (di, top_level) - struct d_info *di; - int top_level; -{ - if (d_next_char (di) != '_') - return NULL; - if (d_next_char (di) != 'Z') - return NULL; - return d_encoding (di, top_level); -} - -/* Return whether a function should have a return type. The argument - is the function name, which may be qualified in various ways. The - rules are that template functions have return types with some - exceptions, function types which are not part of a function name - mangling have return types with some exceptions, and non-template - function names do not have return types. The exceptions are that - constructors, destructors, and conversion operators do not have - return types. */ - -static int -has_return_type (dc) - struct demangle_component *dc; -{ - if (dc == NULL) - return 0; - switch (dc->type) - { - default: - return 0; - case DEMANGLE_COMPONENT_TEMPLATE: - return ! is_ctor_dtor_or_conversion (d_left (dc)); - case DEMANGLE_COMPONENT_RESTRICT_THIS: - case DEMANGLE_COMPONENT_VOLATILE_THIS: - case DEMANGLE_COMPONENT_CONST_THIS: - return has_return_type (d_left (dc)); - } -} - -/* Return whether a name is a constructor, a destructor, or a - conversion operator. */ - -static int -is_ctor_dtor_or_conversion (dc) - struct demangle_component *dc; -{ - if (dc == NULL) - return 0; - switch (dc->type) - { - default: - return 0; - case DEMANGLE_COMPONENT_QUAL_NAME: - case DEMANGLE_COMPONENT_LOCAL_NAME: - return is_ctor_dtor_or_conversion (d_right (dc)); - case DEMANGLE_COMPONENT_CTOR: - case DEMANGLE_COMPONENT_DTOR: - case DEMANGLE_COMPONENT_CAST: - return 1; - } -} - -/* ::= <(function) name> - ::= <(data) name> - ::= - - TOP_LEVEL is non-zero when called at the top level, in which case - if DMGL_PARAMS is not set we do not demangle the function - parameters. We only set this at the top level, because otherwise - we would not correctly demangle names in local scopes. */ - -static struct demangle_component * -d_encoding (di, top_level) - struct d_info *di; - int top_level; -{ - char peek = d_peek_char (di); - - if (peek == 'G' || peek == 'T') - return d_special_name (di); - else - { - struct demangle_component *dc; - - dc = d_name (di); - - if (dc != NULL && top_level && (di->options & DMGL_PARAMS) == 0) - { - /* Strip off any initial CV-qualifiers, as they really apply - to the `this' parameter, and they were not output by the - v2 demangler without DMGL_PARAMS. */ - while (dc->type == DEMANGLE_COMPONENT_RESTRICT_THIS - || dc->type == DEMANGLE_COMPONENT_VOLATILE_THIS - || dc->type == DEMANGLE_COMPONENT_CONST_THIS) - dc = d_left (dc); - - /* If the top level is a DEMANGLE_COMPONENT_LOCAL_NAME, then - there may be CV-qualifiers on its right argument which - really apply here; this happens when parsing a class - which is local to a function. */ - if (dc->type == DEMANGLE_COMPONENT_LOCAL_NAME) - { - struct demangle_component *dcr; - - dcr = d_right (dc); - while (dcr->type == DEMANGLE_COMPONENT_RESTRICT_THIS - || dcr->type == DEMANGLE_COMPONENT_VOLATILE_THIS - || dcr->type == DEMANGLE_COMPONENT_CONST_THIS) - dcr = d_left (dcr); - dc->u.s_binary.right = dcr; - } - - return dc; - } - - peek = d_peek_char (di); - if (peek == '\0' || peek == 'E') - return dc; - return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc, - d_bare_function_type (di, has_return_type (dc))); - } -} - -/* ::= - ::= - ::= - ::= - - ::= - ::= St - - ::= - ::= -*/ - -static struct demangle_component * -d_name (di) - struct d_info *di; -{ - char peek = d_peek_char (di); - struct demangle_component *dc; - - switch (peek) - { - case 'N': - return d_nested_name (di); - - case 'Z': - return d_local_name (di); - - case 'S': - { - int subst; - - if (d_peek_next_char (di) != 't') - { - dc = d_substitution (di, 0); - subst = 1; - } - else - { - d_advance (di, 2); - dc = d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, - d_make_name (di, "std", 3), - d_unqualified_name (di)); - di->expansion += 3; - subst = 0; - } - - if (d_peek_char (di) != 'I') - { - /* The grammar does not permit this case to occur if we - called d_substitution() above (i.e., subst == 1). We - don't bother to check. */ - } - else - { - /* This is , which means that we just saw - , which is a substitution - candidate if we didn't just get it from a - substitution. */ - if (! subst) - { - if (! d_add_substitution (di, dc)) - return NULL; - } - dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc, - d_template_args (di)); - } - - return dc; - } - - default: - dc = d_unqualified_name (di); - if (d_peek_char (di) == 'I') - { - /* This is , which means that we just saw - , which is a substitution - candidate. */ - if (! d_add_substitution (di, dc)) - return NULL; - dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc, - d_template_args (di)); - } - return dc; - } -} - -/* ::= N [] E - ::= N [] E -*/ - -static struct demangle_component * -d_nested_name (di) - struct d_info *di; -{ - struct demangle_component *ret; - struct demangle_component **pret; - - if (d_next_char (di) != 'N') - return NULL; - - pret = d_cv_qualifiers (di, &ret, 1); - if (pret == NULL) - return NULL; - - *pret = d_prefix (di); - if (*pret == NULL) - return NULL; - - if (d_next_char (di) != 'E') - return NULL; - - return ret; -} - -/* ::= - ::= - ::= - ::= - ::= - - ::= <(template) unqualified-name> - ::= - ::= -*/ - -static struct demangle_component * -d_prefix (di) - struct d_info *di; -{ - struct demangle_component *ret = NULL; - - while (1) - { - char peek; - enum demangle_component_type comb_type; - struct demangle_component *dc; - - peek = d_peek_char (di); - if (peek == '\0') - return NULL; - - /* The older code accepts a here, but I don't see - that in the grammar. The older code does not accept a - here. */ - - comb_type = DEMANGLE_COMPONENT_QUAL_NAME; - if (IS_DIGIT (peek) - || IS_LOWER (peek) - || peek == 'C' - || peek == 'D') - dc = d_unqualified_name (di); - else if (peek == 'S') - dc = d_substitution (di, 1); - else if (peek == 'I') - { - if (ret == NULL) - return NULL; - comb_type = DEMANGLE_COMPONENT_TEMPLATE; - dc = d_template_args (di); - } - else if (peek == 'T') - dc = d_template_param (di); - else if (peek == 'E') - return ret; - else - return NULL; - - if (ret == NULL) - ret = dc; - else - ret = d_make_comp (di, comb_type, ret, dc); - - if (peek != 'S' && d_peek_char (di) != 'E') - { - if (! d_add_substitution (di, ret)) - return NULL; - } - } -} - -/* ::= - ::= - ::= -*/ - -static struct demangle_component * -d_unqualified_name (di) - struct d_info *di; -{ - char peek; - - peek = d_peek_char (di); - if (IS_DIGIT (peek)) - return d_source_name (di); - else if (IS_LOWER (peek)) - { - struct demangle_component *ret; - - ret = d_operator_name (di); - if (ret != NULL && ret->type == DEMANGLE_COMPONENT_OPERATOR) - di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2; - return ret; - } - else if (peek == 'C' || peek == 'D') - return d_ctor_dtor_name (di); - else - return NULL; -} - -/* ::= <(positive length) number> */ - -static struct demangle_component * -d_source_name (di) - struct d_info *di; -{ - long len; - struct demangle_component *ret; - - len = d_number (di); - if (len <= 0) - return NULL; - ret = d_identifier (di, len); - di->last_name = ret; - return ret; -} - -/* number ::= [n] <(non-negative decimal integer)> */ - -static long -d_number (di) - struct d_info *di; -{ - int negative; - char peek; - long ret; - - negative = 0; - peek = d_peek_char (di); - if (peek == 'n') - { - negative = 1; - d_advance (di, 1); - peek = d_peek_char (di); - } - - ret = 0; - while (1) - { - if (! IS_DIGIT (peek)) - { - if (negative) - ret = - ret; - return ret; - } - ret = ret * 10 + peek - '0'; - d_advance (di, 1); - peek = d_peek_char (di); - } -} - -/* identifier ::= <(unqualified source code identifier)> */ - -static struct demangle_component * -d_identifier (di, len) - struct d_info *di; - int len; -{ - const char *name; - - name = d_str (di); - - if (di->send - name < len) - return NULL; - - d_advance (di, len); - - /* A Java mangled name may have a trailing '$' if it is a C++ - keyword. This '$' is not included in the length count. We just - ignore the '$'. */ - if ((di->options & DMGL_JAVA) != 0 - && d_peek_char (di) == '$') - d_advance (di, 1); - - /* Look for something which looks like a gcc encoding of an - anonymous namespace, and replace it with a more user friendly - name. */ - if (len >= (int) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2 - && memcmp (name, ANONYMOUS_NAMESPACE_PREFIX, - ANONYMOUS_NAMESPACE_PREFIX_LEN) == 0) - { - const char *s; - - s = name + ANONYMOUS_NAMESPACE_PREFIX_LEN; - if ((*s == '.' || *s == '_' || *s == '$') - && s[1] == 'N') - { - di->expansion -= len - sizeof "(anonymous namespace)"; - return d_make_name (di, "(anonymous namespace)", - sizeof "(anonymous namespace)" - 1); - } - } - - return d_make_name (di, name, len); -} - -/* operator_name ::= many different two character encodings. - ::= cv - ::= v -*/ - -#define NL(s) s, (sizeof s) - 1 - -CP_STATIC_IF_GLIBCPP_V3 -const struct demangle_operator_info cplus_demangle_operators[] = -{ - { "aN", NL ("&="), 2 }, - { "aS", NL ("="), 2 }, - { "aa", NL ("&&"), 2 }, - { "ad", NL ("&"), 1 }, - { "an", NL ("&"), 2 }, - { "cl", NL ("()"), 0 }, - { "cm", NL (","), 2 }, - { "co", NL ("~"), 1 }, - { "dV", NL ("/="), 2 }, - { "da", NL ("delete[]"), 1 }, - { "de", NL ("*"), 1 }, - { "dl", NL ("delete"), 1 }, - { "dv", NL ("/"), 2 }, - { "eO", NL ("^="), 2 }, - { "eo", NL ("^"), 2 }, - { "eq", NL ("=="), 2 }, - { "ge", NL (">="), 2 }, - { "gt", NL (">"), 2 }, - { "ix", NL ("[]"), 2 }, - { "lS", NL ("<<="), 2 }, - { "le", NL ("<="), 2 }, - { "ls", NL ("<<"), 2 }, - { "lt", NL ("<"), 2 }, - { "mI", NL ("-="), 2 }, - { "mL", NL ("*="), 2 }, - { "mi", NL ("-"), 2 }, - { "ml", NL ("*"), 2 }, - { "mm", NL ("--"), 1 }, - { "na", NL ("new[]"), 1 }, - { "ne", NL ("!="), 2 }, - { "ng", NL ("-"), 1 }, - { "nt", NL ("!"), 1 }, - { "nw", NL ("new"), 1 }, - { "oR", NL ("|="), 2 }, - { "oo", NL ("||"), 2 }, - { "or", NL ("|"), 2 }, - { "pL", NL ("+="), 2 }, - { "pl", NL ("+"), 2 }, - { "pm", NL ("->*"), 2 }, - { "pp", NL ("++"), 1 }, - { "ps", NL ("+"), 1 }, - { "pt", NL ("->"), 2 }, - { "qu", NL ("?"), 3 }, - { "rM", NL ("%="), 2 }, - { "rS", NL (">>="), 2 }, - { "rm", NL ("%"), 2 }, - { "rs", NL (">>"), 2 }, - { "st", NL ("sizeof "), 1 }, - { "sz", NL ("sizeof "), 1 }, - { NULL, NULL, 0, 0 } -}; - -static struct demangle_component * -d_operator_name (di) - struct d_info *di; -{ - char c1; - char c2; - - c1 = d_next_char (di); - c2 = d_next_char (di); - if (c1 == 'v' && IS_DIGIT (c2)) - return d_make_extended_operator (di, c2 - '0', d_source_name (di)); - else if (c1 == 'c' && c2 == 'v') - return d_make_comp (di, DEMANGLE_COMPONENT_CAST, - cplus_demangle_type (di), NULL); - else - { - /* LOW is the inclusive lower bound. */ - int low = 0; - /* HIGH is the exclusive upper bound. We subtract one to ignore - the sentinel at the end of the array. */ - int high = ((sizeof (cplus_demangle_operators) - / sizeof (cplus_demangle_operators[0])) - - 1); - - while (1) - { - int i; - const struct demangle_operator_info *p; - - i = low + (high - low) / 2; - p = cplus_demangle_operators + i; - - if (c1 == p->code[0] && c2 == p->code[1]) - return d_make_operator (di, p); - - if (c1 < p->code[0] || (c1 == p->code[0] && c2 < p->code[1])) - high = i; - else - low = i + 1; - if (low == high) - return NULL; - } - } -} - -/* ::= TV - ::= TT - ::= TI - ::= TS - ::= GV <(object) name> - ::= T <(base) encoding> - ::= Tc <(base) encoding> - Also g++ extensions: - ::= TC <(offset) number> _ <(base) type> - ::= TF - ::= TJ - ::= GR -*/ - -static struct demangle_component * -d_special_name (di) - struct d_info *di; -{ - char c; - - di->expansion += 20; - c = d_next_char (di); - if (c == 'T') - { - switch (d_next_char (di)) - { - case 'V': - di->expansion -= 5; - return d_make_comp (di, DEMANGLE_COMPONENT_VTABLE, - cplus_demangle_type (di), NULL); - case 'T': - di->expansion -= 10; - return d_make_comp (di, DEMANGLE_COMPONENT_VTT, - cplus_demangle_type (di), NULL); - case 'I': - return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO, - cplus_demangle_type (di), NULL); - case 'S': - return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_NAME, - cplus_demangle_type (di), NULL); - - case 'h': - if (! d_call_offset (di, 'h')) - return NULL; - return d_make_comp (di, DEMANGLE_COMPONENT_THUNK, - d_encoding (di, 0), NULL); - - case 'v': - if (! d_call_offset (di, 'v')) - return NULL; - return d_make_comp (di, DEMANGLE_COMPONENT_VIRTUAL_THUNK, - d_encoding (di, 0), NULL); - - case 'c': - if (! d_call_offset (di, '\0')) - return NULL; - if (! d_call_offset (di, '\0')) - return NULL; - return d_make_comp (di, DEMANGLE_COMPONENT_COVARIANT_THUNK, - d_encoding (di, 0), NULL); - - case 'C': - { - struct demangle_component *derived_type; - long offset; - struct demangle_component *base_type; - - derived_type = cplus_demangle_type (di); - offset = d_number (di); - if (offset < 0) - return NULL; - if (d_next_char (di) != '_') - return NULL; - base_type = cplus_demangle_type (di); - /* We don't display the offset. FIXME: We should display - it in verbose mode. */ - di->expansion += 5; - return d_make_comp (di, DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, - base_type, derived_type); - } - - case 'F': - return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_FN, - cplus_demangle_type (di), NULL); - case 'J': - return d_make_comp (di, DEMANGLE_COMPONENT_JAVA_CLASS, - cplus_demangle_type (di), NULL); - - default: - return NULL; - } - } - else if (c == 'G') - { - switch (d_next_char (di)) - { - case 'V': - return d_make_comp (di, DEMANGLE_COMPONENT_GUARD, d_name (di), NULL); - - case 'R': - return d_make_comp (di, DEMANGLE_COMPONENT_REFTEMP, d_name (di), - NULL); - - default: - return NULL; - } - } - else - return NULL; -} - -/* ::= h _ - ::= v _ - - ::= <(offset) number> - - ::= <(offset) number> _ <(virtual offset) number> - - The C parameter, if not '\0', is a character we just read which is - the start of the . - - We don't display the offset information anywhere. FIXME: We should - display it in verbose mode. */ - -static int -d_call_offset (di, c) - struct d_info *di; - int c; -{ - long offset; - long virtual_offset; - - if (c == '\0') - c = d_next_char (di); - - if (c == 'h') - offset = d_number (di); - else if (c == 'v') - { - offset = d_number (di); - if (d_next_char (di) != '_') - return 0; - virtual_offset = d_number (di); - } - else - return 0; - - if (d_next_char (di) != '_') - return 0; - - return 1; -} - -/* ::= C1 - ::= C2 - ::= C3 - ::= D0 - ::= D1 - ::= D2 -*/ - -static struct demangle_component * -d_ctor_dtor_name (di) - struct d_info *di; -{ - if (di->last_name != NULL) - { - if (di->last_name->type == DEMANGLE_COMPONENT_NAME) - di->expansion += di->last_name->u.s_name.len; - else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD) - di->expansion += di->last_name->u.s_string.len; - } - switch (d_next_char (di)) - { - case 'C': - { - enum gnu_v3_ctor_kinds kind; - - switch (d_next_char (di)) - { - case '1': - kind = gnu_v3_complete_object_ctor; - break; - case '2': - kind = gnu_v3_base_object_ctor; - break; - case '3': - kind = gnu_v3_complete_object_allocating_ctor; - break; - default: - return NULL; - } - return d_make_ctor (di, kind, di->last_name); - } - - case 'D': - { - enum gnu_v3_dtor_kinds kind; - - switch (d_next_char (di)) - { - case '0': - kind = gnu_v3_deleting_dtor; - break; - case '1': - kind = gnu_v3_complete_object_dtor; - break; - case '2': - kind = gnu_v3_base_object_dtor; - break; - default: - return NULL; - } - return d_make_dtor (di, kind, di->last_name); - } - - default: - return NULL; - } -} - -/* ::= - ::= - ::= - ::= - ::= - ::= - ::= - ::= - ::= - ::= P - ::= R - ::= C - ::= G - ::= U - - ::= various one letter codes - ::= u -*/ - -CP_STATIC_IF_GLIBCPP_V3 -const struct demangle_builtin_type_info -cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] = -{ - /* a */ { NL ("signed char"), NL ("signed char"), D_PRINT_DEFAULT }, - /* b */ { NL ("bool"), NL ("boolean"), D_PRINT_BOOL }, - /* c */ { NL ("char"), NL ("byte"), D_PRINT_DEFAULT }, - /* d */ { NL ("double"), NL ("double"), D_PRINT_FLOAT }, - /* e */ { NL ("long double"), NL ("long double"), D_PRINT_FLOAT }, - /* f */ { NL ("float"), NL ("float"), D_PRINT_FLOAT }, - /* g */ { NL ("__float128"), NL ("__float128"), D_PRINT_FLOAT }, - /* h */ { NL ("unsigned char"), NL ("unsigned char"), D_PRINT_DEFAULT }, - /* i */ { NL ("int"), NL ("int"), D_PRINT_INT }, - /* j */ { NL ("unsigned int"), NL ("unsigned"), D_PRINT_UNSIGNED }, - /* k */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT }, - /* l */ { NL ("long"), NL ("long"), D_PRINT_LONG }, - /* m */ { NL ("unsigned long"), NL ("unsigned long"), D_PRINT_UNSIGNED_LONG }, - /* n */ { NL ("__int128"), NL ("__int128"), D_PRINT_DEFAULT }, - /* o */ { NL ("unsigned __int128"), NL ("unsigned __int128"), - D_PRINT_DEFAULT }, - /* p */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT }, - /* q */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT }, - /* r */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT }, - /* s */ { NL ("short"), NL ("short"), D_PRINT_DEFAULT }, - /* t */ { NL ("unsigned short"), NL ("unsigned short"), D_PRINT_DEFAULT }, - /* u */ { NULL, 0, NULL, 0, D_PRINT_DEFAULT }, - /* v */ { NL ("void"), NL ("void"), D_PRINT_VOID }, - /* w */ { NL ("wchar_t"), NL ("char"), D_PRINT_DEFAULT }, - /* x */ { NL ("long long"), NL ("long"), D_PRINT_LONG_LONG }, - /* y */ { NL ("unsigned long long"), NL ("unsigned long long"), - D_PRINT_UNSIGNED_LONG_LONG }, - /* z */ { NL ("..."), NL ("..."), D_PRINT_DEFAULT }, -}; - -CP_STATIC_IF_GLIBCPP_V3 -struct demangle_component * -cplus_demangle_type (di) - struct d_info *di; -{ - char peek; - struct demangle_component *ret; - int can_subst; - - /* The ABI specifies that when CV-qualifiers are used, the base type - is substitutable, and the fully qualified type is substitutable, - but the base type with a strict subset of the CV-qualifiers is - not substitutable. The natural recursive implementation of the - CV-qualifiers would cause subsets to be substitutable, so instead - we pull them all off now. - - FIXME: The ABI says that order-insensitive vendor qualifiers - should be handled in the same way, but we have no way to tell - which vendor qualifiers are order-insensitive and which are - order-sensitive. So we just assume that they are all - order-sensitive. g++ 3.4 supports only one vendor qualifier, - __vector, and it treats it as order-sensitive when mangling - names. */ - - peek = d_peek_char (di); - if (peek == 'r' || peek == 'V' || peek == 'K') - { - struct demangle_component **pret; - - pret = d_cv_qualifiers (di, &ret, 0); - if (pret == NULL) - return NULL; - *pret = cplus_demangle_type (di); - if (! d_add_substitution (di, ret)) - return NULL; - return ret; - } - - can_subst = 1; - - switch (peek) - { - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': - case 'h': case 'i': case 'j': case 'l': case 'm': case 'n': - case 'o': case 's': case 't': - case 'v': case 'w': case 'x': case 'y': case 'z': - ret = d_make_builtin_type (di, - &cplus_demangle_builtin_types[peek - 'a']); - di->expansion += ret->u.s_builtin.type->len; - can_subst = 0; - d_advance (di, 1); - break; - - case 'u': - d_advance (di, 1); - ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE, - d_source_name (di), NULL); - break; - - case 'F': - ret = d_function_type (di); - break; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case 'N': - case 'Z': - ret = d_class_enum_type (di); - break; - - case 'A': - ret = d_array_type (di); - break; - - case 'M': - ret = d_pointer_to_member_type (di); - break; - - case 'T': - ret = d_template_param (di); - if (d_peek_char (di) == 'I') - { - /* This is . The - part is a substitution - candidate. */ - if (! d_add_substitution (di, ret)) - return NULL; - ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret, - d_template_args (di)); - } - break; - - case 'S': - /* If this is a special substitution, then it is the start of - . */ - { - char peek_next; - - peek_next = d_peek_next_char (di); - if (IS_DIGIT (peek_next) - || peek_next == '_' - || IS_UPPER (peek_next)) - { - ret = d_substitution (di, 0); - /* The substituted name may have been a template name and - may be followed by tepmlate args. */ - if (d_peek_char (di) == 'I') - ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret, - d_template_args (di)); - else - can_subst = 0; - } - else - { - ret = d_class_enum_type (di); - /* If the substitution was a complete type, then it is not - a new substitution candidate. However, if the - substitution was followed by template arguments, then - the whole thing is a substitution candidate. */ - if (ret != NULL && ret->type == DEMANGLE_COMPONENT_SUB_STD) - can_subst = 0; - } - } - break; - - case 'P': - d_advance (di, 1); - ret = d_make_comp (di, DEMANGLE_COMPONENT_POINTER, - cplus_demangle_type (di), NULL); - break; - - case 'R': - d_advance (di, 1); - ret = d_make_comp (di, DEMANGLE_COMPONENT_REFERENCE, - cplus_demangle_type (di), NULL); - break; - - case 'C': - d_advance (di, 1); - ret = d_make_comp (di, DEMANGLE_COMPONENT_COMPLEX, - cplus_demangle_type (di), NULL); - break; - - case 'G': - d_advance (di, 1); - ret = d_make_comp (di, DEMANGLE_COMPONENT_IMAGINARY, - cplus_demangle_type (di), NULL); - break; - - case 'U': - d_advance (di, 1); - ret = d_source_name (di); - ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL, - cplus_demangle_type (di), ret); - break; - - default: - return NULL; - } - - if (can_subst) - { - if (! d_add_substitution (di, ret)) - return NULL; - } - - return ret; -} - -/* ::= [r] [V] [K] */ - -static struct demangle_component ** -d_cv_qualifiers (di, pret, member_fn) - struct d_info *di; - struct demangle_component **pret; - int member_fn; -{ - char peek; - - peek = d_peek_char (di); - while (peek == 'r' || peek == 'V' || peek == 'K') - { - enum demangle_component_type t; - - d_advance (di, 1); - if (peek == 'r') - { - t = (member_fn - ? DEMANGLE_COMPONENT_RESTRICT_THIS - : DEMANGLE_COMPONENT_RESTRICT); - di->expansion += sizeof "restrict"; - } - else if (peek == 'V') - { - t = (member_fn - ? DEMANGLE_COMPONENT_VOLATILE_THIS - : DEMANGLE_COMPONENT_VOLATILE); - di->expansion += sizeof "volatile"; - } - else - { - t = (member_fn - ? DEMANGLE_COMPONENT_CONST_THIS - : DEMANGLE_COMPONENT_CONST); - di->expansion += sizeof "const"; - } - - *pret = d_make_comp (di, t, NULL, NULL); - if (*pret == NULL) - return NULL; - pret = &d_left (*pret); - - peek = d_peek_char (di); - } - - return pret; -} - -/* ::= F [Y] E */ - -static struct demangle_component * -d_function_type (di) - struct d_info *di; -{ - struct demangle_component *ret; - - if (d_next_char (di) != 'F') - return NULL; - if (d_peek_char (di) == 'Y') - { - /* Function has C linkage. We don't print this information. - FIXME: We should print it in verbose mode. */ - d_advance (di, 1); - } - ret = d_bare_function_type (di, 1); - if (d_next_char (di) != 'E') - return NULL; - return ret; -} - -/* ::= + */ - -static struct demangle_component * -d_bare_function_type (di, has_return_type) - struct d_info *di; - int has_return_type; -{ - struct demangle_component *return_type; - struct demangle_component *tl; - struct demangle_component **ptl; - - return_type = NULL; - tl = NULL; - ptl = &tl; - while (1) - { - char peek; - struct demangle_component *type; - - peek = d_peek_char (di); - if (peek == '\0' || peek == 'E') - break; - type = cplus_demangle_type (di); - if (type == NULL) - return NULL; - if (has_return_type) - { - return_type = type; - has_return_type = 0; - } - else - { - *ptl = d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, type, NULL); - if (*ptl == NULL) - return NULL; - ptl = &d_right (*ptl); - } - } - - /* There should be at least one parameter type besides the optional - return type. A function which takes no arguments will have a - single parameter type void. */ - if (tl == NULL) - return NULL; - - /* If we have a single parameter type void, omit it. */ - if (d_right (tl) == NULL - && d_left (tl)->type == DEMANGLE_COMPONENT_BUILTIN_TYPE - && d_left (tl)->u.s_builtin.type->print == D_PRINT_VOID) - { - di->expansion -= d_left (tl)->u.s_builtin.type->len; - tl = NULL; - } - - return d_make_comp (di, DEMANGLE_COMPONENT_FUNCTION_TYPE, return_type, tl); -} - -/* ::= */ - -static struct demangle_component * -d_class_enum_type (di) - struct d_info *di; -{ - return d_name (di); -} - -/* ::= A <(positive dimension) number> _ <(element) type> - ::= A [<(dimension) expression>] _ <(element) type> -*/ - -static struct demangle_component * -d_array_type (di) - struct d_info *di; -{ - char peek; - struct demangle_component *dim; - - if (d_next_char (di) != 'A') - return NULL; - - peek = d_peek_char (di); - if (peek == '_') - dim = NULL; - else if (IS_DIGIT (peek)) - { - const char *s; - - s = d_str (di); - do - { - d_advance (di, 1); - peek = d_peek_char (di); - } - while (IS_DIGIT (peek)); - dim = d_make_name (di, s, d_str (di) - s); - if (dim == NULL) - return NULL; - } - else - { - dim = d_expression (di); - if (dim == NULL) - return NULL; - } - - if (d_next_char (di) != '_') - return NULL; - - return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim, - cplus_demangle_type (di)); -} - -/* ::= M <(class) type> <(member) type> */ - -static struct demangle_component * -d_pointer_to_member_type (di) - struct d_info *di; -{ - struct demangle_component *cl; - struct demangle_component *mem; - struct demangle_component **pmem; - - if (d_next_char (di) != 'M') - return NULL; - - cl = cplus_demangle_type (di); - - /* The ABI specifies that any type can be a substitution source, and - that M is followed by two types, and that when a CV-qualified - type is seen both the base type and the CV-qualified types are - substitution sources. The ABI also specifies that for a pointer - to a CV-qualified member function, the qualifiers are attached to - the second type. Given the grammar, a plain reading of the ABI - suggests that both the CV-qualified member function and the - non-qualified member function are substitution sources. However, - g++ does not work that way. g++ treats only the CV-qualified - member function as a substitution source. FIXME. So to work - with g++, we need to pull off the CV-qualifiers here, in order to - avoid calling add_substitution() in cplus_demangle_type(). */ - - pmem = d_cv_qualifiers (di, &mem, 1); - if (pmem == NULL) - return NULL; - *pmem = cplus_demangle_type (di); - - return d_make_comp (di, DEMANGLE_COMPONENT_PTRMEM_TYPE, cl, mem); -} - -/* ::= T_ - ::= T <(parameter-2 non-negative) number> _ -*/ - -static struct demangle_component * -d_template_param (di) - struct d_info *di; -{ - long param; - - if (d_next_char (di) != 'T') - return NULL; - - if (d_peek_char (di) == '_') - param = 0; - else - { - param = d_number (di); - if (param < 0) - return NULL; - param += 1; - } - - if (d_next_char (di) != '_') - return NULL; - - ++di->did_subs; - - return d_make_template_param (di, param); -} - -/* ::= I + E */ - -static struct demangle_component * -d_template_args (di) - struct d_info *di; -{ - struct demangle_component *hold_last_name; - struct demangle_component *al; - struct demangle_component **pal; - - /* Preserve the last name we saw--don't let the template arguments - clobber it, as that would give us the wrong name for a subsequent - constructor or destructor. */ - hold_last_name = di->last_name; - - if (d_next_char (di) != 'I') - return NULL; - - al = NULL; - pal = &al; - while (1) - { - struct demangle_component *a; - - a = d_template_arg (di); - if (a == NULL) - return NULL; - - *pal = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, a, NULL); - if (*pal == NULL) - return NULL; - pal = &d_right (*pal); - - if (d_peek_char (di) == 'E') - { - d_advance (di, 1); - break; - } - } - - di->last_name = hold_last_name; - - return al; -} - -/* ::= - ::= X E - ::= -*/ - -static struct demangle_component * -d_template_arg (di) - struct d_info *di; -{ - struct demangle_component *ret; - - switch (d_peek_char (di)) - { - case 'X': - d_advance (di, 1); - ret = d_expression (di); - if (d_next_char (di) != 'E') - return NULL; - return ret; - - case 'L': - return d_expr_primary (di); - - default: - return cplus_demangle_type (di); - } -} - -/* ::= <(unary) operator-name> - ::= <(binary) operator-name> - ::= <(trinary) operator-name> - ::= st - ::= - ::= sr - ::= sr - ::= -*/ - -static struct demangle_component * -d_expression (di) - struct d_info *di; -{ - char peek; - - peek = d_peek_char (di); - if (peek == 'L') - return d_expr_primary (di); - else if (peek == 'T') - return d_template_param (di); - else if (peek == 's' && d_peek_next_char (di) == 'r') - { - struct demangle_component *type; - struct demangle_component *name; - - d_advance (di, 2); - type = cplus_demangle_type (di); - name = d_unqualified_name (di); - if (d_peek_char (di) != 'I') - return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type, name); - else - return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type, - d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name, - d_template_args (di))); - } - else - { - struct demangle_component *op; - int args; - - op = d_operator_name (di); - if (op == NULL) - return NULL; - - if (op->type == DEMANGLE_COMPONENT_OPERATOR) - di->expansion += op->u.s_operator.op->len - 2; - - if (op->type == DEMANGLE_COMPONENT_OPERATOR - && strcmp (op->u.s_operator.op->code, "st") == 0) - return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op, - cplus_demangle_type (di)); - - switch (op->type) - { - default: - return NULL; - case DEMANGLE_COMPONENT_OPERATOR: - args = op->u.s_operator.op->args; - break; - case DEMANGLE_COMPONENT_EXTENDED_OPERATOR: - args = op->u.s_extended_operator.args; - break; - case DEMANGLE_COMPONENT_CAST: - args = 1; - break; - } - - switch (args) - { - case 1: - return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op, - d_expression (di)); - case 2: - { - struct demangle_component *left; - - left = d_expression (di); - return d_make_comp (di, DEMANGLE_COMPONENT_BINARY, op, - d_make_comp (di, - DEMANGLE_COMPONENT_BINARY_ARGS, - left, - d_expression (di))); - } - case 3: - { - struct demangle_component *first; - struct demangle_component *second; - - first = d_expression (di); - second = d_expression (di); - return d_make_comp (di, DEMANGLE_COMPONENT_TRINARY, op, - d_make_comp (di, - DEMANGLE_COMPONENT_TRINARY_ARG1, - first, - d_make_comp (di, - DEMANGLE_COMPONENT_TRINARY_ARG2, - second, - d_expression (di)))); - } - default: - return NULL; - } - } -} - -/* ::= L <(value) number> E - ::= L <(value) float> E - ::= L E -*/ - -static struct demangle_component * -d_expr_primary (di) - struct d_info *di; -{ - struct demangle_component *ret; - - if (d_next_char (di) != 'L') - return NULL; - if (d_peek_char (di) == '_') - ret = cplus_demangle_mangled_name (di, 0); - else - { - struct demangle_component *type; - enum demangle_component_type t; - const char *s; - - type = cplus_demangle_type (di); - - /* If we have a type we know how to print, we aren't going to - print the type name itself. */ - if (type->type == DEMANGLE_COMPONENT_BUILTIN_TYPE - && type->u.s_builtin.type->print != D_PRINT_DEFAULT) - di->expansion -= type->u.s_builtin.type->len; - - /* Rather than try to interpret the literal value, we just - collect it as a string. Note that it's possible to have a - floating point literal here. The ABI specifies that the - format of such literals is machine independent. That's fine, - but what's not fine is that versions of g++ up to 3.2 with - -fabi-version=1 used upper case letters in the hex constant, - and dumped out gcc's internal representation. That makes it - hard to tell where the constant ends, and hard to dump the - constant in any readable form anyhow. We don't attempt to - handle these cases. */ - - t = DEMANGLE_COMPONENT_LITERAL; - if (d_peek_char (di) == 'n') - { - t = DEMANGLE_COMPONENT_LITERAL_NEG; - d_advance (di, 1); - } - s = d_str (di); - while (d_peek_char (di) != 'E') - d_advance (di, 1); - ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s)); - } - if (d_next_char (di) != 'E') - return NULL; - return ret; -} - -/* ::= Z <(function) encoding> E <(entity) name> [] - ::= Z <(function) encoding> E s [] -*/ - -static struct demangle_component * -d_local_name (di) - struct d_info *di; -{ - struct demangle_component *function; - - if (d_next_char (di) != 'Z') - return NULL; - - function = d_encoding (di, 0); - - if (d_next_char (di) != 'E') - return NULL; - - if (d_peek_char (di) == 's') - { - d_advance (di, 1); - if (! d_discriminator (di)) - return NULL; - return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function, - d_make_name (di, "string literal", - sizeof "string literal" - 1)); - } - else - { - struct demangle_component *name; - - name = d_name (di); - if (! d_discriminator (di)) - return NULL; - return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function, name); - } -} - -/* ::= _ <(non-negative) number> - - We demangle the discriminator, but we don't print it out. FIXME: - We should print it out in verbose mode. */ - -static int -d_discriminator (di) - struct d_info *di; -{ - long discrim; - - if (d_peek_char (di) != '_') - return 1; - d_advance (di, 1); - discrim = d_number (di); - if (discrim < 0) - return 0; - return 1; -} - -/* Add a new substitution. */ - -static int -d_add_substitution (di, dc) - struct d_info *di; - struct demangle_component *dc; -{ - if (dc == NULL) - return 0; - if (di->next_sub >= di->num_subs) - return 0; - di->subs[di->next_sub] = dc; - ++di->next_sub; - return 1; -} - -/* ::= S _ - ::= S_ - ::= St - ::= Sa - ::= Sb - ::= Ss - ::= Si - ::= So - ::= Sd - - If PREFIX is non-zero, then this type is being used as a prefix in - a qualified name. In this case, for the standard substitutions, we - need to check whether we are being used as a prefix for a - constructor or destructor, and return a full template name. - Otherwise we will get something like std::iostream::~iostream() - which does not correspond particularly well to any function which - actually appears in the source. -*/ - -static const struct d_standard_sub_info standard_subs[] = -{ - { 't', NL ("std"), - NL ("std"), - NULL, 0 }, - { 'a', NL ("std::allocator"), - NL ("std::allocator"), - NL ("allocator") }, - { 'b', NL ("std::basic_string"), - NL ("std::basic_string"), - NL ("basic_string") }, - { 's', NL ("std::string"), - NL ("std::basic_string, std::allocator >"), - NL ("basic_string") }, - { 'i', NL ("std::istream"), - NL ("std::basic_istream >"), - NL ("basic_istream") }, - { 'o', NL ("std::ostream"), - NL ("std::basic_ostream >"), - NL ("basic_ostream") }, - { 'd', NL ("std::iostream"), - NL ("std::basic_iostream >"), - NL ("basic_iostream") } -}; - -static struct demangle_component * -d_substitution (di, prefix) - struct d_info *di; - int prefix; -{ - char c; - - if (d_next_char (di) != 'S') - return NULL; - - c = d_next_char (di); - if (c == '_' || IS_DIGIT (c) || IS_UPPER (c)) - { - int id; - - id = 0; - if (c != '_') - { - do - { - if (IS_DIGIT (c)) - id = id * 36 + c - '0'; - else if (IS_UPPER (c)) - id = id * 36 + c - 'A' + 10; - else - return NULL; - c = d_next_char (di); - } - while (c != '_'); - - ++id; - } - - if (id >= di->next_sub) - return NULL; - - ++di->did_subs; - - return di->subs[id]; - } - else - { - int verbose; - const struct d_standard_sub_info *p; - const struct d_standard_sub_info *pend; - - verbose = (di->options & DMGL_VERBOSE) != 0; - if (! verbose && prefix) - { - char peek; - - peek = d_peek_char (di); - if (peek == 'C' || peek == 'D') - verbose = 1; - } - - pend = (&standard_subs[0] - + sizeof standard_subs / sizeof standard_subs[0]); - for (p = &standard_subs[0]; p < pend; ++p) - { - if (c == p->code) - { - const char *s; - int len; - - if (p->set_last_name != NULL) - di->last_name = d_make_sub (di, p->set_last_name, - p->set_last_name_len); - if (verbose) - { - s = p->full_expansion; - len = p->full_len; - } - else - { - s = p->simple_expansion; - len = p->simple_len; - } - di->expansion += len; - return d_make_sub (di, s, len); - } - } - - return NULL; - } -} - -/* Resize the print buffer. */ - -static void -d_print_resize (dpi, add) - struct d_print_info *dpi; - size_t add; -{ - size_t need; - - if (dpi->buf == NULL) - return; - need = dpi->len + add; - while (need > dpi->alc) - { - size_t newalc; - char *newbuf; - - newalc = dpi->alc * 2; - newbuf = realloc (dpi->buf, newalc); - if (newbuf == NULL) - { - free (dpi->buf); - dpi->buf = NULL; - dpi->allocation_failure = 1; - return; - } - dpi->buf = newbuf; - dpi->alc = newalc; - } -} - -/* Append a character to the print buffer. */ - -static void -d_print_append_char (dpi, c) - struct d_print_info *dpi; - int c; -{ - if (dpi->buf != NULL) - { - if (dpi->len >= dpi->alc) - { - d_print_resize (dpi, 1); - if (dpi->buf == NULL) - return; - } - - dpi->buf[dpi->len] = c; - ++dpi->len; - } -} - -/* Append a buffer to the print buffer. */ - -static void -d_print_append_buffer (dpi, s, l) - struct d_print_info *dpi; - const char *s; - size_t l; -{ - if (dpi->buf != NULL) - { - if (dpi->len + l > dpi->alc) - { - d_print_resize (dpi, l); - if (dpi->buf == NULL) - return; - } - - memcpy (dpi->buf + dpi->len, s, l); - dpi->len += l; - } -} - -/* Indicate that an error occurred during printing. */ - -static void -d_print_error (dpi) - struct d_print_info *dpi; -{ - free (dpi->buf); - dpi->buf = NULL; -} - -/* Turn components into a human readable string. OPTIONS is the - options bits passed to the demangler. DC is the tree to print. - ESTIMATE is a guess at the length of the result. This returns a - string allocated by malloc, or NULL on error. On success, this - sets *PALC to the size of the allocated buffer. On failure, this - sets *PALC to 0 for a bad parse, or to 1 for a memory allocation - failure. */ - -CP_STATIC_IF_GLIBCPP_V3 -char * -cplus_demangle_print (options, dc, estimate, palc) - int options; - const struct demangle_component *dc; - int estimate; - size_t *palc; -{ - struct d_print_info dpi; - - dpi.options = options; - - dpi.alc = estimate + 1; - dpi.buf = malloc (dpi.alc); - if (dpi.buf == NULL) - { - *palc = 1; - return NULL; - } - - dpi.len = 0; - dpi.templates = NULL; - dpi.modifiers = NULL; - - dpi.allocation_failure = 0; - - d_print_comp (&dpi, dc); - - d_append_char (&dpi, '\0'); - - if (dpi.buf != NULL) - *palc = dpi.alc; - else - *palc = dpi.allocation_failure; - - return dpi.buf; -} - -/* Subroutine to handle components. */ - -static void -d_print_comp (dpi, dc) - struct d_print_info *dpi; - const struct demangle_component *dc; -{ - if (dc == NULL) - { - d_print_error (dpi); - return; - } - if (d_print_saw_error (dpi)) - return; - - switch (dc->type) - { - case DEMANGLE_COMPONENT_NAME: - if ((dpi->options & DMGL_JAVA) == 0) - d_append_buffer (dpi, dc->u.s_name.s, dc->u.s_name.len); - else - d_print_java_identifier (dpi, dc->u.s_name.s, dc->u.s_name.len); - return; - - case DEMANGLE_COMPONENT_QUAL_NAME: - case DEMANGLE_COMPONENT_LOCAL_NAME: - d_print_comp (dpi, d_left (dc)); - if ((dpi->options & DMGL_JAVA) == 0) - d_append_string_constant (dpi, "::"); - else - d_append_char (dpi, '.'); - d_print_comp (dpi, d_right (dc)); - return; - - case DEMANGLE_COMPONENT_TYPED_NAME: - { - struct d_print_mod *hold_modifiers; - struct demangle_component *typed_name; - struct d_print_mod adpm[4]; - unsigned int i; - struct d_print_template dpt; - - /* Pass the name down to the type so that it can be printed in - the right place for the type. We also have to pass down - any CV-qualifiers, which apply to the this parameter. */ - hold_modifiers = dpi->modifiers; - i = 0; - typed_name = d_left (dc); - while (typed_name != NULL) - { - if (i >= sizeof adpm / sizeof adpm[0]) - { - d_print_error (dpi); - return; - } - - adpm[i].next = dpi->modifiers; - dpi->modifiers = &adpm[i]; - adpm[i].mod = typed_name; - adpm[i].printed = 0; - adpm[i].templates = dpi->templates; - ++i; - - if (typed_name->type != DEMANGLE_COMPONENT_RESTRICT_THIS - && typed_name->type != DEMANGLE_COMPONENT_VOLATILE_THIS - && typed_name->type != DEMANGLE_COMPONENT_CONST_THIS) - break; - - typed_name = d_left (typed_name); - } - - /* If typed_name is a template, then it applies to the - function type as well. */ - if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE) - { - dpt.next = dpi->templates; - dpi->templates = &dpt; - dpt.template = typed_name; - } - - /* If typed_name is a DEMANGLE_COMPONENT_LOCAL_NAME, then - there may be CV-qualifiers on its right argument which - really apply here; this happens when parsing a class which - is local to a function. */ - if (typed_name->type == DEMANGLE_COMPONENT_LOCAL_NAME) - { - struct demangle_component *local_name; - - local_name = d_right (typed_name); - while (local_name->type == DEMANGLE_COMPONENT_RESTRICT_THIS - || local_name->type == DEMANGLE_COMPONENT_VOLATILE_THIS - || local_name->type == DEMANGLE_COMPONENT_CONST_THIS) - { - if (i >= sizeof adpm / sizeof adpm[0]) - { - d_print_error (dpi); - return; - } - - adpm[i] = adpm[i - 1]; - adpm[i].next = &adpm[i - 1]; - dpi->modifiers = &adpm[i]; - - adpm[i - 1].mod = local_name; - adpm[i - 1].printed = 0; - adpm[i - 1].templates = dpi->templates; - ++i; - - local_name = d_left (local_name); - } - } - - d_print_comp (dpi, d_right (dc)); - - if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE) - dpi->templates = dpt.next; - - /* If the modifiers didn't get printed by the type, print them - now. */ - while (i > 0) - { - --i; - if (! adpm[i].printed) - { - d_append_char (dpi, ' '); - d_print_mod (dpi, adpm[i].mod); - } - } - - dpi->modifiers = hold_modifiers; - - return; - } - - case DEMANGLE_COMPONENT_TEMPLATE: - { - struct d_print_mod *hold_dpm; - - /* Don't push modifiers into a template definition. Doing so - could give the wrong definition for a template argument. - Instead, treat the template essentially as a name. */ - - hold_dpm = dpi->modifiers; - dpi->modifiers = NULL; - - d_print_comp (dpi, d_left (dc)); - if (d_last_char (dpi) == '<') - d_append_char (dpi, ' '); - d_append_char (dpi, '<'); - d_print_comp (dpi, d_right (dc)); - /* Avoid generating two consecutive '>' characters, to avoid - the C++ syntactic ambiguity. */ - if (d_last_char (dpi) == '>') - d_append_char (dpi, ' '); - d_append_char (dpi, '>'); - - dpi->modifiers = hold_dpm; - - return; - } - - case DEMANGLE_COMPONENT_TEMPLATE_PARAM: - { - long i; - struct demangle_component *a; - struct d_print_template *hold_dpt; - - if (dpi->templates == NULL) - { - d_print_error (dpi); - return; - } - i = dc->u.s_number.number; - for (a = d_right (dpi->templates->template); - a != NULL; - a = d_right (a)) - { - if (a->type != DEMANGLE_COMPONENT_TEMPLATE_ARGLIST) - { - d_print_error (dpi); - return; - } - if (i <= 0) - break; - --i; - } - if (i != 0 || a == NULL) - { - d_print_error (dpi); - return; - } - - /* While processing this parameter, we need to pop the list of - templates. This is because the template parameter may - itself be a reference to a parameter of an outer - template. */ - - hold_dpt = dpi->templates; - dpi->templates = hold_dpt->next; - - d_print_comp (dpi, d_left (a)); - - dpi->templates = hold_dpt; - - return; - } - - case DEMANGLE_COMPONENT_CTOR: - d_print_comp (dpi, dc->u.s_ctor.name); - return; - - case DEMANGLE_COMPONENT_DTOR: - d_append_char (dpi, '~'); - d_print_comp (dpi, dc->u.s_dtor.name); - return; - - case DEMANGLE_COMPONENT_VTABLE: - d_append_string_constant (dpi, "vtable for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_VTT: - d_append_string_constant (dpi, "VTT for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE: - d_append_string_constant (dpi, "construction vtable for "); - d_print_comp (dpi, d_left (dc)); - d_append_string_constant (dpi, "-in-"); - d_print_comp (dpi, d_right (dc)); - return; - - case DEMANGLE_COMPONENT_TYPEINFO: - d_append_string_constant (dpi, "typeinfo for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_TYPEINFO_NAME: - d_append_string_constant (dpi, "typeinfo name for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_TYPEINFO_FN: - d_append_string_constant (dpi, "typeinfo fn for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_THUNK: - d_append_string_constant (dpi, "non-virtual thunk to "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_VIRTUAL_THUNK: - d_append_string_constant (dpi, "virtual thunk to "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_COVARIANT_THUNK: - d_append_string_constant (dpi, "covariant return thunk to "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_JAVA_CLASS: - d_append_string_constant (dpi, "java Class for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_GUARD: - d_append_string_constant (dpi, "guard variable for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_REFTEMP: - d_append_string_constant (dpi, "reference temporary for "); - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_SUB_STD: - d_append_buffer (dpi, dc->u.s_string.string, dc->u.s_string.len); - return; - - case DEMANGLE_COMPONENT_RESTRICT: - case DEMANGLE_COMPONENT_VOLATILE: - case DEMANGLE_COMPONENT_CONST: - { - struct d_print_mod *pdpm; - - /* When printing arrays, it's possible to have cases where the - same CV-qualifier gets pushed on the stack multiple times. - We only need to print it once. */ - - for (pdpm = dpi->modifiers; pdpm != NULL; pdpm = pdpm->next) - { - if (! pdpm->printed) - { - if (pdpm->mod->type != DEMANGLE_COMPONENT_RESTRICT - && pdpm->mod->type != DEMANGLE_COMPONENT_VOLATILE - && pdpm->mod->type != DEMANGLE_COMPONENT_CONST) - break; - if (pdpm->mod->type == dc->type) - { - d_print_comp (dpi, d_left (dc)); - return; - } - } - } - } - /* Fall through. */ - case DEMANGLE_COMPONENT_RESTRICT_THIS: - case DEMANGLE_COMPONENT_VOLATILE_THIS: - case DEMANGLE_COMPONENT_CONST_THIS: - case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL: - case DEMANGLE_COMPONENT_POINTER: - case DEMANGLE_COMPONENT_REFERENCE: - case DEMANGLE_COMPONENT_COMPLEX: - case DEMANGLE_COMPONENT_IMAGINARY: - { - /* We keep a list of modifiers on the stack. */ - struct d_print_mod dpm; - - dpm.next = dpi->modifiers; - dpi->modifiers = &dpm; - dpm.mod = dc; - dpm.printed = 0; - dpm.templates = dpi->templates; - - d_print_comp (dpi, d_left (dc)); - - /* If the modifier didn't get printed by the type, print it - now. */ - if (! dpm.printed) - d_print_mod (dpi, dc); - - dpi->modifiers = dpm.next; - - return; - } - - case DEMANGLE_COMPONENT_BUILTIN_TYPE: - if ((dpi->options & DMGL_JAVA) == 0) - d_append_buffer (dpi, dc->u.s_builtin.type->name, - dc->u.s_builtin.type->len); - else - d_append_buffer (dpi, dc->u.s_builtin.type->java_name, - dc->u.s_builtin.type->java_len); - return; - - case DEMANGLE_COMPONENT_VENDOR_TYPE: - d_print_comp (dpi, d_left (dc)); - return; - - case DEMANGLE_COMPONENT_FUNCTION_TYPE: - { - if (d_left (dc) != NULL) - { - struct d_print_mod dpm; - - /* We must pass this type down as a modifier in order to - print it in the right location. */ - - dpm.next = dpi->modifiers; - dpi->modifiers = &dpm; - dpm.mod = dc; - dpm.printed = 0; - dpm.templates = dpi->templates; - - d_print_comp (dpi, d_left (dc)); - - dpi->modifiers = dpm.next; - - if (dpm.printed) - return; - - d_append_char (dpi, ' '); - } - - d_print_function_type (dpi, dc, dpi->modifiers); - - return; - } - - case DEMANGLE_COMPONENT_ARRAY_TYPE: - { - struct d_print_mod *hold_modifiers; - struct d_print_mod adpm[4]; - unsigned int i; - struct d_print_mod *pdpm; - - /* We must pass this type down as a modifier in order to print - multi-dimensional arrays correctly. If the array itself is - CV-qualified, we act as though the element type were - CV-qualified. We do this by copying the modifiers down - rather than fiddling pointers, so that we don't wind up - with a d_print_mod higher on the stack pointing into our - stack frame after we return. */ - - hold_modifiers = dpi->modifiers; - - adpm[0].next = hold_modifiers; - dpi->modifiers = &adpm[0]; - adpm[0].mod = dc; - adpm[0].printed = 0; - adpm[0].templates = dpi->templates; - - i = 1; - pdpm = hold_modifiers; - while (pdpm != NULL - && (pdpm->mod->type == DEMANGLE_COMPONENT_RESTRICT - || pdpm->mod->type == DEMANGLE_COMPONENT_VOLATILE - || pdpm->mod->type == DEMANGLE_COMPONENT_CONST)) - { - if (! pdpm->printed) - { - if (i >= sizeof adpm / sizeof adpm[0]) - { - d_print_error (dpi); - return; - } - - adpm[i] = *pdpm; - adpm[i].next = dpi->modifiers; - dpi->modifiers = &adpm[i]; - pdpm->printed = 1; - ++i; - } - - pdpm = pdpm->next; - } - - d_print_comp (dpi, d_right (dc)); - - dpi->modifiers = hold_modifiers; - - if (adpm[0].printed) - return; - - while (i > 1) - { - --i; - d_print_mod (dpi, adpm[i].mod); - } - - d_print_array_type (dpi, dc, dpi->modifiers); - - return; - } - - case DEMANGLE_COMPONENT_PTRMEM_TYPE: - { - struct d_print_mod dpm; - - dpm.next = dpi->modifiers; - dpi->modifiers = &dpm; - dpm.mod = dc; - dpm.printed = 0; - dpm.templates = dpi->templates; - - d_print_comp (dpi, d_right (dc)); - - /* If the modifier didn't get printed by the type, print it - now. */ - if (! dpm.printed) - { - d_append_char (dpi, ' '); - d_print_comp (dpi, d_left (dc)); - d_append_string_constant (dpi, "::*"); - } - - dpi->modifiers = dpm.next; - - return; - } - - case DEMANGLE_COMPONENT_ARGLIST: - case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST: - d_print_comp (dpi, d_left (dc)); - if (d_right (dc) != NULL) - { - d_append_string_constant (dpi, ", "); - d_print_comp (dpi, d_right (dc)); - } - return; - - case DEMANGLE_COMPONENT_OPERATOR: - { - char c; - - d_append_string_constant (dpi, "operator"); - c = dc->u.s_operator.op->name[0]; - if (IS_LOWER (c)) - d_append_char (dpi, ' '); - d_append_buffer (dpi, dc->u.s_operator.op->name, - dc->u.s_operator.op->len); - return; - } - - case DEMANGLE_COMPONENT_EXTENDED_OPERATOR: - d_append_string_constant (dpi, "operator "); - d_print_comp (dpi, dc->u.s_extended_operator.name); - return; - - case DEMANGLE_COMPONENT_CAST: - d_append_string_constant (dpi, "operator "); - d_print_cast (dpi, dc); - return; - - case DEMANGLE_COMPONENT_UNARY: - if (d_left (dc)->type != DEMANGLE_COMPONENT_CAST) - d_print_expr_op (dpi, d_left (dc)); - else - { - d_append_char (dpi, '('); - d_print_cast (dpi, d_left (dc)); - d_append_char (dpi, ')'); - } - d_append_char (dpi, '('); - d_print_comp (dpi, d_right (dc)); - d_append_char (dpi, ')'); - return; - - case DEMANGLE_COMPONENT_BINARY: - if (d_right (dc)->type != DEMANGLE_COMPONENT_BINARY_ARGS) - { - d_print_error (dpi); - return; - } - - /* We wrap an expression which uses the greater-than operator in - an extra layer of parens so that it does not get confused - with the '>' which ends the template parameters. */ - if (d_left (dc)->type == DEMANGLE_COMPONENT_OPERATOR - && d_left (dc)->u.s_operator.op->len == 1 - && d_left (dc)->u.s_operator.op->name[0] == '>') - d_append_char (dpi, '('); - - d_append_char (dpi, '('); - d_print_comp (dpi, d_left (d_right (dc))); - d_append_string_constant (dpi, ") "); - d_print_expr_op (dpi, d_left (dc)); - d_append_string_constant (dpi, " ("); - d_print_comp (dpi, d_right (d_right (dc))); - d_append_char (dpi, ')'); - - if (d_left (dc)->type == DEMANGLE_COMPONENT_OPERATOR - && d_left (dc)->u.s_operator.op->len == 1 - && d_left (dc)->u.s_operator.op->name[0] == '>') - d_append_char (dpi, ')'); - - return; - - case DEMANGLE_COMPONENT_BINARY_ARGS: - /* We should only see this as part of DEMANGLE_COMPONENT_BINARY. */ - d_print_error (dpi); - return; - - case DEMANGLE_COMPONENT_TRINARY: - if (d_right (dc)->type != DEMANGLE_COMPONENT_TRINARY_ARG1 - || d_right (d_right (dc))->type != DEMANGLE_COMPONENT_TRINARY_ARG2) - { - d_print_error (dpi); - return; - } - d_append_char (dpi, '('); - d_print_comp (dpi, d_left (d_right (dc))); - d_append_string_constant (dpi, ") "); - d_print_expr_op (dpi, d_left (dc)); - d_append_string_constant (dpi, " ("); - d_print_comp (dpi, d_left (d_right (d_right (dc)))); - d_append_string_constant (dpi, ") : ("); - d_print_comp (dpi, d_right (d_right (d_right (dc)))); - d_append_char (dpi, ')'); - return; - - case DEMANGLE_COMPONENT_TRINARY_ARG1: - case DEMANGLE_COMPONENT_TRINARY_ARG2: - /* We should only see these are part of DEMANGLE_COMPONENT_TRINARY. */ - d_print_error (dpi); - return; - - case DEMANGLE_COMPONENT_LITERAL: - case DEMANGLE_COMPONENT_LITERAL_NEG: - { - enum d_builtin_type_print tp; - - /* For some builtin types, produce simpler output. */ - tp = D_PRINT_DEFAULT; - if (d_left (dc)->type == DEMANGLE_COMPONENT_BUILTIN_TYPE) - { - tp = d_left (dc)->u.s_builtin.type->print; - switch (tp) - { - case D_PRINT_INT: - case D_PRINT_UNSIGNED: - case D_PRINT_LONG: - case D_PRINT_UNSIGNED_LONG: - case D_PRINT_LONG_LONG: - case D_PRINT_UNSIGNED_LONG_LONG: - if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME) - { - if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG) - d_append_char (dpi, '-'); - d_print_comp (dpi, d_right (dc)); - switch (tp) - { - default: - break; - case D_PRINT_UNSIGNED: - d_append_char (dpi, 'u'); - break; - case D_PRINT_LONG: - d_append_char (dpi, 'l'); - break; - case D_PRINT_UNSIGNED_LONG: - d_append_string_constant (dpi, "ul"); - break; - case D_PRINT_LONG_LONG: - d_append_string_constant (dpi, "ll"); - break; - case D_PRINT_UNSIGNED_LONG_LONG: - d_append_string_constant (dpi, "ull"); - break; - } - return; - } - break; - - case D_PRINT_BOOL: - if (d_right (dc)->type == DEMANGLE_COMPONENT_NAME - && d_right (dc)->u.s_name.len == 1 - && dc->type == DEMANGLE_COMPONENT_LITERAL) - { - switch (d_right (dc)->u.s_name.s[0]) - { - case '0': - d_append_string_constant (dpi, "false"); - return; - case '1': - d_append_string_constant (dpi, "true"); - return; - default: - break; - } - } - break; - - default: - break; - } - } - - d_append_char (dpi, '('); - d_print_comp (dpi, d_left (dc)); - d_append_char (dpi, ')'); - if (dc->type == DEMANGLE_COMPONENT_LITERAL_NEG) - d_append_char (dpi, '-'); - if (tp == D_PRINT_FLOAT) - d_append_char (dpi, '['); - d_print_comp (dpi, d_right (dc)); - if (tp == D_PRINT_FLOAT) - d_append_char (dpi, ']'); - } - return; - - default: - d_print_error (dpi); - return; - } -} - -/* Print a Java dentifier. For Java we try to handle encoded extended - Unicode characters. The C++ ABI doesn't mention Unicode encoding, - so we don't it for C++. Characters are encoded as - __U+_. */ - -static void -d_print_java_identifier (dpi, name, len) - struct d_print_info *dpi; - const char *name; - int len; -{ - const char *p; - const char *end; - - end = name + len; - for (p = name; p < end; ++p) - { - if (end - p > 3 - && p[0] == '_' - && p[1] == '_' - && p[2] == 'U') - { - unsigned long c; - const char *q; - - c = 0; - for (q = p + 3; q < end; ++q) - { - int dig; - - if (IS_DIGIT (*q)) - dig = *q - '0'; - else if (*q >= 'A' && *q <= 'F') - dig = *q - 'A' + 10; - else if (*q >= 'a' && *q <= 'f') - dig = *q - 'a' + 10; - else - break; - - c = c * 16 + dig; - } - /* If the Unicode character is larger than 256, we don't try - to deal with it here. FIXME. */ - if (q < end && *q == '_' && c < 256) - { - d_append_char (dpi, c); - p = q; - continue; - } - } - - d_append_char (dpi, *p); - } -} - -/* Print a list of modifiers. SUFFIX is 1 if we are printing - qualifiers on this after printing a function. */ - -static void -d_print_mod_list (dpi, mods, suffix) - struct d_print_info *dpi; - struct d_print_mod *mods; - int suffix; -{ - struct d_print_template *hold_dpt; - - if (mods == NULL || d_print_saw_error (dpi)) - return; - - if (mods->printed - || (! suffix - && (mods->mod->type == DEMANGLE_COMPONENT_RESTRICT_THIS - || mods->mod->type == DEMANGLE_COMPONENT_VOLATILE_THIS - || mods->mod->type == DEMANGLE_COMPONENT_CONST_THIS))) - { - d_print_mod_list (dpi, mods->next, suffix); - return; - } - - mods->printed = 1; - - hold_dpt = dpi->templates; - dpi->templates = mods->templates; - - if (mods->mod->type == DEMANGLE_COMPONENT_FUNCTION_TYPE) - { - d_print_function_type (dpi, mods->mod, mods->next); - dpi->templates = hold_dpt; - return; - } - else if (mods->mod->type == DEMANGLE_COMPONENT_ARRAY_TYPE) - { - d_print_array_type (dpi, mods->mod, mods->next); - dpi->templates = hold_dpt; - return; - } - else if (mods->mod->type == DEMANGLE_COMPONENT_LOCAL_NAME) - { - struct d_print_mod *hold_modifiers; - struct demangle_component *dc; - - /* When this is on the modifier stack, we have pulled any - qualifiers off the right argument already. Otherwise, we - print it as usual, but don't let the left argument see any - modifiers. */ - - hold_modifiers = dpi->modifiers; - dpi->modifiers = NULL; - d_print_comp (dpi, d_left (mods->mod)); - dpi->modifiers = hold_modifiers; - - if ((dpi->options & DMGL_JAVA) == 0) - d_append_string_constant (dpi, "::"); - else - d_append_char (dpi, '.'); - - dc = d_right (mods->mod); - while (dc->type == DEMANGLE_COMPONENT_RESTRICT_THIS - || dc->type == DEMANGLE_COMPONENT_VOLATILE_THIS - || dc->type == DEMANGLE_COMPONENT_CONST_THIS) - dc = d_left (dc); - - d_print_comp (dpi, dc); - - dpi->templates = hold_dpt; - return; - } - - d_print_mod (dpi, mods->mod); - - dpi->templates = hold_dpt; - - d_print_mod_list (dpi, mods->next, suffix); -} - -/* Print a modifier. */ - -static void -d_print_mod (dpi, mod) - struct d_print_info *dpi; - const struct demangle_component *mod; -{ - switch (mod->type) - { - case DEMANGLE_COMPONENT_RESTRICT: - case DEMANGLE_COMPONENT_RESTRICT_THIS: - d_append_string_constant (dpi, " restrict"); - return; - case DEMANGLE_COMPONENT_VOLATILE: - case DEMANGLE_COMPONENT_VOLATILE_THIS: - d_append_string_constant (dpi, " volatile"); - return; - case DEMANGLE_COMPONENT_CONST: - case DEMANGLE_COMPONENT_CONST_THIS: - d_append_string_constant (dpi, " const"); - return; - case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL: - d_append_char (dpi, ' '); - d_print_comp (dpi, d_right (mod)); - return; - case DEMANGLE_COMPONENT_POINTER: - /* There is no pointer symbol in Java. */ - if ((dpi->options & DMGL_JAVA) == 0) - d_append_char (dpi, '*'); - return; - case DEMANGLE_COMPONENT_REFERENCE: - d_append_char (dpi, '&'); - return; - case DEMANGLE_COMPONENT_COMPLEX: - d_append_string_constant (dpi, "complex "); - return; - case DEMANGLE_COMPONENT_IMAGINARY: - d_append_string_constant (dpi, "imaginary "); - return; - case DEMANGLE_COMPONENT_PTRMEM_TYPE: - if (d_last_char (dpi) != '(') - d_append_char (dpi, ' '); - d_print_comp (dpi, d_left (mod)); - d_append_string_constant (dpi, "::*"); - return; - case DEMANGLE_COMPONENT_TYPED_NAME: - d_print_comp (dpi, d_left (mod)); - return; - default: - /* Otherwise, we have something that won't go back on the - modifier stack, so we can just print it. */ - d_print_comp (dpi, mod); - return; - } -} - -/* Print a function type, except for the return type. */ - -static void -d_print_function_type (dpi, dc, mods) - struct d_print_info *dpi; - const struct demangle_component *dc; - struct d_print_mod *mods; -{ - int need_paren; - int saw_mod; - int need_space; - struct d_print_mod *p; - struct d_print_mod *hold_modifiers; - - need_paren = 0; - saw_mod = 0; - need_space = 0; - for (p = mods; p != NULL; p = p->next) - { - if (p->printed) - break; - - saw_mod = 1; - switch (p->mod->type) - { - case DEMANGLE_COMPONENT_POINTER: - case DEMANGLE_COMPONENT_REFERENCE: - need_paren = 1; - break; - case DEMANGLE_COMPONENT_RESTRICT: - case DEMANGLE_COMPONENT_VOLATILE: - case DEMANGLE_COMPONENT_CONST: - case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL: - case DEMANGLE_COMPONENT_COMPLEX: - case DEMANGLE_COMPONENT_IMAGINARY: - case DEMANGLE_COMPONENT_PTRMEM_TYPE: - need_space = 1; - need_paren = 1; - break; - case DEMANGLE_COMPONENT_RESTRICT_THIS: - case DEMANGLE_COMPONENT_VOLATILE_THIS: - case DEMANGLE_COMPONENT_CONST_THIS: - break; - default: - break; - } - if (need_paren) - break; - } - - if (d_left (dc) != NULL && ! saw_mod) - need_paren = 1; - - if (need_paren) - { - if (! need_space) - { - if (d_last_char (dpi) != '(' - && d_last_char (dpi) != '*') - need_space = 1; - } - if (need_space && d_last_char (dpi) != ' ') - d_append_char (dpi, ' '); - d_append_char (dpi, '('); - } - - hold_modifiers = dpi->modifiers; - dpi->modifiers = NULL; - - d_print_mod_list (dpi, mods, 0); - - if (need_paren) - d_append_char (dpi, ')'); - - d_append_char (dpi, '('); - - if (d_right (dc) != NULL) - d_print_comp (dpi, d_right (dc)); - - d_append_char (dpi, ')'); - - d_print_mod_list (dpi, mods, 1); - - dpi->modifiers = hold_modifiers; -} - -/* Print an array type, except for the element type. */ - -static void -d_print_array_type (dpi, dc, mods) - struct d_print_info *dpi; - const struct demangle_component *dc; - struct d_print_mod *mods; -{ - int need_space; - - need_space = 1; - if (mods != NULL) - { - int need_paren; - struct d_print_mod *p; - - need_paren = 0; - for (p = mods; p != NULL; p = p->next) - { - if (! p->printed) - { - if (p->mod->type == DEMANGLE_COMPONENT_ARRAY_TYPE) - { - need_space = 0; - break; - } - else - { - need_paren = 1; - need_space = 1; - break; - } - } - } - - if (need_paren) - d_append_string_constant (dpi, " ("); - - d_print_mod_list (dpi, mods, 0); - - if (need_paren) - d_append_char (dpi, ')'); - } - - if (need_space) - d_append_char (dpi, ' '); - - d_append_char (dpi, '['); - - if (d_left (dc) != NULL) - d_print_comp (dpi, d_left (dc)); - - d_append_char (dpi, ']'); -} - -/* Print an operator in an expression. */ - -static void -d_print_expr_op (dpi, dc) - struct d_print_info *dpi; - const struct demangle_component *dc; -{ - if (dc->type == DEMANGLE_COMPONENT_OPERATOR) - d_append_buffer (dpi, dc->u.s_operator.op->name, - dc->u.s_operator.op->len); - else - d_print_comp (dpi, dc); -} - -/* Print a cast. */ - -static void -d_print_cast (dpi, dc) - struct d_print_info *dpi; - const struct demangle_component *dc; -{ - if (d_left (dc)->type != DEMANGLE_COMPONENT_TEMPLATE) - d_print_comp (dpi, d_left (dc)); - else - { - struct d_print_mod *hold_dpm; - struct d_print_template dpt; - - /* It appears that for a templated cast operator, we need to put - the template parameters in scope for the operator name, but - not for the parameters. The effect is that we need to handle - the template printing here. */ - - hold_dpm = dpi->modifiers; - dpi->modifiers = NULL; - - dpt.next = dpi->templates; - dpi->templates = &dpt; - dpt.template = d_left (dc); - - d_print_comp (dpi, d_left (d_left (dc))); - - dpi->templates = dpt.next; - - if (d_last_char (dpi) == '<') - d_append_char (dpi, ' '); - d_append_char (dpi, '<'); - d_print_comp (dpi, d_right (d_left (dc))); - /* Avoid generating two consecutive '>' characters, to avoid - the C++ syntactic ambiguity. */ - if (d_last_char (dpi) == '>') - d_append_char (dpi, ' '); - d_append_char (dpi, '>'); - - dpi->modifiers = hold_dpm; - } -} - -/* Initialize the information structure we use to pass around - information. */ - -CP_STATIC_IF_GLIBCPP_V3 -void -cplus_demangle_init_info (mangled, options, len, di) - const char *mangled; - int options; - size_t len; - struct d_info *di; -{ - di->s = mangled; - di->send = mangled + len; - di->options = options; - - di->n = mangled; - - /* We can not need more components than twice the number of chars in - the mangled string. Most components correspond directly to - chars, but the ARGLIST types are exceptions. */ - di->num_comps = 2 * len; - di->next_comp = 0; - - /* Similarly, we can not need more substitutions than there are - chars in the mangled string. */ - di->num_subs = len; - di->next_sub = 0; - di->did_subs = 0; - - di->last_name = NULL; - - di->expansion = 0; -} - -/* Entry point for the demangler. If MANGLED is a g++ v3 ABI mangled - name, return a buffer allocated with malloc holding the demangled - name. OPTIONS is the usual libiberty demangler options. On - success, this sets *PALC to the allocated size of the returned - buffer. On failure, this sets *PALC to 0 for a bad name, or 1 for - a memory allocation failure. On failure, this returns NULL. */ - -static char * -d_demangle (mangled, options, palc) - const char* mangled; - int options; - size_t *palc; -{ - size_t len; - int type; - struct d_info di; - struct demangle_component *dc; - int estimate; - char *ret; - - *palc = 0; - - len = strlen (mangled); - - if (mangled[0] == '_' && mangled[1] == 'Z') - type = 0; - else if (strncmp (mangled, "_GLOBAL_", 8) == 0 - && (mangled[8] == '.' || mangled[8] == '_' || mangled[8] == '$') - && (mangled[9] == 'D' || mangled[9] == 'I') - && mangled[10] == '_') - { - char *r; - - r = malloc (40 + len - 11); - if (r == NULL) - *palc = 1; - else - { - if (mangled[9] == 'I') - strcpy (r, "global constructors keyed to "); - else - strcpy (r, "global destructors keyed to "); - strcat (r, mangled + 11); - } - return r; - } - else - { - if ((options & DMGL_TYPES) == 0) - return NULL; - type = 1; - } - - cplus_demangle_init_info (mangled, options, len, &di); - - { -#ifdef CP_DYNAMIC_ARRAYS - __extension__ struct demangle_component comps[di.num_comps]; - __extension__ struct demangle_component *subs[di.num_subs]; - - di.comps = &comps[0]; - di.subs = &subs[0]; -#else - di.comps = ((struct demangle_component *) - malloc (di.num_comps * sizeof (struct demangle_component))); - di.subs = ((struct demangle_component **) - malloc (di.num_subs * sizeof (struct demangle_component *))); - if (di.comps == NULL || di.subs == NULL) - { - if (di.comps != NULL) - free (di.comps); - if (di.subs != NULL) - free (di.subs); - *palc = 1; - return NULL; - } -#endif - - if (! type) - dc = cplus_demangle_mangled_name (&di, 1); - else - dc = cplus_demangle_type (&di); - - /* If DMGL_PARAMS is set, then if we didn't consume the entire - mangled string, then we didn't successfully demangle it. If - DMGL_PARAMS is not set, we didn't look at the trailing - parameters. */ - if (((options & DMGL_PARAMS) != 0) && d_peek_char (&di) != '\0') - dc = NULL; - -#ifdef CP_DEMANGLE_DEBUG - if (dc == NULL) - printf ("failed demangling\n"); - else - d_dump (dc, 0); -#endif - - /* We try to guess the length of the demangled string, to minimize - calls to realloc during demangling. */ - estimate = len + di.expansion + 10 * di.did_subs; - estimate += estimate / 8; - - ret = NULL; - if (dc != NULL) - ret = cplus_demangle_print (options, dc, estimate, palc); - -#ifndef CP_DYNAMIC_ARRAYS - free (di.comps); - free (di.subs); -#endif - -#ifdef CP_DEMANGLE_DEBUG - if (ret != NULL) - { - int rlen; - - rlen = strlen (ret); - if (rlen > 2 * estimate) - printf ("*** Length %d much greater than estimate %d\n", - rlen, estimate); - else if (rlen > estimate) - printf ("*** Length %d greater than estimate %d\n", - rlen, estimate); - else if (rlen < estimate / 2) - printf ("*** Length %d much less than estimate %d\n", - rlen, estimate); - } -#endif - } - - return ret; -} - -#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) - -extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *)); - -/* ia64 ABI-mandated entry point in the C++ runtime library for - performing demangling. MANGLED_NAME is a NUL-terminated character - string containing the name to be demangled. - - OUTPUT_BUFFER is a region of memory, allocated with malloc, of - *LENGTH bytes, into which the demangled name is stored. If - OUTPUT_BUFFER is not long enough, it is expanded using realloc. - OUTPUT_BUFFER may instead be NULL; in that case, the demangled name - is placed in a region of memory allocated with malloc. - - If LENGTH is non-NULL, the length of the buffer conaining the - demangled name, is placed in *LENGTH. - - The return value is a pointer to the start of the NUL-terminated - demangled name, or NULL if the demangling fails. The caller is - responsible for deallocating this memory using free. - - *STATUS is set to one of the following values: - 0: The demangling operation succeeded. - -1: A memory allocation failure occurred. - -2: MANGLED_NAME is not a valid name under the C++ ABI mangling rules. - -3: One of the arguments is invalid. - - The demangling is performed using the C++ ABI mangling rules, with - GNU extensions. */ - -char * -__cxa_demangle (mangled_name, output_buffer, length, status) - const char *mangled_name; - char *output_buffer; - size_t *length; - int *status; -{ - char *demangled; - size_t alc; - - if (mangled_name == NULL) - { - if (status != NULL) - *status = -3; - return NULL; - } - - if (output_buffer != NULL && length == NULL) - { - if (status != NULL) - *status = -3; - return NULL; - } - - demangled = d_demangle (mangled_name, DMGL_PARAMS | DMGL_TYPES, &alc); - - if (demangled == NULL) - { - if (status != NULL) - { - if (alc == 1) - *status = -1; - else - *status = -2; - } - return NULL; - } - - if (output_buffer == NULL) - { - if (length != NULL) - *length = alc; - } - else - { - if (strlen (demangled) < *length) - { - strcpy (output_buffer, demangled); - free (demangled); - demangled = output_buffer; - } - else - { - free (output_buffer); - *length = alc; - } - } - - if (status != NULL) - *status = 0; - - return demangled; -} - -#else /* ! (IN_LIBGCC2 || IN_GLIBCPP_V3) */ - -/* Entry point for libiberty demangler. If MANGLED is a g++ v3 ABI - mangled name, return a buffer allocated with malloc holding the - demangled name. Otherwise, return NULL. */ - -char * -cplus_demangle_v3 (mangled, options) - const char* mangled; - int options; -{ - size_t alc; - - return d_demangle (mangled, options, &alc); -} - -/* Demangle a Java symbol. Java uses a subset of the V3 ABI C++ mangling - conventions, but the output formatting is a little different. - This instructs the C++ demangler not to emit pointer characters ("*"), and - to use Java's namespace separator symbol ("." instead of "::"). It then - does an additional pass over the demangled output to replace instances - of JArray with TYPE[]. */ - -char * -java_demangle_v3 (mangled) - const char* mangled; -{ - size_t alc; - char *demangled; - int nesting; - char *from; - char *to; - - demangled = d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS, &alc); - - if (demangled == NULL) - return NULL; - - nesting = 0; - from = demangled; - to = from; - while (*from != '\0') - { - if (strncmp (from, "JArray<", 7) == 0) - { - from += 7; - ++nesting; - } - else if (nesting > 0 && *from == '>') - { - while (to > demangled && to[-1] == ' ') - --to; - *to++ = '['; - *to++ = ']'; - --nesting; - ++from; - } - else - *to++ = *from++; - } - - *to = '\0'; - - return demangled; -} - -#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */ - -#ifndef IN_GLIBCPP_V3 - -/* Demangle a string in order to find out whether it is a constructor - or destructor. Return non-zero on success. Set *CTOR_KIND and - *DTOR_KIND appropriately. */ - -static int -is_ctor_or_dtor (mangled, ctor_kind, dtor_kind) - const char *mangled; - enum gnu_v3_ctor_kinds *ctor_kind; - enum gnu_v3_dtor_kinds *dtor_kind; -{ - struct d_info di; - struct demangle_component *dc; - int ret; - - *ctor_kind = (enum gnu_v3_ctor_kinds) 0; - *dtor_kind = (enum gnu_v3_dtor_kinds) 0; - - cplus_demangle_init_info (mangled, DMGL_GNU_V3, strlen (mangled), &di); - - { -#ifdef CP_DYNAMIC_ARRAYS - __extension__ struct demangle_component comps[di.num_comps]; - __extension__ struct demangle_component *subs[di.num_subs]; - - di.comps = &comps[0]; - di.subs = &subs[0]; -#else - di.comps = ((struct demangle_component *) - malloc (di.num_comps * sizeof (struct demangle_component))); - di.subs = ((struct demangle_component **) - malloc (di.num_subs * sizeof (struct demangle_component *))); - if (di.comps == NULL || di.subs == NULL) - { - if (di.comps != NULL) - free (di.comps); - if (di.subs != NULL) - free (di.subs); - return 0; - } -#endif - - dc = cplus_demangle_mangled_name (&di, 1); - - /* Note that because we did not pass DMGL_PARAMS, we don't expect - to demangle the entire string. */ - - ret = 0; - while (dc != NULL) - { - switch (dc->type) - { - default: - dc = NULL; - break; - case DEMANGLE_COMPONENT_TYPED_NAME: - case DEMANGLE_COMPONENT_TEMPLATE: - case DEMANGLE_COMPONENT_RESTRICT_THIS: - case DEMANGLE_COMPONENT_VOLATILE_THIS: - case DEMANGLE_COMPONENT_CONST_THIS: - dc = d_left (dc); - break; - case DEMANGLE_COMPONENT_QUAL_NAME: - case DEMANGLE_COMPONENT_LOCAL_NAME: - dc = d_right (dc); - break; - case DEMANGLE_COMPONENT_CTOR: - *ctor_kind = dc->u.s_ctor.kind; - ret = 1; - dc = NULL; - break; - case DEMANGLE_COMPONENT_DTOR: - *dtor_kind = dc->u.s_dtor.kind; - ret = 1; - dc = NULL; - break; - } - } - -#ifndef CP_DYNAMIC_ARRAYS - free (di.subs); - free (di.comps); -#endif - } - - return ret; -} - -/* Return whether NAME is the mangled form of a g++ V3 ABI constructor - name. A non-zero return indicates the type of constructor. */ - -enum gnu_v3_ctor_kinds -is_gnu_v3_mangled_ctor (name) - const char *name; -{ - enum gnu_v3_ctor_kinds ctor_kind; - enum gnu_v3_dtor_kinds dtor_kind; - - if (! is_ctor_or_dtor (name, &ctor_kind, &dtor_kind)) - return (enum gnu_v3_ctor_kinds) 0; - return ctor_kind; -} - - -/* Return whether NAME is the mangled form of a g++ V3 ABI destructor - name. A non-zero return indicates the type of destructor. */ - -enum gnu_v3_dtor_kinds -is_gnu_v3_mangled_dtor (name) - const char *name; -{ - enum gnu_v3_ctor_kinds ctor_kind; - enum gnu_v3_dtor_kinds dtor_kind; - - if (! is_ctor_or_dtor (name, &ctor_kind, &dtor_kind)) - return (enum gnu_v3_dtor_kinds) 0; - return dtor_kind; -} - -#endif /* IN_GLIBCPP_V3 */ - -#ifdef STANDALONE_DEMANGLER - -#include "getopt.h" -#include "dyn-string.h" - -static void print_usage PARAMS ((FILE* fp, int exit_value)); - -#define IS_ALPHA(CHAR) \ - (((CHAR) >= 'a' && (CHAR) <= 'z') \ - || ((CHAR) >= 'A' && (CHAR) <= 'Z')) - -/* Non-zero if CHAR is a character than can occur in a mangled name. */ -#define is_mangled_char(CHAR) \ - (IS_ALPHA (CHAR) || IS_DIGIT (CHAR) \ - || (CHAR) == '_' || (CHAR) == '.' || (CHAR) == '$') - -/* The name of this program, as invoked. */ -const char* program_name; - -/* Prints usage summary to FP and then exits with EXIT_VALUE. */ - -static void -print_usage (fp, exit_value) - FILE* fp; - int exit_value; -{ - fprintf (fp, "Usage: %s [options] [names ...]\n", program_name); - fprintf (fp, "Options:\n"); - fprintf (fp, " -h,--help Display this message.\n"); - fprintf (fp, " -p,--no-params Don't display function parameters\n"); - fprintf (fp, " -v,--verbose Produce verbose demanglings.\n"); - fprintf (fp, "If names are provided, they are demangled. Otherwise filters standard input.\n"); - - exit (exit_value); -} - -/* Option specification for getopt_long. */ -static const struct option long_options[] = -{ - { "help", no_argument, NULL, 'h' }, - { "no-params", no_argument, NULL, 'p' }, - { "verbose", no_argument, NULL, 'v' }, - { NULL, no_argument, NULL, 0 }, -}; - -/* Main entry for a demangling filter executable. It will demangle - its command line arguments, if any. If none are provided, it will - filter stdin to stdout, replacing any recognized mangled C++ names - with their demangled equivalents. */ - -int -main (argc, argv) - int argc; - char *argv[]; -{ - int i; - int opt_char; - int options = DMGL_PARAMS | DMGL_ANSI | DMGL_TYPES; - - /* Use the program name of this program, as invoked. */ - program_name = argv[0]; - - /* Parse options. */ - do - { - opt_char = getopt_long (argc, argv, "hpv", long_options, NULL); - switch (opt_char) - { - case '?': /* Unrecognized option. */ - print_usage (stderr, 1); - break; - - case 'h': - print_usage (stdout, 0); - break; - - case 'p': - options &= ~ DMGL_PARAMS; - break; - - case 'v': - options |= DMGL_VERBOSE; - break; - } - } - while (opt_char != -1); - - if (optind == argc) - /* No command line arguments were provided. Filter stdin. */ - { - dyn_string_t mangled = dyn_string_new (3); - char *s; - - /* Read all of input. */ - while (!feof (stdin)) - { - char c; - - /* Pile characters into mangled until we hit one that can't - occur in a mangled name. */ - c = getchar (); - while (!feof (stdin) && is_mangled_char (c)) - { - dyn_string_append_char (mangled, c); - if (feof (stdin)) - break; - c = getchar (); - } - - if (dyn_string_length (mangled) > 0) - { -#ifdef IN_GLIBCPP_V3 - s = __cxa_demangle (dyn_string_buf (mangled), NULL, NULL, NULL); -#else - s = cplus_demangle_v3 (dyn_string_buf (mangled), options); -#endif - - if (s != NULL) - { - fputs (s, stdout); - free (s); - } - else - { - /* It might not have been a mangled name. Print the - original text. */ - fputs (dyn_string_buf (mangled), stdout); - } - - dyn_string_clear (mangled); - } - - /* If we haven't hit EOF yet, we've read one character that - can't occur in a mangled name, so print it out. */ - if (!feof (stdin)) - putchar (c); - } - - dyn_string_delete (mangled); - } - else - /* Demangle command line arguments. */ - { - /* Loop over command line arguments. */ - for (i = optind; i < argc; ++i) - { - char *s; -#ifdef IN_GLIBCPP_V3 - int status; -#endif - - /* Attempt to demangle. */ -#ifdef IN_GLIBCPP_V3 - s = __cxa_demangle (argv[i], NULL, NULL, &status); -#else - s = cplus_demangle_v3 (argv[i], options); -#endif - - /* If it worked, print the demangled name. */ - if (s != NULL) - { - printf ("%s\n", s); - free (s); - } - else - { -#ifdef IN_GLIBCPP_V3 - fprintf (stderr, "Failed: %s (status %d)\n", argv[i], status); -#else - fprintf (stderr, "Failed: %s\n", argv[i]); -#endif - } - } - } - - return 0; -} - -#endif /* STANDALONE_DEMANGLER */ diff --git a/contrib/gcc/cp-demangle.h b/contrib/gcc/cp-demangle.h deleted file mode 100644 index eea0868..0000000 --- a/contrib/gcc/cp-demangle.h +++ /dev/null @@ -1,149 +0,0 @@ -/* Internal demangler interface for g++ V3 ABI. - Copyright (C) 2003, 2004 Free Software Foundation, Inc. - Written by Ian Lance Taylor . - - This file is part of the libiberty library, which is part of GCC. - - This file is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - 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 combined - executable.) - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -/* This file provides some definitions shared by cp-demangle.c and - cp-demint.c. It should not be included by any other files. */ - -/* Information we keep for operators. */ - -struct demangle_operator_info -{ - /* Mangled name. */ - const char *code; - /* Real name. */ - const char *name; - /* Length of real name. */ - int len; - /* Number of arguments. */ - int args; -}; - -/* How to print the value of a builtin type. */ - -enum d_builtin_type_print -{ - /* Print as (type)val. */ - D_PRINT_DEFAULT, - /* Print as integer. */ - D_PRINT_INT, - /* Print as unsigned integer, with trailing "u". */ - D_PRINT_UNSIGNED, - /* Print as long, with trailing "l". */ - D_PRINT_LONG, - /* Print as unsigned long, with trailing "ul". */ - D_PRINT_UNSIGNED_LONG, - /* Print as long long, with trailing "ll". */ - D_PRINT_LONG_LONG, - /* Print as unsigned long long, with trailing "ull". */ - D_PRINT_UNSIGNED_LONG_LONG, - /* Print as bool. */ - D_PRINT_BOOL, - /* Print as float--put value in square brackets. */ - D_PRINT_FLOAT, - /* Print in usual way, but here to detect void. */ - D_PRINT_VOID -}; - -/* Information we keep for a builtin type. */ - -struct demangle_builtin_type_info -{ - /* Type name. */ - const char *name; - /* Length of type name. */ - int len; - /* Type name when using Java. */ - const char *java_name; - /* Length of java name. */ - int java_len; - /* How to print a value of this type. */ - enum d_builtin_type_print print; -}; - -/* The information structure we pass around. */ - -struct d_info -{ - /* The string we are demangling. */ - const char *s; - /* The end of the string we are demangling. */ - const char *send; - /* The options passed to the demangler. */ - int options; - /* The next character in the string to consider. */ - const char *n; - /* The array of components. */ - struct demangle_component *comps; - /* The index of the next available component. */ - int next_comp; - /* The number of available component structures. */ - int num_comps; - /* The array of substitutions. */ - struct demangle_component **subs; - /* The index of the next substitution. */ - int next_sub; - /* The number of available entries in the subs array. */ - int num_subs; - /* The number of substitutions which we actually made from the subs - array, plus the number of template parameter references we - saw. */ - int did_subs; - /* The last name we saw, for constructors and destructors. */ - struct demangle_component *last_name; - /* A running total of the length of large expansions from the - mangled name to the demangled name, such as standard - substitutions and builtin types. */ - int expansion; -}; - -#define d_peek_char(di) (*((di)->n)) -#define d_peek_next_char(di) ((di)->n[1]) -#define d_advance(di, i) ((di)->n += (i)) -#define d_next_char(di) (*((di)->n++)) -#define d_str(di) ((di)->n) - -/* Functions and arrays in cp-demangle.c which are referenced by - functions in cp-demint.c. */ - -extern const struct demangle_operator_info cplus_demangle_operators[]; - -#define D_BUILTIN_TYPE_COUNT (26) - -extern const struct demangle_builtin_type_info -cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT]; - -extern struct demangle_component * -cplus_demangle_mangled_name PARAMS ((struct d_info *, int)); - -extern struct demangle_component * -cplus_demangle_type PARAMS ((struct d_info *)); - -extern void -cplus_demangle_init_info PARAMS ((const char *, int, size_t, struct d_info *)); diff --git a/contrib/gcc/cp-demint.c b/contrib/gcc/cp-demint.c deleted file mode 100644 index 533202d..0000000 --- a/contrib/gcc/cp-demint.c +++ /dev/null @@ -1,241 +0,0 @@ -/* Demangler component interface functions. - Copyright (C) 2004 Free Software Foundation, Inc. - Written by Ian Lance Taylor . - - This file is part of the libiberty library, which is part of GCC. - - This file is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - 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 combined - executable.) - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -/* This file implements a few interface functions which are provided - for use with struct demangle_component trees. These functions are - declared in demangle.h. These functions are closely tied to the - demangler code in cp-demangle.c, and other interface functions can - be found in that file. We put these functions in a separate file - because they are not needed by the demangler, and so we avoid - having them pulled in by programs which only need the - demangler. */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - -#include "ansidecl.h" -#include "libiberty.h" -#include "demangle.h" -#include "cp-demangle.h" - -/* Fill in most component types. */ - -int -cplus_demangle_fill_component (p, type, left, right) - struct demangle_component *p; - enum demangle_component_type type; - struct demangle_component *left; - struct demangle_component *right; -{ - if (p == NULL) - return 0; - switch (type) - { - case DEMANGLE_COMPONENT_QUAL_NAME: - case DEMANGLE_COMPONENT_LOCAL_NAME: - case DEMANGLE_COMPONENT_TYPED_NAME: - case DEMANGLE_COMPONENT_TEMPLATE: - case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE: - case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL: - case DEMANGLE_COMPONENT_FUNCTION_TYPE: - case DEMANGLE_COMPONENT_ARRAY_TYPE: - case DEMANGLE_COMPONENT_PTRMEM_TYPE: - case DEMANGLE_COMPONENT_ARGLIST: - case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST: - case DEMANGLE_COMPONENT_UNARY: - case DEMANGLE_COMPONENT_BINARY: - case DEMANGLE_COMPONENT_BINARY_ARGS: - case DEMANGLE_COMPONENT_TRINARY: - case DEMANGLE_COMPONENT_TRINARY_ARG1: - case DEMANGLE_COMPONENT_TRINARY_ARG2: - case DEMANGLE_COMPONENT_LITERAL: - case DEMANGLE_COMPONENT_LITERAL_NEG: - break; - - /* These component types only have one subtree. */ - case DEMANGLE_COMPONENT_VTABLE: - case DEMANGLE_COMPONENT_VTT: - case DEMANGLE_COMPONENT_TYPEINFO: - case DEMANGLE_COMPONENT_TYPEINFO_NAME: - case DEMANGLE_COMPONENT_TYPEINFO_FN: - case DEMANGLE_COMPONENT_THUNK: - case DEMANGLE_COMPONENT_VIRTUAL_THUNK: - case DEMANGLE_COMPONENT_COVARIANT_THUNK: - case DEMANGLE_COMPONENT_JAVA_CLASS: - case DEMANGLE_COMPONENT_GUARD: - case DEMANGLE_COMPONENT_REFTEMP: - case DEMANGLE_COMPONENT_RESTRICT: - case DEMANGLE_COMPONENT_VOLATILE: - case DEMANGLE_COMPONENT_CONST: - case DEMANGLE_COMPONENT_RESTRICT_THIS: - case DEMANGLE_COMPONENT_VOLATILE_THIS: - case DEMANGLE_COMPONENT_CONST_THIS: - case DEMANGLE_COMPONENT_POINTER: - case DEMANGLE_COMPONENT_REFERENCE: - case DEMANGLE_COMPONENT_COMPLEX: - case DEMANGLE_COMPONENT_IMAGINARY: - case DEMANGLE_COMPONENT_VENDOR_TYPE: - case DEMANGLE_COMPONENT_CAST: - if (right != NULL) - return 0; - break; - - default: - /* Other types do not use subtrees. */ - return 0; - } - - p->type = type; - p->u.s_binary.left = left; - p->u.s_binary.right = right; - - return 1; -} - -/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE. */ - -int -cplus_demangle_fill_builtin_type (p, typename) - struct demangle_component *p; - const char *typename; -{ - int len; - unsigned int i; - - if (p == NULL || typename == NULL) - return 0; - len = strlen (typename); - for (i = 0; i < D_BUILTIN_TYPE_COUNT; ++i) - { - if (len == cplus_demangle_builtin_types[i].len - && strcmp (typename, cplus_demangle_builtin_types[i].name) == 0) - { - p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE; - p->u.s_builtin.type = &cplus_demangle_builtin_types[i]; - return 1; - } - } - return 0; -} - -/* Fill in a DEMANGLE_COMPONENT_OPERATOR. */ - -int -cplus_demangle_fill_operator (p, opname, args) - struct demangle_component *p; - const char *opname; - int args; -{ - int len; - unsigned int i; - - if (p == NULL || opname == NULL) - return 0; - len = strlen (opname); - for (i = 0; cplus_demangle_operators[i].name != NULL; ++i) - { - if (len == cplus_demangle_operators[i].len - && args == cplus_demangle_operators[i].args - && strcmp (opname, cplus_demangle_operators[i].name) == 0) - { - p->type = DEMANGLE_COMPONENT_OPERATOR; - p->u.s_operator.op = &cplus_demangle_operators[i]; - return 1; - } - } - return 0; -} - -/* Translate a mangled name into components. */ - -struct demangle_component * -cplus_demangle_v3_components (mangled, options, mem) - const char *mangled; - int options; - void **mem; -{ - size_t len; - int type; - struct d_info di; - struct demangle_component *dc; - - len = strlen (mangled); - - if (mangled[0] == '_' && mangled[1] == 'Z') - type = 0; - else - { - if ((options & DMGL_TYPES) == 0) - return NULL; - type = 1; - } - - cplus_demangle_init_info (mangled, options, len, &di); - - di.comps = ((struct demangle_component *) - malloc (di.num_comps * sizeof (struct demangle_component))); - di.subs = ((struct demangle_component **) - malloc (di.num_subs * sizeof (struct demangle_component *))); - if (di.comps == NULL || di.subs == NULL) - { - if (di.comps != NULL) - free (di.comps); - if (di.subs != NULL) - free (di.subs); - return NULL; - } - - if (! type) - dc = cplus_demangle_mangled_name (&di, 1); - else - dc = cplus_demangle_type (&di); - - /* If DMGL_PARAMS is set, then if we didn't consume the entire - mangled string, then we didn't successfully demangle it. */ - if ((options & DMGL_PARAMS) != 0 && d_peek_char (&di) != '\0') - dc = NULL; - - free (di.subs); - - if (dc != NULL) - *mem = di.comps; - else - free (di.comps); - - return dc; -} diff --git a/contrib/gcc/cp/ChangeLog.1 b/contrib/gcc/cp/ChangeLog.1 deleted file mode 100644 index 01ef399..0000000 --- a/contrib/gcc/cp/ChangeLog.1 +++ /dev/null @@ -1,9451 +0,0 @@ -Sun Nov 26 14:47:42 1995 Richard Kenner - - * Version 2.7.2 released. - -Mon Nov 20 14:05:00 1995 Mike Stump - - * g++.c (pfatal_with_name): Add missing third argument to concat. - -Thu Oct 26 13:59:54 1995 Mike Stump - - * init.c (expand_aggr_init): Handle cv qualifiers on the object's - type. - -Sat Nov 11 08:25:55 1995 Richard Kenner - - * Version 2.7.1 released. - -Thu Nov 2 17:02:47 1995 Jason Merrill - - * call.c (convert_harshness): Handle references to arrays. - -Fri Oct 27 14:20:21 1995 Jason Merrill - - * typeck.c (comp_target_types): Check multi-level pointer - conversions in both directions. - -Tue Oct 17 21:39:05 1995 Jason Merrill - - * parse.y (explicit_instantiation): Fix 'extern template' with no - return type. - -Mon Oct 16 14:35:20 1995 Jason Merrill - - * parse.y (explicit_instantiation): Support automatic instantiation - of constructors. - (named_class_head_*): Support out-of-class definition of nested - types. - -Wed Oct 11 12:20:56 1995 Mike Stump - - * search.c (envelope_add_decl): New routine. Fix so that - methods are hidden in the same way that other members are. - (dfs_pushdecls): Cleanup and move functionality out of line, - into envelope_add_decl. - -Tue Oct 10 15:46:01 1995 Mike Stump - - * typeck.c (mark_addressable): Only call assemble_external if we - have started the output file. - -Tue Oct 10 11:27:18 1995 Jason Merrill - - * decl.c (start_function): Fix earlier cv-quals change. - -Mon Oct 9 23:53:05 1995 Mike Stump - - * parse.y (complex_direct_notype_declarator): Only push the class if - we are not already in the class. - -Mon Oct 9 11:22:03 1995 Doug Evans - - * decl.c (duplicate_decls): Call merge_machine_decl_attributes. - Update olddecl's attributes too. - (grokdeclarator): #if 0 out call to build_decl_attribute_variant. - * typeck.c (common_type): Call merge_machine_type_attributes. - -Fri Oct 6 14:44:27 1995 Mike Stump - - * typeck.c (mark_addressable): Add missing call to - assemble_external. - -Wed Oct 4 15:06:39 1995 Mike Stump - - * decl.c (store_parm_decls): Make sure the unwinder start comes - before the exception specification start. - * except.c (expand_exception_blocks): Make sure the unwinder end - comes after the terminate protected catch clause region and after - the end of the exception specification region. - -Wed Oct 4 12:47:02 1995 Jason Merrill - - * lex.c (real_yylex): Fix identifier case for linemode. - (handle_sysv_pragma): Don't abort when we see a pragma we don't - recognize. - -Tue Oct 3 14:09:46 1995 Mike Stump - - * decl.c (store_parm_decls): Add a call to start_eh_unwinder. - * except.c (init_exception_processing): __throw doesn't take any - arguments. - (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode - for all pointers. Use expand_builtin_return_addr to unwind the - first level off the stack. - (do_unwind): Always use Pmode, instead of SImode for all pointers. - (expand_exception_blocks): Add a call to end_eh_unwinder. - (start_eh_unwinder, end_eh_unwinder): New routines to build machine - independent stack unwinders for function/method calls. - -Mon Oct 2 17:20:42 1995 Mike Stump - - * tree.c (unsave_expr_now): Make sure we process the argument list - of any called functions. Fixes incorrect code generation for - cleanups. - -Mon Oct 2 13:04:16 1995 Mike Stump - - * typeck.c (get_member_function_from_ptrfunc): Save function if it - needs it. Cures core dump on things like (this->*(f()))(). - -Sat Sep 23 22:51:25 1995 Jason Merrill - - * decl.c (start_function): Conform to gcc cv-quals convention (no - expression has a cv-qualified type) in RESULT_DECLs. - * method.c (make_thunk): Likewise. - -Fri Sep 22 10:21:13 1995 Mike Stump - - * decl.c (pushtag): Add in the namespace name for the tag. - -Thu Sep 21 13:11:13 1995 Mike Stump - - * parse.y (maybe_base_class_list, base_class_list, base_class, - base_class_access_list): Make sure we see the typenames for base - classes. - * lex.c (see_typename): Instead of failing to see a typename when - there is no next token, perfer a typename, and get the next token. - -Wed Sep 20 12:35:27 1995 Michael Meissner - - * decl.c (init_decl_processing): Add __builtin_expect. - -Tue Sep 19 16:48:11 1995 Mike Stump - - * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to - or from pointer to member functions, they must all be handled before - this point. - -Fri Sep 15 17:14:47 1995 Brendan Kehoe - - * init.c (resolve_offset_ref): Fix wording of non-static member - being referenced as a static. - -Fri Sep 15 12:39:11 1995 Jason Merrill - - * typeck.c (build_indirect_ref): Only bash pointer if we actually - call build_expr_type_conversion. - -Thu Sep 14 18:24:56 1995 Jason Merrill - - * cvt.c (build_expr_type_conversion): Handle conversion from - reference. - * typeck.c (build_indirect_ref): Avoid infinite recursion. - -Thu Sep 14 17:23:28 1995 Mike Stump - - * decl.c (expand_start_early_try_stmts): New routine to start a try - block at the start of the function, for function-try-blocks. - * cp-tree.h (expand_start_early_try_stmts): Declare it. - * parse.y (function_try_block): Use it, instead of doing it here, as - we don't want to include rtl.h here, as that conflicts with RETURN - in the parser. - -Wed Sep 13 18:32:24 1995 Mike Stump - - * lex.c (reinit_parse_for_block): Support saving inline - function-try-blocks, uses peekyylex. - * parse.y (eat_saved_input): New rule, permit the parser to see that - END_OF_SAVED_INPUT is ok, as it can see this when parsing the - handlers of a function-try-block. - (fndef): Use it. - (component_decl): Make sure TRY and RETURN can come after fn.def2. - * spew.c (peekyylex): New routine to peek at what will come next. - -Wed Sep 13 16:52:06 1995 Jason Merrill - - * typeck.c (comptypes): Tighten up comparisons of template type - parms. - - * decl.c (duplicate_decls): Turn off whining about virtual functions - redeclared inline for now. - -Wed Sep 13 11:13:40 1995 Mike Stump - - * decl.c (store_in_parms): New routine to put things before we - put base inits. - * cp-tree.h (store_in_parms): Declare it. - * decl.c (store_parm_decls): Use it to makr sure the starting of the - eh spec comes before base inits. - (finish_function): Use sequences instead of the obsolete - reorder_insns. - * parse.y (fndef): Enhance readability and maintainability. Update - to include function_try_block syntax. - (function_try_block): Add. - -Tue Sep 12 17:43:07 1995 Brendan Kehoe - - * call.c (convert_harshness): Use comptypes, not ==, to check if - TYPE and PARMTYPE are equivalent on a function type. - -Tue Sep 12 17:31:33 1995 Douglas Rupp - - * Make-lang.in (cc1plus): Removed unnecessary $(exeext). - -Mon Sep 11 23:24:07 1995 Mike Stump - - * except.c (expand_throw): Never allocate storage for thrown pointer - to objects. - -Mon Sep 11 19:36:45 1995 Mike Stump - - * except.c (expand_start_catch_block): Pointers to objects come - back from catch matching already dereferenced, don't dereference - again. - -Mon Sep 11 15:46:28 1995 Mike Stump - - * except.c (expand_throw): Only decay the throw expression, don't do - any default conversions. This is so that one can throw and catch - characters, and not have them match integers. - -Mon Sep 11 13:46:45 1995 Mike Stump - - * error.c (dump_aggr_type): Deal with anonymous unions that don't - have a TYPE_NAME. - -Fri Sep 8 20:40:27 1995 Brendan Kehoe - - * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex. - -Fri Sep 8 15:51:41 1995 Mike Stump - - * except.c (expand_end_eh_spec): Handle empty EH specifications. - -Fri Sep 8 15:27:22 1995 Mike Stump - - * cp-tree.h (expand_start_eh_spec): Declare new routine. - (expand_end_eh_spec): Likewise. - * decl.c (store_parm_decls): Call expand_start_eh_spec to process - exception specifications. - * except.c (expand_leftover_cleanups): Remove unused parameter. - (expand_end_catch_block): Likewise. - (expand_exception_blocks): Likewise. - (expand_start_eh_spec): New routine to mark the start of an - exception specification region. - (expand_end_eh_spec): New routine to mark the end of an exception - specification region. - (expand_exception_blocks): Call expand_end_eh_spec to process - exception specifications. - -Fri Sep 8 14:40:48 1995 Per Bothner - - * lex.c (do_identifier): Use global binding in preference of - dead for local variable. - -Wed Sep 6 19:32:59 1995 Mike Stump - - * cp-tree.h (build_exception_variant): Remove used first argument. - * decl.c (duplicate_decls): Likewise. - (grokfndecl): Likewise. - (revert_static_member_fn): Likewise. - * decl2.c (grok_method_quals): Likewise. - * tree.c (build_exception_variant): Likewise. - * typeck.c (common_type): Likewise. - * decl2.c (grokclassfn): After changing the type, call - build_exception_variant, if necessary. - -Tue Sep 5 15:56:27 1995 Mike Stump - - * except.c (expand_throw): Run cleanups for the throw expression. - -Wed Aug 30 15:24:38 1995 Stephen L. Favor - - * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond - the store_parm_decls call which does initialization in the emit_* - code concerning label numbering. - -Thu Aug 31 09:01:07 1995 Mike Stump - - * except.c (expand_internal_throw): Let the frontend be responsible - for managing all frontend EH parameters, the backend routine only - needs to deal with backend values. type and value are no longer - passed to __throw. - (init_exception_processing): Likewise. - (expand_start_all_catch): Likewise. - (expand_end_all_catch): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - (expand_builtin_throw): Likewise. - (expand_throw): Likewise. - -Tue Aug 29 15:04:36 1995 Jason Merrill - - * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context - for a decl. - * decl.c (cp_finish_decl): Use it. - -Tue Aug 29 10:30:27 1995 Mike Stump - - * except.c (expand_internal_throw): Oops, almost forgot type and - value are now trees. - -Mon Aug 28 17:57:45 1995 Brendan Kehoe - - Fix the attribute handling to make sure they get noted before we - create the function's RTL, in case they can affect that. - * decl.c (grokfndecl): New arg ATTRLIST. Run - cplus_decl_attributes before creating the decl's rtl. - (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl. - (shadow_tag, groktypename, start_decl, start_method): Pass a - NULL_TREE to grokdeclarator's new last arg. - * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator. - (grokbitfield, grokoptypename): Pass a NULL_TREE to - grokdeclarator's new last arg. - * except.c (expand_start_catch_block): Likewise. - * pt.c (process_template_parm, end_template_decl, - do_function_instantiation): Likewise. - * cp-tree.h (grokfield): Add arg. - (grokdeclarator): Move the prototype from here... - * decl.h: ...to here. - * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield - ATTRLIST argument. - * parse.y: Create a list for the grokfield arg where appropriate, - and pass it down instead of calling cplus_decl_attributes. - -Mon Aug 28 15:07:24 1995 Mike Stump - - * except.c: Always allow turning on exception handling. Allow cross - compilations to use EH. - -Thu Aug 24 17:39:24 1995 Mike Stump - - * except.c (saved_pc, saved_throw_type, saved_throw_value): Use - trees, instead of rtxs, and don't depend on using special machine - dependent registers. - (expand_internal_throw): Likewise. - (init_exception_processing): Likewise. - (expand_start_all_catch): Likewise. - (expand_end_all_catch): Likewise. - (expand_start_catch_block): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - (expand_builtin_throw): Likewise. - (expand_throw): Likewise. - -Wed Aug 23 17:25:51 1995 Jason Merrill - - * cvt.c (build_expr_type_conversion): Handle conversions to - reference types. - -Wed Aug 23 15:33:59 1995 Mike Stump - - * except.c (do_unwind): Work around backend bug with -fpic. - -Tue Aug 22 17:20:07 1995 Per Bothner - - * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI - for-scoping, but supports (and warns about) old programs. - Make the new mode (with value 1) the default. - (lang_f_options): The on-value for flag_new_for_scope is now 2. - * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros - (DECL_SHADOWED_FOR_VAR): Likewise. - * decl.c (struct binding_level): New fields dead_vars_from_for - and is_for_scope. - (note_level_for_for): New function. - (poplevel): Special processing if is_for_scope. - (pushdecl): Warn if for-scope variable shadows local. - * lex.c (do_identifier): Handle old (non-ANSI) for scoping, - and warn if conflicts. - * parse.y (FOR): Call note_level_for_for. - -Mon Aug 21 10:28:31 1995 Jason Merrill - - * decl2.c (import_export_inline): Class interface hackery does not - apply to synthesized methods. - -Sun Aug 20 16:29:00 1995 Mike Stump - - * search.c (virtual_context): Find the right context more often. - Solves a `recoverable compiler error, fixups for virtual function' - problem. - -Sun Aug 20 13:53:24 1995 Mike Stump - - * except.c (expand_start_all_catch): Ensure that we always transfer - control to the right EH handler, by rethrowing the end label on the - region, instead of hoping we are nested and falling through. - (expand_leftover_cleanups): Likewise. - (end_protect): Since we now rethrow the end label, put a - nop after it, so that outer regions are recognized. - * init.c (build_vec_delete_1): New routine to handle most of vector - deleting, all code moved here from build_vec_delete. - (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real - work. - (expand_vec_init): If the array needs partial destructing, setup an - EH region to handle it. - (build_vec_delete): Move lots of code to build_vec_delete_1, use - build_vec_delete_1 to do the grunt work. - -Sat Aug 19 14:25:33 1995 Brendan Kehoe - - Handle decl attributes properly for function definitions without - previous attribute-loaded declarations. - * decl.c (start_function): New arg ATTRS. Add a call to - cplus_decl_attributes with it before we create the RTL. - * cp-tree.h (start_function): Update prototype. - * parse.y (fn.def1): Pass ATTRS into start_function instead of - trying to call cplus_decl_attributes too late. Pass a NULL_TREE - for other use. - * decl2.c (finish_file): Pass NULL_TREE as fourth arg to - start_function. - * method.c (synthesize_method): Likewise. - * except.c (expand_builtin_throw): Likewise for start on __throw. - -Sat Aug 19 13:36:08 1995 Mike Stump - - * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support. - This changes -fvtable-thunks vtable layout, so a recompile will be - necessary, if you use -fvtable-thunks. - (get_vtable_entry): Use n, instead of i to be consistent with the - rest of the compiler. - (get_vtable_entry_n): Likewise. - (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks - are being used. - (finish_struct_1): Likewise. - (skip_rtti_stuff): New routine to collapse similar code from many - different parts of the compiler. I think I got them all. - (modify_one_vtable): Use it. - (fixup_vtable_deltas1): Likewise. - (override_one_vtable): Likewise. - * decl2.c (mark_vtable_entries): Likewise. - * tree.c (debug_binfo): Likewise. - * search.c (expand_upcast_fixups): Likewise. - (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to - consistent with the rest of the compiler. - (get_abstract_virtuals): Likewise. - * cp-tree.h (skip_rtti_stuff): New routine, declare it. - * gc.c (build_headof): Support -fvtable-thunk and -frtti together. - (build_typeid): Likewise. - (build_classof): Remove old style way of doing rtti. Remove support - for `classof' and `headof'. - * gxx.gperf: Likewise. - * hash.h: Likewise. - * parse.y: Likewise. - -Fri Aug 18 17:31:58 1995 Jason Merrill - - * decl.c (start_function): Clear ctor_label and dtor_label. - - * class.c (finish_struct_1): Fix handling of access decls. - -Tue Aug 15 19:21:54 1995 Jason Merrill - - * class.c (finish_struct): Only do minimal processing here, so it - can be used for class template definitions, as well. - (finish_struct_1): New function with the rest of the code. - -Tue Aug 15 09:46:16 1995 Mike Stump - - * class.c (prepare_fresh_vtable): On second though, always build the - offset (see Aug 10 change), unless -fvtable-thunks is given. It - does this by calling the new routine set_rtti_entry. - (finish_struct): Likewise. - (set_rtti_entry): New routine to update the rtti information at the - start of the vtable. - -Mon Aug 14 12:21:22 1995 Brendan Kehoe - - * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor - if it's declared in the C++ language spec. - (dump_function_decl): Likewise. - (dump_function_name): Likewise. - (ident_fndecl): Make sure we got something back from lookup_name. - * decl.c (start_function): Likewise. - -Fri Aug 11 16:52:15 1995 Jason Merrill - - * call.c (build_method_call): Don't call build_new when calling a - constructor without an instance. - -Thu Aug 10 20:00:17 1995 Mike Stump - - * class.c (prepare_fresh_vtable): Always build the offset to the - complete object, as it doesn't cost much. This allows dynamic_cast - to void * to work when -frtti isn't given. - (finish_struct): Likewise. - -Thu Aug 10 16:31:28 1995 Mike Stump - - * except.c (build_eh_type): Split out some functionality to new - routine named build_eh_type_type. - (build_eh_type_type): New routine. - (expand_start_catch_block): Use build_eh_type_type, as we never want - the dynamic type of the catch parameter, just the static type. - Fixes core dumps when -frtti is used and one catchs pointers to - classes. - -Thu Aug 10 14:55:29 1995 Mike Stump - - * except.c (expand_builtin_throw): Since we now use normal calling - conventions for __throw, we have to remove the first layer off the - stack, so that the next context we search for handlers is the outer - context instead of the context that had the call to __throw, if we - don't immediately find the desired context. - -Tue Aug 8 17:44:23 1995 Jason Merrill - - * tree.c (cp_expand_decl_cleanup): Returns int, not tree. - * cp-tree.h: Update. - - * parse.y (template_type_parm): Add support for `typename'. - -Tue Aug 8 12:06:31 1995 Mike Stump - - * except.c (expand_internal_throw): New internal routine to throw a - value. - (expand_end_all_catch, expand_leftover_cleanups): All throwers - changed to use `expand_internal_throw' instead of jumping to throw - label. - (expand_end_catch_block, expand_throw): Likewise. - (throw_label): Removed. - (expand_builtin_throw): Changed so that EH parameters are passed by - normal function call conventions. Completes Aug 4th work. - -Fri Aug 4 17:17:08 1995 Mike Stump - - * cp-tree.h (expand_builtin_throw): Declare it. - * decl2.c (finish_file): Call expand_builtin_throw. - * except.c (make_first_label): Remove. - (init_exception_processing): Don't use a LABEL_REF for throw_label, - instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in - other functions that don't really appear in those functions. This - solves a problem where cc1plus consumed exponential amounts of - memory when -Wall was used. - (expand_end_all_catch, expand_leftover_cleanups, - expand_end_catch_block, expand_throw): Change all uses of - throw_label to match new style. - (do_unwind): Rename parameter to inner_throw_label, as it is now - different from throw_label. Also, assume that our caller will wrap - the passed label with a LABEL_REF, if needed. - (expand_builtin_throw): Make external, change so that the generated - throw is now a real function. - (expand_exception_blocks): Never generate throw code inside another - function. - -Fri Aug 4 12:20:02 1995 Mike Stump - - * decl.c (grokdeclarator): Move checking of mutable const objects - and mutable static objects down, as we might decide during parsing - to unset staticp or constp (for example, when const is part of the - object being pointed to). - -Thu Aug 3 17:13:43 1995 Mike Stump - - * except.c (output_exception_table_entry): Enhance portability to - weird machines. - (emit_exception_table): Likewise. - -Thu Aug 3 16:41:38 1995 Mike Stump - - * typeck.c (build_ptrmemfunc): Handle casting of pointer to - non-virtual member functions. - -Wed Aug 2 11:58:25 1995 Mike Stump - - * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T - and const T all match. - -Wed Aug 2 11:25:33 1995 Mike Stump - - * except.c (build_eh_type): Strip cv qualifiers so that const T&, - T&, T and const T all match. - -Tue Aug 1 14:20:16 1995 Mike Stump - - * except.c: Fix up comments, cleanup code and eliminate exceptNode, - exceptStack, exceptstack, push_except_stmts, pop_except_stmts, - new_except_stack, push_last_insn, pop_last_insn, insn_save_node and - InsnSave. Also, numerous speed improvements, and correctness - improvements. Double faulting in all situations should now be - handled correctly. - (expand_start_all_catch): Instead of having many terminate protected - regions, just have one. - (expand_start_catch_block): No longer have to protect - false_label_rtx, as it isn't used for EH region marking. - (expand_end_catch_block): Expand out EH cleanups here by using - expand_leftover_cleanups. - (expand_end_all_catch): Use sequences instead of playing with insn - links directly. - (expand_exception_blocks): Likewise. Also protect all catch clauses - with one terminate region. - -Mon Jul 31 13:24:30 1995 Jason Merrill - - * method.c (report_type_mismatch): Don't talk about an object - parameter for non-methods. - -Sun Jul 30 13:13:02 1995 Jason Merrill - - * class.c (finish_struct): Catch private and protected members of - anonymous unions here. - * decl2.c (finish_anon_union): And here. - * parse.y: Instead of here. - - * errfn.c (ARGSLIST): Support passing four args. - * error.c (cv_as_string): New function. - (cp_printers): Add it. - * call.c (build_method_call): Report 'const' at end of pseudo-decl. - - * method.c (report_type_mismatch): Deal with a bad_arg of 0. - - * init.c (expand_aggr_init): Handle volatile objects, too. - -Sat Jul 29 13:42:03 1995 Jason Merrill - - * decl.c (struct binding_level): Keep list of incomplete decls. - (print_binding_level): Use list_length to count them. - (pushdecl): Build up the list. - (hack_incomplete_structures): Walk it and prune completed decls. - -Fri Jul 28 15:26:44 1995 Jason Merrill - - * typeck.c (comp_target_types): Don't check const and volatile for - function types. - (comp_ptr_ttypes_real): Likewise. - -Thu Jul 27 15:40:48 1995 Jason Merrill - - * typeck.c (comp_target_types): Fix. - -Thu Jul 27 15:10:48 1995 Mike Stump - - * cp-tree.h (unsave_expr_now, build_unsave_expr, - cp_expand_decl_cleanup): Declare new routines. - * decl.c (cp_finish_decl, store_parm_decls, - hack_incomplete_structures): Change all cals from - expand_decl_cleanup to cp_expand_decl_cleanup. - * gc.c (protect_value_from_gc): Likewise. - * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs. - * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR. - (unsave_expr_now): Backend routine used by tree expander. - (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to - work around a limitation in the backend. The backend uses the - cleanups multiple times, on disjoint control flows, so we cannot - pass unsaved SAVE_EXPRs to the backend. - * tree.def (UNSAVE_EXPR): New tree code. - * typeck.c (c_expand_return): Move goto/return code up inside - conditional, as we don't always want to do this, we only want to do - this when we don't otherwise finish with this control flow. - -Thu Jul 27 10:38:43 1995 Brendan Kehoe - - * parse.y (typespec): Only complain about typeof if we're not - getting it from a system header. - -Thu Jul 27 10:26:23 1995 Doug Evans - - Clean up prefix attribute handling. - * parse.y (reserved_declspecs): Link prefix attributes with declspecs. - (declmods): Likewise. - (all rules that reference typed_declspecs and declmods): Call - split_specs_attrs or strip_attrs to separate declspecs and attrs. - (lang_extdef): Delete resetting of prefix_attributes. - (template_def, notype_declarator rule): Use NULL_TREE for - prefix_attributes. - (condition): Use NULL_TREE for prefix_attributes. - (setattrs): Deleted. - (nomods_initdcl0): Set prefix_attributes to NULL_TREE. - (component_decl): Delete resetting of prefix_attributes. - (component_decl_1, notype_components rule): Use NULL_TREE for - prefix_attributes. - (simple_stmt): Delete resetting of prefix_attributes. - -Mon Jul 24 13:37:53 1995 Jason Merrill - - * call.c (convert_harshness): Deal with reference conversions before - others. Actually do array->pointer decay. Call comp_target_types - with pointer types rather than their targets. - - * typeck.c (comp_target_types): Avoid assigning D const * to B *. - -Mon Jul 24 08:54:46 1995 Brendan Kehoe - - * pt.c (to_be_restored): Move decl to global scope. - -Sat Jul 22 12:22:11 1995 Jason Merrill - - * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P. - -Fri Jul 21 17:09:02 1995 Jason Merrill - - * decl.c (grokdeclarator): Downgrade error about 'extern int A::i' - to pedwarn. - - * pt.c (instantiate_template): Also avoid instantiation if the - function has already been declared to be a specialization. - - * decl2.c (check_classfn): Ignore cname argument, and return the - matching function. - - * decl.c (start_decl): Handle declarations of member functions - outside of the class (i.e. specialization declarations). - -Thu Jul 20 10:34:48 1995 Jason Merrill - - * class.c (finish_struct): Don't mess with the type of bitfields. - - * various.c: s/TYPE_POINTER_TO/build_pointer_type/. - -Thu Jul 20 01:43:10 1995 Mike Stump - - * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init - is not a parameter list (TREE_LIST). - (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set - LOOKUP_NO_CONVERSION so that we don't allow two-level conversions, - but don't set it otherwise. - -Wed Jul 19 20:32:01 1995 Mike Stump - - * init.c (expand_default_init): Don't allow two-level conversions - during construction. - -Wed Jul 19 18:06:37 1995 Mike Stump - - * gc.c (build_headof): The type of dyncasting to a pointer to cv - void, should be pointer to cv void. - -Wed Jul 19 17:25:43 1995 Mike Stump - - * gc.c (build_dynamic_cast): Allow casting in const. - -Wed Jul 19 16:34:27 1995 Mike Stump - - * typeck.c (build_const_cast): If we are passed error_mark_node, - return it. - -Wed Jul 19 15:24:48 1995 Brendan Kehoe - - * class.c (push_nested_class): Make sure TYPE is non-nil. - - * cvt.c (type_promotes_to): Watch for error_mark_node on the - incoming TYPE. - -Wed Jul 19 13:23:12 1995 Gerald Baumgartner - - * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME. - (SIGTABLE_VB_OFF_NAME): New macro. - (vt_off_identifier): Renamed from offset_identifier. - (vb_off_identifier): Added extern declaration. - - * decl.c (vt_off_identifier): Renamed from offset identifier. - (vb_off_identifier): New variable to hold the identifier for the - sigtable field vb_off. - (init_decl_processing): Initialize vb_off_identifier. - Renamed vt_off_identifier from offset_identifier. - * sig.c (build_signature_method_call): Renamed offset_identifier and - local variable offset to vt_off_identifier and vt_off, respectively. - * sig.c (build_signature_table_constructor): Renamed offset to vt_off. - - * decl.c (init_decl_processing): Add vb_off field to - sigtable_entry_type. Reorder fields so that pfn gets properly - aligned at a 64 bit boundary on the Alpha. - * sig.c (build_signature_table_constructor): Build the constructor - according to the new layout. Set the vb_off field to -1 for now. - - * decl.c (init_decl_processing): Align sigtable_entry_type on word - boundaries instead of double word boundaries to save space. - -Tue Jul 18 16:58:37 1995 Mike Stump - - * cvt.c (cp_convert): Always call build_cplus_new for a ctor. - -Tue Jul 18 14:24:53 1995 Brendan Kehoe - - * parse.y (opt.component_decl_list): Only forbid private/protected - in anonymous unions. We need to make this know when the type is - defined for an object, to not give the error. - -Mon Jul 17 14:22:44 1995 Brendan Kehoe - - * parse.y (opt.component_decl_list): Don't allow access control - as private or protected for union members. - -Sun Jul 16 14:01:00 1995 Jim Wilson - - * lex.c (check_newline): For 'p' case, move goto skipline line to - before end brace for 'pragma'. - -Fri Jul 7 13:55:58 1995 Mike Stump - - * g++.1: Tiny updates. - -Fri Jul 7 13:05:20 1995 Mike Stump - - * decl.c (cp_finish_decl): Only destruct local static variables if - they are constructed, and only construct the first time control - passes completely through its declaration (if not initialized with a - constant-expression). - (expand_static_init): Likewise. - -Wed Jul 5 14:05:04 1995 Brendan Kehoe - - * typeck.c (comptypes, case OFFSET_REF): If either offset basetype - is a TEMPLATE_TYPE_PARM, give a match. - -Fri Jun 30 15:42:57 1995 Mike Stump - - * method.c (build_overload_value): Handle encoding of null pointer - constants (or any pointer with a constant numeric value) for - templates. - -Fri Jun 30 13:45:51 1995 Brendan Kehoe - - * call.c (convert_harshness): Add QUAL_CODE when we're faced with - const vs non-const for void conversions. - -Fri Jun 30 10:19:52 1995 Mike Stump - - * except.c (expand_start_all_catch): Fix problem with finding an - outer nested try block when there is no code to separate it from an - inner try block. - -Fri Jun 30 02:22:26 1995 Mike Stump - - * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less - memory please when virtual bases are used. - -Thu Jun 29 19:03:47 1995 Mike Stump - - * class.c (build_vbase_path): Avoid testing things that cannot be - null to see if they are null. - * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work. - * decl.c (finish_function): Pass a type into the new - convert_pointer_to_vbase instead of a binfo. - * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase - and convert_pointer_to_real. - (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead - of the more cryptic call to get_vbase. - -Thu Jun 29 09:35:05 1995 Mike Stump - - * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check. - -Thu Jun 29 03:43:55 1995 Jason Merrill - - * pt.c (instantiate_template): Don't strip 'this' twice. - - * pt.c (coerce_template_parms): Allow null pointer constants. - - * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is - set. - -Wed Jun 28 18:39:03 1995 Jason Merrill - - * decl.c (revert_static_member_fn): Also remove 'this' from - DECL_ARGUMENTS. - * decl2.c (check_classfn): Don't revert this function until we get a - match. - -Wed Jun 28 14:07:27 1995 Brendan Kehoe - - * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here. - -Wed Jun 28 11:05:13 1995 Mike Stump - - * decl2.c (finish_file): Handle global vector news. - * init.c (build_new): Encode vector news so that later we will know - how many elements there are. - -Mon Jun 26 13:38:06 1995 Jason Merrill - - * expr.c (cplus_expand_expr): Don't mess with temp slots. - - * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl - returns null. - - * decl2.c (check_classfn): Use revert_static_member_fn. - * decl.c (revert_static_member_fn): Diagnose static member functions - declared const or volatile. - - * decl2.c (grokfield): Check for missing default args here, too. - (check_default_args): Function to do the checking. - * decl.c (pushdecl): Use it. - - * decl.c (pushdecl): Don't warn about shadowing a member of `this' - if there is no `this'. - -Sun Jun 25 11:34:25 1995 Jason Merrill - - * call.c (build_method_call): Downgrade 'called before definition' - to a warning, as it ought to go away after Monterey. - -Sat Jun 24 14:18:42 1995 Jason Merrill - - * pt.c (coerce_template_parms): Don't do extra checking on pointer - to member arguments. - - * class.c (finish_struct): const and reference members don't prevent - a class from being an aggregate. - - * class.c (finish_struct): Signatures are always aggregates. - -Fri Jun 23 17:20:29 1995 Jason Merrill - - * decl2.c (check_classfn): Improve error message. - - * pt.c (tsubst): Handle PROMOTE_PROTOTYPES. - -Thu Jun 22 01:50:42 1995 Jason Merrill - - * typeck.c (comptypes): Don't ignore method quals. - - * class.c (finish_struct): Non-abstract virtuals are always USED. - - * decl.c (build_ptrmemfunc_type): The underlying union type isn't - IS_AGGR_TYPE, either. - * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead. - * cp-tree.h: Likewise. - - * cp-tree.h (lang_type): Add aggregate. - (CLASSTYPE_AGGREGATE): New macro. - (TYPE_NON_AGGREGATE_CLASS): Likewise. - * class.c (finish_struct): Determine whether a class is an - aggregate. - * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of - TYPE_NEEDS_CONSTRUCTING. - * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for - subobjects, too. - - * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL. - - * decl.c (start_function): For pre-parsed functions, layout all of - the parm decls again. - (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not - DECL_EXTERNAL. - - * pt.c (coerce_template_parms): Improve checking for invalid - template parms. - -Wed Jun 21 12:01:16 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Forbid declaration of a static member - with the same name as its enclosing class. - -Mon Jun 19 10:28:14 1995 Jason Merrill - - * decl.c (finish_function): Clear current_class_decl. - - * typeck.c (build_conditional_expr): Use convert (boolean_type_node - instead of truthvalue_conversion. - - * class.c (finish_struct): A data member with the same name as the - class doesn't suppress constructors. - -Fri Jun 16 18:11:39 1995 Gerald Baumgartner - - * decl.c (start_function): If current_class_decl is a signature - pointer, don't dereference it but set C_C_D to current_class_decl. - -Fri Jun 16 17:06:28 1995 Jason Merrill - - * decl.c (duplicate_decls): Complain about virtual functions - redeclared to be inline. - -Fri Jun 16 13:20:38 1995 Mike Stump - - * decl.c (get_unique_name): New routine to name unnamed namespaces. - (push_namespace): Use get_unique_name for naming unnamed namespaces. - -Thu Jun 15 15:00:41 1995 Jason Merrill - - * parse.y: Call cplus_decl_attributes with prefix_attributes where - appropriate. - -Wed Jun 14 19:24:49 1995 Mike Stump - - * search.c (get_vbase): New routine to switch hierarchies from the - CLASSTYPE_VBASECLASSES to the normal one. - (expand_indirect_vtbls_init): Use get_vbase to figure out how we - want to convert to a vbase pointer. - -Mon Jun 12 17:50:30 1995 Jason Merrill - - * pt.c (instantiate_class_template): Add the new instantiation to - template_classes. - (do_pending_expansions): Call instantiate_member_templates on all of - the classes in template_classes. - -Mon Jun 12 12:36:59 1995 Mike Stump - - * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our - TYPE_MAIN_VARIANT if it is not filled in. - * init.c (build_delete): If the TYPE_DOMAIN is not set, give an - error instead of core dumping. - -Mon Jun 12 10:41:40 1995 Jason Merrill - - * call.c (can_convert): Also check for distance > 0. - (can_convert_arg): Likewise. - (user_harshness): Likewise. - -Fri Jun 9 19:17:21 1995 Jason Merrill - - * g++.c (MATH_LIBRARY): Provide default. - (main): Always link with the math library if we link with libstdc++. - - * decl.c (start_function): Complain about redefinition of a function - even when the pending_inline version is compiled after the other - version. - -Thu Jun 8 15:44:38 1995 Jason Merrill - - * gc.c (build_dynamic_cast): Build up a reference to a parameter of - aggregate type. - -Wed Jun 7 15:31:57 1995 Brendan Kehoe - - * init.c (build_vec_delete): Resolve an offset ref before we try to - use it. - -Wed Jun 7 14:19:32 1995 Jason Merrill - - * typeck.c (build_modify_expr): If the class lacks a constructor or - assignment operator, return error_mark_node. - (common_type): Use build_cplus_array_type. - -Tue Jun 6 09:41:27 1995 Mike Stump - - * class.c (dont_allow_type_definitions): New variable set when types - cannot be defined. - (finish_struct): Use it. - * cp-tree.h (dont_allow_type_definitions): Define it. - * parse.y (primary, handler_seq): Set it. - -Mon Jun 5 18:49:38 1995 Mike Stump - - * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for - results from lookup_fnfields. Always give warning/error on bad - code. - -Mon Jun 5 11:39:37 1995 Brendan Kehoe - - * init.c (member_init_ok_or_else): Don't allow initialization of - an ancestor's member from within a constructor. - -Mon Jun 5 11:20:34 1995 Gerald Baumgartner - - * sig.c (build_signature_table_constructor): Use DECL_CONTEXT - instead of DECL_CLASS_CONTEXT for calculating the vfield offset so - abstract virtual functions are handled correctly. - - * sig.c (build_signature_table_constructor): Store the correct - delta in signature table entries. It does not yet work for - classes with virtual base classes as implementations of signatures. - (build_signature_method_call): Add the delta to the object_ptr - before generating the function call. - - * call.c (build_method_call): Make instance_ptr the signature - pointer itself instead of dereferencing the optr. - * sig.c (build_signature_method_call): Dereference the optr for the - direct and virtual calls. - - * sig.c (build_signature_table_constructor): Make the tag for - default implementations -1 instead of 2. - (build_signature_method_call): Change the generated conditional - expression correspondingly. - - * sig.c (build_signature_pointer_constructor): Deleted the sorry - message that said we can't handle multiple inheritance for - implementations of signatures - (build_signature_method_call): Use the offset from the sigtable - entry instead of the vptr field from the signature pointer for - building a virtual function call. - - * class.c (build_vfn_ref): Deleted signature specific code, we don't - call this function anymore from build_signature_method_call. - - * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr - field in the object now instead of in the signature pointer/ref. - (build_vptr_ref): Deleted extern declaration. - * sig.c (build_vptr_ref): Deleted. - (build_signature_pointer_or_reference_type): Deleted construction of - the vptr field. - (build_signature_pointer_constructor): Deleted initialization of/ - assignment to the vptr field. - - * sig.c (build_signature_table_constructor): Convert the signature - table entry fields to their correct types. - - * sig.c (build_signature_table_constructor): Don't call digest_init - for the fields of a sigtable entry, it's wasted time. - - * sig.c (build_signature_table_constructor): Correctly set the - offset and index fields of a sigtable entry. Build the constructor - the way digest_init does, digest_init can't handle initializing an - anonymous union inside a struct. - (build_signature_method_call): Use the index field instead of the - delta field to get the vtable index. - - * decl.c (init_decl_processing): Fix number of fields for building - sigtable_entry_type. - - * cp-tree.h (tag_identifier, offset_identifier): Added extern decls. - (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME. - (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead. - * decl.c (tag_identifier, offset_identifier): New variables to - hold the identifiers for the sigtable fields tag and offset. - (init_decl_processing): Initialize these variables. - (init_decl_processing): Use these variables to build the - sigtable_entry_type structure. Rename the code and offset fields - to tag and delta, respectively; add offset and index fields. Changed - types of fields from short_integer_type_node to delta_type_node. - * sig.c (build_signature_table_constructor): Rename code and offset - to tag and delta, respectively. - (build_signature_method_call): Likewise. Use above variables. - -Thu Jun 1 17:03:51 1995 Jason Merrill - - * decl.c (lookup_name_real): Don't try to look anything up in an - erroneous object. - -Fri Jun 2 10:30:14 1995 Mike Stump - - * method.c (build_overload_int): New routine. Break out - functionality from build_overload_value so we can reuse it. - (build_overload_value): Handle pointer to member functions as value - parameters for templates. - (build_overload_identifier): Since template parameters are shared - among all instantiations, we have to substitute in the real types - in TREE_TYPE (parm). - pt.c (coerce_template_parms): Likewise. - (push_template_decls): Likewise. - (grok_template_type): Deleted as template parameters are shared - among all instantiations. - -Wed May 31 19:10:32 1995 Mike Stump - - * decl.c (grokdeclarator): Always give errors on constant overflow - for array indices. - -Wed May 31 11:39:43 1995 Jason Merrill - - * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0. - (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to - reference type. - (build_indirect_ref): Fix check for *&. - -Fri Jun 16 06:54:03 1995 Mike Stump - - * Version 2.7.0 released. - -Fri Jun 16 15:07:29 1995 Richard Kenner - - * Make-lang.in (DEMANGLER_PROG): Add LIBS. - -Thu Jun 15 15:00:41 1995 Jason Merrill - - * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN. - -Wed Jun 7 20:00:31 1995 Mike Stump - - * *.[chy]: Change all callers of finish_decl to cp_finish_decl. - * decl.c (finish_decl): New routine to handle call backs from the - mid end (declare_hidden_char_array). - -Wed Jun 7 19:02:50 1995 Jason Merrill - - * decl.c (start_function): Handle setting C_C_D here. - (set_C_C_D): Removed. - (struct saved_scope): Remove class_decl. - (push_to_top_level): Don't save current_class_decl. - (pop_from_top_level): Don't restore current_class_decl or C_C_D. - (struct cp_function): Add C_C_D. - (push_cp_function_context): Save C_C_D. - (pop_cp_function_context): Restore C_C_D. - -Fri Jun 2 11:05:58 1995 Jason Merrill - - * decl.c (set_C_C_D): New function. suspend_momentary before - building C_C_D. - (pop_from_top_level): Call it. - (start_function): Likewise. - (pop_cp_function_context): Likewise. - - * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references - to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR. - - * decl.c (push_cp_function_context): Save current_class_decl. - (pop_cp_function_context): Restore current_class_decl and set C_C_D. - (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D. - (start_function): Likewise. - - * class.c (popclass): Don't mess with current_class_decl, - current_vtable_decl, or C_C_D. - -Mon May 29 12:45:10 1995 Paul Eggert - - * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG). - -Wed May 24 15:55:18 1995 Richard Kenner - - * decl.c (duplicate_decls): Check simple_cst_equal result against 0. - * decl2.c (finish_anon_union): Likewise. - * method.c (largest_union_member): Likewise. - -Wed May 24 14:41:11 1995 H.J. Lu - - * Make-lang.in (cxxmain.o): Replace single quotes with backslashes. - -Mon May 22 17:38:48 1995 Richard Kenner - - * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG): - Use $@ instead of output name so works even if have .exe. - (cxxmain.o): Use cp if ln -s fails. - (c++.install-man): Use $(exeext) in executable names. - (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names. - * Makefile.in (../cc1plus): Use $(exeext) in name of executable. - -Wed May 24 01:39:03 1995 Jason Merrill - - * call.c (build_method_call): Parms can be null, duh. - -Tue May 23 01:32:09 1995 Jason Merrill - - * call.c (build_method_call): If convert_arguments failed, just bail. - -Fri May 19 10:31:11 1995 Jason Merrill - - * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert. - - * tree.c (copy_to_permanent): Oops. - -Fri May 19 10:01:07 1995 Brendan Kehoe - - * cp-tree.h (break_out_target_exprs): Add decl. - -Thu May 18 13:02:30 1995 Jason Merrill - - * decl.c (start_function): Move *all* interface handling stuff after - the pushdecl. - - * tree.c (mapcar): Renamed from make_deep_copy and generalized. - (perm_manip): Return t if permanent, otherwise 0. - (copy_to_permanent): Use them. - (bot_manip): Helper for break_out_target_exprs. - (break_out_target_exprs): New function. Uses mapcar. - - * typeck.c (convert_arguments): Use it. - - * method.c (hack_identifier): Use convert_from_reference to - dereference a reference. - -Wed May 17 17:54:54 1995 Mike Stump - - * call.c (convert_harshness): Move reference bashing before pointer - to member bashing. - -Wed May 17 16:57:53 1995 Mike Stump - - * cvt.c (convert_to_reference): Only complain, if complaints are - wanted. - * typeck.c (build_function_call_real): Likewise. If - LOOKUP_SPECULATIVELY is set and something won't work, return - NULL_TREE. - * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call. - (convert): Pass LOOKUP_NORMAL to cp_convert. - * typeck.c (convert_for_assignment): Likewise. - (convert_force): Pass LOOKUP_COMPLAIN to cp_convert. - (convert_arguments): Get out early if we get an error_mark_node. - (convert_for_initialization): Use cp_convert instead of convert so - that we can pass flags down. - * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation. - -Wed May 17 01:43:58 1995 Jason Merrill - - * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the - decl type. - - * class.c (finish_struct): Don't complain about a class with no - user-defined constructors but with a member that has no default - constructor, as this is OK for aggregates. - - * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit - constructor call, mark slot addressable. - -Tue May 16 18:37:51 1995 Douglas Rupp - - * g++.c: Changed WINNT to _WIN32. - -Tue May 16 12:40:16 1995 Jason Merrill - - * lex.c (handle_sysv_pragma): Don't use token_buffer. - -Tue May 16 12:05:26 1995 Mike Stump - - * call.c (resolve_scope_to_name): Add initial semantic support for - namespaces. - * class.c (finish_struct): Likewise. - * cp-tree.h (NAMESPACE_LEVEL): Likewise. - * cvt.c (build_up_reference, convert_to_reference): Likewise. - * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise. - (resume_binding_level, toplevel_bindings_p): Likewise - (namespace_bindings_p, declare_namespace_level): Likewise. - (resume_level, push_namespace, pop_namespace): Likewise. - (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise. - (implicitly_declare, lookup_namespace_name): Likewise. - (lookup_name_real, start_decl, make_temporary_for_reference): Likewise. - (obscure_complex_init, finish_decl, expand_static_init): Likewise. - (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise. - (store_parm_decls, hack_incomplete_structures): Likewise. - * decl2.c (get_temp_name, finish_anon_union): Likewise. - (current_namespace, push_namespace, pop_namespace): Likewise. - (do_namespace_alias, do_toplevel_using_decl): Likewise. - (do_class_using_decl): Likewise. - * error.c (dump_decl): Likewise. - * init.c (build_member_call, build_offset_ref): Likewise. - * lex.c (identifier_type): Likewise. - * parse.y (lang_extdef, using_decl, extdef): Likewise. - (component_decl_1, nested_name_specifier_1): Likewise. - * spew.c (yylex): Likewise. - * tree.def (NAMESPACE_DECL): Likewise. - -Tue May 16 11:55:35 1995 Jason Merrill - - * decl.c (push_overloaded_decl): Return the new decl even if it - can't be pushed. - -Tue May 16 11:00:37 1995 Jason Merrill - - * typeck.c (decay_conversion): Split out from default_conversion. - (default_conversion): Call it. - (build_binary_op): Likewise. - (build_binary_op_nodefault): Use decay_conversion for truth ops. - -Mon May 15 12:47:56 1995 Jason Merrill - - * decl.c (warn_extern_redeclared_static): This is a pedwarn. - (duplicate_decls): Always use the old decl's linkage info. Don't - play with linkage of consts. - (pushdecl): Don't play with linkage of consts. - (redeclaration_error_message): Don't complain about an old public - decl and a new non-public decl here. - (grokvardecl): Handle linkage of consts here. - (grokdeclarator): An 'extern inline' is public. Pass constp to - grokvardecl. - (start_function): Wait until after the pushdecl to do some linkage - stuff. - - * decl2.c (import_export_vtable): Make duplicates weak rather than - static if supported. - (import_export_inline): Likewise. - * pt.c (do_pending_expansions): Likewise. - - * class.c (build_vbase_path): flag_assume_nonnull_objects only - affects reference conversion. - - * init.c (emit_base_init): Build up an RTL_EXPR and add it to - rtl_expr_chain. - * decl.c, decl2.c: s/base_init_insns/base_init_expr/. - -Tue May 16 07:06:28 1995 Paul Eggert - - * method.c (numeric_output_need_bar): Renamed from misspelling. - - * typeck.c (build_ptrmemfunc): Fix misspellings in messages. - -Sun May 14 10:26:22 1995 Richard Kenner - - * lang-options.h, lang-specs.h: New files. - -Thu May 11 00:31:48 1995 Jason Merrill - - * typeck.c (default_conversion): Don't check for BLKmode before - pulling out the decl_constant_value. - - * decl.c (start_function): Clear named_labels and shadowed_labels. - - * typeck.c (build_function_call_real): Also synthesize methods here. - -Wed May 10 00:55:59 1995 Jason Merrill - - * decl2.c (finish_file): Synthesize exported methods before the - reconsider loop. - - * parse.y: Move declaration of flag_new_for_scope to file scope. - -Tue May 9 19:10:33 1995 Mike Stump - - * decl2.c: Add flag_new_for_scope for new -ffor-scope flag. - * parse.y (FOR): Conditionalize the pushing and popping of scope for - the for-init-statement upon the new flag_new_for_scope. - * parse.y (try_block): Simplify and use compstmt. - -Mon May 8 12:41:52 1995 Jason Merrill - - * decl.c (define_function): Mark function decl artificial. - -Sun May 7 00:51:28 1995 Jason Merrill - - * parse.y (simple_stmt, FOR): Put back push/pop for condition scope. - - * decl2.c (grokclassfn): DECLs don't have cv-qualified types. - * tree.c (build_cplus_method_type): Likewise. - - * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1. - - * typeck.c (build_function_call_real): If convert_arguments failed, - just bail. - (convert_arguments): If one of the arguments is error_mark_node, - just bail. - -Sat May 6 02:39:41 1995 Jason Merrill - - * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for - decls that don't include it. - -Fri May 5 14:23:30 1995 Jason Merrill - - * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or - DECL_NOT_REALLY_EXTERN set aren't extern decls. - - * typeck.c (build_indirect_ref): Don't call default_conversion for a - parameter of reference_type. - * cvt.c (convert_from_reference): Just use build_indirect_ref. - - * pt.c (do_type_instantiation): Only instantiate member functions - that actually come from templates. - -Fri May 5 09:46:05 1995 Mike Stump - - * parse.y: Generalized cleanup of poplevels, and compound statements - and compound statements in try blocks. Rewritten `for' rule so that - the scope of variables declared in the for clause is shortened to - span just to the end of the statement, instead of the whole - containing block. - -Fri May 5 00:37:14 1995 Jason Merrill - - * call.c (convert_harshness): Handle pointers to members better. - -Thu May 4 16:00:26 1995 Jason Merrill - - * decl2.c (delete_sanity): Do access control here. - * init.c (build_delete): Instead of here. - - * Make-lang.in: Build c++filt. - -Wed May 3 02:59:53 1995 Jason Merrill - - * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL, - update our IDENTIFIER_TYPE_VALUE. - -Fri Apr 28 07:58:41 1995 Jason Merrill - - * lex.c (cons_up_default_function): Fix linkage of #pragma - implemented functions. - -Thu Apr 27 16:56:24 1995 Jason Merrill - - * method.c (build_overload_name): Simplify and fix repeated type - folding. - - * decl.c (grokdeclarator): Prohibit pointers to void or reference - members. - -Thu Apr 27 09:49:07 1995 Mike Stump - - * typeck2.c (process_init_constructor): Make sure initializers are - fully digested. - -Thu Apr 27 01:11:55 1995 Jason Merrill - - * lex.c (cons_up_default_function): Always defer synthesis. - -Thu Apr 27 00:20:37 1995 Jason Merrill - - * decl2.c (mark_inline_for_output): Don't play with pending_inline - stuff. - -Wed Apr 26 17:48:24 1995 Jason Merrill - - * call.c (user_harshness): New function; like build_type_conversion, - but doesn't actually build anything. - (compute_conversion_costs): Use it instead of build_type_conversion. - -Wed Apr 26 17:11:25 1995 Jason Merrill - - * typeck.c (build_function_call_real): Improve error message for - calling a non-function. - - * method.c (hack_identifier): Lose check for calling a data member. - -Wed Apr 26 16:59:13 1995 Mike Stump - - * typeck2.c (build_functional_cast): Remove very old cruft. - Seems like good code is generated without it. - -Wed Apr 26 00:47:16 1995 Jason Merrill - - * method.c (do_build_assign_ref): Fix handling of anonymous unions. - (do_build_copy_constructor): Likewise. - - * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch. - - * decl.c (push_switch): New function. - (pop_switch): Likewise. - (define_case_label): Check for jumping over initialization. - - * call.c (build_method_call): Check for an inline function being - called before its definition has been seen. - * typeck.c (build_function_call_real): Likewise. - - * decl.c (duplicate_decls): Check for a function being redeclared - inline after its address has been taken. - - * typeck.c (build_conditional_expr): Handle related class lvalues. - -Tue Apr 25 13:20:45 1995 Jason Merrill - - * pt.c (do_pending_expansions): Don't expand unused templates. - - * parse.y (component_decl): Accept a lone semicolon. - -Tue Apr 25 00:25:56 1995 Jason Merrill - - * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the - object parameter anymore. - - * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns. - -Mon Apr 24 12:35:48 1995 Jason Merrill - - * parse.y (simple_stmt, decl case): Clear prefix_attributes. - (lang_extdef): Likewise. - - * parse.y (maybe_parmlist): New rule for use in declarators where - this could either be a list of expressions or parameters. Calls - suspend_momentary before deciding which. - (direct_after_type_declarator): Use it. - (complex_direct_notype_declarator): Use it. - - * pt.c (tsubst): Propagate attributes const and noreturn. - - * typeck.c (build_modify_expr): If warn_synth, call build_opfncall - before doing the default thing. - -Thu Apr 27 21:49:36 1995 Doug Evans - - * typeck.c (common_type): Call lookup_attribute instead of - value_member. - -Tue Apr 25 18:07:43 1995 Richard Kenner - - * Make-lang.in: Change "realclean" to "maintainer-clean". - -Sun Apr 23 12:32:38 1995 Mike Stump - - * decl2.c (finish_file): Fix broken linked list handling. - -Fri Apr 21 18:08:43 1995 Jason Merrill - - * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF - as often. - (finish_struct): Likewise. - - * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*. - - * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro. - (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro. - -Fri Apr 21 15:52:22 1995 Jason Merrill - - * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if - it is of the same type as the return value. - -Fri Apr 21 03:01:46 1995 Jason Merrill - - * decl2.c (finish_file): Reconsider if synthesizing a method wrote - out its assembly. - - * typeck.c (convert_for_initialization): Don't call a trivial copy - constructor. - - * typeck2.c (store_init_value): Only abort if the type has a - non-trivial copy constructor. - - * typeck.c (c_expand_return): If we're returning in a register and - the return value is a TARGET_EXPR, expand it. Only do - expand_aggr_init if we're returning in memory. - (expand_target_expr): Function to expand a TARGET_EXPR. - (build_modify_expr): Use it. - - * tree.c (build_cplus_new): Layout the slot. - - * expr.c (cplus_expand_expr): Use expand_call to expand the call - under a NEW_EXPR, so the target is not discarded. - -Thu Apr 20 14:59:31 1995 Mike Stump - - * gc.c (build_dynamic_cast): Tighten error checking. - -Thu Apr 20 11:23:54 1995 Jason Merrill - - * expr.c (cplus_expand_expr): Only abort if the returned target is - different from what we expected if the type has a non-trivial copy - constructor. - - * decl2.c (cplus_decl_attributes): Attributes applied to a template - really apply to the template's result. - - * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE - to decide whether to consider a CALL_EXPR an lvalue. - - * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the - type has a non-trivial copy constructor. - - * decl.c (start_function): If interface_known, unset - DECL_NOT_REALLY_EXTERN on the function. - -Wed Apr 19 16:53:13 1995 Jason Merrill - - * pt.c (do_function_instantiation): Handle explicit instantiation of - member functions. - (do_type_instantiation): Handle 'inline template class foo', - meaning just spit out the vtable. - - * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on - the consed functions. - - * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN. - -Wed Apr 19 16:28:17 1995 Brendan Kehoe - - * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c, - typeck.c: Include output.h. - -Wed Apr 19 14:57:21 1995 Gerald Baumgartner - - * call.c (build_method_call): Allow a signature member functions to - be called from a default implementation. - -Wed Apr 19 10:21:17 1995 Jason Merrill - - * repo.c (finish_repo): Remember what directory we are in. - - * search.c (expand_upcast_fixups): Don't mess with abort_fndecl. - - * repo.c: Use obstacks instead of fixed-size buffers. Don't spit - out the second copy of the symbol name. Don't remember COLLECT_GCC. - -Wed Apr 19 02:32:40 1995 Mike Stump - - * search.c (virtual_context): New function to get the virtual - context of a function. - (expand_upcast_fixups): New function to generate runtime vtables. - (fixup_virtual_upcast_offsets): Likewise. - (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to - ensure that the this offsets for upcasts from virtual bases into - other virtual bases or non-virtual bases are correct at construction - time and destruction time. - * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all - vtables in all virtual bases, instead of just one vtable in each - virtual base. - (fixup_vtable_deltas1): Likewise. - -Tue Apr 18 03:57:35 1995 Michael Meissner - - * Makefile.in (lex.o): Add dependency on c-pragma.h. - - * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as - appropriate, instead of 0. - -Mon Apr 17 12:28:42 1995 Jason Merrill - - * decl.c (pushdecl): Use decls_match, not duplicate_decls, for - comparing local and global decls. - -Fri Apr 14 01:46:52 1995 Jason Merrill - - * typeck.c (convert_arguments): Only prohibit passing to ... of - types with non-trivial copy constructors. - - * repo.c (repo_template_used): Don't try to mess with no id. - -Fri Apr 14 23:32:50 1995 Per Bothner - - * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls. - -Thu Apr 13 15:37:42 1995 Brendan Kehoe - - * cp-tree.h (current_tinst_level): Delete declaration, since it's - static inside pt.c. - - * typeck.c (build_modify_expr): Catch incompatible array assignment. - - * parse.y (attribute_list, attrib): Rewrite actions to feed the - right stuff to decl_attributes. - -Thu Apr 13 11:24:10 1995 Jason Merrill - - * search.c (dfs_debug_mark): Check for magic virtual like - import_export_vtable. - - * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with - four args. - -Wed Apr 12 12:02:57 1995 Jason Merrill - - * decl2.c (finish_file): Move prevtable pass before needs_messing_up - decision. - -Tue Apr 11 11:20:27 1995 Jason Merrill - - * decl.c (finish_decl): If we're writing out a static data member of - a class, we want the debug info for that class. - - * gc.c (build_t_desc): Check linkage of a class properly. - - * class.c (finish_struct): Set the 'headof' offset for the main - vtable properly. - (prepare_fresh_vtable): Fix typeinfo pointer here. - (modify_one_vtable): Instead of here. - -Mon Apr 10 12:15:59 1995 Jason Merrill - - * repo.c (repo_get_id): New function to return the interesting - identifier for a repo entity. - (repo_template_used): Use it. - (repo_template_instantiated): Mark the id as chosen. - (init_repo): Record whether or not the id was chosen. - (finish_repo): Note if an id was newly chosen. - - * pt.c (do_function_instantiation): Call repo_template_instantiated. - (do_type_instantiation): Likewise. Don't diagnose multiple - instantiation. - - * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding - whether or not to synthesize a method. - - Undo these changes: - * class.c (finish_vtbls): Build more vtables if flag_rtti is on. - * class.c (modify_all_direct_vtables): Likewise. - * init.c (expand_direct_vtbls_init): Expand more vtables if - flag_rtti is on. - -Sat Apr 8 17:45:41 1995 Mike Stump - - * gc.c (build_headof): Use ptrdiff_type_node instead of - integer_type_node on pointer arithmetic. - -Sat Apr 8 11:57:04 1995 Jason Merrill - - * typeck.c (build_modify_expr): Undo previous change. - -Thu Apr 6 01:23:50 1995 Jason Merrill - - * Makefile.in (compiler): Remove ../cc1plus before rebuilding it. - - * repo.c (get_base_filename): Put the .rpo file in the directory - with the object file, not the source. - - * typeck.c (build_conditional_expr): Handle pmf's better. - - * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out - the name of the symbol. - -Wed Apr 5 15:24:12 1995 Jason Merrill - - * repo.c (open_repo_file): Make repo filename DOS-compliant. - (*): Also write a new repo file if some previously-used - templates are no longer used. Only remember the identifier. - - * lex.c (cons_up_default_function): If this function belongs to a - template class, call repo_template_used for it. - - * repo.c (repo_template_used): Using a class means using its vtable, - if any. - (finish_repo): Likewise. - - * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs - if the type has a complex copy constructor. - - * decl2.c (lang_decode_option): -frepo implies - -fno-implicit-templates. - - * decl.c (start_function): Clear current_{base,member}_init_list. - - * lex.c (init_lex): Also unset *_eq if ! flag_operator_names. - -Tue Apr 4 16:11:08 1995 Jason Merrill - - * decl.c (struct cp_function): Add {base,member}_init_list. - (push_cp_function_context): Save current_{base,member}_init_list. - (pop_cp_function_context): Restore them. - -Mon Apr 3 16:55:08 1995 Jason Merrill - - * repo.c (get_base_filename): Take filename parm, fix logic bug. - - * typeck.c (build_compound_expr): Do not warn about a compound expr - in which the first expression has no side effects. - (build_x_compound_expr): Warn here instead. - (build_conditional_expr): Don't warn about a conditional expression - between an enum and the type it promotes to. - - * init.c (build_new): Handle initialization of arrays of builtins - properly. - -Mon Apr 3 15:08:04 1995 Brendan Kehoe - - * repo.c: Include config.h to get definitions of bcopy and rindex - on systems that don't have them (e.g., SVR4). - -Mon Apr 3 14:41:55 1995 Mike Stump - - * decl2.c (finish_table): Pass NULL_TREE instead of init to - finish_decl so that it won't try and do error checking on the - initializer. - -Mon Apr 3 10:45:50 1995 Jason Merrill - - * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to - determine whether this compile used -c -o. - (open_repo_file): Use get_base_filename. Remove the extension. - (finish_repo): Spit out the values of main_input_filename, - COLLECT_GCC and COLLECT_GCC_OPTIONS. - - * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name. - -Sun Apr 2 23:43:51 1995 Jason Merrill - - * search.c (compute_access): Don't try to do access control on - nested types. - -Fri Mar 31 10:14:23 1995 Jason Merrill - - * repo.c: New file to handle things repo. - - * pt.c (instantiate_template): Call repo_template_used if the - definition is accessible. - (mark_function_instantiated): Split out from - do_function_instantiation. - (mark_class_instantiated): Split out from do_type_instantiation. - - * parse.y (template_instantiate_once): Call repo_template_used. - - * lex.c (lang_init): Call init_repo. - - * decl2.c: Handle flag_use_repository. - (finish_file): Call finish_repo. - - * decl.c (start_method): Call repo_template_used if this is a - template method. - - * Makefile.in (CXX_OBJS): Add repo.o. - (repo.o): Add dependencies. - - * Make-lang.in (CXX_SRCS): Add repo.c. - - * decl.c (start_function): If DECL_INTERFACE_KNOWN and - DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL. - - * typeck.c (build_binary_op_nodefault): Identify the invalid operand - types used. - - * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN. - -Thu Mar 30 17:54:42 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Tidy up use of build_type - and result_type. When checking for comparison between signed - and unsigned, use result_type rather than the (possibly shortened) - type of op0. Also, don't warn about equality comparison of a - signed operand to an unsigned constant that fits in the signed - type. - - * method.c (do_build_copy_constructor): Reverse - current_base_init_list after we've built it up. - -Thu Mar 30 14:35:18 1995 Mike Stump - - * except.c (build_throw): Never warn about the value of throw not - being used. - -Thu Mar 30 13:16:54 1995 Mike Stump - - * except.c (expand_start_catch_block): Check for bad catch parameter - declarations. - -Thu Mar 30 13:06:11 1995 Jason Merrill - - * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if - DECL_EXTERNAL is not already set. - -Thu Mar 30 11:26:24 1995 Mike Stump - - * method.c (emit_thunk): Let poplevel know that the last level is - for a function so it can create a BLOCK_NODE and set DECL_INITIAL. - -Thu Mar 30 11:15:06 1995 Jason Merrill - - * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN - here. - - * decl.c (grokdeclarator): OK, don't abort if we see a decl with - METHOD_TYPE. - (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on - all deferred inlines. - -Wed Mar 29 19:35:02 1995 Jason Merrill - - * cp-tree.h (DECL_THIS_INLINE): New macro. - (DECL_NOT_REALLY_EXTERN): New macro. - (DECL_THIS_STATIC): New macro. - - * decl.c: Lose all references to current_extern_inline. Break - inline semantics into DECL_INLINE for actual inlining and - DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC. - * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to - emit an inline here. Associated changes. - * lex.c: Likewise. - * pt.c: Likewise. - * typeck.c: Likewise. - - * call.c (build_method_call): Don't bother trying to handle inlines - specially. - * cvt.c (convert_to_aggr): Likewise. - - * pt.c (do_function_instantiation): Handle instantiation of - public inlines, too. - -Wed Mar 29 16:04:25 1995 Mike Stump - - * except.c (init_exception_processing): Change the interface for - __throw_type_match and add decl for new rtti matching routine - __throw_type_match_rtti. - (build_eh_type): New routine to build a run time descriptor for the - expression given. - (expand_start_catch_block): Update to use new calling convention for - the matcher. - (expand_throw): Update to use build_eh_type. - -Mon Mar 27 07:14:33 1995 Warner Losh - - * g++.c: Removed __NetBSD__ from conditional. - Declare strerror if HAVE_STRERROR is defined; otherwise - declare sys_errlist and sys_nerr. - (my_strerror): New function. - -Tue Mar 28 14:16:35 1995 Jason Merrill - - * search.c (get_binfo): Don't try to be so clever. - - * tree.c (copy_to_permanent): Also suspend_momentary(). - - * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even - if the types are the same. - - * decl.c (start_function): Handle extern inlines more like C++ says - we should. - - * init.c (build_member_call): Hand constructor calls off to - build_functional_cast. - - * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get - the name of the type. - -Tue Mar 28 13:13:56 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Check for the decl returned by - grokfndecl to be null before using build_decl_attribute_variant. - -Mon Mar 27 18:04:41 1995 Brendan Kehoe - - * init.c (build_new): Use build_pointer_type instead of - TYPE_POINTER_TO. - -Fri Mar 24 12:11:24 1995 Jason Merrill - - * typeck.c (build_conditional_expr): Handle pmfs. - (convert_for_assignment): Fix pmf support. - - * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks. - (cp_convert_to_pointer): Handle pmfs. - (cp_convert): Pass pmfs to cp_convert_to_pointer. - - * typeck.c (common_type): Handle inheritance for pmfs. - - * typeck2.c (build_m_component_ref): Do access control. - - * typeck.c (comp_target_types): Check for conversion to void * - before checking trickier conversions. - - * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P. - - * pt.c (push_tinst_level): Complain if template instantiation depth - is greater than max_tinst_depth. - - * typeck.c (common_type): Assume that we can call common_type to - unify the target type of a pointer. - -Thu Mar 23 00:48:44 1995 Jason Merrill - - * decl2.c (finish_file): Don't synthesize methods at - finish_vtable_prevardecl time. Do synthesize methods that are not - used, but are public and not external. - - * cvt.c (build_type_conversion): Only give an error if for_sure. - - * typeck.c (comp_target_types): Only support pointer conversions if - nptrs > 0. - -Wed Mar 22 19:30:15 1995 Brendan Kehoe - - * init.c (build_new): Catch use of an initializer list where it - shouldn't be. - -Wed Mar 22 16:21:07 1995 Jason Merrill - - * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is - non-constant. - - * decl2.c: temp_name_counter is now public. - - * decl.c (struct cp_function): Add temp_name_counter field. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - - * typeck.c (common_type): Handle unifying function types, and unify - unmatched things to void* with a compiler_error, rather than - silently like before. - -Wed Mar 22 15:10:34 1995 Mike Stump - - * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert - Brendan's last change and fix latent problem that causes TD entries - to not come out when the things that need them has yet to be - expanded. - -Wed Mar 22 15:12:00 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault, comparison ops): Update type0 - and type1, since we might have changed op0 or op1. - -Wed Mar 22 13:33:45 1995 Jason Merrill - - * typeck.c (common_type): Don't mess up templates. - -Wed Mar 22 04:56:00 1995 Jason Merrill - - * typeck.c (common_type): Handle ptms properly. Also handle - T* -> void*. - (build_binary_op_nodefault): New variable build_type controls what - type is given to the expression when it is created. Set this to - boolean_type_node for comparison ops instead of using result_type. - (comp_target_types): Allow T * -> void *. - - * cvt.c (cp_convert_to_pointer): Do access control when converting - ptms, too. - -Tue Mar 21 17:25:06 1995 Brendan Kehoe - - * parse.y (extern_lang_string): Catch use of linkage specs that - aren't all naming the same language. - - * class.c (finish_struct): Delete accidental duplicate code. - -Tue Mar 21 14:00:57 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Disable pedwarns about - comparing functions and incomplete types. - - * decl.c (finish_function): Only unset current_function_decl if - !nested. - (duplicate_decls): Last change went too far; we only want to stop - checking for value/reference ambiguity. - -Tue Mar 21 01:26:39 1995 Mike Stump - - * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it - out fresh, as the new type may be larger. - -Mon Mar 20 19:01:10 1995 Jason Merrill - - * expr.c (extract_init): Try to expand the RTL for the - initialization and figure out what it will look like so we can avoid - run-time initialization. Disabled for now. - (extract_scalar_init): Helper for scalar initialization. - (extract_aggr_init): Helper for aggregate initialization. - - * decl.c (duplicate_decls): Don't complain about ambiguous - declarations. - (obscure_complex_init): Now returns a tree. Call extract_init if - we're optimizing and this is a toplevel decl. - (finish_decl): Update accordingly. - - * lex.c (check_newline): If we're just changing files (not pushing - or popping), update input_file_stack->name. - -Mon Mar 20 17:55:04 1995 Mike Stump - - * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now - in the transitive unification code. - -Mon Mar 20 16:07:50 1995 Brendan Kehoe - - * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on - non-functions. - (grokdeclarator): Don't allow friends to be defined in local classes. - -Sat Mar 18 04:03:33 1995 Jason Merrill - - * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC - rather than DECL_SAVED_INSNS to decide whether or not this method - was declared inline. - - * method.c (synthesize_method): Turn off DECL_INLINE if - function_cannot_inline_p thinks we're too large. - - * typeck.c (build_indirect_ref): Use build_expr_type_conversion. - -Fri Mar 17 17:47:36 1995 Jason Merrill - - * class.c (instantiate_type): Handle pmfs. - - * typeck.c (convert_for_assignment): Check types when assigning one - pmf to another. - - * decl.c (define_label): Fix logic for printing out the name of the - label in an error message. - - * error.c (dump_expr): Support ARRAY_REF. - -Fri Mar 17 17:43:02 1995 Brendan Kehoe - - * decl2.c (finish_vtable_vardecl): Call build_t_desc here. - (finish_prevtable_vardecl): Instead of here. - -Fri Mar 17 14:40:45 1995 Jason Merrill - - * decl.c (expand_static_init): Also use expand_aggr_init if the - initializer is a TREE_LIST. - (grokdeclarator): Only pedwarn about extra qualification if -pedantic. - - * pt.c (unify): Fix unification of return type. - - * expr.c (fixup_result_decl): Use store_expr, rather than - emit_move_insn, to move the return value into the place where - callers will expect it. - -Thu Mar 16 22:05:25 1995 Jason Merrill - - * init.c (build_offset_ref): Call assmble_external on functions. - * typeck.c (build_component_ref): Likewise. - -Thu Mar 16 20:28:16 1995 Brendan Kehoe - - * decl.c (struct saved_scope): Add members base_init_list and - member_init_list. - (push_to_top_level): Save current_base_init_list and - current_member_init_list to them. - (pop_from_top_level): Put it back. - -Thu Mar 16 19:21:14 1995 Jason Merrill - - * pt.c (instantiate_template): Call assemble_external. - -Thu Mar 16 18:07:54 1995 Brendan Kehoe - - * class.c: Include rtl.h, to get NULL_RTX. - (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems - on hosts with different sizes for each part of the union. - * tree.c: Also include rtl.h. - (layout_basetypes): Same change for DECL_SAVED_INSNS. - -Thu Mar 16 13:57:36 1995 Jason Merrill - - * pt.c (unify): Fix array domain unification for 64-bit targets. - - * decl2.c (finish_file): Push bizarre type decl before walking the - vtables the first time. - (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed - with TREE_CHAIN (prev). - - * init.c (emit_base_init): Use convert_pointer_to_real instead of - convert_pointer_to when converting to a direct base. - -Wed Mar 15 20:26:29 1995 Mike Stump - - * pt.c (type_unification): Handle transitive unification better. - -Wed Mar 15 13:56:16 1995 Jason Merrill - - * decl2.c (walk_vtables): Always set prev to vars. - (mark_vtable_entries): Call assemble_external on the vtable entries. - - * class.c (finish_struct): Set the vtable's size to NULL_TREE before - calling layout_decl, so that it gets updated properly. - - Finally re-enable dynamic synthesis. This time it works. - * method.c (synthesize_method): Pass decl_function_context (fndecl) - to {push,pop}_cp_function_context. - * decl.c (push_cp_function_context): Now takes a tree argument. - (pop_cp_function_context): Likewise. - * call.c (build_method_call): Enable synthesis. - * lex.c (cons_up_default_function): Likewise. - -Tue Mar 14 19:14:19 1995 Doug Evans - - * parse.y (setattrs): Chain onto prefix_attributes rather than - setting it. - -Wed Mar 15 13:00:00 1995 Brendan Kehoe - - * decl.c (pushdecl): Check if the type of the VAR_DECL is an - error_mark_node before trying to read TYPE_LANG_SPECIFIC. - -Mon Mar 13 21:00:28 1995 Brendan Kehoe - - * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold, - and convert the size and integer_one_node to the index type. - -Mon Mar 13 08:01:02 1995 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Save the instance - argument, and tack it onto the front of the COND_EXPR to make the - semantics come out right. Grab the instance argument from - '*instance_ptrptr', rather than having it passed in separately. - - * various: Change various consed-up comparison operations to have - boolean type. Remove the instance argument in calls to - get_member_function_from_ptrfunc. - - * error.c (dump_expr): Dump true and false as "true" and "false". - - * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the - global init function. - - * decl.c (finish_function): Only set DECL_EXTERNAL here if the - inline function is public. - -Sat Mar 11 00:58:03 1995 Jason Merrill - - * init.c (is_friend): Be more careful about checking - DECL_CLASS_CONTEXT on non-member functions. - - * decl2.c (finish_vtable_vardecl): Don't bother calling - assemble_external here. - (prune_vtable_vardecl): New function that just splices out the - vtable decl from the top-level decls. - (import_export_inline): Unset DECL_EXTERNAL at first. - (finish_file): Don't bother calling assemble_external here. Do - splice out all of the vtables. - -Fri Mar 10 14:42:29 1995 Jason Merrill - - * decl.c (finish_function): If we're not emitting the function yet, - call assemble_external for it. - - * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries - here. - (finish_vtable_vardecl): Don't do the linkage deduction thing here. - Also don't splice out the current vtable if it is unused. - (finish_file): Move the second walk_vtables and the synthesis check - inside the 'reconsider' loop. Move thunk emission after the - 'reconsider' loop. - -Thu Mar 9 16:28:16 1995 Brendan Kehoe - - * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it - was passing bogus values for readonly and volatile from the original - template decl, not the resultant type of the tsubst call. - - * class.c (duplicate_tag_error): Use cp_error_at to point out the - previous definition of the tag. - -Thu Mar 9 10:46:17 1995 Jason Merrill - - * decl.c (start_function): Clear base_init_insns and protect_list. - (struct cp_function): Add base_init_insns field. - (push_cp_function_context): Also save base_init_insns. - (pop_cp_function_context): Also restore base_init_insns. - -Wed Mar 8 13:31:44 1995 Jason Merrill - - * init.c (member_init_ok_or_else): Check for initializing a static - member here. - (emit_base_init): Instead of here. - -Tue Mar 7 16:03:26 1995 Jason Merrill - - * call.c (build_method_call): Disable synthesis as needed. - * lex.c (cons_up_default_function): Likewise. - -Tue Mar 7 10:14:29 1995 Brendan Kehoe - - * parse.y: New rules to allow attributes in a prefix position. - (prefix_attributes): New variable. Pass it into cplus_decl_attributes. - (setattr): New rule. - (reserved_declspecs, declmods): Catch attributes here. - * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument. - * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to - descendent typedef. - (grokdeclarator): Added code to support machine attributes. - * Makefile.in (stamp-parse): Expect 5 shift/reduce failures. - -Mon Mar 6 15:07:02 1995 Jason Merrill - - * call.c (build_method_call): Don't synthesize methods outside of a - function. - - Make base initialization more re-entrant so that synthesis on the - fly will work (and, eventually, template instantiation on the fly). - * init.c (sort_member_init): Don't bother with members that can't be - initialized. Reorganize a bit. Don't initialize base members here. - (sort_base_init): New function, like sort_member_init, but for base - classes. Steals some code from emit_base_init. - (emit_base_init): Simplify. Call sort_{member,base}_init before - doing any initialization, so we don't have to save - current_{member,base}_init_list in push_cp_function_context. - (expand_aggr_vbase_init_1): Adjust for sort_base_init. - (expand_aggr_vbase_init): Simplify. - * decl.c (struct cp_function): Add protect_list field. - (push_cp_function_context): Also save protect_list. - (pop_cp_function_context): Also restore protect_list. - * call.c (build_method_call): Enable synthesis at point of call. - * lex.c (cons_up_default_function): Likewise. - - * parse.y: Turn -ansi checks back into -pedantic checks. - - * init.c (build_new): Fix -fcheck-new for array new. - -Sat Mar 4 15:55:42 1995 Fergus Henderson - - * typeck.c (build_compound_expr): warn if left-hand operand of - comma expression has no side-effects. - -Fri Mar 3 15:16:45 1995 Jason Merrill - - * parse.y (primary): Change 'object qualified_id *' rules to 'object - overqualified_id *'. - -Fri Mar 3 12:48:17 1995 Brendan Kehoe - - * parse.y (unary_expr): Catch doing sizeof an overloaded function. - Make the error look the same as the one we issue in c_sizeof. - - * typeck.c (build_binary_op_nodefault): Give an error for trying - to compare a pointer-to-member to `void *'. - -Fri Mar 3 11:28:50 1995 Jason Merrill - - * typeck.c (build_unary_op): Handle bool increment with smoke and - mirrors here, rather than in expand_increment where it belongs, - because Kenner doesn't agree with me. - -Fri Mar 3 00:08:10 1995 Brendan Kehoe - - * decl.c (grokparms): Catch a PARM_DECL being used for a default - argument as well. - -Thu Mar 2 20:05:54 1995 Brendan Kehoe - - * init.c (build_new): Don't allow new on a function type. - - * parse.y (primary): Avoid a crash when seeing if the arg is of - the same type as that given for the typespec in an explicit dtor call. - -Thu Mar 2 00:49:38 1995 Jason Merrill - - * decl.c (finish_function): Change test for calling - mark_inline_for_output. - -Wed Mar 1 11:23:46 1995 Jason Merrill - - * typeck.c (build_modify_expr): Complain if - build_default_binary_type_conversion fails. - - * init.c (expand_default_init): Handle arguments of unknown type - properly. - - * cvt.c (build_expr_type_conversion): Only complain about ambiguity - if 'complain'. - * various: Pass 'complain'. - - * typeck.c (comptypes): Be more picky about comparing UPTs. - -Wed Mar 1 11:03:41 1995 Brendan Kehoe - - * decl.c (grokdeclarator): If declarator is null, say that the - type used has an incomplete type. - -Wed Mar 1 10:06:20 1995 Jason Merrill - - * pt.c (instantiate_template): Copy the template arguments to the - permanent_obstack. Also use simple_cst_equal to compare them when - looking for a previous instantiation. - - * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming - they are array domain types). - -Tue Feb 28 23:24:55 1995 Jason Merrill - - * cp-tree.h: Define WANT_* constants for passing to - build_expr_type_conversion. - * cvt.c (build_expr_type_conversion): New function to build - conversion to one of a group of suitable types. - (build_default_binary_type_conversion): Use it. - * decl2.c (grok_array_decl): Likewise. - * typeck.c (build_unary_op): Likewise. - (build_array_ref): Tidy up a bit. - (build_binary_op): Likewise. - -Tue Feb 28 19:57:31 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow decl of an argument as `void'. - -Tue Feb 28 17:23:36 1995 Jason Merrill - - * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals - reserved_declspecs' rule. - - * parse.y (expr_or_declarator): Remove notype_qualified_id rule. - (direct_notype_declarator): Likewise. - (complex_direct_notype_declarator): Add notype_qualified_id rule. - - * lex.c (real_yylex): Handle :> digraph properly. - -Tue Feb 28 12:26:29 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Check if it's a friend, not if it's - non-virtual, that's being initialized. Move the check up to - before FRIENDP would get cleared. Catch an unnamed var/field - being declared void. Say just `field' instead of `structure field' - in the error message. Only go for the operator name if DECLARATOR - is non-null. - -Tue Feb 28 00:08:01 1995 Jason Merrill - - * decl.c (start_function): Complain about abstract return type. - (grokdeclarator): Complain about declaring constructors and - destructors to be const or volatile. Complain about declaring - destructors to be static. - - * pt.c (uses_template_parms): Handle pmfs. - - * decl.c (grokdeclarator): Don't call variable_size for array bounds - that only depend on template constant parameters. - -Mon Feb 27 15:38:16 1995 Brendan Kehoe - - * error.c (dump_decl): Only look to see if it's a vtable if we - actually have a name to check out. - -Mon Feb 27 13:37:53 1995 Jason Merrill - - * cvt.c (convert_to_aggr): Lose misleading shortcut. - -Sun Feb 26 17:27:32 1995 Doug Evans - - * decl.c (set_nested_typename): Always set DECL_IGNORED_P, - not just for dwarf. - -Sun Feb 26 00:10:18 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow a static member to be - declared `register'. - - * init.c (make_friend_class): Move up to a pedwarn for the warning - about a class declaring friends with itself. - - * decl.c (grokdeclarator): You can't do `volatile friend class foo' - or `inline friend class foo'. Only try to make a friend out of - TYPE if we didn't already reset it to integer_type_node. - -Sat Feb 25 22:32:03 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow initialization of a - non-virtual function. - - * decl.c (start_function): Do a pedwarn if we're changing `main' - to have an int return type. - -Sat Feb 25 00:02:05 1995 Jason Merrill - - * typeck.c (build_modify_expr): Handle simple assignment from - TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew. - -Fri Feb 24 18:27:14 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Also don't allow virtual outside of a - class decl for a scope method definition performed at global binding. - - * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF - of a bitfield. - - * decl.c (grokdeclarator): Don't allow a const to be declared mutable. - - * typeck.c (build_binary_op): Return an error_mark_node if either - one of the args turned into an error_mark_node when we tried to - use default_conversion. - - * typeck.c (build_unary_op): Forbid using postfix -- on a bool. - - * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be - used on `__wchar_t'. - -Fri Feb 24 13:59:53 1995 Mike Stump - - * except.c (end_protect_partials): Do it the right way. - -Wed Feb 22 15:42:56 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Upgrade warning about - comparing distinct pointer types to pedwarn. - - * typeck2.c (digest_init): Cope with extra braces. - - * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead - of INT_CST_LT (..., interger_zero_node). - -Wed Feb 22 14:45:52 1995 Brendan Kehoe - - * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy - function for systems that don't have EH. - -Tue Feb 21 19:18:31 1995 Jason Merrill - - * call.c (can_convert_arg): Like can_convert, but takes an arg as - well. - - * pt.c (type_unification): Allow implicit conversions for parameters - that do not depend on template parameters. - -Tue Feb 21 18:43:48 1995 Douglas Rupp - - * Make-lang.in, config-lang.in: ($exeext): New macro. - * Make-lang.in: Try a "cp" if "ln" fails. - * cp-tree.h (decl_attributes): Added argument. - * decl2.c (cplus_decl_attribute): Add arg to decl_attributes. - * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT. - Modified spawnvp to have to correct number of arguments for OS/2, NT. - -Tue Feb 21 18:36:55 1995 Mike Stump - - * decl.c (finish_function): Add calls to end_protect_partials to end - the exception region that protects constructors so that partially - constructed objects can be partially destructed when the constructor - throws an exception. - * init.c (perform_member_init, sort_member_init, emit_base_init): - Added support for partially constructed objects. - * init.c (build_partial_cleanup_for): New routine to do partial - cleanups of a base class. - * decl2.c (finish_file): Move the emitting of the exception table - down, after we emit all code that might have exception regions in - them. - * except.c (end_protect_partials, might_have_exceptions_p): New - routines. - (emit_exception_table): Always output table if called. - * cp-tree.h (protect_list, end_protect_partials, - might_have_exceptions_p, emit_exception_table): Added. - -Tue Feb 21 16:05:59 1995 Brendan Kehoe - - * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused - address of a local variable. - * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we - were given a non-null PTR_TO_INSTPTR. - -Tue Feb 21 01:53:18 1995 Jason Merrill - - * decl.c (duplicate_decls): Always lay out the merged decl. - - * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates. - (finish_prevtable_vardecl): Likewise. - - * method.c (synthesize_method): Set interface_{unknown,only} - according to the settings for our class, not the file where it comes - from. - -Sat Feb 18 12:26:48 1995 Mike Stump - - * except.c: Handle systems that define __i386__ but not __i386. - -Fri Feb 17 15:31:31 1995 Jason Merrill - - * decl2.c (reparse_decl_as_expr): Support being called without a - type argument. - - * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r - conflicts. Sigh. - -Fri Feb 17 12:02:06 1995 Mike Stump - - * parse.y (template_def, fndef, fn.def1, return_init, condition, - initdcl0, initdcl, notype_initdcl0, nomods_initdcl0, - component_decl_1, after_type_component_declarator0, - notype_component_declarator0, after_type_component_declarator, - notype_component_declarator, after_type_component_declarator, - full_parm, maybe_raises, exception_specification_opt): Fix up, - include exception_specification_opt maybeasm maybe_attribute and - maybe_init if missing. Rename maybe_raises to - exception_specification_opt to match draft wording. Use maybe_init - to simplify rules. - -Fri Feb 17 01:54:46 1995 Jason Merrill - - * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs - built for news of scalar types. - -Thu Feb 16 17:48:28 1995 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Update code for warning - about signed/unsigned comparisons from C frontend. Realize that the - code in the C frontend is, if anything, even more bogus. Fix it. - (build_binary_op): Undo default_conversion if it wasn't useful. - - * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for - PRE*CREMENT_EXPR. - - * decl2.c (import_export_vtable): Don't try the vtable hack - if the class doesn't have any real non-inline virtual functions. - (finish_vtable_vardecl): Don't bother trying to find a non-inline - virtual function in a non-polymorphic class. - (finish_prevtable_vardecl): Likewise. - - * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN. - - * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5. - - * init.c (expand_virtual_init): Always call assemble_external. - - * class.c (build_vfn_ref): Always call assemble_external. - (build_vtable): Always call import_export_vtable. - (prepare_fresh_vtable): Likewise. - (add_virtual_function): Don't bother setting TREE_ADDRESSABLE. - -Thu Feb 16 03:28:49 1995 Jason Merrill - - * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine - whether an enumerated type fits in a bitfield. - -Wed Feb 15 15:38:12 1995 Jason Merrill - - * class.c (grow_method): Update method_vec after growing the class - obstack. - -Wed Feb 15 13:42:59 1995 Mike Stump - - * parse.y (handler_seq): Push a level for the catch parameters. - -Wed Feb 15 12:42:57 1995 Jason Merrill - - * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my - bases, in case they've been clobbered. - -Wed Feb 15 12:07:29 1995 Mike Stump - - * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here, - so that one day it will always be valid. - * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise. - - * cp-tree.h (copy_binfo): Removed, unused. - * tree.c (copy_binfo): Likewise. - -Wed Feb 15 00:05:30 1995 Jason Merrill - - * init.c (build_new): Save the allocation before calling - expand_vec_init on it. - - * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush - match the TYPE_PRECISION of the underlying type for constant folding - to work. - -Tue Feb 14 15:31:25 1995 Mike Stump - - * except.c (push_eh_entry, expand_start_all_catch, - expand_leftover_cleanups, expand_end_catch_block): Keep track of - the context in which the exception region occurs. - (build_exception_table): If the region was not output, don't output - the entry in the eh table for it. - -Tue Feb 14 02:15:43 1995 Jason Merrill - - * init.c (expand_default_init): Only use a previous constructor call - if it's a call to our constructor. Does the word "Duh" mean - anything to you? - - * decl.c (grokparms): Fine, just don't call - convert_for_initialization at all. OK? Happy now? - -Mon Feb 13 02:23:44 1995 Jason Merrill - - * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class - method vector has a second element before returning it. - - * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling - convert_for_initialization. - -Sun Feb 12 03:57:06 1995 Jason Merrill - - * typeck.c (build_modify_expr): Compare function name to - constructor_name (current_class_type) instead of current_class_name. - - * decl.c (grokparms): Don't do anything with the return value of - convert_for_initialization. - - * error.c (dump_decl): Also dump_readonly_or_volatile on the decl. - - * decl.c (duplicate_decls): Tweak error message. - - * typeck.c (build_const_cast): Implement checking. - (build_reinterpret_cast): Implement some checking. - - * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when - converting to the same aggregate type. - (CONV_STATIC_CAST): Include it. - (CONV_C_CAST): Likewise. - * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT. - (cp_convert): Only force a new temporary if CONV_FORCE_TEMP. - -Fri Feb 10 16:18:52 1995 Jason Merrill - - * typeck.c (build_c_cast): Use non_lvalue to tack something on - where necessary. - - * decl.c (auto_function): Now a function. - * except.c (init_exception_processing): terminate, unexpected, - set_terminate, and set_unexpected have C++ linkage. - - * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of - truthvalue_conversion for converting to bool, as it handles - user-defined conversions properly. - (condition_conversion): Likewise. - - * except.c (expand_throw): Don't call convert_to_reference. - Pass the correct parameters to build_new. - - * method.c (do_build_assign_ref): Don't use access control when - converting to a base reference here. - (do_build_copy_constructor): Or here. - - * init.c (build_new): Unset TREE_READONLY on the dereferenced - pointer before assigning to it. - - * decl.c (maybe_build_cleanup): Don't bother stripping const here. - - * decl2.c (delete_sanity): You can now delete pointer to const. - -Fri Feb 10 13:28:38 1995 Jason Merrill - - * decl.c (finish_function): Don't rely on actual parameters being - evaluated left-to-right. - * except.c (expand_end_catch_block): Likewise. - -Fri Feb 10 00:52:04 1995 Jason Merrill - - * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't - considered lvalues. - * cvt.c (convert_to_reference): Use real_lvalue_p instead of - lvalue_p. - - * cvt.c (build_type_conversion_1): Don't call convert on aggregate - types. - (convert_to_reference): Fix erroneous text substitution. - - * typeck2.c (initializer_constant_valid_p): Update from C frontend. - Add new argument to all callers. - - * typeck.c (convert_arguments): Check for error_mark_node before - trying to do anything with the actual parameter. - - * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and - fold it. - (bool_truthvalue_conversion): Remove. Fix all callers to call - truthvalue_conversion instead. - (various): Fold CLEANUP_POINT_EXPRs. - - * parse.y (conditions): Call condition_conversion rather than - building up a CLEANUP_POINT_EXPR. - - * pt.c (end_template_decl): Don't warn_if_unknown_interface here - under -falt-external-templates. - -Thu Feb 9 05:24:10 1995 Jason Merrill - - * init.c (build_new): Complain about new of const type without - initializer. Other cleanup. - - * call.c (compute_conversion_costs): Don't call - build_type_conversion with a reference type; convert to the target - type and check its lvaluetude. - * cvt.c (convert_to_reference): Likewise. - - * cvt.c (build_type_conversion_1): There will never be any need to - dereference references here now. - -Thu Feb 9 00:37:47 1995 Mike Stump - - * except.c (expand_builtin_throw): Make sure we only `use' the - value of return_val_rtx. - -Wed Feb 8 15:45:55 1995 Jason Merrill - - * parse.y (structsp): Don't complain about declaring a type being - defined to be a friend. - - * decl2.c (warn_if_unknown_interface): Note the template in question - and the point of instantiation, for -falt-external-templates. - * lex.c (reinit_parse_for_method): Pass the decl to - warn_if_unknown_interface. - * pt.c (instantiate_template): Likewise. - (end_template_decl): Likewise. - - * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the - nested name again, to make local classes work a bit better. - - * typeck.c (build_function_call_real): Dereference reference after - checking for incomplete type. - - * init.c (build_new): Accept new of const and volatile types. - -Wed Feb 8 14:04:16 1995 Jason Merrill - - * decl.c (grokdeclarator): Fix error message. - -Wed Feb 8 03:16:15 1995 Jason Merrill - - * typeck.c (convert_for_initialization): Do bash arrays when - converting to a reference to non-array. - -Tue Feb 7 15:50:33 1995 Jason Merrill - - * cvt.c (cp_convert): Don't call convert_to_reference, or - automatically dereference references. Do pass reference conversions - to cp_convert_to_pointer. - (cp_convert_to_pointer): Support references. - - * call.c (build_method_call): Don't build up a reference to the - parameter here; let build_overload_call handle that. - - * typeck.c (build_c_cast): Call convert_to_reference directly if - converting to a reference type. - * method.c (do_build_copy_constructor): Likewise. - * method.c (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - - * call.c (build_method_call): Dereference a returned reference. - * typeck.c (build_function_call_real): Likewise. - - * decl.c (xref_basetypes): Check for unions with basetypes here. - (xref_tag): Instead of here. - - * pt.c (process_template_parm): Template type parm decls are - artificial. - -Mon Feb 6 04:32:09 1995 Jason Merrill - - * parse.y (typed_declspecs): Add missing semicolon. - (do_xref_defn): Resurrect. - (named_class_head_sans_basetype): Move template specialization - definition cases to named_class_head_sans_basetype_defn. - - * decl2.c (grokfield): Call pushdecl_class_level after setting the - TYPE_NAME, not before. - -Sun Feb 5 02:50:45 1995 Jason Merrill - - * call.c (convert_harshness): Don't call sorry here. Don't allow - conversions between function pointer types if pedantic. - - * pt.c (overload_template_name): Pass globalize=1 to xref_tag. - - * lex.c (cons_up_default_function): Use the full name for the return - type of op=. - - * decl.c (set_nested_typename): Don't worry about anonymous types, - as they already have a unique name. - (pushdecl): Remove redundant set_nested_typename - (xref_tag): Split out base handling into xref_basetypes. - - * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are - not considered incomplete even though their definition is unknown. - - * decl.c (xref_defn_tag): Lose. - (xref_tag): xref_next_defn = ! globalize. - (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The - ones that should have it set will have it set by pushtag. - (pushdecl_class_level): Likewise. - (pushtag): Tidy up a bit. - (set_nested_typename): Push a decl for the nested typename from - here, rather than from xref_defn_tag. - - * parse.y (do_xref): Lose. - (named_class_head): If we see 'class foo:' we know it's a - definition, so don't worry about base lists for non-definitions. - - * pt.c (push_template_decls): Template parm decls are artificial. - - * decl.c (duplicate_decls): Restore check for qualifier - disagreement for non-functions. - (decls_match): Remove check for qualifier disagreement. - -Fri Feb 3 14:58:58 1995 Jason Merrill - - * decl.c (grok_reference_init): Convert initializer from - reference. - * typeck.c (convert_for_initialization): Likewise. - - * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME. - - * cvt.c (cp_convert): Don't convert to the same class type by just - tacking on a NOP_EXPR. - (convert_to_reference): Use comp_target_types instead of comptypes - so that we don't allow conversions two levels down. - -Thu Feb 2 15:07:58 1995 Jason Merrill - - * class.c (build_vbase_path): Bash types to make the backend happy. - * cvt.c (build_up_reference): Bash the types bashed by - build_vbase_path to be reference types instead of pointer types. - (convert_to_reference): Likewise. - - * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a - reference type. - - * parse.y (structsp): Put back error for 'struct B: public A;'. - -Wed Feb 1 23:02:06 1995 Mike Stump - - * except.c: Add support for mips systems that don't define __mips - but do define mips, like Ultrix. - -Wed Feb 1 22:39:07 1995 Mike Stump - - * except.c: Add support for exception handling on the Alpha. - -Wed Feb 1 10:12:14 1995 Mike Stump - - * decl2.c (finish_file): Fix bug in Jan 31st change. - -Tue Jan 31 16:59:15 1995 Gerald Baumgartner - - * sig.c (build_signature_pointer_or_reference_type): Don't set - IS_AGGR_TYPE for signature pointers/reference so expand_default_init - doesn't expect to find a copy constructor. - * call.c (build_method_call): Treat signature pointers/reference - as if IS_AGGR_TYPE were set. - -Tue Jan 31 13:28:56 1995 Mike Stump - - * gc.c (get_typeid): Pawn off error messages to build_t_desc. - (build_t_desc): Inform the user here if they try and build - with -frtti and don't include . - - * decl2.c (finish_prevtable_vardecl): Support rescanning. - (finish_file): Move finish_prevtable_vardecl up to before the global - initializers are done as tdecls are initialized in the global - initializer. Also Pick up any new tdecls or vtables needed by - synthesized methods. - - * class.c (finish_struct): Simplify. We have to do rtti scanning at - end, so we might as well do all of it there. - -Tue Jan 31 05:35:02 1995 Jason Merrill - - * call.c (build_method_call): Fix -fthis-is-variable for 32-bit - targets, too. - -Tue Jan 31 00:11:04 1995 Mike Stump - - * decl2.c (finish_prevtable_vardecl): New routine, mostly split from - finish_vtable_vardecl. It has the first half functionality from - that routine. - * decl2.c (finish_vtable_vardecl): Update to not include stuff not - in finish_prevtable_vardecl. - * decl2.c (finish_file): Call finish_prevtable_vardecl. - * gc.c (build_generic_desc): Allow it to be called when not at the - global binding layer, but behave as if we were. - (build_t_desc): Rearrange a bit so that it really works and is - easier to follow. - * class.c (finish_struct): Don't decide on tdecls here, as we have - to wait until the end of the file in general to decide whether or - not they come out. - -Mon Jan 30 01:00:40 1995 Jason Merrill - - * init.c (build_delete): Check access to operator delete before - calling the destructor. - * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to - return error_mark_node. - * call.c (build_method_call): Use the one-argument op delete even if - it's an error. - - * init.c (build_new): Fix -fthis-is-variable support. - * call.c (build_method_call): Likewise. - - * call.c (convert_harshness): Make conversion from a pointer to bool - worse than conversion to another pointer. - -Sat Jan 28 16:46:10 1995 Jason Merrill - - * init.c (build_new): Check new return value if -fcheck-new. - - * lex.c (check_newline): Clear end_of_file when we're done, too. - -Sat Jan 28 10:38:39 1995 Mike Stump - - * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow - vtables whereever they go. - - * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't - right. - -Sat Jan 28 09:10:44 1995 Mike Stump - - * decl2.c (finish_vtable_vardecl): Now set the - interface/implementation of vtables on the first virtual function, - if one exists, otherwise we use the old method. This is a major win - in terms of cutting down the size of objects and executables in - terms of text space and data space. Now most of the savings that - #pragma interface/implementation gives is automatic in a fair number - of cases. - -Sat Jan 28 04:57:33 1995 Jason Merrill - - * decl.c (grokdeclarator): Discard the template parameters in a - template constructor declaration so that the function is always - named constructor_name (ctype). - - * lex.c (check_newline): Use ungetc to put back the character before - calling HANDLE_PRAGMA. - -Fri Jan 27 17:23:47 1995 Mike Stump - - * decl2.c (check_classfn): If the cname is T and fn_name is T, - make sure we still match them. - -Fri Jan 27 16:32:10 1995 Jason Merrill - - * parse.y: Add END_OF_LINE token. - - * lex.c (check_newline): Set linemode when we see a # directive, and - unset it when we're done. Turn all 'return's into 'goto skipline'. - Fix all uses of '\n', since we won't see it anymore. Put back the - character we read before checking for a sysv or target pragma. - (real_yylex): If we see an EOF in linemode, return END_OF_LINE. - (handle_sysv_pragma): Don't look at the input stream; quit when we - see an END_OF_LINE token. - - * input.c (getch): Return EOF if we're in line mode and at the end - of a line. - (put_back): Don't put back an EOF. - -Thu Jan 26 19:26:34 1995 Mike Stump - - * except.c (expand_throw): Do the newing of the exception object - before we load the type descriptor or the address so that we don't - wipe any of the values out. - -Thu Jan 26 19:20:00 1995 Mike Stump - - * except.c (init_exception_processing): Don't use r12 on the rs6000. - -Tue Jan 24 16:36:31 1995 Jason Merrill - - * decl.c (grokparms): Don't try to build up a reference at this point. - - * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR - will suffice to convert from integer_zero_node. - -Wed Jan 25 15:02:09 1995 David S. Miller - - * class.c (instantiate_type): Change error message text. - * typeck2.c (store_init_value): Likewise. - -Mon Jan 23 21:57:14 1995 Mike Stump - - * pt.c (tsubst): When we copy a node, don't forget to copy - TREE_CHAIN, we use it later. - -Mon Jan 23 03:33:47 1995 Jason Merrill - - * typeck.c (convert_for_assignment): Initialize variable before use. - -Fri Jan 20 01:17:59 1995 Jason Merrill - - * g++.c (main): Link with both libstdc++ and libg++ if called as - something ending with "g++", otherwise only libstdc++. Move -lm to - the end of the line. - -Thu Jan 19 15:43:11 1995 Jason Merrill - - * call.c (build_method_call): Don't mess with 'this' before calling - compute_conversion_costs. - -Wed Jan 18 15:40:55 1995 Jason Merrill - - * search.c (get_matching_virtual): Give line number for previous - declaration. - - * call.c (convert_harshness): Handle conversions to references - better. - - * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*. - -Wed Jan 18 15:21:38 1995 Mike Stump - - * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead, - as the TREE_CHAIN for methods will take us to the next differently - named function, DECL_CHAIN won't. - -Wed Jan 18 14:26:59 1995 Jason Merrill - - * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR. - - * decl2.c (lang_decode_option): -Wall implies -Wparentheses. - warn_parentheses defaults to 0. - - * decl.c (grokparms): Put back call to require_instantiated_type. - -Tue Jan 17 19:56:15 1995 Mike Stump - - * except.c (exception_section): Use the data section on the rs6000. - Change calling convention for named_section. - -Wed Jan 17 18:20:57 1994 Fergus Henderson - - * cp-tree.h: Make if (x=0) warn with wall - * parse.y: Make if (x=0) warn with wall - -Tue Jan 17 14:12:00 1995 Jason Merrill - - * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS, - BITS_PER_UNIT otherwise. - - * search.c (get_matching_virtual): Don't check the binfo if the - types are the same. - - * cvt.c (cp_convert): Just call truthvalue_conversion to convert to - bool. - -Mon Jan 16 13:28:48 1995 Jason Merrill - - * various: Use boolean_type_node, boolean_true_node, - boolean_false_node. - - * search.c (get_matching_virtual): Allow covariant returns that - don't require pointer adjustment. - - * typeck.c (build_conditional_expr): Don't call default_conversion - on ifexp. - - * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR. - - * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn. - -Sun Jan 15 22:17:32 1995 David Binderman - - * pt.c (do_function_instantiation): Free targs once we're done. - -Sun Jan 15 22:17:32 1995 Jason Merrill - - * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD. - (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE - for bool. - -Sat Jan 14 05:33:55 1995 Jason Merrill - - * decl2.c (finish_file): We need to mess up if there are any - variables in the list, not just if there is one with a constructor. - -Fri Jan 13 14:42:55 1995 Jason Merrill - - * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR. - (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR. - (finish_function): Trust rest_of_compilation. - - * decl2.c (finish_file): Also call functions designated as static - constructors/destructors. - - * decl.c (grokdeclarator): Allow access decls of operator functions. - (grokparms): Only do convert_for_initialization if the initializer - has a type. - (duplicate_decls): Put back push_obstacks_nochange call. - - * lex.c (real_yylex): Downgrade complaint about the escape sequence - being too large from pedwarn to warning. - - * decl.c (grokdeclarator): Don't complain about long long in system - headers. - - * lex.c (real_yylex): Handle digraphs. - -Thu Jan 12 12:17:24 1995 Jason Merrill - - * decl.c (init_decl_processing): -f{no-,}strict-prototype only - affects C linkage declarations now. - - * typeck.c (comp_target_types): Grok simple contravariant conversions. - (common_type): t1 and t2 are interchangeable. - - * various: Test return value of comp_target_types differently in - different places; it now returns -1 for a contravariant conversion - (which is fine in symmetric cases). - - (common_type): Prefer long double to double even when - they have the same precision. - - * decl.c (grokparms): Call convert_for_initialization to check - default arguments. - - * init.c (build_new): void_type_node has a size (of 0). - - * decl.c (decls_match): Also check for agreement of TREE_READONLY - and TREE_THIS_VOLATILE. - (push_class_level_binding): Properly handle shadowing of - nested tags by fields. - - * search.c (dfs_pushdecls): Likewise. - - * decl2.c (finish_file): Don't second-guess self-initialization. - - * cvt.c (convert_to_reference): Work with expr directly, rather than - a copy. - - * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs. - - * init.c (add_friend): Downgrade duplicate friend message from - pedwarn to warning. - - * decl.c (duplicate_decls): Push obstacks before calling common_type. - -Thu Jan 12 17:15:21 1995 Michael Ben-Gershon - - * except.c (push_eh_entry): Set LABEL_PRESERVE_P flag for - exception table labels. - (expand_start_all_catch): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - * except.c (make_first_label): New function. - (expand_start_all_catch): Add a call to make_first_label() before - using a label as a jump destination. - (expand_end_all_catch): Likewise. - (expand_leftover_cleanups): Likewise. - (expand_end_catch_block): Likewise. - (expand_builtin_throw): Likewise. - (expand_throw): Likewise. - * except.c: Add ARM processor support for exception handling. - -Thu Jan 12 12:17:24 1995 Jason Merrill - - (complete_array_type): Copy code from C frontend. - - * lex.c (real_yylex): Don't multiply the length of a wide string - literal by WCHAR_BYTES. - - * decl.c (pushdecl): Check for redeclaration of wchar_t here. - (duplicate_decls): Instead of here. - (define_label): Complain about a label named wchar_t. - (grokdeclarator): Complain about declarations of - operator-function-ids as non-functions. - - * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in - COMPOUND_EXPRs. - (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR. - - * lex.c (real_yylex): Don't skip whitespace when reading the next - character after ->. - -Wed Jan 11 16:32:49 1995 Mike Stump - - * except.c: Allow cc1plus to be built with native compiler on rs6000. - (expand_start_all_catch): Add assemble_external calls for various - routines we call. - (expand_leftover_cleanups): Likewise. - (expand_start_catch_block): Likewise. - (do_unwind): Likewise. - (expand_builtin_throw): Likewise. - -Wed Jan 11 01:05:42 1995 Jason Merrill - - * decl.c (pushtag): Only look for a previous decl in the current - binding level. Use explicit global scope in DECL_NESTED_TYPENAME. - - * gxx.gperf: Add __signature__ and __sigof__ keywords. - - * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It - does set flag_no_gnu_keywords and flag_operator_names. - - * lex.c (init_lex): 'overload' is not a keyword unless -traditional. - Unset extension keywords if -fno-gnu-keywords. - Allow operator names ('bitand') if -foperator-names. - Never unset 'asm'; -fno-asm only affects 'typeof'. - - * decl.c (lookup_name_real): The got_object special lookup only - applies to types. - -Tue Jan 10 18:07:51 1995 Jason Merrill - - * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set. - - * parse.y (primary): Unset got_object after all rules that use the - 'object' nonterminal. - (object): Set got_object. - - * lex.h: Declare got_object. - - * decl.c (lookup_name_real): Also lookup names in the context of an - object specified. - -Tue Jan 10 14:30:30 1995 Mike Stump - - * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node - for things that have to be added to pointers, not size_type. Cures - problems with pointer to members on Alphas. - (build_binary_op_nodefault): Likewise. - (get_delta_difference_: Likewise. - (build_ptrmemfunc): Likewise. - -Tue Jan 10 01:49:25 1995 Jason Merrill - - * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing - it. - - * typeck.c (build_component_ref): Don't build up a COMPONENT_REF - when dealing with overloaded member functions; just act like - build_offset_ref. - (commonparms): Remove misleading comment. - - * decl.c (duplicate_decls): Complain about repeated default - arguments here. - (redeclaration_error_message): Instead of here. - (pushdecl): Complain about missing default arguments here. - (grokparms): Instead of here. - (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME. - (grok_reference_init): Do not complain about missing initializer if - declared 'extern'. - - * search.c (lookup_field): Don't return a TYPE_DECL if there is a - function alternative and want_type is not set. - -Mon Jan 9 18:16:23 1995 Jason Merrill - - * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push - the decl when the type has no TYPE_NAME. - (lookup_nested_type): Don't assume that type has TYPE_NAME set. - (lookup_name_real): Call lookup_field with want_type = - prefer_type. - - * search.c (lookup_field): Handle want_type properly in the presence - of fields with the same name. - - * decl.c (set_nested_typename): Set nested name for file-scope types - to include leading ::. - (pushdecl): Set the nested typename if the decl doesn't have one, - rather than if the type's canonical decl doesn't have one. - -Mon Jan 9 03:44:33 1995 Jason Merrill - - * typeck.c (convert_for_assignment): Complain about contravariance - violation here. - (comp_target_types): Instead of here. - (build_unary_op): resolve_offset_ref before checking for a valid - type. - - * spew.c (yylex): Decrement looking_for_typename after we see a - _DEFN. - - * decl.c (pushdecl): Don't install an artificial TYPE_DECL in - IDENTIFIER_LOCAL_VALUE if we already have a decl with that name. - - * typeck.c (convert_for_assignment): Converting pointers to bool - does not need a cast. - -Sun Jan 8 18:16:45 1995 Jason Merrill - - * class.c (instantiate_type): Initialize nsubsts parm. - - * pt.c (do_function_instantiation): Likewise. - -Sat Jan 7 14:37:05 1995 Jason Merrill - - * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE && - DECL_SAVED_INSNS to determine whether or not we've seen a definition - of this function. - (instantiate_template): Likewise. - - * call.c (convert_harshness): Allow const reference binding when - called from the overloading code, but not when called from - can_convert (since it isn't a conversion). - (convert_harshness): Put back some disabled code. - -Fri Jan 6 14:10:57 1995 Jason Merrill - - * call.c (convert_harshness): There is no implicit conversion from - void* to other pointer types (unless the parameter is (void*)0). - (convert_harshness): Non-lvalues do not convert to reference types. - - * class.c (finish_struct_methods): Still set - TYPE_HAS_{INT,REAL}_CONVERSION. - - * call.c (can_convert): Don't use aggregate initialization. - - * cp-tree.h: Declare lookup_conversions. - -Thu Jan 5 21:08:00 1995 Mike Stump - - * parse.y (simple_stmt): Fix duplicate case value error messages to - be more readable. - -Wed Jan 4 16:44:19 1995 Jason Merrill - - * cvt.c (build_type_conversion): Total rewrite to use - convert_harshness instead of reproducing conversion logic here. Now - much shorter. - - * call.c (convert_harshness): Support conversions to bool. - (can_convert): Checks whether a conversion is less harsh - than USER_CODE, for build_type_conversion. - - * search.c (add_conversions): Function for passing to dfs_walk which - adds all the type conversion operators in the current type to a list. - (lookup_conversions): Calls dfs_walk with add_conversions and return - the list. - (dfs_walk): Don't require a qfn. - - * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery. - (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC. - - * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery. - (grow_method): A separate function for building onto the growing - method vector. - (finish_struct_methods): Use it. Put all type conversion operators - right after the constructors. Perhaps we should sort the methods - alphabetically? - -Mon Jan 2 14:42:58 1995 Jason Merrill - - * call.c (build_method_call): Lose another misleading shortcut. - -Fri Dec 30 17:57:30 1994 Mike Stump - - * gc.c (build_bltn_desc): Handle bool as a built-in type. - -Fri Dec 30 14:20:21 1994 Mike Stump - - * tree.c (layout_vbasetypes): Ensure that we don't loose alignment - on the complete type because of small virtual bases. - -Fri Dec 30 12:22:29 1994 Mike Stump - - * decl.c (n_incomplete): Bump n_incomplete up to int to match C - front end. - (pushdecl): Also count decls pushed that are of a type being defined - as incomplete things. - * class.c (finish_struct): Move hack_incomplete_structures up to - just after we set it as not being defined, so that the decls we - build for RTTI don't count as incomplete. - -Thu Dec 29 18:20:57 1994 Mike Stump - - * pt.c (tsubst): Fix problem with defining constructors in templated - classes with virtual bases. - -Wed Dec 28 08:31:00 1994 Mike Stump - - * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid - expressions. - * gc.c (build_typeid): Likewise. - -Thu Dec 22 17:26:33 1994 Mike Stump - - * cvt.c (build_up_reference): Fix breakage introduced on Nov 29, - don't assert on complex AGGR inits. - -Thu Dec 22 14:32:31 1994 Mike Stump - - * method.c (build_overload_value): Handle pointer to members as - template arguments. - -Thu Dec 22 13:09:07 1994 Mike Stump - - * typeck.c (unary_complex_lvalue): Don't call sorry if we know how - to do take the address of a data member for a pointer to data - member. - -Thu Dec 22 10:04:19 1994 Mike Stump - - * decl.c (grokdeclarator): Use the typedef name for linkage if the - type doesn't otherwise have a name. - - * decl2.c (grokfield): Likewise. - - * class.c (finish_struct): Since we reuse the TYPE_DECL for the - DECL_NAME of enums, structs and classes, we have to avoid trying to - put it in the TYPE_FIELDS again. - -Wed Dec 21 11:07:05 1994 Mike Stump - - * decl2.c (check_classfn): Ignore this parameter on static functions - when checking to see if we match. - -Tue Dec 20 17:47:02 1994 Mike Stump - - * typeck.c (unary_complex_lvalue): Handle address of non-left most - pointers to members by calling get_delta_difference. - -Mon Dec 19 22:40:53 1994 Mike Stump - - * decl2.c (check_classfn): Don't use decls_match yet, as it modifies - static functions to early. - -Thu Dec 19 22:37:48 1994 Mike Stump - - * method.c (make_thunk): Handle encoding of positive thunk offsets. - -Sat Dec 17 13:29:50 1994 Doug Evans - - * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets. - -Thu Dec 15 16:32:12 1994 Mike Stump - - * decl2.c (check_classfn): Use decls_match to check if this has - already been declared, as the DECL_ASSEMBLER_NAME may have been - changed via asm("new_name"). - * decl.c (decls_match): Make public. - -Thu Dec 15 15:17:55 1994 Mike Stump - - * *.[chy] (expand_aggr_init): Add fourth argument to handle - distinction between = init and (init) style of initializations. - * *.[chy] (finish_decl): Add fifth argument to handle - distinction between = init and (init) style of initializations. - -Tue Dec 13 19:16:05 1994 Mike Stump - - Fix some random `explicit' bugs. - - * cvt.c (convert_to_reference): Add third parameter to - convert_force. - (convert_force): Likewise. - * call.c (build_method_call): Likewise. - * decl2.c (setup_vtbl_ptr): Likewise. - * init.c (expand_virtual_init): Likewise. - (build_member_call): Likewise. - (build_delete): Likewise. - (build_vbase_delete): Likewise. - * typeck.c (build_component_addr): Likewise. - (build_c_cast): Likewise. - (build_modify_expr): Likewise. - * cp-tree.h (CONV_NONCONVERTING): Likewise. Add so that we can - distinguish the context in which the conversion appears. Add thrid - argument to build_c_cast. - * cvt.c (cp_convert): Pass whether or not we want to consider - non-converting constructors down to build_method_call. - * decl2.c (reparse_absdcl_as_casts): Add third argument to - build_c_cast. - * gc.c (build_m_desc): Likewise. - * init.c (build_new): Likewise. - * parse.y (expr_no_commas): Likewise. - (primary): Likewise. - * typeck.c (build_x_function_call): Likewise. - (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (build_c_cast): Likewise. - (build_ptrmemfunc): Likewise. - * typeck2.c (build_functional_cast): Likewise. - * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to - expand_aggr_init_1 as inits are converted to the destination type. - -Tue Dec 13 16:18:57 1994 Jason Merrill - - * Make-lang.in (cc1plus): Depends on c-pragma.o. - - * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o. - - * lex.c (check_newline): If the #pragma is not recognized by g++, - try machine-specific ones too. - (handle_sysv_pragma): Copied from c-lex.c. - -Mon Dec 12 23:53:06 1994 Mike Stump - - * except.c (expand_throw): Fix Dec 6th change, build_new likes a - reference better. - -Mon Dec 12 18:01:00 1994 Jason Merrill - - * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with - IS_AGGR_TYPE, since now they will not both be set on the same type. - - * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on - instantiations controlled by -fexternal-templates. - - * decl.c (duplicate_decls): Don't complain about different values of - __attribute__ ((const)) and ((noreturn)). - -Fri Dec 9 18:17:37 1994 Doug Evans - - * Makefile.in (BISONFLAGS): Delete --yacc. - (PARSE_H): Depend on $(PARSE_C), for parallel makes. - (PARSE_C): Undo last patch. - -Fri Dec 2 10:44:36 1994 Mike Stump - - * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in - y.tab.c. - -Thu Dec 8 17:39:46 1994 Jason Merrill - - * decl.c (finish_decl): Don't call obscure_complex_init for decls - of indeterminate size. - -Wed Dec 7 16:49:22 1994 Jason Merrill - - * decl.c (obscure_complex_init): Function to tweak the decl to - prevent expand_decl from tring to initialize it. - (finish_decl): Use it rather than writing the same code in three - different places. - - * parse.y (bad_parm): Stop trying to support parms without types. - -Wed Dec 7 12:06:56 1994 Mike Stump - - * decl2.c (grokfield): Make asm specs on static member functions - work. - -Tue Dec 6 15:43:20 1994 Mike Stump - - * except.c (expand_throw): Make a copy of the thrown object. - -Tue Dec 6 14:16:34 1994 Jason Merrill - - * parse.y: : Has lower precedence than =. - -Tue Dec 6 12:46:17 1994 Mike Stump - - * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace - manglings. - (grokvardecl): Add namespace into variable name. - -Tue Dec 6 11:26:55 1994 Mike Stump - - * decl2.c (current_namespace_id): New routine to transform a simple - name into a name in a namespace. - * decl.c (grokdeclarator): Use it. - * decl2.c (get_namespace_id): Find the name of the current - namespace. - (push_namespace, pop_namespace): Complete out missing - functionality. - -Mon Dec 5 17:11:51 1994 Jason Merrill - - * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may - not be defined. Fix warning message for enums and restore warning - for non-enums. - - * decl2.c (push_namespace): Dummy function. - (pop_namespace): Likewise. - (do_namespace_alias): Likewise. - (do_using_decl): Likewise. - (do_using_directive): Likewise. - - * parse.y: New token NSNAME for namespace names. - (extdef): Add namespace, using definitions. - (using_decl): New rule for using declarations. - (any_id): New rule for identifiers with any degree of scoping. - (identifier): Add NSNAME. - (notype_identifier): Likewise. - (component_decl): Add using_decl. - (nested_name_specifier): Add NSNAME SCOPE. - - * typeck.c (convert_for_assignment): Handle conversions between - enums and bool. - - * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on - FUNCTION_DECLs. - -Mon Dec 5 13:03:16 1994 Mike Stump - - * class.c (finish_struct): Give an error if one tries to declare a - bit-field's size greater than a long long, as the backend will dump. - It is not an error to declare an enum bit-field greater than its - precision. Warn if an enum bit-field is too small to hold all - its values. - -Mon Dec 5 11:41:50 1994 Mike Stump - - * typeck.c (convert_for_assignment): Use cp_convert instead of - convert so that we don't get static casts. - -Sun Dec 4 11:59:01 1994 Mike Stump - - * cvt.c (cp_convert): Don't complain about int->enum conversion if - we are doing static casts. - -Fri Dec 2 18:32:41 1994 Mike Stump - - * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs - when dumping expressions in error messages. - -Fri Dec 2 17:04:27 1994 Mike Stump - - * gc.c (build_dynamic_cast): Change interface to libg++, ensure that - the return type is the right type, and make references work. - -Fri Dec 2 16:36:43 1994 Jason Merrill - - * decl.c (poplevel): Don't be confused by function-scope - declarations of non-nested functions. - (duplicate_decls): Propagate DECL_MAIN_VARIANT. - (pushdecl): Use duplicate_decls to copy info from old decl into new - function-scope one rather than doing it here. - - * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT - of this decl, in case this is a function-scope declaration. - - * decl.c (finish_enum): Make sure that the type has the right - precision when we call fixup_*_type. - -Tue Nov 29 19:12:07 1994 Jason Merrill - - * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do - want to build up references to rvalues if possible. - (cp_convert): Stick on a NOP_EXPR when converting to the same type. - -Tue Nov 29 11:28:59 1994 Mike Stump - - * parse.y (maybe_raises): Handle throw (). - * parse.y (ansi_raise_identifier): Grok type-ids in exception - specifications. - * tree.c (build_exception_variant): Use list compare to check if - two exception specifications match. - * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error - messages. - * call.c (build_method_call): Remove TREE_RAISES. - * cvt.c (convert_to_aggr): Likewise. - * typeck.c (build_function_call_real, convert_arguments): Likewise. - * init.c (expand_aggr_init_1): Likewise. - -Tue Nov 29 09:50:39 1994 Mike Stump - - * except.c: Add support for m68k and mips exception handling - support. - -Tue Nov 29 08:48:33 1994 Mike Stump - - * except.c (expand_end_all_catch): Throw into outer context, if we - fall off end of catch handlers. - -Mon Nov 28 16:44:41 1994 Mike Stump - - * Makefile.in: Make is easier to decide where parse.[ch] will be - built. - -Thu Nov 17 20:11:24 1994 Doug Evans - - * cp/Make-lang.in (CXX_INSTALL_NAME): Use program_transform_name. - (GXX_INSTALL_NAME): Likewise. - (CXX_CROSS_NAME): Use program_transform_cross_name. - (GXX_CROSS_NAME): Likewise. - (c++.install-man): Use program_transform_name on g++.1. - (c++.uninstall): Likewise. - -Mon Nov 28 13:53:03 1994 Mike Stump - - * parse.y (THROW): Fix precedence of throw expressions. - -Mon Nov 28 13:15:16 1994 Mike Stump - - * typeck.c (build_unary_op): Allow promotions from bool to int on - unary ~. - -Sun Nov 27 00:16:21 1994 Jason Merrill - - * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for - classes when appropriate. - (build_overload_nested_name): When dealing with a function context, - use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to - avoid conflicts between local classes of the same name. - -Wed Nov 23 17:59:42 1994 Mike Stump - - * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c - (duplicate_decls, grokdeclarator), cp-tree.h: Add support for - `explicit'. - * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1, - build_type_conversion): Use LOOKUP_ONLYCONVERTING in - build_method_calls so that non-converting constructors are not used. - * call.c (build_method_call): If we shouldn't use a non-converting - constructor, then don't. - -Wed Nov 23 14:46:56 1994 Jason Merrill - - * call.c (build_method_call): Don't try to synthesize methods yet. - -Tue Nov 22 12:45:21 1994 Jason Merrill - - * pt.c (push_template_decls): Create CONST_DECLs for template - constant parameters, not VAR_DECLs. - -Sat Nov 19 15:28:31 1994 Jim Wilson - - * typeck.c (build_binary_op_nodefault): Can shorten shift only if - shift count is less than size in bits of arg0. - -Thu Nov 17 15:30:50 1994 Mike Stump - - * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new - ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not, - not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need - to add support for explicit, namespace, typename, and using, support - for the rest is already in. - -Fri Nov 4 19:04:18 1994 Mike Stump - - * gc.c (get_bad_cast_node): New routine to support compile time - throws of bad_cast. - * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile - time. - -Fri Nov 4 11:12:00 1994 Mike Stump - - * except.c: Add hppa support. - -Fri Nov 4 10:50:50 1994 Mike Stump - - * except.c: Add rs6000 support. - -Thu Nov 3 14:24:23 1994 Mike Stump - - * except.c (do_unwind): Add i[34]86 support. - -Thu Nov 3 00:10:46 1994 Jason Merrill - - * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit - instantiations. - -Wed Nov 2 15:08:24 1994 Kung Hsu - - * decl.c (finish_function): Emit types used in method parameters - into symbol table. - -Wed Nov 2 15:05:47 1994 Jason Merrill - - * pt.c (process_template_parm): Allow pointer to member function - template parameter types. - (uses_template_parms): Handle pointer to member function - CONSTRUCTORs. - - * g++.c (main): Cast first argument of bzero to (char *). - Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'. - -Mon Oct 31 14:50:48 1994 Kung Hsu - - * gc.c (build_dynamic_cast): Rewrite to make it work. - * class.c (finish_vtbls): Build more vtables if flag_rtti is on. - * class.c (modify_all_direct_vtables): Likewise. - * init.c (expand_direct_vtbls_init): Expand more vtables if - flag_rtti is on. - * decl.c (init_type_desc): Add default return. - -Tue Oct 25 17:13:09 1994 Kung Hsu - - * tree.c (debug_binfo): Get rid of the initial size entry of - vtable. - * cp-tree.h: Change flag_dossier to flag rtti, define type - descriptor type nodes. - * decl.c (init_type_desc): New function to initialize type - descriptor type nodes. - * decl.c (record_builtin_type): Change flag_dossier to flag_rtti. - * lex.c (init_lex): Likewise. - * decl.c: Change variable flag_dossier to flag_rtti. - * decl.c (duplicate_decls): Get rid initial size entry of vtable. - * decl.c (hack_incomplete_structures): Take out assert 164. - * search.c (get_abstract_virtuals_1): Likewise. - * search.c (dfs_init_vbase_pointers): Change CLASSTYPE_DOSSIER to - CLASSTYPE_RTTI. - * parse.y: Likewise. - * class.c (prepare_fresh_vtable): For virtual bases, get right - offset. - * class.c (add_virtual_function): Change flag_dossier to - flag_rtti. - * class.c (modify_one_vtable): Modify the right rtti entry. - * class.c (override_one_vtable): Get rid of size entry. - * class.c (finish_struct): Change flag_dossier to flag_rtti, and - build extra vtables, build type descriptors for polymorphic - classes. - * gc.c (build_headof): Make headof() works correctly with new - rtti. - * gc.c (build_typeid): Make this function work with new rtti. - * gc.c (get_typeid): Make this function work with new rtti. - * gc.c (build_bltn_desc): New function for new rtti. - * gc.c (build_user_desc): Likewise. - * gc.c (build_class_desc): Ditto. - * gc.c (build_ptr_desc): Ditto. - * gc.c (build_attr_desc): Ditto. - * gc.c (build_func_desc): Ditto. - * gc.c (build_ptmf_desc): Ditto. - * gc.c (build_ptmd_desc): Ditto. - * gc.c (build_t_desc): Ditto. - * gc.c: Comment out old build_t_desc, build_i_desc, build_m_desc. - -Tue Oct 25 13:37:41 1994 Jason Merrill - - * call.c (convert_harshness): Check for TREE_UNSIGNED differences - after checking for integral conversions. - -Wed Nov 30 19:13:50 1994 Mike Stump - - * Version 2.6.3 released. - -Thu Nov 17 10:56:50 1994 Jason Merrill - - * typeck2.c (build_m_component_ref): Check the basetype of the - member pointer against the main variant of the object type. - -Mon Nov 14 14:21:52 1994 Jason Merrill - - * cvt.c (convert_to_reference): Make sure that the original expr - gets its type back when converting a reference. - - * method.c (build_overload_name): Clear numeric_outputed_need_bar here. - (build_decl_overload): Instead of here. - -Tue Nov 8 17:11:24 1994 Jason Merrill - - * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a - function. - - * typeck.c (convert_for_initialization): Handle initialization from - a TARGET_EXPR. - -Sun Nov 6 01:34:24 1994 Jason Merrill - - * pt.c (lookup_nested_type_by_name): Fix list-walking logic. - (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate - TYPE_READONLY and TYPE_VOLATILE from the argument. - (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals - present in parm from arg. - (type_unification): Strip REFERENCE_TYPE from the argument type. - (unify): Don't strip REFERENCE_TYPE from the argument type. - -Sat Nov 5 22:42:15 1994 Greg McGary - - * pt.c (do_type_instantiation): Check to see if there's a - IDENTIFIER_TEMPLATE on a class before calling - instantiate_member_templates(). - -Sat Nov 12 06:35:42 1994 Mike Stump - - * Version 2.6.2 released. - -Thu Nov 3 18:48:19 1994 Paul Eggert - - * Makefile.in (spew.o, lex.o, pt.o): - Depend on $(srcdir)/parse.h, not parse.h. - -Tue Nov 1 19:19:41 1994 Mike Stump - - * Version 2.6.1 released. - -Sun Oct 23 13:19:55 1994 Jason Merrill - - * decl2.c: Declare flag_access_control. - (struct lang_f_options): Add access-control. - * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control - for the call to expand_aggr_init to copy the object out of the - pcc_struct_return slot. - * search.c (compute_access): if (!flag_access_control) return - access_public. - -Fri Oct 21 00:32:54 1994 Jason Merrill - - * lex.c (cons_up_default_function): Don't try to defer method - synthesis now. - - * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl - instead of abort, since the OSF/1 dynamic linker doesn't like to see - relocation entries for abort. - - * tree.c (array_type_nelts_total): Use sizetype, not - integer_type_node. - (array_type_nelts_top): Likewise. - -Thu Oct 20 15:48:27 1994 Mike Stump - - * decl.c (grokdeclarator): Added handling for catch parameters - (CATCHPARM). - * except.c (expand_start_catch_block): Use the new CATCHPARM context - instead of NORMAL. - * except.c (expand_throw): Don't let convert_to_reference complain - about what we are doing. - -Thu Oct 20 12:55:24 1994 Jim Wilson - - * method.c (emit_thunk): Call instantiate_virtual_regs. - -Wed Oct 19 14:15:33 1994 Mike Stump - - * except.c (expand_exception_blocks): Make sure throw code doesn't - get put in function that won't be output. - -Mon Oct 17 18:03:15 1994 Jason Merrill - - * decl.c (init_decl_processing): Make alloca a builtin. - -Thu Oct 27 21:10:25 1994 Craig Burley - - * g++.c (main): Only decrement "added" and set "library" to - NULL when "library" != NULL (just like 940829 fix). - -Mon Oct 17 15:56:11 1994 Mike Stump - - * except.c (expand_start_catch_block): Make sure the false label - gets onto the permanent obstack, as it is used for the exception - table. - -Fri Oct 14 18:54:48 1994 Mike Stump - - * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can - be set just below, use current_fndecl instead. - -Fri Oct 14 15:12:22 1994 Jason Merrill - - * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1 - with LOOKUP_SPECULATIVELY. - (expand_default_init): Abort if build_method_call returns NULL_TREE. - - * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if - the rhs is a TARGET_EXPR. - - * parse.y (left_curly): Anonymous types are not affected by #pragma - interface/implementation. - - * method.c (synthesize_method): Don't call setup_vtbl_ptr for the - default constructor if it isn't needed. - - * lex.c (cons_up_default_function): Do synthesize methods for - anonymous types if necessary. - -Thu Oct 13 17:44:55 1994 Jason Merrill - - * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0. - -Wed Oct 12 13:27:57 1994 Jason Merrill - - * typeck.c (build_modify_expr): Understand how to copy an aggregate. - - * init.c (expand_default_init): Likewise. Also remove some of the - crufty code that assumes methods will not be synthesized properly. - - * lex.c (cons_up_default_function): If the containing type has no - name, these functions should never need to be called, so just - declare them. - - * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the - bitmask for lexing character constants. - - * call.c (build_method_call): Disable code that tries to do tricky - stuff with a default parameter that is a constructor call, but - actually does other tricky stuff that breaks things. - -Wed Oct 12 16:14:01 1994 Benoit Belley - - * decl.c (finish_enum): Disable code which forces enums to be signed, - since this conflicts with their use as bitfields. type_promotes_to - handles promotion of enums of underlying unsigned types to signed - integer types. - -Wed Oct 12 13:24:03 1994 Jason Merrill - - * cvt.c (type_promotes_to): Also promote enums to long if - appropriate. - - * typeck.c (default_conversion): Don't expect type_promotes_to to - return a main variant. - -Wed Oct 12 12:19:45 1994 Jason Merrill - - * call.c (build_scoped_method_call): Don't lose side effects in the - object expression when calling a non-existent destructor. - -Fri Sep 2 19:05:21 1994 Rohan Lenard - - * call.c (build_scoped_method_call): Remove erroneous error message - when destructor call is written as a scoped call. - -Tue Oct 11 23:48:31 1994 Jason Merrill - - * various: Cast pointer arguments to bzero and bcopy to char *. - -Tue Oct 11 19:34:32 1994 Mike Stump - - * class.c (get_derived_offset): Added a type parameter to limit how - far up the CLASSTYPE_VFIELD_PARENT chain we search. - * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the - offset to put into the vtable for the this parameter, make sure we - don't offset from a parent of the DECL_CONTEXT of the function. - -Tue Oct 11 16:10:52 1994 Jason Merrill - - * pt.c (do_function_instantiation): Set DECL_EXTERNAL and - TREE_STATIC when setting DECL_INTERFACE_KNOWN. - (do_type_instantiation): Likewise. - - * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN, - DECL_EXTERNAL and TREE_STATIC as appropriate. - - * decl2.c (finish_file): Also synthesize methods that don't have - DECL_EXTERNAL set. Set interface_unknown before doing so. - - * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the - function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL. - -Mon Oct 10 00:56:53 1994 Jason Merrill - - * lex.c (cons_up_default_function): Mark methods in a template class - as template instances. Store the values of interface_unknown and - interface_only for do_pending_inlines. - (do_pending_inlines): Use them. - - * decl2.c (finish_file): If we haven't seen a definition of a - function declared static, make the decl non-PUBLIC so compile_file - can give an error. - -Sun Oct 9 02:42:29 1994 Jason Merrill - - * method.c (do_build_copy_constructor): Handle anonymous unions. - (do_build_assign_ref): Likewise. - (largest_union_member): Move from lex.c. - -Sat Oct 8 14:59:43 1994 Jason Merrill - - Re-implement g++'s vague linkage independent of TREE_PUBLIC. - * pt.c (instantiate_member_templates): Lose redundant - -fexternal-templates handling. - (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set - TREE_STATIC or DECL_INTERFACE_KNOWN. - (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead - of DECL_EXTERNAL for explicit instantiations. - (do_function_instantiation): Do the new thing. - (do_type_instantiation): Likewise. - (instantiate_template): Deal with member templates defined in a .cc - file with -fexternal-templates. - * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to - decide whether to stick builtin_throw here. - * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN - rather than TREE_PUBLIC. Generally fix rules. - (finish_file): Use DECL_INITIAL to determine whether or not a method - has been synthesized, rather than TREE_ASM_WRITTEN. - * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of - TREE_PUBLIC. - (pushdecl): Likewise. - (duplicate_decls): Likewise. Deal with DECL_DECLARED_STATIC and - DECL_INTERFACE_KNOWN. - (redeclaration_error_message): Fix checking for conflicting linkage. - (define_function): Set DECL_INTERFACE_KNOWN. - (grokfndecl): Function decls are PUBLIC until we are sure about - their linkage. Set DECL_DECLARED_STATIC as needed. - (start_function): Deal with linkage. Move pushdecl after linkage - magic. - (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines. - * cp-tree.h (lang_decl_flags): Add interface_known and - declared_static. - (DECL_INTERFACE_KNOWN): New macro. - (DECL_DECLARED_STATIC): New macro. - (DECL_PUBLIC): New macro. - - Clean up bogus use of TREE_PUBLIC. - * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it - doesn't correspond to TREE_PROTECTED and TREE_PRIVATE). - * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC. - -Wed Oct 5 13:44:41 1994 Jason Merrill - - * call.c (build_overload_call_real): Don't immediately do - array->pointer conversion. - - * pt.c (type_unification): If not passing to a reference, strip - cv-quals. Also handle array->pointer conversion. - -Tue Oct 4 17:45:37 1994 Jason Merrill - - * decl.c (grokdeclarator): Don't warn about applying const to a - const typedef or template type parameter. - - * decl2.c (finish_file): Also synthesize methods after walking the - vtables. Ugly ugly ugly. - -Mon Oct 3 15:02:41 1994 Jason Merrill - - * various: Remove lingering remnants of old exception handling code. - - * decl2.c (finish_file): Synthesize methods before walking the - vtables, so that the vtables get emitted as needed. - - * decl.c (shadow_tag): Remove obsolete code for pushing tags and - dealing with exceptions. - -Mon Oct 3 13:05:27 1994 Ian Lance Taylor - - * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS). - -Mon Oct 3 02:59:28 1994 Jason Merrill - - * decl2.c (finish_file): Fix inline handling. - -Sun Oct 2 00:21:56 1994 Jason Merrill - - * decl.c (grokdeclarator): Handle redundant scope even better. - ({push,pop}_cp_function_context): Take toplev parameter. - - * method.c (synthesize_method): Pass toplev parameter to - {push,pop}_cp_function_context depending on decl_function_context - (fndecl). - - * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the - built-in version. - - * method.c (synthesize_method): Don't be confused by __in_chrg - parameter. - - * class.c (popclass): Set C_C_D like start_function does. - - * decl.c (grokdeclarator): Handle redundant scope better. - - * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule. - (direct_notype_declarator): Likewise. - (complex_direct_notype_declarator): Remove it here. - -Sat Oct 1 21:42:18 1994 Jason Merrill - - * init.c (resolve_offset_ref): Fix types used in resolving .* - expressions. - -Sat Oct 1 15:18:49 1994 Jason Merrill - - Beginnings of work to synthesize methods only when needed. - * call.c (build_method_call): Synthesize methods as necessary - (currently never necessary). - * class.c (popclass): Don't try to set C_C_D here, as it'll end up - on the wrong obstack. - * decl.c (push_cp_function_context): Mostly copied from - push_c_function_context. - (pop_cp_function_context): Similarly. - (finish_function): Reverse order of poplevel and pop_nested_class so - that current_class_decl is restored properly. - (start_function): Likewise. - (finish_function): Add parameter 'nested'. Don't call - permanent_allocation if (nested). - * various: Pass extra parameter to finish_function. - * decl2.c (finish_file): Reorganize end-of-file inline handling, - synthesizing methods as necessary. - * lex.c (cons_up_default_function): Call mark_inline_for_output. - Only synthesize methods immediately if #pragma implementation - (currently disabled). - (do_pending_inlines): Call synthesize_method. - * method.c (synthesize_method): New function; all method synthesis - goes through here. Calls do_build_assign_ref and - do_build_copy_constructor. - (build_default_constructor): Remove. - (build_dtor): Likewise. - (build_assign_ref): Rename to do_build_assign_ref and remove stuff - done by synthesize_method. - (build_copy_constructor): Similarly. - -Thu Sep 29 16:58:52 1994 Mike Stump - - * typeck.c (c_expand_return): Use magic so the backend can fixup the - assignment into the return register, so cleanups won't clobber it. - -Thu Sep 29 13:08:50 1994 Jason Merrill - - * method.c (hack_identifier): Don't call assemble_external for - template decls. - - * decl.c (finish_decl): Also end temporary allocation if the decl in - question has a type of error_mark_node. - -Wed Sep 28 21:45:00 1994 Mike Stump - - * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure - that if the ?: was a reference type, that the subparts will be also. - -Wed Sep 28 16:14:04 1994 Brendan Kehoe - - * except.c (register_exception_table): Use Pmode, not PTRmode. - -Fri Sep 23 13:54:27 1994 Jason Merrill - - * lex.c (do_pending_inlines): Do method synthesis after the - pending_inlines have been reversed. - -Thu Sep 22 12:53:03 1994 Per Bothner - - * decl2.c (finish_file): Fix Brendan's fix: Only call - register_exception_table if there is a non-empty exception table. - -Thu Sep 22 12:03:46 1994 Brendan Kehoe - - * decl2.c (finish_file): Only do register_exception_table if - -fhandle-exceptions is being used. - -Wed Sep 21 19:01:51 1994 Per Bothner - - * except.c (output_exception_table_entry): Simplify - by using assemble_integer. - (build_exception_table): Change to return a count. - Cleanup to use standard macros, instead of hard-wired - sparc asm format. Don't make __EXCEPTION_TABLE__ global. - (register_exception_table): New function. Generate call to builtin. - * decl2.c (finish_file): Call register_exception_table. - * cp-tree.h (build_exception_table): Fix prototype. - -Wed Sep 21 13:20:42 1994 Brendan Kehoe - - * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL. - - * decl2.c (delete_sanity): Give an error at trying to delete a - function. - -Wed Sep 21 11:47:10 1994 Jason Merrill - - * lex.c (cons_up_default_function): Mark synthesized destructors - inline. - - * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as - something other than __wchar_t, complaining if -pedantic and not in - a system header. - -Tue Sep 20 09:43:28 1994 Jason Merrill - - * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos - here. - - * typeck.c (build_modify_expr): Require complete type after checking - for error_mark_node. - - * call.c (build_method_call): Print parmtypes when complaining of - ambiguous call. - - * typeck.c (build_modify_expr): Handle assignment to array from - non-array. - - * decl.c (lookup_name_real): Deal with got_scope == error_mark_node. - - * call.c (build_method_call): Don't bother with the exact match. - -Mon Sep 19 00:51:39 1994 Jason Merrill - - * init.c (expand_aggr_init): If we munge the type of the variable, - also munge the type of the initializer. - - * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER. - (init_decl_processing): Push artificial declaration of wchar_t so - people don't have to declare it before they can use it. - - * error.c (cp_line_of): Return lineno in lieu of 0. - - * typeck.c (convert_for_assignment): Handle conversion of pmfs to - int and bool. - (build_component_ref): Fold the COMPONENT_REF in case it can be - reduced. - - * typeck2.c (store_init_value): Don't pedwarn about non-constant - bracketed initializers for automatic variables. - -Sun Sep 18 10:12:12 1994 Jason Merrill - - * error.c (dump_decl): Don't say `typedef enum foo foo'. - - * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just - because they're affected by #pragma i/i. We'll deal with that when - they get instantiated. - - * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case. - - * class.c (instantiate_type): Set TREE_CONSTANT on instantiated - ADDR_EXPRs if appropriate. - - * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types. - - * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an - initializer properly. - * typeck2.c (digest_init): Likewise. - - * tree.c (cp_build_type_variant): Like c_build_type_variant, except - it uses build_cplus_array_type. - * *.c: Use cp_build_type_variant instead of c_build_type_variant. - - * pt.c (do_type_instantiation): Don't try to instantiate nested - enums. - -Tue Sep 13 10:56:58 1994 Jason Merrill - - * cvt.c (build_up_reference): Handle preincrement and predecrement - properly. - -Tue Sep 13 09:51:59 1994 Brendan Kehoe - - * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in - fact, static. - -Mon Sep 12 14:40:30 1994 Brendan Kehoe - - * decl.c (finish_decl): Lay out the rtl for DECL before doing - grok_reference_init, in case it's static. - -Mon Sep 12 12:45:38 1994 Jason Merrill - - * class.c (finish_struct): Don't synthesize constructors if the - class has a field with the same name as the class. Don't die on - classes with no constructors or destructors. Don't die if the head - and tail of the class are in different files. - - * decl.c (grokdeclarator): Don't treat a function pointer field - with the same name as the class as a constructor. - -Fri Sep 9 13:17:00 1994 Jason Merrill - - * typeck.c (build_c_cast): Pull constant values out of their - variables here. - - * decl.c (duplicate_decls): Only propagate DECL_CHAIN in - FUNCTION_DECLs and TEMPLATE_DECLs. - -Thu Sep 8 10:07:48 1994 Jason Merrill - - * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that - have it. - - * pt.c (unify): REALs and INTEGERs only unify with their own genus. - (instantiate_member_templates): Don't muck with DECL_EXTERNAL and - TREE_PUBLIC unless -fexternal-templates. - -Wed Sep 7 13:17:10 1994 Jason Merrill - - * pt.c (do_type_instantiation): Call instantiate_member_templates. - Deal with specializations. - (tsubst): Don't stick the mangled name in DECL_NAME for function - instantiations. Don't push them, either. - - * decl2.c (grokfield): Move code for generating the - DECL_ASSEMBLER_NAME for static members from here. - * method.c (build_static_name): To here. - * decl.c (grokvardecl): Call build_static_name. - (duplicate_decls): Keep old DECL_ASSEMBLER_NAME. - -Mon Sep 5 12:49:18 1994 Jason Merrill - - * call.c (build_method_call): If -Wsynth, warn when selecting - synthesized op= over user-supplied one cfront would select. - * decl2.c (lang_decode_option): Handle -Wsynth. - -Fri Sep 2 15:11:59 1994 Jason Merrill - - * decl.c (finish_enum): Overhaul to fix several bugs. - (start_enum): Disable useless code. - -Thu Sep 1 16:04:54 1994 Jason Merrill - - * typeck.c (c_expand_return): Warn about returning a reference to a - temporary. - (convert_arguments): Increment argument counter when using default - arguments, too. - -Wed Aug 31 14:29:22 1994 Jason Merrill - - * decl.c (finish_decl): If the type of decl is error_mark_node, - don't bother trying to do anything. - - * typeck.c (convert_for_initialization): If the rhs contains a - constructor call, pretend the lhs type needs to be constructed. - - * init.c (expand_default_init): If we stick the object inside the - initializer, mark the initializer used. - -Tue Aug 30 13:50:18 1994 Jason Merrill - - * method.c (build_assign_ref): Return *this; - (build_assign_ref): Fix base assignment order. - (build_copy_constructor): Fix member init order. - -Mon Aug 29 13:54:39 1994 Brendan Kehoe - - * g++.c (main): Remember to clear out SAW_SPECLANG after we see - its argument. - -Sat Aug 27 09:36:03 1994 Jason Merrill - - * method.c (build_copy_constructor): Also copy virtual bases. - -Fri Aug 26 17:05:15 1994 Jason Merrill - - * lex.c (do_pending_inlines): Clear out pending_inlines before doing - any synthesis. Also first set deja_vu on all pending_inlines. - - * method.c (build_assign_ref): Use build_member_call to invoke base - operator=, rather than build_modify_expr. And use - build_reference_type instead of TYPE_REFERENCE_TO. - (build_copy_constructor): Use TYPE_NESTED_NAME to identify the - basetype. - - * decl2.c (grokfield): Don't complain about undefined local class - methods. - - * class.c (finish_struct): Don't try to synthesize methods here. - * lex.c (do_pending_inlines): Instead, synthesize them here. - (init_lex): Initialize synth_obstack. - (cons_up_default_function): Stick synthesis request on - pending_inlines. - -Fri Aug 26 12:24:14 1994 Brendan Kehoe - - * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also - accept an RTL_EXPR in what we're about to use for the instance, - since anything which would end up with pcc_struct_return set - inside cplus_expand_expr. - - * cp-tree.h (cons_up_default_function): Note change of prototype. - -Thu Aug 25 23:05:30 1994 Gerald Baumgartner - - * class.c (finish_struct): Undid change from Aug 21 testing - CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING. - * parse.y (left_curly): Likewise, undid change from Aug 21. - * decl.c (xref_tag): Undid change from Aug 21, set - CLASSTYPE_INTERFACE correctly, and added comments. - -Thu Aug 25 00:36:31 1994 Jason Merrill - - Rework approach to synthesized methods; don't go through the parser - anymore. - * class.c (finish_struct): Use new synthesis approach. - * lex.c (cons_up_default_function): Now just creates declaration, - not code. - (largest_union_member): #if 0 out. - (default_assign_ref_body): Likewise. - (default_copy_constructor_body): Likewise. - * method.c (build_default_constructor): New function to synthesize X(). - (build_copy_constructor): Synthesize X(X&). - (build_assign_ref): Synthesize X::operator=(X&). - (build_dtor): Synthesize ~X(). - - * error.c (cp_line_of): If we're dealing with an artificial - TYPE_DECL, look at the type instead. - -Wed Aug 24 11:11:50 1994 Jason Merrill - - * init.c (sort_member_init): Check warn_reorder. - * decl2.c (lang_decode_option): Handle -W{no-,}reorder. - - * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro. - * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates. - * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE. - -Tue Aug 23 09:28:35 1994 Mike Stump - - * error.c (dump_decl): Improve wording, so that error messages - dont't read template<, class foo>... - -Mon Aug 22 15:30:51 1994 Brendan Kehoe - - * parse.y (label_colon): Also match a TYPENAME as a label name, - since they may have declared a class by that name but have also - tried to have a local label under the same name. - - * pt.c (coerce_template_parms): Call cp_error, not cp_error_at, - for the message so they know at what point it was instantiated. - -Sun Aug 21 23:07:35 1994 Gerald Baumgartner - - * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and - CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time. - * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and - CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time. - * parse.y (left_curly): New final resting place for setting - CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures. - - * class.c (finish_struct): Don't test for function/field name - conflicts in signatures, since all the fields are compiler-constructed. - -Fri Aug 19 14:04:47 1994 Kung Hsu - - * method.c (build_overload_nested_name): In qualified name - mangling, the template with value instantiation will have numeric - at end and may mixed with the name length of next nested level. - Add a '_' in between. - * method.c (build_overload_name): Ditto. - * method.c (build_overload_identifier): Ditto. - -Thu Aug 18 16:24:43 1994 Mike Stump - - * error.c (dump_decl): Handle NULL args. - -Thu Sep 29 16:15:36 1994 Michael I Bushnell - - * g++.c: Rework last change so it's done like collect.c (and - gcc.c). - -Wed Sep 14 10:17:27 1994 Michael I Bushnell - - * g++.c: Include in case `errno' is a macro - as permitted by ANSI C. - -Thu Aug 18 12:48:09 1994 Mike Stump - - * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and - CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time. - * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and - CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time. - * parse.y (left_curly): New final resting place for setting - CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING. - -Thu Aug 11 11:32:42 1994 H.J. Lu - - * g++.c (main): Only decrement "added" and set "library" to - NULL when "library" != NULL. - -Sat Aug 13 00:14:52 1994 Jason Merrill - - * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl - just because its class has a known interface. - (decls_match): Deal with new format of template parms. - - * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and - DECL_EXTERNAL here. - -Fri Aug 12 01:55:15 1994 Jason Merrill - - * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs. - (xref_defn_tag): Likewise. - (pushdecl): Only allow artificial typedefs to be shadowed. - - * init.c (emit_base_init): Pass the right binfos to - expand_aggr_init_1. - - * class.c (delete_duplicate_fields_1): Make it work right. - (finish_struct): Catch function/field name conflict. - - * decl2.c (check_classfn): Pass the function to cp_error, not just - the name. - - * init.c (sort_member_init): Warn when order of member initializers - does not match order of member declarations. - (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT. - - * error.c (dump_expr): Handle lists of functions. - - * decl.c (start_function): #pragma interface only affects functions - that would otherwise be static. - (finish_decl): Don't warn about an unused variable if it has both - constructor and destructor, since the 'resource allocation is - initialization' idiom is relatively common. - - * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs. - (comp_target_parms): Likewise. - (compparms): Never consider default parms. - (common_base_type): Don't choose a virtual baseclass if there is a - more derived class in common. - (build_conditional_expr): If pedantic, pedwarn about conversion to - common base in conditional expr. - - * class.c (instantiate_type): Handle template instantiation better. - - * typeck.c (convert_arguments): Don't try to get tricky and convert - to int directly when PROMOTE_PROTOTYPES is set, as it breaks - user-defined conversions. - - * lex.c (check_for_missing_semicolon): Also give error at end of - file. - - * call.c (build_method_call): Don't promote arrays to pointers here. - - * typeck.c (convert_arguments): Don't require the actual parameter - to be of a complete type if the formal parameter is a reference. - -Thu Aug 11 15:21:40 1994 Jason Merrill - - * decl.c (grokdeclarator): Soften 'static' on member function error - to pedwarn. - - * init.c (build_new): Don't automatically save rval. - (build_offset_ref): Do field lookup with proper basetype_path. - -Thu Aug 11 12:46:54 1994 Brendan Kehoe - - * errfn.c (cp_silent): Declare to mark when we should avoid - emitting warnings and errors. - (cp_error): Check it. - (cp_warning): Likewise. - (cp_pedwarn): Likewise. - (cp_compiler_error): Likewise. - (cp_error_at): Likewise. - (cp_warning_at): Likewise. - (cp_pedwarn_at): Likewise. - * call.c (compute_conversion_costs): Set CP_SILENT when we start - out, and make sure we turn it off before we leave. - -Thu Aug 11 00:02:54 1994 Jason Merrill - - * decl2.c (grok_array_decl): Try computing *(A+B) if neither - argument is obviously an array. - -Wed Aug 10 15:32:04 1994 Jason Merrill - - * typeck.c (c_expand_start_case): Do cleanups here. - - * parse.y (xcond): Do bool conversion here, too. - (simple_stmt, SWITCH case): Don't do cleanups here. - - * decl.c (duplicate_decls): Don't treat builtins that have been - explicitly declared specially. - -Tue Aug 9 01:16:09 1994 Jason Merrill - - * tree.c (make_deep_copy): Support copying pointer, reference, - function, array, offset and method types. - - * decl.c (init_decl_processing): Mark exit and abort as - BUILT_IN_NONANSI so that duplicate_decls is kinder about - redeclaration. - (duplicate_decls): Don't give two errors for redeclaring a C - function with the same parms but a different return type. - - * parse.y (paren_cond_or_null): Do cleanup and bool conversion here. - (condition): Instead of here. - (simple_stmt, SWITCH case): Also do cleanup here. - - * decl2.c (finish_anon_union): Only break out FIELD_DECLs. - - * call.c (build_method_call): Don't throw away the side effects of - the object in a call to a non-existent constructor. - * parse.y (primary): Likewise. - - * method.c (build_decl_overload): Oop. - - * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin, - warn about uselessness of specifying -fansi-overloading. - - * method.c (build_decl_overload): Treat any non-member new with one - parameter as __builtin_new. - - * decl.c (init_decl_processing): Setup built-in meanings of exit, - _exit and abort. - -Mon Aug 8 15:03:30 1994 Jason Merrill - - * error.c (dump_readonly_or_volatile): Put a space between const and - volatile if both apply. - - * init.c (perform_member_init): Clean up after this initialization. - (emit_base_init): Clean up after each base init, not after all have - been done. - (expand_aggr_vbase_init_1): Clean up after this init. - -Sun Aug 7 14:55:05 1994 Jason Merrill - - * call.c (build_method_call): Deal with destroying references. - - * parse.y (condition): Do bool_truthvalue_conversion here. - (paren_expr_or_null): And here. - (simple_if): Not here. - (simple_stmt): Or here. - -Sat Aug 6 22:29:45 1994 Jason Merrill - - * parse.y (paren_expr_or_null): Wrap the expression in a - CLEANUP_POINT_EXPR. - (condition): Likewise. - -Sat Aug 6 19:46:37 1994 Rohan Lenard - - * call.c (build_scoped_method_call): Fix error message when - destructor call refers to a nonexistent type. - -Sat Apr 16 22:43:30 1993 Gerald Baumgartner - - * lex.h (rid): Deleted RID_RAISES, it's never used. - Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION, - RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration, - they don't need to be touched in `grokdeclarator.' - (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE. - - * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of - RID_MAX as loop limit for finding declaration specifiers. - -Sat Apr 3 21:59:07 1993 Gerald Baumgartner - - * lex.c (debug_yytranslate): Moved to parse.y since it needs to - access `yytname,' which is static in parse.c. - -Fri Apr 2 23:36:57 1993 Gerald Baumgarnter - - * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it - was `GNU_xref_def' instead of `GNU_xref_ref.' - -Fri Aug 5 14:20:16 1994 Jason Merrill - - * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and - DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that. - (do_type_instantiation): Likewise. - - * decl2.c (import_export_inline): Decides at EOF what an inline's - linkage should be. - (finish_file): Call it. - - * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC - and DECL_EXTERNAL from do_*_instantiation. Only set - DECL_DEFER_OUTPUT on inlines whose linkage might actually change. - (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to - mark for later consideration, rather than DECL_FUNCTION_MEMBER_P. - -Fri Aug 5 01:12:20 1994 Mike Stump - - * class.c (get_class_offset_1, get_class_offset): New routine to - find the offset of the class where a virtual function is defined, - from the complete type. - * class.c (modify_one_vtable, fixup_vtable_deltas): Use - get_class_offset instead of virtual_offset as get_class_offset will - always provide the right answer. - * tree.c (virtual_offset): Remove. It only ever worked some of the - time. - -Tue Aug 2 12:44:21 1994 Jason Merrill - - * call.c (build_method_call): Put back unary_complex_lvalue call - that I thought was redundant. - - * typeck.c (c_expand_return): Fix a case I missed before. - -Sun Jul 31 17:54:02 1994 Jason Merrill - - * pt.c (unify): Strip cv-quals from template type arguments (when - 'const T*' is matched to 'const char*', that does not mean that T is - 'const char'). - -Fri Jul 29 01:03:06 1994 Jason Merrill - - * pt.c (do_type_instantiation): Instantiate nested TAGS, not - typedefs. Third time's the charm? - - * parse.y (template_parm): Support default template parms. - * pt.c (process_template_parm): Likewise. - (end_template_parm_list): Likewise. - (coerce_template_parms): Likewise. - (mangle_class_name_for_template): Likewise. - (push_template_decls): Likewise. - (unify): Likewise. - * method.c (build_overload_identifier): Likewise. - * error.c (dump_decl): Likewise. - -Wed Jul 27 17:47:00 1994 Jason Merrill - - * pt.c (do_type_instantiation): Only instantiate nested *classes*. - -Tue Jul 26 13:22:40 1994 Jason Merrill - - * search.c (note_debug_info_needed): Also emit debugging information - for the types of fields. - -Mon Jul 25 00:34:44 1994 Jason Merrill - - * pt.c (lookup_template_class): Pass 'template' to - coerce_template_parms instead of 'in_decl', since it's a more - meaningful context. - - * typeck.c (c_expand_return): Make sure any cleanups for the return - expression get run. - (build_c_cast): Use CONVERT_EXPR for conversion to void. - - * pt.c (do_type_instantiation): Also instantiate nested types. - - * typeck.c (convert_for_assignment): Don't die when comparing - pointers with different levels of indirection. - - * decl.c (grokdeclarator): The sub-call to grokdeclarator for - class-local typedefs sets DECL_ARGUMENTS, so we need to clear it - out. - - * decl2.c (finish_anon_union): Don't die if the union has no - members. - - * decl.c (grokdeclarator): Undo changes to declspecs when we're done - so that 'typedef int foo, bar;' will work. - - * decl2.c (finish_file): Don't call expand_aggr_init for - non-aggregates. - -Mon Jul 25 00:03:10 1994 Teemu Torma - - * decl.c (finish_function): We can't inline constructors and - destructors under some conditions with -fpic, but don't unset - DECL_INLINE. - -Mon Jul 25 00:03:10 1994 Jason Merrill - - * typeck.c (build_object_ref): Make sure 'datum' is a valid object. - -Sun Jul 24 14:19:31 1994 Jason Merrill - - * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on - non-fields. - (finish_struct_methods): Use copy_assignment_arg_p. - - * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead - of giving an error. - - * typeck.c (build_binary_op_nodefault): Don't set result_type if we - don't know how to compare the operands. - - * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op' - as a declarator-id in their program. Like the Linux headers do. - Arrgh. - - * tree.c (lvalue_p): Treat calls to functions returning objects by - value as lvalues again. - - * typeck.c (build_component_addr): Use convert_force to convert the - pointer in case the component type is also a private base class. - - * search.c (get_matching_virtual): Fix bogus warning of overloaded - virtual. - - * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created - TYPE_DECL to fix bogus shadowing warnings. - -Fri Jul 22 01:15:32 1994 Jason Merrill - - * init.c (expand_aggr_init_1): const and volatile mismatches do not - prevent a TARGET_EXPR from initializing an object directly. - -Tue Jul 19 17:55:37 1994 Jason Merrill - - * cvt.c (build_up_reference): Allow building up references to - `this', don't warn about making references to artificial variables - (like `this'). - - * tree.c (lvalue_p): `this' is not an lvalue. - - * call.c (build_method_call): Accept using a typedef name (or - template type parameter) for explicit destructor calls. - -Thu Jul 14 09:42:23 1994 Mike Stump - - * Version 2.6.0 released. - -Wed Jul 13 03:57:54 1994 Jason Merrill - - * method.c (hack_identifier): Put back old code so lists of - non-functions will be handled properly. - - * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now - defined in the language-independent tree.h. - - * tree.c (count_functions): Avoid bogus warning when compiling this - function. - -Mon Jul 11 18:37:20 1994 Jason Merrill - - * decl.c (grok_reference_init): Always save the initializer of a - reference. - -Fri Jul 8 17:41:46 1994 Mike Stump - - * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside - CLEANUP_POINT_EXPRs so that the stack slots can be reused. - (disabled for now) - -Fri Jul 8 12:59:38 1994 Jason Merrill - - * method.c (hack_identifier): Fix for new overloading. - - * typeck.c (build_binary_op_nodefault): Don't mess with division by - zero. - -Fri Jul 8 13:20:28 1994 Gerald Baumgartner - - * decl2.c (finish_file): Only call walk_sigtables, if - flag_handle_signatures is turned on, don't waste time otherwise. - -Fri Jul 8 02:27:41 1994 Jason Merrill - - * decl.c (push_overloaded_decl): Don't create overloads of one when - shadowing a class type. - * typeck.c (build_x_function_call): Complain about overloads of one. - - * decl.c (grokdeclarator): Don't try to treat a char* as a tree. - (grokdeclarator): Fix setting of TREE_STATIC. - (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls. - -Thu Jul 7 22:20:46 1994 Gerald Baumgartner - - * cp-tree.h (walk_sigtables): Created extern declaration. - * decl2.c (walk_sigtables): Created function, patterned after - walk_vtables, even though we only need it to write out sigtables. - (finish_sigtable_vardecl): Created function. - (finish_vtable_vardecl): Changed 0 to NULL_PTR. - (finish_file): Call walk_sigtables. - - * sig.c (build_signature_table_constructor): Mark class member - function pointed to from signature table entry as addressable. - -Thu Jul 7 13:39:37 1994 Jason Merrill - - * decl.c (start_decl): Check new decl of static member variable - against the declaration in the class here. - (grokvardecl): Instead of here. - - * class.c (prepare_fresh_vtable): Call import_export_vtable if not - -fvtable-thunks. - (build_vtable): Likewise. - - * decl2.c (import_export_vtable): Move logic for deciding the - interface of a template class from here. - (import_export_template): To here. - (finish_vtable_vardecl): Call import_export_template before - import_export_vtable. - -Wed Jul 6 20:25:48 1994 Mike Stump - - * except.c (init_exception_processing): Setup interim_eh_hook to - call lang_interim_eh. - * except.c (do_unwind): Propagate throw object value across - stack unwinding. - * except.c (saved_throw_value): Used to hold the value of the object - being thrown. It is always a reference to the real value. - * except.c (expand_start_catch_block): Add handling for the - value of the exception object. - * except.c (expand_start_catch_block): Add handler for the handler, - so that throws inside the handler go to the outer block. - * except.c (expand_end_catch_block): Likewise. - * parse.y (handler_args): Use parm instead, as the other doesn't yet - handle references correctly. - -Wed Jul 6 17:55:32 1994 Per Bothner - - * decl2.c (mark_vtable_entries): If -ftable-thunks, set the - vtable entry properly to abort. - -Tue Jul 5 14:07:54 1994 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Downgrade division by zero - errors to warnings. - - * call.c (build_overload_call_real): Handle fnname being a list of - functions. - * typeck.c (build_x_function_call): Pass list of functions to - build_overload_call, not just the name. - * tree.c (count_functions): Complain when called for invalid - argument. - - * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC - and DECL_EXTERNAL on static members and initialized const members. - * decl2.c (grokfield): Reflect this change. - -Fri Jul 1 09:35:51 1994 Jason Merrill - - * parse.y (init): ANSI C++ does not forbid { }. - -Thu Jun 30 00:35:22 1994 Jason Merrill - - * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall. - warn_nonvdtor defaults to off. - - * class.c (instantiate_type): Use comptypes rather than relying on - types to satisfy ==. - - * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that - might be static. - - * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs. - - * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs. - - * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of - build_cplus_new. - -Wed Jun 29 22:31:09 1994 Jason Merrill - - * decl2.c (finish_file): Maybe consider static inlines multiple - times, in case they reference each other. - -Tue Jun 28 11:58:38 1994 Gerald Baumgartner - - * class.c (finish_struct): Don't `cons_up_default_function's - for signatures. - (finish_struct): Handle an empty method_vec correctly. - - * decl.c (grokdeclarator): Don't warn about a signature being - empty in a signature pointer declaration if we only saw a - forward declaration of the signature. Changed `warning's into - `cp_warning's. - - * sig.c (build_sigtable): Don't die if a null signature table - constructor is returned. - (build_signature_pointer_constructor): If the signature table - constructor is null, the _sptr field is set to a null pointer - and cast to the appropriate type. Make copies of all null - pointers so that the type null_pointer_node doesn't get changed. - (build_signature_table_constructor): Added comments. - - * sig.c (build_signature_pointer_constructor): Complain if we - try to assign to/initialize a signature pointer/reference of - an undefined signature. - -Mon Jun 27 14:05:16 1994 Gerald Baumgartner - - * typeck2.c (store_init_value): Don't be pedantic about - non-constant initializers of signature tables/pointers/references. - -Fri Jun 24 16:49:41 1994 Gerald Baumgartner - - * decl.c (grokdeclarator): If we are grokking an opaque typedef - in a signature, don't complain about it begin static. - -Wed Jun 29 16:44:45 1994 Mike Stump - - Fixes a problem of the this pointer being wrong in virtual calls to - methods that are not overridden in more derived classes. - - * class.c (fixup_vtable_delta): New routine. It will fixup the - delta entries in vtables, wheever they need updating. - * class.c (finish_struct): Call the new routine for all virtual - bases, as they can have different offsets, than those used in base - classes that we derive our vtable from. - -Tue Jun 28 23:49:28 1994 Jason Merrill - - * typeck.c (build_binary_op): Use the types before default - conversions in the error message. - - * *.c: Use c_build_type_variant instead of build_type_variant where - the type might be an array. - - * call.c (build_method_call): Call build_type_variant and - build_reference_type in the right order. - * decl.c (record_builtin_type): Likewise. - -Wed Jun 29 16:58:53 1994 Jason Merrill - - * call.c (build_method_call): Call build_type_variant and - build_reference_type in the right order. - * decl.c (record_builtin_type): Likewise. - -Tue Jun 28 23:49:28 1994 Jason Merrill - - * typeck.c (build_binary_op): Use the types before default - conversions in the error message. - - * *.c: Use c_build_type_variant instead of build_type_variant where - the type might be an array. - -Sat Jun 25 11:50:54 1994 Jason Merrill - - * cvt.c (convert_to_reference): Try UDC's before doing the - reinterpret_cast thang, though. - -Fri Jun 24 01:24:01 1994 Jason Merrill - - * typeck.c (c_expand_return): Don't USE the return value location - after we've expanded the jump. - - * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before - trying to write out an inline. - - * cvt.c (build_up_reference): Also do address adjustment when the - target type uses MI. - (convert_to_reference): Try UDCs only after built-in conversions. - (build_type_conversion_1): Don't play games with the argument to the - method. - (build_type_conversion): #if 0 out code for binding to reference. - -Thu Jun 23 00:22:28 1994 Jason Merrill - - * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide - whether to emit inlines. - - * decl.c (grokdeclarator): Set explicit_int for decls that just - specify, say, 'long'. - - * init.c (do_friend): Do overload C functions (or call pushdecl, - anyaway). - -Wed Jun 22 13:40:49 1994 Jason Merrill - - * cvt.c (build_up_reference): Don't call readonly_error. - (convert_to_reference): Propagate const and volatile from expr to - its type. - - * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues. - - * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when - creating a temporary. - (convert_to_reference): Lose excessive and incorrect trickiness. - (cp_convert): Call build_cplus_new with with_cleanup_p set. - - * typeck2.c (build_functional_cast): Likewise. - -Tue Jun 21 17:38:38 1994 Jason Merrill - - * decl.c (grokdeclarator): signed, unsigned, long and short all - imply 'int'. - - * decl.c (grokdeclarator): Allow "this is a type" syntax. - (grok_reference_init): Simplify and fix. - -Sun Jun 19 17:08:48 1994 Jason Merrill - - * decl.c (grokdeclarator): pedwarn about a typedef that specifies no - type. - -Sat Jun 18 04:16:50 1994 Jason Merrill - - * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL - tinkering to after call to pushdecl. - -Fri Jun 17 14:48:28 1994 Jason Merrill - - * call.c (build_method_call): Handle destructors for non-aggregate - types properly. - -Thu Jun 16 16:48:05 1994 Jason Merrill - - * call.c (build_method_call): Make sure that the name given for the - destructor matches the constructor_name of the instance. - - * pt.c (do_function_instantiation): A non-extern instantiation - overrides a later extern one. - (do_type_instantiation): Likewise. - -Wed Jun 15 19:34:54 1994 Jason Merrill - - * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the - unqualified array type. - - * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a - CONSTRUCTOR with no elements. - - * decl.c (various): Lose empty_init_node. - (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR - thing depending on the value of DECL_COMMON instead of - flag_conserve_space, do the empty CONSTRUCTOR thing for types that - don't have constructors, don't treat a real empty CONSTRUCTOR - specially. - - * typeck2.c (process_init_constructor): Don't treat empty_init_node - specially. - -Wed Jun 15 19:05:25 1994 Mike Stump - - * class.c (override_one_vtable): Don't forget to merge in an old - overrider when we wanted to reuse a vtable, but couldn't. - -Wed Jun 15 15:03:16 1994 Jason Merrill - - * decl.c (start_decl): Put statics in common again. - - * decl.c (grokdeclarator): Return NULL_TREE for an error rather than - setting the type to error_mark_node. - - * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum - bitfield assignments. - -Tue Jun 14 12:23:38 1994 Jason Merrill - - * decl.c (grok_op_properties): Const objects can be passed by value. - -Mon Jun 13 03:10:59 1994 Jason Merrill - - * decl2.c (import_export_vtable): Force implicit instantiations to - be interface_only when -fno-implicit-templates. - - * decl.c (duplicate_decls): Redeclaring a class template name is an - error. - - * pt.c (end_template_decl): Call GNU_xref_decl for class templates. - * xref.c (GNU_xref_decl): Support templates. - -Sat Jun 11 17:09:05 1994 Jason Merrill - - * decl.c (grok_op_properties): Split out checking for whether this - function should suppress the default assignment operator. - * decl2.c (grok_function_init): Likewise. - (copy_assignment_arg_p): New function to do just that. - Now considers virtual assignment operators that take a base as an - argument to count as copy assignment operators. - - * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and - TREE_ASM_WRITTEN, as they are redundant. - - * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a - decl that has no LANG_SPECIFIC part. - (do_type_instantiation): Force the debugging information for this - type to be emitted. - - * decl.c (start_decl): Clear up uses of various types of templates - (say sorry for static data members, rather than "invalid template"). - (expand_static_init): Fix initialization of static data members of - template classes. - -Fri Jun 10 00:41:19 1994 Jason Merrill - - * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members. - - * g++.c (main): Use -xc++-cpp-output for .i files. - - * pt.c (tsubst): Give meaningful error about declaring template for - a copy constructor which was not declared in the class template. - (do_type_instantiation): Explicit instantiation before the class - template is an error. - (instantiate_template): Don't die if tsubst returns error_mark_node. - -Thu Jun 9 19:04:59 1994 Jason Merrill - - Don't synthesize the copy assignment operator if the one in a base - class is pure virtual. - * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate - whether the type has a pure virtual copy assignment operator. - * class.c (finish_base_struct): Don't generate the copy assignment - operator if a base class has a pure virtual one. - * decl.c (grok_op_properties): Add disabled code to set - TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is - actually set. - * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF. - - * decl2.c (import_export_vtable): Always treat template - instantiations as if write_virtuals >= 2, and treat implicit - instantiations as external if -fno-implicit-templates. - (finish_file): Output all pending inlines if - flag_keep_inline_functions. - -Wed Jun 8 20:48:02 1994 Mike Stump - - * tree.c (layout_vbasetypes): Align virtual base classes inside - complete objects, so that we don't core dump on machines such as - SPARCs when we access members that require larger than normal - alignments, such as a double. Also, we bump up the total alignment - on the complete type, as necessary. - -Wed Jun 8 16:18:14 1994 Jason Merrill - - * gxxint.texi (Free Store): New section with code for examining - cookie. - (Limitations of g++): Remove operator delete entry, since it is no - longer accurate. Fix access control entry. - - * typeck.c (build_unary_op): Pedwarn about taking the address of or - incrementing a cast to non-reference type. - (build_modify_expr): Use convert instead of convert_force again. - - * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for - class type, not == RECORD_TYPE. - - * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE. - - * typeck2.c (report_case_error): #if 0 out. - * lex.c (real_yylex): Lose RANGE. - * parse.y: Likewise. - -Tue Jun 7 18:17:35 1994 Jason Merrill - - * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE. - -Mon Jun 6 19:39:57 1994 Jason Merrill - - * typeck.c (build_c_cast): Don't shortcut conversions to the same - type. Don't replace consts with their values here, since that's now - done in cp_convert. - - * cvt.c (cp_convert): When converting to bool, take - integer_zero_node to false_node and all other INTEGER_CSTs to - true_node. - (build_type_conversion): Don't complain about multiple conversions - to float if we're not really converting. - -Fri Jun 3 02:10:56 1994 Jason Merrill - - Implement 'extern template class A;' syntax for suppressing - specific implicit instantiations. - * cp-tree.h: Update prototypes for do_*_instantiation. - * pt.c (do_pending_expansions): Don't compile 'extern' explicit - instantiations. - (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit - instantiations. - (do_type_instantiation): Likewise. - * parse.y (explicit_instantiation): Support 'extern template class - A;' syntax. - * decl.c (start_function): Don't modify the settings of TREE_PUBLIC - and DECL_EXTERNAL on explicit instantiations. - - * cvt.c (cp_convert): Replace constants with their values before - converting. - (cp_convert): Consistently use 'e' instead of 'expr'. - -Thu Jun 2 03:53:30 1994 Jason Merrill - - * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first. - -Wed Jun 1 18:57:35 1994 Jason Merrill - - * typeck2.c (digest_init): Handle initializing a pmf with an - overloaded method. - * typeck.c (build_ptrmemfunc): Handle overloaded methods. - - * decl.c (pushtag): Use build_decl to make TYPE_DECLs. - (xref_defn_tag): Likewise. - * pt.c (process_template_parm): Likewise. - (lookup_template_class): Likewise. - (push_template_decls): Likewise. - (instantiate_class_template): Likewise. - (create_nested_upt): Likewise. - * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on - TYPE_DECLs. - - * typeck.c (convert_arguments): Make sure type is not NULL before - checking its TREE_CODE. - -Wed Jun 1 17:40:39 1994 Mike Stump - - * class.c (get_derived_offset): New routine. - * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and - BINFO_VIRTUALS when we choose a new base class to inherit from. - * class.c (modify_one_vtable): Use get_derived_offset to get the - offset to the most base class subobject that we derived this binfo - from. - * class.c (finish_struct): Move code to calculate the - DECL_FIELD_BITPOS of the vfield up, as we need might need it for - new calls to get_derived_offset in modify_one_vtable. - -Wed Jun 1 16:50:59 1994 Jason Merrill - - * init.c (build_member_call): Use build_pointer_type instead of - TYPE_POINTER_TO. - -Wed Jun 1 11:11:15 1994 Brendan Kehoe - - * decl.c (grokdeclarator): Make sure we have a DNAME set before we - try to use it in an error. - -Wed Jun 1 09:48:49 1994 Mike Stump - - * typeck.c (convert_arguments, convert_for_initialization): Don't - strip NOP_EXPRs, when we are converting to a reference. - -Wed Jun 1 01:11:38 1994 Jason Merrill - - * typeck.c (build_modify_expr): Don't dereference references when - initializing them. - - * decl2.c (grokfield): Don't check for grokdeclarator returning - error_mark_node any more. - - * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node. - (start_method): Return void_type_node instead of error_mark_node. - - * typeck.c (build_modify_expr): Resolve offset refs earlier. - -Tue May 31 16:06:58 1994 Jason Merrill - - * call.c (build_method_call): Resolve OFFSET_REFs in the object. - - * typeck.c (build_modify_expr): Dereference references before trying - to assign to them. - - * call.c (build_method_call): Don't confuse type conversion - operators with constructors. - * typeck2.c (build_functional_cast): Just call build_c_cast if there - was only one parameter. - * method.c (build_typename_overload): Don't set - IDENTIFIER_GLOBAL_VALUE on these identifiers. - * decl.c (grok_op_properties): Warn about defining a type conversion - operator that converts to a base class (or reference to it). - * cvt.c (cp_convert): Don't try to use a type conversion operator - when converting to a base class. - (build_type_conversion_1): Don't call constructor_name_full on an - identifier. - * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory. - - * decl.c (start_decl): Don't complain that error_mark_node is an - incomplete type. - (finish_decl): Check for type == error_mark_node. - -Mon May 30 23:38:55 1994 Jason Merrill - - * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit - instantiations and inline members. - - * spew.c (yylex): Set looking_for_template if the next token is a '<'. - - * lex.h: Declare looking_for_template. - - * decl.c (lookup_name_real): Use looking_for_template to arbitrate - between type and template interpretations of an identifier. - -Sat May 28 04:07:40 1994 Jason Merrill - - * pt.c (instantiate_template): Zero out p if we found a - specialization. - - * decl.c (grokdeclarator): Elucidate warning. - (grokdeclarator): If pedantic AND -ansi, complain about long long. - - Make explicit instantiation work reasonably. It is now appropriate - to deprecate the use of -fexternal-templates. - * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or - DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate. - (end_template_instantiation): Reflect changes in USE_TEMPLATE - semantics. - (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0); - (do_function_instantiation): Don't set EXPLICIT_INST if - flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN - appropriately otherwise. - (do_type_instantiation): Set interface info for class. Set - TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if - flag_external_templates is set. - * parse.y: Reflect changes in USE_TEMPLATE semantics. - * decl2.c: New flag flag_implicit_templates determines whether or - not implicit instantiations get emitted. This flag currently - defaults to true, and must be true for -fexternal-templates to work. - (finish_file): Consider flag_implement_inlines when - setting DECL_EXTERNAL. Consider flag_implicit_templates when - deciding whether or not to emit a static copy. - * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL - properly for template instantiations. - (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a - template class. - * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics. - (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs. - (various others): Accessor macros for the above. - -Fri May 27 13:57:40 1994 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Division by constant zero is - an error. - -Fri May 27 13:50:15 1994 Mike Stump - - * class.c (override_one_vtable): Don't modify things we don't own. - -Fri May 27 01:42:58 1994 Jason Merrill - - * decl.c (finish_decl): Don't postpone processing the initializer of - a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a - PUBLIC const at toplevel. - (grokdeclarator): pedwarn about initializing non-const or - non-integral statics in the class body. - - * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a - TYPE_DECL. - - * call.c (convert_harshness): Dereference reference on rhs before - proceeding, properly grok passing const things to non-const - references. - - * typeck.c (build_unary_op): Soften error about taking the address - of main() to a pedwarn. - - * lex.c (default_copy_constructor_body): Unambiguously specify base - classes (i.e. A((const class ::A&)_ctor_arg) ). - (default_assign_ref_body): Likewise. - -Thu May 26 13:13:55 1994 Gerald Baumgartner - - * decl2.c (grokfield): Don't complain about local signature - method declaration without definition. - - * call.c (convert_harshness): If `type' is a signature pointer - and `parmtype' is a pointer to a signature, just return 0. We - don't really convert in this case; it's a result of making the - `this' parameter of a signature method a signature pointer. - - * call.c (build_method_call): Distinguish calling the default copy - constructor of a signature pointer/reference from a signature - member function call. - -Thu May 26 12:56:25 1994 Jason Merrill - - * decl2.c (grokfield): Don't set TREE_PUBLIC on member function - declarations. - - * decl.c (duplicate_decls): A previous function declaration as - static overrides a subsequent non-static definition. - (grokdeclarator): Don't set TREE_PUBLIC on inline method - declarations. - -Wed May 25 14:36:38 1994 Jason Merrill - - * decl.c (grokdeclarator): Handle initialization of static const - members. - (finish_decl): Likewise. - - * decl2.c (grokfield): Allow initialization of static const members - even when pedantic. - - * decl2.c (grokfield): Deal with grokdeclarator returning - error_mark_node. - - * decl.c (grok_ctor_properties): Return 0 for A(A) constructor. - (grokfndecl): Check the return value of grok_ctor_properties. - (start_method): Likewise. - - * parse.y (absdcl): Expand type_quals inline. - -Tue May 24 19:10:32 1994 Jason Merrill - - * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a - RECORD_TYPE. - -Tue May 24 18:09:16 1994 Per Bothner - - * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks, - always use "__vt_%s". - * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals - when looking for a "sentinal" method (to decide on emitting vtables). - * decl2.c (finish_file): Scan all decls for thunks that need - to be emitted. - * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk. - * method.c (make_thunk): Use a more meaningful label. If there - exists a matching top-level THUNK_DECL re-use it; otherwise - create a new THUNK_DECL (and declare it). - * method.c (emit_thunk): Make thunk external/public depending - on the underlying method. - -Tue May 24 00:22:04 1994 Jason Merrill - - * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not - lookup_name. - - * call.c (build_overload_call_real): Don't immediately pick a - function which matches perfectly. - - * decl.c (grokdeclarator): Use c_build_type_variant for arrays. - (grokdeclarator): Warn about, and throw away, cv-quals attached to a - reference (like 'int &const j'). - - * typeck.c (convert_arguments): Don't mess with i for methods. - * call.c (build_method_call): Pass the function decl to - convert_arguments. - - * typeck.c (comp_ptr_ttypes_real): New function. Implements the - checking for which multi-level pointer conversions are allowed. - (comp_target_types): Call it. - (convert_for_assignment): Check const parity on the ultimate target - type, too. And make those warnings pedwarns. - -Mon May 23 14:11:24 1994 Jason Merrill - - * error.c (dump_char): Use TARGET_* for character constants. - -Mon May 23 13:03:03 1994 Brendan Kehoe - - * tree.c (debug_no_list_hash): Make static. - - * decl.c (decls_match): Say the types don't match if newdecl ends up - with a null type, after we've checked if olddecl does. - (pushdecl): Check if the decls themselves match before looking for - an extern redeclared as static, to avoid inappropriate and incorrect - warnings. - -Fri May 20 14:04:34 1994 Jason Merrill - - * decl.c (grokdeclarator): Make warning about duplicate short, etc. - a pedwarn. - - * typeck.c (build_c_cast): Casting to function or method type is an - error. - - * class.c (finish_struct): Make warning for anonymous class with no - instances a pedwarn. - - * Makefile.in (stamp-parse): Expect a s/r conflict. - - * typeck.c (build_modify_expr): pedwarn about using a non-lvalue - cast as an lvalue. - -Thu May 19 12:08:48 1994 Jason Merrill - - * cvt.c (type_promotes_to): Make sure bool promotes to int rather - than unsigned on platforms where sizeof(char)==sizeof(int). - -Wed May 18 14:27:06 1994 Jason Merrill - - * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to - another variant. - (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky - and treat them as lvalues. - - * decl.c (shadow_tag): Do complain about forward declarations of - enums and empty declarations. - * parse.y: Don't complain about forward declarations of enums and - empty declarations. - - * typeck.c (convert_for_assignment): Complain about changing - the signedness of a pointer's target type. - - * parse.y (stmt): Move duplicated code for checking case values from - here. - * decl2.c (check_cp_case_value): To here. And add a call to - constant_expression_warning. - - * typeck.c (convert_for_assignment): Don't complain about assigning - a negative value to bool. - - * decl.c (init_decl_processing): Make bool unsigned. - - * class.c (finish_struct): Allow bool bitfields. - -Wed May 18 12:35:27 1994 Ian Lance Taylor - - * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp. - -Wed May 18 03:28:35 1994 Jason Merrill - - * cvt.c (build_type_conversion): Lose special handling of - truthvalues. - - * search.c (dfs_pushdecls): Improve shadowing warning. - -Tue May 17 13:34:46 1994 Jason Merrill - - * init.c (build_delete): Throw away const and volatile on `this'. - - * decl.c (finish_enum): Put the constants in TYPE_VALUES again, - rather than the enumerators. - (pushtag): s/cdecl/c_decl/g - -Mon May 16 23:04:01 1994 Stephen R. van den Berg - - * cp/typeck.c (common_type): Attribute merging. - (comp_types): Utilize COMP_TYPE_ATTRIBUTES macro. - - * cp/parse.y: Revamp attribute parsing. - -Mon May 16 01:40:34 1994 Jason Merrill - - * decl.c (shadow_tag): Also check for inappropriate use of auto and - register. - - * method.c (build_overload_name): Clarify that the illegal case is a - pointer or reference to array of unknown bound. - - * error.c (dump_type_prefix): Print references to arrays properly. - - * typeck.c (various): Be more helpful in pointer - comparison diagnostics. - - * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this - fun? - - * parse.y: Also catch an error after valid stmts. - - * search.c (dfs_init_vbase_pointers): Don't abort because `this' is - const. - - * typeck.c (convert_for_initialization): If call to - convert_to_reference generated a diagnostic, print out the parm - number and function decl if any. - - * errfn.c (cp_thing): Check atarg1 to determine whether or not we're - specifying a line, not atarg. - - * tree.c (build_cplus_method_type): Always make `this' const. - - * decl2.c (grokclassfn): If -fthis-is-variable and this function is - a constructor or destructor, make `this' non-const. - - * typeck.c (build_modify_expr): Don't warn specially about - assignment to `this' here anymore, since it will be caught by the - usual machinery. - - * various: Disallow specific GNU extensions (variable-size arrays, - etc.) when flag_ansi is set, not necessarily when pedantic is set, - so that people can compile with -pedantic-errors for tighter const - checking and such without losing desirable extensions. - - * typeck2.c (build_functional_cast): Call build_method_call with - LOOKUP_PROTECT. - (process_init_constructor): Only process FIELD_DECLs. - - * decl.c (finish_decl): Also force static consts with no explicit - initializer that need constructing into the data segment. - - * init.c (build_delete): Undo last patch, as it interferes with - automatic cleanups. - -Sat May 14 01:59:31 1994 Jason Merrill - - * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading - code. - - * init.c (build_delete): pedwarn about using plain delete to delete - an array. - -Fri May 13 16:45:07 1994 Jason Merrill - - * typeck.c (comp_target_types): Be more helpful in contravariance - warnings, and make them pedwarns. - - * decl.c (grokdeclarator): Use decl_context to decide whether or not - this is an access declaration. - - * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it - has a conversion to enum or bool, too. - -Fri May 13 16:31:27 1994 Mike Stump - - * method.c (emit_thunk): Make declaration for - current_call_is_indirect local (needed for hppa). - -Fri May 13 16:16:37 1994 Jason Merrill - - * pt.c (uses_template_parms): Grok BOOLEAN_TYPE. - (tsubst): Likewise. - -Fri May 13 16:23:32 1994 Mike Stump - - * pt.c (tsubst): If there is already a function for this expansion, - use it. - * pt.c (instantiate_template): Likewise. - -Fri May 13 10:30:42 1994 Brendan Kehoe - - * parse.y (implicitly_scoped_stmt, simple_stmt case): Use - kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid - generating debug info for unemitted symbols on some systems. - - * cp-tree.h (build_static_cast, build_reinterpret_cast, - build_const_cast): Add declarations. - -Fri May 13 09:50:31 1994 Mike Stump - - * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27 - fix. We now try get_binfo, and if that doesn't find what we want, - we go back to the old method, which still sometimes fails. - -Fri May 13 01:43:18 1994 Jason Merrill - - * parse.y (initdcl): Call cplus_decl_attributes on the right - variable. - * decl2.c (cplus_decl_attributes): Don't call decl_attributes for - void_type_node. - - * typeck.c (build_binary_op_nodefault): Change result_type for - comparison ops to bool. - (build_binary_op): Convert args of && and || to bool. - * cvt.c (build_default_binary_type_conversion): Convert args of && - and || to bool. - (build_default_unary_type_conversion): Convert arg of ! to bool. - (type_promotes_to): bool promotes to int. - -Fri May 13 01:43:18 1994 Mike Stump - - Implement the new builtin `bool' type. - * typeck.c (build_binary_op_nodefault): Convert args of && and || to - bool. - (build_unary_op): Convert arg of ! to bool. - * parse.y: Know true and false. Use bool_truthvalue_conversion. - * method.c (build_overload_value): Know bool. - (build_overload_name): Likewise. - * lex.c (init_lex): Set up RID_BOOL. - * gxx.gperf: Add bool, true, false. - * error.c (*): Know bool. - * decl.c (init_decl_processing): Set up bool, true, false. - * cvt.c (cp_convert): Handle conversion to bool. - (build_type_conversion): Likewise. - * *.c: Accept bool where integers and enums are accepted (use - INTEGRAL_CODE_P macro). - -Thu May 12 19:13:54 1994 Richard Earnshaw - - * g++.c: Use #ifdef for __MSDOS__, not #if. - -Thu May 12 18:05:18 1994 Mike Stump - - * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps - gives old behavior , and destroys temporaries earlier. Default - behavior now conforms to the ANSI working paper. - -Thu May 12 14:45:35 1994 Jason Merrill - - * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue. - Use convert_force to convert the result of a recursive call when we - are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs - in COMPOUND_EXPRs any more. - (various): Lose pedantic_lvalue_warning. - (unary_complex_lvalue): Understand MODIFY_EXPR. - - * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if - we don't know what we're initializing. - -Wed May 11 01:59:36 1994 Jason Merrill - - * cvt.c (convert_to_reference): Modify to use convtype parameter. - Only create temporaries when initializing a reference, not when - casting. - (cp_convert): New main function. - (convert): Call cp_convert. - * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference. - * cp-tree.h (CONV_*): New constants used by conversion code for - selecting conversions to perform. - - * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues. - - * typeck.c (build_{static,reinterpret,const_cast): Stubs that just - call build_c_cast. - * parse.y: Add {static,reinterpret,const}_cast. - * gxx.gperf: Likewise. - - * typeck.c (common_type): Allow methods with basetypes of different - UPTs. - (comptypes): Deal with UPTs. - (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR. - - * pt.c (end_template_decl): Check for multiple definitions of member - templates. - - * call.c (build_method_call): Complain about calling an abstract - virtual from a constructor. - - * typeck.c (pointer_int_sum): Check for the integer operand being 0 - after checking the validity of the pointer operand. - - * typeck2.c (digest_init): Pedwarn about string initializer being - too long. - -Tue May 10 12:10:28 1994 Jason Merrill - - * decl.c (push_overloaded_decl): Only throw away a builtin if the - decl in question is the artificial one. - - * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because - expand_{start,end}_case cannot happen in the middle of a block. - - * cvt.c (build_type_conversion_1): Use convert again. - -Tue May 10 11:52:04 1994 Brendan Kehoe - - * typeck2.c (digest_init): Make sure we check for signed and - unsigned chars as well when warning about string initializers. - - * init.c (emit_base_init): Check if there's a DECL_NAME on the - member before trying to do an initialization for it. - -Tue May 10 11:34:37 1994 Mike Stump - - * except.c: Don't do anything useful when cross compiling. - -Tue May 10 03:04:13 1994 Jason Merrill - - * decl.c (duplicate_decls): Fix up handling of builtins yet again. - (push_overloaded_decl): Likewise. - - * cvt.c (convert): Don't look for void type conversion. - -Mon May 9 18:05:41 1994 Jason Merrill - - * init.c (do_friend): Only do a pushdecl for friends, not - pushdecl_top_level. - -Mon May 9 13:36:34 1994 Jim Wilson - - * decl.c (lookup_name_current_level): Put empty statement after - the label OUT to make the code valid C. - -Mon May 9 12:20:57 1994 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Only complain about - comparing void * and a function pointer if void * is smaller. - -Sun May 8 01:29:13 1994 Jason Merrill - - * decl.c (lookup_name_current_level): Move through temporary binding - levels. - - * parse.y (already_scoped_stmt): Revive. - (simple_stmt): Use it again. - - * decl.c (poplevel): Always call poplevel recursively if we're - dealing with a temporary binding level. - -Sat May 7 10:52:28 1994 Mike Stump - - * decl.c (finish_decl): Make sure we run cleanups for initial values - of decls. Cures memory leak. - * decl.c (expand_static_init): Likewise for static variables. - * decl2.c (finish_file): Likewise for globals. - -Sat May 7 03:57:44 1994 Jason Merrill - - * typeck.c (commonparms): Don't complain about redefining default - args. - - * decl.c (duplicate_decls): Don't complain twice about conflicting - function decls. - (decls_match): Don't look at default args. - (redeclaration_error_message): Complain about redefining default - args. - - * call.c (build_overload_call_real): Also deal with guiding - declarations coming BEFORE the template decl. - - * pt.c (unify): Allow different parms to have different - cv-qualifiers. - (unify): Allow trivial conversions on non-template parms. - -Fri May 6 03:53:23 1994 Jason Merrill - - * pt.c (tsubst): Support OFFSET_TYPEs. - (unify): Likewise. - - * decl2.c (finish_decl_parsing): Call push_nested_class with a type. - - * init.c (build_offset_ref): Fix error message. - * search.c (lookup_field): Likewise. - - * call.c (build_scoped_method_call): Pass binfo to - build_method_call. - * typeck.c (build_object_ref): Likewise. - - * typeck2.c (binfo_or_else): Don't return a _TYPE. - - * class.c (finish_struct): Don't complain about re-use of inherited - names or shadowing of type decls. - * decl.c (pushdecl_class_level): Likewise. - - * decl.c (finish_enum): Set the type of all the enums. - - * class.c (finish_struct): Don't get confused by access decls. - - * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a - _TYPE. You can stop using TYPE_NAME for that now. - - * parse.y: Lose doing_explicit (check $0 instead). - * gxx.gperf: 'template' now has a RID. - * lex.h (rid): Likewise. - * lex.c (init_lex): Set up the RID for 'template'. - - * parse.y (type_specifier_seq): typed_typespecs or - nonempty_type_quals. Use it. - (handler_args): Fix bogus syntax. - (raise_identifier{,s}, optional_identifier): Lose. - * except.c (expand_start_catch_block): Use grokdeclarator to parse - the catch variable. - (init_exception_processing): The second argument to - __throw_type_match is ptr_type_node. - - Fri May 6 07:18:54 1994 Chip Salzenberg - - [ change propagated from c-decl.c of snapshot 940429 ] - * cp/decl.c (finish_decl): Setting asmspec_tree should not - zero out the old RTL. - -Fri May 6 01:25:38 1994 Mike Stump - - Add alpha exception handling support to the compiler. - Quick and dirty backend in except.c. - - * cp/*: Remove most remnants of old exception handling support. - * decl.c (finish_function): Call expand_exception_blocks to put - the exception hanlding blocks at the end of the function. - * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup - comes after expand_decl_init. - * except.c: Reimplementation. - * expr.c (cplus_expand_expr): Handle THROW_EXPRs. - * lex.c (init_lex): Always have catch, try and throw be reserved - words, so that we may always parse exception handling. - * parse.y: Cleanup to support new interface into exception handling. - * tree.def (THROW_EXPR): Add. - -Thu May 5 17:35:37 1994 Jason Merrill - - * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt. - (various): Lose .kindof_pushlevel and partially_scoped_stmt. - -Thu May 5 16:17:27 1994 Kung Hsu - - * parse.y (already_scoped_stmt): Move expand_end_binding() to - fix the unmatched LBB/LBE in stabs. - -Thu May 5 14:36:17 1994 Jason Merrill - - * decl.c (set_nested_typename): Set TREE_MANGLED on the new - identifiers. - (pushdecl): Check TREE_MANGLED. - (xref_tag): Likewise. - * cp-tree.h (TREE_MANGLED): This identifier is a - DECL_NESTED_TYPENAME (named to allow for future use to denote - mangled function names as well). - - Implement inconsistency checking specified in [class.scope0]. - * decl.c (lookup_name_real): Don't set ICV here after all. - (finish_enum): Also set the type of the enumerators themselves. - (build_enumerator): Put the CONST_DECL in the list instead of its - initial value. - (pushdecl_class_level): Check inconsistent use of a name in the - class body. - * class.c (finish_struct): Check inconsistent use of a name in the - class body. Don't set DECL_CONTEXT on types here anymore. - * parse.y (qualified_type_name): Note that the identifier has now - been used (as a type) in the class body. - * lex.c (do_identifier): Note that the identifier has now been used - (as a constant) in the class body. - * error.c (dump_decl): Print type and enum decls better. - -Thu May 5 09:35:35 1994 Brendan Kehoe - - * typeck.c (build_modify_expr): Warn about assignment to `this'. - -Wed May 4 15:55:49 1994 Jason Merrill - - * init.c (build_delete): Use the global operator delete when - requested. - - * decl.c (lookup_name_real): If we find the type we're looking in a - base class while defining a class, set IDENTIFIER_CLASS_VALUE for - the type. - - * class.c (finish_struct): Remove a couple of dependencies on - language linkage. - - * decl.c (pushtag): Classes do nest in extern "C" blocks. - (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for - the type. - (pushtag): Remove another dependency on the language linkage. - - * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to - a const-qualified type. - - * decl.c (push_overloaded_decl): Throw away built-in decls here. - (duplicate_decls): Instead of here. - -Wed May 4 15:27:40 1994 Per Bothner - - * typeck.c (get_member_function_from_ptrfunc): Do The Right - Thing (I hope) if we're using thunks. - -Wed May 4 13:52:38 1994 Jason Merrill - - * parse.y (specialization): aggr template_type_name ';'. - (named_class_head_sans_basetype): Use it. - (explicit_instantiation): Likewise. - (tmpl.2): Revert. - - * cvt.c (build_type_conversion_1): Use convert_for_initialization, - rather than convert, to do conversions after the UDC. - - * cp-tree.h (SHARED_MEMBER_P): This member is shared between all - instances of the class. - - * search.c (lookup_field): If the entity found by two routes is the - same, it's not ambiguous. - -Wed May 4 12:10:00 1994 Per Bothner - - * decl.c (lookup_name_real): Check for a NULL TREE_VALUE, - to prevent the compiler from crashing ... - -Wed May 4 11:19:45 1994 Jason Merrill - - * call.c (build_method_call): If we don't have an object, check - basetype_path to figure out where to look up the function. - - * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to - build_method_call in case exp is NULL_TREE. - -Tue May 3 16:02:53 1994 Per Bothner - - Give a vtable entries a unique named type, for the sake of gdb. - * class.c (build_vtable_entry): The address of a thunk now has - type vtable_entry_type, not ptr_type_node. - * method.c (make_thunk): Fix type of THUNK_DECL. - * class.c (add_virtual_function, override_one_vtable): Use - vfunc_ptr_type_node, instead of ptr_type_node. - * cp-tree.h (vfunc_ptr_type_node): New macro. - * decl.c (init_decl_processing): Make vtable_entry_type - be a unique type of pointer to a unique function type. - -Tue May 3 09:20:44 1994 Jason Merrill - - * parse.y (do_explicit): Sets doing_explicit to 1. - (explicit_instantiation): Use do_explicit rather than TEMPLATE - directly, add "do_explicit error" rule. - (datadef): Set doing_explicit to 0 after an explicit instantiation. - (tmpl.2): Don't instantiate if we see a ';' unless we're doing an - explicit instantiation. - (named_class_head_sans_basetype): Remove aggr template_type_name - ';' again. - -Mon May 2 23:17:21 1994 Jason Merrill - - * search.c (lookup_nested_tag): Lose. - - * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs. - (lookup_name_nonclass): Lose. - - * decl.c (poplevel_class): Add force parameter. - (lookup_name_real): Fix handling of explicit scoping which specifies - a class currently being defined. Add 'nonclass' argument. - (lookup_name, lookup_name_nonclass): Shells for lookup_name_real. - - * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here. - (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being - called from finish_struct. - -Mon May 2 19:06:21 1994 Per Bothner - - * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type. - (It seeems redundant, given build_ptrmemfunc_type.) - * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof, - build_classof): Use vtable_entry_type instead of memptr_type. - * method.c (emit_thunk): Call poplevel with functionbody==0 - to prevent DECL_INITIAL being set to a BLOCK. - -Mon May 2 15:02:11 1994 Jason Merrill - - * parse.y (named_class_head_sans_basetype): Add "aggr - template_type_name ';'" rule for forward declaration of - specializations. - -Mon May 2 15:02:11 1994 Jason Merrill - - * class.c (instantiate_type): Deal with pmf's. - - * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since - stamp-objlist does. - - * Makefile.in (../cc1plus): Depend on OBJDEPS. - (OBJDEPS): Dependency version of OBJS. - -Mon May 2 12:51:31 1994 Kung Hsu - - * search.c (dfs_debug_mark): Unmark TYPE_DECL_SUPPRESS_DEBUG, not - DECL_IGNORED_P. - -Fri Apr 29 12:29:56 1994 Jason Merrill - - * class.c (finish_struct): Clear out memory of local tags. And - typedefs. - - * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified - type. - * search.c (get_matching_virtual): Be more helpful in error message. - - * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED). - - * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work. - (default_copy_constructor_body): Likewise. - - * class.c (finish_struct): Don't gratuitously create multiple decls - for nested classes. - -Thu Apr 28 23:39:38 1994 Jason Merrill - - Avoid clobbering the arg types of other functions when reverting - static member functions. - * decl.c (revert_static_member_fn): Rearrange arguments, don't - require values for 'fn' and 'argtypes', add warning to comment - above. - (decls_match): Rearrange arguments in call to rsmf. - (grok_op_properties): Don't pass values for fn and argtypes. - * pt.c (instantiate_template): Don't pass values for fn and argtypes. - -Thu Apr 28 16:29:11 1994 Doug Evans - - * Make-lang.in (cc1plus): Depend on stamp-objlist. - * Makefile.in (BC_OBJS): Delete. - (OBJS): Cat ../stamp-objlist to get language independent files. - Include ../c-common.o. - (../cc1plus): Delete reference to BC_OBJS. - -Thu Apr 28 02:12:08 1994 Jason Merrill - - * search.c (compute_access): No really, deal with static members - properly. Would I lie to you? - - Implement lexical hiding of function declarations. - * pt.c (tsubst): Use lookup_name to look for function decls to guide - instantiation. - * method.c (build_opfncall): Use lookup_name_nonclass to look for - non-member functions. - * init.c (do_friend): Use lookup_name_nonclass to look for - functions. - * error.c (ident_fndecl): Use lookup_name to look for functions. - * decl2.c (lookup_name_nonclass): New function, skips over - CLASS_VALUE. - * decl.c (struct binding_level): Lose overloads_shadowed field. - (poplevel): Don't deal with overloads_shadowed. - (push_overloaded_decl): Do lexical hiding for functions. - * class.c (instantiate_type): Don't check non-members if we have - members with the same name. - * call.c (build_method_call): Use lookup_name_nonclass instead of - IDENTIFIER_GLOBAL_VALUE to check for non-member functions. - (build_overload_call_real): Likewise. - - * decl.c (duplicate_decls): Check for ambiguous overloads here. - (push_overloaded_decl): Instead of here. - - * decl.c (pushdecl): Back out Chip's last change. - - * decl.c (grok_op_properties): Operators cannot be static members. - - * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0 - (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0 - * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED. - - * method.c (do_inline_function_hair): Don't put friends of local - classes into global scope, either. - - * typeck2.c (build_functional_cast): Don't look for a function call - interpretation. - -Thu Apr 28 15:19:46 1994 Mike Stump - - * cp-tree.h: Disable use of backend EH. - -Wed Apr 27 21:01:24 1994 Doug Evans - - * Make-lang.in (c++.distdir): mkdir tmp/cp first. - * Makefile.in (INCLUDES): Move definition to same place as - parent makefile. - (ALLOCA): Define. - (OLDAR_FLAGS): Delete. - (OLDCC): Define. - (DIR): Delete. - (CLIB): Define. - (####site): Delete. - (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc. - -Wed Apr 27 19:10:04 1994 Kung Hsu - - * decl.c (xref_tag): Not to use strstr(), it's not available on - all platforms. - -Wed Apr 27 18:10:12 1994 Jason Merrill - - * class.c (finish_struct): Resolve yet another class/pmf confusion. - - * call.c (build_overload_call_real): Don't take the single-function - shortcut if we're dealing with an overloaded operator. - -Wed Apr 27 17:35:37 1994 Mike Stump - - * search.c (get_base_distance): Search the virtual base class - binfos, incase someone wants to convert to a real virtual base - class. - * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real - instead of convert_pointer_to, as it now will work. - -Wed Apr 27 15:36:49 1994 Jason Merrill - - * cvt.c (convert_to_reference): Don't complain about casting away - const and volatile. - - * typeck.c (build_unary_op): References are too lvalues. - -Wed Apr 27 13:58:05 1994 Mike Stump - - * class.c (override_one_vtable): We have to prepare_fresh_vtable - before we modify it, not after, also, we cannot reuse an old vtable, - once we commit to a new vtable. Implement ambiguous overrides in - virtual bases as abstract. Hack until we make the class - ill-formed. - -Wed Apr 27 01:17:08 1994 Jason Merrill - - * parse.y (unary_expr): Expand new_placement[opt] and - new_initializer[opt] inline. - - * search.c (lookup_fnfields): Don't throw away the inheritance - information here, either. - (compute_access): Handle static members properly. - - * init.c (build_member_call): Always set basetype_path, and pass it - to lookup_fnfields. - - * search.c (lookup_field): Deal properly with the case where - xbasetype is a chain of binfos; don't throw away the inheritance - information. - (compute_access): protected_ok always starts out at 0. - - * init.c (resolve_offset_ref): Don't cast `this' to the base type - until we've got our basetype_path. - - * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum. - - * cvt.c (build_up_reference): Use build_pointer_type rather than - TYPE_POINTER_TO. - - * call.c (convert_harshness_ansi): Call type_promotes_to for reals - as well. - - * cvt.c (type_promotes_to): Retain const and volatile, add - float->double promotion. - - * decl.c (grokdeclarator): Don't bash references to arrays into - references to pointers in function parms. Use type_promotes_to. - -Tue Apr 26 23:44:36 1994 Mike Stump - - Finish off Apr 19th work. - - * class.c (finish_struct_bits): Rename has_abstract_virtuals to - might_have_abstract_virtuals. - * class.c (strictly_overrides, override_one_vtable, - merge_overrides): New routines to handle virtual base overrides. - * class.c (finish_struct): Call merge_overrides to handle overrides - in virtual bases. - -Tue Apr 26 12:45:53 1994 Jason Merrill - - * typeck.c (build_function_call): Call build_function_call_real with - LOOKUP_NORMAL. - - * *: Don't deal with TYPE_EXPRs. - - * tree.c (lvalue_p): If the type of the expression is a reference, - it's an lvalue. - - * cvt.c (convert_to_reference): Complain about passing const - lvalues to non-const references. - (convert_from_reference): Don't arbitrarily throw away const and - volatile on the target type. - - * parse.y: Simplify and fix rules for `new'. - - * decl.c (grok_op_properties): operator void is illegal. - -Mon Apr 25 02:36:28 1994 Jason Merrill - - * parse.y (components): Anonymous bitfields can still have declspecs. - - * decl.c (pushdecl): Postpone handling of function templates like we - do C functions. - - * search.c (expand_indirect_vtbls_init): Fix infinite loop when - convert_pointer_to fails. - - * call.c (compute_conversion_costs_ansi): A user-defined conversion - by itself is better than that UDC followed by standard conversions. - Don't treat integers and reals specially. - - * cp-tree.h: Declare flag_ansi. - - * typeck.c (c_expand_return): pedwarn on return in void function - even if the expression is of type void. - (build_c_cast): Don't do as much checking for casts to void. - (build_modify_expr): pedwarn about array assignment if this code - wasn't generated by the compiler. - - * tree.c (lvalue_p): A comma expression is an lvalue if its second - operand is. - - * typeck.c (default_conversion): Move code for promoting enums and - ints from here. - * cvt.c (type_promotes_to): To here. - * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix - promotion semantics for reals. - -Sun Apr 24 16:52:51 1994 Doug Evans - - * Make-lang.in (c++.install-common): Check for g++-cross. - * Makefile.in: Remove Cygnus cruft. - (config.status): Delete. - (RTL_H): Define. - (TREE_H): Use complete pathname, some native makes have minimal - VPATH support. - (*.o): Use complete pathname to headers in parent dir. - (doc, info, dvi): Delete. - -Sun Apr 24 16:52:51 1994 Doug Evans - - * Make-lang.in (c++.install-common): Check for g++-cross. - * Makefile.in: Remove Cygnus cruft. - (config.status): Delete. - (RTL_H): Define. - (TREE_H): Use complete pathname, some native makes have minimal - VPATH support. - (*.o): Use complete pathname to headers in parent dir. - (doc, info, dvi): Delete. - -Sun Apr 24 00:47:49 1994 Jason Merrill - - * decl.c (pushdecl): Avoid redundant warning on redeclaring function - with different return type. - (decls_match): Compare return types strictly. - -Fri Apr 22 12:55:42 1994 Jason Merrill - - * cvt.c (build_type_conversion): Do try to convert through other - pointers. This will fail if the class defines multiple pointer - conversions. - - * error.c (dump_type_prefix): Print out pointers to arrays properly. - (dump_type_suffix): Likewise. (was 'int *[]', now 'int (*)[]') - - * typeck.c (build_unary_op): Disallow ++/-- on pointers to - incomplete type. - - * decl.c (duplicate_decls): Check mismatched TREE_CODES after - checking for shadowing a builtin. If we're redeclaring a builtin - function, bash the old decl to avoid an ambiguous overload. - - * cvt.c (convert_to_reference): Don't force arrays to decay here. - - * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue. - - * decl.c (duplicate_decls): Don't assume that the decls will have - types. - - Mon Apr 18 11:35:32 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940318 snapshot ] - * c-decl.c (pushdecl): Warn if type mismatch with another external decl - in a global scope. - - Fri Apr 22 06:38:56 1994 Chip Salzenberg - - * cp/typeck2.c (signature_error): Use cp_error for "%T". - - Mon Apr 18 11:59:59 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940415 snapshot ] - * cp/decl.c (duplicate_decls, pushdecl, builtin_function): - Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE. - - Mon Apr 18 11:55:18 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940409 snapshot ] - * cp/decl.c (duplicate_decls): Put new type in same obstack as - old ones, or permanent if old ones in different obstacks. - - Mon Apr 18 11:48:49 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940401 snapshot ] - * cp/parse.y (attrib): Handle string args as expressions, - merging the two rules. `mode' attribute now takes a string arg. - Delete the rule for an identifier as arg. - - Mon Apr 18 11:24:00 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940312 snapshot ] - * cp/typeck.c (pointer_int_sum): Multiplication should be done signed. - (pointer_diff): Likewise the division. - - Sun Mar 6 19:43:39 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940304 snapshot ] - * cp/decl.c (finish_decl): Issue warning for large objects, - if requested. - - Sat Feb 19 22:20:32 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940218 snapshot ] - * cp/parse.y (attrib): Handle attribute ((section ("string"))). - * cp/decl.c (duplicate_decls): Merge section name into new decl. - - Tue Feb 8 09:49:17 1994 Chip Salzenberg - - [ cp/* changes propagated from c-* changes in 940206 snapshot ] - * cp/typeck.c (signed_or_unsigned_type): Check for any - INTEGRAL_TYPE_P not just INTEGER_TYPE. - - Mon Dec 6 13:35:31 1993 Norbert Kiesel - - * cp/decl.c (finish_enum): Start from 0 when determining precision - for short enums. - - Fri Dec 3 17:07:58 1993 Ralph Campbell - - * cp/parse.y (unary_expr): Look at $1 for tree_code rather than - casting $$. - - Wed Nov 17 19:22:09 1993 Chip Salzenberg - - * cp/typeck.c (build_binary_op_nodefault): Propagate code - from C front-end to optimize unsigned short division. - (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8". - - Wed Nov 17 19:17:18 1993 Chip Salzenberg - - * cp/call.c (convert_harshness_ansi): Given an (e.g.) char - constant, prefer 'const char &' to 'int'. - - Wed Feb 3 13:11:48 1993 Chip Salzenberg - - * cp/class.c (finish_struct_methods): Handle multiple - constructors in fn_fields list. - -Fri Apr 22 12:48:10 1994 Kung Hsu - - * class.c (finish_struct): Use TYPE_DECL_SUPPRESS_DEBUG to flag - types not to be dumped in stabs, like types in #pragma interface. - * decl.c (init_decl_processing): Use TYPE_DECL_SUPPRESS_DEBUG to - mark unknown type. - -Fri Apr 22 03:27:26 1994 Doug Evans - - * Language directory reorganization. - See parent makefile. - -Thu Apr 21 18:27:57 1994 Per Bothner - - * cp-tree.h (THUNK_DELTA): It is normally negative, so - use signed .i variant of frame_size rather than unsigned .u. - * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks, - use "VT" rather than "vt" due to binary incompatibility. - * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT, - rather than sizeof, since it is now an expression. - * class.c (modify_one_vtable): Modify to skip initial element - containing a count of the vtable. - -Thu Apr 21 00:09:02 1994 Jason Merrill - - * lex.c (check_newline): Force interface_unknown on main input file. - - * pt.c (do_pending_expansions): Always emit functions that have been - explicitly instantiated. - (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED. - (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and - DECL_EXPLICITLY_INSTANTIATED on all my methods. - * parse.y (explicit_instantiation): Call do_type_instantiation for - types. - * decl2.c (finish_vtable_vardecl): Call import_export_vtable. - * decl.c (start_function): Don't set DECL_EXTERNAL on a function - that has been explicitly instantiated. - * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for - DECL_LANG_FLAG_4. - * class.c: Move import_export_vtable to decl2.c, and comment out all - uses. - -Wed Apr 20 16:51:06 1994 Jason Merrill - - * lex.c (process_next_inline): Don't muck with DECL_INLINE. - (do_pending_inlines): Likewise. - -Tue Apr 19 22:25:41 1994 Mike Stump - - Reimplement vtable building, and most vtable pointer setting. - Allows for earier maintenance, easier understandability, and most - importantly, correct semantics. - - * class.c (build_vtable): Removed unneeded - SET_BINFO_VTABLE_PATH_MARKED. - * class.c (prepare_fresh_vtable): Likewise. Added argument. - * class.c (modify_vtable_entry): General cleanup. - * class.c (related_vslot, is_normal, modify_other_vtable_entries, - modify_vtable_entries): Removed. - * class.c (add_virtual_function): General cleanup. - * class.c (finish_base_struct): Setup BINFO_VTABLE and - BINFO_VIRTUALS as early as we can, so that modify_all_vtables can - work. - * class.c (finish_vtbls): New routine, mostly from - unmark_finished_struct. - * class.c (overrides): New routine. - * class.c (modify_one_vtable): New routine, mostly from - modify_other_vtable_entries and modify_vtable_entries. - * class.c (modify_all_direct_vtables, modify_all_indirect_vtables, - modify_all_vtables): New routines. - * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable - call. General cleanup on how pending_hard_virtuals are handled. - General cleanup on modifying vtables. Use finish_vtbls, instead of - unmark_finished_struct. - * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init, - get_first_matching_virtual, get_matching_virtual, - expand_vbase_vtables_init, expand_indirect_vtbls_init): Update. - * cvt.c (convert_pointer_to_real): Cleanup error message. - * decl.c (grokfndecl): General cleanup. - * decl.c (finish_function): Change init_vtbl_ptrs call to - expand_direct_vtbls_init. Change expand_vbase_vtables_init call to - expand_indirect_vtbls_init. - * init.c (expand_virtual_init): Remove unneeded argument. - * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added - two arguments to make more general. Made more general. Now can be - used for vtable pointer initialization from virtual bases. - * init.c (emit_base_init): Change expand_vbase_vtables_init call to - expand_indirect_vtbls_init. Change init_vtbl_ptrs call to - expand_direct_vtbls_init. - * init.c (expand_virtual_init): General cleanup. - * init.c (expand_default_init): Change expand_vbase_vtables_init - call to expand_indirect_vtbls_init. - * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init - call to expand_indirect_vtbls_init. - * init.c (expand_recursive_init): Change expand_vbase_vtables_init - call to expand_indirect_vtbls_init. - * search.c (get_first_matching_virtual): Rename to - get_matching_virtual. General cleanup and remove setting of - DECL_CONTEXT. That is now done in a cleaner way in - modify_vtable_entry and add_virtual_function. - * search.c (expand_vbase_vtables_init): Rename to - expand_indirect_vtbls_init. General cleanup. Use - expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable - pointers from virtual bases are set up. - * search.c (bfs_unmark_finished_struct, unmark_finished_struct): - Removed. - - * *.[chy]: Remove support for VTABLE_USES_MASK. - -Tue Apr 19 12:51:59 1994 Jason Merrill - - * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between - reference and pointer types instead of bashing the types directly. - - * call.c (build_overload_call_real): Use the TREE_CODE to determine - whether the function is overloaded or not, rather than - TREE_OVERLOADED. - * *: Remove all uses of TREE_OVERLOADED. - - * decl.c (grokdeclarator): Only complain about initializing const - fields when -ansi or -pedantic. - -Tue Apr 19 12:42:42 1994 Doug Evans - - * cp-tree.h (THUNK_DELTA): frame_size is now a union. - -Mon Apr 18 00:17:13 1994 Jason Merrill - - Do overloading on a block-by-block basis, not function-by-function. - * decl.c: Lose overloads_to_forget. - (struct binding_level): Add overloads_shadowed field. - (poplevel): Restore overloads_shadowed. - (push_overloaded_decl): Use overloads_shadowed instead of - overloads_to_forget. - (finish_function): Don't look at overloads_to_forget. - - Copy enum_overflow logic from c-decl.c. - * decl.c (start_enum): Initialize enum_overflow. - (build_enumerator): Use enum_overflow. Also use current_scope(). - - * search.c (current_scope): Move Brendan's comment from - build_enumerator here. - - * typeck.c (convert_for_assignment): Change warnings to pedwarns for - discarding const/volatile. - -Sat Apr 16 01:18:21 1994 Jason Merrill - - * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs. - (comp_target_types): Likewise. - - * decl.c (lookup_name): Don't unset got_scope here. - - * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if - got_scope != NULL_TREE. - -Fri Apr 15 16:36:33 1994 Jason Merrill - - Horrible kludge to prevent templates from being instantiated by - their base classes. - * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED - before we get to left_curly. - * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED. - - * error.c (dump_decl): If it's a typedef, print out the name of the - decl, not just the underlying type. - - * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL, - update the IDENTIFIER_TYPE_VALUE of its name. - - * decl2.c (finish_file): When processing the initializer for a - static member, pretend that the dummy function is a member of the - same class. - -Fri Apr 15 15:56:35 1994 Kung Hsu - - * class.c (build_vtable_entry): Revert Apr 4 change. - * decl2.c (mark_vtable_entries): Replace pure virtual function - decl with abort's. - -Fri Apr 15 13:49:33 1994 Jason Merrill - - * typeck.c (build_conditional_expr): Pedwarn on pointer/integer - mismatch, and don't pedwarn on 0/function pointer mismatch. - - * typeck2.c (digest_init): Lose code for special handling of unions. - (process_init_constructor): Since they're handled just fine here. - Pedwarn on excess elements. - - * decl2.c (grokfield): Complain about local class method declaration - without definition. - -Fri Apr 15 13:19:40 1994 Per Bothner - - * method.c (emit_thunk): Add extern declaration for - current_call_is_indirect (needed for hppa). - -Thu Apr 14 16:12:31 1994 Jason Merrill - - Improve local class support; allow classes in different blocks to - have the same name. - * decl.c (pushtag): Support local classes better. - (pushdecl_nonclass_level): New function for pushing mangled decls of - nested types into the appropriate scope. - (xref_defn_tag): Use pushdecl_nonclass_level instead of - pushdecl_top_level. - (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local - class methods. - * method.c (do_inline_function_hair): Likewise. - - * class.c (finish_struct): It is legal for a class with no - constructors to have nonstatic const and reference members. - -Thu Apr 14 07:15:11 1994 Brendan Kehoe - - * decl.c (push_overloaded_decl): Avoid giving errors about - built-ins, since duplicate_decls will have given warnings/errors - for them. - -Thu Apr 14 03:45:12 1994 Jason Merrill - - * cvt.c (convert_to_reference): Warn about casting pointer type to - reference type when this is probably not what they wanted. - -Wed Apr 13 13:12:35 1994 Per Bothner - - * decl.c (finish_decl): Don't mindlessly set TREE_USED for - static consts any more (toplev.c has now been modified to - not emit warnings if they are unused). - -Wed Apr 13 00:22:35 1994 Jason Merrill - - * decl.c (grok_op_properties): If op new/delete get here with - METHOD_TYPEs, do a revert_static_member_fn. - - * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose. - * init.c (is_aggr_typedef): Don't look at - IDENTIFIER_CLASS_TYPE_VALUE. - (get_aggr_from_typedef): Likewise. - (get_type_value): Likewise. - * call.c (build_scoped_method_call): Don't rely on overloaded - template names having IDENTIFIER_CLASS_VALUE set. - - * parse.y (component_decl_1, fn.def2): Revert rules for - constructors. - (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being - clobbered. - - * decl.c (start_function): Only warn about `void main()' if pedantic - || warn_return_type. - -Tue Apr 12 02:14:17 1994 Jason Merrill - - Clean up overloading of the template name. - * class.c (pushclass): Overload the template name whenever pushing - into the scope of a template class, not just if it is - uninstantiated. - (popclass): Correspondingly. - * search.c (push_class_decls): Don't overload_template_name. - * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or - DECL_CONTEXT on things. - * parse.y (left_curly): Don't overload_template_name. - * class.c (finish_struct): Don't undo_template_name_overload. - - * method.c (build_opfncall): Only pass one argument to global op - delete. - - * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to - decide how many arguments to use for vec delete. - - * decl.c (grok_op_properties): Be consistent in modifying - current_class_type. - (grokdeclarator): Only complain about function decls with no return - type if we're being pedantic. - -Mon Apr 11 00:10:53 1994 Jason Merrill - - Add support for operator new [] and operator delete []. - - * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR. - * ptree.c (print_lang_type): Indicate vec new/delete. - * parse.y: Support vec new/delete. - * method.c (build_decl_overload): Deal with vec new/delete. - (build_opfncall): Likewise. - * lex.c (init_lex): Set up values of ansi_opname and opname_tab for - vec new/delete. vec new uses "__vn", and vec delete uses "__vd". - * init.c (init_init_processing): Set up BIVN and BIVD. - (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW, - since it doesn't happen any more. - (build_new): Support vec new. Always call something. - (build_x_delete): Support vec delete. - (build_vec_delete): Lose dtor_dummy argument, add use_global_delete, - and pass it to build_x_delete. - * decl2.c (delete_sanity): Don't change behavior by whether or not - the type has a destructor. Pass use_global_delete to - build_vec_delete. - (coerce_delete_type): Make sure that the type returned has a first - argument of ptr_type_node. - * decl.c (init_decl_processing): Also declare the global vec - new/delete. - (grokdeclarator): Also force vec new/delete to be static. - (grok_op_properties): Note presence of vec new/delete, and play with - their args. If vec delete takes the optional size_t argument, set - TYPE_VEC_DELETE_TAKES_SIZE. - * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify - checking for one delete or the other. - (lang_type): gets_new and gets_delete are now two bits long. The - low bit is for the non-array version. Lose gets_placed_new. - (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec - delete defined by this class wants to know how much space it is - deleting. - (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must - add a header containing the number of elements in the vector; i.e. - when the elements need to be destroyed or vec delete wants to know - the size. - * class.c (finish_struct_methods): Also check for overloading vec - delete. - * call.c (build_method_call): Also delete second argument for vec - delete. - - * decl.c (grokdeclarator): Correct complaints again. - (grokdeclarator): Fix segfault on null declarator. - (decls_match): Also accept redeclaration with no arguments if both - declarations were in C context. Bash TREE_TYPE (newdecl) here. - (duplicate_decls): Instead of here. - - * parse.y (nested_name_specifier_1): Lose rules for dealing with - syntax errors nicely, since they break parsing of 'const i;'. - - * decl.c (lookup_name): if (got_scope == current_class_type) - val = IDENTIFIER_CLASS_VALUE (name). - - * search.c (lookup_nested_tag): Look in enclosing classes, too. - - * spew.c (yylex): Only look one character ahead when checking for a - SCOPE. - - * lex.c (check_newline): Read first nonwhite char before - incrementing lineno. - - * decl.c (grokdeclarator): Don't claim that typedefs are variables - in warning. - - * parse.y: Divide up uses of unqualified_id into - notype_unqualified_id and unqualified_id, so that TYPENAME can be - used as an identifier after an object. - - * class.c (push_nested_class): Don't push into non-class scope. - - * decl.c (grokdeclarator): If an identifier could be a type - conversion operator, but has no associated type, it's not a type - conversion operator. - - * pt.c (unify): Check for equality of constants better. - - * decl.c (grokdeclarator): Don't complain about access decls. - -Sun Apr 10 02:39:55 1994 Jason Merrill - - * decl.c (grokdeclarator): pedwarn about data definitions without - types here. - - * parse.y (datadef): Don't pedwarn about decls without types here, - since that is valid for functions. - (fn.def2, component_decl): Support constructors with declmods again. - (nomods_initdecls): For decls without any mods, so that we don't try - to get declspecs from some arbitrary $0. - - * search.c (lookup_field): Use cp_error. - - * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type - here; it breaks destructors for non-aggr types. - - * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of - a type being defined, like the comment says. - If got_scope is not an aggregate, just return NULL_TREE. - - * pt.c (create_nested_upt): Kung's code for creating types nested - within uninstantiated templates now lives here (it used to live in - hack_more_ids). It needs to be expanded. - - * parse.y: Stop calling see_typename so much. - - * decl.c (lookup_name): Deal with TTPs and UPTs. - - * lex.c (real_yylex): Don't set looking_for_typename just because we - saw a 'new'. - (dont_see_typename): #if 0 out. - - * spew.c (yylex): Increment looking_for_typename if the next - character is SCOPE, rather than setting it to 1; this way, the value - from seeing an aggr specifier will not be lost. This kinda relies - on looking_for_typename never being < 0, which is now true. - - * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs, - too. - (named_class_head_sans_basetype): Accept template types, too. Oops. - -Fri Apr 8 16:39:35 1994 Jason Merrill - - * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs. - - * parse.y: Lose START_DECLARATOR. - - * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS - for a class. - - * parse.y: Simplify fn.def2 and component_decl. Support 'enum - A::foo' syntax. Catch invalid scopes better. - - * parse.y, lex.c: Lose TYPENAME_COLON. - - * decl2.c (groktypefield): #if 0 out. - - * decl.c (lookup_name): If the type denoted by got_scope is - currently being defined, look in CLASSTYPE_TAGS rather than FIELDS. - - * class.c (push_nested_class): Don't try to push into - error_mark_node. - -Fri Apr 8 07:26:36 1994 Brendan Kehoe - - * Makefile.in (stamp-parse): Update count of conflicts to 33. - -Thu Apr 7 17:47:53 1994 Jason Merrill - - A saner implementation of nested types that treats template types - no differently from non-template types. There are still some - shortcomings of our system; most notably, it is difficult to look - for a nested type that is hidden by another name, because of the way - we keep track of hidden types. But this shouldn't be a problem for - just about anyone. Perhaps lookup_field should be fixed up a bit. - - * spew.c: Moved handling of nested types/scoping from the lexer - into the parser. Removed variable template_type_seen_before_scope. - Removed functions frob_identifier, hack_more_ids, and various cruft - that was #if 0'd out in the past, reducing the size of the file from - 1146 lines to 450 lines. We can't quite do away with spew.c yet, - though; we still need it for do_aggr () and checking for SCOPE after - the current identifier. And setting lastiddecl. - - * parse.y: Moved handling of nested types/scoping from the lexer - into the parser, using a new global variable `got_scope'. Reduced - the number of states by 53. Implemented all uses of explicit global - scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed - nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope, - scoped_typename. Added nonterminals nested_type, - qualified_type_name, complete_type_name, qualified_id, ptr_to_mem, - nested_name_specifier, global_scope, overqualified_id, type_name. - Changed many others. Added 9 new reduce/reduce conflicts, which are - nested type parallels of 9 that were already in the grammar for - non-nested types. Eight of the now 33 conflicts should be removed - in the process of resolving the late binding between variable and - function decls. - - * gxxint.texi (Parser): Update. - - * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE. - - * lex.h: Add decl for got_scope. - - * lex.c (see_typename): Claim to be the lexer when calling - lookup_name. - - * decl.c (lookup_name): When called from the lexer, look at - got_scope and looking_at_typename; otherwise don't. - -Thu Apr 7 22:05:47 1994 Mike Stump - - 31th Cygnus<->FSF merge. - -Thu Apr 7 17:47:53 1994 Jason Merrill - - * decl2.c (mark_vtable_entries): Call this to mark all the - entries in the vtable addressable. - (finish_decl_parsing): Handle SCOPE_REFs. - - * decl.c (decls_match): Always call compparms with strict == 1. - Handle the special case of C function redecl here. - (duplicate_decls): Only keep the old type if the new decl takes no - arguments. - - * typeck.c (compparms): Also allow t1 to be ... if strict == 0. - -Thu Apr 7 16:17:50 1994 Mike Stump - - * class.c (build_vtable_entry): Fix breakage introduced Apr 5 - 17:48:41. - -Wed Apr 6 16:05:10 1994 Per Bothner - - * init.c (build_virtual_init), search.c (build_vbase_vtables_init), - ch-tree.h: Every place these functions were called, the result was - immediately passed to expand_expr_stmt. Reduce redundancy by - calling expand_expr_init *inside* these functions. These - makes for a simpler interface, and we don't have to build - compound expressions. Hence, rename these function to: - expand_virtual_init and expand_vbase_vtables_init respectively. - * init.c, decl.c: Change callers of these functions. - * init.c, cp-tree.h (expand_virtual_init): Make static. - - * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE - rather than DECL_SAVED_INSNS before emitting inlines. - -Wed Apr 6 13:06:39 1994 Jason Merrill - - * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup. - - * decl.c (duplicate_decls): If this is a new declaration of an - extern "C" function, keep the type (for the argtypes). - (redeclaration_error_message): Don't check DECL_LANGUAGE here. - (decls_match): Call compparms with a value of strict dependent on - the value of strict_prototypes for DECL_LANGUAGE (oldecl). - - * typeck.c (compparms): ... is only equivalent to non-promoting - parms if we're not being strict. - - * parse.y (empty_parms): Don't check flag_ansi || pedantic here. - - * decl.c (init_decl_processing): if (flag_ansi || pedantic) - strict_prototypes_lang_c = strict_prototypes_lang_cplusplus; - - * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure - virtuals. - -Tue Apr 5 17:48:41 1994 Per Bothner - - Support for implementing vtables with thunks. - * tree.def (THUNK_DECL): New TREE_CODE. - * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c - (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case. - * cp-tree.h (memptr_type): New variable. - * class.c (build_vtable_entry): Build thunk if necessary. - * class.c (build_vfn_ref): If using thunks, don't need - to add delta field from vtable (there is none!). - * decl.c: Add memptr_type as well as vtable_entry_type. - If using thunks, the latter is just ptr_type_node. - * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type. - * decl2.c (finish_vtable_vardecl): Handle thunks. - * expr.c (cplus_expand_expr): Support THUNK_DECL. - - * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern". - * decl.c (start_function): Set current_extern_inline based on - DECL_THIS_EXTERN, not TREE_PUBLIC. - * decl.c (finish_function): Call mark_inline_for_output if needed, - - Improve intelligence about when to emit inlines. - * cp-tree.h (lang_decl_flags): New field saved_inline. - * cp-tree.h (DECL_SAVED_INLINE): New macro. - * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE. - * decl.h, decl.c (pending_addressable_inlines): Removed. - * decl2.c (pending_addressable_inlines): Renamed to saved_inlines. - * decl2.c (mark_inline_for_output): Do nothing if - DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list). - * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN - and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual. - * decl2.c (finish_file): Writing out inlines later, so we can - also handle the ones needed for vtbales. - * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed. - - * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack - and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks - instead. (The rationale is that these optimizations both break binary - compatibility, but should become the default in a future release.) - -Wed Apr 6 10:53:56 1994 Mike Stump - - * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT - of a fndecl, as we might not be from that vfield. - -Tue Apr 5 17:43:35 1994 Kung Hsu - - * class.c (add_virtual_function): Fix bug for pure virtual, so - that DECL_VINDEX of the dummy decl copied won't be error. - (see also Apr 4 change) - -Tue Apr 5 17:23:45 1994 Per Bothner - - * typeck.c (c_expand_return): Before checking that we're not - returning the address of a local, make sure it's a VAR_DECL. - (And don't worry about it being a TREE_LIST.) - -Tue Apr 5 13:26:42 1994 Jason Merrill - - * parse.y (YYDEBUG): Always define. - * lex.c (YYDEBUG): Likewise. - -Mon Apr 4 11:28:17 1994 Kung Hsu - - * class.c (finish_struct): Backup out the change below, put the - new change for the same purpose. The change below breaks code. - - * class.c (finish_struct): If pure virtual, copy node and make - RTL point to abort, then put in virtual table. - * decl2.c (grok_function_iit): Reinstate Mar 31 change. - -Sat Apr 2 03:12:58 1994 Jason Merrill - - * init.c (build_new): pedwarn about newing const and volatile - types. - - * tree.c (get_identifier_list): Only do the special handling - thing if we're dealing with the main variant of the record type. - - * cvt.c (convert_to_reference): When converting between - compatible reference types, use the pointer conversion machinery. - Don't just blindly overwrite the old type. - -Fri Apr 1 17:14:42 1994 Jason Merrill - - * call.c (build_method_call): When looking at global functions, - be sure to use instance_ptr for the first argument, not some version - of it that has been cast to a base class. Also do this before - comparing candidates. - -Thu Mar 31 19:50:35 1994 Jason Merrill - - * call.c (build_method_call): Constructors can be called for - const objects. - -Thu Mar 31 16:20:16 1994 Kung Hsu - - * decl2.c (grok_func_init): Do not abort as rtl for pur virtual - functions. They can be defined somewhere else. - -Sat Jan 23 23:23:26 1994 Stephen R. van den Berg - - * decl.c (init_decl_processing): Declare __builtin_return_address - and __builtin_frame_address for C++ as well. - -Thu Mar 31 12:35:49 1994 Mike Stump - - * typeck2.c (store_init_value): Integral constant variables are - always constant, even when doing -fpic. - -Sat Jan 23 23:23:26 1994 Stephen R. van den Berg - - * decl.c (redeclaration_error_message): Pass the types to - comptypes. - -Wed Mar 30 21:29:25 1994 Mike Stump - - Cures incorrect errors about pure virtuals in a class, when they - have been overridden in a derived class. - - * search.c (get_abstract_virtuals): Reimplement. - * search.c (get_abstract_virtuals_1): New routine. - -Wed Mar 30 14:10:04 1994 Jason Merrill - - * pt.c (push_template_decls): Make the pushed level pseudo - global. - - * parse.y (extdefs): Don't pop everything if the current binding - level is pseudo_global. - - * decl.c (pop_everything): Stop on reaching a pseudo-global - binding level. - - * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test. - - * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if - the old decl actually had an initializer. - - * {various}: Clean up gcc -W complaints. - - * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be - (DECL_CONTEXT (NODE) != NULL_TREE). - - * parse.y (lang_extdef): Call pop_everything if necessary. - - * decl.c (pop_everything): New function for popping binding - levels left over after a syntax error. - (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not - a function is a member. - -Wed Mar 30 14:20:50 1994 Mike Stump - - Cures calling a more base base class function, when a more derived - base class member should be called in some MI situations. - - * search.c (make_binfo): Use more the more specialized base - binfos from the binfo given as the second argument to make_binfo, - instead of the unspecialized ones from the TYPE_BINFO. - * class.c (finish_base_struct): Likewise, update callers. - * search.c (dfs_get_vbase_types): Likewise. - * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise. - * decl.c (xref_tag): Use NULL_TREE instead of 0. - * lex.c (make_lang_type): Likewise. - -Wed Mar 30 14:10:04 1994 Jason Merrill - - * decl.c (pushdecl): If pushing a C-linkage function, only do a - push_overloaded_decl. - (duplicate_decls): Standard overloading does not shadow built-ins. - -Tue Mar 29 00:54:18 1994 Jason Merrill - - * pt.c (end_template_decl): Don't call push_overloaded_decl. - - * init.c (do_friend): Don't call push_overloaded_decl. - - * decl.c (pushdecl): Call push_overloaded_decl for functions and - function templates. - (duplicate_decls): Functions and function templates are not - duplicates, but don't complain about calling this function to - compare them. - (push_overloaded_decl): Don't deal with linkage. Call - duplicate_decls. - (redeclaration_error_message): Deal with linkage. - - * decl.c (start_function): If push_overloaded_decl returns an - older version of the function, deal with it. - - * decl.c (start_function): Be sure only to push_overloaded_decl - for non-members. - - * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for - methods. - (start_function): Lose broken and redundant code for checking old - decl. - - * init.c (add_friend): Give line numbers of both friend decls - when warning about re-friending. - - * pt.c (tsubst): Use comptypes rather than == to compare the - types of the method as declared and as defined, since default - parameters may be different. - - * call.c (build_method_call): Use brendan's candidate printing - routine. - - * decl.c (start_method): Methods defined in the class body are - inline whether or not it's a template class. - -Mon Mar 28 16:39:26 1994 Jason Merrill - - * parse.y (initdcl0): Add "extern" to current_declspecs if - have_extern_spec && ! used_extern_spcec. - - * tree.c (really_overloaded_fn): A fn with more than one - overload. - - * pt.c (end_template_decl): Use really_overloaded_fn. - - * decl.c (duplicate_decls): When smashing a decl into a previous - definition, keep the old file and line. - Don't deal with overloaded functions. - Lose old code for checking arg types of functions. - Check for overloaded C functions. - (pushdecl): Deal with overloaded functions. - (start_decl): Expect pushdecl to return an appropriate function decl. - (start_function): Likewise. - (push_overloaded_decl): Don't check for overloaded C functions. - - * *.c: Stop using DECL_OVERLOADED, it being archaic. - TREE_OVERLOADED should probably go, too. - -Mon Mar 28 14:00:45 1994 Ron Guilmette - - * typeck.c (comp_target_types): Call comp_target_parms with - strict == 1. - -Sun Mar 27 00:07:45 1994 Jason Merrill - - * parse.y (empty_parms): Don't parse () as (...) in extern "C" - sections if we're compiling with -ansi or -pedantic. - - * decl.c (decls_match): Don't treat (int) and (int&) as matching. - - * decl2.c (grokfield): Don't pedwarn twice about initializing - field. - - * decl.c (push_overloaded_decl): Warn about shadowing - constructor. - (redeclaration_error_message): Don't allow 'int a; int a;' - - * cvt.c (build_up_reference): Only check for valid upcast if - LOOKUP_PROTECT is set, not just any flag. - -Fri Mar 25 01:22:31 1994 Jason Merrill - - * lex.c (check_newline): When we see a #pragma implementation, - also set it for the main input file. - - * init.c (build_new): Convert array size argument to size_t. - - * parse.y (primary): If we're doing a parenthesized type-id, call - groktypename before passing it to build_new. - - * call.c (build_method_call): Deal properly with const and - volatile for instances of reference type. - - * decl.c (store_return_init): Change 'if (pedantic) error' to 'if - (pedantic) pedwarn'. - - * decl.c (grokdeclarator): Don't complain about putting `static' - and `inline' on template function decls. - -Thu Mar 24 23:18:19 1994 Jason Merrill - - * call.c (build_method_call): Preserve const & volatile on - `this'. - -Thu Mar 24 16:21:52 1994 Mike Stump - - * init.c (build_new, build_vec_delete): Use global new and delete - for arrays. - * decl2.c (delete_sanity): Likewise. - -Thu Mar 24 02:10:46 1994 Jason Merrill - - * cvt.c (convert_to_reference): If i is an lvalue, - (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP. - (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN. - -Wed Mar 23 17:45:37 1994 Jason Merrill - - * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS - and DECL_TEMPLATE_INSTANTIATIONS. - - * init.c (build_new): Handle array typedefs properly. - -Wed Mar 23 18:23:33 1994 Mike Stump - - 30th Cygnus<->FSF merge. - -Wed Mar 23 00:46:24 1994 Mike Stump - - * class.c (modify_vtable_entries): Avoid running off the end of the - virtuals list when processing a virtual destructor. - * class.c (get_vtable_entry): Likewise. - -Wed Mar 23 00:23:59 1994 Jason Merrill - - * decl.c (duplicate_decls): If two template decls don't match, - just return 0. - -Tue Mar 22 23:49:41 1994 Jason Merrill - - * typeck.c (convert_for_assignment): Don't pedwarn about - converting function pointer to void *. - -Tue Mar 22 22:23:19 1994 Mike Stump - - Major revamp of pointer to member functions. Cures major - nonfunctionality when used in casts, and MI situations. - - * cvt.c (convert_force): Update call site of build_ptrmemfunc. - * typeck.c (convert_for_assignment): Likewise. - * typeck2.c (digest_init): Likewise. - * typeck2.c (process_init_constructor): Simplify by moving code into - digest_init. - * typeck2.c (digest_init): Do default_conversions on init value, if - we are processing pointer to member functions. - * class.c (get_vfield_offset): Now non-static. Convert bit offset - into byte offset. - * cp-tree.h (get_vfield_offset): Likewise. - * typeck.c (get_member_function_from_ptrfunc): Convert down to right - instance, before fetching vtable pointer. - * typeck.c (get_delta_difference): New routine. - * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also - get vtable pointer out of right subobject. - -Tue Mar 22 17:56:48 1994 Mike Stump - - * search.c (get_binfo): Return NULL instead of aborting, when - passed a UNION_TYPE. - -Tue Mar 22 12:44:54 1994 Jason Merrill - - These patches implement handling of redefinition/redeclaration of - templates. - - * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are - considered compatible. - - * parse.y (template_def): Pass defn argument to end_template_decl. - - * pt.c (end_template_decl): Add defn argument. Check for - redefinition. Simplify. - - * error.c (OB_UNPUT): New macro, to remove mistakes. - (aggr_variety): Subroutine of dump_aggr_type. - - * decl.c (decls_match): Support templates. - (duplicate_decls): No longer static. Don't try to lay out template - decls. - (pushdecl): Simplify. - - * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of - DECL_INITIAL. - -Mon Mar 21 11:46:55 1994 Jason Merrill - - * error.c (dump_decl): Support class template decls. - (dump_type): Don't adorn template type parms. - - * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl - if it was a definition. - (redeclaration_error_message): Do the cp_error thang, and reject - redefinition of templates. - -Mon Mar 21 19:36:06 1994 Per Bothner - - * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE - in FIELD context, when appropriate. Also, - CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC. - Also, simplify check for bogus return specifiers. - -Mon Mar 21 11:46:55 1994 Jason Merrill - - * parse.y (after_type_declarator1): Expand type_quals. - (notype_declarator1): Likewise. - (absdcl1): Likewise. - -Sat Mar 19 01:05:17 1994 Jason Merrill - - * decl.c (grokdeclarator): Treat class-local typedefs like static - members; i.e. 'typedef int f();' means that f is a function type, - not a method type. - - * parse.y (decl): Change direct_* back to *. - (type_id): Change direct_abstract_declarator to absdcl. - (direct_declarator, direct_initdecls, direct_initdcl0): Remove again. - -Fri Mar 18 12:47:59 1994 Jason Merrill - - These two patches fix crashes on instantiating a template inside a - function with C linkage or containing labels. - - * class.c (current_lang_stacksize): No longer static. - - * decl.c (struct saved_scope): Add lang_base, lang_stack, - lang_name, lang_stacksize, and named_labels. - (push_to_top_level): Save them. - (pop_from_top_level): Restore them. - - * gxxint.texi (Parser): Update. - - These two patches finish moving the task of expr/declarator - ambiguity resolution from the lexer to the parser, and add one more - r/r conflict. START_DECLARATOR can now be nuked. - - * parse.y (decl): Add "direct_" in typespec X rules. - (direct_declarator): New nonterminal for - direct_after_type_declarator and direct_notype_declarator. - (direct_initdecls): Like initdecls, but uses direct_initdcl0. - (direct_initdcl0): Like initdcl0, but uses direct_declarator. - (named_parm): Add typespec direct_declarator rule. - - * spew.c (yylex): #if 0 out START_DECLARATOR insertion. - - These two patches disable some excessive cleverness on the part of - g++; a non-class declaration always hides a class declaration in the - same scope, and g++ was trying to unhide it depending on the - enclosing expression. - - * spew.c (arbitrate_lookup): #if 0 out. - - * decl.c (lookup_name): Never call arbitrate_lookup. - - * parse.y (complex_notype_declarator1): Add '*' - complex_notype_declarator1 and '&' complex_notype_declarator1 rules. - - * parse.y (complex_direct_notype_declarator): Restore id_scope - see_typename TYPENAME rule, remove all other rules beginning with - those tokens. - (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule. - -Thu Mar 17 17:30:01 1994 Jason Merrill - - These changes fix the compiler's handling of the functional cast/ - object declaration ambiguities in section 6.8 of the ARM. They also - add 11 reduce/reduce conflicts. Sigh. - - * parse.y: Add precedence decls for OPERATOR and '~'. - (notype_unqualified_id): New nonterminal, encompasses all of the - ANSI unqualified-id nonterminal except TYPENAMEs. - (expr_or_declarator): New nonterminal to delay parsing of code like - `int (*a)'. - (primary): Use notype_unqualified_id. - (decl): Add typespec initdecls ';' and typespec declarator ';' - rules. - (initdcl0): Deal with the above. - (complex_notype_declarator1): A notype_declarator that is not also - an expr_or_declarator. - (complex_direct_notype_declarator): A direct_notype_declarator that - doesn't conflict with expr_or_declarator. Use - notype_unqualified_id. Remove id_scope see_typename TYPENAME rule. - (functional_cast): New nonterminal, for the three functional cast - rules. So that they can be moved after - complex_direct_notype_declarator. - (see_typename): Don't accept type_quals any more. - - * decl2.c (reparse_decl_as_expr): New function to deal with parse - nodes for code like `int (*a)++;'. - (reparse_decl_as_expr1): Recursive subroutine of the above. - (finish_decl_parsing): New function to deal with parse nodes for - code like `int (*a);'. See the difference? - -Thu Mar 17 12:16:10 1994 Mike Stump - - These changes break binary compatibility in code with classes - that use virtual bases. - - * search.c (dfs_get_vbase_types): Simplify and correct to make - sure virtual bases are initialized in dfs ordering. - * search.c (get_vbase_types): Simplify and make readable. - -Thu Mar 17 12:01:10 1994 Jason Merrill - - * parse.y: s/ typename / type_id /g - -Wed Mar 16 17:42:52 1994 Kung Hsu - - * parse.y (typespec): Add SCOPE TYPENAME for global scoped - type. e.g. ::B x. - - * decl.c (complete_array_type): Fix a bug that in -pendantic - mode even there's no initializer, it will continue to build - default index. - -Wed Mar 16 17:43:07 1994 Jason Merrill - - * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove - all of the scoped PTYPENAME rules. - -Wed Mar 16 16:39:02 1994 Mike Stump - - * init.c (build_offset_ref): The value of A::typedef_name is - always the TYPE_DECL, and never an error. - -Tue Mar 15 20:02:35 1994 Jason Merrill - - * search.c (get_base_distance_recursive): Two binfos can only - represent the same object if they are both via_virtual. - - * class.c (finish_base_struct): Check vbases for ambiguity, too. - - * search.c (get_vbase_types): Accept binfo argument, too. - -Tue Mar 15 19:22:05 1994 Kung Hsu - - * decl.c (complete_array_type): Complete TYPE_DOMAIN of the - initializer also, because back-end requires it. - -Tue Mar 15 15:33:31 1994 Jason Merrill - - * error.c (dump_expr): Support member functions (which show up as - OFFSET_REFs). - -Mon Mar 14 16:24:36 1994 Mike Stump - - * init.c (build_new): Set the return type of multidimensional - news correctly. - -Fri Mar 11 15:35:39 1994 Kung Hsu - - * call.c (build_method_call): If basetype not equal to type - of the instance, use the type of the instance in building - destructor. - -Thu Mar 10 17:07:10 1994 Kung Hsu - - * parse.y (direct_notype_declarator): Add push_nested_type for - 'template_type SCOPED_NAME' rule. - -Tue Mar 8 00:19:58 1994 Jason Merrill - - * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules. - -Sat Mar 5 04:47:48 1994 Jason Merrill - - * parse.y (regcast_or_absdcl): New nonterminal to implement late - reduction of constructs like `int ((int)(int)(int))'. - (cast_expr): Use it. - (sub_cast_expr): Everything that can come after a cast. - (typed_declspecs1): typed_declspecs that are not typed_typespecs. - (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule. - (direct_abstract_declarator): Replace '(' parmlist ')' rule with - '(' complex_parmlist ')' and regcast_or_absdcl. - (parmlist): Split - (complex_parmlist): Parmlists that are not also typenames. - (parms_comma): Enabler. - (named_parm): A parm that is not also a typename. Use declarator - rather than dont_see_typename abs_or_notype_decl. Expand - typed_declspecs inline. - (abs_or_notype_decl): Lose. - (dont_see_typename): Comment out. - (bad_parm): Break out abs_or_notype_decl into two rules. - -Fri Mar 4 18:22:39 1994 Jason Merrill - - * decl2.c (reparse_decl_as_casts): New function to change parse - nodes for `(int)(int)(int)' from "function taking int and returning - function taking int and returning function taking int" to "... cast - to int, cast to int, cast to int". - - * decl2.c (reparse_decl_as_expr): Recursive function to change - parse nodes for `A()()' from "function returning function returning - A" to "A().operator()". - - * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with - `typespec fcast_or_absdcl' rule. - (fcast_or_absdcl): New nonterminal to implement late reduction of - constructs like `A()()()()'. - (typename): Replace `typespec absdcl1' rule with - `typespec direct_abstract_declarator' rule. - (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule - with `fcast_or_absdcl type_quals' rule. - -Fri Mar 4 16:18:03 1994 Mike Stump - - * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it - matches Section 5.5. - -Fri Mar 4 14:01:59 1994 Jason Merrill - - * error.c (dump_type_prefix): Don't print basetype twice for - pmfs. - -Fri Mar 4 13:24:33 1994 Mike Stump - - * typeck.c (convert_arguments): Handle setHandler(A::handlerFn) - so that it is like setHandler(&A::handlerFn). Cures an `invalid - lvalue in unary `&''. - -Fri Mar 4 11:15:59 1994 Jason Merrill - - * gxxint.texi (Copying Objects): New section discussing default - op= problems with virtual inheritance. - - * decl2.c (grokoptypename): Just does grokdeclarator and - build_typename_overload, since the parser can't call grokdeclarator - directly. - - * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE - and TREE_TYPE on generated identifiers. - - * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore. - - * parse.y (parm): Convert `const char *' to `__opPCc' here. - - * error.c (dump_decl): Say sorry rather than my_friendly_aborting - if we can't figure out what to do. - (dump_type*): Likewise. - - * typeck2.c (build_m_component_ref): 'component' is an expr, not - a decl. Also move the IS_AGGR_TYPE check after the stripping of - REFERENCE_TYPE. - -Fri Mar 4 04:46:05 1994 Mike Stump - - * call.c (build_method_call): Handle b->setHandler(A::handlerFn) - so that it is like b->setHandler(&A::handlerFn). Cures an `invalid - lvalue in unary `&''. - -Thu Mar 3 12:38:15 1994 Jason Merrill - - * parse.y: Add precedence specification for START_DECLARATOR. - (type_quals): Move before primary. - (typename): Move before typed_declspecs, add 'typespec absdcl1' rule. - - * decl2.c (grokoptypename): Lose. - - * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan, - rather than waiting until later. - -Wed Mar 2 14:12:23 1994 Jason Merrill - - * parse.y (unary_expr): Use 'typename' in 'new' rules, rather - than expanding it inline. - (typename): Expand empty option of (former) absdcl inline. - (abs_or_notype_decl): Likewise. - (absdcl): Lose empty rule. - (conversion_declarator): New nonterminal for 'typename' of 'operator - typename'. - (operator_name): Use it instead of absdcl. - - * parse.y: Add precedence declarations for SCOPED_TYPENAME, - TYPEOF, and SIGOF. - (typed_declspecs): Accept typed_typespecs, rather than typespec - directly. Add rules with reserved_typespecquals. - (reserved_declspecs): Don't accept typespecqual_reserved at the - beginning of the list. The typed_declspecs rule will deal with this - omission. - (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL - directly. - - * parse.y (direct_notype_declarator, - direct_after_type_declarator, direct_abstract_declarator): Split up - the declarator1 nonterminals to match the draft standard and avoid - ambiguities. - (new_type_id, new_declarator, direct_new_declarator, - new_member_declarator): New nonterminals to implement the subset of - 'typename' allowed in new expressions. - (unary_expr): Use new_type_id instead of typename. - (after_type_declarator1, absdcl1): Fix semantics of member pointers. - (abs_member_declarator, after_type_member_declarator): Lose. - - * parse.y (absdcl1): Don't require parens around - abs_member_declarator. - (abs_member_declarator): Lose see_typename from rules. - (after_type_member_declarator): Likewise. - - * tree.c (get_identifier_list): New function, containing code - previously duplicated in get_decl_list and list_hash_lookup_or_cons. - (get_decl_list): Use it. - (list_hash_lookup_or_cons): Likewise. - - * parse.y (typed_declspecs, declmods): It's not necessary to hash - the declspecs on class_obstack, so don't. This way typed_typespecs - can reduce to typed_declspecs. - -Wed Mar 2 14:29:18 1994 Jason Merrill - - * cvt.c (build_up_reference): If we aren't checking visibility, - also allow base->derived conversions. - -Mon Feb 28 15:14:29 1994 Per Bothner - - * typeck.c (build_c_cast): Remove bogus hack when converting - to a reference type. - - * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST): - Removed, not used. - (lang_stype::methods, lang_decl::next_method): New fields. - (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros. - * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD. - - * cp-tree.h, decl2.c (flag_vtable_hack): New flag. - * decl2.c (finish_vtable_vardecl): If flag_vtable_hack, - and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of - a non-inline virtual function to control emitting of vtables. - * class.c (finish_struct): Build CLASSTYPE_METHODS list. - * search.c (build_vbase_vtables_init): Don't assemble_external - (yet) if flag_vtable_hack. - * class.c (build_vfn_ref): Likewise. - -Mon Feb 28 14:54:13 1994 Jason Merrill - - * parse.y (component_decl): Don't include "typed_declspecs - declarator ';'" speedup, since it breaks enums. - -Fri Feb 25 15:43:44 1994 Per Bothner - - * class.c (finish_struct): Minor optimization for building - fn_fields list. - -Fri Feb 25 15:23:42 1994 Jason Merrill - - * decl.c (start_function): Fix detection of function overloading. - -Thu Feb 24 22:26:19 1994 Mike Stump - - * lex.c (check_newline): #pragma interface can take a string - argument, just like #pragma implementation. #pragma implementation - checks for garbage on the line, line #pragma interface does. Main - input files do not auto implement like named files, #pragma - implementation must be used explicitly. - -Thu Feb 24 17:09:01 1994 Jason Merrill - - * parse.y (components): Handle list of one again. - (notype_components): Likewise. - (after_type_declarator1): Take maybe_raises out again. - - * gxxint.texi (Parser): Document additional r/r conflict. - -Wed Feb 23 14:42:55 1994 Jason Merrill - - * gxxint.texi (Parser): Add node. - - * Makefile.in (stamp-parse): Update expected conflict count. - - * parse.y (various): Replace "declmods declarator" with "declmods - notype_declarator". The comment saying that "declmods declarator ';'" - corresponds to "int i;" was wrong; it corresponds to "const i;". - (component_decl): Add "typed_declspecs declarator ';'" rule; this - *does* correspond to "int i;". Change "declmods components" to - "declmods notype_components". - (components): Don't deal with a list of one anymore. - (notype_components): New nonterminal, corresponds to notype_declarator. - ({after_,no}type_component_decl{,0}): More new nonterminals. - ({after_,no}type_declarator): Fold in START_DECLARATOR token. - Eliminates four reduce/reduce conflicts. - - (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist. - (nontrivial_exprlist): New nonterminal: A list of at least two - expr_no_commas's. - (nonnull_exprlist): Depend on nontrival_exprlist. - Eliminates four reduce/reduce conflicts. - - (named_class_head): Move intermediate code block into separate - nonterminal so that we can stick %prec EMPTY on it. - - Add more %prec EMPTY's to eliminate remaining shift/reduce - conflicts. - - (after_type_declarator): Add maybe_raises to fndecl rules. - (after_type_declarator_no_typename): Remove. - For correctness. - - Document remaining reduce/reduce conflicts. - -Tue Feb 22 12:10:32 1994 Jason Merrill - - * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN - (TYPE_BINFO (type)) if we care about the path. - - * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the - options are. - -Mon Feb 21 19:59:40 1994 Mike Stump - - * Makefile.in (mostlyclean): lex.c is a source file, don't - remove. - -Sat Feb 19 01:27:14 1994 Jason Merrill - - * parse.y: Eliminate 20 shift/reduce conflicts. - -Fri Feb 18 11:49:42 1994 Jason Merrill - - * pt.c (type_unification): Add subr argument; if set, it means - that we are calling ourselves recursively, so a partial match is OK. - (unify): Support pointers to methods and functions. - (tsubst): Support method pointers. - * decl.c (build_ptrmemfunc_type): No longer static, so that - tsubst can get at it. - - * init.c (is_aggr_typedef): Pretend template type parms are - aggregates. - * decl2.c (build_push_scope): If cname refers to a template type - parm, just grin and nod. - - * call.c (build_overload_call_real): Pass subr argument to - type_unification. - * pt.c (do_function_instantiation): Likewise. - * class.c (instantiate_type): Likewise. - - * search.c (get_base_distance): If BINFO is a binfo, use it and - don't mess with its BINFO_INHERITANCE_CHAIN. - - * cvt.c (convert_to_reference): Fix temporary generation. - If ambiguous, return error_mark_node. - - * init.c (build_new): Put back some necessary code. - -Thu Feb 17 15:39:47 1994 Jason Merrill - - * init.c (build_new): Deal with array types properly. - - * search.c (get_binfo): Become a shell for get_base_distance. - (get_binfo_recursive): Lose. - (get_base_distance_recursive): Find the path to the via_virtual base - that provides the most access. - (get_base_distance): Likewise. - - * parse.y (explicit_instantiation): Syntax is 'template class - A', not 'template A'. - - * typeck.c (convert_for_initialization): Remove bogus warning. - - * parse.y (datadef): Revert patch of Oct 27. - -Thu Feb 17 15:12:29 1994 Per Bothner - - * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node, - rather than integer_type_node. Does wonders for the Alpha. - -Thu Feb 17 13:36:21 1994 Jason Merrill - - * decl.c (build_ptrmemfunc_type): Make sure that the pmf type - goes onto the same obstack as its target type. - -Wed Feb 16 00:34:46 1994 Jason Merrill - - * cvt.c (convert_to_reference): If converting via constructor - on local level, go back to build_cplus_new approach. - - * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot - to error_mark_node to prevent expand_expr from building a cleanup - for this variable. - - * lex.c (default_assign_ref_body): Return *this from the memcpy - version, too. - - * decl.c (grok_reference_init): Just return if called with - error_mark_node, don't worry about initializing non-const reference - with temporary. - - * cvt.c (convert_to_reference): Do the right thing for - non-aggregate reference conversions, pedwarn when generating a - non-const reference to a temporary. - - * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and - TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES - again. - -Tue Feb 15 19:47:19 1994 Jason Merrill - - * decl.c (grok_reference_init): Pawn off a lot of the work on - convert_to_reference. Generally do the right thing. - - * cvt.c (convert_to_reference): Conform to the initial comment; - i.e. don't create temps if decl != error_mark_node. Handle - cleanups better for temps that do get created. Don't pretend - that we can use an 'A' to initialize a 'const double &' just by - tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY. - - * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on - constructor calls. - -Mon Feb 14 14:50:17 1994 Jason Merrill - - * decl.c (grok_reference_init): Make a temporary for initializing - const reference from constant expression. - -Mon Feb 14 11:31:31 1994 Per Bothner - - * cp-tree.h, decl.c (set_identifier_local_value): Deleted function. - * decl.c (pushdecl): Define decl in correct binding_level - (which isn't always the inner_binding_level). - - * cvt.c (build_up_reference): Don't ever call expand_aggr_init. - It's ugly, and I don't think it's the right thing to do. - - * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c: - Remove NEW_CLASS_SCOPING, assuming it is always 1. - * decl.c (pop_decl_level): Removed; manually inlined. - -Sun Feb 13 19:04:56 1994 Jason Merrill - - * class.h (candidate): Add basetypes field. - - * call.c (build_method_call): Do access checking after choosing a - function, not before. - - * Makefile.in (cvt.o, call.o, method.o): Depend on class.h. - (mostlyclean): Remove ../cc1plus. - -Fri Feb 11 11:52:26 1994 Jason Merrill - - * class.c (finish_struct): Don't allow adjusting access to a field - of a base class if a local field has the same name. - - * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs. - -Thu Jan 13 17:55:51 1994 Gnanasekaran Swaminathan - - * cp-tree.h (DESTRUCTOR_NAME_P): Do not confuse AUTO_TEMP names - with destructor names when either NO_DOLLAR_IN_LABEL or - NO_DOT_IN_LABEL are not defined. - - Now `template class A {...}' works. - - * pt.c (grok_template_type): Substitute template parm types - with actual types in complex type as well. - (coerce_template_parms): Update the grok_template_type () - function call. - - * pt.c (tsubst): Traverse method list using DECL_CHAIN. - - * decl.c (grok_op_properties): Allow operator++/-- to have - default arguments. - - * typeck2.c (store_init_value): Don't abort when called to - initialize a type that needs constructing with a CONSTRUCTOR. - - * init.c (expand_aggr_init_1, CONSTRUCTOR case): If - store_init_value fails, build and expand an INIT_EXPR. If - store_init_value succeeds, call expand_decl_init. - -Fri Feb 11 02:49:23 1994 Mike Stump - - * class.c (build_vbase_path): Use complete_type_p instead of - resolves_to_fixed_type_p to determine if the virtual bases are in - their right place for the type of expr. Cures problem of thinking a - virtual base class is one place, when it is in fact someplace else. - -Fri Feb 11 00:26:46 1994 Mike Stump - - * init.c (resolve_offset_ref): Make sure we first convert to - intermediate type, if given, when dealing with members off `this'. - Solves an incorrrect `type `foo' is not a base type for type - `multiple'' when it is infact, a base type. - -Thu Feb 10 21:49:35 1994 Mike Stump - - * class.c (modify_other_vtable_entries): Use get_binfo, instead - of binfo_value. Solves problem with compiler giving a `base class - `B' ambiguous in binfo_value (compiler error)' on complex MI - herarchies, when a virtual function is first defied in a virtual - base class. - -Thu Feb 10 17:19:32 1994 Mike Stump - - * class.c (build_vbase_path): Don't complain about ambiguous - intermediate conversion when converting down to a virtual base - class, even if they might seem to be ambiguous. - -Thu Feb 10 12:18:26 1994 Jason Merrill - - * typeck2.c (build_functional_cast): #if 0 out constructor - inheritance code, improve error messages. - - * class.c (finish_base_struct): Complain about base with only - non-default constructors in derived class with no constructors. - - * decl.c (grokdeclarator): Fix detection of virtual new/delete. - -Wed Feb 9 22:02:32 1994 Mike Stump - - * search.c (build_mi_virtuals, add_mi_virtuals, - report_ambiguous_mi_virtuals): Removed unneeded code. - * class.c (finish_struct_bits): Likewise. - -Wed Feb 9 11:27:17 1994 Jason Merrill - - * pt.c (end_template_instantiation): Push decl before - pop_from_top_level. - - * typeck2.c (build_m_component_ref): Make sure datum is of - aggregate type. - - * init.c (get_type_value): New function, returns - IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE. - - * call.c (build_method_call): Don't die on call to destructor for - non-type. - - * decl.c (grokdeclarator): Complain about virtual op new and op - delete, make static virtuals unvirtual instead of unstatic. - - * typeck.c (build_c_cast): Also call default_conversion on - methods. - - * decl.c (grokdeclarator): Don't complain about anonymous - bitfields. - - * parse.y (simple_stmt, for loops): Move the continue point after - the cleanups. - - * class.c (finish_struct): Fix setting of - TYPE_HAS_COMPLEX_INIT_REF. - -Tue Feb 8 13:21:40 1994 Jason Merrill - - * init.c (build_new): Deal with `new double (1)'. - - * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of - TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of - TYPE_NEEDS_CONSTRUCTING. - - * decl.c (duplicate_decls): Propagate access decls. - - * typeck2.c (process_init_constructor): Accept empty_init_node - for initializing unions. - - * class.c, lex.c, cp-tree.h: Use - TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used - before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in - some places. - - * decl.c (finish_decl): Don't complain about uninitialized const - if it was initialized before. - -Mon Feb 7 18:12:34 1994 Jason Merrill - - * lex.c (default_assign_ref_body): Don't deal with vbases for - now. - - * decl.c (finish_decl): Fix reversed logic for objects and other - things that need to be constructed but have no initializer. - - * class.c (finish_struct): Don't set TYPE_HAS_* flags that are - set by grok_op_properties or finish_decl. - - * decl.c: Don't warn about extern redeclared inline unless - -Wextern-inline is given. - * decl2.c (lang_decode_option): Likewise. - * cp-tree.h: Likewise. - -Mon Feb 7 17:29:24 1994 Per Bothner - - * decl.c (pushdecl_with_scope): Fix thinko. Add forward - declaration. - - * decl.c (pushdecl_with_scope): New function. - * decl.c (pushdecl_top_level): Use new function. - * decl.c (pushtag): Initialize newdecl. - * decl.c (pushtag): Push new type decl into correct scope. - -Mon Feb 7 14:42:03 1994 Jason Merrill - - * call.c, cvt.c, init.c, search.c, cp-tree.h: - Eradicate LOOKUP_PROTECTED_OK. - -Mon Feb 7 13:57:19 1994 Per Bothner - - * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter - 'globalize' to signify implicit declarations. - * decl.c (globalize_nested_type, maybe_globalize_type): Removed. - * decl.c (set_identifier_type_value_with_scope): New function. - * decl.c (set_identifier_local_value): Simplify. - * spew.c (yylex, do_addr): Modify to return a _DEFN if a - forward declaration (followed by ';' and not preceded by 'friend'). - * class.c, decl.c, except.c, init.c, parse.y, - pt.c, search.c: Add new argument to calls to xref_tag and - pushtag. - -Mon Feb 7 00:22:59 1994 Jason Merrill - - * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what - ACCESSIBLY_DERIVED_FROM_P meant before. - (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity. - - * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1. - - * search.c (get_base_distance_recursive): Members and friends of - a class X can implicitly convert an X* to a pointer to a private or - protected immediate base class of X. - (get_binfo_recursive): Likewise. - (get_base_distance): Ignore ambiguity if PROTECT < 0. - (get_binfo): Lose multiple values of PROTECT. - (compute_access): Protected is OK if the start of the - search is an accessible base class of current_class_type. - - * method.c (build_opfncall): Do check access on operator new here. - - * decl.c (finish_function): Don't check access on operator new - here. - -Sun Feb 6 14:06:58 1994 Jason Merrill - - * decl.c (xref_tag): The base of a derived struct is NOT always - public. Duh. - - * pt.c (do_explicit_instantiation): New function, called from - parser to do explicit function instantiation. - (type_unification): Allow the args list to be terminated with - void_list_node. - (do_pending_expansions): Look at i->interface for non-member - templates. - - * parse.y (datadef): Move explicit_instantiation here. - (structsp): From here. - (datadef): Complain about `int;'. - -Sun Feb 6 12:33:18 1994 Per Bothner - - * pt.c (end_template_instantiation), cp-tree.h: Remove unused - second parameter, and simplify first from a TREE_LIST where - we only care about its TREE_VALUE to just the value (an IDENTIFIER). - * pt.c (instantiate_member_templates): Simplify argument list - from a TREE_LIST to just an IDENTIFIER. - * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER. - * parse.y (template_instantiate_once): Simplify accordingly. - * decl.c (inner_binding_level): New. Use various places to - simplify. - -Sun Feb 6 02:49:37 1994 Jason Merrill - - * typeck2.c (build_functional_cast): int() -> int(0). - -Sat Feb 5 00:53:21 1994 Jason Merrill - - * class.c (finish_struct): Don't do a bitwise copy for op= if the - class has a virtual function table. - - * typeck.c (convert_for_initialization): Restore warnings about - not using defined op=. Should really be my_friendly_aborts, I - s'pose. - -Fri Feb 4 14:21:00 1994 Jason Merrill - - * class.c (finish_struct): Tidy up conditions for doing bitwise - copies of objects. - - * decl.c (build_default_constructor): #if 0 out. - - * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF, - CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR. - - * decl.c (grokdeclarator): Don't return void_type_node for - friends being defined here. - - * init.c (perform_member_init): Only do the init if it's useful. - - * lex.c (default_copy_constructor_body): If we don't need to do - memberwise init, just call __builtin_memcpy. - (default_assign_ref_body): Likewise. - - * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0. - -Fri Feb 4 13:02:56 1994 Mike Stump - - * lex.c (reinit_parse_for_method, cons_up_default_function): - Don't give warn_if_unknown_interface warning when it came from a - system header file. - * pt.c (end_template_decl, instantiate_template): Likewise. - * decl.c (start_decl): Likewise. - -Fri Feb 4 00:41:21 1994 Jason Merrill - - * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on - enums. - - * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of - IS_AGGR_TYPE, since we don't know it's a type. - -Thu Feb 3 11:36:46 1994 Jason Merrill - - * decl.c (grokdeclarator): Don't complain about anonymous unions. - - * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally - anonymous, but had a name given to it by a typedef. - - * decl.c (grokdeclarator): When renaming an anonymous struct, set - TYPE_WAS_ANONYMOUS. - - * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS. - - * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out. - - * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS. - (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS. - - * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested - anonymous structs that get typedef'd. - - * decl.c (grokdeclarator): Always return void_type_node for - friends. - - * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for - friends. - (dump_function_decl): Don't print out default args for - a function used in an expression. - - * decl.c (grokdeclarator): Give error on abstract declarator used - in an invalid context (i.e. `void (*)();'). - - * error.c (cp_line_of): Support _TYPE nodes. - (cp_file_of): Likewise. - - * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR; - it can happen for the RHS of an assignment stmt where the LHS is - a COND_EXPR. - - * init.c (expand_aggr_init_1): Deal with bracketed initializer - lists properly. - - * class.c (finish_struct): Deal with enumerators and typedefs - again. - -Wed Feb 2 11:30:22 1994 Jason Merrill - - * class.c (finish_struct): Tidy up loop over fields. - - * errfn.c (cp_thing): Don't advance twice after a format. - - * class.c (finish_struct): Complain about needing a constructor - if a member has only non-default constructors, and don't try to - generate a default constructor. - - * decl.c (finish_decl): Also do the constructor thing if - TYPE_NEEDS_CONSTRUCTING is set (for arrays). - - * search.c (unuse_fields): New function: mark all fields in this - type unused. - (dfs_unuse_fields): Helper function. - - * class.c (pushclass): If the new class is the same as the old - class, still unuse the fields. - (unuse_fields): Move to search.c. - - * decl.c (grok_op_properties): Add friendp argument. - (grokfndecl): Pass it. - (start_method): Likewise. - - * decl2.c (delete_sanity): Add use_global_delete parameter to catch - ::delete calls. - - * parse.y (unary_expr): Pass new parameter to delete_sanity. - - * lex.c (default_copy_constructor_body): Don't choke if the union - has no fields. - (default_assign_ref_body): Likewise. - - * call.c (compute_conversion_costs_ansi): Do the right thing for - ellipsis matches. - - * decl.c (push_to_top_level): Optimize. - - * decl.c (start_function): Look for the lexical scope of a friend - in DECL_CLASS_CONTEXT. - - * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends. - -Tue Feb 1 15:59:24 1994 Jason Merrill - - * cp-tree.h (TREE_GETS_PLACED_NEW): New macro. - - * init.c (init_init_processing): Don't assign BIN/BID to the - IDENTIFIER_GLOBAL_VALUEs of their respective operators. - (build_new): Check TREE_GETS_PLACED_NEW. - - * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of - op new with placement, set TREE_GETS_PLACED_NEW. - - * cp-tree.h (ANON_UNION_P): New macro. Applies to decls. - - * class.c (finish_struct): Don't treat anonymous unions like - other aggregate members. Do synthesize methods for unions without - a name, since they may or may not be "anonymous unions". - - * decl2.c (grok_x_components): Wipe out memory of synthesized methods - in anonymous unions. - - * lex.c (default_copy_constructor_body): Support unions. - (default_assign_ref_body): Likewise. - -Mon Jan 31 12:07:30 1994 Jason Merrill - - * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes. - - * error.c (args_as_string): New function (%A), like type_as_string - except NULL_TREE -> "..." - - * call.c (build_overload_call_real): Fix for new overloading. - - * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags - here. - - * parse.y (operator_name): Instead of here. - - * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list - of functions. - - * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY. - - * method.c (build_opfncall): Don't need to massage return value - any more, call build_overload_call with all flags. - - * typeck.c (build_x_binary_op): Put back speculative call to - build_opfncall. - (build_x_unary_op): Likewise. - (build_x_conditional_expr): Likewise. - -Mon Jan 31 10:00:30 1994 Mike Stump - - * cvt.c (build_type_conversion_1): Change call to pedwarn into - warning, and conditionalize upon warn_cast_qual. - -Fri Jan 28 11:48:15 1994 Jason Merrill - - * search.c (lookup_field): If xbasetype is a binfo, copy it to - avoid clobbering its inheritance info. - - * call.c (build_method_call): Don't overwrite basetype_path with - TYPE_BINFO (inst_ptr_basetype) if they have the same type. - - * search.c (compute_access): Fix handling of protected inheritance - and friendship with the enclosing class. - - * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for - initialization of arbitrary variable. - - * typeck2.c (build_functional_cast): Only try calling a method if - one exists. - - * decl.c (grokdeclarator): Move handling of constructor syntax - initialization into first loop for generality. - (parmlist_is_random): Lose. - - * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments - to default function. - -Thu Jan 27 19:26:51 1994 Jason Merrill - - * decl.c (grokparms): Abort if we get called with something we don't - expect. - -Thu Jan 27 17:37:25 1994 Mike Stump - - * call.c (build_overload_call_real): Change argument complain to - flags to match style of rest of code. Pass it down to - build_function_call_real as necessary. - * call.c (build_overload_call, build_overload_call_maybe): Change - argument complain to flags to match style of rest of code. - * cp-tree.h (build_function_call_real): Added fourth flags - argument. - * cvt.c (convert_to_reference): Only give warning messages, if - LOOKUP_COMPLAIN is set. - * typeck.c (build_x_function_call): Change simple complain - argument to build_overload_call_maybe and build_overload_call, to - LOOKUP_COMPLAIN to match style of rest of code. - * typeck2.c (build_functional_cast): Likewise. - * typeck.c (build_function_call_real): Add flags, so that we can - not complain, if we don't want to complain. Complain about - arguments, if we are complaining, otherwise don't. - * typeck.c (build_function_call, build_function_call_maybe): - Stick in flags argument. - * typeck.c (build_x_binary_op, build_x_unary_op, - build_x_conditional_expr, build_x_compound_expr): Follow style of - build_x_indirect_ref, as it is more correct and more common. - -Thu Jan 27 14:36:20 1994 Jason Merrill - - * call.c (build_method_call): Don't check for being called with - a pointer. - - * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the - static initializer function. - - * init.c (build_member_call): Use convert_force here, too. - - * search.c (compute_access): Only treat static members specially - if they are referenced directly. - -Wed Jan 26 18:28:14 1994 Jason Merrill - - * gxxint.texi (Access Control): New node. - - * search.c (current_scope): New function; returns whichever of - current_class_type and current_function_decl is the most nested. - (compute_access): Total overhaul to make it clearer and more - correct. Don't use the cache for now; in the only situation where - it was used before, it gained nothing. This frees up three of the - DECL_LANG_FLAGs for possible other use! - - * cp-tree.h: #if 0 out DECL_PUBLIC & friends. - - * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC. - - * call.c (build_method_call): Use convert_force to cast `this' -- - rely on the access checking for the method itself. - - * init.c (is_friend): Do the nesting thing, handle types. I am - my own friend. - (is_friend_type): Become a shell for is_friend. - (add_friend): Never stick in ctype. - Why are the friendship functions in init.c, anyway? - -Wed Jan 26 17:50:00 1994 Mike Stump - - * cvt.c (build_type_conversion_1): Don't conditionalize call to - pedwarn upon pedantic. - -Wed Jan 26 17:20:46 1994 Mike Stump - - * cvt.c (convert_to_reference): Add 8.4.3 checking so that one - gets a warning if one tries to initialize a non-const & from a - non-lvalue. - * cvt.c (convert_to_reference): Use %P format for argument - numbers in warnings. - -Wed Jan 26 14:35:06 1994 Mike Stump - - * init.c (build_delete): Follow style in call.c to construct the - virtual call to the desctructor, as that code is right. Fixes a - problem of the compiler saying a pointer conversion is ambiguous. - -Wed Jan 26 11:28:14 1994 Jason Merrill - - * cp-tree.h (VTABLE_NAME_P): Change other occurrence of - VTABLE_NAME_FORMAT to VTABLE_NAME. - - * *: s/visibility/access/g - -Tue Jan 25 18:39:12 1994 Jason Merrill - - * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR. - -Tue Jan 25 13:54:29 1994 Mike Stump - - * init.c (build_delete): Back out Jan 17th & 18th pacthes, as - they break libg++. - -Tue Jan 25 13:11:45 1994 Jason Merrill - - * decl.c (duplicate_decls): Fix pointer arithmetic. - -Mon Jan 24 15:50:06 1994 Chip Salzenberg - - [ cp-* changes propagated from c-* changes in 940114 snapshot ] - * cp-parse.y (maybe_attribute): Allow multiple __attribute__ - clauses on a declaration. - -Mon Jan 24 17:06:23 1994 Jason Merrill - - * class.c (finish_struct): Do synthesize methods for anon - structs, just not unions. - -Mon Jan 24 13:50:13 1994 Kung Hsu - - * decl.c (xref_tag): Handle anonymous nested type. - * decl.c (globalize_nested_type): Add no globalize bit check. - * spew.c (hack_more_ids): Templated nested decl not push top - level. - - * parse.y: Get rid of 'goto do_components'. It is much better - for debugging. - - * decl.c (is_anon_name): Get rid of the function and use the - macro ANON_AGGRNAME_P. - * pt.c: Ditto. - -Fri Jan 21 14:06:02 1994 Jason Merrill - - * class.c (finish_struct): Don't synthesize any methods for - anonymous structs/unions. - - * typeck.c (build_modify_expr): Don't treat pmf's as class objects. - -Thu Jan 20 18:56:46 1994 Jason Merrill - - * method.c (build_opfncall): Call build_indirect_ref on - synthesized instance for operator delete. - - * pt.c (type_unification): Don't abort if called with a list of - types in ARGS. - - * class.c (instantiate_type): Deal with function templates. - -Thu Jan 20 16:55:35 1994 Jim Wilson - - * Makefile.in (CC): Default to cc not gcc. - -Thu Jan 20 13:47:54 1994 Jason Merrill - - * typeck.c (build_modify_expr): Call constructor if appropriate. - - * decl.c (push_to_top_level): Clear out class-level bindings cache. - -Wed Jan 19 13:51:22 1994 Jason Merrill - - * call.c (resolve_scope_to_name): Work recursively (previously only - looked down one level). - - * lex.c (do_pending_inlines): If we're still dealing with the last - batch of inlines, don't start working on a new one. - - * Makefile.in (stamp-parse): Update conflict count. - (TAGS): Fix. - - * parse.y (explicit_instantiation): New rule; implements - 'template A' syntax (though not 'template foo(int)' yet). - (structsp): Add explicit_instantiation. - -Tue Jan 18 13:53:05 1994 Jason Merrill - - * class.c (finish_struct, etc.): Simplify decision to synthesize - a destructor. - - * call.c, class.c, cp-tree.h, decl.c, init.c, - ptree.c, search.c, typeck.c, typeck2.c: Nuke - TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING). - * init.c (expand_aggr_init_1): Don't try non-constructor methods - of initializing objects. - (build_new): Don't try other methods if the constructor lookup fails. - - * class.c (finish_base_struct): Set cant_have_default_ctor and - cant_synth_copy_ctor properly. - (finish_struct): Likewise. - -Mon Jan 17 13:58:18 1994 Jason Merrill - - * typeck.c (build_modify_expr_1): #if 0 out again. - (build_modify_expr): #if 0 out memberwise init code again. - - * lex.c (default_copy_constructor_body): Be const-correct. - (default_assign_ref_body): Likewise. - - * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide - whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING. - (expand_aggr_init): Disable silent conversion from initializer list - to list of args for a constructor. - - * class.c (base_info): Lose needs_default_ctor. - (finish_base_struct): Likewise. - (finish_struct): Likewise. - - * decl.c (init_decl_processing): Don't turn off flag_default_inline - just because flag_no_inline is on. - (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use - constructor. - - * class.c (finish_struct): Synthesize default ctor whenever - allowed. - - * Makefile.in (TAGS): Don't try to run etags on cp-parse.y. - -Sat Jan 15 18:34:33 1994 Mike Stump - - * Makefile.in, configure: Handle the C++ front-end in a - subdirectory. - * cp-*: Move C++ front-end to cp/*. - -Fri Jan 14 14:09:37 1994 Jason Merrill - - * cp-typeck.c (build_function_call_real): Modify to match other - instances of taking the address of the function. - - * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if - there are non-synthesized constructors. - Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR. - Always generate copy constructor if possible. - - * cp-tree.h (lang_type): Add has_real_constructor bitfield. - (TYPE_HAS_REAL_CONSTRUCTOR): Define. - - * cp-lex.c (default_copy_constructor_body): Use init syntax - for all bases. - - * cp-type2.c (store_init_value): Only give error for initializer list - if TYPE_HAS_REAL_CONSTRUCTOR. - -Thu Jan 13 15:38:29 1994 Jason Merrill - - * cp-tree.h (DECL_SYNTHESIZED): Add defn. - (lang_decl): Add synthesized bitfield to decl_flags. - - * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark - artificial methods, rather than a line # of 0. - -Fri Jan 14 18:25:29 1994 Kung Hsu - - * cp-decl (xref_tag): Fix a bug in conflict type. - * cp-parse.y: Add SCOPED_NAME for uninstantiated template nested - type reference. - * cp-spew.c (yylex): Generated SCOPED_NAME token. - * cp-lex.c (yyprint): Handle SCOPED_NAME. - -Fri Jan 14 17:00:29 1994 Mike Stump - - * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is - not right. - -Thu Jan 13 14:00:35 1994 Kung Hsu - - * cp-decl2.c (grok_x_components): Fix a bug that enum type does not - have type_flags. - -Thu Jan 13 11:39:34 1994 Mike Stump - - Ensure that all vtable pointers are initialized with all the right - values. - - * cp-class.c (is_normal): Changed to reflect new meaning of - CLASSTYPE_VFIELD_PARENT. - * cp-class.c (maybe_fixup_vptrs): Use of - CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use - BINFO_MODIFIED instead. - * cp-class.c (finish_struct): Changed to reflect new meaning of - CLASSTYPE_VFIELD_PARENT. - * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now. - * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open - coding it here. - * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and - re-implement. - * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs. - * cp-tree.h (vfield_parent): Changed to integer. - * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new - meaning. - * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs. - -Wed Jan 12 18:24:16 1994 Kung Hsu - - * cp-decl.c (xref_tag): Re-implement globalize nested type. - * cp-decl2.c (grok_x_components): Ditto. - * cp-parse.y: Ditto. - * cp-tree.h (lang_type): Add no_globalize bit in type_flags. - -Wed Jan 12 14:08:09 1994 Jason Merrill - - * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend - decls with a definition attached. - - * cp-typeck.c (build_modify_expr): Undo previous change in the case - of INIT_EXPRs. - -Tue Jan 11 19:33:03 1994 Jason Merrill - - * cp-typeck.c (build_modify_expr): Replace code for generating - assignment semantics for classes with an error. - (build_modify_expr_1): #if 0 out. - - * cp-decl.c (pushdecl): Patch bogus design of pushdecl - behavior for overloaded functions (it doesn't push anything). - - * cp-class.c (finish_struct): When generating default op=, - set TYPE_HAS_ASSIGNMENT. - -Mon Jan 10 18:48:06 1994 Mike Stump - - * cp-cvt.c (convert): Make {double, clashing enum} -> enum - invalid. - * cp-typeck.c (convert_for_assignment): Simplify. - * cp-decl2.c (warn_enum_clash): Removed. - * invoke.texi (-Wenum-clash): Removed. - * toplev.c (-Wenum-clash): Removed. - -Mon Jan 10 17:48:37 1994 Kung Hsu - - * cp-decl.c (finish_decl): Fix incorrect popclass call. - - * cp-decl.c (is_anon_name): New function, check whether the name - is anonymous name generated by compiler. - * cp-decl.c (grokdeclarator): Allow nested SCOPE_REF - * cp-spew.c (hack_more_ids): Handle nested type in template. - * cp-parse.y: Handle nested type reference in uninstantiated - template. - * cp-call.c (build_method_call): Handle uninstantiated template - case. - * cp-pt.c (search_nested_type_in_tmpl): New function, search nested - type in template. - * cp-pt.c (lookup_nested_type_by_name): New function, lookup nested - type by name. - * cp-pt.c (tsubst): Handle nested type search by name. - -Mon Jan 10 14:32:18 1994 Jason Merrill - - * cp-init.c (build_member_call): Propagate qualifiers to new type. - - * cp-call.c (build_method_call): Count functions the new way. - -Fri Jan 7 19:03:26 1994 Jason Merrill - - * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes, - too. - -Tue Jan 4 16:45:51 1994 Kung Hsu - - * cp-parse.y: Change to handle whether to globalize nested class. - * cp-decl.c (xref_tag, maybe_globalize_type): Likewise. - -Mon Jan 3 22:22:32 1994 Gerald Baumgartner - - * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c - cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y - cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c - gplus.gperf toplev.c: Incorporated C++ signature extension. - * cp-sig.c: New file, contains most of signature processing. - * cp-hash.h: Regenerated from gplus.gperf. - - * gcc.1 g++.1: Added explanation for the `-fhandle-signatures' - and `-fno-handle-signatures' command line flags. - - * gcc.texi: Changed the last-modification date. - * invoke.texi: Added `-fhandle-signatures' in the list of - C++ language options. Added explanation for this option. - -Tue Dec 28 21:10:03 1993 Mike Stump - - * cp-init.c (expand_vec_init): Remove comptypes test, as it is too - harsh here. - -Tue Dec 28 13:42:22 1993 Mike Stump - - * cp-pt.c (do_pending_expansions): Decide to expand a template - member function, based upon it's class type, not the class type of - the first place it was declared. - -Tue Dec 28 05:42:31 1993 Mike Stump - - * cp-class.c (is_normal): New routine, use to determine when the - given binfo is the normal one. (The one that should have the simple - vtable name.) - * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME - to check if two fndecls are `the same'. Sometimes this routine can - modify the main vtable, and normal should be 1, in that case, so use - is_normal() to determine if this is the main vtable for the class. - Don't recurse down virtual bases, as they are shared, and we take - care of them elsewhere. - * cp-class.c (modify_vtable_entries): If we have already updated the - vtable with the new virtual, don't do it again. - * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as - appropriate. Do virtual function overriding in virtual bases, after - normal overriding, so that the base function list in DECL_VINDEX is - not overridden, before we have a chance to run through the list. - Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'. - Make sure we pass the right address into modify_vtable_entries. - * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which - binfo is the one that has the vtable that we based our vtable on. - -Fri Dec 24 09:40:52 1993 Michael Tiemann - - * cp-typeck.c (c_expand_start_case): Use default_conversion to - convert expression from reference type if necessary. - -Wed Dec 22 17:58:43 1993 Jason Merrill - - * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before - trying to read its TREE_VALUE. - - * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here. - (finish_struct): Instead of here. - -Tue Dec 21 14:34:25 1993 Brendan Kehoe - - * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't - have TYPE_PTRMEMFUNC_P set before we try to build its - CLASSTYPE_ID_AS_LIST. - (get_decl_list): Likewise, when trying to read it. - - * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined. - (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT. - -Mon Dec 20 13:35:03 1993 Brendan Kehoe - - * cp-typeck.c (rationalize_conditional_expr): New function. - (unary_complex_lvalue): Use it. - (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it - with build_unary_op won't cut it. Don't wrap the COND_EXPR with a - SAVE_EXPR either. - - * cp-decl2.c (explicit_warn_return_type): Deleted variable. - (lang_decode_option): Set warn_return_type, not explicit_*, for - -Wreturn-type and -Wall. This is what rest_of_compilation uses to - decide if it should go into jump_optimize or not. - * cp-tree.h (explicit_warn_return_type): Deleted. - * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*. - (finish_function): Also complain about no return in a non-void fn if - we're being pedantic (don't rely on use of -Wreturn-type). - -Fri Dec 17 15:45:46 1993 Brendan Kehoe - - * cp-decl.c (grokdeclarator): Forbid declaration of a function as - static if it's being done inside another function. - - * cp-search.c (compute_visibility): Check for friendship both ways. - -Fri Dec 17 14:28:25 1993 Jason Merrill - - * cp-cvt.c (build_default_binary_type_conversion): Make error - messages more helpful. - - * cp-error.c (op_as_string): New function, returns "operator ==" - given EQ_EXPR or suchlike. - -Fri Dec 17 13:28:11 1993 Brendan Kehoe - - * cp-call.c (print_n_candidates): New function. - (build_overload_call_real): Use it when we complain about a call - being ambiguous. - -Fri Dec 17 12:41:17 1993 Jason Merrill - - * cp-call.c (build_method_call): Fix checking for static call - context. - - * cp-method.c (build_opfncall): Call build_indirect_ref on argument - to operator new. - - * cp-init.c (build_new): Don't mess with rval when building - indirect ref. - -Thu Dec 16 16:48:05 1993 Kung Hsu - - * cp-lex.c (default_assign_ref_body): Add check when TYPE_NESTED_ - NAME(type) may not be exist. It's not a problem for old compiler. - -Thu Dec 16 14:46:06 1993 Brendan Kehoe - - * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's - never used for anything. - (struct lang_type, member type_flags): Delete field - `alters_visibility', and up `dummy' by 1. - * cp-class.c (finish_base_struct): Delete code that copies the - setting of CLASSTYPE_ALTERS_VISIBILITIES_P. - (finish_struct): Delete code that sets it. - -Thu Dec 16 14:44:39 1993 Jason Merrill - - * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to - build_method_call that I messed up before. - - * cp-search.c (get_base_distance): If protect > 1, allow immediate - private base. - - * cp-class.c (finish_base_struct): Set cant_synth_* correctly. - (finish_struct): Likewise. Well, nigh-correctly; it won't deal - properly with the case where a class contains an object of an - ambiguous base class which has a protected op=. Should be fixed - when the access control code gets overhauled. - (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly. - -Thu Dec 16 12:17:06 1993 Brendan Kehoe - - * cp-lex.c (real_yylex): Turn the code back on that deals with - __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to - avoid the ambiguity problems that led to it being turned off in the - first place. - - * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P - to see if something is a method. - -Wed Dec 15 18:35:58 1993 Mike Stump - - * cp-typeck.c (build_modify_expr): Avoid error messages on small - enum bit fields. - * cp-typeck.c (convert_for_assignment): Add missing argument to - cp_warning and cp_pedwarn calls. - -Wed Dec 15 18:25:32 1993 Jason Merrill - - * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base - initializers; it's just anachronistic. - - * cp-decl.c (finish_decl): Don't require external-linkage arrays - to have a complete type at declaration time when pedantic. - -Tue Dec 14 11:37:23 1993 Jason Merrill - - * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set. - - * cp-call.c (build_method_call): Don't dereference pointer given - as instance. - - * cp-decl.c (finish_function): Don't pass pointer to - build_method_call. - (finish_function): Likewise. - - * cp-typeck.c (build_x_function_call): Likewise. - - * cp-method.c (build_component_type_expr): Likewise. - - * cp-init.c (build_member_call): Likewise. - (build_new): Likewise. - -Mon Dec 13 18:04:33 1993 Kung Hsu - - * cp-decl.c (xref_tag): Fix regression created by changes made - in Dec. 7 1993. - * cp-decl.c (xref_defn_tag): Fix parallel nested class problem. - -Fri Dec 10 12:40:25 1993 Brendan Kehoe - - * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print - out the final evaluation of the function, so we can see if ELLIPSIS, - USER, and EVIL were set at the end. - - * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue, - only go for setting TRIVIAL_CODE if we are dealing with types that - are compatible. - -Thu Dec 9 18:27:22 1993 Mike Stump - - * cp-decl.c (flag_huge_objects): New flag to allow large objects. - * toplev.c (lang_options): Likewise. - * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise. - * cp-decl.c (delta_type_node): New type for delta entries. - * cp-tree.h (delta_type_node): Likewise. - * cp-decl.c (init_decl_processing): Setup delta_type_node. - * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use - delta_type_node instead of short_integer_type_node. - * cp-class.c (build_vtable_entry): Likewise. - -Thu Dec 9 16:19:05 1993 Brendan Kehoe - - * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of - NO_{DOLLAR,DOT} macro checks, so it always gets defined. - (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL. - -Wed Dec 8 17:38:06 1993 Mike Stump - - * cp-decl.c (finish_decl): Make sure things that can go into - "common", do go into common, if -fcommon is given. - -Wed Dec 8 13:01:54 1993 Brendan Kehoe - - * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function. - (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out - argument matching diagnostics to make instantly clear what the - compiler is doing. - - * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue, - then check to see if the penalty was increased due to - signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't. - -Tue Dec 7 18:29:14 1993 Kung Hsu - - * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution - problem. - -Tue Dec 7 16:09:34 1993 Jason Merrill - - * cp-class.c (finish_struct): Before synthesizing methods, if no - methods have yet been declared then set nonprivate_method. Don't - set non_private method after synthesizing a method. - - * cp-lex.c (extract_interface_info): If flag_alt_external_templates - is set, tie emitted code to the location of template instantiation, - rather than definition. - - * cp-tree.h: Declare flag_alt_external_templates. - - * cp-decl2.c (lang_decode_option): Support -falt-external-templates. - - * toplev.c (lang_options): Likewise. - -Mon Oct 4 12:50:02 1993 Chip Salzenberg - - [changes propagated from 930810 snapshot] - * cp-decl.c (init_decl_processing): Make long long available for use - as SIZE_TYPE and PTRDIFF_TYPE. - (finish_decl): Allow file-scope static incomplete array. - (grokdeclarator): Don't pass on const and volatile fron function - value type to function type. - Warn here for volatile fn returning non-void type. - * cp-parse.y (attrib): Accept attributes `volatile' with alias - `noreturn', and `const'. - * cp-typeck.c (default_conversion): Don't lose const and volatile. - (build_binary_op_nodefault): Generate pedantic warning for comparison - of complete pointer type with incomplete pointer type. - (build_c_cast): Be careful that null pointer constant be INTEGER_CST. - -Tue Dec 7 10:46:48 1993 Jason Merrill - - * cp-init.c (expand_vec_init): When creating a temporary for copying - arrays, use the type of the source, not the target. - - * cp-cvt.c (convert): Pass an argument for errtype to - convert_to_reference. - - * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with - methods, -> and `this'. - -Mon Dec 6 17:12:33 1993 Jason Merrill - - * cp-error.c (parm_as_string): New function; returns `this' or arg - number. Corresponds to %P. - (dump_expr): Deal with method calls. - - * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment. - * cp-typeck.c (convert_for_assignment): Likewise. - (warn_for_assignment): Lose. - -Mon Dec 6 11:33:35 1993 Brendan Kehoe - - * cp-call.c (ideal_candidate_ansi): Delete code that was never - doing anything useful. Instead, sort once, and DO NOT wipe - out any codes with EVIL_CODE, since that's what we use as a - marker for the end of the list of candidates. - - * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN. - -Mon Dec 6 12:49:17 1993 Jason Merrill - - * cp-init.c (get_aggr_from_typedef): New function, like - is_aggr_typedef but returns the _TYPE. - - * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name. - -Sun Dec 5 18:12:48 1993 Brendan Kehoe - - * cp-lex.c (readescape): Pedwarn when a hex escape is out of range. - -Thu Nov 25 23:50:19 1993 Chip Salzenberg - - Delay language context change until beginning of next decl. - - * cp-lex.h (c_header_level): Removed. - (pending_lang_change): Declared. - * cp-lex.c (c_header_level): Renamed from in_c_header, made static. - (pending_lang_change): Defined. - (check_newline): Rework code that recognizes line number and - filename changes. Instead of pushing and popping lang context, - increment and decrement pending_lang_change. - (do_pending_lang_change): Push and pop lang context according - to value of pending_lang_change. - * cp-parse.y (extdefs): Use lang_extdef instead of extdef. - (extdef): Same as extdef, but call do_pending_lang_change() first. - -Mon Nov 15 15:39:15 1993 Chip Salzenberg - - * cp-typeck.c (build_binary_op_nodefault): Warn for ordered - compare of ptr with 0 only if pedantic in both cases. - -Thu Nov 25 13:31:37 1993 Chip Salzenberg - - Reinstate the below patch, which got lost in the Cygnus merge: - Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no) - * cp-parse.y (maybe_type_qual): Don't fail to set $$. - -Wed Nov 17 19:03:30 1993 Chip Salzenberg - - * cp-parse.y (attrib): Allow "ident(ident)" like the C front end. - -Fri Oct 22 20:43:37 1993 Paul Eggert - - * cp-lex.c (real_yylex): Diagnose floating point constants - that are too large. - -Wed Nov 17 19:10:37 1993 Chip Salzenberg - - * cp-type2.c (build_functional_cast): ARM page 16: When a class - and an object, function or enumerator are declared in the same - scope with the same name, the class name is hidden. - -Wed Nov 17 19:07:18 1993 Chip Salzenberg - - * cp-call.c (convert_harshness_ansi): Distinguish float, double, - and long double from each other when overloading. - (compute_conversion_costs_{ansi,old}, build_method_call, - build_overlay_call_real, convert_to_aggr): Always set and - always use H_LEN member of candidate structure. - -Mon Oct 11 23:10:53 1993 Chip Salzenberg - - * cp-decl.c (duplicate_decls): Note redeclarations of library - functions, and generate distinct warnings for them. - -Mon Oct 4 12:26:49 1993 Chip Salzenberg - - Support format warnings in G++. - - * cp-tree.h: Protect against multiple inclusion. - Declare all public functions in c-common.c (copy from c-tree.h). - (STDIO_PROTO): Define. - (warn_format): Declare. - (record_format_info): Remove declaration. - * cp-decl.c (init_decl_processing): Call init_function_format_info. - * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format. - * cp-typeck.c (build_function_call_real): Call check_function_format. - (record_format_info): Remove -- obsolete stub. - -Sat Jul 24 12:04:29 1993 Chip Salzenberg - - * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl - following an extern one (for -Wredundant-decls). - * cp-parse.y (primary): In statement expression case, if compstmt - returns something other than a BLOCK, return it unchanged. - -Thu Dec 2 20:44:58 1993 Chip Salzenberg - - * cp-decl.c (warn_extern_redeclared_static): New function made - from code extracted from pushdecl. - (duplicate_decls, pushdecl): Call new function. - (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE - to be a TREE_LIST when function is declared in 'extern "C" {}'. - -Fri Dec 3 16:01:10 1993 Jason Merrill - - * cp-class.c (duplicate_tag_error): Use cp_error. - (finish_base_struct): Check for ambiguity with direct base, and don't - generate op= or copy ctor if it exists. - -Fri Dec 3 15:32:34 1993 Kung Hsu - - * cp-init.c (expand_member_init): When initializer name is null, - don't try to build it now because emit_base_init will handle it. - -Fri Dec 3 12:28:59 1993 Jason Merrill - - * cp-lex.c (init_lex): Initialize input_filename to "" for - code such as ExceptionHandler::operator=. - -Fri Dec 3 10:32:08 1993 Jason Merrill - - * cp-decl.c (grokdeclarator): Don't try to print out dname when - complaining about arrays of references if decl_context==TYPENAME, - since it will be null. - - * cp-decl2.c: Default to flag_ansi_overloading. - -Thu Dec 2 18:05:56 1993 Kung Hsu - - * cp-call.c (build_method_call): Use binfo from instance if it's - different from binfo (basetype_path) passed from above. - -Wed Nov 17 19:14:29 1993 Chip Salzenberg - - cp-error.c (dump_expr): Use unsigned chars to output a - TREE_REAL_CST in hex. - -Thu Dec 2 11:05:48 1993 Jason Merrill - - * cp-class.c (finish_struct): Fix typo in setting - cant_synth_asn_ref. - - * cp-tree.h (TYPE_NESTED_NAME): New macro, does - DECL_NESTED_TYPENAME (TYPE_NAME (NODE)). - - * cp-lex.c (default_copy_constructor_body): Change - DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype). - (default_assign_ref_body): Likewise. - (default_copy_constructor_body): Call operator= explicitly for - base classes that have no constructor. - -Thu Dec 2 10:47:15 1993 Michael Tiemann - - * cp-call.c (build_method_call): If the instance variable is - converted to error_mark_node when we're trying to convert it to the - base type of a method we're looking up, return error_mark_node. - -Thu Dec 2 10:41:16 1993 Torbjorn Granlund - - * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR - cases, tests for unsigned operands by peeking inside a NOP_EXPR. - -Wed Dec 1 13:33:34 1993 Brendan Kehoe - - * cp-call.c (compute_conversion_costs_ansi): Use the size of struct - harshness_code, not the size of short, for clearing out the - ansi_harshness. - - * cp-call.c (print_candidates): New function. - (build_method_call): When we had some candidates, but didn't get a - usable match, don't report that we got an error with the first - candidate. Instead, say there were no matches, and list the - candidates with print_candidates. In the second pass, make sure we - clear out ever_seen, so we can accurately count the number of - functions that qualified. - -Wed Dec 1 09:53:59 1993 Torbjorn Granlund - - * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR - only if op1 is known to be != -1. - (build_binary_op_nodefault): Handle *_DIV_EXPR likewise. - -Tue Nov 30 14:07:26 1993 Brendan Kehoe - - * cp-method.c (hack_identifier): If the field itself is private, and - not from a private base class, say so. - -Mon Nov 29 03:00:56 1993 Jason Merrill - - * cp-decl.c (grokdeclarator): Always warn on initialization of - const member. - -Wed Nov 24 00:49:35 1993 Jason Merrill - - * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly. - (finish_base_struct): Set cant_synth_asn_ref properly. - - * cp-lex.c (cons_up_default_function): Add section for operator=. - (default_assign_ref_body): New function, mostly cribbed from - default_copy_constructor_body. - - * cp-class.c (base_info): Add members cant_synth_copy_ctor, - cant_synth_asn_ref, no_const_asn_ref. - (finish_base_struct): Update no_const_asn_ref, note that you should - update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF. - (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and - initialize them properly. Set no_const_asn_ref properly. Set - cant_synth_* in some of the situations where they should be set. - Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call - to cons_up_default_function for operator=. - -Tue Nov 23 20:24:58 1993 Mike Stump - - * cp-cvt.c (convert_force): Add code to perform casting of pointer - to member function types. - * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate - when the conversion should be done, regardless. - * cp-tree.h (build_ptrmemfunc): Likewise. - * cp-type2.c (digest_init): Likewise. - * cp-typeck.c (convert_for_assignment): Likewise. - -Tue Nov 23 18:06:58 1993 Jason Merrill - - * cp-error.c (dump_expr): Do the right thing for variables of - reference type. - - * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF - and its kin properly. - (xref_tag): Propagate TYPE_GETS_ASSIGN_REF. - -Tue Nov 23 12:26:13 1993 Mike Stump - - * cp-method.c (build_opfncall): Don't count pointer to member - functions as aggregates here, as we don't want to look up methods in - them. The compiler would core dump if we did, as they don't have - normal names. - * cp-typeck.c (build_indirect_ref): Improve wording on error - message. - -Mon Nov 22 14:22:23 1993 Jason Merrill - - * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn - (since it's supported in other compiler bits). - - * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name - argument. - - * cp-error.c (dump_function_decl): Don't print return type for - constructors and destructors. - - * cp-cvt.c (cp_convert_to_pointer): Import code from - convert_to_pointer so we can return error_mark_node in the case of an - error, and to allow more meaningful error messages. - (build_type_conversion): Don't go through void* when trying - to convert to a pointer type. - - * cp-decl.c (grokfndecl): Move call to grok_op_properties back - after grokclassfn so that it's dealing with the right decl. - (grok_op_properties): Don't assert !methodp for op new and op delete. - - * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now - no uses of it in the compiler). - - * cp-call.c (build_scoped_method_call): Fix for destructors of simple - types. - (build_method_call): Likewise. - -Fri Nov 19 12:59:38 1993 Jason Merrill - - * cp-tree.c (count_functions): Abstraction function. - - * cp-call.c (build_overload_call_real): Deal with new overloading - properly, remove dead code. - - * gcc.c (default_compilers): Generate and use .ii files in the - intermediate stage of compiling C++ source. - -Fri Nov 19 11:26:09 1993 Jim Wilson - - * cp-expr.c (cplus_expand_expr): Make call_target a valid memory - address before using it, so it can be later safely compared. - -Fri Nov 12 15:30:27 1993 Jason Merrill - - * cp-pt.c (tsubst): Deal with new overloading. - - * cp-typeck.c (fntype_p): Is the arg function type? - (comp_target_parms): pedwarn on conversion from (anything) to (...). - (build_x_function_call): Deal with new overloading. - - * cp-tree.c (decl_list_length): Deal with new overloading. - (decl_value_member): Like value_member, but for DECL_CHAINs. - - * cp-decl.c (duplicate_decls): Deal with new overloading. - (start_decl): Likewise. - - * cp-class.c (instantiate_type): Deal with new overloading. - - * cp-call.c (convert_harshness_ansi): Deal with new overloading. - (convert_harshness_old): Deal with new overloading. - (build_overload_call_real): Likewise. - -Mon Nov 8 13:50:49 1993 Jason Merrill - - * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL - if unambiguous, NULL_TREE otherwise. - (get_first_fn): Returns the first appropriate FUNCTION_DECL. - (is_overloaded_fn): Returns whether or not the passed tree is - a function or list of functions. - - * cp-init.c (init_init_processing): Use `get_first_fn' to find - the FUNCTION_DEFN for new and delete. - - * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut - code size in half (I spit on special cases). - -Tue Sep 7 20:03:33 1993 Jason Merrill - - * cp-decl.c: Allow references and template type parameters as well diff --git a/contrib/gcc/cp/ChangeLog.2 b/contrib/gcc/cp/ChangeLog.2 deleted file mode 100644 index c4d6880..0000000 --- a/contrib/gcc/cp/ChangeLog.2 +++ /dev/null @@ -1,20677 +0,0 @@ -1999-12-31 Mark Mitchell - - * cp-tree.h (VF_NORMAL_VALUE): Remove. - * class.c (struct base_info): Remove vfield, vfields, and rtti. - (set_primary_base): New function, split out from ... - (finish_base_struct): ... here. Rename to ... - (determine_primary_base): ... this. Simplify. - (create_vtable_ptr): Tweak accordingly. - (finish_struct_1): Simplify. - - * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation. - (CLASSTYPE_N_BASECLASSES): Likewise. - (BINFO_FOR_VBASE): New macro. - (get_vbase_types): Change prototype. - * class.c (build_vbase_path): Use BINFO_FOR_VBASE. - (prepare_fresh_vtable): Likewise. - (finish_vtbls): Likewise. - (get_class_offset_1): Likewise. - (modify_all_indirect_vtables): Likewise. - (build_vbase_pointer_fields): Likewise. - * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here. - * init.c (sort_base_init): Use BINFO_FOR_VBASE. - (expand_member_init): Likewise. - * search.c (get_base_distance): Likewise. - (lookup_field_queue_p): Likewise. - (virtual_context): Likewise. - (get_vbase_types): Don't return a value. Set - CLASSTYPE_VBASECLASSES here. - * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE. - -1999-12-30 Mark Mitchell - - * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS. - -1999-12-29 Mark Mitchell - - * class.c (create_vtable_ptr): Put the vtable at the beginning of - the class, not the end, in the new ABI. - * tree.c (propagate_binfo_offsets): Do the right thing for the new - ABI. - -1999-12-29 Mark Mitchell - - * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy. - (CLASSTYPE_NEARLY_EMPTY_P): New macro. - * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P. - (check_field_decls): Likewise. - (check_bases_and_members): Likewise. - -1999-12-28 Mark Mitchell - - * cp-tree.h (do_inline_function_hair): Remove. - * class.c (layout_class_type): New function, split out from - finish_struct_1. - (fixup_pending_inline): Likewise. - (fixup_inline_methods): New function. - * method.c (fixup_pending_inline): Remove. - (do_inline_function_hair): Likewise. - - * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the - new ABI. - - * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals. - (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ... - (CLASSTYPE_PURE_VIRTUALS): ... this. - (lang_decl_flags): Replace abstract_virtual with pure_virtual. - (DECL_ABSTRACT_VIRTUAL_P): Rename to ... - (DECL_PURE_VIRTUAL_P): ... this. - (get_abstract_virtuals): Rename to ... - (get_pure_virtuals): ... this. - * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with - DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with - CLASSTYPE_PURE_VIRTUALS. - * class.c (build_vtable_entry): Likewise. - (finish_struct_bits): Likewise. Call get_pure_virtuals, not - get_abstract_virtuals. - (build_vtbl_initializer): Likewise. - (override_one_vtable): Likewise. - (check_methods): Likewise. - * decl.c (duplicate_decls): Likewise. - (redeclaration_error_message): Likewise. - (lang_mark_tree): Likewise. - * decl2.c (grok_function_init): Likewise. - (import_export_vtable): Likewise. - (import_expor_class): Likewise. - * typeck2.c (abstract_virtuals_error): Likewise. - * xref.c (GNU_xref_member): Likewise. - * search.c (get_abstract_virtuals): Rename to get_pure_virtuals. - -1999-12-26 Zack Weinberg - - * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING - throughout. - -1999-12-26 Mark Mitchell - - * decl.c (store_return_init): Use mode of old RTL generated for - DECL_RESULT, not the mode of DECL_RESULT itself. - * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE - for functions that used named return values. - -1999-12-24 Mark Mitchell - - * semantics.c (expand_body): Use - note_deferral_of_defined_inline_function. - -1999-12-22 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle CTOR_STMTs. - -1999-12-22 Alexandre Oliva - - * error.c (dump_decl): Support named return values. - -1999-12-20 Mark Mitchell - - * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments. - (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro. - (CLASSTYPE_PRIMARY_BINFO): Likewise. - * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF, - TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here. - (check_bases_and_members): Set them here instead. - (create_vtable_ptr): New function, split out from ... - (finish_struct_1): ... here. Use it. Tidy. Use - CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO. - * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as - the first field in the class. - * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle - seeing TYPE_VFIELD as the first field in the class. - - * cp-tree.h (TYPE_VIRTUAL_P): Rename to ... - (TYPE_POLYMORPHIC_P): ... this. - (TYPE_USES_COMPLEX_INHERITANCE): Rename to ... - (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this. - (TREE_CALLS_NEW): Remove. - (TREE_MANGLED): Likewise. - * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, - and TYPE_POLYMORPHIC_P. - * class.c (check_bases): Likewise. - (finish_base_struct): Likewise. - (finish_struct_bits): Likewise. - (check_for_override): Likewise. - (finish_struct_1): Likewise. - (get_vfield_name): Likewise. - * decl.c (xref_basetypes): Likewise. - * decl2.c (import_export_class): Likewise. - (import_export_decl): Likewise. - * error.c (dump_function_decl): Likewise. - * pt.c (instantiate_class_template): Likewise. - * repo.c (repo_inline_used): Likewise. - * rtti.c (build_headof): Likewise. - (get_tinfo_fn_dynamic): Likewise. - (build_x_typeid): Likewise. - (get_tinfo_var): Likewise. - (build_dynamic_cast_1): Likewise. - (synthesize_tinfo_fn): Likewise. - * search.c (lookup_field_1): Likewise. - (dfs_debug_mark): Likewise. - (maybe_suppress_debug_info): Likewise. - * typeck.c (build_component_ref): Likewise. - (build_component_addr): Likewise. - * typeck2.c (process_init_constructor): Likewise. - -1999-12-20 Nathan Sidwell - - * typeck.c (strip_all_pointer_quals): New static function. - (build_static_cast): Use it. Don't use at_least_as_qualified_p. - -1999-12-16 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE. - (dso_handle_node): New macro. - (flag_use_cxa_atexit): New variable. - (declare_global_var): New function. - (start_anon_func): Remove declaration. - (end_anon_func): Likewise. - * decl.c (get_atexit_node): New function, split out from - destroy_local_static. Handle flag_use_cxa_atexit. - (get_dso_handle_node): Likewise. - (start_cleanup_fn): Renamed from start_anon_func. Moved here from - except.c. Handle flag_use_cxa_atexit. - (end_cleanup_fn): Renamed from end_anon_func. Moved here from - except.c. - (declare_global_var): New variable. - (destroy_local_static): Handle flag_use_cxa_atexit. - * decl2.c (flag_use_cxa_atexit): New variable. - (lang_f_options): Likewise. - * except.c (start_anon_func): Remove. - (end_anon_func): Liekwise. - * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit. - * rtti.c (get_tinfo_var): Use declare_global_var. - -1999-12-16 Mark Mitchell - - * class.c (check_field_decls): Don't return a value. - (avoid_overlap): Moved here from tree.c. - (build_base_fields): Likewise. - (check_bases): New function, split out from finish_base_struct. - (check_bases_and_members): New function, split out from - finish_struct_1. - (struct base_info): Remove cant_have_default_ctor, - cant_have_const_ctor, cant_have_asn_ref. - (finish_base_struct): Split semantic analysis into check_bases. - (finish_struct_methods): Fix bogus assertion. - (check_field_decls): Call finish_struct_anon here. - (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES. - (finish_struct_1): Use check_bases_and_members. Reorganize. - * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. - (build_base_fields): Don't declare. - * tree.c (avoid_overlap): Remove. - (build_base_fields): Likewise. - - * optimize.c (struct inline_data): Remove scope_stmt. - (remap_block): Don't use insert_block_after_note. Don't update - scope_stmt. - (expand_call_inline): Don't update scope_stmt. - (optimize_function): Don't initialize scope_stmt. - * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted - NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes. - -1999-12-15 Mark Mitchell - - * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS - out of the class, rather than taking them as parameters. - (build_vbase_pointer_fields): Move here from tree.c. - (build_vtbl_or_vbase_field): New function. - (check_methods): Likewise. - (remove_zero_width_bitfields): Likewise. - (add_virtual_function): Use tree_cons instead of temp_tree_cons. - (delete_duplicate_fields_1): Tidy. Don't delete duplicate - USING_DECLs here. - (finish_struct_methods): Handle the case where there are no - methods here. - (get_basefndecls): Use tree_cons instead of temp_tree_cons. - (check_field_decls): Call delete_duplicate_fields here. - (finish_struct_1): Tidy. Use check_methods and - remove_zero_width_bitfields. - * cp-tree.h (build_vbase_pointer_fields): Remove. - * decl.c (grokdeclarator): Use tree_cons instead of - temp_tree_cons. - * decl2.c (qualified_lookup_using_namespace): Use tree_cons - instead of temp_tree_cons. - * lex.c (cons_up_default_function): Remove dead code. - * method.c (fixup_pending_inline): New function, split out from ... - (do_inline_function_hair): ... here. - * tree.c (build_vbase_pointer_fields): Remove. - -1999-12-15 Jason Merrill - - * tree.c (walk_tree): Walk operand subtrees in forward order. - * optimize.c (expand_call_inline): Likewise. - (optimize_function): Initialize id->scope_stmt to something useful. - (remap_block): Assume id->scope_stmt has a useful value. - -1999-12-15 Nathan Sidwell - - * typeck.c (build_c_cast): Expand warning message. Move pointer - alignment warning to after the cast. Don't warn about pointer - alignment when given a pointer to incomplete. - -1999-12-15 Richard Henderson - - * cp-tree.h (make_aggr_type): Declare. - * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE. - (make_aggr_type): New. - - * decl.c (build_typename_type, init_decl_processing): Use it. - (build_ptrmemfunc_type, xref_tag): Likewise. - * except.c (call_eh_info): Likewise. - * init.c (init_init_processing): Likewise. - * pt.c (process_template_parm, lookup_template_class): Likewise. - * rtti.c (expand_class_desc): Likewise. - * semantics.c (begin_class_definition, finish_typeof): Likewise. - * tree.c (copy_template_template_parm): Likewise. - -1999-12-15 Jason Merrill - - * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using - sizeof (struct tree_common). - -1999-12-14 Jason Merrill - - * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the - outermost block to point to the inlined function decl. - - * error.c (dump_decl): operator==, not operator ==. - (op_to_string): Likewise. - - * decl.c (compute_array_index_type): Handle null name. - - * decl2.c (ambiguous_decl): Fix to match comment. - (lookup_using_namespace): Adjust. - - * decl2.c (import_export_class): Don't ignore dllimport. - -1999-12-14 Mark Mitchell - - * class.c (check_field_decls): Split out from ... - (finish_struct_1): ... here. Use it. Tidy. - - * cp-tree.h (remap_save_expr): Add walk_subtrees parameter. - * optimize.c (copy_body_r): Pass it. - * tree.c (remap_save_expr): Clear walk_subtrees for an - already-handled SAVE_EXPR. - (cp_unsave_r): Pass walk_subtrees to remap_save_expr. - - * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS. - * ir.texi (DECL_NAMESPACE_ALIAS): Document it. - - * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION. - -1999-12-14 Mumit Khan - - * class.c (finish_base_struct): Allow multiple COM base classes - as well as non-COM bases as long as it's not the leftmost. - -1999-12-13 Mumit Khan - - * lex.c (saving_parse_to_obstack): New global. - (reinit_parse_for_block): Use. - (reinit_parse_for_expr): Use. - (check_newline): Use. - -1999-12-13 Mark Mitchell - - * optimize.c (initialize_inlined_parameters): Take FN to which the - parameters belong as an argument. - (expand_call_inline): Expand calls into the parameter - initializations before pushing the function onto the list of - functions we are presently expanding. - -1999-12-11 Kaveh R. Ghazi - - * class.c (get_vtable_name): Use a literal format string and - VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT. - (prepare_fresh_vtable): Likewise. - - * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of - VTABLE_NAME_FORMAT. - - * decl.c (make_rtl_for_local_static): Remove unused variable `type'. - - * init.c (build_vec_init): Initialize variable `try_body'. - - * lex.c (yyerror): Don't call a variadic function with a - non-literal format string. - - * optimize.c (optimize_function): Call memset, not bzero. - - * pt.c (for_each_template_parm_r): Add static prototype. - -1999-12-09 Andreas Jaeger - - * except.c (expand_throw): Add static attribute to match - prototype. - - * Makefile.in (semantics.o): Add dependency on output.h. - * semantics.c: Include output.h for declaration of - make_function_rtl. - -1999-12-09 Mark Mitchell - - * decl.c (init_decl_processing): Reenable inlining on trees. - (finish_function): Likewise. - * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here. - * semantics.c (simplify_aggr_init_exprs): New function. - (expand_body): Use it. - * tree.c (walk_tree): Special-case TARGET_EXPRs since they - sometimes present the same sub-tree twice. - - * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not - `csl'. - - * semantics.c (finish_switch_cond): Do conversions here, not ... - * typeck.c (c_expand_start_case): Here. - - * semantics.c (do_poplevel): Remove unused variable. - -1999-12-06 Mark Mitchell - - * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE - unless we're declaring the variable in question. - -1999-12-06 Mark Mitchell - - * decl.c (init_decl_processing): #if 0 last patch. - (finish_function): Likewise. - -1999-12-05 Mark Mitchell - - * decl.c (init_decl_processing): Set flag_inline_trees if - !flag_no_inline. - - * cp-tree.h (calls_setjmp_p): Declare. - * decl.c (finish_function): Mark functions that call setjmp as - uninlinable. - * optimize.c (calls_setjmp_r): New function. - (calls_setjmp_p): Likewise. - -1999-12-04 Mark Mitchell - - * optimize.c (expand_call_inline): Wrap the expanded call in an - EXPR_WITH_FILE_LOCATION node to get correct line numbers for - inlined functions. - - * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add - in_target_cleanup_p. - (remap_decl): New function. - (remap_block): Likewise. - (copy_scope_stmt): Likewise. - (copy_body_r): Use remap_decl and copy_scope_stmt. - (copy_body): Use VARRAY_TOP_TREE. - (initialize_inlined_parameters): Likewise. - (declare_return_variable): Likewise. - (inlinable_function_p): Check flag_inline_trees. - (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs - specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the - parameters of the inlined function. - (optimize_function): Prevent recursion into partially complete - functions. - - * cp-tree.def (SCOPE_STMT): Take one operand. - * cp-tree.h (SCOPE_STMT_BLOCK): New macro. - (SCOPE_NULLIFIED_P): Redefine. - (SCOPE_NO_CLEANUPS_P): New macro. - (add_scope_stmt): Change prototype. - * decl.c (poplevel): Tidy. Warn about unused variables here. - Record SCOPE_STMT_BLOCKs. - (finish_function): Keep DECL_INITIAL for functions that might be - inlined. - * ir.texi: Document SCOPE_NO_CLEANUPS_P. - * semantics.c: Include rtl.h. - (add_scope_stmt): Return the new scope statement and, for an - end-of-scope statement, its matching begin statement. Don't set - SCOPE_NULLIFIED_P. - (do_pushlevel): Simplify, now that we are always - function-at-a-time. - (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs. - (expand_stmt): Don't call expand_start_bindings or - expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set. - * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting - SCOPE_NULLIFIED_P. - * Makefile.in (semantics.o): Depend on RTL_H. - - * decl2.c (pending_statics_used): Make it a macro. - (saved_inlines_used): Likewise. - (finish_static_data_member_decl): Use VARRAY_PUSH_TREE. - (mark_inline_for_output): Likewise. - (ssdf_decls_used): Remove. - (start_static_storage_duration_function): Use VARRAY_PUSH_TREE. - (generate_ctor_or_dtor_function): Adjust accordingly. - -1999-11-24 Geoffrey Keating - Greg McGary - - * decl.c (duplicate_decls): Merge - DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, - DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK. - -1999-12-02 Mike Stump - - * init.c (perform_member_init): Handle parse errors better. - -1999-12-01 Mark Mitchell - - * cp-tree.h (min_tree_cons): Remove. - (scratch_ovl_cons): Likewise. - * decl.c (saveable_obstack): Don't declare. - (duplicate_decls): Tweak error-message. - (initialize_local_var): Explicitly mark the definition as static. - (finish_function): Call permanent_allocation, just so - that the middle-end sees the obstacks it expects. - (mark_cp_function_context): Likewise. - * init.c (build_new): Don't use min_tree_cons. - * lex.c (permanent_obstack): Don't declare. - (current_obstack, saveable_obstack): Likewise. - * spew.c (current_obstack, saveable_obstack): Likewise. - * tree.c (current_obstack, saveable_obstack): Likewise. - (scratch_ovl_cons): Remove. - (build_min_nt): Don't mess with obstacks. - (build_min): Likewise. - (min_tree_cons): Remove - * typeck.c (build_component_ref): Don't use scratch_ovl_cons. - (build_x_function_call): Likewise. - (build_c_cast): Don't use min_tree_cons. - -1999-11-29 Mark Mitchell - - * pt.c (tsubst_decl): Robustify. - -1999-11-27 Mark Mitchell - - * decl2.c (finish_file): Call expand_body for inline functions - that will be written out but that do not yet have RTL. - * semantics.c (expand_body): Do not generate RTL For inline - functions that do not yet need to be written out. - -1999-11-25 Mark Mitchell - - * Make-lang.in (CXX_SRCS): Add optimize.c. - * Makefile.in (CXX_OBJS): Add optimize.o. - (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H). - (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust. - (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise. - (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise. - (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise. - (dump.o): Likewise. - (optimize.o): New target. - * class.c: Don't include splay-tree.h. - * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT. - * cp-tree.h: Include splay-tree.h. - (DECL_UNINLINABLE): New macro. - (CTOR_BEGIN_P, CTOR_END_P): New macros. - (flag_inline_trees): New variable. - (local_variable_p): New function. - (nonstatic_local_decl_p): Likewise. - (optimize_function): Likewise. - (cplus_unsave_expr_now): Remove. - (copy_tree_r): Declare. - (remap_save_expr): Likewise. - * decl.c (local_variable_p): Don't - make it static. - (local_variable_p_walkfn): New function. - (make_rtl_for_local_static): Remove code to try to avoid writing - out static constants. - (emit_local_var): Fix indentation. - (nonstatic_local_decl_p): New function. - (check_default_argument): Use local_variable_p_walkfn, not - local_variable_p, when walking the tree. - (start_function): Set the DECL_CONTEXT for automatically generated - labels. - (finish_constructor_body): Use CTOR_STMT to mark the end of a - constructor. - * decl2.c: Don't include splay-tree.h. - (flag_inline_trees): Define. - * dump.c: Don't include - splay-tree.h. - * except.c (expand_end_catch_block): Fix comment formatting. - (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables. - (expand_throw): Tidy comment. - * init.c (build_vec_delete_1): Use create_temporary_var. - * lex.c (cplus_tree_code_type): Make it static. - (cplus_tree_code_length): Likewise. - (cplus_tree_code_name): Likewise. - * optimize.c: New file. - * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions - with computed gotos. - (setup_vtbl_ptr): Mark the beginnings of constructors with - CTOR_STMT. - (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE. - (expand_body): Call optimize_function. Save bodies if we're doing - inlining on trees. - * tree.c: Don't include splay-tree.h. Include insn-config.h and - integrate.h. - (copy_tree_r): Make it public. - (statement_code_p): New function. - (mark_local_for_remap_r): Likewise. - (cp_usave_r): Likewise. - (cp_unsave): Likewise. - (build_cplus_new): Set DECL_CONTEXT for temporary variables. - (walk_tree): Walk into `s' class nodes. Walk statement chains. - (copy_tree_r): Handle 's' class nodes. Restore chains for - statements. Nullify scopes. Don't copy types. - (init_tree): Set lang_unsave to cp_unsave. - (remap_save_expr): Define. - * ir.texi: Document CTOR_STMT. - -1999-11-24 Jason Merrill - - * search.c (note_debug_info_needed): Do perform this optimization - for dwarf2. - (maybe_suppress_debug_info): Likewise. Start by clearing - TYPE_DECL_SUPPRESS_DEBUG. - -1999-11-24 Mark Mitchell - - * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs. - - * decl2.c (finish_vtable_vardecl): Don't prune vtables here. - -1999-11-23 Kaveh R. Ghazi - - * decl.c (pushdecl, grokdeclarator): Don't call a variadic - function with a non-literal format string. - - * lex.c (do_identifier): Likewise. - - * typeck.c (build_unary_op): Likewise. - -1999-11-23 Mark Mitchell - - * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation. - -1999-11-22 Mark Mitchell - - * cp-tree.def (CTOR_COMPLETE): New tree node. - * decl.c (finish_constructor_body): Add it, to mark the end of the - constructor. - (finish_function): Don't call end_protect_partials here. - * ir.texi (CTOR_COMPLETE): Document it. - * semantics.c (expand_stmt): Handle it. - - * cp-tree.def (FUNCTION_NAME): New tree node. - * cp-tree.h (current_function_name_declared): Tweak documentation. - (lang_decl_flags): Add pretty_function_p, adjust dummy. - (DECL_PRETTY_FUNCTION_P): New macro. - * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__, - etc., in a template function. Use at_function_scope_p instead of - expanding it inline. - * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations - specially. - (tsubst): Handle FUNCTION_NAME. - (tsubst_copy): Likewise. - (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__, - etc. in instantiation. - * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc., - even in template functions. - (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the - conditional scope at the top of a destructor. - - * error.c (dump_function_decl): Use `[ with ... ]' syntax for - specializations too. - -1999-11-22 Nathan Sidwell - - * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT - when actually negative. - - * typeck.c (convert_for_assignment): Expand comment about - strange NULL check, moved from ... - (convert_for_initialization): ... here. Remove unneeded - code. - -1999-11-21 Alexandre Oliva - - * cp-tree.h (build_vec_delete): Remove `auto_delete' argument. - * init.c (build_vec_delete, build_vec_delete_1): Likewise. - Always destruct virtual bases of array components, but never - delete them. - (build_vec_init): Adjust invocations. - (build_delete): Likewise. - * decl2.c (delete_sanity): Likewise. - -1999-11-19 Nathan Sidwell - - * cp-tree.h (grok_method_quals): Return this pointer qualifiers. - * decl.c (grokdeclarator): Adjust calls to grok_method_quals. - * decl2.c (grok_method_quals): Accept `restrict' as applying to - the object pointer. Return such qualifiers. - (grokclassfn): Apply this pointer qualifiers. Cleanup unused - variables. - -1999-11-18 Mark Mitchell - - * except.c (expand_end_catch_block): Fix typo. - (expand_exception_blocks): Simplify. Don't call - expand_leftover_cleanups. - -1999-11-15 Jason Merrill - - * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic. - * pt.c (tsubst, case INTEGER_TYPE): Call it. - Check uses_template_parms. - - * class.c (finish_struct): If we're a local class in a template - function, add a TAG_DEFN. - * pt.c (lookup_template_class): If this is a local class in a - template function, call pushtag. - (tsubst_expr, case TAG_DEFN): Handle classes, too. - - Emit debug info with the vtable. - * search.c (maybe_suppress_debug_info): New function... - * class.c (finish_struct_1): ...split out from here. - * cp-tree.h: Declare it. - * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG - if we're writing out the vtable. - * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, - note_debug_info_needed): #if 0 out. - -1999-11-14 Mark Mitchell - - * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. - * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not - TREE_PERMANENT. - * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P. - * decl2.c (lookup_arg_dependent): Use it. - - * cp-tree.h (cp_finish_decl): Change prototype. - (finish_static_data_member_decl): Likewise. - (push_permanent_obstack): Remove declaration. - (push_expression_obstack): Likewise. - (push_scratch_obstack): Likewise. - (DECL_TEMPLATE_PARM_P): Robustify. - (SET_DECL_TEMPLATE_PARM_P): New macro. - * class.c (add_method): Don't manipulate obstacks. - (finish_vtbls): Likewise. - * cvt.c (build_up_reference): Adjust calls to cp_finish_decl. - * decl.c (binding_for_name): Don't manipulate obstacks. - (maybe_push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (duplicate_decls): Likewise. - (pushdecl): Likewise. - (implicitly_declare): Likewise. - (build_typename_type): Likewise. - (start_decl): Likewise. - (cp_finish_decl): Likewise. - (finish_decl): Likewise. - (destroy_local_static): Likewise. - (expand_static_init): Likewise. - (complete_array_type): Likewise. - (grokvardecl): Likewise. - (build_ptrmemfnc_type): Likewise. - (grokdeclarator): Likewise. - (xref_tag): Likewise. - (xref_basetypes): Likewise. - (start_enum): Likewise. - (finish_enum): Likewise. - (start_function): Likewise. - (finish_function): Likewise. - (start_method): Adjust call to cp_finish_decl. - * decl2.c (finish_static_data_member_decl): Don't manipulate - obstacks. - (grokfield): Likewise. - (grokbitfield): Likewise. - (get_temp_name): Likewise. - (get_sentry): Likewise. - (fnish_file): Likewise. - (lookup_arg_dependent): Likewise. - * except.c (call_eh_info): Likewise. - (push_eh_info): Likewise. - (do_pop_exception): Likewise. - (initialize_handler_parm): Likewise. - (expand_end_eh_spec): Likewise. - (alloc_eh_object): Likewise. - (expand_throw): Likewise. - * expr.c (extract_scalar_init): Likewise. - * init.c (build_java_class_ref): Likewise. - * lex.c (get_time_identifier): Likewise. - (snarf_defarg): Likewise. - (add_defarg_fn): Likewise. - (is_global): Simplify. - (do_identifier): Don't check TREE_PERMANENT. - * method.c (emit_thunk): Don't manipulate obstacks. - * parse.y (condition): Adjust call to cp_finish_decl. - (primary): Likewise. - (initdcl): Likewise. - (initdcl0_innards): Likewise. - (nomods_initdcl0): Likewise. - * pt.c (push_inline_template_parms_recursive): Use - SET_DECL_TEMPLATE_PARM_P. - (process_template_parm): Likewise. - (lookup_template_class): Don't manipulate obstacks. - (instantiate_class_template): Adjust call to - finish_static_data_member_decl. - (tsubst_decl): Don't manipulate obstacks. - (tsubst_expr): Likewise. - (instantiate_template): Likewise. - (instantiate_decl): Adjust calls to cp_finish_decl. - * rtti.c (call_void_fn): Don't manipulate obstacks. - (get_tinfo_var): Likewise. - (get_tinfo_fn_unused): Likewise. - (build_dynamic_cast_1): Likewise. - (expand_si_desc): Likewise. - (expand_class_desc): Likewise. - (expand_ptr_desc): Likewise. - (expand_attr_desc): Likewise. - (expand_generic_desc): Likewise. - (synthesize_tinfo_fn): Likewise. - * search.c (expand_upcast_fixups): Likewise. - * semantics.c (finish_asm_stmt): Likewise. - (finish_named_return_value): Likewise. - (begin_class_definition): Likewise. - (finish_class_definition): Likewise. - (finish_typeof): Likewise. - * tree.c (build_cplus_method_type): Likewise. - (reverse_path): Likewise. - (copy_template_template_parm): Likewise. - (build_expr_ptr_wrapper): Likewise. - (push_expression_obstack): Remove. - (push_permanent_obstack): Likewise. - * typeck.c (mark_addressable): Likewise. - -1999-11-13 Mark Mitchell - - * call.c (build_conditional_expr): Use build_target_expr_with_type. - (convert_like): Likewise. - (build_over_call): Likewise. - * cp-tree.h (build_target_expr): Remove. - (build_target_expr_with_type): New function. - * cvt.c (build_up_reference): Use get_target_expr. - * decl.c (build_target_expr): Move to ... - * tree.c (build_target_expr): Here. Make it static. - (build_target_expr_with_type): New function. Set DECL_CONTEXT on - the temporary VAR_DECLs. - (get_target_expr): Use it. - -1999-11-13 Jason Merrill - - * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT. - * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT. - * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn. - * class.c (set_rtti_entry): Use it. - -1999-11-12 Mark Mitchell - - * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups - here. - * semantics.c (finish_expr_stmt): Call it here instead. Move - default_conversion logic to semantic-analysis time. - -1999-11-12 Jason Merrill - - * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT. - -Fri Nov 12 12:56:32 MST 1999 Diego Novillo - - * init.c (init_init_processing): Re-instated Nov 11 patch after - approval. - -Fri Nov 12 10:42:02 MST 1999 Diego Novillo - - * init.c (init_init_processing): Undo patch from Nov 11, 1999. - Patch had not been approved yet. - -1999-11-12 Mark Mitchell - - * decl.c (compute_array_index_type): New function, split out from - grokdeclarator. - (create_array_type_for_decl): Likewise. - (grokdeclarator): Use them. - - * semantics.c (expand_stmt): Don't suspend_momentary or - resume_momentary. - -Thu Nov 11 12:42:11 MST 1999 Diego Novillo - - * init.c (init_init_processing): Header information for - arrays allocated via `new' should have the same alignment used by - malloc. - -1999-11-10 Mark Mitchell - - * error.c (dump_function_name): Don't crash if given a friend - pseudo-instantiation. - - * cp-tree.h (build_enumerator): Change prototype. - * decl.c (enum_next_value): Remove. - (enum_overflow): Likewise. - (init_decl_processing): Don't register enum_next_value as a root. - (start_enum): Clear TYPE_VALUES for a redefined enum. - (finish_enum): Reset the type of enumeration constants. - (build_enumerator): Fix indentation. Don't copy CONST_DECLs when - we don't need to. Maintain the TYPE_VALUES list and look there - for the previously defined enumeration constant. Let enumeration - constants have the type of their values until the enumeration type - is complete. - * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value. - (structsp): Adjust. - * parse.c: Regenerated. - * pt.c (tsubst_enum): Adjust according to build_enumerator changes. - -Wed Nov 10 12:43:21 1999 Philippe De Muyter - Kaveh R. Ghazi - - * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. - -1999-11-09 Mark Mitchell - - * cp-tree.h (language_function): Remove x_last_dtor_insn and - x_last_parm_cleanup_insn. - * decl.c (last_dtor_insn): Remove. - (last_parm_cleanup_insn): Likewise. - (expand_start_early_try_stmts): Don't set them. - (store_parm_decls): Likewise. - (save_function_data): Or save them. - (mark_lang_function): Or mark them. - -1999-11-08 Mark Mitchell - - * decl.c (store_parm_decls): Generate cleanup code at - semantic-analysis time. Destroy objects in the correct order. - -1999-11-07 Mark Mitchell - - * cp-tree.h (begin_new_placement): Remove. - (finish_new_placement): Likewise. - * class.c (finish_struct_1): Don't suspend_momentary or - resume_momentary. - * decl.c (grokdeclarator): Likewise. - (maybe_build_cleanup_1): Likewise. - * except.c (push_eh_cleanup): Likewise. - (build_terminate_handler): Likewise. - * init.c (build_new_1): Likewise. - * parse.y (parse_decl): Change prototype. - (initdecls, notype_initdecls, initdcl): Don't return int. - (initdcl0, notype_initdcl0, initdcl0_innards): Likewise. - (.begin_new_placement): Remove. - (.finish_new_placement): Likewise. - (nonmomentary_expr): Likewise. - (suspend_mom): Likewise. - (condition): Don't suspend_momentary, resume_momentary, or keep - track of need to resume. - (unary_expr): Likewise. - (new_placement): Likewise. - (decl): Likewise. - (structsp): Likewise. - (new_type_id): Likewise. - (maybe_parmlist): Likewise. - (direct_after_type_declaration): Likewise. - (direct_new_declarator): Likewise. - (direct_abstract_declaration): Likewise. - * parse.c: Regenerated. - * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary. - * semantics.c (begin_new_placement): Remove. - (finish_new_placement): Likewise. - -1999-11-05 Martin v. Löwis - - * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro. - (DECL_TEMPLATE_INFO): Use it. - * decl.c (warn_extern_redeclared_static): Do nothing for - TEMPLATE_DECLs. - * decl2.c (mark_used): Explicitly check for function or variable. - * semantics.c (finish_unary_op_expr): Check whether result is also - an INTEGER_CST. - -1999-11-05 Mark Mitchell - - * Makefile.in (typeck2.o): Depend on output.h. - * typeck2.c: Include output.h. - - * decl.c (flag_ansi): Remove declaration. - - * pt.c (tinst_level_tick): Make it static. - (last_template_error_tick): Likewise. - - * cp-tree.h (mapcar): Remove declaration. - (search_tree): Likewise. - (walk_tree_fn): New typedef. - (walk_tree): New function. - * tree.c (bot_manip): Change prototype. Adjust to be called via - walk_tree. - (bot_replace): Likewise. - (no_linkage_helper): Likewise. - (copy_tree_r): New function. - (search_tree): Rename, and adjust, to become ... - (walk_tree): New function. - (mapcar): Remove. - (target_remap): Remove. - (target_remap_count): Likewise. - (break_out_target_exprs): Use walk_tree. - * decl.c (local_variable_p): Change prototype. - (check_default_argument): Use walk_tree. - * pt.c (for_each_template_parm_r): New function, split out from ... - (for_each_template_parm): Here. Use it, via walk_tree. - -1999-11-03 Mark Mitchell - - * class.c (check_bitfield_decl): New function, split out from - finish_stuct_1. - (check_field_decl): Likewise. Recursively examine members of - anonymous structs. - (finish_struct_1): Use them. - * cp-tree.h (ANON_UNION_TYPE_P): New macro. - -1999-11-02 Mark Mitchell - - * decl.c (grokfndecl): Remove dead code. - - * dump.c (dequeue_and_dump): Fix thinko for catch-clauses. - -1999-11-02 Scott Snyder - - * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and - IMAGPART_EXPR. - * pt.c (tsubst_copy): Likewise. - -1999-11-01 Jason Merrill - - * decl2.c (maybe_make_one_only): Always make things comdat on - ELF targets, too. - -1999-10-31 Mark Mitchell - - * decl.c (finish_function): Call free_after_parsing for functions - we are not immediately turning into RTL. - -1999-10-31 Brendan Kehoe - - * cp-tree.h (flag_dump_translation_unit): Add decl. - -Sat Oct 30 22:42:50 1999 Stephen L Moshier - - * lex.c (yylex): Accept 'f' in mantissa of hex float constant. - -1999-10-30 Mark Mitchell - - * decl.c (pop_cp_function_context): Don't call free on a NULL - pointer. - * semantics.c: Include ggc.h. - (expand_body): Do garbage-collection after processing a template - function. Clear DECL_SAVED_TREE after generating RTL for a - function. - * Makefile.in (semantics.o): Depend on ggc.h. - -1999-10-29 Mark Mitchell - - * cp-tree.h (make_typename_type): Change prototype. - * decl.c (make_typename_type): Only complain if so requested. - * parse.y (nested_name_specifier): Adjust calls. - (typename_sub0): Likewise. - (typename_sub1): Likewise. - * parse.c: Regenerated. - * pt.c (convert_template_argument): Pass complain to - make_typename_type. - (tsubst): Likewise. - -1999-10-28 Mark Mitchell - - * semantics.c (finish_handler): End the scope of the handler - before attaching it to the statement-tree. - -1999-10-28 Ian Lance Taylor - - * rtti.c (build_dynamic_cast_1): Give a better error message for - an attempt to dynamic_cast from a non-polymorphic type. - -1999-10-27 Mark Mitchell - - * cp-tree.h (make_temp_vec): Remove. - (make_scratch_vec): Likewise. - * call.c (add_function_candidate): Use make_tree_vec. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - (add_template_candidate_real): Likewise. - * class.c (resolve_address_of_overloaded_function): Likewise. - * decl.c (start_function): Don't fool with the momentary obstack. - (finish_function): Likewise. - * init.c (expand_direct_vtbls_init): Likewise. - (begin_init_stmts): Likewise. - (finish_init_stmts): Likewise. - * pt.c (add_to_template_args): Use make_tree_vec. - (check_explicit_specialization): Likewise. - (coerce_template_parms): Likewise. - (lookup_template_class): Don't fool with the momentary obstack. - (instantiate_class_template): Likewise. - (tsubst_template_arg_vector): Use make_tree_vec. - (tsubst_aggr_type): Don't fool with the momentary obstack. - (tsubst_decl): Likewise. Use make_tree_vec. - (try_one_overload): Likewise. - (try_class_unification): Don't fool with the momentary obstack. - (get_bindings_real): Use make_tree_vec. - (set_mangled_name_for_template_decl): Likewise. - * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack. - * semantics.c (finish_expr_stmt): Likewise. - (finish_do_stmt): Likewise. - (finish_for_expr): Likewise. - (finish_switch_cond): Likewise. - (do_pushlevel): Likewise. - (do_poplevel): Likewise. - * tree.c (make_temp_vec): Remove. - - * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump - CLEANUP_P for a TRY_BLOCK. - * ir.texi: Document SAVE_EXPR. - -Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com) - - * call.c (build_over_call): Check that the built-in function is - of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS. - * typeck.c (build_function_call_real): Similarly. - -1999-10-26 Mark Mitchell - - * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call - remember_end_note. - -1999-10-24 Mark Mitchell - - * decl.c (push_overloaded_decl_1): Use pushdecl. - - * decl.c (auto_function): Replace #ifdef'd __inline with just - plain inline. - * lex.c (my_get_run_time): Likeise. - (yyprint): Likewise. - (identifier_type): Likewise. - * method.c (start_squangling): Likewise. - (end_squangling): Likewise. - (icat): Likewise. - (old_backref_index): Likewise. - (flush_repeats): Likewise. - (issue_ktype): Likewise. - * parse.y (empty_parms): Likewise. - * parse.c: Regenerated. - -1999-10-21 Mark Mitchell - - * dump.c (dequeue_and_dump): Replace several uses of - queue_and_dump_index with dump_child. - -1999-10-21 Kaveh R. Ghazi - - * expr.c: Include tm_p.h. - -1999-10-21 Mark Mitchell - - * cp-tree.h (SCOPE_PARTIAL_P): New macro. - (pushlevel_temporary): Remove. - (add_scope_stmt): New function. - * decl.c (pushlevel_temporary): Remove. - (poplevel): Use add_scope_stmt. - (start_decl_1): Likewise. - * semantics.c (add_scope_stmt): New function. - (do_pushlevel): Use it. - (do_poplevel): Use it. - (expand_stmt): Check SCOPE_PARTIAL_P. - - * cp-tree.def (EMPTY_CLASS_EXPR): New tree node. - * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR. - * expr.c (cplus_expand_expr): Expand it. - * ir.texi: Document EMPTY_CLASS_EXPR. - -1999-10-20 Mark Mitchell - - * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template - parameters as having namespace scope. - -1999-10-19 Mark Mitchell - - * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove. - (mangling_flags): New type. - (build_overload_int): Change prototype. - (build_overload_value): Likewise. - (numeric_output_need_bar): Improve comment. - (mangle_expression): New function, broken out from ... - (build_overload_int): Here. - (build_overload_value): Adjust for use of mangling flags. Don't - warn about real-valued template parameters here. Do handle - complex expressions involving real-valued template parameters. - (build_template_parm_names): Encase non-type template parameters - in underscores, if necessary. - (process_overload_item): Remove conditional on - PARM_CAN_BE_ARRAY_TYPE. - -1999-10-17 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR. - - * ir.texi: Clean up documentation of RETURN_INIT. - -1999-10-15 Greg McGary - - * lex.c (lang_init_options): Set flag_bounds_check as "unspecified". - (lang_init): Set default for flag_bounds_check if still "unspecified". - -1999-10-13 Andrew Haley - - * class.c (finish_struct_1): Force alignment of non-bitfields to - BITS_PER_UNIT. - -Wed Oct 13 22:01:35 1999 J"orn Rennecke - - * typeck2.c (process_init_constructor): Handle empty constructors. - -1999-10-13 Jason Merrill - - * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL. - - * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size - array error. - -1999-10-13 Mark Mitchell - - * decl.c (make_rtl_for_local_static): Don't create register RTL - for addressable constants. - -1999-10-13 Nathan Sidwell - - * cp-tree.h (build_x_va_arg): Prototype new function. - * call.c (build_x_va_arg): Define it. - * parse.y (unary_expr): Call build_x_va_arg. - - * cp-tree.h (convert_type_from_ellipsis): Prototype new function. - * call.c (convert_type_from_ellipsis): Define it. - * decl.c (init_decl_processing): Set lang_type_promotes_to. - - * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates. - -1999-10-11 Jason Merrill - - * class.c (fixed_type_or_null): Always set *nonnull. - -1999-10-10 Kaveh R. Ghazi - - * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing - __GNUC__ and __GNUC_MINOR__. - -1999-10-09 Mark Mitchell - - * cp-tree.h (make_rtl_for_local_static): New function. - * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for - local statics ... - (make_rtl_for_local_static): Here. - * semantics.c (expand_stmt): Use make_rtl_for_local_static. - -1999-10-08 Kaveh R. Ghazi - - * method.c: Include tm_p.h. - -1999-10-7 Franz Sirl - - * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type. - * lex.c (cp_make_lake_type): Likewise. - * tree.c (init_tree): Init make_lang_type_fn. - -1999-10-07 Mark Mitchell - - * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch - parameter. - - * semantics.c (expand_stmt): Don't pretend to have asmspecs for - local statics if we don't really have them. - - * ir.texi: Improve documentation for STMT_EXPR. Describe - CLEANUP_POINT_EXPR. - -1999-10-07 Jason Merrill - - * class.c (build_vtable_entry_ref): Use finish_asm_stmt. - -1999-10-07 Greg McGary - - * class.c (finish_struct_1): Use simpler method of - removing elements of a singly-linked list which doesn't - lose for classes without data members. - -1999-10-07 Mark Mitchell - - * friend.c (make_friend_class): Robustify. - - * semantics.c (finish_object_call_expr): Reject calls to template - types. - -1999-10-06 Mark Mitchell - - * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR. - - * cp-tree.h (CLASSTYPE_VFIELD): Remove. - * call.c (build_vfield_ref): Use TYPE_VFIELD, not - CLASSTYPE_VFIELD. - * class.c (get_vfield_offset): Likewise. - (finish_base_struct): Likewise. - (modify_one_vtable): Likewise. - (fixup_vtable_deltas): Likewise. - (finish_struct_1): Likewise. - * init.c (expand_virtual_init): Likewise. - * search.c (lookup_field_1): Likewise. - (expand_upcast_fixups): Likewise. - * typeck.c (build_component_ref): Likewise. - (build_binary_op_nodefault): Likewise. - - * dump.c (dqueue_and_dump): Dump TYPE_VFIELD. - * ir.texi: Document TYPE_VFIELD. - -1999-10-06 Brendan Kehoe - - * decl.c (grokdeclarator): Only warn about nonzero arrays if - !in_system_header (linux socketbits.h can give this for - __cmsg_data, which is using a GNU extension). - -1999-10-05 Mark Mitchell - - * decl2.c (start_static_storage_duration_function): Push the - function declaration so it ends up in namespace scope. - - * dump.c (DUMP_CHILDREN): Remove. - (DUMP_BINFO): Adjust. - (struct dump_node_info): Remove dump_children_p. - (queue_and_dump_type): Remove dump_children_p parameter. - (queue): Don't set dump_children_p. - (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to - queue_and_dump_index. - (dequeue_and_dump): Unconditionally print children. Adjust calls - to functions mentioned above. - (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue. - - * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR. - * dump.c (dequeue_and_dump): Dump them. - - * method.c (synthesize_method): Call setup_vtbl_ptr for destructors. - - * decl.c (start_function): Set current_in_charge_parm for - constructors, too, where appropriate. - * search.c (fixup_all_virtual_upcast_offsets): New function. - (expand_indirect_vtbls_init): Use it. - -1999-10-04 Nathan Sidwell - - * decl2.c (grok_alignof): Don't decay lvalues. - - * init.c (build_new): Remove unused variable. - -1999-10-04 Mark Mitchell - - * cp-tree.h (struct language_function): Remove static_labelno. - (static_labelno): Remove macro. - * method.c (build_overload_nested_name): Make static_labelno - static here. - - * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL, - to decide whether or not a function is defined. - - * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for - situations where make_node will do it automatically. - * decl.c (grok_reference_init): Likewise. - (expand_static_init): Likewise. - (do_static_initialization): Likewise. - * init.c (perform_member_init): Likewise. - (expand_aggr_init_1): Likewise. - (build_new_1): Likewise. - * method.c (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - * search.c (expand_upcast_fixups): Likewise. - * semantics.c (finish_stmt_expr): Likewise. - * typeck.c (build_unary_op): Likewise. - (check_return_expr): Likewise. - -1999-10-04 Jason Merrill - - * init.c (build_vec_delete_1): Fold COND_EXPRs. - -1999-10-03 Mark Mitchell - - * cp-tree.def (VEC_INIT_EXPR): Remove. - * cp-tree.h (struct stmt_tree): New type. - (struct saved_scope): Remove firstobj. Add x_saved_tree, - x_stmt_tree. - (class_cache_firstobj): Remove. - (struct language_function): Remove stmts_are_full_exprs_p, - x_last_tree, and x_last_expr_type. Add x_stmt_tree. - (current_stmt_tree): New macro. - (last_tree): Adjust. - (last_expr_type): Likewise. - (doing_semantic_analysis_p): Simplify. - (stmts_are_full_exprs_p): Adjust. - (begin_tree): Remove prototype. - (end_tree): Likewise. - (begin_stmt_tree): Change prototype. - (finish_stmt_tree): Likewise. - (building_stmt_tree): Simplify. - * decl.c (mark_stmt_tree): New function. - (mark_saved_scope): Use it. - (start_function): Rearrange slightly to call begin_stmt_tree - earlier. - (save_function_data): Tweak. - (finish_function): Adjust call to finish_stmt_tree. - (mark_lang_function): Use mark_stmt_tree. - * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR. - * init.c (build_new_1): Remove creation of VEC_INIT_EXPR. - (build_vec_init): Remove creation of stand-in initializer. - * pt.c (begin_tree): Remove. - (end_tree): Likewise. - * semantics.c (SET_LAST_STMT): New macro. Use it throughout. - (begin_compound_stmt): Handle a compound-statement outside of a - function. - (begin_stmt_expr): Handle a statement-expression outsidef of a - function. - (finish_stmt_expr): Likewise. - (begin_class_definition): Don't call begin_tree. - (finish_inline_definitions): Don't call end_tree. - (begin_stmt_tree): Take a pointer to tree, not a function as input. - (finish_stmt_tree): Likewise. - * tree.c (search_tree): Don't handle VEC_INIT_EXPR. - (mapcar): Likewise. - - * parse.y (simple_stmt): Don't call finish_stmt unnecessarily. - * parse.c: Regenerated. - - * dump.c (dqueue_and_dump): Dump bitfieldness. - - * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for - bitfields, rather than DECL_BIT_FIELD. - * ir.texi: Document how to tell whether or not a field is a - bitfield. - - * lex.c (make_lang_type): Fix typo in comment. - -1999-10-01 Jason Merrill - - * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues. - -1999-10-01 Mark Mitchell - - * pt.c (tsubst_decl): If the type of a template instantiation is - bogus, so is the whole instantiation. - -1999-09-30 Mark Mitchell - - * decl.c (initialize_local_var): Handle static variables here. - (cp_finish_decl): Tweak handling of function-scope static - variables. - * semantics.c (expand_stmt): Handle DECL_STMTs for static - variables. - - * method.c (emit_thunk): Don't crash when -fsyntax-only. - - * cp-tree.h (lang_decl_flags): Add global_ctor_p and - global_dtor_p. Add init_priority. - (DECL_ACCESS): Adjust accordingly. - (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros. - (GLOBAL_INIT_PRIORITY): Likewise. - * decl.c (lang_mark_tree): Adjust accordingly. - (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, - and GLOBAL_INIT_PRIORITY. - * dump.c (dequeue_and_dump): Print them. - * ir.texi: Document them. - - * decl2.c (struct priority_info_s): Remove initialization_sequence - and destruction_sequence. - (start_static_storage_duration_function): Return the body of the - function. Convert for function-at-a-time mode. - (generate_inits_for_priority): Remove. - (finish_static_storage_duration_function): Change prototype. - Adjust for function-at-a-time mode. - (do_static_initialization): Likewise. - (do_static_destruction): Likewise. - (do_static_initialization_and_destruction): Remove. - (start_static_initialization_or_destruction): New function. - (finish_static_initialization_or_destruction): Likewise. - (get_priority_info): Don't manipulation initialization_sequence or - destruction_sequence. - (prune_vars_needing_no_initialization): New function. - (write_out_vars): Likewise. - (finish_file): Use the various new functions instead of the old. - -Thu Sep 30 00:13:27 1999 Dirk Zoller - - * cp-tree.h (warn_float_equal): Declare. - * decl2.c (warn_float_equal): Define. - (lang_decode_option): Recognize -W[no-]float-equal. - * typeck.c (build_binary_op_nodefault): Conditionally warn - about equality tests of floating point types. - -1999-09-29 Jason Merrill - - Support normal type_info-based EH mechanisms with -fno-rtti. - * except.c (build_eh_type_type): Remove special -fno-rtti handling. - (build_eh_type_type_ref): Likewise. - (build_eh_type): Remove. - (expand_throw): Call build_eh_type_type, not build_eh_type. - * decl2.c (import_export_decl): Don't associate the tinfo fn with - the vtable if -fno-rtti. - * decl.c (init_decl_processing): Always init_rtti_processing. - - * rtti.c (get_typeid): Don't complain about -fno-rtti. - - * class.c (class_cache_obstack, class_obstack): Remove. - (init_class_processing): Don't initialize class_obstack. - (push_cache_obstack): Remove. - (pushclass): Don't call it. - * cp-tree.h: Remove prototype for push_cache_obstack. - * decl.c (decl_obstack, decl_stack, push_decl_level): Remove. - (pushlevel_class): Don't push_decl_level. - (poplevel_class): Don't pop_stack_level. - (push_class_level_binding): Don't push_cache_obstack. - (init_decl_processing): Don't initialize decl_obstack. - * search.c (push_class_decls): Don't push_cache_obstack. - * tree.c (list_hash_add): Put hash node on permanent_obstack. - (hash_tree_cons): Don't mess with obstacks. - (print_lang_statistics): Don't print stats for class_obstack and - decl_obstack. - -1999-09-29 Mark Mitchell - - * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL. - * ir.texi: Document DECL_EXTERNAL. - - * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs. - * ir.texi: Document THUNK_DECLs. - - * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c. - (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. - (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. - * error.c (dump_template_bindings): Remove unused parameter. - Handle multiple levels of template parameters. - (dump_template_decl): Use `parms', not `args', for template - parameters. Fix thinko. - (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass - flags to dump_template_bindings. - * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h. - (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. - (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. - (tsubst_copy): Clarify variable name. - (most_general_template): Robustify. - -1999-09-29 Nathan Sidwell - - * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME - to change primary template rendering. - -1999-09-29 Mark Mitchell - - * cp-tree.h (UPT_TEMPLATE): Remove. - (UPT_PARMS): Likewise. - (DECL_NEEDED_P): New macro. - * decl2.c (finish_vtable_vardecl): Use it. - (finish_objects): Don't crash with -fsyntax-only. - (finish_file): Use DECL_NEEDED_P. Don't prune vtables when - -fsyntax-only. - * pt.c (tsubst_friend_function): Remove FIXME that talks about - obstacks. - (tsubst_expr): Correct handling of function try-blocks. - * semantics.c: Include flags.h. - (expand_body): Don't do RTL generation if -fsyntax-only. - * Makefile.in (semantics.o): Depends on flags.h. - -1999-09-28 Gabriel Dos Reis - - * pt.c (most_general_template): Adjust declaration. - - * cp-tree.h: (most_general_template): Declare. - - * error.c (dump_template_value): Rename to ... - (dump_template_argument): This. - (dump_template_argument_list): New function. - (dump_type): Use it. - (dump_template_parameter): New function. - (dump_template_decl): Use it. - (dump_template_bindings): New function. - (dump_function_decl): Use it. Pretty print function template - instantiations. - -1999-09-28 Nathan Sidwell - - * decl.c (grokdeclarator): Distinguish parameter context for - diagnostics. Tidy up missing type diagnostic. - Diagnose `explicit' in one place. Diagnose `mutable' in one place. - -1999-09-28 Mark Mitchell - - * ir.texi: Improve documentation for TARGET_EXPR. - -1999-09-27 Nathan Sidwell - - Augment stringification of trees. - * cp-tree.h (tree_string_flags): New error stringifying enumeration. - (fndecl_as_string, type_as_string_real, args_as_string, - code_as_string, language_as_string, parm_as_string, - op_as_string, assop_as_string, cv_as_string): Remove. - (type_as_string, decl_as_string, expr_as_string): Adjust prototype. - (context_as_string): Declare new function. - * error.c (cp_printers): Move definition. - (OB_UNPUT): Remove. - (OB_END_TEMPLATE_ID): Adjust. - (interesting_scope_p): Remove. - (dump_scope): New static function. - (dump_qualifiers): Adjust prototype, reimplement. - (dump_template_value): Use tree_string_flags. - (dump_type_real): Move back to dump_type. - (dump_type): Adjust prototype. Use tree_string_flags. - (dump_aggr_type): Likewise. Use dump_template_parms. - (dump_type_prefix): Adjust prototype. Use tree_string_flags. - Return pad flag. - (dump_type_suffix): Adjust prototype. Use tree_string_flags. - (dump_simple_decl): Likewise. - (dump_decl): Likewise. Use dump_template_decl. - (dump_template_decl): New static function broken out of dump_decl. - (dump_function_decl): Adjust prototype. Use tree_string_flags. - (dump_parameters): Likewise. Prefix space. - (dump_exception_spec): Adjust prototype. Use tree_string_flags. - (dump_function_name): Likewise. Use dump_template_parms. - (dump_template_parms): New static function broken out of - dump_function_name. - (dump_expr_list): Adjust prototype. Use tree_string_flags. - (dump_expr): Likewise. - (fndecl_as_string): Removed - (type_as_string_real): Removed - (dump_binary_op): Adjust prototype. Use tree_string_flags. - (dump_unary_op): Likewise. - (type_as_string): Likewise. - (expr_as_string): Likewise. - (decl_as_string): Likewise. - (context_as_string): New function. - (lang_decl_name): Adjust. - (decl_to_string): New static print callback. - (expr_to_string): Likewise. - (fndecl_to_string): Likewise. - (code_as_string): Renamed to ... - (code_to_string): ... here. Adjust. - (language_as_string): Renamed to ... - (language_to_string): ... here. Adjust. - (parm_as_string): Renamed to ... - (parm_to_string): ... here. - (op_as_string): Renamed to ... - (op_to_string): ... here. - (assop_as_string): Renamed to ... - (assop_to_string): ... here. - (type_to_string): New static print callback. - (args_as_string): Renamed to ... - (args_to_string): ... here. Adjust. - (cv_as_string): Renamed to ... - (cv_to_string): ... here. Adjust. - * pt.c (mangle_class_name_for_template): Use tree_string_flags. - (print_template_context): Likewise. - -1999-09-26 Mark Mitchell - - * cp-tree.h (expand_throw): Remove prototype. - * except.c (expand_throw): Make it static. Use tree-generation - functions, rather than RTL-generation functions. - (build_throw): Use it. - * expr.c: Include except.h. - (cplus_expand_expr): Don't call expand_throw here. - * Makefile.in (expr.o): Depend on except.h. - * ir.texi: Update documentation for THROW_EXPR. - - * decl.c (start_function): Set x_dont_save_pending_sizes rather - than calling get_pending_sizes. - * init.c (build_new): Don't save and restore - immediate_size_expand; instead, assert that it has the expected - value already. - -1999-09-26 Kaveh R. Ghazi - - * lex.c (compiler_error): Add missing call to va_end(). - -1999-09-25 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle RESULT_DECL. - * ir.texi: Document RESULT_DECL and DECL_RESULT. - - * cp-tree.h (check_return_expr): New function. - * decl.c (finish_constructor_body): New function. - (pushdecl): Put global friend functions in namespace binding - level, not the class binding level. - (finish_destructor_body): Make sure the dtor_label is always - defined. Fix typo in comment. - (finish_function): Move generation of constructor-termination code - to semantic-analysis time. Move generation of implicit `main' - return value to semantic-analysis time. - * semantics.c (finish_return_stmt): Generate goto's to - ctor_label/dtor_label here. Use check_return_expr to do semantic - analysis on the returned expression. - * typeck.c (maybe_warn_about_returning_address_of_local): New - function split out from c_expand_return. - (check_return_expr): Likewise. - (c_expand_return): Just generate the RTL for the return. - -1999-09-24 Mark Mitchell - - * cp-tree.h (CPTI_CLEANUP_TYPE): New macro. - (cleanup_type): Likewise. - (search_tree): Change prototype. - * decl.c (local_variable_p): Adjust for new interface to - search_tree. - (check_default_argument): Likewise. - * error.c (dump_expr): Handle INIT_EXPR. - * except.c (expand_throw): Don't make cleanup_type a local static. - * expr.c (cplus_expand_expr): Don't handle NEW_EXPR. - * init.c (build_new): Call build_new_1 directly, rather than - building a NEW_EXPR. - (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when - processing file-scope initializers. - * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR. - * tree.c: Include splay-tree.h - (no_linkage_helper): Adjust for new interface to search_tree. - (search_tree): Pass around pointers to tree nodes, rather than the - nodes themselves. Handle VEC_INIT_EXPR. - (no_linkage_check): Adjust for new interface to search_tree. - (mapcar): Handle VEC_INIT_EXPR. - (target_remap): New variable. - (bot_manip): Use it. - (bot_replace): New function. - (break_out_target_exprs): Use it to remap all variables used in a - default argument expression. - * typeck.c (build_modify_expr): Don't crash when outside a - function and presented with an INIT_EXPR assignment - * Makefile.in (tree.o): Depend on splay-tree.h. - -Fri Sep 24 10:48:10 1999 Bernd Schmidt - - * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than - DECL_BUILT_IN. - (builtin_function): New arg CLASS. Arg CODE now of type int. All - callers changed. - Set the builtin's DECL_BUILT_IN_CLASS. - -1999-09-24 Mark Mitchell - - * decl.c (pushdecl): Don't make local declarations of extern - variables give the variable a DECL_CONTEXT for the function. - (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify. - Don't accidentally make RTL for local declarations. - (emit_local_var): Handle declarations with asm-specifiers here. - -1999-09-23 Mark Mitchell - - * ir.texi: Improve documentation for TARGET_EXPRs. Discuss - STMT_IS_FULL_EXPR_P. - - * cp-tree.h (language_function): Add cannot_inline. - * decl.c (start_function): Restore current_function_cannot_inline - from the saved value. - (save_function_data): Save current_function_cannot_inline. - * decl2.c (start_objects): Change prototype. Build the function - in function-at-a-time mode. - (finish_objects): Likewise. - (generate_ctor_or_dtor_function): Adjust accordingly. - - * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro. - * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS. - Don't call expand_anon_union_decl here - * semantics.c (exapnd_stmt): Call it here, instead. - * typeck.c (mark_addressable): Addressed variables are implicitly - used. - -1999-09-23 Martin v. Löwis - - * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro. - (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise. - (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK. - * cp-tree.h: Add tree checking macros to various tree access - macros. - * ptree.c (print_lang_decl): Test for function or variable - before accessing template info. - -1999-09-23 Jason Merrill - - * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node. - * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__. - * decl2.c (lang_f_options): Add -fshort-wchar. - * cp-tree.h: Declare flag_short_wchar. - * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned - int' for wchar_t. - -1999-09-23 Martin v. Löwis - - * ir.texi: Fix formatting errors and typos. - -1999-09-22 Mark Mitchell - - * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT. - - * decl.c (pushdecl): Do create a binding for extern "C" functions, - but not for their DECL_ASSEMBLER_NAMEs. - (lookup_name_current_level): Fix formatting. - (xref_tag): Likewise. - * decl2.c (start_objects): Mark static constructors and - destructors as used. - -1999-09-22 Jason Merrill - - * decl.c (define_case_label): Don't crash if we're not in a switch. - - * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags. - * lang-options.h: Restore -fthis-is-variable. Remove help strings - for unsupported flags. - -1999-09-21 Jason Merrill - - * decl2.c (lang_decode_option): Accept and ignore -finit-priority. - Accept and warn about -fthis-is-variable. - -1999-09-21 Mark Mitchell - - * dump.c (dequeue_and_dump): Handle START_CATCH_STMT, - CLEANUP_STMT, and SCOPE_STMT. - - * decl2.c (lang_decode_option): Adjust, in the wake of recent - changes to option processing. - -1999-09-21 Martin v. Löwis - - * typeck.c (get_member_function_from_ptrfunc): Allow extraction of - function pointer from pmfs with no object given. - (convert_for_assignment): Do not return error when converting - pmfs. - -1999-09-21 Alex Samuel - - * lex.c (internal_filename): New variable. - (INTERNAL_FILENAME): New macro. - (init_parse): Allocate internal_filename and mark as root. Use it - instead of a string constant. - -1999-09-21 Nathan Sidwell - - Reimplement dynamic cast and catch matching. - * cp-tree.h (get_dynamic_cast_base_type): Prototype new function - * search.c (dynamic_cast_base_recurse): New function. - (get_dynamic_cast_base_type): New function for dynamic cast. - * rtti.c (build_dynamic_cast_1): Determine source and target - class relationship. Call __dynamic_cast_2. - * tinfo.h (__user_type_info::upcast): New catch dispatcher. - (__user_type_info::dyncast): New dynamic cast dispatcher. - (__user_type_info::sub_kind): New nested enumeration. - (__user_type_info::contained_p): sub_kind predicate. - (__user_type_info::contained_public_p): Likewise. - (__user_type_info::contained_nonpublic_p): Likewise. - (__user_type_info::contained_nonvirtual_p: Likewise. - (__user_type_info::upcast_result): New nested struct. - (__user_type_info::dyncast_result): New nested struct. - (*::do_upcast): New catch function. - (*::do_dyncast): New dynamic cast function. - (__user_type_info::find_public_subobj): New dynamic cast - helper dispatcher. - (*::do_find_public_subobj): New dynamic cast helper function. - * tinfo.cc (__user_type_info::upcast): Define catch dispatcher. - (__user_type_info::dyncast): Define dynamic cast dispatcher. - (*::do_upcast): Define catch function. - (*::do_dyncast): Define dynamic cast function. - (*::do_find_public_subobj): Define dynamic cast helper function. - * tinfo2.cc (__throw_type_match_rtti_2): Use upcast. - (__dynamic_cast): Backwards compatibility wrapper. Use dyncast. - (__dynamic_cast_2): New dynamic cast runtime. - -1999-09-20 Mark Mitchell - - * cp-tree.h (finish_stmt_expr): Change prototype. - * expr.c (cplus_expand_expr): Adjust call accordingly. - * init.c (finish_init_stmts): Likewise. - * parse.y (primary): Likewise. - * pt.c (tsubst_copy): Likewise. - * semantics.c (finish_stmt_expr): Don't take two parameters. - Don't remove generated BLOCKs from the block-tree. - - Remove support for assigning to `this'. - * NEWS: Note that fact. - * class.c (build_vbase_path): Don't check flag_this_is_variable. - * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove. - (language_function): Remove assigns_this, just_assigned_this, and - x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p. - (base_init_expr): Remove. - (current_vcalls_possible_p): New macro. - (vtbls_set_up_p): Likewise. - (emit_base_init): Change prototype. - * decl.c (finish_destructor_body): New function, split out from - finish_function. - (current_function_assigns_this): Remove. - (current_function_just_assigned_this): Likewise. - (start_function): Don't set them. - (finish_function): Don't check them. Don't emit - base-initialization code here. Generate code for destructors when - doing semantic analysis. - (finish_stmt): Don't check current_function_just_assigned_this. - * decl2.c (lang_f_options): Remove this-is-variable. - (lang_decode_option): Likewise. - (grokclassfn): Don't check flag_this_is_variable. - * init.c (emit_base_init): Return the expression generated. - (construct_virtual_bases): Don't push/pop obstacks. Fix - typo. - (build_new_1): Don't check flag_this_is_variable. - (get_temp_regvar): Don't set DECL_REGISTER. - (build_vec_init): Don't call use_variable. - * lang-options.h: Remove "-fthis-is-variable" and - "-fno-this-is-variable". - * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS. - * search.c (expand_upcast_fixups): Use finish_expr_stmt, not - expand_expr_stmt. - * semantics.c (finish_expr_stmt_real): Rename to ... - (finish_expr_stmt): This. Remove assigned_this parameter. - (begin_if_stmt): Call do_pushlevel before starting the statement. - (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less - blocks. - (setup_vtbl_ptr): Emit initialization code for bases and members - at semantic-analysis time. Emit code to initialize vtables in - destructors here. - (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real. - Don't handle CTOR_INITIALIZER any more. - * typeck.c (build_modify_expr): Don't check for assignments to - this. - (c_expand_return): Don't suggest assigning to `this'. - - * Makefile.in (decl.o): Depend on RTL_H. - (decl2.o): Likewise. - (class.o): Likewise. - (call.o): Likewise. - (method.o): Likewise. - (search.o): Likewise. - (tree.o): Likewise. - (pt.o): Likewise. - - * decl.c (duplicate_decls): When a builtin function is redeclared - as static, make sure it is mangled correctly. - - * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add - detail about the statement-tree. - -1999-09-20 Nathan Sidwell - - * parse.y (primary): Use build_functional_cast for CV_QUALIFIER. - -1999-09-20 Nick Clifton - - * decl2.c (lang_decode_option): Extend comment. - -Mon Sep 20 10:49:05 1999 Bernd Schmidt - - * typeck.c: Include "tm_p.h". - -1999-09-19 Mark Mitchell - - * ir.texi: New file. - -1999-09-19 Paul Burchard - - * semantics.c (expand_stmt): Initialize return value. - -1999-09-18 Paul Burchard - - * gxxint.texi: G++ now implements namespaces. - -1999-09-18 Mark Mitchell - - * decl.c (pop_label): Don't warn about unused labels more than - once. - * semantics.c (finish_goto_stmt): Always marked used labels as - used. - - * decl.c (layout_var_decl): Change prototype. Call layout_decl - even when the declaration is external. - (cp_finish_decl): Adjust call to layout_var_decl. - * pt.c (tsubst_expr): Make sure to initialize stmt before using it. - -1999-09-18 Martin von Loewis - - * typeck.c (get_member_function_from_ptrfunc): Always consider - virtuality inside member pointer. - -1999-09-17 Mark Mitchell - - Turn on function-at-a-time processing. - * cp-tree.h (doing_semantic_analysis_p): New macro. - (SF_DEFAULT): Define to zero, not SF_EXPAND. - (start_handler_parms): Change prototype. - (expand_start_catch_block): Likewise. - (expand_end_catch_block): Likewise. - (expand_start_eh_spec): Likewise. - (expand_end_eh_spec): Declare. - (finish_handler_parms): Change prototype. - (begin_catch_block): Declare. - (finish_handler): Change prototype. - (do_pushlevel): Declare. - (do_poplevel): Likewise. - * decl.c (pushlevel): Don't create - binding levels when not doing semantic analysis. - (poplevel): Don't pop them. - (pushdecl): Assert that we are never called when not doing - semantic analysis. - (pushdecl_top_level): Use push_to_top_level. - (make_label_decl): Don't fiddle with obstacks. Make RTL For the - label when expanding. - (cp_finish_decl): Only inject for-scope variables when doing - semantic analysis. Add comments. - (start_handler_parms): Return the handler parm. - (start_function): Reorganize. Don't clear DECL_INITIAL if it is - already set. Reinitialize from saved function data if available. - Don't pushlevel when not doing semantic analysis. - (store_parm_decls): Only generate RTL when expanding. Only - pushdecl when doing semantic analysis. Set - current_eh_spec_try_block if appropriate. - (finish_function): Simplify. Use do_pushlevel and do_poplevel. - Combine common code. Don't poplevel when not doing semantic - analysis. - (push_cp_function_context): Don't expand functions without an - explicit call to expand_body. - (mark_lang_function): Make eh_spec_try_block and - x_scope_stmt_stack. - * except.c (expand_end_eh_spec): Don't - declare. - (process_start_catch_block): Likewise. - (push_eh_cleanup): Use finish_decl_cleanup. - (initialize_handler_parm): New function. - (expand_start_catch_block): Use it. - (expand_end_catch_block): Use tree-generation functions, not - RTL-generation functions. - (expand_start_eh_spec): Likewise. - (expand_end_eh_spec): Likewise. - (expand_exception_blocks): Simplify. - (start_anon_func): Use do_pushlevel. - (end_anon_func): Use do_poplvel. Call expand_body for the - function. - * expr.c (do_case): Don't call define_case_label. - * init.c (create_temporary_var): Set DECL_CONTEXT for local - variables. - * method.c (emit_thunk): Call expand_body for the - thunk. - (sythesize_method): Likewise. - * parse.y (handler_args): Give it ttype. - (eat_saved_input): Call expand_body. - (base_init): Use do_pushlevel. - (pending_inline): Call expand_body. - (handler): Adjust calls to finish_handler_parms and - finish_handler. - (handler_args): Don't call expand_start_catch_block. Return the - catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling. - * parse.c: Regenerated. - * rtti.c (synthesize_tinfo_fn): Call finish_function. - * semantics.c (do_pushlevel): Give it external linkage. Build - SCOPE_STMTs. - (do_poplevel): Likewise. - (finish_case_label): Call define_case_label when doing semantic - analysis. - (finish_goto_stmt): Create RTL for labels. - (finish_function_try_block): Set in_function_try_handler - unconditionally. - (finish_function_handler_sequence): Unset it. - (finish_handler_parms): Use expand_start_catch_block even when - building a statement-tree. - (begin_catch_block): New function. - (finish_handler): Move a little RTL-generation logic here. - (finish_decl_cleanup): Allow cleanups for empty declarations. - (finish_named_return_value): Don't pushdecl when not doing - semantic analysis. - (expand_stmt): Don't do semantic analysis for variable - declarations. Handle START_CATCH_STMT. Call expand_label - directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust - HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT. - (expand_body): Let expand_stmt handle CTOR_INITIALIZER, - RETURN_INIT and function try blocks. - - * cp-tree.h (language_function): Add x_eh_spec_try_block. Add - x_scope_stmt_stack. Add x_in_charge_parm. - (current_eh_spec_try_block): New macro. - (current_scope_stmt_stack): Likewise. - (current_in_charge_parm): Likewise. - * decl.c (start_function): Initialize current_in_charge_parm. - (finish_function): Use current_in_charge_parm rather than looking - up __in_chrg. - * search.c (expand_indirect_vtbls_init): Likewise. - - * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps. - (TRY_BLOCK): Likewise. - (HANDLER): Likewise. - (START_CATCH_STMT): New tree node. - (SCOPE_STMT): Likewise. - * cp-tree.h (SCOPE_BEGIN_P): New macro. - (SCOPE_NULLIFIED_P): Likewise. - (struct lang_decl_flags): Add pending_inline_p. Adjust dummy. - (struct lang_decl): Add saved_language_function. - (DECL_PENDING_INLINE_INFO): Adjust documentation. - (DECL_PENDING_INLINE_P): New macro. - (TYPE_TI_ARGS): Fix typo in comment. - (DECL_SAVED_TREE): Add to documentation. - (DECL_SAVED_FUNCTION_DATA): New macro. - (START_CATCH_TYPE): Likewise. - (SCOPE_END_P): New macro. - (declare_parm_level): Don't declare. - * decl.c (mark_lang_function): New function, split out from - mark_cp_function_context. - (save_function_data): New function. - (declare_parm_level): Remove. - (finish_function): Use save_function_data to squirrel away - important stuff for later use. - (mark_cp_function_context): Use mark_function_data. - (lang_mark_tree): Likewise. - * lex.c (begin_definition_of_inclass_inline): Set - DECL_PENDING_INLINE_P. - (store_pending_inline): Clear it. - * pt.c (tsubst_decl): Likewise. - -1999-09-17 Nathan Sidwell - - * call.c (perform_implicit_conversion): Deal with error_mark_node. - -1999-09-17 Mark Mitchell - - * decl.c (warn_extern_redeclared_static): Don't get confused by - static member functions. - (duplicate_decls): Merge DECL_THIS_STATIC. - - * decl.c (expand_static_init): Make sure assignments to local - statics actually occur. - -1999-09-17 Mark Mitchell - - * cp-tree.h (poplevel_class): Declare. - * class.c (popclass): Use poplevel_class, not poplevel. - * decl.c (poplevel_class): Don't make it static. Don't return a - value. - (poplevel): Don't call poplevel_class; abort in a class - binding level is seen. - * semantics.c (finish_translation_unit): Use pop_everything. - * parse.y (member_init): Allow errors. - (pending_inline): Call finish_function. - * parse.c: Regenerated. - * Makefile.in (CONFLICTS): Adjust. - -1999-09-17 Gabriel Dos Reis - - * error.c: Reduce code duplication. - (dump_template_value): New function. - (dump_type_real): Use it. - (dump_decl): Likewise. - (dump_function_name): Likewise. - (dump_function_decl): Don't be too talkative about function return - type variety. - -1999-09-16 Kaveh R. Ghazi - - * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero. - - * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy. - -1999-09-16 Jason Merrill - - * decl2.c (finish_file): Also call check_global_declarations for - the pending_statics list. - -1999-09-15 Jason Merrill - - * lex.c (cp_pragma_implementation): Allow #pragma implementation - in header files. - -1999-09-15 Richard Henderson - - * lex.c (mark_impl_file_chain): Follow the next chain. - -1999-09-15 Mark Mitchell - - * decl.c (warn_extern_redeclared_static): Simplify. Catch - problems with extern "C" functions redeclared as static. - (duplicate_decls): When a builtin is redeclared static, make the - new function have internal linkage. - -1999-09-15 Mark Mitchell - - * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR. - * pt.c (tsubst_copy): Likewise. - * tree.c (search_tree): Likewise. - (mapcar): Likewise. - -1999-09-15 Kaveh R. Ghazi - - * typeck2.c (ack): Don't declare progname. - -1999-09-14 Alexandre Oliva - - * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy - filenames with ggc_alloc_string. - -1999-09-14 Mark Mitchell - - * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the - TARGET_EXPR. - * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on - the TARGET_EXPR. - * cvt.c (build_up_reference): Likewise. - * tree.c (build_cplus_new): Likewise. - (get_target_expr): Likewise. - -Tue Sep 14 01:45:10 1999 Marc Espie - - * Makefile.in: Prepend $(SHELL) to move-if-change calls. - -1999-09-13 Mark Mitchell - - * cp-tree.h (build_target_expr): New function. - * call.c (build_conditional_expr): Use build_target_expr. - (convert_like): Likewise. - (build_over_call): Likewise. - * cvt.c (build_up_reference): Likewise. - * decl.c (build_cleanup_on_safe_obstack): Fold into ... - (destroy_local_var): Here. - (build_target_expr): New function. - * tree.c (build_cplus_new): Use it. - (get_target_expr): Likewise. - -1999-09-13 Nathan Sidwell - - * typeck.c (expr_sizeof): Don't decay arrays and functions. - Remove misleading comment. - (build_compound_expr): Don't decay arrays. - -1999-09-13 Jason Merrill - - * call.c (build_conditional_expr): Always use a TARGET_EXPR for - class rvalues again. - -Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi - - * Make-lang.in (g++spec.o): Depend on system.h and gcc.h. - - * g++spec.c: Include gcc.h. - (lang_specific_driver): Constify a char*. Call xcalloc, not - xmalloc/bzero. All calls to the function pointer parameter now - explicitly call `fatal'. - -1999-09-12 Mark Mitchell - - * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs. - * cvt.c (ocp_convert): Complete the from and destination types. - Adjust warning about functions always being `true' in conditionals. - * decl.c (duplicate_decls): Don't play funny games with abort. - * error.c (dump_expr): Handle OVERLOADs. - * spew.c (probe_obstack): Remove. - * typeck.c (condition_conversion): Use perform_implicit_conversion. - -1999-09-12 Bernd Schmidt - - * cp-tree.h (auto_function, define_function): Adjust prototypes. - * decl.c (define_function): Lose FUNCTION_CODE arg. All callers - changed. - (auto_function): Likewise, for CODE arg. - Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to... - (builtin_function): ... here. - -1999-09-11 Mark Mitchell - - * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion. - (init_decl_processing): Don't set TREE_PERMANENT for the - error_mark_node. - (start_decl): Don't rebuild non-permanent ARRAY_TYPEs. - (grokdeclarator): Likewise. - (grokparms): Don't check TREE_PERMANENT when building up lists. - * decl2.c (grokfield): Don't assert TREE_PERMANENT. - (mark_inline_for_output): Likewise. - * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT. - * init.c (build_offset_ref): Don't check TREE_PERMANENT. - * lex.c (check_newline): Don't check ggc_p; it is always one. - * pt.c (process_template_parm): Don't check TREE_PERMANENT. - * spew.c (yylex): Don't copy_node or probe_obstacks for - non-permanent CONSTANTs and STRINGs. - * tree.c (build_cplus_array_type_1): Don't fuss with - TREE_PERMANENT on ARRAY_TYPEs. - - * cp-tree.def (CLEANUP_STMT): New node. - * cp-tree.h (language_function): Add name_declared. - (current_function_name_declared): New macro. - (CLEANUP_DECL): New macro. - (CLEANUP_EXPR): Likewise. - (emit_local_var): Likewise. - (finish_decl_cleanup): New function. - * cvt.c (build_up_reference): Simplify. - (ocp_convert): Remove dead code. - * decl.c (start_decl): Remove call to add_decl_stmt. - (grok_reference_init): Adjust, to handle bindings temporaries to - references. Remove dead code. - (initialize_local_var): Don't generate RTL for - declarations here, or build cleanups here. Don't fuss with - obstacks. Replace expand_start_target_temps calls with explicit - setting of stms_are_full_exprs_p. - (destroy_local_var): New function. - (emit_local_var): Likewise. - (cp_finish_decl): Use them, as appropriate. - (start_function): Announce template functions. - (store_parm_decls): Don't call declare_function_name here. - (finish_stmt): Don't start emit base-initialization code when just - building the statement-tree. - * init.c (create_temporary_var): Move add_decl_stmt call ... - (get_temp_regvar): Here. - * pt.c (tsubst_expr): Make DECL_INITIAL look like what - cp_finish_decl would expect. Don't call add_decl_stmt. - * semantics.c (begin_compound_stmt): Call declare_function_name, - if appropriate. - (finish_decl_cleanup): New function. - (expand_stmt): Use emit_local_var to output variables. - (expand_body): Set current_function_name_declared. - -1999-09-10 Mark Mitchell - - * cp-tree.h (finish_cleanup_try_block): New function. - * semantics.c (finish_cleanup_try_block): Add comment. - -Fri Sep 10 10:32:32 1999 Bernd Schmidt - - * cp-tree.h: Delete declarations for all tree nodes now moved to - global_trees. - * decl.c: Delete their definitions. - (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, - FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't - provide defaults. - (init_decl_processing): Call build_common_tree_nodes and - build_common_tree_nodes_2 instead of building their nodes here. - Don't add gc roots for them. - -1999-09-10 Mark Mitchell - - * cp-tree.h (language_function): Rename expanding_p to - x_expanding_p. Rename named_label_uses to x_named_label_uses. - (expanding_p): Adjust accordingly. - (TREE_VIA_PRIVATE): Fix typo in comment. - (DECL_REFERENCE_SLOT): Remove. - (SET_DECL_REFERENCE_SLOT): Likewise. - * decl.c (named_label_uses): Adjust. Remove chicken comment. - (push_overloaded_decl): Don't truncate the chain of bindings when - adding an overloaded function. - (grok_reference_init): Don't use DECL_REFERENCE_SLOT. - (initialize_local_var): Fix typo in comment. - (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up. - * decl2.c (start_objects): Make the fact that we are expanding - the generated function right away explicit. - (start_static_storage_duration_function): Likewise. - (finish_file): Fix typo in comment. - * init.c (build_vec_init): Correct bugs in handling cleanups. - * semantics.c (maybe_convert_cond): New function. - (FINISH_COND): Always store the condition, even if there's - a declaration. - (finish_if_stmt_cond): Use maybe_convert_cond. - (finish_while_stmt_cond): Likewise. - (finish_do_stmt): Likewise. - (finish_for_cond): Likewise. - (expand_cond): Adjust. - - * cp-tree.h (FN_TRY_BLOCK_P): New macro. - * init.c (perform_member_init): Remove obstack machinations. - (expand_cleanup_for_base): Likewise. - (finish_init_stmts): Mark the statement-expression as used. - * method.c (emit_thunk): Use tree-generating functions, not - RTL. - (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - (synthesize_method): Likewise. Keep track of line numbers. - * pt.c (tsubst_expr): Handle various kinds of try blocks. - * semantics.c (expand_stmts): Remove. - (begin_function_try_block): Set FN_TRY_BLOCK_P. - (finish_function_try_block): Be careful rechaining - function try blocks. - (expand_stmt): Loop through all the statements at a given level. - (exapnd_body): Be careful with line-numbers here too. Prepare for - being called directly from the parser. - - * cp-tree.h (finish_function): Adjust prototype. - * decl.c (finish_function): Return the function compiled. - * pt.c (instantiate_decl): Don't play games with obstacks. - * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF. - (search_tree): Likewise. - * typeck.c: Fix typo in comment. - * typeck2.c (store_init_value): Add comment. - - * cp-tree.h (CPTI_ATEXIT): New macro. - (atexit_node): Likewise. - * decl.c (destroy_local_static): New function, broken out from ... - (expand_static_init): Here. - - * rtti.c (get_tinfo_var): These should always be global - (expand_si_desc): Use tree, not RTL, functions to generate code. - (expand_class_desc): Likewise. - (expand_ptr_desc): Likewise. - (expand_attr_desc): Likewise. - (expand_generic_desc): Likewise. - (synthesize_tinfo_fn): Likewise. - -1999-09-09 Mark Mitchell - - * semantics.c (RECHAIN_STMTS): Remove `last' parameter. - (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with - RECHAIN_STMTS. - (RECHAIN_STMST_FROM_CHAIN): Likewise. - - * parse.y (simple_stmt): Fix typo in last change. - - * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro. - (STMT_IS_FULL_EXPR_P): Likewise. - (STMT_LINENO_FOR_FN_P): Likewise. - (prep_stmt): New function. - (building_stmt_tree): Tweak for safety. - * pt.c (tsubst_expr): Use prep_stmt throughout. - (add_tree): Move it to semantics.c - * semantics.c (add_tree): Move it here. - (finish_expr_stmt_real): New function. - (finish_expr_stmt): Use it. - (finish_if_stmt_cond): Use FINISH_COND. - (finish_while_stmt_cond): Likewise. - (finish_for_cond): Likewise. - (finish_stmt_tree): Tweak line-number handling. - (prep_stmt): New function. - (expand_stmt): Use it. - - * cp-tree.h (begin_switch_stmt): Adjust prototype. - (finish_switch_cond): Likewise. - * parse.y (simple_stmt): Adjust accordingly. - * parse.c: Regenerated. - * pt.c (tsubst_expr): Adjust accordingly. - * semantics.c (expand_cond): New function. - (FINISH_COND): New macro. - (begin_switch_stmt): Build the SWITCH_STMT here. - (finish_switch_stmt_cond): Not here. - (expand_stmt): Adjust calls to begin_switch_stmt and - finish_switch_cond. Use expand_cond throughout. - - * dump.c (dequeue_and_dump): Dump types for constants. - Describe DECL_ARG_TYPE more intuitively. - Handle ARRAY_REF. - - * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC. - (lang_cleanup_tree): Remove. - * lex.c (make_lang_type): Use ggc_alloc to allocate - TYPE_LANG_SPECIFIC. - - Reorganize per-function data. - * cp-tree.h (saved_scope): Add function_decl, bindings. - (language_function): Rename binding_level to bindings. - (cp_function_chain): Use the current_function, not the - outer_function_chain. - (current_class_ptr): Make it work, even when there's no - current function. - (current_class_ref): Likewise. - (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New - macros. - (clear_temp_name): Remove. - * decl.c (check_function_type): New function, broken out from - start_function. - (current_binding_level): Adjust definition. - (pushlevel): Simplify. - (poplevel): Don't use named_label_uses when we're outside - a function scope. - (mark_saved_scope): Mark function_decl and bindings. - (maybe_push_to_top_level): Don't unconditionally push a new - function context. Save bindings and the current_function_decl. - Don't clear named_labels. - (pop_from_top_level): Pop function context if appropriate. - (init_decl_processing): Set init_lang_status and free_lang_status, - rather than save_lang_status and restore_lang_status. - (start_function): Take SF_* flags. Don't clear per-function data. - Reorder and simplify to use new per-function data code. Add - asserts. - (store_parm_decls): Don't call init_function_start here. - (finish_function): Adjust for new handling of per-function data. - (push_cp_function_context): Simplify. - (mark_cp_function_context): Change binding_level to bindings. - * decl2.c (clear_temp_name): Remove. - (start_objects): Use SF flags to start_function. - (start_static_storage_duration_function): Likewise. - * except.c (start_anon_func): Remove redundant calls to - push_function_context_to. Use SF flags to start function. - (end_anon_func): Remove redundant call to pop_function_context - from. - * lex.c (reinit_parse_for_function): Don't initialize per-function - data. - * method.c (emit_thunk): Clear current_function after calling - assemble_end_function. Use SF flags for start_function. - (synthesize_method): Use SF flags for start_function. - * parse.c: Regenerated. - * parse.y (fn.defpen): Likewise. - (pending_inline): Clear current_function, even if something goes - wrong. - * pt.c (instantiate_decl): Use SF flags to start_function. - Don't save and restore expanding_p. - (add_tree): Handle the case where we are outside any function. - (end_tree): Likewise. - * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function. - * semantics.c (begin_function_definition): Likewise. - (expand_body): Likewise. - -1999-09-09 Nathan Sidwell - - * cp-tree.h (convert_to_void): Prototype new function. - (require_complete_type_in_void): Remove prototype. - * cvt.c (convert_to_void): New function. - (ocp_convert): Use convert_to_void. - * decl.c (cplus_expand_expr_stmt): Likewise, for complete - expressions. - * typeck.c (require_complete_type_in_void): Remove function. - (build_compound_expr): Use convert_to_void. - (build_static_cast): Likewise. - (build_c_cast): Likewise. - * semantics.c (finish_expr_stmt): Do not decay full expressions. - - * typeck.c (build_x_compound_expr): Add FIXME. - -1999-09-08 Mark Mitchell - - * cp-tree.h (scratch_tree_cons): Remove. - * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons, - and perm_tree_cons with plain tree_cons. - * class.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * expr.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * method.c: Likewise. - * parse.y: Likewise. - * pt.c: Likewise. - * repo.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * typeck.c: Likewise. - * parse.c: Regenerated. - * tree.c (build_srcloc): Simplify. - -1999-09-08 Bruce Korb autogen@linuxbox.com - - * Makefile.in: Give the gperf user a hint about why "gperf -F" fails. - -1999-09-08 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove permanent_attr. - Remove next. - (LANG_DECL_PERMANENT): Remove. - * decl.c (duplicate_decls): Don't mess about with obstacks trying - to free memory. - (lang_mark_tree): Mark DECL_LANG_SPECIFIC. - * lex.c (free_lang_decl_chain): Remove. - (build_lang_decl): Don't use obstacks. - (retrofit_lang_decl): Likewise. - (copy_lang_decl): Likewise. - - * cp-tree.h (saved_scope): Remove old_binding_level and - function_decl. Tidy up. - * decl.c (mark_saved_scope): Don't set them. - (maybe_push_to_top_level): Clear memory. - - * decl.c (layout_var_decl): Change prototype. Don't complete - types for external objects. - (check_initializer): Likewise. Tidy. - (initialize_local_var): Complete types here. - (cp_finish_decl): Not here. Reorganize a little. - (grokvardecl): Don't complete types here. - - * decl.c (start_function): Clear last_dtor_insn and - last_parm_cleanup_insn. - (push_cp_function_context): Just copy over a little of - the old context, not all of it. - - * cp-tree.h (copy_to_permanent): Remove. - (permanent_p): Likewise. - * decl.c (building_typename_type): Don't use copy_to_permanent. - (start_decl): Likewise. - (grok_reference_init): Likewise. - (cp_finish_decl): Likewise. - * init.c (build_new_1): Don't use mapcar. - (build_vec_delete_1): Don't use copy_to_permanent. - (build_vec_init): Likewise. - * parse.y (primary): Likewise. - * parse.c: Regenerated. - * pt.c (push_template_decl_real): Don't use copy_to_permanent. - (lookup_template_class): Likewise. - (tsubst_friend_function): Likewise. - (instantiate_class_template): Likewise. - (tsubst_decl): Likewise. - (tsubst): Likewise. - (instantiate_template): Likewise. - (unify): Likewise. - * rtti.c (get_tinfo_fn): Likewise. - (build_dynamic_cast): Likewise. - * semantics.c (finish_if_stmt_cond): Likewise. - (finish_while_stmt_cond): Likewise. - (finish_do_stmt): Likewise. - (finish_for_cond): Likewise. - (finish_for_expr): Likewise. - (finish_cleanup): Likewise. - (add_decl_stmt): Likewise. - (finish_named_return_value): Likewise. - (finish_qualified_call_expr): Likewise. - * tree.c (perm_manip): Remove. - (build_exception_variant): Don't use copy_to_permanent. - (permanent_p): Remove. - (copy_to_permament): Remove. - (build_min_nt): Don't use copy_to_permanent. - (build_min): Likewise. - (min_tree_cons): Likewise. - * typeckc.c (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - -1999-09-07 Mark Mitchell - - * decl.c (ggc_p): Set it to 1. - (mark_saved_scope): Add prototype. - -1999-09-07 Richard Henderson - - * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete. - * typeck.c (self_promoting_args_p): Delete. - -1999-09-07 Jason Merrill - - * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT. - (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove. - -1999-09-07 Mark Mitchell - - * Makefile.in (tree.o): Depend on ggc.h. - * class.c (make_method_vec): Remove. - (free_method_vec): Likewise. - (free_method_vecs): Remove. - (add_method): Don't use them. - * cp-tree.def (PTRMEM_CST): Make it longer. - (TEMPLATE_PARM_INDEX): Make it shorter. - * cp-tree.h (BINDING_HAS_LEVEL_P): New macro. - (template_parm_index): Remove RTL field. - (ptrmem_cst): Add RTL field. - (finish_function): Removed parameter. - (process_next_inline): Change prototype. - (init_cplus_unsave): Rename to init_tree. - (binding_init): Remove. - * decl.c (free_binding_nodes): Remove. - (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P. - (pop_binding): Don't use free_binding_nodes. - (free_binding_vecs): Remove. - (store_bindings): Don't use them. - (pop_from_top_level): Likewise. - (lookup_namespace_name): Simplify. - (build_typename_type): Don't use obstack_free. - (unqualified_namespace_lookup): Simplify. - (lookup_name_real): Simplify. - (start_function): Remove comment about leaks. - (finish_function): Removed nested parameter. Call - expand_end_bindings even when building_stmt_tree. - Call ggc_push_context and ggc_pop_context around - rest_of_compilation, if necessary. - (mark_cp_function_context): Handle a NULL language-context. - (lang_mark_false_label_stack): Fix typo. - (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD, - TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on - pointer to method types. - (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC. - * decl2.c (finish_objects): Adjust call to finish_function. - (finish_static_store_duration_function): Likewise. - (do_nonmember_using_decl): Remove call to binding_init. - * except.c (end_anon_func): Adjust call to finish_function. - * lex.c (mark_impl_file_chain): New function. - (init_parse): Call init_tree, not init_cplus_unsave. - Add GC roots. - (cp_pramga_interface): Use xmalloc, not permalloc. - (cp_pragma_implementation): Likewise. - (begin_definition_of_inclass_inline): Simplify. - (process_next_inline): Adjust prototype. - (do_scoped_id): Don't call binding_init. - (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc. - * method.c (emit_thunk): Adjust call to finish_function. - (synthesize_method): Likewise. - * parse.y (%union): Add a new `pi' variant. - (PRE_PARSED_FUNCTION_DECL): Use it. - (fn.defpen): Likewise. - (fndef): Adjust call to finish_function. - * pt.c (instantiate_decl): Likewise. - * rtti.c (syntheisze_tinfo_fn): Likewise. - * semantics.c (expand_body): Likewise. - * tree.c: Include ggc.h. - (mark_list_hash): New function. - (binding_init): Remove. - (init_cplus_unsave): Rename to ... - (init_tree): This. Add GC roots. - -1999-09-05 Mark Mitchell - - Get ready for garbage collection. - * Makefile.in (CXX_TREE_H): Add varray.h - (lex.o): Depend on ggc.h. - (decl.o): Likewise. - (decl2.o): Likewise. - (method.o): Likewise. - (search.o): Likewise. - (pt.o): Likewise. - (repo.o): Likewise. - * class.c: Include ggc.h. - (current_class_name): Remove. - (current_class_type): Likewise. - (current_access_specifier): Likewise. - (previous_class_type): Likewise. - (previous_class_values): Likewise. - (class_cache_firstobj): Likewise. - (current_lang_base): Likewise. - (current_lang_stack): Likewise. - (current_lang_stacksize): Likewise. - (lang_name_c): Likewise. - (lang_name_cplusplus): Likewise. - (lang_name_java): Likewise. - (current_lang_name): Likewise. - (base_layout_decl): Likewise. - (access_default_node): Likewise. - (access_public_node): Likewise. - (access_protected_node): Likewise. - (access_private_node): Likewise. - (access_default_virtual_node): Likewise. - (access_public_virtual_node): Likewise. - (access_protected_virtual_node): Likewise. - (access_private_virtual_node): Likewise. - (signed_zero_node): Likewise. - (init_class_processing): Don't build base_layout_decl. - (push_lang_context): Adjust now that current_lang_base is a varray. - (pop_lang_context): Likewise. - * cp-tree.h: Include varray.h. - (cp_global_trees): Add access_default, access_public, - access_protected, access_private, access_default_virtual, - access_public_virtual, access_protected_virtual, - access_private_virtual, ctor_identifier, delta2_identifier, - delta_identifier, dtor_identifier, in_charge_identifier, - index_identifier, nelts_identifier, this_identifier, - pfn_identifier, pfn_or_delta2_identifier, vptr_identifier, - lang_name_c, lang_name_cplusplus, lang_name_java, - empty_except_spec, null, jclass, minus_one, terminate. - (saved_scope): Move here from decl.c. Define globals in terms of - saved_scope: current_namespace, current_class_name, - current_class_type, current_access_specifier, current_lang_stack, - current_lang_base, current_lang_name, current_function_parms, - current_template_parms, processing_template_decl, - processing_specialization, processing_explicit_instantiation, - previous_class_type, previous_class_values, class_cache_firstobj. - (scope_chain): New variable. - (init_pt): New function. - * decl.c (current_namespace): Remove. - (this_identifier, in_charge_identifier, ctor_identifier): Likewise. - (dtor_identifier, pfn_identifier, index_identifier): Likewise. - (delta_identifier, delta2_identifier): Likewise. - (pfn_or_delta2_identifier, tag_identifier): Likewise - (vt_off_identifier, empty_except_spec, null_node): Likewise. - (current_function_parms, current_lang_base): Remove. - (current_lang_stack, previous_class_values): Remove. - (class_binding_level): Macroize. - (saved_scope): Remove. - (current_saved_scope): Rename to scope_chain. - (mark_saved_scope): Adjust for new scope structure. - (maybe_push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (duplicate_decls): Adjust now that current_lang_base is a varray. - (build_typename_type): Call ggc_add_tree_hash_table_root. - (init_decl_processing): Call init_pt. Call push_to_top_level to - set up globals. Add GC roots. - (xref_basetypes): Adjust now that current_lang_base is a varray. - * decl.h (this_identifier): Remove. - (in_charge_identifier): Likewise. - * decl2.c: Don't include varray.h. - (current_namespace): Remove. - (init_decl2): Add GC roots. - * except.c (Terminate): Remove. - (init_exception_processing): Use terminate_node instead. - (build_terminate_handler): Likewise. - * init.c (nc_nelts_field_id): Remove. - (minus_one): Likewise. - (init_init_processing): Use minus_one_node and nelts_identifier - instead. Add GC roots. - (jclass_node): Remove. - (build_new_1): Use nelts_identifier. - (build_vec_init): Likewise. - (build_vec_delete): Likewise. - * lex.c: Include ggc.h. - (defarg_fn): Move declaration early. - (defarg_parms): Likewise. - (init_parse): Add GC roots. - (handle_cp_pragma): Remove redundant declaration of - pending_vtables. - * method.c: Include ggc.h. - (btypelist): Make it a varray. All uses changed. - (ktypelist): Likewise. - (init_method): Add GC roots. - * pt.c: Don't include varray.h. Include ggc.h. - (current_template_parms): Remove. - (processing_template_decl): Likewise. - (processing_specialization): Likewise. - (processing_explicit_instantiation): Likewise. - (init_pt): New function. - * repo.c: Include ggc.h. - (init_repo): Add GC roots. - * search.c: Don't include varray.h. - (_vptr_name): Remove. - (lookup_field_1): Use vtpr_identifier instead. - (expand_indirect_vtbls_init): Remove redundant declaration of - in_charge_identifier. - (init_search_processing): Use vptr_identifier. - -1999-09-05 Richard Henderson - Bernd Schmidt - Mark Mitchell - - * Makefile.in (parse.o): Depend on ggc.h. - (decl2.o): Depend on ggc.h. - (init.o): Depend on ggc.h. - * cp-tree.h (init_decl2): Declare. - (cp_parse_init): Likewise. - * decl.c (ggc_p): Define to zero. - (mark_saved_scope): New function. - (init_decl_processing): Call cp_parse_init, and cp_decl2. - Register GC roots. - (expand_static_init): Add GC roots. - * decl2.c: Include ggc.h. - (init_decl2): New function. - * init.c: Include ggc.h. - (init_init_processing): Add GC roots. - * parse.y: Include ggc.h. - (cp_parse_init): New function. - -1999-09-04 Mark Mitchell - - * decl.c (init_decl_processing): Set mark_lang_status. - (lang_mark_false_label_stack): Adjust prototype. - * decl2.c (grok_function_init): Remove extraneous declaration of - abort_fndecl. - - * Make-lang.in (cc1plus): Remove dependency on GGC. - * Makefile.in (OBJS): Don't mention ggc-simple.o. - (OBJDEPS): Don't mention ggc-simple.o. - - * Make-lang.in (cc1plus): Depend on $(GGC). - * Makefile.in (OBJS): Add ggc-simple.o. - (OBJDEPS): Likewise. - * cp-tree.h (language_function): Rename members to `x_' versions; - we now have x_named_labels, x_ctor_label, x_dtor_label, - x_base_init_list, x_member_init_list, x_base_init_expr, - x_current_class_ptr, x_current_class_ref, x_last_tree, - x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and - x_result_rtx. - (dtor_label, ctor_label, current_base_init_list, - current_member_init_list, base_init_expr, current_class_ptr, - current_class_ref, last_tree, last_expr_type): Adjust accordingly. - * decl.c: Include ggc.h. - (last_dtor_insn): Adjust to use x_ names. - (last_parm_cleanup_insn): Likewise. - (original_result_rtx): Likewise. - (named_labels): Likewise. - (mark_binding_level): New function. - (mark_cp_function_context): Likewise. - (mark_false_label_stack): Likewise. - (lang_mark_tree): Likewise. - (lang_cleanup_tree): Likewise. - -1999-09-03 Mark Mitchell - - * Makefile.in (CXX_TREE_H): Include function.h. - (decl.o): Don't depend on function.h. - (decl2.o): Likewise. - (typeck.o): Likewise. - (init.o): Likewise. - (method.o): Likewise. - * cp-tree.h: Include function.h. - (cp_function): Rename to language_function. Remove next. - (cp_function_chain): Make it a macro, not a variable. - (push_cp_function_context): Don't declare. - (pop_cp_function_context): Likewise. - * decl.c: Don't include function.h. - (push_cp_function_context): Make it static. Make it suitable for - a save_lang_status callback. - (pop_cp_function_context): Likewise. - (maybe_push_to_top_level): Call push_function_context_to, not - push_cp_function_context. - (pop_from_top_level): Call pop_function_context_from, not - pop_cp_function_context. - (init_decl_processing): Set save_lang_status and - restore_lang_status. Call push_function_context_to, not - push_cp_function_context. - (cp_function_chain): Remove. - * decl2.c: Don't include function.h. - * except.c: Don't include function.h. - (start_anon_func): Call push_function_context_to, not - push_cp_function_context. - (end_anon_func): Call pop_function_context_from, not - pop_cp_function_context. - * init.c: Don't include function.h. - * lex.c (begin_definition_of_inclass_inline): Call - push_function_context_to, not push_cp_function_context. - (process_next_inline): Call pop_function_context_from, not - pop_cp_function_context. - * method.c: Don't include function.h. - (synthesize_method): Call push_function_context_to, not - push_cp_function_context. Call pop_function_context_from, not - pop_cp_function_context. - * typeck.c: Don't include function.h. - - * decl.c (expand_static_init): Tweak handling of static - initializations for objects without constructors. - -1999-09-03 Nathan Sidwell - - * typeck.c (build_indirect_ref): Reject dereference of pointer to - void. - -1999-09-02 Mark Mitchell - - * cp-tree.h (cp_function): Move here, from decl.c. - (cp_function_chain): Declare. - (dtor_label): New macro, instead of variable. - (ctor_label): Likewise. - (current_base_init_list): Likewise. - (current_member_init_list): Likewise. - (base_init_expr): Likewise. - (current_class_ptr): Likewise. - (current_class_ref): Likewise. - (last_tree): Likewise. - (last_expr_type): Likewise. - (current_function_returns_value): Likewise. - (current_function_returns_null): Likewise. - (current_function_just_assigned_this): Likewise. - (current_function_parms_stored): Likewise. - (temp_name_counter): Likewise. - (static_labelno): Likewise. - (expanding_p): Likewise. - (stmts_are_full_exprs_p): Likewise. - (in_function_try_handler): Likewise. - (lang_type): Remove nested type_flags. All uses changed. - * call.c (ctor_label): Remove. - (dtor_label): Likewise. - * class.c (current_class_ptr): Remove. - (current_class_ref): Likewise. - * decl.c (static_labelno): Remove. - (dtor_label): Likewise. - (last_dtor_insn): New macro, instead of variable. - (last_parm_cleanup_insn): Likewise. - (original_result_rtx): Likewise. - (in_function_try_handler): Remove. - (named_label_uses): New macro, instead of variable. - (named_labels): Likewise. - (current_function_returns_value): Remove. - (current_function_returns_null): Likewise. - (current_function_assigns_this): New macro, instead of variable. - (current_function_just_assigned_this): Likewise. - (current_binding_level): Likewise. - (init_decl_processing): Call push_cp_function_context. - (cp_function): Move to cp-tree.h - (cp_function_chain): Make it global. - (temp_name_counter): Remove. - (push_cp_function_context): Simplify. - (pop_cp_function_context): Likewise. - * decl2.c (temp_name_counter): Remove. - * init_c (current_base_init_list): Likewise. - (current_member_init_list): Likewise. - (base_init_expr): Likewise. - * method.c (static_labelno): Likewise. - * pt.c (last_tree): Likewise. - * semantics.c (expanding_p): Likewise. - (stmts_are_full_exprs_p): Likewise. - (last_expr_type): Likewise. - * typeck.c (dtor_label): Likewise. - (ctor_label): Likewise. - -1999-09-01 Alex Samuel - - * decl2.c (arg_assoc_template_arg): New prototype. New function. - (arg_assoc_class): Use arg_assoc_template_arg for template - arguments. - (arg_assoc): Likewise. - * pt.c (mangle_class_name_for_template): Allow member template - template arguments. - -1999-09-02 Nathan Sidwell - - * call.c (build_conditional_expr): Warn on enum mismatches. - (convert_arg_to_ellipsis): Move non-pod check to after - conversion. - -1999-09-01 Kaveh R. Ghazi - - * gxx.gperf (hash, is_reserved_word): Add prototypes. - - * init.c (build_vec_init): Initialize variable `try_block'. - - * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts. - Likewise for bzero/memset. - (token_getch, token_put_back): Add static prototypes. Remove - `inline' from the definitions. - (retrofit_lang_decl): Call memset, not bzero, to avoid casts. - -1999-09-01 Mark Mitchell - - * cp-tree.h (lang_type): Move align into type_flags. - (CLASSTYPE_ALIGN): Adjust accordingly. - * call.c (direct_reference_binding): Remove misleading comment. - -1999-08-30 Kaveh R. Ghazi - - * parse.y (language_string): Constify. - -1999-08-30 Kaveh R. Ghazi - - * repo.c (getpwd): Don't prototype. - * xref.c (getpwd): Likewise - -1999-08-30 Kaveh R. Ghazi - - * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a. - Remove hacks for stuff which now comes from libiberty. - -1999-08-30 Jason Merrill - - * cp-tree.h (IS_AGGR_TYPE_2): Fix typo. - -1999-08-30 Mark Mitchell - - * cp-tree.h (begin_init_stmts): Declare. - (finish_init_stmts): Likewise. - * cvt.c (build_up_reference): Wrap the declaration of a temporary - in a statement-expression so that we will see it when expanding - tree structure later. - * init.c (begin_init_stmts): Don't make it static. - (finish_init_stmts): Likewise. - - * cp-tree.h (start_handler_parms): New function. - (expand_start_catch_block): Take only one parameter. - (start_handler_parms): New function. - * decl.c (start_handler_parms): Define it. - * except.c (process_start_catch_block): Take only one parameter. - Don't call grokdeclarator here. - (expand_start_catch_block): Don't call grokdeclarator here, - either. - * parse.y (handler_args): Adjust call to - expand_start_catch_block. Use start_handler_parms. - * pt.c (push_template_decl_real): Make permanent lists have - permanent elements. - (tsubst_expr): Adjust calls to expand_start_catch_block - appropriately. - * semantics.c (expand_stmt): Likewise. - -1999-08-29 Alex Samuel - - * pt.c (push_template_decl_real): Use template declaration from - class type if it exists. - -1999-08-29 Mark Mitchell - - * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition. - (maybe_inject_for_scope_var): Declare it. - (initialize_local_var): Likewise. - * decl.c (maybe_inject_for_scope_var): Make it global. - (initialize_local_var): Likewise. Move cleanup handling here, - from cp_finish_decl. - (make_rtl_for_nonlocal_decl): Use - push_obstacks_nochange/pop_obstacks, rather than - end_temporary_allocation/resume_temporary_allocation. - (cp_finish_decl): Try to complete the type of a variable when it - is declared. Move cleanup-handling to initialize_local_var. - (expand_static_init): Use tree-building code, rather than - RTL-building code. - * decl2.c (get_temp_name): Assert non-initializedness of - temporaries. - * init.c (create_temporary_var): Move RTL-assigning code to ... - (get_temp_regvar): Here. - * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here. - * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just - call initialize_local_var to generate initialization code. - -1999-08-29 Kaveh R. Ghazi - - * cp-tree.h (fndecl_as_string, type_as_string, - type_as_string_real, args_as_string, decl_as_string, - expr_as_string, code_as_string, language_as_string, - parm_as_string, op_as_string, assop_as_string, cv_as_string, - lang_decl_name, cp_file_of, lang_printable_name): Constify a char*. - - * errfn.c (cp_printer): Likewise. - - * error.c (cp_printer, fndecl_as_string, type_as_string_real, - type_as_string, expr_as_string, decl_as_string, lang_decl_name, - cp_file_of, code_as_string, language_as_string, parm_as_string, - op_as_string, assop_as_string, args_as_string, cv_as_string): - Likewise. - - * tree.c (lang_printable_name): Likewise. - -1999-08-28 Richard Henderson - - * decl2.c (arg_assoc_class): Bail if the class is a builtin type. - -1999-08-28 Mark Mitchell - - * cp-tree.h (strip_array_types): New function. - * decl.c (maybe_deduce_size_from_array_init): New function, split - out from cp_finish_decl. - (layout_var_decl): Likewise. - (maybe_commonize_var): Likewise. - (maybe_inject_for_scope_var): Likewise. - (initialize_local_var): Likewise. - (build_cleanup_on_safe_obstack): Likewise. - (check_initializer): Likewise. - (make_rtl_for_nonlocal_decl): Likewise. - (cp_finish_decl): Use them. - * typeck.c (strip_array_types): New function. - - * cp-tree.def (LABEL_STMT): New tree node. - * cp-tree.h (LABEL_STMT_LABEL): New macro. - (shadow_label): Remove. - (declare_local_label): New function. - (finish_label_decl): Likewise. - * decl.c (make_label_decl): New function, split out from - lookup_label. - (shadowed_labels): Remove. - (binding_level): Add shadowed_labels. - (clear_binding_level): Remove. - (push_binding_level): Just bzero the new binding level. - (pushlevel): Fix indentation. - (pop_label): New function. - (pop_labels): Likewise, split out from poplevel. - (poplevel): Pop local labels. Use pop_labels. - (maybe_push_to_top_level): Don't clear shadowed_labels. - (lookup_label): Use make_label_decl. - (shadow_label): Remove. - (declare_local_label): New function. - (define_label): Simplify. - (start_function): Don't clear shadowed_labels. - (cp_function): Remove shadowed_labels. - (push_cp_function_context): Don't save shadowed_labels. - (pop_cp_function_context): Don't restore it. - * dump.c (dequeue_and_dump): Handle LABEL_STMT. - * parse.y (label_decl): Use finish_label_decl. - * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label - declarations. - * semantics.c (finish_label_stmt): Add a LABEL_STMT when - building_stmt_tree. - (finish_label_decl): New function. - (expand_stmt): Handle LABEL_STMTs and local label declarations. - -1999-08-26 Mark Mitchell - - * decl.c (lookup_label): Build labels on the permanent obstack - when building statement trees. Don't build RTL for labels when - building statement trees. - * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when - building statement trees. - (finish_label_stmt): Likewise. - (expand_stmt): Adjust accordingly. - * pt.c (tsubst_expr); Likewise. - (do_decl_instantiation): Robustify. - - * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro. - * tree.c (build_cplus_new): Set it. - * expr.c (cplus_expand_expr): Use it. - * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR. - - * decl.c (store_parm_decls): Reset immediate_size_expand. - (finish_function): Likewise. - - * tree.c (cplus_unsave_expr_now): Don't return a value. - - * semantics.c (do_poplevel): Always initialize the return value. - -1999-08-26 Gavin Romig-Koch - - * cp-tree.h (cplus_unsave_expr_now) : Correct return type. - * tree.h (cplus_unsave_expr_now) : Same. - -1999-08-25 Mark Mitchell - - * decl.c (grokdeclarator): Amend comment. - * except.c (expand_start_catch_block): Call push_template_decl for - catch-block parameters. - * method.c (synthesize_method): Build an empty compound statement - for the body of a constructor. - -1999-08-25 Jason Merrill - - * tree.c (cp_build_qualified_type_real): If we're asking for the - same quals we already have, just return. - -1999-08-25 Mark Mitchell - - * cp-tree.def (SUBOBJECT): New tree node. - * cp-tree.h (CLEANUP_P): New macro. - (SUBOBJECT_CLEANUP): Likewise. - (keep_next_level): Add parameter. - (get_temp_regvar): Don't declare. - (emit_base_init): Remove parameter. - (expand_aggr_init): Rename to build_aggr_init. - (expand_vec_init): Rename to build_vec_init. - (do_pushlevel): Remove. - (do_poplevel): Likewise. - (finish_cleanup): New function. - (finish_subobject): Likewise. - (stmts_are_full_exprs_p): New variable. - * decl.c (keep_next_level): Add parameter. - (cp_finish_decl): Use build_aggr_init, not - expand_aggr_init. Use finish_expr_stmt to expand the code. - (expand_static_init): Use tree-generating, not RTL-generating, - functions to handle the initialization. - (start_function): Remove dead code. Always have a momentary - obstack inside the function, even before hitting the first curly - brace. - (cplus_expand_expr_stmt): Move calls to - expand_{start,end}_target_temps into semantics.c. - (cp_function): Add stmts_are_full_exprs_p. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - * decl2.c (get_temp_regvar): Move to init.c. - (do_static_initialization): Use build_{aggr,vec}_init. - (do_static_destruction): Fix typo in comment. - * dump.c (dequeue_and_dump): Handle INIT_EXPR. - * except.c (expand_throw): Use create_temporary_var. - * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init. - * init.c (expand_vec_init_try_block): Remove. - (expand_vec_init_catch_clause): Likewise. - (get_temp_regvar): New function. - (begin_init_stmts): Likewise. - (finish_init_stmts): Likewise. - (perform_member_init): Use build_{aggr,vec}_init. Build up tree - structure here. - (emit_base_init): Likewise. Remove unused parameter. - (expand_virtual_init): Likewise. - (expand_cleanup_for_base): Use finish_subobject. - (expand_aggr_vbase_init_1): Simplify. - (construct_virtual_bases): Use tree-generating functions to build - up initialization. - (expand_aggr_init): Likewise. Rename to build_aggr_init. - (expand_default_init): Likewise. - (expand_aggr_init_1): Likewise. - (expand_vec_init): Rename to build_vec_init. - * method.c (do_build_copy_constructor): Use tree-generating - functions. Don't call clear_last_expr. - (do_build_assign_ref): Likewise. - (synthesize_method): Call clear_last_expr here. - * parse.y (base_init): Don't call clear_last_expr here. - (nodecls): Likewise. - * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set. - * semantics.c (do_pushlevel): Move to here. - (do_poplevel): Likewise. - (stmts_are_full_exprs_p): New variable. - (finish_expr_stmt): Handle logic for temoprary cleanup here. - (finish_for_stmt): Use finish_expr_stmt. - (finish_cleanup): New function. - (finish_function_try_block): Fix indentation. - (finish_subobject): New function. - (setup_vtbl_ptr): Call keep_next_level here. - (finish_stmt_expr): Handle a block with no scope inside the - statement-expression. - (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle - SUBOBJECT. - * tree.c (search_tree): Handle INIT_EXPR. - (mapcar): Likewise. - * typeck.c (build_modify_expr): Don't build an RTL_EXPR. - * typeck2.c (store_init_value): Change expand_aggr_init to - build_aggr_init in comment. - -1999-08-25 Mark Mitchell - - * dump.c (dequeue_and_dump): Dump TARGET_EXPRs. - -1999-08-25 Nathan Sidwell - - * decl2.c (handle_class_head): Be graceful about additional - scope qualifiers. Adjust comments to reflect reality. - -1999-08-24 Jason Merrill - - * call.c (build_conditional_expr): Fix typo. - * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an - lvalue before trying to mess with the sides. - - * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly. - -Mon Aug 23 22:17:20 1999 Mumit Khan - - * g++spec.c (lang_specific_driver): Add room for NULL in arglist. - -1999-08-23 Jason Merrill - - * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2. - Return arbitrary pointer or NULL. - (check_eh_spec): Call __throw_type_match_rtti_2. - * tinfo.h (*::dcast): Return int. Add valp parm. - * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers. - * tinfo2.cc (__throw_type_match_rtti_2): Likewise. - (__throw_type_match_rtti): Now just a wrapper. - - * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind. - (init_exception_processing): Don't initialize them. - -1999-08-23 Paul Burchard - - * decl.c (check_default_argument): Fix typo. - -1999-08-22 Mark Mitchell - - * cp-tree.def (STMT_EXPR): Fix typo in node name. - - * dump.c (dump_next_stmt): New function. - (dequeue_and_dump): Use it. - - * pt.c (tsubst_copy): Make sure to initialize return value for a - STMT_EXPR, even when processing_template_decl. - * semantics.c (finish_stmt_expr): A statement-expression whose - last statement is not an expression-statement has type `void'. - -1999-08-20 Mark Mitchell - - * semantics.c (finish_stmt_expr): Fix typo in comment. - * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR. - (mapcar): Likewise. - * init.c (build_vec_delete_1): Make the children of a permanent - BIND_EXPR permanent. - * pt.c (register_specialization): Don't register a specialization - more than once. - -1999-08-18 Andrew Haley - - * method.c (process_overload_item): Call build_mangled_C9x_name () - for all integer parameter types larger than long long. - -1999-08-19 Mark Mitchell - - * pt.c (redeclare_class_template): Merge default template - arguments in both directions. - - * typeck.c (common_type): Undo 1999-08-18 change. Remove - compiler_error message. - -1999-08-19 Jason Merrill - - * cp-tree.h: Declare flag_use_repository. - * pt.c (do_decl_instantiation): Don't complain about duplicate - instantiation with -frepo. - (do_type_instantiation): Likewise. - - * pt.c (push_template_decl_real): Complain about everything - that isn't a valid template. - - * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't - affect inlines. - -1999-08-19 Mark Mitchell - - * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code. - * decl2.c (build_expr_from_tree): Handle it. - * error.c (dump_expr): Likewise. - * pt.c (for_each_template_parm): Likewise. - (tsubst_copy): Likewise. - * tree.c (search_tree): Likewise. - * semantics.c (finish_pseudo_destructor_call): Create it. - -1999-08-18 Mark Mitchell - - * search.c (setup_class_bindings): Robustify. - * typeck.c (common_type): Use same_type_p, not pointer equality, - to compare types. - - * cp-tree.h (build_lang_field_decl): Remove. - * class.c (build_vtable): Replace calls to build_lang_field_decl - with build_lang_decl. - (prepare_fresh_vtable): Likewise. - (finish_struct_1): Likewise. - (init_class_processing): Likewise. - * decl.c (push_using_decl): Likewise. - (init_decl_processing): Likewise. - (grokvardecl): Likewise. - (build_ptrmemfunc_type): Likewise. - (grokdeclarator): Likewise. - (build_enumerator): Likewise. - * decl2.c (grok_x_components): Likewise. - (do_class_using_decl): Likewise. - * except.c (call_eh_info): Likewise. - * init.c (init_init_processing): Likewise. - * rtti.c (expand_class_decl): Likewise. - * tree.c (build_base_fields): Likewise. - (build_vbase_pointer_fields): Likewise. - * lex.c (build_lang_decl): Build declarations on the permanent - obstack if we're building statmeent trees. - (retrofit_lang_decl): Handle both the full lang_decl and also the - smaller lang_decl_flags here. - (build_lang_field_decl): Remove. - * pt.c (push_template_decl_real): Issue errors for variable - declarations that are not static members. - -1999-08-18 Richard Henderson - - * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too. - (mapcar): Likewise. - -1999-08-17 Mark Mitchell - - * cp-tree.h (back_end_hook): New variable. - * decl2.c (back_end_hook): Define it. - (finish_file): If it's non-NULL, call it. - - * decl.c (add_decl_to_level): New function. - (push_local_binding): Use it. - (find_binding): Fix typo in comment. - (pushdecl): Use add_decl_to_level. Put templates on the - corresponding namespace-scope binding levels. - * dump.c (dequeue_and_dump): Print the specializations of a - template. - * pt.c (push_template_decl_real): Don't push a template multiple - times. - -1999-08-17 Mark Mitchell - - * cp-tree.h (CALL_DECLARATOR_PARMS): New macro. - (CALL_DECLARATOR_QUALS): Likewise. - (CALL_DECARATOR_EXCEPTION_SPEC): Likewise. - * decl.c (grokdeclarator): Adjust to use them. - * decl2.c (grokfield): Likewise. - (reparse_absdcl_as_casts): Likewise. - * lex.c (make_call_declarator): Likewise. - (set_quals_and_spec): Likewise. - * pt.c (tsubst): Likewise. - * tree.c (mapcar): Remove special hack to handle third operand of - a CALL_EXPR. - -1999-08-16 Mark Mitchell - - * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro. - * class.c (build_vtable): Use build_lang_field_decl to build the - VAR_DECLs for vtables. - (prepare_fresh_vtable): Likewise. - * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if - CAN_HAVE_FULL_LANG_DECL_P. - (push_using_decl): Use build_lang_decl to build USING_DECLs. - (grokdeclarator): Use build_lang_decl to build TYPE_DECLs. - * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P. - (build_lang_field_decl): Likewise. - (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much - to copy. - - * cp-tree.def (STMT_EXPR): New tree node. - * cp-tree.h (STMT_EXPR_STMT): New macro. - (store_return_init): Change prototype. - (finish_named_return_value): New function. - (expand_stmt): Likewise. - (expand_body): Likewise. - (begin_stmt_tree): Likewise. - (finish_stmt_tree): Likewise. - (expanding_p): New variable. - (last_expr_type): Likewise. - (building_stmt_tree): New macro. - * decl.c (start_function): Use building_stmt_tree, not - processing_template_decl, where appropriate. - (store_parm_decls): Likewise. - (store_return_init): Move most of the body to semantics.c. - (finish_function): Use building_stmt_tree. - (finish_stmt): Clear last_expr_type here. - (cp_function): Add expanding_p, last_tree, last_expr_type. - (push_cp_function_context): Save them. - (pop_cp_function_context): Restore them. - * decl2.c (setup_vtbl_ptr): Move to semantics.c. - * error.c (dump_expr): Handle STMT_EXPR. - * except.c (expand_start_catch_block): Use building_stmt_tree. - Use add_decl_stmt. - * expr.c (cplus_expand_expr): Handle STMT_EXPR. - (do_case): Move add_tree call to semantics.c. - * parse.y (return_init): Use finish_named_return_value. - (for.init.statement): Use finish_expr_stmt. - * parse.c: Regenerated. - * pt.c (do_pushlevel): Move to semantics.c. - (do_poplevel): Likewise. - (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR. - (tsubst_expr): Don't expand all the way to RTL here. Handle - RETURN_INIT and CTOR_INITIALIZER. - (instantiate_decl): Call expand_body after tsubst'ing into - DECL_SAVED_TREE. - * semantics.c (expand_stmts): New function. - (expanding_p): New variable. - (last_expr_type): Likewise. - (finish_expr_stmt): Use building_stmt_tree. - (begin_if_stmt): Likewise. - (finish_if_stmt_cond): Likewise. - (finish_then_clause): Likewise. - (begin_else_clause): Likewise. - (finish_else_clause): Likewise. - (begin_while_stmt): Likewise. - (finish_while_stmt_cond): Likewise. - (finish_while_stmt): Likewise. - (finish_do_body): Likewise. - (finish_do_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (fnish_for_init_stmt): Likewise. - (finish_for_cond): Likewise. - (finish_for_expr): Likewise. - (finish_for_stmt): Likewise. - (finish_break_stmt): Likewise. - (finish_continue_stmt): Likewise. - (finish_switch_cond): Likewise. - (finish_switch_stmt): Likewise. - (finish_case_label): Call add_tree here if necessary. - (finish_goto_statement): Use building_stmt_tree. - (begin_try_block): Likewise. - (begin_function_try_block): Likewise. - (finish_try_block): Likewise. - (finish_function_try_block): Likewise. - (finish_handler_sequence): Likewise. - (finish_function_handler_sequence): Likewise. - (begin_handler): Likewise. - (finish_handler_parms): Likewise. - (finish_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_compound_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (finish_named_return_value): New function. - (setup_vtbl_ptr): Moved here from decl2.c. - (do_pushlevel): Moved here from pt.c. - (do_poplevel): Likewise. - (begin_stmt_expr): Use building_stmt_tree. - (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR, - when building_stmt_tree. - (begin_stmt_tree): New function. - (finish_stmt_tree): Likewise. - (expand_stmt): Likewise. - (expand_body): Likewise. - * tree.c (build_cplus_method_type): Make sure the argument types - end up on the same obstack as the METHOD_TYPE. - (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR, - THROW_EXPR, STMT_EXPR. - (mapcar): Break out common cases. Handle COMPOUND_EXPR, - MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than - sorry, if an unsupported node is encountered. - * typeck.c (require_complete_type_in_void): Handle BIND_EXPR. - (c_expand_return): Don't call add_tree here. - -1999-08-15 Mark Mitchell - - * pt.c (check_default_tmpl_args): Don't check in local scopes. - (tsubst_decl): Make sure the declaration is on a saveable - obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local - variable. - (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs. - -1999-08-14 Jason Merrill - - Speed up Koenig lookup. - * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm - to return namespaces we've looked at. - * decl2.c (lookup_using_namespace): Likewise. - (add_function): Don't call ovl_member. - (lookup_arg_dependent): Initialize k.namespaces to the list of - namespaces seen in unqualified lookup. - * call.c (equal_functions): Move here from tree.c. - (joust): Use it to handle duplicate candidates. - * tree.c (ovl_member): Use ==. - -1999-08-13 Mark Mitchell - - * cp-tree.def (DECL_STMT): Make it smaller. - * cp-tree.h (lang_decl_flags): Move saved_tree to ... - (lang_decl): ... here. Add next. - (DECL_SAVED_TREE): Adjust accordingly. - (DECL_IMPLICIT_TYPEDEF_P): New macro. - (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. - (DECL_STMT_DECL): Likewise. - (create_implicit_typedef): New function. - (maybe_push_decl): Likewise. - (tsubst_default_argument): New function. - (at_function_scope_p): Likewise. - (add_decl_stmt): Likewise. - (push_permanent_obstack): Likewise. - * call.c (convert_default_arg): Use tsubst_default_argument. - * class.c (add_method): Use push_permanent_obstack. - (build_self_reference): Create a TEMPLATE_DECL for the - self-reference, if necessary. - * decl.c (pseudo_global_level_p): Only look at the current binding - level. - (push_binding): Use push_permanent_obstack. - (create_implicit_typedef): New function. - (pushtag): Use it. - (duplicate_decls): Use push_permanent_obstack. - (maybe_push_decl): New function. - (start_decl): Use it. Remove dead code. Use add_decl_stmt. - (start_decl_1): Remove dead code. - (cp_finish_decl): Remove DECL_STMT handling here. Don't use - pseudo_global_level_p. - (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a - template. - (grokdeclarator): Likewise, for TYPE_DECLs. Don't use - pseudo_global_level_p. - * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in - a template. - (get_sentry): Use push_permanent_obstack. - * dump.c (dequeue_and_dump): Enable DECL_STMT. - * except.c (call_eh_info): Use push_permanent_obstack. - (build_eh_type_ref): Likewise. - (do_pop_exception): Likewise. - (expand_eh_spec): Likewise. - (alloc_eh_object): Likewise. - (expand_throw): Likewise. - * init.c (build_java_class_ref): Likewise. - * lex.c (get_time_identifier): Likewise. - (free_lang_decl_chain): Correct type. - (retrofit_lang_decl): Adjust accordingly. - (build_lang_field_decl): Likewise. - * lex.h (free_lang_decl_chain): Likewise. - * parse.y (lang_extdef): Don't use pseudo_global_level_p. - * parse.c: Regenerated. - * pt.c (tsubst_default_arguments): New function. - (retrieve_local_specialization): Likewise. - (register_local_specialization): Likewise. - (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use - pseudo_global_level_p to determine whether or not a template is - primary. - (lookup_template_class): Likewise. Use create_implicit_typedef. - (instantiate_class_template): Call tsubst_default_arguments for - member functions, if appropriate. - (tsubst_default_argument): New function. - (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs. - * search.c (at_function_scope_p): New function. - * semantics.c (finish_asm_stmt): Use push_permanent_obstack. - (finish_label_stmt): Likewise. - (add_decl_stmt): New function. - (begin_class_definition): Likewise. - (finish_typeof): Likewise. - * tree.c (copy_template_template_parm): Likewise. - (copy_to_permanent): Likewise. - (push_permanent_obstack): Define. - (mark_addressable): Use it. - * typeck.c (mark_addressable): Likewise. - -1999-08-13 Gavin Romig-Koch - - * cp-tree.h (init_cplus_unsave): New. - (cplus_unsave_expr_now): New. - * lex.c (init_parse): Call init_cplus_unsave. - * tree.c (init_cplus_unsave): New. - (cplus_unsave_expr_now): New. - -1999-08-13 Mark Mitchell - - * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and - decl_constant_value to simplify array bounds. - -1999-08-11 Jason Merrill - - * lang-options.h: Add -fms-extensions. - * cp-tree.h: Declare flag_ms_extensions. - * decl2.c: Define it. - * class.c (instantiate_type): Don't complain about taking the address - of a bound member function if -fms-extensions. - * typeck.c (build_unary_op): Likewise. - * decl.c (grokdeclarator): Or about implicit int. - * init.c (resolve_offset_ref): Or about implicit '&'. - -1999-08-11 Mark Mitchell - - * cp-tree.h (minimal_parse_mode): Remove. - (finish_label_stmt): New function. - * decl.c (saved_scope): Remove minimal parse mode. - (maybe_push_to_top_level): Don't save it. - (pop_from_top_level): Don't restore it. - (define_label): Split out template-handling code to semantics.c. - (start_decl): Don't use minimal_parse_mode. - (cp_finish_decl): Likewise. - (start_function): Don't increment it. - (store_return_init): Don't use it. - (finish_function): Don't decrement it. - * parse.y (label_colon): Use finish_label_stmt throughout. - * parse.c: Regenerated. - * pt.c (minimal_parse_mode): Don't define it. - (tsubst_expr): Use finish_label_stmt. - * semantics.c (finish_label_stmt): New function. - - * dump.c (queue): Be careful when computing bitmasks. - (dequeue_and_dump): Describe binfos as binfos, not as - vectors. - - * parse.y (pedantic): Give it itype. Adjust usage accordingly - throughout. - * parse.c: Regenerated. - - * Make-lang.in (CXX_SRCS): Remove sig.c. - * Makefile.in (CXX_OBJS): Remove sig.o. - (sig.o): Remove. - * cp-tree.h (CPTI_OPAQUE_TYPE): Remove. - (CPTI_SIGNATURE_TYPE): Likewise. - (CPTI_SIGTABLE_ENTRY_TYPE): Likewise. - (opaque_type_node): Likewise. - (signature_type_node): Likewise. - (sigtable_entry_type): Likewise. - (flag_handle_signatures): Likewise. - (lang_type): Remove is_signature, is_signature_pointer, - is_signature_reference, has_opaque_typedecls, - sigtables_has_been_generated. Adjust dummy. Remove signature, - signature_pointer_to, signature_reference_to. - (IS_SIGNATURE): Remove. - (SET_SIGNATURE): Remove. - (CLEAR_SIGNATURE): Remove. - (IS_SIGNATURE_POINTER): Remove. - (IS_SIGNATURE_REFERENCE): Remove. - (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove. - (SIGTABLE_HAS_BEEN_GENERATED): Remove. - (CLASSTYPE_SIGNATURE): Remove. - (SIGNATURE_TYPE): Remove. - (SIGNATURE_METHOD_VEC): Remove. - (SIGNATURE_POINTER_TO): Remove. - (SIGNATURE_REFERENCE_TO): Remove. - (lang_decl_flags): Remove is_default_implementation. Rename - memfunc_pointer_to to saved_tree. - (IS_DEFAULT_IMPLEMENTATION): Remove. - (DECL_MEMFUNC_POINTER_TO): Remove. - (DECL_MEMFUNC_POINTING_TO): Remove. - (DECL_SAVED_TREE): Adjust definition. - (tag_types): Remove signature_type_node. - (SIGNATURE_FIELD_NAME): Remove. - (SIGNATURE_FIELD_NAME_FORMAT): Likewise. - (SIGNATURE_OPTR_NAME): Likewise. - (SIGNATURE_SPTR_NAME): Likewise. - (SIGNATURE_POINTER_NAME): Likewise. - (SIGNATURE_POINTER_NAME_FORMAT): Likewise. - (SIGNATURE_REFERENCE_NAME): Likewise. - (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise. - (SIGTABLE_PTR_TYPE): Likewise. - (SIGTABLE_NAME_FORMAT): Likewise. - (SIGTABLE_NAME_FORMAT_LONG): Likewise. - (SIGTABLE_TAG_NAME): Likewise. - (SIGTABLE_VB_OFF_NAME): Likewise. - (SIGTABLE_VT_OFF_NAME): Likewise. - (finish_base_specifiers): Change prototype. - (build_signature_pointer_type): Remove. - (build_signature_reference_type): Remove. - (build_signature_pointer_constructor): Remove. - (build_signature_method_call): Remove. - (build_optr_ref): Likewise. - (append_signature_fields): Likewise. - (signature_error): Likewise. - * call.c (build_this): Remove signature support. - (build_over_call): Likewise. - (build_new_method_call): Likewise. - * class.c (add_implicitly_declared_members): Likewise. - (finish_struct_1): Likewise. - (finish_struct): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_pointer_force): Likewise. - (ocp_convert): Likewise. - * decl.c (sigtable_decl_p): Remove. - (init_decl_processing): Remove support for signatures. - (cp_finish_decl): Likewise. - (grokdeclarator): Likewise. - (grokparms): Likewise. - (xref_tag): Likewise. - (start_function): Likewise. - (start_method): Likewise. - * decl2.c (finish_sigtable_vardecl): Remove. - (flag_handle_signatures): Remove. - (lang_f_options): Remove handle-signatures. - (grokfield): Remove support for signatures. - (grokbitfield): Likewise. - (finish_file): Likewise. - (reparse_absdcl_as_casts): Likewise. - * error.c (dump_type_real): Likewise. - (dump_function_decl): Likewise. - * friend.c (make_friend_class): Likewise. - * gxx.gperf: Remove __signature__, signature, __sigof__, sigof. - * hash.h: Regenerated. - * init.c (build_new_1): Remove support for signatures. - * lang-options.h: Remove -fhandle-signatures, - -fno-handle-signatures. - * lex.c (init_parse): Remove support for signatures. - (yyprint): Likewise. - * lex.h (rid): Remove RID_SIGNATURE. - * method.c (build_decl_overload_real): Remove support for - signatures. - (hack_identifier): Likewise. - * parse.y (base_class): Likewise. - (base_class.1): Likewise. - (access_specifier): Likewise. - * search.c (lookup_member): Likewise. - * semantics.c (finish_qualified_object_call_expr): Likewise. - (finish_template_type_parm): Likewise. - (begin_class_definition): Likewise. - (finish_base_specifier): Likewise. - * sig.c: Remove. - * tree.c (build_cplus_method_type): Remove support for signatures. - * typeck.c (require_complete_type): Likewise. - (c_sizeof): Likewise. - (c_alignof): Likewise. - (build_object_ref): Likewise. - (build_component_ref): Likewise. - (build_indirect_ref): Likewise. - (build_c_cast): Likewise. - (build_modify_expr): Likewise. - (convert_for_initialization): Likewise. - * typeck2.c (signature_error): Remove. - (store_init_value): Remove support for signatures. - (digest_init): Likewise. - (build_x_arrow): Likewise. - (build_functional_cast): Likewise. - * xref.c (GNU_xref_decl): Likewise. - -1999-08-10 Martin v. Loewis - - * lex.c (do_identifier): Remove unnecessary lookup of class field. - -1999-08-09 Martin v. Loewis - - * decl2.c (set_decl_namespace): Do not complain about non-matching - decls if processing a template. - -1999-08-09 Mark Mitchell - - * decl.c (build_ptrmemfunc_type): Handle qualified - pointer-to-member types here. - * tree.c (cp_build_qualified_type_real): Simplify handling here. - -1999-08-09 Kaveh R. Ghazi - - * lex.c (lang_identify): Likewise. - -1999-08-09 Bernd Schmidt - - * Makefile.in: Update dependencies. - * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with - NULL_RTX. - * decl.c: Include "function.h" - (cleanup_label, return_label): Delete declarations. - (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX. - (finish_function): Rename last_parm_insn variable to - fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX. - * decl2.c: Include "function.h". - (rtl_expr_chain): Delete declaration. - * method.c: Include "function.h" - * tree.c (build_vbase_pointer_fields): Don't initialize - DECL_SAVED_INSNS with NULL_RTX. - * typeck.c: Include "function.h" - -1999-08-09 Jason Merrill - - * semantics.c (begin_function_try_block, finish_function_try_block, - finish_function_handler_sequence): New fns. - * parse.y (function_try_block): Use them. - * pt.c (instantiate_decl): Likewise. - - * cp-tree.h: Declare in_function_try_handler. - * decl.c: Define it. - (start_function): Clear it. - (struct cp_function, push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - * parse.y (function_try_block): Set and clear it. - * except.c (expand_end_catch_block): Rethrow if we reach the end - of a function-try-block handler in a ctor or dtor. - * typeck.c (c_expand_return): Complain about returning from a - function-try-block handler of a ctor. - - * parse.y (function_try_block): Call end_protect_partials - before expand_start_all_catch. - -1999-08-08 Jason Merrill - - * decl.c (struct binding_level): Add eh_region field. - (push_binding_level): Set it. - (define_label): Complain about jumping into an EH block. - - * ptree.c (print_lang_type): Print the real type of a PMF. - Print what exceptions a fn type throws. - -1999-08-07 Kaveh R. Ghazi - - * class.c (count_fields, add_fields_to_vec): Add static prototype. - - * cp-tree.h (opname_tab, assignop_tab, operator_name_string, - get_id_2, composite_pointer_type, dump_node_to_file): Constify a - char*. - - * decl.c (named_label_list, cp_finish_decl, grokdeclarator): - Constify a char*. - - * decl2.c (finish_static_data_member_decl, grokfield): Constify a - char*. - - * dump.c (queue_and_dump_index, dump_int, dump_string, - dump_string_field, dequeue_and_dump, dump_node_to_file): Constify - a char*. - (dump_stmt): Add static prototype. - - * errfn.c (cp_thing): Constify a char*. - - * error.c (dump_unary_op, dump_binary_op, aggr_variety, - dump_aggr_type, dump_global_iord, dump_decl, dump_function_name, - dump_expr): Constify a char*. - - * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc, - read_line_number): Add static prototype. - (opname_tab, assignop_tab, operator_name_string): Constify a char*. - (real_yylex): Move label `letter' into the scope where it is used. - - * method.c (build_mangled_template_parm_index, build_overload_int, - build_decl_overload_real, get_id_2): Constify a char*. - - * search.c (check_final_overrider): Make static. - - * typeck.c (composite_pointer_type): Constify a char*. - -1999-08-06 Jason Merrill - - * pt.c (maybe_get_template_decl_from_type_decl): Make sure that - we're looking at a class. - - * decl.c (lookup_name_real): Set the complain flag if we're - looking for a namespace member. - - * lex.c (real_yylex): We can have a number with no digits. - - * cvt.c (cp_convert_to_pointer): Don't force pmf conversions. - - * search.c (binfo_from_vbase): New fn. - * cp-tree.h: Declare it. - * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion - from pointer to member of virtual base. - * typeck.c (get_delta_difference): Likewise. - -1999-08-06 Alexandre Oliva - - * pt.c (tsubst): Use build_index_type to build in-template array - index type. Fixes g++.oliva/dwarf1.C. - * decl.c (grokdeclarator): Likewise, just for consistency, as it - doesn't seem to trigger the bug without it. - -1999-08-06 Jason Merrill - - * typeck2.c (add_exception_specifier): Use complete_type. - -1999-08-06 Mark Mitchell - - * error.c (dump_expr): Handle EXACT_DIV_EXPR. - (dump_binary_op): Bulletproof. - * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR]. - * tree.c (search_tree): Don't enumerate all the nodes of classes - `1', `2', and `<'; handle them generically. Don't be sorry about - "unrecognized tree codes"; just abort. - (no_linkage_check): Don't do linkage checks for templates. - - * tree.c (cp_build_qualified_type_real): Handle - pointer-to-member-function types correctly. - -1999-08-05 Jason Merrill - - * decl.c (pushdecl): Only give an error for shadowing a parm - from *this* function. - -Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com) - - * typeck2.c: Update URLs and mail addresses. - -1999-08-04 Nathan Sidwell - - * cp-tree.h (empty_except_spec): New global var. - (compexcepttypes): Remove prototype. - (comp_except_specs): Prototype new global function. - (add_exception_specifier): Prototype new global function. - * decl.c (empty_except_spec): Define new global var. - (duplicate_decls): Use comp_except_specs, reword error message. - (init_decl_processing): Initialize empty_except_spec. - Adjust build_exception_variant calls. - * parse.y (exception_specification_opt): Use empty_except_spec. - (ansi_raise_identifier): Call check_for_new_type. - (ansi_raise_identifiers): Use add_exception_specifier. - * pt.c (tsubst): Use add_exception_specifier to build exception - specifier. - * search.c (check_final_overrider): New static function, broken - out of get_matching_virtual. Check throw specifiers, reword - diagnostics. - (get_matching_virtual): Use check_final_overrider. - * tree.c (build_exception_variant): Use comp_except_specs. - * typeck.c (compexcepttypes): Remove. - (comp_except_types): New static function, helper for - comp_except_specs. Compare two types as exception specifiers. - (comp_except_specs): New global function, compare two exception - specifiers. - (comptypes): Adjust for comp_except_specs. - * typeck2.c (add_exception_specifier): New global function. - - * class.c (check_for_override): Reword error message. - -1999-08-03 Nathan Sidwell - - * call.c (convert_arg_to_ellipsis): Use pod_type_p. - * cp-tree.h (struct lang_type): Added non_pod_class flag. - (CLASSTYPE_NON_POD_P): New macro to access it. - * class.c (finish_struct_1): Determine non-PODness. - Check for arrays of pointers (-Weffc++). - Remove array inspection duplicated code. - * tree.c (pod_type_p): Detect non-pod non-aggregate types. - Use CLASSTYPE_NON_POD_P. - -1999-08-03 Nathan Sidwell - - * class.c (duplicate_tag_error): Preserve template information. - -1999-08-03 Nathan Sidwell - - * decl.c (start_enum): Show location of previous definition. - * parse.y (enumlist_opt): New reduction. - (structsp): Simplify enum rules to use enumlist_opt. - -1999-08-03 Jason Merrill - - * lex.c (yyprint): Handle PFUNCNAME. - - * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only - build_expr_from_tree on the args of a TEMPLATE_ID_EXPR. - -1999-08-03 Mumit Khan - - * decl.c (start_decl): Set attributes before duplicate_decls call. - -1999-08-02 Mark Mitchell - - * Make-lang.in (CXX_SRCS): Add dump.c. - * Makefile.in (CXX_OBJS): Add dump.o. - (dump.o): New target. - * cp-tree.h (DECL_CONV_FN_P): Document. - (DECL_OVERLOADED_OPERATOR_P): New function. - (TYPE_PTRMEM_CLASS_TYPE): New macro. - (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. - (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE. - (ASM_VOLATILE_P): New macro. - (STMT_LINENO): Likewise. - (cp_namespace_decls): New function. - (dump_node_to_file): New function. - * decl.c (cp_namespace_decls): New function. - (walk_namespaces_r): Use it. - (wrapup_globals_for_namespace): Likewise. - * decl2.c (flag_dump_translation_unit): New variable. - (lang_decode_option): Handle -fdump-translation-unit. - (finish_file): If flag_dump_translation_unit is set, dump the - translation unit. - * dump.c: New file. - * lang-options.h: Add -fdump-translation-unit. - * pt.c (tsubst_template_parms): Robustify. - (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P. - (tsubst_expr): Use STMT_LINENO. - * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check - for invalid cv-qualifiers even while building templates. - -1999-08-02 Richard Henderson - - * call.c: Include defaults.h instead of expr.h. - * decl.c: Likewise. - * pt.c: Likewise. - * typeck.c: Include defaults.h. - -1999-08-02 Mark Mitchell - - * lex.c (errorcount, sorrycount): Don't declare. - * repo.c (errorcount, sorrycount): Likewise. - * typeck2.c (errorcount, sorrycount): Likewise. - -1999-08-02 Jakub Jelinek - - * call.c (convert_default_arg, build_over_call): Change all uses of - PROMOTE_PROTOTYPES, so that it tests it as a C expression. - Ensure expr.h is included. - * decl.c (grokparams): Ditto. - * pt.c (tsubst_decl): Ditto. - * typeck.c (convert_arguments): Ditto. - -1999-08-02 Jason Merrill - - * class.c (mark_overriders): Fix order of args to overrides. - (warn_hidden): Likewise. Fix for having virtual and non-virtual - functions with the same name. - -1999-08-02 Richard Henderson - - * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null. - -1999-08-01 Mark Mitchell - - * call.c (build_conditional_expr): Fix typo in comment. - -1999-08-01 Bernd Schmidt - - * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack, - case_stack; use in_control_zone_p. - * typeck.c (c_expand_return): Likewise. - -1999-07-31 Bernd Schmidt - - * except.c (catch_clauses): Delete declaration. - -1999-07-30 Mark Mitchell - - * call.c (build_conditional_expr): Call convert_from_reference to - avoid reference/non-reference type confusion. Fix typo. - -1999-07-30 Richard Henderson - - * typeck2.c (initializer_constant_valid_p): Moved to c-common.c. - * cp-tree.h (initializer_constant_valid_p): Remove. - -1999-07-28 Mark Mitchell - - * call.c (conditional_conversion): Don't build BASE_CONVs for - conversions between things that have the same type. - (build_conditional_expr): Tweak. - (convert_like): Some BASE_CONVs really do require the generation - of code. - - * init.c (perform_member_init): Don't go through build_modify_expr - for simple initializations. - -1999-07-27 Jason Merrill - - * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro. - * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for - virtual functions and MI. Simplify. - - * method.c: Remove prototype for largest_union_member. - * pt.c (determine_specialization): Fix uninitialized warning. - * lex.c (real_yylex): Likewise. - -1999-07-27 Mark Mitchell - - * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS - here too. - - * cp-tree.h (BINFO_VIRTUALS): Document new format. - * class.c (modify_one_vtable): Change prototype accordingly. - (modify_all_vtables): Likewise. - (modify_all_direct_vtables): Likewise. - (modify_all_indirect_vtables): Likewise. - (build_vtable_entry_for_fn): New function. - (set_rtti_entry): Simplify for new BINFO_VIRTUALS format. - (modify_vtable_entry): Likewise. - (add_virtual_function): Likewise. - (build_vtbl_initializer): New function. - (finish_vtbls): Simplify for new BINFO_VIRTUALS format. - (fixup_vtable_deltas1): Likewise. - (fixup_vtable_deltas): Likewise. - (override_one_vtable): Likewise. - (finish_struct_1): Likewise. - - * error.c (dump_expr): Likewise. - * search.c (get_abstract_virtuals_1): Likewise. - (get_abstract_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to - __pure_virtual here. - -1999-07-26 Mark Mitchell - - * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error - as per 1999-07-26 change. - - * typeck.c (c_sizeof): Don't allow non-static data members. - (expr_sizeof): Likewise. - -1999-07-26 Jason Merrill - - * input.c (feed_input): Only touch lineno and input_filename - if !USE_CPPLIB. Save the old values before setting the new ones. - - * input.c (feed_input): Add file, line parms. - * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust. - (real_yylex): Check linemode before input_redirected(). - - * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL - from op new to warning. - -1999-07-26 Mark Mitchell - - * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion. - * call.c: All uses changed. - * typeck.c: Likewise. - -1999-07-26 Nathan Sidwell - - * exception.cc (__cplus_type_matcher): Match __eh_matcher - prototype. - -1999-07-26 Mark Mitchell - - * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro. - (ARITHMETIC_TYPE_P): Adjust definition for standard conformance. - (strip_top_quals): Declare. - (ncp_convert): Likewise. - (type_after_usual_arithmetic_conversions): Likewise. - (composite_pointer_type): Likewise. - * call.c (strip_top_quals): Don't make it static. - (promoted_arithmetic_type_p): New function. - (conditional_conversion): Likewise. - (null_ptr_cst_p): Allow `false' as a NULL pointer constant. - (standard_conversion): Use same_type_p. Don't build BASE_CONVs - for converting a type to itself. - (reference_binding): Honor LOOKUP_NO_TEMP_BIND. - (implicit_conversion): Make sure the from and to types are - complete. - (add_builtin_candidate): Correct handling of ?: operator. - (add_builtin_candidates): Improve documentation. - (build_conditional_expr): New function. - (can_convert): Implement in terms of can_convert_arg. - (ncp_convert): New function. - * typeck.c (type_after_usual_arithmetic_conversions): New - function, split out from common_type. - (composite_pointer_type): New function, split out from - build_conditional_expr. - (common_type): Use type_after_usual_arithmetic_conversions. - Remove redundant attribute merging. - (comptypes): Tidy. Handle COMPLEX_TYPE. - (build_binary_op_nodefault): Use null_ptr_cst_p. - (build_conditional_expr): Remove. - (convert_for_assignment): Use new conversion functions. - - * cp-tree.h (abstract_virtuals_error): Change declaration. - * typeck2.c (abstract_virtuals_error): Check to see if an error - occurred, and return a boolean value accordingly. - (build_functional_cast): Adjust accordingly. - * class.c (finish_struct_1): Likewise. - * cvt.c (ocp_convert): Likewise. - * decl.c (cp_finish_decl): Likewise. - (grokparams): Likewise. - (grok_op_properties): Likewise. - (start_function): Likewise. - * init.c (build_new_1): Likewise. - - * pt.c (unify): Don't get confused by pointers-to-member functions. - - * search.c (build_cplus_new): Robustify. - -1999-07-24 Richard Henderson - - * gxx.gperf (__builtin_va_arg): New. - * parse.y (VA_ARG): New token. - (unary_expr): Recognize it. - -Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com) - - * g++FAQ.texi: Deleted per Joe Buck's request. - * Makefile.in: Corresponding changes. - -1999-07-23 Jason Merrill - - * lex.c: Sync with C frontend. - (whitespace_cr): New fn. - (skip_white_space): Use it. - (init_parse): Reorder. - (yyprint): Support CONSTANT. - (pragma_getc, pragma_ungetc): Bring back. - (read_line_number): Change in_system_header directly. - (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file. - (parse_float): Update to C version. - (yylex): Handle '$' under the letter case. - Remove looking_for_typename handling. - Support hex floating point constants. - Follow C's lead for choosing type of integer constants. - Rearrange stuff to match C frontend. - (yyungetc, reinit_parse_for_block, yylex): Support indent_level. - * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC. - -1999-07-23 Mark Mitchell - - * call.c (reference_binding): Tweak. - (mayble_handle_implicit_object): Use direct_reference_binding to - create the right implicit conversion sequence. - -1999-07-22 Mark Mitchell - - * pt.c (convert_nontype_argument): Don't call decl_constant_value - if we're converting to a reference type. - - * call.c (NEED_TEMPORARY_P): New macro. - (standard_conversion): Set it, for derived-to-base conversions. - (reference_related_p): New function. - (reference_compatible_p): Likewise. - (convert_class_to_reference): Likewise. - (direct_reference_binding): Likewise. - (reference_binding): Rework for standards-compliance. - (convert_like): Adjust accordingly. - (maybe_handle_ref_bind): Simplify; the right conversion sequences - are now built up in reference_binding. - (initialize_reference): New function. - * cp-tree.h (ICS_USER_FLAG): Document. - (ICS_THIS_FLAG): Likewise. - (ICS_BAD_FLAG): Likewise. - (NEED_TEMPORARY_P): Likewise. - (cp_lvalue_kind): New type. - (real_lvalue_p): Return it. - * error.c (dump_expr): Provide more accurate representation for - AGGR_INIT_EXPRs. - * init.c (expand_default_init): Do not try to perform implicit - conversions for a brace-enclosed initializer. - * search.c (lookup_conversions): Document. - * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate - appropriately. - (real_lvalue_p): Adjust accordingly. - (lvalue_p): Likewise. - (build_cplus_new): Don't allow the creation of an abstract class. - * typeck.c (convert_for_initialization): Use initialize_reference. - -1999-07-21 Gavin Romig-Koch - - * lex.c (real_yylex) : Correct the test for overflow when lexing - integer literals. - -1999-07-20 Jason Merrill - - * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL, - not DECL_BUILT_IN, to determine if a function is internally declared. - (duplicate_decls): Likewise. Improve handling of builtins. - (push_overloaded_decl): Remove special handling of builtins. - - * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P. - - * decl.c (grokdeclarator): Pull out decl_constant_value in - templates, too. - - * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm. - * cp-tree.h, pt.c, semantics.c: Adjust. - * method.c (largest_union_member): Remove. - - * lang-specs.h (c++-cpp-output): Pass -fpreprocessed. - - * lex.c (token_getch, token_put_back): New fns. - (real_yylex): Use them. - - * lex.c (lang_init): Generalize. - (lang_init_options): Tell cpplib this is C++. - (nextchar): Remove. Replace uses with put_back. - (skip_white_space): Handle linemode here. Optimize for cpplib. - (extend_token_buffer_to): New fn. - (extend_token_buffer): Use it. - (read_line_number, check_newline): Just deal with tokens. - (real_yylex): More cpplib optimizations. Simplify. Don't produce - EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here. - * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING. - * parse.y (PAREN_STAR_PAREN): Remove. - * input.c: Don't use the putback machinery with cpplib. - (sub_getch): Fold back into getch. - (getch): Don't handle linemode here. - (feed_input): Unget any text in the token buffer. - - * lex.c (set_typedecl_interface_info, set_vardecl_interface_info, - nextyychar, nextyylval): Remove. - -1999-07-20 Michael Tiemann - Jason Merrill - - * lex.c (indent_level): New variable. - (init_parse): Set cpp_token to CPP_DIRECTIVE. - (consume_string): Make this smart about USE_CPPLIB. - (yyungetc): Use put_back function. - (pragma_getc, pragma_ungetc): Functions deleted. - (check_newline): Rewrite to be intelligent about USE_CPPLIB. - Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and - pragma_ungetc. - (real_yylex): Rewrite to be intelligent about USE_CPPLIB. - Also, clean up cases where we redundantly set token_buffer[0]. - (read_line_number): New fn. - * input.c (feed_input): Use integrated cpplib if USE_CPPLIB. - (end_input): Call cpp_pop_buffer if USE_CPPLIB. - (sub_getch): Conditionalize out code that's not appropriate if - USE_CPPLIB. - (put_back): Rewrite in case USE_CPPLIB is defined. - (input_redirected): Ditto. - -Tue Jul 20 11:24:19 1999 Bernd Schmidt - - * cp-tree.h: Delete lots of declarations of tree nodes; replaced by - c_global_trees and accessor macros defined in c-common.h. - (cp_tree_index): New enumeration. - (cp_global_trees): Declare new array. Add accessor macros for it, and - delete declarations of tree nodes replaced by it. - (builtin_function): Delete macro, add declaration for new function. - Include c-common.h. - * decl.c: Delete definitions for tree nodes that were replaced by - cp_global_trees and c_global_trees. - (init_decl_processing): Call c_common_nodes_and_builtins; delete code - to generate the common builtins here. - (builtin_function): New function. - * decl2.c (abort_fndecl): Delete declaration. - * except.c (expand_builtin_return_address): Delete declaration. - (builtin_return_address_fndecl): Delete variable. - (const_ptr_type_node): Delete declaration. - * lex.c (cons_up_default_function): Delete declaration of - void_list_node. - * parse.y (void_list_node): Delete declaration. - * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type): - Delete variables. - (const_string_type_node): Delete declaration. - * search.c (abort_fndecl): Delete declaration. - * Makefile.in: Update dependencies. - -1999-07-19 Mark Mitchell - - * pt.c (check_default_tmpl_args): Move test for missing default - arguments here, from ... - (end_template_parm_list): Here. - -1999-07-18 Mark Mitchell - - * decl.c (lookup_nested_type): Remove. - (pushtag): Don't call it. - -Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (INTERFACE): Bump to 2. - -1999-07-17 Alexandre Oliva - - * typeck2.c (my_friendly_abort): Updated URL with bug reporting - instructions to gcc.gnu.org. Removed e-mail address. - -1999-07-17 Mark Mitchell - - * pt.c (determine_specialization): Tighten error-checking. - (end_template_parm_list): Likewise. - -1999-07-14 Mark Mitchell - - * pt.c (check_default_tmpl_args): Handle friends defined in the - class just like member functions defined in the class. - -1999-07-09 Michael Tiemann - Jason Merrill - - * cp-tree.h (struct lang_decl): Added field for storing sorted - FIELD_DECLs (used in TYPE_DECLs). - (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union. - (DECL_SORTED_FIELDS): New macro. - * class.c (method_name_cmp): New function. - (finish_struct_methods): Modified to support sorting and searching - methods. - (finish_struct_anon): Changed code in inner loop to use ELT rather - than UELT (which required an extra indirection for every reference). - (field_decl_cmp): New function to support sorting FIELD_DECLs. - (finish_struct_1): Sort fields. - * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them. - (lookup_fnfields_1): Search sorted methods in METHOD_VEC. - Also, switch to using array indexing rather than a changing pointer. - * ptree.c (print_lang_decl): Handle TYPE_DECLs that have - DECL_SORTED_FIELDS. - -1999-07-09 Jason Merrill - - * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style - casts in system headers or extern "C" blocks. - - * pt.c (do_decl_instantiation): Downgrade duplicate instantiation - errors to pedwarn. - -1999-07-09 Michael Tiemann - - * decl2.c (write_virtuals): Deleted declaration. - * cp-tree.h (write_virtuals): Deleted extern declaration. - * class.c (finish_struct_1): Removed #if 0'd code that mentions - write_virtuals. - * semantics.c (begin_class_definition): Rewrite code to not depend - on write_virtuals. - - * lex.c (cp_pragma_interface): New function. - (cp_pragma_implementation): Likewise. - (handle_cp_pragma): Call them. - - * typeck.c (comptypes): Simplify C code in look_hard. - - * xref.c (PALLOC): Use xcalloc, not calloc. - (SALLOC): Use xmalloc, not malloc. - - * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary. - - * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS - is NO_DEBUG. - - * decl.c (duplicate_decls): If a redeclaration doesn't match the - initial declaration, then don't save the inline info and by all - means don't mark the function as a builtin function. - - * decl.c (lookup_name_real): Set NONCLASS to 1 if - CURRENT_CLASS_TYPE is 0. - - * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to - NULL_TREE. - - * ptree.c (print_lang_type): Added vtable-needs-writing. - -Wed Jul 7 01:26:47 1999 Alexandre Oliva - - * decl2.c (mark_vtable_entries): Fix check for rtti offset. - -1999-07-06 Gavin Romig-Koch - - * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : - Merged into c-common. - -1999-07-05 Dave Brolley - - * lex.c (errorcount): Declare it. - (finish_parse): Update errorcount for when using CPPLIB. - -1999-07-05 Mark Mitchell - - * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template - parameters. - (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro. - * decl.c (push_class_binding): Use it. - (lookup_name_real): Likewise. - -1999-07-02 Gavin Romig-Koch - - * cp-tree.h (widest_integer_literal_type_node, - widest_unsigned_literal_type) : New. - * decl.c (widest_integer_literal_type_node, - widest_unsigned_literal_type) : New. - (init_decl_processing): Handle/use the two new types. - * lex.c (real_yylex): Same. - * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : - Same. - -1999-07-01 Mark Mitchell - - * decl.c (grokdeclarator): Don't give names "for linkage purposes" - to anonymous cv-qualified types. - -1999-07-01 Gavin Romig-Koch - - * lex.c (real_yylex) : Change integer literal overflow handling to - be like c-lex.c. - - * lex.c (real_yylex): Improve 'integer constant out of range' messages. - -1999-06-28 Richard Henderson - - * decl.c (cp_finish_decl): Fix typo in cp_warning_at call. - -1999-06-28 Jason Merrill - - * error.c (dump_type_real): Handle TREE_LIST again. - - * typeck.c (comp_target_parms): Don't complain about - converting from () to (...) if !flag_strict_prototype. - - * decl.c (grokdeclarator): Update the names of all variants when - de-anonymizing. - -1999-06-21 Mark Mitchell - - * init.c (expand_aggr_vbase_init): Rename to - construct_virtual_bases. Conditionalize construction here, - rather than ... - (emit_base_init): Here. - -1999-06-19 Mark Mitchell - - * semantics.c (finish_asm_stmt): Apply decay conversions to - input operands. - - * decl.c (expand_static_init): When building an anonymous function - for use with atexit, compute its body before and after entering - the function. - - * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and - EXIT_EXPR. - -1999-06-18 Mark Mitchell - - * init.c (expand_aggr_vbase_init): Add flag parameter. - (build_partial_cleanup_for): Remove, inlining into .. - (expand_cleanup_for_base): ... here. Take flag parameter. - (emit_base_init): Pass the in_chrg parameter to - emit_aggr_vbase_init. - (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base. - -1999-06-16 Mark Mitchell - - * decl2.c (import_export_decl): Use same_type_p, rather than - relying on pointer-equality for types. - - * method.c (do_build_copy_constructor): Simplify. - - * call.c (build_method_call): Remove bogus code for two-argument - delete. - * init.c (build_new_1): Expand on comment, and remove dead code. - - * init.c (expand_cleanup_for_base): New function, split out - from ... - (emit_base_init): Here. - (expand_aggr_vbase_init): Use it. - -1999-06-15 Mark Mitchell - - * cp-tree.h (class_cache_firstobj): Declare. - (maybe_push_cache_obstack): Rename to push_cache_obstack. - * class.c (permanent_obstack): Remove declaration. - (class_cache_firstobj): Make it global. - (add_method): Don't use permanent_obstack directly. - (pushclass): Only free the class_cache_obstack if we know how far - back to free it. - (maybe_push_cache_obstack): Rename to push_cache_obstack. - * decl.c: Remove dead comment. - (saved_scope): Add class_cache_firstobj. - (push_to_top_level): Save it. - (pop_from_top_level): Restore it. - (push_class_level_binding): Use push_cache_obstack, not - maybe_push_cache_obstack. - * search.c (push_class_decls): Likewise. - -1999-06-14 Martin von Löwis - - * pt.c (tsubst_friend_function): Push into namespace of friend - function before pushdecl'ing it. - -1999-06-14 Nathan Sidwell - - * call.c (build_new_op): Remove REF_BIND from all operands. - -1999-06-13 Alexandre Oliva - - * init.c (build_new_1): Look up operator delete even if there was - no explicit new placement. - -1999-06-08 Nathan Sidwell - - * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out - of ... - (build_throw): ... here. Call it. - (process_start_catch_block): Call it. - -1999-06-07 Mark Mitchell - - * search.c (convert_pointer_to_single_level): Reimplement without - using get_binfo. - -1999-06-06 Mark Mitchell - - * method.c (is_back_referenceable_type): Back-reference bools when - not squangling. - -1999-06-07 Dave Brolley - - * lex.c (real_yylex): Replace unused bytes from bad multibyte char. - * input.c (putback_buffer): New structure type. - (putback): Replaces putback_char member. - (putback): Replaces putback_char static variable. - (feed_input): Use putback. - (end_input): Use putback. - (sub_getch): Use putback. - (put_back): Use putback. - -1999-06-05 Mark Mitchell - - * decl.c (grokdeclarator): Fix typo in last change. - -1999-06-04 Jason Merrill - - * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack. - (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise. - -1999-06-04 Nathan Sidwell - - * except.c (build_throw): Check throw expression validity. - -1999-06-03 Mark Mitchell - - * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned - just because flag_signed_bitfields is false. - -1999-06-03 Nathan Sidwell - - * semantics.c (begin_class_definition): Update the struct's - location here ... - * class.c (finish_struct): ... rather than here. - - * decl.c (make_typename_type): Don't rely on uninitialized - variable. - -1999-05-31 Kaveh R. Ghazi - - * Makefile.in (ALL_CFLAGS): Add '-W -Wall'. - -1999-05-31 Mark Mitchell - - * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange - and friends rather than messing with current_obstack directly. - (cp_build_qualified_type_real): Rework ARRAY_TYPE - allocation to match practice throughout the rest of the - compiler. - -1999-05-30 Mark Mitchell - - * lex.c (make_lang_type): Create TYPE_BINFO for - TEMPLATE_TYPE_PARMs just like for non-template types. - - * decl.c (start_decl): Move checks on initialization to ... - (cp_finish_decl): Here. Tidy formatting slightly. - -1999-05-28 Mark Mitchell - - * decl.c (add_binding): Don't complain about a redeclaration of a - semantically identical typedef in a local scope. - -1999-05-28 Nathan Sidwell - - * decl.c (complete_array_type): Allocate off same obstack. Fix - DO_DEFAULT comment to match reality. - - * friend.c (make_friend_class): Fix diagnostic typo. - -1999-05-28 Mark Mitchell - - * decl.c (lookup_namespace_name): Handle getting a - TEMPLATE_ID_EXPR. - (expand_static_init): Don't call pushdecl for implicitly declared - `atexit' used to register destructors. - -1999-05-25 Mark Mitchell - - * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to - initialize a vtable. - - * cp-tree.h (NAMESPACE_LEVEL): Reformat. - (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes - by combining TEMPLATE_INFO and LEVEL into a single union. - (DECL_TEMPLATE_INFO): Reformat. - (DECL_SAVED_TREE): Document. - (DECL_TEMPLATE_INJECT): Remove. - * class.c (finish_struct): Remove code to deal with - DECL_TEMPLATE_INJECT. - - * decl.c (maybe_process_template_type_declaration): Handle all new - types in templates uniformly. - * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not - DECL_CONTEXT. - * pt.c (lookup_template_class): Inject template instantiations of - forward-declarations. - (instantiate_class_template): Remove code processing - DECL_TEMPLATE_INJECT. - - * pt.c (lookup_template_class): Tweak lookup to find member - templates. - - * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into - ASM_CV_QUAL. - * semantics.c (finish_asm_stmt): Make strings permanent if they're - used in a template. - -1999-05-25 Jason Merrill - - * typeck.c (casts_away_constness, casts_away_constness_r): Strip both - parts of pointer to data member types. - -1999-05-24 Mark Mitchell - - * decl2.c (mark_vtable_entries): Don't make a copy of a function, - and then make it look like `abort'. Just use `abort' instead. - - * typeck.c (build_static_cast): Don't allow static_casts that cast - away constness. - (casts_away_constness_r): New function. - (casts_away_constness): Likewise. - - * decl.c (lookup_tag): Remove code no longer needed after - name-lookup improvements. - * decl2.c (handle_class_head): Make error-recovery more robust. - * friend.c (make_friend_class): Reject templated typename types. - * lex.c (is_global): A template parameter isn't global. - * parse.y (class_head): Robustify. - * parse.c: Regenerated. - -1999-05-22 Mark Mitchell - - * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs, - INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs. - - * cp-tree.h (push_nested_namespace): Declare. - (pop_nested_namespace): Likewise. - * decl.c (push_nested_namespace): New function. - (pop_nested_namespace): Likewise. - * pt.c (instantiate_class_template): Use them. - - * tree.c (mapcar): Handle NON_LVALUE_EXPR. - - * cp-tree.h (cplus_expand_constant): Declare. - * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're - converted from one pointer-to-object type to another. - * expr.c (cplus_expand_constant): Don't make it static. - * typeck.c (build_component_ref): Don't crash when presented with - a component which is a TEMPLATE_DECL. - (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a - cast from a pointer-to-member constant to its own type does not - result in a valid non-type template argument. - -1999-05-21 Mark Mitchell - Nathan Sidwell - - * Make-lang.in (cc1plus): Make it depend on gxx.gperf. - * cp-tree.h: Fix typo in documentation on pointers-to-members. - (cp_build_qualified_type): Make it a macro. - (cp_build_qualified_type_real): Declare. - * decl.c (grokdeclarator): Remove misleading comment. Avoid - problem with template parameters and restrict-qualification. - * gxx.gperf: Replace NORID with RID_UNUSED throughout. - * hash.h: Regenerated. - * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into - the enumeration. - (NORID): Remove definition. - * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real. - (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs. - (fn_type_unification): Check that the function type resulting from - the deduction is legal. - (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially. - (unify): Use cp_build_qualified_type_real. - * tree.c (build_cplus_array_type_1): Handle error_marks as inputs. - (cp_build_qualified_type): Rename to ... - (cp_build_qualified_type_real): Add additional COMPLAIN parameter - and modify appropriately. - - * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to - reveal optimization opportunities. - - * pt.c (tsubst): Don't issue error messages when we're not - complaining, even if we see a qualified function type. - (check_cv_quals_for_unify): Don't allow a qualified function - type. - -1999-05-20 Jason Merrill - - * class.c (instantiate_type): Downgrade errors for object-dependent - memfn refs to pedwarn. - -1999-05-20 Mark Mitchell - - * decl.c (grokdeclarator): Don't treat [] as indicating a - zero-sized array in a typedef. - - * call.c (build_object_call): Don't look at DECL_NAME for a type. - (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK. - (typeck.c): Or TYPE_MAIN_VARIANT for a type. - - * pt.c (for_each_template_parm): Rework to match documentation. - Don't be fooled by a COMPONENT_REF with no TREE_TYPE. - -1999-05-20 Jason Merrill - - * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P. - - * class.c (finish_base_struct): Allow non-COM bases for COM classes - except at the leftmost position. - (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable): - Pass the binfo's class, not the most derived, to skip_rtti_stuff. - * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise. - - * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue. - (build_cplus_new): Make sure that what we return is of the right type. - -1999-05-20 Mark Mitchell - - * cp-tree.h (make_ptrmem_cst): New function. - * expr.c (cplus_expand_constant): Split out from ... - (cplus_expand_expr): Here. Use cplus_expand_constant. - (init_cplus_expand): Set lang_expand_constant. - * pt.c (convert_nontype_argument): Use make_ptrmem_cst. - - * tree.c (make_ptrmem_cst): Define. - * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst. - * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst. - -1999-05-19 Mark Mitchell - - * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P. - - * decl2.c (start_static_storage_duration_function): Fix comment. - (finish_file): Create static storage duration functions lazily. - -1999-05-19 Jason Merrill - - Implement anonymous structs. - * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P. - * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust. - * class.c (finish_struct_1): Remove redundant check for anon struct. - * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union. - (check_tag_decl): Check for anonymous struct here. - * decl2.c (build_anon_union_vars): Catch anon struct at file scope. - * init.c (sort_member_init, emit_base_init): Handle getting fields - as well as names in current_member_init_list. - (perform_member_init): Handle getting an anon aggr. - * method.c (do_build_assign_ref): Don't descend into anon aggrs. - (do_build_copy_constructor): Likewise. - -1999-05-19 Mark Mitchell - - * tree.c (cp_build_qualified_type): Don't allow qualified function - types. - -Wed May 19 02:50:53 1999 Arvind Sankar - - * gxxint.texi: Fix typo. - -1999-05-19 Jason Merrill - - * call.c (find_scoped_type, resolve_scope_to_name): Lose. - * class.c (finish_struct_1): Use CLASS_TYPE_P. - * ptree.c (print_lang_type): Likewise. - * typeck.c (build_modify_expr, c_expand_asm_operands): Use - IS_AGGR_TYPE_CODE. - * typeck2.c (digest_init): Likewise. - -1999-05-18 Jason Merrill - - * call.c (joust): Compare the types of the conv ops, not the - target types of the conversions. - -Tue May 18 00:21:34 1999 Zack Weinberg - - * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc - was not given. - -1999-05-17 Mark Mitchell - - * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation. - * decl.c (grokfndecl): Don't allow inline declarations of friend - template specializations, or friend template specializations with - default arguments. - * pt.c (tsubst): Handle substitution into array types that does - not yield a fixed upper bound, even when not processing a - template. - (tsubst_copy): Deal with the fact that the second operand to a - TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC. - * search.c (marked_pushdecls_p): Don't descend into - TEMPLATE_TYPE_PARMs and the like. - (unmarked_pushdecls_p): Likewise. - - * call.c (build_over_call): Don't throw away - initializations/copies of empty classes; use MODIFY_EXPR and - INIT_EXPR as for non-empty classes. - * class.c (finish_struct_1): Put the padding byte for an empty - class on the TYPE_NONCOPIED_PARTS list for the class. - -1999-05-16 Mark Mitchell - - * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that - indicate a reference to a field that is a qualified name. - -1999-05-16 Jason Merrill - - * decl2.c (finish_objects): Don't use .?tors.* if we don't have - ASM_OUTPUT_CONSTRUCTOR. - - * friend.c (do_friend): Add attrlist arg. Remove support for - getting a non-decl as 'decl'. - * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or - rtl. - (grokdeclarator): Adjust. - * cp-tree.h: Adjust. - -1999-05-16 Mark Mitchell - - * cp-tree.h (permanent_p): New function. - * init.c (build_new_1): Use mapcar, not copy_node, to copy a - possibly complex tree node. - * tree.c (mapcar): Adjust comments, and follow coding standards in - conditional. - (permanent_p): New function. - -1999-05-13 Per Bothner - - * class.c (push_lang_context): Turn off DECL_IGNORED_P for - primitive Java types, if we actually see `extern "Java"'. - -1999-05-10 18:21 -0400 Zack Weinberg - - * lang-specs.h: Pass -$ to the preprocessor. - -1999-05-10 Jason Merrill - - * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too. - Don't bother wrapping an OFFSET_TYPE around unknown_type_node. - (resolve_offset_ref): Don't handle a raw baselink. - * cvt.c (build_expr_type_conversion): Likewise. - * typeck.c (decay_conversion, build_c_cast, convert_for_assignment, - convert_for_initialization): Likewise. - * class.c (instantiate_type): Handle seeing a baselink under an - OFFSET_REF. - * error.c (dump_expr): Likewise. - * pt.c (for_each_template_parm): Likewise. - (resolve_overloaded_unification): Likewise. - * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise. - * typeck.c (expr_sizeof): Also complain about other permutations - of overloaded functions. - -1999-05-07 Jason Merrill - - * init.c (resolve_offset_ref): Don't return a raw method. - Use BASELINK_P. - * typeck.c (decay_conversion): Don't handle a raw method. - Resolve all OFFSET_REFs. - (get_member_function_from_ptrfunc): 0 is a valid vtable index. - (build_binary_op_nodefault): Handle resolving overloaded fns. Use - same_type_p for pmf bits. Don't use build_binary_op to compare - raw pointers to methods. - (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE, - to decide when to call resolve_offset_ref. - (build_c_cast, convert_for_initialization): Likewise. - * cvt.c (build_expr_type_conversion): Likewise. - -1999-05-06 Nathan Sidwell - - * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class. - -1999-05-05 Mark Mitchell - - * decl2.c (start_objects): Don't let static constructors and - destructors get inlined. - - * parse.y (nested_name_specifier): Make sure ordinary types are - complete, just like template types. - * parse.c: Regenerated. - - * pt.c (check_explicit_specialization): Improve error messages. - -1999-05-04 Martin von Löwis - - * typeck.c (string_conv_p): Use same_type_p to check whether we - try to convert between char and wchar_t. - -1999-05-03 Mark Mitchell - - * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous - lookup to error_mark_node here. - (lookup_member): Revise documentation. Add comments. Don't set - the TREE_TYPE to error_mark_node here, and don't build up an extra - TREE_LIST for ambiguous lookups. - (setup_class_bindings): Adjust accordingly. - (push_class_decls): Revise out-of-date comments. - - * typeck.c (build_const_cast): Tighten checks for legality. - -1999-05-02 Martin von Löwis - - * init.c (build_member_call): Lookup names coming from - namespace-scoped LOOKUP_EXPR. - -1999-05-03 Jim Blandy - - * gxxint.texi: Add documentation for 'I'. - -1999-05-02 Martin von Löwis - - * tinfo.cc (operator==): Qualify type_info with std::. - -1999-05-02 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy. - (DECL_COMDAT): Remove definition. - -1999-05-01 Mark Mitchell - - * decl.c (wrapup_globals_for_namespace): Fix thinko in previous - change. - -1999-04-30 Mark Mitchell - - * class.c (build_vtable): Use build_lang_decl when building - vtables, not just build_decl. - (prepare_fresh_vtable): Likewise. - * decl.c (wrapup_globals_for_namespace): Mark vtables as - DECL_EXTERNAL when calling wrapup_global_declarations. - * decl2.c (priority_info_s): Add initializations_p and - destructions_p members. - (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED, - when deciding what vtables to write out. - (ssdf_decls): New variable. - (ssdf_decls_used): Likewise. - (start_static_storage_duration_function): Deal with being called - multiple times. Avoid inlining this function. - (generate_inits_for_priority): Deal with reuse of priority map. - (get_priority_info): Clear initializations_p and destructions_p. - (do_static_initialization): Tweak comment. - (do_static_destruction): Likewise. Fix condition on sentries for - destruction. - (generate_ctor_or_dtor_function): Call all of the static storage - duration functions. - (generate_ctor_or_dtor_function_for_priority): Check - initializations_p and destructions_p to see what priorities need - initialization functions. - (finish_file): Rework to generate multiple static storage duration - functions, rather than just one. - - * typeck.c (build_const_cast): Tweak last change to handle - templates correctly. - - * typeck.c (build_const_cast): Disallow use of const_cast to - anything but a pointer or reference type. - -1999-04-30 Nathan Sidwell - - * decl.c (cp_finish_decl): Don't permit arrays of abstract or - signature type. - -1999-04-29 Mark Mitchell - - * decl2.c (do_static_destruction): Remove obsolete FIXME comment. - (finish_file): Indent comments properly. - -1999-04-29 Richard Henderson - - * decl2.c (do_static_initialization): Call do_pending_stack_adjust. - (do_static_destruction): Likewise. - -1999-04-29 Nathan Sidwell - - * cp-tree.h (TYPE_NOTHROW_P): New macro. - * decl2.c (delete_sanity): Warn on deleting void *. - * init.c (build_new_1): Use TYPE_NOTHROW_P. - * typeck.c (c_expand_return): cp_pedwarn on returning NULL from - throwing operator new. - -1999-04-28 Nathan Sidwell - - * cp-tree.h (build_component_addr): Remove prototype. - * typeck.c (build_component_addr): Make static. Remove MSG - argument. - (build_component_addr): Remove MSG parameter, clean up - comment. - (build_x_function_call): Use cp_error. - (build_unary_op): Adjust call of build_component_addr. - -1999-04-28 Mark Mitchell - - * pt.c (tsubst_friend_class): Check for NULL. - -Wed Apr 28 11:42:22 1999 Andreas Schwab - - * search.c (binfo_for_vtable): Initialize bfvi.var. - -1999-04-27 Nathan Sidwell - - * rtti.c (build_x_typeid): Check rtti is enabled. - -1999-04-26 Mark Mitchell - - * search.c (is_subobject_of_p): Make sure we're looking at the - right baseclasses. - -1999-04-26 Marc Espie - - * Make-lang.in (cplib2.ready): Don't depend on phony targets. - -1999-04-23 Mark Mitchell - - * decl2.c (finish_file): Tweak handling of extern inlines so that - they are not unnecessarily put out. - - * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and - such as base classes. - -1999-04-22 Brendan Kehoe - - * tree.c (build_exception_variant): Fix typo: use the chain of U, - not trying V, while cycling through U. - -1999-04-22 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove returns_first_arg and - preserves_first_arg. Enlarge dummy accordingly. - (DECL_TINFO_FN_P): New macro. - (SET_DECL_TINFO_FN_P): Likeiwse. - (DECL_RETURNS_FIRST_ARG): Remove. - (DECL_PRESERVES_THIS): Likewise. - (DECL_INIT_PRIORITY): New macro. - (finish_struct_1): Change prototype. - (cat_namespace_levels): Remove prototype. - (vtable_decl_p): New prototype. - (vtype_decl_p): Likewise. - (sigtable_decl_p): Likewise. - (walk_globals_pred): New typedef. - (walk_globals_fn): Likewise. - (walk_globals): New prototype. - (walk_namespaces_fn): New typedef. - (walk_namespaces): New prototype. - (wrapup_globals_for_namespace): Likewise. - (walk_vtables): Remove prototype. - (walk_sigtables): Likewise. - (instantiate_pending_templates): New prototype. - * class.c (finish_struct_1): Don't return a value. - * decl.h (pending_statics): Remove declaration. - * decl.c (walk_namespaces_r): New function. - (walk_globals_r): Likewise. - (vtable_decl_p): Likewise. - (vtype_decl_p): Likewise. - (sigtable_decl_p): Likewise. - (walk_namespaces): Likewise. - (walk_globals_data): New type. - (walk_globals): New function. - (wrapup_globals_for_namespace): Likewise. - (expand_static_init): Remove assertion. Remove redundancy in - conditional. Don't put static data members in static_aggregates - Tidy. - (finish_function): Remove redundancy in conditional. Don't set - DECL_RETURNS_FIRST_ARG. - (cat_namespace_levels): Remove. - * decl2.c: Include splay-tree.h and varray.h. - (priority_info_s): New structure. - (finish_vtable_vardecl): Change prototype. Adjust for new calling - conventions. - (prune_vtable_vardecl): Likewise. - (finish_sigtable_vardecl): Likewise. - (setup_initp): Remove. - (do_dtors): Remove. - (do_ctors): Remove. - (start_static_storage_duration_function): New function. - (generate_inits_for_priority): Likewise. - (finish_static_storage_duration_function): Likewise. - (get_priority_info): Likewise. - (do_static_initialization): Likewise. - (do_static_destruction): Likewise. - (do_static_initialization_and_destruction): Likewise. - (generate_ctor_or_dtor_function): Likewise. - (generate_ctor_and_dtor_functions_for_priority): Likewise. - (pending_statics): Make it a varray. - (pending_statics_used): New variable. - (saved_inlines): Make it a varray. - (saved_inlines_used): New variable. - (finish_static_data_member): Change method of updating - pending_statics. - (mark_inline_for_output): Remove #if 0'd code. Change method of - updating saved_inlines. - (walk_vtables): Remove. - (walk_sigtables): Likewise. - (import_export_decl): Use DECL_TINFO_FN_P. - (pending_templates): Remove declaration. - (maybe_templates): Likewise. - (static_aggregates_initp): Likewise. - (setup_initp): Likewise. - (finish_objects): Simplify. - (INITIALIZE_P_IDENTIFIER): New macro. - (PRIORITY_IDENTIFIER): New macro. - (SSDF_IDENTIFIER): New macro. - (initialize_p_decl): New variable. - (priority_decl): Likewise. - (ssdf_decl): Likewise. - (priority_info_map): Likewise. - (finish_file): Recode output of static intializers and other - file-scope finalization tasks. - * error.c (OB_END_TEMPLATE_ID): New macro. - (dump_type_real): Use it. - (dump_decl): Likewise. - (dump_function_name): Likewise. - * lex.c (set_typedecl_interface_info): Adjust for new walk_globals - interface. - (check_newline): Use walk_globals, not walk_vtables. - * pt.c (pending_tempalte_expansions): Remove. - (set_vardecl_interface_info): Likewise. - (pending_templates): Make static. - (maybe_templates): Likewise. - (instantiate_class_template): Adjust call to finish_struct_1. - (instantiate_pending_templates): New function. - * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P. - * tree.c (static_aggregates_initp): Remove. - (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY - instead. - * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h. - - * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes - with the RTL code RETURN. - * hash.h: Regenerated. - * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD. - * parse.y: Replace RETURN with RETURN_KEYWORD throughout. - * parse.c: Regenerated. - * pt.c: Include varray.h. Include rtl.h since varray.h requires - it. - (inline_parm_levels): New variable. - (inline_parm_levels_used): Likewise. - (maybe_begin_member_template_processing): Update them. - (maybe_end_member_template_processing): Use them, rather than - guessing how many levels to pop. - - * decl.c (make_typename_type): Tighten error-checking. - -1999-04-20 Mark Mitchell - - * cp-tree.h (build_binary_op): Remove unneeded parameter. - * class.c (build_vrable_entry_ref): Adjust call to - build_binary_op. - * decl.c (expand_static_init): Likewise. - (grokdeclarator): Likewise. - (finish_function): Likewise. - * decl2.c (delete_sanity): Likewise. - (do_dtors): Likewise. - (do_ctors): Likewise. - * error.c (dump_type_suffix): Likewise. - * expr.c (cplus_expand_expr): Likewise. - * init.c (resolve_offset_ref): Likewise. - (build_new): Likewise. - (build_new_1): Likewise. - (build_vec_delete_1): Likewise. - (expand_vec_init_catch_clause): Likewise. - (build_delete): Likewise. - * pt.c (tsubst): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - * search.c (expand_upcast_fixups): Likewise. - (expand_direct_vtbls_init): Likewise. - * typeck.c (get_member_function_from_ptrfunc): Likewise. - (build_binary_op_nodefault): Likewise. - (point_int_sum): Likewise. - (pointer_diff): Likewise. - (build_unary_op): Likewise. - (build_modify_expr): Likewise. - (get_delta_difference): Likewise. - (build_ptrmemfunc): Likewise. - (expand_ptrmemfunc_cst): Likewise. - -1999-04-20 Jason Merrill - - * decl.c (grokfndecl): Always call cplus_decl_attributes. - * decl2.c (grokfield): Pass attrlist to grokdeclarator. - -1999-04-19 Mark Mitchell - - * cp-tree.h (finish_static_data_member_decl): New function. - * decl2.c (finish_static_data_member_decl): Split out from ... - (grokfield): Here. - * pt.c (instantiate_class_template): Use it here instead of - trying to fake it. - (tsubst_decl): Don't set DECL_ASSEMBLER_NAME; - finish_static_data_member_decl will do that. Explicit set - DECL_EXTERNAL to match non-template processing. - -1999-04-18 Mark Mitchell - - * cp-tree.h (finish_class_definition): Add parameter. - * parse.y (structsp): Use it. Don't call pop_scope here. - * parse.c: Regenerated. - * semantics.c (finish_class_definition): Pop it here. - -1999-04-17 Mark Mitchell - - * decl.c (xref_tag): Revise handling of nested template - declarations. - * pt.c (check_explicit_specialization): Tweak handling of friend - templates in template classes. - (tsubst_friend_class): Handle friend declarations for nested - member template classes. - -1999-04-16 Mark Mitchell - - * class.c (finish_struct): Remove unused variable. - (pushclass): Likewise. - (invalidate_class_lookup_cache): Likewise. - * cp-tree.def (TYPENAME_TYPE): Improve documentation. - * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME - doesn't get obliterated. - (make_typename_type): Handle template classes correctly. - - * cp-tree.h (TREE_NONLOCAL_FLAG): Remove. - (storetags): Declare. - * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG. - (pushclass): Likewise. Use storetags to install tag declarations, - not pushtag. - (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG. - * decl.c (storetags): Make it global. - (push_class_binding): Set INHERITED_VALUE_BINDING_P for an - implicit typename declaration. - (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG. - * method.c (hack_identifier): Likewise. - * search.c (lookup_member): Likewise. - - * decl.c (warn_about_implicit_typename_lookup): New function. - (lookup_name_real): Use it. Rework handling of implicit typename - extension. - -1999-04-15 Mark Mitchell - - * cp-tree.h (lookup_nested_field): Remove. - * class.c (push_nested_class): Handle UNION_TYPEs. - (pop_nested_class): Likewise. - * decl.c (lookup_name_real): Don't call lookup_nested_field. - (start_decl): Use push_nested_class, not just pushclass. - (cp_finish_decl): Use pop_nested_class, not just popclass. - * search.c (lookup_nested_field): Remove. - - * cp-tree.h (lang_type): Add documentation. - * decl2.c (handle_class_head): Create template declarations here, - as appropriate. - * parse.y (class_head): Return whether or not we entered a new - scope, as well as the type named. - (named_class_head): Likewise. - (named_complex_class_head_sans_basetype): Likewise. - (structsp): Adjust accordingly. Pop scope when required. - * parse.c: Regenerated. - * pt.c (check_default_tmpl_args): Robustify. - (redeclare_class_template): Likewise. - (instantiate_class_template): An instantiation of an - anonymous union is itself an anonymous union. - * semantics.c (begin_class_definition): Don't create template - declarations here. - -1999-04-15 Jason Merrill - - * parse.y (after_type_declarator_intern): New nonterminal. - (after_type_declarator): Use it. - (direct_after_type_declarator): Likewise. Move above - nonnested_type to fix reduce/reduce conflict resolution. - (declmods): Reducing from just 'attributes' has EMPTY precedence. - * Makefile.in (CONFLICTS): Update. - - * decl.c (define_label): Downgrade error for jumping over a - non-POD decl to pedwarn. - -1999-04-14 Mark Mitchell - - * cp-tree.h (popclass): Change declaration. - (pop_nested_class): Likewise. - (poplevel_class): Remove declaration. - * call.c (convert_default_argument): Pass no arguments to - popclass. - * class.c (finish_struct_1): Likewise. - (finish_struct): Likewise. - (popclass): Remove argument. Simplify code accordingly. - (pop_nested_class): Likewise. - * decl.c (poplevel_class): Declare it here, and make it static. - (poplevel): Handle class scopes. - (poplevel_class): Don't take an rgument. Simplify. - (pop_everything): Pass no arguments to pop_nested_class. - (cp_finish_decl): Pass no arguments to popclass. - (grokdeclarator): Pass no arguments to pop_nested_class. - (finish_function): Likewise. - * decl2.c (grokfield): Likewise. - (pop_scope): Pass no arguments to popclass. - * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class. - * pt.c (instantiate_class_template): Move call to pushclass, and - document. Pass no arguments to popclass. - (regenerate_decl_from_template): Likewise. - -1999-04-14 Jason Merrill - - * typeck.c (build_unary_op): Handle taking the address of a unique - bound non-static member function. - -1999-04-13 Martin von Loewis - - * lang-options.h (-Wdeprecated): New flag. - * decl2.c (warn_deprecated): New flag. - (lang_decode_option): Deprecated this-is-variable, - external-templates, alt-external-templates. - Support -Wdeprecated. - * errfn.c (cp_deprecated): New function. - -1999-04-13 Jason Merrill - - * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead - of the decls themselves. - - * pt.c (tsubst_function_type): Copy attributes over. - - * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority - and com_interface. - * cp-tree.h: Add prototype. - * decl.c (init_decl_processing): Set valid_lang_attribute. - -1999-04-13 Mark Mitchell - - * class.c (finish_struct_1): Look at the const-ness of the field's - type, not the TREE_READONLY-ness of the declaration. - * method.c (synthesize_method): Likewise. - * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when - creating new declarations. - -1999-04-13 Mike Stump - - * decl2.c (import_export_decl): Because vtables always reference - virtual functions, even if they are inlined, don't allow - -fno-implement-inlines to not emit them, instead, emit them with - the vtable. - * decl.c (start_function): Likewise. - -1999-04-12 Jason Merrill - - * cp-tree.h (struct lang_type): Add com_interface. - (CLASSTYPE_COM_INTERFACE): New macro. - * class.c (set_rtti_entry): COM interface classes have no RTTI - entries in their vtables; adjust. - (add_virtual_function, finish_base_struct, skip_rtti_stuff, - modify_one_vtable, fixup_vtable_deltas1, override_one_vtable, - finish_struct_1): Likewise. - * decl2.c (mark_vtable_entries): Likewise. - * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise. - * search.c (get_abstract_virtuals_1, get_abstract_virtuals, - expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - - * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro. - * typeck.c (comptypes): If we get it, ignore attributes. - * class.c (instantiate_type): Use BASELINK_P. Change complain - parameter to flags; 2 means ignore attributes. - * call.c (build_op_delete_call): Pass it. - - * decl.c (xref_tag): Only complain once about using a typedef-name - with 'struct'. Downgrade to pedwarn. - - * decl.c (grokdeclarator): Allow [] syntax for zero-length array. - - * parse.y (absdcl_intern): New nonterminal. - (absdcl, direct_abstract_declarator): Use it. - - * pt.c (lookup_template_class): Look through implict typename. - -1999-04-11 Mark Mitchell - - * friend.c (add_friend): Deal gracefully with error_mark_node. - * method.c (build_overload_value): Handle pointers-to-members as - template parameters. - - * decl.c (push_binding): Fix typo in comment. - -1999-04-10 Mark Mitchell - - * error.c (dump_type_real): If a typename is a template-id, put - out the template arguments. - (dump_expr): Handle TEMPLATE_ID_EXPR. - * pt.c (lookup_template_class): Now that full arguments are - available everywhere, remove code that tried to guess them. - -1999-04-09 Mark Mitchell - - * decl.c (make_typename_type): Complain if we don't find a type - when trying to make a typename type for a non-template type. - -1999-04-09 Jason Merrill - - * decl.c (start_decl): Pass attributes to grokdeclarator. - (grokdeclarator): Handle attributes on constructor-syntax - initializers. - -1999-04-08 Mark Mitchell - - * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands - don't have types. - - * search.c (template_self_reference_p): Tweak. - -1999-04-07 Mark Mitchell - - * init.c (build_offset_ref): Don't build yet another weird data - structure to describe overloaded functions. - -1999-04-06 Mark Mitchell - - * cp-tree.h (BASELINK_P): New macro. - (SET_BASELINK_P): Likewise. - * init.c (build_member_call): Remove needless assignment in if - statement. - * search.c (lookup_field_r): Fix handling when we are looking - specifically for a type; these are not hidden by functions and - variables. - (lookup_member): Use SET_BASELINK_P. - * tree.c (is_overloaded_fn): Use BASELINK_P. - (really_overloaed_fn): Likewise. - (get_first_fn): Likewise. - -1999-04-05 Mark Mitchell - - * decl.c (lookup_name_current_level): Tweak, and improve - documentation. - - * class.c (maybe_fixup_vptrs): Remove declaration. - (build_class_init_list): Likewise. - * decl.c (pushdecl_class_level): Call check_template_shadow here - ... - (push_class_level_binding): ... not here. - * search.c (dfs_push_type_decls): Only avoid - template-self-reference TYPE_DECLs if they are from base classes. - -1999-04-04 Mark Mitchell - - * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL - nodes. Tidy. - -1999-04-03 Jason Merrill - - * class.c (maybe_fixup_vptrs, build_class_init_list): Lose. - (finish_struct_1): Don't call build_class_init_list. - -1999-04-02 Mark Mitchell - - * tinfo.h (__class_type_info): Fix illegal declaration. - - * cp-tree.def (TEMPLATE_ID_EXPR): Update comment. - * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro. - (IDENTIFIER_CLASS_VALUE): Improve documentation. - (is_properly_derived_from): Declare. - (invalidate_class_lookup_cache): Likewise. - (maybe_maybe_note_name_used_in_class): Likewise. - (note_name_declared_in_class): Likewise. - (push_using_decl): Remove duplicate declaration. - (id_in_current_class): Remove declaration. - (push_class_binding): Change prototype. - (clear_identitifer_class_values): Declare. - * call.c (is_properly_derived_from): Make it global. - (build_new_function_call): Be careful about updating candidates. - (build_new_method_call): Handle COMPONENT_REFs. Don't crash when - asked to make illegal calls. - * class.c: Include splay-tree.h. - (class_stack_node): Add names_used slot. - (check_member_decl_is_same_in_complete_scope): Remove. - (add_method): Fix comment. Push the declaration into class - scope. - (finish_struct_1): When popping the class, pop the bindings too. - Remove check for data member/function member conflict. - (finish_struct): Remove calls to - check_member_decl_is_same_in_complete_scope. Change calls to - popclass. - (pushclass): Clear names_used in the class stack entry. - Use invalidate_class_lookup_cache to remove cached entries, rather - than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE - before entering a new class. Remove dead code. Don't mess with - current_function_decl when pushing declarations. - (invalidate_class_lookup_cache): New function, split out from ... - (popclass): Here. Clean up names_used on our way out. - (instantiate_type): Adjust. - (build_self_reference): Don't push the declaration here. - (maybe_note_name_used_in_class): New function. - (note_name_declared_in_class): Likewise. - * decl.c (add_binding): Change prototype. - (find_class_binding_level): New function. - (innermost_nonclass_level): Likewise. - (current_binding_level): Update documentation. - (inner_binding_level): Remove. Replace with current_binding_level - throughout. - (push_binding_level): Remove special handling of - class_binding_level. - (pop_binding_level): Likewise. Use find_class_binding_level. - (suspend_binding_level): Likewise. - (global_bindings_p): Use innermost_nonclass_level. - (toplevel_bindings_p): Likewise. - (namespace_bindings_p): Likewise. - (pseudo_global_level_p): Likewise. - (push_binding): Clear INHERITED_VALUE_BINDING_P. - (add_binding): Check for illegal multiple declarations. Return a - value indicating whether or not the new binding was legal. - (push_local_binding): Skip over class binding levels. Check - return value from add_binding. - (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call - note_name_declared_in_class. - (pushlevel_class): Remove "fake out the rest of the compiler" - code. - (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs. - (clear_identifier_class_values): New function. - (pop_from_top_level): Use it. - (pop_everything): Tweak. - (maybe_process_template_type_declaration): Don't push the - declaration for the template here. - (pushtag): Don't push tag declarations into class scope here. - (pushdecl): Apply DeMorgan's law for readability. - (pushdecl_class_level): Remove special-case code for - TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions. - (push_class_level_bindng): Deal with inherited bindings. - (lookup_name_real): Remove special-case code for - TYPE_BEING_DEFINED, and some implicit typename magic. - (grokdeclarator): Handle COMPONENT_REF for a template function. - (build_enumerator): Don't call pushdecl_class_level here. - (id_in_current_class): Remove. - * decl2.c (grokfield): Don't call pushdecl_class_level or - check_template_shadow. - * errfn.c (cp_file_of): Don't declare. - (cp_line_of): Likewise. - * error.c (dump_decl): Handle an OVERLOAD. - (cp_file_of): Likewise. - (cp_line_of): Likewise. - * init.c (build_member_call): Handle a COMPONENT_REF. - * lex.c (do_identifier): Call maybe_note_name_used_in_class, not - pushdecl_class_level. - * method.c (hack_identifier): Build COMPONENT_REFs for references - to member templates as well as member functions. Remove dead - code. - * parse.y (left_curly): Remove. - (nonnested_type): Call maybe_note_name_used_in_class, not - pushdecl_class_level. - * parse.c: Regenerated. - (nested_name_specifier_1): Likewise. - * pt.c (check_explicit_specialization): Adjust, for robustness. - (check_template_shadow): Handle OVERLOADs. - (build_template_decl): Set DECL_CONSTRUCTOR_P on the - TEMPLATE_DECL, if appropriate. - * search.c (envelope_add_decl): Remove. - (dfs_pushdecls): Likewise. - (dfs_compress_decls): Likewise. - (dfs_push_decls): New function. - (dfs_push_type_decls): Likewise. - (setup_class_bindings): Likewise. - (template_self_reference_p): Likewise. - (lookup_field_r): Use it. - (looup_member): Remove old comment. Deal with ambiguity. - (push_class_decls): Use dfs_push_decls and dfs_push_type_decls, - and remove envelope processing. - * semantics.c (begin_class_definition): Let pushclass push - declarations for base classes. - (finish_member_declaration): Push declarations into class scope. - * typeck.c (build_component_ref): Just put an OVERLOAD into the - COMPONENT_REF, not a TREE_LIST of an OVERLOAD. - (build_x_function_call): Deal with OVERLOAD. Handle template-ids. - * Makefile.in (class.o): Depend on splay-tree.h. - -Wed Mar 31 11:30:43 1999 Nathan Sidwell - - * cvt.c (convert_pointer_to_real): Use same_type_p. - * typeck.c (comp_target_types): Use same_type_p. - -1999-03-31 Jason Merrill - - * semantics.c (begin_inline_definitions, - finish_inline_definitions): Rename from finish_default_args and - begin_inline_definitions, respectively, to something that isn't a - total lie. :) - * parse.y (structsp): Adjust. - - * tree.c (hash_tree_cons): Remove obsolete via_* parms. - (list_hash_lookup): Likewise. - (hash_tree_chain): Adjust. - * pt.c (tsubst): Adjust. - (tsubst_arg_types): Use plain hash_tree_cons. - * cp-tree.h (hash_tree_cons_simple): Lose. - * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons. - -Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi - - * Makefile.in (hash.h): Generate using gperf language 'C', not - 'KR-C', so gperf uses the `const' keyword on strings. - - * gxx.gperf (resword): Const-ify a char*. - -1999-03-30 Jason Merrill - - * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST, - CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES, - CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH, - CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST, - CLASSTYPE_BINFO_AS_LIST): Remove cruft. - * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c, - tree.c: Adjust. - -1999-03-29 Jason Merrill - - * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall. - -1999-03-28 Jason Merrill - - * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops. - -1999-03-27 Mark Mitchell - - * cp-tree.h (add_friend): Declare. - (add_friends): Likewise. - * friend.c (add_friend): Make it global. Don't add to - DECL_BEFRIENDING_CLASSES if the befriending class is a template. - (add_friends): Make it global. - (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the - befriending class is a template. - * parse.y (component_decl_1): Fix typo in comment. - * parse.c: Regenerated. - * pt.c (instantiate_class_template): Use add_friend and - add_friends rather that duplicating some of their functionality - here. - -1999-03-27 Jason Merrill - - * call.c (build_field_call): Unify 'this' and non-'this' cases. - - * typeck.c (build_indirect_ref): Check for 'this' sooner. - -Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi - - * call.c (op_error): Const-ify a char*. - (add_candidate, source_type, add_warning): Add static prototype. - (print_z_candidates): Const-ify a char*. - - * class.c (resolve_address_of_overloaded_function, - fixed_type_or_null, build_vtable_entry_ref): Add static prototype. - (get_vtable_name, finish_struct_1): Const-ify a char*. - - * cvt.c (convert_to_reference): Likewise. - - * decl.c (redeclaration_error_message, record_builtin_type, - record_unknown_type, member_function_or_else, bad_specifiers): - Likewise. - (find_binding, select_decl, unqualified_namespace_lookup, - lookup_flags, qualify_lookup, record_builtin_java_type, tag_name): - Add static prototype. - (warn_extern_redeclared_static, duplicate_decls, pushdecl, - implicitly_declare, record_builtin_java_type, define_function, - grok_op_properties, tag_name): Const-ify a char*. - - * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const. - (define_function, finish_builtin_type): Const-ify a char*. - (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn, - cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args. - (file_name_nondirectory): Const-ify a char*. - (init_filename_times): Don't prototype. - (compiler_error): Prototype. - (yyerror, init_repo): Const-ify a char*. - (build_srcloc): Don't prototype. - (build_x_indirect_ref, build_indirect_ref, build_component_addr): - Const-ify a char*. - (warn_for_assignment): Don't prototype. - (convert_for_initialization, readonly_error, check_for_new_type, - GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call): - Const-ify a char*. - - * decl2.c (acceptable_java_type, output_vtable_inherit, - setup_initp, start_objects, finish_objects, do_dtors, do_ctors, - merge_functions, decl_namespace, validate_nonmember_using_decl, - do_nonmember_using_decl): Add static prototype. - (lang_f_options): Const-ify a char*. - (finish_builtin_type): Likewise. - (add_function, arg_assoc_namespace, arg_assoc_class): Add static - prototype. - - * errfn.c: Include cp-tree.h. - (cp_thing): Add static prototype. - (compiler_error): Don't protoptype. - (cp_compiler_error): Cast `compiler_error' to `errorfn' before - passing it to `cp_thing'. - - * error.c (interesting_scope_p): Add static prototype. - - * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify - a char*. - - * init.c (compiler_error): Don't prototype. - (member_init_ok_or_else): Const-ify a char*. - (build_java_class_ref): Add static prototype. - - * lex.c (compiler_error): Don't prototype. - (get_time_identifier, interface_strcmp, extend_token_buffer, - handle_cp_pragma): Const-ify a char*. - (is_global, init_filename_times): Add static prototype. - (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*. - (compiler_error): Change from fixed args to variable args. - (yyerror): Const-ify a char*. - - * parse.y (cond_stmt_keyword): Const-ify a char*. - (parse_decl): Add static prototype. - - * pt.c (template_args_equal, print_template_context): Likewise. - (print_candidates, check_default_tmpl_args): Const-ify a char*. - (instantiate_class_template): Likewise. - - * repo.c (get_base_filename, open_repo_file, init_repo): Likewise. - - * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc, - expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise. - - * search.c (lookup_field_info, lookup_member): Likewise. - (lookup_member): Cast the first argument of `bzero' to a PTR. - - * sig.c (compiler_error): Don't prototype. - (build_signature_pointer_or_reference_nam): Const-ify a char*. - (get_sigtable_name, build_member_function_pointer): Likewise. - - * tree.c (compiler_error): Don't prototype. - (no_linkage_helper, build_srcloc): Add static prototype. - (build_vbase_pointer_fields): Const-ify a char*. - (__eprintf): Don't unnecessarily handle `const' when !__STDC__. - - * typeck.c (compiler_error): Don't prototype. - (convert_for_assignment): Const-ify a char*. - (comp_cv_target_types): Add static prototype. - (build_x_indirect_ref, build_indirect_ref, convert_arguments, - build_component_addr, build_unary_op, convert_for_initialization): - Const-ify a char*. - - * typeck2.c (ack): Add static prototype and change from fixed args - to variable args. - (readonly_error, check_for_new_type): Const-ify a char*. - - * xref.c (_XREF_FILE, find_file, filename, fctname, declname, - fixname, open_xref_file, classname, GNU_xref_begin): Likewise. - (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'. - (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call, - gen_assign, GNU_xref_member): Const-ify a char*. - -1999-03-25 Martin von Löwis - - * gxxint.texi: Remove old discussion on copying virtual bases. - -1999-03-25 Zack Weinberg - - * Make-lang.in: Remove all references to g++.o/g++.c. - Link g++ from gcc.o. - -1999-03-25 Jason Merrill - - * decl2.c (comdat_linkage): Treat vtables like functions. - -1999-03-25 Mark Mitchell - - * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES. - -1999-03-25 Nathan Sidwell - - * decl.c (init_decl_processing): Add `signed' type as a synonym - for `int'. - -1999-03-25 Jason Merrill - - * typeck.c (common_type): Handle cv-qual unification for pointers - to members. - - * decl.c (unqualified_namespace_lookup): Return error_mark_node - on error. - (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing. - * lex.c (do_identifier): If we got error_mark_node, call - lookup_name again. - -1999-03-24 Martin von Löwis - - * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty - classes. - -1999-03-24 Jason Merrill - - * decl.c (lookup_name_real): Do nested field lookup regardless of - TYPE_BEING_DEFINED. - -1999-03-24 Mark Mitchell - - * cp-tree.h (lang_type): Remove has_assignment and - has_real_assignment. Add befriending_classes. - (TYPE_HAS_ASSIGNMENT): Remove. - (TYPE_HAS_REAL_ASSIGNMENT): Likewise. - (CLASSTYPE_BEFRIENDING_CLASSES): New macro. - (lang_decl): Document. - (DECL_BEFRIENDING_CLASSES): New macro. - (FRIEND_NAME): Move declaration to more obvious location. - (FRIEND_DECLS): Likewise. - * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT. - * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES. - (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT. - (grok_op_properties): Likewise. - * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS. - (add_friend): Likewise. Don't do weird things with assignment - operators. Update DECL_BEFRIENDING_CLASSES. - (add_friends): Don't do weird things with assignment operators. - (make_friend_class): Likewise. Update - CLASSTYPE_BEFRIENDING_CLASSES. - * pt.c (instantiate_class_template): Don't set - TYPE_HAS_ASSIGNMENT. - (tsubst_copy): Substitute the TREE_TYPE for more unary - expressions. - * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT. - * search.c (protected_accessible_p): New function. - (friend_accessible_p): Likewise. - (accessible_p): Use them. - -1999-03-23 Mark Mitchell - - * pt.c (convert_nontype_argument): Don't create things that aren't - PTRMEM_CSTs when applying a qualification conversion to a - PTRMEM_CST. - -1999-03-23 Mark Mitchell - - * Makefile.in (OBJS): Don't mention hash.o. - (OBJDEPS): Likewise. - -1999-03-23 Jason Merrill - - * decl2.c (finish_file): Set at_eof to 2 after expanding ctors. - * decl.c (expand_static_init): Make sure we don't add any after - then. - - * decl.c (cp_finish_decl): Move intelligence about handling - DECL_COMDAT for variables from here... - * decl2.c (comdat_linkage): ...to here. - (maybe_make_one_only): Tweak. - (import_export_decl): Call comdat_linkage for variables, too. - (finish_file): Handle template statics properly. - -1999-03-22 Mark Mitchell - - * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG. - Document internals of pointer-to-member-functions. - (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc. - (PFN_FROM_PTRMEMFUNC): Likewise. - (build_type_conversion): Remove unused parameter. - (build_ptrmemfunc1): Declare. - (expand_ptrmemfunc_cst): New function. - (delta2_from_ptrmemfunc): Likewise. - (pfn_from_ptrmemfunc): Likewise. - * cvt.c (cp_convert_to_pointer): Remove unused parameter to - build_type_conversion. Use TYPE_PTRMEM_P for readability. - (convert_to_reference): Remove unused parameter to - build_type_conversion. - (ocp_convert): Likewise. - (build_user_type_conversion): Likewise. - * error.c (dump_expr): Handle NULL pointer-to-member functions. - * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions. - * method.c (build_overload_value): Don't go splitting CONSTRUCTORs - open when handling pointer-to-member functions. - * pt.c (convert_nontype_argument): Clean up error messages. Be - more stringent with pointers-to-members. - * typeck.c (build_ptrmemfunc1): Don't declare. Make it global. - (build_unary_op): Tidy ever-so-slightly. - (build_conditional_expr): Remove extra parameter to - build_type_conversion. - (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function - we're using. - (expand_ptrmemfunc_cst): Define. - (delta2_from_ptrmemfunc): Likewise. - (pfn_from_ptrmemfunc): Likewise. - -1999-03-19 Mark Mitchell - - * init.c (build_member_call): Handle template-id expressions - correctly. - * typeck.c (build_x_function_call): Likewise. - -1999-03-19 Chip Salzenberg - - * friend.c (make_friend_class): Avoid core dump when - not-yet-defined friend type lacks TYPE_LANG_SPECIFIC(). - -1999-03-18 Jason Merrill - - * decl.c (start_function): Suppress normal linkage heuristics - for #pragma interface under MULTIPLE_SYMBOL_SPACES. - -1999-03-19 Alexandre Oliva - - * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c. - ($(srcdir)/cp/parse.c): Moved from ../Makefile.in. - -1999-03-17 Martin von Löwis - - * parse.y (named_complex_class_head_sans_basetype): - Do not push a scope for error_mark_node. - (maybe_base_class_list): Likewise. - - * decl.c (start_decl): Check for error_mark_node as a type. - Detected by g++.brendan/array-refs.C. - (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C. - (maybe_build_cleanup_1): Likewise. Detected by - g++.jason/incomplete1.C. - - * tree.c (build_dummy_object): Use void_zero_node instead of the - error_mark_node. - (is_dummy_object): Check for such a node. - Detected by g++.bob/inherit1.C - -1999-03-16 Jason Merrill - - * method.c (old_backref_index): Split out... - (flush_repeats): From here. Rename back from try_old_backref. - (build_mangled_name): Put back some old-style repeat handling. - -Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi - - * lex.c: Don't include setjmp.h. - (parse_float): New static function. - (pf_args): New struct. - (real_yylex): Use them in call to `do_float_handler'. - -1999-03-15 Mark Mitchell - - * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here. - * tree.c (layout_basetypes): Not here. - * search.c (dfs_search): Remove; no longer used. - -1999-03-12 Mark Mitchell - - * decl2.c (validate_nonmember_using_decl): Issue sensible - error-messages on bogus qualifiers. - -1999-03-14 Jason Merrill - - * call.c (add_function_candidate): Fix uninitialized variable. - - * Makefile.in (search.o): Add dependency on varray.h. - -1999-03-13 Jason Merrill - - * decl.c (duplicate_decls): Use same_type_p. - * method.c (try_old_backref): Renamed from flush_repeats. Use - same_type_p. Don't try to handle repeats. Return success. - (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support - calls from old-style code, too. - (check_ktype): Use same_type_p. - (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT. - (build_qualified_name): Simplify logic. - (process_overload_item): Strip typedefs and quals at the top. - (build_mangled_name_for_type_with_Gcode): Remove call to - type_canonical_variant. - (build_mangled_name): Likewise. Remove support for old-style - repeats, which have been disabled since 2.7.2. Don't mess with - TREE_USED. - (build_decl_overload_real): Don't mess with TREE_USED. - -1999-03-13 Nathan Sidwell - - * error.c (cp_printers): Add 'F' escape character. - (dump_type_real): Remove TREE_LIST (fnargs) printing. - Functionality moved to dump_parameters. - (dump_type_suffix): Use dump_parameters and dump_exception_spec. - (dump_function_decl): Extend meaning of V parameter. Use - dump_parameters and dump_exception_spec. - (dump_parameters): New static function. - (dump_exception_spec): New static function. - (fndecl_as_string): Change argument semantics. Use - dump_function_decl directly. - - * sig.c (build_signature_table_constructor): Use cp_error. - -1999-03-13 Martin von Löwis - - * semantics.c (finish_switch_cond): Handle error cases gracefully. - Detected by g++.law/enum5.C. - - * typeck.c (build_modify_expr): Check for errors after resolving - offsets. Detected by g++.brendan/static1.C. - - * decl.c (complete_array_type): Ignore initial_value if it is an - error. Detected by g++.benjamin/17930.C. - - * typeck2.c (process_init_constructor): Return error if one argument - is in error. Detected by g++.benjamin/13478.C. - -1999-03-12 Martin von Löwis - - * decl.c (select_decl): Allow class templates when we need types. - * decl2.c (ambiguous_decl): Likewise. - -1999-03-12 Mark Mitchell - - * lex.c (do_identifier): Correct call to enforce_access. - * search.c (accessible_p): Tweak comment. - -1999-03-10 Mark Mitchell - - * semantics.c (begin_class_definition): Call build_self_reference. - (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs. - - * search.c (assert_canonical_unmarked): Fix typo in prototype. - - * search.c (dfs_canonical_queue): New function. - (dfs_assert_unmarked_p): Likewise. - (assert_canonical_unmarked): Likewise. - (access_in_type): Use it. - (accessible_p): Likewise. Walk the whole tree when umarking. - - * sig.c (build_signature_table_constructor): Use accessible_p - instead of compute_access. - -1999-03-09 Jason Merrill - - * call.c (add_builtin_candidates): Handle overloaded conversion ops. - -1999-03-09 Mark Mitchell - - * cp-tree.h (flag_access_control): Declare. - (TREE_VIA_PPUBLIC): Document. - (DECL_NONSTATIC_MEMBER_P): New macro. - (enforce_access): Return an indication of whether or not access - was permitted. - (build_self_reference): Change prototype. - (compute_access): Replace with ... - (accessible_p): New function. - (dfs_walk): Change prototype. - (dfs_unmark): Likewise. - (markedp): Likewise. - * call.c (enforce_access): Use accessible_p. - * class.c (build_self_reference): Insert the declaration into the - list of members for this type, and make it public. - * decl.c (xref_basetypes): Avoid ill-timed recursion. - * init.c (build_offset_ref): Use lookup_member, not three separate - name-lookups. Call enforce_access rather than checking for - illegal accesses here. - (resolve_offset_ref): Likewise. - * lex.c (do_identifier): Likewise. - * method.c (hack_identifier): Likewise. - * parse.y (self_reference): Remove. - (opt_component_decl_list): Don't use it. - * parse.c: Regenerated. - * pt.c (print_candidates): Generalize to handle lists of - overloaded functions. - (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's - not set. - (get_template_base): Use new calling convention for dfs_walk. - * search.c: Include varray.h. Add prototypes. - (dfs_walk): Accept a data pointer to pass to the work functions. - All callers changed. All work functions changed. - (breadth_first_search): Rename to bfs_walk, and make consistent - with dfs_walk. - (dfs_walk_real): New function. - (canonical_binfo): New function. - (context_for_name_lookup): Likewise. - (shared_marked_p): Likewise. - (shared_unmarked_p): Likewise. - (lokup_field_queue_p): Likewise. - (lookup_field_r): Generalize to handle both functions and fields. - (lookup_field): Just call lookup_member. - (lookup_fnfields): Likewise. - (lookup_member): Move body of lookup_field here and generalize. - (dfs_accessible_queue_p): Likewise. - (dfs_accessible_p): Likewise. - (dfs_access_in_type): Likewise. - (access_in_type): Likewise. - (compute_access): Remove, and replace with ... - (accessible_p): New function. - (vbase_types): Remove. - (vbase_decl_ptr_intermediate): Likewise. - (vbase_decl_ptr): Likewise. - (vbase_init_result): Likewise. - (closed_envelopes): Likewise. - (bvtable): Likewise. - -1999-03-09 Jason Merrill - - * call.c (add_function_candidate): Check for proper number of args - before checking the validity of those args. - -1999-03-06 Jason Merrill - - * cp-tree.h (struct lang_type): Add anon_union field. - (ANON_UNION_TYPE_P): Use it instead of examining type. - (SET_ANON_UNION_TYPE_P): New macro. - * decl.c (check_tag_decl): Use it. - - * search.c (compute_access): Handle non-type contexts earlier, and - handle NULL_TREE. - - * tree.c (build_exception_variant): Use copy_to_permanent. - - * decl2.c (setup_initp): Give statics with no priority the default - priority here. - (do_dtors, do_ctors, finish_file): Remove special handling of - non-prioritized statics. - -1999-03-05 Mark Mitchell - - * cp-tree.h (ANON_UNION_TYPE_P): Robustify. - * decl.c (make_typename_type): Don't issue an error if an - immediate lookup fails; it migt be resolved later. - * friend.c (is_friend): Add comment. - * search.c (breadth_first_search): Add POSTFN and DATA - parameters. Tidy. All callers changed. - (lookup_field_queue_p): New function. - (lookup_field_r): Likewise. - (lookup_field_post): Likewise. - (lookup_field): Use them, via breadth_first_search, instead of - duplicating logic. - (compute_access): Robustify. - (lookup_fnfield_info): New structure. - -1999-03-05 Jason Merrill - - * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again. - -1999-03-03 Jason Merrill - - * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4 - cc happy. - - * decl2.c (import_export_class): Also return if - CLASSTYPE_INTERFACE_ONLY is set. - -1999-03-03 Martin von Löwis - - * decl.c (push_overloaded_decl): Only overwrite the old binding if - there was one. - * decl2.c (do_local_using_decl): Fix loop termination. - -1999-03-02 Mark Mitchell - - * cp-tree.h (determine_specialization): Don't declare. - * pt.c (determine_specialization): Make it static. Eliminate - complain parameter. Note that decl is always non-NULL now, and - simplify accordingly. - - * decl.c (maybe_push_to_top_level): Always call - push_cp_function_context. - (pop_from_top_level): Always call pop_cp_function_context. - -1999-02-26 Nathan Sidwell - - * typeck.c (complete_type_or_else): Add VALUE arg, for helpful - diagnostics. - * cp-tree.h (complete_type_or_else): Added VALUE parameter. - * init.c (build_new_1): Extra arg to complete_type_or_else. - (build_delete): Likewise. - * typeck.c (require_complete_type): Likewise. - (pointer_int_sum): Likewise. - (pointer_diff): Likewise. - (build_component_ref): Likewise. - - * typeck2.c (incomplete_type_error): Always use cp_error. - Show declaration of undefined type, if appropriate. - Deal with UNKNOWN_TYPE nodes. - - * typeck.c (require_complete_type): Use TYPE_SIZE as - size_zero_node to mean incomplete type. - (require_complete_type_in_void): New function. - (build_compound_expr): Call complete_type_in_void for LHS. - (build_c_cast): Call complete_type_in_void for void cast. - * cvt.c (ocp_convert): Call complete_type_in_void for void cast. - * decl.c (cplus_expand_expr_stmt): Void expression checks moved to - require_complete_type_in_void. Call it. - * cp-tree.h (require_complete_type_in_void): Prototype new function. - - * typeck.c (convert_arguments): Use alternative format for - function decls. Don't require_complete_type here. Simplify - diagnostic printing. - (convert_for_initialization): Don't require_complete_type on RHS yet. - * call.c (convert_arg_to_ellipsis): Call require_complete_type. - - * call.c (build_over_call): Cope with qualified void return type. - * semantics.c (finish_call_expr): Likewise. - * typeck.c (build_function_call_real): Likewise. - (c_expand_return): Likewise. - * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type. - - * call.c (print_z_candidates): Use alternate print format, to be - consistent with (pt.c) print_candidates. - * method.c (hack_identifier): List candidate members. - * search.c (lookup_field): Build ambiguous list, and show it, if - ambiguous. - -1999-02-26 Mark Mitchell - - * typeck.c (decay_conversion): Don't confuse constant array - variables with their initializers. - - * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when - merging decls. - * pt.c (regenerate_decl_from_template): Tweak for clarity. - (instantiate_decl): Mark a decl instantiated before regenerating - it to avoid recursion. - * tree.c (mapcar): Don't call decl_constant_value unless we know - something is TREE_READONLY_DECL_P. - - * class.c (check_for_override): Don't stop checking when we find - the first overridden function. Delete #if 0'd code. - * search.c (get_matching_virtual): Likewise. - -1999-02-25 Richard Henderson - - * lang-specs.h: Define __FAST_MATH__ when appropriate. - -1999-02-24 Mike Stump - - * typeck.c (convert_for_assignment): Allow boolean integral constant - expressions to convert to null pointer. - -1999-02-24 Martin von Loewis - - * decl.c (lookup_namespace_name): Resolve namespace aliases. - - * class.c (push_nested_class): Allow namespaces. - - * decl2.c (set_decl_namespace): Add friendp parameter. - * decl.c (grokfndecl): Pass it. - (grokvardecl): Likewise. - * cp-tree.h: Change declaration. - -1999-02-24 Jason Merrill - - * pt.c (tsubst): Allow an array of explicit size zero. - -1999-02-23 Jason Merrill - - * errfn.c: Change varargs code to look like toplev.c. - - * method.c (process_modifiers): Don't prepend 'U' for char or - wchar_t. - -1999-02-20 Craig Burley - - * Make-lang.in (cplib2.ready): Don't consider updating - cplib2 stuff if the current directory isn't writable, as - it won't work (such as during a `make install'). - -Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org) - - * decl2.c (start_objects): Make file scope constructors and - destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and - ASM_OUTPUT_DESTRUCTOR are defined. - -1999-02-19 Mark Mitchell - - * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment. - (fn_type_unification): Adjust prototype. - (lookup_fnfields_1): Declare. - * call.c (add_template_candidate_real): Adjust call to - fn_type_unification. - * class.c (add_method): Don't allow duplicate declarations of - constructors or destructors. - (resolve_address_of_overloaded_function): Remove unused variable. - Adjust call to fn_type_unification. - * decl.c (grokfndecl): Be more robust in the face of illegal - specializations. - * decl2.c (check_classfn): Remove hokey handling of member - templates. - * pt.c (determine_specialization): Improve comments. Adjust to - handle template argument deduction as per the standard. - (check_explicit_specialization): Fix comment spacing. Handle - type-conversion operators correctly. Improve error-recovery. - (fn_type_unification): Remove EXTRA_FN_ARG parameter. - (get_bindings_real): Simplify handling of static members. - * search.c (lookup_fnfields_1): Make it have external linkage. - * typeck.c (compparms): Fix comment. - (build_unary_op): Don't try to figure out which template - specialization is being referred to when when the address-of - operator is used with a template function. - -Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi - - * cp-tree.h (lvalue_or_else): Qualify a char* with the `const' - keyword to match an analogous change at the top level. - - * tree.c (lvalue_or_else): Likewise. - -1999-02-17 Mark Mitchell - - * decl.c (xref_basetypes): Comment. - * pt.c (instantiate_class_template): Use xref_basetypes. - -1999-02-16 Mark Mitchell - - * cp-tree.h (tsubst): Change prototype. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (type_unification): Remove prototype. - * call.c (convert_default_arg): Adjust call to tsubst_expr. - * class.c (resolve_address_of_overloaded_function): Just use - fn_type_unification. - * decl.c (grokdeclarator): Adjust call to tsubst. - * method.c (build_template_parm_names): Likewise. - * pt.c (GTB_VIA_VIRTUAL): New macro. - (GTB_IGNORE_TYPE): Likewise. - (resolve_overloaded_unification): Add `complain' parameter. - (try_one_overload): Likewise. - (tsubst_template_arg_vector): Likewise. - (tsubst_template_parms): Likewise. - (tsubst_aggr_type): Likewise. - (tsubst_arg_types): Likewise. - (tsubst_call_declarator_parms): Likewise. - (unify): Remove explicit_mask. - (type_unification_real): Likewise. - (get_template_base_recursive): Likewise. - (coerce_template_template_parms): Provide prototype. - (tsubst_function_type): Likewise. - (try_class_unification): New function. - All callers changed to use new complain parameter. - (get_template_base): Use try_class_unification. - (unify): Adjust handling of classes derived from template types. - (fn_type_unification): Substitute explicit arguments before - unification. - -1999-02-16 Kriang Lerdsuwanakij - - * decl.c (pushdecl): Remove dead code. - -1999-02-16 Jason Merrill - - * decl2.c (finish_objects): Fix code I missed in previous change. - -1999-02-13 Jason Merrill - - * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node. - (grokdeclarator): Don't expect error_mark_node from grokfndecl. - - * pt.c (maybe_process_partial_specialization): Complain about - 'template <>' on non-specialization. - -1999-02-10 Jason Merrill - - * decl.c (grokdeclarator): Catch weird declarators. - * decl2.c (finish_file): Don't abort because of namespace parsing - failure. - (check_decl_namespace): Remove. - -1999-02-09 Mark Mitchell - - * cp-tree.h (get_template_base): Don't declare. - (dfs_walk): Declare. - (dfs_unmark): Likewise. - (markedp): Likewise. - * pt.c (unify): Remove duplicate declaration. Pass tparms and - targs to get_template_base. - (get_template_base_recursive): Move here from search.c. Check to - see that the base found can be instantiated to form the desired - type. - (get_template_base): Likewise. - (get_class_bindings): Simplify. - * search.c (get_template_base_recursive): Move to pt.c. - (get_template_base): Likewise. - (markedp): Make it global. - (dfs_walk): Likewise. - (dfs_unmark): Likewise. - -1999-02-07 Jason Merrill - - * pt.c (maybe_process_partial_specialization): Complain about - specialization in wrong namespace. - * tree.c (decl_namespace_context): New fn. - -1999-02-06 Kriang Lerdsuwanakij - - * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM. - * pt.c (coerce_template_template_parms): Handle nested - template template parameters. - -Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com) - - * typeck2.c: Update email addresses. - -1999-02-04 Kriang Lerdsuwanakij - - * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag - turned off. - -1999-02-04 Jason Merrill - - * lex.c (retrofit_lang_decl): Split out... - (build_lang_decl): From here. - * decl.c (pushdecl): Call it for functions generated by the middle - end that don't have DECL_LANG_SPECIFIC. - * cp-tree.h: Declare it. - - * decl2.c: Remove flag_init_priority. Always enable initp stuff. - (start_objects, finish_objects): Only use special - init_priority code if the user specified a priority. - (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp - objects. - -Wed Feb 3 22:50:17 1999 Marc Espie - - * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and - mkstemp.o. Get them from libiberty now. - (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o. - -Tue Feb 2 22:38:48 1999 Theodore Papadopoulo - - * decl2.c (lang_decode_option): Use read_integral_parameter. - -1999-02-01 Mark Mitchell - - * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED - before calling complete_type_or_else. - -Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi - - * input.c (inline): Don't define, its handled by system.h. - -Sun Jan 31 20:34:29 1999 Zack Weinberg - - * decl2.c: Don't define flag_no_ident here. Don't process - -f(no-)ident here. - * cp-tree.h: Don't declare flag_no_ident here. - * lang-specs.h: Map -Qn to -fno-ident. - -1999-01-28 Jason Merrill - - * cp-tree.h (struct tree_binding): Replace scope field with a union. - (BINDING_SCOPE): Adjust. - * decl.c (BINDING_LEVEL): Adjust. - -1999-01-26 Jason Merrill - - * pt.c (instantiate_class_template): Set up the DECL_INITIAL of - member constants. - - * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in - a ctor initializer. - - * tree.c (equal_functions): Fix name in prototype. - - * decl.c (push_local_binding): Add FLAGS argument. - (pushdecl, push_overloaded_decl): Pass it. - * decl2.c (do_local_using_decl): Likewise. - * cp-tree.h: Adjust prototype. - * decl.c (poplevel): Fix logic. - - * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST. - (poplevel): Handle that. Fix logic for removing TREE_LISTs. - (cat_namespace_levels): Don't loop forever. - -1999-01-25 Richard Henderson - - * typeck.c (build_reinterpret_cast): Fix typo in duplicated test. - -1999-01-25 Jason Merrill - - * class.c (resolve_address_of_overloaded_function): Mark the - chosen function used. - - * call.c (build_call): Make sure that a function coming in has - been marked used already. - * decl.c (expand_static_init): Call mark_used instead of - assemble_external. - * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec, - alloc_eh_object, expand_throw): Likewise. - * init.c (build_builtin_delete_call): Likewise. - * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1, - expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, - expand_generic_desc): Likewise. - -1999-01-25 Martin von Löwis - - * tree.c (equal_functions): New function. - (ovl_member): Call it. - -1999-01-24 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf. - -1999-01-25 Martin von Loewis - - * decl.c (decls_match): Return 1 if old and new are identical. - (push_overloaded_decl): Set OVL_USED when PUSH_USING. - -1999-01-24 Jason Merrill - - * decl.c (start_function): Make member functions one_only on windows. - * decl2.c (import_export_decl): Likewise. - - * decl.c (grokdeclarator): Don't complain about implicit int in - a system header. Change same-name field check to not complain in - a system header instead of within extern "C". - -1999-01-21 Mark Mitchell - - * cp-tree.h (PUSH_GLOBAL): New macro. - (PUSH_LOCAL): Likewise. - (PUSH_USING): Likewise. - (namespace_bindings_p): Declare. - (push_overloaded_decl): Likewise. - * decl.c (push_overloaded_decl): Don't make it static. Check for - illegal declarations after using declarations here. - (namespace_bindings_p): Likewise. - (duplicate_decls): Don't consider declarations from different - namespaces to be the same. - (pushdecl): Use symbolic PUSH_ constants in calls to - push_overloaded_decl. - (push_overloaded_decl_1): Likewise. - * decl2.c (validate_nonmember_using_decl): Tweak `std' handling. - (do_nonmember_using_decl): Check for illegal using declarations - after ordinary declarations here. - (do_local_using_decl): Call pushdecl to insert declarations. - -1999-01-21 Jason Merrill - - * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo. - -1999-01-21 Mark Mitchell - - * tree.c (build_cplus_array_type_1): Don't call build_array_type - for types involving template parameters. - - * cp-tree.h (PARM_DECL_EXPR): Delete. - (convert_default_arg): Change prototype. - (check_default_argument): Declare. - (search_tree): Likewise. - * call.c (convert_default_arg): Take the function to which the - default argument belongs as a parameter, and do any necessary - instantiation here, instead of ... - (build_over_call): Here. - * decl.c (local_variable_p): New function. - (check_default_argument): Likewise, split out and tidied from ... - (grokparms): Here. - * error.c (dump_expr): Don't set PARM_DECL_EXPR. - * pt.c (tsubst_call_declarator_parms): New function. - (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing - with CALL_EXPRs, rather than trying to be clever. - (tsubst): Use tsubst_call_declarator_parms. - * tree.c (search_tree): Don't make it static. - * typeck.c (convert_arguments): Use new interface to - convert_default_arg. - -1999-01-20 Mark Mitchell - - * error.c (dump_function_decl): Don't print the argument types for - a function when the verbosity level is negative. - - * call.c (build_over_call): Check format attributes at call-time. - - * pt.c (tsubst_copy): Fix comment. - (unify): Don't allow unification with variable-sized arrays. - - * semantics.c (finish_stmt_expr): When processing a template make - the BIND_EXPR long-lived. - -1999-01-19 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Make vtables comdat here. - (import_export_vtable): Not here. - -1999-01-18 Jason Merrill - - * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique - non-static member function. - -1999-01-18 Nathan Sidwell - - * class.c (instantiate_type): Only diagnose illegal address of member - function if complaining. - - * decl.c (lookup_name_real): Remove duplicate code. - -1999-01-18 Jason Merrill - - * tree.c (copy_template_template_parm): Use permanent_obstack. - -1999-01-18 Kriang Lerdsuwanakij - - * pt.c (unify): Remove restrictions on deduction of argument - of template template parameters. - -1999-01-18 Nathan Sidwell - - * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs. - - * class.c (resolve_address_of_overloaded_function): Show list of - all candidates, when none of them match. - -1999-01-18 Chip Salzenberg - - * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up - definition of 'casting away const' in reinterpret_cast<>. - -1999-01-18 Graham - - * cvt.c: Add include for decl.h, remove extern for - static_aggregates which is now provided by decl.h. - - * Makefile.in (cvt.o): Add dependency for decl.h and missing - dependencies for convert.h and flags.h. - -1999-01-18 Nathan Sidwell - - * decl2.c (do_dtors): Set current location to that of the - decl, for sensible diagnostics and debugging. - (check_classfn): Issue `incomplete type' error, if - class is not defined. - -1999-01-16 Jason Merrill - - * cp-tree.h: Add prototype for bound_pmf_p. - -1999-01-16 Jason Merrill - Manfred Hollstein - - * decl.c (grokdeclarator): Don't make 'main(){}' an error with only - -Wreturn-type. - -1999-01-16 Nathan Sidwell - - * cp-tree.h (struct lang_type): Added has_mutable flag. - (CLASSTYPE_HAS_MUTABLE): New macro to access it. - (TYPE_HAS_MUTABLE_P): New macro to read it. - (cp_has_mutable_p): Prototype for new function. - * class.c (finish_struct_1): Set has_mutable from members. - * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if - it contains a mutable. - * typeck.c (cp_has_mutable_p): New function. - -1999-01-15 Mark Mitchell - - * pt.c (process_template_parm): Ignore top-level qualifiers on - non-type parameters. - - * decl.c (start_function): Use current_function_parms in the call - to require_complete_type_for_parms, not the probably empty - DECL_ARGUMENTS. - -1999-01-14 Jason Merrill - - * semantics.c (finish_asm_stmt): Don't warn about redundant volatile. - - * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means - that we don't suppress the other copies. - * lex.c (handle_cp_pragma): Likewise. - -1999-01-13 Mark Mitchell - - * decl.c (grokdeclarator): Undo 1998-12-14 change. - * tree.c (build_cplus_array_type_1): Likewise. - * pt.c (instantiate_class_template): Remove misleading comment. - (tsubst_aggr_type): Substitute if there are template parameters, - regardless of whether or not they use template arguments. - (unify): Likewise, but for unification. - -1999-01-12 Richard Henderson - - * cp-tree.h (flag_permissive): Declare extern. - -1999-01-06 Mark Mitchell - - * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT - here. - (lang_type): Add is_partial_instantiation. Decrease width of - dummy. - (PARTIAL_INSTANTIATION_P): New macro. - (OPERATOR_TYPENAME_P): Remove. - * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not - OPERATOR_TYPENAME_P. - (grok_op_properties): Likewise. - * friend.c (do_friend): Handle friends that are member functions - correctly. - * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT. - * pt.c (instantiate_class_template): Rework for clarity. Avoid - leaving TYPE_BEING_DEFINED set in obscure cases. Don't do - any more partial instantiation than is absolutely necessary for - implicit typename. Set PARTIAL_INSTANTIATION_P. - (tsubst_decl): Use IDENTIFIER_TYPENAME_P. - * semantics.c (begin_class_definition): Handle partial - specializations of a type that was previously partially - instantiated. - -Wed Jan 6 03:18:53 1999 Mark Elbrecht - - * Make-lang.in (g++.o): Depend on prefix.h. - -1999-01-04 Jason Merrill - - * tree.c (bound_pmf_p): New fn. - * typeck.c (build_c_cast): Use it. - - * decl.c (grok_op_properties): Use same_type_p. - -Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi - - * Makefile.in (cvt.o): Depend on toplev.h. - - * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes. - - * cvt.c: Include toplev.h. - - * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and - definitions. - - * init.c (expand_vec_init): Initialize variable `itype'. - - * lex.c (yyerror): Cast the argument passed to a ctype function to - an unsigned char. - - * method.c (build_mangled_C9x_name): Wrap prototype and definition - in "HOST_BITS_PER_WIDE_INT >= 64". - - * typeck.c (build_binary_op): Mark parameter `convert_p' with - ATTRIBUTE_UNUSED. - -1998-12-22 Mark Mitchell - - * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation. - * tree.c (build_exception_variant): Don't crash on empty throw - specs. - -1998-12-18 DJ Delorie - - * cvt.c (convert_to_reference): Check for both error_mark_node - and NULL_NODE after call to convert_for_initialization. - -1998-12-17 Jason Merrill - - * error.c (interesting_scope_p): New fn. - (dump_simple_decl): Use it. - (dump_expr, case CONSTRUCTOR): Force a & for a PMF. - (dump_expr, case OFFSET_REF): Print ->* if appropriate. - -1998-12-16 Mark Mitchell - - * class.c (resolve_address_of_overloaded_function): Do conversion - to correct type here, rather than ... - (instantiate_type): Here. - - * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro. - (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it. - (decl_template_parm_p): Remove. - * decl.c (pushdecl): Don't set DECL_CONTEXT for a template - parameter. - * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P. - * pt.c (push_inline_template_parms_recursive): Set it. - (decl_template_parm_p): Remove. - (check_template_shadow): Use DECL_TEMPLATE_PARM_P. - (process_template_parm): Set it. - -Wed Dec 16 16:33:58 1998 Dave Brolley - - * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus - if configured with cpplib. - -1998-12-15 Mark Mitchell - - * decl.c (poplevel): Make sure ns_binding is initialized. - - * decl.c (finish_function): Undo inadvertent change in previous - patch. - -1998-12-14 Mark Mitchell - - * class.c (pushclass): Tweak handling of class-level bindings. - (resolve_address_of_overloaded_function): Update pointer-to-member - handling. - (instantiate_type): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - * decl.c (pop_binding): Take the DECL to pop, not just the name. - Deal with `struct stat' hack. - (binding_level): Add to documentation. - (push_binding): Clear BINDING_TYPE. - (add_binding): New function. - (push_local_binding): Use it. - (push_class_binding): Likewise. - (poplevel): Adjust calls to pop_binding. - (poplevel_class): Likewise. - (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden - declarations to current binding level. - (push_class_level_binding): Likewise. - (push_overloaded_decl): Adjust handling of OVERLOADs in local - bindings. - (lookup_namespace_name): Don't crash when confronted with a - TEMPLATE_DECL. - (lookup_name_real): Do `struct stat' hack in local binding - contexts. - (build_ptrmemfunc_type): Adjust documentation. - (grokdeclarator): Don't avoid building real array types when - processing templates unless really necessary. - (finish_method): Adjust calls to pop_binding. - * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves, - not reparse_decl_as_expr. - (build_expr_from_tree): Deal with a template-id as the function to - call in a METHOD_CALL_EXPR. - * pt.c (convert_nontype_argument): Tweak pointer-to-member handling. - (maybe_adjust_types_For_deduction): Don't do peculiar things with - METHOD_TYPEs here. - (resolve_overloaded_unification): Handle COMPONENT_REFs. Build - pointer-to-member types where necessary. - * tree.c (build_cplus_array_type_1): Don't avoid building real - array types when processing templates unless really necessary. - (build_exception_variant): Compare the exception lists correctly. - -1998-12-13 Mark Mitchell - - * cp-tree.def (CPLUS_BINDING): Update documentation. - * cp-tree.h (LOCAL_BINDING_P): New macro. - (lang_identifier): Rename local_value to bindings. - (tree_binding): Make `scope' of type `void*', not `tree'. - (BINDING_SCOPE): Update documentation. - (IDENTIFIER_LOCAL_VALUE): Remove. - (IDENTIFIER_CLASS_VALUE): Document. - (IDENTIFIER_BINDING): New macro. - (IDENTIFIER_VALUE): Likewise. - (TIME_IDENTIFIER_TIME): Likewise. - (TIME_IDENTIFIER_FILEINFO): Likewise. - (IMPLICIT_TYPENAME_P): Likewise. - (set_identifier_local_value): Remove. - (push_local_binding): New function. - (push_class_binding): Likewise. - * class.c (pushclass): Update comments; use push_class_binding. - * decl.c (set_identifier_local_value_with_scope): Remove. - (set_identifier_local_value): Likewise. - (push_binding): New function. - (pop_binding): Likewise. - (binding_level): Update documentation. Remove shadowed. - (BINDING_LEVEL): New macro. - (free_binding_nodes): New variable. - (poplevel): Adjust for new name-lookup scheme. Don't mess up - BLOCK_VARs when doing for-scope extension. Remove effectively - dead code. - (pushlevel_class): Tweak formatting. - (poplevel_class): Adjust for new name-lookup scheme. - (print_binding_level): Likewise. - (store_bindings): Likewise. - (pushdecl): Likewise. - (pushdecl_class_level): Likewise. - (push_class_level_binding): Likewise. - (push_overloaded_decl): Update comments. Adjust for new - name-lookup scheme. - (lookup_name_real): Likewise. - (lookup_name_current_level): Likewise. - (cp_finish_decl): Likewise. - (require_complete_types_for_parms): Likewise. Remove misleading - #if 0'd code. - (grok_parms): Likewise. Don't call - require_complete_types_for_parms here. - (grok_ctor_properties): Don't treat templates as copy - constructors. - (grop_op_properties): Or as assignment operators. - (start_function): Document. Adjust for new name-lookup scheme. - (finish_function): Likewise. - * decl2.c (do_local_using_decl): Use push_local_binding. - * lex.c (begin_definition_of_inclass_inline): New function, split - out from ... - (do_pending_inlines): Here, and ... - (process_next_inline): Here. - (get_time_identifier): Use TIME_IDENTIFIER_* macros. - (init_filename_times): Likewise. - (extract_interface_info): Likewise. - (ste_typedecl_interface_info): Likewise. - (check_newline): Likewise. - (dump_time_statistics): Likewise. - (handle_cp_pragma): Likewise. - (do_identifier): Adjust for new name-lookup scheme. - * parse.y (function_try_block): Return ctor_initializer_opt value. - (fndef): Use it. - (fn.defpen): Pass appropriate values to start_function. - (pending_inline): Use functor_try_block value, and pass - appropriate values to finish_function. - * pt.c (is_member_template): Update documentation; remove handling - of FUNCTION_DECLs. As per name, this function should deal only in - TEMPLATE_DECLs. - (decl_template_parm_p): Change name of olddecl parameter to decl. - (check_template_shadow): Adjust for new name-lookup scheme. - (lookup_template_class): Likewise. - (tsubst_decl): Tweak so as not to confuse member templates with - copy constructors and assignment operators. - (unify): Handle UNION_TYPEs. - * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme. - (lang_print_xnode): Adjust for new name-lookup scheme. - * typeck.c (mark_addressable): Likewise. - (c_expand_return): Likewise. - -1998-12-08 Jason Merrill - - * decl.c (grokdeclarator): Allow field with same name as class - in extern "C". - - * decl.c (lookup_name_real): Don't limit field lookup to types. - * class.c (check_member_decl_is_same_in_complete_scope): No error - if icv and x are the same. - * lex.c (do_identifier): Tweak error message. - -1998-12-10 Mark Mitchell - - * decl.c (start_enum): Use push_obstacks, not - end_temporary_allocation. - (finish_enum): Call pop_obstacks. - -1998-12-10 Mark Mitchell - - * class.c (instantiate_type): Return error_mark_node rather than - junk. - -1998-12-09 Mark Mitchell - - * cp-tree.h (most_specialized_instantiation): New function. - (print_candidates): Likewise. - * class.c (validate_lhs): Remove. - (resolve_address_of_overloaded_function): New function, split out - and then substantially reworked, from ... - (instantiate_type): Use it. Simplify. - * cvt.c (convert_to_reference): Complain when caller has indicated - that's the right thing to do. Don't crash if instantiate_type - fails. - * pt.c: Substitute `parameters' for `paramters' throughout. - (print_candidates): Don't make it static. - (most_specialized_instantiation): Split out from ... - (most_specialized): Here. - -Wed Dec 9 15:33:01 1998 Dave Brolley - - * lex.c (lang_init_options): Initialize cpplib. - * decl2.c (parse_options,cpp_initialized): Removed. - (lang_decode_option): Move initialization of cpplib to - lang_init_options. - -1998-12-09 Mark Mitchell - - * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as - well as the TYPE_DECL, when a typedef name is assigned to a - previously anonymous type. - -1998-12-08 Andrew MacLeod - - * cp/except.c (call_eh_info): Use __start_cp_handler instead of - __cp_eh_info for getting the eh info pointer. Add table_index to - field list. - (push_eh_cleanup): Don't increment 'handlers' data field. - (process_start_catch_block): Don't set the 'caught' field. - - * cp/exception.cc (CP_EH_INFO): New macro for getting the - exception info pointer within library routines. - (__cp_eh_info): Use CP_EH_INFO. - (__start_cp_handler): Get exception info pointer, set caught field, - and increment the handlers field. Avoids this being done by handlers. - (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro. - (uncaught_exception): Use CP_EH_INFO macro. - -Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h - -Mon Dec 7 17:56:06 1998 Mike Stump - - * lex.c (check_newline): Add support for \ as `natural' - characters in file names in #line to be consistent with #include - handling. We support escape processing in the # 1 "..." version of - the command. See also support in cp/lex.c. - -1998-12-07 Zack Weinberg - - * cp/decl2.c: s/data/opts/ when initializing cpp_reader - structure. - -1998-12-07 Jason Merrill - - * decl.c (build_typename_type): Set DECL_ARTIFICIAL. - - * error.c (dump_simple_decl): Also print namespace context. - (dump_function_decl): Likewise. - - * decl2.c (ambiguous_decl): Don't print old value if it's - error_mark_node. - - * decl.c (lookup_name_real): Fix handling of local types shadowed - by a non-type decl. Remove obsolete code. - * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro. - - * lang-options.h: Add -fpermissive. - * decl2.c: Likewise. - * cp-tree.h: Add flag_permissive. - * decl.c (init_decl_processing): If neither -fpermissive or -pedantic - were specified, set flag_pedantic_errors. - * call.c (build_over_call): Turn dropped qualifier messages - back into pedwarns. - * cvt.c (convert_to_reference): Likewise. - * typeck.c (convert_for_assignment): Likewise. - -1998-12-05 Jason Merrill - - * decl2.c (coerce_new_type): Use same_type_p. - (coerce_delete_type): Likewise. - - * call.c (check_dtor_name): Return 1, not error_mark_node. - -1998-12-04 Jason Merrill - - * lex.c (handle_cp_pragma): Disable #pragma interface/implementation - if MULTIPLE_SYMBOL_SPACES. - - * pt.c (check_template_shadow): New fn. - * decl2.c (grokfield): Use it. - * decl.c (pushdecl): Likewise. - (pushdecl_class_level): Likewise. - (start_method): Likewise. - (xref_tag): Don't try to use 't' if we're defining. - - * call.c (check_dtor_name): Just return an error_mark_node. - * pt.c (lookup_template_class): Complain about using non-template here. - * parse.y (apparent_template_type): Not here. - - * pt.c (check_explicit_specialization): Complain about specialization - with C linkage. - - * lang-options.h: Add -f{no-,}implicit-inline-templates. - - * pt.c (convert_nontype_argument): Don't assume that any integer - argument is intended to be a constant-expression. - -1998-12-03 Mark Mitchell - - * class.c (handle_using_decl): Fix comment. Don't lookup - constructors in base classes. - (validate_lhs): Fix typo in comment. - * search.c (lookup_field_1): Don't return a USING_DECL. - - * cp-tree.h (DECL_ACCESS): Improve documentation. - - * decl.c (expand_static_init): Don't set the initialization-done - flag until the initialization is done. - -1998-12-02 Mark Mitchell - - * decl2.c (validate_nonmember_using_decl): Complain about using - declarations for class members. - -1998-11-29 Jason Merrill - - * typeck2.c (process_init_constructor): Use same_type_p. - - * decl.c (check_tag_decl): Don't warn about null decl inside a - class. - - * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than - UNIFY_ALLOW_NONE. - (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE. - (resolve_overloaded_unification): Strip baselinks. - -Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi - - * g++spec.c: Don't prototype xmalloc. - -1998-11-25 Jason Merrill - - * except.c (expand_throw): Use TYPE_PTR_P to check for pointers. - - * decl.c (check_tag_decl): Do complain about null friend decl at - file scope. - -1998-11-25 Andreas Schwab - - * lex.c (make_lang_type): Clear the whole struct lang_type, not - only the first multiple of sizeof (int). - -1998-11-24 Jason Merrill - - * decl.c (start_decl): An explicit specialization of a static data - member is only a definition if it has an initializer. - - * except.c (expand_throw): Use cp_finish_decl for the throw temp. - * cvt.c (build_up_reference): Pass DIRECT_BIND down into - cp_finish_decl. - * init.c (expand_default_init): Check for DIRECT_BIND instead of - DECL_ARTIFICIAL. - - * call.c (build_over_call): Use build_decl. - - * except.c (expand_throw): Just use convert, not - build_reinterpret_cast. - - * lex.c (handle_generic_pragma): Use token_buffer. - - * decl.c (check_tag_decl): Don't complain about null friend decl. - -1998-11-24 Dave Pitts - - * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the - first position. - * lex.c (check_newline): Use ISALPHA. - (readescape): Use ISGRAPH. - (yyerror): Use ISGRAPH. - -1998-11-24 Nathan Sidwell - - * search.c (get_abstract_virtuals): Do not use initial - CLASSTYPE_ABSTRACT_VIRTUALS. - * typeck2.c (abstract_virtuals_error): Show location of abstract - declaration. - * call.c (build_new_method_call): Use - CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate. - * class.c (finish_struct_bits): Don't bother working out whether - get_abstract_virtuals will do anything, just do it. - -1998-11-24 Graham - - * typeck.c (build_component_ref): Remove unused statement. - -1998-11-24 Jason Merrill - - * class.c (add_method): Catch invalid overloads. - - * class.c (add_method): Build up OVERLOADs properly for conversion ops. - * search.c (lookup_conversions): Handle getting real OVERLOADs. - (add_conversions): Likewise. Revert last change. - * call.c (add_conv_candidate): Pass totype to add_candidate instead - of fn. Don't add a new candidate if the last one was for the same - type. - (print_z_candidates): Handle getting a type as a function. - (joust): If we got two conversion candidates to the same type, - just pick one. - (build_object_call): Lose 'templates'. - (build_user_type_conversion_1): Handle getting real OVERLOADs. - -1998-11-23 Jason Merrill - - * typeck2.c (process_init_constructor): If there are elements - that don't have initializers and they need to have constructors - run, supply them with initializers. - - * class.c (finish_struct_1): A class with a 0-width bitfield is - still empty. - -1998-11-23 Mark Mitchell - - * pt.c (instantiate_class_template): Don't try to figure out what - specialization to use for a partial instantiation. Correct - typos in a couple of comments. Avoid calling uses_template_parms - multiple times. - -1998-11-23 Benjamin Kosnik - - * method.c (process_overload_item): Add call to - build_mangled_C9x_name for intTI_type_nodes. - (build_mangled_C9x_name): Add prototype, define. - * decl.c (init_decl_processing): Add names for - TImode_type_node. - -1998-11-23 Jason Merrill - - * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS. - - * class.c (finish_struct_1): Set things up for 0-width bitfields - like we do for others. - - * decl.c (check_tag_decl): New fn. - (shadow_tag): Split out from here. - * decl2.c (grok_x_components): Call it. - -1998-11-22 Jason Merrill - - * decl.c: Lose warn_about_return_type. - (grokdeclarator): Always complain about implicit int, except for - `main () { ... }'. - - * decl.c (tag_name): New fn. - (xref_tag): Complain about using typedef-name after class-key. - - * init.c (expand_vec_init): Also keep going if from_array. - - * tree.c (is_overloaded_fn): Also handle the output of - build_offset_ref. - - * decl.c (grokdeclarator): Use constructor_name when comparing - field name against enclosing class. - * class.c (finish_struct_anon): Likewise. - -1998-11-22 Mark Mitchell - - * decl.c (poplevel): Remove code to handle KEEP == 2. - (finish_function): Don't confuse BLOCK-order when - processing a destructor. - -1998-11-21 Jason Merrill - - * decl.c (require_complete_types_for_parms): Call layout_decl - after we've completed the type. - -1998-11-21 Martin von Löwis - - * decl2.c (validate_nonmember_using_decl): Allow using templates - from the global namespace. - -1998-11-21 Jason Merrill - - Handle specifying template args to member function templates. - * tree.c (build_overload): Always create an OVERLOAD for a template. - * search.c (add_conversions): Handle finding an OVERLOAD. - * decl2.c (check_classfn): Likewise. - * lex.c (identifier_type): See through a baselink. - * parse.y (do_id): Don't call do_identifier if we got a baselink. - * class.c (instantiate_type, case TREE_LIST): Recurse. - - * decl.c (grokdeclarator): Allow a boolean constant for array - bounds, odd as that sounds. - - * pt.c (unify): Be more strict about non-type parms, except for - array bounds. - (UNIFY_ALLOW_INTEGER): New macro. - -1998-11-19 Manfred Hollstein - - * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir). - -1998-11-19 Jason Merrill - - * semantics.c (begin_class_definition): Call - maybe_process_partial_specialization before push_template_decl. - Don't call push_template_decl for a specialization. - * search.c (lookup_field): Do return a member template class. - * decl2.c (handle_class_head): Handle member template classes. - - * decl.c (grokdeclarator): A parm type need not be complete. - - * pt.c (convert_nontype_argument): Fix thinko. - -1998-11-18 Mark Mitchell - - * cp-tree.h (PTRMEM_CST_CLASS): Fix typo. - (global_delete_fndecl): New variable. - * decl.c (global_delete_fndecl): Define it. - (init_decl_processing): Set it. - * init.c (build_builtin_delete_call): Use it. - * tree.c (mapcar): Recursively call mapcar for the type of EXPR - nodes. - -1998-11-18 Jason Merrill - - * decl.c (cplus_expand_expr_stmt): Always complain about unresolved - type. - - * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue. - * call.c (build_object_call): Also support references to functions. - * typeck.c (convert_for_initialization): Don't decay a function - if the target is a reference to function. - - * search.c (add_conversions): Get all the overloads from a class. - - * decl.c (grok_ctor_properties): Complain about any constructor - that will take a single arg of the class type by value. - - * typeck2.c (build_functional_cast): Can't create objects of - abstract classes this way. - * cvt.c (ocp_convert): Likewise. - - * decl.c (grokfndecl): Member functions of local classes are not - public. - -1998-11-18 Mark Mitchell - - * Make-lang.in (cc1plus): Add dependency on hash.o. - -1998-11-18 Jason Merrill - - * search.c (get_abstract_virtuals): Complain about virtuals with - no final overrider. - * typeck2.c (abstract_virtuals_error): Remove handling for virtuals - with no final overrider. - * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P - on virtuals with no final overrider. - - * lex.c (reinit_parse_for_block): Add a space after the initial ':'. - - * class.c (finish_struct_1): Don't remove zero-width bit-fields until - after layout_type. - - * friend.c (do_friend): Don't set_mangled_name_for_decl. - - * class.c (finish_struct_anon): Complain about non-fields. - * decl2.c (build_anon_union_vars): Likewise. - - * decl.c (grokdeclarator): Normal data members can't have the same - name as the class, either. - * class.c (finish_struct_anon): Neither can members of an - anonymous union. - -1998-11-17 Mark Mitchell - - * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses. - (TYPE_BINFO): Likewise. - (IS_AGGR_TYPE): Tweak. - (SET_IS_AGGR_TYPE): New macro. - (CLASS_TYPE_P): Tweak. - (lang_type): Group mark bitfields together. Remove linenum. - (CLASSTYPE_SOURCE_LINE): Remove macro. - (CLASSTYPE_MARKED_N): New macro. - (SET_CLASSTYPE_MARKED_N): Likewise. - (CLEAR_CLASSTYPE_MARKED_N): Likewise. - (CLASS_TYPE_MARKED_*): Use them. - (SET_CLASSTYPE_MARKED_*): Likewise. - (CLEAR_CLASSTYPE_MARKED_*): Likewise. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. - (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well. - (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE. - * class.c (class_cache_obstack): New variable. - (class_cache_firstobj): Likewise. - (finish_struct): Don't set CLASSTYPE_SOURCE_LINE. - (pushclass): Free the cache, when appropriate. - (popclass): Tidy. - (maybe_push_cache_obstack): Use class_cache_obstack. - * decl.c (include hash.h). - (typename_hash): New function. - (typename_compare): Likewise. - (build_typename_type): Check the hash table to avoid creating - duplicates. - (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE. - (grokdeclarator): Use CLASS_TYPE_P. - (xref_basetypes): Likewise. - (start_function): Likewise. Don't put current_class_ref on the - permanent obstack. - * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO - and TYPE_TI_ARGS. - * lex.c (note_got_semicolon): Use CLASS_TYPE_P. - (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated - fields for types other than class types. Do clear TYPE_ALIAS_SET - for types other than class types, though. - * method.c (build_overload_identifier): Use CLASS_TYPE_P and - TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - * pt.c (process_template_parm): Don't set - CLASSTYPE_GOT_SEMICOLON. - (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - Coerce arguments on the momentary obstack. - (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - (instantiate_class_template): Calculate template arguments on the - momentary obstack. Tidy. - (tsubst_template_arg_vector): Use make_temp_vec. - (tsubst_aggr_type): Put template arguments on the momentary - obstack. - (tsubst_decl): Likewise. - (tsubst): Copy the array bounds index to the permanent obstack - before building index types. Use new macros. - (unify): Use new macros. - (do_type_instantiation): Likewise. - * search.c (lookup_fnfields_1): Use new macros. - (dfs_pushdecls): Build envelopes on the cache obstack. - (dfs_compress_decls): Use new macros. - (push_class_decls): Build on the cache obstack. - * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON. - * sign.c (build_signature_pointer_or_reference_type): Use - SET_IS_AGGR_TYPE. - * tree.c (make_binfo): Check CLASS_TYPE_P. - (copy_template_template_parm): Adjust. - (make_temp_vec): Use push_expression_obstack. - * typeck.c (complete_type): Use new macros. - (comptypes): Likewise. - -1998-11-17 Jason Merrill - - * pt.c (tsubst): Add diagnostics for invalid array, reference - and pointer to member types. - -1998-11-16 Jason Merrill - - * typeck2.c (my_friendly_abort): Don't fatal twice in a row. - - * typeck.c (c_expand_start_case): Use build_expr_type_conversion. - Simplify. - - * parse.y (structsp): Fix cut-and-paste error. - - * init.c (build_new): Complain about non-integral size. - - * parse.y (unary_expr): Complain about defining types in sizeof. - - * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn. - - * rtti.c (build_x_typeid): Complain about typeid without - including . - (get_typeid): Likewise. Complain about typeid of incomplete type. - (get_tinfo_fn_dynamic): Likewise. - (get_typeid_1): Not static anymore. - * except.c (build_eh_type_type): Use get_typeid_1. - - * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to - ambiguous or private bases. Fix warning for reference cast. - -1998-11-16 Mark Mitchell - - * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro. - * decl.c (duplicate_decls): Remove special-case code to deal with - template friends, and just do the obvious thing. - * pt.c (register_specialization): Tweak for clarity, and also to - clear DECL_INITIAL for an instantiation before it is merged with a - specialization. - (check_explicit_specialization): Fix indentation. - (tsubst_friend_function): Handle both definitions in friend - declaration and outside friend declarations. - (tsubst_decl): Don't clear DECL_INITIAL for an instantiation. - (regenerate_decl_from_template): Tweak accordingly. - (instantiate_decl): Likewise. - -1998-11-16 Jason Merrill - - * decl.c (cplus_expand_expr_stmt): Promote warning about naked - member function reference to error. - * cvt.c (ocp_convert): Complain about converting an overloaded - function to void. - - * init.c (build_offset_ref): Just return a lone static member - function. - - * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs, - not internal ones. - - * typeck.c (build_binary_op_nodefault): Improve error handling. - - * decl.c (grokfndecl): Complain about making 'main' a template. - - * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*. - - * call.c (build_method_call): Handle a BIT_NOT_EXPR around a - TYPE_DECL in a template. - -1998-11-15 Jason Merrill - - * typeck2.c (my_friendly_abort): Add URL in the other case, too. - - * decl.c (struct cp_function): Add named_label_uses. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - (define_label): Also complain about jumping into the scope of - non-POD objects that don't have constructors. - * tree.c (pod_type_p): New fn. - - * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner. - * rtti.c (synthesize_tinfo_fn): Call import_export_decl here. - (get_tinfo_fn): Not here. - * repo.c (repo_get_id): Abort if we get called for an incomplete - type. - -1998-11-13 Mark Mitchell - - * except.c (expand_throw): Make sure first argument to - __cp_push_exception is of type `void*' to avoid spurious error - messages. - -1998-11-11 Jason Merrill - - * pt.c (try_one_overload): Take orig_targs again. Only check for - mismatches against them; we don't care what a previous call found. - (resolve_overloaded_unification): Adjust. - - * search.c (lookup_field): Don't return anything for a non-type - field from a dependent type. - * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class - in an array declarator. - (start_decl): Push into the class before looking for the field. - -1998-11-08 Mark Mitchell - - * method.c (build_overload_value): Handle REFERENCE_TYPE. - -1998-11-08 Martin von Löwis - - * decl.c (grokdeclarator): Allow namespace-scoped members if they - are friends. - -1998-11-08 Jason Merrill - - * pt.c (tsubst_decl): Don't mess with the global value of an - un-mangled DECL_ASSEMBLER_NAME. - -1998-11-03 Christopher Faylor - - * decl.c (init_decl_processing): Remove CYGWIN conditional - since CYGWIN is now able to deal with trapping signals. - -Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi - - * cp-tree.h: Don't include gansidecl.h. - * exception.cc: Include gansidecl.h (since we don't include config.h) - * g++spec.c: Don't include gansidecl.h. - -1998-11-06 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease - size of dummy. - (DECL_DEFINED_IN_CLASS_P): New macro. - (TEMPLATE_PARMS_FOR_INLINE): Document. - (check_static_variable_definition): New function. - * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if - appropriate. - (check_static_variable_definition): Split out from ... - (grokdeclarator): Here. - * pt.c (check_default_tmpl_args): New function, split out from ... - (push_template_decl_real): Here. - (instantiate_template): Fix comment. - -1998-11-04 Mark Mitchell - - * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued. - (CP_TYPE_VOLATILE_P): Likewise. - (CP_TYPE_RESTRICT_P): Likewise. - -1998-11-03 Mark Mitchell - - * pt.c (tsubst): Use build_index_type, not build_index_2_type. - -1998-11-02 Jason Merrill - - * class.c (instantiate_type): Be more helpful. - - * decl2.c (import_export_decl): Call import_export_class. - - * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR. - * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR. - * pt.c (tsubst_copy): Likewise. - -1998-11-02 Mark Mitchell - - * init.c (expand_vec_init): Fix off-by-one error. - -1998-11-02 Alexandre Oliva - - * parse.y (apparent_template_type): New type. - (named_complex_class_head_sans_basetype): Use it. - * Makefile.in (CONFLICTS): One new conflict. - * parse.c: Regenerated. - -1998-11-01 Mark Mitchell - - * cp-tree.h (COMPARE_STRICT): New macro. - (COMPARE_BASE): Likewise. - (COMPARE_RELAXED): Likewise. - (COMPARE_REDECLARATION): Likewise. - (same_type_p): Likewise. - (same_or_base_type_p): Likewise. - * call.c (standard_conversion): Use them, in place of comptypes - with numeric arguments. - (reference_binding): Likewise. - (convert_like): Likewise. - (build_over_call): Likewise. - (is_subseq): Likewise. - (is_properly_derived_from): Likewise. - (compare_ics): Likewise. - (joust): Likewise. - * class.c (delete_duplicate_fields_1): Likewise. - (resolves_to_fixed_type_p): Likewise. - (instantiate_type): Likewise. Remove #if 0'd code. - * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here. - (pushdecl): Likewise. - (lookup_name_real): Likewise. - (grokdeclarator): Likewise. Check for illegal array declarations. - (grokparms): Likewise. - (grok_op_properties): Likewise. - * decl2.c (check_classfn): Likewise. - * friend.c (is_friend): Likewise. - (make_friend_class): Likewise. - * init.c (expand_aggr_init): Likewise. - (expand_vec_init): Likewise. - * pt.c (is_member_template_class): Remove declaration. - (is_specialization_of): Use COMPARE_* and new macros. - (comp_template_parms): Likewise. - (convert_nontype_argument): Likewise. - (coerce_template_template_parms): Likewise. - (template_args_equal): Likewise. - (lookup_template_class): Likewise. - (type_unification_real): Likewise. - (unify): Likewise. - (get_bindings_real): Likewise. - * search.c (covariant_return_p): Likewise. - (get_matching_virtual): Likewise. - * sig.c (match_method_types): Likewise. - * tree.c (vec_binfo_member): Likewise. - (cp_tree_equal): Likewise. - * typeck.c (common_type): Likewise. - (comp_array_types): Likewise. Get issues involving unknown array - bounds right. - (comptypes): Update comments. Use new flags. - (comp_target_types): Use new macros. - (compparms): Likewise. - (comp_target_parms): Likewise. - (string_conv_p): Likewise. - (build_component_ref): Likewise. - (build_indirect_ref): Likewise. - (build_conditional_expr): Likewise. - (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (build_modify_expr): Likewise. - (convert_for_assignment): Likewise. - (comp_ptr_ttypes_real): Likewise. - (ptr_reasonably_similar): Likewise. - (comp_ptr_ttypes_const): Likewise. - -1998-10-31 Jason Merrill - - * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error. - -1998-10-30 Mark Mitchell - - * decl2.c (delete_sanity): Pass integer_zero_node, not - integer_two_node, to build_vec_delete. - * init.c (build_array_eh_cleanup): Remove. - (expand_vec_init_try_block): New function. - (expand_vec_init_catch_clause): Likewise. - (build_vec_delete_1): Don't deal with case that auto_delete_vec - might be integer_two_node anymore. - (expand_vec_init): Rework for initialization-correctness and - exception-correctness. - * typeck2.c (process_init_constructor): Make mutual exclusivity - of cases more obvious. - -1998-10-29 Jason Merrill - - * decl.c (lookup_name_real): OK, only warn if not lexing. - Simplify suggested fix. - - * cp-tree.h (IDENTIFIER_MARKED): New macro. - * search.c (lookup_conversions): Use breadth_first_search. - (add_conversions): Avoid adding two conversions to the same type. - (breadth_first_search): Work with base binfos, rather - than binfos and base indices. - (get_virtual_destructor): Adjust. - (tree_has_any_destructor_p): Adjust. - (get_matching_virtual): Adjust. - - * pt.c (push_template_decl_real): Generalize check for incorrect - number of template parms. - (is_member_template_class): #if 0. - -1998-10-29 Richard Henderson - - * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@, - last. - -1998-10-28 Zack Weinberg - - * lex.c: Call check_newline from lang_init always. After - calling cpp_start_read, set yy_cur and yy_lim to read from the - cpplib token buffer. - -1998-10-28 Jason Merrill - - * class.c (instantiate_type): Don't consider templates for a normal - match. - - * class.c (finish_struct_1): Don't complain about non-copy - assignment ops in union members. - - * class.c (build_vtable): Don't pass at_eof to import_export_vtable. - (prepare_fresh_vtable): Likewise. - (finish_struct_1): Don't call import_export_class. - * decl2.c (finish_vtable_vardecl): Do import/export stuff. - (finish_prevtable_vardecl): Lose. - (finish_file): Don't call it. - * pt.c (instantiate_class_template): Likewise. - * cp-tree.h: Remove it. - - * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here. - * decl.c (finish_function): Not here. - (start_function): Do set DECL_INITIAL. - - * pt.c (push_template_decl_real): Complain about default template - args for enclosing classes. - - * call.c (add_function_candidate): Treat conversion functions - as coming from the argument's class. - * cp-tree.h (DECL_CONV_FN_P): New fn. - (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE. - * class.c (add_method): Use DECL_CONV_FN_P. - * decl2.c (check_classfn): Likewise. - * error.c (dump_function_name): Likewise. - (dump_function_decl): Likewise. - * pt.c (fn_type_unification): Likewise. - * search.c (add_conversions): Likewise. - -1998-10-27 Jason Merrill - - * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL. - * method.c (hack_identifier): Also check for using RESULT_DECL - from outer context. - -1998-10-27 Mark Mitchell - - * decl.c (grokdeclarator): Use type_quals, rather than constp, - consistently. - -1998-10-27 Jason Merrill - - * call.c (standard_conversion): instantiate_type here. - (reference_binding): And here. - (implicit_conversion): Not here. - (build_op_delete_call): No need to cons up an OVERLOAD. - * cvt.c (cp_convert_to_pointer): instantiate_type here. - (convert_to_reference): And here. - * decl.c (grok_reference_init): Not here. - (grokparms): Or here. - * typeck2.c (digest_init): Or here. - * typeck.c (decay_conversion): Take the address of overloaded - functions, too. - (require_instantiated_type): Lose. - (convert_arguments): Don't handle unknown types here. - (build_c_cast): Likewise. - (build_binary_op): Gut. - (build_conditional_expr): Don't require_instantiated_type. - (build_modify_expr): Likewise. - (build_static_cast): Don't instantiate_type. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (convert_for_initialization): Likewise. - (build_ptrmemfunc): Use type_unknown_p. - (convert_for_assignment): Also do default_conversion on overloaded - functions. Hand them off to ocp_convert. - -1998-10-26 Mark Mitchell - - * error.c (dump_decl): Deal with TEMPLATE_DECLs that are - VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type. - - * class.c (finish_struct_1): Use build_cplus_array_type to build - array types. - * decl.c (init_decl_processing): Likewise. - * except.c (expand_end_eh_spec): Likewise. - * search.c (expand_upcast_fixups): Simplify very slightly. - -1998-10-26 Jason Merrill - - * decl.c (grokdeclarator): Complain about a variable using - constructor syntax coming back null from start_decl. - - * friend.c (make_friend_class): Complain about trying to make - a non-class type a friend. - - * decl.c (grokfndecl): Set DECL_INITIAL for a defn here. - (start_function): Not here. - -1998-10-26 Brendan Kehoe - - * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration. - -1998-10-26 Jason Merrill - - * typeck2.c (process_init_constructor): Only skip anonymous fields - if they are bitfields. - - * cp-tree.def (TYPEOF_TYPE): New code. - * error.c (dump_type_real): Handle it. - * pt.c (tsubst): Likewise. - * tree.c (search_tree): Likewise. - * semantics.c (finish_typeof): New fn. - * parse.y (typespec): Use it. - * cp-tree.h: Declare it. - -1998-10-26 Manfred Hollstein - - * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional. - -1998-10-26 Jason Merrill - - * typeck.c (convert_arguments): Don't handle pmf references - specially. - - * init.c (build_member_call): Don't try to convert to the base type - if it's ambiguous or pedantic. - - * typeck2.c (check_for_new_type): Only depend on pedantic for - C-style casts. - -1998-10-25 Mark Mitchell - - * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all - non-converting constructors. - -1998-10-24 Martin von Löwis - - * gxxint.texi: Correct documentation for n, N, Q, and B. - -1998-10-23 Martin von Löwis - - * parse.y (condition): Convert VAR_DECL from reference to indirect - reference. - -1998-10-23 Andrew MacLeod - - * exception.cc (__cp_pop_exception): Free the original exception - value, not the potentially coerced one. - -1998-10-23 Mark Mitchell - - * Makefile.in (hash.h): Run gperf when necessary. - - * cp-tree.h (CP_TYPE_READONLY): Remove. - (CP_TYPE_VOLATILE): Likewise. - (CP_TYPE_QUALS): New macro. - (CP_TYPE_CONST_P): Likewise. - (CP_TYPE_VOLATILE_P): Likewise. - (CP_TYPE_RESTRICT_P): Likewise. - (CP_TYPE_CONST_NON_VOLATILE_P): Likewise. - (cp_build_type_variant): Rename to ... - (cp_build_qualified_type): New function. - (c_apply_type_quals_to_decl): Declare. - (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'. - (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise. - (cp_type_qual_from_rid): New function. - (compparms): Remove unused parameter. All callers changed. - (cp_type_quals): New function. - (at_least_as_qualified_p): Likewise. - (more_qualified_p): Likewise. - - * call.c (standard_conversion): Replace calls to - cp_build_type_variant with cp_build_qualified_type. Use - CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to - compare them. Use CP_TYPE_* macros to check qualifiers. - (reference_binding): Likewise. - (implicit_conversion): Likewise. - (add_builtin_candidates): Likewise. - (build_over_call): Likewise. - * class.c (overrides): Compare all qualifiers, not just `const', - on method declarations. - * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc. - (convert_pointer_to_real): Likewise. - (type_promotes_to): Likewise. - * decl.c (check_for_uninitialized_const_var): New function. - (init_decl_processing): More CP_TYPE_QUALS conversion, etc. - (cp_finish_decl): Use check_for_uninitialized_const_var. - (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to - handle `restrict'. - (grok_ctor_properties): Likewise. - (grok_op_properties): Likewise. - (start_function): Likewise. - (rever_static_member_fn): Likewise. - * decl2.c (grok_method_quals): Likewise. - (grokfield): Likewise. - * error.c (dump_readonly_or_volatile): Rename to ... - (dump_qualifiers): New function. Handle `restrict'. - (dump_type_real): Use it. - (dump_aggr_type): Likewise. - (dump_type_prefix): Likewise. - (dump_type_suffix): Likewise. - (dump_function_decl): Likewise. - (cv_as_string): Likewise. - * gxx.gperf: Add __restrict and __restrict__. - * gxxint.texi: Document `u' as used for `__restrict', and a few - other previously undocumented codes. - * hash.h: Regenerated. - * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc. - (build_member_call): Likewise. - (build_new_1): Likewise. - * lex.c (init_parse): Add entry for RID_RESTRICT. - (cons_up_default_function): More CP_TYPE_QUALS conversion, etc. - (cp_type_qual_from_rid): Define. - * lex.h (enum rid): Add RID_RESTRICT. - * method.c (process_modifiers): Deal with `restrict'. - * parse.y (primary): More CP_TYPE_QUALS conversion, etc. - * parse.c: Regenerated. - * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc. - (tsubst_aggr_type): Likewise. - (tsubst): Likewise. - (check_cv_quals_for_unify): Likewise. - (unify): Likewise. - * rtti.c (init_rtti_processing): Likewise. - (build_headof): Likewise. - (get_tinfo_var): Likewise. - (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling. - (expand_class_desc): Likewise. - (expand_attr_desc): Likewise. - (synthesize_tinfo_fn): Likewise. - * search.c (covariant_return_p): Likewise. Fix `volatile' handling. - (get_matching_virtual): Likewise. - (expand_upcast_fixups): Likewise. - * sig.c (build_signature_pointer_or_reference_name): Take - type_quals, not constp and volatilep. - (build_signature_pointer_or_reference_type): Likewise. - (match_method_types): More CP_TYPE_QUALS conversion, etc. - (build_signature_pointer_constructor): Likewise. - (build_signature_method_call): Likewise. - * tree.c (build_cplus_array_type): Likewise. - (cp_build_type_variant): Rename to ... - (cp_build_qualified_type): New function. Deal with `__restrict'. - (canonical_type_variant): More CP_TYPE_QUALS conversion, etc. - (build_exception_variant): Likewise. - (mapcar): Likewise. - * typeck.c (qualif_type): Likewise. - (common_type): Likewise. - (comptypes): Likewise. - (comp_cv_target_types): Likewise. - (at_least_as_qualified_p): Define. - (more_qualified_p): Likewise. - (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc. - (compparms): Likewise. - (inline_conversion): Likewise. - (string_conv_p): Likewise. - (build_component_ref): Likewise. - (build_indirect_ref): Likewise. - (build_array_ref): Likewise. - (build_unary_op): Likewise. - (build_conditional_expr): Likewise. - (build_static_cast): Likewise. - (build_c_cast): Likewise. - (build_modify_expr): Likewise. - (convert_For_assignment): Likewise. - (comp_ptr_ttypes_real): Likewise. - (cp_type_quals): New function. - -1998-10-23 Jason Merrill - - * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays. - (CP_TYPE_VOLATILE): Likewise. - * decl.c (grokdeclarator): Use them. - * tree.c (canonical_type_variant): Likewise. - -1998-10-22 Martin von Löwis - - * parse.y (named_class_head): Push into class while parsing the - base class list. - * decl2.c (push_scope, pop_scope): New functions. - * cp-tree.h: Declare them. - * init.c (build_new_1): Delay cleanup until end of full expression. - -1998-10-21 Jason Merrill - - * typeck.c (build_component_ref): Use of a type here is an error. - -1998-10-19 Jason Merrill - - Revamp references to member functions. - * method.c (hack_identifier): Call build_component_ref for a - reference to a member function. - * typeck.c (build_component_ref): Only return a single function - if it's static. Otherwise, return a COMPONENT_REF. - (build_x_function_call): Handle a COMPONENT_REF. - (build_unary_op): Handle all unknown-type things. - * decl2.c (arg_assoc): Handle COMPONENT_REF. - * class.c (instantiate_type): Complain if the function we get is a - nonstatic member function. Remove code for finding "compatible" - functions. - * pt.c (tsubst_copy): Handle NOP_EXPR. - * tree.c (build_dummy_object): New fn. - (maybe_dummy_object): New fn. - (is_dummy_object): New fn. - * cp-tree.h: Declare them. - * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object. - * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object. - * init.c (build_member_call): Use maybe_dummy_object and - is_dummy_object. - (build_offset_ref): Use maybe_dummy_object. - (resolve_offset_ref): Use is_dummy_object. - * typeck.c (build_x_function_call): Call build_dummy_object. - (unary_complex_lvalue): Call is_dummy_object. - - * typeck.c (build_component_addr): Make sure field is a field. - - * call.c (build_new_op): Delete obsolete code. - - * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args. - -1998-10-18 Martin von Löwis - - * decl2.c (validate_nonmember_using_decl): Fix using-directives of - std if std is ignored. - -1998-10-18 Jason Merrill - - * decl.c (grokvardecl): Fix thinko. - - * decl.c (grokdeclarator): Embedded attrs bind to the right, - not the left. - - * parse.y (fn.def2): Fix 'attrs' format. - -1998-10-18 Alastair J. Houghton - - * Makefile.in (CONFLICTS): Update. - * parse.y (expr_or_declarator_intern): New rule. - (expr_or_declarator, direct_notype_declarator, primary, - functional_cast): Use it. - (notype_declarator_intern): New rule. - (notype_declarator, complex_notype_declarator): Use it. - -1998-10-17 Jason Merrill - - * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate. - (grokvardecl): Likewise. - -Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi - - * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR). - (add_method): Likewise for arguments 1 & 2 of `bcopy'. - - * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN. - - * pt.c (process_partial_specialization): Cast 1st argument of - `bzero' to (PTR). - - * tree.c (build_base_fields): Cast `base_align' to (int) when - comparing against one. - -1998-10-16 Mark Mitchell - - * decl.c (lookup_name_real): Handle template parameters for member - templates where said parameters have the same name as the - surrounding class. - - * decl.c (expand_static_init): Build cleanups before entering the - anonymous function used to do them to avoid access-checking - confusion. - - * decl.c (grokfndecl): Add back call to cplus_decl_attributes - accidentally removed by previous change, and make DECL_RTL here. - * class.c (add_method): Don't make DECL_RTL here. - - * pt.c (for_each_template_parm): Don't examine uninstantiated - default arguments. - -1998-10-16 Dave Brolley - - * lex.c (real_yylex): Fix unaligned access of wchar_t. - -1998-10-16 Mark Mitchell - - * class.c (add_method): Fix documentation to reflect previous - changes. Check for duplicate method declarations here. - * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL - correctly; such things never match. - (grokfndecl): Don't look for duplicate methods here. - * decl2.c (check_classfn): Don't assume names are mangled. - Don't add bogus member function declarations to a class before the - class type is complete. - (grokfield): Reformat error message. - * method.c (set_mangled_name_for_decl): Don't mangle names while - processing_template_decl. - -1998-10-16 Jason Merrill - - * typeck.c (build_indirect_ref): Complain about a pointer to data - member, too. - * typeck2.c (build_m_component_ref): Don't indirect a pointer to - data member. - * init.c (resolve_offset_ref): Don't undo the above. - - * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros. - (struct lang_decl_flags): Add `bitfield'. - * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of - DECL_BIT_FIELD. - * decl2.c (grokbitfield, grok_alignof): Likewise. - * init.c (build_offset_ref): Likewise. - * typeck.c (build_component_addr, expr_sizeof): Likewise. - * cvt.c (build_up_reference): Don't crash if taking the address - returns error_mark_node. - - * decl.c (grokfndecl): Also check ctype when checking for ::main(). - -1998-10-15 Jason Merrill - - * decl.c (grokfndecl): ::main and __builtin_* get C linkage. - Do mangling here. - (grokdeclarator): Instead of here. - * friend.c (do_friend): Lose special handling of ::main and - __builtin_*. - * cp-tree.h (DECL_MAIN_P): Check for C linkage. - - * spew.c (yylex): Clear looking_for_typename if we got - 'enum { ... };'. - -1998-10-15 Mark Mitchell - - * class.c (maybe_warn_about_overly_private_class): Improve error - messages for class with only private constructors. - - * cp-tree.def (TYPENAME_TYPE): Add to documentation. - * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document. - (build_typename_type): New function. - * decl.c (build_typename_type): Broken out from ... - (make_typename_type): Use it. - * search.c (lookup_field): Likewise. - -1998-10-14 Benjamin Kosnik - - * pt.c (convert_nontype_argument): Check against type_referred_to. - * decl.c (grokvardecl): Check for declarator name before building - DECL_ASSEMBLER_NAME. - -1998-10-14 Mark Mitchell - - * pt.c (lookup_template_class): Add comment. - (instantiate_class_template): Don't mark the _TYPE node for - member class templates as an instantiation. - -1998-10-14 Jason Merrill - - * decl.c (grokfndecl): Fix my thinko. - -1998-10-13 Jason Merrill - - * tinfo2.cc (fast_compare): Remove. - (before): Just use strcmp. - * tinfo.cc (operator==): Just use strcmp. - -1998-10-13 Klaus-Georg Adams - - * decl.c (grokfndecl): Don't check for linkage in `extern "C"' - declarations. - -1998-10-13 Mark Mitchell - - * cp-tree.h (specializations_of_same_template_p): Remove. - * search.c (get_template_base): Don't use it. - (get_template_base_recursive): Likewise. - * pt.c (specializations_of_same_template_p): Remove. - (unify): Don't use it. - (lookup_template_class): Find the correct parent when setting - CLASSTYPE_TI_TEMPLATE. - -1998-10-12 Jason Merrill - - * tinfo.cc (operator==): Always compare names. - -1998-10-12 Herman ten Brugge - - * decl.c (start_function): Fix cut-and-paste error. - -1998-10-12 Jason Merrill - - * inc/typeinfo: Add #pragma interface. - (operator!=): Just call operator==. - * tinfo.cc: Add #pragma implementation. - (operator==): Move from inc/typeinfo and tinfo2.cc. - Check __COMMON_UNRELIABLE instead of _WIN32. - - * typeck2.c (my_friendly_abort): Add URL. - -1998-10-12 Alastair J. Houghton - - * decl.c (start_method): Added extra parameter for attributes. - * cp-tree.h (start_method): Update prototype. - * parse.y (fn.def2): Update start_method parameter list. - -1998-10-11 Mark Mitchell - - * cp-tree.h (specializations_of_same_template_p): Declare. - * pt.c (specializations_of_same_template_p): New function. - (unify): Use it. - * search.c (get_template_base): Use it. - (get_template_base_recursive): Likewise. - -1998-10-10 Manfred Hollstein - - * decl2.c (start_objects): Add new variable `joiner' and - initialize it properly. - -1998-10-09 Mark Mitchell - - * search.c (expand_upcast_fixups): Tweak to match 1998-10-07 - change to vtable types. - - * cvt.c (ocp_convert): Avoid infinite recursion caused by - 1998-10-03 change. - -1998-10-08 Jason Merrill - - * pt.c (resolve_overloaded_unification): New fn. - (try_one_overload): Likewise. - (unify): Don't fail on unknown type. - (type_unification_real): Likewise. Use resolve_overloaded_unification - to handle an overloaded argument. - (template_args_equal): Split out... - (comp_template_args): From here. - (determine_specialization): Also allow a template with more - parms than were explicitly specified. - * cp-tree.h: Add template_args_equal. - * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code. - -Thu Oct 8 15:58:30 1998 Anthony Green - - * semantics.c (finish_asm_stmt): Revert my 1998-09-28 - change. - -Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com) - - * typeck.c (unsigned_type): Only return TItype nodes when - HOST_BITS_PER_WIDE_INT is >= 64 bits. - (signed_type): Likewise. - * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare - when HOST_BITS_PER_WIDE_INT is >= 64 bits. - (init_decl_processing): Only create TItype nodes when - HOST_BITS_PER_WIDE_INT is >= 64 bits. - * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare - when HOST_BITS_PER_WIDE_INT is >= 64 bits. - -Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi - - * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf. - (gxx.gperf): Update comments describing invocation flags. - (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs). - -1998-10-07 Mark Mitchell - - * class.c (finish_struct_1): Add commentary on previous change. - - * cp-tree.h (vtbl_ptr_type_node): New variable. - * class.c (build_vtbl_ref): Don't indirect through the vptr; it's - already of the right type. - (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node. - Simplify code to grow vtable. - * decl.c (vtbl_ptr_type_node): Define. - (init_decl_processing): Initialize it. - -1998-10-06 Mark Mitchell - - * cp-tree.def (PTRMEM_CST): New tree node. - * cp-tree.h (ptrmem_cst): New type. - (lang_type): Remove local_typedecls. - (dummy): Increase to 12 bits from 11. - (CLASSTYPE_LOCAL_TYPEDECLS): Remove. - (PTRMEM_CST_CLASS): New macro. - (PTRMEM_CST_MEMBER): Likewise. - (current_access_specifier): New variable. - (current_class_type): Remove duplicate declaration. - (finish_struct): Change prototype. - (unreverse_member_declarations): New function. - (pushdecl_class_level): Change prototype. - (grok_enum_decls): Remove. - (fixup_anonymous_union): New function. - (grok_x_components): Change prototype. - (tsubst_chain): Remove. - (finish_member_template_decl): Likewise. - (check_explicit_specialization): Fix indentation. - (finish_class_definition): Change prototype. - (finish_member_class_template): Likewise. - (finish_member_declaration): New function. - (check_multiple_declarators): Likewise. - * class.c (class_stack_node_t): New type. - (current_class_base): Remove. - (current_class_stack): Change type. - (current_access_specifier): New variable. - (grow_method): Remove. - (check_member_decl_is_same_in_complete_scope): Break out from - finish_struct. - (make_method_vec): New function. - (free_method_vec): Likewise. - (add_implicitly_declared_members): Break out from finish_struct_1. - (free_method_vecs): New variable. - (add_method): Rework for direct use from parser. - (handle_using_decl): Watch for NULL_TREE while iterating through - CLASSTYPE_METHOD_VEC. - (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here; - just do some error-checking. - (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC. - (finish_struct_1): Simplify. Use add_implicitly_declared_members. - (finish_struct): Change prototype. Simplify; fields and methods - are already set up at this point. - (init_class_processing): Set up current_class_stack. - (pushclass): Save current_access_specifier. - (popclass): Restore it. - (currently_open_class): Simplify. - (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS. - * decl.c (saved_scope): Add access_specifier. - (maybe_push_to_top_level): Save it. - (pop_from_top_level): Restore it. - (maybe_process_template_type_declaration): Use - finish_member_declaration. - (pushtag): Likewise. - (pushdecl_class_level): Don't return a value. - (fixup_anonymous_union): Break out from grok_x_components. - (shadow_tag): Use it. - (xref_tag): Complain about using an elaborated type specifier to - reference a template type parameter or typedef name. - (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS. - (current_local_enum): Remove. - (build_enumerator): Call finish_member_declaration. - (grok_enum_decls): Remove. - * decl2.c (grok_x_components): Simplify. - (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC. - (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS. - (merge_functions): Add to comment. - (arg_assoc_type): Prototype. - (arg_assoc): Pass as many arguments as there are parameters. - * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of - OFFSET_REF. - * expr.c (cpls_expand_expr): Remove dead code. Handle - PTRMEM_CST. - * friend.c (do_friend): Lookup friends when in nested classes. - Change comments. - * init.c (build_offset_ref): Do lookup even for classes that are - only partially defined. - (decl_constant_value): Remove dead code. - * method.c (build_overload_value): Remove hack where by TYPE was - not a TYPE. Handle PTRMEM_CST. - (build_template_parm_names): Don't pass a PARM_DECL where a TYPE - should go. - * parse.y (components, notype_components, component_decl, - component_decl_1, component_declarator, component_declarator0): - Now all are itype rather than ttype. Rework to add members to - classes on the fly. - (typesqpecqual_reserved): Use check_multiple_declarators. - (structsp): Update class to finish_class_definition. - (do_xref_defn): Unsplit into named_class_head. - (access_specifier): Set current_access_specifier. - * pt.c (set_current_access_from_decl): New function. - (finish_member_template_decl): Don't take the parameters. - (comp_template_args): Make more robust. - (lookup_template_class): Don't use current_local_enum. - (for_each_template_parm): Handle PTRMEM_CST. - (instantiate_class_template): Use set_current_access_from_decl, - finish_member_declaration and unreverse_member_declarations. Set - lineno/input_filename before generating implicit member functions. - (type_unification_real): Don't assume back-unification happens - only for the last argument. - (regenerate_decl_from_template): Call pushclass a bit earlier. - (tsubst_chain): Remove. - (tsubst_enum): Use set_current_access_from_decl. - (set_mangled_name_for_template_decl): Fix indentation. - * search.c (lookup_fnfields_1): Change iteration through - CLASSTYPE_METHOD_VEC. - (dfs_pushdecls): Likewise. - (dfs_compress_decls): Likewise. - (add_conversions): Likewise. - * semantics.c (finish_class_definition): Don't take components. - Change call to finish_struct. - (finish_member_declaration): New function. - (finish_member_class_template): Don't take template parameters. - Change call to grok_x_components. Call finish_member_template_decl. - (check_multiple_declarators): New function. - * sig.c (append_signature_fields): Work from the TYPE_METHODS, not - a passed in fieldlist. - * tree.c (search_tree): Handle PTRMEM_CST. - (mapcar): Likewise. - * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not - INTEGER_CSTs, for pointer-to-data members. - - * call.c (resolve_args): Resolve template specializations, if - possible. - -Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi - - * Makefile.in (spew.o): Depend on toplev.h. - - * call.c (compare_ics): Initialize variables `deref_from_type2', - `deref_to_type1' and `deref_to_type2'. - - * except.c (get_eh_type): Hide prototype and definition. - (process_start_catch_block_old): Remove unused static prototype. - - * pt.c (tsubst_decl): Initialize variable `argvec'. - - * spew.c: Include toplev.h. - -1998-10-05 Jason Merrill - - * pt.c (instantiate_decl): Do save and restore file position. - -1998-10-05 Martin von Löwis - - * method.c (build_decl_overload_real): Clear - numeric_output_need_bar after __. - -1998-10-05 Nathan Sidwell - - * call.c (build_new_method_call): Issue 'incomplete type' error, - if class is not defined. - -1998-10-05 Kaveh R. Ghazi - - * call.c (build_object_call): Move declaration of variable - `fn' into the scope where it is used. Don't access variable - `fn' when it is uninitialized, instead use `fns'. - -1998-10-04 Theodore Papadopoulo - - * errfn.c (cp_thing): Print buf as a string not as a printf format - to avoid problems with the operator%. Consequently, `%%' sequences - in format are copied as `%' in buf. - -1998-10-04 Jason Merrill - - * pt.c (pop_tinst_level): Call extract_interface_info. - (instantiate_decl): Don't save and restore file position. - - * decl.c (cp_finish_decl): Make statics in extern inlines and - templates common, if possible and the target doesn't support weak - symbols. - - * decl.c (grokdeclarator): Remove redundant calls to - build_type_variant and some duplicated code. - * sig.c (build_signature_reference_type): Only take the type parm. - (build_signature_pointer_type): Likewise. - * tree.c (build_cplus_method_type): Adjust. - * cp-tree.h: Update. - -1998-10-04 Mark Mitchell - - * call.c (build_over_call): Make pedwarns about dropped qualifiers - into full-fledged errors. - * cvt.c (convert_to_reference): Likewise. - * typeck.c (convert_for_assignment): Likewise. - - * search.c (expand_upcast_vtables): In addition to unsetting - TREE_READONLY, remove top-level const type qualifier. - -1998-10-03 Mark Mitchell - - * class.c (current_class_ptr, current_class_ref): Clarify - documentation. - * cvt.c (ocp_convert): Don't expect fold to remove all trivial - NOP type conversions. - * decl.c (decls_match): Use comptypes directly; ignore - qualifiers on the DECL. - (duplicate_decls): Remove qualifier checks on DECL. - (grokdeclarator): Make the type built up include top-level - qualifiers. - * decl2.c (do_dtors): Fix spelling error. - * error.c (dump_simple_decl): Don't look at qualifiers on the decl - when printing type information. - * init.c (build_new_1): Add documentation. Deal with the fact - that type of allocated memory now contains qualifiers. - * lex.c (is_global): Improve error-recovery. - * sig.c (build_member_function_pointer): Don't cast away const - on fields of sigtable_entry_type. - * tree.c (lvalue_type): Don't look at top-level qualifiers on - expressions. - * typeck.c (decay_conversion): Likewise. - (build_component_ref): Make sure the type of the COMPONENT_REF - contains top-level qualifiers, as appropriate. Improve - error-handling. - (build_indirect_ref): Simplify. Don't strip top-level qualifiers. - (build_array_ref): Likewise. - (build_unary_op): Improve error-recovery. - (unary_complex_lvalue): Make taking the address a bound member - function an error, not a sorry. - (build_conditional_expr): Look at the type qualifiers, not the - qualifiers on the expression itself. - -1998-10-03 Jason Merrill - - * decl2.c (merge_functions): Remove duplicates. - - * decl2.c: Add -f{no-,}implicit-inline-templates. - (import_export_decl): Check it. - - * decl.c (lookup_name_real): Template parms also take precedence - over implicit typename. Only warn if yylex. - - * typeck.c (build_conditional_expr): Only fold if ifexp is an - INTEGER_CST. - - * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN - instead of linkage. - -1998-10-01 Jason Merrill - - * cp-tree.h (FORMAT_VBASE_NAME): New macro. - * class.c (build_vbase_pointer): Use it. - * rtti.c (expand_class_desc): Likewise. - * tree.c (build_vbase_pointer_fields): Likewise. - -Thu Oct 1 10:43:45 1998 Nick Clifton - - * decl.c (start_decl): Add invocation of - SET_DEFAULT_DECL_ATTRIBUTES, if defined. - (start_function): Add invocation of - SET_DEFAULT_DECL_ATTRIBUTES, if defined. - - * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with - HANDLE_GENERIC_PRAGMAS. - -1998-09-28 Anthony Green - - * semantics.c (finish_asm_stmt): Always permit volatile asms. - -1998-09-28 Mark Mitchell - - * decl.c (grokdeclarator): Tighten checks for invalid - destructors. Improve error-messages and error-recovery. - * decl2.c (check_classfn): Don't assume that mangled destructor - names contain type information. - -1998-09-25 Jason Merrill - - * search.c (get_base_distance): Remove assert. - - * decl2.c (build_anon_union_vars): Don't process a field with no - name. - (finish_anon_union): Also complain about local anon unions with no - members. - -1998-09-25 Martin von Löwis - - * decl.c (lookup_namespace_name): If the name is a namespace, - return it immediately. - -Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi - - * cp-tree.h (define_case_label): Remove unused parameter. - (check_java_method): Likewise. - (grokclassfn): Likewise. - (expand_aggr_init): Likewise. - (build_x_delete): Likewise. - (maybe_end_member_template_processing): Likewise. - (unshare_base_binfos): Add prototype. - (string_conv_p): Likewise. - (my_friendly_abort): Mark with ATTRIBUTE_NORETURN. - - * cvt.c (build_up_reference): Remove unused parameter - `checkconst', all callers changed. - (build_type_conversion): Mark parameter `code' with - ATTRIBUTE_UNUSED. - (build_expr_type_conversion): Initialize variable `conv'. - - * decl.c (push_namespace): Initialize variable `d'. - (define_case_label): Remove unused parameter `decl', all callers - changed. - - * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter - `argc' with ATTRIBUTE_UNUSED. - (grokclassfn): Remove unused parameter `cname', all callers - changed. - (check_java_method): Likewise for parameter `ctype'. - (copy_assignment_arg_p): Mark parameter `virtualp' with - ATTRIBUTE_UNUSED. - (finish_prevtable_vardecl): Likewise for parameter `prev'. - - * expr.c (extract_init): Likewise for parameters `decl' and `init'. - - * init.c (expand_aggr_init_1): Remove unused parameter - `alias_this', all callers changed. - (expand_aggr_init): Likewise. - (expand_default_init): Likewise. - (build_new_1): Initialize variable `susp'. - (build_x_delete): Remove unused parameter `type', all callers - changed. - - * lex.c (set_typedecl_interface_info): Mark parameter `prev' with - ATTRIBUTE_UNUSED. - (readescape): Use (unsigned) value in shift. - (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when - comparing to a signed quantity. - - * pt.c (maybe_end_member_template_processing): Remove unused - parameter `decl', all callers changed. - (check_explicit_specialization): Add braces around empty body in - an else-statement. - (current_template_args): Initialize variable `args'. - (lookup_template_class): Likewise for variable `prev_local_enum'. - (tsubst_decl): Likewise for variable `r'. - (set_mangled_name_for_template_decl): Initialize variable - `context'. - - * spew.c (scan_tokens): Change type of parameter `n' to unsigned. - Likewise for variable `i'. - (yylex): Initialize variable `trrr'. - - * typeck.c (compparms): Mark variable `strict' with - ATTRIBUTE_UNUSED. - - * xref.c (simplify_type): Cast argument of ctype function to - `unsigned char'. - -1998-09-24 Mark Mitchell - - * cp-tree.h (language_lvalue_valid): Remove. - * decl.c (grokdeclarator): Don't disallow references to functions. - * tree.c (lvalue_p_1): New function, combining duplicated - code from ... - (lvalue_p): Use it. - (real_lvalue_p): Likewise. - * typeck.c (language_lvalue_valid): Remove. - (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though - they don't have TREE_READONLY set. - * typeck2.c (readonly_error): Add case for FUNCTION_DECLs. - -1998-09-24 Benjamin Kosnik - - * spew.c (yylex): Give diagnostic. - * hash.h (is_reserved_word): Add export. - * gxx.gperf: Likewise. - * lex.h (rid): Add RID_EXPORT. - * lex.c (init_parse): Likewise. - -Tue Sep 22 21:01:19 1998 Gerald Pfeifer - - * friend.c (do_friend): Make warning a full sentence. - -1998-09-22 Mark Mitchell - - * parse.y (component_decl_list): Improve error-recovery. - -1998-09-22 Benjamin Kosnik - - * decl.c (make_typename_type): Move error to point where name - variable can be used by dump_type. - -1998-09-22 Mark Mitchell - - * decl.c (grokfndecl): Improve error-recovery. - * decl2.c (grokfield): Likewise. - * pt.c (finish_member_template_decl): Likewise. - -1998-09-20 Martin von Löwis - - * method.c (hack_identifier): Finding multiple members is always - an error. - -1998-09-21 Per Bothner - - * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o. - -Mon Sep 21 01:53:05 1998 Felix Lee - - * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT (). - -1998-09-20 Mark Mitchell - - * class.c (maybe_warn_about_overly_private_class): Reformat. - -1998-09-17 Andrew MacLeod - - * exception.cc (__cplus_type_matcher): Realign some code. - -1998-09-16 Mark Mitchell - - * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling. - (tinfo2.o): Likewise. - (exception.o): Likewise. - (new.o): Likewise. - (opnew.o): Likewise. - (opnewnt.o): Likewise. - (opvnew.o): Likewise. - (opvnewnt.o): Likewise. - (opdel.o): Likewise. - (opdelnt.o): Likewise. - (opvdel.o): Likewise. - (opvdelnt.o): Likewise. - -1998-09-16 Richard Henderson - - * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp. - -1998-09-15 Alexandre Oliva - - * call.c (build_field_call): Handle static data members too. - - * typeck.c (comptypes): When comparing pointer types, check - whether referred types match even in strictest modes. - -1998-09-15 Mark Mitchell - - * cp-tree.h: Revert previous change. - (finish_struct_methods): Remove declaration. - * class.c: Revert previous change. - (maybe_warn_about_overly_private_class): New function. - (finish_struct_methods): Declare here, and make static. Remove - unnecessary parameters. Tidy slightly. Use - maybe_warn_about_overly_private_class. - (finish_struct_1): Adjust. Remove check for private constructors, - now done elsewhere. - (finish_struct): Adjust. - -1998-09-15 Andrew MacLeod - - * except.c (expand_start_catch_block): No need to check for new - exception model. - (process_start_catch_block_old): Deleted. - (process_start_catch_block): Add call to start_decl_1(). - (expand_end_catch_block): Add call to end_catch_handler(). - * exception.cc (__cplus_type_matcher): Only check the exception - language if there is an exception table. - -1998-09-15 Andrew MacLeod - - * search.c (expand_indirect_vtbls_init): Mark temporary stack slots - as used to prevent conflicts with virtual function tables. - -1998-09-14 Mark Mitchell - - * cp-tree.h (lang_type): Add has_non_private_static_mem_fn. - (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it. - * class.c (maybe_class_too_private_p): New function. - (finish_struct_methods): Use it. - (finish_struct_1): Likewise. - (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if - appropriate. - - * pt.c (check_specialization_scope): Fix spelling error. - (check_explicit_specialization): Remove code to handle explicit - specializations in class scope; they are now correctly diagnosed - as errors. - -1998-09-10 Mark Mitchell - - * decl.c (pushdecl): Don't copy types if the - DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the - type. - -1998-09-09 Kriang Lerdsuwanakij - - * class.c (get_enclosing_class): New function. - (is_base_of_enclosing_class): Likewise. - * cp-tree.h (get_enclosing_class): Declare. - (is_base_of_enclosing_class): Likewise. - * pt.c (coerce_template_parms): Use them. - -1998-09-09 Jason Merrill - - * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is - null to decide whether to use it. - - * error.c (dump_type_real): Handle NAMESPACE_DECL. - * parse.y (base_class.1): Avoid crash on error. - -1998-09-08 Martin von Löwis - - * decl.c (make_typename_type): If context is a namespace, the code - is in error. - -1998-09-08 Mumit Khan - - * parse.y (nomods_initdcl0): Set up the parser stack correctly. - -1998-09-08 Mark Mitchell - - * cp-tree.h (anonymous_namespace_name): Declare. - * decl.c: Define it. - (push_namespace): Use anonymous_namespace_name, rather than local - static anon_name. - * error.c (dump_decl): If a namespace is named - anonymous_namespace_name, call it {anonymous}. - - * decl.c (grokparms): Distinguish between references and pointers - in error message. - -1998-09-08 Richard Henderson - Mark Mitchell - - * pt.c (process_partial_specialization): Consistently allocate - and zero tpd.parms based on ntparms. Use tpd2.parms, not - tpd.parms, where appropriate. - -Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (INCLUDES): Update after recent toplevel gcc - reorganizations. - -1998-09-05 Mark Mitchell - - * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove. - * class.c (finish_struct): Remove hackery to deal with explicit - specializations in class scope. - * decl.c (grokfndecl): Improve error-recovery. - * decl2.c (grokfield): Likewise. - * pt.c (check_specialization_scope): New function. - (begin_specialization): Call it. - (process_partial_specialization): New function, split out from - push_template_decl. Check partial specializations more - stringently. - (push_template_decl): Call it. - (check_explicit_specialization): Don't attempt to handle explicit - specializations in class scope. - (template_parm_data): Document. Add current_arg and - arg_uses_template_parms. - (mark_template_parm): Set it. - (tsubst_arg_types): Remove unused variable. - * semantics.c (begin_class_definition): Tweak. - -1998-09-04 Mark Mitchell - - * inc/typeinfo (type_info::type_info(const char*)): Make - `explicit'. - - * cp-tree.h (hash_tree_cons_simple): New macro. - * pt.c (tsubst_arg_types): New function. Use hash_tree_cons. - (coerce_template_parms): Use make_temp_vec, instead of - make_tree_vec. Document this behavior. - (lookup_template_class): Likewise. - (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types. - Remove dead code (and add assertion to check its deadness). Fix - bug w.r.t. exception specifications. - -1998-09-03 Jason Merrill - - * decl2.c (import_export_vtable): Always make artificials comdat. - (import_export_decl): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - -1998-09-03 Mark Mitchell - - * cp-tree.h (finish_globally_qualified_member_call_expr): - Rename to ... - (finish_qualified_call_expr). - * semantics.c: Likewise. - * parse.y (primary): Use it. - * method.c (hack_identifier): Remove redundant code. - - * init.c (resolve_offset_ref): Call convert_from_reference to - handle members of reference type. Improve error recovery. - -1998-09-03 Benjamin Kosnik - - * cp-tree.h: Declare warn_nontemplate_friend. - * decl2.c (lang_decode_option): Set. - * lang-options.h: Add -Wnon-template-friend. - * friend.c (do_friend): Use to toggle non-template function warning. - -1998-09-03 Mark Mitchell - - * decl.c (finish_enum): Don't resolve CONST_DECLs to their - corresponding INTEGER_CSTs when processing_template_decl. - * pt.c (tsubst_enum): Tweak accordingly. - -1998-09-03 Benjamin Kosnik - - * decl.c (pushdecl_class_level): Add warning here. - (pushdecl): Tweak. - -1998-09-02 Jason Merrill - - * cvt.c (convert_pointer_to_real): Tidy. - * search.c (get_base_distance_recursive): Simplify. - (get_base_distance): Likewise. - - * pt.c (unify): Only special-case INTEGER_TYPE if it uses template - parms. - -Wed Sep 02 09:25:29 1998 Nick Clifton - - * lex.c (check_newline): Call HANDLE_PRAGMA before - HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages - if unknown pragmas are encountered. - (handle_sysv_pragma): Interpret return code from - handle_pragma_token (). Return success/failure indication rather - than next unprocessed character. - (pragma_getc): New function: retrieves characters from the - input stream. Defined when HANDLE_PRAGMA is defined. - (pragma_ungetc): New function: replaces characters back into the - input stream. Defined when HANDLE_PRAGMA is defined. - -1998-09-01 Jason Merrill - - * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands. - * class.c (build_vtable_entry_ref): Likewise. - -1998-09-01 Mark Mitchell - - * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro. - * decl2.c (import_export_decl): Likewise. - * pt.c (instantiate_decl): Use it. - -1998-09-01 Jason Merrill - - * decl.c (lookup_name_real): Also do implicit typename thing for - artificial TYPE_DECLs. - * search.c (lookup_field): Likewise. - (lookup_fnfields, lookup_field): Adjust for implicit typename kludge. - * semantics.c (begin_constructor_declarator): Use enter_scope_of. - (enter_scope_of): Extract type from implicit typename. - (begin_class_definition): Likewise. - * lex.c (identifier_type): Handle implicit typename when checking - for SELFNAME. - - * cp-tree.h: Declare flag_strict_prototype. - * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if - -fstrict-prototype. - * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't - specified, set it to the value of pedantic. - -1998-09-01 Mark Mitchell - - * decl2.c (arg_assoc): Handle template-id expressions as arguments. - -1998-08-31 Mark Mitchell - - * decl.c (finish_enum): Handle member enums of classes declared in - template functions. - - * decl2.c (grok_x_components): Strip attributes before calling - groktypename. - -1998-08-31 Jason Merrill - - * cp-tree.h, decl2.c: Remove support for -fall-virtual, - -fenum-int-equivalence and -fno-nonnull-objects. - * class.c (check_for_override): Remove support for -fall-virtual. - (finish_struct_1): Likewise. - * call.c (build_new_op): Remove support for -fenum-int-equivalence. - * typeck.c (build_binary_op_nodefault): Likewise. - * cvt.c (ocp_convert): Likewise. - * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects. - * class.c (build_vbase_path): Likewise. - -Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org) - - * Makefile.in (INTERFACE): New, set to 1. - -1998-08-30 Mark Mitchell - - * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when - comparing with global_namespace. - (dump_aggr_type): Likewise. - - * decl.c (grokfndecl): Issue error on declaration of friend - templates with explicit template arguments. - - * pt.c (convert_template_argument): New function, split out - from... - (coerce_template_parms): Here. - (tsubst): Attempt better error-recovery. - -1998-08-28 Benjamin Kosnik - - * pt.c (decl_template_parm_p): Add checks for - TEMPLATE_TEMPLATE_PARM. - -1998-08-28 Mark Mitchell - - * lex.c (do_identifier): Fix thinko in previous change. - -1998-08-28 Jason Merrill - - * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns. - * decl2.c (output_vtable_inherit): Call binfo_for_vtable. - -1998-08-28 Richard Henderson - - Add support for discarding unused virtual functions. - * lang-options.h: Add -fvtable-gc. - * cp-tree.h: Add flag_vtable_gc. - * decl2.c (output_vtable_inherit): New fn. - (finish_vtable_vardecl): Call it. - * class.c (build_vtable_entry_ref): New fn. - (build_vtbl_ref): Call it. - -1998-08-28 Mark Mitchell - - * cp-tree.h (build_enumerator): Take the enumeration type as a - parameter. - * decl.c (finish_enum): Don't set the TREE_TYPE for the - enumeration constant values if we're processing_template_decls. - Don't set the type for the CONST_DECLs either; that's done in - build_enumerator. - (build_enumerator): Take the enumeration type as a - parameter. - * lex.c (do_identifier): Don't resolve enumeration constants while - processing template declarations, even if they happen to be - TEMPLATE_PARM_INDEXs. - - * parse.y (current_enum_type): New variable. - (primary): Don't allow statement-expression in local classes just - as we don't in global classes. - (structsp): Use current_enum_type. - (enum_list): Likewise. - * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by - finish_enum; they no longer occur. - - * cp-tree.h (finish_base_specifier): New function. - * parse.y (base_class): Use it. - * semantics.c (finish_base_specifier): Define it. - - * parse.y (structsp): Warn on use of typename outside of template - declarations. - -1998-08-27 Jason Merrill - - * lex.c (handle_cp_pragma): Remove #pragma vtable. - * lang-options.h: Remove +e options. - * decl2.c (lang_decode_option): Likewise. - (import_export_vtable): Don't check write_virtuals. - (finish_vtable_vardecl, finish_file): Likewise. - * search.c (dfs_debug_mark): Likewise. - * semantics.c (begin_class_definition): Likewise. - * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise. - - * call.c (build_over_call): Check flag_elide_constructors. - * decl2.c: flag_elide_constructors defaults to 1. - * typeck.c (convert_arguments): Remove return_loc parm. - (build_function_call_real): Adjust. - - * search.c: Tear out all mi_matrix and memoize code. - (lookup_field, lookup_fnfields): Use scratch_tree_cons. - * lang-options.h: Remove documentation for -fhandle-exceptions, - -fmemoize-lookups and -fsave-memoized. - * cp-tree.h: Lose mi_matrix and memoize support. - * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized. - * class.c: Lose struct class_level. - (pushclass, popclass): Lose memoize support. - * init.c (build_offset_ref): Likewise. - - Never change BINFO_INHERITANCE_CHAIN. - * init.c (emit_base_init): Change modification of - BINFO_INHERITANCE_CHAIN to an assert. - * search.c (get_base_distance_recursive): Likewise. - (get_base_distance): Likewise. - (lookup_member): Likewise. - (convert_pointer_to_single_level): Likewise. - (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs. - (lookup_fnfields): Likewise. - * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos. - (unshare_base_binfos): Don't call propagate_binfo_offsets. - (layout_basetypes): Call propagate_binfo_offsets instead of - unshare_base_binfos. - * decl.c (xref_basetypes): Call unshare_base_binfos. - * pt.c (instantiate_class_template): Likewise. - * tree.c (reverse_path): Remove 'copy' parm; always make a - temporary copy. - * class.c (build_vbase_path): Just call it. - * search.c (compute_access): Likewise. Don't re-reverse. - -1998-08-27 Mark Mitchell - - * class.c (build_vbase_path): Use reverse_path. - (finish_base_struct): Move warnings for inaccessible bases to - layout_basetypes. - (modify_one_vtable): Remove check of TREE_USED (binfo). - (fixup_vtable_deltas1): Likewise. - * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here. - (xref_tag): Remove binfos parameter. - (make_binfo): Remove chain parameter. - (reverse_path): Add copy parameter. - * decl.c (init_decl_processing): Change calls to xref_tag. - (xref_tag): Remove binfos parameter. - (xref_basetypes): Change calls to make_binfo. - * decl2.c (grok_x_components): Change calls to xref_tag. - (handle_class_head): Likewise. - * friend.c (do_friend): Likewise. - * lex.c (make_lang_type): Change calls to make_binfo. - * parse.y (structsp): Change calls to xref_tag. - (named_complex_class_head_sans_basetype): Likewise. - (named_class_head): Likewise. - * rtti.c (init_rtti_processing): Likewise. - * search.c (compute_access): Change calls to reverse_path. - (dfs_get_vbase_types): Change calls to make_binfo. - (get_vbase_types): Remove dead code. - * tree.c (unshare_base_binfos): Change calls to make_binfo. - (layout_basetypes): Warn here about inaccessible bases. - (make_binfo): Remove chain parameter. - (reverse_path): Add copy parameter. - -1998-08-27 Jason Merrill - - * class.c: #if 0 complete_type_p. - * init.c (build_java_class_ref, build_new_1): Remove unused locals. - * method.c (process_overload_item): Likewise. - * typeck.c (comp_target_types): Likewise. - - Stop sharing binfos for indirect virtual bases. - * tree.c (propagate_binfo_offsets): Unshare vbases, too. - (layout_basetypes): Likewise. - (unshare_base_binfos): Copy vbases, too. - * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED, - BINFO_VBASE_INIT_MARKED): Remove obsolete macros. - (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED, - CLEAR_BINFO_PUSHDECLS_MARKED): New macros. - * search.c (lookup_field, lookup_fnfields, lookup_member): Remove - reference to BINFO_VIA_PUBLIC. - (marked_pushdecls_p, unmarked_pushdecls_p): New fns. - (push_class_decls): Use them. - (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED. - (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED. - -1998-08-27 Mark Mitchell - - * decl.c (build_enumerator): Set DECL_CONTEXT for the - CONST_DECLs. - -1998-08-26 Mark Mitchell - - * cp-tree.h (finish_enum): Change prototype. - * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a - VALUES parameter. Don't try to compute mins/maxs if - processing_template_decl. - * parse.y (structsp): Use new calling sequence for finish_enum. - * pt.c (tsubst_enum): Likewise. Take the new type as input. - (lookup_template_class): Remove unused variables. Tweak. - Register enums on instantiation list before substituting - enumeration constants. - (tsubst_decl): Remove unused variables. - (regenerate_decl_from_template): Likewise. - - * decl.c (duplicate_decls): Don't obliterate the - DECL_TEMPLATE_INFO for a template if we're not replacing it with - anything. - - * lex.c (do_identifier): Fix typo in comment. - -Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi - - * errfn.c: Remove stdarg.h/varargs.h. - * tree.c: Likewise. - -1998-08-25 Brendan Kehoe - - * pt.c (tsubst_copy): Only do typename overloading on an - IDENTIFIER_NODE that happens to look like a typename if it actually - has a type for us to use. - -1998-08-25 Jason Merrill - - * typeck.c (comp_cv_target_types): Split out... - (comp_target_types): From here. Don't allow cv-qual changes under - a pointer if nptrs == 0. Fix OFFSET_TYPE handling. - (build_ptrmemfunc): Pass 1 to nptrs. - * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes. - -1998-08-25 Mark Mitchell - - * search.c (dependent_base_p): Don't compare a binfo to - current_class_type; use the TREE_TYPE of the binfo instead. - - * cp-tree.h (CLASS_TYPE_P): Revise definition. - -1998-08-25 Jason Merrill - - * decl.c (duplicate_decls): Don't complain about different - exceptions from an internal decl even if pedantic. - - * typeck.c (convert_for_assignment): Converting from pm of vbase - to derived is an error, not a sorry. - - * call.c (build_over_call): Use convert_pointer_to_real for 'this'. - * class.c (fixed_type_or_null): Rename from - resolves_to_fixed_type_p. Return the dynamic type of the - expression, if fixed, or null. - (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type - does not match the static type. - (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use - resolves_to_fixed_type_p again. - -1998-08-24 Mark Mitchell - - * pt.c (tsubst_decl): Move special case code for dealing with - tricky friend templates here from ... - (regenerate_decl_from_template): Here. - -1998-08-24 Jason Merrill - - * decl.c (start_decl): Remove redundant linkage check. - -1998-08-24 Gavin Romig-Koch - - * typeck.c (c_expand_return): Handle the case that valtype - is wider than the functions return type. - -1998-08-24 Mark Mitchell - - * cp-tree.h (CLASS_TYPE_P): New macro. - * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE. - * pt.c (process_template_parm): Undo previous change. - -1998-08-24 Benjamin Kosnik - - * cp-tree.h: Declare. - * pt.c (decl_template_parm_p): New function. - * decl.c (pushdecl): Check decls for redeclaring template parms. - (xref_tag): Make redeclaration an error, print decl. - * decl2.c (grokfield): Check field_decls for redeclaration as well. - -1998-08-24 Jason Merrill - - * parse.y (primary): Fix up the type of string constants. - -1998-08-24 Mark Mitchell - - * typeck.c (convert_for_initialization): Move check for odd uses - of NULL to avoid duplicate warnings. - -1998-08-24 Jason Merrill - - * tree.c (lvalue_type): Fix for arrays. - * typeck.c (string_conv_p): New fn. - (convert_for_assignment): Use it. - (build_unary_op): Use lvalue_type. - * call.c (standard_conversion, convert_like): Use string_conv_p. - (add_function_candidate): Use lvalue_type. - * cvt.c (convert_to_reference): Likewise. - * decl2.c (lang_decode_option): Ignore -traditional. - * decl.c (init_decl_processing): flag_writable_strings inhibits - flag_const_strings. - -1998-08-24 Andrew MacLeod - - * lang-options.h (lang_options): Add fconst-strings to the list - of valid options. - * decl2.c (lang_f_options, lang_decode_option): Likewise. - -1998-08-24 Nathan Sidwell - - * lex.c (real_yylex): Don't warn about long long constants if - we're allowing long long. - -1998-08-24 Martin von Löwis - - * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of - accessing bindings directly. - - * search.c (my_tree_cons): Reimplement. - - * lang-specs.h: Remove __HONOR_STD. - * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise. - -1998-08-23 Mark Mitchell - - * decl.c (grokdeclarator): Complain about in-class initialization - of aggregates and/or references. - * pt.c (process_template_parm): Clear IS_AGGR_TYPE for - TEMPLATE_TYPE_PARMs. - - * decl2.c (grok_array_decl): Add comment. - (mark_used): Don't instantiate an explicit instantiation. - * friend.c (make_friend_class): Remove bogus comment. Fix check - for partial specializations. - * pt.c (check_explicit_specialization): Don't - SET_DECL_EXPLICIT_INSTANTIATION here. - (mark_decl_instantiated): Or here. - (do_decl_instantiation): Do it here, instead. Add checks for - duplicate explicit instantiations, etc. Tidy. - (do_type_instantiation): Likewise. - (instantiate_decl): Improve comments. Complain about explicit - instantiations where no definition is available. - - * cp-tree.h (ansi_null_node): Remove. - * call.c (build_over_call): Warn about converting NULL to an - arithmetic type. - * cvt.c (build_expr_type_conversion): Likewise. Use - null_ptr_cst_p instead of expanding it inline. - * decl.c (ansi_null_node): Remove. - (init_decl_processing): Make null_node always have integral type. - * except.c (build_throw): Warn about converting NULL to an - arithmetic type. - * lex.c (init_parse): Remove handling of ansi_null_node. - * pt.c (type_unification_real): Don't convert NULL to void* type. - * typeck.c (build_binary_op_nodefault): Fix NULL warnings. - (convert_for_assignment): Warn about converting NULL to an - arithmetic type. - (convert_for_initialization): Likewise. - -1998-08-20 Jason Merrill - - * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn. - * pt.c (coerce_template_parms): Use no_linkage_check. - * decl.c (grokvardecl): Likewise. - (grokfndecl): Likewise. Members of anonymous types have no linkage. - - * method.c (process_overload_item): Remove useless code. - -1998-08-20 Per Bothner - - Handle new'ing of Java classes. - * init.c (build_class_classref): New function. - (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject; - constructor does not return this; don't need to exception-protect. - - * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag. - * decl2.c (acceptable_java_type): Handle template-derived types. - -1998-08-20 Per Bothner - - * decl2.c (import_export_vtable): Suppress vtables for Java classes. - -1998-08-20 Mark Mitchell - - * decl.c (duplicate_decls): Always merge the old and new patterns - for templates, regardless of whether or not the new one has - DECL_INITIAL. Don't throw away specializations. Merge - DECL_SAVED_TREE. - * pt.c (tsubst_decl): Use the right pattern when calculating the - complete args for a new template instance. - (do_decl_instantiation): Fix typo in comment. - (regenerate_decl_from_template): Deal with tricky friend template - case. - (instantiate_decl): Likewise. - -Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com) - - * init.c (build_builtin_delete_call): Add missing assemble_external - call. - -1998-08-20 Jason Merrill - - * parse.y (notype_unqualified_id): Also accept ~A. - -1998-08-19 Mark Mitchell - - * typeck.c (build_binary_op_nodefault): Warn on use of NULL in - arithmetic. - * except.c (build_throw): Warn when NULL is thrown, even with - -ansi. Use ansi_null_node, rather than integer_zero_node, in the - thrown expression. - - * cp-tree.h (ansi_null_node): New variable. - * decl.c (ansi_null_node): New variable. - (init_decl_processing): Initialize its type. - * lex.c (init_parse): Initialize its value. Use ansi_null_node - for null_node in non-ANSI mode. - * typeck.c (build_binary_op_nodefault): Use ansi_null_node in - place of null_node to avoid spurious errors. - -1998-08-17 Mark Mitchell - - * cp-tree.h (enter_scope_of): New function. - * parse.y (complex_direct_notype_declarator): Use it. - * semantics.c (enter_scope_of): New function. - -1998-08-17 Jason Merrill - - * decl.c (grokparms): No, here. - - * decl.c (grokdeclarator): Catch parm with pointer to array of - unknown bound here... - * method.c (process_overload_item): ...not here. - - * gxxint.texi: Remove obsolete documentation of overloading code. - - * decl.c (finish_enum): Also set TYPE_SIZE_UNIT. - * class.c (finish_struct_bits): Likewise. - - * tree.c (lvalue_type): Fix for arrays. - * typeck.c (build_unary_op): Use lvalue_type. - * call.c (add_function_candidate): Likewise. - * cvt.c (convert_to_reference): Likewise. - - * decl2.c (lang_decode_option): Ignore -traditional. - - * init.c (build_offset_ref): Don't mess with error_mark_node. - * lex.c (do_scoped_id): Use cp_error. - - * rtti.c (get_tinfo_fn): Don't mess with the context for now. - -1998-08-17 Benjamin Kosnik - - * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified. - -Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com) - - * cp-tree.h (set_identifier_local_value): Provide prototype. - - * decl2.c (do_namespace_alias): Remove unused variables `binding' - and `old'. - -Fri Aug 14 16:42:27 1998 Nick Clifton - - * Makefile.in: Rename BBISON to BISON so that it can be properly - inherited from the parent makefile. - -1998-08-13 Jason Merrill - - * lang-options.h: Add -finit-priority. - * decl2.c: Likewise. Check flag_init_priority instead of - USE_INIT_PRIORITY. - - * decl2.c (setup_initp): New fn. - (start_objects, finish_objects, do_ctors): Handle init_priority. - (do_dtors, finish_file): Likewise. - -1998-08-13 Jason Merrill - - * pt.c (tsubst_copy): Hush warning. - - * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P. - -1998-08-12 Mark Mitchell - - * pt.c (print_template_context): Don't abort when instantiating a - synthesized method. - - * decl.c (grokdeclarator): Issue errors on namespace qualified - declarators in parameter lists or in class scope. - -1998-08-09 Mark Mitchell - - * pt.c (check_explicit_specialization): Don't abort on bogus - explicit instantiations. - -1998-08-07 Mark Mitchell - - * typeck.c (require_complete_type): Use complete_type_or_else. - (complete_type_or_else): Always return NULL_TREE on failure, as - documented. - - * pt.c (tsubst_aggr_type): Prototype. - (tsubst_decl): New function, split out from tsubst. Set - input_filename and lineno as appropriate. - (pop_tinst_level): Restore the file and line number saved in - push_tinst_level. - (instantiate_class_template): Set input_filename and lineno as - appropriate. - (tsubst): Move _DECL processing to tsubst_decl. Make sure the - context for a TYPENAME_TYPE is complete. - - * decl2.c (grokbitfield): Issue errors on bitfields declared with - function type. - (do_dtors): As in do_ctors, pretend to be a member of the same - class as a static data member while generating a call to its - destructor. - - * cvt.c (cp_convert_to_pointer): Handle NULL pointer - conversions, even in complex virtual base class hierarchies. - -1998-08-06 Mark Mitchell - - * cp-tree.h (ENUM_TEMPLATE_INFO): New macro. - (TYPE_TEMPLATE_INFO): Likewise. - (SET_TYPE_TEMPLATE_INFO): Likewise. - (ENUM_TI_TEMPLATE): Likewise. - (ENUM_TI_ARGS): Likewise. - (lookup_nested_type_by_name): Remove. - * decl.c (maybe_process_template_type_declaration): Handle enums. - (start_enum): Don't check for primary-template enum declarations - here. - (finish_enum): Clean up, document. Make sure template enum - constants get the correct type. - (build_enumerator): Copy initializers for template enumerations, - too. - (grok_enum_decls): Document. - * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit - better. Build LOOKUP_EXPRs for local variables, even if they are - TREE_PERMANENT. - * pt.c (tsubst_enum): Remove field_chain parameter. - (template_class_depth): Include the depth of surrounding function - contexts. - (push_template_decl): Check for primary-template enum declarations - here. Deal with enumeration templates. - (lookup_template_class): Likewise. - (for_each_template_parm): Likewise. - (instantiate_class_template): Don't call tsubst_enum directly, - call tsubst instead, to instantiate enums. Deal with all - field_chain issues here, not in tsubst_enum. - (lookup_nested_type_by_name): Remove. - (tsubst_aggr_type): Revise handling of enumeration types. - (tsubst): Likewise. - (tsubst_copy): Likewise. - (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs. - -1998-08-04 Mark Mitchell - - * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it - uses template parameters. - * method.c (build_template_parm_names): Use the full set of - template arguments for tsubst'ing. - (build_overload_identifier): Pass the full set of template - arguments to build_template_parm_names, not just the - innermost_args. - * pt.c (TMPL_ARGS_DEPTH): Define using - TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity. - (NUM_TMPL_ARGS): New macro. - (add_outermost_template_args): Deal with the case where the outer - args will be completely discarded. - (coerce_template_parms): Use the full set of template arguments - for tsubst'ing. Simplify. Add some asserts. Improve - error messages. - (lookup_template_class): Pass the full set of template arguments - to coerce_template_parms. - (tsubst): Add assertion. - (do_type_instantiation): Don't instantiate member template - classes. - - * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose - name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE. - -1998-08-03 Jason Merrill - - * method.c (set_mangled_name_for_decl): Change return type to void. - - * decl.c (lookup_name_real): A namespace-level decl takes priority - over implicit typename. Avoid doing the same lookup twice. - - * search.c (dependent_base_p): New fn. - (dfs_pushdecls, dfs_compress_decls): Use it. - - * typeck.c (get_member_function_from_ptrfunc): Don't try to handle - virtual functions if the type doesn't have any. - -1998-08-03 Mark Mitchell - - * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it - uses template parameters. - -1998-08-02 Mark Mitchell - - * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument. - * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation. - * lex.c (do_identifier): Don't use a second argument, or a type, - when building LOOKUP_EXPRs. - (do_identifier): Likewise. - (do_scoped_id): Likewise. - * method.c (hack_identifier): Improve error message. - * pt.c (lookup_template_function): Don't needlessly call - copy_to_permanent or build_min. - (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if - necessary. - (do_decl_instantiation): Improve error message. - * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy. - (build_min): Copy the type to the permanent obstack, too. - -1998-08-01 Jason Merrill - - * init.c (init_init_processing): Remove BI* handling. - (build_builtin_call): Remove. - (build_builtin_delete_call): New fn. - (build_delete): Use it. - -1998-07-31 Mark Mitchell - - * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro. - (maybe_check_template_type): New function. - * decl.c (maybe_process_template_type_declaration): New function, - split out from pushtag Call maybe_check_template_type. - (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P. - (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P. - * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P. - * pt.c (template_class_depth_real): Generalization of ... - (template_class_depth): Use it. - (register_specialization): Use duplicate_decls for duplicate - declarations of specializations. - (maybe_check_template_type): New function. - (push_template_decl_real): Fix comment. - (convert_nontype_argument): Likewise. - (lookup_template_class): Likewise. Avoid an infinite loop on - erroneous code. - (tsubst_friend_function): Fix comment. - (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is - an IDENTIFIER_NODE. - * semantics.c (begin_function_definition): Use - reset_specialization to note that template headers don't apply - directly to declarations after the opening curly for a function. - -1998-07-29 Jason Merrill - - * decl.c (push_overloaded_decl): Use current_namespace instead of - DECL_CONTEXT (decl) to determine where we go. - - * decl.c (lookup_name_real): Fix typo. - -1998-07-28 Mark Mitchell - - * friend.c (is_friend): Be lenient with member functions to deal - with nested friends. - -1998-07-28 Jason Merrill - - * class.c (finish_struct_1): Convert integer_zero_node to - ssizetype before passing it to set_rtti_entry. - * typeck2.c (initializer_constant_valid_p): Allow conversion of 0 - of any size to a pointer. - -1998-07-27 Mark Mitchell - - * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove. - (build_template_decl_overload): Remove. - (set_mangled_name_for_decl): New function. - (innermost_args): Remove is_spec parameter. - (most_specialized, most_specialized_class): Remove declarations. - (lookup_template_class): Add entering_scope parameter. - (maybe_process_partial_specialization): New function. - (finish_template_decl): Likewise. - (finish_template_type): Likewise. - * class.c (finish_struct): Clean up processing of member template - specializations. - * decl.c (pushtag): Fix formatting. - (lookup_tag): Improve handling of pseudo-global levels. - (make_typename_type): Adjust call to lookup_template_class. - (shadow_tag): Use maybe_process_partial_specialization. - (xref_tag): Improve handling of member friends. - (start_function): Call push_nested_class before - push_template_decl. Don't call push_template_decl for - specializations. - * decl2.c (grok_x_components): Don't call xref_tag for - template instantiations. Handle UNION_TYPEs like RECORD_TYPEs. - (grokclassfn): Use set_mangled_name_for_decl. - (arg_assoc_class): Adjust call to innermost_args. - (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL. - * error.c (dump_function_name): Improve printing of template - function names. - * friend.c (is_friend): Don't compare types of decls to determine - friendship, unless flag_guiding_decls. - (make_friend_class): Partial specializations cannot be friends. - (do_friend): Use set_mangled_name_for_decl. Call - push_template_decl_real instead of push_template_decl. - * method.c (build_decl_overload_real): Remove prototype. Give it - external linkage. - (build_overload_identifier): Adjust call to innermost_args. - (build_template_decl_overload): Remove. - (set_mangled_name_for_decl): New function. - * parse.y (.finish_template_type): New non-terminal. - (template_def): Use finish_template_decl. Use template_extdef - instead of extdef. - (template_extdef, template_datadef): New non-terminals, containing - only those rules for things which can be templates. - (datadef): Tidy. - (template_type, self_template_type): Use .finish_template_type. - (named_class_head): Use maybe_process_partial_specialization. - * pt.c (mangle_class_name_for_template): Remove context parameter. - (get_class_bindings): Remove outer_args parameter. - (complete_template_args): Remove. - (add_outermost_template_args): New function. - (register_specialization): Return the specialization. - (unregister_specialization): New function. - (tsubst_template_parms): Likewise. - (most_specialized, most_specialized_class): Prototype here as - static. - (original_template): Rename to most_general_template. - (tsubst_template_parms): New function. - (set_mangled_name_for_template_decl): Likewise. - (TMPL_ARGS_DEPTH): New macro. - (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust. - (TMPL_ARGS_LEVEL): New macro. - (SET_TMPL_ARGS_LEVEL): Likewise. - (TMPL_ARG): Likewise. - (SET_TMPL_ARG): Likewise. - (TMPL_ARGS_DEPTH): Likewise. - (finish_member_template_decl): Use finish_template_decl. - (maybe_process_partial_specialization): New function, split out - from tsubst. - (inline_needs_template_parms): Use TMPL_PARMS_DEPTH. - (maybe_begin_member_template_processing): Use new macros. - (is_member_template): Likewise. - (is_member_template_class): Likewise. - (add_to_template_args): Likewise. Deal with multiple levels of - args. - (maybe_process_partial_specialization): New function. - (retrieve_specialization): Add consistency check. - (determine_specialization): Return full argument list. - (check_explicit_specialization): Tweak friend handling. Use full - argument lists. Simplify. - (current_template_args): Use new macros. - (push_template_decl_real): Change ill-named mainargs to specargs. - Check that a partial specialization actually specializes at least - one parameter. Improve friend handling. Modify for full - template arguments. - (classtype_mangled_name): Don't mangle the names of - specializations. - (lookup_template_class): Add entering_scope parameter. Use it to - avoid finding a template type when an instantiation is required. - Simplify. Use full template arguments. - (tsubst_friend_function): Use unregister_specialization. Use new - macros. Use full template arguments. - (tsubst_friend_class): Substitute, using tsubst_template_parms, - into the template parameters before passing them to - redeclare_class_template. - (instantiate_class_template): Simplify. Use full template - arguments. Adjust calls to get_class_bindings. Use - SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling. - (innermost_args): Use new macros. - (tsubst_aggr_type): New function, split out from tsubst. - (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling - conventions for lookup_template_class. Refine handling of partial - instantiations. Remove calls to complete_template_args. - Simplify. Add consistency checks. Use set_mangled_name_for_decl - and set_mangled_name_for_template_decl. - (tsubst_copy): Use tsubst_aggr_type. - (instantiate_template): Use full template arguments. - (more_specialized): Improve formatting. - (more_specialized_class): Adjust calls to get_class_bindings. - (get_bindings_real): Don't call complete_template_args. - (most_specialized): Don't overwrite input; create a new list. - (most_specialized_class): Use most_general_template. - (regenerate_decl_from_template): Use unregister_specialization. - Use full template arguments. - (instantiate_decl): Use full template arguments. - (set_mangled_name_for_template_decl): New function. - * semantics.c (begin_class_definition): Use - maybe_process_partial_specialization. - (finish_member_class_template): New function. - (finish_template_decl): Likewise. - (finish_template_type): Likewise. - (typeck.c): Don't crash after issuing a compiler_error. - * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict. - -1998-07-27 Jason Merrill - - * typeck2.c (build_functional_cast): Handle default-initialization. - - * call.c (build_over_call): Pass 1 to popclass. - - * parse.y (direct_notype_declarator): Add precedence declaration - to notype_unqualified_id case. - * Makefile.in (EXPECT): Adjust. - - * tree.c (ovl_member): Fix for single function in OVL. - -1998-07-27 Dave Brolley - - * c-lex.c (yylex): Fix boundary conditions in character literal and - string literal loops. - -1998-07-24 Jason Merrill - - * decl.c (lookup_name_real): OK, do return the from_obj value - unless got_object depends on template parms. - - * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT. - - * pt.c (coerce_template_parms): Also complain about local enums. - - * cp-tree.h: Add prototype for set_identifier_local_value. - * decl.c (set_identifier_local_value_with_scope): Make static, - prototype. - * search.c (covariant_return_p): Likewise. - * except.c (build_terminate_handler, alloc_eh_object): Likewise. - - * call.c (build_method_call): Only pull out the type of a destructor - if it's a template type parm. - * decl.c (lookup_name_real): Never return the from_obj value. - -1998-07-23 Jason Merrill - - * except.c (process_start_catch_block_old): Call start_decl_1 for - catch parm. - * decl.c (start_decl_1): Avoid duplicate error. - - * init.c (expand_default_init): Only perform the initialization if - it will do something. - -1998-07-23 H.J. Lu (hjl@gnu.org) - - * parse.y (base_class): Check for invalid base class. - -1998-07-23 Jason Merrill - - * decl2.c (import_export_template): Fold in... - (import_export_class): ...to here. Handle dllimport/export. - - * class.c (build_vtable): Pass at_eof to import_export_vtable. - (prepare_fresh_vtable): Likewise. - * decl2.c (import_export_class): Split out... - (finish_prevtable_vardecl): From here. - * class.c (finish_struct_1): Call import_export_class if at_eof. - - * decl.c (start_function): #if 0 mysterious code I wrote and have - forgotten why. - * rtti.c (get_tinfo_fn): If this is for a class type, set - DECL_CONTEXT. - -1998-07-22 Jason Merrill - - * inc/exception: Change terminate and unexpected to (). - - * parse.y (named_class_head_sans_basetype_defn): A - named_class_head_sans_basetype followed by '{' or ':' is a defn. - -1998-07-21 Jason Merrill - - * tree.c (canonical_type_variant): New fn to handle arrays. - * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove. - * pt.c (unify, default case): Also fold arg. Fix array bounds case. - * method.c (process_overload_item): Use build_overload_value for - arrays. - -1998-07-20 Dave Brolley - - * lex.c (mbchar.h): #include it. - (GET_ENVIRONMENT): New macro. - (init_parse): Set character set based on LANG environment variable. - (real_yylex): Handle multibyte characters in character literals. - (real_yylex): Handle multibyte characters in string literals. - -1998-07-19 Jason Merrill - - * lex.c (do_identifier): Look for class value even if we don't - have a global value. Do implicit declaration if parsing is 2. - * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig - lookup. - -1998-07-19 Mark Mitchell - - * decl.c (pushtag): Revert previous change. - * pt.c (lookup_template_class): Don't put out debugging - information for types that use template parameters. - - * decl.c (pushtag): Don't put out debugging information for - compiler-generated typedefs. - - * error.c (dump_type_real): Don't crash when presented with - intQI_type_node or the like. - - * semantics.c (finish_translation_unit): Fix spelling error in - comment. - -1998-07-17 Jason Merrill - - * decl.c (lookup_name_real): Pull out single function here. - (select_decl): Not here. - (unqualified_namespace_lookup): Use CP_DECL_CONTEXT. - - * decl.c (qualify_lookup): Tweak again. - - * pt.c (lookup_template_class): Don't mess with the context of the - instantiation. - * decl2.c (current_decl_namespace): Remove special handling for - templates. - - * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for - a member template specialization. - - * tree.c (ovl_member): Use decls_match to compare functions. - * decl.c (decls_match): Check the context of a function. - - * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER - in Koenig lookup support rules. - * semantics.c (finish_call_expr): Handle the new cases. - - * typeck.c (build_x_function_call): Handle overloaded methods. - - * decl.c (grokvardecl): Don't call build_static_name for extern "C". - -1998-07-16 Mark Mitchell - - * semantics.c (finish_object_call_expr): Revert previous change. - * call.c (build_new_method_call): Likewise. Instead, convert - TYPE_DECLs to IDENTIFIERs here, in the presence of templates. - -1998-07-16 Jason Merrill - - * decl.c (qualify_lookup): Handle templates. - - * decl2.c (do_using_directive): Don't pass ancestor. - * decl.c (push_using_directive): Calculate ancestor. - - * decl2.c (do_nonmember_using_decl): Allow for type shadowing. - * decl.c (pushdecl): Move type shadowing handling from here... - (duplicate_decls): ...to here. - * decl.c (set_identifier_local_value_with_scope): New fn. - (pushdecl): Use it. - (set_identifier_local_value, lookup_type_current_level): New fns. - * decl2.c (do_local_using_decl): Handle types and binding level - stuff properly. - - * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD. - * decl.c (select_decl): Extract a lone function from an OVERLOAD. - (lookup_namespace_name): Likewise. - * typeck.c (build_unary_op): Not here anymore. - - * decl2.c (do_class_using_decl): Make sure we get an identifier. - * class.c (handle_using_decl): Ignore TYPE_DECLs. - - * decl.c (qualify_lookup): New fn. - (lookup_name_real): Use it. - -1998-07-16 Martin v. Loewis - - * decl2.c (add_using_namespace): When directly using a namespace - that was indirect before, promote it. - - * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES, - LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY, - LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros. - * decl.c (select_decl): Replace two flag parameters by one. - (unqualified_namespace_lookup): Likewise, pass flag. - (lookup_flags): New function. - (lookup_name_real): Compute flags, pass them. - (lookup_namespace_name): Call with zero-flag. - * decl2.c (ambiguous_decl): Add flag parameter, complain only - according to flags. - (lookup_using_namespace, qualified_lookup_using_namespace): - Add flag parameter, pass them through. - * lex.c (do_scoped_id): Call with zero-flag. - -1998-07-16 Jason Merrill - - * typeck.c (convert_for_assignment): Use comptypes. - -1998-07-16 Mark Mitchell - - * semantics.c (finish_object_call_expr): Move test for the - function called being a TYPE_DECL to ... - * call.c (build_new_method_call): Here. - -1998-07-15 Jason Merrill - - * decl2.c (arg_assoc_class): Also look at template arguments, if any. - (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST. - - * lex.c (looking_for_typename): Don't initialize. - - * decl2.c (ambiguous_decl): Clarify error message. - - * decl.c (push_using_directive): Iterate over namespaces used - indirectly. - -1998-07-15 Martin v. Löwis - - * decl2.c (add_using_namespace): Iterate over namespaces used - indirectly. - - * decl.c (lookup_name_real): Accept namespace aliases as locals. - (cat_namespace_levels): Ignore aliases. - (duplicate_decls): Ignore duplicate aliases. - * decl2.c (do_namespace_alias): Process block level namespace - aliases. Store alias with pushdecl. Remove odr errors. - * parse.y (namespace_alias): New non-terminal. - (extdef): Use it. - -1998-07-15 Jason Merrill - - * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE. - Handle TEMPLATE_TYPE_PARM. - (arg_assoc): Rewrite. - - * pt.c (complete_template_args): Don't look at the context unless - we have to. - - * method.c (build_decl_overload_real): Fix namespace handling. - - * typeck.c (build_unary_op): Extract a lone function from an - OVERLOAD. - - * call.c (build_scoped_method_call): Handle getting a namespace - for basetype in a destructor call. - (check_dtor_name): Handle enums. - - * parse.y (using_directive): New nonterminal. - (extdef, simple_stmt): Use it. - -1998-07-14 Martin von Löwis - - * decl2.c (add_function): Move error message ... - (arg_assoc_namespace): ... from here. - -1998-07-14 Jason Merrill - - * parse.y (namespace_qualifier): Fix multiple level handling. - * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT. - (arg_assoc): Don't skip the first argument of a function. - -Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com) - - * search.c (my_tree_cons): Clean up. - -1998-07-14 Jason Merrill - - * call.c (joust): Don't warn about "confusing" conversions to the - same type. - -1998-07-14 Martin von Löwis - - * class.c (push_nested_class): Complain about namespaces. - * decl.c (start_decl): Enter the object's namespace. - (cp_finish_decl): Leave it. - (grokdeclarator): Likewise. - * decl2.c (check_decl_namespace): New function. - (finish_file): Call it. - * parse.y (complex_direct_notype_declarator): Set complexity - of namespace-qualified ids to -1, enter the namespace. - - * method.c (build_template_decl_overload): Expect _DECL as first - parameter. Put context temporarily into current_namespace. - * pt.c (check_explicit_specialization): Change caller. - (tsubst): Likewise. - - * init.c (build_offset_ref): Call mark_used and - convert_from_reference for namespace members. - -Mon Jul 13 23:25:28 1998 Martin von Löwis - - * search.c (my_tree_cons): The bitfield is at index 2. - -Mon Jul 13 17:21:01 1998 Nick Clifton - - * lang-options.h: Format changed to work with new --help support - in gcc/toplev.c - -1998-07-12 Martin von Löwis - - * decl2.c (build_expr_from_tree): Change calls of do_identifier. - Do Koenig lookup in CALL_EXPR. - (arg_assoc): Handle error_mark. - * lex.c (is_global): New function. - (do_identifier): Expect arguments for Koenig lookup. - * parse.y (primary): Add rules for calls of unqualified function calls. - (do_id): Change call of do_identifier. - * pt.c (finish_stmt_expr): Likewise. - * semantics.c (finish_id_expr): Likewise. - (finish_call_expr): Add integer parameter to indicate - argument-dependent lookup. - - * decl.c (struct binding_level): New field using_directives. - (push_using_decl): Not sorry anymore. - (push_using_directive): New function. - (lookup_tag): Use CP_DECL_CONTEXT to iterate. - (unqualified_namespace_lookup): New function, code from ... - (lookup_name_real): ... here. - * decl2.c (lookup_using_namespace): Pass using list instead of - initial scope. - (validate_nonmember_using_decl): New function. - (do_nonmember_using_decl): New function. - (do_toplevel_using_decl): Use them. - (do_local_using_decl): New function. - (do_using_directive): Support block-level directives. - * parse.y (simple_stmt): Support using declarations and - directives. - (namespace_qualifier, namespace_using_decl): New non-terminals. - - * xref.c (classname): New function. - (GNU_xref_hier): Change class and base parameters to tree. - * decl.c (xref_baseypes): Change caller. - * friend.c (make_friend_class): Likewise. - -1998-07-12 Kriang Lerdsuwanakij - - * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter - comparison. - - * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a - template template parameter, record its use. - (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse - its template arguments if exists. - - * pt.c (coerce_template_template_parms): New function equivalent - to coerce_template_parms when IS_TMPL_PARM is true. - (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter, - all callers changed. - - (coerce_template_parms): Access ARGLIST properly when creating a - new vector. Only accept implicit TYPE_DECL as valid argument for - a template template parameter when it is a base class of - current_class_type. Don't display error message when COMPLAIN is - false. - -1998-07-12 Klaus Kaempf (kkaempf@progis.de) - - * repo.c (get_base_filename): Use file_name_nondirectory. - (open_repo_file): Likewise. - * cp-tree.h (file_name_nondirectory): Add prototype. - -1998-07-12 Jason Merrill - - * friend.c (do_friend): Pull the identifier out of declarator. - Use cp_error and friends. - * decl2.c (qualified_lookup_using_namespace): Fix call to - purpose_member. - * decl.c (lookup_name_real): Don't call complete_type on a namespace. - (grokvardecl): Use DECL_CLASS_SCOPE_P. - * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner. - * class.c (warn_hidden): Fix for OVERLOAD. - From grahams@rcp.co.uk: - * cp-tree.h (DEFARG_NODE_CHECK): New macro. - (DEFARG_LENGTH, DEFARG_POINTER): Use it. - -Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com) - - * g++.1 (-traditional): Remove duplicated documentation. - -1998-07-11 Mark Mitchell - - * method.c (flush_repeats): Add nrepeats parameter. - (issue_nrepeats): Likewise. - (is_back_referenceable_type): New function. Don't back-reference - TEMPLATE_TYPE_PARMs as well as simple types like integers. - (build_mangled_name_for_type): Likewise. - (build_mangled_name_for_type_with_Gcode): Likewise. - (lasttype): Remove. - (nrepeats): Likewise. - (Nrepeats): Likewise. - (start_squangling): Don't clear the variables removed above. - (end_squangling): Likewise. - (flush_repeats): Tidy. Use nrepeats parameter rather than - Nrepeats global. - (issue_nrepeats): Likewise, but with nrepeats global. Use - is_backreferenceable_type. - (build_overload_nested_name): Tidy. Add comment. Use - build_mangled_name_for_type. - (build_underscore_int): Comment. - (build_overload_scope_ref): Use build_mangled_name_for_type. - (build_overload_int): Likewise. - (build_template_template_parm_names): Tidy. - (build_template_parm_names): Use build_mangled_name_for_type. - (build_overload_identifier): Add comments. - (build_mangled_name_for_type_with_Gcode): Split out from - build_mangled_name. - (build_mangled_name_for_type): Use it. - (build_mangled_name): Rework to use build_mangled_name_for_type - and to not use global nrepeats/Nrepeats. Tidy. - (process_modifiers): Tidy. - (check_btype): Use is_backreferenceable_type. Add comment. - Rename `node' to `type'. - (process_overload_item): Set numeric_output_need_bar here. - Use build_mangled_name_for_type. Tidy. - (build_decl_overload_real): Tidy. Don't use Nrepeats. Use - build_mangled_name_for_type. - - * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO - for TYPE_DECLs. - -1998-07-08 Vladimir N. Makarov - - * cp-tree.h (warn_long_long): Define. - * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for - warning "ANSI C++ does not support `long long'". - * decl2.c (warn_long_long): Define. - (lang_decode_option): Parse -Wlong-long, -Wno-long-long options. - -1998-07-07 Jason Merrill - - * decl.c (xref_tag): Handle attributes between 'class' and name. - * parse.y (aggr): Likewise. - * semantics.c (finish_class_definition): Likewise. - * Makefile.in (EXPECTED): Adjust. - - * cp-tree.h: Declare flag_optional_diags and warn_multichar. - * decl2.c: Define them. - (lang_decode_option): Handle them. - * lang-options.h: Add -foptional-diags. - * class.c (finish_struct): Don't complain about multiple meanings of - name if -fno-optional-diags. - * decl.c (pushdecl_class_level): Likewise. - * lex.c (real_yylex): Check warn_multichar. - -1998-07-06 Jason Merrill - - * decl.c (lookup_tag): Use CP_DECL_CONTEXT. - - * tree.c (make_binfo): Fix length. - -1998-06-30 Benjamin Kosnik - - * decl2.c (lang_decode_option): Remove warn_template_debugging. - * lang-options.h: Likewise. - -Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi - - * except.c (build_eh_type_type_ref): Remove unused variable `susp'. - (process_start_catch_block): Likewise for variables - `false_label_rtx', `call_rtx' and `return_value_rtx'. - -1998-06-29 Brendan Kehoe - - * tree.c (build_srcloc): Make sure we allocate this node on the - permanent obstack. - -Sat Jun 27 23:34:18 1998 Fred Fish - - * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined. - (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY. - (lang_specific_driver): Only add -lm automatically if need_math is - nonzero. - -Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o - -Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi - - * Makefile.in (EXPR_H): New dependency variable. - (decl2.o): Depend on $(EXPR_H). - (typeck.o): Likewise. - (init.o): Likewise. - (expr.o): Likewise. - -1998-06-25 Benjamin Kosnik - - * decl.c (start_enum): Put local enums on permanent_obstack. - -1998-06-25 Mark Mitchell - - * cp-tree.h (c_get_alias_set): Declare. - * decl.c (init_decl_processing): Set lang_get_alias_set. - -1998-06-25 Andrew MacLeod - - * cp-tree.h (mark_all_runtime_matches): Add function prototype. - * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED - flag for all function decls which are in the exception table. - * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match. - * decl2.c (finish_file): Call mark_all_runtime_matches to make sure - code is emitted for any referenced rtti function. - -1998-06-25 Dave Brolley - - * lang-specs.h: Use new | syntax to eliminate - string concatenation. - -1998-06-25 Jason Merrill - - * cp-tree.h (CP_DECL_CONTEXT): New macro. - * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it. - * method.c (build_overload_nested_name): Likewise. - * sig.c (build_signature_pointer_or_reference_type): Don't set - DECL_CONTEXT. - -1998-06-24 Martin v. Löwis - - Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace. - * cp-tree.h (FROB_CONTEXT): New macro. - (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE. - * decl.c (namespace_binding): Replace NULL_TREE with - global_namespace. - (set_namespace_binding, pop_namespace, lookup_name_real): Likewise. - * decl2.c (is_namespace_ancestor, lookup_using_namespace): - Likewise. - * decl.c (pushtag): Use FROB_CONTEXT. - (pushdecl, make_typename_type, define_function, grokdeclarator): - Likewise. - * decl2.c (set_decl_namespace, do_namespace_alias): Likewise. - * pt.c (push_template_decl_real, lookup_template_class, tsubst): - Likewise. - * decl2.c (decl_namespace): Return global_namespace if no context. - * method.c (build_overload_nested_name): Expect null as context. - * pt.c (mangle_class_name_for_template): Do nothing for null - contexts. - (lookup_template_class): Allow for null id_context. - -1998-06-25 Richard Henderson - - * method.c (emit_thunk): Set current_function_is_thunk for the - ASM_OUTPUT_MI_THUNK case as well. - -1998-06-23 Andrew MacLeod - - * exception.cc (__cplus_type_matcher): Get a match_info pointer - instead of an exception table entry as a parameter. - -1998-06-23 Andrew MacLeod - - * parse.y (function_try_block): Don't call start_catch_handler. - * except.c (call_eh_info): Remove coerced field from declaration. - (build_eh_type_type_ref): New function to create an address of a - rtti function for the new style exception tables. - (expand_start_catch_block): Split function, this contains the - common part. - (process_start_catch_block_old): New function to perform the rest - of expand_start_catch_block under old style exceptions. - (process_start_catch_block_old): New function to perform the rest - of expand_start_catch_block under new style exceptions. - (expand_end_catch_block): Only pop the false label off the stack under - the old style of exceptions. - * semantics.c (finish_try_block): Don't call start_catch_handler. - * exception.cc (struct cp_eh_info): Add original_value field. - (__cplus_type_matcher): Perform type matching on the original exception - value, and if we have a match, set the current value. - (__cp_push_exception): Set the original exception value. - -1998-06-23 Jason Merrill - - * call.c (joust): Fix confusing conversion warning. - - * call.c (build_op_delete_call): Add placement parm. Check - LOOKUP_SPECULATIVELY. - * cp-tree.h, decl2.c, init.c: Adjust. - * decl.c (finish_function): Use it. - - * pt.c (tsubst): Diagnose creating void fields or variables. - -Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi - - * call.c (build_scoped_method_call): Remove unused variable `tmp'. - - * cp-tree.h (check_dtor_name): Add prototype. - - * init.c (expand_member_init): Remove unused variables - `ptr_type_node', `parm' and `rval'. - - * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier - in call to fprintf. - (lang_print_xnode): Likewise. - - * typeck2.c (enum_name_string): Cast argument to sprintf to long - and use %ld specifier. - - * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC - specifier in call to fprintf. - (GNU_xref_member): Cast argument to sprintf to int. - -Fri Jun 19 23:22:42 1998 Bruno Haible - - * typeck2.c (pop_init_level): Warn about implicit zero initialization - of struct members. - -Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi - - * cp-tree.h: Prototype function `check_java_method'. - -1998-06-17 Jason Merrill - - * class.c (finish_struct): Make conflicting use of id a pedwarn. - * decl.c (pushdecl_class_level): Likewise. - -1998-06-17 Mark Mitchell - - * pt.c (convert_nontype_argument): Issue an error when presented - with an integer (real) constant that cannot be simplified to an - INT_CST (REAL_CST). - - * cp-tree.h (c_get_alias_set): Remove declaration added in - 1998-06-13 change that should never have been checked in. - -1998-06-17 Jason Merrill - - * typeck.c (build_binary_op_nodefault): Change % in format strings - to %%. - - * decl.c (grokvardecl): Don't build_static_name for decls that - aren't at namespace scope. - - * init.c (perform_member_init): Catch default-initialization of - references. - -1998-06-17 Mark Mitchell - - * errfn.c (cp_thing): Handle the `%%' formatting sequence. - -1998-06-17 Jason Merrill - - * method.c (hack_identifier): Complain about getting a namespace - or class template. - * typeck.c (decay_conversion): Remove check for namespaces. - * typeck2.c (incomplete_type_error): Likewise. - * parse.y (template_arg): Add PTYPENAME expansion. - -1998-06-16 Andrew MacLeod - - * decl.c (grokvardecl): Don't build external assembler names for - TYPENAMEs in other namespaces as there is no declarator. - * error.c (cp_file_of, cp_line_of): Don't extract file or line number - info from DECL_CONTEXT if it is NULL. - -1998-06-16 Jason Merrill - - * call.c (check_dtor_name): Split out. - (build_scoped_method_call): Use it. - (build_method_call): Use it. - * init.c (build_offset_ref): Use it. - - * typeck.c (build_static_cast): Fix handling of pointers to members. - - * decl.c (finish_function): Just return nothing from a constructor. - * typeck.c (c_expand_return): Complain about returning a void - expression from a destructor. - -1998-06-13 Mark Mitchell - - * class.c (alter_access): Accept a BINFO explaining how to get - from the entity whose accessed is being altered to the type doing - the altering. - (handle_using_decl): New function containing code split out from ... - (finish_struct_1): Here. - - * cp-tree.h (complete_type_or_else): Declare. - * init.c (build_new_1, build_delete): Use it. - * typeck.c (require_complete_type): Use complete_type, rather than - expanding it inline. - (complete_type_or_else): New function. - (build_component_ref): Use it. - (pointer_int_sum): Make sure the type pointed to is complete. - (pointer_diff): Likewise. - - * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for - types. - - * search.c (get_matching_virtual): Note that member templates - cannot override virtual functions. - -1998-06-12 Brendan Kehoe - - * pt.c (check_explicit_specialization): If DECLARATOR turned into - an error_mark_node from lookup_template_function, return the same. - (determine_specialization): Also make sure TEMPLATE_ID isn't an - error_mark_node, before we try to read its operands. - * decl.c (grokdeclarator): If we got an error_mark_node from - check_explicit_specialization, just return it right back. - -1998-06-12 Mark Mitchell - - * class.c (instantiate_type): Don't treat template-ids that don't - specify any template arguments as equivalent to ordinary - identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to - pointer-to-members for member templates. Tidy slightly. - * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation. - * init.c (build_offset_ref): Handle template-ids like ordinary - identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the - offset part of the OFFSET_REF. - * typeck.c (build_unary_op): Change check for unknown types to - look for OFFSET_REFs, not SCOPE_REFs. - -1998-06-11 Mark Mitchell - - * pt.c (is_member_template_class): New function. - (push_template_decl_real): Use it. - -1998-06-11 Benjamin Kosnik - - * friend.c (do_friend): Add support for nested classes using - member functions of the enclosing class as friends. - -1998-06-10 Mark Mitchell - - * call.c (convert_default_arg): Make global, not static. - (convert_arg_for_ellipsis): Split out from ... - (build_over_call): Here. - * cp-tree.h (convert_default_arg); Declare. - (convert_arg_to_ellipsis): Likewise. - (do_member_init): Remove. - * init.c (do_member_init): Remove; this code is dead. - (expand_member_init): Remove much of this code; it is dead. - * typeck.c (convert_arguments): Use convert_default_arg and - convert_arg_for_ellipsis, rather than duplicating here. - - * call.c (convert_like): Don't fail silently if - build_user_type_conversion fails. Always return error_mark_node - for failure. - -1998-06-10 Jason Merrill - - * search.c (covariant_return_p): Complain about ambiguous base. - - * typeck.c (build_component_ref): Diagnose ref to nested type. - -1998-06-10 Brendan Kehoe - - * decl.c (grokparms): Check that INIT isn't an error_mark_node - before giving error about invalid type for default arg. - -1998-06-10 Jason Merrill - - * call.c (build_method_call): Fix thinko. - -1998-06-10 Dave Brolley - - * decl2.c (lang_decode_option): New argc/argv interface. - * cp-tree.h (lang_decode_option): New argc/argv interface. - * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is - specified for cpplib-enabled compilers. - * lex.c (lang_init): Don't check_newline for cpplib. - (init_parse): Don't initialize cpplib here. - -1998-06-10 Brendan Kehoe - - * typeck.c (build_component_ref): Make sure FIELD has a lang_specific - piece before checking DECL_MUTABLE_P. - -1998-06-10 John Carr - - * tree.c (debug_binfo): Make printf format match arguments. - - * error.c (OB_PUTI): Make printf format match arguments. - -1998-06-10 Jason Merrill - - * init.c (perform_member_init): Handle default-initialization. - - * except.c (build_throw): Handle throwing NULL. - - * typeck.c (build_x_function_call): Use resolve_offset_ref. - - * search.c (compute_access): Only strip an anonymous union - for a FIELD_DECL. - - * call.c (add_builtin_candidates): Tweak. - - * cvt.c (build_expr_type_conversion): Restore code for conversion - from class types. - * decl2.c (delete_sanity): Use it. Clean up. - - * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons. - -1998-06-10 Branko Cibej - - * typeck.c (c_expand_return): Don't warn about void expressions on - return statements in functions returning void. - -1998-06-09 Mark Mitchell - - * pt.c (fn_type_unification): Revise documentation. Tidy. - (type_unification): Likewise. - -1998-06-09 Andrew MacLeod - - * semantics.c (finish_try_block): Rename expand_start_catch, and delete - expand_end_catch. - * parse.y (function_try_block): Rename expand_start_catch, and delete - expand_end_catch. - * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete - expand_end_catch. - -1998-06-09 Jason Merrill - - * search.c (lookup_member): New fn. - * class.c (finish_struct_1): Use it. - * decl.c (lookup_name_real): Use it. - -Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi - - * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h. - - * cp-tree.h: Add prototype for `maybe_print_template_context' and - `maybe_make_one_only'. - - * decl.c (auto_function): Remove unused variable `decl'. - - * decl2.c: Include dwarf2out.h and dwarfout.h. - - * lex.c: Remove redundant declarations of `set_float_handler' and - `asm_out_file'. - -1998-06-08 Andrew MacLeod - - * except.c (init_exception_processing): Remove NEW_EH_MODEL compile - time flag. Call __cp_eh_info instead of __cp_exception_info. - * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag. - (__cp_exception_info): Return offset into cp_eh_info structure to - match what use to be the start of this structure. - (__cp_eh_info): New function to return a pointer to cp_eh_info struct. - (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL - compile time flag. - (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call - __cp_eh_info instead of __cp_exception_info. - -1998-06-08 Jason Merrill - - * decl.c (cp_finish_decl): Disable inlining of extern inlines - with static variables. - -1998-06-08 Mark Mitchell - - * init.c (build_offset_ref): Correct previous change to use build, - not build_min. - -1998-06-07 Mark Mitchell - - * class.c (instantiate_type): Handle pointer-to-members where the - member is a template. - * init.c (build_offset_ref): Likewise. - * typeck.c (build_unary_op): Likewise. - -1998-06-07 Richard Henderson - - * lex.c (lang_init_options): New function. - (lang_init): Remove flag_exceptions == 2 hack. - -1998-06-05 Jason Merrill - - * search.c (envelope_add_decl): Tweak for implicit typename. - - * call.c (joust): Also warn about confusing conversion op/constructor - overload resolution. - - * spew.c (yylex): Also return the TYPE_DECL if got_object. - Don't clear got_object after '~'. - * call.c (build_scoped_method_call): Tweak destructor handling. - (build_method_call): Likewise. - * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with - TYPE_MAIN_VARIANT for destructors. - * semantics.c (finish_object_call_expr): Complain about calling a - TYPE_DECL. - -1998-06-05 Per Bothner - - * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles): - Define - update needed by gcc.c change. - -1998-06-05 Jason Merrill - - * error.c (cp_printers): Use 'o' instead of '_' for the null entry. - -1998-06-05 Martin v. Loewis - - * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare. - * decl.c (lookup_name_real): Add namespaces_only parameter. - If set, return only NAMESPACE_DECLs. - (select_decl): Likewise. - (identifier_type_value): Give additional parameter. - (lookup_name_nonclass): Likewise. - (lookup_name): Likewise. - (find_binding): Skip namespace aliases. - (binding_for_name): Likewise. - (push_namespace): Check for namespace aliases. - (lookup_name_namespace_only): New function. - (begin_only_namespace_names, end_only_namespace_names): New functions. - * decl2.c (set_decl_namespace): Skip namespace aliases. - (do_using_directive): Likewise. - (do_namespace_alias): Produce namespace aliases, fix alias - redeclaration. - * error.c (dump_decl): Support SCOPE_REF. - * parse.y (extdef): Wrap lookup with namespace_only for namespace - aliases and using declarations. - -1998-06-04 Jason Merrill - - * tree.c (really_overloaded_fn): Only see through one TREE_LIST. - - * error.c (dump_expr): Clean up NEW_EXPR case. - -1998-06-04 Martin von Löwis - - Suggested by Brendan Kehoe - * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL, - treat it as using ::decl. - - * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE. - - * tree.c (mapcar): Support NEW_EXPR. - - * error.c (dump_expr): Support NEW_EXPR. - -1998-06-03 Jason Merrill - - * method.c (make_thunk): Use overload machinery to make name. - * search.c (covariant_return_p): New fn. - (get_matching_virtual): Use it. - - * init.c (build_new_1): Fix check for void. - -1998-06-01 Per Bothner - - * cp-tree.h (TYPE_FOR_JAVA): New macro. - * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node, - java_int_type_node, java_long_type_node, java_float_type_node, - java_double_type_node, java_char_type_node, java_boolean_type_node): - New "primitive" types, with predefined names __java_byte etc. - (record_builtin_java_type): New function. - (init_decl_processing): Make Java types with record_builtin_java_type. - (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA". - (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class. - (grokfndecl): Call check_java_method for Java classes. - * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA. - (process_overload_item): Match types against specific - java_XX_type_node types, rather than using is_java_type. - * class.c (finish_struct_1): Don't add default copy constructor - or operator= if TYPE_FOR_JAVA. - (pop_lang_conext): Restore strict_prototyp proper if Java. - * decl2.c (acceptable_java_type, check_java_method): New functions. - * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern. - (tsubst): Move common statement after if statement. - * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match. - -1998-06-01 Jason Merrill - - * pt.c (for_each_template_parm): Use first_rtl_op. - - * tree.c (build_cplus_array_type_1): Also check index_type for - template parms. - -1998-05-31 Jason Merrill - - * pt.c (tsubst): Always copy BINFO_BASETYPES. - -1998-05-29 scott snyder - - * tree.c (layout_basetypes): If we change TYPE_SIZE, change - TYPE_SIZE_UNIT too. - -1998-05-29 Mark Mitchell - - * decl.c (grokdeclarator): Don't complain about in-class - initialization of static consts if we don't really know the type - of the variable. - -1998-05-29 Jason Merrill - - * cp-tree.h (DECL_DESTRUCTOR_P): New macro. - * method.c (build_destructor_name): New fn. - * decl2.c (maybe_retrofit_in_chrg): Split out... - (grokclassfn): From here. Reorganize. - * decl.c (grok_ctor_properties): Make sure ctors for types with - vbases have the in_chrg parm. - * pt.c (instantiate_class_template): Update - TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call - grok_*_properties. - (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg. - -1998-05-28 Mark Mitchell - - * pt.c (instantiate_decl): Make test for whether or not static - variables should be instantiated early match its comment. - -1998-05-28 Jason Merrill - - * decl.c (start_decl): Always pedwarn about vacuously redeclaring - a member. - (start_function): Call check_default_args. - * decl2.c (grokfield): Don't call check_default_args. - (check_default_args): Use cp_error_at. - * lex.c (do_pending_defargs): Call check_default_args. - -1998-05-27 Brendan Kehoe - - * call.c (build_method_call): Make sure get_type_value returns - something before we try to use its TYPE_MAIN_VARIANT. - (build_scoped_method_call): Likewise. - -1998-05-27 Jason Merrill - - * typeck2.c (digest_init): Complain about getting a TREE_LIST to - initialize an array. - - * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and - DECL_VIRTUAL_P. - - * friend.c (do_friend): Clarify template warning. - -1998-05-27 Mark Mitchell - - * decl.c (shadow_label): Don't treat decls as identifiers. - (maybe_push_to_top_level): Clear shadowed_labels. - - * pt.c (instantiate_decl): Reset lineno and filename after calling - regenerate_decl_from_template. - - * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an - error_mark_node. - -1998-05-27 Kevin Buhr - - * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE. - -1998-05-26 Kriang Lerdsuwanakij - - * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes. - (convert_nontype_argument): Handle cases when nontype template - parameters become classes after substitution. - -1998-05-26 Mark Mitchell - - * friend.c (is_friend): Use comptypes, rather than == to compare - types. Modify for new representation of template friends. - (make_friend_class): Likewise. - * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak. - (instantiate_class_template): Deal with template friends. - - * decl.c (store_parm_decls): Remove redundant call to - expand_main_function. - -1998-05-26 Benjamin Kosnik - - * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before - DECL_USE_TEMPLATE. - -1998-05-26 Per Bothner - - * language_as_string: Handle lang_java. - -1998-05-26 Jason Merrill - - * decl.c (pushdecl): Don't copy the type_decl. - -1998-05-26 Martin v. Löwis - - * class.c (pushclass): Always store TYPE_MAIN_VARIANT in - current_class_type. - * decl.c (grokdeclarator): Put typedefs on the type's obstack. - - * parse.y (complex_direct_notype_declarator): Use $1 to access - scope of notype_qualified_id. - -1998-05-26 Dave Brolley - - * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib. - (init_parse): Initialize cpplib interface. - - * Makefile.in (CXX_OBJS): Make sure dependencies never end with an - empty continuation. - -1998-05-26 Mark Mitchell - - * decl.c (pushtag): Avoid crashing on erroneous input. - -1998-05-25 Martin v. Löwis - - * decl.c (push_namespace): Only produce one unique name for - anonymous namespaces. - (get_unique_name): Remove. - -1998-05-25 Mark Mitchell - - * call.c (tourney): Don't do any extra comparisons. - - * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions. - - * cp-tree.h (processing_template_parmlist): Declare. - * decl.c (pushtag): Don't call push_template_decl when we - shouldn't. - * pt.c (processing_template_parmlist): New variable. - (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro. - (complete_template_args): Use it. - (add_to_template_args): Likewise. - (innermost_args): Likewise. - (tsubst): Likewise. - (begin_template_parm_list): Use processing_template_parmlist. - (end_template_parm_list): Likewise. - - * cp-tree.h (ANON_UNION_TYPE_P): New macro. - * decl.c (grokdeclarator): Use it. - * decl2.c (grok_x_components): Likewise. - * init.c (initializing_context): Likewise. - * method.c (do_build_copy_constructor): Likewise. - (do_build_assign_ref): Likewise. - * search.c (compute_access): Likewise. - * typeck.c (build_component_ref): Likewise. - - * decl.c (grokdeclarator): Don't give a cv-qualified version of an - unnamed type a typedef name "for linkage purposes". - - * pt.c (lookup_template_class): Don't look at - IDENTIFIER_CLASS_VALUE when there's no current_class_type. - - * method.c (build_overload_int): Handle error cases gracefully. - - * pt.c (instantiate_decl): Handle static member variables - correctly. - - * pt.c (tsubst): Use the tsubst'd type when producing new - TEMPLATE_PARM_INDEX nodes. - -1998-05-24 Mark Mitchell - - * tree.c (cp_tree_equal): Handle pointers to member functions. - - * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make - sure the type of the REF_BIND is a reference type. - (maybe_handle_ref_bind, compare_ics): Rename reference_type to - target_type for clarity. - - * parse.y (xcond): Move call to condition_conversion ... - * semantics.c (finish_for_cond): Here. - * parse.c: Regenerated. - -1998-05-24 Jason Merrill - - * decl.c (push_namespace): Namespaces have type void. - * typeck2.c (incomplete_type_error): Complain about namespace - used as expression. - * typeck.c (decay_conversion): Likewise. - -1998-05-24 Martin von Löwis - - * error.c (dump_expr): Support namespaces. - -1998-05-23 Jason Merrill - - * cp-tree.def: Add SRCLOC. - * cp-tree.h: Add struct tree_srcloc and accessor macros. - * tree.c (build_srcloc, build_srcloc_here): New fns. - * pt.c (add_pending_template): Use build_srcloc_here. - (push_tinst_level): Update last_template_error_tick before erroring. - (instantiate_decl): Restore lineno and input_filename before - calling add_pending_template. - * decl2.c (finish_file): Set up lineno and input_filename for - pending templates. - -1998-05-22 Jason Merrill - - * decl.c (lang_print_error_function): New fn. - (init_decl_processing): Set print_error_function to use it. - * errfn.c (cp_thing): Don't call maybe_print_template_context here. - - * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and - ICS_BAD_FLAG. - - * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for - copy-initialization. - - * class.c (build_vtable_entry): Use int_fits_type_p. - (build_vtable): Pass a signed offset to build_vtable_entry. - (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1, - set_rtti_entry): Likewise. - -1998-05-22 Per Bothner - - * cp-tree.h: Add comments documenting which LANG_FLAGS are used. - (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used. - -1998-05-22 Jason Merrill - - * pt.c (print_template_context): Use fprintf instead of cp_error. - - * pt.c (determine_specialization): Just return an error_mark_node. - Also print the decl we want in error messages. If we complain, - return error_mark_node. - (tsubst_friend_function): Set lineno and input_filename so - error messages will be useful. - (instantiate_template): Just return an error_mark_node. - (check_explicit_specialization): Don't mess with a returned - error_mark_node. - - * pt.c (print_template_context): Add new argument. - (maybe_print_template_context): New fn. - (push_tinst_level): Increment tinst_level_tick. - (pop_tinst_level): Likewise. - * errfn.c (cp_thing): Call maybe_print_template_context. Use - xrealloc instead of xmalloc. - - * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT. - -1998-05-21 Jason Merrill - - * pt.c (tsubst_friend_class): Don't call redeclare_class_template - if the template we looked up is the same as the one we already - have. - -Thu May 21 11:54:44 1998 Dave Brolley - - * lex.c: (handle_sysv_pragma): FILE* parameter not used. - (cpp_reader,parse_in): Add for cpplib. - (check_newline): Call handle_sysv_pragma with new interface. - (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line. - - * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib. - (sub_getch): Call GETC for cpplib. - - * cp-tree.h: (get_directive_line): Different prototype for cpplib. - (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line. - - * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib. - -1998-05-21 Jason Merrill - - * decl2.c (maybe_make_one_only): New fn. - (import_export_vtable): Use it. - (import_export_decl): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - -1998-05-21 Mark Mitchell - - * decl2.c (find_representative_member): Rename to ... - (build_anon_union_vars): New function. - (finish_anon_union): Fix stupidity of previous change. - -1998-05-20 Jason Merrill - - * decl.c (grokfndecl): Handle definition of specialization in - friend declaration. - - * error.c (dump_decl): Fix LOOKUP_EXPR handling. - -1998-05-20 Mark Mitchell - - * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P - to look for type declarations. - (finish_struct): Deal with templates on the CLASSTYPE_TAGS list. - * cp-tree.h (DECL_DECLARES_TYPE_P): New macro. - (finish_member_class_template): Declare. - * decl.c (pushtag): Put member class templates on the - CLASSTYPE_TAGS list, just as for ordinary member classes. - (pushdecl_class_level): Use DECL_DECLARES_TYPE_P. - (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with - IDENTIFIER_NAMESPACE_VALUEs. - * parse.y (component_decl): Move code to ... - * semantics.c (finish_member_class_template): New function. - Don't put member class templates on the list of components for a - class. - * parse.c: Regenerated. - * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types. - In fact, don't use DECL_CONTEXT at all here. - -1998-05-20 Martin von Loewis - - * decl.c (record_unknown_type): New function. - (init_decl_processing): Call it for the unknown and global type - nodes. - -1998-05-20 Mark Mitchell - - * decl2.c (find_representative_member): New function. - (finish_anon_union): Use it. - - * cp-tree.h (MAIN_NAME_P): New macro. - (DECL_MAIN_P): Likwise. - * decl.c (pushdecl): Avoid crashing on redefinitions of `main'. - (grokfndecl): Use the new macros. - (grokdeclarator): Likewise. - (start_function): Likewise. - (store_parm_decls): Likewise. - (finsh_function): Likewise. - * friend.c (do_friend): Likewise. - * typeck.c (build_function_call_real): Likewise. - (build_unary_op): Likewise. - -Wed May 20 02:16:01 1998 Jason Merrill - - * decl2.c (start_objects, finish_objects, do_dtors, - do_ctors): Split out from... - (finish_file): ...here. - -Tue May 19 20:36:23 1998 Jason Merrill - - * tree.c (is_overloaded_fn): Don't abort on placeholders from - push_class_decls. - -Tue May 19 15:16:22 1998 Brendan Kehoe - - * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node. - - * error.c (dump_expr): Handle an ARROW_EXPR. - -Tue May 19 15:13:39 1998 Mark Mitchell - - * decl.c (saveable_obstack): Declare. - (pushdecl): Copy TYPE_DECLs to the same obstack as the type they - declare, if necessary. - -Tue May 19 14:50:27 1998 Mark Mitchell - - * call.c (compare_qual): Remove. - (is_subseq): Tweak. - (is_properly_derived_from): New function. - (maybe_handle_ref_bind): Likewise. - (maybe_handle_implicit_object): Likewise. - (compare_ics): Modify substantially to bring into conformance with - the standard. - * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro. - (comp_cv_qualification): Declare. - (comp_cv_qual_signature): Likewise. - * typeck.c (comp_cv_qualification): Likewise. - (comp_cv_qual_signature): Likewise. - -Tue May 19 10:05:02 1998 Kaveh R. Ghazi - - * Makefile.in (parse.o): Depend on toplev.h. - - * class.c (typecode_p): Remove prototype and definition. - - * cp-tree.h (currently_open_class, is_empty_class, member_p): - Add prototype. - - * decl.c (push_overloaded_decl_top_level): Remove prototype and - definition. - - * errfn.c (cp_error): Cast function pointer `error' to (errorfn *) - in call to `cp_thing'. - (cp_warning): Likewise for function pointer `warning'. - - * except.c (do_function_call): Remove prototype and definition. - (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL. - - * method.c (is_java_type): Add prototype and make it static. - - * parse.y: Include toplev.h. - - * pt.c (type_unification): Remove unused variable `arg'. - (instantiate_decl): Likewise for `save_ti'. - - * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'. - -Tue May 19 02:43:25 1998 Jason Merrill - - * init.c (build_member_call): Handle template_ids. - * parse.y (primary): Add global_scope template_id. - -Mon May 18 23:22:52 1998 Jason Merrill - - * decl2.c (get_sentry): Use end_temporary_allocation. - Don't declare permanent_obstack. - -Mon May 18 12:28:44 1998 Mark Mitchell - - * parse.y (.finish_new_placement): New non-terminal. - (unary_expr, new_type_id): Use it. - * parse.c: Regenerated. - -Mon May 18 12:20:27 1998 Brendan Kehoe - - * pt.c (redeclare_class_template): Say where the original definition - of the template-parameter's default argument appeared. - -Mon May 18 03:00:57 1998 Jason Merrill - - * call.c (build_over_call): Tweak empty class handling. - - * decl.c (make_typename_type): Use currently_open_class. - - * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG. - -Mon May 18 01:43:01 1998 Martin v. Loewis - - * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE - for a type unless it is one. - - * class.c (finish_struct_1): Use OVL_CURRENT in error message. - -Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (program_transform_name, objdir): Define. - - * Makefile.in (BISON): Use bison from the build tree if it exists. - (FLEX): Likewise. - -Sun May 17 14:52:08 1998 Martin v. Loewis - - * typeck.c (type_unknown_p): Return true for TREE_LIST also. - - * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs. - -Sun May 17 14:51:41 1998 Jason Merrill - - * call.c (build_scoped_method_call): Likewise. - -Sun May 17 13:53:48 1998 Mark Mitchell - - * init.c (build_new_1): Call suspend_momentary around the creation - of values that must be saved for exception handling. - * parse.y (.build_new_placement): New non-terminal. - (unary_expr, new_placement): Use it. - * parse.c: Regenerated. - -Sun May 17 12:32:08 1998 Jason Merrill - - * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare - old and new types. - - * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the - canonical type. - - * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace. - -Fri May 15 20:28:00 1998 Jason Merrill - - * decl.c (start_decl): Revert problem change. - - * Makefile.in (CONFLICTS): Fix. - -Fri May 15 15:34:02 1998 Benjamin Kosnik - - * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits. - -Fri May 15 00:46:05 1998 Jason Merrill - - * class.c (finish_struct_1): Use BINFO_SIZE. - - * decl.c (start_decl): Use 'tem'. - -Thu May 14 16:30:47 1998 Andrew MacLeod - - * exception.cc: Include eh-common.h. - (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL. - (__cplus_type_matcher): First stab at new C++ runtime type matcher. - (__cp_push_exception): Initialize eh_info struct as well. - * except.c: Remove local structs and include eh-common.h. - (init_exception_processing): Set language and version codes. - (call_eh_info): Add presence of eh_info to runtime description of - struct cp_eh_info. - (expand_end_eh_spec): Call start_catch_block() and end_catch_block(). - * semantics.c (finish_try_block): Call start_catch_block() and - end_catch_block(). - * parse.y (function_try_block): Call start_catch_block() and - end_catch_block(). - -Thu May 14 12:27:34 1998 Brendan Kehoe - - * typeck.c (original_type): New function. - (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2, - to see if they're actually the same. - * cp-tree.h (original_type): Declare. - -Wed May 13 12:54:30 1998 Kaveh R. Ghazi - - * Makefile.in (lex.o): Depend on output.h. - - * call.c (add_function_candidate): Remove unused variable `cand'. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - - * cp-tree.h: Add prototype for `types_overlap_p'. - - * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED. - - * decl2.c (merge_functions): Remove unused variables `tmp' and - `tempn'. - - * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED. - (code_as_string): Likewise. - (language_as_string): Likewise. - (parm_as_string): Likewise. - (op_as_string): Likewise. - (assop_as_string): Likewise. - (cv_as_string): Likewise. - - * lex.c: Include output.h. - - * pt.c (type_unification): Cast first argument of `bzero' to a char*. - - * search.c (dfs_no_overlap_yet): Mark parameter `t' with - ATTRIBUTE_UNUSED. - - * tinfo.cc (__class_type_info::dcast): Change the type of variable - `i' from int to size_t. - - * typeck.c (language_lvalue_valid): Mark parameter `exp' with - ATTRIBUTE_UNUSED. - -Tue May 12 21:37:49 1998 Jason Merrill - - * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or - DECL_NAMESPACE_SCOPE_P. - (lang_decl_name): Likewise. - * pt.c (tsubst_friend_function, tsubst): Likewise. - * decl.c (pushdecl, redeclaration_error_message, start_decl, - cp_finish_decl, start_function): Likewise. - * class.c (finish_struct_1): Likewise. - * call.c (build_over_call): Likewise. - (compare_ics): Use DERIVED_FROM_P. - -Tue May 12 07:24:18 1998 Mark Mitchell - - * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro. - * method.c (build_mangled_name): Use it. - (build_decl_overload_real): Likewise. - - * error.c (dump_simple_decl): New function, broken out from ... - (dump_decl): Use it. - -Mon May 11 11:38:07 1998 Mark Mitchell - - * ptree.c (lang_print_xnode): Add missing `break'. - - * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE. - - * call.c (add_template_candidate): Adjust for changes to - fn_type_unification. - (add_template_candidate_real): Likewise. - (add_template_conv_candidate): Likewise. - (build_user_type_conversion_1): Likewise. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - * class.c (instantiate_type): Likewise. - * cp-tree.h (unification_kind_t): New type. - (fn_type_unification): Adjust prototype. - (type_unificaiton): Likewise. - * pt.c (UNIFY_ALLOW_NONE): New macro. - (UNIFY_ALLOW_MORE_CV_QUAL): Likewise. - (UNIFY_ALLOW_LESS_CV_QUAL): Likewise. - (UNIFY_ALLOW_DERIVED): Likewise. - (unify): Change prototype. - (maybe_adjust_types_for_deduction): New function. - (check_cv_quals_for_unify): Likewise. - (determine_specialization): Adjust. - (fn_type_unification): Likewise. - (type_unification): Likewise. - (type_unification_real): Likewise. Use - maybe_adjust_types_for_deduction. Fix mishandling of - back-unification of template functions passed as arguments. Pass - appropriate combination of UNIFY_ALLOW_* to unify. - (unify): Remove unused NTPARMS parameter. Use - check_cv_quals_for_unify. Remove bogus code that allowed - too-generous unification in order to adhere more closely to standard. - (get_bindings_real): Adjust. - (get_class_bindings): Likewise. - - * method.c (build_overload_identifier): Only use the innermost - template arguments when mangling. - * pt.c (tsubst_template_argument_vector): New function. - (complete_template_args): Deal with the situation where the - extra_args contain more than one level of arguments. - (lookup_template_class): Deal with member template classes, which - may have more than one level of arguments. - (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE. - Improve handling of member template classes. Use - DECL_PRIMARY_TEMPLATE instead of inline expansion. Use - tsubst_template_argument_vector where appropriate. - (regenerate_decl_from_template): Break out from ... - (instantiate_decl): Here. - - * lex.c (yyprint): Remove TYPENAME_ELLIPSIS. - * parse.h: Regenerated. - * parse.c: Really regenerated. - - * cp-tree.h (finish_unary_op_expr): New function. - (finish_id_expr): Likewise. - (begin_new_placement): Likewise. - (finish_new_placement): Likewise. - (finish_declarator): Likewise. - (finish_translation_unit): Likewise. - (finish_parmlist): Likewise. - (begin_class_definition): Likewise. - (finish_class_definition): Likewise. - (finish_default_args): Likewise. - (finish_inline_definitions): Likewise. - * parse.y (GCC_ASM_KEYWORD): Remove. - (TYPENAME_ELLIPSIS): Likewise. - * parse.c: Regenerated. - Use new functions in semantics.c in the actions for many rules. - * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD. - * hash.h: Regenerated. - * semantics.c (finish_expr_stmt): Allow NULL expr. - (finish_unary_op_expr): New function, containing - code previously in parse.y. - (finish_id_expr): Likewise. - (begin_new_placement): Likewise. - (finish_new_placement): Likewise. - (finish_declarator): Likewise. - (finish_translation_unit): Likewise. - (finish_parmlist): Likewise. - (begin_class_definition): Likewise. - (finish_class_definition): Likewise. - (finish_default_args): Likewise. - (finish_inline_definitions): Likewise. - -Sun May 10 23:43:13 1998 Mark Mitchell - - * typeck.c (build_c_cast): Don't decay arrays and functions to - pointer type when converting to a class type. - -Sun May 10 22:53:56 1998 Jason Merrill - - * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro. - (DECL_CLASS_SCOPE_P): Likewise. - -Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org) - - * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT. - * decl2.c (constructor_name_full): Likewise. - -Sun May 10 22:48:12 1998 Mike Stump - - * tree.c (mapcar): Add OVERLOAD support. - - * init.c (resolve_offset_ref): We must use basetype_path before we - destroy it with a call to convert_pointer_to. - -Sat May 9 14:44:37 1998 Jason Merrill - - * class.c (currently_open_class): New fn. - * decl.c (lookup_name_real): Use it. - * search.c (lookup_field): Likewise. - -Fri May 8 23:32:42 1998 Martin von Loewis - - * cp-tree.def (OVERLOAD): New node. - * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE, - SET_IDENTIFIER_NAMESPACE_VALUE): Define. - (NAMESPACE_BINDING): Remove. - (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use - namespace_binding. - (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED): - Define. - (tree_overload): New struct. - (IDENTIFIER_TYPE_VALUE): Use identifier_type_value. - (REAL_IDENTIFIER_TYPE_VALUE): Define. - (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE. - (lang_decl_flags): Remove in_namespace. - (lang_decl): Remove chain. - (DECL_CHAIN, DECL_NAMESPACE): Remove. - (flag_honor_std): Declare extern. - (identifier_type_value, pushdecl_namespace_level, push_using_decl, - namespace_binding, set_namespace_binding, - lookup_function_nonclass, cat_namespace_levels, - set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons, - scratch_ovl_cons, ovl_member, build_overload): Declare. - (decl_list_length, get_namespace_id, current_namespace_id, - overloaded_globals_p): Remove. - (lookup_using_namespace, qualified_lookup_using_namespace): Change - return type. - (push_scratch_obstack): New macro. - * call.c (add_function_candidate): Special-case type of OVERLOAD node. - (build_user_conversions_1): Iterate using OVL_NEXT for ctors, - convs, fns. - (build_new_function_call): Iterate using OVL_CHAIN. - Print DECL_NAME in when reporting ambiguities. - (build_object_call): Iterate using OVL_NEXT for fns, convs. - (build_new_op): Call lookup_function_nonclass. - Iterate using OVL_NEXT. - (build_op_delete_call): Change detection of members. - Do not wrap TREE_LIST around fields and single global functions. - (build_over_call): Don't push a class level if the context is a - namespace. - (build_new_method_call): Iterate using OVL_NEXT. - * class.c (add_method): Chain overloaded members using - build_overload. Remove copying of method. - (grow_method): When iterating through the obstack, expect OVERLOAD - nodes. Chain overload members. - (finish_struct_methods): Chain overload members. Unpack OVERLOAD - nodes in call to get_baselinks. - (duplicate_tag_error): Expect OVERLOAD nodes when unchaining. - (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle - fdecls that are OVERLOAD nodes. - (validate_lhs): New function. - (instantiate_type): Do not copy OVERLOAD nodes. Remove dead - code. Use DECL_NAME in error messages. Split code between global - and member function processing. - * decl.c (global_type_node): New static variable. - (in_std): New global. - (struct binding_level): New field usings. - (resume_binding_level): Assert that we are not in a class. - (toplevel_bindings_p): Just check for namespace_p or - pseudo_global. - (resume_level): Remove. - (find_binding): New function. - (binding_for_name): Call it. - (namespace_binding, set_namespace_binding): New functions. - (push_namespace): Associate binding level with new namespace, - resume_binding_level for existing namespace. Remove old code. - Fake std by counting. - (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE. - (maybe_push_to_top_level): Save current namespace. - (pop_from_top_level): Restore saved namespace. - (pop_namespace): Call suspend_binding_level. Remove old code. - (cat_namespace_levels): New function. - (set_identifier_type_value_with_scope): For namespace bindings, - set BINDING_TYPE, and use global_type_node. - Use REAL_IDENTIFIER_TYPE_VALUE otherwise. - (identifier_type_value): New function. - (pushtag): If no context, use current_namespace. - (duplicate_decls): Don't process DECL_CHAIN. - (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not - already set. Never reset it to NULL_TREE. Lookup global variables - in their namespace. Push overloaded templates if they are on - namespace level. - (pushdecl_namespace_level): New function. - (pushdecl_top_level): Implement using pushdecl_namespace_level. - (pushdecl_using_decl): New function. - (overloaded_globals_p): Remove. - (push_overloaded_decl): Create OVERLOAD nodes, and iterate through - them. Use namespace_binding and set_namespace_value. - (redeclaration_error_message): Complain if the declarations come - from different namespaces. - (lookup_tag): On namespace level, look in the BINDING_TYPE. - (lookup_namespace_name): Pass tree_bindings from stack. Remove - old code. - (select_decl): New function. - (lookup_name_real): Call it for qualified and unqualified lookup. - Pass tree_bindings from the stack. - If prefer_type is 1, also accept namespaces. - (lookup_function_nonclass): New function. - (init_decl_processing): Set the binding level of the global - namespace to global_binding_level. - Build a proper type list for __builtin_apply. - Initialize std_node to "fake std" if flag_honor_std is set. - Initialize global_type_node. - Allocated bad_alloc in namespace std if flag_honor_std. - (define_function): Set the DECL_CONTEXT to the current_namespace. - (start_decl): A namespace is not considered as a context here. If - the DECL_CONTEXT is a namespace, push the decl. - (cp_finish_decl): Check for namespaces used as initializers. - (grokfndecl): Add namespace parameter. Remove processing of - DECL_CHAIN. - (grokvardecl): Add namespace parameter. - (grokdeclarator): Process SCOPEs that are namespaces. For - mangling, temporarily set the DECL_CONTEXT on anonymous structs. - (start_function): Check for contexts that are namespaces. - Set context for declarations that have not been pushed. - (store_parm_decls): Check for ::main only. - (finish_function): Likewise. - (start_method): Check for contexts that are namespaces. - (start_method): Remove DECL_CHAIN processing. - * decl2.c (flag_honor_std): Declare. - (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given. - (decl_namespace_list): New static global. - (grok_x_components): Ignore namespaces as type contexts. - (check_classfn): Expect OVERLOAD nodes. - (grokfield): Remove DECL_CHAIN processing. - (finish_file): Call cat_namespace_levels. - (merge_functions): New function. - (ambiguous_decl): Rewrite. - (lookup_using_namespace): Produce tree_bindings. - (qualified_lookup_using_namespace): Likewise. - (set_decl_namespace, decl_namespace, current_decl_namespace, - push_decl_namespace, pop_decl_namespace): New functions. - (arg_lookup): New struct. - (add_function, arg_assoc_namespace, arg_assoc_class, - arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent): - New functions. - (get_namespace_id, current_namespace_id): Remove. - (do_toplevel_using_decl): Rewrite. - (do_class_using_decl): Complain about namespace qualifiers. - (do_using_directive): Sorry if not on namespace level. Complain - about unknown namespaces. - * error.c (dump_aggr_type): Check for namespace contexts. - * except.c (init_exception_processing): Push terminate into std. - * friend.c (is_friend): A namespace is not a context, here. - * init.c (expand_member_init): Remove DECL_CHAIN processing. - (build_offset_ref): Process OVERLOAD nodes. - * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std. - * lex.c (identifier_type): Loop using OVL_CHAIN. - (see_typename): Set looking_for_typename to 2. - (real_yylex): Likewise. - (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs. - (do_scoped_id): Expect OVERLOAD nodes. - Change calling convention for qualified_lookup_using_namespace. - (build_lang_decl): Don't set in_namespace anymore. - * method.c (typevec_size): New global. - (build_overload_nested_name): Return if global_namespace. - Otherwise, always expect a declaration context. - (build_qualified_name): Likewise. - Make sure we don't write beyond typevec_size. - (build_decl_overload_real): Likewise. - Allocate one extra slot for the namespace. - (hack_identifier): Mark code dead. - Process OVERLOAD and NAMESPACE_DECL nodes. - * parse.y (program): Pop namespaces until in global namespace. - (extdef): In a using-declaration, don't discard the identifier if - there is no declaration. - (left_curly): Ignore type contexts which are namespaces. - (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type - used as scope. - * pt.c (template_class_depth): Expect types to be namespaces. - (determine_specialization): Simplify by expecting OVERLOAD nodes. - (push_template_decl): Push into namespace level. - Reset ctx if it is a namespace. - Set DECL_CONTEXT to current_namespace if not set already. - Ignore real contexts that are namespaces. - (mangle_class_name_for_template): Skip global_namespace. - Mangle other namespaces as declarations. - (lookup_template_function): Set type of OVERLOAD nodes to unknown. - (lookup_template_class): Push into namespace of context. - If the context is a namespace, set it to global_namespace. - Use id_context for mangling. - (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes. - (tsubst_friend_function): Ignore namespace contexts. - Push into namespace level. - (tsubst): Handle NAMESPACE_DECL nodes. - Remove DECL_CHAIN processing. - (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes. - * ptree.c (print_lang_identifier): Print bindings. - (lang_print_xnode): Print OVERLOAD nodes. - * rtti.c (init_rtti_processing): Push type_info into std. - * search.c (lookup_fnfields_here): Expect OVERLOAD nodes. - (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual, - dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions, - lookup_fnfields_here): Likewise. - Process all nodes, instead of going through TREE_CHAIN. - * sig.c (build_signature_pointer_or_reference_type): Set context - to global_namespace. - (build_signature_table_constructor): Expect OVERLOAD nodes. - * spew.c (yylex): Save old setting of looking_for_typename. - * tree.c (decl_list_length): Remove. - (binding_init): New function. - (count_functions): Rewrite. - (is_overloaded_fn): Expect OVERLOAD nodes. - (really_overloaded_fn, get_first_fn, lvalue_type): Likewise. - (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after, - ovl_member): New functions. - * typeck.c (require_complete_type): Expect OVERLOAD nodes. - (type_unknown_p): Likewise. - (require_instantiated_type): Likewise. - (build_component_ref): Declare code dead. - (build_x_function_call): Create and expect OVERLOAD nodes. - (build_function_call_real): Check for ::main only. - (build_unary_op): Likewise. Expect OVERLOAD nodes. - (convert_for_assignment): Check for TREE_LIST before accessing - TREE_VALUE. - * decl.c (duplicate_decls): Check for namespace bindings instead - of global bindings. - (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real, - lookup_name_current_level, start_decl, xref_tag, - finish_enum): Likewise. - * init.c (build_offset_ref): Likewise. - * search.c (lookup_field): Likewise. - (lookup_fnfields): Likewise. - (dfs_debug_mark): Likewise. - * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE. - (poplevel_class, pop_from_top_level): Likewise. - * decl2.c (finish_method): Likewise. - * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE. - * decl.c (record_builtin_type): Likewise. - (init_decl_processing, grokfndecl): Likewise. - * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise. - (make_lang_type): Likewise. - * parse.y (make_thunk): Likewise. - * pt.c (tsubst): Likewise. - * tree.c (debug_binfo): Likewise. - * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h, - tinfo2.cc, inc/new.h: Add std qualifications. - * inc/new: Wrap with namespace std if __HONOR_STD. - * inc/typeinfo: Likewise. - -Fri May 8 00:43:50 1998 Jason Merrill - - * call.c (build_user_type_conversion_1): Handle second_conv - properly for templates. - -Thu May 7 17:09:25 1998 Andrew MacLeod - - * method.c (build_decl_overload_real): Set TREE_USED flag to - zero for build_type_variants nodes as well. - -Wed May 6 19:27:09 1998 Jason Merrill - - * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE. - -Wed May 6 16:49:48 1998 Jim Wilson - - * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o, - except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o, - rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o, - xref.o): Add toplev.h dependencies. - -Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com) - - * errfn.c (cp_error, cp_warning): Remove declarations for - error and warning respectively. - -Wed May 6 14:28:18 1998 Kaveh R. Ghazi - - * error.c: Convert to using ctype macros defined in system.h. - * method.c: Likewise. - * xref.c: Likewise. - * lex.c: Likewise. Also remove redundant system header stuff. - -Wed May 6 06:36:41 1998 Robert Lipe - - * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c, - expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c, - search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c, - xref.c: Add include of toplev.h. - -Wed May 6 02:33:39 1998 Jason Merrill - - * tree.c (perm_manip): Also regenerate the RTL of an extern. - (copy_to_permanent): Use end_temporary_allocation. - -Tue May 5 23:54:04 1998 Jason Merrill - - * init.c (expand_vec_init): The initialization of each array - element is a full-expression. - -Tue May 5 18:24:13 1998 Andrew MacLeod - - * method.c (build_mangled_name): Add a call to build_type_variant - to get the right type. - -Tue May 5 01:25:03 1998 Jason Merrill - - * Makefile.in: Add .SUFFIXES. - - * cp-tree.def: Remove NAMESPACE_DECL. - -Sun May 3 01:32:14 1998 Jason Merrill - - * call.c (build_over_call): Do evaluate arg even if it has empty - class type. - * decl.c (start_function): Don't push a member function. - -Thu Apr 30 18:59:23 1998 Jim Wilson - - * Makefile.in (g++FAQ.info): Put -o option before input file. - -Thu Apr 30 13:05:33 1998 Andrew MacLeod - - * gxxint.texi: Add info for squangling codes K and B. - -Tue Apr 28 13:22:01 1998 Mark Mitchell - - * semantics.c (begin_stmt_expr): Avoid duplicating the effect of - the expression in templates. - (finish_stmt_expr): Likewise. - -1998-04-28 Brendan Kehoe - - * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int. - -Mon Apr 27 13:58:10 1998 Mark Mitchell - - * decl.c (maybe_push_to_top_level): Always clear - current_template_parms and processing_template_decl. - (pushtag): Remove check of current_class_type and some comments, - since maybe_push_to_top_level no longer creates confusion. - -Sun Apr 26 12:10:18 1998 Mark Mitchell - - * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro. - (DECL_CLASS_TEMPLATE_P): Likewise. - (DECL_PRIMARY_TEMPLATE): Likewise. - (PRIMARY_TEMPLATE_P): Use it. - (push_template_decl_real): New function. - (redeclare_class_template): Take new template parameters as - input. - (is_specialization_of): New function. - (comp_template_args): Declare. - * decl.c (pushtag): Handle friend template classes. - (xref_tag): Likewise. Use new calling convention for - redeclare_class_template. - * decl2.c (grok_x_components): Handle friend templates. - * friend.c (is_friend): Use is_specialization_of where - appropriate. Deal with friend class templates. - (make_friend_class): Let a class template be friends with itself. - * pt.c (comp_template_args): Remove declaration. - (tsubst_friend_class): New function. - (push_template_decl_real): New function. - (push_template_decl): Use it. - (redeclare_class_template): Adjust for new calling convention. - (comp_template_args): Give it external linkage. - (instantiate_class_type): Use tsubst_friend_class to deal - with friend templates. - * typeck.c (comptypes): Use comp_template_args, rather than - expanding it inline. - * parse.y (component_decl): Handle a nested template type - like other component type declarations. - - * pt.c (check_explicit_specialization): Handle overloaded - constructors correctly. - - * pt.c (mabybe_get_template_decl_from_type_decl): New function. - (lookup_template_class): Use it. - -Thu Apr 23 21:19:06 1998 Jason Merrill - - * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops. - * cp-tree.h: Add WRAPPER support. - * call.c (add_candidate): Split out from add_*_candidate fns. - (build_over_call): Take the candidate instead of function and args. - Enforce access control here. Emit overload warnings here. - (add_warning): New fn. - (joust): Add WARN parm. If not set, call add_warning instead of - printing a warning. Re-enable some warnings. - (tourney): Pass it. - (convert_like): Adjust. - (build_new_op): Adjust. - (build_new_function_call): Adjust. - (build_user_type_conversion_1): Adjust. - (USER_CONV_FN): Adjust. - * tree.c (build_expr_wrapper, build_expr_ptr_wrapper, - build_int_wrapper): New fns. - -Thu Apr 23 18:27:53 1998 Mark P. Mitchell - - * pt.c (unify): Fix typo in previous change. - -Thu Apr 23 09:32:58 1998 Jason Merrill - - * error.c (dump_type_real): Declare canonical_name. - - * typeck.c (comp_target_types): Fix PMFs. - -Wed Apr 22 13:24:48 1998 Mark Mitchell - - * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for - the DECL_RESULTs of a member TEMPLATE_DECL, not just the - TEMPLATE_DECL. - - * pt.c (tsubst): Decrease the template-level of - TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a - TEMPLATE_PARM_INDEX. - (template_decl_level): New function. - (unify): Make sure to record unifications for template - parameters, even when the parameters exactly match the arguments. - Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and - TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that - aren't from the level we're currently working on. - -Tue Apr 21 22:00:04 1998 Mark Mitchell - - * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory. - - * decl2.c (check_member_template): Set DECL_IGNORED for member - class templates, too. - - * decl2.c (grokfield): Remangle the name of a member TYPE_DECL. - -Tue Apr 21 18:59:11 1998 Benjamin Kosnik - - * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function. - -Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com) - - * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare. - * decl.c (intTI_type_node, unsigned_intTI_type_node): Define. - (init_decl_processing): Handle TI types. - * typeck.c (unsigned_type, signed_type): Handle TI types. - -Sat Apr 18 15:25:21 1998 Jim Wilson - - * g++spec.c (lang_specific_driver): New argument in_added_libraries. - New local added_libraries. Increment count when add library to - arglist. - -Fri Apr 17 21:25:00 1998 Mark Mitchell - - * cp-tree.h (type_as_string_real): New function. - * pt.c (mangle_class_name_for_template): Use it. - * error.c (dump_aggr_type): Change prototype. - (dump_type_prefix): Likewise. - (dump_type_suffix): Likewise. - (dump_type_real): Convert from dump_type. If desired, the - "canonica" name of a typedef, i.e., the name of the underlying - type, can be printed. - (dump_type): Call dump_type_real. - -Fri Apr 17 14:30:45 1998 Jason Merrill - - * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks. - - * typeck.c (comp_target_types): Tweak pedantic case. - (comp_target_parms): Tweak pedantic case. Clean up somewhat. - Return -1 or 1 instead of 1 or 2. - (compparms): Remove STRICT handling. - (convert_for_assignment): Fix handling of pmfs. - -Fri Apr 17 14:04:16 1998 Mark Mitchell - - * typeck.c (comp_target_types): Handle references like pointers. - (comp_target_parms): Note that return code from comp_target_types - can be negative to indicate failure. - -Fri Apr 17 09:10:52 1998 Andreas Schwab - - * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG), - which requires a working target compiler to build. - -Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com) - - * tree.c (avoid_overlap): Add prototype. - - * spew.c (num_tokens): Add prototype. - (nth_noken, add_token, consume_token, debug_yychar): Likewise. - - * search.c (dfs_check_overlap): Add prototype. - (dfs_no_overlap_yet): Likewise. - - * pt.c (original_template): Add prototype. - (inline_needs_template_parms): Likewise. - (push_inline_template_parms_recursive): Likewise. - (retrieve_specialization, register_specialization): Likewise. - (print_candidates, reduce_template_parm_level): Likewise. - (build_template_decl, mark_template_parm): Likewise. - (tsubst_friend_function, get_bindings_real): Likewise. - - * method.c (start_squangling): Add prototype. - (end_squangling, check_ktype, issue_ktype): Likewise. - (build_overloaded_scope_ref, check_btype): Likewise. - (build_mangled_template_parm_index): Likewise. - - * lex.c (init_cpp_parse): Add prototype. - (handle_cp_pragma, handle_sysv_pragma): Likewise. - (reduce_cmp, token_cmp): Likewise. - - * except.c (call_eh_info): Add prototype. - (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise. - (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise. - - * decl2.c (is_namespace_ancestor): Add prototype. - (namespace_ancestor, add_using_namespace): Likewise. - (ambiguous_decl): Likewise. - - * decl.c (indent): Add prototype. - - * call.c (add_template_candidate_real): Add prototype. - -Fri Apr 17 01:57:12 1998 Jason Merrill - - * decl2.c (build_expr_from_tree): Just return a PMF. - -Fri Apr 17 00:45:12 1998 Mark Mitchell - - * typeck2.c (process_init_constructor): Don't strip cv-qualifiers - when doing initializations. - - * pt.c (unify): Use comptypes to compare type args. - -Fri Apr 17 00:24:22 1998 Jason Merrill - - * decl.c (duplicate_decls): Fix check for when it's safe to free - the new decl. - - * pt.c (mangle_class_name_for_template): Don't pass a typedef type - to type_as_string. - -Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com) - - * pt.c (build_template_parm_index): Add prototype. - - * search.c (my_tree_cons): Don't clear words outside the - newly allocated node. - -Wed Apr 15 15:34:44 1998 Dave Brolley - - * lex.c (init_parse): Now returns char* containing the filename. - -Wed Apr 15 13:20:06 1998 John Carr - Jeff Law - - * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer - than a pointer. - -Sun Apr 12 22:31:19 1998 Richard Kenner - - * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION. - -Fri Apr 10 12:16:49 1998 Benjamin Kosnik - - * decl.c (duplicate_decls): Don't warn for redundant decls if - friend: let add_friend take care of it. - -Thu Apr 9 02:40:48 1998 Jason Merrill - - * sig.c (build_signature_pointer_constructor): Don't set - TREE_HAS_CONSTRUCTOR for a signature pointer. - * cvt.c (ocp_convert): Don't force a temporary for internal structs. - * init.c (resolve_offset_ref): Warn about implicit & on pmfs - here, too. - * typeck.c (build_unary_op): Only allow taking the address of a - real constructor. - * typeck2.c (digest_init): Simplify. - (store_init_value): Don't pedwarn about using { } for pmfs. - -Thu Apr 9 22:16:57 1998 Per Bothner - - * cp-tree.h (start_decl): Update prototype. - * decl.c (start_decl): Like the C version, new parameters - for the attributes. Call cplus_decl_attributes here, - (pushdecl): Like C version, do build_type_copy if TYPE_DECL, - (grokdeclarator): Pass NULL for new start_decl arguments. - * pt.c (tsubst_expr): Likewise. - * parse.y: Merge cplus_decl_attribute calls into start_decl calls. - * typeck.c (common_type): Check TYPE_MAIN_VARIANT. - * lex.c (build_lang_decl): Add lang_name_java. - * class.c (push_lang_context): Add lang_name_java. - * method.c (build_mangled_name): Check for is_java_type. - -Thu Apr 9 22:16:57 1998 Benjamin Kosnik - - * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT. - * call.c (build_scoped_method_call): Check for TREE_CODE for - VOID_TYPE instead of type == void_type_node. - (build_method_call): Likewise. - * decl.c (lookup_name_real): Likewise. - (grokdeclarator): Likewise. - (start_decl): Likewise. - (grokparms): Likewise. - (start_function): Likewise. - (finish_function): Likewise. - (start_method): Likewise. - -Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com) - - * lex.c (finput): New variable. - (init_cpp_parse): Renamed from init_parse. - (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished. - (finish_parse): New function. - * cp-tree.h (init_lex, init_parse): Remove declarations. - -Mon Apr 6 02:25:05 1998 Jason Merrill - - * call.c (build_call): Still evaluate the actual argument. - * class.c (is_empty_class): Update for -fnew-abi. - - * decl2.c: -fnew-abi implies -fsquangle. - - * method.c (do_build_assign_ref): Don't do anything to copy - an empty class. - (do_build_copy_constructor): Likewise. - * call.c (build_over_call): Likewise. - -Sat Apr 4 18:43:58 1998 Jason Merrill - - * tree.c (avoid_overlap): Return a value. - -Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com) - - * method.c (check_btype): Add missing argument to xrealloc. - (check_ktype): Likewise. - -Fri Apr 3 02:22:59 1998 Jason Merrill - - Implement empty base optimization. - * class.c (finish_struct_1): Add vbase fields earlier. Set - CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty. - * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns. - (types_overlap_p): New fn. - * tree.c (avoid_overlap): New fn. - (build_base_fields): Use it to avoid overlapping empty bases. - * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi. - - * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs. - - Re-implement allocation of base class subobjects. - * tree.c (unshare_base_binfos): New fn. - (layout_basetypes): Use it. Now handles offsets of both virtual and - non-virtual bases, after layout_type. - (layout_vbasetypes): Remove. - (build_base_fields): Generate FIELD_DECLs for each non-virtual base. - (build_vbase_pointer_fields): Split out from old layout_basetypes. - * class.c (finish_base_struct): Lose offset handling code. - Move nonvdtor warning here. Don't mess with t_binfo anymore. - (finish_struct_1): Don't mess with t_binfo anymore. Use fns above. - * cp-tree.h: Adjust. - -Thu Apr 2 14:25:13 1998 Jason Merrill - - * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff. - * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise. - * class.c (duplicate_tag_error): Likewise. - (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN. - * tree.c (layout_vbasetypes): Update from layout_record, remove - var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE. - (layout_basetypes): Likewise. - -Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com) - - * class.c, Make sure system.h is included just after config.h. - Delete lingering stdio and errno references too. - * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise. - -Wed Apr 1 15:38:36 1998 Jason Merrill - - * friend.c (is_friend): Fix access control for local classes. - - * class.c (is_empty_class): New fn. - * call.c (build_call): Don't pass empty class objects to a function. - -Wed Apr 1 14:58:35 1998 Mark Mitchell - - * call.c (build_over_call): Do name resolution for default - arguments of function templates in the scope of the templates. - -Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com) - - * call.c: Include system.h. Remove includes, declarations and - defines provided by system.h. - * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise. - * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise. - * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise. - * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise. - * typeck2.c, xref.c: Likewise. - * Makefile.in: Dependencies updated as appropriate. - * Make-lang.in: Likewise. - -Mon Mar 30 12:15:00 1998 Mark Mitchell - - * pt.c (fn_type_unification): Allow incomplete unification without - an immediate error message. - -Mon Mar 30 08:55:42 1998 Jason Merrill - - * tree.c (member_p): New fn. - * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for - initializing class members. - - * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'. - * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX. - - * call.c (build_method_call): Handle non-scoped destructors, too. - * pt.c (tsubst_copy): Likewise. - - * pt.c (print_template_context): Split out... - (push_tinst_level): ...from here. - - * friend.c (is_friend): Don't pass a type to decl_function_context. - - * typeck.c (convert_for_initialization): Always hand off - conversions to class type. - -Sun Mar 29 20:01:59 1998 Jason Merrill - - * friend.c (is_friend): Local classes have the same access as the - enclosing function. - -Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com) - - * typeck.c (expand_target_expr): Delete dead function. - - * search.c: Put various prototypes inside #ifdef MI_MATRIX. - - * repo.c (save_string): Delete dead function. - - * method.c (thunk_printable_name): Delete dead function. - - * lex.c (yynextch): Delete dead function. - - * expr.c (tree_extract_aggr_init): #if 0 out. - - * except.c (do_unwind): Delete dead function. - (easy_expand_asm): Likewise. - - * cvt.c (build_conversion_type_1): Delete dead function. - - * cp-tree.h (push_expression_obstack): Declare. - - * call.c (source_type): #if 0 out. - - * class.c (alter_access): Remove unused label. Add braces - around empty else clause. - - * lex.c (yyprint): Fix argument to printf. - -Sat Mar 28 17:43:52 1998 Mark Mitchell - - * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs. - - * pt.c (instantiate_class_template): Make sure template - arguments are permanent. - * init.c (resolve_offset_ref): Don't go looking around in - template types. - - * semantics.c: Add routines to handle expressions, and some - declaration processing. - * parse.y: Use them. - (current_class_depth): Move declaration to cp-tree.h. - * parse.c: Regenerated. - * cp-tree.h: Use them. - (current_class_depth): Declare. - * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr. - -Fri Mar 27 20:23:18 1998 Mark Mitchell - - * error.c (dump_decl): Be a bit more explicit with template - type arguments, when verbose. - -Fri Mar 27 18:16:40 1998 Jason Merrill - - * inc/exception: Reorder closing braces. - -Fri Mar 27 13:22:18 1998 Mark Mitchell - - * pt.c (redeclare_class_template): New function. - * cp_tree.h (redeclare_class_template): Declare it. - * decl.c (xref_tag): Use it. - -Thu Mar 26 11:16:30 1998 Jason Merrill - - * call.c (build_over_call): Check IS_AGGR_TYPE, not - TYPE_LANG_SPECIFIC. - * typeck.c (convert_arguments): Likewise. - - * decl.c (grokdeclarator): Remove const and volatile from type after - setting constp and volatilep. - - * class.c (finish_struct_1): Don't warn about bool bitfield larger - than one bit. - -Thu Mar 26 10:25:52 1998 Mark Mitchell - - * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate. - -Thu Mar 26 10:24:05 1998 Mark Mitchell - - * call.c (build_object_call): Complain about ambiguous operator(), - rather that crashing. - (build_new_op): Likewise. - (build_op_delete_call): Likewise. - -Thu Mar 26 10:23:24 1998 Mark Mitchell - - * cvt.c (perform_qualification_conversions): Use comp_target_types - instead of comp_ptr_ttypes. - -Wed Mar 25 16:10:50 1998 Mark Mitchell - - * cp-tree.h (enforce_access): Declare. - * call.c (enforce_access): Make it extern, not static. - * class.c (alter_access): Use enforce_access; modify code for ISO - compliance, rather than ARM rules. - -Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij - - * cp-tree.h: Fix typo. - -Wed Mar 25 02:01:02 1998 Jason Merrill - - * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing - if (aggregate_value_p (type)). - - * decl2.c (constructor_name_full): Handle TYPENAME_TYPE. - -Tue Mar 24 16:12:01 1998 Mark Mitchell - - * tree.c (mapcar): When dealing with a DECL, use it's constant - value, if any. - * pt.c (lookup_template_class): Don't mangle the names of template - classes whose arguments are unknown. - - * pt.c (tsubst_expr): Handle GOTO_STMT correctly. - -Tue Mar 24 12:21:55 1998 Benjamin Kosnik - - * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1. - -Tue Mar 24 12:21:48 1998 Jim Wilson - - * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for - boolean_type_node to 1. - -Tue Mar 24 10:23:47 1998 Mark Mitchell - - * error.c (dump_expr): Remove unused variable `l'. - - * pt.c (for_each_template_parm): New function, created by - converting uses_template_parms. - (tree_fn_t): New typedef. - (uses_template_parms): Use it. - (mark_template_parm): New function. - (push_template_decl): Check that the argument list of a partial - specialization uses all the template parameters. - - * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done - with it; we might want it for debugging. - * cp-tree.h (type_unification): Change interface. - * class.c (finish_struct_1): Skip nested template types, just like - ordinary nested types. - (instantiate_type): Use new interface to type_unification. - * lex.c (init_lex): Add __sz as opname for sizeof. - * method.c (build_overload_scope_ref): New function. - (build_overload_int): Handle complex expressions. Set - numeric_output_need_bar if necessary. - (build_overload_value): Handle non-PARM_DECL nodes; this - routine is now used by build_overload_int. Remove some - assignments to numeric_output_need_bar. Use - build_overload_scope_ref. - (build_qualified_name): Note that some template mangled names end - with digits, and set numeric_output_need_bar appropriately. Use - build_underscore_int. - * pt.c (unify): Change interface. - (type_unification_real): Likewise. - (determine_specialization): Use new interfaces. - (tsubst): Deal gracefully with situations in which the argument - vector is not fully filled. - (fn_type_unification): Use new interfaces. - (type_unification): Likewise. Remove NOP_EXPR hack. - (type_unification_real): Likewise. - (unify): Likewise. Deal with unification of complex expressions. - -Mon Mar 23 12:24:37 1998 Jason Merrill - - * pt.c (complete_template_args): Initialize skip properly. - - * decl.c (make_typename_type): Revert. - (make_implicit_typename): Remove. - (lookup_name_real): Don't call it. Call lookup_field if we see a - TYPE_DECL from a template base. - * search.c (lookup_field): Do implicit typename stuff. - -Sun Mar 22 00:50:42 1998 Nick Clifton - Geoff Noer - - * Makefile.in: Various fixes for building cygwin32 native toolchains. - * Make-lang.in: Likewise. - -Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij - - * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify. - -Fri Mar 20 10:42:07 1998 Jason Merrill - - * decl.c (make_implicit_typename): Rewrite removed code. - (make_typename_type): Call it if the type we look up comes from - a base that uses template parms. - - * pt.c (complete_template_args): Rewrite. - (tsubst, FUNCTION_DECL): Use it. - -Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org) - - * semantics.c (finish_asm_stmt): Fix combine strings. Call - c_expand_asm_operands () if output_operands, input_operands or - clobbers is not NULL_TREE. - -Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij - - * pt.c (complete_template_args): New function. - (get_bindings): Deal with specializations of function templates - with return type containing parameters from outer class - templates. - (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level, - substitute arguments and compose a new type. - -Thu Mar 19 19:01:48 1998 Mark Mitchell - - * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new - FUNCTION_DECLs. - -Thu Mar 19 11:51:58 1998 Jason Merrill - - * decl.c (make_implicit_typename): Lose useless code. - - * call.c (standard_conversion): Handle A* -> const A* properly. - - * pt.c (get_bindings_real): Rename from get_bindings. Add - check_rettype parm. - (get_bindings): Pass 1. - (get_bindings_overload): Pass 0. - -Wed Mar 19 09:08:12 1998 Mark Mitchell - - * pt.c (check_explicit_specialization): When reverting a static - member function, also remove the `this' parameter from - last_function_parms. - -Thu Mar 19 02:27:48 1998 Jason Merrill - - * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting - a function context. - - * decl.c (store_bindings): Use free_binding_vecs. - (pop_from_top_level): Likewise. - -Wed Mar 18 12:41:43 1998 Jason Merrill - - * decl.c (make_implicit_typename): Only change the type of a - TYPENAME_TYPE. - -Wed Mar 18 10:09:51 1998 Mark Mitchell - - * semantics.c: New file, containing routines to perform the - semantic phase of parsing. - * parse.y: Use it. - * pt.c (tsubst_expr): Likewise. - * cp-tree.h: Declare the various functions in semantics.c. - Provide macros to access _STMT tree nodes. - * cp-tree.def: Add ASM_STMT tree node. - * Makefile.in, Make-lang.in: Add dependencies on and for - semantics.c. - -Wed Mar 18 00:24:10 1998 Jason Merrill - - * pt.c (push_template_decl): Only check primary templates. - - * pt.c (check_explicit_specialization): Complain about default args - in explicit specialization. - - * parse.y (nomods_initdcl0): Also call cp_finish_decl for a - constructor_declarator. - -Tue Mar 17 14:44:54 1998 Mark Mitchell - - * typeck2.c (build_x_arrow): Don't crash when an aggregate type - has no overloaded operator ->. - - * call.c (build_field_call): Don't crash when presented with a - field that is actually a nested type. - - * decl.c (pushtag): Deal with friend class injection in local - classes. - - * call.c (build_object_call): Don't crash if OBJ is a - pointer-to-member-function. - -Tue Mar 17 11:40:26 1998 Jason Merrill - - * pt.c (push_template_decl): Complain about template with C linkage, - anonymous template class. - -Mon Mar 16 12:10:39 1998 Jason Merrill - - * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX. - * search.c: Likewise. - - * lex.c (do_pending_defargs): Only call - maybe_{begin,end}_member_template_processing for FUNCTION_DECLs. - - * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al. - -Mon Mar 16 10:47:22 1998 Mark Mitchell - - * parse.y: Deal with CONSTRUCTORS in new_initializers. - -Mon Mar 16 10:54:21 1998 Mark Mitchell - - * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more - closely mimics the behavior in parse.y. - (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing - into a compound statement. - -Sun Mar 15 02:07:26 1998 Jason Merrill - - * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro. - * pt.c (inline_needs_template_parms): New fn. - (original_template): New fn. - (push_inline_template_parms_recursive): New fn. - (maybe_begin_member_template_processing): Use them. - (maybe_end_member_template_processing): Likewise. - (is_member_or_friend_template): Rename to is_member_template. - Member functions of local classes are never member templates. - -Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij - - * lex.c (do_identifier): Handle TEMPLATE_DECL that was - added in the class scope to catch redefinition error. - - * pt.c (reduce_template_parm_level): Also copy - the DECL_TEMPLATE_PARMS field. - -Sun Mar 15 10:54:08 1998 Mark Mitchell - - * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a - reduced-level template type parameter. - -Sun Mar 15 12:26:02 1998 Manfred Hollstein - - * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider. - (DECL_NEEDS_FINAL_OVERRIDER_P): New macro. - * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P. - * decl.c (duplicate_decls): Propagate it. - * typeck2.c (abstract_virtuals_error): Use two loops to emit - abstract virtual functions and virtual functions which need a - final overrider separately. - -Thu Mar 12 09:39:40 1998 Manfred Hollstein - - * lang-specs.h: Properly put brackets around array elements in - initializer. - - * typeck.c (build_binary_op_nodefault): Correctly place parens around - && and || in expression. - -Thu Mar 12 09:26:04 1998 Manfred Hollstein - - * call.c (default_parm_conversions): Remove prototype definition. - (build_method_call): Remove unused variable result. - - * cvt.c (ocp_convert): Remove unused variable conversion. - - * decl2.c (ambiguous_decl): Add explicit parameter definition for name. - - * except.c (do_unwind): #if 0 definition of unused variables fcall - and next_pc. - - * expr.c (extract_scalar_init): #if 0 prototype and function - definition. - - * init.c (expand_aggr_init_1): Remove unused variable init_type. - (build_new_1): Remove unused variable t. - - * pt.c (instantiate_class_template): Remove unused variable newtag; - cast called function return value to void. - (do_decl_instantiation): Remove unused variables name and fn. - - * tree.c (get_type_decl): Add default return to shut up compiler from - complaining control reaches end of non-void function. - - * typeck.c (build_x_conditional_expr): Remove unused variable rval. - -Thu Mar 12 09:12:15 1998 Manfred Hollstein - - * call.c (default_parm_conversions): Remove prototype definition. - (build_method_call): Remove unused variable result. - (build_over_call): Add default case in enumeration switch. - -Thu Mar 12 08:39:13 1998 Manfred Hollstein - - * decl2.c (lang_decode_option): Change j's type to size_t. - - * tree.c (layout_vbasetypes): record_align and desired_align are of - type unsigned int; const_size and nonvirtual_const_size likewise. - -Wed Mar 11 07:25:20 1998 Mark Mitchell - - * parse.y (new_initializer): Make sure all initializers are - lists. - -Tue Mar 10 07:32:36 1998 Mark Mitchell - - * decl2.c (import_export_decl): Mark tinfo functions for - cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN. - -Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com) - - * method.c: Fix typo. - -Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi - - * method.c: Include "system.h" to get stdlib.h, stdio.h, - ctype.h, string.h, etc. - (issue_nrepeats): Add default case in enumeration switch. - (check_btype): Likewise. - (process_overload_item): Likewise. - - * Makefile.in (method.o): Depend on system.h. - -Wed Mar 4 22:26:53 1998 Andreas Schwab - - * lex.c (do_scoped_id): Fix parenthesizing. - -Wed Mar 4 12:11:53 1998 Michael Tiemann - - * rtti.c (get_tinfo_fn_dynamic): If this function is called an - FLAG_RTTI is unset, initialize type info machinery and continue - with FLAG_RTTI enabled. - (get_typeid): Likewise. - -Wed Mar 4 11:47:55 1998 Jason Merrill - - * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes - from B. - -Wed Mar 4 11:28:08 1998 Mark Mitchell - - * pt.c (finish_member_template_decl): Deal more gracefully with - invalid declarations. - -Tue Mar 3 01:38:17 1998 Jason Merrill - - * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c, - cp-tree.h: Clean up more old overloading code, old RTTI code, and - some formatting quirks. - - * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c, - method.c, pt.c, ptree.c, typeck.c: Remove support for - -fno-ansi-overloading and overloading METHOD_CALL_EXPR. - * class.h: Remove. - * Makefile.in: Adjust. - - * pt.c (unify): Don't allow reduced cv-quals when strict. - - * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from - *type_unification* and unify. - -Mon Mar 2 12:11:06 1998 Jason Merrill - - * parse.y (explicit_template_type): Remove TEMPLATE keyword. - (nested_name_specifier): And add it before this use. - (typename_sub0): And this use. Also add use without the keyword. - (typename_sub1): Likewise. - * pt.c (instantiate_class_template): Don't actually instantiate - anything if our type uses template parms. - -Mon Mar 2 11:04:59 1998 Jim Wilson - - * decl.c (start_function): Don't call temporary_allocation for a - nested function. - -Sun Mar 1 21:06:37 1998 Jason Merrill - - * pt.c (instantiate_class_template): Don't mess with friends if - our type uses template parms. - -Sat Feb 28 12:06:44 1998 Jason Merrill - - * parse.y (nested_name_specifier): Use explicit_template_type. - (typename_sub): Allow a template_type, an explicit_template_type, - or an implicit template type at the end. - * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL. - * decl.c (make_typename_type): Handle template-id where the name - is a TEMPLATE_DECL. - * call.c (build_scoped_method_call): Handle member template - destructor call. - * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member - destructor is represented by the type. - - * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro. - * parse.y (nested_name_specifier): Add 'template' case. - (explicit_template_type): New rule. - (typename_sub): Use it. - * decl.c (make_typename_type): Handle getting a template-id for NAME. - * pt.c (tsubst): Likewise. - -Fri Feb 27 11:17:50 1998 Jason Merrill - - * pt.c (add_to_template_args): Fix thinko. - (instantiate_class_template): Call it later. - - * pt.c (get_class_bindings): Add outer_args parm. - (most_specialized_class): Likewise. - (instantiate_class_template): Pass it. - (more_specialized_class): Likewise. - (lookup_template_class): Get context from template if none - was specified. - (finish_member_template_decl): Don't do anything with a - partial specialization. - * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of - AGGREGATE_TYPE_P. - * class.c (finish_struct): Member class templates have already been - checked for name clashes. - * decl.c (pushdecl_with_scope): Handle pushing at class level. - -Fri Feb 27 02:25:16 1998 Jason Merrill - - * pt.c (tsubst, TEMPLATE_DECL): Support member class templates. - (tsubst, *_PARM): Support multiple levels of template classes. - (instantiate_class_template): Look up the pattern from the - original template. - (lookup_template_class): Handle getting a template for d1. - (push_template_decl): Correct setting of 'primary'. - (reduce_template_parm_level): Add 'levels' parm. - (finish_member_template_decl): Support member class templates. - (template_class_depth): Handle multiple levels. - * parse.y (component_decl_1, fn.def2): Remove member template case. - (component_decl): Add member template cases. - * decl2.c (check_member_template): We now handle member template - classes. - * decl.c (pushtag): Handle member templates. - * method.c (do_inline_function_hair): Don't touch - IDENTIFIER_GLOBAL_VALUE. - * init.c (build_offset_ref): If name isn't an identifier, just - return it. - * spew.c (yylex): Handle PTYPENAME like TYPENAME. - - * typeck.c (get_delta_difference): Do adjust for conversions to - and from virtual base. - -Wed Feb 25 09:51:29 1998 Jason Merrill - - * typeck.c (get_delta_difference): Give hard error for conversion - from virtual base. - - * cp-tree.h: Tweak formatting. - -Wed Feb 25 00:35:33 1998 Jason Merrill - - * decl.c (push_namespace): Handle redeclaration error. - - * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro. - (IDENTIFIER_NAMESPACE_BINDINGS): New macro. - (NAMESPACE_BINDING): New macro. - (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING. - * *.c: Use them. - - * pt.c (push_template_decl): Use innermost_args. - - * decl.c (get_unique_name): Tweak from earlier in the name. - -Tue Feb 24 22:15:04 1998 Martin von Loewis - - * cp-tree.def: Add CPLUS_BINDING node. - * cp-tree.h (tree_binding): New struct. - (BINDING_SCOPE, BINDING_VALUE): New macros. - (current_namespace, global_namespace): Declare extern. - (struct lang_decl_flags): New field in_namespace. - (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros. - (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros. - (TREE_INDIRECT_USING): New macro. - * decl2.c (current_namespace, global_namespace): Declare. The - value is a NAMESPACE_DECL now, not a TREE_LIST. - (is_namespace_ancestor, namespace_ancestor): New static functions. - (add_using_namespace, ambiguous_decl): Likewise. - (lookup_using_namespace): New support function for lookup_name. - (qualified_lookup_using_namespace): New support function for - do_scoped_id and lookup_namespace_name. - (get_namespace_id): Mark as obsolete. - (current_namespace_id): Likewise. - (do_namespace_alias): Implement. - (do_using_directive): Implement as call to add_using_namespace. - * decl.c (binding_for_name): New function. - (push_namespace, pop_namespace): Implement. - (push_decl): Don't install a FUNCTION_DECL in the global branch. - (lookup_namespace_name): Implement using qualified lookup. - (lookup_name_real): For global scoping, lookup in - global_namespace. For namespace scoping, lookup in given - namespace. For unscoped lookup, iterate over namespace, - considering using directives. - (init_decl_processing): Initialize global_namespace. - (grokvardecl): Build assembler name as static name for globals. - (grokdeclarator): Remove old namespace mangling. - (xref_tag): When installing a global binding for the - tag, make sure we have an identifier. - * method.c (build_overload_nested_name): Mangle namespaces. - (build_qualified_name): Likewise. - (build_decl_overload_real): Likewise. - * lex.c (build_lang_decl): Set namespace for new declaration to - current_namespace. - (do_scoped_id): Find global names in global or current - namespace, or using qualified namespace lookup, depending on - context. - * init.c (build_member_call): When scope is namespace, use - build_x_function_call instead. - (build_offset_ref): When scope is namespace, collapse processing - to lookup_namespace_name instead. - * error.c (dump_decl): Support NAMESPACE_DECL. - * decl.c (pushdecl): Bind globals to current namespace. - (push_overloaded_decl): Likewise. - (lookup_tag): Likewise. - (lookup_name_current_level): Likewise. - (xref_tag): Likewise. - (start_function): Likewise. - * lex.c (do_identifier): Likewise. - (identifier_typedecl_value): Likewise. - (real_yylex): Likewise. - * method.c (do_inline_function_hair): Likewise. - * parse.y (unscoped): Likewise. - * pt.c (check_explicit_specialization): Likewise. - (lookup_template_class): Likewise. - * rtti.c (call_void_fn): Likewise. - * sig.c (build_sigtable): Likewise. - * ptree.c (lang_print_xnode): New function. - -Tue Feb 24 01:40:24 1998 Jason Merrill - - * pt.c (instantiate_class_template): Don't instantiate if pedantic - and the args use template parms. - - * pt.c (push_tinst_level): If the instantiation uses template parms, - fail silently. - * decl.c (xref_basetypes): Do call complete_type for basetypes - that involve template parameters. - -Tue Feb 24 00:36:43 1998 Jason Merrill - - * typeck2.c (process_init_constructor): Fix labeled init check. - -Mon Feb 23 05:08:55 1998 Jason Merrill - - * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS - argument to tsubst and friends. - - * pt.c (tsubst, FUNCTION_DECL): Tidy. - - * typeck.c (build_x_function_call): Handle static member function - templates like non-templates. Handle friend templates like normal - function templates. - * pt.c (tsubst, *_PARM): Don't use orig_level. - (get_bindings): Don't call add_to_template_args. - (instantiate_template): Likewise. - (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate. - * ptree.c (print_lang_type): Print index/level for template parms. - -Mon Feb 23 02:52:29 1998 Mark Mitchell - - * Make-lang.in (cc1plus): Note that cc1plus depends on - cp/cp-tree.h and cp/cp-tree.def. - - * cp-tree.def (TEMPLATE_CONST_PARM): Remove. - (TEMPLATE_PARM_INDEX): New tree code, used to indicate a - position in a template parameter list. - * cp-tree.h (template_parm_index): New structure, used as the tree - structure for a TEMPLATE_PARM_INDEX. - (TEMPLATE_PARM_IDX): New macro. - (TEMPLATE_PARM_LEVEL): Likewise. - (TEMPLATE_PARM_DESCENDANTS): Likewise. - (TEMPLATE_PARM_ORIG_LEVEL): Likewise. - (TEMPLATE_PARM_DECL): Likewise. - (TEMPLATE_TYPE_PARM_INDEX): Likewise. - (TEMPLATE_TYPE_ORIG_LEVEL): Likewise. - (TEMPLATE_TYPE_DECL): Likewise. - (TEMPLATE_CONST_IDX): Remove. - (TEMPLATE_CONST_LEVEL): Likewise. - (TEMPLATE_CONST_SET_INFO): Likewise. - (TEMPLATE_TYPE_SET_INFO): Likewise. - (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX - node. - (TEMPLATE_TYPE_LEVEL): Likewise. - * decl.c (decls_match): Call comp_template_parms, rather than - expanding it inline. - (duplicate_decls): If two template declarations are being merged, - then their TEMPLATE_INFOs should be merged as well. - (grokfndecl): Save template-id information when declaring a friend - with explicit template arguments. Pass arguments to - check_explicit_specialization via correct convention; at some - point check_explicit_specialization changed, but these call-sites - did not. - (grokdeclarator): Tidy up slightly. - * decl2.c (check_classfn): Tidy up slightly. Don't assume that - two template functions with the same DECL_ASSEMBLER_NAME the same, - since the names are not yet mangled. - * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of - TEMPLATE_CONST_PARM. - (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the - decl for a non-type parameter, rather than printing `'. - * friend.c (is_friend): Handle TEMPLATE_DECL friends. - (do_friend): Deal with template friends. - * lex.c (do_pending_inlines): Call - maybe_begin_member_template_processing, rather than - conditionally calling begin_member_template_processing. - (process_next_inline): Likewise. Call - maybe_end_member_template_processing, rather than - conditionally calling end_member_template_processing. - (do_pending_defargs): Likewise. - (do_identifier): Use TEMPLATE_PARM_INDEX instead of - TEMPLATE_CONST_PARM. - * method.c (build_mangled_template_parm_index): New function. - (build_overload_value): Use it. - (build_overload_name): Likewise. - * pt.c (finish_member_template_decl): Allow friend declarations. - (template_class_depth): New function. - (is_member_template): Rename, and modify, to become... - (is_member_or_friend_template): New function. - (end_member_template_processing): Rename, and modify, to become... - (maybe_end_member_template_processing). - (build_template_parm_index): New function. - (reduce_template_parm_level): New function. - (process_template_parm): Modify to use build_template_parm_index. - (push_template_decl): Deal with friend templates. - (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of - TEMPLATE_CONST_PARM. - (tsubst_friend_function): New function. - (instantiate_class_template): Generate the DECL_FRIENDLIST - for a new instantiation by using tsubst_friend_function rather - than just tsubst. - (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL. - Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the - appropriate new macros. Use reduce_template_parm_level to - generate lower-level template parameters. Handle tsubst'ing into - TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget - to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created - templates. Similarly for the template parameters for a new - template. - (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead - of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them. - (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM. - (get_bindings): Call add_to_template_args if necessary. - (instantiate_decl): Handle instantiations of friend templates. - * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a - TEMPLATE_TYPE_PARM as a list of fields; it's not! - * spew.c (yylex): Do a little manual constant propagation to - clarify the code. - -Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com) - - * error.c: Include sys/types.h. - -Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com) - - * method.c (build_mangled_name): Start CPP directives in column zero. - -Thu Feb 19 10:36:48 1998 Jason Merrill - - * typeck2.c (process_init_constructor): Sorry about non-trivial - labeled initializers. - * parse.y (initlist): Re-enable labeled initializers. - -Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij - - * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm, - all callers changed. Rely on the new parameter instead of arg - being a TREE_LIST when determine whether we are working inside - template template parameter. Clean up is_type test. - -Thu Feb 19 10:04:12 1998 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT. - * typeck2.c (initializer_constant_valid_p): Allow conversions - between pointers and references. - -1998-02-19 Brendan Kehoe - - * typeck.c (build_unary_op): Only warn about incr/decr a pointer - if pedantic || warn_pointer_arith. - -Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij - - * pt.c (unify): Handle TEMPLATE_DECL. - -1998-02-18 Brendan Kehoe - - * cp-tree.h (strip_attrs): Remove decl. - -1998-02-18 Doug Evans - - * decl.c (duplicate_decls): Call merge_machine_decl_attributes. - Update olddecl's attributes too. - (strip_attrs): Remove function. - * typeck.c (common_type): Call merge_machine_type_attributes. - -Tue Feb 17 14:07:52 1998 Mark Mitchell - - * parse.y (initdcl0_innards): New grammar symbol. - (nomods_initdecls, nomods_initdcl0): Change type from itype to - none, since the resulting value is never used. - (parse_decl): New function. - (datadef): Remove redundant actions. - (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards. - * parse.c: Regenerated. - -Tue Feb 17 11:54:16 1998 Jason Merrill - - * parse.y (simple_stmt): Use getdecls() to check for decl. - -Sat Feb 14 11:50:51 1998 Manfred Hollstein - - * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New - macros. - (c++.install-common): Install c++filt properly as native or as cross - variant. - (c++.uninstall): Add c++filt. - -Fri Feb 13 14:55:37 1998 Jason Merrill - - * call.c (standard_conversion): Fix multi-level ptr conversions. - -Fri Feb 13 14:06:22 1998 Mike Stump - - * init.c (build_new): Propagate error_mark_node up. - -Fri Feb 13 13:24:32 1998 Jason Merrill - - * parse.y (simple_stmt): If the condition isn't a declaration, - start the controlled block after the test. - -Fri Feb 13 02:26:10 1998 Andreas Schwab - - * call.c (build_over_call): Convert builtin abs, labs and fabs to - tree-codes. - * decl.c (init_decl_processing): Re-enable abs, labs and fabs as - builtins. - -Fri Feb 13 01:36:42 1998 Jason Merrill - - * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV. - -Fri Feb 13 00:21:59 1998 Jason Merrill - - * cp-tree.h: Add access_protected_virtual_node. - * class.c (init_class_processing): Initialize it. - * decl.c (xref_basetypes): Use it. - * parse.y (base_class_access_list): Likewise. - - * Make-lang.in (DEMANGLER_PROG): Add $(exeext). - (c++.install-common): Install c++filt. - -Thu Feb 12 12:46:51 1998 Benjamin Kosnik - - * decl.c (shadow_tag): Give error for typedef-ing built-in types. - -Wed Feb 11 23:28:05 1998 Mark Mitchell - - * call.c (reference_binding): Use comptypes when comparing - TYPE_MAIN_VARIANTS to handle non-canonical array/index types. - -Wed Feb 11 16:42:04 1998 Mark Mitchell - - * tree.c (is_overloaded_fn): Use really_overloaded_fn. - (really_overloaded_fn): Move check here from is_overloaded_fn. - (get_first_fn): Use really_overloaded_fn and is_overloaded_fn. - -Wed Feb 11 15:54:18 1998 Mark Mitchell - - * typeck.c (build_ptrmemfunc): Type-check pointer-to-member - conversions. - -Mon Feb 9 22:23:31 1998 Mark Mitchell - - * cp-tree.h (push_template_decl): Return the decl passed in, or an - equivalent duplicate. - * decl.c (pushtag): Use the return value from push_template_decl. - (duplicate_decls): When duplicating a template declaration, merge - the DECL_TEMPLATE_RESULTs as well. - (make_implicit_typename): Don't try to dive into typename types to - find a context for making a new implicit typename. - (start_decl): Use the return value from push_template_decl. - (grokdeclarator): Complain about declarations list `const operator - int'. Since we don't correctly handle in-class initializations of - non-static data members, complain about this (now illegal) - practice. Issue an error for initializations of non-const statics - since that is illegal as well, and since we don't handle that case - correctly either. - (start_function): Use the return value from push_template_decl. - (start_method): Likewise. - * decl2.c (grokfield): Likewise. Since the change to - grokdeclarator ensures that all initialized fields are in fact - static, remove a redundant test for TREE_PUBLIC. - * parse.y (initlist): Disable labeled initializers since they do - not work as per the documentation, and since they do not use the - same syntax as the C front end. - * pt.c (push_template_decl): Return the decl passed in, or an - equivalent duplicate. - (lookup_template_class): When searching in a nested context, - use the right arguments. - (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL. - * typeck.c (build_component_ref): Assign the correct type to the - result of build_vfn_ref. - -Tue Feb 10 23:56:46 1998 Jason Merrill - - * pt.c (convert_nontype_argument): Fix typo. - (check_explicit_specialization): Allow old-style specialization - of class template members. - -Tue Feb 10 20:36:52 1998 Jason Merrill - Manfred Hollstein - - * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead - when deciding to override DECL_ASSEMBLER_NAME. - -Tue Feb 10 15:30:55 1998 Andrew MacLeod - - * decl2.c (lang_f_options): Add -fsquangle to option processing list. - * cp-tree.h (flag_do_squangling): Add declaration. - * lang-options.h: Add -fsquangle and -fno-squangle. - * method.c: Add macros and static variables for squangling. - (build_overload_name): Rename to build_mangled_name, add logic for B - compression, and split into process_modifiers and - process_overload_item. - (process_modifiers): New function, to handle constant, reference, - and pointer types. - (process_overload_item): New function, handles issue of type codes. - (build_overload_name): New function, start squangling and call - build_mangled_name. - (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline. - (start_squangling): New function to initialize squangling structs. - (end_squangling): New function to destroy squangling structs. - (nrepeats): Rename variable to Nrepeats. - (issue_nrepeats): New function for issuing 'n' type repeats. - (check_ktype): New function to check for type K name compression. - (build_overload_nested_name): Add a check for K name compression. - (build_qualified_name): Add a check for K name compression and don't - use DECL_ASSEMBLER_NAME when squangling is on. - (check_btype): New function, checks for B type compression. - (build_static_name, build_decl_overload_real): Initiate squangling. - (build_typename_overload, build_overload_with_type): Initiate - squangling - -Sun Feb 8 23:47:38 1998 scott snyder - - * method.c (make_thunk): Avoid name buffer overflow. - -Sat Feb 7 16:48:54 1998 Jason Merrill - - * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we - don't define them yet. - - * parse.y (nomods_initdcl0): Add constructor_declarator case. - -Fri Feb 6 21:32:25 1998 Richard Kenner - - * config-lang.in (diff_excludes): Use basename only. - -Thu Feb 5 19:10:40 1998 Jason Merrill - - * tinfo2.cc: Add tinfo for signed char. - -Thu Feb 5 14:38:23 1998 Mike Stump - - * search.c (compute_access): Handle protected constructors in derived - classes as accessible. - -Wed Feb 4 01:26:49 1998 Jason Merrill - - * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code): - Call convert_from_reference sooner. - -Tue Feb 3 23:50:52 1998 Mark Mitchell - - * cvt.c (ocp_convert): Obtain the constant values from constant - decls even if the destination type is the same as the type of the - decl. - - * decl2.c (finish_file): Make sure that static inlines with - definitions are not marked DECL_EXTERNAL before returning. - -Tue Feb 3 22:43:42 1998 Jason Merrill - - * decl.c: Lose arg_looking_for_template. - (lookup_name_real): Likewise. - * parse.y: Lose processing_template_arg, template_arg1. - (primary): Likewise. - * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too. - -Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij - - * error.c (dump_decl): Fix type of default arguments for template - template parameters and nontype template parameters. - * parse.y (template_parm): Handle invalid default template - template arguments here. - - * parse.y (template_parm): Use template_arg instead of PTYPENAME - for default template template argument. - * pt.c (coerce_template_parms): Merge default template argument - codes. Can treat RECORD_TYPE as template name if it is implicitly - created. Fix argument index in error message. - * typeck.c (comptypes): Merge template argument comparison codes in - TEMPLATE_TEMPLATE_PARM and RECORD_TYPE. - -Tue Jan 6 01:42:44 1998 Mumit Khan - - * lex.c (file_name_nondirectory): Also check for '/'. - -Mon Feb 2 11:24:22 1998 Mark Mitchell - - * parse.y (primary): Deal with statement-expressions in - templates. - * pt.c (tsubst_copy): Handle BIND_EXPR. - * tree.c (mapcar): Likewise. - - * call.c (add_template_candidate_real): Pass extra parameter to - fn_type_unification. - * cp-tree.h (fn_type_unification): Add parameter. - * pt.c (fn_type_unification): Add additional parameter to deal with - static member functions. - (get_bindings): Deal with static member functions. - - * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro. - (revert_static_member_fn): Declare. - * decl.c (revert_static_member_fn): Remove declaration. Change - linkage from internal to external. - (cp_finish_decl): Deal with virtual functions in classes local to - template functions. - * decl2.c (finish_file): Don't forget to emit increment/decrement - expressions in initializers for file-scope variables. - * parse.y (typename_sub2): If the typename doesn't names a - template, rather than a type, issue an error message. - * pt.c (check_explicit_specialization): Handle specializations of - static member functions. - (coerce_template_parms): Handle offset references to lists of - member functions. - * search.c (note_debug_info_needed): Don't crash when handed a - type which is being defined. - * typeck.c (complete_type): Don't crash when handed NULL_TREE; - that can happen with some illegal code. - -Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi - - * call.c (user_harshness): Initialize `code' to 0. - (build_method_call): Initialize `candidates', `cp' and `len' to 0. - (null_ptr_cst_p): Add parentheses around && within ||. - (standard_conversion): Likewise. - (z_candidate): Likewise. - (build_user_type_conversion_1): Initialize `args' to NULL_TREE. - (build_object_call): Likewise for `mem_args'. - (build_new_op): Likewise for `mem_arglist'. Add `return' from - default case in enumeration switch. - - * class.c (build_vtable_entry): Add explicit braces to avoid - ambiguous `else'. - (build_class_init_list): Likewise. - (finish_struct_1): Initialize `width' to 0. - (instantiate_type): Initialize `name' to NULL_TREE. Add - explicit braces to avoid ambiguous `else'. - - * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous - `else'. - - * decl.c (grok_reference_init): Eliminate unused parameter, all - callers changed. - (record_builtin_type): Initialize `tdecl' to NULL_TREE. - (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE. - (cp_finish_decl): Initialize `ttype' to NULL_TREE. - (grokdeclarator): Add parentheses around && within ||. Add - explicit braces to avoid ambiguous `else'. - (grokparms): Initialize `type' to NULL_TREE. - (xref_tag): Remove unused label `just_return'. - (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE. - (finish_function): Initialize `cond' and `thenclause' to NULL_TREE. - (hack_incomplete_structures): Add parentheses around assignment - used as truth value. - - * decl2.c (coerce_delete_type): Hide definition of `e3'. - - * error.c: Include . - (dump_expr): Change the type of `i' to size_t. Remove unused - label `error'. - - * except.c (init_exception_processing): Remove unused variable `d'. - (expand_throw): Likewise for `label'. - - * friend.c (add_friends): Add explicit braces to avoid ambiguous - `else'. - - * init.c (sort_member_init): Initialize `last_field' to NULL_TREE. - (sort_base_init): Likewise for `binfo'. - (expand_member_init): Likewise for `rval'. - (build_member_call): Add parentheses around assignment used as - truth value. - (build_offset_ref): Add explicit braces to avoid ambiguous `else'. - (build_new): Initialize `nelts' to NULL_TREE. Initialize - `old_immediate_size_expand' to 0. - (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE. - (build_vec_delete_1): Remove unused variable `block'. - (expand_vec_init): Initialize `itype' to NULL_TREE. - - * lex.c: Include if we don't have . Protect - declaration of `index' and `rindex' with autoconf macros. - (reinit_parse_for_expr): Remove unused variables - `look_for_semicolon' and `look_for_lbrac'. - (cons_up_default_function): Initialize `args' to NULL_TREE. - (readescape): Initialize `firstdig' to 0. - (real_yylex): Add parentheses around assignment used as truth value. - - * method.c: Include if we don't have . - Protect declaration of `index' with autoconf macro. - - * parse.y (primary): Add explicit braces to avoid ambiguous `else'. - Initialize `type' to NULL_TREE. - (structsp): Remove unused variable `id'. - - * pt.c (coerce_template_parms): Add explicit braces to avoid - ambiguous `else'. - (lookup_template_class): Initialize `template' to NULL_TREE. - (instantiate_class_template): Remove unused variable `name' and `e'. - (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE. - (do_poplevel): Initialize `saved_warn_unused' to 0. - (type_unification): Remove unused varable `parm'. - (unify): Likewise for `j'. - - * repo.c (init_repo): Add parentheses around assignment used as - truth value. - (finish_repo): Remove unused varable `p'. - - * search.c (get_binfo): Initialize `type' to NULL_TREE. - (get_base_distance): Likewise. - (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path' - and `new_v' to NULL_TREE. - (lookup_fnfields): Likewise for `rval_binfo_h'. - (breadth_first_search): Add parentheses around assignment used as - truth value. - (get_template_base): Initialize `type' to NULL_TREE. - - * sig.c (append_signature_fields): Initialize `last_mfptr' to - NULL_TREE. - (build_signature_table_constructor): Likewise for - `last_rhs_field', `pfn' and `vt_off'. - (build_sigtable): Likewise for `init'. - - * tree.c (break_out_calls): Initialize `t2' to NULL_TREE. - (propagate_binfo_offsets): Likewise for `delta'. - (hash_tree_cons): Initialize hashcode to 0. - (can_free): Likewise for `size'. - (cp_tree_equal): Add explicit braces to avoid ambiguous `else'. - - * typeck.c (convert_sequence): Hide prototype. - (common_type): Add explicit braces to avoid ambiguous `else'. - (comp_target_types): Likewise. - (build_x_function_call): Initialize `ctypeptr' to NULL_TREE. - (build_function_call_real): Add explicit braces to avoid ambiguous - `else'. - (convert_arguments): Initialize `called_thing' to 0. - (convert_for_initialization): Initialize `savew' and `savee' to 0. - - * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0. - (digest_init): Initialize `old_tail_contents' to NULL_TREE. - (build_x_arrow): Likewise for `last_rval'. - - * xref.c (GNU_xref_decl): Initialize `cls' to 0. - -Sun Feb 1 12:45:34 1998 J"orn Rennecke - - * decl.c (init_decl_processing): Use set_sizetype. - * decl2.c (sizetype): Don't declare. - * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype. - (c_sizeof_nowarn, build_binary_op_nodefault): Likewise. - (build_component_addr, unary_complex_lvalue): Likewise. - * rtti.c (expand_class_desc): Likewise. - * class.c (get_vfield_offset): Likewise. - -Thu Jan 29 10:39:30 1998 Mark Mitchell - - * pt.c (convert_nontype_argument): Move check for is_overloaded_fn - early to avoid bogus error. Handle overloaded function - names provided as template arguments correctly. - (coerce_template_parms): Don't mishandle overloaded functions when - dealing with template template parameters. - (lookup_template_class): Issue an error message, rather than - crashing, when the TYPE_DECL provided is not a template type. - -Wed Jan 28 23:14:44 1998 Jason Merrill - - * class.c (instantiate_type): Don't just return a known type if - it's wrong. - -Wed Jan 28 11:04:07 1998 Mark Mitchell - - * class.c (instantiate_type): Remove handling of FUNCTION_DECL - since that code could never be reached. - - * error.c (dump_decl): Avoid aborting in the midst of printing an - error message about an illegal template declaration. - - * parse.y (structsp): Print an error message, rather than crashing, - when a class-head does not name a class. - - * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE - template arguments as a g++ extension. - - * cp-tree.def (ALIGNOF_EXPR): New tree code. - * decl2.c (grok_alignof): If processing_template_decl, just store - the expression. - * typeck.c (c_alignof): Likewise. - * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR. - * error.c (dump_expr): Likewise. - * pt.c (tsubst_copy): Likewise. - * tree.c (cp_tree_equal): Likewise. - * pt.c (uses_template_parms): Correctly determine whether or not a - SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant - folding can be done. - - * cp-tree.h (grok_enum_decls): Remove type parameter. - * decl.c (grok_enum_decls): Likewise. - * decl2.c (grok_x_components): Call grok_enum_decls - unconditionally, since it will do nothing if there is no - current_local_enum. Use the new calling sequence. - * pt.c (tsubst_enum): Use the new calling sequence for - grok_enum_decls. - - * decl.c (start_function): Make member functions of local classes - in extern inline functions have comdat linkage here... - (grokdeclarator): Rather than here. - -Wed Jan 28 10:55:47 1998 Jason Merrill - - * pt.c (convert_nontype_argument): Use decl_constant_value. - -Tue Jan 27 16:42:21 1998 Mark Mitchell - - * call.c (add_template_candidate_real): New function. - (add_template_candidate): Use it. - (add_template_conv_candidate): Likewise. - (joust): Pass extra argument to more_specialized. - * class.c (instantiate_type): Handle a single FUNCTION_DECL. - (is_local_class): Remove. - (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG. - * cp-tree.h (is_local_class): Remove. - (perform_array_to_pointer_conversion): Likewise. - (finish_member_template_decl): Add. - (check_explicit_specialization): Return a tree, not an int. - (more_specialized): Take additional argument. - (get_bindings): Likewise. - (TI_PENDING_SPECIALIZATION_FLAG): New macro. - * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes. - (perform_array_to_pointer_conversion): Remove. - * decl.c (saved_scope): Add processing_specialization, - processing_explicit_instantiation fields. - (maybe_push_to_top_level): Save them. - (pop_from_top_level): Restore them. - (grokfndecl): Use new return value from - check_explicit_specialization. - (start_decl): Don't check flag_guiding_decls before pushing - decls. - (cp_finish_decl): Remove previous (bogus) change. - (grok_declarator): Use decl_function_context rather than - is_local_class. - * decl2.c (finish_file): Pass extra argument to get_bindings. - (build_expr_from_tree): Let build_x_component_ref check - validity of arguments rather than doing it here. - * lex.c (cons_up_default_function): Remove code fooling with - processing_specialization, processing_explicit_instantiation - flags, as that is now done in {maybe_push_top,pop_from}_top_level. - * method.c (build_overload_identifier): Mangle local classes in - template functions correctly. - * parse.y (finish_member_template_decl): Move to pt.c. - * pt.c (finish_member_template_decl): Moved here from parse.y. - (print_candidates): New function. - (determine_specialization): Change interface. Properly look for - most specialized versions of template candidates. - (check_explicit_specialization): Fully process explicit - instantiations. - (push_template_decl): Avoid looking at CLASSTYPE fields in - FUNCTION_DECLS. - (determine_overloaded_function): Remove. - (convert_nontype_argument): Change name from - convert_nontype_parameter. Use determine_overloaded_function - instead of instantiate_type. - (mangle_class_name_for_template): Handle type contexts as well as - function contexts. - (classtype_mangled_name): Likewise. - (lookup_template_class): Likewise. - (tsubst): Likewise. - (more_specialized): Take explicit template arguments as a - parameter. - (most_specialized): Likewise. - (get_bindings): Likewise. Check that return types match before - proclaiming a function a match. - (do_decl_instantiation): Remove code searching for function to - instantiate; that is now done in check_explicit_specialization. - (add_maybe_template): Pass extra argument to get_bindings. - * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify - implementation. - * typeck.c (build_component_ref): Check for invalid arguments. - -Tue Jan 27 01:44:02 1998 Jason Merrill - - * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that - return_target and call_target are equivalent. - - * pt.c (type_unification_real): Just accept function parms that - don't use any template parms. - -Sun Jan 25 03:30:00 1998 Jason Merrill - - * decl.c (cp_finish_decl): When bailing on a comdat variable, also - unset DECL_NOT_REALLY_EXTERN. - - * parse.y (typename_sub*): Fix std::. - -Sat Jan 24 12:13:54 1998 Jason Merrill - - * error.c (dump_decl): Fix type default template args. - (dump_type): Hand TEMPLATE_DECL off to dump_decl. - -Fri Jan 23 18:34:37 1998 Mumit Khan - - * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. - (file_name_nondirectory): Use. - -Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij - - * pt.c (coerce_template_parms): Don't access elements of ARGLIST - that are not really present. Substitute default arguments in - template template arguments. Correctly convert TEMPLATE_DECL to - TEMPLATE_TEMPLATE_PARM. - (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM - are no longer treated specially here. - * parse.y (template_template_parm): Fix copy error. - * decl.c (grokdeclarator): Warn about missing `typename' for nested - type created from template template parameters. - * parse.y (bad_parm): Likewise - - * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM. - (push_nested_class): Likewise. - * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code. - * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro. - (copy_template_template_parm): Declare. - * decl.c (arg_looking_for_template): New variable. - (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM. - Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM - node if arg_looking_for_template is nonzero. - (pushdecl): Handle TEMPLATE_TEMPLATE_PARM. - (grok_op_properties, xref_tag, xref_basetypes): Likewise. - (grokdeclarator): Handle TEMPLATE_DECL. - * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM. - * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM. - (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM. - (dump_decl): Handle unnamed template type parameters. - Handle template template parameters. - (dump_function_name): Handle template template parameters. - * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef): - Handle TEMPLATE_TEMPLATE_PARM. - * method.c (build_template_template_parm_names): New function. - (build_template_parm_names): Handle TEMPLATE_DECL. - (build_overload_nested_name, build_overload_name): - Handle TEMPLATE_TEMPLATE_PARM. - * parse.y (maybe_identifier): New nonterminal. - (template_type_parm): Use it. - (template_template_parm, template_arg1): New nonterminal. - (template_parm): Add template_template_parm rules. - (template_arg): Set processing_template_arg. - (template_arg1): Rules moved from template_arg. - (primary, nonnested_type): Set arg_looking_for_template if we are - processing template arguments. - * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL. - (process_template_parm): Handle template template parameters. - (coerce_template_parms, comp_template_args): Likewise. - (mangle_class_name_for_template, lookup_template_class): Likewise. - (uses_template_parms): Handle TEMPLATE_DECL and - TEMPLATE_TEMPLATE_PARM. - (current_template_args): Handle TEMPLATE_DECL. - (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM. - * search.c (dfs_walk, dfs_record_inheritance): - Handle TEMPLATE_TEMPLATE_PARM. - * tree.c (copy_template_template_parm): New function. - (mapcar): Handle TEMPLATE_TEMPLATE_PARM. - * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM. - -Mon Jan 19 22:40:03 1998 Mark Mitchell - - * decl.c (start_decl): Don't allow duplicate definitions of static - data members. - - * call.c (build_user_type_conversion_1): Handle user-defined - template conversion operators correctly. - - * decl2.c (build_expr_from_tree): Issue an error message if the - object in a COMPONENT_REF is a TEMPLATE_DECL. - - * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs. - - * class.c (is_local_class): New function. - * cp-tree.h (is_local_class): Declare it. - (last_tree): Likewise. - (begin_tree): Likewise. - (end_tree): Likewise. - (lookup_template_class): Change prototype. - * decl.c (cp_finish_decl): Check for NULL where necessary. - Consider FUNCTION_DECLS to declare objects with top-level binding, - when calling make_decl_rtl. - (grokdeclarator): Give members of local classes internal linkage. - (start_function): Remove declaration of last_tree. - (finish_function): Set flag_keep_inline_functions around call to - rest_of_compilation if we are processing a member function in a - local class. - (start_method): Call push_template_decl for member functions of - local classes in template functions. - * decl2.c (import_export_decl): Don't give external linkage to - instantiations of templates with internal linkage. - * parse.y (last_tree): Remove declaration. - (template_type): Pass extra parameter to lookup_template_class. - (self_template_type): Likewise. - (structsp): Move call to reset_specialization into left_curly. - (left_curly): Call reset_specialization, and begin_tree. - * pt.c (saved_trees): New variable. - (mangle_class_name_for_template): Change prototype. Use - additional function context to name local classes in templates - correctly. - (classtype_mangled_name): Pass the context. - (push_template_decl): Handle local classes and templates, and - member functions for such classes. - (convert_nontype_parameter): Fix handling of pointer-to-member - constants. - (lookup_template_class): Handle local classes in templates. - (tsubst): Likewise. Don't assume that template instantiations - have external linkage; pay attention to the template declaration. - (mark_decl_instantiated): Likewise. - (begin_tree): New function. - (end_tree): Likewise. - - * decl.c (xref_basetypes): Don't call complete_type for basetypes - that involve template parameters; that can lead to infinite - recursion unnecessarily. - - * pt.c (register_specialization): Do not register specializations - that aren't ready to be registered yet. - (check_explicit_specialization): Handle explicit specialization of - constructors and destructors. - (build_template_decl): New function. - (push_template_delc): Handle out-of-class specializations of - member templates. - - * pt.c (check_explicit_specialization): Set up the template - information before registering the specialization. - (coerce_template_parms): Fix thinko. - (tsubst): Handle specializations of member templates correctly. - - * class.c (finish_struct_methods): Remove calls to - check_explicit_specialization from here. - (finish_struct): And insert them here. - * cp-tree.h (perform_qualification_conversions): New function. - (perform_array_to_pointer_conversion): Likewise. - (begin_explicit_instantiation): Likewise. - (end_explicit_instantiation): Likewise. - (determine_specialization): Renamed from - determine_explicit_specialization. - (comp_template_parms): New function. - (processing_explicit_instantiation): New variable. - * cvt.c (perform_qualification_conversions): New function. - (perform_array_to_pointer_conversion): Likewise. - * decl.c (duplicate_decls): Don't consider template functions - alike unless they have the same parameters. Refine handling of - instantiation/specialization mismatches. - (start_decl): Don't call pushdecl for template specializations, - since they don't affect overloading. - (start_function): Likewise. - (grokfndecl): Call check_explicit_specialization a little later. - Don't call duplicate_decls for memberm template specializations. - (grokdeclarator): Don't update template_count for classes that are - themselves specializations. Remove use of `2' as parameter to - grokfndecl since that value isn't used. - * lex.c (cons_up_default_function): Save and restore - processing_explicit_instantiation around calls to grokfield. - * parse.y (finish_member_template_decl): New function. - (component_decl_1): Use it. - (fn.def2): Likewise. - (template_arg_list_opt): New nonterminal. - (template_type): Use it. - (self_template_type): Likewise. - (template_id): Likewise. - (object_template_id): Likewise. - (notype_template_declarator): Likwise. - (begin_explicit_instantiation): Likewise. - (end_explicit_instantiation): Likewise. - (explicit_instantiation): Use them. - * pt.c (coerce_template_parms): Add parameters. - (processing_explicit_instantiation): New variable. - (convert_nontype_parameter): New function. - (determine_overloaded_function): Likewise. - (begin_explicit_instantiation): Likewise. - (end_explicit_instantiation): Likewise. - (retrieve_specialization): Likewise. - (register_specialization): Likewise. - (processing_explicit_specialization): Removed. - (determine_specialization): Handle specializations of member - functions of template class instantiations. - (check_explicit_specialization): Refine to conform to standard. - (comp_template_parms): New function. - (coerce_template_parms): Call convert_nontype_parameter. - (tsubst): Refine handling of member templates. Use - register_specialization. - (instantiate_template): Use retrieve_specialization. - (do_decl_instantiation): Likewise. - (instantiate_decl): Likewise. - (type_unification): Improve handling of explicit template - arguments. - * tree.c (mapcar): Return error_mark_node, rather than aborting, - on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS. - * typeck.c (build_unary_op): Call determine_specialization, rather - than determine_explicit_specialization. - -Mon Jan 19 13:18:51 1998 Jason Merrill - - * cvt.c (build_up_reference): A TARGET_EXPR has side effects. - -Fri Jan 16 11:40:50 1998 Bruno Haible - - * error.c (dump_decl): For enum tags, output the tag, not its value. - -1998-01-13 Brendan Kehoe - - * decl.c (init_decl_processing): Only call init_rtti_processing - FLAG_RTTI is set. - -Mon Jan 12 01:35:18 1998 Jason Merrill - - * init.c (build_new_1): Split out from build_new. - (build_new): Just return a NEW_EXPR. - * expr.c (cplus_expand_expr): Handle NEW_EXPR. - - * decl2.c (get_temp_regvar): Tweak. - - * cp-tree.h (TREE_CALLS_NEW): Comment out. - * class.c (resolves_to_fixed_type_p): Remove use. - * method.c (build_opfncall): Likewise. - * call.c (build_new_op): Likewise. - -Wed Jan 7 23:47:13 1998 Jason Merrill - - * exception.cc (__eh_alloc, __eh_free): New fns. - (__cp_push_exception, __cp_pop_exception): Use them. - (__uncatch_exception): Call terminate here if no exception. - * except.c (build_terminate_handler): New fn. - (expand_start_catch_block): Use it. - (expand_exception_blocks): Likewise. - (alloc_eh_object): New fn. - (expand_throw): Use it. Protect exception init with terminate. - * typeck.c (build_modify_expr): Remove code that ignores trivial - methods. - -Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi - - * call.c (add_builtin_candidate): Add default case in enumeration - switch. - (build_new_op): Likewise. - (convert_like): Likewise. - * cvt.c (build_expr_type_conversion): Likewise. - * tree.c (real_lvalue_p): Likewise. - (lvalue_p): Likewise. - (cp_tree_equal): Likewise. - * typeck.c (comptypes): Likewise. - (build_component_ref): Likewise. - (build_function_call_real): Likewise. - (build_binary_op_nodefault): Likewise. - (build_unary_op): Likewise. - (build_modify_expr): Likewise. - * typeck2.c (initializer_constant_valid_p): Likewise. - -Sun Dec 21 15:59:00 1997 Nick Clifton - - * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas. - -Thu Dec 18 14:51:50 1997 Mark Mitchell - - * pt.c (coerce_template_parms): Make sure to digest_init if - possible. - - * decl.c (duplicate_decls): Make the newdecl virtual if the - olddecl was, just as is done with other attributes of olddecl. - -Thu Dec 18 14:43:19 1997 Jason Merrill - - * typeck.c (unary_complex_lvalue): Ignore op0 when taking the - address of an OFFSET_REF. - - * cp-tree.def: Add AGGR_INIT_EXPR. - * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with - AGGR_INIT_EXPR where appropriate. - * expr.c (cplus_expand_expr): Likewise. Simplify. - - * decl2.c (finish_file): Remove call to register_exception_table. - -Wed Dec 17 17:08:52 1997 Benjamin Kosnik - - * pt.c (instantiate_class_template): Don't do injection when - processing_template_decl is true, as pollutes current_binding_level - for base classes. - -Wed Dec 17 21:17:39 1997 Peter Schmid - - * pt.c (maybe_fold_nontype_arg): Add prototype. - -Tue Dec 16 10:31:20 1997 Jason Merrill - - * tree.c (mapcar): Handle TRY_CATCH_EXPR et al. - * error.c (dump_expr): Likewise. - -Mon Dec 15 12:22:04 1997 Jason Merrill - - * typeck.c (build_function_call_real): Remove "inline called before - definition" pedwarn. - - * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg. - -Sun Dec 14 22:34:20 1997 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's. - - * pt.c (type_unification_real): Change __null to type void* with - a warning. - -Sun Dec 14 20:38:35 1997 Mark Mitchell - - * call.c (implicit_conversion): Don't call - build_user_type_conversion_1 with a NULL expr, since it will - crash. - - * pt.c (unify): Don't try to unify array bounds if either array is - unbounded. - -Fri Dec 12 16:09:14 1997 Jason Merrill - - * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at): - Replace extern decls with casts. - - * decl.c (expand_start_early_try_stmts): Don't mess with a sequence. - Update last_parm_cleanup_insn. - (store_after_parms): Remove. - * cp-tree.h: Adjust. - -Thu Dec 11 22:18:37 1997 Jason Merrill - - * decl2.c (comdat_linkage): Also set DECL_COMDAT. - (finish_file): Check DECL_COMDAT instead of weak|one_only. - (import_export_vtable): Use make_decl_one_only instead of - comdat_linkage for win32 tweak. - (import_export_decl): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - - * decl2.c (finish_file): Lose handling of templates in pending_statics. - -Thu Dec 11 21:12:09 1997 Jason Merrill - - * decl2.c (finish_file): Lose call to expand_builtin_throw. - * except.c (expand_builtin_throw): Remove. - * cp-tree.h: Remove ptr_ptr_type_node. - * decl.c: Likewise. - -Thu Dec 11 20:43:33 1997 Teemu Torma - - * decl.c (ptr_ptr_type_node): Define. - (init_decl_processing): Initialize it. - * cp-tree.h: Declare it. - * exception.cc (__cp_exception_info): Use __get_eh_info. - (__cp_push_exception): Likewise. - (__cp_pop_exception): Likewise. - - From Scott Snyder : - * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of - saved_pc. - (init_exception_processing): Removed saved_pc initialization. - -Wed Dec 10 11:04:45 1997 Jason Merrill - - * pt.c (instantiate_decl): Defer all templates but inline functions. - -Mon Dec 8 23:17:13 1997 Jason Merrill - - * init.c (expand_vec_init): Don't fold a list of parameters. - - * decl.c (copy_args_p): Handle copy elision for types with virtual - bases. - * call.c (build_over_call): Likewise. - -Sun Dec 7 22:38:12 1997 Mark Mitchell - - * pt.c (lookup_template_function): Copy the template arguments, - not just the list containing them, to the permanent obstack. - -Sun Dec 7 15:53:06 1997 Jason Merrill - - * except.c (expand_start_catch_block): suspend_momentary for the - terminate handler. - - * error.c (dump_decl): Handle LOOKUP_EXPR. - -Sun Dec 7 15:45:07 1997 Mark Mitchell - - * rtti.c (build_dynamic_cast): Copy the cast-to type to the - permanent obstack if we are processing a template decl. - * typeck.c (build_static_cast): Likewise. - (build_const_cast): Likewise. - (build_reinterpret_cast): Likewise. - - * pt.c (coerce_template_parms): Coerce some expressions, even - when processing_template_decl. - -Sun Dec 7 01:46:33 1997 Bruno Haible - - * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric - handling of pointer difference expressions. - - * typeck.c (comp_target_types): Comparison of function/method types - is independent of nptrs. - -Sun Dec 7 01:40:27 1997 Mark Mitchell - - * pt.c (tsubst): Avoid creating pointer to reference and - reference to reference types. - -Sat Dec 6 01:29:37 1997 Jason Merrill - - * parse.y (do_id): New nonterminal. - (template_id): Use it. - -Fri Dec 5 01:17:34 1997 Jason Merrill - - * parse.y (template_id): do_identifier for PFUNCNAMEs, too. - * spew.c (yylex): Don't do_identifier here. - * decl2.c (build_expr_from_tree): Revert last change. - - * decl2.c (build_expr_from_tree): Expand the name for a method call. - * parse.y (object_template_id): Don't try to take the DECL_NAME. - -Wed Dec 3 20:02:39 1997 Jason Merrill - - * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for - alloc_expr. - * call.c (build_op_delete_call): Adjust. - - * except.c (expand_end_catch_block): Lose rethrow region. - (expand_start_catch_block): Likewise. - (expand_end_catch_block): Don't expand_leftover_cleanups. - -Wed Dec 3 13:24:04 1997 Benjamin Kosnik - - * pt.c (tsubst): Remove tree_cons call (places redundant info into - DECL_TEMPLATE_INSTANTIATION). - -Wed Dec 3 11:44:52 1997 Jason Merrill - - * tree.c (is_overloaded_fn): Handle getting a fn template. - (really_overloaded_fn): Likewise. - * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better. - * pt.c (check_explicit_specialization): Tweak. - (determine_explicit_specialization): Tweak. - - * tree.c, cp-tree.h (get_target_expr): New fn. - -Wed Dec 3 08:47:27 1997 Paul Eggert - - * pt.c (check_explicit_specialization): Fix misspelling in - diagnostic: `preceeded'. - * typeck.c (get_delta_difference): Fix misspelling in diagnostic: - `conversiona'. - -1997-12-02 Mark Mitchell - - * pt.c (determine_explicit_specialization): Avoid an internal - error for bad specializations. - - * method.c (build_overload_value): Handle SCOPE_REF. - -Tue Dec 2 19:18:50 1997 Mike Stump - - * class.c (prepare_fresh_vtable): Enable even more complex MI - vtable names. - -Tue Dec 2 01:37:19 1997 Jason Merrill - - * exception.cc (__check_eh_spec): Optimize a bit. - - * exception.cc (__cp_pop_exception): Lose handler arg. - * except.c (do_pop_exception): Likewise. - (push_eh_cleanup): Let the cleanup mechanism supply the handler. - (expand_end_catch_block): Likewise. - -Fri Nov 28 01:58:14 1997 Jason Merrill - - * pt.c (check_explicit_specialization): Complain about using a - template-id for a non-specialization. - -Fri Nov 28 12:35:19 1997 Scott Christley - - * repo.c: Prototype rindex only if needed. - * xref.c: Likewise. - -Fri Nov 28 01:56:35 1997 Bruno Haible - - * error.c (dump_decl): Handle TEMPLATE_ID_EXPR. - -Thu Nov 27 00:59:46 1997 Jason Merrill - - * typeck.c (build_const_cast): Handle references here instead of - handing off to convert_to_reference. - - * except.c: Lose Unexpected, SetTerminate, SetUnexpected, - TerminateFunctionCall. - (init_exception_processing): Likewise. Terminate et al are now - the fns, not ADDR_EXPRs. - (various): Lose redundant assemble_external calls. - (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/. - - * cp-tree.h (struct lang_decl_flags): Add comdat. - (DECL_COMDAT): New macro. - * decl.c (duplicate_decls): Propagate it. - (cp_finish_decl): Handle it. - * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs. - - * class.c: Remove static pending_hard_virtuals. - (add_virtual_function): Take pointers to pending_virtuals - and pending_hard_virtuals. - (finish_struct_1): Pass them. Declare pending_hard_virtuals. - -Wed Nov 26 20:28:49 1997 Jason Merrill - - * decl2.c (import_export_vtable): If we support one_only but not - weak symbols, mark instantiated template vtables one_only. - (import_export_decl): Likewise for tinfo functions. - (finish_vtable_vardecl): Also write out vtables from explicitly - instantiated template classes. - * pt.c (mark_class_instantiated): Revert last change. - - * except.c (expand_throw): Call mark_used on the destructor. - -Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com) - - * lex.c (lang_init): Enable flag_exceptions by default if no - command line switch was specified. - -1997-11-26 Mark Mitchell - - * pt.c (unify): Handle `void' template parameters in - specializations. - -Wed Nov 26 01:11:24 1997 Jason Merrill - - * rtti.c (build_dynamic_cast): Handle template case here. - (build_dynamic_cast_1): Not here. - - * typeck2.c (digest_init): Make copies where appropriate. - - * decl2.c (delete_sanity): resolve_offset_ref. - - * except.c: Call terminate without caching so many bits. - - * except.c (expand_start_catch_block): Fix catching a reference - to pointer. - -Tue Nov 25 11:28:21 1997 Jason Merrill - - * init.c (build_new): Copy size to the saveable obstack. - - * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the - TRY_CATCH_EXPR for now. - -Mon Nov 24 12:15:55 1997 Jason Merrill - - * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL - has DECL_LANG_SPECIFIC. - - * exception.cc (struct cp_eh_info): Add handlers field. - (__cp_push_exception): Initialize it. - (__cp_pop_exception): Decrement it. Don't pop unless it's 0. - (__throw_bad_exception): Remove. - * except.c (call_eh_info): Add handlers field. - (get_eh_handlers): New fn. - (push_eh_cleanup): Increment handlers. - -Fri Nov 21 12:22:07 1997 Jason Merrill - - * except.c (expand_start_eh_spec): Use the try/catch code. - (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of - doing everything inline. - (init_exception_processing): throw_type_match now takes - const void pointers. - * exception.cc (__check_eh_spec): New fn. - * inc/exception: Neither terminate nor unexpected return. - * decl.c: Make const_ptr_type_node public. - * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly. - - * except.c (expand_start_catch_block): We only need the rethrow - region for non-sjlj exceptions. - (expand_end_catch_block): Likewise. Use outer_context_label_stack. - -Thu Nov 20 14:40:17 1997 Jason Merrill - - * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs. - (various.o): Likewise. - * inc/new: Add placement deletes. Add throw specs for default new. - * new.cc (set_new_handler): Move here from libgcc2. - * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler. - (new): Move from libgcc2. Throw bad_alloc. - * new2.cc: Move the rest of the op news and op deletes from libgcc2. - * decl.c (init_decl_processing): Update exception specs on new and - delete. - - * method.c (build_decl_overload_real): Don't mess with global - placement delete. - - * init.c (build_new): Check for null throw spec, not nothrow_t. - - * decl.c (duplicate_decls): Don't complain about different exceptions - from an internal declaration. - - * call.c (build_op_delete_call): Fix check for member fns again. - - * decl2.c (import_export_decl): Interface hackery affects - virtual synthesized methods. - -Wed Nov 19 18:24:14 1997 Jason Merrill - - * decl.c (start_decl): Don't just complain about a mismatched - scope, fix it. - - * decl.c (make_implicit_typename): Handle case where t is not - actually from context. - * tree.c (get_type_decl): Lose identifier case. - * spew.c (yylex): Lose useless call to identifier_typedecl_value. - * parse.y (nonnested_type): Just use lookup_name. - (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE. - -Wed Nov 19 11:45:07 1997 Michael Tiemann - - * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case - T was built in C language context (for example, by - output_func_start_profiler). - -Wed Nov 19 10:39:27 1997 Jason Merrill - - * decl.c (make_implicit_typename): New fn. - (lookup_name_real): Use it. Use current_class_type as the context. - -Mon Nov 17 23:42:03 1997 Bruno Haible - - * pt.c (do_poplevel): Don't prohibit jumps into this contour. - -Mon Nov 17 02:01:28 1997 Jason Merrill - - * friend.c (do_friend): Warn about non-template friends in templates. - - * call.c (build_op_delete_call): Fix handling of inherited delete. - - * search.c (dfs_record_inheritance): Ignore template type parms. - -Sat Nov 15 00:30:51 1997 Jason Merrill - - * call.c (build_new_op): Fix copy error. - (build_op_new_call): New fn. - (build_op_delete_call): New fn. - * cp-tree.h: Declare them. - * init.c (build_new): Use them. Support placement delete. - (build_x_delete): Use build_op_delete_call. - (build_delete): Likewise. - * decl2.c (delete_sanity): Likewise. - (coerce_delete_type): Don't complain about placement delete. - -Thu Nov 13 01:52:36 1997 Jason Merrill - - * call.c (build_new_function_call): Remove unused 'obj' parm. - * cp-tree.h, typeck.c: Adjust. - - * init.c (build_new): Make the cleanup last longer. - (expand_vec_init): Call do_pending_stack_adjust. - -Wed Nov 12 11:04:33 1997 Jason Merrill - - * pt.c (do_type_instantiation): Fix typo. - (mark_class_instantiated): If we support one_only but not weak - symbols, don't mark this as known. - - * init.c (build_new): Handle vec delete in EH cleanup. - -Wed Nov 12 08:11:55 1997 Benjamin Kosnik - - * call.c (build_method_call): Call complete_type before checking - for destructor. - -Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com) - - * decl.c (add_block_current_level): Delete. - * init.c (build_vec_delete_1): Delete build_block and - add_block_current_level calls. - -Wed Nov 12 00:48:16 1997 Jason Merrill - - * init.c (build_new): Handle freeing allocated memory when the - constructor throws. - - * call.c (build_new_method_call): Fix flags arg. - - * pt.c (do_type_instantiation): Don't try to instantiate - member templates. - (mark_decl_instantiated): If we support one_only but not - weak symbols, mark this one_only. - * decl2.c (import_export_vtable): Don't defer handling of vtables - if MULTIPLE_SYMBOL_SPACES. - -Tue Nov 11 12:02:12 1997 Jason Merrill - - * except.c (expand_end_catch_block): Lose call to __sjpopnthrow. - -Tue Nov 11 02:53:44 1997 Jason Merrill - - * except.c (do_pop_exception): Return a value. - -Mon Nov 10 20:25:31 1997 Jason Merrill - - * call.c (build_new_method_call): Handle getting a - TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field - if we got template parms. - * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR, - not just the args. - * decl2.c (build_expr_from_tree): Tweak last change. - * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE. - (maybe_fold_nontype_arg): Split out from tsubst_copy. - * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR. - -Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij - - * pt.c (tsubst_copy): Handle explicit template arguments in - function calls. - * typeck.c (build_x_function_call): Likewise. - * decl2.c (build_expr_from_tree): Lookup function name if it - hasn't been done. - - * pt.c (tsubst): Instantiate template functions properly when - template parameter does not appear in function arguments and return - type. - (comp_template_args): Handle member templates required by tsubst. - -Mon Nov 10 20:08:38 1997 Jason Merrill - - * decl.c (grokdeclarator): Tweak conditions for pedwarn in - previous change. - -Mon Nov 10 20:08:29 1997 Bruno Haible - - * pt.c (coerce_template_parms): Tweak error message. - - * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a - return type defaults to `int', even if there are storage-class - specifiers. - -Mon Nov 10 03:04:20 1997 Jason Merrill - - Complete nested exception support. - * except.c (do_pop_exception): Split out... - (push_eh_cleanup): From here. Handle the EH region by hand. - (expand_start_catch_block): Add a new level for the catch parm. - Move the rethrow region outside the two cleanup regions. - Protect the initializer for the catch parm with terminate. - (expand_end_catch_block): Likewise. End the region for the eh_cleanup. - * exception.cc (__cp_pop_exception): Now takes two parms. Handle - popping off the middle of the stack. - * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, - WITH_CLEANUP_EXPR, and UNSAVE_EXPR. - (build_cplus_new): Only wrap CALL_EXPRs. - * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around - the constructor call. - -Sun Nov 9 18:00:26 1997 Richard Kenner - - * Make-lang.in (c++.distdir): Make inc subdirectory. - -Fri Nov 7 11:57:28 1997 Jason Merrill - - * decl2.c (finish_file): Put back some code. - -Thu Nov 6 11:28:14 1997 Jason Merrill - - * decl2.c (finish_file): Remove redundant code. - * method.c (emit_thunk): Don't let the backend defer generic thunks. - -Wed Nov 5 23:52:50 1997 Jason Merrill - - * except.c (call_eh_info): Split out... - (push_eh_info): From here. - (expand_builtin_throw): Use it. - (expand_start_catch_block): Move region start back. - -Tue Nov 4 13:45:10 1997 Doug Evans - - * lex.c (MULTIBYTE_CHARS): #undef if cross compiling. - (real_yylex): Record wide strings using target endianness, not host. - -1997-11-03 Brendan Kehoe - - * repo.c (rindex): Add decl unconditionally. - (get_base_filename, open_repo_file): Don't cast rindex. - * xref.c (rindex): Add decl unconditionally. - (index): Remove unused decl. - (open_xref_file): Don't cast rindex. - -Sun Nov 2 15:04:12 1997 Jason Merrill - - * class.c (build_vbase_path): Propagate the result type properly. - -1997-11-01 Brendan Kehoe - - * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace - remaining use of saved_throw_type with a call to get_eh_type. - -1997-10-31 Brendan Kehoe - - * lex.c (FILE_NAME_NONDIRECTORY): Delete macro. - (file_name_nondirectory): New function, doing the same as the macro. - (set_typedecl_interface_info): Use it instead of the macro. - (check_newline): Likewise. - (handle_cp_pragma): Likewise. - - * repo.c (get_base_filename): Cast result of rindex to char*. - (open_repo_file): Likewise. - * xref.c (open_xref_file): Likewise. - * error.c (dump_char): Make its arg int, not char. - - * except.c (push_eh_info): Pass the number of fields - 1 down, not - the exact number of fields. - -Fri Oct 31 01:47:57 1997 Jason Merrill - - Support for nested exceptions. - * tinfo2.cc (__is_pointer): New fn. - * exception.cc (struct cp_eh_info): Define. - (__cp_exception_info, __uncatch_exception): New fns. - (__cp_push_exception, __cp_pop_exception): New fns. - * except.c: Lose saved_throw_{type,value,cleanup,in_catch}. - Lose empty_fndecl. - (init_exception_processing): Likewise. __eh_pc is now external. - (push_eh_info): New fn. - (get_eh_{info,value,type,caught}): New fns. - (push_eh_cleanup): Just call __cp_pop_exception. - (expand_start_catch_block): Use push_eh_info. Start the eh region - sooner. - (expand_end_eh_spec): Use push_eh_info. - (expand_throw): Call __cp_push_exception to set up the exception info. - Just pass the destructor or 0 as the cleanup. Call __uncatch_exception - when we rethrow. - (expand_builtin_throw): Don't refer to empty_fndecl. - -Thu Oct 23 02:01:30 1997 Jason Merrill - - * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl. - -1997-10-22 Brendan Kehoe - - * method.c (build_template_parm_names, build_decl_overload_real): - Add static to definitions. - * pt.c (add_to_template_args, note_template_header, - processing_explicit_specialization, type_unification_real): Likewise. - ({determine,check}_explicit_specialization): Use a single string for - error messages. - -Mon Oct 20 12:06:34 1997 Jason Merrill - - * except.c (expand_exception_blocks): Call do_pending_stack_adjust. - (expand_end_catch_block): Likewise. - (expand_end_eh_spec): Likewise. - -Mon Oct 20 11:44:20 1997 Mark Mitchell - - * decl.c (duplicate_decls): Handle template specializations - correctly. - * error.c (dump_function_name): Fix printing of specializations of - member functions that are not member templates. - * cp-tree.h (processing_specialization): Make global. - * pt.c (processing_specialization): Likewise. - * lex.c (cons_up_default_function): Save and restore - processing_specialization to avoid confusion. - -Mon Oct 20 10:52:22 1997 Jason Merrill - - * decl.c (init_decl_processing): Give null_node unknown* type. - * typeck.c (comp_target_types): Handle UNKNOWN_TYPE. - (common_type): Likewise. - * error.c (args_as_string): Recognize null_node. - -Sun Oct 19 09:13:01 1997 Richard Kenner - - * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR. - (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR. - - * decl.c (init_decl_processing): Call using_eh_for_cleanups. - - * Make-lang.in (g++): Include prefix.o. - -Thu Oct 16 15:31:09 1997 Judy Goldberg - - * pt.c (determine_explicit_specialization): Initialize "dummy" - to keep Purify quiet. - -Thu Oct 16 00:14:48 1997 Jason Merrill - - * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here. - (build_overload_int): Not here. - -Wed Oct 15 00:35:28 1997 Mike Stump - - * class.c (build_type_pathname): Remove. - (prepare_fresh_vtable): Fix problem with complex MI vtable names. - -1997-10-14 Brendan Kehoe - - * parse.y (unary_expr): Give a pedwarn if someone tries to use the - &&label GNU extension. - -Tue Oct 14 12:01:00 1997 Mark Mitchell - - * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, - so as to avoid incorrect manglings. - * method.c (build_decl_overload_real): Don't mangle return types - for constructors. - -Tue Oct 14 11:46:14 1997 Jason Merrill - - * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec, - scratch_tree_cons): Define as macros for now. - * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, - lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c, - typeck2.c: Use them and the expression_obstack variants. - -Mon Oct 13 17:41:26 1997 Benjamin Kosnik - - * decl.c (store_return_init): Allow classes with explicit ctors to - be used with the named return values extension. - -Fri Oct 10 12:21:11 1997 Jason Merrill - - * pt.c (instantiate_decl): Fix previous change. - -Thu Oct 9 12:08:21 1997 Jason Merrill - - * pt.c (tsubst): Fix thinko. - (instantiate_decl): Really use the original template. - - * call.c (build_new_method_call): Use simple constructor_name for - error messages. - -Wed Oct 8 22:44:42 1997 Jeffrey A Law - - * method.c (build_underscore_int): Don't use ANSI specific - features. - -Wed Oct 8 00:18:22 1997 Jason Merrill - - * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN - for our key method; it might have been inlined by -O3. - -Tue Oct 7 23:00:12 1997 Mark Mitchell - - * decl.c (make_typename_type): Do not try to call lookup_field for - non-aggregate types. - -Tue Oct 7 22:52:10 1997 Jason Merrill - - * typeck.c (build_reinterpret_cast): Tweak. - -Tue Oct 7 22:45:31 1997 Alexandre Oliva - - * typeck.c (build_reinterpret_cast): Converting a void pointer - to function pointer with a reinterpret_cast produces a warning - if -pedantic is issued. - -Tue Oct 7 22:43:43 1997 Bruno Haible - - * typeck.c (c_expand_return): Don't warn about returning a - reference-type variable as a reference. - -Tue Oct 7 21:11:22 1997 Jason Merrill - - * method.c (build_static_name): Fix typo. - -1997-10-07 Brendan Kehoe - - * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on - OLDDECL before we try to do DECL_USE_TEMPLATE. - -Tue Oct 7 00:48:36 1997 Jason Merrill - - * decl.c (duplicate_decls): Don't warn about template instances. - - * typeck.c (mark_addressable): Lose ancient code that unsets - DECL_EXTERNAL. - - * pt.c (do_decl_instantiation): Lose support for instantiating - non-templates. - - * call.c (build_new_function_call): Fix handling of null explicit - template args. - (build_new_method_call): Likewise. - -Mon Oct 6 23:44:34 1997 Mark Mitchell - - * method.c (build_underscore_int): Fix typo. - -1997-10-06 Brendan Kehoe - - * tree.c (print_lang_statistics): #if 0 call to - print_inline_obstack_statistics until its definition is checked in. - -Mon Oct 6 09:27:29 1997 Jason Merrill - - * decl2.c (finish_file): Move dump_tree_statistics to end. - - * pt.c (instantiate_decl): Look for the original template. - (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations - of member templates. - -Wed Oct 1 08:41:38 1997 Jason Merrill - - * Makefile.in (g++FAQ.*): New rules. - (CONFLICTS): Update. - * g++FAQ.texi: Moved from libg++. - - * parse.y (PFUNCNAME): Only specify the type once. - -1997-10-01 Brendan Kehoe - - * lex.c (real_yylex): Clean up the code to fully behave the way - the c-lex.c parser does for complex and real numbers. - -Tue Sep 30 08:51:36 1997 Jason Merrill - - * method.c (build_decl_overload_real): Reformat. - -Tue Sep 30 00:18:26 1997 Jason Merrill - - * method.c (synthesize_method): If at_eof, determine our linkage. - -1997-09-29 Paul Eggert - - * lex.c (real_yylex): Treat `$' just like `_', except issue a - diagnostic if !dollars_in_ident or if pedantic. - - * lang-specs.h (@c++): -ansi no longer implies -$. - - * decl2.c (lang_decode_option): - -traditional and -ansi now do not mess with - dollars_in_ident. - -Mon Sep 29 19:57:51 1997 H.J. Lu - - * Makefile.in (parse.o, decl.o): Also depend on - $(srcdir)/../except.h $(srcdir)/../output.h. - (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h - $(srcdir)/../except.h $(srcdir)/../output.h. - (typeck.o, init.o): Also depend on $(srcdir)/../expr.h - ../insn-codes.h. - - * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping. - - * expr.c (cplus_expand_expr): Make it static. - - * decl2.c, init.c, typeck.c: Include "expr.h". - (expand_expr): Use proper values when calling the function. - -Mon Sep 29 11:05:54 1997 Alexandre Oliva - - * lang-options.h: New -Wold-style-cast flag. - * cp-tree.h (warn_old_style_cast): New variable. - * decl2.c (warn_old_style_cast): Likewise. - (lang_decode_option): Support -Wold-style-cast. - (reparse_absdcl_as_casts): Produce old-style-cast warning. - -Mon Sep 29 09:20:53 1997 Benjamin Kosnik - - * decl.c (cp_finish_decl): Allow expand_aggr_init to set - TREE_USED, reset value based on already_used. - - * init.c (expand_member_init): Revert change. - -Mon Sep 29 08:57:53 1997 Jason Merrill - - * cp-tree.h, decl.c, decl2.c, pt.c: - Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public. - - * decl2.c (lang_decode_option): Add missing ;. - -Sat Sep 27 16:22:48 1997 Jason Merrill - - * friend.c (do_friend): Disable injection for all template-derived - decls. - * decl2.c (lang_decode_option): Handle -fguiding-decls. - * parse.y (notype_template_declarator): New nonterminal. - (direct_notype_declarator): Use it. - (complex_direct_notype_declarator): Likewise. - (object_template_id): Accept any kind of identifier after TEMPLATE. - (notype_qualified_id): Don't add template declarators here. - -Sat Sep 27 16:21:58 1997 Mark Mitchell - - * call.c (add_template_candidate): Add explicit_targs parameter. - (build_scoped_method_call): Use it. - (build_overload_call_real): Likewise. - (build_user_type_conversion_1): Likewise. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - (build_new_function_call): Handle TEMPLATE_ID_EXPR. - (build_new_method_call): Likewise. - - * class.c (finish_struct_methods): Add specialization pass to - determine which methods were specializing which other methods. - (instantiate_type): Handle TEMPLATE_ID_EXPR. - - * cp-tree.def (TEMPLATE_ID_EXPR): New tree code. - - * cp-tree.h (name_mangling_version): New variable. - (flag_guiding_decls): Likewise. - (build_template_decl_overload): New function. - (begin_specialization): Likewise. - (reset_specialization): Likewise. - (end_specialization): Likewise. - (determine_explicit_specialization): Likewise. - (check_explicit_specialization): Likewise. - (lookup_template_function): Likewise. - (fn_type_unification): Add explicit_targs parameter. - (type_unification): Likewise. - - * decl.c (duplicate_decls): Add smarts for explicit - specializations. - (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function - specializations. - (grokfndecl): Call check_explicit_specialization. - - * decl2.c (lang_decode_option): Handle -fname-mangling-version. - (build_expr_from_tree): Handle TEMPLATE_ID_EXPR. - (check_classfn): Handle specializations. - - * error.c (dump_function_name): Print specialization arguments. - - * friend.c (do_friend): Don't call pushdecl for template - instantiations. - - * init.c (build_member_call): Handle TEMPLATE_ID_EXPR. - - * lang-options.h: Add -fname-mangling-version, -fguiding-decls, - and -fno-guiding-decls. - - * lex.c (identifier_type): Return PFUNCNAME for template function - names. - - * method.c (build_decl_overload_real): New function. - (build_template_parm_names): New function. - (build_overload_identifier): Use it. - (build_underscore_int): New function. - (build_overload_int): Use it. Add levels for template - parameters. - (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs. - (build_overload_nested_names): Handle template type parameters. - (build_template_decl_overload): New function. - - * parse.y (YYSTYPE): New ntype member. - (nested_name_specifier): Use it. - (nested_name_specifier_1): Likewise. - (PFUNCNAME): New token. - (template_id, object_template_id): New non-terminals. - (template_parm_list): Note specializations. - (template_def): Likewise. - (structsp): Likewise. - (fn.def2): Handle member template specializations. - (component_decl_1): Likewise. - (direct_notype_declarator): Handle template-ids. - (component_decl_1): Likewise. - (direct_notype_declarator): Handle template-ids. - (primary): Handle TEMPLATE_ID_EXPR, and template-ids. - - * pt.c (processing_specializations): New variable. - (template_header_count): Likewise. - (type_unification_real): New function. - (processing_explicit_specialization): Likewise. - (note_template_header): Likewise. - (is_member_template): Handle specializations. - (end_template_decl): Call reset_specialization. - (push_template_decl): Handle member template specializations. - (tsubst): Likewise. - (tsubst_copy): Handle TEMPLATE_ID_EXPR. - (instantiate_template): Handle specializations. - (instantiate_decl): Likewise. - (fn_type_unification): Handle explicit_targs. - (type_unification): Likewise. Allow incomplete unification - without an error message, if allow_incomplete. - (get_bindings): Use new calling sequence for fn_type_unification. - - * spew.c (yylex): Handle PFUNCNAME. - - * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR. - (really_overloaded_fn): Likewise. - (get_first_fn): Handle function templates. - - * typeck.c (build_x_function_call): Use really_overloaded_fn. - Handle TEMPLATE_ID_EXPR. - (build_x_unary_op): Likewise. - (build_unary_op): Likewise. - (mark_addressable): Templates whose address is taken are marked - as used. - -1997-09-25 Andreas Schwab - - * decl.c (init_decl_processing): Declare __builtin_constant_p as - accepting any kind of type, not only int. - -Fri Sep 26 00:22:56 1997 Jason Merrill - - * search.c (get_matching_virtual): Notice virtual bases when sorrying - about covariant returns. - - * parse.y (member_init): Also imply typename here. Remove ancient - extension for initializing base members. - -Thu Sep 25 11:11:13 1997 Jason Merrill - - Handle multi-level typenames and implicit typename in base list. - * parse.y (typename_sub{,[0-2]}): New rules. - (structsp, rule TYPENAME_KEYWORD): Use typename_sub. - (nonnested_type): New rule. - (complete_type_name): Use it. - (base_class.1): Use typename_sub and nonnested_type. - (nested_name_specifier): Don't elide std:: here. - * decl.c (make_typename_type): Handle getting a type for NAME. - (lookup_name_real): Turn std:: into :: here. - - Rvalue conversions were removed in London. - * call.c (is_subseq): Don't consider lvalue transformations. - (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK. - (joust): Re-enable ?: kludge. - -1997-09-22 Brendan Kehoe - - * decl.c (start_function): Up warning of no return type to be a - pedwarn. - -Mon Sep 22 14:15:34 1997 Benjamin Kosnik - - * init.c (expand_member_init): Don't set TREE_USED. - * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED - set,don't clear TREE_USED wholesale. - -Sat Sep 20 15:31:00 1997 Jason Merrill - - * call.c (build_over_call): Do require_complete_type before - build_cplus_new. - -Thu Sep 18 16:47:52 1997 Jason Merrill - - * search.c (lookup_field): Call complete_type in all cases. - - * decl.c (finish_function): Just warn about flowing off the end. - -Wed Sep 17 10:31:25 1997 Jason Merrill - - * decl.c (grokparms): Don't bash a permanent list node if we're - in a function. - -1997-09-17 Brendan Kehoe - - * Makefile.in (CONFLICTS): Fix s/r conflict count to 18. - -Tue Sep 16 14:06:56 1997 Jason Merrill - - * call.c (build_new_op): Give better error for syntactically - correct, but semantically invalid, use of undeclared template. - - * call.c (compare_qual): Handle pmfs. - - * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn - after the exception spec. - -Mon Sep 15 11:52:13 1997 Jason Merrill - - * call.c (null_ptr_cst_p): Integer type, not integral type. - - * call.c (joust): Disable warnings until they can be moved to the - right place. - -Fri Sep 12 16:11:13 1997 Per Bothner - - * Makefile.in, config-lang.in: Convert to autoconf. - -Thu Sep 11 17:14:55 1997 Jason Merrill - - * decl.c (lookup_name_real): Add implicit 'typename' to types from - base classes. - - * pt.c (most_specialized_class): Fix typo. - (tsubst): Move constant folding to TREE_VEC case. - -Thu Sep 11 10:08:45 1997 Mark Mitchell - - * pt.c (do_poplevel): Don't warn about unused local variables - while processing_template_decl since we don't always know whether - or not they will need constructing/destructing. - - * pt.c (uses_template_parms): Check the values of an enumeration - type to make sure they don't depend on template parms. - - * decl.c (make_typename_type): Don't lookup the field if the - context uses template parms, even if we're not - processing_template_decl at the moment. - - * pt.c (coerce_template_parms): Avoid looking at the - TYPE_LANG_DECL portion of a typename type, since there won't be - one. - (tsubst): Do constant folding as necessary to make sure that - arguments passed to lookup_template_class really are constants. - -Wed Sep 10 11:21:55 1997 Jason Merrill - - * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO. - * decl2.c (finish_file): Only register exception tables if we - need to. - - * decl.c (init_decl_processing): Add __builtin_[fs]p. - -Tue Sep 9 19:49:38 1997 Jason Merrill - - * pt.c (unify): Just return 0 for a TYPENAME_TYPE. - -Tue Sep 9 17:57:25 1997 Mark Mitchell - - * error.c (dump_decl): Avoid crashing when presented with a - uninitialized constant, as can occur with a template parameter. - (dump_expr): Make sure that there are enough levels of - current_template_parms before we start diving through them. - -1997-09-09 Brendan Kehoe - - * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to - c-typeck.c. - -Tue Sep 9 09:36:39 1997 Benjamin Kosnik - - * except.c (expand_throw): Call build_delete for all - exception types, not just objects with destructors. - -Mon Sep 8 02:33:20 1997 Jody Goldberg - - * decl.c (current_local_enum): Remove static. - * pt.c (tsubst_enum): Save and restore value of current_local_enum - in case template is expanded in enum decl. - (instantiate_class_template): Use new tsubst_enum signature. - (tsubst_expr): Likewise. - -Mon Sep 8 01:21:43 1997 Mark Mitchell - - * pt.c (begin_member_template_processing): Take a function as - argument, not a set of template arguments. Use the template - parameters, rather than the arguments. Handle non-type parameters - correctly. Push a binding level for the parameters so that multiple - member templates using the same parameter names can be declared. - (end_member_template_processing): Pop the binding level. - (push_template_decl): Mark member templates as static when - appropriate. - - * lex.c (do_pending_inlines): Pass the function, not its template - arguments, to begin_member_template_processing. - (process_next_inline): Likewise. - (do_pending_defargs): Likewise. - - * error.c (dump_expr): Obtain the correct declaration for a - TEMPLATE_CONST_PARM. - - * call.c (add_template_conv_candidate): New function. - (build_object_call): Handle member templates, as done in the other - build_ functions. - -Sat Sep 6 10:20:27 1997 Mark Mitchell - - * decl.c (replace_defag): Undo previous change. - * lex.c (do_pending_defargs): Deal with member templates. - - * pt.c (is_member_template): Avoid crashing when passed a - non-function argument. - -Fri Sep 5 17:27:38 1997 Jason Merrill - - * class.c (grow_method): Remove check for redeclaration. - -Fri Sep 5 01:37:17 1997 Mark Mitchell - - * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro. - (DECL_INNERMOST_TEMPLATE_PARMS): Likewise. - (PRIMARY_TEMPLATE_P): Use it. - * call.c (build_overload_call_real): Use it. - * class.c (instantiate_type): Likewise. - * decl.c (decls_match): Likewise. - * method.c (build_overload_identifier): Likewise. - * pt.c (push_template_decl): Likewise. - (classtype_mangled_name): Likewise. - (lookup_template_class): Likewise. - - * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to - DECL_NTPARMS to conform to usage elsewhere. - * call.c (add_template_candidate): Likewise. - * class.c (instantiate_type): Likewise. - * pt.c (instantiate_template): Likewise. - (get_bindings): Likewise. - - * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of - is_member_template. - - * pt.c (unify): Undo changes to allow multiple levels of template - parameters. - (type_unification): Likewise. - (fn_type_unification): Likewise. - (get_class_bindings): Likewise. - * cp-tree.h (Likewise). - - * decl.c (replace_defarg): Check that the type of the default - parameter does not invlove a template type before complaining - about the initialization. - - * error.c (dump_expr): Deal with template constant parameters in - member templates correctly. - - * pt.c (is_member_template): Deal with class specializations - correctly. - (tsubst): Handle "partial instantiation" of member templates - correctly. - -Wed Sep 3 12:30:24 1997 Mark Mitchell - - * pt.c (type_unification): Change calling sequence to allow for - multiple levels of template parameters. - (tsubst_expr): Likewise. - (tsubst): Likewise. - (tsubst_copy): Likewise. - (instantiate_template): Likewise. - (unify): Likewise. - * call.c (build_overload_call_real): Use it. - (add_builtin_candidate): Use it. - (build_new_method_call): Use it. - * class.c (instantiate_type): Use it. - * decl.c (grokdeclarator): Use it. - * decl2.c (finish_file): Use it. - * method.c (build_overload_identifier): Use it. - - * call.c (add_template_candidate): Add additional parameter for - the function return type. Call fn_type_unification istead of - type_unification. - (build_user_type_conversion_1): Handle member templates. - (build_new_function_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - - * class.c (grow_method): Don't give an error message indicating - that two member templates with the same name are ambiguous. - (finish_struct): Treat member template functions just like member - functions. - - * cp-tree.h (check_member_template): Add declaration. - (begin_member_template_processing): Likewise. - (end_member_template_processing): Likewise. - (fn_type_unification): Likewise. - (is_member_template): Likewise. - (tsubst): Change prototype. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (instantiate_template): Likewise. - (get_bindings): Likewise. - - * decl.c (decls_match): Handle multiple levels of template - parameters. - (pushdecl): Handle template type params just like other type - declarations. - (push_class_level_binding): Return immediately if the - class_binding_level is NULL. - (grokfndecl): If check_classfn() returns a member_template, use - the result of the template, not the template itself. - - * decl2.c (check_member_template): New function. Check to see - that the entity declared to be a member template can be one. - (check_classfn): Allow redeclaration of member template functions - with different types; the new functions can be specializations or - explicit instantiations. - - * error.c (dump_decl): Handle multiple levels of template - parameters. - (dump_function_decl): Update to handle function templates. - - * lex.c (do_pending_inlines): Set up template parameter context - for member templates. - (process_next_inline): Likewise. - - * method.c (build_overload_identifier): Adjust for multiple levels - of template parameters. - - * parse.y (fn.def2): Add member templates. - (component_decl_1): Likewise. - - * pt.c (begin_member_template_processing): New function. - (end_member_template_processing): Likewise. - (is_member_template): Likewise. - (fn_type_unification): Likewise. - (current_template_parms): Return a vector of all the template - parms, not just the innermost level of parms. - (push_template_decl): Deal with the possibility of member - templates. - (lookup_template_class): Likewise. - (uses_template_parms): Likewise. - (tsubst): Modify processing to TEMPLATE_TYPE_PARM and - TEMPLATE_CONST_PARM to deal with multiple levels of template - arguments. Add processing of TEMPLATE_DECL to produce new - TEMPLATE_DECLs from old ones. - (do_decl_instantiation): Handle member templates. - - * search.c (lookup_fnfields_1): Handle member template conversion - operators. - - * tree.c (cp_tree_equal): Check the levels, as well as the - indices, of TEMPLATE_CONST_PARMs. - - * typeck.c (comptypes): Check the levels, as well as the indices, - fo TEMPLATE_TYPE_PARMs. - (build_x_function_call): Treat member templates like member - functions. - -Wed Sep 3 11:09:25 1997 Jason Merrill - - * typeck.c (c_expand_return): Always convert_for_initialization - before checking for returning a pointer to local. - - * pt.c (type_unification): If strict and the function parm doesn't - use template parms, just compare types. - -Wed Sep 3 10:35:49 1997 Klaus Espenlaub - - * method.c (build_overloaded_value): Replace direct call - to the floating point emulator with REAL_VALUE_TO_DECIMAL macro. - -Wed Sep 3 00:02:53 1997 Jason Merrill - - * typeck.c (convert_arguments): Don't arbitrarily choose the first - of a set of overloaded functions. - -Tue Sep 2 12:09:13 1997 Jason Merrill - - * lex.c (real_yylex): Don't elide __FUNCTION__. - - * method.c (build_overload_value): Add in_template parm. - (build_overload_int): Likewise. - (build_overload_identifier): Pass it. - - * decl.c (duplicate_decls): Don't bash a previous template - definition with a redeclaration. - - * pt.c (unify): float doesn't match double. - - * pt.c (do_type_instantiation): Handle getting a _TYPE or a - TYPE_DECL. Handle getting non-template types. - * parse.y (explicit_instantiation): Use typespec instead of - aggr template_type. - -Tue Sep 2 10:27:08 1997 Richard Henderson - - * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings. - -Mon Sep 1 13:19:04 1997 Eugene Mamchits - - * call.c (add_builtin_candidate): Add missing TREE_TYPE. - (compare_ics): Likewise. - -Mon Sep 1 13:19:04 1997 Jason Merrill - - * call.c (joust): Warn about choosing one conversion op over - another because of 'this' argument when the other return type is - better. - (source_type): New fn. - - * call.c (build_new_op): Strip leading REF_BIND from first operand - to builtin operator. - - * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we - use its RTL. - -Thu Aug 28 09:45:23 1997 Jason Merrill - - * call.c (null_ptr_cst_p): Remove support for (void*)0. - -Wed Aug 27 02:03:34 1997 Jeffrey A Law - - * typeck.c (expand_target_expr): Make definition match declaration. - - * class.c (get_basefndecls): Make definition match declaration. - -Mon Aug 25 14:30:02 1997 Jason Merrill - - * input.c (sub_getch): Eventually give up and release the input file. - - * decl.c (cp_finish_decl): If #p i/i, put inline statics in the - right place. - - * call.c (joust): Tweak message. - -Sat Aug 23 18:02:59 1997 Mark Mitchell - - * error.c (type_as_string): Put const/volatile on template type - parameters where appropriate. - -Sat Aug 23 17:47:22 1997 Jeffrey A Law - - * call.c (strictly_better): Make arguments unsigned ints. - -Thu Aug 21 18:48:44 1997 Jason Merrill - - * lex.c (real_yylex): Refer to __complex instead of complex. - -Thu Aug 21 22:25:46 1997 J"orn Rennecke - - * lex.c (real_yylex): Don't use getc directly. - -Wed Aug 20 17:25:08 1997 Jason Merrill - - * call.c (is_subseq): Don't try to be clever. - -Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * parse.y, pt.c: Include "except.h". - * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c, - error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c, - lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c, - sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish - prototyping. - -Wed Aug 20 01:34:40 1997 Jason Merrill - - * decl2.c (mark_vtable_entries): Instead of replacing pure - virtuals with a reference to __pure_virtual, copy the decl and - change the RTL. - -Tue Aug 19 02:26:07 1997 Jason Merrill - - * pt.c (lookup_nested_type_by_name): Handle typedef wierdness. - - * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com. - - * pt.c (instantiate_class_template): Call repo_template_used - before finish_prevtable_vardecl. - - * call.c (is_subseq): New fn. - (compare_ics): Use it. - - * repo.c (finish_repo): Don't crash on no args. - - * parse.y (named_complex_class_head_sans_basetype): Handle - explicit global scope. - * decl2.c (handle_class_head): New fn. - - * pt.c (unify): Add CONST_DECL case. - -Thu Aug 14 10:05:13 1997 Brendan Kehoe - - * rtti.c (permanent_obstack): Fix decl to not be a pointer. - - * cp-tree.h (report_type_mismatch): Add prototype. - * call.c (build_overload_call_real): Remove erroneous fourth - argument to report_type_mismatch. - (build_user_type_conversion_1): Remove erroneous second arg to - tourney. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - -Wed Aug 13 19:19:25 1997 Jason Merrill - - * error.c (dump_decl): Don't bother processing a function with no - DECL_LANG_SPECIFIC. - - * method.c (emit_thunk): Call init_function_start in the macro case. - -Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not - defined and used to set flag_vtable_thunks. - -Tue Aug 12 20:13:57 1997 Jason Merrill - - * parse.y: Don't clear the inlines from their obstack until they've - all been processed. - - * decl.c (duplicate_decls): Don't complain about exception - specification mismatch if flag_exceptions is off. - -Mon Aug 11 15:01:56 1997 Marc Lehmann - - * Make-lang.in (c++.distclean): Remove g++.c on make distclean. - -Sun Aug 10 12:06:09 1997 Paul Eggert - - * cp-tree.h: Replace STDIO_PROTO with PROTO in include files. - * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c: - Include before include files that formerly used STDIO_PROTO. - - * decl.c, g++spec.c, lex.c, method.c, repo.c: - Include "config.h" first, as per autoconf manual. - -Fri Aug 8 11:47:48 1997 Jason Merrill - - * decl.c (duplicate_decls): Tweak wording. - * lex.c (do_pending_defargs): Don't die if we see a default arg - that isn't a DEFAULT_ARG. - * error.c (dump_expr): Handle DEFAULT_ARG. - - * decl2.c (lang_decode_option): Handle -fhandle-exceptions. - * lang-options.h: Add -fhandle-exceptions. - - * class.c (build_vtable): Vtables are artificial. - (prepare_fresh_vtable): Likewise. - -Wed Aug 6 11:02:36 1997 Jason Merrill - - * cvt.c (ocp_convert): After converting to the target type, set - LOOKUP_NO_CONVERSION. - - * call.c (joust): Warn about potentially confusing promotion rules - with -Wsign-promo. - * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo. - -Tue Aug 5 15:15:07 1997 Michael Meissner - - * exception.cc: Declare __terminate_func with noreturn attribute. - -Fri Aug 1 03:18:15 1997 Jason Merrill - - * parse.y: Break out eat_saved_input, handle errors. - (function_try_block): Use compstmt instead of compstmt_or_error. - -Thu Jul 31 17:14:04 1997 Jason Merrill - - * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE. - -Fri Jul 4 01:45:16 1997 Andreas Schwab - - * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for - existence of cc1plus check whether $(LANGUAGES) contains C++. - -Wed Jul 30 13:04:21 1997 Andreas Schwab - - * method.c (do_build_copy_constructor): When copying an anonymous - union member loop around to handle nested anonymous unions. Use - the offset of the member relative to the outer structure, not the - union. - -Tue Jul 29 21:17:29 1997 Jason Merrill - - * call.c (resolve_args): New fn. - (build_new_function_call): Use it. - (build_object_call): Likewise. - (build_new_method_call): Likewise. - -Mon Jul 28 16:02:36 1997 Jason Merrill - - * call.c (build_over_call): tsubst all default parms from templates. - -Wed Jul 23 13:36:25 1997 Jason Merrill - - * decl.c (struct cp_function): Add static_labelno. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - -Tue Jul 22 14:43:29 1997 Jason Merrill - - * typeck.c (build_component_ref_1): Convert from reference. - -Tue Jul 22 11:06:23 1997 Brendan Kehoe - - * parse.y (current_declspecs, prefix_attributes): Initialize to - NULL_TREE. - - * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil - before we try to force it to be a TREE_LIST. - (decl): Make sure $1.t is non-nil. - -Sun Jul 20 11:53:07 1997 Jason Merrill - - * pt.c (uses_template_parms): Handle template first-parse codes. - - * decl.c (cp_finish_decl): Only warn about user-defined statics. - -Fri Jul 18 17:56:08 1997 Jason Merrill - - * pt.c (unify): Handle BOOLEAN_TYPE. - - * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE. - * pt.c (tsubst): Don't set it. - * call.c (build_over_call): Use uses_template_parms. - -Thu Jul 17 18:06:30 1997 Jason Merrill - - * method.c (build_overload_nested_name): Use static_labelno - instead of var_labelno. - (build_qualified_name): New fn. - (build_overload_name): Split out from here. - (build_static_name): Use build_qualified_name. - * decl.c (cp_finish_decl): Statics in extern inline functions - have comdat linkage. - (start_function): Initialize static_labelno. - -Thu Jul 17 11:20:17 1997 Benjamin Kosnik - - * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy - before "all member functions in class [] are private". - -Wed Jul 16 23:47:08 1997 Jason Merrill - - * lex.c (do_scoped_id): convert_from_reference. - * init.c (build_offset_ref): Likewise. - -Wed Jul 16 12:34:29 1997 Benjamin Kosnik - - * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list. - -Mon Jul 14 03:23:46 1997 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Promote index - before saving it. - -Sun Jul 13 00:11:52 1997 Jason Merrill - - * tree.c (layout_basetypes): Move non-virtual destructor warning. - * decl.c (xref_basetypes): Remove non-virtual destructor warning. - -Sat Jul 12 12:47:12 1997 Jason Merrill - - * decl.c (grokdeclarator): Call add_defarg_fn for the function - type, too. - * lex.c (add_defarg_fn): Adjust. - (do_pending_defargs): Adjust. Don't skip the first parm. - -Fri Jul 11 01:39:50 1997 Jason Merrill - - * decl.c (build_enumerator): Global enumerators are also readonly. - - * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast. - (build_dynamic_cast): Call it and convert_from_reference. - - * lex.c (add_defarg_fn): New fn. - (snarf_defarg): Don't add to defarg_types. - (do_pending_defargs): Lose defarg_types. All fns we process now - have defargs. - * decl.c (grokfndecl): Call add_defarg_fn. - - * Makefile.in (CONFLICTS): Expect 18 s/r conflicts. - * cp-tree.def: Add DEFAULT_ARG. - * spew.c (yylex): Call snarf_defarg as appropriate. - * parse.y: New tokens DEFARG and DEFARG_MARKER. - (defarg_again, pending_defargs, defarg, defarg1): New rules. - (structsp): Use pending_defargs. - (parms, full_parm): Use defarg. - * lex.c (init_lex): Initialize inline_text_firstobj. - (do_pending_inlines): Never pass the obstack to feed_input. - (process_next_inline): Call end_input instead of restore_pending_input. - (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs, - finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns. - * input.c (end_input): New fn. - (sub_getch): At the end of some fed input, just keep returning EOF - until someone calls end_input. - Remove 'obstack' field from struct input_source. - * decl.c (grokparms): Handle DEFAULT_ARG. - (replace_defarg): New fn. - * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros. - -Wed Jul 9 13:44:12 1997 Jason Merrill - - * call.c (implicit_conversion): If nothing else works, try binding - an rvalue to a reference. - -Wed Jul 9 13:04:38 1997 Geoffrey Noer - - * decl.c (init_decl_processing): Fix Jun 30 patch -- move - ifndef for Cygwin32 to include SIGSEGV. - -Thu Jul 3 01:44:05 1997 Jason Merrill - - * class.c (finish_struct_1): Only complain about pointers without - copy stuff if there are any constructors. - - * rtti.c (build_dynamic_cast): Call complete_type on the types. - - * decl.c (grokfndecl): If the function we chose doesn't actually - match, die. - - * decl2.c (grokclassfn): Don't specify 'const int' for the - artificial destructor parm. - - * pt.c (type_unification): If we are called recursively, nothing - decays. - -Mon Jun 30 17:53:21 1997 Geoffrey Noer - - * decl.c (init_decl_processing): Stop trying to catch signals - other than SIGABRT since the Cygwin32 library doesn't support - them correctly yet. This fixes a situation in which g++ causes - a hang on SIGSEGVs and other such signals in our Win32-hosted - tools. - -Mon Jun 30 14:50:01 1997 Jason Merrill - - * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data. - -Fri Jun 27 15:18:49 1997 Jason Merrill - - * typeck2.c (store_init_value): Always return the value if our - type needs constructing. - - * method.c (hack_identifier): Convert class statics from - reference, too. - -Thu Jun 26 11:44:46 1997 Jason Merrill - - * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency. - -Thu Jun 19 16:49:28 1997 Mike Stump - - * typeck.c (c_expand_return): Make sure we clean up temporaries at - the end of return x; - -Thu Jun 19 12:28:43 1997 Brendan Kehoe - - * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER. - -Tue Jun 17 18:35:57 1997 Mike Stump - - * except.c (expand_builtin_throw): Add support - -fno-sjlj-exceptions -fPIC exception handling on the SPARC. - -Mon Jun 16 01:24:37 1997 Jason Merrill - - * repo.c (extract_string): Null-terminate. - - * cp-tree.h (TI_SPEC_INFO): New macro. - (CLASSTYPE_TI_SPEC_INFO): New macro. - * pt.c (push_template_decl): Correctly determine # of template parms - for partial specs. - - * call.c (compare_ics): Really fix 'this' conversions. - - * pt.c (do_decl_instantiation): Don't crash on explicit inst of - non-template fn. - - * pt.c (push_template_decl): Complain about mismatch in # of - template parms between a class template and a member template. - -Sun Jun 15 02:38:20 1997 Jason Merrill - - * method.c (synthesize_method): You can't call - function_cannot_inline_p after finish_function. - * decl.c (finish_function): Turn on flag_inline_functions and turn - off DECL_INLINE before handing a synthesized method to the - backend. - -Thu Jun 12 17:35:28 1997 Jason Merrill - - * method.c (synthesize_method): Remove July 30 change to never set - DECL_INLINE if at_eof. - -Thu Jun 12 15:25:08 1997 Mike Stump - - * xref.c (GNU_xref_member): Ensure that the node has a - decl_lang_specific part before checking DECL_FRIEND_P. - -Thu Jun 12 12:36:05 1997 Jason Merrill - - * pt.c (instantiate_class_template): Diagnose non-class types used - as bases. - -Wed Jun 11 17:33:40 1997 Jason Merrill - - * typeck.c (build_conditional_expr): Use convert_for_initialization - instead of convert_and_check. - -Wed Jun 11 12:31:33 1997 Brendan Kehoe - - * parse.y (typespec): Don't pedwarn for typeof. - -Tue Jun 10 00:22:09 1997 Jason Merrill - - * repo.c (finish_repo): Only check changes if we would write a - repo file. - - * call.c (compare_ics): Fix handling of 'this' conversions. - - * pt.c (do_decl_instantiation): Support static data too. Rename - from do_function_instantiation. - * cp-tree.h: Adjust. - * parse.y: Adjust. - - * repo.c (extract_string): New fn. - (get_base_filename): Use it. - (init_repo): Compare old args with current args. - -Mon Jun 9 14:25:30 1997 Mike Stump - - * Makefile.in, Make-lang.in: Protect C-ls with a comment - character, idea from Paul Eggert . - -Mon Jun 9 01:52:03 1997 Jason Merrill - - * typeck.c (c_expand_return): Be more persistent in looking for - returned temps. - - * cvt.c (build_up_reference): Use NOP_EXPR for switching from - pointer to reference. - - * class.c (build_vbase_path): Don't do anything if PATH has no steps. - -Sun Jun 8 03:07:05 1997 Jason Merrill - - * init.c (build_member_call, build_offset_ref): - Use do_scoped_id instead of do_identifier. - - * cvt.c (convert): Remove bogosity. - -Sat Jun 7 20:50:17 1997 Brendan Kehoe - - * cvt.c (build_up_reference): Do checks of ARGTYPE and - TARGET_TYPE before trying to use get_binfo. - -Fri Jun 6 17:36:39 1997 Jason Merrill - - * cvt.c (build_up_reference): Call get_binfo to get access control. - - * decl2.c (import_export_decl): If we don't support weaks, leave - statics undefined. - -Fri Jun 6 15:55:49 1997 Mike Stump - - * except.c (expand_builtin_throw): Add support for machines that - cannot access globals after throw's epilogue when - -fno-sjlj-exceptions is used. - -Thu Jun 5 16:28:43 1997 Jason Merrill - - * parse.y: 'std::' becomes '::'. - * lex.c (real_yylex): Remove 'namespace' warning. - * init.c (build_member_call): Ignore 'std::'. - (build_offset_ref): Likewise. - * decl2.c (do_using_directive): Ignore 'using namespace std;'. - (do_toplevel_using_decl): Ignore 'using std::whatever'. - * decl.c (push_namespace): Just sorry. - (pop_namespace): Nop. - (init_decl_processing): Declare std namespace. - -Tue Jun 3 18:08:23 1997 Jason Merrill - - * search.c (push_class_decls): A name which ambiguously refers to - several instantiations of the same template just refers to the - template. - -Tue Jun 3 12:30:40 1997 Benjamin Kosnik - - * decl.c (build_enumerator): Fix problem with unsigned long - enumerated values being smashed to ints, causing overflow - when computing next enumerated value (for enum values around - MAX_VAL). - -Mon Jun 2 17:40:56 1997 Jason Merrill - - * typeck.c (build_component_ref): Only call mark_used on a decl. - -Thu May 29 15:54:17 1997 Brendan Kehoe - - * typeck.c (build_c_cast): Make the check for a ptr to function - more specific before possible default_conversion call. - -Thu May 29 13:02:06 1997 Mike Stump - - * except.c (expand_exception_blocks): Simplify and fix and make - sure we don't end a region in a sequence, as expand_end_bindings - doesn't like it. - -Wed May 28 17:08:03 1997 Mike Stump - - * except.c (init_exception_processing): Mark terminate as not - returning so that the optimizer can optimize better. - -Tue May 27 19:49:19 1997 Mike Stump - - * cvt.c (convert): Don't do any extra work, if we can avoid it - easily. - -Tue May 27 18:21:47 1997 Mike Stump - - * *.[chy]: Change cp_convert to ocp_convert, change convert to - cp_convert. convert is now reserved for the backend, and doesn't - have the semantics a frontend person should ever want. - -Fri May 23 10:58:31 1997 Jason Merrill - - * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled. - Lose -traditional support. - -Thu May 22 15:41:28 1997 Jason Merrill - - * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype). - - * parse.y (self_reference): Do it for templates, too. - * class.c (pushclass): Don't overload_template_name; the alias - generated by build_self_reference serves the same purpose. - - * tree.c (list_hash): Make static, take more args. - (list_hash_lookup): Likewise. - (list_hash_add): Make static. - (list_hash_canon): Lose. - (hash_tree_cons): Only build a new node if one isn't already in the - hashtable. - (hash_tree_chain): Use hash_tree_cons. - * cp-tree.h: Adjust. - * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead - of calling lookup_name. - -Wed May 21 18:24:19 1997 Jason Merrill - - * pt.c (instantiate_class_template): TYPE_VALUES for an enum - doesn't refer to the CONST_DECLs. - -Tue May 20 21:09:32 1997 Bob Manson - - * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever - is bigger. - (expand_class_desc): Convert the last argument to a sizetype. - -Tue May 20 13:55:57 1997 Brendan Kehoe - - * gxx.gperf (__complex, __complex__, __imag, __imag__, __real, - __real__): Add reswords. - * hash.h: Regenerate. - * lex.h (rid): Add RID_COMPLEX. - (RID_LAST_MODIFIER): Set to RID_COMPLEX. - * lex.c (init_lex): Add building of RID_COMPLEX. - (real_yylex): General cleanup in line with what c-lex.c also has, - sans the cruft for traditional; add handling of SPEC_IMAG, complex - types, and imaginary numeric constants. - * parse.y (REALPART, IMAGPART): Add tokens. - (unary_expr): Add REALPART and IMAGPART rules. - * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare. - * decl.c (complex_{integer,float,double,long}_type_node): Define - types. - (init_decl_processing): Set up the types. - (grokdeclarator): Add handling of RID_COMPLEX. Set and use - DEFAULTED_INT instead of EXPLICIT_INT when we default to int type. - * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases. - * cvt.c (cp_convert): Handle COMPLEX_TYPE. - * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add - COMPLEX_TYPE case. - * method.c (build_overload_name): Add handling of the different - COMPLEX_TYPEs, prefixing them with `J'. - * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE - as a template parm. - (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case. - * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases. - (mapcar): Handle COMPLEX_CST. - * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE. - (common_type): Add code for complex types. - (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases. - (convert_for_assignment): Likewise. - (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases. - -Mon May 19 12:26:27 1997 Jason Merrill - - * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to - tsubst_expr, as it might try to do overload resolution. - -Sat May 17 10:48:31 1997 Jason Merrill - - * pt.c (instantiate_class_template): Oops. - -Fri May 16 14:23:57 1997 Jason Merrill - - * cp-tree.def: Add TAG_DEFN. - * pt.c (tsubst_enum): New fn. - (instantiate_class_template): Use it. - (tsubst_expr): Support TAG_DEFN. - (tsubst): Support local enums. - (tsubst_copy): Likewise. - * decl.c (finish_enum): Likewise. - (start_enum): If this is a local enum, switch to permanent_obstack. - -Wed May 14 19:08:28 1997 Mike Stump - - * decl.c (store_parm_decls): Set last_parm_cleanup_insn here. - (finish_function): Put the base init code for constructors just - after the parm cleanup insns. - (struct cp_function): Add last_parm_cleanup_insn. - (push_cp_function_context): Likewise. - (pop_cp_function_context): Likewise. - -Tue May 13 15:51:20 1997 Jason Merrill - - * pt.c (tsubst_copy): Handle BIT_NOT_EXPR. - -Wed May 7 11:17:59 1997 Brendan Kehoe - - * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL - for THUNK_FNDECL before we switch to temporary allocation. - -Mon May 5 14:46:53 1997 Jason Merrill - - * call.c (build_new_op): Handle null arg2 for ?:. - -Thu May 1 18:26:37 1997 Mike Stump - - * except.c (expand_exception_blocks): Ensure that we flow through - the end of the exception region for the exception specification. - Move exception region for the exception specification in, so that - it doesn't protect the parm cleanup. Remove some obsolete code. - * decl.c (store_parm_decls): Likewise. - (finish_function): Likewise. - -Tue Apr 29 15:38:54 1997 Jason Merrill - - * init.c (build_new): Fix nothrow handling. - -Tue Apr 29 14:29:50 1997 Brendan Kehoe - - * init.c (emit_base_init): Don't warn about the initialization - list for an artificial member. - -Fri Apr 25 17:47:59 1997 Brendan Kehoe - - * expr.c (do_case): Handle !START case for the error msg. - -Fri Apr 25 11:55:23 1997 Jason Merrill - - * decl2.c, lang-options.h: New option -Weffc++. - * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings - to -Weffc++. - - * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS - to MULTIPLE_SYMBOL_SPACES. - -Wed Apr 23 18:06:50 1997 Jason Merrill - - * method.c (emit_thunk, generic case): Set current_function_is_thunk. - - * method.c (emit_thunk, macro case): Set up DECL_RESULT. - - * typeck.c (c_expand_return): Don't complain about returning void - to void in an artificial function. - * method.c (make_thunk): Change settings of READONLY/VOLATILE, - don't set DECL_RESULT, set DECL_ARTIFICIAL. - (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC. - -Wed Apr 23 14:43:06 1997 Mike Stump - - * init.c (init_decl_processing): Add support for setjmp/longjmp based - exception handling. - * except.c (init_exception_processing): Likewise. - (expand_end_catch_block): Likewise. - (expand_exception_blocks): Likewise. - (expand_throw): Likewise. - * exception.cc (__default_terminate): Likewise. - - * init.c (perform_member_init): Use new method of expr level - cleanups, instead of cleanups_this_call and friends. - (emit_base_init): Likewise. - (expand_aggr_vbase_init_1): Likewise. - (expand_vec_init): Likewise. - * decl.c (cp_finish_decl): Likewise. - (expand_static_init): Likewise. - (store_parm_decls): Likewise. - (cplus_expand_expr_stmt): Likewise. - * decl2.c (finish_file): Likewise. - - * Make-lang.in (exception.o): Ok to compile with -O now. - - * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as - we know it will be done later by the backend. - - * decl2.c (lang_f_options): Remove support for short temps. - * lang-options.h: Likewise. - -Wed Apr 23 04:12:06 1997 Jason Merrill - - * tree.c (varargs_function_p): New fn. - * method.c (emit_thunk): Replace broken generic code with code to - generate a heavyweight thunk function. - -Tue Apr 22 02:45:18 1997 Jason Merrill - - * pt.c (process_template_parm): pedwarn about floating-point parms. - - * decl.c (grokdeclarator): inline no longer implies static. - - * spew.c (yylex): Always return the TYPE_DECL if we got a scope. - -Mon Apr 21 15:42:27 1997 Jason Merrill - - * class.c (check_for_override): The signature of an overriding - function is not changed. - - * call.c (build_over_call): Move setting of conv into the loop. - Note: this change, along with the related changes of the 18th thru - the 20th of April, fix an infinite loop problem in conversions. - -Sun Apr 20 16:24:29 1997 Jason Merrill - - * call.c (build_user_type_conversion_1): Really ignore rvalue - conversions when looking for a REFERENCE_TYPE. - - * cvt.c (build_up_reference): Eviscerate, use build_unary_op. - * cp-tree.h (TREE_REFERENCE_EXPR): #if 0. - * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR. - (build_unary_op): Likewise. - * call.c (build_over_call): See through a CONVERT_EXPR around the - ADDR_EXPR for on a temporary. - * typeck.c (c_expand_return): See through a CONVERT_EXPR around - the ADDR_EXPR for a local variable. - -Fri Apr 18 12:11:33 1997 Jason Merrill - - * call.c (build_user_type_conversion_1): If we're trying to - convert to a REFERENCE_TYPE, only consider lvalue conversions. - (build_new_function_call): Print candidates. - (implicit_conversion): Try a temp binding if the lvalue conv is BAD. - (reference_binding): Binding a temporary of a reference-related type - is BAD. - -Thu Apr 17 14:37:22 1997 Brendan Kehoe - - * inc/typeinfo (type_info::before): Add cv-qualifier-seq. - * tinfo2.cc (type_info::before): Likewise. - -Mon Apr 14 12:38:17 1997 Jason Merrill - - * call.c (implicit_conversion): Oops. - -Fri Apr 11 02:18:30 1997 Jason Merrill - - * call.c (implicit_conversion): Try to find a reference conversion - before binding a const reference to a temporary. - -Wed Apr 2 12:51:36 1997 Mike Stump - - * exception.cc (__default_unexpected): Call terminate by default, - so that if the user overrides terminate, the correct function will - be called. - -Wed Mar 19 14:14:45 1997 Mike Stump - - * parse.y (left_curly): Avoid trying to use any fields of - error_mark_node, as there aren't any. - -Thu Mar 13 16:33:22 1997 Jason Merrill - - * lex.c (do_identifier): Avoid breaking on overloaded methods - as default arguments. - -Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson - - * call.c (add_template_candidate): Initialize the variable "dummy". - -Mon Mar 10 15:13:14 1997 Brendan Kehoe - - * decl.c (start_decl): Make sure TYPE isn't an error_mark_node - before we try to use TYPE_SIZE and TREE_CONSTANT on it. - -Fri Mar 7 13:19:36 1997 Brendan Kehoe - - * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl. - (debug_binfo): Delete decl, not needed. - - * tree.c (fnaddr_from_vtable_entry, function_arg_chain, - promotes_to_aggr_type): Delete fns. - * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY, - SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN, - PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1. - - * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars. - - * friend.c (is_friend_type): Delete fn. - * cp-tree.h (is_friend_type): Delete decl. - - * decl.c (original_result_rtx, double_ftype_double, - double_ftype_double_double, int_ftype_int, long_ftype_long, - float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static. - * typeck.c (original_result_rtx, warn_synth): Delete extern decls. - - * decl.c (push_overloaded_decl{,_top_level}): Make static, adding - fwd decls. - * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls. - - * decl.c (pushdecl_nonclass_level): #if 0, unused. - * cp-tree.h (pushdecl_nonclass_level): #if 0 decl. - - * lex.c (reinit_lang_specific): #if 0, unused. - * cp-tree.h (reinit_lang_specific): #if 0 decl. - - * decl.c (revert_static_member_fn): Make static, adding fwd decl. - * cp-tree.h (revert_static_member_fn): Delete decl. - - * class.c (root_lang_context_p): Delete fn. - * cp-tree.h (root_lang_context_p): Delete decl. - - * decl.c (set_current_level_tags_transparency): #if 0, unused. - * cp-tree.h (set_current_level_tags_transparency): #if 0 decl. - - * lex.c (set_vardecl_interface_info): Make static. - * cp-tree.h (set_vardecl_interface_info): Delete decl. - - * call.c (find_scoped_type): Make static. - * cp-tree.h (find_scoped_type): Delete decl. - - * search.c (convert_pointer_to_vbase): Make static. - * cp-tree.h (convert_pointer_to_vbase): Delete decl. - - * decl.c (const_ptr_type_node): Likewise. - * cp-tree.h (const_ptr_type_node): Delete decl. - - * typeck.c (common_base_type): Make static. - * cp-tree.h (common_base_types): Delete erroneous decl. - - * pt.c (classtype_mangled_name): Make static. - * cp-tree.h (classtype_mangled_name): Delete decl. - - * lex.c (check_newline): Make static. - * cp-tree.h (check_newline): Delete decl. - - * typeck.c (build_x_array_ref): Delete fn, same idea as - grok_array_decl. - * cp-tree.h (build_x_array_ref): Delete decl. - - * lex.c (copy_decl_lang_specific): Delete fn, same idea as - copy_lang_decl. - * cp-tree.h (copy_decl_lang_specific): #if 0 decl. - - * class.c (build_vtable_entry): Make static. - * cp-tree.h (build_vtable_entry): Delete decl. - - * class.c (build_vbase_pointer): Make static. - * cp-tree.h (build_vbase_pointer): Delete decl. - - * sig.c (build_sptr_ref): Add forward decl and make static. - * cp-tree.h (build_sptr_ref): Delete decl. - - * call.c (build_new_method_call): Add forward decl and make static. - * cp-tree.h (build_new_method_call): Delete decl. - - * call.c (build_object_call): Make static. - * class.c (check_for_override, complete_type_p, mark_overriders): - Likewise. - * decl.c (cp_function_chain): Likewise. - * lex.c (set_typedecl_interface_info, reinit_parse_for_block): - Likewise. - * pt.c (comp_template_args, get_class_bindings, push_tinst_level): - Likewise. - * tree.c (build_cplus_array_type_1): Likewise. - * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise. - (comp_target_parms): Likewise. - - * init.c (build_builtin_call): Make static. - * cp-tree.h (build_builtin_call): Delete decl. - - * typeck.c (binary_op_error): Delete decl. - * cp-tree.h (binary_op_error): Likewise. - -Thu Mar 6 16:13:52 1997 Brendan Kehoe - - * call.c (build_method_call): Compare against error_mark_node - directly, rather than the ERROR_MARK tree code. - * cvt.c (cp_convert): Likewise. - * decl.c (print_binding_level): Likewise. - (duplicate_decls): Likewise. - (grokdeclarator): Likewise. - (grokdeclarator): Likewise. - * init.c (expand_aggr_init_1): Likewise. - (decl_constant_value): Likewise. - * method.c (build_opfncall): Likewise. - (hack_identifier): Likewise. - * typeck.c (build_modify_expr): Likewise. - - * typeck.c (build_c_cast): Don't decl TYPE as register tree. - -Sun Mar 2 02:54:36 1997 Bruno Haible - - * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values. - - * pt.c (coerce_template_parms): Add new error message. - - * method.c (build_overload_value): Implement name mangling for - floating-point template arguments. - - * method.c (build_overload_int, icat, dicat): Fix mangling of template - arguments whose absolute value doesn't fit in a signed word. - -Mon Mar 3 12:14:54 1997 Brendan Kehoe - - * friend.c: New file; put all of the friend stuff in here. - * init.c: Instead of here. - * Makefile.in (CXX_OBJS): Add friend.o. - (friend.o): Add dependencies. - * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c. - -Sun Mar 2 11:04:43 1997 Jason Merrill - - * call.c (build_scoped_method_call): Complain if the scope isn't a - base. - -Wed Feb 26 11:31:06 1997 Jason Merrill - - * parse.y (left_curly): Don't crash on erroneous type. - - * init.c (build_delete): Fix type of ref. - -Tue Feb 25 12:41:48 1997 Jason Merrill - - * search.c (get_vbase_1): Renamed from get_vbase. - (get_vbase): Wrapper, now non-static. - (convert_pointer_to_vbase): Now static. - - * call.c (build_scoped_method_call): Accept a binfo for BASETYPE. - * init.c (build_delete): Pass one. - (build_partial_cleanup_for): Use build_scoped_method_call. - * decl.c (finish_function): Pass a binfo. - -Mon Feb 24 15:00:12 1997 Jason Merrill - - * call.c (build_over_call): Only synthesize non-trivial copy ctors. - - * typeck.c (build_c_cast): Lose other reference to flag. - - * call.c (build_field_call): Don't look for [cd]tor_identifier. - * decl2.c (delete_sanity): Remove meaningless use of - LOOKUP_HAS_IN_CHARGE. - * decl.c (finish_function): Use build_scoped_method_call instead - of build_delete for running vbase dtors. - * init.c (build_delete): Call overload resolution code instead of - duplicating it badly. - -Thu Feb 20 15:12:15 1997 Jason Merrill - - * call.c (build_over_call): Call mark_used before trying to elide - the call. - - * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL. - -Wed Feb 19 11:18:53 1997 Brendan Kehoe - - * typeck.c (build_modify_expr): Always pedwarn for a cast to - non-reference used as an lvalue. - -Wed Feb 19 10:35:37 1997 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly. - -Tue Feb 18 15:40:57 1997 Jason Merrill - - * parse.y (handler): Fix template typo. - -Sun Feb 16 02:12:28 1997 Jason Merrill - - * error.c (lang_decl_name): New fn. - * tree.c (lang_printable_name): Use it. - -Fri Feb 14 16:57:05 1997 Mike Stump - - * g++spec.c: Include config.h so that we can catch bzero #defines - from the config file. - -Tue Feb 11 13:50:48 1997 Mike Stump - - * new1.cc: Include a declaration for malloc, to avoid warning, and - avoid lossing on systems that require one (ones that define malloc - in xm.h). - -Mon Feb 10 22:51:13 1997 Bruno Haible - - * decl2.c (max_tinst_depth): New variable. - (lang_decode_option): Parse "-ftemplate-depth-NN" command line - option. - * pt.c (max_tinst_depth): Variable moved. - * lang-options.h: Declare "-ftemplate-depth-NN" command line option - as legal. - -Fri Feb 7 15:43:34 1997 Jason Merrill - - * decl.c (xref_basetypes): Allow a base class that depends on - template parms to be incomplete. - - * decl2.c (build_expr_from_tree): Support typeid(type). - * rtti.c (get_typeid): Support templates. - (expand_si_desc, expand_class_desc): Fix string length. - (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise. - -Tue Feb 4 11:28:24 1997 Jason Merrill - - * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal. - - * pt.c (tsubst): Put it back for -fno-ansi-overloading. - -Mon Feb 3 18:41:12 1997 Jason Merrill - - * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that - smashes together template and non-template decls of the same - signature. - -Thu Jan 30 19:18:00 1997 Jason Merrill - - * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE. - -Wed Jan 29 11:40:35 1997 Brendan Kehoe - - * decl.c (duplicate_decls): Next route, pedwarn about different - exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER. - -Tue Jan 28 20:43:29 1997 Brendan Kehoe - - * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro. - (struct lang_type): Delete has_default_implementation member. - Increase dummy to 21. - * decl.c (start_method): Delete usage. - - * cp-tree.h (build_call, null_ptr_cst_p, in_function_p, - store_after_parms, start_decl_1, auto_function): Add decls. - (get_arglist_len_in_bytes, declare_implicit_exception, - have_exceptions_p, make_type_decl, typedecl_for_tag, - store_in_parms, pop_implicit_try_blocks, push_exception_cleanup, - build_component_type_expr, cplus_exception_name, - {make,clear}_anon_parm_name, dont_see_typename): Removed decls. - * call.c (build_this): Make static. - (is_complete): Likewise. - (implicit_conversion): Likewise. - (reference_binding): Likewise. - (standard_conversion): Likewise. - (strip_top_quals): Likewise. - (non_reference): Likewise. - (build_conv): Likewise. - (user_harshness): Likewise. - (rank_for_ideal): Likewise. - * decl.c (start_decl_1): Delete forward decl. - (push_decl_level): Make static. - (resume_binding_level): Make static. - (namespace_bindings_p): Make static. - (declare_namespace_level): Make static. - (lookup_name_real): Make static. - (duplicate_decls): Make static. Take register off NEWDECL and - OLDDECL parm decls. - * decl2.c (get_sentry): Make static. - (temp_name_p): Delete fn. - * except.c (auto_function): Delete decl. - * lex.c (handle_{cp,sysv}_pragma): Make static. - (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl. - * method.c (do_build_{copy_constructor,assign_ref}): Make static. - * pt.c (tsubst_expr_values): Make static. - * rtti.c (combine_strings): Delete decl. - -Tue Jan 28 16:40:40 1997 Jason Merrill - - * pt.c (push_template_decl): Handle getting a typedef. - - * call.c (build_new_function_call): Complain about void arg. - -Tue Jan 28 15:25:09 1997 Brendan Kehoe - - * decl.c (duplicate_decls): Give pedwarn of different exceptions - if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER. - -Mon Jan 27 19:21:29 1997 Mike Stump - - * except.c (expand_throw): Don't expand the cleanup tree here, - since we are not going to write the rtl out. Fixes problem with - -g -O on SPARC. - -Mon Jan 27 16:24:35 1997 Sean McNeil - - * Make-lang.in: Add $(exeext) as necessary. - -Mon Jan 27 13:20:39 1997 Mike Stump - - * parse.y (handler_seq): Must have at least one catch clause. - -Sat Jan 25 12:00:05 1997 Jason Merrill - - * call.c (add_builtin_candidate): Restore ?: hack. - - * decl.c (grok_op_properties): More warnings. - -Sat Jan 25 08:50:03 1997 Brendan Kehoe - - * decl.c (duplicate_decls): On second thought, do it as a pedwarn - still but only if !DECL_IN_SYSTEM_HEADER (olddecl). - - * decl.c (duplicate_decls): Scale back to a warning, and only do - 'em if -pedantic. - -Fri Jan 24 17:52:54 1997 Mike Stump - - * decl.c (duplicate_decls): pedwarn mismatched exception - specifications. - -Thu Jan 23 18:18:54 1997 Mike Stump - - * call.c (build_new_method_call): Don't display the invisible - argument for controlling virtual bases. - -Thu Jan 23 16:48:10 1997 Mike Stump - - * new: Add nothrow new and delete, bad_alloc and throw specifications - for delete. - * decl.c (init_decl_processing): Add throw specification for delete. - * new.cc (nothrow): Define. - * lex.c (real_yylex): Removing warning that throw and friends are - keywords. - * new1.cc (operator new (size_t sz, const nothrow_t&)): Define. - * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define. - * Make-lang.in: Add new{1,2}.{cc,o}. - -Thu Jan 23 16:39:06 1997 Jason Merrill - - * lex.c (cons_up_default_function): Fix return type of synth op=. - - * init.c (emit_base_init): Add warnings for uninitialized members - and bases. - - * decl.c (xref_basetypes): Add warning for non-polymorphic type - with destructor used as base type. - - * decl.c (grok_op_properties): Add warning for op= returning void. - * typeck.c (c_expand_return): Add warning for op= returning anything - other than *this. - - * class.c (finish_struct_1): Add warning for class with pointers - but not copy ctor or copy op=. - - * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro. - * pt.c (add_pending_template): Use it instead of LANG_FLAG_0. - (instantiate_template): If -fexternal-templates, add this - instantiation to pending_templates. - - * decl2.c (copy_assignment_arg_p): Disable old hack to support - Booch components. - -Tue Jan 21 18:32:04 1997 Mike Stump - - * cvt.c (cp_convert): pedwarn enum to pointer conversions. - -Mon Jan 20 17:59:51 1997 Jason Merrill - - * call.c (standard_conversion): Handle getting references. Tack - on RVALUE_CONV here. Do it for non-class types, too. - (reference_binding): Pass references to standard_conversion. - (implicit_conversion): Likewise. - (add_builtin_candidate): Disable one ?: kludge. - (convert_like): Handle RVALUE_CONVs for non-class types. - (joust): Disable the other ?: kludge. - -Mon Jan 20 14:53:13 1997 Brendan Kehoe - - * decl.c (init_decl_processing): Add code to build up common - function types beforehand, to avoid creation then removal of - things already in the hash table. - -Mon Jan 20 14:43:49 1997 Jason Merrill - - * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for - the arguments. - - * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require - current_template_parms. - -Fri Jan 17 10:25:42 1997 Jason Merrill - - * search.c (lookup_field): Don't return a function, check want_type. - -Thu Jan 16 18:14:35 1997 Brendan Kehoe - - * init.c (build_new): Make sure PLACEMENT has a type. - -Thu Jan 16 17:40:28 1997 Jason Merrill - - * init.c (build_new): Support new (nothrow). - -Wed Jan 15 12:38:14 1997 Jason Merrill - - * pt.c (instantiate_decl): Also do push_to_top_level before setting - up DECL_INITIAL. - - * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro. - * pt.c (tsubst): Defer instantiation of default args. - * call.c (build_over_call): Until here. - -Wed Jan 15 10:08:10 1997 Brendan Kehoe - - * search.c (lookup_field): Make sure we have an - IDENTIFIER_CLASS_VALUE before we try to return it. - -Thu Jan 9 07:19:01 1997 Brendan Kehoe - - * call.c (build_method_call): Delete unused var PARM. - (build_overload_call_real): Likewise. - (build_object_call): Delete unused var P. - (build_new_op): Likewise. - * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static - var definitions, which are never used. - (shadow_tag): Delete unused var FN. - * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET. - * init.c (build_new): Delete unused var ALLOC_TEMP. - * method.c (hack_identifier): Delete unused var CONTEXT. - (do_build_copy_constructor): Delete unused var NAME. - (synthesize_method): Delete unused var BASE. - * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE. - * rtti.c (build_headof): Delete unused var VPTR. - (get_typeid): Delete unused var T. - * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1 - and ORIG_OP2. - (build_ptrmemfunc): Delete unused vars U and NINDEX. - * typeck2.c (build_functional_cast): Delete unused var BINFO. - -Wed Jan 8 13:09:54 1997 Jason Merrill - - * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up - things in a type being defined. - * decl.c (finish_enum): Reverse the values so that they are in - the correct order. - - * pt.c (instantiate_class_template): Don't initialize - BINFO_BASETYPES until the vector is filled out. - (unify): Don't abort on conflicting bindings, just fail. - (instantiate_decl): Do push_tinst_level before any tsubsting. - - * method.c (build_overload_value): Handle getting a - TEMPLATE_CONST_PARM for a pointer. - -Tue Jan 7 14:00:58 1997 Jason Merrill - - * init.c (expand_member_init): Don't give 'not a base' error for - templates. - - * pt.c (instantiate_decl): Call import_export_decl later. - - * pt.c (instantiate_class_template): Return a value. - - * parse.y (extension): New rule for __extension__. - (extdef, unary_expr, decl, component_decl): Use it. - -Tue Jan 7 09:20:28 1997 Mike Stump - - * class.c (base_binfo): Remove unused base_has_virtual member. - (finish_base_struct): Likewise. - (finish_struct_1): Likewise. - -Tue Dec 31 20:25:50 1996 Mike Stump - - * search.c (expand_upcast_fixups): Fix bogus code generation - problem where the generated code uses the wrong index into the - runtime built vtable on the stack. Old code could clobber random - stack values. - -Tue Dec 31 15:16:56 1996 Mike Stump - - * init.c (perform_member_init): Make sure the partial EH cleanups - live on the function_obstack. - -Fri Dec 27 10:31:40 1996 Paul Eggert - - * Make-lang.in (g++spec.o): Don't use $< with an explicit target; - this isn't portable to some versions of `make' (e.g. Solaris 2.5.1). - -Tue Dec 24 10:24:03 1996 Jeffrey A Law - - * decl.c (grokvardecl): Avoid ANSI style initialization. - -Sun Dec 22 04:22:06 1996 Jason Merrill - - * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE. - -Fri Dec 20 17:09:25 1996 Jason Merrill - - * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties. - -Fri Dec 20 12:17:12 1996 Brendan Kehoe - - * g++spec.c (lang_specific_driver): Put missing hyphen in front of - arguments we compare against. Start the count of I at 1, not 0, - since argv[0] is still the command. - -Thu Dec 19 11:53:57 1996 Stan Shebs - - * lang-specs.h: Accept .cp as an C++ extension. - -Mon Dec 16 22:43:31 1996 Brendan Kehoe - - * cp-tree.h (ptr_reasonably_similar): Add decl. - -Thu Dec 12 15:00:35 1996 Brendan Kehoe - - * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN - pointer. New local SPECBITS with the parm's value. - (grokdeclarator): Pass &specbits down. - - * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node - before we try to do C_SET_EXP_ORIGINAL_CODE on it. - - * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of - CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM. - - * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is - not an error_mark_node. - -Sat Dec 7 17:20:22 1996 Jason Merrill - - * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL. - * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate. - -Fri Dec 6 14:40:09 1996 Jason Merrill - - * decl.c (grokdeclarator): When giving an anonymous struct a name, - replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is - not affected). - - * typeck2.c (build_m_component_ref): If component is a pointer - to data member, resolve the OFFSET_REF now. - - * call.c (convert_like): Don't go into infinite recursion. - - * pt.c (coerce_template_parms): Use tsubst_expr for non-type args. - - * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr. - * tree.c (layout_basetypes): And on the vbase ptr. - -Thu Dec 5 02:11:28 1996 Jason Merrill - - * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or - CHAR_TYPE_SIZE so bool is always the same size as another type. - - * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too. - -Tue Dec 3 23:18:37 1996 Jason Merrill - - * decl2.c (grok_x_components): Remove synthesized methods from - TYPE_METHODS of an anonymous union, complain about member - functions. - * decl.c (shadow_tag): Wipe out memory of synthesized methods in - anonymous unions. - (finish_function): Just clear the DECL_RTL of our arguments. - -Fri Nov 29 21:54:17 1996 Jason Merrill - - * decl2.c (finish_file): Emit DWARF debugging info for static data - members. - - * pt.c (tsubst): If t is a stub decl, return the stub decl for type. - -Wed Nov 27 14:47:15 1996 Bob Manson - - * typeck.c (build_component_ref): Don't die if COMPONENT isn't a - IDENTIFIER_NODE. - -Wed Nov 27 16:05:19 1996 Michael Meissner - - * Make-lang.in (g++-cross$(exeext)): Fix typo. - -Wed Nov 27 08:14:00 1996 Brendan Kehoe - - Make the g++ driver now be a standalone program, rather than one - that tries to run the gcc driver after munging up the options. - * Make-lang.in (g++.c, g++spec.o): New rules. - (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER - added. - (g++$(exeext)): New rule, based on xgcc rule. - (g++-cross$(exeext)): Now just copies g++$(exeext) over. - * g++spec.c: New file. - * g++.c: Removed file. - -Tue Nov 26 19:01:09 1996 Mike Stump - - * cvt.c (build_up_reference): Arrange for any temporary values - that have been keep in registers until now to be put into memory. - -Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi - - * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so - that make -j3 bootstrap works better. - -Sun Nov 24 02:09:39 1996 Jason Merrill - - * decl.c (pushtag): Do pushdecl for anon tags. - -Thu Nov 21 16:30:24 1996 Jason Merrill - - * typeck.c (c_expand_return): Fix logic. - (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR. - -Wed Nov 20 18:47:31 1996 Bob Manson - - * g++.c (main): Make sure arglist has a final NULL entry. Add - PEXECUTE_LAST to the flags passed to pexecute, as otherwise - stdin/stdout of the invoked program are redirected to - nowheresville. - -Tue Nov 19 16:12:44 1996 Jason Merrill - - * decl.c (implicitly_declare): Set DECL_ARTIFICIAL. - -Tue Nov 19 15:48:19 1996 Mike Stump - - * init.c (resolve_offset_ref): Handle obj.vfn better. - * typeck.c (build_component_ref): Set TREE_TYPE on result from - build_vfn_ref. - -Tue Nov 19 13:14:33 1996 Mike Stump - - * typeck.c (convert_for_assignment): Also handle anachronistic - implicit conversions from (::*)() to cv void*. - * cvt.c (cp_convert_to_pointer): Likewise. - -Mon Nov 18 17:05:26 1996 Jason Merrill - - * lex.c (handle_cp_pragma): Fix bogus warning. - -Mon Nov 18 16:10:43 1996 Mike Stump - - * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE - (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P. - -Thu Nov 14 23:18:17 1996 Jason Merrill - - * class.c (finish_struct_1): Support DWARF2_DEBUG. - * search.c (dfs_debug_mark): Likewise. - * decl2.c (finish_vtable_vardecl): Likewise. - * decl.c (pushtag, finish_enum): Likewise. - * lex.c (check_newline): Use debug_* instead of calling *out - functions directly. - -Thu Nov 14 15:21:46 1996 Brendan Kehoe - - * Make-lang.in (cplib2.ready): Add else clause to avoid problems - on some picky hosts. - -Wed Nov 13 12:32:07 1996 Jason Merrill - - * class.c (finish_struct_1): A class has a non-trivial copy - constructor if it has virtual functions. - - * cvt.c (cp_convert): Always call a constructor. - - * call.c (reference_binding): Still tack on a REF_BIND - for bad conversions. - (build_user_type_conversion_1): Propagate ICS_BAD_FLAG. - - * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING. - (c_expand_return): Likewise. - * typeck2.c (digest_init): Likewise for { }. - * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling. - * cvt.c (cp_convert): Handle failure better. - -Wed Nov 13 11:51:20 1996 Brendan Kehoe - - * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation - of GCC be path-relative. - -Wed Nov 13 11:27:16 1996 Michael Meissner - - * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but - it does need choose-temp.o and pexecute.o. - -Wed Nov 13 07:53:38 1996 Brendan Kehoe - - * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time - that we still use it. - (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros. - -Wed Nov 13 02:00:26 1996 Jason Merrill - - * init.c (expand_default_init): Avoid calling constructors to - initialize reference temps. - - * cvt.c (convert_to_reference): Fix. - -Tue Nov 12 19:10:07 1996 Jason Merrill - - * cvt.c (cp_convert): Simplify for flag_ansi_overloading. - (convert_to_reference): Likewise. - * typeck.c (convert_for_initialization): Likewise. - * init.c (expand_default_init): Likewise. - (expand_aggr_init_1): Likewise. - * cp-tree.h (CONV_NONCONVERTING): Lose. - * typeck.c (build_c_cast): Lose allow_nonconverting parm. - * *.c: Adjust. - * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING. - -Tue Nov 12 16:29:04 1996 Brendan Kehoe - - * pt.c (tsubst_expr): Reverse args to expand_start_catch_block. - -Tue Nov 12 15:26:17 1996 Jason Merrill - - * init.c (expand_aggr_init_1): Don't crash on non-constructor - TARGET_EXPR. - -Tue Nov 12 14:00:50 1996 Brendan Kehoe - - * g++.c: Include gansidecl.h. - (VPROTO, PVPROTO, VA_START): Delete. - (choose_temp_base_try, choose_temp_base, perror_exec, - run_dos) [__MSDOS__]: Delete fns. - (pfatal_with_name): Delete fn. - (temp_filename): Declare like in gcc.c. - (pexecute, pwait, choose_temp_base): Declare from gcc.c. - (error_count, signal_count): Define. - (error): Delete both definitions. - (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c. - (pfatal_pexecute): Add fn from gcc.c. - (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the - code to use the pexecute stuff also used by gcc.c. - (MIN_FATAL_STATUS): Define. - * Make-lang.in (g++): Add dependency on and linking with - choose-temp.o and pexecute.o. - - * cp-tree.h: Include gansidecl.h. - (STDIO_PROTO): Delete #undef/#define. - * cvt.c (NULL): Delete #undef/#define. - * expr.c (NULL): Likewise. - * init.c (NULL): Likewise. - * rtti.c (NULL): Likewise. - * xref.c (NULL): Likewise. - - * cp-tree.h (build_user_type_conversion): Add prototype. - * call.c (build_user_type_conversion): Delete prototype. Correct - decl of FLAGS arg to be an int. - * cvt.c (build_user_type_conversion): Likewise. - -Tue Nov 12 12:16:20 1996 Jason Merrill - - * cp-tree.def: Add TRY_BLOCK and HANDLER. - * except.c (expand_start_catch_block): Support templates. - * parse.y (try_block, handler_seq): Likewise. - * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER. - -Mon Nov 11 13:57:31 1996 Jason Merrill - - * pt.c (current_template_args): New fn. - (push_template_decl): Use it. - * decl.c (grokdeclarator): Use it. - - * decl2.c (build_expr_from_tree): Dereference ref vars. - - * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in - the decl-specifier-seq. - - * decl.c (grok_op_properties): Don't force the type of a conversion - op to be complete. Don't warn about converting to the same type - for template instantiations. - - * decl2.c (finish_file): Don't call instantiate_decl on synthesized - methods. - -Mon Nov 11 13:20:34 1996 Bob Manson - - * typeck.c (get_delta_difference): Remove previous bogusness. - Don't give errors if force is set. - -Fri Nov 8 17:38:44 1996 Jason Merrill - - * decl2.c (finish_file): Don't emit debug info. - * decl.c (pushdecl): Lose obsolete code. - (grokdeclarator): Still do the long long thing after complaining. - * search.c (note_debug_info_needed): Don't do anything if we're in a - template. - * method.c (synthesize_method): For non-local classes, - push_to_top_level first. - -Fri Nov 8 11:52:28 1996 Bob Manson - - * typeck.c (get_delta_difference): Add no_error parameter. - (build_ptrmemfunc): Call get_delta_difference with no_error set; - we don't want error messages when converting unrelated - pointer-to-member functions. - -Thu Nov 7 11:16:24 1996 Mike Stump - - * error.c (dump_expr): Improve the wording on error messages that - involve pointer to member functions. - -Tue Nov 5 17:12:05 1996 Mike Stump - - * cvt.c (cp_convert_to_pointer): Move code for conversions from - (::*)() to void* or (*)() up a bit, so that we can convert from - METHOD_TYPEs as well. - -Tue Nov 5 14:54:17 1996 Jason Merrill - - * rtti.c (get_tinfo_fn): Make sure 'type' is permanent. - There are no 'member' types. - (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn. - (build_x_typeid): Handle errors. - -Mon Nov 4 17:43:12 1996 Mike Stump - - * typeck.c (convert_for_assignment): Handle anachronistic implicit - conversions from (::*)() to void* or (*)(). - * cvt.c (cp_convert_to_pointer): Likewise. - (cp_convert_to_pointer_force): Remove cp_convert_to_pointer - conversions from here. - * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions. - * lang-options.h: Likewise. - * decl2.c (warn_pmf2ptr): Define. - * cp-tree.h: Declare it. - * typeck2.c (digest_init): Allow pmfs down into - convert_for_initialization. - -Sun Nov 3 09:43:00 1996 Jason Merrill - - * typeck.c (c_expand_return): Fix for returning overloaded fn. - -Fri Nov 1 08:53:17 1996 Jason Merrill - - * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND. - * decl.c (grok_reference_init): Pass DIRECT_BIND. - * cvt.c (build_up_reference): Don't mark 'this' addressable. Use - DIRECT_BIND. - * call.c (convert_like): Don't pass INDIRECT_BIND. - * typeck.c (convert_arguments): Likewise. - * typeck.c (mark_addressable): Allow &this if flag_this_is_variable. - -Thu Oct 31 17:08:49 1996 Jason Merrill - - * typeck.c (mark_addressable): Support TARGET_EXPR, unify with - similar code in build_up_ref. - * cvt.c (build_up_reference): Drastically simplify. - -Mon Oct 28 12:45:05 1996 Jeffrey A Law - - * typeck.c (signed_or_unsigned_type): If the given type already - as the correct signedness, then just return it. - - * typeck.c ({un,}signed_type): If can't do anything, call - signed_or_unsigned_type. - -Thu Oct 24 14:21:59 1996 Bob Manson - - * decl2.c (copy_assignment_arg_p): Don't buy the farm if - current_class_type is NULL. - -Wed Oct 23 00:43:10 1996 Jason Merrill - - * class.c (finish_struct_1): Avoid empty structs by adding a field - so layout_type gets the mode right. - - * typeck.c (c_expand_return): Drastically simplify. - -Mon Oct 21 22:34:02 1996 Jason Merrill - - * typeck.c (decay_conversion): Handle overloaded methods. - -Fri Oct 18 16:03:48 1996 Jason Merrill - - * call.c (build_over_call): A TARGET_EXPR has side-effects. - -Thu Oct 17 11:31:59 1996 Mike Stump - - * cvt.c (convert_to_pointer_force): Add code to support pointer to - member function to pointer to function conversions. - * init.c (resolve_offset_ref): Add code to allow faked up objects, - ignoring them if they are not used, and giving an error, if they - are needed. - * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve - code, and so that we can give an error, if we needed an object, - and one was not provided. - (build_c_cast): Don't call default_conversion when we want to - convert to pointer to function from a METHOD_TYPE. - -Mon Oct 14 00:28:51 1996 Jason Merrill - - * Make-lang.in (cplib2.ready): Fix logic. - - * decl.c (shadow_tag): Only complain about non-artificial function - members. - - * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS. - -Fri Oct 11 16:12:40 1996 Jason Merrill - - * expr.c (cplus_expand_expr): Pre-tweak call_target like - expand_inline_function would. - - * pt.c (mark_decl_instantiated): If extern_p, call - mark_inline_for_output. - -Thu Oct 10 15:58:08 1996 Mike Stump - - * typeck.c (unary_complex_lvalue): Add code to handle intermediate - pmd conversions. - - * typeck.c (get_delta_difference): Fix wording, as we can be used - for pointer to data members. - -Tue Oct 8 12:43:51 1996 Bob Manson - - * pt.c (tsubst): If the function decl isn't a member of this - template, return a copy of the decl (including copying the - lang-specific part) so we don't hose ourselves later. - -Thu Oct 3 16:24:28 1996 Jason Merrill - - * class.c (finish_struct): Remove DWARF-specific tag handling. - * decl.c (pushtag): Likewise. - (finish_function): Always clear DECL_ARGUMENTS on function decls with - no saved RTX. - * decl2.c (finish_file): Emit DWARF debugging info for static data - members. - -Wed Oct 2 21:58:01 1996 Bob Manson - - * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC - isn't the same as the new one before we whack it. - -Mon Sep 30 13:38:24 1996 Jason Merrill - - * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h, - lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove - warn_traditional and warn_strict_prototypes; remove ancient - 'overload' code; remove references to flag_traditional. - -Mon Sep 30 12:58:40 1996 Mike Stump - - * input.c (sub_getch): Handle 8-bit characters in string literals. - -Sun Sep 29 03:12:01 1996 Jason Merrill - - * tree.c (mapcar): Handle CONSTRUCTORs. - (copy_to_permanent): Handle expression_obstack properly. - - * Make-lang.in (cplib2.txt): Also depend on the headers. - - * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE == - INT_TYPE_SIZE. - (expand_class_desc): Use USItype for offset field. - * tinfo.h (struct __class_type_info): Likewise. - - * method.c (build_overload_int): TYPE_PRECISION should be applied - to types. - -Sat Sep 28 14:44:50 1996 Jason Merrill - - * call.c (build_new_op): A COND_EXPR involving void must be a - builtin. - -Fri Sep 27 16:40:30 1996 Jason Merrill - - * typeck.c (build_x_component_ref): New fn. - (build_object_ref): Use it. - * parse.y (primary): Use it. - * decl2.c (build_expr_from_tree): Use it. - * cp-tree.h: Declare it. - - * decl.c (start_decl): Variable-sized arrays cannot be initialized. - * error.c (dump_type_suffix): Handle variable arrays. - -Fri Sep 27 13:14:05 1996 Brendan Kehoe - - * Make-lang.in (exception.o): Put back compiling it with -fPIC. - -Fri Sep 27 03:00:09 1996 Jason Merrill - - * decl.c (lookup_name_real): Don't try to look up anything in a - TYPENAME_TYPE. - - * tinfo2.cc (__throw_type_match_rtti): Oops. - -Thu Sep 26 22:11:05 1996 Brendan Kehoe - - * Make-lang.in (exception.o): Use -fno-PIC for now. - -Thu Sep 26 10:59:00 1996 Jason Merrill - - * rtti.c (build_dynamic_cast): Pass tinfo fns rather than - calling them. - (get_tinfo_fn_dynamic): Extracted from build_typeid. - * tinfo2.cc (__dynamic_cast): Adjust. - - * rtti.c (build_typeid): Use resolves_to_fixed_type_p. - (build_x_typeid): Likewise. - - * parse.y: Call build_x_typeid instead of build_typeid. - * cp-tree.def: Add TYPEID_EXPR. - * pt.c (tsubst_copy): Handle typeid. - * decl2.c (build_expr_from_tree): Likewise. - * rtti.c (build_x_typeid): Throw bad_typeid from here. - (build_typeid): Not here. - * cp-tree.h: Declare build_x_typeid. - -Wed Sep 25 17:26:16 1996 Jason Merrill - - * call.c (convert_like): Pull out constant values. - - * tree.c (mapcar): Use build_cplus_array_type, not build_array_type. - -Wed Sep 25 17:28:53 1996 Michael Meissner - - * decl.c (init_decl_processing): Create short int types before - creating size_t in case a machine description needs to use - unsigned short for size_t. - -Tue Sep 24 18:18:44 1996 Jason Merrill - - * Make-lang.in (exception.o): Turn off pic. - - * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same - type, multi-level ptr conversions. - - * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast. - (throw_bad_cast): Use it. - (throw_bad_typeid): New fn. - (build_typeid): Throw bad_typeid as needed. - Use build_call. - (synthesize_tinfo_fn): Handle functions and arrays before checking - for cv-quals. - - * Remove .h from standard C++ headers, add new.h, move into inc - subdirectory. - - * exception*: Remove pointer from object, constructors. Add - default exception::what that uses type_info::name. Add - __throw_bad_typeid. - - * init.c (build_new): Don't add a cookie to new (void *) T[2]. - -Mon Sep 23 15:21:53 1996 Jason Merrill - - * Make-lang.in: Building C++ code depends on cc1plus. - -Mon Sep 23 12:38:40 1996 Brendan Kehoe - - * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as - a HOST_WIDE_INT, not a tree. - -Mon Sep 23 12:36:02 1996 Jason Merrill - - * exception.cc: Don't include . - - * Make-lang.in (c++.clean): Remove cplib2.*. - -Mon Sep 23 09:42:19 1996 Doug Evans - - * parse.y (component_decl_1, component_costructor_declarator case): - Pass attributes/prefix_attributes in tree list. - -Mon Sep 23 01:18:50 1996 Jason Merrill - - * tinfo{,2}.cc: #include instead of . - -Sun Sep 22 05:31:22 1996 Jason Merrill - - * lex.c (do_identifier): Don't do deferred lookup in a template - header. - - * typeck2.c (store_init_value): Oops. - - * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}: - New files for C++ lang-support library. - * Make-lang.in (CXX_EXTRA_HEADERS): Define. - (CXX_LIB2FUNCS): Define. - And rules for building the C++ lang-support code. - * config-lang.in (headers): Define. - (lib2funcs): Define. - -Sat Sep 21 19:17:28 1996 Jason Merrill - - * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call - digest_init. - * pt.c (tsubst_copy): Compute type for CONSTRUCTOR. - * typeck2.c (store_init_value): Check for initializing pmf with { } - here. - (process_init_constructor): Not here. - -Thu Sep 19 16:41:07 1996 Jason Merrill - - * pt.c (begin_template_parm_list): Increment - processing_template_decl here. - (end_template_parm_list): Not here. - (process_template_parm): No need to add 1 to it now. - * *.c: Use processing_template_decl instead of current_template_parms - to check for being in a template. - - * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR. - (tsubst_copy): Handle CONSTRUCTOR. - (instantiate_decl): Set up context properly for variables. - * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR. - * class.c (finish_struct): Reverse CLASSTYPE_TAGS. - -Wed Sep 18 13:30:20 1996 Brendan Kehoe - - * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back. - -Wed Sep 18 04:24:07 1996 Jason Merrill - - * method.c (make_thunk): Call comdat_linkage before setting the - TREE_CODE. - - * decl2.c (comdat_linkage): Use make_decl_one_only. - (import_export_decl): Likewise. - * decl.c (init_decl_processing): Check supports_one_only instead of - SUPPORTS_WEAK. - -Sat Sep 14 08:34:41 1996 Jason Merrill - - * decl2.c (grokfield): Tighten checking for access decls. - - * decl.c (make_typename_type): Resolve references to - current_class_type. Set CLASSTYPE_GOT_SEMICOLON. - (lookup_name_real): Types that depend on a template parameter get - an implicit 'typename' unless they're in the current scope. - (start_decl_1): We don't care about incomplete types that depend - on a template parm. - (grokdeclarator): Resolve 'typename's in the type specifier that - refer to members of the current scope. - - * call.c (build_over_call): Remove 'inline called before - definition' diagnostic. - (build_method_call): Likewise. - * decl.c (duplicate_decls): Downgrade 'used before declared - inline' to a warning, only with -Winline. - -Fri Sep 13 17:31:40 1996 Stan Shebs - - * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile. - -Wed Sep 11 22:38:13 1996 Gerald Baumgartner - - * call.c (build_method_call): When calling a signature - default implementation, as in other cases, let instance_ptr simply - be instance. - -Wed Sep 11 22:14:44 1996 Mike Stump - - * parse.y (simple_stmt): Cleanup and use do_poplevel (). - -Wed Sep 11 22:10:48 1996 Mike Stump - - * except.c (expand_start_catch_block): Add a pushlevel so that -g - works on hppa and SPARC. - -Wed Sep 11 10:18:06 1996 Brendan Kehoe - - * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node. - -Mon Sep 9 19:51:14 1996 Gerald Baumgartner - - * call.c (build_over_call): Check first whether DECL_CONTEXT exists - before testing whether it's a signature. - -Sun Sep 8 16:06:57 1996 Gerald Baumgartner - - * call.c (build_new_method_call): Don't complain about signature - pointers and references not being an aggr type. - (build_this): If a signature pointer or reference was passed in, - just return it. - (build_new_method_call): If instance is a signature pointer, set - basetype to the signature type of instance. - * sig.c (build_signature_method_call): Deleted basetype and - instance parameters, they can be found as the DECL_CONTEXT of - function and as the first argument passed in. - * cp-tree.h: Changed declaration of build_signature_method_call. - * call.c (build_method_call): Deleted first two arguments in call - of build_signature_method_call. - (build_over_call): Added call to build_signature_method_call. - -Thu Sep 5 16:51:28 1996 Jason Merrill - - * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a - target_expr. - -Thu Sep 5 10:05:38 1996 Brendan Kehoe - - * cvt.c (convert_to_reference): Use %#T, not %#D, for error. - -Wed Sep 4 17:16:09 1996 Bob Manson - - * except.c (expand_start_try_stmts): Move to except.c in the backend. - (expand_end_try_stmts): Remove. - - * init.c (perform_member_init): Use add_partial_entry () instead - of directly manipulating lists. - (emit_base_init): Likewise. - -Wed Sep 4 12:14:36 1996 Mike Stump - - * except.c (expand_exception_blocks): Always make sure USE and - CLOBBER insns that came at the end still do, the backend relies - upon this. - -Wed Sep 4 07:44:48 1996 Jason Merrill - - * call.c (build_over_call): We can only use a TARGET_EXPR of the - right type. - -Tue Sep 3 19:26:05 1996 Jason Merrill - - * cvt.c (convert_to_reference): Revert last change, don't complain - about temp without target decl. - -Tue Sep 3 10:22:56 1996 Mike Stump - - * decl.c (grokdeclarator): Don't core dump when void() is given. - -Tue Sep 3 02:38:56 1996 Jason Merrill - - * decl.c (copy_args_p): Don't crash. - -Fri Aug 30 14:26:57 1996 Mike Stump - - * pt.c (tsubst): And support template args inside the exception - specification. - - * pt.c (tsubst): Add support for exception specifications in - template functions. - -Fri Aug 30 10:01:55 1996 Mike Stump - - * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3 - fields now. - * cp-tree.h (start_decl): Eliminate the throw spec parameter. - (start_function): Likewise. - (start_method): Likewise. - (grokfield): Likewise. - (make_call_declarator): Add throw spec parameter. - (set_quals_and_spec): Add routine. - * lex.c (set_quals_and_spec): Likewise. - * decl.h (grokdeclarator): Eliminate the throw spec parameter. - * decl.c (shadow_tag): Eliminate the throw spec parameter to - grokdeclarator. - (groktypename): Likewise. - (start_decl): Eliminate the throw spec parameter. Eliminate the - throw spec parameter to grokdeclarator. Eliminate the throw spec - field in DECL_STMT. - (cp_finish_decl): Eliminate the throw spec field in DECL_STMT. - (grokfndecl): Remove useless set of raises. - (grokdeclarator): Eliminate the throw spec parameter. Eliminate - the throw spec parameter to start_decl. Pull the throw spec out - of the call declarator. - (grokparms): Eliminate the throw spec parameter to grokdeclarator. - (start_function): Eliminate the throw spec parameter. Eliminate - the throw spec parameter to grokdeclarator. - (start_method): Likewise. - * decl2.c (grokfield): Likewise. - (grokbitfield): Eliminate the throw spec parameter to grokdeclarator. - (grokoptypename): Likewise. - (finish_file): Eliminate the throw spec parameter to - start_function. Add throw spec to make_call_declarator. - * except.c (init_exception_processing): Add throw spec to - make_call_declarator. Eliminate the throw spec parameter to - start_decl. - (expand_start_catch_block): Eliminate the throw spec parameter to - grokdeclarator. - (expand_builtin_throw): Add throw spec to make_call_declarator. - Eliminate the throw spec parameter to start_function. - (start_anon_func): Likewise. - * lex.c (make_call_declarator): Add throw spec parameter. - (set_quals_and_spec): New routine. - (cons_up_default_function): Add throw spec to make_call_declarator. - Eliminate the throw spec parameter to grokfield. - * method.c (synthesize_method): Eliminate the throw spec parameter - to start_function. - * pt.c (process_template_parm): Eliminate the throw spec parameter - to grokdeclarator. - (tsubst): Add throw spec to make_call_declarator. - (tsubst_expr): Eliminate the throw spec parameter to start_decl. - (do_function_instantiation): Eliminate the throw spec parameter to - grokdeclarator. Eliminate the throw spec parameter to - start_function. - * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter - to start_function. - * parse.y (datadef): Remove non-winning optimization. - (decl): Likewise. - (fndef): Remove ambiguous error productions uncovered by grammar - fixing. - (constructor_declarator): Add exception_specification_opt here. - (component_constructor_declarator): Likewise. - (direct_after_type_declarator): Likewise. - (complex_direct_notype_declarator): Likewise. - (direct_abstract_declarator): Likewise. - (fn.def1): Remove exception_specification_opt. - (fn.def2): Likewise. - (condition): Likewise. - (initdcl0): Likewise. - (initdcl): Likewise. - (notype_initdcl0): Likewise. - (nomods_initdcl0): Likewise. - (component_decl_1): Likewise. - (component_declarator): Likewise. - (after_type_component_declarator0): Likewise. - (after_type_component_declarator): Likewise. - (notype_component_declarator): Likewise. - -Wed Aug 28 01:40:30 1996 Jason Merrill - - * call.c (build_over_call): Also use an INIT_EXPR when - initializing anything from an rvalue. - - * call.c (build_over_call): Call stabilize_reference when building - an INIT_EXPR instead of calling the copy ctor. - - * call.c (joust): Extend the previous change to all comparisons. - - * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and - NO_LINKAGE_HEURISTICS. - - * decl2.c (finish_file): Emit any statics that weren't already. - - * typeck.c (build_static_cast): Implement. - * tree.c (build_cplus_new): Handle getting a TARGET_EXPR. - * decl.c (grokparms): Use can_convert_arg instead of - implicit_conversion directly. - (copy_args_p): New fn. - * cvt.c (convert_to_reference): Don't complain about temp with - static_cast. - (build_up_reference): Handle TARGET_EXPRs. - * call.c (build_over_call): Elide unnecessary temps. - (can_convert*): Use new overloading code. - -Tue Aug 27 13:12:21 1996 Jason Merrill - - * call.c: Move TYPE_PTR*_MACROS ... - * cp-tree.h: To here. - * typeck.c (build_reinterpret_cast): Implement. - - * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of - ptr_complete_ob. - (joust): If we're comparing a function to a builtin and the worst - conversion for the builtin is worse than the worst conversion for the - function, take the function. - - * typeck.c (build_const_cast): Implement. - (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast. - (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast. - -Tue Aug 27 13:14:58 1996 Bob Manson - - * rtti.c (build_dynamic_cast): Don't try to dereference exprtype - too early. Make sure we explode if exprtype turns out to be a - NULL_TREE when it shouldn't be. - -Tue Aug 27 10:56:21 1996 Mike Stump - - * cp-tree.h: New routine make_call_declarator. - * lex.c (make_call_declarator): Define it. - * except.c (init_exception_processing): Use it. - (expand_builtin_throw): Likewise. - (start_anon_func): Likewise. - * decl2.c (finish_file): Likewise. - * lex.c (cons_up_default_function): Likewise. - * parse.y: Likewise. - * pt.c (tsubst): Likewise. - -Mon Aug 26 17:40:03 1996 Mike Stump - - * decl2.c (groktypefield): Remove unused code. - -Mon Aug 26 17:00:33 1996 Mike Stump - - * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER. - * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier. - Change type_quals into cv_qualifiers. Change nonempty_type_quals into - nonempty_cv_qualifiers. - * hash.h: Rebuild. - - * lex.c (make_pointer_declarator): Change type_quals into - cv_qualifiers. - (make_reference_declarator): Likewise. - -Thu Aug 22 01:09:22 1996 Jason Merrill - - * decl.c (start_function): Only check interface_* for templates - with flag_alt_external_templates. - - * call.c (build_new_op): Check for comparison of different enum types. - (build_over_call): Fix arg # output. - - * typeck.c (build_component_ref): Handle pre-found TYPE_DECL. - -Wed Aug 21 00:13:15 1996 Jason Merrill - - * call.c (build_new_op): Check for erroneous args. - - * call.c (build_new_method_call): Add missing args to cp_error. - - * tree.c (error_type): Don't print reference-to-array. - - * typeck.c (convert_for_assignment): Don't say contravariance for - removing const. - -Tue Aug 20 13:23:00 1996 Jason Merrill - - * call.c (build_over_call): Diagnose bad convs for `this'. - - * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL - on _ctor_arg. - - * call.c (convert_like): Handle bad convs. - (build_over_call): Handle bad convs better. - - * decl2.c: -fansi-overloading is now the default. - - * call.c (build_new_method_call): Check for erroneous args. - - * pt.c (instantiate_class_template): Propagate - TYPE_USES_MULTIPLE_INHERITANCE. - -Tue Aug 20 13:09:57 1996 Mike Stump - - * call.c (enforce_access): Add static to routine. - -Sun Aug 18 14:35:54 1996 Jason Merrill - - * call.c (build_user_type_conversion_1): Fix bad handling. - (compare_ics): Likewise. - -Sat Aug 17 21:54:11 1996 Jason Merrill - - * call.c (standard_conversion): Oops. - -Sat Aug 17 16:28:11 1996 Geoffrey Noer - - * g++.c: Update test for win32 (&& ! cygwin32). - -Sat Aug 17 03:45:31 1996 Jason Merrill - - * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly. - (ptr_reasonably_similar): New fn. - * call.c (BAD_RANK): New rank. - (ICS_BAD_FLAG): New macro. - (standard_conversion): Handle almost-right pointer conversions. - (reference_binding): Handle bad rvalue bindings. - (add_*_candidate): Stuff. - (build_over_call): Pass bad conversions to convert_for_initialization. - (compare_ics): Handle bad convs. - (joust): Likewise. - -Fri Aug 16 15:02:19 1996 Bob Manson - - * init.c (expand_vec_init): Use ptrdiff_type_node instead of - integer_type_node when computing pointer offsets. - -Fri Aug 16 01:28:32 1996 Jason Merrill - - * tree.c (lvalue_type): New fn. - (error_type): New fn. - * call.c (op_error): Use error_type. - (add_conv_candidate): Use lvalue_type. - (add_builtin_candidates): Likewise. - * error.c (args_as_string): Use error_type. - -Thu Aug 15 17:27:13 1996 Jason Merrill - - * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here. - (tsubst): Not here. - - * decl.c (init_decl_processing): With -ansi, __null's type is the - signed integral type with the same number of bits as a pointer. - Introduce a new variable null_node for it. - * cp-tree.h: Adjust. - * call.c (null_ptr_cst_p): Adjust. - -Thu Aug 15 17:09:54 1996 Mike Stump - - * except.c (do_unwind): Mark %i7 as used on the SPARC so we can - optimize. - -Thu Aug 15 01:36:49 1996 Jason Merrill - - * decl2.c (import_export_decl): Ignore #pragma interface for tinfo - fns of classes without virtual functions. - - * call.c (add_function_candidate): Handle `this' specially. - (compare_ics): Likewise. - -Tue Aug 13 12:16:10 1996 Jason Merrill - - * typeck.c (build_conditional_expr): Fix handling of __null. - - * decl2.c (comdat_linkage): New fn. - (import_export_vtable): Use it. - (import_export_decl): Use it. - * method.c (make_thunk): Use it. - -Mon Aug 12 00:09:18 1996 Jason Merrill - - * pt.c (end_template_decl): If we don't actually have parms, return. - * parse.y (template_header): Accept 'template <>'. - - * errfn.c: Allow 5 args. - -Sun Aug 11 15:20:58 1996 Jason Merrill - - * tree.c (make_temp_vec): New fn. - * pt.c (push_template_decl): Handle partial specs. - (instantiate_class_template): Likewise. - (more_specialized): Use get_bindings. - (more_specialized_class): New fn. - (get_class_bindings): New fn. - (most_specialized_class): New fn. - (do_function_instantiation): List candidates for ambiguous case. - * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS. - (shadow_tag): Call push_template_decl for partial specializations. - * parse.y: Likewise. - * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces - DECL_TEMPLATE_MEMBERS. - * call.c (print_z_candidates): Reduce duplication. - -Fri Aug 9 14:36:08 1996 Jason Merrill - - * decl2.c (lang_decode_option): Allow -fansi-overloading. - -Thu Aug 8 17:04:18 1996 Jason Merrill - - * pt.c (get_bindings): New fn. - (most_specialized): Likewise. - (do_function_instantiation): Use them. - (add_maybe_template): New fn. - * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro. - * call.c (build_new_op): Handle guiding decls. - (build_new_function_call): Likewise. - * decl2.c (finish_file): Likewise. - - * decl2.c (mark_used): Do synthesis here. - * call.c (build_method_call): Not here. - (build_over_call): Or here. - * typeck.c (build_function_call_real): Or here. - * tree.c (bot_manip): Call mark_used on functions used in default - args. - -Thu Aug 8 17:48:16 1996 Michael Meissner - - * decl2.c (import_export_vtable): Delete code that disabled vtable - heuristic on systems with ASM_OUTPUT_EXTERNAL. - -Wed Aug 7 12:44:11 1996 Jason Merrill - - * typeck.c (build_x_function_call): Handle static call context - better. - - * decl.c (finish_function): Set the DECL_CONTEXT of the result to - the function, not its outer block. - - * call.c (build_field_call): Pass fields on to build_opfncall - regardless of TYPE_OVERLOADS_CALL_EXPR. - (build_method_call): Pass on to build_new_method_call sooner. - - * typeck.c (build_ptrmemfunc): Just return what instantiate_type - gives us. - * class.c (instantiate_type): Don't put a POINTER_TYPE to - METHOD_TYPE on an expression. Also make a copy of rhs instead of - modifying it. - -Tue Aug 6 12:58:46 1996 Jason Merrill - - * call.c (compare_ics): Handle qual_conv after lvalue_conv. - (add_builtin_candidate): Don't take enums for ++. - (build_new_method_call): Handle non-aggregates and field calls. - Move new overloading code from... - * cvt.c: Here. - - * decl.c (grokparms): Don't check default args in templates. - -Mon Aug 5 17:17:06 1996 Jason Merrill - - * cvt.c (build_new_op): Fix args to build_unary_op. - (add_builtin_candidates): Don't call type_promotes_to on float. - - * decl.c (grokparms): Check the type of the default arg. - - * cvt.c (build_new_op): Pass non-overloaded cases on rather than - returning NULL_TREE. - - * typeck.c (build_x_binary_op): Avoid doing extra work. - (build_x_unary_op): Likewise. - (build_x_conditional_expr): Likewise. - * cvt.c (build_over_call): Return. - (add_builtin_candidate): Fix MEMBER_REF. - (build_new_op): Likewise. - -Mon Aug 5 17:07:47 1996 Mike Stump - - * method.c (build_overload_name): Put bug fix into code but leave - disabled for now so we can be bug compatible with older releases - that do repeats incorrectly. In the future, we can enable it. - -Mon Aug 5 13:46:28 1996 Jason Merrill - - * cvt.c (convert_like): Don't call build_cplus_new twice. - - * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c: - Control new overloading code with -fansi-overloading. - -Sun Aug 4 15:29:11 1996 Jason Merrill - - * cvt.c (build_over_call): Call build_cplus_new. - * call.c (build_method_call): Likewise. - * typeck.c (build_function_call_real): Likewise. - (build_conditional_expr): If both operands are TARGET_EXPRs, wrap - the COND_EXPR in a TARGET_EXPR so they use the same slot. - - * cvt.c (build_up_reference): Propagate INDIRECT_BIND to - recursive calls. - * typeck.c (complete_type): Propagate - TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}. - -Sat Aug 3 14:05:07 1996 Jason Merrill - - * cvt.c (joust): More ?: kludging. Sigh. - (build_over_call): Don't try to synthesize global fns. - - * search.c (lookup_conversions): Use binfo marking. - -Sat Aug 3 12:33:42 1996 Bob Manson - - * search.c (build_mi_matrix): Use the correct value of cid - when determining the new mi_size. - -Sat Aug 3 01:27:41 1996 Jason Merrill - - * cvt.c (add_builtin_candidates): Do consider type conversion ops - for the first parms of += et al. - (strip_top_quals): New fn. - (reference_binding): Use it instead of TYPE_MAIN_VARIANT. - (implicit_conversion): Likewise. - (add_builtin_candidates): Be careful about arrays. - (build_new_method_call): Handle vtable optimization. - -Fri Aug 2 01:26:59 1996 Jason Merrill - - * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag. - * cvt.c (reference_binding): Use it. - (implicit_conversion): Use it. - (add_builtin_candidate, COND_EXPR): Use it. - - * cvt.c (build_new_function_call): Check for error args. - - * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY. - - * gxx.gperf: Add __null. - * hash.h: Regenerate. - * lex.h: Add RID_NULL. - * lex.c (init_lex): Create null_pointer_node here, stick it in - RID_NULL. - * decl.c (init_decl_processing): Still set its type here. - * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node. - (convert_to_pointer_force): Likewise. - (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0 - if (! pedantic). - * call.c (convert_harshness): Use null_ptr_cst_p. - * typeck.c (convert_for_assignment): Likewise. Don't produce - null_pointer_node. - - * error.c (args_as_string): Handle lists of actual args, too. - * cvt.c (null_ptr_cst): Support (void*)0 for now. - (build_user_type_conversion_1): Improve diagnostics. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (build_new_method_call): Likewise. Move call before def diagnostic... - (build_over_call): Here. - - * cvt.c (build_new_method_call): Don't complain about no match if - LOOKUP_SPECULATIVELY. - (build_over_call): Fix 'this' for virtual fn. - (build_new_method_call): Add diagnostic. - -Thu Aug 1 16:45:09 1996 Jason Merrill - - * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for - constructors to be passed in. - (build_over_call): Likewise. - (build_user_type_conversion_1): Pass them in. - (convert_like): Likewise. - (build_object_call): Handle overloaded conversions. - (build_over_call): Pass the right args to build_vfn_ref. - (standard_conversion): Fix pmf convs. - (joust): Handle comparing statics and non-statics. - (build_new_method_call): New fn. - * call.c (build_method_call): Call it if NEW_OVER. - -Thu Aug 1 16:06:14 1996 Mike Stump - - * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use - %D instead. - -Thu Aug 1 15:24:02 1996 Mike Stump - - * except.c (expand_throw): Use maybe_build_cleanup_and_delete - instead of just maybe_build_cleanup so that we deallocate the - thrown object. - -Thu Aug 1 15:18:00 1996 Brendan Kehoe - - * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use. - * cp-tree.h (finish_prevtable_vardecl): Add decl. - -Thu Aug 1 11:53:51 1996 Bob Manson - - * pt.c (instantiate_class_template): Call complete_type. Also, if - we're at the end of the file and we just instantiated a template - class with a vtable, call finish_prevtable_vardecl. - - * error.c (dump_decl): Don't explode (or explode more gracefully - as appropriate) if the object being dumped has a null type. - (dump_expr): Likewise. - - * search.c (build_mi_matrix): Ensure that mi_size is large enough, - by counting the number of nodes that we'll need before allocating - the array. - (lookup_fnfields): Fix comment. - (breadth_first_search): Fix comment. - -Wed Jul 31 09:57:05 1996 Jason Merrill - - * pt.c (instantiate_class_template): Propagate TYPE_PACKED and - TYPE_ALIGN. - * class.c (finish_struct): Call cplus_decl_attributes here. - (finish_struct_1): Not here. - * cp-tree.h: Adjust. - - * pt.c (type_unification): New parameter STRICT. - (unify): If STRICT, don't allow cv addition or base deduction. - * call.c, class.c, cvt.c, cp-tree.h: Adjust. - -Tue Jul 30 13:06:13 1996 Jason Merrill - - * search.c (get_template_base{_recursive}): New fns. - * pt.c (more_specialized): New fn. - (do_function_instantiation): Use it. - (unify): Handle base deduction. - * cvt.c (joust): Use more_specialized. - Don't arbitrarily choose between non-builtin candidates. - (build_over_call): Call require_complete_type. - - * decl.c (start_function): Statics are static even in a #pragma - interface file. - - * decl2.c (import_export_vtable): Disable vtable heuristic on - systems with ASM_OUTPUT_EXTERNAL. - - * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV. - (standard_conversion): No std conv to enum type. - - * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P - for ptm's. - - * cvt.c (reference_binding): Bind directly to a base subobject of - a class rvalue. - - * cvt.c (build_new_op): Enforce access control. - -Tue Jul 30 09:22:53 1996 Bob Manson - - * typeck2.c (process_init_constructor): When scanning the - union for a named field, skip things that aren't FIELD_DECLs. - - * method.c (synthesize_method): Don't scan fndecl's rtl if - we're at the end of the file; just assume the function can't - be inlined. - -Mon Jul 29 15:48:30 1996 Jason Merrill - - * cvt.c (build_builtin_candidate): Stick a dummy conversion in if - it failed. - - * cvt.c (build_user_type_conversion_1): Handle overloaded - conversion ops. - - * cvt.c (add_builtin_candidates): Don't consider type conversion - operators for the first parameter of operator=. - -Mon Jul 29 15:33:55 1996 Bob Manson - - * typeck.c (complete_type): Only call layout_type if we're not - expanding a template. - -Mon Jul 29 14:40:38 1996 Jason Merrill - - * cvt.c (compare_ics): Oops. - - * cvt.c (op_error): Oops. - - * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV. - * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p. - (build_conv): Use them. - (implicit_conversion): Use them. - (convert_like): Handle them. - (build_new_op): Handle builtin COND_EXPR again. - (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums - in lists of types for COND_EXPR. - (add_builtin_candidate): Add enum candidates for COND_EXPR. - -Mon Jul 29 12:05:40 1996 Bob Manson - - * typeck.c (build_modify_expr): Always attempt to build a call to - the assignment operator, even if we're using a default one. - (convert_for_initialization): Call complete_type. - -Mon Jul 29 11:25:08 1996 Jason Merrill - - * cvt.c (reference_binding): A REF_BIND gets the reference type. - (implicit_conversion): Likewise. - (convert_like): Likewise. - (compare_ics): Likewise. - (compare_qual): Likewise. - (print_z_candidates): Handle no candidates. - (build_new_op): Don't handle builtin COND_EXPR for now. - -Sat Jul 27 11:27:47 1996 Stan Shebs - - * cvt.c (build_builtin_candidate): Init local var in an ANSI way. - -Fri Jul 26 01:07:22 1996 Jason Merrill - - * cvt.c (joust): If the candidates are the same, arbitrarily pick one. - - * cvt.c (build_builtin_candidate): Oops. - (build_new_op): Oops. - - * method.c (build_opfncall): Pass COND_EXPR on. - * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR. - (add_builtin_candidate{,s}): Likewise. - (add_builtin_candidates): Likewise. - (print_z_candidates, op_error, build_new_op): Likewise. - (type_decays_to): New fn. - * lex.c (init_lex): Just say ?: for COND_EXPR. - -Thu Jul 25 09:33:33 1996 Jason Merrill - - * typeck.c (complete_type): Call layout_type rather than building - a new array type. - - * cvt.c (add_builtin_candidate): Pointer arithmetic candidates - only use ptrdiff_t. - -Wed Jul 24 12:45:08 1996 Jason Merrill - - * cvt.c: Always compile the new overloading code (but don't use it). - (implicit_conversion): Add a BASE_CONV when converting to - the same class type. - (convert_like): Handle BASE_CONV. - -Tue Jul 23 12:46:30 1996 Jason Merrill - - * cvt.c (build_new_op): Support {MAX,MIN}_EXPR. - (add_builtin_candidate): Likewise. - - NEW_OVER changes: - * typeck.c (build_x_function_call): Try an operator function - whenever we call an object of class type. - * method.c (build_opfncall): Pass CALL_EXPRs through. - * cvt.c (implicit_conversion): Do const-ref case first. - (add_conv_candidate, build_object_call, op_error): New fns. - (ptr_complete_ob, TYPE_PTROB_P): void is not an object type. - ({add,build}_builtin_candidate{,s}, print_z_candidates): Display - builtin candidates. - (build_new_op): Handle CALL_EXPR. Don't try to decay void. - Fall back on preincrement handling. Use op_error. - Handle warn_synth. - (convert_like): Pass INDIRECT_BIND. Don't try to do anything with - an error_mark_node. - (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions - properly. - -Mon Jul 22 16:21:55 1996 Bob Manson - - * pt.c (tsubst_expr): Handle CONTINUE_STMT. - -Mon Jul 22 15:38:58 1996 Mike Stump - - * typeck.c (build_component_ref_1): Use build_component_ref - instead of open coding it here. - -Mon Jul 22 12:18:54 1996 Jason Merrill - - * g++.c (main): Don't link with -lg++. - - NEW_OVER changes: - * cvt.c (convert_to_reference): Don't use convert_from_reference on - result of build_type_conversion. - (cp_convert): Only call build_method_call for ctors if - build_type_conversion failed. - (ptr_complete_ob): New function. - (TYPE_PTR{,OB,MEM}_P): New macros. - ({add,build}_builtin_candidate{,s}): New functions. - (print_z_candidates): Handle builtins. - (build_user_type_conversion_1): Don't use conversion fns for - converting to a base type. - (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs. - (build_user_type_conversion): Use convert_from_reference. - (build_new_op): New function. - (build_over_call): Fix handling of methods. - (compare_ics): Handle AMBIG_CONV properly. - * typeck2.c: Increment abort count. - * method.c (build_opfncall): Forward most requests to build_new_op. - * cp-tree.h (IS_OVERLOAD_TYPE): Tweak. - -Fri Jul 19 17:59:29 1996 Brendan Kehoe - - * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out - invalid second argument to dump_expr_list. - -Fri Jul 19 14:04:05 1996 Mike Stump - - * decl.c (lookup_name_real): Make sure we do obj->X::i correctly. - -Thu Jul 18 14:48:23 1996 Bob Manson - - * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not - ASSEMBLE_EXTERNAL. - -Mon Jul 15 17:48:43 1996 Mike Stump - - * typeck2.c (process_init_constructor): New pedwarn for using { } - to initialize a pointer to member function. - * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that - we can avoid the new error. - -Mon Jul 15 15:42:03 1996 Mike Stump - - * typeck.c (build_ptrmemfunc1): New function to hide details of - pointer to member functions better. - -Mon Jul 15 14:23:02 1996 Mike Stump - - * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are - methods into the actual method, as we know the implied object is - not used. - -Mon Jul 15 13:08:29 1996 Brendan Kehoe - - * parse.y (maybecomma_warn): Only emit the pedwarn if we're not - inside a system header. - -Fri Jul 12 16:30:05 1996 Bob Manson - - * call.c (build_method_call): Call complete_type on the - instance type. - -Thu Jul 11 17:16:40 1996 Mike Stump - - * typeck.c (build_component_ref): Always build up an OFFSET_REF - for obj_ptr->func so that we can know which object to use in a - method call. - -Wed Jul 10 19:36:37 1996 Mike Stump - - * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast - around things. Also improve maintainability. - -Wed Jul 10 18:20:11 1996 Bob Manson - - * decl.c (grokdeclarator): Check for overflow when evaluating an - array dimension. - -Wed Jul 10 17:26:19 1996 Jason Merrill - - * cvt.c (cp_convert): Don't check for ambiguity with constructor - if NEW_OVER. - - * typeck.c (build_x_function_call): Pass function overload - questions to new overloading code if NEW_OVER. - * init.c (expand_aggr_init_1): Only check for type conversion ops - if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING). - Don't check for ambiguity with constructor if NEW_OVER. - * cvt.c (convert_to_reference): Dereference the result of a type - conversion operator. - (build_conv): Propagate ICS_USER_FLAG. - (implicit_conversion): Call instantiate_type. - Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL. - (add_function_candidate): Fix cv-quals on argtype. - (print_z_candidates): New function. - (build_new_function_call): Call it. - (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't - consider non-converting constructors. - Call print_z_candidates. - Return an AMBIG_CONV for an ambiguous conversion. - (build_user_type_conversion): Handle AMBIG_CONV. - (convert_like): Fix test for building TARGET_EXPR. - Call instantiate_type. - Handle AMBIG_CONV and LVALUE_CONV. - (build_over_call): Handle 0 args and ellipsis. - * cp-tree.def: Add AMBIG_CONV. - -Tue Jul 9 17:48:48 1996 Mike Stump - - * decl.c (lookup_name_real): If we find mem in obj when parsing - `obj->mem', make sure we return the right value. - -Tue Jul 9 16:11:28 1996 Bob Manson - - * search.c (get_base_distance): Call complete_type. - -Tue Jul 9 12:46:34 1996 Mike Stump - - * decl.c (store_bindings): Make static. - -Mon Jul 8 16:42:31 1996 Jason Merrill - - * init.c (expand_aggr_init_1): Don't check type conversions if - NEW_OVER. - - * cvt.c (z_candidate): Put back template field. - (add_function_candidate): Set it. - (add_template_candidate): Likewise. - (joust): Use it. - (compare_qual): Handle references and pointers to members. - (compare_ics): Handle reference bindings. - - * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY. - -Mon Jul 8 16:18:56 1996 Bob Manson - - * call.c (compute_conversion_costs): Call complete_type. - - * tree.c (vec_binfo_member): Use comptypes instead of comparing - pointers, so we can handle template parameters. - -Fri Jul 5 16:51:53 1996 Bob Manson - - * cvt.c (cp_convert_to_pointer): We have to call complete_type - here; let's make it explicit instead of a side effect of an - error check. - -Wed Jul 3 16:29:51 1996 Jason Merrill - - * cvt.c (z_candidate): Remove template field. - (reference_binding): Handle binding to temporary. - (implicit_conversion): Likewise. - (add_function_candidate): Handle artificial constructor parms. - Handle functions with too few parms. - (add_template_candidate): New function. - (build_user_type_conversion_1): Handle constructors. - (convert_like): Likewise. - (build_over_call): Likewise. - (build_new_function_call): Support templates. - (compare_ics): Fix reference, inheritance handling. - -Mon Jul 1 22:58:18 1996 Bob Manson - - * decl.c: Add signed_size_zero_node. - (init_decl_processing): Build it. - * class.c (prepare_fresh_vtable): Use it instead of size_zero_node - when we're trying to make a negative delta. - -Mon Jul 1 17:56:19 1996 Brendan Kehoe - - Stop doing this damn index==strchr variable name confusion. - * class.c (add_virtual_function): Change local var INDEX to be - named IDX. - (add_method): Likewise. - * lex.c (print_parse_statistics): Likewise. - * search.c (make_memoized_table_entry): Likewise. - (lookup_fnfields_here): Likewise. - (lookup_field): Likewise. - (lookup_fnfields): Likewise. - (get_baselinks): Likewise. - * sig.c (build_signature_table_constructor): Likewise. - (build_signature_method_call): Likewise. - * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX. - (get_member_function_from_ptrfunc): Likewise. - (build_ptrmemfunc): Change local var INDEX to be IDX. - (c_expand_start_case): Likewise. - -Sat Jun 29 14:05:46 1996 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Move user-defined type conversion - handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE. - (convert_to_reference): Use build_type_conversion to convert to - the reference type directly. - (standard_conversion): Fix void* case, non-conversions. - (reference_binding): Fix expr == 0 case, non-conversions. - (convert_like): Support REF_BIND. - (compare_qual): Split out from compare_ics. - (compare_ics): Use it, handle icses with only a qual_conv. - - * init.c (expand_vec_init): Don't crash if decl is NULL. - -Fri Jun 28 11:52:51 1996 Stan Shebs - - * mpw-config.in: New file, configury for Mac MPW. - * mpw-make.sed: New file, makefile editing for MPW. - -Thu Jun 27 15:18:30 1996 Jason Merrill - - * pt.c (instantiate_class_template): Call repo_template_used. - - * search.c (lookup_conversions): Only lookup conversions in - complete types. - -Thu Jun 27 12:59:53 1996 Brendan Kehoe - - * cp-tree.def: Renamed from tree.def, to avoid confusion with - gcc's tree.def. - * cp-tree.h, lex.c: Include cp-tree.def. - * Makefile.in (CXX_TREE_H): Reference cp-tree.def. - -Wed Jun 26 18:29:47 1996 Bob Manson - - * init.c (build_vec_delete_1): Call complete_type. - -Mon Jun 24 17:17:32 1996 Mike Stump - - * except.c (start_anon_func): Make sure anonymous functions are - never external. - -Fri Jun 21 15:10:58 1996 Jason Merrill - - * decl.c (finish_function): If function_depth > 1, set nested. - - * decl2.c (grokbitfield): Revert Bob's change. - * class.c (finish_struct_1): Fix handling of named bitfield widths. - -Thu Jun 20 23:35:38 1996 Jason Merrill - - * pt.c (add_pending_template): Handle types. - (lookup_template_class): With -fexternal-templates, just add the class - to pending_templates instead of instantiating it now. - * decl2.c (finish_file): Handle types in pending_templates. - -Thu Jun 20 14:08:40 1996 Bob Manson - - * decl2.c (grokbitfield): Handle constant decls appropriately. - Give an appropriate error message now instead of spewing core - later. - -Thu Jun 20 13:01:51 1996 Jason Merrill - - * decl2.c: Don't turn on thunks by default for now. - -Wed Jun 19 11:37:04 1996 Jason Merrill - - * typeck.c (complete_type): Handle error_mark_node. - (common_type, OFFSET_TYPE): Handle template_type_parms. - -Tue Jun 18 10:02:15 1996 Jason Merrill - - * pt.c (instantiate_decl): If at_eof, call import_export_decl - regardless of DECL_INLINE. - - * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs. - - * class.c (finish_struct_bits): Copy TYPE_SIZE. - - * rtti.c (build_dynamic_cast): Support templates. - * tree.def: Support DYNAMIC_CAST_EXPR. - * pt.c (tsubst_copy): Likewise. - * decl2.c (build_expr_from_tree): Likewise. - -Mon Jun 17 15:23:36 1996 Jason Merrill - - * typeck.c (build_static_cast): Support templates. - (build_const_cast): Likewise. - * tree.def: Support CONST/STATIC_CAST_EXPR. - * pt.c (tsubst_copy): Likewise. - * decl2.c (build_expr_from_tree): Likewise. - -Sun Jun 16 12:33:57 1996 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Don't trust - TREE_SYMBOL_REFERENCED for vtables of local classes. - -Fri Jun 14 18:13:36 1996 Jason Merrill - - * pt.c (tsubst_copy): Handle operator T. - -Wed Jun 12 17:52:40 1996 Brendan Kehoe - - * init.c (build_delete): Move creation of PARMS inside test of - TYPE_HAS_DESTRUCTOR, since it's never used outside of that block. - -Tue Jun 11 15:09:18 1996 Bob Manson - - * typeck.c (build_conditional_expr): Don't assume that - the arguments to ?: are always pointers or records. - -Tue Jun 11 13:56:23 1996 Jason Merrill - - * decl2.c (import_export_decl): Still emit static/weak/comdat - copies of inline template functions with -fno-implicit-templates. - -Tue Jun 11 11:42:13 1996 Bob Manson - - * init.c (build_delete): Determine the complete basetype - path to the destructor we're calling. - -Fri Jun 7 15:30:10 1996 Bob Manson - - * decl.c (build_enumerator): Always copy the INTEGER_CST used to - initialize the enum, because we really and truly don't know where - it came from. - (start_enum): Don't copy integer_zero_node because - build_enumerator will do it. - -Fri Jun 7 11:11:09 1996 Jason Merrill - - * decl.c (finish_function): Do access control on base destructors. - - * pt.c (tsubst, case FUNCTION_DECL): Set up - IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't - hose us. - -Fri Jun 7 10:37:33 1996 Mike Stump - - * cvt.c (build_up_reference): If we have already extended the - lifetime of the temporary, don't try it again. - * typeck.c (c_expand_return): Don't try and convert the return - value twice when we want a reference, once is enough. - -Tue Jun 4 15:41:45 1996 Jason Merrill - - * pt.c (tsubst_expr, case DECL_STMT): Don't pass - LOOKUP_ONLYCONVERTING at all for now. - - * search.c (add_conversions): Put the conversion function in - TREE_VALUE, the basetype in TREE_PURPOSE. - * cvt.c (build_type_conversion): Adjust. - * cvt.c (build_expr_type_conversion): Adjust. - * call.c (user_harshness): Adjust. - -Mon Jun 3 15:30:52 1996 Jason Merrill - - * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the - backend's benefit. - -Mon Jun 10 18:58:19 1996 Mike Stump - - * except.c (expand_start_catch_block): Add a dummy region, if we - get an error, so that we can avoid core dumping later. - -Fri May 31 14:56:13 1996 Mike Stump - - * cp-tree.h (OFFSET_REF): Remove. - * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF. - * expr.c (cplus_expand_expr): Cleanup callers of expand_expr. - * init.c (expand_aggr_init_1): Likewise. - (build_new): Likewise. - * typeck.c (expand_target_expr): Likewise. - -Fri May 31 14:22:08 1996 Jason Merrill - - * typeck.c (build_modify_expr): Don't use TREE_VALUE on a - TARGET_EXPR. - -Wed May 29 17:04:33 1996 Mike Stump - - * cvt.c (build_up_reference): Redo how and when temporaries are - created. - * decl.c (grok_reference_init): Don't try and be smart about - running cleanups. - -Wed May 29 16:02:08 1996 Mike Stump - - * cvt.c (build_up_reference): Add NULL_TREE to all calls to build - (TARGET_EXPR...), now that it has 4 arguments. - * tree.c (build_cplus_new): Likewise. - -Thu May 23 16:40:30 1996 Jason Merrill - - * error.c (dump_expr, case CAST_EXPR): Handle T() properly. - - * pt.c (instantiate_decl): Don't call push/pop_cp_function_context. - * decl.c (struct saved_scope): Remove named_labels, - {base,member}_init_list. - (maybe_push_to_top_level): Don't set them. Call - push_cp_function_context if appropriate. - (pop_from_top_level): Likewise. - - * method.c (do_build_assign_ref): Remove obsolete check of - TYPE_HAS_ASSIGN_REF (basetype). - - * decl.c (grokfndecl): Diagnose user definition of - implicitly-declared methods. - -Thu May 23 12:13:08 1996 Bob Manson - - * method.c (do_build_copy_constructor): Add code to give - meaningful error messages instead of crashing. - (do_build_assign_ref): Don't synthesize assignment operators for - classes containing reference or const members. - - * class.c (struct base_info): Remove cant_synth_copy_ctor - and cant_synth_asn_ref. - (finish_base_struct): Remove the code that tries to conditionalize - synthesis of copy constructors & assignment operators based on - access permissions. Instead, let it fail when it tries to - synthesize the copy constructor. This will give meaningful error - messages instead of silently generating code to perform a bitcopy. - -Wed May 22 11:45:19 1996 Bob Manson - - * lex.c (real_yylex): Remove old-n-crufty #if 0 code for - determining types for constant values. - - * decl.c (struct named_label_list): Use instead of stuffing - random items into a TREE_LIST node. - (named_label_uses): Use the new struct. - (poplevel): Likewise. - (lookup_label): Likewise. - (define_label): Add an error message to tell the user the line - where the goto is located in addition to the destination of the - goto. - (init_decl_processing): Use NULL instead of NULL_TREE to initialize - named_label_uses. - (finish_function): Likewise. - - (start_decl): Complain about defining a static data member - in a different type from which it was declared. - -Wed May 22 09:33:23 1996 Jason Merrill - - * cvt.c (build_expr_type_conversion): Adjust. - -Tue May 21 11:21:56 1996 Jason Merrill - - * call.c (build_method_call): Always convert 'this' to the - appropriate type. - - * search.c (add_conversions): Put the conversion function in - TREE_VALUE, the type in TREE_PURPOSE. - * cvt.c (build_type_conversion): Adjust. - * call.c (user_harshness): Adjust. - - * method.c (emit_thunk): Call temporary_allocation and - permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too. - - * tree.c (build_cplus_array_type): Handle tweaking of - TYPE_MAIN_VARIANT here. - * typeck.c (common_type): Not here. - - * typeck.c (complete_type): Only try to complete an array type if - it has a domain. - -Mon May 20 14:55:59 1996 Jason Merrill - - * decl.c (grokvardecl): Call complete_type. - (grokdeclarator): Call complete_type for PARM_DECLs. - -Fri May 17 16:41:17 1996 Jason Merrill - - * pt.c (instantiate_class_template): Re-set - CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1. - -Fri May 17 14:56:55 1996 Mike Stump - - * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now - smart enough to do it right. - * tree.c (cp_expand_decl_cleanup): Likewise. - * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of - cp_expand_decl_cleanup. - (store_parm_decls): Likewise. - (hack_incomplete_structures): Likewise. - * except.c (push_eh_cleanup): Likewise. - -Fri May 17 13:13:51 1996 Mike Stump - - * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++ - frontend to the backend where it belongs. - * tree.c (unsave_expr): Likewise. - (unsave_expr_now): Likewise. - * tree.def (UNSAVE_EXPR): Likewise. - * cp-tree.h (unsave_expr): Likewise. - (unsave_expr_now): Likewise. - -Fri May 17 11:02:41 1996 Mike Stump - - * init.c (emit_base_init): Make sure the partial EH cleanups live - on the function_obstack. - -Thu May 16 15:29:33 1996 Bob Manson - - * expr.c (do_case): Don't try to dereference null TREE_TYPEs - when checking for pointer types. - -Thu May 16 13:38:58 1996 Jason Merrill - - * pt.c (instantiate_class_template): Remove obsolete check for - access declarations. - -Thu May 16 13:34:15 1996 Mike Stump - - * call.c (build_overload_call): Simplify calls to - build_overload_call by removing last parameter. - (build_method_call): Likewise. - * cp-tree.h: Likewise. - * method.c (build_opfncall): Likewise. - * typeck.c (build_x_function_call): Likewise. - -Thu May 16 13:15:43 1996 Mike Stump - - * call.c (default_parm_conversions): Factor out common code. - (build_method_call): Use it. - (build_overload_call_real): Use it. - -Wed May 15 14:46:14 1996 Mike Stump - - * call.c (build_method_call): Allow implicit & on METHOD_TYPEs, - but pedwarn as the code is bogus. - * typeck.c (decay_conversion): Likewise. - (build_function_call_real): Use build_addr_func instead of - default_conversion. Don't allow pointer-to-method functions down - here. - (build_unary_op): Use real pointer-to-member functions instead of - fake ones. - (build_ptrmemfunc): Use build_addr_func instead of build_unary_op. - (convert_for_assignment): Removed some obsolete code. - * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to - build_x_function_call instead of current_class_ptr. Only call - digest_init once on an initializer, we do this just checking - TREE_TYPE. - (build_expr_from_tree): Pass current_class_ref to - build_x_function_call instead of current_class_ptr. - * init.c (build_member_call): Likewise. - * pase.y: Likewise. - * error.c (dump_expr): Handle OFFSET_REFs better. - * pt.c (unify): Handle pointer-to-member functions better. - * decl.c (finish_function): Clear out current_class_ref just like - we do for current_class_ptr. - - * typeck.c (get_delta_difference): Handle virtual bases better. - -Tue May 14 16:37:37 1996 Jason Merrill - - * sig.c (build_signature_table_constructor): Use the delta for - the original basetype for this virtual function with thunks. - (build_signature_method_call): We still need to adjust 'this' - with thunks. - -Tue May 14 16:27:25 1996 Mike Stump - - * call.c (build_addr_func): New routine. Used to get the `real' - address of a function or a method. Needed to avoid getting a - pointer-to-member function. - (build_call): New routine to build CALL_EXPRs. - (build_method_call): Use it. - * cvt.c (convert_to_aggr): Likewise. - * typeck.c (build_function_call_real): Likewise. - * sig.c (build_signature_table_constructor): Use build_addr_func. - * cp-tree.h (build_call, build_addr_func): Declare them. - -Tue May 14 12:47:47 1996 Mike Stump - - * cp-tree.h (LOOKUP_AGGR): Remove, unused. - * parse.y: Remove uses of LOOKUP_AGGR. - -Tue May 14 12:07:51 1996 Mike Stump - - * *.[chy]: Rename current_class_decl to current_class_ptr, and - C_C_D to current_class_ref. - -Mon May 13 16:55:23 1996 Jason Merrill - - * call.c (convert_harshness): Tighten up pointer conversions. - -Sat May 11 04:33:50 1996 Doug Evans - - * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef. - (finish_file): Likewise. - -Fri May 10 11:09:57 1996 Jason Merrill - - * cvt.c (convert_fn_ptr): We don't use thunks for pmfs. - - * method.c (emit_thunk): Set flag_omit_frame_pointer in default - code. - -Thu May 9 18:18:30 1996 Jason Merrill - - * decl2.c: Turn on thunks by default where supported. - -Tue May 7 20:39:57 1996 Mike Stump - - * cp-tree.h (build_overload_call_maybe): Removed. - * call.c (build_overload_call_real): Invert meaning of last arg to - be require_complete. - (build_overload_call): Likewise. - * typeck.c (build_x_function_call): Use build_overload_call_real - instead of build_overload_call_maybe. - -Mon May 6 01:23:32 1996 Jason Merrill - - * decl2.c (finish_file): Don't try to emit functions that haven't - been compiled. - -Fri May 3 09:30:13 1996 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Oops. - - * decl.c (maybe_push_to_top_level): Do save previous_class_*. - Also store the bindings from previous_class_values. - (pop_from_top_level): Restore them. - -Thu May 2 21:56:49 1996 Jason Merrill - - * decl2.c (finish_vtable_vardecl): Only write out vtable if its - symbol has been referenced. - (finish_file): Re-join synthesis/vtable loop with inline emission - loop, disable inlining when an inline is output. - -Thu May 2 17:20:02 1996 Mike Stump - - * except.c (init_exception_processing): Setup saved_in_catch. - (push_eh_cleanup): Reset __eh_in_catch. - (expand_start_catch_block): Set __eh_in_catch. - -Thu May 2 16:21:17 1996 Mike Stump - - * except.c (push_eh_cleanup): Add tracking for whether or not we - have an active exception object. - (expand_builtin_throw): Use it to make sure a rethrow without an - exception object is caught. - -Thu May 2 11:26:41 1996 Jason Merrill - - * decl.c (maybe_push_to_top_level): Clear out class-level bindings - cache. - -Wed May 1 11:26:52 1996 Jason Merrill - - * decl2.c (finish_file): Also use sentries for vars with - DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be - created). - - * lex.c (handle_cp_pragma): Disable #pragma - interface/implementation if SUPPORTS_ONE_ONLY > 1. - -Tue Apr 30 11:25:46 1996 Jason Merrill - - * method.c (emit_thunk): Wrap default case in - temporary/permanent_allocation. - - * method.c (make_thunk): Use DECL_ONE_ONLY. - (emit_thunk): Call assemble_end_function. - -Mon Apr 29 15:38:29 1996 Jason Merrill - - * decl2.c (import_export_vtable): Use DECL_ONE_ONLY. - (import_export_decl): Likewise. - (finish_prevtable_vardecl): Disable vtable hack if - SUPPORTS_ONE_ONLY > 1. - -Mon Apr 29 14:32:47 1996 Mike Stump - - * typeck.c (build_modify_expr): PREINCREMENT_EXPR and - PREDECREMENT_EXPRs take two arguments, not one. - -Mon Apr 29 00:27:53 1996 Jason Merrill - - * class.c (build_vtable_entry): Don't build thunks for abstract - virtuals. - - * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C - frontend. - -Sat Apr 27 16:45:35 1996 Jason Merrill - - * class.c (set_rtti_entry): Use size_zero_node. - (build_vtable): Likewise. - -Sat Apr 27 14:48:57 1996 Jason Merrill - - * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry. - (prepare_fresh_vtable): Likewise. - -Fri Apr 26 13:14:14 1996 Jason Merrill - - * method.c (emit_thunk): Call mark_used on the target function. - - * call.c (build_method_call): Don't warn about pending templates. - -Thu Apr 25 14:55:44 1996 Jason Merrill - - * decl2.c (finish_file): Fix list walking logic. - - * typeck2.c (check_for_new_type): Only warn if -pedantic. - -Wed Apr 24 15:41:15 1996 Bob Manson - - * class.c (finish_struct_1): Remove old code for - dont_allow_type_definitions. - * cp-tree.h: Likewise. - * spew.c: Make sure cp-tree.h is included before parse.h, so the - definition of flagged_type_tree is found before it is used. - * lex.c: Likewise. - * parse.y: Added the ftype member to the type union, and changed a - number of rules to use it instead of ttype. Added calls to - check_for_new_type() as appropriate. - * typeck2.c (check_for_new_type): New function for checking - if a newly defined type appears in the specified tree. - * cp-tree.h: Add new type flagged_type_tree. Add a prototype - for check_for_new_type(). - -Wed Apr 24 00:36:21 1996 Jason Merrill - - * decl2.c (finish_file): Only use a sentry if the decl is public. - - * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer, - don't pass LOOKUP_ONLYCONVERTING. - -Tue Apr 23 17:18:47 1996 Bob Manson - - * typeck.c (common_type): Fix the ARRAY_TYPE case so it - properly keeps track of const and volatile type modifiers. - -Tue Apr 23 10:52:56 1996 Jason Merrill - - * tree.c (cp_tree_equal): C++ version of simple_cst_equal. - * pt.c (comp_template_args): Use it. - - * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call - assemble_external for artificial function decls. - - * decl.c (cp_finish_decl): Oops. - -Mon Apr 22 17:28:27 1996 Jason Merrill - - * decl2.c (import_export_decl): Put static data member templates - into common storage, or make them weak, depending on whether they - are dynamically or statically initialized. - (get_sentry): New function. - (finish_file): Do import_export_decl for static data members before - building the init/fini functions. Don't init/fini a variable that's - EXTERNAL. Use a sentry for variables in common. Fix mismatching - push/pop_temp_slots. - * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the - expand_static_init thang. - * method.c (get_id_2): New function. - -Mon Apr 22 15:32:45 1996 Bob Manson - - * parse.y (empty_parms): Make sure we use C++-style prototypes - when we're declaring member functions. - -Sun Apr 21 10:08:22 1996 Jason Merrill - - * Makefile.in (CONFLICTS): 16 s/r conflicts. - * parse.y (self_template_type): New nonterminal. - -Thu Apr 18 08:56:54 1996 Jason Merrill - - * decl.c (make_typename_type): Handle getting a TYPE_DECL for a - name. - * parse.y (base_class.1): Allow 'typename foo::bar'. - - * lex.c (check_newline): Remove #pragma code that plays with the - input stream, since we now deal with tokens. Clear nextchar when - we're done. - (handle_cp_pragma): Use real_yylex. - (handle_sysv_pragma): Don't do skipline here. Only call real_yylex - in one place. - - * lex.c (check_for_missing_semicolon): Handle SELFNAME. - - * lex.c (handle_cp_pragma): Fix "#pragma implementation". - -Wed Apr 17 16:51:33 1996 Jason Merrill - - * parse.y: New token SELFNAME for potential constructor. - * spew.c (yylex): Handle it. - * lex.c (identifier_type): Produce it. - - * parse.y (complete_type_name): In :: case, don't push class binding. - (complex_type_name): Likewise. - -Wed Apr 17 15:02:40 1996 Mike Stump - - * typeck.c (build_reinterpret_cast): Handle pointer to member - functions. - -Wed Apr 17 12:28:26 1996 Brendan Kehoe - - * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus - pragmas. - (check_newline): Put the vtable/unit/implementation/interface pragma - code into handle_cp_pragma, replacing it with a call. - (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN - args. Get the next token after handling the pragma token. - -Wed Apr 17 10:28:34 1996 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs. - (convert_to_pointer_force): Likewise. - - * init.c (build_new): Fix array new without -fcheck-new. - -Tue Apr 16 13:44:58 1996 Jason Merrill - - * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c, - tree.c: Lose TYPE_NESTED_NAME. - - * parse.y (nested_name_specifier_1): Don't treat non-identifiers - as identifiers. - - * tree.def: Add VEC_INIT_EXPR. - * expr.c (cplus_expand_expr): Handle it. - * init.c (build_new): Use it instead of the RTL_EXPR nastiness and - the extra file-scope symbol nastiness. - -Mon Apr 15 16:21:29 1996 Jason Merrill - - * method.c (make_thunk): Thunks are static. - (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined. - - * decl2.c (mark_vtable_entries): Emit thunks as needed. - (finish_file): Don't emit them here. - -Sun Apr 14 11:34:39 1996 Jason Merrill - - * rtti.c (build_dynamic_cast): Handle null pointers. - (ifnonnull): New function. - -Fri Apr 12 09:08:27 1996 Bob Manson - - * call.c (build_method_call): Remember the original basetype we - were called with. Give an error message instead of trying - (incorrectly) to call a non-static member function through a - non-inherited class. - - * search.c (expand_upcast_fixups): Mark the new fixup as - DECL_ARTIFICIAL. - -Thu Apr 11 03:57:09 1996 Jason Merrill - - * init.c (build_new): Use a TARGET_EXPR for alloc_expr. - - * class.c (set_rtti_entry): Fix for thunks. - - * decl2.c (import_export_decl): Still emit typeinfo fns for - cv-variants of builtin types. - - * rtti.c (expand_class_desc): Set up base_info_type_node here. - (init_rtti_processing): Instead of here. - -Wed Apr 10 14:17:13 1996 Jason Merrill - - * rtti.c (init_rtti_processing): Do init regardless of -frtti. - (build_typeid): Only complain about taking dynamic typeid without - -frtti. - - * decl2.c: flag_rtti defaults to 1. - - * rtti.c (get_tinfo_var): The general class case is now smaller. - (init_rtti_processing): Pack the latter three fields of base_info - into 32 bits. - -Wed Apr 10 13:50:14 1996 Mike Stump - - * init.c (expand_member_init): Don't dump if name is NULL_TREE. - -Wed Apr 10 12:56:02 1996 Mike Stump - - * search.c (make_memoized_table_entry): Undefer the pop, if necessary. - (push_memoized_context): Split out code to undefer pop_type_level to - (clear_memoized_cache): here. - (pop_memoized_context): We can only handle one layer of deferral of - pop_type_level so clear the cache, if there was a previous level. - -Tue Apr 9 23:06:09 1996 Jason Merrill - - * rtti.c (init_rtti_processing): Build up base_info_type_node. - (expand_class_desc): Use one pointer to an array of base_info - structs, passed using a CONSTRUCTOR. - -Tue Apr 9 14:20:57 1996 Mike Stump - - * class.c (build_vbase_path): Remove block extern for - flag_assume_nonnull_objects here. - (build_vfn_ref): Split out functionality into build_vtbl_ref. - (build_vtbl_ref): New routine. - (build_vtable): Set up rtti info here. - (add_virtual_function): Note in CLASSTYPE_RTTI the best - place where we can get the rtti pointers from to avoid having to - search around for a place. - (finish_base_struct): Likewise. - (finish_struct_1): Likewise. Never create totally new vtables - with totally new vtable pointers for rtti. Disable code to layout - vtable pointers better until we want to break binary - compatibility. - * rtti.c (build_headof_sub): New routine to convert down to a - sub-object that has an rtti pointer in the vtable. - (build_headof): Use it. Also, use build_vtbl_ref now to be more - maintainable. - (build_dynamic_cast): Make sure we have saved it, if we need to. - * search.c (dfs_init_vbase_pointers): Disable code that deals with - a more efficient vtable layout, enable later. - * call.c (flag_assume_nonnull_objects): Moved declaration to - * cp-tree.h: here. Declare build_vtbl_ref. - * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in - function calls that want a tree. - -Tue Apr 9 12:10:26 1996 Jason Merrill - - * rtti.c (build_dynamic_cast): Handle downcasting to X* given - other X subobjects in the most derived type. Ack. - - * rtti.c (build_dynamic_cast): No need to strip cv-quals here, - get_typeid will do it for us. - (get_typeid_1): Break out call-building for expand_*_desc to use. - (get_typeid): Call it. - (expand_*_desc): Likewise. - * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char * - and void *. - (init_decl_processing): Lose builtin_type_tdescs lossage. - * decl2.c (finish_vtable_vardecl): Remove obsolete code. - -Mon Apr 8 17:23:23 1996 Bob Manson - - * pt.c (tsubst): When calling set_nested_typename, use - TYPE_NESTED_NAME (current_class_type) instead of - current_class_name. - - * decl.c (pushdecl): Likewise. - (pushdecl_class_level): Likewise. - (grokdeclarator): Use NULL_TREE instead of 0 in the call to - set_nested_typename. - -Sun Apr 7 10:44:31 1996 Jason Merrill - - * rtti.c (synthesize_tinfo_fn): Handle arrays. - - * cp-tree.h (DECL_REALLY_EXTERN): New macro. - -Sat Apr 6 13:56:27 1996 Jason Merrill - - * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast. - (init_rtti_processing): Lose bad_cast_type. - (build_dynamic_cast): Use throw_bad_cast. - - * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs. - - * decl2.c (finish_file): Don't synthesize artificial functions - that are external and not inline. - - * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl. - - * decl2.c (finish_file): Handle having new inlines added to - saved_inlines by synthesis. - - * rtti.c (get_bad_cast_node): Don't require . - -Fri Apr 5 17:02:09 1996 Jason Merrill - - RTTI rewrite to initialize nodes as needed, not require that - users #include , complete functionality and reduce wasted - space. - * rtti.c (init_rtti_processing): New fn. - (build_typeid): The vtable entry is now a function. - (get_tinfo_var): New fn. - (get_tinfo_fn): Likewise. - (get_typeid): Use it. - (build_dynamic_cast): Declare and use entry point __dynamic_cast. - (build_*_desc): Rename to expand_*_desc and rewrite to use entry - points __rtti_*. - (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose. - (synthesize_tinfo_fn): New fn. - * method.c (build_t_desc_overload): Lose. - (build_overload_with_type): More generic. - * decl.c (init_decl_processing): Call init_rtti_processing. - * class.c (set_rtti_entry): Use get_tinfo_fn. - * decl2.c (mark_vtable_entries): Mark the rtti function. - (finish_prevtable_vardecl): Don't build_t_desc. - (import_export_decl): Handle tinfo functions. - (finish_file): Likewise. - * typeck.c (inline_conversion): New fn. - (build_function_call_real): Use it. - * cp-tree.h: Add decls. - - * method.c (hack_identifier): Also convert component_refs from - references. - - * lex.c (cons_up_default_function): Use the type, not the name, in - declspecs. - - * decl2.c (import_export_vtable): Fix weak vtables. - -Fri Apr 5 13:30:17 1996 Bob Manson - - * search.c (get_base_distance_recursive): Fix access checks for - protected bases. - -Fri Apr 5 11:02:06 1996 Brendan Kehoe - - * call.c (unary_complex_lvalue): Delete unneeded decl, it's in - cp-tree.h. - (convert_harshness): Add prototypes wrapped by PROTO. - * decl2.c (grok_function_init): Likewise. - (do_toplevel_using_decl): Change to void return type. - * class.c (build_vtable_entry): Remove decl of make_thunk. - (merge_overrides): Fix order of arg definitions. - (finish_vtbls): Likewise. - (fixup_vtable_deltas): Likewise. - (modify_all_direct_vtables): Likewise. - (modify_all_indirect_vtables): Likewise. - * search.c (get_base_distance_recursive): Likewise. - (get_abstract_virtuals_1): Likewise. - (fixup_virtual_upcast_offsets): Likewise. - (lookup_fnfields_1): Add prototypes wrapped by PROTO. - * init.c (perform_member_init): Fix order of arg definitions. - (expand_aggr_init_1): Add prototypes wrapped by PROTO. - * cp-tree.h (make_thunk): Add decl. - (overload_template_name, push_template_decl): Add decls. - (do_toplevel_using_decl): Change to void return type. - (vec_binfo_member): Add decl. - -Thu Apr 4 13:33:10 1996 Brendan Kehoe - - * typeck.c (mark_addressable, convert_for_assignment, - convert_for_initialization, pointer_int_sum, pointer_diff, - unary_complex_lvalue): Add prototypes wrapped by PROTO. - (convert_sequence): #if 0 fn decl, since definition also is. - -Thu Apr 4 11:00:53 1996 Mike Stump - - * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on - cast to pointer types for type searching. - -Wed Apr 3 17:10:57 1996 Brendan Kehoe - - * typeck.c (get_delta_difference): Use cp_error, not error, in the - case where BINFO == 0. - -Wed Apr 3 12:01:02 1996 Mike Stump - - * call.c (build_method_call): Fix wording of error messages so - constructors come out right. - -Tue Apr 2 16:06:59 1996 Bob Manson - - * decl.c (push_overloaded_decl): Don't warn about hidden - constructors when both the type and the function are declared - in a system header file. - -Mon Apr 1 09:03:13 1996 Bob Manson - - * class.c (finish_struct_1): Propagate the TYPE_PACKED - flag for the type to the type's fields. - -Sat Mar 30 12:14:33 1996 Brendan Kehoe - - * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning. - -Fri Mar 29 15:51:36 1996 Bob Manson - - * class.c (base_info, finish_base_struct): Replace - needs_virtual_dtor with base_has_virtual. - - (finish_struct_1): Remove the old code that tried to make default - destructors virtual. Use base_has_virtual when checking if we need - to add a vtable entry for the rtti code. - -Fri Mar 29 14:02:36 1996 Jason Merrill - - * pt.c (push_template_decl): Complain about template decl with - inappropriate declaration. - -Fri Mar 29 12:15:35 1996 Bob Manson - - * typeck.c (build_x_unary_op): Remove bogus check for taking - the address of a member function. - -Fri Mar 29 11:56:02 1996 Jason Merrill - - * parse.y (constructor_declarator): Only push the class if - we are not already in the class. - -Fri Mar 29 09:41:02 1996 Jeffrey A. Law - - * method.c (emit_thunk): Remove current_call_is_indirect nonsense. - Add additional argument to INIT_CUMULATIVE_ARGS. - -Thu Mar 28 16:41:39 1996 Jason Merrill - - * decl.c (shadow_tag): Fix error about anon union with methods. - - * parse.y (self_reference): Only generate a self-reference if this - is a non-template class. - (opt.component_decl_list): Only use it if it was generated. - - * parse.y (component_decl_1): Use constructor_declarator. - (fn.def2): Likewise. - (notype_component_declarator0): Likewise. - -Thu Mar 28 15:11:35 1996 Bob Manson - - * typeck.c (build_x_unary_op): Add checks for taking the address - of a TARGET_EXPR or of a member function, and give appropriate - warnings. - -Thu Mar 28 14:49:26 1996 Jason Merrill - - * pt.c (process_template_parm): Allow template type parms to be - used as types for template const parms. - -Wed Mar 27 15:51:19 1996 Mike Stump - - * init.c (expand_vec_init): Ensure the eh cleanups are on the - function_obstack. - -Wed Mar 27 10:14:30 1996 Jason Merrill - - * decl.c (lookup_name_real): Be even more picky about the - ambiguous lookup warning. - (grokdeclarator): Tweak SCOPE_REF constructor declarators here. - * parse.y (constructor_declarator): Rather than here. - - * parse.y (constructor_declarator): New nonterminal. - (fn.def1): Use it. - (explicit_instantiation): Likewise. - -Tue Mar 26 13:41:33 1996 Jason Merrill - - Add implicit declaration of class name at class scope. - * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup. - * parse.y (self_reference): New nonterminal. - (opt.component_decl_list): Use it. - (fn.def1): Add nested_name_specifier type_name cases. - * class.c (build_self_reference): New function. - (finish_struct): Handle access_default later, move self-reference - decl to the end. - * pt.c (lookup_template_class): Handle getting a TYPE_DECL. - * cp-tree.h: Adjust. - - * pt.c (do_function_instantiation): Separate handling of member - functions and non-member functions properly. - -Mon Mar 25 14:23:22 1996 Jason Merrill - - * pt.c (process_template_parm): Improve error for 'volatile class K'. - - * class.c (finish_struct_1): Check the right slot for destructors. - - * decl.c (start_enum): Complain about enum templates. - -Mon Mar 25 13:25:31 1996 Mike Stump - - * init.c (resolve_offset_ref): Offset pointers to member data by one. - * typeck.c (unary_complex_lvalue): Likewise. - -Mon Mar 25 13:30:42 1996 Bob Manson - - * typeck.c (c_expand_return): Check for a returned local - array name, similar to the check for an ADDR_EXPR. - -Mon Mar 25 13:07:19 1996 Jason Merrill - - * decl.c (cp_finish_decl): Don't build cleanups for static - variables here. - -Fri Mar 22 17:57:55 1996 Mike Stump - - * typeck.c (build_modify_expr): Fix error messages to be more - accurate. - * cp-tree.h (assop_as_string): Parallel to op_as_string, but for - assignment operators. - * error.c (assop_as_string): Likewise. Add support for `%Q' for - assignment operators. - -Fri Mar 22 13:48:29 1996 Jason Merrill - - * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also - give an error if initialized. pedwarn about nested type with the - same name as its enclosing class. - - * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT. - - * typeck.c (require_complete_type): Be sure to instantiate the - MAIN_VARIANT of the type. - - * decl2.c (finish_file): Instantiate pending templates before - processing static constructors and destructors. - - * pt.c (instantiate_decl): Don't instantiate functions at toplevel - unless at_eof. - -Fri Mar 22 09:30:17 1996 Bob Manson - - * decl2.c (delete_sanity): If error_mark_node is passed - in as an expression, quit while we're ahead. - - * decl.c (grokdeclarator): Give an error message if `friend' - is combined with any storage class specifiers. - -Wed Mar 20 14:51:55 1996 Jason Merrill - - * parse.y (named_complex_class_head_sans_basetype): Don't crash on - definition of nonexistent nested type. - - * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or - not to say 'typedef'. - -Wed Mar 20 00:11:47 1996 Brendan Kehoe - - * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*. - * search.c (dfs_walk, dfs_init_vbase_pointers, - expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT. - (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init. - -Tue Mar 19 17:56:03 1996 Jason Merrill - - * except.c (build_throw): Support minimal parse. - * pt.c (tsubst_copy): Support THROW_EXPR. - * decl2.c (build_expr_from_tree): Likewise. - - * pt.c (mangle_class_name_for_template): Always allocate - scratch_firstobj. - -Tue Mar 19 16:34:31 1996 Bob Manson - - * cvt.c (cp_convert_to_pointer): Give an appropriate error - when trying to cast from an incomplete type. - -Tue Mar 19 16:00:33 1996 Jason Merrill - - * pt.c (instantiate_class_template): Don't bother setting up - CLASSTYPE_TAGS explicitly, as the nested types will add - themselves. - -Tue Mar 19 15:48:43 1996 Bob Manson - - * decl.c (shadow_tag): Remove old error check for usage of - an enum without a previous declaration. - (xref_tag): Add error message about usage of enums without a - previous declaration. - -Tue Mar 19 09:21:35 1996 Jason Merrill - - * lex.c (do_identifier): Only do name consistency check if we're - parsing. - - * pt.c (push_template_decl): Don't crash if we get a member defn - that doesn't match. - - * decl.c (xref_tag_from_type): New function to do an xref without - always having to figure out code_type_node. - * cp-tree.h: Declare it. - * pt.c (instantiate_class_template): Use it for friend classes. - (lookup_template_class): Use it. - - * typeck2.c (build_functional_cast): Pull out a single parm before - passing it to build_c_cast. - -Tue Mar 19 09:07:15 1996 Bob Manson - - * expr.c (do_case): Give an error message if a pointer is - given as a case value. - -Mon Mar 18 21:57:54 1996 Jason Merrill - - * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of - an overload list. - - * lex.c (cons_up_default_function): Really, now, interface hackery - does not apply to synthesized methods. - -Mon Mar 18 18:20:57 1996 Mike Stump - - * call.c (build_method_call): Ctors and dtors now have special names - with respect to lookups. - * class.c (add_method): Likewise. - (grow_method): Likewise. - (finish_struct_methods): Likewise. - (warn_hidden): Likewise. - (finish_struct_1): Likewise. - * cvt.c (convert_to_reference): Likewise. - (convert_to_aggr): Likewise. - (cp_convert): Likewise. - * decl2.c (check_classfn): Likewise. - * init.c (expand_member_init): Likewise. - (expand_default_init): Likewise. - (expand_aggr_init_1): Likewise. - (build_offset_ref): Likewise. - (build_new): Likewise. - (build_delete): Likewise. - * lex.c (do_inline_function_hair): Likewise. - * search.c (lookup_field_1): Likewise. - (lookup_fnfields_here): Likewise. - (lookup_field): Likewise. - (lookup_fnfields): Likewise. - (get_virtual_destructor): Likewise. - (dfs_debug_mark): Likewise. - (dfs_pushdecls): Likewise. - (dfs_compress_decls): Likewise. - * tree.c (layout_basetypes): Likewise. - * typeck.c (build_component_ref): Likewise. - (build_x_function_call): Likewise. - (build_modify_expr): Likewise. - (convert_for_initialization): Likewise. - (build_functional_cast): Likewise. - * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise. - (CTOR_NAME): New. - (DTOR_NAME): New. - * decl.c (ctor_identifier): New. - (dtor_identifier): New. - (init_decl_processing): Set them. - -Mon Mar 18 18:00:51 1996 Mike Stump - - * typeck.c (build_component_ref): Don't get confused by fields whose - context has no type name, like pointer to member functions. - -Mon Mar 18 13:19:03 1996 Jason Merrill - - * decl.c (grokdeclarator): Handle typedef without declarator. - - * pt.c (tsubst): Handle SCOPE_REF in declarator. - - * parse.y (bad_parm): Catch another case of missing `typename'. - - * lex.c (yyprint): Handle TYPE_DECLs. - - * decl.c (start_function): Don't try to be clever. - - * lex.c: Lose compiler_error_with_decl. - * typeck2.c: Lose error_with_aggr_type. - (incomplete_type_error): Use cp_* instead of old functions. - (readonly_error): Likewise. - * typeck.c (convert_arguments): Likewise. - * search.c (lookup_nested_field): Likewise. - * method.c (make_thunk): Likewise. - * decl.c (grokparms): Likewise. - * cp-tree.h: Update. - - * tree.c (min_tree_cons): Call copy_to_permanent for the purpose - and value. - -Mon Mar 18 11:25:52 1996 Bob Manson - - * method.c (build_opfncall): When deleting a pointer to an - array, build a new pointer to the tree past any ARRAY_TYPE - nodes. - -Mon Mar 18 10:11:46 1996 Brendan Kehoe - - * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE. - -Fri Mar 15 11:03:57 1996 Jason Merrill - - * pt.c (instantiate_decl): Only call import_export_decl if at_eof - and ! DECL_INLINE. - - * decl.c (finish_function): Don't set nested based on - hack_decl_function_context. - * parse.y (function_try_block): Check for nested function. - (pending_inlines): Likewise. - - * decl2.c (build_expr_from_tree): If a unary op already has a - type, just return it. - - * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE. - - * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does. - (finish_file): Check the return value of walk_vtables. - (finish_prevtable_vardecl): Return int. - (finish_vtable_vardecl): Likewise. - (prune_vtable_vardecl): Likewise. - * lex.c (set_vardecl_interface_info): Likewise. - * cp-tree.h: Adjust return types. - - * class.c (delete_duplicate_fields_1): Don't complain about - duplicate nested types if they're the same type. - (finish_struct): Remove check for duplicate. - * decl2.c (grokfield): Don't check for typedef of anonymous type. - -Thu Mar 14 10:00:19 1996 Jason Merrill - - * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF. - - * decl.c (grokdeclarator): Lose special handling of class-level - typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set - SIGNATURE_HAS_OPAQUE_TYPEDECLS later. - - * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion. - - * pt.c (tsubst_copy): Strip cv-quals from destructor name types. - - * search.c (compute_access): Fix handling of anonymous union - members. - * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED} - from anonymous unions to their members. - - * typeck.c (build_x_function_call): For static member functions, - hand off to build_member_call. - -Wed Mar 13 14:03:34 1996 Jason Merrill - - * typeck.c (build_component_ref): Handle OFFSET_REFs. - - * init.c (expand_vec_init): Fix init == 0 case. - -Tue Mar 12 14:36:02 1996 Jason Merrill - - * init.c (build_new): pedwarn about init and array new. - (expand_vec_init): Handle lists, use convert_for_initialization. - - * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION - when converting to an aggregate type. - * cvt.c (cp_convert): Pass it through. - - * typeck.c (build_conditional_expr): Handle user-defined - conversions to slightly different types. - - * decl.c (grokdeclarator): Force an array type in a parm to be - permanent. - - * decl2.c (do_using_directive): Sorry. - (do_namespace_alias): Likewise. - * lex.c (real_yylex): Warn about using the `namespace' keyword. - -Sun Mar 10 22:26:09 1996 Jason Merrill - - * parse.y (datadef): Move call to note_list_got_semicolon up. - -Fri Mar 8 11:47:26 1996 Mike Stump - - * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs. - -Fri Mar 8 11:29:06 1996 Mike Stump - - * decl.c (cp_finish_decl): The exception regions have to be - nested, not overlapping. We start the exception region for a - decl, after it has been fully built, and all temporaries for it - have been cleaned up. - -Thu Mar 7 17:46:06 1996 Mike Stump - - * tree.c (vec_binfo_member): Don't core dump if we have no bases. - -Thu Mar 7 14:11:49 1996 Jason Merrill - - * tree.def: Add RETURN_INIT. - * pt.c (instantiate_decl): Handle RETURN_INIT. - * decl.c (store_return_init): Handle minimal_parse_mode. - - * tree.c (cp_build_type_variant): Just return an error_mark_node. - * decl.c (make_typename_type): Don't try to get the file and line - of an identifier. - * typeck.c (comptypes): Handle TYPENAME_TYPE. - -Wed Mar 6 18:47:50 1996 Per Bothner - - * decl.c (poplevel): Make sure we clear out and restore old local - non-VAR_DECL values by default when they go out of scope. - -Wed Mar 6 09:57:36 1996 Jason Merrill - - * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in - referring to addresses of variables and functions. - - * error.c (dump_expr): Support SIZEOF_EXPR. - - * init.c (do_friend): Use the return value of check_classfn. - - * typeck.c (convert_arguments): Call complete_type. - - * method.c (hack_identifier): After giving an error, set value to - error_mark_node. - -Tue Mar 5 16:00:15 1996 Jason Merrill - - * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT - lossage for local classes. - * cp-tree.h: Declare it. - * decl.c (lookup_name_real): Evil, painful hack for local classes. - (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here. - Use hack_decl_function_context. - (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here. - (start_function): Use hack_decl_function_context. - (finish_function): Likewise. - * method.c (synthesize_method): Likewise. - * lex.c (process_next_inline): Likewise. - (do_pending_inlines): Likewise. - * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're - done with it. - -Mon Mar 4 22:38:39 1996 Gerald Baumgartner - - * sig.c (build_signature_pointer_or_reference_type): Align - signature pointers/references on 8-byte boundaries so they can be - grabbed 2 words at a time on a SPARC. - -Tue Mar 5 10:21:01 1996 Jason Merrill - - * method.c (hack_identifier): Requiring a static chain is now a - hard error. - * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested - functions. - -Mon Mar 4 20:03:33 1996 Jason Merrill - - * init.c (build_offset_ref): Call complete_type. - - * decl.c (pop_from_top_level): Always pop previous_class_type. - - * parse.y: Handle multiple decls in a for-init-statement. - * pt.c (tsubst_expr): Likewise. - - * pt.c (tsubst): Use tsubst_expr for the second operand of an - ARRAY_REF. - - * decl.c (maybe_push_to_top_level): Don't save previous_class_type. - (poplevel_class): Set it here. - (pop_from_top_level): Pop it here if we're returning to class scope. - * class.c (pushclass): Don't set it here. - - * decl.c (maybe_push_to_top_level): Save current_template_parms, - and clear it if !pseudo. - (pop_from_top_level): Restore it. - - * decl2.c (finish_file): Push the dummy each time we walk the list - of vtables. - - * error.c (dump_expr): Support LOOKUP_EXPR and actually do - something for CAST_EXPR. - -Mon Feb 19 14:49:18 1996 Rusty Russell - - * cvt.c (cp_convert): Warn about implicit conversion of the - address of a function to bool, as it is always true. - -Fri Feb 23 23:06:01 1996 Rusty Russell - - * typeck.c (c_expand_return): Fix warning for local externs returned. - -Mon Mar 4 15:03:11 1996 Jason Merrill - - * tree.c (mapcar): Propagate const and volatile properly. - - * typeck.c (complete_type): Be sure to instantiate the - MAIN_VARIANT of the type. - - * method.c (synthesize_method): Class interface hackery does not - apply to synthesized methods. - -Mon Mar 4 14:05:23 1996 Jason Merrill - - * pt.c (comp_template_args): Use comptypes rather than just - checking for TEMPLATE_TYPE_PARM equivalence. - - * typeck.c (build_x_function_call): Call complete_type before - checking TYPE_OVERLOADS_CALL_EXPR. - -Mon Mar 4 18:48:30 1996 Manfred Hollstein - - * g++.c (main): Check also for new define ALT_LIBM. - -Fri Mar 1 13:09:33 1996 Jason Merrill - - * pt.c (instantiate_class_template): If we don't have a pattern - yet, that's OK. - (coerce_template_parms): If we see a local class, bail. - - * decl.c (grok_reference_init): Make sure there's a type before - checking its code. - - * pt.c (do_function_instantiation): Avoid crashing on invalid decls. - (push_template_decl): Likewise. - - * parse.y (named_class_head): Set - CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes. - - * decl.c (xref_tag): Diagnose redeclaration of template - type-parameter name. - - * error.c (dump_type): Handle anonymous template type parms. - - * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of - TYPE_STUB_DECL. - (coerce_template_parms): Likewise. - -Thu Feb 29 16:26:01 1996 Mike Stump - - * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF, - case ADDR_EXPR): Don't modify rhs if a subinstantiation fails. - -Thu Feb 29 08:20:25 1996 Jason Merrill - - * pt.c (instantiate_template): Take the MAIN_VARIANT of the type - before trying to get its STUB_DECL. - (coerce_template_parms): Likewise. - - * parse.y (template_type_parm): If they didn't use 'class', - pretend they did after giving an error. - - * pt.c (coerce_template_parms): Diagnose use of local class. - - * decl.c (grok_reference_init): Use instantiate_type. - - * error.c (dump_expr): Handle TEMPLATE_DECLs. - - * parse.y (named_class_head): Diagnose mismatching types and tags. - - * decl.c (pushdecl): Type decls and class templates clash with - artificial type decls, not hide them. - - * decl.c (redeclaration_error_message): Diagnose redefinition of - templates properly. - (duplicate_decls): Diagnose disallowed overloads for template - functions, too. - - * decl.c (start_decl): Call complete_type before checking for a - destructor. - - * pt.c (tsubst): Use tsubst_expr on the elts of a VEC. - - * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match. - -Wed Feb 28 09:28:44 1996 Jason Merrill - - * decl.c (grok_op_properties): Don't check for operator++(int) in - a template. - - * tree.c (perm_manip): Return a copy of variable and function - decls with external linkage. - - * tree.def: Change some of the min tree codes to type "1". - * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs. - * method.c (build_overload_int): Emit something arbitrary for - anything but an INTEGER_CST if we're in a template. - - * decl.c (cp_finish_decl): Call complete_type before deciding - whether or not to lay out the decl. - - * lex.c (do_identifier): Check for DECL_INITIAL before using it. - -Tue Feb 27 16:35:32 1996 Jason Merrill - - * typeck2.c (build_x_arrow): Call complete_type. - - * pt.c (add_pending_template): Broken out. - (lookup_template_class): If -fexternal-templates, call it for all - the methods of implemented types. - (instantiate_class_template): Instead of instantiating them here. - (instantiate_decl): Handle -fexternal-templates earlier. - -Tue Feb 27 15:51:32 1996 Brendan Kehoe - - * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the - memoized lookup stuff inside GATHER_STATISTICS. - -Tue Feb 27 10:38:08 1996 Jason Merrill - - * decl.c (start_decl): Complain about array of incomplete type - here. - (grokdeclarator): Not here. - - * parse.y (template_parm): Expand full_parm inline so we can set - the rule's precedence. - - * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy. - (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs. - * decl2.c (grokbitfield): Don't check for integer constant here. - * class.c (finish_struct_1): Check here. - - * decl.c (define_label): Make the min decl go on permanent_obstack. - - * pt.c (unify): Don't handle CONST_DECLs. - (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL. - (tsubst_copy): Likewise. - - * lex.c (do_identifier): Do pull the DECL_INITIAL out of a - CONST_DECL for a template parm. - -Mon Feb 26 12:48:18 1996 Jason Merrill - - * decl.c (grokdeclarator): Complain about array of incomplete type - here. - (start_decl_1): Not here. - - * pt.c (tsubst): Handle pointer-to-function declarators. - - * method.c (hack_identifier): If pedantic, diagnose local class - methods that require a static chain. - - * decl.c (grok_op_properties): No longer static. - * cp-tree.h: Declare it. - * pt.c (tsubst): Call it for operators. - Use tsubst_copy for TREE_VECs. - - * parse.y (template_arg): The expr has precedence like '>'. - -Fri Feb 23 14:51:52 1996 Jason Merrill - - * pt.c (coerce_template_parms): Don't coerce an expression using - template parms. - (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs. - (tsubst): Don't use build_index_2_type if the max_value uses template - parms. - * method.c (build_overload_int): Emit something arbitrary for an - expression using template parms. - - * parse.y (template_close_bracket): New non-terminal to catch use - of '>>' instead of '> >' in template class names. - (template_type): Use it. - * Makefile.in (CONFLICTS): Causes one more r/r conflict. - - * tree.def: Add CAST_EXPR. - * typeck2.c (build_functional_cast): Use CAST_EXPR instead of - CONVERT_EXPR for minimal_parse_mode. - * typeck.c (build_c_cast): Likewise. - * pt.c (tsubst_copy): Likewise. - * decl2.c (build_expr_from_tree): Likewise. - * error.c (dump_expr): Likewise. - -Fri Feb 23 10:36:46 1996 Brendan Kehoe - - * except.c (SetTerminate, SetUnexpected): Put back global vars. - (init_exception_processing): Put back decl/init of - set_unexpected_fndecl and set_terminate_fndecl, needed to get the - fns from libstdc++. - - * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield. - (declare_uninstantiated_type_level, uninstantiated_type_level_p): - Delete unused fns. - * cp-tree.h (declare_uninstantiated_type_level, - uninstantiated_type_level_p): Delete prototypes. - -Thu Feb 22 19:36:15 1996 Jason Merrill - - * pt.c (tsubst_expr): Add default return. - -Thu Feb 22 16:47:24 1996 Brendan Kehoe - - * error.c (fndecl_as_string): Delete unused arg CNAME. - * sig.c (build_signature_table_constructor, - build_signature_method_call): Fix calls. - - * class.c (the_null_vtable_entry): Delete var definition. - (init_class_processing): Delete tree the_null_vtable_entry init. - * decl.c (no_print_{functions, builtins}): Declare as static. - (__tp_desc_type_node): #if 0 var definition. - (init_type_desc): #if 0 init of __tp_desc_type_node. - (vb_off_identifier): Move var decl into init_decl_processing. - (current_function_assigns_this): Declare as static. - (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls. - (init_decl_processing): Delete init of void_ftype_ptr_ptr_int. - Move decls of string_ftype_ptr_ptr and int_ftype_string_string here. - * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE. - * init.c (BI_header_type, BI_header_size): Declare as static. - * pt.c (template_classes): Delete unused var. - (add_pending_template): Delete decl for non-existent fn. - (lookup_template_class): Delete vars CODE and TAG_CODE. - (instantiate_template): Delete unused var TARGS. - * cp-tree.h (vb_off_identifier, current_function_assigns_this): - Delete decls. - (__tp_desc_type_node): #if 0 var decl. - (fndecl_as_string): Fix prototype. - -Thu Feb 22 15:56:19 1996 Jason Merrill - - * tree.def: Add GOTO_STMT. - * pt.c (tsubst_expr): Support goto and labels. - * decl.c (define_label): Support minimal parsing. - * parse.y (simple_stmt): Likewise. - -Thu Feb 22 15:30:12 1996 Brendan Kehoe - - * xref.c (GNU_xref_member): Only define/set var I if - XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually - used. - (GNU_xref_end_scope): Delete unused fifth arg TRNS. - (GNU_xref_end): Fix call. - * decl.c (poplevel, poplevel_class, finish_method): Fix calls. - * cp-tree.h (GNU_xref_end_scope): Fix prototype. - - * tree.c (build_exception_variant): Delete unused vars I, A, T, - T2, and CNAME. - (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE. - (mapcar): Delete unused var CODE. - (build_cplus_new): Delete unused arg WITH_CLEANUP_P. - (break_out_cleanups): Fix call. - (bot_manip): Likewise. - * call.c (build_method_call): Likewise. - * cvt.c (build_up_reference, convert_to_reference, cp_convert): - Likewise. - * typeck.c (unary_complex_lvalue, build_modify_expr, - convert_for_initialization): Likewise. - * typeck2.c (build_functional_cast): Likewise. - * cp-tree.h (build_cplus_new): Fix prototype. - - * repo.c (open_repo_file): Delete unused var Q. - (repo_compile_flags, repo_template_declared, - repo_template_defined, repo_class_defined, repo_inline_used, - repo_vtable_used, repo_tinfo_used): #if 0 unused fns. - (repo_get_id, repo_vtable_used): Declare as static. - * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add - prototypes. - -Thu Feb 22 14:53:35 1996 Jason Merrill - - * parse.y (pending_inlines): Add function_try_block case. - - * pt.c (unify): Fix for template const parms. - -Thu Feb 22 13:24:15 1996 Brendan Kehoe - - * lex.c (extract_interface_info): Delete forward decl. - (default_copy_constructor_body, default_assign_ref_body): Delete - decls for non-existent functions. - (synth_firstobj, inline_text_firstobjs): Delete unused vars. - (init_lex): Delete setting them. - (cons_up_default_function): Delete unused vars FUNC_BUF, - FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old - #if 0'd synth code. - (toplevel, expression_obstack): Delete unused extern decls. - (tree_node_kind): Delete unused enum. - (tree_node_counts, tree_node_sizes): Wrap with #ifdef - GATHER_STATISTICS. - (tree_node_kind_names): Delete unused extern decl. - (synth_obstack): Delete unused var. - (init_lex): Don't set it. - (init_parse): Add decl before use. - (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH. - (current_unit_{name, language}): Delete unused vars. - (check_newline): Don't bother setting them, just accept the #pragma. - * cp-tree.h (init_repo, peek_yylex): Add prototypes. - (current_unit_{name, language}): Delete decls. - - * search.c: Wrap all of the memoized functions, macros, and - variables inside #ifdef GATHER_STATISTICS. - (lookup_field, lookup_fnfields): Likewise. - (init_search_processing): Likewise. - (reinit_search_statistics): Wrap whole function. - * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics. - - * decl.c (finish_function): Only call pop_memoized_context if - GATHER_STATISTICS is defined. - (start_function): Likewise for push_memoized_context. - * class.c (pushclass, popclass): Likewise. - - * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here... - * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here. - - * cvt.c (cp_convert): Delete unused local var FORM. - * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add - prototypes. - -Thu Feb 22 13:19:44 1996 Jason Merrill - - * pt.c (do_poplevel): Oops; really return what we get from - poplevel this time. - -Thu Feb 22 11:41:44 1996 Brendan Kehoe - - * cp-tree.h (is_aggr_type): Add prototype. - - * cp-tree.h ({push,pop}_cp_function_context): Add decls. - * method.c ({push,pop}_cp_function_context): Delete decls. - * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void. - (SetUnexpected, SetTerminate): Delete unused vars. - (init_exception_processing): Don't set SetUnexpected or - SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL. - (output_exception_table_entry): Delete unused array LABEL. - (expand_internal_throw): Delete unused var PARAMS. - (expand_start_catch_block): Delete unused var CLEANUP. - (emit_exception_table): Delete unused var EH_NODE_DECL. - (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and - GOTO_UNWIND_AND_THROW. Don't set them. - (end_eh_unwinder): Add top decl. - (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK. - (exception_section, push_rtl_perm, do_function_call, - lang_interim_eh, push_eh_cleanup, eh_outer_context, - expand_end_eh_spec, end_eh_unwinder): Declare as static. - (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup, - throw_used): Likewise. - * cp-tree.h (expand_end_eh_spec): Delete prototype. - - * search.c (dfs_mark, dfs_mark_vtable_path, - dfs_unmark_vtable_path, dfs_mark_new_vtable, - dfs_unmark_new_vtable, dfs_clear_search_slot, - dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp, - bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp, - bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused - functions. - (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1, - n_calls_lookup_fnfields, n_calls_lookup_fnfields_1, - n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved): - Only define #ifdef GATHER_STATISTICS. - (reinit_search_statistics): Only init some vars if GATHER_STATISTICS - is defined. - (vbase_decl): Delete var definition. - (init_search): Delete old decl. - (init_vbase_pointers): Delete building of VBASE_DECL, since it's - never actually used. - (expand_indirect_vtbls_init): Delete init of VBASE_DECL. - (get_base_distance_recursive): Delete unused fourth arg - BASETYPE_PATH. Fix call . - (get_base_distance): Fix call. - (push_class_decls): Delete unused var ID. - (make_memoized_table_entry): Declare as static. - (breadth_first_search): Declare as static. - (tree_has_any_destructor_p): Declare as static. - (pop_class_decls): Delete unused arg pop_class_decls. - * class.c (popclass): Fix call to pop_class_decls. - * cp-tree.h (make_memoized_table_entry, breadth_first_search, - tree_has_any_destructor_p): Delete prototypes. - - * rtti.c (build_ptmf_desc): Delete unused arg TYPE. - (build_t_desc): Fix call. Delete unused vars ELEMS and TT. - (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL. - (build_user_desc): Delete unused var T. - (build_class_desc): Delete unused vars T and OFF. - (build_t_desc): Delete unused var NAME_STRING. - (build_headof): Make static. - (get_bad_cast_node): Likewise. - (get_def_to_follow): Likewise. - * cp-tree.h (init_type_desc): Add prototype. - (build_headof): Remove prototype. - -Thu Feb 22 00:54:22 1996 Jason Merrill - - * pt.c (tsubst): Only look for matching decls at file scope for - non-member functions. - - * call.c (build_scoped_method_call): Handle scoped destructor - calls in templates. - - * decl.c (*_top_level): Also save previous_class_values. - - * pt.c (tsubst_expr): Support do {} while loops. - * parse.y (simple_stmt): Likewise. - * tree.def: Likewise. - - * method.c (build_overload_identifier): For a class nested in a - template class, don't mangle in the template parms from our - context. - - * lex.c, cp-tree.h: Remove support for template instantiations in - the pending_inlines code. - * pt.c: Remove dead functions and unused arguments. - (uses_template_parms): TYPENAME_TYPEs always use template parms. - * parse.y: Stop passing anything to end_template_decl. - * tree.c (print_lang_statistics): Only print tinst info #ifdef - GATHER_STATISTICS. - -Wed Feb 21 16:57:33 1996 Brendan Kehoe - - * init.c (expand_recursive_init{,_1}): Delete decls. - (sort_member_init): Delete unused var INIT. - (emit_base_init): Delete unused var X. - (build_offset_ref): Delete unused var CNAME. - (sort_member_init): Delete unused var FIELDS_TO_UNMARK. - (emit_base_init): Delete unused local var BASE. Delete extern - decl of IN_CHARGE_IDENTIFIER. - (build_delete): Delete unused local var VIRTUAL_SIZE. - - * init.c (build_vec_delete): Delete unused third arg ELT_SIZE. - (build_delete): Fix call. - * decl2.c (delete_sanity): Likewise. - * cp-tree.h (build_vec_delete): Update prototype. - - * typeck.c (common_base_type): Delete unused var TMP. - (build_binary_op): Delete local var ARGS_SAVE. - (build_array_ref): Delete unused var ITYPE. - (c_expand_return): Delete unused var USE_TEMP. - - * typeck.c (compexcepttypes): Delete unused arg STRICT. - (comptypes): Fix calls. - * decl.c (duplicate_decls): Likewise. - * cp-tree.h (compexcepttypes): Delete extra arg. - - * decl2.c (check_classfn): Delete unused second arg CNAME. - * decl.c (start_decl, grokfndecl): Fix calls. - * init.c (do_friend): Likewise. - * cp-tree.h (check_classfn): Update prototype. - - * cp-tree.h (signature_error, import_export_vtable, - append_signature_fields, id_in_current_class, mark_used, - copy_assignment_arg_p): Add decls. - * decl2.c (mark_used): Delete decl. - - * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS. - - * class.c (get_vtable_entry): Disable unused function. - (doing_hard_virtuals): Delete unused static global var. - (finish_struct_1): Don't init DOING_HARD_VIRTUALS. - (prepare_fresh_vtable): Delete unused vars PATH and RESULT. - (overrides): Delete unused vars RETTYPE and BASE_RETTYPE. - (modify_one_vtable): Delete unused var OLD_RTTI. - (finish_struct_anon): Delete unused vars OFFSET and X. - (finish_struct_bits): Delete unused var METHOD_VEC. - (get_basefndecls): Delete unused var PURPOSE. Delete unused - for-scope local variable METHODS. - - * call.c (user_harshness): Delete unused/unneeded arg PARM. - (ideal_candidate): Delete unused args BASETYPE and PARMS. - (build_method_call): Delete unused args passed into ideal_candidate. - (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME. - * cp-tree.h (synthesize_method): Add decl. - - * decl.c (note_level_for_for): Give void return type. - (pushdecl_nonclass_level): Likewise. - (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS. - (poplevel): Delete unused var IMPLICIT_TRY_BLOCK. - (suspend_binding_level): Delete unused var LEVEL. - (duplicate_decls): Delete unused var CTYPE. - (duplicate_decls): Delete unused var PREVIOUS_C_DECL. - (init_decl_processing): Delete unused vars FLOAT_ENDLINK and - PTR_ENDLINK. - (grokdeclarator): Delete unused var C. - (grokdeclarator): Delete unused var SIZE_VARIES. - (grokparms): Delete unused var SAW_VOID. - (start_function): Delete unused var OLDDECL. - (cplus_expand_expr_stmt): Delete unused var - REMOVE_IMPLICIT_IMMEDIATELY. - - * cp-tree.h (pushdecl_nonclass_level): Fix prototype. - - * Makefile.in (CONFLICTS): Update to 12 shift/reduce. - -Wed Feb 21 00:06:17 1996 Jason Merrill - - * tree.c (build_min): Set TREE_COMPLEXITY to lineno. - (build_min_nt): Likewise. - * pt.c (do_pushlevel): Emit line note. - (do_poplevel): Return what we get from poplevel. - (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes. - * parse.y: Use do_pushlevel and do_poplevel. - * cp-tree.h: Declare do_poplevel. - - * cp-tree.h: Declare at_eof. - * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation. - * decl2.c (import_export_decl): Renamed from import_export_inline. - (finish_file): Call it to do interface handling for statics. - * pt.c (tsubst_copy): Call mark_used on variables and functions - used here. - - * decl2.c (finish_file): Don't emit statics we can't generate. - * pt.c (instantiate_decl): Don't set interface on instantiations - we can't generate. - - * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'. - * tree.c (print_lang_statistics): Print max template depth. - * pt.c (push_tinst_level): Dump entire instantiation context. - (instantiate_class_template): Use it and pop_tinst_level. - (instantiate_decl): Likewise. - - * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c - pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE. - -Tue Feb 20 18:21:51 1996 Jason Merrill - - * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c - init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c - tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for - the new template implementation. - -Tue Feb 20 17:14:29 1996 Brendan Kehoe - - * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS. - -Thu Feb 15 18:44:42 1996 Mike Stump - - * decl.c (cp_finish_decl): Delay emitting the debug information for - a typedef that has been installed as the canonical typedef, if the - type has not yet been defined. - -Thu Feb 15 09:39:08 1996 Jason Merrill - - * decl2.c (grokfield): Still call pop_nested_class for access decls. - -Wed Feb 14 17:30:04 1996 Brendan Kehoe - - * decl.c (lookup_label): Call label_rtx. - - * decl.c (make_binding_level): New function. - (pushlevel, pushlevel_class): Call it instead of explicit - duplicate calls to xmalloc. - - * decl.c (init_decl_processing): Delete useless build_pointer_type - call. - - * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions. - (sizet_ftype_string): Delete variable. - (init_decl_processing): Add built-in functions fabsf, fabsl, - sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local - variable strlen_ftype, used for strlen. - -Wed Feb 14 16:21:25 1996 Jason Merrill - - * decl.c (push_to_top_level): Start from current_binding_level - again for now; the stl hacks depend on g++ being broken in this - way, and it'll be fixed in the template rewrite. - - * tree.def: Add USING_DECL. - * decl2.c (do_class_using_decl): Implement. - (grokfield): Pass access decls off to do_class_using_decl instead of - grokdeclarator. - * error.c (dump_decl): Handle USING_DECLs. - * decl.c (grokdeclarator): Remove code for handling access decls. - * class.c (finish_struct_1): Adjust accordingly, treat using-decls - as access decls for now. - (finish_struct): Don't check USING_DECLs for other uses of the name. - - * search.c (get_matching_virtual): Use cp_error_at. - -Wed Feb 14 10:36:58 1996 Brendan Kehoe - - * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to - match c-typeck.c. - (self_promoting_args_p): Move the check that TYPE is non-nil - before trying to look at its main variant. - (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes. - - * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS): - Delete macros. - * init.c (xref_friend, embrace_waiting_friends): Delete functions. - (do_friend): Delete call to xref_friend. - * class.c (finish_struct_1): Delete call to embrace_waiting_friends. - - * typeck.c (convert_sequence): #if 0 unused function. - - * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to - be in decl_in_memory_p. - (decl_in_memory_p): Delete decl. - * expr.c (decl_in_memory_p): Delete fn. - * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P. - - * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P. - -Tue Feb 13 12:51:21 1996 Jason Merrill - - * class.c (finish_struct_1): Check for a pure-specifier on a - non-virtual function here. - - * decl2.c (grok_function_init): Don't check whether the function - is virtual here. - (grokfield): Don't call check_for_override here. - - * decl.c (push_to_top_level): Start from inner_binding_level, - check class_shadowed in class levels. - -Mon Feb 12 17:46:59 1996 Mike Stump - - * decl.c (resume_level): Ignore things that don't have names, instead - of core dumping. - -Mon Feb 12 15:47:44 1996 Brendan Kehoe - - * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs. - -Sat Feb 10 17:59:45 1996 Jason Merrill - - * class.c (finish_struct_1): Set DECL_VINDEX properly on a - synthesized dtor. - - * parse.y (complete_type_name): Bind global_scope earlier. - (complex_type_name): Likewise. - (qualified_type_name): Remove. - -Thu Feb 8 15:15:14 1996 Jason Merrill - - * decl.c (grokfndecl): Move code that looks for virtuals in base - classes... - * class.c (check_for_override): ... to a new function. - (finish_struct_1): Call it. - - * cp-tree.h: Declare warn_sign_compare. - - * typeck.c (build_binary_op_nodefault): Check warn_sign_compare - rather than extra_warnings to decide whether to warn about - comparison of signed and unsigned. - - * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall - implies -Wsign-compare. -Wall doesn't imply -W. - -Wed Feb 7 15:27:57 1996 Mike Stump - - * typeck.c (build_component_ref): Fix to handle anon unions in base - classes as well. - -Wed Feb 7 14:29:12 1996 Brendan Kehoe - - * class.c (resolves_to_fixed_type_p): Delete code dealing with - a WITH_CLEANUP_EXPR, since we don't generate them any more. - * cvt.c (build_up_reference): Likewise. - * decl.c (grok_reference_init): Likewise. - (cp_finish_decl): Likewise. - * error.c (dump_expr): Likewise. - * tree.c (real_lvalue_p): Likewise. - (lvalue_p): Likewise. - (build_cplus_new): Likewise. - (unsave_expr_now): Likewise. - * typeck.c (unary_complex_lvalue, build_modify_expr, - c_expand_return): Likewise. - -Tue Feb 6 13:39:22 1996 Brendan Kehoe - - Make the C++ front-end pay attention to attributes for structures. - * class.c (finish_struct): New argument ATTRIBUTES, passed down into - finish_struct_1. - (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes. - Take out old round_up_size use and setting the DECL_ALIGN possibly - using it. Take out setting of TYPE_ALIGN to round_up_size, which - can override what the attribute set. - * cp-tree.h (finish_struct): Update prototype. - * parse.y (template_instantiate_once): Pass a NULL_TREE for the - attributes to finish_struct. - (structsp): For a CLASS decl, add maybe_attribute to rule and pass that - value down into finish_struct. - * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts. - -Tue Feb 6 13:12:15 1996 Per Bothner - - * decl.c (poplevel): Re-word dead for local handling. - (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test. - (cp_finish_decl): If is_for_scope, check for duplicates so - we can disable is_for_scope. Otherwise, preserve_temp_slots. - - * lex.c (do_identifier): Use global binding in preference of - dead for local variable. - -Mon Feb 5 17:46:46 1996 Mike Stump - - * init.c (initializing_context): Handle anon union changes, the - context where fields of anon unions can be initialized now has to be - found by walking up the TYPE_CONTEXT chain. - -Fri Feb 2 14:54:04 1996 Doug Evans - - * decl.c (start_decl): #ifdef out code to set DECL_COMMON - if ASM_OUTPUT{,_ALIGNED}_BSS is defined. - (obscure_complex_init): If bss is supported, always set - DECL_INITIAL to error_mark_node. - -Thu Feb 1 16:19:56 1996 Brendan Kehoe - - * init.c (is_friend): Make sure there's a context before we see if - it's an aggr type. - -Thu Feb 1 15:44:53 1996 Mike Stump - - * init.c (is_friend): Classes are not friendly with nested classes. - -Thu Feb 1 15:27:37 1996 Doug Evans - - * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA, - and record its result. - -Thu Feb 1 09:27:01 1996 Mike Stump - - * class.c (finish_struct_anon): Switch around code to not move anon - union elements around, nor mess up their contexts, nor offsets, - instead we now build up the right number of COMPONENT_REFs for all - the anon unions that may be present at build_component_ref time. - * typeck.c (lookup_anon_field): New routine to handle field lookup - on fields without names. We find them, based upon their unique type - instead. - * typeck.c (build_component_ref): Allow FIELD_DECL components. - Handle finding components in anonymous unions, and ensure that a - COMPONENT_REF is built for each level as necessary. - -Tue Jan 30 18:18:23 1996 Mike Stump - - * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after - code that ensures that copy ctors are used if appropriate. - -Tue Jan 30 17:35:14 1996 Brendan Kehoe - - * init.c (build_vec_delete): Only give an error if base isn't an - error_mark_node. - -Mon Jan 29 17:09:06 1996 Mike Stump - - * spew.c (do_aggr): `new struct S;' isn't a forward declaration. - (yylex): If we see `new', keep slurping. - -Thu Jan 25 18:31:36 1996 Mike Stump - - * class.c (finish_struct_1): Move code for handling anon unions... - (finish_struct_anon): to here. Fixup so that we do the offset - calculations right, and so that the fields are physically moved to - the containers's chain. - -Thu Jan 25 18:27:37 1996 Brendan Kehoe - - * decl.c (grokdeclarator): Avoid trying to get an operand off an - identifier node. - -Wed Jan 24 11:25:30 1996 Jim Wilson - - * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not - POINTER_SIZE to agree with expr.c. - -Thu Jan 25 13:01:23 1996 Mike Stump - - * search.c (lookup_field): Don't report ambiguities if protect is 0, - instead return NULL_TREE. - -Wed Jan 24 13:01:26 1996 Mike Stump - - * class.c (finish_struct_1): Call warn_hidden if we want warnings - about overloaded virtual functions. - (warn_hidden): New routine to warn of virtual functions that are - hidden by other virtual functions, that are not overridden. - (get_basefndecls): New routine, used by warn_hidden. - (mark_overriders): New routine, used by warn_hidden. - * search.c (get_matching_virtual): Remove old warning that just - isn't very useful. - -Tue Jan 23 12:26:10 1996 Brendan Kehoe - - * decl.c (output_builtin_tdesc_entries): #if 0 the function definition. - - * typeck.c (null_ptr_cst_p): Delete unused fn. - (build_function_call_maybe): Delete unused fn. - - * expr.c (extract_init): #if 0 the code after unconditional return 0 - for now. - - Delete old cadillac code. - * edsel.c: Remove file. - * Make-lang.in (CXX_SRCS): Take edsel.c off the list. - * Makefile.in (CXX_OBJS): Delete edsel.o. - (edsel.o): Delete rule. - * cp-tree.h (flag_cadillac): Delete var decl. - * lang-options.h: Delete "-fcadillac" and "-fno-cadillac". - * decl2.c (flag_cadillac): Delete var definition. - (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac. - (grokfield): Delete code depending on flag_cadillac. - (finish_anon_union): Likewise. - * class.c (finish_struct_1): Likewise. - (pushclass): Likewise. - (popclass): Likewise. - (push_lang_context): Likewise. - (pop_lang_context): Likewise. - * decl.c (init_decl_processing): Likewise. - (start_decl): Likewise. - (cp_finish_decl): Likewise. - (xref_tag): Likewise. - (finish_enum): Likewise. - (start_function): Likewise. - (finish_function): Likewise. - (finish_stmt): Likewise. - * lex.c (lang_init): Likewise. - (check_newline): Likewise. - - * lex.c (do_pending_inlines): Delete synthesized method kludge. - - Delete defunct, ancient garbage collection implementation. - * rtti.c: New file with the RTTI stuff from gc.c. - * gc.c: Removed file (moved the remaining stuff into rtti.c). - * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o. - (rtti.o): New rule, replacing gc.o. - * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c. - * cp-tree.h: Delete gc-related fn decls. - (DECL_GC_OFFSET): Delete macro. - (flag_gc): Delete extern decl. - * decl.c (current_function_obstack_index): Delete var decl. - (current_function_obstack_usage): Delete var decl. - (start_function): Delete clearing of current_function_obstack_index - and current_function_obstack_usage. - (init_decl_processing): Delete code relying on -fgc. - Delete call to init_gc_processing. - (cp_finish_decl): Delete calls to build_static_gc_entry and - type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET. - (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup - and to expand_expr of a __gc_main call. - (maybe_gc_cleanup): Delete var decl. - (finish_function): Delete call to expand_gc_prologue_and_epilogue. - * decl2.c (flag_gc): Delete var decl. - (lang_f_options): Delete offering of -fgc. - (lang_decode_option): Delete -fgc and -fno-gc handling. - (get_temp_regvar): Delete gc code. - * init.c (build_new): Delete gc code. - * lex.c (init_lex): Delete checking of flag_gc. - - * typeck.c (convert_arguments): Delete gc code. - (build_component_addr): Delete -fgc warning. - (build_modify_expr): Delete gc code. - - * decl2.c (build_push_scope): Delete fn. - * cp-tree.h (build_push_scope): Delete decl. - - * search.c (clear_search_slots): Delete fn. - * cp-tree.h (clear_search_slots): Delete decl. - - * search.c (tree_needs_constructor_p): Delete fn. - * cp-tree.h (tree_needs_constructor_p): Delete decl. - - * tree.c (id_cmp): Delete fn. - - * tree.c (set_fnaddr_from_vtable_entry): Delete fn. - * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl. - - * tree.c (decl_value_member): Delete fn. - * cp-tree.h (decl_value_member): Delete decl. - - * tree.c (list_hash_lookup_or_cons): Delete fn. - * cp-tree.h (list_hash_lookup_or_cons): Delete decl. - - * method.c (cplus_exception_name): Delete fn. - (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros. - - * spew.c (shift_tokens): Delete fn. - -Mon Jan 22 17:49:33 1996 Jason Merrill - - * except.c (init_exception_processing): Pass 1 to needs_pop in calls - to cp_finish_decl. - * parse.y: Likewise. - -Mon Jan 22 17:34:29 1996 Brendan Kehoe - - * tree.c (build_cplus_staticfn_type): Delete function definition; - never used. - * cp-tree.h (build_cplus_staticfn_type): Delete decl. - - * tree.c (virtual_member): Delete function definition; never used. - * cp-tree.h (virtual_member): Delete decl. - -Fri Jan 19 18:03:14 1996 Mike Stump - - * typeck.c (build_component_ref): Handle getting vbase pointers - out of complex multiple inheritance better. - -Fri Jan 19 16:27:40 1996 Mike Stump - - * typeck.c (build_object_ref): Make sure we use the real type, not - any reference type. - -Fri Jan 19 16:01:47 1996 Mike Stump - - * tree.c (build_exception_variant): Don't create new types if we - don't have to, also build new types on the right obstack. - -Fri Jan 19 14:09:44 1996 Jason Merrill - - * decl.c (store_bindings): Split out from push_to_top_level. - (push_to_top_level): Call it for b->type_shadowed on class binding - levels. - -Fri Jan 19 13:53:14 1996 Mike Stump - - * search.c (expand_upcast_fixups): Fix so that offsets stored in - vbase_offsets are always right. Fixes a problem where virtual base - upcasting and downcasting could be wrong during conversions on this - during virtual function dispatch at ctor/dtor time when dynamic - vtable fixups for deltas are needed. This only sounds easier than - it is. :-) - (fixup_virtual_upcast_offsets): Change to reflect new calling - convention for expand_upcast_fixups. - -Fri Jan 19 12:23:08 1996 Brendan Kehoe - - * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we - check that it's usable as the bitfield width. - -Wed Jan 17 21:22:40 1996 Brendan Kehoe - - * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist. - Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's - only ever used for functions in it. - -Wed Jan 17 12:10:38 1996 Jason Merrill - - * parse.y (qualified_type_name): Use the TYPE_DECL, not the type. - (nested_type): Likewise. - (nested_name_specifier): Use lastiddecl. - - * decl.c (grokdeclarator): Adjust accordingly. - * init.c (expand_member_init): Likewise. - * parse.y (base_class): Likewise. - * typeck2.c (build_functional_cast): Likewise. - - * typeck2.c (build_functional_cast): Fill in name after we've - checked for non-aggr type. - -Wed Jan 17 10:18:01 1996 Mike Stump - - * decl2.c (warn_pointer_arith): Default to on. - -Tue Jan 16 12:45:38 1996 Jason Merrill - - * lex.c (is_rid): New function. - * decl.c (grokdeclarator): Diagnose reserved words used as - declarator-ids. - -Tue Jan 16 11:39:40 1996 Jason Merrill - - * tree.c (get_decl_list): Don't lose cv-quals. - - * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose - typespecs used as declarator-ids. - -Tue Jan 16 11:09:42 1996 Mike Stump - - * decl.c (poplevel): When popping a level, don't give a warning for - any subblocks that already exist. - -Tue Jan 16 00:25:33 1996 Jason Merrill - - * typeck.c (build_object_ref): Finish what I started. - - * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN. - - * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs. - - * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a - scope. - -Mon Jan 15 16:19:32 1996 Jason Merrill - - * decl.c (xref_tag): Handle passing a type in directly. - - * parse.y (qualified_type_name): Pull out the type. - (nested_type): Likewise. - Take types directly instead of as identifiers. - * call.c (build_scoped_method_call): Take types directly instead of - as identifiers. - * decl.c (xref_basetypes): Likewise. - * init.c (expand_member_init): Likewise. - (build_member_call): Likewise. - (build_offset_ref): Likewise. - * typeck2.c (build_scoped_ref): Likewise, remove bogus code. - * method.c (do_build_assign_ref): Likewise. - * decl.c (grokdeclarator): Handle a type appearing as the - declarator-id for constructors. - * method.c (do_build_copy_constructor): current_base_init_list now - uses the types directly, not their names. - * init.c (sort_base_init): Likewise. - (expand_member_init): Likewise. - * init.c (is_aggr_type): New function, like is_aggr_typedef. - -Mon Jan 15 08:45:01 1996 Jeffrey A Law - - * tree.c (layout_basetypes): Call build_lang_field_decl instead - of build_lang_decl if first arg is a FIELD_DECL. - -Thu Jan 11 14:55:07 1996 Brendan Kehoe - - * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is - non-empty. - * except.c (expand_start_catch_block): Set TREE_USED to avoid - warnings about the catch handler. - -Mon Jan 8 17:35:12 1996 Jason Merrill - - * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of - expand_target_expr. - -Thu Jan 4 12:30:32 1996 Brendan Kehoe - - Fix access control to use trees rather than integers. - * class.c (access_{default, public, protected, private, - default_virtual, public_virtual, private_virtual}_node): Add - definitions. - (init_class_processing): Do creation of those nodes. - * cp-tree.h (access_type): Delete enum decl. - (access_{default, public, protected, private, default_virtual, - public_virtual, private_virtual}_node): Add decls. - (compute_access): Change return type. - * search.c (compute_access): Have tree return type, instead of enum. - (lookup_field): Declare THIS_V and NEW_V to be tree nodes. - * lex.c (real_yylex): Use yylval.ttype for giving the value of the - access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}. - * parse.y (VISSPEC): Make ttype rather than itype. - (base_class_access_list): Likewise. - * *.[cy]: Change all refs of `access_public' to `access_public_node', - etc. - * call.c (build_method_call): Make ACCESS be a tree. - * class.c (alter_access, finish_struct_1, filter_struct): Likewise. - * cvt.c (convert_to_aggr): Likewise. - * init.c (build_offset_ref, resolve_offset_ref, build_delete): - Likewise. - * method.c (hack_identifier): Likewise. - * typeck.c (build_component_ref_1, build_component_ref): ): Likewise. - -Thu Jan 4 11:02:20 1996 Mike Stump - - * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C - frontend, and make it more consistent with respect to - warn_pointer_arith. - -Tue Jan 2 00:13:38 1996 Rusty Russell - - * decl.c (pushdecl): Check for duplicate parameter names. - -Wed Jan 3 09:25:48 1996 Mike Stump - - * decl.c (expand_static_init): Call assemble_external for atexit. - -Wed Jan 3 07:55:19 1996 Mike Stump - - * except.c (do_unwind): Remove some generated dead code. - (eh_outer_context): New routine, factor out some common code from - expand_builtin_throw and end_eh_unwinder. Add code to do return - address masking for the PA. - (expand_builtin_throw): Use eh_outer_context instead of open coding - it here. - (end_eh_unwinder): Likewise. - -Tue Jan 2 17:00:56 1996 Mike Stump - - * except.c (expand_throw): Call assemble_external for __empty, if we - use it. - -Thu Dec 28 11:13:15 1995 Mike Stump - - * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of - NORMAL_RETURN_ADDR_OFFSET. - (end_eh_unwinder): Likewise. - -Wed Dec 27 22:18:16 1995 Mike Stump - - * gc.c (build_dynamic_cast): Make sure we don't cast away const - when dealing with references, and make sure we handle dynamic - casting to a cv qualified reference. - -Thu Dec 21 23:50:35 1995 Mike Stump - - * except.c (struct eh_context): New structure top hold eh context - information. - (push_eh_context): New routine. - (pop_eh_context): Likewise. - * decl.c (push_cp_function_context): Use them. - (pop_cp_function_context): Likewise. - -Wed Dec 20 12:42:51 1995 Jason Merrill - - * decl2.c (finish_file): Also prune uninteresting functions in the - inline emission loop. - -Wed Dec 20 02:32:07 1995 Jeffrey A Law - - * sig.c (build_signature_table_constructor): Mark functions - in the signature as referenced. - -Tue Dec 19 22:36:56 1995 Jason Merrill - - * decl2.c (finish_file): Do all the vtable/synthesis stuff before - the inline emission stuff. - -Mon Dec 18 15:51:33 1995 Jason Merrill - - * cp-tree.h, decl2.c (flag_weak): New flag to control the use of - weak symbols. - * lang-options.h: Add -f{no-,}weak. - * decl.c (init_decl_processing): If the target does not support weak - symbols, don't use them. - * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/. - -Sun Dec 17 21:13:23 1995 Rusty Russell - - * init.c (expand_member_init): warning for base init after members. - -Fri Dec 15 15:32:18 1995 Jason Merrill - - * cvt.c (build_expr_type_conversion): Don't convert to a reference - type. - -Thu Dec 14 16:05:58 1995 Mike Stump - - * method.c (report_type_mismatch): Improve wording for volatile - mismatches. - -Thu Dec 14 14:16:26 1995 Mike Stump - - * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of - expand_assignment, as the later doesn't handle things that have - copy constructors well. The compiler would do bitwise copying, - instead of ctor calling in some cases. - -Wed Dec 13 17:05:54 1995 Paul Eggert - - * g++.c (my_strerror): Return "cannot access" if errno is 0. - (pfatal_with_name, perror_exec): Don't assume that - the returned value from my_strerror contains no '%'s. - (concat): Remove. - (sys_nerror): Declare only if HAVE_STRERROR is not defined. - -Wed Dec 13 16:22:38 1995 Jason Merrill - - Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make - TYPE_METHODS/TREE_CHAIN mean what they used to. - * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC - instead of TYPE_METHODS. - * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD. - * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise. - * cp-tree.h (CLASSTYPE_METHODS): Lose. - (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of - TYPE_METHODS. - (struct lang_decl): Lose next_method field. - (DECL_NEXT_METHOD): Lose. - * class.c (finish_struct_methods): Don't mess with TYPE_METHODS. - (finish_struct): Just use TYPE_METHODS; we don't need fn_fields - anymore. - (finish_struct_methods): Don't mess with the TREE_CHAINs in - fn_fields. - - * search.c (add_conversions): Don't use TREE_CHAIN to traverse method - vector. - - * call.c (build_method_call): Synthesize here even when not inlining. - * typeck.c (build_function_call_real): Likewise. - -Wed Dec 13 15:02:39 1995 Ian Lance Taylor - - * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols - == DBX_DEBUG, call dbxout_start_new_source_file and - dbxout_resume_previous_source_file when appropriate. - -Tue Dec 12 20:38:55 1995 Mike Stump - - * except.c (start_anon_func): Push to the top level. - (end_anon_func): Pop from the top level. - -Mon Dec 11 18:56:14 1995 Mike Stump - - * cp-tree.h (build_cleanup): New routine to build cleanups. - * decl.c (expand_static_init): Use build_cleanup to build a cleanup - call at ctor time and use atexit to run it later. - * decl2.c (build_cleanup): New routine, taken from finish_file. - (finish_file): Use build_cleanup instead, and don't put function - local statics in global dtor list. - -Wed Dec 6 14:34:29 1995 Mike Stump - - * except.c (expand_throw): Ensure that we have cleanups, if we try - and expand cleanups. - -Wed Dec 6 11:48:21 1995 Mike Stump - - * except.c (expand_throw): Add logic to manage dynamic cleanups for - the EH object. - (expand_end_catch_block): Use the magic of expand_goto, instead of - emit_jump so that we get the cleanup for any catch clause parameter - and the cleanup for the exception object. Update to reflect label - changes. - (push_eh_cleanup): New routine to register a cleanup for an - exception object. - (empty_fndecl): Used to default cleanup actions to - nothing. - (init_exception_processing): Setup empty_fndecl. Setup - saved_cleanup. - (expand_start_catch_block): Update to reflect label changes. Call - push_eh_object to register the cleanup for the EH object. - (start_anon_func): New routine to start building lambda expressions - from trees. - (end_anon_func): New routine to end them. - (struct labelNode): Change so that we can use tree labels, or rtx - labels. - (saved_cleanup): Object to check for dynamic cleanups for the - exception handling object. - (push_label_entry): Change so that we can use tree labels, or rtx - labels. - (pop_label_entry): Likewise. - (top_label_entry): Likewise. - (expand_start_all_catch): Use tree label instead of rtx label, so - that we can get the magic of expand_goto. - (expand_end_all_catch): Update to reflect label changes. - - * class.c (build_vfn_ref): Remove building_cleanup logic, as we now - use UNSAVE_EXPRs. - * typeck.c (get_member_function_from_ptrfunc): Remove remnants of - building_cleanup logic, as we now use UNSAVE_EXPRs. - * cp-tree.h (unsave_expr): Declare it. - * decl.c (building_cleanup): Remove. - (maybe_build_cleanup): Remove building_cleanup logic, and use - UNSAVE_EXPR instead. - -Sun Dec 3 01:34:58 1995 Mike Stump - - * gc.c (build_t_desc): Update error message to say . - -Thu Nov 30 12:30:05 1995 Brendan Kehoe - - * decl.c (pushdecl): Only warn about shadowing a local variable if - warn_shadow is true. - -Sun Nov 26 16:06:55 1995 Rusty Russell - - * typeck.c (build_binary_op_nodefault): Added warning about - comparisons between different enum types with -Wall, unless - -fenum-int-equiv set. - -Wed Nov 22 15:44:02 1995 Mike Stump - - * class.c (finish_struct_1): Skip down to the inner type in - multidimensional arrays. Ensures ctors will be made for types that - need constructing. - -Wed Nov 22 14:19:22 1995 Mike Stump - - * decl.c (last_dtor_insn): New to track the last compiler generated - insn in a dtor. - (store_parm_decls): Set it. - (finish_function): Use it to see if the dtor is empty. Avoid doing - vtable setup all the time, if we can. - (struct cp_function): Add last_dtor_insn. - (push_cp_function_context): Save it. - (pop_cp_function_context): Restore it. - -Wed Nov 22 11:52:19 1995 Paul Russell - - * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid - warnings. - -Tue Nov 21 17:15:23 1995 Mike Stump - - * typeck.c (expand_target_expr): Make sure targets get put into the - current temp_slot_level, so that the free_temp_slots call will reuse - them. - -Tue Nov 21 13:32:03 1995 Mike Stump - - * class.c (finish_struct_1): Delay delta fixups for virtual bases - until after we have done the hard virtuals, to avoid a bogus `every - virtual function must have a unique final overrider' for virtual - functions that are only overridden by hard virtuals. - -Thu Nov 9 13:35:30 1995 Jason Merrill - - * pt.c (do_function_instantiation): Don't try to find a file-scope - template for a member function. - -Tue Nov 14 06:20:35 1995 Mike Stump - - * g++.c (main): Add handling of -nodefaultlibs. - -Mon Nov 13 15:45:34 1995 Mike Stump - - * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to - distinguish between direct bindings of reference variables, and - indirect bindings of reference variables. - * cvt.c (build_up_reference): Use it. - * typeck.c (convert_arguments): Use it to indicate this is an - indirect binding. - * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast - as they are unused. - (expand_static_init): Likewise. - (cplus_expand_expr_stmt): Likewise. - * decl2.c (finish_file): Likewise. - * init.c (perform_member_init): Likewise. - (emit_base_init): Likewise. - (expand_aggr_vbase_init_1): Likewise. - -Fri Nov 10 09:18:09 1995 Brendan Kehoe - - * decl.c (push_namespace): Rewrite to use build_lang_decl, so we - get a DECL_LANG_SPECIFIC node. - * cp-tree.h (lang_decl_flags): Add new member `level'. - (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the - decl_flags level member. - -Mon Nov 6 18:36:13 1995 Brendan Kehoe - - * call.c (build_method_call): Make sure instance has a - TYPE_LANG_SPECIFIC node before we dive into it. - -Sat Nov 4 20:01:52 1995 Jason Molenda - - * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code. - -Thu Nov 2 17:56:57 1995 Mike Stump - - * decl.c (duplicate_decls): When smashing decls, smash staticness in - the usual way. - -Thu Nov 2 16:44:02 1995 Mike Stump - - * decl.c (poplevel): Handle the merging of subblocks of cleanups - when finishing blocks that have already been created (usually due to - the fixup goto code). Fixes bad debugging information. - -Wed Nov 1 12:33:53 1995 Jason Merrill - - * method.c (hack_identifier): Don't abort when we get a TREE_LIST - that's not a list of overloaded functions. - -Wed Nov 1 11:38:58 1995 Brendan Kehoe - - * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn - before trying to use DECL_ABSTRACT_VIRTUAL_P. - -Tue Oct 31 11:56:55 1995 Jason Merrill - - * decl2.c (mark_used): New function for hooking into setting of - TREE_USED on decls. - * call.c (build_method_call): Use it. - * class.c (instantiate_type): Likewise. - * init.c (build_offset_ref): Likewise. Don't call assemble_external - for all like-named functions. - * method.c (hack_identifier): Likewise. - (emit_thunk): Don't call assemble_external. - (make_thunk): Create thunk as a FUNCTION_DECL so that it - gets the right mode and ENCODE_SECTION_INFO works. - - * parse.y: Use mark_used. Pass operator names to do_identifier. - * lex.c (do_identifier): Handle operator names. - - * decl2.c (grokclassfn): Tweak __in_chrg attributes. - -Thu Oct 26 16:45:58 1995 Brendan Kehoe - - * errfn.c: Include stdio.h. - (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*. - -Wed Oct 25 18:58:41 1995 Mike Stump - - * typeck2.c (digest_init): Always convert initializers to the - right type. - -Wed Oct 25 13:25:24 1995 Mike Stump - - * init.c (member_init_ok_or_else): Don't allow member initializers - for indirect members, as it is invalid. - -Wed Oct 25 11:35:28 1995 Brendan Kehoe - - * decl.c (grokdeclarator): Don't allow `friend signed ()'. - -Fri Oct 20 10:30:59 1995 Mike Stump - - * parse.y (for.init.statement): Catch compound statements inside for - initializations, if we're being pedantic. - -Fri Oct 20 10:03:42 1995 Mike Stump - - * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are - looking for. - -Thu Oct 19 14:26:10 1995 Mike Stump - - * error.c (dump_expr): Don't core dump when a boolean expression is - used as a default argument. - -Thu Oct 19 10:36:30 1995 Jason Merrill - - * class.c (finish_struct_bits): Check aggregate_value_p instead of - RETURN_IN_MEMORY. - -Wed Oct 18 18:12:32 1995 Jason Merrill - - * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a - BLKmode type that would otherwise be returned in registers. - -Mon Oct 16 12:32:19 1995 Brendan Kehoe - - * g++.c (WITHLIBC): New macro. - (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set - saw_libc and pass it at the end if it was set. - -Wed Oct 11 16:30:34 1995 Brendan Kehoe - - * parse.y (fn.def1): Call split_specs_attrs in - declmods notype_declarator case. - -See ChangeLog.1 for earlier changes. diff --git a/contrib/gcc/cp/ChangeLog.3 b/contrib/gcc/cp/ChangeLog.3 deleted file mode 100644 index 995175c..0000000 --- a/contrib/gcc/cp/ChangeLog.3 +++ /dev/null @@ -1,22648 +0,0 @@ -2003-12-30 Nathan Sidwell - - PR c++/13507 - * decl.c (duplicate_decls): Use build_type_attribute_variant to - merge attributes. - - PR c++/13494 - * tree.c (build_cplus_array_type_1): Only build a minimal array - type for dependent types or domains. - -2003-12-29 Nathan Sidwell - - PR c++/12774 - * typeck.c (comp_array_types): Fold non-dependent domains for - ABI-1. - -2003-12-29 Kriang Lerdsuwanakij - - PR c++/13289 - * semantics.c (finish_id_expression): Only check if the type of - a template argument is integral or enumeration when it is not - dependent. - -2003-12-29 Kriang Lerdsuwanakij - - PR c++/12403 - * parser.c (cp_parser_template_declaration_after_export): Set up - template specialization scope in case of explicit specialization. - -2003-12-28 Mark Mitchell - - PR c++/13081 - * decl.c (duplicate_decls): Preserve inline-ness when redeclaring - a function template. - - PR c++/12613 - * decl.c (reshape_init): Reject GNU colon-style designated - initializers in arrays. - - PR c++/13009 - * call.c (build_special_member_call): Do not assume that we have a - pointer to the complete object in an assignment operator. - -2003-12-28 Roger Sayle - - PR c++/13070 - * decl.c (duplicate_decls): When setting the type of an anticipated - declaration, merge the existing type attributes. - -2003-12-25 Andrew Pinski - - PR c++/13268, c++/13339 - * class.c (add_method): Return early when method is error_mark_node. - * pt.c (tsubst_friend_function): Return early when new_friend is - error_mark_node. - -2003-12-23 Mark Mitchell - - * cp-lang.c (cp_expr_size): Return zero for empty classes. - - * cp-tree.h (warn_if_uknown_interface): Remove unused function. - * decl2.c (warn_if_unknown_interface): Likewise. - -2003-12-23 Nathan Sidwell - - PR c++/13387 - * cp-lang.c (cxx_get_alias_set): Correct logic for a base type. - -2003-12-22 Mark Mitchell - - * decl.c (start_function): Do not check - flag_alt_external_templates or flag_external_templates. - * decl2.c (warn_if_unknown_interface): Likewise. - * lex.c (extract_interface_info): Likewise. - * pt.c (lookup_template_class): Likewise. - - PR c++/12862 - * name-lookup.c (pushdecl): Look up all namespace-scope entities - in their corresponding namespace. - - PR c++/12397 - * typeck.c (finish_class_member_access_expr): Don't tree - IDENTIFIER_NODEs as non-dependent expressions. - -2003-12-22 Andrew Pinski - - PR c++/5050 - * tree.c (cp_start_inlining): Remove. - (cp_end_inlining): Remove. - * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define. - (LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define. - * cp-tree.h (cp_start_inlining): Do not declare. - (cp_end_inlining): Do not declare. - -2003-12-22 Mark Mitchell - - PR c++/12479 - * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;" - pedwarn when not in a system header. - -2003-12-21 Mark Mitchell - - * cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE, - CPTI_UNION_TYPE, CPTI_ENUM_TYPE. - (record_type_node): Remove. - (union_type_node): Likewise. - (enum_type_node): Likewise. - * decl.c: Remove mention of above tree nodes in comment. - * lex.c (cxx_init): Do not assign to record_type_node, - union_type_node, or enum_type_node. Simplify handling of - class_type_node. - - PR c++/11554 - * init.c (sort_mem_initializers): Add warning. - -2003-12-21 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * cxx-pretty-print.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * error.c: Likewise. - * except.c: Likewise. - * init.c: Likewise. - * name-lookup.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * semantics.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2003-12-19 Kazu Hirata - - * cvt.c: Remove uses of "register" specifier in - declarations of arguments and local variables. - * decl.c: Likewise. - * decl2.c: Likewise. - * expr.c: Likewise. - * friend.c: Likewise. - * lex.c: Likewise. - * name-lookup.c: Likewise. - * repo.c: Likewise. - * search.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2003-12-19 Mark Mitchell - - PR c++/12795 - * name-lookup.c (pushdecl): Do not treated any functions as being - "nested" in C++. - -2003-12-19 Jason Merrill - - PR c++/13371 - * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing. - * cvt.c (convert_to_void): Don't warn about the RHS of a comma - being useless if TREE_NO_UNUSED_WARNING is set. - -2003-12-18 Richard Henderson - - * cp-tree.h (struct lang_type_header): Remove __extension__. - -2003-12-18 Jason Merrill - - PR c++/12253 - * init.c (build_vec_init): Initialization of an element from - an initializer list is also a full-expression. - - * parser.c, pt.c, semantics.c: Rename constant_expression_p - to integral_constant_expression_p. - -2003-12-18 Kriang Lerdsuwanakij - - PR c++/13262 - * pt.c (instantiate_decl): Wrap push_nested_class and - pop_nested_class around cp_finish_decl call for static member - variable. - -2003-12-18 Giovanni Bajo - - PR c++/9154 - * parser.c (cp_parser_template_argument): A type-id followed by '>>' - is just an user typo, and should be accepted as last resort if any - other parsing fails. - (cp_parser_enclosed_template_argument_list): If the argument list is - parsed correctly, but the next token is '>>', emit a diagnostic. - (cp_parser_next_token_ends_template_argument): Accept '>>' as - delimiter of template argument, it will be later detected as a typo. - -2003-12-17 Kelley Cook - - * Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1. - -2003-12-17 Mark Mitchell - - PR c++/10603 - PR c++/12827 - * parser.c (cp_parser_error): Help c_parse_error print good - messages if the next token is a keyword. - (cp_parser_parameter_declaration_list): When resynchronizing after - a bad parameter declaration, stop if a comma is found. - (cp_parser_parameter_declaration): Avoid backtracking. - -2003-12-16 Mark Mitchell - - PR c++/12696 - * decl.c (reshape_init): Recover quickly from errors. - -2003-12-16 Nathan Sidwell - - PR c++/9043 - C++ ABI change: Mangling array indices in templates. - * decl.c (compute_array_index_type): Reorganize for earlier - template errors. Use value_dependent_expression_p for abi-2. - * mangle.c (write_array_type): Check broken mangling for - expression indices on abi-1 - -2003-12-16 Mark Mitchell - - PR c++/12696 - * decl.c (reshape_init): Recover quickly from errors. - - PR c++/13275 - * lex.c (reswords): Add "__offsetof" and "__offsetof__". - * parser.c (cp_parser): Add in_offsetof_p. - (cp_parser_new): Initialize it. - (cp_parser_primary_expression): Handle __offsetof__ (...). - (cp_parser_postfix_expression): Allow casts to pointer type and - uses of "->" in a constant expression if implementing offsetof. - (cp_parser_unary_expression): Allow the use of "&" in a constant - expression if implementing offsetof. - -2003-12-16 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD - if the declaration comes from an using declaration. - -2003-12-16 Giovanni Bajo - - * semantics.c (finish_id_expression): Refactor the code to handle - template parameters, and emit a more informative error message - when they are used within an integral constant expression. - -2003-12-16 Nathan Sidwell - - PR c++/13387 - * class.c (finish_struct_1): Compute mode and alias set for - CLASSTYPE_AS_BASE. - * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial - assignment of a class, as necessary. - * cp-lang.c (cxx_get_alias_set): The alias set as a base is the - same as for the complete type. - - PR c++/13242 - C++ ABI change. Mangling template parameters of reference type - * mangle.c (write_template_args): Remove unreachable code. - (write_template_arg): Look through an argument of reference type. - -2003-12-16 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD - if the declaration comes from an using declaration. - -2003-12-15 Mark Mitchell - - PR c++/10926 - * decl2.c (grokfield): Robustify. - - PR c++/11116 - * parser.c (cp_parser_throw_expression): Determine whether or not - an assignment-expression is present by doing one-token lookahead. - - PR c++/13269 - * parser.c (cp_parser_function_definition_after_declarator): Stop - scanning tokens when reaching EOF. - - PR c++/12989 - * typeck.c (cxx_sizeof_or_alignof_expr): Robustify. - - PR c++/13310 - * pt.c (dependent_template_p): Handle OVERLOADs. - -2003-12-15 Mark Mitchell - - PR c++/13243 - PR c++/12573 - * parser.c (cp_parser_postfix_expression): Tighten handling of - integral constant expressions. - (cp_parser_unary_expression): Likewise. - * pt.c (value_dependent_expression_p): Remove handling for - COMPONENT_REFs. - -2003-12-15 Nathan Sidwell - - * class.c (add_method): Disallow destructor for java classes. - * decl.c (xref_basetypes): Check java class inheritance. - * decl2.c (check_java_method): Skip artificial params. - - PR c++/13241 - C++ ABI change. Mangling of symbols in expressions. - * mangle.c (write_mangled_name): Add top_level flag. Rework for - nested and unnested mangling. Deal with abi version 1 and version - 2 differences. - (write_expression): Adjust write_mangled_name call. - (mangle_decl_string): Use write_mangled_name for all non-type decls. - -2003-12-14 Mark Mitchell - - PR c++/10779 - PR c++/12160 - * parser.c (struct cp_parser): Add in_template_argument_list_p. - (cp_parser_error): Use c_parse_error. - (cp_parser_name_lookup_error): New function. - (cp_parser_new): Initialize it. - (cp_parser_declarator): Add parenthesized_p parameter. - (cp_parser_nested_name_specifier_opt): Use - cp_parser_name_lookup_error. - (cp_parser_parenthesized_expression_list): Improve comments. - (cp_parser_condition): Adjust call to cp_parser_declarator. - (cp_parser_template_parameter): Adjust call to - cp_parser_parameter_declaration. - (cp_parser_template_argument_list): Set - in_template_argument_list_p. - (cp_parser_explicit_instantiation): Adjust call to - cp_parser_declarator. - (cp_parser_simple_type_specifier): Remove unncessary code. - (cp_parser_using_declaration): Use cp_parser_name_lookup_error. - (cp_parser_init_declarator): Handle member function definitions. - (cp_parser_direct_declarator): Adjust call to - cp_parser_declarator. - (cp_parser_type_id): Adjust call to cp_parser_declarator. - (cp_parser_parameter_declaration_list): Avoid backtracking where - possible. - (cp_parser_parameter_declaration): Add parenthesized_p parameter. - (cp_parser_function_definition): Remove. - (cp_parser_member_declaration): Do not backtrack to look for - function definitions. - (cp_parser_exception_declaration): Adjust call to - cp_parser_declarator. - (cp_parser_single_declaration): Handle function definitions via - cp_parser_init_declarator. - (cp_parser_save_member_function_body): New function. - -2003-12-14 Kriang Lerdsuwanakij - - PR c++/13106 - * decl.c (finish_function): Check if return type is dependent before - issuing no return statement warning. - -2003-12-12 Nathan Sidwell - - PR c++/13118 - * cp-tree.h (lang_decl_u): Add thunk_alias member. - (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL. - (THUNK_ALIAS_P): Remove. - (THUNK_ALIAS): Adjust. - * class.c (update_vtable_entry_for_fn): Get the vbase within the - overriding function's return type. - (dump_thunk): Adjust THUNK_ALIAS printing. - (build_vtbl_initializer): Adjust THUNK_ALIAS use. - * method.c (make_thunk): Revert 12881 test change. Clear - THUNK_ALIAS. - (finish_thunk): Adjust THUNK_ALIAS setting. - (use_thunk): Adjust THUNK_ALIAS use. - * semantics.c (emit_associated_thunks): Likewise. - - PR c++/13114, c++/13115 - * class.c (layout_empty_base): Propagate the move of an empty base - to offset zero. - - PR c++/12881 - * method.c (make_thunk): Deal with thunk aliases when searching - for a thunk. Robustify assertion. - -2003-12-11 Nathan Sidwell - - * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only. - (hash_type): Use TYPE_UID of the identifier's type. - (compare_type): Adjust. - (mangle_conv_op_name_for_type): Store identifier nodes only, use - TYPE_UID has hash value. - -2003-12-10 Mark Mitchell - - * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL. - -2003-12-08 Matt Austern - - PR c/13134 - * decl.c (duplicate_decls): Copy visibility flag when appropriate. - -2003-12-09 Giovanni Bajo - - * init.c (build_new_1): Deal with an OVERLOAD set when - looking up for _Jv_AllocObject. - * except.c (build_throw): Likewise for _Jv_Throw. - -2003-12-08 Jason Merrill - - PR c++/11971 - * tree.c (build_local_temp): Split out from build_cplus_new. - (force_target_expr): New fn. - * call.c (call_builtin_trap): Call it. Take a type parm. - (convert_arg_to_ellipsis): Pass it. - (build_x_va_arg): Use call_builtin_trap. - - PR c++/11929 - * call.c (magic_varargs_p): New fn. - (build_over_call): Do no ellipsis conversions for arguments to - functions with magic varargs. - - * name-lookup.c, init.c, except.c: Revert Giovanni's patch from - yesterday. - - Give the anonymous namespace a null DECL_NAME. - * cp-tree.h: Don't declare anonymous_namespace_name. - * decl.c: Don't define it. - * dump.c (cp_dump_tree): Don't check for it. - * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise. - * error.c (dump_decl): Likewise. - * name-lookup.c: Define it here. - (push_namespace): Put it in DECL_ASSEMBLER_NAME instead. - * mangle.c (write_unqualified_name): Adjust. - -2003-12-07 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): Always construct an - OVERLOAD unless the declaration is a built-in. - (set_namespace_binding): While binding OVERLOADs with only one - declaration, we still need to call supplement_binding. - * init.c (build_new_1): Deal with an OVERLOAD set when - looking up for _Jv_AllocObject. - * except.c (build_throw): Likewise for _Jv_Throw. - -2003-12-06 Mark Mitchell - - PR c++/13323 - * class.c (same_signature_p): Handle conversion operators - correctly. - (check_for_override): Likewise. - -2003-12-06 Kelley Cook - - * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete. - (c++.install_common, cp/g++.1, c++.install-man): Adjust for above. - (c++.uninstall): Likewise. - -2003-12-05 Danny Smith - Mark Mitchell - - PR c++/13305 - * parser.c (cp_parser_elaborated_type_specifier): Accept - attributes. - -2003-12-05 Mark Mitchell - - PR c++/13314 - * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope - calls. - (cp_parser_class_head): Likewise. - -2003-12-05 Kriang Lerdsuwanakij - - PR c++/13166 - * parser.c (cp_parser_late_parsing_default_args): Make sure the - context is a class before calling push_nested_class and - pop_nested_class. - -2003-12-03 James E Wilson - - * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS - support. - -2003-12-03 Mark Mitchell - - PR c++/9127 - * cp-tree.h (at_namespace_scope_p): New function. - * parser.c (cp_parser_class_head): Handle invalid explicit - specializations. - * search.c (at_namespace_scope_p): New function. - - PR c++/13179 - * semantics.c (finish_handler_parms): Do not call eh_type_info for - types used in templates. - - PR c++/10771 - * parser.c (cp_parser_check_for_invalid_template_id): New - function. - (cp_parser_simple_type_specifier): Use it. - (cp_parser_elaborated_type_specifier): Likewise. - (cp_parser_class_head): Likewise. - -2003-12-02 Giovanni Bajo - - PR c++/10126 - * pt.c (convert_nontype_argument): Handle default conversions - while converting a pointer to member function. - -2003-12-02 Giovanni Bajo - - PR c++/12573 - * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by - looking into them recursively. - -2003-12-02 Richard Henderson - - * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD. - * parser.c (struct cp_token): Likewise. - (struct cp_parser_token_tree_map_node): Likewise. - * lex.c (struct resword): Move const after ENUM_BITFIELD. - -2003-11-30 Mark Mitchell - - PR c++/9849 - * parser.c (cp_lexer_prev_token): New function. - (cp_parser_skip_to_closing_parenthesis): Add consume_paren - parameter. - (cp_parser_nested_name_specifier_opt): Add is_declaration - parameter. - (cp_parser_nested_name_specifier): Likewise. - (cp_parser_class_or_namespace_name): Likewise. - (cp_parser_class_name): Likewise. - (cp_parser_template_id): Likewise. - (cp_parser_template_name): Likewise. - (cp_parser_id_expression): Adjust calls to - cp_parser_nested_name_specifier_op, cp_parser_template_id, - cp_parser_class_name. - (cp_parser_unqualified_id): Likewise. - (cp_parser_postfix_expression): Likewise. - (cp_parser_pseudo_destructor_name): Likewise. - (cp_parser_cast_expression): Likewise. - (cp_parser_mem_initializer_id): Likewise. - (cp_parser_simple_type_specifier): Likewise. - (cp_parser_type_name): Likewise. - (cp_parser_elaborated_type_specifier): Likewise. - (cp_parser_qualified_namespace_specifier): Likewise. - (cp_parser_using_declaration): Likewise. - (cp_parser_using_directive): Likewise. - (cp_parser_ptr_operator): Likewise. - (cp_parser_declarator_id): Likewise. - (cp_parser_class_head): Likewise. - (cp_parser_base_specifier): Likewise. - (cp_parser_constructor_declarator_p): Likewise. - (cp_parser_direct_declarator): Fix typo in comment. - (cp_parser_parenthesized_expression_list): Adjust call to - cp_parser_skip_to_closing_parenthesis. - (cp_parser_selection_statement): Likewise. - -2003-11-23 Kriang Lerdsuwanakij - - PR c++/12924 - * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR - with OVERLOAD and DECL nodes as the first operand. - -2003-11-22 Kriang Lerdsuwanakij - - * pt.c (tsubst) : Remove erroneous argument to build_nt. - -2003-11-22 Kriang Lerdsuwanakij - - PR c++/5369 - * friend.c (is_friend): Handle member function of a class - template as template friend. - (do_friend): Likewise. - * decl2.c (check_classfn): Add template_header_p parameter. - * decl.c (start_decl): Adjust check_classfn call. - (grokfndecl): Likewise. - * pt.c (is_specialization_of_friend): New function. - (uses_template_parms_level): Likewise. - (push_template_decl_real): Use uses_template_parms_level. - (tsubst_friend_function): Adjust check_classfn call. - * cp-tree.h (check_classfn): Adjust declaration. - (uses_template_parms_level): Add declaration. - (is_specialization_of_friend): Likewise. - -2003-11-21 Mark Mitchell - - PR c++/12515 - * pt.c (build_non_dependent_expr): Handle GNU extension to ?: - operator. - -2003-11-21 Jan Hubicka - - * parser.c (cp_parser_postfix_expression): Initialize 's' to - NULL_TREE. - -2003-11-20 Joseph S. Myers - - * Make-lang.in (c++.extraclean): Delete. - -2003-11-20 Joseph S. Myers - - * Make-lang.in (check-g++, lang_checks): Add. - -2003-11-18 Kriang Lerdsuwanakij - - PR c++/12932 - * class.c (currently_open_derived_class): Check if - current_class_type is NULL_TREE. - * semantics.c (finish_call_expr): Check if - currently_open_derived_class returns NULL_TREE. - * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT - parameter. - -2003-11-17 Jason Merrill - - * init.c (build_new_1): Preevaluate placement args. - * call.c (build_op_delete_call): Don't expose placement args to - overload resolution. - -2003-11-16 Jason Merrill - - * Make-lang.in (c++.tags): Create TAGS.sub files in each directory - and TAGS files that include them for each front end. - -2003-11-15 Bernardo Innocenti - - PR c++/2294 - * name-lookup.c: Revert previous patch for PR c++/2294 to prevent - build failure on libjava. - -2003-11-14 Giovanni Bajo - - PR c++/2294 - * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD - unless the declaration is a built-in. - (set_namespace_binding): While binding OVERLOADs with only one - declaration, we still need to call supplement_binding. - -2003-11-14 Mark Mitchell - - PR c++/12762 - * parser.c (cp_parser_enclosed_template_argument_list): New - function. - (cp_parser_template_id): Use it. - (cp_parser_simple_type_specifier): Recognize invalid template - syntax. - -2003-11-14 Giovanni Bajo - - PR c++/2094 - * pt.c (unify): Add support for PTRMEM_CST and - FIELD_DECL unification. - -2003-11-13 Richard Earnshaw - - * decl.c (grokfndecl): Change OK to type tree. - -2003-11-12 Mark Mitchell - - * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like - CONSTRUCTOR. - - * decl.c (cp_make_fname_decl): When creating a top-level - __FUNCTION__-like symbol, do register it with pushdecl. - - * decl.c (finish_case_label): Do not check that we are within a - switch statement here. - * parser.c (struct cp_parser): Add in_iteration_statement_p and - in_switch_statement_p. - (cp_parser_new): Initialize them. - (cp_parser_labeled_statement): Check validity of case labels - here. - (cp_parser_selection_statement): Set in_switch_statement_p. - (cp_parser_iteration_statement): Set in_iteration_statement_p. - (cp_parser_jump_statement): Check validity of break/continue - statements here. - - PR c++/12735 - * cp-tree.h (duplicate_decls): Return a tree. - * decl.c (duplicate_decls): Clarify documentation. Return - error_mark_node to indicate a failed redeclaration. - * friend.c (do_friend): Handle that case. - * name-lookup.c (pushdecl): Likewise. - -2003-11-11 Jason Merrill - - * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro. - * name-lookup.c (parse_using_directive): New fn. - (is_associated_namespace): New fn. - (arg_assoc_namespace): Also check associated namespaces. - * name-lookup.h: Declare new fns. - * pt.c (maybe_process_partial_specialization): Allow - specialization in associated namespace. - * parser.c (cp_parser_using_directive): Accept attributes. Use - parse_using_directive. - -2003-11-10 Richard Henderson - - * cvt.c (convert_to_void): Use void_zero_node after overload failure. - -2003-11-10 Gabriel Dos Reis - - PR c++/12832 - * name-lookup.c (supplement_binding): Gracefully handle names - used at non-class scope prior declaration. - -2003-11-06 Matt Austern - - * decl.c (duplicate_decls): copy DECL_VISIBILITY field. - * method.c (use_thunk): give thunk same visibility as function. - * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field. - -2003-11-05 Kriang Lerdsuwanakij - - PR c++/11616 - * pt.c (instantiate_pending_templates): Save and restore - input_location. - -2003-11-05 Kriang Lerdsuwanakij - - PR c++/2019 - * friend.c (add_friend): Don't display previous declaration in - case of duplicate friend warning. - -2003-11-02 Kriang Lerdsuwanakij - - PR c++/9810 - * call.c (build_over_call): Check access using primary template - if FN is a member function template. - -2003-11-01 Kriang Lerdsuwanakij - - PR c++/12796 - * class.c (handle_using_decl): Set input_location before calling - error_not_base_type. - -2003-10-26 Kriang Lerdsuwanakij - - PR c++/10371 - * semantics.c (finish_non_static_data_member): Handle when - both processing_template_decl and qualifying_scope are true. - -2003-10-24 Kriang Lerdsuwanakij - - PR c++/11076 - * class.c (handle_using_decl): Swap arguments of error_not_base_type. - * parser.c (cp_parser_direct_declarator): Only resolve typename for - namespace scope declarations. - -2003-10-24 Nathan Sidwell - - PR c++/12698, c++/12699, c++/12700, c++/12566 - * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New. - (debug_class, debug_thunks): New. - * class.c (dump_class_hierarchy_1): New break out from ... - (dump_class_hierarchy): ... here. - (dump_thunk, debug_thunks, debug_class): New. - (update_vtable_entry_for_fn): Add ssizetype casts. Correct - continued search for primary binfo via virtual. - (build_vtbl_initializer): Follow covariant thunk alias. - * method.c (make_thunk): Clear DECL_THUNKS of the thunk. - (finish_thunk): Look for an alias of the covariant thunk and point - to it. - (use_thunk): We should never use an alias. - * semantics.c (emit_associated_thunks): Do not emit aliases. - - PR c++/12566 - * cp-tree.h (cp_fname_init): Add TYPE pointer param. - * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't - create an ad-hoc ERROR_MARK. - (cp_make_fname_decl): Adjust. - * pt.c (tsubst_expr): Adjust. - -2003-10-23 Jason Merrill - - PR c++/12726 - * tree.c (build_target_expr_with_type): Don't call force_rvalue - for CONSTRUCTORs. - -2003-10-22 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cxx-pretty-print.c: Likewise. - * init.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * semantics.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2003-10-21 Mark Mitchell - - PR c++/11962 - * typeck.c (build_x_conditional_expr): Handle missing middle - operands in templates. - * mangle.c (write_expression): Issue errors about attempts to - mangle a non-existant middle operator to the ?: operator. - -2003-10-21 Robert Bowdidge - * decl.c (cp_finish_decl): Remove clause intended for asm directives - in struct or class fields: this code is never executed. - -2003-10-22 Kriang Lerdsuwanakij - - * decl.c (start_decl): Exit if push_template_decl returns - error_mark_node. - -2003-10-20 Kazu Hirata - - * ChangeLog: Fix typos. - * call.c: Fix comment typos. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * cxx-pretty-print.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * init.c: Likewise. - * mangle.c: Likewise. - * name-lookup.c: Likewise. - * parser.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2003-10-20 Jan Hubicka - - * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer - the expansion. - -2003-10-20 Mark Mitchell - - * Make-lang.in (c++.install-info): Remove. - -2003-10-20 Jason Merrill - - * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding - field. - -2003-10-20 Kriang Lerdsuwanakij - - PR c++/9781, c++/10583, c++/11862 - * decl.c (cp_finish_decl): Exit immediately if decl is an - error_mark_node. - * pt.c (push_template_decl_real): Return error_mark_node for - invalid template declaration of variable. - -2003-10-18 Kriang Lerdsuwanakij - - PR c++/12495 - * pt.c (lookup_template_class): Handle when current_class_type - is a local class. - -2003-10-17 Kriang Lerdsuwanakij - - PR c++/2513 - * decl.c (make_typename_type): Use dependent_type_p. - (make_unbound_class_template): Likewise. - * pt.c (instantiate_class_template): Increment - processing_template_decl during substitution of template friend - function. Preincrement processing_template_decl rather than - postincrement. - (get_mostly_instantiated_function_type): Increment - processing_template_decl during partial substitution of function - type. - -2003-10-15 Jan Hubicka - - PR c++/12574 - * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink. - -2003-10-14 Jason Merrill - - PR c++/11878 - * tree.c (build_target_expr_with_type): Call force_rvalue for - classes with non-trivial copy ctors. - - PR c++/11063 - * typeck.c (build_modify_expr): Call convert rather than abort. - -2003-10-14 Gabriel Dos Reis - - Breack out decl.c (3/n) - * name-lookup.c: Include flags.h - (lookup_name_current_level): Make static. - (add_decl_to_level): Likewise. - (push_local_binding): Likewise. - (push_overloaded_decl): Likewise. - (lookup_using_namespace): Likewise. - (qualified_lookup_using_namespace): Likewise. - (lookup_type_current_level): Likewise. - (unqualified_namespace_lookup): Likewise. - (namespace_ancestor): Likewise. - (push_using_directive): Likewise. - * decl.c (pushdecl): Move to name-lookup.c. - (pushdecl_top_level_1): Likewise. - (pushdecl_top_level): Likewise. - (pushdecl_top_level_and_finish): Likewise. - (maybe_push_decl): Likewise. - (push_using_decl): Likewise. - (push_overloaded_decl): Likewise. - (make_anon_name): Likewise. - (anon_cnt): Likewise. - (clear_anon_tags): Likewise. - (maybe_inject_for_scope_var): Likewise. - (check_for_out_of_scope_variable): Likewise. - * Make-lang.in (cp/name-lookup.o): Depend on flags.h. - * decl.c (warn_extern_redeclared_static): Export. - * cp-tree.h (warn_extern_redeclared_static): Declare. - -2003-10-14 Nathanael Nerode - - * Make-lang.in: Replace uses of $(target_alias) with - $(target_noncanonical). - -2003-10-13 Volker Reichelt - - * ChangeLog: Add PR number to patch for PR c++/12370. - -2003-10-13 Gabriel Dos Reis - - * name-lookup.h (cxx_scope_find_binding_for_name): Don't export. - (binding_for_name): Likewise. - (cxx_binding_clear): Move to name-lookup.c. - * name-lookup.c (cxx_scope_find_binding_for_name): Now static. - (binding_for_name): Likewise. - * decl2.c (is_ancestor): Move to name-lookup.c - (namespace_ancestor): Likewise. - (add_using_namespace): Likewise. - (ambiguous_decl): Likewise. - (lookup_using_namespace): Likewise. - (qualified_lookup_using_namespace): Likewise. - (set_decl_namespace): Likewise. - (decl_namespace): Likewise. - (current_decl_namespace): Likewise. - (push_decl_namespace): Likewise. - (pop_decl_namespace): Likewise. - (push_scope): Likewise. - (pop_scope): Likewise. - (struct arg_lookup): Likewise. - (arg_assoc): Likewise. - (arg_assoc_args): Likewise. - (arg_assoc_type): Likewise. - (add_function): Likewise. - (arg_assoc_namespace): Likewise. - (arg_assoc_class): Likewise. - (arg_assoc_template_arg): Likewise. - (do_namespace_alias): Likewise. - (validate_nonmember_using_decl): Likewise. - (do_nonmember_using_decl): Likewise. - (do_toplevel_using_decl): Likewise. - (do_local_using_decl): Likewise. - (do_class_using_decl): Likewise. - (do_using_directive): Likewise. - (constructor_name_full): Likewise. - (constructor_name): Likewise. - (constructor_name_p): Likewise. - -2003-10-13 Gabriel Dos Reis - - Break out decl.c (2/n) - * name-lookup.c: Include diagnostic.h - (cxx_binding_free): Make static. - (cxx_binding_make): Likewise. - (binding_table_new): Likewise - (binding_table_free): Likewise. - (binding_table_insert): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - (supplement_binding): Likewise. - * name-lookup.h (global_scope_name): Declare extern. - (global_type_node): Likewise. - (cxx_binding_free): Don't export. - (cxx_binding_make): Likewise. - (binding_table_new): Likewise. - (binding_table_free): Likewise. - (binding_table_insert): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H) - * decl.c (lookup_namespace_name): Move to name-lookup.c - (select_decl): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_qualified_name): Likewise. - (lookup_name_real): Likewise. - (lookup_name_nonclass): Likewise. - (lookup_function_nonclass): Likewise. - (lookup_name): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (lookup_flags): Likewise. - (qualify_lookup): Likewise. - (lookup_tag): Likewise. - (lookup_tag_reverse): Likewise. - (getdecls): Likewise. - (storedecls): Remove. - (cxx_remember_type_decls): Move to name-lookup.c. - (global_bindings_p): Likewise. - (innermost_nonclass_level): Likewise. - (toplevel_bindings_p): Likewise. - (namespace_bindings_p): Likewise. - (kept_level_p): Likewise. - (innermost_scope_kind): Likewise. - (template_parm_scope_p): Likewise. - (push_binding): Likewise. - (push_local_binding): Likewise. - (add_decl_to_level): Likewise. Make extern. - (push_class_binding): Move to name-lookup.c. - (resume_level): Likewise. Rename to resume_scope. - (begin_scope): Move to name-lookup.c. - (indent): Likewise. - (binding_depth): Likewise. - (is_class_level): Likewise. - (cxx_scope_descriptor): Likewise. - (cxx_scope_debug): Likewise. - (namespace_scope_ht_size): Likewise. - (leave_scope): Likewise. - (pushlevel_class): Likewise. - (poplevel_class): Likewise. - (clear_identifier_class_values): Likewise. - (pushdecl_with_scope): Likewise. - (pushdecl_namespace_level): Likewise. - (pushdecl_class_level): Likewise. - (push_class_level_binding): Likewise. - (push_using_directive): Likewise. - (identifier_global_value): Likewise. - (keep_next_level_flag): Likewise. - (keep_next_level): Likewise. - (free_binding_level): Likewise. - (set_class_shadows): Likewise. - (maybe_push_cleanup_level): Likewise. - (cp_namespace_decls): Likewise. - (bt_print_entry): Likewise. - (print_binding_level): Likewise. - (print_other_binding_stack): Likewise. - (print_binding_stack): Likewise. - (push_namespace): Likewise. - (pop_namespace): Likewise. - (push_nested_namespace): Likewise. - (pop_nested_namespace): Likewise. - (cxx_saved_binding_make): Likewise. - (struct cxx_saved_binding_make): Likewise. - (store_bindings): Likewise. - (maybe_push_to_top_level): Likewise. - (push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (identifier_type_value): Likewise. - (set_identifier_type_value): Likewise. - (set_identifier_type_value_with_scope): Likewise. - (pop_everything): Likewise. - (pushtag): Likewise. - (follow_tag_typedef): Likewise. - (maybe_process_template_type_declaration): Likewise. - (pop_binding): Likewise. - * cp-tree.h: Move corresponding declarations to name-lookup.h - -2003-10-12 Steven Bosscher - - * cvt.c (ocp_convert): Move warning to C common code. - -2003-10-09 Jason Merrill - - PR c++/6392 - * tree.c (build_cplus_array_type): Handle all quals the same. - (cp_build_qualified_type_real): Look through arrays first. - - * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL. - (build_target_expr_with_type): Likewise. - - * pt.c (instantiate_class_template): Sanity check that our - enclosing class has been instantiated. - -2003-10-08 Giovanni Bajo - - * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS. - * error.c (dump_function_decl): Use it to skip the dump of the - arguments. - (dump_expr): When dumping a declaration found within an - expression, always set TFF_NO_FUNCTION_ARGUMENTS - in the flags. - -2003-10-08 Giovanni Bajo - - PR c++/11097 - * pt.c (tsubst_decl): Substitute also the DECL_NAME node of - USING_DECL. - -2003-10-06 Mark Mitchell - - PR c++/10147 - * call.c (initialize_reference): Tweak error message. - * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove - pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope. - * cxx-pretty-print.c (pp_cxx_id_expression): Always display - qualified entities using qualified names. - - PR c++/12337 - * init.c (build_new_1): Make sure that the expression returned is - not an lvalue. - - PR c++/12344, c++/12236, c++/8656 - * decl.c (start_function): Do not ignore attributes embedded in a - function declarator. - -2003-10-06 Mark Mitchell - - * Make-lang.in (c++.info): Remove. - (c++.dvi): Remove. - (c++.generated-manpages): Replace with ... - (generated-manpages): ... this. - -2003-10-03 Gabriel Dos Reis - - * decl.c (struct cp_binding_level): Move to name-lookup.h - (current_binding_level): Likewise. - (class_binding_level): Likewise. - * cp-tree.h (enum scope_kind): Likewise. - -2003-10-03 Gabriel Dos Reis - - * name-lookup.c (binding_entry_free): Nullify name and type - fields. - -2003-10-02 Mark Mitchell - - PR c++/12486 - * typeck.c (finish_class_member_access_expr): Issue diagnostic - on erroneous use of qualified name. - -2003-09-30 Richard Henderson - - PR c++/12370 - * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too. - -2003-09-30 Kelley Cook - - * g++spec.c: Convert to ISO C90 prototypes. - * parser.c: Likewise. - -2003-09-30 Gabriel Dos Reis - - * decl.c (pop_binding): Don't mess with nullifying binding->scope - here. - * name-lookup.c: Re-format. - (cxx_binding_free): Nullify binding->scope. - -2003-09-29 Jan Hubicka - - PR C++/12047 - * except.c (build_eh_type_type): Call mark_used on the type. - -2003-09-28 Richard Henderson - - * typeck.c (c_expand_asm_operands): Take location_t, instead of - individual file and line. - -2003-09-28 Andreas Jaeger - - * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function - definition. - * init.c (push_base_cleanups): Likewise. - * decl2.c (finish_file): Likewise. - * mangle.c (init_mangle): Likewise. - (dump_substitution_candidates): Likewise. - * search.c: Likewise. - -2003-09-27 Gabriel Dos Reis - - * name-lookup.h (get_global_value_if_present): New function. - (is_typename_at_global_scope): Likewise. - * except.c (do_begin_catch): Use get_global_value_if_present. - (do_end_catch): Likewise. - (do_allocate_exception): Likewise. - (do_free_exception): Likewise. - (build_throw): Likewise. - * parser.c (cp_parser_member_declaration): Likewise. - * rtti.c (throw_bad_cast): Likewise. - (throw_bad_typeid): Likewise. - * decl.c (check_tag_decl): Use is_typename_at_global_scope. - (grokdeclarator): Likewise. - * cp-tree.h (global_namespace): Move to name-lookup.h - * call.c (call_builtin_trap): Tidy. - -2003-09-27 Kriang Lerdsuwanakij - - PR c++/11415 - * parser.c (cp_parser_nested_name_specifier_opt): Issue correct - error message when parser->scope is global_namespace. - -2003-09-27 Gabriel Dos Reis - - * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to - macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE. - -2003-09-26 Gabriel Dos Reis - - * decl.c (pop_binding_level, suspend_binding_level, - find_class_binding_level): Merge into leave_scope. Remove. - (leave_scope): New function. - (poplevel): Update. - (poplevel_class): Likewise. - (pop_namespace): Likewise. - -2003-09-25 Kriang Lerdsuwanakij - - PR c++/5655 - * parser.c (cp_parser_check_access_in_redeclaration): New function. - (cp_parser_member_declaration): Use it. - (cp_parser_template_declaration_after_export): Likewise. - -2003-09-22 Gabriel Dos Reis - - * cp-tree.h (scope_kind): Add new enumerator. - (keep_next_level): Change parameter type to bool. - (begin_scope): Change prototype. - (pushlevel): Remove declaration. - * decl.c (push_binding_level): Fold in begin_scope. Remove. - (struct cp_binding_level): Remove tag_tranparent field. Make keep - of bitsize one. - (keep_next_level_flag): Make a bool. - (cxx_scope_descriptor): Update scope names table - (make_cxx_scope): Fold in begin_scope. Remove.. - (namespace_scope_ht_size): New function. - (begin_scope): Change prototype. Return a scope. Tidy. - (kept_level_p): Update. - (pushlevel): Remove. - (maybe_push_cleanup_level): Simplify. - (poplevel): Update for sk_cleanup and keep change. - (print_binding_level): Likewise. - (initial_push_namespace_scope): Fold in begin_scope. Remove. - (push_namespace): Update. - (pushtag): Likewise. - (lookup_tag): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (cxx_init_decl_processing): Likewise. - (start_function): Likewise. - (begin_function_body): Likewise. - (start_method): Likewise. - * pt.c (push_inline_template_parms_recursive): Likewise. - (begin_template_parm_list): Likewise. - (begin_specialization): Likewise. - * semantics.c (do_pushlevel): Likewise. - (begin_compound_stmt): Likewise. - (begin_stmt_expr): Likewise. - -2003-09-21 Richard Henderson - - * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, - method.c, optimize.c, pt.c, semantics.c, tree.c: Revert. - -2003-09-21 Richard Henderson - - * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, - method.c, optimize.c, pt.c, semantics.c, tree.c: Update for - DECL_SOURCE_LOCATION rename and change to const. - -2003-09-20 Richard Henderson - - * decl.c, decl2.c, pt.c: Use %J in diagnostics. - -2003-09-20 Kriang Lerdsuwanakij - - PR c++/157 - * parser.c (cp_parser_direct_declarator): Clear - parser->num_template_parameter_lists when parsing function - parameters. - (cp_parser_constructor_declarator_p): Likewise. - -2003-09-19 Kriang Lerdsuwanakij - - PR c++/495 - * pt.c (tsubst_friend_class): Only use innermost template - arguments for the injected friend class template. - -2003-09-19 Nathan Sidwell - - PR c++/12332 - * pt.c (instantiate_class_template): Increment - processing_template_decl around the tsubst of a template member - function. - -2003-09-19 Gabriel Dos Reis - - * decl.c (cxx_scope_descriptor): Fix thinko. - (struct cp_binding_level): Adjust type of binding_depth field. - -2003-09-18 Danny Smith - - PR c++/12320 - * call.c (type_passed_as): Check for incomplete type. - (convert_for_arg_passing): Likewise. - -2003-09-18 Nathan Sidwell - - PR c++/9848 - * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters - here. - * semantics.c (expand_body): Set it here on the remaining clones. - -2003-09-18 Roger Sayle - - * lex.c (init_operators): Remove operator_name_info for FFS_EXPR. - * class.c (instantiate_type): Remove FFS_EXPR case. - -2003-09-18 Volker Reichelt - - * ChangeLog: Fix recent commit. - -2003-09-18 Volker Reichelt - - * ChangeLog: Add PR number to patch for PR c++/12316. - -2003-09-18 Gabriel Dos Reis - - * error.c (dump_type): Simplify. Use pp_type_specifier_seq for - "C" types. - * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko. - -2003-09-17 Richard Henderson - - * semantics.c (expand_body): Don't save/restore input_location. - -2003-09-17 Mark Mitchell - - PR c++/12266 - * cp-tree.h (tsubst_flags_t): Add tf_conv. - * class.c (standard_conversion): Pass tf_conv to - instantiate_type. - (resolve_address_of_overloaded_function): Do not call mark_used - when just checking conversions. - - PR debug/12066 - * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define. - * cp-tree.h (cxx_builtin_type_decls): Declare. - * decl.c (builtin_type_decls): New variables. - (cxx_builtin_type_decls): New function. - (record_builtin_type): Add to builtin_type_decls. - -2003-09-17 Richard Henderson - - PR c++/12316 - * semantics.c (expand_or_defer_fn): Inc/dec function_depth. - -2003-09-16 Kriang Lerdsuwanakij - - PR c++/7939 - * typeck.c (comptypes): Don't ICE when its first argument is - error_mark_node. - (compparms): Reverse the arguments of same_type_p. - -2003-09-15 Nathan Sidwell - - PR c++/12184 - * typeck.c (convert_arguments): Return error_mark_node for an - incomplete parameter. Make error message more informative. - -2003-09-12 Mark Mitchell - - PR c++/3907 - * class.c (maybe_note_name_used_in_class): Refine test for whether - or not we are in a class scope. - - * cp-tree.h (language_function): Remove x_expanding_p. - (expanding_p): Remove. - (doing_semantic_analysis_p): Remove. - (scope_kind): Add sk_function_parms, sk_class, - sk_namespace. - (innermost_scope_kind): New method. - * call.c (cxx_type_promotes_to): Use type_decays_to. - * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine. - (LANG_HOOKS_POPLEVEL): Likewise. - * decl.c (cp_binding_level): Remove parm_flag, template_parms_p, - template_spec_p, namespace_p, is_for_scope, is_try_scope, and - is_catch_scope. Add kind and explicit_spec_p. - (cxx_scope_descriptor): Use a lookup table. - (find_class_binding_level): Use "kind" field in binding_level, not - the various flags. - (pop_binding_level): Likewise. - (innermost_nonclass_level): Likewise. - (toplevel_bindings_p): Likewise. - (namespace_bindings_p): Likewise. - (template_parm_scope_p): Likewise. - (innermost_scope_kind): New method. - (current_tmpl_spec_kind): Use "kind" field in binding_level, not - the various flags. - (pushlevel): Remove check for doing_semantic_analysis_p. - (begin_scope): Simplify. - (add_decl_to_level): Use "kind" field in binding_level, not - the various flags. - (push_local_binding): Likewise. - (pop_label): Remove check for doing_semantic_analysis_p. - (poplevel): Use "kind" field in binding_level, not - the various flags. - (set_block): Remove check for doing_semantic_analysis_p. - (pushlevel_class): Use "kind" field in binding_level, not - the various flags. - (poplevel_class): Likewise. - (initial_push_namespace_scope): Likewise. - (maybe_push_to_top_level): Likewise. - (set_identifier_type_value_with_scope): Likewise. - (pop_everything): Likewise. - (maybe_process_template_type_declaration): Likewise. - (pushtag): Likewise. - (pushdecl): Likewise. - (pushdecl_with_scope): Likewise. - (check_previous_goto_1): Likewise. - (define_label): Likewise. - (finish_case_label): Likewise. - (lookup_tag): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_name_real): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (record_builtin_type): Likewise. - (cp_make_fname_decl): Likewise. - (maybe_inject_for_scope_var): Likewise. - (cp_finish_decl): Remove check for doing_semantic_analysis_p. - (start_function): Use begin_scope, not pushlevel. - (finish_function): Use "kind" field in binding_level, not - the various flags. - (start_method): Use begin_scope, not pushlevel. - (make_label_decl): Do not check expanding_p. - (save_function-data): Do not set expanding_p. - (cxx_push_function_context): Do not clear expanding_p. - * semantics.c (cxx_expand_function_start): Do not set expanding_p. - -2003-09-14 Mark Mitchell - - * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for - an bit-field whose width exceeds that of its type. - -2003-09-14 Geoffrey Keating - - * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls. - -2003-09-14 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * parser.c: Likewise. - -2003-09-13 Richard Henderson - - * decl2.c (finish_file): Check cgraph_assemble_pending_functions - during relaxation loop. - -2003-09-11 David Edelsohn - - * decl2.c (var_finalized_p): Swap arms of conditional. - -2003-09-10 Nathan Sidwell - - PR c++/11788 - * typeck.c (build_address): If it is a function, mark it used. - (build_unary_op): Do not lose object's side-effects when taking - address of static member function. - * class.c (resolve_address_of_overloaded_function): Use - tsubst_flags_t parameter. Only expect overload sets. Adjust. - (instantiate_type): Adjust flags passing. Do not lose object's - side-effects when taking address of static member function. - -2003-09-11 Richard Henderson - - * semantics.c (expand_or_defer_fn): Update for new - cgraph_finalize_function argument. - -2003-09-10 Richard Henderson - - * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused. - -2003-09-10 Jan Hubicka - - * decl2.c (var_finalized_p): New. - (maybe_emit_vtables, write_out_vars, finish_file): Use it. - -2003-09-10 Richard Henderson - - * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of - mark_member_pointers. - (lower_function): Remove. - * cp-tree.h: Update to match. - * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New. - (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove. - -2003-09-09 Richard Henderson - - * semantics.c (expand_or_defer_fn): Update call to - cgraph_finalize_function. - - * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function - always. - - * decl2.c (finish_file): Avoid out-of-bounds array reference - during memmove. - -2003-09-09 Richard Henderson - - * decl2.c (mark_member_pointers): Rename from - mark_member_pointers_and_eh_handlers and don't check eh handlers. - -2003-09-09 Christian Ehrhardt - - PR bootstrap/12168 - * method.c (use_thunk): Clear DECL_RTL of copied nodes. - -2003-09-08 Mark Mitchell - - * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to - c_register_builtin_type. - - PR c++/11786 - * decl2.c (add_function): Do not complain about seeing the same - non-function twice. - * semantics.c (perform_koenig_lookup): Improve documentation. - - PR c++/5296 - * pt.c (try_one_overload): Add addr_p parameter. - (resolve_overloaded_unification): Pass it. - -2003-09-08 Richard Henderson - - * optimize.c (maybe_clone_body): Inc/dec function_depth. - -2003-09-08 Richard Henderson - - * decl.c (finish_function): Clear current_function_decl. - * decl2.c (mark_used): Don't push/pop gc context. - * optimize.c (optimize_function): Likewise. - * tree.c (cp_cannot_inline_tree_fn): Likewise. - * pt.c (instantiate_decl): Inc/dec function_depth instead. - * semantics.c (expand_body): Update for tree_rest_of_compilation - nested argument. - -2003-09-07 Gabriel Dos Reis - - PR c++/11762 - * error.c (dump_decl): Handle namespace-alias-definition. - * decl.c (warn_extern_redeclared_static): There is no point in - checking changes in storage class specifier for a namespace - declaration. - (duplicate_decls): Tidy diagnostic message. - * cxx-pretty-print.c (pp_cxx_left_brace): New macro. - (pp_cxx_right_brace): Likewise. - (pp_cxx_original_namespace_definition): New function. - (pp_cxx_namespace_alias_definition): Likewise. - (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs. - -2003-09-07 Jan Hubicka - - * decl2.c (maybe_emit_vtables, write_out_vars, finish_file): - Avoid re-emitting variables in unit-at-a-time mode. - -2003-09-06 Mark Mitchell - - PR c++/11867 - * call.c (standard_conversion): Improve comments. - (perform_direct_initialization): Make sure we return an expression - of the correct type. - * typeck.c (build_static_cast): Check for ambiguity and - accessibility when performing conversions. - -2003-09-06 Gabriel Dos Reis - - * cp-tree.h (add_binding): Remove declaration. - * name-lookup.h (supplement_binding): Declare. - * decl.c (add_binding): Move to name-lookup.c. - (push_local_binding): Adjust. - (push_class_binding): Likewise. - (set_identifier_type_value_with_scope): Likewise. - * name-lookup.c (supplement_binding): Rename from add_binding. - Return a bool. Improve documentation. - (set_namespace_binding): Adjust. - * Make-lang.in (cp/name-lookup.o): Depend on toplev.h - -2003-09-06 Nathan Sidwell - - PR c++/11794 - * class.c (pushclass): Push dependent using decls for nested - classes of templates too. - -2003-09-06 Roger Sayle - - PR c++/11409 - * class.c (resolve_address_of_overloaded_function): When building - list of matching non-template function decls, ignore anticipated - declarations of undeclared or shadowed GCC builtins. - -2003-09-06 Steven Bosscher - - PR c++/11595 - * decl.c (define_label): Remove unreachable timevar pop. - Always return the decl, even if the definition is invalid. - -2003-09-06 Nathan Sidwell - - PR c++/12167 - * parser.c (cp_parser_late_parsing_default_args): Push & pop the - unparsed functions queue. - -2003-09-05 Mark Mitchell - - PR c++/12163 - * call.c (perform_direct_initialization): Correct logic for - direct-initialization of a class type. - - PR c++/12146 - * pt.c (lookup_template_function): Robustify. - -2003-09-05 Nathan Sidwell - - PR c++/11922 - * pt.c (tsubst_qualified_id): Make sure we get a non-type. - (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as - is_type_p to lookup_qualified_name. - - * semantics.c (finish_call_expr): Refactor some code. - - PR c++/12037 - * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New. - (build_min_non_dep): Declare. - * tree.c (build_min): Propagate TREE_SIDE_EFFECTS. - (build_min_non_dep): New. - * cvt.c (convert_to_void): Don't explicitly copy - TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING. - * call.c (build_new_method_call): Use build_min_non_dep. - * decl2.c (grok_array_decl): Likewise. - (build_offset_ref_call_from_tree): Likewise. - * typeck.c (finish_class_member_access_expr, - build_x_indirect_ref, build_x_binary_op, build_x_unary_op, - build_x_conditional_expr, build_x_compound_expr): Likewise. - (build_static_cast, build_reinterpret_cast, - build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template. - * typeck2.c (build_x_arrow): Use build_min_non_dep. - (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a - template. - * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE. - (build_dynamic_cast): Set TREE_SIDE_EFFECTS. - * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED. - -2003-09-04 Richard Henderson - - * decl2.c (mark_member_pointers_and_eh_handlers): Update for - change in cgraph_mark_needed_node arguments. - -2003-09-02 Geoffrey Keating - - PR 12161 - * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context. - * tree.c (cp_cannot_inline_tree_fn): Likewise. - -2003-09-04 Nathan Sidwell - - * cp-tree.h (finish_sizeof, finish_alignof): Remove. - (expr_sizeof): Replace with ... - (cxx_sizeof_or_alignof_expr): ... here. - (cxx_sizeof_or_alignof_type): Make complain parameter a bool. - * parser.c (cp_parser_unary_expression): Commonize alignof and - sizeof handling. - * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof - substitution. - * semantics.c (finish_sizeof, finish_alignof): Remove. - * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter - becomes bool. Set TREE_READONLY. - (expr_sizeof): Replace with ... - (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS. - -2003-09-04 Mark Mitchell - - Remove cast-as-lvalue extension. - * call.c (build_conditional_expr): Correct formatting. - (convert_like_real): Use lvalue_p, not non_cast_lvalue_p. - (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p. - * cp-tree.h (non_cast_lvalue_p): Remove. - (real_non_cast_lvalue_p): Remove. - (non_cast_lvalue_or_else): Remove. - * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter. - (real_lvalue_p): Adjust call to lvalue_p_1. - (non_cast_lvalue_p): Remove. - (non_cast_lvalue_or_else): Remove. - (lvalue_p): Adjust call to lvalue_p_1. - (lvalue_or_else): Simplify. - * typeck.c (build_unary_op): Use lvalue_or_else, not - non_cast_lvalue_or_else. - (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p. - -2003-09-03 DJ Delorie - - * decl.c (finish_function): Pass fndecl to aggregate_value_p. - -2003-09-03 Mark Mitchell - - PR c++/12053 - * class.c (include_empty_classes): Correct logic for ABI version 1. - -2003-09-03 Richard Henderson - - * optimize.c (optimize_function): Push/pop ggc context around - the call to optimize_inline_calls. - -2003-09-02 Scott Brumbaugh - - PR c++/11553 - * parser.c (cp_parser_decl_specifier_seq): Add check for a - duplicate friend decl-specifier. - -2003-09-02 Mark Mitchell - - PR c++/11847 - * pt.c (convert_nontype_argument): Correct representation of - REFERENCE_TYPE expressions. - - PR c++/11808 - * cp-tree.h (KOENIG_LOOKUP_P): New macro. - (finish_call_expr): Change prototype. - * parser.c (cp_parser_postfix_expression): Adjust call to - finish_call_expr. - * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P. - * semantics.c (finish_call_expr): Add koenig_p parameter. - -2003-09-01 Mark Mitchell - - PR c++/12114 - * cp-tree.h (initialize_reference): Change prototype. - * call.c (initialize_reference): Add cleanup parameter. - * decl.c (grok_reference_init): Likewise. - (check_initializer): Likewise. - (cp_finish_decl): Insert a CLEANUP_STMT if necessary. - (duplicate_decls): When replacing an anticipated builtin, do not - honor TREE_NOTHROW. - * typeck.c (convert_for_initialization): Correct call to - initialize_reference. - - PR c++/11972 - * pt.c (dependent_type_p_r): Pass only the innermost template - arguments to any_dependent_template_arguments_p. - -2003-09-01 Josef Zlomek - - * error.c (dump_expr): Kill BIT_ANDTC_EXPR. - * lex.c (init_operators): Kill BIT_ANDTC_EXPR. - * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR. - * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR. - (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR. - -2003-08-29 Mark Mitchell - - PR c++/12093 - * pt.c (build_non_dependent_expr): Do not build a - NON_DEPENDENT_EXPR for a STRING_CST. - - PR c++/11928 - * search.c (add_conversions): Avoid adding two conversion - operators for the same type. - -2003-08-29 Mark Mitchell - - PR c++/6196 - * pt.c (tsubst_copy_and_build): Correct handling of - address-of-label extension. - * semantics.c (finish_goto_stmt): The address of a label must go - through the lvalue-to-rvalue conversion. - -2003-08-29 Richard Henderson - Jason Merrill - - * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New. - (LANG_HOOKS_RTL_EXPAND_STMT): New. - * cp-tree.h (cxx_expand_function_start): Declare. - * decl.c (start_function): Use allocate_struct_function. - Move stmts_are_full_exprs_p assertion from expand_body. - Do not free_after_parsing or free_after_compilation. - (cxx_push_function_context): Move code to set struct function - data from genrtl_start_function. - * optimize.c (optimize_function): Don't inc/dec function_depth. - * semantics.c (expand_body): Use tree_rest_of_compilation. - (cxx_expand_function_start): Rename from genrtl_start_function, - omit bits done by tree_rest_of_compilation. - (genrtl_finish_function): Remove. - (clear_decl_rtl): Move to ../tree-optimize.c. - -2003-08-29 Gabriel Dos Reis - - PR c++/11811 - * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New - function. - * cxx-pretty-print.h: Declare. - * error.c (dump_template_parameter): Use it. - (dump_type): Likewise. - -2003-08-28 Mark Mitchell - - * init.c (decl_constant_value): Deal with COND_EXPR specially. - * call.c (build_conditional_expr): Revert previous patch. - - PR optimization/5079 - * call.c (build_conditional_expr): Use decl_constant_value to - simplify the arguments. - -2003-08-26 Dan Nicolaescu - - * parser.c (struct cp_token): Use enum bitfields. - (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a - 512B allocation unit. - (cp_parser_token_tree_map_node): Use enum bitfields. - -2003-08-26 Nathan Sidwell - - PR c++/11871 - * decl.c (push_class_level_binding): Correct old_decl value from - my 2003-07-29 reorganization. - - * call.c (build_call): Don't set TREE_SIDE_EFFECTS here. - (build_new_method_call): Add goto finish. - * semantics.c (simplify_aggr_init_exprs_r): Don't set - TREE_SIDE_EFFECTS on a call. - -2003-08-25 Richard Henderson - - * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function. - -2003-08-25 Gabriel Dos Reis - - * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag. - (cxx_pretty_printer): Adjust base type. - (pp_cxx_function_specifier): Declare. - * cxx-pretty-print.c (pp_cxx_whitespace): New macro. - (pp_cxx_left_paren): Likewise. - (pp_cxx_right_paren): Likewise. - (pp_cxx_dot): Likewise. - (pp_cxx_arrow): Likewise. - (pp_cxx_semicolon): Likewise. - (pp_cxx_identifier): Likewise. - (pp_cxx_cv_qualifier_seq): Likewise. - (pp_cxx_storage_class_specifier): Likewise. - (pp_cxx_expression_list): Likewise. - (pp_cxx_space_for_pointer_operator): Likewise. - (pp_cxx_init_declarator): Likewise. - (pp_cxx_call_argument_list): Likewise. - (pp_cxx_nonconsecutive_character): Tidy. - (pp_cxx_conversion_function_id): New function. - (pp_cxx_template_id): Likewise. - (pp_cxx_template_keyword_if_needed): Likewise. - (pp_cxx_nested_name_specifier): Likewise. - (pp_cxx_unqualified_id): Tidy - (pp_cxx_qualified_id): Handle more nodes. - (pp_cxx_primary_expression): Tidy. - (pp_cxx_postfix_expression): Likewise. - (pp_cxx_new_expression): Tidy. - (pp_cxx_delete_expression): Likewise. - (pp_cxx_cast_expression): New function. - (pp_cxx_pm_expression): Tidy. - (pp_cxx_conditional_expression): Likewise. - (pp_cxx_assignment_operator): New function. - (pp_cxx_assignment_expression): Tidy. - (pp_cxx_expression): New function. - (pp_cxx_function_specifier): Likewise. - (pp_cxx_decl_specifier_seq): Likewise. - (pp_cxx_simple_type_specifier): Tidy. - (pp_cxx_type_specifier_seq): Likewise. - (pp_cxx_ptr_operator): New function. - (pp_cxx_implicit_parameter_type): Likewise. - (pp_cxx_parameter_declaration): Tidy. - (pp_cxx_parameter_declaration_clause): New function. - (pp_cxx_exception_specification): Likewise. - (pp_cxx_direct_declarator): Tidy. - (pp_cxx_declarator): Likewise. - (pp_cxx_ctor_initializer): New function. - (pp_cxx_function_definition): Likewise. - (pp_cxx_abstract_declarator): Tidy. - (pp_cxx_direct_abstract_declarator): Likewise. - (pp_cxx_type_id): Likewise. - (pp_cxx_exception_declaration): New function. - (pp_cxx_statement): Likewise. - (pp_cxx_simple_declaration): Likewise. - (pp_cxx_template_parameter_list): Likewise. - (pp_cxx_template_parameter): Likewise. - (pp_cxx_template_declaration): Likewise. - (pp_cxx_explicit_specialization): Likewise. - (pp_cxx_explicit_instantiation): Likewise. - (pp_cxx_declaration): Tidy. - (pp_cxx_pretty_printer_init): Initialize more fields. - -2003-08-25 Mark Mitchell - - PR c++/8795 - * cp-tree.h (build_cplus_method_type): Remove. - * call.c (standard_conversion): Use build_method_type_directly - instead of build_cplus_method_type. - * class.c (build_clone): Likewise. - (adjust_clone_args): Likewise. - * decl.c (build_ptrmem_type): Likewise. - (grokdeclarator): Likewise. - (check_function_type): Likewise. - * decl2.c (grok_method_quals): Likewise. - (maybe_retrofit_in_chrg): Likewise. - * pt.c (copy_default_args_to_explicit_spec): Likewise. - (tsubst_function_type): Likewise. - (tsubst): Likewise. - * tree.c (build_cplus_method_type): Remove. - * typeck.c (merge_types): Use build_method_type_directly. - -2003-08-23 Kriang Lerdsuwanakij - - PR c++/3765 - * search.c (dfs_access_in_type): Fix typo in comment. - (dfs_accessible_queue_p): Likewise. - (dfs_accessible_p): Only terminate when a friend is found. - (accessible_p): Return immediately if access_in_type allows - access. - -2003-08-23 Kriang Lerdsuwanakij - - PR c++/641, c++/11876 - * friend.c (add_friend): Add complain parameter. - (make_friend_class): Likewise. - (do_friend): Adjust add_friend call. - * decl.c (grokdeclarator): Adjust make_friend_class call. - * parser.c (cp_parser_member_declaration): Likewise. - (cp_parser_template_declaration_after_export): Likewise. - * pt.c (instantiate_class_template): Adjust make_friend_class - and add_friend call. - * cp-tree.h (make_friend_class): Adjust declaration. - (add_friend): Likewise. - -2003-08-21 Jason Merrill - - PR c++/11283 - * call.c (build_conditional_expr): Ignore cv-qual differences for - non-class types. - -2003-08-21 Mark Mitchell - - PR c++/11551 - * parser.c (cp_parser_id_expression): Add declarator_p parameter. - (cp_parser_primary_expression): Adjust call to - cp_parser_id_expression. - (cp_parser_unqualified_id): Complain about the use of - typedef-names in a destructor declarator. - (cp_parser_postfix_expression): Adjust call to - cp_parser_id_expression. - (cp_parser_type_parameter): Likewise. - (cp_parser_template_argument): Likewise. - (cp_parser_declarator_id): Likewise. - - PR c++/11919 - * call.c (standard_conversion): Use same_type_p, not pointer - equality, to compare types. - - PR c++/10762 - * parser.c (cp_parser_using_declaration): Check for invalid uses - of template-ids here... - * decl2.c (do_class_using_decl): ... rather than here. - -2003-08-20 Mark Mitchell - - PR c++/11834 - * pt.c (more_specialized): Bump processing_template_decl. - -2003-08-21 Jason Merrill - - PR c++/11614 - * decl.c (grokdeclarator): Recognize a flexible array based on the - type, not the form of the declarator. - -2003-08-20 Jason Merrill - - * semantics.c (simplify_aggr_init_expr): Split out from - simplify_aggr_init_exprs_r. Convert slot address to match - the return type. - * cp-tree.h: Declare it. - * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the - DECL_NAME of a user variable. - -2003-08-20 Nathan Sidwell - - PR c++/11945 - * pt.c (build_non_dependent_expr): Look inside COND_EXPR and - COMPOUND_EXPR. - * semantics.c (finish_expr_stmt): Always convert to void. - * typeck.c (build_x_compound_exp): Always convert to void. - -2003-08-19 Mark Mitchell - - PR c++/11684 - * cp-tree.h (grok_op_properties): Change prototype. - * decl.c (grok_op_properties): Add complain parameter. - (grokfndecl): Pass it. - * pt.c (tsubst_decl): Adjust accordingly. - - PR c++/10926 - * decl.c (start_method): Return immediately if push_template_decl - does not like the declaration. - * pt.c (push_template_decl_real): Disallow member template - destructors. - - PR c++/11036 - * cp-tree.h (add_binding): Add prototype. - * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate. - (maybe_warn_about_overly_private_class): Use - CLASSTYPE_DESTRUCTORS. - (pushclass): Adjust call to set_identifier_type_value. - * decl.c (add_binding): Give it external linkage. - (push_local_binding): Adjust call to add_binding. - (push_class_binding): Likewise. - (set_identifier_type_value_with_scope): Change prototype. Use - add_binding for global bindings. - (set_identifier_type_value): Adjust accordingly. - (pushtag): Likewise. - (pushdecl): Use set_identifier_type_value, not - set_identifier_type_value_with_scope. - (pushdecl_namespace_level): Adjust calls to - SET_IDENTIFIER_TYPE_VALUE to pass a DECL. - (pushdecl_class_level): Likewise. - (lookup_tag): Use select_decl. - (select_decl): Improve comment. - (record_builtin_type): Do not call pushdecl. - (cxx_init_decl_processing): Do not call xref_tag for bad_alloc. - (cp_finish_decl): Adjust call to set_identifier_type_value. - (check_elaborated_type_specifier): Improve checks for invalid uses - of typedefs. - (xref_tag): Adjust call to check_elaborated_type_specifier. - * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR. - * name-lookup.c (set_namespace_binding): Use add_binding. - * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL, - rather than an IDENTIFIER_NODE, to represent built-in types, if - requested by the caller. - (cp_parser_postfix_expression): Adjust call. - (cp_parser_type_specifier): Likewise. - (cp_parser_elaborated_type_specifier): Adjust call to - check_elaborated_type_specifier. - * typeck2.c (build_functional_cast): Do not perform name lookups. - - PR c++/10717 - * decl.c (expand_static_init): Remove unnecessary code. - -2003-08-19 Andrew Pinski - - PR c++/10538, PR c/5582 - * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define. - -2003-08-19 Kriang Lerdsuwanakij - - PR c++/11174 - * init.c (build_offset_ref): Perform access checking for - pointer to member correctly. - -2003-08-19 Gabriel Dos Reis - - * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling. - -2003-08-18 Nathan Sidwell - - PR c++/11957 - * cp-tree.h (finish_stmt_expr): Add bool parameter. - * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't - adjust the stmt_expr here. - (build_vec_init): Use finish_stmt_expr_expr, convert result to - array type. - * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr - call. - * pt.c (tsubst_copy): Likewise. - * semantics.c (finish_stmt_expr): Add parameter. - - * pt.c (instantiate_class_template): Push to class's scope before - tsubsting base. - -2003-08-17 Jan Hubicka - - PR C++/11702 - * semantics.c (finish_id_expression): Mark all functions as used. - -2003-08-16 Nathan Sidwell - - PR c++/11512 - * cvt.c (convert_to_void): Indicate which side of conditional has - no effects, and rhs of comma operator. Test for no sideeffect - expressions here and always build a convert expr. - * init.c (expand_default_init): Convert the init to void. - * typeck.c (build_x_compound_expr): Do not check for side effects - here. - (build_compound_expr): Do not convert lhs when building a - template. - -2003-08-15 Nathan Sidwell - - * cp-tree.def (NON_DEPENDENT_EXPR): Add operand. - * decl2.c (build_offset_ref_call_from_tree): Use - build_non_dependent_expr. - * error.c (dump_expr) : Dump the operand. - * pt.c (build_non_dependent_expr): Set operand. - -2003-08-14 Jan Hubicka - - * decl2.c (mark_member_pointers): Rename to... - (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos - (lower_function): Update call. - * except.c (eh_type_info): Break out from ... - (build_eh_type): ... here; tinfo is already used. - (finish_eh_spec_block): Mark tinfos as used. - * semantics.c (finish_handler_params): Mark tinfo as used. - * cp-tree.h (eh_type_info): Declare. - -2003-08-15 Nathan Sidwell - - * pt.c (instantiate_class_template): Set location before - substuting bases. - - * decl.c (make_typename_type): Use my_friendly_assert. - * pt.c (tsubst_aggr_type): Rearrange context substitution. - -2003-08-14 Jan Hubicka - - * method.c (use_thunk): Expand body directly. - -2003-08-12 Mark Mitchell - - PR c++/11703 - * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to - determine whether or not to promote types. - (convert_for_arg_passing): Likewise. - * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in - templates. - * pt.c (tsubst_decl): Do not expect it to be set. - - PR c++/9512 - PR c++/10923 - * cp-tree.h (check_elaborated_type_specifier): Declare. - (handle_class_head): Remove. - (note_got_semicolon): Likewise. - (note_list_got_semicolon): Likewise. - (finish_class_definition): Likewise. - * decl.c (check_elaborated_type_specifier): Make it public. - Robustify. - (handle_class_head): Remove. - * parser.c (cp_parser_elaborated_type_specifier): Use - check_elaborated_type_specifier. - (cp_parser_class_specifier): Do not call finish_class_definition. - (cp_parser_class_head): Or handle_class_head. Check for - over-qualified names. - * semantics.c (finish_class_definition): Remove. - - * parser.c (cp_parser_check_for_definition_in_return_type): New - function. - (cp_parser_simple_declaration): Adjust call to - cp_parser_init_declarator. - (cp_parser_decl_specifier_seq): Change type of - declares_class_or_enum parameter. - (cp_parser_explicit_instantiation): Adjust accordingly. - (cp_parser_type_specifier): Change type of - declares_class_or_enum parameter. - (cp_parser_init_declarator): Add declares_class_or_enum - parameter. - (cp_parser_parameter_declaration): Adjust call to - cp_parser_decl_specifier_seq. - (cp_parser_function_definition): Likewise. - (cp_parser_member_declaration): Likewise. - (cp_parser_single_declaration): Likewise. - - * cp-tree.h (lang_type_class): Remove has_call_overloaded, - has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon. - (TYPE_OVERLOADS_CALL_EXPR): Remove. - (TYPE_OVERLOADS_ARRAY_REF): Likewise. - (TYPE_OVERLOADS_ARROW): Likewise. - (CLASSTYPE_GOT_SEMICOLON): Likewise. - * class.c (check_bases): Do not set them. - (finish_struct_1): Likewise. - * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON. - (build_ptrmemfunc_type): Likewise. - (grok_op_properties): Do not set TYPE_OVERLOADS_*. - (start_function): Do not check CLASSTYPE_GOT_SEMICOLON. - * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON. - * lex.c (note_got_semicolon): Remove. - (note_list_got_semicolon): Likewise. - * parser.c (cp_parser_simple_declaration): Do not call - note_list_got_semicolon. - * pt.c (list_eq): Remove. - (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON. - (instantiate_class_template): Do not set TYPE_OVERLOADS*. - (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON. - * ptree.c (cxx_print_type): Do not print them. - * semantics.c (finish_member_class_template): Do not call - note_list_got_semicolon. - -2003-08-11 Aldy Hernandez - - * call.c (standard_conversion): Opaque pointers interconvert. - - * testsuite/g++.dg/other/opaque-3.C: New. - -2003-08-11 Mark Mitchell - - * typeck.c (merge_types): Handle cv-qualified pointer-to-member - types correctly. - -2003-08-10 Mark Mitchell - - PR c++/11789 - * cp-tree.h (get_vbase): Remove. - (get_vbase_types): Remove. - * init.c (expand_member_init): Correct logic for looking up base - classes. - -2003-08-10 Gabriel Dos Reis - - * error.c (dump_expr): Tidy. - * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New. - (pp_cxx_begin_template_argument_list): Likewise. - (pp_cxx_end_template_argument_list): Likewise. - (is_destructor_name): Likewise. - (pp_cxx_unqualified_id): Likewise. - (pp_cxx_qualified_id): Likewise. - (pp_cxx_id_expression): Likewise. - (pp_cxx_new_expression): Likewise. - (pp_cxx_delete_expression): Likewise. - (pp_cxx_pm_expression): Likewise. - (pp_cxx_type_specifier): Rework. - (pp_cxx_type_id): Likewise. - (pp_cxx_primary_expression): Likewise. - (pp_cxx_postfix_expression): Likewise. - (pp_cxx_unary_expression): Likewise. - (pp_cxx_multiplicative_expression): Likewise. - (pp_cxx_conditional_expression): Likewise. - (pp_cxx_assignment_expression): Likewise. - (pp_cxx_pretty_printer_init): Tidy. - -2003-08-10 Nathan Sidwell - - * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL - NODE is always a TREE_VEC of nonzero size. - (NUM_TMPL_ARGS): NODE is always a TREE_VEC. - * decl2.c (arg_assoc): Template args will be a vec. - * error.c (dump_decl) : Call - dump_template_argument_list. - (dump_template_parms): Args will be a vec. - * parser.c (cp_parser_template_argument_list): Produce a - vector, not a list. - * pt.c (coerce_template_parms): Args are always vectors. - (mangle_class_name_for_template): Likewise. - (lookup_template_function): Likewise. - (lookup_template_class): Likewise. - (tsubst_template_args): Likewise. - (tsubst_baselink): Use tsubst_template_args. - (tsubst_qualified_id): Likewise. - (tsubst_copy) : Likewise. - (tsubst_copy_and_build) : Likewise. - (any_dependent_template_args_p): Args are always vectors. - * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case. - - PR c++/11670 - * call.c (convert_like_real): Add rvalue binding error message. - * error.c (dump_expr) : Detect when the no expr is - really a cast. - - PR c++/10530 - * pt.c (dependent_type_p_r): A dependent template-id is a class - type with dependent template arguments, or a bound template - template parameter. - (type_dependent_expression_p): A template function decl cannot - have a dependent context. - -2003-08-07 Kriang Lerdsuwanakij - - PR c++/5767 - * parser.c (cp_parser_class_name): Return immediately when scope - is error_mark_node. - -2003-08-07 Aldy Hernandez - - * cp/Make-lang.in (cp/call.o): Add dependency for target.h. - - * cp/call.c (standard_conversion): Support opaque types. - Include target.h. - (strip_top_quals): Use cp_build_qualified_type instead of - TYPE_MAIN_VARIANT. - - * cp/typeck.c (convert_for_assignment): Support opaque types. - - * testsuite/g++.dg/other/opaque-1.C: New. - - * testsuite/g++.dg/other/opaque-2.C: New. - -2003-08-06 Aldy Hernandez - - * decl.c (grokparms): Use cp_build_qualified_type instead - TYPE_MAIN_VARIANT. - -2003-08-05 Gabriel Dos Reis - - * cxx-pretty-print.h: New file. - * cxx-pretty-print.c: Likewise. - * error.c (scratch_pretty_printer): Change type. - (init_error): Tidy. - (dump_aggr_type): Likewise. - (dump_global_iord): Likewise. - (dump_expr): Likewise. - (dump_char): Remove. - * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define. - (cxx_initialize_diagnostics): New function. - * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o - (CXX_PRETTY_PRINT_H): New variable. - (cp/cxx-pretty-print.o): New rule. - (cp/cp-lang.o): Update dependence. - (cp/error.o): Likewise. - -2003-08-05 Steven Bosscher - - * cp-tree.h (struct lang_decl): Don't include c_lang_decl. - (DECL_DECLARED_INLINE_P): Remove. - * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P - if decl is a FUNCTION_DECL. This never made sense, but now it is - required to avoid a tree check failure. - * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC. - * optimize.c (maybe_clone_body): Likewise. - -2003-08-04 Roger Sayle - - * decl.c (cxx_insert_default_attributes): Delete. - * cp-tree.h (cxx_insert_default_attributes): Don't prototype. - * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. - -2003-08-03 Nathan Sidwell - - PR c++/11704 - * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with - unknown type. - - PR c++/11766 - * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to - member functions. - -2003-08-02 Nathan Sidwell - - PR c++/9447 - * cp-tree.def (USING_DECL): Document its type. - * class.c (pushclass): If we're entering a template, push any - dependent using decls it has. - * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is - a dependent scope. - * pt.c (tsubst_decl) : Set type. - (tsubst): Remove USING_DECL checks. - (type_dependent_expression_p): Remove USING_DECL case. - * semantics.c (finish_member_declaration): A USING_DECL's type - indicates whether it is dependent. - -2003-08-02 Nathan Sidwell - - * cp-tree.h (pushclass): Remove unneeded parameter. - * class.c (pushclass): Remove unneeded MODIFY parm. Adjust. - (push_nested_class): Adjust pushclass call. - * pt.c (instantiate_class_template): Likewise. - * semantics.c (begin_class_definition): Likewise. - -2003-08-01 Nathanael Nerode - - * typeck2.c (add_exception_specifier): Use 'bool' where appropriate. - -2003-08-01 Mark Mitchell - - PR c++/11697 - * decl.c (decls_match): Don't ignore the types of template - classes. - - PR c++/11744 - * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic. - -2003-08-01 Kriang Lerdsuwanakij - - PR c++/8442, c++/8806 - * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are - preferred. - (check_elaborated_type_specifier): Add allow_template_p - parameter. Check tag mismatch and class template. - (xref_tag): Add template_header_p parameter. Add assertion - that name is an IDENTIFIER_NODE. Remove implicit typename - warning. Simplify lookup process if globalize is true. - (cxx_init_decl_processing): Adjust call to xref_tag. - (xref_tag_from_type): Likewise. - * decl2.c (handle_class_head): Likewise. - * parser.c (cp_parser_elaborated_type_specifier, - cp_parser_class_head): Likewise. - * rtti.c (init_rtti_processing, build_dynamic_cast1, - tinfo_base_init, emit_support_tinfos): Likewise. - * class.c (is_base_of_enclosing_class): Remove. - * pt.c (convert_template_argument): Don't accept RECORD_TYPE as - template template argument. - * cp-tree.h (xref_tag): Adjust declaration. - (is_base_of_enclosing_class): Remove. - * NEWS: Document template template argument change. - -2003-08-01 Nathan Sidwell - - * parser.c (cp_parser_init_declarator, - cp_paser_member_declaration): Reformat. - * pt.c (lookup_template_class, type_unification_real, unify, - type_dependent_expression_p): Reformat. - - PR c++/11295 - * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd, - tf_stmt_expr_body. - (finish_stmt_expr_expr): Declare. - * parser.c (cp_parser_primary_expression): Tell - cp_parser_compount_statement that it is a statement expression. - (cp_parser_statement, cp_parser_labeled_statement, - cp_parser_compound_statement, cp_parser_statement_seq_opt): Add - in_statement_expr_p parameter. - (cp_parser_expression_statement): Likewise. Call - finish_stmt_expr_expr for final expression of a statement - expression. - (cp_parser_for_init_statement, - cp_parser_implicitly_scoped_statement, - cp_parser_already_scoped_statement, cp_parser_function_definition, - cp_parser_try_block, cp_parser_handled): Adjust. - * pt.c (tsubst_copy) : Pass tf_stmt_expr. - (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags. - (tsubst_expr) : Check tf_stmt_exprs flag. - * semantics.c (finish_expr_stmt): Do not deal with statement - expressions. - (begin_stmt_expr): Clear last_expr_type. - (finish_stmt_expr_expr): New. - (finish_stmt_expr): Process the value expression. - - * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the - compound expr inside the target's initializer. - - PR c++/11525 - * parser.c (cp_parser_primary_expression): Do not set - non-constant-p merely because it is a dependent scope. - - PR c++/9447 - * decl2.c (do_class_using_decl): Set type to NULL_TREE. - * semantics.c (finish_expr_stmt): Do not convert to void in a - template. - -2003-07-31 Nathan Sidwell - - * pt.c (coerce_template_parms): Refactor. - (fn_type_unification): Increment processing_template_decl when - tsubsting an incomplete set of explicit args. - - PR c++/11347 - * pt.c (instantiate_class_template): Increment - processing_template_decl around the tsubst of a template member - class. - (tsubst_qualified_id): Assert we do not have a dependent scope. - - * pt.c (coerce_template_template_parms, lookup_template_class, - can_complete_type_without_circularity, instantiate_class_template, - tsubst_decl, unify): Reformat. - -2003-07-31 Jan Hubicka - - * decl2.c (maybe_make_one_only): Use mark_referenced. - * method.c (use_thunk): Likewsie. - -2003-07-30 Jan Hubicka - - * class.c (build_vtable_entry_ref): Kill. - (build_vtbl_ref_1): Do not call build_vtable_entry_ref. - (build_vfn_ref): Do not call build_vtable_entry_ref. - * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill. - * cp-tree.h (prepare_assemble_variable): Kill. - * cp-decl.c (prepare_assemble_variable): Kill. - -2003-07-29 Geoffrey Keating - - * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead - of setting valid_pch by hand. - -2003-07-29 Rainer Orth - - * decl.c (finish_enum): Initialize underlying_type. - -2003-07-29 Nathan Sidwell - - PR c++/9447 - * decl.c (add_binding): Add bval local variable. - (push_class_level_binding): Likewise. Allow a USING_DECL to be - pushed. - * decl2.c (do_class_using_decl): The type of a using decl is - unknown. - * parser.c (cp_parser_postfix_expression): Refactor unqualified-id - function call lookup code. - * pt.c (tsubst): A USING_DECL will have unknown type. - (tsubst_copy_and_build): Allow a using decl. - (type_dependent_expression_p): A USING_DECL will make it - dependent. - * semantics.c (finish_member_declaration): Push a dependent using - declaration. - -2003-07-28 Mark Mitchell - - PR c++/11530 - * parser.c (cp_parser_postfix_expression): Do not call mark_used. - * semantics.c (finish_id_expression): Call mark_used for all - declarations. - -2003-07-28 Mark Mitchell - - PR c++/11667 - * call.c (standard_conversion): Allow all integral->enumeral - conversions, after marking them as bad. - * decl.c (finish_enum): Make sure that all enumerators are - properly converted to the underlying type. - (build_enumerator): Set DECL_CONTEXT for namespace-scope - enumeration types. - * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly. - (tsubst_enum): Tidy. - - * Make-lang.in (typeck.o): Depend on convert.h. - (class.o): Likewise. - (rtti.o): Likewise. - * call.c: Include convert.h. - (convert_arg_to_ellipsis): Use convert_to_real. - * class.c: Include convert.h. - (build_base_path): Use convert_to_integer. - * rtti.c: Include convert.h. - (build_headof): Use convert_to_integer. - * typeck.c: Include convert.h. - (decay_conversion): Use convert_to_integer. - (build_unary_op): Use build_nop. - (get_delta_difference): Use convert_to_integer. - (build_ptrmemfunc): Avoid unnecessary conversions. - -2003-07-28 Jan Hubicka - - * decl2.c (mark_member_pointers): Verify that member pointer points to - the function. - -2003-07-28 Nathan Sidwell - - * cp-tree.h (begin_compound_stmt): No scope arg is a bool. - (finish_compound_stmt): Remove no scope arg. - * decl.c (register_dtor_fn): Adjust begin_compound_stmt and - end_compound_stmt calls. - (expand_static_init, begin_destructor_body, begin_function_body, - finish_function_body): Likewise. - * decl2.c (start_objects, finish_objects, - start_static_storage_duration_function, - finish_static_storage_duration_function): Likewise. - * init.c (begin_init_stmts, finish_init_stmts, - construct_virtual_base, build_vec_init): Likewise. - * method.c (do_build_assign_ref, synthesize_method): Likewise. - * parser.c (cp_parser_compound_statement, - cp_parser_implicitly_scoped_statement, - cp_parser_already_scoped_statement): Likewise. - * pt.c (tsubst_expr): Likewise. - * semantics.c (begin_compound_stmt): No scope arg is a bool. - (finish_compound_stmt): Remove no scope arg. - - * error.c (dump_expr) : A compound expr is - always dyadic. - -2003-07-27 Mark Mitchell - - * call.c (standard_conversion): Tweak handling of - pointer-to-member types. - * pt.c (tsubst): Correctly qualify pointers-to-data member types. - * typeck.c (comp_ptr_ttypes_real): Check qualifiers on - pointer-to-data member types. - -2003-07-27 Nathan Sidwell - - * parser.c (cp_parser_type_parameter): Reformat. - (cp_parser_parameter_declaration): Deprecate default args where - not allowed. - -2003-07-26 Nathan Sidwell - - * cfns.h: Rebuilt. - - * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove. - (begin_global_stmt_expr, finish_global_stmt_expr): Remove. - * init.c (begin_init_stmts): Make static. Return is_global - value. Always call begin_stmt_expr. - (finish_init_stmts): Make static. Add is_global parm. Always - building a stmt tree. - (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls. - (build_vec_init): Likewise. Always building a stmt tree. - (expand_default_init): Always building a stmt tree. - (get_temp_regvar): Likewise. - * semantics.c (begin_global_stmt_expr, - finish_global_stmt_expr): Remove. - -2003-07-25 Nathan Sidwell - - * cp-tree.h (build_compound_expr): Take LHS & RHS args. - (build_x_compound_expr_from_list): Declare. - * typeck.c (build_x_compound_expr_from_list): New. - (build_x_compound_expr): Adjust. - (build_compound_expr): Remove unreachable code. Take two - parameters, adjust. - * decl.c (grok_reference_init): Use - build_x_compound_expr_from_list. - (expand_static_init): Adjust build_compound_expr call. - (cxx_maybe_build_cleanup): Likewise. - * init.c (perform_member_init): Use - build_x_compound_expr_from_list. - (build_new_1): Likewise. - (build_vec_delete): Adjust build_compound_expr calls. - (build_vbase_delete): Likewise. - * typeck2.c (store_init_value): Use - build_x_compound_expr_from_list. - (build_functional_cast): Likewise. - -2003-07-25 Nathan Sidwell - - * cp-tree.h (enum tsubst_flags_t): Add tf_user. - * decl.c (make_typename_type): Pass it. - * pt.c (lookup_template_class): Use it. - (resolve_typename_type): Pass it. - * semantics.c (finish_template_type): Pass it. - -2003-07-25 Nathan Sidwell - - PR c++/11617 - * cp-tree.h (qualified_name_lookup_error): Declare. - * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for - errors. - (tsubst_expr) : Likewise. - (tsubst_copy_and_build) : Likewise. - * semantics.c (qualified_name_lookup_error): New, broken out of ... - (finish_id_expression): ... here. Use it. - -2003-07-25 Falk Hueffner - - * cfns.gperf: Add '%%' delimiter to placate gperf 3.0. - -2003-07-25 Nathan Sidwell - - PR c++/11596 - * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove. - (tsubst_template_arg): New. - (tsubst_template_arg_vector): Rename to ... - (tsubst_template_args): ... this. Accept a TREE_LIST form. Use - tsubst_template_arg. - (coerce_template_parms): Use tsubst_template_arg for default - value. - (tsubst_template_parms): Likewise. - (tsubst_aggr_type): Adjust. - (tsubst_decl): Likewise. - (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust. - (tsubst_copy) : Use tsubst_template_args. - -2003-07-25 Gabriel Dos Reis - - * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H. - * error.c: Use the new pretty-printer framework. - -2003-07-24 Per Bothner - - * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc - which causes errors messages to incorrectly mention included files. - -2003-07-24 Mark Mitchell - - * cp-tree.h (convert_to_base_statically): Declare. - * call.c (build_special_member_call): Convert INSTANCE to the base - type. - * class.c (convert_to_base_statically): New method. - * init.c (construct_virtual_base): Use it. - * method.c (do_build_assign_ref): Fix typo in comment. - -2003-07-24 Jason Merrill - - * decl.c: Just set truthvalue_* to boolean_*. - -2003-07-24 Nathan Sidwell - - * decl.c (reshape_init): Remove unreachable code. - -2003-07-24 Kriang Lerdsuwanakij - - PR c++/11513 - * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope. - -2003-07-23 Mark Mitchell - - PR c++/11645 - * cp-tree.h (accessible_base_p): Declare. - * call.c (build_over_call): Use it. - * search.c (accessible_base_p): New function, split out from ... - (lookup_base): ... here. - - PR c++/11517 - * call.c (build_conditional_expr): Use perform_implicit_conversion - and error_operand_p. Robustify. - * typeck.c (build_unary_op): Use perform_implicit_conversion. - -2003-07-23 Nathan Sidwell - - PR c++/10953 - * parser.c (cp_parser_nested_name_specifier): Reset scope on - failure. - (cp_parser_elaborated_type_specifier): Likewise. - -2003-07-22 Mark Mitchell - - Eliminate use of POINTER_TYPE for pointers-to-members. - * call.c (standard_conversion): Rework pointer-to-member handling. - Add comments. - (add_builtin_candidate): Likewise. - (resolve_scoped_fn_name): Remove. - (build_conditional_expr): Rework pointer-to-member handling. - (compare_ics): Likewise. - * class.c (check_field_decls): Use TYPE_PTR_P. - * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member - handling. - * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P. - (TYPE_PTRMEM_P): Add comment. - (TYPE_PTR_P): Simplify. - (TYPE_PTROB_P): Correct definition. - (TYPE_PTR_TO_MEMBER_P): New macro. - (TYPE_PTRMEM_CLASS_TYPE): Adjust. - (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. - (resolved_scoped_fn_name): Remove declaration. - (build_offset_ref): Change prototype. - (resolve_offset_ref): Remove. - (comp_target_types): Remove. - * cvt.c (cp_convert_to_pointer): Rework pointer-to-member - handling. - (convert_to_reference): Use can_convert. - (ocp_convert): Improve error handling. Rework pointer-to-member - handling. - (perform_qualification_conversions): Rework pointer-to-member - handling. - * decl.c (build_ptrmem_type): Handle functions too. - (create_array_type_for_decl): Remove OFFSET_TYPE error message. - (grokdeclarator): Use OFFSET_TYPE for pointers to data members. - (grokparms): Remove OFFSET_TYPE error message. - * dump.c (cp_dump_tree): Rework pointer-to-member handling. - * error.c (dump_type_prefix): Likewise. - * expr.c (cplus_expand_constant): Use build_nop. - * init.c (build_offset_ref): Add address_p parameter. Fold in - necessary bits from resolve_offset_ref. - (resolve_offset_ref): Remove. - * parser.c (cp_parser_postfix_expression): Remove special case - code for OFFSET_TYPE. - * pt.c (convert_nontype_argument): Rework pointer-to-member - handling. - (convert_template_argument): Likewise. - (unify): Likewise. - (invalid_nontype_parm_type_p): Likewise. - (dependent_type_p_r): Likewise. - * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case. - (target_incomplete_p_): Rework pointer-to-member - handling. - (get_pseudo_ti_init): Likewise. - (get_pseudo_ti_desc): Likewise. - * semantics.c (finish_qualified_id_expr): Adjust call to - build_offset_ref. Remove use of resolve_offset_ref. - * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P. - * typeck.c (target_type): Use TYPE_PTRMEM_P. - (type_unknown_p): Remove obsolete code about the time before - non-dependent expressions were handled correctly. - (qualify_type_recursive): Remove. - (composite_pointer_type_r): New function. - (composite_pointer_type): Use it. - (merge_types): Remove dead comments. - (comp_cv_target_types): Remove. - (comp_target_types): Likewise. - (comp_target_parms): Likewise. - (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error. - (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P. - (build_binary_op): Do not use of comp_target_types. - (pointer_diff): Remove OFFSET_TYPE case. - (build_unary_op): Adjust pointer-to-member handling. - (unary_complex_lvalue): Likewise. - (check_for_casting_away_constness): Add description parameter. - (build_static_cast): Pass it. - (build_reinterpret_cast): Use check_for_casting_away_constness. - (build_const_cast): Adjust pointer-to-member handling. - (build_c_cast): Likewise. - (convert_for_assignment): Remove OFFSET_TYPE error message. - (comp_ptr_ttypes_real): Adjust pointer-to-member handling. - (comp_ptr_ttypes_reinterpret): Remove. - (casts_away_constness_r): Adjust pointer-to-member handling. - (casts_away_constness): Liekwise. - (strip_all_pointer_quals): Remove. - * typeck2.c (digest_init): Adjust pointer-to-member handling. - (build_m_component_ref): Likewise. - -2003-07-22 Wolfgang Bangerth - - * lex.c (unqualified_fn_lookup_error): Mention that the error - message needs to be kept in synch with the manual. - -2003-07-22 Nathan Sidwell - - PR c++/11614 - * decl.c (grokdeclarator): An array member is only a flexible - array member if the field itself is the array. - -2003-07-22 Kriang Lerdsuwanakij - - PR c++/10793 - * decl.c (xref_basetypes): Handle error_mark_node. - -2003-07-22 Nathan Sidwell - - * cp-tree.h (enum cp_lvalue_kind): Add clk_packed. - * tree.c (lvalue_p_1): Set it. - * class.c (check_field): Don't allow non-packed non-POD fields to - be packed. - * call.c (reference_binding): Need a temporary for all bitfield - and packed fields. - (convert_like_real): Check it is ok to make a temporary here. - -2003-07-21 Nathan Sidwell - - * cp-tree.h (hack_identifier): Remove. - * method.c (hack_identifier): Remove. - * semantics.c (finish_id_expression): Expand hack_identifier - here. Simplify. - -2003-07-19 Kaveh R. Ghazi - - * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c - semantics.c typeck.c: Remove unnecessary casts. - -2003-07-18 Nathan Sidwell - - * cp-tree.h (hack_identifier): Remove. - * method.c (hack_identifier): Remove. - * semantics.c (finish_id_expression): Expand hack_identifier - here. Simplify. - -2003-07-18 Nathan Sidwell - - * cp-tree.h (finish_non_static_data_member): Add object param. - * method.c (hack_identifier): Adjust. - * pt.c (tsubst_copy_and_build) : Don't search - again for a FIELD_DECL. - * semantics.c (finish_non_static_data_member): Add object - parameter. Always save the DECL in the COMPONENT_REF. - * call.c (resolve_scoped_fn_name): Adjust. - -2003-07-17 Zack Weinberg - - * pt.c (get_bindings): Make definition consistent with - forward declaration. - -2003-07-17 Kriang Lerdsuwanakij - - PR c++/7809 - * friend.c (add_friend): Check access for member functions - and templates. - -2003-07-17 Gabriel Dos Reis - - PR c++/10668 - * typeck.c (build_class_member_access_expr): Improve diagnostic. - -2003-07-16 Mark Mitchell - - PR c++/11547 - * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New - macro. - (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK. - * decl.c (duplicate_decls): Merge - DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. - * parser.c (cp_parser_postfix_expression): Adjust call to - cp_parser_initializer_list and - cp_parser_parenthesized_expression_list. - (cp_parser_parenthesized_expression_list): Add non_constant_p. - (cp_parser_new_placement): Adjust call to - cp_parser_parenthesized_expression_list. - (cp_parser_direct_new_declarator): Likewise. - (cp_parser_conditional_expression): Remove. - (cp_parser_constant_expression): Parse an assignment-expression, - not a conditional-expression. - (cp_parser_simple_declaration): Resolve expression/declaration - ambiguity more quickly. - (cp_parser_mem_initializer): Adjust call to - cp_parser_parenthesized_expression_list. - (cp_parser_init_declarator): Keep track of whether or not the - initializer is a constant-expression. - (cp_parser_initializer): Add non_constant_p parameter. - (cp_parser_initializer_clause): Likewise. - (cp_parser_initializer_list): Likewise. - (cp_parser_attribute_list): Adjust call to - cp_parser_parenthesized_expression_list. - (cp_parser_functional_cast): Likewise. - * pt.c (tsubst_decl): Copy - DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. - (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P. - * semantics.c (finish_id_expression): Use - DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. - -2003-07-16 Neil Booth - - * lang-options.h: Remove. - -2003-07-16 Andrew Pinski - - PR c/10962 - * class.c (field_decl_cmp): Remove. - (resort_field_decl_cmp): Remove. - (resort_sorted_fields): Remove. - (add_fields_to_vec): Rename to ... - (add_fields_to_record_type): this. - (finish_struct_1): Change to be using - sorted_fields_type's fields. - * cp-tree.h (lang_decl): In lang_decl_u3 - change sorted_fields to be a pointer to - sorted_fields_type. - (resort_sorted_fields): Remove prototype. - * search.c (lookup_field_1): Change to be using - sorted_fields_type's fields. - -2003-07-16 Kriang Lerdsuwanakij - - PR c++/5421 - * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend - is a member of other class. - * friend.c (do_friend): Don't build TEMPLATE_DECL if friend - is a specialization of function template. - -2003-07-16 Gabriel Dos Reis - - PR c++/10903 - * pt.c (convert_nontype_argument): Fix thinko in diagnostic. - Improve. - -2003-07-15 Mark Mitchell - - * cp-tree.def (LOOKUP_EXPR): Remove. - * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT. - (LOOKUP_EXPR_GLOBAL): Remove. - (get_bindings): Remove. - (is_aggr_type_2): Remove. - * call.c (resolved_scoped_fn_name): Remove support for - LOOKUP_EXPR. - * decl.c (grokfndecl): Likewise. - (grokdeclarator): Likewise. - * error.c (dump_decl): Likewise. - (dump_expr): Likewise. - * friend.c (do_friend): Likewise. - * init.c (build_offset_ref): Likewise. - * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create - LOOKUP_EXPRs - * mangle.c (write_expression): Remove support for LOOKUP_EXPR. - * parser.c (cp_parser_postfix_expression): Modify Koenig lookup - test. - * pt.c (get_bindings): Give it internal linkage. - (check_explicit_specialization): Remove support for LOOKUP_EXPR. - (lookup_template_function): Likewise. - (for_each_tempalte_parm_r): Likewise. - (tsubst_decl): Likewise. - (tsubst_qualified_id): Handle template template parameters. - (tsubst_copy): Remove support for LOOKUP_EXPR. - (tsubst_copy_and_build): Likewise. - (most_general_template): Likewise. - (value_dependent_expression_p): Likewise. - (type_dependent_expression_p): Note that IDENTIFIER_NODEs are - always dependent. - * semantics.c (perform_koenig_lookup): Do not create - IDENTIFIER_NODEs. - (finish_fname): Likewise. - (finish_id_expression): Likewise. - * tree.c (is_aggr_type_2): Remove. - -2003-07-16 Gabriel Dos Reis - - PR c++/11531 - * typeck.c (check_return_expr): Fix thinko in diagnostic. - -2003-07-15 Kriang Lerdsuwanakij - - PR c++/10108 - * pt.c (tsubst_decl) : Add a check for - error_mark_node. - -2003-07-14 Mark Mitchell - - PR c++/11509 - * pt.c (dependent_scope_ref_p): New function. - (value_dependent_expression_p): Use it. - (type_dependent_expression_p): Likewise. - - * pt.c (tsubst_friend_function): Use reregister_specialization. - - PR c++/7019 - * cp-tree.h (lookup_qualified_name): Adjust prototype. - * decl.c (lookup_qualified_name): Add complain parameter. Adjust - call to is_aggr_type. - * parser.c (cp_parser_lookup_name): Adjust call to - lookup_qualified_name. - * pt.c (tsubst_qualified_id): Likewise. - (tsubst_copy_and_build): Likewise. - * semantics.c (finish_qualified_id_expr): Deal with erroneous - expressions. - -2003-07-14 Gabriel Dos Reis - - PR c++/11510 - * call.c (op_error): Properly format REALPART_EXPR and - IMAGPART_EXPR. - * error.c (dump_expr): Likewise. - -2003-07-14 Gabriel Dos Reis - - * error.c (dump_expr): Handle EMPTY_CLASS_EXPR. - -2003-07-14 Gabriel Dos Reis - - PR c++/5293 - * call.c (initialize_reference): Improve diagnostic. - -2003-07-14 Kriang Lerdsuwanakij - - PR c++/11154 - * pt.c (more_specialized_class): Add full_args parameter. - (most_specialized_class): Adjust calls to more_specialized_class. - * cp-tree.h (more_specialized_class): Adjust declaration. - -2003-07-14 Dan Nicolaescu - - * lex.c (enum tree_node_kind): Delete. - -2003-07-13 Mark Mitchell - - PR c++/11503 - * cp-tree.h (DECL_SELF_REFERENCE_P): New macro. - (SET_DECL_SELF_REFERENCE_P): Likewise. - * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P. - * pt.c (tsubst_decl): Copy it. - * search.c (lookup_base): Use DECL_SELF_REFERENCE_P. - - * pt.c (reregister_specialization): Fix thinko in previous change. - - * cp-tree.h (cp_id_kind): New type. - (unqualified_name_lookup_error): Change prototype. - (unqualified_fn_lookup_error): New function. - (do_identifier): Remove. - (do_scoped_id): Likewise. - (tsubst_copy_and_build): Change prototype. - (reregister_specialization): New function. - (perform_koenig_lookup): Likewise. - (finish_id_expression): Likewise. - * call.c (build_method_call): Adjust call to - unqualified_name_lookup_error. - * decl.c (duplicate_decls): Use reregister_specialization. - * lex.c (is_global): Remove. - (unqualified_name_lookup_error): Return a value. - (do_identifier): Remove. - (do_scoped_id): Likewise. - (identifier_typedecl_value): Remove. - (unqualified_fn_lookup_error): New function. - * parser.c (cp_parser_id_kind): Remove. - (cp_parser_non_constant_id_expression): Remove. - (cp_parser_primary_expression): Use finish_id_expression. - (cp_parser_class_or_namespace_name): Use cp_id_kind, not - cp_parser_id_kind. - (cp_parser_postfix_expression): Use perform_koenig_lookup. - (cp_parser_template_argument): Use cp_id_kind. - (cp_parser_fold_non_dependent_expr): Adjust call to - tsubst_copy_and_build. - * pt.c (unregister_specialization): Rename to ... - (reregister_specialization): This. - (tsubst_friend_function): Use it. - (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build. - (tsubst_qualified_id): Likewise. - (tsubst_expr): Likewise. - (tsubst_copy_and_build): Add function_p parameter. Use - finish_id_expression. Introduce RECUR macro. - (tsubst_non_call_postfix_expression): New function. - (regenerate_decl_from_template): Use reregister_specialization. - * semantics.c (perform_koenig_lookup): New function. - (finish_id_expression): Likewise. - -2003-07-13 Kriang Lerdsuwanakij - - * pt.c (push_access_scope_real): Remove. - (push_access_scope): Move code from push_access_scope_real. - (pop_access_scope): Don't check for TEMPLATE_DECL. - (instantiate_template): Defer access checking during template - substitution. - (regenerate_decl_from_template): Tidy. - -2003-07-11 Nathanael Nerode - - PR c++/11437 - * operators.def: Add definitions for __imag__, __real__. - -2003-07-11 Nathan Sidwell - - PR c++/11050 - * parser.c (cp_parser_expression_list): Rename to ... - (cp_parser_parenthesized_expression_list): ... here. Add attribute - parameter, parse the surounding parentheses. - (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma - parameters. Return int. - (cp_parser_skip_to_closing_parenthesis or comma): Remove. - (cp_parser_postfix_expression): Adjust function call parsing. - (cp_parser_new_placement): Adjust. - (cp_parser_new_initializer): Likewise. - (cp_parser_cast_expression): Likewise. - (cp_parser_selection_statement): Likewise. - (cp_parser_mem_initializer): Likewise. - (cp_parser_asm_definition): Likewise. - (cp_parser_init_declarator): Likewise. - (cp_parser_declarator): Make - cdtor_or_conv_p an int ptr. - (cp_parser_direct_declarator): Likewise. Check for a parameter - list on cdtors & conv functions. - (cp_parser_initializer): Adjust. - (cp_parser_member_declaration): Adjust. - (cp_parser_attribute_list): Move code into - cp_parser_parens_expression_list. - (cp_parser_functional_cast): Adjust. - * pt.c (type_dependent_expression_p): Erroneous expressions are - non-dependent. - -2003-07-11 Geoffrey Keating - - * decl.c (cp_finish_decl): Handle 'used' attribute. - - * cp-lang.c (c_reset_state): New dummy routine. - * cp-tree.h (finish_file): Move prototype to c-common.h. - * parser.c (c_parse_file): Rename from yyparse; don't call finish_file. - -2003-07-11 Mark Mitchell - - PR c++/8327 - * pt.c (tsubst_qualified_id): Implement suggested resolution for - Core Issue 2. - (type_dependent_expression_p): Likewise. - -2003-07-10 Mark Mitchell - - * typeck.c (build_binary_op): Do not warn about signed - vs. unsigned comparisons in the bodies of templates. - - PR c++/9411 - * parser.c (cp_parser_postfix_expression): Check dependency of - functions. - -2003-07-09 Mark Mitchell - - PR c++/10032 - * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are - still errors. - - PR c++/10527 - * error.c (decl_to_string): Do not print default argument - expressions. - - * cp-tree.h (break_out_calls): Remove declaration. - * tree.c (break_out_calls): Remove. - * typeck.c (build_modify_expr): Avoid invalid sharing of trees. - -2003-07-09 Nathan Sidwell - - PR c++ 9483 - * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p. - * decl2.c (constructor_name_p): Avoid repeated constructor_name - calls. - * decl.c (grokdeclarator): Refactor ctor/dtor detection. - -2003-07-09 Mark Mitchell - - * typeck.c (build_x_unary_op): Take note of the fact that - PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on - trees. - - * parser.c (cp_parser_primary_expression): Preserve the form of - qualified expressions in templates, even if they are not - dependent. - * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs. - (tsubst_qualified_id): Likewise. - * search.c (accessible_p): Treat everything in the body of a - template as accessible. - -2003-07-08 Mark Mitchell - - * cp-tree.def (NON_DEPENDENT_EXPR): New node. - * cp-tree.h (build_call_from_tree): Remove. - (build_member_call): Likewise. - (dependent_template_arg_p): Remove. - (any_dependent_template_arguments_p): New function. - (dependent_template_id_p): Likewise. - (any_type_dependent_arguments_p): Likewise. - (build_non_dependent_expr): Likewise. - (build_non_dependent_args): Likewise. - (build_x_compound_expr): Adjust prototype. - * call.c (build_new_method_call): Handle non-dependent expressions - correctly. - * decl2.c (grok_array_decl): Likewise. - (build_offset_ref_call_from_tree): Likewise. - (build_call_from_tree): Remove. - * error.c (dump_decl): Handle NON_DEPENDENT_EXPR. - (dump_expr): Likewise. - * init.c (build_member_call): Remove. - * mangle.c (write_expression): Update handling for template-ids. - * parser.c (cp_parser_primary_expression): Use - any_dependent_template_arguments_p. Update constant-expression - handling. - (cp_parser_postfix_expression): Use - any_type_dependent_arguments_p. Simplify call processing. - (cp_parser_unary_expression): Simplify. - (cp_parser_expression): Adjust for changes to - build_x_compound_expr. - (cp_parser_template_argument): Implement standard-conforming - parsing of non-type template arguments. - (cp_parser_direct_declarator): Use - cp_parser_fold_non_dependent_expr. - (cp_parser_fold_non_dependent_expr): New function. - (cp_parser_next_token_ends_template_argument_p): Likewise. - * pt.c (convert_template_argument): Do not call - maybe_fold_nontype_arg. - (tsubst_baselink): Likewise. - (tsubst_copy_and_build): Share common code. Make sizeof/alignof - processing work correctly for non-dependent expressions. Adjust - handling of COMPOUND_EXPR. Simplify call processing. - (value_dependent_expression_p): Deal with functional casts and - sizeof/alignof correctly. - (type_dependent_expression_p): Handle overloaded functions. - (any_type_dependent_arguments_p): New function. - (any_dependent_template_arguments_p): Likewise. - (dependent_template_p): Treat SCOPE_REFs as dependent. - (dependent_template_id_p): Simplify. - (build_non_dependent_expr): New function. - (build_non_dependent_args): Likewise. - * semantics.c (finish_stmt_expr): Don't make dependent - statement-expresions have void type. - (finish_call_expr): Handle non-dependent expressions - correctly. - * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues. - * typeck.c (cxx_sizeof_or_alignof_type): Give the expression - type size_t, even in templates. - (expr_sizeof): Likewise. - (finish_class_member_access_expr): Handle non-dependent expressions - correctly. - (build_x_indirect_ref): Likewise. - (build_x_binary_op): Likewise. - (build_x_unary_op): Likewise. - (build_x_conditional_expr): Likewise. - (build_x_compound_expr): Likewise. - * typeck2.c (build_x_arrow): Likewise. - -2003-07-09 Jan Hubicka - - * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New. - * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS. - (start_function): Use DECL_ESTIMATED_INSNS. - * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS. - - * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in - unit-at-a-time - -2003-07-08 Kriang Lerdsuwanakij - - PR c++/11030 - * pt.c (instantiate_class_template): Don't call xref_tag to - inject name when the friend class is a specialization. - -2003-07-07 Mark Mitchell - - * cp-tree.h (build_scoped_method_call): Remove. - (lookup_qualified_name): Remove parameter. - (tsubst_copy_and_build): Declare. - (finish_qualified_object_call_expr): Remove. - (check_accessibility_of_qualified_id): New function. - (finish_qualified_id_expr): Likewise. - (non_reference): Likewise. - (build_expr_from-tree): Remove. - * call.c (non_reference): Remove. - (build_scoped_method_call): Likewise. - (build_method_call): Use error_operand_p. Assert that we are not - processing a template. - (standard_conversion): Use non_reference. - * class.c (build_vtbl_entry_ref): Likewise. - (build_vtbl_ref_1): Likewise. - * cvt.c (build_expr_type_conversion): Use non_reference. - * decl.c (lookup_qualified_name): Remove flags parameter. - (grok_op_properties): Use non_reference. - * decl2.c (grok_array_decl): Likewise. - (build_expr_from_tree): Remove. - (build_offset_ref_call_from_tree): Update comment. - * error.c (parm_to_string): Call reinit_global_formatting_buffer. - * except.c (prepare_eh_types): Use non_reference. - (can_convert_eh): Likewise. - * init.c (build_dtor_call): Avoid using build_method_call. - * mangle.c (write_template_param): Remove misleading comment. - * method.c (locate_copy): Use non_reference. - * parser.c (cp_parser_scope_through_which_access_occurs): Remove. - (cp_parser_primary_expression): Do not create SCOPE_REFs is - non-dependent contexts. - (cp_parser_postfix_expression): Use finish_qualified_id_expr. - (cp_parser_direct_declarator): Use tsubst_copy_and_build, not - build_expr_from_tree. - (cp_parser_lookup_name): Adjust call to lookup_qualified_name. - Use check_accessibility_of_qualified_id. - * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not - build_expr_from_tree. - (tsubst_baselink): New function. - (tsubst_qualified_id): Likewise. - (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR. - (tsubst_expr): Adjust call to lookup_qualified_name. - (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust - handling of CALL_EXPRs. - (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P. - * rtti.c (get_tinfo_decl_dynamic): Use non_reference. - * search.c (check_final_overrider): Likewise. - * semantics.c (check_accessibility_of_qualified_id): New function. - (finish_qualified_object_call_expr): Remove. - * typeck.c (target_type): Use non_reference. - (cxx_sizeof_or_alignof_type): Likewise. - (dubious_conversion_warnings): Likewise. - (convert_for_initialization): Likewise. - (non_reference): New function. - -2003-07-07 Kaveh R. Ghazi - - * decl.c (print_binding_level, print_other_binding_stack, - print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent - stdio calls. - * ptree.c (cxx_print_decl, cxx_print_binding): Likewise. - -2003-07-07 Andreas Jaeger - - * friend.c: Convert to ISO C90 prototypes. - - * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output - language. - * cfns.h: Regenerate. - - * typeck.c: Convert remaining prototypes to ISO C90. - * search.c: Likewise. - - * decl2.c (build_expr_from_tree): Convert prototype to ISO C90. - * semantics.c (expand_or_defer_fn): Likewise - * mangle.c (discriminator_for_string_literal): Likewise. - * g++spec.c (lang_specific_driver): Likewise. - - * search.c (lookup_base_r): Remove unused variable. - -2003-07-07 Nathan Sidwell - - * semantics.c: (genrtl_try_block) Adjust emit_line_note - calls. - -2003-07-07 Andreas Jaeger - - * search.c (lookup_base_r): Remove unused variable. - -2003-07-06 Michael Chastain - - PR debug/10055 - * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than - assigning to input_filename directly. - -2003-07-06 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cp-tree.h: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * error.c: Likewise. - * method.c: Likewise. - * name-lookup.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * typeck.c: Likewise. - -2003-07-06 Mark Mitchell - - PR c++/11345 - * search.c (lookup_base_r): Remove is_non_public and - within_current_scope parameters. Remove other dead code. - (lookup_base): Adjust call to lookup_base_r. - (adjust_result_of_qualified_name_lookup): Improve comment. - * semantics.c (finish_call_expr): Use maybe_dummy_object. - -2003-07-06 Neil Booth - - * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME, - LANG_HOOKS_MISSING_ARGUMENT): Override. - -2003-07-05 Mark Mitchell - - PR c++/11431 - * typeck.c (build_static_cast): Check for reference conversions - earlier. - -2003-07-04 Mark Mitchell - - * cp-tree.h (perform_integral_promotions): Declare. - * call.c (build_addr_func): Use decay_conversion. - (convert_arg_to_ellipsis): Likewise. Remove misleading comment. - (convert_for_arg_passing): Use perform_integral_promotions. - * cvt.c (build_expr_type_conversion): Use decay_conversion. - (type_promotes_to): Do not return a cv-qualified type. - * decl.c (grok_reference_init): Fix formatting. - (get_atexit_node): Use decay_conversion. - (build_enumerator): Use perform_integral_promotions. - * init.c (build_vec_init): Use decay_conversion. - * semantics.c (finish_expr_stmt): Likewise. - (finish_switch_cond): Use perform_integral_promotions. - * typeck.c (default_conversion): Likewise. - (perform_integral_promotions): New function. - (build_indirect_ref): Use decay_conversion. - (build_array_ref): Use perform_integral_promotions. - (convert_arguments): Use decay_conversion. - (build_unary_op): Use perform_integral_promotions. - (build_c_cast): Use decay_conversion. - (build_modify_expr): Likewise. - (convert_for_initialization): Likewise. - * typeck2.c (build_x_arrow): Likewise. - -2003-07-04 Kazu Hirata - - * call.c: Fix comment typos. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * decl2.c: Likewise. - * decl.c: Likewise. - * init.c: Likewise. - * mangle.c: Likewise. - * parser.c: Likewise. - * pt.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2003-07-04 Zack Weinberg - - * parser.c (cp_lexer_read_token): No need to handle string - constant concatenation. - -2003-07-03 Kaveh R. Ghazi - - * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define. - (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with - ATTRIBUTE_GCC_CXXDIAG. - -2003-07-03 Mark Mitchell - - * call.c (build_addr_func): Handle bound pointers-to-members. - (build_method_call): Do not call resolve_offset_ref. - (implicit_conversion): Likewise. - (resolve_scoped_fn_name): Use finish_non_static_data_member, not - resolve_offset_ref. - (resolve_args): Do not call resolve_offset_ref. - (build_conditional_expr): Likewise. - (build_new_method_call): Likewise. - * cp-tree.def (OFFSET_REF): Update documentation. - * cvt.c (cp_convert_to_pointer): Update handling of conversions from - pointers to members to pointers. - (ocp_convert): Do not call resolve_offset_ref. - (convert_to_void): Likewise. - (build_expr_type_conversion): Likewise. - * decl2.c (delete_sanity): Likewise. - * init.c (resolve_offset_ref): Simplify greatly. - (build_vec_delete): Do not call resolve_offset_ref. - * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref - if appropriate. - (cp_parser_unary_expression): Use - cp_parser_simple_cast_expression. - (cp_parser_delete_expression): Likewise. - (cp_parser_cast_expression): Likewise. - (cp_parser_pm_expression): Use cp_parser_binary_op. - (cp_parser_simple_cast_expression): New function. - * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref. - * semantics.c (finish_increment_expr): Likewise. - (finish_typeof): Likewise. - * tree.c (lvalue_p_1): Do not handle OFFSET_REF. - * typeck.c (require_complete_type): Do not handle OFFSET_REFs. - (decay_conversion): Do not call resolve_offset_ref. - (finish_class_member_access_expr): Likewise. - (convert_arguments): Likewise. - (build_x_binary_op): Handle DOTSTAR_EXPR. - (condition_conversion): Do not call resolve_offset_ref. - (unary_complex_lvalue): Likewise. - (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (build_c_cast): Likewise. - (build_modify_expr): Likewise. - (convert_for_assignment): Likewise. - (convert_for_initialization): Likewise. - * typeck2.c (build_x_arrow): Likewise. - (build_m_component_ref): Simplify. - - * call.c (build_scoped_method_call): Use convert_to_void. - (build_method_call): Likewise. - * class.c (check_field_decls): Remove dead code. - * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling. - * decl2.c (grok_array_decl): Remove dead code. - (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE - as pointer-to-member representation. - * init.c (build_offset_ref): Tidy. - (build_vec_delete_1): Use convert_to_void. - * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE - as pointer-to-member representation. - -2003-07-03 Nathan Sidwell - - PR c++/9162 - * decl.c (grokdeclarator): Return friend decls, not - void_type_node. - * decl2.c (grokfield): Alter friend decl check. - * parser.c (struct cp_parser): Document default_arg chain on - unparsed_functions_queue. - (cp_parser_save_default_args): New. - (cp_parser_init_declarator, cp_parser_function_definition, - cp_parser_member_declaration): Call it. - (cp_parser_class_specifier): Remove unused variable. Alter - processing of unparsed_functions_queue. - -2003-07-03 Kaveh R. Ghazi - - * class.c (add_method, check_field_decl): Fix format specifier. - * decl.c (duplicate_decls, pushdecl, check_goto, - fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator, - start_enum): Likewise. - * decl2.c (ambiguous_decl): Likewise. - * pt.c (redeclare_class_template): Likewise. - -2003-07-02 Nathan Sidwell - - PR c++/10219 - * pt.c (type_unification_real): Don't unify exprs of error type. - * tree.c (error_type): Don't die on error_type. - - PR c++/9779 - * decl2.c (arg_assoc_class): Don't die on NULL type. - * typeck.c (type_unknown_p): Don't die on untyped expressions. - -2003-07-01 Mark Mitchell - - PR c++/6949 - * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local - classes. - -2003-07-01 Kaveh R. Ghazi - - * error.c (locate_error): %P takes an `int', not a `tree'. - -2003-07-02 Jan Hubicka - - * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT. - (finish-file): Do not process function with DECL_DEFER_OUTPUT clear; - clear DECL_DEFER_OUTPUT once function is processed; avoid flags - massaging. - - * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time - (expand_or_defer_fn): Declare. - (lower_function): Declare. - * decl.c (start_cleanup_fn): Use expand_or_defer_fn. - * decl2.c: Include cgraph.h and varpool.h - (maybe_emit_vtables): Make explicit instantations as needed. - (mark_member_pointers, lower_function): New functions. - (finish_file): Do unit-at-a-time. - * method.c (synthesize_method): Use expand_or_defer_fn. - * optimize.c (maybe_clone_body): Use expand_or_defer_fn. - * parser.c (cp_parser_function_definition_after_decl): Use - expand_or_defer_fn. - * pt.c (instantiate_decl): Likewise. - * semantics.c: Include cgraph.h - (expand_or_defer_fn): Break out from ... - (expand_body): ... here; deal with unit-at-a-time. - * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, - LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define. - -2003-07-01 Mark Mitchell - - * call.c (resolve_scoped_fn_name): Return error_mark_node for - erroneous cases. - -2003-07-01 Mark Mitchell - - PR c++/11149 - * call.c (resolve_scoped_fn_name): Check that the qualifying scope - is a class type. - -2003-07-01 Giovanni Bajo - - PR c++/8046 - * error.c (dump_decl): Handle BIT_NOT_EXPR as - pseudo destructor calls. - -2003-07-01 Nathan Sidwell - - * cp-tree.h (define_label): Replace filename and lineno - arguments with a location_t. - * decl.c (pop_label): Adjust define_label call. - (define_label): Replace filename and lineno arguments with a - location_t. - * semantics.c (finish_label): Adjust define_label call. - -2003-07-01 Mark Mitchell - - PR c++/9559 - * decl2.c (grokfield): Do not build NOP_EXPRs around the - error_mark_node. - -2003-06-30 Neil Booth - - * Make-lang.in: Update. - * cp-lang.c (c_language): Define. - (LANG_HOOKS_INIT_OPTIONS): Use common hook. - * cp-tree.h (cxx_init_options): Remove. - * lex.c: Don't include diagnostic.h. - (cxx_init_options): Remove. - -2003-06-30 Giovanni Bajo - - PR c++/4933 - * error.c (dump_expr): Support correctly the COMPOUND_EXPR - tree generated within a template. Use dump_expr to dump an - expression sizeof. - -2003-06-30 Giovanni Bajo - - * mangle.c (write_expression): Exit gracefully when trying to - mangle a CALL_EXPR. - -2003-06-30 Giovanni Bajo - - PR c++/10750 - * parser.c (cp_parser_primary_expression): A VAR_DECL with a - (value- or type-) dependent expression as DECL_INITIAL is a - valid constant-expression (at parser time). - -2003-06-30 Giovanni Bajo - - PR c++/11106 - * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a - USING_DECL, instead of print_tree_identifier. - -2003-06-29 Gabriel Dos Reis - - * cp-tree.h (language_to_string): Adjust declaration. - * dump.c (cp_dump_tree): Adjust usage. - * error.c (dump_char): Use output_formatted_scalar. Tidy. - (parm_to_string): Lose unused parameter. Tidy. - (expr_to_string): Likewise. - (code_to_string): Likewise. - (language_to_string): Likewise. - (op_to_string): Likewise. - (assop_to_string): Likewise. - (digit_buffer): Remove. - (dump_type): Format builtin vector type as __vector__. - -2003-06-29 Gabriel Dos Reis - - * error.c (print_integer): Remove. - (dump_type_suffix): Adjust. - (dump_expr): Likewise. - -2003-06-28 Nathan Sidwell - - * error.c (print_instantiation_partial_context): Take a - location_t. - (print_instantiation_full_context): Adjust. - (print_instantiation_context): Adjust. - - * cp-tree.h (cp_line_of, cp_file_of): Remove. - * error.c (cp_line_of, cp_file_of): Merge into ... - (location_of): ... here. Make static, return a location_t. - (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust. - -2003-06-28 Nathan Sidwell - - PR c++/10784 - * call.c (joust): Move warn_conversion check outwards. - -2003-06-27 Zack Weinberg - - * decl.c (build_typename_type) - * mangle.c (write_template_template_arg) - * parser.c (cp_parser_scope_through_which_access_occurs) - * pt.c (push_access_scope_real, push_access_scope, pop_access_scope) - * repo.c (get_base_filename) - * semantics.c (maybe_convert_cond): - Mark the definition static, matching the forward declaration. - -2003-06-27 Mark Mitchell - - PR c++/10468 - * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly. - -2003-06-27 Mark Mitchell - - PR c++/10796 - * decl.c (finish_enum): Implement DR377. - - * decl.c (cp_finish_decl): Don't make variables with reference - type readonly while they are being initialized. - -2003-06-26 Mark Mitchell - - PR c++/11332 - * typeck.c (build_static_cast): Avoid returning expressions with - reference type. - -2003-06-26 Nathan Sidwell - - * call.c (build_op_delete_call): Use strip_array_call. Correct - error message to say 'delete' or 'delete[]'. - -2003-06-26 Giovanni Bajo - - PR c++/8266 - * pt.c (check_explicit_specialization): When looking up a - template function from an identifier outside class-scope, bind - it to CP_DECL_CONTEXT. - -2003-06-25 Mark Mitchell - - PR c++/10990 - * search.c (lookup_base_r): Rely on accessible_p, rather than - trying to emulate that logic here. - - PR c++/10931 - * call.c (convert_like): Pass issue_conversion_warnings. - (convert_like_with_context): Likewise. - (convert_like_real): Add issue_conversion_warnings parameter. - (perform_direct_initialization_if_possible): New function. - * cp-tree.h (perform_direct_initialization_if_possible): Declare it. - * typeck.c (check_for_casting_away_constness): New function. - (build_static_cast): Rewrite. - -2003-06-24 Nathan Sidwell - - * call.c (enforce_access): Assert we get a binfo. - (build_op_delete_call): Pass a binfo to - perform_or_defer_access_check. - * class.c (alter_access): Likewise. - * decl.c (make_typename_type): Likewise. - (make_unbound_class_template): Likewise. - * lex.c (do_identifier): Likewise. - * method.c (hack_identifier): Likewise. - * parser.c (cp_parser_lookup_name): Likewise. - * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE - test. - * semantics.c (finish_non_static_data_member): Likewise. - (perform_or_defer_access_check): Expect a binfo. - * typeck.c (comptypes): Expect types. - - * mangle.c (find_substitution): Don't pass a non-type to same_type_p - * friend.c (make_friend_class): Likewise. - * pt.c (check_default_tmpl_args): Likewise. - (lookup_template_class): Likewise. - -2003-06-24 Jan Hubicka - - * method.c (thunk_labelno): Move outside ifdef block to make garbage - collector happy. - -2003-06-24 Jan Hubicka - - * class.c (build_vtable): Make vtables. - * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro. - * decl2.c (output_vtable_inherit): Rename to ... - (prepare_assemble_variable): ... this one; change interface. - (maybe_emit_vtables): Do not call output_vtable_inherit. - * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define. - * cp-tree.h (prepare_assemble_variable): New. - -2003-06-23 Andrew Pinski - - * method.c: add prototype for make_alias_for_thunk. - (thunk_labelno, make_alias_for_thunk): only define - if ASM_OUTPUT_DEF is defined. - -2003-06-23 Jakub Jelinek - - * method.c (thunk_labelno): New variable. - (make_alias_for_thunk): New function. - (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk - into the same section as the function it is calling. - Include gt-cp-method.h. - * Make-lang.in (gt-cp-method.h): Depend on s-gtype. - (cp/method.o): Depend on gt-cp-method.h. - * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c. - -2003-06-23 Jan Hubicka - - * decl.c (register_dtor_fn): Mark cleanup as used. - * decl2.c (mark_vtable_entries): Skip nops. - * rtti.c (get_tinfo_ptr): Mark tinfo as used. - (build_dynamic_cast_1): Likewise. - (tinfo_base_init): Likewise. - (emit_tinfo_decl): Likewise. - -2003-06-23 Jakub Jelinek - - * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer - to it. - -2003-06-21 Gabriel Dos Reis - - PR c++/10784 - * call.c (joust): Warn about choosing conversion sequence only if - -Wconversion. - -2003-06-21 Gabriel Dos Reis - - PR c++/10864 - * call.c (op_error): Tidy. - * error.c (dump_expr): Properly format 'T()' when T is an - aggregate type. - -2003-06-21 Gabriel Dos Reis - - PR c++/10915 - * decl.c (grok_op_properties): Warn possible confusing conversion - only if -Wconversion. - -2003-06-20 Mark Mitchell - - PR c++/10749 - * parser.c (cp_parser_class_head): See through dependent names - when parsing a class-head. - - PR c++/10845 - * pt.c (try_class_unification): Correct handling of member class - templates. - -2003-06-20 Nathan Sidwell - - * semantics.c (genrtl_finish_function): Adjust - expand_function_end call. - -2003-06-19 Mark Mitchell - - PR c++/10939 - * pt.c (tsubst_decl): Do not try to substitute into non-dependent - functions. - (value_dependent_expression_p): Correct logic for FUNCTION_DECLs. - - PR c++/9649 - * cp-tree.h (pushdecl_class_level): Change prototype. - (push_class_level_binding): Likewise. - * decl.c (add_binding): Reject duplicate static data members. - (pushdecl_class_level): Return a value indicating whether or not - the binding was valid. - (push_class_level_binding): Likewise. - * semantics.c (finish_member_declaration): Don't keep invalid - declarations. - - PR c++/11041 - * call.c (initialize_reference): Do not use cp_finish_decl to emit - temporary variables. - * cp-tree.h (static_aggregates): Declare. - (pushdecl_top_level_and_finish): Likewise. - * decl.c (pushdecl_top_level_1): New function. - (pushdecl_top_level): Use it. - (pushdecl_top_level_and_finish): New function. - (initialize_local_var): Remove redundant code. - (cp_finish_decl): Remove support for RESULT_DECLs. Don't check - building_stmt_tree. - * decl.h (static_aggregates): Remove. - * decl2.c (get_guard): Use pushdecl_top_level_and_finish. - * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish. - (tinfo_base_init): Likewise. - -2003-06-19 Matt Austern - - PR c++/11228 - * init.c (build_zero_init): Assert that number of array elements - is an integer constant. - (build_default_init) Don't use build_zero_init for arrays with - variable number of elements. - -2003-06-19 Andreas Jaeger - - * cp-tree.h: Remove duplicated declarations. - -2003-06-18 Nathanael Nerode - - * pt.c: Convert to ISO C. - * semantics.c: Convert to ISO C. - -2003-06-18 Nathan Sidwell - - * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p, - at_least_as_qualified_p, more_qualified_p): Return bool. - * typeck.c: ANSIFY function definitions. - (comp_array_types): Take redeclaration bool parameter. - (comptypes): Rearrange STRICT handling. - (at_least_as_qualified_p, more_qualified_p, - comp_cv_qualification): Cache cv quals. - (compparms): Rearrange loop. - -2003-06-18 Nathan Sidwell - - * cp-tree.h (COMPARE_RELAXED): Rename to ... - (COMPARE_DERIVED): ... here. Adjust comment. - (resolve_typename_type_in_current_instantiation): Remove. - (cp_tree_equal, comptypes): Return a bool. - * cvt.c (convert_to_reference): Adjust comptypes call. - * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call. - (resolve_typename_type_in_current_instantiation): Remove. - * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and - IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive - calls. Refactor code. - * typeck.c (comp_array_types): Return bool. Lose callback. - parameter. Adjust cp_tree_equal calls. - (comptypes): Return bool. Adjust strict handling. Remove relaxed - enumeration and java type handling. Deal with typename types here. - Adjust recursive and cp_tree_equals calls. Adjust base and derived - checking. - (comp_target_types): Remove unreachable code. Adjust - same_or_base_type_p calls. - (ptr_reasonably_similar): Adjust base and derived check. - - * typeck.c (maybe_warn_about_returning_address_of_local): Remove - unused calculation. - (check_return_expr): Adjust error messages. - * cp-tree.def (SCOPE_REF): Correct comment. - -2003-06-17 Mark Mitchell - - * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format - string again. - -2003-06-17 Robert Abeles - - * optimize.c (dump_function): Form complete flag name by - prefixing 'fdump-' to string returned by dump_flag_name(). - -2003-06-17 Mark Mitchell - - * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format - string. - -2003-06-17 Jason Merrill - - PR c++/10929 - * decl.c (grokfndecl): Don't mark a function inline for - -finline-functions if it isn't defined. - -2003-06-17 Mark Mitchell - - PR c++/10712 - * class.c (handle_using_decl): Robustify. - - PR c++/11105 - * cp-tree.h (DECL_CONV_FN_TYPE): New method. - * mangle.c (struct globals): Remove internal_mangling_p. - (write_unqualified_name): Use DECL_CONV_FN_TYPE. - (write_template_parm): Don't write out the level number. - (conv_type_names): New variable. - (hash_type): New function. - (compare_type): Likewise. - (mangle_conv_op_name_for_type): Don't try to mangle conversion - operator names. - * search.c (lookup_conversion_operator): New function. - (lookup_fnfields_1): Use it. - -2003-06-17 Andreas Jaeger - - * except.c: Remove duplicate declaration of push_eh_cleanup. - - * call.c: Remove extra declaration of inhibit_warnings. - -2003-06-16 Nathanael Nerode - - 2003-06-16 Jens-Michael Hoffmann - * mangle.c: Convert to ISO C. - -2003-06-16 Kaveh R. Ghazi - - * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR - macro. - -2003-06-16 Nathanael Nerode - - * tree.c: Convert to ISO C. - -2003-06-16 Kazu Hirata - - * cp-tree.h: Follow spelling conventions. - * mangle.c: Likewise. - * method.c: Likewise. - * parser.c: Likewise. - -2003-06-14 Nathan Sidwell - - * decl.c (start_function): Adjust init_function_start call. - * method.c (use_thunk): Likewise. - * semantics.c (genrtl_start_function): Likewise. - -2003-06-14 Neil Booth - - * Make-lang.in: Remove c-options.o. - -2003-06-13 Nathanael Nerode - - * lex.c: Convert to ISO C. - - 2003-05-19 Jens-Michael Hoffmann - * init.c: removes use of PARAMS macro. Use ISO style function - declarations. (Not copyright-significant change.) - - * rtti.c: Remove PARAMS. - - * typeck2.c: Convert to ISO C. - -2003-06-12 Mark Mitchell - - PR c++/10635 - * typeck.c (build_c_cast): Check that the destination type is - complete. - -2003-06-11 Mark Mitchell - - PR c++/10432 - * cp-tree.h (finish_declarator): Remove. - * decl.c (cp_finish_decl): Make sure to pop_nested_class even for - erroneous declarations. - * semantics.c (finish_declarator): Remove. - -2003-06-11 Roger Sayle - - * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a - global static constructor/destructor if it will be empty, i.e. - either doesn't call any ctors/dtors or only calls pure or const - ctors/dtors. - -2003-06-11 Mark Mitchell - - * mangle.c (tm_p.h): Include it. - * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H). - - PR c++/11131 - * tree.c (cp_cannot_inline_fn): Check for "inline" before - instantiation. - -2003-06-10 Jason Merrill - - PR c++/10968 - * pt.c (mark_decl_instantiated): Clear DECL_COMDAT. - -2003-06-10 Andrew Pinski - - * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY. - (start_cleanup_cnt): New. - -2003-06-10 Mark Mitchell - - PR c++/11131 - * cp-tree.h (template_for_substitution): Declare. - * decl2.c (mark_used): Use it when figuring out whether or not a - function is inline. - * pt.c (template_for_substitution): Give it external linkage. - * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as - possible. - -2003-06-09 Zack Weinberg - - PR 8861 - * mangle.c (write_real_cst): New function. Implement - ABI-compliant mangling of floating-point literals when - -fabi-version>=2; provide backward compatibility with 3.3 when - -fabi-version=1 (with warning). Clarify commentary. - (write_template_arg_literal): Use write_real_cst. - -2003-06-07 Andreas Jaeger - - * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES. - -2003-06-07 Neil Booth - - * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. - (LANG_HOOKS_HANDLE_OPTION): Override. - * cp-tree.h (cxx_init_options): Update. - * lex.c (cxx_init_options): Update. - -2003-06-05 Jan Hubicka - - * Make-lang.in: Add support for stageprofile and stagefeedback - -2003-06-04 J"orn Rennecke - - * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out. - -2003-06-04 Andreas Jaeger - - * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage. - -2003-06-03 Jason Merrill - - * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors. - - * cp/decl.c (reshape_init): Handle vectors. - - * testsuite/g++.dg/init/array10.C: New. - -2003-06-03 Kriang Lerdsuwanakij - - PR c++/10940 - * pt.c (check_explicit_specialization): Check for 'static' - earlier. - -2003-05-31 Diego Novillo - - * class.c (dump_array): Call CONSTRUCTOR_ELTS to access - the operand of a CONSTRUCTOR node. - -2003-05-31 Gabriel Dos Reis - - * decl.c (cp_binding_level::this_entity): Rename from this_class. - (cxx_scope_descriptor): New function. - (cxx_scope_debug): Likewise. - (push_binding_level): Use it. - (pop_binding_level): Likewise. - (suspend_binding_level): Likewise. - (resume_binding_level): Likewise. - (pushlevel_class): Adjust use of this_class. - (pushtag): Likewise. - (lookup_name_real): Likewise. - (global_scope_name): New variable. - (initialize_predefined_identifiers): Initialize it. - (push_namespace): Use it. - (make_cxx_scope): New function. - (pushlevel): Use it. - (pushlevel_class): Likewise. - (push_binding_level): Simplify. Loose the last two arguments. - (make_binding_level): Remove. - (initial_push__namespace_scope): New function. - (push_namespace): Use it. Simplify. - (cxx_init_decl_processing): Likewise. - (declare_namespace_level): Remove. - -2003-05-31 Kriang Lerdsuwanakij - - PR c++/10956 - * pt.c (instantiate_decl): Don't use full template arguments if - we are dealing with specializations. - -2003-05-29 Gabriel Dos Reis - - * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS. - (binding_depth): Unconditionally define. - (is_class_level): Likewise. - (indent): Likewise. Take an indenting parameter. - (push_binding_level): Remove conditional definittion. - (pop_binding_level): Likewise. - (suspend_binding_level): Likewise. - (resume_binding_level): Likewise. - (pushlevel): Likewise. - (pushlevel_class): Likewise. - (poplevel_class): Likewise. - (pop_everything): Likewise. - -2003-05-27 Gabriel Dos Reis - - * name-lookup.h (global_scope_p): New macro. - * decl.c (pop_binding_level): Use it. Don't refer directly to - global_binding_level. - (suspend_binding_level): Likewise. - (global_bindings_p): Likewise. - (print_other_binding_stack): Likewise. - (print_binding_stack): Likewise. - (maybe_push_to_top_level): Likewise. - (pushdecl_namespace_level): Likewise. - (cxx_init_decl_processing): Likewise. - (start_decl): Likewise. - (cp_finish_decl): Likewise. - (start_function): Likewise. - (global_binding_level): Remove. - -2003-05-25 Kriang Lerdsuwanakij - - * parser.c (cp_parser_explicit_instantiation): Restore old - access before template instantiation. - -2003-05-23 Geoffrey Keating - - * lang-specs.h: Use -o to specify preprocessor's output file. - Make -no-integrated-cpp work when building PCH files. - -2003-05-23 Kriang Lerdsuwanakij - - PR c++/10682 - * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to - check for implicitly created typedef to an enum. - -2003-05-21 Jason Merrill - - * init.c (build_vec_delete): Copy the address into a temporary - variable before calling build_vec_delete_1. - * decl2.c (delete_sanity): Don't call stabilize_reference. - -2003-05-21 Nathan Sidwell - - * pt.c (register_specialization): Update the decl's location, - if necessary. - (check_explicit_specialization): Likewise. - -2003-05-20 Kaveh R. Ghazi - - * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX. - -2003-05-21 Danny Smith - - PR c++/9738 - * decl.c (duplicate_decls): Re-invoke make_decl_rtl - if the old decl had instantiated DECL_RTL. - (Base on Richard Henderson 2003-05-13 patch to c-decl.c). - -2003-05-19 Matt Austern - - * lang-options.h: Document -Wno-invalid-offsetof - * typeck.c (build_class_member_access_expr): Don't complain about - (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero. - -2003-05-18 Andrew Pinski - - * name-lookup.c (free_binding_entry): fix where the GTY markers are. - (binding_entry_make): Make entry->chain NULL after getting an entry. - fix the spelling of chain in a comment. - (binding_table_free): speed up by having temporary variable. - (binding_table_new): set table->chain to be NULL after allocating - a table. - (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set - binding->previous to NULL after getting an binding for speed. - -2003-05-18 Gabriel Dos Reis - - * cp-tree.h (struct lang_type_class): Replace data member tags - with hash-table nested_udts. - (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS. - * class.c (unreverse_member_declarations): Don't touch - CLASSTYPE_TAGS. - (pushclass): Use cxx_remember_type_decls. - * decl.c (struct cp_binding_level): Replace data member tags with - hash-table type_decls. - (pop_binding_level): Handle level->type_decls. - (kept_level_p): Adjust. - (poplevel): Remove unused local variable. - (bt_print_entry): New function. - (print_binding_level): Use it. - (push_namespace): Build current_binding_level->type_decls. - (maybe_process_template_type_declaration): Adjust. - (pushtag): Likewise. - (clear_anon_tags): Use binding_table_remove_anonymous_types. - (gettags): Remove. - (cxx_remember_type_decls): Rename from storetags. Adjust. - (lookup_tag): Use binding_table_find_anon_type. Tidy. - (lookup_tag_reverse): Use binding_table_reverse_maybe_remap. - (cxx_init_decl_processing): Build global_binding_level->type_decls. - (store_parm_decls): Remove pointless code. - * name-lookup.c (free_binding_entry): New variable. - (ENTRY_INDEX): New macro. - (struct binding_table_s): New datatype. - (binding_entry_make): New function. - (binding_entry_free): Likewise. - (binding_table_construct): Likewise. - (binding_table_free): Likewise. - (binding_table_new): Likewise. - (binding_table_expand): Likewise. - (binding_table_insert): Likewise. - (binding_table_find): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - (binding_table_remove_anonymous_types): Likewise. - (binding_table_foreach): Likewise. - * name-lookup.h (binding_table): New type. - (binding_entry): Likewise. - (bt_foreach_proc): Likewise. - (struct binding_entry_s): New datatype. - (SCOPE_DEFAULT_HT_SIZE): New macro. - (CLASS_SCOPE_HT_SIZE): Likewise. - (NAMESPACE_ORDINARY_HT_SIZE): Likewise. - (NAMESPACE_STD_HT_SIZE): Likewise. - (GLOBAL_SCOPE_HT_SIZE): Likewise. - (binding_table_new): Declare. - (binding_table_free): Likewise. - (binding_table_insert): Likewise. - (binding_table_find_anon_type): Likewise. - (binding_table_reverse_maybe_remap): Likewise. - (binding_table_remove_anonymous_types): Likewise. - (binding_table_foreach): Likewise. - (binding_table_find): Likewise. - (cxx_remember_type_decls): Likewise. - * pt.c (bt_instantiate_type_proc): New function. - (do_type_instantiation): Use it. - * search.c (lookup_field_r): Use binding_table_find. - -2003-05-18 Kriang Lerdsuwanakij - - * semantics.c (perform_deferred_access_checks): Don't discard - checked access. - -2003-05-17 Kaveh R. Ghazi - - * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate - libiberty VA_ macros, always use stdarg. - * rtti.c (create_pseudo_type_info): Likewise. - * tree.c (build_min_nt, build_min): Likewise. - -2003-05-16 Kaveh R. Ghazi - - * ptree.c (cxx_print_type, cxx_print_xnode): Use string - concatentation on HOST_WIDE_INT_PRINT_* format specifier to - collapse multiple function calls into one. - * tree.c (debug_binfo): Likewise. - -2003-05-15 Jason Merrill - - PR c++/5388 - * call.c (conditional_conversion): Don't consider implicit - conversions if T2 is a base of T1. - * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean. - (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise. - - * parser.c (cp_parser_primary_expression): Convert a static data - member from reference. - -2003-05-15 Mark Mitchell - - * call.c (build_op_delete_call): Avoid creating unnecessary types. - * class.c (instantiate_type): Remove tests for tf_no_attributes. - * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes. - (COMPARE_NO_ATTRIBUTES): Remove. - * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES. - - PR c++/8385 - * semantics.c (finish_typeof): Refine type-dependency check. - -2003-05-13 Jason Merrill - - * typeck.c (build_modify_expr): Don't always stabilize the lhs and - rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs. - -2003-05-11 Kriang Lerdsuwanakij - - * method.c (synthesize_method): Call push/pop_deferring_access_checks. - -2003-05-11 Kriang Lerdsuwanakij - - PR c++/10230, c++/10481 - * semantics.c (finish_non_static_data_member): Handle when the - non-static member is not from a base of the current class type. - -2003-05-11 Kriang Lerdsuwanakij - - PR c++/10552 - * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class - template and has dependent context. - -2003-05-10 Kriang Lerdsuwanakij - - * pt.c (instantiate_decl): Call push/pop_deferring_access_checks. - -2003-05-10 Kriang Lerdsuwanakij - - PR c++/9252 - * cp-tree.h (saved_scope): Remove check_access field. - (tsubst_flags_t): Remove tf_parsing. - * decl.c (maybe_push_to_top_level): Don't initialize - scope_chain->check_access. - (make_typename_type, make_unbound_class_template): Don't use - tf_parsing. - (register_dtor_fn): Use push/pop_deferring_access_checks - instead of scope_chain->check_access. - * method.c (use_thunk): Likewise. - * parser.c (cp_parser_explicit_instantiation - (cp_parser_constructor_declarator_p): Don't call - push/pop_deferring_access_checks here. - (cp_parser_template_argument, cp_parser_class_name): Don't use - tf_parsing. - (yyparse): Check flag_access_control. - * pt.c (instantiate_class_template): Call - push/pop_deferring_access_checks. - * semantics.c (push_deferring_access_checks): Propagate - dk_no_check. - (perform_or_defer_access_check): Make sure basetype_path is - a type before comparison. - * call.c (build_op_delete_call, build_over_call): Use - perform_or_defer_access_check. - * class.c (alter_access): Likewise. - * init.c (build_offset_ref): Likewise. - * lex.c (do_identifier): Likewise. - * method.c (hack_identifier): Likewise. - * search.c (lookup_member): Likewise. - * semantics.c (finish_non_static_data_member): Likewise. - (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks - instead of flag_access_control. - -2003-05-10 Kriang Lerdsuwanakij - - PR c++/9554 - * parser.c (cp_parser_class_name): Remove check_access parameter. - All caller adjusted. Update declaration. - (cp_parser_lookup_name): Likewise. - * semantics.c (push_deferring_access_checks): Change parameter type - to enum deferring_kind. All caller adjusted. - (resume_deferring_access_checks): Adjust to use new enum. - (stop_deferring_access_checks): Likewise. - (perform_or_defer_access_check): Likewise. - * cp-tree.h (deferring_kind): New enum. - (deferred_access): Adjust field type. - (push_deferring_access_checks): Update declaration. - -2003-05-09 Kriang Lerdsuwanakij - - PR c++/10555, c++/10576 - * pt.c (lookup_template_class): Handle class template with - multiple levels of parameters when one of the levels contain - errors. - -2003-05-08 Jason Merrill - - * init.c (build_new_1): Don't reuse a TARGET_EXPR in an - expression. Undo some of the recent reorg. - -2003-05-07 Richard Henderson - - PR c++/10570 - * cfns.gperf: Comment out POSIX thread cancellation points, - plus abort and raise. - * cfns.h: Regenerate. - -2003-05-07 Jason Merrill - - * call.c (build_conditional_expr): Don't assume that the folded - expression has result_type. - -2003-05-06 Kriang Lerdsuwanakij - - * typeck.c (build_unary_op): Deal with const qualifier in - invalid pointer-to-member earlier. - -2003-05-05 Jason Merrill - - PR c++/9537 - * call.c (conditional_conversion): Build an RVALUE_CONV if - we're just changing the cv-quals. - (build_conditional_expr): Don't call convert to change - cv-quals. - -2003-05-05 Kriang Lerdsuwanakij - - PR c++/10496 - * typeck.c (build_unary_op): Don't output const qualifier when - output invalid pointer-to-member diagnostics. - -2003-05-05 Kriang Lerdsuwanakij - - * decl.c: Fix typos. - -2003-05-05 Kriang Lerdsuwanakij - - PR c++/4494 - * decl.c (start_function): Use same_type_p to check return type - of main. - -2003-05-03 Zack Weinberg - - PR c/10604 - * cp/typeck.c (build_x_compound_expr): No need to check - extra_warnings as well as warn_unused_value. - -2003-05-03 Kriang Lerdsuwanakij - - PR c++/9364, c++/10553, c++/10586 - * decl.c (make_typename_type): Don't crash on illegal code. - -2003-05-03 Nathan Sidwell - - * class.c (finish_struct): Use location_t and input_location - directly. - * decl.c (make_label_decl): Likewise. - (use_label): Likewise. - * decl2.c (warn_if_unknown_interface): Likewise. - (start_static_initialization_or_destruction): Likewise. - (generate_ctor_or_dtor_function): Likewise. - (finish_file): Likewise. - * error.c (print_instantiation_full_context): Likewise. - * init.c (create_temporary_var): Likewise. - * method.c (synthesize_method): Likewise. - * parser.c (cp_token): Likewise. - (cp_lexer_set_source_position_from_token): Likewise. - (cp_lexer_get_preprocessor_token): Likewise. - (cp_parser_statement): Likewise. - * pt.c (tsubst_friend_function): Likewise. - (instantiate_class_template): Likewise. - (tsubst_decl): Likewise. - (tsubst): Likewise. - (instantiate_decl): Likewise. - * semantics.c (begin_class_definition): Likewise. - (expand_body): Likewise. - -2003-05-01 Nathan Sidwell - - * class.c (finish_struct): Rename lineno to input_line. - * decl.c (push_binding_level, pop_binding_level, - suspend_binding_level, resume_binding_level, make_label_decl, - use_label, start_function): Likewise. - * decl2.c (warn_if_unknown_interface, - start_static_initialization_or_destruction, - generate_ctor_or_dtor_function, finish_file): Likewise. - * error.c (cp_line_of, print_instantiation_full_context, - print_instantiation_context): Likewise. - * except.c (check_handlers_1, check_handlers): Likewise. - * init.c (create_temporary_var): Likewise. - * method.c (use_thunk, synthesize_method): Likewise. - * parser.c (cp_lexer_set_source_position_from_token, - cp_lexer_get_preprocessor_token): Likewise. - * pt.c (push_tinst_level, pop_tinst_level, - tsubst_friend_function, instantiate_class_template, tsubst_decl, - tsubst, tsubst_expr, instantiate_decl): Likewise. - * semantics.c (genrtl_try_block, finish_label_stmt, - begin_class_definition, expand_body, - genrtl_finish_function): Likewise. - * tree.c (build_min_nt, build_min): Likewise. - -2003-05-01 Mark Mitchell - - * decl2.c (comdat_linkage): Don't externalize explicit - instantiations. - -2003-05-01 Kriang Lerdsuwanakij - - PR c++/10554 - * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF - is not NULL. - -2003-05-01 Steven Bosscher - - * cp-tree.h (struct lang_id2): Remove. Move fields from here... - (struct lang_identifier): ... to here. - (LANG_ID_FIELD): Remove. - (SET_LANG_ID): Remove. - (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier. - (SET_IDENTIFIER_LABEL_VALUE): Likewise. - (IDENTIFIER_IMPLICIT_DECL): Likewise. - (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise. - (IDENTIFIER_ERROR_LOCUS): Likewise. - (SET_IDENTIFIER_ERROR_LOCUS): Likewise. - -2003-05-01 Kriang Lerdsuwanakij - - PR c++/8772 - * pt.c (convert_template_argument): Correct diagnostic. - -2003-04-30 Kriang Lerdsuwanakij - - PR c++/9432, c++/9528 - * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF. - -2003-04-30 Garbiel Dos Reis - - * decl.c (check_previous_goto_1): Adjust prototype. - (check_previous_goto): Adjust use. - (check_switch_goto): Likewise. - (use_label): Adjust. - (check_previous_goto_1): Don't use pedwarn_with_file_and_line. - (struct named_label_use_list): Use location_t datatype. - -2003-04-29 Mark Mitchell - - PR c++/10551 - * pt.c (mark_decl_instantiated): Defer all explicit instantiations - that have not yet been written out. - -2003-04-29 Mark Mitchell - - PR c++/10549 - * class.c (layout_class_type): Mark overlong bitfields as having - the maximum size permitted by their type, after layout. - - PR c++/10527 - * error.c (dump_expr): Correctly handling of NEW_EXPR.4 - -2003-04-29 Kriang Lerdsuwanakij - - * call.c (build_operator_new_call): Fix typo. - * lang-options.h: Likewise. - -2003-04-29 Mark Mitchell - - PR c++/10515 - * cp-tree.h (lookup_field_1): Declare it. - * search.c (lookup_field_1): Make it public. - * decl.c (reshape_init): Handle designated initializers. - - * decl.c (maybe_commonize_var): Further tweak support for systems - without weak symbols. - -2003-04-27 Mark Mitchell - - * decl.c (maybe_commonize_var): Fix thinko in last patch. - -2003-04-27 Mark Mitchell - - PR c++/10506 - * method.c (use_thunk): Decrement immediate_size_expand. - - PR c++/10503 - * cp-tree.h (DECL_VAR_MARKED_P): New macro. - (DECL_MAYBE_TEMPLATE): Remove. - * class.c (fixed_type_or_null): Avoid infinite recursion. - - * decl.c (maybe_commonize_var): Make the code match the comments. - * pt.c (instantiate_decl): Move call to import_export_decl. - -2003-04-26 Mark Mitchell - - * decl2.c (finish_file): Fix merge botch. - -2003-04-25 Mark Mitchell - - * decl2.c (finish_file): Don't call import_export_decl for - functions that are not defined. - (handle_class_head): Robustify. - * pt.c (instantiate_decl): Do not call cp_finish_decl for - variables that are not defined. - -2003-04-24 Sylvain Pion - - * call.c (print_z_candidates): Fix off by one error. - -2003-04-24 Nathan Sidwell - - PR c++/10337 - * call.c (joust): Don't warn about conversion ops that are exact - or cv-conversions. Rearrange to avoid multiple type comparisons. - -2003-04-23 Mark Mitchell - - PR c++/10471 - * call.c (build_cxx_call): Robustify. - -2003-04-23 Neil Booth - - * Make-lang.in (lex.o): Remove mbchar.h. - * lex.c (MULTIBYTE_CHARS): Lose. - * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled - in c-lex.c. - -2003-04-23 Mark Mitchell - - PR c++/9847 - * cp-tree.h (duplicate_tag_error): Remove. - * class.c (duplicate_tag_error): Remove. - * semantics.c (begin_class_definition): Return immediately for a - duplicate class definition. - - PR c++/10451 - * decl.c (grokdeclarator): Correct logic for "mutable" errors. - -2003-04-22 Mark Mitchell - - PR c++/10446 - * search.c (lookup_fnfields_1): Handle empty slots in the method - vector. - - PR c++/10428 - * decl.c (check_elaborated_type_specifier): New function, split - out from ... - (xref_tag): ... here. Use the new function in more places. - - * rtti.c (throw_bad_typeid): Use build_cxx_call. - -2003-04-21 Mark Mitchell - - * call.c (build_over_call): Use build_cxx_call. - (build_cxx_call): New method, split out of build_over_call. - * cp-tree.h (language_function): Add can_throw. - (build_cxx_call): Declare it. - * decl.c (finish_function): If a function does not contain any - calls to functions that can throw an exception, indicate that - fact. - * decl2.c (mark_used): Do not defer the instantiation of - functions, if the current function does not throw. - * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones. - * pt.c (instantiate_decl): Make sure import_export_decl is called - before emitting things. - * rtti.c (throw_bad_cast): Use build_cxx_call. - (build_dynamic_cast_1): Likewise. - * typeck.c (build_function_call): Likewise. - -2003-04-21 Nathan Sidwell - - PR c++/9881 - * typeck.c (build_unary_op): Fold all COMPONENT_REF addr - expressions. Reverts my 2002-08-08 patch. - - * typeck.c (comp_ptr_ttypes_real): Swap final && operands for - cheaper early exit. - -2003-04-20 Nathan Sidwell - - * cp/decl2.c (start_static_storage_duration_function): Take count - arg, don't check if it wraps round. - (generate_ctor_or_dtor_function): Add locus arg, use it. - (generate_ctor_and_dtor_functions_for_priority): Data arg is a - locus. - (finish_file): Set line numbers to past EOF for synthesized - functions. - -2003-04-20 Nathan Sidwell - - PR c++/10405 - * search.c (lookup_field_1): Final scan goes backwards for - types, forwards for non-types. - -2003-04-17 Roger Sayle - - PR c/10375 - * decl.c (duplicate_decls): Preserve "const", "noreturn" and - "nothrow" function attributes. - -2003-04-17 Kriang Lerdsuwanakij - - PR c++/10347 - * pt.c (type_dependent_expression_p): Handle array new. - -2003-04-15 Mark Mitchell - - PR c++/10381 - * parser.c (cp_parser_primary_expression): Reorganize logic for - dealing with name lookup failures. - -2003-04-15 Jason Merrill - - * decl2.c (mark_used): Don't instantiate anything if - skip_evaluation. - -2003-04-14 Ziemowit Laski - - * tree.c (build_cplus_array_type_1): Do not call - uses_template_parms() on a NULL index_type. - -2003-04-13 Roger Sayle - - * decl.c (duplicate_decls): Preserve pure and malloc attributes. - -2003-04-12 Mark Mitchell - - PR c++/10300 - * init.c (build_new_1): Reorganize. - -2003-04-12 Zack Weinberg - - * class.c (initialize_array) - * decl.c (reshape_init) - * decl2.c (build_expr_from_tree) - * init.c (build_zero_init) - * pt.c (tsubst_copy, tsubst_copy_and_build) - * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer) - (ptm_initializer, class_initializer, get_pseudo_ti_init) - * semantics.c (finish_compound_literal) - * typeck.c (build_ptrmemfunc1) - * typeck2.c (store_init_value, process_init_constructor) - (build_functional_cast): Use build_constructor. - -2003-04-12 Zack Weinberg - - * call.c (print_z_candidates): Use gcc_gettext_width, not - strlen, to determine how much padding to use. - -2003-04-10 Zack Weinberg - - * decl.c: Update all calls to shadow_warning. - -2003-04-10 Mark Mitchell - - * class.c (layout_class_type): Correct handling for overlong - bit-fields whose width is the same as an integer type. - -2003-04-06 Zack Weinberg - - * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero. - * cp-lang.c (cp_tree_size): New function. - (LANG_HOOKS_TREE_SIZE): Override. - - * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct - tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill. - (union lang_tree_node): Remove common and srcloc members. - (build_srcloc_here): Don't prototype. - * decl.c (cp_tree_node_structure): Kill SRCLOC case. - * pt.c (pending_templates): Correct comment. - * tree.c (build_srcloc, build_srcloc_here): Kill. - -2003-04-06 Zack Weinberg - - * call.c: Include intl.h. - (print_z_candidate): Always use inform; get rid of errfn - argument. Reorganize so that all the strings get picked up - by xgettext. Note obligation of caller to pass first argument - through gettext. - (print_z_candidates): Update to match. Indent second and - successive candidates by strlen() of translated message. - (joust): Restructure ambiguous-conversion pedwarn so that - translators see a complete sentence. Update calls to - print_z_candidate. - - * Make-lang.in (cp/call.o): Update dependencies. - -2003-04-05 Kaveh R. Ghazi - - * decl.c (set_current_binding_level): Delete, revert last change. - (current_binding_level): Modify to allow it as as lvalue. - -2003-04-04 Kaveh R. Ghazi - - * name-lookup.c (find_binding): Pass appropriate pointer type to - POP_TIMEVAR_AND_RETURN. - -2003-04-03 Kaveh R. Ghazi - - * Make-lang.in (cp-warn): Add $(STRICT_WARN). - * cp-tree.h: Don't insist on having GNUC. - -2003-04-03 Jason Merrill - - * cvt.c (ocp_convert): Only abort if we try to convert an object - of TREE_ADDRESSABLE type. - - * class.c (build_vtable): Set DECL_ALIGN here. - (get_vtable_decl): Not here. - (layout_vtable_decl): Or here. - (create_vtable_ptr): Or here. - (layout_class_type): Or here. - (check_bitfield_decl): Don't mess with field alignment. - -2003-04-03 Kaveh R. Ghazi - - * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR, - DEF_ASSN_OPERATOR): Delete spurious semi-colon. - * rtti.c (dfs_class_hint_mark): Likewise. - - * decl.c (push_local_name, push_class_level_binding, - maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in - functions returning void. - * decl2.c (add_using_namespace): Likewise. - - * decl.c (print_binding_level, print_other_binding_stack, - print_binding_stack): Cast argument of %p specifier to void*. - * ptree.c (cxx_print_decl): Likewise. - - * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK, - VAR_FUNCTION_OR_PARM_DECL_CHECK, - VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK, - BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK, - LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__. - - * decl.c (set_current_binding_level): New macro. Use throughout - when setting the current binding level. - - * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma - in enum. - * method.c (mangling_flags): Likewise. - - * cp-tree.h (lang_type_header): Add __extension__ and use - CHAR_BITFIELD for members. - -2003-04-02 Geoffrey Keating - - PR other/9274 - * mangle.c: Include gt-cp-mangle.h. - (subst_identifiers): Mark with GTY. - * config-lang.in (gtfiles): Add cp/mangle.c. - * Make-lang.in: (gt-cp-mangle.h): New rule. - (cp/mangle.o): Depends on gt-cp-mangle.h. - -2003-04-01 Andrew Pinski - - * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c - after \$(srcdir)/cp/name-lookup.h. - * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead - of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file. - * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype. - (cp/name-lookup.o): Depends on gt-cp-name-lookup.h. - -2003-03-31 Jason Merrill - - PR java/10145 - * class.c (check_field_decl): Don't set DECL_ALIGN. - -2003-03-30 Mark Mitchell - - PR c++/7647 - * decl.c (grokdeclarator): Tidy, slightly. - * search.c (lookup_field_1): Add want_type parameter. - (lookup_field_r): Adjust call to lookup_field_1. - -2003-03-30 Gabriel Dos Reis - - * Make-lang.in (cp/name-lookup.o): Add more dependencies. - -2003-03-30 Gabriel Dos Reis - - * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust - prototype. - (cxx_scope_find_binding_for_name): Likewise. - * decl.c (find_binding: Move to name-lookup.c. - (binding_for_name): Likewise. - (cxx_scope_find_binding_for_name): Likewise. - (BINDING_LEVEL): Remove. - (push_binding): Tidy. - (push_class_binding): Likewise. - (pop_binding): Likewise. - (poplevel): Likewise. - (poplevel_class): Likewise. - (set_identifier_type_value_with_scope): Likewise. - (push_overloaded_decl): Likewise. - (lookup_tag): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_name_current_level): Likewise. - (maybe_inject_for_scope_var): Likewise. - (namespace_binding): Move to name-lookup.c. - (set_namespace_binding): Likewise. - * decl2.c (lookup_using_namespace): Tidy. - (qualified_lookup_using_namespace): Likewise. - (do_toplevel_using_decl): Likewise. - * name-lookup.c: Include "timevar.h" - * name-lookup.h (cxx_scope): Declare. - (struct cxx_binding): Lose member "has_level". Adjust "scope" - member declaration. - (BINDING_SCOPE): Adjust definition. - (BINDING_HAS_LEVEL_P): Remove. - -2003-03-30 Gabriel Dos Reis - - * name-lookup.c: New file. - * name-lookup.h: Likewise.. - * decl.c (push_binding): Adjust use cxx_binding_make. - (free_bindings): Move to name-lookup.c - (pop_binding): Use cxx_binding_free. - (binding_for_name): Tidy. - * cp-tree.h: Include "name-lookup.h" - (cxx_binding_make): Move to name-lookup.h - (cxx_binding_clear): Likewise. - (struct cxx_binding): Likewise. - (LOCAL_BINDING_P): Likewise. - (INHERITED_VALUE_BINDING_P): Likewise. - (BINDING_SCOPE): Likewise. - (BINDING_HAS_LEVEL_P): Likewise. - (BINDING_VALUE): Likewise. - (BINDING_TYPE): Likewise. - * config-lang.in (gtfiles): Add cp/name-lookup.h - * Make-lang.in (cp/name-lookup.o): New rule. - (CXX_OBJS): Add cp/name-lookup.o - (CXX_TREE_H): Add cp/name-lookup.h - -2003-03-28 Jason Merrill - - PR c++/10245 - * cvt.c (force_rvalue): New fn. - * call.c (build_conditional_expr): Use it. - * cp-tree.h: Declare it. - -2003-03-28 Mike Stump - - * error.c (dump_expr): Add 0x to printed hex numbers to make - output match source code better. - -2003-03-28 Mark Mitchell - - PR c++/10218 - * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class - definitions. - - * decl2.c (generate_ctor_or_dtor_function): Tolerate a - non-existant ssdf_decls array. - (finish_file): Call generator_ctor_or_dtor_function when there are - static constructors or destructors and no other static - initializations. - -2003-03-28 Nathan Sidwell - - PR c++/10047 - * decl2.c (finish_file): Don't warn about explicitly instantiated - inline decls. - -2003-03-27 Nathan Sidwell - - PR c++/10224 - * pt.c (lookup_template_class): Only check instantiated args if - they do not contain template parameters. - -2003-03-27 Nathan Sidwell - - PR c++/10158 - * parser.c (cp_parser_function_definition): Set - DECL_INITIALIZED_IN_CLASS for members. - * pt.c (instantiate_decl): Only reduce the template args for - friends that are not defined in class. - -2003-03-25 Jason Merrill - - * call.c (print_z_candidate): Change name of first arg to msgid. - (joust): Add comment for translators. - -2003-03-24 Nathan Sidwell - - PR c++/9898, PR c++/383, DR 322 - * pt.c (maybe_adjust_types_for_deduction) : Look - through reference types on both PARM and ARG. - -2003-03-24 Nathan Sidwell - - PR c++/10119 - * error.c (dump_expr) : Use dump_expr. - * pt.c (maybe_fold_nontype_args): New function. - (tsubst_copy) : Subst any template_id args. - : Break out folding code, call it. - (tsubst_copy_and_build) : Call - maybe_fold_nontype_args. - -2003-03-24 Nathan Sidwell - - PR c++/10026 - * decl2.c (arg_assoc_type) : Don't die. - -2003-03-23 Mark Mitchell - - PR c++/7086 - * typeck.c (cxx_mark_addressable): Adjust call to - gen_mem_addressof or put_var_into_stack. - -2003-03-22 Nathan Sidwell - - PR c++/9978, c++/9708 - * cp-tree.h (instantiate_template): Add tsubst_flags parameter. - * call.c (add_template_candidate_real): Adjust - instantiate_template call. - * class.c (resolve_address_of_overloaded_function): Likewise. - * decl.c (build_enumerator): Set TREE_CONSTANT. - * pt.c (check_instantiated_args): New. - (push_inline_template_parms_recursive): Set TREE_CONSTANT, - TREE_READONLY. - (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY. - (reduce_template_parm_level): Likewise. - (process_template_parm): Likewise. - (check_explicit_specialization): Adjust instantiate_template call. - (convert_template_argument): Don't check non-type argument here. - (lookup_template_class): Check them here. - (tsubst_friend_function): Adjust instantiate_template call. - (instantiate_template): Add tsubst_flags parameter, use it. Check - instantiated args. - -2003-03-21 Zack Weinberg - - * decl.c: Update calls to shadow_warning. - -2003-03-21 Nathan Sidwell - - PR c++/9898 - * error.c (dump_decl) [CONST_DECL]: Print ''. - (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call. - -2003-03-20 Mark Mitchell - - * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope - friends. - * cp/pt.c (instantiate_class_template): Fix formatting. - -2003-03-14 Matt Austern - - * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray. - (unemitted_tinfo_decl_p): Remove. - (emit_tinfo_decl): Change declaration to remove unused parameter. - * decl2.c (finish_file): Change tinfo emission to loop through - unemitted_tinfo_decls array instead of looping through all decls. - * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove - unused second parameter. - (init_rtti_processing): initialize unemitted_tinfo_decls varray. - (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls. - (emit_tinfo_decl): remove unused second parameter, add assertion - that decl hasn't already been emitted. - -2003-03-19 Nathanael Nerode - - * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return - type from 'int' to 'bool'. Replace 0 and 1 with true and false in - return statements. - -2003-03-19 Jason Merrill - - PR c++/8316, c++/9315, c++/10136 - * call.c (print_z_candidate): Split out from... - (print_z_candidiates): ...here. - (joust): Use it. - -2003-03-17 Roger Sayle - - PR c++/10031 - * decl.c (duplicate_decls): Use the new type when prototyping - anticipated decls, even when the types match. This defines the - exception list for the built-in function. - -2003-03-17 Jason Merrill - - PR c++/10091 - * typeck.c (build_class_member_access_expr): Compare - TYPE_MAIN_VARIANTs. - -2003-03-17 Mark Mitchell - - PR c++/9639 - * parser.c (cp_parser_declarator_id): Clear parser->scope. - -2003-03-16 Jason Merrill - - PR c++/9993 - * decl.c (finish_function): Only allow the NRVO to use variables - declared at function scope. - -2003-03-17 Andreas Jaeger - - * Make-lang.in (cp/TAGS): Remove. - -2003-03-16 Nathan Sidwell - - PR c++/9629 - * cp-tree.h (struct language_function): Add in_base_initializer. - (in_base_initializer): define it. - (expand_member_init): Remove INIT param. - * init.c (expand_member_init): Remove INIT param, return the member. - (emit_mem_initializers): Set in_base_initializer. - * class.c (build_base_path): Check in_base_initializer. - * parser.c (cp_parser_mem_initializer): Set in_base_initializer. - * pt.c (tsubst_initializer_list): Likewise. - -2003-03-16 Gabriel Dos Reis - - * decl.c (binding_for_name): Fix initialization thinko. - -2003-03-15 Gabriel Dos Reis - - Compile-time improvement: 2/n. - * cp-tree.h (struct cxx_binding): New datatype; - (struct lang_identifier): Use it. - (LOCAL_BINDING_P): Adjust definition. - (INHERITED_VALUE_BINDING_P): Likewise. - (BINDING_SCOPE): Likewise. - (BINDING_HAS_LEVEL_P): Likewise. - (BINDING_VALUE): Likewise. - (BINDING_TYPE): Likewise. - (IDENTIFIER_VALUE): Likewise. - (struct tree_binding): Remove. - (TS_CP_BINDING): Likewise. - ((union lang_tree_node): Remove field "binding". - (cxx_binding_clear): New macro. - (binding_for_name): Adjust return type. - (qualified_lookup_using_namespace): Adjust prototype. - (lookup_using_namespace): Adjust prototype. - (cxx_scope_find_binding_for_name): Declare. - * cp-tree.def: Remove CPLUS_BINDING definition. - * decl.c (push_binding): Adjust local variable type. - (add_binding): Likewise. - (push_class_binding): Likewise. - (pop_binding): Likewise. - (poplevel): Likewise. - (poplevel_class): Likewise. - (free_bindings): Adjust type. - (find_binding): Adjust return type, add a third parameter. Remove - non-useful assertion now that we use static typing. - (cxx_scope_find_binding_for_name): New function. - (binding_for_name): Use it. Adjust local variable type. Simplify. - (namespace_binding): Simplify. - (set_namespace_binding): Likewise. - (set_identifier_type_value_with_scope): Adjust local variable type. - (lookup_tag): Don't type-abuse of local variable 'old'. - (lookup_namespace_name): Likewise. Allocate binding on stack. - (select_decl): Adjust prototype. - (unqualified_namespace_lookup): Allocate binding on stack. - Don't type-abuse of local variable 'val'. - (lookup_name_real): Likewise. - (maybe_inject_for_scope_var): Adjust local variable type. - (cp_tree_node_structure): Remove CPLUS_BINDING case label. - (namespace_binding): Adjust logic, simplify. - (BINDING_LEVEL): Adjust definition. - (push_class_level_binding): Adjust local variable type. - (struct cxx_saved_binding): Adjust field 'binding' type. - * decl2.c (ambiguous_decl): Adjust prototype. - (lookup_using_namespace): Adjust local variable type. - (qualified_lookup_using_namespace): Catch type error and correct - ensueing logic error. - (do_nonmember_using_decl): Adjust local variable type. Allocate - temporary cxx_binding on stack. - (do_toplevel_using_decl): Adjust local variable type. - * ptree.c (cxx_print_cxx_binding): New function. - (cxx_print_identifier): Use it. - (cxx_print_xnode): Delete CPLUS_BINDING case label. - -2003-03-15 Roger Sayle - - * tree.c (count_functions): Fix whitespace. - -2003-03-15 Neil Booth - - * Make-lang.in: Update. - -2003-03-15 Kriang Lerdsuwanakij - - PR c++/6440 - * pt.c (maybe_process_partial_specialization): Handle - member class template when enclosing class template is - explicit specialized. - (most_general_template): Stop looking when DECL is already - specialized. - -2003-03-13 Jason Merrill - - PR c++/9420 - * search.c (lookup_conversions): Call complete_type here. - * call.c (implicit_conversion): Not here. - -2003-03-13 Mark Mitchell - - * decl2.c (do_nonmember_using_decl): Correct handling of - simultaneous type/non-type bindings. - - * call.c (initialize_reference): Remove bogus assertion. - * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09. - -2003-03-12 Andrew Lewycky - - PR c++/7050 - * expr.c (cxx_expand_expr): Return const0_rtx for throw - expressions. - -2003-03-11 Mark Mitchell - - PR c++/9474 - * decl2.c (do_nonmember_using_decl): Do not call duplicate decls - to merge old and new declarations. - -2003-03-12 Alexandre Oliva - - * g++.1: Remove. - * Make-lang.in (c++.generated-manpages): Build cp/g++.1. - (cp/g++.1): Build it from scratch in the build tree. - (c++.install-man): Depend on it. Install it from the build tree. - (c++.mostlyclean): Clean it. - -2003-03-11 Mark Mitchell - - PR c++/9474 - * decl2.c (do_nonmember_using_decl): Do not call duplicate decls - to merge old and new declarations. - - PR c++/9924 - * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins. - -2003-03-11 Jason Merrill - - PR c++/9820 - * search.c (lookup_member): Fix handling of functions in a class - being defined. - -2003-03-11 Mark Mitchell - - PR c++/8700 - * call.c (convert_class_to_reference): Adjust usage of - splice_viable. - (any_viable): Remove. - (splice_viable): Combine with any_viable. - (print_z_candidates): Avoid printing duplicates. - (build_user_type_conversion_1): Adjust usage of splice_viable. - (build_new_function_call): Likewise. - (build_operator_new_call): Likewise. - (build_object_call): Likewise. - (build_conditional_expr): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - (joust): Remove spurious comment. - * cp-tree.h (DECL_FRIENDLIST): Correct documentation. - * decl2.c (arg_assoc_class): Simplify. - * friend.c (add_friend): Likewise. - -2003-03-11 Jason Merrill - - PR c++/8660 - * decl2.c (check_classfn): A member template only matches a - member template. - -2003-03-11 Neil Booth - - * Make-lang.in (CXX_C_OBJS): Update. - * lang-specs.h: Don't define __GNUG__ here. - -2003-03-10 Mark Mitchell - - * call.c (perform_overload_resolution): New function. - (build_new_function_call): Use it. - (build_operator_new_call): Likewise. - (add_candidates): Add explicit_targs and template_only parameters. - (build_new_op): Adjust accordingly. - * cp-tree.h (build_operator_new_call): New function. - (build_function_call_real): Remove. - (build_function_call_maybe): Likewise. - * init.c (build_new_1): Use build_operator_new_call. - * typeck.c (build_function_call_real): Rename to ... - (build_function_call): ... this. - -2003-03-10 Devang Patel - - PR c++/9394 - * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG. - -2003-03-10 Jason Merrill - - PR c++/9798 - * decl.c (push_using_directive): Push before recursing. - - PR c++/9868, c++/9524 - * call.c (resolve_scoped_fn_name): Handle the case of a function - pointer member. - - * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this' - argument in the pointer-to-member case. - -2003-03-09 Mark Mitchell - - PR c++/9373 - * cp-lang.c (cxx_get_alias_set): Use alias set zero for - pointers to member functions. - - PR c++/8534 - * decl.c (build_ptrmemfunc_type): Do not allow default arguments - in pointer-to-member-function types. - -2003-03-10 Gabriel Dos Reis - - * expr.c (cplus_expand_constant): Use C90 prototype style. - (cxx_expand_expr): Likewise. - -2003-03-09 Kriang Lerdsuwanakij - - PR c++/9970 - * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual - functions. - -2003-03-08 Geoffrey Keating - - * lang-specs.h (c++-header): Change .pch to .gch. - -2003-03-08 Neil Booth - - * cp-tree.h (cxx_init): Update prototype. - * lex.c (cxx_init): Similarly. - -2003-03-08 Mark Mitchell - - PR c++/9823 - * cp-tree.h (begin_mem_initializers): Remove. - * parser.c (cp_parser_mem_initializer_list): Inline it here. - Do not call finish_mem_initializers if not in a constructor. - (cp_parser_class_head): Fix typo in error message. - * semantics.c (begin_mem_initializers): Remove. - * testsuite/g++.dg/parser/constructor1.C: New test. - - PR c++/9809 - * call.c (add_function_candidate): Skip builtin fuctions that have - not yet been declared. - - PR c++/9982 - * init.c (build_new_1): Correct logic for determining whether or - not to use an array cookie. - - PR c++/9524 - * parser.c (cp_parser_postfix_expression): Call - finish_non_static_data_member, even when processing_template_decl. - - PR c++/9912 - * cp-tree.h (is_ancestor): New function. - (handle_class_head): Change prototype. - * decl2.c (is_namespace_ancestor): Rename to ... - (namespace_anecestor): ... this. - (set_decl_namespace): Adjust accordingly. - (handle_class_head): Remove unnecessary parameters. - * parser.c (cp_parser_class_head): Check that - nested-name-specifiers are used appropriately. - -2003-03-07 Mark Mitchell - - * call.c (reference_binding): Remove REF_IS_VAR parameter. - (implicit_conversion): Adjust call to reference_binding. - (make_temporary_var_for_ref_to_type): Add TYPE parameter. - (initialize_reference): Adjust handling for references bound to - rvalues. - * cp-tree.h (make_temporary_var_for_ref_to_temp): Change - prototype. - (real_non_cast_lvalue_p): New method. - * cvt.c (build_up_reference): Adjust use of - make_temporary_var_for_ref_to_temp. - * tree.c (real_non_cast_lvalue_p): New method. - -2003-03-07 Gabriel Dos Reis - - * except.c (init_exception_processing): Use C90 prototype style. - (cp_protect_cleanup_actions): Likewise. - (prepare_eh_type): Likewise. - (build_eh_type_type): Likewise. - (build_exc_ptr): Likewise. - (do_begin_catch): Likewise. - (dtor_nothrow): Likewise. - (do_end_catch): Likewise. - (push_eh_cleanup): Likewise. - (decl_is_java_type): Likewise. - (choose_personality_routine): Likewise. - (initialize_handler_parm): Likewise. - (expand_start_catch_block): Likewise. - (expand_end_catch_block): Likewise. - (begin_eh_spec_block): Likewise. - (finish_eh_spec_block): Likewise. - (do_allocate_exception): Likewise. - (do_free_exception): Likewise. - (wrap_cleanups_r): Likewise. - (stabilize_throw_expr): Likewise. - (build_throw): Likewise. - (complete_ptr_ref_or_void_ptr_p): Likewise. - (is_admissible_throw_operand): Likewise. - (nothrow_libfn_p): Likewise. - (can_convert_eh): Likewise. - (check_handlers_1): Likewise. - (check_handlers): Likewise. - -2003-03-06 Mark Mitchell - - * call.c (merge_conversion_sequences): New function. - (build_conv): Set ICS_USER_FLAG for USER_CONVs. - (convert_class_to_reference): Correct handling of second - standard conversion sequence in a user-defined conversion - sequence. - (build_user_type_conversion_1): Use merge_conversion_sequences. - * cp-tree.def: Add comments for CONV nodes. - * rtti.c (get_tinfo_decl): Use build_address/build_nop. - -2003-03-07 Gabriel Dos Reis - - * error.c (init_error): Use C90 prototype style. - (dump_scope): Likewise. - (dump_qualifiers): Likewise. - (dump_template_argument): Likewise. - (dump_template_argument_list): Likewise. - (dump_template_parameter): Likewise. - (dump_template_bindings): Likewise. - (dump_type): Likewise. - (dump_typename): Likewise. - (class_key_or_enum): Likewise. - (dump_aggr_type): Likewise. - (dump_type_prefix): Likewise. - (dump_type_suffix): Likewise. - (dump_global_iord): Likewise. - (dump_simple_decl): Likewise. - (dump_decl): Likewise. - (dump_template_decl): Likewise. - (dump_function_decl): Likewise. - (dump_parameters): Likewise. - (dump_exception_spec): Likewise. - (dump_function_name): Likewise. - (dump_template_parms): Likewise. - (dump_char): Likewise. - (dump_expr_list): Likewise. - (dump_expr): Likewise. - (dump_binary_op): Likewise. - (dump_unary_op): Likewise. - (type_as_string): Likewise. - (expr_as_string): Likewise. - (decl_as_string): Likewise. - (context_as_string): Likewise. - (lang_decl_name): Likewise. - (cp_file_of): Likewise. - (cp_line_of): Likewise. - (decl_to_string): Likewise. - (expr_to_string): Likewise. - (fndecl_to_string): Likewise. - (code_to_string): Likewise. - (language_to_string): Likewise. - (parm_to_string): Likewise. - (op_to_string): Likewise. - (type_to_string): Likewise. - (assop_to_string): Likewise. - (args_to_string): Likewise. - (cv_to_string): Likewise. - (cxx_print_error_function): Likewise. - (cp_diagnostic_starter): Likewise. - (cp_diagnostic_finalizer): Likewise. - (cp_print_error_function): Likewise. - (function_category): Likewise. - (print_instantiation_full_context): Likewise. - (print_instantiation_partial_context): Likewise. - (maybe_print_instantiation_context): Likewise. - (print_instantiation_context): Likewise. - (cp_printer): Likewise. - (print_integer): Likewise. - (print_non_consecutive_character): Likewise. - (locate_error): Likewise. - -2003-03-06 Mark Mitchell - - PR c++/9965 - * call.c (reference_binding): Add ref_is_var parameter. - (implicit_conversion): Adjust call to reference_binding. - (initialize_reference): Likewise. - - PR c++/9400 - * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL - PARM_DECLs. - - PR c++/9791 - * class.c (get_basefndecls): Use lookup_fnfields_1. - -2003-03-06 Kriang Lerdsuwanakij - - PR c++/9188 - * parser.c (cp_parser_type_parameter): Remove redundant `expect' - in error message. - (cp_parser_single_declaration): Likewise. - -2003-03-05 Jason Merrill - - PR c++/9440 - * call.c (build_conditional_expr): Use convert rather than an - explicit NOP_EXPR. - -2003-03-02 Matt Austern - - * decl.c (cp_binding_level): Add static_decls varray member. - (add_decl_to_level): Add static/inline namespace scope - declarations to static_decls array. - (wrapup_global_for_namespace): Pass static_decls only, instead of - all decls, to wrapup_global_declarations/check_global_declarations. - (push_namespace): Initialize static_decls for ordinary namespaces. - (cxx_init_decl_processing): Initialize static_decls for global - namespace. - -2003-03-05 Mark Mitchell - - * class.c (end_of_class): Correct thinko. - -2003-03-04 Nathanael Nerode - - * config-lang.in: Replace ${libstdcxx_version} by its value. - -2003-03-04 Gabriel Dos Reis - - * cp-tree.h (cxx_saved_binding): Declare. - (struct saved_scope): Adjust type of field 'old_binding'. - * decl.c (cxx_saved_binding_make): New macro. - (struct cxx_saved_binding): Define. - (store_bindings): Adjust prototype. Use cxx_saved_binding to save - C++ bindings. - (maybe_push_to_top_level): Adjust local variable type. - (pop_from_top_level): Likewise. - -2003-03-04 Tom Tromey - - * Make-lang.in (c++.tags): New target. - -2003-03-04 Neil Booth - - * Make-lang.in: Update. - -2003-03-03 Jason Merrill - - * decl.c (finish_enum): Do set the type in a template. Simplify. - * pt.c (tsubst_enum, tsubst_copy): Revert last patch. - -2003-03-03 Mark Mitchell - - PR c++/9878 - * call.c (convert_class_to_reference): Correct conversion - sequences. - (reference_binding): Add ref_bound_directly_to_rvalue_p parameter. - (implicit_conversion): Adjust call to reference_binding. - (add_candidate): Change type of candidates parameter. - (add_function_candidate): Likewise. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - (add_builtin_candidate): Likewise. - (add_builtin_candidates): Likewise. - (add_template_candidate_real): Likewise. - (add_template_candidate): Likewise. - (add_template_conv_candidate): Likewise. - (build_user_type_conversion_1): Adjust accordingly. - (build_object_call): Likewise. - (build_conditional_expr): Likewise. - (add_candidates): Likewise. - (build_new_op): Likewise. - (convert_like_real): Use USER_CONV_CAND. Use build_nop. - (build_new_method_call): Adjust calls to add_function_candidate. - (make_temporary_var_for_ref_to_temp): New function. - (initialize_reference): Add decl parameter. - * class.c (build_rtti_vtbl_entries): Use build_address and - build_nop. - * cp-tree.h (initialize_reference): Change prototype. - (make_temporary_var_for_ref_to_temp): New function. - (build_type_conversion): Change prototype. - (build_address): New function. - (build_nop): Likewise. - * cvt.c (cp_convert_to_pointer): Adjust call to - build_type_conversion. Avoid indicating redundant NOP_EXPRs. - Use build_nop. - (convert_to_pointer_force): Use build_nop. - (build_up_reference): Use make_temporary_var_for_ref_to_temp. - (convert_to_reference): Adjust call to build_type_conversion. - (ocp_convert): Likewise. - (build_type_conversion): Remove for_sure parameter. - * decl.c (grok_reference_init): Use initialize_reference. - * typeck.c (build_address): New function. - (build_nop): Likewise. - (build_unary_op): Use them. - (build_ptrmemfunc): Tidy slightly. - (convert_for_initialization): Adjust call to - initialize_reference. - * typeck2.c (store_init_value): Remove #if 0'd code. - -2003-03-03 Jason Merrill - - * decl.c (start_function): Clear DECL_NUM_STMTS. - - * class.c (get_vtable_decl): Use vtbl_type_node. - (build_primary_vtable): Check for it. - -2003-03-02 Aldy Hernandez - - * decl.c (check_initializer): Check for vector_opaque_p. - -2003-03-02 Ashif Harji - - * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to - invoke an external cpp during compilation. - -2003-03-01 Gabriel Dos Reis - - * decl.c (duplicate_decls): Convert use of warning_with_decl() to - that of warning(). - (start_decl): Likewise. - (start_function): Likewise. - -2003-03-01 Neil Booth - - * Make-lang.in (CXX_C_OBJS): Update. - -2003-02-28 Mark Mitchell - - PR c++/9892 - * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when - instantiating it. - -2003-02-28 Aldy Hernandez - - * parser.c (cp_parser_init_declarator): Revert opaque - vector_opaque_p change. - Do not include target.h. - -2003-02-28 Mark Mitchell - - PR c++/9879 - * cp-tree.h (build_zero_init): Add parameter. - * decl.c (cp_finish_decl): Adjust call. - * init.c (build_zero_init): Add nelts parameter. Adjust recursive - calls. - (build_default_init): Add nelts parameter. Adjust calls to - build_zero_init. - (build_new_1): Adjust call to build_default_init. - * typeck2.c (process_init_constructor): Adjust call to build_zero_init. - -2003-02-26 Devang Patel - - * decl.c (finish_enum): Merge two 'for' loops. Copy value node if - required. Postpone enum setting for template decls. - (build_enumerator): Delay copying value node until finish_enum - (). Remove #if 0'ed code. - * pt.c (tsubst_enum): Set TREE_TYPE and copy value node. - (tsubst_copy): Add check for enum type. - -2003-02-25 Mark Mitchell - - PR c++/9683 - * decl2.c (prune_vars_needing_no_initialization): Do not throw - away initializations for DECL_EXTERNAL VAR_DECLs. - (finish_file): Adjust accordingly. - * pt.c (instantiate_decl): Do not defer VAR_DECLs. - -2003-02-24 Gabriel Dos Reis - - * decl.c (add_binding): Time TV_NAME_LOOKUP. - (push_class_binding): Likewise. - (set_namespace_binding): Likewise. - -2003-02-24 Mark Mitchell - - PR c++/9836 - * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from - specializations back to the main template. - * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use. - * pt.c (resolve_typename_type): Likewise. - -2003-02-24 Jeffrey D. Oldham - - PR c++/9778 - * pt.c (tsubst_copy_and_build): For a templated function inside a - scope, process template arguments. - -2003-02-24 Kriang Lerdsuwanakij - - PR c++/9602 - * typeck2.c (abstract_virtuals_error): Don't check when - TYPE is still template parameter dependent. - -2003-02-23 Mark Mitchell - - PR c++/5333 - * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro. - * parser.c (cp_parser_diagnose_invalid_type_name): Use it. - * pt.c (instantiate_class_template): Don't try to instantiate - dependent types. - (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE. - -2003-02-21 Mark Mitchell - - PR c++/9749 - * decl.c (grokdeclarator): Do not allow parameters with variably - modified types. - -2003-02-21 Nathan Sidwell - - * search.c (grow_bfs_bases): Remove. Fold into ... - (bfs_walk): ... here, fix fencepost error. Fix merge lossage - in previous patch. - -2003-02-20 Mark Mitchell - - PR c++/9729 - * mangle.c (mangle_conv_op_name_for_type): Issue an error message - when the G++ 3.2 ABI prevents correct compilation. - -2003-02-20 Nathan Sidwell - - Change base class access representation. Share virtual base - binfos. - * cp/call.c (build_special_member_call): Remove binfo_for_vbase - call. - * cp/class.c (build_base_path): Likewise. - (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use. - (build_secondary_vtable): Remove FOR_TYPE arg. Adjust. - (make_new_vtable): Adjust. - (force_canonical_binfo_r): Delete. - (force_canonical_binfo): Delete. - (mark_primary_virtual_base): Delete. - (dfs_unshared_virtual_bases): Delete. - (mark_primary_bases): Adjust. - (maybe_warn_about_overly_private_class): Adjust. - (dfs_base_derived_from): Delete. - (base_derived_from): Follow the inheritance chain. - (struct find_final_overrider_data): Add vpath member. - (dfs_find_final_overrider): Adjust. - (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New. - (find_final_overrider): Adjust. - (update_vtable_entry_for_fn): Adjust. - (modify_all_vtables): Adjust. - (walk_subobject_offsets): Adjust. - (layout_nonempty_base_or_field): Adjust. - (layout_empty_base): Remove last parameter. Adjust. - (build_base_field): Adjust. - (build_base_fields): Adjust. - (propagate_binfo_offsets): Remove last parameter. Adjust. - (dfs_set_offset_for_unshared_vbases): Delete. - (layout_virtual_bases): Adjust. - (finish_struct_1): Adjust. - (init_class_processing): Don't init access nodes. - (dfs_get_primary_binfo): Delete. - (get_primary_binfo): Adjust. - (dump_class_hierarchy_r): Remove most derived arg, add IGO - parameter. Adjust. - (dump_class_hierarchy): Adjust. - (finish_vtbls): Adjust. - (get_original_base): Delete. - (build_vtt_inits): Adjust. - (dfs_build_secondary_vptr_vtt_inits): Adjust. - (dfs_ctor_vtable_bases_queue_p): Adjust. - (build_ctor_vtbl_group): Adjust. - (dfs_accumulate_vtbl_inits): Adjust. - (build_vtbl_initializer): Adjust. - (build_vbase_offset_vtbl_entries): Adjust. - (add_vcall_offset_vtbl_entries_1): Adjust. - * cp/cp-tree.h (CPTI_ACCESS_*): Remove. - (access_*_node): Remove. - (CANONICAL_BINFO): Delete. - (BINFO_UNSHARED_MARKED): Remove. - (BINFO_MARKED): Set LANG_FLAG_0 directly. - (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete. - (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly. - (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED): - Delete. - (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly. - (SET_BINFO_NEW_VTABLE_MARKED): Adjust. - (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED): - Delete. - (BINFO_DEPENDENT_BASE_P): New. - (dfs_walk, dfs_walk_real): Queue function takes derived binfo and - index. - (markedp, unmarkedp): Adjust. - (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p, - dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp, - find_vbase_instance, binfo_for_vbase): Delete. - (copied_binfo, original_binfo): Declare. - (finish_base_specifier): Add virtual_p arg. - (unshare_base_binfos): Delete. - (copy_base_binfos): Declare. - (reverse_path): Delete. - * cp/decl.c (xref_basetypes): Access and virtuality passed - differently. Don't copy direct base binfos here. Call - copy_base_binfos. - * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust. - (initialize_vtbl_ptrs): Adjust. - (expand_member_init): Adjust. - * cp/parser.c (cp_parser_base_specifier): Adjust. - * cp/pt.c (instantiate_class_template): Adjust. - (get_template_base_recursive): Adjust. - * cp/rtti.c (get_pseudo_ti_init): Adjust. - (get_pseudo_ti_desc): Adjust. - * cp/tree.c (unshare_base_binfos): Rename to ... - (copy_base_binfos): ... here, reimplement. - (make_binfo): Set BINFO_DEPENDENT_BASE_P. - (reverse_path): Remove. - * cp/typeck.c (get_delta_difference): Adjust error messages. - * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust. - * cp/search.c (lookup_base_r): Adjust. - (dynamic_cast_base_recurse): Adjust. - (canonical_binfo): Remove. - (dfs_canonical_queue): Remove. - (dfs_assert_unmarked_p): Remove. - (assert_canonical_unmarked): Remove. - (shared_marked_p, shared_unmarked_p): Remove. - (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE. - (dfs_access_in_type): Adjust. - (access_in_type): Adjust. - (dfs_accessible_queue_p): Adjust. - (dfs_accessible_p): Adjust. - (is_subobject_of_p_1, is_subobject_of_p): Remove. - (struct lookup_field_info): Remove from_dep_base_p field. - (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P. - (lookup_field_r): Remove dependent base code. - (lookup_member): Likewise. - (dfs_walk, dfs_walk_real): Add access arg to queue fn. - (dfs_unmarked_real_bases_queue_p): Remove. - (dfs_marked_real_bases_queue_p): Remove. - (dfs_skip_vbases): Remove. - (dfs_get_pure_virtuals): Adjust. - (markedp, unmarkedp): Adjust. - (marked_vtable_pathp, unmarked_vtable_pathp): Remove. - (marked_pushdecls_p, unmarked_pushdecls_p): Adjust. - (dfs_unmark): Adjust. - (dfs_get_vbase_types):Remove. - (dfs_build_inheritance_graph_order): Remove. - (get_vbase_types): Remove - (dfs_find_vbase_instance): Remove. - (find_vbase_instance): Remove. - (dfs_debug_unmarkedp): Adjust. - (dependent_base_p): Remove. - (dfs_push_type_decls): Adjust. - (dfs_push_decls): Adjust. - (dfs_no_overlap_yet): Adjust. - (copied_binfo): New function. - (original_binfo): New function. - (binfo_for_vbase): Remove. - -2003-02-18 Zack Weinberg - - * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk. - (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES - vectors, for speed. - -2003-02-18 Mark Mitchell - - PR c++/9704 - * class.c (layout_class_type): In the 3.2 ABI, take into account - trailing bit fields when computing CLASSTYPE_SIZE_UNIT. - -2003-02-18 Matt Austern - - * cp/cp-lang.c: Change lang hooks so that final_write_globals does - nothing for C++. - * cp/decl.c (wrapup_globals_for_namespace): Remove special - handling of global namespace. - -2003-02-18 Geoffrey Keating - - * cp-tree.h (rid_to_yy): Delete. - (C_RID_YYCODE): Delete. - (finish_file): Delete redundant declaration. - -2003-02-18 Jason Merrill - - PR c++/9623 - * decl.c (reshape_init): Don't mess with initializer labels. - - PR c++/9485 - * parser.c (cp_parser_postfix_expression): Set idk properly for - object->scope::member. - -2003-02-18 Ben Elliston - - PR other/7350 - * decl.c (duplicate_decls): Fix typo in comment. - -2003-02-17 Michael Elizabeth Chastain - - PR debug/9717 - * class.c (build_base_field): Mark fields for base classes with - DECL_IGNORED_P. - -2003-02-17 Kriang Lerdsuwanakij - - PR c++/9457 - * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute - CONSTRUCTOR_ELTS only once. - -2003-02-16 Kriang Lerdsuwanakij - - PR c++/9459 - * error.c (dump_type_prefix): Handle TYPEOF_TYPE. - (dump_type_suffix): Likewise. - -2003-02-14 Nathan Sidwell - - * search.c: ANSIfy function declarations and definitions. - * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool. - * call.c (build_method_call, resolve_scoped_fn_name, - build_java_interface_fn_ref): Adjust lookup_field, lookup_member - calls. - * class.c (handle_using_decl): Likewise. - * decl.c (make_typename_type, make_unmound_class_template, - start_decl, compute_array_index_type): Likewise. - * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise. - * init.c (expand_member_init, build_member_call): Likewise. - * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation, - resolve_typename_type): Likewise. - * typeck.c (lookup_destructor, finish_class_member_access_exprm - build_prememfunc_access_expr): Likewise. - -2003-02-13 Gabriel Dos Reis - - * decl2.c: Include "timevar.h". - (namespace_ancestor): Time name lookup. - (add_using_namespace): Likewise. - (lookup_using_namespace): Likewise. - (qualified_lookup_using_namespace): Likewise. - (decl_namespace): Likewise. - (lookup_arg_dependent): Likewise. - * lex.c (do_identifier): Likewise. - (do_scoped_id): Likewise. - * pt.c (lookup_template_class): Likewise. - -2003-02-14 Andrew Pinski - - * decl.c: (define_label): Fix warning for return 0 instead of NULL. - -2003-02-13 Gabriel Dos Reis - - * decl.c: Include "timevar.h". - (poplevel): Time name lookup. - (find_binding): Likewise. - (push_namespace): Likewise. - (pop_nested_namespace): Likewise. - (store_bindings): Likewise. - (maybe_push_to_top_level): Likewise. - (pop_from_top_level): Likewise. - (push_local_name): Likewise. - (pushtag): Likewise. - (pushdecl): Likewise. - (pushdecl_with_scope): Likewise. - (pushdecl_namespace_level): Likewise. - (pushdecl_top_level): Likewise. - (pushdecl_class_level): Likewise. - (push_class_level_binding): Likewise. - (push_using_decl): Likewise. - (push_using_directive): Likewise. - (push_overloaded_decl): Likewise. - (lookup_label): Likewise. - (define_label): Likewise. - (lookup_tag): Likewise. - (lookup_tag_reverse): Likewise. - (lookup_namespace_name): Likewise. - (select_decl): Likewise. - (unqualified_namespace_lookup): Likewise. - (lookup_name_real): Likewise. - (lookup_name_current_level): Likewise. - (lookup_type_current_level): Likewise. - (maybe_inject_for_scope_var): Likewise. - (xref_tag): Likewise. - - * Make-lang.in (cp/decl.o): Add dependency on timevar.h - -2003-02-12 Phil Edwards - - * decl.c (build_enumerator): Remove unneeded test. - -2003-02-09 Dan Nicolaescu - - * cp-tree.h (struct lang_type_header): Make all fields unsigned - char. - -2003-02-03 Mark Mitchell - - PR c++/7129 - * call.c (z_candidate): Add args. - (convert_class_to_reference): Set it. - (implicit_conversion): Tidy. - (add_candidate): Add args parameter. - (add_function_candidate): Adjust call to add_candidate. - (add_conv_candidate): Likewise. - (build_builtin_candidate): Likewise. - (build_user_type_conversion_1): Eliminate wasteful tree_cons - usage. - (build_new_function_call): Likewise. - (build_object_call): Likewise. - (add_candidates): New function. - (build_new_op): Use it. - (covert_like_real): Adjust call to build_over_call. - (build_over_call): Remove args parameter. - * operators.def: Add ?=. - -2003-02-01 Richard Sandiford - - * typeck.c (build_indirect_ref): Don't check flag_volatile. - -2003-01-31 Kriang Lerdsuwanakij - - PR c++/8849 - * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL. - -2003-01-31 Nathan Sidwell - - * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, - BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS. - (BINFO_LANG_ELTS): New #define. - * tree.c (make_binfo): Use BINFO_LANG_ELTS. - -2003-01-30 Geoffrey Keating - - * cp/Make-lang.in: Remove -Wno-error from cp/decl.o. - -2003-01-30 Mark Mitchell - - * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY - for class types. - * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit - rather than TYPE_LANG_FLAG_0. - (TYPE_BUILT_IN): Remove. - (TYPE_DEPENDENT_P): New macro. - (TYPE_DEPENDENT_P_VALID): Likewise. - (lang_type_class): Add fields_readonly. - * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN. - * pt.c (dependent_type_p_r): New function, split out from ... - (dependent_type_p): ... here. Memoize results. - * search.c (dependent_base_p): Use dependent_type_p, not - uses_template_parms. - * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY - for class types. - -2003-01-29 Mark Mitchell - - * call.c (build_field_call): Use build_new_op, not build_opfncall. - (prep_operand): New function. - (build_new_op): Use it. Remove dead code. - * class.c (pushclass): Change "modify" parameter type from int to - bool. - (currently_open_class): Use same_type_p, not pointer equality. - (push_nested_class): Adjust calls to pushclass, remove modify - parameter. - * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro. - (pushclass): Change prototype. - (push_nested_class): Likewise. - (grokoptypename): Remove. - (build_opfncall): Remove. - (value_dependent_expression_p): Declare. - (resolve_typename_type): Likewise. - (resolve_typename_type_in_current_instantiation): Likewise. - (enter_scope_of): Remove. - (tsubst): Remove. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (tsubst_copy_and_build): Likewise. - * decl.c (warn_about_implicit_typename_lookup): Remove. - (finish_case_label): Return error_mark_node for erroneous labels. - (start_decl): Adjust calls to push_nested_class. - (grokfndecl): Call push_scope/pop_scope around call to - duplicate_decls. - (grokdeclarator): Do not call tsubst. - (start_function): Adjust calls to push_nested_class. - * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall. - (check_classfn): Use push_scope/pop_scope around type comparisions. - (grokoptypename): Remove. - (push_sscope): Adjust call to push_nested_class. - * error.c (dump_type): Show cv-qualification of typename types. - * init.c (build_member_call): Use build_new_op, not - build_opfncall. - * method.c (build_opfncall): Remove. - * parser.c (cp_parser): Add allow_non_constant_expression_p and - non_constant_expression_p. - (cp_parser_constant_expression): Adjust prototype. - (cp_parser_resolve_typename_type): Remove. - (cp_parser_non_constant_expression): New function. - (cp_parser_non_constant_id_expression): Likewise. - (cp_parser_new): Set allow_non_constant_expression_p and - non_constant_expression_p. - (cp_parser_primary_expression): Reject `this' and `va_arg' in - constant-expressions. Note that dependent names aren't really - constant. - (cp_parser_postfix_expression): Reject conversions to non-integral - types in constant-expressions. Neither are increments or - decrements. - (cp_parser_unary_expression): Reject increments and decrements in - constant-expressions. - (cp_parser_direct_new_declarator): Adjust call to - cp_parser_constant_expression. - (cp_parser_cast_expression): Reject conversions to non-integral - types in constant-expressions. - (cp_parser_assignment_expression): Rejects assignments in - constant-expressions. - (cp_parser_expression): Reject commas in constant-expressions. - (cp_parser_labeled_statement): Adjust call to - cp_parser_constant_expression. - (cp_parser_direct_declarator): Simplify array bounds, even in - templates, when they are non-dependent. Use - resolve_typename_type, not cp_parser_resolve_typename_type. - (cp_parser_class_head): Use resolve_typename_type, not - cp_parser_resolve_typename_type. - (cp_parser_member_declaration): Adjust call to - cp_parser_constant_expression. - (cp_parser_constant_initializer): Likewise. - (cp_parser_constructor_declarator): Use resolve_typename_type, not - cp_parser_resolve_typename_type. - (cp_parser_late_parsing_default_args): Adjust call to - push_nested_class. - * pt.c (tsubst): Give it internal linkage. - (tsubst_expr): Likewise. - (tsubst_copy): Likewise. - (tsubst_copy_and_build): Likewise. - (push_access_scope_real): Likewise. - (tsubst_friend_class): Likewise. - (instantiate_class_template): Adjust call to pushclass. - (value_dependent_expression_p): Give it external linkage. - Robustify. - (resolve_typename_type): New function. - * semantics.c (finish_call_expr): Use build_new_op, not - build_opfncall. - (begin_constructor_declarator): Remove. - (begin_class_definition): Adjust call to pushclass. - (enter_scope_of): Remove. - * typeck.c (comptypes): Resolve typename types as appropriate. - (build_x_indirect_ref): Use build_new_op, not build_opfncall. - (build_x_compound_expr): Likewise. - (build_modify_expr): Likewise. - (build_x_modify_expr): Likewise. - * typeck2.c (build_x_arrow): Likewise. - -2003-01-29 Fariborz Jahanian - - * pt.c (last_pending_template) Declare GTY(). - -2003-01-29 Kriang Lerdsuwanakij - - PR c++/8591 - * parser.c (cp_parser_elaborated_type_specifier): Convert - TEMPLATE_DECL to TYPE_DECL only when processing template friends. - (cp_parser_maybe_treat_template_as_class): Remove redundant tests. - -2003-01-28 Nathan Sidwell - - PR c++/9437 - * pt.c (unify): Don't unify '*T' with 'U C::*'. - - PR c++/3902 - * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor - inside a declarator. - -2003-01-27 Nathan Sidwell - - * class.c (update_vtable_entry_for_fn): Add index parameter. - Generate vcall thunk for covariant overriding from a virtual - primary base. - (dfs_modify_vtables): Adjust. - -2003-01-25 Nathan Sidwell - - PR c++/9403 - * parser.c (cp_parser_class_or_namespace_name): Reject duplicate - template keyword. - (cp_parser_base_specifier): Look for and consume a - TEMPLATE keyword. Replace switch with array index. - - PR c++/795 - * semantics.c (finish_non_static_data_member): Remember the - field's type even in a template. - - PR c++/9415 - * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are - already scoped. - - PR c++/8545 - * parser.c (cp_parser_cast_expression): Be more tentative. - -2003-01-25 Kriang Lerdsuwanakij - - * cp-tree.h (flagged_type_tree_s): Remove. - (check_for_new_type): Likewise. - * typeck2.c (check_for_new_type): Likewise. - -2003-01-23 Nathanael Nerode - - * dump.c: ANSIfy function declarations and definitions. - - * cp-tree.h, decl.h: Get rid of PARAMS. Again. - -2003-01-22 Mark Mitchell - - PR c++/9354 - * init.c (build_new): Set the type of the new-expression, even - when processing_templte_decl. - - PR c++/9216 - * parser.c (cp_parser_primary_expression): Improve error message - for templates used in an expression context. - - PR c++/8696 - * parser.c (cp_parser_decl_specifier_seq): Commit to tentative - parse when encountering "typedef". - -2003-01-22 Nathanael Nerode - - * class.c, parser.c: ANSIfy function definitions and declarations. - -2003-01-22 Mark Mitchell - - PR c++/9328 - * error.c (dump_decl): For an OVERLOAD, just print the name of the - function; it doesn't make sense to try to print its type. - * semantics.c (finish_typeof): Issue errors about invalid uses. - - PR c++/9298 - * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New - function. - (cp_parser_expression_statement): Use it. - (cp_parser_explicit_instantiation): Likewise. - * pt.c (do_decl_instantiation): Improve error handling logic. - -2003-01-22 Mark Mitchell - - PR c++/9384 - * parser.c (cp_parser_using_declaration): Issue error messages - about name resolution failures here. - - PR c++/9388 - * class.c (currently_open_derived_class): Use dependent_type_p. - * cp-tree.h (dependent_type_p): New function. - (dependent_template_arg_p): Likewise. - (dependent_template_p): Likewise. - (type_dependent_expression_p): Likewise. - * parser.c (cp_parser_dependent_type_p): Remove. - (cp_parser_value_dependent_type_p): Likewise. - (cp_parser_type_dependent_expression_p): Likewise. - (cp_parser_dependent_template_arg_p): Likewise. - (cp_parser_dependent_template_id_p): Likewise. - (cp_parser_dependent_template_p): Likewise. - (cp_parser_diagnose_invalid_type_name): Replace - cp_parser_dependent_type_p with dependent_type_p, etc. - (cp_parser_primary_expresion): Likewise. - (cp_parser_nested_name_specifier_opt): Likewise. - (cp_parser_postfix_expression): Likewise. - (cp_parser_unary_expression): Likewise. - (cp_parser_template_name): Likewise. - (cp_parser_class_name): Likewise. - (cp_parser_lookup_name): Likewise. - * pt.c (dependent_type_p): New function. - (value_dependent_expression_p): Likewise. - (type_dependent_expression_p): Likewise. - (dependent_template_arg_p): Likewise. - (dependent_template_id_p): Likewise. - (dependent_template_p): Likewise. - - PR c++/9285 - PR c++/9294 - * parser.c (cp_parser_simple_declaration): Return quickly when - encountering errors. - -2003-01-21 Kaveh R. Ghazi - - Make-lang.in (cp/decl.o-warn): Add -Wno-error. - -2003-01-17 Jason Merrill - - PR c++/9167, c++/9358 - * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE. - -2003-01-17 Jason Merrill - - PR c++/9342 - * call.c (build_conditional_expr): Always do lvalue-rvalue - conversion. - -2003-01-17 Mark Mitchell - - PR c++/9294 - * cp-tree.def (BASELINK): Make it class 'x', not class 'e'. - * cp-tree.h (BASELINK_BINFO): Adjust. - (BASELINK_FUNCTIONS): Likewise. - (BASELINK_ACCESS_BINFO): Likewise. - (tree_baselink): New structure. - (cp_tree_node_structure_enum): Add TS_CP_BASELINK. - (lang_tree_node): Add baselink. - * decl.c (cp_tree_node_structure): Add BASELINK case. - * search.c (build_baselink): Adjust. - * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P - test from TREE_LIST case. - - PR c++/9272 - * parser.c (cp_parser_constructor_declarator_p): Do not assume - that a constructor cannot be declared outside of its own class. - - * parser.c (cp_parser_resolve_typename_type): If the scope cannot - be resolved, neither can the qualified name. - - * rtti.c (get_pseudo_ti_desc): Fix thinko. - -2003-01-16 Jason Merrill - - PR c++/8564 - * init.c (build_vec_init): Re-add maxindex parm. - (perform_member_init, build_aggr_init): Pass it. - (build_new_1): Pass it. Use an incomplete array type for full_type. - * typeck.c (build_modify_expr): Pass it. - * cp-tree.h: Adjust. - -2003-01-16 Jeffrey D. Oldham - - * cp-tree.h (tsubst_copy_and_build): New declaration. - * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment. - (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment. - (tsubst_copy_and_build): New function. - -2003-01-16 Mark Mitchell - - * cp-tree.h (lang_type_class): Remove is_partial_instantiation. - (PARTIAL_INSTANTIATION_P): Remove. - (IMPLICIT_TYPENAME_P): Likewise. - (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise. - (build_typename_type): Remove declaration. - (parmlist_is_exprlist): Likewise. - * decl.c (build_typename_type): Make it static, remove third - parameter. - (push_class_binding): Don't do implicit typename stuff. - (make_typename_type): Likewise. - (lookup_name_real): Likewise. - (grokdeclarator): Don't try to convert declarations into - initializations. Don't do implicit typename stuff. - (parmlist_is_exprlist): Remove. - (xref_basetypes): Simplify. - * decl2.c (grokfield): Don't try to convert declarations into - initializations. - (build_anon_union_vars): Do this while processing templates, too. - (finish_anon_union): Likewise. - * error.c (dump_type): Remove implicit typename handling. - * parser.c (cp_parser_diagnose_invalid_type_name): New method. - (cp_parser_primary_expression): Correct handling of names not - found by unqualified name lookup in templates. - (cp_parser_nested_name_specifier_opt): Avoid checking dependency - of types when possible. - (cp_parser_simple_declaration): Complain intelligently about some - invalid declarations. - (cp_parser_member_declaration): Likewise. - (cp_parser_constructor_declarator_p): Don't check when we're in a - function scope. - * pt.c (instantiate_class_template): Remove - PARTIAL_INSTANTIATION_P gunk. - * search.c (lookup_field_r): Don't build implicit typenames. - (marked_pushdecls_p): Don't enter dependent base types. - (unmarked_pushdecls_p): Likewise. - * semantics.c (begin_class_definition): Remove implicit typename - stuff. - -2003-01-16 Nathan Sidwell - - PR c++/9212 - * parser.c (cp_parser_direct_declarator): If accepting either - abstract or named, the name must be an unqualified-id. - -2003-01-16 Kaveh R. Ghazi - - * class.c (layout_virtual_bases): Avoid signed/unsigned warning. - -2003-01-14 Kaveh R. Ghazi - - * decl2.c (check_classfn): Fix uninitialized warning. - (build_anon_union_vars): Likewise. - * pt.c (tsubst_copy): Likewise. - -2003-01-14 Jeffrey D. Oldham - - Further conform g++'s __vmi_class_type_info to the C++ ABI - specification. - * rtti.c (dfs_class_hint_mark): Do not set hints not specified by - the specification. - (class_hint_flags): Likewise. - -2003-01-14 Kriang Lerdsuwanakij - - * config-lang.in: Add semantics.c to gtfiles. - * cp-tree.h (flagged_type_tree_s): Remove lookups field. - (saved_scope): Likewise. - (type_lookups): Remove. - (deferred_access): New structure. - (type_access_control): Remove. - (save_type_access_control): Likewise. - (reset_type_access_control): Likewise. - (decl_type_access_control): Likewise. - (push_deferring_access_checks): Declare. - (resume_deferring_access_checks): Likewise. - (stop_deferring_access_checks): Likewise. - (pop_deferring_access_checks): Likewise. - (get_deferred_access_checks): Likewise. - (pop_to_parent_deferring_access_checks): Likewise. - (perform_deferred_access_checks): Likewise. - (perform_or_defer_access_check): Likewise. - * decl.c (make_typename_type): Use perform_or_defer_access_check. - (make_unbound_class_template): Likewise. - (grokdeclarator): Don't call decl_type_access_control. - * parser.c (cp_parser_context): Remove deferred_access_checks - and deferring_access_checks_p fields. - (cp_parser_context_new): Adjust. - (cp_parser): Remove access_checks_lists. - (cp_parser_defer_access_check): Remove. - (cp_parser_start_deferring_access_checks): Remove. - (cp_parser_stop_deferring_access_checks): Remove. - (cp_parser_perform_deferred_access_checks): Remove. - (cp_parser_nested_name_specifier_opt): Use new deferred access - functions. - (cp_parser_simple_declaration): Likewise. - (cp_parser_template_id): Likewise. - (cp_parser_function_definition): Likewise. - (cp_parser_class_specifier): Likewise. - (cp_parser_lookup_name): Likewise. - (cp_parser_single_declaration): Likewise. - (cp_parser_pre_parsed_nested_name_specifier): Likewise. - (cp_parser_parse_tentatively): Likewise. - (cp_parser_parse_definitely): Likewise. - (yyparse): Likewise. - (cp_parser_init_declarator): Remove access_checks parameter. - Use new deferred access functions. - (cp_parser_function_definition_from_specifiers_and_declarator): - Likewise. - (cp_parser_class_head): Remove deferring_access_checks_p and - saved_access_checks parameters. Use new deferred access functions. - (cp_parser_member_specification_opt): Don't call - reset_type_access_control. - * search.c (type_access_control): Remove. - * semantics.c: Include "gt-cp-semantics.h". - (deferred_type_access_control): Remove. - (deferred_access_stack): New variable. - (deferred_access_free_list): Likewise. - (push_deferring_access_checks): New function. - (resume_deferring_access_checks): Likewise. - (stop_deferring_access_checks): Likewise. - (pop_deferring_access_checks): Likewise. - (get_deferred_access_checks): Likewise. - (pop_to_parent_deferring_access_checks): Likewise. - (perform_deferred_access_checks): New function, adapted from - cp_parser_perform_deferred_access_checks. - (perform_or_defer_access_check): New function, adapted from - cp_parser_defer_access_check. - (current_type_lookups): Remove. - (deferred_type_access_control): Likewise. - (decl_type_access_control): Likewise. - (save_type_access_control): Likewise. - (reset_type_access_control): Likewise. - (begin_function_definition): Adjust. - (begin_class_definiton): Likewise. - -2003-01-13 Jason Merrill - - PR c++/8748 - * class.c (build_base_path): Take the address before calling save_expr. - - * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if - all the ambiguous conversions are bad. - - * class.c (maybe_warn_about_overly_private_class): Don't stop - searching when we find a nonprivate method. - - * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue. - -2003-01-12 Mark Mitchell - - * cp-tree.h (get_arglist_len_in_bytes): Remove. - - PR c++/9264 - * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous - typeame types more robustly. - -2003-01-11 Phil Edwards - - * parser.c: Fix comment typos. - -2003-01-10 Mark Mitchell - - PR c++/9099 - * parser.c (cp_parser_scope_through_which_access_occurs): Handle - an object_type which is not a class type. - -2003-01-10 Geoffrey Keating - - * parser.c (cp_parser_late_parsing_for_member): Don't cast to void. - (cp_parser_late_parsing_default_args): Likewise. - -2003-01-10 Nathanael Nerode - - * cfns.gperf: ANSIfy function declarations. - * cfns.h: Regenerate. - * cp-tree.h: ANSIfy function declarations. - -2003-01-10 Mark Mitchell - - * cp-tree.h (reparse_absdcl_as_expr): Remove. - (reparse_absdcl_as_casts): Likewise. - (reparse_decl_as_expr): Likewise. - (finish_decl_parsing): Likewise. - * decl2.c (reparse_absdcl_as_expr): Remove. - (reparse_absdcl_as_casts): Likewise. - (repase_decl_as_expr): Likewise. - (finish_decl_parsing): Likewise. - - PR c++/9128 - PR c++/9153 - PR c++/9171 - * parser.c (cp_parser_pre_parsed_nested_name_specifier): New - function. - (cp_parser_nested_name_specifier_opt): Correct the - check_dependency_p false. - (cp_parser_postfix_expression): Fix formatting. - (cp_parser_decl_specifier_seq): Avoid looking for constructor - declarators when possible. - (cp_parser_template_id): Avoid performing name-lookup when - possible. - (cp_parser_class_head): Do not count specializations when counting - levels of templates. - (cp_parser_constructor_declarator_p): Return immediately if - there's no chance that the tokens form a constructor declarator. - * rtti.c (throw_bad_typeid): Add comment. Do not return an - expression with reference type. - (get_tinfo_decl_dynamic): Do not return an expression with - reference type. - (build_typeid): Add comment. Do not return an expression with - reference type. - * typeck.c (build_class_member_access_expr): Improve handling of - conditionals and comma-expressions as objects. - -2003-01-09 Nathanael Nerode - - * cfns.gperf: ANSIfy function declarations. - * cfns.h: Regenerate. - * cp-tree.h: ANSIfy function declarations. - * parser.c: ANSIfy function declarations & definitions. - - * decl.c (bad_specifiers): Fix parameter order error I introduced. - -2003-01-09 Geoffrey Keating - - Merge from pch-branch: - - 2003-01-09 Geoffrey Keating - - Merge to tag pch-merge-20030102: - - * semantics.c (finish_translation_unit): Don't call finish_file. - * parser.c: Don't include ggc.h. - (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer, - read first token here. Don't allow PCH files after the first - token is read. - (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new. - (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL. - (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory. - (cp_parser_late_parsing_for_member): Don't duplicate call to - cp_lexer_set_source_position_from_token. - (cp_parser_late_parsing_default_args): Likewise. - (yyparse): Call finish_file after clearing the_parser. - - 2002-12-11 Geoffrey Keating - - * Make-lang.in: Remove $(GGC_H) from all dependencies. - (CXX_TREE_H): Add $(GGC_H). - * class.c: Don't include ggc.h. - (field_decl_cmp): Make parameters be 'const void *' to match qsort. - (method_name_cmp): Likewise. - (resort_data): New variable. - (resort_field_decl_cmp): New. - (resort_method_name_cmp): New. - (resort_sorted_fields): New. - (resort_type_method_vec): New. - (finish_struct_methods): Delete cast. - (finish_struct_1): Delete cast. - * cp-tree.h: Include ggc.h. - (struct lang_type_class): Add reorder attribute to field `methods'. - (union lang_decl_u3): Add reorder attribute to field `sorted_fields'. - (resort_sorted_fields): New prototype. - (resort_type_method_vec): New prototype. - * call.c: Don't include ggc.h. - * decl.c: Likewise. - * decl2.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * method.c: Likewise. - * optimize.c: Likewise. - * parse.y: Likewise. - * pt.c: Likewise. - * repo.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - - * lang-specs.h: Remove comment. - - 2002-12-03 Geoffrey Keating - - * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery. - (operator_name_info): Mark to be saved for PCH, specify size. - (assignment_operator_name_info): Likewise. - - 2002-11-19 Geoffrey Keating - - * decl.c (anon_cnt): Mark to be saved for PCH. - - 2002-10-25 Geoffrey Keating - - * lex.c (init_reswords): Delete now-untrue comment. - Allocate ridpointers using GGC. - - 2002-10-04 Geoffrey Keating - - * cp-tree.h (union lang_decl_u2): Add tags to all fields. - - * g++spec.c (lang_specific_driver): Don't include standard - libraries in `added'. - - 2002-08-27 Geoffrey Keating - - * decl2.c (finish_file): Call c_common_write_pch. - * Make-lang.in (CXX_C_OBJS): Add c-pch.o. - - 2002-08-17 Geoffrey Keating - - * g++spec.c (lang_specific_driver): Treat .h files as C++ header - files when using g++. - * lang-specs.h: Handle compiling C++ header files. - -2003-01-09 Jakub Jelinek - - * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs. - -2003-01-09 Kriang Lerdsuwanakij - - * pt.c (push_access_scope_real): Call push_to_top_level for - function in namespace scope. - (pop_access_scope): Call pop_from_top_level for function in - namespace scope. - -2003-01-09 Jakub Jelinek - - * decl.c (start_decl): Don't set DECL_COMMON for __thread variables. - -2003-01-09 Christian Cornelssen - - * Make-lang.in (c++.install-common, c++.install-man, - c++.uninstall): Prepend $(DESTDIR) to destination paths in - all (un)installation commands. - (c++.install-common): Rewrite $(LN) commands to support - DESTDIR with "ln" as well as with "ln -s". - -2003-01-08 Jason Merrill - - * parser.c (cp_parser_primary_expression): See through explicitly - scoped ALIAS_DECLs, too. - -2003-01-08 Nathanael Nerode - - * decl.c: Remove some #if 0 code. - - * decl.c: ANSIfy function declarations. - -2003-01-07 Mark Mitchell - - * parser.c (cp_parser_asm_definition): Correct handling of omitted - operands. - -2003-01-08 Kriang Lerdsuwanakij - - PR c++/9030 - * decl.c (make_typename_type): Check access only when tf_error. - (make_unbound_class_template): Likewise. - * pt.c (saved_access_scope): New variable. - (push_access_scope_real): New function. - (push_access_scope): Likewise. - (pop_access_scope): Likewise. - (tsubst_default_argument): Use them. - (instantiate_template): Likewise. - (regenerate_decl_from_template): Likewise. - (instantiate_decl): Likewise. - (get_mostly_instantiated_function_type): Likewise. - -2003-01-07 Nathanael Nerode - - * tree.c: Delete bogus #if 0 code. - -2003-01-07 Andreas Schwab - - * class.c (layout_class_type): Don't use - PCC_BITFIELD_TYPE_MATTERS if not defined. - -2003-01-06 Mark Mitchell - - PR c++/9165 - * decl2.c (build_cleanup): Mark the object as used. - - * pt.c (retrieve_local_specialization): Revert 2003-01-05 change. - (hash_local_specialization): New function. - (register_local_specialization): Revert 2003-01-05 change. - (instantiate_decl): Use hash_local_specialization when creating - the local_specializations table. - - * decl2.c (mark_used): Do not synthesize thunks. - - * class.c (layout_class_type): Correct handling of unnamed - bitfields wider than their types. - - PR c++/9189 - * parser.c (cp_parser): Remove default_arg_types. Update - documentation for unparsed_functions_queues. - (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the - parameter. - (cp_parser_new): Don't set parser->default_arg_types. - (cp_parser_function_definition): Adjust usage of - unparsed_funtions_queues. - (cp_parser_class_specifier): Don't mess with - parser->default_arg_types. Handle default argument processing in - a separate phase from function body processing. - (cp_parser_template_declaration_after_export): Adjust usage of - unparsed_functions_queues. - (cp_parser_late_parsing_for_member): Do not handle default - arguments. - -2003-01-06 Nathan Sidwell - - PR c++/9109 - * parser.c (cp_parser_declarator_kind): New enum. - (cp_parser_declarator): Adjust. - (cp_parser_direct_declarator): Adjust. Allow for either named or - abstract declarator. Prefer abstract, if possible. Allow - parenthesized function name. - (cp_parser_condition): Adjust cp_parser_declarator call. - (cp_parser_explicit_instantiation): Likewise. - (cp_parser_init_declarator): Likewise. - (cp_parser_type_id): Likewise. - (cp_parser_function_definition): Likewise. - (cp_parser_member_declaration): Likewise. - (cp_parser_parameter_declaration): Use cp_parser_declarator to do - the tentative parsing. - (cp_parser_exception_declaration): Likewise. - -2003-01-05 Mark Mitchell - - * parser.c (cp_parser_template_parameter): Adjust call to - cp_parser_parameter_declaration. - (cp_parser_parameter_declaration_list): Likewise. - (cp_parser_parameter_declaration): Replace - greater_than_is_operator_p with template_parm_p parameter. Do not - cache tokens for template default arguments. - - * pt.c (retrieve_local_specialization): Use htab_find, not - htab_find_with_hash. - (register_local_specialization): Use htab_find_slot, not - htab_find_slot_with_hash. - (instantiate_decl): Pass a hash function to htab_create. - -2003-01-04 Kaveh R. Ghazi - - * parser.c (cp_parser_binary_expression, - cp_parser_multiplicative_expression, - cp_parser_additive_expression, cp_parser_shift_expression, - cp_parser_relational_expression, cp_parser_equality_expression, - cp_parser_and_expression, cp_parser_exclusive_or_expression, - cp_parser_inclusive_or_expression, - cp_parser_logical_and_expression, cp_parser_logical_or_expression, - cp_parser_binary_expression): Const-ify. - -2003-01-04 Mark Mitchell - - * method.c (use_thunk): Disable access control while building the - body of the thunk. - -2003-01-03 Nathanael Nerode - - * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C - front end. - -2003-01-03 Matt Austern - - * cp-tree.h (struct lang_type_class): add field for key method - (cp_global_trees): rename dynamic_classes to keyed_classes - (key_method): add definition - * class.c (finish_struct_1): compute class's key method, and add - the class to keyed_classes list if there is no key method. - * decl.c (finish_function): add class to keyed_classes list if we - see a definition of the class's key method. - * pt.c (instantiate_class_template): add template specialization - of a dynamic class to keyed_classes list. - * decl2.c (key_method): remove - (finish_file): iterate only through keyed_classes list when - deciding whether to emit vtables, remove class from its list after - we do the emission. - -2003-01-02 Jason Merrill - - * call.c (build_conditional_expr): Stabilize lvalues properly. - * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type. - * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues. - Don't allow CALL_EXPR or VA_ARG_EXPR, either. - - * call.c (convert_like_real): Call decl_constant_value for an - IDENTITY_CONV even if there are no more conversions. - - * cvt.c (build_up_reference): Don't push unnamed temps. - - * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL. - - * dump.c (cp_dump_tree): Don't try to dump class-specific fields - for a backend struct. - - * except.c (wrap_cleanups_r, build_throw): Make - MUST_NOT_THROW_EXPRs void. - * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR. - - * init.c (build_vec_delete_1): Pre-evaluate the base address. - - * init.c (get_temp_regvar): Simplify logic. - - * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if - our replacement is a decl. - - * decl.c (cp_make_fname_decl): Push the decls inside the - outermost scope. - -2003-01-03 Nathan Sidwell - - PR c++/45, c++/3784 - * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be - the same too. - -2003-01-03 Graham Stott - - * parser.c (struct cp_parser): Add access_checks_lists field - (cp_parser_simple_declaration): Use. - (cp_parser_init_declarator): Likewise. - -2003-01-02 Mark Mitchell - - * parser.c (cp_parser_declaration): Accept the __extension__ - keyword before the declaration. - - PR c++/2843 - * parser.c (cp_parser_parameter_declaration): Allow attributes to - appear after the declarator. - - * call.c (build_new_method_call): Fix typo in message format - string. - -2003-01-02 Mark Mitchell - - * parser.c (cp_lexer_next_token_is): Declare it inline. - (cp_lexer_set_source_position_from_token): Likewise. - (cp_lexer_debugging_p): Likewise. - (cp_parser_parsing_tentatively): Likewise. - (cp_parser_nested_name_specifier_opt): Reduce the number of calls - to the cp_lexer_peek_token. - - * parser.c (cp_parser_sizeof_operand): Do not evaluate the - expression. - -2003-01-02 Steven Bosscher - - * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c, - cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c, - cp/repo.c: Fix copyright years. - -2003-01-01 Neil Booth - - * lex.c: Remove superfluous include of cpplib.h. - (CONSTRAINT): Define without conditions. - (init_cp_pragma): Use c_register_pragma. - -2002-12-31 Neil Booth - - * .cvsignore: Remove. - -2002-12-31 Steven Bosscher - - * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c, - except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h, - lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c, - pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c, - typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the - copyright header. - * lex.h: parse.y is dead, so don't mention it. Also replace the - copyright header with the default GNU copyright header. - -2002-12-31 Mark Mitchell - - * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove. - (lookup_name_namespace_only): Likewise. - (begin_only_namespace_names): Likewise. - (end_only_namespace_names): Likewise. - * decl.c (only_namespace_names): Remove. - (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED. - (lookup_name_real): Do not check only_namespace_names. - (lookup_name_namespace_only): Remove. - (begin_only_namespace_names): Likewise. - (end_only_namespace_names): Likewise. - * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous - nested-name-specifiers more gracefully. - (cp_parser_class_or_namespace_name): Avoid looking up namespace - names when they cannot possibly appear. - (cp_parser_template_name): Adjust call to cp_parser_lookup_name. - (cp_parser_elaborated_type_specifier): Likewise. - (cp_parser_namespace_name): Only look for namespace names. - (cp_parser_lookup_name): Add is_namespace parameter. - (cp_parser_lookup_name_simple): Adjust call to - cp_parser_lookup_name. - - * parser.c (cp_parser_dependent_type_p): Fix thinko. - -2002-12-31 Neil Booth - - * .cvsignore: Update. - -2002-12-31 Nathan Sidwell - - * class.c (modify_vtable_entry): Remove unused variable. - (get_vcall_index): Always expect a non-thunk. - (update_vtable_entry_for_fn): Combine covariant adjustments, when - overriding a thunk. Pass get_vcall_index a non-thunk. - - * decl2.c (finish_file): Mark undefined inlines as extern. - -2002-12-31 Mark Mitchell - - * cp-tree.def (RETURN_INIT): Remove. - * cp-tree.h (DECL_IN_MEMORY_P): Remove. - (scope_kind): Add sk_block, sk_try, sk_catch, sk_for. - (note_level_for_for): Remove. - (note_level_for_try): Likewise. - (note_level_for_catch): Likewise. - (finish_named_return_value): Likewise. - (do_pushlevel): Change prototype. - (pending_lang_change): Remove. - * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch, - sk_for. - (note_level_for_for): Remove. - (note_level_for_try): Likewise. - (note_level_for_catch): Likewise. - (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P. - * parser.c (cp_parser_context_free_list): Make it "deletable". - (cp_parser_template_argument): Remove misleading comment. - * pt.c (tsubst_expr): Remove RETURN_INIT code. - * semantics.c (genrtl_named_return_value): Remove. - (do_pushlevel): Take a scope kind as an argument. - (begin_if_stmt): Adjust. - (begin_while_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_for_init_stmt): Likewise. - (begin_switch_stmt): Likewise. - (begin_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_named_return_value): Remove. - (cp_expand_stmt): Remove RETURN_INIT case. - * tree.c (cp_statement_code_p): Remove RETURN_INIT case. - -2002-12-31 Mark Mitchell - - PR c++/9112 - * parser.c (cp_parser_direct_declarator): Handle erroneous - parenthesized declarators correctly. - -2002-12-31 Gabriel Dos Reis - - * cp-tree.h (pending_lang_change): Declare. - -2002-12-30 Mark Mitchell - - * parser.c (cp_parser_context_free_list): New variable. - (cp_parser_context_new): Use it. - (cp_parser_error): Check return code from - cp_parser_simulate_error. - (cp_parser_simulate_error): Return a value. - (cp_parser_id_expression): Optimize common case. - (cp_parser_class_name): Likewise. - (cp_parser_class_specifier): Adjust call to - cp_parser_late_parsing_default_args. - (cp_parser_lookup_name): Optimize common case. - (cp_parser_late_parsing_for_member): Adjust call to - cp_parser_late_parsing_default_args. - (cp_parser_late_parsing_default_args): Add scope parameter. - (cp_parser_require): Avoid creating the error message unless it's - needed. - (cp_parser_parse_definitely): Place free'd contexts on the free - list. - - * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change. - -2002-12-30 David Edelsohn - - * parser.c (cp_parser_parameter_declaration_clause): Treat system - header as extern "C" if NO_IMPLICIT_EXTERN_C undefined. - -2002-12-30 Nathanael Nerode - - * config-lang.in, Make-lang.in, operators.def, cp-tree.def: - GCC, not GNU CC. - -2002-12-30 Mark Mitchell - - * parse.y: Remove. - * spew.c: Likewise. - * Make-lang.in (gt-cp-spew.h): Remove. - * cp-tree.h (do_pending_lang_change): Remove. - (do_identifier): Change prototype. - (finish_id_expr): Remove. - * decl.c (lookup_name_real): Remove yylex variable. - * decl2.c (build_expr_from_tree): Adjust call to do_identifier. - * lex.c (init_cpp_parse): Remove. - (reduce_cmp): Likewise. - (token_cmp): Likewise. - (yychar): Likewise. - (lastiddecl): Likewise. - (token_count): Likewise. - (reduce_count): Likewise. - (yyhook): Likewise. - (print_parse_statistics): Likewise. - (do_pending_lang_change): Likewise. - (do_identifier): Remove parsing parameter. - * lex.h (lastiddecl): Remove. - (looking_for_typename): Remove. - (looking_for_template): Likewise. - (pending_lang_change): Likewise. - (yylex): Likewise. - * semantics.c (finish_id_expr): Remove. - - * decl.c (grokdeclarator): Diagnost "extern thread" and "static - thread" correctly. - -2002-12-30 Nathanael Nerode - - * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front - end, not the C front end. - -2002-12-30 Nathan Sidwell - - * cp-tree.h (THUNK_TARGET): New macro. - (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo. - (finish_thunk): Remove offset parms. - * class.c (find_final_overrider): Look through thunks. - (get_vcall_index): Use THUNK_TARGET. - (update_vtable_entry_for_fn): Look through thunks. Set covariant - fixed offset here. Adjust finish_thunk call. - (build_vtbl_initializer): Adjust finish_thunk calls. - * mangle.c (mangle_call_offset): Remove superfluous if. - (mangle_thunk): Adjust. - * method.c (make_thunk): Adjust. - (finish_thunk): Adjust. - (thunk_adjust): Remove assert. - (use_thunk): Use THUNK_TARGET - * dump1.c (cp_dump_tree): Adjust thunk dumping. - - PR c++/9054 - * class.c (layout_class_type): Set TYPE_CONTEXT of type for base. - * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types. - -2002-12-28 Gabriel Dos Reis - - Remove traditional C constructs 4/n. - * decl2.c (grok_method_quals, warn_if_unknown_interface, - grok_x_components, cp_build_parm_decl, build_artificial_parm, - maybe_retrofit_in_chrg, grokclassfn, grok_array_decl, - delete_sanity, check_member_template, check_java_method, - check_classfn, finish_static_data_member_decl, grokfield, - grokbitfield, grokoptypename, grok_function_init, - cplus_decl_attributes, constructor_name, defer_fn, - build_anon_union_vars, finish_anon_union, coerce_new_type, - coerce_delete_type, comdat_linkage, maybe_make_one_only, - key_method, import_export_vtable, import_export_class, - output_vtable_inherit, import_export_decl, import_export_tinfo, - build_cleanup, get_guard, get_guard_bits, get_guard_cond, - set_guard, start_objects, finish_objects, - start_static_storage_duration_function, - finish_static_storage_duration_function, get_priority_info, - start_static_initialization_or_destruction, - finish_static_initialization_or_destruction, - do_static_initialization, do_static_destruction, - prune_vars_needing_no_initialization, write_out_vars, - reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor, - add_using_namespace, merge_functions, ambiguous_decl, - lookup_using_namespace, lookup_using_namespace, - qualified_lookup_using_namespace, set_decl_namespace, - decl_namespace, current_decl_namespace, push_decl_namespace, - pop_decl_namespace, push_scope, pop_scope, add_function, - arg_assoc_namespace, arg_assoc_template_arg, arg_assoc, - lookup_arg_dependent, do_namespace_alias, - validate_nonmember_using_decl, do_nonmember_using_decl, - do_toplevel_using_decl, do_local_using_decl, - do_class_using_decl, do_using_directive, check_default_args, - mark_used, handle_class_head): Use C90 prototypings. Use booleans. - * parser.c (cp_parser_class_head): Use booleanss. - * decl.c (walk_globals, walk_vtables): Likewise. - * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables, - walk_globals): Change return type from 'int' to 'bool'. - * rtti.c (init_rtti_processing, build_headof, throw_bad_cast - throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p, - build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr, - get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast, - qualifier_flags, tinfo_base_init, generic_initializer, - ptr_initializer, dfs_class_hint_mark, ptm_initializer, - dfs_class_hint_unmark, class_hint_flags, class_initializer, - typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info, - get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos, - unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise. - * repo.c (repo_compile_flags, repo_template_declared, - repo_template_defined, repo_class_defined, repo_get_id, - repo_template_used, repo_vtable_used, repo_inline_used, - repo_tinfo_used, repo_template_instantiated, extract_string, - open_repo_file, afgets, init_repo, reopen_repo_file_for_write, - finish_repo): Likewise. - * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier, - cxx_print_xnode): Likewise.. - * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set, - cxx_warn_unused_global_decl, cp_expr_size): Likewise. - * cxxfilt.c (demangle_it, print_demangler_list, usage, - standard_symbol_characters, hp_symbol_characters, main, fatal): - Likewise. - (strip_underscore): Change type from 'int' to 'bool'. - (main): Use boolean constants. - -2002-12-28 Gabriel Dos Reis - - Remove traditional C constructs 3/n. - * cvt.c (cp_convert_to_pointer, convert_to_pointer_force, - build_up_reference, warn_ref_binding, convert_to_reference, - convert_from_reference, convert_lvalue, cp_convert, ocp_convert, - convert_to_void, convert, convert_force, build_type_conversion, - build_expr_type_conversion, type_promotes_to, - perform_qualification_conversions): Use C90 prototyping style. - * decl2.c (grok_array_decl): Use boolean constant. - (delete_sanity): Likewise. - * typeck.c (build_unary_op): Likewise. - * semantics.c (finish_switch_cond): Likewise. - * parser.c (cp_parser_direct_new_declarator): Likewise. - * init.c (build_new): Likewise. - -2002-12-27 Mark Mitchell - - * Make-lang.in (po-generated): Remove parse.c. - (CXX_OBJS): Remove parse.o and spew.o. Add parser.o. - ($(srcdir)/cp/parse.h): Remove target. - ($(srcdir)/cp/parse.c): Likewise. - (gt-cp-parse.h): Likewise. - (gt-cp-parser.h): New target. - (c++.distclean): Do not remove parse.output. - (c++.maintainer-clean): Do not remove parse.c or parse.h. - (cp/spew.o): Remove target. - (cp/lex.o): Adjust dependencies. - (cp/pt.o): Likewise. - (cp/parse.o): Likewise. - (cp/TAGS): Do not mention parse.c. - (cp/parser.o): New target. - * NEWS: Mention the new parser. - * call.c (build_scoped_method_call): Simplify. - (build_method_call): Likewise. - (build_new_function_call): Adjust calls to add_function_candidate - and add_template_candidate. - (build_new_op): Improve handling of erroroneous operands. - (convert_default_arg): Remove circular argument processing. - (name_as_c_string): New function. - (build_new_method_call): Use it. - (perform_implicit_conversion): Use error_operand_p. - * class.c (finish_struct_anon): Use constructor_name_p. - (check_field_decls): Likewise. - (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN. - (resolve_address_of_overloaded_function): Likewise. - (instantiate_type): Tweak pointer-to-member handling. - (get_primary_binfo): Remove incorrect assertion. - * config-lang.in (gtfiles): Add parser.c, remove parse.c. - * cp-tree.h (DEFARG_TOKENS): New macro. - (default_arg): New structure. - (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG. - (lang_tree_node): Add default_arg. - (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE. - (type_info_ref_type): New macro. - (saved_scope): Make processing_explicit_instantiation a boolean. - (check_access): New field. - (unparsed_text): Remove. - (language_function): Remove unparsed_inlines. - (error_operand_p): New macro. - (lang_decl): Adjust pending_inline_info. - (DEFARG_POINTER): Remove. - (tag_types): Add typenames. - (lookup_ualified_name): Declare. - (lookup_name_real): Likewise. - (shadow_tag): Adjust prototype. - (get_scope_of_declarator): Declare it. - (process_next_inline): Remove it. - (check_for_missing_semicolon): Likewise. - (maybe_get_template_decl_from_type_decl): Declare it. - (finish_label_stmt): Adjust prototype. - (finish_non_static_data_meber): Declare it. - (finish_pseudo_destructor_call_expr): Rename to ... - (finish_pseudo_destructor_expr): ... this. - (finish_compound_literal): Declare it. - (begin_inline_definitions): Remove it. - (init_spew): Remove. - (peekyylex): Likewise. - (arbitrate_lookup): Likewise. - (frob_opname): Likewise. - (maybe_snarf_defarg): Likewise. - (add_defarg_fn): Likewise. - (do_pending_defargs): Likewise. - (done_pending_defargs): Likewise. - (unprocessed_defarg_fn): Likewise. - (replace_defarg): Likewise. - (end_input): Likewise. - (get_overloaded_fn): Likewise. - * cvt.c (convert_to_reference): Improve error handling. - * decl.c (lookup_name_real): Do not declare it static. - (maybe_push_to_top_level): Set check_access. - (identifier_type_value): Adjust call to lookup_name_real. - (lookup_qualified_name): New method. - (lookup_name_real): Remove special-case parsing code. - (lookup_name-nonclass): Adjust call to lookup_name_real. - (lookup_name_namespace_only): Likewise. - (lookup_name): Likewise. - (check_tag_decl): Return the type declared. - (shadow_tag): Likewise. - (register_dtor_fn): Tweak check_access. - (grokfndecl): Use constructor_name_p. - (get_scope_of_declarator): New function. - (grokdeclarator): Obscure tweaks for slightly different declarator - representations. - (start_method): Return error_mark_node to indicate failure. - (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs. - * decl2.c (constructor_name_full): Simplify. - (constructor_name): Use it. - (build_expr_from_tree): Adjust for changes to do new parser. - (push_scope): Improve robustness. - (validate_nonmember_using_decl): Process declarations, not names. - (do_class_using_decl): Likewise. - (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS - here. - * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs. - * expr.c (cxx_expand_expr): Handle BASELINKs. - * init.c (member_init_ok_or_else): Issue more errors. - (build_offset_ref): Tweak handling of FUNCTION_DECLs. - * lex.c: Do not include parse.h. - (yypring): Do not declare. - (yylval): Likewise. - (make_reference_declarator): Remove error-generating code. - (rid_to_yy): Remove. - (cxx_init): Do not call init_spew. - (yypring): Remove. - (check_for_missing_semicolon): Remove. - * lex.h (got_scope): Remove. - (got_object): Remove. - * method.c (hack_identifier): Use finish_non_static_data_member. - (implicitly_declare_fn): Adjust use of constructor_name. - * parser.c: New file. - * pt.c (parse.h): Do not include it. - (maybe_get_template_decl_from_template): Do not declare it. - (finish_member_template_decl): Tweak. - (begin_explicit_instantiation): Adjust for - processing_explicit_instantiation being boolean. - (end_explicit_instantiation): Likewise. - (maybe_process_partial_specialization): Tighten specialization - test. - (retrieve_local_specialization): Adjust ue of hash table. - (eq_local_specializations): New function. - (register_local_specialization): Likewise. - (push_template_decl_real): Remove unnecessary test. - (maybe_get_template_decl_from_type_decl): Don't make it static. - (for_each_template_parm_r): Handle TYPEOF_TYPE. - (tsubst_copy): Use retrieive_local_specialization to handle - PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs. - Handle COMPONENT_REFs with pseudo-destructor-expressions. - Simplify handling of CALL_EXPR and METHOD_CALL_EXPR. - (tsubst_expr): Pass decls, not names, to do_local_using_decl. - (unify): Tweak handling of CONST_DECLs. - (regenerate_decl_from_template): Use push_nested_class. - (template_for_substitution): New funciton. - (instantiate_decl): Use it. Register parameters as local - specializations. - * rtti.c (init_rtti_processing): Set type_info_ref_type. - (build_typeid): Use it. - (get_typeid): Likeise. - * search.c (accessible_p): Use check_access, not - flag_access_control. - (adjust_result_of_qualified_name_lookup): Pay attention to the - context_class. - * semantics.c (finish_asm_stmt): Adjust error handling. - (finish_label_stmt): Return the statement. - (finish_non_static_data_member): New function. - (finish_class_expr): Handle BASELINKs. - (finish_call_expr): Handle PSEUDO_DTOR_EXPR. - (finish_object_call_expr): Simplify handling during templates. - (finish_pseudo_destructor_call_expr): Rename to ... - (finish_pseudo_dtor_expr): ... this. - (finish_compound_literal): New function. - (begin_inline_definitions): Remove. - (finish_sizeof): Remove special template handling. - * spew.c: Do not include parse.h. - * tree.c (get_overloaded_fn): Remove. - * typeck.c (build_class_member_access_expr): Handle - PSEUDO_DTOR_EXPR. Adjust handling of static member functions. - (lookup_destructor): New function. - (finish_class_member_access_expr): Use it. - (convert_arguments): Simplify. - (build_unary_op): Handle BASELINKs. - -2002-12-26 Nathan Sidwell - - PR c++/4803 - * decl2.c (mark_used): Defer inline functions. - (finish_file): Merge deferred_fns loops. Check all used - inline functions have a definition. - * method.c (make_thunk): Thunks are not inline. - - PR c++/5116, c++/764 - * call.c (build_new_op): Make sure template class operands are - instantiated. - -2002-12-24 Nathan Sidwell - - PR C++/7964 - * cp-tree.h (resolve_scoped_fn_name): Prototype. - * call.c (resolve_scoped_fn_name): New function. Deal with - more template expansion. Broken out of ... - * parse.y (parse_finish_call_expr): ... here. Call it. - * decl2.c (build_expr_from_tree, CALL_EXPR): Use - resolve_scoped_fn_name and build_call_from_tree. - - PR c++/9053 - * decl.c (duplicate_decls): Templates may be disambiguated by - return type. - - PR c++/8702 - * decl2.c (check_classfn): Use lookup_fnfield_1. List all - conversion operators on failure. - -2002-12-23 Gabriel Dos Reis - - Remove traditional C constructs 2/n. - * call.c (tourney, build_field_call, equal_functions, joust, - compare_ics, build_over_call, build_java_interface_fn_ref, - convert_like_real, op_error, build_object_call, resolve_args, - build_vfield_ref, check_dtor_name, build_scoped_method_call, - build_addr_func, build_call, build_method_call, null_ptr_cst_p, - sufficient_parms_p, build_conv, non_reference, strip_top_quals, - standard_conversion, reference_related_p, - reference_compatible_p, convert_class_to_reference, - direct_reference_binding, reference_binding, - ,implicit_conversion, is_complete, promoted_arithmetic_type_p, - add_template_conv_candidate, any_viable, any_strictly_viable, - build_this, splice_viable, print_z_candidates, - build_user_type_conversion, build_new_function_call, - conditional_conversion, build_conditional_expr, build_new_op, - build_op_delete_call, enforce_access, call_builtin_trap, - convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to, - convert_default_arg, type_passed_as, convert_for_arg_passing, - in_charge_arg_for_name, is_properly_derived_from, - maybe_handle_implicit_object, maybe_handle_ref_bind, - source_type, add_warning, can_convert, can_convert_arg, - perform_implicit_conversion, can_convert_arg_bad, - initialize_reference, add_conv_candidate, - add_template_candidate_real, add_template_candidate): Ansify. - -2002-12-22 Nathan Sidwell - - PR c++/8572 - * cp-tree.h (grokoptypename): Add SCOPE parameter. - * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type - if in a template scope. - * parse.y (unoperator): Return the scope. - (operator_name): Adjust grokoptypename call. - -2002-12-22 Kriang Lerdsuwanakij - - * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t. - * decl.c (make_unbound_class_template): Adjust. Check for tf_error. - * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error. - -2002-12-20 Kazu Hirata - - * ChangeLog: Fix a typo. - * class.c: Fix comment typos. - * cp-tree.h: Likewise. - -2002-12-18 Jason Merrill - - Handle anonymous unions at the tree level. - C++ ABI change: Mangle anonymous unions using the name of their - first named field (by depth-first search). Should not cause - binary compatibility problems, though, as the compiler previously - didn't emit anything for affected unions. - * cp-tree.def (ALIAS_DECL): New tree code. - * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the - first field, not the largest. - (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME, - push the decl, and write it out at namespace scope. - * decl.c (lookup_name_real): See through an ALIAS_DECL. - (pushdecl): Add namespace bindings for ALIAS_DECLs. - * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name - of a decl which doesn't have one. - * typeck.c (build_class_member_access_expr): Don't recurse if - we already have the type we want. - -2002-12-18 Kriang Lerdsuwanakij - - PR c++/8099 - * friend.c (make_friend_class): Allow partial specialization - when declaration is not a template friend. - -2002-12-18 Kriang Lerdsuwanakij - - PR c++/3663 - * pt.c (lookup_template_class): Copy TREE_PRIVATE and - TREE_PROTECTED to created decl nodes. - -2002-12-18 Mark Mitchell - - * class.c (build_base_field): Do not set DECL_PACKED on the - FIELD_DECL. - -2002-12-18 Gabriel Dos Reis - - * cp-tree.h (struct tree_srcloc): Use location_t. - (SOURCE_LOCUS): New. - (SRCLOC_FILE, SRCLOC_LINE): Adjust. - -2002-12-17 Jason Merrill - - * decl.c (finish_function): Also complain about no return in - templates. - * semantics.c (finish_return_stmt): Also call check_return_expr in - templates. - * typeck.c (check_return_expr): In a template, just remember that we - saw a return. - -2002-12-16 Jason Merrill - - * semantics.c (simplify_aggr_init_exprs_r): Don't change the type - of the CALL_EXPR. - - * semantics.c (do_pushlevel): Call pushlevel after adding the - SCOPE_STMT. - (do_poplevel): Call poplevel before adding the SCOPE_STMT. - * parse.y (function_body): Go back to using compstmt. - * decl.c (pushdecl): Skip another level to get to the parms level. - - * call.c (build_new_method_call): Use is_dummy_object to determine - whether or not to evaluate the object parameter to a static member - function. - -2002-12-14 Jason Merrill - - * semantics.c (simplify_aggr_init_exprs_r): Also prepend the - return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR. - * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE, - don't bother with an AGGR_INIT_EXPR. - (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE, - just generate a new decl normally. Take return slot parm. - * cp-tree.h: Adjust prototype. - -2002-12-13 Gabriel Dos Reis - - PR C++/8031 - * cvt.c (convert_to_pointer_force): Don't try comparing against - erronous type. - -2002-12-13 Geoffrey Keating - - * cp-tree.h: Have the multiple-include guards around - the entire file. - -2002-12-10 David Edelsohn - - * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos - for SPEW_DEBUG. - (snarf_method): Same. - (snarf_defarg): Same. - -2002-12-10 Mark Mitchell - - PR c++/8372 - * pt.c (tsubst_copy): Handle destructor names more correctly. - -2002-12-10 Matt Austern - - * cp-tree.h: get rid of needs_virtual_reinit bit. - -2002-12-09 Mark Mitchell - - * NEWS: Document removal of in-class initialization extension for - static data members of non-arithmetic, non-enumeration type. - * decl.c (check_static_variable_definition): Do not allow that - extension. - * decl2.c (grokfield): Do not call digest_init when processing - templates. - -2002-12-05 Kaveh R. Ghazi - - * error.c (dump_expr): Fix format specifier warning. - -2002-12-04 Geoffrey Keating - - * class.c (finish_struct_1): Correct comment. - * cp-tree.c (DECL_SORTED_FIELDS): Likewise. - -2002-12-04 Gabriel Dos Reis - - PR C++/8799 - * error.c (dump_expr): Don't ever try to dump a non-existent - expression. - -2002-12-03 Nathan Sidwell - - Implement covariant returns. - * cp-tree.h (IS_AGGR_TYPE_2): Remove. - (struct lang_decl_flags): Add this_thunk_p flag. - Rename vcall_offset to virtual_offset. - (struct lang_decl): Rename delta to fixed_offset. - (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines. - (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg. - (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ... - (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here. - (make_thunk): Add this_adjusting arg. - (finish_thunk): Declare. - (mangle_thunk): Add this_adjusting arg. - * class.c (get_vcall_index): Use base function for lookup. - (update_vtable_entry_for_fn): Generate covariant thunk. - (finish_struct_1): Set DECL_VINDEX to NULL for thunks. - (build_vtbl_initializer): Use base function for lookup. - Finish covariant thunk here. Adjust thunk generation. - * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling. - Adjust thunk dumping. - * mangle.c (mangle_call_offset): New function. - (mangle_thunk): Adjust for covariant thunks. - * method.c (make_thunk): Adjust. Do not set name here. - (finish_thunk): New function. Set name here. - (use_thunk): Generate covariant thunks too. - (thunk_adjust): New function. - * search.c (covariant_return_p): Remove. Fold into ... - (check_final_overrider): ... here. Simplify. - * semantics.c (emit_associated_thunks): Walk covariant thunk lists. - -2002-12-03 Jason Merrill - - PR c++/8674 - * call.c (build_over_call): Check specifically for TARGET_EXPR - when eliding. - - PR c++/8461, c++/8625 - * call.c (convert_for_arg_passing): Don't mess with error_mark_node. - (cp_convert_parm_for_inlining): Remove. - * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): - Remove. - * cp-tree.h (ADDR_IS_INVISIREF): Remove. - * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code. - - * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on - an ambiguous conversion. - -2002-12-03 Mark Mitchell - - PR c++/8688 - * decl.c (reshape_init): Handle erroneous initializers. - -2002-12-02 Mark Mitchell - - PR c++/8720 - * spew.c (remove_last_token): Make sure that last_chunk is set - correctly. - - PR c++/8615 - * error.c (dump_expr): Handle character constants with - TREE_OVERFLOW set. - -2002-12-02 Kriang Lerdsuwanakij - - DR 180 - * decl.c (grokdeclarator): Require class-key for all friend class. - Output the correct type and context in the error message. - -2002-12-01 Mark Mitchell - - PR c++/5919 - * pt.c (unify): Use variably_modified_type_p to test validity of - template argument types. - - PR c++/8727 - * cp-tree.h (lang_type_class): Add typeinfo_var. - (CLASSTYPE_TYPEINFO_VAR): New macro. - * rtti.c (get_tinfo_decl): Use it. - - PR c++/8663 - * init.c (expand_member_init): Always get the main variant of a - base class. - -2002-12-01 Mark Mitchell - - PR c++/8332 - PR c++/8493 - * decl.c (cxx_init_decl_processing): Use size_type_node, not - c_size_type_node. - * decl2.c (coerce_new_type): Likewise. - * except.c (do_allocate_exception): Likewise. - -2002-11-30 Zack Weinberg - - * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c, - dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c, - lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c, - repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, - typeck2.c: Include coretypes.h and tm.h. - * Make-lang.in: Update dependencies. - -2002-11-30 Mark Mitchell - - PR c++/8227 - * decl.c (layout_var_decl): Deal gracefully with erroneous types. - (check_initializer): Validate the type of the initialized - variable, even if the initializer is absent. - * typeck.c (cp_type_quals): Deal gracefully with erroneous types. - - PR c++/8214 - * typeck.c (convert_for_assignment): Do not use - decl_constant_value on the operand. - - PR c++/8511 - * pt.c (instantiate_decl): Handle template friends defined outside - of the class correctly. - -2002-11-29 Joe Buck - - * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for - anonymous structs. - -2002-11-29 Mark Mitchell - - * class.c (walk_subobject_offsets): Recur on binfos as well as on - types. - (layout_nonempty_base_or_field): Pass it a binfo when processing a - base class. - (layout_empty_base): Likewise. - (build_base_field): Likewise. - -2002-11-27 Mark Mitchell - - * class.c (build_base_field): Make sure we get the canonical base - when descending through primary bases. - -2002-11-26 Geoffrey Keating - - * decl.c (check_initializer): Don't error on initialisation of - a scalar with a brace-enclosed expression. - -2002-11-26 Nathan Sidwell - - * cp-tree.h (DECL_LANG_FLAG_4): Document more uses. - (template_parms_equal): Remove prototype. - * typeck.c (buuld_indirect_ref): Reformat. - -2002-11-25 Jason Merrill - - * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT - and a DO_STMT. - -2002-11-25 Mark Mitchell - - * tree.c (cp_build_qualified_type_real): Correct handling of - array types. - * class.c (walk_subobject_offsets): Fix thinko. - (build_base_field): Record offsets of empty bases in primary - virtual bases. - (layout_class_type): Record offsets of empty bases in fields. - - * search.c (is_subobject_of_p_1): Fix thinko. - (lookup_field_queue_p): Likewise. - -2002-11-24 Mark Mitchell - - * class.c (layout_class_type): Reuse tail padding when laying out - virtual bases. - -2002-11-22 Mark Mitchell - - * rtti.c (qualifier_flags): Fix thinko. - -2002-11-21 Gabriel Dos Reis - - Remove traditional C constructs 1/n. - * cp-tree.h (init_method, set_mangled_name_for_decl, - build_opfncall, hack_identifier, make_thunk, use_thunk, - synthesize_method, implicitly_declare_fn, - skip_artificial_parms_for, optimize_function, calls_setjmp_p, - maybe_clone_body): Remove use of PARAMS. - - * method.c (do_build_assign_ref, do_build_copy_constructor, - synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy): - Likewise. - (synthesize_method): Use 'bool' type and constants instead of - 'int'. - (locate_copy): Likewise. - (implicitly_declare_fn): Likewise. - - * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function): - Remove old-style declaration. - (maybe_clone_body): Use 'bool' type and constants. - -2002-11-21 Glen Nakamura - - PR c++/8342 - * typeck.c (get_member_function_from_ptrfunc): Make sure that a - SAVE_EXPR for instance_ptr doesn't get evaluated first inside one - of the branches of a COND_EXPR. - -2002-11-19 Mark Mitchell - - * pt.c (for_each_template_parm): Free allocated memory. - * search.c (is_subobject_of_p_1): New function. - (is_subobject_of_p): Avoid walking virtual bases multiple times. - -2002-11-19 Jason Thorpe - - * g++spec.c (lang_specific_spec_functions): New. - -2002-11-15 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * class.c: Likewise. - * decl2.c: Likewise. - -2002-11-14 Zack Weinberg - - * search.c (dfs_push_decls): Do not try to reorder elements - 3..n of method_vec if method_vec has only two elements. - Reverse order of two tests to avoid accessing unallocated - memory. - -2002-11-14 Mark Mitchell - - * class.c (dfs_find_final_overrider): Adjust so that the most - derived object is a binfo, rather than a class type. - (find_final_overrider): Likewise. - (add_vcall_offset_vtbl_entries_1): Simplify accordingly. - (add_vcall_offset): Likewise. - -2002-11-09 Kriang Lerdsuwanakij - - PR c++/8389 - * pt.c (instantiate_template): Push class scope for member - functions. - (get_mostly_instantiated_function_type): Likewise. Don't call - tsubst on context. Remove CONTEXTP and TPARMSP parameters. - * cp-tree.h (get_mostly_instantiated_function_type): Adjust. - * mangle.c (write_encoding, write_unqualified_name): Adjust. - -2002-11-07 Mark Mitchell - - * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of - vcall offfsets. Split out ... - (add_vcall_offset): ... new function. - - PR c++/8338 - * pt.c (for_each_template_parm): Add htab parameter. - (process_partial_specialization): Adjust call. - (push_template_decl_real): Likewise. - (pair_fn_data): Add visited. - (for_each_template_parm_r): Avoid walking duplicates more than - once. - (uses_template_parms): Adjust call to for_each_template_parm. - -2002-11-07 Mark Mitchell - - * class.c (add_implicitly_declared_members): Put implicitly - declared functions at the end of TYPE_METHODs when -fabi-version - is at least 2. - -2002-11-05 Geoffrey Keating - - * decl2.c (finish_file): Correct spelling. - -2002-11-03 Mark Mitchell - - * call.c (build_special_member_call): Do not try to lookup VTTs by - name. - * class.c (vtbl_init_data): Add generate_vcall_entries. - (get_vtable_decl): Do not look up virtual tables by name. - (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P. - (set_primary_base): Do not set CLASSTYPE_RTTI. - (determine_primary_base): Likewise. - (get_matching_virtual): Remove. - (get_vcall_index): New function. - (update_vtable_entry_for_fn): Do not try to use virtual thunks - when they are not required. Assign vcall indices at this point. - (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT. - Do update dynamic_classes. - (build_vtt): Do not add VTTs to the symbol table. - (build_ctor_vtbl_group): Likewise. - (build_vtbl_initializer): Simplify handling of vcall indices. - (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets - for the most derived class. - (add_vcall_offset_vtbl_entries_1): But do not actually add them to - the vtable. - * cp-tree.h (dynamic_classes): New macro. - (lang_type_class): Remove rtti. Add vtables. Add vcall_indices. - (CLASSTYPE_RTTI): Remove. - (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove. - (CLASSTYPE_VCALL_INDICES): New macro. - (CLASSTYPE_VTABLES): Likewise. - (BV_USE_VCALL_INDEX_P): Remove. - (build_vtable_path): Remove. - * decl2.c (finish_vtable_vardecl): Remove. - (key_method): Remove #if 0'd code. - (finish_vtable_vardecl): Rename to ... - (maybe_emit_vtables): ... this. - (finish_file): Use it. - * search.c (look_for_overrides_here): Update comment. - -2002-11-01 Zack Weinberg - - PR c/7353 redux - * decl2.c (grokfield): Reject TYPE_DECLs with initializers. - -2002-10-30 Jason Merrill - - PR c++/8186 - * cp-tree.h (ADDR_IS_INVISIREF): New macro. - * call.c (convert_for_arg_passing): Set it. - * except.c (stabilize_throw_expr): Recurse for such an arg. - -2002-10-31 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove init_priority. - (lang_decl): Add delta. - (GLOBAL_INIT_PRIORITY): Remove. - (THUNK_DELTA): Revise definition. - * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY. - * dump.c (cp_dump_tree): Don't dump it. - -2002-10-30 Mark Mitchell - - PR c++/8160 - * typeck2.c (process_init_constructor): Call complete_array_type. - - PR c++/8149 - * decl.c (make_typename_type): Issue errors about invalid results. - -2002-10-30 Kriang Lerdsuwanakij - - Core issue 287, PR c++/7639 - * cp-tree.h (lang_type_class): Add decl_list field. - (CLASSTYPE_DECL_LIST): New macro. - (maybe_add_class_template_decl_list): Add declaration. - * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST. - (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST. - (maybe_add_class_template_decl_list): New function. - (add_implicitly_declared_members): Use it. - * decl.c (maybe_process_template_type_declaration): Likewise. - (pushtag): Likewise. - * friend.c (add_friend): Likewise. - (make_friend_class): Likewise. - * semantics.c (finish_member_declaration): Likewise. - (begin_class_definition): Initialize CLASSTYPE_DECL_LIST. - * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST - to process members and friends in the order of declaration. - -2002-10-29 Mark Mitchell - - PR c++/8287 - * decl.c (finish_destructor_body): Create the label to jump to - when returning from a destructor here. - (finish_function_body): Rather than here. - -2002-10-25 Zack Weinberg - - PR c++/7266 - * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a - SCOPE_REF is not null before dereferencing it. - -2002-10-25 Mark Mitchell - - * call.c (build_over_call): Use DECL_CONTEXT, not - DECL_VIRTUAL_CONTEXT. - * class.c (modify_vtable_entry): Don't mess with - DECL_VIRTUAL_CONTEXT. - (set_vindex): Remove. - (set_primary_base): Remove vfuns_p parameter. - (determine_primary_base): Likewise. - (modify_all_vtables): Likewise. - (layout_class_type): Likewise. Adjust calls to other functions - accordingly. - (finish_struct_1): Adjust calls to modified functions. Set - DECL_VINDEX here. - * cp-tree.h (lang_type_class): Remove vsize. - (CLASSTYPE_VSIZE): Remove. - (lang_decl): Remove thunks. - (DECL_THUNKS): Adjust. - (DECL_VIRTUAL_CONTEXT): Remove. - (duplicate_decls): Don't copy it. - * pt.c (build_template_decl): Don't set it. - (tsubst_decl): Likewise. - * typeck.c (expand_ptrmemfunc_cst): Don't use it. - - * class.c (build_vtbl_initializer): Don't use build_vtable_entry. - (build_vtable_entry): Remove. - * cp-tree.h (BINFO_VIRTUALS): Expand documentation. - (lang_decl): Add thunks. - (DECL_THUNKS): New macro. - * decl.c (duplicate_decls): Copy it. - * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS. - * semantics.c (emit_associated_thunks): Simplify. - -2002-10-24 David Edelsohn - - PR c++/7228 - * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that - lang_type structure exists before accessing field. - (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro. - (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar. - (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro. - * class.c (check_field_decls): Use new macros. - * typeck2.c (process_init_constructor): Remove redundant check for - existence of lang_type structure. - -2002-10-24 Mark Mitchell - - * class.c (end_of_base): New method. - (end_of_class): Use it. Check indirect virtual bases. - - * class.c (check_field_decls): Fix typo. - -2002-10-23 Mark Mitchell - - PR c++/8067 - * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and - related variables. - - PR c++/7679 - * spew.c (next_token): Do not return an endless stream of - END_OF_SAVED_INPUT tokens. - (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of - the cached token stream. - (snarf_defarg): Likewise. - -2002-10-23 Zack Weinberg - - * cp-lang.c (cp_var_mod_type_p): New: C++ hook for - variably_modified_type_p. - * cp-tree.h: Remove prototype of variably_modified_type_p. - * tree.c (variably_modified_type_p): Remove; now implemented - in language-independent code. - -2002-10-22 Mark Mitchell - - PR c++/6579 - * spew.c (snarf_parenthesized_expression): New function. - (snarf_block): Use it. - -2002-10-22 Richard Henderson - - * method.c (use_thunk): Always compute vcall_value; assert that - it is not zero. Use can_output_mi_thunk; use output_mi_thunk - for vcall thunks as well. - -2002-10-21 Mark Mitchell - - * class.c (empty_base_at_nonzero_offset_p): New function. - (layout_nonempty_base_or_field): Do not check for conflicts when - laying out a virtual base using the GCC 3.2 ABI. - (build_base_field): Correct checking for presence of empty classes - at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. - - * class.c (include_empty_classes): Use normalize_rli. - (layout_class_type): Likewise. - - * decl.c (reshape_init): Tweak handling of character arrays. - - PR c++/8218 - * cp-tree.h (lang_type_class): Add contains_empty_class_p. - (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. - * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. - (check_field_decls): Likewise. - (layout_class_type): Likewise. - (finish_struct_1): Initialize it. - (walk_subobject_offsets): Use it to prune searches. - -2002-10-20 Mark Mitchell - - * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT. - * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with - TARGET_ASM_OUTPUT_MI_THUNK in comments. - -2002-10-18 Zack Weinberg - - * decl.c (start_decl): Point users of the old initialized- - typedef extension at __typeof__. - -2002-10-18 Mark Mitchell - - * Make-lang.in (method.o): Depend on TARGET_H. - * method.c (target.h): Include it. - (use_thunk): Use target hooks. Use vcall thunks, if available. - -2002-10-18 Mark Mitchell - - * class.c (base_derived_from): Make sure return value is a bool. - -2002-10-18 Mark Mitchell - - * class.c (find_final_overrider_data_s): Remove overriding_fn and - overriding_base. - (dfs_base_derived_from): New function. - (base_derived_from): Likewise. - (dfs_find_final_overrider): Use base_derived_from. - (find_final_overrider): Adjust. - -2002-10-18 Jason Merrill - - PR c++/8080 - * semantics.c (finish_for_cond, finish_while_cond): Don't mess - with condition decls in a template. - -2002-10-17 Nathan Sidwell - - * class.c (add_method): Compare template parms too. - -2002-10-17 Mark Mitchell - - PR c++/7584 - * class.c (handle_using_decl): Allow the declaration used to be - from an ambiguous base. - - * pt.c (convert_template_argument): Revert this change: - 2002-10-16 Mark Mitchell - * pt.c (convert_template_argument): Do not fold non-type - template rguments when inside a template. - - * init.c (expand_default_init): Handle brace-enclosed initializers - correctly. - -2002-10-16 Mark Mitchell - - * mangle.c (write_expression): Correct handling of enumeration - constants. - (write_template_arg): Likewise. - * pt.c (convert_template_argument): Do not fold non-type template - arguments when inside a template. - - PR c++/7478 - * cvt.c (convert_to_reference): Allow references as the incoming - type. - -2002-10-16 Mark Mitchell - - PR c++/7524 - * method.c (do_build_assign_ref): Use cp_build_qualified_type, not - build_qualified_type. - -2002-10-15 Richard Henderson - - * error.c (dump_expr): Use real_to_decimal directly, and with - the new arguments. - -2002-10-15 Mark Mitchell - - * decl.c (reshape_init): Fix typo. - - * cp-tree.h (operator_name_info_t): Add arity. - * lex.c (init_operators): Initialize it. - * mangle.c (write_conversion_operator_name): New function. - (write_unqualified_name): Use it. - (write_template_args): Accept template arguments as a TREE_LIST. - (write_expression): Adjust handling of qualified names to match - specification. - -2002-10-15 Jason Merrill - - * call.c (call_builtin_trap): New fn. - (convert_arg_to_ellipsis): Use it. Downgrade error to warning. - (build_call): Don't set current_function_returns_abnormally outside - a function. - -2002-10-14 Mark Mitchell - - * class.c (check_field_decls): Remove empty_p parameter. Instead, - clear CLASSTYPE_EMPTY_P. - (build_base_field): Likewise. - (build_base_fields): Likewise. - (check_bases_and_members): Likewise. - (create_vtbl_ptr): Likewise. - (layout_class_type): Likewise. Ensure that empty classes have - size zero when used as base classes in the 3.2 ABI. - (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and - CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p - parameter. - (is_empty_class): Correct definition when using post-3.2 ABI. - * cp-tree.h (lang_type_class): Add empty_p. - (CLASSTYPE_EMPTY_P): New macro. - -2002-10-12 Nathan Sidwell - - * init.c (build_delete): Do not apply save_expr for arrays. - (build_vec_delete): Likewise. - -2002-10-14 Mark Mitchell - - * decl.c (layout_var_decl): Call layout_decl even for variables - whose type is an array with unspecified bounds. - - PR c++/7176 - * lex.c (do_identifier): Add another option for the parsing - parameter. - * parse.y (do_id): Use it. - -2002-10-11 Gabriel Dos Reis - - PRs C++/6803, C++/7721 and C++/7803 - * decl.c (grokdeclarator): Gracefully handle template-name as - decl-specifier. - -2002-10-11 Jason Molenda - - * init.c (build_field_list): Provide uses_unions_p with a default - value. - -2002-10-11 Mark Mitchell - - PR c++/5661 - * cp-tree.h (variably_modified_type_p): New function. - (grokdeclarator) Tighten check for variably modified types as - fields. - * pt.c (convert_template_argument): Do not allow variably modified - types as template arguments. - * tree.c (variably_modified_type_p): New function. - - * NEWS: Document removal of "new X = ..." extension. - * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on - brace-enclosed initializers. - * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro. - (initialize_local_var): Remove declaration. - (expand_static_init): Likewise. - * decl.c (next_initializable_field): New function. - (reshape_init): Likewise. - (check_initializer): Use them. Build dynamic initializer for - aggregates here too. - (initialize_local_var): Simplify, and incorporate cleanup - insertion code as well. - (destroy_local_var): Remove. - (cp_finish_decl): Tidy. - (expand_static_init): Fold checks for whether or not a variable - needs initialization into this function. Simplify. - * decl2.c (do_static_initialization): Simplify. - * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will - be done for us automatically. - (expand_default_init): Handle brace-enclosed initializers - correctly. - (expand_aggr_init_1): Remove RTL-generation code. - (build_vec_init): Remove "new X = ..." support. - * parse.y (new_initializer): Likewise. - * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on - brace-enclosed initializer. - (create_pseudo_type_info): Likewise. - * typeck2.c (store_init_value): Don't try to handle digest_init - being called more than once. - (digest_init): Tidy handling of brace-enclosed initializers. - -2002-10-10 Kaveh R. Ghazi - - * decl.c (typename_hash): Use htab_hash_pointer. - -2002-10-10 Jim Wilson - - * decl.c (duplicate_decls): Don't call decl_attributes. - -2002-10-09 Zack Weinberg - - PR c/7353 - * decl.c (start_decl): Unconditionally issue error for - 'typedef foo = bar'. - (cp_finish_decl): Remove special case for TYPE_DECL with initializer. - (grokdeclarator): Remove redundant error for 'typedef foo = bar'. - -2002-10-09 Kaveh R. Ghazi - - * decl2.c (prune_vtable_vardecl): Delete unused function. - -2002-10-03 Mark Mitchell - - PR c++/7754 - * decl2.c (finish_anon_union): Do not expand anonymous unions when - procesing template functions. - * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable - type. Call layout_decl. - (tsubst_expr, case DECL_STMT): Handle anonymous unions. - -2002-10-07 Richard Henderson - - * decl2.c, pt.c: Revert c++/7754 fix. - -2002-10-05 Kriang Lerdsuwanakij - - PR c++/7804 - * error.c (dump_expr) [REAL_CST]: Output in decimal format. - -2002-10-03 Mark Mitchell - - PR c++/7931 - * pt.c (for_each_template_parm_r): Handle BASELINKs. - - PR c++/7754 - * decl2.c (finish_anon_union): Do not expand anonymous unions when - procesing template functions. - * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable - type. Call layout_decl. - (tsubst_expr, case DECL_STMT): Handle anonymous unions. - -2002-10-03 Mark Mitchell - - PR c++/8006 - * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template - template parameters. - (globals): Add entity and need_abi_warning. - (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not - CLASSTYPE_TEMPLATE_INFO. - (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not - TYPE_TI_TEMPLATE. - (write_prefix): Handle typename types correctly. - (write_template_prefix): Handle template template parameters - correctly. - (start_mangling): Add entity parameter. - (finish_mangling): Warn about names whose mangling will change. - (mangle_decl_string): Adjust. - (mangle_type_string): Likewise. - (mangle_special_for_type): Likewise. - (mangle_ctor_vtbl_for_type): Likewise. - (mangle_thunk): Likewise. - (mangle_guard_variable): Likewise. - (mangle_ref_init_variable): Likewise. - -2002-10-02 Mark Mitchell - - PR c++/7188. - * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two. - * cp-tree.h (emit_base_init): Rename to .... - (emit_mem_initializers): ... this. - (expand_member_init): Change prototype. - * init.c (perform_member_init): Compute explicit, rather than - requiring it as a parameter. - (sort_member_init): Rename to ... - (sort_mem_initializers): ... this. Process bases and data members - together. - (sort_base_init): Remove. - (emit_base_init): Rename to ... - (emit_mem_initializers): ... this. - (expand_aggr_vbase_init_1): Remove. - (construct_virtual_bases): Rename to ... - (construct_virtual_base): ... this. - (expand_member_init): Rework handling of base initializers. - * method.c (do_build_copy_constructor): Use - finish_mem_initializers. - * parse.y (member_init): Adjust calls to expand_member_init. - * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case. - (tsubst_initializer_list): Use expand_member_init. - * semantics.c (finish_mem_intiailizers): Simplify. - -2002-10-02 Matt Austern - * decl.c (walk_vtables_r): Fixed typo that caused result to - never get a nonzero value. - -2002-10-02 Roger Sayle - - PR optimization/6627 - * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition - from here, and move it to tree.h. - * decl.c (cxx_init_decl_processing): If storing the vbit - in function pointers, ensure that force_align_functions_log - is atleast one. - -2002-10-02 Matt Austern - - * class.c (check_field_decls): Changed warning about const member - variables so that it doesn't get issued for a class aggregate. - -2002-10-01 Mark Mitchell - - * decl.c (cp_finish_decl): Make sure array types are laid out, - even if the array bounds are unknown. - -2002-10-01 Steve Ellcey - - * class.c (build_vtbl_initializer): Change build_c_cast - to build1. - -2002-10-01 Mark Mitchell - - * decl.c (cp_finish_decl): Make sure array types are laid out, - even if the array bounds are unknown. - - * decl.c (cp_finish_decl): Correct check for dynamic - initialization of thread-local storage. - -2002-09-30 Nathan Sidwell - - * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also - overloaded. - -2002-09-30 Steve Ellcey - - * class.c (build_vtbl_initializer): Add cast. - (add_vcall_offset_vtbl_entries_1): - Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset. - -2002-09-30 Mark Mitchell - - * class.c (walk_subobject_offsets): Correct the calculation of - offsets for virtual bases. Correct the counting of array - elements. - (layout_nonempty_base_or_field): Simplify. Correct the - calculation of offsets to be propagated through the binfo - hierarchy. - (build_base_field): Avoid creating a FIELD_DECL for empty bases. - Add the FIELD_DECL to TYPE_FIELDS. - (build_base_fields): Adjust accordingly. - (layout_virtual_bases): Use build_base_field. - (end_of_class): Return a tree, not an integer. - (warn_about_ambiguous_direct_bases): Rename to ... - (warn_about_ambiguous_bases): ... this. - (include_empty_classes): New function. - (layout_class_type): Create an alternative version of the type to - be used when as a base class type. Do not call - finish_record_layout until we are done laying out the class. - * cp-tree.h (lang_type_class): Remove size, size_unit. Add - as_base. - (CLASSTYPE_SIZE): Reimplement. - (CLASSTYPE_SIZE_UNIT): Likewise. - (CLASSTYPE_ALIGN): Likweise. - (CLASSTYPE_USER_ALIGN): Likewise. - (CLASSTYPE_AS_BASE): New macro. - (DECL_INITIALIZED_P): Likewise. - (extract_init): Remove prototype. - (build_forced_zero_init): Rename to ... - (build_zero_init): ... this. - (force_store_init_value): Remove. - * decl.c (obscure_complex_init): Remove. - (duplicate_decls): Copy DECL_INITIALIZED_P. - (check_initializer): Do not leave junk in DECL_INITIAL. - (cp_finish_decl): Handle zero-initialization of entities with - static storage duration. - * expr.c (extract_init): Remove. - * init.c (build_forced_zero_init): Remove. - (build_zero_init): New function. - (build_default_init): Use it. - (build_field_list): Skip FIELD_DECLs for base subobjects. - (push_base_cleanups): Likewise. - * method.c (do_build_assign_ref): Likewise. - (synthesize_exception_spec): Likewise. - * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P. - (regenerate_decl_from_template): To not set DECL_INITIAL for a - static data member whose initialization took place in its class. - (instantiate_decl): Do not pass an initializer to cp_finish_decl - in that situation. - * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects. - (dfs_unuse_fields): Likewise. - * tree.c (pod_type_p): Handle error_mark_node. - (zero_init_p): Likewise. - * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base - subobjects. - * typeck2.c (store_init_value): Remove #if 0'd code. - (force_store_init_value): Remove. - (process_init_constructor): Use build_zero_init. - -2002-09-29 Nathan Sidwell - - PR c++/7788 - * rtti.c (unemitted_tinfo_decl_p): Check it has a field. - -2002-09-29 Kazu Hirata - - * cp-tree.h: Fix comment typos. - * decl.c: Likewise. - * pt.c: Likewise. - -2002-09-25 Mark Mitchell - - * cp/class.c (contains_empty_class_p): New method. - (walk_subobject_offsets): Correct computation of field offset. - (layout_empty_base): Correct placement of emtpy base classes. - (layout_class_type): Warn about ABI changes. - -2002-09-23 Mark Mitchell - - * cp/class.c (layout_virtual_bases): Do not round the size of the - type to a multiple of the alignment before laying out virtual bases. - (layout_class_type): Correct handling of bit-fields that are wider - than their type inside unions. Round the size of the type to a - even number of bytes when computing the size without virtual - bases. - * cp/cp-tree.h (abi_version_at_least): New macro. - -2002-09-21 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.2: Likewise. - * call.c: Likewise. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * friend.c: Likewise. - * g++spec.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * mangle.c: Likewise. - * method.c: Likewise. - * operators.def: Likewise. - * optimize.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2002-09-18 Devang Patel - - * cp/cp-tree.h: New prototype for walk_vtabls(). - * cp/decl.c (walk_vtables_r): New function. - (struct cp_binding_level): Add new members, namespaces, - names_size and vtables. - (add_decl_to_level): Add decl in namespaces or vtables - chain, if conditions match. - (walk_vtables): New function. - (walk_namespaces_r): Travers separate namespace chain - for namespace decls. - (wrapup_globals_for_namespace): Use names_size instead - of list_length(). - * cp/decl2.c (finish_file): Use walk_vtables() instead of - walk_globals() to walk vtable decls. - -2002-09-18 Nathan Sidwell - - * decl.c (grokdeclarator): Use assert, not internal_error. Don't - ICE with invalid pointers & references. - -2002-09-17 Zack Weinberg - - * Make-lang.in: Remove all references to the demangler. - * cxxfilt.c: Moved to binutils. - -2002-09-16 Nathan Sidwell - - PR c++/7718 - * pt.c (tsubst_decl): Remove assert. - - Remove DR 295 implementation. - * pt.c (check_cv_quals_for_unify): Disable function & method cases. - * tree.c (cp_build_qualified_type_real): Likewise. Don't warn - about ignoring volatile qualifiers. - - * search.c (lookup_member): Correct documentation. - -2002-09-16 Geoffrey Keating - - * cp-tree.h (union lang_tree_node): Add chain_next option. - -2002-09-16 Nathan Sidwell - - * parse.y (parse_finish_call_expr): Check lookup_member result. - - PR c++/7015 - * semantic.c (finish_asm_stmt): Fix operand/output_operands - thinko. - * typeck.c (c_expand_asm_operands): Protect from error_mark_node. - -2002-09-15 Nathan Sidwell - - PR c++/7919 - * call.c (build_over_call): Convert this pointer for fns found by - using decls. - -2002-09-15 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.1: Likewise. - -2002-09-14 Nathan Sidwell - - PR c++/7768 - * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. - -2002-09-14 Kazu Hirata - - * error.c: Fix comment formatting. - * except.c: Likewise. - * expr.c: Likewise. - * friend.c: Likewise. - * g++spec.c: Likewise. - * init.c: Likewise. - * lex.c: Likewise. - * mangle.c: Likewise. - * method.c: Likewise. - * optimize.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2002-09-13 Matt Austern - - PR C++/7828 - * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. - * cp/call.c: Change call-by-const-reference mechanism to use - non_cast_lvalue_p when deciding whether the create a temporary. - We need a temporary when passing, e.g. (long) x by const ref. - -2002-09-13 Nathan Sidwell - - * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. - -2002-09-13 Kazu Hirata - - * decl.c: Fix comment formatting. - * decl2.c: Likewise. - -2002-09-12 Kazu Hirata - - * call.c: Fix comment formatting. - * class.c: Likewise. - * cp-lang.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - -2002-09-11 Zack Weinberg - - * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c, - and c++filt from cxxfilt.o + version.o + $(LIBDEPS). - * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with - minor adjustments (use version_string, eliminate yet another - duplicate of xmalloc) - -2002-09-08 Kaveh R. Ghazi - - * cp-tree.h (require_complete_eh_spec_types): Add prototype. - -2002-09-05 Jason Merrill - - * typeck2.c (add_exception_specifier): Only pedwarn for an - incomplete type. - (require_complete_eh_spec_types): New fn. - (cxx_incomplete_type_diagnostic): Also support pedwarning. - * typeck.c (complete_type_or_diagnostic): Likewise. - * call.c (build_call): Call require_complete_eh_spec_types. - * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting - on an incomplete type. - -2002-09-04 Jakub Jelinek - - * decl.c (start_cleanup_fn): Clear interface_only before - start_function, restore it afterwards. - -2002-09-02 Nathan Sidwell - - * cp-tree.h (finish_builtin_type): Remove. - * decl2.c (finish_builtin_type): Move to common code. - * decl.c (build_ptrmemfunc_type): Adjust. - * rtti.c (create_pseudo_type_info): Adjust. - (create_tinfo_types): Adjust. - -2002-08-31 Jason Merrill - - * cp-lang.c (cp_expr_size): Allow initialization from a - CONSTRUCTOR. - -2002-08-30 Richard Henderson - - PR opt/7515 - * tree.c: Include target.h. - (cp_cannot_inline_tree_fn): Don't auto-inline functions that - don't bind locally. - * Makefile.in (tree.o): Update. - -2002-08-27 Mark Mitchell - - * class.c (layout_virtual_bases): Warn about bugs in G++ that - result in incorrect object layouts. - (layout_class_type): Likewise. - -2002-08-24 Matt Austern - - * tree.c (lvalue_p_1): Add argument for whether casts of lvalues - are allowable. - (real_lvalue_p): Update caller. - (lvalue_p): Ditto. - (non_cast_lvalue_or_else): New. - * tree.h: Declare it. - * typeck.c (build_unary_op): Use non_cast_lvalue_or_else. - -2002-08-22 Mark Mitchell - - * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR - and COND_EXPR specially; fix error message output. - -2002-08-22 Jason Merrill - - * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR. - * semantics.c (nullify_returns_r): Likewise. - -2002-08-17 Gabriel Dos Reis - - Fix PR/7621 - * typeck.c (finish_class_member_access_expr): Diagnose cases where - name lookup finds nothing. - -2002-08-15 Jason Merrill - - * semantics.c (finish_then_clause): Remove redundant assignment. - (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the - extra binding level outside the if/switch statement. - (finish_while_cond, finish_for_cond): Rewrite complex condition - into the loop body. - -2002-08-15 Alexandre Oliva - - * parse.y (sizeof, alignof, typeof): New non-terminals to - increment skip_evaluation. Replace terminals with them and - decrement skip_evaluation at the end of rules using them. - * decl2.c (mark_used): Don't assemble_external if - skipping evaluation. - -2002-08-15 Gabriel Dos Reis - - Fix PR/7504 - * parse.y (parse_finish_call_expr): Handle incomplete - type used to name a scope. - -2002-08-15 Nathan Sidwell - - PR c++/7598 - * typeck.c (build_unary_op): Fold offsetof idiom. Fixes - regression caused by my 2002-08-08 patch. - -2002-08-13 Mark Mitchell - - * decl.c (pushdecl_class_level): Honor requests to bind names to - OVERLOADs. - -2002-08-11 Kaveh R. Ghazi - - * decl2.c (build_call_from_tree): Fix uninitialized variable. - * parse.y (parse_finish_call_expr): Likewise. - * repo.c (old_args, old_dir, old_main): Const-ify. - -2002-08-11 Gabriel Dos Reis - - * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE - DECL_SOURCE_LINE with DECL_SOURCE_LOCATION. - * optimize.c (maybe_clone_body): Likewise. - * pt.c (tsubst_enum): Likewise. - (lookup_template_class): Likewise. - * tree.c (cp_copy_res_decl_for_inlining): Likewise. - -2002-08-10 Neil Booth - - * lang-specs.h: Remove -ansi. - -2002-08-10 Nathan Sidwell - - * tree.c (maybe_dummy_object): Replace // with /* */ - -2002-08-09 Mark Mitchell - - * call.c (standard_conversion): Use build_ptrmem_type. - * cp-tree.h (build_ptrmem_type): New function. - (adjust_result_of_qualified_name_lookup): Likewise. - * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate - static data members. - (build_ptrmem_type): New function. - (grokdeclarator): Do not use build_offset_type when encountering a - qualified name. - * parse.y (parse_finish_call_expr): Use - adjust_result_of_qualified_name_lookup. - * search.c (adjust_result_of_qualified_name_lookup): New function. - * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than - accessing OFFSET_TYPEs directly. - -2002-08-08 Mike Stump - - * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid. - (type_decays_to): Likewise. - * class.c (find_final_overrider): Likewise. - (maybe_note_name_used_in_class): Likewise. - * decl.c (current_tmpl_spec_kind): Likewise. - (add_binding): Likewise. - (push_class_binding): Likewise. - (duplicate_decls): Likewise. - (layout_var_decl): Likewise. - (grokfndecl): Likewise. - (grokdeclarator): Likewise. - (check_default_argument): Likewise. - * decl2.c (handle_class_head): Likewise. - * error.c (dump_template_decl): Likewise. - * init.c (build_offset_ref): Likewise. - * pt.c (check_specialization_scope): Likewise. - (determine_specialization): Likewise. - (check_explicit_specialization): Likewise. - (maybe_check_template_type): Likewise. - (process_partial_specialization): Likewise. - (check_default_tmpl_args): Likewise. - (push_template_decl_real): Likewise. - (convert_template_argument): Likewise. - (try_class_unification): Likewise. - (get_bindings_real): Likewise. - (do_decl_instantiation): Likewise. - * semantics.c (begin_function_definition): Likewise. - (finish_member_declaration): Likewise. - (check_multiple_declarators): Likewise. - * typeck.c (comp_array_types): Likewise. - (comptypes): Likewise. - (expr_sizeof): Likewise. - (build_binary_op): Likewise. - (dubious_conversion_warnings): Likewise. - (check_return_expr): Likewise. - -2002-08-08 Mark Mitchell - - * typeck.c (build_class_member_access_expr): Do not return - error_mark_node when no error has occurred. - -2002-08-08 Nathan Sidwell - - * typeck.c (build_component_addr): Remove. - (build_unary_op): Just check it's not a bitfield, and then build - an ADDR_EXPR. - -2002-08-08 Nathan Sidwell - - * class.c (convert_to_base): Correct check for error_mark_node. - (create_vtable_ptr): Remove unused VFUNS_P parm. - -2002-08-08 Nathan Sidwell - - * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. - -2002-08-07 Mark Mitchell - - Rework build_component_ref. - * call.c (build_vfield_ref): Do not go through build_component_ref. - (build_field_call): Use build_class_member_access_expr. - (build_user_type_conversion_1): Use BASELINK_FUNCTIONS. - (build_object_call): Likewise. - * class.c (convert_to_base): New function. - (type_requires_array_cookie): Use BASELINK_FUNCTIONS. - (instantiate_type): Handle BASELINKs. - * cp-tree.def (BASELINK): New tree code. - * cp-tree.h (BASELINK_P): Reimplement. - (SET_BASELINK_P): Remove. - (BASELINK_BINFO): Reimplement. - (BASELINK_FUNCTIONS): Likewise. - (BASELINK_ACCESS_BINFO): Likewise. - (BASELINK_OPTYPE): Likewise. - (convert_to_base): New function. - (name_p): Likewise. - (build_object_ref): Remove. - (build_component_ref_1): Likewise. - (build_component_ref): Likewise. - (build_x_component_ref): Likewise. - (build_class_member_access_expr): New function. - (finish_class_member_access_expr): Likewise. - (build_ptrmemfunc_access_expr): Likewise. - * decl.c (grokdeclarator): Handle BASELINKs. - * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using - finish_class_member_access_expr. - (arg_assoc): Handle BASELINKs. - (do_class_using_decl): Likewise. - * error.c (dump_decl): Likewise. - (dump_expr): Use build_ptrmemfunc_access_expr. - * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find - destructors. - (build_throw): Use BASELINK_FUNCTIONS. - * init.c (perform_member_init): Use - build_class_member_access_expr. - (build_offset_ref): Handle BASELINKs. Use - build_class_member_access_expr. - * method.c (hack_identifier): Likewise. - * parse.y (do_id): Use BASELINK, not TREE_LIST. - (primary): Remove uses of build_object_ref. - * pt.c (lookup_template_function): Handle BASELINKs. - (resolve_overloaded_unification): Likewise. - * search.c (build_baselink): Build a BASELINK, not a TREE_LIST. - (lookup_field): Use BASELINK, not TREE_LIST. - (lookup_fnfiels): Likewise. - (setup_class_bindings): Likewise. - * semantics.c (finish_object_call_expr): Do not use - build_method_call when we already know what function is being - called. - * spew.c (identifier_type): Use BASELINK, not TREE_LIST. - * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not - TREE_CHAIN. - (name_p): New function. - * typeck.c (build_object_ref): Remove. - (build_component_ref_1): Likewise. - (build_x_component_ref): Likewise. - (build_class_member_access_expr): New function. - (finish_class_member_access_expr): Likewise. - (build_ptrmemfunc_access_expr): Likewise. - (get_member_function_from_ptrfunc): Use - build_ptrmemfunc_access_expr. - (build_binary_op): Likewise. - (build_unary_op): Likewise. - (build_ptrmemfunc): Likewise. - (pfn_from_ptrmemfunc): Likewise. - * typeck2.c (build_m_component_ref): Adjust comment. - -2002-08-07 Neil Booth - - * Make-lang.in (CXX_C_OBJS): Update. - * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. - * cp-tree.h (cxx_decode_option): Remove. - * decl2.c (compare_options, lang_f_options, unsupported_options, - cxx_decode_option): Remove. - -2002-08-06 Gabriel Dos Reis - - * typeck.c (build_x_unary_op): Handle pointer-to-member. - -2002-08-05 Geoffrey Keating - - * class.c: Don't include obstack.h. - (popclass): - * decl2.c: Delete bogus comment. - * error.c: Don't include obstack.h. - * except.c: Likewise. - (dump_type): Correct comment. - * method.c: Don't include obstack.h. - * tree.c: Likewise. - -2002-08-04 Gabriel Dos Reis - - Fix PR/2213 - * cvt.c (cp_convert_to_pointer): Reject conversions from integral - expressions to pointer-to-data-member of pointer-to-member-functions. - -2002-08-04 Geoffrey Keating - - * cvt.c (ocp_convert): Delete obsolete code. - * parse.y (permanent_obstack): Delete declaration. - * pt.c (permanent_obstack): Delete declaration. - * repo.c (permanent_obstack): Delete declaration. - (open_repo_file): Use xmalloc instead of permanent_obstack. - (init_repo): Use xstrdup instead of permanent_obstack. - -2002-08-04 Nathan Sidwell - - * cp-tree.h (VF_DERIVED_VALUE): Remove. - * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE. - -2002-08-03 Nathan Sidwell - - PR 7470. - C++ ABI change - vfunc ordering. - * class.c (add_virtual_function): Remove. - (dfs_modify_all_vtables): Take list of all declared - virtuals. Assign all that are not in primary base. - (check_for_override): Adjust comments. - (create_vtable_ptr): Take single list of virtuals. Build chain - of declared virtuals here. - (layout_class_type): Take single list of virtuals. Adjust. - (finish_struct_1): Keep virtuals on single list. Adjust. - -2002-08-02 Mark Mitchell - - * init.c (build_member_call): Use build_new_method_call, not - build_method_call. - -2002-08-02 Krister Walfridsson - - * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies. - -2002-08-02 Mark Mitchell - - * call.c (build_method_call): Issue a more helpful error message - about ambiguous method names. - -2002-08-02 Nathan Sidwell - - * tree.c (build_shared_int_cst): Make cache file scope, and - GTY it. - -2002-08-02 Jason Merrill - - * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. - (cp_expr_size): New fn. - * call.c (build_over_call): Lose empty class hackery. - (convert_arg_to_ellipsis): Promote non-POD warning to error. - * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. - - * semantics.c (expand_body): Do tree optimization in the function - context, too. - -2002-08-01 Neil Booth - - * cp-tree.h: Move all warning and flag declarations to c-common.h. - * decl.c: Move all warning and flag variables to c-common.c. - * decl2.c: Move all warning and flag variables to c-common.c. - * lex.c (flag_digraphs): Remove. - (warn_traditional): Now in c-common.c. - -2002-07-31 Mark Mitchell - - * call.c (build_field_call): Do not look up the field by name. - (build_method_call): Simplify. - (struct z_candidate): Add access_path and conversion_path. Remove - basetype_path. - (convert_class_to_reference): Adjust use of - add_function_candidate. - (add_candidate): Add conversion_path argument. - (add_function_candidate): Use it. - (add_conv_dndidate): Likewise. - (build_builtin_candidate): Likewise. - (add_template_candidate_real): Add conversion_path argument. - (add_template_conv_candidate): Likewise. - (add_template_candidate): Likewise. - (build_user_type_conversion_1): Use it. - (build_new_function_call): Remove name lookup code. Adjust use of - add_template_candidate and add_function_candidate. - (build_new_op): Likewise. - (convert_like_real): Use build_special_member_call. - (build_over_call): Use cand->conversion_path. - (build_special_member_call): New method. - (build_new_method_call): Remove name lookup code. - * cp-tree.def (OFFSET_REF): Update documentation. - (TEMPLATE_ID_EXPR): Likewise. - * cp-tree.h (BASELINK_ACCESS_BINFO): New macro. - (BASELINK_OPTYPE): Likewise. - (build_new_method_call): Adjust prototype. - (build_special_member_call): New method. - (build_baselink): New method. - (build_offset_ref_call_from_tree): Likewise. - (build_call_from_tree): Likewise. - (finish_qualified_call_expr): Remove. - (finish_call_expr): Adjust prototype. - (build_x_function_call): Remove. - * cvt.c (ocp_convert): Use build_special_member_call. - * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr. - (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and - CALL_EXPR. - (build_offset_ref_call_from_tree): New function. - (build_call_from_tree): Likewise. - * init.c (expand_cleanup): Use build_special_member_call. - (expand_default_init): Likewise. - (build_member_call): Use finish_call_expr. - (build_new_1): Use build_special_member_call. - (push_base_cleanups): Likewise. - * method.c (do_build_assign_ref): Likewise. - * parse.y (template_id): Do not pass a COMPONENT_REF to - lookup_template_function. - (primary): Use parse_finish_call_epxr, not finish_call_expr. - (parse_finish_call_expr): New function. - * pt.c (lookup_template_function): Add assertions. - * search.c (lookup_base): Allow T to be a binfo. - (build_baselink): New function. - (lookup_member): Use it. - * semantics.c (finish_call_expr): Do not do name lookup. - (finish_object_call_expr): Remove #if 0'd code. - (finish_qualified_call_expr): Remove. - * typeck.c (build_x_function_call): Remove. - (build_static_case): Use build_special_member_call. - * typeck2.c (build_functional_cast): Likewise. - -2002-07-30 Franz Sirl - - * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. - -2002-07-30 Gabriel Dos Reis - - * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion. - -2002-07-30 Nathan Sidwell - - * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more - documentation. - -2002-07-29 Alan Modra - - * cp-tree.h: Comment typo fix. - -2002-07-29 Richard Earnshaw - - * spew.c (space_for_token): Allocate zeroed memory for a new token - chunk. - -2002-07-27 Roger Sayle - - * decl.c (builtin_function_1): No need to explicitly mark - BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. - -2002-07-27 Roger Sayle - - * decl2.c (cxx_decode_option): Support -fno-builtin-foo. - -2002-07-26 Jason Merrill - - * call.c (build_over_call): Likewise. - (cp_convert_parm_for_inlining): New fn. - (convert_for_arg_passing): New fn. - (convert_default_arg, build_over_call): Use it. - (type_passed_as): New fn. - * pt.c (tsubst_decl): Use it. - * decl2.c (cp_build_parm_decl): New fn. - (build_artificial_parm): Use it. - (start_static_storage_duration_function): Likewise. - * decl.c (start_cleanup_fn, grokdeclarater): Likewise. - (grokparms): Don't mess with DECL_ARG_TYPE. - * typeck.c (convert_arguments): Use convert_for_arg_passing. - * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): - Define. - * cp-tree.h: Declare new fns. - -2002-07-26 Neil Booth - - * cp-tree.h (flag_operator_names): Remove. - * decl2.c (flag_operator_names): Remove. - (lang_f_options): Remove operator-names. - * lex.c (D_OPNAME): Remove. - (reswords): Remove operator names. - (rid_to_yy): Remove operator names. - (init_reswords): No need to handle D_OPNAME. - * spew.c (read_process_identifier): There are no operator - names. - -2002-07-26 Jason Merrill - - * dump.c (cp_dump_tree): Call c_dump_tree. - * Make-lang.in (CXX_C_OBJS): Add c-dump.o. - -2002-07-25 Neil Booth - - * error.c (print_whitespace): Remove. - * g++spec.c (LIBUNWIND): Move. - * mangle.c (mangled_position, write_signed_number): Remove. - -2002-07-25 Neil Booth - - * decl2.c (cxx_decode_option): Similarly. - -2002-07-25 Gabriel Dos Reis - - * cp-tree.h (cxx_sizeof_nowarn): Now a macro. - (cxx_sizeof_or_alignof_type): Take a third argument. - (cxx_sizeof): Adjust definition. - (cxx_alignof): Likewise. - * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality. - * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for - complaining. - (c_sizeof_nowarn): Remove definition. - (build_unary_op): Use cxx_sizeof_nowarn. - -2002-07-24 Geoffrey Keating - - * tree.c (cp_build_qualified_type_real): When copying - pointer-to-method types, unshare the record that holds - the cached pointer-to-member-function type. - -2002-07-23 Neil Booth - - * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove. - -2002-07-23 Gabriel Dos Reis - - Fix PR/7363: - * typeck.c (cxx_sizeof_or_alignof_type): New function. - (c_sizeof): Remove definition. - (expr_sizeof): Use cxx_sizeof. - * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type. - * decl.c (finish_destructor_body): Use cxx_sizeof. - * semantics.c (finish_alignof): Likewise. - (finish_alignof): Use cxx_alignof. - * cp-tree.h (cxx_sizeof, cxx_alignof): New macros. - (cxx_sizeof_or_alignof_type): Declare. - (my_friendly_assert): Move to ../c-common.h. - -2002-07-23 Neil Booth - - * class.c, method.c, pt.c, search.c: Don't define obstack macros. - -2002-07-22 Kriang Lerdsuwanakij - - PR c++/7347, c++/7348 - * cp-tree.h (tsubst_flags_t): Add tf_parsing. - * decl.c (make_typename_type): Use it. - (make_unbound_class_template): Likewise. - (lookup_name_real): Don't call type_access_control if scope is - template parameter dependent. - * parse.y (template_arg): Call make_unbound_class_template with - tf_parsing set. - (nest_name_specifier): Call make_typename_type with tf_parsing set. - (typename_sub0): Likewise. - (typename_sub1): Likewise. - (instantiate_decl): Push class scope. - * pt.c (regenerate_decl_from_template): Call pushclass and popclass - for both static variable and member function template. - (instantiate_decl) Call pushclass and popclass when tsubst'ing type - and arguments. - * search.c (type_access_control): Do type access for TEMPLATE_DECL - too. - -2002-07-20 Roger Sayle - - * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions - test by using positive_option. Make whitespace consistent. - -2002-07-20 Gabriel Dos Reis - - * spew.c (struct unparsed_test): Replace 'filename' and 'lineno' - members with 'locus'. Adjust use throughout. - (struct feed): Likewise. - (alloc_unparsed_test): Change prototype, take a 'const location_t *'. - Adjust use. - (snarf_defarg): Use error(), not error_with_file_and_line(). - -2002-07-19 Chris Demetriou - - * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever - cpp_options is included. - -2002-07-17 Kriang Lerdsuwanakij - - PR c++/2862, c++/2863 - * pt.c (determine_specialization): Compare the length of - TYPE_ARG_TYPES. Tidy. - -2002-07-17 Kriang Lerdsuwanakij - - PR c++/3797 - * decl.c (duplicate_decls): Don't propagate inlining parameters from - olddecl to newdecl when newdecl is a specialization of the - instantiation olddecl. - -2002-07-17 Kriang Lerdsuwanakij - - PR c++/4802, c++/5387 - * decl.c (make_typename_type): Use enforce_access. - -2002-07-17 Scott Snyder - - PR c++/7320 - * rtti.c (get_tinfo_decl): Set DECL_COMDAT. - -2002-07-12 Mark Mitchell - - * class.c (add_method): Correct handling of conversion operators. - -2002-07-11 Mark Mitchell - - PR c++/7224 - * class.c (add_method): Simplify. - -2002-07-11 Jason Merrill - - PR c++/7279 - * tree.c (cp_copy_res_decl_for_inlining): Also copy - TREE_ADDRESSABLE. - -2002-07-10 Graham Stott - - * pt.c (template_parm_this_level_p, push_template_decl_real): - Pass depth as int pointer. - -2002-07-11 Tim Josling - - Remove front end hard coding from gengtype.c. - - * config-lang.in (gtfiles): Add files needed for this front end. - -2002-07-10 Mark Mitchell - - * cp-tree.h (unqualified_name_lookup_error): Declare it. - (begin_function_definition): Adjust prototype. - * lex.c (unqualified_name_lookup_error): New function, split out - from ... - (do_identifier): ... here. - * parse.y (parse_begin_function_definition): New function. - (fn.def1): Use it. - * semantics.c (begin_function_definition): Accept decl-specifiers - and attributes as separate parameters. - -2002-07-10 Jason Merrill - - PR c++/6255 - * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than - modifying the old one. - -2002-07-09 Mark Mitchell - - * cp-tree.h (constructor_name_p): Declare it. - (check_template_template_default_arg): Likewise. - * class.c (handle_using_decl): Use constructor_name_p. - * decl.c (grokdeclarator): Likewise. - * decl2.c (constructor_name_p): Define it. - * init.c (build_member_call): Use constructor_name_p. - * parse.y (template_parm): Use check_template_template_default_arg. - * pt.c (check_explicit_specialization): Use constructor_name_p. - * semantics.c (check_template_template_default_arg): New function. - -2002-07-08 Kriang Lerdsuwanakij - - * pt.c (can_complete_type_without_circularity): Add static to - function definition. - -2002-07-08 Mark Mitchell - - * cp-tree.h (have_extern_spec): Declare it - * decl.c (have_extern_spec): Define it. - (start_decl): Eliminate use of used_extern_spec. - (start_function): Likewise. - * parse.y (have_extern_spec): Remove declaration. - (used_extern_spec): Likewise. - (frob_specs): Eliminate use of used_extern_spec. - (.hush_warning): Likewise. - -2002-07-07 Mark Mitchell - - * Make-lang.in (cp/parse.o): Depend on decl.h. - * cp-tree.h (do_decl_instantiation): Change prototype. - * parse.y: Include decl.h. - (parse_decl_instantiation): New function. - (explicit_instantiation): Use it. - * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR - and DECLSPECS. - -2002-07-07 Roger Sayle - - * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for - constructor and destructor tests when passed a TEMPLATE_DECL. - -2002-07-05 Jason Merrill - - * cvt.c (cp_convert_to_pointer): Call force_fit_type for null - pointers. - - PR optimization/7145 - * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. - -2002-07-05 Nathan Sidwell - - Repair damage on weak-impared targets caused by my previous patch. - * cp-tree.h (import_export_tinfo): Add parameter. - * decl2.c (import_export_tinfo): Add parameter, post adjust - DECL_COMDAT. - * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by - import_export_tinfo. - -2002-07-03 Kriang Lerdsuwanakij - - PR c++/6944 - * init.c (build_aggr_init): Remove qualifiers of init before calling - build_vec_init. - (build_vec_init): Flatten multi-dimensional array during cleanup. - (build_vec_delete_1): Abort if the type of each element is array. - -2002-07-03 Graham Stott - - * pt.c (instantiate_class_template): Fix typo. - -2002-07-02 Kriang Lerdsuwanakij - - * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused - by CVS conflict in my last patch. - -2002-07-02 Kriang Lerdsuwanakij - - PR c++/6716 - * pt.c (can_complete_type_without_circularity): New function. - (instantiate_class_template): Use it. - * typeck2.c (cxx_incomplete_type_diagnostic): Improve error - message due to incomplete fields. - -2002-07-01 Mark Mitchell - - PR c++/7112 - * mangle.c (write_expression): Add mangling for sizeof when - applied to a type. - * operators.def: Remove stale comment. - -2002-06-30 Nathan Sidwell - - * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... - (CPTI_TYPE_INFO_PTR_TYPE): ... this. - (tinfo_decl_type): Replace with ... - (type_info_ptr_type): ... this. - (import_export_tinfo): Declare. - (tinfo_decl_p): Rename to ... - (unemitted_tinfo_decl_p): ... this. - * decl2.c (import_export_decl): Break out tinfo handling into ... - (import_export_tinfo): ... here. New function. - (finish_file): Adjust. - * rtti.c (TINFO_REAL_NAME): New macro. - (init_rtti_processing): Create the tinfo types. - (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. - (get_tinfo_decl): Adjust. - (get_tinfo_ptr): New function. - (get_type_id): Use it. - (tinfo_base_init): Create vtable decl here, if it doesn't exist. - (ptr_initializer): Use get_tinfo_ptr. - (ptm_initializer): Likewise. - (synthesize_tinfo_var): Break into ... - (get_pseudo_ti_init): ... this. Just create the initializer. - (get_pseudo_ti_desc): .. and this. - (create_real_tinfo_var): Remove. - (create_pseudo_type_info): Don't create the vtable decl here. - (get_vmi_pseudo_type_info): Remove. - (create_tinfo_types): Adjust. - (tinfo_decl_p): Rename to ... - (unemitted_tinfo_decl_p): ... here. Adjust. - (emit_tinfo_decl): Adjust. Create the initializer. - -2002-06-27 Mark Mitchell - - PR c++/6695 - * pt.c (tsubst_friend_class): Substitute into the context of the - friend before using it. - -2002-06-26 Mark Mitchell - - * cp-tree.h (xref_tag): Change prototype. - (handle_class_head): Likewise. - (build_x_component_ref): Likewise. - * decl.c (cxx_init_decl_processing): Adjust call to xref_tag. - (xref_tag): Take attributes as a separate parameter. - (xref_tag_from_type): Adjust call to xref_tag. - * decl2.c (build_expr_from_tree): Adjust call to - build_x_component_ref. - (handle_class_head): Take attributes as a separate parameter. - * parse.y (parse_xref_tag): New function. - (parse_handle_class_head): Likewise. - (primary): Use parse_xref_tag. - (class_head_decl): Use parse_handle_class_head. - (class_head_defn): Likewise. - * rtti.c (init_rtti_processing): Adjust call to xref_tag. - (build_dynamic_cast_1): Likewise. - (create_pseudo_type_info): Likewise. - (emit_support_tinfos): Likewise. - * typeck.c (build_object_ref): Adjust call to - build_x_component_ref. - (build_x_component_ref): Remove protect parameter. - -2002-06-25 Mark Mitchell - - * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS. - * class.c (handle_using_decl): Likewise. - (instantiate_type): Likewise. - * cp-tree.h (BASELINK_FUNCTIONS): New macro. - (xref_basetypes): Change prototype. - (begin_mem_initializers): New function. - (get_overloaded_fn): Likewise. - * decl.c (xref_basetypes): Simplify. - * error.c (dump_expr): Use BASELINK_FUNCTIONS. - * init.c (build_offset_ref): Likewise. - * parse.y (base_init): Use begin_mem_initializers(). - (structsp): Adjust call to xref_basetypes. - * pt.c (determine_specialization): Use BASELINK_FUNCTIONS. - (instantiate_class_template): Adjust call to xref_basetypes. - * semantics.c (begin_mem_initializers): New function. - * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS. - (really_overloaded_fn): Likewise. - (get_overloaded_fn): New function.' - (get_first_fn): USe BASELINK_FUNCTIONS. - -2002-06-24 Mark Mitchell - - * cp-tree.h (SCALAR_TYPE_P): New macro. - (check_for_out_of_scope_variable): New function. - (at_class_scope_p): Likewise. - (finish_fname): Likewise. - * class.c (finish_struct): Use at_function_scope_p. - * decl.c (check_for_out_of_scope_variable): New function, split - out from do_identifier. - (finish_enum): Use at_function_scope_p. - * lex.c (do_identifier): Use check_for_out_of_scope_variable. - * parse.y (VAR_FUNC_NAME): Give it . Use finish_fname. - (primary): Use at_function_scope_p. - * search.c (at_class_scope_p): New function. - * semantics.c (finish_fname): Likewise. - (check_multiple_declarators): Use at_function_scope_p. - -2002-06-23 Mark Mitchell - - * parse.y (parse_scoped_id): New function. - (primary): Use it. - * cp-tree.h (do_scoped_id): Adjust declaration. - * lex.c (do_scoped_id): Remove call to yylex. - * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id. - * typeck2.c (add_exception_specifier): Use tree_cons, rather than - expanding it inline. - -2002-06-23 Matt Thomas - - * decl.c (finish_function): Change "#ifdef VMS_TARGET" to - "#if VMS_TARGET". - -2002-06-21 Kaveh R. Ghazi - - * mangle.c (integer_type_codes): Const-ify. - -2002-06-20 Richard Henderson - - PR c++/6747 - * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. - Call put_var_into_stack. - -2002-06-20 Kaveh R. Ghazi - - * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit - array size calculation. - -2002-06-20 Kriang Lerdsuwanakij - - PR c++/6892 - * pt.c (tsubst_expr): Handle FILE_STMT. - -2002-06-20 Kriang Lerdsuwanakij - - PR c++/6723 - * pt.c (lookup_template_class): Don't build complete argument of - BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template - argument. - -2002-06-19 Akim Demaille - - * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with - decl.h's TYPENAME. - * spew.c, lex.c: Adjust. - * parse.y (explicit_instantiation): Add empty action to override - the default $$ = $1 where it introduces a type clash. - -2002-06-14 Jason Merrill - - * semantics.c (begin_for_stmt): Push the 'for' scope before - adding the FOR_STMT. - - C++ ABI changes. - * class.c (build_base_field): Set DECL_PACKED. - (layout_class_type): Don't use tail padding of PODs. - * mangle.c (write_unqualified_name): Fix template conversion op - mangling. - -2002-06-16 Richard Henderson - - PR opt/6793 - * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test - after template instantiation. - -2002-06-16 Richard Henderson - - * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. - -2002-06-15 Gabriel Dos Reis - - * cp-tree.h (compiler_error): Remove declaration. - * lex.c (compiler_error): Remove definition. - -2002-06-14 Steve Ellcey - - * g++spec.c (LIBUNWIND): New. - (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set. - -2002-06-13 Jessica Han - - * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN. - (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE. - (build_vbase_offset_vtbl_entries): Likewise. - * rtti.c (build_headof): Likewise. - (get_tinfo_decl_dynamic): Likewise. - (create_pseudo_type_info): Likewise. - -2002-06-12 Stan Shebs - - * mpw-config.in: Remove file, no longer used. - * mpw-make.sed: Ditto. - -2002-06-07 Zack Weinberg - - * decl2.c: Update call to cpp_handle_option. - -2002-06-07 H.J. Lu (hjl@gnu.org) - - * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. - -2002-06-06 Gabriel Dos Reis - - * error.c (cp_error_at): Fix typo. - -2002-06-04 Gabriel Dos Reis - - * error.c (cp_diagnostic_starter): Adjust call. - (maybe_print_instantiation_context): Change prototype to take a - 'diagnostic_info *'. - (print_instantiation_full_context): Likewise. - (print_instantiation_partial_context): Likewise. - (cp_diagnostic_starter): Likewise. - (cp_diagnostic_finalizer): Likewise. - (cp_print_error_function): Likewise. - (cp_printer): Take a secondary parameter as a 'text_info *'. - Remove output_state savings. Adjust calls. - -2002-06-03 Geoffrey Keating - - * pt.c (inline_parm_levels): Mark for GC. - - * mangle.c (start_mangling): Allocate G.substitutions here... - (init_mangle): ... rather than here. - (finish_mangling): Clear the varray pointer when done with it. - * spew.c (yylexstring): Don't use VARRAY_FREE. - * search.c (bfs_walk): Don't use VARRAY_FREE. - * decl2.c (pending_statics): Use gengtype to mark. - (deferred_fns): Likewise. - (ssdf_decls): Likewise. - (init_decl2): Delete. - * decl.c (pop_from_top_level): Don't use VARRAY_FREE. - (cxx_init_decl_processing): Don't call init_decl2. - (cxx_pop_function_context): Don't use VARRAY_FREE. - * cp-tree.h (struct saved_scope): No need for special marking - of varrays. - (struct language_function): Likewise. - (local_classes): Use gengtype to mark. - (init_decl2): Delete prototype. - * class.c (init_class_processing): Don't use - ggc_add_tree_varray_root. - (build_vtbl_initializer): Don't use VARRAY_FREE. - - * decl.c (typename_compare): Don't use same_type_p. - - * decl.c: Include hashtab.h instead of hash.h. - (typename_hash): Update to use htab_h. - (typename_compare): Likewise. - (typename_htab): Use gengtype to mark. - (build_typename_type): Update to use htab_h. - * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h. - - * Make-lang.in (gt-cp-tree.h): New rule. - (cp/tree.o): Depend on gt-cp-tree.h. - * config-lang.in (gtfiles): Add cp/tree.c. - * tree.c: Include gt-cp-tree.h. - (list_hash_table): Use gengtype to mark. - (init_tree): Use gengtype to mark trees. - - * Make-lang.in (cp/decl.o): Add debug.h dependency. - * call.c (struct z_candidate): Use gengtype. - (USER_CONV_CAND): Use WRAPPER_ZC. - (convert_class_to_reference): Use build_zc_wrapper. - (build_type_conversion_1): Likewise. - (build_over_call): Use WRAPPER_ZC. - (add_warning): Use build_zc_wrapper. - * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete. - * cp-tree.h (struct lang_identifier): Use gengtype. - (struct template_parm_index_s): Likewise. - (struct ptrmem_cst): Likewise. - (struct tree_binding): Likewise. - (struct tree_overload): Likewise. - (struct tree_srcloc): Likewise. - (struct tree_wrapper): Likewise. Also modify to have a pointer - to struct z_candidate rather than void. - (enum cp_tree_node_structure_enum): New. - (union lang_tree_node): New. - (cxx_mark_tree): Delete prototype. - (cp_tree_node_structure): New prototype. - (build_ptr_wrapper): Delete prototype. - (build_int_wrapper): Delete prototype. - (build_zc_wrapper): New prototype. - * decl.c: Include debug.h - (cxx_mark_tree): Delete. - (cp_tree_node_structure): New. - * tree.c (build_ptr_wrapper): Delete. - (build_int_wrapper): Delete. - (build_zc_wrapper): New. - - * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK): - Correct typo. Patch from k_fukui@highway.ne.jp. - - * semantics.c (current_stmt_tree): Update for change to - struct language_function. - (finish_mem_initializers): Likewise. - * decl.c (cxx_init_decl_processing): Don't set mark_lang_status. - * cp-tree.h (struct language_function): Rename from - cp_language_function. Change all uses. - (cp_function_chain): Don't need to cast. - - * class.c (duplicate_tag_error): Reset discriminator. - (check_bases_and_members): Update for data structure changes. - * cp-tree.h (struct lang_id2): Use gengtype. - (flagged_type_tree): Likewise. - (SET_LANG_ID): Use GGC on struct lang_id2. - (struct cp_language_function): Use gengtype. Remove field - 'x_vcalls_possible_p'. - (current_vcalls_possible_p): Delete. - (struct lang_type_header): New. - (struct lang_type_class): Rename from struct lang_type. Include - struct lang_type_header. - (struct lang_type_ptrmem): New. - (struct lang_type): New. - (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros. - (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros. - (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes. - (struct lang_decl_flags): Use gengtype. Add discriminators. - (struct lang_decl): Use gengtype. Add and use discriminators. - Update the macros that reference moved fields. - (LANG_DECL_U2_CHECK): New function. Use it when appropriate. - (SET_DECL_THUNK_P): Set discriminator too. - (clear_inline_text_obstack): Delete prototype. - (finish_inline_definitions): Delete prototype. - (mark_pending_inlines): Delete prototype. - (lang_check_failed): New prototype. - * decl.c (struct named_label_use_list): Use gengtype. - (struct named_label_list): Likewise. - (mark_binding_level): Delete. - (mark_named_label_lists): Delete. - (push_local_name): Set discriminator on DECL_LANG_SPECIFIC. - (cxx_init_decl_processing): Use generated marker routine. - (begin_destructor_body): Delete dead set to - current_vcalls_possible_p. - (mark_lang_function): Delete. - (mark_cp_function_context): Delete. - (lang_mark_tree): Use generated marker routines. - * decl2.c (start_objects): Set discriminator when setting - GLOBAL_INIT_PRIORITY. - * lex.c (retrofit_lang_decl): Set discriminators. - (copy_lang_type): Update for changes to lang_type structure. - (cp_make_lang_type): Set discriminator. - * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers. - * search.c: Include ggc.h. - * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it. - (finish_inline_definitions): Delete. - * spew.c (struct token): Use gengtype. - (struct token_chunk): New. - (struct unparsed_text): Use gengtype. Store tokens in chunks. - (struct feed): Use gengtype. - (feed_obstack): Delete. - (feed): Mark as GC root. - (pending_inlines): Mark as GC root. - (pending_inlines_tail): Likewise. - (processing_these_inlines): Likewise. - (token_obstack): Make static. - (first_token): Likewise. - (init_spew): Don't initialize deleted things; use gengtype for roots. - (clear_inline_text_obstack): Delete. - (feed_input): Use GC for struct feed. Update for changes to - struct unparsed_text. - (mark_pending_inlines): Delete. - (next_token): Rename from add_token. Change all callers. Update - for changes to struct unparsed_text. - (space_for_token): New. - (remove_last_token): New. - (alloc_unparsed_text): New. - (snarf_block): Take an unparsed_text. Update for changes to struct - unparsed_text. - (snarf_method): Update for changes to struct unparsed_text. - (snarf_defarg): Update for changes to struct unparsed_text. - * tree.c (lang_check_failed): New. - - * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h - gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules. - (cp/spew.o): Add dependency on gt-.h. - (cp/decl2.o): Add dependency on gt-.h. - (cp/call.o): Add dependency on gt-.h. - (cp/pt.o): Add dependency on gt-.h. - (cp/repo.o): Add dependency on gt-.h. - (cp/parse.o): Add dependency on gt-.h. - * call.c: Use gengtype for roots. - * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c - decl2.c parse.y pt.c repo.c spew.c. - * cp-tree.h: Use gengtype for roots. - (struct saved_scope): Use GGC, gengtype. - (cp_parse_init): Delete prototype. - (init_pt): Delete prototype. - * decl.c: Use gengtype for roots. - (mark_saved_scope): Delete. - (cxx_init_decl_processing): Don't call deleted initilisation - routines. - (signed_size_zero_node): Delete, unused. - * decl.h: Use gengtype for roots. - * decl2.c: Use gengtype for roots. - * lex.h: Use gengtype for roots. - * parse.y: Use gengtype for roots. - (cp_parse_init): Delete. - * pt.c: Use gengtype for roots. - (init_pt): Delete. - * repo.c: Use gengtype for roots. - * spew.c: Use gengtype for roots. - - * Make-lang.in: Allow for filename changes. Add gtype-cp.h. - (cp/decl.o): Add dependency on gtype-cp.h. - * decl.c: Remove use of add_deletable_root, use GTY marker instead. - Include gtype-cp.h. Allow for filename changes. - - * Make-lang.in (cp/gt-decl.h): Generate using gengtype. - (cp/decl.o): Add cp/gt-decl.h dependency. - * config-lang.in (gtfiles): New. - * tree.h: Rename struct binding_level to struct cp_binding_level. - * decl.c: Rename struct binding_level to struct cp_binding_level. - Include cp/gt-decl.h. - (struct cp_binding_level): Use gengtype. - (make_binding_level): Use GGC on struct cp_binding_level. - (mark_binding_level): Use gt_ggc_m_cp_binding_level. - (cxx_init_decl_processing): Mark free_binding_level as - deletable. - - * decl.c (mark_cp_function_context): Update calling sequence. - - * decl.c (start_function): Don't free 'struct - cp_language_function'. - (pop_cp_function_context): Likewise. - (save_function_data): Allocate it using GC. - * semantics.c (genrtl_start_function): Don't free 'struct - cp_language_function'. - -2002-05-31 Matthew Woodcraft - - * lang-specs.h: Use cpp_debug_options. - -2002-05-28 Zack Weinberg - - * mangle.c, tree.c: Include real.h. - * Make-lang.in: Update dependency lists. - -2002-05-25 Neil Booth - - * lex.c: Don't include c-lex.h. - * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. - -2002-05-23 Neil Booth - - * spew.c (yyungetc, snarf_block): Remove indent_level handling. - -2002-05-22 Richard Henderson - - * decl.c (obscure_complex_init): Check for VAR_DECL - before using DECL_THREAD_LOCAL. - -2002-05-22 Richard Henderson - - * decl.c (check_tag_decl): Handle RID_THREAD. - (obscure_complex_init): Reject run-time init of tls. - (grokvardecl, grokdeclarator): Handle RID_THREAD. - * lex.c (reswords): Add __thread. - (rid_to_yy): Map RID_THREAD to SCSPEC. - -2002-05-22 Neil Booth - - * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. - * cp-tree.h (cxx_post_options): Kill. - * cp-lex.c (cxx_post_options): Kill. - -2002-05-21 Richard Henderson - - * lex.c (rid_to_yy): Add RID_THREAD. - -2002-05-21 Alexandre Oliva - - * init.c (build_vec_init): Test for trivial copy-assignment when - copy-assigning arrays. - -2002-05-20 Andreas Jaeger - - * init.c (build_default_init): Remove unused variable. - -2002-05-20 Alexandre Oliva - - * call.c (any_strictly_viable): New. - (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs. - -2002-05-19 Kriang Lerdsuwanakij - - * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. - -2002-05-19 Kriang Lerdsuwanakij - - PR c++/186, DR 259 - * pt.c (do_decl_instantiation): Don't complain explicit - instantiation after explicit specialization. - (do_type_instantiation): Likewise. - -2002-05-19 Alexandre Oliva - - * cp-tree.h (complete_type_or_diagnostic): Changed prototype, - renamed from... - (complete_type_or_else): ... this. Redefined as macro. - (cxx_incomplete_type_diagnostic): Declare. - (cxx_incomplete_type_error): Define as macro. - * init.c (build_delete): Warn about incomplete types other than - void, and use the built-in operator delete for them. - * typeck.c (complete_type_or_diagnostic): Renamed from - complete_type_or_else. Added warn_only argument, passed to... - * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print - warnings or errors depending on new warn_only argument. Renamed - from... - (cxx_incomplete_type_error): ... this. New implementation in - terms of cxx_incomplete_type_diagnostic. - -2002-05-18 Jason Merrill - - PR c++/6611 - * decl2.c (import_export_decl): If we clear - DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. - -2002-05-15 Kriang Lerdsuwanakij - - PR c++/6620 - * pt.c (verify_class_unification): Don't check if PARM is template - parameter dependent. Simplify. - (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template - parameter dependent expression. - -2002-05-14 Jason Merrill - - * rtti.c (get_tinfo_decl): Don't call comdat_linkage. - Do set DECL_COMDAT. - (synthesize_tinfo_var): Take the public decl. - (create_real_tinfo_var): Likewise. Check DECL_COMDAT. - (emit_tinfo_decl): Adjust. Call import_export_decl. - * decl2.c (import_export_decl): Simplify tinfo decl handling. - -2002-05-14 Alexandre Oliva - - * cp-tree.h (struct lang_type): Added non_zero_init. - (CLASSTYPE_NON_ZERO_INIT_P): New macro. - (zero_init_p, force_store_init_value, build_forced_zero_init): Declare. - * class.c (check_field_decls): Test non_zero_init. - * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for - zero-to-NULL conversions. - * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a - type that needs zero-initialization without zeros. - (check_initializer_decl): Compute zero-initializer for types - that require a non-trivial one. - * init.c (build_forced_zero_init): New function. - (build_default_init): Use it. - * tree.c (zero_init_p): New function. - * typeck2.c (force_store_init_value): New function. - (process_init_constructor): Create non-trivial zero-initializers - for array members and class fields. - -2002-05-14 Neil Booth - - * lang-specs.h: Remove redundant -lang-c++. - -2002-05-13 Jason Merrill - - * class.c (build_vtbl_ref_1): Use fixed_type_or_null. - (fixed_type_or_null): See through reference vars. - (build_base_path): Vtable contents are constant. - * typeck.c (get_member_function_from_ptrfunc): Likewise. - -2002-05-12 Jason Merrill - - * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created - structs are safe. - -2002-05-09 Neil Booth - - * cp-tree.h (flag_ansi): Remove. - * decl2.c (flag_ansi): Remove. - (cxx_decode_option): Set flag_iso and flag_undef. - -2002-05-09 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Reorganize. - Use subtraction rather than a bitmask to get the index. - * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node. - - * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. - -2002-05-07 Neil Booth - - * Make-lang.in (decl2.o): Update. - * cp-tree.h (warn_multichar): Remove. - * decl2.c: Include c-common.h. - (warn_multichar): Remove. - -2002-05-03 Jason Merrill - - * tree.c (build_cplus_array_type): Only const and volatile get - special handling. - - * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. - -2002-04-30 Mark Mitchell - - ABI change, returning simple classes from functions. - * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if - TYPE_HAS_TRIVIAL_INIT_REF is false or - TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true. - -2002-04-30 Jason Merrill - - PR debug/6436 - * decl.c (grokdeclarator): Don't override TYPE_NAME of an - anonymous class with a typedef if there are attributes. - -2002-04-29 Paul Eggert - - * parse.y (nomods_initdcl0): Replace $3 with $$. - -2002-04-29 Jakub Jelinek - - PR c++/6477 - * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is - non-NULL first. - -2002-04-29 Mark Mitchell - - PR c++/6492 - * pt.c (tsubst_friend_class): If the friend has an explicit scope, - enter that scope before name lookup. - - PR c++/6486 - * method.c (do_build_copy_constructor): Avoid building - cv-qualified reference types. - -2002-04-29 Nathan Sidwell - - PR c++/5719 - * decl.c (grok_op_properties): Assignment ops don't have to return - by value. operator% should. - -2002-04-28 Franz Sirl - - PR c/6343 - * decl.c (duplicate_decls): Call merge_weak. - -2002-04-26 Richard Henderson - - * parse.y (malloced_yyss, malloced_yyvs): New. - (yyoverflow): Re-add. Set them. - (free_parser_stacks): New. - -2002-04-26 Mark Mitchell - - PR c++/6497 - * method.c (do_build_assign_ref): Pass a derivation to - build_method_call when calling base class assignment operators. - -2002-04-26 Richard Henderson - - * parse.y (yyoverflow): Revert. - -2002-04-26 Richard Henderson - - PR c/3581 - * parse.y (string): Remove. Update all uses to use STRING - instead, and not call combine_strings. - * rtti.c (tinfo_name): Use fix_string_type. - * semantics.c (finish_asm_stmt): Don't call combine_strings. - * spew.c (yylexstring): New. - (read_token): Use it. - -2002-04-25 Richard Henderson - - PR c/2161 - * parse.y (yyoverflow): New. - -2002-04-25 Jason Merrill - - PR c++/5607 - * search.c (check_final_overrider): No longer static. - * class.c (update_vtable_entry_for_fn): Call it. - * cp-tree.h: Adjust. - -2002-04-25 Neil Booth - - * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. - * cp-tree.h (cxx_set_yydebug): Die. - * lex.c (YYDEBUG): Get from c-lex.h. - (cxx_set_yydebug): Remove. - * parse.y: Include c-lex.h. - (YYDEBUG): Get from c-lex.h. - -2002-04-24 Mark Mitchell - - PR c++/6438. - * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs - void. - -2002-04-24 Neil Booth - - * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, - LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): - Redefine. - * cp-tree.h (cp_attribute_table): Rename. - * decl.c (lang_attribute_table): Remove declaration. - (cxx_init_decl_processing): Don't set it. - * tree.c (cp_attribute_table): Rename. - -2002-04-24 Jason Merrill - - PR c++/6331 - * method.c (do_build_copy_constructor): Use cp_build_qualified_type. - * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals. - The pedwarn for array assignment is now unconditional. - * tree.c (build_cplus_array_type_1): Still process simple array types - normally in templates. - - PR c++/6395 - * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i - stuff for comdats. - -2002-04-23 Jakub Jelinek - - * parse.y (check_class_key): Allow KEY to be union/enum/struct/class - node with attributes. - -2002-2-23 David O'Brien - - * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add. - Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given. - -2002-04-23 Mark Mitchell - - PR c++/6256: - * pt.c (tsubst_friend_class): Handle templates with explicit - nested names. - - PR c++/6331: - * typeck.c (merge_types): Remember the cv-qualification of pointer - types when merging them. - -2002-04-20 Neil Booth - - * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, - LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. - * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, - cxx_mark_function_context): New. - * decl.c (push_cp_function_context, pop_cp_function_context, - mark_cp_function_context): Rename for consistency. - (cxx_init_decl_processing): Don't set old hooks. - -2002-04-19 Neil Booth - - * call.c (convert_type_from_ellipsis): Rename, update. - * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. - * cp-tree.h (convert_type_from_ellipsis): Rename. - * decl.c (cxx_init_decl_processing): Don't set hook. - -2002-04-18 Neil Booth - - * call.c (build_new_method_call): Update. - * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. - * cp-tree.h (cxx_incomplete_type_error): New. - * decl.c (grokdeclarator, grokparms): Update. - * decl2.c (check_classfn): Update. - * pt.c (tsubst): Update. - * typeck.c (complete_type_or_else, expr_sizeof, - decay_conversion): Update. - * typeck2.c (incomplete_type_error): Rename. - (add_exception_specifier): Update. - -2002-04-18 Jason Merrill - - PR c++/5658 - * search.c (setup_class_bindings): A class template qualifies as a - type binding. - -2002-04-17 Jakub Jelinek - - PR c++/6316 - * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop - before expanding. - -2002-04-16 Mark Mitchell - - * init.c (begin_init_stmts): Remove commented out code. - (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. - * semantics.c (begin_gobal_stmt_expr): Adjust call to - expand_start_stmt_expr. - -2002-04-15 Mark Mitchell - - * decl.c (register_dtor_fn): Pass the address of dso_handle, not - dso_handle itself, to __cxa_atexit. - -2002-04-15 Gabriel Dos Reis - - * error.c (cxx_print_error_function): Adjust call to macros. - -2002-04-14 Jakub Jelinek - - * class.c (layout_virtual_bases): Do all dsize computation on trees. - -2002-04-14 Jason Merrill - - * typeck.c (get_member_function_from_ptrfunc): Don't do - gratuitious division and multiplication on - ptrmemfunc_vbit_in_delta targets. - -2002-04-12 Mark Mitchell - - PR c++/5373. - * semantics.c (finish_expr_stmt): Remember the type of the - expression before any conversions are performed. - -2002-04-12 Mark Mitchell - - PR c++/5189. - * call.c (add_template_candidate_real): Do not treat member - templates as copy constructors. - -2002-04-12 Mark Mitchell - - * decl.c (duplicate_decls): Do not copy the RTL for a variable - declaration if the old variable had an incomplete type and the new - variable does not. - (complete_vars): Do not call layout_decl for completed variables. - -2002-04-12 Richard Sandiford - - * decl.c (duplicate_decls): Don't try to unify an implicit typedef - with an explicit one. - (follow_tag_typedef): New. - (lookup_tag): Use it to extract the tag of an explicit typedef. - (xref_tag): Likewise. - -2002-04-11 Andrew Haley - - * typeck.c (type_after_usual_arithmetic_conversions): - If two types have the same variant, return immediately. - When two floating-point operands are the same precision: - convert to float if one of the operands is float; - if neither operand is one of the standard types, return the type - of the first operand. - -2002-04-10 Nathan Sidwell - - PR c++/5507 - * decl.c (make_typename_type): Remove implicit typenameness. - -2002-04-09 Jason Merrill - - PR optimization/6189 - * semantics.c (genrtl_start_function): Don't free - DECL_SAVED_FUNCTION_DATA for inline functions. - - * init.c (build_member_call): For now, don't convert to - intermediate base if it would cause an error. - -2002-04-08 Paolo Carlini - - * parse.y (namespace_qualifier, maybe_identifier, - begin_explicit_instantiation, end_explicit_instantiation, - apparent_template_type, .finish_template_type, - do_id, maybe_init, defarg_again, component_decl_1): - Add ending ';', in accordance with POSIX. - -2002-04-06 Mark Mitchell - - PR c++/5571 - * class.c (layout_class_type): Remember incomplete static - variables. - (finish_struct_1): Call complete_vars, not - hack_incomplete_structures. - * cp-tree.h (hack_incomplete_structures): Rename to ... - (complete_vars): ... this. - (struct saved_scope): Remove incomplete. - (namespace_scope_incomplete): Remove. - * decl.c (struct binding_level): Remove incomplete. - (incomplete_vars): New variable. - (mark_binding_level): Don't mark incomplete. - (print_binding_level): Don't print it. - (mark_saved_scope): Don't mark incomplete. - (pushdecl): Use maybe_register_incopmlete_var. - (cxx_init_decl_processing): Register incomplete_vars for GC. - (start_decl_1): Clarify error message. - (hack_incomplete_vars): Remove. - (maybe_register_incomplete_var): New function. - (complete_vars): Likewise. - -2002-04-06 Jason Merrill - - PR c++/4934 - * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is - set before checking it. - - PR c++/525 - * init.c (build_member_call): Use build_scoped_ref. - (resolve_offset_ref): Likewise. - * call.c (build_scoped_method_call): Likewise. - * tree.c (maybe_dummy_object): Kludge around current_class_type being - wrong. - * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm. - * cp-tree.h: Adjust. - - * init.c (push_base_cleanups): Just use build_scoped_method_call. - - PR c++/6179 - * method.c (implicitly_declare_fn): Pass unqualified type to - synthesize_exception_spec. - -2002-04-04 Neil Booth - - * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. - * cvt.c: Update comment. - * init.c (expand_cleanup_for_base): Update. - * semantics.c (finish_parenthesized_expr): Update. - * typeck.c (cp_truthvalue_conversion): Update. - -2002-04-04 Jason Merrill - - * semantics.c (finish_eh_cleanup): New fn. - * cp-tree.h: Add prototype. - * init.c (perform_member_init, expand_cleanup_for_base): Use - finish_eh_cleanup. - * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove. - * cp-tree.h: Remove references. - * decl.c (begin_constructor_body, end_constructor_body): Likewise. - * dump.c (cp_dump_tree): Likewise. - * pt.c (tsubst_expr): Likewise. - * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove. - (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT. - * tree.c (cp_statement_code_p): Likewise. - - * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup. - - PR c++/5636 - * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on - cleanup for nrv. - - PR c++/5104 - * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception - specifiers. - [METHOD_TYPE]: Use same code as FUNCTION_TYPE. - -2002-04-03 Richard Henderson - - * cp-lang.c (cxx_warn_unused_global_decl): New. - (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. - -2002-04-03 Neil Booth - - * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine. - * tree.c (init_tree): Don't set hook. - -2002-04-03 Roger Sayle - - PR c++/5998: - * decl.c (duplicate_decls): Don't mess with assembler names when - redeclaring builtin functions as static. - -2002-04-01 Neil Booth - - * call.c (build_addr_func): Update. - * class.c (resolve_address_of_overloaded_function): Update. - * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. - * cp-tree.h (cxx_mark_addressable): New. - * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. - * decl2.c (build_cleanup): Update. - * except.c (build_throw): Update. - * init.c (resolve_offset_ref): Update. - * pt.c (convert_nontype_argument): Update. - * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. - * typeck.c (decay_conversion, build_array_ref, build_unary_op, - unary_complex_lvalue): Update. - (mark_addressable): Rename. - -2002-04-01 Roger Sayle - - PR c++/5998: - * decl.c (duplicate_decls): Overwrite the RTL when (and only - when) overwriting a built-in function. Don't use COPY_DECL_RTL, - but follow the SET_DECL_RTL idiom used elsewhere in the function. - -2002-04-01 Neil Booth - - * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, - LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. - * decl.c (grokdeclarator): Update. - * mangle.c (write_integer_cst): Update. - * typeck.c (build_binary_op): Update. - -2002-03-31 Neil Booth - - * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. - * lex.c (cxx_init): Don't set hook. - -2002-03-31 Neil Booth - - * Make-lang.in (error.o): Update. - * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. - * cp-tree.h (struct diagnostic_context): Predeclare. - (cxx_print_error_function): New. - * error.c: Include langhooks-def.h. - (lang_print_error_function): Rename. Update. - (init_error): Don't set hook. - -2002-03-29 Neil Booth - - * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): - Redefine. - * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. - * decl.c (finish_enum): Similarly. - * error.c (dump_type): Similarly. - * lex.c (cxx_init): Similarly. - * mangle.c (write_builtin_type): Similarly. - * typeck.c (comptypes): Similarly. - -2002-03-28 Roger Sayle - - PR c++/5998: - * decl.c (cxx_init_decl_processing): Re-enable built-in functions - in the g++ front-end. - (duplicate_decl): Allow redefinition of anticipated built-ins. - Fix inlining problem by over-writing the old DECL_RTL. - (lookup_namespace_name): Fail to find an identifier in the - specified namespace if its still anticipated. - (builtin_function_1): New function split out from builtin_function - to create a builtin in the current namespace with given context. - (builtin_function): Call builtin_function_1 to define the - appropriate builtins in both the std and global namespaces. - (select_decl): Don't test for anticipated decls here. - (unqualified_namespace_lookup): Instead ignore them whilst - searching through scopes and namespaces. - * decl2.c (do_nonmember_using_decl): If a using declaration - specifies an anticipated built-in function, mark it as no longer - anticipated in that scope. - (ambiguous_decl): Avoid resolving to an anticipated decl. - * lex.c (do_scoped_id): Fail to find an identifier in the global - namespace if its still anticipated. - -2002-03-29 Neil Booth - - * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine. - * cp-tree.h (cp_make_lang_type): Rename. - * lex.c (cp_make_lang_type): Rename. - (make_aggr_type): Update. - * tree.c (init_tree): Don't set make_lang_type_fn. - -2002-03-29 Jakub Jelinek - - PR c++/6073 - * class.c (finish_struct_1): Update static field's DECL_MODE even - if its type is a variant of t. - -2002-03-27 Neil Booth - - * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. - * cp-tree.h (cxx_insert_default_attributes): New. - * decl.c (insert_default_attributes): Rename. - -2002-03-27 Mark Mitchell - - PR c++/4884 - * call.c (build_op_delete_call): Allow for the fact the placement - may be a COMPOUND_EXPR. - -2002-03-27 Neil Booth - - * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. - * cp-tree.h (init_cplus_expand): Remove. - (cxx_expand_expr): New. - * expr.c (cplus_expand_expr): Rename cxx_expand_expr, - fix prototype. - (init_cplus_expand): Remove. - * lex.c (cxx_init): Don't call init_cplus_expand. - -2002-03-26 Mark Mitchell - - PR c++/4884. - * init.c (build_new_1): Allow for the fact the result of - build_function_call may be a COMPOUND_EXPR. - -2002-03-26 Nathan Sidwell - - PR c++/5682 - * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better. - (dfs_skip_nonprimary_vbases_unmarkedp): Remove. - (dfs_skip_nonprimary_vbases_markedp): Remove. - * search.c (get_shared_vbase_if_not_primary): Remove. - (dfs_skip_nonprimary_vbases_unmarkedp): Remove. - (dfs_skip_nonprimary_vbases_markedp): Remove. - (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. - (dfs_marked_real_bases_queue_p): Likewise. - -2002-03-26 Neil Booth - - * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. - * cp-tree.h (cxx_mark_tree): New. - * decl.c (lang_mark_tree): Rename cxx_mark_tree. - -2002-03-25 Neil Booth - - * cp-tree.h (cxx_maybe_build_cleanup): New. - * decl.c (destroy_local_var, hack_incomplete_structures): Update. - (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. - * tree.c (build_target_expr): Update. - * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine. - -2002-03-24 Neil Booth - - * decl2.c (cxx_decode_option): Handle -E. - * lang-specs.h (default_compilers): Preprocess with cc1plus. - * lex.c (cxx_init): Exit quickly if c_common_init returns NULL. - -2002-03-23 Jakub Jelinek - - PR c++/6037 - * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. - -2002-03-23 Gabriel Dos Reis - - * error.c (dump_type): Be careful about implicit typenames. - -2002-03-21 Gabriel Dos Reis - - PR C++/3656 - * semantics.c (finish_base_specifier): Handle erronous base - classes. - -2002-03-22 Zack Weinberg - - * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test - REAL_IS_NOT_DOUBLE. - -2002-03-22 Jeff Knaggs - - * typeck.c (get_member_function_from_ptrfunc): Scale idx down to - an index into the vtable_entry array regardless of - TARGET_PTRMEMFUNC_VBIT_LOCATION. - -2002-03-21 Aldy Hernandez - - * tree.c (cp_cannot_inline_tree_fn): Same. - -2002-03-21 Neil Booth - - * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, - insert_block, getdecls, global_bindings_p): New. - -2002-03-20 Nathan Sidwell - - PR c++/4361 - * mangle.c (struct globals) Add internal_mangling_p member. - (write_template_param): Do internal mangling, if needed. - (mangle_conv_op_name_for_type): Request internal mangling. - -2002-03-20 Jason Merrill - - PR c++/2136 - * init.c (build_delete): Check access for a member op delete here. - * decl2.c (delete_sanity): Not here. - -2002-03-19 Jason Merrill - - PR c++/5118 - * class.c (get_vfield_name): Use the constructor_name. - -2002-03-20 Neil Booth - - * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. - * cp-tree.h (lang_printable_name): Rename. - * error.c (lang_decl_name): Use new hook. - * lex.c (cxx_init): Remove old hook. - * pt.c (tsubst_decl): Use new hook. - * tree.c (lang_printable_name): Rename. - -2002-03-18 Eric Botcazou - - PR c++/3882 - * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling... - (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer - only after recording the declaration. - -2002-03-18 Jason Merrill - - PR c++/2039 - * init.c (resolve_offset_ref): Hand off to build_component_ref. - - PR c++/4222, c++/5995 - * call.c (build_over_call): Fix empty class logic. - - PR c++/3870 - * cp-tree.h (struct saved_scope): Add last_parms field. - * decl.c (maybe_push_to_top_level): Save last_function_parms. - (pop_from_top_level): Restore it. - - PR c++/4377 - * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip - NON_LVALUE_EXPRs. - - PR c++/4003 - * pt.c (tsubst_friend_function): Use decl_namespace_context. - - PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch. - * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a - type with a nontrivial destructor. - -2002-03-17 Jason Merrill - - PR c++/4460 - * class.c (build_base_path): Virtual base layout is fixed in - in-charge [cd]tors. - -2002-03-17 Neil Booth - - * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. - * parse.y (yyparse): Remove macro. - -2002-03-17 Jason Merrill - - PR c++/5757 - * init.c (build_new_1): Pass the right pointer to op delete. - -2002-03-16 Nathan Sidwell - - PR c++/4361 - * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated - conversion operators go. - (struct lang_decl_flags): Add template_conv_p and unused - bitfields. - (DECL_TEMPLATE_CONV_FN_P): New macro. - * call.c (build_user_type_conversion_1): Don't check second type - conversion of overload set first. - * class.c (add_method): Make sure templated conversion operators - all end up on slot 2. - * lex.c (do_identifier): A conversion operator token might be - satisfied by a templated conversion operator. - * pt.c (check_explicit_specialization): Use - CLASSTYPE_FIRST_CONVERSION_SLOT. - (template_parm_this_level_p): New function. - (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P. - * search.c (lookup_fnfields_1): Template conversions will be on - the first slot. - * typeck.c (build_component_ref): Preserve the type of an - conversion operator name on the overload type. - (build_x_function_call): Retrieve the conversion operator name. - -2002-03-15 Richard Henderson - - * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. - -2002-03-15 Mark Mitchell - - * cp-tree.h (CLEANUP_DECL): Remove. - (CLEANUP_EXPR): Likewise. - * decl.c (destroy_local_var): Simplify. - (maybe_build_cleanup): Tidy. - * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT. - * semantics.c (cp_expand_stmt): Likewise. - * cp/tree.c (cp_statement_code_p): Likewise. - -2002-03-15 Jason Merrill - - PR c++/5857 - * decl.c (duplicate_decls): Use merge_types instead of common_type. - * typeck.c (common_type): Just hand off to - type_after_usual_arithmetic_conversions and - composite_pointer_type. - (merge_types): New fn. - (commonparms): Use it instead of common_type. - (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE. - (composite_pointer_type): Also handle attributes. - * cp-tree.h: Declare merge_types. - - * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT - variables. - * decl2.c (maybe_make_one_only): Also mark the decl as needed. - -2002-03-14 Richard Henderson - - * decl.c: Include c-pragma.h. - (start_decl, start_function): Invoke maybe_apply_pragma_weak. - * Make-lang.in: Update dependencies. - -2002-03-14 Jakub Jelinek - - PR c++/5908 - * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too. - * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING. - -2002-03-12 Richard Sandiford - - * mangle.c (write_builtin_type): Handle 128-bit integers even if - they are not a standard integer type. - -2002-03-12 Richard Sandiford - - * cp-tree.h (init_init_processing): Remove declaration. - * init.c (BI_header_type, init_init_processing): Remove old ABI stuff. - * decl.c (cxx_init_decl_processing): Don't call init_init_processing. - -2002-03-12 Kaveh R. Ghazi - - * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): - Define. - * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not - tree_code_length. - * lex.c (cplus_tree_code_type, cplus_tree_code_length, - cplus_tree_code_name): Delete. - (cxx_init): Don't call add_c_tree_codes, instead set - lang_unsafe_for_reeval. Don't try to copy into the various - tree_code arrays. - -2002-03-12 Nathan Sidwell - - PR c++/5659 - * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here. - * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for - definitions. - -2002-03-11 Nathan Sidwell - - Revert 2001-03-26 Nathan Sidwell , - DR209 is now not a defect. - * cp-tree.h (skip_type_access_control): Remove. - * decl.c (grokdeclarator): Do type access control for friend - declarations. - * semantics.c (decl_type_access_control): Don't reset - current_type_lookups. - (save_type_access_control): Always save the lookups. - (skip_type_access_control): Remove. - (finish_class_definition): Don't change type_lookups. - -2002-03-11 Nathan Sidwell - - Revert 2000-12-01 Nathan Sidwell , - It is incorrect. - * typeck.c (build_static_cast): Compare non-qualified types - with pointer to member conversions. - -2002-03-11 Dan Nicolaescu - Daniel Berlin - - * cp-lang.c (ok_to_generate_alias_set_for_type): New function. - (cxx_get_alias_set): Use it. - -2002-03-10 Kaveh R. Ghazi - - * cp-tree.h (stabilize_expr): Prototype. - -2002-03-08 Craig Rodrigues - - * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of - conditional return void. - -2002-03-08 Neil Booth - - * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine. - * cp-tree.h (cxx_unsave): New. - * tree.c (cp_unsave): Rename cxx_unsave, update prototype. - (init_tree): Update. - -2002-03-03 Kaveh R. Ghazi - - * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of - explicit sizeof/sizeof. - * decl2.c (cxx_decode_option): Likewise. - * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise. - -2002-03-02 Nathan Sidwell - - PR c++/775 - * decl.c (lookup_tag): Only reject enum/class mismatch, not - class/union mismatch. - * parse.y (check_class_key): New function. - (structsp): Call it. - -2002-03-01 Michael Matz - - * typeck.c (cp_pointer_int_sum): Complete inner type which is - used later by size_in_bytes(). - -2002-03-01 Phil Edwards - - * cp-tree.h: Require __GNUC__ to be #defined. - (build_init): Add missing prototype. - -2002-03-01 Jason Merrill - - * except.c: Don't include decl.h or obstack.h. Do include - tree-inline.h. - (build_throw): Destroy temporaries from the thrown - expression before calling __cxa_throw. Construct a thrown - temporary directly into the exception object. - (stabilize_throw_expr): New function. - (wrap_cleanups_r): New function. - * tree.c (stabilize_expr): New function. - * init.c (build_init): New function. - * Make-lang.in (cp/except.o): Adjust .h deps. - -2002-02-28 Jason Merrill - - * search.c (lookup_base_r): Don't clear is_non_public just because - we found a friendly scope. - - * decl.c (finish_function): Only warn about missing return - statement with -Wreturn-type. - -2002-02-28 Neil Booth - - * class.c (build_clone): Update. - * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. - * cp-tree.h (cxx_dup_lang_specific_decl): New. - * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl. - (copy_decl): Update. - * method.c (make_thunk): Update. - -2002-02-27 Zack Weinberg - - * decl2.c: Delete traditional-mode-related code copied from - the C front end but not used, or used only to permit the - compiler to link. - -2002-02-24 Craig Rodrigues - - PR c++/4093 - * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition - to void. - -2002-02-22 Jakub Jelinek - - PR other/5746 - * semantics.c (finish_switch_cond): Don't call get_unwidened - if error_mark_node. - -2002-02-22 Nathan Sidwell - - PR c++/2645, DR 295 - * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, - tf_keep_type_decl. - (make_typename_type): Use tsubst_flags_t. - * decl.c (make_typename_type): Adjust. Return non-artificial - TYPE_DECLs, if required. - (grokdeclarator): Simplify CVR qualification handling. Allow bad - qualifiers on typedef types. - * decl2.c (handle_class_head): Adjust make_typename_type call. - * parse.y (nested_name_specifier): Likewise. - (typename_sub0): Likewise. - (typename_sub1): Likewise. - * pt.c (convert_template_argument): Adjust make_typename_type - return value. - (tsubst): Adjust cp_build_qualified_type_real calls. - (check_cv_quals_for_unify): Cope with allowing bad qualifications - on template type parms. - (instantiate_decl): Recheck substitutions to give warnings on bad - qualifications. - * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. - -2002-02-21 Aldy Hernandez - - * 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. - -2002-02-20 Jakub Jelinek - - * typeck.c (cp_pointer_int_sum): Renamed from - pointer_int_sum, call pointer_int_sum. - -2002-02-20 Jakub Jelinek - - * decl.c (duplicate_decls): Return 0 if issued error about - redeclaration. - -2002-02-19 Jason Merrill - - ABI change: Mangle `void (A::*)() const' as - M1AKFvvE, not MK1AFvvE. - * mangle.c (write_function_type): Write cv-quals for member - function type here. - (write_pointer_to_member_type): Not here. - -2002-02-18 Jason Merrill - - * pt.c (do_type_instantiation): Don't pedwarn if in_system_header. - (do_decl_instantiation): Likewise. - -2002-02-17 Craig Rodrigues - - PR c++/5685 - * decl.c (duplicate_decls): Make warning unconditional - if duplicate default argument declarations are present. - -2002-02-17 Jakub Jelinek - - * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit - shortening. - -2002-02-15 Nathan Sidwell - - * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs, - remove incorrect comment. Move #if 0'd code to common path. Use - IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication. - -2002-02-13 Jason Merrill - - * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. - (finish_function): Don't warn if current_function_returns_null. - - * typeck2.c (digest_init): Do handle values of vector type. - - * typeck2.c (digest_init, process_init_constructor): Treat vectors - like arrays. - -2002-02-11 Jason Merrill - - * parse.y (reserved_declspecs): Don't handle attributes. - (reserved_typespecquals): Handle them here. - * Make-lang.in (parse.c): Adjust expected conflicts. - -2002-02-08 Jakub Jelinek - - * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr - instead of compstmt. - (compstmt_or_stmtexpr): Renamed from compstmt. - (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. - -2002-02-07 Nathan Sidwell - - Rename instantiate_type_flags to tsubst_flags_t & expand use. - * cp-tree.h (instantiate_type_flags): Rename to ... - (tsubst_flags_t): ... here. Rename itf_complain to tf_error, - add tf_warning flag. - (instantiate_type): Adjust prototype. - (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, - do_type_instantiation, cp_build_qualified_type_real): Likewise. - cp_build_qualified_type: Adjust. - * class.c (instantiate_type): Adjust parameter. Rename itf_* to - tf_*. - * call.c (standard_conversion): Rename itf_* to tf_*. - (reference_binding): Likewise. - (convert_like_real): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_reference): Likewise. - * decl.c (lookup_namespace_name): Use tf_* flags. - (make_typename_type): Likewise. - (grokdeclarator): Likewise. - * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. - (coerce_template_template_parms, convert_template_argument, - coerce_template_parms, maybe_get_template_decl_from_type_decl, - lookup_template_class, tsubst_friend_function, tsubst_friend_class, - instantiate_class_template, tsubst_template_arg_vector, - tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, - tsubst_decl, tsubst_arg_types, tsubst_function_type, - tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, - instantiate_template, fn_type_unification, - resolve_overloaded_unification, verify_class_unification, - unify, get_bindings_real, do_type_instantiation, - regenerate_decl_from_template, instantiate_decl, - tsubst_initializer_list, tsubst_enum, - get_mostly_instantiated_function_type, - invalid_nontype_parm_type_p): Likewise. - * tree.c (cp_build_qualified_type_real): Likewise. - * typeck.c (build_binary_op): Rename itf_* to tf_*. - (build_ptrmemfunc): Likewise. - (convert_for_assignment): Likewise. - -2002-02-07 Nathan Sidwell - - PR c++/109 - * decl.c (grokdeclarator): Allow friend declarations from - dependent types. - * decl2.c (handle_class_head): Don't push into template parm contexts. - * pt.c (push_template_decl_real): Template parm contexts are never - being defined. - -2002-02-05 Alexandre Oliva - - * class.c: Include target.h. - (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, - BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS - bit-field layout. - * Make-lang.in: Adjust deps. - -2002-02-05 Jason Merrill - - * error.c (dump_type): Be more helpful about VECTOR_TYPE. - -2002-02-04 Jakub Jelinek - - * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. - (finish_switch_cond): Set SWITCH_TYPE. - -2002-02-04 Richard Henderson - - * method.c (use_thunk): Always initialize the block tree. Reindent. - * semantics.c (expand_body): Emit thunks after function, not before. - -2002-02-04 Jason Merrill - - * decl.c (start_function): Call cplus_decl_attributes immediately - after grokdeclarator. - - * decl.c (start_function): Combine DECL_RESULT handling code. - -2002-02-03 Jason Merrill - - * xref.c: Remove. - * Make-lang.in (CXX_OBJS): Remove cp/xref.o - (cp/xref.o): Remove dependencies. - * class.c (finish_struct_1, check_methods): Don't call xref fns. - (finish_struct_1): Likewise. - * friend.c (make_friend_class): Likewise. - * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. - * spew.c (read_process_identifier): Likewise. - -2002-02-01 Jason Merrill - - PR c++/4872 - * decl.c (finish_function): Warn about a non-void function with - no return statement and no abnormal exit. - * cp-tree.h (struct cp_language_function): Add returns_abnormally. - (current_function_returns_abnormally): New macro. - * call.c (build_call): Set it. - - * typeck.c (build_component_ref): Always complain about offsetof - constructs on non-PODs. Only make it an error for members of - virtual bases. - - * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. - (dump_function_decl): Always dump parms. - - * decl2.c (finish_static_data_member_decl): Complain about a local - class with a static data member. - - PR c++/4286 - * search.c (lookup_field_1): Don't xref a static data member - just because we looked it up. - -2002-01-31 Jason Merrill - - * Make-lang.in (parse.c): Handle .output file. - - PR c++/3395 - * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, - not TREE_TYPE. - * semantics.c (finish_class_definition): Adjust. - - Allow attributes in parms and casts. - * parse.y (named_parm): Don't strip attrs. - (declmods): Remove 'attributes' production. - (nonempty_cv_qualifiers): Accept attributes. - (ATTRIBUTE): Give precedence. - * decl.c (groktypename): Handle attributes. - (grokparms): Likewise. - -2002-01-29 Jakub Jelinek - - * decl2.c (cxx_decode_option): Pass 0 as last argument to - cpp_handle_option. - * lang-specs.h: Use cpp_unique_options instead of cpp_options - when used together with cc1_options. - -2002-01-29 Nathan Sidwell - - PR c++/5132 - * typeck2.c (digest_init): Make sure non-array core type is - instantiated. - * decl2.c (reparse_absdcl_as_casts): Just store the type in the - constructor, rather than build a new one. - (build_expr_from_tree, CONSTRUCTOR case): Be careful with the - PURPOSE of constructor elts. - -2002-01-23 Zack Weinberg - - * Make-lang.in (parse.c): Adjust expected number of - shift-reduce conflicts. - (decl.o): Depend on diagnostic.h. - * decl.c: Include diagnostic.h. - (grokdeclarator): Check for null pointer. - (finish_function): Don't abort when - current_binding_level->parm_flag != 1, if errors have - occurred; throw away the statement tree and extra binding - levels, and continue. - * lex.c (note_list_got_semicolon): Check for null pointer. - * method.c (hack_identifier): Just return error_mark_node if - value is error_mark_node. - * parse.y (primary: TYPEID(type_id)): No need to use - TYPE_MAIN_VARIANT here. - (handler_seq): Accept an empty list of catch clauses and - generate a fake handler block to avoid later crashes. - (ansi_raise_identifier): Accept the error token too. - * semantics.c (begin_class_definition, - finish_class_definition): Check for error_mark_node. - -2002-01-23 Zack Weinberg - - * typeck2.c (friendly_abort): Delete definition. - * cp-tree.h (friendly_abort): Don't prototype. - (my_friendly_assert): Use fancy_abort. - -2002-01-23 Craig Rodrigues - - * cp-tree.h (my_friendly_abort): Remove. - -2002-01-23 Jakub Jelinek - - * spew.c (pending_inlines, pending_inlines_tail, - processing_these_inlines): Make static. - (mark_pending_inlines): Remove static. - (begin_parsing_inclass_inline): If in function, save pi - for GC to cp_function_chain->unparsed_inlines instead. - (process_next_inline): Likewise. - * cp-tree.h (struct cp_language_function): Add unparsed_inlines. - (mark_pending_inlines): Add prototype. - * decl.c (spew_debug): Remove unused extern. - (mark_lang_function): Call mark_pending_inlines. - -2002-01-23 Craig Rodrigues - - * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, - init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, - semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: - Change my_fancy_abort() to abort(). - -2002-01-23 Jason Merrill - - PR c++/5453 - * class.c (fixed_type_or_null): Fix thinko. - - PR c++/3331 - * init.c (resolve_offset_ref): Use build_indirect_ref. - - * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. - -2002-01-22 Jason Merrill - - * parse.y (function_body): Suppress the block for the outermost - curly braces. - * decl.c (pushdecl): Don't try to skip it. - (begin_function_body): Keep the block we create, not the next one. - * init.c (emit_base_init): Don't mess with keep_next_level. - - * class.c (build_base_path): Tweak formatting. - -2002-01-19 Nathan Sidwell - - Fix regression introduced with patch for c++/775 - * parse.y (class_head_defn): Check for template specializations - with a different class-key. - -2002-01-17 Jason Merrill - - * decl.c (begin_constructor_body, begin_destructor_body): New fns. - (begin_function_body): Call them and keep_next_level. - * init.c (emit_base_init): Call keep_next_level. - * semantics.c (setup_vtbl_ptr): Lose. - * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. - (vtbls_set_up_p): Lose. - * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. - * method.c (do_build_copy_constructor): Likewise. - (synthesize_method): Call finish_mem_initializers. - * parse.y (nodecls): Likewise. - - * error.c (dump_type_suffix): Print the exception specs before - recursing. - (dump_function_decl): Here, too. - - * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. - -2002-01-10 Ira Ruben - - PR c++/907 - * decl.c (start_method): Handle attrlist. - -2002-01-10 Jakub Jelinek - - * decl2.c (max_tinst_depth): Increase default limit to 500. - -2002-01-10 Graham Stott - - * spew.c (YYCHAR): Uppercase macro parameter and add - parenthesis. - (YYCODE): Likewise. - (NAME): Uppercase macro parameter. - -2002-01-09 Graham Stott - - * decl.h (grokdeclarator): Wrap long line. - - * semantics.c (FINISH_COND): Uppercase macro paramaters and - add parenthesis. - -2002-01-08 Graham Stott - - * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis. - (PALLOC): Uppercase macro parameter and whitespace. - (SALLOC): Uppercase macro parameter. - (SFREE): Uppercase macros parameter, add parenthese and - whitespace. - (STREQL): Uppercase macro parameter and whitespace. - (STRNEQ): Likewise. - (STRLSS): Likewise. - (STRLEQ): Likewise. - (STRGTR): Likewise. - (STRGEQ): Likewise. - - * call.c (convert_like): Add parenthesis and wrap. - (convert_like_with_context): Likewise. - (ICS_RANK): Whitespace. - (NEED_TEMPORARY_P): Remove parenthesis. - - * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and - whitespace. - (VTT_MARKED_BINFO_P): Likewise. - - * decl.c (BINDING_LEVEL): Add parenthesis. - (DEF_OPERATOR): Likewise. - - * mangle.c (MANGLE_TRACE): Add parenthesis. - (MANGLE_TRACE_TREE): Likewise. - (write_signed_number): Likewise. - (write_unsigned_number): Likewise. - - * pt.c (ccat): Uppercase macro parameter. - (cat): Likewise - - * search.c (SET_BINFO_ACCESS): Add parenthesis. - -2002-01-07 Jason Merrill - - * decl2.c (coerce_new_type): Downgrade error for size_t mismatch - to pedwarn. - - PR c++/3536 - * method.c (make_thunk): If !flag_weak, give the thunk the - function's linkage. - (use_thunk): Here, too. - -2002-01-07 Graham Stott - - * error.c: Update copyright date. - (print_scope_operator): Add parenthesis. - (print_left_paren): Likewise. - (print_right_paren): Likewise. - (print_left_bracket): Likewise. - (print_right_bracket): Likewise. - (print_template_argument_list_start): Likewise. - (print_template_argument_list_end): Likewise. - (print_non_consecutive_character): Likewise. - (print_tree_identifier): Likewise. - (print_identifier): Likewise. - (NEXT_CODE): Uppercase macro parameter. - (ident_fndecl): Delete unused. - (GLOBAL_THING): Likewise. - -2002-01-06 Graham Stott - - * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. - (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise. - (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise. - (RECORD_OR_UNION_TYPE_CHECK): Likewise. - (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise. - (C_IS_RESERVED_WORD): Uppercase macro parameter. - (C_RID_YYCODE) Likewise. - (ptrmem_cst): Use rtx. - (LOCAL_BINDING_P): Add whitespace. - (INHERITED_VALUE_BINDING_P): Likewise. - (BINDING_SCOPE): Wrap long line. - (BINDING_HAS_LEVEL_P): Remove parenthesis. - (BINDING_VALUE): Wrap long line. - (BINDING_TYPE): Whitespace. - (IDENTIFIER_GLOBAL_VALUE): Add parenthesis. - (SET_IDENTIFIER_GLOBAL_VALUE): Likewise. - (IDENTIFIER_NAMESPACE_VALUE): Likewise. - (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise. - (same_type_p): Uppercase macro parameters. - (same_type_ignoring_top_level_qualifiers_p): Likewise. - (OVL_FUNCTION): Wrap long line. - (OVL_CHAIN): Whitespace. - (OVL_CURRENT): Add parenthesis and whitespace. - (OVL_NEXT): Whitespace. - (OVL_USED): Likewise. - (IDENTIFIER_TYPE_VALUE): Likewise. - (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis. - (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace. - (LANG_ID_FIELD): Whitespace. - (SET_LANG_ID(NODE,VALUE,NAME): Likewise. - (IDENTIFIER_LABEL_VALUE): Whitespace and wrap. - (SET_IDENTIFIER_LABEL_VALUE): Whitespace. - (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap. - (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace. - (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap. - (SET_IDENTIFIER_ERROR_LOCUS); Whitespace. - (IDENTIFIER_VIRTUAL_P): Likewise. - (IDENTIFIER_OPNAME_P): Likewise. - (IDENTIFIER_TYPENAME_P): Remove parenthesis. - (C_TYPE_FIELDS_READONLY): Uppercase macro parameters. - (C_SET_EXP_ORIGINAL_CODE): Likewise. - (TYPE_ASSEMBLER_NAME_STRING): Wrap long line. - (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. - (IS_AGGR_TYPE): Uppercase macro parameter. - (CLASS_TYPE_P): Likewise. - (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis. - (IS_AGGR_TYPE_2): Whitespace. - (TAGGED_TYPE_P): Uppercase macro parameter. - (TYPE_BUILT_IN): Whitespace. - (TYPE_FOR_JAVA): Likewise. - (FUNCTION_ARG_CHAIN): Remove parenthesis. - (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis. - (FUNCTION_FIRST_USER_PARAM): Likewise. - (PROMOTES_TO_AGGR_TYPE): Whitespace. - (DERIVED_FROM_P): Add parenthesis and wrap. - (UNIQUELY_DERIVED_FROM_P): Likewise. - (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise. - (PUBLICLY_UNIQUELY_DERIVED_P): Likewise. - (CLASSTYPE_USE_TEMPLATE): Whitespace. - (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis. - (TYPE_GETS_DELETE): Add parenthesis. - (TYPE_HAS_CONVERSION): Add parenthesis and wrap. - (TYPE_HAS_ASSIGN_REF): Likewise, - (TYPE_HAS_CONST_ASSIGN_REF): Likewise. - (TYPE_HAS_INIT_REF): Likewise. - (TYPE_HAS_CONST_INIT_REF): Likewise. - (TYPE_BEING_DEFINED): Likewise. - (TYPE_LANG_SPECIFIC): Likewise. - (CLASSTYPE_RTTI): Likewise. - (TYPE_OVERLOADS_CALL_EXPR): Likewise. - (TYPE_OVERLOADS_ARRAY_REF): Likewise. - (TYPE_OVERLOADS_ARROW): Likewise. - (TYPE_USES_MULTIPLE_INHERITANCE): Likewise. - (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis. - (CLASSTYPE_METHOD_VEC): Likewise. - (CLASSTYPE_MARKED_N): Likewise. - (CLASSTYPE_MARKED): Likewise. - (CLASSTYPE_MARKED2): Likewise. - (CLASSTYPE_MARKED3): Likewise. - (CLASSTYPE_MARKED4): Likewise. - (CLASSTYPE_MARKED5): Likewise. - (CLASSTYPE_MARKED6): Likewise. - (SET_CLASSTYPE_MARKED): Whitespace. - (CLEAR_CLASSTYPE_MARKED): Likewise. - (SET_CLASSTYPE_MARKED2): Likewise. - (CLEAR_CLASSTYPE_MARKED2): Likewise. - (SET_CLASSTYPE_MARKED3): Likewise. - (CLEAR_CLASSTYPE_MARKED3): Likewise. - (SET_CLASSTYPE_MARKED4): Likewise. - (CLEAR_CLASSTYPE_MARKED4): Likewise. - (SET_CLASSTYPE_MARKED5): Likewise. - (CLEAR_CLASSTYPE_MARKED5): Likewise. - (SET_CLASSTYPE_MARKED6): Likewise. - (CLEAR_CLASSTYPE_MARKED6): Likewise. - (CLASSTYPE_TAGS): Likewise. - (CLASSTYPE_VSIZE): Likewise. - (CLASSTYPE_VBASECLASSES): Likewise. - (CANONICAL_BINFO): Add parenthesis. - (CLASSTYPE_SIZE(NODE): Likewise. - (CLASSTYPE_SIZE_UNIT): Likewise. - (CLASSTYPE_ALIGN(NODE): Likewise. - (CLASSTYPE_USER_ALIGN): Likewise. - (TYPE_JAVA_INTERFACE): Likewise. - (CLASSTYPE_PURE_VIRTUALS): Likewise. - (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap. - (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. - (CLASSTYPE_HAS_MUTABLE): Likewise. - (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise. - (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap. - (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise. - (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise. - (CLASSTYPE_INTERFACE_ONLY): Likewise. - (CLASSTYPE_INTERFACE_KNOWN): Likewise. - (CLASSTYPE_INTERFACE_UNKNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. - (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap. - (BINFO_UNSHARED_MARKED): Whitespace. - (BINFO_MARKED): Whitespace and wrap. - (SET_BINFO_MARKED): Likewise. - (CLEAR_BINFO_MARKED): Likewise. - (BINFO_VTABLE_PATH_MARKED): Likewise. - (SET_BINFO_VTABLE_PATH_MARKED): Likewise. - (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise. - (BINFO_SUBVTT_INDEX): Remove parenthesis. - (BINFO_VPTR_INDEX): Likewise. - (BINFO_PRIMARY_BASE_OF): Likewise, - (CLASSTYPE_VFIELDS): Whitespace. - (VF_DERIVED_VALUE): Wrap long line. - (NAMESPACE_LEVEL): Whitespace. - (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis. - (DEFARG_POINTER): Whitespace. - (DECL_NEEDED_P): Remove parenthesis. - (DECL_LANGUAGE): Whitespace. - (SET_DECL_LANGUAGE): Add parenthesis. - (DECL_CONSTRUCTOR_P): Whitespace and wrap. - (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis. - (DECL_IN_AGGR_P): Whitespace. - (DECL_FRIEND_P): Likewise. - (DECL_BEFRIENDING_CLASSES): Likewise. - (DECL_STATIC_FUNCTION_P): Whitespace and wrap. - (DECL_NONCONVERTING_P): Whitespace. - (DECL_PURE_VIRTUAL_P): Likewise. - (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise. - (DECL_PENDING_INLINE_INFO): Whitespace. - (DECL_SORTED_FIELDS): Likewise. - (DECL_DEFERRED_FN): Likewise. - (DECL_TEMPLATE_INFO): Likewise. - (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise. - (SET_TYPE_TEMPLATE_INFO): Add parenthesis. - (TMPL_ARGS_LEVEL): Likewise. - (SET_TMPL_ARGS_LEVEL): Likewise. - (INNERMOST_TEMPLATE_PARMS): Whitespace. - (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter. - (INTEGRAL_CODE_P(CODE): Add parenthesis. - (CP_INTEGRAL_TYPE_P): Remove parenthesis. - (TYPE_HAS_CONSTRUCTOR): Whitespace. - (TREE_HAS_CONSTRUCTOR): Likewise. - (TYPE_HAS_DESTRUCTOR): Likewise. - (TYPE_HAS_REAL_ASSIGN_REF): Likewise. - (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise. - (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. - (TYPE_HAS_COMPLEX_INIT_REF): Likewise. - (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. - (TYPE_PTRMEMFUNC_P): Likewise. - (TYPE_PTRMEMFUNC_FLAG): Likewise. - (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. - (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. - (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. - (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. - (DECL_ACCESS): Whitespace. - (DECL_GLOBAL_CTOR_P): Remove parenthesis. - (DECL_GLOBAL_DTOR_P): Likewise. - (GLOBAL_INIT_PRIORITY): Likewise. - (DECL_TEMPLATE_PARMS): Likewise. - (DECL_TEMPLATE_RESULT): Likewise. - (DECL_TEMPLATE_INSTANTIATIONS): Likewise. - (DECL_TEMPLATE_SPECIALIZATIONS): Likewise. - (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis. - (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. - (PRIMARY_TEMPLATE_P): Add parenthesis. - (DECL_USE_TEMPLATE): Whitespace. - (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. - (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. - (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. - (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. - (CALL_DECLARATOR_PARMS): Remove parenthesis. - (CALL_DECLARATOR_QUALS): Likewise. - (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. - (TEMP_NAME_P): Wrap. - (VFIELD_NAME_P): Likewise. - (B_SET): Uppercase macro parameters and add parenthesis. - (B_CLR): Likewise. - (B_TST): Likewise. - (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters. - (LOOKUP_TYPES_ONLY): Uppercase macro parameters. - (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters. - (same_or_base_type_p): Likewise. - (cp_deprecated): Likewise. - -2002-01-05 Richard Henderson - - * semantics.c (expand_body): Revert last change. - -2002-01-04 Jason Merrill - - PR c++/4122 - * class.c (update_vtable_entry_for_fn): Set delta to zero for a - lost primary. - - * class.c (build_vtbl_initializer): Check for a lost primary - before calculating the vtable entry to throw away. - -2002-01-02 Jason Merrill - - * semantics.c (expand_body): Call outlining_inline_function when - emitting an inline function out of line. - -2002-01-02 Nathan Sidwell - - PR c++/5116, c++/764 reversion - * call.c (build_new_op): Revert the instantiations. They are - incorrect. - -2002-01-02 Nathan Sidwell - - PR c++/5089 - * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void. - -2002-01-02 Nathan Sidwell - - PR c++/3716 - * pt.c (tsubst_aggr_type): Move pmf handling into tsubst. - (tsubst, case POINTER_TYPE): Handle pmfs here. - (tsubst, case OFFSET_TYPE): Check it is not an offset to - reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE. - -2002-01-02 Nathan Sidwell - - PR c++/35 - * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too. - (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too. - * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the - PARM_DECL. - (tsubst_template_parms): Break up loop statements. - (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template - parm PARM_DECLs don't get promoted. - -2002-01-02 Nathan Sidwell - - PR c++/5123 - * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR. - (build_x_function_call): Cope with a COMPONENT_REF containing a - TEMPLATE_ID_EXPR. - -2002-01-02 Nathan Sidwell - - PR c++/5213 - * pt.c (convert_template_argument): Be more careful determining - when RECORD_TYPE templates are or are not templates. - -2002-01-02 Nathan Sidwell - - PR c++/775 - * cp-tree.h (handle_class_head): Adjust prototype. - * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P - parameters. Use for all class heads. - * parse.y (named_class_head_sans_basetype, named_class_head, - named_complex_class_head_sans_basetype, - named_class_head_sans_basetype_defn, - unnamed_class_head): Remove. - (class_head, class_head_apparent_template): Recognize class heads - (class_head_decl, class_head_defn): New reductions. Process class - heads. - (structsp): Adjust class definition and class declaration - reductions. - (maybe_base_class_list): Give diagnostic on empty list. - -2002-01-02 Nathan Sidwell - - PR c++/4379 - * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a - single non-static member. - (unary_complex_lvalue): If it cannot be a pointer to member, don't - make it so. Check it is not pointer to reference. - -2002-01-02 Nathan Sidwell - - PR c++/5132 - * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we - are processing a template decl. - -2002-01-02 Nathan Sidwell - - PR c++/5116, c++/764 - * call.c (build_new_op): Make sure template class operands are - instantiated. Simplify arglist construction. - -2001-12-29 Nathan Sidwell - - * call.c (build_user_type_conversion_1): Use my_friendly_assert - rather than if ... abort. - * cvt.c (convert_to_reference): Likewise. - * semantics.c (setup_vtbl_ptr): Likewise. - * pt.c (lookup_template_class): Comment typo. - -2001-12-29 Nathan Sidwell - - PR c++/5125 - * pt.c (push_template_decl_real): Make sure DECL has - DECL_LANG_SPECIFIC. - -2001-12-29 Nathan Sidwell - - PR c++/335 - * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer - for non-reference fields. - * typeck.c (require_complete_type): Use resolve_offset_ref). - -2001-12-26 Nathan Sidwell - - PR c++/196 - * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF. - -2001-12-24 Nathan Sidwell - - PR c++/160 - * typeck.c (build_modify_expr): Remove old unreachable code & tidy - up. Don't stabilize_references when initializing a reference. - -2001-12-23 Kaveh R. Ghazi - - * decl2.c (lang_f_options): Const-ify. - -2001-12-20 Joseph S. Myers - - * config-lang.in (diff_excludes): Remove. - -2001-12-19 Nathan Sidwell - - PR c++/90 - * typeck.c (build_function_call_real): Use original function - expression for errors. - -2001-12-18 Jason Merrill - - PR c++/3242 - * class.c (add_method): Do compare 'this' quals when trying to match a - used function. Don't defer to another used function. - -2001-12-18 Nathan Sidwell - - * pt.c (instantiate_clone): Remove, fold into ... - (instantiate_template): ... here. Simplify by removing mutual - recursion. - * typeck2.c (build_m_component_ref): Don't cv qualify the function - pointed to by a pointer to function. - * class.c (delete_duplicate_fields_1): Typo. - -2001-12-18 Jason Merrill - - C++ ABI change: destroy value arguments in caller. - * semantics.c (genrtl_start_function, genrtl_finish_function): Don't - create an extra binding level for the parameters. - * decl.c (store_parm_decls): Don't do parameter cleanups. - -2001-12-18 Nathan Sidwell - - * call.c (build_new_method_call): Use '%#V'. - * error.c (cv_to_string): Use V parameter to determine padding. - -2001-12-18 Joseph S. Myers - - * call.c, decl2.c, init.c: Use "built-in" and "bit-field" - spellings in messages. - -2001-12-17 Zack Weinberg - - * cp-tree.h: Delete #defines for cp_error, cp_warning, - cp_pedwarn, and cp_compiler_error. - * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c, - except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c, - rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, - typeck2.c: Change calls to the above macros to use their - language-independent equivalents: error, warning, pedwarn, and - internal_error respectively. - -2001-12-16 Neil Booth - - * decl2.c (finish_file): Remove back_end_hook. - -2001-12-16 Joseph S. Myers - - * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c, - cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c, - pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors. - -2001-12-15 Joseph S. Myers - - * lang-options.h: Use American spelling in messages. - -2001-12-13 Jason Merrill - - * Make-lang.in (parse.h): Separate rule, just depend on parse.c. - - Use cleanups to run base and member destructors. - * init.c (push_base_cleanups): New function, split out from... - (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code. - * decl.c (finish_destructor_body): Move vbase destruction code to - push_base_cleanups. - (begin_function_body, finish_function_body): New fns. - (finish_function): Move [cd]tor handling and call_poplevel to - finish_function_body. - (pushdecl): Skip the new level. - * semantics.c (genrtl_try_block): Don't call end_protect_partials. - (setup_vtbl_ptr): Call push_base_cleanups. - * method.c (synthesize_method): Call {begin,end}_function_body. - * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK. - * cp-tree.h: Declare new fns. - * parse.y (function_body, .begin_function_body): New nonterminals. - (fndef, pending_inline, function_try_block): Use function_body. - (ctor_initializer_opt, function_try_block): No longer has a value. - (base_init): Remove .set_base_init token. - (.set_base_init, compstmt_or_error): Remove. - * Make-lang.in (parse.c): Expect two fewer s/r conflicts. - - * optimize.c (maybe_clone_body): Fix parameter updating. - -2001-12-12 Jason Merrill - - * decl.c (store_parm_decls): Remove parms_have_cleanups cruft. - * semantics.c (genrtl_start_function): Don't pass - parms_have_cleanups or push an extra binding level. - (genrtl_finish_function): Lose cleanup_label cruft. - - * cp-tree.h (struct cp_language_function): Remove x_ctor_label. - (ctor_label): Remove. - * semantics.c (finish_return_stmt): Lose ctor_label support. - * decl.c (finish_constructor_body, mark_lang_function): Likewise. - * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not - dtor_label. - - * call.c (build_new_method_call): Let resolves_to_fixed_type_p - check for [cd]tors. - * class.c (fixed_type_or_null, case INDIRECT_REF): Fix. - - * decl.c (finish_function): Check VMS_TARGET, not VMS. - - * decl.c (start_cleanup_fn): Remove redundant pushlevel. - (end_cleanup_fn): And poplevel. - - * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER - if we're in a template. - -2001-12-12 Jakub Jelinek - - * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P, - ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT, - THIS_NAME_P): Delete. - * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P, - THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash - with internal naming scheme. - * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use. - -2001-12-12 Nathan Sidwell - - * decl.c (grokdeclarator): Deprecated implicit typename use. - -2001-12-11 Nathan Sidwell - - PR g++/51 - * parse.y (frob_specs): Indicate it is a language linkage which - contained the extern. - * decl.c (grokdeclarator): Allow extern language linkage with - other specifiers. - -2001-12-10 Nathan Sidwell - - PR g++/72 - * decl.c (add_binding): Don't reject duplicate typedefs involving - template parameters. - -2001-12-10 Neil Booth - - * parse.y, semantics.c: Similarly. - -2001-12-09 Nathan Sidwell - - PR g++/87 - * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p. - (copy_args_p): Rename to ... - (copy_fn_p): ... here. - (grok_special_member_properties): New function. - (grok_op_properties): Lose VIRTUALP parameter. - (copy_assignment_arg_p): Remove. - * call.c (build_over_call): Use copy_fn_p. - * decl.c (grokfndecl): Reformat. Adjust call to - grok_op_properties. - (copy_args_p): Rename to ... - (copy_fn_p): ... here. Reject template functions. Check for pass - by value. - (grok_special_member_properties): Remember special functions. - (grok_ctor_properties): Don't remember them here, just check. - (grok_op_properties): Likewise. - (start_method): Call grok_special_member_properties. - * decl2.c (grokfield): Likewise. - (copy_assignment_arg_p): Remove. - (grok_function_init): Don't remember abstract assignment here. - * pt.c (instantiate_class_template): Call - grok_special_member_properties. - (tsubst_decl): Adjust grok_op_properties call. - -2001-12-08 Aldy Hernandez - - * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and - RID_TYPES_COMPATIBLE_P. - -2001-12-08 John David Anglin - - * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in - call to build_aggr_init. - * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND. - -2001-12-08 Neil Booth - - * parse.y: Replace uses of the string non-terminal with STRING. - Don't perform string concatentaion here. - (string): Remove non-terminal. - * semantics.c (finish_asm_stmt): Don't concatenate strings here. - -2001-12-05 Jason Merrill - - * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. - (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. - * tree.c (cp_start_inlining, cp_end_inlining): New fns. - * pt.c (push_tinst_level): No longer static. - * cp-tree.h: Declare them. - - * init.c (resolve_offset_ref): Don't check access for the base - conversion to access a FIELD_DECL. - - * cp-tree.h (TYPE_REFFN_P): New macro. - * decl.c (bad_specifiers): Check it, too. - - * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY - on the __*_type_info type if we haven't seen a definition. - -2001-12-05 Neil Booth - - * decl.c: Include c-common.h. - (shadow_warning): Move to c-common.c. - -2001-12-05 Richard Kenner - - * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE. - -2001-12-04 Nathan Sidwell - - * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm. - -2001-12-04 Nathan Sidwell - - PR g++/164 - * init.c (sort_base_init): Allow binfos to be directly specified. - * method.c (do_build_copy_constructor): Explicitly convert to the - base instance. - (do_build_assign_ref): Likewise. - -2001-12-03 Hans-Peter Nilsson - - * decl.c (xref_basetypes): Don't use C99 construct in tag_code - declaration and initialization. - -2001-12-03 Neil Booth - - * typeck2.c: Remove leading capital from diagnostic messages, as - per GNU coding standards. - -2001-12-03 Mumit Khan - - PR c++/3394 - * decl.c (xref_basetypes): Handle attributes between - 'class' and name. - -2001-12-03 Nathan Sidwell - - PR g++/3381 - * parse.y (named_complex_class_head_sans_basetype): Add new - reduction. - * Make-lang.in (parse.c): Adjust expected conflict count. - -2001-12-03 Jason Merrill - - * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the - immediate binfos for our virtual bases. - -2001-12-02 Neil Booth - - * call.c (build_java_interface_fn_ref): Similarly. - * except.c (is_admissible_throw_operand): Similarly. - * init.c (build_java_class_ref): Similarly. - * xref.c (open_xref_file): Similarly. - -2001-12-01 Neil Booth - - * class.c (finish_struct): Remove trailing periods from messages. - * decl.c (check_tag_decl): Similarly. - * lex.c (cxx_set_yydebug): Similarly. - * typeck2.c (friendly_abort): Similarly. - -2001-11-29 Mark Mitchell - - PR c++/3048 - * cp-tree.h (ovl_member): Remove. - * decl2.c (merge_functions): Handle extern "C" functions - specially. - * tree.c (ovl_member): Remove. - -2001-11-29 Mark Mitchell - - PR c++/4842 - * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a - FUNCTION_DECL, as input. - (mark_overriders): Remove. - (warn_hidden): Rework for the new ABI. - -2001-11-29 Mark Mitchell - - PR c++/3471 - * call.c (convert_like_real): Do not build additional temporaries - for rvalues of class type. - -2001-11-28 Nathan Sidwell - - * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base. - (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise. - (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise. - (DERIVED_FROM_P): Likewise. - (enum base_access): Renumber, add ba_quiet bit mask. - (get_binfo): Remove. - (get_base_distance): Remove. - (binfo_value): Remove. - (ACCESSIBLY_DERIVED_FROM_P): Remove. - * call.c (standard_conversion): Use lookup_base. - * class.c (strictly_overrides): Likewise. - (layout_virtual_bases): Likewise. - (warn_about_ambiguous_direct_bases): Likewise. - (is_base_of_enclosing_class): Likewise. - (add_vcall_offset_vtbl_entries_1): Likewise. - * cvt.c (build_up_reference): Adjust comment. - * init.c (build_member_call): Reformat. - * search.c (get_binfo): Remove. - (get_base_distance_recursive): Remove. - (get_base_distance): Remove. - (lookup_base_r): Tweak. - (lookup_base): Add ba_quiet control. Complete the types here. - (covariant_return_p): Use lookup_base. - * tree.c (binfo_value): Remove. - (maybe_dummy_object): Use lookup_base. - * typeck.c (build_static_cast): Use lookup_base. - (get_delta_difference): Likewise. - * typeck2.c (binfo_or_else): Use lookup_base. - (build_scoped_ref): Add back error_mark_check. - (build_m_component_ref): Use lookup_base. - -2001-11-29 Joseph S. Myers - - * Make-lang.in (c++.generated-manpages): New dummy target. - -2001-11-27 Richard Kenner - - * Make-lang.in (cp-lang.o): Depends on c-common.h. - * cp-lang.c (c-common.h): Include. - (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. - * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. - * expr.c (init_cplus_expand): Don't set lang_expand_constant. - -2001-11-26 Neil Booth - - * decl2.c (c_language): Move to c-common.c. - * lex.c (cxx_post_options, cxx_init_options): Use c-common.c - functions. - (cxx_init): Update. - -2001-11-26 Jason Merrill - - * call.c (joust): Remove COND_EXPR hack. - -2001-11-25 Aldy Hernandez - - * search.c (lookup_base_r): Declare bk in variable declaration - space. - -2001-11-25 Nathan Sidwell - - PR g++/3145 - * class.c (build_vbase_pointer): Remove. - (build_vbase_path): Remove. - (build_base_path): New function. - * cp-tree.h (base_access, base_kind): New enumerations. - (build_base_path): Declare. - (convert_pointer_to_real): Remove. - (convert_pointer_to): Remove. - (lookup_base): Declare. - (convert_pointer_to_vbase): Remove. - * call.c (build_scoped_method_call): Use lookup_base & - build_base_path instead of convert_pointer_to_real, - get_base_distance & get_binfo. - (build_over_call): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_pointer_force): Likewise. - (build_up_reference): Likewise. - (convert_pointer_to_real): Remove. - (convert_pointer_to): Remove. - * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path - instead of convert_pointer_to_vbase & build_vbase_path. - (emit_base_init): Use build_base_path instead of - convert_pointer_to_real. - (expand_virtual_init): Lose unrequired conversions. - (resolve_offset_ref): Use lookup_base and build_base_path - instead of convert_pointer_to. - * rtti.c (build_dynamic_cast_1): Use lookup_base & - build_base_path instead of get_base_distance & build_vbase_path. - * search.c (get_vbase_1): Remove. - (get_vbase): Remove. - (convert_pointer_to_vbase): Remove. - (lookup_base_r): New function. - (lookup_base): New function. - * typeck.c (require_complete_type): Use lookup_base & - build_base_path instead of convert_pointer_to. - (build_component_ref): Likewise. - (build_x_function_call): Likewise. - (get_member_function_from_ptrfunc): Likewise. - (build_component_addr): Likewise. - * typeck2.c (build_scoped_ref): Likewise. - -2001-11-22 Bryce McKinlay - - * cp-tree.h (CP_TYPE_QUALS): Removed. - * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree. - * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and - LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN. - * dump.c (cp_dump_tree): Use void* dump_info argument to match - lang-hooks prototype. - * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c, - rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to - CP_TYPE_QUALS changed to cp_type_quals. - * Make-lang.in: References to c-dump.h changed to tree-dump.h. - (CXX_C_OBJS): Remove c-dump.o. - -2001-11-21 Mark Mitchell - - PR c++/3637 - * pt.c (lookup_template_class): Ensure that all specializations - are registered on the list corresponding to the most general - template. - -2001-11-20 Mark Mitchell - - * call.c (non_reference): Add documentation. - (convert_class_to_reference): Do not strip reference types - from conversion operators. - (maybe_handle_ref_bind): Simplify. - (compare_ics): Correct handling of references. - -2001-11-19 John Wilkinson - - * dump.c (dump_op): New function. - (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use - dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs. - DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P, - -2001-11-19 Mark Mitchell - - PR4629 - * semantics.c (finish_sizeof): Make sure that expression created - while processing a template do not have a type. - (finish_alignof): Likewise. - * typeck.c (c_sizeof): Likewise. - (expr_sizeof): Likewise. - -2001-11-18 Neil Booth - - * lex.c (cxx_finish): Call c_common_finish. - (finish_parse): Remove. - -2001-11-17 Kriang Lerdsuwanakij - - * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE - when displaying error message about missing array bounds. - -2001-11-17 Kriang Lerdsuwanakij - - * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR, - CONST_CAST_EXPR. - * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR. - -2001-11-16 Neil Booth - - * cp-tree.h (print_class_statistics): Restore. - -2001-11-15 Jason Merrill - - * method.c (use_thunk): Don't emit debugging information for thunks. - - * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions. - * decl.c (make_typename_type): Handle getting a class template. - * search.c (lookup_field_r): A class template is good enough for - want_type. - - * call.c (convert_like_real): Only use cp_convert for the bad part. - (standard_conversion): Also allow bad int->enum. - * typeck.c (ptr_reasonably_similar): Also allow functions to - interconvert. Pointers to same-size integers are reasonably - similar. - - * cvt.c (convert_to_void): If we build a new COND_EXPR, always - give it void type. - -2001-11-15 Nathan Sidwell - - PR g++/3154 - * init.c (sort_base_init): Remove unreachable code. - (expand_member_init): Adjust comment to reflect reality. Simplify - and remove unreachable code. - -2001-11-15 Neil Booth - - * cp-tree.h (init_reswords, cxx_init_decl_processing): New. - (cxx_init): Update prototype. - * decl.c (init_decl_processing): Rename. Move null node init - to its creation time. - * lex.c (cxx_init_options): Update. - (cxx_init): Combine with old init_parse; also call - cxx_init_decl_processing. - -2001-11-14 Richard Sandiford - - * decl.c (check_initializer): Try to complete the type of an - array element before checking whether it's complete. Don't - complain about arrays with complete element types but an - unknown size. - (cp_finish_decl): Build the hierarchical constructor before - calling maybe_deduce_size_from_array_init. - -2001-11-14 Joseph S. Myers - - * Make-lang.in: Change all uses of $(manext) to $(man1ext). - -2001-11-13 Nathan Sidwell - - PR g++/4206 - * parse.y (already_scoped_stmt): Remove. - (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt. - -2001-11-12 H.J. Lu - - * cvt.c (ocp_convert): Don't warn the address of a weak - function is always `true'. - -2001-11-09 Neil Booth - - * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, - LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, - LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. - * cp-tree.h (print_class_statistics): Remove. - (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, - cxx_print_identifier, cxx_set_yydebug): New. - * lex.c (set_yydebug): Rename c_set_yydebug. - * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, - lang_print_xnode): Rename. - * tree.c (print_lang_statistics): Rename. - -2001-11-09 Kaveh R. Ghazi - - * class.c (dump_array): Fix format specifier warning. - -2001-11-09 Neil Booth - - * cp-lang.c (LANG_HOOKS_NAME): Override. - (struct lang_hooks): Constify. - * lex.c (cxx_init_options): Update. - (lang_identify): Remove. - * parse.y (language_string): Remove. - -2001-11-08 Andreas Franck - - * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME, - DEMANGLER_CROSS_NAME): Handle program_transform_name the way - suggested by autoconf. - (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define. - (c++.install-common): Use the transformed target alias names. - -2001-11-06 Neil Booth - - * Make-lang.in: Update. - * cp-lang.c: Include langhooks-def.h. - -2001-11-04 Kriang Lerdsuwanakij - - * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR. - -2001-11-03 Kaveh R. Ghazi - - * lex.c (copy_lang_type): Add static prototype. - -2001-11-02 Kriang Lerdsuwanakij - - * pt.c (unify): Handle SCOPE_REF. - -2001-11-01 Jakub Jelinek - - * tree.c (cp_copy_res_decl_for_inlining): Adjust - DECL_ABSTRACT_ORIGIN for the return variable. - -2001-10-31 Zack Weinberg - - * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. - -2001-10-28 Joseph S. Myers - - * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c, - semantics.c, spew.c: Fix spelling errors. - -2001-10-27 Kriang Lerdsuwanakij - - * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL. - -2001-10-25 Zack Weinberg - - * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to - pop_everything. - -2001-10-23 Richard Kenner - - * cp-lang.c (cxx_get_alias_set): New function. - Point LANG_HOOKS_GET_ALIAS_SET to it. - -2001-10-23 Kriang Lerdsuwanakij - - * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node. - * cp-tree.h (make_unbound_class_template): Prototype new function. - * decl.c (make_unbound_class_template): New function. - * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE. - * error.c (dump_type): Likewise. - * mangle.c (write_type): Likewise. - * parse.y (template_parm): Likewise. - (template_argument): Use make_unbound_class_template. - * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE. - (tsubst): Likewise. - (tsubst_copy): Likewise. - (unify): Likewise. - * tree.c (walk_tree): Likewise. - * typeck.c (comptypes): Likewise. - -2001-10-21 Kaveh R. Ghazi - - * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold - extra calls into fewer ones. - -2001-10-18 Alexandre Oliva - - * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE. - Warn when merging inline with attribute noinline. - (start_decl, start_function): Warn if inline and attribute - noinline appear in the same declaration. - -2001-10-16 H.J. Lu - - * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined - for tree checking disabled. - -2001-10-16 Hans-Peter Nilsson - - * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL && - NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME. - -2001-10-15 Richard Sandiford - - * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define. - (unify): Only handle MINUS_EXPR specially if the above flag is set - and the subtracted constant is 1. Clear the flag on recursive calls. - Set it when unifying the maximum value in an INTEGER_TYPE's range. - -2001-10-15 Richard Sandiford - - * decl.c (bad_specifiers): Don't allow exception specifications - on any typedefs. - -2001-10-14 Neil Booth - - * cp/lex.c (init_cp_pragma): Similarly. - -2001-10-13 Kriang Lerdsuwanakij - - * pt.c (lookup_template_class): Build complete template arguments - for BOUND_TEMPLATE_TEMPLATE_PARM. - -2001-10-12 Kriang Lerdsuwanakij - - * cp-tree.h (TYPE_BINFO): Update comment. - (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info. - (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS. - (copy_type): Prototype new function. - * lex.c (copy_lang_decl): Gather tree node statistics. - (copy_lang_type): New function. - (copy_type): Likewise. - (cp_make_lang_type): Create lang_type for - BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE - and BOUND_TEMPLATE_TEMPLATE_PARM. - * pt.c (tsubst): Use copy_type instead of copy_node. - * search.c (lookup_field_1): Ignore TYPENAME_TYPE. - -2001-10-12 Kriang Lerdsuwanakij - - * pt.c (determine_specialization): Ignore functions without - DECL_TEMPLATE_INFO. - -2001-10-12 Nathan Sidwell - - PR g++/4476 - * typeck2.c (abstract_virtuals_error): Ignore incomplete classes. - -2001-10-11 Jason Merrill - - * typeck2.c (store_init_value): Don't re-digest a bracketed - initializer. - - * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of - ANON_AGGR_TYPE_P. - -2001-10-11 Richard Henderson - - * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead - of an asm statement. - (build_vtbl_ref_1): Split out from build_vtbl_ref. - (build_vfn_ref): Use it to handle vtable descriptors before - calling build_vtable_entry_ref. - * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit. - -2001-10-10 Richard Henderson - - * parse.y (asm_operand): Allow named operands. - * semantics.c (finish_asm_stmt): Tweek for changed location - of the operand constraint. - -2001-10-09 Jason Merrill - - * call.c (standard_conversion): Add bad conversion between - integers and pointers. - (convert_like_real): Don't use convert_for_initialization for bad - conversions; complain here and use cp_convert. - (build_over_call): Don't handle bad conversions specially. - (perform_implicit_conversion): Allow bad conversions. - (can_convert_arg_bad): New fn. - * cp-tree.h: Declare it. - * typeck.c (convert_for_assignment): Use it. - (ptr_reasonably_similar): Any target type is similar to void. - -2001-10-08 Alexandre Oliva - - * Make-lang.in (CXX_OBJS): Added cp-lang.o. - (cp/cp-lang.o): New rule. - * cp-tree.h: Declare hooks. - * tree.c: Make hooks non-static. - (init_tree): Don't initialize hooks here. - * lex.c: Likewise. Move definition of lang_hooks to... - * cp-lang.c: ... new file. - -2001-10-08 Richard Henderson - - * cp-tree.h (struct lang_decl_flags): Remove declared_inline. - (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl. - -2001-10-07 Kaveh R. Ghazi - - * class.c (build_vtable_entry_ref): Const-ify. - * decl.c (predefined_identifier, - initialize_predefined_identifiers): Likewise. - * init.c (build_new_1): Likewise. - * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): - Likewise. - -2001-10-05 Alexandre Oliva - - * optimize.c (struct inline_data): Moved to ../tree-inline.c. - (INSNS_PER_STMT): Likewise. - (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise. - (copy_body, initialize_inlined_parameters): Likewise. - (declare_return_variable, inlinable_function_p): Likewise. - (expand_call_inline, expand_calls_inline): Likewise. - (optimize_inline_calls, clone_body): Likewise. - * tree.c (walk_tree): Moved to ../tree-inline.c. - (walk_tree_without_duplicates): Likewise. - (copy_tree_r, remap_save_expr): Likewise. - -2001-10-04 Alexandre Oliva - - * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h. - (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise. - * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl. - (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h. - (flag_inline_trees): Moved declaration to ../tree-inline.h. - (walk_tree): Moved declaration to ../tree-inline.h. - (walk_tree_without_duplicates, copy_tree_r): Likewise. - (remap_save_expr): Likewise. - * decl.c: Include tree-inline.h. - (lang_mark_tree): Don't mark inlined_fns. - * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c. - * optimize.c: Include tree-inline.h. - (optimize_inline_calls): Move declaration to ../tree.h, as - non-static. - (remap_decl): Use language-independent constructs and hooks. - (remap_block, copy_body_r, declare_return_variable): Likewise. - (inlinable_function_p): Likewise. Don't test for - DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is - no longer language-specific. - (optimize_inline_calls): Likewise. Make it non-static. Moved - call of dump_function to... - (optimize_function): Here... - (clone_body): New function, extracted from... - (maybe_clone_body): ... here. Build decl_map locally and pass - it on to clone_body. - * pt.c, semantics.c: Include tree-inline.h. - * tree.c: Likewise. - (cp_walk_subtrees): New language-specific hook for tree inlining. - (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls, - cp_is_overload_p, cp_auto_var_in_fn_p, - cp_copy_res_decl_for_inlining): Likewise. - (walk_tree): Move language-specific constructs into... - (cp_walk_subtrees): this new function. - (copy_tree_r): Use language-independent constructs and hooks. - (init_tree): Initialize tree inlining hooks. - (remap_save_expr): Adjust prototype so that the declaration - does not require the definition of splay_tree. - -2001-10-03 John David Anglin - - * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used - to build the declaration instead of the declaration itself. - -2001-10-02 Jason Merrill - - * decl2.c (cxx_decode_option): Add 'else'. - - * spew.c (end_input): No longer static. - * cp-tree.h: Declare it. - * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion. - -2001-10-02 Joseph S. Myers - - * call.c (build_over_call), typeck.c (build_function_call_real): - Pass type attributes to check_function_format rather than name or - assembler name. Don't require there to be a name or assembler - name to check formats. - -2001-10-02 Joseph S. Myers - - * decl.c (init_decl_processing): Don't call - init_function_format_info. Initialize lang_attribute_table - earlier. - (builtin_function): Call decl_attributes. - (insert_default_attributes): New. - -2001-10-01 Jason Merrill - - * decl.c (grokdeclarator): Copy array typedef handling from C - frontend. - - * decl.c (grokdeclarator): Copy too-large array handling from C - frontend. - -2001-09-29 Alexandre Oliva - - * config-lang.in (target_libs): Added target-gperf, so that we - don't try to build it if C++ is disabled. - -2001-09-23 Zack Weinberg - - * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. - (cp/errfn.o): Delete rule. - (cp/error.o): Depend on flags.h. - * errfn.c: Delete file. - * cp-tree.h: Declare warn_deprecated. Remove definitions of - TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, - and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, - cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and - internal_error respectively. Make cp_deprecated into a macro. - Don't define cp_printer typedef or declare cp_printers. - * error.c: Include flags.h. - Delete: struct tree_formatting_info, print_function_argument_list, - print_declaration, print_expression, print_function_declaration, - print_function_parameter, print_type_id, print_cv_qualifier_seq, - print_type_specifier_seq, print_simple_type_specifier, - print_elaborated_type_specifier, print_rest_of_abstract_declarator, - print_parameter_declaration_clause, print_exception_specification, - print_nested_name_specifier, and definition of cp_printers. - (locate_error): New function. - (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and - rewritten in terms of locate_error and diagnostic.c. - (cp_tree_printer): Rename cp_printer; wire up to *_to_string - instead of deleted print_* routines. Handle %C, %L, %O, %Q also. - (init_error): Adjust to match. - -2001-09-22 Richard Kenner - - * Make-lang.in (CXX_C_OBJS): Add attribs.o. - -2001-09-21 Richard Henderson - - * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. - (build_vtbl_initializer): Likewise. - (build_vfn_ref): New. - * cp-tree.h: Declare it. - * call.c (build_over_call): Use it. - * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. - * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. - -2001-09-21 J"orn Rennecke - - * decl.c (grokdeclarator): Use C syntax for attr_flags declaration. - -2001-09-21 Joseph S. Myers - - Table-driven attributes. - * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. - * decl2.c (cplus_decl_attributes): Only take one attributes - parameter. - * cp-tree.c (cplus_decl_attributes): Update prototype. - * class.c (finish_struct), decl.c (start_decl, start_function), - decl2.c (grokfield), friend.c (do_friend), parse.y - (parse_bitfield): Update calls to cplus_decl_attributes. - * decl.c (grokdeclarator): Take a pointer to a single ordinary - attribute list. - * decl.h (grokdeclarator): Update prototype. - * decl2.c (grokfield): Take a single ordinary attribute list. - * friend.c (do_friend): Likewise. - * decl.c (shadow_tag, groktypename, start_decl, - start_handler_parms, grokdeclarator, grokparms, start_function, - start_method), decl2.c (grokfield, grokbitfield, grokoptypename), - parse.y (parse_field, parse_bitfield, component_decl_1), pt.c - (process_template_parm, do_decl_instantiation): Pass single - ordinary attribute lists around. - * decl.c (grokdeclarator): Correct handling of nested attributes. - Revert the patch - 1998-10-18 Jason Merrill - * decl.c (grokdeclarator): Embedded attrs bind to the right, - not the left. - . - * cp-tree.h (cp_valid_lang_attribute): Remove declaration - (cp_attribute_table): Declare. - * decl.c (valid_lang_attribute): Don't define. - (lang_attribute_table): Define. - (init_decl_processing): Initialize lang_attribute_table instead of - valid_lang_attribute. - * tree.c (cp_valid_lang_attribute): Remove. - (handle_java_interface_attribute, handle_com_interface_attribute, - handle_init_priority_attribute): New functions. - (cp_attribute_table): New array. - * decl2.c (import_export_class): Don't use - targetm.valid_type_attribute. - -2001-09-15 Gabriel Dos Reis - - * Make-lang.in (cp/error.o): Depend on real.h - * error.c: #include "real.h" - -2001-09-15 Kaveh R. Ghazi - - * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of - xmalloc/strcpy/strcat. - -2001-09-13 Kaveh R. Ghazi - - * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): - Const-ification. - * pt.c (tsubst_decl): Likewise. - -2001-09-12 Kaveh R. Ghazi - - * decl2.c (lang_f_options): Const-ification. - * lex.c (cplus_tree_code_name): Likewise. - * spew.c (yyerror): Likewise. - -2001-09-06 Nathan Sidwell - - PR c++/3986 - * class.c (force_canonical_binfo_r): Check & move an indirect - primary base first. - (force_canonical_binfo): Check that it's not already - canonical. - (mark_primary_virtual_base): Remove BINFO parameter. - (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here. - -2001-09-06 Nathan Sidwell - - Remove TYPE_NONCOPIED_PARTS. - * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto - CLASSTYPE_PURE_VIRTUALS. - (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. - * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. - (layout_class_type): Don't call fixup_inline_methods here ... - (finish_struct_1): ... call it here. - -2001-09-04 Mark Mitchell - - * decl.c (duplicate_decls): Remove code deadling with - DECL_SAVED_INSNS. - * decl2.c (finish_file): Likewise. - * pt.c (instantiate_decl): Likewise. - * semantics.c (expand_body): Don't defer local functions if - they wouldn't be deferred for some other reason. Don't - generate RTL for functions that will not be emitted. - (genrtl_start_function): Remove code deadling with - DECL_SAVED_INSNS. - (genrtl_finish_function): Likewise. - -2001-09-04 Nathan Sidwell - - PR c++/4203 - * call.c (build_over_call): Do not optimize any empty base - construction. - -2001-08-31 Kriang Lerdsuwanakij - - * error.c (dump_template_decl): Output template parameters - together with their specifiers. - Output `class' prefix for template template parameter. - (dump_decl): Fix formatting. - -2001-08-30 Kurt Garloff - - * optimize.c (inlinable_function_p): Allow only smaller single - functions. Halve inline limit after reaching recursive limit. - -2001-08-30 Joern Rennecke - Jason Merrill - - * class.c (build_vtable_entry_ref): Subtract in char*, not - ptrdiff_t. - -2001-08-23 Jason Merrill - - * tree.c (cp_build_qualified_type_real): Use get_qualified_type. - (build_cplus_array_type): Use cp_build_qualified_type, not - TYPE_MAIN_VARIANT, to get an unqualified version. - - * decl2.c (grok_alignof): Lose. - (build_expr_from_tree): Use expr_sizeof and c_alignof_expr. - * typeck.c (c_alignof): Lose. - * semantics.c (finish_sizeof, finish_alignof): New. - * parse.y: Use them. - * cp-tree.h: Declare them. - -2001-08-22 Jason Merrill - - * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement. - Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK. - * tree.c (cp_statement_code_p): A TAG_DEFN is a statement. - -2001-08-19 Jakub Jelinek - - * typeck2.c (add_exception_specifier): Only require complete type if - not in processing template declaration. - -2001-08-18 Kaveh R. Ghazi - - * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to - GNU_xref_start_scope and GNU_xref_end_scope. - - * tree.c (TYPE_HASH): Moved to ../tree.h. - -2001-08-16 Mark Mitchell - - * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS - on COMPOUND_EXPRs. - -2001-08-14 Richard Henderson - - * class.c, cp-tree.h (build_vfn_ref): Remove. - * call.c, rtti.c: Replace all refernces with build_vtbl_ref. - -2001-08-13 Mark Mitchell - - * call.c (build_over_call): Mark COMPOUND_EXPRs generated for - empty class assignment as having side-effects to avoid - spurious warnings. - -2001-08-13 Zack Weinberg - - * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. - * except.c: Include libfuncs.h. - -2001-08-11 Gabriel Dos Reis - - * decl.c (grokdeclarator): Clarify diagnostic message. - -2001-08-13 Kriang Lerdsuwanakij - - * decl2.c (do_nonmember_using_decl): Replace using directive - with using declaration in the error message. - -2001-08-11 Kriang Lerdsuwanakij - - * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the - criterion to avoid rebuilding expression tree instead of - processing_template_decl. - -2001-08-07 Jason Merrill - - Support named return value optimization for inlines, too. - * decl.c (finish_function): Nullify returns here. - * semantics.c (genrtl_start_function): Not here. - (cp_expand_stmt): Don't mess with CLEANUP_STMTs. - (nullify_returns_r): No longer static. Just clear RETURN_EXPR. - Also nullify the CLEANUP_STMT for the nrv. - * cp-tree.h: Declare it. - * optimize.c (declare_return_variable): Replace the nrv with the - return variable. - * typeck.c (check_return_expr): Be more flexible on alignment check. - Ignore cv-quals when checking for a matching type. - -2001-08-09 Richard Henderson - - * decl2.c (finish_objects): Use target hooks instead of - assemble_constructor and assemble_destructor. - -2001-08-08 John David Anglin - - * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'. - -2001-08-07 Nathan Sidwell - - PR c++/3820 - Stop using TYPE_NONCOPIED_PARTS. - * call.c (build_over_call): Be careful when copy constructing - or assigning to an empty class. - * class.c (check_bases_and_members): It has a - COMPLEX_ASSIGN_REF if it has a vptr. - (layout_class_type): Don't add empty class padding to - TYPE_NONCOPIED_PARTS. - (finish_struct_1): Don't add the VFIELD either. - * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_ - initialization. - -2001-08-07 Jason Merrill - - * tree.c (walk_tree): Walk siblings even if !walk_subtrees. - -2001-08-06 Richard Henderson - - * decl2.c (finish_objects): Pass a symbol_ref and priority to - assemble_{constructor,destructor}. Remove priority handling. - -2001-08-05 Gabriel Dos Reis - - Don't allow template-id in using-declaration. - * decl2.c (validate_nonmember_using_decl): Handle template-ids. - (do_class_using_decl): Likewise. - -2001-08-04 Neil Booth - - * cp/spew.c (read_token): No need to pop buffers. - -2001-08-02 Stan Shebs - - * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used. - (fnaddr_from_vtable_entry): Remove decl. - * method.c (use_thunk): Update comment. - -2001-08-01 Andrew Cagney - - * repo.c (get_base_filename): Change return value to const char - pointer. - -2001-08-02 Nathan Sidwell - - Kill -fhonor-std. - * NEWS: Document. - * cp-tree.h (flag_honor_std): Remove. - (CPTI_FAKE_STD): Remove. - (std_node): Remove comment about it being NULL. - (fake_std_node): Remove. - * decl.c (in_fake_std): Remove. - (walk_namespaces_r): Remove fake_std_node check. - (push_namespace): Remove in_fake_std code. - (pop_namespace): Likewise. - (lookup_name_real): Remove fake_std_node check. - (init_decl_processing): Always create std_node. Always add - std:: things there. - (builtin_function): Always put non '_' fns in std. - * decl2.c (flag_honor_std): Remove. - (lang_f_options): Remove honor-std. - (unsupported_options): Add honor-std. - (set_decl_namespace): Remove fake_std_node check. - (validate_nonmember_using_decl): Likewise. - (do_using_directive): Likewise. - (handle_class_head): Likewise. - * dump.c (cp_dump_tree): Likewise. - * except.c (init_exception_processing): Adjust. - * init.c (build_member_call): Remove fake_std_node check. - (build_offset_ref): Likewise. - * lang-options.h: Remove -fhonor-std, -fno-honor-std. - * rtti.c (init_rtti_processing): Adjust. - -2001-07-31 Alexandre Petit-Bianco - - * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second - operand while calling cp_tree_equal. - -2001-07-31 Nathan Sidwell - - The 3.0 ABI no longer has vbase pointer fields. - * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P, - FORMAT_VBASE_NAME): Remove. - * method.c (do_build_copy_constructor): Adjust. - (do_build_assign_ref): Adjust. - * search.c (lookup_field_r): Adjust. - * typeck.c (build_component_ref): Adjust. - - The 3.0 ABI always has a vtable pointer at the start of every - polymorphic class. - * rtti.c (build_headof_sub): Remove. - (build_headof): Adjust. - (get_tinfo_decl_dynamic): No need to check flag_rtti - here. Adjust. - (create_real_tinfo_var): Explain why we need a hidden name. - -2001-07-31 Nathan Sidwell - - PR c++/3631 - * class.c (update_vtable_entry_for_fn): The fixed adjustment - of a virtual thunk should be from declaring base. - -2001-07-31 Nathan Sidwell - - * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into - the shared virtual base, so preserving inheritance graph order. - -2001-07-30 Andreas Jaeger - - * decl2.c: Remove unused var global_temp_name_counter. - -2001-07-28 Richard Henderson - - * method.c (pending_inlines): Remove. - -2001-07-27 Nathan Sidwell - - * class.c (mark_primary_virtual_base): Don't adjust base - offsets here. - (dfs_unshared_virtual_bases): Adjust them here. - (mark_primary_bases): Explain why we adjust at the end. - -2001-07-27 Nathan Sidwell - - * class.c (finish_struct_1): When copying the primary base's - VFIELD, make sure we find it is at offset zero. - -2001-07-26 Kriang Lerdsuwanakij - - * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and - tsubst_expr for default template arguments. - -2001-07-26 Nathan Sidwell - - PR c++/3621 - * spew.c (yylex): Only copy the token's lineno, if it is - nonzero. - -2001-07-26 Nathan Sidwell - - PR c++/3624 - * call.c (resolve_args): Simplify, call - convert_from_reference. - (build_new_op): Resolve and convert from reference ARG1 - earlier. Adjust ARG2 & ARG3 resolve and conversion. - -2001-07-26 Nathan Sidwell - - * decl.c (last_function_parm_tags): Remove. - (current_function_parm_tags): Remove. - (init_decl_processing): Adjust. - (start_function): Adjust. - (store_parm_decls): Adjust. - - PR c++/3152 - * decl.c (grokdeclarator): Detect when a function typedef is - declaring a function, and create last_function_parms correctly. - -2001-07-25 Jason Merrill - - * call.c (joust): Only prefer a non-builtin candidate to a builtin - one if they have the same signature. - - * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on - it rather than toplevel_bindings_p. Give it a mangled name if static. - (convert_to_reference): Adjust. - * decl2.c (get_temp_name): Lose. - * mangle.c (mangle_ref_init_variable): New fn. - (mangle_guard_variable): Strip the ref-init header. - * cp-tree.h: Adjust. - * decl.c (cp_finish_decl): Add the DECL_STMT after processing the - initializer. - (grok_reference_init): Always use DECL_INITIAL. - -2001-07-25 Nathan Sidwell - - PR c++/3416 - * call.c (build_conditional_expr): Recheck args after - conversions. - * cp-tree.h (build_conditional_expr): Move to correct file. - * typeck.c (decay_conversion): Diagnose any unknown types - reaching here. - (build_binary_op): Don't do initial decay or default - conversions on overloaded functions. - (build_static_cast): Don't do a decay conversion here. - -2001-07-25 Nathan Sidwell - - PR c++/3543 - * typeck.c (condition_conversion): Resolve an OFFSET_REF. - * expr.c (cplus_expand_expr): An OFFSET_REF should never get here. - -2001-07-25 Nathan Sidwell - - * class.c (build_vtbl_or_vbase_field): Remove, move into ... - (create_vtbl_ptr): ... here. - -2001-07-25 Nathan Sidwell - - * class.c (build_vbase_offset_vbtl_entries): Look for - non-primary base of which we are a sub vtable. - -2001-07-24 Phil Edwards - - * semantics.c (finish_this_expr): Remove unused code. - -2001-07-24 Nathan Sidwell - - Simplify rtti, now we've only one ABI. - * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID, - CPTI_TINFO_VAR_ID. - (tinfo_decl_id, tinfo_var_id): Remove. - (get_typeid_1): Remove. - * rtti.c - (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id. - (typeid_ok_p): New function. - (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl. - (get_tinfo_decl): Remove old abi documentation. - (tinfo_from_decl): Remove. - (get_type_id): Call typeid_ok_p. Absorb get_typeid_1. - (get_typeid_1): Remove. - (get_base_offset): Remove. - (synthesize_tinfo_var): Absorb get_base_offset. - (create_real_tinfo_var): Don't use tinfo_decl_id. - -2001-07-23 Graham Stott - - * cp/class.c (type_requires_array_cookie): Fix use of uninitialized - variable has_two_argument_delete_p. - -2001-07-21 Nathan Sidwell - - Remove flag_vtable_thunk. It is always on for the 3.0 ABI. - * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove. - (CPTI_INDEX_IDENTIFIER): Remove. - (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove. - (delta2_identifier): Remove. - (index_identifier): Remove. - (pfn_or_delta2_identifier): Remove. - (flag_vtable_thunks): Remove. - (VTABLE_DELTA2_NAME): Remove. - (VTABLE_INDEX_NAME): Remove. - (FNADDR_FROM_VTABLE_ENTRY): Adjust. - (vfunc_ptr_type_node): Adjust. - (VTABLE_NAME_PREFIX): Adjust. - (build_vfn_ref): Lose first parameter. - (fixup_all_virtual_upcast_offsets): Remove. - * decl.c (initialize_predefined_identifiers): Remove - delta2_identifier, index_identifier, pfn_or_delta2_identifier. - (init_decl_processing): Remove no-vtable-thunk code. - * decl2.c (flag_vtable_thunks): Remove. - (mark_vtable_entries): Remove no-vtable-thunk code. - * error.c (dump_decl): Remove no-vtable-thunk code. - (dump_expr): Adjust ptr to member function code. - * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk - code. - * rtti.c (build_headof): Remove no-vtable-thunk code. - (get_tinfo_decl_dynamic): Adjust build_vfn_ref call. - * search.c (get_base_distance): Remove expand_upcast_fixups case. - (virtual_context) Remove. - (expand_upcast_fixups): Remove. - (fixup_virtual_upcast_offsets): Remove. - (fixup_all_virtual_upcast_offsets): Remove. - * typeck.c (get_member_function_from_ptrfunc): Remove - no-vtable-thunk code. - * call.c (build_over_call): Adjust call to build_vfn_ref. - * class.c (build_vfn_ref): Lose first parameter. Remove - no-vtable-thunk code. - (build_rtti_vtbl_entries): Remove no-vtable-thunk code. - (build_vtable_entry): Remove no-vtable-thunk code. - -2001-07-20 Nathan Sidwell - - Remove old-abi remnants. Remove comments about old abi - behavior. Remove references to 'new-abi' in comments. - * cp-tree.h: Adjust comments. - (vbase_offsets_in_vtable_p): Delete. - (vcall_offsets_in_vtable_p): Delete. - (vptrs_present_everywhere_p): Delete. - (all_overridden_vfuns_in_vtables_p): Delete. - (merge_primary_and_secondary_vtables_p): Delete. - (TYPE_CONTAINS_VPTR_P): Adjust. - (VTT_NAME_PREFIX): Remove. - (CTOR_VTBL_NAME_PREFIX): Remove. - (init_vbase_pointers): Remove. - * class.c: Adjust coments. - (build_vbase_pointer_fields): Delete. - (build_vbase_pointer): Remove old-abi code. - (build_secondary_vtable): Likewise. - (modify_all_vtables): Likewise. - (create_vtable_ptr): Likewise. - (layout_class_type): Likewise. - (finish_struct_1): Likewise. - (finish_vtbls): Likewise. - (dfs_finish_vtbls): Delete. - (build_vbase_offset_vtbl_entries): Remove old-abi code. - * cvt.c: Adjust comments. - * decl.c: Adjust comments. - * decl2.c: Adjust comments. - * init.c: Adjust comments. - (construct_virtual_bases): Remove old-abi code. - * lang-specs.h: Remove -fno-new-abi. - * mangle.c: Adjust comments. - * rtti.c: Adjust comments. - (get_base_offset): Remove old-abi-code. - * search.c: Adjust comments. - (dfs_init_vbase_pointers): Remove. - (dfs_vtable_path_unmark): Remove. - (init_vbase_pointers): Remove. - * semantics.c: Adjust comments. - (emit_associated_thunks): Remove old-abi code. - * typeck.c: Adjust comments. - -2001-07-20 Daniel Berlin - - * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not - params.h. - -2001-07-19 Mark Mitchell - - * class.c (finish_struct_anon): Forbid nested classes. - -2001-07-19 Neil Booth - - * decl2.c: Don't include dwarfout.h and dwarf2out.h. - * optimize.c: Include debug.h. - (maybe_clone_body): Use debug hook. - * semantics.c: Include debug.h. - (expand_body): Use debug hook. - -2001-07-19 Neil Booth - - * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases. - -2001-07-18 Mark Mitchell - - * class.c (type_requires_array_cookie): New function. - (check_methods): Don't try to figure out whether the type needs a - cookie here. - (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here. - * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove. - (TYPE_VEC_NEW_USES_COOKIE): Reimplement. - * pt.c (instantiate_class_template): Don't set - TYPE_VEC_DELETE_TAKES_SIZE. - * NEWS: Document ABI changes from GCC 3.0. - -2001-07-18 Xavier Delacour , - Gerald Pfeifer - - * NEWS (Changes in GCC 3.0): Fix typo. - -2001-07-13 Joseph S. Myers - - * decl2.c (cplus_decl_attributes): Take a pointer to the node to - which attributes are to be attached, and a flags argument. Update - call to decl_attributes. - (grokfield): Update call to decl_attributes. - * class.c (finish_struct): Update call to cplus_decl_attributes. - * cp-tree.h (cplus_decl_attributes): Update prototype. - * decl.c (start_decl, grokdeclarator, start_function): Update - calls to decl_attributes and cplus_decl_attributes. - * friend.c (do_friend): Update call to cplus_decl_attributes. - * parse.y (parse_bitfield): Update call to cplus_decl_attributes. - -2001-07-12 Mark Mitchell - - * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER - for `register' variables with an asm-specification. - -2001-07-11 Mark Mitchell - - * semantics.c (finish_asm_stmt): Mark the output operands - to an asm addressable, if necessary. - -2001-07-11 Ben Elliston - - * Revert this change -- there is a subtle bug. - - PR c++/80 - * decl.c (finish_enum): New "attributes" argument; pass it to - cplus_decl_attributes. Use a narrower type if the enum is packed. - * cp-tree.h (finish_enum): Adjust prototype. - * parse.y (enum_head): New non-terminal. - (structsp): Use it. Enums now may be preceded or followed by - optional attributes -- pass their chained tree to finish_enum(). - * pt.c (tsubst_enum): Pass NULL_TREE for the new argument. - -2001-07-10 Mark Mitchell - - * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope - variables. - -2001-07-10 Jason Merrill - - * semantics.c (cp_expand_stmt): Fix for null - current_function_return_value. - -2001-07-10 Jan van Male - - * call.c (build_op_delete_call): Initialize fn. - (convert_like_real): Delete conditional. - (joust): Initialize *w and *l. - * class.c: Add prototype for binfo_ctor_vtable. - (get_primary_binfo): Initialize result. - * init.c (build_java_class_ref): Initialize name. - -2001-07-09 Erik Rozendaal - - * typeck.c (unary_complex_lvalue): Do not duplicate the - argument to modify, pre-, or post-increment when used as an - lvalue and when the argument has side-effects. - -2001-07-08 Joseph S. Myers - - * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES. - (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call - cplus_decl_attributes even if attrs is NULL. - * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES. - -2001-07-08 Joseph S. Myers - - * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update - calls to decl_attributes. - -2001-07-06 Ira Ruben - - * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should - be DECL_TEMPLATE_RESULT. - -2001-07-05 Kriang Lerdsuwanakij - - * cp-tree.h (copy_template_template_parm): Rename to ... - (bind_template_template_parm): ... here. - * tree.c (copy_template_template_parm): Rename to ... - (bind_template_template_parm): ... here. Remove the case when - NEWARGS is NULL_TREE. - (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and - BOUND_TEMPLATE_TEMPLATE_PARM. - * pt.c (lookup_template_class): Adjust. - -2001-07-05 Jason Merrill - - * cvt.c (convert_lvalue): New fn. - * cp-tree.h: Declare it. - * method.c (do_build_assign_ref): Use it. - (do_build_copy_constructor): Convert parm to base types - before calling base constructors. - - * typeck.c (check_return_expr): Check DECL_ALIGN instead of - DECL_USER_ALIGN. Check flag_elide_constructors instead of - optimize. - * semantics.c (cp_expand_stmt): Don't destroy the named return value. - -2001-07-02 Nathan Sidwell - - * optimize.c (optimize_inline_calls): New function, broken out - of ... - (optimize_function): ... here. Call it. Don't inline if it is - a thunk. - (dump_function): Print name of dump flag causing this dump. - * semantics.c (expand_body): Move thunk inline check to - optimize_function. - -2001-06-29 Joseph S. Myers - - * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. - (comptypes): Use target.comp_type_attributes. - -2001-06-29 Nathan Sidwell - - * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration. - -2001-06-28 Gabriel Dos Reis - - * error.c (lang_print_error_function): Add a `diagnostic_context *' - parameter. Tweak. - -2001-06-27 Neil Booth - - * decl2.c (import_export_class): Update. - -2001-06-26 Gabriel Dos Reis - - * error.c (init_error): Adjust settings. - -2001-06-26 Gabriel Dos Reis - - * error.c (init_error): Adjust settings. - -2001-06-19 Richard Sandiford - - * except.c (initialize_handler_parm): Expect __cxa_begin_catch to - return pointers to data members by reference rather than by value. - -2001-06-18 Jason Merrill - - Implement the Named Return Value optimization. - * cp-tree.h (struct cp_language_function): Add x_return_value. - (current_function_return_value): Now a macro. - * decl.c: Don't define it. - (define_label, finish_case_label): Don't clear it. - (init_decl_processing): Don't register it with GC. - * semantics.c (genrtl_finish_function): Don't check it for - no_return_label. Copy the RTL from the return value to - current_function_return_value and walk, calling... - (nullify_returns_r): ...this new fn. - * typeck.c (check_return_expr): Set current_function_return_value. - -2001-06-15 Jason Merrill - - * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're - sharing a ctor vtable with. Merge code for cases 1 and 2. - (binfo_ctor_vtable): New fn. - (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it. - -2001-06-14 Jason Merrill - - * class.c (dfs_find_final_overrider): Fix logic. - - * class.c (update_vtable_entry_for_fn): Uncomment optimization to use - virtual thunk instead of non-virtual. - (get_matching_virtual): Uncomment. - - * pt.c (unify): Don't recurse between the POINTER_TYPE and the - OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on - PARM, not ARG. - -2001-06-14 Nathan Sidwell - - * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure - we've not emerged from the hierarchy of RTTI_BINFO on reaching - a non-virtual base. - -2001-06-13 Mark Mitchell - - * NEWS: Update release number. - -2001-06-12 Nathan Sidwell - - PR c++/3130, c++/3131, c++/3132 - * cp-tree.h (BINFO_UNSHARED_MARKED): New #define. - * class.c (force_canonical_binfo_r): Move - BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move - virtual bases unless they're primary and what they're primary - too has been moved. - (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope - with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and - BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most - derived binfo. - (mark_primary_bases): Use BINFO_UNSHARED_MARKED. - (layout_nonempty_base_or_field): Add most derived type - parameter. Adjust. - (layout_empty_base): Likewise. - (build_base_field): Likewise. - (build_base_fields): Likewise. - (propagate_binfo_offsets): Add most derived type - parameter. Skip non canonical virtual bases too. - (dfs_set_offset_for_unshared_vbases): Don't skip primary - bases. Do skip canonical bases. - (layout_virtual_bases): Adjust. - (layout_class_type): Adjust. - (dfs_get_primary_binfo): Build list of virtual primary base - candidates. - (get_primary_binfo): Check that the shared virtual primary - base candidate was found first. - (accumulate_vtbl_inits): Don't do anything for non-vptr - containing binfos. For case 1 primary virtual bases, keep - checking that we've not emerged from the hierarchy of RTTI_BINFO. - -2001-06-12 Nathan Sidwell - - PR c++/3089 - * class.c (dfs_accumulate_vtbl_inits): Always walk down the - hierarchy looking for primary bases for a ctor - vtable. Recursively call oneself, if we meet our primary via - this route and haven't met it yet via inheritance graph order. - -2001-06-11 Mark Mitchell - - * lang-options.h: Emit documentation for -fno-honor-std, not - -fhonor-std. - -2001-06-10 Alexandre Oliva - - * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]: - Don't clobber delta. - (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn. - -2001-06-10 Mark Mitchell - Gabriel Dos Reis - - * Make-lang.in (cp/call.o): Depend on diagnostic.h - (cp/typeck.o): Depend on diagnostic.h - (cp/typeck2.o): Depend on diagnostic.h - (cp/repo.o): Depend on dignostic.h - * typeck.c: #include diagnostic.h - (convert_for_initialization): Remove extern declaration for - warningcount and errorcount. - - * call.c: #include diagnostic.h - (convert_like_real): Remove extern declaration for warnincount and - errorcount. - - * repo.c: #include diagnostic.h - * typeck2.c: #include diagnostic.h - -2001-06-08 Nathan Sidwell - - * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko - in previous change. - -2001-06-08 Nathan Sidwell - - PR c++/2929 - * friend.c (do_friend): Use push_decl_namespace for classes at - namespace scope. - -2001-06-08 Nathan Sidwell - Jason Merrill - - PR c++/3061 - * class.c (build_secondary_vtable): Use assert, rather than an error - message. - (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL. - (dfs_accumulate_vtbl_inits): A lost primary virtual base may - be between ORIG_BINFO and RTTI_BINFO, but neither of them. - Don't set BINFO_VTABLE for a primary virtual base. - -2001-06-07 Mark Mitchell - - * decl.c (duplicate_decls): Update source position information - when a template function is defined. - -2001-06-07 Phil Edwards - - * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. - -2001-06-07 Nathan Sidwell - - PR c++/2914 - * decl.c (pushtag): Don't push into a complete type's scope. - -2001-06-06 Jason Merrill - - * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose. - (struct lang_decl_flags): Lose generate_with_vtable_p. - (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose. - * class.c (copy_virtuals): Adjust. - * decl2.c (mark_vtable_entries): Adjust. - * method.c (make_thunk, build_vtable_entry): Adjust. - * class.c (update_vtable_entry_for_fn): Only look as far as the - first defining class. - (build_vtbl_initializer): Put nothing in the slot for a function only - defined in a lost primary virtual base. - (add_vcall_offset_vtbl_entries_1): Use the same code for - the lost primary case and the normal case. - (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base. - (get_vfield_offset, get_derived_offset): Lose. - (dfs_find_final_overrider): Use look_for_overrides_here. - (get_matching_virtual): New fn. - * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P, - not BV_VCALL_INDEX. - * search.c (look_for_overrides_here): Split out from... - (look_for_overrides_r): Here. - - * class.c (find_final_overrider): Return error_mark_node on error. - - * decl2.c (key_method): #if 0 accidental change. - -2001-06-06 John David Anglin - - * call.c (convert_default_arg): Use INTEGRAL_TYPE_P. - (build_over_call): Likewise. - * decl.c (grokparms): Likewise. - * pt.c (tsubst_decl): Likewise. - * typeck.c (convert_arguments): Likewise. - -2001-06-05 Mark Mitchell - - * semantics.c (begin_class_definition): Robustify. - - * pt.c (instantiate_decl): Tell the repository code about the - clones, not the cloned functions. - * repo.c (repo_template_used): Explicitly instantiate the cloned - function, not the clones. - -2001-06-05 Nathan Sidwell - - * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and - ICS_BAD_FLAG on created conversion. - (compare_ics): Break out rank. - -2001-06-05 Nathan Sidwell - - * decl.c (xref_tag): Remove extraneous %s on dependent name - lookup warning. - -2001-06-05 Nathan Sidwell - - * class.c (layout_vtable_decl): Fix off by one error on - build_index_type. - (build_vtt): Likewise. - (build_ctor_vtbl_group): Likewise. - -2001-06-05 Nathan Sidwell - - * class.c (maybe_indent_hierarchy): New function. - (dump_class_hierarchy_r): Add flags. Dump extra binfo - information, if enabled. Use maybe_indent_hierarchy. Adjust - output format. - (dump_class_hierarchy): Adjust prototype. Adjust output format. - (dump_array, dump_vtable, dump_vtt): New functions. - (finish_struct_1): Adjust hierarchy dumping. - (initialize_vtable): Call dump_vtable. - (build_vtt): Call dump_vtt. - (build_ctor_vtbl_group): Call dump_vtable. - * decl2.c (flag_dump_class_layout): Remove. - (cxx_decode_option): Remove dump translation unit - and dump class hierarchy check. Call dump_switch_p. - (finish_file): Adjust dumping. - (dump.c): Only dump base classes if not TDF_SLIM. - Only dump namespace members if not TDF_SLIM. - * optimize.c (dump_function): New function. - (optimize_function): Call dump_function. - * semantics.c (expand_body): Use dump_enabled_p. - -2001-06-01 Nathan Sidwell - - PR g++/2936 - Part missed from first commit - * decl2.c (finish_anon_union): Copy context. - -2001-05-30 Nathan Sidwell - - PR g++/2936 - * optimize.c (remap_decl): Remap anonymous aggregate members too. - -2001-05-26 Nathan Sidwell - - PR g++/2823 - * semantics.c (expand_body): Don't optimize thunks. - -2001-05-25 Sam TH - - * cp-tree.h lex.h: Fix header include guards. - -2001-05-25 Mark Mitchell - - * decl.c (init_decl_processing): Tweak. - -2001-05-24 Mark Mitchell - - * decl.c (duplicate_decls): Tidy. - (init_decl_processing): Always set flag_no_builtin. - -2001-05-24 Nathan Sidwell - - PR c++/2184 - * decl2.c (do_local_using_decl): Push the decls, even in a - template. - -2001-05-22 Mark Mitchell - - * optimize.c (initialize_inlined_parameters): Don't set - TREE_READONLY for a VAR_DECL taking the place of an inlined - PARM_DECL. - -2001-05-22 Jason Merrill - - * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support. - * tree.c (cp_valid_lang_attribute): Warn about use of com_interface - attribute. - -2001-05-22 Joseph S. Myers - - * parse.y: Refer to compound literals as such, not as - constructor-expressions. - -2001-05-21 Mark Mitchell - - * call.c (build_op_delete_call): Ignore exception-specifications - when looking for matching delete operators. - * init.c (build_new_1): Compute whether or not the allocation - function used is a placement allocation function or not, and - communicate this information to build_op_delete_call. - -2001-05-21 Jason Merrill - - * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi. - (build_vtbl_ref): Adjust. - (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address. - * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks. - Re-add vtable-gc. - (unsupported_options): Correspondingly. - - * decl2.c (maybe_make_one_only): Check flag_weak, not - supports_one_only(). - - * cp-tree.def (START_CATCH_STMT): Lose. - * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS. - * tree.c (cp_statement_code_p): Don't case it. - * semantics.c (cp_expand_stmt): Likewise. - * cp-tree.h (START_CATCH_TYPE): Lose. - (HANDLER_TYPE): New. - * except.c (expand_start_catch_block): Don't start any blocks. - Return the type. - (expand_end_catch_block): Don't end any blocks. - * parse.y (handler): Don't pass anything from finish_handler_parms - to finish_handler. - * pt.c (tsubst_expr): Likewise. - * semantics.c (begin_handler): Call note_level_for_catch here. - (finish_handler_parms): Don't return anything. - (genrtl_catch_block, begin_catch_block): Lose. - (genrtl_handler): Call expand_start_catch here. - -2001-05-18 Jason Merrill - - * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here. - (get_vtable_decl, build_vtt): Not here. - -2001-05-20 Nathan Sidwell - - PR c++/2781 - * optimize.c (update_cloned_parm): Copy addressability and other - flags. - -2001-05-20 Kriang Lerdsuwanakij - - * pt.c (determine_specialization): Ignore artificial functions. - -2001-05-20 Neil Booth - - * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. - (C_RID_CODE): Remove. - * lex.c (cxx_init_options): Call set_identifier_size. Update. - (init_parse): Don't do it here. - -2001-05-18 Diego Novillo - - * decl2.c (finish_objects): Use the original SYMBOL_REF from the - function declaration to avoid stripping the symbol's attributes. - -2001-05-18 Nathan Sidwell - - * decl.c (pushdecl): Adjust error string. - (xref_tag): Adjust friend class injection warning. Remove the - inherited name from the class shadowed scope. - -2001-05-17 Mark Mitchell - - * except.c (cp_protect_cleanup_actions): New function. - (init_exception_processing): Don't set protect_cleanup_actions - here. Do set lang_protect_cleanup_actions. - -2001-05-16 Nathan Sidwell - - * spew.c (read_token): Call yyerror on all unexpected tokens. - -2001-05-16 Nathan Sidwell - - * init.c (member_init_ok_or_else): Take a tree rather than - string for name. - (expand_member_init): Adjust. - -2001-05-14 Nick Clifton - - * decl.c (duplicate_decls): Suppress warning about duplicate - decls if the first decl is a friend. - -2001-05-12 Zack Weinberg - - * except.c (choose_personality_routine): Export. Add - explanatory comment. Take an enum languages, not a boolean. - (initialize_handler_parm): Adjust to match. - * cp-tree.h: Prototype choose_personality_routine. - * lex.c (handle_pragma_java_exceptions): New function. - (init_cp_pragma): Register #pragma GCC java_exceptions. - -2001-05-12 Neil Booth - - * method.c (build_mangled_C99_name): Remove unused prototype. - -2001-05-12 Alexandre Oliva - - * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type. - * typeck.c (get_member_function_from_ptrfunc, - build_ptrmemfunc, expand_ptrmemfunc_cst): Take - TARGET_PTRMEMFUNC_VBIT_LOCATION into account. - - Reverted Geoff Keating's 2001-05-03's patch. - -2001-05-11 Ira Ruben - - * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h. - -2001-05-11 Neil Booth - - * cp-tree.h (finish_label_expr, lookup_label): Delete. - * parse.y: Update for '&&'; don't issue warning here. - * semantics.c (finish_label_expr): Delete. - -2001-05-07 Mark Mitchell - - * splay-tree.h (splay_tree_max): New function. - (splay_tree_min): Likewise. - -2001-05-03 Geoffrey Keating - - * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER. - (pfn_vflag_identifier): Define. - Update comment about layout of pointer functions. - (build_ptrmemfunc1): Update prototype. - (expand_ptrmemfunc_cst): Update prototype. - * decl.c (initialize_predefined_identifiers): Initialize - pfn_vflag_identifier. - (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add - an extra field to the type. - * expr.c (cplus_expand_constant): Pass 'flag' between - expand_ptrmemfunc_cst and build_ptrmemfunc1. - * typeck.c (get_member_function_from_ptrfunc): When - FUNCTION_BOUNDARY < 16, look at additional field to determine - if a pointer-to-member is a real pointer or a vtable offset. - (build_ptrmemfunc1): Add new parameter to contain extra field. - (build_ptrmemfunc): Pass the extra field around. - (expand_ptrmemfunc_cst): Add new parameter to return extra field. - (pfn_from_ptrmemfunc): Ignore the extra field. - -2001-05-03 Mark Mitchell - - * cp-tree.h (flag_inline_trees): Update documentation. - * decl.c (init_decl_processing): Adjust handling of - flag_inline_functions and flag_inline_trees to support -O3. - (grokfndecl): Set DECL_INLINE on all functions if that's what - the user requested. - (save_function_data): Clear DECL_INLINE in - current_function_cannot_inline is non-NULL. - * decl2.c (flag_inline_trees): Update documentation. - -2001-05-03 Nathan Sidwell - - * dump.c (cp_dump_tree, USING_STMT case): New case. - * tree.c (cp_statement_code_p): Add USING_STMT. - * decl2.c (do_using_directive): Add the using directive statement. - - * tree.c (walk_tree): Reformat an if block. - -2001-05-02 Mark Mitchell - - * decl.c (compute_array_index_type): Don't try to do anything with - the indices when processing a template. - -2001-05-02 Kaveh R. Ghazi - - * call.c: NULL_PTR -> NULL. - * class.c: Likewise. - * cvt.c: Likewise. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * init.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - -2001-05-02 Mark Mitchell - - * decl2.c (do_using_directive): Revert previous patch. - -2001-05-01 Nathan Sidwell - - * cp-tree.def (USING_STMT): New statement node. - * cp-tree.h (USING_STMT_NAMESPACE): New macro. - * decl2.c (do_using_directive): Add USING_STMT to statement - tree. Don't emit errors when processing template decl. - * pt.c (tsubst_expr, USING_STMT case): New case. - * semantics.c (cp_expand_stmt, USING_STMT case): New case. - -2001-05-01 Nathan Sidwell - - * call.c (build_new_op): Convert args from reference here. - (build_conditional_expr): Don't convert here. - -2001-05-01 Nathan Sidwell - - * spew.c (last_token_id): New static variable. - (read_token): Set it here. - (yyerror): Use it here. - -2001-04-30 Richard Henderson - - * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations. - * decl.c: Likewise. - -2001-04-30 Mark Mitchell - - * gxxint.texi: Remove. - * Make-lang.in: Remove all traces of gxxint.texi. - -2001-04-30 Mark P Mitchell - - * decl2.c (start_static_initialization_or_destruction): Correct - logic to handle the -fno-use-cxa-atexit case. - -2001-04-30 Mark Mitchell - - * optimize.c (update_cloned_parm): New function. - (maybe_clone_body): Use it. Update the `this' parameter too. - -2001-04-29 Joseph S. Myers - - * decl2.c (unsupported_options): Add new-abi. - * lang-options.h: Remove no longer supported options. - -2001-04-27 Nathan Sidwell - - * except.c (can_convert_eh): Don't check template parms, - typename types etc. - -2001-04-27 Nathan Sidwell - - * optimize.c (maybe_clone_body): Copy parameter names and locations. - -2001-04-27 Nathan Sidwell - - * cp-tree.h (adjust_clone_args): Prototype new function. - * class.c (adjust_clone_args): New function. - * decl.c (start_function): Call it for in charge ctors. - -2001-04-26 Mark Mitchell - - * method.c (use_thunk): Make sure that thunks really are emitted - when requested. - -2001-04-26 Nathan Sidwell - - * mangle.c (write_chars): New macro. - (hwint_to_ascii): New function - (write_number): Use it. - (write_integer_cst): Deal with really big numbers. - -2001-04-25 Mark Mitchell - - * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting - the clone. - -2001-04-25 Nathan Sidwell - - * decl.c (grokdeclarator): Set context of namespace scope - TYPE_DECLS. - -2001-04-24 Zack Weinberg - - * cp/optimize.c: Include hashtab.h. - (struct inline_data): Add tree_pruner. - (expand_call_inline, expand_calls_inline): Use it when calling - walk_tree. - (optimize_function): Initialize and free tree_pruner. - -2001-04-24 Nathan Sidwell - - Lazy __FUNCTION__ generation. - * cp-tree.def (FUNCTION_NAME): Remove. - * cp-tree.h (function_name_declared_p): Remove. - (cp_fname_init): Prototype. - * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids, - don't call declare_function_name. Call start_fname_decls. - (cp_make_fname_decl): Adjust parameters. Generate the name. Don't - clobber the line number. - (cp_fname_init): New function. - (start_function): Call start_fname_decls. - (finish_function): Call finish_fname_decls. - * lex.c (reswords): Add slots for __FUNCTION__ et al. - (rid_to_yy): Add mappings for __FUNCTION__ et al. - * optimize.c (maybe_clone_body): Remove function_name_declared_p. - * parse.y (VAR_FUNC_NAME): New token. - (primary): Add VAR_FUNC_NAME. - * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's - generation. - (tsubst, FUNCTION_NAME case): Remove. - (tsubst_copy, FUNCTION_NAME case): Remove. - (tsubst_expr, DECL_STMT case): Be careful with a - DECL_PRETTY_FUNCTION_P. - (instantiate_decl): Remove function_name_declared_p. - * semantics.c (begin_compound_statement): Don't call - declare_function_name here. - (setup_vtbl_ptr). Don't save & restore function_name_declared_p. - (finish_translation_unit): Call finish_fname_decls. - (expand_body): Remove function_name_declared_p. - * typeck2.c (digest_init): Allow any ERROR_MARK. - -2001-04-24 Nathan Sidwell - - * pt.c (tsubst_decl): Use VOID_TYPE_P. - * semantics.c: Fix some typos. - -2001-04-23 Phil Edwards - - * cp/decl2.c (flag_honor_std): Always initialize to 1. - -2001-04-22 Kaveh R. Ghazi - - * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf. - -2001-04-23 Jason Merrill - - * except.c (build_throw): Wrap the initialization of the exception - object in a MUST_NOT_THROW_EXPR. - (do_free_exception): #if 0. - -2001-04-20 Mark Mitchell - - * cp-tree.h (finish_enum): Change prototype. - * decl.c (finish_enum): Reorganize. - * parse.y (structsp): Adjust calls to finish_enum. - -2001-04-20 Nathan Sidwell - - * tree.c (cp_tree_equal): Adjust final switch formatting. Add - 't' case. - -2001-04-20 Nathan Sidwell - - * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED. - (layout_empty_base): Return at end flag. - (build_base_field): Likewise. - (build_base_fields): Likewise. - (layout_virtual_bases): Don't add 1 to eoc value. - (end_of_class): Use full size for empty bases. - (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended - empty bases. Don't add 1 to eoc value. Only add trailing padding - if we're an empty class with no empty bases. - (dump_class_hierarchy): Dump size and alignment. - -2001-04-20 Jakub Jelinek - - * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and - ICS_BAD_FLAG. - -2001-04-20 Jakub Jelinek - - * search.c (lookup_field_r): If looking for type and non-TYPE_DECL - is found, look first if name does not match the structure name. - -2001-04-19 Mark Mitchell - - * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is - set. - (SET_DECL_LANGUAGE): New macro. - * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE. - (pushdecl): Likewise. - (build_library_fn_1): Likewise. - (build_cp_library_fn): Likewise. - (grokfndecl): Likewise. - (grokvardecl): Mark `extern "C"' variables as having C linkage. - * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE. - * lex.c (retrofit_lang_decl): Likewise. - * mangle.c (mangle_decl_string): Don't mangle the names of - variables declared with C language linkage. - * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE. - -2001-04-18 John David Anglin - - * semantics.c (simplify_aggr_init_exprs_r): Don't restore - flag_access_control from uninitialized storage. - -2001-04-15 Mark Mitchell - - * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation. - * mangle.c (write_pointer_to_member_type): Fix mangling of - pointers to cv-qualified member function types. - - * init.c (build_delete): Create a SAVE_EXPR for the address if - we're going to use it more than once. - -2001-04-13 Mark Mitchell - - * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove. - (expand_ptremfunc_cst): Change prototype. - (delta2_from_ptrmemfunc): Remove. - * expr.c (cplus_expand_constant): Adjust call to - expand_ptrmemfunc_cst. - * typeck.c (build_ptrmemfunc1): Simplify. - (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still - results in a constant. - (expand_ptrmemfunc_cst): Remove idx and delta2 parameters. - (delta2_from_ptrmemfunc): Remove. - (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst. - -2001-04-12 Jason Merrill - - * cp-tree.h (decl_namespace_list): New macro. - (struct saved_scope): Add decl_ns_list. - * decl.c (mark_saved_scope): Mark it. - * decl2.c: Lose static decl_namespace_list. - (init_decl2): Don't save it. - -2001-04-12 Kaveh R. Ghazi - - * cp-tree.h (warn_return_type, yylex): Delete redundant - declarations. - - * decl.c (current_class_depth, global_namespace): Likewise. - - * decl2.c (current_class_depth, flag_gnu_xref): Likewise - - * repo.c (flag_use_repository): Likewise. - -2001-04-12 Kaveh R. Ghazi - - * cp-tree.h (pedantic, convert, global_bindings_p, insert_block, - set_block, pushdecl, getdecls, gettags, init_decl_processing, - maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p, - lvalue_or_else, print_lang_statistics, comp_target_types, - unsigned_type, signed_type, signed_or_unsigned_type, - build_function_call, mark_addressable, incomplete_type_error): - Delete redundant declarations. - -2001-04-11 Jason Merrill - - * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro. - (TYPE_ANONYMOUS_P): New macro. - (TAGGED_TYPE_P): New macro. - * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P. - (grokfndecl, grokvardecl, grokdeclarator): Likewise. - * tree.c (no_linkage_helper): Likewise. - * semantics.c (begin_class_definition): Likewise. - * pt.c (convert_template_argument): Likewise. - * lex.c (check_for_missing_semicolon): Likewise. - -2001-04-12 Nathan Sidwell - - * class.c (dfs_unshared_virtual_bases): New function. - (mark_primary_bases): Call it. - (check_bases): Ignore virtual bases when determining - nearly-emptiness. - -2001-04-12 Nathan Sidwell - - * method.c (make_thunk): Clear DECL_CLONED_FUNCTION. - -2001-04-11 Mark Mitchell - - * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the - cloned function to the clone. - -2001-04-11 Kaveh R. Ghazi - - * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). - - * semantics.c: Include expr.h. - -2001-04-11 Nathan Sidwell - - * method.c (implicitly_declare_fn): Commonize code for copy ctor - and assignment op. Set TREE_USED for parameter. - -2001-04-10 Mark Mitchell - - * class.c (find_final_overrider_data): Add `candidates'. - (dfs_find_final_overrider): Don't issue error messages - prematurely. - (find_final_overrider): Issue error messages here. - (build_base_field): Don't warn about amgibuous direct bases here. - (warn_about_ambiguous_direct_bases): New function. - (layout_class_type): Use it. - -2001-04-10 Richard Henderson - - * typeck.c (build_array_ref): Push the array reference inside - COMPOUND_EXPR and COND_EXPR. - -2001-04-05 Mark Mitchell - - * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P. - * decl.c (duplicate_decls): Adjust accordingly. - (maybe_commonize_var): Likewise. - (grokfndecl): Likewise. - (start_function): Likewise. - (start_method): Likewise. - * decl2.c (key_method): Likewise. - (import_export_decl): Likewise. - * method.c (implicitly_declare_fn): Likewise. - * optimize.c (maybe_clone_body): Likewise. - -2001-04-05 Benjamin Kosnik - - * lang-specs.h: Add __DEPRECATED. - -2001-04-05 J"orn Rennecke - - * search.c (get_dynamic_cast_base_type): When building a new - constant, set its type to ssizetype. - -2001-04-04 Jakub Jelinek - - * optimize.c (expand_call_inline): Only add newly inlined statements - into inlined_stmts. - -2001-04-03 Mark Mitchell - - * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove. - (OPERATOR_FORMAT): Likewise. - (OPERATOR_TYPENAME_FORMAT): Likewise. - * operators.def: Remove old name-mangling information. - * decl.c (grok_op_properties): Adjust accordingly. - * lex.c (init_operators): Likewise. - * rtti.c (get_tinfo_decl): Issue error messages about types that - have variable size. - -2001-04-03 Mark Mitchell - - * decl2.c (import_export_decl): Don't call import_export_class - when processing an inline member function. - * semantics.c (expand_body): Call import_export_decl before - emitting inline functions. - -2001-03-28 Richard Henderson - - IA-64 ABI Exception Handling: - * cp-tree.def (EH_SPEC_BLOCK): New. - (MUST_NOT_THROW_EXPR): New. - * cp-tree.h: Update changed function declarations. - (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove. - (CPTI_CALL_UNEXPECTED): New. - (struct cp_language_function): Rename x_eh_spec_try_block - to x_eh_spec_block. - (EH_SPEC_STMTS, EH_SPEC_RAISES): New. - * decl.c (current_binding_level): If no current function - bindings, revert to scope_chain. - (initialize_predefined_identifiers): Remove __cp_push_exception. - (store_parm_decls): Use begin_eh_spec_block. - (finish_function): Use finish_eh_spec_block. - (mark_lang_function): Update for name changes. - * decl2.c (finish_file): No mark_all_runtime_matches. - * dump.c (cp_dump_tree): Handle new tree codes. - * error.c (dump_expr) [BIND_EXPR]: Fix typo. - * except.c (catch_language_init, catch_language): Remove. - (init_exception_processing): Don't set language code. - Initialize call_unexpected_node, protect_cleanup_actions, - eh_personality_libfunc, lang_eh_runtime_type. - (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove. - (get_eh_type, get_eh_caught, get_eh_handlers): Remove. - (prepare_eh_type): Split out type canonicalizations ... - (build_eh_type_type): ... from here. - (build_eh_type_type_ref): Remove. - (mark_all_runtime_matches): Remove. - (build_exc_ptr): New. - (do_begin_catch, do_end_catch): New. - (do_pop_exception): Remove. - (build_terminate_handler): Remove. - (choose_personality_routine): Split out language choice from ... - (initialize_handler_parm): ... here. - Use MUST_NOT_THROW_EXPR. - (expand_start_catch_block): Use do_begin_catch. Simplify Java - exception object handling. - (expand_start_eh_spec, expand_end_eh_spec): Remove. - (expand_exception_blocks, alloc_eh_object): Remove. - (begin_eh_spec_block, finish_eh_spec_block): New. - (do_allocate_exception, do_free_exception): New. - (expand_throw): Merge into ... - (build_throw): ... here. Update for abi. - * expr.c (cplus_expand_expr): No expand_internal_throw. - Handle MUST_NOT_THROW_EXPR. - * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK. - * semantics.c (*) Update for except.h name changes. - (genrtl_try_block): No protect_with_terminate. - (genrtl_eh_spec_block): New. - (genrtl_handler): Don't emit the goto here. - (cp_expand_stmt): Handle EH_SPEC_BLOCK. - (genrtl_finish_function): Don't expand_exception_blocks. - * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK. - -2001-03-28 Richard Henderson - - * decl.c (struct named_label_list): Rename eh_region to - in_try_scope, add in_catch_scope. - (struct binding_level): Rename eh_region to is_try_scope, - add is_catch_scope. - (note_level_for_try): Rename from note_level_for_eh. - (note_level_for_catch): New. - (poplevel): Copy both is_try_scope and is_catch_scope to - the named_label_list struct. - (check_previous_goto_1): Don't check for catch block via - DECL_ARTIFICIAL; use in_try_scope instead. - (check_goto): Likewise. - * cp-tree.h (note_level_for_try, note_level_for_catch): Declare. - * except.c (expand_start_catch_block): Call note_level_for_catch. - * semantics.c (begin_compound_stmt): Update for note_level_for_try. - -2001-03-27 Richard Henderson - - * except.c: Use USING_SJLJ_EXCEPTIONS instead of - exceptions_via_longjmp. - -2001-03-27 Phil Edwards - - * pt.c (check_default_tmpl_args): Make error messages clearer. - -2001-03-26 Phil Edwards - - * error.c: Also undefine 'A' macro used for cp_printers definition. - -2001-03-27 Kaveh R. Ghazi - - * Make-lang.in: Depend on $(SYSTEM_H), not system.h. - -2001-03-26 Mike Yang - Mark Mitchell - - * dump.c (dump_access): New function. - (cp_dump_tree): Use it. Dump basetype information for class - types. - -2001-03-26 Mark Mitchell - - * Makefile.in (optimize.o): Depend on params.h. - (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. - (init_decl_processing): Set flag_no_inline when doing - inlining-on-trees. - * optimize.c: Include params.h. - (struct inline_data): Improve documentation of FNS. Add - FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. - (INSNS_PER_STMT): New macro. - (remap_block): Use CLONING_P. - (inlinable_function_p): Don't inline big functions. - (expand_call_inline): Keep track of how much inlining we've done. - (optimize_function): Set FIRST_INLINED_FN. - (maybe_clone_body): Set CLONING_P. - * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in - tree nodes. - (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling - rest_of_compilation. Clear DECL_RTL for local variables - afterwards. - (clear_decl_rtl): New function. - -2001-03-26 Nathan Sidwell - - Implement DR 209 - * cp-tree.h (skip_type_access_control, - reset_type_access_control): Prototype. - * decl.c (grokdeclarator): Access of friends is not checked. - * parse.y (component_decl_list): Reset type access control. - * semantics.c (decl_type_access_control): Clear - current_type_lookups. - (save_type_access_control): Don't save if not deferring. - (skip_type_access_control, reset_type_access_control): New - functions. - (begin_class_definition): Do type access control for basetypes. - Start deferred access control. - (finish_class_definition): Resume immediate access control if - this is a local class. - -2001-03-25 Kaveh R. Ghazi - - * class.c (add_method): Use memcpy/memmove, not bcopy. - - * decl.c (duplicate_decls): Likewise. - -2001-03-23 Jakub Jelinek - - * mangle.c (write_discriminator): Use `_0' for discriminator 1, - not `_'. - -2001-03-23 Jakub Jelinek - - * decl.c (local_names): Define. - (push_local_name): New. - (grok_reference_init): Return init if initializing static reference - variable with non-constant instead of emitting it. - Move expand_static_init call to cp_finish_decl. - (layout_var_decl): Call push_local_name. - (maybe_commonize_var): Allow inlining functions even if they have - static local variables, use comdat_linkage for them if flag_weak. - (check_initializer): Call obscure_complex_init if - grok_reference_init returned nonzero. - (save_function_data): Clear x_local_names. - (pop_cp_function_context): Free x_local_names. - (mark_inlined_fns): Remove. - (mark_lang_function): Mark x_local_names. - (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P. - Mark inlined_fns as tree, remove call to mark_inlined_fns. - * class.c (alter_access): Ensure DECL_ACCESS is never set if - DECL_DISCRIMINATOR_P. - * cp-tree.h (cp_language_function): Add x_local_names. - (lang_decl_flags): Add discriminator into u2. - (lang_decl_inlined_fns): Remove. - (lang_decl): inlined_fns is now a TREE_VEC. - (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define. - * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a - TREE_VEC, not a custom structure. - (optimize_function): Likewise. - * mangle.c (discriminator_for_local_entity): Discriminate among - VAR_DECL local entities. - * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS - is not valid. - -2001-03-22 Bryce McKinlay - - Add support for Java interface method calls. - * cp-tree.h (struct lang_type): Add java_interface flag. - (TYPE_JAVA_INTERFACE): New macro. - * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute - by setting TYPE_JAVA_INTERFACE. - * call.c (java_iface_lookup_fn): New static. - (build_over_call): If calling a method declared in a - TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the - expression which resolves the function address. - (build_java_interface_fn_ref): New function. - -2001-03-22 Richard Henderson - - * Make-lang.in (cp/except.o): Don't depend on insn-flags.h. - * except.c: Don't include it. - -2001-03-22 Gerald Pfeifer - based on an idea from Joe Buck - - * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore): - New nonterminals. - (data_def, component_decl): Add reductions to bad_decl. - -2001-03-22 Jakub Jelinek - - * method.c (do_build_assign_ref): Don't use build_modify_expr for - anonymous aggregates, since they don't have assignment operator - method. - * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy - assignment operators for anonymous structure fields. - -2001-03-21 Jason Merrill - - * pt.c (instantiate_decl): Abort if we see a member constant - instantiation that doesn't already have its initializer. - Downgrade explicit instantiation without definition to pedwarn. - - * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove. - * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P. - (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P. - - * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove. - (pending_vtables): Remove. - * decl2.c (pending_vtables): Remove. - (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not - CLASSTYPE_VTABLE_NEEDS_WRITING. - (import_export_class): Likewise. - (init_decl2): Don't mark pending_vtables. - * lex.c (handle_pragma_vtable): Just sorry. - * pt.c (instantiate_class_template): Don't mess with - CLASSTYPE_VTABLE_NEEDS_WRITING. - (mark_class_instantiated): Likewise. - * ptree.c (print_lang_type): Don't print it. - * semantics.c (begin_class_definition): Don't set it. - - * pt.c (template_tail): Replace with last_pending_template. - (maybe_templates, maybe_template_tail): Remove. - (add_pending_template): Adjust. - (instantiate_pending_templates): Adjust. - - * cp-tree.h (struct saved_scope): Remove lang_stack field. - (current_lang_stack): Remove. - * decl.c (maybe_push_to_top_level): Don't initialize it. - (duplicate_decls): Use current_lang_depth. - (xref_basetypes): Likewise. - * class.c (current_lang_depth): New fn. - (push_lang_context): Use more varray functionality. - (pop_lang_context): Likewise. - - * error.c (GLOBAL_THING): Always use '__'. - -2001-03-21 Mark Mitchell - - * class.c (build_clone): Clear DECL_ASSEMBLER_NAME. - - * mangle.c (mangle_decl_string): Mangle the names of overloaded - operators, even when they have `extern "C"' linkage. - -2001-03-19 Mark Mitchell - - * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (add_method): Remove optimization involving comparison of - DECL_ASSEMBLER_NAME. - (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (check_methods): Likewise. - (build_clone): Likewise. - (built_vtt): Likewise. - * cp-tree.h (DECL_NEEDED_P): Likewise. - * decl.c (pushtag): Likewise. - (duplicate_decls): Likewise. - (pushdecl): Likewise. - (builtin_function): Likewise. - (build_library_fn_1): Set DECL_LANGUAGE for library functions. - (build_cp_library_fn): Likewise. - (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (make_rtl_for_nonlocal_decl): Likewise. - (cp_finish_decl): Likewise. - (grokfndecl): Likewise. - (grokvardecl): Likewise. - (grokdeclarator): Likewise. - (start_function): Likewise. - (cp_missing_return_ok_p): Likewise. - * decl2.c (grokclassfn): Likewise. - (check_classfn): Likewise. - (finish_static_data_member_decl): Likewise. - (grokfield): Likewise. - * error.c (GLOBAL_IORD_P): Remove. - (dump_global_iord): Improve output. - (dump_decl): Avoid using DECL_ASSEMBLER_NAME. - * except.c (nothrow_libfn_p): Summarily reject any function not in - namespace-scope. - * init.c (build_java_class_ref): Don't explicitly set - DECL_ASSEMBLER_NAME after calling mangle_decl. - * mangle.c (mangle_decl_string): Handle extern "C" functions. - (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl. - * method.c (set_mangled_name_for_decl): Don't explicitly set - DECL_ASSEMBLER_NAME after calling mangle_decl. - (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and - IDENTIFIER_GLOBAL_VALUE for the thunk. - * pt.c (set_mangled_name_for_template_decl): Remove. - (check_explicit_specialization): Don't use it. - (looup_template_class): Don't set DECL_ASSEMBLER_NAME. - (tsubst_friend_function): Likewise. - (tsubst_decl): Likewise. - (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME. - * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME, - COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME - where it's not necessary. - (tinfo_base_init): Likewise. - (create_real_tinfo_var): Likewise. - * search.c (looup_field_1): Likewise. - * semantics.c (finish_named_return_value): Likewise. - * tree.c (init_tree): Set lang_set_decl_assembler_name. - -2001-03-15 Gabriel Dos Reis - - Correct semantics restrictions checking in throw-expression. - * except.c (is_admissible_throw_operand): New function. - (build_throw): Use it. - -2001-03-14 Mark Mitchell - - * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ - and its ilk. - -2001-03-14 Mark Mitchell - - * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. - * cp-tree.h (DECL_IN_MEMORY_P): Likewise. - * decl.c (duplicate_decls): Likewise. - (builtin_function): Likewise. - (build_library_fn): Likewise. - (build_cp_library_fn): Likewise. - (check_initializer): Likewise. - (cp_finish_decl): Likewise. - * decl2.c (grokfield): Likewise. - (grok_function_init): Remove #if 0'd code. - (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. - * friend.c (do_friend): Likewise. - * init.c (get_temp_regvar): Likewise. - * method.c (make_thunk): Likewise. - * pt.c (tsubst_friend_function): Likewise. - (tsubst_decl): Likewise. - (regenerate_decl_from_template): Likewise. - * semantics.c (genrtl_named_return_value): Likewise. - (expand_body): Likewise. - (genrtl_finish_function): Likewise. - * tree.c (cp_tree_equal): Likewise. - -2001-03-12 Nathan Sidwell - - * call.c (convert_like_real): Add extra semantics to INNER - parameter. Don't convert to temporary if a user conversion - gives us an lvalue that we're about to bind to a reference. - Set INNER to indicate pending reference binding on recursive - calls. - -2001-03-10 Neil Booth - - * cp/lex.c: Delete duplicate pending_lang_change. - -2001-03-10 Neil Booth - - * cp/lex.c (handle_pragma_interface, handle_pragma_implementation): - Similarly. - * cp/repo.c (get_base_filename, open_repo_file): Similarly. - * cp/cp-tree.h: Remove file_name_nondirectory prototype. - -2001-03-09 Zack Weinberg - - * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. - -2001-03-08 Stan Shebs - - * cp-tree.h (set_identifier_local_value): Remove unused decl. - -2001-03-06 Zack Weinberg - - * spew.c: Remove references to CPP_OSTRING. - -2001-03-06 Andrew Haley - - * typeck.c (convert_arguments): Check that we have an fndecl. - -2001-03-05 Andrew Haley - - * typeck.c (convert_arguments): Don't do ellipsis conversion for - __built_in_constant_p. - -2001-03-02 Nathan Sidwell - - * typeck.c (build_static_cast): Allow enum to enum conversions - as per DR 128. - -2001-03-02 Nathan Sidwell - - * class.c (check_field_decls): Pointers to member do not a - non-pod struct make, as per DR 148. - -2001-03-02 Nathan Sidwell - - * call.c (joust): cp_pedwarn when using gnu extension concerning - worst conversion sequences. - -2001-03-01 Zack Weinberg - - * decl.c: Replace all uses of 'boolean' with 'bool'. - -2001-03-01 Zack Weinberg - - * lang-specs.h: Add zero initializer for cpp_spec field to - all array elements that need one. Don't put an #ifdef inside - the initializer list; set a default for CPLUSPLUS_CPP_SPEC and - use it. - -2001-03-01 Nathan Sidwell - - Implement using decls inside template functions. - * decl2.c (validate_nonmember_using_decl): Don't special case - fake_std_node in the global namespace. Don't reject early when - processing a template. - (do_local_using_decl): Add to statement tree. Don't do further - processing when building a template. - * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs. - -2001-03-01 Nathan Sidwell - - * decl2.c (do_nonmember_using_decl): Don't complain if we find - same function. Do complain about ambiguating extern "C" - declarations. - -2001-02-28 Nathan Sidwell - - Remove floating point and complex type template constant parms. - * pt.c (convert_nontype_argument): Remove REAL_TYPE and - COMPLEX_TYPE extensions. - (invalid_nontype_parm_type_p): Likewise. - -2001-02-27 Jeffrey Oldham - - * except.c (call_eh_info): Revert "match_function"'s type. - -2001-02-27 Nathan Sidwell - - Fix ctor vtable vcall offsets. - * class.c (struct vtbl_init_data_s): Add rtti_binfo member. - (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter. - (get_matching_base): Remove. - (get_original_base): New function. - (build_vtbl_initializer): Initialize vid.rtti_binfo. - Use a virtual thunk for a ctor vtable with an index - (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a - primary base within a constructor vtable. Only set - BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset - when primary base has been lost. - * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment. - -2001-02-26 Jeffrey Oldham - - * call.c (joust): Ensure more_specialized()'s argument length - parameter has correct value for constructors. - -2001-02-26 Nathan Sidwell - - * except.c (call_eh_info): Cleanup generation of cp_eh_info struct. - - * decl.c (mark_inlined_fns): Prototype. - -2001-02-22 Mark Mitchell - - * spew.c (yylex): Correct handling of friends. - -2001-02-22 Mark Mitchell - - * mangle.c (write_encoding): Pass write_function_type the - FUNCTION_DECL for the function being encoded. - (write_function_type): Pass it along to write_bare_function_type. - (write_bare_function_type): Pass it along to write_method_parms. - (write_method_parms): Don't mangle the compiler-generated - parameters to a constructor or destructor. - -2001-02-22 Andreas Jaeger - - * optimize.c: Include toplev.h for - note_deferral_of_defined_inline_function prototype. - -2001-02-22 Jakub Jelinek - - * cp-tree.h (struct lang_decl_inlined_fns): New. - (struct lang_decls): Add inlined_fns. - (DECL_INLINED_FNS): New macro. - * optimize.c (struct inline_data): Add inlined_fns. - (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro. - (inlinable_function_p): Likewise, fix typo in comment, - function is not inlinable if it already inlined function currently - being optimized. - (expand_call_inline): Add fn to inlined_fns if necessary. - (optimize_function): Initialize inlined_fns. - Save inlined_fns into DECL_INLINED_FNS after expanding inlines. - * decl.c (mark_inlined_fns): New function. - (lang_mark_tree): Call it. - -2001-02-21 Jason Merrill - - * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag. - (DECL_UNINLINABLE): Move to middle-end. - - * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn. - * decl.c (duplicate_decls): Preserve DECL_ABSTRACT. - * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone. - * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the - parms and outer BLOCK. note_deferral_of_defined_inline_function. - - * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on - second parm of op=. - -2001-02-19 Mark Mitchell - - * decl2.c (set_decl_namespace): Allow explicit instantiations in - any namespace. - -2001-02-18 Kriang Lerdsuwanakij - - * optimize.c (expand_call_inline): Don't walk subtrees of type - nodes. - -2001-02-18 Mark Mitchell - - * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry - for a destructor. - -2001-02-18 Jason Merrill - - Do put the VTT parameter in DECL_ARGUMENTS. - * cp-tree.h (struct cp_language_function): Add x_vtt_parm. - (current_vtt_parm): New macro. - (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm. - (DECL_HAS_VTT_PARM_P): New macro. - (DECL_VTT_PARM): Remove. - (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros. - * decl.c (duplicate_decls): Only copy the operator code if - appropriate. - (start_function): Set current_vtt_parm. - (lang_mark_tree): Don't mark vtt_parm. - * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to - DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P. - * class.c (build_clone): Maybe remove the VTT parm. - * optimize.c (maybe_clone_body): Set up the VTT parm. - * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm. - * call.c (build_over_call): Just allow the VTT arg. - * method.c (make_thunk): Don't set DECL_VTT_PARM. - (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM. - (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE. - * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise. - * error.c (dump_function_decl): Likewise. - * call.c (build_user_type_conversion_1, convert_like_real): Abort - if we try to call a constructor with in-charge or VTT parms. - * method.c (skip_artificial_parms_for): New fn. - * call.c (add_function_candidate, build_over_call): Call it. - * call.c (build_new_method_call): Use current_vtt_parm. - * init.c (expand_virtual_init): Likewise. - * class.c (same_signature_p): No longer static. - * cp-tree.h: Declare it. - * search.c (look_for_overrides_r): Use it. - -2001-02-17 Mark Mitchell - - * cp-tree.h (new_abi_rtti_p): Remove. - (name_mangling_version): Likewise. - (flag_do_squangling): Likewise. - * class.c (build_rtti_vtbl_entries): Remove old ABI support. - * decl.c (grokfndecl): Likewise. - * decl2.c (name_mangling_version): Remove. - (flag_do_squangling): Likewise. - (lang_f_options): Remove `squangle'. - (unsupported_options): Add `squangle'. - (cxx_decode_option): Issue a warning about uses of - -fname-mangling-version. - (finish_file): Remove old ABI support. - * pt.c (check_explicit_specialization): Likewise. - (tsubst_decl): Likewise. - * rtti.c (init_rtti_processing): Likewise. - (build_headof): Likewise. - (get_tinfo_decl_dynamic): Likewise. - (tinfo_from_decl): Likewise. - (build_dynamic_cast_1): Likewise. - (synthesize_tinfo_var): Likewise. - * init.c (build_new): Allow enumeration types for the array-bounds - in a direct-new-declarator. - - * semantics.c (finish_typeof): Resolve OFFSET_REFs. - - * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and - TREE_PROTECTED from the template being specialized. - -2001-02-17 Jason Merrill - - * decl2.c (build_artificial_parm): Set TREE_READONLY. - - * decl.c (bad_specifiers): Allow throw specs on things with - pointer-to-function or -member-function type. - * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize - a pmf. - -2001-02-17 Mark Mitchell - - * call.c (check_dtor_name): Handle template names correctly. - -2001-02-16 Jason Merrill - - * cp-tree.h (DECL_USE_VTT_PARM): Remove. - * decl2.c (maybe_retrofit_in_chrg): Don't create it. - * optimize.c (maybe_clone_body): Don't substitute it. - * call.c (build_new_method_call): Check in_chrg instead. - * init.c (expand_virtual_init): Likewise. - -2001-02-16 Gabriel Dos Reis - - * decl.c (check_tag_decl): Make sure a typedef for an anonymous - class-type introduces at least a type-name. - -2001-02-16 Jakub Jelinek - - * call.c (convert_like_real): Create a temporary for non-lvalue. - -2001-02-16 Jeffrey Oldham - - * cp-tree.h: Fix typos in comments. - -2001-02-16 Jason Merrill - - * optimize.c (remap_block): If we're compiling a clone, pass the - new block to insert_block. - -2001-02-16 Mark Mitchell - - * semantics.c (finish_asm_stmt): Robustify. - -2001-02-15 Mark Mitchell - - * pt.c (push_template_decl_real): Don't remangle the name of a - class template. - -2001-02-15 Jim Meyering - - * Make-lang.in (c++.install-common): Depend on installdirs. - (c++.install-info): Likewise. - (c++.install-man): Likewise. - -2001-02-15 Mark Mitchell - - * typeck2.c (build_m_component_ref): Robustify. - -2001-02-15 Alexandre Oliva - - * friend.c (do_friend): Don't take the nested [template] class - into account when deciding whether to warn about the friend - function not referring to a template function. - -2001-02-14 Jakub Jelinek - - * typeck.c (build_unary_op): Clarify error message. - -2001-02-08 Aldy Hernandez - - * parse.y (component_constructor_declarator): allow optional - parentheses around constructor class name. - -2001-02-14 Nathan Sidwell - - * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c - section. - * init.c (emit_base_init): Remove incorrect comment about - virtual bases. - * method.c (make_thunk): Fix comment alignment. - -2001-02-14 Nathan Sidwell - - Kill remnants of this is variable. - * cp-tree.h (flag_this_is_variable): Remove. - * decl2.c (flag_this_is_variable): Remove. - * class.c (fixed_type_or_null): Add cdtor parm. Adjust. - (build_vbase_path): The path is non-static, even in a cdtor. - (resolves_to_fixed_type_p): Add additional return value. - * search.c (init_vbase_pointers): Adjust. - * tree.c (lvalue_p_1): Adjust. - * typeck.c (mark_addressable): Adjust. - -2001-02-14 Nathan Sidwell - - * pt.c (unify): Don't check cv quals of array types. - -2001-02-14 Nathan Sidwell - - * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to - check whether we already have the type. - -2001-02-13 Mark Mitchell - - * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment. - * call.c (build_op_delete_call): Simplify to remove duplicate - code. - * class.c (clone_function_decl): Don't build the deleting variant - of a non-virtual destructor. - * decl.c (finish_destructor_body): Don't call delete if this is a - non-virtual destructor. - * init.c (build_delete): Explicitly call `operator delete' when - deleting an object with a non-virtual destructor. - -2001-02-13 Jason Merrill - - * lang-specs.h: Add more __EXCEPTIONS. - -2001-02-12 Nathan Sidwell - - * typeck2.c (process_init_constructor): Check - TREE_HAS_CONSTRUCTOR before issuing missing init warning. - -2001-02-12 Nathan Sidwell - - * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case): - Remove spurious information in comment. Allow further - adjustments of REFERENCE_TYPE args. - -2001-02-12 Nathan Sidwell - - * errfn.c (cp_deprecated): Tweak diagnostic text. - * parse.y (new_initializer): Deprecate initializer lists - extension. - -2001-02-12 Mark Mitchell - - Remove old ABI support. - -2001-02-11 Mark Mitchell - - * decl2.c (flag_vtable_thunks): Always set it to 1. - (flag_new_abi): Likewise. - * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI. - - * Makefile.in (g++spec.o): Fix typo. - -2001-02-09 Jason Merrill - - * lang-specs.h: Restore definition of __EXCEPTIONS. - -2001-02-08 Jason Merrill - - * search.c (shared_member_p): New function. - (lookup_field_r): Use it. - * cp-tree.h (SHARED_MEMBER_P): Remove. - - * method.c (process_overload_item): Handle template-dependent array - bounds. - * pt.c (type_unification_real): If we end up with undeduced nontype - parms, try again. - - * decl.c (lookup_name_real): Tweak warning to refer to decls, not - types. - - * typeck2.c (friendly_abort): Don't say anything if we have - earlier errors or sorries. - - * decl.c (check_tag_decl): Notice attempts to redefine bool and - wchar_t. Ignore if in_system_header. - - * decl.c (maybe_push_cleanup_level): New fn... - (start_decl_1): ...split out from here. - * cvt.c (build_up_reference): Use it. - * cp-tree.h: Declare it. - -2001-02-07 Mark Mitchell - - * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor - spec. - -2001-02-06 Nathan Sidwell - - * pt.c (lookup_template_class): Make sure it's a primary - template or template_template_parm when called from the parser. - (instantiate_template_class): Add assertion. - -2001-02-05 Alexandre Oliva - - * method.c (build_mangled_name) [old abi]: Protect flush_repeats() - from error_mark_node. - -2001-02-05 Nathan Sidwell - - Fix specification and implementation bugs in V3 ABI - construction vtables. - * cp-tree.h (flag_dump_class_layout): New flag. - (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove. - (BINFO_LOST_PRIMARY_P): New flag. - (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts. - (BINFO_PRIMARY_MARKED_P): Rename to ... - (BINFO_PRIMARY_P): ... here. - (binfo_via_virtual): New prototype. - * decl2.c (flag_dump_class_layout): New flag. - (cxx_decode_option): Set it. Adjust -fdump-translation-unit to - use `=' as a file name separator. - * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary - bases. - (build_vtbl_address): If this is a virtual primary base, then - get the vtbl of what it is ultimately primary for. - * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust - for BINFO_PRIMARY_P. - (dfs_skip_nonprimary_vbases_markedp): Likewise. - (get_shared_vbase_if_not_primary): Likewise. - (dfs_get_pure_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - (fixup_virtual_upcast_offsets): Likewise. - (dfs_find_vbase_instance): Likewise. - (find_vbase_instance): Likewise. - (binfo_from_vbase): Adjust comment to reflect reality. - (binfo_via_virtual): New function. - * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros - for binfo walking during VTT construction. - (dfs_mark_primary_bases): Remove. - (force_canonical_binfo_r): New function. - (force_canonical_binfo): New function. - (mark_primary_virtual_base): New function. - (mark_primary_bases): Walk in inheritance graph order, use - mark_primary_virtual_base. - (determine_primary_base): Use some more intermediate variables. - (dfs_find_final_overrider): Don't check for overriding along a - virtual path. - (dfs_modify_vtables): Walk into primary virtual bases too. - (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P. - (build_base_fields): Likewise. - (dfs_set_offset_for_unshared_vbases): Likewise. - (layout_virtual_bases): Likewise. - (end_of_class): Likewise. - (finish_struct_1): Call dump_class_hierarchy, if requested. - (dfs_get_primary_binfo): Use BINFO_TYPE for binfos. - (dump_class_hierarchy_r): Add stream parameter. Emit more information. - (dump_class_hierarchy): Add file parameter. Append to file, if - required. - (finish_vtbls): Adjust accumulate_vtbl_inits call. - Use canonical base for virtual bases. - (build_vtt): Add more comments. Adjust build_vtt_inits call. - (build_vtt_inits): Remove VIRTUAL_VTTS_P parm. - Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P, - VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for - virtual VTTs. - (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P - from DATA. We want virtual primary bases and all bases via virtual. - Only set BINFO_VPTR_INDEX for top level. Look up from a primary - virtual base when not a construction vtable. - (dfs_ctor_vtable_bases_queue_p): New DFS predicate. - (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call. - Use canonical bases when processing virtual bases. - (accumulate_vtbl_inits): We're interested in any base via a - virtual path. - (dfs_accumulate_vtbl_inits): If this is a primary virtual base - within a construction vtable, determine what is being overridden. - (build_vtbl_initializer): Add more comments - (add_vcall_offset_vtbl_entries_1): Adjust comment. - (build_rtti_vtbl_entries): Check if the base has lost its - primary. - -2001-02-05 Mark Mitchell - - * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES. - -2001-02-04 Richard Kenner - - * decl.c (pushdecl): Call abort instead of fatal. - * except.c (decl_is_java_type): Call fatal_error instead of fatal. - * init.c (build_new_1): Likewise. - (build_java_class_ref): Call internal_error and fatal_error, not fatal. - * decl.c (build_typename_type): hash_table_init now returns void. - decl.c (init_decl_processing): Make an error non-fatal. - -2001-02-04 Mark Mitchell - - * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting. - Document. - (CLASSTYPE_INTERFACE_KNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. - (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. - (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. - * decl.c (maybe_commonize_var): Use the new name-mangling where - appropriate. - * decl2.c (comdat_linkage): Enhance comments. Make all - compiler-generated things static, if COMDAT is not available. - (get_tinfo_decl): Do not make typeinfo objects that belong in the - library COMDAT. - (tinfo_base_init): Use the correct mangled name for typeinfo - strings, and push them into the global scope. - (typeinfo_in_lib_p): New function. - (synthesize_tinfo_var): Use it. - (create_real_tinfo_var): Likewise. - -2001-02-03 Jakub Jelinek - - * decl.c (push_class_binding): Use context_for_name_lookup instead - of CP_DECL_CONTEXT. - * search.c (context_for_name_lookup): Remove static. Check for NULL - context in the loop. - * cp-tree.h (context_for_name_lookup): Add prototype. - -2001-02-02 Jakub Jelinek - - * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. - * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): - Remove. - * call.c (convert_class_to_reference, build_user_type_conversion_1, - add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. - -2001-02-02 Mark Mitchell - - * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list - of macros used when compiling g++spec.c. - * g++spec.c (lang_specific_driver): Link with the shared - libgcc by default. - -2001-01-29 Joseph S. Myers - - * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator, - make_reference_declarator, make_call_declarator), method.c - (implicitly_declare_fn), parse.y (namespace_using_decl, - notype_unqualified_id, expr_or_declarator, new_type_id, - after_type_declarator, direct_after_type_declarator, - notype_declarator, complex_notype_declarator, - complex_direct_notype_declarator, qualified_id, - notype_qualified_id, overqualified_id, direct_new_declarator, - absdcl, direct_abstract_declarator, conversion_declarator), pt.c - (tsubst), semantics.c (begin_constructor_declarator): Use build_nt - instead of build_parse_node. - -2001-01-28 Kaveh R. Ghazi - - * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE. - (minus_one_node): Moved to top level gcc directory. Renamed - to integer_minus_one_node. - - * init.c (init_init_processing): Don't set minus_one_node. - (build_vec_init): Use integer_minus_one_node. - - * rtti.c (get_tinfo_decl_dynamic): Likewise. - -2001-01-28 Jakub Jelinek - - * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments - identical and they would be replaced with constant, remove - MODIFY_EXPR from the tree. - -2001-01-27 Kaveh R. Ghazi - - * Make-lang.in: Remove all dependencies on defaults.h. - * call.c: Don't include defaults.h. - * decl.c: Likewise. - * decl2.c: Likewise. - * except.c: Likewise. - * pt.c: Likewise. - * rtti.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - -2001-01-25 Jakub Jelinek - - * mangle.c (write_mangled_name, write_encoding): Mangle overloaded - operators even in "C" linkage. - * method.c (set_mangled_name_for_decl): Likewise. - * decl.c (grokfndecl): Call set_mangled_name_for_decl even for - overloaded operators in "C" linkage. - -2001-01-24 Nathan Sidwell - - * pt.c (tsubst_decl): Remove IN_DECL parameter. - (tsubst_arg_types): Check parameter is not void. - (tsubst): Adjust tsubst_decl call. - -2001-01-24 Nathan Sidwell - - * call.c (add_builtin_candidate): Quote std properly, from - previous change. - -2001-01-23 Kriang Lerdsuwanakij - - * pt.c (check_explicit_specialization): Clone constructors and - destructors. - -2001-01-23 Nathan Sidwell - - * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC - indicates anything special about template depth. Make sure we - only count the user visible template classes. - -2001-01-23 Nathan Sidwell - - * call.c (build_conv): Typo in comment. - (add_builtin_candidate): Add more explanation. - Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR. - Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates - when we have enumeral types. - (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE - candidates for relops and eqops. - (joust): Simplify control flow. Allow a non-template user - function to hide a builtin. - -2001-01-22 Nathan Sidwell - - * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER. - (more_specialized): Add deduction parameter. - * call.c (joust): Adjust more_specialized call. - * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL, - UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags. - (get_bindings_order): Remove. - (get_bindings_real): Add DEDUCE parameter. - (maybe_adjust_types_for_deduction): Return extra unify flags. Do - REFERENCE_TYPE jig for DEDUCE_ORDER. - (type_unification_real): Deal with DEDUCE_ORDER. Use result of - maybe_adjust_types_for_deduction. - (more_specialized): Add DEDUCE parameter. Call get_bindings_real - directly. - (try_one_overload): Use result of maybe_adjust_types_for_deduction. - (check_cv_quals_for_unify): Use new unify qualifier flags. - (unify): Clear new unify qualifier flags. - (get_bindings_real): Add DEDUCE parameter. - (get_bindings): Adjust call to get_bindings_real. - (get_bindings_overload): Likewise. - (most_specialized_instantiation): Adjust call to - more_specialized. - -2001-01-19 Jason Merrill - - * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI. - - * decl.c (init_decl_processing): Just force -fvtable-thunks on if - -fnew-abi. - -2001-01-19 Ute Pelkmann - - * decl2.c (arg_assoc_class): Fix double iteration logic. - -2001-01-19 Jason Merrill - - * init.c (build_delete): Always call convert_force to strip cv-quals. - - * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI. - * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI. - * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI. - -2001-01-19 Nathan Sidwell - - * search.c (get_vbase_1): Count only virtual bases. - -2001-01-19 Nathan Sidwell - - * class.c (duplicate_tag_error): Robustify flag clearing. - -2001-01-19 Nathan Sidwell - - * cp-tree.h (lookup_template_class): Add complain parm. - * decl.c (lookup_namespace_name): Adjust call to - lookup_template_class. - (make_typename_type): Likewise. - * semantics.c (finish_template_type): Likewise. - * pt.c (lookup_template_class): Add complain parm. Adjust. - (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class. - (tsubst): Likewise. - -2001-01-19 Nathan Sidwell - - * pt.c (copy_default_args_to_explicit_spec): Preserve - object's CV quals. Reorganize. - -2001-01-18 Nathan Sidwell - - * typeck.c (build_modify_expr): Say `initialization' for - INIT_EXPRs. - * init.c (build_default_init): Convert to enumeral type, if - needed. - -2001-01-18 Jakub Jelinek - - * parse.y (nomods_initdcl0): Properly set things up for - initdcl0_innards. - -2001-01-18 Nathan Sidwell - - * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag. - (type_unification_real): Set it. - (unify): Use it. - -2001-01-18 Nathan Sidwell - - * decl.c (finish_destructor_body): Convert to vbase pointer here. - -2001-01-18 Nathan Sidwell - - * semantics.c (begin_class_definition): Check we're not inside a - template parm list. - -2001-01-18 Nathan Sidwell - - * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of - BASELINK_P. - -2001-01-16 Kriang Lerdsuwanakij - - * typeck.c (build_function_call_real): Call fold on the CALL_EXPR. - * call.c (build_over_call): Add comment. - -2001-01-16 Daniel Berlin - - * cvt.c (ocp_convert): Handle vector type conversion - * typeck2.c (digest_init): Handle vector type initializations - -2001-01-16 Phil Edwards - - * g++spec.c: Don't add libraries needlessly if -fsyntax-only - was given. - -2001-01-15 Nathan Sidwell - - * pt.c (check_nontype_parm): Rename to ... - (invalid_nontype_parm_type_p): ... here. - (process_template_parm): Adjust. - (convert_template_argument): Adjust. - -2001-01-15 Nathan Sidwell - - * pt.c (check_nontype_parm): New function. - (process_template_parm): Use it. - (convert_template_argument): Use it. - (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to - member. - -2001-01-14 Jeffrey Oldham - - * tree.c: Add defaults.h - (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY. - * Make-lang.in (cp/tree.o): Add defaults.h. - -2001-01-13 Joseph S. Myers - - * Make-lang.in (CXX_C_OBJS): Add c-format.o. - -2001-01-13 Joseph S. Myers - - * g++.1: Change to be ".so man1/gcc.1". - -2001-01-13 Joseph S. Myers - - * Make-lang.in (c++.info, c++.install-info): Build and install g++ - internals info. - (c++.uninstall, c++.maintainer-clean): Remove g++ internals info. - ($(srcdir)/cp/g++int.info): New target. - * gxxint.texi: Add info directory entry. Use @@ in email address. - * .cvsignore: Update. - -2001-01-12 Nathan Sidwell - - * typeck.c (build_c_cast): Do template processing earlier. - Always pedwarn on array casts. - -2001-01-12 Nathan Sidwell - - * friend.c (make_friend_class): Make sure a templated class is - actually a template. - -2001-01-11 Nathan Sidwell - - * decl2.c (get_guard): Set linkage from guarded decl. - -2001-01-11 Nathan Sidwell - - * call.c (convert_default_arg): Check for unprocessed - DEFAULT_ARG. - * cp-tree.h (replace_defarg): Move to spew.c. - (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to - spew.c, which is where they really are. - (done_pending_defargs): Declare. - (unprocessed_defarg_fn): Declare. - * decl.c (replace_defarg): Move to spew.c - * parse.y (structsp): Call done_pending_defargs. - * spew.c (defarg_fns): Rearrange list structure. - (defarg_fnsdone): New static variable. - (defarg_depfns): New static variable. - (init_spew): Adjust. - (add_defarg_fn): Store the type in TREE_TYPE. - (do_pending_defargs): Detect and deal with ordering constraints - and circularity. - (done_pending_defargs): New function. - (unprocessed_defarg_fn): New function. - (replace_defarg): Moved from decl.c. Robustify. Don't save - if circularity detected. - -2001-01-11 Nathan Sidwell - - * pt.c (unify): Check array has a domain, before checking - whether it is variable sized. - -2001-01-11 Nathan Sidwell - - * decl.c (grokparms): Unobfuscate and get correct diagnostic for - parameters with pointers to arrays of unknown bound. - -2001-01-11 Nathan Sidwell - - * parse.y (template_parm_header, template_spec_header): New - reductions. Split out from ... - (template_header): ... here. Use them. - (template_template_parm): Use template_parm_header. - * semantics.c (finish_template_template_parm): Add assert. - -2001-01-10 Mark Mitchell - - * mangle.c (write_builtin_type): Fix thinko. - - * pt.c (copy_default_args_to_explicit_spec_1): New function. - (copy_default_args_to_explicit_spec): Likewise. - (check_explicit_specialization): Use it. - - * class.c (finish_struct_1): Remove last argument in call to - make_decl_rtl; use make_function_rtl instead of make_decl_rtl. - * decl.c (builtin_function): Likewise. - (build_cp_library_fn): Likewise. - (check_initializer): Likewise. - (make_rtl_for_nonlocal_decl): Likewise. - (cp_finish_decl): Likewise. - (start_function): Likewise. - * decl2.c (finish_anon_union): Likewise. - * friend.c (do_friend): Likewise. - * init.c (build_java_class_ref): Likewise. - * method.c (make_thunk): Likewise. - * pt.c (tsubst_friend_function): Likewise. - * semantics.c (expand_body): Likewise. - -2001-01-10 Mark Mitchell - - * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not - looking at DECL_CLONED_FUNCTION for non-functions. - -2001-01-10 Nathan Sidwell - - * error.c (dump_template_parameter): Use parm to determine how - to print default value. - -2001-01-10 Nathan Sidwell - - * class.c (duplicate_tag_error): Clear more flags. - -2001-01-10 Nathan Sidwell - - * call.c (build_new_method_call): Use binfo_for_vbase. - -2001-01-10 Joseph S. Myers - - * cp-tree.h (flag_cond_mismatch): Don't declare. - * decl2.c (flag_cond_mismatch): Don't define. - (lang_f_options): Remove cond-mismatch. - (unsupported_options): Add cond-mismatch. - -2001-01-09 Nathan Sidwell - - * class.c (handle_using_decl): Reject using of constructor name - of sourcing class. Allow injecting of a method with same name as - nested class. Fixup error messages. - -2001-01-09 Joseph S. Myers - - * decl2.c (lang_decode_option): Handle -Wformat=2. - -2001-01-08 Nathan Sidwell - - * cp-tree.h (lang_decl_flags): Rename defined_in_class to - initialized_in_class. - (DECL_DEFINED_IN_CLASS_P): Rename to ... - (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning. - * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P. - (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P. - * pt.c (check_default_tmpl_args): Adjust for - DECL_INITIALIZED_IN_CLASS_P. - (instantiate_class_template): Likewise. - (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P. - - * class.c (finish_struct): Constify saved_filename. - -2001-01-08 Nathan Sidwell - - * class.c (duplicate_tag_error): Adjust diagnostic. - (finish_struct): Locally set location to start of struct. - * decl.c (fixup_anonymous_aggr): Use cp_error_at. - -2001-01-08 Nathan Sidwell - - * decl.c (struct binding_level): Adjust class_shadowed comments - to reflect reality. - (push_class_level_binding): Adjust comments to reflect reality. - Set IDENTIFIER_CLASS_VALUE when replacing an existing binding. - Don't set TREE_VALUE on the class_shadowed list. - -2001-01-07 Alexandre Petit-Bianco - - * decl2.c (acceptable_java_type): Allow references too. - * init.c (build_java_class_ref): When using the new ABI, search - `class$' and have it mangled with `mangle_decl.' - * mangle.c (write_java_integer_type_codes): New function. - (write_builtin_type): Detect and mangle Java integer and real - types. - -2001-01-07 Mark Mitchell - - * decl2.c (grokfield): Don't accept `asm' specifiers for - non-static data members. - -2001-01-07 Kaveh R. Ghazi - - * expr.c (cplus_expand_expr): Don't reset `target'. - -2001-01-07 Neil Booth - - * cp/decl2.c (cxx_post_options): Call cpp_post_options. - -2001-01-05 Nathan Sidwell - - * parse.y (template_datadef): Check for error_mark_node. - -2001-01-05 Nathan Sidwell - - * cp-tree.def (DEFAULT_ARG): Make `x' class. - -2001-01-04 Joseph S. Myers - - * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define. - (record_builtin_type): Make non-static. - (flag_short_double): Don't declare. - (init_decl_processing): Remove the creation of many tree nodes now - in c_common_nodes_and_builtins. - (build_void_list_node): New function. - * decl2.c (flag_short_double, flag_short_wchar): Don't define. - * cp-tree.h (flag_short_wchar): Don't declare. - -2001-01-04 Mark Mitchell - - * call.c (build_conv): Don't use build1 for USER_CONV. - * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes. - -2001-01-03 Joseph S. Myers - - * lex.c (lang_init): Call c_common_lang_init. - -2001-01-03 Nathan Sidwell - - * search.c (lookup_fnfields_here): Remove. - (look_for_overrides_r): Use lookup_fnfields_1. - Ignore functions from using declarations. - -2001-01-03 Nathan Sidwell - - Implement exceptions specifiers for implicit member functions. - * cp-tree.h (merge_exceptions_specifiers): Declare new function. - * method.c (synthesize_exception_spec): New function. - (locate_dtor, locate_ctor, locate_copy): New functions. - (implicitly_declare_fn): Generate the exception spec too. - * search.c (check_final_overrider): Check artificial functions - too. - * typeck2.c (merge_exception_specifiers): New function. - -2001-01-03 Jason Merrill - - * init.c (build_default_init): New fn. - (perform_member_init): Split out from here. - (build_new_1): Use it. Simplify initialization logic. - (build_vec_init): Take an array, rather than a pointer and maxindex. - Speed up simple initializations. Don't clean up if we're assigning. - * cp-tree.h: Adjust. - * decl2.c (do_static_initialization): Remove TREE_VEC case. - * parse.y (new_initializer): Return void_zero_node for (). - * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR. - * typeck2.c (digest_init): Only complain about user-written - CONSTRUCTORs. - -2000-12-22 Mike Stump - - * decl2.c: (max_tinst_depth): Increase to 50. - -2001-01-02 Mark Mitchell - - * class.c (invalidate_class_lookup_cache): Zero the - previous_class_values. - * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not - TREE_INT_CST_HIGH. - (CLASSTYPE_TEMPLATE_LEVEL): Likewise. - * decl.c (free_bindings): New variable. - (push_binding): Don't create a new binding if we have one on the - free list. - (pop_binding): Put old bindings on the free list. - (init_decl_processing): Use size_int, not build_int_2. - Register free_bindings as a GC root. - (cp_make_fname_decl): Use size_int, not build_int_2. - (push_inline_template_parms_recursive): Likewise. - (end_template_parm_list): Likewise. - (for_each_template_parm): Do not use walk_tree_without_duplicates. - (tsubst_template_parms): Use size_int, not build_int_2. - (tsubst): Likewise. - * rtti.c (get_vmi_pseudo_type_info): Likewise. - -2001-01-02 Richard Henderson - - * parse.y (asm): Set ASM_INPUT_P. - -2001-01-02 Jason Merrill - - * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE - for v3 ABI. - - * typeck.c (cp_truthvalue_conversion): New fn. - * cvt.c (ocp_convert): Use it. - - * cp-tree.h: Lose c-common.c decls. - - * typeck.c (build_unary_op): Restore old &a.f diagnostic code. - * cvt.c (convert_to_void): Use type_unknown_p. - - * typeck.c (strip_all_pointer_quals): Also strip quals from - pointer-to-member types. - - * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat - parse.y as C. - - * call.c (build_new_method_call): Do evaluate the object parameter - when accessing a static member. - * typeck.c (build_component_ref): Likewise. - -2001-01-02 Andreas Jaeger - - * decl.c (cp_missing_noreturn_ok_p): New. - (init_decl_processing): Set lang_missing_noreturn_ok_p. - -2000-12-29 Jakub Jelinek - - * decl.c (init_decl_processing): Fix sign of wchar_type_node. - -2000-12-29 Mark Mitchell - - * class.c (pushclass): Remove #if 0'd code. - * cp-tree.h (overload_template_name): Remove. - * decl.c (store_bindings): Simplify. - (pop_from_top_level): Likewise. - * pt.c (overload_template_name): Remove. - (instantiate_decl): Don't call push_to_top_level if it's not - needed. - -2000-12-28 Mark Mitchell - - * pt.c (register_local_specialization): Don't return a value. - (lookup_template_class): Use move-to-front heuristic when looking - up template instantiations. - (instantiate_decl): Only push_to_top_level when we're actually - going to instantiate the template. - -2000-12-29 Hans-Peter Nilsson - - * search.c (binfo_for_vtable): Return least derived class, not - most. Handle secondary vtables. - -2000-12-22 Jason Merrill - - * pt.c (more_specialized): Don't optimize len==0. - (fn_type_unification): If we're adding the return type, increase len. - - * typeck.c (build_binary_op): Fix pmf comparison logic. - - * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not - DECL_STATIC_FUNCTION_P. - - * semantics.c (genrtl_finish_function): Don't try to jump to - return_label unless it exists. - - In partial ordering for a call, ignore parms for which we don't have - a real argument. - * call.c (joust): Pass len to more_specialized. - (add_template_candidate_real): Strip 'this', pass len. - * pt.c (more_specialized): Pass len down. Lose explicit_args parm. - (get_bindings_order): New fn. Pass len down. - (get_bindings_real): Strip 'this', pass len. - (fn_type_unification): Likewise. - (type_unification_real): Succeed after checking 'len' args. - (most_specialized_instantiation): Lose explicit_args parm. - * class.c (resolve_address_of_overloaded_function): Strip 'this', - pass len. - -2000-12-21 Jason Merrill - - * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not - DECL_TEMPLATE_RESULT. - - * search.c (lookup_field_r): Call lookup_fnfields_1, not - lookup_fnfields_here. - - * parse.y (typename_sub2): Return the TYPE_DECL, not the type. - - * call.c (build_object_call): Also allow conversions that return - reference to pointer to function. - (add_conv_candidate): Handle totype being ref to ptr to fn. - (build_field_call): Also allow members of type reference to function. - Lose support for calling pointer to METHOD_TYPE fields. - - * error.c (dump_expr): Handle *_CAST_EXPR. - - * typeck2.c (build_scoped_ref): Always convert to the naming class. - - * tree.c (break_out_cleanups): Lose. - * cp-tree.h: Remove prototype. - * typeck.c (build_component_ref): Don't break_out_cleanups. - (build_compound_expr): Likewise. - * semantics.c (finish_expr_stmt): Likewise. - -2000-12-20 Richard Henderson - - * cp-tree.h: Update declarations. - * decl.c (finish_case_label): Return the new stmt node. - * semantics.c (finish_goto_stmt): Likewise. - (finish_expr_stmt, finish_return_stmt): Likewise. - (finish_break_stmt, finish_continue_stmt): Likewise. - (finish_asm_stmt): Likewise. - * parse.y (already_scoped_stmt): Set STMT_LINENO. - (compstmt, implicitly_scoped_stmt, stmt): Likewise. - (simple_if, simple_stmt): Return the new stmt node. - (save_lineno): New. - -2000-12-18 Joseph S. Myers - - * cp-tree.h: Don't declare warn_long_long. - -2000-12-15 Kriang Lerdsuwanakij - - * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of - IS_AGGR_TYPE. - -2000-12-15 Kriang Lerdsuwanakij - - * pt.c (unify): Handle when both ARG and PARM are - BOUND_TEMPLATE_TEMPLATE_PARM. - -2000-12-15 Kriang Lerdsuwanakij - - * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and - DECL_TEMPLATE_PARM_P. - -2000-12-15 Jason Merrill - - * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs! - - * init.c (build_new_1): Don't strip quals from type. - - * decl.c (pushdecl): Don't check for linkage on a non-decl. - - * call.c (build_op_delete_call): See through ARRAY_TYPEs. - - * call.c (build_new_function_call): Lose space before paren in - error message. - (build_new_method_call): Likewise. - - * typeck2.c (build_m_component_ref): Propagate quals from datum. - -2000-12-14 Kriang Lerdsuwanakij - - * pt.c (check_explicit_specialization): Propagate default - function arguments to explicit specializations. - -2000-12-13 DJ Delorie - - * typeck.c (build_binary_op): Do signed/unsigned warnings for >? - and - - * error.c (dump_function_name): Don't let the user see __comp_ctor. - - Clean up copy-initialization in overloading code. - * call.c (build_user_type_conversion_1): Die if we are asked to - convert to the same or a base type. - (implicit_conversion): Avoid doing so. Lose reference binding code. - (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit - direct-initialization. Also do direct-init part of copy-init. - (build_user_type_conversion): Don't provide context to convert_like. - * cvt.c (ocp_convert): build_user_type_conversion will now provide - the constructor call for copy-init. - - * pt.c (tsubst_decl): Call clone_function_decl here if this is an - instantiation of a member template. - (do_decl_instantiation): Not here. - -2000-12-07 Nathan Sidwell - - * class.c (check_field_decls): Don't special case anonymous - fields in error messages. - (note_name_declared_in_class): Use %D on diagnostic. - - * tree.c (pod_type_p): Use strip_array_types. - (cp_valid_lang_attribute): Likewise. - * typeck.c (cp_type_quals): Strip arrays separately, to avoid - multiple evaluations. - (cp_has_mutable_p): Use strip_array_types. - -2000-12-07 Nathan Sidwell - - * cp-tree.h (sufficient_parms_p): Declare new function. - * call.c (sufficient_parms_p): New function, broken out of ... - (add_function_candidate): ... here. Use it. - (add_conv_candidate): Use it. - * decl.c (grok_ctor_properties): Use it. - -2000-12-07 Jakub Jelinek - - * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. - -2000-12-07 Joseph S. Myers - - * decl2.c (lang_decode_option): Handle -Wformat-security. - -2000-12-06 Kriang Lerdsuwanakij - - * pt.c (verify_class_unification): New function. - (get_class_bindings): Use it. - (try_class_unification): Tidy. - (unify): Handle when argument of a template-id is not - template parameter dependent. - (template_args_equal): Handle when TREE_CODE's do not match. - -2000-12-06 Alexandre Oliva - - * lang-specs.h (c++): When invoking the stand-alone preprocessor - for -save-temps, pass all relevant -Defines to it, and then don't - pass them to cc1plus. - -2000-12-05 Will Cohen - - * decl.c (finish_case_label): Cleared - more_cleanups_ok in surrounding function scopes. - (define_label): Likewise. - -2000-12-05 Nathan Sidwell - - * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document. - (get_matching_virtual): Remove. - (look_for_overrides): Declare new function. - * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or - DECL_VINDEX here. - * class.c (check_for_override): Move base class iteration code - to look_for_overrides. - * search.c (next_baselink): Remove. - (get_virtuals_named_this): Remove. - (get_virtual_destructor): Remove. - (tree_has_any_destructors_p): Remove. - (struct gvnt_info): Remove. - (check_final_overrider): Remove `virtual' from error messages. - (get_matching_virtuals): Remove. Move functionality to ... - (look_for_overrides): ... here, and ... - (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found - to be overriding. - -2000-12-05 Nathan Sidwell - - * typeck.c (get_delta_difference): If via a virtual base, - return zero. - * cvt.c (cp_convert_to_pointer): If via a virtual base, do no - adjustment. - -2000-12-04 Richard Henderson - - * error.c (dump_tree): Use output_add_string not OB_PUTS. - -2000-12-04 Jason Merrill - - * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". - (write_builtin_type): Pass intSI_type_node and the like through - type_for_mode. - * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. - Pass intSI_type_node and the like through type_for_mode. - * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. - * pt.c (tsubst, unify): Likewise. - * tree.c (walk_tree): Likewise. - * error.c (dump_type): Likewise. - (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. - - * Make-lang.in: Tweak top comment for emacs. - (cp/TAGS): Restore. - - * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. - - * class.c (clone_function_decl): Robustify. - -2000-12-04 Michael Matz - - * decl.c (store_bindings): Only search in the non modified - old_bindings for duplicates. - -2000-12-04 Nathan Sidwell - - * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not - TYPE_POLYMORPHIC_P. - - * typeck.c (build_static_cast): Remove unused variable. - -2000-12-01 Kriang Lerdsuwanakij - - * pt.c: Fix typo in comment. - -2000-12-01 Joseph S. Myers - - * decl2.c (warn_format): Remove definition. - (lang_decode_option): Handle -Wformat-nonliteral, - -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat. - -2000-12-01 Joseph S. Myers - - * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. - (init_decl_processing): Don't create string_type_node, - const_string_type_node, wint_type_node, intmax_type_node, - uintmax_type_node, default_function_type, ptrdiff_type_node and - unsigned_ptrdiff_type_node. Adjust position of call to - c_common_nodes_and_builtins. - (identifier_global_value): New function. - -2000-12-01 Nathan Sidwell - - * call.c (standard_conversion): Reject pointer to member - conversions from ambiguous, inaccessible or virtual bases. - * typeck.c (build_static_cast): Don't check pointers to members - specially. - -2000-11-30 Nathan Sidwell - - * method.c (do_build_copy_constructor): Preserve cv - qualifications when accessing source object members. - (do_build_assign_ref): Likewise. Remove separate diagnostics for - unnamed fields. - -2000-11-30 Nathan Sidwell - - * method.c (do_build_assign_ref): Construct appropriately - CV-qualified base reference. Don't allow const casts in base - conversion. - -2000-11-30 Nathan Sidwell - - * call.c (build_over_call): Use VOID_TYPE_P. Don't die on - incomplete return type. - -2000-11-28 Nathan Sidwell - - * parse.y (base_class.1): Produce a _TYPE not a _DECL. - * semantics.c (finish_base_specifier): Accept a _TYPE not a - _DECL. - -2000-11-28 Nathan Sidwell - - * spew.c (yyerror): Cope if yylval.ttype is NULL. - -2000-11-28 Nathan Sidwell - - * decl.c (grokdeclarator): Diagnose undefined template contexts. - -2000-11-28 Nathan Sidwell - - * decl.c (grokdeclarator): Do type access control on friend - class. - -2000-11-27 Nathan Sidwell - - * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by - bison parser ickiness. - * pt.c (tsubst_friend_function): Enter namespace scope when - tsubsting the function name. - * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. - -2000-11-27 Nathan Sidwell - - * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo. - * cvt.c (cp_convert_to_pointer): Add force parameter. - Allow conversions via virtual base if forced. - (convert_to_pointer_force): Adjust call to cp_convert_to_pointer. - (ocp_convert): Likewise. - * search.c (binfo_from_vbase): Return the virtual base's binfo. - * typeck.c (get_delta_difference): Adjust handling of virtual - bases. - -2000-11-26 Mark Mitchell - - * tree.c (struct list_hash): Remove. - (list_hash_table): Make it be an htab. - (struct list_proxy): New type. - (list_hash_eq): New function. - (list_hash_pieces): Renamed from ... - (list_hash): ... this. - (list_hash_lookup): Remove. - (list_hash_add): Remove. - (hash_tree_cons): Use the generic hashtable. - (mark_list_hash): Remove. - (init_tree): Create the hashtable. - -2000-11-25 Joseph S. Myers - - * method.c (build_mangled_C9x_name): Rename to - build_mangled_C99_name. Change C9X references in comments to - refer to C99. - -2000-11-24 Nathan Sidwell - - * parse.y (unary_expr): Move VA_ARG from here ... - (primary): ... to here. - -2000-11-24 Nathan Sidwell - - * semantics.c (finish_id_expr): If type is error_mark, return - error_mark. - -2000-11-23 Nathan Sidwell - - * pt.c (lookup_template_class): Simplify loop exit constructs. - Cope when there is no partial instantiation of a template - template member. - -2000-11-23 J"orn Rennecke - - * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). - -2000-11-22 Mark Mitchell - - * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' - prefix. - - * pt.c (do_decl_instantiate): Explicitly clone constructors and - destructors that haven't already been cloned. - -2000-11-20 Richard Henderson - - * parse.y (yyparse_1): Rename the parser entry point. - -2000-11-20 Alex Samuel - - * mangle.c (write_name): Use for names directly in - function scope. - (write_unscoped_name): Accept names directly in function scope. - -2000-11-20 Nathan Sidwell - - * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. - * parse.y (extdef): Add EXPORT reduction. - * spew.c (yylex): Don't skip export here. - -2000-11-19 Mark Mitchell - - * decl.c (init_decl_processing): Correct name of pure virtual - function under the new ABI. - * rtti.c (throw_bad_cast): Likewise, for bad cast function. - (throw_bad_typeid): Likewise for bad typeid function. - -2000-11-18 Mark Mitchell - - * decl.c (grokparms): Don't even function types of `void' type, - either. - * mangle.c (write_type): Don't crash when confronted with the - error_mark_node. - - * decl.c (grokparms): Don't create parameters of `void' type. - -2000-11-17 Zack Weinberg - - * lex.c (mark_impl_file_chain): Delete. - (init_parse): Remove call to ggc_add_string_root. No need to - ggc_strdup a string constant. Do not add impl_file_chain to GC - roots. - (handle_pragma_implementation): No need to ggc_strdup main_filename. - -2000-11-17 Nathan Sidwell - - * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. - -2000-11-17 Nathan Sidwell - - * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. - * decl.c (grokdeclarator): Don't reject void parms here. - (require_complete_types_for_parms): Simplify, use - complete_type_or_else. - (grokparms): Remove bitrot. Remove funcdef parm. - Deal with ellipsis parm lists here. - * semantics.c (finish_parmlist): Don't append void_list_node - here. Set PARMLIST_ELLIPSIS_P. - -2000-11-17 Nathan Sidwell - - * typeck2.c (incomplete_type_error): Reorganize to avoid - excessive diagnostics. - -2000-11-16 Zack Weinberg - - * lex.c (struct impl_files, internal_filename): Constify a char *. - -2000-11-16 Mark Mitchell - - * mangle.c (write_special_name_constructor): Don't generate - assembler junk when confronted with an old-style constructor. - (write_special_name_destructor): Likewise. - (mangle_decl_string): Do it here instead. - -2000-11-16 Nathan Sidwell - - * call.c (op_error): Make error messages clearer. - -2000-11-15 Mark Mitchell - - * decl.c (wrapup_globals_for_namespace): Don't mark things - TREE_ASM_WRITTEN when they're not. - -2000-11-15 Jason Merrill - - * typeck2.c (friendly_abort): Uncount the error before handing - off to fancy_abort. - -2000-11-15 Nathan Sidwell - - * typeck.c (lookup_anon_field): Cope with qv qualifiers. - -2000-11-14 Mark Mitchell - - * class.c (build_vtbl_initializer): Fix typo in comment. - * typeck.c (expr_sizeof): Don't crash on errors. - -2000-11-14 Jim Wilson - - * lang-specs.h: Add %2 after %(cc1_options). - -2000-11-14 Richard Henderson - - * typeck.c (c_sizeof): Be strict about casting result value - back to c_size_type_node. - (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise. - -2000-11-13 Joseph S. Myers - - * typeck.c (build_unary_op): Use boolean_increment from - c-common.c, moving the relevant code there. - -2000-11-11 Jason Merrill - - * typeck.c (mark_addressable): Don't call put_var_into_stack. - - * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics - in inlines. - -2000-11-10 Kaveh R. Ghazi - - * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. - * lex.c (copy_lang_decl): Likewise. - -2000-11-09 Mark Mitchell - - * dump.c (cp_dump_tree): Don't dump function bodies here. - - * Make-lang.in (CXX_C_OBJS): Add c-dump.o. - (dump.o): Update dependency list. - * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. - (flag_dump_translation_unit): Likewise. - (CP_TYPE_QUALS): Adjust definition. - (DECL_C_BIT_FIELD): Remove. - (SET_DECL_C_BIT_FIELD): Likewise. - (CLEAR_DECL_C_BIT_FIELD): Likewise. - (add_maybe_template): Likewise. - (strip_array_types): Likewise. - (dump_node_to_file): Likewise. - (cp_dump_tree): New function. - * decl.c (init_decl_processing): Set lang_dump_tree. - * decl2.c (flag_dump_translation_unit): Remove. - * dump.c: Move most of it to ../c-dump.c. - (cp_dump_tree): New function. - * pt.c (add_maybe_template): Remove. - * typeck.c (strip_array_types): Likewise. - -2000-11-07 Eric Christopher - - * decl.c (init_decl_processing): Change definition of - __wchar_t to wchar_t. Remove artificial declaration of - wchar_t. - * lex.c: Change instances of __wchar_t to wchar_t. - -2000-11-09 Nathan Sidwell - - * lex.c (do_identifier): Don't lookup_name for operators. - * parse.y (operator): Save looking_for_typename. - (unoperator): Restore it. - * spew.c (frob_opname): Use nth_token for lookahead. - -2000-11-08 Nathan Sidwell - - * decl.c (grok_op_properties): Always use coerce_new_type and - coerce_delete_type. - * decl2.c (coerce_new_type): Use c_size_type_node. Preserve - exception specification. Tidy up. - (coerce_delete_type): Preserve exception specification. Tidy up. - -2000-11-07 Joseph S. Myers - - * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c - (push_binding_level), error.c (cp_tree_printer), pt.c - (process_partial_specialization, tsubst_template_arg_vector), - search.c (lookup_member): Use memset () instead of bzero (). - -2000-11-07 Nathan Sidwell - - * decl.c (build_ptrmemfunc_type): Allow error_mark_node. - -2000-11-05 Joseph S. Myers - - * Make-lang.in (c++.distdir): Remove. - -2000-11-04 Mark Mitchell - - * decl2.c (do_nonmember_using_decl): Allow `extern "C"' - declarations from different namespaces to be combined. - -2000-11-03 Zack Weinberg - - * decl.c: Include tm_p.h. - -2000-11-03 Joseph S. Myers - - * tree.c (cp_tree_equal): Use memcmp () instead of bcmp (). - -2000-11-02 Joseph S. Myers - - * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c - (build_overload_value), repo.c (open_repo_file), xref.c - (open_xref_file): Use strchr () and strrchr () instead of index () - and rindex (). - -2000-11-01 Bernd Schmidt - - * call.c (build_over_call): Call fold on the CALL_EXPR. - -2000-11-01 Gabriel Dos Reis - - * error.c (dump_template_decl): Separate template hearders with - space not comma. - -2000-10-31 Gabriel Dos Reis - - * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace - TS_* flags with corresponding TFF_*. Adjust prototypes of - functions (which used to take a tree_string_flags) to take an int. - - * cp-tree.h (enum tree_string_flags): Remove - (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, - TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, - TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, - TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, - TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, - TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. - (type_as_string, decl_as_string, expr_as_string, - context_as_string): Adjust prototype. - - * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER - instead of TS_PLAIN. - - * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF - instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of - plain `0'. - -2000-10-30 Mark Mitchell - - * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. - (linkage_kind): New enumeration. - (decl_linkage): New function. - * decl2.c (comdat_linkage): Extend comment. - * error.c (dump_function_decl): Print the arguments used to - instantiate a template, even when not printing the type of the - function. - * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, - not TREE_PUBLIC, to test for external linkage. - * tree.c (decl_linkage): New function. - -2000-10-28 Mark Mitchell - - * pt.c (instantiate_decl): Always instantiate static data members - initialized in-class. - -2000-10-27 Zack Weinberg - - * Make-lang.in: Move all build rules here from Makefile.in, - adapt to new context. Wrap all rules that change the current - directory in parentheses. Expunge all references to $(P). - When one command depends on another and they're run all at - once, use && to separate them, not ;. Add OUTPUT_OPTION to - all object-file generation rules. Delete obsolete variables. - - * Makefile.in: Delete. - * config-lang.in: Delete outputs= line. - -2000-10-26 Gabriel Dos Reis - - * error.c (dump_function_decl): Print no space between - `ptr-operator' the `type-specifier' of the return type. - (dump_type_prefix): Make sure we put space at the appropriate - place. - -2000-10-23 Jason Merrill - - * call.c (equal_functions): Also call decls_match for extern "C" fns. - -2000-10-22 Jason Merrill - - * call.c (build_conditional_expr): Use ocp_convert to force - rvalue conversion. - -2000-10-22 Mark Mitchell - - * call.c (standard_conversion): Use RVALUE_CONVs for all - expressions that satisfy lvalue_p, not just those that satisfy - real_lvalue_p. - - * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. - - * typeck.c (c_sizeof): Return an expression of `size_t' type, - not one with TYPE_IS_SIZETYPE set. - (dubious_conversion_warnings): Remove special-case code. - -2000-10-21 Geoffrey Keating - - * decl2.c (arg_assoc_type): Handle VECTOR_TYPE. - * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. - (dump_type_prefix): Print vector-of-int as 'int vector'. - (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. - * tree.c (walk_tree): Handle VECTOR_TYPE. - - * decl.c (init_decl_processing): Call MD_INIT_BUILTINS. - -2000-10-21 Jason Merrill - - * parse.y (operator): Set got_object from got_scope. - Set looking_for_typename. - * decl.c (lookup_name_real): Clear val after setting from_obj. - Reorganize diagnostic. - -2000-10-20 Jason Merrill - - * tree.c (walk_tree): Don't walk into default args. - - * error.c (dump_expr): Use host_integerp. - -2000-10-20 David Edelsohn - - * typeck2.c (abstract_virtuals_error): Use "because" instead of - "since" in error message. - -2000-10-20 Richard Kenner - - * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. - -2000-10-20 Jeffrey Oldham - - * decl.c (revert_static_member_fn): Fixed typo. - -2000-10-19 Mark Mitchell - - * class.c (subobject_offset_fn): New type. - (dfs_record_base_offsets): Remove. - (record_base_offsets): Likewise. - (dfs_search_base_offsets): Likewise. - (record_subobject_offset): New function. - (check_subobject_offset): Likewise. - (walk_subobject_offsets): Likewise. - (record_subobject_offsets): Likewise. - (layout_conflict_p): Reimplement. - (layout_nonempty_base_or_field): Correct handling of type - conflicts during layout. - (layout_empty_base): Likewise. - (build_base_field): Adjust to handle new representation of empty - base offset table. - (build_base_fields): Likewise. - (layout_virtual_bases): Likewise. - (splay_tree_compare_integer_csts): New function. - (layout_class_type): Use a splay_tree, rather than a varray, to - represent the offsets of empty bases. - - * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. - * decl.c (select_decl): Don't return declarations that are - DECL_ANTICIPATED. - -2000-10-18 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. - (fake_std_node): New macro. - * decl.c (in_std): Rename to ... - (in_fake_std): ... this. - (flag_no_builtin): Remove. - (flag_no_nonansi_builtin): Likewise. - (walk_namespaces_r): Use fake_std_node. - (push_namespace): Use std_identifier. - (pop_namespace): Use in_fake_std. - (lookup_name_real): Use fake_std_node. - (init_decl_processing): When -fhonor-std, create the `std' - namespace. Don't create a dummy fake_std_node in that case. - Adjust call to c_common_nodes_and_builtins. Use std_identifier. - (builtin_function): Put builtins whose names don't begin - with `_' in the std namespace. - * decl2.c (flag_no_builtin): Remove. - (flag_no_nonansi_builtin): Likewise. - (set_decl_namespace): Use fake_std_node. - (validate_nonmember_using_decl): Likewise. - (do_using_directive): Likewise. - (handle_class_head): Likewise. - * dump.c (dequeue_and_dump): Likewise. - * except.c (init_exception_processing): Use std_identifier. - * init.c (build_member_call): Use fake_std_node. - * rtti.c (init_rtti_processing): Use std_identifier. - -2000-10-17 Mark Mitchell - - * cp-tree.h (back_end_hook): Remove declaration. - * decl2.c (back_end_hook): Remove definition. - - * dump.c (dequeue_and_dump): Dump TREE_USED. - -2000-10-17 Brad Lucier - - * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int). - -2000-10-17 Joseph S. Myers - - * decl.c (WINT_TYPE): Define. - (init_decl_processing): Create types unsigned_ptrdiff_type_node, - c_size_type_node, signed_size_type_node and wint_type_node. - -2000-10-17 Joseph S. Myers - - * decl2.c (warn_missing_format_attribute): New variable. - (lang_decode_option): Decode -Wmissing-format-attribute. - -2000-10-16 Mark Mitchell - - * typeck.c (qualify_type): Remove. - (composite_pointer_type): Fix handling of conversions to `cv void*'. - -2000-10-14 Kaveh R. Ghazi - - * Makefile.in (parse.c, parse.h): Fix think-o in last patch. - -2000-10-13 Kaveh R. Ghazi - - * Makefile.in (parse.c, parse.h): Create atomically. - -2000-10-12 Mark Mitchell - - * class.c (current_obstack): Remove. - * decl.c (ggc_p): Remove. - (start_decl): Don't use decl_tree_cons. - (grokdeclarator): Don't use build_decl_list. - (start_function): Don't use decl_tree_cons. - (finish_function): Don't mess with obstacks. - * decl2.c (grok_x_components): Don't use build_decl_list. - * lex.c (make_call_declarator): Don't call decl_tree_cons. - (implicitly_declare_fn): Don't call build_decl_list. - * parse.y (frob_specs): Don't call build_decl_list or - decl_tree_cons. - (expr_or_declarator_intern): Don't call decl_tree_cons. - (primary): Don't call build_decl_list. - (fcast_or_absdcl): Likewise. - (typed_declspecs): Don't call decl_tree_cons. - (reserved_declspecs): Don't call build_decl_list. - (declmods): Likewise. - (reserved_typespecquals): Likewise. - (aggr): Likewise. - (new_type_id): Likewise. - (cv_qualifiers): Likewise. - (after_type_declarator_intern): Likewise. - (notype_declarator_intern): Likewise. - (absdcl_intern): Likewise. - (named_parm): Likewise. - * pt.c (most_specialized_class): Likewise. - * repo.c (temporary_obstack): Make it a structure, not a pointer. - (init_repo): Initialize it. - * search.c (current_obstack): Remove. - * typeck2.c (add_exception_specifier): Don't call build_decl_list. - -2000-10-09 Richard Henderson - - * Make-lang.in (CXX_EXTRA_HEADERS): Remove. - (c++ language support bits for libgcc): Remove. - (c++.clean): Remove cplib2.txt cleanup. - * config-lang.in (headers, lib2funcs): Remove. - - * exception.cc, new.cc, new1.cc, new2.cc: Remove files. - * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. - * inc/cxxabi.h, inc/exception, inc/new: Remove files. - * inc/new.h, inc/typeinfo: Remove files. - -2000-10-08 Joseph S. Myers - - * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already - defined. - (init_decl_processing): Initialize intmax_type_node and - uintmax_type_node. - -2000-10-06 Richard Henderson - - * cp-tree.h (struct cp_language_function): Remove x_result_rtx. - (original_result_rtx): Remove. - * decl.c (save_function_data): Don't clear x_result_rtx. - (mark_lang_function): Don't mark it either. - * expr.c (fixup_result_decl): Remove. - * semantics.c (genrtl_named_return_value): Frob the return decl - before calling emit_local_var. - (genrtl_finish_function): Don't call fixup_result_decl. - Always emit the jump to return_label. - -2000-10-06 Nathan Sidwell - - * pt.c (lookup_template_class): Set current access for enum. - (tsubst_enum): Set file & line for enum decl. - - * spew.c (yylex): Remove unused variable. - -2000-10-05 Richard Henderson - - * semantics.c (genrtl_finish_function): Don't init or check - can_reach_end; remove noreturn and return value checks. - -2000-10-05 Tom Tromey - - * init.c (build_java_class_ref): Use `build_static_name' with a - suffix, not a prefix, to build the class object's name. - -2000-10-05 Nathan Sidwell - - * cp-tree.h (access_kind): Fix comment typo. - * decl2.c (grokfield): Fix diagnostic typo. - * semantics.c (finish_template_type): Fix comment typo. - (finish_qualified_object_call_expr): Likewise. - -2000-10-05 Nathan Sidwell - - * pt.c (tsubst_expr, DECL_STMT case): Don't process if - tsubsting fails. - -2000-10-05 Nathan Sidwell - - * spew.c (frob_id): New static function. - (frob_opname): Use it. - (yylex): Use it. - -2000-10-01 Mark Mitchell - - * decl.c (lang_mark_false_label_stack): Remove. - * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. - -2000-09-30 Joseph S. Myers - - * gxxint.texi: Use @email for formatting email addresses. - -2000-09-29 Gabriel Dos Reis - - * error.c: Remove direct obstack manipulation. Replace with - output_buffer-based formatting. Adjust calls to removed macros. - (obstack_chunk_alloc, obstack_chunk_free): Remove. - (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, - OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. - -2000-09-24 Mark Mitchell - - * ir.texi: Move to ../c-tree.texi. - -2000-09-20 Jason Merrill - - * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P. - -2000-09-21 Andreas Jaeger - - * errfn.c: Move declaration of cp_printer and cp_printers to ... - * cp-tree.h: ... here. - - * error.c: Remove declaration of cp_printer. - -2000-09-20 Mark Mitchell - - * tree.c (mark_local_for_remap_r): Handle CASE_LABELs. - -2000-09-20 Hans-Peter Nilsson - - * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and - users. - -2000-09-18 Mark Mitchell - - * decl.c (start_function): Robustify. - -2000-09-18 Kaveh R. Ghazi - - * cp-tree.h (check_function_format): Accept a `status' parameter. - - * call.c, typeck.c: Updates calls to `check_function_format'. - -2000-09-17 Geoffrey Keating - - * decl2.c (handle_class_head): Always push some scope even - in the error case. - -2000-09-16 Mark Mitchell - - * cp-tree.h (struct cp_language_function): Remove - x_scope_stmt_stack and name_declared. - (current_scope_stmt_stack): Remove. - (function_name_declared_p): New macro. - (struct lang_decl_flags): Use c_lang_decl as a base class. - (context): Remove. - (struct lang_decl): Replace saved_tree with context. - (DECL_FRIEND_CONTEXT): Adjust accordingly. - (SET_DECL_FRIEND_CONTEXT): Likewise. - (DECL_VIRTUAL_CONTEXT): Likewise. - (DECL_SAVED_TREE): Remove. - (C_DECLARED_LABEL_FLAG): Likewise. - (cplus_expand_expr_stmt): Don't declare. - (add_decl_stmt): Likewise. - (add_scope_stmt): Likewise. - * decl.c (mark_stmt_tree): Remove. - (case_compare): Likewise. - (finish_case_label): Use c_add_case_label. - (init_decl_processing): Set more language-specific hooks. - (build_enumerator): Fix typo in comment. - (cplus_expand_expr_stmt): Remove. - (mark_lang_function): Use mark_c_language_function. - (lang_mark_tree): Use c_mark_lang_decl. - * decl2.c: Change order of inclusion. - * except.c: Likewise. - * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall - back on c_expand_expr. - * friend.c: Include expr.h. - * init.c: Change order of inclusion. - * Makefile.in: Update dependencies. - * lex.h (free_lang_decl_chain): Remove. - * optimize.c (maybe_clone_body): Use function_name_declared_p. - * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if - it doesn't exist. - (instantiate_decl): Use function_name_declared_p. - * semantics.c (lang_expand_expr_stmt): Remove. - (set_current_function_name_declared): Likewise. - (current_function_name_declared): Likewise. - (begin_compound_stmt): Use function_name_declared_p. - (add_decl_stmt): Remove. - (setup_vtbl_ptr): Use function_name_declared_p. - (add_scope_stmt): Remove. - (current_scope_stmt_stack): New function. - (cp_expand_stmt): Don't handle SCOPE_STMTs. - (expand_body): Use function_name_declared_p. - * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. - * typeck.c: Change order of includes. - (convert_sequence): Remove. - -2000-09-14 Joseph S. Myers - - * lex.c (reswords): Add _Complex. - -2000-09-14 Richard Kenner - - * Make-lang.in (cplib2.txt): Depend on cp/Makefile. - -2000-09-13 J. David Anglin - - * init.c (begin_init_stmts): Don't use // comments. - -2000-09-12 Jason Merrill - - * decl.c (maybe_deduce_size_from_array_init): Set do_default for - all non-extern arrays. - - * decl.c (grokdeclarator): Complain about 'friend T' for implicit - typenames, too. Downgrade complaint to pedwarn. - (xref_tag): Warn about surprising behavior of 'friend struct T'. - * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for - 'class This::Inherited'. - -2000-09-12 Mark Mitchell - - * decl.c (finish_case_label): Given the LABEL_DECL a - DECL_CONTEXT. - -2000-09-12 Gabriel Dos Reis - - * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, - TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF, - TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, - TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, - TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE): - New macros. - (sorry_for_unsupported_tree, print_scope_operator, - print_left_paren, print_right_paren, print_left_bracket, - print_right_bracket, print_whitespace): Likewise. - (aggr_variety): Rename to class_key_or_enum. - (print_type): Rename to print_type_id. - (print_type_specifier_seq, print_simple_type_specifier, - print_elaborated_type_specifier, - print_rest_of_abstract_declarator, - print_parameter_declaration_clause, print_exception_specification, - print_nested_name_specifier, print_template_id, - typedef_original_name, print_template_argument_list_start, - print_template_argument_list_end): New functions. - -2000-09-11 Gabriel Dos Reis - - * ir.texi: Add more documentation. - -2000-09-11 Mark Mitchell - - * cp-tree.h (struct saved_scope): Remove x_function_parms. - (current_function_parms): Don't define. - (struct cp_language_function): Remove parms_stored. - (current_function_just_assigned_this): Don't define. - (current_function_parms_stored): Likewise. - (static_ctors): Declare. - (static_dtors): Likewise. - (SF_EXPAND): Don't define. - (expand_start_early_try_stmts): Remove declaration. - (store_parm_decls): Likewise. - * decl.c (static_ctors): Don't declare. - (static_dtors): Likewise. - (struct binding_level): Remove this_block. - (poplevel): Remove dead code. - (set_block): Likewise. - (mark_binding_level): Don't mark this_block. - (mark_saved_scope): Don't mark x_function_parms. - (init_decl_processing): Don't add current_function_parms as a GC - root. - (check_function_type): Change prototype. - (start_function): Remove RTL-generation code. - (expand_start_early_try_stmts): Remove. - (store_parm_decls): Give it internal linkage. Remove - RTL-generation code. - (finish_function): Remove RTL-generation code. - * decl2.c (static_ctors): Fix formatting. - (static_dtors): Likewise. - * method.c (use_thunk): Don't call store_parm_decls. - (synthesize_method): Likewise. - * optimize.c (maybe_clone_body): Likewise. - * parse.y (fn.def2): Likewise. - (.set_base_init): Likewise. - (nodecls): Likewise. - * pt.c (instantiate_decl): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - * semantics.c (genrtl_try_block): Simplify. - (expand_body): Use genrtl_start_function and - genrtl_finish_function. - (genrtl_start_function): New function. - (genrtl_finish_function): Likewise. - -2000-09-11 Nathan Sidwell - - * error.c (cp_tree_printer, case 'P'): Append break. - -2000-09-11 Nathan Sidwell - - * cp-tree.h (frob_opname): Declare. - * parse.y (saved_scopes): New static variable. - (cp_parse_init): Adjust. - (do_id): If lastiddecl is NULL, do do_identifier. - (operator): Save scope information. - (unoperator): New reduction. Restore scope information. - (operator_name): Append unoperator. Call frob_opname. - * spew.c (frob_opname): Define. - -2000-09-10 Zack Weinberg - - * decl.c, rtti.c: Include defaults.h if not already included. - Don't define the *_TYPE_SIZE macros. - -2000-09-09 Mark Mitchell - - * cp-tree.h (push_switch): Change prototype. - (check_cp_case_value): Remove declaration. - (decl_constant_value): Likewise. - * decl.c (struct cp_switch): Add switch_stmt and cases. - (case_compare): New function. - (push_switch): Set switch_stmt. Initialize cases. - (pop_switch): Clean up cases. - (define_case_label): Rename to ... - (finish_case_label): ... this. Do semantic analysis for case - labels here. - (start_function): Correct comment. - * decl2.c (check_cp_case_value): Remove. - * expr.c (do_case): Remove. - * pt.c (tsubst_expr): Adjust call to finish_case_label. - * semantics.c (genrtl_do_poplevel): Remove declaration. - (RECHAIN_STMTS): Remove. - (finish_break_stmt): Use build_break_stmt. - (finish_continue_stmt): Use build_continue_stmt. - (finish_switch_cond): Adjust condition here, rater than in - c_expand_start_case. - (finish_case_label): Remove. - * typeck.c (c_expand_return): Remove. - (c_expand_start_case): Likewise. - -2000-09-07 Gabriel Dos Reis - - * ir.texi: Document type nodes. - -2000-09-06 Mark Mitchell - - * cp-tree.h (init_cp_semantics): Declare. - (genrtl_try_block): Don't declare. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_named_return_value): Likewise. - * lex.c (init_parse): Call init_cp_semantics. - * semantics.c (genrtl_try_block): Give it internal linkage. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_named_return_value): Likewise. - (lang_expand_stmt): Rename to ... - (cp_expand_stmt): ... this. Only handle C++-specific nodes. - (init_cp_semantics): Define. - - * decl.c (initialize_local_var): Remove RTL-generating code. - * semantics.c (genrtl_try_block): Fix formatting. - - Move statement-tree facilities from C++ to C front-end. - * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO. - (void_zero_node): Remove. - (stmt_tree): Likewise. - (scope_chain): Adjust. - (language_function): Rename to cp_language_function. - (cp_function_chain): Adjust. - (current_stmt_tree): Remove. - (last_tree): Likewise. - (last_expr_type): Likewise. - (struct lang_decl): Adjust. - (STMT_IS_FULL_EXPR_P): Remove. - (add_tree): Remove. - (begin_stmt_tree): Likewise. - (finish_stmt_tree): Likewise. - (walk_tree_fn): Likewise. - (walk_stmt_tree): Likewise. - * class.c (finish_struct): Replace use of add_tree with add_stmt. - * decl.c (mark_stmt_tree): Adjust type. - (init_decl_processing): Don't build void_zero_node. - (initialize_local_var): Adjust usage of current_stmt_tree. - (finish_enum): Use add_stmt, not add_tree. - (save_function_data): Adjust use of language_function. - (finish_constructor_body): Use add_stmt, not add_tree. - (finish_destructor_body): Likewise. - (push_cp_function_context): Adjust use of language_function. - (pop_cp_function_context): Likewise. - (mark_lang_function): Likewise. - (mark_cp_function_context): Likewise. - * init.c (build_aggr_init): Adjust use of current_stmt_tree. - (build_vec_init): Likewise. - * semantics.c (SET_LAST_STMT): Remove. - (RECHAIN_STMTS): Don't use it. - (stmts_are_full_exprs_p): Adjust use of current_stmt_tree. - (current_stmt_tree): Define. - (add_tree): Remove. - (finish_goto_stmt): Use add_stmt, not add_tree. - (finish_expr_stmt): Likewise. - (begin_if_stmt): Likewise. - (finish_then_clause): Likewise. - (begin_while_stmt): Likewise. - (begin_do_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_break_stmt): Likewise. - (finish_continue_stmt): Likewise. - (begin_switch_stmt): Likewise. - (finish_case_label): Likewise. - (begin_try_block): Likewise. - (begin_function_try_block): Likewise. - (begin_handler): Likewise. - (begin_catch_block): Likewise. - (begin_compound_stmt): Likewise. - (begin_asm_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (add_decl_stmt): Likewise. - (finish_subobject): Likewise. - (finish_decl_cleanup): Likewise. - (finish_named_return_value): Likewise. - (setup_vtbl_ptr): Likewise. - (add_scope_stmt): Likewise. - (finish_stmt_expr): Likewise. - (prune_unused_decls): Remove. - (begin_stmt_tree): Likewise. - (finish_stmt_tree): Likewise. - (prep_stmt): Adjust use of current_stmt_tree. - (lang_expand_stmt): Likewise. - * tree.c (statement_code_p): Remove. - (cp_statement_code_p): New function. - (walk_stmt_tree): Remove. - (init_tree): Set lang_statement_code_p. - -2000-09-06 Zack Weinberg - - Integrated preprocessor. - - * Make-lang.in, Makefile.in: Remove all references to input.c, - gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. - * gxx.gperf, hash.h, input.c: Delete. - * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is - initialized properly. - - * class.c (fixup_pending_inline): Take a tree, not a - struct pending_inline *. All callers changed. - (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, - RID_PROTECTED entries in ridpointers[] array here. - * decl.c (duplicate_decls): Do not refer to struct - pending_inline. - (record_builtin_type, init_decl_processing): Use RID_MAX not - CP_RID_MAX. - (grokdeclarator): Use C_IS_RESERVED_WORD. - * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of - cpplib. - (grok_x_components): Do not inspect pending_inlines chain. - - * cp-tree.h (struct lang_identifier): Add rid_code entry. - (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. - (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. - (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, - TIME_IDENTIFIER_FILEINFO): Kill. - Update prototypes. - * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a - single 32-bit word. - * parse.y: Call do_pending_inlines unconditionally. - reinit_parse_for_method is now snarf_method. fn.defpen is no - longer necessary. Remove unnecessary annotation on - SCOPE. Do not refer to end_of_file or struct pending_inline. - * semantics.c (begin_inline_definitions): Call - do_pending_inlines unconditionally. - - * lex.c: Remove all code now shared with C front end. - Initialize cpplib properly if USE_CPPLIB. Put reserved words - into the get_identifier table. Rewrite pragma handling to - work with the registry. Move code to save tokens for later - processing to spew.c. - - * spew.c: Rewrite everything in terms of token streams instead - of text. Move routines here from lex.c / input.c as - appropriate. GC-mark trees hanging off the pending inlines - chain. - -2000-09-06 Mark Mitchell - - * NEWS: Mention that the named return value extension has been - deprecated. - * cp-tree.h (original_result_rtx): Define. - (TREE_REFERENCE_EXPR): Remove. - (DECL_VPARENT): Likewise. - (pushdecl_nonclass_level): Likewise. - (store_return_init): Likewise. - (reinit_lang_specific): Likewise. - (genrtl_named_return_value): Change prototype. - * decl.c (original_result_rtx): Remove. - (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. - Do not generate RTL for local variables here. - (store_return_init): Remove. - * semantics.c (genrtl_named_return_value): Simplify. Fold in - store_return_init. - (finish_named_return_value): Adjust accordingly. Warn that this - extension is deprecated. - (lang_expand_stmt): Adjust call to genrtl_named_return_value. - -2000-09-06 Nathan Sidwell - - * pt.c (type_unification_real): Replace switch with if. - (unify): Tsubst non-type parms before comparing. - -2000-09-06 Nathan Sidwell - - * error.c (dump_typename): New function, broken out of ... - (dump_type): ... here. Use it. - * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE. - -2000-09-06 Nathan Sidwell - - * init.c (build_offset_ref): Deal with namespace scoped - TEMPLATE_ID_EXPRs. - -2000-09-06 Nathan Sidwell - - * class.c (resolve_address_of_overloaded_function): Add - explanation message. - * decl.c (define_case_label): Reformat explanation. - * decl2.c (finish_static_data_member_decl): Likewise. - (grokfield): Likewise. - * friend.c (do_friend): Likewise. - -2000-09-05 Zack Weinberg - - * tree.c (walk_tree): Expose tail recursion. - (walk_stmt_tree): New function. - * cp-tree.h: Prototype walk_stmt_tree. - * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not - the BLOCKs directly. If a BLOCK has no variables after - pruning, discard it. - (finish_stmt_tree): Use walk_stmt_tree. No need to save and - restore the line number. - -2000-09-05 Mark Mitchell - - * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. - (pt.o): Remove dependency on HTAB_H. - * cp-tree.h: Include hashtab.h. - (walk_tree): Change prototype. - (walk_tree_without_duplicates): New function. - * decl.c (check_default_argument): Use it. - * optimize.c (remap_decl): Adjust calls to walk_tree. - (copy_body): Likewise. - (expand_calls_inline): Likewise. - (calls_setjmp_p): Use walk_tree_without_duplicates. - * pt.c: Don't include hashtab.h. - (for_each_template_parm): Use walk_tree_without_duplicates. - * semantics.c (finish-stmt_tree): Likewise. - (expand_body): Likewise. - * tree.c (walk_tree): Add additional parameter. - (walk_tree_without_duplicates): New function. - (count_trees): Use it. - (verify_stmt_tree): Adjust call to walk_tree. - (find_tree): Use walk_tree_without_duplicates. - (no_linkage_check): Likewise. - (break_out_target_exprs): Adjust call to walk_tree. - (cp_unsave): Likewise. - -2000-09-04 Kriang Lerdsuwanakij - - * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code. - (TEMPLATE_TEMPLATE_PARM): Adjust comment. - * cp-tree.h (TYPE_BINFO): Adjust comment. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. - (TEMPLATE_TYPE_PARM_INDEX): Likewise. - (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. - (TYPE_TEMPLATE_INFO): Likewise. - (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise. - * class.c (push_nested_class): Likewise. - * decl.c (lookup_name_real): Likewise. - (grokdeclarator): Likewise. - (grok_op_properties): Likewise. - (xref_tag): Likewise. - (xref_basetypes): Likewise. - * decl2.c (constructor_name_full): Likewise. - (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case. - (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. - * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case. - (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (dump_type_suffix): Likewise. - * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM - instead. - (get_aggr_from_typedef): Likewise. - * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case. - (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (write_template_parm): Likewise. - (write_template_template_parm): Check tree code instead of - using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - * method.c (build_overload_nested_name): Add - BOUND_TEMPLATE_TEMPLATE_PARM. - (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case. - * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM. - * pt.c (convert_template_argument): Check tree code instead of - using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case. - (for_each_template_parm): Adjust comment. - (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. - (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use - template_args_equal to compare template template parameter cases. - * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM. - * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM - instead. - * tree.c (copy_template_template_parm): Decide whether to create - a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node. - (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM. - (copy_tree_r): Likewise. - * typeck.c (comptypes): Likewise. Check tree code instead of - using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. - -2000-09-04 Mark Elbrecht - - * decl.c (finish_function): Move the code for handling functions - marked with the constructor and destructor attributes inside the - expand_p block. - -2000-09-04 Nathan Sidwell - - * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR. - -2000-09-04 Nathan Sidwell - - * pt.c (lookup_template_class): Remove abort. - * tree.c (get_type_decl): Allow error_mark_node. - -2000-09-04 Nathan Sidwell - - * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside - TEMPLATE_ID_EXPRs. - -2000-09-03 Mark Mitchell - - * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change - new ABI mangling. - -2000-09-01 Nathan Sidwell - - * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify - union tag mismatch error reporting. - -2000-09-01 Nathan Sidwell - - * call.c (build_scoped_method_call): Check it is not a namespace. - -2000-08-30 Jason Merrill - - * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context. - - * tree.c (bot_manip): Check TREE_CONSTANT rather than - !TREE_SIDE_EFFECTS. Call break_out_target_exprs and - build_target_expr_with_type for the non-AGGR_INIT_EXPR case. - - * decl.c (start_function): Always call make_function_rtl. - -2000-08-29 Zack Weinberg - - * semantics.c (prune_unused_decls): New function. - (finish_stmt_tree): Call it via walk_tree. - -2000-08-29 Zack Weinberg - - * class.c (build_secondary_vtable): Constify a char *. - * decl.c (init_decl_processing): Initialize function_id_node, - pretty_function_id_node, and func_id_node. - * input.c (struct input_source): Constify 'str'. - (feed_input): Constify first argument. - * mangle.c (write_identifier): Constify argument. - * pt.c (mangle_class_name_for_template): Constify argument. - -2000-08-29 Mark Mitchell - - * typeck.c (mark_addressable): Remove code that pokes around in - RTL. - -2000-08-28 Jason Merrill - - * lex.c (file_name_nondirectory): Move to toplev.c. - - * cp-tree.h (LOCAL_CLASS_P): New macro. - * class.c (finish_struct_1): Use it. - -2000-08-27 Alex Samuel - - * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. - (write_encoding): Pass another argument to write_name. - (write_name): Add ignore_local_scope parameter. Fix handling of - local names. - (write_nested_name): Use write_unqualified_name. - (write_prefix): Likewise. Skip out on FUNCTION_DECLs. - (write_template_prefix): Use write_unqualified_name. - (write_component): Remove. - (write_local_name): Add parameter. Use direct local entity to - discriminator calculation. - (write_class_enum_type): Pass another argument to write_name. - (write_template_template_arg): Likewise. - (make_guard_variable): Likewise. - -2000-08-27 Jason Merrill - - * decl.c (pushdecl): Matching decls for local externs are found in - the current level. Propagate linkage information from previous - declarations. - -2000-08-26 Gabriel Dos Reis - - * ir.texi (Expressions): Fix typo. - -2000-08-25 Greg McGary - - * tree.c (init_tree): Use ARRAY_SIZE. - -2000-08-25 Gabriel Dos Reis - - * error.c (cp_tree_printer): Rework. - -2000-08-25 Mark Mitchell - - * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and - dyn-string.o. - (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c. - (cp-demangle.o): Remove target. - (dyn-string.o): Likewise. - - * decl.c (grokfndecl): Require that `main' return an `int'. - * mangle.c (write_encoding): Don't mangle return types for - conversion functions. - -2000-08-25 Gabriel Dos Reis - - * error.c (tree_formatting_info): New data type. - (tree_being_formatted): New macro. - (tree_formatting_flags): Likewise. - (put_whitespace): Likewise. - (print_tree_identifier): Likewise. - (print_identifier): Likewise. - (cp_tree_printer, print_function_argument_list, print_declaration, - print_expression, print_function_declaration, - print_function_parameter, print_type, print_cv_qualifier): New - functions. - (init_error): Initialize lang_printer. - -2000-08-24 Jason Merrill - - * typeck.c (build_ptrmemfunc): Just reinterpret if there's no - adjustment necessary. - -2000-08-24 Greg McGary - - * cp-tree.h (MAIN_NAME_P): Remove macro. - -2000-08-24 Gabriel Dos Reis - - * error.c (print_instantiation_context): Don't forget to flush the - buffer. - -2000-08-23 Jason Merrill - - * typeck.c (build_ptrmemfunc): Save the input pmf. - - * method.c (process_modifiers): Use same_type_p. - -2000-08-23 Mark Mitchell - - * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. - * mangle.c (write_function_type): Change prototype. - (write_encoding): Don't mangle return types for - constructors or destructors. - (write_type): Adjust call to write_function_type. - * pt.c (instantiate_template): Instantiate alternate entry points - when instantiating the main function. - -2000-08-23 Gabriel Dos Reis - - * error.c (cp_print_error_function): Don't use embedded '\n' in - output_printf. - -2000-08-23 Gabriel Dos Reis - - * decl.c (init_decl_processing): Remove bogus initialization. - * error.c (lang_print_error_function): Restore here. - (init_error): Initialize print_error_function. - -2000-08-22 Theodore Papadopoulo - - * decl2.c (arg_assoc): Revert my 2000-08-11 change. - -2000-08-22 Gabriel Dos Reis - - * Makefile.in (error.o): Depends on diagnostic.h - - * cp-tree.h (problematic_instantiation_changed, - record_last_problematic_instantiation, current_instantiation, - print_instantiation_context): Declare. - (maybe_print_template_context): Remove. - - * decl.c (init_decl_processing): Set print_error_function to NULL. - (lang_print_error_function): Remove, since we're using a new - machinery. - - * error.c: #include diagnostic.h - (function_category): New function. - (cp_diagnostic_starter): Likewise. - (cp_diagnostic_finalizer): Likewise. - (cp_print_error_function): Likewise. - (maybe_print_instantiation_context): Likewise. - (print_instantiation_full_context): Likewise. - (print_instantiation_partial_context): Likewise. - (print_instantiation_context): Define. - (init_error): Initialize diagnostic pager and finalizer. - - * pt.c (problematic_instantiation_changed): Define. - (record_last_problematic_instantiation): Likewise. - (current_instantiation): Likewise. - (maybe_print_template_context): Remove. - (print_template_context): Likewise. - (current_tinst_level): Make static to reflect Brendan Kehoe's - change of 1995-04-13. - (push_tinst_level): Call print_instantiation_context. - -2000-08-21 Nix - - * lang-specs.h: Do not process -o or run the assembler if - -fsyntax-only. - -2000-08-21 Joseph S. Myers - - * decl.c (flag_hosted, flag_noniso_default_format_attributes): New - variables. - * decl2.c (lang_decode_option): Disable gettext attributes for - -ansi. - -2000-08-21 Gabriel Dos Reis - - * lex.c (lang_init_options): Default diagnostic message maximum - length to 80, when line-wrapping. - -2000-08-20 Mark Mitchell - - * class.c (build_vtbl_initializer): Clear the entire - vtbl_init_data. Start keeping track of the functions for which we - have created vcall offsets here. - (dfs_build_vcall_offset_vtbl_entries): Remove. - (build_vcall_offset_vtbl_entries): Reimplement. - (add_vcall_offset_vtbl_entries_r): New function. - (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for - computing when vcall offsets are necessary. - -2000-08-18 Nathan Sidwell - - * decl.c (member_function_or_else): Use cp_error ... %T. - (grokdeclarator): Likewise. - (start_method): Likewise. - * friend.c (make_friend_class): Use cp_pedwarn ... %T. - -2000-08-18 Nathan Sidwell - - * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class - TYPE_DECLs. - -2000-08-18 Nathan Sidwell - - * cp-tree.h (PTRMEM_OK_P): New macro. - (itf_ptrmem_ok): New enumeration value. - * class.c (resolve_address_of_overloaded_function): Add PTRMEM - argument. Diagnose implicit pointer to member. - (instantiate_type): Don't diagnose implicit pointer to member - here. Pass itf_ptrmem_ok if ok. Adjust calls to - resolve_address_of_overloaded_function. - * init.c (build_offset_ref): Set PTRMEM_OK_P. - (resolve_offset_ref): Don't diagnose implicit pointer to member here. - * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here. - * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P. - (build_unary_op): Deal with single non-static member in - microsoft-land. - -2000-08-18 Nathan Sidwell - - * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE. - -2000-08-18 Nathan Sidwell - - * cp-tree.h (enum_name_string): Remove prototype. - (report_case_error): Remove prototype. - * cp/typeck2.c (enum_name_string): Remove. - (report_case_error): Remove. - * error.c (dump_expr): Deal with enum values directly. - Correctly negate integer constant. - -2000-08-17 Nathan Sidwell - - * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare. - (__cxa_vec_delete2, __cxa_vec_delete3): Declare. - * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement. - (__cxa_vec_delete2, __cxa_vec_delete3): Implement. - (__cxa_vec_new): Use __cxa_vec_new2. - (__cxa_vec_delete): Use __cxa_vec_delete2. - -2000-08-17 Nathan Sidwell - - * vec.cc (__cxa_vec_new): Set "C" linkage. - (__cxa_vec_ctor): Likewise. - (__cxa_vec_cctor): Likewise. - (__cxa_vec_dtor): Likewise. - (__cxa_vec_delete): Likewise. - * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage. - (__cxa_vec_ctor): Likewise. - (__cxa_vec_cctor): Likewise. - (__cxa_vec_dtor): Likewise. - (__cxa_vec_delete): Likewise. - -2000-08-17 Nathan Sidwell - - * class.c (instantiate_type): Reinstate local variable - deleted in previous change. - - * cvt.c (cp_convert_to_pointer): Pass itf_complain, not - itf_no_attributes. - -2000-08-17 Nathan Sidwell - - * cp-tree.h (instantiate_type_flags): New enumeration. - (instantiate_type): Change parameter. - * class.c (instantiate_type): Adjust prototype. Adjust. - * call.c (standard_conversion): Adjust instantiate_type call. - (reference_binding): Likewise. - (build_op_delete_call): Likewise. - (convert_like_real): Likewise. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_reference): Likewise. - * pt.c (convert_nontype_argument): Likewise. - * typeck.c (build_binary_op): Likewise. - (build_ptrmemfunc): Likewise. - (convert_for_assignment): Likewise. - -2000-08-17 Nathan Sidwell - - * cp-tree.h (CPTR_AGGR_TAG): New global tree node. - (current_aggr): Define. - * decl.c (grokdeclarator): Make sure a friend class is an - elaborated type specifier. - * parse.y (current_aggr): Remove static definition. - (cp_parse_init): Adjust. - (structsp): Clear and restore current_aggr. - (component_decl_list): Clear current_aggr. - - * error.c (dump_type, case TYPENAME_TYPE): Don't emit the - aggregate tag on the typename's context. - - * pt.c (tsubst_friend_class): Return error_mark_node, if - parms becomes NULL. - (instantiate_class_template): Ignore error_mark_node friend types. - -2000-08-14 Nathan Sidwell - - * cvt.c (warn_ref_binding): New static function, broken out of ... - (convert_to_reference): ... here. Use it. - -2000-08-11 Kriang Lerdsuwanakij - - * parse.y (template_arg): Add rule for template qualified with - global scope. - -2000-08-11 Theodore Papadopoulo - - * decl2.c (add_function): Reorganize. - (arg_assoc): Do not consider function template decls. - -2000-08-11 Jason Merrill - - * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're - looking inside. - -2000-08-11 Nathan Sidwell - - * cp-tree.h (resolve_scope_to_name): Remove unused prototype. - (lookup_nested_tag): Likewise. - - * decl2.c (grokfield): Fix comment to reflect many types of _DECLs - can be produced. - -2000-08-11 Nathan Sidwell - - * parse.y (named_complex_class_head_sans_basetype): Remove - always true if. - -2000-08-11 Nathan Sidwell - - * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build - explicit TEMPLATE_ID_EXPR args. - (build_expr_from_tree, case CALL_EXPR): Likewise. - -2000-08-11 Nathan Sidwell - - * decl.c (check_tag_decl): Diagnose typename's which don't - declare anything. - -2000-08-10 Nathan Sidwell - - * init.c (build_aggr_init): Reject bogus array initializers - early. - -2000-08-09 Nathan Sidwell - - * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi - runtime. - * cp/tinfo.cc (__dynamic_cast): Likewise. - * cp/inc/cxxabi.h (__dynamic_cast): Likewise. - -2000-08-09 Nathan Sidwell - - * cvt.c (convert_to_pointer_force): Fix error message when - attempting to cast from ambiguous base. - -2000-08-08 Jason Merrill - - * pt.c (tsubst_aggr_type): Bail if creating the argvec fails. - (tsubst_template_arg_vector): Likewise. - - * decl2.c (build_anon_union_vars): Choose the largest field; don't - assume that one will be as large as the union. - -2000-08-07 Kazu Hirata - - * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo. - * decl.c (pop_labels): Likewise. - -2000-08-04 Jeffrey Oldham - - * inc/cxxabi.h (__pbase_type_info): Changed member names to match - specifications. - (__pointer_to_member_type_info): Likewise. - (__base_class_info): Likewise. - (__class_type_info): Likewise. - (__si_class_type_info): Likewise. - (__vmi_class_type_info): Likewise. - * tinfo.cc (__si_class_type_info::__do_find_public_src): - Changed member names to match specifications. - (__vmi_class_type_info::__do_find_public_src): Likewise. - (__si_class_type_info::__do_dyncast): Likewise. - (__vmi_class_type_info::__do_dyncast): Likewise. - (__si_class_type_info::__do_upcast): Likewise. - (__vmi_class_type_info::__do_upcast): Likewise. - * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. - (__pbase_type_info::__pointer_catch): Likewise. - (__pointer_type_info::__pointer_catch): Likewise. - (__pointer_to_member_type_info::__pointer_catch): Likewise. - -2000-08-04 Zack Weinberg - - * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. - * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. - (cc1plus): Link with $(BACKEND) and $(C_OBJS). - -2000-08-04 Mark Mitchell - - * cp-tree.h (add_method): Change prototype. - * class.c (add_method): Remove FIELDS parameter. Add ERROR_P. - Don't double the size of the method vector in the error case. - (handle_using_decl): Adjust call to add_method. - (add_implicitly_declared_members): Likewise. - (clone_function_decl): Likewise. - * decl2.c (check_classfn): Likewise. - * semantics.c (finish_member_declaration): Likewise. - -2000-08-04 Joseph S. Myers - - * decl.c (flag_isoc94): New variable. - -2000-08-02 Jason Merrill - - * pt.c (do_type_instantiation): Add complain parm; don't complain - if called recursively. - * cp-tree.h, parse.y: Adjust. - -2000-08-02 Zack Weinberg - - * decl2.c: Silently ignore -Wstrict-prototypes; warn about - -Wno-strict-prototypes. - - * g++spec.c: Adjust type of second argument to - lang_specific_driver, and update code as necessary. - - * cp-tree.h: Don't prototype min_precision here. - (my_friendly_assert): Cast expression to void. - * semantics.c (do_poplevel): Initialize scope_stmts. - -2000-08-02 Mark Mitchell - - * cp-tree.h (DECL_NEEDED_P): Tweak. - -2000-07-28 Jason Merrill - - * lang-specs.h: Use %i in rule for .ii files. - -2000-07-31 Zack Weinberg - - * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. - -2000-07-30 Mark Mitchell - - Allow indirect primary bases. - * cp-tree.h (struct lang_type): Remove vfield_parent. Add - primary_base. - (CLASSTYPE_VFIELD_PARENT): Remove. - (CLASSTYPE_PRIMARY_BINFO): Reimplement. - (BINFO_PRIMARY_BINFO): Remove. - (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement. - (BINFO_VBASE_PRIMARY_P): Likewise. - (BINFO_PRIMARY_BASE_OF): New macro. - (BINFO_INDIRECT_PRIMARY_P): Likewise. - (get_primary_binfo): New function. - * decl.c (lang_mark_tree): Make lang_type::primary_base. - * class.c (vcall_offset_data_s): Rename to ... - (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p, - and add ctor_vtbl_p. - (get_derived_offset): Use get_primary_binfo. - (dfs_mark_primary_bases): Adjust handling of virtual primary - bases. - (mark_primary_bases): Likewise. - (set_primary_base): Take a binfo, not an integer, as a - representation of the primary base. - (indirect_primary_base_p): Remove. - (determine_primary_base): Adjust for indirect primary bases. - (dfs_find_final_overrider): Fix typo in coment. - (update_vtable_entry_for_fn): Use get_primary_binfo. - (layout_nonempty_base_or_field): Tweak. - (build_base_fields): Adjust for new primary base semantics. - (dfs_propagate_binfo_offsets): Remove. - (propagate_binfo_offsets): Rewrite. - (dfs_set_offset_for_shared_vbases): Remove. - (layout_virtual_bases): Don't use it. - (layout_class_type): Set CLASSTYPE_SIZE correctly under the new - ABI. - (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not - CLASSTYPE_VFIELD_PARENT. - (dfs_get_primary_binfo): New function. - (get_primary_binfo): Likewise. - (dump_class_hierarchy_r): Tweak printing of primary bases. - (build_vtbl_initializer): Fix typo in comments. Use - vtbl_init_data. - (build_vcall_and_vbase_vtbl_entries): Likewise. - (build_vbaes_offset_vtbl_entries): Likewise. - (dfs_build_vcall_offset_vtbl_entries): Adjust setting of - BV_VCALL_INDEX to handle indirect primary bases. - (build_vcall_offset_vtbl_entries): Use vtbl_init_data. - (build_rtti_vtbl_entries): Likewise. - * search.c (get_shared_vbase_if_not_primary): Tweak. - (find_vbase_instance): Likewise. - (binfo_for_vtable): Simplify. - * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF. - (make_binfo): Make it have 11 entries. - -2000-07-30 Alex Samuel - - * mangle.c (DECL_TEMPLATE_ID_P): Remove. - (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when - ascertaining primaryness. - (G): Remove template_args. - (decl_is_template_id): New function. - (write_encoding): Use decl_is_template_id. - (write_name): Likewise. Handle type_decls. Get main variant of - type decls. - (write_nested_name): Likewise. - (write_prefix): Likewise. - (write_template_prefix): Likewise. - (write_special_name_constructor): Remove defunct production from - comment. - (write_bare_function_type): Remove comment about absent parameter. - (write_template_template_arg): Add missing grammar production to - comment. - -2000-07-27 Jason Merrill - - * decl.c (duplicate_decls): If common_type produces a non-typedef - type for a typedef, just use the old type. - -2000-07-27 Mark Mitchell - - * cp-tree.h (function_depth): Declare. - (verify_stmt_tree): Likewise. - (find_tree): Likewise. - * decl.c (function_depth): Give it external linkage. - * optimize.c (optimize_function): Increment and decrement it. - * tree.c (verify_stmt_tree_r): New function. - (verify_stmt_tree): Likewise. - (find_tree_r): Likewise. - (find_tree): Likewise. - -2000-07-27 Jason Merrill - - * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use - TYPE_PTRMEMFUNC_P. - * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC. - -2000-07-26 Mark Mitchell - - * decl.c (start_cleanup_fn): Mark the function as `inline'. - * decl2.c (get_guard): Call cp_finish_decl, not - rest_of_decl_compilation, for local guards. - * lex.c (do_identifier): Remove unused variable. - -2000-07-26 Marc Espie - - * parse.y: Add missing ';'. - -2000-07-26 Mark Mitchell - - * parse.y (empty_parms): Use `()', not `(...)', when in the scope - of `extern "C++"'. - -2000-07-25 Nathan Sidwell - - Kill strict_prototype. Backwards compatibility only for - non NO_IMPLICIT_EXTERN_C systems. - * cp-tree.h (flag_strict_prototype): Remove. - (strict_prototype): Remove. - (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. - * decl.c (maybe_push_to_top_level): Adjust. - (pop_from_top_level): Adjust. - (decls_match): Only allow sloppy parm matching for ancient - system headers. - (init_decl_processing): Adjust. - (grokdeclarator): Adjust. - * decl2.c (flag_strict_prototype): Remove. - (strict_prototype): Remove. - (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. - (lang_f_options): Remove "strict-prototype". - (unsupported-options): Add "strict-prototype". - * lex.c (do_identifier): Adjust. - (do_scoped_id): Adjust. - * parse.y (empty_parms): Adjust. - * class.c (push_lang_context): Adjust. - (pop_lang_context): Adjust. - * typeck.c (comp_target_parms): Adjust. - -2000-07-25 Nathan Sidwell - - * decl.c (poplevel): Deal with anonymous variables at for scope. - (maybe_inject_for_scope_var): Likewise. - -2000-07-25 Zack Weinberg - - * decl.c: Remove all signal handling code, now done in toplev.c. - -2000-07-23 Mark Mitchell - - * decl.c (make_rtl_for_nonlocal_decl): Rework. - - * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set - correctly. - -2000-07-20 Zack Weinberg - - * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. - Define my_friendly_assert and my_friendly_abort as macros - which may call friendly_abort. Prototype friendly abort, not - my_friendly_abort or my_friendly_assert. - * decl.c (signal_catch): Report the signal caught in the error - message. Call fatal directly. - * typeck2.c (ack, my_friendly_assert): Delete. - (my_friendly_abort): Rename to friendly_abort. Expect file, - line, and function parameters. Report the abort code, then - call fancy_abort. Do not mask an abort if errors have - already occurred. - -2000-07-18 Nathan Sidwell - - * typeck.c (comp_target_parms): Remove obsolete parameter. - (comp_target_types): Adjust. - -2000-07-17 Jason Merrill - - * typeck.c (mark_addressable): Never set TREE_USED. - * call.c (build_call): Don't abort on calls to library functions - that have been declared normally. - - * typeck.c (build_binary_op): Fix grammar in warning. - - * exception.cc (__eh_free): Fix prototype. - - * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR. - - * decl.c (pushdecl): Handle seeing an OVERLOAD in - IDENTIFIER_NAMESPACE_VALUE. - -2000-07-16 Mark Mitchell - - * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation. - * method.c (use_thunk): Correct handling of vcall offsets. - -2000-07-14 Zack Weinberg - - * .cvsignore: parse.h and parse.c have no cp- prefix. - -2000-07-13 Mark Mitchell - - * .cvsignore: New file. - -2000-07-13 Zack Weinberg - - * lang-specs.h: Use the new named specs. Remove unnecessary braces. - -2000-07-12 Mark Mitchell - - * Makefile.in ($(PARSE_H)): Depend directly on parse.y. - * parse.c: Remove. - * parse.h: Likewise. - -2000-07-11 Mark Mitchell - - * class.c (layout_class_type): Add pointers to virtual bases after - base classes under the old ABI. - -2000-07-10 Benjamin Chelf - - * semantics.c (finish_for_stmt): Remove call to emit_line_note. - (finish_continue_stmt): Likewise. - (begin_for_stmt): Remove call to note_level_for_for. - (finish_goto_stmt): Change call from build_min_nt - to build_stmt. - (finish_expr_stmt): Likewise. - (begin_if_stmt): Likewise. - (begin_while_stmt): Likewise. - (finish_while_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_for_stmt): Likewise. - (finish_break_stmt): Likewise. - (begin_switch_stmt): Likewise. - (finish_case_label): Likewise. - (genrtl_try_block): Likewise. - (begin_try_block): Likewise. - (begin_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (add_decl_stmt): Likewise. - (finish_subobject): Likewise. - (finish_decl_cleanup): Likewise. - (finish_named_return_value): Likewise. - (setup_vtbl_ptr): Likewise. - (add_scope_stmt): Likewise. - * decl.c (finish_constructor_body): Likewise. - (finish_destructor_body): Likewise. - * optimize.c (copy_body_r): Likewise. - (initialize_inlined_parameters): Likewise. - (declare_return_variable): Likewise. - (expand_call_inline): Likewise. - -2000-07-10 Jakub Jelinek - - * semantics.c (expand_body): Sync interface information - at the end of function body expansion. - -2000-07-09 Jason Merrill - - * init.c (build_new_1): Bail early if the call to new fails. - - * decl.c (compute_array_index_type): Check specifically for - an INTEGER_CST, not just TREE_CONSTANT. - - * decl.c (duplicate_decls): Don't call duplicate_decls on - the DECL_TEMPLATE_RESULT. - (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different - codes. - - * error.c (dump_template_bindings): Don't crash if we had an - invalid argument list. - - * typeck.c (c_expand_start_case): Do narrowing here. - * semantics.c (finish_switch_cond): Not here. - -2000-07-09 Hidvegi Zoli - - * parse.y (asm_clobbers): Do string concatenation. - -2000-07-09 Mark Mitchell - - * decl.c (pushtag): Don't put local classes in template functions - on the local_classes list. - -2000-07-04 Scott Snyder - - * decl2.c (get_guard): Add missing return for old ABI local - variable case. - -2000-07-09 Mark Mitchell - - * cp-tree.h (char_type_p): New function. - * decl.c (init_decl_processing): Don't initialize - signed_wchar_type_node or unsigned_wchar_type_node. - (complete_array_type): Handle brace-enclosed string-constants. - * rtti.c (emit_support_tinfos): Remove #if 0'd code. - * tree.c (char_type_p): New function. - * typeck2.c (digest_init): Use char_type_p. - -2000-07-06 Nathan Sidwell - - * pt.c (tsubst): Don't layout type, if it's error_mark. - -2000-07-06 Nathan Sidwell - - * pt.c (instantiate_pending_templates): Reset template level. - -2000-07-05 Jason Merrill - - * call.c (joust): Don't complain about `operator char *()' beating - `operator const char *() const'. - -2000-07-04 scott snyder - Jason Merrill - - * repo.c (repo_get_id): Handle the case where a class with virtual - bases has a null TYPE_BINFO_VTABLE. - -2000-07-04 Kevin Buhr - Jason Merrill - - * parse.y (member_init): Just pass in the type. - * init.c (expand_member_init): Handle getting a type. - -2000-07-04 Martin v. Löwis - Jason Merrill - - * decl.c (finish_function): Warn if a function has no return - statement. - Suggested by Andrew Koenig. - * typeck.c (check_return_expr): Do set current_function_returns_value - if we got an error_mark_node. - -2000-07-03 Nathan Sidwell - - * decl2.c (push_decl_namespace): Push the original namespace. - -2000-07-03 Nathan Sidwell - - * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES. - * semantics.c (begin_class_definition): Clear it. - -2000-07-02 Benjamin Chelf - - * cp-tree.h (genrtl_goto_stmt): Remove declaration. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - - * init.c (begin_init_stmts): Remove call to - genrtl_begin_compound_stmt. - (finish_init_stmts): Remove call to genrtl_finish_compound_stmt. - - * semantics.c (lang_expand_stmt): Changed call to - genrtl_compound_stmt to ignore return value. - -2000-07-02 Mark Mitchell - - * mangle.c (canonicalize_for_substitution): Return the canonical - variant of a type. - - * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a - TYPE_DECL. - * typeck.c (commonparms): Remove obstack manipulations. - -2000-07-01 Benjamin Chelf - - * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o. - - * Makefile.in (OBJS): Added ../c-semantics.o. - (OBJDEPS): Likewise. - - * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to - ../c-common.h. - (struct stmt_tree): Added comment. - (current_function_name_declared): Removed. - (stmts_are_full_exprs_p): Likewise. - (genrtl_do_pushlevel): Likewise. - (genrtl_clear_out_block): Likewise. - (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h. - (DECL_ANON_UNION_ELEMS): Likewise. - (emit_local_var): Likewise. - (make_rtl_for_local_static): Likewise. - (do_case): Likewise. - (expand_stmt): Likewise. - (genrtl_decl_cleanup): Likewise. - (c_expand_asm_operands): Likewise. - (c_expand_return): Likewise. - (c_expand_start_case): Likewise. - - * decl.c (make_rtl_for_local_static): Moved to c-semantics.c. - (emit_local_var): Likewise. - (initialize_local_var): Change reference to - stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). - Change reference to stmts_are_full_exprs_p to - current_stmt_tree->stmts_are_full_exprs_p. - (push_cp_function_context): Likewise. - - * expect.c (expand_throw): Change reference to - stmts_are_full_exprs_p. - - * init.c (build_aggr_init): Change reference to - stmts_are_full_exprs_p. - (build_vec_init): Likewise. - - * optimize.c (maybe_clone_body): Change reference to - current_function_name_declared to - cp_function_chain->name_declared. - - * pt.c (instantiate_decl): Change reference to - current_function_name_declared to - cp_function_chain->name_declared. - - * semantics.c (expand_cond): Moved declaration to c-common.h. - (genrtl_do_pushlevel): Moved to c-semantics.c. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (gerntl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_decl_cleanup): Likewise. - (expand_cond): Likewise. - (expand_stmt): Renamed to ... - (lang_expand_stmt): ... this. - (lang_expand_expr_stmt): Initialize. - (set_current_function_name_declared): Likewise. - (stmts_are_full_exprs_p): Likewise. - (current_function_name_declared): Likewise. - (anon_aggr_type_p): Likewise. - (do_poplevel): Change reference to - stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). - Change reference to stmts_are_full_exprs_p to - current_stmt_tree->stmts_are_full_exprs_p. - (add_tree): Likewise. - (finish_expr_stmt): Likewise. - (prep_stmt): Likewise. - (lang_expand_stmt): Likewise. - (begin_compound_stmt): Change reference to - current_function_name_declared to - cp_function_chain->name_declared and call to - current_function_name_declared(). - (setup_vtbl_ptr): Likewise. - (genrtl_do_poplevel): Removed. - -2000-06-30 Jason Merrill - - * init.c (init_init_processing): Go back to aligning like - double_type_node for old ABI. - (get_cookie_size): Make cookie larger if we get a type that needs - more alignment. - (build_vec_delete): Call it. - - * typeck.c (qualify_type_recursive): New fn. - (composite_pointer_type): Use it. - (build_binary_op): Use composite_pointer_type. - -2000-06-24 Carlos O'Ryan - Jason Merrill - - * typeck.c (check_return_expr): Don't complain about returning - NULL from operator new if -fcheck-new. - * cp-tree.h: Declare flag_check_new here. - * init.c: Not here. - -2000-06-28 Alex Samuel - - * mangle.c (find_substitution): Use same_type_p. - (write_encoding): Don't check for substitutions. - -2000-06-30 Nathan Sidwell - - * parse.y (expr_no_comma_rangle): New non-terminal. - (template_parm): Use it for default parameter case. - (template_arg): Use it. - (expr_no_commas): Remove commented out undefined extensions. - * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. - * parse.h, parse.c: Rebuilt. - -2000-06-30 Mark Mitchell - - * semantics.c (genrtl_asm_stmt): Don't decay input operands here. - (finish_asm_stmt): Do it here, instead. - - * cp-tree.h (ridpointers): Don't declare. - * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX. - (record_builtin_java_type): Likewise. - (init_decl_processing): Likewise. - * lex.c: Move inclusion of lex.h. - (ridpointers): Don't define. - (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of - RID_MAX. - * lex.h (enum rid): Rename to ... - (enum cp_rid): ... this. - (ridpointers): Don't declare. - * parse.y: Move inclusion of lex.h. - * parse.c: Regenerated. - * spew.c: Move inclusion of lex.h. - - * cp-tree.h (struct language_function): Remove temp_name_counter. - (temp_name_counter): Remove. - (get_temp_name): Change prototype. - (get_guard): New function. - (get_guard_cond): Likewise. - (set_guard): Likewise. - * cvt.c (build_up_reference): Adjust call to get_temp_name. - * decl.c (expand_static_init): Use get_guard and friends to - implement guard variables. - * decl2.c (get_temp_name): Assume that the variables created are - always static. - (get_sentry): Rename to ... - (get_guard): ... this. Implement new ABI guard variables. - (get_guard_bits): New function. - (get_guard_cond): Likewise. - (set_guard): Likewise. - (start_static_initialization_or_destruction): Use them. - (do_static_initialization): Replace sentry with guard throughout. - (do_static_destruction): Likewise. - * init.c (create_temporary_var): Add comment. - -2000-06-28 Alex Samuel - - * mangle.c (find_substitution): Use same_type_p. - (write_encoding): Don't check for substitutions. - -2000-06-30 Nathan Sidwell - - * parse.y (expr_no_comma_rangle): New non-terminal. - (template_parm): Use it for default parameter case. - (template_arg): Use it. - (expr_no_commas): Remove commented out undefined extensions. - * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. - * parse.h, parse.c: Rebuilt. - -2000-06-29 Mark Mitchell - - * cp-tree.h (flag_const_strings): Remove. - (warn_parentheses): Likewise. - (warn_format): Likewise. - (common_type): Likewise. - (default_conversion): Likewise. - (build_binary_op): Likewise. - (cp_build_binary_op): New macro. - * call.c (build_new_op): Use cp_build_binary_op instead of - build_binary_op. - * class.c (build_vtable_entry_ref): Likewise. - * decl.c (expand_static_init): Likewise. - (compute_array_index_type): Likewise. - (build_enumerator): Likewise. - * decl2.c (delete_sanity): Likewise. - (start_static_initialization_or_destruction): Likewise. - * error.c (dump_type_suffix): Likewise. - * init.c (resolve_offset_ref): Likewise. - (build_new): Likewise. - (build_new_1): Likewise. - (build_vec_delete_1): Likewise. - (build_vec_init): Likewise. - (build_delete): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - (synthesize_tinfo_var): Likewise. - * search.c (expand_upcast_fixups): Likewise. - (fixup_all_virtual_upcast_offsets): Likewise. - * typeck.c (build_array_ref): Likewise. - (get_member_function_from_ptrfunc): Likewise. - (build_binary_op): Add parameter. - (pointer_int_sum): Use cp_build_binary_op. - (pointer_diff): Likewise. - (build_modify_expr): Likewise. - (get_delta_difference): Likewise. - (build_ptrmemfunc): Likewise. - -2000-06-29 Nathan Sidwell - - * cp-tree.h (SET_DECL_ARTIFICIAL): Remove. - * decl.c (create_implicit_typedef): Adjust. - * decl2.c (build_artificial_parm): Adjust. - * method.c (implicitly_declare_fn): Adjust. - * pt.c (push_inline_template_parms_recursive): Adjust. - (process_template_parm): Adjust. - (overloaded_template_name): Adjust. - * semantics.c (finish_template_template_parm): Adjust. - -2000-06-28 Mark Mitchell - - * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove. - * class.c (update_vtable_entry_for_fn): Correct logic for deciding - where to emit thunks. - (build_vtt): Adjust call to build_vtt_inits. - (build_vtt_inits): Add parameter to indicate whether or not - sub-VTTs for virtual bases should be included. Adjust handling of - construction vtables. - (get_matching_base): New function. - (dfs_build_vtt_inits): Rename to ... - (dfs_build_secondary_vptr_vtt_inits): Adjust handling of - construction vtables. - (dfs_fixup_binfo_vtbls): Likewise. - (build_ctor_vtbl_groups): Build construction vtables for virtual - bases, too. - (accumulate_vtbl_inits): Tweak logic for deciding whether or not - to build construction vtbls. - (dfs_accumulate_vtbl_inits): Adjust handling of - construction vtables. - - * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified - types correctly. - -2000-06-27 Mark Mitchell - - * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. - -2000-06-26 Nathan Sidwell - - * search.c (hides): Remove. - (is_subobject_of_p): Add most_derived parameter. Use - CANONICAL_BINFO. - (lookup_field_queue_p): Adjust. - (lookup_field_r): Adjust. - -2000-06-26 Nathan Sidwell - - * decl2.c (handle_class_head): Bash typedefs to the type's main - decl. - -2000-06-25 Mark Mitchell - - * cp-tree.h (genrtl_begin_stmt_expr): Rename to ... - (begin_global_stmt_expr): ... this. - (genrtl_finish_stmt_expr): Rename to ... - (finish_global_stmt_expr): ... this. - * init.c (begin_init_stmts): Adjust calls. - (finish_init_stmts): Likewise. - * semantics.c (genrtl_begin_stmt_expr): Rename to ... - (begin_global_stmt_expr): ... this. - (genrtl_finish_stmt_expr): Rename to ... - (finish_global_stmt_expr): ... this. - -2000-06-25 Theodore Papadopoulo - - * search.c (lookup_member): Fix typo in comment. - -2000-06-24 Jason Merrill - - * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace. - (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL. - -2000-06-24 Martin v. Löwis - - * parse.y (complex_direct_notype_declarator): Support global_scope. - * Makefile.in: Adjust conflict count. - -2000-06-23 Kriang Lerdsuwanakij - - * parse.y (template_arg): Convert TEMPLATE_DECL - that is a template template parameter to - TEMPLATE_TEMPLATE_PARM here. - - * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment. - * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro. - (copy_template_template_parm): Adjust prototype. - * decl.c (grokdeclarator): Remove dead code. - * pt.c (process_template_parm): Tidy. - (lookup_template_class): Construct nodes in - copy_template_template_parm. - (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to - lookup_template_class. Use TYPE_TI_TEMPLATE. - * tree.c (copy_template_template_parm): Add NEWARGS - parameter. - (mapcar): Adjust call to copy_template_template_parm. - * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. - * method.c (build_template_template_parm_names): Change error - code to avoid compilation warning. - - * gxxint.texi: Document template template parameter - name mangling. - -2000-06-21 Alex Samuel - - * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. - (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. - (cp-demangle.o): New rule. - (dyn-string.o): Likewise. - * inc/cxxabi.h (__cxa_demangle): New declaration. - -2000-06-22 Mark Mitchell - - * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro. - (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. - (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset - a tree, not an int. - (THUNK_GENERATE_WITH_VTABLE_P): New macro. - (make_thunk): Change prototype. - (emit_thunk): Rename to use_thunk. - (mangle_thunk): Change prototype. - * class.c (get_derived_offset): Simplify. - (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and - BV_GENERATE_THUNK_WITH_VTABLE_P. - (build_primary_vtable): Simplify. - (add_virtual_function): Use BV_FN, rather than TREE_VALUE. - (dfs_find_base): Remove. - (update_vtable_entry_for_fn): Correct bug in finding the base - where a virtual function was first declared. Figure out whether - or not to emit a vcall-thunk with the vtables in which it appears. - Correct logic for deciding whether to use an ordinary thunk, or a - vcall thunk. - (finish_struct_1): Remove unnecssary code. - (build_vtbl_initializer): Use ssize_int for the running counter of - negative indices. - (build_vtbl_initializer): Only use vcall thunks where necessary. - Mark thunks as needing to be emitted with their vtables, or not. - (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in - indices. Use size_binop. - (dfs_build_vcall_offset_vtbl_entries): Don't rely on - BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use - size_binop. - (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. - (build_vtable_entry): Mark thunks as needing to be emitted with - their vtables, or not. - * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. - * decl2.c (mark_vtable_entries): Use use_thunk instead of - emit_thunk. - * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk - information. - * error.c (dump_expr): Use BV_FN. - * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, - not an int. - * method.c (make_thunk): Likewise. - (emit_thunk): Rename to use_thunk. Allow callers to decide - whether or not to actually emit the thunk. Adjust for changes in - representation of vcall offsets. - * search.c (dfs_get_pure_virtuals): Use BV_FN. - * semantics.c (emit_associated_thunks): New function. - (expand_body): Use it. - * ir.texi: Adjust descriptions of thunks. - -2000-06-22 Jason Merrill - - * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. - (tsubst_friend_function): Copy it here. - - * decl.c (grok_op_properties): Fix typo. - - * decl2.c (delete_sanity): Clarify warning, avoid failure on - deleting void*. - - * pt.c (check_explicit_specialization): Clarify error. - - * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from - an old OVERLOAD when we're declaring a non-function. - (pushdecl, destroy_local_var): Check for error_mark_node. - (warn_extern_redeclared_static): Also bail early if - we're a CONST_DECL. - (push_overloaded_decl): Ignore an old error_mark_node. - -2000-06-22 Nathan Sidwell - - * call.c (build_x_va_arg): Check if in a template decl. - * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. - -2000-06-20 Alexandre Petit-Bianco - - * class.c (push_lang_context): TYPE_NAME gets you to the Java - types DECLs. - * decl.c (check_goto): Computed gotos assumed OK. - -2000-06-20 Jason Merrill - - * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs - for which we don't need to look for instantiations. - -2000-06-21 Nathan Sidwell - - * parse.y (program): Always call finish_translation_unit. - * parse.c, parse.h: Rebuilt. - -2000-06-20 Zack Weinberg - - * method.c: Don't include hard-reg-set.h. - -2000-06-20 Nathan Sidwell - - * rtti.c (get_base_offset): Cope when vbase field is in a base. - -2000-06-20 Nathan Sidwell - - * call.c (build_conditional_expr): Use VOID_TYPE_P. - * cvt.c (cp_convert_to_pointer): Likewise. - (convert_to_void): Likewise. - * error.c (dump_expr): Likewise. - * except.c (complete_ptr_ref_or_void_ptr_p): Likewise. - * init.c (build_delete): Likewise. - * method.c (emit_thunk): Likewise. - * optmize.c (declare_return_variable): Likewise. - * rtti.c (get_tinfo_decl_dynamic): Likewise. - (get_typeid): Likewise. - (build_dynamic_cast_1): Likewise. - * typeck.c (composite_pointer_type): Likewise. - (common_type): Likewise. - (build_indirect_ref): Likewise. - (build_binary_op): Likewise. - (build_x_compound_expr): Likewise. - (check_return_expr): Likewise. - * typeck2.c (add_exception_specifier): Likewise. - - * mangle.c (write_method_parms): Use direct comparison for end - of parmlist. - -2000-06-19 Benjamin Chelf - - * cp-tree.h (genrtl_try_block): Declare function. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_decl_cleanup): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_do_pushlevel): Likewise. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_named_return_value): Likewise. - (genrtl_begin_stmt_expr): Likewise. - (genrtl_finish_stmt_expr): Likewise. - (finish_for_stmt): Removed first argument. - (finish_switch_stmt): Likewise. - - * semantics.c (genrtl_try_block): Define function. - (genrtl_handler): Likewise. - (genrtl_catch_block): Likewise. - (genrtl_ctor_stmt): Likewise. - (genrtl_subobject): Likewise. - (genrtl_decl_cleanup): Likewise. - (genrtl_do_poplevel): Likewise. - (genrtl_do_pushlevel): Likewise. - (genrtl_clear_out_block): Likewise. - (genrtl_goto_stmt): Likewise. - (genrtl_expr_stmt): Likewise. - (genrtl_decl_stmt): Likewise. - (genrtl_if_stmt): Likewise. - (genrtl_while_stmt): Likewise. - (genrtl_do_stmt): Likewise. - (genrtl_return_stmt): Likewise. - (genrtl_for_stmt): Likewise. - (genrtl_break_stmt): Likewise. - (genrtl_continue_stmt): Likewise. - (genrtl_scope_stmt): Likewise. - (genrtl_switch_stmt): Likewise. - (genrtl_case_label): Likewise. - (genrtl_begin_compound_stmt): Likewise. - (genrtl_finish_compound_stmt): Likewise. - (genrtl_compound_stmt): Likewise. - (genrtl_asm_stmt): Likewise. - (genrtl_named_return_value): Likewise. - (genrtl_begin_stmt_expr): Likewise. - (genrtl_finish_stmt_expr): Likewise. - (finish_for_stmt): Removed first argument and generate rtl - specific code. - (finish_switch_stmt): Likewise. - (do_poplevel): Removed generate rtl specific code. - (do_pushlevel): Likewise. - (add_tree): Likewise. - (finish_goto_stmt): Likewise. - (finish_expr_stmt): Likewise. - (begin_if_stmt): Likewise. - (finish_if_stmt_cond): Likewise. - (finish_then_clause): Likewise. - (begin_else_clause): Likewise. - (finish_else_clause): Likewise. - (finish_if_stmt): Likewise. - (clear_out_block): Likewise. - (begin_while_stmt): Likewise. - (finish_while_stmt_cond): Likewise. - (finish_while_stmt): Likewise. - (begin_do_stmt): Likewise. - (finish_do_body): Likewise. - (finish_do_stmt): Likewise. - (finish_return_stmt): Likewise. - (begin_for_stmt): Likewise. - (finish_for_init_stmt): Likewise. - (finish_for_cond): Likewise. - (finish_for_expr): Likewise. - (finish_break_stmt): Likewise. - (finish_continue_stmt): Likewise. - (begin_switch_stmt): Likewise. - (finish_switch_cond): Likewise. - (finish_case_label): Likewise. - (begin_try_block): Likewise. - (begin_function_try_block): Likewise. - (finish_try_block): Likewise. - (finish_cleanup_try_block): Likewise. - (finish_cleanup): Likewise. - (finish_function_try_block): Likewise. - (finish_handler_sequence): Likewise. - (finish_function_handler_sequence): Likewise. - (begin_handler): Likewise. - (finish_handler_parms): Likewise. - (begin_catch_block): Likewise. - (finish_handler): Likewise. - (begin_compound_stmt): Likewise. - (finish_compound_stmt): Likewise. - (finish_asm_stmt): Likewise. - (finish_label_stmt): Likewise. - (finish_label_decl): Likewise. - (finish_subobject): Likewise. - (finish_decl_cleanup): Likewise. - (finish_named_return_value): Likewise. - (begin_stmt_expr): Likewise. - (finish_stmt_expr): Likewise. - - * decl.c (initialize_local_var): Changed call to finish_expr_stmt - to call genrtl_expr_stmt when appropriate. - - * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and - begin_compound_expr to call genrtl_begin_stmt_expr and - genrtl_begin_compound_expr when appropriate. - (finish_init_stmts): Changed calls to finish_compound_expr and - finish_stmt_expr to call genrtl_finish_compound_expr and - genrtl_finish_stmt_expr when appropriate. - (expand_default_init): Changed call to finish_expr_stmt to call - genrtl_expr_stmt when appropriate. - (build_vec_init): Likewise. - - * parse.y (simple_stmt): Removed first argument from call to - finish_for_stmt. Removed first argument from call to - finish_switch_stmt. - - * parse.c: Regenerated. - - * pt.c (tsubst_expr): Removed first argument from call to - finish_for_stmt. Removed first argument from call to - finish_switch_stmt. - -2000-06-16 Benjamin Chelf - - * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to - CP_DUMMY_TREE_CODE. Remove #include "c-common.def". - - * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def". - (cplus_tree_code_length[]): Likewise. - (cplus_tree_code_name[]): Likewise. - (init_parse): Added call to add_c_tree_codes. Changed - LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE. - -2000-06-16 Mark Mitchell - - * cp-tree.h (finish_mem_initializers): Declare. - (count_trees): Likewise. - * parse.y (base_init): Use finish_mem_initializers. - * semantics.c (finish_mem_initializers): New function. - - * tree.c (count_trees_r): Prototype. Use DATA parameter to store - the number of trees. - (n_trees): Remove. - (count_trees): Don't use it. - -2000-06-15 Jason Merrill - - * tree.c (count_trees): New debugging function. - - * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P. - * init.c (build_member_call): Pull out the name of a DECL. - - * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H. - * semantics.c (expand_body): Push to TV_INTEGRATION here. - * optimize.c (optimize_function): Not here. - * pt.c (instantiate_decl): Push to TV_PARSE. - -2000-06-15 Mark Mitchell - - * cp-tree.h (struct language_function): Remove x_base_init_list - and x_member_init_list. - (current_base_init_list): Remove. - (current_member_init_list): Likewise. - (setup_vtbl_ptr): Change prototype. - (emit_base_init): Likewise. - (expand_member_init): Likewise. - (reinit_parse_for_function): Remove. - * decl.c (save_function_data): Don't clear x_base_init_list and - x_member_init_list. - (mark_language_function): Don't mark them. - * init.c (perform_member_init): Tweak comment. - (sort_member_init): Take the list of initializers as an argument. - (sort_base_init): Likewise. - (emit_base_init): Likewise. - (expand_member_init): Return the initializer. Don't use global - variables. - * lex.c (reinit_parse_for_function): Remove. - * method.c (build_template_parm_names): Correct substitution. - (do_build_copy_constructor): Don't use current_member_init_list - and current_base_init_list. - (synthesize_method): Likewise. - * parse.y (base_init): Split mem-initializers into - base-initializers and field-initializers. - (member_init_list): Build up the list here. - (member_init): Return the initializer. - (fn.depfn): Don't use reinit_parse_for_function. - * parse.c: Regenerated. - * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the - ERROR_MARK. - (tsubst_expr): Don't use current_member_init_list - and current_base_init_list. - (tsubst_expr_values): Rename to ... - (tsubst_initializer_list): ... this. Use convert_from_reference. - * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list - and current_base_init_list. - (begin_function_definition): Don't call reinit_parse_for_function. - - * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors. - - * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE - correctly. - - * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking. - -2000-06-14 Benjamin Chelf - - * cp-tree.h (IF_COND): Move to c-common.h. - (THEN_CLAUSE): Likewise. - (ELSE_CLAUSE): Likewise. - (WHILE_COND): Likewise. - (WHILE_BODY): Likewise. - (DO_COND): Likewise. - (DO_BODY): Likewise. - (RETURN_EXPR): Likewise. - (EXPR_STMT_EXPR): Likewise. - (FOR_INIT_STMT): Likewise. - (FOR_COND): Likewise. - (FOR_EXPR): Likewise. - (FOR_BODY): Likewise. - (SWITCH_COND): Likewise. - (SWITCH_BODY): Likewise. - (CASE_LOW): Likewise. - (CASE_HIGH): Likewise. - (GOTO_DESTINATION): Likewise. - (COMPOUND_BODY): Likewise. - (ASM_CV_QUAL): Likewise. - (ASM_STRING): Likewise. - (ASM_OUTPUTS): Likewise. - (ASM_INPUTS): Likewise. - (ASM_CLOBBERS): Likewise. - (DECL_STMT_DECL): Likewise. - (STMT_EXPR_STMT): Likewise. - (LABEL_STMT_LABEL): Likewise. - (SCOPE_BEGIN_P): Likewise. - (SCOPE_END_P): Likewise. - (SCOPE_STMT_BLOCK): Likewise. - (SCOPE_NULLIFIED_P): Likewise. - (SCOPE_NO_CLEANUPS_P): Likewise. - (SCOPE_PARTIAL_P): Likewise. - (ASM_VOLATILE_P): Likewise. - (STMT_LINENO): Likewise. - (STMT_LINENO_FOR_FN_P): Likewise. - - * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR, - ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, - FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, - CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, - SCOPE_STMT, CASE_LABEL, STMT_EXPR. - - * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def. - - * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def. - (cc1plus$(exeext)): Added $(srcdir)/c-common.def. - - * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'. - (cplus_tree_code_length[]): Added '#include "c-common.def"'. - (cplus_tree_code_name[]): Added '#include "c-common.def"'. - -2000-06-14 Mark Mitchell - - * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. - * class.c (dfs_find_final_overrider): Set it appropriately. - (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to - avoid unneeded secondary vptrs. - -2000-06-13 Jakub Jelinek - - * class.c (build_secondary_vtable): Set DECL_USER_ALIGN. - (check_bitfield_decl, check_field_decl): Likewise. - (build_vtbl_or_vbase_field, build_base_field): Likewise. - (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN. - * decl.c (record_unknown_type): Set TYPE_USER_ALIGN. - (xfer_tag, finish_enum): Likewise. - * decl2.c (finish_builtin_type): Likewise. - * init.c (init_init_processing): Likewise. - * pt.c (instantiate_class_template): Likewise. - * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN. - * cp-tree.h (struct lang_type): Add user_align member. - (CLASSTYPE_USER_ALIGN): Define. - -2000-06-13 Maciej W. Rozycki - - * Make-lang.in (c++.install-common): Install g++-cross in - $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as - $(target_alias)-g++ and $(target_alias)-c++. - -2000-06-12 Mark Mitchell - - * class.c (vcall_offset_data_s): Add last_init and fns. - (overrides): Rename to same_signature_p. - (dfs_find_final_overrider): Adjust accordingly. - (mark_overriders): Likewise. - (warn_hidden): Likewise. - (build_vtbl_initializer): Reorganize machinery for building things - at negative offsets. - (build_vcall_and_vbase_vtbl_entries): Likewise. - (build_vbase_offset_vtbl_entries): Likewise. - (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall - offset entries. Do not create two entries for functions with the - same signature. - (build_vcall_offset_vtbl_entries): Initialize vod->fns. - (build_rtti_vtbl_entries): Reorganize machinery for building things - at negative offsets. - - * optimize.c (expand_call_inline): Don't recurse into the code - used to initialize the parameters more than once. - -2000-06-11 Mark Mitchell - - * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment. - (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here. - (find_substitution): Only use the `Sa' substitution for - std::allocator, not instantiations of it. - (write_template_prefix): Move comment. Only use a TREE_LIST to - represent substitutions for a member template. - (write_array_type): Mangle array dimensions correctly. - * optimize.c (maybe_clone_body): Copy more information from the - cloned function. - * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE - on the regenerated declaration. - -2000-06-11 Chip Salzenberg - Mark Mitchell - - * class.c (build_vtable): Clarify comment. - (build_ctor_vtbl_group): Pass the most derived type to - build_vtable. - -2000-06-11 Kaveh R. Ghazi - - * decl2.c (compare_options): Don't needlessly cast away const-ness. - -2000-06-10 Mark Mitchell - - * decl.c (add_binding): Handle duplicate declarations of external - variables. - -2000-06-09 Chip Salzenberg - Mark Mitchell - - * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an - argument. - (write_signed_number): New macro. - (write_unsigned_number): Likewise. - (write_source_name): Use them. - (write_number): Handle signed and unsigned values. - (write_integer_cst): Use tree_int_cst_sgn, and use - write_unsigned_number or write_signed_number as appropriate. - (write_discriminator): Use write_unsigned_number or - write_signed_number as appropriate. - (write_template_arg_literal): Likewise. - (write_array_type): Use tree_low_cst. - (write_template_parm): Use write_unsigned_number or - write_signed_number as appropriate. - (write_substitution): Adjust call to write_number. - (write_type): Get the TYPE_MAIN_VARIANT before mangling it. - (write_expression): Handle non-type template arguments of - reference type correctly. - (mangle_thunk): Use write_signed_number. - -2000-06-09 Chip Salzenberg - - * mangle.c (find_substition): Don't mangle objects with typename - substitutions (e.g. "cin" as "Si"). - -2000-06-09 Zack Weinberg - - * call.c (add_candidate): Use ggc_alloc_cleared. - * decl.c (lookup_label): Likewise. - * lex.c (retrofit_lang_decl): Likewise. - -2000-06-09 Jason Merrill - - * semantics.c (expand_body): Push to TV_EXPAND. - * optimize.c (optimize_function): Push to TV_INTEGRATION. - * decl.c (start_function): Always call announce_function. - - * tinfo2.cc: Just declare abort. - -2000-06-09 Gabriel Dos Reis - - * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @' - whenever @ is a symbolic name. - -2000-06-08 Jakub Jelinek - - * method.c (make_thunk): Clear DECL_VTT_PARM in thunk. - -2000-06-07 Mark Mitchell - - * decl.c (pushdecl): Look up functions by DECL_NAME, not - DECL_ASSEMBLER_NAME. - -2000-06-06 Mark Mitchell - - * decl2.c (c_language): Define. - -2000-06-06 Gabriel Dos Reis - - * lex.c (lang_init_options): Tweak. - - * decl2.c: Remove #inclusion of diagnostic.h - (lang_decode_option): Move diagnostic formatting options to - toplevel. - - * lang-options.h: Remove documentation for diagnostic options. - - * Makefile.in (lex.o): Depends upon diagnostic.h - -2000-06-06 Mark Mitchell - - * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have - the same DECL_RESULT, it's not a redefinition. - * pt.c (tsubst_decl): Remove code to handle illegal - specializations. - -2000-06-06 Nathan Sidwell - - * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c - -2000-06-05 Jason Merrill - - * search.c (maybe_suppress_debug_info): Don't check - CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set. - - * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION - here if extern_p. - - Remember instantiation context in deferred instantiations. - * cp-tree.h (struct tinst_level): Remove. - (TINST_DECL, TINST_LINE, TINST_FILE): New macros. - * pt.c (current_tinst_level): Now a tree. - (print_template_context, push_tinst_level, pop_tinst_level, - tinst_for_decl): Adjust. - (reopen_tinst_level): New fn. - (init_pt): Register current_tinst_level as a root. - (add_pending_template): Put current_tinst_level in TREE_PURPOSE - of the pending templates list. - (instantiate_pending_templates): Adjust. Call reopen_tinst_level. - * lex.c (extract_interface_info): Adjust. - * decl2.c (warn_if_unknown_interface): Adjust. - -2000-06-05 Mark Mitchell - - * class.c (indirect_primary_base_p): New function. - (determine_primary_base): Use it. - -2000-06-05 Nathan Sidwell - - Update new-abi dynamic cast algorithm. - * tinfo.cc (__class_type_info::__dyncast_result): Add - whole_details. Adjust constructor. - (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags. - Avoid unnecessary searching. - (__dynamic_cast): Adjust for __dyncast_result::whole_details. - -2000-06-05 Richard Kenner - - * decl.c (init_decl_processing): Don't call record_component_aliases. - * tree.c (build_cplus_array_type_1): Likewise. - -2000-06-04 Mark Mitchell - - * ir.texi: Correct typo. - * mangle.c (write_expression): Handle non-type template arguments - with reference type. - * method.c (build_overload_value): Likewise. - * pt.c (convert_nontype_argument): Explicitly represent conversion - to a reference with an ADDR_EXPR. - (unify): Always unify arguments in left-to-right order. - -2000-06-03 Alex Samuel - Mark Mitchell - - * Make-lang.in (CXX_SRCS): Add mangle.c. - * Makefile.in (CXX_OBJS): Add mangle.o. - (mangle.o): New rule. - - * class.c (local_classes): New variable. - * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI. - (get_vtt_name): Use mangle_vtt_name for new ABI. - (init_class_processing): Initialize local_classes. - (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI. - * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER. - (std_identifier): New macro. - (DECL_VOLATILE_MEMFUNC_P): New macro. - (DECL_NAMESPACE_STD_P): Likewise. - (local_classes): Declare. - (get_mostly_instantiated_function_type): Declare. - (init_mangle): Declare. - (mangle_decl): Likewise. - (mangle_type_string): Likewise. - (mangle_type): Likewise. - (mangle_typeinfo_for_type): Likewise. - (mangle_typeinfo_string_for_type): Likewise. - (mangle_vtbl_for_type): Likewise. - (mangle_vtt_for_type): Likewise. - (mangle_ctor_vtbl_for_type): Likewise. - (mangle_thunk): Likewise. - (mangle_conv_op_name_for_type): Likewise. - (mangle_guard_variable): Likewise. - * decl.c (pushtag): Keep track of local classes. - (initialize_predefined_identifiers): Initialize std_identifier. - (init_decl_processing): Use std_identifier. - (start_decl): Don't treat instantiations as specializations. - (grokdeclarator): Likewise. - (grokvardecl): Call mangle_decl for new ABI. Only set mangled - name for fully-instantiated templates. - * decl2.c (grokclassfn): Use set_mangled_name_for_decl for - destructors with the new ABI. - (finish_static_data_member_decl): Use mangle_decl under the new ABI. - (grokfield): Use mangle_type for new ABI. - (grokoptypename): Use mangle_conv_op_for_type for new ABI. - (get_sentry): Use mangle_guard_variable for new ABI. - (start_static_initialization_or_destruction): Likewise. - * expr.c (extract_aggr_init): Remove. - (extract_scalar_init): Likewise. - (extract_init): Remove #if 0'd code. - * mangle.c: New function. - * method.c (build_mangled_name): Assert not flag_new_abi. - (build_static_name): Likewise. - (build_decl_overload_real): Likewise. - (build_typename_overload): Likewise. - (build_overload_with_type): Likewise. - (build_overload_name): Likewise. - (get_ctor_vtbl_name): Likewise. - (start_squangling): Likewise. - (get_id_2): Likewise. - (set_mangled_name_for_decl): Call mangle_decl for new ABI. - (init_method): Call init_mangle for new ABI. - (make_thunk): Call mangle_thunk for new ABI. - * operators.def: Correct new ABI manglings for the `%' operator. - Add `::' operator. - * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and - DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL. - (lookup_template_class): Call mangle_decl for new ABI. - (get_mostly_instantiated_function_type): New function. - (set_mangled_name_for_template_decl): Use it. - (tsubst_decl): Use set_mangled_name_for_decl for destructors with - the new ABI. Use mangle_conv_op_name_for_type for instantiated - conversion op names. - * rtti.c (tinfo_name): Call mangle_type_string for new ABI. - (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI. - (tinfo_base_init): Likewise. Mangle typeinfo string name with - mangle_typeinfo_string_for_type. - -2000-06-03 Mark Mitchell - - * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment. - (INNERMOST_TEMPLATE_ARGS): New macro. - (innermost_args): Remove. - (get_innermost_template_args): New function. - * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS. - * error.c (dump_function_decl): Be caution when using - most_general_template. - * method.c (build_template_parm_names): Use - INNERMOST_TEMPLATE_ARGS. - * pt.c (add_to_template_args): Tidy comment - (get_innermost_template_args): New function. - (check_explicit_specialization): Clear DECL_INITIAL for a new - specialization. - (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS. - Tidy. - (push_template_decl): Always register specializations of the most - general template. - (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS. - (coerce_template_parms): Likewise. - (lookup_template_class): Likewise. - (innermost_args): Remove. - (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS. - (tsubst_decl): Handle tricky specializations. Use - get_innermost_template_args. - (instantiate_template): Simplify handling of partial - instantiations. - (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS. - (most_general_template): Reimplement, in a more straightforward - manner. - (regenerate_decl_from_template): Tweak formatting. Use - TMPL_ARGS_DEPTH for clarity. - (set_mangled_name_for_template_decl): Use INNERMOST_ARGS. - - * dump.c (dequeue_and_dump): Dump information about thunks. - -2000-06-01 Richard Henderson - - * decl.c (init_decl_processing): Set lang_get_alias_set first thing. - -2000-06-01 Richard Henderson - - * decl2.c (unsupported_options): Fix typo, make const. - (lang_decode_option): Fix bsearch argument order. - -2000-06-01 Mark Mitchell - - * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE - on FIELD_DECLs. - -2000-05-31 Richard Kenner - - * cp-tree.h (c_get_alias_set): Deleted. - * Makefile.in (decl.o): Include ../expr.h. - * decl.c (expr.h): Include. - (init_decl_processing): Call record_component_aliases for arrays. - (grokdeclarator): Likewise. - Set TREE_ADDRESSABLE for fields that aren't bitfields. - * tree.c (build_cplus_array_type_1): Call record_component_aliases. - -2000-05-31 Mark Mitchell - - Remove guiding declaration support. - * cp/cp-tree.h (flag_dump_translation_unit): Make it const. - (flag_guiding_decls): Remove. - * call.c (build_user_type_conversion_1): Remove support for - guiding decls. - (build_new_function_call): Likewise. - (build_new_op): Likewise. - (build_new_method_call): Likewise. - * decl.c (start_function): Likewise. - * friend.c (is_friend): Likewise. - (do_friend): Likewise. - * decl2.c ((flag_dump_translation_unit): Make it const. - (flag_guiding_decls): Remove. - (unsupported_options): New variable - (compare_options): New function. - (lang_decode_option): Use them. - - * decl.c (build_cp_library_fn): Set DECL_CONTEXT. - - * method.c (mangle_expression): Adjust test for legal expression - operators. - - * pt.c (instantiate_decl): Save and restore the local - specializations list. - -2000-05-30 Jason Merrill - - * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING. - -2000-05-30 Mark Mitchell - - * call.c (add_template_candidate_real): Handle member template - constructors for classes with virtual bases. - (build_user_type_conversion_1): Use in_charge_arg_for_name. - (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. - - * ir.texi: Update thunk documentation. - - * call.c (joust): Fix handling of overloaded builtin operators. - -2000-05-30 Zack Weinberg - - * cp-tree.h (DECL_ANTICIPATED): New macro. - Document new use of DECL_LANG_FLAG_7. - * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins - in the user namespace. - * lex.c (do_identifier): If the identifier's declaration has - DECL_ANTICIPATED on, it has not yet been declared. But do not - replace it with an ordinary implicit declaration. - - * tinfo2.cc: Include stdlib.h. - -2000-05-29 Mark Mitchell - - * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. - * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not - CLASSTYPE_ALIGN. - -2000-05-28 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Use skip_leading_substring instead - of plain strncmp. - -2000-05-28 Alexandre Oliva - - * operators.def (?): this. Fixed. - -2000-05-27 Alex Samuel - Mark Mitchell - - * cp-tree.h (ansi_opname): Make it a macro. - (ansi_assopname): Likewise. - (struct lang_decl_flags): Add assignment_operator_p. - (struct lang_decl): Add operator_code. - (DECL_VTT_PARM): Adjust. - (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an - overloaded operator. - (SET_OVERLOADED_OPERATOR_CODE): New macro. - (DECL_ASSIGNMENT_OPERATOR_P): New macro. - (DECL_ARRAY_DELETE_OPERATOR_P): Adjust. - (opname_tab): Remove. - (assignop_tab): Likewise. - (operator_name_info_t): New type. - (operator_name_info): New variable. - (assignment_operator_name_info): Likewise. - (build_cp_library_fn): Remove declaration. - (push_cp_library_fn): Likewise. - (operator_name_string): Likewise. - (build_decl_overload): Likewise. - * call.c (print_z_candidates): Simplify. - (build_object_call): Adjust usage of ansi_opname. Use - DECL_OVERLOADED_OPERATOR_P. - (op_error): Adjust operator name lookup. - (build_conditional_expr): Adjust usage of ansi_opname. - (build_new_op): Likewise. - (build_op_delete_call): Likewise. - (build_over_call): Likewise. - (joust): Use DECL_OVERLOADED_OPERATOR_P. - * decl.c (duplicate_decls): Copy operator_code. - (init_decl_processing): Adjust parameters to push_cp_library_fn. - (builtin_function): Adjust parameters to build_library_fn_1. - (build_library_fn_1): Accept an overloaded operator code. - (build_library_fn): Pass ERROR_MARK. - (build_cp_library_fn): Accept an overloaded operator code. - (push_cp_library_fn): Likewise. - (grokfndecl): Tweak. - (grokdeclarator): Simplify code to compute names of overloaded - operators. Adjust use of ansi_opname. - (ambi_op_p): Work on tree_codes, not identifiers. - (unary_op_p): Likewise. - (grok_op_properties): Likewise. - (start_function): Use DECL_OVERLOADED_OPERATOR_P. - (lang_mark_tree): Don't try to mark the operator_code. - * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P. - * error.c (dump_decl): Remove special handling for operator - names. - (dump_function_name): Likewise. - (dump_expr): Adjust name lookup of operators. - (op_to_string): Simplify. - (assop_to_string): Likewise. - * init.c (build_new_1): Adjust use of ansi_opname. - * lex.c (opname_tab): Remove. - (assignop_tab): Likewise. - (ansi_opname): Likewise. - (ansi_assopname): Likewise. - (operator_name_string): Likewise. - (reinit_lang_specific): Likewise. - (operator_name_info): New variable. - (assignment_operator_name_info): Likewise. - (init_operators): New function. - (init_parse): Use it. - (do_identifier): Adjust use of ansi_opname. - * method.c (mangle_expression): Don't use ansi_opname for - mangling. - (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P. - (build_decl_overload): Remove. - (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly. - (do_build_assign_ref): Adjust use of ansi_opname. - (synthesize_method): Likewise. - (implicitly_declare_fn): Likewise. - * operators.def: New file. - * parse.y (operator): Adjust use of ansi_opname. - * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P. - (set_mangled_name_for_template_decl): Don't play games with - current_namespace. - (special_function_p): Adjust use of ansi_opname. - * typeck.c (check_return_expr): Likewise. - * Make-lang.in (cc1plus): Depend on operators.def. - * Makefile.in (lex.o): Likewise. - (decl.o): Likewise. - -2000-05-27 Zack Weinberg - - * Make-lang.in (cplib2.ready): Eradicate. - -2000-05-27 Richard Kenner - - * method.c (mangle_expression): Use TREE_CODE_LENGTH. - * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. - (built_min, cp_tree_equal): Likewise. - -2000-05-26 Mark Mitchell - - * class.c (layout_nonempty_base_or_field): Replace - `record_layout_info' with `record_layout_info_s'. - -2000-05-26 Jason Merrill - - Fix goto checking. - * cp-tree.h (struct language_function): x_named_labels is now - a struct named_label_list*. - * decl.c (struct named_label_use_list): Renamed from... - (struct named_label_list): ...this. New struct. - (push_binding_level): Don't set eh_region. - (note_level_for_eh): New fn. - (pop_label): Take label and old value directly. - (pop_labels): Adjust for new named_labels format. - (lookup_label): Likewise. - (poplevel): Note characteristics of a binding level containing a - named label. Mess with named label lists earlier. - (mark_named_label_lists): New fn. - (mark_lang_function): Call it. - (use_label): New fn, split out from... - (make_label_decl): ...here. Don't call it. - (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, - check_previous_gotos): New fns, split out from... - (define_label): ...here. - (check_switch_goto): New fn. - (define_case_label): Call it. - (check_goto): New fn. - * semantics.c (finish_goto_stmt): Call it and use_label. - (begin_compound_stmt): If we're a try block, call note_level_for_eh. - (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings. - -2000-05-26 Mark Mitchell - - * class.c (build_vtable_entry_ref): Correct usage of - get_vtbl_decl_for_binfo. - - * decl2.c (grokclassfn): Set DECL_LANGUAGE here. - * method.c (implicitly_declare_fn): Not here. - -2000-05-26 Nathan Sidwell - - * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ... - (CPTI_PTMD_DESC_TYPE): ... here. - (ptmd_desc_type_node): Rename to ... - (ptm_desc_type_node): ... here. - * decl.c: Likewise. - * rtti.c (ptmd_initializer): Rename to ... - (ptm_initializer): ... here. - (sythesize_tinfo_var): Adjust. Deal with pointer to member - function. - (create_tinfo_types): Adjust. - -2000-05-25 Mark Mitchell - - Finish implementation of VTTs. - * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and - CPTI_VTT_PARM_IDENTIFIER. - (vtt_parm_identifier): New macro. - (vtt_parm_type): Likewise. - (BINFO_SUBVTT_INDEX): Likewise. - (BINFO_VPTR_INDEX): Likewise. - (struct lang_decl): Add vtt_parm. - (DECL_VTT_PARM): New macro. - (DECL_USE_VTT_PARM): Likewise. - (DECL_NEEDS_VTT_PARM_P): Likewise. - (get_vtt_name): Declare. - (build_artificial_parm): Likewise. - (fixup_all_virtual_upcast_offsets): Likewise. - (expand_indirect_vtbls_init): Remove. - * call.c (build_new_method_call): Pass the vtt to subobject - constructors and destructors. - * class.c (get_vtt_name): Give it external linkage. - (build_clone): Handle the magic VTT parameters for clones. - (clone_function_decl): Fix typo in comment. - (build_vtt): Keep track of the indices in the VTTs where various - entities are stored. - (build_vtt_inits): Likewise. - (dfs_build_vtt_inits): Likewise. - (build_ctor_vtbl_group): Tweak type of construction vtables. - (dfs_accumulate_vtbl_inits): Build vtables for all bases, even - primary bases, when building construction vtables. - * decl.c (duplicate_decls): Handle DECL_VTT_PARM. - (initialize_predefined_identifiers): Add vtt_parm_identifier. - (init_decl_processing): Initialize vtt_parm_type. - (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P. - (lang_mark_tree): Make vtt_parm. - * decl2.c (build_artificial_parm): New function. - (maybe_retrofit_in_chrg): Use it. Add VTT parameters. - (grokclassfn): Use build_artificial_parm. - * init.c (initialize_vtbl_ptrs): Call - fixup_all_virtual_upcast_offsets directly. - (perform_member_init): Use the complete subobject destructor for - member cleanups. - (build_vtbl_address): New function. - (expand_virtual_init): Handle VTTs. - * optimize (maybe_clone_body): Likewise. - * search.c (fixup_all_virtual_upcast_offsets): Give it external - linkage. - (expand_indirect_vtbls_init): Remove. - * semantics.c (setup_vtbl_ptr): Fix typos in comment. - * tree.c (make_binfo): Make them bigger. - -2000-05-25 Nathan Sidwell - - * inc/cxxabi.h (__pbase_type_info): Define, based on - __pointer_type_info. - (__pointer_type_info): Derive from __pbase_type_info. Adjust. - (__pointer_to_member_type_info): Likewise. - * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement. - (__pointer_to_member_type_info::__is_pointer_p): Remove. - (__pointer_type_info::__do_catch): Rename to ... - (__pbase_type_info::__do_catch): ... here. Adjust. - (__pbase_type_info::__pointer_catch): Implement. - (__pointer_type_info::__pointer_catch): Adjust. - (__pointer_to_member_type_info::__pointer_catch): Adjust. - -2000-05-25 Nathan Sidwell - - * tinfo.h (__user_type_info::contained_virtual_p): New - predicate. - * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond - shaped hierarchy. - (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to - diamond shaped hierarchy. Add early out for mixed diamond and - duplicate shaped hierarchy. - -2000-05-24 Mark Mitchell - - * cp-tree.h (build_delete): Change prototype. - (build_vec_delete): Likewise. - * call.c (build_scoped_method_call): Use special_function_kind - values to indicate the kind of destruction to be done. - (build_method_call): Likewise. - * decl.c (finish_destructor_body): Likewise. - (maybe_build_cleanup_1): Likewise. Rename to ... - (maybe_build_cleanup): ... this. - * decl2.c (delete_sanity): Use special_function_kind - values to indicate the kind of destruction to be done. - (build_cleanup): Likewise. - * init.c (perform_member_init): Likewise. - (build_vec_delete_1): Likewise. - (build_dtor_call): Simplify. - (build_delete): Use special_function_kind - values to indicate the kind of destruction to be done. - (build_vbase_delete): Likewise. - (build_vec_delete): Likewise. - - * init.c (sort_member_init): Fix typo in error message generation - code. - -2000-05-15 Donald Lindsay - - * semantics.c (begin_class_definition): make the packed - attribute be sensitive to the "-fpack-struct" command line flag - -2000-05-24 Nathan Sidwell - - Update new-abi upcast algorithm. - * inc/cxxabi.h (__class_type_info::__do_upcast): Change - prototype and meaning of return value. - (__si_class_type_info::__do_upcast): Likewise. - (__vmi_class_type_info::__do_upcast): Likewise. - * tinfo.cc (__class_type_info::__upcast_result): Replace - whole2dst with part2dst. Adjust ctor. - (__class_type_info::__do_upcast): Adjust call of worker function. - (__class_type_info::__do_upcast): Adjust. - (__si_class_type_info::__do_upcast): Adjust. Use parent's - __do_upcast. - (__vmi_class_type_info::__do_upcast): Likewise. Fix private - virtual base in diamond hierarchy bug. - -2000-05-23 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable - and bitfield to tinfo_fn_p. - (DECL_TINFO_FN_P): Adjust. - (SET_DECL_TINFO_FN_P): Likewise. - (DECL_MUTABLE_P): Likewise. - (DECL_C_BIT_FIELD): Likewise. - (SET_DECL_C_BIT_FIELD): Likewise. - (CLEAR_DECL_C_BIT_FIELD): Likewise. - (DECL_UNINLINABLE): Likewise. - * class.c (alter_access): Call retrofit_lang_decl if ncessary. - (handle_using_decl): Remove assertion. - (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl, - to build FIELD_DECLs. - (build_base_field): Likewise. - (layout_class_type): Likewise. - * decl.c (init_decl_processing): Likewise. - (build_ptrmemfunc_type): Likewise. - (grokdeclarator): Likewise. - * decl2.c (grok_x_components): Likewise. - * except.c (call_eh_info): Likewise. - * init.c (init_init_processing): Likewise. - * rtti.c (expand_class_desc): Likewise. - (create_pseudo_type_info): Likewise. - (get_vmi_pseudo_type_info): Likewise. - (create_tinfo_types): Likewise. - * ptree.c (print_lang_decl): Adjust. - * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC - before checking DECL_MUTABLE_P. - - * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge - parameters for template functions. - * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for - destructors as well as constructors. - -2000-05-22 Mark Mitchell - - * class.c (build_ctor_vtbl_group): Set inits. - * optimize.c (maybe_clone_body): Set DECL_INLINE and - DECL_THIS_INLINE appropriately for clones. - - * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. - (DECL_CONV_FN_P): Simplify. - (DECL_OPERATOR): Remove. - (language_to_string): Declare. - * decl.c (duplicate_decls): Fix typo in comment. - (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. - (grok_op_properties): Use DECL_CONV_FN_P instead of - IDENTIFIER_TYPENAME_P. - * dump.c (dequeue_and_dump): Dump the language linkage of - declarations. - * error.c (language_to_string): Give it external linkage. - * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. - (implicitly_declare_fn): Set DECL_LANGUAGE. - * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not - IDENTIFIER_TYPENAME_P. - (tsubst_decl): Likewise. - (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. - * semantics.c (finish_member_declaration): Don't mark members of - classes declared in an extern "C" region as extern "C". - -2000-05-22 Martin v. Löwis - - * decl2.c (qualified_lookup_using_namespace): Look through - namespace aliases. - - * decl.c (push_using_decl): Return the old decl on namespace level. - -2000-05-21 Mark Mitchell - - * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. - (VTT_NAME_PREFIX): New macro. - (CTOR_VTBL_NAME_PREFIX): Likewise. - (get_ctor_vtbl_name): New function. - * class.c (get_vtable_name): Simplify. - (get_vtt_name): New function. - (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. - (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list - when a virtual base becomes primary. - (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build - VTTs. - (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in - additional parameters. - (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. - (initialize_array): New function. - (build_vtt): Likewise. - (build_vtt_inits): Likewise. - (dfs_build_vtt_inits): Likewise. - (dfs_fixup_binfo_vtbls): Likewise. - (build_ctor_vtbl_group): Likewise. - (initialize_vtable): Use initialize_array. - (accumulate_vtbl_inits): Reimplement to handle construction - vtables. - (dfs_accumulate_vtbl_inits): Likewise. - (bulid_vtbl_initializer): Adjust parameter name. - * method.c (build_typename_overload): Remove #if 0'd code. - (get_ctor_vtbl_name): New function. - * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. - (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. - - * cp-tree.h (struct lang_type): Remove search_slot. - (CLASSTYPE_SEARCH_SLOT): Remove. - (emit_base_init): Change prototype. - (initialize_vtbl_ptrs): Likewise. - (expand_indirect_vtbls_init): Likewise. - (clear_search_slots): Remove. - * decl.c (lang_mark_tree): Don't mark search_slot. - * init.c (initialize_vtbl_ptrs): Simplify. - (emit_base_init): Likewise. - * search.c (struct vbase_info): Document decl_ptr. - (convert_pointer_to_single_level): Remove. - (dfs_find_vbases): Remove. - (dfs_init_base_pointers): Simplify. - (dfs_clear_vbase_slots): Remove. - (dfs_vtable_path_unmark): New function. - (init_vbase_pointers): Simplify. - (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT. - (expand_indirect_vtbls_init): Simplify. Don't call - mark_all_temps_used. - * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and - initialize_vtbl_ptrs. - -2000-05-20 Zack Weinberg - - * except.c: Add static prototypes. - -2000-05-20 H.J. Lu - - * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext). - -2000-05-19 Mark Mitchell - - Don't create a separate copy of virtual bases for the - CLASSTYPE_VBASECLASSES list. - * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. - (BINFO_FOR_VBASE): Remove. - (CANONICAL_BINFO): Adjust. - (binfo_for_vbase): New function. - * class.c (build_vbase_pointer_fields): Use binfo_for_vbase - instead of BINFO_FOR_VBASE. - (build_vbase_pointer): Likewise. - (build_secondary_vtable): Likewise. - (dfs_mark_primary_bases): Likewise. - (mark_primary_bases): Likewise. - (layout_nonempty_base_or_field): Likewise. - (dfs_set_offset_for_shared_vbases): Likewise. - (dfs_set_offset_for_unshared_vbases): Likewise. - (layout_virtual_bases): Likewise. Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (dump_class_hierarchy_r): Use binfo_for_vbase - instead of BINFO_FOR_VBASE. - (dump_class_hierarchy): Likewise. - (finish_vtbls): Likewise. - (build_vtbl_initializer): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. - * decl.c (finish_destructor_body): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - * init.c (sort_base_init): Use binfo_for_vbase. - (construct_virtual_bases): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (expand_member_init): Use binfo_for_vbase. - (build_vbase_delete): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - * method.c (do_build_copy_constructor): Likewise. - * rtti.c (get_base_offset): Use binfo_for_vbase. - (expand_class_desc): Remove #if 0'd code. - * search.c (struct vbase_info): Remove vbase_types. - (get_base_distance): Use binfo_for_vbase. - (lookup_field_queue_p): Use CANONICAL_BINFO. - (get_shared_vbase_if_not_primary): Use binfo_for_vbase. - (get_pure_virtuals): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (dfs_find_vbases): Use binfo_for_vbase. - (dfs_init_vbase_pointers): Likewise. - (init_vbase_pointers): Don't initialize vi.vbase_types. - (virtual_context): Use binfo_for_vbase. - (fixup_all_virtual_upcast_offsets): Adjust for changes to the - CLASSTYPE_VBASECLASSES list. - (expand_indirect_vtbls_init): Simplify. - (dfs_get_vbase_types): Don't replicate virtual bases. - (find_vbase_instance): Use binfo_for_vbase. - (binfo_for_vbase): New function. - * typeck.c (get_delta_difference): Use binfo_for_vbase. - -2000-05-17 Mark Mitchell - - * decl2.c (finish_anon_union): Generalize error messages to handle - anonymous structures. - * init.c (perform_member_init): Remove `name' parameter. - (build_field_list): New function. - (sort_member_init): Handle anonymous union initialization order - correctly. Check for multiple initializations of the same union. - (emit_base_init): Don't look up fields by name here. - (expand_member_init): Record the result of name lookup for future - reference. - * typeck.c (build_component_ref): Fix formatting. - -2000-05-17 Andrew Cagney - - * decl.c (pop_label): Replace warn_unused with warn_unused_label. - * typeck.c (build_x_compound_expr): Replace warn_unused with - warn_unused_value. - - * decl2.c (lang_decode_option): Update -Wall unused flags by - calling set_Wunused. - -2000-05-16 Mark Mitchell - - * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation. - * init.c (dfs_vtable_path_unmark): Remove. - * search.c (marked_new_vtable_p): Likewise. - (unmarked_new_vtable_p): Likewise. - (dfs_search_slot_nonempty_p): Likewise. - (dfs_mark): Likewise. - (dfs_vtable_path_unmark): Likewise. - (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED. - (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED. - (dfs_init_vbase_pointers): Remove special-case new ABI code. - (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED. - (init_vbase_pointers): Simplify. - (expand_indirect_vtbls_init): Likewise. - - * class.c (copy_virtuals): New function. - (build_primary_table): Use it. - (build_secondary_vtable): Likewise. - (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to - indicate that no vcall offset is required. - (add_virtual_function): Likewise. - (modify_all_vtables): Likewise. - (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. - (dfs_accumulate_vtbl_inits): Likewise. - (build_vtbl_initializer): Make changes to handle construction - vtables. - (dfs_build_vcall_offset_vtbl_entries): Likewise. - (build_rtti_vtbl_entries): Likewise. - (build_vtable_entries): Handle a NULL vcall_index. - -2000-05-15 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Fix thinko. - -2000-05-14 Jason Merrill - - * except.c (check_handlers): New fn. - * cp-tree.h: Declare it. - * semantics.c (finish_handler_sequence): Call it. - (finish_function_handler_sequence): Likewise. - (finish_handler_parms): Set TREE_TYPE on the handler. - * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro. - * search.c (get_base_distance_recursive): If protect>1, ignore - special access. - (get_base_distance): Don't reduce watch_access. - -2000-05-13 Gabriel Dos Reis - - * lex.c: #include diagnostic.h. - (lang_init_options): Set default prefixing rules. - - * lang-options.h: Add -fdiagnostics-show-location=. - - * decl2.c: #include diagnostic.h. - (lang_decode_option): Handle -fdiagnostics-show-location=. - -2000-05-12 Nathan Sidwell - - * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes. - * vec.cc: Revert my 2000-05-07 change. - -2000-05-11 Jason Merrill - - * class.c (check_field_decls): Complain about non-static data - members with same name as class in class with constructor. - -2000-05-10 Jason Merrill - - * decl.c (grokdeclarator): Allow non-static data members with - same name as class. - -2000-05-09 Zack Weinberg - - * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, - and pending_inline.filename. Update prototypes. - * decl.c (define_label): Constify filename parameter. - * decl2.c (warn_if_unknown_interface): Constify local char *. - * input.c Constify input_source.filename. Don't declare - input_filename or lineno. Constify filename parameter to feed_input. - * lex.c (init_parse): Constify parameter and return value. - (cp_pragma_interface, cp_pragma_implementation): Constify - filename argument. - (reinit_parse_for_method, reinit_parse_for_block, - reinit_parse_for_expr, feed_defarg, handle_cp_pragma): - Constify local char *. - * pt.c: Don't declare lineno or input_filename. - (print_template_context, tsubst_friend_function, tsubst_decl, - tsubst, instantiate_decl): Constify local char *. - * semantics.c (expand_body): Constify local char *. - * tree.c (build_srcloc): Constify filename parameter. - * typeck.c (c_expand_asm_operands): Constify filename - parameter. - -2000-05-08 Nathan Sidwell - - * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix - offsetof expansion. - -2000-05-08 Branko Cibej - - * inc/cxxabi.h: Fix typos in comment. - (__base_class_info::__offset): Use a static_cast. - -2000-05-07 Nathan Sidwell - - * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place - of std::size_t and std::ptrdiff_t respectively. - * tinfo.cc: Likewise. - * vec.cc: Likewise. - -2000-05-06 Richard Henderson - - * typeck.c (build_c_cast): Don't warn integer->pointer size - mismatch for constants. - -2000-05-06 Nathan Sidwell - - * rtti.c (ptmd_initializer): Set non-public, if class is - incomplete. - - * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++". - (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, - __cxa_vec_delete): Likewise. - * tinfo.cc (__dynamic_cast): Likewise. - * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, - __cxa_vec_delete): Likewise. - -2000-05-04 Mark Mitchell - - * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove. - (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise. - (lang_decl_flags): Add vcall_offset. - (THUNK_VCALL_OFFSET): Use it. - * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk. - * method.c (make_thunk): Create the lang_decl here, not in - emit_thunk. - (emit_thunk): Make generic thunks into ordinary functions once - they have been fed to expand_body. - * semantics.c (expand_body): Set current_function_is_thunk here. - -2000-05-04 Kaveh R. Ghazi - - * class.c (update_vtable_entry_for_fn): Prototype. - - * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl' - and `tmpl'. - - * search.c (dfs_build_inheritance_graph_order): Prototype. - -2000-05-04 Mark Mitchell - - * cp-tree.h (special_function_kind): Add various kinds of - destructors. - (special_function_p): New function. - * class.c (overrides): Don't let one kind of destructor override - another. - * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding - whether or not to instantiate a template. - * tree.c (special_function_p): Define. - -2000-05-03 Mark Mitchell - - * cp-tree.def (THUNK_DECL): Remove. - * cp-tree.h (DECL_THUNK_P): New macro. - (DECL_NON_THUNK_FUNCTION_P): Likewise. - (DECL_EXTERN_C_FUNCTION_P): Likewise. - (SET_DECL_THUNK_P): Likewise. - (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P. - (FNADDR_FROM_VTABLE_ENTRY): Likewise. - (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P. - * decl.c (decls_match): Use DECL_EXTERN_C_P. - (duplicate_decls): Likewise. - (pushdecl): Likewise. Adjust thunk handling. - (grokfndecl): Use DECL_EXTERN_C_P. - * decl2.c (mark_vtable_entries): Use DECL_THUNK_P. - * dump.c (dequeue_and_dump): Remove THUNK_DECL handling. - * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P. - * expr.c (cplus_expand_expr): Remove THUNK_DECL handling. - * method.c (make_thunk): Use SET_DECL_THUNK_P. Set - DECL_NO_STATIC_CHAIN. - (emit_thunk): Don't play games with TREE_CODE on thunks. Don't - set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk. - * search.c (covariant_return_p): Remove THUNK_DECL handling. - * ir.texi: Update. - -2000-05-01 Jason Merrill - - * tree.c (walk_tree): Set lineno. - -2000-05-01 Mark Mitchell - - * exception.cc: Update license notice. - * new.cc: Likewise. - * new1.cc: Likewise. - * new2.cc: Likewise. - * tinfo.cc: Likewise. - * tinfo2.cc: Likewise. - * vec.cc: Likewise. - * inc/cxxabi.h: Likewise. - * inc/exception: Likewise. - * inc/new: Likewise. - * inc/new.h: Likewise. - * inc/typeinfo: Likewise. - -2000-05-01 Jason Merrill - - * tree.c (build_target_expr_with_type): If we already have a - TARGET_EXPR, just return it. - - * optimize.c (initialize_inlined_parameters): Don't generate an - EXPR_STMT if we can just use DECL_INITIAL. - * decl.c (emit_local_var): Only make the initialization a - full-expression if stmts_are_full_exprs_p. - -2000-05-01 Mark Mitchell - - * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New - macro. - * call.c (standard_conversion): Use it. - (direct_reference_binding): Likewise. - (build_over_call): Likewise. - (is_properly_derived_from): Likewise. - (compare_ics): Likewise. - * class.c (resolves_to_fixed_type_p): Likewise. - * optimize.c (declare_return_variable): Likewise. - * pt.c (is_specialization_of): Likewise. - (unify): Likewise. - * typeck.c (comp_target_parms): Likeiwse. - (build_static_cast): Likewise. - (build_reinterpret_cast): Likewise. - (build_const_cast): Likewise. - (comp_ptr_ttypes_real): Likewise. - (comp_ptr_ttypes_const): Likewise. - * typeck2.c (process_init_constructor): Likewise. - -2000-04-30 Scott Snyder - - * decl.c (finish_destructor_body): Use the base destructor when - destroying virtual bases. - -2000-04-30 Mark Mitchell - - * expr.c (cplus_expand_expr): Preserve temporaries when expanding - STMT_EXPRs. - * optimize.c (struct inline_data): Add target_exprs field. - (declare_return_variable): When a function returns an aggregate, - use the variable declared in the TARGET_EXPR as the remapped - DECL_RESULT. - (expand_call_inline): Update the pending target_exprs stack. - (optimize_function): Initialize the stack. - - * decl2.c (finish_file): Fix typo in comment. - - * method.c (emit_thunk): Don't try to return a `void' value. - - * optimize.c (initialize_inlined_parameters): If the parameter is - addressable, we need to make a new VAR_DECL, even if the - initializer is constant. - -2000-04-28 Cosmin Truta - - * decl.c (grok_op_properties): Add an extra check of argtypes. - -2000-04-27 Mark Mitchell - - * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying - variables. - (initialize_inlined_parameters): Try to avoid creating new - VAR_DECLs. - -2000-04-27 Alex Samuel - - * lex.c (my_get_run_time): Remove. - (init_filename_times): Use get_run_time instead of my_get_run_time. - (check_newline): Likewise. - (dump_time_statistics): Likewise. - * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead - of computing elapsed time explicitly. - -2000-04-26 Mark Mitchell - - * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. - * init.c (decl_constant_value): Check TREE_READONLY_DECL_P. - * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P - before calling decl_constant_value. - * class.c (check_bitfield_decl): Likewise. - * cvt.c (ocp_convert): Likewise. - (convert): Likewise. - * decl.c (compute_array_index_type): Likewise. - (build_enumerator): Likewise. - * decl2.c (check_cp_case_value): Likewise. - * pt.c (convert_nontype_argument): Likewise. - (tsubst): Likewise. - * typeck.c (decay_conversion): Likewise. - (build_compound_expr): Likewise. - (build_reinterpret_cast): Likewise. - (build_c_cast): Likewise. - (convert_for_assignment): Likewise. - -2000-04-26 Jason Merrill - - * decl.c (finish_function): Don't play games with DECL_INLINE. - -2000-04-25 Gabriel Dos Reis - - * ir.texi: Correct typo. - -2000-04-25 Martin v. Löwis - - * decl.c (grokdeclarator): Reject VLAs as members. - -2000-04-24 Gabriel Dos Reis - - * call.c (standard_conversion): Accept conversion between - COMPLEX_TYPEs. - - * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. - -2000-04-24 Zack Weinberg - - * decl2.c (finish_file): Remove double setup for accounting - compile time. - -2000-04-24 Robert Lipe - - * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. - -2000-04-23 Benjamin Kosnik - - * new.cc (set_new_handler): Needs to be in std::. - -2000-04-23 Mark Mitchell - - * cp-tree.h (lang_decl): Remove pretty_function_p. - (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the - language-specific node. - * decl.c (cp_make_fname_decl): Use build_decl, not - build_lang_decl, to build the variables. - (grokvardecl): Don't call build_lang_decl for local variables in - templates. - (grokdeclarator): Don't call build_lang_decl for local type - declarations in templates. - * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated - zero'd memory, rather than calling memset. - * pt.c: Include hashtab.h. - (local_specializations): New variable. - (retrieve_local_specialization): Use it. - (register_local_specialization): Likewise. - (tsubst_decl): Don't assume local variables have - DECL_LANG_SPECIFIC. - (instantiate_decl): Set up local_specializations. - * Makefile.in (HTAB_H): New variable. - -2000-04-23 Richard Henderson - - * typeck.c (c_expand_asm_operands): Restore the original - contents of the output list. - -2000-04-22 Gabriel Dos Reis - - * ir.texi: Document complex number representation. - -2000-04-20 Nathan Sidwell - - * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi. - (target_incomplete_p): New function. - (tinfo_base_init): Create comdat NTBS name variable. - (ptr_initializer): Add non_public parameter. Calculate it. - (ptmd_initializer): Likewise. - (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo. - (create_real_tinfo_var): Add non_public parameter. Use it. - Push proxy into global namespace. - * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask): - New enumeration. - * inc/typeinfo (type_info::before, type_info::operator==): - Compare __name addresses. - - * tinfo2.cc: Remove new-abi builtins comment. - -2000-04-20 Jason Merrill - - * typeck.c (build_x_function_call): Resolve an OFFSET_REF. - - * call.c (joust): Exit early if we get the same function, too. - - * decl2.c (key_method): Return NULL_TREE for template classes. - (import_export_class): Don't need to check for template classes. - -2000-04-18 Zack Weinberg - - * lex.c: Remove references to cccp.c. - -2000-04-18 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Remove const_memfunc and - volatile_memfunc. Add destructor_attr. Adjust dummy. - (DECL_DESTRUCTOR_P): Use destructor_attr. - (DECL_CONST_MEMFUNC_P): Reimplement. - (DECL_VOLATILE_MEMFUNC_P): Remove. - * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS. - (overrides): Use DECL_DESTRUCTOR_P. - (check_for_override): Likewise. - * decl.c (start_function): Likewise. - * decl2.c (grokfclassfn): Likewise. - (check_classfn): Likewise. - (grok_function_init): Likewise. - -2000-04-17 Mark Mitchell - - * decl2.c (grokfield): Issue error on illegal data member - declaration. - -2000-04-17 Mark P Mitchell - - * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL. - -2000-04-16 Mark Mitchell - - * class.c (build_vtable_entry): Don't build thunks for type-info - functions. - -2000-04-16 Jason Merrill - - * decl.c (decls_match): Allow a redeclaration of a builtin to - specify args while the builtin did not. - -2000-04-15 Mark Mitchell - - * cp-tree.def (THUNK_DECL): Add to documentation. - * cp-tree.h (flag_huge_objects): Declare. - * class.c (modify_vtable_entry): Tidy. - (update_vtable_entry_for_fn): Split out from dfs_modify_vtables. - Calculate delta appropriately for the new ABI. - (dfs_modify_vtables): Use it. - (modify_all_vtables): Fix thinko in code to add overriding copies - of functions to primary vtables. - (build_clone): Fix typo in comment. - (clone_function_decl): Correct order of destructors in vtable. - (build_vbase_offset_vtbl_entries): Adjust comment. - (dfs_vcall_offset_queue_p): Remove. - (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX. - (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases. - (build_vtable_entry): Correct check for pure virtual functions. - Don't declare flag_huge_objects. - * decl.c (flag_huge_objects): Remove declaration. - * method.c (make_thunk): Tweak mangling for vcall offset thunks. - Use int_size_in_bytes. - (emit_thunk): Handle vcall offset thunks. - -2000-04-15 Richard Kenner - - * decl2.c (parse_time, varconst_time): Delete declarations. - (finish_file): Delete LINENO declaration. - START_TIME and THIS_TIME now long. - -2000-04-13 Nathan Sidwell - - * class.c (build_base_field): Reformat comment. - - * inc/cxxabi.h (stddef.h): Comment inclusion. - (__base_class_info::__offset): Comment shift. - -2000-04-12 Mark Mitchell - - * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. - (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. - (cp_push_exception_identifier): New macro. - (DECL_COMPLETE_DESTRUCTOR_P): New macro. - (DECL_BASE_DESTRUCTOR_P): Likewise. - (DECL_DELETING_DESTRUCTOR_P): Likewise. - (get_vtbl_decl_for_binfo): Fix formatting. - (in_charge_arg_for_name): New macro. - (maybe_build_cleanup_and_delete): Remove declaration. - * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. - (in_charge_arg_for_name): New function. - (build_new_method_call): Use it. Handle cloned destructors. - (build_clone): Don't make the base constructor virtual. - Automatically defer generated functions. - (clone_function_decl): Handle destructors, too. - (clone_constructors_and_destructors): Likewise. - (create_vtable_ptr): Don't create a vtable entry for a cloned - function. - * decl.c (predefined_identifier): Add ctor_or_dtor_p. - (initialize_predefined_identifiers): Update appropriately. - (finish_destructor_body): Simplify. - (maybe_build_cleanup_and_delete): Remove. - * except.c (expand_throw): Handle new-ABI destructors. - * init.c (expand_cleanup_for_base): Use base_dtor_identifier. - (build_dtor_call): New function. - (build_delete): Use it. Simplify. - * optimize.c (maybe_clone_body): Handle destructors. - * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. - - * exception.cc (cleanup_fn): New typedef. - (CALL_CLEANUP): New macro. - (cp_eh_info): Use them. - (__cp_push_exception): Likewise. - (__cp_pop_exception): Likewise. - -2000-04-11 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER. - (complete_dtor_identifier): New macro. - (CLASSTYPE_FIRST_CONVERSION): Remove. - (CLASSTYPE_CONSTRUCTOR_SLOT): New macro. - (CLASSTYPE_DESTRUCTOR_SLOT): Likewise. - (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise. - (CLASSTYPE_CONSTRUCTORS): Likewise. - (CLASSTYPE_DESTRUCTORS): Likewise. - (lang_decl): Add cloned_function. - (DECL_COMPLETE_CONSTRUCTOR_P): New macro. - (DECL_BASE_CONSTRUCTOR_P): Likewise. - (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. - (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. - (DECL_CLONED_FUNCTION_P): Likewise. - (DECL_CLONED_FUNCTION): Likewise. - (clone_function_decl): Declare. - (maybe_clone_body): Likewise. - * call.c (build_user_type_conversion_1): Call complete object - constructors in the new ABI. - (build_new_method_call): Don't add in-charge parameters under the - new ABI. - * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, - DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and - CLASSTYPE_DESTRUCTOR_SLOT. - (build_clone): New function. - (clone_function_decl): Likewise. - (clone_constructors_and_destructors): Likewise. - (check_bases_and_members): Use it. - * decl.c (iniitialize_predefined_identifiers): Initialize - complete_dtor_identifier. - (finish_function): Don't add extra code to a clone. - (lang_mark_tree): Mark cloned_function. - * decl2.c (mark_used): Don't bother trying to instantiate things - we synthesized. - * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice. - * method.c (set_mangled_name_for_decl): Don't treat clones as - constructors. - (synthesize_method): Sythesize cloned functions, not the clones. - * optimize.c (inline_data): Update comment on ret_label. - (remap_block): Don't assume DECL_INITIAL exists. - (copy_body_r): Allow ret_label to be NULL. - (maybe_clone_body): Define. - * pt.c (tsubst_decl): Handle clones. - (instantiate_clone): New function. - (instantiate_template): Use it. - (set_mangled_name_for_template_decl): Don't treat clones as - constructors. - * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT, - CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT. - * semantics.c (expand_body): Clone function bodies as necessary. - - * optimize.c (remap_decl): Avoid sharing structure for arrays - whose size is only known at run-time. - * tree.c (copy_tree_r): Don't copy PARM_DECLs. - - * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr - to has_in_charge_parm_p. - (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ... - (DECL_HAS_IN_CHARGE_PARM_P): ... this. - (DECL_COPY_CONSTRUCTOR_P): New macro. - * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P. - (build_user_type_conversion_1): Likewise. - (convert_like_real): Likewise. - (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P. - * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P. - (copy_args_p): Likewise. - (grok_ctor_properties): Likewise. - (start_function): Likewise. - * decl2.c (maybe_retrofit_in_charge): Likewise. Set it. - * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P. - * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P. - * method.c (do_build_copy_constructor): Use - DECL_HAS_IN_CHARGE_PARM_P. - (synthesize_method): Likewise. - * pt.c (instantiate_template): Remove goto. - * tree.c (build_cplus_method_type): Remove mention of obstacks in - comment. - - * cp-tre.h (finish_function): Change prototype. - * decl.c (end_cleanup_fn): Adjust caller. - (finish_function): Take only one parameter. - * decl2.c (finish_objects): Adjust caller. - (finish_static_storage_duration_function): Likewise. - * method.c (emit_thunk): Likewise. - * parse.y: Likewise. - * parse.c: Regenerated. - * pt.c (instantiate_decl): Likewise. - * rtti.c (synthesize_tinfo_fn): Likewise. - * semantics.c (expand_body): Likewise. - - * cp-tree.h (copy_decl): New function. - * class.c (finish_struct_1): Use it. - * lex.c (copy_decl): Define it. - * pt.c (tsubst_decl): Likewise. - * tree.c (copy_template_template_parm): Likewise. - - * cp-tree.h (lang_type): Remove has_nonpublic_ctor and - has_nonpublic_assign_ref. - (TYPE_HAS_NONPUBLIC_CTOR): Don't declare. - (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise. - * class.c (finish_struct_methods): Don't set - TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF. - (interface_only): Don't declare. - (interface_unknown): Likewise. - -2000-04-11 Martin v. Löwis - - * tree.h (HAVE_TEMPLATES): Remove definition. - * lang-options.h (-fthis-is-variable): Remove documentation. - -2000-04-10 Jason Merrill - - * class.c (instantiate_type): Handle object-relative template-id. - - * semantics.c (finish_expr_stmt): Call convert_to_void here. - * decl.c (cplus_expand_expr_stmt): Not here. - - * rtti.c (build_dynamic_cast_1): Call non_lvalue. - Initialize exprtype earlier. - - * parse.y (fn.def1): Check for defining types in return types. - - * decl.c (check_tag_decl): Notice extra fundamental types. - Diagnose empty decls in classes, too. - - * decl.c (grokdeclarator): Don't override an anonymous name if no - declarator was given. - - * cvt.c (convert_to_void): Call resolve_offset_ref. - - * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. - - * decl2.c (decl_namespace): Handle getting a type. - - * typeck.c (build_c_cast): Re-enable warning for cast between - pointer and integer of different size. - -2000-04-10 Nathan Sidwell - - * inc/cxxabi.h (__pointer_type_info): Add restrict and - incomplete flags. - (__pointer_type_info::__pointer_catch): New virtual function. - (__pointer_to_member_type_info): Derive from - __pointer_type_info. Adjust. - (__pointer_to_member_type_info::__do_catch): Remove. - (__pointer_to_member_type_info::__is_pointer_p): Declare. - (__pointer_to_member_type_info::__pointer_catch): Declare. - * rtti.c (qualifier_flags): Add restrict flag. - (ptmd_initializer): Reorder members. - (create_tinfo_types): Expand comments. Reorder - ptmd_desc_type_node members. - * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): - Implement. - (__pointer_type_info::__do_catch): Move specific code into - __pointer_catch. Call it. - (__pointer_type_info::__pointer_catch): Non-pointer-to-member - specific catch checking. Fix void conversion check. - (__pointer_to_member_type_info::__do_catch): Remove. - (__pointer_to_member_type_info::__pointer_catch): Implement. - -2000-04-10 Martin v. Löwis - - * lex.c (init_parse): Remove traces of classof and headof. - * decl2.c (flag_operator_names): Default to 1. - (lang_decode_option): Do not set it for -ansi. - -2000-04-09 Mark Mitchell - - * cp-tree.h (struct lang_decl): Remove main_decl_variant. - (DECL_MAIN_VARIANT): Remove. - * decl.c (duplicate_decls): Don't set it. - (start_function): Likewise. - (lang_mark_tree): Don't mark it. - * decl2.c (defer_fn): Don't use it. - * lex.c (retrofit_lang_decl): Don't set it. - * pt.c (tsubst_decl): Likewise. - * ptree.c (print_lang_decl): Don't print it. - * typeck.c (mark_addressable): Don't use it. - -2000-04-09 Nathan Sidwell - - * vec.cc: Include and . - (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup. - (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or - terminate. - (__cxa_vec_delete): Catch dtor exceptions. - -2000-04-09 Nathan Sidwell - - Prepend __ to implementation defined names. - * inc/typeinfo (type_info): Rename _name to __name. - (type_info::type_info): Rename parameter. - (type_info::operator==, type_info::operator!=, - type_info::before): Likewise. - (type_info::is_pointer_p, type_info::is_function_p, - type_info::do_catch, type_info::do_upcast): Prepend __. Rename - parameters. - * inc/cxxabi.h - (__fundamental_type_info::__fundamental_type_info) Rename parameters. - (__pointer_type_info::__pointer_type_info): Likewise. - (__pointer_type_info::is_pointer_p, - __pointer_type_info::do_catch): Prepend __. Rename parameters. - (__array_type_info::__array_type_info): Rename parameters. - (__function_type_info::__function_type_info): Likewise. - (__function_type_info::is_function_p): Prepend __. - (__enum_type_info::__enum_type_info): Rename parameters. - (__pointer_to_member_type_info::__pointer_to_member_type_info): - Likewise. - (__pointer_to_member_type_info::do_catch): Prepend __. Rename - parameters. - (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. - (__class_type_info::__class_type_info): Rename parameters. - (__class_type_info::sub_kind): Prepend __. Adjust member names. - (__class_type_info::upcast_result, - __class_type_info::dyncast_result): Prepend __. Move definition - into tinfo.cc. - (__class_type_info::do_upcast, __class_type_info::do_catch, - __class_type_info::find_public_src, - __class_type_info::do_dyncast, - __class_type_info::do_find_public_src): Prepend __. Rename - parameters. - (__si_class_type_info::__si_class_type_info): Rename parameters. - (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, - __si_class_type_info::do_find_public_src): Prepent __. Rename - parameters. - (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. - (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, - __vmi_class_type_info::do_find_public_src): Prepent __. Rename - parameters. - (__dynamic_cast): Rename parameters. - * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, - type_info::do_catch, type_info::do_upcast): Prepend __. - (contained_p, public_p, virtual_p, contained_public_p, - contained_nonpublic_p, contained_nonvirtual_p): Adjust. - (__class_type_info::do_catch, - __class_type_info::do_upcast): Prepend __. Adjust. - (__class_type_info::__upcast_result, - __class_type_info::__dyncast_result): Move from inc/cxxabi.h. - Adjust. - (__class_type_info::find_public_src): Prepend __. Adjust. - (__class_type_info::do_find_public_src, - __si_class_type_info::do_find_public_src, - __vmi_class_type_info::do_find_public_src): Likewise. - (__class_type_info::do_dyncast, - __si_class_type_info::do_dyncast, - __vmi_class_type_info::do_dyncast): Likewise. - (__class_type_info::do_upcast, - __si_class_type_info::do_upcast, - __vmi_class_type_info::do_upcast): Likewise. - (__dynamic_cast): Adjust. - * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. - (__function_type_info::is_function_p): Likewise. - (__pointer_type_info::do_catch): Likewise. Adjust. - (__pointer_to_member_type_info::do_catch): Likewise. Adjust. - (__throw_type_match_rtti_2): Adjust. - (__is_pointer): Adjust. - -2000-04-08 Mark Mitchell - - * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER. - (complete_ctor_identifier): New macro. - (special_function_kind): Add sfk_copy_constructor and - sfk_assignment_operator. - (LOOKUP_HAS_IN_CHARGE): Remove. - (cons_up_default_function): Rename to ... - (implicitly_declare_fn): ... this. - * call.c (build_new_method_call): Add in-charge parameters for - constructors here. - * class.c (add_implicitly_declared_members): Change parameter name - from cant_have_assignment to cant_have_const_assignment. - Replace calls to cons_up_default_function to implicitly_declare_fn. - * cvt.c (ocp_convert): Use complete_ctor_identifier. - * decl.c (initialize_predefined_identifiers): Initialize it. - (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of - complex expression. - * init.c (expand_default_init): Don't calculate the in-charge - parameter here. - (build_new_1): Likewise. - * lex.c (cons_up_default_function): Move to method.c. - * method.c (synthesize_method): Use DECL_DESTRUCTOR_P. - (implicitly_declare_fn): New function. - * typeck.c (build_static_cast): Use complete_ctor_identifier. - (build_modify_expr): Likewise. - * typeck2.c (build_functional_cast): Likewise. - - Under the new ABI, constructors don't return `this'. - * cp-tree.h (warn_reorder): Declare. - (special_function_kind): New enum. - (global_base_init_list): Remove declaration. - (emit_base_init): Don't return a value. - (check_base_init): Don't declare. - (is_aggr_typedef): Likewise. - * decl.c (check_special_function_return_type): New function. - (return_types): Remove. - (grokdeclarator): Use check_special_function_return_type. - (start_function): Don't initialize ctor_label under the new ABI. - (finish_construtor_body): Don't create a corresponding LABEL_STMT. - * init.c (begin_init_stmts): Move to top of file. - (finish_init_stmts): Likewise. - (warn_reorder): Don't declare. - (emit_base_init): Don't create a STMT_EXPR here. Don't return a - value. - (check_base_init): Remove. - (is_aggr_typedef): Likewise. - (build_new_1): Don't use the return value of a constructor. - * semantics.c (setup_vtbl_ptr): Don't use the return value - of emit_base_init. - * typeck.c (check_return_expr): Don't magically convert return - statements into `return this' in constructors under the new ABI. - - * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER, - CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER. - (base_ctor_identifier): New macro. - (base_dtor_identifier): Likewise. - (deleting_dtor_identifier): Likewise. - * decl.c: Don't include obstack.h. - (obstack_chunk_alloc): Don't define. - (obstack_chunk_free): Likewise. - (struct predefined_identifier): New type. - (initialize_predefined_identifiers): New function. - (init_decl_processing): Use it. - (debug_temp_inits): Remove. - (start_method): Don't call preserve_data. - (hack_incomplete_structures): Update comment. - * init.c (init_init_processing): Don't initialize - nelts_identifier. - (build_offset_rf): Remove dead code. - (build_delete): Use CLASSTYPE_N_BASECLASSES. - * search.c (init_search_processing): Don't initialize - vptr_identifier. - -2000-04-08 Kaveh R. Ghazi - - * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide - some sign_compare warnings. - -2000-04-07 Nathan Sidwell - - Rename abi::__vmi_class_type_info members. - * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, - base_list, detail_masks members to vmi_flags, vmi_base_count, - vmi_bases and vmi_flags_masks respectively. - (__vmi_class_type_info::vmi_flags_masks): Rename - details_unknown_mask to flags_unknown_mask. - * tinfo.cc (__class_type_info::do_upcast): Adjust. - (__vmi_class_type_info::do_find_public_src): Adjust. - (__vmi_class_type_info::do_dyncast): Adjust. - (__vmi_class_type_info::do_upcast): Adjust. - -2000-04-07 Nathan Sidwell - - * tinfo.cc (convert_to_base): New function. - (get_vbase_offset): Remove. Move into convert_to_base. - (__vmi_class_type_info::do_find_public_src): Adjust. - (__vmi_class_type_info::do_dyncast): Adjust. - (__vmi_class_type_info::do_upcast): Adjust. - -2000-04-06 Jason Merrill - - * tinfo.cc (operator=): Use __builtin_strcmp. - * tinfo2.cc (before): Likewise. - -2000-04-06 Mark Mitchell - - * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred. - (DECL_SAVED_INLINE): Rename to ... - (DECL_DEFERRED_FN): ... this. - (in_function_p): Remove declaration. - (mark_inline_for_output): Rename to ... - (defer_fn): ... this. - * decl.c (finish_function): Adjust call to mark_inline_for_output. - (in_function_p): Remove definition. - * decl2.c (saved_inlines): Rename to ... - (deferred_fns): ... this. - (saved_inlines_used): Rename to ... - (deferred_fns_used): ... this. - (mark_inline_for_output): Rename to ... - (defer_fn): ... this. - (finish_file): Adjust accordingly. - (init_decl2): Likewise. - * lex.c (cons_up_default_function): Likewise. - * pt.c (mark_decl_instantiated): Likewise. - (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any - circumstances. - * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output. - * semantics.c (expand_body): Defer more functions. - -2000-04-06 Nathan Sidwell - - * vec.cc: New file. - * Make-lang.in (CXX_LIB2FUNCS): Add it. - (vec.o): Build it. - * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, - __cxa_vec_delete): Declare. - -2000-04-06 Nathan Sidwell - - * rtti.c (dfs_class_hint_mark): New static function. - (dfs_class_hint_unmark): New static function. - (class_hint_flags): Use them. - -2000-04-05 Benjamin Kosnik - - * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE. - -2000-04-05 Mark Mitchell - - * cp-tree.h (instantiate_decl): Change prototype. - * decl2.c (mark_used): Adjust call. - * optimize.c (inlinable_function_p): Adjust handling of templates. - * pt.c (do_decl_instantiation): Adjust call to instantiate_decl. - (do_type_instantiation): Likewise. - (instantiate_decl): Defer more templates. - (instantiate_pending_templates): Adjust logic to handle inline - friend functions. - - * Makefile.in (GGC_H): New variable. Use it throughout in place - of ggc.h. - - * call.c: Don't include obstack.h. Include ggc.h. - (obstack_chunk_alloc): Don't define. - (obstack_chunk_free): Likewise. - (add_candidate): Allocate the z_candidate with ggc_alloc_obj. - * decl.c (push_switch): Use xmalloc to allocate the cp_switch. - (pop_switch): Free it. - - * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. - - * dump.c (dequeue_and_dump): Don't try to print the bit_position - if we don't have a DECL_FIELD_OFFSET. - -Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka - - * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of - special_function_p. - -2000-04-04 Kaveh R. Ghazi - - * cfns.gperf (hash, libc_name_p): Prototype. - - * rtti.c (build_dynamic_cast_1): Constification. - - * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes. - - * semantics.c (deferred_type_access_control): Prototype. - -2000-04-04 Mark Mitchell - - Correct many new ABI issues regarding vbase and vcall offset - layout. - * cp-tree.h (BINFO_VTABLE): Document. - (struct lang_type): Tweak formatting. - (BINFO_PRIMARY_BINFO): Add to documentation. - (CLASSTYPE_VSIZE): Fix typo in comment. - (CLASSTYPE_VBASECLASSES): Update documentation. - (BINFO_VBASE_MARKED): Remove. - (SET_BINFO_VBASE_MARKED): Likewise. - (CLEAR_BINFO_VBASE_MARKED): Likewise. - (BINFO_FIELDS_MARKED): Remove. - (SET_BINFO_FIELDS_MARKED): Likewise. - (CLEAR_BINFO_FIELDS_MARKED): Likewise. - (enum access_kind): New enumeration. - (num_extra_vtbl_entries): Remove declaration. - (size_extra_vtbl_entries): Likewise. - (get_vtbl_decl_for_binfo): New function. - (dfs_vbase_unmark): Remove declaration. - (mark_primary_bases): Likewise. - * class.c (SAME_FN): Remove. - (struct vcall_offset_data_s): Move definition. - (build_vbase_pointer): Use `build', not `build_binary_op', to - access the vbase pointer under the new ABI. - (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo. - (build_primary_vtable): Likewise. - (dfs_mark_primary_bases): Move here from search.c. - (mark_primary_bases): Likewise. - (determine_primary_bases): Under the new ABI, don't make a base - class a primary base just because we don't yet have any virtual - functions. - (layout_vtable_decl): Use get_vtbl_decl_for_binfo. - (num_vfun_entries): Remove. - (dfs_count_virtuals): Likewise. - (num_extra_vtbl_entries): Likewise. - (size_extra_vtbl_entries): Likewise. - (layout_virtual_bases): Iterate in inheritance graph order under - the new ABI. - (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to - indicate that a vfield is present. - (init_class_processing): Initialize access_public_node, etc., from - ak_public, etc. - (get_vtbl_decl_for_binfo): New function. - (dump_class_hierarchy_r): Likewise. - (dump_class_hierarchy): Use it. - (finish_vtbls): Build the vtbls in inheritance graph order. - (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. - (initialize_vtable): Use get_vtbl_decl_for_binfo. - (accumulate_vtbl_inits): Add comments explaining why a pre-order - walk is required. - (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location - where the vptr points, even for primary vtables. - (build_vtbl_initializer): Adjust handling of vbase and vcall - offsets. - (build_vcall_and_vbase_vtable_entries): New function. - (dfs_build_vbase_offset_vtbl_entries): Remove. - (build_vbase_offset_vtbl_entries): Reimplement. - (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that - were already handled in a primary base class vtable. - (build_vcall_offset_vtbl_entries): Adjust. - (build_rtti_vtbl_entries): Adjust. - * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo. - * init.c (expand_virtual_init): Simplify. - * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo. - * rtti.c (create_pseudo_type_info): Adjust calculation of vptr. - * search.c (BINFO_ACCESS): New macro. - (SET_BINFO_ACCESS): Likewise. - (dfs_access_in_type): Manipulate access_kinds, not access nodes. - (access_in_type): Likewise. - (dfs_accessible_p): Likewise. - (protected_accessible_p): Likewise. - (lookup_fnfields_1): Adjust documentation. - (dfs_mark_primary_bases): Move to class.c - (mark_primary_bases): Likewise. - (dfs_vbase_unmark): Remove. - (virtual_context): Use BINFO_FOR_VBASE. - (dfs_get_vbase_types): Simplify. - (dfs_build_inheritance_graph_order): New function. - (get_vbase_types): Use it. - * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo. - - * tinfo.cc (get_vbase_offset): New function. - (__vmi_class_type_info::do_find_public_src): Use it. - (__vmi_class_type_info::do_dyncast): Likewise. - (__vmi_class_type_info::do_upcast): Likewise. - -2000-04-03 Zack Weinberg - - * lang-specs.h: Pass -fno-show-column to the preprocessor. - -2000-03-30 Nathan Sidwell - - * rtti.c (class_hint_flags): Rename flags. - (class_initializer): Remove flags. - (synthesize_tinfo_var): Combine offset and flags. Add flags - for __vmi_class_type_info. - (create_tinfo_types): Remove flags from __class_type_info and - __si_class_type_info. Merge flags and offset from - base_class_type_info. - * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags. - (__base_class_info::is_virtual_p): Adjust. - (__base_class_info::is_public_p): Adjust. - (__base_class_info::offset): New accessor. - (__class_type_info::details): Remove member. - (__class_type_info::__class_type_info): Lose details. - (__class_type_info::detail_masks): Remove. - (__si_class_type_info::__si_class_type_info): Lose details. - (__vmi_class_type_info::details): New member. - (__vmi_class_type_info::__vmi_class_type_info): Adjust. - (__vmi_class_type_info::detail_masks): New member. - * tinfo.cc (__class_type_info::do_upcast): Initialize result - with unknown_details_mask. - (__vmi_class_type_info::do_find_public_src): Adjust - (__vmi_class_type_info::do_dyncast): Adjust. - (__vmi_class_type_info::do_upcast): Set result details, if - needed. Adjust. - (__dynamic_cast): Temporarily #if out optimization. - -2000-03-29 Nathan Sidwell - - * rtti.c (get_tinfo_decl): Mark used. - (emit_tinfo_decl): Don't optimize polymorphic type_info. Only - mark as dealt with, if we output it. - -2000-03-28 Mark Mitchell - - * class.c: Reorganize to put virtual function table initialization - machinery at the end of the file. - -2000-03-28 Jason Merrill - - * class.c (finish_struct): Use bitsize_zero_node. - * pt.c (instantiate_class_template): Likewise. - -2000-03-28 Mark Mitchell - - Put RTTI entries at negative offsets in new ABI. - * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first - vbase offset at index -3, not -1. - (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not - dfs_vtable_path_unmarked_real_bases_queue_p to walk bases. - (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff. - (build_rtti_vtbl_entries): New function. - (set_rtti_entry): Remove. - (build_primary_vtable): Don't use it. - (build_secondary_vtable): Likewise. - (start_vtable): Remove. - (first_vfun_index): New function. - (set_vindex): Likewise. - (add_virtual_function): Don't call start_vtable. Do call - set_vindex. - (set_primary_base): Rename parameter. - (determine_primary_base): Likewise. - (num_vfun_entries): Don't use skip_rtti_stuff. - (num_extra_vtbl_entries): Include RTTI information. - (build_vtbl_initializer): Use build_rtti_vtbl_entries. - (skip_rtti_stuff): Remove. - (dfs_modify_vtables): Don't use it. - (modify_all_vtables): Don't use start_vtable. Do use set_vindex. - (layout_nonempty_base_or_field): Update size handling. - (create_vtable_ptr): Tweak. - (layout_class_type): Adjust parameter names. - (finish_struct_1): Simplify. - * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation. - (skip_rtti_stuff): Remove. - (first_vfun_index): New function. - (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. - (dfs_vtable_path_marked_real_bases_queue_p): Remove. - (marked_vtable_pathp): Declare. - (unmarked_vtable_pathp): Likewise. - * error.c (dump_expr): Use first_vfun_index to calculate vtable - offsets. - * rtti.c (build_headof): Look for RTTI at negative offsets. - (get_tinfo_decl_dynamic): Likewise. - (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL - here. - (create_pseudo_type_info): Do it here instead. Adjust so that - vptr points at first virtual function. - * search.c (marked_vtable_pathp): Make it global. - (unmarked_vtable_pathp): Likewise. - (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. - (dfs_vtable_path_marked_real_bases_queue_p): Likewise. - (dfs_get_pure_virtuals): Don't use skip_rtti_stuff. - (get_pure_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate - negative offset. - -2000-03-26 Richard Kenner - - * class.c (check_field_decl): Fix typo. - (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. - (check_methods): Likewise. - (check_field_decls): Likewise. - Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. - * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): - Use DECL_RESULT_FLD, not DECL_RESULT. - * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. - * lex.c (identifier_type): Likewise. - * pt.c (determine_specialization, lookup_template_class): Likewise. - (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. - (resolve_overloaded_unification, more_specialized): Likewise. - * semantics.c (finish_member_declaration): Likewise. - * typeck.c (build_x_function_call): Likewise. - -2000-03-26 Mark Mitchell - - * class.c (layout_empty_base): Handle empty bases with non-byte - alignment. - (build_base_field): Likewise. - (layout_virtual_bases): Likewise. - - * class.c (finish_struct_1): Fix typo in this change: - - Sat Mar 25 09:12:10 2000 Richard Kenner - -2000-03-25 Mark Mitchell - - * decl.c (grokdeclarator): Count partial specializations when - keeping track of how many template classes have been seen. - - * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. - -2000-03-25 Richard Kenner - - * class.c (build_vbase_pointer_fields): layout_field now place_field. - (get_vfield_offset): Use byte_position. - (set_rtti_entry): Set OFFSET to ssizetype zero. - (get_binfo_offset_as_int): Deleted. - (dfs_record_base_offsets): Use tree_low_cst. - (dfs_search_base_offsets): Likewise. - (layout_nonempty_base_or_field): Reflect changes in RLI format - and call byte_position. - (layout_empty_base): Convert offset to ssizetype. - (build_base_field): use rli_size_unit_so_far. - (dfs_propagate_binfo_offsets): Do computation in proper type. - (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. - (layout_class_type): Reflect changes in RLI names and fields. - (finish_struct_1): Set DECL_FIELD_OFFSET. - * dump.c (dequeue_and_dump): Call bit_position. - * expr.c (cplus_expand_constant): Use byte_position. - * rtti.c (expand_class_desc): Use bitsize_one_node. - * typeck.c (build_component_addr): Use byte_position and don't - special case for zero offset. - -2000-03-24 Nathan Sidwell - - * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P. - - * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi - tinfo object. - (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting - vtable. - -2000-03-20 Theodore Papadopoulo - - * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and - DECL_P macros. - * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name, - make_typename_type, check_initializer, cp_finish_decl, - xref_tag): Likewise. - * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree, - decl_namespace, arg_assoc_template_arg, arg_assoc, - validate_nonmember_using_decl, do_class_using_decl): Likewise. - * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of, - args_to_string): Likewise. - * friend.c (is_friend): Likewise. - * lex.c (note_got_semicolon, note_list_got_semicolon, - is_global): Likewise. - * method.c (build_overload_nested_name, build_overload_value, - build_qualified_name, build_qualified_name, hack_identifier): Likewise. - * parse.y (typename_sub, typename_sub1): Likewise. - * pt.c (push_inline_template_parms_recursive, check_template_shadow, - process_partial_specialization, convert_template_argument, - template_args_equal, add_pending_template, lookup_template_class, - for_each_template_parm_r, maybe_fold_nontype_arg, - tsubst, instantiate_template, type_unification_real, unify, - instantiate_pending_templates, set_mangled_name_for_template_decl): - Likewise. - * repo.c (repo_get_id, repo_template_used): Likewise. - * search.c (lookup_field_1): Likewise. - * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise. - * xref.c (classname): Likewise. - -2000-03-22 Mark Mitchell - - * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation. - (CANONICAL_BINFO): New macro. - (BINFO_NEW_VTABLE_MARKED): Use it. - (SET_BINFO_NEW_VTABLE_MARKED): Likewise. - (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise. - * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE, - not TREE_TYPE. - (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED. - (build_secondary_vtable): Likewise. - (dfs_finish_vtbls): Likewise. - (dfs_accumulate_vtbl_inits): Likewise. - (accumulate_vtbl_inits): New function. - (finish_vtbls): Make sure that virtual bases come after - non-virtual bases in the vtable group. - (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL. - (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED. - * search.c (struct vbase_info): Move definition. - (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED. - (unmarked_new_vtable_p): Likewise. - (dfs_mark_vtable_path): Remove. - (dfs_mark_new_vtable): Remove. - (dfs_unmark_new_vtable): Likewise. - (dfs_clear_search_slot): Likewise. - (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED. - (dfs_clear_vbase_slots): Likewise. - (init_vbase_pointers): LIkewise. - -2000-03-22 Jason Merrill - - * typeck.c (type_after_usual_arithmetic_conversions): Prefer a - SIZETYPE to a non-SIZETYPE. - -2000-03-21 Mark Mitchell - - * class.c (layout_virtual_bases): Adjust names in conditionally - compiled code. - - * class.c (record_base_offsets): New function. - (layout_conflict_p): Likewise. - (layout_nonempty_base_or_field): Use it. - (layout_empty_base): New function. - (build_base_field): Use it. - (build_base_fields): Update comment. - (layout_virtual_bases): Fold in a little code form - layout_basetypes. Use layout_empty_base. - (layout_basetypes): Remove. - (end_of_class): New function. - (layout_class_type): Use it. Adjust. - - * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment. - (fntype_p): Remove. - * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in - comment. - (dfs_skip_nonprimary_vbases_markedp): Likewise. - * typeck.c (fntype_p): Remove. - - * cp-tree.h (TI_SPEC_INFO): Remove. - (CLASSTYPE_TI_SPEC_INFO): Likewise. - * pt.c (process_partial_specialization): Likewise. - - * class.c (build_base_field): Fix thinko in computation of binfo - offsets. - - * tree.c (mark_local_for_remap_p): Mark variables declared in - TARGET_EXPRs as well. - -2000-03-21 Nathan Sidwell - - * typeck.c (require_complete_type, complete_type, - complete_type_or_else, c_sizeof, c_sizeof_nowarn, - build_array_ref, convert_arguments, pointer_diff, - build_x_unary_op, build_unary_op, build_c_cast, - build_modify_expr): Use COMPLETE_TYPE_P etc. - * call.c (is_complete, convert_like_real, - build_new_method_call): Likewise. - * class.c (build_vbase_pointer_fields, check_bases, - build_base_field, finish_struct_1, pushclass): Likewise. - * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. - * decl.c (maybe_process_template_type_declaration, pushtag, - pushdecl, redeclaration_error_message, start_decl, start_decl_1, - layout_var_decl, check_initializer, cp_finish_decl, - grokdeclarator, require_complete_types_for_parms, - grok_op_properties, xref_tag, xref_basetypes, - check_function_type): Likewise. - * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. - * friend.c (do_friend): Likewise. - * init.c (build_offset_ref): Likewise. - * parse.y (structsp): Likewise. - * pt.c (maybe_process_partial_specialization, - tsubst_friend_function, instantiate_class_template, tsubst, - do_type_instantiation, instantiate_pending_templates): Likewise. - * repo.c (repo_get_id): Likewise. - * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, - synthesize_tinfo_var, emit_support_tinfos): Likewise. - * search.c (lookup_fnfields_1, lookup_conversions): Likewise. - * semantics.c (begin_class_definition): Likewise. - * tree.c (build_cplus_method_type): Likewise. - * typeck2.c (digest_init, build_functional_cast, - add_exception_specifier): Likewise. - * parse.h, parse.c: Regenerated. - -2000-03-21 Nathan Sidwell - - * inc/cxxabi.h: New header file. Define new-abi entry points. - (__pointer_type_info::target): Rename member to ... - (__pointer_type_info::type): ... here. - (__base_class_info::type): Rename member to ... - (__base_class_info::base): ... here. - * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h - * cp-tree.h (CPTI_ABI): New global tree enumeration. - (abi_node): New global tree node. - * decl.c (abi_node): Document. - (init_decl_processing): Initialize abi_node. - * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi. - (get_vmi_pseudo_type_info): Likewise. - (create_tinfo_types): Likewise. - (emit_support_tinfos): Likewise. - * tinfo.h (cxxabi.h): Include for new-abi. - Move rtti class definitions to new header file. - * tinfo.cc (abi): Use the namespace. - (std): Move new abi rtti classes from here ... - (__cxxabiv1): ... to here. - * tinfo2.cc (cxxabi.h): Include for new-abi. - Move rtti class definitions to new header file. - (std): Move new abi rtti classes from here ... - (__cxxabiv1): ... to here. - * inc/typeinfo (__class_type_info): Move into __cxxabiv1 - namespace. - -2000-03-20 Jed Wing - Jason Merrill - - * method.c (build_overload_int): Use host_integerp. - -2000-03-20 Theodore Papadopoulo - - * init.c (build_offset_ref): Handle the case of a templated member - function. - -2000-03-19 Martin v. Löwis - - * except.c (expand_exception_blocks): Clear catch_clauses_last. - -2000-03-18 Mark Mitchell - - * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro. - * class.c (check_bitfield_decl): Turn illegal bitfields into - non-bitfields. - (dfs_propagate_binfo_offsets): Adjust for new size_binop - semantics. - (dfs_offset_for_unshared_vbases): Likewise. - * cvt.c (cp_convert_to_pointer): Convert NULL to a - pointer-to-member correctly under the new ABI. - * expr.c (cplus_expand_constant): Don't use cp_convert when - turning an offset into a pointer-to-member. - * init.c (resolve_offset_ref): Don't adjust pointers-to-members - when dereferencing them under the new ABI. - * typeck.c (get_member_function_from_ptrfunc): Tweak calculation - of pointers-to-members under the new ABI. - - * class.c (check_bitfield_decl): Remove restriction on really long - bitfields. - (layout_class_type): Implement new ABI handling of bitfields - longer than their types. - -2000-03-18 Martin v. Löwis - - * parse.y (extdefs): Call ggc_collect. - * parse.c: Regenerated. - -2000-03-18 Nathan Sidwell - - * class.c (build_base_field): Use TYPE_ALIGN to examine a type. - (note_name_declared_in_class): Use OVL_CURRENT to get at a - potential overload. - -2000-03-17 Richard Kenner - - * class.c (build_vbase_path): Use integer_zerop. - (build_vtable_entry): Use tree_low_cst. - (get_vfield_offset): Use bit_position. - (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. - Use tree_low_cst. - (check_bitfield_decl): Set DECL_SIZE using convert. - (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. - (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. - Use tree_low_cst. - (finish_struct_1): Use bit_position. - (dump_class_hierarchy): Use tree_low_cst. - * cp-tree.h (min_precision): Add declaration. - * decl.c (xref_tag, xref_basetypes): Use tree_low_cst. - * error.c (dump_type_suffix): Use host_integerp and tree_low_cst. - (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. - * expr.c (cplus_expand_constant): Use bit_position. - * init.c (build_vec_init): Use host_integerp and tree_low_cst. - * rtti.c (get_base_offset): Use bit_position. - * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, - host_integerp, and tree_low_cst. - (pointer_int_sum): Use integer_zerop. - (build_component_addr): Use bit_position. - -2000-03-17 Nathan Sidwell - - * typeck.c (require_complete_type): Don't assume size_zero_node. - (complete_type_or_else): Likewise. - -2000-03-16 Steven Grady - Jason Merrill - - * rtti.c (build_dynamic_cast_1): Improve diagnostics. - -2000-03-16 Nathan Sidwell - - * decl2.c (grokfield): Bail out if type is error_mark_node. - -2000-03-15 Nathan Sidwell - - * tinfo2.cc (__ptr_to_member_data): Rename to ... - (__pointer_to_member_data): ... here. Adjust. - * rtti.c (create_tinfo_types): Adjust. - -2000-03-15 Nathan Sidwell - - * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove. - * decl.c (ref_desc_type_node): Undocument. - * rtti.c (ptr_ref_initializer): Rename to ... - (ptr_initializer): ... here. Adjust comments. - (ptmd_initializer): Fix comment thinko. - (synthesize_tinfo_var): Remove REFERENCE_TYPE case. - (create_tinfo_types): Remove ref_desc_type_node init. - * tinfo2.cc (__reference_type_info): Remove. - -2000-03-15 Nathan Sidwell - - * decl.c (cp_finish_decl): Remove obsolete comment. - - * typeck.c (build_ptrmemfunc1): Kill uninitialized warning. - -2000-03-14 Mark Mitchell - - * cp-tree.h: Tweak documentation. - * class.c (build_vbase_pointer_fields): Layout the fields, too. - (avoid_overlap): Remove. - (get_binfo_offset_as_int): New function. - (dfs_serach_base_offsets): Likewise. - (layout_nonempty_base_or_field): Likewise. - (build_base_field): Layout fields here. Avoid placing two objects - of the same type at the same address, under the new ABI. - (build_base_fields): Adjust accordingly. - (create_vtable_ptr): Return the new field, but don't attach it to - TYPE_FIELDS. - (remove_base_field): Remove. - (remove_base_fields): Remove. - (layout_basetypes): Adjust accordingly. - (layout_class_type): Call layout_field for each field, rather than - just making a wholesale call to layout_type. - -2000-03-14 Jeff Sturm - - * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw. - -2000-03-13 Jason Merrill - - * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P. - - * except.c (dtor_nothrow): New fn. - (do_pop_exception): Use it. Take type parm. - (push_eh_cleanup): Take type parm. - (expand_start_catch_block): Pass it. - (build_eh_type_type_ref): Accept null type. - -2000-03-12 Mark Mitchell - - * cp-tree.h (revert_static_member_fn): Change prototype. - * decl.c (grokfndecl): Adjust call to revert_static_member_fn. - (grok_op_properties): Likewise. - (start_function): Likewise. - (revert_static_member_fn): Simplify. - * pt.c (check_explicit_specialization): Adjust call to - revert_static_member_fn. - -2000-03-11 Mark Mitchell - - * cp-tree.h (scope_kind): New type. - (tmpl_spec_kind): Likewise. - (declare_pseudo_global_level): Remove. - (pseudo_global_level_p): Rename to template_parm_scope_p. - (pushlevel): Remove declaration. - (begin_scope): New function. - (finish_scope): Likewise. - (current_tmpl_spec_kind): Likewise. - * decl.c (struct binding_level): Shorten parm_flag to 2 bits. - Shorten keep to 2 bits. Rename pseudo_global to template_parms_p. - Add template_spec_p. - (toplevel_bindings_p): Adjust. - (declare_pseudo_global_level): Remove. - (pseudo_global_level_p): Rename to template_parm_scope_p. - (current_tmpl_spec_kind): New function. - (begin_scope): Likewise. - (finish_scope): Likewise. - (maybe_push_to_top_level): Adjust. - (maybe_process_template_type_declaration): Likewise. - (pushtag): Likewise. - (pushdecl_nonclass_level): Likewise. - (lookup_tag): Likewise. - (grokfndecl): Handle member template specializations. Share - constructor and non-constructor code. - * decl2.c (check_classfn): Handle member template specializations. - * pt.c (begin_template_parm_list): Use begin_scope. - (begin_specialization): Likewise. - (end_specialization): Likewise. - (check_explicit_specialization): Use current_tmpl_spec_kind. - Handle member template specializations. - (end_template_decl): Use finish_scope. Remove call to - get_pending_sizes. - (push_template_decl_real): Remove bogus error message. - (tsubst_decl): Fix typo in code contained in comment. - (instantiate_template): Handle member template specializations. - (most_general_template): Likewise. - -2000-03-11 Gabriel Dos Reis - - * lex.c (whitespace_cr): Compress consecutive calls to warning(). - (do_identifier): Ditto for error(). - - * pt.c (convert_nontype_argument): Ditto for cp_error(). - (convert_template_argument): Ditto for cp_pedwarn(). - -2000-03-11 Jason Merrill - - * exception.cc (__check_null_eh_spec): New fn. - * except.c (expand_end_eh_spec): Call it if the spec is throw(). - -2000-03-10 Jason Merrill - - * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE. - * except.c (expand_end_eh_spec): Add the return type. - * rtti.c (throw_bad_cast): Add the parmtypes. - (throw_bad_typeid): Likewise. - - * semantics.c (expand_stmt): Only leave out rtl for unused - artificials, and set DECL_IGNORED_P on them as well. - * decl.c (wrapup_globals_for_namespace): Likewise. - -2000-03-09 Nathan Sidwell - - * decl.c (maybe_commonize_var): Skip all artificial decls. - * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN. - -2000-03-10 Jason Merrill - - * lang-options.h, decl2.c: Add -fno-enforce-eh-specs. - * cp-tree.h: Declare flag_enforce_eh_specs. - * decl.c (store_parm_decls, finish_function): Check it. - - C library functions don't throw. - * Makefile.in (cfns.h): New target. - (except.o): Depend on it. - * Make-lang.in (cc1plus): Depend on cfns.gperf. - * cfns.gperf: New file. - * cfns.h: Generated. - * except.c: Include it. - (nothrow_libfn_p): New fn. - * decl.c (grokfndecl): Use it. - * cp-tree.h: Declare it. - - * decl.c (push_overloaded_decl_1, auto_function, - define_function): Lose. - (build_library_fn_1): New static fn. - (builtin_function): Use it. - (get_atexit_node): Use build_library_fn_ptr. - (build_library_fn, build_cp_library_fn, build_library_fn_ptr, - build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn, - push_void_library_fn, push_throw_library_fn): New fns. - * cp-tree.h: Declare them. - (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID. - (throw_bad_cast_node, throw_bad_typeid_node): Lose. - * except.c (init_exception_processing, call_eh_info, do_pop_exception, - (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns. - * rtti.c (build_runtime_decl): Lose. - (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, - build_dynamic_cast_1, expand_si_desc, expand_class_desc, - expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns. - - * call.c (build_call): Remove result_type parm. - Call mark_used on unused artificial fns. - * init.c, method.c, typeck.c, except.c, rtti.c: Adjust. - -2000-03-09 Jason Merrill - - * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as - appropriate. - * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL. - * except.c (call_eh_info, alloc_eh_object, expand_throw): Set - TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate. - * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1, - expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, - expand_generic_desc): Likewise. - -2000-03-08 Nathan Sidwell - - * exception.cc (__cp_pop_exception): Cleanup the original object. - -2000-03-08 Nathan Sidwell - - * decl.c (grok_op_properties): Merge conversion to void warning - with other silly op warnings. - -2000-03-08 Jason Merrill - - * typeck2.c (process_init_constructor): Set TREE_PURPOSE of - array CONSTRUCTOR elements. Don't use expr_tree_cons. - -2000-03-08 Nathan Sidwell - - * decl.c (cp_make_fname_decl): New function. - (wrapup_globals_for_namespace): Don't emit unused static vars. - (init_decl_processing): Remove comment about use of - array_domain_type. Set make_fname_decl. - (cp_finish_decl): Remove __FUNCTION__ nadgering. - * semantics.c (begin_compound_stmt): Remove - current_function_name_declared flagging. - (expand_stmt): Don't emit unused local statics. - * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls - specially. - -2000-03-08 Nathan Sidwell - - * typeck.c (convert_for_assignment): Don't look at array - initializer. - * call.c (convert_like_real): Likewise. - -2000-03-07 Jason Merrill - - Add initial support for '\uNNNN' specifier. - * lex.c (read_ucs): New fn. - (readescape, skip_white_space): Call it. - (is_extended_char, is_extended_char_1): New fns. - (utf8_extend_token): New fn, #if 0'd out. - (real_yylex): Treat extended chars like letters. - - * search.c (note_debug_info_needed): Walk the bases even if we - weren't deferring the type itself. - -2000-03-07 Kaveh R. Ghazi - - * decl2.c (finish_objects): Constify a char*. - - * method.c (emit_thunk): Likewise. - -2000-03-06 Nathan Sidwell - - * typeck.c (dubious_conversion_warnings): Look through - REFERENCE_TYPE. - -2000-03-06 Richard Kenner - - * class.c (dfs_modify_vtables): I is now unsigned. - (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. - (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. - * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. - * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. - * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. - * typeck.c (build_binary_op, case TRUNC_DIV_EXPR): - Call integer_all_onesp. - * typeck2.c (process_init_constructor): Use compare_tree_int. - - * lang-specs.h (as): Don't call if -syntax-only. - -2000-03-06 Mark Mitchell - - * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set - RTL_EXPR_HAS_NO_SCOPE after all. - -2000-03-05 Mark Mitchell - - * expr.c (cplus_expand_expr, case STMT_EXPR): Use - expand_start_stmt_expr and expand_end_stmt_expr directly. Set - RTL_EXPR_HAS_NO_SCOPE. - - * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little - later. - - * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P. - -2000-03-05 Nathan Sidwell - - * call.c (convert_like): Macrofy. - (convert_like_with_context): New macro. - (convert_like_real): Renamed from convert_like. Add calling - context parameters, for diagnostics. Add recursive flag. Call - dubious_conversion_warnings for outer conversion. - (build_user_type_conversion): Use convert_like_with_context. - (build_over_call): Likewise. Don't warn about dubious - conversions here. Adjust convert_default_arg calls. - (convert_default_arg): Add context parameters for diagnostics. - Pass through to convert_like_with_context. - * cp-tree.h (convert_default_arg): Add context parameters. - (dubious_conversion_warnings): Prototype new function. - * typeck.c (convert_arguments): Adjust convert_default_arg call. - (dubious_conversion_warnings): New function, broken - out of convert_for_assignment. - (convert_for_assignment): Adjust. - -2000-03-03 Jason Merrill - - * decl2.c (key_method): Break out from... - (import_export_vtable, import_export_class): ...here. - - * decl.c (finish_function): Don't mess with flag_keep_inline_functions. - * decl2.c (finish_vtable_vardecl): Don't check decl_function_context. - - * search.c (note_debug_info_needed, dfs_debug_mark, - dfs_debug_unmarkedp): Uncomment. Adjust for new scheme. - * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed. - -2000-03-03 Nathan Sidwell - - * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix - typos. - -2000-03-02 Mark Mitchell - - * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ... - (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this. - (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro. - (lang_type): Split gets_new into has_new and has_array_new. - (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (TYPE_GETS_NEW): Split into ... - (TYPE_HAS_NEW_OPERATOR): ... this, and ... - (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this. - (DECL_ARRAY_DELETE_OPERATOR_P): New macro - (build_op_new_call): Don't declare. - (build_new_1): Likewise. - * call.c (build_op_new_call): Remove. - * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR - instead of TYPE_NEEDS_DESTRUCTOR. - (finish_struct_bits): Likewise. - (add_implicitly_declared_members): Likewise. - (check_field_decl): Likewise. - (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it - correctly under the new ABI. - * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR - instead of TYPE_NEEDS_DESTRUCTOR. - (initialize_local_var): Likewise. - (destroy_local_var): Likewise. - (cp_finish_decl): Likewise. - (register_dtor_fn): Likewise. - (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and - TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set - TYPE_VEC_DELETE_TAKES_SIZE here. - (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and - TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. - (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (finish_destructor_body): Likewise. - (maybe_build_cleanup_1): Likewise. - * decl2.c (do_static_destruction): Likewise. - * init.c (build_new_1): Make it static. - (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (expand_cleanup_for_base): Likewise. - (get_cookie_size): New function. - (build_new_1): Handle array-new cookies correctly under the new - ABI. - (build_vec_delete_1): Likewise. - (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - (build_delete): Likewise. - (build_vec_delete): Handle array-new cookies correctly under the new - ABI. - * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and - TYPE_HAS_ARRAY_NEW_OPERATOR. - * ptree.c (print_lang_type): Check them. - * search.c (context_for_name_lookup): Fix typo in comment. - (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. - * tree.c (break_out_cleanups): Likewise. - (build_cplus_array_test_1): Likewise. - (cp_build_qualified_type_real): Likewise. - * typeck.c (complete_type): Likewise. - - * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of - the command-line, not the end. - -2000-03-01 Jason Merrill - - * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG. - -2000-03-02 Tom Tromey - - * cp-tree.h (build_java_class_ref): Declare. - * init.c (build_java_class_ref): No longer static. - * except.c (expand_throw): Generate a Java-style `throw' if the - thrown object is a "Java" object. - (initialize_handler_parm): Generate a Java-style lookup of - exception info if the caught object is a "Java" object. - (catch_language, catch_language_init): New globals. - (decl_is_java_type): New function. - (expand_start_catch_block): Don't call push_eh_info() or - push_eh_cleanup() when handling a Java-style "catch". Pass Java - class reference to build_catch_block. - -2000-03-02 Richard Kenner - - * typeck.c (comptypes): Treat sizetype like its language equivalent. - -2000-03-01 Bernd Schmidt - - * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize - to merge reference/pointer code and fix incorrect warnings. - -2000-02-29 Jason Merrill - - * search.c (protected_accessible_p): Use context_for_name_lookup. - - * init.c (construct_virtual_bases): Fix thinko. - * typeck.c (expand_ptrmemfunc_cst): Fix thinko. - -2000-03-01 Martin von Loewis - - * decl.c (current_function_decl): Move to toplev.c. - -2000-02-29 Nathan Sidwell - - * pt.c (fn_type_unification): Unify return type, whenever - provided. - (get_bindings_real): Only pass return type when necessary. - Remove explicit return type check. - * class.c (resolve_address_of_overloaded_function): Pass desired - return type to fn_type_unification. - -2000-02-28 Richard Kenner - - * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear - DECL_FIELD_SIZE. - (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not - DECL_FIELD_SIZE. - * rtti.c (expand_class_desc): Likewise. - * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. - (THUNK_VCALL_OFFSET): Likewise. - (THUNK_DELTA): Reflect changes in ../tree.h. - -2000-02-28 Jason Merrill - - * search.c (protected_accessible_p): Also allow the access if - the member is public in DERIVED. Lose TYPE parm. - (friend_accessible_p): Lose TYPE parm. - (accessible_p): Adjust. - -2000-02-27 Richard Kenner - - * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop - on things that are not sizes; ssize_binop deleted. - Call size_diffop when appropriate. - (dfs_build_vcall_offset_vtbl_entries): Likewise. - (build_primary_vtable, build_secondary_vtable): Likewise. - (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. - Variable I is HOST_WIDE_INT. - (get_vfield_offset): Pass proper types to size_binop. - (size_extra_vtbl_entries, layout_virtual_bases): Likewise. - (finish_struct_1): Likewise. - (skip_rtti_stuff): Arg N is now pointer to signed. - (layout_class_type): Use size_zero_node. - * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. - * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. - * decl.c (complete_arry_type): Pass proper types to size_binop. - (xref_basetypes): BINFO_OFFSET is sizetype. - * error.c (dump_expr): Don't use size_binop non-sizes. - * expr.c (cplus_expand_constant): Pass proper types to size_binop. - * init.c (construct_virtual_bases): Fix type error. - (build_vec_delete_1): Pass proper type to size_binop and don't - fold result. - * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. - * rtti.c (get_base_offset): Pass proper type to size_binop. - * search.c (dfs_find_vbases): Fix type error. - (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. - (dfs_get_vbase_types): BINFO_OFFSET is sizetype. - * tree.c (debug_binfo): Variable N is signed. - Use HOST_WIDE_INT_PRINT_DEC. - * typeck.c (comptypes): sizetype is same as equivalent integer type. - (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, - size_one_node and size_zero_node. - (c_alignof): Use size_one_node. - (build_component_addr): Pass proper types to size_binop. - (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. - -2000-02-26 Jason Merrill - - Implement class scope using-declarations for functions. - * class.c (handle_using_decl): Call add_method for used functions. - Use IDENTIFIER_CLASS_VALUE to check for conflicts. - (add_method): Used functions are hidden by local functions. - (check_bases_and_members): Handle using-decls before finalizing - CLASSTYPE_METHOD_VEC. - * call.c (add_function_candidate): Add ctype parm; if nonzero, - override the type of 'this' accordingly. - (add_template_candidate, add_template_candidate_real): Add ctype parm. - (convert_class_to_reference, build_user_type_conversion_1, - build_new_function_call, build_object_call, build_new_op, - build_new_method_call): Pass ctype parm. - - * search.c (lookup_member): Put rval_binfo, not basetype_path, in - the baselink. - * call.c (convert_class_to_reference, build_user_type_conversion_1, - build_new_function_call, build_object_call, build_new_op, - build_new_method_call, build_op_delete_call): Don't get basetype_path - from a baselink. - * typeck.c (build_component_ref): Likewise. - * init.c (build_offset_ref): Likewise. - (resolve_offset_ref): Don't call enforce_access. - Call build_scoped_ref. - * typeck2.c (build_scoped_ref): Simplify. Do nothing if it - would cause an error or if -pedantic. - * class.c (alter_access): Lose binfo parm. - -2000-02-26 Mark Mitchell - - * semantics.c (simplify_aggr_init_exprs_p): Don't walk into - types. - -2000-02-25 Alfred Minarik - - * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info - pseudo_type_info creation into the std namespace - -2000-02-26 Mark Mitchell - - * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF. - (import_export_class): Remove declaration. - * decl2.c (import_export_class): Make it static. - * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR, - PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, - EXPR_WITH_FILE_LOCATION. - * lex.c (check_newline): Tweak filename/lineno setting. - * semantics.c (begin_while_stmt): Fix typo in comment. - -2000-02-26 Richard Kenner - - * lang-options.h (-fmessage-length=): Add missing option. - - * Make-lang.in (CXX_SRCS): Add .h files and sort list. - -2000-02-26 Zack Weinberg - - * Make-lang.in: Delete refs to LIBGCC2_DEPS. - -2000-02-25 Jim Wilson - - * optimize.c (expand_call_inline): Emit the return label before - evaluating the return value. - -2000-02-24 Mark Mitchell - - * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather - than duplicating functionality here. - * optimize.c: Include input.h. - (expand_call_inline): Use push_srcloc and pop_srcloc. - * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note. - * parse.c: Regenerated. - * Makefile.in (lex.o): Depend on input.h. - (optimize.o): Likewise. - -2000-02-24 Nathan Sidwell - - * decl.c (grokdeclarator): Diagnose qualifiers on non-member - function type, rather than ICE. - -2000-02-23 Jason Merrill - - * decl.c (grokdeclarator): Call decl_type_access_control. - * parse.y (parse_end_decl): Don't call decl_type_access_control if - decl is null. - -2000-02-23 Nathan Sidwell - - * decl.c (decls_match): Remove obsolete static member nadgering. - -2000-02-21 Martin v. Löwis - - * decl.c (grokdeclarator): Change ANSI to ISO. - * lex.c (consume_string, readescape, do_identifier): Likewise. - (parse_float, real_yylex): Likewise. - * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise. - (unary_expr, new_initializer, cast_expr, primary, primary_no_id, - new_type_id, maybe_label_decls, simple_stmt, - for.init.statement): Likewise. - * pt.c (do_decl_instantiation, do_type_instantiation): Likewise. - * semantics.c (finish_named_return_value): Likewise. - * parse.c: Regenerate. - -2000-02-21 Mark Mitchell - - * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro. - (CPTI_CLASS_STAR_TYPE): Remove. - (vtable_index_type): Likewise. - (class_star_type_node): Remove. - (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI. - (build_binary_op_nodefault): Remove. - * call.c (build_new_op): Use build_binary_op instead of - build_binary_op_nodefault. - * decl.c (init_decl_processing): Remove class_star_type_node - initialization. Make delta_type_node ptrdiff_type_node under the - new ABI. Initialize vtable_index_type. - (build_ptrmemfunc_type): Build different structures for the new - ABI. - (build_enumerator): Use build_binary_op instead of - build_binary_op_nodefault. - * method.c (build_overload_value): Mangle pointers-to-members - appropriately under the new ABI. - * typeck.c (build_array_ref): Use build_binary_op instead of - build_binary_op_nodefault. - (get_member_function_from_ptrfunc): Adjust for the new ABI. - (build_binary_op_nodefault): Rename to ... - (build_binary_op): ... this. Remove old version. Adjust for - pointer-to-member comparisons under the new ABI. - (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI. - (build_ptrmemfunc): Adjust for the new ABI. - (expand_ptrmemfunc_cst): Likewise. - (delta2_from_ptrmemfunc): Assert that we're not using the new ABI. - (pfn_from_ptrmemfunc): Adjust for the new ABI. - -2000-02-21 Gabriel Dos Reis - - * call.c (build_object_call): Compress consecutive calls to - cp_error. - (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'. - (build_op_delete_call): Adjust message formatting. - - * class.c (check_bases): Compress consecutive calls to - cp_pedwarn. - (finish_struct_anon): Say 'ISO C++'. - - * decl.c (start_decl): Same here. - (grok_reference_init): Likewise. - (grokfndecl): Correct message formatting. - (grokfndecl): Improve diagnostic. - (check_static_variable_definition): Likewise. Say 'ISO C++' - (compute_array_index_type): Say 'ISO C++' - (create_array_type_for_decl): Compress consecutive calls to - cp_error. - (grokdeclarator): Say 'ISO C++' - (grok_op_properties): Likewise. - - * decl2.c (delete_sanity): Clairify diagnostic. - (check_member_template): Same here. - (grok_function_init): Use consistent terminology. - - * expr.c (do_case): Say 'ISO C++' - - * friend.c (do_friend): Compress consecutive calls to warning. - -2000-02-20 Mark Mitchell - - * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro. - * class.c (build_secondary_vtable): Reorganize. Don't create a - new vtable under the new ABI. - (layout_vtable_decl): Don't add num_extra_vtbl_entries when - computing the size. - (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return - the initializing elements. - (initialize_vtable): New function. - (dfs_finish_vtbls): Use it. - (dfs_accumulate_vtbl_inits): New function. - (finish_vtbls): Merge primary and secondary vtables under the new - ABI. - (finish_struct_1): Remove redundant call to layout_vtable_decl. - * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that - aren't VAR_DECLs. - - * class.c (build_vtable): New function, split out from ... - (get_vtable_decl): ... here, and ... - (build_secondary_vtable): ... here. - - * pt.c (tsubst_decl): Fix formatting. - -2000-02-19 Richard Kenner - - * class.c (build_primary_vtable, layout_vtable_decl): Likewise. - (avoid_overlap, build_base_field): Likewise. - (build_base_field, build_base_fields, is_empty_class): - Test DECL_SIZE with integer_zero. - (layout_class_type): Set CLASSTYPE_SIZE_UNIT. - * cp-tree.h (struct lang_type): New field size_unit. - (CLASSTYPE_SIZE_UNIT): New macro. - * decl.c (init_decl_processing): Set DECL_SIZE_UNIT. - (cp_finish_decl): Delete -Wlarger-than processing. - * optimize.c (remap_decl): Walk DECL_SIZE_UNIT. - * pt.c (tsubst_decl): Set DECL_SIZE_UNIT. - * tree.c (make_binfo): binfo vector is one entry longer. - (walk_tree): Walk DECL_SIZE_UNIT. - -2000-02-19 Mark Mitchell - - * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in - comment. - (build_vtable_entry): Don't assume all vtable entries are - functions. - (build_vtbl_initializer): Adjust accordingly. - (get_vtable_decl): Fix formatting. - -2000-02-18 Jason Merrill - - * semantics.c (deferred_type_access_control): Walk the entire - type_lookups list. - (save_type_access_control): Rename from - initial_deferred_type_access_control. Just remember the value. - (decl_type_access_control): New fn. - (begin_function_definition): Use deferred_type_access_control, after - we've started the function. Set type_lookups to error_mark_node. - * parse.y (frob_specs, fn.def1): Adjust. - (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns. - (parse_end_decl, parse_bitfield0, parse_method): New fns. - (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them. - (after_type_component_declarator0): Likewise. - (after_type_component_declarator): Likewise. - (notype_component_declarator): Likewise. - * cp-tree.h: Adjust. - - * decl.c (redeclaration_error_message): Allow redeclaration of - namespace-scope decls. - -2000-02-18 Martin von Loewis - - * typeck2.c (my_friendly_abort): Use GCCBUGURL. - -2000-02-17 Mark Mitchell - - * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. - * decl2.c (grokclassfn): Likewise. - - * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. - - * decl2.c (lang_decode_option): Don't set default message length - here. - * lex.c (lang_init_options): Set it here. - -2000-02-16 Mark Mitchell - - Make DECL_CONTEXT mean the class in which a member function was - declared, even for a virtual function. - * cp-tree.h (DECL_CLASS_CONTEXT): Adjust. - (DECL_FRIEND_CONTEXT): New macro. - (DECL_REAL_CONTEXT): Remove. - (SET_DECL_FRIEND_CONTEXT): Likewise. - (DECL_VIRTUAL_CONTEXT): Adjust. - (DECL_CLASS_SCOPE_P): Use TYPE_P. - (add_friends): Remove. - (hack_decl_function_context): Likewise. - * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with - CP_DECL_CONTEXT. - (build_over_call): Fix indentation. Use DECL_CONTEXT - instead of DECL_CLASS_CONTEXT. - * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise. - (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. - (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT. - (build_base_field): Likewise. - (finish_struct_1): Likewise. - (build_self_reference): Likewise. - * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (pushtag): Use decl_function_context, not - hack_decl_function_context. - (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. - (duplicate_decls): Use DECL_VIRTUAL_CONTEXT. - (pushdecl): Remove bogus code. - (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT. - (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. - (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - Use decl_function_context, nothack_decl_function_context. - (grokvardecl): Don't set DECL_CLASS_CONTEXT. - (grokdeclarator): Likewise. Use decl_function_context, not - hack_decl_function_context. - (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT. - (start_function): Use DECL_FRIEND_CONTEXT, not - DECL_CLASS_CONTEXT. Use decl_function_context, not - hack_decl_function_context. - (finish_function): Use decl_function_context, not - hack_decl_function_context. - (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT. - (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT. - (grokfield): Likewise. - (finish_builtin_type): Likewise. - (finish_vtable_vardec): Use decl_function_context, not - hack_decl_function_context. - (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (start_static_initialization_or_destruction): Likewise. - (finish_static_initialization_or_destruction): Likewise. - (mark_used): Adjust logic for deciding when to synthesize methods. - * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - * error.c (dump_function_decl): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - * friend.c (is_friend): Likewise. - (add_friends): Remove. - (do_friend): Use SET_DECL_FRIEND_CONTEXT. - * lex.c (begin_definition_of_inclass_inline): Use - decl_function_context, not hack_decl_function_context. - (process_next_inline): Likewise. - (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. - * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not - DECL_CLASSS_CONTEXT. - (hack_identifier): Likewise. - (synthesize_method): Use decl_function_context, not - hack_decl_function_context. - * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (is_member_template): Use decl_function_context, not - hack_decl_function_context. Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not - DECL_CLASS_CONTEXT. - (check_default_tmpl_args): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (push_template_decl_real): Likewise. - (instantiate_class_template): Don't call add_friends. - (tsubst_default_argument): Use DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. - Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - * repo.c (repo_inline_used): Likewise. - * search.c (current_scope): Adjust for new _CONTEXT macros. - (context_for_name_lookup): Use CP_DECL_CONTEXT, not - DECL_REAL_CONTEXT. - (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. - (lookup_fnfields_here):Likewise. - (check_final_overrider): Likewise. - (init_vbase_pointers): Likewise. - (virtual_context): Likewise. - * semantics.c (finish_member_declaration): Just set DECL_CONTEXT. - (expand_body): Use decl_function_context, not - hack_decl_function_context. - * tree.c (hack_decl_function_context): Remove. - * typeck.c (build_x_function_call): Use DECL_CONTEXT, not - DECL_CLASS_CONTEXT. - * typeck2.c (error_not_base_type): Likewise. - -2000-02-15 Jason Merrill - - * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE. - -2000-02-16 Kaveh R. Ghazi - - * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h. - -2000-02-15 Jonathan Larmour - - * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. - -2000-01-16 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Enable automatic line wrapping. - -2000-02-13 Jason Merrill - - * parse.y (frob_specs): Split out... - (parse_decl): From here. - (fn.def2): Call initial_deferred_type_access_control. - (after_type_component_declarator0): Call frob_specs. - (notype_component_declarator0): Likewise. - * search.c (friend_accessible_p): Nested classes are friends of their - enclosing classes. - -2000-02-10 Mark Mitchell - - * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be - used to create an implicit temporary. - - * class.c (dfs_modify_vtables): Tweak calculation of functions to - override. - -2000-02-08 Nathan Sidwell - - * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to - strip array element qualifiers too. - -2000-02-07 Mark Mitchell - - * decl.c (store_parm_decls): Don't build cleanups for parameters - while processing_template_decl. - -2000-02-07 Jason Merrill - - * cp-tree.h (struct saved_scope): Add incomplete field. - (namespace_scope_incomplete): New macro. - * decl.c (pushdecl): Use it. - (hack_incomplete_structures): Use it. See through artificial - binding levels. - (mark_saved_scope): Mark it. - - Implement access control for nested types. - * search.c (type_access_control): New fn. - (accessible_p): Now we do perform access control for types. - * semantics.c (deferred_type_access_control): New fn. - (initial_deferred_type_access_control): New fn. - (begin_function_definition): Call it. Add lookups parm. - * decl.c (struct binding_level): Add this_class field. - (pushlevel_class): Set it. - (mark_binding_level): Mark it. - (lookup_name_real): Use it. Call type_access_control. - (mark_saved_scope): Mark lookups field. - * cp-tree.h (flagged_type_tree): Add lookups field. - (struct saved_scope): Add lookups field. - (type_lookups): New macro. - * parse.y (declmods): Now . - (parse_decl): Add lookups parm. Call - initial_deferred_type_access_control. - (lang_extdef): Clear type_lookups. - (typed_declspecs, declmods, typespec): Set lookups field. - (initdcl): Call deferred_type_access_control. - (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0, - component_decl_1, named_parm): Adjust. - * friend.c (is_friend): Nested classes are friends of their - enclosing classes. - - * class.c (currently_open_derived_class): New fn. - * method.c (hack_identifier): Use it. - - * lex.c (do_identifier): Remove obsolete code. - - * parse.y (typed_typespecs): Propagate new_type_flag properly. - -2000-02-05 Zack Weinberg - - * tinfo.h: Remove apostrophes from C++ comment (xgettext - thinks this file is plain C). - -2000-02-05 Kaveh R. Ghazi - - * Makefile.in (call.o): Depend on $(EXPR_H). - - * call.c: Include "expr.h". - - * class.c (dump_class_hierarchy): Add prototype. - - * search.c (dfs_get_pure_virtuals): Likewise. - -2000-02-1 Ulrich Drepper - - * parse.y (simple_stmt): Allow :: token in asm parameter list. - * parse.c: Rebuilt. - -2000-01-31 Jim Wilson - - * class.c (build_vtbl_or_vbase_field): New parameter fcontext. - Store it in DECL_FCONTEXT. - (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. - -2000-01-31 Jason Merrill - - * tinfo.h (old abi): #include "tconfig.h". - * tinfo.cc (convert_to_base): Move into old abi section. - -2000-01-31 Mark Mitchell - - * cp-tree.h (BINFO_VIRTUALS): Tweak documentation. - (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO. - (BINFO_PRIMARY_BINFO): New macro. - (BF_DELTA): Rename to ... - (BV_DELTA): ... this. - (BF_VCALL_INDEX): Rename to ... - (BV_VCALL_INDEX): ... this. - (BF_FN): Rename to ... - (BV_FN): ... this. - * class.c (build_vbase_path): Adjust for changes to reverse_path. - (set_rtti_entry): Rename BF_ macros to BV_ variants. - (modify_vtable_entry): Simplify. - (add_virtual_function): Rename BF_ macros to BV_ variants. - (build_vtable_initializer): Likewise. - (get_class_offset_1): Remove. - (dfs_get_class_offset): Likewise. - (get_class_offset): Likewise. - (dfs_find_final_overrider): New function. - (find_final_overrider): Likewise. - (modify_one_vtable): Remove. - (dfs_find_base): New function. - (dfs_modify_vtables): Fold modify_one_vtable in here. Use - find_final_overrider. - (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new - virtuals. - (dfs_fixup_vtable_deltas): Remove. - (override_one_vtable): Remove. - (merge_overrides): Likewise. - (layout_virtual_bases): Make sure BINFO_OFFSET is set right for - unreal chilren of virtual bases. - (finish_struct_1): Don't use merge_overrides. Don't use - dfs_fixup_vtable_deltas. - * tree.c (reverse_path): Return a TREE_LIST, not a chain of - BINFOs. - -2000-01-31 Herman A.J. ten Brugge - Jason Merrill - - * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT. - -2000-01-31 Alfred Minarik - - * exception.cc (__throw_bad_typeid): Add missing std::. - -2000-01-31 Kaveh R. Ghazi - - * cp-tree.h (make_thunk): PROTO -> PARAMS. - -2000-01-31 Nathan Sidwell - - * cp-tree.h (new_abi_rtti_p): Use flag_new_abi. - - Runtime support for new-abi rtti. - * inc/typeinfo (type_info::operator!=): Define in class. - (type_info::before, type_info::name, type_info::operator==, - type_info::operator!=): Define new ABI implementations. - (type_info::is_pointer_p, type_info::is_function_p): Declare - new virtual functions. - (type_info::do_catch, type_info::do_upcast): Likewise. - - * tinfo.h (__base_class_info): Define new class. - (__class_type_info): Likewise. - (__si_class_type_info): Likewise. - (__vmi_class_type_info): Likewise. - (__dynamic_cast): Prototype. - - * tinfo.cc: Conditionalize old and new rtti mechanisms. - (type_info::is_pointer_p): Define new function. - (type_info::is_function_p): Likewise. - (type_info::do_catch): Likewise. - (type_info::do_upcast): Likewise. - (vtable_prefix): New structure for vtable access. - (adjust_pointer): Define new template function. - (contained_p, public_p, virtual_p, contained_public_p, - contained_nonpublic_p, contained_nonvirtual_p): Define new - functions. - (nonvirtual_base_type): New local variable. - (__class_type_info::~__class_type_info): Define. - (__si_class_type_info::~__si_class_type_info): Likewise. - (__vmi_class_type_info::~__vmi_class_type_info): Likewise. - (__class_type_info::do_catch): Define new function. - (__class_type_info::do_upcast): Likewise. - (__class_type_info::find_public_src): Likewise. - (__class_type_info::do_find_public_src): Likewise. - (__si_class_type_info::do_find_public_src): Likewise. - (__vmi_class_type_info::do_find_public_src): Likewise. - (__class_type_info::do_dyncast): Likewise. - (__si_class_type_info::do_dyncast): Likewise. - (__vmi_class_type_info::do_dyncast): Likewise. - (__class_type_info::do_upcast): Likewise. - (__si_class_type_info::do_upcast): Likewise. - (__vmi_class_type_info::do_upcast): Likewise. - (__dynamic_cast): Likewise. - - * tinfo2.cc (__fundamental_type_info): Define new class. - (__pointer_type_info): Likewise. - (__reference_type_info): Likewise. - (__array_type_info): Likewise. - (__function_type_info): Likewise. - (__enum_type_info): Likewise. - (__ptr_to_member_type_info): Likewise. - (__fundamental_type_info::~__fundamental_type_info): Define. - (__pointer_type_info::~__pointer_type_info): Likewise. - (__reference_type_info::~__reference_type_info): Likewise. - (__array_type_info::~__array_type_info): Likewise. - (__function_type_info::~__function_type_info): Likewise. - (__enum_type_info::~__enum_type_info): Likewise. - (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise. - (__pointer_type_info::do_catch): Define new function. - (__ptr_to_member_type_info::do_catch): Define new function. - - (__throw_type_match_rtti_2): Use new ABI interface, if enabled. - (__is_pointer): Likewise. - - * exception.cc (__cplus_type_matcher): Deal with new-abi rtti. - -2000-01-30 Mark Mitchell - - * cp/class.c (build_vtable): Rename to build_primary_vtable. - (prepare_fresh_vtable): Rename to build_secondary_vtable. - (make_new_vtable): New function. - (modify_vtable_entry): Handle generation of new vtables correctly. - (modify_one_vtable): Remove unused parameter. - (dfs_fixup_vtable_deltas): Likewise. - (override_one_vtable): Use build_secondary_vtable. - (finish_struct_1): Use build_primary_vtable and - build_secondary_vtable. - -2000-01-28 Ulrich Drepper - - * cp/decl.c: Adjust variable names, comments, help strings. - -2000-01-29 Nathan Sidwell - - * new2.cc (operator delete[]): Use operator delete, don't assume - implementation. - -2000-01-29 Nathan Sidwell - - * class.c (build_vtbl_initializer): Add argument to - build_vtable_entry call. - -2000-01-27 Mark Mitchell - - * cp-tree.def (THUNK_DECL): Discuss vcall indices. - * cp-tree.h (BINFO_VIRTUALS): Update documentation. - (BF_DELTA): New macro. - (BF_VCALL_INDEX): Likewise. - (BF_FN): Likewise. - (THUNK_VCALL_OFFSET): Likewise. - (make_thunk): Change prototype. - * class.c (build_vtable_entry): Integrate - build_vtable_entry_for_fn. Handle vcall indices. - (build_vtable_entry_for_fn): Remove. - (set_rtti_entry): Handle vcall indices. Use BF_DELTA, - BF_VCALL_INDEX, BF_FN. - (modify_vtable_entry): Integrate common code from - modify_one_vtable and dfs_fixup_vtable_deltas. - (add_virtual_function): Set BF_VCALL_INDEX. - (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX, - and BF_FN. - (modify_one_vtable): Simplify. - (dfs_fixup_vtable_deltas): Likewise. - (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. - * method.c (make_thunk): Handle vcall indices. - -2000-01-28 Nathan Sidwell - - Compiler side new abi rtti (not enabled). - * cp-tree.h (new_abi_rtti_p): New macro. - (emit_support_tinfos): Prototype new function. - (tinfo_decl_p): Likewise. - (emit_tinfo_decl): Likwise. - * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor - macros. - (doing_runtime): New local static. - (init_rtti_processing): Add new-abi initializer. - (get_tinfo_decl): Add new-abi logic. - (tinfo_from_decl): Likewise. - (build_dynamic_cast_1): Likewise. - (qualifier_flags): New static function. - (tinfo_base_init): Likewise. - (generic_initializer): Likewise. - (ptr_ref_initializer): Likewise. - (ptmd_initializer): Likewise. - (class_hint_flags): Likewise. - (class_initializer): Likewise. - (synthesize_tinfo_var): Likewise. - (create_real_tinfo_var): Likewise. - (create_pseudo_type_info): Likewise. - (get_vmi_pseudo_type_info): Likewise. - (create_tinfo_types): Likewise. - (emit_support_tinfos): New global function. - (tinfo_decl_p): New global predicate. - (emit_tinfo_decl): New global function. - * class.c (set_rtti_entry): Generalize for old and new rtti. - (build_vtbl_initializer): Likewise. - * decl2.c (finish_file): Likewise. - -2000-01-27 Jim Wilson - - * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t) - and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))). - -2000-01-27 Mike Stump - - * decl.c (pushdecl): Fix up shadow warnings with respect to implicit - for scopes. - -2000-01-26 Jason Merrill - - * pt.c (unify): Use fold, not maybe_fold_nontype_arg. - -2000-01-26 J"orn Rennecke - - * optimize.c (calls_setjmp_r): Supply new argument - to special_function_p. - -2000-01-26 Kaveh R. Ghazi - - * call.c: PROTO -> PARAMS. - * class.c: Likewise. - * cp-tree.h: Likewise. - * cvt.c: Likewise. - * decl.c: Likewise. - * decl.h: Likewise. - * decl2.c: Likewise. - * dump.c: Likewise. - * errfn.c: Likewise. - * error.c: Likewise. - * except.c: Likewise. - * expr.c: Likewise. - * init.c: Likewise. - * input.c: Likewise. - * lex.c: Likewise. - * lex.h: Likewise. - * method.c: Likewise. - * optimize.c: Likewise. - * parse.y: Likewise. - * pt.c: Likewise. - * repo.c: Likewise. - * rtti.c: Likewise. - * search.c: Likewise. - * semantics.c: Likewise. - * spew.c: Likewise. - * tree.c: Likewise. - * typeck.c: Likewise. - * typeck2.c: Likewise. - * xref.c: Likewise. - -2000-01-25 Richard Henderson - - * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. - -2000-01-25 Mark Mitchell - - * cp-tree.h (vcall_offset_in_vtable_p): New macro. - * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment. - (struct vcall_offset_data_s): New type. - (dfs_vcall_offset_queue_p): New function. - (dfs_build_vcall_offset_vtbl_entries): Likewise. - (build_vcall_offset_vtbl_entries): Likewise. - (layout_vtable_decl): Likewise. - (num_vfun_entries): Likewise. - (num_extra_vtbl_entries): Add the entries for vcall offsets. - (build_vtbl_initializer): Likewise. - (dfs_finish_vtabls): Use layout_vtable_decl. - (modify_one_vtables): Always duplicate vtables under the new ABI. - (finish_struct_1): Use layout_vtable_decl. - -2000-01-25 Kaveh R. Ghazi - - * decl.c (member_function_or_else): Change third arg from a format - specifier to an `enum overload_flags'. Callers changed. - -2000-01-25 Gabriel Dos Reis - - * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof, - build_binary_op_nodefault, build_unary_op, build_reinterpret_cast, - build_const_cast, get_delta_difference, check_return_expr): Avoid - ANSI string concatenation usage. - -2000-01-24 Mark Mitchell - - * class.c (layout_class_type): Put the fields required to make a - class non-empty at the end, not the beginning, of the TYPE_FIELDs - list. - -2000-01-24 Jason Merrill - - * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a - template. - - * decl2.c (mark_used): Do instantiate inlines that have been - explicitly instantiated. - -2000-01-24 Richard Henderson - - * call.c (build_over_call): Use expand_tree_builtin. - * typeck.c (build_function_call_real): Likewise. - (build_binary_op_nodefault): Handle unordered compares. - -2000-01-24 Nathan Sidwell - - * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New - cp_tree_index values. - (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node): - New global node #defines for them. - * rtti.c (call_void_fn): Replace with ... - (build_runtime_decl): ... new static function. - (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl. - (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl. - (build_dynamic_cast_1): Always produce correctly typed result. - Explicitly produce type_info addresses. Use dynamic_cast_node. - * exception.cc (__throw_bad_cast): Return `void *'. - (__throw_bad_typeid): Return `const type_info &'. - -2000-01-24 Nathan Sidwell - - * cp-tree.h (get_vtable_decl): Prototype new function. - * class.c (get_vtable_decl): New function. Broken out from ... - (build_vtable): ... here. Use it. - * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created - by get_vtable_decl. - -2000-01-24 Nathan Sidwell - - * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE, - CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE, - CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations. - (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE, - CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, - CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations. - (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ... - (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here. - (CPTI_TINFO_VAR_ID): New enumeration. - (__tp_desc_type_node, __access_mode_type_node, - __bltn_desc_type_node, __user_desc_type_node, - __class_desc_type_node, __ptr_desc_type_node, - __attr_desc_type_node, __func_desc_type_node, - __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines. - (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, - ref_desc_type_node, ary_desc_type_node, func_desc_type_node, - enum_desc_type_node, class_desc_type_node, - si_class_desc_type_node, vmi_class_desc_type_node, - ptmd_desc_type_node, base_desc_type_node): New #defines. - (tinfo_fn_id, tinfo_fn_type): Rename to ... - (tinfo_decl_id, tinfo_decl_type): ... here. Adjust. - (tinfo_var_id): New enumeration. - (DECL_TINFO_FN_P): Augment comment. - * decl.c (cp_global_trees): Adjust documentation. - * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id, - tinfo_decl_type and tinfo_var_id. - (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type. - (build_typeid): Remove unused variable. - (get_tinfo_var): Use tinfo_var_id. - (tinfo_name): New static function. - (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type. - (tinfo_from_decl): Likewise. - (get_base_offset): New static function, broken out of - expand_class_desc. - (expand_si_desc): Use tinfo_name. - (expand_class_desc): Likewise. Lose local static variable. - Use base_desc_type_node. Use get_base_offset. - (expand_ptr_desc): Use tinfo_name. - (expand_attr_desc): Likewise. - (expand_generic_desc): Likewise. - - * tinfo.cc (__GXX_ABI_VERSION): Test value and existence. - * tinfo.h (__GXX_ABI_VERSION): Test value and existence. - -2000-01-23 Mark Mitchell - - * cp-tree.h (__eprintf): Remove declaration. - * tree.c (__eprintf): Remove definition. - -2000-01-23 Zack Weinberg - Mark Mitchell - - * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, - CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings. - -2000-01-23 Brad Lucier - - * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. - -2000-01-23 Mark Mitchell - - * cp-tree.h (register_dtor_fn): New function. - * decl.c (destroy_local_static): Rename to ... - (register_dtor_fn): ... this. Give it external linkage. - (expand_static_init): Use it. - * decl2.c (do_static_initialization): Likewise, if using - __cxa_atexit. - (do_static_destruction): Check that __cxa_atexit is not in use. - (finish_file): Don't call do_static_destruction if using - __cxa_atexit. - - * typeck.c (convert_arguments): Restore two-message error - reporting. - -2000-01-20 Nathan Sidwell - - Remap dynamic cast hint values to be consistent across ABIs. - * search.c (dynamic_cast_base_recurse): Remap generated value. - (get_dynamic_cast_base_type): Adjust documentation. - * tinfo.h (__user_type_info::dyncast): Likewise. - (__user_type_info::find_public_subobj): Remap BOFF meaning. - * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning. - (__class_type_info::do_dyncast): Likewise. - (__class_type_info::do_find_public_subobj): Likewise. - * tinfo2.cc (__dynamic_cast): Remap BOFF parameter. - -2000-01-19 Gabriel Dos Reis - - * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. - - * typeck2.c (incomplete_type_error): Restore previous - cp_error and cp_error_at call sequence. - -2000-01-20 Brad Lucier - - * class.c (dump_class_hierarchy): Make format agree with argument; - cast pointer to unsigned long and print with %lx. - -2000-01-19 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Set default line-wrap length to 72. - - * typeck.c (composite_pointer_type, common_type, - comp_target_parms, c_sizeof, expr_sizeof, build_array_ref, - build_function_call_real, convert_arguments, - build_binary_op_nodefault, pointer_int_sum, pointer_diff, - build_unary_op, mark_addressable, build_compound_expr, - build_static_cast, build_reinterpret_cast, build_const_cast, - build_c_cast, build_modify_expr, get_delta_difference, - build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with - 'ISO C++'. Fusion consecutive calls to diagnostic message routines - into a single one. - * typeck2.c (readonly_error, abstract_virtuals_error, - process_init_constructor, check_for_new_type): Likewise. - -2000-01-19 Mark Mitchell - - * tree.c (bot_manip): Set DECL_CONTEXT for newly created - VAR_DECLs. - -2000-01-18 Nathan Sidwell - - * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype. - (build_x_typeid): Likewise. - (get_tinfo_fn): Likewise. - (get_tinfo_fn_unused): Rename to ... - (get_tinfo_decl): ... here. - * rtti.c (build_headof): Replace logic error with assertion. - (get_tinfo_fn_dynamic): Rename to ... - (get_tinfo_decl_dynamic): ... here. Make static. Use - complete_type_or_else. - (build_x_typeid): Move into ... - (build_typeid): ... here. Adjust call to - get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify - throw_bad_typeid expression. - (get_tinfo_fn_unused): Rename to ... - (get_tinfo_decl): ... here. Adjust comment. - (get_tinfo_fn): Delete. - (tinfo_from_decl): New static function. - (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl. - (get_typeid): Use complete_type_or_else. - (build_dynamic_cast_1): Adjust calls to - get_tinfo_decl_dynamic. Simplify throw_bad_cast expression. - * parse.y (primary): Adjust call to build_typeid. - * except.c (build_eh_type_type_ref): Adjust call to - get_tinfo_decl. Mark as used. - * class.c (set_rtti_entry): Adjust call to get_tinfo_decl. - * decl2.c (build_expr_from_tree): Adjust call to build_typeid. - * parse.c: Regenerated. - -2000-01-17 Mark Mitchell - - * class.c (fixed_type_or_null): Don't clear NONNULL. Document - calling convention. - (resolves_to_fixed_type_p): Document calling convention. - * rtti.c (build_x_typeid): Initialize NONNULL. - - * cp-tree.h (build_shared_int_cst): New function. - * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity. - * class.c (modify_vtable_entry): Likewise. - (add_virtual_function): Split out code to generated shared - INTEGER_CSTs to build_share_int_cst. - (modify_all_vtables): Handle all the overridden functions here. - Add overridden functions from non-primary virtual bases to the - primary vtable. - (finish_struct_1): Adjust call to modify_all_vtables. Add - overridden functions from non-primary bases to the vtable. - * tree.c (build_shared_int_cst): New function. - - * cp-tree.h (scratchalloc): Remove. - (build_scratch_list): Likewise. - * call.c (convert_class_to_reference): Replace build_scratch_list - and build_expr_list with build_tree_list. - (add_candidate): Replace scratchalloc with expralloc. Note memory - leak. - (build_user_type_conversion_1): Replace build_scratch_list - and build_expr_list with build_tree_list. - (build_new_op): Likewise. - (build_op_delete_call): Likewise. - (convert_like): Likewise. - * cvt.c (ocp_convert): Likewise. - * decl.c (start_decl): Likewise. - (start_function): Likewise. - (finish_destructor_body): Likewise. - (maybe_build_cleanup_1): Likewise. - * decl2.c (reparse_decl_as_expr): Likewise. - * init.c (perform_member_init): Likewise. - (expand_cleanup_for_base): Likewise. - (build_builtin_delete_call): Likewise. - (build_new_1): Likewise. - (build_delete): Likewise. - * method.c (do_build_assign_ref): Likewise. - * parse.y (already_scoped_stmt): Likewise. - (nontrivial_exprlist): Likewise. - (net_initializer): Likewise. - (initlist): Likewise. - * parse.c: Regenerated. - * rtti.c (build_x_typeid): Likewise. - (build_dynamic_cast_1): Likewise. - * typeck.c (build_x_compound_expr): Likewise. - (build_static_cast): Likewise. - (build_modify_expr): Likewise. - - * cp-tree.h (DECL_VINDEX): Add documentation. - * class.c (build_vtable_entry): Likewise. - (start_vtable): Add comment. - (add_virtual_function): Replace pending_hard_virtuals with - overridden_virtuals and pending_virtuals with new_virtuals. - Replace redundant assignments with assertions. - (check_for_override): Add comment. - (check_bases_and_members): Replace pending_hard_virtuals with - overridden_virtuals and pending_virtuals with new_virtuals. - (create_vtbl_ptr): Likewise. - (layout_class_type): Likewise. - (finish_struct_1): Likewise. Add comments. - -2000-01-16 Mark Mitchell - - * class.c (finish_struct_1): Replace redundant code with - assertions. - - * cp-tree.h (flag_new_abi): Move. - (flag_use_cxa_atexit): Likewise. - (flag_honor_std): Likewise. - (flag_rtti): Likewise. - (vbase_offsets_in_vtable_p): Define. - (vptrs_present_everywhere_p): Likewise. - (TYPE_CONTAINS_VPTR_P): Likewise. - (dfs_walk_real): Declare. - * class.c (build_vbase_pointer_fields): Check - vbase_offsets_in_vtable_p. - (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in - BINFO_VPTR_FIELD. - (build_vbase_offset_vtbl_entries): Simplify. - (build_vbase_offset_vtbl_entries): Adjust. - (build_vbase_pointer): Add ability to look up vbase offsets in - vtable. - (start_vtable): New function. - (add_virtual_function): Use it. - (determine_primary_base): Use TYPE_CONTAINS_VPTR_P. - (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p. - (build_vtbl_initializer): Take the type of the complete object as - input. Use it to correctly calculate vbase offsets. - (dfs_finish_vtbls): Pass the complete type to - build_vtbl_initializer. - (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. - (create_vtable_ptr): Create a vtable even if there are no - new virtual functions, under the new ABI. - (finish_struct_1): Likewise. - (get_vfield_name): Use TYPE_CONTAINS_VPTR_P. - * decl.c (exapnd_static_init): Remove call to - preserve_initializer. - * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in - vtables. - * init.c (initialize_vtbl_ptrs): Initialize them in pre-order. - (expand_virtual_init): Use vbase_offsets_in_vtable_p. - (construct_virtual_bases): Don't initialize virtual base pointers - under the new ABI. - (build_aggr_init): Clean up comment. - (expand_aggr_init_1): Likewise. - * rtti.c (expand_class_desc): Store the virtual function table - index where the vbase offset lives in the offset field. - * search.c (dfs_walk_real): Make it global. - (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P. - * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD. - - * tinfo.h (USItype): Make it signed under the new ABI. - * tinfo.cc (convert_to_base): New function. Encapsulate base - conversion logic here. - (__class_type_info::do_upcast): Use it. - (__class_type_info::do_dyncast): Likewise. - (__class_type_info::do_find_public_subobj): Likewise. - - * init.c (construct_virtual_bases): Don't look up the addresses of - virtual bases at run-time. - - * class.c (build_vbase_pointer): Relocate. - (build_vbase_pointer_fields): Likewise. - (dfs_build_vbase_offset_vtbl_entries): Likewise. - (build_vbase_offset_vtbl_entries): Likewise. - - * decl.c (init_decl_processing): Complain if -fnew-abi - -fno-vtable-thunks is used. - - * decl2.c (lang_decode_option): Don't couple flag_honor_std to - flag_new_abi. - -2000-01-15 Mark Mitchell - - * cp-tree.h (num_extra_vtbl_entries): New function. - (size_extra_vtbl_entries): Likewise. - (dfs_vtable_path_unmark): Likewise. - (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise. - (dfs_vtable_path_marked_real_bases_queue_p): Likewise. - * class.c (num_extra_vtbl_entries): New function. - (size_extra_vtbl_entries): Likewise. - (dfs_build_vbase_offset_vtbl_entries): New function. - (build_vbase_offset_vtbl_entries): Likewise. - (build_vtbl_initializer): Use it. - (finish_struct_1): Adjust vtable sizes (using - num_extra_vtbl_entries). - * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a - THUNK_DECL is non-NULL before expanding it. - * init.c (expand_virtual_init): Adjust the vtable pointer by - size_extra_vtbl_entries before storing it. - * search.c (get_shared_vase_if_not_primary): Adjust prototype. - Handle TREE_LIST parameters here, not in the dfs_* functions. - (dfs_unmarked_real_bases_queue_p): Adjust. - (dfs_marked_real_bases_queue_p): Likewise. - (dfs_vtable_path_unmarked_real_bases_queue_p): New function. - (dfs_vtable_path_marked_real_bases_queue_p): New function. - (dfs_vtable_path_unmark): Likewise. - -2000-01-14 Mark Mitchell - - * optimize.c (copy_body_r): Clear the operand three of a - TARGET_EXPR when copying it. - -2000-01-14 Martin v. Löwis - - * method.c (build_decl_overload_real): Check whether we are in :: - before returning __builtin_new/delete. - -2000-01-13 Mark Mitchell - - * pt.c (tsubst_friend_function): Improve comment. - (instantiate_decl): Avoid crashing when a "nested" function is - instantiated from the top level. - - * dump.c (dqeueue_and_dump): Dump - DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION. - -2000-01-13 Kaveh R. Ghazi - - * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. - -2000-01-13 Nathan Sidwell - - * g++spec.c (lang_specific_driver): Add -fnew-abi if - ENABLE_NEW_GXX_ABI defined. - * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o, - opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o, - opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch. - -2000-01-12 Mark Mitchell - - * decl.c (start_cleanup_fn): Call pushdecl. - - * call.c (convert_class_to_reference): Fix typos. - (build_conditional_expr): Handle errors gracefully. - * class.c (push_nested_class): Likewise. - * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro. - (DECL_THIS_EXTERN): Use it. - (DECL_THIS_STATIC): Likewise. - * cvt.c (convert_to_void): Handle errors gracefully. - (build_expr_type_conversion): Likewise. - * decl.c (maybe_push_decl): Likewise. - (start_decl_1): Likewise. - (require_complete_types_for_parms): Likewise. - * parse.y (structsp): Likewise. - (base_class): Likewise. - * parse.c: Regenerated. - * pt.c (finish_member_template_decl): Likewise. - * typeck.c (decay_conversion): Likewise. - - * cp-tree.h (dfs_skip_vbases): New function. - (find_vbase_instance): Likewise. - * class.c (determine_primary_base): Allow a nearly empty base to - serve as a primary base class under the new ABI. - (get_class_offset_1): Rename to ... - (dfs_get_class_offset): ... this. Simplify. Don't issue error - messages here. - (get_class_offset): Use it. Issue error messages here. - (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to - find the right copies of virtual bases. - (fixup_vtable_deltas1): Rename to ... - (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual - bases as primary bases. - (fixup_vtable_deltas): Remove. - (override_one_vtable): Handle virtual bases as primary bases. - (merge_overrides): Likewise. - (finish_struct_1): Likewise. - (dump_class_hierarchy): Dump primary-ness of bases as well. - * search.c (mark_primary_bases): Use a pre-order traversal to - handle primary virtual bases. - (dfs_skip_vbases): New fiunction. - (expand_upcast_fixups): Adjust to handle primary virtual bases. - (fixup_virtual_upcast_offsets): Likewise. - (fixup_all_virtual_upcast_offsets): Likewise. - (dfs_find_vbase_instances): New function. - (find_vbase_instance): Likewise. - -2000-01-11 Mumit Khan - - * lex.c (DIR_SEPARATOR): Delete macro. - -2000-01-12 Gabriel Dos Reis - - * decl2.c (lang_decode_option): Handle automatic line wrapping - option. - -2000-01-11 Mark Mitchell - - * friend.c (do_friend): Don't resolve scopes when processing - template declarations, even if the qualifying scope doesn't - involve template parameters. - -2000-01-10 Mark Mitchell - - * class.c (dfs_modify_vtables_queue_p): Remove. - (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p - and dfs_marked_real_bases_queue_p instead of - dfs_modify_vtables_queue_p. - - * class.c (build_vbase_path): Simplify. - (dfs_propagate_binfo_offsets): New function. - (propagate_binfo_offsets): Use it. - (remove_base_field): Simplify. - (dfs_set_offset_for_vbases): Remove. - (dfs_set_offset_for_shared_vbases): New function. - (dfs_set_offset_for_unshared_vbases): Likewise. - (layout_virtual_bases): Use them. - (layout_basetypes): Don't call propagate_binfo_offsets. - * search.c (dfs_get_vbase_types): Clone completely fresh binfos - for the vbases. - - * class.c (build_base_field): New function, split out from ... - (build_base_fields): ... here. Use it. Allocate primary bases - first, under the new ABI. - (get_vtable_entry): Remove. - (remove_base_field): New function, split out from ... - (remove_base_fields): ... here. Adjust since primary bases come - first under the new ABI. - - * cp-tree.h (expand_direct_vtbls_init): Remove declaration. - (initialize_vtbl_ptrs): New function. - (expand_indirect_vtbls_init): Change prototype. - (convert_pointer_to_vbase): Declare. - * init.c (expand_direct_vtbls_init): Remove. - (dfs_initialize_vtbl_ptrs): New function. - (initialize_vtbl_ptrs): Likewise. - (emit_base_init): Use initialize_vtbl_ptrs. - * search.c (convert_pointer_to_vbase): Make it global. - (expand_indirect_vtbls_init): Remove vtable initialization code. - * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs. - - * class.c (dfs_finish_vtbls): New function. - (finish_vtbls): Use it. - (dump_class_hierarchy): New function. - - * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition. - (BINFO_VBASE_PRIMARY_P): New macro. - (BINFO_VIRTUALS): Add to documentation. - (SET_BINFO_PRIMARY_MARKED_P): Remove. - (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. - (dfs_mark_primary_bases_queue_p): Likewise. - (dfs_unmarked_real_bases_queue_p): New function. - (dfs_marked_real_bases_queue_p): Likewise. - * search.c (dfs_mark_primary_bases): Adjust. - (mark_primary_bases): Likewise. - (get_shared_vbase_if_not_primary): New function. - (dfs_unmarked_real_bases_queue_p): Likewise. - (dfs_marked_real_bases_queue_p): Likewise. - (dfs_get_pure_virtuals): Simplify. - (get_pure_virtuals): Likewise. - -2000-01-10 Kaveh R. Ghazi - - * lex.c: Include tm_p.h. - -2000-01-07 Nathan Sidwell - - * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro. - -2000-01-06 Jason Merrill - - * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT. - * pt.c (instantiate_decl): Defer comdat templates that might not be - needed. - - * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT. - * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT. - (finish_file): Likewise. - - * decl2.c (import_export_class): Undo 12/14 change. - - * error.c (dump_decl): operator new, not operatornew. - - * class.c (field_decl_cmp): A nontype is "greater" than a type. - * search.c (lookup_field_1): Look for the last field with the - desired name. - -2000-01-05 Nathan Sidwell - - * decl2.c (lookup_arg_dependent): Deal with FNS not being a - FUNCTION_DECL. - -2000-01-05 Nathan Sidwell - - * typeck.c (build_static_cast): Don't strip target qualifiers - when casting from a class. - -2000-01-04 Kaveh R. Ghazi - - * class.c (warn_hidden): Initialize variable `fndecl'. - -2000-01-03 Ulrich Drepper - - * decl.c (flag_isoc9x): New variable to be able to use code in - c-common.c. For now always zero. - -2000-01-03 Mark Mitchell - - * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. - * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN - or unshare_base_binfos for virtual bases here. - * search.c (dfs_get_vbase_types): Do it here. - (get_vbase_types): Adjust. - -2000-01-02 Mark Mitchell - - * cp-tree.h (CLASSTYPE_VFIELDS): Move definition. - (BINFO_PRIMARY_MARKED_P): Use flag 5. - (SET_BINFO_PRIMARY_MARKED_P): Likewise. - (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. - (unmark_primary_bases): Remove declaration. - (unmarkedp): Declare. - (dfs_vbase_unmark): Likewise. - * class.c (determine_primary_base): Return immediately if there - are no base classes. Call mark_primary_bases here. - (modify_all_direct_vtables): Remove. - (modify_all_indirect_vtables): Remove. - (dfs_modify_vtables_queue_p): New function. - (dfs_modify_vtables): New function. - (modify_all_vtables): Use them. - (build_base_fields): Build FIELD_DECLs for primary virtual base - classes. - (create_vtable_ptr): Don't call determine_primary_base here. - (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ... - (dfs_set_offset_for_vbases): ... this. - (layout_virtual_bases): Use it. - (layout_class_type): Call determine_primary_base here. - * search.c (unmarkedp): Make it global. - (shared_marked_p): Simplify. - (shared_unmarked_p): Likewise. - (dfs_primary_bases_queue_p): Remove. - (dfs_unmark_primary_bases): Likewise. - (unmark_primary_bases): Likewise. - (mark_primary_bases): Simplify. - (get_pure_virtuals): Don't call mark_primary_bases here. - (dfs_vbase_unmark): New function. - (get_vbase_types): Simplify. - - * class.c (struct base_info): Remove. - (determine_primary_base): Take has_virtual_p rather than a - base_info as input. Don't calculate max_has_virtual. - (finish_struct_bits): Remove max_has_virtual argument. - (create_vtable_ptr): Remove max_has_virtual_p argument. - (layout_virtual_bases): Remove max argument. - (layout_basetypes): Likewise. - (layout_class_type): Remove max_has_virtual_p argument. - (finish_struct_1): Remove max_has_virtual. - - * cp-tree.h (dfs_mark_primary_bases_queue_p): New function. - (layout_basetypes): Remove. - * class.c (propagate_binfo_offsets): Moved here from tree.c. - Update to handle primary virtual bases. - (remove_base_fields): New function, split out from - layout_basetypes. - (dfs_mark_primary_bases_and_set_vbase_offsets): New function. - (layout_virtual_bases): New function, split out from - layout_basetypes. Update to handle primary virtual bases. - (layout_basetypes): Moved here from tree.c. Use - remove_base_fields and layout_virtual_bases. - * search.c (dfs_mark_primary_bases_queue_p): New function. - (mark_primary_bases): Use it. - * tree.c (CEIL): Remove. - (propagate_binfo_offsets): Remove. - (layout_basetypes): Remove. - -2000-01-01 Mark Mitchell - - * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES. - (BINFO_PRIMARY_MARKED_P): New macro. - (SET_BINFO_PRIMARY_MARKED_P): Likewise. - (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. - (mark_primary_bases): New function. - (unmark_primary_bases): Likewise. - * search.c (get_abstract_virtuals_1): Remove. - (dfs_mark_primary_bases): New function. - (mark_primary_bases): Likewise. - (dfs_unmark_primary_bases): Likewise. - (unmark_primary_bases): Likewise. - (dfs_get_pure_virtuals): Likewise. - -2000-01-01 Mark Mitchell - - * cp-tree.h (skip_rtti_stuff): Adjust prototype. - * class.c (skip_rtti_stuff): Reorganize parameters and return value. - (modify_one_vtable): Adjust. - (fixup_vtable_deltas1): Likewise. - (override_one_vtable): Likewise. - * search.c (get_abstract_virtuals_1): Likewise. - (get_pure_virtuals): Likewise. - (expand_upcast_fixups): Likewise. - * tree.c (debug_binfo): Likewise. - - * class.c (build_vtable): Don't return a value. Don't rebuild - vtables for bases that have already been handled. - (prepare_fresh_vtable): Don't rebuild vtables for bases that have - already been handled. - (modify_one_vtable): Adjust accordingly. - (fixup_vtable_deltas1): Likewise. - (finish_struct_1): Likewise. - -2000-01-01 Martin v. Löwis - - * call.c (build_new_method_call): Also check destructors. - -See ChangeLog.2 for earlier changes. diff --git a/contrib/gcc/cp/ChangeLog.egcs b/contrib/gcc/cp/ChangeLog.egcs deleted file mode 100644 index ddefd5c..0000000 --- a/contrib/gcc/cp/ChangeLog.egcs +++ /dev/null @@ -1,4 +0,0 @@ -Wed Sep 10 16:39:26 1997 Jim Wilson - - * Make-lang.in (LN, LN_S): New macros, use where appropriate. - diff --git a/contrib/gcc/cp/lex.h b/contrib/gcc/cp/lex.h deleted file mode 100644 index 35c3503..0000000 --- a/contrib/gcc/cp/lex.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Define constants and variables for communication with the parser. - Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - Hacked by Michael Tiemann (tiemann@cygnus.com) - and by Brendan Kehoe (brendan@cygnus.com). - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GCC is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - - -#ifndef GCC_CP_LEX_H -#define GCC_CP_LEX_H - -#if 0 -/* Formerly, the RID_* values used as mask bits did not fit into a - single 32-bit word. Now they do, but let's preserve the old logic - in case they ever stop fitting again. -zw, 8 Aug 2000 */ - -/* The type that can represent all values of RIDBIT. */ -/* We assume that we can stick in at least 32 bits into this. */ -typedef struct { unsigned long idata[2]; } - RID_BIT_TYPE; - -/* Be careful, all these modify N twice. */ -#define RIDBIT_SETP(N, V) (((unsigned long)1 << (int) ((N)%32)) \ - & (V).idata[(N)/32]) -#define RIDBIT_NOTSETP(NN, VV) (! RIDBIT_SETP (NN, VV)) -#define RIDBIT_SET(N, V) do { \ - (V).idata[(N)/32] \ - |= ((unsigned long)1 << (int) ((N)%32)); \ - } while (0) -#define RIDBIT_RESET(N, V) do { \ - (V).idata[(N)/32] \ - &= ~((unsigned long)1 << (int) ((N)%32)); \ - } while (0) -#define RIDBIT_RESET_ALL(V) do { \ - (V).idata[0] = 0; \ - (V).idata[1] = 0; \ - } while (0) -#define RIDBIT_ANY_SET(V) ((V).idata[0] || (V).idata[1]) -#else -typedef unsigned long RID_BIT_TYPE; /* assumed at least 32 bits */ -#define RIDBIT_OF(R) ((unsigned long)1 << (int) (R)) - -#define RIDBIT_SETP(N, V) ((V) & RIDBIT_OF (N)) -#define RIDBIT_NOTSETP(N, V) (! ((V) & RIDBIT_OF (N))) -#define RIDBIT_ANY_SET(V) (V) - -#define RIDBIT_SET(N, V) do { (V) |= RIDBIT_OF (N); } while (0) -#define RIDBIT_RESET(N, V) do { (V) &= ~RIDBIT_OF (N); } while (0) -#define RIDBIT_RESET_ALL(V) do { (V) = 0; } while (0) -#endif - -#endif /* ! GCC_CP_LEX_H */ diff --git a/contrib/gcc/cplus-dem.c b/contrib/gcc/cplus-dem.c deleted file mode 100644 index f3c4464..0000000 --- a/contrib/gcc/cplus-dem.c +++ /dev/null @@ -1,4910 +0,0 @@ -/* Demangler for GNU C++ - Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - Written by James Clark (jjc@jclark.uucp) - Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling - Modified by Satish Pai (pai@apollo.hp.com) for HP demangling - -This file is part of the libiberty library. -Libiberty is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -In addition to the permissions in the GNU Library 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 Library Public License -restrictions do apply in other respects; for example, they cover -modification of the file, and distribution when not linked into a -combined executable.) - -Libiberty is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with libiberty; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* This file exports two functions; cplus_mangle_opname and cplus_demangle. - - This file imports xmalloc and xrealloc, which are like malloc and - realloc except that they generate a fatal error if there is no - available memory. */ - -/* This file lives in both GCC and libiberty. When making changes, please - try not to break either. */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "safe-ctype.h" - -#include -#include -#include - -#ifdef HAVE_STDLIB_H -#include -#else -char * malloc (); -char * realloc (); -#endif - -#include -#undef CURRENT_DEMANGLING_STYLE -#define CURRENT_DEMANGLING_STYLE work->options - -#include "libiberty.h" - -static char *ada_demangle PARAMS ((const char *, int)); - -#define min(X,Y) (((X) < (Y)) ? (X) : (Y)) - -/* A value at least one greater than the maximum number of characters - that will be output when using the `%d' format with `printf'. */ -#define INTBUF_SIZE 32 - -extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN; - -/* In order to allow a single demangler executable to demangle strings - using various common values of CPLUS_MARKER, as well as any specific - one set at compile time, we maintain a string containing all the - commonly used ones, and check to see if the marker we are looking for - is in that string. CPLUS_MARKER is usually '$' on systems where the - assembler can deal with that. Where the assembler can't, it's usually - '.' (but on many systems '.' is used for other things). We put the - current defined CPLUS_MARKER first (which defaults to '$'), followed - by the next most common value, followed by an explicit '$' in case - the value of CPLUS_MARKER is not '$'. - - We could avoid this if we could just get g++ to tell us what the actual - cplus marker character is as part of the debug information, perhaps by - ensuring that it is the character that terminates the gcc_compiled - marker symbol (FIXME). */ - -#if !defined (CPLUS_MARKER) -#define CPLUS_MARKER '$' -#endif - -enum demangling_styles current_demangling_style = auto_demangling; - -static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' }; - -static char char_str[2] = { '\000', '\000' }; - -void -set_cplus_marker_for_demangling (ch) - int ch; -{ - cplus_markers[0] = ch; -} - -typedef struct string /* Beware: these aren't required to be */ -{ /* '\0' terminated. */ - char *b; /* pointer to start of string */ - char *p; /* pointer after last character */ - char *e; /* pointer after end of allocated space */ -} string; - -/* Stuff that is shared between sub-routines. - Using a shared structure allows cplus_demangle to be reentrant. */ - -struct work_stuff -{ - int options; - char **typevec; - char **ktypevec; - char **btypevec; - int numk; - int numb; - int ksize; - int bsize; - int ntypes; - int typevec_size; - int constructor; - int destructor; - int static_type; /* A static member function */ - int temp_start; /* index in demangled to start of template args */ - int type_quals; /* The type qualifiers. */ - int dllimported; /* Symbol imported from a PE DLL */ - char **tmpl_argvec; /* Template function arguments. */ - int ntmpl_args; /* The number of template function arguments. */ - int forgetting_types; /* Nonzero if we are not remembering the types - we see. */ - string* previous_argument; /* The last function argument demangled. */ - int nrepeats; /* The number of times to repeat the previous - argument. */ -}; - -#define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI) -#define PRINT_ARG_TYPES (work -> options & DMGL_PARAMS) - -static const struct optable -{ - const char *const in; - const char *const out; - const int flags; -} optable[] = { - {"nw", " new", DMGL_ANSI}, /* new (1.92, ansi) */ - {"dl", " delete", DMGL_ANSI}, /* new (1.92, ansi) */ - {"new", " new", 0}, /* old (1.91, and 1.x) */ - {"delete", " delete", 0}, /* old (1.91, and 1.x) */ - {"vn", " new []", DMGL_ANSI}, /* GNU, pending ansi */ - {"vd", " delete []", DMGL_ANSI}, /* GNU, pending ansi */ - {"as", "=", DMGL_ANSI}, /* ansi */ - {"ne", "!=", DMGL_ANSI}, /* old, ansi */ - {"eq", "==", DMGL_ANSI}, /* old, ansi */ - {"ge", ">=", DMGL_ANSI}, /* old, ansi */ - {"gt", ">", DMGL_ANSI}, /* old, ansi */ - {"le", "<=", DMGL_ANSI}, /* old, ansi */ - {"lt", "<", DMGL_ANSI}, /* old, ansi */ - {"plus", "+", 0}, /* old */ - {"pl", "+", DMGL_ANSI}, /* ansi */ - {"apl", "+=", DMGL_ANSI}, /* ansi */ - {"minus", "-", 0}, /* old */ - {"mi", "-", DMGL_ANSI}, /* ansi */ - {"ami", "-=", DMGL_ANSI}, /* ansi */ - {"mult", "*", 0}, /* old */ - {"ml", "*", DMGL_ANSI}, /* ansi */ - {"amu", "*=", DMGL_ANSI}, /* ansi (ARM/Lucid) */ - {"aml", "*=", DMGL_ANSI}, /* ansi (GNU/g++) */ - {"convert", "+", 0}, /* old (unary +) */ - {"negate", "-", 0}, /* old (unary -) */ - {"trunc_mod", "%", 0}, /* old */ - {"md", "%", DMGL_ANSI}, /* ansi */ - {"amd", "%=", DMGL_ANSI}, /* ansi */ - {"trunc_div", "/", 0}, /* old */ - {"dv", "/", DMGL_ANSI}, /* ansi */ - {"adv", "/=", DMGL_ANSI}, /* ansi */ - {"truth_andif", "&&", 0}, /* old */ - {"aa", "&&", DMGL_ANSI}, /* ansi */ - {"truth_orif", "||", 0}, /* old */ - {"oo", "||", DMGL_ANSI}, /* ansi */ - {"truth_not", "!", 0}, /* old */ - {"nt", "!", DMGL_ANSI}, /* ansi */ - {"postincrement","++", 0}, /* old */ - {"pp", "++", DMGL_ANSI}, /* ansi */ - {"postdecrement","--", 0}, /* old */ - {"mm", "--", DMGL_ANSI}, /* ansi */ - {"bit_ior", "|", 0}, /* old */ - {"or", "|", DMGL_ANSI}, /* ansi */ - {"aor", "|=", DMGL_ANSI}, /* ansi */ - {"bit_xor", "^", 0}, /* old */ - {"er", "^", DMGL_ANSI}, /* ansi */ - {"aer", "^=", DMGL_ANSI}, /* ansi */ - {"bit_and", "&", 0}, /* old */ - {"ad", "&", DMGL_ANSI}, /* ansi */ - {"aad", "&=", DMGL_ANSI}, /* ansi */ - {"bit_not", "~", 0}, /* old */ - {"co", "~", DMGL_ANSI}, /* ansi */ - {"call", "()", 0}, /* old */ - {"cl", "()", DMGL_ANSI}, /* ansi */ - {"alshift", "<<", 0}, /* old */ - {"ls", "<<", DMGL_ANSI}, /* ansi */ - {"als", "<<=", DMGL_ANSI}, /* ansi */ - {"arshift", ">>", 0}, /* old */ - {"rs", ">>", DMGL_ANSI}, /* ansi */ - {"ars", ">>=", DMGL_ANSI}, /* ansi */ - {"component", "->", 0}, /* old */ - {"pt", "->", DMGL_ANSI}, /* ansi; Lucid C++ form */ - {"rf", "->", DMGL_ANSI}, /* ansi; ARM/GNU form */ - {"indirect", "*", 0}, /* old */ - {"method_call", "->()", 0}, /* old */ - {"addr", "&", 0}, /* old (unary &) */ - {"array", "[]", 0}, /* old */ - {"vc", "[]", DMGL_ANSI}, /* ansi */ - {"compound", ", ", 0}, /* old */ - {"cm", ", ", DMGL_ANSI}, /* ansi */ - {"cond", "?:", 0}, /* old */ - {"cn", "?:", DMGL_ANSI}, /* pseudo-ansi */ - {"max", ">?", 0}, /* old */ - {"mx", ">?", DMGL_ANSI}, /* pseudo-ansi */ - {"min", "*", DMGL_ANSI}, /* ansi */ - {"sz", "sizeof ", DMGL_ANSI} /* pseudo-ansi */ -}; - -/* These values are used to indicate the various type varieties. - They are all non-zero so that they can be used as `success' - values. */ -typedef enum type_kind_t -{ - tk_none, - tk_pointer, - tk_reference, - tk_integral, - tk_bool, - tk_char, - tk_real -} type_kind_t; - -const struct demangler_engine libiberty_demanglers[] = -{ - { - NO_DEMANGLING_STYLE_STRING, - no_demangling, - "Demangling disabled" - } - , - { - AUTO_DEMANGLING_STYLE_STRING, - auto_demangling, - "Automatic selection based on executable" - } - , - { - GNU_DEMANGLING_STYLE_STRING, - gnu_demangling, - "GNU (g++) style demangling" - } - , - { - LUCID_DEMANGLING_STYLE_STRING, - lucid_demangling, - "Lucid (lcc) style demangling" - } - , - { - ARM_DEMANGLING_STYLE_STRING, - arm_demangling, - "ARM style demangling" - } - , - { - HP_DEMANGLING_STYLE_STRING, - hp_demangling, - "HP (aCC) style demangling" - } - , - { - EDG_DEMANGLING_STYLE_STRING, - edg_demangling, - "EDG style demangling" - } - , - { - GNU_V3_DEMANGLING_STYLE_STRING, - gnu_v3_demangling, - "GNU (g++) V3 ABI-style demangling" - } - , - { - JAVA_DEMANGLING_STYLE_STRING, - java_demangling, - "Java style demangling" - } - , - { - GNAT_DEMANGLING_STYLE_STRING, - gnat_demangling, - "GNAT style demangling" - } - , - { - NULL, unknown_demangling, NULL - } -}; - -#define STRING_EMPTY(str) ((str) -> b == (str) -> p) -#define APPEND_BLANK(str) {if (!STRING_EMPTY(str)) \ - string_append(str, " ");} -#define LEN_STRING(str) ( (STRING_EMPTY(str))?0:((str)->p - (str)->b)) - -/* The scope separator appropriate for the language being demangled. */ - -#define SCOPE_STRING(work) ((work->options & DMGL_JAVA) ? "." : "::") - -#define ARM_VTABLE_STRING "__vtbl__" /* Lucid/ARM virtual table prefix */ -#define ARM_VTABLE_STRLEN 8 /* strlen (ARM_VTABLE_STRING) */ - -/* Prototypes for local functions */ - -static void -delete_work_stuff PARAMS ((struct work_stuff *)); - -static void -delete_non_B_K_work_stuff PARAMS ((struct work_stuff *)); - -static char * -mop_up PARAMS ((struct work_stuff *, string *, int)); - -static void -squangle_mop_up PARAMS ((struct work_stuff *)); - -static void -work_stuff_copy_to_from PARAMS ((struct work_stuff *, struct work_stuff *)); - -#if 0 -static int -demangle_method_args PARAMS ((struct work_stuff *, const char **, string *)); -#endif - -static char * -internal_cplus_demangle PARAMS ((struct work_stuff *, const char *)); - -static int -demangle_template_template_parm PARAMS ((struct work_stuff *work, - const char **, string *)); - -static int -demangle_template PARAMS ((struct work_stuff *work, const char **, string *, - string *, int, int)); - -static int -arm_pt PARAMS ((struct work_stuff *, const char *, int, const char **, - const char **)); - -static int -demangle_class_name PARAMS ((struct work_stuff *, const char **, string *)); - -static int -demangle_qualified PARAMS ((struct work_stuff *, const char **, string *, - int, int)); - -static int -demangle_class PARAMS ((struct work_stuff *, const char **, string *)); - -static int -demangle_fund_type PARAMS ((struct work_stuff *, const char **, string *)); - -static int -demangle_signature PARAMS ((struct work_stuff *, const char **, string *)); - -static int -demangle_prefix PARAMS ((struct work_stuff *, const char **, string *)); - -static int -gnu_special PARAMS ((struct work_stuff *, const char **, string *)); - -static int -arm_special PARAMS ((const char **, string *)); - -static void -string_need PARAMS ((string *, int)); - -static void -string_delete PARAMS ((string *)); - -static void -string_init PARAMS ((string *)); - -static void -string_clear PARAMS ((string *)); - -#if 0 -static int -string_empty PARAMS ((string *)); -#endif - -static void -string_append PARAMS ((string *, const char *)); - -static void -string_appends PARAMS ((string *, string *)); - -static void -string_appendn PARAMS ((string *, const char *, int)); - -static void -string_prepend PARAMS ((string *, const char *)); - -static void -string_prependn PARAMS ((string *, const char *, int)); - -static void -string_append_template_idx PARAMS ((string *, int)); - -static int -get_count PARAMS ((const char **, int *)); - -static int -consume_count PARAMS ((const char **)); - -static int -consume_count_with_underscores PARAMS ((const char**)); - -static int -demangle_args PARAMS ((struct work_stuff *, const char **, string *)); - -static int -demangle_nested_args PARAMS ((struct work_stuff*, const char**, string*)); - -static int -do_type PARAMS ((struct work_stuff *, const char **, string *)); - -static int -do_arg PARAMS ((struct work_stuff *, const char **, string *)); - -static void -demangle_function_name PARAMS ((struct work_stuff *, const char **, string *, - const char *)); - -static int -iterate_demangle_function PARAMS ((struct work_stuff *, - const char **, string *, const char *)); - -static void -remember_type PARAMS ((struct work_stuff *, const char *, int)); - -static void -remember_Btype PARAMS ((struct work_stuff *, const char *, int, int)); - -static int -register_Btype PARAMS ((struct work_stuff *)); - -static void -remember_Ktype PARAMS ((struct work_stuff *, const char *, int)); - -static void -forget_types PARAMS ((struct work_stuff *)); - -static void -forget_B_and_K_types PARAMS ((struct work_stuff *)); - -static void -string_prepends PARAMS ((string *, string *)); - -static int -demangle_template_value_parm PARAMS ((struct work_stuff*, const char**, - string*, type_kind_t)); - -static int -do_hpacc_template_const_value PARAMS ((struct work_stuff *, const char **, string *)); - -static int -do_hpacc_template_literal PARAMS ((struct work_stuff *, const char **, string *)); - -static int -snarf_numeric_literal PARAMS ((const char **, string *)); - -/* There is a TYPE_QUAL value for each type qualifier. They can be - combined by bitwise-or to form the complete set of qualifiers for a - type. */ - -#define TYPE_UNQUALIFIED 0x0 -#define TYPE_QUAL_CONST 0x1 -#define TYPE_QUAL_VOLATILE 0x2 -#define TYPE_QUAL_RESTRICT 0x4 - -static int -code_for_qualifier PARAMS ((int)); - -static const char* -qualifier_string PARAMS ((int)); - -static const char* -demangle_qualifier PARAMS ((int)); - -static int -demangle_expression PARAMS ((struct work_stuff *, const char **, string *, - type_kind_t)); - -static int -demangle_integral_value PARAMS ((struct work_stuff *, const char **, - string *)); - -static int -demangle_real_value PARAMS ((struct work_stuff *, const char **, string *)); - -static void -demangle_arm_hp_template PARAMS ((struct work_stuff *, const char **, int, - string *)); - -static void -recursively_demangle PARAMS ((struct work_stuff *, const char **, string *, - int)); - -static void -grow_vect PARAMS ((char **, size_t *, size_t, int)); - -/* Translate count to integer, consuming tokens in the process. - Conversion terminates on the first non-digit character. - - Trying to consume something that isn't a count results in no - consumption of input and a return of -1. - - Overflow consumes the rest of the digits, and returns -1. */ - -static int -consume_count (type) - const char **type; -{ - int count = 0; - - if (! ISDIGIT ((unsigned char)**type)) - return -1; - - while (ISDIGIT ((unsigned char)**type)) - { - count *= 10; - - /* Check for overflow. - We assume that count is represented using two's-complement; - no power of two is divisible by ten, so if an overflow occurs - when multiplying by ten, the result will not be a multiple of - ten. */ - if ((count % 10) != 0) - { - while (ISDIGIT ((unsigned char) **type)) - (*type)++; - return -1; - } - - count += **type - '0'; - (*type)++; - } - - if (count < 0) - count = -1; - - return (count); -} - - -/* Like consume_count, but for counts that are preceded and followed - by '_' if they are greater than 10. Also, -1 is returned for - failure, since 0 can be a valid value. */ - -static int -consume_count_with_underscores (mangled) - const char **mangled; -{ - int idx; - - if (**mangled == '_') - { - (*mangled)++; - if (!ISDIGIT ((unsigned char)**mangled)) - return -1; - - idx = consume_count (mangled); - if (**mangled != '_') - /* The trailing underscore was missing. */ - return -1; - - (*mangled)++; - } - else - { - if (**mangled < '0' || **mangled > '9') - return -1; - - idx = **mangled - '0'; - (*mangled)++; - } - - return idx; -} - -/* C is the code for a type-qualifier. Return the TYPE_QUAL - corresponding to this qualifier. */ - -static int -code_for_qualifier (c) - int c; -{ - switch (c) - { - case 'C': - return TYPE_QUAL_CONST; - - case 'V': - return TYPE_QUAL_VOLATILE; - - case 'u': - return TYPE_QUAL_RESTRICT; - - default: - break; - } - - /* C was an invalid qualifier. */ - abort (); -} - -/* Return the string corresponding to the qualifiers given by - TYPE_QUALS. */ - -static const char* -qualifier_string (type_quals) - int type_quals; -{ - switch (type_quals) - { - case TYPE_UNQUALIFIED: - return ""; - - case TYPE_QUAL_CONST: - return "const"; - - case TYPE_QUAL_VOLATILE: - return "volatile"; - - case TYPE_QUAL_RESTRICT: - return "__restrict"; - - case TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE: - return "const volatile"; - - case TYPE_QUAL_CONST | TYPE_QUAL_RESTRICT: - return "const __restrict"; - - case TYPE_QUAL_VOLATILE | TYPE_QUAL_RESTRICT: - return "volatile __restrict"; - - case TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE | TYPE_QUAL_RESTRICT: - return "const volatile __restrict"; - - default: - break; - } - - /* TYPE_QUALS was an invalid qualifier set. */ - abort (); -} - -/* C is the code for a type-qualifier. Return the string - corresponding to this qualifier. This function should only be - called with a valid qualifier code. */ - -static const char* -demangle_qualifier (c) - int c; -{ - return qualifier_string (code_for_qualifier (c)); -} - -int -cplus_demangle_opname (opname, result, options) - const char *opname; - char *result; - int options; -{ - int len, len1, ret; - string type; - struct work_stuff work[1]; - const char *tem; - - len = strlen(opname); - result[0] = '\0'; - ret = 0; - memset ((char *) work, 0, sizeof (work)); - work->options = options; - - if (opname[0] == '_' && opname[1] == '_' - && opname[2] == 'o' && opname[3] == 'p') - { - /* ANSI. */ - /* type conversion operator. */ - tem = opname + 4; - if (do_type (work, &tem, &type)) - { - strcat (result, "operator "); - strncat (result, type.b, type.p - type.b); - string_delete (&type); - ret = 1; - } - } - else if (opname[0] == '_' && opname[1] == '_' - && ISLOWER((unsigned char)opname[2]) - && ISLOWER((unsigned char)opname[3])) - { - if (opname[4] == '\0') - { - /* Operator. */ - size_t i; - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - if (strlen (optable[i].in) == 2 - && memcmp (optable[i].in, opname + 2, 2) == 0) - { - strcat (result, "operator"); - strcat (result, optable[i].out); - ret = 1; - break; - } - } - } - else - { - if (opname[2] == 'a' && opname[5] == '\0') - { - /* Assignment. */ - size_t i; - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - if (strlen (optable[i].in) == 3 - && memcmp (optable[i].in, opname + 2, 3) == 0) - { - strcat (result, "operator"); - strcat (result, optable[i].out); - ret = 1; - break; - } - } - } - } - } - else if (len >= 3 - && opname[0] == 'o' - && opname[1] == 'p' - && strchr (cplus_markers, opname[2]) != NULL) - { - /* see if it's an assignment expression */ - if (len >= 10 /* op$assign_ */ - && memcmp (opname + 3, "assign_", 7) == 0) - { - size_t i; - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - len1 = len - 10; - if ((int) strlen (optable[i].in) == len1 - && memcmp (optable[i].in, opname + 10, len1) == 0) - { - strcat (result, "operator"); - strcat (result, optable[i].out); - strcat (result, "="); - ret = 1; - break; - } - } - } - else - { - size_t i; - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - len1 = len - 3; - if ((int) strlen (optable[i].in) == len1 - && memcmp (optable[i].in, opname + 3, len1) == 0) - { - strcat (result, "operator"); - strcat (result, optable[i].out); - ret = 1; - break; - } - } - } - } - else if (len >= 5 && memcmp (opname, "type", 4) == 0 - && strchr (cplus_markers, opname[4]) != NULL) - { - /* type conversion operator */ - tem = opname + 5; - if (do_type (work, &tem, &type)) - { - strcat (result, "operator "); - strncat (result, type.b, type.p - type.b); - string_delete (&type); - ret = 1; - } - } - squangle_mop_up (work); - return ret; - -} - -/* Takes operator name as e.g. "++" and returns mangled - operator name (e.g. "postincrement_expr"), or NULL if not found. - - If OPTIONS & DMGL_ANSI == 1, return the ANSI name; - if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */ - -const char * -cplus_mangle_opname (opname, options) - const char *opname; - int options; -{ - size_t i; - int len; - - len = strlen (opname); - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - if ((int) strlen (optable[i].out) == len - && (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI) - && memcmp (optable[i].out, opname, len) == 0) - return optable[i].in; - } - return (0); -} - -/* Add a routine to set the demangling style to be sure it is valid and - allow for any demangler initialization that maybe necessary. */ - -enum demangling_styles -cplus_demangle_set_style (style) - enum demangling_styles style; -{ - const struct demangler_engine *demangler = libiberty_demanglers; - - for (; demangler->demangling_style != unknown_demangling; ++demangler) - if (style == demangler->demangling_style) - { - current_demangling_style = style; - return current_demangling_style; - } - - return unknown_demangling; -} - -/* Do string name to style translation */ - -enum demangling_styles -cplus_demangle_name_to_style (name) - const char *name; -{ - const struct demangler_engine *demangler = libiberty_demanglers; - - for (; demangler->demangling_style != unknown_demangling; ++demangler) - if (strcmp (name, demangler->demangling_style_name) == 0) - return demangler->demangling_style; - - return unknown_demangling; -} - -/* char *cplus_demangle (const char *mangled, int options) - - If MANGLED is a mangled function name produced by GNU C++, then - a pointer to a @code{malloc}ed string giving a C++ representation - of the name will be returned; otherwise NULL will be returned. - It is the caller's responsibility to free the string which - is returned. - - The OPTIONS arg may contain one or more of the following bits: - - DMGL_ANSI ANSI qualifiers such as `const' and `void' are - included. - DMGL_PARAMS Function parameters are included. - - For example, - - cplus_demangle ("foo__1Ai", DMGL_PARAMS) => "A::foo(int)" - cplus_demangle ("foo__1Ai", DMGL_PARAMS | DMGL_ANSI) => "A::foo(int)" - cplus_demangle ("foo__1Ai", 0) => "A::foo" - - cplus_demangle ("foo__1Afe", DMGL_PARAMS) => "A::foo(float,...)" - cplus_demangle ("foo__1Afe", DMGL_PARAMS | DMGL_ANSI)=> "A::foo(float,...)" - cplus_demangle ("foo__1Afe", 0) => "A::foo" - - Note that any leading underscores, or other such characters prepended by - the compilation system, are presumed to have already been stripped from - MANGLED. */ - -char * -cplus_demangle (mangled, options) - const char *mangled; - int options; -{ - char *ret; - struct work_stuff work[1]; - - if (current_demangling_style == no_demangling) - return xstrdup (mangled); - - memset ((char *) work, 0, sizeof (work)); - work->options = options; - if ((work->options & DMGL_STYLE_MASK) == 0) - work->options |= (int) current_demangling_style & DMGL_STYLE_MASK; - - /* The V3 ABI demangling is implemented elsewhere. */ - if (GNU_V3_DEMANGLING || AUTO_DEMANGLING) - { - ret = cplus_demangle_v3 (mangled, work->options); - if (ret || GNU_V3_DEMANGLING) - return ret; - } - - if (JAVA_DEMANGLING) - { - ret = java_demangle_v3 (mangled); - if (ret) - return ret; - } - - if (GNAT_DEMANGLING) - return ada_demangle(mangled,options); - - ret = internal_cplus_demangle (work, mangled); - squangle_mop_up (work); - return (ret); -} - - -/* Assuming *OLD_VECT points to an array of *SIZE objects of size - ELEMENT_SIZE, grow it to contain at least MIN_SIZE objects, - updating *OLD_VECT and *SIZE as necessary. */ - -static void -grow_vect (old_vect, size, min_size, element_size) - char **old_vect; - size_t *size; - size_t min_size; - int element_size; -{ - if (*size < min_size) - { - *size *= 2; - if (*size < min_size) - *size = min_size; - *old_vect = (void *) xrealloc (*old_vect, *size * element_size); - } -} - -/* Demangle ada names: - 1. Discard final __{DIGIT}+ or ${DIGIT}+ - 2. Convert other instances of embedded "__" to `.'. - 3. Discard leading _ada_. - 4. Remove everything after first ___ if it is followed by 'X'. - 5. Put symbols that should be suppressed in <...> brackets. - The resulting string is valid until the next call of ada_demangle. */ - -static char * -ada_demangle (mangled, option) - const char *mangled; - int option ATTRIBUTE_UNUSED; -{ - int i, j; - int len0; - const char* p; - char *demangled = NULL; - int at_start_name; - int changed; - size_t demangled_size = 0; - - changed = 0; - - if (strncmp (mangled, "_ada_", 5) == 0) - { - mangled += 5; - changed = 1; - } - - if (mangled[0] == '_' || mangled[0] == '<') - goto Suppress; - - p = strstr (mangled, "___"); - if (p == NULL) - len0 = strlen (mangled); - else - { - if (p[3] == 'X') - { - len0 = p - mangled; - changed = 1; - } - else - goto Suppress; - } - - /* Make demangled big enough for possible expansion by operator name. */ - grow_vect (&demangled, - &demangled_size, 2 * len0 + 1, - sizeof (char)); - - if (ISDIGIT ((unsigned char) mangled[len0 - 1])) { - for (i = len0 - 2; i >= 0 && ISDIGIT ((unsigned char) mangled[i]); i -= 1) - ; - if (i > 1 && mangled[i] == '_' && mangled[i - 1] == '_') - { - len0 = i - 1; - changed = 1; - } - else if (mangled[i] == '$') - { - len0 = i; - changed = 1; - } - } - - for (i = 0, j = 0; i < len0 && ! ISALPHA ((unsigned char)mangled[i]); - i += 1, j += 1) - demangled[j] = mangled[i]; - - at_start_name = 1; - while (i < len0) - { - at_start_name = 0; - - if (i < len0 - 2 && mangled[i] == '_' && mangled[i + 1] == '_') - { - demangled[j] = '.'; - changed = at_start_name = 1; - i += 2; j += 1; - } - else - { - demangled[j] = mangled[i]; - i += 1; j += 1; - } - } - demangled[j] = '\000'; - - for (i = 0; demangled[i] != '\0'; i += 1) - if (ISUPPER ((unsigned char)demangled[i]) || demangled[i] == ' ') - goto Suppress; - - if (! changed) - return NULL; - else - return demangled; - - Suppress: - grow_vect (&demangled, - &demangled_size, strlen (mangled) + 3, - sizeof (char)); - - if (mangled[0] == '<') - strcpy (demangled, mangled); - else - sprintf (demangled, "<%s>", mangled); - - return demangled; -} - -/* This function performs most of what cplus_demangle use to do, but - to be able to demangle a name with a B, K or n code, we need to - have a longer term memory of what types have been seen. The original - now initializes and cleans up the squangle code info, while internal - calls go directly to this routine to avoid resetting that info. */ - -static char * -internal_cplus_demangle (work, mangled) - struct work_stuff *work; - const char *mangled; -{ - - string decl; - int success = 0; - char *demangled = NULL; - int s1, s2, s3, s4; - s1 = work->constructor; - s2 = work->destructor; - s3 = work->static_type; - s4 = work->type_quals; - work->constructor = work->destructor = 0; - work->type_quals = TYPE_UNQUALIFIED; - work->dllimported = 0; - - if ((mangled != NULL) && (*mangled != '\0')) - { - string_init (&decl); - - /* First check to see if gnu style demangling is active and if the - string to be demangled contains a CPLUS_MARKER. If so, attempt to - recognize one of the gnu special forms rather than looking for a - standard prefix. In particular, don't worry about whether there - is a "__" string in the mangled string. Consider "_$_5__foo" for - example. */ - - if ((AUTO_DEMANGLING || GNU_DEMANGLING)) - { - success = gnu_special (work, &mangled, &decl); - } - if (!success) - { - success = demangle_prefix (work, &mangled, &decl); - } - if (success && (*mangled != '\0')) - { - success = demangle_signature (work, &mangled, &decl); - } - if (work->constructor == 2) - { - string_prepend (&decl, "global constructors keyed to "); - work->constructor = 0; - } - else if (work->destructor == 2) - { - string_prepend (&decl, "global destructors keyed to "); - work->destructor = 0; - } - else if (work->dllimported == 1) - { - string_prepend (&decl, "import stub for "); - work->dllimported = 0; - } - demangled = mop_up (work, &decl, success); - } - work->constructor = s1; - work->destructor = s2; - work->static_type = s3; - work->type_quals = s4; - return demangled; -} - - -/* Clear out and squangling related storage */ -static void -squangle_mop_up (work) - struct work_stuff *work; -{ - /* clean up the B and K type mangling types. */ - forget_B_and_K_types (work); - if (work -> btypevec != NULL) - { - free ((char *) work -> btypevec); - } - if (work -> ktypevec != NULL) - { - free ((char *) work -> ktypevec); - } -} - - -/* Copy the work state and storage. */ - -static void -work_stuff_copy_to_from (to, from) - struct work_stuff *to; - struct work_stuff *from; -{ - int i; - - delete_work_stuff (to); - - /* Shallow-copy scalars. */ - memcpy (to, from, sizeof (*to)); - - /* Deep-copy dynamic storage. */ - if (from->typevec_size) - to->typevec - = (char **) xmalloc (from->typevec_size * sizeof (to->typevec[0])); - - for (i = 0; i < from->ntypes; i++) - { - int len = strlen (from->typevec[i]) + 1; - - to->typevec[i] = xmalloc (len); - memcpy (to->typevec[i], from->typevec[i], len); - } - - if (from->ksize) - to->ktypevec - = (char **) xmalloc (from->ksize * sizeof (to->ktypevec[0])); - - for (i = 0; i < from->numk; i++) - { - int len = strlen (from->ktypevec[i]) + 1; - - to->ktypevec[i] = xmalloc (len); - memcpy (to->ktypevec[i], from->ktypevec[i], len); - } - - if (from->bsize) - to->btypevec - = (char **) xmalloc (from->bsize * sizeof (to->btypevec[0])); - - for (i = 0; i < from->numb; i++) - { - int len = strlen (from->btypevec[i]) + 1; - - to->btypevec[i] = xmalloc (len); - memcpy (to->btypevec[i], from->btypevec[i], len); - } - - if (from->ntmpl_args) - to->tmpl_argvec - = (char **) xmalloc (from->ntmpl_args * sizeof (to->tmpl_argvec[0])); - - for (i = 0; i < from->ntmpl_args; i++) - { - int len = strlen (from->tmpl_argvec[i]) + 1; - - to->tmpl_argvec[i] = xmalloc (len); - memcpy (to->tmpl_argvec[i], from->tmpl_argvec[i], len); - } - - if (from->previous_argument) - { - to->previous_argument = (string*) xmalloc (sizeof (string)); - string_init (to->previous_argument); - string_appends (to->previous_argument, from->previous_argument); - } -} - - -/* Delete dynamic stuff in work_stuff that is not to be re-used. */ - -static void -delete_non_B_K_work_stuff (work) - struct work_stuff *work; -{ - /* Discard the remembered types, if any. */ - - forget_types (work); - if (work -> typevec != NULL) - { - free ((char *) work -> typevec); - work -> typevec = NULL; - work -> typevec_size = 0; - } - if (work->tmpl_argvec) - { - int i; - - for (i = 0; i < work->ntmpl_args; i++) - if (work->tmpl_argvec[i]) - free ((char*) work->tmpl_argvec[i]); - - free ((char*) work->tmpl_argvec); - work->tmpl_argvec = NULL; - } - if (work->previous_argument) - { - string_delete (work->previous_argument); - free ((char*) work->previous_argument); - work->previous_argument = NULL; - } -} - - -/* Delete all dynamic storage in work_stuff. */ -static void -delete_work_stuff (work) - struct work_stuff *work; -{ - delete_non_B_K_work_stuff (work); - squangle_mop_up (work); -} - - -/* Clear out any mangled storage */ - -static char * -mop_up (work, declp, success) - struct work_stuff *work; - string *declp; - int success; -{ - char *demangled = NULL; - - delete_non_B_K_work_stuff (work); - - /* If demangling was successful, ensure that the demangled string is null - terminated and return it. Otherwise, free the demangling decl. */ - - if (!success) - { - string_delete (declp); - } - else - { - string_appendn (declp, "", 1); - demangled = declp->b; - } - return (demangled); -} - -/* - -LOCAL FUNCTION - - demangle_signature -- demangle the signature part of a mangled name - -SYNOPSIS - - static int - demangle_signature (struct work_stuff *work, const char **mangled, - string *declp); - -DESCRIPTION - - Consume and demangle the signature portion of the mangled name. - - DECLP is the string where demangled output is being built. At - entry it contains the demangled root name from the mangled name - prefix. I.E. either a demangled operator name or the root function - name. In some special cases, it may contain nothing. - - *MANGLED points to the current unconsumed location in the mangled - name. As tokens are consumed and demangling is performed, the - pointer is updated to continuously point at the next token to - be consumed. - - Demangling GNU style mangled names is nasty because there is no - explicit token that marks the start of the outermost function - argument list. */ - -static int -demangle_signature (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - int success = 1; - int func_done = 0; - int expect_func = 0; - int expect_return_type = 0; - const char *oldmangled = NULL; - string trawname; - string tname; - - while (success && (**mangled != '\0')) - { - switch (**mangled) - { - case 'Q': - oldmangled = *mangled; - success = demangle_qualified (work, mangled, declp, 1, 0); - if (success) - remember_type (work, oldmangled, *mangled - oldmangled); - if (AUTO_DEMANGLING || GNU_DEMANGLING) - expect_func = 1; - oldmangled = NULL; - break; - - case 'K': - oldmangled = *mangled; - success = demangle_qualified (work, mangled, declp, 1, 0); - if (AUTO_DEMANGLING || GNU_DEMANGLING) - { - expect_func = 1; - } - oldmangled = NULL; - break; - - case 'S': - /* Static member function */ - if (oldmangled == NULL) - { - oldmangled = *mangled; - } - (*mangled)++; - work -> static_type = 1; - break; - - case 'C': - case 'V': - case 'u': - work->type_quals |= code_for_qualifier (**mangled); - - /* a qualified member function */ - if (oldmangled == NULL) - oldmangled = *mangled; - (*mangled)++; - break; - - case 'L': - /* Local class name follows after "Lnnn_" */ - if (HP_DEMANGLING) - { - while (**mangled && (**mangled != '_')) - (*mangled)++; - if (!**mangled) - success = 0; - else - (*mangled)++; - } - else - success = 0; - break; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - if (oldmangled == NULL) - { - oldmangled = *mangled; - } - work->temp_start = -1; /* uppermost call to demangle_class */ - success = demangle_class (work, mangled, declp); - if (success) - { - remember_type (work, oldmangled, *mangled - oldmangled); - } - if (AUTO_DEMANGLING || GNU_DEMANGLING || EDG_DEMANGLING) - { - /* EDG and others will have the "F", so we let the loop cycle - if we are looking at one. */ - if (**mangled != 'F') - expect_func = 1; - } - oldmangled = NULL; - break; - - case 'B': - { - string s; - success = do_type (work, mangled, &s); - if (success) - { - string_append (&s, SCOPE_STRING (work)); - string_prepends (declp, &s); - string_delete (&s); - } - oldmangled = NULL; - expect_func = 1; - } - break; - - case 'F': - /* Function */ - /* ARM/HP style demangling includes a specific 'F' character after - the class name. For GNU style, it is just implied. So we can - safely just consume any 'F' at this point and be compatible - with either style. */ - - oldmangled = NULL; - func_done = 1; - (*mangled)++; - - /* For lucid/ARM/HP style we have to forget any types we might - have remembered up to this point, since they were not argument - types. GNU style considers all types seen as available for - back references. See comment in demangle_args() */ - - if (LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) - { - forget_types (work); - } - success = demangle_args (work, mangled, declp); - /* After picking off the function args, we expect to either - find the function return type (preceded by an '_') or the - end of the string. */ - if (success && (AUTO_DEMANGLING || EDG_DEMANGLING) && **mangled == '_') - { - ++(*mangled); - /* At this level, we do not care about the return type. */ - success = do_type (work, mangled, &tname); - string_delete (&tname); - } - - break; - - case 't': - /* G++ Template */ - string_init(&trawname); - string_init(&tname); - if (oldmangled == NULL) - { - oldmangled = *mangled; - } - success = demangle_template (work, mangled, &tname, - &trawname, 1, 1); - if (success) - { - remember_type (work, oldmangled, *mangled - oldmangled); - } - string_append (&tname, SCOPE_STRING (work)); - - string_prepends(declp, &tname); - if (work -> destructor & 1) - { - string_prepend (&trawname, "~"); - string_appends (declp, &trawname); - work->destructor -= 1; - } - if ((work->constructor & 1) || (work->destructor & 1)) - { - string_appends (declp, &trawname); - work->constructor -= 1; - } - string_delete(&trawname); - string_delete(&tname); - oldmangled = NULL; - expect_func = 1; - break; - - case '_': - if ((AUTO_DEMANGLING || GNU_DEMANGLING) && expect_return_type) - { - /* Read the return type. */ - string return_type; - - (*mangled)++; - success = do_type (work, mangled, &return_type); - APPEND_BLANK (&return_type); - - string_prepends (declp, &return_type); - string_delete (&return_type); - break; - } - else - /* At the outermost level, we cannot have a return type specified, - so if we run into another '_' at this point we are dealing with - a mangled name that is either bogus, or has been mangled by - some algorithm we don't know how to deal with. So just - reject the entire demangling. */ - /* However, "_nnn" is an expected suffix for alternate entry point - numbered nnn for a function, with HP aCC, so skip over that - without reporting failure. pai/1997-09-04 */ - if (HP_DEMANGLING) - { - (*mangled)++; - while (**mangled && ISDIGIT ((unsigned char)**mangled)) - (*mangled)++; - } - else - success = 0; - break; - - case 'H': - if (AUTO_DEMANGLING || GNU_DEMANGLING) - { - /* A G++ template function. Read the template arguments. */ - success = demangle_template (work, mangled, declp, 0, 0, - 0); - if (!(work->constructor & 1)) - expect_return_type = 1; - (*mangled)++; - break; - } - else - /* fall through */ - {;} - - default: - if (AUTO_DEMANGLING || GNU_DEMANGLING) - { - /* Assume we have stumbled onto the first outermost function - argument token, and start processing args. */ - func_done = 1; - success = demangle_args (work, mangled, declp); - } - else - { - /* Non-GNU demanglers use a specific token to mark the start - of the outermost function argument tokens. Typically 'F', - for ARM/HP-demangling, for example. So if we find something - we are not prepared for, it must be an error. */ - success = 0; - } - break; - } - /* - if (AUTO_DEMANGLING || GNU_DEMANGLING) - */ - { - if (success && expect_func) - { - func_done = 1; - if (LUCID_DEMANGLING || ARM_DEMANGLING || EDG_DEMANGLING) - { - forget_types (work); - } - success = demangle_args (work, mangled, declp); - /* Since template include the mangling of their return types, - we must set expect_func to 0 so that we don't try do - demangle more arguments the next time we get here. */ - expect_func = 0; - } - } - } - if (success && !func_done) - { - if (AUTO_DEMANGLING || GNU_DEMANGLING) - { - /* With GNU style demangling, bar__3foo is 'foo::bar(void)', and - bar__3fooi is 'foo::bar(int)'. We get here when we find the - first case, and need to ensure that the '(void)' gets added to - the current declp. Note that with ARM/HP, the first case - represents the name of a static data member 'foo::bar', - which is in the current declp, so we leave it alone. */ - success = demangle_args (work, mangled, declp); - } - } - if (success && PRINT_ARG_TYPES) - { - if (work->static_type) - string_append (declp, " static"); - if (work->type_quals != TYPE_UNQUALIFIED) - { - APPEND_BLANK (declp); - string_append (declp, qualifier_string (work->type_quals)); - } - } - - return (success); -} - -#if 0 - -static int -demangle_method_args (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - int success = 0; - - if (work -> static_type) - { - string_append (declp, *mangled + 1); - *mangled += strlen (*mangled); - success = 1; - } - else - { - success = demangle_args (work, mangled, declp); - } - return (success); -} - -#endif - -static int -demangle_template_template_parm (work, mangled, tname) - struct work_stuff *work; - const char **mangled; - string *tname; -{ - int i; - int r; - int need_comma = 0; - int success = 1; - string temp; - - string_append (tname, "template <"); - /* get size of template parameter list */ - if (get_count (mangled, &r)) - { - for (i = 0; i < r; i++) - { - if (need_comma) - { - string_append (tname, ", "); - } - - /* Z for type parameters */ - if (**mangled == 'Z') - { - (*mangled)++; - string_append (tname, "class"); - } - /* z for template parameters */ - else if (**mangled == 'z') - { - (*mangled)++; - success = - demangle_template_template_parm (work, mangled, tname); - if (!success) - { - break; - } - } - else - { - /* temp is initialized in do_type */ - success = do_type (work, mangled, &temp); - if (success) - { - string_appends (tname, &temp); - } - string_delete(&temp); - if (!success) - { - break; - } - } - need_comma = 1; - } - - } - if (tname->p[-1] == '>') - string_append (tname, " "); - string_append (tname, "> class"); - return (success); -} - -static int -demangle_expression (work, mangled, s, tk) - struct work_stuff *work; - const char** mangled; - string* s; - type_kind_t tk; -{ - int need_operator = 0; - int success; - - success = 1; - string_appendn (s, "(", 1); - (*mangled)++; - while (success && **mangled != 'W' && **mangled != '\0') - { - if (need_operator) - { - size_t i; - size_t len; - - success = 0; - - len = strlen (*mangled); - - for (i = 0; i < ARRAY_SIZE (optable); ++i) - { - size_t l = strlen (optable[i].in); - - if (l <= len - && memcmp (optable[i].in, *mangled, l) == 0) - { - string_appendn (s, " ", 1); - string_append (s, optable[i].out); - string_appendn (s, " ", 1); - success = 1; - (*mangled) += l; - break; - } - } - - if (!success) - break; - } - else - need_operator = 1; - - success = demangle_template_value_parm (work, mangled, s, tk); - } - - if (**mangled != 'W') - success = 0; - else - { - string_appendn (s, ")", 1); - (*mangled)++; - } - - return success; -} - -static int -demangle_integral_value (work, mangled, s) - struct work_stuff *work; - const char** mangled; - string* s; -{ - int success; - - if (**mangled == 'E') - success = demangle_expression (work, mangled, s, tk_integral); - else if (**mangled == 'Q' || **mangled == 'K') - success = demangle_qualified (work, mangled, s, 0, 1); - else - { - int value; - - /* By default, we let the number decide whether we shall consume an - underscore. */ - int multidigit_without_leading_underscore = 0; - int leave_following_underscore = 0; - - success = 0; - - if (**mangled == '_') - { - if (mangled[0][1] == 'm') - { - /* Since consume_count_with_underscores does not handle the - `m'-prefix we must do it here, using consume_count and - adjusting underscores: we have to consume the underscore - matching the prepended one. */ - multidigit_without_leading_underscore = 1; - string_appendn (s, "-", 1); - (*mangled) += 2; - } - else - { - /* Do not consume a following underscore; - consume_count_with_underscores will consume what - should be consumed. */ - leave_following_underscore = 1; - } - } - else - { - /* Negative numbers are indicated with a leading `m'. */ - if (**mangled == 'm') - { - string_appendn (s, "-", 1); - (*mangled)++; - } - /* Since consume_count_with_underscores does not handle - multi-digit numbers that do not start with an underscore, - and this number can be an integer template parameter, - we have to call consume_count. */ - multidigit_without_leading_underscore = 1; - /* These multi-digit numbers never end on an underscore, - so if there is one then don't eat it. */ - leave_following_underscore = 1; - } - - /* We must call consume_count if we expect to remove a trailing - underscore, since consume_count_with_underscores expects - the leading underscore (that we consumed) if it is to handle - multi-digit numbers. */ - if (multidigit_without_leading_underscore) - value = consume_count (mangled); - else - value = consume_count_with_underscores (mangled); - - if (value != -1) - { - char buf[INTBUF_SIZE]; - sprintf (buf, "%d", value); - string_append (s, buf); - - /* Numbers not otherwise delimited, might have an underscore - appended as a delimeter, which we should skip. - - ??? This used to always remove a following underscore, which - is wrong. If other (arbitrary) cases are followed by an - underscore, we need to do something more radical. */ - - if ((value > 9 || multidigit_without_leading_underscore) - && ! leave_following_underscore - && **mangled == '_') - (*mangled)++; - - /* All is well. */ - success = 1; - } - } - - return success; -} - -/* Demangle the real value in MANGLED. */ - -static int -demangle_real_value (work, mangled, s) - struct work_stuff *work; - const char **mangled; - string* s; -{ - if (**mangled == 'E') - return demangle_expression (work, mangled, s, tk_real); - - if (**mangled == 'm') - { - string_appendn (s, "-", 1); - (*mangled)++; - } - while (ISDIGIT ((unsigned char)**mangled)) - { - string_appendn (s, *mangled, 1); - (*mangled)++; - } - if (**mangled == '.') /* fraction */ - { - string_appendn (s, ".", 1); - (*mangled)++; - while (ISDIGIT ((unsigned char)**mangled)) - { - string_appendn (s, *mangled, 1); - (*mangled)++; - } - } - if (**mangled == 'e') /* exponent */ - { - string_appendn (s, "e", 1); - (*mangled)++; - while (ISDIGIT ((unsigned char)**mangled)) - { - string_appendn (s, *mangled, 1); - (*mangled)++; - } - } - - return 1; -} - -static int -demangle_template_value_parm (work, mangled, s, tk) - struct work_stuff *work; - const char **mangled; - string* s; - type_kind_t tk; -{ - int success = 1; - - if (**mangled == 'Y') - { - /* The next argument is a template parameter. */ - int idx; - - (*mangled)++; - idx = consume_count_with_underscores (mangled); - if (idx == -1 - || (work->tmpl_argvec && idx >= work->ntmpl_args) - || consume_count_with_underscores (mangled) == -1) - return -1; - if (work->tmpl_argvec) - string_append (s, work->tmpl_argvec[idx]); - else - string_append_template_idx (s, idx); - } - else if (tk == tk_integral) - success = demangle_integral_value (work, mangled, s); - else if (tk == tk_char) - { - char tmp[2]; - int val; - if (**mangled == 'm') - { - string_appendn (s, "-", 1); - (*mangled)++; - } - string_appendn (s, "'", 1); - val = consume_count(mangled); - if (val <= 0) - success = 0; - else - { - tmp[0] = (char)val; - tmp[1] = '\0'; - string_appendn (s, &tmp[0], 1); - string_appendn (s, "'", 1); - } - } - else if (tk == tk_bool) - { - int val = consume_count (mangled); - if (val == 0) - string_appendn (s, "false", 5); - else if (val == 1) - string_appendn (s, "true", 4); - else - success = 0; - } - else if (tk == tk_real) - success = demangle_real_value (work, mangled, s); - else if (tk == tk_pointer || tk == tk_reference) - { - if (**mangled == 'Q') - success = demangle_qualified (work, mangled, s, - /*isfuncname=*/0, - /*append=*/1); - else - { - int symbol_len = consume_count (mangled); - if (symbol_len == -1) - return -1; - if (symbol_len == 0) - string_appendn (s, "0", 1); - else - { - char *p = xmalloc (symbol_len + 1), *q; - strncpy (p, *mangled, symbol_len); - p [symbol_len] = '\0'; - /* We use cplus_demangle here, rather than - internal_cplus_demangle, because the name of the entity - mangled here does not make use of any of the squangling - or type-code information we have built up thus far; it is - mangled independently. */ - q = cplus_demangle (p, work->options); - if (tk == tk_pointer) - string_appendn (s, "&", 1); - /* FIXME: Pointer-to-member constants should get a - qualifying class name here. */ - if (q) - { - string_append (s, q); - free (q); - } - else - string_append (s, p); - free (p); - } - *mangled += symbol_len; - } - } - - return success; -} - -/* Demangle the template name in MANGLED. The full name of the - template (e.g., S) is placed in TNAME. The name without the - template parameters (e.g. S) is placed in TRAWNAME if TRAWNAME is - non-NULL. If IS_TYPE is nonzero, this template is a type template, - not a function template. If both IS_TYPE and REMEMBER are nonzero, - the template is remembered in the list of back-referenceable - types. */ - -static int -demangle_template (work, mangled, tname, trawname, is_type, remember) - struct work_stuff *work; - const char **mangled; - string *tname; - string *trawname; - int is_type; - int remember; -{ - int i; - int r; - int need_comma = 0; - int success = 0; - const char *start; - int is_java_array = 0; - string temp; - - (*mangled)++; - if (is_type) - { - start = *mangled; - /* get template name */ - if (**mangled == 'z') - { - int idx; - (*mangled)++; - (*mangled)++; - - idx = consume_count_with_underscores (mangled); - if (idx == -1 - || (work->tmpl_argvec && idx >= work->ntmpl_args) - || consume_count_with_underscores (mangled) == -1) - return (0); - - if (work->tmpl_argvec) - { - string_append (tname, work->tmpl_argvec[idx]); - if (trawname) - string_append (trawname, work->tmpl_argvec[idx]); - } - else - { - string_append_template_idx (tname, idx); - if (trawname) - string_append_template_idx (trawname, idx); - } - } - else - { - if ((r = consume_count (mangled)) <= 0 - || (int) strlen (*mangled) < r) - { - return (0); - } - is_java_array = (work -> options & DMGL_JAVA) - && strncmp (*mangled, "JArray1Z", 8) == 0; - if (! is_java_array) - { - string_appendn (tname, *mangled, r); - } - if (trawname) - string_appendn (trawname, *mangled, r); - *mangled += r; - } - } - if (!is_java_array) - string_append (tname, "<"); - /* get size of template parameter list */ - if (!get_count (mangled, &r)) - { - return (0); - } - if (!is_type) - { - /* Create an array for saving the template argument values. */ - work->tmpl_argvec = (char**) xmalloc (r * sizeof (char *)); - work->ntmpl_args = r; - for (i = 0; i < r; i++) - work->tmpl_argvec[i] = 0; - } - for (i = 0; i < r; i++) - { - if (need_comma) - { - string_append (tname, ", "); - } - /* Z for type parameters */ - if (**mangled == 'Z') - { - (*mangled)++; - /* temp is initialized in do_type */ - success = do_type (work, mangled, &temp); - if (success) - { - string_appends (tname, &temp); - - if (!is_type) - { - /* Save the template argument. */ - int len = temp.p - temp.b; - work->tmpl_argvec[i] = xmalloc (len + 1); - memcpy (work->tmpl_argvec[i], temp.b, len); - work->tmpl_argvec[i][len] = '\0'; - } - } - string_delete(&temp); - if (!success) - { - break; - } - } - /* z for template parameters */ - else if (**mangled == 'z') - { - int r2; - (*mangled)++; - success = demangle_template_template_parm (work, mangled, tname); - - if (success - && (r2 = consume_count (mangled)) > 0 - && (int) strlen (*mangled) >= r2) - { - string_append (tname, " "); - string_appendn (tname, *mangled, r2); - if (!is_type) - { - /* Save the template argument. */ - int len = r2; - work->tmpl_argvec[i] = xmalloc (len + 1); - memcpy (work->tmpl_argvec[i], *mangled, len); - work->tmpl_argvec[i][len] = '\0'; - } - *mangled += r2; - } - if (!success) - { - break; - } - } - else - { - string param; - string* s; - - /* otherwise, value parameter */ - - /* temp is initialized in do_type */ - success = do_type (work, mangled, &temp); - string_delete(&temp); - if (!success) - break; - - if (!is_type) - { - s = ¶m; - string_init (s); - } - else - s = tname; - - success = demangle_template_value_parm (work, mangled, s, - (type_kind_t) success); - - if (!success) - { - if (!is_type) - string_delete (s); - success = 0; - break; - } - - if (!is_type) - { - int len = s->p - s->b; - work->tmpl_argvec[i] = xmalloc (len + 1); - memcpy (work->tmpl_argvec[i], s->b, len); - work->tmpl_argvec[i][len] = '\0'; - - string_appends (tname, s); - string_delete (s); - } - } - need_comma = 1; - } - if (is_java_array) - { - string_append (tname, "[]"); - } - else - { - if (tname->p[-1] == '>') - string_append (tname, " "); - string_append (tname, ">"); - } - - if (is_type && remember) - { - const int bindex = register_Btype (work); - remember_Btype (work, tname->b, LEN_STRING (tname), bindex); - } - - /* - if (work -> static_type) - { - string_append (declp, *mangled + 1); - *mangled += strlen (*mangled); - success = 1; - } - else - { - success = demangle_args (work, mangled, declp); - } - } - */ - return (success); -} - -static int -arm_pt (work, mangled, n, anchor, args) - struct work_stuff *work; - const char *mangled; - int n; - const char **anchor, **args; -{ - /* Check if ARM template with "__pt__" in it ("parameterized type") */ - /* Allow HP also here, because HP's cfront compiler follows ARM to some extent */ - if ((ARM_DEMANGLING || HP_DEMANGLING) && (*anchor = strstr (mangled, "__pt__"))) - { - int len; - *args = *anchor + 6; - len = consume_count (args); - if (len == -1) - return 0; - if (*args + len == mangled + n && **args == '_') - { - ++*args; - return 1; - } - } - if (AUTO_DEMANGLING || EDG_DEMANGLING) - { - if ((*anchor = strstr (mangled, "__tm__")) - || (*anchor = strstr (mangled, "__ps__")) - || (*anchor = strstr (mangled, "__pt__"))) - { - int len; - *args = *anchor + 6; - len = consume_count (args); - if (len == -1) - return 0; - if (*args + len == mangled + n && **args == '_') - { - ++*args; - return 1; - } - } - else if ((*anchor = strstr (mangled, "__S"))) - { - int len; - *args = *anchor + 3; - len = consume_count (args); - if (len == -1) - return 0; - if (*args + len == mangled + n && **args == '_') - { - ++*args; - return 1; - } - } - } - - return 0; -} - -static void -demangle_arm_hp_template (work, mangled, n, declp) - struct work_stuff *work; - const char **mangled; - int n; - string *declp; -{ - const char *p; - const char *args; - const char *e = *mangled + n; - string arg; - - /* Check for HP aCC template spec: classXt1t2 where t1, t2 are - template args */ - if (HP_DEMANGLING && ((*mangled)[n] == 'X')) - { - char *start_spec_args = NULL; - int hold_options; - - /* First check for and omit template specialization pseudo-arguments, - such as in "Spec<#1,#1.*>" */ - start_spec_args = strchr (*mangled, '<'); - if (start_spec_args && (start_spec_args - *mangled < n)) - string_appendn (declp, *mangled, start_spec_args - *mangled); - else - string_appendn (declp, *mangled, n); - (*mangled) += n + 1; - string_init (&arg); - if (work->temp_start == -1) /* non-recursive call */ - work->temp_start = declp->p - declp->b; - - /* We want to unconditionally demangle parameter types in - template parameters. */ - hold_options = work->options; - work->options |= DMGL_PARAMS; - - string_append (declp, "<"); - while (1) - { - string_delete (&arg); - switch (**mangled) - { - case 'T': - /* 'T' signals a type parameter */ - (*mangled)++; - if (!do_type (work, mangled, &arg)) - goto hpacc_template_args_done; - break; - - case 'U': - case 'S': - /* 'U' or 'S' signals an integral value */ - if (!do_hpacc_template_const_value (work, mangled, &arg)) - goto hpacc_template_args_done; - break; - - case 'A': - /* 'A' signals a named constant expression (literal) */ - if (!do_hpacc_template_literal (work, mangled, &arg)) - goto hpacc_template_args_done; - break; - - default: - /* Today, 1997-09-03, we have only the above types - of template parameters */ - /* FIXME: maybe this should fail and return null */ - goto hpacc_template_args_done; - } - string_appends (declp, &arg); - /* Check if we're at the end of template args. - 0 if at end of static member of template class, - _ if done with template args for a function */ - if ((**mangled == '\000') || (**mangled == '_')) - break; - else - string_append (declp, ","); - } - hpacc_template_args_done: - string_append (declp, ">"); - string_delete (&arg); - if (**mangled == '_') - (*mangled)++; - work->options = hold_options; - return; - } - /* ARM template? (Also handles HP cfront extensions) */ - else if (arm_pt (work, *mangled, n, &p, &args)) - { - int hold_options; - string type_str; - - string_init (&arg); - string_appendn (declp, *mangled, p - *mangled); - if (work->temp_start == -1) /* non-recursive call */ - work->temp_start = declp->p - declp->b; - - /* We want to unconditionally demangle parameter types in - template parameters. */ - hold_options = work->options; - work->options |= DMGL_PARAMS; - - string_append (declp, "<"); - /* should do error checking here */ - while (args < e) { - string_delete (&arg); - - /* Check for type or literal here */ - switch (*args) - { - /* HP cfront extensions to ARM for template args */ - /* spec: Xt1Lv1 where t1 is a type, v1 is a literal value */ - /* FIXME: We handle only numeric literals for HP cfront */ - case 'X': - /* A typed constant value follows */ - args++; - if (!do_type (work, &args, &type_str)) - goto cfront_template_args_done; - string_append (&arg, "("); - string_appends (&arg, &type_str); - string_delete (&type_str); - string_append (&arg, ")"); - if (*args != 'L') - goto cfront_template_args_done; - args++; - /* Now snarf a literal value following 'L' */ - if (!snarf_numeric_literal (&args, &arg)) - goto cfront_template_args_done; - break; - - case 'L': - /* Snarf a literal following 'L' */ - args++; - if (!snarf_numeric_literal (&args, &arg)) - goto cfront_template_args_done; - break; - default: - /* Not handling other HP cfront stuff */ - { - const char* old_args = args; - if (!do_type (work, &args, &arg)) - goto cfront_template_args_done; - - /* Fail if we didn't make any progress: prevent infinite loop. */ - if (args == old_args) - { - work->options = hold_options; - return; - } - } - } - string_appends (declp, &arg); - string_append (declp, ","); - } - cfront_template_args_done: - string_delete (&arg); - if (args >= e) - --declp->p; /* remove extra comma */ - string_append (declp, ">"); - work->options = hold_options; - } - else if (n>10 && strncmp (*mangled, "_GLOBAL_", 8) == 0 - && (*mangled)[9] == 'N' - && (*mangled)[8] == (*mangled)[10] - && strchr (cplus_markers, (*mangled)[8])) - { - /* A member of the anonymous namespace. */ - string_append (declp, "{anonymous}"); - } - else - { - if (work->temp_start == -1) /* non-recursive call only */ - work->temp_start = 0; /* disable in recursive calls */ - string_appendn (declp, *mangled, n); - } - *mangled += n; -} - -/* Extract a class name, possibly a template with arguments, from the - mangled string; qualifiers, local class indicators, etc. have - already been dealt with */ - -static int -demangle_class_name (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - int n; - int success = 0; - - n = consume_count (mangled); - if (n == -1) - return 0; - if ((int) strlen (*mangled) >= n) - { - demangle_arm_hp_template (work, mangled, n, declp); - success = 1; - } - - return (success); -} - -/* - -LOCAL FUNCTION - - demangle_class -- demangle a mangled class sequence - -SYNOPSIS - - static int - demangle_class (struct work_stuff *work, const char **mangled, - strint *declp) - -DESCRIPTION - - DECLP points to the buffer into which demangling is being done. - - *MANGLED points to the current token to be demangled. On input, - it points to a mangled class (I.E. "3foo", "13verylongclass", etc.) - On exit, it points to the next token after the mangled class on - success, or the first unconsumed token on failure. - - If the CONSTRUCTOR or DESTRUCTOR flags are set in WORK, then - we are demangling a constructor or destructor. In this case - we prepend "class::class" or "class::~class" to DECLP. - - Otherwise, we prepend "class::" to the current DECLP. - - Reset the constructor/destructor flags once they have been - "consumed". This allows demangle_class to be called later during - the same demangling, to do normal class demangling. - - Returns 1 if demangling is successful, 0 otherwise. - -*/ - -static int -demangle_class (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - int success = 0; - int btype; - string class_name; - char *save_class_name_end = 0; - - string_init (&class_name); - btype = register_Btype (work); - if (demangle_class_name (work, mangled, &class_name)) - { - save_class_name_end = class_name.p; - if ((work->constructor & 1) || (work->destructor & 1)) - { - /* adjust so we don't include template args */ - if (work->temp_start && (work->temp_start != -1)) - { - class_name.p = class_name.b + work->temp_start; - } - string_prepends (declp, &class_name); - if (work -> destructor & 1) - { - string_prepend (declp, "~"); - work -> destructor -= 1; - } - else - { - work -> constructor -= 1; - } - } - class_name.p = save_class_name_end; - remember_Ktype (work, class_name.b, LEN_STRING(&class_name)); - remember_Btype (work, class_name.b, LEN_STRING(&class_name), btype); - string_prepend (declp, SCOPE_STRING (work)); - string_prepends (declp, &class_name); - success = 1; - } - string_delete (&class_name); - return (success); -} - - -/* Called when there's a "__" in the mangled name, with `scan' pointing to - the rightmost guess. - - Find the correct "__"-sequence where the function name ends and the - signature starts, which is ambiguous with GNU mangling. - Call demangle_signature here, so we can make sure we found the right - one; *mangled will be consumed so caller will not make further calls to - demangle_signature. */ - -static int -iterate_demangle_function (work, mangled, declp, scan) - struct work_stuff *work; - const char **mangled; - string *declp; - const char *scan; -{ - const char *mangle_init = *mangled; - int success = 0; - string decl_init; - struct work_stuff work_init; - - if (*(scan + 2) == '\0') - return 0; - - /* Do not iterate for some demangling modes, or if there's only one - "__"-sequence. This is the normal case. */ - if (ARM_DEMANGLING || LUCID_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING - || strstr (scan + 2, "__") == NULL) - { - demangle_function_name (work, mangled, declp, scan); - return 1; - } - - /* Save state so we can restart if the guess at the correct "__" was - wrong. */ - string_init (&decl_init); - string_appends (&decl_init, declp); - memset (&work_init, 0, sizeof work_init); - work_stuff_copy_to_from (&work_init, work); - - /* Iterate over occurrences of __, allowing names and types to have a - "__" sequence in them. We must start with the first (not the last) - occurrence, since "__" most often occur between independent mangled - parts, hence starting at the last occurence inside a signature - might get us a "successful" demangling of the signature. */ - - while (scan[2]) - { - demangle_function_name (work, mangled, declp, scan); - success = demangle_signature (work, mangled, declp); - if (success) - break; - - /* Reset demangle state for the next round. */ - *mangled = mangle_init; - string_clear (declp); - string_appends (declp, &decl_init); - work_stuff_copy_to_from (work, &work_init); - - /* Leave this underscore-sequence. */ - scan += 2; - - /* Scan for the next "__" sequence. */ - while (*scan && (scan[0] != '_' || scan[1] != '_')) - scan++; - - /* Move to last "__" in this sequence. */ - while (*scan && *scan == '_') - scan++; - scan -= 2; - } - - /* Delete saved state. */ - delete_work_stuff (&work_init); - string_delete (&decl_init); - - return success; -} - -/* - -LOCAL FUNCTION - - demangle_prefix -- consume the mangled name prefix and find signature - -SYNOPSIS - - static int - demangle_prefix (struct work_stuff *work, const char **mangled, - string *declp); - -DESCRIPTION - - Consume and demangle the prefix of the mangled name. - While processing the function name root, arrange to call - demangle_signature if the root is ambiguous. - - DECLP points to the string buffer into which demangled output is - placed. On entry, the buffer is empty. On exit it contains - the root function name, the demangled operator name, or in some - special cases either nothing or the completely demangled result. - - MANGLED points to the current pointer into the mangled name. As each - token of the mangled name is consumed, it is updated. Upon entry - the current mangled name pointer points to the first character of - the mangled name. Upon exit, it should point to the first character - of the signature if demangling was successful, or to the first - unconsumed character if demangling of the prefix was unsuccessful. - - Returns 1 on success, 0 otherwise. - */ - -static int -demangle_prefix (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - int success = 1; - const char *scan; - int i; - - if (strlen(*mangled) > 6 - && (strncmp(*mangled, "_imp__", 6) == 0 - || strncmp(*mangled, "__imp_", 6) == 0)) - { - /* it's a symbol imported from a PE dynamic library. Check for both - new style prefix _imp__ and legacy __imp_ used by older versions - of dlltool. */ - (*mangled) += 6; - work->dllimported = 1; - } - else if (strlen(*mangled) >= 11 && strncmp(*mangled, "_GLOBAL_", 8) == 0) - { - char *marker = strchr (cplus_markers, (*mangled)[8]); - if (marker != NULL && *marker == (*mangled)[10]) - { - if ((*mangled)[9] == 'D') - { - /* it's a GNU global destructor to be executed at program exit */ - (*mangled) += 11; - work->destructor = 2; - if (gnu_special (work, mangled, declp)) - return success; - } - else if ((*mangled)[9] == 'I') - { - /* it's a GNU global constructor to be executed at program init */ - (*mangled) += 11; - work->constructor = 2; - if (gnu_special (work, mangled, declp)) - return success; - } - } - } - else if ((ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) && strncmp(*mangled, "__std__", 7) == 0) - { - /* it's a ARM global destructor to be executed at program exit */ - (*mangled) += 7; - work->destructor = 2; - } - else if ((ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) && strncmp(*mangled, "__sti__", 7) == 0) - { - /* it's a ARM global constructor to be executed at program initial */ - (*mangled) += 7; - work->constructor = 2; - } - - /* This block of code is a reduction in strength time optimization - of: - scan = strstr (*mangled, "__"); */ - - { - scan = *mangled; - - do { - scan = strchr (scan, '_'); - } while (scan != NULL && *++scan != '_'); - - if (scan != NULL) --scan; - } - - if (scan != NULL) - { - /* We found a sequence of two or more '_', ensure that we start at - the last pair in the sequence. */ - i = strspn (scan, "_"); - if (i > 2) - { - scan += (i - 2); - } - } - - if (scan == NULL) - { - success = 0; - } - else if (work -> static_type) - { - if (!ISDIGIT ((unsigned char)scan[0]) && (scan[0] != 't')) - { - success = 0; - } - } - else if ((scan == *mangled) - && (ISDIGIT ((unsigned char)scan[2]) || (scan[2] == 'Q') - || (scan[2] == 't') || (scan[2] == 'K') || (scan[2] == 'H'))) - { - /* The ARM says nothing about the mangling of local variables. - But cfront mangles local variables by prepending __ - to them. As an extension to ARM demangling we handle this case. */ - if ((LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING) - && ISDIGIT ((unsigned char)scan[2])) - { - *mangled = scan + 2; - consume_count (mangled); - string_append (declp, *mangled); - *mangled += strlen (*mangled); - success = 1; - } - else - { - /* A GNU style constructor starts with __[0-9Qt]. But cfront uses - names like __Q2_3foo3bar for nested type names. So don't accept - this style of constructor for cfront demangling. A GNU - style member-template constructor starts with 'H'. */ - if (!(LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING)) - work -> constructor += 1; - *mangled = scan + 2; - } - } - else if (ARM_DEMANGLING && scan[2] == 'p' && scan[3] == 't') - { - /* Cfront-style parameterized type. Handled later as a signature. */ - success = 1; - - /* ARM template? */ - demangle_arm_hp_template (work, mangled, strlen (*mangled), declp); - } - else if (EDG_DEMANGLING && ((scan[2] == 't' && scan[3] == 'm') - || (scan[2] == 'p' && scan[3] == 's') - || (scan[2] == 'p' && scan[3] == 't'))) - { - /* EDG-style parameterized type. Handled later as a signature. */ - success = 1; - - /* EDG template? */ - demangle_arm_hp_template (work, mangled, strlen (*mangled), declp); - } - else if ((scan == *mangled) && !ISDIGIT ((unsigned char)scan[2]) - && (scan[2] != 't')) - { - /* Mangled name starts with "__". Skip over any leading '_' characters, - then find the next "__" that separates the prefix from the signature. - */ - if (!(ARM_DEMANGLING || LUCID_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) - || (arm_special (mangled, declp) == 0)) - { - while (*scan == '_') - { - scan++; - } - if ((scan = strstr (scan, "__")) == NULL || (*(scan + 2) == '\0')) - { - /* No separator (I.E. "__not_mangled"), or empty signature - (I.E. "__not_mangled_either__") */ - success = 0; - } - else - return iterate_demangle_function (work, mangled, declp, scan); - } - } - else if (*(scan + 2) != '\0') - { - /* Mangled name does not start with "__" but does have one somewhere - in there with non empty stuff after it. Looks like a global - function name. Iterate over all "__":s until the right - one is found. */ - return iterate_demangle_function (work, mangled, declp, scan); - } - else - { - /* Doesn't look like a mangled name */ - success = 0; - } - - if (!success && (work->constructor == 2 || work->destructor == 2)) - { - string_append (declp, *mangled); - *mangled += strlen (*mangled); - success = 1; - } - return (success); -} - -/* - -LOCAL FUNCTION - - gnu_special -- special handling of gnu mangled strings - -SYNOPSIS - - static int - gnu_special (struct work_stuff *work, const char **mangled, - string *declp); - - -DESCRIPTION - - Process some special GNU style mangling forms that don't fit - the normal pattern. For example: - - _$_3foo (destructor for class foo) - _vt$foo (foo virtual table) - _vt$foo$bar (foo::bar virtual table) - __vt_foo (foo virtual table, new style with thunks) - _3foo$varname (static data member) - _Q22rs2tu$vw (static data member) - __t6vector1Zii (constructor with template) - __thunk_4__$_7ostream (virtual function thunk) - */ - -static int -gnu_special (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - int n; - int success = 1; - const char *p; - - if ((*mangled)[0] == '_' - && strchr (cplus_markers, (*mangled)[1]) != NULL - && (*mangled)[2] == '_') - { - /* Found a GNU style destructor, get past "__" */ - (*mangled) += 3; - work -> destructor += 1; - } - else if ((*mangled)[0] == '_' - && (((*mangled)[1] == '_' - && (*mangled)[2] == 'v' - && (*mangled)[3] == 't' - && (*mangled)[4] == '_') - || ((*mangled)[1] == 'v' - && (*mangled)[2] == 't' - && strchr (cplus_markers, (*mangled)[3]) != NULL))) - { - /* Found a GNU style virtual table, get past "_vt" - and create the decl. Note that we consume the entire mangled - input string, which means that demangle_signature has no work - to do. */ - if ((*mangled)[2] == 'v') - (*mangled) += 5; /* New style, with thunks: "__vt_" */ - else - (*mangled) += 4; /* Old style, no thunks: "_vt" */ - while (**mangled != '\0') - { - switch (**mangled) - { - case 'Q': - case 'K': - success = demangle_qualified (work, mangled, declp, 0, 1); - break; - case 't': - success = demangle_template (work, mangled, declp, 0, 1, - 1); - break; - default: - if (ISDIGIT((unsigned char)*mangled[0])) - { - n = consume_count(mangled); - /* We may be seeing a too-large size, or else a - "." indicating a static local symbol. In - any case, declare victory and move on; *don't* try - to use n to allocate. */ - if (n > (int) strlen (*mangled)) - { - success = 1; - break; - } - } - else - { - n = strcspn (*mangled, cplus_markers); - } - string_appendn (declp, *mangled, n); - (*mangled) += n; - } - - p = strpbrk (*mangled, cplus_markers); - if (success && ((p == NULL) || (p == *mangled))) - { - if (p != NULL) - { - string_append (declp, SCOPE_STRING (work)); - (*mangled)++; - } - } - else - { - success = 0; - break; - } - } - if (success) - string_append (declp, " virtual table"); - } - else if ((*mangled)[0] == '_' - && (strchr("0123456789Qt", (*mangled)[1]) != NULL) - && (p = strpbrk (*mangled, cplus_markers)) != NULL) - { - /* static data member, "_3foo$varname" for example */ - (*mangled)++; - switch (**mangled) - { - case 'Q': - case 'K': - success = demangle_qualified (work, mangled, declp, 0, 1); - break; - case 't': - success = demangle_template (work, mangled, declp, 0, 1, 1); - break; - default: - n = consume_count (mangled); - if (n < 0 || n > (long) strlen (*mangled)) - { - success = 0; - break; - } - - if (n > 10 && strncmp (*mangled, "_GLOBAL_", 8) == 0 - && (*mangled)[9] == 'N' - && (*mangled)[8] == (*mangled)[10] - && strchr (cplus_markers, (*mangled)[8])) - { - /* A member of the anonymous namespace. There's information - about what identifier or filename it was keyed to, but - it's just there to make the mangled name unique; we just - step over it. */ - string_append (declp, "{anonymous}"); - (*mangled) += n; - - /* Now p points to the marker before the N, so we need to - update it to the first marker after what we consumed. */ - p = strpbrk (*mangled, cplus_markers); - break; - } - - string_appendn (declp, *mangled, n); - (*mangled) += n; - } - if (success && (p == *mangled)) - { - /* Consumed everything up to the cplus_marker, append the - variable name. */ - (*mangled)++; - string_append (declp, SCOPE_STRING (work)); - n = strlen (*mangled); - string_appendn (declp, *mangled, n); - (*mangled) += n; - } - else - { - success = 0; - } - } - else if (strncmp (*mangled, "__thunk_", 8) == 0) - { - int delta; - - (*mangled) += 8; - delta = consume_count (mangled); - if (delta == -1) - success = 0; - else - { - char *method = internal_cplus_demangle (work, ++*mangled); - - if (method) - { - char buf[50]; - sprintf (buf, "virtual function thunk (delta:%d) for ", -delta); - string_append (declp, buf); - string_append (declp, method); - free (method); - n = strlen (*mangled); - (*mangled) += n; - } - else - { - success = 0; - } - } - } - else if (strncmp (*mangled, "__t", 3) == 0 - && ((*mangled)[3] == 'i' || (*mangled)[3] == 'f')) - { - p = (*mangled)[3] == 'i' ? " type_info node" : " type_info function"; - (*mangled) += 4; - switch (**mangled) - { - case 'Q': - case 'K': - success = demangle_qualified (work, mangled, declp, 0, 1); - break; - case 't': - success = demangle_template (work, mangled, declp, 0, 1, 1); - break; - default: - success = do_type (work, mangled, declp); - break; - } - if (success && **mangled != '\0') - success = 0; - if (success) - string_append (declp, p); - } - else - { - success = 0; - } - return (success); -} - -static void -recursively_demangle(work, mangled, result, namelength) - struct work_stuff *work; - const char **mangled; - string *result; - int namelength; -{ - char * recurse = (char *)NULL; - char * recurse_dem = (char *)NULL; - - recurse = (char *) xmalloc (namelength + 1); - memcpy (recurse, *mangled, namelength); - recurse[namelength] = '\000'; - - recurse_dem = cplus_demangle (recurse, work->options); - - if (recurse_dem) - { - string_append (result, recurse_dem); - free (recurse_dem); - } - else - { - string_appendn (result, *mangled, namelength); - } - free (recurse); - *mangled += namelength; -} - -/* - -LOCAL FUNCTION - - arm_special -- special handling of ARM/lucid mangled strings - -SYNOPSIS - - static int - arm_special (const char **mangled, - string *declp); - - -DESCRIPTION - - Process some special ARM style mangling forms that don't fit - the normal pattern. For example: - - __vtbl__3foo (foo virtual table) - __vtbl__3foo__3bar (bar::foo virtual table) - - */ - -static int -arm_special (mangled, declp) - const char **mangled; - string *declp; -{ - int n; - int success = 1; - const char *scan; - - if (strncmp (*mangled, ARM_VTABLE_STRING, ARM_VTABLE_STRLEN) == 0) - { - /* Found a ARM style virtual table, get past ARM_VTABLE_STRING - and create the decl. Note that we consume the entire mangled - input string, which means that demangle_signature has no work - to do. */ - scan = *mangled + ARM_VTABLE_STRLEN; - while (*scan != '\0') /* first check it can be demangled */ - { - n = consume_count (&scan); - if (n == -1) - { - return (0); /* no good */ - } - scan += n; - if (scan[0] == '_' && scan[1] == '_') - { - scan += 2; - } - } - (*mangled) += ARM_VTABLE_STRLEN; - while (**mangled != '\0') - { - n = consume_count (mangled); - if (n == -1 - || n > (long) strlen (*mangled)) - return 0; - string_prependn (declp, *mangled, n); - (*mangled) += n; - if ((*mangled)[0] == '_' && (*mangled)[1] == '_') - { - string_prepend (declp, "::"); - (*mangled) += 2; - } - } - string_append (declp, " virtual table"); - } - else - { - success = 0; - } - return (success); -} - -/* - -LOCAL FUNCTION - - demangle_qualified -- demangle 'Q' qualified name strings - -SYNOPSIS - - static int - demangle_qualified (struct work_stuff *, const char *mangled, - string *result, int isfuncname, int append); - -DESCRIPTION - - Demangle a qualified name, such as "Q25Outer5Inner" which is - the mangled form of "Outer::Inner". The demangled output is - prepended or appended to the result string according to the - state of the append flag. - - If isfuncname is nonzero, then the qualified name we are building - is going to be used as a member function name, so if it is a - constructor or destructor function, append an appropriate - constructor or destructor name. I.E. for the above example, - the result for use as a constructor is "Outer::Inner::Inner" - and the result for use as a destructor is "Outer::Inner::~Inner". - -BUGS - - Numeric conversion is ASCII dependent (FIXME). - - */ - -static int -demangle_qualified (work, mangled, result, isfuncname, append) - struct work_stuff *work; - const char **mangled; - string *result; - int isfuncname; - int append; -{ - int qualifiers = 0; - int success = 1; - char num[2]; - string temp; - string last_name; - int bindex = register_Btype (work); - - /* We only make use of ISFUNCNAME if the entity is a constructor or - destructor. */ - isfuncname = (isfuncname - && ((work->constructor & 1) || (work->destructor & 1))); - - string_init (&temp); - string_init (&last_name); - - if ((*mangled)[0] == 'K') - { - /* Squangling qualified name reuse */ - int idx; - (*mangled)++; - idx = consume_count_with_underscores (mangled); - if (idx == -1 || idx >= work -> numk) - success = 0; - else - string_append (&temp, work -> ktypevec[idx]); - } - else - switch ((*mangled)[1]) - { - case '_': - /* GNU mangled name with more than 9 classes. The count is preceded - by an underscore (to distinguish it from the <= 9 case) and followed - by an underscore. */ - (*mangled)++; - qualifiers = consume_count_with_underscores (mangled); - if (qualifiers == -1) - success = 0; - break; - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - /* The count is in a single digit. */ - num[0] = (*mangled)[1]; - num[1] = '\0'; - qualifiers = atoi (num); - - /* If there is an underscore after the digit, skip it. This is - said to be for ARM-qualified names, but the ARM makes no - mention of such an underscore. Perhaps cfront uses one. */ - if ((*mangled)[2] == '_') - { - (*mangled)++; - } - (*mangled) += 2; - break; - - case '0': - default: - success = 0; - } - - if (!success) - return success; - - /* Pick off the names and collect them in the temp buffer in the order - in which they are found, separated by '::'. */ - - while (qualifiers-- > 0) - { - int remember_K = 1; - string_clear (&last_name); - - if (*mangled[0] == '_') - (*mangled)++; - - if (*mangled[0] == 't') - { - /* Here we always append to TEMP since we will want to use - the template name without the template parameters as a - constructor or destructor name. The appropriate - (parameter-less) value is returned by demangle_template - in LAST_NAME. We do not remember the template type here, - in order to match the G++ mangling algorithm. */ - success = demangle_template(work, mangled, &temp, - &last_name, 1, 0); - if (!success) - break; - } - else if (*mangled[0] == 'K') - { - int idx; - (*mangled)++; - idx = consume_count_with_underscores (mangled); - if (idx == -1 || idx >= work->numk) - success = 0; - else - string_append (&temp, work->ktypevec[idx]); - remember_K = 0; - - if (!success) break; - } - else - { - if (EDG_DEMANGLING) - { - int namelength; - /* Now recursively demangle the qualifier - * This is necessary to deal with templates in - * mangling styles like EDG */ - namelength = consume_count (mangled); - if (namelength == -1) - { - success = 0; - break; - } - recursively_demangle(work, mangled, &temp, namelength); - } - else - { - string_delete (&last_name); - success = do_type (work, mangled, &last_name); - if (!success) - break; - string_appends (&temp, &last_name); - } - } - - if (remember_K) - remember_Ktype (work, temp.b, LEN_STRING (&temp)); - - if (qualifiers > 0) - string_append (&temp, SCOPE_STRING (work)); - } - - remember_Btype (work, temp.b, LEN_STRING (&temp), bindex); - - /* If we are using the result as a function name, we need to append - the appropriate '::' separated constructor or destructor name. - We do this here because this is the most convenient place, where - we already have a pointer to the name and the length of the name. */ - - if (isfuncname) - { - string_append (&temp, SCOPE_STRING (work)); - if (work -> destructor & 1) - string_append (&temp, "~"); - string_appends (&temp, &last_name); - } - - /* Now either prepend the temp buffer to the result, or append it, - depending upon the state of the append flag. */ - - if (append) - string_appends (result, &temp); - else - { - if (!STRING_EMPTY (result)) - string_append (&temp, SCOPE_STRING (work)); - string_prepends (result, &temp); - } - - string_delete (&last_name); - string_delete (&temp); - return (success); -} - -/* - -LOCAL FUNCTION - - get_count -- convert an ascii count to integer, consuming tokens - -SYNOPSIS - - static int - get_count (const char **type, int *count) - -DESCRIPTION - - Assume that *type points at a count in a mangled name; set - *count to its value, and set *type to the next character after - the count. There are some weird rules in effect here. - - If *type does not point at a string of digits, return zero. - - If *type points at a string of digits followed by an - underscore, set *count to their value as an integer, advance - *type to point *after the underscore, and return 1. - - If *type points at a string of digits not followed by an - underscore, consume only the first digit. Set *count to its - value as an integer, leave *type pointing after that digit, - and return 1. - - The excuse for this odd behavior: in the ARM and HP demangling - styles, a type can be followed by a repeat count of the form - `Nxy', where: - - `x' is a single digit specifying how many additional copies - of the type to append to the argument list, and - - `y' is one or more digits, specifying the zero-based index of - the first repeated argument in the list. Yes, as you're - unmangling the name you can figure this out yourself, but - it's there anyway. - - So, for example, in `bar__3fooFPiN51', the first argument is a - pointer to an integer (`Pi'), and then the next five arguments - are the same (`N5'), and the first repeat is the function's - second argument (`1'). -*/ - -static int -get_count (type, count) - const char **type; - int *count; -{ - const char *p; - int n; - - if (!ISDIGIT ((unsigned char)**type)) - return (0); - else - { - *count = **type - '0'; - (*type)++; - if (ISDIGIT ((unsigned char)**type)) - { - p = *type; - n = *count; - do - { - n *= 10; - n += *p - '0'; - p++; - } - while (ISDIGIT ((unsigned char)*p)); - if (*p == '_') - { - *type = p + 1; - *count = n; - } - } - } - return (1); -} - -/* RESULT will be initialised here; it will be freed on failure. The - value returned is really a type_kind_t. */ - -static int -do_type (work, mangled, result) - struct work_stuff *work; - const char **mangled; - string *result; -{ - int n; - int done; - int success; - string decl; - const char *remembered_type; - int type_quals; - type_kind_t tk = tk_none; - - string_init (&decl); - string_init (result); - - done = 0; - success = 1; - while (success && !done) - { - int member; - switch (**mangled) - { - - /* A pointer type */ - case 'P': - case 'p': - (*mangled)++; - if (! (work -> options & DMGL_JAVA)) - string_prepend (&decl, "*"); - if (tk == tk_none) - tk = tk_pointer; - break; - - /* A reference type */ - case 'R': - (*mangled)++; - string_prepend (&decl, "&"); - if (tk == tk_none) - tk = tk_reference; - break; - - /* An array */ - case 'A': - { - ++(*mangled); - if (!STRING_EMPTY (&decl) - && (decl.b[0] == '*' || decl.b[0] == '&')) - { - string_prepend (&decl, "("); - string_append (&decl, ")"); - } - string_append (&decl, "["); - if (**mangled != '_') - success = demangle_template_value_parm (work, mangled, &decl, - tk_integral); - if (**mangled == '_') - ++(*mangled); - string_append (&decl, "]"); - break; - } - - /* A back reference to a previously seen type */ - case 'T': - (*mangled)++; - if (!get_count (mangled, &n) || n >= work -> ntypes) - { - success = 0; - } - else - { - remembered_type = work -> typevec[n]; - mangled = &remembered_type; - } - break; - - /* A function */ - case 'F': - (*mangled)++; - if (!STRING_EMPTY (&decl) - && (decl.b[0] == '*' || decl.b[0] == '&')) - { - string_prepend (&decl, "("); - string_append (&decl, ")"); - } - /* After picking off the function args, we expect to either find the - function return type (preceded by an '_') or the end of the - string. */ - if (!demangle_nested_args (work, mangled, &decl) - || (**mangled != '_' && **mangled != '\0')) - { - success = 0; - break; - } - if (success && (**mangled == '_')) - (*mangled)++; - break; - - case 'M': - case 'O': - { - type_quals = TYPE_UNQUALIFIED; - - member = **mangled == 'M'; - (*mangled)++; - - string_append (&decl, ")"); - - /* We don't need to prepend `::' for a qualified name; - demangle_qualified will do that for us. */ - if (**mangled != 'Q') - string_prepend (&decl, SCOPE_STRING (work)); - - if (ISDIGIT ((unsigned char)**mangled)) - { - n = consume_count (mangled); - if (n == -1 - || (int) strlen (*mangled) < n) - { - success = 0; - break; - } - string_prependn (&decl, *mangled, n); - *mangled += n; - } - else if (**mangled == 'X' || **mangled == 'Y') - { - string temp; - do_type (work, mangled, &temp); - string_prepends (&decl, &temp); - string_delete (&temp); - } - else if (**mangled == 't') - { - string temp; - string_init (&temp); - success = demangle_template (work, mangled, &temp, - NULL, 1, 1); - if (success) - { - string_prependn (&decl, temp.b, temp.p - temp.b); - string_delete (&temp); - } - else - break; - } - else if (**mangled == 'Q') - { - success = demangle_qualified (work, mangled, &decl, - /*isfuncnam=*/0, - /*append=*/0); - if (!success) - break; - } - else - { - success = 0; - break; - } - - string_prepend (&decl, "("); - if (member) - { - switch (**mangled) - { - case 'C': - case 'V': - case 'u': - type_quals |= code_for_qualifier (**mangled); - (*mangled)++; - break; - - default: - break; - } - - if (*(*mangled)++ != 'F') - { - success = 0; - break; - } - } - if ((member && !demangle_nested_args (work, mangled, &decl)) - || **mangled != '_') - { - success = 0; - break; - } - (*mangled)++; - if (! PRINT_ANSI_QUALIFIERS) - { - break; - } - if (type_quals != TYPE_UNQUALIFIED) - { - APPEND_BLANK (&decl); - string_append (&decl, qualifier_string (type_quals)); - } - break; - } - case 'G': - (*mangled)++; - break; - - case 'C': - case 'V': - case 'u': - if (PRINT_ANSI_QUALIFIERS) - { - if (!STRING_EMPTY (&decl)) - string_prepend (&decl, " "); - - string_prepend (&decl, demangle_qualifier (**mangled)); - } - (*mangled)++; - break; - /* - } - */ - - /* fall through */ - default: - done = 1; - break; - } - } - - if (success) switch (**mangled) - { - /* A qualified name, such as "Outer::Inner". */ - case 'Q': - case 'K': - { - success = demangle_qualified (work, mangled, result, 0, 1); - break; - } - - /* A back reference to a previously seen squangled type */ - case 'B': - (*mangled)++; - if (!get_count (mangled, &n) || n >= work -> numb) - success = 0; - else - string_append (result, work->btypevec[n]); - break; - - case 'X': - case 'Y': - /* A template parm. We substitute the corresponding argument. */ - { - int idx; - - (*mangled)++; - idx = consume_count_with_underscores (mangled); - - if (idx == -1 - || (work->tmpl_argvec && idx >= work->ntmpl_args) - || consume_count_with_underscores (mangled) == -1) - { - success = 0; - break; - } - - if (work->tmpl_argvec) - string_append (result, work->tmpl_argvec[idx]); - else - string_append_template_idx (result, idx); - - success = 1; - } - break; - - default: - success = demangle_fund_type (work, mangled, result); - if (tk == tk_none) - tk = (type_kind_t) success; - break; - } - - if (success) - { - if (!STRING_EMPTY (&decl)) - { - string_append (result, " "); - string_appends (result, &decl); - } - } - else - string_delete (result); - string_delete (&decl); - - if (success) - /* Assume an integral type, if we're not sure. */ - return (int) ((tk == tk_none) ? tk_integral : tk); - else - return 0; -} - -/* Given a pointer to a type string that represents a fundamental type - argument (int, long, unsigned int, etc) in TYPE, a pointer to the - string in which the demangled output is being built in RESULT, and - the WORK structure, decode the types and add them to the result. - - For example: - - "Ci" => "const int" - "Sl" => "signed long" - "CUs" => "const unsigned short" - - The value returned is really a type_kind_t. */ - -static int -demangle_fund_type (work, mangled, result) - struct work_stuff *work; - const char **mangled; - string *result; -{ - int done = 0; - int success = 1; - char buf[10]; - unsigned int dec = 0; - type_kind_t tk = tk_integral; - - /* First pick off any type qualifiers. There can be more than one. */ - - while (!done) - { - switch (**mangled) - { - case 'C': - case 'V': - case 'u': - if (PRINT_ANSI_QUALIFIERS) - { - if (!STRING_EMPTY (result)) - string_prepend (result, " "); - string_prepend (result, demangle_qualifier (**mangled)); - } - (*mangled)++; - break; - case 'U': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "unsigned"); - break; - case 'S': /* signed char only */ - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "signed"); - break; - case 'J': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "__complex"); - break; - default: - done = 1; - break; - } - } - - /* Now pick off the fundamental type. There can be only one. */ - - switch (**mangled) - { - case '\0': - case '_': - break; - case 'v': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "void"); - break; - case 'x': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "long long"); - break; - case 'l': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "long"); - break; - case 'i': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "int"); - break; - case 's': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "short"); - break; - case 'b': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "bool"); - tk = tk_bool; - break; - case 'c': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "char"); - tk = tk_char; - break; - case 'w': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "wchar_t"); - tk = tk_char; - break; - case 'r': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "long double"); - tk = tk_real; - break; - case 'd': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "double"); - tk = tk_real; - break; - case 'f': - (*mangled)++; - APPEND_BLANK (result); - string_append (result, "float"); - tk = tk_real; - break; - case 'G': - (*mangled)++; - if (!ISDIGIT ((unsigned char)**mangled)) - { - success = 0; - break; - } - case 'I': - (*mangled)++; - if (**mangled == '_') - { - int i; - (*mangled)++; - for (i = 0; - i < (long) sizeof (buf) - 1 && **mangled && **mangled != '_'; - (*mangled)++, i++) - buf[i] = **mangled; - if (**mangled != '_') - { - success = 0; - break; - } - buf[i] = '\0'; - (*mangled)++; - } - else - { - strncpy (buf, *mangled, 2); - buf[2] = '\0'; - *mangled += min (strlen (*mangled), 2); - } - sscanf (buf, "%x", &dec); - sprintf (buf, "int%u_t", dec); - APPEND_BLANK (result); - string_append (result, buf); - break; - - /* fall through */ - /* An explicit type, such as "6mytype" or "7integer" */ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - int bindex = register_Btype (work); - string btype; - string_init (&btype); - if (demangle_class_name (work, mangled, &btype)) { - remember_Btype (work, btype.b, LEN_STRING (&btype), bindex); - APPEND_BLANK (result); - string_appends (result, &btype); - } - else - success = 0; - string_delete (&btype); - break; - } - case 't': - { - string btype; - string_init (&btype); - success = demangle_template (work, mangled, &btype, 0, 1, 1); - string_appends (result, &btype); - string_delete (&btype); - break; - } - default: - success = 0; - break; - } - - return success ? ((int) tk) : 0; -} - - -/* Handle a template's value parameter for HP aCC (extension from ARM) - **mangled points to 'S' or 'U' */ - -static int -do_hpacc_template_const_value (work, mangled, result) - struct work_stuff *work ATTRIBUTE_UNUSED; - const char **mangled; - string *result; -{ - int unsigned_const; - - if (**mangled != 'U' && **mangled != 'S') - return 0; - - unsigned_const = (**mangled == 'U'); - - (*mangled)++; - - switch (**mangled) - { - case 'N': - string_append (result, "-"); - /* fall through */ - case 'P': - (*mangled)++; - break; - case 'M': - /* special case for -2^31 */ - string_append (result, "-2147483648"); - (*mangled)++; - return 1; - default: - return 0; - } - - /* We have to be looking at an integer now */ - if (!(ISDIGIT ((unsigned char)**mangled))) - return 0; - - /* We only deal with integral values for template - parameters -- so it's OK to look only for digits */ - while (ISDIGIT ((unsigned char)**mangled)) - { - char_str[0] = **mangled; - string_append (result, char_str); - (*mangled)++; - } - - if (unsigned_const) - string_append (result, "U"); - - /* FIXME? Some day we may have 64-bit (or larger :-) ) constants - with L or LL suffixes. pai/1997-09-03 */ - - return 1; /* success */ -} - -/* Handle a template's literal parameter for HP aCC (extension from ARM) - **mangled is pointing to the 'A' */ - -static int -do_hpacc_template_literal (work, mangled, result) - struct work_stuff *work; - const char **mangled; - string *result; -{ - int literal_len = 0; - char * recurse; - char * recurse_dem; - - if (**mangled != 'A') - return 0; - - (*mangled)++; - - literal_len = consume_count (mangled); - - if (literal_len <= 0) - return 0; - - /* Literal parameters are names of arrays, functions, etc. and the - canonical representation uses the address operator */ - string_append (result, "&"); - - /* Now recursively demangle the literal name */ - recurse = (char *) xmalloc (literal_len + 1); - memcpy (recurse, *mangled, literal_len); - recurse[literal_len] = '\000'; - - recurse_dem = cplus_demangle (recurse, work->options); - - if (recurse_dem) - { - string_append (result, recurse_dem); - free (recurse_dem); - } - else - { - string_appendn (result, *mangled, literal_len); - } - (*mangled) += literal_len; - free (recurse); - - return 1; -} - -static int -snarf_numeric_literal (args, arg) - const char ** args; - string * arg; -{ - if (**args == '-') - { - char_str[0] = '-'; - string_append (arg, char_str); - (*args)++; - } - else if (**args == '+') - (*args)++; - - if (!ISDIGIT ((unsigned char)**args)) - return 0; - - while (ISDIGIT ((unsigned char)**args)) - { - char_str[0] = **args; - string_append (arg, char_str); - (*args)++; - } - - return 1; -} - -/* Demangle the next argument, given by MANGLED into RESULT, which - *should be an uninitialized* string. It will be initialized here, - and free'd should anything go wrong. */ - -static int -do_arg (work, mangled, result) - struct work_stuff *work; - const char **mangled; - string *result; -{ - /* Remember where we started so that we can record the type, for - non-squangling type remembering. */ - const char *start = *mangled; - - string_init (result); - - if (work->nrepeats > 0) - { - --work->nrepeats; - - if (work->previous_argument == 0) - return 0; - - /* We want to reissue the previous type in this argument list. */ - string_appends (result, work->previous_argument); - return 1; - } - - if (**mangled == 'n') - { - /* A squangling-style repeat. */ - (*mangled)++; - work->nrepeats = consume_count(mangled); - - if (work->nrepeats <= 0) - /* This was not a repeat count after all. */ - return 0; - - if (work->nrepeats > 9) - { - if (**mangled != '_') - /* The repeat count should be followed by an '_' in this - case. */ - return 0; - else - (*mangled)++; - } - - /* Now, the repeat is all set up. */ - return do_arg (work, mangled, result); - } - - /* Save the result in WORK->previous_argument so that we can find it - if it's repeated. Note that saving START is not good enough: we - do not want to add additional types to the back-referenceable - type vector when processing a repeated type. */ - if (work->previous_argument) - string_delete (work->previous_argument); - else - work->previous_argument = (string*) xmalloc (sizeof (string)); - - if (!do_type (work, mangled, work->previous_argument)) - return 0; - - string_appends (result, work->previous_argument); - - remember_type (work, start, *mangled - start); - return 1; -} - -static void -remember_type (work, start, len) - struct work_stuff *work; - const char *start; - int len; -{ - char *tem; - - if (work->forgetting_types) - return; - - if (work -> ntypes >= work -> typevec_size) - { - if (work -> typevec_size == 0) - { - work -> typevec_size = 3; - work -> typevec - = (char **) xmalloc (sizeof (char *) * work -> typevec_size); - } - else - { - work -> typevec_size *= 2; - work -> typevec - = (char **) xrealloc ((char *)work -> typevec, - sizeof (char *) * work -> typevec_size); - } - } - tem = xmalloc (len + 1); - memcpy (tem, start, len); - tem[len] = '\0'; - work -> typevec[work -> ntypes++] = tem; -} - - -/* Remember a K type class qualifier. */ -static void -remember_Ktype (work, start, len) - struct work_stuff *work; - const char *start; - int len; -{ - char *tem; - - if (work -> numk >= work -> ksize) - { - if (work -> ksize == 0) - { - work -> ksize = 5; - work -> ktypevec - = (char **) xmalloc (sizeof (char *) * work -> ksize); - } - else - { - work -> ksize *= 2; - work -> ktypevec - = (char **) xrealloc ((char *)work -> ktypevec, - sizeof (char *) * work -> ksize); - } - } - tem = xmalloc (len + 1); - memcpy (tem, start, len); - tem[len] = '\0'; - work -> ktypevec[work -> numk++] = tem; -} - -/* Register a B code, and get an index for it. B codes are registered - as they are seen, rather than as they are completed, so map > - registers map > as B0, and temp as B1 */ - -static int -register_Btype (work) - struct work_stuff *work; -{ - int ret; - - if (work -> numb >= work -> bsize) - { - if (work -> bsize == 0) - { - work -> bsize = 5; - work -> btypevec - = (char **) xmalloc (sizeof (char *) * work -> bsize); - } - else - { - work -> bsize *= 2; - work -> btypevec - = (char **) xrealloc ((char *)work -> btypevec, - sizeof (char *) * work -> bsize); - } - } - ret = work -> numb++; - work -> btypevec[ret] = NULL; - return(ret); -} - -/* Store a value into a previously registered B code type. */ - -static void -remember_Btype (work, start, len, index) - struct work_stuff *work; - const char *start; - int len, index; -{ - char *tem; - - tem = xmalloc (len + 1); - memcpy (tem, start, len); - tem[len] = '\0'; - work -> btypevec[index] = tem; -} - -/* Lose all the info related to B and K type codes. */ -static void -forget_B_and_K_types (work) - struct work_stuff *work; -{ - int i; - - while (work -> numk > 0) - { - i = --(work -> numk); - if (work -> ktypevec[i] != NULL) - { - free (work -> ktypevec[i]); - work -> ktypevec[i] = NULL; - } - } - - while (work -> numb > 0) - { - i = --(work -> numb); - if (work -> btypevec[i] != NULL) - { - free (work -> btypevec[i]); - work -> btypevec[i] = NULL; - } - } -} -/* Forget the remembered types, but not the type vector itself. */ - -static void -forget_types (work) - struct work_stuff *work; -{ - int i; - - while (work -> ntypes > 0) - { - i = --(work -> ntypes); - if (work -> typevec[i] != NULL) - { - free (work -> typevec[i]); - work -> typevec[i] = NULL; - } - } -} - -/* Process the argument list part of the signature, after any class spec - has been consumed, as well as the first 'F' character (if any). For - example: - - "__als__3fooRT0" => process "RT0" - "complexfunc5__FPFPc_PFl_i" => process "PFPc_PFl_i" - - DECLP must be already initialised, usually non-empty. It won't be freed - on failure. - - Note that g++ differs significantly from ARM and lucid style mangling - with regards to references to previously seen types. For example, given - the source fragment: - - class foo { - public: - foo::foo (int, foo &ia, int, foo &ib, int, foo &ic); - }; - - foo::foo (int, foo &ia, int, foo &ib, int, foo &ic) { ia = ib = ic; } - void foo (int, foo &ia, int, foo &ib, int, foo &ic) { ia = ib = ic; } - - g++ produces the names: - - __3fooiRT0iT2iT2 - foo__FiR3fooiT1iT1 - - while lcc (and presumably other ARM style compilers as well) produces: - - foo__FiR3fooT1T2T1T2 - __ct__3fooFiR3fooT1T2T1T2 - - Note that g++ bases its type numbers starting at zero and counts all - previously seen types, while lucid/ARM bases its type numbers starting - at one and only considers types after it has seen the 'F' character - indicating the start of the function args. For lucid/ARM style, we - account for this difference by discarding any previously seen types when - we see the 'F' character, and subtracting one from the type number - reference. - - */ - -static int -demangle_args (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - string arg; - int need_comma = 0; - int r; - int t; - const char *tem; - char temptype; - - if (PRINT_ARG_TYPES) - { - string_append (declp, "("); - if (**mangled == '\0') - { - string_append (declp, "void"); - } - } - - while ((**mangled != '_' && **mangled != '\0' && **mangled != 'e') - || work->nrepeats > 0) - { - if ((**mangled == 'N') || (**mangled == 'T')) - { - temptype = *(*mangled)++; - - if (temptype == 'N') - { - if (!get_count (mangled, &r)) - { - return (0); - } - } - else - { - r = 1; - } - if ((HP_DEMANGLING || ARM_DEMANGLING || EDG_DEMANGLING) && work -> ntypes >= 10) - { - /* If we have 10 or more types we might have more than a 1 digit - index so we'll have to consume the whole count here. This - will lose if the next thing is a type name preceded by a - count but it's impossible to demangle that case properly - anyway. Eg if we already have 12 types is T12Pc "(..., type1, - Pc, ...)" or "(..., type12, char *, ...)" */ - if ((t = consume_count(mangled)) <= 0) - { - return (0); - } - } - else - { - if (!get_count (mangled, &t)) - { - return (0); - } - } - if (LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) - { - t--; - } - /* Validate the type index. Protect against illegal indices from - malformed type strings. */ - if ((t < 0) || (t >= work -> ntypes)) - { - return (0); - } - while (work->nrepeats > 0 || --r >= 0) - { - tem = work -> typevec[t]; - if (need_comma && PRINT_ARG_TYPES) - { - string_append (declp, ", "); - } - if (!do_arg (work, &tem, &arg)) - { - return (0); - } - if (PRINT_ARG_TYPES) - { - string_appends (declp, &arg); - } - string_delete (&arg); - need_comma = 1; - } - } - else - { - if (need_comma && PRINT_ARG_TYPES) - string_append (declp, ", "); - if (!do_arg (work, mangled, &arg)) - return (0); - if (PRINT_ARG_TYPES) - string_appends (declp, &arg); - string_delete (&arg); - need_comma = 1; - } - } - - if (**mangled == 'e') - { - (*mangled)++; - if (PRINT_ARG_TYPES) - { - if (need_comma) - { - string_append (declp, ","); - } - string_append (declp, "..."); - } - } - - if (PRINT_ARG_TYPES) - { - string_append (declp, ")"); - } - return (1); -} - -/* Like demangle_args, but for demangling the argument lists of function - and method pointers or references, not top-level declarations. */ - -static int -demangle_nested_args (work, mangled, declp) - struct work_stuff *work; - const char **mangled; - string *declp; -{ - string* saved_previous_argument; - int result; - int saved_nrepeats; - - /* The G++ name-mangling algorithm does not remember types on nested - argument lists, unless -fsquangling is used, and in that case the - type vector updated by remember_type is not used. So, we turn - off remembering of types here. */ - ++work->forgetting_types; - - /* For the repeat codes used with -fsquangling, we must keep track of - the last argument. */ - saved_previous_argument = work->previous_argument; - saved_nrepeats = work->nrepeats; - work->previous_argument = 0; - work->nrepeats = 0; - - /* Actually demangle the arguments. */ - result = demangle_args (work, mangled, declp); - - /* Restore the previous_argument field. */ - if (work->previous_argument) - { - string_delete (work->previous_argument); - free ((char *) work->previous_argument); - } - work->previous_argument = saved_previous_argument; - --work->forgetting_types; - work->nrepeats = saved_nrepeats; - - return result; -} - -static void -demangle_function_name (work, mangled, declp, scan) - struct work_stuff *work; - const char **mangled; - string *declp; - const char *scan; -{ - size_t i; - string type; - const char *tem; - - string_appendn (declp, (*mangled), scan - (*mangled)); - string_need (declp, 1); - *(declp -> p) = '\0'; - - /* Consume the function name, including the "__" separating the name - from the signature. We are guaranteed that SCAN points to the - separator. */ - - (*mangled) = scan + 2; - /* We may be looking at an instantiation of a template function: - foo__Xt1t2_Ft3t4, where t1, t2, ... are template arguments and a - following _F marks the start of the function arguments. Handle - the template arguments first. */ - - if (HP_DEMANGLING && (**mangled == 'X')) - { - demangle_arm_hp_template (work, mangled, 0, declp); - /* This leaves MANGLED pointing to the 'F' marking func args */ - } - - if (LUCID_DEMANGLING || ARM_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING) - { - - /* See if we have an ARM style constructor or destructor operator. - If so, then just record it, clear the decl, and return. - We can't build the actual constructor/destructor decl until later, - when we recover the class name from the signature. */ - - if (strcmp (declp -> b, "__ct") == 0) - { - work -> constructor += 1; - string_clear (declp); - return; - } - else if (strcmp (declp -> b, "__dt") == 0) - { - work -> destructor += 1; - string_clear (declp); - return; - } - } - - if (declp->p - declp->b >= 3 - && declp->b[0] == 'o' - && declp->b[1] == 'p' - && strchr (cplus_markers, declp->b[2]) != NULL) - { - /* see if it's an assignment expression */ - if (declp->p - declp->b >= 10 /* op$assign_ */ - && memcmp (declp->b + 3, "assign_", 7) == 0) - { - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - int len = declp->p - declp->b - 10; - if ((int) strlen (optable[i].in) == len - && memcmp (optable[i].in, declp->b + 10, len) == 0) - { - string_clear (declp); - string_append (declp, "operator"); - string_append (declp, optable[i].out); - string_append (declp, "="); - break; - } - } - } - else - { - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - int len = declp->p - declp->b - 3; - if ((int) strlen (optable[i].in) == len - && memcmp (optable[i].in, declp->b + 3, len) == 0) - { - string_clear (declp); - string_append (declp, "operator"); - string_append (declp, optable[i].out); - break; - } - } - } - } - else if (declp->p - declp->b >= 5 && memcmp (declp->b, "type", 4) == 0 - && strchr (cplus_markers, declp->b[4]) != NULL) - { - /* type conversion operator */ - tem = declp->b + 5; - if (do_type (work, &tem, &type)) - { - string_clear (declp); - string_append (declp, "operator "); - string_appends (declp, &type); - string_delete (&type); - } - } - else if (declp->b[0] == '_' && declp->b[1] == '_' - && declp->b[2] == 'o' && declp->b[3] == 'p') - { - /* ANSI. */ - /* type conversion operator. */ - tem = declp->b + 4; - if (do_type (work, &tem, &type)) - { - string_clear (declp); - string_append (declp, "operator "); - string_appends (declp, &type); - string_delete (&type); - } - } - else if (declp->b[0] == '_' && declp->b[1] == '_' - && ISLOWER((unsigned char)declp->b[2]) - && ISLOWER((unsigned char)declp->b[3])) - { - if (declp->b[4] == '\0') - { - /* Operator. */ - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - if (strlen (optable[i].in) == 2 - && memcmp (optable[i].in, declp->b + 2, 2) == 0) - { - string_clear (declp); - string_append (declp, "operator"); - string_append (declp, optable[i].out); - break; - } - } - } - else - { - if (declp->b[2] == 'a' && declp->b[5] == '\0') - { - /* Assignment. */ - for (i = 0; i < ARRAY_SIZE (optable); i++) - { - if (strlen (optable[i].in) == 3 - && memcmp (optable[i].in, declp->b + 2, 3) == 0) - { - string_clear (declp); - string_append (declp, "operator"); - string_append (declp, optable[i].out); - break; - } - } - } - } - } -} - -/* a mini string-handling package */ - -static void -string_need (s, n) - string *s; - int n; -{ - int tem; - - if (s->b == NULL) - { - if (n < 32) - { - n = 32; - } - s->p = s->b = xmalloc (n); - s->e = s->b + n; - } - else if (s->e - s->p < n) - { - tem = s->p - s->b; - n += tem; - n *= 2; - s->b = xrealloc (s->b, n); - s->p = s->b + tem; - s->e = s->b + n; - } -} - -static void -string_delete (s) - string *s; -{ - if (s->b != NULL) - { - free (s->b); - s->b = s->e = s->p = NULL; - } -} - -static void -string_init (s) - string *s; -{ - s->b = s->p = s->e = NULL; -} - -static void -string_clear (s) - string *s; -{ - s->p = s->b; -} - -#if 0 - -static int -string_empty (s) - string *s; -{ - return (s->b == s->p); -} - -#endif - -static void -string_append (p, s) - string *p; - const char *s; -{ - int n; - if (s == NULL || *s == '\0') - return; - n = strlen (s); - string_need (p, n); - memcpy (p->p, s, n); - p->p += n; -} - -static void -string_appends (p, s) - string *p, *s; -{ - int n; - - if (s->b != s->p) - { - n = s->p - s->b; - string_need (p, n); - memcpy (p->p, s->b, n); - p->p += n; - } -} - -static void -string_appendn (p, s, n) - string *p; - const char *s; - int n; -{ - if (n != 0) - { - string_need (p, n); - memcpy (p->p, s, n); - p->p += n; - } -} - -static void -string_prepend (p, s) - string *p; - const char *s; -{ - if (s != NULL && *s != '\0') - { - string_prependn (p, s, strlen (s)); - } -} - -static void -string_prepends (p, s) - string *p, *s; -{ - if (s->b != s->p) - { - string_prependn (p, s->b, s->p - s->b); - } -} - -static void -string_prependn (p, s, n) - string *p; - const char *s; - int n; -{ - char *q; - - if (n != 0) - { - string_need (p, n); - for (q = p->p - 1; q >= p->b; q--) - { - q[n] = q[0]; - } - memcpy (p->b, s, n); - p->p += n; - } -} - -static void -string_append_template_idx (s, idx) - string *s; - int idx; -{ - char buf[INTBUF_SIZE + 1 /* 'T' */]; - sprintf(buf, "T%d", idx); - string_append (s, buf); -} diff --git a/contrib/gcc/cppcharset.c b/contrib/gcc/cppcharset.c deleted file mode 100644 index a6a65ed..0000000 --- a/contrib/gcc/cppcharset.c +++ /dev/null @@ -1,1411 +0,0 @@ -/* CPP Library - charsets - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. - - Broken out of c-lex.c Apr 2003, adding valid C99 UCN ranges. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" -#include "cppucnid.h" - -/* Character set handling for C-family languages. - - Terminological note: In what follows, "charset" or "character set" - will be taken to mean both an abstract set of characters and an - encoding for that set. - - The C99 standard discusses two character sets: source and execution. - The source character set is used for internal processing in translation - phases 1 through 4; the execution character set is used thereafter. - Both are required by 5.2.1.2p1 to be multibyte encodings, not wide - character encodings (see 3.7.2, 3.7.3 for the standardese meanings - of these terms). Furthermore, the "basic character set" (listed in - 5.2.1p3) is to be encoded in each with values one byte wide, and is - to appear in the initial shift state. - - It is not explicitly mentioned, but there is also a "wide execution - character set" used to encode wide character constants and wide - string literals; this is supposed to be the result of applying the - standard library function mbstowcs() to an equivalent narrow string - (6.4.5p5). However, the behavior of hexadecimal and octal - \-escapes is at odds with this; they are supposed to be translated - directly to wchar_t values (6.4.4.4p5,6). - - The source character set is not necessarily the character set used - to encode physical source files on disk; translation phase 1 converts - from whatever that encoding is to the source character set. - - The presence of universal character names in C99 (6.4.3 et seq.) - forces the source character set to be isomorphic to ISO 10646, - that is, Unicode. There is no such constraint on the execution - character set; note also that the conversion from source to - execution character set does not occur for identifiers (5.1.1.2p1#5). - - For convenience of implementation, the source character set's - encoding of the basic character set should be identical to the - execution character set OF THE HOST SYSTEM's encoding of the basic - character set, and it should not be a state-dependent encoding. - - cpplib uses UTF-8 or UTF-EBCDIC for the source character set, - depending on whether the host is based on ASCII or EBCDIC (see - respectively Unicode section 2.3/ISO10646 Amendment 2, and Unicode - Technical Report #16). With limited exceptions, it relies on the - system library's iconv() primitive to do charset conversion - (specified in SUSv2). */ - -#if !HAVE_ICONV -/* Make certain that the uses of iconv(), iconv_open(), iconv_close() - below, which are guarded only by if statements with compile-time - constant conditions, do not cause link errors. */ -#define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1) -#define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1) -#define iconv_close(x) (void)0 -#define ICONV_CONST -#endif - -#if HOST_CHARSET == HOST_CHARSET_ASCII -#define SOURCE_CHARSET "UTF-8" -#elif HOST_CHARSET == HOST_CHARSET_EBCDIC -#define SOURCE_CHARSET "UTF-EBCDIC" -#else -#error "Unrecognized basic host character set" -#endif - -#ifndef EILSEQ -#define EILSEQ EINVAL -#endif - -/* This structure is used for a resizable string buffer throughout. */ -/* Don't call it strbuf, as that conflicts with unistd.h on systems - such as DYNIX/ptx where unistd.h includes stropts.h. */ -struct _cpp_strbuf -{ - uchar *text; - size_t asize; - size_t len; -}; - -/* This is enough to hold any string that fits on a single 80-column - line, even if iconv quadruples its size (e.g. conversion from - ASCII to UTF-32) rounded up to a power of two. */ -#define OUTBUF_BLOCK_SIZE 256 - -/* Conversions between UTF-8 and UTF-16/32 are implemented by custom - logic. This is because a depressing number of systems lack iconv, - or have have iconv libraries that do not do these conversions, so - we need a fallback implementation for them. To ensure the fallback - doesn't break due to neglect, it is used on all systems. - - UTF-32 encoding is nice and simple: a four-byte binary number, - constrained to the range 00000000-7FFFFFFF to avoid questions of - signedness. We do have to cope with big- and little-endian - variants. - - UTF-16 encoding uses two-byte binary numbers, again in big- and - little-endian variants, for all values in the 00000000-0000FFFF - range. Values in the 00010000-0010FFFF range are encoded as pairs - of two-byte numbers, called "surrogate pairs": given a number S in - this range, it is mapped to a pair (H, L) as follows: - - H = (S - 0x10000) / 0x400 + 0xD800 - L = (S - 0x10000) % 0x400 + 0xDC00 - - Two-byte values in the D800...DFFF range are ill-formed except as a - component of a surrogate pair. Even if the encoding within a - two-byte value is little-endian, the H member of the surrogate pair - comes first. - - There is no way to encode values in the 00110000-7FFFFFFF range, - which is not currently a problem as there are no assigned code - points in that range; however, the author expects that it will - eventually become necessary to abandon UTF-16 due to this - limitation. Note also that, because of these pairs, UTF-16 does - not meet the requirements of the C standard for a wide character - encoding (see 3.7.3 and 6.4.4.4p11). - - UTF-8 encoding looks like this: - - value range encoded as - 00000000-0000007F 0xxxxxxx - 00000080-000007FF 110xxxxx 10xxxxxx - 00000800-0000FFFF 1110xxxx 10xxxxxx 10xxxxxx - 00010000-001FFFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - 00200000-03FFFFFF 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - 04000000-7FFFFFFF 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - - Values in the 0000D800 ... 0000DFFF range (surrogates) are invalid, - which means that three-byte sequences ED xx yy, with A0 <= xx <= BF, - never occur. Note also that any value that can be encoded by a - given row of the table can also be encoded by all successive rows, - but this is not done; only the shortest possible encoding for any - given value is valid. For instance, the character 07C0 could be - encoded as any of DF 80, E0 9F 80, F0 80 9F 80, F8 80 80 9F 80, or - FC 80 80 80 9F 80. Only the first is valid. - - An implementation note: the transformation from UTF-16 to UTF-8, or - vice versa, is easiest done by using UTF-32 as an intermediary. */ - -/* Internal primitives which go from an UTF-8 byte stream to native-endian - UTF-32 in a cppchar_t, or vice versa; this avoids an extra marshal/unmarshal - operation in several places below. */ -static inline int -one_utf8_to_cppchar (const uchar **inbufp, size_t *inbytesleftp, - cppchar_t *cp) -{ - static const uchar masks[6] = { 0x7F, 0x1F, 0x0F, 0x07, 0x02, 0x01 }; - static const uchar patns[6] = { 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - - cppchar_t c; - const uchar *inbuf = *inbufp; - size_t nbytes, i; - - if (*inbytesleftp < 1) - return EINVAL; - - c = *inbuf; - if (c < 0x80) - { - *cp = c; - *inbytesleftp -= 1; - *inbufp += 1; - return 0; - } - - /* The number of leading 1-bits in the first byte indicates how many - bytes follow. */ - for (nbytes = 2; nbytes < 7; nbytes++) - if ((c & ~masks[nbytes-1]) == patns[nbytes-1]) - goto found; - return EILSEQ; - found: - - if (*inbytesleftp < nbytes) - return EINVAL; - - c = (c & masks[nbytes-1]); - inbuf++; - for (i = 1; i < nbytes; i++) - { - cppchar_t n = *inbuf++; - if ((n & 0xC0) != 0x80) - return EILSEQ; - c = ((c << 6) + (n & 0x3F)); - } - - /* Make sure the shortest possible encoding was used. */ - if (c <= 0x7F && nbytes > 1) return EILSEQ; - if (c <= 0x7FF && nbytes > 2) return EILSEQ; - if (c <= 0xFFFF && nbytes > 3) return EILSEQ; - if (c <= 0x1FFFFF && nbytes > 4) return EILSEQ; - if (c <= 0x3FFFFFF && nbytes > 5) return EILSEQ; - - /* Make sure the character is valid. */ - if (c > 0x7FFFFFFF || (c >= 0xD800 && c <= 0xDFFF)) return EILSEQ; - - *cp = c; - *inbufp = inbuf; - *inbytesleftp -= nbytes; - return 0; -} - -static inline int -one_cppchar_to_utf8 (cppchar_t c, uchar **outbufp, size_t *outbytesleftp) -{ - static const uchar masks[6] = { 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - static const uchar limits[6] = { 0x80, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; - size_t nbytes; - uchar buf[6], *p = &buf[6]; - uchar *outbuf = *outbufp; - - nbytes = 1; - if (c < 0x80) - *--p = c; - else - { - do - { - *--p = ((c & 0x3F) | 0x80); - c >>= 6; - nbytes++; - } - while (c >= 0x3F || (c & limits[nbytes-1])); - *--p = (c | masks[nbytes-1]); - } - - if (*outbytesleftp < nbytes) - return E2BIG; - - while (p < &buf[6]) - *outbuf++ = *p++; - *outbytesleftp -= nbytes; - *outbufp = outbuf; - return 0; -} - -/* The following four functions transform one character between the two - encodings named in the function name. All have the signature - int (*)(iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, - uchar **outbufp, size_t *outbytesleftp) - - BIGEND must have the value 0 or 1, coerced to (iconv_t); it is - interpreted as a boolean indicating whether big-endian or - little-endian encoding is to be used for the member of the pair - that is not UTF-8. - - INBUFP, INBYTESLEFTP, OUTBUFP, OUTBYTESLEFTP work exactly as they - do for iconv. - - The return value is either 0 for success, or an errno value for - failure, which may be E2BIG (need more space), EILSEQ (ill-formed - input sequence), ir EINVAL (incomplete input sequence). */ - -static inline int -one_utf8_to_utf32 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, - uchar **outbufp, size_t *outbytesleftp) -{ - uchar *outbuf; - cppchar_t s = 0; - int rval; - - /* Check for space first, since we know exactly how much we need. */ - if (*outbytesleftp < 4) - return E2BIG; - - rval = one_utf8_to_cppchar (inbufp, inbytesleftp, &s); - if (rval) - return rval; - - outbuf = *outbufp; - outbuf[bigend ? 3 : 0] = (s & 0x000000FF); - outbuf[bigend ? 2 : 1] = (s & 0x0000FF00) >> 8; - outbuf[bigend ? 1 : 2] = (s & 0x00FF0000) >> 16; - outbuf[bigend ? 0 : 3] = (s & 0xFF000000) >> 24; - - *outbufp += 4; - *outbytesleftp -= 4; - return 0; -} - -static inline int -one_utf32_to_utf8 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, - uchar **outbufp, size_t *outbytesleftp) -{ - cppchar_t s; - int rval; - const uchar *inbuf; - - if (*inbytesleftp < 4) - return EINVAL; - - inbuf = *inbufp; - - s = inbuf[bigend ? 0 : 3] << 24; - s += inbuf[bigend ? 1 : 2] << 16; - s += inbuf[bigend ? 2 : 1] << 8; - s += inbuf[bigend ? 3 : 0]; - - if (s >= 0x7FFFFFFF || (s >= 0xD800 && s <= 0xDFFF)) - return EILSEQ; - - rval = one_cppchar_to_utf8 (s, outbufp, outbytesleftp); - if (rval) - return rval; - - *inbufp += 4; - *inbytesleftp -= 4; - return 0; -} - -static inline int -one_utf8_to_utf16 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, - uchar **outbufp, size_t *outbytesleftp) -{ - int rval; - cppchar_t s = 0; - const uchar *save_inbuf = *inbufp; - size_t save_inbytesleft = *inbytesleftp; - uchar *outbuf = *outbufp; - - rval = one_utf8_to_cppchar (inbufp, inbytesleftp, &s); - if (rval) - return rval; - - if (s > 0x0010FFFF) - { - *inbufp = save_inbuf; - *inbytesleftp = save_inbytesleft; - return EILSEQ; - } - - if (s < 0xFFFF) - { - if (*outbytesleftp < 2) - { - *inbufp = save_inbuf; - *inbytesleftp = save_inbytesleft; - return E2BIG; - } - outbuf[bigend ? 1 : 0] = (s & 0x00FF); - outbuf[bigend ? 0 : 1] = (s & 0xFF00) >> 8; - - *outbufp += 2; - *outbytesleftp -= 2; - return 0; - } - else - { - cppchar_t hi, lo; - - if (*outbytesleftp < 4) - { - *inbufp = save_inbuf; - *inbytesleftp = save_inbytesleft; - return E2BIG; - } - - hi = (s - 0x10000) / 0x400 + 0xD800; - lo = (s - 0x10000) % 0x400 + 0xDC00; - - /* Even if we are little-endian, put the high surrogate first. - ??? Matches practice? */ - outbuf[bigend ? 1 : 0] = (hi & 0x00FF); - outbuf[bigend ? 0 : 1] = (hi & 0xFF00) >> 8; - outbuf[bigend ? 3 : 2] = (lo & 0x00FF); - outbuf[bigend ? 2 : 3] = (lo & 0xFF00) >> 8; - - *outbufp += 4; - *outbytesleftp -= 4; - return 0; - } -} - -static inline int -one_utf16_to_utf8 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, - uchar **outbufp, size_t *outbytesleftp) -{ - cppchar_t s; - const uchar *inbuf = *inbufp; - int rval; - - if (*inbytesleftp < 2) - return EINVAL; - s = inbuf[bigend ? 0 : 1] << 8; - s += inbuf[bigend ? 1 : 0]; - - /* Low surrogate without immediately preceding high surrogate is invalid. */ - if (s >= 0xDC00 && s <= 0xDFFF) - return EILSEQ; - /* High surrogate must have a following low surrogate. */ - else if (s >= 0xD800 && s <= 0xDBFF) - { - cppchar_t hi = s, lo; - if (*inbytesleftp < 4) - return EINVAL; - - lo = inbuf[bigend ? 2 : 3] << 8; - lo += inbuf[bigend ? 3 : 2]; - - if (lo < 0xDC00 || lo > 0xDFFF) - return EILSEQ; - - s = (hi - 0xD800) * 0x400 + (lo - 0xDC00) + 0x10000; - } - - rval = one_cppchar_to_utf8 (s, outbufp, outbytesleftp); - if (rval) - return rval; - - /* Success - update the input pointers (one_cppchar_to_utf8 has done - the output pointers for us). */ - if (s <= 0xFFFF) - { - *inbufp += 2; - *inbytesleftp -= 2; - } - else - { - *inbufp += 4; - *inbytesleftp -= 4; - } - return 0; -} - -/* Helper routine for the next few functions. The 'const' on - one_conversion means that we promise not to modify what function is - pointed to, which lets the inliner see through it. */ - -static inline bool -conversion_loop (int (*const one_conversion)(iconv_t, const uchar **, size_t *, - uchar **, size_t *), - iconv_t cd, const uchar *from, size_t flen, struct _cpp_strbuf *to) -{ - const uchar *inbuf; - uchar *outbuf; - size_t inbytesleft, outbytesleft; - int rval; - - inbuf = from; - inbytesleft = flen; - outbuf = to->text + to->len; - outbytesleft = to->asize - to->len; - - for (;;) - { - do - rval = one_conversion (cd, &inbuf, &inbytesleft, - &outbuf, &outbytesleft); - while (inbytesleft && !rval); - - if (__builtin_expect (inbytesleft == 0, 1)) - { - to->len = to->asize - outbytesleft; - return true; - } - if (rval != E2BIG) - { - errno = rval; - return false; - } - - outbytesleft += OUTBUF_BLOCK_SIZE; - to->asize += OUTBUF_BLOCK_SIZE; - to->text = xrealloc (to->text, to->asize); - outbuf = to->text + to->asize - outbytesleft; - } -} - - -/* These functions convert entire strings between character sets. - They all have the signature - - bool (*)(iconv_t cd, const uchar *from, size_t flen, struct _cpp_strbuf *to); - - The input string FROM is converted as specified by the function - name plus the iconv descriptor CD (which may be fake), and the - result appended to TO. On any error, false is returned, otherwise true. */ - -/* These four use the custom conversion code above. */ -static bool -convert_utf8_utf16 (iconv_t cd, const uchar *from, size_t flen, - struct _cpp_strbuf *to) -{ - return conversion_loop (one_utf8_to_utf16, cd, from, flen, to); -} - -static bool -convert_utf8_utf32 (iconv_t cd, const uchar *from, size_t flen, - struct _cpp_strbuf *to) -{ - return conversion_loop (one_utf8_to_utf32, cd, from, flen, to); -} - -static bool -convert_utf16_utf8 (iconv_t cd, const uchar *from, size_t flen, - struct _cpp_strbuf *to) -{ - return conversion_loop (one_utf16_to_utf8, cd, from, flen, to); -} - -static bool -convert_utf32_utf8 (iconv_t cd, const uchar *from, size_t flen, - struct _cpp_strbuf *to) -{ - return conversion_loop (one_utf32_to_utf8, cd, from, flen, to); -} - -/* Identity conversion, used when we have no alternative. */ -static bool -convert_no_conversion (iconv_t cd ATTRIBUTE_UNUSED, - const uchar *from, size_t flen, struct _cpp_strbuf *to) -{ - if (to->len + flen > to->asize) - { - to->asize = to->len + flen; - to->text = xrealloc (to->text, to->asize); - } - memcpy (to->text + to->len, from, flen); - to->len += flen; - return true; -} - -/* And this one uses the system iconv primitive. It's a little - different, since iconv's interface is a little different. */ -#if HAVE_ICONV -static bool -convert_using_iconv (iconv_t cd, const uchar *from, size_t flen, - struct _cpp_strbuf *to) -{ - ICONV_CONST char *inbuf; - char *outbuf; - size_t inbytesleft, outbytesleft; - - /* Reset conversion descriptor and check that it is valid. */ - if (iconv (cd, 0, 0, 0, 0) == (size_t)-1) - return false; - - inbuf = (ICONV_CONST char *)from; - inbytesleft = flen; - outbuf = (char *)to->text + to->len; - outbytesleft = to->asize - to->len; - - for (;;) - { - iconv (cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); - if (__builtin_expect (inbytesleft == 0, 1)) - { - to->len = to->asize - outbytesleft; - return true; - } - if (errno != E2BIG) - return false; - - outbytesleft += OUTBUF_BLOCK_SIZE; - to->asize += OUTBUF_BLOCK_SIZE; - to->text = xrealloc (to->text, to->asize); - outbuf = (char *)to->text + to->asize - outbytesleft; - } -} -#else -#define convert_using_iconv 0 /* prevent undefined symbol error below */ -#endif - -/* Arrange for the above custom conversion logic to be used automatically - when conversion between a suitable pair of character sets is requested. */ - -#define APPLY_CONVERSION(CONVERTER, FROM, FLEN, TO) \ - CONVERTER.func (CONVERTER.cd, FROM, FLEN, TO) - -struct conversion -{ - const char *pair; - convert_f func; - iconv_t fake_cd; -}; -static const struct conversion conversion_tab[] = { - { "UTF-8/UTF-32LE", convert_utf8_utf32, (iconv_t)0 }, - { "UTF-8/UTF-32BE", convert_utf8_utf32, (iconv_t)1 }, - { "UTF-8/UTF-16LE", convert_utf8_utf16, (iconv_t)0 }, - { "UTF-8/UTF-16BE", convert_utf8_utf16, (iconv_t)1 }, - { "UTF-32LE/UTF-8", convert_utf32_utf8, (iconv_t)0 }, - { "UTF-32BE/UTF-8", convert_utf32_utf8, (iconv_t)1 }, - { "UTF-16LE/UTF-8", convert_utf16_utf8, (iconv_t)0 }, - { "UTF-16BE/UTF-8", convert_utf16_utf8, (iconv_t)1 }, -}; - -/* Subroutine of cpp_init_iconv: initialize and return a - cset_converter structure for conversion from FROM to TO. If - iconv_open() fails, issue an error and return an identity - converter. Silently return an identity converter if FROM and TO - are identical. */ -static struct cset_converter -init_iconv_desc (cpp_reader *pfile, const char *to, const char *from) -{ - struct cset_converter ret; - char *pair; - size_t i; - - if (!strcasecmp (to, from)) - { - ret.func = convert_no_conversion; - ret.cd = (iconv_t) -1; - return ret; - } - - pair = alloca(strlen(to) + strlen(from) + 2); - - strcpy(pair, from); - strcat(pair, "/"); - strcat(pair, to); - for (i = 0; i < ARRAY_SIZE (conversion_tab); i++) - if (!strcasecmp (pair, conversion_tab[i].pair)) - { - ret.func = conversion_tab[i].func; - ret.cd = conversion_tab[i].fake_cd; - return ret; - } - - /* No custom converter - try iconv. */ - if (HAVE_ICONV) - { - ret.func = convert_using_iconv; - ret.cd = iconv_open (to, from); - - if (ret.cd == (iconv_t) -1) - { - if (errno == EINVAL) - cpp_error (pfile, CPP_DL_ERROR, /* XXX should be DL_SORRY */ - "conversion from %s to %s not supported by iconv", - from, to); - else - cpp_errno (pfile, CPP_DL_ERROR, "iconv_open"); - - ret.func = convert_no_conversion; - } - } - else - { - cpp_error (pfile, CPP_DL_ERROR, /* XXX should be DL_SORRY */ - "no iconv implementation, cannot convert from %s to %s", - from, to); - ret.func = convert_no_conversion; - ret.cd = (iconv_t) -1; - } - return ret; -} - -/* If charset conversion is requested, initialize iconv(3) descriptors - for conversion from the source character set to the execution - character sets. If iconv is not present in the C library, and - conversion is requested, issue an error. */ - -void -cpp_init_iconv (cpp_reader *pfile) -{ - const char *ncset = CPP_OPTION (pfile, narrow_charset); - const char *wcset = CPP_OPTION (pfile, wide_charset); - const char *default_wcset; - - bool be = CPP_OPTION (pfile, bytes_big_endian); - - if (CPP_OPTION (pfile, wchar_precision) >= 32) - default_wcset = be ? "UTF-32BE" : "UTF-32LE"; - else if (CPP_OPTION (pfile, wchar_precision) >= 16) - default_wcset = be ? "UTF-16BE" : "UTF-16LE"; - else - /* This effectively means that wide strings are not supported, - so don't do any conversion at all. */ - default_wcset = SOURCE_CHARSET; - - if (!ncset) - ncset = SOURCE_CHARSET; - if (!wcset) - wcset = default_wcset; - - pfile->narrow_cset_desc = init_iconv_desc (pfile, ncset, SOURCE_CHARSET); - pfile->wide_cset_desc = init_iconv_desc (pfile, wcset, SOURCE_CHARSET); -} - -void -_cpp_destroy_iconv (cpp_reader *pfile) -{ - if (HAVE_ICONV) - { - if (pfile->narrow_cset_desc.func == convert_using_iconv) - iconv_close (pfile->narrow_cset_desc.cd); - if (pfile->wide_cset_desc.func == convert_using_iconv) - iconv_close (pfile->wide_cset_desc.cd); - } -} - - -/* Utility routine that computes a mask of the form 0000...111... with - WIDTH 1-bits. */ -static inline size_t -width_to_mask (size_t width) -{ - width = MIN (width, BITS_PER_CPPCHAR_T); - if (width >= CHAR_BIT * sizeof (size_t)) - return ~(size_t) 0; - else - return ((size_t) 1 << width) - 1; -} - - - -/* Returns 1 if C is valid in an identifier, 2 if C is valid except at - the start of an identifier, and 0 if C is not valid in an - identifier. We assume C has already gone through the checks of - _cpp_valid_ucn. The algorithm is a simple binary search on the - table defined in cppucnid.h. */ - -static int -ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c) -{ - int mn, mx, md; - - mn = -1; - mx = ARRAY_SIZE (ucnranges); - while (mx - mn > 1) - { - md = (mn + mx) / 2; - if (c < ucnranges[md].lo) - mx = md; - else if (c > ucnranges[md].hi) - mn = md; - else - goto found; - } - return 0; - - found: - /* When -pedantic, we require the character to have been listed by - the standard for the current language. Otherwise, we accept the - union of the acceptable sets for C++98 and C99. */ - if (CPP_PEDANTIC (pfile) - && ((CPP_OPTION (pfile, c99) && !(ucnranges[md].flags & C99)) - || (CPP_OPTION (pfile, cplusplus) - && !(ucnranges[md].flags & CXX)))) - return 0; - - /* In C99, UCN digits may not begin identifiers. */ - if (CPP_OPTION (pfile, c99) && (ucnranges[md].flags & DIG)) - return 2; - - return 1; -} - -/* [lex.charset]: The character designated by the universal character - name \UNNNNNNNN is that character whose character short name in - ISO/IEC 10646 is NNNNNNNN; the character designated by the - universal character name \uNNNN is that character whose character - short name in ISO/IEC 10646 is 0000NNNN. If the hexadecimal value - for a universal character name is less than 0x20 or in the range - 0x7F-0x9F (inclusive), or if the universal character name - designates a character in the basic source character set, then the - program is ill-formed. - - *PSTR must be preceded by "\u" or "\U"; it is assumed that the - buffer end is delimited by a non-hex digit. Returns zero if UCNs - are not part of the relevant standard, or if the string beginning - at *PSTR doesn't syntactically match the form 'NNNN' or 'NNNNNNNN'. - - Otherwise the nonzero value of the UCN, whether valid or invalid, - is returned. Diagnostics are emitted for invalid values. PSTR - is updated to point one beyond the UCN, or to the syntactically - invalid character. - - IDENTIFIER_POS is 0 when not in an identifier, 1 for the start of - an identifier, or 2 otherwise. -*/ - -cppchar_t -_cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, - const uchar *limit, int identifier_pos) -{ - cppchar_t result, c; - unsigned int length; - const uchar *str = *pstr; - const uchar *base = str - 2; - - if (!CPP_OPTION (pfile, cplusplus) && !CPP_OPTION (pfile, c99)) - cpp_error (pfile, CPP_DL_WARNING, - "universal character names are only valid in C++ and C99"); - else if (CPP_WTRADITIONAL (pfile) && identifier_pos == 0) - cpp_error (pfile, CPP_DL_WARNING, - "the meaning of '\\%c' is different in traditional C", - (int) str[-1]); - - if (str[-1] == 'u') - length = 4; - else if (str[-1] == 'U') - length = 8; - else - abort(); - - result = 0; - do - { - c = *str; - if (!ISXDIGIT (c)) - break; - str++; - result = (result << 4) + hex_value (c); - } - while (--length && str < limit); - - *pstr = str; - if (length) - { - /* We'll error when we try it out as the start of an identifier. */ - cpp_error (pfile, CPP_DL_ERROR, - "incomplete universal character name %.*s", - (int) (str - base), base); - result = 1; - } - /* The standard permits $, @ and ` to be specified as UCNs. We use - hex escapes so that this also works with EBCDIC hosts. */ - else if ((result < 0xa0 - && (result != 0x24 && result != 0x40 && result != 0x60)) - || (result & 0x80000000) - || (result >= 0xD800 && result <= 0xDFFF)) - { - cpp_error (pfile, CPP_DL_ERROR, - "%.*s is not a valid universal character", - (int) (str - base), base); - result = 1; - } - else if (identifier_pos) - { - int validity = ucn_valid_in_identifier (pfile, result); - - if (validity == 0) - cpp_error (pfile, CPP_DL_ERROR, - "universal character %.*s is not valid in an identifier", - (int) (str - base), base); - else if (validity == 2 && identifier_pos == 1) - cpp_error (pfile, CPP_DL_ERROR, - "universal character %.*s is not valid at the start of an identifier", - (int) (str - base), base); - } - - if (result == 0) - result = 1; - - return result; -} - -/* Convert an UCN, pointed to by FROM, to UTF-8 encoding, then translate - it to the execution character set and write the result into TBUF. - An advanced pointer is returned. Issues all relevant diagnostics. */ - - -static const uchar * -convert_ucn (cpp_reader *pfile, const uchar *from, const uchar *limit, - struct _cpp_strbuf *tbuf, bool wide) -{ - cppchar_t ucn; - uchar buf[6]; - uchar *bufp = buf; - size_t bytesleft = 6; - int rval; - struct cset_converter cvt - = wide ? pfile->wide_cset_desc : pfile->narrow_cset_desc; - - from++; /* Skip u/U. */ - ucn = _cpp_valid_ucn (pfile, &from, limit, 0); - - rval = one_cppchar_to_utf8 (ucn, &bufp, &bytesleft); - if (rval) - { - errno = rval; - cpp_errno (pfile, CPP_DL_ERROR, - "converting UCN to source character set"); - } - else if (!APPLY_CONVERSION (cvt, buf, 6 - bytesleft, tbuf)) - cpp_errno (pfile, CPP_DL_ERROR, - "converting UCN to execution character set"); - - return from; -} - -static void -emit_numeric_escape (cpp_reader *pfile, cppchar_t n, - struct _cpp_strbuf *tbuf, bool wide) -{ - if (wide) - { - /* We have to render this into the target byte order, which may not - be our byte order. */ - bool bigend = CPP_OPTION (pfile, bytes_big_endian); - size_t width = CPP_OPTION (pfile, wchar_precision); - size_t cwidth = CPP_OPTION (pfile, char_precision); - size_t cmask = width_to_mask (cwidth); - size_t nbwc = width / cwidth; - size_t i; - size_t off = tbuf->len; - cppchar_t c; - - if (tbuf->len + nbwc > tbuf->asize) - { - tbuf->asize += OUTBUF_BLOCK_SIZE; - tbuf->text = xrealloc (tbuf->text, tbuf->asize); - } - - for (i = 0; i < nbwc; i++) - { - c = n & cmask; - n >>= cwidth; - tbuf->text[off + (bigend ? nbwc - i - 1 : i)] = c; - } - tbuf->len += nbwc; - } - else - { - if (tbuf->len + 1 > tbuf->asize) - { - tbuf->asize += OUTBUF_BLOCK_SIZE; - tbuf->text = xrealloc (tbuf->text, tbuf->asize); - } - tbuf->text[tbuf->len++] = n; - } -} - -/* Convert a hexadecimal escape, pointed to by FROM, to the execution - character set and write it into the string buffer TBUF. Returns an - advanced pointer, and issues diagnostics as necessary. - No character set translation occurs; this routine always produces the - execution-set character with numeric value equal to the given hex - number. You can, e.g. generate surrogate pairs this way. */ -static const uchar * -convert_hex (cpp_reader *pfile, const uchar *from, const uchar *limit, - struct _cpp_strbuf *tbuf, bool wide) -{ - cppchar_t c, n = 0, overflow = 0; - int digits_found = 0; - size_t width = (wide ? CPP_OPTION (pfile, wchar_precision) - : CPP_OPTION (pfile, char_precision)); - size_t mask = width_to_mask (width); - - if (CPP_WTRADITIONAL (pfile)) - cpp_error (pfile, CPP_DL_WARNING, - "the meaning of '\\x' is different in traditional C"); - - from++; /* Skip 'x'. */ - while (from < limit) - { - c = *from; - if (! hex_p (c)) - break; - from++; - overflow |= n ^ (n << 4 >> 4); - n = (n << 4) + hex_value (c); - digits_found = 1; - } - - if (!digits_found) - { - cpp_error (pfile, CPP_DL_ERROR, - "\\x used with no following hex digits"); - return from; - } - - if (overflow | (n != (n & mask))) - { - cpp_error (pfile, CPP_DL_PEDWARN, - "hex escape sequence out of range"); - n &= mask; - } - - emit_numeric_escape (pfile, n, tbuf, wide); - - return from; -} - -/* Convert an octal escape, pointed to by FROM, to the execution - character set and write it into the string buffer TBUF. Returns an - advanced pointer, and issues diagnostics as necessary. - No character set translation occurs; this routine always produces the - execution-set character with numeric value equal to the given octal - number. */ -static const uchar * -convert_oct (cpp_reader *pfile, const uchar *from, const uchar *limit, - struct _cpp_strbuf *tbuf, bool wide) -{ - size_t count = 0; - cppchar_t c, n = 0; - size_t width = (wide ? CPP_OPTION (pfile, wchar_precision) - : CPP_OPTION (pfile, char_precision)); - size_t mask = width_to_mask (width); - bool overflow = false; - - while (from < limit && count++ < 3) - { - c = *from; - if (c < '0' || c > '7') - break; - from++; - overflow |= n ^ (n << 3 >> 3); - n = (n << 3) + c - '0'; - } - - if (n != (n & mask)) - { - cpp_error (pfile, CPP_DL_PEDWARN, - "octal escape sequence out of range"); - n &= mask; - } - - emit_numeric_escape (pfile, n, tbuf, wide); - - return from; -} - -/* Convert an escape sequence (pointed to by FROM) to its value on - the target, and to the execution character set. Do not scan past - LIMIT. Write the converted value into TBUF. Returns an advanced - pointer. Handles all relevant diagnostics. */ -static const uchar * -convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, - struct _cpp_strbuf *tbuf, bool wide) -{ - /* Values of \a \b \e \f \n \r \t \v respectively. */ -#if HOST_CHARSET == HOST_CHARSET_ASCII - static const uchar charconsts[] = { 7, 8, 27, 12, 10, 13, 9, 11 }; -#elif HOST_CHARSET == HOST_CHARSET_EBCDIC - static const uchar charconsts[] = { 47, 22, 39, 12, 21, 13, 5, 11 }; -#else -#error "unknown host character set" -#endif - - uchar c; - struct cset_converter cvt - = wide ? pfile->wide_cset_desc : pfile->narrow_cset_desc; - - c = *from; - switch (c) - { - /* UCNs, hex escapes, and octal escapes are processed separately. */ - case 'u': case 'U': - return convert_ucn (pfile, from, limit, tbuf, wide); - - case 'x': - return convert_hex (pfile, from, limit, tbuf, wide); - break; - - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - return convert_oct (pfile, from, limit, tbuf, wide); - - /* Various letter escapes. Get the appropriate host-charset - value into C. */ - case '\\': case '\'': case '"': case '?': break; - - case '(': case '{': case '[': case '%': - /* '\(', etc, can be used at the beginning of a line in a long - string split onto multiple lines with \-newline, to prevent - Emacs or other text editors from getting confused. '\%' can - be used to prevent SCCS from mangling printf format strings. */ - if (CPP_PEDANTIC (pfile)) - goto unknown; - break; - - case 'b': c = charconsts[1]; break; - case 'f': c = charconsts[3]; break; - case 'n': c = charconsts[4]; break; - case 'r': c = charconsts[5]; break; - case 't': c = charconsts[6]; break; - case 'v': c = charconsts[7]; break; - - case 'a': - if (CPP_WTRADITIONAL (pfile)) - cpp_error (pfile, CPP_DL_WARNING, - "the meaning of '\\a' is different in traditional C"); - c = charconsts[0]; - break; - - case 'e': case 'E': - if (CPP_PEDANTIC (pfile)) - cpp_error (pfile, CPP_DL_PEDWARN, - "non-ISO-standard escape sequence, '\\%c'", (int) c); - c = charconsts[2]; - break; - - default: - unknown: - if (ISGRAPH (c)) - cpp_error (pfile, CPP_DL_PEDWARN, - "unknown escape sequence '\\%c'", (int) c); - else - cpp_error (pfile, CPP_DL_PEDWARN, - "unknown escape sequence: '\\%03o'", (int) c); - } - - /* Now convert what we have to the execution character set. */ - if (!APPLY_CONVERSION (cvt, &c, 1, tbuf)) - cpp_errno (pfile, CPP_DL_ERROR, - "converting escape sequence to execution character set"); - - return from + 1; -} - -/* FROM is an array of cpp_string structures of length COUNT. These - are to be converted from the source to the execution character set, - escape sequences translated, and finally all are to be - concatenated. WIDE indicates whether or not to produce a wide - string. The result is written into TO. Returns true for success, - false for failure. */ -bool -cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count, - cpp_string *to, bool wide) -{ - struct _cpp_strbuf tbuf; - const uchar *p, *base, *limit; - size_t i; - struct cset_converter cvt - = wide ? pfile->wide_cset_desc : pfile->narrow_cset_desc; - - tbuf.asize = MAX (OUTBUF_BLOCK_SIZE, from->len); - tbuf.text = xmalloc (tbuf.asize); - tbuf.len = 0; - - for (i = 0; i < count; i++) - { - p = from[i].text; - if (*p == 'L') p++; - p++; /* Skip leading quote. */ - limit = from[i].text + from[i].len - 1; /* Skip trailing quote. */ - - for (;;) - { - base = p; - while (p < limit && *p != '\\') - p++; - if (p > base) - { - /* We have a run of normal characters; these can be fed - directly to convert_cset. */ - if (!APPLY_CONVERSION (cvt, base, p - base, &tbuf)) - goto fail; - } - if (p == limit) - break; - - p = convert_escape (pfile, p + 1, limit, &tbuf, wide); - } - } - /* NUL-terminate the 'to' buffer and translate it to a cpp_string - structure. */ - emit_numeric_escape (pfile, 0, &tbuf, wide); - tbuf.text = xrealloc (tbuf.text, tbuf.len); - to->text = tbuf.text; - to->len = tbuf.len; - return true; - - fail: - cpp_errno (pfile, CPP_DL_ERROR, "converting to execution character set"); - free (tbuf.text); - return false; -} - -/* Subroutine of do_line and do_linemarker. Convert escape sequences - in a string, but do not perform character set conversion. */ -bool -_cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *in, - cpp_string *out) -{ - struct cset_converter save_narrow_cset_desc = pfile->narrow_cset_desc; - bool retval; - - pfile->narrow_cset_desc.func = convert_no_conversion; - pfile->narrow_cset_desc.cd = (iconv_t) -1; - - retval = cpp_interpret_string (pfile, in, 1, out, false); - - pfile->narrow_cset_desc = save_narrow_cset_desc; - return retval; -} - - -/* Subroutine of cpp_interpret_charconst which performs the conversion - to a number, for narrow strings. STR is the string structure returned - by cpp_interpret_string. PCHARS_SEEN and UNSIGNEDP are as for - cpp_interpret_charconst. */ -static cppchar_t -narrow_str_to_charconst (cpp_reader *pfile, cpp_string str, - unsigned int *pchars_seen, int *unsignedp) -{ - size_t width = CPP_OPTION (pfile, char_precision); - size_t max_chars = CPP_OPTION (pfile, int_precision) / width; - size_t mask = width_to_mask (width); - size_t i; - cppchar_t result, c; - bool unsigned_p; - - /* The value of a multi-character character constant, or a - single-character character constant whose representation in the - execution character set is more than one byte long, is - implementation defined. This implementation defines it to be the - number formed by interpreting the byte sequence in memory as a - big-endian binary number. If overflow occurs, the high bytes are - lost, and a warning is issued. - - We don't want to process the NUL terminator handed back by - cpp_interpret_string. */ - result = 0; - for (i = 0; i < str.len - 1; i++) - { - c = str.text[i] & mask; - if (width < BITS_PER_CPPCHAR_T) - result = (result << width) | c; - else - result = c; - } - - if (i > max_chars) - { - i = max_chars; - cpp_error (pfile, CPP_DL_WARNING, - "character constant too long for its type"); - } - else if (i > 1 && CPP_OPTION (pfile, warn_multichar)) - cpp_error (pfile, CPP_DL_WARNING, "multi-character character constant"); - - /* Multichar constants are of type int and therefore signed. */ - if (i > 1) - unsigned_p = 0; - else - unsigned_p = CPP_OPTION (pfile, unsigned_char); - - /* Truncate the constant to its natural width, and simultaneously - sign- or zero-extend to the full width of cppchar_t. - For single-character constants, the value is WIDTH bits wide. - For multi-character constants, the value is INT_PRECISION bits wide. */ - if (i > 1) - width = CPP_OPTION (pfile, int_precision); - if (width < BITS_PER_CPPCHAR_T) - { - mask = ((cppchar_t) 1 << width) - 1; - if (unsigned_p || !(result & (1 << (width - 1)))) - result &= mask; - else - result |= ~mask; - } - *pchars_seen = i; - *unsignedp = unsigned_p; - return result; -} - -/* Subroutine of cpp_interpret_charconst which performs the conversion - to a number, for wide strings. STR is the string structure returned - by cpp_interpret_string. PCHARS_SEEN and UNSIGNEDP are as for - cpp_interpret_charconst. */ -static cppchar_t -wide_str_to_charconst (cpp_reader *pfile, cpp_string str, - unsigned int *pchars_seen, int *unsignedp) -{ - bool bigend = CPP_OPTION (pfile, bytes_big_endian); - size_t width = CPP_OPTION (pfile, wchar_precision); - size_t cwidth = CPP_OPTION (pfile, char_precision); - size_t mask = width_to_mask (width); - size_t cmask = width_to_mask (cwidth); - size_t nbwc = width / cwidth; - size_t off, i; - cppchar_t result = 0, c; - - /* This is finicky because the string is in the target's byte order, - which may not be our byte order. Only the last character, ignoring - the NUL terminator, is relevant. */ - off = str.len - (nbwc * 2); - result = 0; - for (i = 0; i < nbwc; i++) - { - c = bigend ? str.text[off + i] : str.text[off + nbwc - i - 1]; - result = (result << cwidth) | (c & cmask); - } - - /* Wide character constants have type wchar_t, and a single - character exactly fills a wchar_t, so a multi-character wide - character constant is guaranteed to overflow. */ - if (off > 0) - cpp_error (pfile, CPP_DL_WARNING, - "character constant too long for its type"); - - /* Truncate the constant to its natural width, and simultaneously - sign- or zero-extend to the full width of cppchar_t. */ - if (width < BITS_PER_CPPCHAR_T) - { - if (CPP_OPTION (pfile, unsigned_wchar) || !(result & (1 << (width - 1)))) - result &= mask; - else - result |= ~mask; - } - - *unsignedp = CPP_OPTION (pfile, unsigned_wchar); - *pchars_seen = 1; - return result; -} - -/* Interpret a (possibly wide) character constant in TOKEN. - PCHARS_SEEN points to a variable that is filled in with the number - of characters seen, and UNSIGNEDP to a variable that indicates - whether the result has signed type. */ -cppchar_t -cpp_interpret_charconst (cpp_reader *pfile, const cpp_token *token, - unsigned int *pchars_seen, int *unsignedp) -{ - cpp_string str = { 0, 0 }; - bool wide = (token->type == CPP_WCHAR); - cppchar_t result; - - /* an empty constant will appear as L'' or '' */ - if (token->val.str.len == (size_t) (2 + wide)) - { - cpp_error (pfile, CPP_DL_ERROR, "empty character constant"); - return 0; - } - else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, wide)) - return 0; - - if (wide) - result = wide_str_to_charconst (pfile, str, pchars_seen, unsignedp); - else - result = narrow_str_to_charconst (pfile, str, pchars_seen, unsignedp); - - if (str.text != token->val.str.text) - free ((void *)str.text); - - return result; -} - -uchar * -_cpp_convert_input (cpp_reader *pfile, const char *input_charset, - uchar *input, size_t size, size_t len, off_t *st_size) -{ - struct cset_converter input_cset; - struct _cpp_strbuf to; - - input_cset = init_iconv_desc (pfile, SOURCE_CHARSET, input_charset); - if (input_cset.func == convert_no_conversion) - { - to.text = input; - to.asize = size; - to.len = len; - } - else - { - to.asize = MAX (65536, len); - to.text = xmalloc (to.asize); - to.len = 0; - - if (!APPLY_CONVERSION (input_cset, input, len, &to)) - cpp_error (pfile, CPP_DL_ERROR, - "failure to convert %s to %s", - CPP_OPTION (pfile, input_charset), SOURCE_CHARSET); - - free (input); - } - - /* Clean up the mess. */ - if (input_cset.func == convert_using_iconv) - iconv_close (input_cset.cd); - - /* Resize buffer if we allocated substantially too much, or if we - haven't enough space for the \n-terminator. */ - if (to.len + 4096 < to.asize || to.len >= to.asize) - to.text = xrealloc (to.text, to.len + 1); - - to.text[to.len] = '\n'; - *st_size = to.len; - return to.text; -} - -const char * -_cpp_default_encoding (void) -{ - const char *current_encoding = NULL; - -#if defined (HAVE_LOCALE_H) && defined (HAVE_LANGINFO_CODESET) - setlocale (LC_CTYPE, ""); - current_encoding = nl_langinfo (CODESET); -#endif - if (current_encoding == NULL || *current_encoding == '\0') - current_encoding = SOURCE_CHARSET; - - return current_encoding; -} diff --git a/contrib/gcc/cpperror.c b/contrib/gcc/cpperror.c deleted file mode 100644 index 61763cc..0000000 --- a/contrib/gcc/cpperror.c +++ /dev/null @@ -1,177 +0,0 @@ -/* Default error handlers for CPP Library. - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000, - 2001, 2002 Free Software Foundation, Inc. - Written by Per Bothner, 1994. - Based on CCCP program by Paul Rubin, June 1986 - Adapted to ANSI C, Richard Stallman, Jan 1987 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - In other words, you are welcome to use, share and improve this program. - You are forbidden to forbid anyone else to use, share and improve - what you give them. Help stamp out software-hoarding! */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" -#include "intl.h" - -static void print_location (cpp_reader *, fileline, unsigned int); - -/* Print the logical file location (LINE, COL) in preparation for a - diagnostic. Outputs the #include chain if it has changed. A line - of zero suppresses the include stack, and outputs the program name - instead. */ -static void -print_location (cpp_reader *pfile, fileline line, unsigned int col) -{ - if (line == 0) - fprintf (stderr, "%s: ", progname); - else - { - const struct line_map *map; - unsigned int lin; - - map = linemap_lookup (&pfile->line_maps, line); - linemap_print_containing_files (&pfile->line_maps, map); - - lin = SOURCE_LINE (map, line); - if (col == 0) - col = 1; - - if (lin == 0) - fprintf (stderr, "%s:", map->to_file); - else if (CPP_OPTION (pfile, show_column) == 0) - fprintf (stderr, "%s:%u:", map->to_file, lin); - else - fprintf (stderr, "%s:%u:%u:", map->to_file, lin, col); - - fputc (' ', stderr); - } -} - -/* Set up for a diagnostic: print the file and line, bump the error - counter, etc. LINE is the logical line number; zero means to print - at the location of the previously lexed token, which tends to be - the correct place by default. Returns 0 if the error has been - suppressed. */ -int -_cpp_begin_message (cpp_reader *pfile, int code, fileline line, - unsigned int column) -{ - int level = CPP_DL_EXTRACT (code); - - switch (level) - { - case CPP_DL_WARNING: - case CPP_DL_PEDWARN: - if (CPP_IN_SYSTEM_HEADER (pfile) - && ! CPP_OPTION (pfile, warn_system_headers)) - return 0; - /* Fall through. */ - - case CPP_DL_WARNING_SYSHDR: - if (CPP_OPTION (pfile, warnings_are_errors) - || (level == CPP_DL_PEDWARN && CPP_OPTION (pfile, pedantic_errors))) - { - if (CPP_OPTION (pfile, inhibit_errors)) - return 0; - level = CPP_DL_ERROR; - pfile->errors++; - } - else if (CPP_OPTION (pfile, inhibit_warnings)) - return 0; - break; - - case CPP_DL_ERROR: - if (CPP_OPTION (pfile, inhibit_errors)) - return 0; - /* ICEs cannot be inhibited. */ - case CPP_DL_ICE: - pfile->errors++; - break; - } - - print_location (pfile, line, column); - if (CPP_DL_WARNING_P (level)) - fputs (_("warning: "), stderr); - else if (level == CPP_DL_ICE) - fputs (_("internal error: "), stderr); - - return 1; -} - -/* Don't remove the blank before do, as otherwise the exgettext - script will mistake this as a function definition */ -#define v_message(msgid, ap) \ - do { vfprintf (stderr, _(msgid), ap); putc ('\n', stderr); } while (0) - -/* Exported interface. */ - -/* Print an error at the location of the previously lexed token. */ -void -cpp_error (cpp_reader * pfile, int level, const char *msgid, ...) -{ - fileline line; - unsigned int column; - va_list ap; - - va_start (ap, msgid); - - if (CPP_OPTION (pfile, traditional)) - { - if (pfile->state.in_directive) - line = pfile->directive_line; - else - line = pfile->line; - column = 0; - } - else - { - line = pfile->cur_token[-1].line; - column = pfile->cur_token[-1].col; - } - - if (_cpp_begin_message (pfile, level, line, column)) - v_message (msgid, ap); - - va_end (ap); -} - -/* Print an error at a specific location. */ -void -cpp_error_with_line (cpp_reader *pfile, int level, - fileline line, unsigned int column, - const char *msgid, ...) -{ - va_list ap; - - va_start (ap, msgid); - - if (_cpp_begin_message (pfile, level, line, column)) - v_message (msgid, ap); - - va_end (ap); -} - -void -cpp_errno (cpp_reader *pfile, int level, const char *msgid) -{ - if (msgid[0] == '\0') - msgid = _("stdout"); - - cpp_error (pfile, level, "%s: %s", msgid, xstrerror (errno)); -} diff --git a/contrib/gcc/cppexp.c b/contrib/gcc/cppexp.c deleted file mode 100644 index cb35b6c..0000000 --- a/contrib/gcc/cppexp.c +++ /dev/null @@ -1,1542 +0,0 @@ -/* Parse C expressions for cpplib. - Copyright (C) 1987, 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2001, - 2002 Free Software Foundation. - Contributed by Per Bothner, 1994. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" - -#define PART_PRECISION (sizeof (cpp_num_part) * CHAR_BIT) -#define HALF_MASK (~(cpp_num_part) 0 >> (PART_PRECISION / 2)) -#define LOW_PART(num_part) (num_part & HALF_MASK) -#define HIGH_PART(num_part) (num_part >> (PART_PRECISION / 2)) - -struct op -{ - const cpp_token *token; /* The token forming op (for diagnostics). */ - cpp_num value; /* The value logically "right" of op. */ - enum cpp_ttype op; -}; - -/* Some simple utility routines on double integers. */ -#define num_zerop(num) ((num.low | num.high) == 0) -#define num_eq(num1, num2) (num1.low == num2.low && num1.high == num2.high) -static bool num_positive (cpp_num, size_t); -static bool num_greater_eq (cpp_num, cpp_num, size_t); -static cpp_num num_trim (cpp_num, size_t); -static cpp_num num_part_mul (cpp_num_part, cpp_num_part); - -static cpp_num num_unary_op (cpp_reader *, cpp_num, enum cpp_ttype); -static cpp_num num_binary_op (cpp_reader *, cpp_num, cpp_num, enum cpp_ttype); -static cpp_num num_negate (cpp_num, size_t); -static cpp_num num_bitwise_op (cpp_reader *, cpp_num, cpp_num, enum cpp_ttype); -static cpp_num num_inequality_op (cpp_reader *, cpp_num, cpp_num, - enum cpp_ttype); -static cpp_num num_equality_op (cpp_reader *, cpp_num, cpp_num, - enum cpp_ttype); -static cpp_num num_mul (cpp_reader *, cpp_num, cpp_num); -static cpp_num num_div_op (cpp_reader *, cpp_num, cpp_num, enum cpp_ttype); -static cpp_num num_lshift (cpp_num, size_t, size_t); -static cpp_num num_rshift (cpp_num, size_t, size_t); - -static cpp_num append_digit (cpp_num, int, int, size_t); -static cpp_num parse_defined (cpp_reader *); -static cpp_num eval_token (cpp_reader *, const cpp_token *); -static struct op *reduce (cpp_reader *, struct op *, enum cpp_ttype); -static unsigned int interpret_float_suffix (const uchar *, size_t); -static unsigned int interpret_int_suffix (const uchar *, size_t); -static void check_promotion (cpp_reader *, const struct op *); - -/* Token type abuse to create unary plus and minus operators. */ -#define CPP_UPLUS (CPP_LAST_CPP_OP + 1) -#define CPP_UMINUS (CPP_LAST_CPP_OP + 2) - -/* With -O2, gcc appears to produce nice code, moving the error - message load and subsequent jump completely out of the main path. */ -#define SYNTAX_ERROR(msgid) \ - do { cpp_error (pfile, CPP_DL_ERROR, msgid); goto syntax_error; } while(0) -#define SYNTAX_ERROR2(msgid, arg) \ - do { cpp_error (pfile, CPP_DL_ERROR, msgid, arg); goto syntax_error; } \ - while(0) - -/* Subroutine of cpp_classify_number. S points to a float suffix of - length LEN, possibly zero. Returns 0 for an invalid suffix, or a - flag vector describing the suffix. */ -static unsigned int -interpret_float_suffix (const uchar *s, size_t len) -{ - size_t f = 0, l = 0, i = 0; - - while (len--) - switch (s[len]) - { - case 'f': case 'F': f++; break; - case 'l': case 'L': l++; break; - case 'i': case 'I': - case 'j': case 'J': i++; break; - default: - return 0; - } - - if (f + l > 1 || i > 1) - return 0; - - return ((i ? CPP_N_IMAGINARY : 0) - | (f ? CPP_N_SMALL : - l ? CPP_N_LARGE : CPP_N_MEDIUM)); -} - -/* Subroutine of cpp_classify_number. S points to an integer suffix - of length LEN, possibly zero. Returns 0 for an invalid suffix, or a - flag vector describing the suffix. */ -static unsigned int -interpret_int_suffix (const uchar *s, size_t len) -{ - size_t u, l, i; - - u = l = i = 0; - - while (len--) - switch (s[len]) - { - case 'u': case 'U': u++; break; - case 'i': case 'I': - case 'j': case 'J': i++; break; - case 'l': case 'L': l++; - /* If there are two Ls, they must be adjacent and the same case. */ - if (l == 2 && s[len] != s[len + 1]) - return 0; - break; - default: - return 0; - } - - if (l > 2 || u > 1 || i > 1) - return 0; - - return ((i ? CPP_N_IMAGINARY : 0) - | (u ? CPP_N_UNSIGNED : 0) - | ((l == 0) ? CPP_N_SMALL - : (l == 1) ? CPP_N_MEDIUM : CPP_N_LARGE)); -} - -/* Categorize numeric constants according to their field (integer, - floating point, or invalid), radix (decimal, octal, hexadecimal), - and type suffixes. */ -unsigned int -cpp_classify_number (cpp_reader *pfile, const cpp_token *token) -{ - const uchar *str = token->val.str.text; - const uchar *limit; - unsigned int max_digit, result, radix; - enum {NOT_FLOAT = 0, AFTER_POINT, AFTER_EXPON} float_flag; - - /* If the lexer has done its job, length one can only be a single - digit. Fast-path this very common case. */ - if (token->val.str.len == 1) - return CPP_N_INTEGER | CPP_N_SMALL | CPP_N_DECIMAL; - - limit = str + token->val.str.len; - float_flag = NOT_FLOAT; - max_digit = 0; - radix = 10; - - /* First, interpret the radix. */ - if (*str == '0') - { - radix = 8; - str++; - - /* Require at least one hex digit to classify it as hex. */ - if ((*str == 'x' || *str == 'X') - && (str[1] == '.' || ISXDIGIT (str[1]))) - { - radix = 16; - str++; - } - } - - /* Now scan for a well-formed integer or float. */ - for (;;) - { - unsigned int c = *str++; - - if (ISDIGIT (c) || (ISXDIGIT (c) && radix == 16)) - { - c = hex_value (c); - if (c > max_digit) - max_digit = c; - } - else if (c == '.') - { - if (float_flag == NOT_FLOAT) - float_flag = AFTER_POINT; - else - SYNTAX_ERROR ("too many decimal points in number"); - } - else if ((radix <= 10 && (c == 'e' || c == 'E')) - || (radix == 16 && (c == 'p' || c == 'P'))) - { - float_flag = AFTER_EXPON; - break; - } - else - { - /* Start of suffix. */ - str--; - break; - } - } - - if (float_flag != NOT_FLOAT && radix == 8) - radix = 10; - - if (max_digit >= radix) - SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); - - if (float_flag != NOT_FLOAT) - { - if (radix == 16 && CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99)) - cpp_error (pfile, CPP_DL_PEDWARN, - "use of C99 hexadecimal floating constant"); - - if (float_flag == AFTER_EXPON) - { - if (*str == '+' || *str == '-') - str++; - - /* Exponent is decimal, even if string is a hex float. */ - if (!ISDIGIT (*str)) - SYNTAX_ERROR ("exponent has no digits"); - - do - str++; - while (ISDIGIT (*str)); - } - else if (radix == 16) - SYNTAX_ERROR ("hexadecimal floating constants require an exponent"); - - result = interpret_float_suffix (str, limit - str); - if (result == 0) - { - cpp_error (pfile, CPP_DL_ERROR, - "invalid suffix \"%.*s\" on floating constant", - (int) (limit - str), str); - return CPP_N_INVALID; - } - - /* Traditional C didn't accept any floating suffixes. */ - if (limit != str - && CPP_WTRADITIONAL (pfile) - && ! cpp_sys_macro_p (pfile)) - cpp_error (pfile, CPP_DL_WARNING, - "traditional C rejects the \"%.*s\" suffix", - (int) (limit - str), str); - - result |= CPP_N_FLOATING; - } - else - { - result = interpret_int_suffix (str, limit - str); - if (result == 0) - { - cpp_error (pfile, CPP_DL_ERROR, - "invalid suffix \"%.*s\" on integer constant", - (int) (limit - str), str); - return CPP_N_INVALID; - } - - /* Traditional C only accepted the 'L' suffix. - Suppress warning about 'LL' with -Wno-long-long. */ - if (CPP_WTRADITIONAL (pfile) && ! cpp_sys_macro_p (pfile)) - { - int u_or_i = (result & (CPP_N_UNSIGNED|CPP_N_IMAGINARY)); - int large = (result & CPP_N_WIDTH) == CPP_N_LARGE; - - if (u_or_i || (large && CPP_OPTION (pfile, warn_long_long))) - cpp_error (pfile, CPP_DL_WARNING, - "traditional C rejects the \"%.*s\" suffix", - (int) (limit - str), str); - } - - if ((result & CPP_N_WIDTH) == CPP_N_LARGE - && ! CPP_OPTION (pfile, c99) - && CPP_OPTION (pfile, warn_long_long)) - cpp_error (pfile, CPP_DL_PEDWARN, - "use of C99 long long integer constant"); - - result |= CPP_N_INTEGER; - } - - if ((result & CPP_N_IMAGINARY) && CPP_PEDANTIC (pfile)) - cpp_error (pfile, CPP_DL_PEDWARN, - "imaginary constants are a GCC extension"); - - if (radix == 10) - result |= CPP_N_DECIMAL; - else if (radix == 16) - result |= CPP_N_HEX; - else - result |= CPP_N_OCTAL; - - return result; - - syntax_error: - return CPP_N_INVALID; -} - -/* cpp_interpret_integer converts an integer constant into a cpp_num, - of precision options->precision. - - We do not provide any interface for decimal->float conversion, - because the preprocessor doesn't need it and we don't want to - drag in GCC's floating point emulator. */ -cpp_num -cpp_interpret_integer (cpp_reader *pfile, const cpp_token *token, - unsigned int type) -{ - const uchar *p, *end; - cpp_num result; - - result.low = 0; - result.high = 0; - result.unsignedp = !!(type & CPP_N_UNSIGNED); - result.overflow = false; - - p = token->val.str.text; - end = p + token->val.str.len; - - /* Common case of a single digit. */ - if (token->val.str.len == 1) - result.low = p[0] - '0'; - else - { - cpp_num_part max; - size_t precision = CPP_OPTION (pfile, precision); - unsigned int base = 10, c = 0; - bool overflow = false; - - if ((type & CPP_N_RADIX) == CPP_N_OCTAL) - { - base = 8; - p++; - } - else if ((type & CPP_N_RADIX) == CPP_N_HEX) - { - base = 16; - p += 2; - } - - /* We can add a digit to numbers strictly less than this without - needing the precision and slowness of double integers. */ - max = ~(cpp_num_part) 0; - if (precision < PART_PRECISION) - max >>= PART_PRECISION - precision; - max = (max - base + 1) / base + 1; - - for (; p < end; p++) - { - c = *p; - - if (ISDIGIT (c) || (base == 16 && ISXDIGIT (c))) - c = hex_value (c); - else - break; - - /* Strict inequality for when max is set to zero. */ - if (result.low < max) - result.low = result.low * base + c; - else - { - result = append_digit (result, c, base, precision); - overflow |= result.overflow; - max = 0; - } - } - - if (overflow) - cpp_error (pfile, CPP_DL_PEDWARN, - "integer constant is too large for its type"); - /* If too big to be signed, consider it unsigned. Only warn for - decimal numbers. Traditional numbers were always signed (but - we still honor an explicit U suffix); but we only have - traditional semantics in directives. */ - else if (!result.unsignedp - && !(CPP_OPTION (pfile, traditional) - && pfile->state.in_directive) - && !num_positive (result, precision)) - { - if (base == 10) - cpp_error (pfile, CPP_DL_WARNING, - "integer constant is so large that it is unsigned"); - result.unsignedp = true; - } - } - - return result; -} - -/* Append DIGIT to NUM, a number of PRECISION bits being read in base BASE. */ -static cpp_num -append_digit (cpp_num num, int digit, int base, size_t precision) -{ - cpp_num result; - unsigned int shift = 3 + (base == 16); - bool overflow; - cpp_num_part add_high, add_low; - - /* Multiply by 8 or 16. Catching this overflow here means we don't - need to worry about add_high overflowing. */ - overflow = !!(num.high >> (PART_PRECISION - shift)); - result.high = num.high << shift; - result.low = num.low << shift; - result.high |= num.low >> (PART_PRECISION - shift); - - if (base == 10) - { - add_low = num.low << 1; - add_high = (num.high << 1) + (num.low >> (PART_PRECISION - 1)); - } - else - add_high = add_low = 0; - - if (add_low + digit < add_low) - add_high++; - add_low += digit; - - if (result.low + add_low < result.low) - add_high++; - if (result.high + add_high < result.high) - overflow = true; - - result.low += add_low; - result.high += add_high; - - /* The above code catches overflow of a cpp_num type. This catches - overflow of the (possibly shorter) target precision. */ - num.low = result.low; - num.high = result.high; - result = num_trim (result, precision); - if (!num_eq (result, num)) - overflow = true; - - result.unsignedp = num.unsignedp; - result.overflow = overflow; - return result; -} - -/* Handle meeting "defined" in a preprocessor expression. */ -static cpp_num -parse_defined (cpp_reader *pfile) -{ - cpp_num result; - int paren = 0; - cpp_hashnode *node = 0; - const cpp_token *token; - cpp_context *initial_context = pfile->context; - - /* Don't expand macros. */ - pfile->state.prevent_expansion++; - - token = cpp_get_token (pfile); - if (token->type == CPP_OPEN_PAREN) - { - paren = 1; - token = cpp_get_token (pfile); - } - - if (token->type == CPP_NAME) - { - node = token->val.node; - if (paren && cpp_get_token (pfile)->type != CPP_CLOSE_PAREN) - { - cpp_error (pfile, CPP_DL_ERROR, "missing ')' after \"defined\""); - node = 0; - } - } - else - { - cpp_error (pfile, CPP_DL_ERROR, - "operator \"defined\" requires an identifier"); - if (token->flags & NAMED_OP) - { - cpp_token op; - - op.flags = 0; - op.type = token->type; - cpp_error (pfile, CPP_DL_ERROR, - "(\"%s\" is an alternative token for \"%s\" in C++)", - cpp_token_as_text (pfile, token), - cpp_token_as_text (pfile, &op)); - } - } - - if (node) - { - if (pfile->context != initial_context && CPP_PEDANTIC (pfile)) - cpp_error (pfile, CPP_DL_WARNING, - "this use of \"defined\" may not be portable"); - - _cpp_mark_macro_used (node); - - /* A possible controlling macro of the form #if !defined (). - _cpp_parse_expr checks there was no other junk on the line. */ - pfile->mi_ind_cmacro = node; - } - - pfile->state.prevent_expansion--; - - result.unsignedp = false; - result.high = 0; - result.overflow = false; - result.low = node && node->type == NT_MACRO; - return result; -} - -/* Convert a token into a CPP_NUMBER (an interpreted preprocessing - number or character constant, or the result of the "defined" or "#" - operators). */ -static cpp_num -eval_token (cpp_reader *pfile, const cpp_token *token) -{ - cpp_num result; - unsigned int temp; - int unsignedp = 0; - - switch (token->type) - { - case CPP_NUMBER: - temp = cpp_classify_number (pfile, token); - switch (temp & CPP_N_CATEGORY) - { - case CPP_N_FLOATING: - cpp_error (pfile, CPP_DL_ERROR, - "floating constant in preprocessor expression"); - break; - case CPP_N_INTEGER: - if (!(temp & CPP_N_IMAGINARY)) - return cpp_interpret_integer (pfile, token, temp); - cpp_error (pfile, CPP_DL_ERROR, - "imaginary number in preprocessor expression"); - break; - - case CPP_N_INVALID: - /* Error already issued. */ - break; - } - result.high = result.low = 0; - break; - - case CPP_WCHAR: - case CPP_CHAR: - { - cppchar_t cc = cpp_interpret_charconst (pfile, token, - &temp, &unsignedp); - - result.high = 0; - result.low = cc; - /* Sign-extend the result if necessary. */ - if (!unsignedp && (cppchar_signed_t) cc < 0) - { - if (PART_PRECISION > BITS_PER_CPPCHAR_T) - result.low |= ~(~(cpp_num_part) 0 - >> (PART_PRECISION - BITS_PER_CPPCHAR_T)); - result.high = ~(cpp_num_part) 0; - result = num_trim (result, CPP_OPTION (pfile, precision)); - } - } - break; - - case CPP_NAME: - if (token->val.node == pfile->spec_nodes.n_defined) - return parse_defined (pfile); - else if (CPP_OPTION (pfile, cplusplus) - && (token->val.node == pfile->spec_nodes.n_true - || token->val.node == pfile->spec_nodes.n_false)) - { - result.high = 0; - result.low = (token->val.node == pfile->spec_nodes.n_true); - } - else - { - result.high = 0; - result.low = 0; - if (CPP_OPTION (pfile, warn_undef) && !pfile->state.skip_eval) - cpp_error (pfile, CPP_DL_WARNING, "\"%s\" is not defined", - NODE_NAME (token->val.node)); - } - break; - - default: /* CPP_HASH */ - _cpp_test_assertion (pfile, &temp); - result.high = 0; - result.low = temp; - } - - result.unsignedp = !!unsignedp; - result.overflow = false; - return result; -} - -/* Operator precedence and flags table. - -After an operator is returned from the lexer, if it has priority less -than the operator on the top of the stack, we reduce the stack by one -operator and repeat the test. Since equal priorities do not reduce, -this is naturally right-associative. - -We handle left-associative operators by decrementing the priority of -just-lexed operators by one, but retaining the priority of operators -already on the stack. - -The remaining cases are '(' and ')'. We handle '(' by skipping the -reduction phase completely. ')' is given lower priority than -everything else, including '(', effectively forcing a reduction of the -parenthesized expression. If there is a matching '(', the routine -reduce() exits immediately. If the normal exit route sees a ')', then -there cannot have been a matching '(' and an error message is output. - -The parser assumes all shifted operators require a left operand unless -the flag NO_L_OPERAND is set. These semantics are automatic; any -extra semantics need to be handled with operator-specific code. */ - -/* Flags. If CHECK_PROMOTION, we warn if the effective sign of an - operand changes because of integer promotions. */ -#define NO_L_OPERAND (1 << 0) -#define LEFT_ASSOC (1 << 1) -#define CHECK_PROMOTION (1 << 2) - -/* Operator to priority map. Must be in the same order as the first - N entries of enum cpp_ttype. */ -static const struct operator -{ - uchar prio; - uchar flags; -} optab[] = -{ - /* EQ */ {0, 0}, /* Shouldn't happen. */ - /* NOT */ {16, NO_L_OPERAND}, - /* GREATER */ {12, LEFT_ASSOC | CHECK_PROMOTION}, - /* LESS */ {12, LEFT_ASSOC | CHECK_PROMOTION}, - /* PLUS */ {14, LEFT_ASSOC | CHECK_PROMOTION}, - /* MINUS */ {14, LEFT_ASSOC | CHECK_PROMOTION}, - /* MULT */ {15, LEFT_ASSOC | CHECK_PROMOTION}, - /* DIV */ {15, LEFT_ASSOC | CHECK_PROMOTION}, - /* MOD */ {15, LEFT_ASSOC | CHECK_PROMOTION}, - /* AND */ {9, LEFT_ASSOC | CHECK_PROMOTION}, - /* OR */ {7, LEFT_ASSOC | CHECK_PROMOTION}, - /* XOR */ {8, LEFT_ASSOC | CHECK_PROMOTION}, - /* RSHIFT */ {13, LEFT_ASSOC}, - /* LSHIFT */ {13, LEFT_ASSOC}, - - /* MIN */ {10, LEFT_ASSOC | CHECK_PROMOTION}, - /* MAX */ {10, LEFT_ASSOC | CHECK_PROMOTION}, - - /* COMPL */ {16, NO_L_OPERAND}, - /* AND_AND */ {6, LEFT_ASSOC}, - /* OR_OR */ {5, LEFT_ASSOC}, - /* QUERY */ {3, 0}, - /* COLON */ {4, LEFT_ASSOC | CHECK_PROMOTION}, - /* COMMA */ {2, LEFT_ASSOC}, - /* OPEN_PAREN */ {1, NO_L_OPERAND}, - /* CLOSE_PAREN */ {0, 0}, - /* EOF */ {0, 0}, - /* EQ_EQ */ {11, LEFT_ASSOC}, - /* NOT_EQ */ {11, LEFT_ASSOC}, - /* GREATER_EQ */ {12, LEFT_ASSOC | CHECK_PROMOTION}, - /* LESS_EQ */ {12, LEFT_ASSOC | CHECK_PROMOTION}, - /* UPLUS */ {16, NO_L_OPERAND}, - /* UMINUS */ {16, NO_L_OPERAND} -}; - -/* Parse and evaluate a C expression, reading from PFILE. - Returns the truth value of the expression. - - The implementation is an operator precedence parser, i.e. a - bottom-up parser, using a stack for not-yet-reduced tokens. - - The stack base is op_stack, and the current stack pointer is 'top'. - There is a stack element for each operator (only), and the most - recently pushed operator is 'top->op'. An operand (value) is - stored in the 'value' field of the stack element of the operator - that precedes it. */ -bool -_cpp_parse_expr (cpp_reader *pfile) -{ - struct op *top = pfile->op_stack; - unsigned int lex_count; - bool saw_leading_not, want_value = true; - - pfile->state.skip_eval = 0; - - /* Set up detection of #if ! defined(). */ - pfile->mi_ind_cmacro = 0; - saw_leading_not = false; - lex_count = 0; - - /* Lowest priority operator prevents further reductions. */ - top->op = CPP_EOF; - - for (;;) - { - struct op op; - - lex_count++; - op.token = cpp_get_token (pfile); - op.op = op.token->type; - - switch (op.op) - { - /* These tokens convert into values. */ - case CPP_NUMBER: - case CPP_CHAR: - case CPP_WCHAR: - case CPP_NAME: - case CPP_HASH: - if (!want_value) - SYNTAX_ERROR2 ("missing binary operator before token \"%s\"", - cpp_token_as_text (pfile, op.token)); - want_value = false; - top->value = eval_token (pfile, op.token); - continue; - - case CPP_NOT: - saw_leading_not = lex_count == 1; - break; - case CPP_PLUS: - if (want_value) - op.op = CPP_UPLUS; - break; - case CPP_MINUS: - if (want_value) - op.op = CPP_UMINUS; - break; - - default: - if ((int) op.op <= (int) CPP_EQ || (int) op.op >= (int) CPP_PLUS_EQ) - SYNTAX_ERROR2 ("token \"%s\" is not valid in preprocessor expressions", - cpp_token_as_text (pfile, op.token)); - break; - } - - /* Check we have a value or operator as appropriate. */ - if (optab[op.op].flags & NO_L_OPERAND) - { - if (!want_value) - SYNTAX_ERROR2 ("missing binary operator before token \"%s\"", - cpp_token_as_text (pfile, op.token)); - } - else if (want_value) - { - /* We want a number (or expression) and haven't got one. - Try to emit a specific diagnostic. */ - if (op.op == CPP_CLOSE_PAREN && top->op == CPP_OPEN_PAREN) - SYNTAX_ERROR ("missing expression between '(' and ')'"); - - if (op.op == CPP_EOF && top->op == CPP_EOF) - SYNTAX_ERROR ("#if with no expression"); - - if (top->op != CPP_EOF && top->op != CPP_OPEN_PAREN) - SYNTAX_ERROR2 ("operator '%s' has no right operand", - cpp_token_as_text (pfile, top->token)); - else if (op.op == CPP_CLOSE_PAREN || op.op == CPP_EOF) - /* Complain about missing paren during reduction. */; - else - SYNTAX_ERROR2 ("operator '%s' has no left operand", - cpp_token_as_text (pfile, op.token)); - } - - top = reduce (pfile, top, op.op); - if (!top) - goto syntax_error; - - if (op.op == CPP_EOF) - break; - - switch (op.op) - { - case CPP_CLOSE_PAREN: - continue; - case CPP_OR_OR: - if (!num_zerop (top->value)) - pfile->state.skip_eval++; - break; - case CPP_AND_AND: - case CPP_QUERY: - if (num_zerop (top->value)) - pfile->state.skip_eval++; - break; - case CPP_COLON: - if (top->op != CPP_QUERY) - SYNTAX_ERROR (" ':' without preceding '?'"); - if (!num_zerop (top[-1].value)) /* Was '?' condition true? */ - pfile->state.skip_eval++; - else - pfile->state.skip_eval--; - default: - break; - } - - want_value = true; - - /* Check for and handle stack overflow. */ - if (++top == pfile->op_limit) - top = _cpp_expand_op_stack (pfile); - - top->op = op.op; - top->token = op.token; - } - - /* The controlling macro expression is only valid if we called lex 3 - times: and . push_conditional () - checks that we are at top-of-file. */ - if (pfile->mi_ind_cmacro && !(saw_leading_not && lex_count == 3)) - pfile->mi_ind_cmacro = 0; - - if (top != pfile->op_stack) - { - cpp_error (pfile, CPP_DL_ICE, "unbalanced stack in #if"); - syntax_error: - return false; /* Return false on syntax error. */ - } - - return !num_zerop (top->value); -} - -/* Reduce the operator / value stack if possible, in preparation for - pushing operator OP. Returns NULL on error, otherwise the top of - the stack. */ -static struct op * -reduce (cpp_reader *pfile, struct op *top, enum cpp_ttype op) -{ - unsigned int prio; - - if (top->op <= CPP_EQ || top->op > CPP_LAST_CPP_OP + 2) - { - bad_op: - cpp_error (pfile, CPP_DL_ICE, "impossible operator '%u'", top->op); - return 0; - } - - if (op == CPP_OPEN_PAREN) - return top; - - /* Decrement the priority of left-associative operators to force a - reduction with operators of otherwise equal priority. */ - prio = optab[op].prio - ((optab[op].flags & LEFT_ASSOC) != 0); - while (prio < optab[top->op].prio) - { - if (CPP_OPTION (pfile, warn_num_sign_change) - && optab[top->op].flags & CHECK_PROMOTION) - check_promotion (pfile, top); - - switch (top->op) - { - case CPP_UPLUS: - case CPP_UMINUS: - case CPP_NOT: - case CPP_COMPL: - top[-1].value = num_unary_op (pfile, top->value, top->op); - break; - - case CPP_PLUS: - case CPP_MINUS: - case CPP_RSHIFT: - case CPP_LSHIFT: - case CPP_MIN: - case CPP_MAX: - case CPP_COMMA: - top[-1].value = num_binary_op (pfile, top[-1].value, - top->value, top->op); - break; - - case CPP_GREATER: - case CPP_LESS: - case CPP_GREATER_EQ: - case CPP_LESS_EQ: - top[-1].value - = num_inequality_op (pfile, top[-1].value, top->value, top->op); - break; - - case CPP_EQ_EQ: - case CPP_NOT_EQ: - top[-1].value - = num_equality_op (pfile, top[-1].value, top->value, top->op); - break; - - case CPP_AND: - case CPP_OR: - case CPP_XOR: - top[-1].value - = num_bitwise_op (pfile, top[-1].value, top->value, top->op); - break; - - case CPP_MULT: - top[-1].value = num_mul (pfile, top[-1].value, top->value); - break; - - case CPP_DIV: - case CPP_MOD: - top[-1].value = num_div_op (pfile, top[-1].value, - top->value, top->op); - break; - - case CPP_OR_OR: - top--; - if (!num_zerop (top->value)) - pfile->state.skip_eval--; - top->value.low = (!num_zerop (top->value) - || !num_zerop (top[1].value)); - top->value.high = 0; - top->value.unsignedp = false; - top->value.overflow = false; - continue; - - case CPP_AND_AND: - top--; - if (num_zerop (top->value)) - pfile->state.skip_eval--; - top->value.low = (!num_zerop (top->value) - && !num_zerop (top[1].value)); - top->value.high = 0; - top->value.unsignedp = false; - top->value.overflow = false; - continue; - - case CPP_OPEN_PAREN: - if (op != CPP_CLOSE_PAREN) - { - cpp_error (pfile, CPP_DL_ERROR, "missing ')' in expression"); - return 0; - } - top--; - top->value = top[1].value; - return top; - - case CPP_COLON: - top -= 2; - if (!num_zerop (top->value)) - { - pfile->state.skip_eval--; - top->value = top[1].value; - } - else - top->value = top[2].value; - top->value.unsignedp = (top[1].value.unsignedp - || top[2].value.unsignedp); - continue; - - case CPP_QUERY: - cpp_error (pfile, CPP_DL_ERROR, "'?' without following ':'"); - return 0; - - default: - goto bad_op; - } - - top--; - if (top->value.overflow && !pfile->state.skip_eval) - cpp_error (pfile, CPP_DL_PEDWARN, - "integer overflow in preprocessor expression"); - } - - if (op == CPP_CLOSE_PAREN) - { - cpp_error (pfile, CPP_DL_ERROR, "missing '(' in expression"); - return 0; - } - - return top; -} - -/* Returns the position of the old top of stack after expansion. */ -struct op * -_cpp_expand_op_stack (cpp_reader *pfile) -{ - size_t old_size = (size_t) (pfile->op_limit - pfile->op_stack); - size_t new_size = old_size * 2 + 20; - - pfile->op_stack = xrealloc (pfile->op_stack, new_size * sizeof (struct op)); - pfile->op_limit = pfile->op_stack + new_size; - - return pfile->op_stack + old_size; -} - -/* Emits a warning if the effective sign of either operand of OP - changes because of integer promotions. */ -static void -check_promotion (cpp_reader *pfile, const struct op *op) -{ - if (op->value.unsignedp == op[-1].value.unsignedp) - return; - - if (op->value.unsignedp) - { - if (!num_positive (op[-1].value, CPP_OPTION (pfile, precision))) - cpp_error (pfile, CPP_DL_WARNING, - "the left operand of \"%s\" changes sign when promoted", - cpp_token_as_text (pfile, op->token)); - } - else if (!num_positive (op->value, CPP_OPTION (pfile, precision))) - cpp_error (pfile, CPP_DL_WARNING, - "the right operand of \"%s\" changes sign when promoted", - cpp_token_as_text (pfile, op->token)); -} - -/* Clears the unused high order bits of the number pointed to by PNUM. */ -static cpp_num -num_trim (cpp_num num, size_t precision) -{ - if (precision > PART_PRECISION) - { - precision -= PART_PRECISION; - if (precision < PART_PRECISION) - num.high &= ((cpp_num_part) 1 << precision) - 1; - } - else - { - if (precision < PART_PRECISION) - num.low &= ((cpp_num_part) 1 << precision) - 1; - num.high = 0; - } - - return num; -} - -/* True iff A (presumed signed) >= 0. */ -static bool -num_positive (cpp_num num, size_t precision) -{ - if (precision > PART_PRECISION) - { - precision -= PART_PRECISION; - return (num.high & (cpp_num_part) 1 << (precision - 1)) == 0; - } - - return (num.low & (cpp_num_part) 1 << (precision - 1)) == 0; -} - -/* Sign extend a number, with PRECISION significant bits and all - others assumed clear, to fill out a cpp_num structure. */ -cpp_num -cpp_num_sign_extend (cpp_num num, size_t precision) -{ - if (!num.unsignedp) - { - if (precision > PART_PRECISION) - { - precision -= PART_PRECISION; - if (precision < PART_PRECISION - && (num.high & (cpp_num_part) 1 << (precision - 1))) - num.high |= ~(~(cpp_num_part) 0 >> (PART_PRECISION - precision)); - } - else if (num.low & (cpp_num_part) 1 << (precision - 1)) - { - if (precision < PART_PRECISION) - num.low |= ~(~(cpp_num_part) 0 >> (PART_PRECISION - precision)); - num.high = ~(cpp_num_part) 0; - } - } - - return num; -} - -/* Returns the negative of NUM. */ -static cpp_num -num_negate (cpp_num num, size_t precision) -{ - cpp_num copy; - - copy = num; - num.high = ~num.high; - num.low = ~num.low; - if (++num.low == 0) - num.high++; - num = num_trim (num, precision); - num.overflow = (!num.unsignedp && num_eq (num, copy) && !num_zerop (num)); - - return num; -} - -/* Returns true if A >= B. */ -static bool -num_greater_eq (cpp_num pa, cpp_num pb, size_t precision) -{ - bool unsignedp; - - unsignedp = pa.unsignedp || pb.unsignedp; - - if (!unsignedp) - { - /* Both numbers have signed type. If they are of different - sign, the answer is the sign of A. */ - unsignedp = num_positive (pa, precision); - - if (unsignedp != num_positive (pb, precision)) - return unsignedp; - - /* Otherwise we can do an unsigned comparison. */ - } - - return (pa.high > pb.high) || (pa.high == pb.high && pa.low >= pb.low); -} - -/* Returns LHS OP RHS, where OP is a bit-wise operation. */ -static cpp_num -num_bitwise_op (cpp_reader *pfile ATTRIBUTE_UNUSED, - cpp_num lhs, cpp_num rhs, enum cpp_ttype op) -{ - lhs.overflow = false; - lhs.unsignedp = lhs.unsignedp || rhs.unsignedp; - - /* As excess precision is zeroed, there is no need to num_trim () as - these operations cannot introduce a set bit there. */ - if (op == CPP_AND) - { - lhs.low &= rhs.low; - lhs.high &= rhs.high; - } - else if (op == CPP_OR) - { - lhs.low |= rhs.low; - lhs.high |= rhs.high; - } - else - { - lhs.low ^= rhs.low; - lhs.high ^= rhs.high; - } - - return lhs; -} - -/* Returns LHS OP RHS, where OP is an inequality. */ -static cpp_num -num_inequality_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, - enum cpp_ttype op) -{ - bool gte = num_greater_eq (lhs, rhs, CPP_OPTION (pfile, precision)); - - if (op == CPP_GREATER_EQ) - lhs.low = gte; - else if (op == CPP_LESS) - lhs.low = !gte; - else if (op == CPP_GREATER) - lhs.low = gte && !num_eq (lhs, rhs); - else /* CPP_LESS_EQ. */ - lhs.low = !gte || num_eq (lhs, rhs); - - lhs.high = 0; - lhs.overflow = false; - lhs.unsignedp = false; - return lhs; -} - -/* Returns LHS OP RHS, where OP is == or !=. */ -static cpp_num -num_equality_op (cpp_reader *pfile ATTRIBUTE_UNUSED, - cpp_num lhs, cpp_num rhs, enum cpp_ttype op) -{ - /* Work around a 3.0.4 bug; see PR 6950. */ - bool eq = num_eq (lhs, rhs); - if (op == CPP_NOT_EQ) - eq = !eq; - lhs.low = eq; - lhs.high = 0; - lhs.overflow = false; - lhs.unsignedp = false; - return lhs; -} - -/* Shift NUM, of width PRECISION, right by N bits. */ -static cpp_num -num_rshift (cpp_num num, size_t precision, size_t n) -{ - cpp_num_part sign_mask; - - if (num.unsignedp || num_positive (num, precision)) - sign_mask = 0; - else - sign_mask = ~(cpp_num_part) 0; - - if (n >= precision) - num.high = num.low = sign_mask; - else - { - /* Sign-extend. */ - if (precision < PART_PRECISION) - num.high = sign_mask, num.low |= sign_mask << precision; - else if (precision < 2 * PART_PRECISION) - num.high |= sign_mask << (precision - PART_PRECISION); - - if (n >= PART_PRECISION) - { - n -= PART_PRECISION; - num.low = num.high; - num.high = sign_mask; - } - - if (n) - { - num.low = (num.low >> n) | (num.high << (PART_PRECISION - n)); - num.high = (num.high >> n) | (sign_mask << (PART_PRECISION - n)); - } - } - - num = num_trim (num, precision); - num.overflow = false; - return num; -} - -/* Shift NUM, of width PRECISION, left by N bits. */ -static cpp_num -num_lshift (cpp_num num, size_t precision, size_t n) -{ - if (n >= precision) - { - num.overflow = !num.unsignedp && !num_zerop (num); - num.high = num.low = 0; - } - else - { - cpp_num orig, maybe_orig; - size_t m = n; - - orig = num; - if (m >= PART_PRECISION) - { - m -= PART_PRECISION; - num.high = num.low; - num.low = 0; - } - if (m) - { - num.high = (num.high << m) | (num.low >> (PART_PRECISION - m)); - num.low <<= m; - } - num = num_trim (num, precision); - - if (num.unsignedp) - num.overflow = false; - else - { - maybe_orig = num_rshift (num, precision, n); - num.overflow = !num_eq (orig, maybe_orig); - } - } - - return num; -} - -/* The four unary operators: +, -, ! and ~. */ -static cpp_num -num_unary_op (cpp_reader *pfile, cpp_num num, enum cpp_ttype op) -{ - switch (op) - { - case CPP_UPLUS: - if (CPP_WTRADITIONAL (pfile) && !pfile->state.skip_eval) - cpp_error (pfile, CPP_DL_WARNING, - "traditional C rejects the unary plus operator"); - num.overflow = false; - break; - - case CPP_UMINUS: - num = num_negate (num, CPP_OPTION (pfile, precision)); - break; - - case CPP_COMPL: - num.high = ~num.high; - num.low = ~num.low; - num = num_trim (num, CPP_OPTION (pfile, precision)); - num.overflow = false; - break; - - default: /* case CPP_NOT: */ - num.low = num_zerop (num); - num.high = 0; - num.overflow = false; - num.unsignedp = false; - break; - } - - return num; -} - -/* The various binary operators. */ -static cpp_num -num_binary_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) -{ - cpp_num result; - size_t precision = CPP_OPTION (pfile, precision); - bool gte; - size_t n; - - switch (op) - { - /* Shifts. */ - case CPP_LSHIFT: - case CPP_RSHIFT: - if (!rhs.unsignedp && !num_positive (rhs, precision)) - { - /* A negative shift is a positive shift the other way. */ - if (op == CPP_LSHIFT) - op = CPP_RSHIFT; - else - op = CPP_LSHIFT; - rhs = num_negate (rhs, precision); - } - if (rhs.high) - n = ~0; /* Maximal. */ - else - n = rhs.low; - if (op == CPP_LSHIFT) - lhs = num_lshift (lhs, precision, n); - else - lhs = num_rshift (lhs, precision, n); - break; - - /* Min / Max. */ - case CPP_MIN: - case CPP_MAX: - { - bool unsignedp = lhs.unsignedp || rhs.unsignedp; - - gte = num_greater_eq (lhs, rhs, precision); - if (op == CPP_MIN) - gte = !gte; - if (!gte) - lhs = rhs; - lhs.unsignedp = unsignedp; - } - break; - - /* Arithmetic. */ - case CPP_MINUS: - rhs = num_negate (rhs, precision); - case CPP_PLUS: - result.low = lhs.low + rhs.low; - result.high = lhs.high + rhs.high; - if (result.low < lhs.low) - result.high++; - - result = num_trim (result, precision); - result.unsignedp = lhs.unsignedp || rhs.unsignedp; - if (result.unsignedp) - result.overflow = false; - else - { - bool lhsp = num_positive (lhs, precision); - result.overflow = (lhsp == num_positive (rhs, precision) - && lhsp != num_positive (result, precision)); - } - return result; - - /* Comma. */ - default: /* case CPP_COMMA: */ - if (CPP_PEDANTIC (pfile) && (!CPP_OPTION (pfile, c99) - || !pfile->state.skip_eval)) - cpp_error (pfile, CPP_DL_PEDWARN, - "comma operator in operand of #if"); - lhs = rhs; - break; - } - - return lhs; -} - -/* Multiplies two unsigned cpp_num_parts to give a cpp_num. This - cannot overflow. */ -static cpp_num -num_part_mul (cpp_num_part lhs, cpp_num_part rhs) -{ - cpp_num result; - cpp_num_part middle[2], temp; - - result.low = LOW_PART (lhs) * LOW_PART (rhs); - result.high = HIGH_PART (lhs) * HIGH_PART (rhs); - - middle[0] = LOW_PART (lhs) * HIGH_PART (rhs); - middle[1] = HIGH_PART (lhs) * LOW_PART (rhs); - - temp = result.low; - result.low += LOW_PART (middle[0]) << (PART_PRECISION / 2); - if (result.low < temp) - result.high++; - - temp = result.low; - result.low += LOW_PART (middle[1]) << (PART_PRECISION / 2); - if (result.low < temp) - result.high++; - - result.high += HIGH_PART (middle[0]); - result.high += HIGH_PART (middle[1]); - result.unsignedp = 1; - - return result; -} - -/* Multiply two preprocessing numbers. */ -static cpp_num -num_mul (cpp_reader *pfile, cpp_num lhs, cpp_num rhs) -{ - cpp_num result, temp; - bool unsignedp = lhs.unsignedp || rhs.unsignedp; - bool overflow, negate = false; - size_t precision = CPP_OPTION (pfile, precision); - - /* Prepare for unsigned multiplication. */ - if (!unsignedp) - { - if (!num_positive (lhs, precision)) - negate = !negate, lhs = num_negate (lhs, precision); - if (!num_positive (rhs, precision)) - negate = !negate, rhs = num_negate (rhs, precision); - } - - overflow = lhs.high && rhs.high; - result = num_part_mul (lhs.low, rhs.low); - - temp = num_part_mul (lhs.high, rhs.low); - result.high += temp.low; - if (temp.high) - overflow = true; - - temp = num_part_mul (lhs.low, rhs.high); - result.high += temp.low; - if (temp.high) - overflow = true; - - temp.low = result.low, temp.high = result.high; - result = num_trim (result, precision); - if (!num_eq (result, temp)) - overflow = true; - - if (negate) - result = num_negate (result, precision); - - if (unsignedp) - result.overflow = false; - else - result.overflow = overflow || (num_positive (result, precision) ^ !negate - && !num_zerop (result)); - result.unsignedp = unsignedp; - - return result; -} - -/* Divide two preprocessing numbers, returning the answer or the - remainder depending upon OP. */ -static cpp_num -num_div_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) -{ - cpp_num result, sub; - cpp_num_part mask; - bool unsignedp = lhs.unsignedp || rhs.unsignedp; - bool negate = false, lhs_neg = false; - size_t i, precision = CPP_OPTION (pfile, precision); - - /* Prepare for unsigned division. */ - if (!unsignedp) - { - if (!num_positive (lhs, precision)) - negate = !negate, lhs_neg = true, lhs = num_negate (lhs, precision); - if (!num_positive (rhs, precision)) - negate = !negate, rhs = num_negate (rhs, precision); - } - - /* Find the high bit. */ - if (rhs.high) - { - i = precision - 1; - mask = (cpp_num_part) 1 << (i - PART_PRECISION); - for (; ; i--, mask >>= 1) - if (rhs.high & mask) - break; - } - else if (rhs.low) - { - if (precision > PART_PRECISION) - i = precision - PART_PRECISION - 1; - else - i = precision - 1; - mask = (cpp_num_part) 1 << i; - for (; ; i--, mask >>= 1) - if (rhs.low & mask) - break; - } - else - { - if (!pfile->state.skip_eval) - cpp_error (pfile, CPP_DL_ERROR, "division by zero in #if"); - return lhs; - } - - /* First nonzero bit of RHS is bit I. Do naive division by - shifting the RHS fully left, and subtracting from LHS if LHS is - at least as big, and then repeating but with one less shift. - This is not very efficient, but is easy to understand. */ - - rhs.unsignedp = true; - lhs.unsignedp = true; - i = precision - i - 1; - sub = num_lshift (rhs, precision, i); - - result.high = result.low = 0; - for (;;) - { - if (num_greater_eq (lhs, sub, precision)) - { - lhs = num_binary_op (pfile, lhs, sub, CPP_MINUS); - if (i >= PART_PRECISION) - result.high |= (cpp_num_part) 1 << (i - PART_PRECISION); - else - result.low |= (cpp_num_part) 1 << i; - } - if (i-- == 0) - break; - sub.low = (sub.low >> 1) | (sub.high << (PART_PRECISION - 1)); - sub.high >>= 1; - } - - /* We divide so that the remainder has the sign of the LHS. */ - if (op == CPP_DIV) - { - result.unsignedp = unsignedp; - if (unsignedp) - result.overflow = false; - else - { - if (negate) - result = num_negate (result, precision); - result.overflow = num_positive (result, precision) ^ !negate; - } - - return result; - } - - /* CPP_MOD. */ - lhs.unsignedp = unsignedp; - lhs.overflow = false; - if (lhs_neg) - lhs = num_negate (lhs, precision); - - return lhs; -} diff --git a/contrib/gcc/cppfiles.c b/contrib/gcc/cppfiles.c deleted file mode 100644 index 04f1a16..0000000 --- a/contrib/gcc/cppfiles.c +++ /dev/null @@ -1,1286 +0,0 @@ -/* Part of CPP library. File handling. - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - Written by Per Bothner, 1994. - Based on CCCP program by Paul Rubin, June 1986 - Adapted to ANSI C, Richard Stallman, Jan 1987 - Split out of cpplib.c, Zack Weinberg, Oct 1998 - Reimplemented, Neil Booth, Jul 2003 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" -#include "intl.h" -#include "mkdeps.h" -#include "hashtab.h" -#include - -/* Variable length record files on VMS will have a stat size that includes - record control characters that won't be included in the read size. */ -#ifdef VMS -# define FAB_C_VAR 2 /* variable length records (see Starlet fabdef.h) */ -# define STAT_SIZE_RELIABLE(ST) ((ST).st_fab_rfm != FAB_C_VAR) -#else -# define STAT_SIZE_RELIABLE(ST) true -#endif - -#ifdef __DJGPP__ - /* For DJGPP redirected input is opened in text mode. */ -# define set_stdin_to_binary_mode() \ - if (! isatty (0)) setmode (0, O_BINARY) -#else -# define set_stdin_to_binary_mode() /* Nothing */ -#endif - -#ifndef O_BINARY -# define O_BINARY 0 -#endif - -/* This structure represents a file searched for by CPP, whether it - exists or not. An instance may be pointed to by more than one - file_hash_entry; at present no reference count is kept. */ -struct _cpp_file -{ - /* Filename as given to #include or command line switch. */ - const char *name; - - /* The full path used to find the file. */ - const char *path; - - /* The full path of the pch file. */ - const char *pchname; - - /* The file's path with the basename stripped. NULL if it hasn't - been calculated yet. */ - const char *dir_name; - - /* Chain through all files. */ - struct _cpp_file *next_file; - - /* The contents of NAME after calling read_file(). */ - const uchar *buffer; - - /* The macro, if any, preventing re-inclusion. */ - const cpp_hashnode *cmacro; - - /* The directory in the search path where FILE was found. Used for - #include_next and determining whether a header is a system - header. */ - cpp_dir *dir; - - /* As filled in by stat(2) for the file. */ - struct stat st; - - /* File descriptor. Invalid if -1, otherwise open. */ - int fd; - - /* Zero if this file was successfully opened and stat()-ed, - otherwise errno obtained from failure. */ - int err_no; - - /* Number of times the file has been stacked for preprocessing. */ - unsigned short stack_count; - - /* If opened with #import or contains #pragma once. */ - bool once_only; - - /* If read() failed before. */ - bool dont_read; - - /* If this file is the main file. */ - bool main_file; - - /* If BUFFER above contains the true contents of the file. */ - bool buffer_valid; - - /* 0: file not known to be a PCH. - 1: file is a PCH (on return from find_include_file). - 2: file is not and never will be a valid precompiled header. - 3: file is always a valid precompiled header. */ - uchar pch; -}; - -/* A singly-linked list for all searches for a given file name, with - its head pointed to by a slot in FILE_HASH. The file name is what - appeared between the quotes in a #include directive; it can be - determined implicitly from the hash table location or explicitly - from FILE->name. - - FILE is a structure containing details about the file that was - found with that search, or details of how the search failed. - - START_DIR is the starting location of the search in the include - chain. The current directories for "" includes are also hashed in - the hash table and therefore unique. Files that are looked up - without using a search path, such as absolute filenames and file - names from the command line share a special starting directory so - they don't cause cache hits with normal include-chain lookups. - - If START_DIR is NULL then the entry is for a directory, not a file, - and the directory is in DIR. Since the starting point in a file - lookup chain is never NULL, this means that simple pointer - comparisons against START_DIR can be made to determine cache hits - in file lookups. - - If a cache lookup fails because of e.g. an extra "./" in the path, - then nothing will break. It is just less efficient as CPP will - have to do more work re-preprocessing the file, and/or comparing - its contents against earlier once-only files. -*/ -struct file_hash_entry -{ - struct file_hash_entry *next; - cpp_dir *start_dir; - union - { - _cpp_file *file; - cpp_dir *dir; - } u; -}; - -static bool open_file (_cpp_file *file); -static bool pch_open_file (cpp_reader *pfile, _cpp_file *file, - bool *invalid_pch); -static bool find_file_in_dir (cpp_reader *pfile, _cpp_file *file, - bool *invalid_pch); -static bool read_file_guts (cpp_reader *pfile, _cpp_file *file); -static bool read_file (cpp_reader *pfile, _cpp_file *file); -static bool should_stack_file (cpp_reader *, _cpp_file *file, bool import); -static struct cpp_dir *search_path_head (cpp_reader *, const char *fname, - int angle_brackets, enum include_type); -static const char *dir_name_of_file (_cpp_file *file); -static void open_file_failed (cpp_reader *pfile, _cpp_file *file, int); -static struct file_hash_entry *search_cache (struct file_hash_entry *head, - const cpp_dir *start_dir); -static _cpp_file *make_cpp_file (cpp_reader *, cpp_dir *, const char *fname); -static void destroy_cpp_file (_cpp_file *); -static cpp_dir *make_cpp_dir (cpp_reader *, const char *dir_name, int sysp); -static void allocate_file_hash_entries (cpp_reader *pfile); -static struct file_hash_entry *new_file_hash_entry (cpp_reader *pfile); -static int report_missing_guard (void **slot, void *b); -static hashval_t file_hash_hash (const void *p); -static int file_hash_eq (const void *p, const void *q); -static char *read_filename_string (int ch, FILE *f); -static void read_name_map (cpp_dir *dir); -static char *remap_filename (cpp_reader *pfile, _cpp_file *file); -static char *append_file_to_dir (const char *fname, cpp_dir *dir); -static bool validate_pch (cpp_reader *, _cpp_file *file, const char *pchname); -static bool include_pch_p (_cpp_file *file); - -/* Given a filename in FILE->PATH, with the empty string interpreted - as , open it. - - On success FILE contains an open file descriptor and stat - information for the file. On failure the file descriptor is -1 and - the appropriate errno is also stored in FILE. Returns TRUE iff - successful. - - We used to open files in nonblocking mode, but that caused more - problems than it solved. Do take care not to acquire a controlling - terminal by mistake (this can't happen on sane systems, but - paranoia is a virtue). - - Use the three-argument form of open even though we aren't - specifying O_CREAT, to defend against broken system headers. - - O_BINARY tells some runtime libraries (notably DJGPP) not to do - newline translation; we can handle DOS line breaks just fine - ourselves. */ -static bool -open_file (_cpp_file *file) -{ - if (file->path[0] == '\0') - { - file->fd = 0; - set_stdin_to_binary_mode (); - } - else - file->fd = open (file->path, O_RDONLY | O_NOCTTY | O_BINARY, 0666); - - if (file->fd != -1) - { - if (fstat (file->fd, &file->st) == 0) - { - if (!S_ISDIR (file->st.st_mode)) - { - file->err_no = 0; - return true; - } - - /* Ignore a directory and continue the search. The file we're - looking for may be elsewhere in the search path. */ - errno = ENOENT; - } - - close (file->fd); - file->fd = -1; - } - else if (errno == ENOTDIR) - errno = ENOENT; - - file->err_no = errno; - - return false; -} - -/* Temporary PCH intercept of opening a file. Try to find a PCH file - based on FILE->name and FILE->dir, and test those found for - validity using PFILE->cb.valid_pch. Return true iff a valid file is - found. Set *INVALID_PCH if a PCH file is found but wasn't valid. */ - -static bool -pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch) -{ - static const char extension[] = ".gch"; - const char *path = file->path; - size_t len, flen; - char *pchname; - struct stat st; - bool valid = false; - - /* No PCH on or if not requested. */ - if (file->name[0] == '\0' || !pfile->cb.valid_pch) - return false; - - flen = strlen (path); - len = flen + sizeof (extension); - pchname = xmalloc (len); - memcpy (pchname, path, flen); - memcpy (pchname + flen, extension, sizeof (extension)); - - if (stat (pchname, &st) == 0) - { - DIR *pchdir; - struct dirent *d; - size_t dlen, plen = len; - - if (!S_ISDIR (st.st_mode)) - valid = validate_pch (pfile, file, pchname); - else if ((pchdir = opendir (pchname)) != NULL) - { - pchname[plen - 1] = '/'; - while ((d = readdir (pchdir)) != NULL) - { - dlen = strlen (d->d_name) + 1; - if ((strcmp (d->d_name, ".") == 0) - || (strcmp (d->d_name, "..") == 0)) - continue; - if (dlen + plen > len) - { - len += dlen + 64; - pchname = xrealloc (pchname, len); - } - memcpy (pchname + plen, d->d_name, dlen); - valid = validate_pch (pfile, file, pchname); - if (valid) - break; - } - closedir (pchdir); - } - if (valid) - file->pch = true; - else - *invalid_pch = true; - } - - if (valid) - file->pchname = pchname; - else - free (pchname); - - return valid; -} - -/* Try to open the path FILE->name appended to FILE->dir. This is - where remap and PCH intercept the file lookup process. Return true - if the file was found, whether or not the open was successful. - Set *INVALID_PCH to true if a PCH file is found but wasn't valid. */ - -static bool -find_file_in_dir (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch) -{ - char *path; - - if (CPP_OPTION (pfile, remap) && (path = remap_filename (pfile, file))) - ; - else - path = append_file_to_dir (file->name, file->dir); - - file->path = path; - if (pch_open_file (pfile, file, invalid_pch)) - return true; - - if (open_file (file)) - return true; - - if (file->err_no != ENOENT) - { - open_file_failed (pfile, file, 0); - return true; - } - - free (path); - file->path = file->name; - return false; -} - -bool -_cpp_find_failed (_cpp_file *file) -{ - return file->err_no != 0; -} - -/* Given a filename FNAME search for such a file in the include path - starting from START_DIR. If FNAME is the empty string it is - interpreted as STDIN if START_DIR is PFILE->no_seach_path. - - If the file is not found in the file cache fall back to the O/S and - add the result to our cache. - - If the file was not found in the filesystem, or there was an error - opening it, then ERR_NO is nonzero and FD is -1. If the file was - found, then ERR_NO is zero and FD could be -1 or an open file - descriptor. FD can be -1 if the file was found in the cache and - had previously been closed. To open it again pass the return value - to open_file(). -*/ -_cpp_file * -_cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir, bool fake, int angle_brackets) -{ - struct file_hash_entry *entry, **hash_slot; - _cpp_file *file; - bool invalid_pch = false; - - /* Ensure we get no confusion between cached files and directories. */ - if (start_dir == NULL) - cpp_error (pfile, CPP_DL_ICE, "NULL directory in find_file"); - - hash_slot = (struct file_hash_entry **) - htab_find_slot_with_hash (pfile->file_hash, fname, - htab_hash_string (fname), - INSERT); - - /* First check the cache before we resort to memory allocation. */ - entry = search_cache (*hash_slot, start_dir); - if (entry) - return entry->u.file; - - file = make_cpp_file (pfile, start_dir, fname); - - /* Try each path in the include chain. */ - for (; !fake ;) - { - if (find_file_in_dir (pfile, file, &invalid_pch)) - break; - - file->dir = file->dir->next; - if (file->dir == NULL) - { - open_file_failed (pfile, file, angle_brackets); - if (invalid_pch) - { - cpp_error (pfile, CPP_DL_ERROR, - "one or more PCH files were found, but they were invalid"); - if (!cpp_get_options (pfile)->warn_invalid_pch) - cpp_error (pfile, CPP_DL_ERROR, - "use -Winvalid-pch for more information"); - } - break; - } - - /* Only check the cache for the starting location (done above) - and the quote and bracket chain heads because there are no - other possible starting points for searches. */ - if (file->dir != pfile->bracket_include - && file->dir != pfile->quote_include) - continue; - - entry = search_cache (*hash_slot, file->dir); - if (entry) - break; - } - - if (entry) - { - /* Cache for START_DIR too, sharing the _cpp_file structure. */ - free ((char *) file->name); - free (file); - file = entry->u.file; - } - else - { - /* This is a new file; put it in the list. */ - file->next_file = pfile->all_files; - pfile->all_files = file; - } - - /* Store this new result in the hash table. */ - entry = new_file_hash_entry (pfile); - entry->next = *hash_slot; - entry->start_dir = start_dir; - entry->u.file = file; - *hash_slot = entry; - - return file; -} - -/* Read a file into FILE->buffer, returning true on success. - - If FILE->fd is something weird, like a block device, we don't want - to read it at all. Don't even try to figure out what something is, - except for plain files and block devices, since there is no - reliable portable way of doing this. - - FIXME: Flush file cache and try again if we run out of memory. */ -static bool -read_file_guts (cpp_reader *pfile, _cpp_file *file) -{ - ssize_t size, total, count; - uchar *buf; - bool regular; - - if (S_ISBLK (file->st.st_mode)) - { - cpp_error (pfile, CPP_DL_ERROR, "%s is a block device", file->path); - return false; - } - - regular = S_ISREG (file->st.st_mode); - if (regular) - { - /* off_t might have a wider range than ssize_t - in other words, - the max size of a file might be bigger than the address - space. We can't handle a file that large. (Anyone with - a single source file bigger than 2GB needs to rethink - their coding style.) Some systems (e.g. AIX 4.1) define - SSIZE_MAX to be much smaller than the actual range of the - type. Use INTTYPE_MAXIMUM unconditionally to ensure this - does not bite us. */ - if (file->st.st_size > INTTYPE_MAXIMUM (ssize_t)) - { - cpp_error (pfile, CPP_DL_ERROR, "%s is too large", file->path); - return false; - } - - size = file->st.st_size; - } - else - /* 8 kilobytes is a sensible starting size. It ought to be bigger - than the kernel pipe buffer, and it's definitely bigger than - the majority of C source files. */ - size = 8 * 1024; - - buf = xmalloc (size + 1); - total = 0; - while ((count = read (file->fd, buf + total, size - total)) > 0) - { - total += count; - - if (total == size) - { - if (regular) - break; - size *= 2; - buf = xrealloc (buf, size + 1); - } - } - - if (count < 0) - { - cpp_errno (pfile, CPP_DL_ERROR, file->path); - return false; - } - - if (regular && total != size && STAT_SIZE_RELIABLE (file->st)) - cpp_error (pfile, CPP_DL_WARNING, - "%s is shorter than expected", file->path); - - file->buffer = _cpp_convert_input (pfile, CPP_OPTION (pfile, input_charset), - buf, size, total, &file->st.st_size); - file->buffer_valid = true; - - return true; -} - -/* Convenience wrapper around read_file_guts that opens the file if - necessary and closes the file descriptor after reading. FILE must - have been passed through find_file() at some stage. */ -static bool -read_file (cpp_reader *pfile, _cpp_file *file) -{ - /* If we already have its contents in memory, succeed immediately. */ - if (file->buffer_valid) - return true; - - /* If an earlier read failed for some reason don't try again. */ - if (file->dont_read || file->err_no) - return false; - - if (file->fd == -1 && !open_file (file)) - { - open_file_failed (pfile, file, 0); - return false; - } - - file->dont_read = !read_file_guts (pfile, file); - close (file->fd); - file->fd = -1; - - return !file->dont_read; -} - -/* Returns TRUE if FILE's contents have been successfully placed in - FILE->buffer and the file should be stacked, otherwise false. */ -static bool -should_stack_file (cpp_reader *pfile, _cpp_file *file, bool import) -{ - _cpp_file *f; - - /* Skip once-only files. */ - if (file->once_only) - return false; - - /* We must mark the file once-only if #import now, before header - guard checks. Otherwise, undefining the header guard might - cause the file to be re-stacked. */ - if (import) - { - _cpp_mark_file_once_only (pfile, file); - - /* Don't stack files that have been stacked before. */ - if (file->stack_count) - return false; - } - - /* Skip if the file had a header guard and the macro is defined. - PCH relies on this appearing before the PCH handler below. */ - if (file->cmacro && file->cmacro->type == NT_MACRO) - return false; - - /* Handle PCH files immediately; don't stack them. */ - if (include_pch_p (file)) - { - pfile->cb.read_pch (pfile, file->path, file->fd, file->pchname); - close (file->fd); - file->fd = -1; - return false; - } - - if (!read_file (pfile, file)) - return false; - - /* Now we've read the file's contents, we can stack it if there - are no once-only files. */ - if (!pfile->seen_once_only) - return true; - - /* We may have read the file under a different name. Look - for likely candidates and compare file contents to be sure. */ - for (f = pfile->all_files; f; f = f->next_file) - { - if (f == file) - continue; - - if ((import || f->once_only) - && f->err_no == 0 - && f->st.st_mtime == file->st.st_mtime - && f->st.st_size == file->st.st_size) - { - _cpp_file *ref_file; - bool same_file_p = false; - - if (f->buffer && !f->buffer_valid) - { - /* We already have a buffer but it is not valid, because - the file is still stacked. Make a new one. */ - ref_file = make_cpp_file (pfile, f->dir, f->name); - ref_file->path = f->path; - } - else - /* The file is not stacked anymore. We can reuse it. */ - ref_file = f; - - same_file_p = read_file (pfile, ref_file) - /* Size might have changed in read_file(). */ - && ref_file->st.st_size == file->st.st_size - && !memcmp (ref_file->buffer, - file->buffer, - file->st.st_size); - - if (f->buffer && !f->buffer_valid) - { - ref_file->path = 0; - destroy_cpp_file (ref_file); - } - - if (same_file_p) - break; - } - } - - return f == NULL; -} - -/* Place the file referenced by FILE into a new buffer on the buffer - stack if possible. IMPORT is true if this stacking attempt is - because of a #import directive. Returns true if a buffer is - stacked. */ -bool -_cpp_stack_file (cpp_reader *pfile, _cpp_file *file, bool import) -{ - cpp_buffer *buffer; - int sysp; - - if (!should_stack_file (pfile, file, import)) - return false; - - sysp = MAX ((pfile->map ? pfile->map->sysp : 0), - (file->dir ? file->dir->sysp : 0)); - - /* Add the file to the dependencies on its first inclusion. */ - if (CPP_OPTION (pfile, deps.style) > !!sysp && !file->stack_count) - { - if (!file->main_file || !CPP_OPTION (pfile, deps.ignore_main_file)) - deps_add_dep (pfile->deps, file->path); - } - - /* Clear buffer_valid since _cpp_clean_line messes it up. */ - file->buffer_valid = false; - file->stack_count++; - - /* Stack the buffer. */ - buffer = cpp_push_buffer (pfile, file->buffer, file->st.st_size, - CPP_OPTION (pfile, preprocessed)); - buffer->file = file; - - /* Initialize controlling macro state. */ - pfile->mi_valid = true; - pfile->mi_cmacro = 0; - - /* Generate the call back. */ - _cpp_do_file_change (pfile, LC_ENTER, file->path, 1, sysp); - - return true; -} - -/* Mark FILE to be included once only. */ -void -_cpp_mark_file_once_only (cpp_reader *pfile, _cpp_file *file) -{ - pfile->seen_once_only = true; - file->once_only = true; -} - -/* Return the directory from which searching for FNAME should start, - considering the directive TYPE and ANGLE_BRACKETS. If there is - nothing left in the path, returns NULL. */ -static struct cpp_dir * -search_path_head (cpp_reader *pfile, const char *fname, int angle_brackets, - enum include_type type) -{ - cpp_dir *dir; - _cpp_file *file; - - if (IS_ABSOLUTE_PATH (fname)) - return &pfile->no_search_path; - - /* pfile->buffer is NULL when processing an -include command-line flag. */ - file = pfile->buffer == NULL ? pfile->main_file : pfile->buffer->file; - - /* For #include_next, skip in the search path past the dir in which - the current file was found, but if it was found via an absolute - path use the normal search logic. */ - if (type == IT_INCLUDE_NEXT && file->dir) - dir = file->dir->next; - else if (angle_brackets) - dir = pfile->bracket_include; - else if (type == IT_CMDLINE) - /* -include and -imacros use the #include "" chain with the - preprocessor's cwd prepended. */ - return make_cpp_dir (pfile, "./", false); - else if (pfile->quote_ignores_source_dir) - dir = pfile->quote_include; - else - return make_cpp_dir (pfile, dir_name_of_file (file), pfile->map->sysp); - - if (dir == NULL) - cpp_error (pfile, CPP_DL_ERROR, - "no include path in which to search for %s", fname); - - return dir; -} - -/* Strip the basename from the file's path. It ends with a slash if - of nonzero length. Note that this procedure also works for - , which is represented by the empty string. */ -static const char * -dir_name_of_file (_cpp_file *file) -{ - if (!file->dir_name) - { - size_t len = lbasename (file->path) - file->path; - char *dir_name = xmalloc (len + 1); - - memcpy (dir_name, file->path, len); - dir_name[len] = '\0'; - file->dir_name = dir_name; - } - - return file->dir_name; -} - -/* Handles #include-family directives (distinguished by TYPE), - including HEADER, and the command line -imacros and -include. - Returns true if a buffer was stacked. */ -bool -_cpp_stack_include (cpp_reader *pfile, const char *fname, int angle_brackets, - enum include_type type) -{ - struct cpp_dir *dir; - - dir = search_path_head (pfile, fname, angle_brackets, type); - if (!dir) - return false; - - return _cpp_stack_file (pfile, _cpp_find_file (pfile, fname, dir, false, - angle_brackets), - type == IT_IMPORT); -} - -/* Could not open FILE. The complication is dependency output. */ -static void -open_file_failed (cpp_reader *pfile, _cpp_file *file, int angle_brackets) -{ - int sysp = pfile->map ? pfile->map->sysp: 0; - bool print_dep = CPP_OPTION (pfile, deps.style) > (angle_brackets || !!sysp); - - errno = file->err_no; - if (print_dep && CPP_OPTION (pfile, deps.missing_files) && errno == ENOENT) - deps_add_dep (pfile->deps, file->name); - else - { - /* If we are outputting dependencies but not for this file then - don't error because we can still produce correct output. */ - if (CPP_OPTION (pfile, deps.style) && ! print_dep) - cpp_errno (pfile, CPP_DL_WARNING, file->path); - else - cpp_errno (pfile, CPP_DL_ERROR, file->path); - } -} - -/* Search in the chain beginning at HEAD for a file whose search path - started at START_DIR != NULL. */ -static struct file_hash_entry * -search_cache (struct file_hash_entry *head, const cpp_dir *start_dir) -{ - while (head && head->start_dir != start_dir) - head = head->next; - - return head; -} - -/* Allocate a new _cpp_file structure. */ -static _cpp_file * -make_cpp_file (cpp_reader *pfile, cpp_dir *dir, const char *fname) -{ - _cpp_file *file; - - file = xcalloc (1, sizeof (_cpp_file)); - file->main_file = !pfile->buffer; - file->fd = -1; - file->dir = dir; - file->name = xstrdup (fname); - - return file; -} - -/* Release a _cpp_file structure. */ -static void -destroy_cpp_file (_cpp_file *file) -{ - if (file->buffer) - free ((void *) file->buffer); - free ((void *) file->name); - free (file); -} - -/* A hash of directory names. The directory names are the path names - of files which contain a #include "", the included file name is - appended to this directories. - - To avoid duplicate entries we follow the convention that all - non-empty directory names should end in a '/'. DIR_NAME must be - stored in permanently allocated memory. */ -static cpp_dir * -make_cpp_dir (cpp_reader *pfile, const char *dir_name, int sysp) -{ - struct file_hash_entry *entry, **hash_slot; - cpp_dir *dir; - - hash_slot = (struct file_hash_entry **) - htab_find_slot_with_hash (pfile->dir_hash, dir_name, - htab_hash_string (dir_name), - INSERT); - - /* Have we already hashed this directory? */ - for (entry = *hash_slot; entry; entry = entry->next) - if (entry->start_dir == NULL) - return entry->u.dir; - - dir = xcalloc (1, sizeof (cpp_dir)); - dir->next = pfile->quote_include; - dir->name = (char *) dir_name; - dir->len = strlen (dir_name); - dir->sysp = sysp; - - /* Store this new result in the hash table. */ - entry = new_file_hash_entry (pfile); - entry->next = *hash_slot; - entry->start_dir = NULL; - entry->u.dir = dir; - *hash_slot = entry; - - return dir; -} - -/* Create a new block of memory for file hash entries. */ -static void -allocate_file_hash_entries (cpp_reader *pfile) -{ - pfile->file_hash_entries_used = 0; - pfile->file_hash_entries_allocated = 127; - pfile->file_hash_entries = xmalloc - (pfile->file_hash_entries_allocated * sizeof (struct file_hash_entry)); -} - -/* Return a new file hash entry. */ -static struct file_hash_entry * -new_file_hash_entry (cpp_reader *pfile) -{ - if (pfile->file_hash_entries_used == pfile->file_hash_entries_allocated) - allocate_file_hash_entries (pfile); - - return &pfile->file_hash_entries[pfile->file_hash_entries_used++]; -} - -/* Returns TRUE if a file FNAME has ever been successfully opened. - This routine is not intended to correctly handle filenames aliased - by links or redundant . or .. traversals etc. */ -bool -cpp_included (cpp_reader *pfile, const char *fname) -{ - struct file_hash_entry *entry; - - entry = htab_find_with_hash (pfile->file_hash, fname, - htab_hash_string (fname)); - - while (entry && (entry->start_dir == NULL || entry->u.file->err_no)) - entry = entry->next; - - return entry != NULL; -} - -/* Calculate the hash value of a file hash entry P. */ - -static hashval_t -file_hash_hash (const void *p) -{ - struct file_hash_entry *entry = (struct file_hash_entry *) p; - const char *hname; - if (entry->start_dir) - hname = entry->u.file->name; - else - hname = entry->u.dir->name; - - return htab_hash_string (hname); -} - -/* Compare a string Q against a file hash entry P. */ -static int -file_hash_eq (const void *p, const void *q) -{ - struct file_hash_entry *entry = (struct file_hash_entry *) p; - const char *fname = (const char *) q; - const char *hname; - - if (entry->start_dir) - hname = entry->u.file->name; - else - hname = entry->u.dir->name; - - return strcmp (hname, fname) == 0; -} - -/* Initialize everything in this source file. */ -void -_cpp_init_files (cpp_reader *pfile) -{ - pfile->file_hash = htab_create_alloc (127, file_hash_hash, file_hash_eq, - NULL, xcalloc, free); - pfile->dir_hash = htab_create_alloc (127, file_hash_hash, file_hash_eq, - NULL, xcalloc, free); - allocate_file_hash_entries (pfile); -} - -/* Finalize everything in this source file. */ -void -_cpp_cleanup_files (cpp_reader *pfile) -{ - htab_delete (pfile->file_hash); - htab_delete (pfile->dir_hash); -} - -/* Enter a file name in the hash for the sake of cpp_included. */ -void -_cpp_fake_include (cpp_reader *pfile, const char *fname) -{ - _cpp_find_file (pfile, fname, pfile->buffer->file->dir, true, 0); -} - -/* Not everyone who wants to set system-header-ness on a buffer can - see the details of a buffer. This is an exported interface because - fix-header needs it. */ -void -cpp_make_system_header (cpp_reader *pfile, int syshdr, int externc) -{ - int flags = 0; - - /* 1 = system header, 2 = system header to be treated as C. */ - if (syshdr) - flags = 1 + (externc != 0); - _cpp_do_file_change (pfile, LC_RENAME, pfile->map->to_file, - SOURCE_LINE (pfile->map, pfile->line), flags); -} - -/* Allow the client to change the current file. Used by the front end - to achieve pseudo-file names like . - If REASON is LC_LEAVE, then NEW_NAME must be NULL. */ -void -cpp_change_file (cpp_reader *pfile, enum lc_reason reason, - const char *new_name) -{ - _cpp_do_file_change (pfile, reason, new_name, 1, 0); -} - -/* Callback function for htab_traverse. */ -static int -report_missing_guard (void **slot, void *b) -{ - struct file_hash_entry *entry = (struct file_hash_entry *) *slot; - int *bannerp = (int *) b; - - /* Skip directories. */ - if (entry->start_dir != NULL) - { - _cpp_file *file = entry->u.file; - - /* We don't want MI guard advice for the main file. */ - if (file->cmacro == NULL && file->stack_count == 1 && !file->main_file) - { - if (*bannerp == 0) - { - fputs (_("Multiple include guards may be useful for:\n"), - stderr); - *bannerp = 1; - } - - fputs (entry->u.file->path, stderr); - putc ('\n', stderr); - } - } - - return 0; -} - -/* Report on all files that might benefit from a multiple include guard. - Triggered by -H. */ -void -_cpp_report_missing_guards (cpp_reader *pfile) -{ - int banner = 0; - - htab_traverse (pfile->file_hash, report_missing_guard, &banner); -} - -/* Locate HEADER, and determine whether it is newer than the current - file. If it cannot be located or dated, return -1, if it is - newer, return 1, otherwise 0. */ -int -_cpp_compare_file_date (cpp_reader *pfile, const char *fname, - int angle_brackets) -{ - _cpp_file *file; - struct cpp_dir *dir; - - dir = search_path_head (pfile, fname, angle_brackets, IT_INCLUDE); - if (!dir) - return -1; - - file = _cpp_find_file (pfile, fname, dir, false, angle_brackets); - if (file->err_no) - return -1; - - if (file->fd != -1) - { - close (file->fd); - file->fd = -1; - } - - return file->st.st_mtime > pfile->buffer->file->st.st_mtime; -} - -/* Pushes the given file onto the buffer stack. Returns nonzero if - successful. */ -bool -cpp_push_include (cpp_reader *pfile, const char *fname) -{ - /* Make the command line directive take up a line. */ - pfile->line++; - return _cpp_stack_include (pfile, fname, false, IT_CMDLINE); -} - -/* Do appropriate cleanup when a file INC's buffer is popped off the - input stack. */ -void -_cpp_pop_file_buffer (cpp_reader *pfile, _cpp_file *file) -{ - /* Record the inclusion-preventing macro, which could be NULL - meaning no controlling macro. */ - if (pfile->mi_valid && file->cmacro == NULL) - file->cmacro = pfile->mi_cmacro; - - /* Invalidate control macros in the #including file. */ - pfile->mi_valid = false; - - if (file->buffer) - { - free ((void *) file->buffer); - file->buffer = NULL; - file->buffer_valid = false; - } -} - -/* Set the include chain for "" to QUOTE, for <> to BRACKET. If - QUOTE_IGNORES_SOURCE_DIR, then "" includes do not look in the - directory of the including file. - - If BRACKET does not lie in the QUOTE chain, it is set to QUOTE. */ -void -cpp_set_include_chains (cpp_reader *pfile, cpp_dir *quote, cpp_dir *bracket, - int quote_ignores_source_dir) -{ - pfile->quote_include = quote; - pfile->bracket_include = quote; - pfile->quote_ignores_source_dir = quote_ignores_source_dir; - - for (; quote; quote = quote->next) - { - quote->name_map = NULL; - quote->len = strlen (quote->name); - if (quote == bracket) - pfile->bracket_include = bracket; - } -} - -/* Append the file name to the directory to create the path, but don't - turn / into // or // into ///; // may be a namespace escape. */ -static char * -append_file_to_dir (const char *fname, cpp_dir *dir) -{ - size_t dlen, flen; - char *path; - - dlen = dir->len; - flen = strlen (fname); - path = xmalloc (dlen + 1 + flen + 1); - memcpy (path, dir->name, dlen); - if (dlen && path[dlen - 1] != '/') - path[dlen++] = '/'; - memcpy (&path[dlen], fname, flen + 1); - - return path; -} - -/* Read a space delimited string of unlimited length from a stdio - file F. */ -static char * -read_filename_string (int ch, FILE *f) -{ - char *alloc, *set; - int len; - - len = 20; - set = alloc = xmalloc (len + 1); - if (! is_space (ch)) - { - *set++ = ch; - while ((ch = getc (f)) != EOF && ! is_space (ch)) - { - if (set - alloc == len) - { - len *= 2; - alloc = xrealloc (alloc, len + 1); - set = alloc + len / 2; - } - *set++ = ch; - } - } - *set = '\0'; - ungetc (ch, f); - return alloc; -} - -/* Read the file name map file for DIR. */ -static void -read_name_map (cpp_dir *dir) -{ - static const char FILE_NAME_MAP_FILE[] = "header.gcc"; - char *name; - FILE *f; - size_t len, count = 0, room = 9; - - len = dir->len; - name = alloca (len + sizeof (FILE_NAME_MAP_FILE) + 1); - memcpy (name, dir->name, len); - if (len && name[len - 1] != '/') - name[len++] = '/'; - strcpy (name + len, FILE_NAME_MAP_FILE); - f = fopen (name, "r"); - - dir->name_map = xmalloc (room * sizeof (char *)); - - /* Silently return NULL if we cannot open. */ - if (f) - { - int ch; - - while ((ch = getc (f)) != EOF) - { - char *to; - - if (is_space (ch)) - continue; - - if (count + 2 > room) - { - room += 8; - dir->name_map = xrealloc (dir->name_map, room * sizeof (char *)); - } - - dir->name_map[count] = read_filename_string (ch, f); - while ((ch = getc (f)) != EOF && is_hspace (ch)) - ; - - to = read_filename_string (ch, f); - if (IS_ABSOLUTE_PATH (to)) - dir->name_map[count + 1] = to; - else - { - dir->name_map[count + 1] = append_file_to_dir (to, dir); - free (to); - } - - count += 2; - while ((ch = getc (f)) != '\n') - if (ch == EOF) - break; - } - - fclose (f); - } - - /* Terminate the list of maps. */ - dir->name_map[count] = NULL; -} - -/* Remap a FILE's name based on the file_name_map, if any, for - FILE->dir. If the file name has any directory separators, - recursively check those directories too. */ -static char * -remap_filename (cpp_reader *pfile, _cpp_file *file) -{ - const char *fname, *p; - char *new_dir; - cpp_dir *dir; - size_t index, len; - - dir = file->dir; - fname = file->name; - - for (;;) - { - if (!dir->name_map) - read_name_map (dir); - - for (index = 0; dir->name_map[index]; index += 2) - if (!strcmp (dir->name_map[index], fname)) - return xstrdup (dir->name_map[index + 1]); - - p = strchr (fname, '/'); - if (!p || p == fname) - return NULL; - - len = dir->len + (p - fname + 1); - new_dir = xmalloc (len + 1); - memcpy (new_dir, dir->name, dir->len); - memcpy (new_dir + dir->len, fname, p - fname + 1); - new_dir[len] = '\0'; - - dir = make_cpp_dir (pfile, new_dir, dir->sysp); - fname = p + 1; - } -} - -/* Return true if FILE is usable by PCH. */ -static bool -include_pch_p (_cpp_file *file) -{ - return file->pch & 1; -} - -/* Returns true if PCHNAME is a valid PCH file for FILE. */ -static bool -validate_pch (cpp_reader *pfile, _cpp_file *file, const char *pchname) -{ - const char *saved_path = file->path; - bool valid = false; - - file->path = pchname; - if (open_file (file)) - { - valid = 1 & pfile->cb.valid_pch (pfile, pchname, file->fd); - - if (!valid) - { - close (file->fd); - file->fd = -1; - } - - if (CPP_OPTION (pfile, print_include_names)) - { - unsigned int i; - for (i = 1; i < pfile->line_maps.depth; i++) - putc ('.', stderr); - fprintf (stderr, "%c %s\n", - valid ? '!' : 'x', pchname); - } - } - - file->path = saved_path; - return valid; -} diff --git a/contrib/gcc/cpphash.c b/contrib/gcc/cpphash.c deleted file mode 100644 index 1e07f41..0000000 --- a/contrib/gcc/cpphash.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Hash tables for the CPP library. - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - Written by Per Bothner, 1994. - Based on CCCP program by Paul Rubin, June 1986 - Adapted to ANSI C, Richard Stallman, Jan 1987 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - In other words, you are welcome to use, share and improve this program. - You are forbidden to forbid anyone else to use, share and improve - what you give them. Help stamp out software-hoarding! */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" - -static cpp_hashnode *alloc_node (hash_table *); - -/* Return an identifier node for hashtable.c. Used by cpplib except - when integrated with the C front ends. */ -static cpp_hashnode * -alloc_node (hash_table *table) -{ - cpp_hashnode *node; - - node = obstack_alloc (&table->pfile->hash_ob, sizeof (cpp_hashnode)); - memset (node, 0, sizeof (cpp_hashnode)); - return node; -} - -/* Set up the identifier hash table. Use TABLE if non-null, otherwise - create our own. */ -void -_cpp_init_hashtable (cpp_reader *pfile, hash_table *table) -{ - struct spec_nodes *s; - - if (table == NULL) - { - pfile->our_hashtable = 1; - table = ht_create (13); /* 8K (=2^13) entries. */ - table->alloc_node = (hashnode (*) (hash_table *)) alloc_node; - - _obstack_begin (&pfile->hash_ob, 0, 0, - (void *(*) (long)) xmalloc, - (void (*) (void *)) free); - } - - table->pfile = pfile; - pfile->hash_table = table; - - /* Now we can initialize things that use the hash table. */ - _cpp_init_directives (pfile); - _cpp_init_internal_pragmas (pfile); - - s = &pfile->spec_nodes; - s->n_defined = cpp_lookup (pfile, DSC("defined")); - s->n_true = cpp_lookup (pfile, DSC("true")); - s->n_false = cpp_lookup (pfile, DSC("false")); - s->n__VA_ARGS__ = cpp_lookup (pfile, DSC("__VA_ARGS__")); - s->n__VA_ARGS__->flags |= NODE_DIAGNOSTIC; -} - -/* Tear down the identifier hash table. */ -void -_cpp_destroy_hashtable (cpp_reader *pfile) -{ - if (pfile->our_hashtable) - { - ht_destroy (pfile->hash_table); - obstack_free (&pfile->hash_ob, 0); - } -} - -/* Returns the hash entry for the STR of length LEN, creating one - if necessary. */ -cpp_hashnode * -cpp_lookup (cpp_reader *pfile, const unsigned char *str, unsigned int len) -{ - /* ht_lookup cannot return NULL. */ - return CPP_HASHNODE (ht_lookup (pfile->hash_table, str, len, HT_ALLOC)); -} - -/* Determine whether the str STR, of length LEN, is a defined macro. */ -int -cpp_defined (cpp_reader *pfile, const unsigned char *str, int len) -{ - cpp_hashnode *node; - - node = CPP_HASHNODE (ht_lookup (pfile->hash_table, str, len, HT_NO_INSERT)); - - /* If it's of type NT_MACRO, it cannot be poisoned. */ - return node && node->type == NT_MACRO; -} - -/* For all nodes in the hashtable, callback CB with parameters PFILE, - the node, and V. */ -void -cpp_forall_identifiers (cpp_reader *pfile, cpp_cb cb, void *v) -{ - /* We don't need a proxy since the hash table's identifier comes - first in cpp_hashnode. */ - ht_forall (pfile->hash_table, (ht_cb) cb, v); -} diff --git a/contrib/gcc/cpphash.h b/contrib/gcc/cpphash.h deleted file mode 100644 index 8c814b9..0000000 --- a/contrib/gcc/cpphash.h +++ /dev/null @@ -1,639 +0,0 @@ -/* Part of CPP library. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* This header defines all the internal data structures and functions - that need to be visible across files. It's called cpphash.h for - historical reasons. */ - -#ifndef GCC_CPPHASH_H -#define GCC_CPPHASH_H - -#include "hashtable.h" - -#if defined HAVE_ICONV_H && defined HAVE_ICONV -#include -#else -#define HAVE_ICONV 0 -typedef int iconv_t; /* dummy */ -#endif - -struct directive; /* Deliberately incomplete. */ -struct pending_option; -struct op; -struct _cpp_strbuf; - -typedef bool (*convert_f) (iconv_t, const unsigned char *, size_t, - struct _cpp_strbuf *); -struct cset_converter -{ - convert_f func; - iconv_t cd; -}; - -#ifndef HAVE_UCHAR -typedef unsigned char uchar; -#endif -#define U (const uchar *) /* Intended use: U"string" */ - -#define BITS_PER_CPPCHAR_T (CHAR_BIT * sizeof (cppchar_t)) - -/* Test if a sign is valid within a preprocessing number. */ -#define VALID_SIGN(c, prevc) \ - (((c) == '+' || (c) == '-') && \ - ((prevc) == 'e' || (prevc) == 'E' \ - || (((prevc) == 'p' || (prevc) == 'P') \ - && CPP_OPTION (pfile, extended_numbers)))) - -#define CPP_OPTION(PFILE, OPTION) ((PFILE)->opts.OPTION) -#define CPP_BUFFER(PFILE) ((PFILE)->buffer) -#define CPP_BUF_COLUMN(BUF, CUR) ((CUR) - (BUF)->line_base) -#define CPP_BUF_COL(BUF) CPP_BUF_COLUMN(BUF, (BUF)->cur) - -/* Maximum nesting of cpp_buffers. We use a static limit, partly for - efficiency, and partly to limit runaway recursion. */ -#define CPP_STACK_MAX 200 - -/* Host alignment handling. */ -struct dummy -{ - char c; - union - { - double d; - int *p; - } u; -}; - -#define DEFAULT_ALIGNMENT offsetof (struct dummy, u) -#define CPP_ALIGN2(size, align) (((size) + ((align) - 1)) & ~((align) - 1)) -#define CPP_ALIGN(size) CPP_ALIGN2 (size, DEFAULT_ALIGNMENT) - -/* Each macro definition is recorded in a cpp_macro structure. - Variadic macros cannot occur with traditional cpp. */ -struct cpp_macro -{ - /* Parameters, if any. */ - cpp_hashnode **params; - - /* Replacement tokens (ISO) or replacement text (traditional). See - comment at top of cpptrad.c for how traditional function-like - macros are encoded. */ - union - { - cpp_token *tokens; - const uchar *text; - } exp; - - /* Definition line number. */ - fileline line; - - /* Number of tokens in expansion, or bytes for traditional macros. */ - unsigned int count; - - /* Number of parameters. */ - unsigned short paramc; - - /* If a function-like macro. */ - unsigned int fun_like : 1; - - /* If a variadic macro. */ - unsigned int variadic : 1; - - /* If macro defined in system header. */ - unsigned int syshdr : 1; - - /* Nonzero if it has been expanded or had its existence tested. */ - unsigned int used : 1; -}; - -#define _cpp_mark_macro_used(NODE) do { \ - if ((NODE)->type == NT_MACRO && !((NODE)->flags & NODE_BUILTIN)) \ - (NODE)->value.macro->used = 1; } while (0) - -/* A generic memory buffer, and operations on it. */ -typedef struct _cpp_buff _cpp_buff; -struct _cpp_buff -{ - struct _cpp_buff *next; - unsigned char *base, *cur, *limit; -}; - -extern _cpp_buff *_cpp_get_buff (cpp_reader *, size_t); -extern void _cpp_release_buff (cpp_reader *, _cpp_buff *); -extern void _cpp_extend_buff (cpp_reader *, _cpp_buff **, size_t); -extern _cpp_buff *_cpp_append_extend_buff (cpp_reader *, _cpp_buff *, size_t); -extern void _cpp_free_buff (_cpp_buff *); -extern unsigned char *_cpp_aligned_alloc (cpp_reader *, size_t); -extern unsigned char *_cpp_unaligned_alloc (cpp_reader *, size_t); - -#define BUFF_ROOM(BUFF) (size_t) ((BUFF)->limit - (BUFF)->cur) -#define BUFF_FRONT(BUFF) ((BUFF)->cur) -#define BUFF_LIMIT(BUFF) ((BUFF)->limit) - -/* #include types. */ -enum include_type {IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE}; - -union utoken -{ - const cpp_token *token; - const cpp_token **ptoken; -}; - -/* A "run" of tokens; part of a chain of runs. */ -typedef struct tokenrun tokenrun; -struct tokenrun -{ - tokenrun *next, *prev; - cpp_token *base, *limit; -}; - -/* Accessor macros for struct cpp_context. */ -#define FIRST(c) ((c)->u.iso.first) -#define LAST(c) ((c)->u.iso.last) -#define CUR(c) ((c)->u.trad.cur) -#define RLIMIT(c) ((c)->u.trad.rlimit) - -typedef struct cpp_context cpp_context; -struct cpp_context -{ - /* Doubly-linked list. */ - cpp_context *next, *prev; - - union - { - /* For ISO macro expansion. Contexts other than the base context - are contiguous tokens. e.g. macro expansions, expanded - argument tokens. */ - struct - { - union utoken first; - union utoken last; - } iso; - - /* For traditional macro expansion. */ - struct - { - const uchar *cur; - const uchar *rlimit; - } trad; - } u; - - /* If non-NULL, a buffer used for storage related to this context. - When the context is popped, the buffer is released. */ - _cpp_buff *buff; - - /* For a macro context, the macro node, otherwise NULL. */ - cpp_hashnode *macro; - - /* True if utoken element is token, else ptoken. */ - bool direct_p; -}; - -struct lexer_state -{ - /* Nonzero if first token on line is CPP_HASH. */ - unsigned char in_directive; - - /* Nonzero if in a directive that will handle padding tokens itself. - #include needs this to avoid problems with computed include and - spacing between tokens. */ - unsigned char directive_wants_padding; - - /* True if we are skipping a failed conditional group. */ - unsigned char skipping; - - /* Nonzero if in a directive that takes angle-bracketed headers. */ - unsigned char angled_headers; - - /* Nonzero if in a #if or #elif directive. */ - unsigned char in_expression; - - /* Nonzero to save comments. Turned off if discard_comments, and in - all directives apart from #define. */ - unsigned char save_comments; - - /* Nonzero if lexing __VA_ARGS__ is valid. */ - unsigned char va_args_ok; - - /* Nonzero if lexing poisoned identifiers is valid. */ - unsigned char poisoned_ok; - - /* Nonzero to prevent macro expansion. */ - unsigned char prevent_expansion; - - /* Nonzero when parsing arguments to a function-like macro. */ - unsigned char parsing_args; - - /* Nonzero to skip evaluating part of an expression. */ - unsigned int skip_eval; -}; - -/* Special nodes - identifiers with predefined significance. */ -struct spec_nodes -{ - cpp_hashnode *n_defined; /* defined operator */ - cpp_hashnode *n_true; /* C++ keyword true */ - cpp_hashnode *n_false; /* C++ keyword false */ - cpp_hashnode *n__VA_ARGS__; /* C99 vararg macros */ -}; - -typedef struct _cpp_line_note _cpp_line_note; -struct _cpp_line_note -{ - /* Location in the clean line the note refers to. */ - const uchar *pos; - - /* Type of note. The 9 'from' trigraph characters represent those - trigraphs, '\\' an escaped newline, ' ' an escaped newline with - intervening space, and anything else is invalid. */ - unsigned int type; -}; - -/* Represents the contents of a file cpplib has read in. */ -struct cpp_buffer -{ - const uchar *cur; /* Current location. */ - const uchar *line_base; /* Start of current physical line. */ - const uchar *next_line; /* Start of to-be-cleaned logical line. */ - - const uchar *buf; /* Entire character buffer. */ - const uchar *rlimit; /* Writable byte at end of file. */ - - _cpp_line_note *notes; /* Array of notes. */ - unsigned int cur_note; /* Next note to process. */ - unsigned int notes_used; /* Number of notes. */ - unsigned int notes_cap; /* Size of allocated array. */ - - struct cpp_buffer *prev; - - /* Pointer into the file table; non-NULL if this is a file buffer. - Used for include_next and to record control macros. */ - struct _cpp_file *file; - - /* Value of if_stack at start of this file. - Used to prohibit unmatched #endif (etc) in an include file. */ - struct if_stack *if_stack; - - /* True if we need to get the next clean line. */ - bool need_line; - - /* True if we have already warned about C++ comments in this file. - The warning happens only for C89 extended mode with -pedantic on, - or for -Wtraditional, and only once per file (otherwise it would - be far too noisy). */ - unsigned char warned_cplusplus_comments; - - /* True if we don't process trigraphs and escaped newlines. True - for preprocessed input, command line directives, and _Pragma - buffers. */ - unsigned char from_stage3; - - /* At EOF, a buffer is automatically popped. If RETURN_AT_EOF is - true, a CPP_EOF token is then returned. Otherwise, the next - token from the enclosing buffer is returned. */ - unsigned int return_at_eof : 1; - - /* The directory of the this buffer's file. Its NAME member is not - allocated, so we don't need to worry about freeing it. */ - struct cpp_dir dir; - - /* Used for buffer overlays by cpptrad.c. */ - const uchar *saved_cur, *saved_rlimit; -}; - -/* A cpp_reader encapsulates the "state" of a pre-processor run. - Applying cpp_get_token repeatedly yields a stream of pre-processor - tokens. Usually, there is only one cpp_reader object active. */ -struct cpp_reader -{ - /* Top of buffer stack. */ - cpp_buffer *buffer; - - /* Overlaid buffer (can be different after processing #include). */ - cpp_buffer *overlaid_buffer; - - /* Lexer state. */ - struct lexer_state state; - - /* Source line tracking. */ - struct line_maps line_maps; - const struct line_map *map; - fileline line; - - /* The line of the '#' of the current directive. */ - fileline directive_line; - - /* Memory buffers. */ - _cpp_buff *a_buff; /* Aligned permanent storage. */ - _cpp_buff *u_buff; /* Unaligned permanent storage. */ - _cpp_buff *free_buffs; /* Free buffer chain. */ - - /* Context stack. */ - struct cpp_context base_context; - struct cpp_context *context; - - /* If in_directive, the directive if known. */ - const struct directive *directive; - - /* Search paths for include files. */ - struct cpp_dir *quote_include; /* "" */ - struct cpp_dir *bracket_include; /* <> */ - struct cpp_dir no_search_path; /* No path. */ - - /* Chain of all hashed _cpp_file instances. */ - struct _cpp_file *all_files; - - struct _cpp_file *main_file; - - /* File and directory hash table. */ - struct htab *file_hash; - struct htab *dir_hash; - struct file_hash_entry *file_hash_entries; - unsigned int file_hash_entries_allocated, file_hash_entries_used; - - /* Nonzero means don't look for #include "foo" the source-file - directory. */ - bool quote_ignores_source_dir; - - /* Nonzero if any file has contained #pragma once or #import has - been used. */ - bool seen_once_only; - - /* Multiple include optimization. */ - const cpp_hashnode *mi_cmacro; - const cpp_hashnode *mi_ind_cmacro; - bool mi_valid; - - /* Lexing. */ - cpp_token *cur_token; - tokenrun base_run, *cur_run; - unsigned int lookaheads; - - /* Nonzero prevents the lexer from re-using the token runs. */ - unsigned int keep_tokens; - - /* Error counter for exit code. */ - unsigned int errors; - - /* Buffer to hold macro definition string. */ - unsigned char *macro_buffer; - unsigned int macro_buffer_len; - - /* Descriptor for converting from the source character set to the - execution character set. */ - struct cset_converter narrow_cset_desc; - - /* Descriptor for converting from the source character set to the - wide execution character set. */ - struct cset_converter wide_cset_desc; - - /* Date and time text. Calculated together if either is requested. */ - const uchar *date; - const uchar *time; - - /* EOF token, and a token forcing paste avoidance. */ - cpp_token avoid_paste; - cpp_token eof; - - /* Opaque handle to the dependencies of mkdeps.c. */ - struct deps *deps; - - /* Obstack holding all macro hash nodes. This never shrinks. - See cpphash.c */ - struct obstack hash_ob; - - /* Obstack holding buffer and conditional structures. This is a - real stack. See cpplib.c. */ - struct obstack buffer_ob; - - /* Pragma table - dynamic, because a library user can add to the - list of recognized pragmas. */ - struct pragma_entry *pragmas; - - /* Call backs to cpplib client. */ - struct cpp_callbacks cb; - - /* Identifier hash table. */ - struct ht *hash_table; - - /* Expression parser stack. */ - struct op *op_stack, *op_limit; - - /* User visible options. */ - struct cpp_options opts; - - /* Special nodes - identifiers with predefined significance to the - preprocessor. */ - struct spec_nodes spec_nodes; - - /* Whether cpplib owns the hashtable. */ - bool our_hashtable; - - /* Traditional preprocessing output buffer (a logical line). */ - struct - { - uchar *base; - uchar *limit; - uchar *cur; - fileline first_line; - } out; - - /* Used to save the original line number during traditional - preprocessing. */ - unsigned int saved_line; - - /* A saved list of the defined macros, for dependency checking - of precompiled headers. */ - struct cpp_savedstate *savedstate; -}; - -/* Character classes. Based on the more primitive macros in safe-ctype.h. - If the definition of `numchar' looks odd to you, please look up the - definition of a pp-number in the C standard [section 6.4.8 of C99]. - - In the unlikely event that characters other than \r and \n enter - the set is_vspace, the macro handle_newline() in cpplex.c must be - updated. */ -#define _dollar_ok(x) ((x) == '$' && CPP_OPTION (pfile, dollars_in_ident)) - -#define is_idchar(x) (ISIDNUM(x) || _dollar_ok(x)) -#define is_numchar(x) ISIDNUM(x) -#define is_idstart(x) (ISIDST(x) || _dollar_ok(x)) -#define is_numstart(x) ISDIGIT(x) -#define is_hspace(x) ISBLANK(x) -#define is_vspace(x) IS_VSPACE(x) -#define is_nvspace(x) IS_NVSPACE(x) -#define is_space(x) IS_SPACE_OR_NUL(x) - -/* This table is constant if it can be initialized at compile time, - which is the case if cpp was compiled with GCC >=2.7, or another - compiler that supports C99. */ -#if HAVE_DESIGNATED_INITIALIZERS -extern const unsigned char _cpp_trigraph_map[UCHAR_MAX + 1]; -#else -extern unsigned char _cpp_trigraph_map[UCHAR_MAX + 1]; -#endif - -/* Macros. */ - -#define CPP_IN_SYSTEM_HEADER(PFILE) ((PFILE)->map && (PFILE)->map->sysp) -#define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic) -#define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional) - -/* In cpperror.c */ -extern int _cpp_begin_message (cpp_reader *, int, fileline, unsigned int); - -/* In cppmacro.c */ -extern void _cpp_free_definition (cpp_hashnode *); -extern bool _cpp_create_definition (cpp_reader *, cpp_hashnode *); -extern void _cpp_pop_context (cpp_reader *); -extern void _cpp_push_text_context (cpp_reader *, cpp_hashnode *, - const uchar *, size_t); -extern bool _cpp_save_parameter (cpp_reader *, cpp_macro *, cpp_hashnode *); -extern bool _cpp_arguments_ok (cpp_reader *, cpp_macro *, const cpp_hashnode *, - unsigned int); -extern const uchar *_cpp_builtin_macro_text (cpp_reader *, cpp_hashnode *); -int _cpp_warn_if_unused_macro (cpp_reader *, cpp_hashnode *, void *); -/* In cpphash.c */ -extern void _cpp_init_hashtable (cpp_reader *, hash_table *); -extern void _cpp_destroy_hashtable (cpp_reader *); - -/* In cppfiles.c */ -typedef struct _cpp_file _cpp_file; -extern _cpp_file *_cpp_find_file (cpp_reader *, const char *fname, - cpp_dir *start_dir, bool fake, int); -extern bool _cpp_find_failed (_cpp_file *); -extern void _cpp_mark_file_once_only (cpp_reader *, struct _cpp_file *); -extern void _cpp_fake_include (cpp_reader *, const char *); -extern bool _cpp_stack_file (cpp_reader *, _cpp_file*, bool); -extern bool _cpp_stack_include (cpp_reader *, const char *, int, - enum include_type); -extern int _cpp_compare_file_date (cpp_reader *, const char *, int); -extern void _cpp_report_missing_guards (cpp_reader *); -extern void _cpp_init_files (cpp_reader *); -extern void _cpp_cleanup_files (cpp_reader *); -extern void _cpp_pop_file_buffer (cpp_reader *, struct _cpp_file *); - -/* In cppexp.c */ -extern bool _cpp_parse_expr (cpp_reader *); -extern struct op *_cpp_expand_op_stack (cpp_reader *); - -/* In cpplex.c */ -extern void _cpp_process_line_notes (cpp_reader *, int); -extern void _cpp_clean_line (cpp_reader *); -extern bool _cpp_get_fresh_line (cpp_reader *); -extern bool _cpp_skip_block_comment (cpp_reader *); -extern cpp_token *_cpp_temp_token (cpp_reader *); -extern const cpp_token *_cpp_lex_token (cpp_reader *); -extern cpp_token *_cpp_lex_direct (cpp_reader *); -extern int _cpp_equiv_tokens (const cpp_token *, const cpp_token *); -extern void _cpp_init_tokenrun (tokenrun *, unsigned int); - -/* In cppinit.c. */ -extern void _cpp_maybe_push_include_file (cpp_reader *); - -/* In cpplib.c */ -extern int _cpp_test_assertion (cpp_reader *, unsigned int *); -extern int _cpp_handle_directive (cpp_reader *, int); -extern void _cpp_define_builtin (cpp_reader *, const char *); -extern char ** _cpp_save_pragma_names (cpp_reader *); -extern void _cpp_restore_pragma_names (cpp_reader *, char **); -extern void _cpp_do__Pragma (cpp_reader *); -extern void _cpp_init_directives (cpp_reader *); -extern void _cpp_init_internal_pragmas (cpp_reader *); -extern void _cpp_do_file_change (cpp_reader *, enum lc_reason, const char *, - unsigned int, unsigned int); -extern void _cpp_pop_buffer (cpp_reader *); - -/* In cpptrad.c. */ -extern bool _cpp_scan_out_logical_line (cpp_reader *, cpp_macro *); -extern bool _cpp_read_logical_line_trad (cpp_reader *); -extern void _cpp_overlay_buffer (cpp_reader *pfile, const uchar *, size_t); -extern void _cpp_remove_overlay (cpp_reader *); -extern bool _cpp_create_trad_definition (cpp_reader *, cpp_macro *); -extern bool _cpp_expansions_different_trad (const cpp_macro *, - const cpp_macro *); -extern uchar *_cpp_copy_replacement_text (const cpp_macro *, uchar *); -extern size_t _cpp_replacement_text_len (const cpp_macro *); - -/* In cppcharset.c. */ -extern cppchar_t _cpp_valid_ucn (cpp_reader *, const uchar **, - const uchar *, int); -extern void _cpp_destroy_iconv (cpp_reader *); -extern bool _cpp_interpret_string_notranslate (cpp_reader *, - const cpp_string *, - cpp_string *); -extern uchar *_cpp_convert_input (cpp_reader *, const char *, uchar *, - size_t, size_t, off_t *); -extern const char *_cpp_default_encoding (void); - - -/* Utility routines and macros. */ -#define DSC(str) (const uchar *)str, sizeof str - 1 -#define xnew(T) (T *) xmalloc (sizeof(T)) -#define xcnew(T) (T *) xcalloc (1, sizeof(T)) -#define xnewvec(T, N) (T *) xmalloc (sizeof(T) * (N)) -#define xcnewvec(T, N) (T *) xcalloc (N, sizeof(T)) -#define xobnew(O, T) (T *) obstack_alloc (O, sizeof(T)) - -/* These are inline functions instead of macros so we can get type - checking. */ -static inline int ustrcmp (const uchar *, const uchar *); -static inline int ustrncmp (const uchar *, const uchar *, size_t); -static inline size_t ustrlen (const uchar *); -static inline uchar *uxstrdup (const uchar *); -static inline uchar *ustrchr (const uchar *, int); -static inline int ufputs (const uchar *, FILE *); - -static inline int -ustrcmp (const uchar *s1, const uchar *s2) -{ - return strcmp ((const char *)s1, (const char *)s2); -} - -static inline int -ustrncmp (const uchar *s1, const uchar *s2, size_t n) -{ - return strncmp ((const char *)s1, (const char *)s2, n); -} - -static inline size_t -ustrlen (const uchar *s1) -{ - return strlen ((const char *)s1); -} - -static inline uchar * -uxstrdup (const uchar *s1) -{ - return (uchar *) xstrdup ((const char *)s1); -} - -static inline uchar * -ustrchr (const uchar *s1, int c) -{ - return (uchar *) strchr ((const char *)s1, c); -} - -static inline int -ufputs (const uchar *s, FILE *f) -{ - return fputs ((const char *)s, f); -} - -#endif /* ! GCC_CPPHASH_H */ diff --git a/contrib/gcc/cppinit.c b/contrib/gcc/cppinit.c deleted file mode 100644 index 647fbbf..0000000 --- a/contrib/gcc/cppinit.c +++ /dev/null @@ -1,632 +0,0 @@ -/* CPP Library. - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - Contributed by Per Bothner, 1994-95. - Based on CCCP program by Paul Rubin, June 1986 - Adapted to ANSI C, Richard Stallman, Jan 1987 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" -#include "mkdeps.h" - -static void init_library (void); -static void mark_named_operators (cpp_reader *); -static void read_original_filename (cpp_reader *); -static void read_original_directory (cpp_reader *); -static void post_options (cpp_reader *); - -/* If we have designated initializers (GCC >2.7) these tables can be - initialized, constant data. Otherwise, they have to be filled in at - runtime. */ -#if HAVE_DESIGNATED_INITIALIZERS - -#define init_trigraph_map() /* Nothing. */ -#define TRIGRAPH_MAP \ -__extension__ const uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { - -#define END }; -#define s(p, v) [p] = v, - -#else - -#define TRIGRAPH_MAP uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { 0 }; \ - static void init_trigraph_map (void) { \ - unsigned char *x = _cpp_trigraph_map; - -#define END } -#define s(p, v) x[p] = v; - -#endif - -TRIGRAPH_MAP - s('=', '#') s(')', ']') s('!', '|') - s('(', '[') s('\'', '^') s('>', '}') - s('/', '\\') s('<', '{') s('-', '~') -END - -#undef s -#undef END -#undef TRIGRAPH_MAP - -/* A set of booleans indicating what CPP features each source language - requires. */ -struct lang_flags -{ - char c99; - char cplusplus; - char extended_numbers; - char std; - char cplusplus_comments; - char digraphs; -}; - -static const struct lang_flags lang_defaults[] = -{ /* c99 c++ xnum std // digr */ - /* GNUC89 */ { 0, 0, 1, 0, 1, 1 }, - /* GNUC99 */ { 1, 0, 1, 0, 1, 1 }, - /* STDC89 */ { 0, 0, 0, 1, 0, 0 }, - /* STDC94 */ { 0, 0, 0, 1, 0, 1 }, - /* STDC99 */ { 1, 0, 1, 1, 1, 1 }, - /* GNUCXX */ { 0, 1, 1, 0, 1, 1 }, - /* CXX98 */ { 0, 1, 1, 1, 1, 1 }, - /* ASM */ { 0, 0, 1, 0, 1, 0 } -}; - -/* Sets internal flags correctly for a given language. */ -void -cpp_set_lang (cpp_reader *pfile, enum c_lang lang) -{ - const struct lang_flags *l = &lang_defaults[(int) lang]; - - CPP_OPTION (pfile, lang) = lang; - - CPP_OPTION (pfile, c99) = l->c99; - CPP_OPTION (pfile, cplusplus) = l->cplusplus; - CPP_OPTION (pfile, extended_numbers) = l->extended_numbers; - CPP_OPTION (pfile, std) = l->std; - CPP_OPTION (pfile, trigraphs) = l->std; - CPP_OPTION (pfile, cplusplus_comments) = l->cplusplus_comments; - CPP_OPTION (pfile, digraphs) = l->digraphs; -} - -/* Initialize library global state. */ -static void -init_library (void) -{ - static int initialized = 0; - - if (! initialized) - { - initialized = 1; - - /* Set up the trigraph map. This doesn't need to do anything if - we were compiled with a compiler that supports C99 designated - initializers. */ - init_trigraph_map (); - } -} - -/* Initialize a cpp_reader structure. */ -cpp_reader * -cpp_create_reader (enum c_lang lang, hash_table *table) -{ - cpp_reader *pfile; - - /* Initialize this instance of the library if it hasn't been already. */ - init_library (); - - pfile = xcalloc (1, sizeof (cpp_reader)); - - cpp_set_lang (pfile, lang); - CPP_OPTION (pfile, warn_multichar) = 1; - CPP_OPTION (pfile, discard_comments) = 1; - CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; - CPP_OPTION (pfile, show_column) = 1; - CPP_OPTION (pfile, tabstop) = 8; - CPP_OPTION (pfile, operator_names) = 1; - CPP_OPTION (pfile, warn_trigraphs) = 2; - CPP_OPTION (pfile, warn_endif_labels) = 1; - CPP_OPTION (pfile, warn_deprecated) = 1; - CPP_OPTION (pfile, warn_long_long) = !CPP_OPTION (pfile, c99); - CPP_OPTION (pfile, dollars_in_ident) = 1; - CPP_OPTION (pfile, warn_dollars) = 1; - - /* Default CPP arithmetic to something sensible for the host for the - benefit of dumb users like fix-header. */ - CPP_OPTION (pfile, precision) = CHAR_BIT * sizeof (long); - CPP_OPTION (pfile, char_precision) = CHAR_BIT; - CPP_OPTION (pfile, wchar_precision) = CHAR_BIT * sizeof (int); - CPP_OPTION (pfile, int_precision) = CHAR_BIT * sizeof (int); - CPP_OPTION (pfile, unsigned_char) = 0; - CPP_OPTION (pfile, unsigned_wchar) = 1; - CPP_OPTION (pfile, bytes_big_endian) = 1; /* does not matter */ - - /* Default to locale/UTF-8. */ - CPP_OPTION (pfile, narrow_charset) = _cpp_default_encoding (); - CPP_OPTION (pfile, wide_charset) = 0; - CPP_OPTION (pfile, input_charset) = _cpp_default_encoding (); - - /* A fake empty "directory" used as the starting point for files - looked up without a search path. Name cannot be '/' because we - don't want to prepend anything at all to filenames using it. All - other entries are correct zero-initialized. */ - pfile->no_search_path.name = (char *) ""; - - /* Initialize the line map. Start at logical line 1, so we can use - a line number of zero for special states. */ - linemap_init (&pfile->line_maps); - pfile->line = 1; - - /* Initialize lexer state. */ - pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); - - /* Set up static tokens. */ - pfile->avoid_paste.type = CPP_PADDING; - pfile->avoid_paste.val.source = NULL; - pfile->eof.type = CPP_EOF; - pfile->eof.flags = 0; - - /* Create a token buffer for the lexer. */ - _cpp_init_tokenrun (&pfile->base_run, 250); - pfile->cur_run = &pfile->base_run; - pfile->cur_token = pfile->base_run.base; - - /* Initialize the base context. */ - pfile->context = &pfile->base_context; - pfile->base_context.macro = 0; - pfile->base_context.prev = pfile->base_context.next = 0; - - /* Aligned and unaligned storage. */ - pfile->a_buff = _cpp_get_buff (pfile, 0); - pfile->u_buff = _cpp_get_buff (pfile, 0); - - /* The expression parser stack. */ - _cpp_expand_op_stack (pfile); - - /* Initialize the buffer obstack. */ - _obstack_begin (&pfile->buffer_ob, 0, 0, - (void *(*) (long)) xmalloc, - (void (*) (void *)) free); - - _cpp_init_files (pfile); - - _cpp_init_hashtable (pfile, table); - - return pfile; -} - -/* Free resources used by PFILE. Accessing PFILE after this function - returns leads to undefined behavior. Returns the error count. */ -void -cpp_destroy (cpp_reader *pfile) -{ - cpp_context *context, *contextn; - tokenrun *run, *runn; - - free (pfile->op_stack); - - while (CPP_BUFFER (pfile) != NULL) - _cpp_pop_buffer (pfile); - - if (pfile->out.base) - free (pfile->out.base); - - if (pfile->macro_buffer) - { - free (pfile->macro_buffer); - pfile->macro_buffer = NULL; - pfile->macro_buffer_len = 0; - } - - if (pfile->deps) - deps_free (pfile->deps); - obstack_free (&pfile->buffer_ob, 0); - - _cpp_destroy_hashtable (pfile); - _cpp_cleanup_files (pfile); - _cpp_destroy_iconv (pfile); - - _cpp_free_buff (pfile->a_buff); - _cpp_free_buff (pfile->u_buff); - _cpp_free_buff (pfile->free_buffs); - - for (run = &pfile->base_run; run; run = runn) - { - runn = run->next; - free (run->base); - if (run != &pfile->base_run) - free (run); - } - - for (context = pfile->base_context.next; context; context = contextn) - { - contextn = context->next; - free (context); - } - - linemap_free (&pfile->line_maps); - free (pfile); -} - -/* This structure defines one built-in identifier. A node will be - entered in the hash table under the name NAME, with value VALUE. - - There are two tables of these. builtin_array holds all the - "builtin" macros: these are handled by builtin_macro() in - cppmacro.c. Builtin is somewhat of a misnomer -- the property of - interest is that these macros require special code to compute their - expansions. The value is a "builtin_type" enumerator. - - operator_array holds the C++ named operators. These are keywords - which act as aliases for punctuators. In C++, they cannot be - altered through #define, and #if recognizes them as operators. In - C, these are not entered into the hash table at all (but see - ). The value is a token-type enumerator. */ -struct builtin -{ - const uchar *name; - unsigned short len; - unsigned short value; -}; - -#define B(n, t) { DSC(n), t } -static const struct builtin builtin_array[] = -{ - B("__TIME__", BT_TIME), - B("__DATE__", BT_DATE), - B("__FILE__", BT_FILE), - B("__BASE_FILE__", BT_BASE_FILE), - B("__LINE__", BT_SPECLINE), - B("__INCLUDE_LEVEL__", BT_INCLUDE_LEVEL), - /* Keep builtins not used for -traditional-cpp at the end, and - update init_builtins() if any more are added. */ - B("_Pragma", BT_PRAGMA), - B("__STDC__", BT_STDC), -}; - -static const struct builtin operator_array[] = -{ - B("and", CPP_AND_AND), - B("and_eq", CPP_AND_EQ), - B("bitand", CPP_AND), - B("bitor", CPP_OR), - B("compl", CPP_COMPL), - B("not", CPP_NOT), - B("not_eq", CPP_NOT_EQ), - B("or", CPP_OR_OR), - B("or_eq", CPP_OR_EQ), - B("xor", CPP_XOR), - B("xor_eq", CPP_XOR_EQ) -}; -#undef B - -/* Mark the C++ named operators in the hash table. */ -static void -mark_named_operators (cpp_reader *pfile) -{ - const struct builtin *b; - - for (b = operator_array; - b < (operator_array + ARRAY_SIZE (operator_array)); - b++) - { - cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); - hp->flags |= NODE_OPERATOR; - hp->is_directive = 0; - hp->directive_index = b->value; - } -} - -/* Read the builtins table above and enter them, and language-specific - macros, into the hash table. HOSTED is true if this is a hosted - environment. */ -void -cpp_init_builtins (cpp_reader *pfile, int hosted) -{ - const struct builtin *b; - size_t n = ARRAY_SIZE (builtin_array); - - if (CPP_OPTION (pfile, traditional)) - n -= 2; - - for(b = builtin_array; b < builtin_array + n; b++) - { - cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); - hp->type = NT_MACRO; - hp->flags |= NODE_BUILTIN | NODE_WARN; - hp->value.builtin = b->value; - } - - if (CPP_OPTION (pfile, cplusplus)) - _cpp_define_builtin (pfile, "__cplusplus 1"); - else if (CPP_OPTION (pfile, lang) == CLK_ASM) - _cpp_define_builtin (pfile, "__ASSEMBLER__ 1"); - else if (CPP_OPTION (pfile, lang) == CLK_STDC94) - _cpp_define_builtin (pfile, "__STDC_VERSION__ 199409L"); - else if (CPP_OPTION (pfile, c99)) - _cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L"); - - if (hosted) - _cpp_define_builtin (pfile, "__STDC_HOSTED__ 1"); - else - _cpp_define_builtin (pfile, "__STDC_HOSTED__ 0"); - - if (CPP_OPTION (pfile, objc)) - _cpp_define_builtin (pfile, "__OBJC__ 1"); -} - -/* Sanity-checks are dependent on command-line options, so it is - called as a subroutine of cpp_read_main_file (). */ -#if ENABLE_CHECKING -static void sanity_checks (cpp_reader *); -static void sanity_checks (cpp_reader *pfile) -{ - cppchar_t test = 0; - size_t max_precision = 2 * CHAR_BIT * sizeof (cpp_num_part); - - /* Sanity checks for assumptions about CPP arithmetic and target - type precisions made by cpplib. */ - test--; - if (test < 1) - cpp_error (pfile, CPP_DL_ICE, "cppchar_t must be an unsigned type"); - - if (CPP_OPTION (pfile, precision) > max_precision) - cpp_error (pfile, CPP_DL_ICE, - "preprocessor arithmetic has maximum precision of %lu bits;" - " target requires %lu bits", - (unsigned long) max_precision, - (unsigned long) CPP_OPTION (pfile, precision)); - - if (CPP_OPTION (pfile, precision) < CPP_OPTION (pfile, int_precision)) - cpp_error (pfile, CPP_DL_ICE, - "CPP arithmetic must be at least as precise as a target int"); - - if (CPP_OPTION (pfile, char_precision) < 8) - cpp_error (pfile, CPP_DL_ICE, "target char is less than 8 bits wide"); - - if (CPP_OPTION (pfile, wchar_precision) < CPP_OPTION (pfile, char_precision)) - cpp_error (pfile, CPP_DL_ICE, - "target wchar_t is narrower than target char"); - - if (CPP_OPTION (pfile, int_precision) < CPP_OPTION (pfile, char_precision)) - cpp_error (pfile, CPP_DL_ICE, - "target int is narrower than target char"); - - /* This is assumed in eval_token() and could be fixed if necessary. */ - if (sizeof (cppchar_t) > sizeof (cpp_num_part)) - cpp_error (pfile, CPP_DL_ICE, - "CPP half-integer narrower than CPP character"); - - if (CPP_OPTION (pfile, wchar_precision) > BITS_PER_CPPCHAR_T) - cpp_error (pfile, CPP_DL_ICE, - "CPP on this host cannot handle wide character constants over" - " %lu bits, but the target requires %lu bits", - (unsigned long) BITS_PER_CPPCHAR_T, - (unsigned long) CPP_OPTION (pfile, wchar_precision)); -} -#else -# define sanity_checks(PFILE) -#endif - -/* Add a dependency target. Can be called any number of times before - cpp_read_main_file(). If no targets have been added before - cpp_read_main_file(), then the default target is used. */ -void -cpp_add_dependency_target (cpp_reader *pfile, const char *target, int quote) -{ - if (!pfile->deps) - pfile->deps = deps_init (); - - deps_add_target (pfile->deps, target, quote); -} - -/* This is called after options have been parsed, and partially - processed. */ -void -cpp_post_options (cpp_reader *pfile) -{ - sanity_checks (pfile); - - post_options (pfile); - - /* Mark named operators before handling command line macros. */ - if (CPP_OPTION (pfile, cplusplus) && CPP_OPTION (pfile, operator_names)) - mark_named_operators (pfile); -} - -/* Setup for processing input from the file named FNAME, or stdin if - it is the empty string. Return the original filename - on success (e.g. foo.i->foo.c), or NULL on failure. */ -const char * -cpp_read_main_file (cpp_reader *pfile, const char *fname) -{ - if (CPP_OPTION (pfile, deps.style) != DEPS_NONE) - { - if (!pfile->deps) - pfile->deps = deps_init (); - - /* Set the default target (if there is none already). */ - deps_add_default_target (pfile->deps, fname); - } - - pfile->main_file - = _cpp_find_file (pfile, fname, &pfile->no_search_path, false, 0); - if (_cpp_find_failed (pfile->main_file)) - return NULL; - - _cpp_stack_file (pfile, pfile->main_file, false); - - /* For foo.i, read the original filename foo.c now, for the benefit - of the front ends. */ - if (CPP_OPTION (pfile, preprocessed)) - { - read_original_filename (pfile); - if (!pfile->map) - return NULL; - fname = pfile->map->to_file; - } - return fname; -} - -/* For preprocessed files, if the first tokens are of the form # NUM. - handle the directive so we know the original file name. This will - generate file_change callbacks, which the front ends must handle - appropriately given their state of initialization. */ -static void -read_original_filename (cpp_reader *pfile) -{ - const cpp_token *token, *token1; - - /* Lex ahead; if the first tokens are of the form # NUM, then - process the directive, otherwise back up. */ - token = _cpp_lex_direct (pfile); - if (token->type == CPP_HASH) - { - pfile->state.in_directive = 1; - token1 = _cpp_lex_direct (pfile); - _cpp_backup_tokens (pfile, 1); - pfile->state.in_directive = 0; - - /* If it's a #line directive, handle it. */ - if (token1->type == CPP_NUMBER) - { - _cpp_handle_directive (pfile, token->flags & PREV_WHITE); - read_original_directory (pfile); - return; - } - } - - /* Backup as if nothing happened. */ - _cpp_backup_tokens (pfile, 1); -} - -/* For preprocessed files, if the tokens following the first filename - line is of the form # "/path/name//", handle the - directive so we know the original current directory. */ -static void -read_original_directory (cpp_reader *pfile) -{ - const cpp_token *hash, *token; - - /* Lex ahead; if the first tokens are of the form # NUM, then - process the directive, otherwise back up. */ - hash = _cpp_lex_direct (pfile); - if (hash->type != CPP_HASH) - { - _cpp_backup_tokens (pfile, 1); - return; - } - - token = _cpp_lex_direct (pfile); - - if (token->type != CPP_NUMBER) - { - _cpp_backup_tokens (pfile, 2); - return; - } - - token = _cpp_lex_direct (pfile); - - if (token->type != CPP_STRING - || ! (token->val.str.len >= 5 - && token->val.str.text[token->val.str.len-2] == '/' - && token->val.str.text[token->val.str.len-3] == '/')) - { - _cpp_backup_tokens (pfile, 3); - return; - } - - if (pfile->cb.dir_change) - { - char *debugdir = alloca (token->val.str.len - 3); - - memcpy (debugdir, (const char *) token->val.str.text + 1, - token->val.str.len - 4); - debugdir[token->val.str.len - 4] = '\0'; - - pfile->cb.dir_change (pfile, debugdir); - } -} - -/* This is called at the end of preprocessing. It pops the last - buffer and writes dependency output, and returns the number of - errors. - - Maybe it should also reset state, such that you could call - cpp_start_read with a new filename to restart processing. */ -int -cpp_finish (cpp_reader *pfile, FILE *deps_stream) -{ - /* Warn about unused macros before popping the final buffer. */ - if (CPP_OPTION (pfile, warn_unused_macros)) - cpp_forall_identifiers (pfile, _cpp_warn_if_unused_macro, NULL); - - /* cpplex.c leaves the final buffer on the stack. This it so that - it returns an unending stream of CPP_EOFs to the client. If we - popped the buffer, we'd dereference a NULL buffer pointer and - segfault. It's nice to allow the client to do worry-free excess - cpp_get_token calls. */ - while (pfile->buffer) - _cpp_pop_buffer (pfile); - - /* Don't write the deps file if there are errors. */ - if (CPP_OPTION (pfile, deps.style) != DEPS_NONE - && deps_stream && pfile->errors == 0) - { - deps_write (pfile->deps, deps_stream, 72); - - if (CPP_OPTION (pfile, deps.phony_targets)) - deps_phony_targets (pfile->deps, deps_stream); - } - - /* Report on headers that could use multiple include guards. */ - if (CPP_OPTION (pfile, print_include_names)) - _cpp_report_missing_guards (pfile); - - return pfile->errors; -} - -static void -post_options (cpp_reader *pfile) -{ - /* -Wtraditional is not useful in C++ mode. */ - if (CPP_OPTION (pfile, cplusplus)) - CPP_OPTION (pfile, warn_traditional) = 0; - - /* Permanently disable macro expansion if we are rescanning - preprocessed text. Read preprocesed source in ISO mode. */ - if (CPP_OPTION (pfile, preprocessed)) - { - pfile->state.prevent_expansion = 1; - CPP_OPTION (pfile, traditional) = 0; - } - - if (CPP_OPTION (pfile, warn_trigraphs) == 2) - CPP_OPTION (pfile, warn_trigraphs) = !CPP_OPTION (pfile, trigraphs); - - if (CPP_OPTION (pfile, traditional)) - { - CPP_OPTION (pfile, cplusplus_comments) = 0; - - /* Traditional CPP does not accurately track column information. */ - CPP_OPTION (pfile, show_column) = 0; - CPP_OPTION (pfile, trigraphs) = 0; - CPP_OPTION (pfile, warn_trigraphs) = 0; - } -} diff --git a/contrib/gcc/cpplex.c b/contrib/gcc/cpplex.c deleted file mode 100644 index 5e92a21..0000000 --- a/contrib/gcc/cpplex.c +++ /dev/null @@ -1,1538 +0,0 @@ -/* CPP Library - lexical analysis. - Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - Contributed by Per Bothner, 1994-95. - Based on CCCP program by Paul Rubin, June 1986 - Adapted to ANSI C, Richard Stallman, Jan 1987 - Broken out to separate file, Zack Weinberg, Mar 2000 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" - -enum spell_type -{ - SPELL_OPERATOR = 0, - SPELL_IDENT, - SPELL_LITERAL, - SPELL_NONE -}; - -struct token_spelling -{ - enum spell_type category; - const unsigned char *name; -}; - -static const unsigned char *const digraph_spellings[] = -{ U"%:", U"%:%:", U"<:", U":>", U"<%", U"%>" }; - -#define OP(e, s) { SPELL_OPERATOR, U s }, -#define TK(e, s) { s, U #e }, -static const struct token_spelling token_spellings[N_TTYPES] = { TTYPE_TABLE }; -#undef OP -#undef TK - -#define TOKEN_SPELL(token) (token_spellings[(token)->type].category) -#define TOKEN_NAME(token) (token_spellings[(token)->type].name) - -static void add_line_note (cpp_buffer *, const uchar *, unsigned int); -static int skip_line_comment (cpp_reader *); -static void skip_whitespace (cpp_reader *, cppchar_t); -static cpp_hashnode *lex_identifier (cpp_reader *, const uchar *); -static void lex_number (cpp_reader *, cpp_string *); -static bool forms_identifier_p (cpp_reader *, int); -static void lex_string (cpp_reader *, cpp_token *, const uchar *); -static void save_comment (cpp_reader *, cpp_token *, const uchar *, cppchar_t); -static void create_literal (cpp_reader *, cpp_token *, const uchar *, - unsigned int, enum cpp_ttype); -static bool warn_in_comment (cpp_reader *, _cpp_line_note *); -static int name_p (cpp_reader *, const cpp_string *); -static tokenrun *next_tokenrun (tokenrun *); - -static _cpp_buff *new_buff (size_t); - - -/* Utility routine: - - Compares, the token TOKEN to the NUL-terminated string STRING. - TOKEN must be a CPP_NAME. Returns 1 for equal, 0 for unequal. */ -int -cpp_ideq (const cpp_token *token, const char *string) -{ - if (token->type != CPP_NAME) - return 0; - - return !ustrcmp (NODE_NAME (token->val.node), (const uchar *) string); -} - -/* Record a note TYPE at byte POS into the current cleaned logical - line. */ -static void -add_line_note (cpp_buffer *buffer, const uchar *pos, unsigned int type) -{ - if (buffer->notes_used == buffer->notes_cap) - { - buffer->notes_cap = buffer->notes_cap * 2 + 200; - buffer->notes = xrealloc (buffer->notes, - buffer->notes_cap * sizeof (_cpp_line_note)); - } - - buffer->notes[buffer->notes_used].pos = pos; - buffer->notes[buffer->notes_used].type = type; - buffer->notes_used++; -} - -/* Returns with a logical line that contains no escaped newlines or - trigraphs. This is a time-critical inner loop. */ -void -_cpp_clean_line (cpp_reader *pfile) -{ - cpp_buffer *buffer; - const uchar *s; - uchar c, *d, *p; - - buffer = pfile->buffer; - buffer->cur_note = buffer->notes_used = 0; - buffer->cur = buffer->line_base = buffer->next_line; - buffer->need_line = false; - s = buffer->next_line - 1; - - if (!buffer->from_stage3) - { - /* Short circuit for the common case of an un-escaped line with - no trigraphs. The primary win here is by not writing any - data back to memory until we have to. */ - for (;;) - { - c = *++s; - if (c == '\n' || c == '\r') - { - d = (uchar *) s; - - if (s == buffer->rlimit) - goto done; - - /* DOS line ending? */ - if (c == '\r' && s[1] == '\n') - s++; - - if (s == buffer->rlimit) - goto done; - - /* check for escaped newline */ - p = d; - while (p != buffer->next_line && is_nvspace (p[-1])) - p--; - if (p == buffer->next_line || p[-1] != '\\') - goto done; - - /* Have an escaped newline; process it and proceed to - the slow path. */ - add_line_note (buffer, p - 1, p != d ? ' ' : '\\'); - d = p - 2; - buffer->next_line = p - 1; - break; - } - if (c == '?' && s[1] == '?' && _cpp_trigraph_map[s[2]]) - { - /* Have a trigraph. We may or may not have to convert - it. Add a line note regardless, for -Wtrigraphs. */ - add_line_note (buffer, s, s[2]); - if (CPP_OPTION (pfile, trigraphs)) - { - /* We do, and that means we have to switch to the - slow path. */ - d = (uchar *) s; - *d = _cpp_trigraph_map[s[2]]; - s += 2; - break; - } - } - } - - - for (;;) - { - c = *++s; - *++d = c; - - if (c == '\n' || c == '\r') - { - /* Handle DOS line endings. */ - if (c == '\r' && s != buffer->rlimit && s[1] == '\n') - s++; - if (s == buffer->rlimit) - break; - - /* Escaped? */ - p = d; - while (p != buffer->next_line && is_nvspace (p[-1])) - p--; - if (p == buffer->next_line || p[-1] != '\\') - break; - - add_line_note (buffer, p - 1, p != d ? ' ': '\\'); - d = p - 2; - buffer->next_line = p - 1; - } - else if (c == '?' && s[1] == '?' && _cpp_trigraph_map[s[2]]) - { - /* Add a note regardless, for the benefit of -Wtrigraphs. */ - add_line_note (buffer, d, s[2]); - if (CPP_OPTION (pfile, trigraphs)) - { - *d = _cpp_trigraph_map[s[2]]; - s += 2; - } - } - } - } - else - { - do - s++; - while (*s != '\n' && *s != '\r'); - d = (uchar *) s; - - /* Handle DOS line endings. */ - if (*s == '\r' && s != buffer->rlimit && s[1] == '\n') - s++; - } - - done: - *d = '\n'; - /* A sentinel note that should never be processed. */ - add_line_note (buffer, d + 1, '\n'); - buffer->next_line = s + 1; -} - -/* Return true if the trigraph indicated by NOTE should be warned - about in a comment. */ -static bool -warn_in_comment (cpp_reader *pfile, _cpp_line_note *note) -{ - const uchar *p; - - /* Within comments we don't warn about trigraphs, unless the - trigraph forms an escaped newline, as that may change - behavior. */ - if (note->type != '/') - return false; - - /* If -trigraphs, then this was an escaped newline iff the next note - is coincident. */ - if (CPP_OPTION (pfile, trigraphs)) - return note[1].pos == note->pos; - - /* Otherwise, see if this forms an escaped newline. */ - p = note->pos + 3; - while (is_nvspace (*p)) - p++; - - /* There might have been escaped newlines between the trigraph and the - newline we found. Hence the position test. */ - return (*p == '\n' && p < note[1].pos); -} - -/* Process the notes created by add_line_note as far as the current - location. */ -void -_cpp_process_line_notes (cpp_reader *pfile, int in_comment) -{ - cpp_buffer *buffer = pfile->buffer; - - for (;;) - { - _cpp_line_note *note = &buffer->notes[buffer->cur_note]; - unsigned int col; - - if (note->pos > buffer->cur) - break; - - buffer->cur_note++; - col = CPP_BUF_COLUMN (buffer, note->pos + 1); - - if (note->type == '\\' || note->type == ' ') - { - if (note->type == ' ' && !in_comment) - cpp_error_with_line (pfile, CPP_DL_WARNING, pfile->line, col, - "backslash and newline separated by space"); - - if (buffer->next_line > buffer->rlimit) - { - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line, col, - "backslash-newline at end of file"); - /* Prevent "no newline at end of file" warning. */ - buffer->next_line = buffer->rlimit; - } - - buffer->line_base = note->pos; - pfile->line++; - } - else if (_cpp_trigraph_map[note->type]) - { - if (CPP_OPTION (pfile, warn_trigraphs) - && (!in_comment || warn_in_comment (pfile, note))) - { - if (CPP_OPTION (pfile, trigraphs)) - cpp_error_with_line (pfile, CPP_DL_WARNING, pfile->line, col, - "trigraph ??%c converted to %c", - note->type, - (int) _cpp_trigraph_map[note->type]); - else - { - cpp_error_with_line - (pfile, CPP_DL_WARNING, pfile->line, col, - "trigraph ??%c ignored, use -trigraphs to enable", - note->type); - } - } - } - else - abort (); - } -} - -/* Skip a C-style block comment. We find the end of the comment by - seeing if an asterisk is before every '/' we encounter. Returns - nonzero if comment terminated by EOF, zero otherwise. - - Buffer->cur points to the initial asterisk of the comment. */ -bool -_cpp_skip_block_comment (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->buffer; - const uchar *cur = buffer->cur; - uchar c; - - cur++; - if (*cur == '/') - cur++; - - for (;;) - { - /* People like decorating comments with '*', so check for '/' - instead for efficiency. */ - c = *cur++; - - if (c == '/') - { - if (cur[-2] == '*') - break; - - /* Warn about potential nested comments, but not if the '/' - comes immediately before the true comment delimiter. - Don't bother to get it right across escaped newlines. */ - if (CPP_OPTION (pfile, warn_comments) - && cur[0] == '*' && cur[1] != '/') - { - buffer->cur = cur; - cpp_error_with_line (pfile, CPP_DL_WARNING, - pfile->line, CPP_BUF_COL (buffer), - "\"/*\" within comment"); - } - } - else if (c == '\n') - { - buffer->cur = cur - 1; - _cpp_process_line_notes (pfile, true); - if (buffer->next_line >= buffer->rlimit) - return true; - _cpp_clean_line (pfile); - pfile->line++; - cur = buffer->cur; - } - } - - buffer->cur = cur; - _cpp_process_line_notes (pfile, true); - return false; -} - -/* Skip a C++ line comment, leaving buffer->cur pointing to the - terminating newline. Handles escaped newlines. Returns nonzero - if a multiline comment. */ -static int -skip_line_comment (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->buffer; - unsigned int orig_line = pfile->line; - - while (*buffer->cur != '\n') - buffer->cur++; - - _cpp_process_line_notes (pfile, true); - return orig_line != pfile->line; -} - -/* Skips whitespace, saving the next non-whitespace character. */ -static void -skip_whitespace (cpp_reader *pfile, cppchar_t c) -{ - cpp_buffer *buffer = pfile->buffer; - bool saw_NUL = false; - - do - { - /* Horizontal space always OK. */ - if (c == ' ' || c == '\t') - ; - /* Just \f \v or \0 left. */ - else if (c == '\0') - saw_NUL = true; - else if (pfile->state.in_directive && CPP_PEDANTIC (pfile)) - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line, - CPP_BUF_COL (buffer), - "%s in preprocessing directive", - c == '\f' ? "form feed" : "vertical tab"); - - c = *buffer->cur++; - } - /* We only want non-vertical space, i.e. ' ' \t \f \v \0. */ - while (is_nvspace (c)); - - if (saw_NUL) - cpp_error (pfile, CPP_DL_WARNING, "null character(s) ignored"); - - buffer->cur--; -} - -/* See if the characters of a number token are valid in a name (no - '.', '+' or '-'). */ -static int -name_p (cpp_reader *pfile, const cpp_string *string) -{ - unsigned int i; - - for (i = 0; i < string->len; i++) - if (!is_idchar (string->text[i])) - return 0; - - return 1; -} - -/* Returns TRUE if the sequence starting at buffer->cur is invalid in - an identifier. FIRST is TRUE if this starts an identifier. */ -static bool -forms_identifier_p (cpp_reader *pfile, int first) -{ - cpp_buffer *buffer = pfile->buffer; - - if (*buffer->cur == '$') - { - if (!CPP_OPTION (pfile, dollars_in_ident)) - return false; - - buffer->cur++; - if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping) - { - CPP_OPTION (pfile, warn_dollars) = 0; - cpp_error (pfile, CPP_DL_PEDWARN, "'$' in identifier or number"); - } - - return true; - } - - /* Is this a syntactically valid UCN? */ - if (0 && *buffer->cur == '\\' - && (buffer->cur[1] == 'u' || buffer->cur[1] == 'U')) - { - buffer->cur += 2; - if (_cpp_valid_ucn (pfile, &buffer->cur, buffer->rlimit, 1 + !first)) - return true; - buffer->cur -= 2; - } - - return false; -} - -/* Lex an identifier starting at BUFFER->CUR - 1. */ -static cpp_hashnode * -lex_identifier (cpp_reader *pfile, const uchar *base) -{ - cpp_hashnode *result; - const uchar *cur; - - do - { - cur = pfile->buffer->cur; - - /* N.B. ISIDNUM does not include $. */ - while (ISIDNUM (*cur)) - cur++; - - pfile->buffer->cur = cur; - } - while (forms_identifier_p (pfile, false)); - - result = (cpp_hashnode *) - ht_lookup (pfile->hash_table, base, cur - base, HT_ALLOC); - - /* Rarely, identifiers require diagnostics when lexed. */ - if (__builtin_expect ((result->flags & NODE_DIAGNOSTIC) - && !pfile->state.skipping, 0)) - { - /* It is allowed to poison the same identifier twice. */ - if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok) - cpp_error (pfile, CPP_DL_ERROR, "attempt to use poisoned \"%s\"", - NODE_NAME (result)); - - /* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the - replacement list of a variadic macro. */ - if (result == pfile->spec_nodes.n__VA_ARGS__ - && !pfile->state.va_args_ok) - cpp_error (pfile, CPP_DL_PEDWARN, - "__VA_ARGS__ can only appear in the expansion" - " of a C99 variadic macro"); - } - - return result; -} - -/* Lex a number to NUMBER starting at BUFFER->CUR - 1. */ -static void -lex_number (cpp_reader *pfile, cpp_string *number) -{ - const uchar *cur; - const uchar *base; - uchar *dest; - - base = pfile->buffer->cur - 1; - do - { - cur = pfile->buffer->cur; - - /* N.B. ISIDNUM does not include $. */ - while (ISIDNUM (*cur) || *cur == '.' || VALID_SIGN (*cur, cur[-1])) - cur++; - - pfile->buffer->cur = cur; - } - while (forms_identifier_p (pfile, false)); - - number->len = cur - base; - dest = _cpp_unaligned_alloc (pfile, number->len + 1); - memcpy (dest, base, number->len); - dest[number->len] = '\0'; - number->text = dest; -} - -/* Create a token of type TYPE with a literal spelling. */ -static void -create_literal (cpp_reader *pfile, cpp_token *token, const uchar *base, - unsigned int len, enum cpp_ttype type) -{ - uchar *dest = _cpp_unaligned_alloc (pfile, len + 1); - - memcpy (dest, base, len); - dest[len] = '\0'; - token->type = type; - token->val.str.len = len; - token->val.str.text = dest; -} - -/* Lexes a string, character constant, or angle-bracketed header file - name. The stored string contains the spelling, including opening - quote and leading any leading 'L'. It returns the type of the - literal, or CPP_OTHER if it was not properly terminated. - - The spelling is NUL-terminated, but it is not guaranteed that this - is the first NUL since embedded NULs are preserved. */ -static void -lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base) -{ - bool saw_NUL = false; - const uchar *cur; - cppchar_t terminator; - enum cpp_ttype type; - - cur = base; - terminator = *cur++; - if (terminator == 'L') - terminator = *cur++; - if (terminator == '\"') - type = *base == 'L' ? CPP_WSTRING: CPP_STRING; - else if (terminator == '\'') - type = *base == 'L' ? CPP_WCHAR: CPP_CHAR; - else - terminator = '>', type = CPP_HEADER_NAME; - - for (;;) - { - cppchar_t c = *cur++; - - /* In #include-style directives, terminators are not escapable. */ - if (c == '\\' && !pfile->state.angled_headers && *cur != '\n') - cur++; - else if (c == terminator) - break; - else if (c == '\n') - { - cur--; - type = CPP_OTHER; - break; - } - else if (c == '\0') - saw_NUL = true; - } - - if (saw_NUL && !pfile->state.skipping) - cpp_error (pfile, CPP_DL_WARNING, - "null character(s) preserved in literal"); - - pfile->buffer->cur = cur; - create_literal (pfile, token, base, cur - base, type); -} - -/* The stored comment includes the comment start and any terminator. */ -static void -save_comment (cpp_reader *pfile, cpp_token *token, const unsigned char *from, - cppchar_t type) -{ - unsigned char *buffer; - unsigned int len, clen; - - len = pfile->buffer->cur - from + 1; /* + 1 for the initial '/'. */ - - /* C++ comments probably (not definitely) have moved past a new - line, which we don't want to save in the comment. */ - if (is_vspace (pfile->buffer->cur[-1])) - len--; - - /* If we are currently in a directive, then we need to store all - C++ comments as C comments internally, and so we need to - allocate a little extra space in that case. - - Note that the only time we encounter a directive here is - when we are saving comments in a "#define". */ - clen = (pfile->state.in_directive && type == '/') ? len + 2 : len; - - buffer = _cpp_unaligned_alloc (pfile, clen); - - token->type = CPP_COMMENT; - token->val.str.len = clen; - token->val.str.text = buffer; - - buffer[0] = '/'; - memcpy (buffer + 1, from, len - 1); - - /* Finish conversion to a C comment, if necessary. */ - if (pfile->state.in_directive && type == '/') - { - buffer[1] = '*'; - buffer[clen - 2] = '*'; - buffer[clen - 1] = '/'; - } -} - -/* Allocate COUNT tokens for RUN. */ -void -_cpp_init_tokenrun (tokenrun *run, unsigned int count) -{ - run->base = xnewvec (cpp_token, count); - run->limit = run->base + count; - run->next = NULL; -} - -/* Returns the next tokenrun, or creates one if there is none. */ -static tokenrun * -next_tokenrun (tokenrun *run) -{ - if (run->next == NULL) - { - run->next = xnew (tokenrun); - run->next->prev = run; - _cpp_init_tokenrun (run->next, 250); - } - - return run->next; -} - -/* Allocate a single token that is invalidated at the same time as the - rest of the tokens on the line. Has its line and col set to the - same as the last lexed token, so that diagnostics appear in the - right place. */ -cpp_token * -_cpp_temp_token (cpp_reader *pfile) -{ - cpp_token *old, *result; - - old = pfile->cur_token - 1; - if (pfile->cur_token == pfile->cur_run->limit) - { - pfile->cur_run = next_tokenrun (pfile->cur_run); - pfile->cur_token = pfile->cur_run->base; - } - - result = pfile->cur_token++; - result->line = old->line; - result->col = old->col; - return result; -} - -/* Lex a token into RESULT (external interface). Takes care of issues - like directive handling, token lookahead, multiple include - optimization and skipping. */ -const cpp_token * -_cpp_lex_token (cpp_reader *pfile) -{ - cpp_token *result; - - for (;;) - { - if (pfile->cur_token == pfile->cur_run->limit) - { - pfile->cur_run = next_tokenrun (pfile->cur_run); - pfile->cur_token = pfile->cur_run->base; - } - - if (pfile->lookaheads) - { - pfile->lookaheads--; - result = pfile->cur_token++; - } - else - result = _cpp_lex_direct (pfile); - - if (result->flags & BOL) - { - /* Is this a directive. If _cpp_handle_directive returns - false, it is an assembler #. */ - if (result->type == CPP_HASH - /* 6.10.3 p 11: Directives in a list of macro arguments - gives undefined behavior. This implementation - handles the directive as normal. */ - && pfile->state.parsing_args != 1 - && _cpp_handle_directive (pfile, result->flags & PREV_WHITE)) - continue; - if (pfile->cb.line_change && !pfile->state.skipping) - pfile->cb.line_change (pfile, result, pfile->state.parsing_args); - } - - /* We don't skip tokens in directives. */ - if (pfile->state.in_directive) - break; - - /* Outside a directive, invalidate controlling macros. At file - EOF, _cpp_lex_direct takes care of popping the buffer, so we never - get here and MI optimization works. */ - pfile->mi_valid = false; - - if (!pfile->state.skipping || result->type == CPP_EOF) - break; - } - - return result; -} - -/* Returns true if a fresh line has been loaded. */ -bool -_cpp_get_fresh_line (cpp_reader *pfile) -{ - int return_at_eof; - - /* We can't get a new line until we leave the current directive. */ - if (pfile->state.in_directive) - return false; - - for (;;) - { - cpp_buffer *buffer = pfile->buffer; - - if (!buffer->need_line) - return true; - - if (buffer->next_line < buffer->rlimit) - { - _cpp_clean_line (pfile); - return true; - } - - /* First, get out of parsing arguments state. */ - if (pfile->state.parsing_args) - return false; - - /* End of buffer. Non-empty files should end in a newline. */ - if (buffer->buf != buffer->rlimit - && buffer->next_line > buffer->rlimit - && !buffer->from_stage3) - { - /* Only warn once. */ - buffer->next_line = buffer->rlimit; - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line - 1, - CPP_BUF_COLUMN (buffer, buffer->cur), - "no newline at end of file"); - } - - return_at_eof = buffer->return_at_eof; - _cpp_pop_buffer (pfile); - if (pfile->buffer == NULL || return_at_eof) - return false; - } -} - -#define IF_NEXT_IS(CHAR, THEN_TYPE, ELSE_TYPE) \ - do \ - { \ - result->type = ELSE_TYPE; \ - if (*buffer->cur == CHAR) \ - buffer->cur++, result->type = THEN_TYPE; \ - } \ - while (0) - -/* Lex a token into pfile->cur_token, which is also incremented, to - get diagnostics pointing to the correct location. - - Does not handle issues such as token lookahead, multiple-include - optimization, directives, skipping etc. This function is only - suitable for use by _cpp_lex_token, and in special cases like - lex_expansion_token which doesn't care for any of these issues. - - When meeting a newline, returns CPP_EOF if parsing a directive, - otherwise returns to the start of the token buffer if permissible. - Returns the location of the lexed token. */ -cpp_token * -_cpp_lex_direct (cpp_reader *pfile) -{ - cppchar_t c; - cpp_buffer *buffer; - const unsigned char *comment_start; - cpp_token *result = pfile->cur_token++; - - fresh_line: - result->flags = 0; - buffer = pfile->buffer; - if (buffer->need_line) - { - if (!_cpp_get_fresh_line (pfile)) - { - result->type = CPP_EOF; - if (!pfile->state.in_directive) - { - /* Tell the compiler the line number of the EOF token. */ - result->line = pfile->line; - result->flags = BOL; - } - return result; - } - if (!pfile->keep_tokens) - { - pfile->cur_run = &pfile->base_run; - result = pfile->base_run.base; - pfile->cur_token = result + 1; - } - result->flags = BOL; - if (pfile->state.parsing_args == 2) - result->flags |= PREV_WHITE; - } - buffer = pfile->buffer; - update_tokens_line: - result->line = pfile->line; - - skipped_white: - if (buffer->cur >= buffer->notes[buffer->cur_note].pos - && !pfile->overlaid_buffer) - { - _cpp_process_line_notes (pfile, false); - result->line = pfile->line; - } - c = *buffer->cur++; - result->col = CPP_BUF_COLUMN (buffer, buffer->cur); - - switch (c) - { - case ' ': case '\t': case '\f': case '\v': case '\0': - result->flags |= PREV_WHITE; - skip_whitespace (pfile, c); - goto skipped_white; - - case '\n': - pfile->line++; - buffer->need_line = true; - goto fresh_line; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - result->type = CPP_NUMBER; - lex_number (pfile, &result->val.str); - break; - - case 'L': - /* 'L' may introduce wide characters or strings. */ - if (*buffer->cur == '\'' || *buffer->cur == '"') - { - lex_string (pfile, result, buffer->cur - 1); - break; - } - /* Fall through. */ - - case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - result->type = CPP_NAME; - result->val.node = lex_identifier (pfile, buffer->cur - 1); - - /* Convert named operators to their proper types. */ - if (result->val.node->flags & NODE_OPERATOR) - { - result->flags |= NAMED_OP; - result->type = result->val.node->directive_index; - } - break; - - case '\'': - case '"': - lex_string (pfile, result, buffer->cur - 1); - break; - - case '/': - /* A potential block or line comment. */ - comment_start = buffer->cur; - c = *buffer->cur; - - if (c == '*') - { - if (_cpp_skip_block_comment (pfile)) - cpp_error (pfile, CPP_DL_ERROR, "unterminated comment"); - } - else if (c == '/' && (CPP_OPTION (pfile, cplusplus_comments) - || CPP_IN_SYSTEM_HEADER (pfile))) - { - /* Warn about comments only if pedantically GNUC89, and not - in system headers. */ - if (CPP_OPTION (pfile, lang) == CLK_GNUC89 && CPP_PEDANTIC (pfile) - && ! buffer->warned_cplusplus_comments) - { - cpp_error (pfile, CPP_DL_PEDWARN, - "C++ style comments are not allowed in ISO C90"); - cpp_error (pfile, CPP_DL_PEDWARN, - "(this will be reported only once per input file)"); - buffer->warned_cplusplus_comments = 1; - } - - if (skip_line_comment (pfile) && CPP_OPTION (pfile, warn_comments)) - cpp_error (pfile, CPP_DL_WARNING, "multi-line comment"); - } - else if (c == '=') - { - buffer->cur++; - result->type = CPP_DIV_EQ; - break; - } - else - { - result->type = CPP_DIV; - break; - } - - if (!pfile->state.save_comments) - { - result->flags |= PREV_WHITE; - goto update_tokens_line; - } - - /* Save the comment as a token in its own right. */ - save_comment (pfile, result, comment_start, c); - break; - - case '<': - if (pfile->state.angled_headers) - { - lex_string (pfile, result, buffer->cur - 1); - break; - } - - result->type = CPP_LESS; - if (*buffer->cur == '=') - buffer->cur++, result->type = CPP_LESS_EQ; - else if (*buffer->cur == '<') - { - buffer->cur++; - IF_NEXT_IS ('=', CPP_LSHIFT_EQ, CPP_LSHIFT); - } - else if (*buffer->cur == '?' && CPP_OPTION (pfile, cplusplus)) - { - buffer->cur++; - IF_NEXT_IS ('=', CPP_MIN_EQ, CPP_MIN); - } - else if (CPP_OPTION (pfile, digraphs)) - { - if (*buffer->cur == ':') - { - buffer->cur++; - result->flags |= DIGRAPH; - result->type = CPP_OPEN_SQUARE; - } - else if (*buffer->cur == '%') - { - buffer->cur++; - result->flags |= DIGRAPH; - result->type = CPP_OPEN_BRACE; - } - } - break; - - case '>': - result->type = CPP_GREATER; - if (*buffer->cur == '=') - buffer->cur++, result->type = CPP_GREATER_EQ; - else if (*buffer->cur == '>') - { - buffer->cur++; - IF_NEXT_IS ('=', CPP_RSHIFT_EQ, CPP_RSHIFT); - } - else if (*buffer->cur == '?' && CPP_OPTION (pfile, cplusplus)) - { - buffer->cur++; - IF_NEXT_IS ('=', CPP_MAX_EQ, CPP_MAX); - } - break; - - case '%': - result->type = CPP_MOD; - if (*buffer->cur == '=') - buffer->cur++, result->type = CPP_MOD_EQ; - else if (CPP_OPTION (pfile, digraphs)) - { - if (*buffer->cur == ':') - { - buffer->cur++; - result->flags |= DIGRAPH; - result->type = CPP_HASH; - if (*buffer->cur == '%' && buffer->cur[1] == ':') - buffer->cur += 2, result->type = CPP_PASTE; - } - else if (*buffer->cur == '>') - { - buffer->cur++; - result->flags |= DIGRAPH; - result->type = CPP_CLOSE_BRACE; - } - } - break; - - case '.': - result->type = CPP_DOT; - if (ISDIGIT (*buffer->cur)) - { - result->type = CPP_NUMBER; - lex_number (pfile, &result->val.str); - } - else if (*buffer->cur == '.' && buffer->cur[1] == '.') - buffer->cur += 2, result->type = CPP_ELLIPSIS; - else if (*buffer->cur == '*' && CPP_OPTION (pfile, cplusplus)) - buffer->cur++, result->type = CPP_DOT_STAR; - break; - - case '+': - result->type = CPP_PLUS; - if (*buffer->cur == '+') - buffer->cur++, result->type = CPP_PLUS_PLUS; - else if (*buffer->cur == '=') - buffer->cur++, result->type = CPP_PLUS_EQ; - break; - - case '-': - result->type = CPP_MINUS; - if (*buffer->cur == '>') - { - buffer->cur++; - result->type = CPP_DEREF; - if (*buffer->cur == '*' && CPP_OPTION (pfile, cplusplus)) - buffer->cur++, result->type = CPP_DEREF_STAR; - } - else if (*buffer->cur == '-') - buffer->cur++, result->type = CPP_MINUS_MINUS; - else if (*buffer->cur == '=') - buffer->cur++, result->type = CPP_MINUS_EQ; - break; - - case '&': - result->type = CPP_AND; - if (*buffer->cur == '&') - buffer->cur++, result->type = CPP_AND_AND; - else if (*buffer->cur == '=') - buffer->cur++, result->type = CPP_AND_EQ; - break; - - case '|': - result->type = CPP_OR; - if (*buffer->cur == '|') - buffer->cur++, result->type = CPP_OR_OR; - else if (*buffer->cur == '=') - buffer->cur++, result->type = CPP_OR_EQ; - break; - - case ':': - result->type = CPP_COLON; - if (*buffer->cur == ':' && CPP_OPTION (pfile, cplusplus)) - buffer->cur++, result->type = CPP_SCOPE; - else if (*buffer->cur == '>' && CPP_OPTION (pfile, digraphs)) - { - buffer->cur++; - result->flags |= DIGRAPH; - result->type = CPP_CLOSE_SQUARE; - } - break; - - case '*': IF_NEXT_IS ('=', CPP_MULT_EQ, CPP_MULT); break; - case '=': IF_NEXT_IS ('=', CPP_EQ_EQ, CPP_EQ); break; - case '!': IF_NEXT_IS ('=', CPP_NOT_EQ, CPP_NOT); break; - case '^': IF_NEXT_IS ('=', CPP_XOR_EQ, CPP_XOR); break; - case '#': IF_NEXT_IS ('#', CPP_PASTE, CPP_HASH); break; - - case '?': result->type = CPP_QUERY; break; - case '~': result->type = CPP_COMPL; break; - case ',': result->type = CPP_COMMA; break; - case '(': result->type = CPP_OPEN_PAREN; break; - case ')': result->type = CPP_CLOSE_PAREN; break; - case '[': result->type = CPP_OPEN_SQUARE; break; - case ']': result->type = CPP_CLOSE_SQUARE; break; - case '{': result->type = CPP_OPEN_BRACE; break; - case '}': result->type = CPP_CLOSE_BRACE; break; - case ';': result->type = CPP_SEMICOLON; break; - - /* @ is a punctuator in Objective-C. */ - case '@': result->type = CPP_ATSIGN; break; - - case '$': - case '\\': - { - const uchar *base = --buffer->cur; - - if (forms_identifier_p (pfile, true)) - { - result->type = CPP_NAME; - result->val.node = lex_identifier (pfile, base); - break; - } - buffer->cur++; - } - - default: - create_literal (pfile, result, buffer->cur - 1, 1, CPP_OTHER); - break; - } - - return result; -} - -/* An upper bound on the number of bytes needed to spell TOKEN. - Does not include preceding whitespace. */ -unsigned int -cpp_token_len (const cpp_token *token) -{ - unsigned int len; - - switch (TOKEN_SPELL (token)) - { - default: len = 4; break; - case SPELL_LITERAL: len = token->val.str.len; break; - case SPELL_IDENT: len = NODE_LEN (token->val.node); break; - } - - return len; -} - -/* Write the spelling of a token TOKEN to BUFFER. The buffer must - already contain the enough space to hold the token's spelling. - Returns a pointer to the character after the last character written. - FIXME: Would be nice if we didn't need the PFILE argument. */ -unsigned char * -cpp_spell_token (cpp_reader *pfile, const cpp_token *token, - unsigned char *buffer) -{ - switch (TOKEN_SPELL (token)) - { - case SPELL_OPERATOR: - { - const unsigned char *spelling; - unsigned char c; - - if (token->flags & DIGRAPH) - spelling - = digraph_spellings[(int) token->type - (int) CPP_FIRST_DIGRAPH]; - else if (token->flags & NAMED_OP) - goto spell_ident; - else - spelling = TOKEN_NAME (token); - - while ((c = *spelling++) != '\0') - *buffer++ = c; - } - break; - - spell_ident: - case SPELL_IDENT: - memcpy (buffer, NODE_NAME (token->val.node), NODE_LEN (token->val.node)); - buffer += NODE_LEN (token->val.node); - break; - - case SPELL_LITERAL: - memcpy (buffer, token->val.str.text, token->val.str.len); - buffer += token->val.str.len; - break; - - case SPELL_NONE: - cpp_error (pfile, CPP_DL_ICE, - "unspellable token %s", TOKEN_NAME (token)); - break; - } - - return buffer; -} - -/* Returns TOKEN spelt as a null-terminated string. The string is - freed when the reader is destroyed. Useful for diagnostics. */ -unsigned char * -cpp_token_as_text (cpp_reader *pfile, const cpp_token *token) -{ - unsigned int len = cpp_token_len (token) + 1; - unsigned char *start = _cpp_unaligned_alloc (pfile, len), *end; - - end = cpp_spell_token (pfile, token, start); - end[0] = '\0'; - - return start; -} - -/* Used by C front ends, which really should move to using - cpp_token_as_text. */ -const char * -cpp_type2name (enum cpp_ttype type) -{ - return (const char *) token_spellings[type].name; -} - -/* Writes the spelling of token to FP, without any preceding space. - Separated from cpp_spell_token for efficiency - to avoid stdio - double-buffering. */ -void -cpp_output_token (const cpp_token *token, FILE *fp) -{ - switch (TOKEN_SPELL (token)) - { - case SPELL_OPERATOR: - { - const unsigned char *spelling; - int c; - - if (token->flags & DIGRAPH) - spelling - = digraph_spellings[(int) token->type - (int) CPP_FIRST_DIGRAPH]; - else if (token->flags & NAMED_OP) - goto spell_ident; - else - spelling = TOKEN_NAME (token); - - c = *spelling; - do - putc (c, fp); - while ((c = *++spelling) != '\0'); - } - break; - - spell_ident: - case SPELL_IDENT: - fwrite (NODE_NAME (token->val.node), 1, NODE_LEN (token->val.node), fp); - break; - - case SPELL_LITERAL: - fwrite (token->val.str.text, 1, token->val.str.len, fp); - break; - - case SPELL_NONE: - /* An error, most probably. */ - break; - } -} - -/* Compare two tokens. */ -int -_cpp_equiv_tokens (const cpp_token *a, const cpp_token *b) -{ - if (a->type == b->type && a->flags == b->flags) - switch (TOKEN_SPELL (a)) - { - default: /* Keep compiler happy. */ - case SPELL_OPERATOR: - return 1; - case SPELL_NONE: - return (a->type != CPP_MACRO_ARG || a->val.arg_no == b->val.arg_no); - case SPELL_IDENT: - return a->val.node == b->val.node; - case SPELL_LITERAL: - return (a->val.str.len == b->val.str.len - && !memcmp (a->val.str.text, b->val.str.text, - a->val.str.len)); - } - - return 0; -} - -/* Returns nonzero if a space should be inserted to avoid an - accidental token paste for output. For simplicity, it is - conservative, and occasionally advises a space where one is not - needed, e.g. "." and ".2". */ -int -cpp_avoid_paste (cpp_reader *pfile, const cpp_token *token1, - const cpp_token *token2) -{ - enum cpp_ttype a = token1->type, b = token2->type; - cppchar_t c; - - if (token1->flags & NAMED_OP) - a = CPP_NAME; - if (token2->flags & NAMED_OP) - b = CPP_NAME; - - c = EOF; - if (token2->flags & DIGRAPH) - c = digraph_spellings[(int) b - (int) CPP_FIRST_DIGRAPH][0]; - else if (token_spellings[b].category == SPELL_OPERATOR) - c = token_spellings[b].name[0]; - - /* Quickly get everything that can paste with an '='. */ - if ((int) a <= (int) CPP_LAST_EQ && c == '=') - return 1; - - switch (a) - { - case CPP_GREATER: return c == '>' || c == '?'; - case CPP_LESS: return c == '<' || c == '?' || c == '%' || c == ':'; - case CPP_PLUS: return c == '+'; - case CPP_MINUS: return c == '-' || c == '>'; - case CPP_DIV: return c == '/' || c == '*'; /* Comments. */ - case CPP_MOD: return c == ':' || c == '>'; - case CPP_AND: return c == '&'; - case CPP_OR: return c == '|'; - case CPP_COLON: return c == ':' || c == '>'; - case CPP_DEREF: return c == '*'; - case CPP_DOT: return c == '.' || c == '%' || b == CPP_NUMBER; - case CPP_HASH: return c == '#' || c == '%'; /* Digraph form. */ - case CPP_NAME: return ((b == CPP_NUMBER - && name_p (pfile, &token2->val.str)) - || b == CPP_NAME - || b == CPP_CHAR || b == CPP_STRING); /* L */ - case CPP_NUMBER: return (b == CPP_NUMBER || b == CPP_NAME - || c == '.' || c == '+' || c == '-'); - /* UCNs */ - case CPP_OTHER: return ((token1->val.str.text[0] == '\\' - && b == CPP_NAME) - || (CPP_OPTION (pfile, objc) - && token1->val.str.text[0] == '@' - && (b == CPP_NAME || b == CPP_STRING))); - default: break; - } - - return 0; -} - -/* Output all the remaining tokens on the current line, and a newline - character, to FP. Leading whitespace is removed. If there are - macros, special token padding is not performed. */ -void -cpp_output_line (cpp_reader *pfile, FILE *fp) -{ - const cpp_token *token; - - token = cpp_get_token (pfile); - while (token->type != CPP_EOF) - { - cpp_output_token (token, fp); - token = cpp_get_token (pfile); - if (token->flags & PREV_WHITE) - putc (' ', fp); - } - - putc ('\n', fp); -} - -/* Memory buffers. Changing these three constants can have a dramatic - effect on performance. The values here are reasonable defaults, - but might be tuned. If you adjust them, be sure to test across a - range of uses of cpplib, including heavy nested function-like macro - expansion. Also check the change in peak memory usage (NJAMD is a - good tool for this). */ -#define MIN_BUFF_SIZE 8000 -#define BUFF_SIZE_UPPER_BOUND(MIN_SIZE) (MIN_BUFF_SIZE + (MIN_SIZE) * 3 / 2) -#define EXTENDED_BUFF_SIZE(BUFF, MIN_EXTRA) \ - (MIN_EXTRA + ((BUFF)->limit - (BUFF)->cur) * 2) - -#if MIN_BUFF_SIZE > BUFF_SIZE_UPPER_BOUND (0) - #error BUFF_SIZE_UPPER_BOUND must be at least as large as MIN_BUFF_SIZE! -#endif - -/* Create a new allocation buffer. Place the control block at the end - of the buffer, so that buffer overflows will cause immediate chaos. */ -static _cpp_buff * -new_buff (size_t len) -{ - _cpp_buff *result; - unsigned char *base; - - if (len < MIN_BUFF_SIZE) - len = MIN_BUFF_SIZE; - len = CPP_ALIGN (len); - - base = xmalloc (len + sizeof (_cpp_buff)); - result = (_cpp_buff *) (base + len); - result->base = base; - result->cur = base; - result->limit = base + len; - result->next = NULL; - return result; -} - -/* Place a chain of unwanted allocation buffers on the free list. */ -void -_cpp_release_buff (cpp_reader *pfile, _cpp_buff *buff) -{ - _cpp_buff *end = buff; - - while (end->next) - end = end->next; - end->next = pfile->free_buffs; - pfile->free_buffs = buff; -} - -/* Return a free buffer of size at least MIN_SIZE. */ -_cpp_buff * -_cpp_get_buff (cpp_reader *pfile, size_t min_size) -{ - _cpp_buff *result, **p; - - for (p = &pfile->free_buffs;; p = &(*p)->next) - { - size_t size; - - if (*p == NULL) - return new_buff (min_size); - result = *p; - size = result->limit - result->base; - /* Return a buffer that's big enough, but don't waste one that's - way too big. */ - if (size >= min_size && size <= BUFF_SIZE_UPPER_BOUND (min_size)) - break; - } - - *p = result->next; - result->next = NULL; - result->cur = result->base; - return result; -} - -/* Creates a new buffer with enough space to hold the uncommitted - remaining bytes of BUFF, and at least MIN_EXTRA more bytes. Copies - the excess bytes to the new buffer. Chains the new buffer after - BUFF, and returns the new buffer. */ -_cpp_buff * -_cpp_append_extend_buff (cpp_reader *pfile, _cpp_buff *buff, size_t min_extra) -{ - size_t size = EXTENDED_BUFF_SIZE (buff, min_extra); - _cpp_buff *new_buff = _cpp_get_buff (pfile, size); - - buff->next = new_buff; - memcpy (new_buff->base, buff->cur, BUFF_ROOM (buff)); - return new_buff; -} - -/* Creates a new buffer with enough space to hold the uncommitted - remaining bytes of the buffer pointed to by BUFF, and at least - MIN_EXTRA more bytes. Copies the excess bytes to the new buffer. - Chains the new buffer before the buffer pointed to by BUFF, and - updates the pointer to point to the new buffer. */ -void -_cpp_extend_buff (cpp_reader *pfile, _cpp_buff **pbuff, size_t min_extra) -{ - _cpp_buff *new_buff, *old_buff = *pbuff; - size_t size = EXTENDED_BUFF_SIZE (old_buff, min_extra); - - new_buff = _cpp_get_buff (pfile, size); - memcpy (new_buff->base, old_buff->cur, BUFF_ROOM (old_buff)); - new_buff->next = old_buff; - *pbuff = new_buff; -} - -/* Free a chain of buffers starting at BUFF. */ -void -_cpp_free_buff (_cpp_buff *buff) -{ - _cpp_buff *next; - - for (; buff; buff = next) - { - next = buff->next; - free (buff->base); - } -} - -/* Allocate permanent, unaligned storage of length LEN. */ -unsigned char * -_cpp_unaligned_alloc (cpp_reader *pfile, size_t len) -{ - _cpp_buff *buff = pfile->u_buff; - unsigned char *result = buff->cur; - - if (len > (size_t) (buff->limit - result)) - { - buff = _cpp_get_buff (pfile, len); - buff->next = pfile->u_buff; - pfile->u_buff = buff; - result = buff->cur; - } - - buff->cur = result + len; - return result; -} - -/* Allocate permanent, unaligned storage of length LEN from a_buff. - That buffer is used for growing allocations when saving macro - replacement lists in a #define, and when parsing an answer to an - assertion in #assert, #unassert or #if (and therefore possibly - whilst expanding macros). It therefore must not be used by any - code that they might call: specifically the lexer and the guts of - the macro expander. - - All existing other uses clearly fit this restriction: storing - registered pragmas during initialization. */ -unsigned char * -_cpp_aligned_alloc (cpp_reader *pfile, size_t len) -{ - _cpp_buff *buff = pfile->a_buff; - unsigned char *result = buff->cur; - - if (len > (size_t) (buff->limit - result)) - { - buff = _cpp_get_buff (pfile, len); - buff->next = pfile->a_buff; - pfile->a_buff = buff; - result = buff->cur; - } - - buff->cur = result + len; - return result; -} diff --git a/contrib/gcc/cpplib.c b/contrib/gcc/cpplib.c deleted file mode 100644 index 298f5e6..0000000 --- a/contrib/gcc/cpplib.c +++ /dev/null @@ -1,1995 +0,0 @@ -/* CPP Library. (Directive handling.) - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - Contributed by Per Bothner, 1994-95. - Based on CCCP program by Paul Rubin, June 1986 - Adapted to ANSI C, Richard Stallman, Jan 1987 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" -#include "obstack.h" - -/* Chained list of answers to an assertion. */ -struct answer -{ - struct answer *next; - unsigned int count; - cpp_token first[1]; -}; - -/* Stack of conditionals currently in progress - (including both successful and failing conditionals). */ -struct if_stack -{ - struct if_stack *next; - unsigned int line; /* Line where condition started. */ - const cpp_hashnode *mi_cmacro;/* macro name for #ifndef around entire file */ - bool skip_elses; /* Can future #else / #elif be skipped? */ - bool was_skipping; /* If were skipping on entry. */ - int type; /* Most recent conditional for diagnostics. */ -}; - -/* Contains a registered pragma or pragma namespace. */ -typedef void (*pragma_cb) (cpp_reader *); -struct pragma_entry -{ - struct pragma_entry *next; - const cpp_hashnode *pragma; /* Name and length. */ - int is_nspace; - union { - pragma_cb handler; - struct pragma_entry *space; - } u; -}; - -/* Values for the origin field of struct directive. KANDR directives - come from traditional (K&R) C. STDC89 directives come from the - 1989 C standard. EXTENSION directives are extensions. */ -#define KANDR 0 -#define STDC89 1 -#define EXTENSION 2 - -/* Values for the flags field of struct directive. COND indicates a - conditional; IF_COND an opening conditional. INCL means to treat - "..." and <...> as q-char and h-char sequences respectively. IN_I - means this directive should be handled even if -fpreprocessed is in - effect (these are the directives with callback hooks). - - EXPAND is set on directives that are always macro-expanded. */ -#define COND (1 << 0) -#define IF_COND (1 << 1) -#define INCL (1 << 2) -#define IN_I (1 << 3) -#define EXPAND (1 << 4) - -/* Defines one #-directive, including how to handle it. */ -typedef void (*directive_handler) (cpp_reader *); -typedef struct directive directive; -struct directive -{ - directive_handler handler; /* Function to handle directive. */ - const uchar *name; /* Name of directive. */ - unsigned short length; /* Length of name. */ - unsigned char origin; /* Origin of directive. */ - unsigned char flags; /* Flags describing this directive. */ -}; - -/* Forward declarations. */ - -static void skip_rest_of_line (cpp_reader *); -static void check_eol (cpp_reader *); -static void start_directive (cpp_reader *); -static void prepare_directive_trad (cpp_reader *); -static void end_directive (cpp_reader *, int); -static void directive_diagnostics (cpp_reader *, const directive *, int); -static void run_directive (cpp_reader *, int, const char *, size_t); -static char *glue_header_name (cpp_reader *); -static const char *parse_include (cpp_reader *, int *); -static void push_conditional (cpp_reader *, int, int, const cpp_hashnode *); -static unsigned int read_flag (cpp_reader *, unsigned int); -static int strtoul_for_line (const uchar *, unsigned int, unsigned long *); -static void do_diagnostic (cpp_reader *, int, int); -static cpp_hashnode *lex_macro_node (cpp_reader *); -static int undefine_macros (cpp_reader *, cpp_hashnode *, void *); -static void do_include_common (cpp_reader *, enum include_type); -static struct pragma_entry *lookup_pragma_entry (struct pragma_entry *, - const cpp_hashnode *); -static struct pragma_entry *insert_pragma_entry (cpp_reader *, - struct pragma_entry **, - const cpp_hashnode *, - pragma_cb); -static int count_registered_pragmas (struct pragma_entry *); -static char ** save_registered_pragmas (struct pragma_entry *, char **); -static char ** restore_registered_pragmas (cpp_reader *, struct pragma_entry *, - char **); -static void do_pragma_once (cpp_reader *); -static void do_pragma_poison (cpp_reader *); -static void do_pragma_system_header (cpp_reader *); -static void do_pragma_dependency (cpp_reader *); -static void do_linemarker (cpp_reader *); -static const cpp_token *get_token_no_padding (cpp_reader *); -static const cpp_token *get__Pragma_string (cpp_reader *); -static void destringize_and_run (cpp_reader *, const cpp_string *); -static int parse_answer (cpp_reader *, struct answer **, int); -static cpp_hashnode *parse_assertion (cpp_reader *, struct answer **, int); -static struct answer ** find_answer (cpp_hashnode *, const struct answer *); -static void handle_assertion (cpp_reader *, const char *, int); - -/* This is the table of directive handlers. It is ordered by - frequency of occurrence; the numbers at the end are directive - counts from all the source code I have lying around (egcs and libc - CVS as of 1999-05-18, plus grub-0.5.91, linux-2.2.9, and - pcmcia-cs-3.0.9). This is no longer important as directive lookup - is now O(1). All extensions other than #warning and #include_next - are deprecated. The name is where the extension appears to have - come from. */ - -#define DIRECTIVE_TABLE \ -D(define, T_DEFINE = 0, KANDR, IN_I) /* 270554 */ \ -D(include, T_INCLUDE, KANDR, INCL | EXPAND) /* 52262 */ \ -D(endif, T_ENDIF, KANDR, COND) /* 45855 */ \ -D(ifdef, T_IFDEF, KANDR, COND | IF_COND) /* 22000 */ \ -D(if, T_IF, KANDR, COND | IF_COND | EXPAND) /* 18162 */ \ -D(else, T_ELSE, KANDR, COND) /* 9863 */ \ -D(ifndef, T_IFNDEF, KANDR, COND | IF_COND) /* 9675 */ \ -D(undef, T_UNDEF, KANDR, IN_I) /* 4837 */ \ -D(line, T_LINE, KANDR, EXPAND) /* 2465 */ \ -D(elif, T_ELIF, STDC89, COND | EXPAND) /* 610 */ \ -D(error, T_ERROR, STDC89, 0) /* 475 */ \ -D(pragma, T_PRAGMA, STDC89, IN_I) /* 195 */ \ -D(warning, T_WARNING, EXTENSION, 0) /* 22 */ \ -D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND) /* 19 */ \ -D(ident, T_IDENT, EXTENSION, IN_I) /* 11 */ \ -D(import, T_IMPORT, EXTENSION, INCL | EXPAND) /* 0 ObjC */ \ -D(assert, T_ASSERT, EXTENSION, 0) /* 0 SVR4 */ \ -D(unassert, T_UNASSERT, EXTENSION, 0) /* 0 SVR4 */ \ -D(sccs, T_SCCS, EXTENSION, 0) /* 0 SVR4? */ - -/* Use the table to generate a series of prototypes, an enum for the - directive names, and an array of directive handlers. */ - -#define D(name, t, o, f) static void do_##name (cpp_reader *); -DIRECTIVE_TABLE -#undef D - -#define D(n, tag, o, f) tag, -enum -{ - DIRECTIVE_TABLE - N_DIRECTIVES -}; -#undef D - -#define D(name, t, origin, flags) \ -{ do_##name, (const uchar *) #name, \ - sizeof #name - 1, origin, flags }, -static const directive dtable[] = -{ -DIRECTIVE_TABLE -}; -#undef D -#undef DIRECTIVE_TABLE - -/* Wrapper struct directive for linemarkers. - The origin is more or less true - the original K+R cpp - did use this notation in its preprocessed output. */ -static const directive linemarker_dir = -{ - do_linemarker, U"#", 1, KANDR, IN_I -}; - -#define SEEN_EOL() (pfile->cur_token[-1].type == CPP_EOF) - -/* Skip any remaining tokens in a directive. */ -static void -skip_rest_of_line (cpp_reader *pfile) -{ - /* Discard all stacked contexts. */ - while (pfile->context->prev) - _cpp_pop_context (pfile); - - /* Sweep up all tokens remaining on the line. */ - if (! SEEN_EOL ()) - while (_cpp_lex_token (pfile)->type != CPP_EOF) - ; -} - -/* Ensure there are no stray tokens at the end of a directive. */ -static void -check_eol (cpp_reader *pfile) -{ - if (! SEEN_EOL () && _cpp_lex_token (pfile)->type != CPP_EOF) - cpp_error (pfile, CPP_DL_PEDWARN, "extra tokens at end of #%s directive", - pfile->directive->name); -} - -/* Called when entering a directive, _Pragma or command-line directive. */ -static void -start_directive (cpp_reader *pfile) -{ - /* Setup in-directive state. */ - pfile->state.in_directive = 1; - pfile->state.save_comments = 0; - - /* Some handlers need the position of the # for diagnostics. */ - pfile->directive_line = pfile->line; -} - -/* Called when leaving a directive, _Pragma or command-line directive. */ -static void -end_directive (cpp_reader *pfile, int skip_line) -{ - if (CPP_OPTION (pfile, traditional)) - { - /* Revert change of prepare_directive_trad. */ - pfile->state.prevent_expansion--; - - if (pfile->directive != &dtable[T_DEFINE]) - _cpp_remove_overlay (pfile); - } - /* We don't skip for an assembler #. */ - else if (skip_line) - { - skip_rest_of_line (pfile); - if (!pfile->keep_tokens) - { - pfile->cur_run = &pfile->base_run; - pfile->cur_token = pfile->base_run.base; - } - } - - /* Restore state. */ - pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); - pfile->state.in_directive = 0; - pfile->state.in_expression = 0; - pfile->state.angled_headers = 0; - pfile->directive = 0; -} - -/* Prepare to handle the directive in pfile->directive. */ -static void -prepare_directive_trad (cpp_reader *pfile) -{ - if (pfile->directive != &dtable[T_DEFINE]) - { - bool no_expand = (pfile->directive - && ! (pfile->directive->flags & EXPAND)); - bool was_skipping = pfile->state.skipping; - - pfile->state.in_expression = (pfile->directive == &dtable[T_IF] - || pfile->directive == &dtable[T_ELIF]); - if (pfile->state.in_expression) - pfile->state.skipping = false; - - if (no_expand) - pfile->state.prevent_expansion++; - _cpp_scan_out_logical_line (pfile, NULL); - if (no_expand) - pfile->state.prevent_expansion--; - - pfile->state.skipping = was_skipping; - _cpp_overlay_buffer (pfile, pfile->out.base, - pfile->out.cur - pfile->out.base); - } - - /* Stop ISO C from expanding anything. */ - pfile->state.prevent_expansion++; -} - -/* Output diagnostics for a directive DIR. INDENTED is nonzero if - the '#' was indented. */ -static void -directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented) -{ - /* Issue -pedantic warnings for extensions. */ - if (CPP_PEDANTIC (pfile) - && ! pfile->state.skipping - && dir->origin == EXTENSION) - cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name); - - /* Traditionally, a directive is ignored unless its # is in - column 1. Therefore in code intended to work with K+R - compilers, directives added by C89 must have their # - indented, and directives present in traditional C must not. - This is true even of directives in skipped conditional - blocks. #elif cannot be used at all. */ - if (CPP_WTRADITIONAL (pfile)) - { - if (dir == &dtable[T_ELIF]) - cpp_error (pfile, CPP_DL_WARNING, - "suggest not using #elif in traditional C"); - else if (indented && dir->origin == KANDR) - cpp_error (pfile, CPP_DL_WARNING, - "traditional C ignores #%s with the # indented", - dir->name); - else if (!indented && dir->origin != KANDR) - cpp_error (pfile, CPP_DL_WARNING, - "suggest hiding #%s from traditional C with an indented #", - dir->name); - } -} - -/* Check if we have a known directive. INDENTED is nonzero if the - '#' of the directive was indented. This function is in this file - to save unnecessarily exporting dtable etc. to cpplex.c. Returns - nonzero if the line of tokens has been handled, zero if we should - continue processing the line. */ -int -_cpp_handle_directive (cpp_reader *pfile, int indented) -{ - const directive *dir = 0; - const cpp_token *dname; - bool was_parsing_args = pfile->state.parsing_args; - int skip = 1; - - if (was_parsing_args) - { - if (CPP_OPTION (pfile, pedantic)) - cpp_error (pfile, CPP_DL_PEDWARN, - "embedding a directive within macro arguments is not portable"); - pfile->state.parsing_args = 0; - pfile->state.prevent_expansion = 0; - } - start_directive (pfile); - dname = _cpp_lex_token (pfile); - - if (dname->type == CPP_NAME) - { - if (dname->val.node->is_directive) - dir = &dtable[dname->val.node->directive_index]; - } - /* We do not recognize the # followed by a number extension in - assembler code. */ - else if (dname->type == CPP_NUMBER && CPP_OPTION (pfile, lang) != CLK_ASM) - { - dir = &linemarker_dir; - if (CPP_PEDANTIC (pfile) && ! CPP_OPTION (pfile, preprocessed) - && ! pfile->state.skipping) - cpp_error (pfile, CPP_DL_PEDWARN, - "style of line directive is a GCC extension"); - } - - if (dir) - { - /* If we have a directive that is not an opening conditional, - invalidate any control macro. */ - if (! (dir->flags & IF_COND)) - pfile->mi_valid = false; - - /* Kluge alert. In order to be sure that code like this - - #define HASH # - HASH define foo bar - - does not cause '#define foo bar' to get executed when - compiled with -save-temps, we recognize directives in - -fpreprocessed mode only if the # is in column 1. cppmacro.c - puts a space in front of any '#' at the start of a macro. */ - if (CPP_OPTION (pfile, preprocessed) - && (indented || !(dir->flags & IN_I))) - { - skip = 0; - dir = 0; - } - else - { - /* In failed conditional groups, all non-conditional - directives are ignored. Before doing that, whether - skipping or not, we should lex angle-bracketed headers - correctly, and maybe output some diagnostics. */ - pfile->state.angled_headers = dir->flags & INCL; - pfile->state.directive_wants_padding = dir->flags & INCL; - if (! CPP_OPTION (pfile, preprocessed)) - directive_diagnostics (pfile, dir, indented); - if (pfile->state.skipping && !(dir->flags & COND)) - dir = 0; - } - } - else if (dname->type == CPP_EOF) - ; /* CPP_EOF is the "null directive". */ - else - { - /* An unknown directive. Don't complain about it in assembly - source: we don't know where the comments are, and # may - introduce assembler pseudo-ops. Don't complain about invalid - directives in skipped conditional groups (6.10 p4). */ - if (CPP_OPTION (pfile, lang) == CLK_ASM) - skip = 0; - else if (!pfile->state.skipping) - cpp_error (pfile, CPP_DL_ERROR, "invalid preprocessing directive #%s", - cpp_token_as_text (pfile, dname)); - } - - pfile->directive = dir; - if (CPP_OPTION (pfile, traditional)) - prepare_directive_trad (pfile); - - if (dir) - pfile->directive->handler (pfile); - else if (skip == 0) - _cpp_backup_tokens (pfile, 1); - - end_directive (pfile, skip); - if (was_parsing_args) - { - /* Restore state when within macro args. */ - pfile->state.parsing_args = 2; - pfile->state.prevent_expansion = 1; - } - return skip; -} - -/* Directive handler wrapper used by the command line option - processor. BUF is \n terminated. */ -static void -run_directive (cpp_reader *pfile, int dir_no, const char *buf, size_t count) -{ - cpp_push_buffer (pfile, (const uchar *) buf, count, - /* from_stage3 */ true); - /* Disgusting hack. */ - if (dir_no == T_PRAGMA) - pfile->buffer->file = pfile->buffer->prev->file; - start_directive (pfile); - - /* This is a short-term fix to prevent a leading '#' being - interpreted as a directive. */ - _cpp_clean_line (pfile); - - pfile->directive = &dtable[dir_no]; - if (CPP_OPTION (pfile, traditional)) - prepare_directive_trad (pfile); - pfile->directive->handler (pfile); - end_directive (pfile, 1); - if (dir_no == T_PRAGMA) - pfile->buffer->file = NULL; - _cpp_pop_buffer (pfile); -} - -/* Checks for validity the macro name in #define, #undef, #ifdef and - #ifndef directives. */ -static cpp_hashnode * -lex_macro_node (cpp_reader *pfile) -{ - const cpp_token *token = _cpp_lex_token (pfile); - - /* The token immediately after #define must be an identifier. That - identifier may not be "defined", per C99 6.10.8p4. - In C++, it may not be any of the "named operators" either, - per C++98 [lex.digraph], [lex.key]. - Finally, the identifier may not have been poisoned. (In that case - the lexer has issued the error message for us.) */ - - if (token->type == CPP_NAME) - { - cpp_hashnode *node = token->val.node; - - if (node == pfile->spec_nodes.n_defined) - cpp_error (pfile, CPP_DL_ERROR, - "\"defined\" cannot be used as a macro name"); - else if (! (node->flags & NODE_POISONED)) - return node; - } - else if (token->flags & NAMED_OP) - cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" cannot be used as a macro name as it is an operator in C++", - NODE_NAME (token->val.node)); - else if (token->type == CPP_EOF) - cpp_error (pfile, CPP_DL_ERROR, "no macro name given in #%s directive", - pfile->directive->name); - else - cpp_error (pfile, CPP_DL_ERROR, "macro names must be identifiers"); - - return NULL; -} - -/* Process a #define directive. Most work is done in cppmacro.c. */ -static void -do_define (cpp_reader *pfile) -{ - cpp_hashnode *node = lex_macro_node (pfile); - - if (node) - { - /* If we have been requested to expand comments into macros, - then re-enable saving of comments. */ - pfile->state.save_comments = - ! CPP_OPTION (pfile, discard_comments_in_macro_exp); - - if (_cpp_create_definition (pfile, node)) - if (pfile->cb.define) - pfile->cb.define (pfile, pfile->directive_line, node); - } -} - -/* Handle #undef. Mark the identifier NT_VOID in the hash table. */ -static void -do_undef (cpp_reader *pfile) -{ - cpp_hashnode *node = lex_macro_node (pfile); - - if (node) - { - if (pfile->cb.undef) - pfile->cb.undef (pfile, pfile->directive_line, node); - - /* 6.10.3.5 paragraph 2: [#undef] is ignored if the specified - identifier is not currently defined as a macro name. */ - if (node->type == NT_MACRO) - { - if (node->flags & NODE_WARN) - cpp_error (pfile, CPP_DL_WARNING, - "undefining \"%s\"", NODE_NAME (node)); - - if (CPP_OPTION (pfile, warn_unused_macros)) - _cpp_warn_if_unused_macro (pfile, node, NULL); - - _cpp_free_definition (node); - } - } - - check_eol (pfile); -} - -/* Undefine a single macro/assertion/whatever. */ - -static int -undefine_macros (cpp_reader *pfile, cpp_hashnode *h, - void *data_p ATTRIBUTE_UNUSED) -{ - switch (h->type) - { - case NT_VOID: - break; - - case NT_MACRO: - if (pfile->cb.undef) - (*pfile->cb.undef) (pfile, pfile->directive_line, h); - - if (CPP_OPTION (pfile, warn_unused_macros)) - _cpp_warn_if_unused_macro (pfile, h, NULL); - - /* And fall through.... */ - case NT_ASSERTION: - _cpp_free_definition (h); - break; - - default: - abort (); - } - h->flags &= ~NODE_POISONED; - return 1; -} - -/* Undefine all macros and assertions. */ - -void -cpp_undef_all (cpp_reader *pfile) -{ - cpp_forall_identifiers (pfile, undefine_macros, NULL); -} - - -/* Helper routine used by parse_include. Reinterpret the current line - as an h-char-sequence (< ... >); we are looking at the first token - after the <. Returns a malloced filename. */ -static char * -glue_header_name (cpp_reader *pfile) -{ - const cpp_token *token; - char *buffer; - size_t len, total_len = 0, capacity = 1024; - - /* To avoid lexed tokens overwriting our glued name, we can only - allocate from the string pool once we've lexed everything. */ - buffer = xmalloc (capacity); - for (;;) - { - token = get_token_no_padding (pfile); - - if (token->type == CPP_GREATER) - break; - if (token->type == CPP_EOF) - { - cpp_error (pfile, CPP_DL_ERROR, "missing terminating > character"); - break; - } - - len = cpp_token_len (token) + 2; /* Leading space, terminating \0. */ - if (total_len + len > capacity) - { - capacity = (capacity + len) * 2; - buffer = xrealloc (buffer, capacity); - } - - if (token->flags & PREV_WHITE) - buffer[total_len++] = ' '; - - total_len = (cpp_spell_token (pfile, token, (uchar *) &buffer[total_len]) - - (uchar *) buffer); - } - - buffer[total_len] = '\0'; - return buffer; -} - -/* Returns the file name of #include, #include_next, #import and - #pragma dependency. The string is malloced and the caller should - free it. Returns NULL on error. */ -static const char * -parse_include (cpp_reader *pfile, int *pangle_brackets) -{ - char *fname; - const cpp_token *header; - - /* Allow macro expansion. */ - header = get_token_no_padding (pfile); - if (header->type == CPP_STRING || header->type == CPP_HEADER_NAME) - { - fname = xmalloc (header->val.str.len - 1); - memcpy (fname, header->val.str.text + 1, header->val.str.len - 2); - fname[header->val.str.len - 2] = '\0'; - *pangle_brackets = header->type == CPP_HEADER_NAME; - } - else if (header->type == CPP_LESS) - { - fname = glue_header_name (pfile); - *pangle_brackets = 1; - } - else - { - const unsigned char *dir; - - if (pfile->directive == &dtable[T_PRAGMA]) - dir = U"pragma dependency"; - else - dir = pfile->directive->name; - cpp_error (pfile, CPP_DL_ERROR, "#%s expects \"FILENAME\" or ", - dir); - - return NULL; - } - - check_eol (pfile); - return fname; -} - -/* Handle #include, #include_next and #import. */ -static void -do_include_common (cpp_reader *pfile, enum include_type type) -{ - const char *fname; - int angle_brackets; - - fname = parse_include (pfile, &angle_brackets); - if (!fname) - return; - - if (!*fname) - { - cpp_error (pfile, CPP_DL_ERROR, "empty filename in #%s", - pfile->directive->name); - free ((void *) fname); - return; - } - - /* Prevent #include recursion. */ - if (pfile->line_maps.depth >= CPP_STACK_MAX) - cpp_error (pfile, CPP_DL_ERROR, "#include nested too deeply"); - else - { - /* Get out of macro context, if we are. */ - skip_rest_of_line (pfile); - - if (pfile->cb.include) - pfile->cb.include (pfile, pfile->directive_line, - pfile->directive->name, fname, angle_brackets); - - _cpp_stack_include (pfile, fname, angle_brackets, type); - } - - free ((void *) fname); -} - -static void -do_include (cpp_reader *pfile) -{ - do_include_common (pfile, IT_INCLUDE); -} - -static void -do_import (cpp_reader *pfile) -{ - do_include_common (pfile, IT_IMPORT); -} - -static void -do_include_next (cpp_reader *pfile) -{ - enum include_type type = IT_INCLUDE_NEXT; - - /* If this is the primary source file, warn and use the normal - search logic. */ - if (! pfile->buffer->prev) - { - cpp_error (pfile, CPP_DL_WARNING, - "#include_next in primary source file"); - type = IT_INCLUDE; - } - do_include_common (pfile, type); -} - -/* Subroutine of do_linemarker. Read possible flags after file name. - LAST is the last flag seen; 0 if this is the first flag. Return the - flag if it is valid, 0 at the end of the directive. Otherwise - complain. */ -static unsigned int -read_flag (cpp_reader *pfile, unsigned int last) -{ - const cpp_token *token = _cpp_lex_token (pfile); - - if (token->type == CPP_NUMBER && token->val.str.len == 1) - { - unsigned int flag = token->val.str.text[0] - '0'; - - if (flag > last && flag <= 4 - && (flag != 4 || last == 3) - && (flag != 2 || last == 0)) - return flag; - } - - if (token->type != CPP_EOF) - cpp_error (pfile, CPP_DL_ERROR, "invalid flag \"%s\" in line directive", - cpp_token_as_text (pfile, token)); - return 0; -} - -/* Subroutine of do_line and do_linemarker. Convert a number in STR, - of length LEN, to binary; store it in NUMP, and return 0 if the - number was well-formed, 1 if not. Temporary, hopefully. */ -static int -strtoul_for_line (const uchar *str, unsigned int len, long unsigned int *nump) -{ - unsigned long reg = 0; - uchar c; - while (len--) - { - c = *str++; - if (!ISDIGIT (c)) - return 1; - reg *= 10; - reg += c - '0'; - } - *nump = reg; - return 0; -} - -/* Interpret #line command. - Note that the filename string (if any) is a true string constant - (escapes are interpreted), unlike in #line. */ -static void -do_line (cpp_reader *pfile) -{ - const cpp_token *token; - const char *new_file = pfile->map->to_file; - unsigned long new_lineno; - - /* C99 raised the minimum limit on #line numbers. */ - unsigned int cap = CPP_OPTION (pfile, c99) ? 2147483647 : 32767; - - /* #line commands expand macros. */ - token = cpp_get_token (pfile); - if (token->type != CPP_NUMBER - || strtoul_for_line (token->val.str.text, token->val.str.len, - &new_lineno)) - { - cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" after #line is not a positive integer", - cpp_token_as_text (pfile, token)); - return; - } - - if (CPP_PEDANTIC (pfile) && (new_lineno == 0 || new_lineno > cap)) - cpp_error (pfile, CPP_DL_PEDWARN, "line number out of range"); - - token = cpp_get_token (pfile); - if (token->type == CPP_STRING) - { - cpp_string s = { 0, 0 }; - if (_cpp_interpret_string_notranslate (pfile, &token->val.str, &s)) - new_file = (const char *)s.text; - check_eol (pfile); - } - else if (token->type != CPP_EOF) - { - cpp_error (pfile, CPP_DL_ERROR, "\"%s\" is not a valid filename", - cpp_token_as_text (pfile, token)); - return; - } - - skip_rest_of_line (pfile); - _cpp_do_file_change (pfile, LC_RENAME, new_file, new_lineno, - pfile->map->sysp); -} - -/* Interpret the # 44 "file" [flags] notation, which has slightly - different syntax and semantics from #line: Flags are allowed, - and we never complain about the line number being too big. */ -static void -do_linemarker (cpp_reader *pfile) -{ - const cpp_token *token; - const char *new_file = pfile->map->to_file; - unsigned long new_lineno; - unsigned int new_sysp = pfile->map->sysp; - enum lc_reason reason = LC_RENAME; - int flag; - - /* Back up so we can get the number again. Putting this in - _cpp_handle_directive risks two calls to _cpp_backup_tokens in - some circumstances, which can segfault. */ - _cpp_backup_tokens (pfile, 1); - - /* #line commands expand macros. */ - token = cpp_get_token (pfile); - if (token->type != CPP_NUMBER - || strtoul_for_line (token->val.str.text, token->val.str.len, - &new_lineno)) - { - cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" after # is not a positive integer", - cpp_token_as_text (pfile, token)); - return; - } - - token = cpp_get_token (pfile); - if (token->type == CPP_STRING) - { - cpp_string s = { 0, 0 }; - if (_cpp_interpret_string_notranslate (pfile, &token->val.str, &s)) - new_file = (const char *)s.text; - - new_sysp = 0; - flag = read_flag (pfile, 0); - if (flag == 1) - { - reason = LC_ENTER; - /* Fake an include for cpp_included (). */ - _cpp_fake_include (pfile, new_file); - flag = read_flag (pfile, flag); - } - else if (flag == 2) - { - reason = LC_LEAVE; - flag = read_flag (pfile, flag); - } - if (flag == 3) - { - new_sysp = 1; - flag = read_flag (pfile, flag); - if (flag == 4) - new_sysp = 2; - } - - check_eol (pfile); - } - else if (token->type != CPP_EOF) - { - cpp_error (pfile, CPP_DL_ERROR, "\"%s\" is not a valid filename", - cpp_token_as_text (pfile, token)); - return; - } - - skip_rest_of_line (pfile); - _cpp_do_file_change (pfile, reason, new_file, new_lineno, new_sysp); -} - -/* Arrange the file_change callback. pfile->line has changed to - FILE_LINE of TO_FILE, for reason REASON. SYSP is 1 for a system - header, 2 for a system header that needs to be extern "C" protected, - and zero otherwise. */ -void -_cpp_do_file_change (cpp_reader *pfile, enum lc_reason reason, - const char *to_file, unsigned int file_line, - unsigned int sysp) -{ - pfile->map = linemap_add (&pfile->line_maps, reason, sysp, - pfile->line, to_file, file_line); - - if (pfile->cb.file_change) - pfile->cb.file_change (pfile, pfile->map); -} - -/* Report a warning or error detected by the program we are - processing. Use the directive's tokens in the error message. */ -static void -do_diagnostic (cpp_reader *pfile, int code, int print_dir) -{ - if (_cpp_begin_message (pfile, code, - pfile->cur_token[-1].line, - pfile->cur_token[-1].col)) - { - if (print_dir) - fprintf (stderr, "#%s ", pfile->directive->name); - pfile->state.prevent_expansion++; - cpp_output_line (pfile, stderr); - pfile->state.prevent_expansion--; - } -} - -static void -do_error (cpp_reader *pfile) -{ - do_diagnostic (pfile, CPP_DL_ERROR, 1); -} - -static void -do_warning (cpp_reader *pfile) -{ - /* We want #warning diagnostics to be emitted in system headers too. */ - do_diagnostic (pfile, CPP_DL_WARNING_SYSHDR, 1); -} - -/* Report program identification. */ -static void -do_ident (cpp_reader *pfile) -{ - const cpp_token *str = cpp_get_token (pfile); - - if (str->type != CPP_STRING) - cpp_error (pfile, CPP_DL_ERROR, "invalid #ident directive"); - else if (pfile->cb.ident) - pfile->cb.ident (pfile, pfile->directive_line, &str->val.str); - - check_eol (pfile); -} - -/* Lookup a PRAGMA name in a singly-linked CHAIN. Returns the - matching entry, or NULL if none is found. The returned entry could - be the start of a namespace chain, or a pragma. */ -static struct pragma_entry * -lookup_pragma_entry (struct pragma_entry *chain, const cpp_hashnode *pragma) -{ - while (chain && chain->pragma != pragma) - chain = chain->next; - - return chain; -} - -/* Create and insert a pragma entry for NAME at the beginning of a - singly-linked CHAIN. If handler is NULL, it is a namespace, - otherwise it is a pragma and its handler. */ -static struct pragma_entry * -insert_pragma_entry (cpp_reader *pfile, struct pragma_entry **chain, - const cpp_hashnode *pragma, pragma_cb handler) -{ - struct pragma_entry *new; - - new = (struct pragma_entry *) - _cpp_aligned_alloc (pfile, sizeof (struct pragma_entry)); - new->pragma = pragma; - if (handler) - { - new->is_nspace = 0; - new->u.handler = handler; - } - else - { - new->is_nspace = 1; - new->u.space = NULL; - } - - new->next = *chain; - *chain = new; - return new; -} - -/* Register a pragma NAME in namespace SPACE. If SPACE is null, it - goes in the global namespace. HANDLER is the handler it will call, - which must be non-NULL. */ -void -cpp_register_pragma (cpp_reader *pfile, const char *space, const char *name, - pragma_cb handler) -{ - struct pragma_entry **chain = &pfile->pragmas; - struct pragma_entry *entry; - const cpp_hashnode *node; - - if (!handler) - abort (); - - if (space) - { - node = cpp_lookup (pfile, U space, strlen (space)); - entry = lookup_pragma_entry (*chain, node); - if (!entry) - entry = insert_pragma_entry (pfile, chain, node, NULL); - else if (!entry->is_nspace) - goto clash; - chain = &entry->u.space; - } - - /* Check for duplicates. */ - node = cpp_lookup (pfile, U name, strlen (name)); - entry = lookup_pragma_entry (*chain, node); - if (entry) - { - if (entry->is_nspace) - clash: - cpp_error (pfile, CPP_DL_ICE, - "registering \"%s\" as both a pragma and a pragma namespace", - NODE_NAME (node)); - else if (space) - cpp_error (pfile, CPP_DL_ICE, "#pragma %s %s is already registered", - space, name); - else - cpp_error (pfile, CPP_DL_ICE, "#pragma %s is already registered", name); - } - else - insert_pragma_entry (pfile, chain, node, handler); -} - -/* Register the pragmas the preprocessor itself handles. */ -void -_cpp_init_internal_pragmas (cpp_reader *pfile) -{ - /* Pragmas in the global namespace. */ - cpp_register_pragma (pfile, 0, "once", do_pragma_once); - - /* New GCC-specific pragmas should be put in the GCC namespace. */ - cpp_register_pragma (pfile, "GCC", "poison", do_pragma_poison); - cpp_register_pragma (pfile, "GCC", "system_header", do_pragma_system_header); - cpp_register_pragma (pfile, "GCC", "dependency", do_pragma_dependency); -} - -/* Return the number of registered pragmas in PE. */ - -static int -count_registered_pragmas (struct pragma_entry *pe) -{ - int ct = 0; - for (; pe != NULL; pe = pe->next) - { - if (pe->is_nspace) - ct += count_registered_pragmas (pe->u.space); - ct++; - } - return ct; -} - -/* Save into SD the names of the registered pragmas referenced by PE, - and return a pointer to the next free space in SD. */ - -static char ** -save_registered_pragmas (struct pragma_entry *pe, char **sd) -{ - for (; pe != NULL; pe = pe->next) - { - if (pe->is_nspace) - sd = save_registered_pragmas (pe->u.space, sd); - *sd++ = xmemdup (HT_STR (&pe->pragma->ident), - HT_LEN (&pe->pragma->ident), - HT_LEN (&pe->pragma->ident) + 1); - } - return sd; -} - -/* Return a newly-allocated array which saves the names of the - registered pragmas. */ - -char ** -_cpp_save_pragma_names (cpp_reader *pfile) -{ - int ct = count_registered_pragmas (pfile->pragmas); - char **result = xnewvec (char *, ct); - (void) save_registered_pragmas (pfile->pragmas, result); - return result; -} - -/* Restore from SD the names of the registered pragmas referenced by PE, - and return a pointer to the next unused name in SD. */ - -static char ** -restore_registered_pragmas (cpp_reader *pfile, struct pragma_entry *pe, - char **sd) -{ - for (; pe != NULL; pe = pe->next) - { - if (pe->is_nspace) - sd = restore_registered_pragmas (pfile, pe->u.space, sd); - pe->pragma = cpp_lookup (pfile, U *sd, strlen (*sd)); - free (*sd); - sd++; - } - return sd; -} - -/* Restore the names of the registered pragmas from SAVED. */ - -void -_cpp_restore_pragma_names (cpp_reader *pfile, char **saved) -{ - (void) restore_registered_pragmas (pfile, pfile->pragmas, saved); - free (saved); -} - -/* Pragmata handling. We handle some, and pass the rest on to the - front end. C99 defines three pragmas and says that no macro - expansion is to be performed on them; whether or not macro - expansion happens for other pragmas is implementation defined. - This implementation never macro-expands the text after #pragma. */ -static void -do_pragma (cpp_reader *pfile) -{ - const struct pragma_entry *p = NULL; - const cpp_token *token, *pragma_token = pfile->cur_token; - unsigned int count = 1; - - pfile->state.prevent_expansion++; - - token = cpp_get_token (pfile); - if (token->type == CPP_NAME) - { - p = lookup_pragma_entry (pfile->pragmas, token->val.node); - if (p && p->is_nspace) - { - count = 2; - token = cpp_get_token (pfile); - if (token->type == CPP_NAME) - p = lookup_pragma_entry (p->u.space, token->val.node); - else - p = NULL; - } - } - - if (p) - { - /* Since the handler below doesn't get the line number, that it - might need for diagnostics, make sure it has the right - numbers in place. */ - if (pfile->cb.line_change) - (*pfile->cb.line_change) (pfile, pragma_token, false); - (*p->u.handler) (pfile); - } - else if (pfile->cb.def_pragma) - { - _cpp_backup_tokens (pfile, count); - pfile->cb.def_pragma (pfile, pfile->directive_line); - } - - pfile->state.prevent_expansion--; -} - -/* Handle #pragma once. */ -static void -do_pragma_once (cpp_reader *pfile) -{ - if (pfile->buffer->prev == NULL) - cpp_error (pfile, CPP_DL_WARNING, "#pragma once in main file"); - - check_eol (pfile); - _cpp_mark_file_once_only (pfile, pfile->buffer->file); -} - -/* Handle #pragma GCC poison, to poison one or more identifiers so - that the lexer produces a hard error for each subsequent usage. */ -static void -do_pragma_poison (cpp_reader *pfile) -{ - const cpp_token *tok; - cpp_hashnode *hp; - - pfile->state.poisoned_ok = 1; - for (;;) - { - tok = _cpp_lex_token (pfile); - if (tok->type == CPP_EOF) - break; - if (tok->type != CPP_NAME) - { - cpp_error (pfile, CPP_DL_ERROR, - "invalid #pragma GCC poison directive"); - break; - } - - hp = tok->val.node; - if (hp->flags & NODE_POISONED) - continue; - - if (hp->type == NT_MACRO) - cpp_error (pfile, CPP_DL_WARNING, "poisoning existing macro \"%s\"", - NODE_NAME (hp)); - _cpp_free_definition (hp); - hp->flags |= NODE_POISONED | NODE_DIAGNOSTIC; - } - pfile->state.poisoned_ok = 0; -} - -/* Mark the current header as a system header. This will suppress - some categories of warnings (notably those from -pedantic). It is - intended for use in system libraries that cannot be implemented in - conforming C, but cannot be certain that their headers appear in a - system include directory. To prevent abuse, it is rejected in the - primary source file. */ -static void -do_pragma_system_header (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->buffer; - - if (buffer->prev == 0) - cpp_error (pfile, CPP_DL_WARNING, - "#pragma system_header ignored outside include file"); - else - { - check_eol (pfile); - skip_rest_of_line (pfile); - cpp_make_system_header (pfile, 1, 0); - } -} - -/* Check the modified date of the current include file against a specified - file. Issue a diagnostic, if the specified file is newer. We use this to - determine if a fixed header should be refixed. */ -static void -do_pragma_dependency (cpp_reader *pfile) -{ - const char *fname; - int angle_brackets, ordering; - - fname = parse_include (pfile, &angle_brackets); - if (!fname) - return; - - ordering = _cpp_compare_file_date (pfile, fname, angle_brackets); - if (ordering < 0) - cpp_error (pfile, CPP_DL_WARNING, "cannot find source file %s", fname); - else if (ordering > 0) - { - cpp_error (pfile, CPP_DL_WARNING, - "current file is older than %s", fname); - if (cpp_get_token (pfile)->type != CPP_EOF) - { - _cpp_backup_tokens (pfile, 1); - do_diagnostic (pfile, CPP_DL_WARNING, 0); - } - } - - free ((void *) fname); -} - -/* Get a token but skip padding. */ -static const cpp_token * -get_token_no_padding (cpp_reader *pfile) -{ - for (;;) - { - const cpp_token *result = cpp_get_token (pfile); - if (result->type != CPP_PADDING) - return result; - } -} - -/* Check syntax is "(string-literal)". Returns the string on success, - or NULL on failure. */ -static const cpp_token * -get__Pragma_string (cpp_reader *pfile) -{ - const cpp_token *string; - - if (get_token_no_padding (pfile)->type != CPP_OPEN_PAREN) - return NULL; - - string = get_token_no_padding (pfile); - if (string->type != CPP_STRING && string->type != CPP_WSTRING) - return NULL; - - if (get_token_no_padding (pfile)->type != CPP_CLOSE_PAREN) - return NULL; - - return string; -} - -/* Destringize IN into a temporary buffer, by removing the first \ of - \" and \\ sequences, and process the result as a #pragma directive. */ -static void -destringize_and_run (cpp_reader *pfile, const cpp_string *in) -{ - const unsigned char *src, *limit; - char *dest, *result; - - dest = result = alloca (in->len - 1); - src = in->text + 1 + (in->text[0] == 'L'); - limit = in->text + in->len - 1; - while (src < limit) - { - /* We know there is a character following the backslash. */ - if (*src == '\\' && (src[1] == '\\' || src[1] == '"')) - src++; - *dest++ = *src++; - } - *dest = '\n'; - - /* Ugh; an awful kludge. We are really not set up to be lexing - tokens when in the middle of a macro expansion. Use a new - context to force cpp_get_token to lex, and so skip_rest_of_line - doesn't go beyond the end of the text. Also, remember the - current lexing position so we can return to it later. - - Something like line-at-a-time lexing should remove the need for - this. */ - { - cpp_context *saved_context = pfile->context; - cpp_token *saved_cur_token = pfile->cur_token; - tokenrun *saved_cur_run = pfile->cur_run; - - pfile->context = xnew (cpp_context); - pfile->context->macro = 0; - pfile->context->prev = 0; - run_directive (pfile, T_PRAGMA, result, dest - result); - free (pfile->context); - pfile->context = saved_context; - pfile->cur_token = saved_cur_token; - pfile->cur_run = saved_cur_run; - pfile->line--; - } - - /* See above comment. For the moment, we'd like - - token1 _Pragma ("foo") token2 - - to be output as - - token1 - # 7 "file.c" - #pragma foo - # 7 "file.c" - token2 - - Getting the line markers is a little tricky. */ - if (pfile->cb.line_change) - pfile->cb.line_change (pfile, pfile->cur_token, false); -} - -/* Handle the _Pragma operator. */ -void -_cpp_do__Pragma (cpp_reader *pfile) -{ - const cpp_token *string = get__Pragma_string (pfile); - - if (string) - destringize_and_run (pfile, &string->val.str); - else - cpp_error (pfile, CPP_DL_ERROR, - "_Pragma takes a parenthesized string literal"); -} - -/* Ignore #sccs on all systems. */ -static void -do_sccs (cpp_reader *pfile ATTRIBUTE_UNUSED) -{ -} - -/* Handle #ifdef. */ -static void -do_ifdef (cpp_reader *pfile) -{ - int skip = 1; - - if (! pfile->state.skipping) - { - const cpp_hashnode *node = lex_macro_node (pfile); - - if (node) - { - skip = node->type != NT_MACRO; - _cpp_mark_macro_used (node); - check_eol (pfile); - } - } - - push_conditional (pfile, skip, T_IFDEF, 0); -} - -/* Handle #ifndef. */ -static void -do_ifndef (cpp_reader *pfile) -{ - int skip = 1; - const cpp_hashnode *node = 0; - - if (! pfile->state.skipping) - { - node = lex_macro_node (pfile); - - if (node) - { - skip = node->type == NT_MACRO; - _cpp_mark_macro_used (node); - check_eol (pfile); - } - } - - push_conditional (pfile, skip, T_IFNDEF, node); -} - -/* _cpp_parse_expr puts a macro in a "#if !defined ()" expression in - pfile->mi_ind_cmacro so we can handle multiple-include - optimizations. If macro expansion occurs in the expression, we - cannot treat it as a controlling conditional, since the expansion - could change in the future. That is handled by cpp_get_token. */ -static void -do_if (cpp_reader *pfile) -{ - int skip = 1; - - if (! pfile->state.skipping) - skip = _cpp_parse_expr (pfile) == false; - - push_conditional (pfile, skip, T_IF, pfile->mi_ind_cmacro); -} - -/* Flip skipping state if appropriate and continue without changing - if_stack; this is so that the error message for missing #endif's - etc. will point to the original #if. */ -static void -do_else (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->buffer; - struct if_stack *ifs = buffer->if_stack; - - if (ifs == NULL) - cpp_error (pfile, CPP_DL_ERROR, "#else without #if"); - else - { - if (ifs->type == T_ELSE) - { - cpp_error (pfile, CPP_DL_ERROR, "#else after #else"); - cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, - "the conditional began here"); - } - ifs->type = T_ELSE; - - /* Skip any future (erroneous) #elses or #elifs. */ - pfile->state.skipping = ifs->skip_elses; - ifs->skip_elses = true; - - /* Invalidate any controlling macro. */ - ifs->mi_cmacro = 0; - - /* Only check EOL if was not originally skipping. */ - if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels)) - check_eol (pfile); - } -} - -/* Handle a #elif directive by not changing if_stack either. See the - comment above do_else. */ -static void -do_elif (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->buffer; - struct if_stack *ifs = buffer->if_stack; - - if (ifs == NULL) - cpp_error (pfile, CPP_DL_ERROR, "#elif without #if"); - else - { - if (ifs->type == T_ELSE) - { - cpp_error (pfile, CPP_DL_ERROR, "#elif after #else"); - cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, - "the conditional began here"); - } - ifs->type = T_ELIF; - - /* Only evaluate this if we aren't skipping elses. During - evaluation, set skipping to false to get lexer warnings. */ - if (ifs->skip_elses) - pfile->state.skipping = 1; - else - { - pfile->state.skipping = 0; - pfile->state.skipping = ! _cpp_parse_expr (pfile); - ifs->skip_elses = ! pfile->state.skipping; - } - - /* Invalidate any controlling macro. */ - ifs->mi_cmacro = 0; - } -} - -/* #endif pops the if stack and resets pfile->state.skipping. */ -static void -do_endif (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->buffer; - struct if_stack *ifs = buffer->if_stack; - - if (ifs == NULL) - cpp_error (pfile, CPP_DL_ERROR, "#endif without #if"); - else - { - /* Only check EOL if was not originally skipping. */ - if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels)) - check_eol (pfile); - - /* If potential control macro, we go back outside again. */ - if (ifs->next == 0 && ifs->mi_cmacro) - { - pfile->mi_valid = true; - pfile->mi_cmacro = ifs->mi_cmacro; - } - - buffer->if_stack = ifs->next; - pfile->state.skipping = ifs->was_skipping; - obstack_free (&pfile->buffer_ob, ifs); - } -} - -/* Push an if_stack entry for a preprocessor conditional, and set - pfile->state.skipping to SKIP. If TYPE indicates the conditional - is #if or #ifndef, CMACRO is a potentially controlling macro, and - we need to check here that we are at the top of the file. */ -static void -push_conditional (cpp_reader *pfile, int skip, int type, - const cpp_hashnode *cmacro) -{ - struct if_stack *ifs; - cpp_buffer *buffer = pfile->buffer; - - ifs = xobnew (&pfile->buffer_ob, struct if_stack); - ifs->line = pfile->directive_line; - ifs->next = buffer->if_stack; - ifs->skip_elses = pfile->state.skipping || !skip; - ifs->was_skipping = pfile->state.skipping; - ifs->type = type; - /* This condition is effectively a test for top-of-file. */ - if (pfile->mi_valid && pfile->mi_cmacro == 0) - ifs->mi_cmacro = cmacro; - else - ifs->mi_cmacro = 0; - - pfile->state.skipping = skip; - buffer->if_stack = ifs; -} - -/* Read the tokens of the answer into the macro pool, in a directive - of type TYPE. Only commit the memory if we intend it as permanent - storage, i.e. the #assert case. Returns 0 on success, and sets - ANSWERP to point to the answer. */ -static int -parse_answer (cpp_reader *pfile, struct answer **answerp, int type) -{ - const cpp_token *paren; - struct answer *answer; - unsigned int acount; - - /* In a conditional, it is legal to not have an open paren. We - should save the following token in this case. */ - paren = cpp_get_token (pfile); - - /* If not a paren, see if we're OK. */ - if (paren->type != CPP_OPEN_PAREN) - { - /* In a conditional no answer is a test for any answer. It - could be followed by any token. */ - if (type == T_IF) - { - _cpp_backup_tokens (pfile, 1); - return 0; - } - - /* #unassert with no answer is valid - it removes all answers. */ - if (type == T_UNASSERT && paren->type == CPP_EOF) - return 0; - - cpp_error (pfile, CPP_DL_ERROR, "missing '(' after predicate"); - return 1; - } - - for (acount = 0;; acount++) - { - size_t room_needed; - const cpp_token *token = cpp_get_token (pfile); - cpp_token *dest; - - if (token->type == CPP_CLOSE_PAREN) - break; - - if (token->type == CPP_EOF) - { - cpp_error (pfile, CPP_DL_ERROR, "missing ')' to complete answer"); - return 1; - } - - /* struct answer includes the space for one token. */ - room_needed = (sizeof (struct answer) + acount * sizeof (cpp_token)); - - if (BUFF_ROOM (pfile->a_buff) < room_needed) - _cpp_extend_buff (pfile, &pfile->a_buff, sizeof (struct answer)); - - dest = &((struct answer *) BUFF_FRONT (pfile->a_buff))->first[acount]; - *dest = *token; - - /* Drop whitespace at start, for answer equivalence purposes. */ - if (acount == 0) - dest->flags &= ~PREV_WHITE; - } - - if (acount == 0) - { - cpp_error (pfile, CPP_DL_ERROR, "predicate's answer is empty"); - return 1; - } - - answer = (struct answer *) BUFF_FRONT (pfile->a_buff); - answer->count = acount; - answer->next = NULL; - *answerp = answer; - - return 0; -} - -/* Parses an assertion directive of type TYPE, returning a pointer to - the hash node of the predicate, or 0 on error. If an answer was - supplied, it is placed in ANSWERP, otherwise it is set to 0. */ -static cpp_hashnode * -parse_assertion (cpp_reader *pfile, struct answer **answerp, int type) -{ - cpp_hashnode *result = 0; - const cpp_token *predicate; - - /* We don't expand predicates or answers. */ - pfile->state.prevent_expansion++; - - *answerp = 0; - predicate = cpp_get_token (pfile); - if (predicate->type == CPP_EOF) - cpp_error (pfile, CPP_DL_ERROR, "assertion without predicate"); - else if (predicate->type != CPP_NAME) - cpp_error (pfile, CPP_DL_ERROR, "predicate must be an identifier"); - else if (parse_answer (pfile, answerp, type) == 0) - { - unsigned int len = NODE_LEN (predicate->val.node); - unsigned char *sym = alloca (len + 1); - - /* Prefix '#' to get it out of macro namespace. */ - sym[0] = '#'; - memcpy (sym + 1, NODE_NAME (predicate->val.node), len); - result = cpp_lookup (pfile, sym, len + 1); - } - - pfile->state.prevent_expansion--; - return result; -} - -/* Returns a pointer to the pointer to CANDIDATE in the answer chain, - or a pointer to NULL if the answer is not in the chain. */ -static struct answer ** -find_answer (cpp_hashnode *node, const struct answer *candidate) -{ - unsigned int i; - struct answer **result; - - for (result = &node->value.answers; *result; result = &(*result)->next) - { - struct answer *answer = *result; - - if (answer->count == candidate->count) - { - for (i = 0; i < answer->count; i++) - if (! _cpp_equiv_tokens (&answer->first[i], &candidate->first[i])) - break; - - if (i == answer->count) - break; - } - } - - return result; -} - -/* Test an assertion within a preprocessor conditional. Returns - nonzero on failure, zero on success. On success, the result of - the test is written into VALUE, otherwise the value 0. */ -int -_cpp_test_assertion (cpp_reader *pfile, unsigned int *value) -{ - struct answer *answer; - cpp_hashnode *node; - - node = parse_assertion (pfile, &answer, T_IF); - - /* For recovery, an erroneous assertion expression is handled as a - failing assertion. */ - *value = 0; - - if (node) - *value = (node->type == NT_ASSERTION && - (answer == 0 || *find_answer (node, answer) != 0)); - else if (pfile->cur_token[-1].type == CPP_EOF) - _cpp_backup_tokens (pfile, 1); - - /* We don't commit the memory for the answer - it's temporary only. */ - return node == 0; -} - -/* Handle #assert. */ -static void -do_assert (cpp_reader *pfile) -{ - struct answer *new_answer; - cpp_hashnode *node; - - node = parse_assertion (pfile, &new_answer, T_ASSERT); - if (node) - { - /* Place the new answer in the answer list. First check there - is not a duplicate. */ - new_answer->next = 0; - if (node->type == NT_ASSERTION) - { - if (*find_answer (node, new_answer)) - { - cpp_error (pfile, CPP_DL_WARNING, "\"%s\" re-asserted", - NODE_NAME (node) + 1); - return; - } - new_answer->next = node->value.answers; - } - - node->type = NT_ASSERTION; - node->value.answers = new_answer; - BUFF_FRONT (pfile->a_buff) += (sizeof (struct answer) - + (new_answer->count - 1) - * sizeof (cpp_token)); - check_eol (pfile); - } -} - -/* Handle #unassert. */ -static void -do_unassert (cpp_reader *pfile) -{ - cpp_hashnode *node; - struct answer *answer; - - node = parse_assertion (pfile, &answer, T_UNASSERT); - /* It isn't an error to #unassert something that isn't asserted. */ - if (node && node->type == NT_ASSERTION) - { - if (answer) - { - struct answer **p = find_answer (node, answer), *temp; - - /* Remove the answer from the list. */ - temp = *p; - if (temp) - *p = temp->next; - - /* Did we free the last answer? */ - if (node->value.answers == 0) - node->type = NT_VOID; - - check_eol (pfile); - } - else - _cpp_free_definition (node); - } - - /* We don't commit the memory for the answer - it's temporary only. */ -} - -/* These are for -D, -U, -A. */ - -/* Process the string STR as if it appeared as the body of a #define. - If STR is just an identifier, define it with value 1. - If STR has anything after the identifier, then it should - be identifier=definition. */ -void -cpp_define (cpp_reader *pfile, const char *str) -{ - char *buf, *p; - size_t count; - - /* Copy the entire option so we can modify it. - Change the first "=" in the string to a space. If there is none, - tack " 1" on the end. */ - - count = strlen (str); - buf = alloca (count + 3); - memcpy (buf, str, count); - - p = strchr (str, '='); - if (p) - buf[p - str] = ' '; - else - { - buf[count++] = ' '; - buf[count++] = '1'; - } - buf[count] = '\n'; - - run_directive (pfile, T_DEFINE, buf, count); -} - -/* Slight variant of the above for use by initialize_builtins. */ -void -_cpp_define_builtin (cpp_reader *pfile, const char *str) -{ - size_t len = strlen (str); - char *buf = alloca (len + 1); - memcpy (buf, str, len); - buf[len] = '\n'; - run_directive (pfile, T_DEFINE, buf, len); -} - -/* Process MACRO as if it appeared as the body of an #undef. */ -void -cpp_undef (cpp_reader *pfile, const char *macro) -{ - size_t len = strlen (macro); - char *buf = alloca (len + 1); - memcpy (buf, macro, len); - buf[len] = '\n'; - run_directive (pfile, T_UNDEF, buf, len); -} - -/* Process the string STR as if it appeared as the body of a #assert. */ -void -cpp_assert (cpp_reader *pfile, const char *str) -{ - handle_assertion (pfile, str, T_ASSERT); -} - -/* Process STR as if it appeared as the body of an #unassert. */ -void -cpp_unassert (cpp_reader *pfile, const char *str) -{ - handle_assertion (pfile, str, T_UNASSERT); -} - -/* Common code for cpp_assert (-A) and cpp_unassert (-A-). */ -static void -handle_assertion (cpp_reader *pfile, const char *str, int type) -{ - size_t count = strlen (str); - const char *p = strchr (str, '='); - - /* Copy the entire option so we can modify it. Change the first - "=" in the string to a '(', and tack a ')' on the end. */ - char *buf = alloca (count + 2); - - memcpy (buf, str, count); - if (p) - { - buf[p - str] = '('; - buf[count++] = ')'; - } - buf[count] = '\n'; - str = buf; - - run_directive (pfile, type, str, count); -} - -/* The number of errors for a given reader. */ -unsigned int -cpp_errors (cpp_reader *pfile) -{ - return pfile->errors; -} - -/* The options structure. */ -cpp_options * -cpp_get_options (cpp_reader *pfile) -{ - return &pfile->opts; -} - -/* The callbacks structure. */ -cpp_callbacks * -cpp_get_callbacks (cpp_reader *pfile) -{ - return &pfile->cb; -} - -/* The line map set. */ -struct line_maps * -cpp_get_line_maps (cpp_reader *pfile) -{ - return &pfile->line_maps; -} - -/* Copy the given callbacks structure to our own. */ -void -cpp_set_callbacks (cpp_reader *pfile, cpp_callbacks *cb) -{ - pfile->cb = *cb; -} - -/* Push a new buffer on the buffer stack. Returns the new buffer; it - doesn't fail. It does not generate a file change call back; that - is the responsibility of the caller. */ -cpp_buffer * -cpp_push_buffer (cpp_reader *pfile, const uchar *buffer, size_t len, - int from_stage3) -{ - cpp_buffer *new = xobnew (&pfile->buffer_ob, cpp_buffer); - - /* Clears, amongst other things, if_stack and mi_cmacro. */ - memset (new, 0, sizeof (cpp_buffer)); - - new->next_line = new->buf = buffer; - new->rlimit = buffer + len; - new->from_stage3 = from_stage3; - new->prev = pfile->buffer; - new->need_line = true; - - pfile->buffer = new; - return new; -} - -/* Pops a single buffer, with a file change call-back if appropriate. - Then pushes the next -include file, if any remain. */ -void -_cpp_pop_buffer (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->buffer; - struct _cpp_file *inc = buffer->file; - struct if_stack *ifs; - - /* Walk back up the conditional stack till we reach its level at - entry to this file, issuing error messages. */ - for (ifs = buffer->if_stack; ifs; ifs = ifs->next) - cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, - "unterminated #%s", dtable[ifs->type].name); - - /* In case of a missing #endif. */ - pfile->state.skipping = 0; - - /* _cpp_do_file_change expects pfile->buffer to be the new one. */ - pfile->buffer = buffer->prev; - - free (buffer->notes); - - /* Free the buffer object now; we may want to push a new buffer - in _cpp_push_next_include_file. */ - obstack_free (&pfile->buffer_ob, buffer); - - if (inc) - { - _cpp_pop_file_buffer (pfile, inc); - - _cpp_do_file_change (pfile, LC_LEAVE, 0, 0, 0); - } -} - -/* Enter all recognized directives in the hash table. */ -void -_cpp_init_directives (cpp_reader *pfile) -{ - unsigned int i; - cpp_hashnode *node; - - for (i = 0; i < (unsigned int) N_DIRECTIVES; i++) - { - node = cpp_lookup (pfile, dtable[i].name, dtable[i].length); - node->is_directive = 1; - node->directive_index = i; - } -} diff --git a/contrib/gcc/cpplib.h b/contrib/gcc/cpplib.h deleted file mode 100644 index 3ea4b6b..0000000 --- a/contrib/gcc/cpplib.h +++ /dev/null @@ -1,739 +0,0 @@ -/* Definitions for CPP library. - Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. - Written by Per Bothner, 1994-95. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - In other words, you are welcome to use, share and improve this program. - You are forbidden to forbid anyone else to use, share and improve - what you give them. Help stamp out software-hoarding! */ -#ifndef GCC_CPPLIB_H -#define GCC_CPPLIB_H - -#include -#include "hashtable.h" -#include "line-map.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct cpp_reader cpp_reader; -typedef struct cpp_buffer cpp_buffer; -typedef struct cpp_options cpp_options; -typedef struct cpp_token cpp_token; -typedef struct cpp_string cpp_string; -typedef struct cpp_hashnode cpp_hashnode; -typedef struct cpp_macro cpp_macro; -typedef struct cpp_callbacks cpp_callbacks; -typedef struct cpp_dir cpp_dir; - -struct answer; - -/* The first three groups, apart from '=', can appear in preprocessor - expressions (+= and -= are used to indicate unary + and - resp.). - This allows a lookup table to be implemented in _cpp_parse_expr. - - The first group, to CPP_LAST_EQ, can be immediately followed by an - '='. The lexer needs operators ending in '=', like ">>=", to be in - the same order as their counterparts without the '=', like ">>". */ - -/* Positions in the table. */ -#define CPP_LAST_EQ CPP_MAX -#define CPP_FIRST_DIGRAPH CPP_HASH -#define CPP_LAST_PUNCTUATOR CPP_DOT_STAR -#define CPP_LAST_CPP_OP CPP_LESS_EQ - -#define TTYPE_TABLE \ - OP(CPP_EQ = 0, "=") \ - OP(CPP_NOT, "!") \ - OP(CPP_GREATER, ">") /* compare */ \ - OP(CPP_LESS, "<") \ - OP(CPP_PLUS, "+") /* math */ \ - OP(CPP_MINUS, "-") \ - OP(CPP_MULT, "*") \ - OP(CPP_DIV, "/") \ - OP(CPP_MOD, "%") \ - OP(CPP_AND, "&") /* bit ops */ \ - OP(CPP_OR, "|") \ - OP(CPP_XOR, "^") \ - OP(CPP_RSHIFT, ">>") \ - OP(CPP_LSHIFT, "<<") \ - OP(CPP_MIN, "?") \ -\ - OP(CPP_COMPL, "~") \ - OP(CPP_AND_AND, "&&") /* logical */ \ - OP(CPP_OR_OR, "||") \ - OP(CPP_QUERY, "?") \ - OP(CPP_COLON, ":") \ - OP(CPP_COMMA, ",") /* grouping */ \ - OP(CPP_OPEN_PAREN, "(") \ - OP(CPP_CLOSE_PAREN, ")") \ - TK(CPP_EOF, SPELL_NONE) \ - OP(CPP_EQ_EQ, "==") /* compare */ \ - OP(CPP_NOT_EQ, "!=") \ - OP(CPP_GREATER_EQ, ">=") \ - OP(CPP_LESS_EQ, "<=") \ -\ - /* These two are unary + / - in preprocessor expressions. */ \ - OP(CPP_PLUS_EQ, "+=") /* math */ \ - OP(CPP_MINUS_EQ, "-=") \ -\ - OP(CPP_MULT_EQ, "*=") \ - OP(CPP_DIV_EQ, "/=") \ - OP(CPP_MOD_EQ, "%=") \ - OP(CPP_AND_EQ, "&=") /* bit ops */ \ - OP(CPP_OR_EQ, "|=") \ - OP(CPP_XOR_EQ, "^=") \ - OP(CPP_RSHIFT_EQ, ">>=") \ - OP(CPP_LSHIFT_EQ, "<<=") \ - OP(CPP_MIN_EQ, "?=") \ - /* Digraphs together, beginning with CPP_FIRST_DIGRAPH. */ \ - OP(CPP_HASH, "#") /* digraphs */ \ - OP(CPP_PASTE, "##") \ - OP(CPP_OPEN_SQUARE, "[") \ - OP(CPP_CLOSE_SQUARE, "]") \ - OP(CPP_OPEN_BRACE, "{") \ - OP(CPP_CLOSE_BRACE, "}") \ - /* The remainder of the punctuation. Order is not significant. */ \ - OP(CPP_SEMICOLON, ";") /* structure */ \ - OP(CPP_ELLIPSIS, "...") \ - OP(CPP_PLUS_PLUS, "++") /* increment */ \ - OP(CPP_MINUS_MINUS, "--") \ - OP(CPP_DEREF, "->") /* accessors */ \ - OP(CPP_DOT, ".") \ - OP(CPP_SCOPE, "::") \ - OP(CPP_DEREF_STAR, "->*") \ - OP(CPP_DOT_STAR, ".*") \ - OP(CPP_ATSIGN, "@") /* used in Objective-C */ \ -\ - TK(CPP_NAME, SPELL_IDENT) /* word */ \ - TK(CPP_AT_NAME, SPELL_IDENT) /* @word - Objective-C */ \ - TK(CPP_NUMBER, SPELL_LITERAL) /* 34_be+ta */ \ -\ - TK(CPP_CHAR, SPELL_LITERAL) /* 'char' */ \ - TK(CPP_WCHAR, SPELL_LITERAL) /* L'char' */ \ - TK(CPP_OTHER, SPELL_LITERAL) /* stray punctuation */ \ -\ - TK(CPP_STRING, SPELL_LITERAL) /* "string" */ \ - TK(CPP_WSTRING, SPELL_LITERAL) /* L"string" */ \ - TK(CPP_OBJC_STRING, SPELL_LITERAL) /* @"string" - Objective-C */ \ - TK(CPP_HEADER_NAME, SPELL_LITERAL) /* in #include */ \ -\ - TK(CPP_COMMENT, SPELL_LITERAL) /* Only if output comments. */ \ - /* SPELL_LITERAL happens to DTRT. */ \ - TK(CPP_MACRO_ARG, SPELL_NONE) /* Macro argument. */ \ - TK(CPP_PADDING, SPELL_NONE) /* Whitespace for cpp0. */ - -#define OP(e, s) e, -#define TK(e, s) e, -enum cpp_ttype -{ - TTYPE_TABLE - N_TTYPES -}; -#undef OP -#undef TK - -/* C language kind, used when calling cpp_reader_init. */ -enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_STDC89, CLK_STDC94, CLK_STDC99, - CLK_GNUCXX, CLK_CXX98, CLK_ASM}; - -/* Payload of a NUMBER, STRING, CHAR or COMMENT token. */ -struct cpp_string -{ - unsigned int len; - const unsigned char *text; -}; - -/* Flags for the cpp_token structure. */ -#define PREV_WHITE (1 << 0) /* If whitespace before this token. */ -#define DIGRAPH (1 << 1) /* If it was a digraph. */ -#define STRINGIFY_ARG (1 << 2) /* If macro argument to be stringified. */ -#define PASTE_LEFT (1 << 3) /* If on LHS of a ## operator. */ -#define NAMED_OP (1 << 4) /* C++ named operators. */ -#define NO_EXPAND (1 << 5) /* Do not macro-expand this token. */ -#define BOL (1 << 6) /* Token at beginning of line. */ - -/* A preprocessing token. This has been carefully packed and should - occupy 16 bytes on 32-bit hosts and 24 bytes on 64-bit hosts. */ -struct cpp_token -{ - fileline line; /* Logical line of first char of token. */ - unsigned short col; /* Column of first char of token. */ - ENUM_BITFIELD(cpp_ttype) type : CHAR_BIT; /* token type */ - unsigned char flags; /* flags - see above */ - - union - { - cpp_hashnode *node; /* An identifier. */ - const cpp_token *source; /* Inherit padding from this token. */ - struct cpp_string str; /* A string, or number. */ - unsigned int arg_no; /* Argument no. for a CPP_MACRO_ARG. */ - } val; -}; - -/* A type wide enough to hold any multibyte source character. - cpplib's character constant interpreter requires an unsigned type. - Also, a typedef for the signed equivalent. - The width of this type is capped at 32 bits; there do exist targets - where wchar_t is 64 bits, but only in a non-default mode, and there - would be no meaningful interpretation for a wchar_t value greater - than 2^32 anyway -- the widest wide-character encoding around is - ISO 10646, which stops at 2^31. */ -#if CHAR_BIT * SIZEOF_INT >= 32 -# define CPPCHAR_SIGNED_T int -#elif CHAR_BIT * SIZEOF_LONG >= 32 -# define CPPCHAR_SIGNED_T long -#else -# error "Cannot find a least-32-bit signed integer type" -#endif -typedef unsigned CPPCHAR_SIGNED_T cppchar_t; -typedef CPPCHAR_SIGNED_T cppchar_signed_t; - -/* This structure is nested inside struct cpp_reader, and - carries all the options visible to the command line. */ -struct cpp_options -{ - /* Characters between tab stops. */ - unsigned int tabstop; - - /* The language we're preprocessing. */ - enum c_lang lang; - - /* Nonzero means use extra default include directories for C++. */ - unsigned char cplusplus; - - /* Nonzero means handle cplusplus style comments. */ - unsigned char cplusplus_comments; - - /* Nonzero means define __OBJC__, treat @ as a special token, and - use the OBJC[PLUS]_INCLUDE_PATH environment variable. */ - unsigned char objc; - - /* Nonzero means don't copy comments into the output file. */ - unsigned char discard_comments; - - /* Nonzero means don't copy comments into the output file during - macro expansion. */ - unsigned char discard_comments_in_macro_exp; - - /* Nonzero means process the ISO trigraph sequences. */ - unsigned char trigraphs; - - /* Nonzero means process the ISO digraph sequences. */ - unsigned char digraphs; - - /* Nonzero means to allow hexadecimal floats and LL suffixes. */ - unsigned char extended_numbers; - - /* Nonzero means print names of header files (-H). */ - unsigned char print_include_names; - - /* Nonzero means cpp_pedwarn causes a hard error. */ - unsigned char pedantic_errors; - - /* Nonzero means don't print warning messages. */ - unsigned char inhibit_warnings; - - /* Nonzero means complain about deprecated features. */ - unsigned char warn_deprecated; - - /* Nonzero means don't suppress warnings from system headers. */ - unsigned char warn_system_headers; - - /* Nonzero means don't print error messages. Has no option to - select it, but can be set by a user of cpplib (e.g. fix-header). */ - unsigned char inhibit_errors; - - /* Nonzero means warn if slash-star appears in a comment. */ - unsigned char warn_comments; - - /* Nonzero means warn if there are any trigraphs. */ - unsigned char warn_trigraphs; - - /* Nonzero means warn about multicharacter charconsts. */ - unsigned char warn_multichar; - - /* Nonzero means warn about various incompatibilities with - traditional C. */ - unsigned char warn_traditional; - - /* Nonzero means warn about long long numeric constants. */ - unsigned char warn_long_long; - - /* Nonzero means warn about text after an #endif (or #else). */ - unsigned char warn_endif_labels; - - /* Nonzero means warn about implicit sign changes owing to integer - promotions. */ - unsigned char warn_num_sign_change; - - /* Nonzero means turn warnings into errors. */ - unsigned char warnings_are_errors; - - /* Nonzero means we should look for header.gcc files that remap file - names. */ - unsigned char remap; - - /* Zero means dollar signs are punctuation. */ - unsigned char dollars_in_ident; - - /* True if we should warn about dollars in identifiers or numbers - for this translation unit. */ - unsigned char warn_dollars; - - /* Nonzero means warn if undefined identifiers are evaluated in an #if. */ - unsigned char warn_undef; - - /* Nonzero means warn of unused macros from the main file. */ - unsigned char warn_unused_macros; - - /* Nonzero for the 1999 C Standard, including corrigenda and amendments. */ - unsigned char c99; - - /* Nonzero if we are conforming to a specific C or C++ standard. */ - unsigned char std; - - /* Nonzero means give all the error messages the ANSI standard requires. */ - unsigned char pedantic; - - /* Nonzero means we're looking at already preprocessed code, so don't - bother trying to do macro expansion and whatnot. */ - unsigned char preprocessed; - - /* Print column number in error messages. */ - unsigned char show_column; - - /* Nonzero means handle C++ alternate operator names. */ - unsigned char operator_names; - - /* True for traditional preprocessing. */ - unsigned char traditional; - - /* Holds the name of the target (execution) character set. */ - const char *narrow_charset; - - /* Holds the name of the target wide character set. */ - const char *wide_charset; - - /* Holds the name of the input character set. */ - const char *input_charset; - - /* True to warn about precompiled header files we couldn't use. */ - bool warn_invalid_pch; - - /* True if dependencies should be restored from a precompiled header. */ - bool restore_pch_deps; - - /* Dependency generation. */ - struct - { - /* Style of header dependencies to generate. */ - enum {DEPS_NONE = 0, DEPS_USER, DEPS_SYSTEM } style; - - /* Assume missing files are generated files. */ - bool missing_files; - - /* Generate phony targets for each dependency apart from the first - one. */ - bool phony_targets; - - /* If true, no dependency is generated on the main file. */ - bool ignore_main_file; - } deps; - - /* Target-specific features set by the front end or client. */ - - /* Precision for target CPP arithmetic, target characters, target - ints and target wide characters, respectively. */ - size_t precision, char_precision, int_precision, wchar_precision; - - /* True means chars (wide chars) are unsigned. */ - bool unsigned_char, unsigned_wchar; - - /* True if the most significant byte in a word has the lowest - address in memory. */ - bool bytes_big_endian; - - /* Nonzero means __STDC__ should have the value 0 in system headers. */ - unsigned char stdc_0_in_system_headers; -}; - -/* Call backs to cpplib client. */ -struct cpp_callbacks -{ - /* Called when a new line of preprocessed output is started. */ - void (*line_change) (cpp_reader *, const cpp_token *, int); - - /* Called when switching to/from a new file. - The line_map is for the new file. It is NULL if there is no new file. - (In C this happens when done with + and also - when done with a main file.) This can be used for resource cleanup. */ - void (*file_change) (cpp_reader *, const struct line_map *); - - void (*dir_change) (cpp_reader *, const char *); - void (*include) (cpp_reader *, unsigned int, const unsigned char *, - const char *, int); - void (*define) (cpp_reader *, unsigned int, cpp_hashnode *); - void (*undef) (cpp_reader *, unsigned int, cpp_hashnode *); - void (*ident) (cpp_reader *, unsigned int, const cpp_string *); - void (*def_pragma) (cpp_reader *, unsigned int); - int (*valid_pch) (cpp_reader *, const char *, int); - void (*read_pch) (cpp_reader *, const char *, int, const char *); -}; - -/* Chain of directories to look for include files in. */ -struct cpp_dir -{ - /* NULL-terminated singly-linked list. */ - struct cpp_dir *next; - - /* NAME of the directory, NUL-terminated. */ - char *name; - unsigned int len; - - /* One if a system header, two if a system header that has extern - "C" guards for C++. */ - unsigned char sysp; - - /* Mapping of file names for this directory for MS-DOS and related - platforms. A NULL-terminated array of (from, to) pairs. */ - const char **name_map; - - /* The C front end uses these to recognize duplicated - directories in the search path. */ - ino_t ino; - dev_t dev; -}; - -/* Name under which this program was invoked. */ -extern const char *progname; - -/* The structure of a node in the hash table. The hash table has - entries for all identifiers: either macros defined by #define - commands (type NT_MACRO), assertions created with #assert - (NT_ASSERTION), or neither of the above (NT_VOID). Builtin macros - like __LINE__ are flagged NODE_BUILTIN. Poisoned identifiers are - flagged NODE_POISONED. NODE_OPERATOR (C++ only) indicates an - identifier that behaves like an operator such as "xor". - NODE_DIAGNOSTIC is for speed in lex_token: it indicates a - diagnostic may be required for this node. Currently this only - applies to __VA_ARGS__ and poisoned identifiers. */ - -/* Hash node flags. */ -#define NODE_OPERATOR (1 << 0) /* C++ named operator. */ -#define NODE_POISONED (1 << 1) /* Poisoned identifier. */ -#define NODE_BUILTIN (1 << 2) /* Builtin macro. */ -#define NODE_DIAGNOSTIC (1 << 3) /* Possible diagnostic when lexed. */ -#define NODE_WARN (1 << 4) /* Warn if redefined or undefined. */ -#define NODE_DISABLED (1 << 5) /* A disabled macro. */ -#define NODE_MACRO_ARG (1 << 6) /* Used during #define processing. */ - -/* Different flavors of hash node. */ -enum node_type -{ - NT_VOID = 0, /* No definition yet. */ - NT_MACRO, /* A macro of some form. */ - NT_ASSERTION /* Predicate for #assert. */ -}; - -/* Different flavors of builtin macro. _Pragma is an operator, but we - handle it with the builtin code for efficiency reasons. */ -enum builtin_type -{ - BT_SPECLINE = 0, /* `__LINE__' */ - BT_DATE, /* `__DATE__' */ - BT_FILE, /* `__FILE__' */ - BT_BASE_FILE, /* `__BASE_FILE__' */ - BT_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */ - BT_TIME, /* `__TIME__' */ - BT_STDC, /* `__STDC__' */ - BT_PRAGMA /* `_Pragma' operator */ -}; - -#define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE)) -#define HT_NODE(NODE) ((ht_identifier *) (NODE)) -#define NODE_LEN(NODE) HT_LEN (&(NODE)->ident) -#define NODE_NAME(NODE) HT_STR (&(NODE)->ident) - -/* The common part of an identifier node shared amongst all 3 C front - ends. Also used to store CPP identifiers, which are a superset of - identifiers in the grammatical sense. */ -struct cpp_hashnode GTY(()) -{ - struct ht_identifier ident; - unsigned int is_directive : 1; - unsigned int directive_index : 7; /* If is_directive, - then index into directive table. - Otherwise, a NODE_OPERATOR. */ - unsigned char rid_code; /* Rid code - for front ends. */ - ENUM_BITFIELD(node_type) type : 8; /* CPP node type. */ - unsigned char flags; /* CPP flags. */ - - union _cpp_hashnode_value - { - /* If a macro. */ - cpp_macro * GTY((skip (""))) macro; - /* Answers to an assertion. */ - struct answer * GTY ((skip (""))) answers; - /* Code for a builtin macro. */ - enum builtin_type GTY ((tag ("1"))) builtin; - /* Macro argument index. */ - unsigned short GTY ((tag ("0"))) arg_index; - } GTY ((desc ("0"))) value; -}; - -/* Call this first to get a handle to pass to other functions. - - If you want cpplib to manage its own hashtable, pass in a NULL - pointer. Otherwise you should pass in an initialized hash table - that cpplib will share; this technique is used by the C front - ends. */ -extern cpp_reader *cpp_create_reader (enum c_lang, struct ht *); - -/* Call this to change the selected language standard (e.g. because of - command line options). */ -extern void cpp_set_lang (cpp_reader *, enum c_lang); - -/* Add a dependency TARGET. Quote it for "make" if QUOTE. Can be - called any number of times before cpp_read_main_file(). If no - targets have been added before cpp_read_main_file(), then the - default target is used. */ -extern void cpp_add_dependency_target (cpp_reader *, const char *, int); - -/* Set the include paths. */ -extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -/* Call these to get pointers to the options and callback structures - for a given reader. These pointers are good until you call - cpp_finish on that reader. You can either edit the callbacks - through the pointer returned from cpp_get_callbacks, or set them - with cpp_set_callbacks. */ -extern cpp_options *cpp_get_options (cpp_reader *); -extern struct line_maps *cpp_get_line_maps (cpp_reader *); -extern cpp_callbacks *cpp_get_callbacks (cpp_reader *); -extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *); - -/* This function reads the file, but does not start preprocessing. It - returns the name of the original file; this is the same as the - input file, except for preprocessed input. This will generate at - least one file change callback, and possibly a line change callback - too. If there was an error opening the file, it returns NULL. */ -extern const char *cpp_read_main_file (cpp_reader *, const char *); - -/* Set up built-ins like __FILE__. */ -extern void cpp_init_builtins (cpp_reader *, int); - -/* This is called after options have been parsed, and partially - processed. */ -extern void cpp_post_options (cpp_reader *); - -/* Set up translation to the target character set. */ -extern void cpp_init_iconv (cpp_reader *); - -/* Call this to finish preprocessing. If you requested dependency - generation, pass an open stream to write the information to, - otherwise NULL. It is your responsibility to close the stream. - - Returns cpp_errors (pfile). */ -extern int cpp_finish (cpp_reader *, FILE *deps_stream); - -/* Call this to release the handle at the end of preprocessing. Any - use of the handle after this function returns is invalid. Returns - cpp_errors (pfile). */ -extern void cpp_destroy (cpp_reader *); - -/* Error count. */ -extern unsigned int cpp_errors (cpp_reader *); - -extern unsigned int cpp_token_len (const cpp_token *); -extern unsigned char *cpp_token_as_text (cpp_reader *, const cpp_token *); -extern unsigned char *cpp_spell_token (cpp_reader *, const cpp_token *, - unsigned char *); -extern void cpp_register_pragma (cpp_reader *, const char *, const char *, - void (*) (cpp_reader *)); -extern int cpp_avoid_paste (cpp_reader *, const cpp_token *, - const cpp_token *); -extern const cpp_token *cpp_get_token (cpp_reader *); -extern const unsigned char *cpp_macro_definition (cpp_reader *, - const cpp_hashnode *); -extern void _cpp_backup_tokens (cpp_reader *, unsigned int); - -/* Evaluate a CPP_CHAR or CPP_WCHAR token. */ -extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *, - unsigned int *, int *); -/* Evaluate a vector of CPP_STRING or CPP_WSTRING tokens. */ -extern bool cpp_interpret_string (cpp_reader *, - const cpp_string *, size_t, - cpp_string *, bool); - -/* Used to register macros and assertions, perhaps from the command line. - The text is the same as the command line argument. */ -extern void cpp_define (cpp_reader *, const char *); -extern void cpp_assert (cpp_reader *, const char *); -extern void cpp_undef (cpp_reader *, const char *); -extern void cpp_unassert (cpp_reader *, const char *); - -/* Undefine all macros and assertions. */ -extern void cpp_undef_all (cpp_reader *); - -extern cpp_buffer *cpp_push_buffer (cpp_reader *, const unsigned char *, - size_t, int); -extern int cpp_defined (cpp_reader *, const unsigned char *, int); - -/* A preprocessing number. Code assumes that any unused high bits of - the double integer are set to zero. */ -typedef unsigned HOST_WIDE_INT cpp_num_part; -typedef struct cpp_num cpp_num; -struct cpp_num -{ - cpp_num_part high; - cpp_num_part low; - bool unsignedp; /* True if value should be treated as unsigned. */ - bool overflow; /* True if the most recent calculation overflowed. */ -}; - -/* cpplib provides two interfaces for interpretation of preprocessing - numbers. - - cpp_classify_number categorizes numeric constants according to - their field (integer, floating point, or invalid), radix (decimal, - octal, hexadecimal), and type suffixes. */ - -#define CPP_N_CATEGORY 0x000F -#define CPP_N_INVALID 0x0000 -#define CPP_N_INTEGER 0x0001 -#define CPP_N_FLOATING 0x0002 - -#define CPP_N_WIDTH 0x00F0 -#define CPP_N_SMALL 0x0010 /* int, float. */ -#define CPP_N_MEDIUM 0x0020 /* long, double. */ -#define CPP_N_LARGE 0x0040 /* long long, long double. */ - -#define CPP_N_RADIX 0x0F00 -#define CPP_N_DECIMAL 0x0100 -#define CPP_N_HEX 0x0200 -#define CPP_N_OCTAL 0x0400 - -#define CPP_N_UNSIGNED 0x1000 /* Properties. */ -#define CPP_N_IMAGINARY 0x2000 - -/* Classify a CPP_NUMBER token. The return value is a combination of - the flags from the above sets. */ -extern unsigned cpp_classify_number (cpp_reader *, const cpp_token *); - -/* Evaluate a token classified as category CPP_N_INTEGER. */ -extern cpp_num cpp_interpret_integer (cpp_reader *, const cpp_token *, - unsigned int type); - -/* Sign extend a number, with PRECISION significant bits and all - others assumed clear, to fill out a cpp_num structure. */ -cpp_num cpp_num_sign_extend (cpp_num, size_t); - -/* Diagnostic levels. To get a diagnostic without associating a - position in the translation unit with it, use cpp_error_with_line - with a line number of zero. */ - -/* Warning, an error with -Werror. */ -#define CPP_DL_WARNING 0x00 -/* Same as CPP_DL_WARNING, except it is not suppressed in system headers. */ -#define CPP_DL_WARNING_SYSHDR 0x01 -/* Warning, an error with -pedantic-errors or -Werror. */ -#define CPP_DL_PEDWARN 0x02 -/* An error. */ -#define CPP_DL_ERROR 0x03 -/* An internal consistency check failed. Prints "internal error: ", - otherwise the same as CPP_DL_ERROR. */ -#define CPP_DL_ICE 0x04 -/* Extracts a diagnostic level from an int. */ -#define CPP_DL_EXTRACT(l) (l & 0xf) -/* Nonzero if a diagnostic level is one of the warnings. */ -#define CPP_DL_WARNING_P(l) (CPP_DL_EXTRACT (l) >= CPP_DL_WARNING \ - && CPP_DL_EXTRACT (l) <= CPP_DL_PEDWARN) - -/* N.B. The error-message-printer prototypes have not been nicely - formatted because exgettext needs to see 'msgid' on the same line - as the name of the function in order to work properly. Only the - string argument gets a name in an effort to keep the lines from - getting ridiculously oversized. */ - -/* Output a diagnostic of some kind. */ -extern void cpp_error (cpp_reader *, int, const char *msgid, ...) - ATTRIBUTE_PRINTF_3; - -/* Output a diagnostic with "MSGID: " preceding the - error string of errno. No location is printed. */ -extern void cpp_errno (cpp_reader *, int, const char *msgid); - -/* Same as cpp_error, except additionally specifies a position as a - (translation unit) physical line and physical column. If the line is - zero, then no location is printed. */ -extern void cpp_error_with_line (cpp_reader *, int, fileline, unsigned, - const char *msgid, ...) ATTRIBUTE_PRINTF_5; - -/* In cpplex.c */ -extern int cpp_ideq (const cpp_token *, const char *); -extern void cpp_output_line (cpp_reader *, FILE *); -extern void cpp_output_token (const cpp_token *, FILE *); -extern const char *cpp_type2name (enum cpp_ttype); -/* Returns the value of an escape sequence, truncated to the correct - target precision. PSTR points to the input pointer, which is just - after the backslash. LIMIT is how much text we have. WIDE is true - if the escape sequence is part of a wide character constant or - string literal. Handles all relevant diagnostics. */ -extern cppchar_t cpp_parse_escape (cpp_reader *, const unsigned char ** pstr, - const unsigned char *limit, int wide); - -/* In cpphash.c */ - -/* Lookup an identifier in the hashtable. Puts the identifier in the - table if it is not already there. */ -extern cpp_hashnode *cpp_lookup (cpp_reader *, const unsigned char *, - unsigned int); - -typedef int (*cpp_cb) (cpp_reader *, cpp_hashnode *, void *); -extern void cpp_forall_identifiers (cpp_reader *, cpp_cb, void *); - -/* In cppmacro.c */ -extern void cpp_scan_nooutput (cpp_reader *); -extern int cpp_sys_macro_p (cpp_reader *); -extern unsigned char *cpp_quote_string (unsigned char *, const unsigned char *, - unsigned int); - -/* In cppfiles.c */ -extern bool cpp_included (cpp_reader *, const char *); -extern void cpp_make_system_header (cpp_reader *, int, int); -extern bool cpp_push_include (cpp_reader *, const char *); -extern void cpp_change_file (cpp_reader *, enum lc_reason, const char *); - -/* In cpppch.c */ -struct save_macro_data; -extern int cpp_save_state (cpp_reader *, FILE *); -extern int cpp_write_pch_deps (cpp_reader *, FILE *); -extern int cpp_write_pch_state (cpp_reader *, FILE *); -extern int cpp_valid_state (cpp_reader *, const char *, int); -extern void cpp_prepare_state (cpp_reader *, struct save_macro_data **); -extern int cpp_read_state (cpp_reader *, const char *, FILE *, - struct save_macro_data *); - -#ifdef __cplusplus -} -#endif - -#endif /* ! GCC_CPPLIB_H */ diff --git a/contrib/gcc/cppmacro.c b/contrib/gcc/cppmacro.c deleted file mode 100644 index 2298c85..0000000 --- a/contrib/gcc/cppmacro.c +++ /dev/null @@ -1,1728 +0,0 @@ -/* Part of CPP library. (Macro and #define handling.) - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - Written by Per Bothner, 1994. - Based on CCCP program by Paul Rubin, June 1986 - Adapted to ANSI C, Richard Stallman, Jan 1987 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - In other words, you are welcome to use, share and improve this program. - You are forbidden to forbid anyone else to use, share and improve - what you give them. Help stamp out software-hoarding! */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" - -typedef struct macro_arg macro_arg; -struct macro_arg -{ - const cpp_token **first; /* First token in unexpanded argument. */ - const cpp_token **expanded; /* Macro-expanded argument. */ - const cpp_token *stringified; /* Stringified argument. */ - unsigned int count; /* # of tokens in argument. */ - unsigned int expanded_count; /* # of tokens in expanded argument. */ -}; - -/* Macro expansion. */ - -static int enter_macro_context (cpp_reader *, cpp_hashnode *); -static int builtin_macro (cpp_reader *, cpp_hashnode *); -static void push_token_context (cpp_reader *, cpp_hashnode *, - const cpp_token *, unsigned int); -static void push_ptoken_context (cpp_reader *, cpp_hashnode *, _cpp_buff *, - const cpp_token **, unsigned int); -static _cpp_buff *collect_args (cpp_reader *, const cpp_hashnode *); -static cpp_context *next_context (cpp_reader *); -static const cpp_token *padding_token (cpp_reader *, const cpp_token *); -static void expand_arg (cpp_reader *, macro_arg *); -static const cpp_token *new_string_token (cpp_reader *, uchar *, unsigned int); -static const cpp_token *stringify_arg (cpp_reader *, macro_arg *); -static void paste_all_tokens (cpp_reader *, const cpp_token *); -static bool paste_tokens (cpp_reader *, const cpp_token **, const cpp_token *); -static void replace_args (cpp_reader *, cpp_hashnode *, cpp_macro *, - macro_arg *); -static _cpp_buff *funlike_invocation_p (cpp_reader *, cpp_hashnode *); -static bool create_iso_definition (cpp_reader *, cpp_macro *); - -/* #define directive parsing and handling. */ - -static cpp_token *alloc_expansion_token (cpp_reader *, cpp_macro *); -static cpp_token *lex_expansion_token (cpp_reader *, cpp_macro *); -static bool warn_of_redefinition (cpp_reader *, const cpp_hashnode *, - const cpp_macro *); -static bool parse_params (cpp_reader *, cpp_macro *); -static void check_trad_stringification (cpp_reader *, const cpp_macro *, - const cpp_string *); - -/* Emits a warning if NODE is a macro defined in the main file that - has not been used. */ -int -_cpp_warn_if_unused_macro (cpp_reader *pfile, cpp_hashnode *node, - void *v ATTRIBUTE_UNUSED) -{ - if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) - { - cpp_macro *macro = node->value.macro; - - if (!macro->used - && MAIN_FILE_P (linemap_lookup (&pfile->line_maps, macro->line))) - cpp_error_with_line (pfile, CPP_DL_WARNING, macro->line, 0, - "macro \"%s\" is not used", NODE_NAME (node)); - } - - return 1; -} - -/* Allocates and returns a CPP_STRING token, containing TEXT of length - LEN, after null-terminating it. TEXT must be in permanent storage. */ -static const cpp_token * -new_string_token (cpp_reader *pfile, unsigned char *text, unsigned int len) -{ - cpp_token *token = _cpp_temp_token (pfile); - - text[len] = '\0'; - token->type = CPP_STRING; - token->val.str.len = len; - token->val.str.text = text; - token->flags = 0; - return token; -} - -static const char * const monthnames[] = -{ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" -}; - -/* Handle builtin macros like __FILE__, and push the resulting token - on the context stack. Also handles _Pragma, for which no new token - is created. Returns 1 if it generates a new token context, 0 to - return the token to the caller. */ -const uchar * -_cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node) -{ - const uchar *result = NULL; - unsigned int number = 1; - - switch (node->value.builtin) - { - default: - cpp_error (pfile, CPP_DL_ICE, "invalid built-in macro \"%s\"", - NODE_NAME (node)); - break; - - case BT_FILE: - case BT_BASE_FILE: - { - unsigned int len; - const char *name; - uchar *buf; - const struct line_map *map = pfile->map; - - if (node->value.builtin == BT_BASE_FILE) - while (! MAIN_FILE_P (map)) - map = INCLUDED_FROM (&pfile->line_maps, map); - - name = map->to_file; - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 4 + 3); - result = buf; - *buf = '"'; - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; - } - break; - - case BT_INCLUDE_LEVEL: - /* The line map depth counts the primary source as level 1, but - historically __INCLUDE_DEPTH__ has called the primary source - level 0. */ - number = pfile->line_maps.depth - 1; - break; - - case BT_SPECLINE: - /* If __LINE__ is embedded in a macro, it must expand to the - line of the macro's invocation, not its definition. - Otherwise things like assert() will not work properly. */ - if (CPP_OPTION (pfile, traditional)) - number = pfile->line; - else - number = pfile->cur_token[-1].line; - number = SOURCE_LINE (pfile->map, number); - break; - - /* __STDC__ has the value 1 under normal circumstances. - However, if (a) we are in a system header, (b) the option - stdc_0_in_system_headers is true (set by target config), and - (c) we are not in strictly conforming mode, then it has the - value 0. */ - case BT_STDC: - { - if (CPP_IN_SYSTEM_HEADER (pfile) - && CPP_OPTION (pfile, stdc_0_in_system_headers) - && !CPP_OPTION (pfile,std)) - number = 0; - else - number = 1; - } - break; - - case BT_DATE: - case BT_TIME: - if (pfile->date == NULL) - { - /* Allocate __DATE__ and __TIME__ strings from permanent - storage. We only do this once, and don't generate them - at init time, because time() and localtime() are very - slow on some systems. */ - time_t tt; - struct tm *tb = NULL; - - /* (time_t) -1 is a legitimate value for "number of seconds - since the Epoch", so we have to do a little dance to - distinguish that from a genuine error. */ - errno = 0; - tt = time(NULL); - if (tt != (time_t)-1 || errno == 0) - tb = localtime (&tt); - - if (tb) - { - pfile->date = _cpp_unaligned_alloc (pfile, - sizeof ("\"Oct 11 1347\"")); - sprintf ((char *) pfile->date, "\"%s %2d %4d\"", - monthnames[tb->tm_mon], tb->tm_mday, - tb->tm_year + 1900); - - pfile->time = _cpp_unaligned_alloc (pfile, - sizeof ("\"12:34:56\"")); - sprintf ((char *) pfile->time, "\"%02d:%02d:%02d\"", - tb->tm_hour, tb->tm_min, tb->tm_sec); - } - else - { - cpp_errno (pfile, CPP_DL_WARNING, - "could not determine date and time"); - - pfile->date = U"\"??? ?? ????\""; - pfile->time = U"\"??:??:??\""; - } - } - - if (node->value.builtin == BT_DATE) - result = pfile->date; - else - result = pfile->time; - break; - } - - if (result == NULL) - { - /* 21 bytes holds all NUL-terminated unsigned 64-bit numbers. */ - result = _cpp_unaligned_alloc (pfile, 21); - sprintf ((char *) result, "%u", number); - } - - return result; -} - -/* Convert builtin macros like __FILE__ to a token and push it on the - context stack. Also handles _Pragma, for which no new token is - created. Returns 1 if it generates a new token context, 0 to - return the token to the caller. */ -static int -builtin_macro (cpp_reader *pfile, cpp_hashnode *node) -{ - const uchar *buf; - size_t len; - char *nbuf; - - if (node->value.builtin == BT_PRAGMA) - { - /* Don't interpret _Pragma within directives. The standard is - not clear on this, but to me this makes most sense. */ - if (pfile->state.in_directive) - return 0; - - _cpp_do__Pragma (pfile); - return 1; - } - - buf = _cpp_builtin_macro_text (pfile, node); - len = ustrlen (buf); - nbuf = alloca (len + 1); - memcpy (nbuf, buf, len); - nbuf[len]='\n'; - - cpp_push_buffer (pfile, (uchar *) nbuf, len, /* from_stage3 */ true); - _cpp_clean_line (pfile); - - /* Set pfile->cur_token as required by _cpp_lex_direct. */ - pfile->cur_token = _cpp_temp_token (pfile); - push_token_context (pfile, NULL, _cpp_lex_direct (pfile), 1); - if (pfile->buffer->cur != pfile->buffer->rlimit) - cpp_error (pfile, CPP_DL_ICE, "invalid built-in macro \"%s\"", - NODE_NAME (node)); - _cpp_pop_buffer (pfile); - - return 1; -} - -/* Copies SRC, of length LEN, to DEST, adding backslashes before all - backslashes and double quotes. Non-printable characters are - converted to octal. DEST must be of sufficient size. Returns - a pointer to the end of the string. */ -uchar * -cpp_quote_string (uchar *dest, const uchar *src, unsigned int len) -{ - while (len--) - { - uchar c = *src++; - - if (c == '\\' || c == '"') - { - *dest++ = '\\'; - *dest++ = c; - } - else - { - if (ISPRINT (c)) - *dest++ = c; - else - { - sprintf ((char *) dest, "\\%03o", c); - dest += 4; - } - } - } - - return dest; -} - -/* Convert a token sequence ARG to a single string token according to - the rules of the ISO C #-operator. */ -static const cpp_token * -stringify_arg (cpp_reader *pfile, macro_arg *arg) -{ - unsigned char *dest; - unsigned int i, escape_it, backslash_count = 0; - const cpp_token *source = NULL; - size_t len; - - if (BUFF_ROOM (pfile->u_buff) < 3) - _cpp_extend_buff (pfile, &pfile->u_buff, 3); - dest = BUFF_FRONT (pfile->u_buff); - *dest++ = '"'; - - /* Loop, reading in the argument's tokens. */ - for (i = 0; i < arg->count; i++) - { - const cpp_token *token = arg->first[i]; - - if (token->type == CPP_PADDING) - { - if (source == NULL) - source = token->val.source; - continue; - } - - escape_it = (token->type == CPP_STRING || token->type == CPP_WSTRING - || token->type == CPP_CHAR || token->type == CPP_WCHAR); - - /* Room for each char being written in octal, initial space and - final quote and NUL. */ - len = cpp_token_len (token); - if (escape_it) - len *= 4; - len += 3; - - if ((size_t) (BUFF_LIMIT (pfile->u_buff) - dest) < len) - { - size_t len_so_far = dest - BUFF_FRONT (pfile->u_buff); - _cpp_extend_buff (pfile, &pfile->u_buff, len); - dest = BUFF_FRONT (pfile->u_buff) + len_so_far; - } - - /* Leading white space? */ - if (dest - 1 != BUFF_FRONT (pfile->u_buff)) - { - if (source == NULL) - source = token; - if (source->flags & PREV_WHITE) - *dest++ = ' '; - } - source = NULL; - - if (escape_it) - { - _cpp_buff *buff = _cpp_get_buff (pfile, len); - unsigned char *buf = BUFF_FRONT (buff); - len = cpp_spell_token (pfile, token, buf) - buf; - dest = cpp_quote_string (dest, buf, len); - _cpp_release_buff (pfile, buff); - } - else - dest = cpp_spell_token (pfile, token, dest); - - if (token->type == CPP_OTHER && token->val.str.text[0] == '\\') - backslash_count++; - else - backslash_count = 0; - } - - /* Ignore the final \ of invalid string literals. */ - if (backslash_count & 1) - { - cpp_error (pfile, CPP_DL_WARNING, - "invalid string literal, ignoring final '\\'"); - dest--; - } - - /* Commit the memory, including NUL, and return the token. */ - *dest++ = '"'; - len = dest - BUFF_FRONT (pfile->u_buff); - BUFF_FRONT (pfile->u_buff) = dest + 1; - return new_string_token (pfile, dest - len, len); -} - -/* Try to paste two tokens. On success, return nonzero. In any - case, PLHS is updated to point to the pasted token, which is - guaranteed to not have the PASTE_LEFT flag set. */ -static bool -paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) -{ - unsigned char *buf, *end; - const cpp_token *lhs; - unsigned int len; - bool valid; - - lhs = *plhs; - len = cpp_token_len (lhs) + cpp_token_len (rhs) + 1; - buf = alloca (len); - end = cpp_spell_token (pfile, lhs, buf); - - /* Avoid comment headers, since they are still processed in stage 3. - It is simpler to insert a space here, rather than modifying the - lexer to ignore comments in some circumstances. Simply returning - false doesn't work, since we want to clear the PASTE_LEFT flag. */ - if (lhs->type == CPP_DIV && rhs->type != CPP_EQ) - *end++ = ' '; - end = cpp_spell_token (pfile, rhs, end); - *end = '\n'; - - cpp_push_buffer (pfile, buf, end - buf, /* from_stage3 */ true); - _cpp_clean_line (pfile); - - /* Set pfile->cur_token as required by _cpp_lex_direct. */ - pfile->cur_token = _cpp_temp_token (pfile); - *plhs = _cpp_lex_direct (pfile); - valid = pfile->buffer->cur == pfile->buffer->rlimit; - _cpp_pop_buffer (pfile); - - return valid; -} - -/* Handles an arbitrarily long sequence of ## operators, with initial - operand LHS. This implementation is left-associative, - non-recursive, and finishes a paste before handling succeeding - ones. If a paste fails, we back up to the RHS of the failing ## - operator before pushing the context containing the result of prior - successful pastes, with the effect that the RHS appears in the - output stream after the pasted LHS normally. */ -static void -paste_all_tokens (cpp_reader *pfile, const cpp_token *lhs) -{ - const cpp_token *rhs; - cpp_context *context = pfile->context; - - do - { - /* Take the token directly from the current context. We can do - this, because we are in the replacement list of either an - object-like macro, or a function-like macro with arguments - inserted. In either case, the constraints to #define - guarantee we have at least one more token. */ - if (context->direct_p) - rhs = FIRST (context).token++; - else - rhs = *FIRST (context).ptoken++; - - if (rhs->type == CPP_PADDING) - abort (); - - if (!paste_tokens (pfile, &lhs, rhs)) - { - _cpp_backup_tokens (pfile, 1); - - /* Mandatory error for all apart from assembler. */ - if (CPP_OPTION (pfile, lang) != CLK_ASM) - cpp_error (pfile, CPP_DL_ERROR, - "pasting \"%s\" and \"%s\" does not give a valid preprocessing token", - cpp_token_as_text (pfile, lhs), - cpp_token_as_text (pfile, rhs)); - break; - } - } - while (rhs->flags & PASTE_LEFT); - - /* Put the resulting token in its own context. */ - push_token_context (pfile, NULL, lhs, 1); -} - -/* Returns TRUE if the number of arguments ARGC supplied in an - invocation of the MACRO referenced by NODE is valid. An empty - invocation to a macro with no parameters should pass ARGC as zero. - - Note that MACRO cannot necessarily be deduced from NODE, in case - NODE was redefined whilst collecting arguments. */ -bool -_cpp_arguments_ok (cpp_reader *pfile, cpp_macro *macro, const cpp_hashnode *node, unsigned int argc) -{ - if (argc == macro->paramc) - return true; - - if (argc < macro->paramc) - { - /* As an extension, a rest argument is allowed to not appear in - the invocation at all. - e.g. #define debug(format, args...) something - debug("string"); - - This is exactly the same as if there had been an empty rest - argument - debug("string", ). */ - - if (argc + 1 == macro->paramc && macro->variadic) - { - if (CPP_PEDANTIC (pfile) && ! macro->syshdr) - cpp_error (pfile, CPP_DL_PEDWARN, - "ISO C99 requires rest arguments to be used"); - return true; - } - - cpp_error (pfile, CPP_DL_ERROR, - "macro \"%s\" requires %u arguments, but only %u given", - NODE_NAME (node), macro->paramc, argc); - } - else - cpp_error (pfile, CPP_DL_ERROR, - "macro \"%s\" passed %u arguments, but takes just %u", - NODE_NAME (node), argc, macro->paramc); - - return false; -} - -/* Reads and returns the arguments to a function-like macro - invocation. Assumes the opening parenthesis has been processed. - If there is an error, emits an appropriate diagnostic and returns - NULL. Each argument is terminated by a CPP_EOF token, for the - future benefit of expand_arg(). */ -static _cpp_buff * -collect_args (cpp_reader *pfile, const cpp_hashnode *node) -{ - _cpp_buff *buff, *base_buff; - cpp_macro *macro; - macro_arg *args, *arg; - const cpp_token *token; - unsigned int argc; - - macro = node->value.macro; - if (macro->paramc) - argc = macro->paramc; - else - argc = 1; - buff = _cpp_get_buff (pfile, argc * (50 * sizeof (cpp_token *) - + sizeof (macro_arg))); - base_buff = buff; - args = (macro_arg *) buff->base; - memset (args, 0, argc * sizeof (macro_arg)); - buff->cur = (unsigned char *) &args[argc]; - arg = args, argc = 0; - - /* Collect the tokens making up each argument. We don't yet know - how many arguments have been supplied, whether too many or too - few. Hence the slightly bizarre usage of "argc" and "arg". */ - do - { - unsigned int paren_depth = 0; - unsigned int ntokens = 0; - - argc++; - arg->first = (const cpp_token **) buff->cur; - - for (;;) - { - /* Require space for 2 new tokens (including a CPP_EOF). */ - if ((unsigned char *) &arg->first[ntokens + 2] > buff->limit) - { - buff = _cpp_append_extend_buff (pfile, buff, - 1000 * sizeof (cpp_token *)); - arg->first = (const cpp_token **) buff->cur; - } - - token = cpp_get_token (pfile); - - if (token->type == CPP_PADDING) - { - /* Drop leading padding. */ - if (ntokens == 0) - continue; - } - else if (token->type == CPP_OPEN_PAREN) - paren_depth++; - else if (token->type == CPP_CLOSE_PAREN) - { - if (paren_depth-- == 0) - break; - } - else if (token->type == CPP_COMMA) - { - /* A comma does not terminate an argument within - parentheses or as part of a variable argument. */ - if (paren_depth == 0 - && ! (macro->variadic && argc == macro->paramc)) - break; - } - else if (token->type == CPP_EOF - || (token->type == CPP_HASH && token->flags & BOL)) - break; - - arg->first[ntokens++] = token; - } - - /* Drop trailing padding. */ - while (ntokens > 0 && arg->first[ntokens - 1]->type == CPP_PADDING) - ntokens--; - - arg->count = ntokens; - arg->first[ntokens] = &pfile->eof; - - /* Terminate the argument. Excess arguments loop back and - overwrite the final legitimate argument, before failing. */ - if (argc <= macro->paramc) - { - buff->cur = (unsigned char *) &arg->first[ntokens + 1]; - if (argc != macro->paramc) - arg++; - } - } - while (token->type != CPP_CLOSE_PAREN && token->type != CPP_EOF); - - if (token->type == CPP_EOF) - { - /* We still need the CPP_EOF to end directives, and to end - pre-expansion of a macro argument. Step back is not - unconditional, since we don't want to return a CPP_EOF to our - callers at the end of an -include-d file. */ - if (pfile->context->prev || pfile->state.in_directive) - _cpp_backup_tokens (pfile, 1); - cpp_error (pfile, CPP_DL_ERROR, - "unterminated argument list invoking macro \"%s\"", - NODE_NAME (node)); - } - else - { - /* A single empty argument is counted as no argument. */ - if (argc == 1 && macro->paramc == 0 && args[0].count == 0) - argc = 0; - if (_cpp_arguments_ok (pfile, macro, node, argc)) - { - /* GCC has special semantics for , ## b where b is a varargs - parameter: we remove the comma if b was omitted entirely. - If b was merely an empty argument, the comma is retained. - If the macro takes just one (varargs) parameter, then we - retain the comma only if we are standards conforming. - - If FIRST is NULL replace_args () swallows the comma. */ - if (macro->variadic && (argc < macro->paramc - || (argc == 1 && args[0].count == 0 - && !CPP_OPTION (pfile, std)))) - args[macro->paramc - 1].first = NULL; - return base_buff; - } - } - - /* An error occurred. */ - _cpp_release_buff (pfile, base_buff); - return NULL; -} - -/* Search for an opening parenthesis to the macro of NODE, in such a - way that, if none is found, we don't lose the information in any - intervening padding tokens. If we find the parenthesis, collect - the arguments and return the buffer containing them. */ -static _cpp_buff * -funlike_invocation_p (cpp_reader *pfile, cpp_hashnode *node) -{ - const cpp_token *token, *padding = NULL; - - for (;;) - { - token = cpp_get_token (pfile); - if (token->type != CPP_PADDING) - break; - if (padding == NULL - || (!(padding->flags & PREV_WHITE) && token->val.source == NULL)) - padding = token; - } - - if (token->type == CPP_OPEN_PAREN) - { - pfile->state.parsing_args = 2; - return collect_args (pfile, node); - } - - /* CPP_EOF can be the end of macro arguments, or the end of the - file. We mustn't back up over the latter. Ugh. */ - if (token->type != CPP_EOF || token == &pfile->eof) - { - /* Back up. We may have skipped padding, in which case backing - up more than one token when expanding macros is in general - too difficult. We re-insert it in its own context. */ - _cpp_backup_tokens (pfile, 1); - if (padding) - push_token_context (pfile, NULL, padding, 1); - } - - return NULL; -} - -/* Push the context of a macro with hash entry NODE onto the context - stack. If we can successfully expand the macro, we push a context - containing its yet-to-be-rescanned replacement list and return one. - Otherwise, we don't push a context and return zero. */ -static int -enter_macro_context (cpp_reader *pfile, cpp_hashnode *node) -{ - /* The presence of a macro invalidates a file's controlling macro. */ - pfile->mi_valid = false; - - pfile->state.angled_headers = false; - - /* Handle standard macros. */ - if (! (node->flags & NODE_BUILTIN)) - { - cpp_macro *macro = node->value.macro; - - if (macro->fun_like) - { - _cpp_buff *buff; - - pfile->state.prevent_expansion++; - pfile->keep_tokens++; - pfile->state.parsing_args = 1; - buff = funlike_invocation_p (pfile, node); - pfile->state.parsing_args = 0; - pfile->keep_tokens--; - pfile->state.prevent_expansion--; - - if (buff == NULL) - { - if (CPP_WTRADITIONAL (pfile) && ! node->value.macro->syshdr) - cpp_error (pfile, CPP_DL_WARNING, - "function-like macro \"%s\" must be used with arguments in traditional C", - NODE_NAME (node)); - - return 0; - } - - if (macro->paramc > 0) - replace_args (pfile, node, macro, (macro_arg *) buff->base); - _cpp_release_buff (pfile, buff); - } - - /* Disable the macro within its expansion. */ - node->flags |= NODE_DISABLED; - - macro->used = 1; - - if (macro->paramc == 0) - push_token_context (pfile, node, macro->exp.tokens, macro->count); - - return 1; - } - - /* Handle built-in macros and the _Pragma operator. */ - return builtin_macro (pfile, node); -} - -/* Replace the parameters in a function-like macro of NODE with the - actual ARGS, and place the result in a newly pushed token context. - Expand each argument before replacing, unless it is operated upon - by the # or ## operators. */ -static void -replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro, macro_arg *args) -{ - unsigned int i, total; - const cpp_token *src, *limit; - const cpp_token **dest, **first; - macro_arg *arg; - _cpp_buff *buff; - - /* First, fully macro-expand arguments, calculating the number of - tokens in the final expansion as we go. The ordering of the if - statements below is subtle; we must handle stringification before - pasting. */ - total = macro->count; - limit = macro->exp.tokens + macro->count; - - for (src = macro->exp.tokens; src < limit; src++) - if (src->type == CPP_MACRO_ARG) - { - /* Leading and trailing padding tokens. */ - total += 2; - - /* We have an argument. If it is not being stringified or - pasted it is macro-replaced before insertion. */ - arg = &args[src->val.arg_no - 1]; - - if (src->flags & STRINGIFY_ARG) - { - if (!arg->stringified) - arg->stringified = stringify_arg (pfile, arg); - } - else if ((src->flags & PASTE_LEFT) - || (src > macro->exp.tokens && (src[-1].flags & PASTE_LEFT))) - total += arg->count - 1; - else - { - if (!arg->expanded) - expand_arg (pfile, arg); - total += arg->expanded_count - 1; - } - } - - /* Now allocate space for the expansion, copy the tokens and replace - the arguments. */ - buff = _cpp_get_buff (pfile, total * sizeof (cpp_token *)); - first = (const cpp_token **) buff->base; - dest = first; - - for (src = macro->exp.tokens; src < limit; src++) - { - unsigned int count; - const cpp_token **from, **paste_flag; - - if (src->type != CPP_MACRO_ARG) - { - *dest++ = src; - continue; - } - - paste_flag = 0; - arg = &args[src->val.arg_no - 1]; - if (src->flags & STRINGIFY_ARG) - count = 1, from = &arg->stringified; - else if (src->flags & PASTE_LEFT) - count = arg->count, from = arg->first; - else if (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)) - { - count = arg->count, from = arg->first; - if (dest != first) - { - if (dest[-1]->type == CPP_COMMA - && macro->variadic - && src->val.arg_no == macro->paramc) - { - /* Swallow a pasted comma if from == NULL, otherwise - drop the paste flag. */ - if (from == NULL) - dest--; - else - paste_flag = dest - 1; - } - /* Remove the paste flag if the RHS is a placemarker. */ - else if (count == 0) - paste_flag = dest - 1; - } - } - else - count = arg->expanded_count, from = arg->expanded; - - /* Padding on the left of an argument (unless RHS of ##). */ - if ((!pfile->state.in_directive || pfile->state.directive_wants_padding) - && src != macro->exp.tokens && !(src[-1].flags & PASTE_LEFT)) - *dest++ = padding_token (pfile, src); - - if (count) - { - memcpy (dest, from, count * sizeof (cpp_token *)); - dest += count; - - /* With a non-empty argument on the LHS of ##, the last - token should be flagged PASTE_LEFT. */ - if (src->flags & PASTE_LEFT) - paste_flag = dest - 1; - } - - /* Avoid paste on RHS (even case count == 0). */ - if (!pfile->state.in_directive && !(src->flags & PASTE_LEFT)) - *dest++ = &pfile->avoid_paste; - - /* Add a new paste flag, or remove an unwanted one. */ - if (paste_flag) - { - cpp_token *token = _cpp_temp_token (pfile); - token->type = (*paste_flag)->type; - token->val.str = (*paste_flag)->val.str; - if (src->flags & PASTE_LEFT) - token->flags = (*paste_flag)->flags | PASTE_LEFT; - else - token->flags = (*paste_flag)->flags & ~PASTE_LEFT; - *paste_flag = token; - } - } - - /* Free the expanded arguments. */ - for (i = 0; i < macro->paramc; i++) - if (args[i].expanded) - free (args[i].expanded); - - push_ptoken_context (pfile, node, buff, first, dest - first); -} - -/* Return a special padding token, with padding inherited from SOURCE. */ -static const cpp_token * -padding_token (cpp_reader *pfile, const cpp_token *source) -{ - cpp_token *result = _cpp_temp_token (pfile); - - result->type = CPP_PADDING; - result->val.source = source; - result->flags = 0; - return result; -} - -/* Get a new uninitialized context. Create a new one if we cannot - re-use an old one. */ -static cpp_context * -next_context (cpp_reader *pfile) -{ - cpp_context *result = pfile->context->next; - - if (result == 0) - { - result = xnew (cpp_context); - result->prev = pfile->context; - result->next = 0; - pfile->context->next = result; - } - - pfile->context = result; - return result; -} - -/* Push a list of pointers to tokens. */ -static void -push_ptoken_context (cpp_reader *pfile, cpp_hashnode *macro, _cpp_buff *buff, - const cpp_token **first, unsigned int count) -{ - cpp_context *context = next_context (pfile); - - context->direct_p = false; - context->macro = macro; - context->buff = buff; - FIRST (context).ptoken = first; - LAST (context).ptoken = first + count; -} - -/* Push a list of tokens. */ -static void -push_token_context (cpp_reader *pfile, cpp_hashnode *macro, - const cpp_token *first, unsigned int count) -{ - cpp_context *context = next_context (pfile); - - context->direct_p = true; - context->macro = macro; - context->buff = NULL; - FIRST (context).token = first; - LAST (context).token = first + count; -} - -/* Push a traditional macro's replacement text. */ -void -_cpp_push_text_context (cpp_reader *pfile, cpp_hashnode *macro, - const uchar *start, size_t len) -{ - cpp_context *context = next_context (pfile); - - context->direct_p = true; - context->macro = macro; - context->buff = NULL; - CUR (context) = start; - RLIMIT (context) = start + len; - macro->flags |= NODE_DISABLED; -} - -/* Expand an argument ARG before replacing parameters in a - function-like macro. This works by pushing a context with the - argument's tokens, and then expanding that into a temporary buffer - as if it were a normal part of the token stream. collect_args() - has terminated the argument's tokens with a CPP_EOF so that we know - when we have fully expanded the argument. */ -static void -expand_arg (cpp_reader *pfile, macro_arg *arg) -{ - unsigned int capacity; - bool saved_warn_trad; - - if (arg->count == 0) - return; - - /* Don't warn about funlike macros when pre-expanding. */ - saved_warn_trad = CPP_WTRADITIONAL (pfile); - CPP_WTRADITIONAL (pfile) = 0; - - /* Loop, reading in the arguments. */ - capacity = 256; - arg->expanded = xmalloc (capacity * sizeof (cpp_token *)); - - push_ptoken_context (pfile, NULL, NULL, arg->first, arg->count + 1); - for (;;) - { - const cpp_token *token; - - if (arg->expanded_count + 1 >= capacity) - { - capacity *= 2; - arg->expanded = xrealloc (arg->expanded, - capacity * sizeof (cpp_token *)); - } - - token = cpp_get_token (pfile); - - if (token->type == CPP_EOF) - break; - - arg->expanded[arg->expanded_count++] = token; - } - - _cpp_pop_context (pfile); - - CPP_WTRADITIONAL (pfile) = saved_warn_trad; -} - -/* Pop the current context off the stack, re-enabling the macro if the - context represented a macro's replacement list. The context - structure is not freed so that we can re-use it later. */ -void -_cpp_pop_context (cpp_reader *pfile) -{ - cpp_context *context = pfile->context; - - if (context->macro) - context->macro->flags &= ~NODE_DISABLED; - - if (context->buff) - _cpp_release_buff (pfile, context->buff); - - pfile->context = context->prev; -} - -/* External routine to get a token. Also used nearly everywhere - internally, except for places where we know we can safely call - _cpp_lex_token directly, such as lexing a directive name. - - Macro expansions and directives are transparently handled, - including entering included files. Thus tokens are post-macro - expansion, and after any intervening directives. External callers - see CPP_EOF only at EOF. Internal callers also see it when meeting - a directive inside a macro call, when at the end of a directive and - state.in_directive is still 1, and at the end of argument - pre-expansion. */ -const cpp_token * -cpp_get_token (cpp_reader *pfile) -{ - const cpp_token *result; - - for (;;) - { - cpp_hashnode *node; - cpp_context *context = pfile->context; - - /* Context->prev == 0 <=> base context. */ - if (!context->prev) - result = _cpp_lex_token (pfile); - else if (FIRST (context).token != LAST (context).token) - { - if (context->direct_p) - result = FIRST (context).token++; - else - result = *FIRST (context).ptoken++; - - if (result->flags & PASTE_LEFT) - { - paste_all_tokens (pfile, result); - if (pfile->state.in_directive) - continue; - return padding_token (pfile, result); - } - } - else - { - _cpp_pop_context (pfile); - if (pfile->state.in_directive) - continue; - return &pfile->avoid_paste; - } - - if (pfile->state.in_directive && result->type == CPP_COMMENT) - continue; - - if (result->type != CPP_NAME) - break; - - node = result->val.node; - - if (node->type != NT_MACRO || (result->flags & NO_EXPAND)) - break; - - if (!(node->flags & NODE_DISABLED)) - { - if (!pfile->state.prevent_expansion - && enter_macro_context (pfile, node)) - { - if (pfile->state.in_directive) - continue; - return padding_token (pfile, result); - } - } - else - { - /* Flag this token as always unexpandable. FIXME: move this - to collect_args()?. */ - cpp_token *t = _cpp_temp_token (pfile); - t->type = result->type; - t->flags = result->flags | NO_EXPAND; - t->val.str = result->val.str; - result = t; - } - - break; - } - - return result; -} - -/* Returns true if we're expanding an object-like macro that was - defined in a system header. Just checks the macro at the top of - the stack. Used for diagnostic suppression. */ -int -cpp_sys_macro_p (cpp_reader *pfile) -{ - cpp_hashnode *node = pfile->context->macro; - - return node && node->value.macro && node->value.macro->syshdr; -} - -/* Read each token in, until end of the current file. Directives are - transparently processed. */ -void -cpp_scan_nooutput (cpp_reader *pfile) -{ - /* Request a CPP_EOF token at the end of this file, rather than - transparently continuing with the including file. */ - pfile->buffer->return_at_eof = true; - - if (CPP_OPTION (pfile, traditional)) - while (_cpp_read_logical_line_trad (pfile)) - ; - else - while (cpp_get_token (pfile)->type != CPP_EOF) - ; -} - -/* Step back one (or more) tokens. Can only step mack more than 1 if - they are from the lexer, and not from macro expansion. */ -void -_cpp_backup_tokens (cpp_reader *pfile, unsigned int count) -{ - if (pfile->context->prev == NULL) - { - pfile->lookaheads += count; - while (count--) - { - pfile->cur_token--; - if (pfile->cur_token == pfile->cur_run->base - /* Possible with -fpreprocessed and no leading #line. */ - && pfile->cur_run->prev != NULL) - { - pfile->cur_run = pfile->cur_run->prev; - pfile->cur_token = pfile->cur_run->limit; - } - } - } - else - { - if (count != 1) - abort (); - if (pfile->context->direct_p) - FIRST (pfile->context).token--; - else - FIRST (pfile->context).ptoken--; - } -} - -/* #define directive parsing and handling. */ - -/* Returns nonzero if a macro redefinition warning is required. */ -static bool -warn_of_redefinition (cpp_reader *pfile, const cpp_hashnode *node, - const cpp_macro *macro2) -{ - const cpp_macro *macro1; - unsigned int i; - - /* Some redefinitions need to be warned about regardless. */ - if (node->flags & NODE_WARN) - return true; - - /* Redefinition of a macro is allowed if and only if the old and new - definitions are the same. (6.10.3 paragraph 2). */ - macro1 = node->value.macro; - - /* Don't check count here as it can be different in valid - traditional redefinitions with just whitespace differences. */ - if (macro1->paramc != macro2->paramc - || macro1->fun_like != macro2->fun_like - || macro1->variadic != macro2->variadic) - return true; - - /* Check parameter spellings. */ - for (i = 0; i < macro1->paramc; i++) - if (macro1->params[i] != macro2->params[i]) - return true; - - /* Check the replacement text or tokens. */ - if (CPP_OPTION (pfile, traditional)) - return _cpp_expansions_different_trad (macro1, macro2); - - if (macro1->count != macro2->count) - return true; - - for (i = 0; i < macro1->count; i++) - if (!_cpp_equiv_tokens (¯o1->exp.tokens[i], ¯o2->exp.tokens[i])) - return true; - - return false; -} - -/* Free the definition of hashnode H. */ -void -_cpp_free_definition (cpp_hashnode *h) -{ - /* Macros and assertions no longer have anything to free. */ - h->type = NT_VOID; - /* Clear builtin flag in case of redefinition. */ - h->flags &= ~(NODE_BUILTIN | NODE_DISABLED); -} - -/* Save parameter NODE to the parameter list of macro MACRO. Returns - zero on success, nonzero if the parameter is a duplicate. */ -bool -_cpp_save_parameter (cpp_reader *pfile, cpp_macro *macro, cpp_hashnode *node) -{ - unsigned int len; - /* Constraint 6.10.3.6 - duplicate parameter names. */ - if (node->flags & NODE_MACRO_ARG) - { - cpp_error (pfile, CPP_DL_ERROR, "duplicate macro parameter \"%s\"", - NODE_NAME (node)); - return true; - } - - if (BUFF_ROOM (pfile->a_buff) - < (macro->paramc + 1) * sizeof (cpp_hashnode *)) - _cpp_extend_buff (pfile, &pfile->a_buff, sizeof (cpp_hashnode *)); - - ((cpp_hashnode **) BUFF_FRONT (pfile->a_buff))[macro->paramc++] = node; - node->flags |= NODE_MACRO_ARG; - len = macro->paramc * sizeof (union _cpp_hashnode_value); - if (len > pfile->macro_buffer_len) - { - pfile->macro_buffer = xrealloc (pfile->macro_buffer, len); - pfile->macro_buffer_len = len; - } - ((union _cpp_hashnode_value *) pfile->macro_buffer)[macro->paramc - 1] - = node->value; - - node->value.arg_index = macro->paramc; - return false; -} - -/* Check the syntax of the parameters in a MACRO definition. Returns - false if an error occurs. */ -static bool -parse_params (cpp_reader *pfile, cpp_macro *macro) -{ - unsigned int prev_ident = 0; - - for (;;) - { - const cpp_token *token = _cpp_lex_token (pfile); - - switch (token->type) - { - default: - /* Allow/ignore comments in parameter lists if we are - preserving comments in macro expansions. */ - if (token->type == CPP_COMMENT - && ! CPP_OPTION (pfile, discard_comments_in_macro_exp)) - continue; - - cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" may not appear in macro parameter list", - cpp_token_as_text (pfile, token)); - return false; - - case CPP_NAME: - if (prev_ident) - { - cpp_error (pfile, CPP_DL_ERROR, - "macro parameters must be comma-separated"); - return false; - } - prev_ident = 1; - - if (_cpp_save_parameter (pfile, macro, token->val.node)) - return false; - continue; - - case CPP_CLOSE_PAREN: - if (prev_ident || macro->paramc == 0) - return true; - - /* Fall through to pick up the error. */ - case CPP_COMMA: - if (!prev_ident) - { - cpp_error (pfile, CPP_DL_ERROR, "parameter name missing"); - return false; - } - prev_ident = 0; - continue; - - case CPP_ELLIPSIS: - macro->variadic = 1; - if (!prev_ident) - { - _cpp_save_parameter (pfile, macro, - pfile->spec_nodes.n__VA_ARGS__); - pfile->state.va_args_ok = 1; - if (! CPP_OPTION (pfile, c99) && CPP_OPTION (pfile, pedantic)) - cpp_error (pfile, CPP_DL_PEDWARN, - "anonymous variadic macros were introduced in C99"); - } - else if (CPP_OPTION (pfile, pedantic)) - cpp_error (pfile, CPP_DL_PEDWARN, - "ISO C does not permit named variadic macros"); - - /* We're at the end, and just expect a closing parenthesis. */ - token = _cpp_lex_token (pfile); - if (token->type == CPP_CLOSE_PAREN) - return true; - /* Fall through. */ - - case CPP_EOF: - cpp_error (pfile, CPP_DL_ERROR, "missing ')' in macro parameter list"); - return false; - } - } -} - -/* Allocate room for a token from a macro's replacement list. */ -static cpp_token * -alloc_expansion_token (cpp_reader *pfile, cpp_macro *macro) -{ - if (BUFF_ROOM (pfile->a_buff) < (macro->count + 1) * sizeof (cpp_token)) - _cpp_extend_buff (pfile, &pfile->a_buff, sizeof (cpp_token)); - - return &((cpp_token *) BUFF_FRONT (pfile->a_buff))[macro->count++]; -} - -/* Lex a token from the expansion of MACRO, but mark parameters as we - find them and warn of traditional stringification. */ -static cpp_token * -lex_expansion_token (cpp_reader *pfile, cpp_macro *macro) -{ - cpp_token *token; - - pfile->cur_token = alloc_expansion_token (pfile, macro); - token = _cpp_lex_direct (pfile); - - /* Is this a parameter? */ - if (token->type == CPP_NAME - && (token->val.node->flags & NODE_MACRO_ARG) != 0) - { - token->type = CPP_MACRO_ARG; - token->val.arg_no = token->val.node->value.arg_index; - } - else if (CPP_WTRADITIONAL (pfile) && macro->paramc > 0 - && (token->type == CPP_STRING || token->type == CPP_CHAR)) - check_trad_stringification (pfile, macro, &token->val.str); - - return token; -} - -static bool -create_iso_definition (cpp_reader *pfile, cpp_macro *macro) -{ - cpp_token *token; - const cpp_token *ctoken; - - /* Get the first token of the expansion (or the '(' of a - function-like macro). */ - ctoken = _cpp_lex_token (pfile); - - if (ctoken->type == CPP_OPEN_PAREN && !(ctoken->flags & PREV_WHITE)) - { - bool ok = parse_params (pfile, macro); - macro->params = (cpp_hashnode **) BUFF_FRONT (pfile->a_buff); - if (!ok) - return false; - - /* Success. Commit the parameter array. */ - BUFF_FRONT (pfile->a_buff) = (uchar *) ¯o->params[macro->paramc]; - macro->fun_like = 1; - } - else if (ctoken->type != CPP_EOF && !(ctoken->flags & PREV_WHITE)) - cpp_error (pfile, CPP_DL_PEDWARN, - "ISO C requires whitespace after the macro name"); - - if (macro->fun_like) - token = lex_expansion_token (pfile, macro); - else - { - token = alloc_expansion_token (pfile, macro); - *token = *ctoken; - } - - for (;;) - { - /* Check the stringifying # constraint 6.10.3.2.1 of - function-like macros when lexing the subsequent token. */ - if (macro->count > 1 && token[-1].type == CPP_HASH && macro->fun_like) - { - if (token->type == CPP_MACRO_ARG) - { - token->flags &= ~PREV_WHITE; - token->flags |= STRINGIFY_ARG; - token->flags |= token[-1].flags & PREV_WHITE; - token[-1] = token[0]; - macro->count--; - } - /* Let assembler get away with murder. */ - else if (CPP_OPTION (pfile, lang) != CLK_ASM) - { - cpp_error (pfile, CPP_DL_ERROR, - "'#' is not followed by a macro parameter"); - return false; - } - } - - if (token->type == CPP_EOF) - break; - - /* Paste operator constraint 6.10.3.3.1. */ - if (token->type == CPP_PASTE) - { - /* Token-paste ##, can appear in both object-like and - function-like macros, but not at the ends. */ - if (--macro->count > 0) - token = lex_expansion_token (pfile, macro); - - if (macro->count == 0 || token->type == CPP_EOF) - { - cpp_error (pfile, CPP_DL_ERROR, - "'##' cannot appear at either end of a macro expansion"); - return false; - } - - token[-1].flags |= PASTE_LEFT; - } - - token = lex_expansion_token (pfile, macro); - } - - macro->exp.tokens = (cpp_token *) BUFF_FRONT (pfile->a_buff); - - /* Don't count the CPP_EOF. */ - macro->count--; - - /* Clear whitespace on first token for warn_of_redefinition(). */ - if (macro->count) - macro->exp.tokens[0].flags &= ~PREV_WHITE; - - /* Commit the memory. */ - BUFF_FRONT (pfile->a_buff) = (uchar *) ¯o->exp.tokens[macro->count]; - - return true; -} - -/* Parse a macro and save its expansion. Returns nonzero on success. */ -bool -_cpp_create_definition (cpp_reader *pfile, cpp_hashnode *node) -{ - cpp_macro *macro; - unsigned int i; - bool ok; - - macro = (cpp_macro *) _cpp_aligned_alloc (pfile, sizeof (cpp_macro)); - macro->line = pfile->directive_line; - macro->params = 0; - macro->paramc = 0; - macro->variadic = 0; - macro->used = !CPP_OPTION (pfile, warn_unused_macros); - macro->count = 0; - macro->fun_like = 0; - /* To suppress some diagnostics. */ - macro->syshdr = pfile->map->sysp != 0; - - if (CPP_OPTION (pfile, traditional)) - ok = _cpp_create_trad_definition (pfile, macro); - else - { - cpp_token *saved_cur_token = pfile->cur_token; - - ok = create_iso_definition (pfile, macro); - - /* Restore lexer position because of games lex_expansion_token() - plays lexing the macro. We set the type for SEEN_EOL() in - cpplib.c. - - Longer term we should lex the whole line before coming here, - and just copy the expansion. */ - saved_cur_token[-1].type = pfile->cur_token[-1].type; - pfile->cur_token = saved_cur_token; - - /* Stop the lexer accepting __VA_ARGS__. */ - pfile->state.va_args_ok = 0; - } - - /* Clear the fast argument lookup indices. */ - for (i = macro->paramc; i-- > 0; ) - { - struct cpp_hashnode *node = macro->params[i]; - node->flags &= ~ NODE_MACRO_ARG; - node->value = ((union _cpp_hashnode_value *) pfile->macro_buffer)[i]; - } - - if (!ok) - return ok; - - if (node->type == NT_MACRO) - { - if (CPP_OPTION (pfile, warn_unused_macros)) - _cpp_warn_if_unused_macro (pfile, node, NULL); - - if (warn_of_redefinition (pfile, node, macro)) - { - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->directive_line, 0, - "\"%s\" redefined", NODE_NAME (node)); - - if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN)) - cpp_error_with_line (pfile, CPP_DL_PEDWARN, - node->value.macro->line, 0, - "this is the location of the previous definition"); - } - } - - if (node->type != NT_VOID) - _cpp_free_definition (node); - - /* Enter definition in hash table. */ - node->type = NT_MACRO; - node->value.macro = macro; - if (! ustrncmp (NODE_NAME (node), DSC ("__STDC_"))) - node->flags |= NODE_WARN; - - return ok; -} - -/* Warn if a token in STRING matches one of a function-like MACRO's - parameters. */ -static void -check_trad_stringification (cpp_reader *pfile, const cpp_macro *macro, - const cpp_string *string) -{ - unsigned int i, len; - const uchar *p, *q, *limit; - - /* Loop over the string. */ - limit = string->text + string->len - 1; - for (p = string->text + 1; p < limit; p = q) - { - /* Find the start of an identifier. */ - while (p < limit && !is_idstart (*p)) - p++; - - /* Find the end of the identifier. */ - q = p; - while (q < limit && is_idchar (*q)) - q++; - - len = q - p; - - /* Loop over the function macro arguments to see if the - identifier inside the string matches one of them. */ - for (i = 0; i < macro->paramc; i++) - { - const cpp_hashnode *node = macro->params[i]; - - if (NODE_LEN (node) == len - && !memcmp (p, NODE_NAME (node), len)) - { - cpp_error (pfile, CPP_DL_WARNING, - "macro argument \"%s\" would be stringified in traditional C", - NODE_NAME (node)); - break; - } - } - } -} - -/* Returns the name, arguments and expansion of a macro, in a format - suitable to be read back in again, and therefore also for DWARF 2 - debugging info. e.g. "PASTE(X, Y) X ## Y", or "MACNAME EXPANSION". - Caller is expected to generate the "#define" bit if needed. The - returned text is temporary, and automatically freed later. */ -const unsigned char * -cpp_macro_definition (cpp_reader *pfile, const cpp_hashnode *node) -{ - unsigned int i, len; - const cpp_macro *macro = node->value.macro; - unsigned char *buffer; - - if (node->type != NT_MACRO || (node->flags & NODE_BUILTIN)) - { - cpp_error (pfile, CPP_DL_ICE, - "invalid hash type %d in cpp_macro_definition", node->type); - return 0; - } - - /* Calculate length. */ - len = NODE_LEN (node) + 2; /* ' ' and NUL. */ - if (macro->fun_like) - { - len += 4; /* "()" plus possible final ".." of named - varargs (we have + 1 below). */ - for (i = 0; i < macro->paramc; i++) - len += NODE_LEN (macro->params[i]) + 1; /* "," */ - } - - /* This should match below where we fill in the buffer. */ - if (CPP_OPTION (pfile, traditional)) - len += _cpp_replacement_text_len (macro); - else - { - for (i = 0; i < macro->count; i++) - { - cpp_token *token = ¯o->exp.tokens[i]; - - if (token->type == CPP_MACRO_ARG) - len += NODE_LEN (macro->params[token->val.arg_no - 1]); - else - len += cpp_token_len (token); - - if (token->flags & STRINGIFY_ARG) - len++; /* "#" */ - if (token->flags & PASTE_LEFT) - len += 3; /* " ##" */ - if (token->flags & PREV_WHITE) - len++; /* " " */ - } - } - - if (len > pfile->macro_buffer_len) - { - pfile->macro_buffer = xrealloc (pfile->macro_buffer, len); - pfile->macro_buffer_len = len; - } - - /* Fill in the buffer. Start with the macro name. */ - buffer = pfile->macro_buffer; - memcpy (buffer, NODE_NAME (node), NODE_LEN (node)); - buffer += NODE_LEN (node); - - /* Parameter names. */ - if (macro->fun_like) - { - *buffer++ = '('; - for (i = 0; i < macro->paramc; i++) - { - cpp_hashnode *param = macro->params[i]; - - if (param != pfile->spec_nodes.n__VA_ARGS__) - { - memcpy (buffer, NODE_NAME (param), NODE_LEN (param)); - buffer += NODE_LEN (param); - } - - if (i + 1 < macro->paramc) - /* Don't emit a space after the comma here; we're trying - to emit a Dwarf-friendly definition, and the Dwarf spec - forbids spaces in the argument list. */ - *buffer++ = ','; - else if (macro->variadic) - *buffer++ = '.', *buffer++ = '.', *buffer++ = '.'; - } - *buffer++ = ')'; - } - - /* The Dwarf spec requires a space after the macro name, even if the - definition is the empty string. */ - *buffer++ = ' '; - - if (CPP_OPTION (pfile, traditional)) - buffer = _cpp_copy_replacement_text (macro, buffer); - else if (macro->count) - /* Expansion tokens. */ - { - for (i = 0; i < macro->count; i++) - { - cpp_token *token = ¯o->exp.tokens[i]; - - if (token->flags & PREV_WHITE) - *buffer++ = ' '; - if (token->flags & STRINGIFY_ARG) - *buffer++ = '#'; - - if (token->type == CPP_MACRO_ARG) - { - memcpy (buffer, - NODE_NAME (macro->params[token->val.arg_no - 1]), - NODE_LEN (macro->params[token->val.arg_no - 1])); - buffer += NODE_LEN (macro->params[token->val.arg_no - 1]); - } - else - buffer = cpp_spell_token (pfile, token, buffer); - - if (token->flags & PASTE_LEFT) - { - *buffer++ = ' '; - *buffer++ = '#'; - *buffer++ = '#'; - /* Next has PREV_WHITE; see _cpp_create_definition. */ - } - } - } - - *buffer = '\0'; - return pfile->macro_buffer; -} diff --git a/contrib/gcc/cpppch.c b/contrib/gcc/cpppch.c deleted file mode 100644 index 872908d..0000000 --- a/contrib/gcc/cpppch.c +++ /dev/null @@ -1,717 +0,0 @@ -/* Part of CPP library. (Precompiled header reading/writing.) - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" -#include "intl.h" -#include "hashtab.h" -#include "mkdeps.h" - -static int write_macdef (cpp_reader *, cpp_hashnode *, void *); -static int save_idents (cpp_reader *, cpp_hashnode *, void *); -static hashval_t hashmem (const void *, size_t); -static hashval_t cpp_string_hash (const void *); -static int cpp_string_eq (const void *, const void *); -static int count_defs (cpp_reader *, cpp_hashnode *, void *); -static int comp_hashnodes (const void *, const void *); -static int collect_ht_nodes (cpp_reader *, cpp_hashnode *, void *); -static int write_defs (cpp_reader *, cpp_hashnode *, void *); -static int save_macros (cpp_reader *, cpp_hashnode *, void *); - -/* This structure represents a macro definition on disk. */ -struct macrodef_struct -{ - unsigned int definition_length; - unsigned short name_length; - unsigned short flags; -}; - -/* This is how we write out a macro definition. - Suitable for being called by cpp_forall_identifiers. */ - -static int -write_macdef (cpp_reader *pfile, cpp_hashnode *hn, void *file_p) -{ - FILE *f = (FILE *) file_p; - switch (hn->type) - { - case NT_VOID: - if (! (hn->flags & NODE_POISONED)) - return 1; - - case NT_MACRO: - if ((hn->flags & NODE_BUILTIN)) - return 1; - - { - struct macrodef_struct s; - const unsigned char *defn; - - s.name_length = NODE_LEN (hn); - s.flags = hn->flags & NODE_POISONED; - - if (hn->type == NT_MACRO) - { - defn = cpp_macro_definition (pfile, hn); - s.definition_length = ustrlen (defn); - } - else - { - defn = NODE_NAME (hn); - s.definition_length = s.name_length; - } - - if (fwrite (&s, sizeof (s), 1, f) != 1 - || fwrite (defn, 1, s.definition_length, f) != s.definition_length) - { - cpp_errno (pfile, CPP_DL_ERROR, - "while writing precompiled header"); - return 0; - } - } - return 1; - - case NT_ASSERTION: - /* Not currently implemented. */ - return 1; - - default: - abort (); - } -} - -/* This structure records the names of the defined macros. - It's also used as a callback structure for size_initial_idents - and save_idents. */ - -struct cpp_savedstate -{ - /* A hash table of the defined identifiers. */ - htab_t definedhash; - /* The size of the definitions of those identifiers (the size of - 'definedstrs'). */ - size_t hashsize; - /* Number of definitions */ - size_t n_defs; - /* Array of definitions. In cpp_write_pch_deps it is used for sorting. */ - cpp_hashnode **defs; - /* Space for the next definition. Definitions are null-terminated - strings. */ - unsigned char *definedstrs; -}; - -/* Save this identifier into the state: put it in the hash table, - put the definition in 'definedstrs'. */ - -static int -save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) -{ - struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - - if (hn->type != NT_VOID) - { - struct cpp_string news; - void **slot; - - news.len = NODE_LEN (hn); - news.text= NODE_NAME (hn); - slot = htab_find_slot (ss->definedhash, &news, INSERT); - if (*slot == NULL) - { - struct cpp_string *sp; - unsigned char *text; - - sp = xmalloc (sizeof (struct cpp_string)); - *slot = sp; - - sp->len = NODE_LEN (hn); - sp->text = text = xmalloc (NODE_LEN (hn)); - memcpy (text, NODE_NAME (hn), NODE_LEN (hn)); - } - } - - return 1; -} - -/* Hash some memory in a generic way. */ - -static hashval_t -hashmem (const void *p_p, size_t sz) -{ - const unsigned char *p = (const unsigned char *)p_p; - size_t i; - hashval_t h; - - h = 0; - for (i = 0; i < sz; i++) - h = h * 67 - (*p++ - 113); - return h; -} - -/* Hash a cpp string for the hashtable machinery. */ - -static hashval_t -cpp_string_hash (const void *a_p) -{ - const struct cpp_string *a = (const struct cpp_string *) a_p; - return hashmem (a->text, a->len); -} - -/* Compare two cpp strings for the hashtable machinery. */ - -static int -cpp_string_eq (const void *a_p, const void *b_p) -{ - const struct cpp_string *a = (const struct cpp_string *) a_p; - const struct cpp_string *b = (const struct cpp_string *) b_p; - return (a->len == b->len - && memcmp (a->text, b->text, a->len) == 0); -} - -/* Save the current definitions of the cpp_reader for dependency - checking purposes. When writing a precompiled header, this should - be called at the same point in the compilation as cpp_valid_state - would be called when reading the precompiled header back in. */ - -int -cpp_save_state (cpp_reader *r, FILE *f) -{ - /* Save the list of non-void identifiers for the dependency checking. */ - r->savedstate = xmalloc (sizeof (struct cpp_savedstate)); - r->savedstate->definedhash = htab_create (100, cpp_string_hash, - cpp_string_eq, NULL); - cpp_forall_identifiers (r, save_idents, r->savedstate); - - /* Write out the list of defined identifiers. */ - cpp_forall_identifiers (r, write_macdef, f); - - return 0; -} - -/* Calculate the 'hashsize' field of the saved state. */ - -static int -count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) -{ - struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - - switch (hn->type) - { - case NT_MACRO: - if (hn->flags & NODE_BUILTIN) - return 1; - - /* else fall through. */ - - case NT_VOID: - { - struct cpp_string news; - void **slot; - - news.len = NODE_LEN (hn); - news.text = NODE_NAME (hn); - slot = htab_find (ss->definedhash, &news); - if (slot == NULL) - { - ss->hashsize += NODE_LEN (hn) + 1; - ss->n_defs += 1; - } - } - return 1; - - case NT_ASSERTION: - /* Not currently implemented. */ - return 1; - - default: - abort (); - } -} - -/* Collect the identifiers into the state's string table. */ -static int -write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) -{ - struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - - switch (hn->type) - { - case NT_MACRO: - if (hn->flags & NODE_BUILTIN) - return 1; - - /* else fall through. */ - - case NT_VOID: - { - struct cpp_string news; - void **slot; - - news.len = NODE_LEN (hn); - news.text = NODE_NAME (hn); - slot = htab_find (ss->definedhash, &news); - if (slot == NULL) - { - ss->defs[ss->n_defs] = hn; - ss->n_defs += 1; - } - } - return 1; - - case NT_ASSERTION: - /* Not currently implemented. */ - return 1; - - default: - abort (); - } -} - -/* Comparison function for qsort. The arguments point to pointers of - type ht_hashnode *. */ -static int -comp_hashnodes (const void *px, const void *py) -{ - cpp_hashnode *x = *(cpp_hashnode **) px; - cpp_hashnode *y = *(cpp_hashnode **) py; - return ustrcmp (NODE_NAME (x), NODE_NAME (y)); -} - -/* Write out the remainder of the dependency information. This should be - called after the PCH is ready to be saved. */ - -int -cpp_write_pch_deps (cpp_reader *r, FILE *f) -{ - struct macrodef_struct z; - struct cpp_savedstate *const ss = r->savedstate; - unsigned char *definedstrs; - size_t i; - - /* Collect the list of identifiers which have been seen and - weren't defined to anything previously. */ - ss->hashsize = 0; - ss->n_defs = 0; - cpp_forall_identifiers (r, count_defs, ss); - - ss->defs = xmalloc (ss->n_defs * sizeof (cpp_hashnode *)); - ss->n_defs = 0; - cpp_forall_identifiers (r, write_defs, ss); - - /* Sort the list, copy it into a buffer, and write it out. */ - qsort (ss->defs, ss->n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); - definedstrs = ss->definedstrs = xmalloc (ss->hashsize); - for (i = 0; i < ss->n_defs; ++i) - { - size_t len = NODE_LEN (ss->defs[i]); - memcpy (definedstrs, NODE_NAME (ss->defs[i]), len + 1); - definedstrs += len + 1; - } - - memset (&z, 0, sizeof (z)); - z.definition_length = ss->hashsize; - if (fwrite (&z, sizeof (z), 1, f) != 1 - || fwrite (ss->definedstrs, ss->hashsize, 1, f) != 1) - { - cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); - return -1; - } - free (ss->definedstrs); - - /* Free the saved state. */ - free (ss); - r->savedstate = NULL; - return 0; -} - -/* Write out the definitions of the preprocessor, in a form suitable for - cpp_read_state. */ - -int -cpp_write_pch_state (cpp_reader *r, FILE *f) -{ - struct macrodef_struct z; - - /* Write out the list of defined identifiers. */ - cpp_forall_identifiers (r, write_macdef, f); - memset (&z, 0, sizeof (z)); - if (fwrite (&z, sizeof (z), 1, f) != 1) - { - cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); - return -1; - } - - if (!r->deps) - r->deps = deps_init (); - - if (deps_save (r->deps, f) != 0) - { - cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); - return -1; - } - - return 0; -} - - -/* Data structure to transform hash table nodes into a sorted list */ - -struct ht_node_list -{ - /* Array of nodes */ - cpp_hashnode **defs; - /* Number of nodes in the array */ - size_t n_defs; - /* Size of the allocated array */ - size_t asize; -}; - -/* Callback for collecting identifiers from hash table */ - -static int -collect_ht_nodes (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, - void *nl_p) -{ - struct ht_node_list *const nl = (struct ht_node_list *)nl_p; - - if (hn->type != NT_VOID || hn->flags & NODE_POISONED) - { - if (nl->n_defs == nl->asize) - { - nl->asize *= 2; - nl->defs = xrealloc (nl->defs, nl->asize * sizeof (cpp_hashnode *)); - } - - nl->defs[nl->n_defs] = hn; - ++nl->n_defs; - } - return 1; -} - - -/* Return nonzero if FD is a precompiled header which is consistent - with the preprocessor's current definitions. It will be consistent - when: - - - anything that was defined just before the PCH was generated - is defined the same way now; and - - anything that was not defined then, but is defined now, was not - used by the PCH. - - NAME is used to print warnings if `warn_invalid_pch' is set in the - reader's flags. -*/ - -int -cpp_valid_state (cpp_reader *r, const char *name, int fd) -{ - struct macrodef_struct m; - size_t namebufsz = 256; - unsigned char *namebuf = xmalloc (namebufsz); - unsigned char *undeftab = NULL; - struct ht_node_list nl = { 0, 0, 0 }; - unsigned char *first, *last; - unsigned int i; - - /* Read in the list of identifiers that must be defined - Check that they are defined in the same way. */ - for (;;) - { - cpp_hashnode *h; - const unsigned char *newdefn; - - if (read (fd, &m, sizeof (m)) != sizeof (m)) - goto error; - - if (m.name_length == 0) - break; - - if (m.definition_length > namebufsz) - { - free (namebuf); - namebufsz = m.definition_length + 256; - namebuf = xmalloc (namebufsz); - } - - if ((size_t)read (fd, namebuf, m.definition_length) - != m.definition_length) - goto error; - - h = cpp_lookup (r, namebuf, m.name_length); - if (m.flags & NODE_POISONED - || h->type != NT_MACRO - || h->flags & NODE_POISONED) - { - if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, - "%s: not used because `%.*s' not defined", - name, m.name_length, namebuf); - goto fail; - } - - newdefn = cpp_macro_definition (r, h); - - if (m.definition_length != ustrlen (newdefn) - || memcmp (namebuf, newdefn, m.definition_length) != 0) - { - if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, - "%s: not used because `%.*s' defined as `%s' not `%.*s'", - name, m.name_length, namebuf, newdefn + m.name_length, - m.definition_length - m.name_length, - namebuf + m.name_length); - goto fail; - } - } - free (namebuf); - namebuf = NULL; - - /* Read in the list of identifiers that must not be defined. - Check that they really aren't. */ - undeftab = xmalloc (m.definition_length); - if ((size_t) read (fd, undeftab, m.definition_length) != m.definition_length) - goto error; - - /* Collect identifiers from the current hash table. */ - nl.n_defs = 0; - nl.asize = 10; - nl.defs = xmalloc (nl.asize * sizeof (cpp_hashnode *)); - cpp_forall_identifiers (r, &collect_ht_nodes, &nl); - qsort (nl.defs, nl.n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); - - /* Loop through nl.defs and undeftab, both of which are sorted lists. - There should be no matches. */ - first = undeftab; - last = undeftab + m.definition_length; - i = 0; - - while (first < last && i < nl.n_defs) - { - int cmp = ustrcmp (first, NODE_NAME (nl.defs[i])); - - if (cmp < 0) - first += ustrlen (first) + 1; - else if (cmp > 0) - ++i; - else - { - if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, - "%s: not used because `%s' is defined", - name, first); - goto fail; - } - } - - free(nl.defs); - free (undeftab); - - /* We win! */ - return 0; - - error: - cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); - return -1; - - fail: - if (namebuf != NULL) - free (namebuf); - if (undeftab != NULL) - free (undeftab); - if (nl.defs != NULL) - free (nl.defs); - return 1; -} - -/* Save all the existing macros and assertions. - This code assumes that there might be hundreds, but not thousands of - existing definitions. */ - -struct save_macro_item { - struct save_macro_item *next; - struct cpp_hashnode macs[64]; -}; - -struct save_macro_data -{ - struct save_macro_item *macros; - size_t count; - char **saved_pragmas; -}; - -/* Save the definition of a single macro, so that it will persist across - a PCH restore. */ - -static int -save_macros (cpp_reader *r ATTRIBUTE_UNUSED, cpp_hashnode *h, void *data_p) -{ - struct save_macro_data *data = (struct save_macro_data *)data_p; - if (h->type != NT_VOID - && (h->flags & NODE_BUILTIN) == 0) - { - cpp_hashnode *save; - if (data->count == ARRAY_SIZE (data->macros->macs)) - { - struct save_macro_item *d = data->macros; - data->macros = xmalloc (sizeof (struct save_macro_item)); - data->macros->next = d; - data->count = 0; - } - save = data->macros->macs + data->count; - data->count++; - memcpy (save, h, sizeof (struct cpp_hashnode)); - HT_STR (&save->ident) = xmemdup (HT_STR (HT_NODE (save)), - HT_LEN (HT_NODE (save)), - HT_LEN (HT_NODE (save)) + 1); - } - return 1; -} - -/* Prepare to restore the state, by saving the currently-defined - macros in 'data'. */ - -void -cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) -{ - struct save_macro_data *d = xmalloc (sizeof (struct save_macro_data)); - - d->macros = NULL; - d->count = ARRAY_SIZE (d->macros->macs); - cpp_forall_identifiers (r, save_macros, d); - d->saved_pragmas = _cpp_save_pragma_names (r); - *data = d; -} - -/* Given a precompiled header that was previously determined to be valid, - apply all its definitions (and undefinitions) to the current state. - DEPNAME is passed to deps_restore. */ - -int -cpp_read_state (cpp_reader *r, const char *name, FILE *f, - struct save_macro_data *data) -{ - struct macrodef_struct m; - size_t defnlen = 256; - unsigned char *defn = xmalloc (defnlen); - struct lexer_state old_state; - struct save_macro_item *d; - size_t i, mac_count; - int saved_line = r->line; - - /* Restore spec_nodes, which will be full of references to the old - hashtable entries and so will now be invalid. */ - { - struct spec_nodes *s = &r->spec_nodes; - s->n_defined = cpp_lookup (r, DSC("defined")); - s->n_true = cpp_lookup (r, DSC("true")); - s->n_false = cpp_lookup (r, DSC("false")); - s->n__VA_ARGS__ = cpp_lookup (r, DSC("__VA_ARGS__")); - } - - /* Run through the carefully-saved macros, insert them. */ - d = data->macros; - mac_count = data->count; - while (d) - { - struct save_macro_item *nextd; - for (i = 0; i < mac_count; i++) - { - cpp_hashnode *h; - - h = cpp_lookup (r, HT_STR (HT_NODE (&d->macs[i])), - HT_LEN (HT_NODE (&d->macs[i]))); - h->type = d->macs[i].type; - h->flags = d->macs[i].flags; - h->value = d->macs[i].value; - free ((void *)HT_STR (HT_NODE (&d->macs[i]))); - } - nextd = d->next; - free (d); - d = nextd; - mac_count = ARRAY_SIZE (d->macs); - } - - _cpp_restore_pragma_names (r, data->saved_pragmas); - - free (data); - - old_state = r->state; - - r->state.in_directive = 1; - r->state.prevent_expansion = 1; - r->state.angled_headers = 0; - - /* Read in the identifiers that must be defined. */ - for (;;) - { - cpp_hashnode *h; - - if (fread (&m, sizeof (m), 1, f) != 1) - goto error; - - if (m.name_length == 0) - break; - - if (defnlen < m.definition_length + 1) - { - defnlen = m.definition_length + 256; - defn = xrealloc (defn, defnlen); - } - - if (fread (defn, 1, m.definition_length, f) != m.definition_length) - goto error; - defn[m.definition_length] = '\n'; - - h = cpp_lookup (r, defn, m.name_length); - - if (h->type == NT_MACRO) - _cpp_free_definition (h); - if (m.flags & NODE_POISONED) - h->flags |= NODE_POISONED | NODE_DIAGNOSTIC; - else if (m.name_length != m.definition_length) - { - if (cpp_push_buffer (r, defn + m.name_length, - m.definition_length - m.name_length, true) - != NULL) - { - _cpp_clean_line (r); - if (!_cpp_create_definition (r, h)) - abort (); - _cpp_pop_buffer (r); - } - else - abort (); - } - } - - r->state = old_state; - r->line = saved_line; - free (defn); - defn = NULL; - - if (deps_restore (r->deps, f, CPP_OPTION (r, restore_pch_deps) ? name : NULL) - != 0) - goto error; - - return 0; - - error: - cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); - return -1; -} diff --git a/contrib/gcc/cpptrad.c b/contrib/gcc/cpptrad.c deleted file mode 100644 index 6315b10..0000000 --- a/contrib/gcc/cpptrad.c +++ /dev/null @@ -1,1110 +0,0 @@ -/* CPP Library - traditional lexical analysis and macro expansion. - Copyright (C) 2002, 2004 Free Software Foundation, Inc. - Contributed by Neil Booth, May 2002 - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "config.h" -#include "system.h" -#include "cpplib.h" -#include "cpphash.h" - -/* The replacement text of a function-like macro is stored as a - contiguous sequence of aligned blocks, each representing the text - between subsequent parameters. - - Each block comprises the text between its surrounding parameters, - the length of that text, and the one-based index of the following - parameter. The final block in the replacement text is easily - recognizable as it has an argument index of zero. */ - -struct block -{ - unsigned int text_len; - unsigned short arg_index; - uchar text[1]; -}; - -#define BLOCK_HEADER_LEN offsetof (struct block, text) -#define BLOCK_LEN(TEXT_LEN) CPP_ALIGN (BLOCK_HEADER_LEN + (TEXT_LEN)) - -/* Structure holding information about a function-like macro - invocation. */ -struct fun_macro -{ - /* Memory buffer holding the trad_arg array. */ - _cpp_buff *buff; - - /* An array of size the number of macro parameters + 1, containing - the offsets of the start of each macro argument in the output - buffer. The argument continues until the character before the - start of the next one. */ - size_t *args; - - /* The hashnode of the macro. */ - cpp_hashnode *node; - - /* The offset of the macro name in the output buffer. */ - size_t offset; - - /* The line the macro name appeared on. */ - unsigned int line; - - /* Zero-based index of argument being currently lexed. */ - unsigned int argc; -}; - -/* Lexing state. It is mostly used to prevent macro expansion. */ -enum ls {ls_none = 0, /* Normal state. */ - ls_fun_open, /* When looking for '('. */ - ls_fun_close, /* When looking for ')'. */ - ls_defined, /* After defined. */ - ls_defined_close, /* Looking for ')' of defined(). */ - ls_hash, /* After # in preprocessor conditional. */ - ls_predicate, /* After the predicate, maybe paren? */ - ls_answer}; /* In answer to predicate. */ - -/* Lexing TODO: Maybe handle space in escaped newlines. Stop cpplex.c - from recognizing comments and directives during its lexing pass. */ - -static const uchar *skip_whitespace (cpp_reader *, const uchar *, int); -static cpp_hashnode *lex_identifier (cpp_reader *, const uchar *); -static const uchar *copy_comment (cpp_reader *, const uchar *, int); -static void check_output_buffer (cpp_reader *, size_t); -static void push_replacement_text (cpp_reader *, cpp_hashnode *); -static bool scan_parameters (cpp_reader *, cpp_macro *); -static bool recursive_macro (cpp_reader *, cpp_hashnode *); -static void save_replacement_text (cpp_reader *, cpp_macro *, unsigned int); -static void maybe_start_funlike (cpp_reader *, cpp_hashnode *, const uchar *, - struct fun_macro *); -static void save_argument (struct fun_macro *, size_t); -static void replace_args_and_push (cpp_reader *, struct fun_macro *); -static size_t canonicalize_text (uchar *, const uchar *, size_t, uchar *); - -/* Ensures we have N bytes' space in the output buffer, and - reallocates it if not. */ -static void -check_output_buffer (cpp_reader *pfile, size_t n) -{ - /* We might need two bytes to terminate an unterminated comment, and - one more to terminate the line with a NUL. */ - n += 2 + 1; - - if (n > (size_t) (pfile->out.limit - pfile->out.cur)) - { - size_t size = pfile->out.cur - pfile->out.base; - size_t new_size = (size + n) * 3 / 2; - - pfile->out.base = xrealloc (pfile->out.base, new_size); - pfile->out.limit = pfile->out.base + new_size; - pfile->out.cur = pfile->out.base + size; - } -} - -/* Skip a C-style block comment in a macro as a result of -CC. - Buffer->cur points to the initial asterisk of the comment. */ -static void -skip_macro_block_comment (cpp_reader *pfile) -{ - const uchar *cur = pfile->buffer->cur; - - cur++; - if (*cur == '/') - cur++; - - /* People like decorating comments with '*', so check for '/' - instead for efficiency. */ - while(! (*cur++ == '/' && cur[-2] == '*') ) - ; - - pfile->buffer->cur = cur; -} - -/* CUR points to the asterisk introducing a comment in the current - context. IN_DEFINE is true if we are in the replacement text of a - macro. - - The asterisk and following comment is copied to the buffer pointed - to by pfile->out.cur, which must be of sufficient size. - Unterminated comments are diagnosed, and correctly terminated in - the output. pfile->out.cur is updated depending upon IN_DEFINE, - -C, -CC and pfile->state.in_directive. - - Returns a pointer to the first character after the comment in the - input buffer. */ -static const uchar * -copy_comment (cpp_reader *pfile, const uchar *cur, int in_define) -{ - bool unterminated, copy = false; - unsigned int from_line = pfile->line; - cpp_buffer *buffer = pfile->buffer; - - buffer->cur = cur; - if (pfile->context->prev) - unterminated = false, skip_macro_block_comment (pfile); - else - unterminated = _cpp_skip_block_comment (pfile); - - if (unterminated) - cpp_error_with_line (pfile, CPP_DL_ERROR, from_line, 0, - "unterminated comment"); - - /* Comments in directives become spaces so that tokens are properly - separated when the ISO preprocessor re-lexes the line. The - exception is #define. */ - if (pfile->state.in_directive) - { - if (in_define) - { - if (CPP_OPTION (pfile, discard_comments_in_macro_exp)) - pfile->out.cur--; - else - copy = true; - } - else - pfile->out.cur[-1] = ' '; - } - else if (CPP_OPTION (pfile, discard_comments)) - pfile->out.cur--; - else - copy = true; - - if (copy) - { - size_t len = (size_t) (buffer->cur - cur); - memcpy (pfile->out.cur, cur, len); - pfile->out.cur += len; - if (unterminated) - { - *pfile->out.cur++ = '*'; - *pfile->out.cur++ = '/'; - } - } - - return buffer->cur; -} - -/* CUR points to any character in the input buffer. Skips over all - contiguous horizontal white space and NULs, including comments if - SKIP_COMMENTS, until reaching the first non-horizontal-whitespace - character or the end of the current context. Escaped newlines are - removed. - - The whitespace is copied verbatim to the output buffer, except that - comments are handled as described in copy_comment(). - pfile->out.cur is updated. - - Returns a pointer to the first character after the whitespace in - the input buffer. */ -static const uchar * -skip_whitespace (cpp_reader *pfile, const uchar *cur, int skip_comments) -{ - uchar *out = pfile->out.cur; - - for (;;) - { - unsigned int c = *cur++; - *out++ = c; - - if (is_nvspace (c)) - continue; - - if (c == '/' && *cur == '*' && skip_comments) - { - pfile->out.cur = out; - cur = copy_comment (pfile, cur, false /* in_define */); - out = pfile->out.cur; - continue; - } - - out--; - break; - } - - pfile->out.cur = out; - return cur - 1; -} - -/* Lexes and outputs an identifier starting at CUR, which is assumed - to point to a valid first character of an identifier. Returns - the hashnode, and updates out.cur. */ -static cpp_hashnode * -lex_identifier (cpp_reader *pfile, const uchar *cur) -{ - size_t len; - uchar *out = pfile->out.cur; - cpp_hashnode *result; - - do - *out++ = *cur++; - while (is_numchar (*cur)); - - CUR (pfile->context) = cur; - len = out - pfile->out.cur; - result = (cpp_hashnode *) ht_lookup (pfile->hash_table, pfile->out.cur, - len, HT_ALLOC); - pfile->out.cur = out; - return result; -} - -/* Overlays the true file buffer temporarily with text of length LEN - starting at START. The true buffer is restored upon calling - restore_buff(). */ -void -_cpp_overlay_buffer (cpp_reader *pfile, const uchar *start, size_t len) -{ - cpp_buffer *buffer = pfile->buffer; - - pfile->overlaid_buffer = buffer; - buffer->saved_cur = buffer->cur; - buffer->saved_rlimit = buffer->rlimit; - /* Prevent the ISO lexer from scanning a fresh line. */ - pfile->saved_line = pfile->line--; - buffer->need_line = false; - - buffer->cur = start; - buffer->rlimit = start + len; -} - -/* Restores a buffer overlaid by _cpp_overlay_buffer(). */ -void -_cpp_remove_overlay (cpp_reader *pfile) -{ - cpp_buffer *buffer = pfile->overlaid_buffer; - - buffer->cur = buffer->saved_cur; - buffer->rlimit = buffer->saved_rlimit; - buffer->need_line = true; - - pfile->overlaid_buffer = NULL; - pfile->line = pfile->saved_line; -} - -/* Reads a logical line into the output buffer. Returns TRUE if there - is more text left in the buffer. */ -bool -_cpp_read_logical_line_trad (cpp_reader *pfile) -{ - do - { - if (pfile->buffer->need_line && !_cpp_get_fresh_line (pfile)) - return false; - } - while (!_cpp_scan_out_logical_line (pfile, NULL) || pfile->state.skipping); - - return pfile->buffer != NULL; -} - -/* Set up state for finding the opening '(' of a function-like - macro. */ -static void -maybe_start_funlike (cpp_reader *pfile, cpp_hashnode *node, const uchar *start, struct fun_macro *macro) -{ - unsigned int n = node->value.macro->paramc + 1; - - if (macro->buff) - _cpp_release_buff (pfile, macro->buff); - macro->buff = _cpp_get_buff (pfile, n * sizeof (size_t)); - macro->args = (size_t *) BUFF_FRONT (macro->buff); - macro->node = node; - macro->offset = start - pfile->out.base; - macro->argc = 0; -} - -/* Save the OFFSET of the start of the next argument to MACRO. */ -static void -save_argument (struct fun_macro *macro, size_t offset) -{ - macro->argc++; - if (macro->argc <= macro->node->value.macro->paramc) - macro->args[macro->argc] = offset; -} - -/* Copies the next logical line in the current buffer (starting at - buffer->cur) to the output buffer. The output is guaranteed to - terminate with a NUL character. buffer->cur is updated. - - If MACRO is non-NULL, then we are scanning the replacement list of - MACRO, and we call save_replacement_text() every time we meet an - argument. */ -bool -_cpp_scan_out_logical_line (cpp_reader *pfile, cpp_macro *macro) -{ - bool result = true; - cpp_context *context; - const uchar *cur; - uchar *out; - struct fun_macro fmacro; - unsigned int c, paren_depth = 0, quote; - enum ls lex_state = ls_none; - bool header_ok; - const uchar *start_of_input_line; - - fmacro.buff = NULL; - - quote = 0; - header_ok = pfile->state.angled_headers; - CUR (pfile->context) = pfile->buffer->cur; - RLIMIT (pfile->context) = pfile->buffer->rlimit; - pfile->out.cur = pfile->out.base; - pfile->out.first_line = pfile->line; - /* start_of_input_line is needed to make sure that directives really, - really start at the first character of the line. */ - start_of_input_line = pfile->buffer->cur; - new_context: - context = pfile->context; - cur = CUR (context); - check_output_buffer (pfile, RLIMIT (context) - cur); - out = pfile->out.cur; - - for (;;) - { - if (!context->prev - && cur >= pfile->buffer->notes[pfile->buffer->cur_note].pos) - { - pfile->buffer->cur = cur; - _cpp_process_line_notes (pfile, false); - } - c = *cur++; - *out++ = c; - - /* Whitespace should "continue" out of the switch, - non-whitespace should "break" out of it. */ - switch (c) - { - case ' ': - case '\t': - case '\f': - case '\v': - case '\0': - continue; - - case '\n': - /* If this is a macro's expansion, pop it. */ - if (context->prev) - { - pfile->out.cur = out - 1; - _cpp_pop_context (pfile); - goto new_context; - } - - /* Omit the newline from the output buffer. */ - pfile->out.cur = out - 1; - pfile->buffer->cur = cur; - pfile->buffer->need_line = true; - pfile->line++; - - if ((lex_state == ls_fun_open || lex_state == ls_fun_close) - && !pfile->state.in_directive - && _cpp_get_fresh_line (pfile)) - { - /* Newlines in arguments become a space, but we don't - clear any in-progress quote. */ - if (lex_state == ls_fun_close) - out[-1] = ' '; - cur = pfile->buffer->cur; - continue; - } - goto done; - - case '<': - if (header_ok) - quote = '>'; - break; - case '>': - if (c == quote) - quote = 0; - break; - - case '"': - case '\'': - if (c == quote) - quote = 0; - else if (!quote) - quote = c; - break; - - case '\\': - /* Skip escaped quotes here, it's easier than above. */ - if (*cur == '\\' || *cur == '"' || *cur == '\'') - *out++ = *cur++; - break; - - case '/': - /* Traditional CPP does not recognize comments within - literals. */ - if (!quote && *cur == '*') - { - pfile->out.cur = out; - cur = copy_comment (pfile, cur, macro != 0); - out = pfile->out.cur; - continue; - } - break; - - case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - if (!pfile->state.skipping && (quote == 0 || macro)) - { - cpp_hashnode *node; - uchar *out_start = out - 1; - - pfile->out.cur = out_start; - node = lex_identifier (pfile, cur - 1); - out = pfile->out.cur; - cur = CUR (context); - - if (node->type == NT_MACRO - /* Should we expand for ls_answer? */ - && (lex_state == ls_none || lex_state == ls_fun_open) - && !pfile->state.prevent_expansion) - { - /* Macros invalidate MI optimization. */ - pfile->mi_valid = false; - if (! (node->flags & NODE_BUILTIN) - && node->value.macro->fun_like) - { - maybe_start_funlike (pfile, node, out_start, &fmacro); - lex_state = ls_fun_open; - fmacro.line = pfile->line; - continue; - } - else if (!recursive_macro (pfile, node)) - { - /* Remove the object-like macro's name from the - output, and push its replacement text. */ - pfile->out.cur = out_start; - push_replacement_text (pfile, node); - lex_state = ls_none; - goto new_context; - } - } - else if (macro && (node->flags & NODE_MACRO_ARG) != 0) - { - /* Found a parameter in the replacement text of a - #define. Remove its name from the output. */ - pfile->out.cur = out_start; - save_replacement_text (pfile, macro, node->value.arg_index); - out = pfile->out.base; - } - else if (lex_state == ls_hash) - { - lex_state = ls_predicate; - continue; - } - else if (pfile->state.in_expression - && node == pfile->spec_nodes.n_defined) - { - lex_state = ls_defined; - continue; - } - } - break; - - case '(': - if (quote == 0) - { - paren_depth++; - if (lex_state == ls_fun_open) - { - if (recursive_macro (pfile, fmacro.node)) - lex_state = ls_none; - else - { - lex_state = ls_fun_close; - paren_depth = 1; - out = pfile->out.base + fmacro.offset; - fmacro.args[0] = fmacro.offset; - } - } - else if (lex_state == ls_predicate) - lex_state = ls_answer; - else if (lex_state == ls_defined) - lex_state = ls_defined_close; - } - break; - - case ',': - if (quote == 0 && lex_state == ls_fun_close && paren_depth == 1) - save_argument (&fmacro, out - pfile->out.base); - break; - - case ')': - if (quote == 0) - { - paren_depth--; - if (lex_state == ls_fun_close && paren_depth == 0) - { - cpp_macro *m = fmacro.node->value.macro; - - m->used = 1; - lex_state = ls_none; - save_argument (&fmacro, out - pfile->out.base); - - /* A single zero-length argument is no argument. */ - if (fmacro.argc == 1 - && m->paramc == 0 - && out == pfile->out.base + fmacro.offset + 1) - fmacro.argc = 0; - - if (_cpp_arguments_ok (pfile, m, fmacro.node, fmacro.argc)) - { - /* Remove the macro's invocation from the - output, and push its replacement text. */ - pfile->out.cur = (pfile->out.base - + fmacro.offset); - CUR (context) = cur; - replace_args_and_push (pfile, &fmacro); - goto new_context; - } - } - else if (lex_state == ls_answer || lex_state == ls_defined_close) - lex_state = ls_none; - } - break; - - case '#': - if (cur - 1 == start_of_input_line - /* A '#' from a macro doesn't start a directive. */ - && !pfile->context->prev - && !pfile->state.in_directive) - { - /* A directive. With the way _cpp_handle_directive - currently works, we only want to call it if either we - know the directive is OK, or we want it to fail and - be removed from the output. If we want it to be - passed through (the assembler case) then we must not - call _cpp_handle_directive. */ - pfile->out.cur = out; - cur = skip_whitespace (pfile, cur, true /* skip_comments */); - out = pfile->out.cur; - - if (*cur == '\n') - { - /* Null directive. Ignore it and don't invalidate - the MI optimization. */ - pfile->buffer->need_line = true; - pfile->line++; - result = false; - goto done; - } - else - { - bool do_it = false; - - if (is_numstart (*cur) - && CPP_OPTION (pfile, lang) != CLK_ASM) - do_it = true; - else if (is_idstart (*cur)) - /* Check whether we know this directive, but don't - advance. */ - do_it = lex_identifier (pfile, cur)->is_directive; - - if (do_it || CPP_OPTION (pfile, lang) != CLK_ASM) - { - /* This is a kludge. We want to have the ISO - preprocessor lex the next token. */ - pfile->buffer->cur = cur; - _cpp_handle_directive (pfile, false /* indented */); - result = false; - goto done; - } - } - } - - if (pfile->state.in_expression) - { - lex_state = ls_hash; - continue; - } - break; - - default: - break; - } - - /* Non-whitespace disables MI optimization and stops treating - '<' as a quote in #include. */ - header_ok = false; - if (!pfile->state.in_directive) - pfile->mi_valid = false; - - if (lex_state == ls_none) - continue; - - /* Some of these transitions of state are syntax errors. The - ISO preprocessor will issue errors later. */ - if (lex_state == ls_fun_open) - /* Missing '('. */ - lex_state = ls_none; - else if (lex_state == ls_hash - || lex_state == ls_predicate - || lex_state == ls_defined) - lex_state = ls_none; - - /* ls_answer and ls_defined_close keep going until ')'. */ - } - - done: - if (fmacro.buff) - _cpp_release_buff (pfile, fmacro.buff); - - if (lex_state == ls_fun_close) - cpp_error_with_line (pfile, CPP_DL_ERROR, fmacro.line, 0, - "unterminated argument list invoking macro \"%s\"", - NODE_NAME (fmacro.node)); - return result; -} - -/* Push a context holding the replacement text of the macro NODE on - the context stack. NODE is either object-like, or a function-like - macro with no arguments. */ -static void -push_replacement_text (cpp_reader *pfile, cpp_hashnode *node) -{ - size_t len; - const uchar *text; - uchar *buf; - - if (node->flags & NODE_BUILTIN) - { - text = _cpp_builtin_macro_text (pfile, node); - len = ustrlen (text); - buf = _cpp_unaligned_alloc (pfile, len + 1); - memcpy (buf, text, len); - buf[len]='\n'; - text = buf; - } - else - { - cpp_macro *macro = node->value.macro; - macro->used = 1; - text = macro->exp.text; - len = macro->count; - } - - _cpp_push_text_context (pfile, node, text, len); -} - -/* Returns TRUE if traditional macro recursion is detected. */ -static bool -recursive_macro (cpp_reader *pfile, cpp_hashnode *node) -{ - bool recursing = !!(node->flags & NODE_DISABLED); - - /* Object-like macros that are already expanding are necessarily - recursive. - - However, it is possible to have traditional function-like macros - that are not infinitely recursive but recurse to any given depth. - Further, it is easy to construct examples that get ever longer - until the point they stop recursing. So there is no easy way to - detect true recursion; instead we assume any expansion more than - 20 deep since the first invocation of this macro must be - recursing. */ - if (recursing && node->value.macro->fun_like) - { - size_t depth = 0; - cpp_context *context = pfile->context; - - do - { - depth++; - if (context->macro == node && depth > 20) - break; - context = context->prev; - } - while (context); - recursing = context != NULL; - } - - if (recursing) - cpp_error (pfile, CPP_DL_ERROR, - "detected recursion whilst expanding macro \"%s\"", - NODE_NAME (node)); - - return recursing; -} - -/* Return the length of the replacement text of a function-like or - object-like non-builtin macro. */ -size_t -_cpp_replacement_text_len (const cpp_macro *macro) -{ - size_t len; - - if (macro->fun_like && (macro->paramc != 0)) - { - const uchar *exp; - - len = 0; - for (exp = macro->exp.text;;) - { - struct block *b = (struct block *) exp; - - len += b->text_len; - if (b->arg_index == 0) - break; - len += NODE_LEN (macro->params[b->arg_index - 1]); - exp += BLOCK_LEN (b->text_len); - } - } - else - len = macro->count; - - return len; -} - -/* Copy the replacement text of MACRO to DEST, which must be of - sufficient size. It is not NUL-terminated. The next character is - returned. */ -uchar * -_cpp_copy_replacement_text (const cpp_macro *macro, uchar *dest) -{ - if (macro->fun_like && (macro->paramc != 0)) - { - const uchar *exp; - - for (exp = macro->exp.text;;) - { - struct block *b = (struct block *) exp; - cpp_hashnode *param; - - memcpy (dest, b->text, b->text_len); - dest += b->text_len; - if (b->arg_index == 0) - break; - param = macro->params[b->arg_index - 1]; - memcpy (dest, NODE_NAME (param), NODE_LEN (param)); - dest += NODE_LEN (param); - exp += BLOCK_LEN (b->text_len); - } - } - else - { - memcpy (dest, macro->exp.text, macro->count); - dest += macro->count; - } - - return dest; -} - -/* Push a context holding the replacement text of the macro NODE on - the context stack. NODE is either object-like, or a function-like - macro with no arguments. */ -static void -replace_args_and_push (cpp_reader *pfile, struct fun_macro *fmacro) -{ - cpp_macro *macro = fmacro->node->value.macro; - - if (macro->paramc == 0) - push_replacement_text (pfile, fmacro->node); - else - { - const uchar *exp; - uchar *p; - _cpp_buff *buff; - size_t len = 0; - - /* Calculate the length of the argument-replaced text. */ - for (exp = macro->exp.text;;) - { - struct block *b = (struct block *) exp; - - len += b->text_len; - if (b->arg_index == 0) - break; - len += (fmacro->args[b->arg_index] - - fmacro->args[b->arg_index - 1] - 1); - exp += BLOCK_LEN (b->text_len); - } - - /* Allocate room for the expansion plus \n. */ - buff = _cpp_get_buff (pfile, len + 1); - - /* Copy the expansion and replace arguments. */ - p = BUFF_FRONT (buff); - for (exp = macro->exp.text;;) - { - struct block *b = (struct block *) exp; - size_t arglen; - - memcpy (p, b->text, b->text_len); - p += b->text_len; - if (b->arg_index == 0) - break; - arglen = (fmacro->args[b->arg_index] - - fmacro->args[b->arg_index - 1] - 1); - memcpy (p, pfile->out.base + fmacro->args[b->arg_index - 1], - arglen); - p += arglen; - exp += BLOCK_LEN (b->text_len); - } - - /* \n-terminate. */ - *p = '\n'; - _cpp_push_text_context (pfile, fmacro->node, BUFF_FRONT (buff), len); - - /* So we free buffer allocation when macro is left. */ - pfile->context->buff = buff; - } -} - -/* Read and record the parameters, if any, of a function-like macro - definition. Destroys pfile->out.cur. - - Returns true on success, false on failure (syntax error or a - duplicate parameter). On success, CUR (pfile->context) is just - past the closing parenthesis. */ -static bool -scan_parameters (cpp_reader *pfile, cpp_macro *macro) -{ - const uchar *cur = CUR (pfile->context) + 1; - bool ok; - - for (;;) - { - cur = skip_whitespace (pfile, cur, true /* skip_comments */); - - if (is_idstart (*cur)) - { - ok = false; - if (_cpp_save_parameter (pfile, macro, lex_identifier (pfile, cur))) - break; - cur = skip_whitespace (pfile, CUR (pfile->context), - true /* skip_comments */); - if (*cur == ',') - { - cur++; - continue; - } - ok = (*cur == ')'); - break; - } - - ok = (*cur == ')' && macro->paramc == 0); - break; - } - - if (!ok) - cpp_error (pfile, CPP_DL_ERROR, "syntax error in macro parameter list"); - - CUR (pfile->context) = cur + (*cur == ')'); - - return ok; -} - -/* Save the text from pfile->out.base to pfile->out.cur as - the replacement text for the current macro, followed by argument - ARG_INDEX, with zero indicating the end of the replacement - text. */ -static void -save_replacement_text (cpp_reader *pfile, cpp_macro *macro, - unsigned int arg_index) -{ - size_t len = pfile->out.cur - pfile->out.base; - uchar *exp; - - if (macro->paramc == 0) - { - /* Object-like and function-like macros without parameters - simply store their \n-terminated replacement text. */ - exp = _cpp_unaligned_alloc (pfile, len + 1); - memcpy (exp, pfile->out.base, len); - exp[len] = '\n'; - macro->exp.text = exp; - macro->count = len; - } - else - { - /* Store the text's length (unsigned int), the argument index - (unsigned short, base 1) and then the text. */ - size_t blen = BLOCK_LEN (len); - struct block *block; - - if (macro->count + blen > BUFF_ROOM (pfile->a_buff)) - _cpp_extend_buff (pfile, &pfile->a_buff, macro->count + blen); - - exp = BUFF_FRONT (pfile->a_buff); - block = (struct block *) (exp + macro->count); - macro->exp.text = exp; - - /* Write out the block information. */ - block->text_len = len; - block->arg_index = arg_index; - memcpy (block->text, pfile->out.base, len); - - /* Lex the rest into the start of the output buffer. */ - pfile->out.cur = pfile->out.base; - - macro->count += blen; - - /* If we've finished, commit the memory. */ - if (arg_index == 0) - BUFF_FRONT (pfile->a_buff) += macro->count; - } -} - -/* Analyze and save the replacement text of a macro. Returns true on - success. */ -bool -_cpp_create_trad_definition (cpp_reader *pfile, cpp_macro *macro) -{ - const uchar *cur; - uchar *limit; - cpp_context *context = pfile->context; - - /* The context has not been set up for command line defines, and CUR - has not been updated for the macro name for in-file defines. */ - pfile->out.cur = pfile->out.base; - CUR (context) = pfile->buffer->cur; - RLIMIT (context) = pfile->buffer->rlimit; - check_output_buffer (pfile, RLIMIT (context) - CUR (context)); - - /* Is this a function-like macro? */ - if (* CUR (context) == '(') - { - bool ok = scan_parameters (pfile, macro); - - /* Remember the params so we can clear NODE_MACRO_ARG flags. */ - macro->params = (cpp_hashnode **) BUFF_FRONT (pfile->a_buff); - - /* Setting macro to NULL indicates an error occurred, and - prevents unnecessary work in _cpp_scan_out_logical_line. */ - if (!ok) - macro = NULL; - else - { - BUFF_FRONT (pfile->a_buff) = (uchar *) ¯o->params[macro->paramc]; - macro->fun_like = 1; - } - } - - /* Skip leading whitespace in the replacement text. */ - pfile->buffer->cur - = skip_whitespace (pfile, CUR (context), - CPP_OPTION (pfile, discard_comments_in_macro_exp)); - - pfile->state.prevent_expansion++; - _cpp_scan_out_logical_line (pfile, macro); - pfile->state.prevent_expansion--; - - if (!macro) - return false; - - /* Skip trailing white space. */ - cur = pfile->out.base; - limit = pfile->out.cur; - while (limit > cur && is_space (limit[-1])) - limit--; - pfile->out.cur = limit; - save_replacement_text (pfile, macro, 0); - - return true; -} - -/* Copy SRC of length LEN to DEST, but convert all contiguous - whitespace to a single space, provided it is not in quotes. The - quote currently in effect is pointed to by PQUOTE, and is updated - by the function. Returns the number of bytes copied. */ -static size_t -canonicalize_text (uchar *dest, const uchar *src, size_t len, uchar *pquote) -{ - uchar *orig_dest = dest; - uchar quote = *pquote; - - while (len) - { - if (is_space (*src) && !quote) - { - do - src++, len--; - while (len && is_space (*src)); - *dest++ = ' '; - } - else - { - if (*src == '\'' || *src == '"') - { - if (!quote) - quote = *src; - else if (quote == *src) - quote = 0; - } - *dest++ = *src++, len--; - } - } - - *pquote = quote; - return dest - orig_dest; -} - -/* Returns true if MACRO1 and MACRO2 have expansions different other - than in the form of their whitespace. */ -bool -_cpp_expansions_different_trad (const cpp_macro *macro1, - const cpp_macro *macro2) -{ - uchar *p1 = xmalloc (macro1->count + macro2->count); - uchar *p2 = p1 + macro1->count; - uchar quote1 = 0, quote2 = 0; - bool mismatch; - size_t len1, len2; - - if (macro1->paramc > 0) - { - const uchar *exp1 = macro1->exp.text, *exp2 = macro2->exp.text; - - mismatch = true; - for (;;) - { - struct block *b1 = (struct block *) exp1; - struct block *b2 = (struct block *) exp2; - - if (b1->arg_index != b2->arg_index) - break; - - len1 = canonicalize_text (p1, b1->text, b1->text_len, "e1); - len2 = canonicalize_text (p2, b2->text, b2->text_len, "e2); - if (len1 != len2 || memcmp (p1, p2, len1)) - break; - if (b1->arg_index == 0) - { - mismatch = false; - break; - } - exp1 += BLOCK_LEN (b1->text_len); - exp2 += BLOCK_LEN (b2->text_len); - } - } - else - { - len1 = canonicalize_text (p1, macro1->exp.text, macro1->count, "e1); - len2 = canonicalize_text (p2, macro2->exp.text, macro2->count, "e2); - mismatch = (len1 != len2 || memcmp (p1, p2, len1)); - } - - free (p1); - return mismatch; -} diff --git a/contrib/gcc/cppucnid.h b/contrib/gcc/cppucnid.h deleted file mode 100644 index 1cac7df..0000000 --- a/contrib/gcc/cppucnid.h +++ /dev/null @@ -1,336 +0,0 @@ -/* Table of UCNs which are valid in identifiers. - Copyright (C) 2003 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* Automatically generated from cppucnid.tab, do not edit */ - -/* This file reproduces the table in ISO/IEC 9899:1999 (C99) Annex - D, which is itself a reproduction from ISO/IEC TR 10176:1998, and - the similar table from ISO/IEC 14882:1988 (C++98) Annex E, which is - a reproduction of ISO/IEC PDTR 10176. Unfortunately these tables - are not identical. */ - -#ifndef CPPUCNID_H -#define CPPUCNID_H - -#define C99 1 -#define CXX 2 -#define DIG 4 - -struct ucnrange -{ - unsigned short lo, hi; - unsigned short flags; -}; - -static const struct ucnrange ucnranges[] = { - { 0x00aa, 0x00aa, C99 }, /* Latin */ - { 0x00b5, 0x00b5, C99 }, /* Special characters */ - { 0x00b7, 0x00b7, C99 }, - { 0x00ba, 0x00ba, C99 }, /* Latin */ - { 0x00c0, 0x00d6, CXX|C99 }, - { 0x00d8, 0x00f6, CXX|C99 }, - { 0x00f8, 0x01f5, CXX|C99 }, - { 0x01fa, 0x0217, CXX|C99 }, - { 0x0250, 0x02a8, CXX|C99 }, - { 0x02b0, 0x02b8, C99 }, /* Special characters */ - { 0x02bb, 0x02bb, C99 }, - { 0x02bd, 0x02c1, C99 }, - { 0x02d0, 0x02d1, C99 }, - { 0x02e0, 0x02e4, C99 }, - { 0x037a, 0x037a, C99 }, - { 0x0384, 0x0384, CXX }, /* Greek */ - { 0x0386, 0x0386, C99 }, - { 0x0388, 0x038a, CXX|C99 }, - { 0x038c, 0x038c, CXX|C99 }, - { 0x038e, 0x03a1, CXX|C99 }, - { 0x03a3, 0x03ce, CXX|C99 }, - { 0x03d0, 0x03d6, CXX|C99 }, - { 0x03da, 0x03da, CXX|C99 }, - { 0x03dc, 0x03dc, CXX|C99 }, - { 0x03de, 0x03de, CXX|C99 }, - { 0x03e0, 0x03e0, CXX|C99 }, - { 0x03e2, 0x03f3, CXX|C99 }, - { 0x0401, 0x040c, CXX|C99 }, /* Cyrillic */ - { 0x040d, 0x040d, CXX }, - { 0x040e, 0x040e, C99 }, - { 0x040f, 0x044f, CXX|C99 }, - { 0x0451, 0x045c, CXX|C99 }, - { 0x045e, 0x0481, CXX|C99 }, - { 0x0490, 0x04c4, CXX|C99 }, - { 0x04c7, 0x04c8, CXX|C99 }, - { 0x04cb, 0x04cc, CXX|C99 }, - { 0x04d0, 0x04eb, CXX|C99 }, - { 0x04ee, 0x04f5, CXX|C99 }, - { 0x04f8, 0x04f9, CXX|C99 }, - { 0x0531, 0x0556, CXX|C99 }, /* Armenian */ - { 0x0559, 0x0559, C99 }, /* Special characters */ - { 0x0561, 0x0587, CXX|C99 }, /* Armenian */ - { 0x05b0, 0x05b9, C99 }, /* Hebrew */ - { 0x05bb, 0x05bd, C99 }, - { 0x05bf, 0x05bf, C99 }, - { 0x05c1, 0x05c2, C99 }, - { 0x05d0, 0x05ea, CXX|C99 }, - { 0x05f0, 0x05f2, CXX|C99 }, - { 0x05f3, 0x05f4, CXX }, - { 0x0621, 0x063a, CXX|C99 }, /* Arabic */ - { 0x0640, 0x0652, CXX|C99 }, - { 0x0660, 0x0669, C99|DIG }, /* Digits */ - { 0x0670, 0x06b7, CXX|C99 }, /* Arabic */ - { 0x06ba, 0x06be, CXX|C99 }, - { 0x06c0, 0x06ce, CXX|C99 }, - { 0x06d0, 0x06dc, C99 }, - { 0x06e5, 0x06e7, CXX|C99 }, - { 0x06e8, 0x06e8, C99 }, - { 0x06ea, 0x06ed, C99 }, - { 0x06f0, 0x06f9, C99|DIG }, /* Digits */ - { 0x0901, 0x0903, C99 }, /* Devanagari */ - { 0x0905, 0x0939, CXX|C99 }, - { 0x093d, 0x093d, C99 }, /* Special characters */ - { 0x093e, 0x094d, C99 }, /* Devanagari */ - { 0x0950, 0x0952, C99 }, - { 0x0958, 0x0962, CXX|C99 }, - { 0x0963, 0x0963, C99 }, - { 0x0966, 0x096f, C99|DIG }, /* Digits */ - { 0x0981, 0x0983, C99 }, /* Bengali */ - { 0x0985, 0x098c, CXX|C99 }, - { 0x098f, 0x0990, CXX|C99 }, - { 0x0993, 0x09a8, CXX|C99 }, - { 0x09aa, 0x09b0, CXX|C99 }, - { 0x09b2, 0x09b2, CXX|C99 }, - { 0x09b6, 0x09b9, CXX|C99 }, - { 0x09be, 0x09c4, C99 }, - { 0x09c7, 0x09c8, C99 }, - { 0x09cb, 0x09cd, C99 }, - { 0x09dc, 0x09dd, CXX|C99 }, - { 0x09df, 0x09e1, CXX|C99 }, - { 0x09e2, 0x09e3, C99 }, - { 0x09e6, 0x09ef, C99|DIG }, /* Digits */ - { 0x09f0, 0x09f1, CXX|C99 }, /* Bengali */ - { 0x0a02, 0x0a02, C99 }, /* Gurmukhi */ - { 0x0a05, 0x0a0a, CXX|C99 }, - { 0x0a0f, 0x0a10, CXX|C99 }, - { 0x0a13, 0x0a28, CXX|C99 }, - { 0x0a2a, 0x0a30, CXX|C99 }, - { 0x0a32, 0x0a33, CXX|C99 }, - { 0x0a35, 0x0a36, CXX|C99 }, - { 0x0a38, 0x0a39, CXX|C99 }, - { 0x0a3e, 0x0a42, C99 }, - { 0x0a47, 0x0a48, C99 }, - { 0x0a4b, 0x0a4d, C99 }, - { 0x0a59, 0x0a5c, CXX|C99 }, - { 0x0a5e, 0x0a5e, CXX|C99 }, - { 0x0a66, 0x0a6f, C99|DIG }, /* Digits */ - { 0x0a74, 0x0a74, C99 }, /* Gurmukhi */ - { 0x0a81, 0x0a83, C99 }, /* Gujarati */ - { 0x0a85, 0x0a8b, CXX|C99 }, - { 0x0a8d, 0x0a8d, CXX|C99 }, - { 0x0a8f, 0x0a91, CXX|C99 }, - { 0x0a93, 0x0aa8, CXX|C99 }, - { 0x0aaa, 0x0ab0, CXX|C99 }, - { 0x0ab2, 0x0ab3, CXX|C99 }, - { 0x0ab5, 0x0ab9, CXX|C99 }, - { 0x0abd, 0x0ac5, C99 }, - { 0x0ac7, 0x0ac9, C99 }, - { 0x0acb, 0x0acd, C99 }, - { 0x0ad0, 0x0ad0, C99 }, - { 0x0ae0, 0x0ae0, CXX|C99 }, - { 0x0ae6, 0x0aef, C99|DIG }, /* Digits */ - { 0x0b01, 0x0b03, C99 }, /* Oriya */ - { 0x0b05, 0x0b0c, CXX|C99 }, - { 0x0b0f, 0x0b10, CXX|C99 }, - { 0x0b13, 0x0b28, CXX|C99 }, - { 0x0b2a, 0x0b30, CXX|C99 }, - { 0x0b32, 0x0b33, CXX|C99 }, - { 0x0b36, 0x0b39, CXX|C99 }, - { 0x0b3d, 0x0b3d, C99 }, /* Special characters */ - { 0x0b3e, 0x0b43, C99 }, /* Oriya */ - { 0x0b47, 0x0b48, C99 }, - { 0x0b4b, 0x0b4d, C99 }, - { 0x0b5c, 0x0b5d, CXX|C99 }, - { 0x0b5f, 0x0b61, CXX|C99 }, - { 0x0b66, 0x0b6f, C99|DIG }, /* Digits */ - { 0x0b82, 0x0b83, C99 }, /* Tamil */ - { 0x0b85, 0x0b8a, CXX|C99 }, - { 0x0b8e, 0x0b90, CXX|C99 }, - { 0x0b92, 0x0b95, CXX|C99 }, - { 0x0b99, 0x0b9a, CXX|C99 }, - { 0x0b9c, 0x0b9c, CXX|C99 }, - { 0x0b9e, 0x0b9f, CXX|C99 }, - { 0x0ba3, 0x0ba4, CXX|C99 }, - { 0x0ba8, 0x0baa, CXX|C99 }, - { 0x0bae, 0x0bb5, CXX|C99 }, - { 0x0bb7, 0x0bb9, CXX|C99 }, - { 0x0bbe, 0x0bc2, C99 }, - { 0x0bc6, 0x0bc8, C99 }, - { 0x0bca, 0x0bcd, C99 }, - { 0x0be7, 0x0bef, C99|DIG }, /* Digits */ - { 0x0c01, 0x0c03, C99 }, /* Telugu */ - { 0x0c05, 0x0c0c, CXX|C99 }, - { 0x0c0e, 0x0c10, CXX|C99 }, - { 0x0c12, 0x0c28, CXX|C99 }, - { 0x0c2a, 0x0c33, CXX|C99 }, - { 0x0c35, 0x0c39, CXX|C99 }, - { 0x0c3e, 0x0c44, C99 }, - { 0x0c46, 0x0c48, C99 }, - { 0x0c4a, 0x0c4d, C99 }, - { 0x0c60, 0x0c61, CXX|C99 }, - { 0x0c66, 0x0c6f, C99|DIG }, /* Digits */ - { 0x0c82, 0x0c83, C99 }, /* Kannada */ - { 0x0c85, 0x0c8c, CXX|C99 }, - { 0x0c8e, 0x0c90, CXX|C99 }, - { 0x0c92, 0x0ca8, CXX|C99 }, - { 0x0caa, 0x0cb3, CXX|C99 }, - { 0x0cb5, 0x0cb9, CXX|C99 }, - { 0x0cbe, 0x0cc4, C99 }, - { 0x0cc6, 0x0cc8, C99 }, - { 0x0cca, 0x0ccd, C99 }, - { 0x0cde, 0x0cde, C99 }, - { 0x0ce0, 0x0ce1, CXX|C99 }, - { 0x0ce6, 0x0cef, C99|DIG }, /* Digits */ - { 0x0d02, 0x0d03, C99 }, /* Malayalam */ - { 0x0d05, 0x0d0c, CXX|C99 }, - { 0x0d0e, 0x0d10, CXX|C99 }, - { 0x0d12, 0x0d28, CXX|C99 }, - { 0x0d2a, 0x0d39, CXX|C99 }, - { 0x0d3e, 0x0d43, C99 }, - { 0x0d46, 0x0d48, C99 }, - { 0x0d4a, 0x0d4d, C99 }, - { 0x0d60, 0x0d61, CXX|C99 }, - { 0x0d66, 0x0d6f, C99|DIG }, /* Digits */ - { 0x0e01, 0x0e30, CXX|C99 }, /* Thai */ - { 0x0e31, 0x0e31, C99 }, - { 0x0e32, 0x0e33, CXX|C99 }, - { 0x0e34, 0x0e3a, C99 }, - { 0x0e40, 0x0e46, CXX|C99 }, - { 0x0e47, 0x0e49, C99 }, - { 0x0e50, 0x0e59, CXX|C99|DIG }, /* Digits */ - { 0x0e5a, 0x0e5b, CXX|C99 }, /* Thai */ - { 0x0e81, 0x0e82, CXX|C99 }, /* Lao */ - { 0x0e84, 0x0e84, CXX|C99 }, - { 0x0e87, 0x0e88, CXX|C99 }, - { 0x0e8a, 0x0e8a, CXX|C99 }, - { 0x0e8d, 0x0e8d, CXX|C99 }, - { 0x0e94, 0x0e97, CXX|C99 }, - { 0x0e99, 0x0e9f, CXX|C99 }, - { 0x0ea1, 0x0ea3, CXX|C99 }, - { 0x0ea5, 0x0ea5, CXX|C99 }, - { 0x0ea7, 0x0ea7, CXX|C99 }, - { 0x0eaa, 0x0eab, CXX|C99 }, - { 0x0ead, 0x0eae, CXX|C99 }, - { 0x0eaf, 0x0eaf, CXX }, - { 0x0eb0, 0x0eb0, CXX|C99 }, - { 0x0eb1, 0x0eb1, C99 }, - { 0x0eb2, 0x0eb3, CXX|C99 }, - { 0x0eb4, 0x0eb9, C99 }, - { 0x0ebb, 0x0ebc, C99 }, - { 0x0ebd, 0x0ebd, CXX|C99 }, - { 0x0ec0, 0x0ec4, CXX|C99 }, - { 0x0ec6, 0x0ec6, CXX|C99 }, - { 0x0ec8, 0x0ecd, C99 }, - { 0x0ed0, 0x0ed9, C99|DIG }, /* Digits */ - { 0x0edc, 0x0edd, C99 }, /* Lao */ - { 0x0f00, 0x0f00, C99 }, /* Tibetan */ - { 0x0f18, 0x0f19, C99 }, - { 0x0f20, 0x0f33, C99|DIG }, /* Digits */ - { 0x0f35, 0x0f35, C99 }, /* Tibetan */ - { 0x0f37, 0x0f37, C99 }, - { 0x0f39, 0x0f39, C99 }, - { 0x0f3e, 0x0f47, C99 }, - { 0x0f49, 0x0f69, C99 }, - { 0x0f71, 0x0f84, C99 }, - { 0x0f86, 0x0f8b, C99 }, - { 0x0f90, 0x0f95, C99 }, - { 0x0f97, 0x0f97, C99 }, - { 0x0f99, 0x0fad, C99 }, - { 0x0fb1, 0x0fb7, C99 }, - { 0x0fb9, 0x0fb9, C99 }, - { 0x10a0, 0x10c5, CXX|C99 }, /* Georgian */ - { 0x10d0, 0x10f6, CXX|C99 }, - { 0x1100, 0x1159, CXX }, /* Hangul */ - { 0x1161, 0x11a2, CXX }, - { 0x11a8, 0x11f9, CXX }, - { 0x1e00, 0x1e9a, CXX|C99 }, /* Latin */ - { 0x1e9b, 0x1e9b, C99 }, - { 0x1ea0, 0x1ef9, CXX|C99 }, - { 0x1f00, 0x1f15, CXX|C99 }, /* Greek */ - { 0x1f18, 0x1f1d, CXX|C99 }, - { 0x1f20, 0x1f45, CXX|C99 }, - { 0x1f48, 0x1f4d, CXX|C99 }, - { 0x1f50, 0x1f57, CXX|C99 }, - { 0x1f59, 0x1f59, CXX|C99 }, - { 0x1f5b, 0x1f5b, CXX|C99 }, - { 0x1f5d, 0x1f5d, CXX|C99 }, - { 0x1f5f, 0x1f7d, CXX|C99 }, - { 0x1f80, 0x1fb4, CXX|C99 }, - { 0x1fb6, 0x1fbc, CXX|C99 }, - { 0x1fbe, 0x1fbe, C99 }, /* Special characters */ - { 0x1fc2, 0x1fc4, CXX|C99 }, /* Greek */ - { 0x1fc6, 0x1fcc, CXX|C99 }, - { 0x1fd0, 0x1fd3, CXX|C99 }, - { 0x1fd6, 0x1fdb, CXX|C99 }, - { 0x1fe0, 0x1fec, CXX|C99 }, - { 0x1ff2, 0x1ff4, CXX|C99 }, - { 0x1ff6, 0x1ffc, CXX|C99 }, - { 0x203f, 0x2040, C99 }, /* Special characters */ - { 0x207f, 0x207f, C99 }, /* Latin */ - { 0x2102, 0x2102, C99 }, /* Special characters */ - { 0x2107, 0x2107, C99 }, - { 0x210a, 0x2113, C99 }, - { 0x2115, 0x2115, C99 }, - { 0x2118, 0x211d, C99 }, - { 0x2124, 0x2124, C99 }, - { 0x2126, 0x2126, C99 }, - { 0x2128, 0x2128, C99 }, - { 0x212a, 0x2131, C99 }, - { 0x2133, 0x2138, C99 }, - { 0x2160, 0x2182, C99 }, - { 0x3005, 0x3007, C99 }, - { 0x3021, 0x3029, C99 }, - { 0x3041, 0x3093, CXX|C99 }, /* Hiragana */ - { 0x3094, 0x3094, CXX }, - { 0x309b, 0x309c, CXX|C99 }, - { 0x309d, 0x309e, CXX }, - { 0x30a1, 0x30f6, CXX|C99 }, /* Katakana */ - { 0x30f7, 0x30fa, CXX }, - { 0x30fb, 0x30fc, CXX|C99 }, - { 0x30fd, 0x30fe, CXX }, - { 0x3105, 0x312c, CXX|C99 }, /* Bopomofo */ - { 0x4e00, 0x9fa5, CXX|C99 }, /* CJK Unified Ideographs */ - { 0xac00, 0xd7a3, C99 }, /* Hangul */ - { 0xf900, 0xfa2d, CXX }, /* CJK Unified Ideographs */ - { 0xfb1f, 0xfb36, CXX }, - { 0xfb38, 0xfb3c, CXX }, - { 0xfb3e, 0xfb3e, CXX }, - { 0xfb40, 0xfb44, CXX }, - { 0xfb46, 0xfbb1, CXX }, - { 0xfbd3, 0xfd3f, CXX }, - { 0xfd50, 0xfd8f, CXX }, - { 0xfd92, 0xfdc7, CXX }, - { 0xfdf0, 0xfdfb, CXX }, - { 0xfe70, 0xfe72, CXX }, - { 0xfe74, 0xfe74, CXX }, - { 0xfe76, 0xfefc, CXX }, - { 0xff21, 0xff3a, CXX }, - { 0xff41, 0xff5a, CXX }, - { 0xff66, 0xffbe, CXX }, - { 0xffc2, 0xffc7, CXX }, - { 0xffca, 0xffcf, CXX }, - { 0xffd2, 0xffd7, CXX }, - { 0xffda, 0xffdc, CXX }, -}; - -#endif /* cppucnid.h */ diff --git a/contrib/gcc/cppucnid.pl b/contrib/gcc/cppucnid.pl deleted file mode 100644 index eb8bbca..0000000 --- a/contrib/gcc/cppucnid.pl +++ /dev/null @@ -1,130 +0,0 @@ -#! /usr/bin/perl -w -use strict; - -# Convert cppucnid.tab to cppucnid.h. We use two arrays of length -# 65536 to represent the table, since this is nice and simple. The -# first array holds the tags indicating which ranges are valid in -# which contexts. The second array holds the language name associated -# with each element. - -our(@tags, @names); -@tags = ("") x 65536; -@names = ("") x 65536; - - -# Array mapping tag numbers to standard #defines -our @stds; - -# Current standard and language -our($curstd, $curlang); - -# First block of the file is a template to be saved for later. -our @template; - -while (<>) { - chomp; - last if $_ eq '%%'; - push @template, $_; -}; - -# Second block of the file is the UCN tables. -# The format looks like this: -# -# [std] -# -# ; language -# xxxx-xxxx xxxx xxxx-xxxx .... -# -# with comment lines starting with #. - -while (<>) { - chomp; - /^#/ and next; - /^\s*$/ and next; - /^\[(.+)\]$/ and do { - $curstd = $1; - next; - }; - /^; (.+)$/ and do { - $curlang = $1; - next; - }; - - process_range(split); -} - -# Print out the template, inserting as requested. -$\ = "\n"; -for (@template) { - print("/* Automatically generated from cppucnid.tab, do not edit */"), - next if $_ eq "[dne]"; - print_table(), next if $_ eq "[table]"; - print; -} - -sub print_table { - my($lo, $hi); - my $prevname = ""; - - for ($lo = 0; $lo <= $#tags; $lo = $hi) { - $hi = $lo; - $hi++ while $hi <= $#tags - && $tags[$hi] eq $tags[$lo] - && $names[$hi] eq $names[$lo]; - - # Range from $lo to $hi-1. - # Don't make entries for ranges that are not valid idchars. - next if ($tags[$lo] eq ""); - my $tag = $tags[$lo]; - $tag = " ".$tag if $tag =~ /^C99/; - - if ($names[$lo] eq $prevname) { - printf(" { 0x%04x, 0x%04x, %-11s },\n", - $lo, $hi-1, $tag); - } else { - printf(" { 0x%04x, 0x%04x, %-11s }, /* %s */\n", - $lo, $hi-1, $tag, $names[$lo]); - } - $prevname = $names[$lo]; - } -} - -# The line is a list of four-digit hexadecimal numbers or -# pairs of such numbers. Each is a valid identifier character -# from the given language, under the given standard. -sub process_range { - for my $range (@_) { - if ($range =~ /^[0-9a-f]{4}$/) { - my $i = hex($range); - if ($tags[$i] eq "") { - $tags[$i] = $curstd; - } else { - $tags[$i] = $curstd . "|" . $tags[$i]; - } - if ($names[$i] ne "" && $names[$i] ne $curlang) { - warn sprintf ("language overlap: %s/%s at %x (tag %d)", - $names[$i], $curlang, $i, $tags[$i]); - next; - } - $names[$i] = $curlang; - } elsif ($range =~ /^ ([0-9a-f]{4}) - ([0-9a-f]{4}) $/x) { - my ($start, $end) = (hex($1), hex($2)); - my $i; - for ($i = $start; $i <= $end; $i++) { - if ($tags[$i] eq "") { - $tags[$i] = $curstd; - } else { - $tags[$i] = $curstd . "|" . $tags[$i]; - } - if ($names[$i] ne "" && $names[$i] ne $curlang) { - warn sprintf ("language overlap: %s/%s at %x (tag %d)", - $names[$i], $curlang, $i, $tags[$i]); - next; - } - $names[$i] = $curlang; - } - } else { - warn "malformed range expression $range"; - } - } -} diff --git a/contrib/gcc/cppucnid.tab b/contrib/gcc/cppucnid.tab deleted file mode 100644 index 4a7a0f4..0000000 --- a/contrib/gcc/cppucnid.tab +++ /dev/null @@ -1,239 +0,0 @@ -/* Table of UCNs which are valid in identifiers. - Copyright (C) 2003 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -[dne] - -/* This file reproduces the table in ISO/IEC 9899:1999 (C99) Annex - D, which is itself a reproduction from ISO/IEC TR 10176:1998, and - the similar table from ISO/IEC 14882:1988 (C++98) Annex E, which is - a reproduction of ISO/IEC PDTR 10176. Unfortunately these tables - are not identical. */ - -#ifndef CPPUCNID_H -#define CPPUCNID_H - -#define C99 1 -#define CXX 2 -#define DIG 4 - -struct ucnrange -{ - unsigned short lo, hi; - unsigned short flags; -}; - -static const struct ucnrange ucnranges[] = { -[table] -}; - -#endif /* cppucnid.h */ -%% - -[C99] - -; Latin -00aa 00ba 00c0-00d6 00d8-00f6 00f8-01f5 01fa-0217 0250-02a8 1e00-1e9b -1ea0-1ef9 207f - -; Greek -0386 0388-038a 038c 038e-03a1 03a3-03ce 03d0-03d6 03da 03dc 03de 03e0 -03e2-03f3 1f00-1f15 1f18-1f1d 1f20-1f45 1f48-1f4d 1f50-1f57 1f59 1f5b -1f5d 1f5f-1f7d 1f80-1fb4 1fb6-1fbc 1fc2-1fc4 1fc6-1fcc 1fd0-1fd3 -1fd6-1fdb 1fe0-1fec 1ff2-1ff4 1ff6-1ffc - -; Cyrillic -0401-040c 040e-044f 0451-045c 045e-0481 0490-04c4 04c7-04c8 04cb-04cc -04d0-04eb 04ee-04f5 04f8-04f9 - -; Armenian -0531-0556 0561-0587 - -; Hebrew -05b0-05b9 05bb-05bd 05bf 05c1-05c2 05d0-05ea 05f0-05f2 - -; Arabic -0621-063a 0640-0652 0670-06b7 06ba-06be 06c0-06ce 06d0-06dc 06e5-06e8 -06ea-06ed - -; Devanagari -0901-0903 0905-0939 093e-094d 0950-0952 0958-0963 - -; Bengali -0981-0983 0985-098c 098f-0990 0993-09a8 09aa-09b0 09b2 09b6-09b9 -09be-09c4 09c7-09c8 09cb-09cd 09dc-09dd 09df-09e3 09f0-09f1 - -; Gurmukhi -0a02 0a05-0a0a 0a0f-0a10 0a13-0a28 0a2a-0a30 0a32-0a33 0a35-0a36 -0a38-0a39 0a3e-0a42 0a47-0a48 0a4b-0a4d 0a59-0a5c 0a5e 0a74 - -; Gujarati -0a81-0a83 0a85-0a8b 0a8d 0a8f-0a91 0a93-0aa8 0aaa-0ab0 0ab2-0ab3 -0ab5-0ab9 0abd-0ac5 0ac7-0ac9 0acb-0acd 0ad0 0ae0 - -; Oriya -0b01-0b03 0b05-0b0c 0b0f-0b10 0b13-0b28 0b2a-0b30 0b32-0b33 0b36-0b39 -0b3e-0b43 0b47-0b48 0b4b-0b4d 0b5c-0b5d 0b5f-0b61 - -; Tamil -0b82-0b83 0b85-0b8a 0b8e-0b90 0b92-0b95 0b99-0b9a 0b9c 0b9e-0b9f -0ba3-0ba4 0ba8-0baa 0bae-0bb5 0bb7-0bb9 0bbe-0bc2 0bc6-0bc8 0bca-0bcd - -; Telugu -0c01-0c03 0c05-0c0c 0c0e-0c10 0c12-0c28 0c2a-0c33 0c35-0c39 0c3e-0c44 -0c46-0c48 0c4a-0c4d 0c60-0c61 - -; Kannada -0c82-0c83 0c85-0c8c 0c8e-0c90 0c92-0ca8 0caa-0cb3 0cb5-0cb9 0cbe-0cc4 -0cc6-0cc8 0cca-0ccd 0cde 0ce0-0ce1 - -; Malayalam -0d02-0d03 0d05-0d0c 0d0e-0d10 0d12-0d28 0d2a-0d39 0d3e-0d43 0d46-0d48 -0d4a-0d4d 0d60-0d61 - -# CORRECTION: exclude 0e50-0e59 from the Thai range as it also appears -# in the Digits range below. -; Thai -0e01-0e3a 0e40-0e49 0e5a-0e5b - -; Lao -0e81-0e82 0e84 0e87-0e88 0e8a 0e8d 0e94-0e97 0e99-0e9f 0ea1-0ea3 0ea5 -0ea7 0eaa-0eab 0ead-0eae 0eb0-0eb9 0ebb-0ebd 0ec0-0ec4 0ec6 0ec8-0ecd -0edc-0edd - -; Tibetan -0f00 0f18-0f19 0f35 0f37 0f39 0f3e-0f47 0f49-0f69 0f71-0f84 0f86-0f8b -0f90-0f95 0f97 0f99-0fad 0fb1-0fb7 0fb9 - -; Georgian -10a0-10c5 10d0-10f6 - -; Hiragana -3041-3093 309b-309c - -; Katakana -30a1-30f6 30fb-30fc - -; Bopomofo -3105-312c - -; CJK Unified Ideographs -4e00-9fa5 - -; Hangul -ac00-d7a3 - -; Special characters -00b5 00b7 02b0-02b8 02bb 02bd-02c1 02d0-02d1 02e0-02e4 037a 0559 093d -0b3d 1fbe 203f-2040 2102 2107 210a-2113 2115 2118-211d 2124 2126 2128 -212a-2131 2133-2138 2160-2182 3005-3007 3021-3029 - -[C99|DIG] -; Digits -0660-0669 06f0-06f9 0966-096f 09e6-09ef 0a66-0a6f 0ae6-0aef 0b66-0b6f -0be7-0bef 0c66-0c6f 0ce6-0cef 0d66-0d6f 0e50-0e59 0ed0-0ed9 0f20-0f33 - -[CXX] - -; Latin -00c0-00d6 00d8-00f6 00f8-01f5 01fa-0217 0250-02a8 1e00-1e9a 1ea0-1ef9 - -; Greek -0384 0388-038a 038c 038e-03a1 03a3-03ce 03d0-03d6 03da 03dc 03de 03e0 -03e2-03f3 1f00-1f15 1f18-1f1d 1f20-1f45 1f48-1f4d 1f50-1f57 1f59 1f5b -1f5d 1f5f-1f7d 1f80-1fb4 1fb6-1fbc 1fc2-1fc4 1fc6-1fcc 1fd0-1fd3 -1fd6-1fdb 1fe0-1fec 1ff2-1ff4 1ff6-1ffc - -; Cyrillic -0401-040d 040f-044f 0451-045c 045e-0481 0490-04c4 04c7-04c8 04cb-04cc -04d0-04eb 04ee-04f5 04f8-04f9 - -; Armenian -0531-0556 0561-0587 - -; Hebrew -05d0-05ea 05f0-05f4 - -; Arabic -0621-063a 0640-0652 0670-06b7 06ba-06be 06c0-06ce 06e5-06e7 - -; Devanagari -0905-0939 0958-0962 - -; Bengali -0985-098c 098f-0990 0993-09a8 09aa-09b0 09b2 09b6-09b9 09dc-09dd -09df-09e1 09f0-09f1 - -; Gurmukhi -0a05-0a0a 0a0f-0a10 0a13-0a28 0a2a-0a30 0a32-0a33 0a35-0a36 0a38-0a39 -0a59-0a5c 0a5e - -; Gujarati -0a85-0a8b 0a8d 0a8f-0a91 0a93-0aa8 0aaa-0ab0 0ab2-0ab3 0ab5-0ab9 0ae0 - -; Oriya -0b05-0b0c 0b0f-0b10 0b13-0b28 0b2a-0b30 0b32-0b33 0b36-0b39 0b5c-0b5d -0b5f-0b61 - -; Tamil -0b85-0b8a 0b8e-0b90 0b92-0b95 0b99-0b9a 0b9c 0b9e-0b9f 0ba3-0ba4 -0ba8-0baa 0bae-0bb5 0bb7-0bb9 - -; Telugu -0c05-0c0c 0c0e-0c10 0c12-0c28 0c2a-0c33 0c35-0c39 0c60-0c61 - -; Kannada -0c85-0c8c 0c8e-0c90 0c92-0ca8 0caa-0cb3 0cb5-0cb9 0ce0-0ce1 - -; Malayalam -0d05-0d0c 0d0e-0d10 0d12-0d28 0d2a-0d39 0d60-0d61 - -# CORRECTION: Exclude 0e50-0e59 from the Thai range and make a fake -# Digits range for it, to match C99. cppcharset.c knows that C++ -# doesn't distinguish digits from other UCNs valid in identifiers. -; Thai -0e01-0e30 0e32-0e33 0e40-0e46 0e4f-0e49 0e5a-0e5b - -; Digits -0e50-0e59 - -# CORRECTION: Change 0e0d to 0e8d (typo in standard; see C++ DR 131) -; Lao -0e81-0e82 0e84 0e87-0e88 0e8a 0e8d 0e94-0e97 0e99-0e9f 0ea1-0ea3 0ea5 -0ea7 0eaa-0eab 0ead-0eb0 0eb2 0eb3 0ebd 0ec0-0ec4 0ec6 - -; Georgian -10a0-10c5 10d0-10f6 - -; Hiragana -3041-3094 309b-309e - -; Katakana -30a1-30fe - -# CORRECTION: language spelled "Bopmofo" in C++98. -; Bopomofo -3105-312c - -; Hangul -1100-1159 1161-11a2 11a8-11f9 - -; CJK Unified Ideographs -f900-fa2d fb1f-fb36 fb38-fb3c fb3e fb40-fb41 fb42-fb44 fb46-fbb1 -fbd3-fd3f fd50-fd8f fd92-fdc7 fdf0-fdfb fe70-fe72 fe74 fe76-fefc -ff21-ff3a ff41-ff5a ff66-ffbe ffc2-ffc7 ffca-ffcf ffd2-ffd7 -ffda-ffdc 4e00-9fa5 - diff --git a/contrib/gcc/demangle.h b/contrib/gcc/demangle.h deleted file mode 100644 index 6e995e4..0000000 --- a/contrib/gcc/demangle.h +++ /dev/null @@ -1,533 +0,0 @@ -/* Defs for interface to demanglers. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, - 2003, 2004 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -#if !defined (DEMANGLE_H) -#define DEMANGLE_H - -#include "libiberty.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* Options passed to cplus_demangle (in 2nd parameter). */ - -#define DMGL_NO_OPTS 0 /* For readability... */ -#define DMGL_PARAMS (1 << 0) /* Include function args */ -#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ -#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */ -#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */ -#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */ - -#define DMGL_AUTO (1 << 8) -#define DMGL_GNU (1 << 9) -#define DMGL_LUCID (1 << 10) -#define DMGL_ARM (1 << 11) -#define DMGL_HP (1 << 12) /* For the HP aCC compiler; - same as ARM except for - template arguments, etc. */ -#define DMGL_EDG (1 << 13) -#define DMGL_GNU_V3 (1 << 14) -#define DMGL_GNAT (1 << 15) - -/* If none of these are set, use 'current_demangling_style' as the default. */ -#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT) - -/* Enumeration of possible demangling styles. - - Lucid and ARM styles are still kept logically distinct, even though - they now both behave identically. The resulting style is actual the - union of both. I.E. either style recognizes both "__pt__" and "__rf__" - for operator "->", even though the first is lucid style and the second - is ARM style. (FIXME?) */ - -extern enum demangling_styles -{ - no_demangling = -1, - unknown_demangling = 0, - auto_demangling = DMGL_AUTO, - gnu_demangling = DMGL_GNU, - lucid_demangling = DMGL_LUCID, - arm_demangling = DMGL_ARM, - hp_demangling = DMGL_HP, - edg_demangling = DMGL_EDG, - gnu_v3_demangling = DMGL_GNU_V3, - java_demangling = DMGL_JAVA, - gnat_demangling = DMGL_GNAT -} current_demangling_style; - -/* Define string names for the various demangling styles. */ - -#define NO_DEMANGLING_STYLE_STRING "none" -#define AUTO_DEMANGLING_STYLE_STRING "auto" -#define GNU_DEMANGLING_STYLE_STRING "gnu" -#define LUCID_DEMANGLING_STYLE_STRING "lucid" -#define ARM_DEMANGLING_STYLE_STRING "arm" -#define HP_DEMANGLING_STYLE_STRING "hp" -#define EDG_DEMANGLING_STYLE_STRING "edg" -#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3" -#define JAVA_DEMANGLING_STYLE_STRING "java" -#define GNAT_DEMANGLING_STYLE_STRING "gnat" - -/* Some macros to test what demangling style is active. */ - -#define CURRENT_DEMANGLING_STYLE current_demangling_style -#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO) -#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU) -#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID) -#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM) -#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP) -#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG) -#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3) -#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA) -#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT) - -/* Provide information about the available demangle styles. This code is - pulled from gdb into libiberty because it is useful to binutils also. */ - -extern const struct demangler_engine -{ - const char *const demangling_style_name; - const enum demangling_styles demangling_style; - const char *const demangling_style_doc; -} libiberty_demanglers[]; - -extern char * -cplus_demangle PARAMS ((const char *mangled, int options)); - -extern int -cplus_demangle_opname PARAMS ((const char *opname, char *result, int options)); - -extern const char * -cplus_mangle_opname PARAMS ((const char *opname, int options)); - -/* Note: This sets global state. FIXME if you care about multi-threading. */ - -extern void -set_cplus_marker_for_demangling PARAMS ((int ch)); - -extern enum demangling_styles -cplus_demangle_set_style PARAMS ((enum demangling_styles style)); - -extern enum demangling_styles -cplus_demangle_name_to_style PARAMS ((const char *name)); - -/* V3 ABI demangling entry points, defined in cp-demangle.c. */ -extern char* -cplus_demangle_v3 PARAMS ((const char* mangled, int options)); - -extern char* -java_demangle_v3 PARAMS ((const char* mangled)); - - -enum gnu_v3_ctor_kinds { - gnu_v3_complete_object_ctor = 1, - gnu_v3_base_object_ctor, - gnu_v3_complete_object_allocating_ctor -}; - -/* Return non-zero iff NAME is the mangled form of a constructor name - in the G++ V3 ABI demangling style. Specifically, return an `enum - gnu_v3_ctor_kinds' value indicating what kind of constructor - it is. */ -extern enum gnu_v3_ctor_kinds - is_gnu_v3_mangled_ctor PARAMS ((const char *name)); - - -enum gnu_v3_dtor_kinds { - gnu_v3_deleting_dtor = 1, - gnu_v3_complete_object_dtor, - gnu_v3_base_object_dtor -}; - -/* Return non-zero iff NAME is the mangled form of a destructor name - in the G++ V3 ABI demangling style. Specifically, return an `enum - gnu_v3_dtor_kinds' value, indicating what kind of destructor - it is. */ -extern enum gnu_v3_dtor_kinds - is_gnu_v3_mangled_dtor PARAMS ((const char *name)); - -/* The V3 demangler works in two passes. The first pass builds a tree - representation of the mangled name, and the second pass turns the - tree representation into a demangled string. Here we define an - interface to permit a caller to build their own tree - representation, which they can pass to the demangler to get a - demangled string. This can be used to canonicalize user input into - something which the demangler might output. It could also be used - by other demanglers in the future. */ - -/* These are the component types which may be found in the tree. Many - component types have one or two subtrees, referred to as left and - right (a component type with only one subtree puts it in the left - subtree). */ - -enum demangle_component_type -{ - /* A name, with a length and a pointer to a string. */ - DEMANGLE_COMPONENT_NAME, - /* A qualified name. The left subtree is a class or namespace or - some such thing, and the right subtree is a name qualified by - that class. */ - DEMANGLE_COMPONENT_QUAL_NAME, - /* A local name. The left subtree describes a function, and the - right subtree is a name which is local to that function. */ - DEMANGLE_COMPONENT_LOCAL_NAME, - /* A typed name. The left subtree is a name, and the right subtree - describes that name as a function. */ - DEMANGLE_COMPONENT_TYPED_NAME, - /* A template. The left subtree is a template name, and the right - subtree is a template argument list. */ - DEMANGLE_COMPONENT_TEMPLATE, - /* A template parameter. This holds a number, which is the template - parameter index. */ - DEMANGLE_COMPONENT_TEMPLATE_PARAM, - /* A constructor. This holds a name and the kind of - constructor. */ - DEMANGLE_COMPONENT_CTOR, - /* A destructor. This holds a name and the kind of destructor. */ - DEMANGLE_COMPONENT_DTOR, - /* A vtable. This has one subtree, the type for which this is a - vtable. */ - DEMANGLE_COMPONENT_VTABLE, - /* A VTT structure. This has one subtree, the type for which this - is a VTT. */ - DEMANGLE_COMPONENT_VTT, - /* A construction vtable. The left subtree is the type for which - this is a vtable, and the right subtree is the derived type for - which this vtable is built. */ - DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, - /* A typeinfo structure. This has one subtree, the type for which - this is the tpeinfo structure. */ - DEMANGLE_COMPONENT_TYPEINFO, - /* A typeinfo name. This has one subtree, the type for which this - is the typeinfo name. */ - DEMANGLE_COMPONENT_TYPEINFO_NAME, - /* A typeinfo function. This has one subtree, the type for which - this is the tpyeinfo function. */ - DEMANGLE_COMPONENT_TYPEINFO_FN, - /* A thunk. This has one subtree, the name for which this is a - thunk. */ - DEMANGLE_COMPONENT_THUNK, - /* A virtual thunk. This has one subtree, the name for which this - is a virtual thunk. */ - DEMANGLE_COMPONENT_VIRTUAL_THUNK, - /* A covariant thunk. This has one subtree, the name for which this - is a covariant thunk. */ - DEMANGLE_COMPONENT_COVARIANT_THUNK, - /* A Java class. This has one subtree, the type. */ - DEMANGLE_COMPONENT_JAVA_CLASS, - /* A guard variable. This has one subtree, the name for which this - is a guard variable. */ - DEMANGLE_COMPONENT_GUARD, - /* A reference temporary. This has one subtree, the name for which - this is a temporary. */ - DEMANGLE_COMPONENT_REFTEMP, - /* A standard substitution. This holds the name of the - substitution. */ - DEMANGLE_COMPONENT_SUB_STD, - /* The restrict qualifier. The one subtree is the type which is - being qualified. */ - DEMANGLE_COMPONENT_RESTRICT, - /* The volatile qualifier. The one subtree is the type which is - being qualified. */ - DEMANGLE_COMPONENT_VOLATILE, - /* The const qualifier. The one subtree is the type which is being - qualified. */ - DEMANGLE_COMPONENT_CONST, - /* The restrict qualifier modifying a member function. The one - subtree is the type which is being qualified. */ - DEMANGLE_COMPONENT_RESTRICT_THIS, - /* The volatile qualifier modifying a member function. The one - subtree is the type which is being qualified. */ - DEMANGLE_COMPONENT_VOLATILE_THIS, - /* The const qualifier modifying a member function. The one subtree - is the type which is being qualified. */ - DEMANGLE_COMPONENT_CONST_THIS, - /* A vendor qualifier. The left subtree is the type which is being - qualified, and the right subtree is the name of the - qualifier. */ - DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL, - /* A pointer. The one subtree is the type which is being pointed - to. */ - DEMANGLE_COMPONENT_POINTER, - /* A reference. The one subtree is the type which is being - referenced. */ - DEMANGLE_COMPONENT_REFERENCE, - /* A complex type. The one subtree is the base type. */ - DEMANGLE_COMPONENT_COMPLEX, - /* An imaginary type. The one subtree is the base type. */ - DEMANGLE_COMPONENT_IMAGINARY, - /* A builtin type. This holds the builtin type information. */ - DEMANGLE_COMPONENT_BUILTIN_TYPE, - /* A vendor's builtin type. This holds the name of the type. */ - DEMANGLE_COMPONENT_VENDOR_TYPE, - /* A function type. The left subtree is the return type. The right - subtree is a list of ARGLIST nodes. Either or both may be - NULL. */ - DEMANGLE_COMPONENT_FUNCTION_TYPE, - /* An array type. The left subtree is the dimension, which may be - NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an - expression. The right subtree is the element type. */ - DEMANGLE_COMPONENT_ARRAY_TYPE, - /* A pointer to member type. The left subtree is the class type, - and the right subtree is the member type. CV-qualifiers appear - on the latter. */ - DEMANGLE_COMPONENT_PTRMEM_TYPE, - /* An argument list. The left subtree is the current argument, and - the right subtree is either NULL or another ARGLIST node. */ - DEMANGLE_COMPONENT_ARGLIST, - /* A template argument list. The left subtree is the current - template argument, and the right subtree is either NULL or - another TEMPLATE_ARGLIST node. */ - DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, - /* An operator. This holds information about a standard - operator. */ - DEMANGLE_COMPONENT_OPERATOR, - /* An extended operator. This holds the number of arguments, and - the name of the extended operator. */ - DEMANGLE_COMPONENT_EXTENDED_OPERATOR, - /* A typecast, represented as a unary operator. The one subtree is - the type to which the argument should be cast. */ - DEMANGLE_COMPONENT_CAST, - /* A unary expression. The left subtree is the operator, and the - right subtree is the single argument. */ - DEMANGLE_COMPONENT_UNARY, - /* A binary expression. The left subtree is the operator, and the - right subtree is a BINARY_ARGS. */ - DEMANGLE_COMPONENT_BINARY, - /* Arguments to a binary expression. The left subtree is the first - argument, and the right subtree is the second argument. */ - DEMANGLE_COMPONENT_BINARY_ARGS, - /* A trinary expression. The left subtree is the operator, and the - right subtree is a TRINARY_ARG1. */ - DEMANGLE_COMPONENT_TRINARY, - /* Arguments to a trinary expression. The left subtree is the first - argument, and the right subtree is a TRINARY_ARG2. */ - DEMANGLE_COMPONENT_TRINARY_ARG1, - /* More arguments to a trinary expression. The left subtree is the - second argument, and the right subtree is the third argument. */ - DEMANGLE_COMPONENT_TRINARY_ARG2, - /* A literal. The left subtree is the type, and the right subtree - is the value, represented as a DEMANGLE_COMPONENT_NAME. */ - DEMANGLE_COMPONENT_LITERAL, - /* A negative literal. Like LITERAL, but the value is negated. - This is a minor hack: the NAME used for LITERAL points directly - to the mangled string, but since negative numbers are mangled - using 'n' instead of '-', we want a way to indicate a negative - number which involves neither modifying the mangled string nor - allocating a new copy of the literal in memory. */ - DEMANGLE_COMPONENT_LITERAL_NEG -}; - -/* Types which are only used internally. */ - -struct demangle_operator_info; -struct demangle_builtin_type_info; - -/* A node in the tree representation is an instance of a struct - demangle_component. Note that the field names of the struct are - not well protected against macros defined by the file including - this one. We can fix this if it ever becomes a problem. */ - -struct demangle_component -{ - /* The type of this component. */ - enum demangle_component_type type; - - union - { - /* For DEMANGLE_COMPONENT_NAME. */ - struct - { - /* A pointer to the name (which need not NULL terminated) and - its length. */ - const char *s; - int len; - } s_name; - - /* For DEMANGLE_COMPONENT_OPERATOR. */ - struct - { - /* Operator. */ - const struct demangle_operator_info *op; - } s_operator; - - /* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */ - struct - { - /* Number of arguments. */ - int args; - /* Name. */ - struct demangle_component *name; - } s_extended_operator; - - /* For DEMANGLE_COMPONENT_CTOR. */ - struct - { - /* Kind of constructor. */ - enum gnu_v3_ctor_kinds kind; - /* Name. */ - struct demangle_component *name; - } s_ctor; - - /* For DEMANGLE_COMPONENT_DTOR. */ - struct - { - /* Kind of destructor. */ - enum gnu_v3_dtor_kinds kind; - /* Name. */ - struct demangle_component *name; - } s_dtor; - - /* For DEMANGLE_COMPONENT_BUILTIN_TYPE. */ - struct - { - /* Builtin type. */ - const struct demangle_builtin_type_info *type; - } s_builtin; - - /* For DEMANGLE_COMPONENT_SUB_STD. */ - struct - { - /* Standard substitution string. */ - const char* string; - /* Length of string. */ - int len; - } s_string; - - /* For DEMANGLE_COMPONENT_TEMPLATE_PARAM. */ - struct - { - /* Template parameter index. */ - long number; - } s_number; - - /* For other types. */ - struct - { - /* Left (or only) subtree. */ - struct demangle_component *left; - /* Right subtree. */ - struct demangle_component *right; - } s_binary; - - } u; -}; - -/* People building mangled trees are expected to allocate instances of - struct demangle_component themselves. They can then call one of - the following functions to fill them in. */ - -/* Fill in most component types with a left subtree and a right - subtree. Returns non-zero on success, zero on failure, such as an - unrecognized or inappropriate component type. */ - -extern int -cplus_demangle_fill_component PARAMS ((struct demangle_component *fill, - enum demangle_component_type, - struct demangle_component *left, - struct demangle_component *right)); - -/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success, - zero for bad arguments. */ - -extern int -cplus_demangle_fill_name PARAMS ((struct demangle_component *fill, - const char *, int)); - -/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the - builtin type (e.g., "int", etc.). Returns non-zero on success, - zero if the type is not recognized. */ - -extern int -cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill, - const char *typename)); - -/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the - operator and the number of arguments which it takes (the latter is - used to disambiguate operators which can be both binary and unary, - such as '-'). Returns non-zero on success, zero if the operator is - not recognized. */ - -extern int -cplus_demangle_fill_operator PARAMS ((struct demangle_component *fill, - const char *opname, int args)); - -/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the - number of arguments and the name. Returns non-zero on success, - zero for bad arguments. */ - -extern int -cplus_demangle_fill_extended_operator PARAMS ((struct demangle_component *fill, - int numargs, - struct demangle_component *nm)); - -/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success, - zero for bad arguments. */ - -extern int -cplus_demangle_fill_ctor PARAMS ((struct demangle_component *fill, - enum gnu_v3_ctor_kinds kind, - struct demangle_component *name)); - -/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success, - zero for bad arguments. */ - -extern int -cplus_demangle_fill_dtor PARAMS ((struct demangle_component *fill, - enum gnu_v3_dtor_kinds kind, - struct demangle_component *name)); - -/* This function translates a mangled name into a struct - demangle_component tree. The first argument is the mangled name. - The second argument is DMGL_* options. This returns a pointer to a - tree on success, or NULL on failure. On success, the third - argument is set to a block of memory allocated by malloc. This - block should be passed to free when the tree is no longer - needed. */ - -extern struct demangle_component * -cplus_demangle_v3_components PARAMS ((const char *mangled, - int options, - void **mem)); - -/* This function takes a struct demangle_component tree and returns - the corresponding demangled string. The first argument is DMGL_* - options. The second is the tree to demangle. The third is a guess - at the length of the demangled string, used to initially allocate - the return buffer. The fourth is a pointer to a size_t. On - success, this function returns a buffer allocated by malloc(), and - sets the size_t pointed to by the fourth argument to the size of - the allocated buffer (not the length of the returned string). On - failure, this function returns NULL, and sets the size_t pointed to - by the fourth argument to 0 for an invalid tree, or to 1 for a - memory allocation error. */ - -extern char * -cplus_demangle_print PARAMS ((int options, - const struct demangle_component *tree, - int estimated_length, - size_t *p_allocated_size)); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* DEMANGLE_H */ diff --git a/contrib/gcc/df.c b/contrib/gcc/df.c deleted file mode 100644 index d91f95e..0000000 --- a/contrib/gcc/df.c +++ /dev/null @@ -1,3697 +0,0 @@ -/* Dataflow support routines. - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. - Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz, - mhayes@redhat.com) - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - -OVERVIEW: - -This file provides some dataflow routines for computing reaching defs, -upward exposed uses, live variables, def-use chains, and use-def -chains. The global dataflow is performed using simple iterative -methods with a worklist and could be sped up by ordering the blocks -with a depth first search order. - -A `struct ref' data structure (ref) is allocated for every register -reference (def or use) and this records the insn and bb the ref is -found within. The refs are linked together in chains of uses and defs -for each insn and for each register. Each ref also has a chain field -that links all the use refs for a def or all the def refs for a use. -This is used to create use-def or def-use chains. - - -USAGE: - -Here's an example of using the dataflow routines. - - struct df *df; - - df = df_init (); - - df_analyse (df, 0, DF_ALL); - - df_dump (df, DF_ALL, stderr); - - df_finish (df); - - -df_init simply creates a poor man's object (df) that needs to be -passed to all the dataflow routines. df_finish destroys this -object and frees up any allocated memory. DF_ALL says to analyse -everything. - -df_analyse performs the following: - -1. Records defs and uses by scanning the insns in each basic block - or by scanning the insns queued by df_insn_modify. -2. Links defs and uses into insn-def and insn-use chains. -3. Links defs and uses into reg-def and reg-use chains. -4. Assigns LUIDs to each insn (for modified blocks). -5. Calculates local reaching definitions. -6. Calculates global reaching definitions. -7. Creates use-def chains. -8. Calculates local reaching uses (upwards exposed uses). -9. Calculates global reaching uses. -10. Creates def-use chains. -11. Calculates local live registers. -12. Calculates global live registers. -13. Calculates register lifetimes and determines local registers. - - -PHILOSOPHY: - -Note that the dataflow information is not updated for every newly -deleted or created insn. If the dataflow information requires -updating then all the changed, new, or deleted insns needs to be -marked with df_insn_modify (or df_insns_modify) either directly or -indirectly (say through calling df_insn_delete). df_insn_modify -marks all the modified insns to get processed the next time df_analyse - is called. - -Beware that tinkering with insns may invalidate the dataflow information. -The philosophy behind these routines is that once the dataflow -information has been gathered, the user should store what they require -before they tinker with any insn. Once a reg is replaced, for example, -then the reg-def/reg-use chains will point to the wrong place. Once a -whole lot of changes have been made, df_analyse can be called again -to update the dataflow information. Currently, this is not very smart -with regard to propagating changes to the dataflow so it should not -be called very often. - - -DATA STRUCTURES: - -The basic object is a REF (reference) and this may either be a DEF -(definition) or a USE of a register. - -These are linked into a variety of lists; namely reg-def, reg-use, - insn-def, insn-use, def-use, and use-def lists. For example, -the reg-def lists contain all the refs that define a given register -while the insn-use lists contain all the refs used by an insn. - -Note that the reg-def and reg-use chains are generally short (except for the -hard registers) and thus it is much faster to search these chains -rather than searching the def or use bitmaps. - -If the insns are in SSA form then the reg-def and use-def lists -should only contain the single defining ref. - - -TODO: - -1) Incremental dataflow analysis. - -Note that if a loop invariant insn is hoisted (or sunk), we do not -need to change the def-use or use-def chains. All we have to do is to -change the bb field for all the associated defs and uses and to -renumber the LUIDs for the original and new basic blocks of the insn. - -When shadowing loop mems we create new uses and defs for new pseudos -so we do not affect the existing dataflow information. - -My current strategy is to queue up all modified, created, or deleted -insns so when df_analyse is called we can easily determine all the new -or deleted refs. Currently the global dataflow information is -recomputed from scratch but this could be propagated more efficiently. - -2) Reduced memory requirements. - -We could operate a pool of ref structures. When a ref is deleted it -gets returned to the pool (say by linking on to a chain of free refs). -This will require a pair of bitmaps for defs and uses so that we can -tell which ones have been changed. Alternatively, we could -periodically squeeze the def and use tables and associated bitmaps and -renumber the def and use ids. - -3) Ordering of reg-def and reg-use lists. - -Should the first entry in the def list be the first def (within a BB)? -Similarly, should the first entry in the use list be the last use -(within a BB)? - -4) Working with a sub-CFG. - -Often the whole CFG does not need to be analyzed, for example, -when optimizing a loop, only certain registers are of interest. -Perhaps there should be a bitmap argument to df_analyse to specify -which registers should be analyzed? - - -NOTES: - -Embedded addressing side-effects, such as POST_INC or PRE_INC, generate -both a use and a def. These are both marked read/write to show that they -are dependent. For example, (set (reg 40) (mem (post_inc (reg 42)))) -will generate a use of reg 42 followed by a def of reg 42 (both marked -read/write). Similarly, (set (reg 40) (mem (pre_dec (reg 41)))) -generates a use of reg 41 then a def of reg 41 (both marked read/write), -even though reg 41 is decremented before it is used for the memory -address in this second example. - -A set to a REG inside a ZERO_EXTRACT, SIGN_EXTRACT, or SUBREG invokes -a read-modify write operation. We generate both a use and a def -and again mark them read/write. -*/ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "rtl.h" -#include "tm_p.h" -#include "insn-config.h" -#include "recog.h" -#include "function.h" -#include "regs.h" -#include "alloc-pool.h" -#include "hard-reg-set.h" -#include "basic-block.h" -#include "sbitmap.h" -#include "bitmap.h" -#include "df.h" -#include "fibheap.h" - -#define FOR_EACH_BB_IN_BITMAP(BITMAP, MIN, BB, CODE) \ - do \ - { \ - unsigned int node_; \ - EXECUTE_IF_SET_IN_BITMAP (BITMAP, MIN, node_, \ - {(BB) = BASIC_BLOCK (node_); CODE;}); \ - } \ - while (0) - -static alloc_pool df_ref_pool; -static alloc_pool df_link_pool; -static struct df *ddf; - -static void df_reg_table_realloc (struct df *, int); -static void df_insn_table_realloc (struct df *, unsigned int); -static void df_bitmaps_alloc (struct df *, int); -static void df_bitmaps_free (struct df *, int); -static void df_free (struct df *); -static void df_alloc (struct df *, int); - -static rtx df_reg_clobber_gen (unsigned int); -static rtx df_reg_use_gen (unsigned int); - -static inline struct df_link *df_link_create (struct ref *, struct df_link *); -static struct df_link *df_ref_unlink (struct df_link **, struct ref *); -static void df_def_unlink (struct df *, struct ref *); -static void df_use_unlink (struct df *, struct ref *); -static void df_insn_refs_unlink (struct df *, basic_block, rtx); -#if 0 -static void df_bb_refs_unlink (struct df *, basic_block); -static void df_refs_unlink (struct df *, bitmap); -#endif - -static struct ref *df_ref_create (struct df *, rtx, rtx *, rtx, - enum df_ref_type, enum df_ref_flags); -static void df_ref_record_1 (struct df *, rtx, rtx *, rtx, enum df_ref_type, - enum df_ref_flags); -static void df_ref_record (struct df *, rtx, rtx *, rtx, enum df_ref_type, - enum df_ref_flags); -static void df_def_record_1 (struct df *, rtx, basic_block, rtx); -static void df_defs_record (struct df *, rtx, basic_block, rtx); -static void df_uses_record (struct df *, rtx *, enum df_ref_type, - basic_block, rtx, enum df_ref_flags); -static void df_insn_refs_record (struct df *, basic_block, rtx); -static void df_bb_refs_record (struct df *, basic_block); -static void df_refs_record (struct df *, bitmap); - -static void df_bb_reg_def_chain_create (struct df *, basic_block); -static void df_reg_def_chain_create (struct df *, bitmap); -static void df_bb_reg_use_chain_create (struct df *, basic_block); -static void df_reg_use_chain_create (struct df *, bitmap); -static void df_bb_du_chain_create (struct df *, basic_block, bitmap); -static void df_du_chain_create (struct df *, bitmap); -static void df_bb_ud_chain_create (struct df *, basic_block); -static void df_ud_chain_create (struct df *, bitmap); -static void df_bb_rd_local_compute (struct df *, basic_block); -static void df_rd_local_compute (struct df *, bitmap); -static void df_bb_ru_local_compute (struct df *, basic_block); -static void df_ru_local_compute (struct df *, bitmap); -static void df_bb_lr_local_compute (struct df *, basic_block); -static void df_lr_local_compute (struct df *, bitmap); -static void df_bb_reg_info_compute (struct df *, basic_block, bitmap); -static void df_reg_info_compute (struct df *, bitmap); - -static int df_bb_luids_set (struct df *df, basic_block); -static int df_luids_set (struct df *df, bitmap); - -static int df_modified_p (struct df *, bitmap); -static int df_refs_queue (struct df *); -static int df_refs_process (struct df *); -static int df_bb_refs_update (struct df *, basic_block); -static int df_refs_update (struct df *); -static void df_analyse_1 (struct df *, bitmap, int, int); - -static void df_insns_modify (struct df *, basic_block, rtx, rtx); -static int df_rtx_mem_replace (rtx *, void *); -static int df_rtx_reg_replace (rtx *, void *); -void df_refs_reg_replace (struct df *, bitmap, struct df_link *, rtx, rtx); - -static int df_def_dominates_all_uses_p (struct df *, struct ref *def); -static int df_def_dominates_uses_p (struct df *, struct ref *def, bitmap); -static struct ref *df_bb_regno_last_use_find (struct df *, basic_block, - unsigned int); -static struct ref *df_bb_regno_first_def_find (struct df *, basic_block, - unsigned int); -static struct ref *df_bb_insn_regno_last_use_find (struct df *, basic_block, - rtx, unsigned int); -static struct ref *df_bb_insn_regno_first_def_find (struct df *, basic_block, - rtx, unsigned int); - -static void df_chain_dump (struct df_link *, FILE *file); -static void df_chain_dump_regno (struct df_link *, FILE *file); -static void df_regno_debug (struct df *, unsigned int, FILE *); -static void df_ref_debug (struct df *, struct ref *, FILE *); -static void df_rd_transfer_function (int, int *, bitmap, bitmap, bitmap, - bitmap, void *); -static void df_ru_transfer_function (int, int *, bitmap, bitmap, bitmap, - bitmap, void *); -static void df_lr_transfer_function (int, int *, bitmap, bitmap, bitmap, - bitmap, void *); -static void hybrid_search_bitmap (basic_block, bitmap *, bitmap *, - bitmap *, bitmap *, enum df_flow_dir, - enum df_confluence_op, - transfer_function_bitmap, - sbitmap, sbitmap, void *); -static void hybrid_search_sbitmap (basic_block, sbitmap *, sbitmap *, - sbitmap *, sbitmap *, enum df_flow_dir, - enum df_confluence_op, - transfer_function_sbitmap, - sbitmap, sbitmap, void *); - - -/* Local memory allocation/deallocation routines. */ - - -/* Increase the insn info table to have space for at least SIZE + 1 - elements. */ -static void -df_insn_table_realloc (struct df *df, unsigned int size) -{ - size++; - if (size <= df->insn_size) - return; - - /* Make the table a little larger than requested, so we do not need - to enlarge it so often. */ - size += df->insn_size / 4; - - df->insns = xrealloc (df->insns, size * sizeof (struct insn_info)); - - memset (df->insns + df->insn_size, 0, - (size - df->insn_size) * sizeof (struct insn_info)); - - df->insn_size = size; - - if (! df->insns_modified) - { - df->insns_modified = BITMAP_XMALLOC (); - bitmap_zero (df->insns_modified); - } -} - - -/* Increase the reg info table by SIZE more elements. */ -static void -df_reg_table_realloc (struct df *df, int size) -{ - /* Make table 25 percent larger by default. */ - if (! size) - size = df->reg_size / 4; - - size += df->reg_size; - if (size < max_reg_num ()) - size = max_reg_num (); - - df->regs = xrealloc (df->regs, size * sizeof (struct reg_info)); - - /* Zero the new entries. */ - memset (df->regs + df->reg_size, 0, - (size - df->reg_size) * sizeof (struct reg_info)); - - df->reg_size = size; -} - - -/* Allocate bitmaps for each basic block. */ -static void -df_bitmaps_alloc (struct df *df, int flags) -{ - int dflags = 0; - basic_block bb; - - /* Free the bitmaps if they need resizing. */ - if ((flags & DF_LR) && df->n_regs < (unsigned int) max_reg_num ()) - dflags |= DF_LR | DF_RU; - if ((flags & DF_RU) && df->n_uses < df->use_id) - dflags |= DF_RU; - if ((flags & DF_RD) && df->n_defs < df->def_id) - dflags |= DF_RD; - - if (dflags) - df_bitmaps_free (df, dflags); - - df->n_defs = df->def_id; - df->n_uses = df->use_id; - - FOR_EACH_BB (bb) - { - struct bb_info *bb_info = DF_BB_INFO (df, bb); - - if (flags & DF_RD && ! bb_info->rd_in) - { - /* Allocate bitmaps for reaching definitions. */ - bb_info->rd_kill = BITMAP_XMALLOC (); - bitmap_zero (bb_info->rd_kill); - bb_info->rd_gen = BITMAP_XMALLOC (); - bitmap_zero (bb_info->rd_gen); - bb_info->rd_in = BITMAP_XMALLOC (); - bb_info->rd_out = BITMAP_XMALLOC (); - bb_info->rd_valid = 0; - } - - if (flags & DF_RU && ! bb_info->ru_in) - { - /* Allocate bitmaps for upward exposed uses. */ - bb_info->ru_kill = BITMAP_XMALLOC (); - bitmap_zero (bb_info->ru_kill); - /* Note the lack of symmetry. */ - bb_info->ru_gen = BITMAP_XMALLOC (); - bitmap_zero (bb_info->ru_gen); - bb_info->ru_in = BITMAP_XMALLOC (); - bb_info->ru_out = BITMAP_XMALLOC (); - bb_info->ru_valid = 0; - } - - if (flags & DF_LR && ! bb_info->lr_in) - { - /* Allocate bitmaps for live variables. */ - bb_info->lr_def = BITMAP_XMALLOC (); - bitmap_zero (bb_info->lr_def); - bb_info->lr_use = BITMAP_XMALLOC (); - bitmap_zero (bb_info->lr_use); - bb_info->lr_in = BITMAP_XMALLOC (); - bb_info->lr_out = BITMAP_XMALLOC (); - bb_info->lr_valid = 0; - } - } -} - - -/* Free bitmaps for each basic block. */ -static void -df_bitmaps_free (struct df *df, int flags) -{ - basic_block bb; - - FOR_EACH_BB (bb) - { - struct bb_info *bb_info = DF_BB_INFO (df, bb); - - if (!bb_info) - continue; - - if ((flags & DF_RD) && bb_info->rd_in) - { - /* Free bitmaps for reaching definitions. */ - BITMAP_XFREE (bb_info->rd_kill); - bb_info->rd_kill = NULL; - BITMAP_XFREE (bb_info->rd_gen); - bb_info->rd_gen = NULL; - BITMAP_XFREE (bb_info->rd_in); - bb_info->rd_in = NULL; - BITMAP_XFREE (bb_info->rd_out); - bb_info->rd_out = NULL; - } - - if ((flags & DF_RU) && bb_info->ru_in) - { - /* Free bitmaps for upward exposed uses. */ - BITMAP_XFREE (bb_info->ru_kill); - bb_info->ru_kill = NULL; - BITMAP_XFREE (bb_info->ru_gen); - bb_info->ru_gen = NULL; - BITMAP_XFREE (bb_info->ru_in); - bb_info->ru_in = NULL; - BITMAP_XFREE (bb_info->ru_out); - bb_info->ru_out = NULL; - } - - if ((flags & DF_LR) && bb_info->lr_in) - { - /* Free bitmaps for live variables. */ - BITMAP_XFREE (bb_info->lr_def); - bb_info->lr_def = NULL; - BITMAP_XFREE (bb_info->lr_use); - bb_info->lr_use = NULL; - BITMAP_XFREE (bb_info->lr_in); - bb_info->lr_in = NULL; - BITMAP_XFREE (bb_info->lr_out); - bb_info->lr_out = NULL; - } - } - df->flags &= ~(flags & (DF_RD | DF_RU | DF_LR)); -} - - -/* Allocate and initialize dataflow memory. */ -static void -df_alloc (struct df *df, int n_regs) -{ - int n_insns; - basic_block bb; - - df_link_pool = create_alloc_pool ("df_link pool", sizeof (struct df_link), - 100); - df_ref_pool = create_alloc_pool ("df_ref pool", sizeof (struct ref), 100); - - /* Perhaps we should use LUIDs to save memory for the insn_refs - table. This is only a small saving; a few pointers. */ - n_insns = get_max_uid () + 1; - - df->def_id = 0; - df->n_defs = 0; - /* Approximate number of defs by number of insns. */ - df->def_size = n_insns; - df->defs = xmalloc (df->def_size * sizeof (*df->defs)); - - df->use_id = 0; - df->n_uses = 0; - /* Approximate number of uses by twice number of insns. */ - df->use_size = n_insns * 2; - df->uses = xmalloc (df->use_size * sizeof (*df->uses)); - - df->n_regs = n_regs; - df->n_bbs = last_basic_block; - - /* Allocate temporary working array used during local dataflow analysis. */ - df->reg_def_last = xmalloc (df->n_regs * sizeof (struct ref *)); - - df_insn_table_realloc (df, n_insns); - - df_reg_table_realloc (df, df->n_regs); - - df->bbs_modified = BITMAP_XMALLOC (); - bitmap_zero (df->bbs_modified); - - df->flags = 0; - - df->bbs = xcalloc (last_basic_block, sizeof (struct bb_info)); - - df->all_blocks = BITMAP_XMALLOC (); - FOR_EACH_BB (bb) - bitmap_set_bit (df->all_blocks, bb->index); -} - - -/* Free all the dataflow info. */ -static void -df_free (struct df *df) -{ - df_bitmaps_free (df, DF_ALL); - - if (df->bbs) - free (df->bbs); - df->bbs = 0; - - if (df->insns) - free (df->insns); - df->insns = 0; - df->insn_size = 0; - - if (df->defs) - free (df->defs); - df->defs = 0; - df->def_size = 0; - df->def_id = 0; - - if (df->uses) - free (df->uses); - df->uses = 0; - df->use_size = 0; - df->use_id = 0; - - if (df->regs) - free (df->regs); - df->regs = 0; - df->reg_size = 0; - - if (df->bbs_modified) - BITMAP_XFREE (df->bbs_modified); - df->bbs_modified = 0; - - if (df->insns_modified) - BITMAP_XFREE (df->insns_modified); - df->insns_modified = 0; - - BITMAP_XFREE (df->all_blocks); - df->all_blocks = 0; - - free_alloc_pool (df_ref_pool); - free_alloc_pool (df_link_pool); - -} - -/* Local miscellaneous routines. */ - -/* Return a USE for register REGNO. */ -static rtx df_reg_use_gen (unsigned int regno) -{ - rtx reg; - rtx use; - - reg = regno_reg_rtx[regno]; - - use = gen_rtx_USE (GET_MODE (reg), reg); - return use; -} - - -/* Return a CLOBBER for register REGNO. */ -static rtx df_reg_clobber_gen (unsigned int regno) -{ - rtx reg; - rtx use; - - reg = regno_reg_rtx[regno]; - - use = gen_rtx_CLOBBER (GET_MODE (reg), reg); - return use; -} - -/* Local chain manipulation routines. */ - -/* Create a link in a def-use or use-def chain. */ -static inline struct df_link * -df_link_create (struct ref *ref, struct df_link *next) -{ - struct df_link *link; - - link = pool_alloc (df_link_pool); - link->next = next; - link->ref = ref; - return link; -} - - -/* Add REF to chain head pointed to by PHEAD. */ -static struct df_link * -df_ref_unlink (struct df_link **phead, struct ref *ref) -{ - struct df_link *link = *phead; - - if (link) - { - if (! link->next) - { - /* Only a single ref. It must be the one we want. - If not, the def-use and use-def chains are likely to - be inconsistent. */ - if (link->ref != ref) - abort (); - /* Now have an empty chain. */ - *phead = NULL; - } - else - { - /* Multiple refs. One of them must be us. */ - if (link->ref == ref) - *phead = link->next; - else - { - /* Follow chain. */ - for (; link->next; link = link->next) - { - if (link->next->ref == ref) - { - /* Unlink from list. */ - link->next = link->next->next; - return link->next; - } - } - } - } - } - return link; -} - - -/* Unlink REF from all def-use/use-def chains, etc. */ -int -df_ref_remove (struct df *df, struct ref *ref) -{ - if (DF_REF_REG_DEF_P (ref)) - { - df_def_unlink (df, ref); - df_ref_unlink (&df->insns[DF_REF_INSN_UID (ref)].defs, ref); - } - else - { - df_use_unlink (df, ref); - df_ref_unlink (&df->insns[DF_REF_INSN_UID (ref)].uses, ref); - } - return 1; -} - - -/* Unlink DEF from use-def and reg-def chains. */ -static void -df_def_unlink (struct df *df ATTRIBUTE_UNUSED, struct ref *def) -{ - struct df_link *du_link; - unsigned int dregno = DF_REF_REGNO (def); - - /* Follow def-use chain to find all the uses of this def. */ - for (du_link = DF_REF_CHAIN (def); du_link; du_link = du_link->next) - { - struct ref *use = du_link->ref; - - /* Unlink this def from the use-def chain. */ - df_ref_unlink (&DF_REF_CHAIN (use), def); - } - DF_REF_CHAIN (def) = 0; - - /* Unlink def from reg-def chain. */ - df_ref_unlink (&df->regs[dregno].defs, def); - - df->defs[DF_REF_ID (def)] = 0; -} - - -/* Unlink use from def-use and reg-use chains. */ -static void -df_use_unlink (struct df *df ATTRIBUTE_UNUSED, struct ref *use) -{ - struct df_link *ud_link; - unsigned int uregno = DF_REF_REGNO (use); - - /* Follow use-def chain to find all the defs of this use. */ - for (ud_link = DF_REF_CHAIN (use); ud_link; ud_link = ud_link->next) - { - struct ref *def = ud_link->ref; - - /* Unlink this use from the def-use chain. */ - df_ref_unlink (&DF_REF_CHAIN (def), use); - } - DF_REF_CHAIN (use) = 0; - - /* Unlink use from reg-use chain. */ - df_ref_unlink (&df->regs[uregno].uses, use); - - df->uses[DF_REF_ID (use)] = 0; -} - -/* Local routines for recording refs. */ - - -/* Create a new ref of type DF_REF_TYPE for register REG at address - LOC within INSN of BB. */ -static struct ref * -df_ref_create (struct df *df, rtx reg, rtx *loc, rtx insn, - enum df_ref_type ref_type, enum df_ref_flags ref_flags) -{ - struct ref *this_ref; - - this_ref = pool_alloc (df_ref_pool); - DF_REF_REG (this_ref) = reg; - DF_REF_LOC (this_ref) = loc; - DF_REF_INSN (this_ref) = insn; - DF_REF_CHAIN (this_ref) = 0; - DF_REF_TYPE (this_ref) = ref_type; - DF_REF_FLAGS (this_ref) = ref_flags; - - if (ref_type == DF_REF_REG_DEF) - { - if (df->def_id >= df->def_size) - { - /* Make table 25 percent larger. */ - df->def_size += (df->def_size / 4); - df->defs = xrealloc (df->defs, - df->def_size * sizeof (*df->defs)); - } - DF_REF_ID (this_ref) = df->def_id; - df->defs[df->def_id++] = this_ref; - } - else - { - if (df->use_id >= df->use_size) - { - /* Make table 25 percent larger. */ - df->use_size += (df->use_size / 4); - df->uses = xrealloc (df->uses, - df->use_size * sizeof (*df->uses)); - } - DF_REF_ID (this_ref) = df->use_id; - df->uses[df->use_id++] = this_ref; - } - return this_ref; -} - - -/* Create a new reference of type DF_REF_TYPE for a single register REG, - used inside the LOC rtx of INSN. */ -static void -df_ref_record_1 (struct df *df, rtx reg, rtx *loc, rtx insn, - enum df_ref_type ref_type, enum df_ref_flags ref_flags) -{ - df_ref_create (df, reg, loc, insn, ref_type, ref_flags); -} - - -/* Create new references of type DF_REF_TYPE for each part of register REG - at address LOC within INSN of BB. */ -static void -df_ref_record (struct df *df, rtx reg, rtx *loc, rtx insn, - enum df_ref_type ref_type, enum df_ref_flags ref_flags) -{ - unsigned int regno; - - if (GET_CODE (reg) != REG && GET_CODE (reg) != SUBREG) - abort (); - - /* For the reg allocator we are interested in some SUBREG rtx's, but not - all. Notably only those representing a word extraction from a multi-word - reg. As written in the docu those should have the form - (subreg:SI (reg:M A) N), with size(SImode) > size(Mmode). - XXX Is that true? We could also use the global word_mode variable. */ - if (GET_CODE (reg) == SUBREG - && (GET_MODE_SIZE (GET_MODE (reg)) < GET_MODE_SIZE (word_mode) - || GET_MODE_SIZE (GET_MODE (reg)) - >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (reg))))) - { - loc = &SUBREG_REG (reg); - reg = *loc; - ref_flags |= DF_REF_STRIPPED; - } - - regno = REGNO (GET_CODE (reg) == SUBREG ? SUBREG_REG (reg) : reg); - if (regno < FIRST_PSEUDO_REGISTER) - { - int i; - int endregno; - - if (! (df->flags & DF_HARD_REGS)) - return; - - /* GET_MODE (reg) is correct here. We do not want to go into a SUBREG - for the mode, because we only want to add references to regs, which - are really referenced. E.g., a (subreg:SI (reg:DI 0) 0) does _not_ - reference the whole reg 0 in DI mode (which would also include - reg 1, at least, if 0 and 1 are SImode registers). */ - endregno = HARD_REGNO_NREGS (regno, GET_MODE (reg)); - if (GET_CODE (reg) == SUBREG) - regno += subreg_regno_offset (regno, GET_MODE (SUBREG_REG (reg)), - SUBREG_BYTE (reg), GET_MODE (reg)); - endregno += regno; - - for (i = regno; i < endregno; i++) - df_ref_record_1 (df, regno_reg_rtx[i], - loc, insn, ref_type, ref_flags); - } - else - { - df_ref_record_1 (df, reg, loc, insn, ref_type, ref_flags); - } -} - - -/* Return nonzero if writes to paradoxical SUBREGs, or SUBREGs which - are too narrow, are read-modify-write. */ -bool -read_modify_subreg_p (rtx x) -{ - unsigned int isize, osize; - if (GET_CODE (x) != SUBREG) - return false; - isize = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))); - osize = GET_MODE_SIZE (GET_MODE (x)); - /* Paradoxical subreg writes don't leave a trace of the old content. */ - return (isize > osize && isize > UNITS_PER_WORD); -} - - -/* Process all the registers defined in the rtx, X. */ -static void -df_def_record_1 (struct df *df, rtx x, basic_block bb, rtx insn) -{ - rtx *loc; - rtx dst; - enum df_ref_flags flags = 0; - - /* We may recursively call ourselves on EXPR_LIST when dealing with PARALLEL - construct. */ - if (GET_CODE (x) == EXPR_LIST || GET_CODE (x) == CLOBBER) - loc = &XEXP (x, 0); - else - loc = &SET_DEST (x); - dst = *loc; - - /* Some targets place small structures in registers for - return values of functions. */ - if (GET_CODE (dst) == PARALLEL && GET_MODE (dst) == BLKmode) - { - int i; - - for (i = XVECLEN (dst, 0) - 1; i >= 0; i--) - { - rtx temp = XVECEXP (dst, 0, i); - if (GET_CODE (temp) == EXPR_LIST || GET_CODE (temp) == CLOBBER - || GET_CODE (temp) == SET) - df_def_record_1 (df, temp, bb, insn); - } - return; - } - - /* Maybe, we should flag the use of STRICT_LOW_PART somehow. It might - be handy for the reg allocator. */ - while (GET_CODE (dst) == STRICT_LOW_PART - || GET_CODE (dst) == ZERO_EXTRACT - || GET_CODE (dst) == SIGN_EXTRACT - || ((df->flags & DF_FOR_REGALLOC) == 0 - && read_modify_subreg_p (dst))) - { - /* Strict low part always contains SUBREG, but we do not want to make - it appear outside, as whole register is always considered. */ - if (GET_CODE (dst) == STRICT_LOW_PART) - { - loc = &XEXP (dst, 0); - dst = *loc; - } - loc = &XEXP (dst, 0); - dst = *loc; - flags |= DF_REF_READ_WRITE; - } - - if (GET_CODE (dst) == REG - || (GET_CODE (dst) == SUBREG && GET_CODE (SUBREG_REG (dst)) == REG)) - df_ref_record (df, dst, loc, insn, DF_REF_REG_DEF, flags); -} - - -/* Process all the registers defined in the pattern rtx, X. */ -static void -df_defs_record (struct df *df, rtx x, basic_block bb, rtx insn) -{ - RTX_CODE code = GET_CODE (x); - - if (code == SET || code == CLOBBER) - { - /* Mark the single def within the pattern. */ - df_def_record_1 (df, x, bb, insn); - } - else if (code == PARALLEL) - { - int i; - - /* Mark the multiple defs within the pattern. */ - for (i = XVECLEN (x, 0) - 1; i >= 0; i--) - { - code = GET_CODE (XVECEXP (x, 0, i)); - if (code == SET || code == CLOBBER) - df_def_record_1 (df, XVECEXP (x, 0, i), bb, insn); - } - } -} - - -/* Process all the registers used in the rtx at address LOC. */ -static void -df_uses_record (struct df *df, rtx *loc, enum df_ref_type ref_type, - basic_block bb, rtx insn, enum df_ref_flags flags) -{ - RTX_CODE code; - rtx x; - retry: - x = *loc; - if (!x) - return; - code = GET_CODE (x); - switch (code) - { - case LABEL_REF: - case SYMBOL_REF: - case CONST_INT: - case CONST: - case CONST_DOUBLE: - case CONST_VECTOR: - case PC: - case CC0: - case ADDR_VEC: - case ADDR_DIFF_VEC: - return; - - case CLOBBER: - /* If we are clobbering a MEM, mark any registers inside the address - as being used. */ - if (GET_CODE (XEXP (x, 0)) == MEM) - df_uses_record (df, &XEXP (XEXP (x, 0), 0), - DF_REF_REG_MEM_STORE, bb, insn, flags); - - /* If we're clobbering a REG then we have a def so ignore. */ - return; - - case MEM: - df_uses_record (df, &XEXP (x, 0), DF_REF_REG_MEM_LOAD, bb, insn, 0); - return; - - case SUBREG: - /* While we're here, optimize this case. */ - - /* In case the SUBREG is not of a REG, do not optimize. */ - if (GET_CODE (SUBREG_REG (x)) != REG) - { - loc = &SUBREG_REG (x); - df_uses_record (df, loc, ref_type, bb, insn, flags); - return; - } - /* ... Fall through ... */ - - case REG: - df_ref_record (df, x, loc, insn, ref_type, flags); - return; - - case SET: - { - rtx dst = SET_DEST (x); - - df_uses_record (df, &SET_SRC (x), DF_REF_REG_USE, bb, insn, 0); - - switch (GET_CODE (dst)) - { - case SUBREG: - if ((df->flags & DF_FOR_REGALLOC) == 0 - && read_modify_subreg_p (dst)) - { - df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb, - insn, DF_REF_READ_WRITE); - break; - } - /* Fall through. */ - case REG: - case PARALLEL: - case PC: - case CC0: - break; - case MEM: - df_uses_record (df, &XEXP (dst, 0), - DF_REF_REG_MEM_STORE, - bb, insn, 0); - break; - case STRICT_LOW_PART: - /* A strict_low_part uses the whole REG and not just the SUBREG. */ - dst = XEXP (dst, 0); - if (GET_CODE (dst) != SUBREG) - abort (); - df_uses_record (df, &SUBREG_REG (dst), DF_REF_REG_USE, bb, - insn, DF_REF_READ_WRITE); - break; - case ZERO_EXTRACT: - case SIGN_EXTRACT: - df_uses_record (df, &XEXP (dst, 0), DF_REF_REG_USE, bb, insn, - DF_REF_READ_WRITE); - df_uses_record (df, &XEXP (dst, 1), DF_REF_REG_USE, bb, insn, 0); - df_uses_record (df, &XEXP (dst, 2), DF_REF_REG_USE, bb, insn, 0); - dst = XEXP (dst, 0); - break; - default: - abort (); - } - return; - } - - case RETURN: - break; - - case ASM_OPERANDS: - case UNSPEC_VOLATILE: - case TRAP_IF: - case ASM_INPUT: - { - /* Traditional and volatile asm instructions must be considered to use - and clobber all hard registers, all pseudo-registers and all of - memory. So must TRAP_IF and UNSPEC_VOLATILE operations. - - Consider for instance a volatile asm that changes the fpu rounding - mode. An insn should not be moved across this even if it only uses - pseudo-regs because it might give an incorrectly rounded result. - - For now, just mark any regs we can find in ASM_OPERANDS as - used. */ - - /* For all ASM_OPERANDS, we must traverse the vector of input operands. - We can not just fall through here since then we would be confused - by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate - traditional asms unlike their normal usage. */ - if (code == ASM_OPERANDS) - { - int j; - - for (j = 0; j < ASM_OPERANDS_INPUT_LENGTH (x); j++) - df_uses_record (df, &ASM_OPERANDS_INPUT (x, j), - DF_REF_REG_USE, bb, insn, 0); - return; - } - break; - } - - case PRE_DEC: - case POST_DEC: - case PRE_INC: - case POST_INC: - case PRE_MODIFY: - case POST_MODIFY: - /* Catch the def of the register being modified. */ - df_ref_record (df, XEXP (x, 0), &XEXP (x, 0), insn, DF_REF_REG_DEF, DF_REF_READ_WRITE); - - /* ... Fall through to handle uses ... */ - - default: - break; - } - - /* Recursively scan the operands of this expression. */ - { - const char *fmt = GET_RTX_FORMAT (code); - int i; - - for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) - { - if (fmt[i] == 'e') - { - /* Tail recursive case: save a function call level. */ - if (i == 0) - { - loc = &XEXP (x, 0); - goto retry; - } - df_uses_record (df, &XEXP (x, i), ref_type, bb, insn, flags); - } - else if (fmt[i] == 'E') - { - int j; - for (j = 0; j < XVECLEN (x, i); j++) - df_uses_record (df, &XVECEXP (x, i, j), ref_type, - bb, insn, flags); - } - } - } -} - - -/* Record all the df within INSN of basic block BB. */ -static void -df_insn_refs_record (struct df *df, basic_block bb, rtx insn) -{ - int i; - - if (INSN_P (insn)) - { - rtx note; - - /* Record register defs. */ - df_defs_record (df, PATTERN (insn), bb, insn); - - if (df->flags & DF_EQUIV_NOTES) - for (note = REG_NOTES (insn); note; - note = XEXP (note, 1)) - { - switch (REG_NOTE_KIND (note)) - { - case REG_EQUIV: - case REG_EQUAL: - df_uses_record (df, &XEXP (note, 0), DF_REF_REG_USE, - bb, insn, 0); - default: - break; - } - } - - if (GET_CODE (insn) == CALL_INSN) - { - rtx note; - rtx x; - - /* Record the registers used to pass arguments. */ - for (note = CALL_INSN_FUNCTION_USAGE (insn); note; - note = XEXP (note, 1)) - { - if (GET_CODE (XEXP (note, 0)) == USE) - df_uses_record (df, &XEXP (XEXP (note, 0), 0), DF_REF_REG_USE, - bb, insn, 0); - } - - /* The stack ptr is used (honorarily) by a CALL insn. */ - x = df_reg_use_gen (STACK_POINTER_REGNUM); - df_uses_record (df, &XEXP (x, 0), DF_REF_REG_USE, bb, insn, 0); - - if (df->flags & DF_HARD_REGS) - { - /* Calls may also reference any of the global registers, - so they are recorded as used. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (global_regs[i]) - { - x = df_reg_use_gen (i); - df_uses_record (df, &SET_DEST (x), - DF_REF_REG_USE, bb, insn, 0); - } - } - } - - /* Record the register uses. */ - df_uses_record (df, &PATTERN (insn), - DF_REF_REG_USE, bb, insn, 0); - - if (GET_CODE (insn) == CALL_INSN) - { - rtx note; - - if (df->flags & DF_HARD_REGS) - { - /* Kill all registers invalidated by a call. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)) - { - rtx reg_clob = df_reg_clobber_gen (i); - df_defs_record (df, reg_clob, bb, insn); - } - } - - /* There may be extra registers to be clobbered. */ - for (note = CALL_INSN_FUNCTION_USAGE (insn); - note; - note = XEXP (note, 1)) - if (GET_CODE (XEXP (note, 0)) == CLOBBER) - df_defs_record (df, XEXP (note, 0), bb, insn); - } - } -} - - -/* Record all the refs within the basic block BB. */ -static void -df_bb_refs_record (struct df *df, basic_block bb) -{ - rtx insn; - - /* Scan the block an insn at a time from beginning to end. */ - for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn)) - { - if (INSN_P (insn)) - { - /* Record defs within INSN. */ - df_insn_refs_record (df, bb, insn); - } - if (insn == BB_END (bb)) - break; - } -} - - -/* Record all the refs in the basic blocks specified by BLOCKS. */ -static void -df_refs_record (struct df *df, bitmap blocks) -{ - basic_block bb; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_refs_record (df, bb); - }); -} - -/* Dataflow analysis routines. */ - - -/* Create reg-def chains for basic block BB. These are a list of - definitions for each register. */ -static void -df_bb_reg_def_chain_create (struct df *df, basic_block bb) -{ - rtx insn; - - /* Perhaps the defs should be sorted using a depth first search - of the CFG (or possibly a breadth first search). We currently - scan the basic blocks in reverse order so that the first defs - appear at the start of the chain. */ - - for (insn = BB_END (bb); insn && insn != PREV_INSN (BB_HEAD (bb)); - insn = PREV_INSN (insn)) - { - struct df_link *link; - unsigned int uid = INSN_UID (insn); - - if (! INSN_P (insn)) - continue; - - for (link = df->insns[uid].defs; link; link = link->next) - { - struct ref *def = link->ref; - unsigned int dregno = DF_REF_REGNO (def); - - /* Do not add ref's to the chain twice, i.e., only add new - refs. XXX the same could be done by testing if the - current insn is a modified (or a new) one. This would be - faster. */ - if (DF_REF_ID (def) < df->def_id_save) - continue; - - df->regs[dregno].defs - = df_link_create (def, df->regs[dregno].defs); - } - } -} - - -/* Create reg-def chains for each basic block within BLOCKS. These - are a list of definitions for each register. */ -static void -df_reg_def_chain_create (struct df *df, bitmap blocks) -{ - basic_block bb; - - FOR_EACH_BB_IN_BITMAP/*_REV*/ (blocks, 0, bb, - { - df_bb_reg_def_chain_create (df, bb); - }); -} - - -/* Create reg-use chains for basic block BB. These are a list of uses - for each register. */ -static void -df_bb_reg_use_chain_create (struct df *df, basic_block bb) -{ - rtx insn; - - /* Scan in forward order so that the last uses appear at the start - of the chain. */ - - for (insn = BB_HEAD (bb); insn && insn != NEXT_INSN (BB_END (bb)); - insn = NEXT_INSN (insn)) - { - struct df_link *link; - unsigned int uid = INSN_UID (insn); - - if (! INSN_P (insn)) - continue; - - for (link = df->insns[uid].uses; link; link = link->next) - { - struct ref *use = link->ref; - unsigned int uregno = DF_REF_REGNO (use); - - /* Do not add ref's to the chain twice, i.e., only add new - refs. XXX the same could be done by testing if the - current insn is a modified (or a new) one. This would be - faster. */ - if (DF_REF_ID (use) < df->use_id_save) - continue; - - df->regs[uregno].uses - = df_link_create (use, df->regs[uregno].uses); - } - } -} - - -/* Create reg-use chains for each basic block within BLOCKS. These - are a list of uses for each register. */ -static void -df_reg_use_chain_create (struct df *df, bitmap blocks) -{ - basic_block bb; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_reg_use_chain_create (df, bb); - }); -} - - -/* Create def-use chains from reaching use bitmaps for basic block BB. */ -static void -df_bb_du_chain_create (struct df *df, basic_block bb, bitmap ru) -{ - struct bb_info *bb_info = DF_BB_INFO (df, bb); - rtx insn; - - bitmap_copy (ru, bb_info->ru_out); - - /* For each def in BB create a linked list (chain) of uses - reached from the def. */ - for (insn = BB_END (bb); insn && insn != PREV_INSN (BB_HEAD (bb)); - insn = PREV_INSN (insn)) - { - struct df_link *def_link; - struct df_link *use_link; - unsigned int uid = INSN_UID (insn); - - if (! INSN_P (insn)) - continue; - - /* For each def in insn... */ - for (def_link = df->insns[uid].defs; def_link; def_link = def_link->next) - { - struct ref *def = def_link->ref; - unsigned int dregno = DF_REF_REGNO (def); - - DF_REF_CHAIN (def) = 0; - - /* While the reg-use chains are not essential, it - is _much_ faster to search these short lists rather - than all the reaching uses, especially for large functions. */ - for (use_link = df->regs[dregno].uses; use_link; - use_link = use_link->next) - { - struct ref *use = use_link->ref; - - if (bitmap_bit_p (ru, DF_REF_ID (use))) - { - DF_REF_CHAIN (def) - = df_link_create (use, DF_REF_CHAIN (def)); - - bitmap_clear_bit (ru, DF_REF_ID (use)); - } - } - } - - /* For each use in insn... */ - for (use_link = df->insns[uid].uses; use_link; use_link = use_link->next) - { - struct ref *use = use_link->ref; - bitmap_set_bit (ru, DF_REF_ID (use)); - } - } -} - - -/* Create def-use chains from reaching use bitmaps for basic blocks - in BLOCKS. */ -static void -df_du_chain_create (struct df *df, bitmap blocks) -{ - bitmap ru; - basic_block bb; - - ru = BITMAP_XMALLOC (); - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_du_chain_create (df, bb, ru); - }); - - BITMAP_XFREE (ru); -} - - -/* Create use-def chains from reaching def bitmaps for basic block BB. */ -static void -df_bb_ud_chain_create (struct df *df, basic_block bb) -{ - struct bb_info *bb_info = DF_BB_INFO (df, bb); - struct ref **reg_def_last = df->reg_def_last; - rtx insn; - - memset (reg_def_last, 0, df->n_regs * sizeof (struct ref *)); - - /* For each use in BB create a linked list (chain) of defs - that reach the use. */ - for (insn = BB_HEAD (bb); insn && insn != NEXT_INSN (BB_END (bb)); - insn = NEXT_INSN (insn)) - { - unsigned int uid = INSN_UID (insn); - struct df_link *use_link; - struct df_link *def_link; - - if (! INSN_P (insn)) - continue; - - /* For each use in insn... */ - for (use_link = df->insns[uid].uses; use_link; use_link = use_link->next) - { - struct ref *use = use_link->ref; - unsigned int regno = DF_REF_REGNO (use); - - DF_REF_CHAIN (use) = 0; - - /* Has regno been defined in this BB yet? If so, use - the last def as the single entry for the use-def - chain for this use. Otherwise, we need to add all - the defs using this regno that reach the start of - this BB. */ - if (reg_def_last[regno]) - { - DF_REF_CHAIN (use) - = df_link_create (reg_def_last[regno], 0); - } - else - { - /* While the reg-def chains are not essential, it is - _much_ faster to search these short lists rather than - all the reaching defs, especially for large - functions. */ - for (def_link = df->regs[regno].defs; def_link; - def_link = def_link->next) - { - struct ref *def = def_link->ref; - - if (bitmap_bit_p (bb_info->rd_in, DF_REF_ID (def))) - { - DF_REF_CHAIN (use) - = df_link_create (def, DF_REF_CHAIN (use)); - } - } - } - } - - - /* For each def in insn... record the last def of each reg. */ - for (def_link = df->insns[uid].defs; def_link; def_link = def_link->next) - { - struct ref *def = def_link->ref; - int dregno = DF_REF_REGNO (def); - - reg_def_last[dregno] = def; - } - } -} - - -/* Create use-def chains from reaching def bitmaps for basic blocks - within BLOCKS. */ -static void -df_ud_chain_create (struct df *df, bitmap blocks) -{ - basic_block bb; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_ud_chain_create (df, bb); - }); -} - - - -static void -df_rd_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, bitmap in, - bitmap out, bitmap gen, bitmap kill, - void *data ATTRIBUTE_UNUSED) -{ - *changed = bitmap_union_of_diff (out, gen, in, kill); -} - - -static void -df_ru_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, bitmap in, - bitmap out, bitmap gen, bitmap kill, - void *data ATTRIBUTE_UNUSED) -{ - *changed = bitmap_union_of_diff (in, gen, out, kill); -} - - -static void -df_lr_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, bitmap in, - bitmap out, bitmap use, bitmap def, - void *data ATTRIBUTE_UNUSED) -{ - *changed = bitmap_union_of_diff (in, use, out, def); -} - - -/* Compute local reaching def info for basic block BB. */ -static void -df_bb_rd_local_compute (struct df *df, basic_block bb) -{ - struct bb_info *bb_info = DF_BB_INFO (df, bb); - rtx insn; - - for (insn = BB_HEAD (bb); insn && insn != NEXT_INSN (BB_END (bb)); - insn = NEXT_INSN (insn)) - { - unsigned int uid = INSN_UID (insn); - struct df_link *def_link; - - if (! INSN_P (insn)) - continue; - - for (def_link = df->insns[uid].defs; def_link; def_link = def_link->next) - { - struct ref *def = def_link->ref; - unsigned int regno = DF_REF_REGNO (def); - struct df_link *def2_link; - - for (def2_link = df->regs[regno].defs; def2_link; - def2_link = def2_link->next) - { - struct ref *def2 = def2_link->ref; - - /* Add all defs of this reg to the set of kills. This - is greedy since many of these defs will not actually - be killed by this BB but it keeps things a lot - simpler. */ - bitmap_set_bit (bb_info->rd_kill, DF_REF_ID (def2)); - - /* Zap from the set of gens for this BB. */ - bitmap_clear_bit (bb_info->rd_gen, DF_REF_ID (def2)); - } - - bitmap_set_bit (bb_info->rd_gen, DF_REF_ID (def)); - } - } - - bb_info->rd_valid = 1; -} - - -/* Compute local reaching def info for each basic block within BLOCKS. */ -static void -df_rd_local_compute (struct df *df, bitmap blocks) -{ - basic_block bb; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_rd_local_compute (df, bb); - }); -} - - -/* Compute local reaching use (upward exposed use) info for basic - block BB. */ -static void -df_bb_ru_local_compute (struct df *df, basic_block bb) -{ - /* This is much more tricky than computing reaching defs. With - reaching defs, defs get killed by other defs. With upwards - exposed uses, these get killed by defs with the same regno. */ - - struct bb_info *bb_info = DF_BB_INFO (df, bb); - rtx insn; - - - for (insn = BB_END (bb); insn && insn != PREV_INSN (BB_HEAD (bb)); - insn = PREV_INSN (insn)) - { - unsigned int uid = INSN_UID (insn); - struct df_link *def_link; - struct df_link *use_link; - - if (! INSN_P (insn)) - continue; - - for (def_link = df->insns[uid].defs; def_link; def_link = def_link->next) - { - struct ref *def = def_link->ref; - unsigned int dregno = DF_REF_REGNO (def); - - for (use_link = df->regs[dregno].uses; use_link; - use_link = use_link->next) - { - struct ref *use = use_link->ref; - - /* Add all uses of this reg to the set of kills. This - is greedy since many of these uses will not actually - be killed by this BB but it keeps things a lot - simpler. */ - bitmap_set_bit (bb_info->ru_kill, DF_REF_ID (use)); - - /* Zap from the set of gens for this BB. */ - bitmap_clear_bit (bb_info->ru_gen, DF_REF_ID (use)); - } - } - - for (use_link = df->insns[uid].uses; use_link; use_link = use_link->next) - { - struct ref *use = use_link->ref; - /* Add use to set of gens in this BB. */ - bitmap_set_bit (bb_info->ru_gen, DF_REF_ID (use)); - } - } - bb_info->ru_valid = 1; -} - - -/* Compute local reaching use (upward exposed use) info for each basic - block within BLOCKS. */ -static void -df_ru_local_compute (struct df *df, bitmap blocks) -{ - basic_block bb; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_ru_local_compute (df, bb); - }); -} - - -/* Compute local live variable info for basic block BB. */ -static void -df_bb_lr_local_compute (struct df *df, basic_block bb) -{ - struct bb_info *bb_info = DF_BB_INFO (df, bb); - rtx insn; - - for (insn = BB_END (bb); insn && insn != PREV_INSN (BB_HEAD (bb)); - insn = PREV_INSN (insn)) - { - unsigned int uid = INSN_UID (insn); - struct df_link *link; - - if (! INSN_P (insn)) - continue; - - for (link = df->insns[uid].defs; link; link = link->next) - { - struct ref *def = link->ref; - unsigned int dregno = DF_REF_REGNO (def); - - /* Add def to set of defs in this BB. */ - bitmap_set_bit (bb_info->lr_def, dregno); - - bitmap_clear_bit (bb_info->lr_use, dregno); - } - - for (link = df->insns[uid].uses; link; link = link->next) - { - struct ref *use = link->ref; - /* Add use to set of uses in this BB. */ - bitmap_set_bit (bb_info->lr_use, DF_REF_REGNO (use)); - } - } - bb_info->lr_valid = 1; -} - - -/* Compute local live variable info for each basic block within BLOCKS. */ -static void -df_lr_local_compute (struct df *df, bitmap blocks) -{ - basic_block bb; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_lr_local_compute (df, bb); - }); -} - - -/* Compute register info: lifetime, bb, and number of defs and uses - for basic block BB. */ -static void -df_bb_reg_info_compute (struct df *df, basic_block bb, bitmap live) -{ - struct reg_info *reg_info = df->regs; - struct bb_info *bb_info = DF_BB_INFO (df, bb); - rtx insn; - - bitmap_copy (live, bb_info->lr_out); - - for (insn = BB_END (bb); insn && insn != PREV_INSN (BB_HEAD (bb)); - insn = PREV_INSN (insn)) - { - unsigned int uid = INSN_UID (insn); - unsigned int regno; - struct df_link *link; - - if (! INSN_P (insn)) - continue; - - for (link = df->insns[uid].defs; link; link = link->next) - { - struct ref *def = link->ref; - unsigned int dregno = DF_REF_REGNO (def); - - /* Kill this register. */ - bitmap_clear_bit (live, dregno); - reg_info[dregno].n_defs++; - } - - for (link = df->insns[uid].uses; link; link = link->next) - { - struct ref *use = link->ref; - unsigned int uregno = DF_REF_REGNO (use); - - /* This register is now live. */ - bitmap_set_bit (live, uregno); - reg_info[uregno].n_uses++; - } - - /* Increment lifetimes of all live registers. */ - EXECUTE_IF_SET_IN_BITMAP (live, 0, regno, - { - reg_info[regno].lifetime++; - }); - } -} - - -/* Compute register info: lifetime, bb, and number of defs and uses. */ -static void -df_reg_info_compute (struct df *df, bitmap blocks) -{ - basic_block bb; - bitmap live; - - live = BITMAP_XMALLOC (); - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_reg_info_compute (df, bb, live); - }); - - BITMAP_XFREE (live); -} - - -/* Assign LUIDs for BB. */ -static int -df_bb_luids_set (struct df *df, basic_block bb) -{ - rtx insn; - int luid = 0; - - /* The LUIDs are monotonically increasing for each basic block. */ - - for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn)) - { - if (INSN_P (insn)) - DF_INSN_LUID (df, insn) = luid++; - DF_INSN_LUID (df, insn) = luid; - - if (insn == BB_END (bb)) - break; - } - return luid; -} - - -/* Assign LUIDs for each basic block within BLOCKS. */ -static int -df_luids_set (struct df *df, bitmap blocks) -{ - basic_block bb; - int total = 0; - - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - total += df_bb_luids_set (df, bb); - }); - return total; -} - - -/* Perform dataflow analysis using existing DF structure for blocks - within BLOCKS. If BLOCKS is zero, use all basic blocks in the CFG. */ -static void -df_analyse_1 (struct df *df, bitmap blocks, int flags, int update) -{ - int aflags; - int dflags; - int i; - basic_block bb; - - dflags = 0; - aflags = flags; - if (flags & DF_UD_CHAIN) - aflags |= DF_RD | DF_RD_CHAIN; - - if (flags & DF_DU_CHAIN) - aflags |= DF_RU; - - if (flags & DF_RU) - aflags |= DF_RU_CHAIN; - - if (flags & DF_REG_INFO) - aflags |= DF_LR; - - if (! blocks) - blocks = df->all_blocks; - - df->flags = flags; - if (update) - { - df_refs_update (df); - /* More fine grained incremental dataflow analysis would be - nice. For now recompute the whole shebang for the - modified blocks. */ -#if 0 - df_refs_unlink (df, blocks); -#endif - /* All the def-use, use-def chains can be potentially - modified by changes in one block. The size of the - bitmaps can also change. */ - } - else - { - /* Scan the function for all register defs and uses. */ - df_refs_queue (df); - df_refs_record (df, blocks); - - /* Link all the new defs and uses to the insns. */ - df_refs_process (df); - } - - /* Allocate the bitmaps now the total number of defs and uses are - known. If the number of defs or uses have changed, then - these bitmaps need to be reallocated. */ - df_bitmaps_alloc (df, aflags); - - /* Set the LUIDs for each specified basic block. */ - df_luids_set (df, blocks); - - /* Recreate reg-def and reg-use chains from scratch so that first - def is at the head of the reg-def chain and the last use is at - the head of the reg-use chain. This is only important for - regs local to a basic block as it speeds up searching. */ - if (aflags & DF_RD_CHAIN) - { - df_reg_def_chain_create (df, blocks); - } - - if (aflags & DF_RU_CHAIN) - { - df_reg_use_chain_create (df, blocks); - } - - df->dfs_order = xmalloc (sizeof (int) * n_basic_blocks); - df->rc_order = xmalloc (sizeof (int) * n_basic_blocks); - df->rts_order = xmalloc (sizeof (int) * n_basic_blocks); - df->inverse_dfs_map = xmalloc (sizeof (int) * last_basic_block); - df->inverse_rc_map = xmalloc (sizeof (int) * last_basic_block); - df->inverse_rts_map = xmalloc (sizeof (int) * last_basic_block); - - flow_depth_first_order_compute (df->dfs_order, df->rc_order); - flow_reverse_top_sort_order_compute (df->rts_order); - for (i = 0; i < n_basic_blocks; i++) - { - df->inverse_dfs_map[df->dfs_order[i]] = i; - df->inverse_rc_map[df->rc_order[i]] = i; - df->inverse_rts_map[df->rts_order[i]] = i; - } - if (aflags & DF_RD) - { - /* Compute the sets of gens and kills for the defs of each bb. */ - df_rd_local_compute (df, df->flags & DF_RD ? blocks : df->all_blocks); - { - bitmap *in = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *out = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *gen = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *kill = xmalloc (sizeof (bitmap) * last_basic_block); - FOR_EACH_BB (bb) - { - in[bb->index] = DF_BB_INFO (df, bb)->rd_in; - out[bb->index] = DF_BB_INFO (df, bb)->rd_out; - gen[bb->index] = DF_BB_INFO (df, bb)->rd_gen; - kill[bb->index] = DF_BB_INFO (df, bb)->rd_kill; - } - iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, - DF_FORWARD, DF_UNION, df_rd_transfer_function, - df->inverse_rc_map, NULL); - free (in); - free (out); - free (gen); - free (kill); - } - } - - if (aflags & DF_UD_CHAIN) - { - /* Create use-def chains. */ - df_ud_chain_create (df, df->all_blocks); - - if (! (flags & DF_RD)) - dflags |= DF_RD; - } - - if (aflags & DF_RU) - { - /* Compute the sets of gens and kills for the upwards exposed - uses in each bb. */ - df_ru_local_compute (df, df->flags & DF_RU ? blocks : df->all_blocks); - { - bitmap *in = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *out = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *gen = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *kill = xmalloc (sizeof (bitmap) * last_basic_block); - FOR_EACH_BB (bb) - { - in[bb->index] = DF_BB_INFO (df, bb)->ru_in; - out[bb->index] = DF_BB_INFO (df, bb)->ru_out; - gen[bb->index] = DF_BB_INFO (df, bb)->ru_gen; - kill[bb->index] = DF_BB_INFO (df, bb)->ru_kill; - } - iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, - DF_BACKWARD, DF_UNION, df_ru_transfer_function, - df->inverse_rts_map, NULL); - free (in); - free (out); - free (gen); - free (kill); - } - } - - if (aflags & DF_DU_CHAIN) - { - /* Create def-use chains. */ - df_du_chain_create (df, df->all_blocks); - - if (! (flags & DF_RU)) - dflags |= DF_RU; - } - - /* Free up bitmaps that are no longer required. */ - if (dflags) - df_bitmaps_free (df, dflags); - - if (aflags & DF_LR) - { - /* Compute the sets of defs and uses of live variables. */ - df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks); - { - bitmap *in = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *out = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *use = xmalloc (sizeof (bitmap) * last_basic_block); - bitmap *def = xmalloc (sizeof (bitmap) * last_basic_block); - FOR_EACH_BB (bb) - { - in[bb->index] = DF_BB_INFO (df, bb)->lr_in; - out[bb->index] = DF_BB_INFO (df, bb)->lr_out; - use[bb->index] = DF_BB_INFO (df, bb)->lr_use; - def[bb->index] = DF_BB_INFO (df, bb)->lr_def; - } - iterative_dataflow_bitmap (in, out, use, def, df->all_blocks, - DF_BACKWARD, DF_UNION, df_lr_transfer_function, - df->inverse_rts_map, NULL); - free (in); - free (out); - free (use); - free (def); - } - } - - if (aflags & DF_REG_INFO) - { - df_reg_info_compute (df, df->all_blocks); - } - - free (df->dfs_order); - free (df->rc_order); - free (df->rts_order); - free (df->inverse_rc_map); - free (df->inverse_dfs_map); - free (df->inverse_rts_map); -} - - -/* Initialize dataflow analysis. */ -struct df * -df_init (void) -{ - struct df *df; - - df = xcalloc (1, sizeof (struct df)); - - /* Squirrel away a global for debugging. */ - ddf = df; - - return df; -} - - -/* Start queuing refs. */ -static int -df_refs_queue (struct df *df) -{ - df->def_id_save = df->def_id; - df->use_id_save = df->use_id; - /* ???? Perhaps we should save current obstack state so that we can - unwind it. */ - return 0; -} - - -/* Process queued refs. */ -static int -df_refs_process (struct df *df) -{ - unsigned int i; - - /* Build new insn-def chains. */ - for (i = df->def_id_save; i != df->def_id; i++) - { - struct ref *def = df->defs[i]; - unsigned int uid = DF_REF_INSN_UID (def); - - /* Add def to head of def list for INSN. */ - df->insns[uid].defs - = df_link_create (def, df->insns[uid].defs); - } - - /* Build new insn-use chains. */ - for (i = df->use_id_save; i != df->use_id; i++) - { - struct ref *use = df->uses[i]; - unsigned int uid = DF_REF_INSN_UID (use); - - /* Add use to head of use list for INSN. */ - df->insns[uid].uses - = df_link_create (use, df->insns[uid].uses); - } - return 0; -} - - -/* Update refs for basic block BB. */ -static int -df_bb_refs_update (struct df *df, basic_block bb) -{ - rtx insn; - int count = 0; - - /* While we have to scan the chain of insns for this BB, we do not - need to allocate and queue a long chain of BB/INSN pairs. Using - a bitmap for insns_modified saves memory and avoids queuing - duplicates. */ - - for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn)) - { - unsigned int uid; - - uid = INSN_UID (insn); - - if (bitmap_bit_p (df->insns_modified, uid)) - { - /* Delete any allocated refs of this insn. MPH, FIXME. */ - df_insn_refs_unlink (df, bb, insn); - - /* Scan the insn for refs. */ - df_insn_refs_record (df, bb, insn); - - count++; - } - if (insn == BB_END (bb)) - break; - } - return count; -} - - -/* Process all the modified/deleted insns that were queued. */ -static int -df_refs_update (struct df *df) -{ - basic_block bb; - int count = 0; - - if ((unsigned int) max_reg_num () >= df->reg_size) - df_reg_table_realloc (df, 0); - - df_refs_queue (df); - - FOR_EACH_BB_IN_BITMAP (df->bbs_modified, 0, bb, - { - count += df_bb_refs_update (df, bb); - }); - - df_refs_process (df); - return count; -} - - -/* Return nonzero if any of the requested blocks in the bitmap - BLOCKS have been modified. */ -static int -df_modified_p (struct df *df, bitmap blocks) -{ - int update = 0; - basic_block bb; - - if (!df->n_bbs) - return 0; - - FOR_EACH_BB (bb) - if (bitmap_bit_p (df->bbs_modified, bb->index) - && (! blocks || (blocks == (bitmap) -1) || bitmap_bit_p (blocks, bb->index))) - { - update = 1; - break; - } - - return update; -} - - -/* Analyze dataflow info for the basic blocks specified by the bitmap - BLOCKS, or for the whole CFG if BLOCKS is zero, or just for the - modified blocks if BLOCKS is -1. */ -int -df_analyse (struct df *df, bitmap blocks, int flags) -{ - int update; - - /* We could deal with additional basic blocks being created by - rescanning everything again. */ - if (df->n_bbs && df->n_bbs != (unsigned int) last_basic_block) - abort (); - - update = df_modified_p (df, blocks); - if (update || (flags != df->flags)) - { - if (! blocks) - { - if (df->n_bbs) - { - /* Recompute everything from scratch. */ - df_free (df); - } - /* Allocate and initialize data structures. */ - df_alloc (df, max_reg_num ()); - df_analyse_1 (df, 0, flags, 0); - update = 1; - } - else - { - if (blocks == (bitmap) -1) - blocks = df->bbs_modified; - - if (! df->n_bbs) - abort (); - - df_analyse_1 (df, blocks, flags, 1); - bitmap_zero (df->bbs_modified); - bitmap_zero (df->insns_modified); - } - } - return update; -} - - -/* Free all the dataflow info and the DF structure. */ -void -df_finish (struct df *df) -{ - df_free (df); - free (df); -} - - -/* Unlink INSN from its reference information. */ -static void -df_insn_refs_unlink (struct df *df, basic_block bb ATTRIBUTE_UNUSED, rtx insn) -{ - struct df_link *link; - unsigned int uid; - - uid = INSN_UID (insn); - - /* Unlink all refs defined by this insn. */ - for (link = df->insns[uid].defs; link; link = link->next) - df_def_unlink (df, link->ref); - - /* Unlink all refs used by this insn. */ - for (link = df->insns[uid].uses; link; link = link->next) - df_use_unlink (df, link->ref); - - df->insns[uid].defs = 0; - df->insns[uid].uses = 0; -} - - -#if 0 -/* Unlink all the insns within BB from their reference information. */ -static void -df_bb_refs_unlink (struct df *df, basic_block bb) -{ - rtx insn; - - /* Scan the block an insn at a time from beginning to end. */ - for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn)) - { - if (INSN_P (insn)) - { - /* Unlink refs for INSN. */ - df_insn_refs_unlink (df, bb, insn); - } - if (insn == BB_END (bb)) - break; - } -} - - -/* Unlink all the refs in the basic blocks specified by BLOCKS. - Not currently used. */ -static void -df_refs_unlink (struct df *df, bitmap blocks) -{ - basic_block bb; - - if (blocks) - { - FOR_EACH_BB_IN_BITMAP (blocks, 0, bb, - { - df_bb_refs_unlink (df, bb); - }); - } - else - { - FOR_EACH_BB (bb) - df_bb_refs_unlink (df, bb); - } -} -#endif - -/* Functions to modify insns. */ - - -/* Delete INSN and all its reference information. */ -rtx -df_insn_delete (struct df *df, basic_block bb ATTRIBUTE_UNUSED, rtx insn) -{ - /* If the insn is a jump, we should perhaps call delete_insn to - handle the JUMP_LABEL? */ - - /* We should not be deleting the NOTE_INSN_BASIC_BLOCK or label. */ - if (insn == BB_HEAD (bb)) - abort (); - - /* Delete the insn. */ - delete_insn (insn); - - df_insn_modify (df, bb, insn); - - return NEXT_INSN (insn); -} - - -/* Mark that INSN within BB may have changed (created/modified/deleted). - This may be called multiple times for the same insn. There is no - harm calling this function if the insn wasn't changed; it will just - slow down the rescanning of refs. */ -void -df_insn_modify (struct df *df, basic_block bb, rtx insn) -{ - unsigned int uid; - - uid = INSN_UID (insn); - if (uid >= df->insn_size) - df_insn_table_realloc (df, uid); - - bitmap_set_bit (df->bbs_modified, bb->index); - bitmap_set_bit (df->insns_modified, uid); - - /* For incremental updating on the fly, perhaps we could make a copy - of all the refs of the original insn and turn them into - anti-refs. When df_refs_update finds these anti-refs, it annihilates - the original refs. If validate_change fails then these anti-refs - will just get ignored. */ -} - - -typedef struct replace_args -{ - rtx match; - rtx replacement; - rtx insn; - int modified; -} replace_args; - - -/* Replace mem pointed to by PX with its associated pseudo register. - DATA is actually a pointer to a structure describing the - instruction currently being scanned and the MEM we are currently - replacing. */ -static int -df_rtx_mem_replace (rtx *px, void *data) -{ - replace_args *args = (replace_args *) data; - rtx mem = *px; - - if (mem == NULL_RTX) - return 0; - - switch (GET_CODE (mem)) - { - case MEM: - break; - - case CONST_DOUBLE: - /* We're not interested in the MEM associated with a - CONST_DOUBLE, so there's no need to traverse into one. */ - return -1; - - default: - /* This is not a MEM. */ - return 0; - } - - if (!rtx_equal_p (args->match, mem)) - /* This is not the MEM we are currently replacing. */ - return 0; - - /* Actually replace the MEM. */ - validate_change (args->insn, px, args->replacement, 1); - args->modified++; - - return 0; -} - - -int -df_insn_mem_replace (struct df *df, basic_block bb, rtx insn, rtx mem, rtx reg) -{ - replace_args args; - - args.insn = insn; - args.match = mem; - args.replacement = reg; - args.modified = 0; - - /* Search and replace all matching mems within insn. */ - for_each_rtx (&insn, df_rtx_mem_replace, &args); - - if (args.modified) - df_insn_modify (df, bb, insn); - - /* ???? FIXME. We may have a new def or one or more new uses of REG - in INSN. REG should be a new pseudo so it won't affect the - dataflow information that we currently have. We should add - the new uses and defs to INSN and then recreate the chains - when df_analyse is called. */ - return args.modified; -} - - -/* Replace one register with another. Called through for_each_rtx; PX - points to the rtx being scanned. DATA is actually a pointer to a - structure of arguments. */ -static int -df_rtx_reg_replace (rtx *px, void *data) -{ - rtx x = *px; - replace_args *args = (replace_args *) data; - - if (x == NULL_RTX) - return 0; - - if (x == args->match) - { - validate_change (args->insn, px, args->replacement, 1); - args->modified++; - } - - return 0; -} - - -/* Replace the reg within every ref on CHAIN that is within the set - BLOCKS of basic blocks with NEWREG. Also update the regs within - REG_NOTES. */ -void -df_refs_reg_replace (struct df *df, bitmap blocks, struct df_link *chain, rtx oldreg, rtx newreg) -{ - struct df_link *link; - replace_args args; - - if (! blocks) - blocks = df->all_blocks; - - args.match = oldreg; - args.replacement = newreg; - args.modified = 0; - - for (link = chain; link; link = link->next) - { - struct ref *ref = link->ref; - rtx insn = DF_REF_INSN (ref); - - if (! INSN_P (insn)) - continue; - - if (bitmap_bit_p (blocks, DF_REF_BBNO (ref))) - { - df_ref_reg_replace (df, ref, oldreg, newreg); - - /* Replace occurrences of the reg within the REG_NOTES. */ - if ((! link->next || DF_REF_INSN (ref) - != DF_REF_INSN (link->next->ref)) - && REG_NOTES (insn)) - { - args.insn = insn; - for_each_rtx (®_NOTES (insn), df_rtx_reg_replace, &args); - } - } - else - { - /* Temporary check to ensure that we have a grip on which - regs should be replaced. */ - abort (); - } - } -} - - -/* Replace all occurrences of register OLDREG with register NEWREG in - blocks defined by bitmap BLOCKS. This also replaces occurrences of - OLDREG in the REG_NOTES but only for insns containing OLDREG. This - routine expects the reg-use and reg-def chains to be valid. */ -int -df_reg_replace (struct df *df, bitmap blocks, rtx oldreg, rtx newreg) -{ - unsigned int oldregno = REGNO (oldreg); - - df_refs_reg_replace (df, blocks, df->regs[oldregno].defs, oldreg, newreg); - df_refs_reg_replace (df, blocks, df->regs[oldregno].uses, oldreg, newreg); - return 1; -} - - -/* Try replacing the reg within REF with NEWREG. Do not modify - def-use/use-def chains. */ -int -df_ref_reg_replace (struct df *df, struct ref *ref, rtx oldreg, rtx newreg) -{ - /* Check that insn was deleted by being converted into a NOTE. If - so ignore this insn. */ - if (! INSN_P (DF_REF_INSN (ref))) - return 0; - - if (oldreg && oldreg != DF_REF_REG (ref)) - abort (); - - if (! validate_change (DF_REF_INSN (ref), DF_REF_LOC (ref), newreg, 1)) - return 0; - - df_insn_modify (df, DF_REF_BB (ref), DF_REF_INSN (ref)); - return 1; -} - - -struct ref* -df_bb_def_use_swap (struct df *df, basic_block bb, rtx def_insn, rtx use_insn, unsigned int regno) -{ - struct ref *def; - struct ref *use; - int def_uid; - int use_uid; - struct df_link *link; - - def = df_bb_insn_regno_first_def_find (df, bb, def_insn, regno); - if (! def) - return 0; - - use = df_bb_insn_regno_last_use_find (df, bb, use_insn, regno); - if (! use) - return 0; - - /* The USE no longer exists. */ - use_uid = INSN_UID (use_insn); - df_use_unlink (df, use); - df_ref_unlink (&df->insns[use_uid].uses, use); - - /* The DEF requires shifting so remove it from DEF_INSN - and add it to USE_INSN by reusing LINK. */ - def_uid = INSN_UID (def_insn); - link = df_ref_unlink (&df->insns[def_uid].defs, def); - link->ref = def; - link->next = df->insns[use_uid].defs; - df->insns[use_uid].defs = link; - -#if 0 - link = df_ref_unlink (&df->regs[regno].defs, def); - link->ref = def; - link->next = df->regs[regno].defs; - df->insns[regno].defs = link; -#endif - - DF_REF_INSN (def) = use_insn; - return def; -} - - -/* Record df between FIRST_INSN and LAST_INSN inclusive. All new - insns must be processed by this routine. */ -static void -df_insns_modify (struct df *df, basic_block bb, rtx first_insn, rtx last_insn) -{ - rtx insn; - - for (insn = first_insn; ; insn = NEXT_INSN (insn)) - { - unsigned int uid; - - /* A non-const call should not have slipped through the net. If - it does, we need to create a new basic block. Ouch. The - same applies for a label. */ - if ((GET_CODE (insn) == CALL_INSN - && ! CONST_OR_PURE_CALL_P (insn)) - || GET_CODE (insn) == CODE_LABEL) - abort (); - - uid = INSN_UID (insn); - - if (uid >= df->insn_size) - df_insn_table_realloc (df, uid); - - df_insn_modify (df, bb, insn); - - if (insn == last_insn) - break; - } -} - - -/* Emit PATTERN before INSN within BB. */ -rtx -df_pattern_emit_before (struct df *df, rtx pattern, basic_block bb, rtx insn) -{ - rtx ret_insn; - rtx prev_insn = PREV_INSN (insn); - - /* We should not be inserting before the start of the block. */ - if (insn == BB_HEAD (bb)) - abort (); - ret_insn = emit_insn_before (pattern, insn); - if (ret_insn == insn) - return ret_insn; - - df_insns_modify (df, bb, NEXT_INSN (prev_insn), ret_insn); - return ret_insn; -} - - -/* Emit PATTERN after INSN within BB. */ -rtx -df_pattern_emit_after (struct df *df, rtx pattern, basic_block bb, rtx insn) -{ - rtx ret_insn; - - ret_insn = emit_insn_after (pattern, insn); - if (ret_insn == insn) - return ret_insn; - - df_insns_modify (df, bb, NEXT_INSN (insn), ret_insn); - return ret_insn; -} - - -/* Emit jump PATTERN after INSN within BB. */ -rtx -df_jump_pattern_emit_after (struct df *df, rtx pattern, basic_block bb, rtx insn) -{ - rtx ret_insn; - - ret_insn = emit_jump_insn_after (pattern, insn); - if (ret_insn == insn) - return ret_insn; - - df_insns_modify (df, bb, NEXT_INSN (insn), ret_insn); - return ret_insn; -} - - -/* Move INSN within BB before BEFORE_INSN within BEFORE_BB. - - This function should only be used to move loop invariant insns - out of a loop where it has been proven that the def-use info - will still be valid. */ -rtx -df_insn_move_before (struct df *df, basic_block bb, rtx insn, basic_block before_bb, rtx before_insn) -{ - struct df_link *link; - unsigned int uid; - - if (! bb) - return df_pattern_emit_before (df, insn, before_bb, before_insn); - - uid = INSN_UID (insn); - - /* Change bb for all df defined and used by this insn. */ - for (link = df->insns[uid].defs; link; link = link->next) - DF_REF_BB (link->ref) = before_bb; - for (link = df->insns[uid].uses; link; link = link->next) - DF_REF_BB (link->ref) = before_bb; - - /* The lifetimes of the registers used in this insn will be reduced - while the lifetimes of the registers defined in this insn - are likely to be increased. */ - - /* ???? Perhaps all the insns moved should be stored on a list - which df_analyse removes when it recalculates data flow. */ - - return emit_insn_before (insn, before_insn); -} - -/* Functions to query dataflow information. */ - - -int -df_insn_regno_def_p (struct df *df, basic_block bb ATTRIBUTE_UNUSED, - rtx insn, unsigned int regno) -{ - unsigned int uid; - struct df_link *link; - - uid = INSN_UID (insn); - - for (link = df->insns[uid].defs; link; link = link->next) - { - struct ref *def = link->ref; - - if (DF_REF_REGNO (def) == regno) - return 1; - } - - return 0; -} - - -static int -df_def_dominates_all_uses_p (struct df *df ATTRIBUTE_UNUSED, struct ref *def) -{ - struct df_link *du_link; - - /* Follow def-use chain to find all the uses of this def. */ - for (du_link = DF_REF_CHAIN (def); du_link; du_link = du_link->next) - { - struct ref *use = du_link->ref; - struct df_link *ud_link; - - /* Follow use-def chain to check all the defs for this use. */ - for (ud_link = DF_REF_CHAIN (use); ud_link; ud_link = ud_link->next) - if (ud_link->ref != def) - return 0; - } - return 1; -} - - -int -df_insn_dominates_all_uses_p (struct df *df, basic_block bb ATTRIBUTE_UNUSED, - rtx insn) -{ - unsigned int uid; - struct df_link *link; - - uid = INSN_UID (insn); - - for (link = df->insns[uid].defs; link; link = link->next) - { - struct ref *def = link->ref; - - if (! df_def_dominates_all_uses_p (df, def)) - return 0; - } - - return 1; -} - - -/* Return nonzero if all DF dominates all the uses within the bitmap - BLOCKS. */ -static int -df_def_dominates_uses_p (struct df *df ATTRIBUTE_UNUSED, struct ref *def, - bitmap blocks) -{ - struct df_link *du_link; - - /* Follow def-use chain to find all the uses of this def. */ - for (du_link = DF_REF_CHAIN (def); du_link; du_link = du_link->next) - { - struct ref *use = du_link->ref; - struct df_link *ud_link; - - /* Only worry about the uses within BLOCKS. For example, - consider a register defined within a loop that is live at the - loop exits. */ - if (bitmap_bit_p (blocks, DF_REF_BBNO (use))) - { - /* Follow use-def chain to check all the defs for this use. */ - for (ud_link = DF_REF_CHAIN (use); ud_link; ud_link = ud_link->next) - if (ud_link->ref != def) - return 0; - } - } - return 1; -} - - -/* Return nonzero if all the defs of INSN within BB dominates - all the corresponding uses. */ -int -df_insn_dominates_uses_p (struct df *df, basic_block bb ATTRIBUTE_UNUSED, - rtx insn, bitmap blocks) -{ - unsigned int uid; - struct df_link *link; - - uid = INSN_UID (insn); - - for (link = df->insns[uid].defs; link; link = link->next) - { - struct ref *def = link->ref; - - /* Only consider the defs within BLOCKS. */ - if (bitmap_bit_p (blocks, DF_REF_BBNO (def)) - && ! df_def_dominates_uses_p (df, def, blocks)) - return 0; - } - return 1; -} - - -/* Return the basic block that REG referenced in or NULL if referenced - in multiple basic blocks. */ -basic_block -df_regno_bb (struct df *df, unsigned int regno) -{ - struct df_link *defs = df->regs[regno].defs; - struct df_link *uses = df->regs[regno].uses; - struct ref *def = defs ? defs->ref : 0; - struct ref *use = uses ? uses->ref : 0; - basic_block bb_def = def ? DF_REF_BB (def) : 0; - basic_block bb_use = use ? DF_REF_BB (use) : 0; - - /* Compare blocks of first def and last use. ???? FIXME. What if - the reg-def and reg-use lists are not correctly ordered. */ - return bb_def == bb_use ? bb_def : 0; -} - - -/* Return nonzero if REG used in multiple basic blocks. */ -int -df_reg_global_p (struct df *df, rtx reg) -{ - return df_regno_bb (df, REGNO (reg)) != 0; -} - - -/* Return total lifetime (in insns) of REG. */ -int -df_reg_lifetime (struct df *df, rtx reg) -{ - return df->regs[REGNO (reg)].lifetime; -} - - -/* Return nonzero if REG live at start of BB. */ -int -df_bb_reg_live_start_p (struct df *df, basic_block bb, rtx reg) -{ - struct bb_info *bb_info = DF_BB_INFO (df, bb); - -#ifdef ENABLE_CHECKING - if (! bb_info->lr_in) - abort (); -#endif - - return bitmap_bit_p (bb_info->lr_in, REGNO (reg)); -} - - -/* Return nonzero if REG live at end of BB. */ -int -df_bb_reg_live_end_p (struct df *df, basic_block bb, rtx reg) -{ - struct bb_info *bb_info = DF_BB_INFO (df, bb); - -#ifdef ENABLE_CHECKING - if (! bb_info->lr_in) - abort (); -#endif - - return bitmap_bit_p (bb_info->lr_out, REGNO (reg)); -} - - -/* Return -1 if life of REG1 before life of REG2, 1 if life of REG1 - after life of REG2, or 0, if the lives overlap. */ -int -df_bb_regs_lives_compare (struct df *df, basic_block bb, rtx reg1, rtx reg2) -{ - unsigned int regno1 = REGNO (reg1); - unsigned int regno2 = REGNO (reg2); - struct ref *def1; - struct ref *use1; - struct ref *def2; - struct ref *use2; - - - /* The regs must be local to BB. */ - if (df_regno_bb (df, regno1) != bb - || df_regno_bb (df, regno2) != bb) - abort (); - - def2 = df_bb_regno_first_def_find (df, bb, regno2); - use1 = df_bb_regno_last_use_find (df, bb, regno1); - - if (DF_INSN_LUID (df, DF_REF_INSN (def2)) - > DF_INSN_LUID (df, DF_REF_INSN (use1))) - return -1; - - def1 = df_bb_regno_first_def_find (df, bb, regno1); - use2 = df_bb_regno_last_use_find (df, bb, regno2); - - if (DF_INSN_LUID (df, DF_REF_INSN (def1)) - > DF_INSN_LUID (df, DF_REF_INSN (use2))) - return 1; - - return 0; -} - - -/* Return last use of REGNO within BB. */ -static struct ref * -df_bb_regno_last_use_find (struct df *df, basic_block bb, unsigned int regno) -{ - struct df_link *link; - - /* This assumes that the reg-use list is ordered such that for any - BB, the last use is found first. However, since the BBs are not - ordered, the first use in the chain is not necessarily the last - use in the function. */ - for (link = df->regs[regno].uses; link; link = link->next) - { - struct ref *use = link->ref; - - if (DF_REF_BB (use) == bb) - return use; - } - return 0; -} - - -/* Return first def of REGNO within BB. */ -static struct ref * -df_bb_regno_first_def_find (struct df *df, basic_block bb, unsigned int regno) -{ - struct df_link *link; - - /* This assumes that the reg-def list is ordered such that for any - BB, the first def is found first. However, since the BBs are not - ordered, the first def in the chain is not necessarily the first - def in the function. */ - for (link = df->regs[regno].defs; link; link = link->next) - { - struct ref *def = link->ref; - - if (DF_REF_BB (def) == bb) - return def; - } - return 0; -} - - -/* Return first use of REGNO inside INSN within BB. */ -static struct ref * -df_bb_insn_regno_last_use_find (struct df *df, - basic_block bb ATTRIBUTE_UNUSED, rtx insn, - unsigned int regno) -{ - unsigned int uid; - struct df_link *link; - - uid = INSN_UID (insn); - - for (link = df->insns[uid].uses; link; link = link->next) - { - struct ref *use = link->ref; - - if (DF_REF_REGNO (use) == regno) - return use; - } - - return 0; -} - - -/* Return first def of REGNO inside INSN within BB. */ -static struct ref * -df_bb_insn_regno_first_def_find (struct df *df, - basic_block bb ATTRIBUTE_UNUSED, rtx insn, - unsigned int regno) -{ - unsigned int uid; - struct df_link *link; - - uid = INSN_UID (insn); - - for (link = df->insns[uid].defs; link; link = link->next) - { - struct ref *def = link->ref; - - if (DF_REF_REGNO (def) == regno) - return def; - } - - return 0; -} - - -/* Return insn using REG if the BB contains only a single - use and def of REG. */ -rtx -df_bb_single_def_use_insn_find (struct df *df, basic_block bb, rtx insn, rtx reg) -{ - struct ref *def; - struct ref *use; - struct df_link *du_link; - - def = df_bb_insn_regno_first_def_find (df, bb, insn, REGNO (reg)); - - if (! def) - abort (); - - du_link = DF_REF_CHAIN (def); - - if (! du_link) - return NULL_RTX; - - use = du_link->ref; - - /* Check if def is dead. */ - if (! use) - return NULL_RTX; - - /* Check for multiple uses. */ - if (du_link->next) - return NULL_RTX; - - return DF_REF_INSN (use); -} - -/* Functions for debugging/dumping dataflow information. */ - - -/* Dump a def-use or use-def chain for REF to FILE. */ -static void -df_chain_dump (struct df_link *link, FILE *file) -{ - fprintf (file, "{ "); - for (; link; link = link->next) - { - fprintf (file, "%c%d ", - DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', - DF_REF_ID (link->ref)); - } - fprintf (file, "}"); -} - - -/* Dump a chain of refs with the associated regno. */ -static void -df_chain_dump_regno (struct df_link *link, FILE *file) -{ - fprintf (file, "{ "); - for (; link; link = link->next) - { - fprintf (file, "%c%d(%d) ", - DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', - DF_REF_ID (link->ref), - DF_REF_REGNO (link->ref)); - } - fprintf (file, "}"); -} - - -/* Dump dataflow info. */ -void -df_dump (struct df *df, int flags, FILE *file) -{ - unsigned int j; - basic_block bb; - - if (! df || ! file) - return; - - fprintf (file, "\nDataflow summary:\n"); - fprintf (file, "n_regs = %d, n_defs = %d, n_uses = %d, n_bbs = %d\n", - df->n_regs, df->n_defs, df->n_uses, df->n_bbs); - - if (flags & DF_RD) - { - basic_block bb; - - fprintf (file, "Reaching defs:\n"); - FOR_EACH_BB (bb) - { - struct bb_info *bb_info = DF_BB_INFO (df, bb); - - if (! bb_info->rd_in) - continue; - - fprintf (file, "bb %d in \t", bb->index); - dump_bitmap (file, bb_info->rd_in); - fprintf (file, "bb %d gen \t", bb->index); - dump_bitmap (file, bb_info->rd_gen); - fprintf (file, "bb %d kill\t", bb->index); - dump_bitmap (file, bb_info->rd_kill); - fprintf (file, "bb %d out \t", bb->index); - dump_bitmap (file, bb_info->rd_out); - } - } - - if (flags & DF_UD_CHAIN) - { - fprintf (file, "Use-def chains:\n"); - for (j = 0; j < df->n_defs; j++) - { - if (df->defs[j]) - { - fprintf (file, "d%d bb %d luid %d insn %d reg %d ", - j, DF_REF_BBNO (df->defs[j]), - DF_INSN_LUID (df, DF_REF_INSN (df->defs[j])), - DF_REF_INSN_UID (df->defs[j]), - DF_REF_REGNO (df->defs[j])); - if (df->defs[j]->flags & DF_REF_READ_WRITE) - fprintf (file, "read/write "); - df_chain_dump (DF_REF_CHAIN (df->defs[j]), file); - fprintf (file, "\n"); - } - } - } - - if (flags & DF_RU) - { - fprintf (file, "Reaching uses:\n"); - FOR_EACH_BB (bb) - { - struct bb_info *bb_info = DF_BB_INFO (df, bb); - - if (! bb_info->ru_in) - continue; - - fprintf (file, "bb %d in \t", bb->index); - dump_bitmap (file, bb_info->ru_in); - fprintf (file, "bb %d gen \t", bb->index); - dump_bitmap (file, bb_info->ru_gen); - fprintf (file, "bb %d kill\t", bb->index); - dump_bitmap (file, bb_info->ru_kill); - fprintf (file, "bb %d out \t", bb->index); - dump_bitmap (file, bb_info->ru_out); - } - } - - if (flags & DF_DU_CHAIN) - { - fprintf (file, "Def-use chains:\n"); - for (j = 0; j < df->n_uses; j++) - { - if (df->uses[j]) - { - fprintf (file, "u%d bb %d luid %d insn %d reg %d ", - j, DF_REF_BBNO (df->uses[j]), - DF_INSN_LUID (df, DF_REF_INSN (df->uses[j])), - DF_REF_INSN_UID (df->uses[j]), - DF_REF_REGNO (df->uses[j])); - if (df->uses[j]->flags & DF_REF_READ_WRITE) - fprintf (file, "read/write "); - df_chain_dump (DF_REF_CHAIN (df->uses[j]), file); - fprintf (file, "\n"); - } - } - } - - if (flags & DF_LR) - { - fprintf (file, "Live regs:\n"); - FOR_EACH_BB (bb) - { - struct bb_info *bb_info = DF_BB_INFO (df, bb); - - if (! bb_info->lr_in) - continue; - - fprintf (file, "bb %d in \t", bb->index); - dump_bitmap (file, bb_info->lr_in); - fprintf (file, "bb %d use \t", bb->index); - dump_bitmap (file, bb_info->lr_use); - fprintf (file, "bb %d def \t", bb->index); - dump_bitmap (file, bb_info->lr_def); - fprintf (file, "bb %d out \t", bb->index); - dump_bitmap (file, bb_info->lr_out); - } - } - - if (flags & (DF_REG_INFO | DF_RD_CHAIN | DF_RU_CHAIN)) - { - struct reg_info *reg_info = df->regs; - - fprintf (file, "Register info:\n"); - for (j = 0; j < df->n_regs; j++) - { - if (((flags & DF_REG_INFO) - && (reg_info[j].n_uses || reg_info[j].n_defs)) - || ((flags & DF_RD_CHAIN) && reg_info[j].defs) - || ((flags & DF_RU_CHAIN) && reg_info[j].uses)) - { - fprintf (file, "reg %d", j); - if ((flags & DF_RD_CHAIN) && (flags & DF_RU_CHAIN)) - { - basic_block bb = df_regno_bb (df, j); - - if (bb) - fprintf (file, " bb %d", bb->index); - else - fprintf (file, " bb ?"); - } - if (flags & DF_REG_INFO) - { - fprintf (file, " life %d", reg_info[j].lifetime); - } - - if ((flags & DF_REG_INFO) || (flags & DF_RD_CHAIN)) - { - fprintf (file, " defs "); - if (flags & DF_REG_INFO) - fprintf (file, "%d ", reg_info[j].n_defs); - if (flags & DF_RD_CHAIN) - df_chain_dump (reg_info[j].defs, file); - } - - if ((flags & DF_REG_INFO) || (flags & DF_RU_CHAIN)) - { - fprintf (file, " uses "); - if (flags & DF_REG_INFO) - fprintf (file, "%d ", reg_info[j].n_uses); - if (flags & DF_RU_CHAIN) - df_chain_dump (reg_info[j].uses, file); - } - - fprintf (file, "\n"); - } - } - } - fprintf (file, "\n"); -} - - -void -df_insn_debug (struct df *df, rtx insn, FILE *file) -{ - unsigned int uid; - int bbi; - - uid = INSN_UID (insn); - if (uid >= df->insn_size) - return; - - if (df->insns[uid].defs) - bbi = DF_REF_BBNO (df->insns[uid].defs->ref); - else if (df->insns[uid].uses) - bbi = DF_REF_BBNO (df->insns[uid].uses->ref); - else - bbi = -1; - - fprintf (file, "insn %d bb %d luid %d defs ", - uid, bbi, DF_INSN_LUID (df, insn)); - df_chain_dump (df->insns[uid].defs, file); - fprintf (file, " uses "); - df_chain_dump (df->insns[uid].uses, file); - fprintf (file, "\n"); -} - - -void -df_insn_debug_regno (struct df *df, rtx insn, FILE *file) -{ - unsigned int uid; - int bbi; - - uid = INSN_UID (insn); - if (uid >= df->insn_size) - return; - - if (df->insns[uid].defs) - bbi = DF_REF_BBNO (df->insns[uid].defs->ref); - else if (df->insns[uid].uses) - bbi = DF_REF_BBNO (df->insns[uid].uses->ref); - else - bbi = -1; - - fprintf (file, "insn %d bb %d luid %d defs ", - uid, bbi, DF_INSN_LUID (df, insn)); - df_chain_dump_regno (df->insns[uid].defs, file); - fprintf (file, " uses "); - df_chain_dump_regno (df->insns[uid].uses, file); - fprintf (file, "\n"); -} - - -static void -df_regno_debug (struct df *df, unsigned int regno, FILE *file) -{ - if (regno >= df->reg_size) - return; - - fprintf (file, "reg %d life %d defs ", - regno, df->regs[regno].lifetime); - df_chain_dump (df->regs[regno].defs, file); - fprintf (file, " uses "); - df_chain_dump (df->regs[regno].uses, file); - fprintf (file, "\n"); -} - - -static void -df_ref_debug (struct df *df, struct ref *ref, FILE *file) -{ - fprintf (file, "%c%d ", - DF_REF_REG_DEF_P (ref) ? 'd' : 'u', - DF_REF_ID (ref)); - fprintf (file, "reg %d bb %d luid %d insn %d chain ", - DF_REF_REGNO (ref), - DF_REF_BBNO (ref), - DF_INSN_LUID (df, DF_REF_INSN (ref)), - INSN_UID (DF_REF_INSN (ref))); - df_chain_dump (DF_REF_CHAIN (ref), file); - fprintf (file, "\n"); -} - -/* Functions for debugging from GDB. */ - -void -debug_df_insn (rtx insn) -{ - df_insn_debug (ddf, insn, stderr); - debug_rtx (insn); -} - - -void -debug_df_reg (rtx reg) -{ - df_regno_debug (ddf, REGNO (reg), stderr); -} - - -void -debug_df_regno (unsigned int regno) -{ - df_regno_debug (ddf, regno, stderr); -} - - -void -debug_df_ref (struct ref *ref) -{ - df_ref_debug (ddf, ref, stderr); -} - - -void -debug_df_defno (unsigned int defno) -{ - df_ref_debug (ddf, ddf->defs[defno], stderr); -} - - -void -debug_df_useno (unsigned int defno) -{ - df_ref_debug (ddf, ddf->uses[defno], stderr); -} - - -void -debug_df_chain (struct df_link *link) -{ - df_chain_dump (link, stderr); - fputc ('\n', stderr); -} - - -/* Hybrid search algorithm from "Implementation Techniques for - Efficient Data-Flow Analysis of Large Programs". */ -static void -hybrid_search_bitmap (basic_block block, bitmap *in, bitmap *out, bitmap *gen, - bitmap *kill, enum df_flow_dir dir, - enum df_confluence_op conf_op, - transfer_function_bitmap transfun, sbitmap visited, - sbitmap pending, void *data) -{ - int changed; - int i = block->index; - edge e; - basic_block bb = block; - - SET_BIT (visited, block->index); - if (TEST_BIT (pending, block->index)) - { - if (dir == DF_FORWARD) - { - /* Calculate of predecessor_outs. */ - bitmap_zero (in[i]); - for (e = bb->pred; e != 0; e = e->pred_next) - { - if (e->src == ENTRY_BLOCK_PTR) - continue; - switch (conf_op) - { - case DF_UNION: - bitmap_a_or_b (in[i], in[i], out[e->src->index]); - break; - case DF_INTERSECTION: - bitmap_a_and_b (in[i], in[i], out[e->src->index]); - break; - } - } - } - else - { - /* Calculate of successor ins. */ - bitmap_zero (out[i]); - for (e = bb->succ; e != 0; e = e->succ_next) - { - if (e->dest == EXIT_BLOCK_PTR) - continue; - switch (conf_op) - { - case DF_UNION: - bitmap_a_or_b (out[i], out[i], in[e->dest->index]); - break; - case DF_INTERSECTION: - bitmap_a_and_b (out[i], out[i], in[e->dest->index]); - break; - } - } - } - /* Common part */ - (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); - RESET_BIT (pending, i); - if (changed) - { - if (dir == DF_FORWARD) - { - for (e = bb->succ; e != 0; e = e->succ_next) - { - if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) - continue; - SET_BIT (pending, e->dest->index); - } - } - else - { - for (e = bb->pred; e != 0; e = e->pred_next) - { - if (e->src == ENTRY_BLOCK_PTR || e->dest->index == i) - continue; - SET_BIT (pending, e->src->index); - } - } - } - } - if (dir == DF_FORWARD) - { - for (e = bb->succ; e != 0; e = e->succ_next) - { - if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) - continue; - if (!TEST_BIT (visited, e->dest->index)) - hybrid_search_bitmap (e->dest, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, - data); - } - } - else - { - for (e = bb->pred; e != 0; e = e->pred_next) - { - if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) - continue; - if (!TEST_BIT (visited, e->src->index)) - hybrid_search_bitmap (e->src, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, - data); - } - } -} - - -/* Hybrid search for sbitmaps, rather than bitmaps. */ -static void -hybrid_search_sbitmap (basic_block block, sbitmap *in, sbitmap *out, - sbitmap *gen, sbitmap *kill, enum df_flow_dir dir, - enum df_confluence_op conf_op, - transfer_function_sbitmap transfun, sbitmap visited, - sbitmap pending, void *data) -{ - int changed; - int i = block->index; - edge e; - basic_block bb = block; - - SET_BIT (visited, block->index); - if (TEST_BIT (pending, block->index)) - { - if (dir == DF_FORWARD) - { - /* Calculate of predecessor_outs. */ - sbitmap_zero (in[i]); - for (e = bb->pred; e != 0; e = e->pred_next) - { - if (e->src == ENTRY_BLOCK_PTR) - continue; - switch (conf_op) - { - case DF_UNION: - sbitmap_a_or_b (in[i], in[i], out[e->src->index]); - break; - case DF_INTERSECTION: - sbitmap_a_and_b (in[i], in[i], out[e->src->index]); - break; - } - } - } - else - { - /* Calculate of successor ins. */ - sbitmap_zero (out[i]); - for (e = bb->succ; e != 0; e = e->succ_next) - { - if (e->dest == EXIT_BLOCK_PTR) - continue; - switch (conf_op) - { - case DF_UNION: - sbitmap_a_or_b (out[i], out[i], in[e->dest->index]); - break; - case DF_INTERSECTION: - sbitmap_a_and_b (out[i], out[i], in[e->dest->index]); - break; - } - } - } - /* Common part. */ - (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); - RESET_BIT (pending, i); - if (changed) - { - if (dir == DF_FORWARD) - { - for (e = bb->succ; e != 0; e = e->succ_next) - { - if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) - continue; - SET_BIT (pending, e->dest->index); - } - } - else - { - for (e = bb->pred; e != 0; e = e->pred_next) - { - if (e->src == ENTRY_BLOCK_PTR || e->dest->index == i) - continue; - SET_BIT (pending, e->src->index); - } - } - } - } - if (dir == DF_FORWARD) - { - for (e = bb->succ; e != 0; e = e->succ_next) - { - if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) - continue; - if (!TEST_BIT (visited, e->dest->index)) - hybrid_search_sbitmap (e->dest, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, - data); - } - } - else - { - for (e = bb->pred; e != 0; e = e->pred_next) - { - if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) - continue; - if (!TEST_BIT (visited, e->src->index)) - hybrid_search_sbitmap (e->src, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, - data); - } - } -} - - -/* gen = GEN set. - kill = KILL set. - in, out = Filled in by function. - blocks = Blocks to analyze. - dir = Dataflow direction. - conf_op = Confluence operation. - transfun = Transfer function. - order = Order to iterate in. (Should map block numbers -> order) - data = Whatever you want. It's passed to the transfer function. - - This function will perform iterative bitvector dataflow, producing - the in and out sets. Even if you only want to perform it for a - small number of blocks, the vectors for in and out must be large - enough for *all* blocks, because changing one block might affect - others. However, it'll only put what you say to analyze on the - initial worklist. - - For forward problems, you probably want to pass in a mapping of - block number to rc_order (like df->inverse_rc_map). -*/ -void -iterative_dataflow_sbitmap (sbitmap *in, sbitmap *out, sbitmap *gen, - sbitmap *kill, bitmap blocks, - enum df_flow_dir dir, - enum df_confluence_op conf_op, - transfer_function_sbitmap transfun, int *order, - void *data) -{ - int i; - fibheap_t worklist; - basic_block bb; - sbitmap visited, pending; - - pending = sbitmap_alloc (last_basic_block); - visited = sbitmap_alloc (last_basic_block); - sbitmap_zero (pending); - sbitmap_zero (visited); - worklist = fibheap_new (); - - EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, - { - fibheap_insert (worklist, order[i], (void *) (size_t) i); - SET_BIT (pending, i); - if (dir == DF_FORWARD) - sbitmap_copy (out[i], gen[i]); - else - sbitmap_copy (in[i], gen[i]); - }); - - while (sbitmap_first_set_bit (pending) != -1) - { - while (!fibheap_empty (worklist)) - { - i = (size_t) fibheap_extract_min (worklist); - bb = BASIC_BLOCK (i); - if (!TEST_BIT (visited, bb->index)) - hybrid_search_sbitmap (bb, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, data); - } - - if (sbitmap_first_set_bit (pending) != -1) - { - EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, - { - fibheap_insert (worklist, order[i], (void *) (size_t) i); - }); - sbitmap_zero (visited); - } - else - { - break; - } - } - - sbitmap_free (pending); - sbitmap_free (visited); - fibheap_delete (worklist); -} - - -/* Exactly the same as iterative_dataflow_sbitmap, except it works on - bitmaps instead. */ -void -iterative_dataflow_bitmap (bitmap *in, bitmap *out, bitmap *gen, bitmap *kill, - bitmap blocks, enum df_flow_dir dir, - enum df_confluence_op conf_op, - transfer_function_bitmap transfun, int *order, - void *data) -{ - int i; - fibheap_t worklist; - basic_block bb; - sbitmap visited, pending; - - pending = sbitmap_alloc (last_basic_block); - visited = sbitmap_alloc (last_basic_block); - sbitmap_zero (pending); - sbitmap_zero (visited); - worklist = fibheap_new (); - - EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, - { - fibheap_insert (worklist, order[i], (void *) (size_t) i); - SET_BIT (pending, i); - if (dir == DF_FORWARD) - bitmap_copy (out[i], gen[i]); - else - bitmap_copy (in[i], gen[i]); - }); - - while (sbitmap_first_set_bit (pending) != -1) - { - while (!fibheap_empty (worklist)) - { - i = (size_t) fibheap_extract_min (worklist); - bb = BASIC_BLOCK (i); - if (!TEST_BIT (visited, bb->index)) - hybrid_search_bitmap (bb, in, out, gen, kill, dir, - conf_op, transfun, visited, pending, data); - } - - if (sbitmap_first_set_bit (pending) != -1) - { - EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, - { - fibheap_insert (worklist, order[i], (void *) (size_t) i); - }); - sbitmap_zero (visited); - } - else - { - break; - } - } - sbitmap_free (pending); - sbitmap_free (visited); - fibheap_delete (worklist); -} diff --git a/contrib/gcc/doloop.c b/contrib/gcc/doloop.c deleted file mode 100644 index a82fb16..0000000 --- a/contrib/gcc/doloop.c +++ /dev/null @@ -1,882 +0,0 @@ -/* Perform doloop optimizations - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. - Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz) - -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 "coretypes.h" -#include "tm.h" -#include "rtl.h" -#include "flags.h" -#include "expr.h" -#include "loop.h" -#include "hard-reg-set.h" -#include "basic-block.h" -#include "toplev.h" -#include "tm_p.h" -#include "cfgloop.h" - - -/* This module is used to modify loops with a determinable number of - iterations to use special low-overhead looping instructions. - - It first validates whether the loop is well behaved and has a - determinable number of iterations (either at compile or run-time). - It then modifies the loop to use a low-overhead looping pattern as - follows: - - 1. A pseudo register is allocated as the loop iteration counter. - - 2. The number of loop iterations is calculated and is stored - in the loop counter. - - 3. At the end of the loop, the jump insn is replaced by the - doloop_end pattern. The compare must remain because it might be - used elsewhere. If the loop-variable or condition register are - used elsewhere, they will be eliminated by flow. - - 4. An optional doloop_begin pattern is inserted at the top of the - loop. -*/ - - -#ifdef HAVE_doloop_end - -static unsigned HOST_WIDE_INT doloop_iterations_max (const struct loop_info *, - enum machine_mode, int); -static int doloop_valid_p (const struct loop *, rtx); -static int doloop_modify (const struct loop *, rtx, rtx, rtx, rtx, rtx); -static int doloop_modify_runtime (const struct loop *, rtx, rtx, rtx, - enum machine_mode, rtx); - - -/* Return the loop termination condition for PATTERN or zero - if it is not a decrement and branch jump insn. */ -rtx -doloop_condition_get (rtx pattern) -{ - rtx cmp; - rtx inc; - rtx reg; - rtx condition; - - /* The canonical doloop pattern we expect is: - - (parallel [(set (pc) (if_then_else (condition) - (label_ref (label)) - (pc))) - (set (reg) (plus (reg) (const_int -1))) - (additional clobbers and uses)]) - - Some machines (IA-64) make the decrement conditional on - the condition as well, so we don't bother verifying the - actual decrement. In summary, the branch must be the - first entry of the parallel (also required by jump.c), - and the second entry of the parallel must be a set of - the loop counter register. */ - - if (GET_CODE (pattern) != PARALLEL) - return 0; - - cmp = XVECEXP (pattern, 0, 0); - inc = XVECEXP (pattern, 0, 1); - - /* Check for (set (reg) (something)). */ - if (GET_CODE (inc) != SET || ! REG_P (SET_DEST (inc))) - return 0; - - /* Extract loop counter register. */ - reg = SET_DEST (inc); - - /* Check for (set (pc) (if_then_else (condition) - (label_ref (label)) - (pc))). */ - if (GET_CODE (cmp) != SET - || SET_DEST (cmp) != pc_rtx - || GET_CODE (SET_SRC (cmp)) != IF_THEN_ELSE - || GET_CODE (XEXP (SET_SRC (cmp), 1)) != LABEL_REF - || XEXP (SET_SRC (cmp), 2) != pc_rtx) - return 0; - - /* Extract loop termination condition. */ - condition = XEXP (SET_SRC (cmp), 0); - - if ((GET_CODE (condition) != GE && GET_CODE (condition) != NE) - || GET_CODE (XEXP (condition, 1)) != CONST_INT) - return 0; - - if (XEXP (condition, 0) == reg) - return condition; - - if (GET_CODE (XEXP (condition, 0)) == PLUS - && XEXP (XEXP (condition, 0), 0) == reg) - return condition; - - /* ??? If a machine uses a funny comparison, we could return a - canonicalised form here. */ - - return 0; -} - - -/* Return an estimate of the maximum number of loop iterations for the - loop specified by LOOP or zero if the loop is not normal. - MODE is the mode of the iteration count and NONNEG is nonzero if - the iteration count has been proved to be non-negative. */ -static unsigned HOST_WIDE_INT -doloop_iterations_max (const struct loop_info *loop_info, - enum machine_mode mode, int nonneg) -{ - unsigned HOST_WIDE_INT n_iterations_max; - enum rtx_code code; - rtx min_value; - rtx max_value; - HOST_WIDE_INT abs_inc; - int neg_inc; - - neg_inc = 0; - abs_inc = INTVAL (loop_info->increment); - if (abs_inc < 0) - { - abs_inc = -abs_inc; - neg_inc = 1; - } - - if (neg_inc) - { - code = swap_condition (loop_info->comparison_code); - min_value = loop_info->final_equiv_value; - max_value = loop_info->initial_equiv_value; - } - else - { - code = loop_info->comparison_code; - min_value = loop_info->initial_equiv_value; - max_value = loop_info->final_equiv_value; - } - - /* Since the loop has a VTOP, we know that the initial test will be - true and thus the value of max_value should be greater than the - value of min_value. Thus the difference should always be positive - and the code must be LT, LE, LTU, LEU, or NE. Otherwise the loop is - not normal, e.g., `for (i = 0; i < 10; i--)'. */ - switch (code) - { - case LTU: - case LEU: - { - unsigned HOST_WIDE_INT umax; - unsigned HOST_WIDE_INT umin; - - if (GET_CODE (min_value) == CONST_INT) - umin = INTVAL (min_value); - else - umin = 0; - - if (GET_CODE (max_value) == CONST_INT) - umax = INTVAL (max_value); - else - umax = ((unsigned) 2 << (GET_MODE_BITSIZE (mode) - 1)) - 1; - - n_iterations_max = umax - umin; - break; - } - - case LT: - case LE: - { - HOST_WIDE_INT smax; - HOST_WIDE_INT smin; - - if (GET_CODE (min_value) == CONST_INT) - smin = INTVAL (min_value); - else - smin = -((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1)); - - if (GET_CODE (max_value) == CONST_INT) - smax = INTVAL (max_value); - else - smax = ((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1)) - 1; - - n_iterations_max = smax - smin; - break; - } - - case NE: - if (GET_CODE (min_value) == CONST_INT - && GET_CODE (max_value) == CONST_INT) - n_iterations_max = INTVAL (max_value) - INTVAL (min_value); - else - /* We need to conservatively assume that we might have the maximum - number of iterations without any additional knowledge. */ - n_iterations_max = ((unsigned) 2 << (GET_MODE_BITSIZE (mode) - 1)) - 1; - break; - - default: - return 0; - } - - n_iterations_max /= abs_inc; - - /* If we know that the iteration count is non-negative then adjust - n_iterations_max if it is so large that it appears negative. */ - if (nonneg - && n_iterations_max > ((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1))) - n_iterations_max = ((unsigned) 1 << (GET_MODE_BITSIZE (mode) - 1)) - 1; - - return n_iterations_max; -} - - -/* Return nonzero if the loop specified by LOOP is suitable for - the use of special low-overhead looping instructions. */ -static int -doloop_valid_p (const struct loop *loop, rtx jump_insn) -{ - const struct loop_info *loop_info = LOOP_INFO (loop); - - /* The loop must have a conditional jump at the end. */ - if (! any_condjump_p (jump_insn) - || ! onlyjump_p (jump_insn)) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Invalid jump at loop end.\n"); - return 0; - } - - /* Give up if a loop has been completely unrolled. */ - if (loop_info->n_iterations == loop_info->unroll_number) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Loop completely unrolled.\n"); - return 0; - } - - /* The loop must have a single exit target. A break or return - statement within a loop will generate multiple loop exits. - Another example of a loop that currently generates multiple exit - targets is for (i = 0; i < (foo ? 8 : 4); i++) { }. */ - if (loop_info->has_multiple_exit_targets || loop->exit_count) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Loop has multiple exit targets.\n"); - return 0; - } - - /* An indirect jump may jump out of the loop. */ - if (loop_info->has_indirect_jump) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Indirect jump in function.\n"); - return 0; - } - - /* A called function may clobber any special registers required for - low-overhead looping. */ - if (loop_info->has_call) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Function call in loop.\n"); - return 0; - } - - /* Some targets (eg, PPC) use the count register for branch on table - instructions. ??? This should be a target specific check. */ - if (loop_info->has_tablejump) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Computed branch in the loop.\n"); - return 0; - } - - if (! loop_info->increment) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Could not determine iteration info.\n"); - return 0; - } - - if (GET_CODE (loop_info->increment) != CONST_INT) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Increment not an integer constant.\n"); - return 0; - } - - /* There is no guarantee that a NE loop will terminate if the - absolute increment is not unity. ??? We could compute this - condition at run-time and have an additional jump around the loop - to ensure an infinite loop. */ - if (loop_info->comparison_code == NE - && !loop_info->preconditioned - && INTVAL (loop_info->increment) != -1 - && INTVAL (loop_info->increment) != 1) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: NE loop with non-unity increment.\n"); - return 0; - } - - /* Check for loops that may not terminate under special conditions. */ - if (! loop_info->n_iterations - && ((loop_info->comparison_code == LEU - && INTVAL (loop_info->increment) > 0) - || (loop_info->comparison_code == GEU - && INTVAL (loop_info->increment) < 0) - || (loop_info->comparison_code == LTU - && INTVAL (loop_info->increment) > 1) - || (loop_info->comparison_code == GTU - && INTVAL (loop_info->increment) < -1))) - { - /* If the comparison is LEU and the comparison value is UINT_MAX - then the loop will not terminate. Similarly, if the - comparison code is GEU and the comparison value is 0, the - loop will not terminate. - - If the absolute increment is not 1, the loop can be infinite - even with LTU/GTU, e.g. for (i = 3; i > 0; i -= 2) - - Note that with LE and GE, the loop behavior is undefined - (C++ standard section 5 clause 5) if an overflow occurs, say - between INT_MAX and INT_MAX + 1. We thus don't have to worry - about these two cases. - - ??? We could compute these conditions at run-time and have a - additional jump around the loop to ensure an infinite loop. - However, it is very unlikely that this is the intended - behavior of the loop and checking for these rare boundary - conditions would pessimize all other code. - - If the loop is executed only a few times an extra check to - restart the loop could use up most of the benefits of using a - count register loop. Note however, that normally, this - restart branch would never execute, so it could be predicted - well by the CPU. We should generate the pessimistic code by - default, and have an option, e.g. -funsafe-loops that would - enable count-register loops in this case. */ - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Possible infinite iteration case ignored.\n"); - } - - return 1; -} - - -/* Modify the loop to use the low-overhead looping insn where LOOP - describes the loop, ITERATIONS is an RTX containing the desired - number of loop iterations, ITERATIONS_MAX is a CONST_INT specifying - the maximum number of loop iterations, and DOLOOP_INSN is the - low-overhead looping insn to emit at the end of the loop. This - returns nonzero if it was successful. */ -static int -doloop_modify (const struct loop *loop, rtx iterations, rtx iterations_max, - rtx doloop_seq, rtx start_label, rtx condition) -{ - rtx counter_reg; - rtx count; - rtx sequence; - rtx jump_insn; - int nonneg = 0; - int decrement_count; - - jump_insn = prev_nonnote_insn (loop->end); - - if (loop_dump_stream) - { - fprintf (loop_dump_stream, "Doloop: Inserting doloop pattern ("); - if (GET_CODE (iterations) == CONST_INT) - fprintf (loop_dump_stream, HOST_WIDE_INT_PRINT_DEC, - INTVAL (iterations)); - else - fputs ("runtime", loop_dump_stream); - fputs (" iterations).", loop_dump_stream); - } - - /* Emit the label that will delimit the top of the loop. - This has to be done before the delete_insn call below, to prevent - delete_insn from deleting too much. */ - emit_label_after (start_label, loop->top ? loop->top : loop->start); - LABEL_NUSES (start_label)++; - - /* Discard original jump to continue loop. The original compare - result may still be live, so it cannot be discarded explicitly. */ - delete_related_insns (jump_insn); - - counter_reg = XEXP (condition, 0); - if (GET_CODE (counter_reg) == PLUS) - counter_reg = XEXP (counter_reg, 0); - - start_sequence (); - - count = iterations; - decrement_count = 0; - switch (GET_CODE (condition)) - { - case NE: - /* Currently only NE tests against zero and one are supported. */ - if (XEXP (condition, 1) == const0_rtx) - decrement_count = 1; - else if (XEXP (condition, 1) != const1_rtx) - abort (); - break; - - case GE: - /* Currently only GE tests against zero are supported. */ - if (XEXP (condition, 1) != const0_rtx) - abort (); - - /* The iteration count needs decrementing for a GE test. */ - decrement_count = 1; - - /* Determine if the iteration counter will be non-negative. - Note that the maximum value loaded is iterations_max - 1. */ - if ((unsigned HOST_WIDE_INT) INTVAL (iterations_max) - <= ((unsigned) 1 << (GET_MODE_BITSIZE (GET_MODE (counter_reg)) - 1))) - nonneg = 1; - break; - - /* Abort if an invalid doloop pattern has been generated. */ - default: - abort (); - } - - if (decrement_count) - { - if (GET_CODE (count) == CONST_INT) - count = GEN_INT (INTVAL (count) - 1); - else - count = expand_simple_binop (GET_MODE (counter_reg), MINUS, - count, const1_rtx, - 0, 0, OPTAB_LIB_WIDEN); - } - - /* Insert initialization of the count register into the loop header. */ - convert_move (counter_reg, count, 1); - sequence = get_insns (); - end_sequence (); - emit_insn_before (sequence, loop->start); - - /* Some targets (eg, C4x) need to initialize special looping - registers. */ -#ifdef HAVE_doloop_begin - { - rtx init; - - init = gen_doloop_begin (counter_reg, - GET_CODE (iterations) == CONST_INT - ? iterations : const0_rtx, iterations_max, - GEN_INT (loop->level)); - if (init) - { - start_sequence (); - emit_insn (init); - sequence = get_insns (); - end_sequence (); - emit_insn_after (sequence, loop->start); - } - } -#endif - - /* Insert the new low-overhead looping insn. */ - emit_jump_insn_before (doloop_seq, loop->end); - jump_insn = prev_nonnote_insn (loop->end); - JUMP_LABEL (jump_insn) = start_label; - - /* Add a REG_NONNEG note if the actual or estimated maximum number - of iterations is non-negative. */ - if (nonneg) - { - REG_NOTES (jump_insn) - = gen_rtx_EXPR_LIST (REG_NONNEG, NULL_RTX, REG_NOTES (jump_insn)); - } - return 1; -} - - -/* Handle the more complex case, where the bounds are not known at - compile time. In this case we generate a run_time calculation of - the number of iterations. We rely on the existence of a run-time - guard to ensure that the loop executes at least once, i.e., - initial_value obeys the loop comparison condition. If a guard is - not present, we emit one. The loop to modify is described by LOOP. - ITERATIONS_MAX is a CONST_INT specifying the estimated maximum - number of loop iterations. DOLOOP_INSN is the low-overhead looping - insn to insert. Returns nonzero if loop successfully modified. */ -static int -doloop_modify_runtime (const struct loop *loop, rtx iterations_max, - rtx doloop_seq, rtx start_label, - enum machine_mode mode, rtx condition) -{ - const struct loop_info *loop_info = LOOP_INFO (loop); - HOST_WIDE_INT abs_inc; - HOST_WIDE_INT abs_loop_inc; - int neg_inc; - rtx diff; - rtx sequence; - rtx iterations; - rtx initial_value; - rtx final_value; - rtx increment; - int unsigned_p; - enum rtx_code comparison_code; - - increment = loop_info->increment; - initial_value = loop_info->initial_value; - final_value = loop_info->final_value; - - neg_inc = 0; - abs_inc = INTVAL (increment); - if (abs_inc < 0) - { - abs_inc = -abs_inc; - neg_inc = 1; - } - - comparison_code = loop_info->comparison_code; - unsigned_p = (comparison_code == LTU - || comparison_code == LEU - || comparison_code == GTU - || comparison_code == GEU - || comparison_code == NE); - - /* The number of iterations (prior to any loop unrolling) is given by: - - n = (abs (final - initial) + abs_inc - 1) / abs_inc. - - However, it is possible for the summation to overflow, and a - safer method is: - - n = abs (final - initial) / abs_inc; - n += (abs (final - initial) % abs_inc) != 0; - - But when abs_inc is a power of two, the summation won't overflow - except in cases where the loop never terminates. So we don't - need to use this more costly calculation. - - If the loop has been unrolled, the full calculation is - - t1 = abs_inc * unroll_number; increment per loop - n = (abs (final - initial) + abs_inc - 1) / t1; full loops - n += (abs (final - initial) + abs_inc - 1) % t1) >= abs_inc; - partial loop - which works out to be equivalent to - - n = (abs (final - initial) + t1 - 1) / t1; - - In the case where the loop was preconditioned, a few iterations - may have been executed earlier; but 'initial' was adjusted as they - were executed, so we don't need anything special for that case here. - As above, when t1 is a power of two we don't need to worry about - overflow. - - The division and modulo operations can be avoided by requiring - that the increment is a power of 2 (precondition_loop_p enforces - this requirement). Nevertheless, the RTX_COSTS should be checked - to see if a fast divmod is available. */ - - start_sequence (); - /* abs (final - initial) */ - diff = expand_simple_binop (mode, MINUS, - copy_rtx (neg_inc ? initial_value : final_value), - copy_rtx (neg_inc ? final_value : initial_value), - NULL_RTX, unsigned_p, OPTAB_LIB_WIDEN); - - /* Some code transformations can result in code akin to - - tmp = i + 1; - ... - goto scan_start; - top: - tmp = tmp + 1; - scan_start: - i = tmp; - if (i < n) goto top; - - We'll have already detected this form of loop in scan_loop, - and set loop->top and loop->scan_start appropriately. - - In this situation, we skip the increment the first time through - the loop, which results in an incorrect estimate of the number - of iterations. Adjust the difference to compensate. */ - /* ??? Logically, it would seem this belongs in loop_iterations. - However, this causes regressions e.g. on x86 execute/20011008-3.c, - so I do not believe we've properly characterized the exact nature - of the problem. In the meantime, this fixes execute/20011126-2.c - on ia64 and some Ada front end miscompilation on ppc. */ - - if (loop->scan_start) - { - rtx iteration_var = loop_info->iteration_var; - struct loop_ivs *ivs = LOOP_IVS (loop); - struct iv_class *bl; - - if (REG_IV_TYPE (ivs, REGNO (iteration_var)) == BASIC_INDUCT) - bl = REG_IV_CLASS (ivs, REGNO (iteration_var)); - else if (REG_IV_TYPE (ivs, REGNO (iteration_var)) == GENERAL_INDUCT) - { - struct induction *v = REG_IV_INFO (ivs, REGNO (iteration_var)); - bl = REG_IV_CLASS (ivs, REGNO (v->src_reg)); - } - else - /* Iteration var must be an induction variable to get here. */ - abort (); - - if (INSN_UID (bl->biv->insn) < max_uid_for_loop - && INSN_LUID (bl->biv->insn) < INSN_LUID (loop->scan_start)) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Basic induction var skips initial incr.\n"); - - diff = expand_simple_binop (mode, PLUS, diff, GEN_INT (abs_inc), - diff, unsigned_p, OPTAB_LIB_WIDEN); - } - } - - abs_loop_inc = abs_inc * loop_info->unroll_number; - if (abs_loop_inc != 1) - { - int shift_count; - - shift_count = exact_log2 (abs_loop_inc); - if (shift_count < 0) - abort (); - - /* (abs (final - initial) + abs_inc * unroll_number - 1) */ - diff = expand_simple_binop (GET_MODE (diff), PLUS, - diff, GEN_INT (abs_loop_inc - 1), - diff, 1, OPTAB_LIB_WIDEN); - - /* (abs (final - initial) + abs_inc * unroll_number - 1) - / (abs_inc * unroll_number) */ - diff = expand_simple_binop (GET_MODE (diff), LSHIFTRT, - diff, GEN_INT (shift_count), - diff, 1, OPTAB_LIB_WIDEN); - } - iterations = diff; - - /* If there is a NOTE_INSN_LOOP_VTOP, we have a `for' or `while' - style loop, with a loop exit test at the start. Thus, we can - assume that the loop condition was true when the loop was - entered. - - `do-while' loops require special treatment since the exit test is - not executed before the start of the loop. We need to determine - if the loop will terminate after the first pass and to limit the - iteration count to one if necessary. */ - if (! loop->vtop) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, "Doloop: Do-while loop.\n"); - - /* A `do-while' loop must iterate at least once. For code like - i = initial; do { ... } while (++i < final); - we will calculate a bogus iteration count if initial > final. - So detect this and set the iteration count to 1. - Note that if the loop has been unrolled, then the loop body - is guaranteed to execute at least once. Also, when the - comparison is NE, our calculated count will be OK. */ - if (loop_info->unroll_number == 1 && comparison_code != NE) - { - rtx label; - - /* Emit insns to test if the loop will immediately - terminate and to set the iteration count to 1 if true. */ - label = gen_label_rtx(); - emit_cmp_and_jump_insns (copy_rtx (initial_value), - copy_rtx (loop_info->comparison_value), - comparison_code, NULL_RTX, mode, 0, - label); - JUMP_LABEL (get_last_insn ()) = label; - LABEL_NUSES (label)++; - emit_move_insn (iterations, const1_rtx); - emit_label (label); - } - } - - sequence = get_insns (); - end_sequence (); - emit_insn_before (sequence, loop->start); - - return doloop_modify (loop, iterations, iterations_max, doloop_seq, - start_label, condition); -} - - -/* This is the main entry point. Process loop described by LOOP - validating that the loop is suitable for conversion to use a low - overhead looping instruction, replacing the jump insn where - suitable. We distinguish between loops with compile-time bounds - and those with run-time bounds. Information from LOOP is used to - compute the number of iterations and to determine whether the loop - is a candidate for this optimization. Returns nonzero if loop - successfully modified. */ -int -doloop_optimize (const struct loop *loop) -{ - struct loop_info *loop_info = LOOP_INFO (loop); - rtx initial_value; - rtx final_value; - rtx increment; - rtx jump_insn; - enum machine_mode mode; - unsigned HOST_WIDE_INT n_iterations; - unsigned HOST_WIDE_INT n_iterations_max; - rtx doloop_seq, doloop_pat, doloop_reg; - rtx iterations; - rtx iterations_max; - rtx start_label; - rtx condition; - - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Processing loop %d, enclosed levels %d.\n", - loop->num, loop->level); - - jump_insn = prev_nonnote_insn (loop->end); - - /* Check that loop is a candidate for a low-overhead looping insn. */ - if (! doloop_valid_p (loop, jump_insn)) - return 0; - - /* Determine if the loop can be safely, and profitably, - preconditioned. While we don't precondition the loop in a loop - unrolling sense, this test ensures that the loop is well behaved - and that the increment is a constant integer. */ - if (! precondition_loop_p (loop, &initial_value, &final_value, - &increment, &mode)) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Cannot precondition loop.\n"); - return 0; - } - - /* Determine or estimate the maximum number of loop iterations. */ - n_iterations = loop_info->n_iterations; - if (n_iterations) - { - /* This is the simple case where the initial and final loop - values are constants. */ - n_iterations_max = n_iterations; - } - else - { - int nonneg = find_reg_note (jump_insn, REG_NONNEG, 0) != 0; - - /* This is the harder case where the initial and final loop - values may not be constants. */ - n_iterations_max = doloop_iterations_max (loop_info, mode, nonneg); - - if (! n_iterations_max) - { - /* We have something like `for (i = 0; i < 10; i--)'. */ - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Not normal loop.\n"); - return 0; - } - } - - /* Account for loop unrolling in the iteration count. This will - have no effect if loop_iterations could not determine the number - of iterations. */ - n_iterations /= loop_info->unroll_number; - n_iterations_max /= loop_info->unroll_number; - - if (n_iterations && n_iterations < 3) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Too few iterations (%ld) to be profitable.\n", - (long int) n_iterations); - return 0; - } - - iterations = GEN_INT (n_iterations); - iterations_max = GEN_INT (n_iterations_max); - - /* Generate looping insn. If the pattern FAILs then give up trying - to modify the loop since there is some aspect the back-end does - not like. */ - start_label = gen_label_rtx (); - doloop_reg = gen_reg_rtx (mode); - doloop_seq = gen_doloop_end (doloop_reg, iterations, iterations_max, - GEN_INT (loop->level), start_label); - if (! doloop_seq && mode != word_mode) - { - PUT_MODE (doloop_reg, word_mode); - doloop_seq = gen_doloop_end (doloop_reg, iterations, iterations_max, - GEN_INT (loop->level), start_label); - } - if (! doloop_seq) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Target unwilling to use doloop pattern!\n"); - return 0; - } - - /* If multiple instructions were created, the last must be the - jump instruction. Also, a raw define_insn may yield a plain - pattern. */ - doloop_pat = doloop_seq; - if (INSN_P (doloop_pat)) - { - while (NEXT_INSN (doloop_pat) != NULL_RTX) - doloop_pat = NEXT_INSN (doloop_pat); - if (GET_CODE (doloop_pat) == JUMP_INSN) - doloop_pat = PATTERN (doloop_pat); - else - doloop_pat = NULL_RTX; - } - - if (! doloop_pat - || ! (condition = doloop_condition_get (doloop_pat))) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Doloop: Unrecognizable doloop pattern!\n"); - return 0; - } - - if (n_iterations != 0) - /* Handle the simpler case, where we know the iteration count at - compile time. */ - return doloop_modify (loop, iterations, iterations_max, doloop_seq, - start_label, condition); - else - /* Handle the harder case, where we must add additional runtime tests. */ - return doloop_modify_runtime (loop, iterations_max, doloop_seq, - start_label, mode, condition); -} - -#endif /* HAVE_doloop_end */ diff --git a/contrib/gcc/dummy-conditions.c b/contrib/gcc/dummy-conditions.c deleted file mode 100644 index eb3fb41..0000000 --- a/contrib/gcc/dummy-conditions.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Support for calculating constant conditions. - Copyright (C) 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. */ - -#include "bconfig.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "gensupport.h" - -/* MD generators that are run before insn-conditions.c exists should - link against this file instead. Currently that is genconditions - and genconstants. */ - -/* Empty conditions table to prevent link errors. */ -const struct c_test insn_conditions[1] = { { 0, 0 } }; -const size_t n_insn_conditions = 0; - -/* Disable insn elision, since it is currently impossible. */ -const int insn_elision_unavailable = 1; diff --git a/contrib/gcc/dyn-string.c b/contrib/gcc/dyn-string.c deleted file mode 100644 index 1da76c2..0000000 --- a/contrib/gcc/dyn-string.c +++ /dev/null @@ -1,442 +0,0 @@ -/* An abstract string datatype. - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. - Contributed by Mark Mitchell (mark@markmitchell.com). - -This file is part of GNU CC. - -GNU CC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file into combinations with other programs, -and to distribute those combinations without any restriction coming -from the use of this file. (The General Public License restrictions -do apply in other respects; for example, they cover modification of -the file, and distribution when not linked into a combined -executable.) - -GNU CC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifdef HAVE_STRING_H -#include -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif - -#include "libiberty.h" -#include "dyn-string.h" - -/* If this file is being compiled for inclusion in the C++ runtime - library, as part of the demangler implementation, we don't want to - abort if an allocation fails. Instead, percolate an error code up - through the call chain. */ - -#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) -#define RETURN_ON_ALLOCATION_FAILURE -#endif - -/* Performs in-place initialization of a dyn_string struct. This - function can be used with a dyn_string struct on the stack or - embedded in another object. The contents of of the string itself - are still dynamically allocated. The string initially is capable - of holding at least SPACE characeters, including the terminating - NUL. If SPACE is 0, it will silently be increated to 1. - - If RETURN_ON_ALLOCATION_FAILURE is defined and memory allocation - fails, returns 0. Otherwise returns 1. */ - -int -dyn_string_init (ds_struct_ptr, space) - struct dyn_string *ds_struct_ptr; - int space; -{ - /* We need at least one byte in which to store the terminating NUL. */ - if (space == 0) - space = 1; - -#ifdef RETURN_ON_ALLOCATION_FAILURE - ds_struct_ptr->s = (char *) malloc (space); - if (ds_struct_ptr->s == NULL) - return 0; -#else - ds_struct_ptr->s = (char *) xmalloc (space); -#endif - ds_struct_ptr->allocated = space; - ds_struct_ptr->length = 0; - ds_struct_ptr->s[0] = '\0'; - - return 1; -} - -/* Create a new dynamic string capable of holding at least SPACE - characters, including the terminating NUL. If SPACE is 0, it will - be silently increased to 1. If RETURN_ON_ALLOCATION_FAILURE is - defined and memory allocation fails, returns NULL. Otherwise - returns the newly allocated string. */ - -dyn_string_t -dyn_string_new (space) - int space; -{ - dyn_string_t result; -#ifdef RETURN_ON_ALLOCATION_FAILURE - result = (dyn_string_t) malloc (sizeof (struct dyn_string)); - if (result == NULL) - return NULL; - if (!dyn_string_init (result, space)) - { - free (result); - return NULL; - } -#else - result = (dyn_string_t) xmalloc (sizeof (struct dyn_string)); - dyn_string_init (result, space); -#endif - return result; -} - -/* Free the memory used by DS. */ - -void -dyn_string_delete (ds) - dyn_string_t ds; -{ - free (ds->s); - free (ds); -} - -/* Returns the contents of DS in a buffer allocated with malloc. It - is the caller's responsibility to deallocate the buffer using free. - DS is then set to the empty string. Deletes DS itself. */ - -char* -dyn_string_release (ds) - dyn_string_t ds; -{ - /* Store the old buffer. */ - char* result = ds->s; - /* The buffer is no longer owned by DS. */ - ds->s = NULL; - /* Delete DS. */ - free (ds); - /* Return the old buffer. */ - return result; -} - -/* Increase the capacity of DS so it can hold at least SPACE - characters, plus the terminating NUL. This function will not (at - present) reduce the capacity of DS. Returns DS on success. - - If RETURN_ON_ALLOCATION_FAILURE is defined and a memory allocation - operation fails, deletes DS and returns NULL. */ - -dyn_string_t -dyn_string_resize (ds, space) - dyn_string_t ds; - int space; -{ - int new_allocated = ds->allocated; - - /* Increase SPACE to hold the NUL termination. */ - ++space; - - /* Increase allocation by factors of two. */ - while (space > new_allocated) - new_allocated *= 2; - - if (new_allocated != ds->allocated) - { - ds->allocated = new_allocated; - /* We actually need more space. */ -#ifdef RETURN_ON_ALLOCATION_FAILURE - ds->s = (char *) realloc (ds->s, ds->allocated); - if (ds->s == NULL) - { - free (ds); - return NULL; - } -#else - ds->s = (char *) xrealloc (ds->s, ds->allocated); -#endif - } - - return ds; -} - -/* Sets the contents of DS to the empty string. */ - -void -dyn_string_clear (ds) - dyn_string_t ds; -{ - /* A dyn_string always has room for at least the NUL terminator. */ - ds->s[0] = '\0'; - ds->length = 0; -} - -/* Makes the contents of DEST the same as the contents of SRC. DEST - and SRC must be distinct. Returns 1 on success. On failure, if - RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */ - -int -dyn_string_copy (dest, src) - dyn_string_t dest; - dyn_string_t src; -{ - if (dest == src) - abort (); - - /* Make room in DEST. */ - if (dyn_string_resize (dest, src->length) == NULL) - return 0; - /* Copy DEST into SRC. */ - strcpy (dest->s, src->s); - /* Update the size of DEST. */ - dest->length = src->length; - return 1; -} - -/* Copies SRC, a NUL-terminated string, into DEST. Returns 1 on - success. On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST - and returns 0. */ - -int -dyn_string_copy_cstr (dest, src) - dyn_string_t dest; - const char *src; -{ - int length = strlen (src); - /* Make room in DEST. */ - if (dyn_string_resize (dest, length) == NULL) - return 0; - /* Copy DEST into SRC. */ - strcpy (dest->s, src); - /* Update the size of DEST. */ - dest->length = length; - return 1; -} - -/* Inserts SRC at the beginning of DEST. DEST is expanded as - necessary. SRC and DEST must be distinct. Returns 1 on success. - On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and - returns 0. */ - -int -dyn_string_prepend (dest, src) - dyn_string_t dest; - dyn_string_t src; -{ - return dyn_string_insert (dest, 0, src); -} - -/* Inserts SRC, a NUL-terminated string, at the beginning of DEST. - DEST is expanded as necessary. Returns 1 on success. On failure, - if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */ - -int -dyn_string_prepend_cstr (dest, src) - dyn_string_t dest; - const char *src; -{ - return dyn_string_insert_cstr (dest, 0, src); -} - -/* Inserts SRC into DEST starting at position POS. DEST is expanded - as necessary. SRC and DEST must be distinct. Returns 1 on - success. On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST - and returns 0. */ - -int -dyn_string_insert (dest, pos, src) - dyn_string_t dest; - int pos; - dyn_string_t src; -{ - int i; - - if (src == dest) - abort (); - - if (dyn_string_resize (dest, dest->length + src->length) == NULL) - return 0; - /* Make room for the insertion. Be sure to copy the NUL. */ - for (i = dest->length; i >= pos; --i) - dest->s[i + src->length] = dest->s[i]; - /* Splice in the new stuff. */ - strncpy (dest->s + pos, src->s, src->length); - /* Compute the new length. */ - dest->length += src->length; - return 1; -} - -/* Inserts SRC, a NUL-terminated string, into DEST starting at - position POS. DEST is expanded as necessary. Returns 1 on - success. On failure, RETURN_ON_ALLOCATION_FAILURE, deletes DEST - and returns 0. */ - -int -dyn_string_insert_cstr (dest, pos, src) - dyn_string_t dest; - int pos; - const char *src; -{ - int i; - int length = strlen (src); - - if (dyn_string_resize (dest, dest->length + length) == NULL) - return 0; - /* Make room for the insertion. Be sure to copy the NUL. */ - for (i = dest->length; i >= pos; --i) - dest->s[i + length] = dest->s[i]; - /* Splice in the new stuff. */ - strncpy (dest->s + pos, src, length); - /* Compute the new length. */ - dest->length += length; - return 1; -} - -/* Inserts character C into DEST starting at position POS. DEST is - expanded as necessary. Returns 1 on success. On failure, - RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */ - -int -dyn_string_insert_char (dest, pos, c) - dyn_string_t dest; - int pos; - int c; -{ - int i; - - if (dyn_string_resize (dest, dest->length + 1) == NULL) - return 0; - /* Make room for the insertion. Be sure to copy the NUL. */ - for (i = dest->length; i >= pos; --i) - dest->s[i + 1] = dest->s[i]; - /* Add the new character. */ - dest->s[pos] = c; - /* Compute the new length. */ - ++dest->length; - return 1; -} - -/* Append S to DS, resizing DS if necessary. Returns 1 on success. - On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and - returns 0. */ - -int -dyn_string_append (dest, s) - dyn_string_t dest; - dyn_string_t s; -{ - if (dyn_string_resize (dest, dest->length + s->length) == 0) - return 0; - strcpy (dest->s + dest->length, s->s); - dest->length += s->length; - return 1; -} - -/* Append the NUL-terminated string S to DS, resizing DS if necessary. - Returns 1 on success. On failure, if RETURN_ON_ALLOCATION_FAILURE, - deletes DEST and returns 0. */ - -int -dyn_string_append_cstr (dest, s) - dyn_string_t dest; - const char *s; -{ - int len = strlen (s); - - /* The new length is the old length plus the size of our string, plus - one for the null at the end. */ - if (dyn_string_resize (dest, dest->length + len) == NULL) - return 0; - strcpy (dest->s + dest->length, s); - dest->length += len; - return 1; -} - -/* Appends C to the end of DEST. Returns 1 on success. On failiure, - if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */ - -int -dyn_string_append_char (dest, c) - dyn_string_t dest; - int c; -{ - /* Make room for the extra character. */ - if (dyn_string_resize (dest, dest->length + 1) == NULL) - return 0; - /* Append the character; it will overwrite the old NUL. */ - dest->s[dest->length] = c; - /* Add a new NUL at the end. */ - dest->s[dest->length + 1] = '\0'; - /* Update the length. */ - ++(dest->length); - return 1; -} - -/* Sets the contents of DEST to the substring of SRC starting at START - and ending before END. START must be less than or equal to END, - and both must be between zero and the length of SRC, inclusive. - Returns 1 on success. On failure, if RETURN_ON_ALLOCATION_FAILURE, - deletes DEST and returns 0. */ - -int -dyn_string_substring (dest, src, start, end) - dyn_string_t dest; - dyn_string_t src; - int start; - int end; -{ - int i; - int length = end - start; - - if (start > end || start > src->length || end > src->length) - abort (); - - /* Make room for the substring. */ - if (dyn_string_resize (dest, length) == NULL) - return 0; - /* Copy the characters in the substring, */ - for (i = length; --i >= 0; ) - dest->s[i] = src->s[start + i]; - /* NUL-terimate the result. */ - dest->s[length] = '\0'; - /* Record the length of the substring. */ - dest->length = length; - - return 1; -} - -/* Returns non-zero if DS1 and DS2 have the same contents. */ - -int -dyn_string_eq (ds1, ds2) - dyn_string_t ds1; - dyn_string_t ds2; -{ - /* If DS1 and DS2 have different lengths, they must not be the same. */ - if (ds1->length != ds2->length) - return 0; - else - return !strcmp (ds1->s, ds2->s); -} diff --git a/contrib/gcc/dyn-string.h b/contrib/gcc/dyn-string.h deleted file mode 100644 index 2a771c7..0000000 --- a/contrib/gcc/dyn-string.h +++ /dev/null @@ -1,92 +0,0 @@ -/* An abstract string datatype. - Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. - Contributed by Mark Mitchell (mark@markmitchell.com). - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - - -typedef struct dyn_string -{ - int allocated; /* The amount of space allocated for the string. */ - int length; /* The actual length of the string. */ - char *s; /* The string itself, NUL-terminated. */ -}* dyn_string_t; - -/* The length STR, in bytes, not including the terminating NUL. */ -#define dyn_string_length(STR) \ - ((STR)->length) - -/* The NTBS in which the contents of STR are stored. */ -#define dyn_string_buf(STR) \ - ((STR)->s) - -/* Compare DS1 to DS2 with strcmp. */ -#define dyn_string_compare(DS1, DS2) \ - (strcmp ((DS1)->s, (DS2)->s)) - - -/* dyn_string functions are used in the demangling implementation - included in the G++ runtime library. To prevent collisions with - names in user programs, the functions that are used in the - demangler are given implementation-reserved names. */ - -#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) - -#define dyn_string_init __cxa_dyn_string_init -#define dyn_string_new __cxa_dyn_string_new -#define dyn_string_delete __cxa_dyn_string_delete -#define dyn_string_release __cxa_dyn_string_release -#define dyn_string_resize __cxa_dyn_string_resize -#define dyn_string_clear __cxa_dyn_string_clear -#define dyn_string_copy __cxa_dyn_string_copy -#define dyn_string_copy_cstr __cxa_dyn_string_copy_cstr -#define dyn_string_prepend __cxa_dyn_string_prepend -#define dyn_string_prepend_cstr __cxa_dyn_string_prepend_cstr -#define dyn_string_insert __cxa_dyn_string_insert -#define dyn_string_insert_cstr __cxa_dyn_string_insert_cstr -#define dyn_string_insert_char __cxa_dyn_string_insert_char -#define dyn_string_append __cxa_dyn_string_append -#define dyn_string_append_cstr __cxa_dyn_string_append_cstr -#define dyn_string_append_char __cxa_dyn_string_append_char -#define dyn_string_substring __cxa_dyn_string_substring -#define dyn_string_eq __cxa_dyn_string_eq - -#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */ - - -extern int dyn_string_init PARAMS ((struct dyn_string *, int)); -extern dyn_string_t dyn_string_new PARAMS ((int)); -extern void dyn_string_delete PARAMS ((dyn_string_t)); -extern char *dyn_string_release PARAMS ((dyn_string_t)); -extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int)); -extern void dyn_string_clear PARAMS ((dyn_string_t)); -extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t)); -extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *)); -extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t)); -extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *)); -extern int dyn_string_insert PARAMS ((dyn_string_t, int, - dyn_string_t)); -extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int, - const char *)); -extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int)); -extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t)); -extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *)); -extern int dyn_string_append_char PARAMS ((dyn_string_t, int)); -extern int dyn_string_substring PARAMS ((dyn_string_t, - dyn_string_t, int, int)); -extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t)); diff --git a/contrib/gcc/f/BUGS b/contrib/gcc/f/BUGS deleted file mode 100644 index acfe4ab..0000000 --- a/contrib/gcc/f/BUGS +++ /dev/null @@ -1,130 +0,0 @@ -_Note:_ This file is automatically generated from the files -`bugs0.texi' and `bugs.texi'. `BUGS' is _not_ a source file, although -it is normally included within source distributions. - - This file lists known bugs in the GCC-3.2 version of the GNU Fortran -compiler. Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Free -Software Foundation, Inc. You may copy, distribute, and modify it -freely as long as you preserve this copyright notice and permission -notice. - -Known Bugs In GNU Fortran -************************* - - This section identifies bugs that `g77' _users_ might run into in -the GCC-3.2 version of `g77'. This includes bugs that are actually in -the `gcc' back end (GBE) or in `libf2c', because those sets of code are -at least somewhat under the control of (and necessarily intertwined -with) `g77', so it isn't worth separating them out. - - For information on bugs in _other_ versions of `g77', see -`gcc/gcc/f/NEWS'. There, lists of bugs fixed in various versions of -`g77' can help determine what bugs existed in prior versions. - - An online, "live" version of this document (derived directly from -the mainline, development version of `g77' within `gcc') is available -via `http://www.gnu.org/software/gcc/onlinedocs/g77/Trouble.html'. -Follow the "Known Bugs" link. - - The following information was last updated on 2002-02-01: - - * `g77' fails to warn about use of a "live" iterative-DO variable as - an implied-DO variable in a `WRITE' or `PRINT' statement (although - it does warn about this in a `READ' statement). - - * Something about `g77''s straightforward handling of label - references and definitions sometimes prevents the GBE from - unrolling loops. Until this is solved, try inserting or removing - `CONTINUE' statements as the terminal statement, using the `END DO' - form instead, and so on. - - * Some confusion in diagnostics concerning failing `INCLUDE' - statements from within `INCLUDE''d or `#include''d files. - - * `g77' assumes that `INTEGER(KIND=1)' constants range from `-2**31' - to `2**31-1' (the range for two's-complement 32-bit values), - instead of determining their range from the actual range of the - type for the configuration (and, someday, for the constant). - - Further, it generally doesn't implement the handling of constants - very well in that it makes assumptions about the configuration - that it no longer makes regarding variables (types). - - Included with this item is the fact that `g77' doesn't recognize - that, on IEEE-754/854-compliant systems, `0./0.' should produce a - NaN and no warning instead of the value `0.' and a warning. - - * `g77' uses way too much memory and CPU time to process large - aggregate areas having any initialized elements. - - For example, `REAL A(1000000)' followed by `DATA A(1)/1/' takes up - way too much time and space, including the size of the generated - assembler file. - - Version 0.5.18 improves cases like this--specifically, cases of - _sparse_ initialization that leave large, contiguous areas - uninitialized--significantly. However, even with the - improvements, these cases still require too much memory and CPU - time. - - (Version 0.5.18 also improves cases where the initial values are - zero to a much greater degree, so if the above example ends with - `DATA A(1)/0/', the compile-time performance will be about as good - as it will ever get, aside from unrelated improvements to the - compiler.) - - Note that `g77' does display a warning message to notify the user - before the compiler appears to hang. - - * When debugging, after starting up the debugger but before being - able to see the source code for the main program unit, the user - must currently set a breakpoint at `MAIN__' (or `MAIN___' or - `MAIN_' if `MAIN__' doesn't exist) and run the program until it - hits the breakpoint. At that point, the main program unit is - activated and about to execute its first executable statement, but - that's the state in which the debugger should start up, as is the - case for languages like C. - - * Debugging `g77'-compiled code using debuggers other than `gdb' is - likely not to work. - - Getting `g77' and `gdb' to work together is a known - problem--getting `g77' to work properly with other debuggers, for - which source code often is unavailable to `g77' developers, seems - like a much larger, unknown problem, and is a lower priority than - making `g77' and `gdb' work together properly. - - On the other hand, information about problems other debuggers have - with `g77' output might make it easier to properly fix `g77', and - perhaps even improve `gdb', so it is definitely welcome. Such - information might even lead to all relevant products working - together properly sooner. - - * `g77' doesn't work perfectly on 64-bit configurations such as the - Digital Semiconductor ("DEC") Alpha. - - This problem is largely resolved as of version 0.5.23. - - * `g77' currently inserts needless padding for things like `COMMON - A,IPAD' where `A' is `CHARACTER*1' and `IPAD' is `INTEGER(KIND=1)' - on machines like x86, because the back end insists that `IPAD' be - aligned to a 4-byte boundary, but the processor has no such - requirement (though it is usually good for performance). - - The `gcc' back end needs to provide a wider array of - specifications of alignment requirements and preferences for - targets, and front ends like `g77' should take advantage of this - when it becomes available. - - * The `libf2c' routines that perform some run-time arithmetic on - `COMPLEX' operands were modified circa version 0.5.20 of `g77' to - work properly even in the presence of aliased operands. - - While the `g77' and `netlib' versions of `libf2c' differ on how - this is accomplished, the main differences are that we believe the - `g77' version works properly even in the presence of _partially_ - aliased operands. - - However, these modifications have reduced performance on targets - such as x86, due to the extra copies of operands involved. - diff --git a/contrib/gcc/f/ChangeLog b/contrib/gcc/f/ChangeLog deleted file mode 100644 index 58cf3e0..0000000 --- a/contrib/gcc/f/ChangeLog +++ /dev/null @@ -1,7350 +0,0 @@ -2006-03-05 Release Manager - - * GCC 3.4.6 released. - -2006-01-21 Joseph Myers - - * g77spec.c (lang_specific_driver): Update copyright notice date. - -2005-12-27 Toon Moene - - PR/25494 - * g77.texi: Corrected entry about catching - Floating Point Exceptions. - -2005-11-30 Release Manager - - * GCC 3.4.5 released. - -2005-05-19 Release Manager - - * GCC 3.4.4 released. - -2004-12-30 Toon Moene - - * news.texi: Change GCC 3.5 to GCC 4.0 - -2004-11-04 Release Manager - - * GCC 3.4.3 released. - -2004-09-21 Bud Davis - - PR fortran/17541 - * bld.c (ffebld_constant_new_real2_val): Fix typo, - -2004-09-06 Release Manager - - * GCC 3.4.2 released. - -2004-09-02 Eric Botcazou - - PR fortran/17180 - * malloc.c (MALLOC_ALIGNMENT): Rename into MAX_ALIGNMENT - and use a host-based heuristics to determine it. - (ROUNDED_AREA_SIZE): Adjust. - -2004-09-01 Eric Botcazou - - PR fortran/17180 - * malloc.c (MALLOC_ALIGNMENT): New constant. - (ROUNDED_AREA_SIZE): Likewise. - (malloc_kill_area_): Use ROUNDED_AREA_SIZE. - (malloc_find_inpool_): Likewise. - (malloc_new_inpool_): Likewise. - (malloc_resize_inpool_): Likewise. - -2004-07-12 Bud Davis - - * bld.c (ffebld_constant_new_character1, ffebld_constant_new_complex{1,2}, - ffebld_constant_new_hollerith, ffebld_constant_new_integer1, - ffebld_constant_new_integer{1,2,3,4}_val, ffebld_constant_new_logical1, - ffebld_constant_new_logical{1,2,3,4}_val, ffebld_constant_new_real{1,2}, - ffebld_constant_new_typeless_ov): - Fill and use `rlink' and `llink' pointers in _ffebld_ struct. - * bld.h (struct _ffebld_): remove 'next' pointer, add - `rlink, llink' pointers; remove `negate' entry. - * malloc.c (malloc_kill_area_): Adapt for new `mallocArea' pointer. - (malloc_display_): Adapt. - (malloc_new_inpool_): Set it. - (malloc_resize_inpool_): Ditto. - -2004-07-01 Release Manager - - * GCC 3.4.1 released. - -2004-06-17 Toon Moene - - * news.texi: Note that GCC 3.4.x is the last version - of GCC to contain g77. - -2004-05-18 Joseph S. Myers - - * bugs.texi, news.texi: Don't reference mainline versions. - -2004-05-16 Gerald Pfeifer - - * g77.texi (Floating-point Errors): Fix typo. - -2004-05-07 Gerald Pfeifer - - * g77.texi (Floating-point Errors): Avoid referencing - http://www.linuxsupportline.com/~billm/ which as has been hijacked; - add a reference to the official IEEE 754 site. - -2004-04-18 Release Manager - - * GCC 3.4.0 released. - -2004-03-21 Joseph S. Myers - - * g77.texi: Update link to "G++ and GCC". - -2004-03-14 Gerald Pfeifer - - * g77.texi (Aligned Data): Remove obsolete paragraph including a - broken link. - (Floating-point Errors): Remove links to http://www.validgh.com/ - which was "hijacked". - (Language): Fix link to Fortran books. - (Projects): Remove obsolete paragraph including a broken link to - ftp://alpha.gnu.org/gnu/g77/projects/. - (Trouble): Remove obsolete paragraph including a broken link to - ftp://alpha.gnu.org/g77.plan. - - * invoke.texi (Overall Options): Remove broken reference to - rat7.uue (which was of dubious copyright status anyways). - - * root.texi (www-burley): Fix URL. - -2004-03-06 Roger Sayle - - * parse.c (ffe_parse_file): Handle the case that main_input_filename - is NULL. - -2004-02-24 Michael Matz - - * Make-lang.in (sta.o-warn): Delete. - * sta.c (ffesta_save_): Don't break aliasing rules. - -2004-02-20 Kazu Hirata - - * Make-lang.in (g77spec.o): Depend on intl.h. - * g77spec.c: Include intl.h. - (lang_specific_driver): Allow translation of the copyright - symbol but not the rest of the copyright message. Allow - translation of the message about warranty. - -2004-02-15 Roger Sayle - - PR fortran/14129 - * lex.c (ffelex_cfelex_): Avoid calling xrealloc on a local stack - allocated array. - -2004-01-30 Kelley Cook - - * Make-lang.in (doc/g77.dvi): Use $(abs_docdir). - -2004-01-20 Kelley Cook - - * Make-lang.in: Replace $(docdir) with doc. - (TEXI_G77_FILES): Define. - (f77.rebuilt): Delete. - (f77.srcextra): Add dependencies on f/BUGS and f/NEWS. - (f77.srcman, f77.srcinfo, f77.man, f77.info): New rules. - (doc/g77.info, doc/g77.dvi): Depend on TEXI_G77_FILES. Always build in - doc directory. Use $(MAKEINFOFLAGS). - (info, dvi, generated_manpages): Update to look in doc directory. - (f/BUGS, f/NEWS): Generate in build directory. - (f77.mostlyclean): Delete BUGS and NEWS from build directory. - (f77.maintainer-clean): Adjust to delete from source directory. - (f77.install-man): Revamp rule. - -2004-01-19 Kelley Cook - - * Make-lang.in (G77_INSTALL_NAME): Define via a immediate $(shell) - instead of deferred backquote. - -2004-01-15 Kelley Cook - - * Make-lang.in (f77.srcextra): Dummy entry. - -2004-01-13 Ian Lance Taylor - - PR fortran/6491 - * expr.c (ffeexpr_reduce_): When handling AND, OR, and XOR, and - when using -fugly-logint, if both operands are logical, convert - the result back to logical. - (ffeexpr_reduced_ugly2log_): Add bothlogical parameter. Change - all callers. Convert logical operands to integer. - -2004-01-12 Ian Lance Taylor - - * README: Remove. - -2004-01-07 Joseph S. Myers - - * com.h (ffecom_gfrt_basictype): Correct return type. - -2003-12-29 Roger Sayle - - PR fortran/12632 - * com.c (ffecom_subscript_check_): Take as an extra argument the - (possibly NULL) decl of the array. Don't create unnecessary tree - nodes if the array index is known to be safe at compile-time. - If the array index is unsafe, force the array decl into memory to - avoid RTL expansion problems. - (ffecom_array_ref_): Update calls to ffecom_subscript_check_. - (ffecom_char_args_x_): Likewise. - -2003-12-06 Kelley Cook - - * Make-lang.in (G77_CROSS_NAME): Delete. - (g77.install_common, g77.install-man, g77.uninstall): Adjust for above. - -2003-11-30 Andreas Jaeger - - * Make-lang.in (f77.rebuilt): Fix dependency on g77.info. - -2003-11-24 Toon Moene - - PR fortran/12633 - * expr.c (ffeexpr_reduced_ugly2log_): Revert - change allowing logical .and. logical to be - integer in expressions when -fugly-logint. - -2003-11-21 Kelley Cook - - * .cvsignore: Delete. - -2003-11-20 Joseph S. Myers - - * Make-lang.in (f77.extraclean): Delete. - -2003-11-20 Joseph S. Myers - - * Make-lang.in (check-f77, lang_checks): Add. - -2003-11-16 Jason Merrill - - * Make-lang.in (f77.tags): Create TAGS.sub files in each directory - and TAGS files that include them for each front end. - -2003-11-12 Andreas Jaeger - - * intdoc.in (Signal Intrinsic (subroutine)): Fix texinfo warning - using @code. - * intdoc.texi: Regenerated. - -2003-11-03 Kelley Cook - - * Make-lang.in (dvi): Move targets to $(docobjdir). - (g77.dvi): Simplify rule. - (g77.info): Sinplify rule. - (g77.1): Delete. - (g77.pod): New intermediate rule. - -2003-10-31 Jakub Jelinek - - * com.c (ffecom_sym_transform_): Set tree type of offset - to ssizetype. - -2003-10-21 Kelley Cook - - * Make-lang.in (f/g77.1): Honor $(docobjdir). - ($(docobjdir)/g77.info): Replace $(srcdir)/doc with $(docdir). - (f/g77.dvi): Likewise. - -2003-10-21 Jan Hubicka - - * lex.c (ffelex_cfelex_): Initialize d. - -Mon Oct 20 23:15:46 2003 Mark Mitchell - - * Make-lang.in ($(docobjdir)/g77.info): Add dependency on - stmp-docobjdir. - -Mon Oct 20 13:49:43 2003 Mark Mitchell - - * Make-lang.in (.PHONY): Remove f77.info, f77.install-info. - (info): Update dependencies. - ($(srcdir)/f/g77.info): Replace with ... - ($(docobjdir)/g77.info): ... this. - (f77.install-info): Remove. - (install-info): New target. - -2003-10-06 Mark Mitchell - - * Make-lang.in (f77.info): Replace with ... - (info): ... this. - (f77.dvi): Replace with ... - (dvi): ... this. - (f77.generated-manpages): Replace with ... - (generated-manpages): ... this. - -2003-09-29 Zack Weinberg - - * target.c (FFETARGET_ATOF_): Delete. - (ffetarget_real1, ffetarget_real2): Use real_from_string directly. - * target.h (FFETARGET_REAL_VALUE_FROM_INT_, - FFETARGET_REAL_VALUE_FROM_LONGLONG_): Use mode_for_size, - don't refer to SFmode or DFmode directly. - -2003-09-28 Richard Henderson - - * com.c (duplicate_decls): Copy DECL_SOURCE_LOCATION, not - file and line separately. - -2003-09-21 Richard Henderson - - * com.c, ste.c: Revert. - -2003-09-21 Richard Henderson - - * com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and - change to const. - -2003-09-21 Toon Moene - - * news.texi: Update with fixed PR's. - -2003-09-21 George Helffrich - - * g77.texi: Remove ancient part about debugging COMMON - and EQUIVALENCE not correctly. - -2003-09-18 Roger Sayle - - * com.c (ffecom_overlap_): Remove FFS_EXPR case. - (ffecom_tree_canonize_ref_): Likewise. - (ffe_truthvalue_conversion): Likewise. - -2003-09-01 Josef Zlomek - - * com.c (ffecom_overlap_): Kill BIT_ANDTC_EXPR. - (ffecom_tree_canonize_ref_): Kill BIT_ANDTC_EXPR. - -Thu Jul 31 01:47:27 2003 Kaveh R. Ghazi - - * com.c (ffecom_init_0): Use `dconsthalf'. - -Sat Jul 19 12:03:03 2003 Kaveh R. Ghazi - - * com.c data.c expr.c fini.c g77spec.c global.c lab.c lex.c name.c - sta.c stc.c std.c storag.c stt.c stw.c symbol.c target.c type.c: - Remove unnecessary casts. - -Thu Jul 17 06:34:41 2003 Neil Booth - - * lang-options.h: Remove. - * lang.opt: Document most options. - -2003-07-14 Geoffrey Keating - - * lang-specs.h (f77-cpp-input): Use -o to specify the CPP output file. - -2003-07-10 Toon Moene - - * ffe.texi: Correctly use @var{srcdir}. - -2003-07-09 Toon Moene - - PR Fortran/11301 - * com.c (ffecom_sym_transform_): finish_decl should have - the same last argument as start_decl. - -2003-07-08 Rainer Orth - - * Make-lang.in (f/g77.dvi): Use PWD_COMMAND. - -2003-07-08 Zack Weinberg - - * lex.c: Remove error block #ifdef MAP_CHARACTER. - -Mon Jul 7 18:13:22 2003 Nathan Sidwell - - * com.c (bison_rule_pushlevel_, bison_rule_compstmt_): Adjust - emit_line_note calls. - * ste.c (ffeste_emit_line_note_): Likewise. - -2003-07-06 Andreas Jaeger - - * bad.c: Convert () to (void) in function definitions. - * bld.c: Likewise. - * data.c: Likewise. - * equiv.c: Likewise. - * expr.c: Likewise. - * global.c: Likewise. - * implic.c: Likewise. - * info.c: Likewise. - * intdoc.c: Likewise. - * intrin.c: Likewise. - * lab.c: Likewise. - * lex.c: Likewise. - * malloc.c: Likewise. - * src.c: Likewise. - * st.c: Likewise. - * sta.c: Likewise. - * stb.c: Likewise. - * stc.c: Likewise. - * std.c: Likewise. - * ste.c: Likewise. - * storag.c: Likewise. - * stt.c: Likewise. - * stw.c: Likewise. - * symbol.c: Likewise. - * top.c: Likewise. - * where.c: Likewise. - - * com.c: Convert prototypes to ISO C90. - * com.h: Likewise. - * g77spec.c: Likewise. - -Sun Jul 6 20:01:29 2003 Neil Booth - - * top.c (ffe_handle_option): Don't handle filenames. - -2003-07-05 Toon Moene - - PR Fortran/11301 - * com.c (ffecom_sym_transform_): Only install - FFEINFO_whereGLOBAL symbols in the global binding - level if not -fno-globals. - -Wed Jul 2 21:16:02 2003 Neil Booth - - * top.c (ffe_init_options): Update prototype. - * top.h (ffe_init_options): Update prototype. - -2003-06-27 Zack Weinberg - - * com.c (input_file_stack_tick): Delete redundant declaration. - -Thu Jun 26 07:06:29 2003 Neil Booth - - * top.c (ffe_handle_option): Don't check for missing arguments. - -Wed Jun 25 06:52:12 2003 Neil Booth - - * top.c (ffe_handle_option): Add missing break;. - -2003-06-24 Scott Snyder - - PR fortran/11299 - * com.c (ffe_init): Call push_srcloc() to ensure that - input_file_stack is initialized. - -Sat Jun 21 21:29:38 2003 Neil Booth - - * lang.opt: Add -fpreprocessed. - * top.c (ffe_handle_option): Handle it. - -Fri Jun 20 10:00:31 2003 Nathan Sidwell - - * com.c (finish_function): Adjust expand_function_end call. - -2003-06-17 Nathanael Nerode - - * Make-lang.in: Replace BUILD_CC references with CC_FOR_BUILD. - -Sun Jun 15 15:56:51 2003 Neil Booth - - * lang.opt: Declare F77. - -Sat Jun 14 18:13:00 2003 Nathan Sidwell - - * com.c (stor_parm_decls): Adjust init_function_start call. - -Sat Jun 14 13:25:00 2003 Neil Booth - - * Make-lang.in: Update to use options.c and options.h. - * top.c: Include options.h not f-options.h. - (ffe_init_options): From com.c. Request F77 options. - (ffe_handle_options): Abort on unrecognized switch. - * com.c (ffe_init_options): Move to top.c. - * top.h (fee_init_options): New. - -2003-06-13 Richard Henderson - - PR debug/9864 - * com.c (ffecom_sym_transform_): Install FFEINFO_whereGLOBAL - symbols in the global binding level. - -Sun Jun 8 15:42:09 2003 Neil Booth - - * Make-lang.in (F77_OBJS, f77.mostlyclean, f/com.o): Update. - (f/f-options.c, f/f-options.h): New. - * com.c: Include opts.h and f-options.h. - (ffecom_decode_include_option_): Remove. - (LANG_HOOKS_HANDLE_OPTION): New. - (LANG_HOOKS_DECODE_OPTION): Drop. - (struct file_name_list, ffecom_decode_include_option, - ffecom_open_include_): Constify. - * com.h (ffecom_decode_include_option): Update. - * lang.opt: New. - * top.c: Include f-options.h, opts.h. - (ffe_is_digit_string_): Constify. - (ffe_decode_option): Transform to ffe_handle_option. - * top.h (ffe_decode_option): Replace with ffe_handle_option. - -2003-06-08 Andreas Jaeger - - * std.c: Remove #if 0'ed functions. - - * sta.c: Remove usage of HARD_F90, FFESTR_F90 and FFESTR_VXT. - * stb.c: Likewise. - * stb.h: Likewise. - * stc.c: Likewise. - * stc.h: Likewise. - * std.c: Likewise. - * std.h: Likewise. - * ste.c: Likewise. - * ste.h: Likewise. - - * str.h (FFESTR_F90): Remove macro. - (FFESTR_VXT): Remove macro. - - * bld.c: Remove usage of FFETARGET_okCHARACTER2, - FFETARGET_okCHARACTER3, FFETARGET_okCHARACTER4, - FFETARGET_okCHARACTER5, FFETARGET_okCHARACTER6, - FFETARGET_okCHARACTER7, FFETARGET_okCHARACTER8, - FFETARGET_okCOMPLEX4, FFETARGET_okCOMPLEX5, FFETARGET_okCOMPLEX6, - FFETARGET_okCOMPLEX7, FFETARGET_okCOMPLEX8, FFETARGET_okINTEGER5, - FFETARGET_okINTEGER6, FFETARGET_okINTEGER7, FFETARGET_okINTEGER8, - FFETARGET_okLOGICAL5, FFETARGET_okLOGICAL6, FFETARGET_okLOGICAL7, - FFETARGET_okLOGICAL8, FFETARGET_okREAL4, FFETARGET_okREAL5, - FFETARGET_okREAL6, FFETARGET_okREAL7 and FFETARGET_okREAL8. - * bld.h: Likewise. - * expr.c: Likewise. - * target.h: Likewise. - * com.c: Likewise. - -Sun Jun 8 12:28:14 2003 Neil Booth - - * Make-lang.in: Update. - * top.c: Include opts.h. Define cl_options_count and cl_options. - -2003-06-07 Andreas Jaeger - - * symbol.c (ffesymbol_new_): Remove tests for macro - FFECOM_symbolHOOK. - * symbol.h: Likewise. - - * storag.c (ffestorag_new): Remove tests for macro - FFECOM_storageHOOK. - * storag.h: Likewise. - - * lab.c (ffelab_new): Remove tests for macro FFECOM_labelHOOK. - * lab.h: Likewise. - - * global.c: Remove tests for macro FFECOM_globalHOOK. - * global.h (struct _ffeglobal_): Likewise. - - * bld.h: Remove tests for macros FFECOM_constantHOOK, - FFECOM_nonterHOOK, FFECOM_globalHOOK, FFECOM_labelHOOK, - FFECOM_storageHOOK, FFECOM_symbolHOOK. - Remove code dependend on FFECOM_itemHOOK. - * bld.c: Likewise. - - * com.h (FFECOM_constantHOOK): Remove define. - (FFECOM_nonterHOOK): Remove. - (FFECOM_globalHOOK): Remove. - (FFECOM_labelHOOK): Remove. - (FFECOM_storageHOOK): Remove. - (FFECOM_symbolHOOK): Remove. - - * com.c (ffecom_get_external_identifier_): Remove usage of - FFETARGET_isENFORCED_MAIN_NAME. - - * bld.c: Remove code dependend on FFEBLD_BLANK_, FFECOM_itemHOOK. - (ffebld_new_accter): Likewise. - (ffebld_new_arrter): Likewise. - (ffebld_new_conter_with_orig): Likewise. - (ffebld_new_item): Likewise. - (ffebld_new_labter): Likewise. - (ffebld_new_labtok): Likewise. - (ffebld_new_none): Likewise. - (ffebld_new_one): Likewise. - (ffebld_new_symter): Likewise. - (ffebld_new_two): Likewise. - -Sat Jun 7 12:10:41 2003 Neil Booth - - * com.c (ffe_init_options): Update. - -Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka - - * Make-lang.in: Add support for stageprofile and stagefeedback - -2003-06-04 Andreas Jaeger - - * g77spec.c (lang_specific_driver): Remove ALT_LIBM usage. - -2003-06-01 Bud Davis - - * ste.c (ffeste_R838): Handle ERROR_MARK. - (ffeste_R839): Ditto. - -2003-06-01 Andreas Jaeger - - * lex.c (ffelex_file_fixed): Remove usage of - REDUCE_CARD_SIZE_AFTER_BIGGY. - - * expr.c (ffeexpr_exprstack_push_operand_): Remove code depenend - on WEIRD_NONFORTRAN_RULES. - - * com.c (ffecom_arg_ptr_to_expr): Remove - PASS_HOLLERITH_BY_DESCRIPTOR dependend code. - (ffecom_const_expr): Remove usage of NEWCOMMON. - (ffecom_expand_let_stmt): Remove MOVE_EXPR. - -2003-05-31 Bud Davis - - PR fortran/10843 - * sta.c (ffesta_second_): Parse GO TO correctly, - even in free source format. - -2003-05-31 Andreas Jaeger - - * lex.c (ffelex_hash_): Remove HANDLE_PRAGMA and - HANDLE_GENERIC_PRAGMA dependend code, remove #if 0 code. - (pragma_getc): Removed. - (pragma_ungetc): Removed. - -2003-05-30 Roger Sayle - - * com.c (ffecom_init_0): Define built-in functions for tan and atan. - * com-rt.def: Use then to implement g77's tan and atan intrinsics. - -2003-05-22 Bud Davis - - * com.c (ffecom_sym_transform_): Error out on unallocatable - storage after type is set. - -2003-05-18 Toon Moene - - * intdoc.in: Fix documentation of IDATE. - * intdoc.texi: Regenerate. - * news.texi: Update due to also fixing it in 3.3.1. - -2003-05-16 Wolfgang Bangerth - - * g77.texi: Remove most of the of the preface of the - bugs section. - -2003-05-15 Wolfgang Bangerth - - * g77.texi: Remove most of the bug reporting instructions and - merge them into bugs.html. - -2003-05-13 Zack Weinberg - - * com.c: Replace all calls to fatal_io_error with calls to - fatal_error; add ": %m" to the end of all the affected error - messages. - -2003-05-12 Zack Weinberg - - * bad.c: Don't call diagnostic_count_diagnostic. - -2003-05-12 Roger Sayle - - * com.c (ffecom_init_0): Define built-in functions for atan2, - exp, floor, fmod, log and pow. - (duplicate_decls): Preserve assembler name when redeclaring a - built-in. - * com-rt.def: Implement using the built-in forms of the above - functions rather than calling the standard C library directly. - Correct some of the run-time prototype "codes". - -2003-05-11 Toon Moene - - PR fortran/10726 - * intdoc.in: Fix documentation of IDATE. - * intdoc.texi: Regenerate. - * g77.texi: Document completion of INTEGER*n support. - * news.texi: Update due to the above. - -2003-05-08 Roger Sayle - - PR fortran/8485 - * target.h (FFETARGET_REAL_VALUE_FROM_INT_): Cast to - HOST_WIDE_INT instead of long. - (FFETARGET_REAL_VALUE_FROM_LONGLONG_): New macro. - (FFETARGET_LONGLONG_FROM_INTS_): New macro. - (ffetarget_convert_complex1_integer4): Implement. - (ffetarget_convert_complex2_integer4): Implement. - (ffetarget_convert_integer4_complex1): Implement. - (ffetarget_convert_integer4_complex2): Implement. - (ffetarget_convert_integer4_real1): Implement. - (ffetarget_convert_integer4_real2): Implement. - (ffetarget_convert_real1_integer4): Implement. - (ffetarget_convert_real2_integer4): Implement. - * com.c (ffecom_constantunion): Handle INTEGER*8. - (ffecom_constantunion_with_type): Likewise. - -2003-05-03 Nathan Sidwell - - * com.c (ffecom_do_entry_): Use location_t and input_location - directly. - (ffecom_gen_sfuncdef_): Likewise. - (ffecom_start_progunit_): Likewise. - (ffecom_sym_transform_): Likewise. - (ffecom_sym_transform_assign_): Likewise. - * lex.c (ffelex_hash_): Likewise. - (ffelex_include_): Likewise. - * std.c (ffestd_exec_begin): Likewise. - (ffestd_exec_end): Likewise. - * ste.c (struct gbe_block): Likewise. - (ffeste_start_block_): Likewise. - (ffeste_start_stmt_): Likewise. - -2003-05-03 Nathan Sidwell - - * ansify.c (die_unless): Revert lineno change here. - -2003-05-02 Nathan Sidwell - - * lex.c (ffelex_file_pop_): Adjust file_stack member use. - (ffelex_file_push_): Likewise. - (ffelex_hash_): Likewise. - -2003-05-01 Nathan Sidwell - - * ansify.c (die_unless): Rename lineno to input_line. - * com.c (ffecom_subscript_check_, ffecom_do_entry_, - ffecom_gen_sfuncdef_, ffecom_start_progunit_, - ffecom_sym_transform_, ffecom_sym_transform_assign_, - bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, - store_parm_decls): Likewise. - * intrin.c (ffeintrin_fulfill_generic): Likewise. - * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, - ffelex_file_fixed, ffelex_file_free): Likewise. - * std.c (ffestd_exec_end): Likewise. - * ste.c (ffeste_emit_line_note_, ffeste_start_block_, - ffeste_start_stmt_): Likewise. - * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. - - * lex.c (ffelex_file_pop_): Rename parameter from input_filename. - (ffelex_file_push_): Likewise. - - * ste.c (struct gbe_block): Rename field from input_filename. - (ffeste_start_block_, ffeste_start_stmt_): Likewise. - -2003-04-17 Roger Sayle - - PR c/10375 - * com.c (duplicate_decls): Preserve "const" and "noreturn" - function attributes. - -2003-04-13 Roger Sayle - - * com.c (duplicate_decls): Preserve pure and malloc attributes. - -2003-04-12 Zack Weinberg - - * com.c (ffecom_build_complex_constant_, ffecom_expr_) - (ffecom_init_zero_, ffecom_transform_namelist_, ffecom_vardesc_) - (ffecom_vardesc_array_, ffecom_vardesc_dims_, ffecom_2) - * ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_) - (ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_): - Use build_constructor. - -2003-04-11 Bud Davis - - PR Fortran/9263 - * gcc/f/data.c (ffedata_advance_): Check initial, final and - increment values for INTEGER typeness. - * gcc/f/news.texi: Document these fixes. - -2003-03-27 Steven Bosscher - - * ffe.texi: Don't mention dead file proj.c. - -2003-03-26 Roger Sayle - - PR fortran/9793 - * target.h (ffetarget_divide_integer1): Perform division by -1 - using negation to prevent possible overflow trap on the host. - -2003-03-25 Marcelo Abreu - - PR fortran/10204 - * ffe.texi: Reference the GCC web site in the URL. - -2003-03-24 Toon Moene - - PR fortran/10197 - * news.texi: Document PR fortran/10197 fixed. - -Sun Mar 23 23:43:45 2003 Mark Mitchell - - PR c++/7086 - * com.c (ffecom_sym_transform_): Adjust calls to - put_var_into_stack. - (ffe_mark_addressable): Likewise. - -2003-03-22 Bud Davis - - * com.c (ffecom_constantunion_with_type): New function. - * com.h (ffecom_constantunion_with_type): Declare. - * stc.c (ffestc_R810): Check for kind type. - * ste.c (ffeste_R810): Use ffecom_constantunion_with_type - to discern SELECT CASE variables. - -2003-03-15 Roger Sayle - - * stb.c (ffestb_R100110_): Allow the number before the X format - to be optional when not -fpedantic. - * std.c (ffestd_R1001dump_1010_3_): Delete unused static function. - (ffestd_R1001dump_): For the FFESTP_formattypeX case, call - ffestd_R1001dump_1010_2_ instead of ffestd_R1001dump_1010_3_. - -2003-03-15 Roger Sayle - - * f/ste.c (ffeste_R810): Fix whitespace. - -2003-03-15 Andreas Jaeger - - * g77spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove. - (DEFAULT_WORD_SWITCH_TAKES_ARG): Remove. - -2003-03-12 Nathanael Nerode - - * g77.texi, invoke.texi, g77spec.c, lang-specs.h: GCC, not - GNU CC. Especially here. - -2003-03-10 Roger Sayle - - * com.c (duplicate_decls): Synchronize with C's duplicate_decls. - -Sat Mar 8 21:11:40 2003 Neil Booth - - * com.c (ffe_init): Update prototype; move code to ffe_post_options. - (ffe_post_options): New. - -2003-03-04 Tom Tromey - - * Make-lang.in (f77.tags): New target. - -2003-02-20 Toon Moene - - * news.texi: Document fixing PR fortran/9038. - -2003-02-04 Joseph S. Myers - - * g77.texi, invoke.texi: Update to GFDL 1.2. - -2003-01-31 Toon Moene - - * news.texi: Document fixing PR fortran/7681 - and optimization/9258. - -2003-01-26 Toon Moene - - * lang-specs.h: Revoke change to (incorrectly) prohibit - passing -f options to cc1 when preprocessing. - * news.texi: Document this. - -Tue Jan 21 08:42:12 2003 Kaveh R. Ghazi - - Make-lang.in (f/sta.o-warn): Add -Wno-error. - -Thu Jan 16 10:53:16 2003 Kaveh R. Ghazi - - * Make-lang.in (f/target.o): Depend on toplev.h. - * target.c: Include toplev.h. - -Sat Jan 11 21:31:10 2003 Kaveh R. Ghazi - - * com.c (ffecom_convert_narrow_, ffecom_convert_widen_, - pushdecl_top_level, storedecls, convert, delete_block, - insert_block, ffe_init, ffe_mark_addressable, poplevel, - ffe_print_identifier, pushdecl, pushlevel, set_block, - ffe_signed_or_unsigned_type, ffe_signed_type, - ffe_truthvalue_conversion, ffe_type_for_mode, ffe_type_for_size, - ffe_unsigned_type, append_include_chain, open_include_file, - read_filename_string, read_name_map): Convert to ISO C style function - definitions. - * parse.c (ffe_parse_file): Likewise. - * top.c (ffe_is_digit_string_): Likewise. - -2003-01-09 Christian Cornelssen - - * Make-lang.in (f77.install-common, f77.install-info, - f77.install-man, f77.uninstall): Prepend $(DESTDIR) to - destination paths in all (un)installation commands. - -2003-01-05 Toon Moene - - * news.texi: Revise history again: - PR Fortran/9038 will be fixed in 3.4. - -2003-01-05 Toon Moene - - * news.texi: Update news to reflect reality: - PR Fortran/9038 won't be fixed until 3.4. - -2003-01-04 Toon Moene - - PR Fortran/9038 - * lang-specs.h: Remove -f options before preprocessing. - * news.texi: Document fixing of PR Fortran/9038. - -2003-01-03 Bud Davis - - * stc.c (ffestc_R810): Allow any kind integer in - case statements. - * ste.c (ffeste_R810): Give error message when - case selector exceeds its valid values. - -2003-01-01 Andreas Jaeger - - * f/Make-lang.in ($(srcdir)/f/BUGS): Add include path for - gcc-common.texi. - ($(srcdir)/f/NEWS): Likewise. - -2002-12-28 Joseph S. Myers - - * g77.texi: Use @copying. - -2002-12-23 Joseph S. Myers - - * root.texi: Include gcc-common.texi. - * bugs.texi, news.texi: Don't include root.texi as part of full - manual. - * g77.texi: Update for use of gcc-common.texi. - * Make-lang.in ($(srcdir)/f/g77.info, f/g77.dvi): Depend on - $(srcdir)/doc/include/gcc-common.texi. - -2002-12-19 Kazu Hirata - - * intdoc.in: Fix typos. - -2002-12-18 Kazu Hirata - - * g77.texi: Fix typos. - * intdoc.texi: Likewise. - * news.texi: Follow spelling conventions. - -Mon Dec 16 13:53:18 2002 Mark Mitchell - - * root.texi: Change version number to 3.4. - -2002-12-15 Zack Weinberg - - * target.h: Don't define HOST_WIDE_INT. - -2002-12-02 Nathanael Nerode - - * Make-lang.in, ansify.c, intdoc.c, proj.h: Replace hconfig.h with - bconfig.h. - * fini.c, proj.h: Replace USE_HCONFIG with USE_BCONFIG - -2002-11-30 Zack Weinberg - - * proj.h, ansify.c, g77spec.c, intdoc.c: - Include coretypes.h and tm.h. - * Make-lang.in: Update dependencies. - -2002-11-20 Toon Moene - - * invoke.texi: Explain the purpose of -fmove-all-movables, - -freduce-all-givs and -frerun-loop-opts better. - -2002-11-19 Nathanael Nerode - - * Make-lang.in: Correct BUILD/HOST confusion. - -2002-11-19 Toon Moene - - PR fortran/8587 - * news.texi: Show PR fortran/8587 fixed. - -2002-11-19 Jason Thorpe - - * g77spec.c (lang_specific_spec_functions): New. - -2002-11-02 Toon Moene - - * g77.texi: Correct documentation on generating C++ prototypes - of Fortran routines with f2c. - * news.texi: Document fixes in GCC-3.3, 3.2 and 3.1. - -2002-10-30 Roger Sayle - - * com.c (ffecom_subscript_check_): Cast the failure branch - of the bounds check COND_EXPR to void, to indicate noreturn. - (ffe_truthvalue_conversion): Only apply truth value conversion - to the non-void branches of a COND_EXPR. - -2002-10-26 Andris Pavenis - - * lang-specs.h: Fix ratfor specs. - -2002-10-15 Richard Henderson - - * target.h (ffetarget_print_real1, ffetarget_print_real2): Use - real_to_decimal directly, and with the new arguments. - -2002-09-23 Zack Weinberg - - * Make-lang.in (g77spec.o): Don't depend on f/version.h. - (f/parse.o): Depend on version.h not f/version.h. - (g77version.o, f/version.o): Delete all references. - - * com.c (ffecom_init_0): Fix transposed array indices in bsearch test. - * g77spec.c: Don't include f/version.h or refer to ffe_version_string. - * parse.c: Use version_string, not ffe_version_string. - * version.c, version.h: Delete files. - -2002-09-23 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.0: Likewise. - * com.c: Likewise. - * ffe.texi: Likewise. - * g77.texi: Likewise. - * intdoc.in: Likewise. - * invoke.texi: Likewise. - * news.texi: Likewise. - * intdoc.texi: Regenerate. - -2002-09-16 Geoffrey Keating - - * com.c (union lang_tree_node): Add chain_next option. - -2002-09-16 Richard Henderson - - * target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_ - directly to ffetarget_make_real1. - (ffetarget_real2): Similarly. - * target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_, - ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify. - -2002-09-15 Kazu Hirata - - * intdoc.texi: Regenerate. - -2002-09-15 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * intdoc.in: Likewise. - -2002-09-09 Gerald Pfeifer - - Fix PR web/7596: - * ffe.texi (Front End): Fix broken links. - * bugs.texi (Known Bugs): Refer to gcc.gnu.org instead of - www.gnu.org for onlinedocs. - * news.texi (News): Ditto. - -2002-09-07 Jan Hubicka - - * com.c (ffe_type_for_mode): Handle long double. - -2002-09-04 Richard Henderson - - * target.h (ffetarget_print_real1, ffetarget_print_real2): Update - call to REAL_VALUE_TO_DECIMAL. - -2002-08-31 Toon Moene - - * com.c: Don't set flag_finite_math_only by default. - * invoke.texi: Reverse the documentation of option - -ffinite-math-only to reflect the new default. - -2002-08-30 Hans-Peter Nilsson - - * target.c (ffetarget_memcpy_): Don't test nonexistent - HOST_BYTES_BIG_ENDIAN, HOST_BITS_BIG_ENDIAN. Check - HOST_WORDS_BIG_ENDIAN against both WORDS_BIG_ENDIAN and - BYTES_BIG_ENDIAN. - -2002-08-30 Alan Modra - - * target.h (FFETARGET_32bit_longs): Don't define for powerpc64 or - mmix. - -2002-08-28 Joseph S. Myers - - * bugs.texi, news.texi: Update URLs for online news and bugs - lists. - -2002-08-22 Hans-Peter Nilsson - - * where.h (struct _ffewhere_file_): Mark GTY. - (ffewhere_file_kill): Remove prototype. - * where.c: Include ggc.h. - (struct _ffewhere_ll_, struct _ffewhere_root_ll_): Mark GTY. - (ffewhere_root_ll_): Ditto. Change type from struct - _ffewhere_root_ll_ to struct _ffewhere_root_ll_*. All uses - changed. - (ffewhere_file_kill): Remove. - (ffewhere_file_new): Use GC to allocate ffewhereFile objects. - (ffewhere_file_set): Use GC to allocate ffewhereLL_ objects. - (ffewhere_init_1): Use GC to allocate ffewhere_root_ll_ sentinel. - Include gt-f-where.h. - * lex.c (ffelex_current_wf_, ffelex_include_wherefile_): Mark GTY. - Include gt-f-lex.h. - * std.c (ffestd_S3P4): Don't call ffewhere_file_kill. - * config-lang.in (gtfiles): Add f/where.h f/where.c and f/lex.c. - * Make-lang.in (gt-f-lex.h gt-f-where.h): Add to dependents of - s-gtype. - (f/lex.o): Depend on gt-f-lex.h. - (f/where.o): Depend on gt-f-where.h. - -Tue Aug 20 16:49:40 2002 Kaveh R. Ghazi - - * where.c (ffewhere_track): Remove impossible if-then clause. - -Thu Aug 8 10:06:14 2002 Nathan Sidwell - - * f/Make-lang.in (f.mostlyclean): Remove coverage files. - -2002-08-06 Gerald Pfeifer - - * g77.texi (Top): Rename Index to Keyword Index. - -2002-08-05 Toon Moene - - * invoke.texi: Improve description of - -fno-finite-math-only flag. - -Sun Aug 4 16:45:49 2002 Joseph S. Myers - - * root.texi (version-gcc): Increase to 3.3. - -2002-07-30 Toon Moene - - * com.c (ffe_init_options): Set - flag_finite_math_only. - * invoke.texi: Document -fno-finite-math-only. - -Mon Jul 29 22:05:35 2002 Kaveh R. Ghazi - - * com.c (read_name_map): Use concat in lieu of xmalloc/strcpy. - -2002-07-25 Toon Moene - - * news.texi: Document better handling of (no-)alias - information of dummy arguments and induction variables - on loop unrolling. - -2002-07-01 Roger Sayle - - * f/com.c (builtin_function): Accept additional parameter. - (ffe_com_init_0): Pass an additional NULL_TREE argument to - builtin_function. - -2002-06-28 Toon Moene - - * news.texi: Mention 2 Gbyte limit on 32-bit targets - for arrays explicitly in news on g77-3.1. - -Thu Jun 20 21:56:34 2002 Neil Booth - - * lang-specs.h: Use cc1 for traditional preprocessing. - -2002-06-20 Andreas Jaeger - - * com.c (ffecom_prepare_expr_,ffecom_expr_power_integer_): - Remove #ifdefed HAHA sections. - -2002-06-20 Nathanael Nerode - - * com.c: Remove #ifdef HOHO sections. - -2002-06-17 Jason Thorpe - - * bit.c: Don't include glimits.h. - * target.c: Likewise. - * where.h: Likewise. - -2002-06-12 Gabriel Dos Reis - - * bad.c (ffebad_start_): Adjust calls to diagnostic_count_error. - -2002-06-04 Gabriel Dos Reis - - * bad.c (ffebad_start_): Adjust call to count_error. - * Make-lang.in (f/bad.o): Depend on diagnostic.h - * bad.c: #include diagnostic.h - -2002-06-03 Geoffrey Keating - - * Make-lang.in (f/com.o): Depend on debug.h. - * com.c: Include debug.h. - (LANG_HOOKS_MARK_TREE): Delete. - (struct lang_identifier): Use gengtype. - (union lang_tree_node): New. - (struct lang_decl): New dummy definition. - (struct lang_type): New dummy definition. - (ffe_mark_tree): Delete. - - * com.c (struct language_function): New dummy structure. - - * Make-lang.in: Add rules to generate gt-f-ste.h gtype-f.h; allow - for filename changes. - (com.o): Allow for filename changes; add gtype-f.h as dependency. - (ste.o): Add gt-f-ste.h as dependency. - * config-lang.in (gtfiles): Add com.h, ste.c. - * com.c: Replace uses of ggc_add_* with GTY markers. Include - gtype-f.h. - (mark_binding_level): Delete. - * com.h: Replace uses of ggc_add_* with GTY markers. - * ste.c: Replace uses of ggc_add_* with GTY markers. Include - gt-f-ste.h. - - * Make-lang.in (f/gt-com.h): Build using gengtype. - (com.o): Depend on f/gt-com.h. - * com.c: Rename struct binding_level to f_binding_level. - (struct f_binding_level): Use gengtype. - (struct tree_ggc_tracker): Use gengtype. - (mark_tracker_head): Use gt_ggc_m_tree_ggc_tracker. - (make_binding_level): Use GGC. - (mark_binding_level): Use gt_ggc_m_f_binding_level. - (ffecom_init_decl_processing): Change free_binding_level - to a deletable root. - * config-lang.in (gtfiles): Define. - * where.c: Strings need no longer be allocated in GCable memory; - remove my change of 30 Dec 1999. - -2002-05-31 Matthew Woodcraft - - * lang-specs.h: Use cpp_debug_options. - -2002-05-28 Zack Weinberg - - * bld.c, com.c, expr.c, target.c: Include real.h. - * Make-lang.in: Update dependency lists. - -2002-05-16 Rainer Orth - - * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. - -2002-05-09 Hassan Aurag - - * expr.c (ffeexpr_reduced_ugly2log_): Allow logicals-as-integers - under -fugly-logint as arguments of .and., .or., .xor. - -2002-05-07 Jan Hubicka - - * target.h (FFETARGET_32bit_longs): Undefine for x86-64. - -2002-04-29 Joseph S. Myers - - * invoke.texi: Use @gol at ends of lines inside @gccoptlist. - * g77.texi: Update last update date. - -Thu Apr 25 07:44:44 2002 Neil Booth - - * com.h (ffe_parse_file): Update. - * lex.c (ffe_parse_file): Update. - -2002-04-20 Toon Moene - - * root.texi: Remove variable version-g77. - * g77.texi: Remove the single use of that variable. - -Thu Apr 18 19:10:44 2002 Neil Booth - - * com.c (incomplete_type_error): Remove. - -Tue Apr 16 14:55:47 2002 Mark Mitchell - - * com.c (ffecom_expr_power_integer): Add has_scope argument to - call to expand_start_stmt_expr. - -Mon Apr 15 10:59:14 2002 Mark Mitchell - - * g77.texi: Remove Chill reference. - -2002-04-13 Toon Moene - - * news.texi: Deprecate frontend version number; - update list of fixed bugs. - -2002-04-08 Hans-Peter Nilsson - - * Make-lang.in (f/target.o): Depend on diagnostic.h. - * target.c: Include diagnostic.h. - (ffetarget_memcpy_): Call sorry if host and target endians are - not matching. - -Thu Apr 4 23:29:48 2002 Neil Booth - - * com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. - (truthvalue_conversion): Rename. Update. Make static. - (ffecom_truth_value): Update. - -Mon Apr 1 21:39:36 2002 Neil Booth - - * com.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. - (mark_addressable): Rename. - (ffecom_arrayref_, ffecom_1): Update. - -Mon Apr 1 09:59:53 2002 Neil Booth - - * com.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, - LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. - (unsigned_type, signed_type, signed_or_unsigned_type): Rename. - -Sun Mar 31 23:50:22 2002 Neil Booth - - * com.c (lang_print_error_function): Rename. - (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. - (ffe_init): Don't set hook. - -Fri Mar 29 21:59:15 2002 Neil Booth - - * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): - Redefine. - (type_for_mode, type_for_size): Rename. - (signed_or_unsigned_type, signed_type, truthvalue_conversion, - unsigned_type): Use new hooks. - -Tue Mar 26 10:30:05 2002 Andrew Cagney - - * invoke.texi (Warning Options): Mention -Wswitch-enum. - Fix PR c/5044. - -Tue Mar 26 07:30:51 2002 Neil Booth - - * com.c (LANG_HOOKS_MARK_TREE): Redefine. - (lang_mark_tree): Rename ffe_mark_tree, make static. - -Mon Mar 25 19:27:11 2002 Neil Booth - - * com.c (maybe_build_cleanup): Remove. - -2002-03-23 Toon Moene - - * com.c (ffecom_check_size_overflow_): Add a test - so that arrays too large for 32-bit byte-offset - addressing get caught. - * news.texi: Document the fixing of this problem. - -Sat Mar 23 11:18:17 2002 Andrew Cagney - - * invoke.texi (Warning Options): Mention -Wswitch-default. - -Thu Mar 21 18:55:41 2002 Neil Booth - - * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, - insert_block, getdecls, global_bindings_p): New. - -Wed Mar 20 08:03:42 2002 Neil Booth - - * com.c (lang_printable_name): Rename. - (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. - (ffe_init): Don't use old hook. - -Sun Mar 17 18:50:15 2002 Kaveh R. Ghazi - - * com.h (ffe_parse_file): Prototype. - -Sun Mar 17 20:57:30 2002 Neil Booth - - * com.c (LANG_HOOKS_PARSE_FILE): Redefine. - * com.h (ffe_parse_file): New. - * parse.c (NAME_OF_STDIN): Remove. - (yyparse): Rename ffe_parse_file. - -Tue Mar 12 20:23:18 2002 Kaveh R. Ghazi - - * com.c (tree_code_type, tree_code_length, tree_code_name): - Define. - -Sun Mar 10 12:37:42 2002 Kaveh R. Ghazi - - * target.c (ffetarget_print_hex): Const-ify. - -2002-03-06 Phil Edwards - - * version.c: Fix misplaced leading blanks on first line. - -2002-03-03 Zack Weinberg - - * com.c, target.h: Remove all #ifndef REAL_ARITHMETIC - blocks, make all #ifdef REAL_ARITHMETIC blocks unconditional. - Delete some further #ifdef blocks predicated on REAL_ARITHMETIC. - -Thu Feb 28 07:53:46 2002 Neil Booth - - * com.c (copy_lang_decl): Delete. - -2002-02-27 Zack Weinberg - - * com.c, lex.c, top.c: Delete traditional-mode-related code - copied from the C front end but not used, or used only to - permit the compiler to link. - -2002-02-13 Toon Moene - - * news.texi: List Problem Reports fixed in 3.1. - -2002-02-13 Toon Moene - - * data.c (ffedata_eval_offset_): Only convert index, - low and high bound in data statements to default integer - if they are constants. Use a copy of the data structure. - -2002-02-09 Toon Moene - - * data.c (ffedata_eval_offset_): Convert non-default integer - constants to default integer kind if necessary. - -2002-02-09 Toon Moene - - * invoke.texi: Add a short debugging session - as an example to the documentation of -g. - -2002-02-06 Toon Moene - - PR fortran/4730 fortran/5473 - * com.c (ffecom_expr_): Deal with %VAL constructs. - * intrin.c (ffeintrin_check_): Handle 'N' constraints for intrinsics, - to indicate "no larger than default kind" integers and logicals. - * intrin.def: Use 'N' constraints in table of intrinsics. - * intdoc.c: Document this constraint. - * intdoc.texi: Regenerated. - -2002-02-04 Philipp Thomas - - * implic.c lex.c stb.c ste.c stu.c: Update copyright dates. - -2002-02-04 Philipp Thomas - - * bad.def com.c expr.c implic.c lex.c stb.c ste.c stu.c: - Insert comments to mark messages as not being printf style - where appropriate. - -2002-02-03 Toon Moene - - * expr.c (ffeexpr_sym_impdoitem_): Allow other than - default INTEGER implied-do loop counts. - -2002-02-01 Toon Moene - - * bad.def: Remove non-historical reference to version 0.6. - * bugs.texi: Ditto. - * com.c: Ditto. - * ffe.texi: Ditto. - * proj.h: Ditto. - * g77.texi: Ditto. - -2002-01-31 Joseph S. Myers - - * g77spec.c (lang_specific_driver): Follow GNU Coding Standards - for --version. - -2002-01-30 Richard Henderson - - * ste.c (ffeste_begin_iterdo_): Use expand_exit_loop_top_cond. - (ffeste_R819B): Likewise. - -2002-01-30 Toon Moene - - * intrin.c (upcasecmp_): New function. - (ffeintrin_cmp_name_): Use it to correctly compare name - and table entry for bsearch. - -2002-01-26 Toon Moene - - * intrin.c (ffeintrin_cmp_name_): Correct comparison - for intrinsics in intrinsic table (intrin.def). - -2002-01-22 Zack Weinberg - - * bad.c: Include intl.h. - (FFEBAD_MSGS1, FFEBAD_MSGS2): Replace by FFEBAD_MSG, SHORT, - LONG. Adjust definitions to work with exgettext. - (ffebad_start_): Translate all error messages. - (ffebad_finish): Mark constant strings for translation. - * bad.h: Use FFEBAD_MSG. Adjust prototype of ffebad_start_ - and definitions of ffebad_start_msg, ffebad_start_msg_lex to - work with exgettext. - * bad.def: Use FFEBAD_MSG, SHORT, LONG throughout. - - * com.c: Include intl.h. - (lang_print_error_function): Always use ffeinfo_kind_message - to get the kind label for a non-nested construct. Translate - it. Translate constant strings. - * info.c (FFEINFO_KIND): Adjust definition to work with exgettext. - * info-k.def: Block xgettext from slurping copyright notice - into gcc.pot. Adjust strings for their sole use, in com.c. - - * Make-lang.in (f/bad.o, f/com.o): Depend on intl.h. - -2002-01-14 David Billinghurst - - PR fortran/3807 - * f/intrin.c (ffeintrin_check_): Allow for case of intrinsic - control string have COL-spec an integer > 0. - -2002-01-08 Joseph S. Myers - - * g77spec.c (lookup_option): Handle -fversion. - (lang_specific_driver): Update copyright date in --version output. - -Mon Jan 7 00:03:42 2002 Gerald Pfeifer - - * invoke.texi: Markup g77 as @command. Remove reference to - http://gcc.gnu.org/thanks.html. - -Wed Jan 2 18:13:11 2002 Kaveh R. Ghazi - - * com.c (clear_binding_level): Const-ify. - (ffecom_arglist_expr_): Likewise. - * info.c (ffeinfo_types_): Don't needlessly zero init. - * lex.c (ffelex_hash_kludge): Const-ify. - -Sun Dec 23 10:45:09 2001 Kaveh R. Ghazi - - * com.c (ffecom_gfrt_volatile_, ffecom_gfrt_complex_, - ffecom_gfrt_const_, ffecom_gfrt_type_): Const-ify. - -Sat Dec 22 16:01:51 2001 Kaveh R. Ghazi - - * bld.c (ffebld_arity_op_): Declare array size explicitly. - * bld.h (ffebld_arity_op_): Likewise. - -2001-12-20 Joseph S. Myers - - * config-lang.in (diff_excludes): Remove. - -2001-12-17 Joseph S. Myers - - * g77.texi, invoke.texi: Update links to GCC manual. - -Sun Dec 16 16:08:57 2001 Joseph S. Myers - - * news.texi: Fix spelling errors. - -Sun Dec 16 10:36:51 2001 Kaveh R. Ghazi - - * Make-lang.in (f/version.o): Depend on f/version.h. - * version.c: Include ansidecl.h and f/version.h. - -Sun Dec 16 08:52:48 2001 Kaveh R. Ghazi - - * lex.c (ffelex_backslash_, ffelex_cfebackslash_): Use hex_value. - * target.c (ffetarget_integerhex, ffetarget_typeless_hex): Use - hex_p/hex_value. - -2001-12-14 Roger Sayle - - * com-rt.def: Use __builtin_sqrt instead of __builtin_fsqrt. - * com.c (ffecom_init_0): Same, and fixed enumeration usage. - -2001-12-10 Joseph S. Myers - - * g77.texi: Don't condition menus on @ifinfo. - -Wed Dec 5 06:49:21 2001 Richard Kenner - - * com.c (ffecom_1): Properly handle TREE_READONLY for INDIRECT_REF. - -Mon Dec 3 18:56:04 2001 Neil Booth - - * com.c: Remove leading capital from diagnostic messages, as - per GNU coding standards. - * g77spec.c: Similarly. - * lex.c: Similarly. - -2001-12-01 Zack Weinberg - - * f/fini.c: Use xmalloc. - -Fri Nov 30 20:54:02 2001 Kaveh R. Ghazi - - * Make-lang.in: Delete references to proj.[co], proj-h.[co]. - * proj.c: Delete file. - -2001-11-29 Zack Weinberg - - * Make-lang.in (f/fini, f/intdoc): Depend on $(HOST_LIBDEPS) - and link with $(HOST_LIBS), not safe-ctype.o. - -2001-11-29 Joseph S. Myers - - * Make-lang.in (f77.generated-manpages): New target. - ($(srcdir)/f/g77.1): Don't check $(GENERATED_MANPAGES). Allow - manpage generation to fail. - (f77.info): Don't depend on $(srcdir)/f/g77.1. - (f77.install-man): Depend on $(GENERATED_MANPAGES) rather than - directly on $(srcdir)/g77.1. - -2001-11-24 Toon Moene - - PR fortran/3957 - * lang-specs.h: Correct !pipe conditional in tradcpp0 invocation. - -2001-11-21 Toon Moene - - * g77.texi: egcs was not a `@command'. - * invoke.texi: Ditto. - * news.texi: Substitute `@command' for `@code' - and `@option' for `@samp' where appropriate. - -2001-11-19 Loren J. Rittle - - * Make-lang.in: Complete ``Build g77.1 in $(srcdir)''. - -2001-11-19 Geoffrey Keating - - * g77spec.c (lang_specific_driver) [ENABLE_SHARED_LIBGCC]: Add - libgcc_s.so if libf2c is used. - * Make-lang.in (g77spec.o): Use DRIVER_DEFINES. - -2001-11-19 Toon Moene - - * .cvsignore: Ignore g77.1 - * g77.texi: Substitute `@command' for `@code' - where appropriate. - * invoke.texi: Ditto. - -2001-11-18 Toon Moene - - * Make-lang.in: Remove all references to LANGUAGES - and the stamp files that depend on its value. - -Sun Nov 18 11:13:04 2001 Neil Booth - - * com.c (finish_parse): Remove. - (ffe_finish): Move body of finish_parse. - -Thu Nov 15 10:06:38 2001 Neil Booth - - * com.c (ffecom_init_decl_processing): Renamed from - init_decl_processing. - (init_parse): Move contents to ffe_init. - (ffe_init): Update prototype. - -2001-11-14 Toon Moene - - * g77.texi: Update to use `@command', `@option. - * invoke.texi: Ditto - -2001-11-14 Joseph S. Myers - - * Make-lang.in: Change all uses of $(manext) to $(man1ext). - -2001-11-14 Toon Moene - - * g77.1: Remove from CVS. - * Make-lang.in: Build g77.1 in $(srcdir). - Add --section=1 to POD2MAN command line. - * invoke.texi: Correct copyright years. - Add more sections to man page. Add GFDL. - -Fri Nov 9 23:16:45 2001 Neil Booth - - * com.c (ffe_print_identifier): Rename. - (LANG_HOOKS_PRINT_IDENTIFIER): Override. - (lang_print_xnode, print_lang_decl, print_lang_statistics, - print_lang_type, set_yydebug): Remove. - -2001-11-09 Zack Weinberg - - * g77spec.c (lang_specific_driver): Adjust behavior of -v and - --version for consistency with other front ends. Remove large - #if 0 block. Do not add libraries to argv if there are no - input files. - (add_version_magic): Delete all references and dependent code. - * lang-options.h: Delete -fnull-version. - * lang-specs.h: Delete f77-version spec. - - * lex.c: Delete logic conditional on ffe_is_null_version() and - now-unused label. - * top.c: Delete ffe_is_null_version_ variable. - (ffe_decode_option): Delete -fnull-version case. - * top.h: Delete declaration of ffe_is_null_version_ and - ffe_is_null_version(), ffe_set_is_null_version() macros. - -Fri Nov 9 07:14:47 2001 Neil Booth - - * com.c (language_string, lang_identify): Remove. - (struct lang_hooks): Constify. - (LANG_HOOKS_NAME): Override. - (init_parse): Update. - -2001-11-08 Andreas Franck - - * Make-lang.in (G77_INSTALL_NAME, G77_CROSS_NAME): Handle - program_transform_name the way suggested by autoconf. - -2001-11-08 Toon Moene - - * Make-lang.in: Add rules for building g77.1. - * invoke.texi: Add man page stuff. Move indexing - from g77.texi to here. - * g77.texi: Remove indexing specific to invoke.texi. - * news.texi: Document that g77.1 is now a generated - file. - -Tue Nov 6 21:17:47 2001 Neil Booth - - * com.c: Include langhooks-def.h. - * Make-lang.in: Update. - -2001-11-04 Toon Moene - - * g77.texi: Split off invoke.texi (preliminary to using it - to generate a man page). - * Make-lang.in: Reflect in build rules. - -Fri Nov 2 10:51:34 2001 Kaveh R. Ghazi - - * com.c (ffecom_initialize_char_syntax_, U_CHAR, is_idchar, - is_idstart, is_hor_space, is_space, SKIP_WHITE_SPACE, - SKIP_ALL_WHITE_SPACE): Delete. - (read_filename_string, read_name_map): Don't use is_space or - is_hor_space. - -2001-10-29 Toon Moene - - * news.texi: Document new ability to compile programs with - arrays larger than 512 Mbyte on 32-bit targets. - -2001-10-24 Toon Moene - - * com.c (ffecom_check_size_overflow_): Only check for TREE_OVERFLOW. - -Tue Oct 23 14:01:27 2001 Richard Kenner - - * com.c (LANG_HOOKS_GET_ALIAS_SET): New macro. - (lang_get_alias_set): Delete. - -2001-10-23 Joseph S. Myers - - * g77.texi (Sending Patches): Remove. - -2001-10-22 Zack Weinberg - - * Make-lang.in (f/intdoc): Depend on safe-ctype.o. - -Sun Oct 21 17:28:17 2001 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Use safe-ctype macros and/or fold extra - calls into fewer ones. - * implic.c (ffeimplic_lookup_): Likewise. - * intdoc.c (dumpimp): Likewise. - * intrin.c (ffeintrin_init_0): Likewise. - * lex.c (ffelex_backslash_, ffelex_cfebackslash_, ffelex_hash_): - Likewise. - * lex.h (ffelex_is_firstnamechar): Likewise. - * target.c (ffetarget_integerhex): Likewise. - -2001-10-21 Craig Prescott - - * target.h (FFETARGET_32bit_longs): Don't define - for 64-bit hppa. - -2001-10-17 Richard Henderson - - * std.c (ffestd_labeldef_format): Fix variable/stmt ordering. - (ffestd_R737A): Likewise. - -2001-10-17 Richard Henderson - - * com.h: Remove FFECOM_targetCURRENT, FFECOM_ONEPASS, BUILT_FOR_270, - BUILT_FOR_280, FFECOM_GCC_INCLUDE, all derivitive defines, and all - related conditional compilation directives. - * bad.c, bld.c, bld.h, com.c, equiv.c, equiv.h, global.h, intdoc.c, - intrin.c, intrin.h, lex.c, parse.c, sta.c, std.c, ste.c, ste.h, stt.c, - stt.h, stw.h, symbol.c, symbol.h, target.h, top.c: Likewise. - -2001-10-17 Richard Henderson - - * Make-lang.in (f/com.o): Depend on langhooks.h. - * com.c: Include it. - (LANG_HOOKS_INIT, LANG_HOOKS_FINISH): New. - (LANG_HOOKS_INIT_OPTIONS, LANG_HOOKS_DECODE_OPTION): New. - (lang_hooks): Use LANG_HOOKS_INITIALIZER. - -Sun Oct 7 12:27:54 2001 Kaveh R. Ghazi - - * bad.c (_ffebad_message_, ffebad_messages_): Const-ify. - * bld.c (ffebld_arity_op_): Likewise. - * bld.h (ffebld_arity_op_): Likewise. - * com.c (ffecom_init_0): Likewise. - * intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, names, gens, imps, specs, cc_pair, - cc_descriptions, cc_summaries): Likewise. - * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_, - ffeintrin_imps_, ffeintrin_specs_): Likewise. - -2001-10-05 Toon Moene - - * news.texi: Document libf2c being built as a shared library. - Use of array elements in bounds of adjustable arrays ditto. - -2001-10-03 Toon Moene - - * Make-lang.in: Remove reference to FORTRAN_INIT. - * g77spec.c: Add reference to FORTRAN_INIT. - -2001-09-29 Juergen Pfeifer - - Make libf2c a shared library. - - * Make-lang.in: Pass define of frtbegin.o to compilation of g77spec.c. - * g77spec.c (lang_specific_driver): Treat linking in of frtbegin.o. - -2001-09-28 Robert Anderson - - * expr.c (ffeexpr_sym_rhs_dimlist_): Allow array elements - as bounds of adjustable arrays. - -Thu Sep 20 15:05:20 JST 2001 George Helffrich - - * com.c (ffecom_subscript_check_): Loosen subscript checking rules - for character strings, to permit substring expressions like - string(1:0). - * news.texi: Document this as a new feature. - -Thu Sep 13 10:33:27 2001 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Const-ification and/or static-ization. - * intrin.c (ffeintrin_cmp_name_): Likewise. - * stc.c (ffestc_R904): Likewise. - -Wed Sep 12 12:09:04 2001 Kaveh R. Ghazi - - * bld.c (ffebld_op_string_): Const-ification. - * com.c (ffecom_gfrt_name_, ffecom_gfrt_argstring_): Likewise. - * fini.c (xspaces): Likewise. - * global.c (ffeglobal_type_string_): Likewise. - * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, - ffeinfo_kind_string_, ffeinfo_kindtype_string_, - ffeinfo_where_string_): Likewise. - * lex.c (ffelex_type_string_): Likewise. - * malloc.c (malloc_types_): Likewise. - * stc.c (ffestc_subr_binsrch_, ffestc_R904, ffestc_R904, - ffestc_R907): Likewise. - * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_): - Likewise. - * version.c (ffe_version_string): Likewise. - * version.h (ffe_version_string): Likewise. - -2001-09-11 Richard Henderson - - * parse.c (finput): Mark extern. - -2001-09-11 Jakub Jelinek - - * com.c (ffe_init_options): Default to -fmerge-all-constants - if optimizing. - -2000-08-14 Ulrich Weigand - - * target.h (FFETARGET_32bit_longs): Don't define - for 64-bit S/390. - -2001-07-20 Toon Moene - - * com.c (ffecom_expr_intrinsic_): - case FFEINTRIN_impIBITS: Remove TREE_SHIFT_FULLWIDTH define. - case FFEINTRIN_impISHFT: Ditto. Change LT_EXPR to NE_EXPR. - case FFEINTRIN_impISHFTC: Ditto. - case FFEINTRIN_impMVBITS: Ditto. - -2001-07-19 Jakub Jelinek - - * top.c (ffe_decode_option): Disallow lang-independent processing - for -ffixed-form. - -2001-07-19 Toon Moene - - * f/com.c (ffecom_expr_intrinsic_): Deal (correctly) with - {L|R}SHIFT_EXPR not working when shift > size of type. - -2001-07-17 Toon Moene - - * com.c (lang_print_error_function): Argument context - is unused. - -2001-07-14 Tim Josling - - * com.c (ffecom_overlap_): Remove references to EXPON_EXPR. - (ffecom_tree_canonize_ref_): Likewise. - -2001-07-10 James Smaby - - * intdoc.in: Fix the definition of COMPLEX ABS. - Remove `the' where inappropriate. - * intdoc.texi: Rebuilt. - -2001-07-04 Joseph S. Myers - - * g77.texi: Use gpl.texi and funding.texi. Remove Look and Feel - section. Add Funding Free Software to invariant sections. - * Make-lang.in ($(srcdir)/f/g77.info, f/g77.dvi): Update - dependencies and use doc/include in search path. - -2001-06-28 Gabriel Dos Reis - - * Make-lang.in (f/com.o): Depend on diagnostic.h - * com.c: #include diagnostic.h - (lang_print_error_function): Take a 'diagnostic_context *'. - -Wed Jun 13 11:22:39 2001 Mark Mitchell - - * BUGS: Remove. - * NEWS: Likewise. - -2001-06-10 Toon Moene - - * g77install.texi: Remove. - * Make-lang.in: Remove all mention of g77install.texi. - * g77.texi: Add documentation on how to get output always - flushed and how to increase the maximum unit number. - Remove all mention of g77install.texi. - * bugs.texi: Add documentation on how to change the threshold - for putting local arrays on the stack. - -2001-06-03 Toon Moene - - * root.texi: Fix typo in patches e-mail address. - -2001-06-03 Toon Moene - Jan van Male - - * root.texi: Define `help' and `patches' mailing list - addresses. - * news.texi: Remove `prerelease' from 0.5.26 - * g77.texi: Use two spaces between command options, eliminate - some 'overfull hboxes'. Use help and patches mailing list - addresses where appropriate. - -2001-06-02 Joseph S. Myers - - * g77.texi: Move contents to just after title page. - -2001-06-02 Toon Moene - - * com.c (ffecom_init_0): Make CHARACTER*1 unsigned. - -2001-05-23 Theodore Papadopoulo - - * Make-lang.in ($(srcdir)/f/g77.info): Added dependencies on - fdl.texi. - (f/g77.dvi): Use TEXI2DVI instead of custom tex calls. Create the - dvi file in the f directory. - -2001-05-25 Sam TH - - * bad.h: Fix header include guards. - * bit.h bld.h com.h data.h equiv.h expr.h global.h - implic.h info.h intrin.h lab.h lex.h malloc.h name.h - proj.h src.h st.h sta.h stb.h stc.h std.h ste.h - storag.h stp.h str.h sts.h stt.h stu.h stv.h stw.h - symbol.h target.h top.h type.h version.h - where.h: Likewise. - -2001-05-22 Toon Moene - - * g77.texi: Update last-changed date. - * news.texi: Update copyright years, last-changed date. - * bugs.texi: Update copyright years, last-changed date. - -2001-05-22 Toon Moene - - * g77.texi: Update maintenance information for - GNU Fortran. Remove all mention of -fdebug-kludge. - * news.texi: Make more news in 0.5.26 `user visible - changes'. Acknowledge work by important contributors. - * bugs.texi: Remove all mention of -fdebug-kludge. - -2001-05-20 Joseph S. Myers - - * Make-lang.in (f/g77.dvi): Include $(srcdir) in TEXINPUTS. - -2001-05-19 Toon Moene - - * Make-lang.in: Have $(MAKEINFO) look into the parent - directory for includes. - * g77.texi: Use the GFDL. - -Sun May 13 12:25:06 2001 Mark Mitchell - - * Make-lang.in: Replace all uses of `touch' with $(STAMP). - -Wed May 2 10:20:08 2001 Kaveh R. Ghazi - - * com.c: NULL_PTR -> NULL. - -Sun Apr 22 20:18:01 2001 Kaveh R. Ghazi - - * com.c (ffecom_subscript_check_): Use concat in lieu of - xmalloc/sprintf. - -2001-04-21 Toon Moene - - * news.texi: Update release information for 0.5.27. - -Thu Apr 19 12:49:24 2001 Mark Mitchell - - * top.c (ffe_decode_option): Do not permit language-independent - processing for -ffixed-line-length. - -Thu Apr 12 17:57:55 2001 Kaveh R. Ghazi - - * bad.c (inhibit_warnings): Delete redundant declaration. - - * com.c (skip_redundant_dir_prefix): Likewise. - - * com.h (mark_addressable): Likewise. - -2001-04-02 Jakub Jelinek - - * lex.c (ffelex_hash_): Avoid eating one whole line after - #line. - -Mon Apr 2 22:38:09 2001 Toon Moene - - * com.c (duplicate_decls): Fix thinko in lazy DECL_RTL patch - of 2001-03-04. - -Tue Mar 27 17:40:08 2001 Kaveh R. Ghazi - - * Make-lang.in: Depend on $(SYSTEM_H), not system.h. - -Mon Mar 26 18:13:30 2001 Mark Mitchell - - * com.c (duplicate_decls): Don't copy DECL_FRAME_SIZE. - -Mon Mar 19 15:05:39 2001 Mark Mitchell - - * com.c (builtin_function): Use SET_DECL_ASSEMBLER_NAME. - -Wed Mar 14 09:29:27 2001 Mark Mitchell - - * com.c (ffecom_member_phase_2): Use COPY_DECL_RTL, - DECL_RTL_SET_P, etc. - (duplicate_decls): Likewise. - (start_decl): Likewise. - -Fri Mar 9 22:52:55 2001 Kaveh R. Ghazi - - * fini.c (main): Use really_call_malloc, not malloc. - -Thu Mar 8 13:27:47 2001 Kaveh R. Ghazi - - * com.c: Don't rely on the POSIX macro to define autoconf stuff. - -2001-03-07 Brad Lucier - - * g77.texi: Document new options -funsafe-math-optimizations - and -fno-trapping-math. Revise documentation for -ffast-math. - -2001-03-01 Zack Weinberg - - * proj.h: Delete 'bool' type. Don't include stddef.h here. - * com.c: Rename variables named 'true' and/or 'false'. - * intdoc.c: Delete 'bool' type. - -2001-03-01 Zack Weinberg - - * lang-specs.h: Add zero initializer for cpp_spec field to all - array elements. - -2001-02-24 Zack Weinberg - - * com.c: Don't define STDC_HEADERS, autoconf handles it. - -Fri Feb 23 15:28:39 2001 Richard Kenner - - * com.c (set_block): Set NAMES and BLOCKS from BLOCK. - -2001-02-19 Joseph S. Myers - - * version.c, root.texi: Update GCC version number to 3.1. Update - G77 version number to 0.5.27. - * BUGS, NEWS: Regenerate. - -Sun Feb 4 15:52:44 2001 Richard Kenner - - * com.c (ffecom_init_0): Call fatal_error instead of fatal. - * com.c (init_parse): Call fatal_io_error instead of - pfatal_with_name. - (ffecom_decode_include_option_): Make errors non-fatal. - * lex.c (ffelex_cfelex_, ffelex_get_directive_line_): Likewise. - (ffelex_hash_): Likewise. - -Sat Jan 27 20:52:18 2001 Kaveh R. Ghazi - - * Make-lang.in: Remove all dependencies on defaults.h. - * com.c: Don't include defaults.h. - -2001-01-23 Michael Sokolov - - * com.c: Don't explicitly include any time headers, the right ones are - already included by proj.h. - -2001-01-15 Mark Mitchell - - * com.c (ffecom_lookup_label): Set DECL_CONTEXT for FORMAT - label to current_function_decl. - -Fri Jan 12 17:21:33 2001 Joseph S. Myers - - * g77spec.c (lang_specific_driver): Update copyright year to 2001. - -Wed Jan 10 14:39:45 2001 Mark Mitchell - - * com.c (ffecom_init_zero_): Remove last argument in call to - make_decl_rtl; use make_function_rtl instead of make_decl_rtl. - (ffecom_lookup_label_): Likewise. - (builtin_function): Likewise. - (start_function): Likewise. - -Thu Dec 21 21:19:42 2000 Joseph S. Myers - - * g77install.texi, g77.texi: Update last-updated dates for - installation information and the manual as a whole. - * bugs.texi, news.texi: Update copyright years in the comments at - the top of the file. - -2000-12-21 Joseph S. Myers - - * g77install.texi: Adjust wording of an EGCS reference. - -Thu Dec 21 20:00:48 2000 Joseph S. Myers - - * BUGS, NEWS: Regenerate. - -2000-12-18 Joseph S. Myers - - * com.c [VMS]: Remove definition of BSTRING. - -2000-12-18 Joseph S. Myers - - * g77.texi: Update GPL copy not to refer to years 19@var{yy}. - -2000-12-18 Toon Moene - - * bugs.texi: Correct copyright years. - * g77.texi: Likewise. - * news.texi: Likewise. - -2000-12-18 Joseph S. Myers - - * g77install.texi: Remove obsolete parts only used for INSTALL, - and DOC-G77 conditionals. Update last-update-install date. - -Sat Dec 9 10:20:11 2000 Joseph S. Myers - - * .cvsignore: New file; add info files. - -2000-12-08 Joseph S. Myers - - * Make-lang.in (f77.info): Depend on info files in source - directory. - (f/g77.info): Build info files in source directory; don't build - them unless BUILD_INFO is "info". - (f77.install-info): Install info files from source directory. - -2000-12-07 Zack Weinberg - - * Make-lang.in: Link f/fini with safe-ctype.o. - * bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c). - * com.c: Use TOUPPER, not ffesrc_toupper. - * fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c). - * intrin.c: Don't test IN_CTYPE_DOMAIN(c). - * src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their - initializing code; use TOUPPER and TOLOWER instead of - ffesrc_toupper and ffesrc_tolower. - * src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_. - Don't define ffesrc_toupper or ffesrc_tolower. - -2000-11-28 Richard Henderson - - * com.c (ffecom_member_phase2_): Set TREE_USED on the debugging decl. - -2000-11-26 Joseph S. Myers - - * RELEASE-PREP: Remove obsolete EGCS reference. - * g77.texi: Adjust reference to EGCS as something current. - * lang-options.h (FTNOPT): Remove macro and obsolete comment. - Include doc strings directly in option listing instead of through - this macro. - * root.texi: Remove support for multiple different (FSF and EGCS) - distributions of g77. - * g77install.texi: Remove conditioned out instructions applying - only to obsolete distributions of g77 not as part of GCC. Change - "superceded" to the correct spelling "superseded". - -Sun Nov 26 19:25:56 2000 Joseph S. Myers - - * g77spec.c (lang_specific_driver): Update copyright year to 2000. - -Thu Nov 23 02:18:57 2000 J"orn Rennecke - - * Make-lang.in (g77spec.o): Depend on $(CONFIG_H). - -2000-11-21 David Billinghurst - - * g77.texi (Floating-point Exception Handling): Use feenableexcept - in example. - (Floating-point precision): Change to match above change. - -Sun Nov 19 17:29:22 2000 Matthias Klose - - * g77.texi (Floating-point precision): Adjust example - to work with glibc (>= 2.1). - -Sat Nov 18 13:54:49 2000 Matthias Klose - - * g77.texi (Floating-point Exception Handling): Adjust - example to work with glibc (>= 2.1). - -2000-11-18 Alexandre Oliva - - * Make-lang.in (INTDOC_DEPS): New macro. - (f/intdoc.texi): Depend on $(INTDOC_DEPS). Build f/intdoc. - (f/intdoc): Likewise. Add $(build_exeext). - -2000-11-17 Zack Weinberg - - * lex.c (ffelex_hash_): Change ggc_alloc_string (var, -1) to - ggc_strdup (var). - -Thu Nov 16 23:14:07 2000 Kaveh R. Ghazi - - * malloc.c (malloc_init): Call xmalloc, not malloc. - -2000-11-10 Rodney Brown - - * Make-lang.in: Remove OUTPUT_OPTION from g77version.o target. - -2000-11-10 Toon Moene - - * root.texi: Remove non-historical EGCS reference. - Set current g77 version to 0.5.26. - -2000-11-10 Toon Moene - - * com.c (ffecom_stabilize_aggregate_) case RTL_EXPR: Abort. - -2000-11-10 Zack Weinberg - - * Make-lang.in (f/fini.o, f/proj-h.o): Remove pointless sed - munging of source file name. - ($(srcdir)/f/intdoc.texi): Break up into several rules each of - which builds just one thing. Don't mess with $(LANGUAGES). - (f/ansify.o, f/intdoc.o): Remove unnecessary rules. - -2000-11-05 Toon Moene - - * root.texi, news.texi, g77install.texi, g77.texi, bugs.texi: - Remove non-historical references to egcs/EGCS. - -2000-11-05 Joseph S. Myers - - * Make-lang.in: Remove f77.distdir and f/INSTALL. - * INSTALL, install0.texi: Remove. - -2000-11-02 Joseph S. Myers - - * com.c (open_include_file, ffecom_open_include_): Use strchr () - and strrchr () instead of index () and rindex (). - -2000-10-27 Zack Weinberg - - * Make-lang.in: Move all build rules here from Makefile.in, - adapt to new context. Wrap all rules that change the current - directory in parentheses. Expunge all references to $(P). - When one command depends on another and they're run all at - once, use && to separate them, not ;. Add OUTPUT_OPTION to - all object-file generation rules. Delete obsolete variables. - - * Makefile.in: Delete. - * config-lang.in: Delete outputs= line. - -Sat Oct 21 18:07:48 2000 Joseph S. Myers - - * Makefile.in, g77spec.c: Remove EGCS references in comments. - -Thu Oct 12 22:28:51 2000 Mark Mitchell - - * com.c (ffecom_do_entry_): Don't mess with obstacks. - (ffecom_finish_global_): Likewise. - (ffecom_finish_symbol_transform_): Likewise. - (ffecom_gen_sfuncdef_): Likewise. - (ffecom_init_zero_): Likewise. - (ffecom_start_progunit_): Likewise. - (ffecom_sym_transform_): Likewise. - (ffecom_sym_transform_assign_): Likewise. - (ffecom_transform_equiv_): Likewise. - (ffecom_transform_namelist_): Likewise. - (ffecom_vardesc_): Likewise. - (ffecom_vardesc_array_): Likewise. - (ffecom_vardesc_dims_): Likewise. - (ffecom_end_transition): Likewise. - (ffecom_make_tempvar): Likewise. - (bison_rule_pushlevel_): Likewise. - (bison_rule_compstmt_): Likewise. - (finish_decl): Likewise. - (finish_function): Likewise. - (push_parm_decl): Likewise. - (start_decl): Likewise. - (start_function): Likewise. - (ggc_p): Don't define. - * std.c (ffestd_stmt_pass_): Likewise. - * ste.c (ffeste_end_block_): Likewise. - (ffeste_end_stmt_): Likewise. - (ffeste_begin_iterdo_): Likewise. - (ffeste_io_ialist_): Likewise. - (ffeste_io_cilist_): Likewise. - (ffeste_io_inlist_): Likewise. - (ffeste_io_olist_): Likewise. - (ffeste_R810): Likewise. - (ffeste_R838): Likewise. - (ffeste_R839): Likewise. - (ffeste_R842): Likewise. - (ffeste_R843): Likewise. - (ffeste_R1001): Likewise. - -2000-10-05 Richard Henderson - - * com.c (finish_function): Don't init can_reach_end. - -Sun Oct 1 11:43:44 2000 Mark Mitchell - - * com.c (lang_mark_false_label_stack): Remove. - -2000-09-10 Zack Weinberg - - * com.c: Include defaults.h. - * com.h: Don't define the *_TYPE_SIZE macros. - * Makefile.in: Update dependencies. - -2000-08-29 Zack Weinberg - - * ansify.c: Use #line, not # . - -2000-08-24 Greg McGary - - * intdoc.c (ARRAY_SIZE): Remove macro. - * proj.h (ARRAY_SIZE): Remove macro. - * com.c (init_decl_processing): Use ARRAY_SIZE. - -2000-08-22 Toon Moene - - * com-rt.def: Adapt macro DEFGFRT to accept CONST boolean. - * com.c (macro DEFGFRT): Use CONST boolean. - (ffecom_call_binop_): Choose between call by value - and call by reference. - (ffecom_expr_): Use direct calls to (g)libc functions for - POW_DD, LOG10, (float) MOD. - (ffecom_make_gfrt_): Add const indication to table of - intrinsics. - * com.h (macro DEFGFRT): Use CONST boolean. - * intrin.def: Adjust DEFIMP definition of LOG10, (float) MOD. - -2000-08-21 Nix - - * lang-specs.h: Do not process -o or run the assembler if - -fsyntax-only. Use %j instead of /dev/null. - -2000-08-21 Jakub Jelinek - - * lang-specs.h: Pass -I* options to f771. - -2000-08-19 Toon Moene - - * top.c (ffe_decode_option): Disable -fdebug-kludge - and warn about it. - * lang-options.h: Document the fact. - * g77.texi: Ditto. - -2000-08-13 Toon Moene - - * bugs.texi: Describe new ability to emit debug info - for EQUIVALENCE members. - * news.texi: Ditto. - -2000-08-11 G. Helffrich - Toon Moene - - * com.c (ffecom_transform_equiv_): Make EQUIVALENCEs addressable - so that debug info can be attached to their storage. - Unconditionally list the storage set aside for them. - -2000-08-07 Toon Moene - - * g77spec.c (lang_specific_driver): Clearer g77 version message. - -2000-08-04 Zack Weinberg - - * Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist. - * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. - (f771): Link with $(BACKEND). - -2000-08-02 Zack Weinberg - - * g77spec.c: Adjust type of second argument to - lang_specific_driver, and update code as necessary. - - * expr.c (ffeexpr_finished_): Cast signed side of ?: - expression to bool. - -2000-07-31 Zack Weinberg - - * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. - -Thu Jul 27 11:50:08 2000 Kaveh R. Ghazi - - * fini.c (main): Avoid automatic aggregate initialization. - - * proj.h: Indent #error directive. - -2000-07-26 Toon Moene - - * lang-specs.h: Remove one /dev/null from tradcpp invocation. - -Sun Jul 23 15:47:30 2000 Billinghurst, David - - * Make-lang.in: Put $(build_exeext) suffix on programs which run - on the build machine. - -2000-07-22 Toon Moene - - * com.c (ffecom_expr_intrinsic_): case FFEINTRIN_impFGETC_subr, - FFEINTRIN_impFPUTC_subr: Check for arg3 being NULL. - -2000-07-13 Zack Weinberg - - * lang-specs.h: Use the new named specs. Remove unnecessary braces. - -2000-07-02 Toon Moene - - * version.c: Bump version number. - -2000-06-21 Zack Weinberg - - * Make-lang.in (F77_SRCS): Remove all .j files. - * Makefile.in (ASSERT_H, CONFIG_H, CONVERT_H, FLAGS_H, GGC_H, - GLIMITS_H, HCONFIG_H, INPUT_H, OUTPUT_H, RTL_H, SYSTEM_H, - TOPLEV_H, TREE_H): Remove references to .j files. - (TCONFIG_H, TM_H): Remove entirely. - (deps-kinda): Delete rule. - Correct commentary. - - * assert.j, config.j, convert.j. flags.j, ggc.j, glimits.j, - hconfig.j, input.j, output.j, rtl.j, system.j, toplev.j, - tree.j, tconfig.j, tree.j: Delete. - - * ansify.c, bad.c, bit.c, com.c, com.h, intdoc.c, lex.c, - parse.c, proj.c, proj.h, ste.c, target.c, target.h, top.c, - where.c, where.h: Include parent-directory headers directly. - * lex.c: Don't include tree.h twice. - -2000-05-17 H.J. Lu (hjl@gnu.org) - - * Make-lang.in: Use a unique stamp for each target to support - parallel make. - -Thu Jun 15 14:03:14 2000 Kaveh R. Ghazi - - * ste.c (gbe_block): Constify. - -2000-06-13 Jakub Jelinek - - * com.c (ffecom_transform_common_): Set DECL_USER_ALIGN. - (ffecom_transform_equiv_, ffecom_decl_field): Likewise. - (ffecom_init_0): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN. - (duplicate_decls): Set DECL_USER_ALIGN. - -Sun Jun 11 00:03:00 2000 Kaveh R. Ghazi - - * com.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. - -2000-06-04 Philipp Thomas - - * Makefile.in(INTLLIBS): New macro. - (LIBS): Add INTLLIBS. - (DEPLIBS): Likewise. - -2000-06-02 Richard Henderson - - * com.c (lang_get_alias_set): New. - -2000-05-28 Toon Moene - - * bugs.texi: Note that debugging information for - common block items is emitted now. - * news.texi: Ditto. - -2000-05-18 Chris Demetriou - - * com.h (FFECOM_f2cINTEGER, FFECOM_f2cLONGINT): Note that - these types correspond to built-in types now defined in - the C front end (for libf2c). - -Wed May 17 17:27:44 2000 Andrew Cagney - - * top.c (ffe_decode_option): Update -Wall unused flags by calling - set_Wunused. - -2000-05-09 Zack Weinberg - - * com.c (ffecom_subscript_check_): Constify array_name - parameter. Clean up string bashing. - (ffecom_arrayref_, ffecom_char_args_x_): Constify array_name - parameter. - (ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, - ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify - local char *. - (init_parse): Constify parameter and return value. - * lex.c: Include dwarfout.h instead of prototyping dwarfout_* - functions here. - (ffelex_file_pop_, ffelex_file_push_): Constify filename parameter. - (ffelex_hash_, ffelex_include_): Constify local char *. - * std.c (ffestd_exec_end): Constify local char *. - * where.c (ffewhere_file_new): Constify filename parameter. - * where.h: Update prototypes. - -2000-05-06 Zack Weinberg - - * com.c (ffecom_overlap_): Set source_offset to - bitsize_zero_node. - (ffecom_tree_canonize_ptr_): Use size_binop. Convert to - bitsizetype before multiplying by TYPE_SIZE. - (ffecom_tree_canonize_ref_) [case ARRAY_REF]: Break up offset - calculation. Convert to bitsizetype before multiplying by - TYPE_SIZE. - -2000-04-18 Zack Weinberg - - * lex.c: Remove references to cccp.c. - * g77install.texi: Remove references to cexp.c/cexp.y. - -2000-04-15 David Edelsohn - - * target.h (FFETARGET_32bit_longs): Define for 64-bit PowerPC - as well. - -Wed Apr 12 15:15:26 2000 Mark Mitchell - - * com.h (FFECOM_f2cINTEGER): Avoid using LONG_TYPE_SIZE as a - preprocessor constant. - (FFECOM_f2cLOGICAL): Likewise. - (FFECOM_f2cLONGINT): Likewise. - -Wed Apr 5 17:46:39 2000 Mark Mitchell - - * Makefile.in (GGC_H): Add varray.h. - -2000-04-03 Zack Weinberg - - * lang-specs.h: Pass -fno-show-column to the preprocessor. - -2000-03-28 Franz Sirl - - * com.c (ffecom_decl_field): Use DECL_ALIGN for a FIELD_DECL. - (ffecom_init_0): Likewise. - -Sat Mar 25 09:12:10 2000 Richard Kenner - - * com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. - (ffecom_tree_canonize_ref_): Likewise. - -Mon Mar 20 15:49:40 2000 Jim Wilson - - * f/target.h (FFETARGET_32bit_longs): New. Define for alpha, sparc64, - and ia64. - (ffetargetInteger1, ffetargetLogical1, ffetargetReal1, ffetargetReal2, - ffetarget_integerdefault_is_magical): Use FFETARGET_32bit_longs. - -Fri Mar 10 00:43:55 2000 Jason Merrill - - * com.c (ffecom_stabilize_aggregate_): Don't refer to TREE_RAISES. - -Mon Mar 6 18:05:19 2000 Richard Kenner - - * com.c (ffecom_f2c_set_lio_code_): Use compare_tree_int. - (ffecom_sym_transform_, ffecom_transform_common_): Likewise. - (ffecom_transform_equiv_): Likewise. - -Mon Mar 6 13:01:19 2000 Kaveh R. Ghazi - - * ansify.c (die_unless): Don't use ANSI string concatenation. - (die): Mark with ATTRIBUTE_NORETURN. - -Wed Mar 1 00:31:44 2000 Martin von Loewis - - * com.c (current_function_decl): Move to toplev.c. - -Sun Feb 27 16:40:33 2000 Richard Kenner - - * com.c (ffecom_arrayref_): Convert args to size_binop to proper type. - (ffecom_tree_canonize_ptr_): Don't use size_binop for non-sizes. - (ffecom_tree_canonize_ref_): Likewise. - (type_for_mode): Handle TImode. - * ste.c (ffeste_io_dofio_, ffeste_io_douio_): Use TYPE_SIZE_UNIT. - (ffeste_io_ciclist_): Likewise. - -2000-02-23 Zack Weinberg - - * com.c (ffecom_type_permanent_copy_): Delete unused function. - (finish_decl): Don't change TREE_PERMANENT (DECL_INITIAL (decl)). - -Sat Feb 19 18:43:13 2000 Richard Kenner - - * com.c (ffecom_sym_transform): Use DECL_SIZE_UNIT. - (ffecom_transform_common_, ffecom_transform_equiv_): Likewise. - (duplicate_decls): Likewise. - (ffecom_tree_canonize_ptr_): Delete extra arg to bitsize_int. - (finish_decl): Delete -Wlarger-than processing. - -Fri Feb 18 13:19:34 2000 Martin von Loewis - - * g77spec.c (lang_specific_driver): Use GCCBUGURL. - -2000-02-17 Andy Vaught - - * com.c (ffecom_member_phase2_): Re-enable COMMON debug code. - (ffecom_finish_symbol_transform_): Likewise. - (ffecom_transform_common_): Call ffestorag_set_hook. - -Wed Feb 16 11:09:38 2000 Kaveh R. Ghazi - - * Make-lang.in (g77spec.o): Depend on $(GCC_H), not gcc.h. - -2000-02-15 Jonathan Larmour - - * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. - -Tue Feb 15 11:14:17 2000 Kaveh R. Ghazi - - * g77spec.c: Don't declare `version_string'. - -Sat Feb 5 23:27:25 2000 Kaveh R. Ghazi - - * com.c (mark_tracker_head, mark_binding_level): Protoize. - - * where.c (mark_ffewhere_head): Likewise. - -Wed Jan 12 09:32:59 2000 Zack Weinberg - - * lang-specs.h: Pass -lang-fortran to preprocessor. - -Thu Dec 30 13:14:31 1999 Richard Henderson - - * stw.h (struct _ffestw_): Change type of uses_ to int. - -Thu Dec 30 11:42:05 1999 Geoff Keating - - * com.c (ffecom_init_0): Make double_ftype_double, - float_ftype_float, ldouble_ftype_ldouble, - ffecom_tree_ptr_to_fun_type_void local. - (tracker_head): New static variable. - (mark_tracker_head): New, marker procedure for tracker_head. - (ffecom_save_tree_forever): New procedure. - (ffecom_init_zero_): Remove obstack use. - (ffecom_make_gfrt_): Remove obstack use. - (ffecom_sym_transform_): Remove obstack use, save appropriate trees. - (ffecom_transform_common_): Remove obstack use, save appropriate - trees. - (ffecom_type_namelist_): Remove obstack use, save appropriate - trees. - (ffecom_type_vardesc_): Remove obstack use, save appropriate trees. - (ffecom_lookup_label): Remove obstack use, save appropriate trees. - (duplicate_decls): Remove obstack use. - (finish_function): push & pop ggc context around - rest_of_compilation when building nested function. - (mark_binding_level): New function. - (init_decl_processing): Mark all the GC roots. - (ggc_p): Set to 1. - (lang_mark_tree): New function. - (lang_mark_false_label_stack): New trivial function. - * com.h (ffecom_save_tree_forever): Declare as external. - * lex.c (ffelex_hash_): Use GC to allocate the filename string - even when ffelex_kludge_flag_. - * ste.c (ffeste_io_ialist_): Register a static root. - (ffeste_io_inlist_): Likewise. - (ffeste_io_icilist_): Likewise. - (ffeste_io_cllist_): Likewise. - (ffeste_io_cilist_): Likewise. - (ffeste_io_olist_): Likewise. - * Makefile.in (OBJS): Don't use ggc-callbacks.o. - (OBJDEPS): Likewise. - (GGC_H): New variable. - Update dependencies. - * where.c (ffewhere_head): New global. - (mark_ffewhere_head): New marker procedure for ffewhere_head. - (ffewhere_file_kill): Use GC to do memory management. - (ffewhere_file_new): Use GC to do memory management. - * ggc.j: New file. - -Wed Dec 29 19:29:26 1999 Gerald Pfeifer - - * g77.texi (C Interfacing Tools): Fix an incorrect link. - -1999-12-13 Jakub Jelinek - - * target.h: Handle sparc64 the same way as alpha. - -Sun Nov 28 21:39:05 1999 Kaveh R. Ghazi - - * com.c (ffecom_file_, ffecom_file, file_buf, - ffecom_open_include_): Constify a char*. - (ffecom_possible_partial_overlap_): Mark parameter `expr2' with - ATTRIBUTE_UNUSED. - (ffecom_init_0): Use a fully prototyped cast in call to bsearch. - (lang_print_error_function): ANSI-fy. - - * com.h (ffecom_file): Constify a char*. - - * fini.c (main): Call return, not exit. - - * g77spec.c (lang_specific_driver): Use non-const *in_argv in - assignment. - - * intrin.c (ffeintrin_cmp_name_): Don't needlessly cast away - const-ness. - -Sun Nov 28 21:15:29 1999 Kaveh R. Ghazi - - * com.c (ffecom_get_invented_identifier): Rewrite to take an ellipses. - - (ffecom_char_enhance_arg_, ffecom_do_entry_, - ffecom_f2c_make_type_, ffecom_gen_sfuncdef_, - ffecom_start_progunit_, ffecom_start_progunit_, - ffecom_start_progunit_, ffecom_sym_transform_assign_, - ffecom_transform_equiv_, ffecom_transform_namelist_, - ffecom_vardesc_, ffecom_vardesc_array_, ffecom_vardesc_dims_, - ffecom_end_transition, ffecom_lookup_label, ffecom_temp_label): - Adjust accordingly. - - * com.h (ffecom_get_invented_identifier): Likewise. - - * sts.c (ffests_printf): New function taking ellipses. - (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s, - ffests_printf_2Us): Delete. - - * sts.h: Likewise. - - * std.c (ffestd_R1001dump_, ffestd_R1001dump_1005_1_, - ffestd_R1001dump_1005_2_, ffestd_R1001dump_1005_3_, - ffestd_R1001dump_1005_4_, ffestd_R1001dump_1005_5_, - ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_, - ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_, - ffestd_R1001rtexpr_): Call `ffests_printf', not `ffests_printf_*'. - - * ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_, - ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_): Likewise. - -Wed Nov 10 12:43:21 1999 Philippe De Muyter - Kaveh R. Ghazi - - * proj.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. - -Tue Oct 26 01:32:19 1999 Mark Mitchell - - * com.c (poplevel): Don't call remember_end_note. - -Fri Oct 15 15:18:12 1999 Greg McGary - - * top.h (ffe_is_subscript_check_): Remove extern decl. - (ffe_is_subscript_check, ffe_set_is_subscript_check): Remove macros. - * top.c (ffe_is_subscript_check_): Remove global variable. - (ffe_decode_option): Remove "(no-)bounds-check" flag handling. - Set flag_bounds_check for "(no-)fortran-bounds-check". - * com.c - (ffecom_arrayref_): s/ffe_is_subscript_check ()/flag_bounds_check/ - (ffecom_char_args_x_): Ditto. - -Sun Oct 10 08:40:18 1999 Kaveh R. Ghazi - - * proj.h: Use HAVE_GCC_VERSION instead of explicitly testing - __GNUC__ and __GNUC_MINOR__. Don't define BUILT_WITH_270. Define - macro UNUSED in terms of ATTRIBUTE_UNUSED. - -Fri Sep 24 10:48:10 1999 Bernd Schmidt - - * com.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than - DECL_BUILT_IN. - (builtin_function): No longer static. New arg CLASS. Arg - FUNCTION_CODE now of type int. All callers changed. - Set the builtin's DECL_BUILT_IN_CLASS. - -Tue Sep 21 09:08:30 1999 Toon Moene - - * g77spec.c (lang_specific_driver): Initialize return value. - -Thu Sep 16 18:07:11 1999 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Use uppercase ctype macro from system.h. - - * fini.c (main): Likewise. - - * intrin.c (ffeintrin_init_0): Likewise. - - * lex.c (ffelex_hash_): Likewise. - - * src.c (ffesrc_init_1): Likewise. - -Tue Sep 14 12:14:28 1999 Kaveh R. Ghazi - - * g77spec.c (lang_specific_driver): Remove unnecessary argument in - call to function `fatal'. - -Sun Sep 12 23:29:47 1999 Kaveh R. Ghazi - - * Make-lang.in (g77spec.o): Depend on system.h and gcc.h. - - * g77spec.c: Include gcc.h. - (g77_xargv): Constify. - (g77_fn): Add parameter prototypes. - (lookup_option, append_arg): Add static prototypes. - (g77_newargv): Constify. - (lookup_option, append_arg, lang_specific_driver): Constify a char*. - (lang_specific_driver): All calls to the function pointer - parameter now explicitly call `fatal'. - -Fri Sep 10 10:32:32 1999 Bernd Schmidt - - * com.h: Delete declarations for all tree nodes now moved to - global_trees. - * com.c: Delete their definitions. - (ffecom_init_0): Call build_common_tree_nodes and - build_common_tree_nodes_2 instead of building their nodes here. - Override their decisions for complex nodes. - -Sat Sep 4 13:46:27 1999 Mark Mitchell - - * Make-lang.in (f771): Depend on ggc-callbacks.o. - * Makefile.in (OBJS): Add ggc-callbacks.o. - (OBJDEPS): Likewise. - -Mon Aug 30 22:05:53 1999 Kaveh R. Ghazi - - * com.c (language_string): Constify. - -Mon Aug 30 20:29:30 1999 Kaveh R. Ghazi - - * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a. - Remove hacks for stuff which now comes from libiberty. - -Sun Aug 29 09:47:45 1999 Kaveh R. Ghazi - - * com.c (lang_printable_name): Constify a char*. - -Wed Aug 25 01:21:06 1999 Rainer Orth - - * lang-specs.h: Pass cc1 spec to f771. - -Mon Aug 9 19:44:08 1999 Kaveh R. Ghazi - - * com.c (lang_print_error_function): Constify a char*. - (init_parse): Remove redundant prototype for `print_error_function'. - (lang_identify): Constify a char*. - -Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com) - - * g77spec.c: Update URLS and mail addresses. - * root.texi: Update URLS and mail addresses. - -1999-07-25 Richard Henderson - - * com.c (ptr_type_node, va_list_type_node): New. - (ffecom_init_0): Init and use ptr_type_node. - -1999-07-17 Alexandre Oliva - - * root.texi: Update e-mail addresses to gcc.gnu.org. - * g77spec.c (lang_specific_driver): Updated URL with bug reporting - instructions to gcc.gnu.org. Removed e-mail address. - -Sat Jul 17 11:28:43 1999 Craig Burley - - * root.texi, g77install.texi: Switchover to GCC terminology. - Also, FSF-G77 had been mistakenly set at some point. - -Thu Jul 8 15:38:50 1999 Craig Burley - - * news.texi: Describe DATE intrinsic fix. - -Mon Jun 28 21:44:19 1999 Craig Burley - - * version.c: Denote experimental version. - -Mon Jun 28 10:43:11 1999 Craig Burley - - * com.c (ffecom_prepare_expr_): A COMPLEX intrinsic needs - a temp even if -fno-f2c. - - * version.c: Bump version. - -Mon Jun 28 21:31:35 1999 Craig Burley - - * bugs.texi, news.texi: Doc upgrade to netlib libf2c as of today. - Explain that this fixes the NAMELIST-read bug. - -Fri Jun 25 11:06:32 1999 Craig Burley - - * bugs.texi: Describe K(5)=10*3 NAMELIST-read bug. - -Mon Jun 21 12:40:17 1999 Gerald Pfeifer - - * g77.texi: Update links. - -Mon Jun 21 05:33:51 1999 Jeffrey A Law (law@cygnus.com) - - * news.texi: Add missing @end ifclear. - -Fri Jun 18 11:43:46 1999 Craig Burley - - * news.texi: Doc TtyNam fix. - -Fri Jun 18 11:26:50 1999 Craig Burley - - * news.texi: New heading for development version. - Doc upgrade to netlib libf2c as of today. - -Wed Jun 16 11:43:02 1999 Craig Burley - - * news.texi: Mention BACKSPACE fix to libg2c. - -Mon Jun 7 08:42:40 1999 Craig Burley - - * Make-lang.in: Any target using libsubdir must depend - on installdirs. - -Sat Jun 5 23:50:36 1999 Craig Burley - - * g77.texi: Describe a few more missing features people - have emailed me about. - -Sat Jun 5 17:03:23 1999 Craig Burley - - From Dave Love to egcs-patches on 20 May 1999 17:38:38 +0100: - * g77.texi: Clean up fossil text vis-a-vis Intel CPUs. - -Fri Jun 4 13:56:56 1999 Craig Burley - - * Make-lang.in: Use libsubdir, not prefix, to store - temporary lang-f77 `flag' file. - -Fri Jun 4 10:26:04 1999 Craig Burley - - * news.texi (News): Mention GCC 2.95 in favor of EGCS 1.2. - Mention that libg2c is multilibbed. - -Fri Jun 4 10:09:50 1999 Craig Burley - - * g77.texi (Missing Features): Add `Better Warnings' - item. - -Fri May 28 16:51:41 1999 Craig Burley - - * g77.texi: Fix thinko. - -Wed May 26 14:43:27 1999 Craig Burley - - * news.texi: Document Tue May 18 03:52:04 1999 patch. - Fix a grammo. - -Wed May 26 14:25:07 1999 Craig Burley - - * g77.texi, news.texi, root.texi, version.c: Start renaming - EGCS 1.2 to GCC 2.95, and start using 0.5.25 to designate - the version of g77 within GCC 2.95. - -Wed May 26 11:45:21 1999 Craig Burley - - Rename -fsubscript-check to -fbounds-check and - -ff2c-subscript-check to -ffortran-bounds-check: - * g77.texi: Rename options in docs, clarify usage. - * lang-options.h: Rename options, clarify doclets. - * news.texi: Rename options, don't bother with fortran-specific - option. - * top.c (ffe_decode_option): Rename recognized strings. - -Tue May 25 18:21:09 1999 Craig Burley - - * com.c (FFECOM_FASTER_ARRAY_REFS): Delete this vestige, - now that -fflatten-arrays exists. - -Tue May 25 17:48:34 1999 Craig Burley - - Fix 19990525-0.f: - * com.c (ffecom_arg_ptr_to_expr): Strip off parens around - CHARACTER expression. - (ffecom_prepare_expr_): Ditto. - -Tue May 18 03:52:04 1999 Craig Burley - - Support use of back end's improved open-coding of complex divide: - * com.c (ffecom_tree_divide_): Use RDIV_EXPR for complex divide, - instead of run-time call to [cz]_div, if `-Os' option specified. - (lang_init_options): Tell back end we want support for wide range - of inputs to complex divide. - - * Bump version. - -Tue May 18 00:21:34 1999 Zack Weinberg - - * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc - was not given. - -Thu May 13 12:23:20 1999 Craig Burley - - Fix INTEGER*8 subscripts in array references: - * com.c (ffecom_subscript_check_): Convert low, high, and - element as necessary to make comparison work. - (ffecom_arrayref_): Do more of the work. - Properly handle subscript expr that's wider than int, - if pointers are wider than int. - (ffecom_expr_): Leave more work to ffecom_arrayref_. - (ffecom_init_0): Record sizes of pointers and ints for - convenience. - Use set_sizetype etc. as done by gcc front end. - (ffecom_ptr_to_expr): Leave more work to ffecom_arrayref_. - * expr.c (ffeexpr_finished_): Don't convert INTEGER subscript - expressions in run-time contexts. - (ffeexpr_token_elements_, ffeexpr_token_substring_1_): Cope with - non-default INTEGER subscript expressions. - * news.texi: Announce. - - Finish accepting -fflatten-arrays option: - * com.c (ffecom_arrayref_): Flatten references if requested. - * g77.texi: Describe. - * lang-options.h: Allow. - * news.texi: Announce. - * top.c, top.h: Recognize. - - * version.c: Bump version. - -Wed May 12 07:30:05 1999 Craig Burley - - * com.c (lang_init_options): Disable back end's maintenance - of errno. - * news.texi: Document dropping of errno. - -1999-05-10 18:21 -0400 Zack Weinberg - - * lang-specs.h: Pass -$ to the preprocessor. - -Mon May 10 18:14:28 1999 Craig Burley - - * g77.texi: Fix various @xref's per proper style. - Go ahead and use nested braces in @xref's, with care. - * g77install.texi: Fix @xref per proper style. - -Mon May 10 17:38:39 1999 Craig Burley - - * news.texi: Doc upgrade to netlib libf2c as of today. - -Sun May 9 18:52:13 1999 Hans-Peter Nilsson - - * f/g77spec.c (lang_specific_driver): Correct bug-report address - and point to the FAQ. - -Thu May 6 12:40:21 1999 Craig Burley - - * g77.texi (Arbitrary Concatenation): Put this under - "Missing Features" instead of "Projects". - (Internals Documentation): Point to new "Front End" chapter. - -Thu May 6 08:23:52 1999 Craig Burley - - * bugs.texi, news.texi: Automatic arrays reportedly working - on HP-UX systems. - -Thu May 6 08:19:31 1999 Craig Burley - - * g77.texi (Advantages Over f2c): Expand on this topic. - -Mon May 3 19:41:48 1999 Craig Burley - - * com.c (ffecom_expr_intrinsic_): Fix test of CTIME_subr. - -Mon May 3 18:11:48 1999 Craig Burley - - Reverse order of two arguments to CTIME_subr, DTIME_subr, - ETIME_subr, and TTYNAM_subr: - * com.c (ffecom_expr_intrinsic_): Reverse the arguments. - While at it, set TREE_SIDE_EFFECTS for CTIME_subr and - TTYNAM_subr. - * intdoc.in: Document the new calling sequences. - * intrin.def: Reverse the arguments. - * news.texi: Document the fact that they changed. - * version.c: Bump version. - -Mon May 3 11:28:14 1999 Craig Burley - - * news.texi: Doc upgrade to netlib libf2c as of today. - -Sun May 2 17:04:28 1999 Craig Burley - - * version.c: Bump version. - -Sun May 2 16:53:01 1999 Craig Burley - - Fix compile/19990502-1.f: - * ste.c (ffeste_R819B): Don't overwrite tree for temp - variable when expanding the assignment into it. - -Sun Apr 25 20:55:10 1999 Craig Burley - - Fix 19990325-0.f and 19990325-1.f: - * com.c (ffecom_possible_partial_overlap_): New function. - (ffecom_expand_let_stmt): Use it to determine whether to assign - to a COMPLEX operand through a temp. - * news.texi: Document fix. - - * version.c: Bump version. - -Sat Apr 24 12:19:53 1999 Craig Burley - - * expr.c (ffeexpr_finished_): Convert DATA implied-do - start/end/incr expressions to default INTEGER. - Fix some broken conditionals. - Clean up some code in the region. - * news.c: Document the fix. - - * version.c: Bump version. - -Fri Apr 23 02:08:32 1999 Craig Burley - - * g77.texi (Compiler Prototypes): Replace "missing" subscript- - checking option with something else. - -Fri Apr 23 01:48:28 1999 Craig Burley - - Support new -fsubscript-check and -ff2c-subscript-check options: - * com-rt.def (FFECOM_gfrtRANGE): Describe s_rnge, in libf2c/libF77. - * com.c (ffecom_subscript_check_, ffecom_arrayref_): New functions. - (ffecom_char_args_x_): Use new ffecom_arrayref_ function for - FFEBLD_opARRAYREF case. - Compute character name, array type, and use new - ffecom_subscript_check_ function for FFEBLD_opSUBSTRING case. - (ffecom_expr_): Use new ffecom_arrayref_ function. - (ffecom_ptr_to_expr): Use new ffecom_arrayref_ function. - * g77.texi, news.texi: Document new options. - * top.c, top.h: Support new options. - - * news.texi: Fix up some items to not be in "User-Visible Changes". - - * ste.c (ffeste_R819B): Fix type for loop variable, to avoid - warnings. - - * version.c: Bump version. - -Tue Apr 20 01:38:57 1999 Craig Burley - - * bugs.texi, news.texi: Clarify -malign-double situation. - -Tue Apr 20 01:15:25 1999 Craig Burley - - * stb.c (ffestb_R5282_): Convert DATA repeat count - to default INTEGER, to avoid problems downstream. - - * version.c: Bump version. - -Mon Apr 19 21:36:48 1999 Craig Burley - - * ste.c (ffeste_R819B): Start the loop before expanding - the termination expression. - - * version.c: Bump version. - -Sun Apr 18 21:53:58 1999 Craig Burley - - * com.c (ffecom_sym_transform_): COMMON and EQUIVALENCE - variables have constant addresses (EQUIVALENCE only if - containing aggregate is static). - -Sat Apr 17 16:55:59 1999 Craig Burley - - * bugs.texi, ffe.texi, g77.texi, g77install.texi, news.texi: - Clean up @code{} vs. @samp{}. - Clean up dashes (`--') vs. @minus{} vs. `---'. - - * ffe.texi: Add copyright header. - - * g77.texi, lang-options.h, news.texi, top.c (ffe_decode_option): - Remove support for -fugly option. - Clarify that -fugly-logint is needed instead of -fugly - to work around using .EQ./.NE. on LOGICAL operands. - Explain more about why -fugly-logint is bad juju. - - * g77.texi (Missing Features): Describe READONLY as a missing - feature. Describe AUTOMATIC better. - - * news.texi: Mention libf2c upgrade. - -Sat Apr 17 14:05:53 1999 Craig Burley - - Make a place for front-end internals documentation: - * Make-lang.in (f/g77.info, f/g77.dvi): Depend on f/ffe.texi. - * ffe.texi: New file, containing docs on front-end internals. - * g77.texi: New chapter for, and inclusion of, ffe.texi. - - * g77.texi: Fix an index entry. - -Sat Apr 17 13:53:43 1999 Craig Burley - - Rewrite to use block/scope structure of GBE and to ensure - variables (especially those going on stack/reg) are declared - before executable code generated: - * bld.c (ffebld_new_item, ffebld_new_one, ffebld_new_two): - Support new hooks. - * bld.h (ffebld_item_hook, ffebld_item_set_hook, - ffebld_nonter_hook, ffebld_nonter_set_hook): Ditto. - * bld.h (ffebld_basictype, ffebld_kind, ffebld_kindtype, - ffebld_rank, ffebld_where): New convenience macros (used - by rest of this patch). - * com.c, com.h (ffecom_push_calltemps, ffecom_pop_calltemps, - ffecom_push_tempvar, ffecom_pop_tempvar): Remove temp-var- - handling mechanism. - * com.c (ffecom_call_, ffecom_call_binop_, ffecom_tree_divide_, - ffecom_call_gfrt): Support passing hooks for temp-var info. - (ffecom_expr_power_integer_): Takes opPOWER expression, instead - of its left and right operands, so it can get at the hook. - (ffecom_prepare_let_char_, ffecom_prepare_arg_ptr_to_expr, - ffecom_prepare_end, ffecom_prepare_expr_, ffecom_prepare_expr_rw, - ffecom_prepare_expr_w, ffecom_prepare_return_expr, - ffecom_prepare_ptr_to_expr): New functions supporting expression - pre-scanning. - (bison_rule_compstmt_): Return the tree, as in the CFE. - (delete_block): New function, from CFE. - (kept_level_p): New function, from CFE, modified. - (ffecom_start_compstmt, ffecom_end_compstmt): New functions, - replacing ffecom_start_compstmt_ and ffecom_end_compstmt_ macros, - and they do real work. - (struct binding_level): Add prep_state member. Initialize to 0. - (ffecom_get_invented_identifier): Now takes either or both a - string and an integer, using -1 to denote no integer. - (ffecom_do_entry_): Disallow temp-var generation via expressions - in body of function, since the exprs aren't prescanned. - (ffecom_expr_rw): Now takes destination tree. - (ffecom_expr_w): New function, now used in some places - ffecom_expr_rw had been used. - (ffecom_expr_intrinsic_): Move huge f2c-related comment to bottom - of source file, to avoid annoying problems editing com.c using - Emacs C-mode. - (ffecom_expr_power_integer_): Make a temp var for division, if - necessary. - Handle expanded statement expression as does CFE. - (ffecom_start_progunit_): Disallow temp-var generation in body - of function, since expressions are not prescanned at this level. - (ffecom_sym_transform_): Transform ASSIGN variables as well, - so these are all transformed up front, before code-generation - begins. - (ffecom_arg_ptr_to_const_expr, ffecom_const_expr, - ffecom_ptr_to_const_expr): New functions to transform expressions - only if the results will surely be constants. - (ffecom_arg_ptr_to_expr): Precompute size, for convenience - obtaining temp vars. - (ffecom_expand_let_stmt): Guess at usability of destination - pre-expansion, to provide better prescan preparation (fewer - spurious temp vars). - (ffecom_init_0): Disallow temp-var generation in global scope. - (ffecom_type_expr): New function, returns just the type tree - for the expression. - (start_function): Disallow temp-var generation in parm scope. - (incomplete_type_error): Fix introductory comment. - (poplevel): Update (somewhat) from CFE. - (pushlevel): Update (somewhat) from CFE. - * stc.c (ffestc_R838): Mark ASSIGNed variable as so. - * std.c (ffestd_stmt_pass_, ffestd_R803, ffestd_R804, ffestd_R805, - ffestd_R806): Remember and pass through the ffestw block info - for these (IFTHEN, ELSEIF, ELSE, and ENDIF) statements. - * ste.c (ffeste_end_iterdo_): Now takes ffestw block argument. - (ffeste_io_inlist_): Add prototype. - (ffeste_f2c_*): Macros rewritten, new ones added. - (ffeste_start_block_, ffeste_end_block_, ffeste_start_stmt_, - ffeste_end_stmt_): New macros/functions, depending on whether - checking is enabled, to keep track of symmetry of other ste.c code. - (ffeste_begin_iterdo_, ffeste_end_iterdo_, ffeste_io_impdo_, - ffeste_io_dofio_, ffeste_io_dolio_, ffeste_io_douio_, - ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_, - ffeste_icilist_, ffeste_io_inlist_, ffeste_io_olist_, - ffeste_subr_beru_, ffeste_do, ffeste_end_R807, ffeste_R737A, - ffeste_R803, ffeste_R804, ffeste_R805, ffeste_R806, ffeste_R807, - ffeste_R809, ffeste_R810, ffeste_R811, ffeste_R819A, ffeste_R819B, - ffeste_R837, ffeste_R838, ffeste_R839, ffeste_R840, ffeste_R904, - ffeste_R907, ffeste_R909_start, ffeste_R909_item, ffeste_R909_finish, - ffeste_R910_start, ffeste_R910_item, ffeste_R910_finish, - ffeste_R911_start, ffeste_R911_item, ffeste_R911_finish, - ffeste_R923A, ffeste_R1212, ffeste_R1227): Prescan/prepare - all pertinent expressions, update to new com.c interface, etc. - (ffeste_io_impdo_): Relocate. - (ffeste_R834, ffeste_R835, ffeste_R836, ffeste_R1226): Don't - bother calling clear_momentary, nothing was generated. - (ffeste_R842, ffeste_R843): Update to new com.c interface. - (ffeste_R1226): Don't try to stuff error_mark_node's DECL_INITIAL. - (ffeste_terminate_2): When checking enabled, make sure all blocks - and statements have been ended. - * ste.h (ffeste_R803, ffeste_R804, ffeste_R805, ffeste_R806): - These now take ffestw block argument. - (ffeste_terminate_2): When checking enabled, it's a function, not - a macro. - * stw.h (struct _ffestw_): New variable for IFTHEN. - (ffestw_ifthen_fake_else, ffestw_set_ifthen_fake_else): New - accessor macros. - * symbol.c, symbol.h: Support new ASSIGN'ed-to info. - - * com.c: Clean up commentary per GNU coding standards. - - * bld.h (ffebld_size, ffebld_size_known): Canonize. - - * version.c: Bump version. - -Sun Apr 11 21:33:33 1999 Mumit Khan - - * g77spec.c (lang_specific_driver): Check whether MATH_LIBRARY is - null to decide whether to use it. - -Wed Apr 7 09:47:09 1999 Kaveh R. Ghazi - - * ansify.c (die): Specify void argument. - - * intdoc.c (family_name, dumpgen, dumpspec, dumpimp, - argument_info_ptr, argument_info_string, argument_name_ptr, - argument_name_string, elaborate_if_complex, - elaborate_if_maybe_complex, elaborate_if_real, print_type_string): - Const-ify a char*. - (main): Mark parameter `argv' with ATTRIBUTE_UNUSED. - (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, cc_pair, descriptions, summaries): Const-ify a char*. - -Mon Apr 5 11:57:54 1999 Donn Terry (donn@interix.com) - - * Make-lang.in (HOST_CFLAGS): compute dynamically. - -Mon Apr 5 02:11:23 1999 Craig Burley - - Fix bugs exposed by configuring with --enable-checking: - * com.c (ffecom_do_entry_, ffecom_expr_, ffecom_arg_ptr_to_expr, - ffecom_list_expr, ffecom_list_ptr_to_expr, finish_function, - pop_f_function_context, store_parm_decls, poplevel): Handle - error_mark_node properly. - * ste.c (ffeste_begin_iterdo_, ffeste_end_iterdo_): Ditto. - * version.c: Bump version. - -Sat Apr 3 23:57:56 1999 Craig Burley - - * g77.texi: Fix up docs for -fset-g77-defaults, and - describe how internal consistency checking now happens. - (Should have been done for EGCS version 1.1.) - -Sat Apr 3 23:29:33 1999 Craig Burley - - * bugs.texi, g77.texi, lang-options.h, news.texi, top.c: - Make -fno-emulate-complex the default, as COMPLEX support - in the back end is now believed to be working. - - * version.c: Bump version. - -Fri Apr 2 13:33:16 1999 Craig Burley - - * g77.texi: -malign-double now works. - Give URL for alignment-testing package. - * news.texi: -malign-double now works. - -Fri Apr 2 12:49:12 1999 Craig Burley - - * g77.texi (Funding GNU Fortran): Dude's got a web page. - * root.texi: Ditto. - -Tue Mar 30 12:04:11 1999 Kaveh R. Ghazi - - * sta.c (ffesta_ffebad_1sp, ffesta_ffebad_1st, ffesta_ffebad_2st): - Const-ify a char*. - - * sta.h (ffesta_ffebad_1sp, ffesta_ffebad_1st, ffesta_ffebad_2st): - Likewise. - - * stb.c (ffestb_local_u_): Likewise. - (ffestb_do, ffestb_dowhile, ffestb_else, ffestb_elsexyz, - ffestb_else3_, ffestb_endxyz, ffestb_goto, ffestb_let, - ffestb_type, ffestb_type1_, ffestb_varlist, ffestb_R423B, - ffestb_R522, ffestb_R528, ffestb_R542, ffestb_R834, ffestb_R835, - ffestb_R838, ffestb_R841, ffestb_R1102, ffestb_blockdata, - ffestb_R1212, ffestb_R1228, ffestb_V009, ffestb_module, - ffestb_R809, ffestb_R810, ffestb_R10014_, ffestb_R10015_, - ffestb_R10018_, ffestb_R1107, ffestb_R1202, ffestb_R12026_, - ffestb_S3P4, ffestb_V012, ffestb_V014, ffestb_V025, ffestb_V0255_, - ffestb_V020, ffestb_dimlist, ffestb_dummy, ffestb_R524, - ffestb_R547, ffestb_decl_chartype, ffestb_decl_dbltype, - ffestb_decl_gentype, ffestb_decl_recursive, ffestb_decl_entsp_2_, - ffestb_decl_func_, ffestb_V003, ffestb_V016, ffestb_V027, - ffestb_decl_R539): Likewise. - - * stb.h (_ffestb_args_): Likewise. - - * stc.c (ffestc_subr_binsrch_, ffestc_subr_is_present_, - ffestc_subr_speccmp_, ffestc_R904, ffestc_R907): Likewise. - - * std.c (ffestd_R1001dump_1005_1_, ffestd_R1001dump_1005_2_, - ffestd_R1001dump_1005_3_, ffestd_R1001dump_1005_4_, - ffestd_R1001dump_1005_5_, ffestd_R1001dump_1010_1_, - ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_, - ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_): Likewise. - - * ste.c (ffeste_begin_iterdo_, ffeste_subr_file_): Likewise. - - * sts.c (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s, - ffests_printf_2Us, ffests_puts, ffests_puttext): Likewise. - - * sts.h (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s, - ffests_printf_2Us, ffests_puts, ffests_puttext): Likewise. - - * stt.c (ffestt_exprlist_drive, ffestt_implist_drive, - ffestt_tokenlist_drive): Add prototype arguments. - - * stt.h (ffestt_exprlist_drive, ffestt_implist_drive, - ffestt_tokenlist_drive): Likewise. - - * stu.c (ffestu_dummies_transition_): Likewise. - (ffestu_sym_end_transition): Const-ify a char*. - - * stw.c (ffestw_display_state, ffestw_new, ffestw_pop): Add - prototype arguments. - - * stw.h (ffestw_display_state, ffestw_new, ffestw_pop): Likewise. - - * version.c (ffe_version_string): Const-ify a char*. - - * version.h (ffe_version_string): Likewise. - -Sat Mar 27 13:00:43 1999 Kaveh R. Ghazi - - * bad.c (_ffebad_message_, ffebad_string_, ffebad_message_, - ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string, - ffebad_finish): Const-ify a char*. - - * bld.c (ffebld_op_string_, ffebld_op_string): Likewise. - - * bld.h (ffebld_op_string): Likewise. - - * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_, - ffecom_debug_kludge_, ffecom_f2c_make_type_, - ffecom_get_appended_identifier_, ffecom_get_identifier_, - ffecom_gfrt_args_): Likewise. - (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype. - (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_, - ffecom_arglist_expr_, ffecom_build_f2c_string_, - ffecom_debug_kludge_, ffecom_f2c_make_type_, - ffecom_get_appended_identifier_, ffecom_get_external_identifier_, - ffecom_get_identifier_, ffecom_decl_field, - ffecom_get_invented_identifier, lang_print_error_function, - skip_redundant_dir_prefix, read_name_map, print_containing_files): - Const-ify a char*. - (savestring): Remove, use `xstrdup' instead. - - * com.h (ffecom_decl_field, ffecom_get_invented_identifier): - Const-ify a char*. - - * data.c (ffebld, ffedata_gather_): Make explicitly static. - - * expr.c (ffeexpr_isdigits_, ffeexpr_percent_, - ffeexpr_reduced_concatenate_, ffeexpr_nil_real_, - ffeexpr_nil_number_, ffeexpr_nil_number_period_, - ffeexpr_nil_number_real_, ffeexpr_token_real_, - ffeexpr_token_number_, ffeexpr_token_number_period_, - ffeexpr_token_number_real_): Const-ify a char*. - - * fini.c (xspaces): Likewise. - - * global.c (ffeglobal_type_string_): Likewise. - (ffeglobal_drive): Protoize. - (ffeglobal_proc_def_arg): Const-ify a char*. - - * global.h (ffeglobal_drive): Protoize. - (ffeglobal_proc_def_arg): Const-ify a char*. - - * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type): - Likewise. - - * implic.h (ffeimplic_peek_symbol_type): Likewise. - - * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, - ffeinfo_kind_string_, ffeinfo_kindtype_string_, - ffeinfo_where_string_, ffeinfo_basictype_string, - ffeinfo_kind_message, ffeinfo_kind_string, - ffeinfo_kindtype_string, ffeinfo_where_string): Likewise. - - * info.h (ffeinfo_basictype_string, ffeinfo_kind_message, - ffeinfo_kind_string, ffeinfo_kindtype_string, - ffeinfo_where_string): Likewise. - - * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_, - ffeintrin_fulfill_specific, ffeintrin_init_0, - ffeintrin_is_actualarg, ffeintrin_is_intrinsic, - ffeintrin_name_generic, ffeintrin_name_implementation, - ffeintrin_name_specific): Likewise. - - * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic, - ffeintrin_name_implementation, ffeintrin_name_specific): Likewise. - - * lex.c (ffelex_type_string_, ffelex_token_new_character, - ffelex_token_new_name, ffelex_token_new_names, - ffelex_token_new_number): Likewise. - - * lex.h (ffelex_token_new_character, ffelex_token_new_name, - ffelex_token_new_names, ffelex_token_new_number): Likewise. - - * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_, - malloc_new_zinpool_): Likewise. - - * malloc.h (malloc_new_inpool_, malloc_new_zinpool_, - malloc_pool_new): Likewise. - - * name.c (ffename_space_drive_global, ffename_space_drive_symbol): - Protoize. - - * name.h (ffename_space_drive_global, ffename_space_drive_symbol): - Likewise. - - * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_, - ffesymbol_attrs_string): Const-ify a char*. - (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. - (ffesymbol_state_string): Const-ify a char*. - - * symbol.h (ffesymbol_attrs_string): Likewise. - (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. - (ffesymbol_state_string): Const-ify a char*. - - * target.c (ffetarget_layout): Likewise. - - * target.h (ffetarget_layout): Likewise. - -1999-03-25 Zack Weinberg - - * Make-lang.in: Remove all references to g77.o/g77.c. - Link g77 from gcc.o. - -1999-03-21 Manfred Hollstein - - * Makefile.in (g77$(exeext)): Depend on intl.o. Link in intl.o. - -Wed Mar 17 11:39:44 1999 Craig Burley - - * news.texi: Editorial fix. - -Mon Mar 15 17:12:07 1999 Craig Burley - - * bugs.texi, g77.texi, news.texi: Editorial fixes. - -Sat Mar 13 17:51:55 1999 Craig Burley - - Fix 19990313-0.f, 19990313-1.f, 19990313-2.f, 19990313-3.f: - * bad.def (FFEBAD_NOCANDO): New error code for internal use only. - * expr.c (ffeexpr_collapse_convert): If FFEBAD_NOCANDO returned - by convertor, just return original expr. - * target.h: Return FFEBAD_NOCANDO for (usually) 64-bit - conversions that aren't yet working properly. - * news.texi: Explain. - - * version.c: Bump version. - -Sat Mar 13 14:26:55 1999 Craig Burley - - * RELEASE-PREP: New file, lists things to do for a release. - - * Make-lang.in, bugs.texi, bugs0.texi, g77.texi, g77install.texi, - install0.texi, news.texi, news0.texi: Accommodate new doc - architecture. - Consolidate news items. Don't describe old news items in - various generated docs. - Don't describe FSF-g77 installation stuff in various EGCS-g77 - generated docs. - Move description of AUTOMATIC to more suitable location. - * root.texi: New file for new doc architecture. - -Thu Mar 11 17:32:55 1999 Craig Burley - - * g77.texi: Add AUTOMATIC to list of unsupported extensions. - -Sat Mar 6 02:28:35 1999 Craig Burley - - Warn about non-Y2K-compliant intrinsics: - * bad.def (FFEBAD_INTRINSIC_Y2KBAD): New diagnostic. - * intrin.def (FFEINTRIN_impDATE, FFEINTRIN_impIDATE_vxt): - Use new DEFIMPY macro to flag these as non-Y2K-compliant. - * intdoc.c (DEFIMPY): Support new Y2K macro. - * intrin.h (DEFIMPY): Ditto. - * intrin.c (DEFIMPY): Ditto. - (ffeintrin_fulfill_generic, ffeintrin_fulfill_specific): - Warn about invocation of non-Y2K-compliant intrinsic. - * com-rt.def (FFECOM_gfrtDATE, FFECOM_gfrtVXTIDATE): - Rename external procedure names, to keep previously- - compiled (sans-new-warnings) code from linking to - new library. - * g77.texi: Document all this stuff. - * news.texi: Spread the joy. - * version.c: Bump version. - -Fri Mar 5 13:22:44 1999 Craig Burley - - * news.texi: Relocate IDATE (VXT) fix: we put it in 1.1.2 - so describe it there, instead of under 1.2. - -Wed Mar 3 00:57:56 1999 Craig Burley - - * news.texi: IDATE (VXT) fixed to return year as 0..99. - -Wed Mar 3 00:43:49 1999 Craig Burley - - * g77.texi: Add remaining changes pending from Dave Love. - -Wed Mar 3 00:38:42 1999 Craig Burley - - * bugs.texi, news.texi: Conditionalize cross-references - on non-html processing, providing temporary HTML "links". - - * g77.texi: Fix up a reference. - -Wed Mar 3 00:12:31 1999 Craig Burley - - * news.texi, bugs.texi: Delete fixed bugs, make one - of them into the appropriate news item. - -Wed Mar 3 00:05:52 1999 Craig Burley - - * news.texi: Copy over 1.1.2 news. - -1999-03-02 Craig Burley - - * g77.texi (Bug Reporting): Clarify whether to use -E. - Clarify other instructions. - -1999-02-27 Craig Burley - - * lang-specs.h: Fix specs to pass `-ax' as well as `-a' option. - -1999-02-26 Craig Burley - - * intdoc.in (STAT_func, STAT_subr, - FSTAT_func, FSTAT_subr, LSTAT_func, LSTAT_subr): - Properly order array elements. Specify N/A return values. - -1999-02-26 Craig Burley - - * intdoc.in (DATE_AND_TIME): Explain that VALUES(7) holds - seconds, and VALUES(8), therefore, milliseconds. - -1999-02-26 Craig Burley - - * news.texi: Clarify IOSTAT= fix. - -1999-02-25 Richard Henderson - - * lang-specs.h: Define __FAST_MATH__ when appropriate. - -1999-02-25 Craig Burley - - * g77.texi: Clarify/index lack of run-time allocation for - concatenation. - -1999-02-25 Andreas Jaeger - - * f/intdoc.in: Add missing `,' after cross references. - -1999-02-20 Craig Burley - - * Make-lang.in (f77.install-common, f77.install-info, - f77.install-man, f77.uninstall): Use `$(prefix)/lang-f77' - instead of `lang-f77' for flag file, to be sure of a - writable directory, and remove the flag file after each - operation to keep things clean. - -1999-02-20 Craig Burley - - * g77.texi: Properly attribute Priest document; clarify - that it is in the .ps version of the Goldberg document. - -1999-02-19 Craig Burley - - * bugs0.texi, bugs.texi, install0.texi, g77install.texi, - news0.texi, news.texi: Update copyright dates. - Clarify which files are source, which are derived, - and remind maintainers where copyright dates are sourced. - * BUGS, INSTALL, NEWS: Regenerated. - -1999-02-19 Craig Burley - - * global.c (ffeglobal_ref_progunit_): Warn about a function - definition that disagrees with the type of a previous reference. - Improve commentary. Fix a couple of minor bugs. Clean up - some code. - * news.texi: Spread the joy. - -1999-02-18 Craig Burley - - * expr.c (ffeexpr_finished_): Disallow non-default INTEGER - as argument for FILEINT and FILEASSOC as lhs. - * news.texi: Document fix. - * version.c: Bump. - -1999-02-18 Craig Burley - - * g77.texi: Clarify -fno-globals vs. -Wno-globals. - -1999-02-18 Craig Burley - - * intdoc.in (LOG10): Fix typo. - -1999-02-17 Ulrich Drepper - - * intdoc.in: Fix typo. - -1999-02-17 Craig Burley - - * g77.texi, intdoc.in: Document Y2K and some other known - limitations. - * intrin.def (DTIME, FDATE): Fix capitalization of - case-sensitive forms of these intrinsics' names. - -1999-02-17 Dave Love - - * intdoc.in: Say `common' logarithm for log10. - -1999-02-16 Ulrich Drepper - - * g77.texi: Add missing @ in email addresses. - -1999-02-15 Craig Burley - - * *.*: Delete my (old) email address in most places, change it - in a few. - -1999-02-14 Craig Burley - - * version.c: Bump. - -1999-02-14 Craig Burley - - * version.c: Bump for 1998-10-02 change (forgot to do this - before). - -1999-02-14 Craig Burley - - * lang-specs.h, g77.1, g77.texi, news.texi: Recognize `.FOR' - and `.FPP' as well as `.for' and `.fpp'. - -1999-02-14 Craig Burley - - * intdoc.in (LOG10): Fix description. - -1999-02-14 Craig Burley - - * news.texi: Mention fix for SIGNAL invocation circa egcs-1.1. - -1999-02-14 Craig Burley - - * g77.texi, g77install.texi, bugs.texi, g77install.texi: Clean - up and improve indexing, and some other areas of docs. - -1999-02-14 Craig Burley - - * intdoc.in (MCLOCK8, TIME8): Warn about lower range on - 32-bit systems. - -Sat Feb 6 18:02:17 1999 Jeffrey A Law (law@cygnus.com) - - * g77.texi: Update email addresses. - -Wed Feb 3 22:50:17 1999 Marc Espie - - * Make-lang.in (g77$(exeext)): Get choose-temp.o, pexecute.o and - mkstemp.o from libiberty. - -1999-02-01 Zack Weinberg - - * top.c: Don't define ffe_is_ident_. Don't process - -f(no-)ident here. - * top.h: Remove declaration of ffe_is_ident_ and macros - ffe_is_ident() and ffe_set_is_ident(). - * lex.c: Use flag_no_ident instead of ffe_is_ident(). - -Sun Jan 31 20:34:29 1999 Zack Weinberg - - * lang-specs.h: Map -Qn to -fno-ident. - -Tue Jan 5 22:12:41 1999 Kaveh R. Ghazi - - * Make-lang.in (g77.o): Depend on prefix.h. - -Fri Nov 27 13:10:32 1998 Kaveh R. Ghazi - - * fini.c: Rename variable `spaces' to `xspaces' to avoid - conflicting with function `spaces' from libiberty. - - * g77spec.c: Don't prototype libiberty functions. - * malloc.c: Likewise. - -1998-11-20 Dave Love - - * g77.texi: Assorted minor changes. - -1998-11-19 Dave Love - - * bugs.texi: Formatting changes from Craig. - - * intdoc.in: Terminate some @xrefs with `,'. - -1998-11-19 Manfred Hollstein - - * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir). - -Mon Nov 9 23:15:39 1998 Jeffrey A Law (law@cygnus.com) - - * g77.texi, news.texi: Updates from Craig. - -Sun Nov 8 17:47:56 1998 Kaveh R. Ghazi - - * Makefile.in (INCLUDES): Add "-I$(srcdir)/../../include". - -Sat Nov 7 15:58:54 1998 Kaveh R. Ghazi - - * g77spec.c: Don't include gansidecl.h. - * output.j: Likewise. - -1998-11-04 Dave Love - - * g77.texi: Small formatting/indexing fixes. - -Mon Oct 12 20:41:59 1998 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Change type of variable `c' to unsigned - char, change type of variable `s' to unsigned char *. - - * com.c (ffecom_symbol_null_): Add missing initializers. - - * fini.c (MAXNAMELEN): Undef it before defining. - - * implic.c (ffeimplic_lookup_): Change type of parameter `c' to - unsigned char. - - * intrin.c (ffeintrin_init_0): Cast the argument of ctype macros - to (unsigned char). - - * lex.c (ffelex_splice_tokens): Change type of variable `p' to - unsigned char *. - (ffelex_token_name_from_names): Cast the argument of - `ffelex_is_firstnamechar' to (unsigned char). - (ffelex_token_names_from_names): Likewise. - (ffelex_token_new_name): Likewise. - (ffelex_token_new_names): Likewise. - - * malloc.c (malloc_root_): Add missing initializer. - - * stb.c (ffestb_do): Change type of variable `p' to unsigned char *. - (ffestb_else) Likewise. - (ffestb_else3_) Likewise. - (ffestb_endxyz) Likewise. - (ffestb_goto) Likewise. - (ffestb_let) Likewise. - (ffestb_varlist) Likewise. - (ffestb_R522) Likewise. - (ffestb_R528) Likewise. - (ffestb_R834) Likewise. - (ffestb_R835) Likewise. - (ffestb_R838) Likewise. - (ffestb_R1102) Likewise. - (ffestb_blockdata) Likewise. - (ffestb_R1212) Likewise. - (ffestb_R810) Likewise. - (ffestb_R10014_): Cast the argument of `ffelex_is_firstnamechar' - to (unsigned char). - (ffestb_V014): Change type of variable `p' to unsigned char *. - (ffestb_dummy) Likewise. - (ffestb_R524) Likewise. - (ffestb_R547) Likewise. - (ffestb_decl_chartype) Likewise. - (ffestb_decl_dbltype) Likewise. - (ffestb_decl_gentype) Likewise. - (ffestb_decl_entsp_2_) Likewise. - (ffestb_V027) Likewise. - (ffestb_decl_R539) Likewise. - - * top.c (ffe_decode_option): Mark parameter `argc' with - ATTRIBUTE_UNUSED. - - * where.c (ffewhere_unknown_line_): Add missing initializers. - -1998-10-02 Dave Love - - * com.c (ffecom_expr_intrinsic_): Fix return type for RAND. - -Thu Oct 1 10:43:45 1998 Nick Clifton - - * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with - HANDLE_GENERIC_PRAGMAS. - -Mon Sep 28 04:22:00 1998 Jeffrey A Law (law@cygnus.com) - - * news.texi: Update from Craig. - -1998-09-23 Dave Love - - * g77.texi: Additions about `/*', trailing comments and cpp. - -1998-09-18 Dave Love - - * g77.texi: Various additions and some small fixes. - -Thu Sep 10 14:55:44 1998 Kamil Iskra - - * Make-lang.in (f77.install-common): Add missing "else true;". - -1998-09-07 Dave Love - - * ChangeLog.egcs: Deleted. Entries merged here. - -1998-09-05 Dave Love - - * Makefile.in (LDFLAGS): Set from BOOT_LDFLAGS. - (F771_LDFLAGS): Variable dispensed with. - -Fri Sep 4 19:53:34 1998 Craig Burley - - * intdoc.in: Minor editorial tweaks. - -Fri Sep 4 18:35:52 1998 Craig Burley - - * lang-options.h: Convert to wrap option and doc string - in a new macro invocation, FTNOPT, so the nearly identical - list can be used in FSF-g77. - -Fri Sep 4 18:35:52 1998 Craig Burley - - * Makefile.in (fini.o): Don't define USE_HCONFIG here. - * fini.c: Define USE_HCONFIG here instead, so deps-kinda - picks up correct dependency. - - * Makefile.in (proj-h.o): Fix dependencies list. - -Wed Sep 02 09:25:29 1998 Nick Clifton - - * lex.c (ffe_lex_hash): Change how HANDLE_PRAGMA and - HANDLE_SYSV_PRAGMA would be called if they pragma parsing was - enabled in this code. - Generate warning messages if unknown pragmas are encountered. - (pragma_getc): New function: retrieves characters from the - input stream. Defined when HANDLE_PRAGMA is defined. - (pragma_ungetc): New function: replaces characters back into the - input stream. Defined when HANDLE_PRAGMA is defined. - -Tue Sep 1 10:00:21 1998 Craig Burley - - * bugs.texi, g77.1, g77.texi, intdoc.in, news.texi: Doc updates - from Craig. - -1998-08-23 Dave Love - - * g77.texi: Increment `version-g77' and fix a few typos. - -Tue Aug 18 21:41:31 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in: Add several "else true" clauses to deal with lame - systems. - -Tue Aug 11 08:12:14 1998 H.J. Lu (hjl@gnu.org) - - * Make-lang.in (g77.o): Touch lang-f77 before checking it. - -1998-08-09 Dave Love - - * Make-lang.in (f/g77.dvi): Replace non-working use of texi2dvi - with explicit use of tex. - (f77.mostlyclean): Remove TeX index files. - - * g77install.texi (Prerequisites): Kluge round TeX lossage with - hyphen in @value in @code. - -Tue Aug 4 16:59:39 1998 Craig Burley - - * com.c (ffecom_convert_narrow_, ffecom_convert_widen_): - Allow conversion from pointer to same-sized integer, - to fix invoking SIGNAL as a function. - -1998-07-26 Dave Love - - * BUGS, INSTALL, NEWS: Rebuilt. - -Sat Jul 25 17:23:55 1998 Craig Burley - - Fix 980615-0.f: - * stc.c (ffestc_R1229_start): Set info to ANY as well. - -Tue Jul 21 04:33:37 1998 Craig Burley - - * g77spec.c (lang_specific_driver): Return unmolested - command line when --help seen. - Comment out code that printed g77-specific --help info. - -Sat Jul 18 19:16:48 1998 Craig Burley - - * lang-options.h: Fix up doc strings. - Remove the unimplemented -fdcp-intrinsics-* options. - - * str-1t.fin: Change mixed-case spelling of `GoTo' from - `Goto'. - -Thu Jul 16 13:26:36 1998 Craig Burley - - * com.c (ffecom_finish_symbol_transform_): Revert change - of 1998-05-23, as it was too aggressive, in that it - prevented transformation of (used) functions before - primary code generation. - -1998-07-15 Dave Love - - * intdoc.texi: Regenerated. - -Mon Jul 13 18:45:06 1998 Craig Burley - - * Make-lang.in (f77.rebuilt): Fix to depend on - build-dir-based, not source-based, g77.info. - - * g77.texi: Merge docs with 0.5.24. - * g77install.texi: Ditto. - -Mon Jul 13 18:02:29 1998 Craig Burley - - Cleanups vis-a-vis g77-0.5.24: - * g77spec.c (lang_specific_driver): Tabify source. - * top.c (ffe_decode_option): Use fixed macro to set - internal-checking flag. - * top.h (ffe_set_is_do_internal_checks): Fix macro. - -Mon Jul 13 17:33:44 1998 Craig Burley - - Cleanups vis-a-vis system.h cutover and g77-0.5.24: - * Makefile.in (fini.o): Define USE_HCONFIG macro - so source code doesn't have to. - * fini.c: Don't define USE_HCONFIG here, since - source code usually shouldn't care about this. - * ansify.c: Include stddef.h only if we have it. - * intdoc.c: Ditto. - * proj.h: Ditto. - -Mon Jul 13 17:30:29 1998 Nick Clifton - - * lang-options.h: Format changed to work with --help support added - to gcc/toplev.c - -Mon Jul 13 11:54:03 1998 Craig Burley - - * com.c (ffecom_push_tempvar): Replace kludge that - munged back-end globals directly with proper calls - to push_topmost_sequence and pop_topmost_sequence. - -1998-07-12 Dave Love - - * version.c: Bump version. - -Sat Jul 11 19:24:32 1998 Craig Burley - - Fix 980616-0.f: - * equiv.c (ffeequiv_offset_): Don't crash on various - possible ANY operands. - -Sat Jul 11 18:24:37 1998 Craig Burley - - * com.c (ffecom_expr_) [FFEBLD_opCONTER]: Die if padding - for constant is nonzero. - - * com.c (__eprintf): Delete this function, it is obsolete. - -1998-07-09 Dave Love - - * intdoc.in (HOSTNM_func, HOSTNM_subr): Update last change. - -Thu Jul 9 00:45:59 1998 Craig Burley - - Fix debugging of CHARACTER*(*), etc., which requires - emitting debug info on types like `ftnlen': - * com.c (ffecom_start_progunit_): Don't bother - resetting "invented" flag for identifier. - (ffecom_transform_equiv_): Don't bother zeroing - "ignored" flag for decl. - (pushdecl): No longer set "ignored", "used", or - "suppressed debug" flags for decls having "invented" - identifiers. - -1998-07-06 Mike Stump - - * Make-lang.in (f77.stage?): Use mv -f instead of just mv so that - we can move g77.c. - -1998-07-06 Dave Love - - * intdoc.in (HOSTNM_func, HOSTNM_subr): Note possible need for - -lsocket. - -1998-07-05 Dave Love - - * intdoc.in: Add entry for DATE_AND_TIME. - - * intrin.def: Add implementation for DATE_AND_TIME. Make second - and third args of SYSTEM_CLOCK optional. - - * com.c (ffecom_expr_intrinsic_): New case for DATE_AND_TIME. - - * com-rt.def (FFECOM_gfrtSYSTEM_CLOCK): Call G77_system_clock_0, - not system_clock_. - (FFECOM_gfrtDATE_AND_TIME): New DEFGFRT. - -Wed Jul 1 11:19:13 1998 Craig Burley - - Fix 980701-1.f (which was producing "unaligned trap" - on an Alpha running GNU/Linux, as predicted): - * equiv.c (ffeequiv_layout_local_): Don't bother - coping with pre-padding of entire area while building - it; do that instead after the building is done, and - do it by modifying only the modulo field. This covers - the case of alignment stringency being increased without - lowering the starting offset, unlike the previous changes, - and even more elegantly than those. - - * target.c (ffetarget_align): Make sure alignments - are nonzero, just in case. - -See ChangeLog.0 for earlier changes. - -Local Variables: -add-log-time-format: current-time-string -End: -2003-01-01 Andreas Jaeger - - * f/Make-lang.in ($(srcdir)/f/BUGS): Add include path for - gcc-common.texi. - ($(srcdir)/f/NEWS): Likewise. - -2002-12-28 Joseph S. Myers - - * g77.texi: Use @copying. - -2002-12-23 Joseph S. Myers - - * root.texi: Include gcc-common.texi. - * bugs.texi, news.texi: Don't include root.texi as part of full - manual. - * g77.texi: Update for use of gcc-common.texi. - * Make-lang.in ($(srcdir)/f/g77.info, f/g77.dvi): Depend on - $(srcdir)/doc/include/gcc-common.texi. - -2002-12-19 Kazu Hirata - - * intdoc.in: Fix typos. - -2002-12-18 Kazu Hirata - - * g77.texi: Fix typos. - * intdoc.texi: Likewise. - * news.texi: Follow spelling conventions. - -Mon Dec 16 13:53:18 2002 Mark Mitchell - - * root.texi: Change version number to 3.4. - -2002-12-15 Zack Weinberg - - * target.h: Don't define HOST_WIDE_INT. - -2002-12-02 Nathanael Nerode - - * Make-lang.in, ansify.c, intdoc.c, proj.h: Replace hconfig.h with - bconfig.h. - * fini.c, proj.h: Replace USE_HCONFIG with USE_BCONFIG - -2002-11-30 Zack Weinberg - - * proj.h, ansify.c, g77spec.c, intdoc.c: - Include coretypes.h and tm.h. - * Make-lang.in: Update dependencies. - -2002-11-20 Toon Moene - - * invoke.texi: Explain the purpose of -fmove-all-movables, - -freduce-all-givs and -frerun-loop-opts better. - -2002-11-19 Nathanael Nerode - - * Make-lang.in: Correct BUILD/HOST confusion. - -2002-11-19 Toon Moene - - PR fortran/8587 - * news.texi: Show PR fortran/8587 fixed. - -2002-11-19 Jason Thorpe - - * g77spec.c (lang_specific_spec_functions): New. - -2002-11-02 Toon Moene - - * g77.texi: Correct documentation on generating C++ prototypes - of Fortran routines with f2c. - * news.texi: Document fixes in GCC-3.3, 3.2 and 3.1. - -2002-10-30 Roger Sayle - - * com.c (ffecom_subscript_check_): Cast the failure branch - of the bounds check COND_EXPR to void, to indicate noreturn. - (ffe_truthvalue_conversion): Only apply truth value conversion - to the non-void branches of a COND_EXPR. - -2002-10-26 Andris Pavenis - - * lang-specs.h: Fix ratfor specs. - -2002-10-15 Richard Henderson - - * target.h (ffetarget_print_real1, ffetarget_print_real2): Use - real_to_decimal directly, and with the new arguments. - -2002-09-23 Zack Weinberg - - * Make-lang.in (g77spec.o): Don't depend on f/version.h. - (f/parse.o): Depend on version.h not f/version.h. - (g77version.o, f/version.o): Delete all references. - - * com.c (ffecom_init_0): Fix transposed array indices in bsearch test. - * g77spec.c: Don't include f/version.h or refer to ffe_version_string. - * parse.c: Use version_string, not ffe_version_string. - * version.c, version.h: Delete files. - -2002-09-23 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * ChangeLog.0: Likewise. - * com.c: Likewise. - * ffe.texi: Likewise. - * g77.texi: Likewise. - * intdoc.in: Likewise. - * invoke.texi: Likewise. - * news.texi: Likewise. - * intdoc.texi: Regenerate. - -2002-09-16 Geoffrey Keating - - * com.c (union lang_tree_node): Add chain_next option. - -2002-09-16 Richard Henderson - - * target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_ - directly to ffetarget_make_real1. - (ffetarget_real2): Similarly. - * target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_, - ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify. - -2002-09-15 Kazu Hirata - - * intdoc.texi: Regenerate. - -2002-09-15 Kazu Hirata - - * ChangeLog: Follow spelling conventions. - * intdoc.in: Likewise. - -2002-09-09 Gerald Pfeifer - - Fix PR web/7596: - * ffe.texi (Front End): Fix broken links. - * bugs.texi (Known Bugs): Refer to gcc.gnu.org instead of - www.gnu.org for onlinedocs. - * news.texi (News): Ditto. - -2002-09-07 Jan Hubicka - - * com.c (ffe_type_for_mode): Handle long double. - -2002-09-04 Richard Henderson - - * target.h (ffetarget_print_real1, ffetarget_print_real2): Update - call to REAL_VALUE_TO_DECIMAL. - -2002-08-31 Toon Moene - - * com.c: Don't set flag_finite_math_only by default. - * invoke.texi: Reverse the documentation of option - -ffinite-math-only to reflect the new default. - -2002-08-30 Hans-Peter Nilsson - - * target.c (ffetarget_memcpy_): Don't test nonexistent - HOST_BYTES_BIG_ENDIAN, HOST_BITS_BIG_ENDIAN. Check - HOST_WORDS_BIG_ENDIAN against both WORDS_BIG_ENDIAN and - BYTES_BIG_ENDIAN. - -2002-08-30 Alan Modra - - * target.h (FFETARGET_32bit_longs): Don't define for powerpc64 or - mmix. - -2002-08-28 Joseph S. Myers - - * bugs.texi, news.texi: Update URLs for online news and bugs - lists. - -2002-08-22 Hans-Peter Nilsson - - * where.h (struct _ffewhere_file_): Mark GTY. - (ffewhere_file_kill): Remove prototype. - * where.c: Include ggc.h. - (struct _ffewhere_ll_, struct _ffewhere_root_ll_): Mark GTY. - (ffewhere_root_ll_): Ditto. Change type from struct - _ffewhere_root_ll_ to struct _ffewhere_root_ll_*. All uses - changed. - (ffewhere_file_kill): Remove. - (ffewhere_file_new): Use GC to allocate ffewhereFile objects. - (ffewhere_file_set): Use GC to allocate ffewhereLL_ objects. - (ffewhere_init_1): Use GC to allocate ffewhere_root_ll_ sentinel. - Include gt-f-where.h. - * lex.c (ffelex_current_wf_, ffelex_include_wherefile_): Mark GTY. - Include gt-f-lex.h. - * std.c (ffestd_S3P4): Don't call ffewhere_file_kill. - * config-lang.in (gtfiles): Add f/where.h f/where.c and f/lex.c. - * Make-lang.in (gt-f-lex.h gt-f-where.h): Add to dependents of - s-gtype. - (f/lex.o): Depend on gt-f-lex.h. - (f/where.o): Depend on gt-f-where.h. - -Tue Aug 20 16:49:40 2002 Kaveh R. Ghazi - - * where.c (ffewhere_track): Remove impossible if-then clause. - -Thu Aug 8 10:06:14 2002 Nathan Sidwell - - * f/Make-lang.in (f.mostlyclean): Remove coverage files. - -2002-08-06 Gerald Pfeifer - - * g77.texi (Top): Rename Index to Keyword Index. - -2002-08-05 Toon Moene - - * invoke.texi: Improve description of - -fno-finite-math-only flag. - -Sun Aug 4 16:45:49 2002 Joseph S. Myers - - * root.texi (version-gcc): Increase to 3.3. - -2002-07-30 Toon Moene - - * com.c (ffe_init_options): Set - flag_finite_math_only. - * invoke.texi: Document -fno-finite-math-only. - -Mon Jul 29 22:05:35 2002 Kaveh R. Ghazi - - * com.c (read_name_map): Use concat in lieu of xmalloc/strcpy. - -2002-07-25 Toon Moene - - * news.texi: Document better handling of (no-)alias - information of dummy arguments and induction variables - on loop unrolling. - -2002-07-01 Roger Sayle - - * f/com.c (builtin_function): Accept additional parameter. - (ffe_com_init_0): Pass an additional NULL_TREE argument to - builtin_function. - -2002-06-28 Toon Moene - - * news.texi: Mention 2 Gbyte limit on 32-bit targets - for arrays explicitly in news on g77-3.1. - -Thu Jun 20 21:56:34 2002 Neil Booth - - * lang-specs.h: Use cc1 for traditional preprocessing. - -2002-06-20 Andreas Jaeger - - * com.c (ffecom_prepare_expr_,ffecom_expr_power_integer_): - Remove #ifdefed HAHA sections. - -2002-06-20 Nathanael Nerode - - * com.c: Remove #ifdef HOHO sections. - -2002-06-17 Jason Thorpe - - * bit.c: Don't include glimits.h. - * target.c: Likewise. - * where.h: Likewise. - -2002-06-12 Gabriel Dos Reis - - * bad.c (ffebad_start_): Adjust calls to diagnostic_count_error. - -2002-06-04 Gabriel Dos Reis - - * bad.c (ffebad_start_): Adjust call to count_error. - * Make-lang.in (f/bad.o): Depend on diagnostic.h - * bad.c: #include diagnostic.h - -2002-06-03 Geoffrey Keating - - * Make-lang.in (f/com.o): Depend on debug.h. - * com.c: Include debug.h. - (LANG_HOOKS_MARK_TREE): Delete. - (struct lang_identifier): Use gengtype. - (union lang_tree_node): New. - (struct lang_decl): New dummy definition. - (struct lang_type): New dummy definition. - (ffe_mark_tree): Delete. - - * com.c (struct language_function): New dummy structure. - - * Make-lang.in: Add rules to generate gt-f-ste.h gtype-f.h; allow - for filename changes. - (com.o): Allow for filename changes; add gtype-f.h as dependency. - (ste.o): Add gt-f-ste.h as dependency. - * config-lang.in (gtfiles): Add com.h, ste.c. - * com.c: Replace uses of ggc_add_* with GTY markers. Include - gtype-f.h. - (mark_binding_level): Delete. - * com.h: Replace uses of ggc_add_* with GTY markers. - * ste.c: Replace uses of ggc_add_* with GTY markers. Include - gt-f-ste.h. - - * Make-lang.in (f/gt-com.h): Build using gengtype. - (com.o): Depend on f/gt-com.h. - * com.c: Rename struct binding_level to f_binding_level. - (struct f_binding_level): Use gengtype. - (struct tree_ggc_tracker): Use gengtype. - (mark_tracker_head): Use gt_ggc_m_tree_ggc_tracker. - (make_binding_level): Use GGC. - (mark_binding_level): Use gt_ggc_m_f_binding_level. - (ffecom_init_decl_processing): Change free_binding_level - to a deletable root. - * config-lang.in (gtfiles): Define. - * where.c: Strings need no longer be allocated in GCable memory; - remove my change of 30 Dec 1999. - -2002-05-31 Matthew Woodcraft - - * lang-specs.h: Use cpp_debug_options. - -2002-05-28 Zack Weinberg - - * bld.c, com.c, expr.c, target.c: Include real.h. - * Make-lang.in: Update dependency lists. - -2002-05-16 Rainer Orth - - * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. - -2002-05-09 Hassan Aurag - - * expr.c (ffeexpr_reduced_ugly2log_): Allow logicals-as-integers - under -fugly-logint as arguments of .and., .or., .xor. - -2002-05-07 Jan Hubicka - - * target.h (FFETARGET_32bit_longs): Undefine for x86-64. - -2002-04-29 Joseph S. Myers - - * invoke.texi: Use @gol at ends of lines inside @gccoptlist. - * g77.texi: Update last update date. - -Thu Apr 25 07:44:44 2002 Neil Booth - - * com.h (ffe_parse_file): Update. - * lex.c (ffe_parse_file): Update. - -2002-04-20 Toon Moene - - * root.texi: Remove variable version-g77. - * g77.texi: Remove the single use of that variable. - -Thu Apr 18 19:10:44 2002 Neil Booth - - * com.c (incomplete_type_error): Remove. - -Tue Apr 16 14:55:47 2002 Mark Mitchell - - * com.c (ffecom_expr_power_integer): Add has_scope argument to - call to expand_start_stmt_expr. - -Mon Apr 15 10:59:14 2002 Mark Mitchell - - * g77.texi: Remove Chill reference. - -2002-04-13 Toon Moene - - * news.texi: Deprecate frontend version number; - update list of fixed bugs. - -2002-04-08 Hans-Peter Nilsson - - * Make-lang.in (f/target.o): Depend on diagnostic.h. - * target.c: Include diagnostic.h. - (ffetarget_memcpy_): Call sorry if host and target endians are - not matching. - -Thu Apr 4 23:29:48 2002 Neil Booth - - * com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. - (truthvalue_conversion): Rename. Update. Make static. - (ffecom_truth_value): Update. - -Mon Apr 1 21:39:36 2002 Neil Booth - - * com.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. - (mark_addressable): Rename. - (ffecom_arrayref_, ffecom_1): Update. - -Mon Apr 1 09:59:53 2002 Neil Booth - - * com.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, - LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. - (unsigned_type, signed_type, signed_or_unsigned_type): Rename. - -Sun Mar 31 23:50:22 2002 Neil Booth - - * com.c (lang_print_error_function): Rename. - (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. - (ffe_init): Don't set hook. - -Fri Mar 29 21:59:15 2002 Neil Booth - - * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): - Redefine. - (type_for_mode, type_for_size): Rename. - (signed_or_unsigned_type, signed_type, truthvalue_conversion, - unsigned_type): Use new hooks. - -Tue Mar 26 10:30:05 2002 Andrew Cagney - - * invoke.texi (Warning Options): Mention -Wswitch-enum. - Fix PR c/5044. - -Tue Mar 26 07:30:51 2002 Neil Booth - - * com.c (LANG_HOOKS_MARK_TREE): Redefine. - (lang_mark_tree): Rename ffe_mark_tree, make static. - -Mon Mar 25 19:27:11 2002 Neil Booth - - * com.c (maybe_build_cleanup): Remove. - -2002-03-23 Toon Moene - - * com.c (ffecom_check_size_overflow_): Add a test - so that arrays too large for 32-bit byte-offset - addressing get caught. - * news.texi: Document the fixing of this problem. - -Sat Mar 23 11:18:17 2002 Andrew Cagney - - * invoke.texi (Warning Options): Mention -Wswitch-default. - -Thu Mar 21 18:55:41 2002 Neil Booth - - * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, - insert_block, getdecls, global_bindings_p): New. - -Wed Mar 20 08:03:42 2002 Neil Booth - - * com.c (lang_printable_name): Rename. - (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. - (ffe_init): Don't use old hook. - -Sun Mar 17 18:50:15 2002 Kaveh R. Ghazi - - * com.h (ffe_parse_file): Prototype. - -Sun Mar 17 20:57:30 2002 Neil Booth - - * com.c (LANG_HOOKS_PARSE_FILE): Redefine. - * com.h (ffe_parse_file): New. - * parse.c (NAME_OF_STDIN): Remove. - (yyparse): Rename ffe_parse_file. - -Tue Mar 12 20:23:18 2002 Kaveh R. Ghazi - - * com.c (tree_code_type, tree_code_length, tree_code_name): - Define. - -Sun Mar 10 12:37:42 2002 Kaveh R. Ghazi - - * target.c (ffetarget_print_hex): Const-ify. - -2002-03-06 Phil Edwards - - * version.c: Fix misplaced leading blanks on first line. - -2002-03-03 Zack Weinberg - - * com.c, target.h: Remove all #ifndef REAL_ARITHMETIC - blocks, make all #ifdef REAL_ARITHMETIC blocks unconditional. - Delete some further #ifdef blocks predicated on REAL_ARITHMETIC. - -Thu Feb 28 07:53:46 2002 Neil Booth - - * com.c (copy_lang_decl): Delete. - -2002-02-27 Zack Weinberg - - * com.c, lex.c, top.c: Delete traditional-mode-related code - copied from the C front end but not used, or used only to - permit the compiler to link. - -2002-02-13 Toon Moene - - * news.texi: List Problem Reports fixed in 3.1. - -2002-02-13 Toon Moene - - * data.c (ffedata_eval_offset_): Only convert index, - low and high bound in data statements to default integer - if they are constants. Use a copy of the data structure. - -2002-02-09 Toon Moene - - * data.c (ffedata_eval_offset_): Convert non-default integer - constants to default integer kind if necessary. - -2002-02-09 Toon Moene - - * invoke.texi: Add a short debugging session - as an example to the documentation of -g. - -2002-02-06 Toon Moene - - PR fortran/4730 fortran/5473 - * com.c (ffecom_expr_): Deal with %VAL constructs. - * intrin.c (ffeintrin_check_): Handle 'N' constraints for intrinsics, - to indicate "no larger than default kind" integers and logicals. - * intrin.def: Use 'N' constraints in table of intrinsics. - * intdoc.c: Document this constraint. - * intdoc.texi: Regenerated. - -2002-02-04 Philipp Thomas - - * implic.c lex.c stb.c ste.c stu.c: Update copyright dates. - -2002-02-04 Philipp Thomas - - * bad.def com.c expr.c implic.c lex.c stb.c ste.c stu.c: - Insert comments to mark messages as not being printf style - where appropriate. - -2002-02-03 Toon Moene - - * expr.c (ffeexpr_sym_impdoitem_): Allow other than - default INTEGER implied-do loop counts. - -2002-02-01 Toon Moene - - * bad.def: Remove non-historical reference to version 0.6. - * bugs.texi: Ditto. - * com.c: Ditto. - * ffe.texi: Ditto. - * proj.h: Ditto. - * g77.texi: Ditto. - -2002-01-31 Joseph S. Myers - - * g77spec.c (lang_specific_driver): Follow GNU Coding Standards - for --version. - -2002-01-30 Richard Henderson - - * ste.c (ffeste_begin_iterdo_): Use expand_exit_loop_top_cond. - (ffeste_R819B): Likewise. - -2002-01-30 Toon Moene - - * intrin.c (upcasecmp_): New function. - (ffeintrin_cmp_name_): Use it to correctly compare name - and table entry for bsearch. - -2002-01-26 Toon Moene - - * intrin.c (ffeintrin_cmp_name_): Correct comparison - for intrinsics in intrinsic table (intrin.def). - -2002-01-22 Zack Weinberg - - * bad.c: Include intl.h. - (FFEBAD_MSGS1, FFEBAD_MSGS2): Replace by FFEBAD_MSG, SHORT, - LONG. Adjust definitions to work with exgettext. - (ffebad_start_): Translate all error messages. - (ffebad_finish): Mark constant strings for translation. - * bad.h: Use FFEBAD_MSG. Adjust prototype of ffebad_start_ - and definitions of ffebad_start_msg, ffebad_start_msg_lex to - work with exgettext. - * bad.def: Use FFEBAD_MSG, SHORT, LONG throughout. - - * com.c: Include intl.h. - (lang_print_error_function): Always use ffeinfo_kind_message - to get the kind label for a non-nested construct. Translate - it. Translate constant strings. - * info.c (FFEINFO_KIND): Adjust definition to work with exgettext. - * info-k.def: Block xgettext from slurping copyright notice - into gcc.pot. Adjust strings for their sole use, in com.c. - - * Make-lang.in (f/bad.o, f/com.o): Depend on intl.h. - -2002-01-14 David Billinghurst - - PR fortran/3807 - * f/intrin.c (ffeintrin_check_): Allow for case of intrinsic - control string have COL-spec an integer > 0. - -2002-01-08 Joseph S. Myers - - * g77spec.c (lookup_option): Handle -fversion. - (lang_specific_driver): Update copyright date in --version output. - -Mon Jan 7 00:03:42 2002 Gerald Pfeifer - - * invoke.texi: Markup g77 as @command. Remove reference to - http://gcc.gnu.org/thanks.html. - -Wed Jan 2 18:13:11 2002 Kaveh R. Ghazi - - * com.c (clear_binding_level): Const-ify. - (ffecom_arglist_expr_): Likewise. - * info.c (ffeinfo_types_): Don't needlessly zero init. - * lex.c (ffelex_hash_kludge): Const-ify. - -Sun Dec 23 10:45:09 2001 Kaveh R. Ghazi - - * com.c (ffecom_gfrt_volatile_, ffecom_gfrt_complex_, - ffecom_gfrt_const_, ffecom_gfrt_type_): Const-ify. - -Sat Dec 22 16:01:51 2001 Kaveh R. Ghazi - - * bld.c (ffebld_arity_op_): Declare array size explicitly. - * bld.h (ffebld_arity_op_): Likewise. - -2001-12-20 Joseph S. Myers - - * config-lang.in (diff_excludes): Remove. - -2001-12-17 Joseph S. Myers - - * g77.texi, invoke.texi: Update links to GCC manual. - -Sun Dec 16 16:08:57 2001 Joseph S. Myers - - * news.texi: Fix spelling errors. - -Sun Dec 16 10:36:51 2001 Kaveh R. Ghazi - - * Make-lang.in (f/version.o): Depend on f/version.h. - * version.c: Include ansidecl.h and f/version.h. - -Sun Dec 16 08:52:48 2001 Kaveh R. Ghazi - - * lex.c (ffelex_backslash_, ffelex_cfebackslash_): Use hex_value. - * target.c (ffetarget_integerhex, ffetarget_typeless_hex): Use - hex_p/hex_value. - -2001-12-14 Roger Sayle - - * com-rt.def: Use __builtin_sqrt instead of __builtin_fsqrt. - * com.c (ffecom_init_0): Same, and fixed enumeration usage. - -2001-12-10 Joseph S. Myers - - * g77.texi: Don't condition menus on @ifinfo. - -Wed Dec 5 06:49:21 2001 Richard Kenner - - * com.c (ffecom_1): Properly handle TREE_READONLY for INDIRECT_REF. - -Mon Dec 3 18:56:04 2001 Neil Booth - - * com.c: Remove leading capital from diagnostic messages, as - per GNU coding standards. - * g77spec.c: Similarly. - * lex.c: Similarly. - -2001-12-01 Zack Weinberg - - * f/fini.c: Use xmalloc. - -Fri Nov 30 20:54:02 2001 Kaveh R. Ghazi - - * Make-lang.in: Delete references to proj.[co], proj-h.[co]. - * proj.c: Delete file. - -2001-11-29 Zack Weinberg - - * Make-lang.in (f/fini, f/intdoc): Depend on $(HOST_LIBDEPS) - and link with $(HOST_LIBS), not safe-ctype.o. - -2001-11-29 Joseph S. Myers - - * Make-lang.in (f77.generated-manpages): New target. - ($(srcdir)/f/g77.1): Don't check $(GENERATED_MANPAGES). Allow - manpage generation to fail. - (f77.info): Don't depend on $(srcdir)/f/g77.1. - (f77.install-man): Depend on $(GENERATED_MANPAGES) rather than - directly on $(srcdir)/g77.1. - -2001-11-24 Toon Moene - - PR fortran/3957 - * lang-specs.h: Correct !pipe conditional in tradcpp0 invocation. - -2001-11-21 Toon Moene - - * g77.texi: egcs was not a `@command'. - * invoke.texi: Ditto. - * news.texi: Substitute `@command' for `@code' - and `@option' for `@samp' where appropriate. - -2001-11-19 Loren J. Rittle - - * Make-lang.in: Complete ``Build g77.1 in $(srcdir)''. - -2001-11-19 Geoffrey Keating - - * g77spec.c (lang_specific_driver) [ENABLE_SHARED_LIBGCC]: Add - libgcc_s.so if libf2c is used. - * Make-lang.in (g77spec.o): Use DRIVER_DEFINES. - -2001-11-19 Toon Moene - - * .cvsignore: Ignore g77.1 - * g77.texi: Substitute `@command' for `@code' - where appropriate. - * invoke.texi: Ditto. - -2001-11-18 Toon Moene - - * Make-lang.in: Remove all references to LANGUAGES - and the stamp files that depend on its value. - -Sun Nov 18 11:13:04 2001 Neil Booth - - * com.c (finish_parse): Remove. - (ffe_finish): Move body of finish_parse. - -Thu Nov 15 10:06:38 2001 Neil Booth - - * com.c (ffecom_init_decl_processing): Renamed from - init_decl_processing. - (init_parse): Move contents to ffe_init. - (ffe_init): Update prototype. - -2001-11-14 Toon Moene - - * g77.texi: Update to use `@command', `@option. - * invoke.texi: Ditto - -2001-11-14 Joseph S. Myers - - * Make-lang.in: Change all uses of $(manext) to $(man1ext). - -2001-11-14 Toon Moene - - * g77.1: Remove from CVS. - * Make-lang.in: Build g77.1 in $(srcdir). - Add --section=1 to POD2MAN command line. - * invoke.texi: Correct copyright years. - Add more sections to man page. Add GFDL. - -Fri Nov 9 23:16:45 2001 Neil Booth - - * com.c (ffe_print_identifier): Rename. - (LANG_HOOKS_PRINT_IDENTIFIER): Override. - (lang_print_xnode, print_lang_decl, print_lang_statistics, - print_lang_type, set_yydebug): Remove. - -2001-11-09 Zack Weinberg - - * g77spec.c (lang_specific_driver): Adjust behavior of -v and - --version for consistency with other front ends. Remove large - #if 0 block. Do not add libraries to argv if there are no - input files. - (add_version_magic): Delete all references and dependent code. - * lang-options.h: Delete -fnull-version. - * lang-specs.h: Delete f77-version spec. - - * lex.c: Delete logic conditional on ffe_is_null_version() and - now-unused label. - * top.c: Delete ffe_is_null_version_ variable. - (ffe_decode_option): Delete -fnull-version case. - * top.h: Delete declaration of ffe_is_null_version_ and - ffe_is_null_version(), ffe_set_is_null_version() macros. - -Fri Nov 9 07:14:47 2001 Neil Booth - - * com.c (language_string, lang_identify): Remove. - (struct lang_hooks): Constify. - (LANG_HOOKS_NAME): Override. - (init_parse): Update. - -2001-11-08 Andreas Franck - - * Make-lang.in (G77_INSTALL_NAME, G77_CROSS_NAME): Handle - program_transform_name the way suggested by autoconf. - -2001-11-08 Toon Moene - - * Make-lang.in: Add rules for building g77.1. - * invoke.texi: Add man page stuff. Move indexing - from g77.texi to here. - * g77.texi: Remove indexing specific to invoke.texi. - * news.texi: Document that g77.1 is now a generated - file. - -Tue Nov 6 21:17:47 2001 Neil Booth - - * com.c: Include langhooks-def.h. - * Make-lang.in: Update. - -2001-11-04 Toon Moene - - * g77.texi: Split off invoke.texi (preliminary to using it - to generate a man page). - * Make-lang.in: Reflect in build rules. - -Fri Nov 2 10:51:34 2001 Kaveh R. Ghazi - - * com.c (ffecom_initialize_char_syntax_, U_CHAR, is_idchar, - is_idstart, is_hor_space, is_space, SKIP_WHITE_SPACE, - SKIP_ALL_WHITE_SPACE): Delete. - (read_filename_string, read_name_map): Don't use is_space or - is_hor_space. - -2001-10-29 Toon Moene - - * news.texi: Document new ability to compile programs with - arrays larger than 512 Mbyte on 32-bit targets. - -2001-10-24 Toon Moene - - * com.c (ffecom_check_size_overflow_): Only check for TREE_OVERFLOW. - -Tue Oct 23 14:01:27 2001 Richard Kenner - - * com.c (LANG_HOOKS_GET_ALIAS_SET): New macro. - (lang_get_alias_set): Delete. - -2001-10-23 Joseph S. Myers - - * g77.texi (Sending Patches): Remove. - -2001-10-22 Zack Weinberg - - * Make-lang.in (f/intdoc): Depend on safe-ctype.o. - -Sun Oct 21 17:28:17 2001 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Use safe-ctype macros and/or fold extra - calls into fewer ones. - * implic.c (ffeimplic_lookup_): Likewise. - * intdoc.c (dumpimp): Likewise. - * intrin.c (ffeintrin_init_0): Likewise. - * lex.c (ffelex_backslash_, ffelex_cfebackslash_, ffelex_hash_): - Likewise. - * lex.h (ffelex_is_firstnamechar): Likewise. - * target.c (ffetarget_integerhex): Likewise. - -2001-10-21 Craig Prescott - - * target.h (FFETARGET_32bit_longs): Don't define - for 64-bit hppa. - -2001-10-17 Richard Henderson - - * std.c (ffestd_labeldef_format): Fix variable/stmt ordering. - (ffestd_R737A): Likewise. - -2001-10-17 Richard Henderson - - * com.h: Remove FFECOM_targetCURRENT, FFECOM_ONEPASS, BUILT_FOR_270, - BUILT_FOR_280, FFECOM_GCC_INCLUDE, all derivitive defines, and all - related conditional compilation directives. - * bad.c, bld.c, bld.h, com.c, equiv.c, equiv.h, global.h, intdoc.c, - intrin.c, intrin.h, lex.c, parse.c, sta.c, std.c, ste.c, ste.h, stt.c, - stt.h, stw.h, symbol.c, symbol.h, target.h, top.c: Likewise. - -2001-10-17 Richard Henderson - - * Make-lang.in (f/com.o): Depend on langhooks.h. - * com.c: Include it. - (LANG_HOOKS_INIT, LANG_HOOKS_FINISH): New. - (LANG_HOOKS_INIT_OPTIONS, LANG_HOOKS_DECODE_OPTION): New. - (lang_hooks): Use LANG_HOOKS_INITIALIZER. - -Sun Oct 7 12:27:54 2001 Kaveh R. Ghazi - - * bad.c (_ffebad_message_, ffebad_messages_): Const-ify. - * bld.c (ffebld_arity_op_): Likewise. - * bld.h (ffebld_arity_op_): Likewise. - * com.c (ffecom_init_0): Likewise. - * intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, names, gens, imps, specs, cc_pair, - cc_descriptions, cc_summaries): Likewise. - * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_, - ffeintrin_imps_, ffeintrin_specs_): Likewise. - -2001-10-05 Toon Moene - - * news.texi: Document libf2c being built as a shared library. - Use of array elements in bounds of adjustable arrays ditto. - -2001-10-03 Toon Moene - - * Make-lang.in: Remove reference to FORTRAN_INIT. - * g77spec.c: Add reference to FORTRAN_INIT. - -2001-09-29 Juergen Pfeifer - - Make libf2c a shared library. - - * Make-lang.in: Pass define of frtbegin.o to compilation of g77spec.c. - * g77spec.c (lang_specific_driver): Treat linking in of frtbegin.o. - -2001-09-28 Robert Anderson - - * expr.c (ffeexpr_sym_rhs_dimlist_): Allow array elements - as bounds of adjustable arrays. - -Thu Sep 20 15:05:20 JST 2001 George Helffrich - - * com.c (ffecom_subscript_check_): Loosen subscript checking rules - for character strings, to permit substring expressions like - string(1:0). - * news.texi: Document this as a new feature. - -Thu Sep 13 10:33:27 2001 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Const-ification and/or static-ization. - * intrin.c (ffeintrin_cmp_name_): Likewise. - * stc.c (ffestc_R904): Likewise. - -Wed Sep 12 12:09:04 2001 Kaveh R. Ghazi - - * bld.c (ffebld_op_string_): Const-ification. - * com.c (ffecom_gfrt_name_, ffecom_gfrt_argstring_): Likewise. - * fini.c (xspaces): Likewise. - * global.c (ffeglobal_type_string_): Likewise. - * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, - ffeinfo_kind_string_, ffeinfo_kindtype_string_, - ffeinfo_where_string_): Likewise. - * lex.c (ffelex_type_string_): Likewise. - * malloc.c (malloc_types_): Likewise. - * stc.c (ffestc_subr_binsrch_, ffestc_R904, ffestc_R904, - ffestc_R907): Likewise. - * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_): - Likewise. - * version.c (ffe_version_string): Likewise. - * version.h (ffe_version_string): Likewise. - -2001-09-11 Richard Henderson - - * parse.c (finput): Mark extern. - -2001-09-11 Jakub Jelinek - - * com.c (ffe_init_options): Default to -fmerge-all-constants - if optimizing. - -2000-08-14 Ulrich Weigand - - * target.h (FFETARGET_32bit_longs): Don't define - for 64-bit S/390. - -2001-07-20 Toon Moene - - * com.c (ffecom_expr_intrinsic_): - case FFEINTRIN_impIBITS: Remove TREE_SHIFT_FULLWIDTH define. - case FFEINTRIN_impISHFT: Ditto. Change LT_EXPR to NE_EXPR. - case FFEINTRIN_impISHFTC: Ditto. - case FFEINTRIN_impMVBITS: Ditto. - -2001-07-19 Jakub Jelinek - - * top.c (ffe_decode_option): Disallow lang-independent processing - for -ffixed-form. - -2001-07-19 Toon Moene - - * f/com.c (ffecom_expr_intrinsic_): Deal (correctly) with - {L|R}SHIFT_EXPR not working when shift > size of type. - -2001-07-17 Toon Moene - - * com.c (lang_print_error_function): Argument context - is unused. - -2001-07-14 Tim Josling - - * com.c (ffecom_overlap_): Remove references to EXPON_EXPR. - (ffecom_tree_canonize_ref_): Likewise. - -2001-07-10 James Smaby - - * intdoc.in: Fix the definition of COMPLEX ABS. - Remove `the' where inappropriate. - * intdoc.texi: Rebuilt. - -2001-07-04 Joseph S. Myers - - * g77.texi: Use gpl.texi and funding.texi. Remove Look and Feel - section. Add Funding Free Software to invariant sections. - * Make-lang.in ($(srcdir)/f/g77.info, f/g77.dvi): Update - dependencies and use doc/include in search path. - -2001-06-28 Gabriel Dos Reis - - * Make-lang.in (f/com.o): Depend on diagnostic.h - * com.c: #include diagnostic.h - (lang_print_error_function): Take a 'diagnostic_context *'. - -Wed Jun 13 11:22:39 2001 Mark Mitchell - - * BUGS: Remove. - * NEWS: Likewise. - -2001-06-10 Toon Moene - - * g77install.texi: Remove. - * Make-lang.in: Remove all mention of g77install.texi. - * g77.texi: Add documentation on how to get output always - flushed and how to increase the maximum unit number. - Remove all mention of g77install.texi. - * bugs.texi: Add documentation on how to change the threshold - for putting local arrays on the stack. - -2001-06-03 Toon Moene - - * root.texi: Fix typo in patches e-mail address. - -2001-06-03 Toon Moene - Jan van Male - - * root.texi: Define `help' and `patches' mailing list - addresses. - * news.texi: Remove `prerelease' from 0.5.26 - * g77.texi: Use two spaces between command options, eliminate - some 'overfull hboxes'. Use help and patches mailing list - addresses where appropriate. - -2001-06-02 Joseph S. Myers - - * g77.texi: Move contents to just after title page. - -2001-06-02 Toon Moene - - * com.c (ffecom_init_0): Make CHARACTER*1 unsigned. - -2001-05-23 Theodore Papadopoulo - - * Make-lang.in ($(srcdir)/f/g77.info): Added dependencies on - fdl.texi. - (f/g77.dvi): Use TEXI2DVI instead of custom tex calls. Create the - dvi file in the f directory. - -2001-05-25 Sam TH - - * bad.h: Fix header include guards. - * bit.h bld.h com.h data.h equiv.h expr.h global.h - implic.h info.h intrin.h lab.h lex.h malloc.h name.h - proj.h src.h st.h sta.h stb.h stc.h std.h ste.h - storag.h stp.h str.h sts.h stt.h stu.h stv.h stw.h - symbol.h target.h top.h type.h version.h - where.h: Likewise. - -2001-05-22 Toon Moene - - * g77.texi: Update last-changed date. - * news.texi: Update copyright years, last-changed date. - * bugs.texi: Update copyright years, last-changed date. - -2001-05-22 Toon Moene - - * g77.texi: Update maintenance information for - GNU Fortran. Remove all mention of -fdebug-kludge. - * news.texi: Make more news in 0.5.26 `user visible - changes'. Acknowledge work by important contributors. - * bugs.texi: Remove all mention of -fdebug-kludge. - -2001-05-20 Joseph S. Myers - - * Make-lang.in (f/g77.dvi): Include $(srcdir) in TEXINPUTS. - -2001-05-19 Toon Moene - - * Make-lang.in: Have $(MAKEINFO) look into the parent - directory for includes. - * g77.texi: Use the GFDL. - -Sun May 13 12:25:06 2001 Mark Mitchell - - * Make-lang.in: Replace all uses of `touch' with $(STAMP). - -Wed May 2 10:20:08 2001 Kaveh R. Ghazi - - * com.c: NULL_PTR -> NULL. - -Sun Apr 22 20:18:01 2001 Kaveh R. Ghazi - - * com.c (ffecom_subscript_check_): Use concat in lieu of - xmalloc/sprintf. - -2001-04-21 Toon Moene - - * news.texi: Update release information for 0.5.27. - -Thu Apr 19 12:49:24 2001 Mark Mitchell - - * top.c (ffe_decode_option): Do not permit language-independent - processing for -ffixed-line-length. - -Thu Apr 12 17:57:55 2001 Kaveh R. Ghazi - - * bad.c (inhibit_warnings): Delete redundant declaration. - - * com.c (skip_redundant_dir_prefix): Likewise. - - * com.h (mark_addressable): Likewise. - -2001-04-02 Jakub Jelinek - - * lex.c (ffelex_hash_): Avoid eating one whole line after - #line. - -Mon Apr 2 22:38:09 2001 Toon Moene - - * com.c (duplicate_decls): Fix thinko in lazy DECL_RTL patch - of 2001-03-04. - -Tue Mar 27 17:40:08 2001 Kaveh R. Ghazi - - * Make-lang.in: Depend on $(SYSTEM_H), not system.h. - -Mon Mar 26 18:13:30 2001 Mark Mitchell - - * com.c (duplicate_decls): Don't copy DECL_FRAME_SIZE. - -Mon Mar 19 15:05:39 2001 Mark Mitchell - - * com.c (builtin_function): Use SET_DECL_ASSEMBLER_NAME. - -Wed Mar 14 09:29:27 2001 Mark Mitchell - - * com.c (ffecom_member_phase_2): Use COPY_DECL_RTL, - DECL_RTL_SET_P, etc. - (duplicate_decls): Likewise. - (start_decl): Likewise. - -Fri Mar 9 22:52:55 2001 Kaveh R. Ghazi - - * fini.c (main): Use really_call_malloc, not malloc. - -Thu Mar 8 13:27:47 2001 Kaveh R. Ghazi - - * com.c: Don't rely on the POSIX macro to define autoconf stuff. - -2001-03-07 Brad Lucier - - * g77.texi: Document new options -funsafe-math-optimizations - and -fno-trapping-math. Revise documentation for -ffast-math. - -2001-03-01 Zack Weinberg - - * proj.h: Delete 'bool' type. Don't include stddef.h here. - * com.c: Rename variables named 'true' and/or 'false'. - * intdoc.c: Delete 'bool' type. - -2001-03-01 Zack Weinberg - - * lang-specs.h: Add zero initializer for cpp_spec field to all - array elements. - -2001-02-24 Zack Weinberg - - * com.c: Don't define STDC_HEADERS, autoconf handles it. - -Fri Feb 23 15:28:39 2001 Richard Kenner - - * com.c (set_block): Set NAMES and BLOCKS from BLOCK. - -2001-02-19 Joseph S. Myers - - * version.c, root.texi: Update GCC version number to 3.1. Update - G77 version number to 0.5.27. - * BUGS, NEWS: Regenerate. - -Sun Feb 4 15:52:44 2001 Richard Kenner - - * com.c (ffecom_init_0): Call fatal_error instead of fatal. - * com.c (init_parse): Call fatal_io_error instead of - pfatal_with_name. - (ffecom_decode_include_option_): Make errors non-fatal. - * lex.c (ffelex_cfelex_, ffelex_get_directive_line_): Likewise. - (ffelex_hash_): Likewise. - -Sat Jan 27 20:52:18 2001 Kaveh R. Ghazi - - * Make-lang.in: Remove all dependencies on defaults.h. - * com.c: Don't include defaults.h. - -2001-01-23 Michael Sokolov - - * com.c: Don't explicitly include any time headers, the right ones are - already included by proj.h. - -2001-01-15 Mark Mitchell - - * com.c (ffecom_lookup_label): Set DECL_CONTEXT for FORMAT - label to current_function_decl. - -Fri Jan 12 17:21:33 2001 Joseph S. Myers - - * g77spec.c (lang_specific_driver): Update copyright year to 2001. - -Wed Jan 10 14:39:45 2001 Mark Mitchell - - * com.c (ffecom_init_zero_): Remove last argument in call to - make_decl_rtl; use make_function_rtl instead of make_decl_rtl. - (ffecom_lookup_label_): Likewise. - (builtin_function): Likewise. - (start_function): Likewise. - -Thu Dec 21 21:19:42 2000 Joseph S. Myers - - * g77install.texi, g77.texi: Update last-updated dates for - installation information and the manual as a whole. - * bugs.texi, news.texi: Update copyright years in the comments at - the top of the file. - -2000-12-21 Joseph S. Myers - - * g77install.texi: Adjust wording of an EGCS reference. - -Thu Dec 21 20:00:48 2000 Joseph S. Myers - - * BUGS, NEWS: Regenerate. - -2000-12-18 Joseph S. Myers - - * com.c [VMS]: Remove definition of BSTRING. - -2000-12-18 Joseph S. Myers - - * g77.texi: Update GPL copy not to refer to years 19@var{yy}. - -2000-12-18 Toon Moene - - * bugs.texi: Correct copyright years. - * g77.texi: Likewise. - * news.texi: Likewise. - -2000-12-18 Joseph S. Myers - - * g77install.texi: Remove obsolete parts only used for INSTALL, - and DOC-G77 conditionals. Update last-update-install date. - -Sat Dec 9 10:20:11 2000 Joseph S. Myers - - * .cvsignore: New file; add info files. - -2000-12-08 Joseph S. Myers - - * Make-lang.in (f77.info): Depend on info files in source - directory. - (f/g77.info): Build info files in source directory; don't build - them unless BUILD_INFO is "info". - (f77.install-info): Install info files from source directory. - -2000-12-07 Zack Weinberg - - * Make-lang.in: Link f/fini with safe-ctype.o. - * bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c). - * com.c: Use TOUPPER, not ffesrc_toupper. - * fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c). - * intrin.c: Don't test IN_CTYPE_DOMAIN(c). - * src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their - initializing code; use TOUPPER and TOLOWER instead of - ffesrc_toupper and ffesrc_tolower. - * src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_. - Don't define ffesrc_toupper or ffesrc_tolower. - -2000-11-28 Richard Henderson - - * com.c (ffecom_member_phase2_): Set TREE_USED on the debugging decl. - -2000-11-26 Joseph S. Myers - - * RELEASE-PREP: Remove obsolete EGCS reference. - * g77.texi: Adjust reference to EGCS as something current. - * lang-options.h (FTNOPT): Remove macro and obsolete comment. - Include doc strings directly in option listing instead of through - this macro. - * root.texi: Remove support for multiple different (FSF and EGCS) - distributions of g77. - * g77install.texi: Remove conditioned out instructions applying - only to obsolete distributions of g77 not as part of GCC. Change - "superceded" to the correct spelling "superseded". - -Sun Nov 26 19:25:56 2000 Joseph S. Myers - - * g77spec.c (lang_specific_driver): Update copyright year to 2000. - -Thu Nov 23 02:18:57 2000 J"orn Rennecke - - * Make-lang.in (g77spec.o): Depend on $(CONFIG_H). - -2000-11-21 David Billinghurst - - * g77.texi (Floating-point Exception Handling): Use feenableexcept - in example. - (Floating-point precision): Change to match above change. - -Sun Nov 19 17:29:22 2000 Matthias Klose - - * g77.texi (Floating-point precision): Adjust example - to work with glibc (>= 2.1). - -Sat Nov 18 13:54:49 2000 Matthias Klose - - * g77.texi (Floating-point Exception Handling): Adjust - example to work with glibc (>= 2.1). - -2000-11-18 Alexandre Oliva - - * Make-lang.in (INTDOC_DEPS): New macro. - (f/intdoc.texi): Depend on $(INTDOC_DEPS). Build f/intdoc. - (f/intdoc): Likewise. Add $(build_exeext). - -2000-11-17 Zack Weinberg - - * lex.c (ffelex_hash_): Change ggc_alloc_string (var, -1) to - ggc_strdup (var). - -Thu Nov 16 23:14:07 2000 Kaveh R. Ghazi - - * malloc.c (malloc_init): Call xmalloc, not malloc. - -2000-11-10 Rodney Brown - - * Make-lang.in: Remove OUTPUT_OPTION from g77version.o target. - -2000-11-10 Toon Moene - - * root.texi: Remove non-historical EGCS reference. - Set current g77 version to 0.5.26. - -2000-11-10 Toon Moene - - * com.c (ffecom_stabilize_aggregate_) case RTL_EXPR: Abort. - -2000-11-10 Zack Weinberg - - * Make-lang.in (f/fini.o, f/proj-h.o): Remove pointless sed - munging of source file name. - ($(srcdir)/f/intdoc.texi): Break up into several rules each of - which builds just one thing. Don't mess with $(LANGUAGES). - (f/ansify.o, f/intdoc.o): Remove unnecessary rules. - -2000-11-05 Toon Moene - - * root.texi, news.texi, g77install.texi, g77.texi, bugs.texi: - Remove non-historical references to egcs/EGCS. - -2000-11-05 Joseph S. Myers - - * Make-lang.in: Remove f77.distdir and f/INSTALL. - * INSTALL, install0.texi: Remove. - -2000-11-02 Joseph S. Myers - - * com.c (open_include_file, ffecom_open_include_): Use strchr () - and strrchr () instead of index () and rindex (). - -2000-10-27 Zack Weinberg - - * Make-lang.in: Move all build rules here from Makefile.in, - adapt to new context. Wrap all rules that change the current - directory in parentheses. Expunge all references to $(P). - When one command depends on another and they're run all at - once, use && to separate them, not ;. Add OUTPUT_OPTION to - all object-file generation rules. Delete obsolete variables. - - * Makefile.in: Delete. - * config-lang.in: Delete outputs= line. - -Sat Oct 21 18:07:48 2000 Joseph S. Myers - - * Makefile.in, g77spec.c: Remove EGCS references in comments. - -Thu Oct 12 22:28:51 2000 Mark Mitchell - - * com.c (ffecom_do_entry_): Don't mess with obstacks. - (ffecom_finish_global_): Likewise. - (ffecom_finish_symbol_transform_): Likewise. - (ffecom_gen_sfuncdef_): Likewise. - (ffecom_init_zero_): Likewise. - (ffecom_start_progunit_): Likewise. - (ffecom_sym_transform_): Likewise. - (ffecom_sym_transform_assign_): Likewise. - (ffecom_transform_equiv_): Likewise. - (ffecom_transform_namelist_): Likewise. - (ffecom_vardesc_): Likewise. - (ffecom_vardesc_array_): Likewise. - (ffecom_vardesc_dims_): Likewise. - (ffecom_end_transition): Likewise. - (ffecom_make_tempvar): Likewise. - (bison_rule_pushlevel_): Likewise. - (bison_rule_compstmt_): Likewise. - (finish_decl): Likewise. - (finish_function): Likewise. - (push_parm_decl): Likewise. - (start_decl): Likewise. - (start_function): Likewise. - (ggc_p): Don't define. - * std.c (ffestd_stmt_pass_): Likewise. - * ste.c (ffeste_end_block_): Likewise. - (ffeste_end_stmt_): Likewise. - (ffeste_begin_iterdo_): Likewise. - (ffeste_io_ialist_): Likewise. - (ffeste_io_cilist_): Likewise. - (ffeste_io_inlist_): Likewise. - (ffeste_io_olist_): Likewise. - (ffeste_R810): Likewise. - (ffeste_R838): Likewise. - (ffeste_R839): Likewise. - (ffeste_R842): Likewise. - (ffeste_R843): Likewise. - (ffeste_R1001): Likewise. - -2000-10-05 Richard Henderson - - * com.c (finish_function): Don't init can_reach_end. - -Sun Oct 1 11:43:44 2000 Mark Mitchell - - * com.c (lang_mark_false_label_stack): Remove. - -2000-09-10 Zack Weinberg - - * com.c: Include defaults.h. - * com.h: Don't define the *_TYPE_SIZE macros. - * Makefile.in: Update dependencies. - -2000-08-29 Zack Weinberg - - * ansify.c: Use #line, not # . - -2000-08-24 Greg McGary - - * intdoc.c (ARRAY_SIZE): Remove macro. - * proj.h (ARRAY_SIZE): Remove macro. - * com.c (init_decl_processing): Use ARRAY_SIZE. - -2000-08-22 Toon Moene - - * com-rt.def: Adapt macro DEFGFRT to accept CONST boolean. - * com.c (macro DEFGFRT): Use CONST boolean. - (ffecom_call_binop_): Choose between call by value - and call by reference. - (ffecom_expr_): Use direct calls to (g)libc functions for - POW_DD, LOG10, (float) MOD. - (ffecom_make_gfrt_): Add const indication to table of - intrinsics. - * com.h (macro DEFGFRT): Use CONST boolean. - * intrin.def: Adjust DEFIMP definition of LOG10, (float) MOD. - -2000-08-21 Nix - - * lang-specs.h: Do not process -o or run the assembler if - -fsyntax-only. Use %j instead of /dev/null. - -2000-08-21 Jakub Jelinek - - * lang-specs.h: Pass -I* options to f771. - -2000-08-19 Toon Moene - - * top.c (ffe_decode_option): Disable -fdebug-kludge - and warn about it. - * lang-options.h: Document the fact. - * g77.texi: Ditto. - -2000-08-13 Toon Moene - - * bugs.texi: Describe new ability to emit debug info - for EQUIVALENCE members. - * news.texi: Ditto. - -2000-08-11 G. Helffrich - Toon Moene - - * com.c (ffecom_transform_equiv_): Make EQUIVALENCEs addressable - so that debug info can be attached to their storage. - Unconditionally list the storage set aside for them. - -2000-08-07 Toon Moene - - * g77spec.c (lang_specific_driver): Clearer g77 version message. - -2000-08-04 Zack Weinberg - - * Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist. - * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. - (f771): Link with $(BACKEND). - -2000-08-02 Zack Weinberg - - * g77spec.c: Adjust type of second argument to - lang_specific_driver, and update code as necessary. - - * expr.c (ffeexpr_finished_): Cast signed side of ?: - expression to bool. - -2000-07-31 Zack Weinberg - - * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. - -Thu Jul 27 11:50:08 2000 Kaveh R. Ghazi - - * fini.c (main): Avoid automatic aggregate initialization. - - * proj.h: Indent #error directive. - -2000-07-26 Toon Moene - - * lang-specs.h: Remove one /dev/null from tradcpp invocation. - -Sun Jul 23 15:47:30 2000 Billinghurst, David - - * Make-lang.in: Put $(build_exeext) suffix on programs which run - on the build machine. - -2000-07-22 Toon Moene - - * com.c (ffecom_expr_intrinsic_): case FFEINTRIN_impFGETC_subr, - FFEINTRIN_impFPUTC_subr: Check for arg3 being NULL. - -2000-07-13 Zack Weinberg - - * lang-specs.h: Use the new named specs. Remove unnecessary braces. - -2000-07-02 Toon Moene - - * version.c: Bump version number. - -2000-06-21 Zack Weinberg - - * Make-lang.in (F77_SRCS): Remove all .j files. - * Makefile.in (ASSERT_H, CONFIG_H, CONVERT_H, FLAGS_H, GGC_H, - GLIMITS_H, HCONFIG_H, INPUT_H, OUTPUT_H, RTL_H, SYSTEM_H, - TOPLEV_H, TREE_H): Remove references to .j files. - (TCONFIG_H, TM_H): Remove entirely. - (deps-kinda): Delete rule. - Correct commentary. - - * assert.j, config.j, convert.j. flags.j, ggc.j, glimits.j, - hconfig.j, input.j, output.j, rtl.j, system.j, toplev.j, - tree.j, tconfig.j, tree.j: Delete. - - * ansify.c, bad.c, bit.c, com.c, com.h, intdoc.c, lex.c, - parse.c, proj.c, proj.h, ste.c, target.c, target.h, top.c, - where.c, where.h: Include parent-directory headers directly. - * lex.c: Don't include tree.h twice. - -2000-05-17 H.J. Lu (hjl@gnu.org) - - * Make-lang.in: Use a unique stamp for each target to support - parallel make. - -Thu Jun 15 14:03:14 2000 Kaveh R. Ghazi - - * ste.c (gbe_block): Constify. - -2000-06-13 Jakub Jelinek - - * com.c (ffecom_transform_common_): Set DECL_USER_ALIGN. - (ffecom_transform_equiv_, ffecom_decl_field): Likewise. - (ffecom_init_0): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN. - (duplicate_decls): Set DECL_USER_ALIGN. - -Sun Jun 11 00:03:00 2000 Kaveh R. Ghazi - - * com.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. - -2000-06-04 Philipp Thomas - - * Makefile.in(INTLLIBS): New macro. - (LIBS): Add INTLLIBS. - (DEPLIBS): Likewise. - -2000-06-02 Richard Henderson - - * com.c (lang_get_alias_set): New. - -2000-05-28 Toon Moene - - * bugs.texi: Note that debugging information for - common block items is emitted now. - * news.texi: Ditto. - -2000-05-18 Chris Demetriou - - * com.h (FFECOM_f2cINTEGER, FFECOM_f2cLONGINT): Note that - these types correspond to built-in types now defined in - the C front end (for libf2c). - -Wed May 17 17:27:44 2000 Andrew Cagney - - * top.c (ffe_decode_option): Update -Wall unused flags by calling - set_Wunused. - -2000-05-09 Zack Weinberg - - * com.c (ffecom_subscript_check_): Constify array_name - parameter. Clean up string bashing. - (ffecom_arrayref_, ffecom_char_args_x_): Constify array_name - parameter. - (ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, - ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify - local char *. - (init_parse): Constify parameter and return value. - * lex.c: Include dwarfout.h instead of prototyping dwarfout_* - functions here. - (ffelex_file_pop_, ffelex_file_push_): Constify filename parameter. - (ffelex_hash_, ffelex_include_): Constify local char *. - * std.c (ffestd_exec_end): Constify local char *. - * where.c (ffewhere_file_new): Constify filename parameter. - * where.h: Update prototypes. - -2000-05-06 Zack Weinberg - - * com.c (ffecom_overlap_): Set source_offset to - bitsize_zero_node. - (ffecom_tree_canonize_ptr_): Use size_binop. Convert to - bitsizetype before multiplying by TYPE_SIZE. - (ffecom_tree_canonize_ref_) [case ARRAY_REF]: Break up offset - calculation. Convert to bitsizetype before multiplying by - TYPE_SIZE. - -2000-04-18 Zack Weinberg - - * lex.c: Remove references to cccp.c. - * g77install.texi: Remove references to cexp.c/cexp.y. - -2000-04-15 David Edelsohn - - * target.h (FFETARGET_32bit_longs): Define for 64-bit PowerPC - as well. - -Wed Apr 12 15:15:26 2000 Mark Mitchell - - * com.h (FFECOM_f2cINTEGER): Avoid using LONG_TYPE_SIZE as a - preprocessor constant. - (FFECOM_f2cLOGICAL): Likewise. - (FFECOM_f2cLONGINT): Likewise. - -Wed Apr 5 17:46:39 2000 Mark Mitchell - - * Makefile.in (GGC_H): Add varray.h. - -2000-04-03 Zack Weinberg - - * lang-specs.h: Pass -fno-show-column to the preprocessor. - -2000-03-28 Franz Sirl - - * com.c (ffecom_decl_field): Use DECL_ALIGN for a FIELD_DECL. - (ffecom_init_0): Likewise. - -Sat Mar 25 09:12:10 2000 Richard Kenner - - * com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. - (ffecom_tree_canonize_ref_): Likewise. - -Mon Mar 20 15:49:40 2000 Jim Wilson - - * f/target.h (FFETARGET_32bit_longs): New. Define for alpha, sparc64, - and ia64. - (ffetargetInteger1, ffetargetLogical1, ffetargetReal1, ffetargetReal2, - ffetarget_integerdefault_is_magical): Use FFETARGET_32bit_longs. - -Fri Mar 10 00:43:55 2000 Jason Merrill - - * com.c (ffecom_stabilize_aggregate_): Don't refer to TREE_RAISES. - -Mon Mar 6 18:05:19 2000 Richard Kenner - - * com.c (ffecom_f2c_set_lio_code_): Use compare_tree_int. - (ffecom_sym_transform_, ffecom_transform_common_): Likewise. - (ffecom_transform_equiv_): Likewise. - -Mon Mar 6 13:01:19 2000 Kaveh R. Ghazi - - * ansify.c (die_unless): Don't use ANSI string concatenation. - (die): Mark with ATTRIBUTE_NORETURN. - -Wed Mar 1 00:31:44 2000 Martin von Loewis - - * com.c (current_function_decl): Move to toplev.c. - -Sun Feb 27 16:40:33 2000 Richard Kenner - - * com.c (ffecom_arrayref_): Convert args to size_binop to proper type. - (ffecom_tree_canonize_ptr_): Don't use size_binop for non-sizes. - (ffecom_tree_canonize_ref_): Likewise. - (type_for_mode): Handle TImode. - * ste.c (ffeste_io_dofio_, ffeste_io_douio_): Use TYPE_SIZE_UNIT. - (ffeste_io_ciclist_): Likewise. - -2000-02-23 Zack Weinberg - - * com.c (ffecom_type_permanent_copy_): Delete unused function. - (finish_decl): Don't change TREE_PERMANENT (DECL_INITIAL (decl)). - -Sat Feb 19 18:43:13 2000 Richard Kenner - - * com.c (ffecom_sym_transform): Use DECL_SIZE_UNIT. - (ffecom_transform_common_, ffecom_transform_equiv_): Likewise. - (duplicate_decls): Likewise. - (ffecom_tree_canonize_ptr_): Delete extra arg to bitsize_int. - (finish_decl): Delete -Wlarger-than processing. - -Fri Feb 18 13:19:34 2000 Martin von Loewis - - * g77spec.c (lang_specific_driver): Use GCCBUGURL. - -2000-02-17 Andy Vaught - - * com.c (ffecom_member_phase2_): Re-enable COMMON debug code. - (ffecom_finish_symbol_transform_): Likewise. - (ffecom_transform_common_): Call ffestorag_set_hook. - -Wed Feb 16 11:09:38 2000 Kaveh R. Ghazi - - * Make-lang.in (g77spec.o): Depend on $(GCC_H), not gcc.h. - -2000-02-15 Jonathan Larmour - - * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. - -Tue Feb 15 11:14:17 2000 Kaveh R. Ghazi - - * g77spec.c: Don't declare `version_string'. - -Sat Feb 5 23:27:25 2000 Kaveh R. Ghazi - - * com.c (mark_tracker_head, mark_binding_level): Protoize. - - * where.c (mark_ffewhere_head): Likewise. - -Wed Jan 12 09:32:59 2000 Zack Weinberg - - * lang-specs.h: Pass -lang-fortran to preprocessor. - -Thu Dec 30 13:14:31 1999 Richard Henderson - - * stw.h (struct _ffestw_): Change type of uses_ to int. - -Thu Dec 30 11:42:05 1999 Geoff Keating - - * com.c (ffecom_init_0): Make double_ftype_double, - float_ftype_float, ldouble_ftype_ldouble, - ffecom_tree_ptr_to_fun_type_void local. - (tracker_head): New static variable. - (mark_tracker_head): New, marker procedure for tracker_head. - (ffecom_save_tree_forever): New procedure. - (ffecom_init_zero_): Remove obstack use. - (ffecom_make_gfrt_): Remove obstack use. - (ffecom_sym_transform_): Remove obstack use, save appropriate trees. - (ffecom_transform_common_): Remove obstack use, save appropriate - trees. - (ffecom_type_namelist_): Remove obstack use, save appropriate - trees. - (ffecom_type_vardesc_): Remove obstack use, save appropriate trees. - (ffecom_lookup_label): Remove obstack use, save appropriate trees. - (duplicate_decls): Remove obstack use. - (finish_function): push & pop ggc context around - rest_of_compilation when building nested function. - (mark_binding_level): New function. - (init_decl_processing): Mark all the GC roots. - (ggc_p): Set to 1. - (lang_mark_tree): New function. - (lang_mark_false_label_stack): New trivial function. - * com.h (ffecom_save_tree_forever): Declare as external. - * lex.c (ffelex_hash_): Use GC to allocate the filename string - even when ffelex_kludge_flag_. - * ste.c (ffeste_io_ialist_): Register a static root. - (ffeste_io_inlist_): Likewise. - (ffeste_io_icilist_): Likewise. - (ffeste_io_cllist_): Likewise. - (ffeste_io_cilist_): Likewise. - (ffeste_io_olist_): Likewise. - * Makefile.in (OBJS): Don't use ggc-callbacks.o. - (OBJDEPS): Likewise. - (GGC_H): New variable. - Update dependencies. - * where.c (ffewhere_head): New global. - (mark_ffewhere_head): New marker procedure for ffewhere_head. - (ffewhere_file_kill): Use GC to do memory management. - (ffewhere_file_new): Use GC to do memory management. - * ggc.j: New file. - -Wed Dec 29 19:29:26 1999 Gerald Pfeifer - - * g77.texi (C Interfacing Tools): Fix an incorrect link. - -1999-12-13 Jakub Jelinek - - * target.h: Handle sparc64 the same way as alpha. - -Sun Nov 28 21:39:05 1999 Kaveh R. Ghazi - - * com.c (ffecom_file_, ffecom_file, file_buf, - ffecom_open_include_): Constify a char*. - (ffecom_possible_partial_overlap_): Mark parameter `expr2' with - ATTRIBUTE_UNUSED. - (ffecom_init_0): Use a fully prototyped cast in call to bsearch. - (lang_print_error_function): ANSI-fy. - - * com.h (ffecom_file): Constify a char*. - - * fini.c (main): Call return, not exit. - - * g77spec.c (lang_specific_driver): Use non-const *in_argv in - assignment. - - * intrin.c (ffeintrin_cmp_name_): Don't needlessly cast away - const-ness. - -Sun Nov 28 21:15:29 1999 Kaveh R. Ghazi - - * com.c (ffecom_get_invented_identifier): Rewrite to take an ellipses. - - (ffecom_char_enhance_arg_, ffecom_do_entry_, - ffecom_f2c_make_type_, ffecom_gen_sfuncdef_, - ffecom_start_progunit_, ffecom_start_progunit_, - ffecom_start_progunit_, ffecom_sym_transform_assign_, - ffecom_transform_equiv_, ffecom_transform_namelist_, - ffecom_vardesc_, ffecom_vardesc_array_, ffecom_vardesc_dims_, - ffecom_end_transition, ffecom_lookup_label, ffecom_temp_label): - Adjust accordingly. - - * com.h (ffecom_get_invented_identifier): Likewise. - - * sts.c (ffests_printf): New function taking ellipses. - (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s, - ffests_printf_2Us): Delete. - - * sts.h: Likewise. - - * std.c (ffestd_R1001dump_, ffestd_R1001dump_1005_1_, - ffestd_R1001dump_1005_2_, ffestd_R1001dump_1005_3_, - ffestd_R1001dump_1005_4_, ffestd_R1001dump_1005_5_, - ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_, - ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_, - ffestd_R1001rtexpr_): Call `ffests_printf', not `ffests_printf_*'. - - * ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_, - ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_): Likewise. - -Wed Nov 10 12:43:21 1999 Philippe De Muyter - Kaveh R. Ghazi - - * proj.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. - -Tue Oct 26 01:32:19 1999 Mark Mitchell - - * com.c (poplevel): Don't call remember_end_note. - -Fri Oct 15 15:18:12 1999 Greg McGary - - * top.h (ffe_is_subscript_check_): Remove extern decl. - (ffe_is_subscript_check, ffe_set_is_subscript_check): Remove macros. - * top.c (ffe_is_subscript_check_): Remove global variable. - (ffe_decode_option): Remove "(no-)bounds-check" flag handling. - Set flag_bounds_check for "(no-)fortran-bounds-check". - * com.c - (ffecom_arrayref_): s/ffe_is_subscript_check ()/flag_bounds_check/ - (ffecom_char_args_x_): Ditto. - -Sun Oct 10 08:40:18 1999 Kaveh R. Ghazi - - * proj.h: Use HAVE_GCC_VERSION instead of explicitly testing - __GNUC__ and __GNUC_MINOR__. Don't define BUILT_WITH_270. Define - macro UNUSED in terms of ATTRIBUTE_UNUSED. - -Fri Sep 24 10:48:10 1999 Bernd Schmidt - - * com.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than - DECL_BUILT_IN. - (builtin_function): No longer static. New arg CLASS. Arg - FUNCTION_CODE now of type int. All callers changed. - Set the builtin's DECL_BUILT_IN_CLASS. - -Tue Sep 21 09:08:30 1999 Toon Moene - - * g77spec.c (lang_specific_driver): Initialize return value. - -Thu Sep 16 18:07:11 1999 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Use uppercase ctype macro from system.h. - - * fini.c (main): Likewise. - - * intrin.c (ffeintrin_init_0): Likewise. - - * lex.c (ffelex_hash_): Likewise. - - * src.c (ffesrc_init_1): Likewise. - -Tue Sep 14 12:14:28 1999 Kaveh R. Ghazi - - * g77spec.c (lang_specific_driver): Remove unnecessary argument in - call to function `fatal'. - -Sun Sep 12 23:29:47 1999 Kaveh R. Ghazi - - * Make-lang.in (g77spec.o): Depend on system.h and gcc.h. - - * g77spec.c: Include gcc.h. - (g77_xargv): Constify. - (g77_fn): Add parameter prototypes. - (lookup_option, append_arg): Add static prototypes. - (g77_newargv): Constify. - (lookup_option, append_arg, lang_specific_driver): Constify a char*. - (lang_specific_driver): All calls to the function pointer - parameter now explicitly call `fatal'. - -Fri Sep 10 10:32:32 1999 Bernd Schmidt - - * com.h: Delete declarations for all tree nodes now moved to - global_trees. - * com.c: Delete their definitions. - (ffecom_init_0): Call build_common_tree_nodes and - build_common_tree_nodes_2 instead of building their nodes here. - Override their decisions for complex nodes. - -Sat Sep 4 13:46:27 1999 Mark Mitchell - - * Make-lang.in (f771): Depend on ggc-callbacks.o. - * Makefile.in (OBJS): Add ggc-callbacks.o. - (OBJDEPS): Likewise. - -Mon Aug 30 22:05:53 1999 Kaveh R. Ghazi - - * com.c (language_string): Constify. - -Mon Aug 30 20:29:30 1999 Kaveh R. Ghazi - - * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a. - Remove hacks for stuff which now comes from libiberty. - -Sun Aug 29 09:47:45 1999 Kaveh R. Ghazi - - * com.c (lang_printable_name): Constify a char*. - -Wed Aug 25 01:21:06 1999 Rainer Orth - - * lang-specs.h: Pass cc1 spec to f771. - -Mon Aug 9 19:44:08 1999 Kaveh R. Ghazi - - * com.c (lang_print_error_function): Constify a char*. - (init_parse): Remove redundant prototype for `print_error_function'. - (lang_identify): Constify a char*. - -Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com) - - * g77spec.c: Update URLS and mail addresses. - * root.texi: Update URLS and mail addresses. - -1999-07-25 Richard Henderson - - * com.c (ptr_type_node, va_list_type_node): New. - (ffecom_init_0): Init and use ptr_type_node. - -1999-07-17 Alexandre Oliva - - * root.texi: Update e-mail addresses to gcc.gnu.org. - * g77spec.c (lang_specific_driver): Updated URL with bug reporting - instructions to gcc.gnu.org. Removed e-mail address. - -Sat Jul 17 11:28:43 1999 Craig Burley - - * root.texi, g77install.texi: Switchover to GCC terminology. - Also, FSF-G77 had been mistakenly set at some point. - -Thu Jul 8 15:38:50 1999 Craig Burley - - * news.texi: Describe DATE intrinsic fix. - -Mon Jun 28 21:44:19 1999 Craig Burley - - * version.c: Denote experimental version. - -Mon Jun 28 10:43:11 1999 Craig Burley - - * com.c (ffecom_prepare_expr_): A COMPLEX intrinsic needs - a temp even if -fno-f2c. - - * version.c: Bump version. - -Mon Jun 28 21:31:35 1999 Craig Burley - - * bugs.texi, news.texi: Doc upgrade to netlib libf2c as of today. - Explain that this fixes the NAMELIST-read bug. - -Fri Jun 25 11:06:32 1999 Craig Burley - - * bugs.texi: Describe K(5)=10*3 NAMELIST-read bug. - -Mon Jun 21 12:40:17 1999 Gerald Pfeifer - - * g77.texi: Update links. - -Mon Jun 21 05:33:51 1999 Jeffrey A Law (law@cygnus.com) - - * news.texi: Add missing @end ifclear. - -Fri Jun 18 11:43:46 1999 Craig Burley - - * news.texi: Doc TtyNam fix. - -Fri Jun 18 11:26:50 1999 Craig Burley - - * news.texi: New heading for development version. - Doc upgrade to netlib libf2c as of today. - -Wed Jun 16 11:43:02 1999 Craig Burley - - * news.texi: Mention BACKSPACE fix to libg2c. - -Mon Jun 7 08:42:40 1999 Craig Burley - - * Make-lang.in: Any target using libsubdir must depend - on installdirs. - -Sat Jun 5 23:50:36 1999 Craig Burley - - * g77.texi: Describe a few more missing features people - have emailed me about. - -Sat Jun 5 17:03:23 1999 Craig Burley - - From Dave Love to egcs-patches on 20 May 1999 17:38:38 +0100: - * g77.texi: Clean up fossil text vis-a-vis Intel CPUs. - -Fri Jun 4 13:56:56 1999 Craig Burley - - * Make-lang.in: Use libsubdir, not prefix, to store - temporary lang-f77 `flag' file. - -Fri Jun 4 10:26:04 1999 Craig Burley - - * news.texi (News): Mention GCC 2.95 in favor of EGCS 1.2. - Mention that libg2c is multilibbed. - -Fri Jun 4 10:09:50 1999 Craig Burley - - * g77.texi (Missing Features): Add `Better Warnings' - item. - -Fri May 28 16:51:41 1999 Craig Burley - - * g77.texi: Fix thinko. - -Wed May 26 14:43:27 1999 Craig Burley - - * news.texi: Document Tue May 18 03:52:04 1999 patch. - Fix a grammo. - -Wed May 26 14:25:07 1999 Craig Burley - - * g77.texi, news.texi, root.texi, version.c: Start renaming - EGCS 1.2 to GCC 2.95, and start using 0.5.25 to designate - the version of g77 within GCC 2.95. - -Wed May 26 11:45:21 1999 Craig Burley - - Rename -fsubscript-check to -fbounds-check and - -ff2c-subscript-check to -ffortran-bounds-check: - * g77.texi: Rename options in docs, clarify usage. - * lang-options.h: Rename options, clarify doclets. - * news.texi: Rename options, don't bother with fortran-specific - option. - * top.c (ffe_decode_option): Rename recognized strings. - -Tue May 25 18:21:09 1999 Craig Burley - - * com.c (FFECOM_FASTER_ARRAY_REFS): Delete this vestige, - now that -fflatten-arrays exists. - -Tue May 25 17:48:34 1999 Craig Burley - - Fix 19990525-0.f: - * com.c (ffecom_arg_ptr_to_expr): Strip off parens around - CHARACTER expression. - (ffecom_prepare_expr_): Ditto. - -Tue May 18 03:52:04 1999 Craig Burley - - Support use of back end's improved open-coding of complex divide: - * com.c (ffecom_tree_divide_): Use RDIV_EXPR for complex divide, - instead of run-time call to [cz]_div, if `-Os' option specified. - (lang_init_options): Tell back end we want support for wide range - of inputs to complex divide. - - * Bump version. - -Tue May 18 00:21:34 1999 Zack Weinberg - - * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc - was not given. - -Thu May 13 12:23:20 1999 Craig Burley - - Fix INTEGER*8 subscripts in array references: - * com.c (ffecom_subscript_check_): Convert low, high, and - element as necessary to make comparison work. - (ffecom_arrayref_): Do more of the work. - Properly handle subscript expr that's wider than int, - if pointers are wider than int. - (ffecom_expr_): Leave more work to ffecom_arrayref_. - (ffecom_init_0): Record sizes of pointers and ints for - convenience. - Use set_sizetype etc. as done by gcc front end. - (ffecom_ptr_to_expr): Leave more work to ffecom_arrayref_. - * expr.c (ffeexpr_finished_): Don't convert INTEGER subscript - expressions in run-time contexts. - (ffeexpr_token_elements_, ffeexpr_token_substring_1_): Cope with - non-default INTEGER subscript expressions. - * news.texi: Announce. - - Finish accepting -fflatten-arrays option: - * com.c (ffecom_arrayref_): Flatten references if requested. - * g77.texi: Describe. - * lang-options.h: Allow. - * news.texi: Announce. - * top.c, top.h: Recognize. - - * version.c: Bump version. - -Wed May 12 07:30:05 1999 Craig Burley - - * com.c (lang_init_options): Disable back end's maintenance - of errno. - * news.texi: Document dropping of errno. - -1999-05-10 18:21 -0400 Zack Weinberg - - * lang-specs.h: Pass -$ to the preprocessor. - -Mon May 10 18:14:28 1999 Craig Burley - - * g77.texi: Fix various @xref's per proper style. - Go ahead and use nested braces in @xref's, with care. - * g77install.texi: Fix @xref per proper style. - -Mon May 10 17:38:39 1999 Craig Burley - - * news.texi: Doc upgrade to netlib libf2c as of today. - -Sun May 9 18:52:13 1999 Hans-Peter Nilsson - - * f/g77spec.c (lang_specific_driver): Correct bug-report address - and point to the FAQ. - -Thu May 6 12:40:21 1999 Craig Burley - - * g77.texi (Arbitrary Concatenation): Put this under - "Missing Features" instead of "Projects". - (Internals Documentation): Point to new "Front End" chapter. - -Thu May 6 08:23:52 1999 Craig Burley - - * bugs.texi, news.texi: Automatic arrays reportedly working - on HP-UX systems. - -Thu May 6 08:19:31 1999 Craig Burley - - * g77.texi (Advantages Over f2c): Expand on this topic. - -Mon May 3 19:41:48 1999 Craig Burley - - * com.c (ffecom_expr_intrinsic_): Fix test of CTIME_subr. - -Mon May 3 18:11:48 1999 Craig Burley - - Reverse order of two arguments to CTIME_subr, DTIME_subr, - ETIME_subr, and TTYNAM_subr: - * com.c (ffecom_expr_intrinsic_): Reverse the arguments. - While at it, set TREE_SIDE_EFFECTS for CTIME_subr and - TTYNAM_subr. - * intdoc.in: Document the new calling sequences. - * intrin.def: Reverse the arguments. - * news.texi: Document the fact that they changed. - * version.c: Bump version. - -Mon May 3 11:28:14 1999 Craig Burley - - * news.texi: Doc upgrade to netlib libf2c as of today. - -Sun May 2 17:04:28 1999 Craig Burley - - * version.c: Bump version. - -Sun May 2 16:53:01 1999 Craig Burley - - Fix compile/19990502-1.f: - * ste.c (ffeste_R819B): Don't overwrite tree for temp - variable when expanding the assignment into it. - -Sun Apr 25 20:55:10 1999 Craig Burley - - Fix 19990325-0.f and 19990325-1.f: - * com.c (ffecom_possible_partial_overlap_): New function. - (ffecom_expand_let_stmt): Use it to determine whether to assign - to a COMPLEX operand through a temp. - * news.texi: Document fix. - - * version.c: Bump version. - -Sat Apr 24 12:19:53 1999 Craig Burley - - * expr.c (ffeexpr_finished_): Convert DATA implied-do - start/end/incr expressions to default INTEGER. - Fix some broken conditionals. - Clean up some code in the region. - * news.c: Document the fix. - - * version.c: Bump version. - -Fri Apr 23 02:08:32 1999 Craig Burley - - * g77.texi (Compiler Prototypes): Replace "missing" subscript- - checking option with something else. - -Fri Apr 23 01:48:28 1999 Craig Burley - - Support new -fsubscript-check and -ff2c-subscript-check options: - * com-rt.def (FFECOM_gfrtRANGE): Describe s_rnge, in libf2c/libF77. - * com.c (ffecom_subscript_check_, ffecom_arrayref_): New functions. - (ffecom_char_args_x_): Use new ffecom_arrayref_ function for - FFEBLD_opARRAYREF case. - Compute character name, array type, and use new - ffecom_subscript_check_ function for FFEBLD_opSUBSTRING case. - (ffecom_expr_): Use new ffecom_arrayref_ function. - (ffecom_ptr_to_expr): Use new ffecom_arrayref_ function. - * g77.texi, news.texi: Document new options. - * top.c, top.h: Support new options. - - * news.texi: Fix up some items to not be in "User-Visible Changes". - - * ste.c (ffeste_R819B): Fix type for loop variable, to avoid - warnings. - - * version.c: Bump version. - -Tue Apr 20 01:38:57 1999 Craig Burley - - * bugs.texi, news.texi: Clarify -malign-double situation. - -Tue Apr 20 01:15:25 1999 Craig Burley - - * stb.c (ffestb_R5282_): Convert DATA repeat count - to default INTEGER, to avoid problems downstream. - - * version.c: Bump version. - -Mon Apr 19 21:36:48 1999 Craig Burley - - * ste.c (ffeste_R819B): Start the loop before expanding - the termination expression. - - * version.c: Bump version. - -Sun Apr 18 21:53:58 1999 Craig Burley - - * com.c (ffecom_sym_transform_): COMMON and EQUIVALENCE - variables have constant addresses (EQUIVALENCE only if - containing aggregate is static). - -Sat Apr 17 16:55:59 1999 Craig Burley - - * bugs.texi, ffe.texi, g77.texi, g77install.texi, news.texi: - Clean up @code{} vs. @samp{}. - Clean up dashes (`--') vs. @minus{} vs. `---'. - - * ffe.texi: Add copyright header. - - * g77.texi, lang-options.h, news.texi, top.c (ffe_decode_option): - Remove support for -fugly option. - Clarify that -fugly-logint is needed instead of -fugly - to work around using .EQ./.NE. on LOGICAL operands. - Explain more about why -fugly-logint is bad juju. - - * g77.texi (Missing Features): Describe READONLY as a missing - feature. Describe AUTOMATIC better. - - * news.texi: Mention libf2c upgrade. - -Sat Apr 17 14:05:53 1999 Craig Burley - - Make a place for front-end internals documentation: - * Make-lang.in (f/g77.info, f/g77.dvi): Depend on f/ffe.texi. - * ffe.texi: New file, containing docs on front-end internals. - * g77.texi: New chapter for, and inclusion of, ffe.texi. - - * g77.texi: Fix an index entry. - -Sat Apr 17 13:53:43 1999 Craig Burley - - Rewrite to use block/scope structure of GBE and to ensure - variables (especially those going on stack/reg) are declared - before executable code generated: - * bld.c (ffebld_new_item, ffebld_new_one, ffebld_new_two): - Support new hooks. - * bld.h (ffebld_item_hook, ffebld_item_set_hook, - ffebld_nonter_hook, ffebld_nonter_set_hook): Ditto. - * bld.h (ffebld_basictype, ffebld_kind, ffebld_kindtype, - ffebld_rank, ffebld_where): New convenience macros (used - by rest of this patch). - * com.c, com.h (ffecom_push_calltemps, ffecom_pop_calltemps, - ffecom_push_tempvar, ffecom_pop_tempvar): Remove temp-var- - handling mechanism. - * com.c (ffecom_call_, ffecom_call_binop_, ffecom_tree_divide_, - ffecom_call_gfrt): Support passing hooks for temp-var info. - (ffecom_expr_power_integer_): Takes opPOWER expression, instead - of its left and right operands, so it can get at the hook. - (ffecom_prepare_let_char_, ffecom_prepare_arg_ptr_to_expr, - ffecom_prepare_end, ffecom_prepare_expr_, ffecom_prepare_expr_rw, - ffecom_prepare_expr_w, ffecom_prepare_return_expr, - ffecom_prepare_ptr_to_expr): New functions supporting expression - pre-scanning. - (bison_rule_compstmt_): Return the tree, as in the CFE. - (delete_block): New function, from CFE. - (kept_level_p): New function, from CFE, modified. - (ffecom_start_compstmt, ffecom_end_compstmt): New functions, - replacing ffecom_start_compstmt_ and ffecom_end_compstmt_ macros, - and they do real work. - (struct binding_level): Add prep_state member. Initialize to 0. - (ffecom_get_invented_identifier): Now takes either or both a - string and an integer, using -1 to denote no integer. - (ffecom_do_entry_): Disallow temp-var generation via expressions - in body of function, since the exprs aren't prescanned. - (ffecom_expr_rw): Now takes destination tree. - (ffecom_expr_w): New function, now used in some places - ffecom_expr_rw had been used. - (ffecom_expr_intrinsic_): Move huge f2c-related comment to bottom - of source file, to avoid annoying problems editing com.c using - Emacs C-mode. - (ffecom_expr_power_integer_): Make a temp var for division, if - necessary. - Handle expanded statement expression as does CFE. - (ffecom_start_progunit_): Disallow temp-var generation in body - of function, since expressions are not prescanned at this level. - (ffecom_sym_transform_): Transform ASSIGN variables as well, - so these are all transformed up front, before code-generation - begins. - (ffecom_arg_ptr_to_const_expr, ffecom_const_expr, - ffecom_ptr_to_const_expr): New functions to transform expressions - only if the results will surely be constants. - (ffecom_arg_ptr_to_expr): Precompute size, for convenience - obtaining temp vars. - (ffecom_expand_let_stmt): Guess at usability of destination - pre-expansion, to provide better prescan preparation (fewer - spurious temp vars). - (ffecom_init_0): Disallow temp-var generation in global scope. - (ffecom_type_expr): New function, returns just the type tree - for the expression. - (start_function): Disallow temp-var generation in parm scope. - (incomplete_type_error): Fix introductory comment. - (poplevel): Update (somewhat) from CFE. - (pushlevel): Update (somewhat) from CFE. - * stc.c (ffestc_R838): Mark ASSIGNed variable as so. - * std.c (ffestd_stmt_pass_, ffestd_R803, ffestd_R804, ffestd_R805, - ffestd_R806): Remember and pass through the ffestw block info - for these (IFTHEN, ELSEIF, ELSE, and ENDIF) statements. - * ste.c (ffeste_end_iterdo_): Now takes ffestw block argument. - (ffeste_io_inlist_): Add prototype. - (ffeste_f2c_*): Macros rewritten, new ones added. - (ffeste_start_block_, ffeste_end_block_, ffeste_start_stmt_, - ffeste_end_stmt_): New macros/functions, depending on whether - checking is enabled, to keep track of symmetry of other ste.c code. - (ffeste_begin_iterdo_, ffeste_end_iterdo_, ffeste_io_impdo_, - ffeste_io_dofio_, ffeste_io_dolio_, ffeste_io_douio_, - ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_, - ffeste_icilist_, ffeste_io_inlist_, ffeste_io_olist_, - ffeste_subr_beru_, ffeste_do, ffeste_end_R807, ffeste_R737A, - ffeste_R803, ffeste_R804, ffeste_R805, ffeste_R806, ffeste_R807, - ffeste_R809, ffeste_R810, ffeste_R811, ffeste_R819A, ffeste_R819B, - ffeste_R837, ffeste_R838, ffeste_R839, ffeste_R840, ffeste_R904, - ffeste_R907, ffeste_R909_start, ffeste_R909_item, ffeste_R909_finish, - ffeste_R910_start, ffeste_R910_item, ffeste_R910_finish, - ffeste_R911_start, ffeste_R911_item, ffeste_R911_finish, - ffeste_R923A, ffeste_R1212, ffeste_R1227): Prescan/prepare - all pertinent expressions, update to new com.c interface, etc. - (ffeste_io_impdo_): Relocate. - (ffeste_R834, ffeste_R835, ffeste_R836, ffeste_R1226): Don't - bother calling clear_momentary, nothing was generated. - (ffeste_R842, ffeste_R843): Update to new com.c interface. - (ffeste_R1226): Don't try to stuff error_mark_node's DECL_INITIAL. - (ffeste_terminate_2): When checking enabled, make sure all blocks - and statements have been ended. - * ste.h (ffeste_R803, ffeste_R804, ffeste_R805, ffeste_R806): - These now take ffestw block argument. - (ffeste_terminate_2): When checking enabled, it's a function, not - a macro. - * stw.h (struct _ffestw_): New variable for IFTHEN. - (ffestw_ifthen_fake_else, ffestw_set_ifthen_fake_else): New - accessor macros. - * symbol.c, symbol.h: Support new ASSIGN'ed-to info. - - * com.c: Clean up commentary per GNU coding standards. - - * bld.h (ffebld_size, ffebld_size_known): Canonize. - - * version.c: Bump version. - -Sun Apr 11 21:33:33 1999 Mumit Khan - - * g77spec.c (lang_specific_driver): Check whether MATH_LIBRARY is - null to decide whether to use it. - -Wed Apr 7 09:47:09 1999 Kaveh R. Ghazi - - * ansify.c (die): Specify void argument. - - * intdoc.c (family_name, dumpgen, dumpspec, dumpimp, - argument_info_ptr, argument_info_string, argument_name_ptr, - argument_name_string, elaborate_if_complex, - elaborate_if_maybe_complex, elaborate_if_real, print_type_string): - Const-ify a char*. - (main): Mark parameter `argv' with ATTRIBUTE_UNUSED. - (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, cc_pair, descriptions, summaries): Const-ify a char*. - -Mon Apr 5 11:57:54 1999 Donn Terry (donn@interix.com) - - * Make-lang.in (HOST_CFLAGS): compute dynamically. - -Mon Apr 5 02:11:23 1999 Craig Burley - - Fix bugs exposed by configuring with --enable-checking: - * com.c (ffecom_do_entry_, ffecom_expr_, ffecom_arg_ptr_to_expr, - ffecom_list_expr, ffecom_list_ptr_to_expr, finish_function, - pop_f_function_context, store_parm_decls, poplevel): Handle - error_mark_node properly. - * ste.c (ffeste_begin_iterdo_, ffeste_end_iterdo_): Ditto. - * version.c: Bump version. - -Sat Apr 3 23:57:56 1999 Craig Burley - - * g77.texi: Fix up docs for -fset-g77-defaults, and - describe how internal consistency checking now happens. - (Should have been done for EGCS version 1.1.) - -Sat Apr 3 23:29:33 1999 Craig Burley - - * bugs.texi, g77.texi, lang-options.h, news.texi, top.c: - Make -fno-emulate-complex the default, as COMPLEX support - in the back end is now believed to be working. - - * version.c: Bump version. - -Fri Apr 2 13:33:16 1999 Craig Burley - - * g77.texi: -malign-double now works. - Give URL for alignment-testing package. - * news.texi: -malign-double now works. - -Fri Apr 2 12:49:12 1999 Craig Burley - - * g77.texi (Funding GNU Fortran): Dude's got a web page. - * root.texi: Ditto. - -Tue Mar 30 12:04:11 1999 Kaveh R. Ghazi - - * sta.c (ffesta_ffebad_1sp, ffesta_ffebad_1st, ffesta_ffebad_2st): - Const-ify a char*. - - * sta.h (ffesta_ffebad_1sp, ffesta_ffebad_1st, ffesta_ffebad_2st): - Likewise. - - * stb.c (ffestb_local_u_): Likewise. - (ffestb_do, ffestb_dowhile, ffestb_else, ffestb_elsexyz, - ffestb_else3_, ffestb_endxyz, ffestb_goto, ffestb_let, - ffestb_type, ffestb_type1_, ffestb_varlist, ffestb_R423B, - ffestb_R522, ffestb_R528, ffestb_R542, ffestb_R834, ffestb_R835, - ffestb_R838, ffestb_R841, ffestb_R1102, ffestb_blockdata, - ffestb_R1212, ffestb_R1228, ffestb_V009, ffestb_module, - ffestb_R809, ffestb_R810, ffestb_R10014_, ffestb_R10015_, - ffestb_R10018_, ffestb_R1107, ffestb_R1202, ffestb_R12026_, - ffestb_S3P4, ffestb_V012, ffestb_V014, ffestb_V025, ffestb_V0255_, - ffestb_V020, ffestb_dimlist, ffestb_dummy, ffestb_R524, - ffestb_R547, ffestb_decl_chartype, ffestb_decl_dbltype, - ffestb_decl_gentype, ffestb_decl_recursive, ffestb_decl_entsp_2_, - ffestb_decl_func_, ffestb_V003, ffestb_V016, ffestb_V027, - ffestb_decl_R539): Likewise. - - * stb.h (_ffestb_args_): Likewise. - - * stc.c (ffestc_subr_binsrch_, ffestc_subr_is_present_, - ffestc_subr_speccmp_, ffestc_R904, ffestc_R907): Likewise. - - * std.c (ffestd_R1001dump_1005_1_, ffestd_R1001dump_1005_2_, - ffestd_R1001dump_1005_3_, ffestd_R1001dump_1005_4_, - ffestd_R1001dump_1005_5_, ffestd_R1001dump_1010_1_, - ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_, - ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_): Likewise. - - * ste.c (ffeste_begin_iterdo_, ffeste_subr_file_): Likewise. - - * sts.c (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s, - ffests_printf_2Us, ffests_puts, ffests_puttext): Likewise. - - * sts.h (ffests_printf_1D, ffests_printf_1U, ffests_printf_1s, - ffests_printf_2Us, ffests_puts, ffests_puttext): Likewise. - - * stt.c (ffestt_exprlist_drive, ffestt_implist_drive, - ffestt_tokenlist_drive): Add prototype arguments. - - * stt.h (ffestt_exprlist_drive, ffestt_implist_drive, - ffestt_tokenlist_drive): Likewise. - - * stu.c (ffestu_dummies_transition_): Likewise. - (ffestu_sym_end_transition): Const-ify a char*. - - * stw.c (ffestw_display_state, ffestw_new, ffestw_pop): Add - prototype arguments. - - * stw.h (ffestw_display_state, ffestw_new, ffestw_pop): Likewise. - - * version.c (ffe_version_string): Const-ify a char*. - - * version.h (ffe_version_string): Likewise. - -Sat Mar 27 13:00:43 1999 Kaveh R. Ghazi - - * bad.c (_ffebad_message_, ffebad_string_, ffebad_message_, - ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string, - ffebad_finish): Const-ify a char*. - - * bld.c (ffebld_op_string_, ffebld_op_string): Likewise. - - * bld.h (ffebld_op_string): Likewise. - - * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_, - ffecom_debug_kludge_, ffecom_f2c_make_type_, - ffecom_get_appended_identifier_, ffecom_get_identifier_, - ffecom_gfrt_args_): Likewise. - (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype. - (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_, - ffecom_arglist_expr_, ffecom_build_f2c_string_, - ffecom_debug_kludge_, ffecom_f2c_make_type_, - ffecom_get_appended_identifier_, ffecom_get_external_identifier_, - ffecom_get_identifier_, ffecom_decl_field, - ffecom_get_invented_identifier, lang_print_error_function, - skip_redundant_dir_prefix, read_name_map, print_containing_files): - Const-ify a char*. - (savestring): Remove, use `xstrdup' instead. - - * com.h (ffecom_decl_field, ffecom_get_invented_identifier): - Const-ify a char*. - - * data.c (ffebld, ffedata_gather_): Make explicitly static. - - * expr.c (ffeexpr_isdigits_, ffeexpr_percent_, - ffeexpr_reduced_concatenate_, ffeexpr_nil_real_, - ffeexpr_nil_number_, ffeexpr_nil_number_period_, - ffeexpr_nil_number_real_, ffeexpr_token_real_, - ffeexpr_token_number_, ffeexpr_token_number_period_, - ffeexpr_token_number_real_): Const-ify a char*. - - * fini.c (xspaces): Likewise. - - * global.c (ffeglobal_type_string_): Likewise. - (ffeglobal_drive): Protoize. - (ffeglobal_proc_def_arg): Const-ify a char*. - - * global.h (ffeglobal_drive): Protoize. - (ffeglobal_proc_def_arg): Const-ify a char*. - - * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type): - Likewise. - - * implic.h (ffeimplic_peek_symbol_type): Likewise. - - * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, - ffeinfo_kind_string_, ffeinfo_kindtype_string_, - ffeinfo_where_string_, ffeinfo_basictype_string, - ffeinfo_kind_message, ffeinfo_kind_string, - ffeinfo_kindtype_string, ffeinfo_where_string): Likewise. - - * info.h (ffeinfo_basictype_string, ffeinfo_kind_message, - ffeinfo_kind_string, ffeinfo_kindtype_string, - ffeinfo_where_string): Likewise. - - * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, - _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_, - ffeintrin_fulfill_specific, ffeintrin_init_0, - ffeintrin_is_actualarg, ffeintrin_is_intrinsic, - ffeintrin_name_generic, ffeintrin_name_implementation, - ffeintrin_name_specific): Likewise. - - * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic, - ffeintrin_name_implementation, ffeintrin_name_specific): Likewise. - - * lex.c (ffelex_type_string_, ffelex_token_new_character, - ffelex_token_new_name, ffelex_token_new_names, - ffelex_token_new_number): Likewise. - - * lex.h (ffelex_token_new_character, ffelex_token_new_name, - ffelex_token_new_names, ffelex_token_new_number): Likewise. - - * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_, - malloc_new_zinpool_): Likewise. - - * malloc.h (malloc_new_inpool_, malloc_new_zinpool_, - malloc_pool_new): Likewise. - - * name.c (ffename_space_drive_global, ffename_space_drive_symbol): - Protoize. - - * name.h (ffename_space_drive_global, ffename_space_drive_symbol): - Likewise. - - * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_, - ffesymbol_attrs_string): Const-ify a char*. - (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. - (ffesymbol_state_string): Const-ify a char*. - - * symbol.h (ffesymbol_attrs_string): Likewise. - (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. - (ffesymbol_state_string): Const-ify a char*. - - * target.c (ffetarget_layout): Likewise. - - * target.h (ffetarget_layout): Likewise. - -1999-03-25 Zack Weinberg - - * Make-lang.in: Remove all references to g77.o/g77.c. - Link g77 from gcc.o. - -1999-03-21 Manfred Hollstein - - * Makefile.in (g77$(exeext)): Depend on intl.o. Link in intl.o. - -Wed Mar 17 11:39:44 1999 Craig Burley - - * news.texi: Editorial fix. - -Mon Mar 15 17:12:07 1999 Craig Burley - - * bugs.texi, g77.texi, news.texi: Editorial fixes. - -Sat Mar 13 17:51:55 1999 Craig Burley - - Fix 19990313-0.f, 19990313-1.f, 19990313-2.f, 19990313-3.f: - * bad.def (FFEBAD_NOCANDO): New error code for internal use only. - * expr.c (ffeexpr_collapse_convert): If FFEBAD_NOCANDO returned - by convertor, just return original expr. - * target.h: Return FFEBAD_NOCANDO for (usually) 64-bit - conversions that aren't yet working properly. - * news.texi: Explain. - - * version.c: Bump version. - -Sat Mar 13 14:26:55 1999 Craig Burley - - * RELEASE-PREP: New file, lists things to do for a release. - - * Make-lang.in, bugs.texi, bugs0.texi, g77.texi, g77install.texi, - install0.texi, news.texi, news0.texi: Accommodate new doc - architecture. - Consolidate news items. Don't describe old news items in - various generated docs. - Don't describe FSF-g77 installation stuff in various EGCS-g77 - generated docs. - Move description of AUTOMATIC to more suitable location. - * root.texi: New file for new doc architecture. - -Thu Mar 11 17:32:55 1999 Craig Burley - - * g77.texi: Add AUTOMATIC to list of unsupported extensions. - -Sat Mar 6 02:28:35 1999 Craig Burley - - Warn about non-Y2K-compliant intrinsics: - * bad.def (FFEBAD_INTRINSIC_Y2KBAD): New diagnostic. - * intrin.def (FFEINTRIN_impDATE, FFEINTRIN_impIDATE_vxt): - Use new DEFIMPY macro to flag these as non-Y2K-compliant. - * intdoc.c (DEFIMPY): Support new Y2K macro. - * intrin.h (DEFIMPY): Ditto. - * intrin.c (DEFIMPY): Ditto. - (ffeintrin_fulfill_generic, ffeintrin_fulfill_specific): - Warn about invocation of non-Y2K-compliant intrinsic. - * com-rt.def (FFECOM_gfrtDATE, FFECOM_gfrtVXTIDATE): - Rename external procedure names, to keep previously- - compiled (sans-new-warnings) code from linking to - new library. - * g77.texi: Document all this stuff. - * news.texi: Spread the joy. - * version.c: Bump version. - -Fri Mar 5 13:22:44 1999 Craig Burley - - * news.texi: Relocate IDATE (VXT) fix: we put it in 1.1.2 - so describe it there, instead of under 1.2. - -Wed Mar 3 00:57:56 1999 Craig Burley - - * news.texi: IDATE (VXT) fixed to return year as 0..99. - -Wed Mar 3 00:43:49 1999 Craig Burley - - * g77.texi: Add remaining changes pending from Dave Love. - -Wed Mar 3 00:38:42 1999 Craig Burley - - * bugs.texi, news.texi: Conditionalize cross-references - on non-html processing, providing temporary HTML "links". - - * g77.texi: Fix up a reference. - -Wed Mar 3 00:12:31 1999 Craig Burley - - * news.texi, bugs.texi: Delete fixed bugs, make one - of them into the appropriate news item. - -Wed Mar 3 00:05:52 1999 Craig Burley - - * news.texi: Copy over 1.1.2 news. - -1999-03-02 Craig Burley - - * g77.texi (Bug Reporting): Clarify whether to use -E. - Clarify other instructions. - -1999-02-27 Craig Burley - - * lang-specs.h: Fix specs to pass `-ax' as well as `-a' option. - -1999-02-26 Craig Burley - - * intdoc.in (STAT_func, STAT_subr, - FSTAT_func, FSTAT_subr, LSTAT_func, LSTAT_subr): - Properly order array elements. Specify N/A return values. - -1999-02-26 Craig Burley - - * intdoc.in (DATE_AND_TIME): Explain that VALUES(7) holds - seconds, and VALUES(8), therefore, milliseconds. - -1999-02-26 Craig Burley - - * news.texi: Clarify IOSTAT= fix. - -1999-02-25 Richard Henderson - - * lang-specs.h: Define __FAST_MATH__ when appropriate. - -1999-02-25 Craig Burley - - * g77.texi: Clarify/index lack of run-time allocation for - concatenation. - -1999-02-25 Andreas Jaeger - - * f/intdoc.in: Add missing `,' after cross references. - -1999-02-20 Craig Burley - - * Make-lang.in (f77.install-common, f77.install-info, - f77.install-man, f77.uninstall): Use `$(prefix)/lang-f77' - instead of `lang-f77' for flag file, to be sure of a - writable directory, and remove the flag file after each - operation to keep things clean. - -1999-02-20 Craig Burley - - * g77.texi: Properly attribute Priest document; clarify - that it is in the .ps version of the Goldberg document. - -1999-02-19 Craig Burley - - * bugs0.texi, bugs.texi, install0.texi, g77install.texi, - news0.texi, news.texi: Update copyright dates. - Clarify which files are source, which are derived, - and remind maintainers where copyright dates are sourced. - * BUGS, INSTALL, NEWS: Regenerated. - -1999-02-19 Craig Burley - - * global.c (ffeglobal_ref_progunit_): Warn about a function - definition that disagrees with the type of a previous reference. - Improve commentary. Fix a couple of minor bugs. Clean up - some code. - * news.texi: Spread the joy. - -1999-02-18 Craig Burley - - * expr.c (ffeexpr_finished_): Disallow non-default INTEGER - as argument for FILEINT and FILEASSOC as lhs. - * news.texi: Document fix. - * version.c: Bump. - -1999-02-18 Craig Burley - - * g77.texi: Clarify -fno-globals vs. -Wno-globals. - -1999-02-18 Craig Burley - - * intdoc.in (LOG10): Fix typo. - -1999-02-17 Ulrich Drepper - - * intdoc.in: Fix typo. - -1999-02-17 Craig Burley - - * g77.texi, intdoc.in: Document Y2K and some other known - limitations. - * intrin.def (DTIME, FDATE): Fix capitalization of - case-sensitive forms of these intrinsics' names. - -1999-02-17 Dave Love - - * intdoc.in: Say `common' logarithm for log10. - -1999-02-16 Ulrich Drepper - - * g77.texi: Add missing @ in email addresses. - -1999-02-15 Craig Burley - - * *.*: Delete my (old) email address in most places, change it - in a few. - -1999-02-14 Craig Burley - - * version.c: Bump. - -1999-02-14 Craig Burley - - * version.c: Bump for 1998-10-02 change (forgot to do this - before). - -1999-02-14 Craig Burley - - * lang-specs.h, g77.1, g77.texi, news.texi: Recognize `.FOR' - and `.FPP' as well as `.for' and `.fpp'. - -1999-02-14 Craig Burley - - * intdoc.in (LOG10): Fix description. - -1999-02-14 Craig Burley - - * news.texi: Mention fix for SIGNAL invocation circa egcs-1.1. - -1999-02-14 Craig Burley - - * g77.texi, g77install.texi, bugs.texi, g77install.texi: Clean - up and improve indexing, and some other areas of docs. - -1999-02-14 Craig Burley - - * intdoc.in (MCLOCK8, TIME8): Warn about lower range on - 32-bit systems. - -Sat Feb 6 18:02:17 1999 Jeffrey A Law (law@cygnus.com) - - * g77.texi: Update email addresses. - -Wed Feb 3 22:50:17 1999 Marc Espie - - * Make-lang.in (g77$(exeext)): Get choose-temp.o, pexecute.o and - mkstemp.o from libiberty. - -1999-02-01 Zack Weinberg - - * top.c: Don't define ffe_is_ident_. Don't process - -f(no-)ident here. - * top.h: Remove declaration of ffe_is_ident_ and macros - ffe_is_ident() and ffe_set_is_ident(). - * lex.c: Use flag_no_ident instead of ffe_is_ident(). - -Sun Jan 31 20:34:29 1999 Zack Weinberg - - * lang-specs.h: Map -Qn to -fno-ident. - -Tue Jan 5 22:12:41 1999 Kaveh R. Ghazi - - * Make-lang.in (g77.o): Depend on prefix.h. - -Fri Nov 27 13:10:32 1998 Kaveh R. Ghazi - - * fini.c: Rename variable `spaces' to `xspaces' to avoid - conflicting with function `spaces' from libiberty. - - * g77spec.c: Don't prototype libiberty functions. - * malloc.c: Likewise. - -1998-11-20 Dave Love - - * g77.texi: Assorted minor changes. - -1998-11-19 Dave Love - - * bugs.texi: Formatting changes from Craig. - - * intdoc.in: Terminate some @xrefs with `,'. - -1998-11-19 Manfred Hollstein - - * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir). - -Mon Nov 9 23:15:39 1998 Jeffrey A Law (law@cygnus.com) - - * g77.texi, news.texi: Updates from Craig. - -Sun Nov 8 17:47:56 1998 Kaveh R. Ghazi - - * Makefile.in (INCLUDES): Add "-I$(srcdir)/../../include". - -Sat Nov 7 15:58:54 1998 Kaveh R. Ghazi - - * g77spec.c: Don't include gansidecl.h. - * output.j: Likewise. - -1998-11-04 Dave Love - - * g77.texi: Small formatting/indexing fixes. - -Mon Oct 12 20:41:59 1998 Kaveh R. Ghazi - - * bad.c (ffebad_finish): Change type of variable `c' to unsigned - char, change type of variable `s' to unsigned char *. - - * com.c (ffecom_symbol_null_): Add missing initializers. - - * fini.c (MAXNAMELEN): Undef it before defining. - - * implic.c (ffeimplic_lookup_): Change type of parameter `c' to - unsigned char. - - * intrin.c (ffeintrin_init_0): Cast the argument of ctype macros - to (unsigned char). - - * lex.c (ffelex_splice_tokens): Change type of variable `p' to - unsigned char *. - (ffelex_token_name_from_names): Cast the argument of - `ffelex_is_firstnamechar' to (unsigned char). - (ffelex_token_names_from_names): Likewise. - (ffelex_token_new_name): Likewise. - (ffelex_token_new_names): Likewise. - - * malloc.c (malloc_root_): Add missing initializer. - - * stb.c (ffestb_do): Change type of variable `p' to unsigned char *. - (ffestb_else) Likewise. - (ffestb_else3_) Likewise. - (ffestb_endxyz) Likewise. - (ffestb_goto) Likewise. - (ffestb_let) Likewise. - (ffestb_varlist) Likewise. - (ffestb_R522) Likewise. - (ffestb_R528) Likewise. - (ffestb_R834) Likewise. - (ffestb_R835) Likewise. - (ffestb_R838) Likewise. - (ffestb_R1102) Likewise. - (ffestb_blockdata) Likewise. - (ffestb_R1212) Likewise. - (ffestb_R810) Likewise. - (ffestb_R10014_): Cast the argument of `ffelex_is_firstnamechar' - to (unsigned char). - (ffestb_V014): Change type of variable `p' to unsigned char *. - (ffestb_dummy) Likewise. - (ffestb_R524) Likewise. - (ffestb_R547) Likewise. - (ffestb_decl_chartype) Likewise. - (ffestb_decl_dbltype) Likewise. - (ffestb_decl_gentype) Likewise. - (ffestb_decl_entsp_2_) Likewise. - (ffestb_V027) Likewise. - (ffestb_decl_R539) Likewise. - - * top.c (ffe_decode_option): Mark parameter `argc' with - ATTRIBUTE_UNUSED. - - * where.c (ffewhere_unknown_line_): Add missing initializers. - -1998-10-02 Dave Love - - * com.c (ffecom_expr_intrinsic_): Fix return type for RAND. - -Thu Oct 1 10:43:45 1998 Nick Clifton - - * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with - HANDLE_GENERIC_PRAGMAS. - -Mon Sep 28 04:22:00 1998 Jeffrey A Law (law@cygnus.com) - - * news.texi: Update from Craig. - -1998-09-23 Dave Love - - * g77.texi: Additions about `/*', trailing comments and cpp. - -1998-09-18 Dave Love - - * g77.texi: Various additions and some small fixes. - -Thu Sep 10 14:55:44 1998 Kamil Iskra - - * Make-lang.in (f77.install-common): Add missing "else true;". - -1998-09-07 Dave Love - - * ChangeLog.egcs: Deleted. Entries merged here. - -1998-09-05 Dave Love - - * Makefile.in (LDFLAGS): Set from BOOT_LDFLAGS. - (F771_LDFLAGS): Variable dispensed with. - -Fri Sep 4 19:53:34 1998 Craig Burley - - * intdoc.in: Minor editorial tweaks. - -Fri Sep 4 18:35:52 1998 Craig Burley - - * lang-options.h: Convert to wrap option and doc string - in a new macro invocation, FTNOPT, so the nearly identical - list can be used in FSF-g77. - -Fri Sep 4 18:35:52 1998 Craig Burley - - * Makefile.in (fini.o): Don't define USE_HCONFIG here. - * fini.c: Define USE_HCONFIG here instead, so deps-kinda - picks up correct dependency. - - * Makefile.in (proj-h.o): Fix dependencies list. - -Wed Sep 02 09:25:29 1998 Nick Clifton - - * lex.c (ffe_lex_hash): Change how HANDLE_PRAGMA and - HANDLE_SYSV_PRAGMA would be called if they pragma parsing was - enabled in this code. - Generate warning messages if unknown pragmas are encountered. - (pragma_getc): New function: retrieves characters from the - input stream. Defined when HANDLE_PRAGMA is defined. - (pragma_ungetc): New function: replaces characters back into the - input stream. Defined when HANDLE_PRAGMA is defined. - -Tue Sep 1 10:00:21 1998 Craig Burley - - * bugs.texi, g77.1, g77.texi, intdoc.in, news.texi: Doc updates - from Craig. - -1998-08-23 Dave Love - - * g77.texi: Increment `version-g77' and fix a few typos. - -Tue Aug 18 21:41:31 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in: Add several "else true" clauses to deal with lame - systems. - -Tue Aug 11 08:12:14 1998 H.J. Lu (hjl@gnu.org) - - * Make-lang.in (g77.o): Touch lang-f77 before checking it. - -1998-08-09 Dave Love - - * Make-lang.in (f/g77.dvi): Replace non-working use of texi2dvi - with explicit use of tex. - (f77.mostlyclean): Remove TeX index files. - - * g77install.texi (Prerequisites): Kluge round TeX lossage with - hyphen in @value in @code. - -Tue Aug 4 16:59:39 1998 Craig Burley - - * com.c (ffecom_convert_narrow_, ffecom_convert_widen_): - Allow conversion from pointer to same-sized integer, - to fix invoking SIGNAL as a function. - -1998-07-26 Dave Love - - * BUGS, INSTALL, NEWS: Rebuilt. - -Sat Jul 25 17:23:55 1998 Craig Burley - - Fix 980615-0.f: - * stc.c (ffestc_R1229_start): Set info to ANY as well. - -Tue Jul 21 04:33:37 1998 Craig Burley - - * g77spec.c (lang_specific_driver): Return unmolested - command line when --help seen. - Comment out code that printed g77-specific --help info. - -Sat Jul 18 19:16:48 1998 Craig Burley - - * lang-options.h: Fix up doc strings. - Remove the unimplemented -fdcp-intrinsics-* options. - - * str-1t.fin: Change mixed-case spelling of `GoTo' from - `Goto'. - -Thu Jul 16 13:26:36 1998 Craig Burley - - * com.c (ffecom_finish_symbol_transform_): Revert change - of 1998-05-23, as it was too aggressive, in that it - prevented transformation of (used) functions before - primary code generation. - -1998-07-15 Dave Love - - * intdoc.texi: Regenerated. - -Mon Jul 13 18:45:06 1998 Craig Burley - - * Make-lang.in (f77.rebuilt): Fix to depend on - build-dir-based, not source-based, g77.info. - - * g77.texi: Merge docs with 0.5.24. - * g77install.texi: Ditto. - -Mon Jul 13 18:02:29 1998 Craig Burley - - Cleanups vis-a-vis g77-0.5.24: - * g77spec.c (lang_specific_driver): Tabify source. - * top.c (ffe_decode_option): Use fixed macro to set - internal-checking flag. - * top.h (ffe_set_is_do_internal_checks): Fix macro. - -Mon Jul 13 17:33:44 1998 Craig Burley - - Cleanups vis-a-vis system.h cutover and g77-0.5.24: - * Makefile.in (fini.o): Define USE_HCONFIG macro - so source code doesn't have to. - * fini.c: Don't define USE_HCONFIG here, since - source code usually shouldn't care about this. - * ansify.c: Include stddef.h only if we have it. - * intdoc.c: Ditto. - * proj.h: Ditto. - -Mon Jul 13 17:30:29 1998 Nick Clifton - - * lang-options.h: Format changed to work with --help support added - to gcc/toplev.c - -Mon Jul 13 11:54:03 1998 Craig Burley - - * com.c (ffecom_push_tempvar): Replace kludge that - munged back-end globals directly with proper calls - to push_topmost_sequence and pop_topmost_sequence. - -1998-07-12 Dave Love - - * version.c: Bump version. - -Sat Jul 11 19:24:32 1998 Craig Burley - - Fix 980616-0.f: - * equiv.c (ffeequiv_offset_): Don't crash on various - possible ANY operands. - -Sat Jul 11 18:24:37 1998 Craig Burley - - * com.c (ffecom_expr_) [FFEBLD_opCONTER]: Die if padding - for constant is nonzero. - - * com.c (__eprintf): Delete this function, it is obsolete. - -1998-07-09 Dave Love - - * intdoc.in (HOSTNM_func, HOSTNM_subr): Update last change. - -Thu Jul 9 00:45:59 1998 Craig Burley - - Fix debugging of CHARACTER*(*), etc., which requires - emitting debug info on types like `ftnlen': - * com.c (ffecom_start_progunit_): Don't bother - resetting "invented" flag for identifier. - (ffecom_transform_equiv_): Don't bother zeroing - "ignored" flag for decl. - (pushdecl): No longer set "ignored", "used", or - "suppressed debug" flags for decls having "invented" - identifiers. - -1998-07-06 Mike Stump - - * Make-lang.in (f77.stage?): Use mv -f instead of just mv so that - we can move g77.c. - -1998-07-06 Dave Love - - * intdoc.in (HOSTNM_func, HOSTNM_subr): Note possible need for - -lsocket. - -1998-07-05 Dave Love - - * intdoc.in: Add entry for DATE_AND_TIME. - - * intrin.def: Add implementation for DATE_AND_TIME. Make second - and third args of SYSTEM_CLOCK optional. - - * com.c (ffecom_expr_intrinsic_): New case for DATE_AND_TIME. - - * com-rt.def (FFECOM_gfrtSYSTEM_CLOCK): Call G77_system_clock_0, - not system_clock_. - (FFECOM_gfrtDATE_AND_TIME): New DEFGFRT. - -Wed Jul 1 11:19:13 1998 Craig Burley - - Fix 980701-1.f (which was producing "unaligned trap" - on an Alpha running GNU/Linux, as predicted): - * equiv.c (ffeequiv_layout_local_): Don't bother - coping with pre-padding of entire area while building - it; do that instead after the building is done, and - do it by modifying only the modulo field. This covers - the case of alignment stringency being increased without - lowering the starting offset, unlike the previous changes, - and even more elegantly than those. - - * target.c (ffetarget_align): Make sure alignments - are nonzero, just in case. - -See ChangeLog.0 for earlier changes. - -Local Variables: -add-log-time-format: current-time-string -End: diff --git a/contrib/gcc/f/ChangeLog.0 b/contrib/gcc/f/ChangeLog.0 deleted file mode 100644 index 3d6675e..0000000 --- a/contrib/gcc/f/ChangeLog.0 +++ /dev/null @@ -1,4806 +0,0 @@ -Mon Jun 29 09:47:33 1998 Craig Burley - - Fix 980628-*.f: - * bld.h: New `pad' field and accessor macros for - ACCTER, ARRTER, and CONTER ops. - * bld.c (ffebld_new_accter, ffebld_new_arrter, - ffebld_new_conter_with_orig): Initialize `pad' field - to zero. - * com.c (ffecom_transform_common_): Include initial - padding (aka modulo aka offset) in size calculation. - Copy initial padding value into FFE initialization expression - so the GBE transformation of that expression includes it. - Make array low bound 0 instead of 1, for consistency. - (ffecom_transform_equiv_): Include initial - padding (aka modulo aka offset) in size calculation. - Copy initial padding value into FFE initialization expression - so the GBE transformation of that expression includes it. - Make array low bound 0 instead of 1, for consistency. - (ffecom_expr_, case FFEBLD_opACCTER): Delete unused `size' - variable. - Track destination offset separately, allowing for - initial padding. - Don't bother setting initial PURPOSE offset if zero. - Include initial padding in size calculation. - (ffecom_expr_, case FFEBLD_opARRTER): Allow for - initial padding. - Include initial padding in size calculation. - Make array low bound 0 instead of 1, for consistency. - (ffecom_finish_global_): Make array low bound 0 instead - of 1, for consistency. - (ffecom_notify_init_storage): Copy `pad' field from old - ACCTER to new ARRTER. - (ffecom_notify_init_symbol): Ditto. - * data.c (ffedata_gather_): Initialize `pad' field in new - ARRTER to 0. - (ffedata_value_): Ditto. - * equiv.c (ffeequiv_layout_local_): When lowering start - of equiv area, extend lowering to maintain needed alignment. - * target.c (ffetarget_align): Handle negative offset correctly. - - * global.c (ffeglobal_pad_common): Warn about nonzero - padding only the first time its seen. - If new padding larger than old, update old. - (ffeglobal_save_common): Use correct type for size throughout. - * global.h: Use correct type for size throughout. - (ffeglobal_common_pad): New macro. - (ffeglobal_pad): Delete this unused and broken macro. - -Sat Jun 27 12:18:33 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (g77): Depend on mkstemp.o. Link in mkstemp.o. - -Fri Jun 26 11:54:19 1998 Craig Burley - - * g77spec.c (lang_specific_driver): Put `-lg2c' in - front of any `-lm' that is seen. - -Wed Jun 24 01:01:23 1998 Jeffrey A Law (law@cygnus.com) - - * g77spec.c (lang_specific_driver): Revert last change. - -Mon Jun 22 23:12:05 1998 H.J. Lu (hjl@gnu.org) - - * Make-lang.in (G77STAGESTUFF): Add g77.c. - -Fri Jun 19 07:54:40 1998 H.J. Lu (hjl@gnu.org) - - * g77spec.c (lang_specific_driver): Check n_infiles before - appending args. - -Mon Jun 15 23:39:24 1998 Craig Burley - - * Make-lang.in (f/g77.info): Use -f when removing - pre-existing Info files, if any. (This rm command - can go away once makeinfo has been changed to delete - .info-N files beyond the last one it creates.) - - * Make-lang.in ($(srcdir)/f/intdoc.texi): Compile - using $(INCLUDES) macro to get the new hconfig.h - and system.h headers. - -Mon Jun 15 22:21:57 1998 Craig Burley - - Cutover to system.h: - * Make-lang.in: - * Makefile.in: - * ansify.c: - * bad.c: - * bld.c: - * com.c: - * com.h: - * expr.c: - * fini.c: - * g77spec.c: - * implic.c: - * intdoc.c: - * intrin.c: - * lex.c: - * lex.h: - * parse.c: - * proj.c: - * proj.h: - * src.c: - * src.h: - * stb.c: - * ste.c: - * target.c: - * top.c: - * system.j: New file. - - Use toplev.h where appropriate: - * Make-lang.in: - * Makefile.in: - * bad.c: - * bld.c: - * com.c: - * lex.c: - * ste.c: - * top.c: - * toplev.j: New file. - - Conditionalize all dumping/reporting routines so they don't - get built for gcc/egcs: - * bld.c: - * bld.h: - * com.c: - * equiv.c: - * equiv.h: - * sta.c: - * stt.c: - * stt.h: - * symbol.c: - * symbol.h: - - Use hconfig.h instead of config.h where appropriate: - * Makefile.in (proj-h.o): Compile with -DUSE_HCONFIG. - * fini.c: Define USE_HCONFIG before including proj.h. - - * Makefile.in (deps-kinda): Redirect stderr to stdout, - to eliminate diagnostics vis-a-vis g77spec.c. - - * Makefile.in: Regenerate dependencies via deps-kinda. - - * lex.c (ffelex_file_fixed, ffelex_file_free): Eliminate - apparently spurious warnings about uninitialized variables - `c', `column', and so on. - -Sat Jun 13 03:13:18 1998 Craig Burley - - * g77spec.c (lang_specific_driver): Print out egcs - version info first, to be compatible with what some - test facilities expect. - -Wed Jun 10 13:17:32 1998 Dave Brolley - - * top.h (ffe_decode_option): New argc/argv interface. - * top.c (ffe_decode_option): New argc/argv interface. - * parse.c (yyparse): New argc/argv interface for ffe_decode_option. - * com.c (lang_decode_option): New argc/argv interface. - -Sun Jun 7 14:04:34 1998 Richard Henderson - - * com.c (lang_init_options): New function. - * top.c (ffe_decode_option): Remove all trace of -fset-g77-defaults. - Set ffe_is_do_internal_checks_ with -version. - * lang-options.h: Likewise. - * lang-specs.h: Likewise. - -Fri Jun 5 15:53:17 1998 Per Bothner - - * g77spec.c (lang_specific_pre_link, lang_specific_extra_ofiles): - Define - update needed by gcc.c change. - -Mon Jun 1 19:37:42 1998 Craig Burley - - * com.c (ffecom_init_0): Fix setup of INTEGER(KIND=7) - pointer type. - * info.c (ffeinfo_type): Don't crash on null type. - * expr.c (ffeexpr_fulfill_call_): Don't special-case - %LOC(expr) or LOC(expr). - Delete FFEGLOBAL_argsummaryPTR. - * global.c, global.h: Delete FFEGLOBAL_argsummaryPTR. - -Thu May 28 21:32:18 1998 Craig Burley - - Restore circa-0.5.22 capabilities of `g77' driver: - * Make-lang.in (g77spec.o): Depend on f/version.h. - (g77version.o): New rule to compile g77 version info. - (g77$(exeext)): Depend on and link in g77version.o. - * g77spec.c: Rewrite to be more like 0.5.22 version - of g77.c, making filtering of command line smarter - so mixed Fortran and C (etc.) can be compiled, verbose - version info can be obtained, etc. - * lang-specs.h (f77-version): New "language" to support - "g77 -v" command under new gcc 2.8 regime. - * lex.c (ffelex_file_fixed): If -fnull-version, just - substitute a "source file" that prints out version info. - * top.c, top.h: Support -fnull-version. - - * lang-specs.h: Use "%O" instead of OO macro to specify - object extension. Remove old stringizing cruft. - - * Make-lang.in (g77.c, g77spec.o, g77.o, g77$(exeext), - g77-cross$(exeext), f771, - $(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi, - $(srcdir)/f/intdoc.texi, - f77.install-common, f77.install-info, f77.install-man, - f77.uninstall, $(G77STAGESTUFF), f77.stage1, f77.stage2, - f77.stage3, f77.stage4, f77.distdir): Don't do anything - unless user specified "f77" or "F77" in $LANGUAGES either - during configuration or explicitly. For convenience of - various tests and to work around lack of the assignment - "LANGUAGES=$(BOOT_LANGUAGES)" in the "make stage1" command - of "make bootstrap" in gcc, use a touch file named "lang-f77" - to communicate whether this is the case. - - * Make-lang.in (F77_FLAGS_TO_PASS): Delete this macro, - replace with minimal expansion of its former self in - each of the two instances where it was used. - - * Makefile.in (HOST_CC): Delete this definition. - - * com.c (index, rindex): Delete these declarations. - - * proj.h: (isascii): Delete this. - - * Make-lang.in (f77.install-common): Warn if `f77-install-ok' - flag-file exists, since it no longer triggers any activity. - - Rename libf2c.a and f2c.h to libg2c.a and g2c.h, - normalize and simplify g77/libg2c build process: - * Make-lang.in: Remove all support for overwriting - /usr/bin/f77 etc., or whatever the actual names are - via $(prefix) and $(local_prefix). (g++ overwrites - /usr/bin/c++, but then it's often the only C++ compiler - on the system; f77 often exists on systems that are - installing g77.) - (f77.realclean): Remove obsolete target. - (g77.c, g77$(exeext)): Minor changes to look more like g++'s - stuff. - (f771): Now built with srcdir=gcc/f, not srcdir=gcc, to be - more like g++ and such. - (f/Makefile): Removed, as g++ doesn't need this rule. - (f77.install-common): No longer install f77, etc. - (f77.install-man): No longer install f77.1. - (f77.uninstall): No longer uninstall f77, f77.1, etc. - (f77.stage1, f77.stage2, f77.stage3, f77.stage4): Do work - only if "f77" appears in $(LANGUAGES). - (Note: gcc's Makefile.in's bootstrap target should set - LANGUAGES=$(BOOT_LANGUAGES) when making the stage1 target.) - * Makefile.in: Update vis-a-vis gcc/cp/Makefile.in. - (none): Remove. - (g77-only): Relocate. - (all.indirect, f771, *.o): Now assumes current directory - is this dir (gcc/f), not the parent directory. - (TAGS): Remove "echo 'parse.y,0' >> TAGS ;" line. - * config-lang.in: Delete commented-out code. - Fix stagestuff definition. Add more stuff to - diff_excludes definition. Don't create any directories. - Set outputs to f/Makefile, to get variable substition - to happen (what does that really do, anyway?!). - * g77spec.c: Rename libf2c to libg2c. - - * com.h: Remove all of the gcc back-end decls, - since egcs should have all of them correct. - - * com.c: Include "proj.h" before anything else, - as that's how things are supposed to work. - * ste.c: Ditto. - - * bad.c: Include "flags.j" here, since some diagnostics - check flag_pedantic_errors. - - * Makefile.in (f/*.o): Rebuild dependencies via - deps-kinda. - - * output.j: New source file. - * Make-lang.in (F77_SRCS): Update accordingly. - * Makefile.in (OUTPUT_H): Ditto. - (deps-kinda): Ditto. - * com.c: Include "output.j" here. - * lex.c: Ditto. - -Mon May 25 03:34:42 1998 Craig Burley - - * com.c (ffecom_expr_): Fix D**I and Z**I cases to - not convert (DOUBLE PRECISION) D and (DOUBLE COMPLEX) Z - to INTEGER. (This is dead code here anyway.) - -Sat May 23 06:32:52 1998 Craig Burley - - * com.c (ffecom_finish_symbol_transform_): Don't transform - statement (nested) functions, to avoid gcc compiling them - and thus producing linker errors if they refer to undefined - external functions. But warn if they're unused and -Wunused. - * bad.def (FFEBAD_SFUNC_UNUSED): New diagnostic. - -Wed May 20 12:12:55 1998 Craig Burley - - * Version 0.5.23 released. - -Tue May 19 14:52:41 1998 Craig Burley - - * bad.def (FFEBAD_OPEN_UNSUPPORTED, FFEBAD_INQUIRE_UNSUPPORTED, - FFEBAD_READ_UNSUPPORTED, FFEBAD_WRITE_UNSUPPORTED, - FFEBAD_QUAD_UNSUPPORTED, FFEBAD_BLOCKDATA_STMT, - FFEBAD_TRUNCATING_CHARACTER, FFEBAD_TRUNCATING_HOLLERITH, - FFEBAD_TRUNCATING_NUMERIC, FFEBAD_TRUNCATING_TYPELESS, - FFEBAD_TYPELESS_OVERFLOW): Change these from warnings - to errors. - -Tue May 19 14:51:59 1998 Craig Burley - - * Make-lang.in (f77.install-info, f77.uninstall): - Use install-info as appropriate. - -Tue May 19 12:56:54 1998 Craig Burley - - * com.c (ffecom_init_0): Rename xargc to f__xargc, - in accord with same-dated change to f/runtime. - -Fri May 15 10:52:49 1998 Craig Burley - - * com.c (ffecom_convert_narrow_, ffecom_convert_widen_): - Be even more persnickety in checking for internal bugs. - Also, if precision isn't changing, just return the expr. - - * expr.c (ffeexpr_token_number_): Call - ffeexpr_make_float_const_ to make an integer. - (ffeexpr_make_float_const_): Handle making an integer. - - * intrin.c (ffeintrin_init_0): Distinguish between - crashes on bad arg base and kind types. - -Fri May 15 01:44:22 1998 Mumit Khan - - * Make-lang.in (f77.mostlyclean): Add missing exeext. - -Thu May 14 13:30:59 1998 Craig Burley - - * Make-lang.in (f/expr.c): Now depends on f/stamp-str. - * expr.c: Use ffestrOther in place of ffeexprDotdot_. - * str-ot.fin: Add more keywords for expr.c. - - * intdoc.c (dumpimp): Trivial fix. - - * com.c (ffecom_expr_): Add ltkt variable for clarity. - -Wed May 13 13:05:34 1998 Craig Burley - - * Make-lang.in (G77STAGESTUFF): Add g77.o, g77spec.o, - and g77version.o. - (f77.clean): Add removal of g77.c, g77.o, g77spec.o, - and g77version.o. - (f77.distclean): Delete removal of g77.c. - -Thu Apr 30 18:59:43 1998 Jim Wilson - - * Make-lang.in (g77.info, g77.dvi, BUGS, INSTALL, NEWS): Put -o - option before input file. - -Tue Apr 28 09:23:10 1998 Craig Burley - - Fix 980427-0.f: - * global.c (ffeglobal_ref_progunit_): When transitioning - from EXT to FUNC, discard hook, since the decl, if any, is - probably wrong. - -Sun Apr 26 09:05:50 1998 Craig Burley - - * com.c (ffecom_char_enhance_arg_): Wrap the upper bound - (the PARM_DECL specifying the length of the CHARACTER*(*) - dummy arg) in a variable_size invocation, to prevent - dwarf2out.c crashing when compiling code with -g. - -Sat Apr 18 15:26:57 1998 Jim Wilson - - * g77spec.c (lang_specific_driver): New argument in_added_libraries. - New local added_libraries. Increment count when add library to - arglist. - -Sat Apr 18 05:03:21 1998 Craig Burley - - * com.c (ffecom_check_size_overflow_): Ignore overflow - as well if dummy argument. - -Fri Apr 17 17:18:04 1998 Craig Burley - - * version.h: Get rid of the overly large headers - here too, as done in version.c. - -Tue Apr 14 15:51:37 1998 Dave Brolley - - * com.c (init_parse): Now returns char* containing filename; - -Tue Apr 14 14:40:40 1998 Craig Burley - - * com.c (ffecom_start_progunit_): Mark function decl - as used, to avoid spurious warning (-Wunused) for ENTRY. - -Tue Apr 14 14:19:34 1998 Craig Burley - - * sta.c (ffesta_second_): Check for CASE DEFAULT - as well as CASE, or it won't be recognized. - -Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com) - - * com.c (finput): New variable. - (init_parse): Handle !USE_CPPLIB. - (finish_parse): New function. - (lang_init): No longer declare finput. - -Sat Apr 4 17:45:01 1998 Richard Henderson - - * com.c (ffecom_expr_): Revert Oct 22 change. Instead take a WIDENP - argument so that we can respect the signedness of the original type. - (ffecom_init_0): Do sizetype initialization first. - -1998-03-28 Dave Love - - * Make-lang.in (f771$(exeext)): Fix typo. - -1998-03-24 Martin von Loewis - - * com.c (lang_print_xnode): New function. - -Mon Mar 23 21:20:35 1998 Craig Burley - - * version.c: Reduce to a one-line file, like - gcc's version.c, since there's really no content - there. - -Mon Mar 23 11:58:43 1998 Craig Burley - - * bugs.texi: Various updates. - - * com.c (ffecom_tree_canonize_ptr_): Fix up spacing a bit. - -Sun Mar 22 00:50:42 1998 Nick Clifton - Geoff Noer - - * Makefile.in: Various fixes for building cygwin32 native toolchains. - * Make-lang.in: Likewise. - -Mon Mar 16 21:20:35 1998 Craig Burley - - * expr.c (ffeexpr_sym_impdoitem_): Don't blindly - reset symbol info after calling ffesymbol_error, - to avoid crash. - -Mon Mar 16 15:38:50 1998 Craig Burley - - * Version 0.5.22 released. - -Mon Mar 16 14:36:02 1998 Craig Burley - - Make -g work better for ENTRY: - * com.c (ffecom_start_progunit_): Master function - for ENTRY-laden procedure is not really invented, - so it can be debugged. - (ffecom_do_entry_): Push/set/pop lineno for each - entry point. - -Sun Mar 15 05:48:49 1998 Craig Burley - - * intrin.def: Fix spelling of mixed-case form - of `CPU_Time' (was `Cpu_Time'). - -Thu Mar 12 13:50:21 1998 Craig Burley - - * lang-options.h: Sort all -f*-intrinsics-* options, - for consistency with other g77 versions. - -Thu Mar 12 09:39:40 1998 Manfred Hollstein - - * lang-specs.h: Properly put brackets around array elements in initializer. - -1998-03-09 Dave Love - - * Make-lang.in: Set CONFIG_SITE to a non-existent file since - /dev/null loses with bash 2.0/autoconf 2.12. Put - F77_FLAGS_TO_PASS before CC. - -Sun Mar 8 16:35:34 1998 Craig Burley - - * intrin.def: Use tabs instead of blanks more - consistently (excepting DEFGEN section for now). - -Wed Mar 4 17:38:21 1998 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in: Remove more references to libf77. - -Tue Mar 3 10:52:35 1998 Manfred Hollstein - - * g77.texi: Use @url for citing URLs. - -Sat Feb 28 15:24:38 1998 Craig Burley - - * intrin.def: Make CPU_TIME's arg generic real to be just - like SECOND_subr. - -Fri Feb 20 12:45:53 1998 Craig Burley - - * expr.c (ffeexpr_token_arguments_): Make sure - outer exprstack isn't null. - -1998-02-16 Dave Love - - * Makefile.in (f/fini): Don't use -W -Wall with HOST_CC. - -Fri Feb 13 00:14:56 1998 Kaveh R. Ghazi - - * com.c (type_for_mode): Add explicit braces to avoid ambiguous `else'. - - * expr.c (ffeexpr_type_combine): Likewise. - (ffeexpr_reduce_): Likewise. - (ffeexpr_declare_parenthesized_): Likewise. - - * src.c (ffesrc_strcmp_1ns2i): Likewise. - (ffesrc_strcmp_2c): Likewise. - (ffesrc_strncmp_2c): Likewise. - - * stb.c (ffestb_halt1_): Likewise. - (ffestb_R90910_): Likewise. - (ffestb_R9109_): Likewise. - - * stc.c (ffestc_R544_equiv_): Likewise. - - * std.c (ffestd_subr_copy_easy_): Likewise. - (ffestd_R1001dump_): Likewise. - (ffestd_R1001dump_1005_1_): Likewise. - (ffestd_R1001dump_1005_2_): Likewise. - (ffestd_R1001dump_1005_3_): Likewise. - (ffestd_R1001dump_1005_4_): Likewise. - (ffestd_R1001dump_1005_5_): Likewise. - (ffestd_R1001dump_1010_2_): Likewise. - - * ste.c (ffeste_R840): Likewise. - - * sts.c (ffests_puttext): Likewise. - - * symbol.c (ffesymbol_check_token_): Likewise. - - * target.c (ffetarget_real1): Likewise. - (ffetarget_real2): Likewise. - -Wed Feb 11 01:44:48 1998 Richard Henderson (rth@cygnus.com) - - * com.c (ffecom_ptr_to_expr) [FFEBLD_opARRAYREF]: Do upper - lower - in the native type, so as to properly handle negative indices. - -Tue Feb 3 20:13:05 1998 Richard Henderson - - * config-lang.in: Remove references to runtime/. - -Sun Feb 1 12:43:49 1998 J"orn Rennecke - - * com.c (ffecom_tree_canonize_ptr_): Place bitsizetype typed expr - as first agument in MULT_EXPR. - Use bitsize_int (0L, 0L) as zero for bitsizes. - (ffecom_tree_canonize_ref_): - Use bitsize_int (0L, 0L) as zero for bitsizes. - (ffecom_init_0): Use set_sizetype. - -Sun Feb 1 02:26:58 1998 Richard Henderson - - * runtime directory -- moved into "libf2c" in the toplevel - directory. - * Make-lang.in: Remove all runtime related stuff. - -Sun Jan 25 12:32:15 1998 Kaveh R. Ghazi - - * Make-lang.in (f77.stage1): Depend on stage1-start so parallel - make works better. - * (f77.stage2): Likewise for stage2-start. - * (f77.stage3): Likewise for stage3-start. - * (f77.stage4): Likewise for stage4-start. - -Sat Jan 17 21:28:08 1998 Pieter Nagel - - * Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and - local_prefix to sub-make invocations. - -Tue Jan 13 22:07:54 1998 Jeffrey A Law (law@cygnus.com) - - * lang-options.h: Add missing options. - -Sun Jan 11 02:14:47 1998 Craig Burley - - Support FORMAT(I<1+2>) (constant variable-FORMAT - expressions): - * bad.def (FFEBAD_FORMAT_VARIABLE): New diagnostic. - * std.c (ffestd_R1001rtexpr_): New function. - (ffestd_R1001dump_, ffestd_R1001dump_1005_1_, - ffestd_R1001dump_1005_2_, ffestd_R1001dump_1005_3_, - ffestd_R1001dump_1005_4_, ffestd_R1001dump_1005_5_, - ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_, - ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_): - Use new function instead of ffestd_R1001error_. - - * stb.c (ffestb_R10014_, ffestb_R10016_, ffestb_R10018_, - ffestb_R100110_): Restructure `for' loop for style. - - Fix 970626-2.f by not doing most back-end processing - when current_function_decl is an ERROR_MARK, and by - making that the case when its type would be an ERROR_MARK: - * com.c (ffecom_start_progunit_, finish_function, - lang_printable_name, start_function, - ffecom_finish_symbol_transform_): Test for ERROR_MARK. - * std.c (ffestd_stmt_pass_): Don't do any downstream - processing if ERROR_MARK. - - * Make-lang.in (f77.install-common): Don't install, and - don't uninstall existing, Info files if f/g77.info - doesn't exit. (This is a somewhat modified version - of an egcs patch on 1998-01-07 12:05:51 by Bruno Haible - .) - -Fri Jan 9 19:09:07 1998 Craig Burley - - Fix -fpedantic combined with `F()' invocation, - also -fugly-comma combined with `IARGC()' invocation: - * bad.def (FFEBAD_NULL_ARGUMENT_W): New diagnostic. - * expr.c (ffeexpr_finished_): Don't reject null expressions - in the argument-expression context -- let outer context - handle that. - (ffeexpr_token_arguments_): Warn about null expressions - here if -fpedantic (as appropriate). - Obey -fugly-comma for only external-procedure invocations. - * intrin.c (ffeintrin_check_): No longer ignore explicit - omitted trailing args. - -Tue Dec 23 14:58:04 1997 Craig Burley - - * intrin.c (ffeintrin_fulfill_generic): Don't generate - FFEBAD_INTRINSIC_TYPE for CHARACTER*(*) intrinsic. - - * com.c (ffecom_gfrt_basictype): - (ffecom_gfrt_kindtype): - (ffecom_make_gfrt_): - (FFECOM_rttypeVOIDSTAR_): New return type `void *', for - the SIGNAL intrinsic. - * com-rt.def (FFECOM_rttypeSIGNAL): Now returns `void *'. - * intdoc.c: Replace `p' kind specifier with `7'. - * intrin.c (ffeintrin_check_, ffeintrin_init_0): Replace - `p' kind specifier with `7'. - * intrin.def (FFEINTRIN_impLOC, FFEINTRIN_impSIGNAL_func, - FFEINTRIN_impSIGNAL_subr): Replace `p' specifier with `7'. - Also, SIGNAL now returns a `void *' status, not `int'. - - Improve run-time diagnostic for "PRINT '(I1', 42": - * com.c (ffecom_char_args_x_): Renamed from ffecom_char_args_, - which is now a macro (to avoid lots of changes to other code) - with new arg, ffecom_char_args_with_null_ being another new - macro to call same function with different value for new arg. - This function now appends a null byte to opCONTER expression - if the new arg is TRUE. - (ffecom_arg_ptr_to_expr): Support NULL length pointer. - * ste.c (ffeste_io_cilist_): - (ffeste_io_icilist_): Pass NULL length ptr for - FORMAT expression, so null byte gets appended where - feasible. - * target.c (ffetarget_character1): - (ffetarget_concatenate_character1): - (ffetarget_substr_character1): - (ffetarget_convert_character1_character1): - (ffetarget_convert_character1_hollerith): - (ffetarget_convert_character1_integer4): - (ffetarget_convert_character1_logical4): - (ffetarget_convert_character1_typeless): - (ffetarget_hollerith): Append extra phantom null byte as - part of FFETARGET-NULL-BYTE kludge. - - * intrin.def (FFEINTRIN_impCPU_TIME): Point to - FFECOM_gfrtSECOND as primary run-time routine. - -Mon Dec 22 12:41:07 1997 Craig Burley - - * intrin.c (ffeintrin_init_0): Remove duplicate - check for `!'. - -Fri Dec 19 00:12:01 1997 Richard Henderson - - * com.c (ffecom_sym_transform_): Assumed arrays have no upper bound. - -Mon Dec 15 17:35:35 1997 Richard Henderson - - * com.c (ffecom_type_vardesc_): Vardesc.dims is a `ftnlen*'. - -Sun Dec 14 02:49:58 1997 Craig Burley - - * intrin.c (ffeintrin_init_0): Fix up indentation a bit. - Fix bug that prevented checking of arguments other - than the first. - - * intdoc.c: Fix up indentation a bit. - -Tue Dec 9 16:20:57 1997 Richard Henderson - - * com.c (ffecom_type_vardesc_): Vardesc.dims is a `ftnlen*'. - -Tue Dec 2 09:57:16 1997 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (f77.clean): Remove g77.c. - -Mon Dec 1 19:12:36 1997 Craig Burley - - * intrin.c (ffeintrin_check_): Fix up indentation a bit more. - -Mon Dec 1 16:21:08 1997 Craig Burley - - * com.c (ffecom_arglist_expr_): Crash if non-supplied - optional arg isn't passed as an address. - Pass null pointer explicitly, instead of via ffecom routine. - If incoming argstring is NULL, substitute pointer to "0". - Recognize '0' as ending the usual arg stuff, just like '\0'. - -Sun Nov 30 22:22:22 1997 Craig Burley - - * intdoc.c: Minor fix-ups. - - * intrin.c (ffeintrin_check_): Fix up indentation a bit. - - * intrin.def: Fix up spacing a bit. - -Tue Nov 25 15:33:28 1997 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (f77.all.build): Add $(exeext) to binary files. - (f77.all.cross, f77.start.encap): Simliarly. - -Fri Nov 21 09:35:20 1997 Fred Fish - - * Make-lang.in (stmp-f2c.h): Move inclusion of F77_FLAGS_TO_PASS - to before override of CC so that the override works. - -Thu Nov 20 00:58:14 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * Make-lang.in (f77.install-info): Depend on f77.info. - -1997-11-17 Dave Love - - * com.c (ffecom_arglist_expr_): Pass null pointers for optional - args which aren't supplied. - -Sun Nov 16 21:45:43 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * Make-lang.in (f77.install-info): Depend on f77.info. - -1997-11-14 Dave Love - - * intrin.def: Supply gfrt for CPU_TIME. Generalize arg types of - INT2, INT8, per doc. - -1997-11-06 Dave Love - - * intrin.def: Allow non-integer args for INT2 and INT8 (per - documentation). - -Sun Nov 2 19:49:51 1997 Richard Henderson - - * com.c (ffecom_expr_): Only use TREE_TYPE argument for simple - arithmetic; convert types as necessary; recurse with target tree type. - -Tue Oct 28 02:21:25 1997 Craig Burley - - * lang-options.h: Add -fgnu-intrinsics-* and - -fbadu77-intrinsics-* options. - -Sun Oct 26 02:36:21 1997 Craig Burley - - * com.c (lang_print_error_function): Fix to more - reliably notice when the diagnosed region changes. - -Sat Oct 25 23:43:36 1997 Craig Burley - - Fix 950327-0.f: - * sta.c, sta.h (ffesta_outpooldisp): New function. - * std.c (ffestd_stmt_pass_): Don't kill NULL pool. - (ffestd_R842): If pool already preserved, save NULL - for pool, because it should be killed only once. - - * malloc.c [MALLOC_DEBUG]: Put initializer for `name' - component in braces, to avoid compiler warning. - -Wed Oct 22 11:37:41 1997 Richard Henderson - - * com.c (ffecom_expr_): Take an new arg TREE_TYPE that if non-null - specifies the type in which to do the calculation. Change all callers. - [FFEBLD_opARRAYREF]: Force the index expr to use sizetype. - -Thu Oct 16 02:04:08 1997 Paul Koning - - * Make-lang.in (stmp-f2c.h): Don't configure the runtime - directory if LANGUAGES does not include f77. - -Mon Oct 13 12:12:41 1997 Richard Henderson - - * Make-lang.in (g77*): Copied from cp/Make-lang.in g++*. - * g77spec.c: New file, mostly copied from g++spec.c - * g77.c: Removed. - -Fri Oct 10 13:00:48 1997 Craig Burley - - * ste.c (ffeste_begin_iterdo_): Fix loop setup so iteration - variable is modified only after the #iterations is calculated; - otherwise if the iteration variable is aliased to any of the - operands in the start, end, or increment expressions, the - wrong #iterations might be calculated. - - * com.c (ffecom_save_tree): Fix indentation. - -Mon Oct 6 14:15:03 1997 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (f77.mostlyclean): Clean up stuff in the - object tree too. - (f77.clean, f77.distclean, f77.maintainer-clean): Likewise. - -1997-10-05 Dave Love - - * intrin.def: Make SECOND_subr's arg generic real for people - porting from Cray and making everything double precision. - -Wed Oct 1 01:45:36 1997 Philippe De Muyter - - * g77.c (pexecute, main): Use unlink, not remove. - -Mon Sep 29 16:18:21 1997 Craig Burley - - * stu.c (ffestu_list_exec_transition_, - ffestu_dummies_transition_): Specify `bool' type for - `in_progress' variables. - - * com.h (assemble_string): Declare this routine (instead - of #include'ing "output.h" from gcc) to eliminate warnings - from lex.c. - -Mon Sep 29 10:37:07 1997 Jeffrey A Law (law@cygnus.com) - - * intdoc.c (main): Remove unused attribute for main's arguments. - -Sun Sep 28 01:47:17 1997 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in (G77_FLAGS_TO_PASS): Pass down RANLIB, RANLIB_TEST - and AR instead of the _FOR_TARGET versions. - -Tue Sep 23 00:39:57 1997 Alexandre Oliva - - * Make-lang.in: install.texi was renamed to g77install.texi - * install0.texi: Likewise. - -Fri Sep 19 01:12:27 1997 Craig Burley - - * expr.c (ffeexpr_reduced_eqop2_): - (ffeexpr_reduced_relop2_): Minor fixes to diagnostic code. - - * fini.c (main): Change return type to `int'. - -Thu Sep 18 17:31:38 1997 Jeffrey A Law (law@cygnus.com) - - * proj.h (FFEPROJ_BSEARCH): Delete all references. - (FFEPROJ_STRTOUL): Likewise. - * proj.c (bsearch): Compile this if no bsearch is provided by the - host system. - (strtoul): Similarly. - - * g77install.texi: Renamed from install.texi - * g77.texi: Corresponding changes. - - * fini.c (main): Return type is int. - - * com.c (lang_printable_name): Use verbosity argument. - -Thu Sep 18 16:08:40 1997 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in: Fix merge problems. - -Wed Sep 17 10:47:08 1997 Craig Burley - - * com-rt.def (FFECOM_gfrtDSIGN, FFECOM_gfrtISIGN, - FFECOM_gfrtSIGN): Add second argument. - - * expr.c (ffeexpr_cb_comma_c_): Trivial fixes. - -Sun Sep 14 21:01:23 1997 Jeffrey A Law (law@cygnus.com) - - * Make-lang.in: Various changes to build info files - in the object tree rather than the source tree. - - * proj.h: Include ctype.h. - -Sun Sep 14 12:35:20 1997 Fred Fish (fnf@ninemoons.com) - - * proj.h (isascii): Provide a default definition if none is available. - -Thu Sep 11 19:26:10 1997 Dave Love - - * config-lang.in: Remove the messages about possible build problems. - -Wed Sep 10 16:39:47 1997 Jim Wilson - - * Make-lang.in (LN, LN_S): New macros, use where appropriate. - -Tue Sep 9 13:20:40 1997 Jim Wilson - - * g77.c (pexecute, doit): Add checks for __CYGWIN32__. - -Tue Sep 9 01:59:35 1997 Craig Burley - - * Version 0.5.21 released. - -Tue Sep 9 00:31:01 1997 Craig Burley - - * intdoc.c (dumpem): Put appropriate commentary in - output file, so readers know it isn't source. - -Wed Aug 27 20:32:03 1997 Jeffrey A Law (law@cygnus.com) - - * top.c (ffe_decode_option): Turn on flag_move_all_moveables - and flag_reduce_all_givs. - -Wed Aug 27 08:08:25 1997 Craig Burley - - * proj.h: Always #include "config.j" first, to pick up - gcc's configuration. - * com.c: Change bcopy() and bzero() calls to memcpy() - and memset() calls, to make more of g77 ANSI C. - -1997-08-26 Dave Love - - * Make-lang.in ($(srcdir)/f/runtime/configure, - $(srcdir)/f/runtime/libU77/configure): Fix for when srcdir isn't - relative. - -Tue Aug 26 05:59:21 1997 Craig Burley - - * ansify.c (main): Make sure readers of stdout know - it's derived from stdin; omit comment text; get source - line numbers in future stderr output to be correct. - -Tue Aug 26 01:36:01 1997 Craig Burley - - Fix 970825-0.f: - * stb.c (ffestb_R5284_): Allow OPEN_PAREN after closing - SLASH as well as NAME. - -Mon Aug 25 23:48:17 1997 Craig Burley - - Changes to allow g77 docs to be built entirely from scratch - using any ANSI C compiler, not requiring GNU C: - * Make-lang.in ($(srcdir)/f/intdoc.texi): "Pipe" new - location of intrinsic documentation data base, f/intdoc.in, - through new `ansify' program to append `\n\' to quoted - newlines, into f/intdoc.h0. Do appropriate cleanups. Explain. - (f77.mostlyclean): Add f/ansify and f/intdoc.h0 to cleanups. - * f/ansify.c: New program. - * f/intdoc.c: Fix so it conforms to ANSI C. - #include f/intdoc.h0 instead of f/intdoc.h. - Avoid some warnings. - * f/intdoc.h, f/intdoc.in: Rename the former to the latter; no - changes made to the content in this patch! - * f/intrin.h (ffeintrinFamily): Fix to conform to ANSI C. - -Mon Aug 25 23:24:32 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * Make-lang.in ($(srcdir)/f/runtime/configure, - $(srcdir)/f/runtime/libU77/configure, f77.mostlyclean, - f77.clean, f77.distclean, f77.maintainer-clean, f77.realclean): - Handle absolute pathname of $(srcdir). - (stmp-f2c.h): New. - (include/f2c.h, f/runtime/Makefile, f/runtime/libF77/Makefile, - f/runtime/libI77/Makefile, f/runtime/libU77/Makefile): Only - depend on stmp-f2c.h. - (f77.maintainer-clean): Don't make itself. - -Sun Aug 24 17:00:27 1997 Jim Wilson - - * Make-lang.in (f77.install-info): Don't cd into srcdir. Add srcdir - to filenames. Use sed to extract base filename for install. - -Sun Aug 24 06:52:48 1997 Craig Burley - - Fix up g77 compiler data base for libf2c routines: - * com-rt.def (FFECOM_gfrtSIGNAL): Change return type to - FTNINT to match actual code. - - * com.c (ffecomRttype_): Replace FFECOM_rttypeINT_ with - FFECOM_rttypeFTNINT_. - Add and fix up comments. - (ffecom_make_gfrt_, ffecom_gfrt_basictype, - ffecom_gfrt_kindtype): Replace FFECOM_rttypeINT_ with - FFECOM_rttypeFTNINT_; add FFECOM_rttypeDOUBLEREAL_. - -Thu Aug 21 13:15:29 1997 Jim Wilson - - * Make-lang.in (f77): Delete f77-runtime. - (f77.all.build, f77.all.cross, f77.rest.encap): Add f77-runtime. - -Wed Aug 20 17:18:40 1997 Craig Burley - - * global.c (ffeglobal_ref_progunit_): It's okay to have - a different CHARACTER*n length for a reference if the - existing length is for another reference, not a definition. - -Wed Aug 20 16:36:59 1997 Jim Wilson - - * intdoc.texi: Readd generated file. - -Mon Aug 18 14:27:18 1997 Craig Burley - - Fix 970814-0.f: - * global.c (ffeglobal_new_progunit_): Distinguish - between previously defined, versus inferred, filewide - when it comes to diagnostics. - - Fix 970816-1.f: - * global.c (ffeglobal_ref_progunit_): Change BDATA into EXT - right at the beginning, so EXTERNAL FOO followed later - by SUBROUTINE FOO is not diagnosed. - - Fix 970813-0.f: - * com-rt.def (FFECOM_gfrtALARM): Returns `integer', not - `void'. - -Mon Aug 18 09:01:54 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (F77_OBJS): Re-alphabetize. - * Make-lang.in (F77_SRCS): Likewise. - -Sun Aug 17 08:35:11 1997 Jeffrey A Law (law@cygnus.com) - - * INSTALL: Rebuilt. - * install.texi: Remove "Object File Differences" section. Remove - all references to zzz.o failing comparison tests. - * version.c, version.h: Renamed from zzz.c and zzz.h. Remove - date and time stamps so a 3 stage build reports no differences. - * Make-lang.in: Corresponding changes. - * Makefile.in: Likewise. - * g77.c, parse.c: Likewise. - - * intdoc.texi: Remove generated file from distribution. - -Sun Aug 17 03:32:44 1997 Craig Burley - - Fix up problems when virtual memory exhausted: - * malloc.c (malloc_new_): Use gcc's xmalloc(), so we - print a nicer message when malloc returns no memory. - (malloc_resize_): Ditto for xrealloc(). - - * Make-lang.in, Makefile.in: Comment out lines containing - just formfeeds. - -Sat Aug 16 19:41:33 1997 Craig Burley - - * com.c (ffecom_make_gfrt_): For rttypeREAL_F2C_, return - double_type_node; for rttypeREAL_GNU_, return - _real_type_node. - -1997-08-13 Dave Love - - * config-lang.in (diff_excludes): Add some hints about known - problematic platforms. - -1997-08-13 Dave Love - - * intdoc.h: Document `alarm'. - -Tue Aug 12 10:23:02 1997 Jeffrey A Law (law@cygnus.com) - - * config-lang.in: Don't demand the backend patch. - * com.c (lang_printable_name): Second argument is now an int. Don't - store into the value of the second argument. - * top.c (ffe_decode_option): Temporarily disable setting - of "Toon" loop options until we figure out how to address - them. - -Mon Aug 11 23:18:35 1997 Jeffrey A Law (law@cygnus.com) - - * g77-0.5.21-19970811 Imported. - This file describes changes to the front end necessary to make - it work with egcs. - -Mon Aug 11 21:19:22 1997 Craig Burley - - * Make-lang.in ($(RUNTIMESTAGESTUFF)): Add - f/runtime/stamp-lib. - -Mon Aug 11 01:52:03 1997 Craig Burley - - * com.c (ffecom_build_complex_constant_): Go with the - new build_complex() approach used in gcc-2.8. - - * com.c (ffecom_sym_transform_): Don't set - DECL_IN_SYSTEM_HEADER for a tree node that isn't - a VAR_DECL, which happens when var is in common! - - * com.c (ffecom_expr_intrinsic_) (case FFEINTRIN_impALARM): - No need to test codegen_imp -- there's only one valid here. - - * intrin.def (FFEINTRIN_impALARM): Specify `Status' argument - as write-only. - -Fri Aug 8 05:40:23 1997 Craig Burley - - Substantial changes to accommodate distinctions among - run-time routines that support intrinsics, and between - routines that compute and return the same type vs. those - that compute one type and return another (or `void'): - * com-rt.def: Specify new return type REAL_F2C_ instead - of many DOUBLE_, COMPLEX_F2C_ instead of COMPLEX_, and - so on. - Clear up the *BES* routines "once and for all". - * com.c: New return types. - (ffecom_convert_narrow_, ffecom_convert_widen_): - New functions that are "safe" variants of convert(), - to catch errors that ffecom_expr_intrinsic_() now - no longer catches. - (ffecom_arglist_expr_): Ensure arguments are not - converted to narrower types. - (ffecom_call_): Ensure return value is not converted - to a wider type. - (ffecom_char_args_): Use new ffeintrin_gfrt_direct() - routine. - (ffecom_expr_intrinsic_): Simplify how run-time - routine is selected (via `gfrt' only now; lose the - redundant `ix' variable). - Eliminate the `library' label; any code that doesn't - return directly just `break's out now with `gfrt' - set appropriately. - Set `gfrt' to default choice initially, either a - fast direct form or, if not available, a slower - indirect-callable form. - (ffecom_make_gfrt_): No longer need to do special - check for complex; it's built into the new return-type - regime. - (ffecom_ptr_to_expr): Use new ffeintrin_gfrt_indirect() - routine. - * intrin.c, intrin.h: `gfrt' field replaced with three fields, - so it is easier to provide faster direct-callable and - GNU-convention indirect-callable routines in the future. - DEFIMP macro adjusted accordingly, along with all its uses. - (ffeintrin_gfrt_direct): New function. - (ffeintrin_gfrt_indirect): Ditto. - (ffeintrin_is_actualarg): If `-fno-f2c' is in effect, - require a GNU-callable version of intrinsic instead of - an f2c-callable version, so indirect calling is still checked. - * intrin.def: Replace one GFRT field with the three new fields, - as appropriate for each DEFIMP intrinsic. - - * com.c (ffecom_stabilize_aggregate_, - ffecom_convert_to_complex_): Make these `static'. - -Thu Aug 7 11:24:34 1997 Craig Burley - - Provide means for front end to determine actual - "standard" return type for an intrinsic if it is - passed as an actual argument: - * com.h, com.c (ffecom_gfrt_basictype, - ffecom_gfrt_kindtype): New functions. - (ffecom_gfrt_kind_type_): Replaced with new function. - All callers updated. - (ffecom_make_gfrt_): No longer need do anything - with kind type. - - * intrin.c (ffeintrin_basictype, ffeintrin_kindtype): - Now returns correct type info for specific intrinsic - (based on type of run-time-library implementation). - -Wed Aug 6 23:08:46 1997 Craig Burley - - * global.c (ffeglobal_ref_progunit_): Don't reset - number of arguments just due to new type info, - so useful warnings can be issued. - -1997-08-06 Dave Love - - * intrin.def: Fix IDATE_vxt argument order. - * intdoc.h: Likewise. - -Thu Jul 31 22:22:03 1997 Craig Burley - - * global.c (ffeglobal_proc_ref_arg): If REF/DESCR - disagreement, DESCR is CHARACTER, and types disagree, - pretend the argsummary agrees so the message ends up - being about type disagreement. - (ffeglobal_proc_def_arg): Ditto. - - * expr.c (ffeexpr_token_first_rhs_3_): Set info for LABTOK - to NONE of everything, to avoid misdiagnosing filewide - usage of alternate returns. - -Sun Jul 20 23:07:47 1997 Craig Burley - - * com.c (ffecom_sym_transform_): If type gets set - to error_mark_node, just return that for transformed symbol. - (ffecom_member_phase2_): If type gets set to error_mark_node, - just return. - (ffecom_check_size_overflow_): Add `dummy' argument to - flag that type is for a dummy, update all callers. - -Sun Jul 13 17:40:53 1997 Craig Burley - - Fix 970712-1.f: - * where.c (ffewhere_set_from_track): If start point - is too large, just use initial start point. 0.6 should - fix all this properly. - - Fix 970712-2.f: - * com.c (ffecom_sym_transform_): Preserve error_mark_node for type. - (ffecom_type_localvar_): Ditto. - (ffecom_sym_transform_): If type is error_mark_node, - don't error-check decl size, because back end responds by - setting that to an integer 0 instead of error_mark_node. - (ffecom_transform_common_): Same as earlier fix to _transform_ - in that size is checked by dividing BITS_PER_UNIT instead of - multiplying. - (ffecom_transform_equiv_): Ditto. - - Fix 970712-3.f: - * stb.c (ffestb_R10014_): Fix flaky fall-through in error - test for FFELEX_typeCONCAT by just replicating the code, - and do FFELEX_typeCOLONCOLON while at it. - -1997-07-07 Dave Love - - * intdoc.h: Add various missing pieces; correct GMTIME, LTIME - result ordering. - - * intrin.def, com-rt.def: Add alarm. - - * com.c (ffecom_expr_intrinsic_): Add case for alarm. - -Thu Jun 26 04:19:40 1997 Craig Burley - - Fix 970302-3.f: - * com.c (ffecom_sym_transform_): For sanity-check compare - of gbe size of local variable to g77 expectation, - use varasm.c/assemble_variable technique of dividing - BITS_PER_UNIT out of gbe info instead of multiplying - g77 info up, to avoid crash when size in bytes is very - large, and overflows an `int' or similar when multiplied. - - Fix 970626-2.f: - * com.c (ffecom_finish_symbol_transform_): Don't bother - transforming a dummy argument, to avoid a crash. - * ste.c (ffeste_R1227): Don't return a value if the - result decl, or its type, is error_mark_node. - - Fix 970626-4.f: - * lex.c (ffelex_splice_tokens): `-fdollar-ok' is - irrelevant to whether a DOLLAR token should be made - from an initial character of `$'. - - Fix 970626-6.f: - * stb.c (ffestb_do3_): DO iteration variable is an - lhs, not rhs, expression. - - Fix 970626-7.f and 970626-8.f: - * expr.c (ffeexpr_cb_comma_i_1_): Set IMPDO expression - to have clean info, because undefined rank, for example, - caused crash on mangled source on UltraSPARC but not - on Alpha for a series of weird reasons. - (ffeexpr_cb_close_paren_): If not CLOSE_PAREN, push - opANY expression onto stack instead of attempting - to mimic what program might have wanted. - (ffeexpr_cb_close_paren_): Don't wrap opPAREN around - opIMPDO, just warn that it's gratuitous. - * bad.def (FFEBAD_IMPDO_PAREN): New warning. - - Fix 970626-9.f: - * expr.c (ffeexpr_declare_parenthesized_): Must shut down - parsing in kindANY case, otherwise the parsing engine might - decide there's an ambiguity. - (ffeexpr_token_name_rhs_): Eliminate parentypeSUBROUTINE_ - case, so we crash right away if it comes through. - * st.c, st.h, sta.c, sta.h (ffest_shutdown, ffesta_shutdown): - New functions. - -Tue Jun 24 19:47:29 1997 Craig Burley - - * com.c (ffecom_check_size_overflow_): New function - catches some cases of the size of a type getting - too large. varasm.c must catch the rest. - (ffecom_sym_transform_): Use new function. - (ffecom_type_localvar_): Ditto. - -Mon Jun 23 01:09:28 1997 Craig Burley - - * global.c (ffeglobal_proc_def_arg): Fix comparison - of argno to #args. - (ffeglobal_proc_ref_arg): Ditto. - - * lang-options.h, top.c: Rename `-fdebug' to `-fxyzzy', - since it's an unsupported internals option and some - poor user might guess that it does something. - - * bad.def: Make a warning for each filewide diagnostic. - Put all filewides together. - * com.c (ffecom_sym_transform_): Don't substitute - known global tree for global entities when `-fno-globals'. - * global.c (ffeglobal_new_progunit_): Don't produce - fatal diagnostics about globals when `-fno-globals'. - Instead, produce equivalent warning when `-Wglobals'. - (ffeglobal_proc_ref_arg): Ditto. - (ffeglobal_proc_ref_nargs): Ditto. - (ffeglobal_ref_progunit_): Ditto. - * lang-options.h, top.c, top.h: New `-fno-globals' option. - -Sat Jun 21 12:32:54 1997 Craig Burley - - * expr.c (ffeexpr_fulfill_call_): Set array variable - to avoid warning about uninitialized variable. - - * Make-lang.in: Get rid of any setting of HOST_* macros, - since these will break gcc's build! - * makefile: New file to make building derived files - easier. - -Thu Jun 19 18:19:28 1997 Craig Burley - - * g77.c (main): Install Emilio Lopes' patch to support - Ratfor, and to fix the printing of the version string - to go to stderr, not stdout. - * lang-specs.h: Install Emilio Lopes' patch to support - Ratfor, and patch the result to support picking up - `*f771' from the `specs' file. - -Thu Jun 12 14:36:25 1997 Craig Burley - - * storag.c (ffestorag_update_init, ffestorag_update_save): - Also update parent, in case equivalence processing - has already eliminated pointers to it via the - local equivalence info. - -Tue Jun 10 14:08:26 1997 Craig Burley - - * intdoc.c: Add cross-reference to end of description - of any generic intrinsic pointing to other intrinsics - with the same name. - - Warn about explicit type declaration for intrinsic - that disagrees with invocation: - * expr.c (ffeexpr_paren_rhs_let_): Preserve type info - for intrinsic functions. - (ffeexpr_token_funsubstr_): Ditto. - * intrin.c (ffeintrin_fulfill_generic): Warn if type - info of fulfilled intrinsic invocation disagrees with - explicit type info given symbol. - (ffeintrin_fulfill_specific): Ditto. - * stc.c (ffestc_R1208_item): Preserve type info - for intrinsics. - (ffestc_R501_item): Ditto. - -Mon Jun 9 17:45:44 1997 Craig Burley - - * com.c (ffecom_expr_intrinsic_): Fix several of the - libU77/libF77-unix handlers to properly convert their - arguments. - - * com-rt.def (FFECOM_gfrtFSTAT): Append missing "i" to - arg string. - -Fri Jun 6 14:37:30 1997 Craig Burley - - * com.c (ffecom_expr_intrinsic_): Have a case statement - for every intrinsic implementation, so missing ones - are caught via gcc warnings. - Don't call ffeintrin_codegen_imp anymore. - * intrin.c (ffeintrin_fulfill_generic): Remove cg_imp - stuff from here. - (ffeintrin_codegen_imp): Delete this function. - * intrin.def, intrin.h: Remove DEFIMQ stuff from here - as well. - -Thu Jun 5 13:03:07 1997 Craig Burley - - * top.c (ffe_decode_option): New -fbadu77-intrinsics-* - options. - * top.h: Ditto. - * intrin.h: New BADU77 family. - * intrin.c (ffeintrin_state_family): Ditto. - - Implement new scheme to track intrinsic names vs. forms: - * intrin.c (ffeintrin_fulfill_generic), - (ffeintrin_fulfill_specific), (ffeintrin_is_intrinsic), - intrin.def: The documented name is now either in the - generic info or, if no generic, in the specific info. - For a generic, the specific info contains merely the - distinguishing form (usually "function" or "subroutine"), - used for diagnostics about ambiguous references and - in the documentation. - - * intrin.def: Clean up formatting of DEFNAME block. - Convert many libU77 intrinsics into generics that - support both subroutine and function forms. - Put the function forms of side-effect routines into - the new BADU77 family. - Make MCLOCK and TIME return INTEGER*4 again, and add - INTEGER*8 equivalents called MCLOCK8 and TIME8. - Fix up more status return values to be written and - insist on them being I1 as well. - * com.c (ffecom_expr_intrinsic_): Lots of changes to - support new libU77 intrinsic interfaces. - -Mon Jun 2 00:37:53 1997 Craig Burley - - * com.c (ffecom_init_0): Pointer type is now INTEGER(KIND=7), - not INTEGER(KIND=0), since we want to reserve KIND=0 for - future use. - -Thu May 29 14:30:33 1997 Craig Burley - - Fix bugs preventing CTIME(I*4) from working correctly: - * com.c (ffecom_char_args_): For FUNCREF case, process - args to intrinsic just as they would be in - ffecom_expr_intrinsic_. - * com-rt.def (FFECOM_gfrtCTIME, FFECOM_gfrtTTYNAM): Fix - argument decls to specify `&'. - -Wed May 28 22:19:49 1997 Craig Burley - - Fix gratuitous warnings exposed by dophot aka 970528-1: - * global.c (ffeglobal_proc_def_arg, ffeglobal_proc_ref_arg): - Support distinct function/subroutine arguments instead of - just procedures. - * global.h: Ditto. - * expr.c (ffeexpr_fulfill_call_): A SYMTER with kindNONE - also is a procedure (either function or subroutine). - -Mon May 26 20:25:31 1997 Craig Burley - - * bad.def: Have several lexer diagnostics refer to - documentation for people who need more info on what Fortran - source code is supposed to look like. - - * expr.c (ffeexpr_reduced_bool1_), bad.def: New diagnostics - specific to .NOT. now mention only one operand instead - of two. - - * g77.c: Recognize -fsyntax-only, similar to -c etc. - (lookup_option): Fix bug that prevented non-`--' options - from being recognized. - -Sun May 25 04:29:04 1997 Craig Burley - - * intrin.def (FFEINTRIN_impCTIME): Accept `I*' expression - for STime instead of requiring `I2'. - -Tue May 20 16:14:40 1997 Craig Burley - - * symbol.c (ffesymbol_reference): All references to - standard intrinsics are considered explicit, so as - to avoid generating basically useless warnings. - * intrin.c, intrin.h (ffeintrin_is_standard): Returns TRUE - if intrinsic is standard. - -Sun May 18 21:14:59 1997 Craig Burley - - * com-rt.def: Changed all external names of the - form `"\([a-z0-9]*\)_' to `"G77_\1_0"' so as to - allow any name valid as an intrinsic to be used - as such and as a user-defined external procedure - name or common block as well. - -Thu May 8 13:07:10 1997 Craig Burley - - * expr.c (ffeexpr_cb_end_notloc_): For %VAL, %REF, and - %DESCR, copy arg info into new node. - -Mon May 5 14:42:17 1997 Craig Burley - - From Uwe F. Mayer : - * Make-lang.in (g77-cross): Fix typo in g77.c path. - - From Brian McIlwrath : - * lang-specs.h: Have g77 pick up options from a section - labeled `*f771' of the `specs' file. - -Sat May 3 02:46:08 1997 Craig Burley - - * intrin.def (FFEINTRIN_defSIGNAL): Add optional `Status' - argument that com.c already expects (per Dave Love). - - More changes to support better tracking of (filewide) - globals, in particular, the arguments to procedures: - * bad.def (FFEBAD_FILEWIDE_NARGS, FFEBAD_FILEWIDE_NARGS_W, - FFEBAD_FILEWIDE_ARG, FFEBAD_FILEWIDE_ARG_W): New diagnostics. - * expr.c (ffebad_fulfill_call_): Provide info on each - argument to ffeglobal. - * global.c, global.h (ffeglobal_proc_def_arg, - ffeglobal_proc_def_nargs, ffeglobal_proc_ref_arg, - ffeglobal_proc_ref_args): New functions. - (ffeglobalArgSummary, ffeglobalArgInfo_): New types. - -Tue Apr 29 18:35:41 1997 Craig Burley - - More changes to support better tracking of (filewide) - globals: - * expr.c (ffeexpr_fulfill_call_): New function. - (ffeexpr_token_name_lhs_): Call after building procedure - reference expression. Also leave info field for ANY-ized - expression alone. - (ffeexpr_token_arguments_): Ditto. - -Mon Apr 28 20:04:18 1997 Craig Burley - - Changes to support better tracking of (filewide) - globals, mainly to avoid crashes due to inlining: - * bad.def: Go back to quoting intrinsic names, - (FFEBAD_FILEWIDE_DISAGREEMENT, FFEBAD_FILEWIDE_TIFF, - FFEBAD_FILEWIDE_TYPE_MISMATCH): New diagnostics. - (FFEBAD_INTRINSIC_EXPIMP, FFEBAD_INTRINSIC_GLOBAL): Reword - for clarity. - * com.c (ffecom_do_entry_, ffecom_start_progunit_, - ffecom_sym_transform_): Accommodate new FFEGLOBAL_typeEXT - possibility. - * expr.c (ffeexpr_sym_lhs_call_, ffeexpr_sym_lhs_extfunc_, - ffeexpr_sym_rhs_actualarg_, ffeexpr_declare_parenthesized_, - ffeexpr_paren_rhs_let_, ffeexpr_token_funsubstr_): - Fill in real kind info instead of leaving NONE where - appropriate. - Register references to intrinsics and globals with ffesymbol - using new ffesymbol_reference function instead of - ffesymbol_globalize. - * global.c (ffeglobal_type_string_): New array for - new diagnostics. - * global.h, global.c: - Replace ->init mechanism with ->tick mechanism. - Move other common-related members into a substructure of - a union, so the proc substructure can be introduced - to include members related to externals other than commons. - Don't complain about ANY-ized globals; ANY-ize globals - once they're complained about, in any case where code - generation could become a problem. - Handle global entries that have NONE type (seen as - intrinsics), EXT type (seen as EXTERNAL), and so on. - Keep track of kind and type of externals, both via - definition and via reference. - Diagnose disagreements about kind or type of externals - (such as functions). - (ffeglobal_ref_intrinsic, ffeglobal_ref_progunit_): New - functions. - * stc.c (ffestc_R1207_item, ffestc_R1208_item, - ffestc_R1219, ffestc_R1226): - Call ffesymbol_reference, not ffesymbol_globalize. - * stu.c (ffestu_sym_end_transition, - ffestu_sym_exec_transition): - Call ffesymbol_reference, not ffesymbol_globalize. - * symbol.c (ffesymbol_globalize): Removed... - (ffesymbol_reference): ...to this new function, - which more generally registers references to symbols, - globalizes globals, and calls on the ffeglobal module - to check globals filewide. - - * global.h, global.c: Rename some macros and functions - to more clearly distinguish common from other globals. - All callers changed. - - * com.c (ffecom_sym_transform_): Trees describing - filewide globals must be allocated on permanent obstack. - - * expr.c (ffeexpr_token_name_lhs_): Don't generate - gratuitous diagnostics for FFEINFO_whereANY case. - -Thu Apr 17 03:27:18 1997 Craig Burley - - * global.c: Add support for flagging intrinsic/global - confusion via warnings. - * bad.def (FFEBAD_INTRINSIC_EXPIMP, - FFEBAD_INTRINSIC_GLOBAL): New diagnostics. - * expr.c (ffeexpr_token_funsubstr_): Ditto. - (ffeexpr_sym_lhs_call_): Ditto. - (ffeexpr_paren_rhs_let_): Ditto. - * stc.c (ffestc_R1208_item): Ditto. - -Wed Apr 16 22:40:56 1997 Craig Burley - - * expr.c (ffeexpr_declare_parenthesized_): INCLUDE - context can't be an intrinsic invocation either. - -Fri Mar 28 10:43:28 1997 Craig Burley - - * expr.c (ffeexpr_token_arguments_): Make sure top of - exprstack is operand before dereferencing operand field. - - * lex.c (ffelex_prepare_eos_): Fill up truncated - hollerith token, so crash on null ->text field doesn't - happen later. - - * stb.c (ffestb_R10014_): If NAMES isn't recognized (or - the recognized part is followed in the token by a - non-digit), don't try and collect digits, as there - might be more than FFEWHERE_indexMAX letters to skip - past to do so -- and the code is diagnosed anyway. - -Thu Mar 27 00:02:48 1997 Craig Burley - - * com.c (ffecom_sym_transform_): Force local - adjustable array onto stack. - - * stc.c (ffestc_R547_item_object): Don't actually put - the symbol in COMMON if the symbol has already been - EQUIVALENCE'd to a different COMMON area. - - * equiv.c (ffeequiv_add): Don't actually do anything - if there's a disagreement over which COMMON area is - involved. - -Tue Mar 25 03:35:19 1997 Craig Burley - - * com.c (ffecom_transform_common_): If no explicit init - of COMMON area, don't actually init it even though - storage area suggests it. - -Mon Mar 24 12:10:08 1997 Craig Burley - - * lex.c (ffelex_image_char_): Avoid overflowing the - column counter itself, as well as the card image. - - * where.c (ffewhere_line_new): Cast ffelex_line_length() - to (size_t) so 255 doesn't overflow to 0! - - * stc.c (ffestc_labeldef_notloop_begin_): Don't gratuitously - terminate loop before processing statement, so block - doesn't disappear out from under EXIT/CYCLE processing. - (ffestc_labeldef_notloop_): Has old code from above - function, instead of just calling it. - - * expr.c (ffeexpr_cb_comma_i_4_): Don't skip over - arbitrary token (such as EOS). - - * com.c (ffecom_init_zero_): Handle RECORD_TYPE and - UNION_TYPE so -fno-zeros works with -femulated-complex. - -1997-03-12 Dave Love - - * intrin.def: New intrinsics INT2, INT8, CPU_TIME. Fix AND, OR, - XOR. [Integrated by burley, AND/OR/XOR already fixed, INT8 - implementation changed/fixed.] - -Wed Mar 12 10:40:08 1997 Craig Burley - - * Make-lang.in ($(srcdir)/f/intdoc.texi): Simplify rules - so building f/intdoc is not always necessary; remove - f/intdoc after running it if it is built. - -Tue Mar 11 23:42:00 1997 Craig Burley - - * intrin.def (FFEINTRIN_impAND, FFEINTRIN_impOR, - FFEINTRIN_impXOR): Use the IAND, IOR, and IEOR implementations - of these, instead of crashing in ffecom_expr_intrinsic_ - or adding case labels there. - -Mon Mar 10 22:51:23 1997 Craig Burley - - * intdoc.c: Fix so any C compiler can compile this. - -Fri Feb 28 13:16:50 1997 Craig Burley - - * Version 0.5.20 released. - -Fri Feb 28 01:45:25 1997 Craig Burley - - * Make-lang.in (RUNTIMESTAGESTUFF, LIBU77STAGESTUFF): - Move some files incorrectly in the former to the latter, - and add another file or two to the latter. - - New meanings for (KIND=n), and new denotations in the - little language describing intrinsics: - * com.c (ffecom_init_0): Assign new meanings. - * intdoc.c: Document new meanings. - Support the new denotations. - * intrin.c: Employ new meanings, mapping them to internal - values (which are the same as they ever were for now). - Support the new denotations. - * intrin.def: Switch DEFIMP table to the new denotations. - - * intrin.c (ffeintrin_check_): Fix bug that was leaving - LOC() and %LOC() returning INTEGER*4 on systems where - it should return INTEGER*8. - - * type.c: Canonicalize function definitions, for etags - and such. - -Wed Feb 26 20:43:03 1997 Craig Burley - - * com.c (ffecom_init_0): Choose INTEGER(KIND=n) types, - where n is 2, 3, and 4, according to the new docs - instead of according to the old C correspondences - (which seem less useful at this point). - - * equiv.c (ffeequiv_destroy_): New function. - (ffeequiv_layout_local_): Use this new function - whenever the laying out of a local equivalence chain - is aborted for any reason. - Otherwise ensure that symbols no longer reference - the stale ffeequiv entries that result when they - are killed off in this procedure. - Also, the rooted symbol is one that has storage, - it really is irrelevant whether it has an equiv entry - at this point (though the code to remove the equiv - entry was put in at the end, just in case). - (ffeequiv_kill): When doing internal checks, make - sure the victim isn't named by any symbols it points - to. Not as complete a check as looking through the - entire symbol table (which does matter, since some - code in equiv.c used to remove symbols from the lists - for an ffeequiv victim but not remove that victim as the - symbol's equiv info), but this check did find some - real bugs in the code (that were fixed). - -Mon Feb 24 16:42:13 1997 Craig Burley - - * com.c (ffecom_expr_intrinsic_): Fix a couple of - warnings about uninitialized variables. - * intrin.c (ffeintrin_check_): Ditto, but there were - a couple of _real_ uninitialized-variable _bugs_ here! - (ffeintrin_fulfill_specific): Ditto, no real bug here. - -Sun Feb 23 15:01:20 1997 Craig Burley - - Clean up diagnostics (especially about intrinsics): - * bad.def (FFEBAD_UNIMPL_STMT): Remove. - (FFEBAD_INTRINSIC_*, FFEBAD_NEED_INTRINSIC): Clean these - up so they're friendlier. - (FFEBAD_INTRINSIC_CMPAMBIG): New. - * intrin.c (ffeintrin_fulfill_generic, - ffeintrin_fulfill_specific, ffeintrin_is_intrinsic): - Always choose - generic or specific name text (which is for doc purposes - anyway) over implementation name text (which is for - internal use). - * intrin.def: Use more descriptive name texts for generics - and specifics in cases where the names themselves are not - enough (e.g. IDATE, which has two forms). - - Fix some intrinsic mappings: - * intrin.def (FFEINTRIN_specIDINT, FFEINTRIN_specAND, - FFEINTRIN_specDFLOAT, FFEINTRIN_specDREAL, FFEINTRIN_specOR, - FFEINTRIN_specXOR): Now have their own implementations, - instead of borrowing from others. - (FFEINTRIN_specAJMAX0, FFEINTRIN_specAJMIN0, FFEINTRIN_specBJTEST, - FFEINTRIN_specDFLOTJ, FFEINTRIN_specFLOATJ, FFEINTRIN_specJIABS, - FFEINTRIN_specJIAND, FFEINTRIN_specJIBCLR, FFEINTRIN_specJIBITS, - FFEINTRIN_specJIBSET, FFEINTRIN_specJIDIM, FFEINTRIN_specJIDINT, - FFEINTRIN_specJIDNNT, FFEINTRIN_specJIEOR, FFEINTRIN_specJIFIX, - FFEINTRIN_specJINT, FFEINTRIN_specJIOR, FFEINTRIN_specJISHFT, - FFEINTRIN_specJISHFTC, FFEINTRIN_specJISIN, FFEINTRIN_specJMAX0, - FFEINTRIN_specJMAX1, FFEINTRIN_specJMIN0, FFEINTRIN_specJMIN1, - FFEINTRIN_specJMOD, FFEINTRIN_specJNINT, FFEINTRIN_specJNOT,): - Turn these implementations off, since it's not clear - just what types they expect in the context of portable Fortran. - (DFLOAT): Now in FVZ family, since f2c supports them - - Support intrinsic inquiry functions (BIT_SIZE, LEN): - * intrin.c: Allow `i' in . - * intrin.def (FFEINTRIN_impBIT_SIZE, FFEINTRIN_impLEN): - Mark args with `i'. - -Sat Feb 22 13:34:09 1997 Craig Burley - - Only warn, don't error, for reference to unimplemented - intrinsic: - * bad.def (FFEBAD_INTRINSIC_UNIMPLW): Warning version - of _UNIMPL. - * intrin.c (ffeintrin_is_intrinsic): Use new warning - version of _UNIMPL (FFEBAD_INTRINSIC_UNIMPLW). - - Complain about REAL(Z) and AIMAG(Z) (Z is DOUBLE COMPLEX): - * bad.def (FFEBAD_INTRINSIC_CMPAMBIG): New diagnostic. - * expr.c: Needed #include "intrin.h" anyway. - (ffeexpr_token_intrincheck_): New function handles delayed - diagnostic for "REAL(REAL(expr)" if next token isn't ")". - (ffeexpr_token_arguments_): Do most of the actual checking here. - * intrin.h, intrin.c (ffeintrin_fulfill_specific): New - argument, check_intrin, to tell caller that intrin is REAL(Z) - or AIMAG(Z). All callers updated, mostly to pass NULL in - for this. - (ffeintrin_check_): Also has new arg check_intrin for same - purpose. All callers updated the same way. - * intrin.def (FFEINTRIN_impAIMAG): Change return type - from "R0" to "RC", to accommodate f2c (and perhaps other - non-F90 F77 compilers). - * top.h, top.c: New option -fugly-complex. - - New GNU intrinsics REALPART, IMAGPART, and COMPLEX: - * com.c (ffecom_expr_intrinsic_): Implement impCOMPLEX - and impREALPART here. (specIMAGPART => specAIMAG.) - * intrin.def: Add the intrinsics here. - - Rename implementations of VXTIDATE and VXTTIME to IDATEVXT - and TIMEVXT, so they sort more consistently: - * com.c (ffecom_expr_intrinsic_): - * intrin.def: - - Delete intrinsic group `dcp', add `gnu', etc.: - * intrin.c (ffeintrin_state_family): FFEINTRIN_familyGNU - replaces FFEINTRIN_familyDCP, and gets state from `gnu' - group. - Get rid of FFEINTRIN_familyF2Z, nobody needs it. - Move FFEINTRIN_specDCMPLX from DCP family to FVZ family, - as f2c has it. - Move FFEINTRIN_specDFLOAT from F2C family to FVZ family. - (FFEINTRIN_specZABS, FFEINTRIN_specZCOS, FFEINTRIN_specZEXP, - FFEINTRIN_specZLOG, FFEINTRIN_specZSIN, FFEINTRIN_specZSQRT): - Move these from F2Z family to F2C family. - * intrin.h (FFEINTRIN_familyF2Z, FFEINTRIN_familyDCP): Remove. - (FFEINTRIN_familyGNU): Add. - * top.h, top.c: Replace `dcp' with `gnu'. - - * com.c (ffecom_expr_intrinsic_): Clean up by collecting - simple conversions into one nice, conceptual place. - Fix up some intrinsic subroutines (MVBITS, KILL, UMASK) to - properly push and pop call temps, to avoid wasting temp - registers. - - * g77.c (doit): Toon says variables should be defined - before being referenced. Spoilsport. - - * intrin.c (ffeintrin_check_): Now Dave's worried about - warnings about uninitialized variables. Okay, so for - basic return values 'g' and 's', they _were_ - uninitialized -- is determinism really _that_ useful? - - * intrin.def (FFEINTRIN_impFGETC): Fix STATUS argument - so that it is INTENT(OUT) instead of INTENT(IN). - -1997-02-21 Dave Love - - * intrin.def, com.c: Support Sun-type `short' and `long' - intrinsics. Perhaps should also do Microcruft-style `int2'. - -Thu Feb 20 15:16:53 1997 Craig Burley - - * com.c (ffecom_expr_intrinsic_): Clean up indentation. - Support SECONDSUBR intrinsic implementation. - Rename SECOND to SECONDFUNC for direct support via library. - - * g77.c: Fix to return proper status value to shell, - by obtaining it from processes it spawns. - - * intdoc.c: Fix minor typo. - - * intrin.def: Turn SECOND into generic that maps into - function and subroutine forms. - - * intrin.def: Make FLOAT and SNGL into specific intrinsics. - - * intrin.def, intrin.h: Change the way DEFGEN and DEFSPEC - macros work, to save on verbage. - -Mon Feb 17 02:08:04 1997 Craig Burley - - New subsystem to automatically generate documentation - on intrinsics: - * Make-lang.in ($(srcdir)/f/g77.info, - $(srcdir)/f/g77.dvi): Move g77 doc rules around. - Add to g77 doc rules the new subsystem. - (f77.mostlyclean, f77.maintainer-clean): Also clean up - after new doc subsystem. - * intdoc.c, intdoc.h: New doc subsystem code. - * intrin.h [FFEINTRIN_DOC]: When 1, don't pull in - stuff not needed by doc subsystem. - - Improve on intrinsics mechanism to both be more - self-documenting and to catch more user errors: - * intrin.c (ffeintrin_check_): Recognize new arg-len - and arg-rank information, and check it. - Move goto and signal indicators to the basic type. - Permit reference to arbitrary argument number, not - just first argument (for BESJN and BESYN). - (ffeintrin_init_0): Check and accept new notations. - * intrin.c, intrin.def: Value in COL now identifies - arguments starting with number 0 being the first. - - Some minor intrinsics cleanups (resulting from doc work): - * com.c (ffecom_expr_intrinsic_): Implement FLUSH - directly once again, handle its optional argument, - so it need not be a generic (awkward to handle in docs). - * intrin.def (BESJ0, BESJ1, BESJN, BESY0, BESY1, BESYN, - CHDIR, CHMOD, CTIME, DBESJ0, DBESJ1, DBESJN, DBESY0, - DBESY1, DBESYN, DDIM, ETIME, FGETC, FNUM, FPUTC, FSTAT, - GERROR, GETCWD, GETGID, GETLOG, GETPID, GETUID, GMTIME, - HOSTNM, IDATE, IERRNO, IIDINT, IRAND, ISATTY, ITIME, JIDINT, - LNBLNK, LSTAT, LTIME, MCLOCK, PERROR, SRAND, SYMLNK, TTYNAM, - UMASK): Change capitalization of initcaps (official) name - to be consistent with Burley's somewhat arbitrary rules. - (BESJN, BESYN): These have return arguments of same type - as their _second_ argument. - (FLUSH): Now a specific, not generic, intrinsic, with one - optional argument. - (FLUSH1): Eliminated. - Add arg-len and arg-rank info to several intrinsics. - (ITIME): Change argument type from REAL to INTEGER. - -Tue Feb 11 14:04:42 1997 Craig Burley - - * Make-lang.in (f771): Invocation of Makefile now done - with $(srcdir)=gcc to go along with $(VPATH)=gcc. - ($(srcdir)/f/runtime/configure, - $(srcdir)/f/runtime/libU77/configure): Break these out - so spurious triggers of this rule don't happen (as when - configure.in is more recent than libU77/configure). - (f77.rebuilt): Distinguish source versus build files, - so this target can be invoked from build directory and - still work. - * Makefile.in: This now expects $(srcdir) to be the gcc - source directory, not gcc/f, to agree with $(VPATH). - Accordingly, $(INCLUDES) has been fixed, various cruft - removed, the removal of f771 has been fixed to remove - the _real_ f771 (not the one in gcc's parent directory), - and so on. - - * lex.c: Part of ffelex_finish_statement_() now done - by new function ffelex_prepare_eos_(), so that, in one - popular case, the EOS can be prepared while the pointer - is at the end of the non-continued line instead of the - end of the line that marks no continuation. This improves - the appearance of diagnostics substantially. - -Mon Feb 10 12:44:06 1997 Craig Burley - - * Make-lang.in: runtime Makefile's, and include/f2c.h, - also depend on f/runtime/configure and f/runtime/libU77/configure. - - Fix various libU77 routines: - * com-rt.def (FFECOM_gfrtCTIME, FFECOM_gfrtMCLOCK, - FFECOM_gfrtTIME): These now use INTEGER*8 for time values, - for compatibility with systems like Alpha. - (FFECOM_gfrtSYSTEM_CLOCK, FFECOM_gfrtTTYNAM): Delete incorrect - trailing underscore in routine names. - * intrin.c, intrin.def: Support INTEGER*8 return values and - arguments ('4'). Change FFEINTRIN_impCTIME, FFEINTRIN_impMCLOCK, - and FFEINTRIN_impTIME accordingly. - (ffeintrin_is_intrinsic): Don't give caller a clue about - form of intrinsic -- shouldn't be needed at this point. - - Cope with generic intrinsics that are subroutines and functions: - * com.c (ffecom_finish_symbol_transform_, ffecom_expr_transform_): - Don't transform an intrinsic that is not known to be a subroutine - or a function. (Maybe someday have to avoid transforming - any intrinsic with an undecided or unknown implementation.) - * expr.c (ffeexpr_declare_unadorned_, - ffeexpr_declare_parenthesized_): Ok to invoke generic - intrinsic that has at least one subroutine form as a - subroutine. - Ok to pass intrinsic as actual arg if it has a known specific - intrinsic form that is valid as actual arg. - (ffeexpr_declare_parenthesized_): An unknown kind of - intrinsic has a paren_type chosen based on context. - (ffeexpr_token_arguments_): Build funcref/subrref based - on context, not on kind of procedure being called. - * intrin.h, intrin.c (ffeintrin_is_intrinsic): Undo changes of - Tue Feb 4 23:12:04 1997 by me, change all callers to leave - intrinsics as FFEINFO_kindNONE at this point. (Some callers - also had unused variables deleted as a result.) - - Enable all intrinsic groups (especially f90 and vxt): - * target.h (FFETARGET_defaultSTATE_DCP, FFETARGET_defaultSTATE_F2C, - FFETARGET_defaultSTATE_F90, FFETARGET_defaultSTATE_MIL, - FFETARGET_defaultSTATE_UNIX, FFETARGET_defaultSTATE_VXT): - Delete these macros, let top.c set them directly. - * top.c (ffeintrinsic_state_dcp_, ffe_intrinsic_state_f2c_, - ffe_intrinsic_state_f90_, ffe_intrinsic_state_mil_, - ffe_intrinsic_state_unix_, ffe_intrinsic_state_vxt_): - Enable all these directly. - -Sat Feb 8 03:21:50 1997 Craig Burley - - * g77.c: Incorporate recent changes to ../gcc.c. - For version magic (e.g. `g77 -v'), instead of compiling - /dev/null, write, compile, run, and then delete a small - program that prints the version numbers of the three - components of libf2c (libF77, libI77, and libU77), - so we get this info with bug reports. - Also, this change reduces the chances of accidentally - linking to an old (complex-alias-problem) libf2c. - Fix `-L' so the argument is expected in `-Larg'. - - * com.h (FFECOM_f2cLONGINT): For INTEGER*8 support in f2c.h, - dynamically determine proper type here, instead of - assuming `long long int' is correct. - -Tue Feb 4 23:12:04 1997 Craig Burley - - Add libU77 library from Dave Love : - * Make-lang.in (f77-runtime): Depend on new Makefile. - (f/runtime/libU77/Makefile): New rule. - Also configure libU77. - ($(srcdir)/f/runtime/configure: Use Makefile.in, - so configuration doesn't have to have happened. - (f77.mostlyclean, f77.clean, f77.distclean, - f77.maintainer-clean): Some fixups here, but more work - needed. - (RUNTIMESTAGESTUFF): Add libU77's config.status. - (LIBU77STAGESTUFF, f77.stage1, f77.stage2, f77.stage3, - f77.stage4): New macro, appropriate uses added. - * com-rt.def: Add libU77 procedures. - * com.c (ffecom_f2c_ptr_to_integer_type_node, - ffecom_f2c_ptr_to_real_type_node): New type nodes. - (FFECOM_rttypeCHARACTER_): New type of run-time function. - (ffecom_char_args_): Handle CHARACTER*n intrinsics - where n != 1 here, instead of in ffecom_expr_intrinsic_. - (ffecom_expr_intrinsic_): New code to handle new - intrinsics. - In particular, change how FFEINTRIN_impFLUSH is handled. - (ffecom_make_gfrt_): Handle new type of run-time function. - (ffecom_init_0): Initialize new type nodes. - * config-lang.in: New libU77 directory. - * intrin.h, intrin.c (ffeintrin_is_intrinsic): Handle - potential generic for subroutine _and_ function - specifics via two new arguments. All callers changed. - Properly ignore deleted/disabled intrinsics in resolving - generics. - (ffeintrin_check_, ffeintrin_init_0): Handle CHARACTER intrinsics of (*) - length. - * intrin.def: Permission granted by FSF to place this in - public domain, which will allow it to serve as source - for both g77 program and its documentation. - Add libU77 intrinsics. - (FLUSH): Now a generic, not specific, intrinsic. - (DEFIMP): Now support return modifier for CHARACTER intrinsics. - - * com-rt.def (FFECOM_gfrtDIM, FFECOM_gfrtERF, - FFECOM_gfrtERFC, FFECOM_gfrtEXP, FFECOM_gfrtSIGN, - FFECOM_gfrtSIN, FFECOM_gfrtSINH, FFECOM_gfrtTAN, - FFECOM_gfrtTANH, FFECOM_gfrtPOW_RI): Change "&r" to "&f". - -Sat Feb 1 12:15:09 1997 Craig Burley - - * Version 0.5.19.1 released. - - * com.c (ffecom_expr_, ffecom_expr_intrinsic_, - ffecom_tree_divide_): FFECOM_gfrtPOW_ZI, - FFECOM_gfrtCONJG, FFECOM_gfrtDCONJG, - FFECOM_gfrtCCOS, FFECOM_gfrtCDCOS, - FFECOM_gfrtCLOG, FFECOM_gfrtCDLOG, - FFECOM_gfrtCSIN, FFECOM_gfrtCDSIN, - FFECOM_gfrtCSQRT, FFECOM_gfrtCDSQRT, - FFECOM_gfrtDIV_CC, FFECOM_gfrtDIV_ZZ: These all require - result to _not_ overlap one or more inputs. - -Sat Feb 1 00:25:55 1997 Craig Burley - - * com.c (ffecom_init_0): Do internal checks only if - -fset-g77-defaults not specified. - - Fix %LOC(), LOC() to return sufficiently wide type: - * com.h, com.c (ffecom_pointer_kind_, ffecom_label_kind_, - ffecom_pointer_kind(), ffecom_label_kind()): New globals - and accessor macros hold kind for integer pointers on target - machine. - (ffecom_init_0): Determine narrowest INTEGER type that - can hold a pointer (usually INTEGER*4 or INTEGER*8), - store it in ffecom_pointer_kind_, etc. - * expr.c (ffeexpr_cb_end_loc_): Use right type for %LOC(). - * intrin.c (ffeintrin_check_, ffeintrin_init_0): Support - new 'p' kind for type of intrinsic. - * intrin.def (FFEINTRIN_impLOC): Returns "Ip" instead of "I1", - so LOC() type is correct for target machine. - - Support -fugly-assign: - * lang-options.h, top.h, top.c (ffe_decode_option): - Accept -fugly-assign and -fno-ugly-assign. - * com.c (ffecom_expr_): Handle -fugly-assign. - * expr.c (ffeexpr_finished_): Check right type for ASSIGN - contexts. - -Fri Jan 31 14:30:00 1997 Craig Burley - - Remove last vestiges of -fvxt-not-f90: - * stb.c (ffestb_R10012_, ffestb_R10014_, ffestb_V0201_): - top.c, top.h: - -Fri Jan 31 02:13:54 1997 Craig Burley - - * top.c (ffe_decode_option): Warn if -fugly is specified, - it'll go away soon. - - * symbol.h: No need to #include "bad.h". - - Reorganize features from -fvxt-not-f90 to -fvxt: - * lang-options.h, top.h, top.c: - Accept -fvxt and -fno-vxt, but not -fvxt-not-f90 or -ff90-not-vxt. - Warn if the latter two are used. - * expr.c (ffeexpr_nil_rhs_): Double-quote means octal constant. - (ffeexpr_token_rhs_): Double-quote means octal constant. - * target.h (FFETARGET_defaultIS_VXT_NOT_90): Delete macro - definition, no longer needed. - - Make some -ff90 features the default: - * data.c (ffedata_value): DATA implies SAVE. - * src.h (ffesrc_is_name_noninit): Underscores always okay. - - Fix up some more #error directives by quoting their text: - * bld.c (ffebld_constant_is_zero): - * target.h: - -Sat Jan 18 18:22:09 1997 Craig Burley - - * g77.c (lookup_option, main): Recognize `-Xlinker', - `-Wl,', `-l', `-L', `--library-directory', `-o', - `--output'. - (lookup_option): Don't depend on SWITCH_TAKES_ARG - being correct, it might or might not have `-x' in - it depending on host. - Return NULL argument if it would be an empty string. - (main): If no input files (by gcc.c's definition) - but `-o' or `--output' specified, produce diagnostic - to avoid overwriting output via gcc. - Recognize C++ `+e' options. - Treat -L as another non-magical option (like -B). - Don't append_arg `-x' twice. - -Fri Jan 10 23:36:00 1997 Craig Burley - - * top.c [BUILT_FOR_270] (ffe_decode_option): Make - -fargument-noalias-global the default. - -Fri Jan 10 07:42:27 1997 Craig Burley - - Enable inlining of previously-compiled program units: - * com.c (ffecom_do_entry_, ffecom_start_progunit_): - Register new public function in ffeglobal database. - (ffecom_sym_transform_): Any GLOBAL or potentially GLOBAL - symbol should be looked up in ffeglobal database and - that tree node used, if found. That way, gcc knows - the references are to those earlier definitions, so it - can emit shorter branches/calls, inline, etc. - (ffecom_transform_common_): Minor change for clarity. - * expr.c (ffeexpr_sym-lhs_call_, ffeexpr_sym_lhs_extfunc_, - ffeexpr_sym_rhs_actualarg_, ffeexpr_paren_rhs_let_, - ffeexpr_token_funsubstr_): Globalize symbol as needed. - * global.c (ffeglobal_promoted): New function to look up - existing local symbol in ffeglobal database. - * global.h: Declare new function. - * name.h (ffename_token): New macro, plus alphabetize. - * stc.c (ffestc_R1207_item): Globalize EXTERNAL symbol. - * stu.c (ffestu_sym_end_transition, ffestu_sym_exec_transition): - Globalize symbol as needed. - * symbol.h, symbol.c (ffesymbol_globalize): New function. - -Thu Jan 9 14:20:00 1997 Craig Burley - - * ste.c (ffeste_R809): Produce a diagnostic for SELECT CASE - on CHARACTER type, instead of crashing. - -Thu Jan 9 00:52:45 1997 Craig Burley - - * stc.c (ffestc_order_entry_, ffestc_order_format_, - ffestc_R1226): Allow ENTRY and FORMAT before IMPLICIT - NONE, by having them transition only to state 1 instead - of state 2 (which is disallowed by IMPLICIT NONE). - -Mon Jan 6 22:44:53 1997 Craig Burley - - Fix AXP bug found by Rick Niles (961201-1.f): - * com.c (ffecom_init_0): Undo my 1996-05-14 change, as - it is incorrect and prevented easily finding this bug. - * target.h [__alpha__] (ffetargetReal1, ffetargetReal2): - Use int instead of long. - (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r1_, - ffetarget_cvt_r2_to_rv_, ffetarget_cvt_rv_to_r2_): - New functions that intercede for callers of - REAL_VALUE_(TO|UNTO)_TARGET_(SINGLE|DOUBLE). - All callers changed, and damaging casts to (long *) removed. - -Sun Jan 5 03:26:11 1997 Craig Burley - - * Make-lang.in (g77, g77-cross): Depend on both g77.c and - zzz.c, in $(srcdir)/f/. - - Better design for -fugly-assumed: - * stc.c (ffestc_R501_item, ffestc_R524_item, - ffestc_R547_item_object): Pass new is_ugly_assumed flag. - * stt.c, stt.h (ffestt_dimlist_as_expr, - ffestt_dimlist_type): New is_ugly_assumed flag now - controls whether "1" is treated as "*". - Don't treat "2-1" or other collapsed constants as "*". - -Sat Jan 4 15:26:22 1997 Craig Burley - - * stb.c (ffestb_R10012_): Don't confirm on FORMAT(A,) - or even FORMAT(A,,B), as R1229 only warns about the - former currently, and this seems reasonable. - - Improvements to diagnostics: - * sta.c (ffesta_second_): Don't add any ffestb parsers - unless they're specifically called for. - Set up ffesta_tokens[0] before calling ffestc_exec_transition, - else stale info might get used. - (ffesta_save_): Do a better job picking which parser to run - after running all parsers with no confirmed possibles. - (FFESTA_maxPOSSIBLES_): Decrease from 100 now that so few - possibles are ever on the list at a given time. - (struct _ffesta_possible): Add named attribute. - (ffesta_add_possible_exec_, ffesta_add_possible_nonexec_): - Make these into macros that call a single function that now - sets the named attribute. - (ffesta_add_possible_unnamed_exec_, - ffeseta_add_possible_unnamed_nonexec_): New macros. - (ffesta_second_): Designate unnamed possibles as - appropriate. - * stb.c (ffestb_R1229, ffestb_R12291_): Use more general - diagnostic, so things like "POINTER (FOO, BAR)" are - diagnosed as unrecognized statements, not invalid statement - functions. - * stb.h, stb.c (ffestb_unimplemented): Remove function. - -1996-12-30 Dave Love - - * com.c: #include libU77/config.h - (ffecom_f2c_ptr_to_integer_type_node, - ffecom_f2c_ptr_to_integer_type_node): New variables. - (ffecom_init_0): Use them. - (ffecom_expr_intrinsic_): Many news cases for libU77 intrinsics. - - * com-rt.def: New definitions for libU77. - * intrin.def: Likewise. Also correct ftell arg spec. - - * Makefile.in (f/runtime/libU77/config.h): New target for com.c - dependency. - * Make-lang.in (f771): Depend on f/runtime/Makefile for the above. - -Sat Dec 28 12:28:29 1996 Craig Burley - - * stt.c (ffestt_dimlist_type): Treat ([...,]1) in dimlist - as ([...,]*) if -fugly-assumed, so assumed-size array - detected early enough. - -Thu Dec 19 14:01:57 1996 Craig Burley - - * target.h (FFETARGET_REAL_VALUE_FROM_INT_): Conditionalize - definition on BUILT_FOR_280, not BUILT_WITH_280, since - the name of the macro was (properly) changed since 0.5.19. - - Fix warnings/errors resulting from ffetargetOffset becoming - `long long int' instead of `unsigned long' as of 0.5.19, - while ffebitCount remains `unsigned long': - * bld.c (ffebld_constantarray_dump): Avoid warnings by - using loop var of appropriate type, and using casts. - * com.c (ffecom_expr_): Use right type for loop var. - (ffecom_sym_transform_, ffecom_transform_equiv_): - Cast to right type in assertions. - * data.c (ffedata_gather_, ffedata_value_): Cast to right - type in assertions and comparisons. - -Wed Dec 18 12:07:11 1996 Craig Burley - - Patch from Alexandre Oliva : - * Makefile.in (all.indirect): Don't pass -bbigtoc option - to GNU ld. - - Cope with new versions of gcc: - * com.h (BUILT_FOR_280): New macro. - * com.c (ffecom_ptr_to_expr): Conditionalize test of - OFFSET_REF. - (ffecom_build_complex_constant_): Conditionalize calling - sequence for build_complex. - -Sat Dec 7 07:15:17 1996 Craig Burley - - * Version 0.5.19 released. - -Fri Dec 6 12:23:55 1996 Craig Burley - - * g77.c: Default to assuming "f77" is in $LANGUAGES, since - the LANGUAGE_F77 macro isn't defined by anyone anymore (but - might as well leave the no-f77 code in just in case). - * Make-lang.in (g77, g77-cross): Don't define LANGUAGE_F77 - anymore. - -1996-12-06 Dave Love - - * Make-lang.in (g77, g77-cross): Revert to building `g77' or not - conditional on `f77' in LANGUAGES. - -Wed Dec 4 13:08:44 1996 Craig Burley - - * Make-lang.in (g77, g77-cross): No libs or lib dependencies - in case where "f77" is not in $LANGUAGES. - - * lex.c (ffelex_image_char_, ffelex_file_fixed, - ffelex_file_free): Fixes to properly handle lines with - null character, and too-long lines as well. - - * lex.c: Call ffebad_start_msg_lex instead of - ffebad_start_msg throughout. - -Sun Dec 1 21:19:55 1996 Craig Burley - - Fix-up for 1996-11-25 changes: - * com.c (ffecom_member_phase2_): Subtract out 0 offset for - elegance and consistency with EQUIVALENCE aggregates. - (ffecom_sym_transform_): Ditto for LOCAL/COMMON, and - ensure we get the same parent storage area. - * data.c (ffedata_gather_, ffedata_value_): Subtract out - aggregate offset. - -Wed Nov 27 13:55:57 1996 Craig Burley - - * proj.h: Quote the text of the #error message, to avoid - strange-looking diagnostics from non-gcc ANSI compilers. - - * top.c: Make -fno-debug-kludge the default. - -Mon Nov 25 20:13:45 1996 Craig Burley - - Provide more info on EQUIVALENCE mismatches: - * bad.def (FFEBAD_EQUIV_MISMATCH): More detailed message. - * equiv.c (ffeequiv_layout_local_, ffeequiv_layout_cblock): - More details for FFEBAD_EQUIV_MISMATCH. - - Fix problem with EQUIVALENCE handling: - * equiv.c (ffeequiv_layout_local_): Redesign algorithm -- - old one was broken, resulting in rejection of good code. - (ffeequiv_offset_): Add argument, change callers. - Clean up the code, fix up the (probably unused) negative-value - case for SYMTER. - * com.c (ffecom_sym_transform_): For local EQUIVALENCE - member, subtract out aggregate offset (which is <= 0). - -Thu Nov 21 12:44:56 1996 Craig Burley - - Change type of ffetargetOffset from `unsigned long' to `long long': - * bld.c (ffebld_constantarray_dump): Change printf formats. - * storag.c (ffestorag_dump): Ditto. - * symbol.c (ffesymbol_report): Ditto. - * target.h (ffetargetOffset_f): Ditto and change type itself. - - Handle situation where list of languages does not include f77: - * Make-lang.in: Define LANGUAGE_F77 to 1 only if `f77' is in - the $LANGUAGES macro for the build. - * g77.c: Compile to a (nearly) no-op program if LANGUAGE_F77 - is not defined to 1. - - Fixes to delay confirmation of READ, WRITE, and GOTO statements - so the corresponding assignments to same-named CHAR*(*) arrays - work: - * stb.c (ffestb_R90915_, ffestb_91014_): New functions. - (ffestb_goto3_, ffestb_goto5_): Move confirmation from 3 to 5 - for the OPEN_PAREN case. - (ffestb_R9091_, ffestb_R9094_, ffestb_R90913_, ffestb_R90914_, - ffestb_R91012_, ffestb_R91013_): Use new functions, and confirm - except for the OPEN_PAREN case. - - Fixes to not confirm declarations with an open paren where - an equal sign or other assignment-like token might be, so the - corresponding assignments to same-named CHAR*(*) arrays work: - (ffestb_decl_entsp_5_): Move assertion so we crash on that first, - if it turns out to be wrong, before the less-debuggable crash - on mistaken confirmation. - (ffestb_decl_entsp_6_, ffestb_decl_entsp_7_, ffestb_decl_entsp_8_): - Include OPEN_PAREN in list of assignment-only tokens. - - Fix more diagnosed-crash bugs: - * stu.c (ffestu_sym_end_transition): ANY-ize an adjustable array - with bad dimension expressions even if still stateUNCERTAIN. - (ffestu_symter_end_transition_, ffestu_symter_exec_transition_): - Return TRUE for opANY as well. - For code elegance, move opSYMTER case into first switch. - -1996-11-17 Dave Love - - * lex.c: Fix last change. - -1996-11-14 Dave Love - - * Make-lang.in, config-lang.in: Remove the (broken) libU77 stuff, - pending 0.5.20. - -Thu Nov 14 15:40:59 1996 Craig Burley - - * bad.def (FFEBAD_UNIMPL_STMT): Explain that invalid - intrinsic references can trigger this message, too. - -1996-11-12 Dave Love - - * lex.c: Declare dwarfout routines. - - * config-lang.in: Sink grep o/p. - -Mon Nov 11 14:21:13 1996 Craig Burley - - * g77.c (main): Might as well print version number - for --verbose as well. - -Thu Nov 7 18:41:41 1996 Craig Burley - - * expr.c, lang-options.h, target.h, top.c, top.h: Split out - remaining -fugly stuff into -fugly-logint and -fugly-comma, - leaving -fugly as simply a `macro' that expands into other - options, and eliminate defaults for some of the ugly stuff - in target.h. - - * Make-lang.in (gcc-cross): Compile zzz.c, not version.o (!), - in to get version info for this target. - - * config-lang.in: Test for GBE patch application based - on whether 2.6.x or 2.7.x GBE is detected. - -Wed Nov 6 14:19:45 1996 Craig Burley - - * Make-lang.in (g77): Compile zzz.c in to get version info. - * g77.c: Add support for --help and --version. - - * g77.c (lookup_option): Short-circuit long-winded tests - when second char is not hyphen, just to save a spot of time. - -Sat Nov 2 13:50:31 1996 Craig Burley - - * intrin.def: Add FTELL and FSEEK intrinsics, plus new - `g' codes for alternate-return (GOTO) arguments. - * intrin.c (ffeintrin_check_): Support `g' codes. - * com-rt.def: Add ftell_() and fseek_() to database. - * com.c (ffecom_expr_intrinsic_): Ditto. Also, let each - subroutine intrinsic decide for itself what to do with - tree_type, the default being NULL_TREE once again (so - ffecom_call_ doesn't think it's supposed to cast the - function call to the type in the fall-through case). - - * ste.c (ffeste_R909_finish): Don't special-case list-directed - I/O, now that libf2c can return nonzero status codes. - (ffeste_R910_finish): Ditto. - (ffeste_io_call_): Simplify logic. - (ffeste_io_impdo_): - (ffeste_subr_beru_): - (ffeste_R904): - (ffeste_R907): - (ffeste_R909_start): - (ffeste_R909_item): - (ffeste_R909_finish): - (ffeste_R910_start): - (ffeste_R910_item): - (ffeste_R910_finish): - (ffeste_R911_start): - (ffeste_R923A): Ditto all the above. - -Thu Oct 31 20:56:28 1996 Craig Burley - - * config-lang.in, Make-lang.in: Rename flag file - build-u77 to build-libu77, for consistency with - install-libf2c and such. - - * config-lang.in: Don't complain about failure to patch - if pre-2.7.0 gcc is involved (since our patch for that - doesn't add support for tooning). - -Sat Oct 26 05:56:51 1996 Craig Burley - - * bad.def (FFEBAD_TYPELESS_TOO_LARGE): Remove this - unused and redundant diagnostic. - -Sat Oct 26 00:45:42 1996 Craig Burley - - * target.c (ffetarget_integerhex): Fix dumb bug. - -1996-10-20 Dave Love - - * gbe/2.7.2.1.diff: New file. - - * Makefile.in (F771_LDFLAGS): Add -bbigtoc for AIX4.1 up, suggested by - endo@material.tohoku.ac.jp [among others!]. - -Sat Oct 19 03:11:14 1996 Craig Burley - - * bad.def, bld.c, bld.h, expr.c, lang-options.h, target.c, - target.h, top.c, top.h (ffebld_constant_new_integerbinary, - ffebld_constant_new_integerhex, ffebld_constant_new_integeroctal, - ffeexpr_token_name_apos_name_, ffetarget_integerbinary, - ffetarget_integerhex, ffetarget_integeroctal): Support - new -fno-typeless-boz option with new functions, mods to - existing octal-handling functions, new macros, new error - messages, and so on. - - * com.c, lang-options.h, top.c, top.h (ffecom_notify_primary_entry): - Print program unit name on stderr if -fno-silent (new option). - - * lang-options.h, top.c, top.h, stt.c (ffestt_dimlist_as_expr): - Treat ([...,]1) in dimlist as ([...,]*) if -fugly-assumed - (new option). - - * lang-options.h: Comment out options duplicated in gcc/toplev.c, - because, somehow, having them commented in and building on my - DEC Alpha results in a cc1 that always segfaults, and gdb that - also segfaults whenever it debugs it up to init_lex() calling - xmalloc() or so. - -Thu Oct 17 00:39:27 1996 Craig Burley - - * stb.c (ffestb_R10013_): Don't change meaning of .sign until - after previous meaning/value used to set sign of value - (960507-1.f). - -Sun Oct 13 22:15:23 1996 Craig Burley - - * top.c (ffe_decode_option): Don't set back-end flags - that are nonexistent prior to gcc 2.7.0. - -Sun Oct 13 12:48:45 1996 Craig Burley - - * com.c (convert): Don't convert emulated complex expr to - real (via REALPART_EXPR) if the target type is (emulated) - complex. - -Wed Oct 2 21:57:12 1996 Craig Burley - - * com.c (ffecom_debug_kludge_): Set DECL_IN_SYSTEM_HEADER so - -Wunused doesn't complain about these manufactured decls. - (ffecom_expr_): Ditto, for original (non-ASSIGN'ed) variable. - (ffecom_transform_equiv_): Clear DECL_IGNORED_P for aggregate - area so it shows up as a debug-accessible symbol. - (pushdecl): Default for "invented" identifiers (a g77-specific - concept for now) is that they are artificial, in system header, - ignored for debugging purposes, used, and (for types) suppressed. - This ought to be overkill. - -Fri Sep 27 23:13:07 1996 Craig Burley - - * ste.c (ffeste_begin_iterdo_, ffeste_end_iterdo_): Support - one-trip DO loops (F66-style). - * lang-options.h, top.c, top.h (-fonetrip): New option. - -Thu Sep 26 00:18:40 1996 Craig Burley - - * com.c (ffecom_debug_kludge_): New function. - (ffecom_sym_transform_): Use new function for COMMON and EQUIVALENCE - members. - - * lang-options.h, top.c, top.h (-fno-debug-kludge): - New option. - -1996-09-24 Dave Love - - * Make-lang.in (include/f2c.h): - Remove dependencies on xmake_file and tmake_file. - They expand inconsistently in 2.8 c.f. 2.7; $(GCC_PARTS) depends on - them anyhow. - -1996-09-22 Dave Love - - * config-lang.in: Add --enable-libu77 option handling. - - * Make-lang.in: - Conditionally add --enable-libu77 when running runtime configure. - Define LIBU77STAGESTUFF and use it in relevant rules. - -1996-08-21 Dave Love - - * Make-lang.in (f77-runtime): - `stmp-hdrs' should have been `stmp-headers'. - -1996-08-20 Dave Love - - * Make-lang.in (f77-runtime): - Depend on stmp-hdrs, not stmp-int-hdrs, since libF77 - needs float.h. - -Sat Jun 22 18:17:11 1996 Craig Burley - - * com.c (ffecom_tree_divide_): Fix RECORD_TYPE case to - look at type of first field, properly, to determine - whether to call c_div or z_div. - -Tue Jun 4 04:27:18 1996 Craig Burley - - * com.c (ffecom_build_complex_constant_): Explicitly specify - TREE_PURPOSE. - (ffecom_expr_): Fix thinko. - (ffecom_2): For COMPLEX_EXPR, explicitly specify TREE_PURPOSE. - -Mon May 27 16:23:43 1996 Craig Burley - - Changes to optionally avoid gcc's back-end complex support: - * com.c (ffecom_stabilize_aggregate_): New function. - (ffecom_convert_to_complex_): New function. - (ffecom_make_complex_type_): New function. - (ffecom_build_complex_constant_): New function. - (ffecom_expr_): For opCONVERT of non-COMPLEX to COMPLEX, - don't bother explicitly converting to the subtype first, - because gcc does that anyway, and more code would have - to be added to find the subtype for the emulated-complex - case. - (ffecom_f2c_make_type_): Use ffecom_make_complex_type_ - instead of make_node etc. to make a complex type. - (ffecom_1, ffecom_2): Translate operations on COMPLEX operands - to appropriate operations when emulating complex. - (ffecom_constantunion): Use ffecom_build_complex_constant_ - instead of build_complex to build a complex constant. - (ffecom_init_0): Change point at which types are laid out - for improved consistency. - Use ffecom_make_complex_type_ instead of make_node etc. - to make a complex type. - Always calculate storage sizes from TYPE_SIZE, never TYPE_PRECISION. - (convert): Use e, not expr, since we've copied into that anyway. - For RECORD_TYPE cases, do emulated-complex conversions. - (ffecom_f2c_set_lio_code_): Always calculate storage sizes - from TYPE_SIZE, never TYPE_PRECISION. - (ffecom_tree_divide_): Allow RECORD_TYPE to also be handled - by run-time library. - (ffecom_expr_intrinsic_): Handle possible RECORD_TYPE as argument - to AIMAG intrinsic. - - * top.h, top.c, lang-options.h: Support new -f(no-)emulate-complex option. - - * com.c (ffecom_sym_transform_): Clarify and fix typos in comments. - -Mon May 20 02:06:27 1996 Craig Burley - - * target.h: Use new REAL_VALUE_UNTO_TARGET_* macros instead - of REAL_VALUE_FROM_TARGET_DOUBLE and _SINGLE. - Explicitly use long instead of HOST_WIDE_INT for emulation - of ffetargetReal1 and ffetargetReal2. - -1996-05-20 Dave Love - - * config-lang.in: - Test for patch being applied with flag_move_all_movables in toplev.c. - - * install.texi (Patching GNU Fortran): - Mention overriding X_CFLAGS rather than - editing proj.h on SunOS4. - - * Make-lang.in (F77_FLAGS_TO_PASS): - Add X_CFLAGS (convenient for SunOS4 kluge, in - particular). - (f77.{,mostly,dist}clean): Reorder things, in particular not to delete - Makefiles too early. - - * g77.c (DEFAULT_SWITCH_TAKES_ARG): Define a la gcc.c in the - current GCC snapshot. - -Tue May 14 00:24:07 1996 Craig Burley - - Changes for DEC Alpha AXP support: - * com.c (ffecom_init_0): REAL_ARITHMETIC means internal - REAL/DOUBLE PRECISION might well have a different size - than the compiled type, so don't crash if this is the - case. - * target.h: Use `int' for ffetargetInteger1, - ffetargetLogical1, and magical tests. Set _f format - strings accordingly. - -Tue Apr 16 14:08:28 1996 Craig Burley - - * top.c (ffe_decode_option): -Wall no longer implies - -Wsurprising. - -Sat Apr 13 14:50:06 1996 Craig Burley - - * com.c (ffecom_char_args_): If item is error_mark_node, - set *length that way, too. - - * com.c (ffecom_expr_power_integer_): If either operand - is error_mark_node, return that. - - * com.c (ffecom_intrinsic_len_): If item is error_mark_node, - return that for length. - - * expr.c (ffeexpr_declare_unadorned_, - ffeexpr_declare_parenthesized_): Instead of crashing - on unexpected contexts, produce a diagnostic. - - * intrin.c (ffeintrin_check_), intrin.def (impSIGNAL): - Allow procedure as second arg to SIGNAL intrinsic. - - * stu.c (ffestu_symter_end_transition_): New function. - (ffestu_symter_exec_transition_): Return bool arg. - Always transition symbol (don't inhibit when !whereNONE). - (ffestu_sym_end_transition): If DUMMY/LOCAL arg has any - opANY exprs in its dimlist, diagnose it so it doesn't - make it through to later stages that try to deal with - dimlist stuff. - (ffestu_sym_exec_transition): If sym has any opANY exprs - in its dimlist, diagnose it so it becomes opANY itself. - - * symbol.c (ffesymbol_error): If token arg is NULL, - just ANY-ize the symbol -- don't produce diagnostic. - -Mon Apr 1 10:14:02 1996 Craig Burley - - * Version 0.5.18 released. - -Mon Mar 25 20:52:24 1996 Craig Burley - - * com.c (ffecom_expr_power_integer_): Don't generate code - that compares COMPLEX (or, as it happens, REAL) via "LT_EXPR", - since the back end crashes on that. (This code would never - be executed anyway, but the test that avoids it has now been - translated to control whether the code gets generated at all.) - Fixes 960323-3.f. - - * com.c (ffecom_type_localvar_): Handle variable-sized - dimension bounds expressions here, so they get calculated - and saved on procedure entry. Fixes 960323-4.f. - - * com.c (ffecom_notify_init_symbol): Symbol has no init - info at all if only zeros have been used to initialize it. - Fixes 960324-0.f. - - * expr.c, expr.h (ffeexpr_type_combine): Renamed from - ffeexpr_type_combine_ and now a public procedure; last arg now - a token, instead of an internal structure used to extract a token. - Now allows the outputs to be aliased with the inputs. - Now allows a NULL token to mean "don't report error". - (ffeexpr_reduced_bool2_, ffeexpr_reduced_eqop2_, - ffeexpr_reduced_math2_, ffeexpr_reduced_power_, - ffeexpr_reduced_relop2_): Handle new calling sequence for - ffeexpr_type_combine. - * (ffeexpr_convert): Don't put an opCONVERT node - in just because the size is unknown; all downstream code - should be able to deal without it being there anyway, and - getting rid of it allows new intrinsic code to more easily - combine types and such without generating bad code. - * info.c, info.h (ffeinfo_kindtype_max): Rewrite to do - proper comparison of size of types, not just comparison - of their internal kind numbers (so I2.eq.I1 doesn't promote - I1 to I2, rather the other way around). - * intrin.c (ffeintrin_check_): Combine types of arguments - in COL a la expression handling, for greater flexibility - and permissiveness (though, someday, -fpedantic should - report use of this kind of thing). - Make sure Hollerith/typeless where CHARACTER expected is - rejected. This all fixes 960323-2.f. - - * ste.c (ffeste_begin_iterdo_): Fix some more type conversions - so INTEGER*2-laden DO loops don't crash at compile time on - certain machines. Believed to fix 960323-1.f. - - * stu.c (ffestu_sym_end_transition): Certainly reject - whereDUMMY not in any dummy list, whether stateUNCERTAIN - or stateUNDERSTOOD. Fixes 960323-0.f. - -Tue Mar 19 13:12:40 1996 Craig Burley - - * data.c (ffedata_value): Fix crash on opANY, and simplify - the code at the same time. - - * Make-lang.in (f77-runtime): Also depends on lib[FI]77/Makefile... - (include/f2c.h...): ...which in turn depend on */Makefile.in. - (f77.rebuilt): Rebuild runtime stuff too. - - * intrin.c (ffeintrin_check_): Accommodate TYPELESS/HOLLERITH - types, convert args as necessary, etc. - - * expr.c (ffeexpr_convert): Fix test for TYPELESS/HOLLERITH - to obey the docs; crash if no source token when error. - (ffeexpr_collapse_convert): Crash if no token when error. - -Mon Mar 18 15:51:30 1996 Craig Burley - - * com.c (ffecom_init_zero_): Renamed from - ffecom_init_local_zero_; now handles top-level - (COMMON) initializations too. - - * bld.c (ffebld_constant_is_zero): - * com.c (ffecom_symbol_transform_, ffecom_sym_transform_assign_, - ffecom_transform_common_, ffecom_transform_equiv_): - * data.c: - * equiv.c: - * equiv.h: - * lang-options.h: - * stc.c: - * storag.c: - * storag.h: - * symbol.c: - * symbol.h: - * target.c: - * target.h: - * top.c: - * top.h: All of this is mostly housekeeping-type changes - to support -f(no-)zeros, i.e. not always stuff zero - values into the initializer fields of symbol/storage objects, - but still track that they have been given initial values. - - * bad.def: Fix wording for DATA-related diagnostics. - - * com.c (ffecom_sym_transform_assign_): Don't check - any EQUIVALENCE stuff for local ASSIGN, the check was - bad (crashing), and it's not necessary, anyway. - - * com.c (ffecom_expr_intrinsic_): For MAX and MIN, - ignore null arguments as far arg[123], and fix handling - of ANY arguments. (New intrinsic support now allows - spurious trailing null arguments.) - - * com.c (ffecom_init_0): Add HOLLERITH (unsigned) - equivalents for INTEGER*2, *4, and *8, so shift intrinsics - and other things that need unsigned versions of signed - types work. - -Sat Mar 16 12:11:40 1996 Craig Burley - - * storag.c (ffestorag_exec_layout): Treat adjustable - local array like dummy -- don't create storage object. - * com.c (ffecom_sym_transform_): Allow for NULL storage - object in LOCAL case (adjustable array). - -Fri Mar 15 13:09:41 1996 Craig Burley - - * com.c (ffecom_sym_transform_): Allow local symbols - with nonconstant sizes (adjustable local arrays). - (ffecom_type_localvar_): Allow dimensions with nonconstant - component (adjustable local arrays). - * expr.c: Various minor changes to handle adjustable - local arrays (a new case of stateUNCERTAIN). - * stu.c (ffestu_sym_end_transition, - ffestu_sym_exec_transition): Ditto. - * symbol.def: Update docs to reflect these changes. - - * com.c (ffecom_expr_): Reduce space/time needed for - opACCTER case by handling it here instead of converting - it to opARRTER earlier on. - (ffecom_notify_init_storage): Don't convert ACCTER to ARRTER. - (ffecom_notify_init_symbol): Ditto. - - * com.c (ffecom_init_0): Crash and burn if any of the types' - sizes, according to the GBE, disagrees with the sizes of - the FFE's internal implementation. This might catch - Alpha/SGI bugs earlier. - -Fri Mar 15 01:09:41 1996 Craig Burley - - * com-rt.def, com.c, com.h: Changes for rewrite of intrinsic - handling. - * com.c (ffecom_arglist_expr_): New function. - (ffecom_widest_expr_type_): New function. - (ffecom_expr_intrinsic_): Reorganize, some rewriting. - (ffecom_f2c_make_type_): Layout complex types. - (ffecom_gfrt_args_): New function. - (ffecom_list_expr): Trivial change for consistency. - - * expr.c (ffeexpr_token_name_rhs_): Go back to getting - type from specific, not implementation, info. - (ffeexpr_token_funsubstr_): Set intrinsic implementation too! - * intrin.c: Major rewrite of most portions. - * intrin.def: Major rearchitecting of tables. - * intrin.h (ffeintrin_basictype, ffeintrin_kindtype): - Now (once again) take ffeintrinSpec as arg, not ffeintrinImp; - for now, these return NONE, since they're not really needed - and adding the necessary info to the tables is not trivial. - (ffeintrin_codegen_imp): New function. - * stc.c (ffestc_R1208_item): Change way ffeintrin funcs called, - back to original per above; but comment out the code anyway. - - * intrin.c (ffe_init_0): Do internal checks only if - -fset-g77-defaults not specified. - - * lang-options.h: Add -fset-g77-defaults option. - * lang-specs.h: Always pass -fset-g77-defaults. - * top.c, top.h: New option. - -Sat Mar 9 17:49:50 1996 Craig Burley - - * Make-lang.in (stmp-int-hdrs): Use --no-validate when - generating the f77.rebuilt files (BUGS, INSTALL, NEWS) - so cross-references can work properly in g77.info - without a lot of hassle. Users can probably deal with - the way they end up looking in the f77.rebuilt files. - - * bld.c (ffebld_constant_new_integer4_val): INTEGER*8 - support -- new function. - (ffebld_constant_new_logical4_val): New function. - * com.c (ffecom_f2c_longint_type_node): New type. - (FFECOM_rttypeLONGINT_): New return type code. - (ffecom_expr_): Add code to invoke pow_qq instead - of pow_ii for INTEGER4 (INTEGER*8) case. - If ffecom_expr_power_integer_ returns NULL_TREE, just do - the usual work. - (ffecom_make_gfrt_): Handle new type. - (ffecom_expr_power_integer_): Let caller do the work if in - dummy-transforming case, since - caller now knows about INTEGER*8 and such, by returning - NULL_TREE. - * expr.c (ffeexpr_reduced_power_): Complain about non-INTEGER - raised to INTEGER4 (INTEGER*8) power. - - * target.c (ffetarget_power_integerdefault_integerdefault): - Fix any**negative. - * com.c (ffecom_expr_power_integer_): Fix (-1)**(-8) and similar - to ABS() the integral result if the exponent is negative - and even. - - * ste.c (ffeste_begin_iterdo_): Clean up a type ref. - Always convert iteration count to _default_ INTEGER. - - * sta.c (ffesta_second_): Add BYTE and WORD type/stmts; - changes by Scott Snyder . - * stb.c (ffestb_decl_recursive): Ditto. - (ffestb_decl_recursive): Ditto. - (ffestb_decl_entsp_2_): Ditto. - (ffestb_decl_entsp_3_): Ditto. - (ffestb_decl_funcname_2_): Ditto. - (ffestb_decl_R539): Ditto. - (ffestb_decl_R5395_): Ditto. - * stc.c (ffestc_establish_declstmt_): Ditto. - * std.c (ffestd_R539item): Ditto. - (ffestd_R1219): Ditto. - * stp.h: Ditto. - * str-1t.fin: Ditto. - * str-2t.fin: Ditto. - - * expr.c (ffeexpr_finished_): For DO loops, allow - any INTEGER type; convert LOGICAL (assuming -fugly) - to corresponding INTEGER type instead of always default - INTEGER; let later phases do conversion of DO start, - end, incr vars for implied-DO; change checks for non-integral - DO vars to be -Wsurprising warnings. - * ste.c (ffeste_io_impdo_): Convert start, end, and incr - to type of DO variable. - - * com.c (ffecom_init_0): Add new types for [IL][234], - much of which was done by Scott Snyder . - * target.c: Ditto. - * target.h: Ditto. - -Wed Mar 6 14:08:45 1996 Craig Burley - - * top.c (ffe_init_gbe_): Make -frerun-loop-opt the default. - -Mon Mar 4 12:27:00 1996 Craig Burley - - * expr.c (ffeexpr_exprstack_push_unary_): Really warn only - about two successive _arithmetic_ operators. - - * stc.c (ffestc_R522item_object): Allow SAVE of (understood) - local entity. - - * top.c (ffe_decode_option): New -f(no-)second-underscore options. - * top.h: New options. - * com.c (ffecom_get_external_identifier_, ffecom_get_identifier_): - New options. - - * Make-lang.in (f77.maintainer-clean): Clean f/BUGS, f/INSTALL, - f/NEWS. - ($(srcdir)/f/BUGS, $(srcdir)/f/INSTALL, $(srcdir)/f/NEWS): - New rules. - ($(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi): Depend on - f/bugs.texi and f/news.texi. - (f77.install-man): Install f77 man pages (if enabled). - (f77.uninstall): Uninstall info docs, f77 man pages (if enabled). - - * top.c (ffe_init_gbe_): New function. - (ffe_decode_option, ffe_file): Call ffe_init_gbe_ to - set defaults for gcc options. - -Sat Jan 20 13:57:19 1996 Craig Burley - - * com.c (ffecom_get_identifier_): Eliminate needless - comparison of results of strchr. - -Tue Dec 26 11:41:56 1995 Craig Burley - - * Make-lang.in: Add rules for new files g77.texi, g77.info, - and g77.dvi. - Reorganize the *clean rules to more closely parallel gcc's. - - * config-lang.in: Exclude g77.info from diffs. - -Sun Dec 10 02:29:13 1995 Craig Burley - - * expr.c (ffeexpr_declare_unadorned_, - ffeexpr_declare_parenthesized_): Break out handling of - contextDATAIMPDO[INDEX,CTRL] so it's independent of symbol state. - Don't exec-transition these here (let ffeexpr_sym_impdoitem_ - handle that when appropriate). Don't "declare" them twice. - -Tue Dec 5 06:48:26 1995 Craig Burley - - * stc.c (ffestc_promote_sfdummy_): Allow whereNONE parent - symbol, since it is not necessarily known whether it will - become LOCAL or DUMMY. - -Mon Dec 4 03:46:55 1995 Craig Burley - - * lex.c (ffelex_display_token, ffelex_type_string_): Resurrect - these from their old versions and update them for possible invocation - from debugger. - * lex.h (ffelex_display_token): Declare this in case anyone - else wants to call it. - - * lex.c (ffelex_total_tokens_): Have this reflect actual allocated - tokens, no longer include outstanding "uses" of tokens. - - * malloc.c, malloc.h (MALLOC_DEBUG): New macro to control - checking of whether callers follow rules, now defaults to 0 - for "no checking" to improve compile times. - - * malloc.c (malloc_pool_kill): Fix bug that could prevent - subpool from actually being killed (wasn't setting its use - count to 1). - - * proj.h, *.c (dmpout): Replace all occurrences of `stdout' - and some of `stderr' with `dmpout', so where to dump debugging - output can be easily controlled during build; add default - for `dmpout' of `stderr' to proj.h. - -Sun Dec 3 00:56:29 1995 Craig Burley - - * com.c (ffecom_return_expr): Eliminate attempt at warning - about unset return values, since the back end does this better, - with better wording, and is not triggered by clearly working - (but spaghetti) code as easily as this test. - -Sat Dec 2 08:28:56 1995 Craig Burley - - * target.c (ffetarget_power_*_integerdefault): Raising 0 to - integer constant power should not be an error condition; - if so, other code should catch 0 to any power, etc. - - * bad.def (FFEBAD_BAD_POWER): 0**integer now a warning instead - of an error. - -Fri Dec 1 00:12:03 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * bad.def: Clarify diagnostic regarding complex constant elements. - * expr.c (ffeexpr_cb_comma_c_): Capitalize real/imaginary - for clarified diagnostic. - - * com.c (ffecom_close_include_): Close the file! - - * lex.c (ffelex_file_fixed): Update line info if the line - has any content, not just if it finishes a previous line - or has a label. - (ffelex_file_free): Clarify switch statement code. - -Sat Nov 18 19:37:22 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.17 released. - -Fri Nov 17 14:27:24 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Make-lang.in: Fix typo in comment. - - * Makefile.in (f/fini.o, f/proj-h.o): Don't use `$<' since - not all makes support it (e.g. NeXT make), use explicit - source name instead (with $(srcdir) and munging). - (ASSERT_H): assert.h lives in source dir, not build dir. - -Thu Nov 16 12:47:50 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_init_0): Fix dumb bug in code to produce - warning message about non-32-bit-systems. - - * stc.c (ffestc_R501_item): Parenthesize test to make - warning go away (and perhaps fix bug). - -Thu Nov 16 03:43:33 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * g77.c: Upgrade to 2.7.0's gcc.c. - Fix -v to pass a temp name instead of "/dev/null" for "-o". - -Fri Nov 10 19:16:05 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * ste.c (ffeste_begin_iterdo_): Add Toon's change to - make loops faster on some machines (implement termination - condition as "--i >= 0" instead of "i-- > 0"). - -Thu Nov 2 03:58:17 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Make-lang.in: Remove unnecessary $(exeext) a la cp/Make-lang.in. - - * com.c (ffecom_expr_): Restore old strategy for assignp variant - of opSYMTER case...always return the ASSIGN version of var. - That way, `-O -Wuninitialized' will catch "I=3;GOTO I;END" - (though the diagnostic will refer to `__g77_ASSIGN_i'). - - * com.c (ffecom_expr_power_integer_): For constant rhs case, - wrap every new eval of lhs in save_expr() so it is clear to - back end that MULT_EXPR(lhs,lhs) has identical operands, - otherwise for an rhs like 32767 it generates around 65K pseudo - registers, with which stupid_life_analysis cannot cope - (due to reg_renumber in regs.h being `short *' instead of - `int *'). - - * com.c (ffecom_expr_): Speed up implementation of LOGICAL - versions of opNOT, opAND, opOR, opXOR/opNEQV, and opEQV by - assuming the values actually are kosher LOGICAL bit patterns. - Also simplify code that implements some of the INTEGER versions - of these. - - * com.c (skip_redundant_dir_prefix, read_name_map, - ffecom_open_include_, signed_type, unsigned_type): Fold in - changes to cccp.c made from 2.7.0 through ss-950826. - - * equiv.c (ffeequiv_layout_local_): Kill the equiv list - if no syms in list. - - * expr.c (ffeexpr_reduced_eqop2_): Issue specific diagnostic - regarding usage of .EQV./.NEQV. in preference to .EQ./.NE.. - - * intrin.c: Add ERF and ERFC as generic intrinsics. - intrin.def: Same. - - * sta.c (ffesta_save_, ffesta_second_): Whoever calls - ffestd_exec_begin must also set ffesta_seen_first_exec = TRUE, - and anytime stc sees an exec transition, it must do both. - stc.c (ffestc_eof): Same. - - * stc.c (ffestc_promote_sfdummy_): If failed implicit typing - or CHARACTER*(*) arg, after calling ffesymbol_error, don't - reset info to ENTITY/DUMMY, because ffecom_sym_transform_ - doesn't expect such a thing with ANY/ANY type. - - * target.h (*logical*): Change some of these so they parallel - changes in com.c, e.g. for _eqv_, use (l)==(r) instead of - !!(l)==!!(r), to get a more faithful result. - -Fri Oct 27 07:06:59 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_sym_transform_): Simplify code for local - EQUIVALENCE case. - - * expr.c (ffeexpr_exprstack_push_unary_): Warn about two - successive operators. - (ffeexpr_exprstack_push_binary_): Warn about "surprising" - operator precedence, as in "-2**2". - - * lang-options.h: Add -W(no-)surprising options. - - * parse.c (yyparse): Don't reset -fpedantic if not -pedantic. - - * top.c (ffe_decode_option): Support new -Wsurprising option. - * top.h: Ditto. - -Mon Oct 23 09:14:15 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_finish_symbol_transform_): Don't transform - NONE/NONE (CHARACTER*(*)) vars, as these don't mean anything - in debugging terms, and can't be turned into anything - in the back end (so ffecom_sym_transform_ crashes on them). - - * com.c (ffecom_expr_): Change strategy for assignp variant - of opSYMTER case...always return the original var unless - it is not wide enough. - - * ste.c (ffeste_io_cilist_): Clarify diagnostic for ASSIGN - involving too-narrow variable. This shouldn't happen, though. - (ffeste_io_icilist_): Ditto. - (ffeste_R838): Ditto. - (ffeste_R839): Ditto. - -Thu Oct 19 03:21:20 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_sym_transform_assign_): Set TREE_STATIC - using the same decision-making process as used for their twin - variables, so ASSIGN can last across RETURN/CALL as appropriate. - -Fri Sep 22 20:21:18 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Makefile.in: fini is a host program, so it needs a host-compiled - version of proj.o, named proj-h.o. f/fini, f/fini.o, and - f/proj-h.o targets updated accordingly. - - * com.c (__eprintf): New function. - -Wed Sep 20 02:26:36 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * lang-options.h: Add omitted -funix-intrinsics-* options. - - * malloc.c (malloc_find_inpool_): Check for infinite - loop, crash if detected (user reports encountering - them in some large programs, this might help track - down the bugs). - -Thu Sep 7 13:00:32 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (lang_print_error_function): Don't dereference null - pointer when outside any program unit. - (ffecom_let_char_, ffecom_arg_ptr_to_expr): If catlist - item or length ever error_mark_node, don't continue processing, - since back-end functions like build_pointer_type crash on - error_mark_node's (due to pushing bad obstacks, etc.). - -Wed Aug 30 15:58:35 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.16 released. - -Mon Aug 28 12:24:20 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * bad.c (ffebad_finish): Fix botched message when no places - are printed (due to unknown line info, etc.). - - * std.c (ffestd_subr_labels_): Do a better job finding - line info in the case of typeANY and diagnostics. - -Fri Aug 25 15:19:29 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (DECL_ARTIFICIAL): Surround all references to this - macro with #if !BUILT_FOR_270 and #endif. - (init_lex): Surround print_error_function decl with - #if !BUILT_FOR_270 and #endif. - (lang_init): Call new ffelex_hash_kludge function to solve - problem with preprocessed files that have INCLUDE statements. - - * lex.c (ffelex_getc_): New function. - (ffelex_cfelex_): Use ffelex_getc_ instead of getc in any - paths of code that can be affected by ffelex_hash_kludge. - Don't make an EOF token for unrecognized token; set token - to NULL instead, to avoid problems when not initialized. - (ffelex_hash_): Use ffelex_getc_ instead of getc in any - paths of code that can be affected by ffelex_hash_kludge. - Test token returned by ffelex_cfelex_ for NULL, meaning - unrecognized token. - Get rid of useless used_up variable. - Don't do ffewhere stuff or kill any tokens if in - ffelex_hash_kludge. - (ffelex_file_fixed, ffelex_file_free): Use ffelex_getc_ - instead of getc in any paths of code that can be affected - by ffelex_hash_kludge. - (ffelex_hash_kludge): New function. - - * lex.h (ffelex_hash_kludge): New function. - -Wed Aug 23 15:17:40 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c: Implement -f(no-)underscoring options by always - compiling in code to do it, and having that code inhibit - itself when -fno-underscoring is in effect. This option - overrides -f(no-)f2c for this purpose; -f(no-)f2c returns - to it's <=0.5.15 behavior of affecting only how code - is generated, not how/whether names are mangled. - - * target.h: Redo specification of appending underscores so - the macros are named "_default" instead of "_is" and the - two-underscore macro defaults to 1. - - * top.c, top.h (underscoring): Add appropriate stuff - for the -f(no-)underscoring options. - -Tue Aug 22 10:25:01 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * bad.c (ffebad_finish): Call report_error_function (in toplev.c) - to better identify location of problem. - Say "(continued):" instead of "(continued:)" for consistency. - - * com.c (ffecom_gen_sfuncdef_): Set and reset new - ffecom_nested_entry_ variable to hold ffesymbol being compiled. - (lang_print_error_function): New function from toplev.c. - Use ffecom_nested_entry_ to help determine which name - and kind-string to print. - (ffecom_expr_intrinsic_): Handle EXIT and FLUSH invocations - with different calling sequences than library functions. - Have SIGNAL and SYSTEM push and pop calltemps, and convert - their return values to the destination type (just in case). - (FFECOM_rttypeINT_): New return type for `int', in case - gcc/f/runtime/libF77/system_.c(system_) is really supposed - to return `int' instead of `ftnint'. - - * com.h (report_error_function): Declare this. - - * equiv.c (ffeequiv_layout_local_): Don't forget to consider - root variable itself as possible "first rooted variable", - else might never set symbol and then crash later. - - * intrin.c (ffeintrin_check_exit_): Change to allow no args - and rename to ffeintrin_check_int_1_o_ for `optional'. - #define ffeintrin_check_exit_ and _flush_ to this new - function, so intrin.def can refer to the appropriate names. - - * intrin.def (FFEINTRIN_impFLUSH): Validate using - ffeintrin_check_flush_ so passing an INTEGER arg is allowed. - - * lex.c (ffelex_file_push_, ffelex_file_pop_): New functions - to manage input_file_stack in gbe. - (ffelex_hash_): Call new functions (instead of doing code). - (ffelex_include_): Call new functions to update stack for - INCLUDE (_hash_ handles cpp output of #include). - -Mon Aug 21 08:09:04 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Makefile.in: Put `-W' in front of every `-Wall', since - 2.7.0 requires that to engage `-Wunused' for parameters. - - * com.c: Mark all parameters as artificial, so - `-W -Wunused' doesn't complain about unused ones (since - there's no way right not to individually specify attributes - like `unused'). - - * proj.h: Don't #define UNUSED if already defined, regardless - of host compiler. - -Sun Aug 20 16:03:56 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * gbe/2.7.0.diff: Regenerate. - - * lang-options.h, lang-specs.h: If not __STDC__ (ANSI C), - avoid doing anything, especially the stringizing in -specs.h. - -Thu Aug 17 03:36:12 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * lang-specs.h: Remove useless optional settings of -traditional, - since -traditional is always set anyway. - -Wed Aug 16 16:56:46 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Make-lang.in (F2C_INSTALL_FLAG, F2CLIBOK): More - control over whether to install f2c-related stuff. - (install-f2c-*): New targets to install f2c-related - stuff in system, not just gcc, directories. - - * com.c: Change calls to ffecom_get_invented_identifier - to use generally more predictable names. - Change calls to build_range_type to ensure consistency - of types of operands. - (ffecom_get_external_identifier_): Change to accept - symbol info, not just text, so it can use f2c flag for - symbol to decide whether to append underscore(s). - (ffecom_get_identifier_): Don't change names if f2c flag - off for compilation. - (ffecom_type_permanent_copy_): Use same type for new max as - used for min. - (ffecom_notify_init_storage): Offline fixups for stand-alone. - - * data.c (ffedata_gather): Explicitly test for common block, - since it's no longer always the case that a local EQUIVALENCE - group has no symbol ptr (it now can, if a user-predictable - "rooted" symbol has been identified). - - * equiv.c: Add some debugging stuff. - (ffeequiv_layout_local_): Set symbol ptr with user-predictable - "rooted" symbol, for giving the invented aggregate a - predictable name. - - * g77.c (append_arg): Allow for 20 extra args instead of 10. - (main): For version-only case, add `-fnull-version' and, unless - explicitly omitted, `-lf2c -lm'. - - * lang-options.h: New "-fnull-version" option. - - * lang-specs.h: Support ".fpp" suffix for preprocessed source - (useful for OS/2, MS-DOS, other case-insensitive systems). - - * stc.c (ffestc_R544_equiv_): Swap way lists are merged so this - is consistent with the order in which lists are built, making - user predictability of invented aggregate name much higher. - - * storag.c, storag.h (FFESTORAG_typeDUMMY): Delete this enum. - - * top.c: Accept, but otherwise ignore, `-fnull-version'. - -Tue Aug 15 07:01:07 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * DOC, INSTALL, PROJECTS: Extensive improvements to documentation. - -Sun Aug 13 01:55:18 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * INSTALL (f77-install-ok): Document the use of this file. - - * Make-lang.in (F77_INSTALL_FLAG): New flag to control - whether to install an `f77' command (based on whether - a file named `f77-install-ok' exists in the source or - build directory) to replace the broken attempt to use - comment lines to avoid installing `f77' (broken in the - sense that it prevented installation of `g77'). - -Mon Aug 7 06:14:26 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * DOC: Add new sections for g77 & gcc compiler options, - source code form, and types, sizes and precisions. - Remove lots of old "delta-version" info, or at least - summarize it. - - * INSTALL: Add info here that used to be in DOC. - Other changes. - - * g77.c (lookup_option, main): Check for --print-* options, - so we avoid adding version-determining stuff. - -Wed Jul 26 15:51:03 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Make-lang.in, Makefile.in (input.j, INPUT_H): New file. - Update dependencies accordingly. - - * bad.c (ffebad_here): Okay to use unknown line/col. - - * compilers.h (@f77-cpp-input): Remove -P option now that - # directives are handled by f771. Update other options - to be more consistent with @c in gcc/gcc.c. Don't run f771 - if -E specified, etc., a la @c. - (@f77): Don't run f771 if -E specified, etc., a la @c. - - * config-lang.in: Avoid use of word "guaranteed". - - * input.j: New file to wrap around gcc/input.h. - - * lex.j: Add support for parsing # directives output by cpp. - (ffelex_cfebackslash_): New function. - (ffelex_cfelex_): New function. - (ffelex_get_directive_line_): New function. - (ffelex_hash_): New function. - (ffelex_include_): Change to not use ffewhere_file_(begin|end). - Also fix bug in pointing to next line (for diagnostics, &c) - following successful INCLUDE. - (ffelex_next_line_): New function that does chunk of code - seen in several places elsewhere in the lexers. - (ffelex_file_fixed): Delay finishing statement until source - line is registered with ffewhere, so INCLUDE processing - picks up the info correctly. - Okay to kill or use unknown line/col objects now. - Handle HASH (#) lines. - Reorder tests for insubstantial lines to put most frequent - occurrences at top, for possible minor speedup. - Some general consolidation of code. - (ffelex_file_free): Handle HASH (#) lines. - Okay to kill or use unknown line/col objects now. - Some general consolidation of code. - (ffelex_init_1): Detect HASH (#) lines. - (ffelex_set_expecting_hollerith): Okay to kill or use unknown - line/col objects now. - - * lex.h (FFELEX_typeHASH): New enum. - - * options-lang.h (-fident, -fno-ident): New options. - - * stw.c (ffestw_update): Okay to kill unknown line/col objects - now. - - * target.h (FFETARGET_okREALQUAD, FFETARGET_okCOMPLEXDOUBLE, - FFETARGET_okCOMPLEXQUAD): #define these appropriately. - - * top.c: Include flag.j wrapper, not flags.h directly. - (ffe_is_ident_): New flag. - (ffe_decode_option): Handle -fident and -fno-ident. - (ffe_file): Replace obsolete ffewhere_file_(begin|end) with - ffewhere_file_set. - - * top.h (ffe_is_ident_, ffe_is_ident, ffe_set_is_ident): - New flag and access functions. - - * where.c, where.h: Remove all tracking of parent file. - (ffewhere_file_begin, ffewhere_file_end): Delete these. - (ffewhere_line_use): Make it work with unknown line object. - -Mon Jul 17 03:04:09 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_sym_transform_): Set DECL_IN_SYSTEM_HEADER - flag for any local vars used as stmtfunc dummies or DATA - implied-DO iter vars, so no -Wunused warnings are produced - for them (a la f2c). - (ffecom_init_0): Do "extern int xargc;" for IARGC() intrinsic. - Warn if target machine not 32 bits, since g77 isn't yet - working on them at all well. - - * expr.c (ffeexpr_sym_lhs_call_, ffeexpr_sym_lhs_data_, - ffeexpr_sym_lhs_extfunc_, ffeexpr_sym_rhs_actualarg_, - ffeexpr_sym_rhs_let_, ffeexpr_paren_rhs_let_): Don't - gratuitously set attr bits that don't apply just - to avoid null set meaning error; instead, use explicit - error flag, and allow null attr set, to - fix certain bugs discovered by looking at this code. - - * g77.c: Major changes to improve support for gcc long options, - to make `g77 -v' report more useful info, and so on. - -Mon Jul 3 14:49:16 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * DOC, com.c, intrin.h, intrin.c, intrin.def, target.h, top.c, - top.h: Add new `unix' group of intrinsics, which includes the - newly added ERF, ERFC, EXIT, plus even newer ABORT, DERF, DERFC, - FLUSH, GETARG, GETENV, SIGNAL, and SYSTEM. - -Tue Jun 27 23:01:05 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * bld.c, bld.h (ffebld_constant_pool, - ffebld_constant_character_pool): Use a single macro (the - former) to access the pool for allocating constants, instead - of latter in public and FFEBLD_CONSTANT_POOL_ internally - in bld.c (which was the only one that was correct before - these changes). Add verification of integrity of certain - heap-allocated areas. - - * com.c (ffecom_overlap_, ffecom_args_overlap_, - ffecom_tree_canonize_ptr_, ffecom_tree_canonize_ref_): New - functions to optimize calling COMPLEX and, someday, CHARACTER - functions requiring additional argument to be passed. - (ffecom_call_, ffecom_call_binop_, ffecom_expr_, - ffecom_expr_intrinsic_): Change calling - sequences to include more info on possible destination. - (ffecom_expr_intrinsic_): Add ERF(), ERFC(), and EXIT() - intrinsic code. - (ffecom_sym_transform_): For assumed-size arrays, set high - bound to highest possible value instead of low bound, to - improve validity of overlap checking. - (duplicate_decls): If olddecl and newdecl are the same, - don't do any munging, just return affirmative. - - * expr.c: Change ffecom_constant_character_pool() to - ffecom_constant_pool(). - - * info.c (ffeinfo_new): Compile this version if not being - compiled by GNU C. - - * info.h (ffeinfo_new): Don't define macro if not being - compiled by GNU C. - - * intrin.c, intrin.def: Add ERF(), ERFC(), and EXIT() intrinsics. - (ffeintrin_check_exit_): New for EXIT() subroutine intrinsic. - - * malloc.c, malloc.h (malloc_verify_*): New functions to verify - integrity of heap-storage areas. - - * stc.c (ffestc_R834, ffestc_R835): Handle possibility that - an enclosing DO won't have a construct name even when the - CYCLE/EXIT does (i.e. without dereferencing NULL). - - * target.c, target.h (ffetarget_verify_character1): New function - to verify integrity of heap storage used to hold character constant. - -Thu Jun 22 15:36:39 1995 Howard Gordon (flash@super.org) - - * stp.h (ffestpVxtcodeIx): Fix typo in typedef for this. - -Mon May 29 15:22:31 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * *: Make all sorts of changes to accommodate upcoming gcc-2.7.0. - I didn't keep track of them, nor just when I made them, nor - when I (much later, probably in early August 1995) modified - them so they could properly handle both 2.7.0 and 2.6.x. - - * com.c (ffecom_expr_power_integer_): Don't expand_start_stmt_expr - if transforming dummy args, because the back end cannot handle - that (it's rejected by the gcc front end), just generate - call to run-time library. - Back out changes in 0.5.15 because more temporaries might be - needed anyway (for COMPLEX**INTEGER). - (ffecom_push_tempvar): Remove inhibitor. - Around start_decl and finish_decl (in particular, arround - expand_decl, which is called by them), push NULL_TREE into - sequence_rtl_expr, an external published by gcc/function.c. - This makes sure the temporary is truly in the function's - context, not the inner context of a statement-valued expression. - (I think the back end is inconsistent here, but am not - interested in convincing the gbe maintainers about this now.) - (pushdecl): Make sure that when pushing PARM_DECLs, nothing - other than them are pushed, as happened for 0.5.15 and which, - if done for other reasons not fixed here, might well indicate - some other problem -- so crash if it happens. - - * equiv.c (ffeequiv_layout_local_): If the local equiv group - has a non-nil COMMON field, it should mean that an error has - occurred and been reported, so just trash the local equiv - group and do nothing. - - * stc.c (ffestc_promote_sfdummy_): Set sfdummy arg state to - UNDERSTOOD so above checking for duplicate args actually - works, and so we don't crash later in pushdecl. - - * ste.c (ffeste_R1001): Set initial value only for VAR_DECLs, - not for, e.g., LABEL_DECLs, which the FORMAT label can be - if it was previously treated as an executable label. - -Sat May 20 01:53:53 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_sym_transform_): For adjustable arrays, - pass high bound through variable_size in case its primaries - are changed (dumb0.f, and this might also improve - performance so it approaches f2c|gcc). - -Fri May 19 11:00:36 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.15 released. - - * com.c (ffecom_expr_power_integer_): Push temp vars - before expanding a statement expression, since that seems - to cause temp vars to be "forgotten" after the end of the - expansion in the back end. Disallow more temp-var - pushing during such an expansion, just in case. - (ffecom_push_tempvar): Crash if a new variable needs to be - pushed but cannot be at this point (should never happen). - -Wed May 17 12:26:16 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * expr.c (ffeexpr_collapse_convert): Add code to convert - LOGICAL to CHARACTER. Reject conversion of REAL or COMPLEX - to CHARACTER entirely, as it cannot be supported with all - configurations. - - * target.h, target.c (ffetarget_convert_character1_logical1): - New function. - -Sun May 14 00:00:09 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_do_entry_, ffecom_gen_sfuncdef_, - ffecom_start_progunit_, ffecom_sym_transform_, - ffecom_init_0, start_function): Changes to have REAL - external functions return same type as DOUBLE PRECISION - external functions when -ff2c is in force; while at it, - some code cleanups done. - - * stc.c (ffestc_R547_item_object): Disallow array declarator - if one already exists for symbol. - - * ste.c (ffeste_R1227): Convert result variable to type - of function result as seen by back end (e.g. for when REAL - external function actually returns result as double). - - * target.h (FFETARGET_defaultFIXED_LINE_LENGTH): New - macro for default for -ffixed-line-length-N option. - - * top.c (ffe_fixed_line_length_): Initialize this to new - target.h macro instead of constant 72. - -Tue May 9 01:20:03 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * lex.c (ffelex_send_token_): If sending CHARACTER token with - null text field, put a single '\0' in it and set length/size - fields to 0 (to fix 950508-0.f). - (ffelex_image_char_): When setting ffelex_bad_line_ to TRUE, - always "close" card image by appending a null char and setting - ffelex_card_length_. As part of this, append useful text - to identify the two kinds of problems that involve this. - (ffelex_file_fixed): Reset ffelex_bad_line_ to FALSE after - seeing a line with invalid first character (fixes 950508-1.f). - If final nontab column is zero, assume tab seen in line. - (ffelex_card_image_): Always make this array 8 characters - longer than reflected by ffelex_card_size_. - (ffelex_init_1): Get final nontab column info from top instead - of assuming 72. - - * options-lang.h: Add -ffixed-line-length- prefix. - - * top.h: Add ffe_fixed_line_length() and _set_ version, plus - corresponding extern. - - * top.c: Handle -ffixed-line-length- option prefix. - -Fri Apr 28 05:40:25 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.14 released. - - * Make-lang.in: Add assert.j. - - * Makefile.in: Add assert.j. - - * assert.j: New file. - -Thu Apr 27 16:24:22 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * bad.h (ffebad_severity): New function. - - * bad.c (ffebad_severity): New function. - - * bad.def (FFEBAD_OPEN_INCLUDE): Change severity from SEVERE - to FATAL, since processing continues, and that seems fine. - - * com.c: Add facility to handle -I. - (ffecom_file, ffecom_close_include, ffecom_open_include, - ffecom_decode_include_option): New global functions for -I. - (ffecom_file_, ffecom_initialize_char_syntax_, - ffecom_close_include_, ffecom_decode_include_option_, - ffecom_open_include_, append_include_chain, open_include_file, - print_containing_files, read_filename_string, file_name_map, - savestring): New internal functions for -I. - - * compilers.h: Pass -I flag(s) to f771 (via "%{I*}"). - - * lex.c (ffelex_include_): Call ffecom_close_include - to close include file, for its tracking needs for -I, - instead of using fclose. - - * options-lang.h: Add -I prefix. - - * parse.c (yyparse): Call ffecom_file for main input file, - so -I handling works (diagnostics). - - * std.c (ffestd_S3P4): Have ffecom_open_include handle - opening and diagnosing errors with INCLUDE files. - - * ste.c (ffeste_begin_iterdo_): Use correct algorithm for - calculating # of iterations -- mathematically similar but - computationally different algorithm was not handling cases - like "DO I=6,5,2" correctly, because (5-6)/2+1 => 1, not 0. - - * top.c (ffe_decode_option): Allow -I, restructure a bit - for clarity and, maybe, speed. - -Mon Apr 17 13:31:11 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * g77.c: Remove -lc, turns out not all systems has it, but - leave other changes in for clarity of code. - -Sun Apr 16 21:50:33 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_expr_): Implement ARRAY_EXPR as INDIRECT_REF - of appropriate PLUS_EXPRs of ptr_to_expr of array, to see - if this generates better code. (Conditional on - FFECOM_FASTER_ARRAY_REFS.) - -Sun Apr 16 00:22:48 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Make-lang.in (F77_SRCS): Remove g77.c, since it doesn't - contribute to building f771. - - * Makefile.in (dircheck): Remove/replace with f/Makefile, because - phony targets that are referenced in other real targets get run - when those targets are specified, which is a waste of time (e.g. - when rebuilding and only g77.c has changed, f771 was being linked - anyway). - - * g77.c: Include -lc between -lf2c and -lm throughout. - - * implic.c (ffeimplic_establish_symbol): If -Wimplicit, warn if - implicit type given to symbol. - - * lex.c (ffelex_include_): Don't gratuitously increment line - number here. - - * top.h, top.c (ffe_is_warn_implicit_): New global variable and - related access macros. - (ffe_decode_option): Handle -W options, including -Wall and - -Wimplicit. - - * where.c (ffewhere_line_new): Don't muck with root line (was - crashing on null input since lexer changes over the past week - or so). - -Thu Apr 13 16:48:30 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_init_0): Register built-in functions for cos, - sin, and sqrt. - (ffecom_tree_fun_type_double): New variable. - (ffecom_expr_intrinsic_): Update f2c input and output files - to latest version of f2c (no important g77-related changes - noted, just bug fixes to f2c and such). - (builtin_function): New function from c-decl.c. - - * com-rt.def: Refer to built-in functions for cos, sin, and sqrt. - -Thu Apr 13 10:25:09 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_expr_intrinsic_): Convert 0. to appropriate - type to keep DCMPLX(I) from crashing the compiler. - (ffecom_expr_): Don't convert result from ffecom_tree_divide_. - (ffecom_tree_divide_): Add tree_type argument, have all callers - pass one, and don't convert right-hand operand to it (this is - to make this new function work as much like the old in-line - code used in ffecom_expr_ as possible). - - * lex.c: Maintain lineno and input_filename the way the gcc - lexer does. - - * std.c (ffestd_exec_end): Save and restore lineno and - input_filename around the second pass, which sets them - appropriately for each saved statement. - -Wed Apr 12 09:44:45 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_expr_power_integer_): New function. - (ffecom_expr_): Call new function for power op with integer second - argument, for generating better code. Also replace divide - code with call to new ffecom_tree_divide_ function. - Canonicalize calls to ffecom_truth_value(_invert). - (ffecom_tree_divide_): New function. - -Wed Apr 5 14:15:44 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * lex.c: Change to allocate text for tokens only when actually - needed, which should speed compilation up somewhat. - Change to allow INCLUDE at any point where a statement - can end, i.e. in ffelex_finish_statement_ or when a SEMICOLON - token is sent. - Remove some old, obsolete code. - Clean up layout of entire file to improve formatting, - readability, etc. - (ffelex_set_expecting_hollerith): Remove include argument. - -Fri Mar 31 23:19:08 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * bad.h, bad.c (ffebad_start_msg, ffebad_start_msg_lex): - New functions to generate arbitrary messages. - (FFEBAD_severityPEDANTIC): New severity, to correspond - to toplev's pedwarn() function. - - * lex.c (ffelex_backslash_): New function to implement - backslash processing. - (ffelex_file_fixed, ffelex_file_free): Implement new - backslash processing. - - * std.c (ffestd_R1001dump_): Don't assume CHARACTER and - HOLLERITH tokens stop at '\0' characters, now that backslash - processing is supported -- use their advertised lengths instead, - and double up the '\002' character for libf2c. - -Mon Mar 27 17:10:33 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_init_local_zero_): Implement -finit-local-zero. - (ffecom_sym_transform_): Same. - (ffecom_transform_equiv_): Same. - - * options-lang.h: Add -f(no-)(init-local-zero,backslash,ugly-init). - - * stb.c (ffestb_V020): Reject "TYPEblah(...", which might be - an array assignment. - - * target.h, top.h, top.c: Implement -finit-local-zero. - -Fri Mar 24 19:56:22 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Make-lang.in, Makefile.in: Remove conf-proj(.in) and - proj.h(.in) rules, plus related config.log, config.cache, - and config.status stuff. - - * com.c (ffecom_init_0): Change messages when atof(), bsearch(), - or strtoul() do not work as expected in the start-up test. - - * conf-proj, conf-proj.in: Delete. - - * lex.c (ffelex_file_fixed): Allow f2c's '&' in column 1 - to mean continuation line. - - * options-lang.h: New file, #include'd by ../toplev.c. - - * proj.h.in: Rename back to proj.h. - - * proj.h (LAME_ASSERT): Remove. - (LAME_STDIO): Remove. - (NO_STDDEF): Remove. - (NO_STDLIB): Remove. - (NO_BSEARCH): Remove auto detection, rename to !FFEPROJ_BSEARCH. - (NO_STRTOUL): Remove auto detection, rename to !FFEPROJ_STRTOUL. - (USE_HOST_LIMITS): Remove (maybe still needed by stand-alone?). - (STR, STRX): Do only ANSI C definitions. - -Mon Mar 13 10:46:13 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * BUGS: Add item about g77 requiring gcc to compile it. - - * NEWS: New file listing user-visible changes in the release. - - * PROJECTS: Update to include a new item or two, and modify - or delete items that are addressed in this or previous releases. - - * bad.c (ffebad_finish): Don't crash if missing string &c, - just substitute obviously distressed string "[REPORT BUG!!]" - for cases where the message/caller are fudgy. - - * bad.def: Clean up error messages in a major way, add new ones - for use by changes in target.c. - - * com.c (ffecom_expr_): Handle opANY in opCONVERT. - (ffecom_let_char_): Disregard destinations with ERROR_MARK. - (ffecom_1, ffecom_1_fn, ffecom_2, ffecom_2s, ffecom_3, - ffecom_3s, &c): Check all inputs for error_mark_node. - (ffecom_start_progunit_): Don't transform all symbols - in BLOCK DATA, since it never executes, and it is silly - to, e.g., generate all the structures for NAMELIST. - (ffecom_char_length_expr_): Rename to ffecom_intrinsic_len_. - (ffecom_intrinsic_ichar_): New function to handle ICHAR of - arbitrary expression with possible 0-length operands. - (ffecom_expr_intrinsic_): Use ffecom_intrinsic_char_. - For MVBITS, set tree_type to void_type_node. - (ffecom_start_progunit_): Name master function for entry points - after primary entry point so users can easily guess it while - debugging. - (ffecom_arg_ptr_to_expr): Change treatment of Hollerith, - Typeless, and %DESCR. - (ffecom_expr_): Change treatment of Hollerith. - - * data.c (ffedata_gather_): Handle opANY in opCONVERT. - - * expr.c (ffeexpr_token_apostrophe_): Issue FFEBAD_NULL_CHAR_CONST - warning as necessary. - (ffeexpr_token_name_rhs_): Set context for args to intrinsic - so that assignment-like concatenation is allowed for ICHAR(), - IACHAR(), and LEN() intrinsics. - (ffeexpr_reduced_*_): Say "an array" instead of "an entity" in - diagnostics, since it's more informative. - (ffeexpr_finished_): For many contexts, check for null expression - and array before trying to do a conversion, to avoid redundant - diagnostics. - - * g77.1: Fix typo for preprocessed suffix (.F, not .f). - - * global.c (ffeglobal_init_common): Warn if initializing - blank common. - (ffeglobal_pad_common): Enable code to warn if initial - padding needed. - (ffeglobal_size_common): Complain if enlarging already- - initialized common, since it won't work right anyway. - - * intrin.c: Add IMAG() intrinsic. - (ffeintrin_check_loc_): Allow opSUBSTR in LOC(). - - * intrin.def: Add IMAG() intrinsic. - - * lex.c: Don't report FFEBAD_NULL_CHAR_CONST errors. - - * sta.c, sta.h, stb.c: Changes to clean up error messages (see - bad.def). - - * stb.c (ffestb_R100113_): Issue FFEBAD_NULL_CHAR_CONST - warning as necessary. - - * stc.c (ffestc_shriek_do_): Don't try to reference doref_line - stuff in ANY case, since it won't be valid. - (ffestc_R1227): Allow RETURN in main program unit, with - appropriate warnings/errors. - (ffestc_subr_format_): Array of any type is a CHAREXPR (F77 C5). - - * ste.c (ffeste_begin_doiter_): Couple of fixes to accurately - determine if loop never executes. - - * target.c (ffetarget_convert_*_hollerith_): Append spaces, - not zeros, to follow F77 Appendix C, and to warn when - truncation of non-blanks done. - (ffetarget_convert_*_typeless): Rewrite to do typeless - conversions properly, and warn when truncation done. - (ffetarget_print_binary, ffetarget_print_octal, - ffetarget_print_hex): Rewrite to use new implementation of - typeless. - (ffetarget_typeless_*): Rewrite to use new implementation - of typeless, and to warn about overflow. - - * target.h (ffetargetTypeless): New implementation of - this type. - - * type.h, type.c (ffetype_size_typeless): Remove (incorrect) - implementation of this function and its extern. - -Sun Mar 5 18:46:42 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * BUGS: Clarify that constant handling would also fix lack of - adequate IEEE-754/854 support to some degree, and typeless - and non-decimal constants. - - * com.c (ffecom_type_permanent_copy_): Comment out to avoid - warnings. - (duplicate_decls): New function a la gcc/c-decl.c. - (pushdecl): Use duplicate_decls to decide whether to return - existing decl or new one, instead of always returning existing - decl. - (ffecom_expr_): opPERCENT_LOC now supports CHARACTER arguments. - (ffecom_init_0): Give f2c I/O code 0 for basictypeANY/kindtypeANY. - (ffecom_sym_transform_): For adjustable arrays, pass low bound - through variable_size in case its primaries are changed (950302-1.f). - - * com.h: More decls that belong in tree.h &c. - - * data.c (ffedata_eval_integer1_): Fix opPAREN case to not - treat value of expression as an error code. - - * expr.c (ffeexpr_finished_): Allow opSUBSTR in contextLOC case. - - * proj.c: Add "const" as appropriate. - -Mon Feb 27 10:04:03 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * bad.def (FFEBAD_BAD_SUBSTR): Fix bad grammar in message. - -Fri Feb 24 16:21:31 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.13 released. - - * INSTALL: Warn that f/zzz.o will compare differently between - stages, since it puts the __TIME__ macro into a string. - - * com.c (ffecom_sym_transform_): Transform kindFUNCTION/whereDUMMY - to pointer-to-function, not function. - (ffecom_expr_): Use ffecom_arg_ptr_to_expr instead of - ffecom_char_args_ to handle comparison between CHARACTER - types, so either operand can be a CONCATENATE. - (ffecom_transform_common_): Set size of initialized common area - to global (largest-known) size, even though size of init might - be smaller. - - * equiv.c (ffeequiv_offset_): Check symbol info for ANY. - - * expr.c (ffeexpr_find_close_paren_, ffeexpr_nil_*): New functions - to handle following the contour of a rejected expression, so - statements like "PRINT(I,I,I)=0" don't cause the PRINT statement - code to get the second passed back to it as if there was a - missing close-paren before it, the comma causing the PRINT code - to confirm the statement, resulting in an ambiguity vis-a-vis - the let statement code. - Use the new ffecom_find_close_paren_ handler when an expected - close-paren is missing. - (ffeexpr_isdigits_): New function, use in all places that - currently use isdigit in repetitive code. - (ffeexpr_collapse_symter): Collapse to ANY if init-expr is ANY, - so as to avoid having symbol get "transformed" if used to - dimension an array. - (ffeexpr_token_real_, ffeexpr_token_number_real_): Don't issue - diagnostic about exponent, since it'll be passed along the - handler path, resulting in a diagnostic anyway. - (ffeexpr_token_apos_char_): Use consistent handler path - regardless of whether diagnostics inhibited. - (ffeexpr_token_name_apos_name_): Skip past closing quote/apos - even if not a match or other diagnostic issued. - (ffeexpr_sym_impdoitem_): Exec-transition local SEEN symbol. - - * lex.c (ffelex_image_char_): Set ffelex_saw_tab_ if TAB - seen, not if anything other than TAB seen! - - * stc.c (ffestc_R537_item): If source is ANY but dest isn't, - set dest symbol's init expr to ANY. - (ffestc_R501_attrib, ffestc_R522, ffestc_R522start): Complain - about conflict between "SAVE" by itself and other uses of - SAVE only in pedantic mode. - - * ste.c (ffeste_R1212): Fix loop over labels to always - increment caseno, to avoid pushcase returning 2 for duplicate - values when one of the labels is invalid. - -Thu Feb 23 12:42:04 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.12 released. - - * Make-lang.in (f77.install-common): Add "else true;" before outer - "fi" per Makefile.in patch. - - * Makefile.in (dircheck): Add "else true;" before "fi" per - patch from chs1pm@surrey.ac.uk. - - * com.c (ffecom_push_tempvar): If type desired is ERROR_MARK, - return error_mark_node, to avoid crash that results from - making a VAR_DECL with error_mark_node as its type. - - * ste.c (ffeste_begin_iterdo_): Convert itercount to INTEGER - anytime calculation of number of iterations ends up with type - other than INTEGER (e.g. DOUBLE PRECISION, REAL). - -Thu Feb 23 02:48:38 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.11 released. - - * DOC: Explain -fugly-args. - - * bad.def (FFEBAD_ACTUALARG): Explain -fugly-args and how to - rewrite code to not require it. - - * com.c (ffecom_vardesc_): Handle negative type code, just in - case. - (ffecom_arg_ptr_to_expr): Let ffecom_expr handle hollerith - and typeless constants (move code to ffecom_constantunion). - (ffecom_constantunion): Handle hollerith and typeless constants. - - * expr.c (ffecom_finished_): Check -fugly-args in actual-arg - context where hollerith/typeless provided. - - * intrin.def (FFEINTRIN_genDFLOAT): Add FFEINTRIN_specDFLOAT. - (FFEINTRIN_specDFLOAT): Add as f2c intrinsic. - - * target.h (ffetarget_convert_real[12]_integer, - ffetarget_convert_complex[12]_integer): Pass -1 for high integer - value if low part is negative. - (FFETARGET_defaultIS_UGLY_ARGS): New macro. - - * top.c (ffe_is_ugly_args_): New variable. - (ffe_decode_option): Handle -fugly-args and -fno-ugly-args. - - * top.h (ffe_is_ugly_args_, ffe_is_ugly_args(), - ffe_set_is_ugly_args()): New variable and macros. - -Thu Feb 23 02:48:38 1995 Pedro A M Vazquez (vazquez@iqm.unicamp.br) - - * g77.c (sys_errlist): Use const for __FreeBSD__ systems - as well. - -Wed Feb 22 13:33:43 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.10 released. - - * CREDITS: Add Rick Niles. - - * INSTALL: Note how to get around lack of makeinfo. - - * Make-lang.in (f/proj.h): Remove # comment. - - * Makefile.in (f/proj.h): Remove # comment. - - * com.c (ffecom_expr_): Simplify opFUNCREF/opSUBRREF conversion. - (ffecom_sym_transform_): For whereGLOBAL and whereDUMMY - kindFUNCTION, use ffecom_tree_fun_type[][] only for non-constant - (non-statement-function) f2c functions. - (ffecom_init_0): ffecom_tree_fun_type[][] and _ptr_to_*_* are - really f2c-interface arrays, so use base type void for COMPLEX - (like CHARACTER). - -Tue Feb 21 19:01:18 1995 Dave Love - - * Make-lang.in (f77.install-common): Expurgate the test for and - possible installation of f2c in line with elsewhere. Seems to have - been missing a semicolon anyhow! - -Tue Feb 21 11:45:25 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.9 released. - - * Make-lang.in (f/proj.h): touch file to register update, - because the previous commands won't necessarily modify it. - - * Makefile.in (f/proj.h): touch file to register update, - because the previous commands won't necessarily modify it. - - * Makefile.in (f/str-*.h, f/str-*.j): Explicitly specify - output file names, so these targets go in build, not source, - directory. - - * bits.c, bits.h: Switch to valid ANSI C replacement for - ARRAY_ZERO. - - * com.c (ffecom_expr_): Add assignp arg to support ASSIGN better. - If assignp is TRUE, use different tree for FFEBLD_opSYMTER case. - (ffecom_sym_transform_assign_): New function. - (ffecom_expr_assign): New function. - (ffecom_expr_assign_w): New function. - - * com.c (ffecom_f2c_make_type_): Do make_signed_type instead - of make_unsigned_type throughout. - - * com.c (ffecom_finish_symbol_transform_): Expand scope of - commented-out code to probably produce faster compiler code. - - * com.c (ffecom_gen_sfuncdef_): Push/pop calltemps so - COMPLEX works right. - Remove obsolete comment. - - * com.c (ffecom_start_progunit_): If non-multi alt-entry - COMPLEX function, primary (static) entry point returns result - directory, not via extra arg -- to agree with ffecom_return_expr - and others. - Pretransform all symbols so statement functions are defined - before any code emitted. - - * com.c (ffecom_finish_progunit): Don't posttransform all - symbols here -- pretransform them instead. - - * com.c (ffecom_init_0): Don't warn about possible ASSIGN - crash, as this shouldn't happen now. - - * com.c (ffecom_push_tempvar): Fix to handle temp vars - pushed while context is a statement (nested) function, and - add appropriate commentary. - - * com.c (ffecom_return_expr): Check TREE_USED to determine - where return value is unset. - - * com.h (struct _ffecom_symbol_): Add note about length_tree - now being used to keep tree for ASSIGN version of symbol. - - * com.h (ffecom_expr_assign, ffecom_expr_assign_rw): New decls. - (error): Add this prototype for back-end function. - - * fini.c (main): Grab input, output, and include names - directly off the command line instead of making the latter - two out of the first. - - * lex.c: Improve tab handling for both fixed and free source - forms, and ignore carriage-returns on input, while generally - improving the code. ffelex_handle_tab_ has been renamed and - reinvented as ffelex_image_char_, among other things. - - * malloc.c, malloc.h: Switch to valid ANSI C replacement for - ARRAY_ZERO, and kill the full number of bytes in pools and - areas. - - * proj.h.in (ARRAY_ZERO, ARRAY_ZERO_SIZE): Remove. - - * ste.c (ffeste_io_cilist_, ffeste_io_icilist_, ffeste_R838, - ffeste_R839): Issue diagnostic if a too-narrow variable used in an - ASSIGN context despite changes to this code and code in com.c. - - * where.c, where.h: Switch to valid ANSI C replacement for - ARRAY_ZERO. - -Fri Feb 17 03:35:19 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.8 released. - - * INSTALL: In quick-build case, list g77 target first so g77 - gets installed. Also, explain that gcc gets built and installed - as well, even though this isn't really what we want (and maybe - we'll find a way around this someday). - -Fri Feb 17 02:35:41 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.7 released. - - * Makefile.in (CONFIG_H, HCONFIG_H, TCONFIG_H, TM_H): Remove - ../ prefix in front of .h files, since they're in the cd. - -Fri Feb 17 01:50:48 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.6 released. - -Thu Feb 16 20:26:54 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * ../README.g77: Remove description of g77 as "not-yet-published". - - * CREDITS: More changes. - - * Make-lang.in (G77STAGESTUFF): Remove cktyps stuff. - - * Makefile.in (CONFIG_H, HCONFIG_H, TCONFIG_H, TM_H): Don't - prefix gcc dir with $(srcdir) since these don't live there, - they are created in the build dir by gcc's configure. Add - a note explaining what these macros are about. - Update dependencies via deps-kinda. - - * README.NEXTSTEP: Credit Toon, and per his request, add his - email address. - - * com.h (FFECOM_DETERMINE_TYPES): #include "config.j". - - * config.j, convert.j, flags.j, hconfig.j, rtl.j, tconfig.j, - tm.j, tree.j: Don't #include if already done. - - * convert.j: #include "tree.j" first, as convert.h clearly depends - on trees being defined. - - * rtl.j: #include "config.j" first, since there's some stuff - in rtl.h that assumes it has been #included. - - * tree.j: #include "config.j" first, or real.h makes inconsistent - decision about return type of ereal_atof, leading to bugs, and - because tree.h/real.h assume config.h already included. - -Wed Feb 15 14:40:20 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.5 released. - - * Copyright notices updated to be FSF-style. - - * INSTALL: Some more clarification regarding building just f77. - - * Make-lang.in (F77_SRCS): Update wrt changing some .h to .j. - (install-libf77): Fix typo in new parenthetical note. - - * Makefile.in (f/*.o): Update. - (CONFIG_H, CONVERT_H, FLAGS_H, GLIMITS_H, HCONFIG_H, RTL_H, - TCONFIG_H, TM_H, TREE_H): Update/new symbols. - (deps-kinda): More fixes wrt changing some .h to .j. - Document and explain this rule a bit better. - Accommodate changes in output of gcc -MM. - - * *.h, *.c: Change #include's so proj.h not assumed to #include - malloc.h or config.h (now config.j), and so new .j files are - used instead of old .h ones. - - * com.c (ffecom_init_0): Use FLOAT_TYPE_SIZE for f2c's - TYLONG/TYLOGICAL type codes, to get g77 working on Alpha. - - * com.h: Make all f2c-related integral types "int", not "long - int". - - * config.j, convert.j, flags.j, glimits.j, hconfig.j, rtl.j, - tconfig.j, tm.j, tree.j: New files wrapping around gbe - .h files. - - * config.h, convert.h, flags.h, glimits.h, hconfig.h, rtl.h, - tconfig.h, tm.h, tree.h: Deleted so new .j files - can #include the gbe files directly, instead of using "../", - and thus do better with various kinds of builds. - - * proj.h: Delete unused NO_STDDEF and related stuff. - -Tue Feb 14 08:28:08 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * BUGS: Remove item #12, cross-compiling & autoconf scripts - reportedly expected to work properly (according to d.love). - - * INSTALL: Add explanation of d.love's patch to config-lang.in. - Add explanation of how to install just g77 when gcc already installed. - Add note about usability of "-Wall". Add note about bug- - reporting. - - * Make-lang.in ($(srcdir)/f/conf-proj): Add comment about why - conf-proj.out. - (install-libf77): Echo parenthetical note to user about how to do - just the (aborted) libf2c installation. - (deps-kinda): Update to work with new configuration/build stuff. - - * bad.c (ffebad_finish): Put capitalized "warning:" &c message - as prefix on any diagnostic without pointers into source. - - * bad.def (FFEBAD_TOO_BIG_INIT): Add this warning message. - - * config-lang.in: Add Dave Love's patch to catch case where - back-end patches not applied and abort configuration. - - * data.c (ffedata_gather_, ffedata_value_): Warn when about - to initialize a large aggregate area, due to design flaw resulting - in too much time/space used to handle such cases. - Use COMMON area name, and first notice of symbol, for multiple- - initialization diagnostic, instead of member symbol and unknown - location. - (FFEDATA_sizeTOO_BIG_INIT_): New macro per above. - -Mon Feb 13 13:54:26 1995 Dave Love - - * Make-lang.in (F77_SRCS): Use $(srcdir)/f/proj.h.in, not - $(srcdir)/f/proj.h for build outside srcdir. - -Sun Feb 12 13:37:11 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * ../README.g77: Clarify procedures for unpacking, add asterisks - to mark important things the user must do. - - * Fix dates in/add dates to ../README.g77, BUGS, CREDITS, DOC, - INSTALL, PROJECTS, README. - -Sun Feb 12 00:26:10 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.4 released. - - * Make-lang.in (f/proj.h): Reproduce this rule here from - Makefile.in. - ($(srcdir)/f/conf-proj): Put autoconf's stdout in temp file - conf-proj.out, then mv to conf-proj only if successful, so - conf-proj not touched if autoconf not installed. - - * Makefile.in ($(srcdir)/conf-proj): See Make-lang.in's similar - rule. - -Sat Feb 11 20:56:02 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * BUGS: Clarify some bugs. - - * DOC: Many improvements and fixes. - - * README: Move bulk of text, edited, to ../README.g77, and - replace with pointer to that file. - - * com.c (ffecom_init_0): Comment out warning about sizeof(ftnlen) - as per ste.c change. Add text about ASSIGN to help user understand - what is being warned about. - - * conf-proj.in: Fix typos in comments. - - * proj.h.in: Add ARRAY_ZERO_SIZE to parallel malloc.h's version, - in case it proves to be needed. - - * ste.c: Comment out assertions requiring sizeof(ftnlen) >= - sizeof(char *), in the hopes that overflow will never happen. - (ffeste_R838): Change assertion to fatal() with at least - partially helpful message. - -Sat Feb 11 12:38:00 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * com.c (ffecom_vardesc_): Crash if typecode is -1. - - * ste.c (ffeste_io_dolio_): Crash if typecode is -1. - -Sat Feb 11 09:51:57 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * ste.c: In I/O code tests for item arrayness, sort of revert - to much earlier code that tests original exp, but also check - in newer way just in case. Newer way alone treated FOO(1:40) - as an array, not sure why older way alone didn't work, but I - think maybe it was when diagnosed code was involved, and - since there are now checks for error_mark_node, maybe the old - way alone would work. But better to be safe; both original - ffebld exp _and_ the transformed tree must indicate an array - for the size-determination code to be used, else just 1/2 elements - assumed. And this text is for EMACS: (foo at bar). - -Fri Feb 10 11:05:50 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * ste.c: In many cases, surround statement-expansion code - with ffecom_push_calltemps () and ffecom_pop_calltemps () - so COMPLEX-returning functions can have temporaries pushed - in "auto-pop" mode and have them auto-popped at the end of - the statement. - -Wed Feb 8 14:35:10 1995 Dave Love - - * runtime/f2c.h.in (ftnlen, ftnint): Make same size as integer. - - * runtime/libI77/err.c (f_init): Thinko in MISSING_FILE_ELEMS - conditional. - * runtime/libI77/wrtfmt.c (mv_cur): Likewise. - * runtime/libI77/wsfe.c (x_putc): Likewise. - - * runtime/libF77/signal_.c (signal_): Return 0 (this is a - subroutine). - - * Makefile.in (f/proj.h): Depend on com.h. - * Make-lang.in (include/f2c.h): Likewise (and proj.h). - (install-libf77): Also install f2c.h. - - * runtime/libI77/Makefile.in (*.o): Add f2c.h dependency. - * runtime/libF77/Makefile.in: Likewise. - -Wed Feb 8 13:56:47 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * stc.c (ffestc_R501_item): Don't reset kind/where to NONE when - setting basictype/kindtype info for symbol, or especially - its function/result twin, because kind/where might not be NONE. - -Tue Feb 7 14:47:26 1995 Dave Love - - * Make-lang.in (include/f2c.h:): Set shell variable src more - robustly (independent of whether srcdir is relative or absolute). - * Makefile.in (f/proj.h:): Likewise. - - * conf-proj.in: Check need for LAME_ASSERT. Fix indentation in - check for LAME_STDIO (cosmetic only with ANSI C). - - * com.h: Extra ...SIZE stuff taken from com.c. - - * com.c (FFECOM_DETERMINE_TYPES): Define before including com.h. - (BITS_PER_WORD etc.) Remove and use conditional definitions to com.h. - - * runtime/configure.in: #define FFECOM_DETERMINE_TYPES for com.h in - f2c type determination. - - * tm.h: Remove (at least pro tem) because of relative path and use - top-level one. - - * Make-lang.in (include/f2c.h:): Set shell variable src more - robustly (independent of whether srcdir is relative or absolute). - * Makefile.in (f/proj.h:): Likewise. - -Mon Feb 6 19:58:32 1995 Dave Love - - * g77.c (append_arg): Use K&R declaration for, e.g. SunOS4 build. - -Fri Feb 3 20:33:14 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * g77.c (main): Treat -l like filename in terms of -x handling. - Rewrite arglist mechanism for ease of maintenance. - Make sure every -lf2c is followed by -lm and vice versa. - - * Make-lang.in: Put complete list of sources in F77_SRCS def - so changing a .h file, for example, causes rebuild. - - * Makefile.in: Change test for nextstep to m68k-next-nextstep* so - all versions of nextstep on m68k get the necessary flag. - -Fri Feb 3 19:10:32 1995 Dave Love - - * INSTALL: Note about possible conflict with existing libf2c.a and - f2c.h. - - * Make-lang.in (f77.distclean): Tidy and move deletion of - f/config.cache to mostlyclean. - (install-libf77): Test for $(libdir)/libf2c.* and barf if found - unless F2CLIBOK defined. - - * runtime/Makefile.in (all): Change path to include directory (and - elsewhere). - (INCLUDES): Remove (unused/misleading). - (distclean): Include f2c.h. - (clean): Include config.cache. - - * runtime/libF77/Makefile.in (.SUFFIXES): Correct typo. - (ALL_CFLAGS) Fix up include search path to find f2c.h in top level - includes always. - (all): Depend on f2c.h. - * runtime/libI77/Makefile.in (.SUFFIXES): Likewise. - -Thu Feb 2 17:17:06 1995 Dave Love - - * INSTALL: Note about --srcdir and GNU make. - - * runtime/f2c.h.in (Pad_UDread, ALWAYS_FLUSH): Reomve the #defines - per below. - - * runtime/configure.in (Pad_UDread, ALWAYS_FLUSH): Define these - here, not in f2c.h as they'r eonly relevant for building. - * runtime/configure: Regenerated. - - * config-lang.in: Warn about using GNU make outside source tree - since I can't get Irix5 or SunOS4 makes to work in this case. - - * Makefile.in (VPATH): Don't set it here. - (srcdir): Make it the normal `.' (overridden) at top level. - (all.indirect): New dependency `dircheck'. - (f771): Likewise - (dircheck): New target for foolproofing. - (f/proj.h:): Change finding source. - (CONFIG_H): Don't use this as the relative path in the include loses - f builddir != srcdir. - - * config.h: Remove per CONFIG_H change above. - - * Make-lang.in (F77_FLAGS_TO_PASS): Remove GCC_FOR_TARGET. - (f771:): Pass VPATH, srcdir to sub-make. - (f/Makefile:): New target. - (stmp-int-hdrs): new variable for cheating build. - (f77-runtime:): Alter GCC_FOR_TARGET treatment. - (include/f2c.h f/runtime/Makefile:) Likewise. - (f77-runtime-unsafe:): New (cheating) target. - -Thu Feb 2 12:09:51 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * BUGS: Update regarding losing EQUIVALENCE members in -g, and - regarding RS/6000 problems in the back end. - - * CREDITS: Make some changes as requested. - - * com.c (ffecom_member_trunk_): Remove unused static variable. - (ffecom_finish_symbol_transform_): Improve comments. - (ffecom_let_char_): Fix size of temp address-type var. - (ffecom_member_phase2_): Try fixing problem fixed by change - to ffecom_transform_equiv_ (f_m_p2_ function currently not used). - (ffecom_transform_equiv_): Remove def of unused static variable. - Comment-out use of ffecom_member_phase2_, until problems with - back end fixed. - (ffecom_push_tempvar): Fix assertion to not crash okay code. - - * com.h: Remove old, commented-out code. - Add prototype for warning() in back end. - - * ste.c (ffeste_io_dofio_, ffeste_io_dolio_, ffeste_io_douio_, - ffeste_io_icilist_): Check correct type of variable for arrayness. - -Sun Jan 29 14:41:42 1995 Dave Love - - * BUGS: Remove references to my configure bugs; add another. - - * runtime/Makefile.in (AR_FLAGS): Provide default value. - - * runtime/f2c.h.in (integer, logical): Take typedefs from - F2C_INTEGER configuration parameter again. - (NON_UNIX_STDIO): don't define it. - - * runtime/configure.in: Bring type checks for f2c.h in line with - com.h. - (MISSING_FILE_ELEMS): New variable to determine whether the relevant - elements of the FILE struct exist, independent of NON_UNIX_STDIO. - * runtime/libI77/{err,wrtfmt,wsfe}.c (MISSING_FILE_ELEMS): Use new - parameter. - - * config-lang.in: Comment out more of f2c rules (c.f. Make-lang.in). - (This stuff is relevant iff you gave configure --enable-f2c.) - Create f/runtime directory tree iff not building in source - directory. - - * Makefile.in (srcdir): Append slash so we get the right value when - not building in the source directory. This is a consequence of not - building the `f' sources in `f'. - (VPATH): Override configure's value for reasons above. - (f/proj.h f/conf-proj): New rules to build proj.h by - autoconfiguration. - - * proj.h: Rename to proj.h.in for autoconfiguration. - * proj.h.in: New as above. - * conf-proj conf-proj.in: New files for autoconfiguration. - - * Make-lang.in (include/f2c.h f/runtime/Makefile:): Change the order - of setting the sh variables so that the right GCC_FOR_TARGET is - used. - (f77.*clean:) Add products of new configuration files and make sure - all the *clean targets do something (unlike the ones in - cp/Make-lange.in). - - * com.h (FFECOM_f2cINTEGER, FFECOM_f2cLOGICAL): Define as long or - int appropriately to ensure sizeof(real) == sizeof(integer). - - * PROJECTS: Library section. - - * runtime/libI77/endfile.c: Don't #include sys/types.h conditional - on NON_UNIX_STDIO since rawio.h needs size_t. - * runtime/libI77/uio.c: #include for size_t if not - KR_headers. - -Wed Jan 25 03:31:51 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.3 released. - - * INSTALL: Revise. - - * Make-lang.in: Comment out rules for building f2c itself (f/f2c/). - - * README: Revise. - - * com.c (ffecom_init_0): Warn if ftnlen or INTEGER not big enough - to hold a char *. - - * gbe/2.6.2.diff: Update. - -Mon Jan 23 17:10:49 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * TODO: Remove. - BUGS: New file. - PROJECTS: New file. - CREDITS: New file. - - * cktyps*: Remove. - Make-lang.in: Remove cktyps stuff. - Makefile.in: Remove cktyps stuff. - - * DOC: Add info on changes for 0.5.3. - - * bad.c: Put "warning:" &c on diagnostic messages. - Don't output informational messages if warnings disabled. - -Thu Jan 19 12:38:13 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * g77.c: Avoid putting out useless "-xnone -xf77" pairs so - larger command lines can be accommodated. - Recognize both `-xlang' and `-x lang'. - Recognize `-xnone' and `-x none' to mean what it does, instead - of treating "none" as any other language. - Some minor, slight improvements in the way args are handled - (hopefully for clearer, more maintainable code), including - consistency checks on arg count just in case. - -Wed Jan 18 16:41:57 1995 Craig Burley (burley@gnu.ai.mit.edu) - - * DOC: Explain -fautomatic better. - - * INSTALL: Describe libf2c.a better. - - * Make-lang.in, Makefile.in: Build f771 &c with gcc/ as cd instead - of gcc/f/ so debugging info is better (source file tracking). - Add new source file type.c. - - * Makefile.in: For nextstep3, link f771 with -segaddr __DATA - 6000000. Fix typo. Change deps-kinda target to handle building - from gcc/. Update dependencies. - - * bld-op.def, bld.h, bld.c: Remove opBACKEND and all related - stuff. - Remove consistency tests that cause compiler warnings. - - * cktyps.c: Remove all typing checking. - - * com-rt.def: Change all rttypeFLOAT_ intrinsics to rttypeDOUBLE_, - to precisely match how they're declared in libf2c. - - * com.h, com.c: Revise to more elegantly track related stuff - in the version of f2c.h used to build libf2c. - - * com.c: Increase FFECOM_sizeMAXSTACKITEM, and if 0 or undefined - when checked to determine where to put entity, treat as infinite. - Rewrite temporary mechanism to be based on trees instead of - ffeinfo stuff, and make it much simpler. Change interface - accordingly. - Fixes to better track types of things, make appropriate - conversions, etc. E.g. when making an arg for a libf2c - function, make sure it's of the right type (such as ftnlen). - Delete opBACKEND transformation code. - (ffecom_init_0): Smoother initialization of types, especially - paying attention to using consistent rules for making INTEGER, - REAL, DOUBLE PRECISION, etc., and for deciding their "*N" - and kind values that will work across all g77 platforms. - No longer require per-target configuration info in target.h - or config/*/*; use new type module to store size, alignment. - (ffecom_member_phase2): Declare COMMON/EQUIVALENCE group members - so debugger sees them. - (ffecom_finish_progunit): Transform all symbols in program unit, - so -g will show they all exist. - - * expr.c (ffeexpr_collapse_substr): Handle strange substring - range values. - - * info.h, info.c: Provide connection to new type module. - Remove tests that yield compiler warnings. - - * intrin.c (ffeintrin_is_intrinsic): Properly handle deleted - intrinsic. - - * lex.c (ffelex_file_fixed): Remove redundant/buggy code. - - * stc.c (ffestc_kindtype_kind_, ffestc_kindtype_star_): Replace - boring switch stmt with simple call to new type module. This - sort of thing is a reason to get up in the morning. - - * ste.c: Update to handle new interface for - ffecom_push/pop_tempvar. - Fixes to better track types of things. - Fixes to not crash for certain diagnosed constructs. - (ffeste_begin_iterdo_): Check only constants for overflow to avoid - spurious diagnostics. - Don't convert larger integer (say, INTEGER*8) to canonical integer - for iteration count. - - * stw.h: Track DO iteration count temporary variable. - - * symbol.c: Remove consistency tests that cause compiler warnings. - - * target.c (ffetarget_aggregate_info): Replace big switch with - little call to new type module. - (ffetarget_layout): Remove consistency tests that cause - compiler warnings. - (ffetarget_convert_character1_typeless): Pick up length of - typeless type from new type module. - - * target.h: Crash build if target float bit pattern cannot be - precisely determined. - Remove all the type cruft now determined by ffecom_init_0 - at invocation time and maintained in new type module. - Put casts on second arg of all REAL_VALUE_TO_TARGET_DOUBLE - uses so compiler warnings avoided (requires target float bit - pattern to be precisely determined, hence code to crash build). - - * top.c: Add inits/terminates for new type module. - - * type.h, type.c: New module. - - * gbe/2.6.2.diff: Remove all patches to files in gcc/config/ - directory and its subdirectories. - -Mon Jan 9 19:23:25 1995 Dave Love - - * com.h (FFECOM_F2C_INTEGER_TYPE_NODE): Define and use instead of - long_integer_type_node where appropriate. - -Tue Jan 3 14:56:18 1995 Dave Love - - * com.h: Make ffecom_f2c_logical_type_node long, consistent with - integer. - -Fri Dec 2 20:07:37 1994 Dave Love - - * config-lang.in (stagestuff): Add f2c conditionally. - * Make-lang.in: Add f2c and related targets. - * f2c: Add the directory. - -Fri Nov 25 22:17:26 1994 Dave Love - - * Makefile.in (FLAGS_TO_PASS): pass $(CROSS) - * Make-lang.in: more changes to runtime targets - -Thu Nov 24 18:03:21 1994 Dave Love - - * Makefile.in (FLAGS_TO_PASS): define for sub-makes - - * g77.c (main): change f77-cpp-output to f77-cpp-input (.F files) - -Wed Nov 23 15:22:53 1994 Dave Love - - * bad.c (ffebad_finish): kluge to fool emacs19 into finding errors: - add trailing space to :: - -Tue Nov 22 11:30:50 1994 Dave Love - - * runtime/libF77/signal_.c (RETSIGTYPE): added - -Mon Nov 21 13:04:13 1994 Dave Love - - * Makefile.in (compiler): add runtime - - * config-lang.in (stagestuff): add libf2c.a to stagestuff - - * Make-lang.in: - G77STAGESTUFF <- MORESTAGESTUFF - f77-runtime: new target, plus supporting ones - - * runtime: add the directory, containing libI77, libF77 and autoconf - stuff - - * g++.1: remove - - * g77.1: minor fixes - -Thu Nov 17 15:18:05 1994 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.2 released. - - * bad.def: Modify wording of FFEBAD_UNIMPL_STMT to indicate - that it covers a wide array of possible problems (that, someday, - should be handled via separate diagnostics). - - * lex.c: Allow $ in identifiers if -fdollar-ok. - * top.c: Support -fdollar-ok. - * top.h: Support -fdollar-ok. - * target.h: Support -fdollar-ok. - * DOC: Describe -fdollar-ok. - - * std.c (ffestd_R1229_finish): Fix bug so stand-alone build works. - * ste.c (ffeste_R819A): Fix bug so stand-alone build works. - - * Make: Improvements for stand-alone build. - - * Makefile.in: Fix copyright text at top of file. - - * LINK, SRCS, UNLINK: Removed. Not particularly useful now that - g77 sources live in their own subdirectory. - - * g77.c (main): Cast arg to bzero to avoid warning. (This is - identical to Kenner's fix to cp/g++.c.) - - * gbe/: New subdirectory, to contain .diff files for various - versions of the GNU CC back end. - - * gbe/README: New file. - * gbe/2.6.2.diff: New file. - -Tue Nov 8 10:23:10 1994 Dave Love - - * Make-lang.in: don't install as f77 as well as g77 to avoid - confusion with system's compiler (especially while testing) - - * g77.c (main): use -lf2c and -lm; fix sense of test for .f/.F files - -Fri Oct 28 09:45:00 1994 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.1 released. - - * gcc.c: Invoke f771 instead of f-771. - -Fri Oct 28 02:00:44 1994 Craig Burley (burley@gnu.ai.mit.edu) - - * Version 0.5.0 released. - -Fri Oct 14 15:03:35 1994 Craig Burley (burley@gnu.ai.mit.edu) - - * Makefile.in: Handle the Fortran-77 front-end in a subdirectory. - * f-*: Move Fortran-77 front-end to f/*. - -Local Variables: -add-log-time-format: current-time-string -End: diff --git a/contrib/gcc/f/Make-lang.in b/contrib/gcc/f/Make-lang.in deleted file mode 100644 index 47585b0..0000000 --- a/contrib/gcc/f/Make-lang.in +++ /dev/null @@ -1,516 +0,0 @@ -# Top level -*- makefile -*- fragment for GNU Fortran. -# Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -#This file is part of GNU Fortran. - -#GNU Fortran is free software; you can redistribute it and/or modify -#it under the 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 Fortran is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -#the Free Software Foundation, 59 Temple Place - Suite 330, -#Boston, MA 02111-1307, USA. - -# This file provides the language dependent support in the main Makefile. -# Each language makefile fragment must provide the following targets: -# -# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap, -# foo.install-normal, foo.install-common, foo.install-man, -# foo.uninstall, -# foo.mostlyclean, foo.clean, foo.distclean, -# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4 -# -# where `foo' is the name of the language. -# -# It should also provide rules for: -# -# - making any compiler driver (eg: g++) -# - the compiler proper (eg: cc1plus) -# - define the names for selecting the language in LANGUAGES. -# -# $(srcdir) must be set to the gcc/ source directory (not gcc/f/). -# -# Actual name to use when installing a native compiler. -G77_INSTALL_NAME := $(shell echo g77|sed '$(program_transform_name)') - -# Some versions of `touch' (such as the version on Solaris 2.8) -# do not correctly set the timestamp due to buggy versions of `utime' -# in the kernel. So, we use `echo' instead. -STAMP = echo timestamp > - -# -# Define the names for selecting f77 in LANGUAGES. -# Note that it would be nice to move the dependency on g77 -# into the F77 rule, but that needs a little bit of work -# to do the right thing within all.cross. -F77 f77: f771$(exeext) - -# Tell GNU make to ignore these if they exist. -.PHONY: F77 f77 f77.all.build f77.all.cross \ - f77.start.encap f77.rest.encap f77.dvi \ - f77.install-normal \ - f77.install-common f77.install-man \ - f77.uninstall f77.mostlyclean f77.clean f77.distclean \ - f77.maintainer-clean \ - f77.stage1 f77.stage2 f77.stage3 f77.stage4 \ - f77.stageprofile f77.stagefeedback - -g77spec.o: $(srcdir)/f/g77spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \ - $(CONFIG_H) intl.h - (SHLIB_LINK='$(SHLIB_LINK)' \ - SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ - $(INCLUDES) $(srcdir)/f/g77spec.c) - -# Create the compiler driver for g77. -g77$(exeext): gcc.o g77spec.o version.o prefix.o intl.o \ - $(LIBDEPS) $(EXTRA_GCC_OBJS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o g77spec.o \ - version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS) - -# Create a version of the g77 driver which calls the cross-compiler. -g77-cross$(exeext): g77$(exeext) - rm -f g77-cross$(exeext); \ - cp g77$(exeext) g77-cross$(exeext) - -# The compiler itself. - -F77_OBJS = f/bad.o f/bit.o f/bld.o f/com.o f/data.o f/equiv.o f/expr.o \ - f/global.o f/implic.o f/info.o f/intrin.o f/lab.o f/lex.o f/malloc.o \ - f/name.o f/parse.o f/src.o f/st.o f/sta.o f/stb.o f/stc.o \ - f/std.o f/ste.o f/storag.o f/stp.o f/str.o f/sts.o f/stt.o f/stu.o \ - f/stv.o f/stw.o f/symbol.o f/target.o f/top.o f/type.o f/where.o - -# Use loose warnings for this front end. -f-warn = $(WERROR) - -f771$(exeext): $(F77_OBJS) $(BACKEND) $(LIBDEPS) - rm -f f771$(exeext) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(F77_OBJS) $(BACKEND) $(LIBS) - -# Keyword tables. -f/stamp-str: f/str-1t.h f/str-1t.j f/str-2t.h f/str-2t.j \ - f/str-fo.h f/str-fo.j f/str-io.h f/str-io.j f/str-nq.h f/str-nq.j \ - f/str-op.h f/str-op.j f/str-ot.h f/str-ot.j - $(STAMP) f/stamp-str - -f/str-1t.h f/str-1t.j: f/fini$(build_exeext) f/str-1t.fin - ./f/fini$(build_exeext) $(srcdir)/f/str-1t.fin f/str-1t.j f/str-1t.h - -f/str-2t.h f/str-2t.j: f/fini$(build_exeext) f/str-2t.fin - ./f/fini$(build_exeext) $(srcdir)/f/str-2t.fin f/str-2t.j f/str-2t.h - -f/str-fo.h f/str-fo.j: f/fini$(build_exeext) f/str-fo.fin - ./f/fini$(build_exeext) $(srcdir)/f/str-fo.fin f/str-fo.j f/str-fo.h - -f/str-io.h f/str-io.j: f/fini$(build_exeext) f/str-io.fin - ./f/fini$(build_exeext) $(srcdir)/f/str-io.fin f/str-io.j f/str-io.h - -f/str-nq.h f/str-nq.j: f/fini$(build_exeext) f/str-nq.fin - ./f/fini$(build_exeext) $(srcdir)/f/str-nq.fin f/str-nq.j f/str-nq.h - -f/str-op.h f/str-op.j: f/fini$(build_exeext) f/str-op.fin - ./f/fini$(build_exeext) $(srcdir)/f/str-op.fin f/str-op.j f/str-op.h - -f/str-ot.h f/str-ot.j: f/fini$(build_exeext) f/str-ot.fin - ./f/fini$(build_exeext) $(srcdir)/f/str-ot.fin f/str-ot.j f/str-ot.h - -f/fini$(build_exeext): f/fini.o $(BUILD_LIBDEPS) - $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o f/fini$(build_exeext) \ - f/fini.o $(BUILD_LIBS) - -f/fini.o: - $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) \ - -c $(srcdir)/f/fini.c $(OUTPUT_OPTION) - -gt-f-lex.h gt-f-where.h gt-f-com.h gt-f-ste.h gtype-f.h : s-gtype; @true - -# -# Build hooks: - -f77.all.build: g77$(exeext) -f77.all.cross: g77-cross$(exeext) -f77.start.encap: g77$(exeext) -f77.rest.encap: - -f77.srcinfo: doc/g77.info - -cp -p $^ $(srcdir)/doc -f77.srcman: doc/g77.1 - -cp -p $^ $(srcdir)/doc -f77.srcextra: f/BUGS f/NEWS - -cp -p $^ $(srcdir)/f - -f77.tags: force - cd $(srcdir)/f; etags -o TAGS.sub *.c *.h; \ - etags --include TAGS.sub --include ../TAGS.sub - -f77.info: doc/g77.info -dvi:: doc/g77.dvi -f77.man: doc/g77.1 - -check-f77 : check-g77 -lang_checks += check-g77 - -# g77 documentation. -TEXI_G77_FILES = f/g77.texi f/bugs.texi f/ffe.texi f/invoke.texi \ - f/news.texi f/root.texi $(docdir)/include/fdl.texi \ - $(docdir)/include/gpl.texi $(docdir)/include/funding.texi \ - $(docdir)/include/gcc-common.texi $(srcdir)/f/intdoc.texi - -doc/g77.info: $(TEXI_G77_FILES) - if test "x$(BUILD_INFO)" = xinfo; then \ - rm -f $(@)*; \ - $(MAKEINFO) $(MAKEINFOFLAGS) -I$(docdir)/include -I$(srcdir)/f \ - -o$@ $<; \ - else true; fi - -doc/g77.dvi: $(TEXI_G77_FILES) - $(TEXI2DVI) -I $(srcdir)/f -I $(abs_docdir)/include -I $(objdir)/f -o $@ $< - -.INTERMEDIATE: g77.pod -g77.pod: f/invoke.texi - -$(TEXI2POD) < $< > $@ - -# This dance is all about producing accurate documentation for g77's -# intrinsics with minimum fuss. f/ansify appends "\n\" to C strings -# so ANSI C compilers can compile f/intdoc.h -- gcc can compile f/intdoc.in -# directly, if f/intdoc.c #include'd that, but we don't want to force -# people to install gcc just to build the documentation. We use the -# C format for f/intdoc.in in the first place to allow a fairly "free", -# but widely known format for documentation -- basically anyone who knows -# how to write texinfo source and enclose it in C constants can handle -# it, and f/ansify allows them to not even end lines with "\n\". So, -# essentially, the C preprocessor and compiler are used to enter the -# document snippets into a data base via name lookup, rather than duplicating -# that kind of code here. And we use f/intdoc.c instead of straight -# texinfo in the first place so that as much information as possible -# contained in f/intrin.def can be inserted directly and reliably into -# the documentation. That's better than replicating it, because it -# reduces the likelihood of discrepancies between the docs and the compiler -# itself, which uses f/intrin.def; in fact, many bugs in f/intrin.def have -# been found only upon reading the documentation that was automatically -# produced from it. - -# If the documentation files depended on executables in the build -# tree, there'd be no way to ship a source tree with the documentation -# already generated such that `make' wouldn't attempt to rebuild it. -# So, we punt and arrange for the documentation files to depend on the -# dependencies of the executables, not on the executables themselves. -# But then, we have to build the executables explicitly in their build -# rules. - -INTDOC_DEPS = f/intdoc.c f/intrin.h f/intrin.def - -$(srcdir)/f/intdoc.texi: $(INTDOC_DEPS) f/intdoc.in - $(MAKE) f/intdoc$(build_exeext) - f/intdoc$(build_exeext) > $(srcdir)/f/intdoc.texi - -f/intdoc$(build_exeext): $(INTDOC_DEPS) f/intdoc.h0 bconfig.h \ - $(SYSTEM_H) coretypes.h $(TM_H) $(BUILD_LIBDEPS) - $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $(INCLUDES) $< \ - $(BUILD_LIBS) -o $@ - -f/intdoc.h0: f/intdoc.in f/ansify$(build_exeext) - f/ansify$(build_exeext) $< < $< > $@ - -f/ansify$(build_exeext): f/ansify.c bconfig.h $(SYSTEM_H) coretypes.h $(TM_H) - $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $(INCLUDES) $< \ - -o $@ - -f/BUGS: f/bugs0.texi f/bugs.texi f/root.texi - if [ x$(BUILD_INFO) = xinfo ]; then \ - rm -f $(@)*; \ - $(MAKEINFO) $(MAKEINFOFLAGS) -D BUGSONLY --no-header --no-split \ - --no-validate -I$(docdir)/include -I$(srcdir)/f -o $@ bugs0.texi; \ - else true; fi - -f/NEWS: f/news0.texi f/news.texi f/root.texi - if [ x$(BUILD_INFO) = xinfo ]; then \ - rm -f $(@)*; \ - $(MAKEINFO) $(MAKEINFOFLAGS) -D NEWSONLY --no-header --no-split \ - --no-validate -I$(docdir)/include -I$(srcdir)/f -o $@ news0.texi; \ - else true; fi - -# -# Install hooks: -# f771 is installed elsewhere as part of $(COMPILERS). - -f77.install-normal: - -# Install the driver program as $(target)-g77 -# and also as either g77 (if native) or $(tooldir)/bin/g77. -f77.install-common: installdirs - -if [ -f f771$(exeext) ] ; then \ - rm -f $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \ - $(INSTALL_PROGRAM) g77$(exeext) $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \ - chmod a+x $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \ - else true; fi - @if [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]; then \ - echo ''; \ - echo 'Warning: gcc no longer installs an f77 command.'; \ - echo ' You must do so yourself. For more information,'; \ - echo ' read "Distributing Binaries" in the g77 docs.'; \ - echo ' (To turn off this warning, delete the file'; \ - echo ' f77-install-ok in the source or build directory.)'; \ - echo ''; \ - else true; fi - -install-info:: $(DESTDIR)$(infodir)/g77.info - -f77.install-man: installdirs $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext) - -$(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext): doc/g77.1 - -rm -f $@ - -$(INSTALL_DATA) $< $@ - -chmod a-x $@ - -f77.uninstall: installdirs - if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ - echo " install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info"; \ - install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \ - else : ; fi - rm -rf $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \ - rm -rf $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \ - rm -rf $(DESTDIR)$(infodir)/g77.info* -# -# Clean hooks: -# A lot of the ancillary files are deleted by the main makefile. -# We just have to delete files specific to us. - -f77.mostlyclean: - -rm -f f/*$(objext) - -rm -f f/*$(coverageexts) - -rm -f f/fini$(build_exeext) f/stamp-str f/str-*.h f/str-*.j - -rm -f f/BUGS f/NEWS - -rm -f g77.aux g77.cps g77.ky g77.toc g77.vr g77.fn g77.kys \ - g77.pg g77.tp g77.vrs g77.cp g77.fns g77.log g77.pgs g77.tps -f77.clean: - -rm -f g77spec.o -f77.distclean: - -rm -f f/Makefile -f77.maintainer-clean: - -rm -f $(srcdir)/f/BUGS $(srcdir)/f/TAGS $(srcdir)/f/TAGS.SUB - -rm -f $(srcdir)/f/NEWS $(srcdir)/f/intdoc.texi -# -# Stage hooks: -# The main makefile has already created stage?/f. - -G77STAGESTUFF = f/*$(objext) f/fini$(build_exeext) f/stamp-str \ - f/str-*.h f/str-*.j g77spec.o - -f77.stage1: stage1-start - -mv -f $(G77STAGESTUFF) stage1/f - -f77.stage2: stage2-start - -mv -f $(G77STAGESTUFF) stage2/f - -f77.stage3: stage3-start - -mv -f $(G77STAGESTUFF) stage3/f - -f77.stage4: stage4-start - -mv -f $(G77STAGESTUFF) stage4/f - -f77.stageprofile: stageprofile-start - -mv -f $(G77STAGESTUFF) stageprofile/f - -f77.stagefeedback: stageprofile-start - -mv -f $(G77STAGESTUFF) stagefeedback/f -# -# .o: .h dependencies. - -f/bad.o: f/bad.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/bad.h f/bad.def f/where.h \ - glimits.h f/top.h f/malloc.h flags.h f/com.h f/com-rt.def $(TREE_H) f/bld.h \ - f/bld-op.def f/bit.h f/info.h f/info-b.def f/info-k.def f/info-w.def \ - f/target.h f/lex.h f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h \ - f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h toplev.h intl.h \ - diagnostic.h coretypes.h $(TM_H) -f/bit.o: f/bit.c f/proj.h $(CONFIG_H) $(SYSTEM_H) glimits.h f/bit.h \ - f/malloc.h coretypes.h $(TM_H) -f/bld.o: f/bld.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/bld.h f/bld-op.def f/bit.h \ - f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \ - f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h f/top.h f/lex.h \ - f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \ - f/name.h f/intrin.h f/intrin.def real.h coretypes.h $(TM_H) -f/com.o: f/com.c f/proj.h $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \ - output.h convert.h f/com.h f/com-rt.def f/bld.h f/bld-op.def f/bit.h \ - f/malloc.h f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h \ - f/bad.def f/where.h glimits.h f/top.h f/lex.h f/type.h f/intrin.h \ - f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h f/storag.h f/global.h \ - f/name.h f/expr.h f/implic.h f/src.h f/st.h $(GGC_H) toplev.h diagnostic.h \ - $(LANGHOOKS_DEF) langhooks.h intl.h real.h debug.h gt-f-com.h gtype-f.h \ - coretypes.h $(TM_H) -f/data.o: f/data.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/data.h f/bld.h f/bld-op.def \ - f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \ - f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h \ - f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h \ - f/global.h f/name.h f/intrin.h f/intrin.def f/expr.h f/st.h coretypes.h $(TM_H) -f/equiv.o: f/equiv.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/equiv.h f/bld.h \ - f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h \ - f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h \ - glimits.h f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \ - f/global.h f/name.h f/intrin.h f/intrin.def f/data.h coretypes.h $(TM_H) -f/expr.o: f/expr.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/expr.h f/bld.h f/bld-op.def \ - f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \ - f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h \ - f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h \ - f/global.h f/name.h f/intrin.h f/intrin.def f/implic.h f/src.h f/st.h \ - f/stamp-str real.h coretypes.h $(TM_H) -f/fini.o: f/fini.c f/proj.h bconfig.h $(SYSTEM_H) f/malloc.h coretypes.h $(TM_H) -f/global.o: f/global.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/global.h f/info.h \ - f/info-b.def f/info-k.def f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h f/lex.h f/type.h f/name.h f/symbol.h \ - f/symbol.def f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def f/lab.h \ - f/storag.h f/intrin.h f/intrin.def f/equiv.h coretypes.h $(TM_H) -f/implic.o: f/implic.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/implic.h f/info.h \ - f/info-b.def f/info-k.def f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h f/lex.h f/type.h f/symbol.h \ - f/symbol.def f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def f/lab.h \ - f/storag.h f/intrin.h f/intrin.def f/equiv.h f/global.h f/name.h f/src.h \ - coretypes.h $(TM_H) -f/info.o: f/info.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/info.h f/info-b.def \ - f/info-k.def f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def f/where.h \ - glimits.h f/top.h f/malloc.h f/lex.h f/type.h coretypes.h $(TM_H) -f/intrin.o: f/intrin.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/intrin.h \ - f/intrin.def f/bld.h f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def \ - $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h \ - f/bad.def f/where.h glimits.h f/top.h f/lex.h f/type.h f/lab.h f/storag.h \ - f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h f/expr.h f/src.h \ - coretypes.h $(TM_H) -f/lab.o: f/lab.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/lab.h f/com.h f/com-rt.def \ - $(TREE_H) f/bld.h f/bld-op.def f/bit.h f/malloc.h f/info.h f/info-b.def \ - f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h \ - f/top.h f/lex.h f/type.h f/intrin.h f/intrin.def f/symbol.h f/symbol.def \ - f/equiv.h f/storag.h f/global.h f/name.h coretypes.h $(TM_H) -f/lex.o: f/lex.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/top.h f/malloc.h f/where.h \ - glimits.h f/bad.h f/bad.def f/com.h f/com-rt.def $(TREE_H) f/bld.h \ - f/bld-op.def f/bit.h f/info.h f/info-b.def f/info-k.def f/info-w.def \ - f/target.h f/lex.h f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h \ - f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h f/src.h flags.h \ - debug.h input.h toplev.h output.h $(GGC_H) gt-f-lex.h coretypes.h $(TM_H) -f/malloc.o: f/malloc.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/malloc.h \ - coretypes.h $(TM_H) -f/name.o: f/name.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/bad.h f/bad.def f/where.h \ - glimits.h f/top.h f/malloc.h f/name.h f/global.h f/info.h f/info-b.def \ - f/info-k.def f/info-w.def f/target.h $(TREE_H) f/lex.h f/type.h f/symbol.h \ - f/symbol.def f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def f/lab.h \ - f/storag.h f/intrin.h f/intrin.def f/equiv.h f/src.h coretypes.h $(TM_H) -f/parse.o: f/parse.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/top.h f/malloc.h \ - f/where.h glimits.h f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def \ - f/bit.h f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h \ - f/bad.def f/lex.h f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h \ - f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h version.h flags.h \ - coretypes.h $(TM_H) -f/src.o: f/src.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/src.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h coretypes.h $(TM_H) -f/st.o: f/st.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/st.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h f/lex.h f/symbol.h f/symbol.def \ - f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h \ - f/info-b.def f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h \ - f/storag.h f/intrin.h f/intrin.def f/equiv.h f/global.h f/name.h f/sta.h \ - f/stamp-str f/stb.h f/expr.h f/stp.h f/stt.h f/stc.h f/std.h \ - f/stv.h f/stw.h f/ste.h f/sts.h f/stu.h coretypes.h $(TM_H) -f/sta.o: f/sta.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/sta.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h f/lex.h f/stamp-str f/symbol.h \ - f/symbol.def f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) \ - f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h \ - f/storag.h f/intrin.h f/intrin.def f/equiv.h f/global.h f/name.h f/implic.h \ - f/stb.h f/expr.h f/stp.h f/stt.h f/stc.h f/std.h f/stv.h f/stw.h coretypes.h \ - $(TM_H) -f/stb.o: f/stb.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/stb.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h f/expr.h f/bld.h f/bld-op.def f/bit.h \ - f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \ - f/info-w.def f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h \ - f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/stp.h \ - f/stt.h f/stamp-str f/src.h f/sta.h f/stc.h coretypes.h $(TM_H) -f/stc.o: f/stc.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/stc.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h f/bld.h f/bld-op.def f/bit.h f/com.h \ - f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \ - f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \ - f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/expr.h f/stp.h \ - f/stt.h f/stamp-str f/data.h f/implic.h f/src.h f/sta.h f/std.h f/stv.h \ - f/stw.h coretypes.h $(TM_H) -f/std.o: f/std.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/std.h f/bld.h f/bld-op.def \ - f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \ - f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h \ - f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h \ - f/global.h f/name.h f/intrin.h f/intrin.def f/stp.h f/stt.h f/stamp-str \ - f/stv.h f/stw.h f/sta.h f/ste.h f/sts.h coretypes.h $(TM_H) -f/ste.o: f/ste.c f/proj.h $(CONFIG_H) $(SYSTEM_H) $(RTL_H) toplev.h f/ste.h \ - f/bld.h f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) \ - f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h \ - f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/stp.h \ - f/stt.h f/stamp-str f/sts.h f/stv.h f/stw.h f/expr.h f/sta.h $(GGC_H) \ - gt-f-ste.h coretypes.h $(TM_H) -f/storag.o: f/storag.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/storag.h f/bld.h \ - f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) \ - f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h \ - f/bad.def f/where.h glimits.h f/top.h f/lex.h f/type.h f/lab.h \ - f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h \ - f/intrin.def f/data.h coretypes.h $(TM_H) -f/stp.o: f/stp.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/stp.h f/bld.h f/bld-op.def \ - f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h \ - f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/lex.h f/type.h f/lab.h f/storag.h \ - f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h \ - f/intrin.def f/stt.h coretypes.h $(TM_H) -f/str.o: f/str.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/src.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/malloc.h f/stamp-str f/lex.h coretypes.h $(TM_H) -f/sts.o: f/sts.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/sts.h f/malloc.h f/com.h \ - f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h f/info.h \ - f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/lex.h f/type.h f/intrin.h f/intrin.def \ - f/lab.h f/symbol.h f/symbol.def f/equiv.h f/storag.h f/global.h \ - f/name.h coretypes.h $(TM_H) -f/stt.o: f/stt.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/stt.h f/top.h f/malloc.h \ - f/where.h glimits.h f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def \ - $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h \ - f/bad.h f/bad.def f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h \ - f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def \ - f/stp.h f/expr.h f/sta.h f/stamp-str coretypes.h $(TM_H) -f/stu.o: f/stu.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/bld.h f/bld-op.def f/bit.h \ - f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \ - f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h \ - glimits.h f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h \ - f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def \ - f/implic.h f/stu.h f/sta.h f/stamp-str coretypes.h $(TM_H) -f/stv.o: f/stv.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/stv.h f/lab.h f/com.h \ - f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h f/malloc.h \ - f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h \ - f/bad.def f/where.h glimits.h f/top.h f/lex.h f/type.h f/intrin.h \ - f/intrin.def f/symbol.h f/symbol.def f/equiv.h f/storag.h f/global.h \ - f/name.h coretypes.h $(TM_H) -f/stw.o: f/stw.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/stw.h f/bld.h f/bld-op.def \ - f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h \ - f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def \ - f/where.h glimits.h f/top.h f/lex.h f/type.h f/lab.h f/storag.h \ - f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h \ - f/intrin.def f/stv.h f/sta.h f/stamp-str coretypes.h $(TM_H) -f/symbol.o: f/symbol.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/symbol.h \ - f/symbol.def f/bld.h f/bld-op.def f/bit.h f/malloc.h f/com.h \ - f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \ - f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h f/top.h \ - f/lex.h f/type.h f/lab.h f/storag.h f/intrin.h f/intrin.def f/equiv.h \ - f/global.h f/name.h f/src.h f/st.h coretypes.h $(TM_H) -f/target.o: f/target.c f/proj.h $(CONFIG_H) $(SYSTEM_H) glimits.h f/target.h \ - $(TREE_H) f/bad.h f/bad.def f/where.h f/top.h f/malloc.h f/info.h real.h \ - f/info-b.def f/info-k.def f/info-w.def f/type.h f/lex.h diagnostic.h \ - coretypes.h $(TM_H) toplev.h -f/top.o: f/top.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/top.h f/malloc.h f/where.h \ - glimits.h f/bad.h f/bad.def f/bit.h f/bld.h f/bld-op.def f/com.h \ - f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \ - f/info-w.def f/target.h f/lex.h f/type.h f/lab.h f/storag.h \ - f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h f/intrin.h \ - f/intrin.def f/data.h f/expr.h f/implic.h f/src.h f/st.h flags.h \ - toplev.h coretypes.h $(TM_H) opts.h options.h -f/type.o: f/type.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/type.h f/malloc.h \ - coretypes.h $(TM_H) -f/where.o: f/where.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/where.h glimits.h \ - f/top.h f/malloc.h f/lex.h $(GGC_H) gt-f-where.h coretypes.h $(TM_H) diff --git a/contrib/gcc/f/NEWS b/contrib/gcc/f/NEWS deleted file mode 100644 index cc73668..0000000 --- a/contrib/gcc/f/NEWS +++ /dev/null @@ -1,531 +0,0 @@ -_Note:_ This file is automatically generated from the files -`news0.texi' and `news.texi'. `NEWS' is _not_ a source file, although -it is normally included within source distributions. - - This file lists news about the GCC-3.2 version (and some other -versions) of the GNU Fortran compiler. Copyright (C) -1995,1996,1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. -You may copy, distribute, and modify it freely as long as you preserve -this copyright notice and permission notice. - -News About GNU Fortran -********************** - - Changes made to recent versions of GNU Fortran are listed below, -with the most recent version first. - - The changes are generally listed in order: - - 1. Code-generation and run-time-library bug-fixes - - 2. Compiler and run-time-library crashes involving valid code that - have been fixed - - 3. New features - - 4. Fixes and enhancements to existing features - - 5. New diagnostics - - 6. Internal improvements - - 7. Miscellany - - This order is not strict--for example, some items involve a -combination of these elements. - - Note that two variants of `g77' are tracked below. The `egcs' -variant is described vis-a-vis previous versions of `egcs' and/or an -official FSF version, as appropriate. Note that all such variants are -obsolete _as of July 1999_ - the information is retained here only for -its historical value. - - Therefore, `egcs' versions sometimes have multiple listings to help -clarify how they differ from other versions, though this can make -getting a complete picture of what a particular `egcs' version contains -somewhat more difficult. - - An online, "live" version of this document (derived directly from -the mainline, development version of `g77' within `gcc') is available at -`http://www.gnu.org/software/gcc/onlinedocs/g77/News.html'. - - The following information was last updated on 2002-10-28: - -In `GCC' 3.2 versus `GCC' 3.1: -============================== - - * Problem Reports fixed (in chronological order of submission): - `8308' - gcc-3.x does not compile files with suffix .r (RATFOR) [Fixed - in 3.2.1] - -In `GCC' 3.1 (formerly known as g77-0.5.27) versus `GCC' 3.0: -============================================================= - - * Problem Reports fixed (in chronological order of submission): - `947' - Data statement initialization with subscript of kind INTEGER*2 - - `3743' - Reference to intrinsic `ISHFT' invalid - - `3807' - Function BESJN(integer,double) problems - - `3957' - g77 -pipe -xf77-cpp-input sends output to stdout - - `4279' - g77 -h" gives bogus output - - `4730' - ICE on valid input using CALL EXIT(%VAL(...)) - - `4752' - g77 -v -c -xf77-version /dev/null -xnone causes ice - - `4885' - BACKSPACE example that doesn't work as of gcc/g77-3.0.x - - `5122' - g77 rejects accepted use of INTEGER*2 as type of DATA - statement loop index - - `5397' - ICE on compiling source with 540 000 000 REAL array - - `5473' - ICE on BESJN(integer*8,real) - - `5837' - bug in loop unrolling - - * `g77' now has its man page generated from the texinfo - documentation, to guarantee that it remains up to date. - - * `g77' used to reject the following program on 32-bit targets: - PROGRAM PROG - DIMENSION A(140 000 000) - END - with the message: - prog.f: In program `prog': - prog.f:2: - DIMENSION A(140 000 000) - ^ - Array `a' at (^) is too large to handle - because 140 000 000 REALs is larger than the largest bit-extent - that can be expressed in 32 bits. However, bit-sizes never play a - role after offsets have been converted to byte addresses. - Therefore this check has been removed, and the limit is now 2 - Gbyte of memory (around 530 000 000 REALs). Note: On GNU/Linux - systems one has to compile programs that occupy more than 1 Gbyte - statically, i.e. `g77 -static ...'. - - * Based on work done by Juergen Pfeifer () - libf2c is now a shared library. One can still link in all objects - with the program by specifying the `-static' option. - - * Robert Anderson () thought up a two line - change that enables g77 to compile such code as: - SUBROUTINE SUB(A, N) - DIMENSION N(2) - DIMENSION A(N(1),N(2)) - A(1,1) = 1. - END - Note the use of array elements in the bounds of the adjustable - array A. - - * George Helffrich () implemented a change - in substring index checking (when specifying `-fbounds-check') - that permits the use of zero length substrings of the form - `string(1:0)'. - - * Based on code developed by Pedro Vazquez - (), the `libf2c' library is now - able to read and write files larger than 2 Gbyte on 32-bit target - machines, if the operating system supports this. - -In 0.5.26, `GCC' 3.0 versus `GCC' 2.95: -======================================= - - * When a REWIND was issued after a WRITE statement on an unformatted - file, the implicit truncation was performed by copying the - truncated file to /tmp and copying the result back. This has been - fixed by using the `ftruncate' OS function. Thanks go to the - GAMESS developers for bringing this to our attention. - - * Using options `-g', `-ggdb' or `-gdwarf[-2]' (where appropriate - for your target) now also enables debugging information for COMMON - BLOCK and EQUIVALENCE items to be emitted. Thanks go to Andrew - Vaught () and George Helffrich - () for fixing this longstanding - problem. - - * It is not necessary anymore to use the option `-femulate-complex' - to compile Fortran code using COMPLEX arithmetic, even on 64-bit - machines (like the Alpha). This will improve code generation. - - * INTRINSIC arithmetic functions are now treated as routines that do - not depend on anything but their argument(s). This enables - further instruction scheduling, because it is known that they - cannot read or modify arbitrary locations. - - * Upgrade to `libf2c' as of 2000-12-05. - - This fixes a bug where a namelist containing initialization of - LOGICAL items and a variable starting with T or F would be read - incorrectly. - - * The `TtyNam' intrinsics now set NAME to all spaces (at run time) - if the system has no `ttyname' implementation available. - - * Upgrade to `libf2c' as of 1999-06-28. - - This fixes a bug whereby input to a `NAMELIST' read involving a - repeat count, such as `K(5)=10*3', was not properly handled by - `libf2c'. The first item was written to `K(5)', but the remaining - nine were written elsewhere (still within the array), not - necessarily starting at `K(6)'. - -In 0.5.25, `GCC' 2.95 (`EGCS' 1.2) versus `EGCS' 1.1.2: -======================================================= - - * `g77' no longer generates bad code for assignments, or other - conversions, of `REAL' or `COMPLEX' constant expressions to type - `INTEGER(KIND=2)' (often referred to as `INTEGER*8'). - - For example, `INTEGER*8 J; J = 4E10' now works as documented. - - * `g77' no longer truncates `INTEGER(KIND=2)' (usually `INTEGER*8') - subscript expressions when evaluating array references on systems - with pointers widers than `INTEGER(KIND=1)' (such as Alphas). - - * `g77' no longer generates bad code for an assignment to a - `COMPLEX' variable or array that partially overlaps one or more of - the sources of the same assignment (a very rare construction). It - now assigns through a temporary, in cases where such partial - overlap is deemed possible. - - * `libg2c' (`libf2c') no longer loses track of the file being worked - on during a `BACKSPACE' operation. - - * `libg2c' (`libf2c') fixes a bug whereby input to a `NAMELIST' read - involving a repeat count, such as `K(5)=10*3', was not properly - handled by `libf2c'. The first item was written to `K(5)', but - the remaining nine were written elsewhere (still within the array), - not necessarily starting at `K(6)'. - - * Automatic arrays now seem to be working on HP-UX systems. - - * The `Date' intrinsic now returns the correct result on big-endian - systems. - - * Fix `g77' so it no longer crashes when compiling I/O statements - using keywords that define `INTEGER' values, such as `IOSTAT=J', - where J is other than default `INTEGER' (such as `INTEGER*2'). - Instead, it issues a diagnostic. - - * Fix `g77' so it properly handles `DATA A/RPT*VAL/', where RPT is - not default `INTEGER', such as `INTEGER*2', instead of producing a - spurious diagnostic. Also fix `DATA (A(I),I=1,N)', where `N' is - not default `INTEGER' to work instead of crashing `g77'. - - * The `-ax' option is now obeyed when compiling Fortran programs. - (It is passed to the `f771' driver.) - - * The new `-fbounds-check' option causes `g77' to compile run-time - bounds checks of array subscripts, as well as of substring start - and end points. - - * `libg2c' now supports building as multilibbed library, which - provides better support for systems that require options such as - `-mieee' to work properly. - - * Source file names with the suffixes `.FOR' and `.FPP' now are - recognized by `g77' as if they ended in `.for' and `.fpp', - respectively. - - * The order of arguments to the _subroutine_ forms of the `CTime', - `DTime', `ETime', and `TtyNam' intrinsics has been swapped. The - argument serving as the returned value for the corresponding - function forms now is the _second_ argument, making these - consistent with the other subroutine forms of `libU77' intrinsics. - - * `g77' now warns about a reference to an intrinsic that has an - interface that is not Year 2000 (Y2K) compliant. Also, `libg2c' - has been changed to increase the likelihood of catching references - to the implementations of these intrinsics using the `EXTERNAL' - mechanism (which would avoid the new warnings). - - * `g77' now warns about a reference to a function when the - corresponding _subsequent_ function program unit disagrees with - the reference concerning the type of the function. - - * `-fno-emulate-complex' is now the default option. This should - result in improved performance of code that uses the `COMPLEX' - data type. - - * The `-malign-double' option now reliably aligns _all_ - double-precision variables and arrays on Intel x86 targets. - - * Even without the `-malign-double' option, `g77' reliably aligns - local double-precision variables that are not in `EQUIVALENCE' - areas and not `SAVE''d. - - * `g77' now open-codes ("inlines") division of `COMPLEX' operands - instead of generating a run-time call to the `libf2c' routines - `c_div' or `z_div', unless the `-Os' option is specified. - - * `g77' no longer generates code to maintain `errno', a C-language - concept, when performing operations such as the `SqRt' intrinsic. - - * `g77' developers can temporarily use the `-fflatten-arrays' option - to compare how the compiler handles code generation using C-like - constructs as compared to the Fortran-like method constructs - normally used. - - * A substantial portion of the `g77' front end's code-generation - component was rewritten. It now generates code using facilities - more robustly supported by the `gcc' back end. One effect of this - rewrite is that some codes no longer produce a spurious "label LAB - used before containing binding contour" message. - - * Support for the `-fugly' option has been removed. - - * Improve documentation and indexing, including information on Year - 2000 (Y2K) compliance, and providing more information on internals - of the front end. - - * Upgrade to `libf2c' as of 1999-05-10. - -In 0.5.24 versus 0.5.23: -======================== - - There is no `g77' version 0.5.24 at this time, or planned. 0.5.24 -is the version number designated for bug fixes and, perhaps, some new -features added, to 0.5.23. Version 0.5.23 requires `gcc' 2.8.1, as -0.5.24 was planned to require. - - Due to `EGCS' becoming `GCC' (which is now an acronym for "GNU -Compiler Collection"), and `EGCS' 1.2 becoming officially designated -`GCC' 2.95, there seems to be no need for an actual 0.5.24 release. - - To reduce the confusion already resulting from use of 0.5.24 to -designate `g77' versions within `EGCS' versions 1.0 and 1.1, as well as -in versions of `g77' documentation and notices during that period, -"mainline" `g77' version numbering resumes at 0.5.25 with `GCC' 2.95 -(`EGCS' 1.2), skipping over 0.5.24 as a placeholder version number. - - To repeat, there is no `g77' 0.5.24, but there is now a 0.5.25. -Please remain calm and return to your keypunch units. - -In `EGCS' 1.1.2 versus `EGCS' 1.1.1: -==================================== - - * Fix the `IDate' intrinsic (VXT) (in `libg2c') so the returned year - is in the documented, non-Y2K-compliant range of 0-99, instead of - being returned as 100 in the year 2000. - - * Fix the `Date_and_Time' intrinsic (in `libg2c') to return the - milliseconds value properly in VALUES(8). - - * Fix the `LStat' intrinsic (in `libg2c') to return device-ID - information properly in SARRAY(7). - - * Improve documentation. - -In `EGCS' 1.1.1 versus `EGCS' 1.1: -================================== - - * Fix `libg2c' so it performs an implicit `ENDFILE' operation (as - appropriate) whenever a `REWIND' is done. - - (This bug was introduced in 0.5.23 and `egcs' 1.1 in `g77''s - version of `libf2c'.) - - * Fix `libg2c' so it no longer crashes with a spurious diagnostic - upon doing any I/O following a direct formatted write. - - (This bug was introduced in 0.5.23 and `egcs' 1.1 in `g77''s - version of `libf2c'.) - - * Fix `g77' so it no longer crashes compiling references to the - `Rand' intrinsic on some systems. - - * Fix `g77' portion of installation process so it works better on - some systems (those with shells requiring `else true' clauses on - `if' constructs for the completion code to be set properly). - -In `EGCS' 1.1 versus `EGCS' 1.0.3: -================================== - - * Fix bugs in the `libU77' intrinsic `HostNm' that wrote one byte - beyond the end of its `CHARACTER' argument, and in the `libU77' - intrinsics `GMTime' and `LTime' that overwrote their arguments. - - * Assumed arrays with negative bounds (such as `REAL A(-1:*)') no - longer elicit spurious diagnostics from `g77', even on systems - with pointers having different sizes than integers. - - This bug is not known to have existed in any recent version of - `gcc'. It was introduced in an early release of `egcs'. - - * Valid combinations of `EXTERNAL', passing that external as a dummy - argument without explicitly giving it a type, and, in a subsequent - program unit, referencing that external as an external function - with a different type no longer crash `g77'. - - * `CASE DEFAULT' no longer crashes `g77'. - - * The `-Wunused' option no longer issues a spurious warning about - the "master" procedure generated by `g77' for procedures - containing `ENTRY' statements. - - * Support `FORMAT(I)' when EXPR is a compile-time constant - `INTEGER' expression. - - * Fix `g77' `-g' option so procedures that use `ENTRY' can be - stepped through, line by line, in `gdb'. - - * Allow any `REAL' argument to intrinsics `Second' and `CPU_Time'. - - * Use `tempnam', if available, to open scratch files (as in - `OPEN(STATUS='SCRATCH')') so that the `TMPDIR' environment - variable, if present, is used. - - * `g77''s version of `libf2c' separates out the setting of global - state (such as command-line arguments and signal handling) from - `main.o' into distinct, new library archive members. - - This should make it easier to write portable applications that - have their own (non-Fortran) `main()' routine properly set up the - `libf2c' environment, even when `libf2c' (now `libg2c') is a - shared library. - - * `g77' no longer installs the `f77' command and `f77.1' man page in - the `/usr' or `/usr/local' hierarchy, even if the `f77-install-ok' - file exists in the source or build directory. See the - installation documentation for more information. - - * `g77' no longer installs the `libf2c.a' library and `f2c.h' - include file in the `/usr' or `/usr/local' hierarchy, even if the - `f2c-install-ok' or `f2c-exists-ok' files exist in the source or - build directory. See the installation documentation for more - information. - - * The `libf2c.a' library produced by `g77' has been renamed to - `libg2c.a'. It is installed only in the `gcc' "private" directory - hierarchy, `gcc-lib'. This allows system administrators and users - to choose which version of the `libf2c' library from `netlib' they - wish to use on a case-by-case basis. See the installation - documentation for more information. - - * The `f2c.h' include (header) file produced by `g77' has been - renamed to `g2c.h'. It is installed only in the `gcc' "private" - directory hierarchy, `gcc-lib'. This allows system administrators - and users to choose which version of the include file from - `netlib' they wish to use on a case-by-case basis. See the - installation documentation for more information. - - * The `g77' command now expects the run-time library to be named - `libg2c.a' instead of `libf2c.a', to ensure that a version other - than the one built and installed as part of the same `g77' version - is picked up. - - * During the configuration and build process, `g77' creates - subdirectories it needs only as it needs them. Other cleaning up - of the configuration and build process has been performed as well. - - * `install-info' now used to update the directory of Info - documentation to contain an entry for `g77' (during installation). - - * Some diagnostics have been changed from warnings to errors, to - prevent inadvertent use of the resulting, probably buggy, programs. - These mostly include diagnostics about use of unsupported features - in the `OPEN', `INQUIRE', `READ', and `WRITE' statements, and - about truncations of various sorts of constants. - - * Improve compilation of `FORMAT' expressions so that a null byte is - appended to the last operand if it is a constant. This provides a - cleaner run-time diagnostic as provided by `libf2c' for statements - like `PRINT '(I1', 42'. - - * Improve documentation and indexing. - - * The upgrade to `libf2c' as of 1998-06-18 should fix a variety of - problems, including those involving some uses of the `T' format - specifier, and perhaps some build (porting) problems as well. - -In `EGCS' 1.1 versus `g77' 0.5.23: -================================== - - * Fix a code-generation bug that afflicted Intel x86 targets when - `-O2' was specified compiling, for example, an old version of the - `DNRM2' routine. - - The x87 coprocessor stack was being mismanaged in cases involving - assigned `GOTO' and `ASSIGN'. - - * `g77' no longer produces incorrect code and initial values for - `EQUIVALENCE' and `COMMON' aggregates that, due to "unnatural" - ordering of members vis-a-vis their types, require initial padding. - - * Fix `g77' crash compiling code containing the construct - `CMPLX(0.)' or similar. - - * `g77' no longer crashes when compiling code containing - specification statements such as `INTEGER(KIND=7) PTR'. - - * `g77' no longer crashes when compiling code such as `J = SIGNAL(1, - 2)'. - - * `g77' now treats `%LOC(EXPR)' and `LOC(EXPR)' as "ordinary" - expressions when they are used as arguments in procedure calls. - This change applies only to global (filewide) analysis, making it - consistent with how `g77' actually generates code for these cases. - - Previously, `g77' treated these expressions as denoting special - "pointer" arguments for the purposes of filewide analysis. - - * Fix `g77' crash (or apparently infinite run-time) when compiling - certain complicated expressions involving `COMPLEX' arithmetic - (especially multiplication). - - * Align static double-precision variables and arrays on Intel x86 - targets regardless of whether `-malign-double' is specified. - - Generally, this affects only local variables and arrays having the - `SAVE' attribute or given initial values via `DATA'. - - * The `g77' driver now ensures that `-lg2c' is specified in the link - phase prior to any occurrence of `-lm'. This prevents - accidentally linking to a routine in the SunOS4 `-lm' library when - the generated code wants to link to the one in `libf2c' (`libg2c'). - - * `g77' emits more debugging information when `-g' is used. - - This new information allows, for example, `which __g77_length_a' - to be used in `gdb' to determine the type of the phantom length - argument supplied with `CHARACTER' variables. - - This information pertains to internally-generated type, variable, - and other information, not to the longstanding deficiencies - vis-a-vis `COMMON' and `EQUIVALENCE'. - - * The F90 `Date_and_Time' intrinsic now is supported. - - * The F90 `System_Clock' intrinsic allows the optional arguments - (except for the `Count' argument) to be omitted. - - * Upgrade to `libf2c' as of 1998-06-18. - - * Improve documentation and indexing. - -In previous versions: -===================== - - Information on previous versions is not provided in this -`gcc/gcc/f/NEWS' file, to keep it short. See `gcc/gcc/f/news.texi', or -any of its other derivations (Info, HTML, dvi forms) for such -information. - diff --git a/contrib/gcc/f/RELEASE-PREP b/contrib/gcc/f/RELEASE-PREP deleted file mode 100644 index 71eebf6..0000000 --- a/contrib/gcc/f/RELEASE-PREP +++ /dev/null @@ -1,5 +0,0 @@ -1999-03-13 RELEASE-PREP - -Things to do to prepare a g77 release. - -- Update root.texi: clear DEVELOPMENT flag, set version info. diff --git a/contrib/gcc/f/ansify.c b/contrib/gcc/f/ansify.c deleted file mode 100644 index b03206d..0000000 --- a/contrib/gcc/f/ansify.c +++ /dev/null @@ -1,190 +0,0 @@ -/* ansify.c - Copyright (C) 1997, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - -#include "bconfig.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" - -#define die_unless(c) \ - do if (!(c)) \ - { \ - fprintf (stderr, "%s:%lu: %s\n", argv[1], lineno, #c); \ - die (); \ - } \ - while(0) - -static void ATTRIBUTE_NORETURN -die (void) -{ - exit (1); -} - -int -main(int argc, char **argv) -{ - int c; - static unsigned long lineno = 1; - - die_unless (argc == 2); - - printf ("\ -/* This file is automatically generated from `%s',\n\ - which you should modify instead. */\n\ -#line 1 \"%s\"\n\ -", - argv[1], argv[1]); - - while ((c = getchar ()) != EOF) - { - switch (c) - { - default: - putchar (c); - break; - - case '\n': - ++lineno; - putchar (c); - break; - - case '"': - putchar (c); - for (;;) - { - c = getchar (); - die_unless (c != EOF); - switch (c) - { - case '"': - putchar (c); - goto next_char; - - case '\n': - putchar ('\\'); - putchar ('n'); - putchar ('\\'); - putchar ('\n'); - ++lineno; - break; - - case '\\': - putchar (c); - c = getchar (); - die_unless (c != EOF); - putchar (c); - if (c == '\n') - ++lineno; - break; - - default: - putchar (c); - break; - } - } - break; - - case '\'': - putchar (c); - for (;;) - { - c = getchar (); - die_unless (c != EOF); - switch (c) - { - case '\'': - putchar (c); - goto next_char; - - case '\n': - putchar ('\\'); - putchar ('n'); - putchar ('\\'); - putchar ('\n'); - ++lineno; - break; - - case '\\': - putchar (c); - c = getchar (); - die_unless (c != EOF); - putchar (c); - if (c == '\n') - ++lineno; - break; - - default: - putchar (c); - break; - } - } - break; - - case '/': - putchar (c); - c = getchar (); - putchar (c); - if (c != '*') - break; - for (;;) - { - c = getchar (); - die_unless (c != EOF); - - switch (c) - { - case '\n': - ++lineno; - putchar (c); - break; - - case '*': - c = getchar (); - die_unless (c != EOF); - if (c == '/') - { - putchar ('*'); - putchar ('/'); - goto next_char; - } - if (c == '\n') - { - ++lineno; - putchar (c); - } - break; - - default: - /* Don't bother outputting content of comments. */ - break; - } - } - break; - } - - next_char: - ; - } - - die_unless (c == EOF); - - return 0; -} diff --git a/contrib/gcc/f/bad.c b/contrib/gcc/f/bad.c deleted file mode 100644 index bed9734..0000000 --- a/contrib/gcc/f/bad.c +++ /dev/null @@ -1,537 +0,0 @@ -/* bad.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 2002, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - Handles the displaying of diagnostic messages regarding the user's source - files. - - Modifications: -*/ - -/* If there's a %E or %4 in the messages, set this to at least 5, - for example. */ - -#define FFEBAD_MAX_ 6 - -/* Include files. */ - -#include "proj.h" -#include "bad.h" -#include "flags.h" -#include "com.h" -#include "toplev.h" -#include "where.h" -#include "intl.h" -#include "diagnostic.h" - -/* Externals defined here. */ - -bool ffebad_is_inhibited_ = FALSE; - -/* Simple definitions and enumerations. */ - -#define FFEBAD_LONG_MSGS_ 1 /* 0 to use short (or same) messages. */ - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - -struct _ffebad_message_ - { - const ffebadSeverity severity; - const char *const message; - }; - -/* Static objects accessed by functions in this module. */ - -static const struct _ffebad_message_ ffebad_messages_[] -= -{ -#define FFEBAD_MSG(kwd,sev,msgid) { sev, msgid }, -#if FFEBAD_LONG_MSGS_ == 0 -#define LONG(m) -#define SHORT(m) m -#else -#define LONG(m) m -#define SHORT(m) -#endif -#include "bad.def" -#undef FFEBAD_MSG -#undef LONG -#undef SHORT -}; - -static struct - { - ffewhereLine line; - ffewhereColumn col; - ffebadIndex tag; - } - -ffebad_here_[FFEBAD_MAX_]; -static const char *ffebad_string_[FFEBAD_MAX_]; -static ffebadIndex ffebad_order_[FFEBAD_MAX_]; -static ffebad ffebad_errnum_; -static ffebadSeverity ffebad_severity_; -static const char *ffebad_message_; -static unsigned char ffebad_index_; -static ffebadIndex ffebad_places_; -static bool ffebad_is_temp_inhibited_; /* Effective setting of - _is_inhibited_ for this - _start/_finish invocation. */ - -/* Static functions (internal). */ - -static int ffebad_bufputs_ (char buf[], int bufi, const char *s); - -/* Internal macros. */ - -#define ffebad_bufflush_(buf, bufi) \ - (((buf)[bufi] = '\0'), fputs ((buf), stderr), 0) -#define ffebad_bufputc_(buf, bufi, c) \ - (((bufi) == ARRAY_SIZE (buf)) \ - ? (ffebad_bufflush_ ((buf), (bufi)), ((buf)[0] = (c)), 1) \ - : (((buf)[bufi] = (c)), (bufi) + 1)) - - -static int -ffebad_bufputs_ (char buf[], int bufi, const char *s) -{ - for (; *s != '\0'; ++s) - bufi = ffebad_bufputc_ (buf, bufi, *s); - return bufi; -} - -/* ffebad_init_0 -- Initialize - - ffebad_init_0(); */ - -void -ffebad_init_0 (void) -{ - assert (FFEBAD == ARRAY_SIZE (ffebad_messages_)); -} - -ffebadSeverity -ffebad_severity (ffebad errnum) -{ - return ffebad_messages_[errnum].severity; -} - -/* ffebad_start_ -- Start displaying an error message - - ffebad_start(FFEBAD_SOME_ERROR_CODE); - - Call ffebad_start to establish the message, ffebad_here and ffebad_string - to send run-time data to it as necessary, then ffebad_finish when through - to actually get it to print (to stderr). - - Note: ffebad_start(errnum) turns into ffebad_start_(FALSE,errnum). No - outside caller should call ffebad_start_ directly (as indicated by the - trailing underscore). - - Call ffebad_start to start a normal message, one that might be inhibited - by the current state of statement guessing. Call ffebad_start_lex - instead to start a message that is global to all statement guesses and - happens only once for all guesses (i.e. the lexer). - - sev and message are overrides for the severity and messages when errnum - is FFEBAD, meaning the caller didn't want to have to put a message in - bad.def to produce a diagnostic. */ - -bool -ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev, - const char *msgid) -{ - unsigned char i; - - if (ffebad_is_inhibited_ && !lex_override) - { - ffebad_is_temp_inhibited_ = TRUE; - return FALSE; - } - - if (errnum != FFEBAD) - { - ffebad_severity_ = ffebad_messages_[errnum].severity; - ffebad_message_ = gettext (ffebad_messages_[errnum].message); - } - else - { - ffebad_severity_ = sev; - ffebad_message_ = gettext (msgid); - } - - switch (ffebad_severity_) - { /* Tell toplev.c about this message. */ - case FFEBAD_severityINFORMATIONAL: - case FFEBAD_severityTRIVIAL: - if (inhibit_warnings) - { /* User wants no warnings. */ - ffebad_is_temp_inhibited_ = TRUE; - return FALSE; - } - /* Fall through. */ - case FFEBAD_severityWARNING: - case FFEBAD_severityPECULIAR: - case FFEBAD_severityPEDANTIC: - if ((ffebad_severity_ != FFEBAD_severityPEDANTIC) - || !flag_pedantic_errors) - { - if (!diagnostic_report_warnings_p ()) - { /* User wants no warnings. */ - ffebad_is_temp_inhibited_ = TRUE; - return FALSE; - } - diagnostic_kind_count (global_dc, DK_WARNING)++; - break; - } - /* Fall through (PEDANTIC && flag_pedantic_errors). */ - case FFEBAD_severityFATAL: - case FFEBAD_severityWEIRD: - case FFEBAD_severitySEVERE: - case FFEBAD_severityDISASTER: - diagnostic_kind_count (global_dc, DK_ERROR)++; - break; - - default: - break; - } - - ffebad_is_temp_inhibited_ = FALSE; - ffebad_errnum_ = errnum; - ffebad_index_ = 0; - ffebad_places_ = 0; - for (i = 0; i < FFEBAD_MAX_; ++i) - { - ffebad_string_[i] = NULL; - ffebad_here_[i].line = ffewhere_line_unknown (); - ffebad_here_[i].col = ffewhere_column_unknown (); - } - - return TRUE; -} - -/* ffebad_here -- Establish source location of some diagnostic concern - - ffebad_here(ffebadIndex i,ffewhereLine line,ffewhereColumn col); - - Call ffebad_start to establish the message, ffebad_here and ffebad_string - to send run-time data to it as necessary, then ffebad_finish when through - to actually get it to print (to stderr). */ - -void -ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col) -{ - ffewhereLineNumber line_num; - ffewhereLineNumber ln; - ffewhereColumnNumber col_num; - ffewhereColumnNumber cn; - ffebadIndex i; - ffebadIndex j; - - if (ffebad_is_temp_inhibited_) - return; - - assert (index < FFEBAD_MAX_); - ffebad_here_[index].line = ffewhere_line_use (line); - ffebad_here_[index].col = ffewhere_column_use (col); - if (ffewhere_line_is_unknown (line) - || ffewhere_column_is_unknown (col)) - { - ffebad_here_[index].tag = FFEBAD_MAX_; - return; - } - ffebad_here_[index].tag = 0; /* For now, though it shouldn't matter. */ - - /* Sort the source line/col points into the order they occur in the source - file. Deal with duplicates appropriately. */ - - line_num = ffewhere_line_number (line); - col_num = ffewhere_column_number (col); - - /* Determine where in the ffebad_order_ array this new place should go. */ - - for (i = 0; i < ffebad_places_; ++i) - { - ln = ffewhere_line_number (ffebad_here_[ffebad_order_[i]].line); - cn = ffewhere_column_number (ffebad_here_[ffebad_order_[i]].col); - if (line_num < ln) - break; - if (line_num == ln) - { - if (col_num == cn) - { - ffebad_here_[index].tag = i; - return; /* Shouldn't go in, has equivalent. */ - } - else if (col_num < cn) - break; - } - } - - /* Before putting new place in ffebad_order_[i], first increment all tags - that are i or greater. */ - - if (i != ffebad_places_) - { - for (j = 0; j < FFEBAD_MAX_; ++j) - { - if (ffebad_here_[j].tag >= i) - ++ffebad_here_[j].tag; - } - } - - /* Then slide all ffebad_order_[] entries at and above i up one entry. */ - - for (j = ffebad_places_; j > i; --j) - ffebad_order_[j] = ffebad_order_[j - 1]; - - /* Finally can put new info in ffebad_order_[i]. */ - - ffebad_order_[i] = index; - ffebad_here_[index].tag = i; - ++ffebad_places_; -} - -/* Establish string for next index (always in order) of message - - ffebad_string(const char *string); - - Call ffebad_start to establish the message, ffebad_here and ffebad_string - to send run-time data to it as necessary, then ffebad_finish when through - to actually get it to print (to stderr). Note: don't trash the string - until after calling ffebad_finish, since we just maintain a pointer to - the argument passed in until then. */ - -void -ffebad_string (const char *string) -{ - if (ffebad_is_temp_inhibited_) - return; - - assert (ffebad_index_ != FFEBAD_MAX_); - ffebad_string_[ffebad_index_++] = string; -} - -/* ffebad_finish -- Display error message with where & run-time info - - ffebad_finish(); - - Call ffebad_start to establish the message, ffebad_here and ffebad_string - to send run-time data to it as necessary, then ffebad_finish when through - to actually get it to print (to stderr). */ - -void -ffebad_finish (void) -{ -#define MAX_SPACES 132 - static const char *const spaces - = "...>\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ -\040\040\040"; /* MAX_SPACES - 1 spaces. */ - ffewhereLineNumber last_line_num; - ffewhereLineNumber ln; - ffewhereLineNumber rn; - ffewhereColumnNumber last_col_num; - ffewhereColumnNumber cn; - ffewhereColumnNumber cnt; - ffewhereLine l; - ffebadIndex bi; - unsigned short i; - char pointer; - unsigned char c; - unsigned const char *s; - const char *fn; - static char buf[1024]; - int bufi; - int index; - - if (ffebad_is_temp_inhibited_) - return; - - switch (ffebad_severity_) - { - case FFEBAD_severityINFORMATIONAL: - s = _("note:"); - break; - - case FFEBAD_severityWARNING: - s = _("warning:"); - break; - - case FFEBAD_severitySEVERE: - s = _("fatal:"); - break; - - default: - s = ""; - break; - } - - /* Display the annoying source references. */ - - last_line_num = 0; - last_col_num = 0; - - for (bi = 0; bi < ffebad_places_; ++bi) - { - if (ffebad_places_ == 1) - pointer = '^'; - else - pointer = '1' + bi; - - l = ffebad_here_[ffebad_order_[bi]].line; - ln = ffewhere_line_number (l); - rn = ffewhere_line_filelinenum (l); - cn = ffewhere_column_number (ffebad_here_[ffebad_order_[bi]].col); - fn = ffewhere_line_filename (l); - if (ln != last_line_num) - { - if (bi != 0) - fputc ('\n', stderr); - diagnostic_report_current_function (global_dc); - fprintf (stderr, - /* the trailing space on the :: line - fools emacs19 compilation mode into finding the - report */ - "%s:%" ffewhereLineNumber_f "u: %s\n %s\n %s%c", - fn, rn, - s, - ffewhere_line_content (l), - &spaces[cn > MAX_SPACES ? 0 : MAX_SPACES - cn + 4], - pointer); - last_line_num = ln; - last_col_num = cn; - s = _("(continued):"); - } - else - { - cnt = cn - last_col_num; - fprintf (stderr, - "%s%c", &spaces[cnt > MAX_SPACES - ? 0 : MAX_SPACES - cnt + 4], - pointer); - last_col_num = cn; - } - } - if (ffebad_places_ == 0) - { - /* Didn't output "warning:" string, capitalize it for message. */ - if (s[0] != '\0') - { - char c; - - c = TOUPPER (s[0]); - fprintf (stderr, "%c%s ", c, &s[1]); - } - else if (s[0] != '\0') - fprintf (stderr, "%s ", s); - } - else - fputc ('\n', stderr); - - /* Release the ffewhere info. */ - - for (bi = 0; bi < FFEBAD_MAX_; ++bi) - { - ffewhere_line_kill (ffebad_here_[bi].line); - ffewhere_column_kill (ffebad_here_[bi].col); - } - - /* Now display the message. */ - - bufi = 0; - for (i = 0; (c = ffebad_message_[i]) != '\0'; ++i) - { - if (c == '%') - { - c = ffebad_message_[++i]; - if (ISUPPER (c)) - { - index = c - 'A'; - - if ((index < 0) || (index >= FFEBAD_MAX_)) - { - bufi = ffebad_bufputs_ (buf, bufi, _("[REPORT BUG!!] %")); - bufi = ffebad_bufputc_ (buf, bufi, c); - } - else - { - s = ffebad_string_[index]; - if (s == NULL) - bufi = ffebad_bufputs_ (buf, bufi, _("[REPORT BUG!!]")); - else - bufi = ffebad_bufputs_ (buf, bufi, s); - } - } - else if (ISDIGIT (c)) - { - index = c - '0'; - - if ((index < 0) || (index >= FFEBAD_MAX_)) - { - bufi = ffebad_bufputs_ (buf, bufi, _("[REPORT BUG!!] %")); - bufi = ffebad_bufputc_ (buf, bufi, c); - } - else - { - pointer = ffebad_here_[index].tag + '1'; - if (pointer == FFEBAD_MAX_ + '1') - pointer = '?'; - else if (ffebad_places_ == 1) - pointer = '^'; - bufi = ffebad_bufputc_ (buf, bufi, '('); - bufi = ffebad_bufputc_ (buf, bufi, pointer); - bufi = ffebad_bufputc_ (buf, bufi, ')'); - } - } - else if (c == '\0') - break; - else if (c == '%') - bufi = ffebad_bufputc_ (buf, bufi, '%'); - else - { - bufi = ffebad_bufputs_ (buf, bufi, _("[REPORT BUG!!]")); - bufi = ffebad_bufputc_ (buf, bufi, '%'); - bufi = ffebad_bufputc_ (buf, bufi, c); - } - } - else - bufi = ffebad_bufputc_ (buf, bufi, c); - } - bufi = ffebad_bufputc_ (buf, bufi, '\n'); - bufi = ffebad_bufflush_ (buf, bufi); -} diff --git a/contrib/gcc/f/bad.def b/contrib/gcc/f/bad.def deleted file mode 100644 index 92d7e23..0000000 --- a/contrib/gcc/f/bad.def +++ /dev/null @@ -1,1103 +0,0 @@ -/* bad.def -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - bad.c - - Modifications: -*/ - -#define INFORM FFEBAD_severityINFORMATIONAL -#define TRIVIAL FFEBAD_severityTRIVIAL -#define WARN FFEBAD_severityWARNING -#define PECULIAR FFEBAD_severityPECULIAR -#define FATAL FFEBAD_severityFATAL -#define WEIRD FFEBAD_severityWEIRD -#define SEVERE FFEBAD_severitySEVERE -#define DISASTER FFEBAD_severityDISASTER - -FFEBAD_MSG (FFEBAD_MISSING_FIRST_BINARY_OPERAND, FATAL, -/* xgettext:no-c-format */ -"Missing first operand for binary operator at %0") -FFEBAD_MSG (FFEBAD_NULL_CHAR_CONST, WARN, -/* xgettext:no-c-format */ -"Zero-length character constant at %0") -FFEBAD_MSG (FFEBAD_INVALID_TOKEN_IN_EXPRESSION, FATAL, -/* xgettext:no-c-format */ -"Invalid token at %0 in expression or subexpression at %1") -FFEBAD_MSG (FFEBAD_MISSING_OPERAND_FOR_OPERATOR, FATAL, -/* xgettext:no-c-format */ -"Missing operand for operator at %1 at end of expression at %0") -FFEBAD_MSG (FFEBAD_LABEL_ALREADY_DEFINED, FATAL, -/* xgettext:no-c-format */ -"Label %A already defined at %1 when redefined at %0") -FFEBAD_MSG (FFEBAD_UNRECOGNIZED_CHARACTER, FATAL, -/* xgettext:no-c-format */ -"Unrecognized character at %0 [info -f g77 M LEX]") -FFEBAD_MSG (FFEBAD_LABEL_WITHOUT_STMT, WARN, -/* xgettext:no-c-format */ -"Label definition %A at %0 on empty statement (as of %1)") -FFEBAD_MSG (FFEBAD_EXTRA_LABEL_DEF, FATAL, -/* xgettext:no-c-format */ -LONG("Extra label definition %A at %0 -- perhaps previous label definition %B at %1 should have CONTINUE statement?") -/* xgettext:no-c-format */ -SHORT("Extra label definition %A at %0 following label definition %B at %1")) -FFEBAD_MSG (FFEBAD_FIRST_CHAR_INVALID, FATAL, -/* xgettext:no-c-format */ -"Invalid first character at %0 [info -f g77 M LEX]") -FFEBAD_MSG (FFEBAD_LINE_TOO_LONG, FATAL, -/* xgettext:no-c-format */ -"Line too long as of %0 [info -f g77 M LEX]") -FFEBAD_MSG (FFEBAD_LABEL_FIELD_NOT_NUMERIC, FATAL, -/* xgettext:no-c-format */ -"Non-numeric character at %0 in label field [info -f g77 M LEX]") -FFEBAD_MSG (FFEBAD_LABEL_NUMBER_INVALID, FATAL, -/* xgettext:no-c-format */ -"Label number at %0 not in range 1-99999") -FFEBAD_MSG (FFEBAD_NON_ANSI_COMMENT, WARN, -/* xgettext:no-c-format */ -"At %0, '!' and '/*' are not valid comment delimiters") -FFEBAD_MSG (FFEBAD_NON_ANSI_CONTINUATION_COLUMN, WARN, -/* xgettext:no-c-format */ -"Continuation indicator at %0 must appear in column 6 [info -f g77 M LEX]") -FFEBAD_MSG (FFEBAD_LABEL_ON_CONTINUATION, FATAL, -/* xgettext:no-c-format */ -"Label at %0 invalid with continuation line indicator at %1 [info -f g77 M LEX]") -FFEBAD_MSG (FFEBAD_INVALID_CONTINUATION, FATAL, -/* xgettext:no-c-format */ -LONG("Continuation indicator at %0 invalid on first non-comment line of file or following END or INCLUDE [info -f g77 M LEX]") -/* xgettext:no-c-format */ -SHORT("Continuation indicator at %0 invalid here [info -f g77 M LEX]")) -FFEBAD_MSG (FFEBAD_NO_CLOSING_APOSTROPHE, FATAL, -/* xgettext:no-c-format */ -"Character constant at %0 has no closing apostrophe at %1") -FFEBAD_MSG (FFEBAD_NOT_ENOUGH_HOLLERITH_CHARS, FATAL, -/* xgettext:no-c-format */ -"Hollerith constant at %0 specified %A more characters than are present as of %1") -FFEBAD_MSG (FFEBAD_MISSING_CLOSE_PAREN, FATAL, -/* xgettext:no-c-format */ -"Missing close parenthese at %0 needed to match open parenthese at %1") -FFEBAD_MSG (FFEBAD_INTEGER_TOO_LARGE, FATAL, -/* xgettext:no-c-format */ -"Integer at %0 too large") -FFEBAD_MSG (FFEBAD_BAD_MAGICAL, WARN, -/* xgettext:no-c-format */ -LONG("Integer at %0 too large except as negative number (preceded by unary minus sign)") -/* xgettext:no-c-format */ -SHORT("Non-negative integer at %0 too large")) -FFEBAD_MSG (FFEBAD_BAD_MAGICAL_PRECEDENCE, WARN, -/* xgettext:no-c-format */ -LONG("Integer at %0 too large; even though preceded by unary minus sign at %1, subsequent operator at %2 has precedence over unary minus -- enclose unary minus sign and integer in parentheses to force precedence") -/* xgettext:no-c-format */ -SHORT("Integer at %0 too large (%2 has precedence over %1)")) -FFEBAD_MSG (FFEBAD_BAD_MAGICAL_BINARY, WARN, -/* xgettext:no-c-format */ -LONG("Integer at %0 too large; even though preceded by minus sign at %1, because minus sign is a binary, not unary, operator -- insert plus sign before minus sign to change it to a unary minus sign") -/* xgettext:no-c-format */ -SHORT("Integer at %0 too large (needs unary, not binary, minus at %1)")) -FFEBAD_MSG (FFEBAD_BAD_MAGICAL_PRECEDENCE_BINARY, WARN, -/* xgettext:no-c-format */ -LONG("Integer at %0 too large; even though preceded by minus sign at %1, subsequent operator at %2 has precedence over minus, and that minus sign should be a unary minus rather than a binary minus -- insert plus sign before minus sign to change it to a unary minus sign, and enclose unary minus sign and integer in parentheses to force precedence") -/* xgettext:no-c-format */ -SHORT("Integer at %0 too large (%2 has precedence over %1, which needs to be unary, not binary, minus)")) -FFEBAD_MSG (FFEBAD_IGNORING_PERIOD, FATAL, -/* xgettext:no-c-format */ -"Period at %0 not followed by digits for floating-point number or by `NOT.', `TRUE.', or `FALSE.'") -FFEBAD_MSG (FFEBAD_INSERTING_PERIOD, FATAL, -/* xgettext:no-c-format */ -"Missing close-period between `.%A' at %0 and %1") -FFEBAD_MSG (FFEBAD_INVALID_EXPONENT, FATAL, -/* xgettext:no-c-format */ -"Invalid exponent at %0 for real constant at %1; nondigit `%A' in exponent field") -FFEBAD_MSG (FFEBAD_MISSING_EXPONENT_VALUE, FATAL, -/* xgettext:no-c-format */ -"Missing value at %1 for real-number exponent at %0") -FFEBAD_MSG (FFEBAD_MISSING_BINARY_OPERATOR, FATAL, -/* xgettext:no-c-format */ -"Expected binary operator between expressions at %0 and at %1") -FFEBAD_MSG (FFEBAD_INVALID_DOTDOT, FATAL, -/* xgettext:no-c-format */ -LONG("Period at %0 not followed by valid keyword forming a valid binary operator; `.%A.' is not a valid binary operator") -/* xgettext:no-c-format */ -SHORT("`.%A.' at %0 not a binary operator")) -FFEBAD_MSG (FFEBAD_QUOTE_MISSES_DIGITS, FATAL, -/* xgettext:no-c-format */ -LONG("Double-quote at %0 not followed by a string of valid octal digits at %1") -/* xgettext:no-c-format */ -SHORT("Invalid octal constant at %0")) -FFEBAD_MSG (FFEBAD_INVALID_BINARY_DIGIT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid binary digit(s) found in string of digits at %0") -/* xgettext:no-c-format */ -SHORT("Invalid binary constant at %0")) -FFEBAD_MSG (FFEBAD_INVALID_HEX_DIGIT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid hexadecimal digit(s) found in string of digits at %0") -/* xgettext:no-c-format */ -SHORT("Invalid hexadecimal constant at %0")) -FFEBAD_MSG (FFEBAD_INVALID_OCTAL_DIGIT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid octal digit(s) found in string of digits at %0") -/* xgettext:no-c-format */ -SHORT("Invalid octal constant at %0")) -FFEBAD_MSG (FFEBAD_INVALID_RADIX_SPECIFIER, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid radix specifier `%A' at %0 for typeless constant at %1") -/* xgettext:no-c-format */ -SHORT("Invalid typeless constant at %1")) -FFEBAD_MSG (FFEBAD_INVALID_TYPELESS_BINARY_DIGIT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid binary digit(s) found in string of digits at %0") -/* xgettext:no-c-format */ -SHORT("Invalid binary constant at %0")) -FFEBAD_MSG (FFEBAD_INVALID_TYPELESS_OCTAL_DIGIT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid octal digit(s) found in string of digits at %0") -/* xgettext:no-c-format */ -SHORT("Invalid octal constant at %0")) -FFEBAD_MSG (FFEBAD_INVALID_TYPELESS_HEX_DIGIT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid hexadecimal digit(s) found in string of digits at %0") -/* xgettext:no-c-format */ -SHORT("Invalid hexadecimal constant at %0")) -FFEBAD_MSG (FFEBAD_INVALID_COMPLEX_PART, FATAL, -/* xgettext:no-c-format */ -LONG("%A part of complex constant at %0 must be a real or integer constant -- otherwise use CMPLX() or COMPLEX() in place of ()") -/* xgettext:no-c-format */ -SHORT("%A part of complex constant at %0 not a real or integer constant")) -FFEBAD_MSG (FFEBAD_INVALID_PERCENT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid keyword `%%%A' at %0 in this context") -/* xgettext:no-c-format */ -SHORT("Invalid keyword `%%%A' at %0")) -FFEBAD_MSG (FFEBAD_NULL_EXPRESSION, FATAL, -/* xgettext:no-c-format */ -LONG("Null expression between %0 and %1 invalid in this context") -/* xgettext:no-c-format */ -SHORT("Invalid null expression between %0 and %1")) -FFEBAD_MSG (FFEBAD_CONCAT_ARGS_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Concatenation operator at %0 must operate on two subexpressions of character type, but neither subexpression at %1 or %2 is of character type") -/* xgettext:no-c-format */ -SHORT("Invalid operands at %1 and %2 for concatenation operator at %0")) -FFEBAD_MSG (FFEBAD_CONCAT_ARG_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Concatenation operator at %0 must operate on two subexpressions of character type, but the subexpression at %1 is not of character type") -/* xgettext:no-c-format */ -SHORT("Invalid operand at %1 for concatenation operator at %0")) -FFEBAD_MSG (FFEBAD_CONCAT_ARG_KIND, FATAL, -/* xgettext:no-c-format */ -LONG("Concatenation operator at %0 must operate on two scalar (not array) subexpressions, two function invocations returning character scalars, or a combination of both -- but the subexpression at %1 is %A") -/* xgettext:no-c-format */ -SHORT("Invalid operand (is %A) at %1 for concatenation operator at %0")) -FFEBAD_MSG (FFEBAD_MATH_ARGS_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Arithmetic operator at %0 must operate on two subexpressions of arithmetic type, but neither subexpression at %1 or %2 is of arithmetic type") -/* xgettext:no-c-format */ -SHORT("Invalid operands at %1 and %2 for arithmetic operator at %0")) -FFEBAD_MSG (FFEBAD_MATH_ARG_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Arithmetic operator at %0 must operate on two subexpressions of arithmetic type, but the subexpression at %1 is not of arithmetic type") -/* xgettext:no-c-format */ -SHORT("Invalid operand at %1 for arithmetic operator at %0")) -FFEBAD_MSG (FFEBAD_MATH_ARG_KIND, FATAL, -/* xgettext:no-c-format */ -LONG("Arithmetic operator at %0 must operate on two scalar (not array) subexpressions, two function invocations returning arithmetic scalars, or a combination of both -- but the subexpression at %1 is %A") -/* xgettext:no-c-format */ -SHORT("Invalid operand (is %A) at %1 for arithmetic operator at %0")) -FFEBAD_MSG (FFEBAD_NO_CLOSING_QUOTE, FATAL, -/* xgettext:no-c-format */ -LONG("Character constant at %0 has no closing quote at %1 [info -f g77 M LEX]") -/* xgettext:no-c-format */ -SHORT("Unterminated character constant at %0 [info -f g77 M LEX]")) -FFEBAD_MSG (FFEBAD_BAD_CHAR_CONTINUE, FATAL, -/* xgettext:no-c-format */ -LONG("Continuation line at %0 must have initial `&' since it continues a character context [info -f g77 M LEX]") -/* xgettext:no-c-format */ -SHORT("Missing initial `&' on continuation line at %0 [info -f g77 M LEX]")) -FFEBAD_MSG (FFEBAD_BAD_LEXTOK_CONTINUE, FATAL, -/* xgettext:no-c-format */ -LONG("Continuation line at %0 must have initial `&' since it continues a split lexical token [info -f g77 M LEX]") -/* xgettext:no-c-format */ -SHORT("Missing initial `&' on continuation line at %0 [info -f g77 M LEX]")) -FFEBAD_MSG (FFEBAD_BAD_FREE_CONTINUE, FATAL, -/* xgettext:no-c-format */ -LONG("Continuation line at %0 invalid because it consists only of a single `&' as the only nonblank character") -/* xgettext:no-c-format */ -SHORT("Invalid continuation line at %0")) -FFEBAD_MSG (FFEBAD_STMT_BEGINS_BAD, FATAL, -/* xgettext:no-c-format */ -LONG("Statement at %0 begins with invalid token [info -f g77 M LEX]") -/* xgettext:no-c-format */ -SHORT("Invalid statement at %0 [info -f g77 M LEX]")) -FFEBAD_MSG (FFEBAD_SEMICOLON, FATAL, -/* xgettext:no-c-format */ -"Semicolon at %0 is an invalid token") -FFEBAD_MSG (FFEBAD_UNREC_STMT, FATAL, -/* xgettext:no-c-format */ -LONG("Unrecognized statement name at %0 and invalid form for assignment or statement-function definition at %1") -/* xgettext:no-c-format */ -SHORT("Invalid statement at %0")) -FFEBAD_MSG (FFEBAD_INVALID_STMT_FORM, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid form for %A statement at %0") -/* xgettext:no-c-format */ -SHORT("Invalid %A statement at %0")) -FFEBAD_MSG (FFEBAD_INVALID_HOLL_IN_STMT, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid use of hollerith constant in statement at %0 -- enclose the constant in parentheses (for example, change BACKSPACE 2HAB to BACKSPACE (2HAB))") -/* xgettext:no-c-format */ -SHORT("Enclose hollerith constant in statement at %0 in parentheses")) -FFEBAD_MSG (FFEBAD_FORMAT_EXTRA_COMMA, FATAL, -/* xgettext:no-c-format */ -"Extraneous comma in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_MISSING_COMMA, WARN, -/* xgettext:no-c-format */ -"Missing comma in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_SPURIOUS_SIGN, FATAL, -/* xgettext:no-c-format */ -"Spurious sign in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_SPURIOUS_NUMBER, FATAL, -/* xgettext:no-c-format */ -"Spurious number in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_TEXT_IN_NUMBER, FATAL, -/* xgettext:no-c-format */ -"Spurious text trailing number in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_P_NOCOMMA, FATAL, -/* xgettext:no-c-format */ -LONG("nP control edit descriptor not followed by comma but followed by edit descriptor at %0 other than D, E, EN, F, or G") -/* xgettext:no-c-format */ -SHORT("Invalid edit descriptor at %0 following nP control edit descriptor")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_SPEC, FATAL, -/* xgettext:no-c-format */ -"Unrecognized FORMAT specifier at %0") -FFEBAD_MSG (FFEBAD_FORMAT_BAD_I_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid I specifier in FORMAT statement at %0 -- correct form: [r]Iw.[m]") -/* xgettext:no-c-format */ -SHORT("Invalid I specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_B_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid B specifier in FORMAT statement at %0 -- correct form: [r]Bw.[m]") -/* xgettext:no-c-format */ -SHORT("Invalid B specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_O_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid O specifier in FORMAT statement at %0 -- correct form: [r]Ow.[m]") -/* xgettext:no-c-format */ -SHORT("Invalid O specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_Z_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid Z specifier in FORMAT statement at %0 -- correct form: [r]Zw.[m]") -/* xgettext:no-c-format */ -SHORT("Invalid Z specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_F_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid F specifier in FORMAT statement at %0 -- correct form: [r]Fw.d") -/* xgettext:no-c-format */ -SHORT("Invalid F specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_E_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid E specifier in FORMAT statement at %0 -- correct form: [r]Ew.d[Ee]") -/* xgettext:no-c-format */ -SHORT("Invalid E specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_EN_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid EN specifier in FORMAT statement at %0 -- correct form: [r]ENw.d[Ee]") -/* xgettext:no-c-format */ -SHORT("Invalid EN specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_G_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid G specifier in FORMAT statement at %0 -- correct form: [r]Gw.d[Ee]") -/* xgettext:no-c-format */ -SHORT("Invalid G specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_L_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid L specifier in FORMAT statement at %0 -- correct form: [r]Lw") -/* xgettext:no-c-format */ -SHORT("Invalid L specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_A_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid A specifier in FORMAT statement at %0 -- correct form: [r]A[w]") -/* xgettext:no-c-format */ -SHORT("Invalid A specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_D_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid D specifier in FORMAT statement at %0 -- correct form: [r]Dw.d") -/* xgettext:no-c-format */ -SHORT("Invalid D specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_Q_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid Q specifier in FORMAT statement at %0 -- correct form: Q") -/* xgettext:no-c-format */ -SHORT("Invalid Q specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_DOLLAR_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid $ specifier in FORMAT statement at %0 -- correct form: $") -/* xgettext:no-c-format */ -SHORT("Invalid $ specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_P_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid P specifier in FORMAT statement at %0 -- correct form: kP") -/* xgettext:no-c-format */ -SHORT("Invalid P specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_T_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid T specifier in FORMAT statement at %0 -- correct form: Tn") -/* xgettext:no-c-format */ -SHORT("Invalid T specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_TL_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid TL specifier in FORMAT statement at %0 -- correct form: TLn") -/* xgettext:no-c-format */ -SHORT("Invalid TL specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_TR_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid TR specifier in FORMAT statement at %0 -- correct form: TRn") -/* xgettext:no-c-format */ -SHORT("Invalid TR specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_X_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid X specifier in FORMAT statement at %0 -- correct form: nX") -/* xgettext:no-c-format */ -SHORT("Invalid X specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_S_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid S specifier in FORMAT statement at %0 -- correct form: S") -/* xgettext:no-c-format */ -SHORT("Invalid S specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_SP_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid SP specifier in FORMAT statement at %0 -- correct form: SP") -/* xgettext:no-c-format */ -SHORT("Invalid SP specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_SS_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid SS specifier in FORMAT statement at %0 -- correct form: SS") -/* xgettext:no-c-format */ -SHORT("Invalid SS specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_BN_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid BN specifier in FORMAT statement at %0 -- correct form: BN") -/* xgettext:no-c-format */ -SHORT("Invalid BN specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_BZ_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid BZ specifier in FORMAT statement at %0 -- correct form: BZ") -/* xgettext:no-c-format */ -SHORT("Invalid BZ specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_COLON_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid : specifier in FORMAT statement at %0 -- correct form: :") -/* xgettext:no-c-format */ -SHORT("Invalid : specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_BAD_H_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid H specifier in FORMAT statement at %0 -- correct form: nHcharacters !where n is an unsigned decimal constant, and characters !contains exactly n characters (including spaces)") -/* xgettext:no-c-format */ -SHORT("Invalid H specifier in FORMAT statement at %0")) -FFEBAD_MSG (FFEBAD_FORMAT_MISSING_PAREN, FATAL, -/* xgettext:no-c-format */ -"Missing close-parenthese(s) in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_MISSING_DOT, FATAL, -/* xgettext:no-c-format */ -"Missing number following period in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_MISSING_EXP, FATAL, -/* xgettext:no-c-format */ -"Missing number following `E' in FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_FORMAT_EXPR_TOKEN, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid token with FORMAT run-time expression at %0 -- use the traditional operators .LT., .LE., .GT., .GE., .EQ., and .NE. in place of the newer tokens <, <=, >, >=, ==, and !=, because > ends an expression within a FORMAT statement") -/* xgettext:no-c-format */ -SHORT("Invalid token with FORMAT run-time expression at %0")) -FFEBAD_MSG (FFEBAD_TRAILING_COMMA, WARN, -/* xgettext:no-c-format */ -"Spurious trailing comma preceding terminator at %0") -FFEBAD_MSG (FFEBAD_INTERFACE_ASSIGNMENT, WARN, -/* xgettext:no-c-format */ -"At %0, specify OPERATOR instead of ASSIGNMENT for INTERFACE statement not specifying the assignment operator (=)") -FFEBAD_MSG (FFEBAD_INTERFACE_OPERATOR, WARN, -/* xgettext:no-c-format */ -"At %0, specify ASSIGNMENT instead of OPERATOR for INTERFACE statement specifying the assignment operator (=)") -FFEBAD_MSG (FFEBAD_INTERFACE_NONLETTER, FATAL, -/* xgettext:no-c-format */ -LONG("Defined operator at %0 contains a nonletter -- must contain only letters A-Z (or a-z)") -/* xgettext:no-c-format */ -SHORT("Nonletter in defined operator at %0")) -FFEBAD_MSG (FFEBAD_INVALID_TYPEDECL_ATTR, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid type-declaration attribute at %0 -- must be one of: DIMENSION(array-spec), EXTERNAL, INTRINSIC, PARAMETER, or SAVE") -/* xgettext:no-c-format */ -SHORT("Invalid type-declaration attribute at %0")) -FFEBAD_MSG (FFEBAD_INVALID_TYPEDECL_INIT, FATAL, -/* xgettext:no-c-format */ -"Cannot specify =initialization-expr at %0 unless `::' appears before list of objects") -FFEBAD_MSG (FFEBAD_LABEL_USE_DEF, FATAL, -/* xgettext:no-c-format */ -"Reference to label at %1 inconsistent with its definition at %0") -FFEBAD_MSG (FFEBAD_LABEL_USE_USE, FATAL, -/* xgettext:no-c-format */ -"Reference to label at %1 inconsistent with earlier reference at %0") -FFEBAD_MSG (FFEBAD_LABEL_DEF_DO, FATAL, -/* xgettext:no-c-format */ -"DO-statement reference to label at %1 follows its definition at %0") -FFEBAD_MSG (FFEBAD_LABEL_BLOCK, WARN, -/* xgettext:no-c-format */ -"Reference to label at %1 is outside block containing definition at %0") -FFEBAD_MSG (FFEBAD_LABEL_DO_BLOCK_DO, FATAL, -/* xgettext:no-c-format */ -"DO-statement references to label at %0 and %2 separated by unterminated block starting at %1") -FFEBAD_MSG (FFEBAD_LABEL_DO_BLOCK_END, FATAL, -/* xgettext:no-c-format */ -"DO-statement reference to label at %0 and label definition at %2 separated by unterminated block starting at %1") -FFEBAD_MSG (FFEBAD_INVALID_LABEL_DEF, FATAL, -/* xgettext:no-c-format */ -"Label definition at %0 invalid on this kind of statement") -FFEBAD_MSG (FFEBAD_ORDER_1, FATAL, -/* xgettext:no-c-format */ -"Statement at %0 invalid in this context") -FFEBAD_MSG (FFEBAD_ORDER_2, FATAL, -/* xgettext:no-c-format */ -"Statement at %0 invalid in context established by statement at %1") -FFEBAD_MSG (FFEBAD_CONSTRUCT_NAMED, FATAL, -/* xgettext:no-c-format */ -"Statement at %0 must specify construct name specified at %1") -FFEBAD_MSG (FFEBAD_CONSTRUCT_NOT_NAMED, FATAL, -/* xgettext:no-c-format */ -"Construct name at %0 superfluous, no construct name specified at %1") -FFEBAD_MSG (FFEBAD_CONSTRUCT_WRONG_NAME, FATAL, -/* xgettext:no-c-format */ -"Construct name at %0 not the same as construct name at %1") -FFEBAD_MSG (FFEBAD_CONSTRUCT_NO_DO_NAME, FATAL, -/* xgettext:no-c-format */ -"Construct name at %0 does not match construct name for any containing DO constructs") -FFEBAD_MSG (FFEBAD_DO_HAD_LABEL, FATAL, -/* xgettext:no-c-format */ -"Label definition missing at %0 for DO construct specifying label at %1") -FFEBAD_MSG (FFEBAD_AFTER_ELSE, FATAL, -/* xgettext:no-c-format */ -"Statement at %0 follows ELSE block for IF construct at %1") -FFEBAD_MSG (FFEBAD_FORMAT_NO_LABEL_DEF, FATAL, -/* xgettext:no-c-format */ -"No label definition for FORMAT statement at %0") -FFEBAD_MSG (FFEBAD_SECOND_ELSE_WHERE, FATAL, -/* xgettext:no-c-format */ -"Second occurrence of ELSE WHERE at %0 within WHERE at %1") -FFEBAD_MSG (FFEBAD_END_WO, WARN, -/* xgettext:no-c-format */ -"END statement at %0 missing `%A' keyword required for internal or module procedure(s) bounded by %1") -FFEBAD_MSG (FFEBAD_INVALID_MODULE_PROCEDURE, FATAL, -/* xgettext:no-c-format */ -"MODULE PROCEDURE statement at %0 disallowed because INTERFACE at %1 specifies no generic name, operator, or assignment") -FFEBAD_MSG (FFEBAD_BLOCKDATA_NOT_NAMED, FATAL, -/* xgettext:no-c-format */ -"BLOCK DATA name at %0 superfluous, no name specified at %1") -FFEBAD_MSG (FFEBAD_PROGRAM_NOT_NAMED, FATAL, -/* xgettext:no-c-format */ -"Program name at %0 superfluous, no PROGRAM statement specified at %1") -FFEBAD_MSG (FFEBAD_UNIT_WRONG_NAME, FATAL, -/* xgettext:no-c-format */ -"Program unit name at %0 not the same as name at %1") -FFEBAD_MSG (FFEBAD_TYPE_WRONG_NAME, FATAL, -/* xgettext:no-c-format */ -"Type name at %0 not the same as name at %1") -FFEBAD_MSG (FFEBAD_EOF_BEFORE_BLOCK_END, FATAL, -/* xgettext:no-c-format */ -"End of source file before end of block started at %0") -FFEBAD_MSG (FFEBAD_UNDEF_LABEL, FATAL, -/* xgettext:no-c-format */ -"Undefined label, first referenced at %0") -FFEBAD_MSG (FFEBAD_CONFLICTING_SAVES, WARN, -/* xgettext:no-c-format */ -"SAVE statement or attribute at %1 cannot be specified along with SAVE statement or attribute at %0") -FFEBAD_MSG (FFEBAD_CONFLICTING_ACCESSES, FATAL, -/* xgettext:no-c-format */ -"PUBLIC or PRIVATE statement at %1 cannot be specified along with PUBLIC or PRIVATE statement at %0") -FFEBAD_MSG (FFEBAD_RETURN_IN_MAIN, WARN, -/* xgettext:no-c-format */ -"RETURN statement at %0 invalid within a main program unit") -FFEBAD_MSG (FFEBAD_ALTRETURN_IN_PROGRAM, FATAL, -/* xgettext:no-c-format */ -"Alternate return specifier at %0 invalid within a main program unit") -FFEBAD_MSG (FFEBAD_ALTRETURN_IN_FUNCTION, FATAL, -/* xgettext:no-c-format */ -"Alternate return specifier at %0 invalid within a function") -FFEBAD_MSG (FFEBAD_DERIVTYP_ACCESS, FATAL, -/* xgettext:no-c-format */ -"Access specifier or PRIVATE statement at %0 invalid for derived-type definition within other than the specification part of a module") -FFEBAD_MSG (FFEBAD_DERIVTYP_ACCESS_FIRST, FATAL, -/* xgettext:no-c-format */ -"Access specifier at %0 must immediately follow derived-type statement at %1 with no intervening statements") -FFEBAD_MSG (FFEBAD_DERIVTYP_NO_COMPONENTS, FATAL, -/* xgettext:no-c-format */ -"No components specified as of %0 for derived-type definition beginning at %1") -FFEBAD_MSG (FFEBAD_STRUCT_NO_COMPONENTS, FATAL, -/* xgettext:no-c-format */ -"No components specified as of %0 for structure definition beginning at %1") -FFEBAD_MSG (FFEBAD_STRUCT_MISSING_NAME, FATAL, -/* xgettext:no-c-format */ -"Missing structure name for outer structure definition at %0") -FFEBAD_MSG (FFEBAD_STRUCT_IGNORING_FIELD, FATAL, -/* xgettext:no-c-format */ -"Field names at %0 for outer structure definition -- specify them in a subsequent RECORD statement instead") -FFEBAD_MSG (FFEBAD_STRUCT_MISSING_FIELD, FATAL, -/* xgettext:no-c-format */ -"Missing field name(s) for structure definition at %0 within structure definition at %1") -FFEBAD_MSG (FFEBAD_MAP_NO_COMPONENTS, FATAL, -/* xgettext:no-c-format */ -"No components specified as of %0 for map beginning at %1") -FFEBAD_MSG (FFEBAD_UNION_NO_TWO_MAPS, FATAL, -/* xgettext:no-c-format */ -"Zero or one maps specified as of %0 for union beginning at %1 -- at least two are required") -FFEBAD_MSG (FFEBAD_MISSING_SPECIFIER, FATAL, -/* xgettext:no-c-format */ -"Missing %A specifier in statement at %0") -FFEBAD_MSG (FFEBAD_NAMELIST_ITEMS, FATAL, -/* xgettext:no-c-format */ -"Items in I/O list starting at %0 invalid for namelist-directed I/O") -FFEBAD_MSG (FFEBAD_CONFLICTING_SPECS, FATAL, -/* xgettext:no-c-format */ -"Conflicting I/O control specifications at %0 and %1") -FFEBAD_MSG (FFEBAD_NO_UNIT_SPEC, FATAL, -/* xgettext:no-c-format */ -"No UNIT= specifier in I/O control list at %0") -FFEBAD_MSG (FFEBAD_MISSING_ADVANCE_SPEC, FATAL, -/* xgettext:no-c-format */ -"Specification at %0 requires ADVANCE=`NO' specification in same I/O control list") -FFEBAD_MSG (FFEBAD_MISSING_FORMAT_SPEC, FATAL, -/* xgettext:no-c-format */ -"Specification at %0 requires explicit FMT= specification in same I/O control list") -FFEBAD_MSG (FFEBAD_SPEC_VALUE, FATAL, -/* xgettext:no-c-format */ -LONG("Unrecognized value for character constant at %0 -- expecting %A") -/* xgettext:no-c-format */ -SHORT("Unrecognized value for character constant at %0")) -FFEBAD_MSG (FFEBAD_CASE_SECOND_DEFAULT, FATAL, -/* xgettext:no-c-format */ -"Second occurrence of CASE DEFAULT at %0 within SELECT CASE at %1") -FFEBAD_MSG (FFEBAD_CASE_DUPLICATE, FATAL, -/* xgettext:no-c-format */ -"Duplicate or overlapping case values/ranges at %0 and %1") -FFEBAD_MSG (FFEBAD_CASE_TYPE_DISAGREE, FATAL, -/* xgettext:no-c-format */ -"Type and/or kind-type parameter disagreement between CASE value or value within range at %0 and SELECT CASE at %1") -FFEBAD_MSG (FFEBAD_CASE_LOGICAL_RANGE, FATAL, -/* xgettext:no-c-format */ -"Range specification at %0 invalid for CASE statement within logical-type SELECT CASE statement") -FFEBAD_MSG (FFEBAD_CASE_BAD_RANGE, FATAL, -/* xgettext:no-c-format */ -LONG("Range specification at %0 invalid -- at least one expression must be specified, or use CASE DEFAULT") -/* xgettext:no-c-format */ -SHORT("Range specification at %0 invalid")) -FFEBAD_MSG (FFEBAD_CASE_RANGE_USELESS, INFORM, -/* xgettext:no-c-format */ -LONG("Range specification at %0 useless; first expression greater than second expression in range, so range can never be matched by any selection expression") -/* xgettext:no-c-format */ -SHORT("Useless range at %0")) -FFEBAD_MSG (FFEBAD_F90, FATAL, -/* xgettext:no-c-format */ -"Fortran 90 feature at %0 unsupported") -FFEBAD_MSG (FFEBAD_KINDTYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid kind at %0 for type at %1 -- unsupported or not permitted") -/* xgettext:no-c-format */ -SHORT("Invalid kind at %0 for type at %1")) -FFEBAD_MSG (FFEBAD_BAD_IMPLICIT, FATAL, -/* xgettext:no-c-format */ -LONG("Cannot establish implicit type for initial letter `%A' at %0 -- already explicitly established or used to set implicit type of some name, or backwards order of letters in letter range") -/* xgettext:no-c-format */ -SHORT("Cannot establish implicit type for initial letter `%A' at %0")) -FFEBAD_MSG (FFEBAD_SYMERR, FATAL, -/* xgettext:no-c-format */ -"Invalid declaration of or reference to symbol `%A' at %0 [initially seen at %1]") -FFEBAD_MSG (FFEBAD_LABEL_WRONG_PLACE, FATAL, -/* xgettext:no-c-format */ -LONG("Label definition %A (at %0) invalid -- must be in columns 1-5") -/* xgettext:no-c-format */ -SHORT("Invalid label definition %A (at %0)")) -FFEBAD_MSG (FFEBAD_NULL_ELEMENT, FATAL, -/* xgettext:no-c-format */ -"Null element at %0 for array reference at %1") -FFEBAD_MSG (FFEBAD_TOO_FEW_ELEMENTS, FATAL, -/* xgettext:no-c-format */ -"Too few elements (%A missing) as of %0 for array reference at %1") -FFEBAD_MSG (FFEBAD_TOO_MANY_ELEMENTS, FATAL, -/* xgettext:no-c-format */ -"Too many elements as of %0 for array reference at %1") -FFEBAD_MSG (FFEBAD_MISSING_COLON_IN_SUBSTR, FATAL, -/* xgettext:no-c-format */ -"Missing colon as of %0 in substring reference for %1") -FFEBAD_MSG (FFEBAD_BAD_SUBSTR, FATAL, -/* xgettext:no-c-format */ -"Invalid use at %0 of substring operator on %1") -FFEBAD_MSG (FFEBAD_RANGE_SUBSTR, WARN, -/* xgettext:no-c-format */ -"Substring begin/end point at %0 out of defined range") -FFEBAD_MSG (FFEBAD_RANGE_ARRAY, WARN, -/* xgettext:no-c-format */ -"Array element value at %0 out of defined range") -FFEBAD_MSG (FFEBAD_EXPR_WRONG, FATAL, -/* xgettext:no-c-format */ -"Expression at %0 has incorrect data type or rank for its context") -FFEBAD_MSG (FFEBAD_DIV_BY_ZERO, WARN, -/* xgettext:no-c-format */ -"Division by 0 (zero) at %0 (IEEE not yet supported)") -FFEBAD_MSG (FFEBAD_DO_STEP_ZERO, FATAL, -/* xgettext:no-c-format */ -"%A step count known to be 0 (zero) at %0") -FFEBAD_MSG (FFEBAD_DO_END_OVERFLOW, WARN, -/* xgettext:no-c-format */ -"%A end value plus step count known to overflow at %0") -FFEBAD_MSG (FFEBAD_DO_IMP_OVERFLOW, WARN, -/* xgettext:no-c-format */ -"%A begin, end, and step-count values known to result in implementation-dependent behavior due to overflow(s) in intermediate calculations at %0") -FFEBAD_MSG (FFEBAD_DO_NULL, WARN, -/* xgettext:no-c-format */ -"%A begin, end, and step-count values known to result in no iterations at %0") -FFEBAD_MSG (FFEBAD_BAD_TYPES, FATAL, -/* xgettext:no-c-format */ -"Type disagreement between expressions at %0 and %1") -FFEBAD_MSG (FFEBAD_FORMAT_EXPR_SPEC, FATAL, -/* xgettext:no-c-format */ -LONG("Run-time expression at %0 in FORMAT statement that does not follow the first executable statement in the program unit -- move the statement") -/* xgettext:no-c-format */ -SHORT("FORMAT at %0 with run-time expression must follow first executable statement")) -FFEBAD_MSG (FFEBAD_BAD_IMPDO, FATAL, -/* xgettext:no-c-format */ -LONG("Unexpected token at %0 in implied-DO construct at %1 -- form of implied-DO is `(item-list,do-var=start,end[,incr])'") -/* xgettext:no-c-format */ -SHORT("Unexpected token at %0 in implied-DO construct at %1")) -FFEBAD_MSG (FFEBAD_BAD_IMPDCL, FATAL, -/* xgettext:no-c-format */ -"No specification for implied-DO iterator `%A' at %0") -FFEBAD_MSG (FFEBAD_IMPDO_PAREN, WARN, -/* xgettext:no-c-format */ -"Gratuitous parentheses surround implied-DO construct at %0") -FFEBAD_MSG (FFEBAD_ZERO_SIZE, FATAL, -/* xgettext:no-c-format */ -"Zero-size specification invalid at %0") -FFEBAD_MSG (FFEBAD_ZERO_ARRAY, FATAL, -/* xgettext:no-c-format */ -"Zero-size array at %0") -FFEBAD_MSG (FFEBAD_BAD_COMPLEX, FATAL, -/* xgettext:no-c-format */ -"Target machine does not support complex entity of kind specified at %0") -FFEBAD_MSG (FFEBAD_BAD_DBLCMPLX, FATAL, -/* xgettext:no-c-format */ -"Target machine does not support DOUBLE COMPLEX, specified at %0") -FFEBAD_MSG (FFEBAD_BAD_POWER, WARN, -/* xgettext:no-c-format */ -"Attempt to raise constant zero to a power at %0") -FFEBAD_MSG (FFEBAD_BOOL_ARGS_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Boolean/logical operator at %0 must operate on two subexpressions of logical type, but neither subexpression at %1 or %2 is of logical type") -/* xgettext:no-c-format */ -SHORT("Invalid operands at %1 and %2 for boolean operator at %0")) -FFEBAD_MSG (FFEBAD_BOOL_ARG_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Boolean/logical operator at %0 must operate on two subexpressions of logical type, but the subexpression at %1 is not of logical type") -/* xgettext:no-c-format */ -SHORT("Invalid operand at %1 for boolean operator at %0")) -FFEBAD_MSG (FFEBAD_BOOL_ARG_KIND, FATAL, -/* xgettext:no-c-format */ -LONG("Boolean/logical operator at %0 must operate on two scalar (not array) subexpressions, two function invocations returning logical scalars, or a combination of both -- but the subexpression at %1 is %A") -/* xgettext:no-c-format */ -SHORT("Invalid operand (is %A) at %1 for boolean operator at %0")) -FFEBAD_MSG (FFEBAD_NOT_ARG_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG(".NOT. operator at %0 must operate on subexpression of logical type, but the subexpression at %1 is not of logical type") -/* xgettext:no-c-format */ -SHORT("Invalid operand at %1 for .NOT. operator at %0")) -FFEBAD_MSG (FFEBAD_NOT_ARG_KIND, FATAL, -/* xgettext:no-c-format */ -LONG(".NOT. operator at %0 must operate on scalar subexpressions -- but the subexpression at %1 is %A") -/* xgettext:no-c-format */ -SHORT("Invalid operand (is %A) at %1 for .NOT. operator at %0")) -FFEBAD_MSG (FFEBAD_EQOP_ARGS_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Equality operator at %0 must operate on two subexpressions of arithmetic or character type, but neither subexpression at %1 or %2 is of arithmetic or character type") -/* xgettext:no-c-format */ -SHORT("Invalid operands at %1 and %2 for equality operator at %0")) -FFEBAD_MSG (FFEBAD_EQOP_ARG_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Equality operator at %0 must operate on two subexpressions of arithmetic or character type, but the subexpression at %1 is not of arithmetic or character type") -/* xgettext:no-c-format */ -SHORT("Invalid operand at %1 for equality operator at %0")) -FFEBAD_MSG (FFEBAD_EQOP_ARG_KIND, FATAL, -/* xgettext:no-c-format */ -LONG("Equality operator at %0 must operate on two scalar (not array) subexpressions, two function invocations returning arithmetic or character scalars, or a combination of both -- but the subexpression at %1 is %A") -/* xgettext:no-c-format */ -SHORT("Invalid operand (is %A) at %1 for equality operator at %0")) -FFEBAD_MSG (FFEBAD_RELOP_ARGS_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Relational operator at %0 must operate on two subexpressions of integer, real, or character type, but neither subexpression at %1 or %2 is of integer, real, or character type") -/* xgettext:no-c-format */ -SHORT("Invalid operands at %1 and %2 for relational operator at %0")) -FFEBAD_MSG (FFEBAD_RELOP_ARG_TYPE, FATAL, -/* xgettext:no-c-format */ -LONG("Relational operator at %0 must operate on two subexpressions of integer, real, or character type, but the subexpression at %1 is not of integer, real, or character type") -/* xgettext:no-c-format */ -SHORT("Invalid operand at %1 for relational operator at %0")) -FFEBAD_MSG (FFEBAD_RELOP_ARG_KIND, FATAL, -/* xgettext:no-c-format */ -LONG("Relational operator at %0 must operate on two scalar (not array) subexpressions, two function invocations returning integer, real, or character scalars, or a combination of both -- but the subexpression at %1 is %A") -/* xgettext:no-c-format */ -SHORT("Invalid operand (is %A) at %1 for relational operator at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_REF, FATAL, -/* xgettext:no-c-format */ -LONG("Reference to intrinsic `%A' at %0 invalid -- one or more arguments have incorrect type") -/* xgettext:no-c-format */ -SHORT("Invalid reference to intrinsic `%A' at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_TOOFEW, FATAL, -/* xgettext:no-c-format */ -LONG("Too few arguments passed to intrinsic `%A' at %0") -/* xgettext:no-c-format */ -SHORT("Too few arguments for intrinsic `%A' at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_TOOMANY, FATAL, -/* xgettext:no-c-format */ -LONG("Too many arguments passed to intrinsic `%A' at %0") -/* xgettext:no-c-format */ -SHORT("Too many arguments for intrinsic `%A' at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_DISABLED, FATAL, -/* xgettext:no-c-format */ -LONG("Reference to disabled intrinsic `%A' at %0") -/* xgettext:no-c-format */ -SHORT("Disabled intrinsic `%A' at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_IS_SUBR, FATAL, -/* xgettext:no-c-format */ -LONG("Reference to intrinsic subroutine `%A' as if it were a function at %0") -/* xgettext:no-c-format */ -SHORT("Function reference to intrinsic subroutine `%A' at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_IS_FUNC, FATAL, -/* xgettext:no-c-format */ -LONG("Reference to intrinsic function `%A' as if it were a subroutine at %0") -/* xgettext:no-c-format */ -SHORT("Subroutine reference to intrinsic function `%A' at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_UNIMPL, FATAL, -/* xgettext:no-c-format */ -LONG("Reference to unimplemented intrinsic `%A' at %0 -- use EXTERNAL to reference user-written procedure with this name") -/* xgettext:no-c-format */ -SHORT("Unimplemented intrinsic `%A' at %0")) -FFEBAD_MSG (FFEBAD_INTRINSIC_UNIMPLW, WARN, -/* xgettext:no-c-format */ -LONG("Reference to unimplemented intrinsic `%A' at %0 (assumed EXTERNAL)") -/* xgettext:no-c-format */ -SHORT("Unimplemented intrinsic `%A' at %0 (assumed EXTERNAL)")) -FFEBAD_MSG (FFEBAD_INTRINSIC_AMBIG, FATAL, -/* xgettext:no-c-format */ -"Reference to generic intrinsic `%A' at %0 could be to form %B or %C") -FFEBAD_MSG (FFEBAD_INTRINSIC_CMPAMBIG, FATAL, -/* xgettext:no-c-format */ -"Ambiguous use of intrinsic `%A' at %0 [info -f g77 M CMPAMBIG]") -FFEBAD_MSG (FFEBAD_INTRINSIC_EXPIMP, WARN, -/* xgettext:no-c-format */ -"Intrinsic `%A' referenced %Bly at %0, %Cly at %1 [info -f g77 M EXPIMP]") -FFEBAD_MSG (FFEBAD_INTRINSIC_GLOBAL, WARN, -/* xgettext:no-c-format */ -"Same name `%A' used for %B at %0 and %C at %1 [info -f g77 M INTGLOB]") -FFEBAD_MSG (FFEBAD_INTRINSIC_TYPE, WARN, -/* xgettext:no-c-format */ -"Explicit type declaration for intrinsic `%A' disagrees with invocation at %0") -FFEBAD_MSG (FFEBAD_OPEN_INCLUDE, FATAL, -/* xgettext:no-c-format */ -"Unable to open INCLUDE file `%A' at %0") -FFEBAD_MSG (FFEBAD_DOITER, FATAL, -/* xgettext:no-c-format */ -LONG("Attempt to modify variable `%A' at %0 while it serves as DO-loop iterator at %1") -/* xgettext:no-c-format */ -SHORT("Modification of DO-loop iterator `%A' at %0")) -FFEBAD_MSG (FFEBAD_DOITER_IMPDO, FATAL, -/* xgettext:no-c-format */ -LONG("Attempt to modify variable `%A' via item #%B in list at %0 while it serves as implied-DO iterator at %1") -/* xgettext:no-c-format */ -SHORT("Modification of DO-loop iterator `%A' at %0")) -FFEBAD_MSG (FFEBAD_TOO_MANY_DIMS, FATAL, -/* xgettext:no-c-format */ -LONG("Array has too many dimensions, as of dimension specifier at %0") -/* xgettext:no-c-format */ -SHORT("Too many dimensions at %0")) -FFEBAD_MSG (FFEBAD_NULL_ARGUMENT, FATAL, -/* xgettext:no-c-format */ -"Null argument at %0 for statement function reference at %1") -FFEBAD_MSG (FFEBAD_NULL_ARGUMENT_W, WARN, -/* xgettext:no-c-format */ -"Null argument at %0 for procedure invocation at %1") -FFEBAD_MSG (FFEBAD_TOO_FEW_ARGUMENTS, FATAL, -/* xgettext:no-c-format */ -"%A too few arguments (starting with dummy argument `%B') as of %0 for statement function reference at %1") -FFEBAD_MSG (FFEBAD_TOO_MANY_ARGUMENTS, FATAL, -/* xgettext:no-c-format */ -"%A too many arguments as of %0 for statement function reference at %1") -FFEBAD_MSG (FFEBAD_ARRAY_AS_SFARG, FATAL, -/* xgettext:no-c-format */ -"Array supplied at %1 for dummy argument `%A' in statement function reference at %0") -FFEBAD_MSG (FFEBAD_FORMAT_UNSUPPORTED, FATAL, -/* xgettext:no-c-format */ -"Unsupported FORMAT specifier at %0") -FFEBAD_MSG (FFEBAD_FORMAT_VARIABLE, FATAL, -/* xgettext:no-c-format */ -"Variable-expression FORMAT specifier at %0 -- unsupported") -FFEBAD_MSG (FFEBAD_OPEN_UNSUPPORTED, FATAL, -/* xgettext:no-c-format */ -LONG("Unsupported OPEN control item at %0 -- ACTION=, ASSOCIATEVARIABLE=, BLOCKSIZE=, BUFFERCOUNT=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=, DISPOSE=, EXTENDSIZE=, INITIALSIZE=, KEY=, MAXREC=, NOSPANBLOCKS, ORGANIZATION=, PAD=, POSITION=, READONLY=, RECORDTYPE=, SHARED=, and USEROPEN= are not supported") -/* xgettext:no-c-format */ -SHORT("Unsupported OPEN control item at %0")) -FFEBAD_MSG (FFEBAD_INQUIRE_UNSUPPORTED, FATAL, -/* xgettext:no-c-format */ -LONG("Unsupported INQUIRE control item at %0 -- ACTION=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=, KEYED=, ORGANIZATION=, PAD=, POSITION=, READ=, READWRITE=, RECORDTYPE=, and WRITE= are not supported") -/* xgettext:no-c-format */ -SHORT("Unsupported INQUIRE control item at %0")) -FFEBAD_MSG (FFEBAD_READ_UNSUPPORTED, FATAL, -/* xgettext:no-c-format */ -LONG("Unsupported READ control item at %0 -- ADVANCE=, EOR=, KEYEQ=, KEYGE=, KEYGT=, KEYID=, NULLS=, and SIZE= are not supported") -/* xgettext:no-c-format */ -SHORT("Unsupported READ control item at %0")) -FFEBAD_MSG (FFEBAD_WRITE_UNSUPPORTED, FATAL, -/* xgettext:no-c-format */ -LONG("Unsupported WRITE control item at %0 -- ADVANCE= and EOR= are not supported") -/* xgettext:no-c-format */ -SHORT("Unsupported WRITE control item at %0")) -FFEBAD_MSG (FFEBAD_VXT_UNSUPPORTED, FATAL, -/* xgettext:no-c-format */ -"Unsupported VXT statement at %0") -FFEBAD_MSG (FFEBAD_DATA_REINIT, FATAL, -/* xgettext:no-c-format */ -"Attempt to specify second initial value for `%A' at %0") -FFEBAD_MSG (FFEBAD_DATA_TOOFEW, FATAL, -/* xgettext:no-c-format */ -"Too few initial values in list of initializers for `%A' at %0") -FFEBAD_MSG (FFEBAD_DATA_TOOMANY, FATAL, -/* xgettext:no-c-format */ -"Too many initial values in list of initializers starting at %0") -FFEBAD_MSG (FFEBAD_DATA_RANGE, FATAL, -/* xgettext:no-c-format */ -"Array or substring specification for `%A' out of range in statement at %0") -FFEBAD_MSG (FFEBAD_DATA_SUBSCRIPT, FATAL, -/* xgettext:no-c-format */ -"Array subscript #%B out of range for initialization of `%A' in statement at %0") -FFEBAD_MSG (FFEBAD_DATA_ZERO, FATAL, -/* xgettext:no-c-format */ -"Implied do-loop step count of 0 (zero) for iteration variable `%A' in statement at %0") -FFEBAD_MSG (FFEBAD_DATA_EMPTY, FATAL, -/* xgettext:no-c-format */ -"Implied do-loop iteration count of 0 (zero) for iteration variable `%A' in statement at %0") -FFEBAD_MSG (FFEBAD_DATA_EVAL, FATAL, -/* xgettext:no-c-format */ -"Not an integer constant expression in implied do-loop in statement at %0") -FFEBAD_MSG (FFEBAD_DATA_MULTIPLE, FATAL, -/* xgettext:no-c-format */ -"Attempt to specify second initial value for element of `%A' at %0") -FFEBAD_MSG (FFEBAD_EQUIV_COMMON, FATAL, -/* xgettext:no-c-format */ -"Attempt to EQUIVALENCE common areas `%A' and `%B' at %0") -FFEBAD_MSG (FFEBAD_EQUIV_ALIGN, FATAL, -/* xgettext:no-c-format */ -"Can't place `%A' as directed by EQUIVALENCE due to alignment restrictions") -FFEBAD_MSG (FFEBAD_EQUIV_MISMATCH, FATAL, -/* xgettext:no-c-format */ -"Mismatched EQUIVALENCE requirements for placement of `%A' at both %C and %D bytes offset from `%B'") -FFEBAD_MSG (FFEBAD_EQUIV_RANGE, FATAL, -/* xgettext:no-c-format */ -"Array or substring specification for `%A' out of range in EQUIVALENCE statement") -FFEBAD_MSG (FFEBAD_EQUIV_SUBSTR, FATAL, -/* xgettext:no-c-format */ -"Substring of non-CHARACTER entity `%A' in EQUIVALENCE statement") -FFEBAD_MSG (FFEBAD_EQUIV_ARRAY, FATAL, -/* xgettext:no-c-format */ -"Array reference to scalar variable `%A' in EQUIVALENCE statement") -FFEBAD_MSG (FFEBAD_EQUIV_SUBSCRIPT, WARN, -/* xgettext:no-c-format */ -"Array subscript #%B out of range for EQUIVALENCE of `%A'") -FFEBAD_MSG (FFEBAD_COMMON_PAD, WARN, -/* xgettext:no-c-format */ -LONG("Padding of %A %D required before `%B' in common block `%C' at %0 -- consider reordering members, largest-type-size first") -/* xgettext:no-c-format */ -SHORT("Padding of %A %D required before `%B' in common block `%C' at %0")) -FFEBAD_MSG (FFEBAD_COMMON_NEG, FATAL, -/* xgettext:no-c-format */ -"Attempt to extend COMMON area beyond its starting point via EQUIVALENCE of `%A'") -FFEBAD_MSG (FFEBAD_EQUIV_FEW, FATAL, -/* xgettext:no-c-format */ -"Too few elements in reference to array `%A' in EQUIVALENCE statement") -FFEBAD_MSG (FFEBAD_EQUIV_MANY, FATAL, -/* xgettext:no-c-format */ -"Too many elements in reference to array `%A' in EQUIVALENCE statement") -FFEBAD_MSG (FFEBAD_MIXED_TYPES, WARN, -/* xgettext:no-c-format */ -"Mixed CHARACTER and non-CHARACTER types via COMMON/EQUIVALENCE -- for example, `%A' and `%B'") -FFEBAD_MSG (FFEBAD_IMPLICIT_ADJLEN, FATAL, -/* xgettext:no-c-format */ -LONG("Invalid length specification at %0 for IMPLICIT statement -- must be integer constant expression") -/* xgettext:no-c-format */ -SHORT("Invalid length specification at %0")) -FFEBAD_MSG (FFEBAD_ENTRY_CONFLICTS, FATAL, -/* xgettext:no-c-format */ -LONG("Type of ENTRY point at %0 to function conflicts with type(s) of previous entrypoint(s) -- must all be identical-length CHARACTER or none be CHARACTER type") -/* xgettext:no-c-format */ -SHORT("Type of ENTRY point at %0 to function conflicts with type(s) of previous entrypoint(s)")) -FFEBAD_MSG (FFEBAD_RETURN_VALUE_UNSET, WARN, -/* xgettext:no-c-format */ -"Return value `%A' for FUNCTION at %0 not referenced in subprogram") -FFEBAD_MSG (FFEBAD_COMMON_ALREADY_INIT, FATAL, -/* xgettext:no-c-format */ -LONG("Common block `%A' initialized at %0 already initialized at %1 -- only one program unit may specify initial values for a particular common block") -/* xgettext:no-c-format */ -SHORT("Common block `%A' initialized at %0 already initialized at %1")) -FFEBAD_MSG (FFEBAD_COMMON_INIT_PAD, WARN, -/* xgettext:no-c-format */ -LONG("Initial padding for common block `%A' is %B %C at %0 -- consider reordering members, largest-type-size first") -/* xgettext:no-c-format */ -SHORT("Initial padding for common block `%A' is %B %C at %0")) -FFEBAD_MSG (FFEBAD_COMMON_DIFF_PAD, FATAL, -/* xgettext:no-c-format */ -LONG("Initial padding for common block `%A' is %B %D at %0 but %C %E at %1 -- consider reordering members, largest-type-size first") -/* xgettext:no-c-format */ -SHORT("Initial padding for common block `%A' is %B %D at %0 but %C %E at %1")) -FFEBAD_MSG (FFEBAD_COMMON_DIFF_SAVE, WARN, -/* xgettext:no-c-format */ -"Common block `%A' is SAVEd, explicitly or implicitly, at %0 but not SAVEd at %1") -FFEBAD_MSG (FFEBAD_COMMON_DIFF_SIZE, WARN, -/* xgettext:no-c-format */ -"Common block `%A' is %B %D in length at %0 but %C %E at %1") -FFEBAD_MSG (FFEBAD_COMMON_ENLARGED, FATAL, -/* xgettext:no-c-format */ -LONG("Common block `%A' is initialized to %B %D long at %0 but enlarged to %C %E at %1 -- use consistent definitions or reorder program units in source file") -/* xgettext:no-c-format */ -SHORT("Common block `%A' is initialized to %B %D long at %0 but enlarged to %C %E at %1")) -FFEBAD_MSG (FFEBAD_COMMON_BLANK_INIT, WARN, -/* xgettext:no-c-format */ -"Blank common initialized at %0") -FFEBAD_MSG (FFEBAD_NEED_INTRINSIC, WARN, -/* xgettext:no-c-format */ -"Intrinsic `%A' is passed as actual argument at %0 but not explicitly declared INTRINSIC") -FFEBAD_MSG (FFEBAD_NEED_EXTERNAL, WARN, -/* xgettext:no-c-format */ -"External procedure `%A' is passed as actual argument at %0 but not explicitly declared EXTERNAL") -FFEBAD_MSG (FFEBAD_SYMBOL_UPPER_CASE, WARN, -/* xgettext:no-c-format */ -"Character `%A' (for example) is upper-case in symbol name at %0") -FFEBAD_MSG (FFEBAD_SYMBOL_LOWER_CASE, WARN, -/* xgettext:no-c-format */ -"Character `%A' (for example) is lower-case in symbol name at %0") -FFEBAD_MSG (FFEBAD_SYMBOL_NOLOWER_INITCAP, WARN, -/* xgettext:no-c-format */ -"Character `%A' not followed at some point by lower-case character in symbol name at %0") -FFEBAD_MSG (FFEBAD_SYMBOL_LOWER_INITCAP, WARN, -/* xgettext:no-c-format */ -"Initial character `%A' is lower-case in symbol name at %0") -FFEBAD_MSG (FFEBAD_DO_REAL, WARN, -/* xgettext:no-c-format */ -LONG("DO-variable `%A' is type REAL or DOUBLE PRECISION at %0 -- unexpected behavior likely") -/* xgettext:no-c-format */ -SHORT("DO-variable `%A' is type REAL or DOUBLE PRECISION at %0")) -FFEBAD_MSG (FFEBAD_NAMELIST_CASE, WARN, -/* xgettext:no-c-format */ -"NAMELIST not adequately supported by run-time library for source files with case preserved") -FFEBAD_MSG (FFEBAD_NESTED_PERCENT, WARN, -/* xgettext:no-c-format */ -"Nested %% construct (%%VAL, %%REF, or %%DESCR) at %0") -FFEBAD_MSG (FFEBAD_ACTUALARG, WARN, -/* xgettext:no-c-format */ -LONG("Invalid actual argument at %0 -- replace hollerith constants with %%REF('string') and typeless constants with INTEGER constant equivalents, or use -fugly-args or -fugly") -/* xgettext:no-c-format */ -SHORT("Invalid actual argument at %0")) -FFEBAD_MSG (FFEBAD_QUAD_UNSUPPORTED, FATAL, -/* xgettext:no-c-format */ -LONG("Quadruple-precision floating-point unsupported -- treating constant at %0 as double-precision") -/* xgettext:no-c-format */ -SHORT("Quadruple-precision floating-point unsupported")) -FFEBAD_MSG (FFEBAD_TOO_BIG_INIT, WARN, -/* xgettext:no-c-format */ -LONG("Initialization of large (%B-unit) aggregate area `%A' at %0 slow and takes lots of memory during g77 compile") -/* xgettext:no-c-format */ -SHORT("This could take a while (initializing `%A' at %0)...")) -FFEBAD_MSG (FFEBAD_BLOCKDATA_STMT, FATAL, -/* xgettext:no-c-format */ -"Statement at %0 invalid in BLOCK DATA program unit at %1") -FFEBAD_MSG (FFEBAD_TRUNCATING_CHARACTER, FATAL, -/* xgettext:no-c-format */ -"Truncating characters on right side of character constant at %0") -FFEBAD_MSG (FFEBAD_TRUNCATING_HOLLERITH, FATAL, -/* xgettext:no-c-format */ -"Truncating characters on right side of hollerith constant at %0") -FFEBAD_MSG (FFEBAD_TRUNCATING_NUMERIC, FATAL, -/* xgettext:no-c-format */ -"Truncating non-zero data on left side of numeric constant at %0") -FFEBAD_MSG (FFEBAD_TRUNCATING_TYPELESS, FATAL, -/* xgettext:no-c-format */ -"Truncating non-zero data on left side of typeless constant at %0") -FFEBAD_MSG (FFEBAD_TYPELESS_OVERFLOW, FATAL, -/* xgettext:no-c-format */ -"Typeless constant at %0 too large") -FFEBAD_MSG (FFEBAD_AMPERSAND, WARN, -/* xgettext:no-c-format */ -"First-column ampersand continuation at %0") -FFEBAD_MSG (FFEBAD_FILEWIDE_ALREADY_SEEN, FATAL, -/* xgettext:no-c-format */ -"Global name `%A' defined at %0 already defined at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_ALREADY_SEEN_W, WARN, -/* xgettext:no-c-format */ -"Global name `%A' defined at %0 already defined at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_DISAGREEMENT, FATAL, -/* xgettext:no-c-format */ -"Global name `%A' is %B at %0 but is %C at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_DISAGREEMENT_W, WARN, -/* xgettext:no-c-format */ -"Global name `%A' is %B at %0 but is %C at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_TYPE_MISMATCH, FATAL, -/* xgettext:no-c-format */ -"Global name `%A' at %0 has different type at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_TYPE_MISMATCH_W, WARN, -/* xgettext:no-c-format */ -"Global name `%A' at %0 has different type at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_NARGS, FATAL, -/* xgettext:no-c-format */ -"Too %B arguments passed to `%A' at %0 versus definition at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_NARGS_W, WARN, -/* xgettext:no-c-format */ -"Too %B arguments for `%A' at %0 versus invocation at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_ARG, FATAL, -/* xgettext:no-c-format */ -"Argument #%B of `%A' is %C at %0 but is %D at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_FILEWIDE_ARG_W, WARN, -/* xgettext:no-c-format */ -"Argument #%B of `%A' is %C at %0 but is %D at %1 [info -f g77 M GLOBALS]") -FFEBAD_MSG (FFEBAD_ARRAY_LARGE, FATAL, -/* xgettext:no-c-format */ -"Array `%A' at %0 is too large to handle") -FFEBAD_MSG (FFEBAD_SFUNC_UNUSED, WARN, -/* xgettext:no-c-format */ -"Statement function `%A' defined at %0 is not used") -FFEBAD_MSG (FFEBAD_INTRINSIC_Y2KBAD, WARN, -/* xgettext:no-c-format */ -"Intrinsic `%A', invoked at %0, known to be non-Y2K-compliant [info -f g77 M Y2KBAD]") -FFEBAD_MSG (FFEBAD_NOCANDO, DISASTER, -/* xgettext:no-c-format */ -"Internal compiler error -- cannot perform operation") - -#undef INFORM -#undef TRIVIAL -#undef WARN -#undef PECULIAR -#undef FATAL -#undef WEIRD -#undef SEVERE -#undef DISASTER diff --git a/contrib/gcc/f/bad.h b/contrib/gcc/f/bad.h deleted file mode 100644 index bd7581e..0000000 --- a/contrib/gcc/f/bad.h +++ /dev/null @@ -1,106 +0,0 @@ -/* bad.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 2002 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - bad.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_BAD_H -#define GCC_F_BAD_H - -/* Simple definitions and enumerations. */ - -typedef enum - { -#define FFEBAD_MSG(KWD,SEV,MSG) KWD, -#include "bad.def" -#undef FFEBAD_MSG - FFEBAD - } ffebad; - -typedef enum - { - - /* Order important; must be increasing severity. */ - - FFEBAD_severityINFORMATIONAL, /* User notice. */ - FFEBAD_severityTRIVIAL, /* Internal notice. */ - FFEBAD_severityWARNING, /* User warning. */ - FFEBAD_severityPECULIAR, /* Internal warning. */ - FFEBAD_severityPEDANTIC, /* Pedantic, could be warning or error. */ - FFEBAD_severityFATAL, /* User error. */ - FFEBAD_severityWEIRD, /* Internal error. */ - FFEBAD_severitySEVERE, /* User error, cannot continue. */ - FFEBAD_severityDISASTER, /* Internal error, cannot continue. */ - FFEBAD_severity - } ffebadSeverity; - -/* Typedefs. */ - -typedef unsigned char ffebadIndex; - -/* Include files needed by this one. */ - -#include "where.h" - -/* Structure definitions. */ - - -/* Global objects accessed by users of this module. */ - -extern bool ffebad_is_inhibited_; - -/* Declare functions with prototypes. */ - -void ffebad_finish (void); -void ffebad_here (ffebadIndex i, ffewhereLine wl, ffewhereColumn wc); -void ffebad_init_0 (void); -bool ffebad_is_fatal (ffebad errnum); -ffebadSeverity ffebad_severity (ffebad errnum); -bool ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev, - const char *msgid); -void ffebad_string (const char *string); - -/* Define macros. */ - -#define ffebad_inhibit() (ffebad_is_inhibited_) -#define ffebad_init_1() -#define ffebad_init_2() -#define ffebad_init_3() -#define ffebad_init_4() -#define ffebad_set_inhibit(f) (ffebad_is_inhibited_ = (f)) -#define ffebad_start(e) ffebad_start_ (FALSE, (e), FFEBAD_severity, NULL) -#define ffebad_start_lex(e) ffebad_start_ (TRUE, (e), FFEBAD_severity, NULL) -#define ffebad_start_msg(msgid,s) ffebad_start_ (FALSE, FFEBAD, (s), (msgid)) -#define ffebad_start_msg_lex(msgid,s) ffebad_start_ (TRUE, FFEBAD, (s), (msgid)) -#define ffebad_terminate_0() -#define ffebad_terminate_1() -#define ffebad_terminate_2() -#define ffebad_terminate_3() -#define ffebad_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_BAD_H */ diff --git a/contrib/gcc/f/bit.c b/contrib/gcc/f/bit.c deleted file mode 100644 index 00f064b..0000000 --- a/contrib/gcc/f/bit.c +++ /dev/null @@ -1,200 +0,0 @@ -/* bit.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - Tracks arrays of booleans in useful ways. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "bit.h" -#include "malloc.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - - -/* Static functions (internal). */ - - -/* Internal macros. */ - - -/* ffebit_count -- Count # of bits set a particular way - - ffebit b; // the ffebit object - ffebitCount offset; // 0..size-1 - bool value; // FALSE (0), TRUE (1) - ffebitCount range; // # bits to test - ffebitCount number; // # bits equal to value - ffebit_count(b,offset,value,range,&number); - - Sets to # bits at through set to - . If is 0, is set to 0. */ - -void -ffebit_count (ffebit b, ffebitCount offset, bool value, ffebitCount range, - ffebitCount *number) -{ - ffebitCount element; - ffebitCount bitno; - - assert (offset + range <= b->size); - - for (*number = 0; range != 0; --range, ++offset) - { - element = offset / CHAR_BIT; - bitno = offset % CHAR_BIT; - if (value - == ((b->bits[element] & ((unsigned char) 1 << bitno)) == 0 ? FALSE : TRUE)) - ++ * number; - } -} - -/* ffebit_new -- Create a new ffebit object - - ffebit b; - ffebit_kill(b); - - Destroys an ffebit object obtained via ffebit_new. */ - -void -ffebit_kill (ffebit b) -{ - malloc_kill_ks (b->pool, b, - offsetof (struct _ffebit_, bits) - + (b->size + CHAR_BIT - 1) / CHAR_BIT); -} - -/* ffebit_new -- Create a new ffebit object - - ffebit b; - mallocPool pool; - ffebitCount size; - b = ffebit_new(pool,size); - - Allocates an ffebit object that holds the values of bits in pool - . */ - -ffebit -ffebit_new (mallocPool pool, ffebitCount size) -{ - ffebit b; - - b = malloc_new_zks (pool, "ffebit", - offsetof (struct _ffebit_, bits) - + (size + CHAR_BIT - 1) / CHAR_BIT, - 0); - b->pool = pool; - b->size = size; - - return b; -} - -/* ffebit_set -- Set value of # of bits - - ffebit b; // the ffebit object - ffebitCount offset; // 0..size-1 - bool value; // FALSE (0), TRUE (1) - ffebitCount length; // # bits to set starting at offset (usually 1) - ffebit_set(b,offset,value,length); - - Sets bit #s through to . */ - -void -ffebit_set (ffebit b, ffebitCount offset, bool value, ffebitCount length) -{ - ffebitCount i; - ffebitCount element; - ffebitCount bitno; - - assert (offset + length <= b->size); - - for (i = 0; i < length; ++i, ++offset) - { - element = offset / CHAR_BIT; - bitno = offset % CHAR_BIT; - b->bits[element] = (((unsigned char) (value ? 1 : 0)) << bitno) - | (b->bits[element] & ~((unsigned char) 1 << bitno)); - } -} - -/* ffebit_test -- Test value of # of bits - - ffebit b; // the ffebit object - ffebitCount offset; // 0..size-1 - bool value; // FALSE (0), TRUE (1) - ffebitCount length; // # bits with same value - ffebit_test(b,offset,&value,&length); - - Returns value of bits at through in - . If is already at the end of the bit array (if - offset == ffebit_size(b)), is set to 0 and is - undefined. */ - -void -ffebit_test (ffebit b, ffebitCount offset, bool *value, ffebitCount *length) -{ - ffebitCount i; - ffebitCount element; - ffebitCount bitno; - - if (offset >= b->size) - { - assert (offset == b->size); - *length = 0; - return; - } - - element = offset / CHAR_BIT; - bitno = offset % CHAR_BIT; - *value = (b->bits[element] & ((unsigned char) 1 << bitno)) == 0 ? FALSE : TRUE; - *length = 1; - - for (i = b->size - offset - 1, ++offset; i != 0; --i, ++offset, ++*length) - { - element = offset / CHAR_BIT; - bitno = offset % CHAR_BIT; - if (*value - != ((b->bits[element] & ((unsigned char) 1 << bitno)) == 0 ? FALSE : TRUE)) - break; - } -} diff --git a/contrib/gcc/f/bit.h b/contrib/gcc/f/bit.h deleted file mode 100644 index 6b559ef..0000000 --- a/contrib/gcc/f/bit.h +++ /dev/null @@ -1,84 +0,0 @@ -/* bit.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - bit.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_BIT_H -#define GCC_F_BIT_H - -/* Simple definitions and enumerations. */ - - -/* Typedefs. */ - -typedef struct _ffebit_ *ffebit; -typedef unsigned long ffebitCount; -#define ffebitCount_f "l" - -/* Include files needed by this one. */ - -#include "malloc.h" - -/* Structure definitions. */ - -struct _ffebit_ - { - mallocPool pool; - ffebitCount size; - unsigned char bits[1]; - }; - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -void ffebit_count (ffebit b, ffebitCount offset, bool value, ffebitCount range, - ffebitCount *number); -void ffebit_kill (ffebit b); -ffebit ffebit_new (mallocPool pool, ffebitCount size); -void ffebit_set (ffebit b, ffebitCount offset, bool value, ffebitCount length); -void ffebit_test (ffebit b, ffebitCount offset, bool *value, ffebitCount *length); - -/* Define macros. */ - -#define ffebit_init_0() -#define ffebit_init_1() -#define ffebit_init_2() -#define ffebit_init_3() -#define ffebit_init_4() -#define ffebit_pool(b) ((b)->pool) -#define ffebit_size(b) ((b)->size) -#define ffebit_terminate_0() -#define ffebit_terminate_1() -#define ffebit_terminate_2() -#define ffebit_terminate_3() -#define ffebit_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_BIT_H */ diff --git a/contrib/gcc/f/bld-op.def b/contrib/gcc/f/bld-op.def deleted file mode 100644 index 737dcc7..0000000 --- a/contrib/gcc/f/bld-op.def +++ /dev/null @@ -1,69 +0,0 @@ -/* bld-op.def -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - bad.c - - Modifications: -*/ - -FFEBLD_OP (FFEBLD_opANY, "ANY", 0) -FFEBLD_OP (FFEBLD_opSTAR, "STAR", 0) /* For adjustable arrays, alternate return dummies, etc. */ -FFEBLD_OP (FFEBLD_opCONTER, "CONTER", 0) -FFEBLD_OP (FFEBLD_opARRTER, "ARRTER", 0) /* Array of constants (DATA...). */ -FFEBLD_OP (FFEBLD_opACCTER, "ACCTER", 0) /* Accreting ARRTER. */ -FFEBLD_OP (FFEBLD_opSYMTER, "SYMTER", 0) -FFEBLD_OP (FFEBLD_opITEM, "ITEM", 0) -FFEBLD_OP (FFEBLD_opUPLUS, "UPLUS", 1) -FFEBLD_OP (FFEBLD_opUMINUS, "UMINUS", 1) -FFEBLD_OP (FFEBLD_opADD, "ADD", 2) -FFEBLD_OP (FFEBLD_opSUBTRACT, "SUBTRACT", 2) -FFEBLD_OP (FFEBLD_opMULTIPLY, "MULTIPLY", 2) -FFEBLD_OP (FFEBLD_opDIVIDE, "DIVIDE", 2) -FFEBLD_OP (FFEBLD_opPOWER, "POWER", 2) -FFEBLD_OP (FFEBLD_opCONCATENATE, "CONCATENATE", 2) -FFEBLD_OP (FFEBLD_opNOT, "NOT", 1) -FFEBLD_OP (FFEBLD_opLT, "LT", 2) -FFEBLD_OP (FFEBLD_opLE, "LE", 2) -FFEBLD_OP (FFEBLD_opEQ, "EQ", 2) -FFEBLD_OP (FFEBLD_opNE, "NE", 2) -FFEBLD_OP (FFEBLD_opGT, "GT", 2) -FFEBLD_OP (FFEBLD_opGE, "GE", 2) -FFEBLD_OP (FFEBLD_opAND, "AND", 2) -FFEBLD_OP (FFEBLD_opOR, "OR", 2) -FFEBLD_OP (FFEBLD_opXOR, "XOR", 2) -FFEBLD_OP (FFEBLD_opEQV, "EQV", 2) -FFEBLD_OP (FFEBLD_opNEQV, "NEQV", 2) -FFEBLD_OP (FFEBLD_opPAREN, "PAREN", 1) -FFEBLD_OP (FFEBLD_opPERCENT_LOC, "%LOC", 1) -FFEBLD_OP (FFEBLD_opPERCENT_VAL, "%VAL", 1) -FFEBLD_OP (FFEBLD_opPERCENT_REF, "%REF", 1) -FFEBLD_OP (FFEBLD_opPERCENT_DESCR, "%DESCR", 1) -FFEBLD_OP (FFEBLD_opCONVERT, "CONVERT", 1) -FFEBLD_OP (FFEBLD_opREPEAT, "REPEAT", 2) -FFEBLD_OP (FFEBLD_opBOUNDS, "BOUNDS", 2) /* For low:high in dimension lists. */ -FFEBLD_OP (FFEBLD_opFUNCREF, "FUNCREF", 2) -FFEBLD_OP (FFEBLD_opSUBRREF, "SUBRREF", 2) -FFEBLD_OP (FFEBLD_opARRAYREF, "ARRAYREF", 2) -FFEBLD_OP (FFEBLD_opSUBSTR, "SUBSTR", 2) -FFEBLD_OP (FFEBLD_opLABTER, "LABTER", 0) -FFEBLD_OP (FFEBLD_opLABTOK, "LABTOK", 0) /* Like LABTER but contains ffelexToken instead. */ -FFEBLD_OP (FFEBLD_opIMPDO, "IMPDO", 2) diff --git a/contrib/gcc/f/bld.c b/contrib/gcc/f/bld.c deleted file mode 100644 index d300069..0000000 --- a/contrib/gcc/f/bld.c +++ /dev/null @@ -1,3135 +0,0 @@ -/* bld.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 2003, 2004 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - The primary "output" of the FFE includes ffebld objects, which - connect expressions, operators, and operands together, along with - connecting lists of expressions together for argument or dimension - lists. - - Modifications: - 30-Aug-92 JCB 1.1 - Change names of some things for consistency. -*/ - -/* Include files. */ - -#include "proj.h" -#include "bld.h" -#include "bit.h" -#include "info.h" -#include "lex.h" -#include "malloc.h" -#include "target.h" -#include "where.h" -#include "real.h" - -/* Externals defined here. */ - -const ffebldArity ffebld_arity_op_[(int) FFEBLD_op] -= -{ -#define FFEBLD_OP(KWD,NAME,ARITY) ARITY, -#include "bld-op.def" -#undef FFEBLD_OP -}; -struct _ffebld_pool_stack_ ffebld_pool_stack_; - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - -#if FFETARGET_okCHARACTER1 -static ffebldConstant ffebld_constant_character1_; -#endif -#if FFETARGET_okCOMPLEX1 -static ffebldConstant ffebld_constant_complex1_; -#endif -#if FFETARGET_okCOMPLEX2 -static ffebldConstant ffebld_constant_complex2_; -#endif -#if FFETARGET_okCOMPLEX3 -static ffebldConstant ffebld_constant_complex3_; -#endif -#if FFETARGET_okINTEGER1 -static ffebldConstant ffebld_constant_integer1_; -#endif -#if FFETARGET_okINTEGER2 -static ffebldConstant ffebld_constant_integer2_; -#endif -#if FFETARGET_okINTEGER3 -static ffebldConstant ffebld_constant_integer3_; -#endif -#if FFETARGET_okINTEGER4 -static ffebldConstant ffebld_constant_integer4_; -#endif -#if FFETARGET_okLOGICAL1 -static ffebldConstant ffebld_constant_logical1_; -#endif -#if FFETARGET_okLOGICAL2 -static ffebldConstant ffebld_constant_logical2_; -#endif -#if FFETARGET_okLOGICAL3 -static ffebldConstant ffebld_constant_logical3_; -#endif -#if FFETARGET_okLOGICAL4 -static ffebldConstant ffebld_constant_logical4_; -#endif -#if FFETARGET_okREAL1 -static ffebldConstant ffebld_constant_real1_; -#endif -#if FFETARGET_okREAL2 -static ffebldConstant ffebld_constant_real2_; -#endif -#if FFETARGET_okREAL3 -static ffebldConstant ffebld_constant_real3_; -#endif -static ffebldConstant ffebld_constant_hollerith_; -static ffebldConstant ffebld_constant_typeless_[FFEBLD_constTYPELESS_LAST - - FFEBLD_constTYPELESS_FIRST + 1]; - -static const char *const ffebld_op_string_[] -= -{ -#define FFEBLD_OP(KWD,NAME,ARITY) NAME, -#include "bld-op.def" -#undef FFEBLD_OP -}; - -/* Static functions (internal). */ - - -/* Internal macros. */ - -#define integerdefault_ CATX(integer,FFETARGET_ktINTEGERDEFAULT) -#define logicaldefault_ CATX(logical,FFETARGET_ktLOGICALDEFAULT) -#define realdefault_ CATX(real,FFETARGET_ktREALDEFAULT) -#define realdouble_ CATX(real,FFETARGET_ktREALDOUBLE) -#define realquad_ CATX(real,FFETARGET_ktREALQUAD) - -/* ffebld_constant_cmp -- Compare two constants a la strcmp - - ffebldConstant c1, c2; - if (ffebld_constant_cmp(c1,c2) == 0) - // they're equal, else they're not. - - Returns -1 if c1 < c2, 0 if c1 == c2, +1 if c1 == c2. */ - -int -ffebld_constant_cmp (ffebldConstant c1, ffebldConstant c2) -{ - if (c1 == c2) - return 0; - - assert (ffebld_constant_type (c1) == ffebld_constant_type (c2)); - - switch (ffebld_constant_type (c1)) - { -#if FFETARGET_okINTEGER1 - case FFEBLD_constINTEGER1: - return ffetarget_cmp_integer1 (ffebld_constant_integer1 (c1), - ffebld_constant_integer1 (c2)); -#endif - -#if FFETARGET_okINTEGER2 - case FFEBLD_constINTEGER2: - return ffetarget_cmp_integer2 (ffebld_constant_integer2 (c1), - ffebld_constant_integer2 (c2)); -#endif - -#if FFETARGET_okINTEGER3 - case FFEBLD_constINTEGER3: - return ffetarget_cmp_integer3 (ffebld_constant_integer3 (c1), - ffebld_constant_integer3 (c2)); -#endif - -#if FFETARGET_okINTEGER4 - case FFEBLD_constINTEGER4: - return ffetarget_cmp_integer4 (ffebld_constant_integer4 (c1), - ffebld_constant_integer4 (c2)); -#endif - -#if FFETARGET_okLOGICAL1 - case FFEBLD_constLOGICAL1: - return ffetarget_cmp_logical1 (ffebld_constant_logical1 (c1), - ffebld_constant_logical1 (c2)); -#endif - -#if FFETARGET_okLOGICAL2 - case FFEBLD_constLOGICAL2: - return ffetarget_cmp_logical2 (ffebld_constant_logical2 (c1), - ffebld_constant_logical2 (c2)); -#endif - -#if FFETARGET_okLOGICAL3 - case FFEBLD_constLOGICAL3: - return ffetarget_cmp_logical3 (ffebld_constant_logical3 (c1), - ffebld_constant_logical3 (c2)); -#endif - -#if FFETARGET_okLOGICAL4 - case FFEBLD_constLOGICAL4: - return ffetarget_cmp_logical4 (ffebld_constant_logical4 (c1), - ffebld_constant_logical4 (c2)); -#endif - -#if FFETARGET_okREAL1 - case FFEBLD_constREAL1: - return ffetarget_cmp_real1 (ffebld_constant_real1 (c1), - ffebld_constant_real1 (c2)); -#endif - -#if FFETARGET_okREAL2 - case FFEBLD_constREAL2: - return ffetarget_cmp_real2 (ffebld_constant_real2 (c1), - ffebld_constant_real2 (c2)); -#endif - -#if FFETARGET_okREAL3 - case FFEBLD_constREAL3: - return ffetarget_cmp_real3 (ffebld_constant_real3 (c1), - ffebld_constant_real3 (c2)); -#endif - -#if FFETARGET_okCHARACTER1 - case FFEBLD_constCHARACTER1: - return ffetarget_cmp_character1 (ffebld_constant_character1 (c1), - ffebld_constant_character1 (c2)); -#endif - - default: - assert ("bad constant type" == NULL); - return 0; - } -} - -/* ffebld_constant_is_magical -- Determine if integer is "magical" - - ffebldConstant c; - if (ffebld_constant_is_magical(c)) - // it is 2**(n-1), where n is # bits in ffetargetIntegerDefault type - // (this test is important for 2's-complement machines only). */ - -bool -ffebld_constant_is_magical (ffebldConstant c) -{ - switch (ffebld_constant_type (c)) - { - case FFEBLD_constINTEGERDEFAULT: - return ffetarget_integerdefault_is_magical (ffebld_constant_integer1 (c)); - - default: - return FALSE; - } -} - -/* Determine if constant is zero. Used to ensure step count - for DO loops isn't zero, also to determine if values will - be binary zeros, so not entirely portable at this point. */ - -bool -ffebld_constant_is_zero (ffebldConstant c) -{ - switch (ffebld_constant_type (c)) - { -#if FFETARGET_okINTEGER1 - case FFEBLD_constINTEGER1: - return ffebld_constant_integer1 (c) == 0; -#endif - -#if FFETARGET_okINTEGER2 - case FFEBLD_constINTEGER2: - return ffebld_constant_integer2 (c) == 0; -#endif - -#if FFETARGET_okINTEGER3 - case FFEBLD_constINTEGER3: - return ffebld_constant_integer3 (c) == 0; -#endif - -#if FFETARGET_okINTEGER4 - case FFEBLD_constINTEGER4: - return ffebld_constant_integer4 (c) == 0; -#endif - -#if FFETARGET_okLOGICAL1 - case FFEBLD_constLOGICAL1: - return ffebld_constant_logical1 (c) == 0; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEBLD_constLOGICAL2: - return ffebld_constant_logical2 (c) == 0; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEBLD_constLOGICAL3: - return ffebld_constant_logical3 (c) == 0; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEBLD_constLOGICAL4: - return ffebld_constant_logical4 (c) == 0; -#endif - -#if FFETARGET_okREAL1 - case FFEBLD_constREAL1: - return ffetarget_iszero_real1 (ffebld_constant_real1 (c)); -#endif - -#if FFETARGET_okREAL2 - case FFEBLD_constREAL2: - return ffetarget_iszero_real2 (ffebld_constant_real2 (c)); -#endif - -#if FFETARGET_okREAL3 - case FFEBLD_constREAL3: - return ffetarget_iszero_real3 (ffebld_constant_real3 (c)); -#endif - -#if FFETARGET_okCOMPLEX1 - case FFEBLD_constCOMPLEX1: - return ffetarget_iszero_real1 (ffebld_constant_complex1 (c).real) - && ffetarget_iszero_real1 (ffebld_constant_complex1 (c).imaginary); -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEBLD_constCOMPLEX2: - return ffetarget_iszero_real2 (ffebld_constant_complex2 (c).real) - && ffetarget_iszero_real2 (ffebld_constant_complex2 (c).imaginary); -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEBLD_constCOMPLEX3: - return ffetarget_iszero_real3 (ffebld_constant_complex3 (c).real) - && ffetarget_iszero_real3 (ffebld_constant_complex3 (c).imaginary); -#endif - -#if FFETARGET_okCHARACTER1 - case FFEBLD_constCHARACTER1: - return ffetarget_iszero_character1 (ffebld_constant_character1 (c)); -#endif - - case FFEBLD_constHOLLERITH: - return ffetarget_iszero_hollerith (ffebld_constant_hollerith (c)); - - case FFEBLD_constBINARY_MIL: - case FFEBLD_constBINARY_VXT: - case FFEBLD_constOCTAL_MIL: - case FFEBLD_constOCTAL_VXT: - case FFEBLD_constHEX_X_MIL: - case FFEBLD_constHEX_X_VXT: - case FFEBLD_constHEX_Z_MIL: - case FFEBLD_constHEX_Z_VXT: - return ffetarget_iszero_typeless (ffebld_constant_typeless (c)); - - default: - return FALSE; - } -} - -/* ffebld_constant_new_character1 -- Return character1 constant object from token - - See prototype. */ - -#if FFETARGET_okCHARACTER1 -ffebldConstant -ffebld_constant_new_character1 (ffelexToken t) -{ - ffetargetCharacter1 val; - - ffetarget_character1 (&val, t, ffebld_constant_pool()); - return ffebld_constant_new_character1_val (val); -} - -#endif -/* ffebld_constant_new_character1_val -- Return an character1 constant object - - See prototype. */ - -#if FFETARGET_okCHARACTER1 -ffebldConstant -ffebld_constant_new_character1_val (ffetargetCharacter1 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_character1_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constCHARACTER1", - sizeof (*nc)); - nc->consttype = FFEBLD_constCHARACTER1; - nc->u.character1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_character1_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_character1 (val, ffebld_constant_character1 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constCHARACTER1", - sizeof (*nc)); - nc->consttype = FFEBLD_constCHARACTER1; - nc->u.character1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_complex1 -- Return complex1 constant object from token - - See prototype. */ - -#if FFETARGET_okCOMPLEX1 -ffebldConstant -ffebld_constant_new_complex1 (ffebldConstant real, - ffebldConstant imaginary) -{ - ffetargetComplex1 val; - - val.real = ffebld_constant_real1 (real); - val.imaginary = ffebld_constant_real1 (imaginary); - return ffebld_constant_new_complex1_val (val); -} - -#endif -/* ffebld_constant_new_complex1_val -- Return a complex1 constant object - - See prototype. */ - -#if FFETARGET_okCOMPLEX1 -ffebldConstant -ffebld_constant_new_complex1_val (ffetargetComplex1 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_complex1_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constCOMPLEX1", - sizeof (*nc)); - nc->consttype = FFEBLD_constCOMPLEX1; - nc->u.complex1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_complex1_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_real1 (val.real, - ffebld_constant_complex1 (P).real); - if (cmp == 0) - cmp = ffetarget_cmp_real1 (val.imaginary, - ffebld_constant_complex1 (P).imaginary); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constCOMPLEX1", - sizeof (*nc)); - nc->consttype = FFEBLD_constCOMPLEX1; - nc->u.complex1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_complex2 -- Return complex2 constant object from token - - See prototype. */ - -#if FFETARGET_okCOMPLEX2 -ffebldConstant -ffebld_constant_new_complex2 (ffebldConstant real, - ffebldConstant imaginary) -{ - ffetargetComplex2 val; - - val.real = ffebld_constant_real2 (real); - val.imaginary = ffebld_constant_real2 (imaginary); - return ffebld_constant_new_complex2_val (val); -} - -#endif -/* ffebld_constant_new_complex2_val -- Return a complex2 constant object - - See prototype. */ - -#if FFETARGET_okCOMPLEX2 -ffebldConstant -ffebld_constant_new_complex2_val (ffetargetComplex2 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_complex2_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constCOMPLEX2", - sizeof (*nc)); - nc->consttype = FFEBLD_constCOMPLEX2; - nc->u.complex2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_complex2_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_real2 (val.real, - ffebld_constant_complex2 (P).real); - if (cmp == 0) - cmp = ffetarget_cmp_real2 (val.imaginary, - ffebld_constant_complex2 (P).imaginary); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constCOMPLEX2", - sizeof (*nc)); - nc->consttype = FFEBLD_constCOMPLEX2; - nc->u.complex2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_hollerith -- Return hollerith constant object from token - - See prototype. */ - -ffebldConstant -ffebld_constant_new_hollerith (ffelexToken t) -{ - ffetargetHollerith val; - - ffetarget_hollerith (&val, t, ffebld_constant_pool()); - return ffebld_constant_new_hollerith_val (val); -} - -/* ffebld_constant_new_hollerith_val -- Return an hollerith constant object - - See prototype. */ - -ffebldConstant -ffebld_constant_new_hollerith_val (ffetargetHollerith val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_hollerith_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constHOLLERITH", - sizeof (*nc)); - nc->consttype = FFEBLD_constHOLLERITH; - nc->u.hollerith = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_hollerith_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_hollerith (val, ffebld_constant_hollerith (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constHOLLERITH", - sizeof (*nc)); - nc->consttype = FFEBLD_constHOLLERITH; - nc->u.hollerith = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -/* ffebld_constant_new_integer1 -- Return integer1 constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -#if FFETARGET_okINTEGER1 -ffebldConstant -ffebld_constant_new_integer1 (ffelexToken t) -{ - ffetargetInteger1 val; - - assert (ffelex_token_type (t) == FFELEX_typeNUMBER); - - ffetarget_integer1 (&val, t); - return ffebld_constant_new_integer1_val (val); -} - -#endif -/* ffebld_constant_new_integer1_val -- Return an integer1 constant object - - See prototype. */ - -#if FFETARGET_okINTEGER1 -ffebldConstant -ffebld_constant_new_integer1_val (ffetargetInteger1 val) -{ - - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_integer1_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER1", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER1; - nc->u.integer1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_integer1_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_integer1 (val, ffebld_constant_integer1 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER1", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER1; - nc->u.integer1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_integer2_val -- Return an integer2 constant object - - See prototype. */ - -#if FFETARGET_okINTEGER2 -ffebldConstant -ffebld_constant_new_integer2_val (ffetargetInteger2 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_integer2_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER2", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER2; - nc->u.integer2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_integer2_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_integer2 (val, ffebld_constant_integer2 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER2", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER2; - nc->u.integer2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_integer3_val -- Return an integer3 constant object - - See prototype. */ - -#if FFETARGET_okINTEGER3 -ffebldConstant -ffebld_constant_new_integer3_val (ffetargetInteger3 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_integer3_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER3", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER3; - nc->u.integer3 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_integer3_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_integer3 (val, ffebld_constant_integer3 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER3", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER3; - nc->u.integer3 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_integer4_val -- Return an integer4 constant object - - See prototype. */ - -#if FFETARGET_okINTEGER4 -ffebldConstant -ffebld_constant_new_integer4_val (ffetargetInteger4 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_integer4_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER4", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER4; - nc->u.integer4 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_integer4_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_integer4 (val, ffebld_constant_integer4 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constINTEGER4", - sizeof (*nc)); - nc->consttype = FFEBLD_constINTEGER4; - nc->u.integer4 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_integerbinary -- Return binary constant object from token - - See prototype. - - Parses the token as a binary integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_integerbinary (ffelexToken t) -{ - ffetargetIntegerDefault val; - - assert ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNUMBER)); - - ffetarget_integerbinary (&val, t); - return ffebld_constant_new_integerdefault_val (val); -} - -/* ffebld_constant_new_integerhex -- Return hex constant object from token - - See prototype. - - Parses the token as a hex integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_integerhex (ffelexToken t) -{ - ffetargetIntegerDefault val; - - assert ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNUMBER)); - - ffetarget_integerhex (&val, t); - return ffebld_constant_new_integerdefault_val (val); -} - -/* ffebld_constant_new_integeroctal -- Return octal constant object from token - - See prototype. - - Parses the token as a octal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_integeroctal (ffelexToken t) -{ - ffetargetIntegerDefault val; - - assert ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNUMBER)); - - ffetarget_integeroctal (&val, t); - return ffebld_constant_new_integerdefault_val (val); -} - -/* ffebld_constant_new_logical1 -- Return logical1 constant object from token - - See prototype. - - Parses the token as a decimal logical constant, thus it must be an - FFELEX_typeNUMBER. */ - -#if FFETARGET_okLOGICAL1 -ffebldConstant -ffebld_constant_new_logical1 (bool truth) -{ - ffetargetLogical1 val; - - ffetarget_logical1 (&val, truth); - return ffebld_constant_new_logical1_val (val); -} - -#endif -/* ffebld_constant_new_logical1_val -- Return a logical1 constant object - - See prototype. */ - -#if FFETARGET_okLOGICAL1 -ffebldConstant -ffebld_constant_new_logical1_val (ffetargetLogical1 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_logical1_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL1", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL1; - nc->u.logical1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_logical1_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_logical1 (val, ffebld_constant_logical1 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL1", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL1; - nc->u.logical1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_logical2_val -- Return a logical2 constant object - - See prototype. */ - -#if FFETARGET_okLOGICAL2 -ffebldConstant -ffebld_constant_new_logical2_val (ffetargetLogical2 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_logical2_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL2", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL2; - nc->u.logical2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_logical2_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_logical2 (val, ffebld_constant_logical2 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL2", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL2; - nc->u.logical2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_logical3_val -- Return a logical3 constant object - - See prototype. */ - -#if FFETARGET_okLOGICAL3 -ffebldConstant -ffebld_constant_new_logical3_val (ffetargetLogical3 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_logical3_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL3", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL3; - nc->u.logical3 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_logical3_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_logical3 (val, ffebld_constant_logical3 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL3", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL3; - nc->u.logical3 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_logical4_val -- Return a logical4 constant object - - See prototype. */ - -#if FFETARGET_okLOGICAL4 -ffebldConstant -ffebld_constant_new_logical4_val (ffetargetLogical4 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_logical4_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL4", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL4; - nc->u.logical4 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_logical4_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_logical4 (val, ffebld_constant_logical4 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constLOGICAL4", - sizeof (*nc)); - nc->consttype = FFEBLD_constLOGICAL4; - nc->u.logical4 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_real1 -- Return real1 constant object from token - - See prototype. */ - -#if FFETARGET_okREAL1 -ffebldConstant -ffebld_constant_new_real1 (ffelexToken integer, ffelexToken decimal, - ffelexToken fraction, ffelexToken exponent, ffelexToken exponent_sign, - ffelexToken exponent_digits) -{ - ffetargetReal1 val; - - ffetarget_real1 (&val, - integer, decimal, fraction, exponent, exponent_sign, exponent_digits); - return ffebld_constant_new_real1_val (val); -} - -#endif -/* ffebld_constant_new_real1_val -- Return an real1 constant object - - See prototype. */ - -#if FFETARGET_okREAL1 -ffebldConstant -ffebld_constant_new_real1_val (ffetargetReal1 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_real1_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constREAL1", - sizeof (*nc)); - nc->consttype = FFEBLD_constREAL1; - nc->u.real1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_real1_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_real1 (val, ffebld_constant_real1 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constREAL1", - sizeof (*nc)); - nc->consttype = FFEBLD_constREAL1; - nc->u.real1 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_real2 -- Return real2 constant object from token - - See prototype. */ - -#if FFETARGET_okREAL2 -ffebldConstant -ffebld_constant_new_real2 (ffelexToken integer, ffelexToken decimal, - ffelexToken fraction, ffelexToken exponent, ffelexToken exponent_sign, - ffelexToken exponent_digits) -{ - ffetargetReal2 val; - - ffetarget_real2 (&val, - integer, decimal, fraction, exponent, exponent_sign, exponent_digits); - return ffebld_constant_new_real2_val (val); -} - -#endif -/* ffebld_constant_new_real2_val -- Return an real2 constant object - - See prototype. */ - -#if FFETARGET_okREAL2 -ffebldConstant -ffebld_constant_new_real2_val (ffetargetReal2 val) -{ - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_real2_; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constREAL2", - sizeof (*nc)); - nc->consttype = FFEBLD_constREAL2; - nc->u.real2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_real2_ = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_real2 (val, ffebld_constant_real2 (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constREAL2", - sizeof (*nc)); - nc->consttype = FFEBLD_constREAL2; - nc->u.real2 = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -#endif -/* ffebld_constant_new_typeless_bm -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_bm (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_binarymil (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constBINARY_MIL, val); -} - -/* ffebld_constant_new_typeless_bv -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_bv (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_binaryvxt (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constBINARY_VXT, val); -} - -/* ffebld_constant_new_typeless_hxm -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_hxm (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_hexxmil (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constHEX_X_MIL, val); -} - -/* ffebld_constant_new_typeless_hxv -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_hxv (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_hexxvxt (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constHEX_X_VXT, val); -} - -/* ffebld_constant_new_typeless_hzm -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_hzm (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_hexzmil (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constHEX_Z_MIL, val); -} - -/* ffebld_constant_new_typeless_hzv -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_hzv (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_hexzvxt (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constHEX_Z_VXT, val); -} - -/* ffebld_constant_new_typeless_om -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_om (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_octalmil (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constOCTAL_MIL, val); -} - -/* ffebld_constant_new_typeless_ov -- Return typeless constant object from token - - See prototype. - - Parses the token as a decimal integer constant, thus it must be an - FFELEX_typeNUMBER. */ - -ffebldConstant -ffebld_constant_new_typeless_ov (ffelexToken t) -{ - ffetargetTypeless val; - - ffetarget_octalvxt (&val, t); - return ffebld_constant_new_typeless_val (FFEBLD_constOCTAL_VXT, val); -} - -/* ffebld_constant_new_typeless_val -- Return a typeless constant object - - See prototype. */ - -ffebldConstant -ffebld_constant_new_typeless_val (ffebldConst type, ffetargetTypeless val) -{ - - ffebldConstant nc; - ffebldConstant P; - ffebldConstant Q; - int cmp = 0; - P = ffebld_constant_typeless_[type - - FFEBLD_constTYPELESS_FIRST]; - Q = P; - if (!P) - { - /* make this node the root */ - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constTYPELESS", - sizeof (*nc)); - nc->consttype = type; - nc->u.typeless = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - ffebld_constant_typeless_[type- FFEBLD_constTYPELESS_FIRST] = nc; - return nc; - } - else - while (P) - { - Q = P; - cmp = ffetarget_cmp_typeless (val, ffebld_constant_typeless (P)); - if (cmp > 0) - P = P->llink; - else if (cmp < 0) - P = P->rlink; - else - return P; - } - - nc = malloc_new_kp (ffebld_constant_pool(), - "FFEBLD_constTYPELESS", - sizeof (*nc)); - nc->consttype = type; - nc->u.typeless = val; - nc->hook = FFECOM_constantNULL; - nc->llink = NULL; - nc->rlink = NULL; - - if (cmp < 0) - Q->llink = nc; - else - Q->rlink = nc; - return nc; -} - -/* ffebld_constantarray_get -- Get a value from an array of constants - - See prototype. */ - -ffebldConstantUnion -ffebld_constantarray_get (ffebldConstantArray array, ffeinfoBasictype bt, - ffeinfoKindtype kt, ffetargetOffset offset) -{ - ffebldConstantUnion u; - - switch (bt) - { - case FFEINFO_basictypeINTEGER: - switch (kt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - u.integer1 = *(array.integer1 + offset); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - u.integer2 = *(array.integer2 + offset); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - u.integer3 = *(array.integer3 + offset); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - u.integer4 = *(array.integer4 + offset); - break; -#endif - - default: - assert ("bad INTEGER kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - u.logical1 = *(array.logical1 + offset); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - u.logical2 = *(array.logical2 + offset); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - u.logical3 = *(array.logical3 + offset); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - u.logical4 = *(array.logical4 + offset); - break; -#endif - - default: - assert ("bad LOGICAL kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - u.real1 = *(array.real1 + offset); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - u.real2 = *(array.real2 + offset); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - u.real3 = *(array.real3 + offset); - break; -#endif - - default: - assert ("bad REAL kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - u.complex1 = *(array.complex1 + offset); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - u.complex2 = *(array.complex2 + offset); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - u.complex3 = *(array.complex3 + offset); - break; -#endif - - default: - assert ("bad COMPLEX kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (kt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - u.character1.length = 1; - u.character1.text = array.character1 + offset; - break; -#endif - - default: - assert ("bad CHARACTER kindtype" == NULL); - break; - } - break; - - default: - assert ("bad basictype" == NULL); - break; - } - - return u; -} - -/* ffebld_constantarray_new -- Make an array of constants - - See prototype. */ - -ffebldConstantArray -ffebld_constantarray_new (ffeinfoBasictype bt, - ffeinfoKindtype kt, ffetargetOffset size) -{ - ffebldConstantArray ptr; - - switch (bt) - { - case FFEINFO_basictypeINTEGER: - switch (kt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - ptr.integer1 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetInteger1), - 0); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - ptr.integer2 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetInteger2), - 0); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - ptr.integer3 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetInteger3), - 0); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - ptr.integer4 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetInteger4), - 0); - break; -#endif - - default: - assert ("bad INTEGER kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - ptr.logical1 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetLogical1), - 0); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - ptr.logical2 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetLogical2), - 0); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - ptr.logical3 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetLogical3), - 0); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - ptr.logical4 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetLogical4), - 0); - break; -#endif - - default: - assert ("bad LOGICAL kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - ptr.real1 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetReal1), - 0); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - ptr.real2 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetReal2), - 0); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - ptr.real3 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetReal3), - 0); - break; -#endif - - default: - assert ("bad REAL kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - ptr.complex1 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetComplex1), - 0); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - ptr.complex2 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetComplex2), - 0); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - ptr.complex3 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size *= sizeof (ffetargetComplex3), - 0); - break; -#endif - - default: - assert ("bad COMPLEX kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (kt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - ptr.character1 = malloc_new_zkp (ffebld_constant_pool(), - "ffebldConstantArray", - size - *= sizeof (ffetargetCharacterUnit1), - 0); - break; -#endif - - default: - assert ("bad CHARACTER kindtype" == NULL); - break; - } - break; - - default: - assert ("bad basictype" == NULL); - break; - } - - return ptr; -} - -/* ffebld_constantarray_preparray -- Prepare for copy between arrays - - See prototype. - - Like _prepare, but the source is an array instead of a single-value - constant. */ - -void -ffebld_constantarray_preparray (void **aptr, void **cptr, size_t *size, - ffebldConstantArray array, ffeinfoBasictype abt, ffeinfoKindtype akt, - ffetargetOffset offset, ffebldConstantArray source_array, - ffeinfoBasictype cbt, ffeinfoKindtype ckt) -{ - switch (abt) - { - case FFEINFO_basictypeINTEGER: - switch (akt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - *aptr = array.integer1 + offset; - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - *aptr = array.integer2 + offset; - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - *aptr = array.integer3 + offset; - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - *aptr = array.integer4 + offset; - break; -#endif - - default: - assert ("bad INTEGER akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (akt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - *aptr = array.logical1 + offset; - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - *aptr = array.logical2 + offset; - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - *aptr = array.logical3 + offset; - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - *aptr = array.logical4 + offset; - break; -#endif - - default: - assert ("bad LOGICAL akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (akt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - *aptr = array.real1 + offset; - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - *aptr = array.real2 + offset; - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - *aptr = array.real3 + offset; - break; -#endif - - default: - assert ("bad REAL akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (akt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - *aptr = array.complex1 + offset; - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - *aptr = array.complex2 + offset; - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - *aptr = array.complex3 + offset; - break; -#endif - - default: - assert ("bad COMPLEX akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (akt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - *aptr = array.character1 + offset; - break; -#endif - - default: - assert ("bad CHARACTER akindtype" == NULL); - break; - } - break; - - default: - assert ("bad abasictype" == NULL); - break; - } - - switch (cbt) - { - case FFEINFO_basictypeINTEGER: - switch (ckt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - *cptr = source_array.integer1; - *size = sizeof (*source_array.integer1); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - *cptr = source_array.integer2; - *size = sizeof (*source_array.integer2); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - *cptr = source_array.integer3; - *size = sizeof (*source_array.integer3); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - *cptr = source_array.integer4; - *size = sizeof (*source_array.integer4); - break; -#endif - - default: - assert ("bad INTEGER ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (ckt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - *cptr = source_array.logical1; - *size = sizeof (*source_array.logical1); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - *cptr = source_array.logical2; - *size = sizeof (*source_array.logical2); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - *cptr = source_array.logical3; - *size = sizeof (*source_array.logical3); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - *cptr = source_array.logical4; - *size = sizeof (*source_array.logical4); - break; -#endif - - default: - assert ("bad LOGICAL ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ckt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - *cptr = source_array.real1; - *size = sizeof (*source_array.real1); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - *cptr = source_array.real2; - *size = sizeof (*source_array.real2); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - *cptr = source_array.real3; - *size = sizeof (*source_array.real3); - break; -#endif - - default: - assert ("bad REAL ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ckt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - *cptr = source_array.complex1; - *size = sizeof (*source_array.complex1); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - *cptr = source_array.complex2; - *size = sizeof (*source_array.complex2); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - *cptr = source_array.complex3; - *size = sizeof (*source_array.complex3); - break; -#endif - - default: - assert ("bad COMPLEX ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ckt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - *cptr = source_array.character1; - *size = sizeof (*source_array.character1); - break; -#endif - - default: - assert ("bad CHARACTER ckindtype" == NULL); - break; - } - break; - - default: - assert ("bad cbasictype" == NULL); - break; - } -} - -/* ffebld_constantarray_prepare -- Prepare for copy between value and array - - See prototype. - - Like _put, but just returns the pointers to the beginnings of the - array and the constant and returns the size (the amount of info to - copy). The idea is that the caller can use memcpy to accomplish the - same thing as _put (though slower), or the caller can use a different - function that swaps bytes, words, etc for a different target machine. - Also, the type of the array may be different from the type of the - constant; the array type is used to determine the meaning (scale) of - the offset field (to calculate the array pointer), the constant type is - used to determine the constant pointer and the size (amount of info to - copy). */ - -void -ffebld_constantarray_prepare (void **aptr, void **cptr, size_t *size, - ffebldConstantArray array, ffeinfoBasictype abt, ffeinfoKindtype akt, - ffetargetOffset offset, ffebldConstantUnion *constant, - ffeinfoBasictype cbt, ffeinfoKindtype ckt) -{ - switch (abt) - { - case FFEINFO_basictypeINTEGER: - switch (akt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - *aptr = array.integer1 + offset; - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - *aptr = array.integer2 + offset; - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - *aptr = array.integer3 + offset; - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - *aptr = array.integer4 + offset; - break; -#endif - - default: - assert ("bad INTEGER akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (akt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - *aptr = array.logical1 + offset; - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - *aptr = array.logical2 + offset; - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - *aptr = array.logical3 + offset; - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - *aptr = array.logical4 + offset; - break; -#endif - - default: - assert ("bad LOGICAL akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (akt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - *aptr = array.real1 + offset; - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - *aptr = array.real2 + offset; - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - *aptr = array.real3 + offset; - break; -#endif - - default: - assert ("bad REAL akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (akt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - *aptr = array.complex1 + offset; - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - *aptr = array.complex2 + offset; - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - *aptr = array.complex3 + offset; - break; -#endif - - default: - assert ("bad COMPLEX akindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (akt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - *aptr = array.character1 + offset; - break; -#endif - - default: - assert ("bad CHARACTER akindtype" == NULL); - break; - } - break; - - default: - assert ("bad abasictype" == NULL); - break; - } - - switch (cbt) - { - case FFEINFO_basictypeINTEGER: - switch (ckt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - *cptr = &constant->integer1; - *size = sizeof (constant->integer1); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - *cptr = &constant->integer2; - *size = sizeof (constant->integer2); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - *cptr = &constant->integer3; - *size = sizeof (constant->integer3); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - *cptr = &constant->integer4; - *size = sizeof (constant->integer4); - break; -#endif - - default: - assert ("bad INTEGER ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (ckt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - *cptr = &constant->logical1; - *size = sizeof (constant->logical1); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - *cptr = &constant->logical2; - *size = sizeof (constant->logical2); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - *cptr = &constant->logical3; - *size = sizeof (constant->logical3); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - *cptr = &constant->logical4; - *size = sizeof (constant->logical4); - break; -#endif - - default: - assert ("bad LOGICAL ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ckt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - *cptr = &constant->real1; - *size = sizeof (constant->real1); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - *cptr = &constant->real2; - *size = sizeof (constant->real2); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - *cptr = &constant->real3; - *size = sizeof (constant->real3); - break; -#endif - - default: - assert ("bad REAL ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ckt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - *cptr = &constant->complex1; - *size = sizeof (constant->complex1); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - *cptr = &constant->complex2; - *size = sizeof (constant->complex2); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - *cptr = &constant->complex3; - *size = sizeof (constant->complex3); - break; -#endif - - default: - assert ("bad COMPLEX ckindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ckt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - *cptr = ffetarget_text_character1 (constant->character1); - *size = ffetarget_length_character1 (constant->character1); - break; -#endif - - default: - assert ("bad CHARACTER ckindtype" == NULL); - break; - } - break; - - default: - assert ("bad cbasictype" == NULL); - break; - } -} - -/* ffebld_constantarray_put -- Put a value into an array of constants - - See prototype. */ - -void -ffebld_constantarray_put (ffebldConstantArray array, ffeinfoBasictype bt, - ffeinfoKindtype kt, ffetargetOffset offset, ffebldConstantUnion constant) -{ - switch (bt) - { - case FFEINFO_basictypeINTEGER: - switch (kt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - *(array.integer1 + offset) = constant.integer1; - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - *(array.integer2 + offset) = constant.integer2; - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - *(array.integer3 + offset) = constant.integer3; - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - *(array.integer4 + offset) = constant.integer4; - break; -#endif - - default: - assert ("bad INTEGER kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - *(array.logical1 + offset) = constant.logical1; - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - *(array.logical2 + offset) = constant.logical2; - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - *(array.logical3 + offset) = constant.logical3; - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - *(array.logical4 + offset) = constant.logical4; - break; -#endif - - default: - assert ("bad LOGICAL kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - *(array.real1 + offset) = constant.real1; - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - *(array.real2 + offset) = constant.real2; - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - *(array.real3 + offset) = constant.real3; - break; -#endif - - default: - assert ("bad REAL kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - *(array.complex1 + offset) = constant.complex1; - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - *(array.complex2 + offset) = constant.complex2; - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - *(array.complex3 + offset) = constant.complex3; - break; -#endif - - default: - assert ("bad COMPLEX kindtype" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (kt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - memcpy (array.character1 + offset, - ffetarget_text_character1 (constant.character1), - ffetarget_length_character1 (constant.character1)); - break; -#endif - - default: - assert ("bad CHARACTER kindtype" == NULL); - break; - } - break; - - default: - assert ("bad basictype" == NULL); - break; - } -} - -/* ffebld_init_0 -- Initialize the module - - ffebld_init_0(); */ - -void -ffebld_init_0 (void) -{ - assert (FFEBLD_op == ARRAY_SIZE (ffebld_op_string_)); - assert (FFEBLD_op == ARRAY_SIZE (ffebld_arity_op_)); -} - -/* ffebld_init_1 -- Initialize the module for a file - - ffebld_init_1(); */ - -void -ffebld_init_1 (void) -{ -#if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstFILE_ - int i; - -#if FFETARGET_okCHARACTER1 - ffebld_constant_character1_ = NULL; -#endif -#if FFETARGET_okCOMPLEX1 - ffebld_constant_complex1_ = NULL; -#endif -#if FFETARGET_okCOMPLEX2 - ffebld_constant_complex2_ = NULL; -#endif -#if FFETARGET_okCOMPLEX3 - ffebld_constant_complex3_ = NULL; -#endif -#if FFETARGET_okINTEGER1 - ffebld_constant_integer1_ = NULL; -#endif -#if FFETARGET_okINTEGER2 - ffebld_constant_integer2_ = NULL; -#endif -#if FFETARGET_okINTEGER3 - ffebld_constant_integer3_ = NULL; -#endif -#if FFETARGET_okINTEGER4 - ffebld_constant_integer4_ = NULL; -#endif -#if FFETARGET_okLOGICAL1 - ffebld_constant_logical1_ = NULL; -#endif -#if FFETARGET_okLOGICAL2 - ffebld_constant_logical2_ = NULL; -#endif -#if FFETARGET_okLOGICAL3 - ffebld_constant_logical3_ = NULL; -#endif -#if FFETARGET_okLOGICAL4 - ffebld_constant_logical4_ = NULL; -#endif -#if FFETARGET_okREAL1 - ffebld_constant_real1_ = NULL; -#endif -#if FFETARGET_okREAL2 - ffebld_constant_real2_ = NULL; -#endif -#if FFETARGET_okREAL3 - ffebld_constant_real3_ = NULL; -#endif - ffebld_constant_hollerith_ = NULL; - for (i = FFEBLD_constTYPELESS_FIRST; i <= FFEBLD_constTYPELESS_LAST; ++i) - ffebld_constant_typeless_[i - FFEBLD_constTYPELESS_FIRST] = NULL; -#endif -} - -/* ffebld_init_2 -- Initialize the module - - ffebld_init_2(); */ - -void -ffebld_init_2 (void) -{ -#if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstPROGUNIT_ - int i; -#endif - - ffebld_pool_stack_.next = NULL; - ffebld_pool_stack_.pool = ffe_pool_program_unit (); -#if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstPROGUNIT_ -#if FFETARGET_okCHARACTER1 - ffebld_constant_character1_ = NULL; -#endif -#if FFETARGET_okCOMPLEX1 - ffebld_constant_complex1_ = NULL; -#endif -#if FFETARGET_okCOMPLEX2 - ffebld_constant_complex2_ = NULL; -#endif -#if FFETARGET_okCOMPLEX3 - ffebld_constant_complex3_ = NULL; -#endif -#if FFETARGET_okINTEGER1 - ffebld_constant_integer1_ = NULL; -#endif -#if FFETARGET_okINTEGER2 - ffebld_constant_integer2_ = NULL; -#endif -#if FFETARGET_okINTEGER3 - ffebld_constant_integer3_ = NULL; -#endif -#if FFETARGET_okINTEGER4 - ffebld_constant_integer4_ = NULL; -#endif -#if FFETARGET_okLOGICAL1 - ffebld_constant_logical1_ = NULL; -#endif -#if FFETARGET_okLOGICAL2 - ffebld_constant_logical2_ = NULL; -#endif -#if FFETARGET_okLOGICAL3 - ffebld_constant_logical3_ = NULL; -#endif -#if FFETARGET_okLOGICAL4 - ffebld_constant_logical4_ = NULL; -#endif -#if FFETARGET_okREAL1 - ffebld_constant_real1_ = NULL; -#endif -#if FFETARGET_okREAL2 - ffebld_constant_real2_ = NULL; -#endif -#if FFETARGET_okREAL3 - ffebld_constant_real3_ = NULL; -#endif - ffebld_constant_hollerith_ = NULL; - for (i = FFEBLD_constTYPELESS_FIRST; i <= FFEBLD_constTYPELESS_LAST; ++i) - ffebld_constant_typeless_[i - FFEBLD_constTYPELESS_FIRST] = NULL; -#endif -} - -/* ffebld_list_length -- Return # of opITEMs in list - - ffebld list; // Must be NULL or opITEM - ffebldListLength length; - length = ffebld_list_length(list); - - Returns 0 if list is NULL, 1 if it's ffebld_trail is NULL, and so on. */ - -ffebldListLength -ffebld_list_length (ffebld list) -{ - ffebldListLength length; - - for (length = 0; list != NULL; ++length, list = ffebld_trail (list)) - ; - - return length; -} - -/* ffebld_new_accter -- Create an ffebld object that is an array - - ffebld x; - ffebldConstantArray a; - ffebit b; - x = ffebld_new_accter(a,b); */ - -ffebld -ffebld_new_accter (ffebldConstantArray a, ffebit b) -{ - ffebld x; - - x = ffebld_new (); - x->op = FFEBLD_opACCTER; - x->u.accter.array = a; - x->u.accter.bits = b; - x->u.accter.pad = 0; - return x; -} - -/* ffebld_new_arrter -- Create an ffebld object that is an array - - ffebld x; - ffebldConstantArray a; - ffetargetOffset size; - x = ffebld_new_arrter(a,size); */ - -ffebld -ffebld_new_arrter (ffebldConstantArray a, ffetargetOffset size) -{ - ffebld x; - - x = ffebld_new (); - x->op = FFEBLD_opARRTER; - x->u.arrter.array = a; - x->u.arrter.size = size; - x->u.arrter.pad = 0; - return x; -} - -/* ffebld_new_conter_with_orig -- Create an ffebld object that is a constant - - ffebld x; - ffebldConstant c; - x = ffebld_new_conter_with_orig(c,NULL); */ - -ffebld -ffebld_new_conter_with_orig (ffebldConstant c, ffebld o) -{ - ffebld x; - - x = ffebld_new (); - x->op = FFEBLD_opCONTER; - x->u.conter.expr = c; - x->u.conter.orig = o; - x->u.conter.pad = 0; - return x; -} - -/* ffebld_new_item -- Create an ffebld item object - - ffebld x,y,z; - x = ffebld_new_item(y,z); */ - -ffebld -ffebld_new_item (ffebld head, ffebld trail) -{ - ffebld x; - - x = ffebld_new (); - x->op = FFEBLD_opITEM; - x->u.item.head = head; - x->u.item.trail = trail; - return x; -} - -/* ffebld_new_labter -- Create an ffebld object that is a label - - ffebld x; - ffelab l; - x = ffebld_new_labter(c); */ - -ffebld -ffebld_new_labter (ffelab l) -{ - ffebld x; - - x = ffebld_new (); - x->op = FFEBLD_opLABTER; - x->u.labter = l; - return x; -} - -/* ffebld_new_labtok -- Create object that is a label's NUMBER token - - ffebld x; - ffelexToken t; - x = ffebld_new_labter(c); - - Like the other ffebld_new_ functions, the - supplied argument is stored exactly as is: ffelex_token_use is NOT - called, so the token is "consumed", if one is indeed supplied (it may - be NULL). */ - -ffebld -ffebld_new_labtok (ffelexToken t) -{ - ffebld x; - - x = ffebld_new (); - x->op = FFEBLD_opLABTOK; - x->u.labtok = t; - return x; -} - -/* ffebld_new_none -- Create an ffebld object with no arguments - - ffebld x; - x = ffebld_new_none(FFEBLD_opWHATEVER); */ - -ffebld -ffebld_new_none (ffebldOp o) -{ - ffebld x; - - x = ffebld_new (); - x->op = o; - return x; -} - -/* ffebld_new_one -- Create an ffebld object with one argument - - ffebld x,y; - x = ffebld_new_one(FFEBLD_opWHATEVER,y); */ - -ffebld -ffebld_new_one (ffebldOp o, ffebld left) -{ - ffebld x; - - x = ffebld_new (); - x->op = o; - x->u.nonter.left = left; - x->u.nonter.hook = FFECOM_nonterNULL; - return x; -} - -/* ffebld_new_symter -- Create an ffebld object that is a symbol - - ffebld x; - ffesymbol s; - ffeintrinGen gen; // Generic intrinsic id, if any - ffeintrinSpec spec; // Specific intrinsic id, if any - ffeintrinImp imp; // Implementation intrinsic id, if any - x = ffebld_new_symter (s, gen, spec, imp); */ - -ffebld -ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec, - ffeintrinImp imp) -{ - ffebld x; - - x = ffebld_new (); - x->op = FFEBLD_opSYMTER; - x->u.symter.symbol = s; - x->u.symter.generic = gen; - x->u.symter.specific = spec; - x->u.symter.implementation = imp; - x->u.symter.do_iter = FALSE; - return x; -} - -/* ffebld_new_two -- Create an ffebld object with two arguments - - ffebld x,y,z; - x = ffebld_new_two(FFEBLD_opWHATEVER,y,z); */ - -ffebld -ffebld_new_two (ffebldOp o, ffebld left, ffebld right) -{ - ffebld x; - - x = ffebld_new (); - x->op = o; - x->u.nonter.left = left; - x->u.nonter.right = right; - x->u.nonter.hook = FFECOM_nonterNULL; - return x; -} - -/* ffebld_pool_pop -- Pop ffebld's pool stack - - ffebld_pool_pop(); */ - -void -ffebld_pool_pop (void) -{ - ffebldPoolstack_ ps; - - assert (ffebld_pool_stack_.next != NULL); - ps = ffebld_pool_stack_.next; - ffebld_pool_stack_.next = ps->next; - ffebld_pool_stack_.pool = ps->pool; - malloc_kill_ks (malloc_pool_image (), ps, sizeof (*ps)); -} - -/* ffebld_pool_push -- Push ffebld's pool stack - - ffebld_pool_push(); */ - -void -ffebld_pool_push (mallocPool pool) -{ - ffebldPoolstack_ ps; - - ps = malloc_new_ks (malloc_pool_image (), "Pool stack", sizeof (*ps)); - ps->next = ffebld_pool_stack_.next; - ps->pool = ffebld_pool_stack_.pool; - ffebld_pool_stack_.next = ps; - ffebld_pool_stack_.pool = pool; -} - -/* ffebld_op_string -- Return short string describing op - - ffebldOp o; - ffebld_op_string(o); - - Returns a short string (uppercase) containing the name of the op. */ - -const char * -ffebld_op_string (ffebldOp o) -{ - if (o >= ARRAY_SIZE (ffebld_op_string_)) - return "?\?\?"; - return ffebld_op_string_[o]; -} - -/* ffebld_size_max -- Return maximum possible size of CHARACTER-type expr - - ffetargetCharacterSize sz; - ffebld b; - sz = ffebld_size_max (b); - - Like ffebld_size_known, but if that would return NONE and the expression - is opSUBSTR, opCONVERT, opPAREN, or opCONCATENATE, returns ffebld_size_max - of the subexpression(s). */ - -ffetargetCharacterSize -ffebld_size_max (ffebld b) -{ - ffetargetCharacterSize sz; - -recurse: /* :::::::::::::::::::: */ - - sz = ffebld_size_known (b); - - if (sz != FFETARGET_charactersizeNONE) - return sz; - - switch (ffebld_op (b)) - { - case FFEBLD_opSUBSTR: - case FFEBLD_opCONVERT: - case FFEBLD_opPAREN: - b = ffebld_left (b); - goto recurse; /* :::::::::::::::::::: */ - - case FFEBLD_opCONCATENATE: - sz = ffebld_size_max (ffebld_left (b)) - + ffebld_size_max (ffebld_right (b)); - return sz; - - default: - return sz; - } -} diff --git a/contrib/gcc/f/bld.h b/contrib/gcc/f/bld.h deleted file mode 100644 index 900b5de..0000000 --- a/contrib/gcc/f/bld.h +++ /dev/null @@ -1,748 +0,0 @@ -/* bld.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - bld.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_BLD_H -#define GCC_F_BLD_H - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFEBLD_constNONE, - FFEBLD_constINTEGER1, - FFEBLD_constINTEGER2, - FFEBLD_constINTEGER3, - FFEBLD_constINTEGER4, - FFEBLD_constINTEGER5, - FFEBLD_constINTEGER6, - FFEBLD_constINTEGER7, - FFEBLD_constINTEGER8, - FFEBLD_constLOGICAL1, - FFEBLD_constLOGICAL2, - FFEBLD_constLOGICAL3, - FFEBLD_constLOGICAL4, - FFEBLD_constLOGICAL5, - FFEBLD_constLOGICAL6, - FFEBLD_constLOGICAL7, - FFEBLD_constLOGICAL8, - FFEBLD_constREAL1, - FFEBLD_constREAL2, - FFEBLD_constREAL3, - FFEBLD_constREAL4, - FFEBLD_constREAL5, - FFEBLD_constREAL6, - FFEBLD_constREAL7, - FFEBLD_constREAL8, - FFEBLD_constCOMPLEX1, - FFEBLD_constCOMPLEX2, - FFEBLD_constCOMPLEX3, - FFEBLD_constCOMPLEX4, - FFEBLD_constCOMPLEX5, - FFEBLD_constCOMPLEX6, - FFEBLD_constCOMPLEX7, - FFEBLD_constCOMPLEX8, - FFEBLD_constCHARACTER1, - FFEBLD_constCHARACTER2, - FFEBLD_constCHARACTER3, - FFEBLD_constCHARACTER4, - FFEBLD_constCHARACTER5, - FFEBLD_constCHARACTER6, - FFEBLD_constCHARACTER7, - FFEBLD_constCHARACTER8, - FFEBLD_constHOLLERITH, - FFEBLD_constTYPELESS_FIRST, - FFEBLD_constBINARY_MIL = FFEBLD_constTYPELESS_FIRST, - FFEBLD_constBINARY_VXT, - FFEBLD_constOCTAL_MIL, - FFEBLD_constOCTAL_VXT, - FFEBLD_constHEX_X_MIL, - FFEBLD_constHEX_X_VXT, - FFEBLD_constHEX_Z_MIL, - FFEBLD_constHEX_Z_VXT, - FFEBLD_constTYPELESS_LAST = FFEBLD_constHEX_Z_VXT, - FFEBLD_const - } ffebldConst; - -typedef enum - { -#define FFEBLD_OP(KWD,NAME,ARITY) KWD, -#include "bld-op.def" -#undef FFEBLD_OP - FFEBLD_op - } ffebldOp; - -/* Typedefs. */ - -typedef struct _ffebld_ *ffebld; -typedef unsigned char ffebldArity; -typedef union _ffebld_constant_array_ ffebldConstantArray; -typedef struct _ffebld_constant_ *ffebldConstant; -typedef union _ffebld_constant_union_ ffebldConstantUnion; -typedef ffebld *ffebldListBottom; -typedef unsigned int ffebldListLength; -#define ffebldListLength_f "" -typedef struct _ffebld_pool_stack_ *ffebldPoolstack_; - -/* Include files needed by this one. */ - -#include "bit.h" -#include "com.h" -#include "info.h" -#include "intrin.h" -#include "lab.h" -#include "lex.h" -#include "malloc.h" -#include "symbol.h" -#include "target.h" - -#define FFEBLD_whereconstPROGUNIT_ 1 -#define FFEBLD_whereconstFILE_ 2 - -#define FFEBLD_whereconstCURRENT_ FFEBLD_whereconstFILE_ - -/* Structure definitions. */ - -#define FFEBLD_constINTEGERDEFAULT FFEBLD_constINTEGER1 -#define FFEBLD_constLOGICALDEFAULT FFEBLD_constLOGICAL1 -#define FFEBLD_constREALDEFAULT FFEBLD_constREAL1 -#define FFEBLD_constREALDOUBLE FFEBLD_constREAL2 -#define FFEBLD_constREALQUAD FFEBLD_constREAL3 -#define FFEBLD_constCOMPLEX FFEBLD_constCOMPLEX1 -#define FFEBLD_constCOMPLEXDOUBLE FFEBLD_constCOMPLEX2 -#define FFEBLD_constCOMPLEXQUAD FFEBLD_constCOMPLEX3 -#define FFEBLD_constCHARACTERDEFAULT FFEBLD_constCHARACTER1 - -union _ffebld_constant_union_ - { - ffetargetTypeless typeless; - ffetargetHollerith hollerith; -#if FFETARGET_okINTEGER1 - ffetargetInteger1 integer1; -#endif -#if FFETARGET_okINTEGER2 - ffetargetInteger2 integer2; -#endif -#if FFETARGET_okINTEGER3 - ffetargetInteger3 integer3; -#endif -#if FFETARGET_okINTEGER4 - ffetargetInteger4 integer4; -#endif -#if FFETARGET_okLOGICAL1 - ffetargetLogical1 logical1; -#endif -#if FFETARGET_okLOGICAL2 - ffetargetLogical2 logical2; -#endif -#if FFETARGET_okLOGICAL3 - ffetargetLogical3 logical3; -#endif -#if FFETARGET_okLOGICAL4 - ffetargetLogical4 logical4; -#endif -#if FFETARGET_okREAL1 - ffetargetReal1 real1; -#endif -#if FFETARGET_okREAL2 - ffetargetReal2 real2; -#endif -#if FFETARGET_okREAL3 - ffetargetReal3 real3; -#endif -#if FFETARGET_okCOMPLEX1 - ffetargetComplex1 complex1; -#endif -#if FFETARGET_okCOMPLEX2 - ffetargetComplex2 complex2; -#endif -#if FFETARGET_okCOMPLEX3 - ffetargetComplex3 complex3; -#endif -#if FFETARGET_okCHARACTER1 - ffetargetCharacter1 character1; -#endif - }; - -union _ffebld_constant_array_ - { -#if FFETARGET_okINTEGER1 - ffetargetInteger1 *integer1; -#endif -#if FFETARGET_okINTEGER2 - ffetargetInteger2 *integer2; -#endif -#if FFETARGET_okINTEGER3 - ffetargetInteger3 *integer3; -#endif -#if FFETARGET_okINTEGER4 - ffetargetInteger4 *integer4; -#endif -#if FFETARGET_okLOGICAL1 - ffetargetLogical1 *logical1; -#endif -#if FFETARGET_okLOGICAL2 - ffetargetLogical2 *logical2; -#endif -#if FFETARGET_okLOGICAL3 - ffetargetLogical3 *logical3; -#endif -#if FFETARGET_okLOGICAL4 - ffetargetLogical4 *logical4; -#endif -#if FFETARGET_okREAL1 - ffetargetReal1 *real1; -#endif -#if FFETARGET_okREAL2 - ffetargetReal2 *real2; -#endif -#if FFETARGET_okREAL3 - ffetargetReal3 *real3; -#endif -#if FFETARGET_okCOMPLEX1 - ffetargetComplex1 *complex1; -#endif -#if FFETARGET_okCOMPLEX2 - ffetargetComplex2 *complex2; -#endif -#if FFETARGET_okCOMPLEX3 - ffetargetComplex3 *complex3; -#endif -#if FFETARGET_okCHARACTER1 - ffetargetCharacterUnit1 *character1; -#endif - }; - -struct _ffebld_ - { - ffebldOp op; - ffeinfo info; /* Not used or valid for - op=={STAR,ITEM,BOUNDS,REPEAT,LABTER, - LABTOK,IMPDO}. */ - union - { - struct - { - ffebld left; - ffebld right; - ffecomNonter hook; /* Whatever the compiler/backend wants! */ - } - nonter; - struct - { - ffebld head; - ffebld trail; - } - item; - struct - { - ffebldConstant expr; - ffebld orig; /* Original expression, or NULL if none. */ - ffetargetAlign pad; /* Initial padding (for DATA, etc.). */ - } - conter; - struct - { - ffebldConstantArray array; - ffetargetOffset size; - ffetargetAlign pad; /* Initial padding (for DATA, etc.). */ - } - arrter; - struct - { - ffebldConstantArray array; - ffebit bits; - ffetargetAlign pad; /* Initial padding (for DATA, etc.). */ - } - accter; - struct - { - ffesymbol symbol; - ffeintrinGen generic; /* Id for generic intrinsic. */ - ffeintrinSpec specific; /* Id for specific intrinsic. */ - ffeintrinImp implementation; /* Id for implementation. */ - bool do_iter; /* TRUE if this ref is a read-only ref by - definition (ref within DO loop using this - var as iterator). */ - } - symter; - ffelab labter; - ffelexToken labtok; - } - u; - }; - -struct _ffebld_constant_ - { - ffebldConstant rlink; - ffebldConstant llink; - ffebldConstant first_complex; /* First complex const with me as - real. */ - ffebldConst consttype; - ffecomConstant hook; /* Whatever the compiler/backend wants! */ - bool numeric; /* A numeric kind of constant. */ - ffebldConstantUnion u; - }; - -struct _ffebld_pool_stack_ - { - ffebldPoolstack_ next; - mallocPool pool; - }; - -/* Global objects accessed by users of this module. */ - -extern const ffebldArity ffebld_arity_op_[(int) FFEBLD_op]; -extern struct _ffebld_pool_stack_ ffebld_pool_stack_; - -/* Declare functions with prototypes. */ - -int ffebld_constant_cmp (ffebldConstant c1, ffebldConstant c2); -bool ffebld_constant_is_magical (ffebldConstant c); -bool ffebld_constant_is_zero (ffebldConstant c); -#if FFETARGET_okCHARACTER1 -ffebldConstant ffebld_constant_new_character1 (ffelexToken t); -ffebldConstant ffebld_constant_new_character1_val (ffetargetCharacter1 val); -#endif -#if FFETARGET_okCOMPLEX1 -ffebldConstant ffebld_constant_new_complex1 (ffebldConstant real, - ffebldConstant imaginary); -ffebldConstant ffebld_constant_new_complex1_val (ffetargetComplex1 val); -#endif -#if FFETARGET_okCOMPLEX2 -ffebldConstant ffebld_constant_new_complex2 (ffebldConstant real, - ffebldConstant imaginary); -ffebldConstant ffebld_constant_new_complex2_val (ffetargetComplex2 val); -#endif -#if FFETARGET_okCOMPLEX3 -ffebldConstant ffebld_constant_new_complex3 (ffebldConstant real, - ffebldConstant imaginary); -ffebldConstant ffebld_constant_new_complex3_val (ffetargetComplex3 val); -#endif -ffebldConstant ffebld_constant_new_hollerith (ffelexToken t); -ffebldConstant ffebld_constant_new_hollerith_val (ffetargetHollerith val); -#if FFETARGET_okINTEGER1 -ffebldConstant ffebld_constant_new_integer1 (ffelexToken t); -ffebldConstant ffebld_constant_new_integer1_val (ffetargetInteger1 val); -#endif -#if FFETARGET_okINTEGER2 -ffebldConstant ffebld_constant_new_integer2 (ffelexToken t); -ffebldConstant ffebld_constant_new_integer2_val (ffetargetInteger2 val); -#endif -#if FFETARGET_okINTEGER3 -ffebldConstant ffebld_constant_new_integer3 (ffelexToken t); -ffebldConstant ffebld_constant_new_integer3_val (ffetargetInteger3 val); -#endif -#if FFETARGET_okINTEGER4 -ffebldConstant ffebld_constant_new_integer4 (ffelexToken t); -ffebldConstant ffebld_constant_new_integer4_val (ffetargetInteger4 val); -#endif -ffebldConstant ffebld_constant_new_integerbinary (ffelexToken t); -ffebldConstant ffebld_constant_new_integerhex (ffelexToken t); -ffebldConstant ffebld_constant_new_integeroctal (ffelexToken t); -#if FFETARGET_okLOGICAL1 -ffebldConstant ffebld_constant_new_logical1 (bool truth); -ffebldConstant ffebld_constant_new_logical1_val (ffetargetLogical1 val); -#endif -#if FFETARGET_okLOGICAL2 -ffebldConstant ffebld_constant_new_logical2 (bool truth); -ffebldConstant ffebld_constant_new_logical2_val (ffetargetLogical2 val); -#endif -#if FFETARGET_okLOGICAL3 -ffebldConstant ffebld_constant_new_logical3 (bool truth); -ffebldConstant ffebld_constant_new_logical3_val (ffetargetLogical3 val); -#endif -#if FFETARGET_okLOGICAL4 -ffebldConstant ffebld_constant_new_logical4 (bool truth); -ffebldConstant ffebld_constant_new_logical4_val (ffetargetLogical4 val); -#endif -#if FFETARGET_okREAL1 -ffebldConstant ffebld_constant_new_real1 (ffelexToken integer, - ffelexToken decimal, ffelexToken fraction, ffelexToken exponent, - ffelexToken exponent_sign, ffelexToken exponent_digits); -ffebldConstant ffebld_constant_new_real1_val (ffetargetReal1 val); -#endif -#if FFETARGET_okREAL2 -ffebldConstant ffebld_constant_new_real2 (ffelexToken integer, - ffelexToken decimal, ffelexToken fraction, ffelexToken exponent, - ffelexToken exponent_sign, ffelexToken exponent_digits); -ffebldConstant ffebld_constant_new_real2_val (ffetargetReal2 val); -#endif -#if FFETARGET_okREAL3 -ffebldConstant ffebld_constant_new_real3 (ffelexToken integer, - ffelexToken decimal, ffelexToken fraction, ffelexToken exponent, - ffelexToken exponent_sign, ffelexToken exponent_digits); -ffebldConstant ffebld_constant_new_real3_val (ffetargetReal3 val); -#endif -ffebldConstant ffebld_constant_new_typeless_bm (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_bv (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_hxm (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_hxv (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_hzm (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_hzv (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_om (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_ov (ffelexToken t); -ffebldConstant ffebld_constant_new_typeless_val (ffebldConst type, - ffetargetTypeless val); -ffebldConstant ffebld_constant_negated (ffebldConstant c); -ffebldConstantUnion ffebld_constantarray_get (ffebldConstantArray array, - ffeinfoBasictype bt, ffeinfoKindtype kt, ffetargetOffset offset); -void ffebld_constantarray_kill (ffebldConstantArray array, ffeinfoBasictype bt, - ffeinfoKindtype kt, ffetargetOffset size); -ffebldConstantArray ffebld_constantarray_new (ffeinfoBasictype bt, - ffeinfoKindtype kt, ffetargetOffset size); -void ffebld_constantarray_prepare (void **aptr, void **cptr, size_t *size, - ffebldConstantArray array, ffeinfoBasictype abt, ffeinfoKindtype akt, - ffetargetOffset offset, ffebldConstantUnion *constant, - ffeinfoBasictype cbt, ffeinfoKindtype ckt); -void ffebld_constantarray_preparray (void **aptr, void **cptr, size_t *size, - ffebldConstantArray array, ffeinfoBasictype abt, ffeinfoKindtype akt, - ffetargetOffset offset, ffebldConstantArray source_array, - ffeinfoBasictype cbt, ffeinfoKindtype ckt); -void ffebld_constantarray_put (ffebldConstantArray array, ffeinfoBasictype bt, - ffeinfoKindtype kt, ffetargetOffset offset, ffebldConstantUnion constant); -void ffebld_init_0 (void); -void ffebld_init_1 (void); -void ffebld_init_2 (void); -ffebldListLength ffebld_list_length (ffebld l); -ffebld ffebld_new_accter (ffebldConstantArray array, ffebit b); -ffebld ffebld_new_arrter (ffebldConstantArray array, ffetargetOffset size); -ffebld ffebld_new_conter_with_orig (ffebldConstant c, ffebld orig); -ffebld ffebld_new_item (ffebld head, ffebld trail); -ffebld ffebld_new_labter (ffelab l); -ffebld ffebld_new_labtok (ffelexToken t); -ffebld ffebld_new_none (ffebldOp o); -ffebld ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec, - ffeintrinImp imp); -ffebld ffebld_new_one (ffebldOp o, ffebld left); -ffebld ffebld_new_two (ffebldOp o, ffebld left, ffebld right); -const char *ffebld_op_string (ffebldOp o); -void ffebld_pool_pop (void); -void ffebld_pool_push (mallocPool pool); -ffetargetCharacterSize ffebld_size_max (ffebld b); - -/* Define macros. */ - -#define ffebld_accter(b) ((b)->u.accter.array) -#define ffebld_accter_bits(b) ((b)->u.accter.bits) -#define ffebld_accter_pad(b) ((b)->u.accter.pad) -#define ffebld_accter_set_bits(b,bt) ((b)->u.accter.bits = (bt)) -#define ffebld_accter_set_pad(b,p) ((b)->u.accter.pad = (p)) -#define ffebld_accter_size(b) ffebit_size((b)->u.accter.bits) -#define ffebld_append_item(b,i) (**(b) = ffebld_new_item((i),NULL), \ - *(b) = &((**(b))->u.item.trail)) -#define ffebld_arity(b) ffebld_arity_op(ffebld_op(b)) -#define ffebld_arity_op(o) (ffebld_arity_op_[o]) -#define ffebld_arrter(b) ((b)->u.arrter.array) -#define ffebld_arrter_pad(b) ((b)->u.arrter.pad) -#define ffebld_arrter_set_pad(b,p) ((b)->u.arrter.pad = (p)) -#define ffebld_arrter_set_size(b,s) ((b)->u.arrter.size = (s)) -#define ffebld_arrter_size(b) ((b)->u.arrter.size) -#define ffebld_basictype(b) (ffeinfo_basictype (ffebld_info ((b)))) -#if FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstPROGUNIT_ -#define ffebld_constant_pool() ffe_pool_program_unit() -#elif FFEBLD_whereconstCURRENT_ == FFEBLD_whereconstFILE_ -#define ffebld_constant_pool() ffe_pool_file() -#else -#error -#endif -#define ffebld_constant_character1(c) ((c)->u.character1) -#define ffebld_constant_character2(c) ((c)->u.character2) -#define ffebld_constant_character3(c) ((c)->u.character3) -#define ffebld_constant_character4(c) ((c)->u.character4) -#define ffebld_constant_character5(c) ((c)->u.character5) -#define ffebld_constant_character6(c) ((c)->u.character6) -#define ffebld_constant_character7(c) ((c)->u.character7) -#define ffebld_constant_character8(c) ((c)->u.character8) -#define ffebld_constant_characterdefault ffebld_constant_character1 -#define ffebld_constant_complex1(c) ((c)->u.complex1) -#define ffebld_constant_complex2(c) ((c)->u.complex2) -#define ffebld_constant_complex3(c) ((c)->u.complex3) -#define ffebld_constant_complex4(c) ((c)->u.complex4) -#define ffebld_constant_complex5(c) ((c)->u.complex5) -#define ffebld_constant_complex6(c) ((c)->u.complex6) -#define ffebld_constant_complex7(c) ((c)->u.complex7) -#define ffebld_constant_complex8(c) ((c)->u.complex8) -#define ffebld_constant_complexdefault ffebld_constant_complex1 -#define ffebld_constant_complexdouble ffebld_constant_complex2 -#define ffebld_constant_complexquad ffebld_constant_complex3 -#define ffebld_constant_copy(c) (c) -#define ffebld_constant_hollerith(c) ((c)->u.hollerith) -#define ffebld_constant_hook(c) ((c)->hook) -#define ffebld_constant_integer1(c) ((c)->u.integer1) -#define ffebld_constant_integer2(c) ((c)->u.integer2) -#define ffebld_constant_integer3(c) ((c)->u.integer3) -#define ffebld_constant_integer4(c) ((c)->u.integer4) -#define ffebld_constant_integer5(c) ((c)->u.integer5) -#define ffebld_constant_integer6(c) ((c)->u.integer6) -#define ffebld_constant_integer7(c) ((c)->u.integer7) -#define ffebld_constant_integer8(c) ((c)->u.integer8) -#define ffebld_constant_integerdefault ffebld_constant_integer1 -#define ffebld_constant_is_numeric(c) ((c)->numeric) -#define ffebld_constant_logical1(c) ((c)->u.logical1) -#define ffebld_constant_logical2(c) ((c)->u.logical2) -#define ffebld_constant_logical3(c) ((c)->u.logical3) -#define ffebld_constant_logical4(c) ((c)->u.logical4) -#define ffebld_constant_logical5(c) ((c)->u.logical5) -#define ffebld_constant_logical6(c) ((c)->u.logical6) -#define ffebld_constant_logical7(c) ((c)->u.logical7) -#define ffebld_constant_logical8(c) ((c)->u.logical8) -#define ffebld_constant_logicaldefault ffebld_constant_logical1 -#define ffebld_constant_new_characterdefault ffebld_constant_new_character1 -#define ffebld_constant_new_characterdefault_val ffebld_constant_new_character1_val -#define ffebld_constant_new_complexdefault ffebld_constant_new_complex1 -#define ffebld_constant_new_complexdefault_val ffebld_constant_new_complex1_val -#define ffebld_constant_new_complexdouble ffebld_constant_new_complex2 -#define ffebld_constant_new_complexdouble_val ffebld_constant_new_complex2_val -#define ffebld_constant_new_complexquad ffebld_constant_new_complex3 -#define ffebld_constant_new_complexquad_valffebld_constant_new_complex3_val -#define ffebld_constant_new_integerdefault ffebld_constant_new_integer1 -#define ffebld_constant_new_integerdefault_val ffebld_constant_new_integer1_val -#define ffebld_constant_new_logicaldefault ffebld_constant_new_logical1 -#define ffebld_constant_new_logicaldefault_val ffebld_constant_new_logical1_val -#define ffebld_constant_new_realdefault ffebld_constant_new_real1 -#define ffebld_constant_new_realdefault_val ffebld_constant_new_real1_val -#define ffebld_constant_new_realdouble ffebld_constant_new_real2 -#define ffebld_constant_new_realdouble_val ffebld_constant_new_real2_val -#define ffebld_constant_new_realquad ffebld_constant_new_real3 -#define ffebld_constant_new_realquad_val ffebld_constant_new_real3_val -#define ffebld_constant_ptr_to_union(c) (&(c)->u) -#define ffebld_constant_real1(c) ((c)->u.real1) -#define ffebld_constant_real2(c) ((c)->u.real2) -#define ffebld_constant_real3(c) ((c)->u.real3) -#define ffebld_constant_real4(c) ((c)->u.real4) -#define ffebld_constant_real5(c) ((c)->u.real5) -#define ffebld_constant_real6(c) ((c)->u.real6) -#define ffebld_constant_real7(c) ((c)->u.real7) -#define ffebld_constant_real8(c) ((c)->u.real8) -#define ffebld_constant_realdefault ffebld_constant_real1 -#define ffebld_constant_realdouble ffebld_constant_real2 -#define ffebld_constant_realquad ffebld_constant_real3 -#define ffebld_constant_set_hook(c,h) ((c)->hook = (h)) -#define ffebld_constant_set_union(c,un) ((c)->u = (un)) -#define ffebld_constant_type(c) ((c)->consttype) -#define ffebld_constant_typeless(c) ((c)->u.typeless) -#define ffebld_constant_union(c) ((c)->u) -#define ffebld_conter(b) ((b)->u.conter.expr) -#define ffebld_conter_orig(b) ((b)->u.conter.orig) -#define ffebld_conter_pad(b) ((b)->u.conter.pad) -#define ffebld_conter_set_orig(b,o) ((b)->u.conter.orig = (o)) -#define ffebld_conter_set_pad(b,p) ((b)->u.conter.pad = (p)) -#define ffebld_copy(b) (b) /* ~~~Someday really make a copy. */ -#define ffebld_cu_ptr_typeless(u) &(u).typeless -#define ffebld_cu_ptr_hollerith(u) &(u).hollerith -#define ffebld_cu_ptr_integer1(u) &(u).integer1 -#define ffebld_cu_ptr_integer2(u) &(u).integer2 -#define ffebld_cu_ptr_integer3(u) &(u).integer3 -#define ffebld_cu_ptr_integer4(u) &(u).integer4 -#define ffebld_cu_ptr_integer5(u) &(u).integer5 -#define ffebld_cu_ptr_integer6(u) &(u).integer6 -#define ffebld_cu_ptr_integer7(u) &(u).integer7 -#define ffebld_cu_ptr_integer8(u) &(u).integer8 -#define ffebld_cu_ptr_integerdefault ffebld_cu_ptr_integer1 -#define ffebld_cu_ptr_logical1(u) &(u).logical1 -#define ffebld_cu_ptr_logical2(u) &(u).logical2 -#define ffebld_cu_ptr_logical3(u) &(u).logical3 -#define ffebld_cu_ptr_logical4(u) &(u).logical4 -#define ffebld_cu_ptr_logical5(u) &(u).logical5 -#define ffebld_cu_ptr_logical6(u) &(u).logical6 -#define ffebld_cu_ptr_logical7(u) &(u).logical7 -#define ffebld_cu_ptr_logical8(u) &(u).logical8 -#define ffebld_cu_ptr_logicaldefault ffebld_cu_ptr_logical1 -#define ffebld_cu_ptr_real1(u) &(u).real1 -#define ffebld_cu_ptr_real2(u) &(u).real2 -#define ffebld_cu_ptr_real3(u) &(u).real3 -#define ffebld_cu_ptr_real4(u) &(u).real4 -#define ffebld_cu_ptr_real5(u) &(u).real5 -#define ffebld_cu_ptr_real6(u) &(u).real6 -#define ffebld_cu_ptr_real7(u) &(u).real7 -#define ffebld_cu_ptr_real8(u) &(u).real8 -#define ffebld_cu_ptr_realdefault ffebld_cu_ptr_real1 -#define ffebld_cu_ptr_realdouble ffebld_cu_ptr_real2 -#define ffebld_cu_ptr_realquad ffebld_cu_ptr_real3 -#define ffebld_cu_ptr_complex1(u) &(u).complex1 -#define ffebld_cu_ptr_complex2(u) &(u).complex2 -#define ffebld_cu_ptr_complex3(u) &(u).complex3 -#define ffebld_cu_ptr_complex4(u) &(u).complex4 -#define ffebld_cu_ptr_complex5(u) &(u).complex5 -#define ffebld_cu_ptr_complex6(u) &(u).complex6 -#define ffebld_cu_ptr_complex7(u) &(u).complex7 -#define ffebld_cu_ptr_complex8(u) &(u).complex8 -#define ffebld_cu_ptr_complexdefault ffebld_cu_ptr_complex1 -#define ffebld_cu_ptr_complexdouble ffebld_cu_ptr_complex2 -#define ffebld_cu_ptr_complexquad ffebld_cu_ptr_complex3 -#define ffebld_cu_ptr_character1(u) &(u).character1 -#define ffebld_cu_ptr_character2(u) &(u).character2 -#define ffebld_cu_ptr_character3(u) &(u).character3 -#define ffebld_cu_ptr_character4(u) &(u).character4 -#define ffebld_cu_ptr_character5(u) &(u).character5 -#define ffebld_cu_ptr_character6(u) &(u).character6 -#define ffebld_cu_ptr_character7(u) &(u).character7 -#define ffebld_cu_ptr_character8(u) &(u).character8 -#define ffebld_cu_val_typeless(u) (u).typeless -#define ffebld_cu_val_hollerith(u) (u).hollerith -#define ffebld_cu_val_integer1(u) (u).integer1 -#define ffebld_cu_val_integer2(u) (u).integer2 -#define ffebld_cu_val_integer3(u) (u).integer3 -#define ffebld_cu_val_integer4(u) (u).integer4 -#define ffebld_cu_val_integer5(u) (u).integer5 -#define ffebld_cu_val_integer6(u) (u).integer6 -#define ffebld_cu_val_integer7(u) (u).integer7 -#define ffebld_cu_val_integer8(u) (u).integer8 -#define ffebld_cu_val_integerdefault ffebld_cu_val_integer1 -#define ffebld_cu_val_logical1(u) (u).logical1 -#define ffebld_cu_val_logical2(u) (u).logical2 -#define ffebld_cu_val_logical3(u) (u).logical3 -#define ffebld_cu_val_logical4(u) (u).logical4 -#define ffebld_cu_val_logical5(u) (u).logical5 -#define ffebld_cu_val_logical6(u) (u).logical6 -#define ffebld_cu_val_logical7(u) (u).logical7 -#define ffebld_cu_val_logical8(u) (u).logical8 -#define ffebld_cu_val_logicaldefault ffebld_cu_val_logical -#define ffebld_cu_val_real1(u) (u).real1 -#define ffebld_cu_val_real2(u) (u).real2 -#define ffebld_cu_val_real3(u) (u).real3 -#define ffebld_cu_val_real4(u) (u).real4 -#define ffebld_cu_val_real5(u) (u).real5 -#define ffebld_cu_val_real6(u) (u).real6 -#define ffebld_cu_val_real7(u) (u).real7 -#define ffebld_cu_val_real8(u) (u).real8 -#define ffebld_cu_val_realdefault ffebld_cu_val_real1 -#define ffebld_cu_val_realdouble ffebld_cu_val_real2 -#define ffebld_cu_val_realquad ffebld_cu_val_real3 -#define ffebld_cu_val_complex1(u) (u).complex1 -#define ffebld_cu_val_complex2(u) (u).complex2 -#define ffebld_cu_val_complex3(u) (u).complex3 -#define ffebld_cu_val_complex4(u) (u).complex4 -#define ffebld_cu_val_complex5(u) (u).complex5 -#define ffebld_cu_val_complex6(u) (u).complex6 -#define ffebld_cu_val_complex7(u) (u).complex7 -#define ffebld_cu_val_complex8(u) (u).complex8 -#define ffebld_cu_val_complexdefault ffebld_cu_val_complex1 -#define ffebld_cu_val_complexdouble ffebld_cu_val_complex2 -#define ffebld_cu_val_complexquad ffebld_cu_val_complex3 -#define ffebld_cu_val_character1(u) (u).character1 -#define ffebld_cu_val_character2(u) (u).character2 -#define ffebld_cu_val_character3(u) (u).character3 -#define ffebld_cu_val_character4(u) (u).character4 -#define ffebld_cu_val_character5(u) (u).character5 -#define ffebld_cu_val_character6(u) (u).character6 -#define ffebld_cu_val_character7(u) (u).character7 -#define ffebld_cu_val_character8(u) (u).character8 -#define ffebld_end_list(b) (*(b) = NULL) -#define ffebld_head(b) ((b)->u.item.head) -#define ffebld_info(b) ((b)->info) -#define ffebld_init_3() -#define ffebld_init_4() -#define ffebld_init_list(l,b) (*(l) = NULL, *(b) = (l)) -#define ffebld_item_hook(b) ((b)->u.item.hook) -#define ffebld_item_set_hook(b,h) ((b)->u.item.hook = (h)) -#define ffebld_kind(b) (ffeinfo_kind (ffebld_info ((b)))) -#define ffebld_kindtype(b) (ffeinfo_kindtype (ffebld_info ((b)))) -#define ffebld_labter(b) ((b)->u.labter) -#define ffebld_labtok(b) ((b)->u.labtok) -#define ffebld_left(b) ((b)->u.nonter.left) -#define ffebld_name_string(n) ((n)->name) -#define ffebld_new() \ - ((ffebld) malloc_new_kp(ffebld_pool(), "FFEBLD",sizeof(struct _ffebld_))) -#define ffebld_new_any() ffebld_new_none(FFEBLD_opANY) -#define ffebld_new_conter(c) ffebld_new_conter_with_orig((c),NULL) -#define ffebld_new_star() ffebld_new_none(FFEBLD_opSTAR) -#define ffebld_new_uplus(l) ffebld_new_one(FFEBLD_opUPLUS,(l)) -#define ffebld_new_uminus(l) ffebld_new_one(FFEBLD_opUMINUS,(l)) -#define ffebld_new_add(l,r) ffebld_new_two(FFEBLD_opADD,(l),(r)) -#define ffebld_new_subtract(l,r) ffebld_new_two(FFEBLD_opSUBTRACT,(l),(r)) -#define ffebld_new_multiply(l,r) ffebld_new_two(FFEBLD_opMULTIPLY,(l),(r)) -#define ffebld_new_divide(l,r) ffebld_new_two(FFEBLD_opDIVIDE,(l),(r)) -#define ffebld_new_power(l,r) ffebld_new_two(FFEBLD_opPOWER,(l),(r)) -#define ffebld_new_bounds(l,r) ffebld_new_two(FFEBLD_opBOUNDS,(l),(r)) -#define ffebld_new_concatenate(l,r) ffebld_new_two(FFEBLD_opCONCATENATE,(l),(r)) -#define ffebld_new_not(l) ffebld_new_one(FFEBLD_opNOT,(l)) -#define ffebld_new_lt(l,r) ffebld_new_two(FFEBLD_opLT,(l),(r)) -#define ffebld_new_le(l,r) ffebld_new_two(FFEBLD_opLE,(l),(r)) -#define ffebld_new_eq(l,r) ffebld_new_two(FFEBLD_opEQ,(l),(r)) -#define ffebld_new_ne(l,r) ffebld_new_two(FFEBLD_opNE,(l),(r)) -#define ffebld_new_gt(l,r) ffebld_new_two(FFEBLD_opGT,(l),(r)) -#define ffebld_new_ge(l,r) ffebld_new_two(FFEBLD_opGE,(l),(r)) -#define ffebld_new_and(l,r) ffebld_new_two(FFEBLD_opAND,(l),(r)) -#define ffebld_new_or(l,r) ffebld_new_two(FFEBLD_opOR,(l),(r)) -#define ffebld_new_xor(l,r) ffebld_new_two(FFEBLD_opXOR,(l),(r)) -#define ffebld_new_eqv(l,r) ffebld_new_two(FFEBLD_opEQV,(l),(r)) -#define ffebld_new_neqv(l,r) ffebld_new_two(FFEBLD_opNEQV,(l),(r)) -#define ffebld_new_paren(l) ffebld_new_one(FFEBLD_opPAREN,(l)) -#define ffebld_new_repeat(l,r) ffebld_new_two(FFEBLD_opREPEAT,(l),(r)) -#define ffebld_new_percent_descr(l) ffebld_new_one(FFEBLD_opPERCENT_DESCR,(l)) -#define ffebld_new_percent_loc(l) ffebld_new_one(FFEBLD_opPERCENT_LOC,(l)) -#define ffebld_new_percent_ref(l) ffebld_new_one(FFEBLD_opPERCENT_REF,(l)) -#define ffebld_new_percent_val(l) ffebld_new_one(FFEBLD_opPERCENT_VAL,(l)) -#define ffebld_new_complex(l,r) ffebld_new_two(FFEBLD_opCOMPLEX,(l),(r)) -#define ffebld_new_convert(l) ffebld_new_one(FFEBLD_opCONVERT,(l)) -#define ffebld_new_funcref(l,r) ffebld_new_two(FFEBLD_opFUNCREF,(l),(r)) -#define ffebld_new_subrref(l,r) ffebld_new_two(FFEBLD_opSUBRREF,(l),(r)) -#define ffebld_new_arrayref(l,r) ffebld_new_two(FFEBLD_opARRAYREF,(l),(r)) -#define ffebld_new_substr(l,r) ffebld_new_two(FFEBLD_opSUBSTR,(l),(r)) -#define ffebld_new_impdo(l,r) ffebld_new_two(FFEBLD_opIMPDO,(l),(r)) -#define ffebld_nonter_hook(b) ((b)->u.nonter.hook) -#define ffebld_nonter_set_hook(b,h) ((b)->u.nonter.hook = (h)) -#define ffebld_op(b) ((b)->op) -#define ffebld_pool() (ffebld_pool_stack_.pool) -#define ffebld_rank(b) (ffeinfo_rank (ffebld_info ((b)))) -#define ffebld_right(b) ((b)->u.nonter.right) -#define ffebld_set_accter(b,a) ((b)->u.accter.array = (a)) -#define ffebld_set_arrter(b,a) ((b)->u.arrter.array = (a)) -#define ffebld_set_conter(b,c) ((b)->u.conter.expr = (c)) -#define ffebld_set_info(b,i) ((b)->info = (i)) -#define ffebld_set_labter(b,l) ((b)->u.labter = (l)) -#define ffebld_set_op(b,o) ((b)->op = (o)) -#define ffebld_set_head(b,h) ((b)->u.item.head = (h)) -#define ffebld_set_left(b,l) ((b)->u.nonter.left = (l)) -#define ffebld_set_right(b,r) ((b)->u.nonter.right = (r)) -#define ffebld_set_trail(b,t) ((b)->u.item.trail = (t)) -#define ffebld_size(b) (ffeinfo_size (ffebld_info ((b)))) -#define ffebld_size_known(b) ffebld_size((b)) -#define ffebld_symter(b) ((b)->u.symter.symbol) -#define ffebld_symter_generic(b) ((b)->u.symter.generic) -#define ffebld_symter_doiter(b) ((b)->u.symter.do_iter) -#define ffebld_symter_implementation(b) ((b)->u.symter.implementation) -#define ffebld_symter_specific(b) ((b)->u.symter.specific) -#define ffebld_symter_set_generic(b,g) ((b)->u.symter.generic = (g)) -#define ffebld_symter_set_implementation(b,i) \ - ((b)->u.symter.implementation = (i)) -#define ffebld_symter_set_is_doiter(b,f) ((b)->u.symter.do_iter = (f)) -#define ffebld_symter_set_specific(b,s) ((b)->u.symter.specific = (s)) -#define ffebld_terminate_0() -#define ffebld_terminate_1() -#define ffebld_terminate_2() -#define ffebld_terminate_3() -#define ffebld_terminate_4() -#define ffebld_trail(b) ((b)->u.item.trail) -#define ffebld_where(b) (ffeinfo_where (ffebld_info ((b)))) - -/* End of #include file. */ - -#endif /* ! GCC_F_BLD_H */ diff --git a/contrib/gcc/f/bugs.texi b/contrib/gcc/f/bugs.texi deleted file mode 100644 index fdc4f15..0000000 --- a/contrib/gcc/f/bugs.texi +++ /dev/null @@ -1,260 +0,0 @@ -@c Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. -@c This is part of the G77 manual. -@c For copying conditions, see the file g77.texi. - -@c The text of this file appears in the file BUGS -@c in the G77 distribution, as well as in the G77 manual. - -@c Keep this the same as the dates above, since it's used -@c in the standalone derivations of this file (e.g. BUGS). -@set copyrights-bugs 1995,1996,1997,1998,1999,2000,2001,2002,2004 - -@set last-update-bugs 2004-05-18 - -@ifset DOC-BUGS -@include root.texi -@c The immediately following lines apply to the BUGS file -@c which is derived from this file. -@emph{Note:} This file is automatically generated from the files -@file{bugs0.texi} and @file{bugs.texi}. -@file{BUGS} is @emph{not} a source file, -although it is normally included within source distributions. - -This file lists known bugs in the @value{which-g77} version -of the GNU Fortran compiler. -Copyright (C) @value{copyrights-bugs} Free Software Foundation, Inc. -You may copy, distribute, and modify it freely as long as you preserve -this copyright notice and permission notice. - -@node Top,,, (dir) -@chapter Known Bugs In GNU Fortran -@end ifset - -@ifset DOC-G77 -@node Known Bugs -@section Known Bugs In GNU Fortran -@end ifset - -This section identifies bugs that @code{g77} @emph{users} -might run into in the @value{which-g77} version -of @code{g77}. -This includes bugs that are actually in the @code{gcc} -back end (GBE) or in @code{libf2c}, because those -sets of code are at least somewhat under the control -of (and necessarily intertwined with) @code{g77}, -so it isn't worth separating them out. - -@ifset DOC-G77 -For information on bugs in @emph{other} versions of @code{g77}, -see @ref{News,,News About GNU Fortran}. -There, lists of bugs fixed in various versions of @code{g77} -can help determine what bugs existed in prior versions. -@end ifset - -@ifset DOC-BUGS -For information on bugs in @emph{other} versions of @code{g77}, -see @file{@value{path-g77}/NEWS}. -There, lists of bugs fixed in various versions of @code{g77} -can help determine what bugs existed in prior versions. -@end ifset - -@ifset DEVELOPMENT -@emph{Warning:} The information below is still under development, -and might not accurately reflect the @code{g77} code base -of which it is a part. -Efforts are made to keep it somewhat up-to-date, -but they are particularly concentrated -on any version of this information -that is distributed as part of a @emph{released} @code{g77}. - -In particular, while this information is intended to apply to -the @value{which-g77} version of @code{g77}, -only an official @emph{release} of that version -is expected to contain documentation that is -most consistent with the @code{g77} product in that version. -@end ifset - -The following information was last updated on @value{last-update-bugs}: - -@itemize @bullet -@item -@code{g77} fails to warn about -use of a ``live'' iterative-DO variable -as an implied-DO variable -in a @code{WRITE} or @code{PRINT} statement -(although it does warn about this in a @code{READ} statement). - -@item -Something about @code{g77}'s straightforward handling of -label references and definitions sometimes prevents the GBE -from unrolling loops. -Until this is solved, try inserting or removing @code{CONTINUE} -statements as the terminal statement, using the @code{END DO} -form instead, and so on. - -@item -Some confusion in diagnostics concerning failing @code{INCLUDE} -statements from within @code{INCLUDE}'d or @code{#include}'d files. - -@cindex integer constants -@cindex constants, integer -@item -@code{g77} assumes that @code{INTEGER(KIND=1)} constants range -from @samp{-2**31} to @samp{2**31-1} (the range for -two's-complement 32-bit values), -instead of determining their range from the actual range of the -type for the configuration (and, someday, for the constant). - -Further, it generally doesn't implement the handling -of constants very well in that it makes assumptions about the -configuration that it no longer makes regarding variables (types). - -Included with this item is the fact that @code{g77} doesn't recognize -that, on IEEE-754/854-compliant systems, @samp{0./0.} should produce a NaN -and no warning instead of the value @samp{0.} and a warning. - -@cindex compiler speed -@cindex speed, of compiler -@cindex compiler memory usage -@cindex memory usage, of compiler -@cindex large aggregate areas -@cindex initialization, bug -@cindex DATA statement -@cindex statements, DATA -@item -@code{g77} uses way too much memory and CPU time to process large aggregate -areas having any initialized elements. - -For example, @samp{REAL A(1000000)} followed by @samp{DATA A(1)/1/} -takes up way too much time and space, including -the size of the generated assembler file. - -Version 0.5.18 improves cases like this---specifically, -cases of @emph{sparse} initialization that leave large, contiguous -areas uninitialized---significantly. -However, even with the improvements, these cases still -require too much memory and CPU time. - -(Version 0.5.18 also improves cases where the initial values are -zero to a much greater degree, so if the above example -ends with @samp{DATA A(1)/0/}, the compile-time performance -will be about as good as it will ever get, aside from unrelated -improvements to the compiler.) - -Note that @code{g77} does display a warning message to -notify the user before the compiler appears to hang. -@ifset DOC-G77 -A warning message is issued when @code{g77} sees code that provides -initial values (e.g. via @code{DATA}) to an aggregate area (@code{COMMON} -or @code{EQUIVALENCE}, or even a large enough array or @code{CHARACTER} -variable) -that is large enough to increase @code{g77}'s compile time by roughly -a factor of 10. - -This size currently is quite small, since @code{g77} -currently has a known bug requiring too much memory -and time to handle such cases. -In @file{@value{path-g77}/data.c}, the macro -@code{FFEDATA_sizeTOO_BIG_INIT_} is defined -to the minimum size for the warning to appear. -The size is specified in storage units, -which can be bytes, words, or whatever, on a case-by-case basis. - -After changing this macro definition, you must -(of course) rebuild and reinstall @code{g77} for -the change to take effect. - -Note that, as of version 0.5.18, improvements have -reduced the scope of the problem for @emph{sparse} -initialization of large arrays, especially those -with large, contiguous uninitialized areas. -However, the warning is issued at a point prior to -when @code{g77} knows whether the initialization is sparse, -and delaying the warning could mean it is produced -too late to be helpful. - -Therefore, the macro definition should not be adjusted to -reflect sparse cases. -Instead, adjust it to generate the warning when densely -initialized arrays begin to cause responses noticeably slower -than linear performance would suggest. -@end ifset - -@cindex code, displaying main source -@cindex displaying main source code -@cindex debugging main source code -@cindex printing main source -@item -When debugging, after starting up the debugger but before being able -to see the source code for the main program unit, the user must currently -set a breakpoint at @code{MAIN__} (or @code{MAIN___} or @code{MAIN_} if -@code{MAIN__} doesn't exist) -and run the program until it hits the breakpoint. -At that point, the -main program unit is activated and about to execute its first -executable statement, but that's the state in which the debugger should -start up, as is the case for languages like C. - -@cindex debugger -@item -Debugging @code{g77}-compiled code using debuggers other than -@code{gdb} is likely not to work. - -Getting @code{g77} and @code{gdb} to work together is a known -problem---getting @code{g77} to work properly with other -debuggers, for which source code often is unavailable to @code{g77} -developers, seems like a much larger, unknown problem, -and is a lower priority than making @code{g77} and @code{gdb} -work together properly. - -On the other hand, information about problems other debuggers -have with @code{g77} output might make it easier to properly -fix @code{g77}, and perhaps even improve @code{gdb}, so it -is definitely welcome. -Such information might even lead to all relevant products -working together properly sooner. - -@cindex Alpha, support -@cindex support, Alpha -@item -@code{g77} doesn't work perfectly on 64-bit configurations -such as the Digital Semiconductor (``DEC'') Alpha. - -This problem is largely resolved as of version 0.5.23. - -@cindex padding -@cindex structures -@cindex common blocks -@cindex equivalence areas -@item -@code{g77} currently inserts needless padding for things like -@samp{COMMON A,IPAD} where @samp{A} is @code{CHARACTER*1} and @samp{IPAD} -is @code{INTEGER(KIND=1)} on machines like x86, -because the back end insists that @samp{IPAD} -be aligned to a 4-byte boundary, -but the processor has no such requirement -(though it is usually good for performance). - -The @code{gcc} back end needs to provide a wider array -of specifications of alignment requirements and preferences for targets, -and front ends like @code{g77} should take advantage of this -when it becomes available. - -@cindex complex performance -@cindex aliasing -@item -The @code{libf2c} routines that perform some run-time -arithmetic on @code{COMPLEX} operands -were modified circa version 0.5.20 of @code{g77} -to work properly even in the presence of aliased operands. - -While the @code{g77} and @code{netlib} versions of @code{libf2c} -differ on how this is accomplished, -the main differences are that we believe -the @code{g77} version works properly -even in the presence of @emph{partially} aliased operands. - -However, these modifications have reduced performance -on targets such as x86, -due to the extra copies of operands involved. -@end itemize diff --git a/contrib/gcc/f/bugs0.texi b/contrib/gcc/f/bugs0.texi deleted file mode 100644 index 9636f4d..0000000 --- a/contrib/gcc/f/bugs0.texi +++ /dev/null @@ -1,9 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@c %**start of header -@setfilename BUGS -@c %**end of header - -@c This tells bugs.texi that it's generating just the BUGS file. -@set DOC-BUGS -@include bugs.texi -@bye diff --git a/contrib/gcc/f/com-rt.def b/contrib/gcc/f/com-rt.def deleted file mode 100644 index 185aef5..0000000 --- a/contrib/gcc/f/com-rt.def +++ /dev/null @@ -1,289 +0,0 @@ -/* com-rt.def -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - com.c - - Modifications: -*/ - -/* DEFGFRT(CODE,NAME,TYPE,VOLATILE,COMPLEX,CONST): - - CODE -- the #define name to use to refer to the function in g77 code - - NAME -- the name as seen by the back end and, with whatever massaging - is normal, the linker - - TYPE -- a code for the tree for the type, assigned when first encountered - (NOTE: There's a distinction made between the semantic return - value for the function, and the actual return mechanism; e.g. - `r_abs()' computes a single-precision `float' return value - but returns it as a `double'. This distinction is important - and is flagged via the _F2C_ versus _GNU_ suffix.) - - ARGS -- a string of codes representing the types of the arguments; the - last type specifies the type for that and all following args, - and the null pointer (0) means the same as "0": - - 0 Not applicable at and beyond this point - & Pointer to type that follows - a char - c complex - d doublereal - e doublecomplex - f real - i integer - j longint - - VOLATILE -- TRUE if the function never returns (gen's emit_barrier in - g77 back end) - - COMPLEX -- TRUE if the return value is COMPLEX or DOUBLE COMPLEX and - thus might need to be returned as ptr-to-1st-arg - - CONST -- TRUE if the function is const - (does not have side effects and only depends on its arguments). - -*/ - -DEFGFRT (FFECOM_gfrtCAT, "s_cat", FFECOM_rttypeVOID_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCMP, "s_cmp", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCOPY, "s_copy", FFECOM_rttypeVOID_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtPAUSE, "s_paus", FFECOM_rttypeVOID_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSTOP, "s_stop", FFECOM_rttypeVOID_, 0, TRUE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtRANGE, "s_rnge", FFECOM_rttypeINTEGER_, 0, TRUE, FALSE, FALSE) - -DEFGFRT (FFECOM_gfrtSRDUE, "s_rdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERDUE, "e_rdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRSUE, "s_rsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERSUE, "e_rsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRDFE, "s_rdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERDFE, "e_rdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRSFI, "s_rsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERSFI, "e_rsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRSFE, "s_rsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERSFE, "e_rsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRSLI, "s_rsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERSLI, "e_rsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRSLE, "s_rsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERSLE, "e_rsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRSNE, "s_rsne", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) - -DEFGFRT (FFECOM_gfrtSWDUE, "s_wdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEWDUE, "e_wdue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSWSUE, "s_wsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEWSUE, "e_wsue", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSWDFE, "s_wdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEWDFE, "e_wdfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSWSFI, "s_wsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEWSFI, "e_wsfi", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSWSFE, "s_wsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEWSFE, "e_wsfe", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSWSLI, "s_wsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEWSLI, "e_wsli", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSWSLE, "s_wsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEWSLE, "e_wsle", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSWSNE, "s_wsne", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) - -DEFGFRT (FFECOM_gfrtDOFIO, "do_fio", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDOLIO, "do_lio", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDOUIO, "do_uio", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) - -DEFGFRT (FFECOM_gfrtFOPEN, "f_open", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFCLOS, "f_clos", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFINQU, "f_inqu", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) - -DEFGFRT (FFECOM_gfrtFBACK, "f_back", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFEND, "f_end", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFREW, "f_rew", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) - -DEFGFRT (FFECOM_gfrtABORT, "G77_abort_0", FFECOM_rttypeVOID_, 0, TRUE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtABS, "r_abs", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtACCESS, "G77_access_0", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtACOS, "r_acos", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtAIMAG, "r_imag", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtAINT, "r_int", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtALARM, "G77_alarm_0", FFECOM_rttypeINTEGER_, "&i0", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtALOG, "r_log", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtALOG10, "r_lg10", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtAMOD, "r_mod", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtANINT, "r_nint", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtASIN, "r_asin", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtATAN, "r_atan", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtATAN2, "r_atn2", FFECOM_rttypeREAL_F2C_, "&f&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCABS, "c_abs", FFECOM_rttypeREAL_F2C_, "&c", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCCOS, "c_cos", FFECOM_rttypeCOMPLEX_F2C_, "&c", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCEXP, "c_exp", FFECOM_rttypeCOMPLEX_F2C_, "&c", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCHDIR, "G77_chdir_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCLOG, "c_log", FFECOM_rttypeCOMPLEX_F2C_, "&c", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCHMOD, "G77_chmod_0", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCONJG, "r_cnjg", FFECOM_rttypeCOMPLEX_F2C_, "&c", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCOS, "r_cos", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCOSH, "r_cosh", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCSIN, "c_sin", FFECOM_rttypeCOMPLEX_F2C_, "&c", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCSQRT, "c_sqrt", FFECOM_rttypeCOMPLEX_F2C_, "&c", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCTIME, "G77_ctime_0", FFECOM_rttypeCHARACTER_, "&j", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDABS, "d_abs", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDACOS, "d_acos", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDASIN, "d_asin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDATAN, "d_atan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDATAN2, "d_atn2", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDATE, "G77_date_y2kbug_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDATE_AND_TIME, "G77_date_and_time_0", FFECOM_rttypeVOID_, "&a&a&a&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtL_BESJ0, "j0", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_BESJ1, "j1", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_BESJN, "jn", FFECOM_rttypeDOUBLE_, "id", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_BESY0, "y0", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_BESY1, "y1", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_BESYN, "yn", FFECOM_rttypeDOUBLE_, "id", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtDCOS, "d_cos", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDCOSH, "d_cosh", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDDIM, "d_dim", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDERF, "G77_derf_0", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDERFC, "G77_derfc_0", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDEXP, "d_exp", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDIM, "r_dim", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDINT, "d_int", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDLOG, "d_log", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDLOG10, "d_lg10", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDMOD, "d_mod", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDNINT, "d_nint", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDPROD, "d_prod", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDSIGN, "d_sign", FFECOM_rttypeDOUBLE_, "&d&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDSIN, "d_sin", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDSINH, "d_sinh", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDSQRT, "d_sqrt", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDTAN, "d_tan", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDTANH, "d_tanh", FFECOM_rttypeDOUBLE_, "&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtDTIME, "G77_dtime_0", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERF, "G77_erf_0", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtERFC, "G77_erfc_0", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtETIME, "G77_etime_0", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEXIT, "G77_exit_0", FFECOM_rttypeVOID_, "&i", TRUE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtEXP, "r_exp", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFDATE, "G77_fdate_0", FFECOM_rttypeCHARACTER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFGET, "G77_fget_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFGETC, "G77_fgetc_0", FFECOM_rttypeINTEGER_, "&i&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFLUSH, "G77_flush_0", FFECOM_rttypeVOID_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFLUSH1, "G77_flush1_0", FFECOM_rttypeVOID_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFNUM, "G77_fnum_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFPUT, "G77_fput_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFPUTC, "G77_fputc_0", FFECOM_rttypeINTEGER_, "&i&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFSTAT, "G77_fstat_0", FFECOM_rttypeINTEGER_, "&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFTELL, "G77_ftell_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtFSEEK, "G77_fseek_0", FFECOM_rttypeINTEGER_, "&i&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGERROR, "G77_gerror_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGETARG, "G77_getarg_0", FFECOM_rttypeVOID_, "&i&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGETCWD, "G77_getcwd_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGETGID, "G77_getgid_0", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGETLOG, "G77_getlog_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGETPID, "G77_getpid_0", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGETUID, "G77_getuid_0", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGETENV, "G77_getenv_0", FFECOM_rttypeVOID_, "&a&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtGMTIME, "G77_gmtime_0", FFECOM_rttypeVOID_, "&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtHOSTNM, "G77_hostnm_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtIABS, "i_abs", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtIARGC, "G77_iargc_0", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtIDATE, "G77_idate_0", FFECOM_rttypeVOID_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtIDIM, "i_dim", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtIDNINT, "i_dnnt", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtIERRNO, "G77_ierrno_0", FFECOM_rttypeINTEGER_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtINDEX, "i_indx", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtIRAND, "G77_irand_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtISIGN, "i_sign", FFECOM_rttypeINTEGER_, "&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtISATTY, "G77_isatty_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtITIME, "G77_itime_0", FFECOM_rttypeVOID_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtKILL, "G77_kill_0", FFECOM_rttypeINTEGER_, "&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLEN, "i_len", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtLGE, "l_ge", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLGT, "l_gt", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLINK, "G77_link_0", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLLE, "l_le", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLLT, "l_lt", FFECOM_rttypeLOGICAL_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLNBLNK, "G77_lnblnk_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLSTAT, "G77_lstat_0", FFECOM_rttypeINTEGER_, "&a&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtLTIME, "G77_ltime_0", FFECOM_rttypeVOID_, "&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtMCLOCK, "G77_mclock_0", FFECOM_rttypeLONGINT_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtMOD, "i_mod", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtNINT, "i_nint", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtPERROR, "G77_perror_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtRAND, "G77_rand_0", FFECOM_rttypeREAL_F2C_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtRENAME, "G77_rename_0", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSECNDS, "G77_secnds_0", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSECOND, "G77_second_0", FFECOM_rttypeREAL_F2C_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSIGN, "r_sign", FFECOM_rttypeREAL_F2C_, "&f&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtL_SIGNAL, "G77_signal_0", FFECOM_rttypeVOIDSTAR_, "&i0", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSIN, "r_sin", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSINH, "r_sinh", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSLEEP, "G77_sleep_0", FFECOM_rttypeVOID_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSQRT, "r_sqrt", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSRAND, "G77_srand_0", FFECOM_rttypeVOID_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSTAT, "G77_stat_0", FFECOM_rttypeINTEGER_, "&a&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSYMLNK, "G77_symlnk_0", FFECOM_rttypeINTEGER_, "&a&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSYSTEM, "G77_system_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtSYSTEM_CLOCK, "G77_system_clock_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtTAN, "r_tan", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtTANH, "r_tanh", FFECOM_rttypeREAL_F2C_, "&f", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtTIME, "G77_time_0", FFECOM_rttypeLONGINT_, 0, FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtTTYNAM, "G77_ttynam_0", FFECOM_rttypeCHARACTER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtUNLINK, "G77_unlink_0", FFECOM_rttypeINTEGER_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtUMASK, "G77_umask_0", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtVXTIDATE, "G77_vxtidate_y2kbug_0", FFECOM_rttypeVOID_, "&i&i&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtVXTTIME, "G77_vxttime_0", FFECOM_rttypeVOID_, "&a", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCDABS, "z_abs", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtCDCOS, "z_cos", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCDEXP, "z_exp", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCDLOG, "z_log", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtDCONJG, "d_cnjg", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCDSIN, "z_sin", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtCDSQRT, "z_sqrt", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtDIMAG, "d_imag", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE, FALSE) - -DEFGFRT (FFECOM_gfrtL_ACOS, "acos", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_ASIN, "asin", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_ATAN, "__builtin_atan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_ATAN2, "__builtin_atan2", FFECOM_rttypeDOUBLE_, "dd", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_COS, "__builtin_cos", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_COSH, "cosh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_ERF, "erf", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_ERFC, "erfc", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_EXP, "__builtin_exp", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_FLOOR, "__builtin_floor", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_FMOD, "__builtin_fmod", FFECOM_rttypeDOUBLE_, "dd", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_LOG, "__builtin_log", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_LOG10, "log10", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_POW, "__builtin_pow", FFECOM_rttypeDOUBLE_, "dd", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_SIN, "__builtin_sin", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_SINH, "sinh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_SQRT, "__builtin_sqrt", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_TAN, "__builtin_tan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_TANH, "tanh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) - -DEFGFRT (FFECOM_gfrtPOW_CI, "pow_ci", FFECOM_rttypeCOMPLEX_F2C_, "&c&i", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtPOW_DD, "pow_dd", FFECOM_rttypeDOUBLE_, "&d&d", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtPOW_DI, "pow_di", FFECOM_rttypeDOUBLE_, "&d&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtPOW_II, "pow_ii", FFECOM_rttypeINTEGER_, "&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtPOW_QQ, "pow_qq", FFECOM_rttypeLONGINT_, "&j&j", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtPOW_RI, "pow_ri", FFECOM_rttypeREAL_F2C_, "&f&i", FALSE, FALSE, FALSE) -DEFGFRT (FFECOM_gfrtPOW_ZI, "pow_zi", FFECOM_rttypeDBLCMPLX_F2C_, "&e&i", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtPOW_ZZ, "pow_zz", FFECOM_rttypeDBLCMPLX_F2C_, "&e&e", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtDIV_CC, "c_div", FFECOM_rttypeCOMPLEX_F2C_, "&c", FALSE, TRUE, FALSE) -DEFGFRT (FFECOM_gfrtDIV_ZZ, "z_div", FFECOM_rttypeDBLCMPLX_F2C_, "&e", FALSE, TRUE, FALSE) diff --git a/contrib/gcc/f/com.c b/contrib/gcc/f/com.c deleted file mode 100644 index a64ef86..0000000 --- a/contrib/gcc/f/com.c +++ /dev/null @@ -1,16525 +0,0 @@ -/* com.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - Contains compiler-specific functions. - - Modifications: -*/ - -/* Understanding this module means understanding the interface between - the g77 front end and the gcc back end (or, perhaps, some other - back end). In here are the functions called by the front end proper - to notify whatever back end is in place about certain things, and - also the back-end-specific functions. It's a bear to deal with, so - lately I've been trying to simplify things, especially with regard - to the gcc-back-end-specific stuff. - - Building expressions generally seems quite easy, but building decls - has been challenging and is undergoing revision. gcc has several - kinds of decls: - - TYPE_DECL -- a type (int, float, struct, function, etc.) - CONST_DECL -- a constant of some type other than function - LABEL_DECL -- a variable or a constant? - PARM_DECL -- an argument to a function (a variable that is a dummy) - RESULT_DECL -- the return value of a function (a variable) - VAR_DECL -- other variable (can hold a ptr-to-function, struct, int, etc.) - FUNCTION_DECL -- a function (either the actual function or an extern ref) - FIELD_DECL -- a field in a struct or union (goes into types) - - g77 has a set of functions that somewhat parallels the gcc front end - when it comes to building decls: - - Internal Function (one we define, not just declare as extern): - if (is_nested) push_f_function_context (); - start_function (get_identifier ("function_name"), function_type, - is_nested, is_public); - // for each arg, build PARM_DECL and call push_parm_decl (decl) with it; - store_parm_decls (is_main_program); - ffecom_start_compstmt (); - // for stmts and decls inside function, do appropriate things; - ffecom_end_compstmt (); - finish_function (is_nested); - if (is_nested) pop_f_function_context (); - - Everything Else: - tree d; - tree init; - // fill in external, public, static, &c for decl, and - // set DECL_INITIAL to error_mark_node if going to initialize - // set is_top_level TRUE only if not at top level and decl - // must go in top level (i.e. not within current function decl context) - d = start_decl (decl, is_top_level); - init = ...; // if have initializer - finish_decl (d, init, is_top_level); - -*/ - -/* Include files. */ - -#include "proj.h" -#include "flags.h" -#include "real.h" -#include "rtl.h" -#include "toplev.h" -#include "tree.h" -#include "output.h" /* Must follow tree.h so TREE_CODE is defined! */ -#include "convert.h" -#include "ggc.h" -#include "diagnostic.h" -#include "intl.h" -#include "langhooks.h" -#include "langhooks-def.h" -#include "debug.h" - -/* VMS-specific definitions */ -#ifdef VMS -#include -#define O_RDONLY 0 /* Open arg for Read/Only */ -#define O_WRONLY 1 /* Open arg for Write/Only */ -#define read(fd,buf,size) VMS_read (fd,buf,size) -#define write(fd,buf,size) VMS_write (fd,buf,size) -#define open(fname,mode,prot) VMS_open (fname,mode,prot) -#define fopen(fname,mode) VMS_fopen (fname,mode) -#define freopen(fname,mode,ofile) VMS_freopen (fname,mode,ofile) -#define strncat(dst,src,cnt) VMS_strncat (dst,src,cnt) -#define fstat(fd,stbuf) VMS_fstat (fd,stbuf) -static int VMS_fstat (), VMS_stat (); -static char * VMS_strncat (); -static int VMS_read (); -static int VMS_write (); -static int VMS_open (); -static FILE * VMS_fopen (); -static FILE * VMS_freopen (); -static void hack_vms_include_specification (); -typedef struct { unsigned :16, :16, :16; } vms_ino_t; -#define ino_t vms_ino_t -#define INCLUDE_LEN_FUDGE 10 /* leave room for VMS syntax conversion */ -#endif /* VMS */ - -#define FFECOM_DETERMINE_TYPES 1 /* for com.h */ -#include "com.h" -#include "bad.h" -#include "bld.h" -#include "equiv.h" -#include "expr.h" -#include "implic.h" -#include "info.h" -#include "malloc.h" -#include "src.h" -#include "st.h" -#include "storag.h" -#include "symbol.h" -#include "target.h" -#include "top.h" -#include "type.h" - -/* Externals defined here. */ - -/* Stream for reading from the input file. */ -FILE *finput; - -/* These definitions parallel those in c-decl.c so that code from that - module can be used pretty much as is. Much of these defs aren't - otherwise used, i.e. by g77 code per se, except some of them are used - to build some of them that are. The ones that are global (i.e. not - "static") are those that ste.c and such might use (directly - or by using com macros that reference them in their definitions). */ - -tree string_type_node; - -/* The rest of these are inventions for g77, though there might be - similar things in the C front end. As they are found, these - inventions should be renamed to be canonical. Note that only - the ones currently required to be global are so. */ - -static GTY(()) tree ffecom_tree_fun_type_void; - -tree ffecom_integer_type_node; /* Abbrev for _tree_type[blah][blah]. */ -tree ffecom_integer_zero_node; /* Like *_*_* with g77's integer type. */ -tree ffecom_integer_one_node; /* " */ -tree ffecom_tree_type[FFEINFO_basictype][FFEINFO_kindtype]; - -/* _fun_type things are the f2c-specific versions. For -fno-f2c, - just use build_function_type and build_pointer_type on the - appropriate _tree_type array element. */ - -static GTY(()) tree ffecom_tree_fun_type[FFEINFO_basictype][FFEINFO_kindtype]; -static GTY(()) tree - ffecom_tree_ptr_to_fun_type[FFEINFO_basictype][FFEINFO_kindtype]; -static GTY(()) tree ffecom_tree_subr_type; -static GTY(()) tree ffecom_tree_ptr_to_subr_type; -static GTY(()) tree ffecom_tree_blockdata_type; - -static GTY(()) tree ffecom_tree_xargc_; - -ffecomSymbol ffecom_symbol_null_ -= -{ - NULL_TREE, - NULL_TREE, - NULL_TREE, - NULL_TREE, - false -}; -ffeinfoKindtype ffecom_pointer_kind_ = FFEINFO_basictypeNONE; -ffeinfoKindtype ffecom_label_kind_ = FFEINFO_basictypeNONE; - -int ffecom_f2c_typecode_[FFEINFO_basictype][FFEINFO_kindtype]; -tree ffecom_f2c_integer_type_node; -static GTY(()) tree ffecom_f2c_ptr_to_integer_type_node; -tree ffecom_f2c_address_type_node; -tree ffecom_f2c_real_type_node; -static GTY(()) tree ffecom_f2c_ptr_to_real_type_node; -tree ffecom_f2c_doublereal_type_node; -tree ffecom_f2c_complex_type_node; -tree ffecom_f2c_doublecomplex_type_node; -tree ffecom_f2c_longint_type_node; -tree ffecom_f2c_logical_type_node; -tree ffecom_f2c_flag_type_node; -tree ffecom_f2c_ftnlen_type_node; -tree ffecom_f2c_ftnlen_zero_node; -tree ffecom_f2c_ftnlen_one_node; -tree ffecom_f2c_ftnlen_two_node; -tree ffecom_f2c_ptr_to_ftnlen_type_node; -tree ffecom_f2c_ftnint_type_node; -tree ffecom_f2c_ptr_to_ftnint_type_node; - -/* Simple definitions and enumerations. */ - -#ifndef FFECOM_sizeMAXSTACKITEM -#define FFECOM_sizeMAXSTACKITEM 32*1024 /* Keep user-declared things - larger than this # bytes - off stack if possible. */ -#endif - -/* For systems that have large enough stacks, they should define - this to 0, and here, for ease of use later on, we just undefine - it if it is 0. */ - -#if FFECOM_sizeMAXSTACKITEM == 0 -#undef FFECOM_sizeMAXSTACKITEM -#endif - -typedef enum - { - FFECOM_rttypeVOID_, - FFECOM_rttypeVOIDSTAR_, /* C's `void *' type. */ - FFECOM_rttypeFTNINT_, /* f2c's `ftnint' type. */ - FFECOM_rttypeINTEGER_, /* f2c's `integer' type. */ - FFECOM_rttypeLONGINT_, /* f2c's `longint' type. */ - FFECOM_rttypeLOGICAL_, /* f2c's `logical' type. */ - FFECOM_rttypeREAL_F2C_, /* f2c's `real' returned as `double'. */ - FFECOM_rttypeREAL_GNU_, /* `real' returned as such. */ - FFECOM_rttypeCOMPLEX_F2C_, /* f2c's `complex' returned via 1st arg. */ - FFECOM_rttypeCOMPLEX_GNU_, /* f2c's `complex' returned directly. */ - FFECOM_rttypeDOUBLE_, /* C's `double' type. */ - FFECOM_rttypeDOUBLEREAL_, /* f2c's `doublereal' type. */ - FFECOM_rttypeDBLCMPLX_F2C_, /* f2c's `doublecomplex' returned via 1st arg. */ - FFECOM_rttypeDBLCMPLX_GNU_, /* f2c's `doublecomplex' returned directly. */ - FFECOM_rttypeCHARACTER_, /* f2c `char *'/`ftnlen' pair. */ - FFECOM_rttype_ - } ffecomRttype_; - -/* Internal typedefs. */ - -typedef struct _ffecom_concat_list_ ffecomConcatList_; - -/* Private include files. */ - - -/* Internal structure definitions. */ - -struct _ffecom_concat_list_ - { - ffebld *exprs; - int count; - int max; - ffetargetCharacterSize minlen; - ffetargetCharacterSize maxlen; - }; - -/* Static functions (internal). */ - -static tree ffe_type_for_mode (enum machine_mode, int); -static tree ffe_type_for_size (unsigned int, int); -static tree ffe_unsigned_type (tree); -static tree ffe_signed_type (tree); -static tree ffe_signed_or_unsigned_type (int, tree); -static bool ffe_mark_addressable (tree); -static tree ffe_truthvalue_conversion (tree); -static void ffecom_init_decl_processing (void); -static tree ffecom_arglist_expr_ (const char *argstring, ffebld args); -static tree ffecom_widest_expr_type_ (ffebld list); -static bool ffecom_overlap_ (tree dest_decl, tree dest_offset, - tree dest_size, tree source_tree, - ffebld source, bool scalar_arg); -static bool ffecom_args_overlapping_ (tree dest_tree, ffebld dest, - tree args, tree callee_commons, - bool scalar_args); -static tree ffecom_build_f2c_string_ (int i, const char *s); -static tree ffecom_call_ (tree fn, ffeinfoKindtype kt, - bool is_f2c_complex, tree type, - tree args, tree dest_tree, - ffebld dest, bool *dest_used, - tree callee_commons, bool scalar_args, tree hook); -static tree ffecom_call_binop_ (tree fn, ffeinfoKindtype kt, - bool is_f2c_complex, tree type, - ffebld left, ffebld right, - tree dest_tree, ffebld dest, - bool *dest_used, tree callee_commons, - bool scalar_args, bool ref, tree hook); -static void ffecom_char_args_x_ (tree *xitem, tree *length, - ffebld expr, bool with_null); -static tree ffecom_check_size_overflow_ (ffesymbol s, tree type, bool dummy); -static tree ffecom_char_enhance_arg_ (tree *xtype, ffesymbol s); -static ffecomConcatList_ - ffecom_concat_list_gather_ (ffecomConcatList_ catlist, - ffebld expr, - ffetargetCharacterSize max); -static void ffecom_concat_list_kill_ (ffecomConcatList_ catlist); -static ffecomConcatList_ ffecom_concat_list_new_ (ffebld expr, - ffetargetCharacterSize max); -static void ffecom_debug_kludge_ (tree aggr, const char *aggr_type, - ffesymbol member, tree member_type, - ffetargetOffset offset); -static void ffecom_do_entry_ (ffesymbol fn, int entrynum); -static tree ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest, - bool *dest_used, bool assignp, bool widenp); -static tree ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree, - ffebld dest, bool *dest_used); -static tree ffecom_expr_power_integer_ (ffebld expr); -static void ffecom_expr_transform_ (ffebld expr); -static void ffecom_f2c_make_type_ (tree *type, int tcode, const char *name); -static void ffecom_f2c_set_lio_code_ (ffeinfoBasictype bt, int size, - int code); -static ffeglobal ffecom_finish_global_ (ffeglobal global); -static ffesymbol ffecom_finish_symbol_transform_ (ffesymbol s); -static tree ffecom_get_appended_identifier_ (char us, const char *text); -static tree ffecom_get_external_identifier_ (ffesymbol s); -static tree ffecom_get_identifier_ (const char *text); -static tree ffecom_gen_sfuncdef_ (ffesymbol s, - ffeinfoBasictype bt, - ffeinfoKindtype kt); -static const char *ffecom_gfrt_args_ (ffecomGfrt ix); -static tree ffecom_gfrt_tree_ (ffecomGfrt ix); -static tree ffecom_init_zero_ (tree decl); -static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg, - tree *maybe_tree); -static tree ffecom_intrinsic_len_ (ffebld expr); -static void ffecom_let_char_ (tree dest_tree, - tree dest_length, - ffetargetCharacterSize dest_size, - ffebld source); -static void ffecom_make_gfrt_ (ffecomGfrt ix); -static void ffecom_member_phase1_ (ffestorag mst, ffestorag st); -static void ffecom_member_phase2_ (ffestorag mst, ffestorag st); -static void ffecom_prepare_let_char_ (ffetargetCharacterSize dest_size, - ffebld source); -static void ffecom_push_dummy_decls_ (ffebld dumlist, - bool stmtfunc); -static void ffecom_start_progunit_ (void); -static ffesymbol ffecom_sym_transform_ (ffesymbol s); -static ffesymbol ffecom_sym_transform_assign_ (ffesymbol s); -static void ffecom_transform_common_ (ffesymbol s); -static void ffecom_transform_equiv_ (ffestorag st); -static tree ffecom_transform_namelist_ (ffesymbol s); -static void ffecom_tree_canonize_ptr_ (tree *decl, tree *offset, - tree t); -static void ffecom_tree_canonize_ref_ (tree *decl, tree *offset, - tree *size, tree tree); -static tree ffecom_tree_divide_ (tree tree_type, tree left, tree right, - tree dest_tree, ffebld dest, - bool *dest_used, tree hook); -static tree ffecom_type_localvar_ (ffesymbol s, - ffeinfoBasictype bt, - ffeinfoKindtype kt); -static tree ffecom_type_namelist_ (void); -static tree ffecom_type_vardesc_ (void); -static tree ffecom_vardesc_ (ffebld expr); -static tree ffecom_vardesc_array_ (ffesymbol s); -static tree ffecom_vardesc_dims_ (ffesymbol s); -static tree ffecom_convert_narrow_ (tree type, tree expr); -static tree ffecom_convert_widen_ (tree type, tree expr); - -/* These are static functions that parallel those found in the C front - end and thus have the same names. */ - -static tree bison_rule_compstmt_ (void); -static void bison_rule_pushlevel_ (void); -static void delete_block (tree block); -static int duplicate_decls (tree newdecl, tree olddecl); -static void finish_decl (tree decl, tree init, bool is_top_level); -static void finish_function (int nested); -static const char *ffe_printable_name (tree decl, int v); -static void ffe_print_error_function (diagnostic_context *, const char *); -static tree lookup_name_current_level (tree name); -static struct f_binding_level *make_binding_level (void); -static void pop_f_function_context (void); -static void push_f_function_context (void); -static void push_parm_decl (tree parm); -static tree pushdecl_top_level (tree decl); -static int kept_level_p (void); -static tree storedecls (tree decls); -static void store_parm_decls (int is_main_program); -static tree start_decl (tree decl, bool is_top_level); -static void start_function (tree name, tree type, int nested, int public); -static void ffecom_file_ (const char *name); -static void ffecom_close_include_ (FILE *f); -static FILE *ffecom_open_include_ (char *name, ffewhereLine l, - ffewhereColumn c); - -/* Static objects accessed by functions in this module. */ - -static ffesymbol ffecom_primary_entry_ = NULL; -static ffesymbol ffecom_nested_entry_ = NULL; -static ffeinfoKind ffecom_primary_entry_kind_; -static bool ffecom_primary_entry_is_proc_; -static GTY(()) tree ffecom_outer_function_decl_; -static GTY(()) tree ffecom_previous_function_decl_; -static GTY(()) tree ffecom_which_entrypoint_decl_; -static GTY(()) tree ffecom_float_zero_; -static GTY(()) tree ffecom_float_half_; -static GTY(()) tree ffecom_double_zero_; -static GTY(()) tree ffecom_double_half_; -static GTY(()) tree ffecom_func_result_;/* For functions. */ -static GTY(()) tree ffecom_func_length_;/* For CHARACTER fns. */ -static ffebld ffecom_list_blockdata_; -static ffebld ffecom_list_common_; -static ffebld ffecom_master_arglist_; -static ffeinfoBasictype ffecom_master_bt_; -static ffeinfoKindtype ffecom_master_kt_; -static ffetargetCharacterSize ffecom_master_size_; -static int ffecom_num_fns_ = 0; -static int ffecom_num_entrypoints_ = 0; -static bool ffecom_is_altreturning_ = FALSE; -static GTY(()) tree ffecom_multi_type_node_; -static GTY(()) tree ffecom_multi_retval_; -static GTY(()) tree - ffecom_multi_fields_[FFEINFO_basictype][FFEINFO_kindtype]; -static bool ffecom_member_namelisted_; /* _member_phase1_ namelisted? */ -static bool ffecom_doing_entry_ = FALSE; -static bool ffecom_transform_only_dummies_ = FALSE; -static int ffecom_typesize_pointer_; -static int ffecom_typesize_integer1_; - -/* Holds pointer-to-function expressions. */ - -static GTY(()) tree ffecom_gfrt_[FFECOM_gfrt]; - -/* Holds the external names of the functions. */ - -static const char *const ffecom_gfrt_name_[FFECOM_gfrt] -= -{ -#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) NAME, -#include "com-rt.def" -#undef DEFGFRT -}; - -/* Whether the function returns. */ - -static const bool ffecom_gfrt_volatile_[FFECOM_gfrt] -= -{ -#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) VOLATILE, -#include "com-rt.def" -#undef DEFGFRT -}; - -/* Whether the function returns type complex. */ - -static const bool ffecom_gfrt_complex_[FFECOM_gfrt] -= -{ -#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) COMPLEX, -#include "com-rt.def" -#undef DEFGFRT -}; - -/* Whether the function is const - (i.e., has no side effects and only depends on its arguments). */ - -static const bool ffecom_gfrt_const_[FFECOM_gfrt] -= -{ -#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) CONST, -#include "com-rt.def" -#undef DEFGFRT -}; - -/* Type code for the function return value. */ - -static const ffecomRttype_ ffecom_gfrt_type_[FFECOM_gfrt] -= -{ -#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) TYPE, -#include "com-rt.def" -#undef DEFGFRT -}; - -/* String of codes for the function's arguments. */ - -static const char *const ffecom_gfrt_argstring_[FFECOM_gfrt] -= -{ -#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) ARGS, -#include "com-rt.def" -#undef DEFGFRT -}; - -/* Internal macros. */ - -/* We let tm.h override the types used here, to handle trivial differences - such as the choice of unsigned int or long unsigned int for size_t. - When machines start needing nontrivial differences in the size type, - it would be best to do something here to figure out automatically - from other information what type to use. */ - -#ifndef SIZE_TYPE -#define SIZE_TYPE "long unsigned int" -#endif - -#define ffecom_concat_list_count_(catlist) ((catlist).count) -#define ffecom_concat_list_expr_(catlist,i) ((catlist).exprs[(i)]) -#define ffecom_concat_list_maxlen_(catlist) ((catlist).maxlen) -#define ffecom_concat_list_minlen_(catlist) ((catlist).minlen) - -#define ffecom_char_args_(i,l,e) ffecom_char_args_x_((i),(l),(e),FALSE) -#define ffecom_char_args_with_null_(i,l,e) ffecom_char_args_x_((i),(l),(e),TRUE) - -/* For each binding contour we allocate a binding_level structure - * which records the names defined in that contour. - * Contours include: - * 0) the global one - * 1) one for each function definition, - * where internal declarations of the parameters appear. - * - * The current meaning of a name can be found by searching the levels from - * the current one out to the global one. - */ - -/* Note that the information in the `names' component of the global contour - is duplicated in the IDENTIFIER_GLOBAL_VALUEs of all identifiers. */ - -struct f_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. - */ - tree names; - - /* For each level (except not the global one), - a chain of BLOCK nodes for all the levels - that were entered and exited one level down. */ - tree blocks; - - /* The BLOCK node for this level, if one has been preallocated. - If 0, the BLOCK is allocated (if needed) when the level is popped. */ - tree this_block; - - /* The binding level which this one is contained in (inherits from). */ - struct f_binding_level *level_chain; - - /* 0: no ffecom_prepare_* functions called at this level yet; - 1: ffecom_prepare* functions called, except not ffecom_prepare_end; - 2: ffecom_prepare_end called. */ - int prep_state; - }; - -#define NULL_BINDING_LEVEL (struct f_binding_level *) NULL - -/* The binding level currently in effect. */ - -static GTY(()) struct f_binding_level *current_binding_level; - -/* A chain of binding_level structures awaiting reuse. */ - -static GTY((deletable (""))) struct f_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 f_binding_level *global_binding_level; - -/* Binding level structures are initialized by copying this one. */ - -static const struct f_binding_level clear_binding_level -= -{NULL, NULL, NULL, NULL_BINDING_LEVEL, 0}; - -/* Language-dependent contents of an identifier. */ - -struct lang_identifier GTY(()) -{ - struct tree_identifier common; - tree global_value; - tree local_value; - tree label_value; - bool invented; -}; - -/* Macros for access to language-specific slots in an identifier. */ -/* Each of these slots contains a DECL node or null. */ - -/* This represents the value which the identifier has in the - file-scope namespace. */ -#define IDENTIFIER_GLOBAL_VALUE(NODE) \ - (((struct lang_identifier *)(NODE))->global_value) -/* This represents the value which the identifier has in the current - scope. */ -#define IDENTIFIER_LOCAL_VALUE(NODE) \ - (((struct lang_identifier *)(NODE))->local_value) -/* This represents the value which the identifier has as a label in - the current label scope. */ -#define IDENTIFIER_LABEL_VALUE(NODE) \ - (((struct lang_identifier *)(NODE))->label_value) -/* This is nonzero if the identifier was "made up" by g77 code. */ -#define IDENTIFIER_INVENTED(NODE) \ - (((struct lang_identifier *)(NODE))->invented) - -/* 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; -}; - -/* Fortran doesn't use either of these. */ -struct lang_decl GTY(()) -{ -}; -struct lang_type GTY(()) -{ -}; - -/* In identifiers, C uses the following fields in a special way: - TREE_PUBLIC to record that there was a previous local extern decl. - TREE_USED to record that such a decl was used. - TREE_ADDRESSABLE to record that the address of such a decl was used. */ - -/* A list (chain of TREE_LIST nodes) of all LABEL_DECLs in the function - that have names. Here so we can clear out their names' definitions - at the end of the function. */ - -static GTY(()) tree named_labels; - -/* A list of LABEL_DECLs from outer contexts that are currently shadowed. */ - -static GTY(()) tree shadowed_labels; - -/* Return the subscript expression, modified to do range-checking. - - `array' is the array type to be checked against. - `element' is the subscript expression to check. - `dim' is the dimension number (starting at 0). - `total_dims' is the total number of dimensions (0 for CHARACTER substring). - `item' is the array decl or NULL_TREE. -*/ - -static tree -ffecom_subscript_check_ (tree array, tree element, int dim, int total_dims, - const char *array_name, tree item) -{ - tree low = TYPE_MIN_VALUE (TYPE_DOMAIN (array)); - tree high = TYPE_MAX_VALUE (TYPE_DOMAIN (array)); - tree cond; - tree die; - tree args; - - if (element == error_mark_node) - return element; - - if (TREE_TYPE (low) != TREE_TYPE (element)) - { - if (TYPE_PRECISION (TREE_TYPE (low)) - > TYPE_PRECISION (TREE_TYPE (element))) - element = convert (TREE_TYPE (low), element); - else - { - low = convert (TREE_TYPE (element), low); - if (high) - high = convert (TREE_TYPE (element), high); - } - } - - element = ffecom_save_tree (element); - if (total_dims == 0) - { - /* Special handling for substring range checks. Fortran allows the - end subscript < begin subscript, which means that expressions like - string(1:0) are valid (and yield a null string). In view of this, - enforce two simpler conditions: - 1) element<=high for end-substring; - 2) element>=low for start-substring. - Run-time character movement will enforce remaining conditions. - - More complicated checks would be better, but present structure only - provides one index element at a time, so it is not possible to - enforce a check of both i and j in string(i:j). If it were, the - complete set of rules would read, - if ( ((j ffecom_typesize_integer1_ - && ffetype_size (type) > ffecom_typesize_integer1_) - /* E.g. ARRAY(INDEX), given INTEGER*8 INDEX, on a system with 64-bit - pointers and 32-bit integers. Do the full 64-bit pointer - arithmetic, for codes using arrays for nonstandard heap-like - work. */ - flatten = 1; - } - - total_dims = i; - - need_ptr = want_ptr || flatten; - - if (! item) - { - if (need_ptr) - item = ffecom_ptr_to_expr (ffebld_left (expr)); - else - item = ffecom_expr (ffebld_left (expr)); - - if (item == error_mark_node) - return item; - - if (ffeinfo_where (ffebld_info (expr)) == FFEINFO_whereFLEETING - && ! ffe_mark_addressable (item)) - return error_mark_node; - } - - if (item == error_mark_node) - return item; - - if (need_ptr) - { - tree min; - - for (--i, array = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item))); - i >= 0; - --i, array = TYPE_MAIN_VARIANT (TREE_TYPE (array))) - { - min = TYPE_MIN_VALUE (TYPE_DOMAIN (array)); - element = ffecom_expr_ (dims[i], NULL, NULL, NULL, FALSE, TRUE); - if (flag_bounds_check) - element = ffecom_subscript_check_ (array, element, i, total_dims, - array_name, item); - if (element == error_mark_node) - return element; - - /* Widen integral arithmetic as desired while preserving - signedness. */ - tree_type = TREE_TYPE (element); - tree_type_x = tree_type; - if (tree_type - && GET_MODE_CLASS (TYPE_MODE (tree_type)) == MODE_INT - && TYPE_PRECISION (tree_type) < TYPE_PRECISION (sizetype)) - tree_type_x = (TREE_UNSIGNED (tree_type) ? usizetype : ssizetype); - - if (TREE_TYPE (min) != tree_type_x) - min = convert (tree_type_x, min); - if (TREE_TYPE (element) != tree_type_x) - element = convert (tree_type_x, element); - - item = ffecom_2 (PLUS_EXPR, - build_pointer_type (TREE_TYPE (array)), - item, - size_binop (MULT_EXPR, - size_in_bytes (TREE_TYPE (array)), - convert (sizetype, - fold (build (MINUS_EXPR, - tree_type_x, - element, min))))); - } - if (! want_ptr) - { - item = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item))), - item); - } - } - else - { - for (--i; - i >= 0; - --i) - { - array = TYPE_MAIN_VARIANT (TREE_TYPE (item)); - - element = ffecom_expr_ (dims[i], NULL, NULL, NULL, FALSE, TRUE); - if (flag_bounds_check) - element = ffecom_subscript_check_ (array, element, i, total_dims, - array_name, item); - if (element == error_mark_node) - return element; - - /* Widen integral arithmetic as desired while preserving - signedness. */ - tree_type = TREE_TYPE (element); - tree_type_x = tree_type; - if (tree_type - && GET_MODE_CLASS (TYPE_MODE (tree_type)) == MODE_INT - && TYPE_PRECISION (tree_type) < TYPE_PRECISION (sizetype)) - tree_type_x = (TREE_UNSIGNED (tree_type) ? usizetype : ssizetype); - - element = convert (tree_type_x, element); - - item = ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item))), - item, - element); - } - } - - return item; -} - -/* This is like gcc's stabilize_reference -- in fact, most of the code - comes from that -- but it handles the situation where the reference - is going to have its subparts picked at, and it shouldn't change - (or trigger extra invocations of functions in the subtrees) due to - this. save_expr is a bit overzealous, because we don't need the - entire thing calculated and saved like a temp. So, for DECLs, no - change is needed, because these are stable aggregates, and ARRAY_REF - and such might well be stable too, but for things like calculations, - we do need to calculate a snapshot of a value before picking at it. */ - -static tree -ffecom_stabilize_aggregate_ (tree ref) -{ - tree result; - enum tree_code code = TREE_CODE (ref); - - switch (code) - { - case VAR_DECL: - case PARM_DECL: - case RESULT_DECL: - /* No action is needed in this case. */ - return ref; - - case NOP_EXPR: - case CONVERT_EXPR: - case FLOAT_EXPR: - case FIX_TRUNC_EXPR: - case FIX_FLOOR_EXPR: - case FIX_ROUND_EXPR: - case FIX_CEIL_EXPR: - result = build_nt (code, stabilize_reference (TREE_OPERAND (ref, 0))); - break; - - case INDIRECT_REF: - result = build_nt (INDIRECT_REF, - stabilize_reference_1 (TREE_OPERAND (ref, 0))); - break; - - case COMPONENT_REF: - result = build_nt (COMPONENT_REF, - stabilize_reference (TREE_OPERAND (ref, 0)), - TREE_OPERAND (ref, 1)); - break; - - case BIT_FIELD_REF: - result = build_nt (BIT_FIELD_REF, - stabilize_reference (TREE_OPERAND (ref, 0)), - stabilize_reference_1 (TREE_OPERAND (ref, 1)), - stabilize_reference_1 (TREE_OPERAND (ref, 2))); - break; - - case ARRAY_REF: - result = build_nt (ARRAY_REF, - stabilize_reference (TREE_OPERAND (ref, 0)), - stabilize_reference_1 (TREE_OPERAND (ref, 1))); - break; - - case COMPOUND_EXPR: - result = build_nt (COMPOUND_EXPR, - stabilize_reference_1 (TREE_OPERAND (ref, 0)), - stabilize_reference (TREE_OPERAND (ref, 1))); - break; - - case RTL_EXPR: - abort (); - - - default: - return save_expr (ref); - - case ERROR_MARK: - return error_mark_node; - } - - TREE_TYPE (result) = TREE_TYPE (ref); - TREE_READONLY (result) = TREE_READONLY (ref); - TREE_SIDE_EFFECTS (result) = TREE_SIDE_EFFECTS (ref); - TREE_THIS_VOLATILE (result) = TREE_THIS_VOLATILE (ref); - - return result; -} - -/* A rip-off of gcc's convert.c convert_to_complex function, - reworked to handle complex implemented as C structures - (RECORD_TYPE with two fields, real and imaginary `r' and `i'). */ - -static tree -ffecom_convert_to_complex_ (tree type, tree expr) -{ - register enum tree_code form = TREE_CODE (TREE_TYPE (expr)); - tree subtype; - - assert (TREE_CODE (type) == RECORD_TYPE); - - subtype = TREE_TYPE (TYPE_FIELDS (type)); - - if (form == REAL_TYPE || form == INTEGER_TYPE || form == ENUMERAL_TYPE) - { - expr = convert (subtype, expr); - return ffecom_2 (COMPLEX_EXPR, type, expr, - convert (subtype, integer_zero_node)); - } - - if (form == RECORD_TYPE) - { - tree elt_type = TREE_TYPE (TYPE_FIELDS (TREE_TYPE (expr))); - if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype)) - return expr; - else - { - expr = save_expr (expr); - return ffecom_2 (COMPLEX_EXPR, - type, - convert (subtype, - ffecom_1 (REALPART_EXPR, - TREE_TYPE (TYPE_FIELDS (TREE_TYPE (expr))), - expr)), - convert (subtype, - ffecom_1 (IMAGPART_EXPR, - TREE_TYPE (TYPE_FIELDS (TREE_TYPE (expr))), - expr))); - } - } - - if (form == POINTER_TYPE || form == REFERENCE_TYPE) - error ("pointer value used where a complex was expected"); - else - error ("aggregate value used where a complex was expected"); - - return ffecom_2 (COMPLEX_EXPR, type, - convert (subtype, integer_zero_node), - convert (subtype, integer_zero_node)); -} - -/* Like gcc's convert(), but crashes if widening might happen. */ - -static tree -ffecom_convert_narrow_ (tree type, tree expr) -{ - register tree e = expr; - register enum tree_code code = TREE_CODE (type); - - if (type == TREE_TYPE (e) - || TREE_CODE (e) == ERROR_MARK) - return e; - if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (e))) - return fold (build1 (NOP_EXPR, type, e)); - if (TREE_CODE (TREE_TYPE (e)) == ERROR_MARK - || code == ERROR_MARK) - return error_mark_node; - if (TREE_CODE (TREE_TYPE (e)) == VOID_TYPE) - { - assert ("void value not ignored as it ought to be" == NULL); - return error_mark_node; - } - assert (code != VOID_TYPE); - if ((code != RECORD_TYPE) - && (TREE_CODE (TREE_TYPE (e)) == RECORD_TYPE)) - assert ("converting COMPLEX to REAL" == NULL); - assert (code != ENUMERAL_TYPE); - if (code == INTEGER_TYPE) - { - assert ((TREE_CODE (TREE_TYPE (e)) == INTEGER_TYPE - && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (e))) - || (TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE - && (TYPE_PRECISION (type) - == TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (e)))))); - return fold (convert_to_integer (type, e)); - } - if (code == POINTER_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE); - return fold (convert_to_pointer (type, e)); - } - if (code == REAL_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == REAL_TYPE); - assert (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (e))); - return fold (convert_to_real (type, e)); - } - if (code == COMPLEX_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == COMPLEX_TYPE); - assert (TYPE_PRECISION (TREE_TYPE (type)) <= TYPE_PRECISION (TREE_TYPE (TREE_TYPE (e)))); - return fold (convert_to_complex (type, e)); - } - if (code == RECORD_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == RECORD_TYPE); - /* Check that at least the first field name agrees. */ - assert (DECL_NAME (TYPE_FIELDS (type)) - == DECL_NAME (TYPE_FIELDS (TREE_TYPE (e)))); - assert (TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (type))) - <= TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (e))))); - if (TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (type))) - == TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (e))))) - return e; - return fold (ffecom_convert_to_complex_ (type, e)); - } - - assert ("conversion to non-scalar type requested" == NULL); - return error_mark_node; -} - -/* Like gcc's convert(), but crashes if narrowing might happen. */ - -static tree -ffecom_convert_widen_ (tree type, tree expr) -{ - register tree e = expr; - register enum tree_code code = TREE_CODE (type); - - if (type == TREE_TYPE (e) - || TREE_CODE (e) == ERROR_MARK) - return e; - if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (e))) - return fold (build1 (NOP_EXPR, type, e)); - if (TREE_CODE (TREE_TYPE (e)) == ERROR_MARK - || code == ERROR_MARK) - return error_mark_node; - if (TREE_CODE (TREE_TYPE (e)) == VOID_TYPE) - { - assert ("void value not ignored as it ought to be" == NULL); - return error_mark_node; - } - assert (code != VOID_TYPE); - if ((code != RECORD_TYPE) - && (TREE_CODE (TREE_TYPE (e)) == RECORD_TYPE)) - assert ("narrowing COMPLEX to REAL" == NULL); - assert (code != ENUMERAL_TYPE); - if (code == INTEGER_TYPE) - { - assert ((TREE_CODE (TREE_TYPE (e)) == INTEGER_TYPE - && TYPE_PRECISION (type) >= TYPE_PRECISION (TREE_TYPE (e))) - || (TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE - && (TYPE_PRECISION (type) - == TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (e)))))); - return fold (convert_to_integer (type, e)); - } - if (code == POINTER_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == POINTER_TYPE); - return fold (convert_to_pointer (type, e)); - } - if (code == REAL_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == REAL_TYPE); - assert (TYPE_PRECISION (type) >= TYPE_PRECISION (TREE_TYPE (e))); - return fold (convert_to_real (type, e)); - } - if (code == COMPLEX_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == COMPLEX_TYPE); - assert (TYPE_PRECISION (TREE_TYPE (type)) >= TYPE_PRECISION (TREE_TYPE (TREE_TYPE (e)))); - return fold (convert_to_complex (type, e)); - } - if (code == RECORD_TYPE) - { - assert (TREE_CODE (TREE_TYPE (e)) == RECORD_TYPE); - /* Check that at least the first field name agrees. */ - assert (DECL_NAME (TYPE_FIELDS (type)) - == DECL_NAME (TYPE_FIELDS (TREE_TYPE (e)))); - assert (TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (type))) - >= TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (e))))); - if (TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (type))) - == TYPE_PRECISION (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (e))))) - return e; - return fold (ffecom_convert_to_complex_ (type, e)); - } - - assert ("conversion to non-scalar type requested" == NULL); - return error_mark_node; -} - -/* Handles making a COMPLEX type, either the standard - (but buggy?) gbe way, or the safer (but less elegant?) - f2c way. */ - -static tree -ffecom_make_complex_type_ (tree subtype) -{ - tree type; - tree realfield; - tree imagfield; - - if (ffe_is_emulate_complex ()) - { - type = make_node (RECORD_TYPE); - realfield = ffecom_decl_field (type, NULL_TREE, "r", subtype); - imagfield = ffecom_decl_field (type, realfield, "i", subtype); - TYPE_FIELDS (type) = realfield; - layout_type (type); - } - else - { - type = make_node (COMPLEX_TYPE); - TREE_TYPE (type) = subtype; - layout_type (type); - } - - return type; -} - -/* Chooses either the gbe or the f2c way to build a - complex constant. */ - -static tree -ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart) -{ - tree bothparts; - - if (ffe_is_emulate_complex ()) - { - bothparts = build_tree_list (TYPE_FIELDS (type), realpart); - TREE_CHAIN (bothparts) = build_tree_list (TREE_CHAIN (TYPE_FIELDS (type)), imagpart); - bothparts = build_constructor (type, bothparts); - } - else - { - bothparts = build_complex (type, realpart, imagpart); - } - - return bothparts; -} - -static tree -ffecom_arglist_expr_ (const char *c, ffebld expr) -{ - tree list; - tree *plist = &list; - tree trail = NULL_TREE; /* Append char length args here. */ - tree *ptrail = &trail; - tree length; - ffebld exprh; - tree item; - bool ptr = FALSE; - tree wanted = NULL_TREE; - static const char zed[] = "0"; - - if (c == NULL) - c = &zed[0]; - - while (expr != NULL) - { - if (*c != '\0') - { - ptr = FALSE; - if (*c == '&') - { - ptr = TRUE; - ++c; - } - switch (*(c++)) - { - case '\0': - ptr = TRUE; - wanted = NULL_TREE; - break; - - case 'a': - assert (ptr); - wanted = NULL_TREE; - break; - - case 'c': - wanted = ffecom_f2c_complex_type_node; - break; - - case 'd': - wanted = ffecom_f2c_doublereal_type_node; - break; - - case 'e': - wanted = ffecom_f2c_doublecomplex_type_node; - break; - - case 'f': - wanted = ffecom_f2c_real_type_node; - break; - - case 'i': - wanted = ffecom_f2c_integer_type_node; - break; - - case 'j': - wanted = ffecom_f2c_longint_type_node; - break; - - default: - assert ("bad argstring code" == NULL); - wanted = NULL_TREE; - break; - } - } - - exprh = ffebld_head (expr); - if (exprh == NULL) - wanted = NULL_TREE; - - if ((wanted == NULL_TREE) - || (ptr - && (TYPE_MODE - (ffecom_tree_type[ffeinfo_basictype (ffebld_info (exprh))] - [ffeinfo_kindtype (ffebld_info (exprh))]) - == TYPE_MODE (wanted)))) - *plist - = build_tree_list (NULL_TREE, - ffecom_arg_ptr_to_expr (exprh, - &length)); - else - { - item = ffecom_arg_expr (exprh, &length); - item = ffecom_convert_widen_ (wanted, item); - if (ptr) - { - item = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (item)), - item); - } - *plist - = build_tree_list (NULL_TREE, - item); - } - - plist = &TREE_CHAIN (*plist); - expr = ffebld_trail (expr); - if (length != NULL_TREE) - { - *ptrail = build_tree_list (NULL_TREE, length); - ptrail = &TREE_CHAIN (*ptrail); - } - } - - /* We've run out of args in the call; if the implementation expects - more, supply null pointers for them, which the implementation can - check to see if an arg was omitted. */ - - while (*c != '\0' && *c != '0') - { - if (*c == '&') - ++c; - else - assert ("missing arg to run-time routine!" == NULL); - - switch (*(c++)) - { - case '\0': - case 'a': - case 'c': - case 'd': - case 'e': - case 'f': - case 'i': - case 'j': - break; - - default: - assert ("bad arg string code" == NULL); - break; - } - *plist - = build_tree_list (NULL_TREE, - null_pointer_node); - plist = &TREE_CHAIN (*plist); - } - - *plist = trail; - - return list; -} - -static tree -ffecom_widest_expr_type_ (ffebld list) -{ - ffebld item; - ffebld widest = NULL; - ffetype type; - ffetype widest_type = NULL; - tree t; - - for (; list != NULL; list = ffebld_trail (list)) - { - item = ffebld_head (list); - if (item == NULL) - continue; - if ((widest != NULL) - && (ffeinfo_basictype (ffebld_info (item)) - != ffeinfo_basictype (ffebld_info (widest)))) - continue; - type = ffeinfo_type (ffeinfo_basictype (ffebld_info (item)), - ffeinfo_kindtype (ffebld_info (item))); - if ((widest == FFEINFO_kindtypeNONE) - || (ffetype_size (type) - > ffetype_size (widest_type))) - { - widest = item; - widest_type = type; - } - } - - assert (widest != NULL); - t = ffecom_tree_type[ffeinfo_basictype (ffebld_info (widest))] - [ffeinfo_kindtype (ffebld_info (widest))]; - assert (t != NULL_TREE); - return t; -} - -/* Check whether a partial overlap between two expressions is possible. - - Can *starting* to write a portion of expr1 change the value - computed (perhaps already, *partially*) by expr2? - - Currently, this is a concern only for a COMPLEX expr1. But if it - isn't in COMMON or local EQUIVALENCE, since we don't support - aliasing of arguments, it isn't a concern. */ - -static bool -ffecom_possible_partial_overlap_ (ffebld expr1, ffebld expr2 ATTRIBUTE_UNUSED) -{ - ffesymbol sym; - ffestorag st; - - switch (ffebld_op (expr1)) - { - case FFEBLD_opSYMTER: - sym = ffebld_symter (expr1); - break; - - case FFEBLD_opARRAYREF: - if (ffebld_op (ffebld_left (expr1)) != FFEBLD_opSYMTER) - return FALSE; - sym = ffebld_symter (ffebld_left (expr1)); - break; - - default: - return FALSE; - } - - if (ffesymbol_where (sym) != FFEINFO_whereCOMMON - && (ffesymbol_where (sym) != FFEINFO_whereLOCAL - || ! (st = ffesymbol_storage (sym)) - || ! ffestorag_parent (st))) - return FALSE; - - /* It's in COMMON or local EQUIVALENCE. */ - - return TRUE; -} - -/* Check whether dest and source might overlap. ffebld versions of these - might or might not be passed, will be NULL if not. - - The test is really whether source_tree is modifiable and, if modified, - might overlap destination such that the value(s) in the destination might - change before it is finally modified. dest_* are the canonized - destination itself. */ - -static bool -ffecom_overlap_ (tree dest_decl, tree dest_offset, tree dest_size, - tree source_tree, ffebld source UNUSED, bool scalar_arg) -{ - tree source_decl; - tree source_offset; - tree source_size; - tree t; - - if (source_tree == NULL_TREE) - return FALSE; - - switch (TREE_CODE (source_tree)) - { - case ERROR_MARK: - case IDENTIFIER_NODE: - case INTEGER_CST: - case REAL_CST: - case COMPLEX_CST: - case STRING_CST: - case CONST_DECL: - case VAR_DECL: - case RESULT_DECL: - case FIELD_DECL: - case MINUS_EXPR: - case MULT_EXPR: - case TRUNC_DIV_EXPR: - case CEIL_DIV_EXPR: - case FLOOR_DIV_EXPR: - case ROUND_DIV_EXPR: - case TRUNC_MOD_EXPR: - case CEIL_MOD_EXPR: - case FLOOR_MOD_EXPR: - case ROUND_MOD_EXPR: - case RDIV_EXPR: - case EXACT_DIV_EXPR: - case FIX_TRUNC_EXPR: - case FIX_CEIL_EXPR: - case FIX_FLOOR_EXPR: - case FIX_ROUND_EXPR: - case FLOAT_EXPR: - case NEGATE_EXPR: - case MIN_EXPR: - case MAX_EXPR: - case ABS_EXPR: - case LSHIFT_EXPR: - case RSHIFT_EXPR: - case LROTATE_EXPR: - case RROTATE_EXPR: - case BIT_IOR_EXPR: - case BIT_XOR_EXPR: - case BIT_AND_EXPR: - case BIT_NOT_EXPR: - case TRUTH_ANDIF_EXPR: - case TRUTH_ORIF_EXPR: - case TRUTH_AND_EXPR: - case TRUTH_OR_EXPR: - case TRUTH_XOR_EXPR: - case TRUTH_NOT_EXPR: - case LT_EXPR: - case LE_EXPR: - case GT_EXPR: - case GE_EXPR: - case EQ_EXPR: - case NE_EXPR: - case COMPLEX_EXPR: - case CONJ_EXPR: - case REALPART_EXPR: - case IMAGPART_EXPR: - case LABEL_EXPR: - case COMPONENT_REF: - return FALSE; - - case COMPOUND_EXPR: - return ffecom_overlap_ (dest_decl, dest_offset, dest_size, - TREE_OPERAND (source_tree, 1), NULL, - scalar_arg); - - case MODIFY_EXPR: - return ffecom_overlap_ (dest_decl, dest_offset, dest_size, - TREE_OPERAND (source_tree, 0), NULL, - scalar_arg); - - case CONVERT_EXPR: - case NOP_EXPR: - case NON_LVALUE_EXPR: - case PLUS_EXPR: - if (TREE_CODE (TREE_TYPE (source_tree)) != POINTER_TYPE) - return TRUE; - - ffecom_tree_canonize_ptr_ (&source_decl, &source_offset, - source_tree); - source_size = TYPE_SIZE (TREE_TYPE (TREE_TYPE (source_tree))); - break; - - case COND_EXPR: - return - ffecom_overlap_ (dest_decl, dest_offset, dest_size, - TREE_OPERAND (source_tree, 1), NULL, - scalar_arg) - || ffecom_overlap_ (dest_decl, dest_offset, dest_size, - TREE_OPERAND (source_tree, 2), NULL, - scalar_arg); - - - case ADDR_EXPR: - ffecom_tree_canonize_ref_ (&source_decl, &source_offset, - &source_size, - TREE_OPERAND (source_tree, 0)); - break; - - case PARM_DECL: - if (TREE_CODE (TREE_TYPE (source_tree)) != POINTER_TYPE) - return TRUE; - - source_decl = source_tree; - source_offset = bitsize_zero_node; - source_size = TYPE_SIZE (TREE_TYPE (TREE_TYPE (source_tree))); - break; - - case SAVE_EXPR: - case REFERENCE_EXPR: - case PREDECREMENT_EXPR: - case PREINCREMENT_EXPR: - case POSTDECREMENT_EXPR: - case POSTINCREMENT_EXPR: - case INDIRECT_REF: - case ARRAY_REF: - case CALL_EXPR: - default: - return TRUE; - } - - /* Come here when source_decl, source_offset, and source_size filled - in appropriately. */ - - if (source_decl == NULL_TREE) - return FALSE; /* No decl involved, so no overlap. */ - - if (source_decl != dest_decl) - return FALSE; /* Different decl, no overlap. */ - - if (TREE_CODE (dest_size) == ERROR_MARK) - return TRUE; /* Assignment into entire assumed-size - array? Shouldn't happen.... */ - - t = ffecom_2 (LE_EXPR, integer_type_node, - ffecom_2 (PLUS_EXPR, TREE_TYPE (dest_offset), - dest_offset, - convert (TREE_TYPE (dest_offset), - dest_size)), - convert (TREE_TYPE (dest_offset), - source_offset)); - - if (integer_onep (t)) - return FALSE; /* Destination precedes source. */ - - if (!scalar_arg - || (source_size == NULL_TREE) - || (TREE_CODE (source_size) == ERROR_MARK) - || integer_zerop (source_size)) - return TRUE; /* No way to tell if dest follows source. */ - - t = ffecom_2 (LE_EXPR, integer_type_node, - ffecom_2 (PLUS_EXPR, TREE_TYPE (source_offset), - source_offset, - convert (TREE_TYPE (source_offset), - source_size)), - convert (TREE_TYPE (source_offset), - dest_offset)); - - if (integer_onep (t)) - return FALSE; /* Destination follows source. */ - - return TRUE; /* Destination and source overlap. */ -} - -/* Check whether dest might overlap any of a list of arguments or is - in a COMMON area the callee might know about (and thus modify). */ - -static bool -ffecom_args_overlapping_ (tree dest_tree, ffebld dest UNUSED, tree args, - tree callee_commons, bool scalar_args) -{ - tree arg; - tree dest_decl; - tree dest_offset; - tree dest_size; - - ffecom_tree_canonize_ref_ (&dest_decl, &dest_offset, &dest_size, - dest_tree); - - if (dest_decl == NULL_TREE) - return FALSE; /* Seems unlikely! */ - - /* If the decl cannot be determined reliably, or if its in COMMON - and the callee isn't known to not futz with COMMON via other - means, overlap might happen. */ - - if ((TREE_CODE (dest_decl) == ERROR_MARK) - || ((callee_commons != NULL_TREE) - && TREE_PUBLIC (dest_decl))) - return TRUE; - - for (; args != NULL_TREE; args = TREE_CHAIN (args)) - { - if (((arg = TREE_VALUE (args)) != NULL_TREE) - && ffecom_overlap_ (dest_decl, dest_offset, dest_size, - arg, NULL, scalar_args)) - return TRUE; - } - - return FALSE; -} - -/* Build a string for a variable name as used by NAMELIST. This means that - if we're using the f2c library, we build an uppercase string, since - f2c does this. */ - -static tree -ffecom_build_f2c_string_ (int i, const char *s) -{ - if (!ffe_is_f2c_library ()) - return build_string (i, s); - - { - char *tmp; - const char *p; - char *q; - char space[34]; - tree t; - - if (((size_t) i) > ARRAY_SIZE (space)) - tmp = malloc_new_ks (malloc_pool_image (), "f2c_string", i); - else - tmp = &space[0]; - - for (p = s, q = tmp; *p != '\0'; ++p, ++q) - *q = TOUPPER (*p); - *q = '\0'; - - t = build_string (i, tmp); - - if (((size_t) i) > ARRAY_SIZE (space)) - malloc_kill_ks (malloc_pool_image (), tmp, i); - - return t; - } -} - -/* Returns CALL_EXPR or equivalent with given type (pass NULL_TREE for - type to just get whatever the function returns), handling the - f2c value-returning convention, if required, by prepending - to the arglist a pointer to a temporary to receive the return value. */ - -static tree -ffecom_call_ (tree fn, ffeinfoKindtype kt, bool is_f2c_complex, tree type, - tree args, tree dest_tree, ffebld dest, bool *dest_used, - tree callee_commons, bool scalar_args, tree hook) -{ - tree item; - tree tempvar; - - if (dest_used != NULL) - *dest_used = FALSE; - - if (is_f2c_complex) - { - if ((dest_used == NULL) - || (dest == NULL) - || (ffeinfo_basictype (ffebld_info (dest)) - != FFEINFO_basictypeCOMPLEX) - || (ffeinfo_kindtype (ffebld_info (dest)) != kt) - || ((type != NULL_TREE) && (TREE_TYPE (dest_tree) != type)) - || ffecom_args_overlapping_ (dest_tree, dest, args, - callee_commons, - scalar_args)) - { - tempvar = hook; - assert (tempvar); - } - else - { - *dest_used = TRUE; - tempvar = dest_tree; - type = NULL_TREE; - } - - item - = build_tree_list (NULL_TREE, - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (tempvar)), - tempvar)); - TREE_CHAIN (item) = args; - - item = ffecom_3s (CALL_EXPR, TREE_TYPE (TREE_TYPE (TREE_TYPE (fn))), fn, - item, NULL_TREE); - - if (tempvar != dest_tree) - item = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (tempvar), item, tempvar); - } - else - item = ffecom_3s (CALL_EXPR, TREE_TYPE (TREE_TYPE (TREE_TYPE (fn))), fn, - args, NULL_TREE); - - if ((type != NULL_TREE) && (TREE_TYPE (item) != type)) - item = ffecom_convert_narrow_ (type, item); - - return item; -} - -/* Given two arguments, transform them and make a call to the given - function via ffecom_call_. */ - -static tree -ffecom_call_binop_ (tree fn, ffeinfoKindtype kt, bool is_f2c_complex, - tree type, ffebld left, ffebld right, tree dest_tree, - ffebld dest, bool *dest_used, tree callee_commons, - bool scalar_args, bool ref, tree hook) -{ - tree left_tree; - tree right_tree; - tree left_length; - tree right_length; - - if (ref) - { - /* Pass arguments by reference. */ - left_tree = ffecom_arg_ptr_to_expr (left, &left_length); - right_tree = ffecom_arg_ptr_to_expr (right, &right_length); - } - else - { - /* Pass arguments by value. */ - left_tree = ffecom_arg_expr (left, &left_length); - right_tree = ffecom_arg_expr (right, &right_length); - } - - - left_tree = build_tree_list (NULL_TREE, left_tree); - right_tree = build_tree_list (NULL_TREE, right_tree); - TREE_CHAIN (left_tree) = right_tree; - - if (left_length != NULL_TREE) - { - left_length = build_tree_list (NULL_TREE, left_length); - TREE_CHAIN (right_tree) = left_length; - } - - if (right_length != NULL_TREE) - { - right_length = build_tree_list (NULL_TREE, right_length); - if (left_length != NULL_TREE) - TREE_CHAIN (left_length) = right_length; - else - TREE_CHAIN (right_tree) = right_length; - } - - return ffecom_call_ (fn, kt, is_f2c_complex, type, left_tree, - dest_tree, dest, dest_used, callee_commons, - scalar_args, hook); -} - -/* Return ptr/length args for char subexpression - - Handles CHARACTER-type CONTER, SYMTER, SUBSTR, ARRAYREF, and FUNCREF - subexpressions by constructing the appropriate trees for the ptr-to- - character-text and length-of-character-text arguments in a calling - sequence. - - Note that if with_null is TRUE, and the expression is an opCONTER, - a null byte is appended to the string. */ - -static void -ffecom_char_args_x_ (tree *xitem, tree *length, ffebld expr, bool with_null) -{ - tree item; - tree high; - ffetargetCharacter1 val; - ffetargetCharacterSize newlen; - - switch (ffebld_op (expr)) - { - case FFEBLD_opCONTER: - val = ffebld_constant_character1 (ffebld_conter (expr)); - newlen = ffetarget_length_character1 (val); - if (with_null) - { - /* Begin FFETARGET-NULL-KLUDGE. */ - if (newlen != 0) - ++newlen; - } - *length = build_int_2 (newlen, 0); - TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node; - high = build_int_2 (newlen, 0); - TREE_TYPE (high) = ffecom_f2c_ftnlen_type_node; - item = build_string (newlen, - ffetarget_text_character1 (val)); - /* End FFETARGET-NULL-KLUDGE. */ - TREE_TYPE (item) - = build_type_variant - (build_array_type - (char_type_node, - build_range_type - (ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - high)), - 1, 0); - TREE_CONSTANT (item) = 1; - TREE_STATIC (item) = 1; - item = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (item)), - item); - break; - - case FFEBLD_opSYMTER: - { - ffesymbol s = ffebld_symter (expr); - - item = ffesymbol_hook (s).decl_tree; - if (item == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - item = ffesymbol_hook (s).decl_tree; - } - if (ffesymbol_kind (s) == FFEINFO_kindENTITY) - { - if (ffesymbol_size (s) == FFETARGET_charactersizeNONE) - *length = ffesymbol_hook (s).length_tree; - else - { - *length = build_int_2 (ffesymbol_size (s), 0); - TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node; - } - } - else if (item == error_mark_node) - *length = error_mark_node; - else - /* FFEINFO_kindFUNCTION. */ - *length = NULL_TREE; - if (!ffesymbol_hook (s).addr - && (item != error_mark_node)) - item = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (item)), - item); - } - break; - - case FFEBLD_opARRAYREF: - { - ffecom_char_args_ (&item, length, ffebld_left (expr)); - - if (item == error_mark_node || *length == error_mark_node) - { - item = *length = error_mark_node; - break; - } - - item = ffecom_arrayref_ (item, expr, 1); - } - break; - - case FFEBLD_opSUBSTR: - { - ffebld start; - ffebld end; - ffebld thing = ffebld_right (expr); - tree start_tree; - tree end_tree; - const char *char_name; - ffebld left_symter; - tree array; - - assert (ffebld_op (thing) == FFEBLD_opITEM); - start = ffebld_head (thing); - thing = ffebld_trail (thing); - assert (ffebld_trail (thing) == NULL); - end = ffebld_head (thing); - - /* Determine name for pretty-printing range-check errors. */ - for (left_symter = ffebld_left (expr); - left_symter && ffebld_op (left_symter) == FFEBLD_opARRAYREF; - left_symter = ffebld_left (left_symter)) - ; - if (ffebld_op (left_symter) == FFEBLD_opSYMTER) - char_name = ffesymbol_text (ffebld_symter (left_symter)); - else - char_name = "[expr?]"; - - ffecom_char_args_ (&item, length, ffebld_left (expr)); - - if (item == error_mark_node || *length == error_mark_node) - { - item = *length = error_mark_node; - break; - } - - array = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item))); - - /* ~~~~Handle INTEGER*8 start/end, a la FFEBLD_opARRAYREF. */ - - if (start == NULL) - { - if (end == NULL) - ; - else - { - end_tree = ffecom_expr (end); - if (flag_bounds_check) - end_tree = ffecom_subscript_check_ (array, end_tree, 1, 0, - char_name, NULL_TREE); - end_tree = convert (ffecom_f2c_ftnlen_type_node, - end_tree); - - if (end_tree == error_mark_node) - { - item = *length = error_mark_node; - break; - } - - *length = end_tree; - } - } - else - { - start_tree = ffecom_expr (start); - if (flag_bounds_check) - start_tree = ffecom_subscript_check_ (array, start_tree, 0, 0, - char_name, NULL_TREE); - start_tree = convert (ffecom_f2c_ftnlen_type_node, - start_tree); - - if (start_tree == error_mark_node) - { - item = *length = error_mark_node; - break; - } - - start_tree = ffecom_save_tree (start_tree); - - item = ffecom_2 (PLUS_EXPR, TREE_TYPE (item), - item, - ffecom_2 (MINUS_EXPR, - TREE_TYPE (start_tree), - start_tree, - ffecom_f2c_ftnlen_one_node)); - - if (end == NULL) - { - *length = ffecom_2 (PLUS_EXPR, ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - ffecom_2 (MINUS_EXPR, - ffecom_f2c_ftnlen_type_node, - *length, - start_tree)); - } - else - { - end_tree = ffecom_expr (end); - if (flag_bounds_check) - end_tree = ffecom_subscript_check_ (array, end_tree, 1, 0, - char_name, NULL_TREE); - end_tree = convert (ffecom_f2c_ftnlen_type_node, - end_tree); - - if (end_tree == error_mark_node) - { - item = *length = error_mark_node; - break; - } - - *length = ffecom_2 (PLUS_EXPR, ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - ffecom_2 (MINUS_EXPR, - ffecom_f2c_ftnlen_type_node, - end_tree, start_tree)); - } - } - } - break; - - case FFEBLD_opFUNCREF: - { - ffesymbol s = ffebld_symter (ffebld_left (expr)); - tree tempvar; - tree args; - ffetargetCharacterSize size = ffeinfo_size (ffebld_info (expr)); - ffecomGfrt ix; - - if (size == FFETARGET_charactersizeNONE) - /* ~~Kludge alert! This should someday be fixed. */ - size = 24; - - *length = build_int_2 (size, 0); - TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node; - - if (ffeinfo_where (ffebld_info (ffebld_left (expr))) - == FFEINFO_whereINTRINSIC) - { - if (size == 1) - { - /* Invocation of an intrinsic returning CHARACTER*1. */ - item = ffecom_expr_intrinsic_ (expr, NULL_TREE, - NULL, NULL); - break; - } - ix = ffeintrin_gfrt_direct (ffebld_symter_implementation (ffebld_left (expr))); - assert (ix != FFECOM_gfrt); - item = ffecom_gfrt_tree_ (ix); - } - else - { - ix = FFECOM_gfrt; - item = ffesymbol_hook (s).decl_tree; - if (item == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - item = ffesymbol_hook (s).decl_tree; - } - if (item == error_mark_node) - { - item = *length = error_mark_node; - break; - } - - if (!ffesymbol_hook (s).addr) - item = ffecom_1_fn (item); - } - tempvar = ffebld_nonter_hook (expr); - assert (tempvar); - tempvar = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (tempvar)), - tempvar); - - args = build_tree_list (NULL_TREE, tempvar); - - if (ffesymbol_where (s) == FFEINFO_whereCONSTANT) /* Sfunc args by value. */ - TREE_CHAIN (args) = ffecom_list_expr (ffebld_right (expr)); - else - { - TREE_CHAIN (args) = build_tree_list (NULL_TREE, *length); - if (ffesymbol_where (s) == FFEINFO_whereINTRINSIC) - { - TREE_CHAIN (TREE_CHAIN (args)) - = ffecom_arglist_expr_ (ffecom_gfrt_args_ (ix), - ffebld_right (expr)); - } - else - { - TREE_CHAIN (TREE_CHAIN (args)) - = ffecom_list_ptr_to_expr (ffebld_right (expr)); - } - } - - item = ffecom_3s (CALL_EXPR, - TREE_TYPE (TREE_TYPE (TREE_TYPE (item))), - item, args, NULL_TREE); - item = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (tempvar), item, - tempvar); - } - break; - - case FFEBLD_opCONVERT: - - ffecom_char_args_ (&item, length, ffebld_left (expr)); - - if (item == error_mark_node || *length == error_mark_node) - { - item = *length = error_mark_node; - break; - } - - if ((ffebld_size_known (ffebld_left (expr)) - == FFETARGET_charactersizeNONE) - || (ffebld_size_known (ffebld_left (expr)) < (ffebld_size (expr)))) - { /* Possible blank-padding needed, copy into - temporary. */ - tree tempvar; - tree args; - tree newlen; - - tempvar = ffebld_nonter_hook (expr); - assert (tempvar); - tempvar = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (tempvar)), - tempvar); - - newlen = build_int_2 (ffebld_size (expr), 0); - TREE_TYPE (newlen) = ffecom_f2c_ftnlen_type_node; - - args = build_tree_list (NULL_TREE, tempvar); - TREE_CHAIN (args) = build_tree_list (NULL_TREE, item); - TREE_CHAIN (TREE_CHAIN (args)) = build_tree_list (NULL_TREE, newlen); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (args))) - = build_tree_list (NULL_TREE, *length); - - item = ffecom_call_gfrt (FFECOM_gfrtCOPY, args, NULL_TREE); - TREE_SIDE_EFFECTS (item) = 1; - item = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (tempvar), fold (item), - tempvar); - *length = newlen; - } - else - { /* Just truncate the length. */ - *length = build_int_2 (ffebld_size (expr), 0); - TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node; - } - break; - - default: - assert ("bad op for single char arg expr" == NULL); - item = NULL_TREE; - break; - } - - *xitem = item; -} - -/* Check the size of the type to be sure it doesn't overflow the - "portable" capacities of the compiler back end. `dummy' types - can generally overflow the normal sizes as long as the computations - themselves don't overflow. A particular target of the back end - must still enforce its size requirements, though, and the back - end takes care of this in stor-layout.c. */ - -static tree -ffecom_check_size_overflow_ (ffesymbol s, tree type, bool dummy) -{ - if (TREE_CODE (type) == ERROR_MARK) - return type; - - if (TYPE_SIZE (type) == NULL_TREE) - return type; - - if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) - return type; - - /* An array is too large if size is negative or the type_size overflows - or its "upper half" is larger than 3 (which would make the signed - byte size and offset computations overflow). */ - - if ((tree_int_cst_sgn (TYPE_SIZE (type)) < 0) - || (!dummy && (TREE_INT_CST_HIGH (TYPE_SIZE (type)) > 3 - || TREE_OVERFLOW (TYPE_SIZE (type))))) - { - ffebad_start (FFEBAD_ARRAY_LARGE); - ffebad_string (ffesymbol_text (s)); - ffebad_here (0, ffesymbol_where_line (s), ffesymbol_where_column (s)); - ffebad_finish (); - - return error_mark_node; - } - - return type; -} - -/* Builds a length argument (PARM_DECL). Also wraps type in an array type - where the dimension info is (1:size) where is ffesymbol_size(s) if - known, length_arg if not known (FFETARGET_charactersizeNONE). */ - -static tree -ffecom_char_enhance_arg_ (tree *xtype, ffesymbol s) -{ - ffetargetCharacterSize sz = ffesymbol_size (s); - tree highval; - tree tlen; - tree type = *xtype; - - if (ffesymbol_where (s) == FFEINFO_whereCONSTANT) - tlen = NULL_TREE; /* A statement function, no length passed. */ - else - { - if (ffesymbol_where (s) == FFEINFO_whereDUMMY) - tlen = ffecom_get_invented_identifier ("__g77_length_%s", - ffesymbol_text (s)); - else - tlen = ffecom_get_invented_identifier ("__g77_%s", "length"); - tlen = build_decl (PARM_DECL, tlen, ffecom_f2c_ftnlen_type_node); - DECL_ARTIFICIAL (tlen) = 1; - } - - if (sz == FFETARGET_charactersizeNONE) - { - assert (tlen != NULL_TREE); - highval = variable_size (tlen); - } - else - { - highval = build_int_2 (sz, 0); - TREE_TYPE (highval) = ffecom_f2c_ftnlen_type_node; - } - - type = build_array_type (type, - build_range_type (ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - highval)); - - *xtype = type; - return tlen; -} - -/* ffecom_concat_list_gather_ -- Gather list of concatenated string exprs - - ffecomConcatList_ catlist; - ffebld expr; // expr of CHARACTER basictype. - ffetargetCharacterSize max; // max chars to gather or _...NONE if no max - catlist = ffecom_concat_list_gather_(catlist,expr,max); - - Scans expr for character subexpressions, updates and returns catlist - accordingly. */ - -static ffecomConcatList_ -ffecom_concat_list_gather_ (ffecomConcatList_ catlist, ffebld expr, - ffetargetCharacterSize max) -{ - ffetargetCharacterSize sz; - - recurse: - - if (expr == NULL) - return catlist; - - if ((max != FFETARGET_charactersizeNONE) && (catlist.minlen >= max)) - return catlist; /* Don't append any more items. */ - - switch (ffebld_op (expr)) - { - case FFEBLD_opCONTER: - case FFEBLD_opSYMTER: - case FFEBLD_opARRAYREF: - case FFEBLD_opFUNCREF: - case FFEBLD_opSUBSTR: - case FFEBLD_opCONVERT: /* Callers should strip this off beforehand - if they don't need to preserve it. */ - if (catlist.count == catlist.max) - { /* Make a (larger) list. */ - ffebld *newx; - int newmax; - - newmax = (catlist.max == 0) ? 8 : catlist.max * 2; - newx = malloc_new_ks (malloc_pool_image (), "catlist", - newmax * sizeof (newx[0])); - if (catlist.max != 0) - { - memcpy (newx, catlist.exprs, catlist.max * sizeof (newx[0])); - malloc_kill_ks (malloc_pool_image (), catlist.exprs, - catlist.max * sizeof (newx[0])); - } - catlist.max = newmax; - catlist.exprs = newx; - } - if ((sz = ffebld_size_known (expr)) != FFETARGET_charactersizeNONE) - catlist.minlen += sz; - else - ++catlist.minlen; /* Not true for F90; can be 0 length. */ - if ((sz = ffebld_size_max (expr)) == FFETARGET_charactersizeNONE) - catlist.maxlen = sz; - else - catlist.maxlen += sz; - if ((max != FFETARGET_charactersizeNONE) && (catlist.minlen > max)) - { /* This item overlaps (or is beyond) the end - of the destination. */ - switch (ffebld_op (expr)) - { - case FFEBLD_opCONTER: - case FFEBLD_opSYMTER: - case FFEBLD_opARRAYREF: - case FFEBLD_opFUNCREF: - case FFEBLD_opSUBSTR: - /* ~~Do useful truncations here. */ - break; - - default: - assert ("op changed or inconsistent switches!" == NULL); - break; - } - } - catlist.exprs[catlist.count++] = expr; - return catlist; - - case FFEBLD_opPAREN: - expr = ffebld_left (expr); - goto recurse; /* :::::::::::::::::::: */ - - case FFEBLD_opCONCATENATE: - catlist = ffecom_concat_list_gather_ (catlist, ffebld_left (expr), max); - expr = ffebld_right (expr); - goto recurse; /* :::::::::::::::::::: */ - -#if 0 /* Breaks passing small actual arg to larger - dummy arg of sfunc */ - case FFEBLD_opCONVERT: - expr = ffebld_left (expr); - { - ffetargetCharacterSize cmax; - - cmax = catlist.len + ffebld_size_known (expr); - - if ((max == FFETARGET_charactersizeNONE) || (max > cmax)) - max = cmax; - } - goto recurse; /* :::::::::::::::::::: */ -#endif - - case FFEBLD_opANY: - return catlist; - - default: - assert ("bad op in _gather_" == NULL); - return catlist; - } -} - -/* ffecom_concat_list_kill_ -- Kill list of concatenated string exprs - - ffecomConcatList_ catlist; - ffecom_concat_list_kill_(catlist); - - Anything allocated within the list info is deallocated. */ - -static void -ffecom_concat_list_kill_ (ffecomConcatList_ catlist) -{ - if (catlist.max != 0) - malloc_kill_ks (malloc_pool_image (), catlist.exprs, - catlist.max * sizeof (catlist.exprs[0])); -} - -/* Make list of concatenated string exprs. - - Returns a flattened list of concatenated subexpressions given a - tree of such expressions. */ - -static ffecomConcatList_ -ffecom_concat_list_new_ (ffebld expr, ffetargetCharacterSize max) -{ - ffecomConcatList_ catlist; - - catlist.maxlen = catlist.minlen = catlist.max = catlist.count = 0; - return ffecom_concat_list_gather_ (catlist, expr, max); -} - -/* Provide some kind of useful info on member of aggregate area, - since current g77/gcc technology does not provide debug info - on these members. */ - -static void -ffecom_debug_kludge_ (tree aggr, const char *aggr_type, ffesymbol member, - tree member_type UNUSED, ffetargetOffset offset) -{ - tree value; - tree decl; - int len; - char *buff; - char space[120]; -#if 0 - tree type_id; - - for (type_id = member_type; - TREE_CODE (type_id) != IDENTIFIER_NODE; - ) - { - switch (TREE_CODE (type_id)) - { - case INTEGER_TYPE: - case REAL_TYPE: - type_id = TYPE_NAME (type_id); - break; - - case ARRAY_TYPE: - case COMPLEX_TYPE: - type_id = TREE_TYPE (type_id); - break; - - default: - assert ("no IDENTIFIER_NODE for type!" == NULL); - type_id = error_mark_node; - break; - } - } -#endif - - if (ffecom_transform_only_dummies_ - || !ffe_is_debug_kludge ()) - return; /* Can't do this yet, maybe later. */ - - len = 60 - + strlen (aggr_type) - + IDENTIFIER_LENGTH (DECL_NAME (aggr)); -#if 0 - + IDENTIFIER_LENGTH (type_id); -#endif - - if (((size_t) len) >= ARRAY_SIZE (space)) - buff = malloc_new_ks (malloc_pool_image (), "debug_kludge", len + 1); - else - buff = &space[0]; - - sprintf (&buff[0], "At (%s) `%s' plus %ld bytes", - aggr_type, - IDENTIFIER_POINTER (DECL_NAME (aggr)), - (long int) offset); - - value = build_string (len, buff); - TREE_TYPE (value) - = build_type_variant (build_array_type (char_type_node, - build_range_type - (integer_type_node, - integer_one_node, - build_int_2 (strlen (buff), 0))), - 1, 0); - decl = build_decl (VAR_DECL, - ffecom_get_identifier_ (ffesymbol_text (member)), - TREE_TYPE (value)); - TREE_CONSTANT (decl) = 1; - TREE_STATIC (decl) = 1; - DECL_INITIAL (decl) = error_mark_node; - DECL_IN_SYSTEM_HEADER (decl) = 1; /* Don't let -Wunused complain. */ - decl = start_decl (decl, FALSE); - finish_decl (decl, value, FALSE); - - if (buff != &space[0]) - malloc_kill_ks (malloc_pool_image (), buff, len + 1); -} - -/* ffecom_do_entry_ -- Do compilation of a particular entrypoint - - ffesymbol fn; // the SUBROUTINE, FUNCTION, or ENTRY symbol itself - int i; // entry# for this entrypoint (used by master fn) - ffecom_do_entrypoint_(s,i); - - Makes a public entry point that calls our private master fn (already - compiled). */ - -static void -ffecom_do_entry_ (ffesymbol fn, int entrynum) -{ - ffebld item; - tree type; /* Type of function. */ - tree multi_retval; /* Var holding return value (union). */ - tree result; /* Var holding result. */ - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffeglobal g; - ffeglobalType gt; - bool charfunc; /* All entry points return same type - CHARACTER. */ - bool cmplxfunc; /* Use f2c way of returning COMPLEX. */ - bool multi; /* Master fn has multiple return types. */ - bool altreturning = FALSE; /* This entry point has alternate - returns. */ - location_t old_loc = input_location; - - input_filename = ffesymbol_where_filename (fn); - input_line = ffesymbol_where_filelinenum (fn); - - ffecom_doing_entry_ = TRUE; /* Don't bother with array dimensions. */ - - switch (ffecom_primary_entry_kind_) - { - case FFEINFO_kindFUNCTION: - - /* Determine actual return type for function. */ - - gt = FFEGLOBAL_typeFUNC; - bt = ffesymbol_basictype (fn); - kt = ffesymbol_kindtype (fn); - if (bt == FFEINFO_basictypeNONE) - { - ffeimplic_establish_symbol (fn); - if (ffesymbol_funcresult (fn) != NULL) - ffeimplic_establish_symbol (ffesymbol_funcresult (fn)); - bt = ffesymbol_basictype (fn); - kt = ffesymbol_kindtype (fn); - } - - if (bt == FFEINFO_basictypeCHARACTER) - charfunc = TRUE, cmplxfunc = FALSE; - else if ((bt == FFEINFO_basictypeCOMPLEX) - && ffesymbol_is_f2c (fn)) - charfunc = FALSE, cmplxfunc = TRUE; - else - charfunc = cmplxfunc = FALSE; - - if (charfunc) - type = ffecom_tree_fun_type_void; - else if (ffesymbol_is_f2c (fn)) - type = ffecom_tree_fun_type[bt][kt]; - else - type = build_function_type (ffecom_tree_type[bt][kt], NULL_TREE); - - if ((type == NULL_TREE) - || (TREE_TYPE (type) == NULL_TREE)) - type = ffecom_tree_fun_type_void; /* _sym_exec_transition. */ - - multi = (ffecom_master_bt_ == FFEINFO_basictypeNONE); - break; - - case FFEINFO_kindSUBROUTINE: - gt = FFEGLOBAL_typeSUBR; - bt = FFEINFO_basictypeNONE; - kt = FFEINFO_kindtypeNONE; - if (ffecom_is_altreturning_) - { /* Am _I_ altreturning? */ - for (item = ffesymbol_dummyargs (fn); - item != NULL; - item = ffebld_trail (item)) - { - if (ffebld_op (ffebld_head (item)) == FFEBLD_opSTAR) - { - altreturning = TRUE; - break; - } - } - if (altreturning) - type = ffecom_tree_subr_type; - else - type = ffecom_tree_fun_type_void; - } - else - type = ffecom_tree_fun_type_void; - charfunc = FALSE; - cmplxfunc = FALSE; - multi = FALSE; - break; - - default: - assert ("say what??" == NULL); - /* Fall through. */ - case FFEINFO_kindANY: - gt = FFEGLOBAL_typeANY; - bt = FFEINFO_basictypeNONE; - kt = FFEINFO_kindtypeNONE; - type = error_mark_node; - charfunc = FALSE; - cmplxfunc = FALSE; - multi = FALSE; - break; - } - - /* build_decl uses the current lineno and input_filename to set the decl - source info. So, I've putzed with ffestd and ffeste code to update that - source info to point to the appropriate statement just before calling - ffecom_do_entrypoint (which calls this fn). */ - - start_function (ffecom_get_external_identifier_ (fn), - type, - 0, /* nested/inline */ - 1); /* TREE_PUBLIC */ - - if (((g = ffesymbol_global (fn)) != NULL) - && ((ffeglobal_type (g) == gt) - || (ffeglobal_type (g) == FFEGLOBAL_typeEXT))) - { - ffeglobal_set_hook (g, current_function_decl); - } - - /* Reset args in master arg list so they get retransitioned. */ - - for (item = ffecom_master_arglist_; - item != NULL; - item = ffebld_trail (item)) - { - ffebld arg; - ffesymbol s; - - arg = ffebld_head (item); - if (ffebld_op (arg) != FFEBLD_opSYMTER) - continue; /* Alternate return or some such thing. */ - s = ffebld_symter (arg); - ffesymbol_hook (s).decl_tree = NULL_TREE; - ffesymbol_hook (s).length_tree = NULL_TREE; - } - - /* Build dummy arg list for this entry point. */ - - if (charfunc || cmplxfunc) - { /* Prepend arg for where result goes. */ - tree type; - tree length; - - if (charfunc) - type = ffecom_tree_type[FFEINFO_basictypeCHARACTER][kt]; - else - type = ffecom_tree_type[FFEINFO_basictypeCOMPLEX][kt]; - - result = ffecom_get_invented_identifier ("__g77_%s", "result"); - - /* Make length arg _and_ enhance type info for CHAR arg itself. */ - - if (charfunc) - length = ffecom_char_enhance_arg_ (&type, fn); - else - length = NULL_TREE; /* Not ref'd if !charfunc. */ - - type = build_pointer_type (type); - result = build_decl (PARM_DECL, result, type); - - push_parm_decl (result); - ffecom_func_result_ = result; - - if (charfunc) - { - push_parm_decl (length); - ffecom_func_length_ = length; - } - } - else - result = DECL_RESULT (current_function_decl); - - ffecom_push_dummy_decls_ (ffesymbol_dummyargs (fn), FALSE); - - store_parm_decls (0); - - ffecom_start_compstmt (); - /* Disallow temp vars at this level. */ - current_binding_level->prep_state = 2; - - /* Make local var to hold return type for multi-type master fn. */ - - if (multi) - { - multi_retval = ffecom_get_invented_identifier ("__g77_%s", - "multi_retval"); - multi_retval = build_decl (VAR_DECL, multi_retval, - ffecom_multi_type_node_); - multi_retval = start_decl (multi_retval, FALSE); - finish_decl (multi_retval, NULL_TREE, FALSE); - } - else - multi_retval = NULL_TREE; /* Not actually ref'd if !multi. */ - - /* Here we emit the actual code for the entry point. */ - - { - ffebld list; - ffebld arg; - ffesymbol s; - tree arglist = NULL_TREE; - tree *plist = &arglist; - tree prepend; - tree call; - tree actarg; - tree master_fn; - - /* Prepare actual arg list based on master arg list. */ - - for (list = ffecom_master_arglist_; - list != NULL; - list = ffebld_trail (list)) - { - arg = ffebld_head (list); - if (ffebld_op (arg) != FFEBLD_opSYMTER) - continue; - s = ffebld_symter (arg); - if (ffesymbol_hook (s).decl_tree == NULL_TREE - || ffesymbol_hook (s).decl_tree == error_mark_node) - actarg = null_pointer_node; /* We don't have this arg. */ - else - actarg = ffesymbol_hook (s).decl_tree; - *plist = build_tree_list (NULL_TREE, actarg); - plist = &TREE_CHAIN (*plist); - } - - /* This code appends the length arguments for character - variables/arrays. */ - - for (list = ffecom_master_arglist_; - list != NULL; - list = ffebld_trail (list)) - { - arg = ffebld_head (list); - if (ffebld_op (arg) != FFEBLD_opSYMTER) - continue; - s = ffebld_symter (arg); - if (ffesymbol_basictype (s) != FFEINFO_basictypeCHARACTER) - continue; /* Only looking for CHARACTER arguments. */ - if (ffesymbol_kind (s) != FFEINFO_kindENTITY) - continue; /* Only looking for variables and arrays. */ - if (ffesymbol_hook (s).length_tree == NULL_TREE - || ffesymbol_hook (s).length_tree == error_mark_node) - actarg = ffecom_f2c_ftnlen_zero_node; /* We don't have this arg. */ - else - actarg = ffesymbol_hook (s).length_tree; - *plist = build_tree_list (NULL_TREE, actarg); - plist = &TREE_CHAIN (*plist); - } - - /* Prepend character-value return info to actual arg list. */ - - if (charfunc) - { - prepend = build_tree_list (NULL_TREE, ffecom_func_result_); - TREE_CHAIN (prepend) - = build_tree_list (NULL_TREE, ffecom_func_length_); - TREE_CHAIN (TREE_CHAIN (prepend)) = arglist; - arglist = prepend; - } - - /* Prepend multi-type return value to actual arg list. */ - - if (multi) - { - prepend - = build_tree_list (NULL_TREE, - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (multi_retval)), - multi_retval)); - TREE_CHAIN (prepend) = arglist; - arglist = prepend; - } - - /* Prepend my entry-point number to the actual arg list. */ - - prepend = build_tree_list (NULL_TREE, build_int_2 (entrynum, 0)); - TREE_CHAIN (prepend) = arglist; - arglist = prepend; - - /* Build the call to the master function. */ - - master_fn = ffecom_1_fn (ffecom_previous_function_decl_); - call = ffecom_3s (CALL_EXPR, - TREE_TYPE (TREE_TYPE (TREE_TYPE (master_fn))), - master_fn, arglist, NULL_TREE); - - /* Decide whether the master function is a function or subroutine, and - handle the return value for my entry point. */ - - if (charfunc || ((ffecom_primary_entry_kind_ == FFEINFO_kindSUBROUTINE) - && !altreturning)) - { - expand_expr_stmt (call); - expand_null_return (); - } - else if (multi && cmplxfunc) - { - expand_expr_stmt (call); - result - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (result))), - result); - result = ffecom_modify (NULL_TREE, result, - ffecom_2 (COMPONENT_REF, TREE_TYPE (result), - multi_retval, - ffecom_multi_fields_[bt][kt])); - expand_expr_stmt (result); - expand_null_return (); - } - else if (multi) - { - expand_expr_stmt (call); - result - = ffecom_modify (NULL_TREE, result, - convert (TREE_TYPE (result), - ffecom_2 (COMPONENT_REF, - ffecom_tree_type[bt][kt], - multi_retval, - ffecom_multi_fields_[bt][kt]))); - expand_return (result); - } - else if (cmplxfunc) - { - result - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (result))), - result); - result = ffecom_modify (NULL_TREE, result, call); - expand_expr_stmt (result); - expand_null_return (); - } - else - { - result = ffecom_modify (NULL_TREE, - result, - convert (TREE_TYPE (result), - call)); - expand_return (result); - } - } - - ffecom_end_compstmt (); - - finish_function (0); - - input_location = old_loc; - - ffecom_doing_entry_ = FALSE; -} - -/* Transform expr into gcc tree with possible destination - - Recursive descent on expr while making corresponding tree nodes and - attaching type info and such. If destination supplied and compatible - with temporary that would be made in certain cases, temporary isn't - made, destination used instead, and dest_used flag set TRUE. */ - -static tree -ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest, bool *dest_used, - bool assignp, bool widenp) -{ - tree item; - tree list; - tree args; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - tree t; - tree dt; /* decl_tree for an ffesymbol. */ - tree tree_type, tree_type_x; - tree left, right; - ffesymbol s; - enum tree_code code; - - assert (expr != NULL); - - if (dest_used != NULL) - *dest_used = FALSE; - - bt = ffeinfo_basictype (ffebld_info (expr)); - kt = ffeinfo_kindtype (ffebld_info (expr)); - tree_type = ffecom_tree_type[bt][kt]; - - /* Widen integral arithmetic as desired while preserving signedness. */ - tree_type_x = NULL_TREE; - if (widenp && tree_type - && GET_MODE_CLASS (TYPE_MODE (tree_type)) == MODE_INT - && TYPE_PRECISION (tree_type) < TYPE_PRECISION (sizetype)) - tree_type_x = (TREE_UNSIGNED (tree_type) ? usizetype : ssizetype); - - switch (ffebld_op (expr)) - { - case FFEBLD_opACCTER: - { - ffebitCount i; - ffebit bits = ffebld_accter_bits (expr); - ffetargetOffset source_offset = 0; - ffetargetOffset dest_offset = ffebld_accter_pad (expr); - tree purpose; - - assert (dest_offset == 0 - || (bt == FFEINFO_basictypeCHARACTER - && kt == FFEINFO_kindtypeCHARACTER1)); - - list = item = NULL; - for (;;) - { - ffebldConstantUnion cu; - ffebitCount length; - bool value; - ffebldConstantArray ca = ffebld_accter (expr); - - ffebit_test (bits, source_offset, &value, &length); - if (length == 0) - break; - - if (value) - { - for (i = 0; i < length; ++i) - { - cu = ffebld_constantarray_get (ca, bt, kt, - source_offset + i); - - t = ffecom_constantunion (&cu, bt, kt, tree_type); - - if (i == 0 - && dest_offset != 0) - purpose = build_int_2 (dest_offset, 0); - else - purpose = NULL_TREE; - - if (list == NULL_TREE) - list = item = build_tree_list (purpose, t); - else - { - TREE_CHAIN (item) = build_tree_list (purpose, t); - item = TREE_CHAIN (item); - } - } - } - source_offset += length; - dest_offset += length; - } - } - - item = build_int_2 ((ffebld_accter_size (expr) - + ffebld_accter_pad (expr)) - 1, 0); - ffebit_kill (ffebld_accter_bits (expr)); - TREE_TYPE (item) = ffecom_integer_type_node; - item - = build_array_type - (tree_type, - build_range_type (ffecom_integer_type_node, - ffecom_integer_zero_node, - item)); - list = build_constructor (item, list); - TREE_CONSTANT (list) = 1; - TREE_STATIC (list) = 1; - return list; - - case FFEBLD_opARRTER: - { - ffetargetOffset i; - - list = NULL_TREE; - if (ffebld_arrter_pad (expr) == 0) - item = NULL_TREE; - else - { - assert (bt == FFEINFO_basictypeCHARACTER - && kt == FFEINFO_kindtypeCHARACTER1); - - /* Becomes PURPOSE first time through loop. */ - item = build_int_2 (ffebld_arrter_pad (expr), 0); - } - - for (i = 0; i < ffebld_arrter_size (expr); ++i) - { - ffebldConstantUnion cu - = ffebld_constantarray_get (ffebld_arrter (expr), bt, kt, i); - - t = ffecom_constantunion (&cu, bt, kt, tree_type); - - if (list == NULL_TREE) - /* Assume item is PURPOSE first time through loop. */ - list = item = build_tree_list (item, t); - else - { - TREE_CHAIN (item) = build_tree_list (NULL_TREE, t); - item = TREE_CHAIN (item); - } - } - } - - item = build_int_2 ((ffebld_arrter_size (expr) - + ffebld_arrter_pad (expr)) - 1, 0); - TREE_TYPE (item) = ffecom_integer_type_node; - item - = build_array_type - (tree_type, - build_range_type (ffecom_integer_type_node, - ffecom_integer_zero_node, - item)); - list = build_constructor (item, list); - TREE_CONSTANT (list) = 1; - TREE_STATIC (list) = 1; - return list; - - case FFEBLD_opCONTER: - assert (ffebld_conter_pad (expr) == 0); - item - = ffecom_constantunion (&ffebld_constant_union (ffebld_conter (expr)), - bt, kt, tree_type); - return item; - - case FFEBLD_opSYMTER: - if ((ffebld_symter_generic (expr) != FFEINTRIN_genNONE) - || (ffebld_symter_specific (expr) != FFEINTRIN_specNONE)) - return ffecom_ptr_to_expr (expr); /* Same as %REF(intrinsic). */ - s = ffebld_symter (expr); - t = ffesymbol_hook (s).decl_tree; - - if (assignp) - { /* ASSIGN'ed-label expr. */ - if (ffe_is_ugly_assign ()) - { - /* User explicitly wants ASSIGN'ed variables to be at the same - memory address as the variables when used in non-ASSIGN - contexts. That can make old, arcane, non-standard code - work, but don't try to do it when a pointer wouldn't fit - in the normal variable (take other approach, and warn, - instead). */ - - if (t == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - t = ffesymbol_hook (s).decl_tree; - assert (t != NULL_TREE); - } - - if (t == error_mark_node) - return t; - - if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (t))) - >= GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node)))) - { - if (ffesymbol_hook (s).addr) - t = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (t))), t); - return t; - } - - if (ffesymbol_hook (s).assign_tree == NULL_TREE) - { - /* xgettext:no-c-format */ - ffebad_start_msg ("ASSIGN'ed label cannot fit into `%A' at %0 -- using wider sibling", - FFEBAD_severityWARNING); - ffebad_string (ffesymbol_text (s)); - ffebad_here (0, ffesymbol_where_line (s), - ffesymbol_where_column (s)); - ffebad_finish (); - } - } - - /* Don't use the normal variable's tree for ASSIGN, though mark - it as in the system header (housekeeping). Use an explicit, - specially created sibling that is known to be wide enough - to hold pointers to labels. */ - - if (t != NULL_TREE - && TREE_CODE (t) == VAR_DECL) - DECL_IN_SYSTEM_HEADER (t) = 1; /* Don't let -Wunused complain. */ - - t = ffesymbol_hook (s).assign_tree; - if (t == NULL_TREE) - { - s = ffecom_sym_transform_assign_ (s); - t = ffesymbol_hook (s).assign_tree; - assert (t != NULL_TREE); - } - } - else - { - if (t == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - t = ffesymbol_hook (s).decl_tree; - assert (t != NULL_TREE); - } - if (ffesymbol_hook (s).addr) - t = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (t))), t); - } - return t; - - case FFEBLD_opARRAYREF: - return ffecom_arrayref_ (NULL_TREE, expr, 0); - - case FFEBLD_opUPLUS: - left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp); - return ffecom_1 (NOP_EXPR, tree_type, left); - - case FFEBLD_opPAREN: - /* ~~~Make sure Fortran rules respected here */ - left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp); - return ffecom_1 (NOP_EXPR, tree_type, left); - - case FFEBLD_opUMINUS: - left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp); - if (tree_type_x) - { - tree_type = tree_type_x; - left = convert (tree_type, left); - } - return ffecom_1 (NEGATE_EXPR, tree_type, left); - - case FFEBLD_opADD: - left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp); - right = ffecom_expr_ (ffebld_right (expr), NULL, NULL, NULL, FALSE, widenp); - if (tree_type_x) - { - tree_type = tree_type_x; - left = convert (tree_type, left); - right = convert (tree_type, right); - } - return ffecom_2 (PLUS_EXPR, tree_type, left, right); - - case FFEBLD_opSUBTRACT: - left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp); - right = ffecom_expr_ (ffebld_right (expr), NULL, NULL, NULL, FALSE, widenp); - if (tree_type_x) - { - tree_type = tree_type_x; - left = convert (tree_type, left); - right = convert (tree_type, right); - } - return ffecom_2 (MINUS_EXPR, tree_type, left, right); - - case FFEBLD_opMULTIPLY: - left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp); - right = ffecom_expr_ (ffebld_right (expr), NULL, NULL, NULL, FALSE, widenp); - if (tree_type_x) - { - tree_type = tree_type_x; - left = convert (tree_type, left); - right = convert (tree_type, right); - } - return ffecom_2 (MULT_EXPR, tree_type, left, right); - - case FFEBLD_opDIVIDE: - left = ffecom_expr_ (ffebld_left (expr), NULL, NULL, NULL, FALSE, widenp); - right = ffecom_expr_ (ffebld_right (expr), NULL, NULL, NULL, FALSE, widenp); - if (tree_type_x) - { - tree_type = tree_type_x; - left = convert (tree_type, left); - right = convert (tree_type, right); - } - return ffecom_tree_divide_ (tree_type, left, right, - dest_tree, dest, dest_used, - ffebld_nonter_hook (expr)); - - case FFEBLD_opPOWER: - { - ffebld left = ffebld_left (expr); - ffebld right = ffebld_right (expr); - ffecomGfrt code; - ffeinfoKindtype rtkt; - ffeinfoKindtype ltkt; - bool ref = TRUE; - - switch (ffeinfo_basictype (ffebld_info (right))) - { - - case FFEINFO_basictypeINTEGER: - if (1 || optimize) - { - item = ffecom_expr_power_integer_ (expr); - if (item != NULL_TREE) - return item; - } - - rtkt = FFEINFO_kindtypeINTEGER1; - switch (ffeinfo_basictype (ffebld_info (left))) - { - case FFEINFO_basictypeINTEGER: - if ((ffeinfo_kindtype (ffebld_info (left)) - == FFEINFO_kindtypeINTEGER4) - || (ffeinfo_kindtype (ffebld_info (right)) - == FFEINFO_kindtypeINTEGER4)) - { - code = FFECOM_gfrtPOW_QQ; - ltkt = FFEINFO_kindtypeINTEGER4; - rtkt = FFEINFO_kindtypeINTEGER4; - } - else - { - code = FFECOM_gfrtPOW_II; - ltkt = FFEINFO_kindtypeINTEGER1; - } - break; - - case FFEINFO_basictypeREAL: - if (ffeinfo_kindtype (ffebld_info (left)) - == FFEINFO_kindtypeREAL1) - { - code = FFECOM_gfrtPOW_RI; - ltkt = FFEINFO_kindtypeREAL1; - } - else - { - code = FFECOM_gfrtPOW_DI; - ltkt = FFEINFO_kindtypeREAL2; - } - break; - - case FFEINFO_basictypeCOMPLEX: - if (ffeinfo_kindtype (ffebld_info (left)) - == FFEINFO_kindtypeREAL1) - { - code = FFECOM_gfrtPOW_CI; /* Overlapping result okay. */ - ltkt = FFEINFO_kindtypeREAL1; - } - else - { - code = FFECOM_gfrtPOW_ZI; /* Overlapping result okay. */ - ltkt = FFEINFO_kindtypeREAL2; - } - break; - - default: - assert ("bad pow_*i" == NULL); - code = FFECOM_gfrtPOW_CI; /* Overlapping result okay. */ - ltkt = FFEINFO_kindtypeREAL1; - break; - } - if (ffeinfo_kindtype (ffebld_info (left)) != ltkt) - left = ffeexpr_convert (left, NULL, NULL, - ffeinfo_basictype (ffebld_info (left)), - ltkt, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - if (ffeinfo_kindtype (ffebld_info (right)) != rtkt) - right = ffeexpr_convert (right, NULL, NULL, - FFEINFO_basictypeINTEGER, - rtkt, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeREAL: - if (ffeinfo_kindtype (ffebld_info (left)) == FFEINFO_kindtypeREAL1) - left = ffeexpr_convert (left, NULL, NULL, FFEINFO_basictypeREAL, - FFEINFO_kindtypeREALDOUBLE, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - if (ffeinfo_kindtype (ffebld_info (right)) - == FFEINFO_kindtypeREAL1) - right = ffeexpr_convert (right, NULL, NULL, - FFEINFO_basictypeREAL, - FFEINFO_kindtypeREALDOUBLE, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* We used to call FFECOM_gfrtPOW_DD here, - which passes arguments by reference. */ - code = FFECOM_gfrtL_POW; - /* Pass arguments by value. */ - ref = FALSE; - break; - - case FFEINFO_basictypeCOMPLEX: - if (ffeinfo_kindtype (ffebld_info (left)) == FFEINFO_kindtypeREAL1) - left = ffeexpr_convert (left, NULL, NULL, - FFEINFO_basictypeCOMPLEX, - FFEINFO_kindtypeREALDOUBLE, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - if (ffeinfo_kindtype (ffebld_info (right)) - == FFEINFO_kindtypeREAL1) - right = ffeexpr_convert (right, NULL, NULL, - FFEINFO_basictypeCOMPLEX, - FFEINFO_kindtypeREALDOUBLE, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - code = FFECOM_gfrtPOW_ZZ; /* Overlapping result okay. */ - ref = TRUE; /* Pass arguments by reference. */ - break; - - default: - assert ("bad pow_x*" == NULL); - code = FFECOM_gfrtPOW_II; - break; - } - return ffecom_call_binop_ (ffecom_gfrt_tree_ (code), - ffecom_gfrt_kindtype (code), - (ffe_is_f2c_library () - && ffecom_gfrt_complex_[code]), - tree_type, left, right, - dest_tree, dest, dest_used, - NULL_TREE, FALSE, ref, - ffebld_nonter_hook (expr)); - } - - case FFEBLD_opNOT: - switch (bt) - { - case FFEINFO_basictypeLOGICAL: - item = ffecom_truth_value_invert (ffecom_expr (ffebld_left (expr))); - return convert (tree_type, item); - - case FFEINFO_basictypeINTEGER: - return ffecom_1 (BIT_NOT_EXPR, tree_type, - ffecom_expr (ffebld_left (expr))); - - default: - assert ("NOT bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - case FFEBLD_opFUNCREF: - assert (ffeinfo_basictype (ffebld_info (expr)) - != FFEINFO_basictypeCHARACTER); - /* Fall through. */ - case FFEBLD_opSUBRREF: - if (ffeinfo_where (ffebld_info (ffebld_left (expr))) - == FFEINFO_whereINTRINSIC) - { /* Invocation of an intrinsic. */ - item = ffecom_expr_intrinsic_ (expr, dest_tree, dest, - dest_used); - return item; - } - s = ffebld_symter (ffebld_left (expr)); - dt = ffesymbol_hook (s).decl_tree; - if (dt == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - dt = ffesymbol_hook (s).decl_tree; - } - if (dt == error_mark_node) - return dt; - - if (ffesymbol_hook (s).addr) - item = dt; - else - item = ffecom_1_fn (dt); - - if (ffesymbol_where (s) == FFEINFO_whereCONSTANT) - args = ffecom_list_expr (ffebld_right (expr)); - else - args = ffecom_list_ptr_to_expr (ffebld_right (expr)); - - if (args == error_mark_node) - return error_mark_node; - - item = ffecom_call_ (item, kt, - ffesymbol_is_f2c (s) - && (bt == FFEINFO_basictypeCOMPLEX) - && (ffesymbol_where (s) - != FFEINFO_whereCONSTANT), - tree_type, - args, - dest_tree, dest, dest_used, - error_mark_node, FALSE, - ffebld_nonter_hook (expr)); - TREE_SIDE_EFFECTS (item) = 1; - return item; - - case FFEBLD_opAND: - switch (bt) - { - case FFEINFO_basictypeLOGICAL: - item - = ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node, - ffecom_truth_value (ffecom_expr (ffebld_left (expr))), - ffecom_truth_value (ffecom_expr (ffebld_right (expr)))); - return convert (tree_type, item); - - case FFEINFO_basictypeINTEGER: - return ffecom_2 (BIT_AND_EXPR, tree_type, - ffecom_expr (ffebld_left (expr)), - ffecom_expr (ffebld_right (expr))); - - default: - assert ("AND bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - case FFEBLD_opOR: - switch (bt) - { - case FFEINFO_basictypeLOGICAL: - item - = ffecom_2 (TRUTH_ORIF_EXPR, integer_type_node, - ffecom_truth_value (ffecom_expr (ffebld_left (expr))), - ffecom_truth_value (ffecom_expr (ffebld_right (expr)))); - return convert (tree_type, item); - - case FFEINFO_basictypeINTEGER: - return ffecom_2 (BIT_IOR_EXPR, tree_type, - ffecom_expr (ffebld_left (expr)), - ffecom_expr (ffebld_right (expr))); - - default: - assert ("OR bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - case FFEBLD_opXOR: - case FFEBLD_opNEQV: - switch (bt) - { - case FFEINFO_basictypeLOGICAL: - item - = ffecom_2 (NE_EXPR, integer_type_node, - ffecom_expr (ffebld_left (expr)), - ffecom_expr (ffebld_right (expr))); - return convert (tree_type, ffecom_truth_value (item)); - - case FFEINFO_basictypeINTEGER: - return ffecom_2 (BIT_XOR_EXPR, tree_type, - ffecom_expr (ffebld_left (expr)), - ffecom_expr (ffebld_right (expr))); - - default: - assert ("XOR/NEQV bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - case FFEBLD_opEQV: - switch (bt) - { - case FFEINFO_basictypeLOGICAL: - item - = ffecom_2 (EQ_EXPR, integer_type_node, - ffecom_expr (ffebld_left (expr)), - ffecom_expr (ffebld_right (expr))); - return convert (tree_type, ffecom_truth_value (item)); - - case FFEINFO_basictypeINTEGER: - return - ffecom_1 (BIT_NOT_EXPR, tree_type, - ffecom_2 (BIT_XOR_EXPR, tree_type, - ffecom_expr (ffebld_left (expr)), - ffecom_expr (ffebld_right (expr)))); - - default: - assert ("EQV bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - case FFEBLD_opCONVERT: - if (ffebld_op (ffebld_left (expr)) == FFEBLD_opANY) - return error_mark_node; - - switch (bt) - { - case FFEINFO_basictypeLOGICAL: - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeREAL: - return convert (tree_type, ffecom_expr (ffebld_left (expr))); - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeLOGICAL: - case FFEINFO_basictypeREAL: - item = ffecom_expr (ffebld_left (expr)); - if (item == error_mark_node) - return error_mark_node; - /* convert() takes care of converting to the subtype first, - at least in gcc-2.7.2. */ - item = convert (tree_type, item); - return item; - - case FFEINFO_basictypeCOMPLEX: - return convert (tree_type, ffecom_expr (ffebld_left (expr))); - - default: - assert ("CONVERT COMPLEX bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - default: - assert ("CONVERT bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - case FFEBLD_opLT: - code = LT_EXPR; - goto relational; /* :::::::::::::::::::: */ - - case FFEBLD_opLE: - code = LE_EXPR; - goto relational; /* :::::::::::::::::::: */ - - case FFEBLD_opEQ: - code = EQ_EXPR; - goto relational; /* :::::::::::::::::::: */ - - case FFEBLD_opNE: - code = NE_EXPR; - goto relational; /* :::::::::::::::::::: */ - - case FFEBLD_opGT: - code = GT_EXPR; - goto relational; /* :::::::::::::::::::: */ - - case FFEBLD_opGE: - code = GE_EXPR; - - relational: /* :::::::::::::::::::: */ - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeLOGICAL: - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeREAL: - item = ffecom_2 (code, integer_type_node, - ffecom_expr (ffebld_left (expr)), - ffecom_expr (ffebld_right (expr))); - return convert (tree_type, item); - - case FFEINFO_basictypeCOMPLEX: - assert (code == EQ_EXPR || code == NE_EXPR); - { - tree real_type; - tree arg1 = ffecom_expr (ffebld_left (expr)); - tree arg2 = ffecom_expr (ffebld_right (expr)); - - if (arg1 == error_mark_node || arg2 == error_mark_node) - return error_mark_node; - - arg1 = ffecom_save_tree (arg1); - arg2 = ffecom_save_tree (arg2); - - if (TREE_CODE (TREE_TYPE (arg1)) == COMPLEX_TYPE) - { - real_type = TREE_TYPE (TREE_TYPE (arg1)); - assert (real_type == TREE_TYPE (TREE_TYPE (arg2))); - } - else - { - real_type = TREE_TYPE (TYPE_FIELDS (TREE_TYPE (arg1))); - assert (real_type == TREE_TYPE (TYPE_FIELDS (TREE_TYPE (arg2)))); - } - - item - = ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node, - ffecom_2 (EQ_EXPR, integer_type_node, - ffecom_1 (REALPART_EXPR, real_type, arg1), - ffecom_1 (REALPART_EXPR, real_type, arg2)), - ffecom_2 (EQ_EXPR, integer_type_node, - ffecom_1 (IMAGPART_EXPR, real_type, arg1), - ffecom_1 (IMAGPART_EXPR, real_type, - arg2))); - if (code == EQ_EXPR) - item = ffecom_truth_value (item); - else - item = ffecom_truth_value_invert (item); - return convert (tree_type, item); - } - - case FFEINFO_basictypeCHARACTER: - { - ffebld left = ffebld_left (expr); - ffebld right = ffebld_right (expr); - tree left_tree; - tree right_tree; - tree left_length; - tree right_length; - - /* f2c run-time functions do the implicit blank-padding for us, - so we don't usually have to implement blank-padding ourselves. - (The exception is when we pass an argument to a separately - compiled statement function -- if we know the arg is not the - same length as the dummy, we must truncate or extend it. If - we "inline" statement functions, that necessity goes away as - well.) - - Strip off the CONVERT operators that blank-pad. (Truncation by - CONVERT shouldn't happen here, but it can happen in - assignments.) */ - - while (ffebld_op (left) == FFEBLD_opCONVERT) - left = ffebld_left (left); - while (ffebld_op (right) == FFEBLD_opCONVERT) - right = ffebld_left (right); - - left_tree = ffecom_arg_ptr_to_expr (left, &left_length); - right_tree = ffecom_arg_ptr_to_expr (right, &right_length); - - if (left_tree == error_mark_node || left_length == error_mark_node - || right_tree == error_mark_node - || right_length == error_mark_node) - return error_mark_node; - - if ((ffebld_size_known (left) == 1) - && (ffebld_size_known (right) == 1)) - { - left_tree - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (left_tree))), - left_tree); - right_tree - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (right_tree))), - right_tree); - - item - = ffecom_2 (code, integer_type_node, - ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (left_tree))), - left_tree, - integer_one_node), - ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (right_tree))), - right_tree, - integer_one_node)); - } - else - { - item = build_tree_list (NULL_TREE, left_tree); - TREE_CHAIN (item) = build_tree_list (NULL_TREE, right_tree); - TREE_CHAIN (TREE_CHAIN (item)) = build_tree_list (NULL_TREE, - left_length); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (item))) - = build_tree_list (NULL_TREE, right_length); - item = ffecom_call_gfrt (FFECOM_gfrtCMP, item, NULL_TREE); - item = ffecom_2 (code, integer_type_node, - item, - convert (TREE_TYPE (item), - integer_zero_node)); - } - item = convert (tree_type, item); - } - - return item; - - default: - assert ("relational bad basictype" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - break; - - case FFEBLD_opPERCENT_LOC: - item = ffecom_arg_ptr_to_expr (ffebld_left (expr), &list); - return convert (tree_type, item); - - case FFEBLD_opPERCENT_VAL: - item = ffecom_arg_expr (ffebld_left (expr), &list); - return convert (tree_type, item); - - case FFEBLD_opITEM: - case FFEBLD_opSTAR: - case FFEBLD_opBOUNDS: - case FFEBLD_opREPEAT: - case FFEBLD_opLABTER: - case FFEBLD_opLABTOK: - case FFEBLD_opIMPDO: - case FFEBLD_opCONCATENATE: - case FFEBLD_opSUBSTR: - default: - assert ("bad op" == NULL); - /* Fall through. */ - case FFEBLD_opANY: - return error_mark_node; - } - -#if 1 - assert ("didn't think anything got here anymore!!" == NULL); -#else - switch (ffebld_arity (expr)) - { - case 2: - TREE_OPERAND (item, 0) = ffecom_expr (ffebld_left (expr)); - TREE_OPERAND (item, 1) = ffecom_expr (ffebld_right (expr)); - if (TREE_OPERAND (item, 0) == error_mark_node - || TREE_OPERAND (item, 1) == error_mark_node) - return error_mark_node; - break; - - case 1: - TREE_OPERAND (item, 0) = ffecom_expr (ffebld_left (expr)); - if (TREE_OPERAND (item, 0) == error_mark_node) - return error_mark_node; - break; - - default: - break; - } - - return fold (item); -#endif -} - -/* Returns the tree that does the intrinsic invocation. - - Note: this function applies only to intrinsics returning - CHARACTER*1 or non-CHARACTER results, and to intrinsic - subroutines. */ - -static tree -ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree, ffebld dest, - bool *dest_used) -{ - tree expr_tree; - tree saved_expr1; /* For those who need it. */ - tree saved_expr2; /* For those who need it. */ - ffeinfoBasictype bt; - ffeinfoKindtype kt; - tree tree_type; - tree arg1_type; - tree real_type; /* REAL type corresponding to COMPLEX. */ - tree tempvar; - ffebld list = ffebld_right (expr); /* List of (some) args. */ - ffebld arg1; /* For handy reference. */ - ffebld arg2; - ffebld arg3; - ffeintrinImp codegen_imp; - ffecomGfrt gfrt; - - assert (ffebld_op (ffebld_left (expr)) == FFEBLD_opSYMTER); - - if (dest_used != NULL) - *dest_used = FALSE; - - bt = ffeinfo_basictype (ffebld_info (expr)); - kt = ffeinfo_kindtype (ffebld_info (expr)); - tree_type = ffecom_tree_type[bt][kt]; - - if (list != NULL) - { - arg1 = ffebld_head (list); - if (arg1 != NULL && ffebld_op (arg1) == FFEBLD_opANY) - return error_mark_node; - if ((list = ffebld_trail (list)) != NULL) - { - arg2 = ffebld_head (list); - if (arg2 != NULL && ffebld_op (arg2) == FFEBLD_opANY) - return error_mark_node; - if ((list = ffebld_trail (list)) != NULL) - { - arg3 = ffebld_head (list); - if (arg3 != NULL && ffebld_op (arg3) == FFEBLD_opANY) - return error_mark_node; - } - else - arg3 = NULL; - } - else - arg2 = arg3 = NULL; - } - else - arg1 = arg2 = arg3 = NULL; - - /* ends up at the opITEM of the 3rd arg, or NULL if there are < 3 - args. This is used by the MAX/MIN expansions. */ - - if (arg1 != NULL) - arg1_type = ffecom_tree_type - [ffeinfo_basictype (ffebld_info (arg1))] - [ffeinfo_kindtype (ffebld_info (arg1))]; - else - arg1_type = NULL_TREE; /* Really not needed, but might catch bugs - here. */ - - /* There are several ways for each of the cases in the following switch - statements to exit (from simplest to use to most complicated): - - break; (when expr_tree == NULL) - - A standard call is made to the specific intrinsic just as if it had been - passed in as a dummy procedure and called as any old procedure. This - method can produce slower code but in some cases it's the easiest way for - now. However, if a (presumably faster) direct call is available, - that is used, so this is the easiest way in many more cases now. - - gfrt = FFECOM_gfrtWHATEVER; - break; - - gfrt contains the gfrt index of a library function to call, passing the - argument(s) by value rather than by reference. Used when a more - careful choice of library function is needed than that provided - by the vanilla `break;'. - - return expr_tree; - - The expr_tree has been completely set up and is ready to be returned - as is. No further actions are taken. Use this when the tree is not - in the simple form for one of the arity_n labels. */ - - /* For info on how the switch statement cases were written, see the files - enclosed in comments below the switch statement. */ - - codegen_imp = ffebld_symter_implementation (ffebld_left (expr)); - gfrt = ffeintrin_gfrt_direct (codegen_imp); - if (gfrt == FFECOM_gfrt) - gfrt = ffeintrin_gfrt_indirect (codegen_imp); - - switch (codegen_imp) - { - case FFEINTRIN_impABS: - case FFEINTRIN_impCABS: - case FFEINTRIN_impCDABS: - case FFEINTRIN_impDABS: - case FFEINTRIN_impIABS: - if (ffeinfo_basictype (ffebld_info (arg1)) - == FFEINFO_basictypeCOMPLEX) - { - if (kt == FFEINFO_kindtypeREAL1) - gfrt = FFECOM_gfrtCABS; - else if (kt == FFEINFO_kindtypeREAL2) - gfrt = FFECOM_gfrtCDABS; - break; - } - return ffecom_1 (ABS_EXPR, tree_type, - convert (tree_type, ffecom_expr (arg1))); - - case FFEINTRIN_impACOS: - case FFEINTRIN_impDACOS: - break; - - case FFEINTRIN_impAIMAG: - case FFEINTRIN_impDIMAG: - case FFEINTRIN_impIMAGPART: - if (TREE_CODE (arg1_type) == COMPLEX_TYPE) - arg1_type = TREE_TYPE (arg1_type); - else - arg1_type = TREE_TYPE (TYPE_FIELDS (arg1_type)); - - return - convert (tree_type, - ffecom_1 (IMAGPART_EXPR, arg1_type, - ffecom_expr (arg1))); - - case FFEINTRIN_impAINT: - case FFEINTRIN_impDINT: -#if 0 - /* ~~Someday implement FIX_TRUNC_EXPR yielding same type as arg. */ - return ffecom_1 (FIX_TRUNC_EXPR, tree_type, ffecom_expr (arg1)); -#else /* in the meantime, must use floor to avoid range problems with ints */ - /* r__1 = r1 >= 0 ? floor(r1) : -floor(-r1); */ - saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); - return - convert (tree_type, - ffecom_3 (COND_EXPR, double_type_node, - ffecom_truth_value - (ffecom_2 (GE_EXPR, integer_type_node, - saved_expr1, - convert (arg1_type, - ffecom_float_zero_))), - ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, - build_tree_list (NULL_TREE, - convert (double_type_node, - saved_expr1)), - NULL_TREE), - ffecom_1 (NEGATE_EXPR, double_type_node, - ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, - build_tree_list (NULL_TREE, - convert (double_type_node, - ffecom_1 (NEGATE_EXPR, - arg1_type, - saved_expr1))), - NULL_TREE) - )) - ); -#endif - - case FFEINTRIN_impANINT: - case FFEINTRIN_impDNINT: -#if 0 /* This way of doing it won't handle real - numbers of large magnitudes. */ - saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); - expr_tree = convert (tree_type, - convert (integer_type_node, - ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (GE_EXPR, - integer_type_node, - saved_expr1, - ffecom_float_zero_)), - ffecom_2 (PLUS_EXPR, - tree_type, - saved_expr1, - ffecom_float_half_), - ffecom_2 (MINUS_EXPR, - tree_type, - saved_expr1, - ffecom_float_half_)))); - return expr_tree; -#else /* So we instead call floor. */ - /* r__1 = r1 >= 0 ? floor(r1 + .5) : -floor(.5 - r1) */ - saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); - return - convert (tree_type, - ffecom_3 (COND_EXPR, double_type_node, - ffecom_truth_value - (ffecom_2 (GE_EXPR, integer_type_node, - saved_expr1, - convert (arg1_type, - ffecom_float_zero_))), - ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, - build_tree_list (NULL_TREE, - convert (double_type_node, - ffecom_2 (PLUS_EXPR, - arg1_type, - saved_expr1, - convert (arg1_type, - ffecom_float_half_)))), - NULL_TREE), - ffecom_1 (NEGATE_EXPR, double_type_node, - ffecom_call_gfrt (FFECOM_gfrtL_FLOOR, - build_tree_list (NULL_TREE, - convert (double_type_node, - ffecom_2 (MINUS_EXPR, - arg1_type, - convert (arg1_type, - ffecom_float_half_), - saved_expr1))), - NULL_TREE)) - ) - ); -#endif - - case FFEINTRIN_impASIN: - case FFEINTRIN_impDASIN: - case FFEINTRIN_impATAN: - case FFEINTRIN_impDATAN: - case FFEINTRIN_impATAN2: - case FFEINTRIN_impDATAN2: - break; - - case FFEINTRIN_impCHAR: - case FFEINTRIN_impACHAR: - tempvar = ffebld_nonter_hook (expr); - assert (tempvar); - { - tree tmv = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (tempvar))); - - expr_tree = ffecom_modify (tmv, - ffecom_2 (ARRAY_REF, tmv, tempvar, - integer_one_node), - convert (tmv, ffecom_expr (arg1))); - } - expr_tree = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (tempvar), - expr_tree, - tempvar); - expr_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (expr_tree)), - expr_tree); - return expr_tree; - - case FFEINTRIN_impCMPLX: - case FFEINTRIN_impDCMPLX: - if (arg2 == NULL) - return - convert (tree_type, ffecom_expr (arg1)); - - real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; - return - ffecom_2 (COMPLEX_EXPR, tree_type, - convert (real_type, ffecom_expr (arg1)), - convert (real_type, - ffecom_expr (arg2))); - - case FFEINTRIN_impCOMPLEX: - return - ffecom_2 (COMPLEX_EXPR, tree_type, - ffecom_expr (arg1), - ffecom_expr (arg2)); - - case FFEINTRIN_impCONJG: - case FFEINTRIN_impDCONJG: - { - tree arg1_tree; - - real_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; - arg1_tree = ffecom_save_tree (ffecom_expr (arg1)); - return - ffecom_2 (COMPLEX_EXPR, tree_type, - ffecom_1 (REALPART_EXPR, real_type, arg1_tree), - ffecom_1 (NEGATE_EXPR, real_type, - ffecom_1 (IMAGPART_EXPR, real_type, arg1_tree))); - } - - case FFEINTRIN_impCOS: - case FFEINTRIN_impCCOS: - case FFEINTRIN_impCDCOS: - case FFEINTRIN_impDCOS: - if (bt == FFEINFO_basictypeCOMPLEX) - { - if (kt == FFEINFO_kindtypeREAL1) - gfrt = FFECOM_gfrtCCOS; /* Overlapping result okay. */ - else if (kt == FFEINFO_kindtypeREAL2) - gfrt = FFECOM_gfrtCDCOS; /* Overlapping result okay. */ - } - break; - - case FFEINTRIN_impCOSH: - case FFEINTRIN_impDCOSH: - break; - - case FFEINTRIN_impDBLE: - case FFEINTRIN_impDFLOAT: - case FFEINTRIN_impDREAL: - case FFEINTRIN_impFLOAT: - case FFEINTRIN_impIDINT: - case FFEINTRIN_impIFIX: - case FFEINTRIN_impINT2: - case FFEINTRIN_impINT8: - case FFEINTRIN_impINT: - case FFEINTRIN_impLONG: - case FFEINTRIN_impREAL: - case FFEINTRIN_impSHORT: - case FFEINTRIN_impSNGL: - return convert (tree_type, ffecom_expr (arg1)); - - case FFEINTRIN_impDIM: - case FFEINTRIN_impDDIM: - case FFEINTRIN_impIDIM: - saved_expr1 = ffecom_save_tree (convert (tree_type, - ffecom_expr (arg1))); - saved_expr2 = ffecom_save_tree (convert (tree_type, - ffecom_expr (arg2))); - return - ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (GT_EXPR, integer_type_node, - saved_expr1, - saved_expr2)), - ffecom_2 (MINUS_EXPR, tree_type, - saved_expr1, - saved_expr2), - convert (tree_type, ffecom_float_zero_)); - - case FFEINTRIN_impDPROD: - return - ffecom_2 (MULT_EXPR, tree_type, - convert (tree_type, ffecom_expr (arg1)), - convert (tree_type, ffecom_expr (arg2))); - - case FFEINTRIN_impEXP: - case FFEINTRIN_impCDEXP: - case FFEINTRIN_impCEXP: - case FFEINTRIN_impDEXP: - if (bt == FFEINFO_basictypeCOMPLEX) - { - if (kt == FFEINFO_kindtypeREAL1) - gfrt = FFECOM_gfrtCEXP; /* Overlapping result okay. */ - else if (kt == FFEINFO_kindtypeREAL2) - gfrt = FFECOM_gfrtCDEXP; /* Overlapping result okay. */ - } - break; - - case FFEINTRIN_impICHAR: - case FFEINTRIN_impIACHAR: -#if 0 /* The simple approach. */ - ffecom_char_args_ (&expr_tree, &saved_expr1 /* Ignored */ , arg1); - expr_tree - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (expr_tree))), - expr_tree); - expr_tree - = ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (expr_tree))), - expr_tree, - integer_one_node); - return convert (tree_type, expr_tree); -#else /* The more interesting (and more optimal) approach. */ - expr_tree = ffecom_intrinsic_ichar_ (tree_type, arg1, &saved_expr1); - expr_tree = ffecom_3 (COND_EXPR, tree_type, - saved_expr1, - expr_tree, - convert (tree_type, integer_zero_node)); - return expr_tree; -#endif - - case FFEINTRIN_impINDEX: - break; - - case FFEINTRIN_impLEN: -#if 0 - break; /* The simple approach. */ -#else - return ffecom_intrinsic_len_ (arg1); /* The more optimal approach. */ -#endif - - case FFEINTRIN_impLGE: - case FFEINTRIN_impLGT: - case FFEINTRIN_impLLE: - case FFEINTRIN_impLLT: - break; - - case FFEINTRIN_impLOG: - case FFEINTRIN_impALOG: - case FFEINTRIN_impCDLOG: - case FFEINTRIN_impCLOG: - case FFEINTRIN_impDLOG: - if (bt == FFEINFO_basictypeCOMPLEX) - { - if (kt == FFEINFO_kindtypeREAL1) - gfrt = FFECOM_gfrtCLOG; /* Overlapping result okay. */ - else if (kt == FFEINFO_kindtypeREAL2) - gfrt = FFECOM_gfrtCDLOG; /* Overlapping result okay. */ - } - break; - - case FFEINTRIN_impLOG10: - case FFEINTRIN_impALOG10: - case FFEINTRIN_impDLOG10: - if (gfrt != FFECOM_gfrt) - break; /* Already picked one, stick with it. */ - - if (kt == FFEINFO_kindtypeREAL1) - /* We used to call FFECOM_gfrtALOG10 here. */ - gfrt = FFECOM_gfrtL_LOG10; - else if (kt == FFEINFO_kindtypeREAL2) - /* We used to call FFECOM_gfrtDLOG10 here. */ - gfrt = FFECOM_gfrtL_LOG10; - break; - - case FFEINTRIN_impMAX: - case FFEINTRIN_impAMAX0: - case FFEINTRIN_impAMAX1: - case FFEINTRIN_impDMAX1: - case FFEINTRIN_impMAX0: - case FFEINTRIN_impMAX1: - if (bt != ffeinfo_basictype (ffebld_info (arg1))) - arg1_type = ffecom_widest_expr_type_ (ffebld_right (expr)); - else - arg1_type = tree_type; - expr_tree = ffecom_2 (MAX_EXPR, arg1_type, - convert (arg1_type, ffecom_expr (arg1)), - convert (arg1_type, ffecom_expr (arg2))); - for (; list != NULL; list = ffebld_trail (list)) - { - if ((ffebld_head (list) == NULL) - || (ffebld_op (ffebld_head (list)) == FFEBLD_opANY)) - continue; - expr_tree = ffecom_2 (MAX_EXPR, arg1_type, - expr_tree, - convert (arg1_type, - ffecom_expr (ffebld_head (list)))); - } - return convert (tree_type, expr_tree); - - case FFEINTRIN_impMIN: - case FFEINTRIN_impAMIN0: - case FFEINTRIN_impAMIN1: - case FFEINTRIN_impDMIN1: - case FFEINTRIN_impMIN0: - case FFEINTRIN_impMIN1: - if (bt != ffeinfo_basictype (ffebld_info (arg1))) - arg1_type = ffecom_widest_expr_type_ (ffebld_right (expr)); - else - arg1_type = tree_type; - expr_tree = ffecom_2 (MIN_EXPR, arg1_type, - convert (arg1_type, ffecom_expr (arg1)), - convert (arg1_type, ffecom_expr (arg2))); - for (; list != NULL; list = ffebld_trail (list)) - { - if ((ffebld_head (list) == NULL) - || (ffebld_op (ffebld_head (list)) == FFEBLD_opANY)) - continue; - expr_tree = ffecom_2 (MIN_EXPR, arg1_type, - expr_tree, - convert (arg1_type, - ffecom_expr (ffebld_head (list)))); - } - return convert (tree_type, expr_tree); - - case FFEINTRIN_impMOD: - case FFEINTRIN_impAMOD: - case FFEINTRIN_impDMOD: - if (bt != FFEINFO_basictypeREAL) - return ffecom_2 (TRUNC_MOD_EXPR, tree_type, - convert (tree_type, ffecom_expr (arg1)), - convert (tree_type, ffecom_expr (arg2))); - - if (kt == FFEINFO_kindtypeREAL1) - /* We used to call FFECOM_gfrtAMOD here. */ - gfrt = FFECOM_gfrtL_FMOD; - else if (kt == FFEINFO_kindtypeREAL2) - /* We used to call FFECOM_gfrtDMOD here. */ - gfrt = FFECOM_gfrtL_FMOD; - break; - - case FFEINTRIN_impNINT: - case FFEINTRIN_impIDNINT: -#if 0 - /* ~~Ideally FIX_ROUND_EXPR would be implemented, but it ain't yet. */ - return ffecom_1 (FIX_ROUND_EXPR, tree_type, ffecom_expr (arg1)); -#else - /* i__1 = r1 >= 0 ? floor(r1 + .5) : -floor(.5 - r1); */ - saved_expr1 = ffecom_save_tree (ffecom_expr (arg1)); - return - convert (ffecom_integer_type_node, - ffecom_3 (COND_EXPR, arg1_type, - ffecom_truth_value - (ffecom_2 (GE_EXPR, integer_type_node, - saved_expr1, - convert (arg1_type, - ffecom_float_zero_))), - ffecom_2 (PLUS_EXPR, arg1_type, - saved_expr1, - convert (arg1_type, - ffecom_float_half_)), - ffecom_2 (MINUS_EXPR, arg1_type, - saved_expr1, - convert (arg1_type, - ffecom_float_half_)))); -#endif - - case FFEINTRIN_impSIGN: - case FFEINTRIN_impDSIGN: - case FFEINTRIN_impISIGN: - { - tree arg2_tree = ffecom_expr (arg2); - - saved_expr1 - = ffecom_save_tree - (ffecom_1 (ABS_EXPR, tree_type, - convert (tree_type, - ffecom_expr (arg1)))); - expr_tree - = ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (GE_EXPR, integer_type_node, - arg2_tree, - convert (TREE_TYPE (arg2_tree), - integer_zero_node))), - saved_expr1, - ffecom_1 (NEGATE_EXPR, tree_type, saved_expr1)); - /* Make sure SAVE_EXPRs get referenced early enough. */ - expr_tree - = ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, saved_expr1), - expr_tree); - } - return expr_tree; - - case FFEINTRIN_impSIN: - case FFEINTRIN_impCDSIN: - case FFEINTRIN_impCSIN: - case FFEINTRIN_impDSIN: - if (bt == FFEINFO_basictypeCOMPLEX) - { - if (kt == FFEINFO_kindtypeREAL1) - gfrt = FFECOM_gfrtCSIN; /* Overlapping result okay. */ - else if (kt == FFEINFO_kindtypeREAL2) - gfrt = FFECOM_gfrtCDSIN; /* Overlapping result okay. */ - } - break; - - case FFEINTRIN_impSINH: - case FFEINTRIN_impDSINH: - break; - - case FFEINTRIN_impSQRT: - case FFEINTRIN_impCDSQRT: - case FFEINTRIN_impCSQRT: - case FFEINTRIN_impDSQRT: - if (bt == FFEINFO_basictypeCOMPLEX) - { - if (kt == FFEINFO_kindtypeREAL1) - gfrt = FFECOM_gfrtCSQRT; /* Overlapping result okay. */ - else if (kt == FFEINFO_kindtypeREAL2) - gfrt = FFECOM_gfrtCDSQRT; /* Overlapping result okay. */ - } - break; - - case FFEINTRIN_impTAN: - case FFEINTRIN_impDTAN: - case FFEINTRIN_impTANH: - case FFEINTRIN_impDTANH: - break; - - case FFEINTRIN_impREALPART: - if (TREE_CODE (arg1_type) == COMPLEX_TYPE) - arg1_type = TREE_TYPE (arg1_type); - else - arg1_type = TREE_TYPE (TYPE_FIELDS (arg1_type)); - - return - convert (tree_type, - ffecom_1 (REALPART_EXPR, arg1_type, - ffecom_expr (arg1))); - - case FFEINTRIN_impIAND: - case FFEINTRIN_impAND: - return ffecom_2 (BIT_AND_EXPR, tree_type, - convert (tree_type, - ffecom_expr (arg1)), - convert (tree_type, - ffecom_expr (arg2))); - - case FFEINTRIN_impIOR: - case FFEINTRIN_impOR: - return ffecom_2 (BIT_IOR_EXPR, tree_type, - convert (tree_type, - ffecom_expr (arg1)), - convert (tree_type, - ffecom_expr (arg2))); - - case FFEINTRIN_impIEOR: - case FFEINTRIN_impXOR: - return ffecom_2 (BIT_XOR_EXPR, tree_type, - convert (tree_type, - ffecom_expr (arg1)), - convert (tree_type, - ffecom_expr (arg2))); - - case FFEINTRIN_impLSHIFT: - return ffecom_2 (LSHIFT_EXPR, tree_type, - ffecom_expr (arg1), - convert (integer_type_node, - ffecom_expr (arg2))); - - case FFEINTRIN_impRSHIFT: - return ffecom_2 (RSHIFT_EXPR, tree_type, - ffecom_expr (arg1), - convert (integer_type_node, - ffecom_expr (arg2))); - - case FFEINTRIN_impNOT: - return ffecom_1 (BIT_NOT_EXPR, tree_type, ffecom_expr (arg1)); - - case FFEINTRIN_impBIT_SIZE: - return convert (tree_type, TYPE_SIZE (arg1_type)); - - case FFEINTRIN_impBTEST: - { - ffetargetLogical1 target_true; - ffetargetLogical1 target_false; - tree true_tree; - tree false_tree; - - ffetarget_logical1 (&target_true, TRUE); - ffetarget_logical1 (&target_false, FALSE); - if (target_true == 1) - true_tree = convert (tree_type, integer_one_node); - else - true_tree = convert (tree_type, build_int_2 (target_true, 0)); - if (target_false == 0) - false_tree = convert (tree_type, integer_zero_node); - else - false_tree = convert (tree_type, build_int_2 (target_false, 0)); - - return - ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (EQ_EXPR, integer_type_node, - ffecom_2 (BIT_AND_EXPR, arg1_type, - ffecom_expr (arg1), - ffecom_2 (LSHIFT_EXPR, arg1_type, - convert (arg1_type, - integer_one_node), - convert (integer_type_node, - ffecom_expr (arg2)))), - convert (arg1_type, - integer_zero_node))), - false_tree, - true_tree); - } - - case FFEINTRIN_impIBCLR: - return - ffecom_2 (BIT_AND_EXPR, tree_type, - ffecom_expr (arg1), - ffecom_1 (BIT_NOT_EXPR, tree_type, - ffecom_2 (LSHIFT_EXPR, tree_type, - convert (tree_type, - integer_one_node), - convert (integer_type_node, - ffecom_expr (arg2))))); - - case FFEINTRIN_impIBITS: - { - tree arg3_tree = ffecom_save_tree (convert (integer_type_node, - ffecom_expr (arg3))); - tree uns_type - = ffecom_tree_type[FFEINFO_basictypeHOLLERITH][kt]; - - expr_tree - = ffecom_2 (BIT_AND_EXPR, tree_type, - ffecom_2 (RSHIFT_EXPR, tree_type, - ffecom_expr (arg1), - convert (integer_type_node, - ffecom_expr (arg2))), - convert (tree_type, - ffecom_2 (RSHIFT_EXPR, uns_type, - ffecom_1 (BIT_NOT_EXPR, - uns_type, - convert (uns_type, - integer_zero_node)), - ffecom_2 (MINUS_EXPR, - integer_type_node, - TYPE_SIZE (uns_type), - arg3_tree)))); - /* Fix up, because the RSHIFT_EXPR above can't shift over TYPE_SIZE. */ - expr_tree - = ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (NE_EXPR, integer_type_node, - arg3_tree, - integer_zero_node)), - expr_tree, - convert (tree_type, integer_zero_node)); - } - return expr_tree; - - case FFEINTRIN_impIBSET: - return - ffecom_2 (BIT_IOR_EXPR, tree_type, - ffecom_expr (arg1), - ffecom_2 (LSHIFT_EXPR, tree_type, - convert (tree_type, integer_one_node), - convert (integer_type_node, - ffecom_expr (arg2)))); - - case FFEINTRIN_impISHFT: - { - tree arg1_tree = ffecom_save_tree (ffecom_expr (arg1)); - tree arg2_tree = ffecom_save_tree (convert (integer_type_node, - ffecom_expr (arg2))); - tree uns_type - = ffecom_tree_type[FFEINFO_basictypeHOLLERITH][kt]; - - expr_tree - = ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (GE_EXPR, integer_type_node, - arg2_tree, - integer_zero_node)), - ffecom_2 (LSHIFT_EXPR, tree_type, - arg1_tree, - arg2_tree), - convert (tree_type, - ffecom_2 (RSHIFT_EXPR, uns_type, - convert (uns_type, arg1_tree), - ffecom_1 (NEGATE_EXPR, - integer_type_node, - arg2_tree)))); - /* Fix up, because {L|R}SHIFT_EXPR don't go over TYPE_SIZE bounds. */ - expr_tree - = ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (NE_EXPR, integer_type_node, - ffecom_1 (ABS_EXPR, - integer_type_node, - arg2_tree), - TYPE_SIZE (uns_type))), - expr_tree, - convert (tree_type, integer_zero_node)); - /* Make sure SAVE_EXPRs get referenced early enough. */ - expr_tree - = ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, arg1_tree), - ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, arg2_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impISHFTC: - { - tree arg1_tree = ffecom_save_tree (ffecom_expr (arg1)); - tree arg2_tree = ffecom_save_tree (convert (integer_type_node, - ffecom_expr (arg2))); - tree arg3_tree = (arg3 == NULL) ? TYPE_SIZE (tree_type) - : ffecom_save_tree (convert (integer_type_node, ffecom_expr (arg3))); - tree shift_neg; - tree shift_pos; - tree mask_arg1; - tree masked_arg1; - tree uns_type - = ffecom_tree_type[FFEINFO_basictypeHOLLERITH][kt]; - - mask_arg1 - = ffecom_2 (LSHIFT_EXPR, tree_type, - ffecom_1 (BIT_NOT_EXPR, tree_type, - convert (tree_type, integer_zero_node)), - arg3_tree); - /* Fix up, because LSHIFT_EXPR above can't shift over TYPE_SIZE. */ - mask_arg1 - = ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (NE_EXPR, integer_type_node, - arg3_tree, - TYPE_SIZE (uns_type))), - mask_arg1, - convert (tree_type, integer_zero_node)); - mask_arg1 = ffecom_save_tree (mask_arg1); - masked_arg1 - = ffecom_2 (BIT_AND_EXPR, tree_type, - arg1_tree, - ffecom_1 (BIT_NOT_EXPR, tree_type, - mask_arg1)); - masked_arg1 = ffecom_save_tree (masked_arg1); - shift_neg - = ffecom_2 (BIT_IOR_EXPR, tree_type, - convert (tree_type, - ffecom_2 (RSHIFT_EXPR, uns_type, - convert (uns_type, masked_arg1), - ffecom_1 (NEGATE_EXPR, - integer_type_node, - arg2_tree))), - ffecom_2 (LSHIFT_EXPR, tree_type, - arg1_tree, - ffecom_2 (PLUS_EXPR, integer_type_node, - arg2_tree, - arg3_tree))); - shift_pos - = ffecom_2 (BIT_IOR_EXPR, tree_type, - ffecom_2 (LSHIFT_EXPR, tree_type, - arg1_tree, - arg2_tree), - convert (tree_type, - ffecom_2 (RSHIFT_EXPR, uns_type, - convert (uns_type, masked_arg1), - ffecom_2 (MINUS_EXPR, - integer_type_node, - arg3_tree, - arg2_tree)))); - expr_tree - = ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (LT_EXPR, integer_type_node, - arg2_tree, - integer_zero_node)), - shift_neg, - shift_pos); - expr_tree - = ffecom_2 (BIT_IOR_EXPR, tree_type, - ffecom_2 (BIT_AND_EXPR, tree_type, - mask_arg1, - arg1_tree), - ffecom_2 (BIT_AND_EXPR, tree_type, - ffecom_1 (BIT_NOT_EXPR, tree_type, - mask_arg1), - expr_tree)); - expr_tree - = ffecom_3 (COND_EXPR, tree_type, - ffecom_truth_value - (ffecom_2 (TRUTH_ORIF_EXPR, integer_type_node, - ffecom_2 (EQ_EXPR, integer_type_node, - ffecom_1 (ABS_EXPR, - integer_type_node, - arg2_tree), - arg3_tree), - ffecom_2 (EQ_EXPR, integer_type_node, - arg2_tree, - integer_zero_node))), - arg1_tree, - expr_tree); - /* Make sure SAVE_EXPRs get referenced early enough. */ - expr_tree - = ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, arg1_tree), - ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, arg2_tree), - ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, - mask_arg1), - ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, - masked_arg1), - expr_tree)))); - expr_tree - = ffecom_2 (COMPOUND_EXPR, tree_type, - convert (void_type_node, - arg3_tree), - expr_tree); - } - return expr_tree; - - case FFEINTRIN_impLOC: - { - tree arg1_tree = ffecom_expr (arg1); - - expr_tree - = convert (tree_type, - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree)); - } - return expr_tree; - - case FFEINTRIN_impMVBITS: - { - tree arg1_tree; - tree arg2_tree; - tree arg3_tree; - ffebld arg4 = ffebld_head (ffebld_trail (list)); - tree arg4_tree; - tree arg4_type; - ffebld arg5 = ffebld_head (ffebld_trail (ffebld_trail (list))); - tree arg5_tree; - tree prep_arg1; - tree prep_arg4; - tree arg5_plus_arg3; - - arg2_tree = convert (integer_type_node, - ffecom_expr (arg2)); - arg3_tree = ffecom_save_tree (convert (integer_type_node, - ffecom_expr (arg3))); - arg4_tree = ffecom_expr_rw (NULL_TREE, arg4); - arg4_type = TREE_TYPE (arg4_tree); - - arg1_tree = ffecom_save_tree (convert (arg4_type, - ffecom_expr (arg1))); - - arg5_tree = ffecom_save_tree (convert (integer_type_node, - ffecom_expr (arg5))); - - prep_arg1 - = ffecom_2 (LSHIFT_EXPR, arg4_type, - ffecom_2 (BIT_AND_EXPR, arg4_type, - ffecom_2 (RSHIFT_EXPR, arg4_type, - arg1_tree, - arg2_tree), - ffecom_1 (BIT_NOT_EXPR, arg4_type, - ffecom_2 (LSHIFT_EXPR, arg4_type, - ffecom_1 (BIT_NOT_EXPR, - arg4_type, - convert - (arg4_type, - integer_zero_node)), - arg3_tree))), - arg5_tree); - arg5_plus_arg3 - = ffecom_save_tree (ffecom_2 (PLUS_EXPR, arg4_type, - arg5_tree, - arg3_tree)); - prep_arg4 - = ffecom_2 (LSHIFT_EXPR, arg4_type, - ffecom_1 (BIT_NOT_EXPR, arg4_type, - convert (arg4_type, - integer_zero_node)), - arg5_plus_arg3); - /* Fix up, because LSHIFT_EXPR above can't shift over TYPE_SIZE. */ - prep_arg4 - = ffecom_3 (COND_EXPR, arg4_type, - ffecom_truth_value - (ffecom_2 (NE_EXPR, integer_type_node, - arg5_plus_arg3, - convert (TREE_TYPE (arg5_plus_arg3), - TYPE_SIZE (arg4_type)))), - prep_arg4, - convert (arg4_type, integer_zero_node)); - prep_arg4 - = ffecom_2 (BIT_AND_EXPR, arg4_type, - arg4_tree, - ffecom_2 (BIT_IOR_EXPR, arg4_type, - prep_arg4, - ffecom_1 (BIT_NOT_EXPR, arg4_type, - ffecom_2 (LSHIFT_EXPR, arg4_type, - ffecom_1 (BIT_NOT_EXPR, - arg4_type, - convert - (arg4_type, - integer_zero_node)), - arg5_tree)))); - prep_arg1 - = ffecom_2 (BIT_IOR_EXPR, arg4_type, - prep_arg1, - prep_arg4); - /* Fix up (twice), because LSHIFT_EXPR above - can't shift over TYPE_SIZE. */ - prep_arg1 - = ffecom_3 (COND_EXPR, arg4_type, - ffecom_truth_value - (ffecom_2 (NE_EXPR, integer_type_node, - arg3_tree, - convert (TREE_TYPE (arg3_tree), - integer_zero_node))), - prep_arg1, - arg4_tree); - prep_arg1 - = ffecom_3 (COND_EXPR, arg4_type, - ffecom_truth_value - (ffecom_2 (NE_EXPR, integer_type_node, - arg3_tree, - convert (TREE_TYPE (arg3_tree), - TYPE_SIZE (arg4_type)))), - prep_arg1, - arg1_tree); - expr_tree - = ffecom_2s (MODIFY_EXPR, void_type_node, - arg4_tree, - prep_arg1); - /* Make sure SAVE_EXPRs get referenced early enough. */ - expr_tree - = ffecom_2 (COMPOUND_EXPR, void_type_node, - arg1_tree, - ffecom_2 (COMPOUND_EXPR, void_type_node, - arg3_tree, - ffecom_2 (COMPOUND_EXPR, void_type_node, - arg5_tree, - ffecom_2 (COMPOUND_EXPR, void_type_node, - arg5_plus_arg3, - expr_tree)))); - expr_tree - = ffecom_2 (COMPOUND_EXPR, void_type_node, - arg4_tree, - expr_tree); - - } - return expr_tree; - - case FFEINTRIN_impDERF: - case FFEINTRIN_impERF: - case FFEINTRIN_impDERFC: - case FFEINTRIN_impERFC: - break; - - case FFEINTRIN_impIARGC: - /* extern int xargc; i__1 = xargc - 1; */ - expr_tree = ffecom_2 (MINUS_EXPR, TREE_TYPE (ffecom_tree_xargc_), - ffecom_tree_xargc_, - convert (TREE_TYPE (ffecom_tree_xargc_), - integer_one_node)); - return expr_tree; - - case FFEINTRIN_impSIGNAL_func: - case FFEINTRIN_impSIGNAL_subr: - { - tree arg1_tree; - tree arg2_tree; - tree arg3_tree; - - arg1_tree = convert (ffecom_f2c_integer_type_node, - ffecom_expr (arg1)); - arg1_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree); - - /* Pass procedure as a pointer to it, anything else by value. */ - if (ffeinfo_kind (ffebld_info (arg2)) == FFEINFO_kindENTITY) - arg2_tree = convert (integer_type_node, ffecom_expr (arg2)); - else - arg2_tree = ffecom_ptr_to_expr (arg2); - arg2_tree = convert (TREE_TYPE (null_pointer_node), - arg2_tree); - - if (arg3 != NULL) - arg3_tree = ffecom_expr_w (NULL_TREE, arg3); - else - arg3_tree = NULL_TREE; - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - TREE_CHAIN (arg1_tree) = arg2_tree; - - expr_tree - = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - ((codegen_imp == FFEINTRIN_impSIGNAL_subr) ? - NULL_TREE : - tree_type), - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - - if (arg3_tree != NULL_TREE) - expr_tree - = ffecom_modify (NULL_TREE, arg3_tree, - convert (TREE_TYPE (arg3_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impALARM: - { - tree arg1_tree; - tree arg2_tree; - tree arg3_tree; - - arg1_tree = convert (ffecom_f2c_integer_type_node, - ffecom_expr (arg1)); - arg1_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree); - - /* Pass procedure as a pointer to it, anything else by value. */ - if (ffeinfo_kind (ffebld_info (arg2)) == FFEINFO_kindENTITY) - arg2_tree = convert (integer_type_node, ffecom_expr (arg2)); - else - arg2_tree = ffecom_ptr_to_expr (arg2); - arg2_tree = convert (TREE_TYPE (null_pointer_node), - arg2_tree); - - if (arg3 != NULL) - arg3_tree = ffecom_expr_w (NULL_TREE, arg3); - else - arg3_tree = NULL_TREE; - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - TREE_CHAIN (arg1_tree) = arg2_tree; - - expr_tree - = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - - if (arg3_tree != NULL_TREE) - expr_tree - = ffecom_modify (NULL_TREE, arg3_tree, - convert (TREE_TYPE (arg3_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impCHDIR_subr: - case FFEINTRIN_impFDATE_subr: - case FFEINTRIN_impFGET_subr: - case FFEINTRIN_impFPUT_subr: - case FFEINTRIN_impGETCWD_subr: - case FFEINTRIN_impHOSTNM_subr: - case FFEINTRIN_impSYSTEM_subr: - case FFEINTRIN_impUNLINK_subr: - { - tree arg1_len = integer_zero_node; - tree arg1_tree; - tree arg2_tree; - - arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len); - - if (arg2 != NULL) - arg2_tree = ffecom_expr_w (NULL_TREE, arg2); - else - arg2_tree = NULL_TREE; - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg1_len = build_tree_list (NULL_TREE, arg1_len); - TREE_CHAIN (arg1_tree) = arg1_len; - - expr_tree - = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - - if (arg2_tree != NULL_TREE) - expr_tree - = ffecom_modify (NULL_TREE, arg2_tree, - convert (TREE_TYPE (arg2_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impEXIT: - if (arg1 != NULL) - break; - - expr_tree = build_tree_list (NULL_TREE, - ffecom_1 (ADDR_EXPR, - build_pointer_type - (ffecom_integer_type_node), - integer_zero_node)); - - return - ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - void_type_node, - expr_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - - case FFEINTRIN_impFLUSH: - if (arg1 == NULL) - gfrt = FFECOM_gfrtFLUSH; - else - gfrt = FFECOM_gfrtFLUSH1; - break; - - case FFEINTRIN_impCHMOD_subr: - case FFEINTRIN_impLINK_subr: - case FFEINTRIN_impRENAME_subr: - case FFEINTRIN_impSYMLNK_subr: - { - tree arg1_len = integer_zero_node; - tree arg1_tree; - tree arg2_len = integer_zero_node; - tree arg2_tree; - tree arg3_tree; - - arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len); - arg2_tree = ffecom_arg_ptr_to_expr (arg2, &arg2_len); - if (arg3 != NULL) - arg3_tree = ffecom_expr_w (NULL_TREE, arg3); - else - arg3_tree = NULL_TREE; - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg1_len = build_tree_list (NULL_TREE, arg1_len); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - arg2_len = build_tree_list (NULL_TREE, arg2_len); - TREE_CHAIN (arg1_tree) = arg2_tree; - TREE_CHAIN (arg2_tree) = arg1_len; - TREE_CHAIN (arg1_len) = arg2_len; - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - if (arg3_tree != NULL_TREE) - expr_tree = ffecom_modify (NULL_TREE, arg3_tree, - convert (TREE_TYPE (arg3_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impLSTAT_subr: - case FFEINTRIN_impSTAT_subr: - { - tree arg1_len = integer_zero_node; - tree arg1_tree; - tree arg2_tree; - tree arg3_tree; - - arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len); - - arg2_tree = ffecom_ptr_to_expr (arg2); - - if (arg3 != NULL) - arg3_tree = ffecom_expr_w (NULL_TREE, arg3); - else - arg3_tree = NULL_TREE; - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg1_len = build_tree_list (NULL_TREE, arg1_len); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - TREE_CHAIN (arg1_tree) = arg2_tree; - TREE_CHAIN (arg2_tree) = arg1_len; - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - if (arg3_tree != NULL_TREE) - expr_tree = ffecom_modify (NULL_TREE, arg3_tree, - convert (TREE_TYPE (arg3_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impFGETC_subr: - case FFEINTRIN_impFPUTC_subr: - { - tree arg1_tree; - tree arg2_tree; - tree arg2_len = integer_zero_node; - tree arg3_tree; - - arg1_tree = convert (ffecom_f2c_integer_type_node, - ffecom_expr (arg1)); - arg1_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree); - - arg2_tree = ffecom_arg_ptr_to_expr (arg2, &arg2_len); - if (arg3 != NULL) - arg3_tree = ffecom_expr_w (NULL_TREE, arg3); - else - arg3_tree = NULL_TREE; - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - arg2_len = build_tree_list (NULL_TREE, arg2_len); - TREE_CHAIN (arg1_tree) = arg2_tree; - TREE_CHAIN (arg2_tree) = arg2_len; - - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - if (arg3_tree != NULL_TREE) - expr_tree = ffecom_modify (NULL_TREE, arg3_tree, - convert (TREE_TYPE (arg3_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impFSTAT_subr: - { - tree arg1_tree; - tree arg2_tree; - tree arg3_tree; - - arg1_tree = convert (ffecom_f2c_integer_type_node, - ffecom_expr (arg1)); - arg1_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree); - - arg2_tree = convert (ffecom_f2c_ptr_to_integer_type_node, - ffecom_ptr_to_expr (arg2)); - - if (arg3 == NULL) - arg3_tree = NULL_TREE; - else - arg3_tree = ffecom_expr_w (NULL_TREE, arg3); - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - TREE_CHAIN (arg1_tree) = arg2_tree; - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - if (arg3_tree != NULL_TREE) { - expr_tree = ffecom_modify (NULL_TREE, arg3_tree, - convert (TREE_TYPE (arg3_tree), - expr_tree)); - } - } - return expr_tree; - - case FFEINTRIN_impKILL_subr: - { - tree arg1_tree; - tree arg2_tree; - tree arg3_tree; - - arg1_tree = convert (ffecom_f2c_integer_type_node, - ffecom_expr (arg1)); - arg1_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree); - - arg2_tree = convert (ffecom_f2c_integer_type_node, - ffecom_expr (arg2)); - arg2_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg2_tree)), - arg2_tree); - - if (arg3 == NULL) - arg3_tree = NULL_TREE; - else - arg3_tree = ffecom_expr_w (NULL_TREE, arg3); - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - TREE_CHAIN (arg1_tree) = arg2_tree; - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - if (arg3_tree != NULL_TREE) { - expr_tree = ffecom_modify (NULL_TREE, arg3_tree, - convert (TREE_TYPE (arg3_tree), - expr_tree)); - } - } - return expr_tree; - - case FFEINTRIN_impCTIME_subr: - case FFEINTRIN_impTTYNAM_subr: - { - tree arg1_len = integer_zero_node; - tree arg1_tree; - tree arg2_tree; - - arg1_tree = ffecom_arg_ptr_to_expr (arg2, &arg1_len); - - arg2_tree = convert (((codegen_imp == FFEINTRIN_impCTIME_subr) ? - ffecom_f2c_longint_type_node : - ffecom_f2c_integer_type_node), - ffecom_expr (arg1)); - arg2_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg2_tree)), - arg2_tree); - - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - arg1_len = build_tree_list (NULL_TREE, arg1_len); - arg2_tree = build_tree_list (NULL_TREE, arg2_tree); - TREE_CHAIN (arg1_len) = arg2_tree; - TREE_CHAIN (arg1_tree) = arg1_len; - - expr_tree - = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - arg1_tree, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - TREE_SIDE_EFFECTS (expr_tree) = 1; - } - return expr_tree; - - case FFEINTRIN_impIRAND: - case FFEINTRIN_impRAND: - /* Arg defaults to 0 (normal random case) */ - { - tree arg1_tree; - - if (arg1 == NULL) - arg1_tree = ffecom_integer_zero_node; - else - arg1_tree = ffecom_expr (arg1); - arg1_tree = convert (ffecom_f2c_integer_type_node, - arg1_tree); - arg1_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree); - arg1_tree = build_tree_list (NULL_TREE, arg1_tree); - - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - ((codegen_imp == FFEINTRIN_impIRAND) ? - ffecom_f2c_integer_type_node : - ffecom_f2c_real_type_node), - arg1_tree, - dest_tree, dest, dest_used, - NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - } - return expr_tree; - - case FFEINTRIN_impFTELL_subr: - case FFEINTRIN_impUMASK_subr: - { - tree arg1_tree; - tree arg2_tree; - - arg1_tree = convert (ffecom_f2c_integer_type_node, - ffecom_expr (arg1)); - arg1_tree = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (arg1_tree)), - arg1_tree); - - if (arg2 == NULL) - arg2_tree = NULL_TREE; - else - arg2_tree = ffecom_expr_w (NULL_TREE, arg2); - - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - build_tree_list (NULL_TREE, arg1_tree), - NULL_TREE, NULL, NULL, NULL_TREE, - TRUE, - ffebld_nonter_hook (expr)); - if (arg2_tree != NULL_TREE) { - expr_tree = ffecom_modify (NULL_TREE, arg2_tree, - convert (TREE_TYPE (arg2_tree), - expr_tree)); - } - } - return expr_tree; - - case FFEINTRIN_impCPU_TIME: - case FFEINTRIN_impSECOND_subr: - { - tree arg1_tree; - - arg1_tree = ffecom_expr_w (NULL_TREE, arg1); - - expr_tree - = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - NULL_TREE, - NULL_TREE, NULL, NULL, NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - - expr_tree - = ffecom_modify (NULL_TREE, arg1_tree, - convert (TREE_TYPE (arg1_tree), - expr_tree)); - } - return expr_tree; - - case FFEINTRIN_impDTIME_subr: - case FFEINTRIN_impETIME_subr: - { - tree arg1_tree; - tree result_tree; - - result_tree = ffecom_expr_w (NULL_TREE, arg2); - - arg1_tree = ffecom_ptr_to_expr (arg1); - - expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt), - ffecom_gfrt_kindtype (gfrt), - FALSE, - NULL_TREE, - build_tree_list (NULL_TREE, arg1_tree), - NULL_TREE, NULL, NULL, NULL_TREE, - TRUE, - ffebld_nonter_hook (expr)); - expr_tree = ffecom_modify (NULL_TREE, result_tree, - convert (TREE_TYPE (result_tree), - expr_tree)); - } - return expr_tree; - - /* Straightforward calls of libf2c routines: */ - case FFEINTRIN_impABORT: - case FFEINTRIN_impACCESS: - case FFEINTRIN_impBESJ0: - case FFEINTRIN_impBESJ1: - case FFEINTRIN_impBESJN: - case FFEINTRIN_impBESY0: - case FFEINTRIN_impBESY1: - case FFEINTRIN_impBESYN: - case FFEINTRIN_impCHDIR_func: - case FFEINTRIN_impCHMOD_func: - case FFEINTRIN_impDATE: - case FFEINTRIN_impDATE_AND_TIME: - case FFEINTRIN_impDBESJ0: - case FFEINTRIN_impDBESJ1: - case FFEINTRIN_impDBESJN: - case FFEINTRIN_impDBESY0: - case FFEINTRIN_impDBESY1: - case FFEINTRIN_impDBESYN: - case FFEINTRIN_impDTIME_func: - case FFEINTRIN_impETIME_func: - case FFEINTRIN_impFGETC_func: - case FFEINTRIN_impFGET_func: - case FFEINTRIN_impFNUM: - case FFEINTRIN_impFPUTC_func: - case FFEINTRIN_impFPUT_func: - case FFEINTRIN_impFSEEK: - case FFEINTRIN_impFSTAT_func: - case FFEINTRIN_impFTELL_func: - case FFEINTRIN_impGERROR: - case FFEINTRIN_impGETARG: - case FFEINTRIN_impGETCWD_func: - case FFEINTRIN_impGETENV: - case FFEINTRIN_impGETGID: - case FFEINTRIN_impGETLOG: - case FFEINTRIN_impGETPID: - case FFEINTRIN_impGETUID: - case FFEINTRIN_impGMTIME: - case FFEINTRIN_impHOSTNM_func: - case FFEINTRIN_impIDATE_unix: - case FFEINTRIN_impIDATE_vxt: - case FFEINTRIN_impIERRNO: - case FFEINTRIN_impISATTY: - case FFEINTRIN_impITIME: - case FFEINTRIN_impKILL_func: - case FFEINTRIN_impLINK_func: - case FFEINTRIN_impLNBLNK: - case FFEINTRIN_impLSTAT_func: - case FFEINTRIN_impLTIME: - case FFEINTRIN_impMCLOCK8: - case FFEINTRIN_impMCLOCK: - case FFEINTRIN_impPERROR: - case FFEINTRIN_impRENAME_func: - case FFEINTRIN_impSECNDS: - case FFEINTRIN_impSECOND_func: - case FFEINTRIN_impSLEEP: - case FFEINTRIN_impSRAND: - case FFEINTRIN_impSTAT_func: - case FFEINTRIN_impSYMLNK_func: - case FFEINTRIN_impSYSTEM_CLOCK: - case FFEINTRIN_impSYSTEM_func: - case FFEINTRIN_impTIME8: - case FFEINTRIN_impTIME_unix: - case FFEINTRIN_impTIME_vxt: - case FFEINTRIN_impUMASK_func: - case FFEINTRIN_impUNLINK_func: - break; - - case FFEINTRIN_impCTIME_func: /* CHARACTER functions not handled here. */ - case FFEINTRIN_impFDATE_func: /* CHARACTER functions not handled here. */ - case FFEINTRIN_impTTYNAM_func: /* CHARACTER functions not handled here. */ - case FFEINTRIN_impNONE: - case FFEINTRIN_imp: /* Hush up gcc warning. */ - fprintf (stderr, "No %s implementation.\n", - ffeintrin_name_implementation (ffebld_symter_implementation (ffebld_left (expr)))); - assert ("unimplemented intrinsic" == NULL); - return error_mark_node; - } - - assert (gfrt != FFECOM_gfrt); /* Must have an implementation! */ - - expr_tree = ffecom_arglist_expr_ (ffecom_gfrt_args_ (gfrt), - ffebld_right (expr)); - - return ffecom_call_ (ffecom_gfrt_tree_ (gfrt), ffecom_gfrt_kindtype (gfrt), - (ffe_is_f2c_library () && ffecom_gfrt_complex_[gfrt]), - tree_type, - expr_tree, dest_tree, dest, dest_used, - NULL_TREE, TRUE, - ffebld_nonter_hook (expr)); - - /* See bottom of this file for f2c transforms used to determine - many of the above implementations. The info seems to confuse - Emacs's C mode indentation, which is why it's been moved to - the bottom of this source file. */ -} - -/* For power (exponentiation) where right-hand operand is type INTEGER, - generate in-line code to do it the fast way (which, if the operand - is a constant, might just mean a series of multiplies). */ - -static tree -ffecom_expr_power_integer_ (ffebld expr) -{ - tree l = ffecom_expr (ffebld_left (expr)); - tree r = ffecom_expr (ffebld_right (expr)); - tree ltype = TREE_TYPE (l); - tree rtype = TREE_TYPE (r); - tree result = NULL_TREE; - - if (l == error_mark_node - || r == error_mark_node) - return error_mark_node; - - if (TREE_CODE (r) == INTEGER_CST) - { - int sgn = tree_int_cst_sgn (r); - - if (sgn == 0) - return convert (ltype, integer_one_node); - - if ((TREE_CODE (ltype) == INTEGER_TYPE) - && (sgn < 0)) - { - /* Reciprocal of integer is either 0, -1, or 1, so after - calculating that (which we leave to the back end to do - or not do optimally), don't bother with any multiplying. */ - - result = ffecom_tree_divide_ (ltype, - convert (ltype, integer_one_node), - l, - NULL_TREE, NULL, NULL, NULL_TREE); - r = ffecom_1 (NEGATE_EXPR, - rtype, - r); - if ((TREE_INT_CST_LOW (r) & 1) == 0) - result = ffecom_1 (ABS_EXPR, rtype, - result); - } - - /* Generate appropriate series of multiplies, preceded - by divide if the exponent is negative. */ - - l = save_expr (l); - - if (sgn < 0) - { - l = ffecom_tree_divide_ (ltype, - convert (ltype, integer_one_node), - l, - NULL_TREE, NULL, NULL, - ffebld_nonter_hook (expr)); - r = ffecom_1 (NEGATE_EXPR, rtype, r); - assert (TREE_CODE (r) == INTEGER_CST); - - if (tree_int_cst_sgn (r) < 0) - { /* The "most negative" number. */ - r = ffecom_1 (NEGATE_EXPR, rtype, - ffecom_2 (RSHIFT_EXPR, rtype, - r, - integer_one_node)); - l = save_expr (l); - l = ffecom_2 (MULT_EXPR, ltype, - l, - l); - } - } - - for (;;) - { - if (TREE_INT_CST_LOW (r) & 1) - { - if (result == NULL_TREE) - result = l; - else - result = ffecom_2 (MULT_EXPR, ltype, - result, - l); - } - - r = ffecom_2 (RSHIFT_EXPR, rtype, - r, - integer_one_node); - if (integer_zerop (r)) - break; - assert (TREE_CODE (r) == INTEGER_CST); - - l = save_expr (l); - l = ffecom_2 (MULT_EXPR, ltype, - l, - l); - } - return result; - } - - /* Though rhs isn't a constant, in-line code cannot be expanded - while transforming dummies - because the back end cannot be easily convinced to generate - stores (MODIFY_EXPR), handle temporaries, and so on before - all the appropriate rtx's have been generated for things like - dummy args referenced in rhs -- which doesn't happen until - store_parm_decls() is called (expand_function_start, I believe, - does the actual rtx-stuffing of PARM_DECLs). - - So, in this case, let the caller generate the call to the - run-time-library function to evaluate the power for us. */ - - if (ffecom_transform_only_dummies_) - return NULL_TREE; - - /* Right-hand operand not a constant, expand in-line code to figure - out how to do the multiplies, &c. - - The returned expression is expressed this way in GNU C, where l and - r are the "inputs": - - ({ typeof (r) rtmp = r; - typeof (l) ltmp = l; - typeof (l) result; - - if (rtmp == 0) - result = 1; - else - { - if ((basetypeof (l) == basetypeof (int)) - && (rtmp < 0)) - { - result = ((typeof (l)) 1) / ltmp; - if ((ltmp < 0) && (((-rtmp) & 1) == 0)) - result = -result; - } - else - { - result = 1; - if ((basetypeof (l) != basetypeof (int)) - && (rtmp < 0)) - { - ltmp = ((typeof (l)) 1) / ltmp; - rtmp = -rtmp; - if (rtmp < 0) - { - rtmp = -(rtmp >> 1); - ltmp *= ltmp; - } - } - for (;;) - { - if (rtmp & 1) - result *= ltmp; - if ((rtmp >>= 1) == 0) - break; - ltmp *= ltmp; - } - } - } - result; - }) - - Note that some of the above is compile-time collapsable, such as - the first part of the if statements that checks the base type of - l against int. The if statements are phrased that way to suggest - an easy way to generate the if/else constructs here, knowing that - the back end should (and probably does) eliminate the resulting - dead code (either the int case or the non-int case), something - it couldn't do without the redundant phrasing, requiring explicit - dead-code elimination here, which would be kind of difficult to - read. */ - - { - tree rtmp; - tree ltmp; - tree divide; - tree basetypeof_l_is_int; - tree se; - tree t; - - basetypeof_l_is_int - = build_int_2 ((TREE_CODE (ltype) == INTEGER_TYPE), 0); - - se = expand_start_stmt_expr (/*has_scope=*/1); - - ffecom_start_compstmt (); - - rtmp = ffecom_make_tempvar ("power_r", rtype, - FFETARGET_charactersizeNONE, -1); - ltmp = ffecom_make_tempvar ("power_l", ltype, - FFETARGET_charactersizeNONE, -1); - result = ffecom_make_tempvar ("power_res", ltype, - FFETARGET_charactersizeNONE, -1); - if (TREE_CODE (ltype) == COMPLEX_TYPE - || TREE_CODE (ltype) == RECORD_TYPE) - divide = ffecom_make_tempvar ("power_div", ltype, - FFETARGET_charactersizeNONE, -1); - else - divide = NULL_TREE; - - expand_expr_stmt (ffecom_modify (void_type_node, - rtmp, - r)); - expand_expr_stmt (ffecom_modify (void_type_node, - ltmp, - l)); - expand_start_cond (ffecom_truth_value - (ffecom_2 (EQ_EXPR, integer_type_node, - rtmp, - convert (rtype, integer_zero_node))), - 0); - expand_expr_stmt (ffecom_modify (void_type_node, - result, - convert (ltype, integer_one_node))); - expand_start_else (); - if (! integer_zerop (basetypeof_l_is_int)) - { - expand_start_cond (ffecom_2 (LT_EXPR, integer_type_node, - rtmp, - convert (rtype, - integer_zero_node)), - 0); - expand_expr_stmt (ffecom_modify (void_type_node, - result, - ffecom_tree_divide_ - (ltype, - convert (ltype, integer_one_node), - ltmp, - NULL_TREE, NULL, NULL, - divide))); - expand_start_cond (ffecom_truth_value - (ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node, - ffecom_2 (LT_EXPR, integer_type_node, - ltmp, - convert (ltype, - integer_zero_node)), - ffecom_2 (EQ_EXPR, integer_type_node, - ffecom_2 (BIT_AND_EXPR, - rtype, - ffecom_1 (NEGATE_EXPR, - rtype, - rtmp), - convert (rtype, - integer_one_node)), - convert (rtype, - integer_zero_node)))), - 0); - expand_expr_stmt (ffecom_modify (void_type_node, - result, - ffecom_1 (NEGATE_EXPR, - ltype, - result))); - expand_end_cond (); - expand_start_else (); - } - expand_expr_stmt (ffecom_modify (void_type_node, - result, - convert (ltype, integer_one_node))); - expand_start_cond (ffecom_truth_value - (ffecom_2 (TRUTH_ANDIF_EXPR, integer_type_node, - ffecom_truth_value_invert - (basetypeof_l_is_int), - ffecom_2 (LT_EXPR, integer_type_node, - rtmp, - convert (rtype, - integer_zero_node)))), - 0); - expand_expr_stmt (ffecom_modify (void_type_node, - ltmp, - ffecom_tree_divide_ - (ltype, - convert (ltype, integer_one_node), - ltmp, - NULL_TREE, NULL, NULL, - divide))); - expand_expr_stmt (ffecom_modify (void_type_node, - rtmp, - ffecom_1 (NEGATE_EXPR, rtype, - rtmp))); - expand_start_cond (ffecom_truth_value - (ffecom_2 (LT_EXPR, integer_type_node, - rtmp, - convert (rtype, integer_zero_node))), - 0); - expand_expr_stmt (ffecom_modify (void_type_node, - rtmp, - ffecom_1 (NEGATE_EXPR, rtype, - ffecom_2 (RSHIFT_EXPR, - rtype, - rtmp, - integer_one_node)))); - expand_expr_stmt (ffecom_modify (void_type_node, - ltmp, - ffecom_2 (MULT_EXPR, ltype, - ltmp, - ltmp))); - expand_end_cond (); - expand_end_cond (); - expand_start_loop (1); - expand_start_cond (ffecom_truth_value - (ffecom_2 (BIT_AND_EXPR, rtype, - rtmp, - convert (rtype, integer_one_node))), - 0); - expand_expr_stmt (ffecom_modify (void_type_node, - result, - ffecom_2 (MULT_EXPR, ltype, - result, - ltmp))); - expand_end_cond (); - expand_exit_loop_if_false (NULL, - ffecom_truth_value - (ffecom_modify (rtype, - rtmp, - ffecom_2 (RSHIFT_EXPR, - rtype, - rtmp, - integer_one_node)))); - expand_expr_stmt (ffecom_modify (void_type_node, - ltmp, - ffecom_2 (MULT_EXPR, ltype, - ltmp, - ltmp))); - expand_end_loop (); - expand_end_cond (); - if (!integer_zerop (basetypeof_l_is_int)) - expand_end_cond (); - expand_expr_stmt (result); - - t = ffecom_end_compstmt (); - - result = expand_end_stmt_expr (se); - - /* This code comes from c-parse.in, after its expand_end_stmt_expr. */ - - if (TREE_CODE (t) == BLOCK) - { - /* Make a BIND_EXPR for the BLOCK already made. */ - result = build (BIND_EXPR, TREE_TYPE (result), - NULL_TREE, result, t); - /* Remove the block from the tree at this point. - It gets put back at the proper place - when the BIND_EXPR is expanded. */ - delete_block (t); - } - else - result = t; - } - - return result; -} - -/* ffecom_expr_transform_ -- Transform symbols in expr - - ffebld expr; // FFE expression. - ffecom_expr_transform_ (expr); - - Recursive descent on expr while transforming any untransformed SYMTERs. */ - -static void -ffecom_expr_transform_ (ffebld expr) -{ - tree t; - ffesymbol s; - - tail_recurse: - - if (expr == NULL) - return; - - switch (ffebld_op (expr)) - { - case FFEBLD_opSYMTER: - s = ffebld_symter (expr); - t = ffesymbol_hook (s).decl_tree; - if ((t == NULL_TREE) - && ((ffesymbol_kind (s) != FFEINFO_kindNONE) - || ((ffesymbol_where (s) != FFEINFO_whereNONE) - && (ffesymbol_where (s) != FFEINFO_whereINTRINSIC)))) - { - s = ffecom_sym_transform_ (s); - t = ffesymbol_hook (s).decl_tree; /* Sfunc expr non-dummy, - DIMENSION expr? */ - } - break; /* Ok if (t == NULL) here. */ - - case FFEBLD_opITEM: - ffecom_expr_transform_ (ffebld_head (expr)); - expr = ffebld_trail (expr); - goto tail_recurse; /* :::::::::::::::::::: */ - - default: - break; - } - - switch (ffebld_arity (expr)) - { - case 2: - ffecom_expr_transform_ (ffebld_left (expr)); - expr = ffebld_right (expr); - goto tail_recurse; /* :::::::::::::::::::: */ - - case 1: - expr = ffebld_left (expr); - goto tail_recurse; /* :::::::::::::::::::: */ - - default: - break; - } - - return; -} - -/* Make a type based on info in live f2c.h file. */ - -static void -ffecom_f2c_make_type_ (tree *type, int tcode, const char *name) -{ - switch (tcode) - { - case FFECOM_f2ccodeCHAR: - *type = make_signed_type (CHAR_TYPE_SIZE); - break; - - case FFECOM_f2ccodeSHORT: - *type = make_signed_type (SHORT_TYPE_SIZE); - break; - - case FFECOM_f2ccodeINT: - *type = make_signed_type (INT_TYPE_SIZE); - break; - - case FFECOM_f2ccodeLONG: - *type = make_signed_type (LONG_TYPE_SIZE); - break; - - case FFECOM_f2ccodeLONGLONG: - *type = make_signed_type (LONG_LONG_TYPE_SIZE); - break; - - case FFECOM_f2ccodeCHARPTR: - *type = build_pointer_type (DEFAULT_SIGNED_CHAR - ? signed_char_type_node - : unsigned_char_type_node); - break; - - case FFECOM_f2ccodeFLOAT: - *type = make_node (REAL_TYPE); - TYPE_PRECISION (*type) = FLOAT_TYPE_SIZE; - layout_type (*type); - break; - - case FFECOM_f2ccodeDOUBLE: - *type = make_node (REAL_TYPE); - TYPE_PRECISION (*type) = DOUBLE_TYPE_SIZE; - layout_type (*type); - break; - - case FFECOM_f2ccodeLONGDOUBLE: - *type = make_node (REAL_TYPE); - TYPE_PRECISION (*type) = LONG_DOUBLE_TYPE_SIZE; - layout_type (*type); - break; - - case FFECOM_f2ccodeTWOREALS: - *type = ffecom_make_complex_type_ (ffecom_f2c_real_type_node); - break; - - case FFECOM_f2ccodeTWODOUBLEREALS: - *type = ffecom_make_complex_type_ (ffecom_f2c_doublereal_type_node); - break; - - default: - assert ("unexpected FFECOM_f2ccodeXYZZY!" == NULL); - *type = error_mark_node; - return; - } - - pushdecl (build_decl (TYPE_DECL, - ffecom_get_invented_identifier ("__g77_f2c_%s", name), - *type)); -} - -/* Set the f2c list-directed-I/O code for whatever (integral) type has the - given size. */ - -static void -ffecom_f2c_set_lio_code_ (ffeinfoBasictype bt, int size, int code) -{ - int j; - tree t; - - for (j = 0; ((size_t) j) < ARRAY_SIZE (ffecom_tree_type[0]); ++j) - if ((t = ffecom_tree_type[bt][j]) != NULL_TREE - && compare_tree_int (TYPE_SIZE (t), size) == 0) - { - assert (code != -1); - ffecom_f2c_typecode_[bt][j] = code; - code = -1; - } -} - -/* Finish up globals after doing all program units in file - - Need to handle only uninitialized COMMON areas. */ - -static ffeglobal -ffecom_finish_global_ (ffeglobal global) -{ - tree cbtype; - tree cbt; - tree size; - - if (ffeglobal_type (global) != FFEGLOBAL_typeCOMMON) - return global; - - if (ffeglobal_common_init (global)) - return global; - - cbt = ffeglobal_hook (global); - if ((cbt == NULL_TREE) - || !ffeglobal_common_have_size (global)) - return global; /* No need to make common, never ref'd. */ - - DECL_EXTERNAL (cbt) = 0; - - /* Give the array a size now. */ - - size = build_int_2 ((ffeglobal_common_size (global) - + ffeglobal_common_pad (global)) - 1, - 0); - - cbtype = TREE_TYPE (cbt); - TYPE_DOMAIN (cbtype) = build_range_type (integer_type_node, - integer_zero_node, - size); - if (!TREE_TYPE (size)) - TREE_TYPE (size) = TYPE_DOMAIN (cbtype); - layout_type (cbtype); - - cbt = start_decl (cbt, FALSE); - assert (cbt == ffeglobal_hook (global)); - - finish_decl (cbt, NULL_TREE, FALSE); - - return global; -} - -/* Finish up any untransformed symbols. */ - -static ffesymbol -ffecom_finish_symbol_transform_ (ffesymbol s) -{ - if ((s == NULL) || (TREE_CODE (current_function_decl) == ERROR_MARK)) - return s; - - /* It's easy to know to transform an untransformed symbol, to make sure - we put out debugging info for it. But COMMON variables, unlike - EQUIVALENCE ones, aren't given declarations in addition to the - tree expressions that specify offsets, because COMMON variables - can be referenced in the outer scope where only dummy arguments - (PARM_DECLs) should really be seen. To be safe, just don't do any - VAR_DECLs for COMMON variables when we transform them for real - use, and therefore we do all the VAR_DECL creating here. */ - - if (ffesymbol_hook (s).decl_tree == NULL_TREE) - { - if (ffesymbol_kind (s) != FFEINFO_kindNONE - || (ffesymbol_where (s) != FFEINFO_whereNONE - && ffesymbol_where (s) != FFEINFO_whereINTRINSIC - && ffesymbol_where (s) != FFEINFO_whereDUMMY)) - /* Not transformed, and not CHARACTER*(*), and not a dummy - argument, which can happen only if the entry point names - it "rides in on" are all invalidated for other reasons. */ - s = ffecom_sym_transform_ (s); - } - - if ((ffesymbol_where (s) == FFEINFO_whereCOMMON) - && (ffesymbol_hook (s).decl_tree != error_mark_node)) - { - /* This isn't working, at least for dbxout. The .s file looks - okay to me (burley), but in gdb 4.9 at least, the variables - appear to reside somewhere outside of the common area, so - it doesn't make sense to mislead anyone by generating the info - on those variables until this is fixed. NOTE: Same problem - with EQUIVALENCE, sadly...see similar #if later. */ - ffecom_member_phase2_ (ffesymbol_storage (ffesymbol_common (s)), - ffesymbol_storage (s)); - } - - return s; -} - -/* Append underscore(s) to name before calling get_identifier. "us" - is nonzero if the name already contains an underscore and thus - needs two underscores appended. */ - -static tree -ffecom_get_appended_identifier_ (char us, const char *name) -{ - int i; - char *newname; - tree id; - - newname = xmalloc ((i = strlen (name)) + 1 - + ffe_is_underscoring () - + us); - memcpy (newname, name, i); - newname[i] = '_'; - newname[i + us] = '_'; - newname[i + 1 + us] = '\0'; - id = get_identifier (newname); - - free (newname); - - return id; -} - -/* Decide whether to append underscore to name before calling - get_identifier. */ - -static tree -ffecom_get_external_identifier_ (ffesymbol s) -{ - char us; - const char *name = ffesymbol_text (s); - - /* If name is a built-in name, just return it as is. */ - - if (!ffe_is_underscoring () - || (strcmp (name, FFETARGET_nameBLANK_COMMON) == 0) - || (strcmp (name, FFETARGET_nameUNNAMED_MAIN) == 0) - || (strcmp (name, FFETARGET_nameUNNAMED_BLOCK_DATA) == 0)) - return get_identifier (name); - - us = ffe_is_second_underscore () - ? (strchr (name, '_') != NULL) - : 0; - - return ffecom_get_appended_identifier_ (us, name); -} - -/* Decide whether to append underscore to internal name before calling - get_identifier. - - This is for non-external, top-function-context names only. Transform - identifier so it doesn't conflict with the transformed result - of using a _different_ external name. E.g. if "CALL FOO" is - transformed into "FOO_();", then the variable in "FOO_ = 3" - must be transformed into something that does not conflict, since - these two things should be independent. - - The transformation is as follows. If the name does not contain - an underscore, there is no possible conflict, so just return. - If the name does contain an underscore, then transform it just - like we transform an external identifier. */ - -static tree -ffecom_get_identifier_ (const char *name) -{ - /* If name does not contain an underscore, just return it as is. */ - - if (!ffe_is_underscoring () - || (strchr (name, '_') == NULL)) - return get_identifier (name); - - return ffecom_get_appended_identifier_ (ffe_is_second_underscore (), - name); -} - -/* ffecom_gen_sfuncdef_ -- Generate definition of statement function - - tree t; - ffesymbol s; // kindFUNCTION, whereIMMEDIATE. - t = ffecom_gen_sfuncdef_(s,ffesymbol_basictype(s), - ffesymbol_kindtype(s)); - - Call after setting up containing function and getting trees for all - other symbols. */ - -static tree -ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) -{ - ffebld expr = ffesymbol_sfexpr (s); - tree type; - tree func; - tree result; - bool charfunc = (bt == FFEINFO_basictypeCHARACTER); - static bool recurse = FALSE; - location_t old_loc = input_location; - - ffecom_nested_entry_ = s; - - /* For now, we don't have a handy pointer to where the sfunc is actually - defined, though that should be easy to add to an ffesymbol. (The - token/where info available might well point to the place where the type - of the sfunc is declared, especially if that precedes the place where - the sfunc itself is defined, which is typically the case.) We should - put out a null pointer rather than point somewhere wrong, but I want to - see how it works at this point. */ - - input_filename = ffesymbol_where_filename (s); - input_line = ffesymbol_where_filelinenum (s); - - /* Pretransform the expression so any newly discovered things belong to the - outer program unit, not to the statement function. */ - - ffecom_expr_transform_ (expr); - - /* Make sure no recursive invocation of this fn (a specific case of failing - to pretransform an sfunc's expression, i.e. where its expression - references another untransformed sfunc) happens. */ - - assert (!recurse); - recurse = TRUE; - - push_f_function_context (); - - if (charfunc) - type = void_type_node; - else - { - type = ffecom_tree_type[bt][kt]; - if (type == NULL_TREE) - type = integer_type_node; /* _sym_exec_transition reports - error. */ - } - - start_function (ffecom_get_identifier_ (ffesymbol_text (s)), - build_function_type (type, NULL_TREE), - 1, /* nested/inline */ - 0); /* TREE_PUBLIC */ - - /* We don't worry about COMPLEX return values here, because this is - entirely internal to our code, and gcc has the ability to return COMPLEX - directly as a value. */ - - if (charfunc) - { /* Prepend arg for where result goes. */ - tree type; - - type = ffecom_tree_type[FFEINFO_basictypeCHARACTER][kt]; - - result = ffecom_get_invented_identifier ("__g77_%s", "result"); - - ffecom_char_enhance_arg_ (&type, s); /* Ignore returned length. */ - - type = build_pointer_type (type); - result = build_decl (PARM_DECL, result, type); - - push_parm_decl (result); - } - else - result = NULL_TREE; /* Not ref'd if !charfunc. */ - - ffecom_push_dummy_decls_ (ffesymbol_dummyargs (s), TRUE); - - store_parm_decls (0); - - ffecom_start_compstmt (); - - if (expr != NULL) - { - if (charfunc) - { - ffetargetCharacterSize sz = ffesymbol_size (s); - tree result_length; - - result_length = build_int_2 (sz, 0); - TREE_TYPE (result_length) = ffecom_f2c_ftnlen_type_node; - - ffecom_prepare_let_char_ (sz, expr); - - ffecom_prepare_end (); - - ffecom_let_char_ (result, result_length, sz, expr); - expand_null_return (); - } - else - { - ffecom_prepare_expr (expr); - - ffecom_prepare_end (); - - expand_return (ffecom_modify (NULL_TREE, - DECL_RESULT (current_function_decl), - ffecom_expr (expr))); - } - } - - ffecom_end_compstmt (); - - func = current_function_decl; - finish_function (1); - - pop_f_function_context (); - - recurse = FALSE; - - input_location = old_loc; - - ffecom_nested_entry_ = NULL; - - return func; -} - -static const char * -ffecom_gfrt_args_ (ffecomGfrt ix) -{ - return ffecom_gfrt_argstring_[ix]; -} - -static tree -ffecom_gfrt_tree_ (ffecomGfrt ix) -{ - if (ffecom_gfrt_[ix] == NULL_TREE) - ffecom_make_gfrt_ (ix); - - return ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (ffecom_gfrt_[ix])), - ffecom_gfrt_[ix]); -} - -/* Return initialize-to-zero expression for this VAR_DECL. */ - -/* A somewhat evil way to prevent the garbage collector - from collecting 'tree' structures. */ -#define NUM_TRACKED_CHUNK 63 -struct tree_ggc_tracker GTY(()) -{ - struct tree_ggc_tracker *next; - tree trees[NUM_TRACKED_CHUNK]; -}; -static GTY(()) struct tree_ggc_tracker *tracker_head; - -void -ffecom_save_tree_forever (tree t) -{ - int i; - if (tracker_head != NULL) - for (i = 0; i < NUM_TRACKED_CHUNK; i++) - if (tracker_head->trees[i] == NULL) - { - tracker_head->trees[i] = t; - return; - } - - { - /* Need to allocate a new block. */ - struct tree_ggc_tracker *old_head = tracker_head; - - tracker_head = ggc_alloc (sizeof (*tracker_head)); - tracker_head->next = old_head; - tracker_head->trees[0] = t; - for (i = 1; i < NUM_TRACKED_CHUNK; i++) - tracker_head->trees[i] = NULL; - } -} - -static tree -ffecom_init_zero_ (tree decl) -{ - tree init; - int incremental = TREE_STATIC (decl); - tree type = TREE_TYPE (decl); - - if (incremental) - { - make_decl_rtl (decl, NULL); - assemble_variable (decl, TREE_PUBLIC (decl) ? 1 : 0, 0, 1); - } - - if ((TREE_CODE (type) != ARRAY_TYPE) - && (TREE_CODE (type) != RECORD_TYPE) - && (TREE_CODE (type) != UNION_TYPE) - && !incremental) - init = convert (type, integer_zero_node); - else if (!incremental) - { - init = build_constructor (type, NULL_TREE); - TREE_CONSTANT (init) = 1; - TREE_STATIC (init) = 1; - } - else - { - assemble_zeros (int_size_in_bytes (type)); - init = error_mark_node; - } - - return init; -} - -static tree -ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg, tree *maybe_tree) -{ - tree expr_tree; - tree length_tree; - - switch (ffebld_op (arg)) - { - case FFEBLD_opCONTER: /* For F90, check 0-length. */ - if (ffetarget_length_character1 - (ffebld_constant_character1 - (ffebld_conter (arg))) == 0) - { - *maybe_tree = integer_zero_node; - return convert (tree_type, integer_zero_node); - } - - *maybe_tree = integer_one_node; - expr_tree = build_int_2 (*ffetarget_text_character1 - (ffebld_constant_character1 - (ffebld_conter (arg))), - 0); - TREE_TYPE (expr_tree) = tree_type; - return expr_tree; - - case FFEBLD_opSYMTER: - case FFEBLD_opARRAYREF: - case FFEBLD_opFUNCREF: - case FFEBLD_opSUBSTR: - ffecom_char_args_ (&expr_tree, &length_tree, arg); - - if ((expr_tree == error_mark_node) - || (length_tree == error_mark_node)) - { - *maybe_tree = error_mark_node; - return error_mark_node; - } - - if (integer_zerop (length_tree)) - { - *maybe_tree = integer_zero_node; - return convert (tree_type, integer_zero_node); - } - - expr_tree - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (expr_tree))), - expr_tree); - expr_tree - = ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (expr_tree))), - expr_tree, - integer_one_node); - expr_tree = convert (tree_type, expr_tree); - - if (TREE_CODE (length_tree) == INTEGER_CST) - *maybe_tree = integer_one_node; - else /* Must check length at run time. */ - *maybe_tree - = ffecom_truth_value - (ffecom_2 (GT_EXPR, integer_type_node, - length_tree, - ffecom_f2c_ftnlen_zero_node)); - return expr_tree; - - case FFEBLD_opPAREN: - case FFEBLD_opCONVERT: - if (ffeinfo_size (ffebld_info (arg)) == 0) - { - *maybe_tree = integer_zero_node; - return convert (tree_type, integer_zero_node); - } - return ffecom_intrinsic_ichar_ (tree_type, ffebld_left (arg), - maybe_tree); - - case FFEBLD_opCONCATENATE: - { - tree maybe_left; - tree maybe_right; - tree expr_left; - tree expr_right; - - expr_left = ffecom_intrinsic_ichar_ (tree_type, ffebld_left (arg), - &maybe_left); - expr_right = ffecom_intrinsic_ichar_ (tree_type, ffebld_right (arg), - &maybe_right); - *maybe_tree = ffecom_2 (TRUTH_ORIF_EXPR, integer_type_node, - maybe_left, - maybe_right); - expr_tree = ffecom_3 (COND_EXPR, tree_type, - maybe_left, - expr_left, - expr_right); - return expr_tree; - } - - default: - assert ("bad op in ICHAR" == NULL); - return error_mark_node; - } -} - -/* ffecom_intrinsic_len_ -- Return length info for char arg (LEN()) - - tree length_arg; - ffebld expr; - length_arg = ffecom_intrinsic_len_ (expr); - - Handles CHARACTER-type CONTER, SYMTER, SUBSTR, ARRAYREF, and FUNCREF - subexpressions by constructing the appropriate tree for the - length-of-character-text argument in a calling sequence. */ - -static tree -ffecom_intrinsic_len_ (ffebld expr) -{ - ffetargetCharacter1 val; - tree length; - - switch (ffebld_op (expr)) - { - case FFEBLD_opCONTER: - val = ffebld_constant_character1 (ffebld_conter (expr)); - length = build_int_2 (ffetarget_length_character1 (val), 0); - TREE_TYPE (length) = ffecom_f2c_ftnlen_type_node; - break; - - case FFEBLD_opSYMTER: - { - ffesymbol s = ffebld_symter (expr); - tree item; - - item = ffesymbol_hook (s).decl_tree; - if (item == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - item = ffesymbol_hook (s).decl_tree; - } - if (ffesymbol_kind (s) == FFEINFO_kindENTITY) - { - if (ffesymbol_size (s) == FFETARGET_charactersizeNONE) - length = ffesymbol_hook (s).length_tree; - else - { - length = build_int_2 (ffesymbol_size (s), 0); - TREE_TYPE (length) = ffecom_f2c_ftnlen_type_node; - } - } - else if (item == error_mark_node) - length = error_mark_node; - else /* FFEINFO_kindFUNCTION: */ - length = NULL_TREE; - } - break; - - case FFEBLD_opARRAYREF: - length = ffecom_intrinsic_len_ (ffebld_left (expr)); - break; - - case FFEBLD_opSUBSTR: - { - ffebld start; - ffebld end; - ffebld thing = ffebld_right (expr); - tree start_tree; - tree end_tree; - - assert (ffebld_op (thing) == FFEBLD_opITEM); - start = ffebld_head (thing); - thing = ffebld_trail (thing); - assert (ffebld_trail (thing) == NULL); - end = ffebld_head (thing); - - length = ffecom_intrinsic_len_ (ffebld_left (expr)); - - if (length == error_mark_node) - break; - - if (start == NULL) - { - if (end == NULL) - ; - else - { - length = convert (ffecom_f2c_ftnlen_type_node, - ffecom_expr (end)); - } - } - else - { - start_tree = convert (ffecom_f2c_ftnlen_type_node, - ffecom_expr (start)); - - if (start_tree == error_mark_node) - { - length = error_mark_node; - break; - } - - if (end == NULL) - { - length = ffecom_2 (PLUS_EXPR, ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - ffecom_2 (MINUS_EXPR, - ffecom_f2c_ftnlen_type_node, - length, - start_tree)); - } - else - { - end_tree = convert (ffecom_f2c_ftnlen_type_node, - ffecom_expr (end)); - - if (end_tree == error_mark_node) - { - length = error_mark_node; - break; - } - - length = ffecom_2 (PLUS_EXPR, ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - ffecom_2 (MINUS_EXPR, - ffecom_f2c_ftnlen_type_node, - end_tree, start_tree)); - } - } - } - break; - - case FFEBLD_opCONCATENATE: - length - = ffecom_2 (PLUS_EXPR, ffecom_f2c_ftnlen_type_node, - ffecom_intrinsic_len_ (ffebld_left (expr)), - ffecom_intrinsic_len_ (ffebld_right (expr))); - break; - - case FFEBLD_opFUNCREF: - case FFEBLD_opCONVERT: - length = build_int_2 (ffebld_size (expr), 0); - TREE_TYPE (length) = ffecom_f2c_ftnlen_type_node; - break; - - default: - assert ("bad op for single char arg expr" == NULL); - length = ffecom_f2c_ftnlen_zero_node; - break; - } - - assert (length != NULL_TREE); - - return length; -} - -/* Handle CHARACTER assignments. - - Generates code to do the assignment. Used by ordinary assignment - statement handler ffecom_let_stmt and by statement-function - handler to generate code for a statement function. */ - -static void -ffecom_let_char_ (tree dest_tree, tree dest_length, - ffetargetCharacterSize dest_size, ffebld source) -{ - ffecomConcatList_ catlist; - tree source_length; - tree source_tree; - tree expr_tree; - - if ((dest_tree == error_mark_node) - || (dest_length == error_mark_node)) - return; - - assert (dest_tree != NULL_TREE); - assert (dest_length != NULL_TREE); - - /* Source might be an opCONVERT, which just means it is a different size - than the destination. Since the underlying implementation here handles - that (directly or via the s_copy or s_cat run-time-library functions), - we don't need the "convenience" of an opCONVERT that tells us to - truncate or blank-pad, particularly since the resulting implementation - would probably be slower than otherwise. */ - - while (ffebld_op (source) == FFEBLD_opCONVERT) - source = ffebld_left (source); - - catlist = ffecom_concat_list_new_ (source, dest_size); - switch (ffecom_concat_list_count_ (catlist)) - { - case 0: /* Shouldn't happen, but in case it does... */ - ffecom_concat_list_kill_ (catlist); - source_tree = null_pointer_node; - source_length = ffecom_f2c_ftnlen_zero_node; - expr_tree = build_tree_list (NULL_TREE, dest_tree); - TREE_CHAIN (expr_tree) = build_tree_list (NULL_TREE, source_tree); - TREE_CHAIN (TREE_CHAIN (expr_tree)) - = build_tree_list (NULL_TREE, dest_length); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (expr_tree))) - = build_tree_list (NULL_TREE, source_length); - - expr_tree = ffecom_call_gfrt (FFECOM_gfrtCOPY, expr_tree, NULL_TREE); - TREE_SIDE_EFFECTS (expr_tree) = 1; - - expand_expr_stmt (expr_tree); - - return; - - case 1: /* The (fairly) easy case. */ - ffecom_char_args_ (&source_tree, &source_length, - ffecom_concat_list_expr_ (catlist, 0)); - ffecom_concat_list_kill_ (catlist); - assert (source_tree != NULL_TREE); - assert (source_length != NULL_TREE); - - if ((source_tree == error_mark_node) - || (source_length == error_mark_node)) - return; - - if (dest_size == 1) - { - dest_tree - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE - (dest_tree))), - dest_tree); - dest_tree - = ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE - (dest_tree))), - dest_tree, - integer_one_node); - source_tree - = ffecom_1 (INDIRECT_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE - (source_tree))), - source_tree); - source_tree - = ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE - (source_tree))), - source_tree, - integer_one_node); - - expr_tree = ffecom_modify (void_type_node, dest_tree, source_tree); - - expand_expr_stmt (expr_tree); - - return; - } - - expr_tree = build_tree_list (NULL_TREE, dest_tree); - TREE_CHAIN (expr_tree) = build_tree_list (NULL_TREE, source_tree); - TREE_CHAIN (TREE_CHAIN (expr_tree)) - = build_tree_list (NULL_TREE, dest_length); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (expr_tree))) - = build_tree_list (NULL_TREE, source_length); - - expr_tree = ffecom_call_gfrt (FFECOM_gfrtCOPY, expr_tree, NULL_TREE); - TREE_SIDE_EFFECTS (expr_tree) = 1; - - expand_expr_stmt (expr_tree); - - return; - - default: /* Must actually concatenate things. */ - break; - } - - /* Heavy-duty concatenation. */ - - { - int count = ffecom_concat_list_count_ (catlist); - int i; - tree lengths; - tree items; - tree length_array; - tree item_array; - tree citem; - tree clength; - - { - tree hook; - - hook = ffebld_nonter_hook (source); - assert (hook); - assert (TREE_CODE (hook) == TREE_VEC); - assert (TREE_VEC_LENGTH (hook) == 2); - length_array = lengths = TREE_VEC_ELT (hook, 0); - item_array = items = TREE_VEC_ELT (hook, 1); - } - - for (i = 0; i < count; ++i) - { - ffecom_char_args_ (&citem, &clength, - ffecom_concat_list_expr_ (catlist, i)); - if ((citem == error_mark_node) - || (clength == error_mark_node)) - { - ffecom_concat_list_kill_ (catlist); - return; - } - - items - = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (items), - ffecom_modify (void_type_node, - ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item_array))), - item_array, - build_int_2 (i, 0)), - citem), - items); - lengths - = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (lengths), - ffecom_modify (void_type_node, - ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (length_array))), - length_array, - build_int_2 (i, 0)), - clength), - lengths); - } - - expr_tree = build_tree_list (NULL_TREE, dest_tree); - TREE_CHAIN (expr_tree) - = build_tree_list (NULL_TREE, - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (items)), - items)); - TREE_CHAIN (TREE_CHAIN (expr_tree)) - = build_tree_list (NULL_TREE, - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (lengths)), - lengths)); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (expr_tree))) - = build_tree_list - (NULL_TREE, - ffecom_1 (ADDR_EXPR, ffecom_f2c_ptr_to_ftnlen_type_node, - convert (ffecom_f2c_ftnlen_type_node, - build_int_2 (count, 0)))); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (expr_tree)))) - = build_tree_list (NULL_TREE, dest_length); - - expr_tree = ffecom_call_gfrt (FFECOM_gfrtCAT, expr_tree, NULL_TREE); - TREE_SIDE_EFFECTS (expr_tree) = 1; - - expand_expr_stmt (expr_tree); - } - - ffecom_concat_list_kill_ (catlist); -} - -/* ffecom_make_gfrt_ -- Make initial info for run-time routine - - ffecomGfrt ix; - ffecom_make_gfrt_(ix); - - Assumes gfrt_[ix] is NULL_TREE, and replaces it with the FUNCTION_DECL - for the indicated run-time routine (ix). */ - -static void -ffecom_make_gfrt_ (ffecomGfrt ix) -{ - tree t; - tree ttype; - - switch (ffecom_gfrt_type_[ix]) - { - case FFECOM_rttypeVOID_: - ttype = void_type_node; - break; - - case FFECOM_rttypeVOIDSTAR_: - ttype = TREE_TYPE (null_pointer_node); /* `void *'. */ - break; - - case FFECOM_rttypeFTNINT_: - ttype = ffecom_f2c_ftnint_type_node; - break; - - case FFECOM_rttypeINTEGER_: - ttype = ffecom_f2c_integer_type_node; - break; - - case FFECOM_rttypeLONGINT_: - ttype = ffecom_f2c_longint_type_node; - break; - - case FFECOM_rttypeLOGICAL_: - ttype = ffecom_f2c_logical_type_node; - break; - - case FFECOM_rttypeREAL_F2C_: - ttype = double_type_node; - break; - - case FFECOM_rttypeREAL_GNU_: - ttype = float_type_node; - break; - - case FFECOM_rttypeCOMPLEX_F2C_: - ttype = void_type_node; - break; - - case FFECOM_rttypeCOMPLEX_GNU_: - ttype = ffecom_f2c_complex_type_node; - break; - - case FFECOM_rttypeDOUBLE_: - ttype = double_type_node; - break; - - case FFECOM_rttypeDOUBLEREAL_: - ttype = ffecom_f2c_doublereal_type_node; - break; - - case FFECOM_rttypeDBLCMPLX_F2C_: - ttype = void_type_node; - break; - - case FFECOM_rttypeDBLCMPLX_GNU_: - ttype = ffecom_f2c_doublecomplex_type_node; - break; - - case FFECOM_rttypeCHARACTER_: - ttype = void_type_node; - break; - - default: - ttype = NULL; - assert ("bad rttype" == NULL); - break; - } - - ttype = build_function_type (ttype, NULL_TREE); - t = build_decl (FUNCTION_DECL, - get_identifier (ffecom_gfrt_name_[ix]), - ttype); - DECL_EXTERNAL (t) = 1; - TREE_READONLY (t) = ffecom_gfrt_const_[ix] ? 1 : 0; - TREE_PUBLIC (t) = 1; - TREE_THIS_VOLATILE (t) = ffecom_gfrt_volatile_[ix] ? 1 : 0; - - /* Sanity check: A function that's const cannot be volatile. */ - - assert (ffecom_gfrt_const_[ix] ? !ffecom_gfrt_volatile_[ix] : 1); - - /* Sanity check: A function that's const cannot return complex. */ - - assert (ffecom_gfrt_const_[ix] ? !ffecom_gfrt_complex_[ix] : 1); - - t = start_decl (t, TRUE); - - finish_decl (t, NULL_TREE, TRUE); - - ffecom_gfrt_[ix] = t; -} - -/* Phase 1 pass over each member of a COMMON/EQUIVALENCE group. */ - -static void -ffecom_member_phase1_ (ffestorag mst UNUSED, ffestorag st) -{ - ffesymbol s = ffestorag_symbol (st); - - if (ffesymbol_namelisted (s)) - ffecom_member_namelisted_ = TRUE; -} - -/* Phase 2 pass over each member of a COMMON/EQUIVALENCE group. Declare - the member so debugger will see it. Otherwise nobody should be - referencing the member. */ - -static void -ffecom_member_phase2_ (ffestorag mst, ffestorag st) -{ - ffesymbol s; - tree t; - tree mt; - tree type; - - if ((mst == NULL) - || ((mt = ffestorag_hook (mst)) == NULL) - || (mt == error_mark_node)) - return; - - if ((st == NULL) - || ((s = ffestorag_symbol (st)) == NULL)) - return; - - type = ffecom_type_localvar_ (s, - ffesymbol_basictype (s), - ffesymbol_kindtype (s)); - if (type == error_mark_node) - return; - - t = build_decl (VAR_DECL, - ffecom_get_identifier_ (ffesymbol_text (s)), - type); - - TREE_STATIC (t) = TREE_STATIC (mt); - DECL_INITIAL (t) = NULL_TREE; - TREE_ASM_WRITTEN (t) = 1; - TREE_USED (t) = 1; - - SET_DECL_RTL (t, - gen_rtx (MEM, TYPE_MODE (type), - plus_constant (XEXP (DECL_RTL (mt), 0), - ffestorag_modulo (mst) - + ffestorag_offset (st) - - ffestorag_offset (mst)))); - - t = start_decl (t, FALSE); - - finish_decl (t, NULL_TREE, FALSE); -} - -/* Prepare source expression for assignment into a destination perhaps known - to be of a specific size. */ - -static void -ffecom_prepare_let_char_ (ffetargetCharacterSize dest_size, ffebld source) -{ - ffecomConcatList_ catlist; - int count; - int i; - tree ltmp; - tree itmp; - tree tempvar = NULL_TREE; - - while (ffebld_op (source) == FFEBLD_opCONVERT) - source = ffebld_left (source); - - catlist = ffecom_concat_list_new_ (source, dest_size); - count = ffecom_concat_list_count_ (catlist); - - if (count >= 2) - { - ltmp - = ffecom_make_tempvar ("let_char_len", ffecom_f2c_ftnlen_type_node, - FFETARGET_charactersizeNONE, count); - itmp - = ffecom_make_tempvar ("let_char_item", ffecom_f2c_address_type_node, - FFETARGET_charactersizeNONE, count); - - tempvar = make_tree_vec (2); - TREE_VEC_ELT (tempvar, 0) = ltmp; - TREE_VEC_ELT (tempvar, 1) = itmp; - } - - for (i = 0; i < count; ++i) - ffecom_prepare_arg_ptr_to_expr (ffecom_concat_list_expr_ (catlist, i)); - - ffecom_concat_list_kill_ (catlist); - - if (tempvar) - { - ffebld_nonter_set_hook (source, tempvar); - current_binding_level->prep_state = 1; - } -} - -/* ffecom_push_dummy_decls_ -- Transform dummy args, push parm decls in order - - Ignores STAR (alternate-return) dummies. All other get exec-transitioned - (which generates their trees) and then their trees get push_parm_decl'd. - - The second arg is TRUE if the dummies are for a statement function, in - which case lengths are not pushed for character arguments (since they are - always known by both the caller and the callee, though the code allows - for someday permitting CHAR*(*) stmtfunc dummies). */ - -static void -ffecom_push_dummy_decls_ (ffebld dummy_list, bool stmtfunc) -{ - ffebld dummy; - ffebld dumlist; - ffesymbol s; - tree parm; - - ffecom_transform_only_dummies_ = TRUE; - - /* First push the parms corresponding to actual dummy "contents". */ - - for (dumlist = dummy_list; dumlist != NULL; dumlist = ffebld_trail (dumlist)) - { - dummy = ffebld_head (dumlist); - switch (ffebld_op (dummy)) - { - case FFEBLD_opSTAR: - case FFEBLD_opANY: - continue; /* Forget alternate returns. */ - - default: - break; - } - assert (ffebld_op (dummy) == FFEBLD_opSYMTER); - s = ffebld_symter (dummy); - parm = ffesymbol_hook (s).decl_tree; - if (parm == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - parm = ffesymbol_hook (s).decl_tree; - assert (parm != NULL_TREE); - } - if (parm != error_mark_node) - push_parm_decl (parm); - } - - /* Then, for CHARACTER dummies, push the parms giving their lengths. */ - - for (dumlist = dummy_list; dumlist != NULL; dumlist = ffebld_trail (dumlist)) - { - dummy = ffebld_head (dumlist); - switch (ffebld_op (dummy)) - { - case FFEBLD_opSTAR: - case FFEBLD_opANY: - continue; /* Forget alternate returns, they mean - NOTHING! */ - - default: - break; - } - s = ffebld_symter (dummy); - if (ffesymbol_basictype (s) != FFEINFO_basictypeCHARACTER) - continue; /* Only looking for CHARACTER arguments. */ - if (stmtfunc && (ffesymbol_size (s) != FFETARGET_charactersizeNONE)) - continue; /* Stmtfunc arg with known size needs no - length param. */ - if (ffesymbol_kind (s) != FFEINFO_kindENTITY) - continue; /* Only looking for variables and arrays. */ - parm = ffesymbol_hook (s).length_tree; - assert (parm != NULL_TREE); - if (parm != error_mark_node) - push_parm_decl (parm); - } - - ffecom_transform_only_dummies_ = FALSE; -} - -/* ffecom_start_progunit_ -- Beginning of program unit - - Does GNU back end stuff necessary to teach it about the start of its - equivalent of a Fortran program unit. */ - -static void -ffecom_start_progunit_ (void) -{ - ffesymbol fn = ffecom_primary_entry_; - ffebld arglist; - tree id; /* Identifier (name) of function. */ - tree type; /* Type of function. */ - tree result; /* Result of function. */ - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffeglobal g; - ffeglobalType gt; - ffeglobalType egt = FFEGLOBAL_type; - bool charfunc; - bool cmplxfunc; - bool altentries = (ffecom_num_entrypoints_ != 0); - bool multi - = altentries - && (ffecom_primary_entry_kind_ == FFEINFO_kindFUNCTION) - && (ffecom_master_bt_ == FFEINFO_basictypeNONE); - bool main_program = FALSE; - location_t old_loc = input_location; - - assert (fn != NULL); - assert (ffesymbol_hook (fn).decl_tree == NULL_TREE); - - input_filename = ffesymbol_where_filename (fn); - input_line = ffesymbol_where_filelinenum (fn); - - switch (ffecom_primary_entry_kind_) - { - case FFEINFO_kindPROGRAM: - main_program = TRUE; - gt = FFEGLOBAL_typeMAIN; - bt = FFEINFO_basictypeNONE; - kt = FFEINFO_kindtypeNONE; - type = ffecom_tree_fun_type_void; - charfunc = FALSE; - cmplxfunc = FALSE; - break; - - case FFEINFO_kindBLOCKDATA: - gt = FFEGLOBAL_typeBDATA; - bt = FFEINFO_basictypeNONE; - kt = FFEINFO_kindtypeNONE; - type = ffecom_tree_fun_type_void; - charfunc = FALSE; - cmplxfunc = FALSE; - break; - - case FFEINFO_kindFUNCTION: - gt = FFEGLOBAL_typeFUNC; - egt = FFEGLOBAL_typeEXT; - bt = ffesymbol_basictype (fn); - kt = ffesymbol_kindtype (fn); - if (bt == FFEINFO_basictypeNONE) - { - ffeimplic_establish_symbol (fn); - if (ffesymbol_funcresult (fn) != NULL) - ffeimplic_establish_symbol (ffesymbol_funcresult (fn)); - bt = ffesymbol_basictype (fn); - kt = ffesymbol_kindtype (fn); - } - - if (multi) - charfunc = cmplxfunc = FALSE; - else if (bt == FFEINFO_basictypeCHARACTER) - charfunc = TRUE, cmplxfunc = FALSE; - else if ((bt == FFEINFO_basictypeCOMPLEX) - && ffesymbol_is_f2c (fn) - && !altentries) - charfunc = FALSE, cmplxfunc = TRUE; - else - charfunc = cmplxfunc = FALSE; - - if (multi || charfunc) - type = ffecom_tree_fun_type_void; - else if (ffesymbol_is_f2c (fn) && !altentries) - type = ffecom_tree_fun_type[bt][kt]; - else - type = build_function_type (ffecom_tree_type[bt][kt], NULL_TREE); - - if ((type == NULL_TREE) - || (TREE_TYPE (type) == NULL_TREE)) - type = ffecom_tree_fun_type_void; /* _sym_exec_transition. */ - break; - - case FFEINFO_kindSUBROUTINE: - gt = FFEGLOBAL_typeSUBR; - egt = FFEGLOBAL_typeEXT; - bt = FFEINFO_basictypeNONE; - kt = FFEINFO_kindtypeNONE; - if (ffecom_is_altreturning_) - type = ffecom_tree_subr_type; - else - type = ffecom_tree_fun_type_void; - charfunc = FALSE; - cmplxfunc = FALSE; - break; - - default: - assert ("say what??" == NULL); - /* Fall through. */ - case FFEINFO_kindANY: - gt = FFEGLOBAL_typeANY; - bt = FFEINFO_basictypeNONE; - kt = FFEINFO_kindtypeNONE; - type = error_mark_node; - charfunc = FALSE; - cmplxfunc = FALSE; - break; - } - - if (altentries) - { - id = ffecom_get_invented_identifier ("__g77_masterfun_%s", - ffesymbol_text (fn)); - } -#if FFETARGET_isENFORCED_MAIN - else if (main_program) - id = get_identifier (FFETARGET_nameENFORCED_MAIN_NAME); -#endif - else - id = ffecom_get_external_identifier_ (fn); - - start_function (id, - type, - 0, /* nested/inline */ - !altentries); /* TREE_PUBLIC */ - - TREE_USED (current_function_decl) = 1; /* Avoid spurious warning if altentries. */ - - if (!altentries - && ((g = ffesymbol_global (fn)) != NULL) - && ((ffeglobal_type (g) == gt) - || (ffeglobal_type (g) == egt))) - { - ffeglobal_set_hook (g, current_function_decl); - } - - /* Arg handling needs exec-transitioned ffesymbols to work with. But - exec-transitioning needs current_function_decl to be filled in. So we - do these things in two phases. */ - - if (altentries) - { /* 1st arg identifies which entrypoint. */ - ffecom_which_entrypoint_decl_ - = build_decl (PARM_DECL, - ffecom_get_invented_identifier ("__g77_%s", - "which_entrypoint"), - integer_type_node); - push_parm_decl (ffecom_which_entrypoint_decl_); - } - - if (charfunc - || cmplxfunc - || multi) - { /* Arg for result (return value). */ - tree type; - tree length; - - if (charfunc) - type = ffecom_tree_type[FFEINFO_basictypeCHARACTER][kt]; - else if (cmplxfunc) - type = ffecom_tree_type[FFEINFO_basictypeCOMPLEX][kt]; - else - type = ffecom_multi_type_node_; - - result = ffecom_get_invented_identifier ("__g77_%s", "result"); - - /* Make length arg _and_ enhance type info for CHAR arg itself. */ - - if (charfunc) - length = ffecom_char_enhance_arg_ (&type, fn); - else - length = NULL_TREE; /* Not ref'd if !charfunc. */ - - type = build_pointer_type (type); - result = build_decl (PARM_DECL, result, type); - - push_parm_decl (result); - if (multi) - ffecom_multi_retval_ = result; - else - ffecom_func_result_ = result; - - if (charfunc) - { - push_parm_decl (length); - ffecom_func_length_ = length; - } - } - - if (ffecom_primary_entry_is_proc_) - { - if (altentries) - arglist = ffecom_master_arglist_; - else - arglist = ffesymbol_dummyargs (fn); - ffecom_push_dummy_decls_ (arglist, FALSE); - } - - if (TREE_CODE (current_function_decl) != ERROR_MARK) - store_parm_decls (main_program ? 1 : 0); - - ffecom_start_compstmt (); - /* Disallow temp vars at this level. */ - current_binding_level->prep_state = 2; - - input_location = old_loc; - - /* This handles any symbols still untransformed, in case -g specified. - This used to be done in ffecom_finish_progunit, but it turns out to - be necessary to do it here so that statement functions are - expanded before code. But don't bother for BLOCK DATA. */ - - if (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA) - ffesymbol_drive (ffecom_finish_symbol_transform_); -} - -/* ffecom_sym_transform_ -- Transform FFE sym into backend sym - - ffesymbol s; - ffecom_sym_transform_(s); - - The ffesymbol_hook info for s is updated with appropriate backend info - on the symbol. */ - -static ffesymbol -ffecom_sym_transform_ (ffesymbol s) -{ - tree t; /* Transformed thingy. */ - tree tlen; /* Length if CHAR*(*). */ - bool addr; /* Is t the address of the thingy? */ - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffeglobal g; - location_t old_loc = input_location; - - /* Must ensure special ASSIGN variables are declared at top of outermost - block, else they'll end up in the innermost block when their first - ASSIGN is seen, which leaves them out of scope when they're the - subject of a GOTO or I/O statement. - - We make this variable even if -fugly-assign. Just let it go unused, - in case it turns out there are cases where we really want to use this - variable anyway (e.g. ASSIGN to INTEGER*2 variable). */ - - if (! ffecom_transform_only_dummies_ - && ffesymbol_assigned (s) - && ! ffesymbol_hook (s).assign_tree) - s = ffecom_sym_transform_assign_ (s); - - if (ffesymbol_sfdummyparent (s) == NULL) - { - input_filename = ffesymbol_where_filename (s); - input_line = ffesymbol_where_filelinenum (s); - } - else - { - ffesymbol sf = ffesymbol_sfdummyparent (s); - - input_filename = ffesymbol_where_filename (sf); - input_line = ffesymbol_where_filelinenum (sf); - } - - bt = ffeinfo_basictype (ffebld_info (s)); - kt = ffeinfo_kindtype (ffebld_info (s)); - - t = NULL_TREE; - tlen = NULL_TREE; - addr = FALSE; - - switch (ffesymbol_kind (s)) - { - case FFEINFO_kindNONE: - switch (ffesymbol_where (s)) - { - case FFEINFO_whereDUMMY: /* Subroutine or function. */ - assert (ffecom_transform_only_dummies_); - - /* Before 0.4, this could be ENTITY/DUMMY, but see - ffestu_sym_end_transition -- no longer true (in particular, if - it could be an ENTITY, it _will_ be made one, so that - possibility won't come through here). So we never make length - arg for CHARACTER type. */ - - t = build_decl (PARM_DECL, - ffecom_get_identifier_ (ffesymbol_text (s)), - ffecom_tree_ptr_to_subr_type); - DECL_ARTIFICIAL (t) = 1; - addr = TRUE; - break; - - case FFEINFO_whereGLOBAL: /* Subroutine or function. */ - assert (!ffecom_transform_only_dummies_); - - if (((g = ffesymbol_global (s)) != NULL) - && ((ffeglobal_type (g) == FFEGLOBAL_typeSUBR) - || (ffeglobal_type (g) == FFEGLOBAL_typeFUNC) - || (ffeglobal_type (g) == FFEGLOBAL_typeEXT)) - && (ffeglobal_hook (g) != NULL_TREE) - && ffe_is_globals ()) - { - t = ffeglobal_hook (g); - break; - } - - t = build_decl (FUNCTION_DECL, - ffecom_get_external_identifier_ (s), - ffecom_tree_subr_type); /* Assume subr. */ - DECL_EXTERNAL (t) = 1; - TREE_PUBLIC (t) = 1; - - t = start_decl (t, FALSE); - finish_decl (t, NULL_TREE, FALSE); - - if ((g != NULL) - && ((ffeglobal_type (g) == FFEGLOBAL_typeSUBR) - || (ffeglobal_type (g) == FFEGLOBAL_typeFUNC) - || (ffeglobal_type (g) == FFEGLOBAL_typeEXT))) - ffeglobal_set_hook (g, t); - - ffecom_save_tree_forever (t); - - break; - - default: - assert ("NONE where unexpected" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - break; - } - break; - - case FFEINFO_kindENTITY: - switch (ffeinfo_where (ffesymbol_info (s))) - { - - case FFEINFO_whereCONSTANT: - /* ~~Debugging info needed? */ - assert (!ffecom_transform_only_dummies_); - t = error_mark_node; /* Shouldn't ever see this in expr. */ - break; - - case FFEINFO_whereLOCAL: - assert (!ffecom_transform_only_dummies_); - - { - ffestorag st = ffesymbol_storage (s); - tree type; - - type = ffecom_type_localvar_ (s, bt, kt); - - if (type == error_mark_node) - { - t = error_mark_node; - break; - } - - if ((st != NULL) - && (ffestorag_size (st) == 0)) - { - t = error_mark_node; - break; - } - - if ((st != NULL) - && (ffestorag_parent (st) != NULL)) - { /* Child of EQUIVALENCE parent. */ - ffestorag est; - tree et; - ffetargetOffset offset; - - est = ffestorag_parent (st); - ffecom_transform_equiv_ (est); - - et = ffestorag_hook (est); - assert (et != NULL_TREE); - - if (! TREE_STATIC (et)) - put_var_into_stack (et, /*rescan=*/true); - - offset = ffestorag_modulo (est) - + ffestorag_offset (ffesymbol_storage (s)) - - ffestorag_offset (est); - - ffecom_debug_kludge_ (et, "EQUIVALENCE", s, type, offset); - - /* (t_type *) (((char *) &et) + offset) */ - - t = convert (string_type_node, /* (char *) */ - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (et)), - et)); - t = ffecom_2 (PLUS_EXPR, TREE_TYPE (t), - t, - build_int_2 (offset, 0)); - t = convert (build_pointer_type (type), - t); - TREE_CONSTANT (t) = staticp (et); - - addr = TRUE; - } - else - { - tree initexpr; - bool init = ffesymbol_is_init (s); - - t = build_decl (VAR_DECL, - ffecom_get_identifier_ (ffesymbol_text (s)), - type); - - if (init - || ffesymbol_namelisted (s) -#ifdef FFECOM_sizeMAXSTACKITEM - || ((st != NULL) - && (ffestorag_size (st) > FFECOM_sizeMAXSTACKITEM)) -#endif - || ((ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) - && (ffecom_primary_entry_kind_ - != FFEINFO_kindBLOCKDATA) - && (ffesymbol_is_save (s) || ffe_is_saveall ()))) - TREE_STATIC (t) = !ffesymbol_attr (s, FFESYMBOL_attrADJUSTABLE); - else - TREE_STATIC (t) = 0; /* No need to make static. */ - - if (init || ffe_is_init_local_zero ()) - DECL_INITIAL (t) = error_mark_node; - - /* Keep -Wunused from complaining about var if it - is used as sfunc arg or DATA implied-DO. */ - if (ffesymbol_attrs (s) & FFESYMBOL_attrsSFARG) - DECL_IN_SYSTEM_HEADER (t) = 1; - - t = start_decl (t, FALSE); - - if (init) - { - if (ffesymbol_init (s) != NULL) - initexpr = ffecom_expr (ffesymbol_init (s)); - else - initexpr = ffecom_init_zero_ (t); - } - else if (ffe_is_init_local_zero ()) - initexpr = ffecom_init_zero_ (t); - else - initexpr = NULL_TREE; /* Not ref'd if !init. */ - - finish_decl (t, initexpr, FALSE); - - if (st != NULL && DECL_SIZE (t) != error_mark_node) - { - assert (TREE_CODE (DECL_SIZE_UNIT (t)) == INTEGER_CST); - assert (0 == compare_tree_int (DECL_SIZE_UNIT (t), - ffestorag_size (st))); - } - } - } - break; - - case FFEINFO_whereRESULT: - assert (!ffecom_transform_only_dummies_); - - if (bt == FFEINFO_basictypeCHARACTER) - { /* Result is already in list of dummies, use - it (& length). */ - t = ffecom_func_result_; - tlen = ffecom_func_length_; - addr = TRUE; - break; - } - if ((ffecom_num_entrypoints_ == 0) - && (bt == FFEINFO_basictypeCOMPLEX) - && (ffesymbol_is_f2c (ffecom_primary_entry_))) - { /* Result is already in list of dummies, use - it. */ - t = ffecom_func_result_; - addr = TRUE; - break; - } - if (ffecom_func_result_ != NULL_TREE) - { - t = ffecom_func_result_; - break; - } - if ((ffecom_num_entrypoints_ != 0) - && (ffecom_master_bt_ == FFEINFO_basictypeNONE)) - { - assert (ffecom_multi_retval_ != NULL_TREE); - t = ffecom_1 (INDIRECT_REF, ffecom_multi_type_node_, - ffecom_multi_retval_); - t = ffecom_2 (COMPONENT_REF, ffecom_tree_type[bt][kt], - t, ffecom_multi_fields_[bt][kt]); - - break; - } - - t = build_decl (VAR_DECL, - ffecom_get_identifier_ (ffesymbol_text (s)), - ffecom_tree_type[bt][kt]); - TREE_STATIC (t) = 0; /* Put result on stack. */ - t = start_decl (t, FALSE); - finish_decl (t, NULL_TREE, FALSE); - - ffecom_func_result_ = t; - - break; - - case FFEINFO_whereDUMMY: - { - tree type; - ffebld dl; - ffebld dim; - tree low; - tree high; - tree old_sizes; - bool adjustable = FALSE; /* Conditionally adjustable? */ - - type = ffecom_tree_type[bt][kt]; - if (ffesymbol_sfdummyparent (s) != NULL) - { - if (current_function_decl == ffecom_outer_function_decl_) - { /* Exec transition before sfunc - context; get it later. */ - break; - } - t = ffecom_get_identifier_ (ffesymbol_text - (ffesymbol_sfdummyparent (s))); - } - else - t = ffecom_get_identifier_ (ffesymbol_text (s)); - - assert (ffecom_transform_only_dummies_); - - old_sizes = get_pending_sizes (); - put_pending_sizes (old_sizes); - - if (bt == FFEINFO_basictypeCHARACTER) - tlen = ffecom_char_enhance_arg_ (&type, s); - type = ffecom_check_size_overflow_ (s, type, TRUE); - - for (dl = ffesymbol_dims (s); dl != NULL; dl = ffebld_trail (dl)) - { - if (type == error_mark_node) - break; - - dim = ffebld_head (dl); - assert (ffebld_op (dim) == FFEBLD_opBOUNDS); - if ((ffebld_left (dim) == NULL) || ffecom_doing_entry_) - low = ffecom_integer_one_node; - else - low = ffecom_expr (ffebld_left (dim)); - assert (ffebld_right (dim) != NULL); - if ((ffebld_op (ffebld_right (dim)) == FFEBLD_opSTAR) - || ffecom_doing_entry_) - { - /* Used to just do high=low. But for ffecom_tree_ - canonize_ref_, it probably is important to correctly - assess the size. E.g. given COMPLEX C(*),CFUNC and - C(2)=CFUNC(C), overlap can happen, while it can't - for, say, C(1)=CFUNC(C(2)). */ - /* Even more recently used to set to INT_MAX, but that - broke when some overflow checking went into the back - end. Now we just leave the upper bound unspecified. */ - high = NULL; - } - else - high = ffecom_expr (ffebld_right (dim)); - - /* Determine whether array is conditionally adjustable, - to decide whether back-end magic is needed. - - Normally the front end uses the back-end function - variable_size to wrap SAVE_EXPR's around expressions - affecting the size/shape of an array so that the - size/shape info doesn't change during execution - of the compiled code even though variables and - functions referenced in those expressions might. - - variable_size also makes sure those saved expressions - get evaluated immediately upon entry to the - compiled procedure -- the front end normally doesn't - have to worry about that. - - However, there is a problem with this that affects - g77's implementation of entry points, and that is - that it is _not_ true that each invocation of the - compiled procedure is permitted to evaluate - array size/shape info -- because it is possible - that, for some invocations, that info is invalid (in - which case it is "promised" -- i.e. a violation of - the Fortran standard -- that the compiled code - won't reference the array or its size/shape - during that particular invocation). - - To phrase this in C terms, consider this gcc function: - - void foo (int *n, float (*a)[*n]) - { - // a is "pointer to array ...", fyi. - } - - Suppose that, for some invocations, it is permitted - for a caller of foo to do this: - - foo (NULL, NULL); - - Now the _written_ code for foo can take such a call - into account by either testing explicitly for whether - (a == NULL) || (n == NULL) -- presumably it is - not permitted to reference *a in various fashions - if (n == NULL) I suppose -- or it can avoid it by - looking at other info (other arguments, static/global - data, etc.). - - However, this won't work in gcc 2.5.8 because it'll - automatically emit the code to save the "*n" - expression, which'll yield a NULL dereference for - the "foo (NULL, NULL)" call, something the code - for foo cannot prevent. - - g77 definitely needs to avoid executing such - code anytime the pointer to the adjustable array - is NULL, because even if its bounds expressions - don't have any references to possible "absent" - variables like "*n" -- say all variable references - are to COMMON variables, i.e. global (though in C, - local static could actually make sense) -- the - expressions could yield other run-time problems - for allowably "dead" values in those variables. - - For example, let's consider a more complicated - version of foo: - - extern int i; - extern int j; - - void foo (float (*a)[i/j]) - { - ... - } - - The above is (essentially) quite valid for Fortran - but, again, for a call like "foo (NULL);", it is - permitted for i and j to be undefined when the - call is made. If j happened to be zero, for - example, emitting the code to evaluate "i/j" - could result in a run-time error. - - Offhand, though I don't have my F77 or F90 - standards handy, it might even be valid for a - bounds expression to contain a function reference, - in which case I doubt it is permitted for an - implementation to invoke that function in the - Fortran case involved here (invocation of an - alternate ENTRY point that doesn't have the adjustable - array as one of its arguments). - - So, the code that the compiler would normally emit - to preevaluate the size/shape info for an - adjustable array _must not_ be executed at run time - in certain cases. Specifically, for Fortran, - the case is when the pointer to the adjustable - array == NULL. (For gnu-ish C, it might be nice - for the source code itself to specify an expression - that, if TRUE, inhibits execution of the code. Or - reverse the sense for elegance.) - - (Note that g77 could use a different test than NULL, - actually, since it happens to always pass an - integer to the called function that specifies which - entry point is being invoked. Hmm, this might - solve the next problem.) - - One way a user could, I suppose, write "foo" so - it works is to insert COND_EXPR's for the - size/shape info so the dangerous stuff isn't - actually done, as in: - - void foo (int *n, float (*a)[(a == NULL) ? 0 : *n]) - { - ... - } - - The next problem is that the front end needs to - be able to tell the back end about the array's - decl _before_ it tells it about the conditional - expression to inhibit evaluation of size/shape info, - as shown above. - - To solve this, the front end needs to be able - to give the back end the expression to inhibit - generation of the preevaluation code _after_ - it makes the decl for the adjustable array. - - Until then, the above example using the COND_EXPR - doesn't pass muster with gcc because the "(a == NULL)" - part has a reference to "a", which is still - undefined at that point. - - g77 will therefore use a different mechanism in the - meantime. */ - - if (!adjustable - && ((TREE_CODE (low) != INTEGER_CST) - || (high && TREE_CODE (high) != INTEGER_CST))) - adjustable = TRUE; - -#if 0 /* Old approach -- see below. */ - if (TREE_CODE (low) != INTEGER_CST) - low = ffecom_3 (COND_EXPR, integer_type_node, - ffecom_adjarray_passed_ (s), - low, - ffecom_integer_zero_node); - - if (high && TREE_CODE (high) != INTEGER_CST) - high = ffecom_3 (COND_EXPR, integer_type_node, - ffecom_adjarray_passed_ (s), - high, - ffecom_integer_zero_node); -#endif - - /* ~~~gcc/stor-layout.c (layout_type) should do this, - probably. Fixes 950302-1.f. */ - - if (TREE_CODE (low) != INTEGER_CST) - low = variable_size (low); - - /* ~~~Similarly, this fixes dumb0.f. The C front end - does this, which is why dumb0.c would work. */ - - if (high && TREE_CODE (high) != INTEGER_CST) - high = variable_size (high); - - type - = build_array_type - (type, - build_range_type (ffecom_integer_type_node, - low, high)); - type = ffecom_check_size_overflow_ (s, type, TRUE); - } - - if (type == error_mark_node) - { - t = error_mark_node; - break; - } - - if ((ffesymbol_sfdummyparent (s) == NULL) - || (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER)) - { - type = build_pointer_type (type); - addr = TRUE; - } - - t = build_decl (PARM_DECL, t, type); - DECL_ARTIFICIAL (t) = 1; - - /* If this arg is present in every entry point's list of - dummy args, then we're done. */ - - if (ffesymbol_numentries (s) - == (ffecom_num_entrypoints_ + 1)) - break; - -#if 1 - - /* If variable_size in stor-layout has been called during - the above, then get_pending_sizes should have the - yet-to-be-evaluated saved expressions pending. - Make the whole lot of them get emitted, conditionally - on whether the array decl ("t" above) is not NULL. */ - - { - tree sizes = get_pending_sizes (); - tree tem; - - for (tem = sizes; - tem != old_sizes; - tem = TREE_CHAIN (tem)) - { - tree temv = TREE_VALUE (tem); - - if (sizes == tem) - sizes = temv; - else - sizes - = ffecom_2 (COMPOUND_EXPR, - TREE_TYPE (sizes), - temv, - sizes); - } - - if (sizes != tem) - { - sizes - = ffecom_3 (COND_EXPR, - TREE_TYPE (sizes), - ffecom_2 (NE_EXPR, - integer_type_node, - t, - null_pointer_node), - sizes, - convert (TREE_TYPE (sizes), - integer_zero_node)); - sizes = ffecom_save_tree (sizes); - - sizes - = tree_cons (NULL_TREE, sizes, tem); - } - - if (sizes) - put_pending_sizes (sizes); - } - -#else -#if 0 - if (adjustable - && (ffesymbol_numentries (s) - != ffecom_num_entrypoints_ + 1)) - DECL_SOMETHING (t) - = ffecom_2 (NE_EXPR, integer_type_node, - t, - null_pointer_node); -#else -#if 0 - if (adjustable - && (ffesymbol_numentries (s) - != ffecom_num_entrypoints_ + 1)) - { - ffebad_start (FFEBAD_MISSING_ADJARRAY_UNSUPPORTED); - ffebad_here (0, ffesymbol_where_line (s), - ffesymbol_where_column (s)); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - } -#endif -#endif -#endif - } - break; - - case FFEINFO_whereCOMMON: - { - ffesymbol cs; - ffeglobal cg; - tree ct; - ffestorag st = ffesymbol_storage (s); - tree type; - - cs = ffesymbol_common (s); /* The COMMON area itself. */ - if (st != NULL) /* Else not laid out. */ - { - ffecom_transform_common_ (cs); - st = ffesymbol_storage (s); - } - - type = ffecom_type_localvar_ (s, bt, kt); - - cg = ffesymbol_global (cs); /* The global COMMON info. */ - if ((cg == NULL) - || (ffeglobal_type (cg) != FFEGLOBAL_typeCOMMON)) - ct = NULL_TREE; - else - ct = ffeglobal_hook (cg); /* The common area's tree. */ - - if ((ct == NULL_TREE) - || (st == NULL) - || (type == error_mark_node)) - t = error_mark_node; - else - { - ffetargetOffset offset; - ffestorag cst; - tree toffset; - - cst = ffestorag_parent (st); - assert (cst == ffesymbol_storage (cs)); - - offset = ffestorag_modulo (cst) - + ffestorag_offset (st) - - ffestorag_offset (cst); - - ffecom_debug_kludge_ (ct, "COMMON", s, type, offset); - - /* (t_type *) (((char *) &ct) + offset) */ - - t = convert (string_type_node, /* (char *) */ - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (ct)), - ct)); - toffset = build_int_2 (offset, 0); - TREE_TYPE (toffset) = ssizetype; - t = ffecom_2 (PLUS_EXPR, TREE_TYPE (t), - t, toffset); - t = convert (build_pointer_type (type), - t); - TREE_CONSTANT (t) = 1; - - addr = TRUE; - } - } - break; - - case FFEINFO_whereIMMEDIATE: - case FFEINFO_whereGLOBAL: - case FFEINFO_whereFLEETING: - case FFEINFO_whereFLEETING_CADDR: - case FFEINFO_whereFLEETING_IADDR: - case FFEINFO_whereINTRINSIC: - case FFEINFO_whereCONSTANT_SUBOBJECT: - default: - assert ("ENTITY where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - case FFEINFO_kindFUNCTION: - switch (ffeinfo_where (ffesymbol_info (s))) - { - case FFEINFO_whereLOCAL: /* Me. */ - assert (!ffecom_transform_only_dummies_); - t = current_function_decl; - break; - - case FFEINFO_whereGLOBAL: - assert (!ffecom_transform_only_dummies_); - - if (((g = ffesymbol_global (s)) != NULL) - && ((ffeglobal_type (g) == FFEGLOBAL_typeFUNC) - || (ffeglobal_type (g) == FFEGLOBAL_typeEXT)) - && (ffeglobal_hook (g) != NULL_TREE) - && ffe_is_globals ()) - { - t = ffeglobal_hook (g); - break; - } - - if (ffesymbol_is_f2c (s) - && (ffesymbol_where (s) != FFEINFO_whereCONSTANT)) - t = ffecom_tree_fun_type[bt][kt]; - else - t = build_function_type (ffecom_tree_type[bt][kt], NULL_TREE); - - t = build_decl (FUNCTION_DECL, - ffecom_get_external_identifier_ (s), - t); - DECL_EXTERNAL (t) = 1; - TREE_PUBLIC (t) = 1; - - t = start_decl (t, FALSE); - finish_decl (t, NULL_TREE, FALSE); - - if ((g != NULL) - && ((ffeglobal_type (g) == FFEGLOBAL_typeFUNC) - || (ffeglobal_type (g) == FFEGLOBAL_typeEXT))) - ffeglobal_set_hook (g, t); - - ffecom_save_tree_forever (t); - - break; - - case FFEINFO_whereDUMMY: - assert (ffecom_transform_only_dummies_); - - if (ffesymbol_is_f2c (s) - && (ffesymbol_where (s) != FFEINFO_whereCONSTANT)) - t = ffecom_tree_ptr_to_fun_type[bt][kt]; - else - t = build_pointer_type - (build_function_type (ffecom_tree_type[bt][kt], NULL_TREE)); - - t = build_decl (PARM_DECL, - ffecom_get_identifier_ (ffesymbol_text (s)), - t); - DECL_ARTIFICIAL (t) = 1; - addr = TRUE; - break; - - case FFEINFO_whereCONSTANT: /* Statement function. */ - assert (!ffecom_transform_only_dummies_); - t = ffecom_gen_sfuncdef_ (s, bt, kt); - break; - - case FFEINFO_whereINTRINSIC: - assert (!ffecom_transform_only_dummies_); - break; /* Let actual references generate their - decls. */ - - default: - assert ("FUNCTION where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - case FFEINFO_kindSUBROUTINE: - switch (ffeinfo_where (ffesymbol_info (s))) - { - case FFEINFO_whereLOCAL: /* Me. */ - assert (!ffecom_transform_only_dummies_); - t = current_function_decl; - break; - - case FFEINFO_whereGLOBAL: - assert (!ffecom_transform_only_dummies_); - - if (((g = ffesymbol_global (s)) != NULL) - && ((ffeglobal_type (g) == FFEGLOBAL_typeSUBR) - || (ffeglobal_type (g) == FFEGLOBAL_typeEXT)) - && (ffeglobal_hook (g) != NULL_TREE) - && ffe_is_globals ()) - { - t = ffeglobal_hook (g); - break; - } - - t = build_decl (FUNCTION_DECL, - ffecom_get_external_identifier_ (s), - ffecom_tree_subr_type); - DECL_EXTERNAL (t) = 1; - TREE_PUBLIC (t) = 1; - - t = start_decl (t, ffe_is_globals ()); - finish_decl (t, NULL_TREE, ffe_is_globals ()); - - if ((g != NULL) - && ((ffeglobal_type (g) == FFEGLOBAL_typeSUBR) - || (ffeglobal_type (g) == FFEGLOBAL_typeEXT))) - ffeglobal_set_hook (g, t); - - ffecom_save_tree_forever (t); - - break; - - case FFEINFO_whereDUMMY: - assert (ffecom_transform_only_dummies_); - - t = build_decl (PARM_DECL, - ffecom_get_identifier_ (ffesymbol_text (s)), - ffecom_tree_ptr_to_subr_type); - DECL_ARTIFICIAL (t) = 1; - addr = TRUE; - break; - - case FFEINFO_whereINTRINSIC: - assert (!ffecom_transform_only_dummies_); - break; /* Let actual references generate their - decls. */ - - default: - assert ("SUBROUTINE where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - case FFEINFO_kindPROGRAM: - switch (ffeinfo_where (ffesymbol_info (s))) - { - case FFEINFO_whereLOCAL: /* Me. */ - assert (!ffecom_transform_only_dummies_); - t = current_function_decl; - break; - - case FFEINFO_whereCOMMON: - case FFEINFO_whereDUMMY: - case FFEINFO_whereGLOBAL: - case FFEINFO_whereRESULT: - case FFEINFO_whereFLEETING: - case FFEINFO_whereFLEETING_CADDR: - case FFEINFO_whereFLEETING_IADDR: - case FFEINFO_whereIMMEDIATE: - case FFEINFO_whereINTRINSIC: - case FFEINFO_whereCONSTANT: - case FFEINFO_whereCONSTANT_SUBOBJECT: - default: - assert ("PROGRAM where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - case FFEINFO_kindBLOCKDATA: - switch (ffeinfo_where (ffesymbol_info (s))) - { - case FFEINFO_whereLOCAL: /* Me. */ - assert (!ffecom_transform_only_dummies_); - t = current_function_decl; - break; - - case FFEINFO_whereGLOBAL: - assert (!ffecom_transform_only_dummies_); - - t = build_decl (FUNCTION_DECL, - ffecom_get_external_identifier_ (s), - ffecom_tree_blockdata_type); - DECL_EXTERNAL (t) = 1; - TREE_PUBLIC (t) = 1; - - t = start_decl (t, FALSE); - finish_decl (t, NULL_TREE, FALSE); - - ffecom_save_tree_forever (t); - - break; - - case FFEINFO_whereCOMMON: - case FFEINFO_whereDUMMY: - case FFEINFO_whereRESULT: - case FFEINFO_whereFLEETING: - case FFEINFO_whereFLEETING_CADDR: - case FFEINFO_whereFLEETING_IADDR: - case FFEINFO_whereIMMEDIATE: - case FFEINFO_whereINTRINSIC: - case FFEINFO_whereCONSTANT: - case FFEINFO_whereCONSTANT_SUBOBJECT: - default: - assert ("BLOCKDATA where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - case FFEINFO_kindCOMMON: - switch (ffeinfo_where (ffesymbol_info (s))) - { - case FFEINFO_whereLOCAL: - assert (!ffecom_transform_only_dummies_); - ffecom_transform_common_ (s); - break; - - case FFEINFO_whereNONE: - case FFEINFO_whereCOMMON: - case FFEINFO_whereDUMMY: - case FFEINFO_whereGLOBAL: - case FFEINFO_whereRESULT: - case FFEINFO_whereFLEETING: - case FFEINFO_whereFLEETING_CADDR: - case FFEINFO_whereFLEETING_IADDR: - case FFEINFO_whereIMMEDIATE: - case FFEINFO_whereINTRINSIC: - case FFEINFO_whereCONSTANT: - case FFEINFO_whereCONSTANT_SUBOBJECT: - default: - assert ("COMMON where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - case FFEINFO_kindCONSTRUCT: - switch (ffeinfo_where (ffesymbol_info (s))) - { - case FFEINFO_whereLOCAL: - assert (!ffecom_transform_only_dummies_); - break; - - case FFEINFO_whereNONE: - case FFEINFO_whereCOMMON: - case FFEINFO_whereDUMMY: - case FFEINFO_whereGLOBAL: - case FFEINFO_whereRESULT: - case FFEINFO_whereFLEETING: - case FFEINFO_whereFLEETING_CADDR: - case FFEINFO_whereFLEETING_IADDR: - case FFEINFO_whereIMMEDIATE: - case FFEINFO_whereINTRINSIC: - case FFEINFO_whereCONSTANT: - case FFEINFO_whereCONSTANT_SUBOBJECT: - default: - assert ("CONSTRUCT where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - case FFEINFO_kindNAMELIST: - switch (ffeinfo_where (ffesymbol_info (s))) - { - case FFEINFO_whereLOCAL: - assert (!ffecom_transform_only_dummies_); - t = ffecom_transform_namelist_ (s); - break; - - case FFEINFO_whereNONE: - case FFEINFO_whereCOMMON: - case FFEINFO_whereDUMMY: - case FFEINFO_whereGLOBAL: - case FFEINFO_whereRESULT: - case FFEINFO_whereFLEETING: - case FFEINFO_whereFLEETING_CADDR: - case FFEINFO_whereFLEETING_IADDR: - case FFEINFO_whereIMMEDIATE: - case FFEINFO_whereINTRINSIC: - case FFEINFO_whereCONSTANT: - case FFEINFO_whereCONSTANT_SUBOBJECT: - default: - assert ("NAMELIST where unheard of" == NULL); - /* Fall through. */ - case FFEINFO_whereANY: - t = error_mark_node; - break; - } - break; - - default: - assert ("kind unheard of" == NULL); - /* Fall through. */ - case FFEINFO_kindANY: - t = error_mark_node; - break; - } - - ffesymbol_hook (s).decl_tree = t; - ffesymbol_hook (s).length_tree = tlen; - ffesymbol_hook (s).addr = addr; - - input_location = old_loc; - - return s; -} - -/* Transform into ASSIGNable symbol. - - Symbol has already been transformed, but for whatever reason, the - resulting decl_tree has been deemed not usable for an ASSIGN target. - (E.g. it isn't wide enough to hold a pointer.) So, here we invent - another local symbol of type void * and stuff that in the assign_tree - argument. The F77/F90 standards allow this implementation. */ - -static ffesymbol -ffecom_sym_transform_assign_ (ffesymbol s) -{ - tree t; /* Transformed thingy. */ - location_t old_loc = input_location; - - if (ffesymbol_sfdummyparent (s) == NULL) - { - input_filename = ffesymbol_where_filename (s); - input_line = ffesymbol_where_filelinenum (s); - } - else - { - ffesymbol sf = ffesymbol_sfdummyparent (s); - - input_filename = ffesymbol_where_filename (sf); - input_line = ffesymbol_where_filelinenum (sf); - } - - assert (!ffecom_transform_only_dummies_); - - t = build_decl (VAR_DECL, - ffecom_get_invented_identifier ("__g77_ASSIGN_%s", - ffesymbol_text (s)), - TREE_TYPE (null_pointer_node)); - - switch (ffesymbol_where (s)) - { - case FFEINFO_whereLOCAL: - /* Unlike for regular vars, SAVE status is easy to determine for - ASSIGNed vars, since there's no initialization, there's no - effective storage association (so "SAVE J" does not apply to - K even given "EQUIVALENCE (J,K)"), there's no size issue - to worry about, etc. */ - if ((ffesymbol_is_save (s) || ffe_is_saveall ()) - && (ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) - && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA)) - TREE_STATIC (t) = 1; /* SAVEd in proc, make static. */ - else - TREE_STATIC (t) = 0; /* No need to make static. */ - break; - - case FFEINFO_whereCOMMON: - TREE_STATIC (t) = 1; /* Assume COMMONs always SAVEd. */ - break; - - case FFEINFO_whereDUMMY: - /* Note that twinning a DUMMY means the caller won't see - the ASSIGNed value. But both F77 and F90 allow implementations - to do this, i.e. disallow Fortran code that would try and - take advantage of actually putting a label into a variable - via a dummy argument (or any other storage association, for - that matter). */ - TREE_STATIC (t) = 0; - break; - - default: - TREE_STATIC (t) = 0; - break; - } - - t = start_decl (t, FALSE); - finish_decl (t, NULL_TREE, FALSE); - - ffesymbol_hook (s).assign_tree = t; - - input_location = old_loc; - - return s; -} - -/* Implement COMMON area in back end. - - Because COMMON-based variables can be referenced in the dimension - expressions of dummy (adjustable) arrays, and because dummies - (in the gcc back end) need to be put in the outer binding level - of a function (which has two binding levels, the outer holding - the dummies and the inner holding the other vars), special care - must be taken to handle COMMON areas. - - The current strategy is basically to always tell the back end about - the COMMON area as a top-level external reference to just a block - of storage of the master type of that area (e.g. integer, real, - character, whatever -- not a structure). As a distinct action, - if initial values are provided, tell the back end about the area - as a top-level non-external (initialized) area and remember not to - allow further initialization or expansion of the area. Meanwhile, - if no initialization happens at all, tell the back end about - the largest size we've seen declared so the space does get reserved. - (This function doesn't handle all that stuff, but it does some - of the important things.) - - Meanwhile, for COMMON variables themselves, just keep creating - references like *((float *) (&common_area + offset)) each time - we reference the variable. In other words, don't make a VAR_DECL - or any kind of component reference (like we used to do before 0.4), - though we might do that as well just for debugging purposes (and - stuff the rtl with the appropriate offset expression). */ - -static void -ffecom_transform_common_ (ffesymbol s) -{ - ffestorag st = ffesymbol_storage (s); - ffeglobal g = ffesymbol_global (s); - tree cbt; - tree cbtype; - tree init; - tree high; - bool is_init = ffestorag_is_init (st); - - assert (st != NULL); - - if ((g == NULL) - || (ffeglobal_type (g) != FFEGLOBAL_typeCOMMON)) - return; - - /* First update the size of the area in global terms. */ - - ffeglobal_size_common (s, ffestorag_size (st)); - - if (!ffeglobal_common_init (g)) - is_init = FALSE; /* No explicit init, don't let erroneous joins init. */ - - cbt = ffeglobal_hook (g); - - /* If we already have declared this common block for a previous program - unit, and either we already initialized it or we don't have new - initialization for it, just return what we have without changing it. */ - - if ((cbt != NULL_TREE) - && (!is_init - || !DECL_EXTERNAL (cbt))) - { - if (st->hook == NULL) ffestorag_set_hook (st, cbt); - return; - } - - /* Process inits. */ - - if (is_init) - { - if (ffestorag_init (st) != NULL) - { - ffebld sexp; - - /* Set the padding for the expression, so ffecom_expr - knows to insert that many zeros. */ - switch (ffebld_op (sexp = ffestorag_init (st))) - { - case FFEBLD_opCONTER: - ffebld_conter_set_pad (sexp, ffestorag_modulo (st)); - break; - - case FFEBLD_opARRTER: - ffebld_arrter_set_pad (sexp, ffestorag_modulo (st)); - break; - - case FFEBLD_opACCTER: - ffebld_accter_set_pad (sexp, ffestorag_modulo (st)); - break; - - default: - assert ("bad op for cmn init (pad)" == NULL); - break; - } - - init = ffecom_expr (sexp); - if (init == error_mark_node) - { /* Hopefully the back end complained! */ - init = NULL_TREE; - if (cbt != NULL_TREE) - return; - } - } - else - init = error_mark_node; - } - else - init = NULL_TREE; - - /* cbtype must be permanently allocated! */ - - /* Allocate the MAX of the areas so far, seen filewide. */ - high = build_int_2 ((ffeglobal_common_size (g) - + ffeglobal_common_pad (g)) - 1, 0); - TREE_TYPE (high) = ffecom_integer_type_node; - - if (init) - cbtype = build_array_type (char_type_node, - build_range_type (integer_type_node, - integer_zero_node, - high)); - else - cbtype = build_array_type (char_type_node, NULL_TREE); - - if (cbt == NULL_TREE) - { - cbt - = build_decl (VAR_DECL, - ffecom_get_external_identifier_ (s), - cbtype); - TREE_STATIC (cbt) = 1; - TREE_PUBLIC (cbt) = 1; - } - else - { - assert (is_init); - TREE_TYPE (cbt) = cbtype; - } - DECL_EXTERNAL (cbt) = init ? 0 : 1; - DECL_INITIAL (cbt) = init ? error_mark_node : NULL_TREE; - - cbt = start_decl (cbt, TRUE); - if (ffeglobal_hook (g) != NULL) - assert (cbt == ffeglobal_hook (g)); - - assert (!init || !DECL_EXTERNAL (cbt)); - - /* Make sure that any type can live in COMMON and be referenced - without getting a bus error. We could pick the most restrictive - alignment of all entities actually placed in the COMMON, but - this seems easy enough. */ - - DECL_ALIGN (cbt) = BIGGEST_ALIGNMENT; - DECL_USER_ALIGN (cbt) = 0; - - if (is_init && (ffestorag_init (st) == NULL)) - init = ffecom_init_zero_ (cbt); - - finish_decl (cbt, init, TRUE); - - if (is_init) - ffestorag_set_init (st, ffebld_new_any ()); - - if (init) - { - assert (DECL_SIZE_UNIT (cbt) != NULL_TREE); - assert (TREE_CODE (DECL_SIZE_UNIT (cbt)) == INTEGER_CST); - assert (0 == compare_tree_int (DECL_SIZE_UNIT (cbt), - (ffeglobal_common_size (g) - + ffeglobal_common_pad (g)))); - } - - ffeglobal_set_hook (g, cbt); - - ffestorag_set_hook (st, cbt); - - ffecom_save_tree_forever (cbt); -} - -/* Make master area for local EQUIVALENCE. */ - -static void -ffecom_transform_equiv_ (ffestorag eqst) -{ - tree eqt; - tree eqtype; - tree init; - tree high; - bool is_init = ffestorag_is_init (eqst); - - assert (eqst != NULL); - - eqt = ffestorag_hook (eqst); - - if (eqt != NULL_TREE) - return; - - /* Process inits. */ - - if (is_init) - { - if (ffestorag_init (eqst) != NULL) - { - ffebld sexp; - - /* Set the padding for the expression, so ffecom_expr - knows to insert that many zeros. */ - switch (ffebld_op (sexp = ffestorag_init (eqst))) - { - case FFEBLD_opCONTER: - ffebld_conter_set_pad (sexp, ffestorag_modulo (eqst)); - break; - - case FFEBLD_opARRTER: - ffebld_arrter_set_pad (sexp, ffestorag_modulo (eqst)); - break; - - case FFEBLD_opACCTER: - ffebld_accter_set_pad (sexp, ffestorag_modulo (eqst)); - break; - - default: - assert ("bad op for eqv init (pad)" == NULL); - break; - } - - init = ffecom_expr (sexp); - if (init == error_mark_node) - init = NULL_TREE; /* Hopefully the back end complained! */ - } - else - init = error_mark_node; - } - else if (ffe_is_init_local_zero ()) - init = error_mark_node; - else - init = NULL_TREE; - - ffecom_member_namelisted_ = FALSE; - ffestorag_drive (ffestorag_list_equivs (eqst), - &ffecom_member_phase1_, - eqst); - - high = build_int_2 ((ffestorag_size (eqst) - + ffestorag_modulo (eqst)) - 1, 0); - TREE_TYPE (high) = ffecom_integer_type_node; - - eqtype = build_array_type (char_type_node, - build_range_type (ffecom_integer_type_node, - ffecom_integer_zero_node, - high)); - - eqt = build_decl (VAR_DECL, - ffecom_get_invented_identifier ("__g77_equiv_%s", - ffesymbol_text - (ffestorag_symbol (eqst))), - eqtype); - DECL_EXTERNAL (eqt) = 0; - if (is_init - || ffecom_member_namelisted_ -#ifdef FFECOM_sizeMAXSTACKITEM - || (ffestorag_size (eqst) > FFECOM_sizeMAXSTACKITEM) -#endif - || ((ffecom_primary_entry_kind_ != FFEINFO_kindPROGRAM) - && (ffecom_primary_entry_kind_ != FFEINFO_kindBLOCKDATA) - && (ffestorag_is_save (eqst) || ffe_is_saveall ()))) - TREE_STATIC (eqt) = 1; - else - TREE_STATIC (eqt) = 0; - TREE_PUBLIC (eqt) = 0; - TREE_ADDRESSABLE (eqt) = 1; /* Ensure non-register allocation */ - DECL_CONTEXT (eqt) = current_function_decl; - if (init) - DECL_INITIAL (eqt) = error_mark_node; - else - DECL_INITIAL (eqt) = NULL_TREE; - - eqt = start_decl (eqt, FALSE); - - /* Make sure that any type can live in EQUIVALENCE and be referenced - without getting a bus error. We could pick the most restrictive - alignment of all entities actually placed in the EQUIVALENCE, but - this seems easy enough. */ - - DECL_ALIGN (eqt) = BIGGEST_ALIGNMENT; - DECL_USER_ALIGN (eqt) = 0; - - if ((!is_init && ffe_is_init_local_zero ()) - || (is_init && (ffestorag_init (eqst) == NULL))) - init = ffecom_init_zero_ (eqt); - - finish_decl (eqt, init, FALSE); - - if (is_init) - ffestorag_set_init (eqst, ffebld_new_any ()); - - { - assert (TREE_CODE (DECL_SIZE_UNIT (eqt)) == INTEGER_CST); - assert (0 == compare_tree_int (DECL_SIZE_UNIT (eqt), - (ffestorag_size (eqst) - + ffestorag_modulo (eqst)))); - } - - ffestorag_set_hook (eqst, eqt); - - ffestorag_drive (ffestorag_list_equivs (eqst), - &ffecom_member_phase2_, - eqst); -} - -/* Implement NAMELIST in back end. See f2c/format.c for more info. */ - -static tree -ffecom_transform_namelist_ (ffesymbol s) -{ - tree nmlt; - tree nmltype = ffecom_type_namelist_ (); - tree nmlinits; - tree nameinit; - tree varsinit; - tree nvarsinit; - tree field; - tree high; - int i; - static int mynumber = 0; - - nmlt = build_decl (VAR_DECL, - ffecom_get_invented_identifier ("__g77_namelist_%d", - mynumber++), - nmltype); - TREE_STATIC (nmlt) = 1; - DECL_INITIAL (nmlt) = error_mark_node; - - nmlt = start_decl (nmlt, FALSE); - - /* Process inits. */ - - i = strlen (ffesymbol_text (s)); - - high = build_int_2 (i, 0); - TREE_TYPE (high) = ffecom_f2c_ftnlen_type_node; - - nameinit = ffecom_build_f2c_string_ (i + 1, - ffesymbol_text (s)); - TREE_TYPE (nameinit) - = build_type_variant - (build_array_type - (char_type_node, - build_range_type (ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - high)), - 1, 0); - TREE_CONSTANT (nameinit) = 1; - TREE_STATIC (nameinit) = 1; - nameinit = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (nameinit)), - nameinit); - - varsinit = ffecom_vardesc_array_ (s); - varsinit = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (varsinit)), - varsinit); - TREE_CONSTANT (varsinit) = 1; - TREE_STATIC (varsinit) = 1; - - { - ffebld b; - - for (i = 0, b = ffesymbol_namelist (s); b != NULL; b = ffebld_trail (b)) - ++i; - } - nvarsinit = build_int_2 (i, 0); - TREE_TYPE (nvarsinit) = integer_type_node; - TREE_CONSTANT (nvarsinit) = 1; - TREE_STATIC (nvarsinit) = 1; - - nmlinits = build_tree_list ((field = TYPE_FIELDS (nmltype)), nameinit); - TREE_CHAIN (nmlinits) = build_tree_list ((field = TREE_CHAIN (field)), - varsinit); - TREE_CHAIN (TREE_CHAIN (nmlinits)) - = build_tree_list ((field = TREE_CHAIN (field)), nvarsinit); - - nmlinits = build_constructor (nmltype, nmlinits); - TREE_CONSTANT (nmlinits) = 1; - TREE_STATIC (nmlinits) = 1; - - finish_decl (nmlt, nmlinits, FALSE); - - nmlt = ffecom_1 (ADDR_EXPR, build_pointer_type (nmltype), nmlt); - - return nmlt; -} - -/* A subroutine of ffecom_tree_canonize_ref_. The incoming tree is - analyzed on the assumption it is calculating a pointer to be - indirected through. It must return the proper decl and offset, - taking into account different units of measurements for offsets. */ - -static void -ffecom_tree_canonize_ptr_ (tree *decl, tree *offset, tree t) -{ - switch (TREE_CODE (t)) - { - case NOP_EXPR: - case CONVERT_EXPR: - case NON_LVALUE_EXPR: - ffecom_tree_canonize_ptr_ (decl, offset, TREE_OPERAND (t, 0)); - break; - - case PLUS_EXPR: - ffecom_tree_canonize_ptr_ (decl, offset, TREE_OPERAND (t, 0)); - if ((*decl == NULL_TREE) - || (*decl == error_mark_node)) - break; - - if (TREE_CODE (TREE_OPERAND (t, 1)) == INTEGER_CST) - { - /* An offset into COMMON. */ - *offset = fold (build (PLUS_EXPR, TREE_TYPE (*offset), - *offset, TREE_OPERAND (t, 1))); - /* Convert offset (presumably in bytes) into canonical units - (presumably bits). */ - *offset = size_binop (MULT_EXPR, - convert (bitsizetype, *offset), - TYPE_SIZE (TREE_TYPE (TREE_TYPE (t)))); - break; - } - /* Not a COMMON reference, so an unrecognized pattern. */ - *decl = error_mark_node; - break; - - case PARM_DECL: - *decl = t; - *offset = bitsize_zero_node; - break; - - case ADDR_EXPR: - if (TREE_CODE (TREE_OPERAND (t, 0)) == VAR_DECL) - { - /* A reference to COMMON. */ - *decl = TREE_OPERAND (t, 0); - *offset = bitsize_zero_node; - break; - } - /* Fall through. */ - default: - /* Not a COMMON reference, so an unrecognized pattern. */ - *decl = error_mark_node; - break; - } -} - -/* Given a tree that is possibly intended for use as an lvalue, return - information representing a canonical view of that tree as a decl, an - offset into that decl, and a size for the lvalue. - - If there's no applicable decl, NULL_TREE is returned for the decl, - and the other fields are left undefined. - - If the tree doesn't fit the recognizable forms, an ERROR_MARK node - is returned for the decl, and the other fields are left undefined. - - Otherwise, the decl returned currently is either a VAR_DECL or a - PARM_DECL. - - The offset returned is always valid, but of course not necessarily - a constant, and not necessarily converted into the appropriate - type, leaving that up to the caller (so as to avoid that overhead - if the decls being looked at are different anyway). - - If the size cannot be determined (e.g. an adjustable array), - an ERROR_MARK node is returned for the size. Otherwise, the - size returned is valid, not necessarily a constant, and not - necessarily converted into the appropriate type as with the - offset. - - Note that the offset and size expressions are expressed in the - base storage units (usually bits) rather than in the units of - the type of the decl, because two decls with different types - might overlap but with apparently non-overlapping array offsets, - whereas converting the array offsets to consistant offsets will - reveal the overlap. */ - -static void -ffecom_tree_canonize_ref_ (tree *decl, tree *offset, tree *size, tree t) -{ - /* The default path is to report a nonexistant decl. */ - *decl = NULL_TREE; - - if (t == NULL_TREE) - return; - - switch (TREE_CODE (t)) - { - case ERROR_MARK: - case IDENTIFIER_NODE: - case INTEGER_CST: - case REAL_CST: - case COMPLEX_CST: - case STRING_CST: - case CONST_DECL: - case PLUS_EXPR: - case MINUS_EXPR: - case MULT_EXPR: - case TRUNC_DIV_EXPR: - case CEIL_DIV_EXPR: - case FLOOR_DIV_EXPR: - case ROUND_DIV_EXPR: - case TRUNC_MOD_EXPR: - case CEIL_MOD_EXPR: - case FLOOR_MOD_EXPR: - case ROUND_MOD_EXPR: - case RDIV_EXPR: - case EXACT_DIV_EXPR: - case FIX_TRUNC_EXPR: - case FIX_CEIL_EXPR: - case FIX_FLOOR_EXPR: - case FIX_ROUND_EXPR: - case FLOAT_EXPR: - case NEGATE_EXPR: - case MIN_EXPR: - case MAX_EXPR: - case ABS_EXPR: - case LSHIFT_EXPR: - case RSHIFT_EXPR: - case LROTATE_EXPR: - case RROTATE_EXPR: - case BIT_IOR_EXPR: - case BIT_XOR_EXPR: - case BIT_AND_EXPR: - case BIT_NOT_EXPR: - case TRUTH_ANDIF_EXPR: - case TRUTH_ORIF_EXPR: - case TRUTH_AND_EXPR: - case TRUTH_OR_EXPR: - case TRUTH_XOR_EXPR: - case TRUTH_NOT_EXPR: - case LT_EXPR: - case LE_EXPR: - case GT_EXPR: - case GE_EXPR: - case EQ_EXPR: - case NE_EXPR: - case COMPLEX_EXPR: - case CONJ_EXPR: - case REALPART_EXPR: - case IMAGPART_EXPR: - case LABEL_EXPR: - case COMPONENT_REF: - case COMPOUND_EXPR: - case ADDR_EXPR: - return; - - case VAR_DECL: - case PARM_DECL: - *decl = t; - *offset = bitsize_zero_node; - *size = TYPE_SIZE (TREE_TYPE (t)); - return; - - case ARRAY_REF: - { - tree array = TREE_OPERAND (t, 0); - tree element = TREE_OPERAND (t, 1); - tree init_offset; - - if ((array == NULL_TREE) - || (element == NULL_TREE)) - { - *decl = error_mark_node; - return; - } - - ffecom_tree_canonize_ref_ (decl, &init_offset, size, - array); - if ((*decl == NULL_TREE) - || (*decl == error_mark_node)) - return; - - /* Calculate ((element - base) * NBBY) + init_offset. */ - *offset = fold (build (MINUS_EXPR, TREE_TYPE (element), - element, - TYPE_MIN_VALUE (TYPE_DOMAIN - (TREE_TYPE (array))))); - - *offset = size_binop (MULT_EXPR, - convert (bitsizetype, *offset), - TYPE_SIZE (TREE_TYPE (TREE_TYPE (array)))); - - *offset = size_binop (PLUS_EXPR, init_offset, *offset); - - *size = TYPE_SIZE (TREE_TYPE (t)); - return; - } - - case INDIRECT_REF: - - /* Most of this code is to handle references to COMMON. And so - far that is useful only for calling library functions, since - external (user) functions might reference common areas. But - even calling an external function, it's worthwhile to decode - COMMON references because if not storing into COMMON, we don't - want COMMON-based arguments to gratuitously force use of a - temporary. */ - - *size = TYPE_SIZE (TREE_TYPE (t)); - - ffecom_tree_canonize_ptr_ (decl, offset, - TREE_OPERAND (t, 0)); - - return; - - case CONVERT_EXPR: - case NOP_EXPR: - case MODIFY_EXPR: - case NON_LVALUE_EXPR: - case RESULT_DECL: - case FIELD_DECL: - case COND_EXPR: /* More cases than we can handle. */ - case SAVE_EXPR: - case REFERENCE_EXPR: - case PREDECREMENT_EXPR: - case PREINCREMENT_EXPR: - case POSTDECREMENT_EXPR: - case POSTINCREMENT_EXPR: - case CALL_EXPR: - default: - *decl = error_mark_node; - return; - } -} - -/* Do divide operation appropriate to type of operands. */ - -static tree -ffecom_tree_divide_ (tree tree_type, tree left, tree right, tree dest_tree, - ffebld dest, bool *dest_used, tree hook) -{ - if ((left == error_mark_node) - || (right == error_mark_node)) - return error_mark_node; - - switch (TREE_CODE (tree_type)) - { - case INTEGER_TYPE: - return ffecom_2 (TRUNC_DIV_EXPR, tree_type, - left, - right); - - case COMPLEX_TYPE: - if (! optimize_size) - return ffecom_2 (RDIV_EXPR, tree_type, - left, - right); - { - ffecomGfrt ix; - - if (TREE_TYPE (tree_type) - == ffecom_tree_type [FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL1]) - ix = FFECOM_gfrtDIV_CC; /* Overlapping result okay. */ - else - ix = FFECOM_gfrtDIV_ZZ; /* Overlapping result okay. */ - - left = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (left)), - left); - left = build_tree_list (NULL_TREE, left); - right = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (right)), - right); - right = build_tree_list (NULL_TREE, right); - TREE_CHAIN (left) = right; - - return ffecom_call_ (ffecom_gfrt_tree_ (ix), - ffecom_gfrt_kindtype (ix), - ffe_is_f2c_library (), - tree_type, - left, - dest_tree, dest, dest_used, - NULL_TREE, TRUE, hook); - } - break; - - case RECORD_TYPE: - { - ffecomGfrt ix; - - if (TREE_TYPE (TYPE_FIELDS (tree_type)) - == ffecom_tree_type [FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL1]) - ix = FFECOM_gfrtDIV_CC; /* Overlapping result okay. */ - else - ix = FFECOM_gfrtDIV_ZZ; /* Overlapping result okay. */ - - left = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (left)), - left); - left = build_tree_list (NULL_TREE, left); - right = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (right)), - right); - right = build_tree_list (NULL_TREE, right); - TREE_CHAIN (left) = right; - - return ffecom_call_ (ffecom_gfrt_tree_ (ix), - ffecom_gfrt_kindtype (ix), - ffe_is_f2c_library (), - tree_type, - left, - dest_tree, dest, dest_used, - NULL_TREE, TRUE, hook); - } - break; - - default: - return ffecom_2 (RDIV_EXPR, tree_type, - left, - right); - } -} - -/* Build type info for non-dummy variable. */ - -static tree -ffecom_type_localvar_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) -{ - tree type; - ffebld dl; - ffebld dim; - tree lowt; - tree hight; - - type = ffecom_tree_type[bt][kt]; - if (bt == FFEINFO_basictypeCHARACTER) - { - hight = build_int_2 (ffesymbol_size (s), 0); - TREE_TYPE (hight) = ffecom_f2c_ftnlen_type_node; - - type - = build_array_type - (type, - build_range_type (ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - hight)); - type = ffecom_check_size_overflow_ (s, type, FALSE); - } - - for (dl = ffesymbol_dims (s); dl != NULL; dl = ffebld_trail (dl)) - { - if (type == error_mark_node) - break; - - dim = ffebld_head (dl); - assert (ffebld_op (dim) == FFEBLD_opBOUNDS); - - if (ffebld_left (dim) == NULL) - lowt = integer_one_node; - else - lowt = ffecom_expr (ffebld_left (dim)); - - if (TREE_CODE (lowt) != INTEGER_CST) - lowt = variable_size (lowt); - - assert (ffebld_right (dim) != NULL); - hight = ffecom_expr (ffebld_right (dim)); - - if (TREE_CODE (hight) != INTEGER_CST) - hight = variable_size (hight); - - type = build_array_type (type, - build_range_type (ffecom_integer_type_node, - lowt, hight)); - type = ffecom_check_size_overflow_ (s, type, FALSE); - } - - return type; -} - -/* Build Namelist type. */ - -static GTY(()) tree ffecom_type_namelist_var; -static tree -ffecom_type_namelist_ (void) -{ - if (ffecom_type_namelist_var == NULL_TREE) - { - tree namefield, varsfield, nvarsfield, vardesctype, type; - - vardesctype = ffecom_type_vardesc_ (); - - type = make_node (RECORD_TYPE); - - vardesctype = build_pointer_type (build_pointer_type (vardesctype)); - - namefield = ffecom_decl_field (type, NULL_TREE, "name", - string_type_node); - varsfield = ffecom_decl_field (type, namefield, "vars", vardesctype); - nvarsfield = ffecom_decl_field (type, varsfield, "nvars", - integer_type_node); - - TYPE_FIELDS (type) = namefield; - layout_type (type); - - ffecom_type_namelist_var = type; - } - - return ffecom_type_namelist_var; -} - -/* Build Vardesc type. */ - -static GTY(()) tree ffecom_type_vardesc_var; -static tree -ffecom_type_vardesc_ (void) -{ - if (ffecom_type_vardesc_var == NULL_TREE) - { - tree namefield, addrfield, dimsfield, typefield, type; - type = make_node (RECORD_TYPE); - - namefield = ffecom_decl_field (type, NULL_TREE, "name", - string_type_node); - addrfield = ffecom_decl_field (type, namefield, "addr", - string_type_node); - dimsfield = ffecom_decl_field (type, addrfield, "dims", - ffecom_f2c_ptr_to_ftnlen_type_node); - typefield = ffecom_decl_field (type, dimsfield, "type", - integer_type_node); - - TYPE_FIELDS (type) = namefield; - layout_type (type); - - ffecom_type_vardesc_var = type; - } - - return ffecom_type_vardesc_var; -} - -static tree -ffecom_vardesc_ (ffebld expr) -{ - ffesymbol s; - - assert (ffebld_op (expr) == FFEBLD_opSYMTER); - s = ffebld_symter (expr); - - if (ffesymbol_hook (s).vardesc_tree == NULL_TREE) - { - int i; - tree vardesctype = ffecom_type_vardesc_ (); - tree var; - tree nameinit; - tree dimsinit; - tree addrinit; - tree typeinit; - tree field; - tree varinits; - static int mynumber = 0; - - var = build_decl (VAR_DECL, - ffecom_get_invented_identifier ("__g77_vardesc_%d", - mynumber++), - vardesctype); - TREE_STATIC (var) = 1; - DECL_INITIAL (var) = error_mark_node; - - var = start_decl (var, FALSE); - - /* Process inits. */ - - nameinit = ffecom_build_f2c_string_ ((i = strlen (ffesymbol_text (s))) - + 1, - ffesymbol_text (s)); - TREE_TYPE (nameinit) - = build_type_variant - (build_array_type - (char_type_node, - build_range_type (integer_type_node, - integer_one_node, - build_int_2 (i, 0))), - 1, 0); - TREE_CONSTANT (nameinit) = 1; - TREE_STATIC (nameinit) = 1; - nameinit = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (nameinit)), - nameinit); - - addrinit = ffecom_arg_ptr_to_expr (expr, &typeinit); - - dimsinit = ffecom_vardesc_dims_ (s); - - if (typeinit == NULL_TREE) - { - ffeinfoBasictype bt = ffesymbol_basictype (s); - ffeinfoKindtype kt = ffesymbol_kindtype (s); - int tc = ffecom_f2c_typecode (bt, kt); - - assert (tc != -1); - typeinit = build_int_2 (tc, (tc < 0) ? -1 : 0); - } - else - typeinit = ffecom_1 (NEGATE_EXPR, TREE_TYPE (typeinit), typeinit); - - varinits = build_tree_list ((field = TYPE_FIELDS (vardesctype)), - nameinit); - TREE_CHAIN (varinits) = build_tree_list ((field = TREE_CHAIN (field)), - addrinit); - TREE_CHAIN (TREE_CHAIN (varinits)) - = build_tree_list ((field = TREE_CHAIN (field)), dimsinit); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (varinits))) - = build_tree_list ((field = TREE_CHAIN (field)), typeinit); - - varinits = build_constructor (vardesctype, varinits); - TREE_CONSTANT (varinits) = 1; - TREE_STATIC (varinits) = 1; - - finish_decl (var, varinits, FALSE); - - var = ffecom_1 (ADDR_EXPR, build_pointer_type (vardesctype), var); - - ffesymbol_hook (s).vardesc_tree = var; - } - - return ffesymbol_hook (s).vardesc_tree; -} - -static tree -ffecom_vardesc_array_ (ffesymbol s) -{ - ffebld b; - tree list; - tree item = NULL_TREE; - tree var; - int i; - static int mynumber = 0; - - for (i = 0, list = NULL_TREE, b = ffesymbol_namelist (s); - b != NULL; - b = ffebld_trail (b), ++i) - { - tree t; - - t = ffecom_vardesc_ (ffebld_head (b)); - - if (list == NULL_TREE) - list = item = build_tree_list (NULL_TREE, t); - else - { - TREE_CHAIN (item) = build_tree_list (NULL_TREE, t); - item = TREE_CHAIN (item); - } - } - - item = build_array_type (build_pointer_type (ffecom_type_vardesc_ ()), - build_range_type (integer_type_node, - integer_one_node, - build_int_2 (i, 0))); - list = build_constructor (item, list); - TREE_CONSTANT (list) = 1; - TREE_STATIC (list) = 1; - - var = ffecom_get_invented_identifier ("__g77_vardesc_array_%d", mynumber++); - var = build_decl (VAR_DECL, var, item); - TREE_STATIC (var) = 1; - DECL_INITIAL (var) = error_mark_node; - var = start_decl (var, FALSE); - finish_decl (var, list, FALSE); - - return var; -} - -static tree -ffecom_vardesc_dims_ (ffesymbol s) -{ - if (ffesymbol_dims (s) == NULL) - return convert (ffecom_f2c_ptr_to_ftnlen_type_node, - integer_zero_node); - - { - ffebld b; - ffebld e; - tree list; - tree backlist; - tree item = NULL_TREE; - tree var; - tree numdim; - tree numelem; - tree baseoff = NULL_TREE; - static int mynumber = 0; - - numdim = build_int_2 ((int) ffesymbol_rank (s), 0); - TREE_TYPE (numdim) = ffecom_f2c_ftnlen_type_node; - - numelem = ffecom_expr (ffesymbol_arraysize (s)); - TREE_TYPE (numelem) = ffecom_f2c_ftnlen_type_node; - - list = NULL_TREE; - backlist = NULL_TREE; - for (b = ffesymbol_dims (s), e = ffesymbol_extents (s); - b != NULL; - b = ffebld_trail (b), e = ffebld_trail (e)) - { - tree t; - tree low; - tree back; - - if (ffebld_trail (b) == NULL) - t = NULL_TREE; - else - { - t = convert (ffecom_f2c_ftnlen_type_node, - ffecom_expr (ffebld_head (e))); - - if (list == NULL_TREE) - list = item = build_tree_list (NULL_TREE, t); - else - { - TREE_CHAIN (item) = build_tree_list (NULL_TREE, t); - item = TREE_CHAIN (item); - } - } - - if (ffebld_left (ffebld_head (b)) == NULL) - low = ffecom_integer_one_node; - else - low = ffecom_expr (ffebld_left (ffebld_head (b))); - low = convert (ffecom_f2c_ftnlen_type_node, low); - - back = build_tree_list (low, t); - TREE_CHAIN (back) = backlist; - backlist = back; - } - - for (item = backlist; item != NULL_TREE; item = TREE_CHAIN (item)) - { - if (TREE_VALUE (item) == NULL_TREE) - baseoff = TREE_PURPOSE (item); - else - baseoff = ffecom_2 (PLUS_EXPR, ffecom_f2c_ftnlen_type_node, - TREE_PURPOSE (item), - ffecom_2 (MULT_EXPR, - ffecom_f2c_ftnlen_type_node, - TREE_VALUE (item), - baseoff)); - } - - /* backlist now dead, along with all TREE_PURPOSEs on it. */ - - baseoff = build_tree_list (NULL_TREE, baseoff); - TREE_CHAIN (baseoff) = list; - - numelem = build_tree_list (NULL_TREE, numelem); - TREE_CHAIN (numelem) = baseoff; - - numdim = build_tree_list (NULL_TREE, numdim); - TREE_CHAIN (numdim) = numelem; - - item = build_array_type (ffecom_f2c_ftnlen_type_node, - build_range_type (integer_type_node, - integer_zero_node, - build_int_2 - ((int) ffesymbol_rank (s) - + 2, 0))); - list = build_constructor (item, numdim); - TREE_CONSTANT (list) = 1; - TREE_STATIC (list) = 1; - - var = ffecom_get_invented_identifier ("__g77_dims_%d", mynumber++); - var = build_decl (VAR_DECL, var, item); - TREE_STATIC (var) = 1; - DECL_INITIAL (var) = error_mark_node; - var = start_decl (var, FALSE); - finish_decl (var, list, FALSE); - - var = ffecom_1 (ADDR_EXPR, build_pointer_type (item), var); - - return var; - } -} - -/* Essentially does a "fold (build1 (code, type, node))" while checking - for certain housekeeping things. - - NOTE: for building an ADDR_EXPR around a FUNCTION_DECL, use - ffecom_1_fn instead. */ - -tree -ffecom_1 (enum tree_code code, tree type, tree node) -{ - tree item; - - if ((node == error_mark_node) - || (type == error_mark_node)) - return error_mark_node; - - if (code == ADDR_EXPR) - { - if (!ffe_mark_addressable (node)) - assert ("can't mark_addressable this node!" == NULL); - } - - switch (ffe_is_emulate_complex () ? code : NOP_EXPR) - { - tree realtype; - - case REALPART_EXPR: - item = build (COMPONENT_REF, type, node, TYPE_FIELDS (TREE_TYPE (node))); - break; - - case IMAGPART_EXPR: - item = build (COMPONENT_REF, type, node, TREE_CHAIN (TYPE_FIELDS (TREE_TYPE (node)))); - break; - - - case NEGATE_EXPR: - if (TREE_CODE (type) != RECORD_TYPE) - { - item = build1 (code, type, node); - break; - } - node = ffecom_stabilize_aggregate_ (node); - realtype = TREE_TYPE (TYPE_FIELDS (type)); - item = - ffecom_2 (COMPLEX_EXPR, type, - ffecom_1 (NEGATE_EXPR, realtype, - ffecom_1 (REALPART_EXPR, realtype, - node)), - ffecom_1 (NEGATE_EXPR, realtype, - ffecom_1 (IMAGPART_EXPR, realtype, - node))); - break; - - default: - item = build1 (code, type, node); - break; - } - - if (TREE_SIDE_EFFECTS (node)) - TREE_SIDE_EFFECTS (item) = 1; - if (code == ADDR_EXPR && staticp (node)) - TREE_CONSTANT (item) = 1; - else if (code == INDIRECT_REF) - TREE_READONLY (item) = TYPE_READONLY (type); - return fold (item); -} - -/* Like ffecom_1 (ADDR_EXPR, TREE_TYPE (node), node), except - handles TREE_CODE (node) == FUNCTION_DECL. In particular, - does not set TREE_ADDRESSABLE (because calling an inline - function does not mean the function needs to be separately - compiled). */ - -tree -ffecom_1_fn (tree node) -{ - tree item; - tree type; - - if (node == error_mark_node) - return error_mark_node; - - type = build_type_variant (TREE_TYPE (node), - TREE_READONLY (node), - TREE_THIS_VOLATILE (node)); - item = build1 (ADDR_EXPR, - build_pointer_type (type), node); - if (TREE_SIDE_EFFECTS (node)) - TREE_SIDE_EFFECTS (item) = 1; - if (staticp (node)) - TREE_CONSTANT (item) = 1; - return fold (item); -} - -/* Essentially does a "fold (build (code, type, node1, node2))" while - checking for certain housekeeping things. */ - -tree -ffecom_2 (enum tree_code code, tree type, tree node1, tree node2) -{ - tree item; - - if ((node1 == error_mark_node) - || (node2 == error_mark_node) - || (type == error_mark_node)) - return error_mark_node; - - switch (ffe_is_emulate_complex () ? code : NOP_EXPR) - { - tree a, b, c, d, realtype; - - case CONJ_EXPR: - assert ("no CONJ_EXPR support yet" == NULL); - return error_mark_node; - - case COMPLEX_EXPR: - item = build_tree_list (TYPE_FIELDS (type), node1); - TREE_CHAIN (item) = build_tree_list (TREE_CHAIN (TYPE_FIELDS (type)), node2); - item = build_constructor (type, item); - break; - - case PLUS_EXPR: - if (TREE_CODE (type) != RECORD_TYPE) - { - item = build (code, type, node1, node2); - break; - } - node1 = ffecom_stabilize_aggregate_ (node1); - node2 = ffecom_stabilize_aggregate_ (node2); - realtype = TREE_TYPE (TYPE_FIELDS (type)); - item = - ffecom_2 (COMPLEX_EXPR, type, - ffecom_2 (PLUS_EXPR, realtype, - ffecom_1 (REALPART_EXPR, realtype, - node1), - ffecom_1 (REALPART_EXPR, realtype, - node2)), - ffecom_2 (PLUS_EXPR, realtype, - ffecom_1 (IMAGPART_EXPR, realtype, - node1), - ffecom_1 (IMAGPART_EXPR, realtype, - node2))); - break; - - case MINUS_EXPR: - if (TREE_CODE (type) != RECORD_TYPE) - { - item = build (code, type, node1, node2); - break; - } - node1 = ffecom_stabilize_aggregate_ (node1); - node2 = ffecom_stabilize_aggregate_ (node2); - realtype = TREE_TYPE (TYPE_FIELDS (type)); - item = - ffecom_2 (COMPLEX_EXPR, type, - ffecom_2 (MINUS_EXPR, realtype, - ffecom_1 (REALPART_EXPR, realtype, - node1), - ffecom_1 (REALPART_EXPR, realtype, - node2)), - ffecom_2 (MINUS_EXPR, realtype, - ffecom_1 (IMAGPART_EXPR, realtype, - node1), - ffecom_1 (IMAGPART_EXPR, realtype, - node2))); - break; - - case MULT_EXPR: - if (TREE_CODE (type) != RECORD_TYPE) - { - item = build (code, type, node1, node2); - break; - } - node1 = ffecom_stabilize_aggregate_ (node1); - node2 = ffecom_stabilize_aggregate_ (node2); - realtype = TREE_TYPE (TYPE_FIELDS (type)); - a = save_expr (ffecom_1 (REALPART_EXPR, realtype, - node1)); - b = save_expr (ffecom_1 (IMAGPART_EXPR, realtype, - node1)); - c = save_expr (ffecom_1 (REALPART_EXPR, realtype, - node2)); - d = save_expr (ffecom_1 (IMAGPART_EXPR, realtype, - node2)); - item = - ffecom_2 (COMPLEX_EXPR, type, - ffecom_2 (MINUS_EXPR, realtype, - ffecom_2 (MULT_EXPR, realtype, - a, - c), - ffecom_2 (MULT_EXPR, realtype, - b, - d)), - ffecom_2 (PLUS_EXPR, realtype, - ffecom_2 (MULT_EXPR, realtype, - a, - d), - ffecom_2 (MULT_EXPR, realtype, - c, - b))); - break; - - case EQ_EXPR: - if ((TREE_CODE (node1) != RECORD_TYPE) - && (TREE_CODE (node2) != RECORD_TYPE)) - { - item = build (code, type, node1, node2); - break; - } - assert (TREE_CODE (node1) == RECORD_TYPE); - assert (TREE_CODE (node2) == RECORD_TYPE); - node1 = ffecom_stabilize_aggregate_ (node1); - node2 = ffecom_stabilize_aggregate_ (node2); - realtype = TREE_TYPE (TYPE_FIELDS (type)); - item = - ffecom_2 (TRUTH_ANDIF_EXPR, type, - ffecom_2 (code, type, - ffecom_1 (REALPART_EXPR, realtype, - node1), - ffecom_1 (REALPART_EXPR, realtype, - node2)), - ffecom_2 (code, type, - ffecom_1 (IMAGPART_EXPR, realtype, - node1), - ffecom_1 (IMAGPART_EXPR, realtype, - node2))); - break; - - case NE_EXPR: - if ((TREE_CODE (node1) != RECORD_TYPE) - && (TREE_CODE (node2) != RECORD_TYPE)) - { - item = build (code, type, node1, node2); - break; - } - assert (TREE_CODE (node1) == RECORD_TYPE); - assert (TREE_CODE (node2) == RECORD_TYPE); - node1 = ffecom_stabilize_aggregate_ (node1); - node2 = ffecom_stabilize_aggregate_ (node2); - realtype = TREE_TYPE (TYPE_FIELDS (type)); - item = - ffecom_2 (TRUTH_ORIF_EXPR, type, - ffecom_2 (code, type, - ffecom_1 (REALPART_EXPR, realtype, - node1), - ffecom_1 (REALPART_EXPR, realtype, - node2)), - ffecom_2 (code, type, - ffecom_1 (IMAGPART_EXPR, realtype, - node1), - ffecom_1 (IMAGPART_EXPR, realtype, - node2))); - break; - - default: - item = build (code, type, node1, node2); - break; - } - - if (TREE_SIDE_EFFECTS (node1) || TREE_SIDE_EFFECTS (node2)) - TREE_SIDE_EFFECTS (item) = 1; - return fold (item); -} - -/* ffecom_2pass_advise_entrypoint -- Advise that there's this entrypoint - - ffesymbol s; // the ENTRY point itself - if (ffecom_2pass_advise_entrypoint(s)) - // the ENTRY point has been accepted - - Does whatever compiler needs to do when it learns about the entrypoint, - like determine the return type of the master function, count the - number of entrypoints, etc. Returns FALSE if the return type is - not compatible with the return type(s) of other entrypoint(s). - - NOTE: for every call to this fn that returns TRUE, _do_entrypoint must - later (after _finish_progunit) be called with the same entrypoint(s) - as passed to this fn for which TRUE was returned. - - 03-Jan-92 JCB 2.0 - Return FALSE if the return type conflicts with previous entrypoints. */ - -bool -ffecom_2pass_advise_entrypoint (ffesymbol entry) -{ - ffebld list; /* opITEM. */ - ffebld mlist; /* opITEM. */ - ffebld plist; /* opITEM. */ - ffebld arg; /* ffebld_head(opITEM). */ - ffebld item; /* opITEM. */ - ffesymbol s; /* ffebld_symter(arg). */ - ffeinfoBasictype bt = ffesymbol_basictype (entry); - ffeinfoKindtype kt = ffesymbol_kindtype (entry); - ffetargetCharacterSize size = ffesymbol_size (entry); - bool ok; - - if (ffecom_num_entrypoints_ == 0) - { /* First entrypoint, make list of main - arglist's dummies. */ - assert (ffecom_primary_entry_ != NULL); - - ffecom_master_bt_ = ffesymbol_basictype (ffecom_primary_entry_); - ffecom_master_kt_ = ffesymbol_kindtype (ffecom_primary_entry_); - ffecom_master_size_ = ffesymbol_size (ffecom_primary_entry_); - - for (plist = NULL, list = ffesymbol_dummyargs (ffecom_primary_entry_); - list != NULL; - list = ffebld_trail (list)) - { - arg = ffebld_head (list); - if (ffebld_op (arg) != FFEBLD_opSYMTER) - continue; /* Alternate return or some such thing. */ - item = ffebld_new_item (arg, NULL); - if (plist == NULL) - ffecom_master_arglist_ = item; - else - ffebld_set_trail (plist, item); - plist = item; - } - } - - /* If necessary, scan entry arglist for alternate returns. Do this scan - apparently redundantly (it's done below to UNIONize the arglists) so - that we don't complain about RETURN 1 if an offending ENTRY is the only - one with an alternate return. */ - - if (!ffecom_is_altreturning_) - { - for (list = ffesymbol_dummyargs (entry); - list != NULL; - list = ffebld_trail (list)) - { - arg = ffebld_head (list); - if (ffebld_op (arg) == FFEBLD_opSTAR) - { - ffecom_is_altreturning_ = TRUE; - break; - } - } - } - - /* Now check type compatibility. */ - - switch (ffecom_master_bt_) - { - case FFEINFO_basictypeNONE: - ok = (bt != FFEINFO_basictypeCHARACTER); - break; - - case FFEINFO_basictypeCHARACTER: - ok - = (bt == FFEINFO_basictypeCHARACTER) - && (kt == ffecom_master_kt_) - && (size == ffecom_master_size_); - break; - - case FFEINFO_basictypeANY: - return FALSE; /* Just don't bother. */ - - default: - if (bt == FFEINFO_basictypeCHARACTER) - { - ok = FALSE; - break; - } - ok = TRUE; - if ((bt != ffecom_master_bt_) || (kt != ffecom_master_kt_)) - { - ffecom_master_bt_ = FFEINFO_basictypeNONE; - ffecom_master_kt_ = FFEINFO_kindtypeNONE; - } - break; - } - - if (!ok) - { - ffebad_start (FFEBAD_ENTRY_CONFLICTS); - ffest_ffebad_here_current_stmt (0); - ffebad_finish (); - return FALSE; /* Can't handle entrypoint. */ - } - - /* Entrypoint type compatible with previous types. */ - - ++ffecom_num_entrypoints_; - - /* Master-arg-list = UNION(Master-arg-list,entry-arg-list). */ - - for (list = ffesymbol_dummyargs (entry); - list != NULL; - list = ffebld_trail (list)) - { - arg = ffebld_head (list); - if (ffebld_op (arg) != FFEBLD_opSYMTER) - continue; /* Alternate return or some such thing. */ - s = ffebld_symter (arg); - for (plist = NULL, mlist = ffecom_master_arglist_; - mlist != NULL; - plist = mlist, mlist = ffebld_trail (mlist)) - { /* plist points to previous item for easy - appending of arg. */ - if (ffebld_symter (ffebld_head (mlist)) == s) - break; /* Already have this arg in the master list. */ - } - if (mlist != NULL) - continue; /* Already have this arg in the master list. */ - - /* Append this arg to the master list. */ - - item = ffebld_new_item (arg, NULL); - if (plist == NULL) - ffecom_master_arglist_ = item; - else - ffebld_set_trail (plist, item); - } - - return TRUE; -} - -/* ffecom_2pass_do_entrypoint -- Do compilation of entrypoint - - ffesymbol s; // the ENTRY point itself - ffecom_2pass_do_entrypoint(s); - - Does whatever compiler needs to do to make the entrypoint actually - happen. Must be called for each entrypoint after - ffecom_finish_progunit is called. */ - -void -ffecom_2pass_do_entrypoint (ffesymbol entry) -{ - static int mfn_num = 0; - static int ent_num; - - if (mfn_num != ffecom_num_fns_) - { /* First entrypoint for this program unit. */ - ent_num = 1; - mfn_num = ffecom_num_fns_; - ffecom_do_entry_ (ffecom_primary_entry_, 0); - } - else - ++ent_num; - - --ffecom_num_entrypoints_; - - ffecom_do_entry_ (entry, ent_num); -} - -/* Essentially does a "fold (build (code, type, node1, node2))" while - checking for certain housekeeping things. Always sets - TREE_SIDE_EFFECTS. */ - -tree -ffecom_2s (enum tree_code code, tree type, tree node1, tree node2) -{ - tree item; - - if ((node1 == error_mark_node) - || (node2 == error_mark_node) - || (type == error_mark_node)) - return error_mark_node; - - item = build (code, type, node1, node2); - TREE_SIDE_EFFECTS (item) = 1; - return fold (item); -} - -/* Essentially does a "fold (build (code, type, node1, node2, node3))" while - checking for certain housekeeping things. */ - -tree -ffecom_3 (enum tree_code code, tree type, tree node1, tree node2, tree node3) -{ - tree item; - - if ((node1 == error_mark_node) - || (node2 == error_mark_node) - || (node3 == error_mark_node) - || (type == error_mark_node)) - return error_mark_node; - - item = build (code, type, node1, node2, node3); - if (TREE_SIDE_EFFECTS (node1) || TREE_SIDE_EFFECTS (node2) - || (node3 != NULL_TREE && TREE_SIDE_EFFECTS (node3))) - TREE_SIDE_EFFECTS (item) = 1; - return fold (item); -} - -/* Essentially does a "fold (build (code, type, node1, node2, node3))" while - checking for certain housekeeping things. Always sets - TREE_SIDE_EFFECTS. */ - -tree -ffecom_3s (enum tree_code code, tree type, tree node1, tree node2, tree node3) -{ - tree item; - - if ((node1 == error_mark_node) - || (node2 == error_mark_node) - || (node3 == error_mark_node) - || (type == error_mark_node)) - return error_mark_node; - - item = build (code, type, node1, node2, node3); - TREE_SIDE_EFFECTS (item) = 1; - return fold (item); -} - -/* ffecom_arg_expr -- Transform argument expr into gcc tree - - See use by ffecom_list_expr. - - If expression is NULL, returns an integer zero tree. If it is not - a CHARACTER expression, returns whatever ffecom_expr - returns and sets the length return value to NULL_TREE. Otherwise - generates code to evaluate the character expression, returns the proper - pointer to the result, but does NOT set the length return value to a tree - that specifies the length of the result. (In other words, the length - variable is always set to NULL_TREE, because a length is never passed.) - - 21-Dec-91 JCB 1.1 - Don't set returned length, since nobody needs it (yet; someday if - we allow CHARACTER*(*) dummies to statement functions, we'll need - it). */ - -tree -ffecom_arg_expr (ffebld expr, tree *length) -{ - tree ign; - - *length = NULL_TREE; - - if (expr == NULL) - return integer_zero_node; - - if (ffeinfo_basictype (ffebld_info (expr)) != FFEINFO_basictypeCHARACTER) - return ffecom_expr (expr); - - return ffecom_arg_ptr_to_expr (expr, &ign); -} - -/* Transform expression into constant argument-pointer-to-expression tree. - - If the expression can be transformed into a argument-pointer-to-expression - tree that is constant, that is done, and the tree returned. Else - NULL_TREE is returned. - - That way, a caller can attempt to provide compile-time initialization - of a variable and, if that fails, *then* choose to start a new block - and resort to using temporaries, as appropriate. */ - -tree -ffecom_arg_ptr_to_const_expr (ffebld expr, tree *length) -{ - if (! expr) - return integer_zero_node; - - if (ffebld_op (expr) == FFEBLD_opANY) - { - if (length) - *length = error_mark_node; - return error_mark_node; - } - - if (ffebld_arity (expr) == 0 - && (ffebld_op (expr) != FFEBLD_opSYMTER - || ffebld_where (expr) == FFEINFO_whereCOMMON - || ffebld_where (expr) == FFEINFO_whereGLOBAL - || ffebld_where (expr) == FFEINFO_whereINTRINSIC)) - { - tree t; - - t = ffecom_arg_ptr_to_expr (expr, length); - assert (TREE_CONSTANT (t)); - assert (! length || TREE_CONSTANT (*length)); - return t; - } - - if (length - && ffebld_size (expr) != FFETARGET_charactersizeNONE) - *length = build_int_2 (ffebld_size (expr), 0); - else if (length) - *length = NULL_TREE; - return NULL_TREE; -} - -/* ffecom_arg_ptr_to_expr -- Transform argument expr into gcc tree - - See use by ffecom_list_ptr_to_expr. - - If expression is NULL, returns an integer zero tree. If it is not - a CHARACTER expression, returns whatever ffecom_ptr_to_expr - returns and sets the length return value to NULL_TREE. Otherwise - generates code to evaluate the character expression, returns the proper - pointer to the result, AND sets the length return value to a tree that - specifies the length of the result. - - If the length argument is NULL, this is a slightly special - case of building a FORMAT expression, that is, an expression that - will be used at run time without regard to length. For the current - implementation, which uses the libf2c library, this means it is nice - to append a null byte to the end of the expression, where feasible, - to make sure any diagnostic about the FORMAT string terminates at - some useful point. - - For now, treat %REF(char-expr) as the same as char-expr with a NULL - length argument. This might even be seen as a feature, if a null - byte can always be appended. */ - -tree -ffecom_arg_ptr_to_expr (ffebld expr, tree *length) -{ - tree item; - tree ign_length; - ffecomConcatList_ catlist; - - if (length != NULL) - *length = NULL_TREE; - - if (expr == NULL) - return integer_zero_node; - - switch (ffebld_op (expr)) - { - case FFEBLD_opPERCENT_VAL: - if (ffeinfo_basictype (ffebld_info (expr)) != FFEINFO_basictypeCHARACTER) - return ffecom_expr (ffebld_left (expr)); - { - tree temp_exp; - tree temp_length; - - temp_exp = ffecom_arg_ptr_to_expr (ffebld_left (expr), &temp_length); - if (temp_exp == error_mark_node) - return error_mark_node; - - return ffecom_1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (temp_exp)), - temp_exp); - } - - case FFEBLD_opPERCENT_REF: - if (ffeinfo_basictype (ffebld_info (expr)) != FFEINFO_basictypeCHARACTER) - return ffecom_ptr_to_expr (ffebld_left (expr)); - if (length != NULL) - { - ign_length = NULL_TREE; - length = &ign_length; - } - expr = ffebld_left (expr); - break; - - case FFEBLD_opPERCENT_DESCR: - switch (ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeCHARACTER: - break; /* Passed by descriptor anyway. */ - - default: - item = ffecom_ptr_to_expr (expr); - if (item != error_mark_node) - *length = TYPE_SIZE (TREE_TYPE (TREE_TYPE (item))); - break; - } - break; - - default: - break; - } - - if (ffeinfo_basictype (ffebld_info (expr)) != FFEINFO_basictypeCHARACTER) - return ffecom_ptr_to_expr (expr); - - assert (ffeinfo_kindtype (ffebld_info (expr)) - == FFEINFO_kindtypeCHARACTER1); - - while (ffebld_op (expr) == FFEBLD_opPAREN) - expr = ffebld_left (expr); - - catlist = ffecom_concat_list_new_ (expr, FFETARGET_charactersizeNONE); - switch (ffecom_concat_list_count_ (catlist)) - { - case 0: /* Shouldn't happen, but in case it does... */ - if (length != NULL) - { - *length = ffecom_f2c_ftnlen_zero_node; - TREE_TYPE (*length) = ffecom_f2c_ftnlen_type_node; - } - ffecom_concat_list_kill_ (catlist); - return null_pointer_node; - - case 1: /* The (fairly) easy case. */ - if (length == NULL) - ffecom_char_args_with_null_ (&item, &ign_length, - ffecom_concat_list_expr_ (catlist, 0)); - else - ffecom_char_args_ (&item, length, - ffecom_concat_list_expr_ (catlist, 0)); - ffecom_concat_list_kill_ (catlist); - assert (item != NULL_TREE); - return item; - - default: /* Must actually concatenate things. */ - break; - } - - { - int count = ffecom_concat_list_count_ (catlist); - int i; - tree lengths; - tree items; - tree length_array; - tree item_array; - tree citem; - tree clength; - tree temporary; - tree num; - tree known_length; - ffetargetCharacterSize sz; - - sz = ffecom_concat_list_maxlen_ (catlist); - /* ~~Kludge! */ - assert (sz != FFETARGET_charactersizeNONE); - - { - tree hook; - - hook = ffebld_nonter_hook (expr); - assert (hook); - assert (TREE_CODE (hook) == TREE_VEC); - assert (TREE_VEC_LENGTH (hook) == 3); - length_array = lengths = TREE_VEC_ELT (hook, 0); - item_array = items = TREE_VEC_ELT (hook, 1); - temporary = TREE_VEC_ELT (hook, 2); - } - - known_length = ffecom_f2c_ftnlen_zero_node; - - for (i = 0; i < count; ++i) - { - if ((i == count) - && (length == NULL)) - ffecom_char_args_with_null_ (&citem, &clength, - ffecom_concat_list_expr_ (catlist, i)); - else - ffecom_char_args_ (&citem, &clength, - ffecom_concat_list_expr_ (catlist, i)); - if ((citem == error_mark_node) - || (clength == error_mark_node)) - { - ffecom_concat_list_kill_ (catlist); - *length = error_mark_node; - return error_mark_node; - } - - items - = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (items), - ffecom_modify (void_type_node, - ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (item_array))), - item_array, - build_int_2 (i, 0)), - citem), - items); - clength = ffecom_save_tree (clength); - if (length != NULL) - known_length - = ffecom_2 (PLUS_EXPR, ffecom_f2c_ftnlen_type_node, - known_length, - clength); - lengths - = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (lengths), - ffecom_modify (void_type_node, - ffecom_2 (ARRAY_REF, - TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (length_array))), - length_array, - build_int_2 (i, 0)), - clength), - lengths); - } - - temporary = ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (temporary)), - temporary); - - item = build_tree_list (NULL_TREE, temporary); - TREE_CHAIN (item) - = build_tree_list (NULL_TREE, - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (items)), - items)); - TREE_CHAIN (TREE_CHAIN (item)) - = build_tree_list (NULL_TREE, - ffecom_1 (ADDR_EXPR, - build_pointer_type (TREE_TYPE (lengths)), - lengths)); - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (item))) - = build_tree_list - (NULL_TREE, - ffecom_1 (ADDR_EXPR, ffecom_f2c_ptr_to_ftnlen_type_node, - convert (ffecom_f2c_ftnlen_type_node, - build_int_2 (count, 0)))); - num = build_int_2 (sz, 0); - TREE_TYPE (num) = ffecom_f2c_ftnlen_type_node; - TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (item)))) - = build_tree_list (NULL_TREE, num); - - item = ffecom_call_gfrt (FFECOM_gfrtCAT, item, NULL_TREE); - TREE_SIDE_EFFECTS (item) = 1; - item = ffecom_2 (COMPOUND_EXPR, TREE_TYPE (temporary), - item, - temporary); - - if (length != NULL) - *length = known_length; - } - - ffecom_concat_list_kill_ (catlist); - assert (item != NULL_TREE); - return item; -} - -/* Generate call to run-time function. - - The first arg is the GNU Fortran Run-Time function index, the second - arg is the list of arguments to pass to it. Returned is the expression - (WITHOUT TREE_SIDE_EFFECTS set!) that makes the call and returns the - result (which may be void). */ - -tree -ffecom_call_gfrt (ffecomGfrt ix, tree args, tree hook) -{ - return ffecom_call_ (ffecom_gfrt_tree_ (ix), - ffecom_gfrt_kindtype (ix), - ffe_is_f2c_library () && ffecom_gfrt_complex_[ix], - NULL_TREE, args, NULL_TREE, NULL, - NULL, NULL_TREE, TRUE, hook); -} - -/* Transform constant-union to tree. */ - -tree -ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt, - ffeinfoKindtype kt, tree tree_type) -{ - tree item; - - switch (bt) - { - case FFEINFO_basictypeINTEGER: - { - HOST_WIDE_INT hi, lo; - - switch (kt) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - lo = ffebld_cu_val_integer1 (*cu); - hi = (lo < 0) ? -1 : 0; - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - lo = ffebld_cu_val_integer2 (*cu); - hi = (lo < 0) ? -1 : 0; - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - lo = ffebld_cu_val_integer3 (*cu); - hi = (lo < 0) ? -1 : 0; - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: -#if HOST_BITS_PER_LONGLONG > HOST_BITS_PER_WIDE_INT - { - long long int big = ffebld_cu_val_integer4 (*cu); - hi = (HOST_WIDE_INT) (big >> HOST_BITS_PER_WIDE_INT); - lo = (HOST_WIDE_INT) big; - } -#else - lo = ffebld_cu_val_integer4 (*cu); - hi = (lo < 0) ? -1 : 0; -#endif - break; -#endif - - default: - assert ("bad INTEGER constant kind type" == NULL); - /* Fall through. */ - case FFEINFO_kindtypeANY: - return error_mark_node; - } - item = build_int_2 (lo, hi); - TREE_TYPE (item) = tree_type; - } - break; - - case FFEINFO_basictypeLOGICAL: - { - int val; - - switch (kt) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - val = ffebld_cu_val_logical1 (*cu); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - val = ffebld_cu_val_logical2 (*cu); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - val = ffebld_cu_val_logical3 (*cu); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - val = ffebld_cu_val_logical4 (*cu); - break; -#endif - - default: - assert ("bad LOGICAL constant kind type" == NULL); - /* Fall through. */ - case FFEINFO_kindtypeANY: - return error_mark_node; - } - item = build_int_2 (val, (val < 0) ? -1 : 0); - TREE_TYPE (item) = tree_type; - } - break; - - case FFEINFO_basictypeREAL: - { - REAL_VALUE_TYPE val; - - switch (kt) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - val = ffetarget_value_real1 (ffebld_cu_val_real1 (*cu)); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - val = ffetarget_value_real2 (ffebld_cu_val_real2 (*cu)); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - val = ffetarget_value_real3 (ffebld_cu_val_real3 (*cu)); - break; -#endif - - default: - assert ("bad REAL constant kind type" == NULL); - /* Fall through. */ - case FFEINFO_kindtypeANY: - return error_mark_node; - } - item = build_real (tree_type, val); - } - break; - - case FFEINFO_basictypeCOMPLEX: - { - REAL_VALUE_TYPE real; - REAL_VALUE_TYPE imag; - tree el_type = ffecom_tree_type[FFEINFO_basictypeREAL][kt]; - - switch (kt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - real = ffetarget_value_real1 (ffebld_cu_val_complex1 (*cu).real); - imag = ffetarget_value_real1 (ffebld_cu_val_complex1 (*cu).imaginary); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - real = ffetarget_value_real2 (ffebld_cu_val_complex2 (*cu).real); - imag = ffetarget_value_real2 (ffebld_cu_val_complex2 (*cu).imaginary); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - real = ffetarget_value_real3 (ffebld_cu_val_complex3 (*cu).real); - imag = ffetarget_value_real3 (ffebld_cu_val_complex3 (*cu).imaginary); - break; -#endif - - default: - assert ("bad REAL constant kind type" == NULL); - /* Fall through. */ - case FFEINFO_kindtypeANY: - return error_mark_node; - } - item = ffecom_build_complex_constant_ (tree_type, - build_real (el_type, real), - build_real (el_type, imag)); - } - break; - - case FFEINFO_basictypeCHARACTER: - { /* Happens only in DATA and similar contexts. */ - ffetargetCharacter1 val; - - switch (kt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeLOGICAL1: - val = ffebld_cu_val_character1 (*cu); - break; -#endif - - default: - assert ("bad CHARACTER constant kind type" == NULL); - /* Fall through. */ - case FFEINFO_kindtypeANY: - return error_mark_node; - } - item = build_string (ffetarget_length_character1 (val), - ffetarget_text_character1 (val)); - TREE_TYPE (item) - = build_type_variant (build_array_type (char_type_node, - build_range_type - (integer_type_node, - integer_one_node, - build_int_2 - (ffetarget_length_character1 - (val), 0))), - 1, 0); - } - break; - - case FFEINFO_basictypeHOLLERITH: - { - ffetargetHollerith h; - - h = ffebld_cu_val_hollerith (*cu); - - /* If not at least as wide as default INTEGER, widen it. */ - if (h.length >= FLOAT_TYPE_SIZE / CHAR_TYPE_SIZE) - item = build_string (h.length, h.text); - else - { - char str[FLOAT_TYPE_SIZE / CHAR_TYPE_SIZE]; - - memcpy (str, h.text, h.length); - memset (&str[h.length], ' ', - FLOAT_TYPE_SIZE / CHAR_TYPE_SIZE - - h.length); - item = build_string (FLOAT_TYPE_SIZE / CHAR_TYPE_SIZE, - str); - } - TREE_TYPE (item) - = build_type_variant (build_array_type (char_type_node, - build_range_type - (integer_type_node, - integer_one_node, - build_int_2 - (h.length, 0))), - 1, 0); - } - break; - - case FFEINFO_basictypeTYPELESS: - { - ffetargetInteger1 ival; - ffetargetTypeless tless; - ffebad error; - - tless = ffebld_cu_val_typeless (*cu); - error = ffetarget_convert_integer1_typeless (&ival, tless); - assert (error == FFEBAD); - - item = build_int_2 ((int) ival, 0); - } - break; - - default: - assert ("not yet on constant type" == NULL); - /* Fall through. */ - case FFEINFO_basictypeANY: - return error_mark_node; - } - - TREE_CONSTANT (item) = 1; - - return item; -} - -/* Transform constant-union to tree, with the type known. */ - -tree -ffecom_constantunion_with_type (ffebldConstantUnion *cu, tree tree_type, - ffebldConst ct) -{ - tree item; - - int val; - - switch (ct) - { -#if FFETARGET_okINTEGER1 - case FFEBLD_constINTEGER1: - val = ffebld_cu_val_integer1 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); - break; -#endif -#if FFETARGET_okINTEGER2 - case FFEBLD_constINTEGER2: - val = ffebld_cu_val_integer2 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); - break; -#endif -#if FFETARGET_okINTEGER3 - case FFEBLD_constINTEGER3: - val = ffebld_cu_val_integer3 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); - break; -#endif -#if FFETARGET_okINTEGER4 - case FFEBLD_constINTEGER4: -#if HOST_BITS_PER_LONGLONG > HOST_BITS_PER_WIDE_INT - { - long long int big = ffebld_cu_val_integer4 (*cu); - item = build_int_2 ((HOST_WIDE_INT) big, - (HOST_WIDE_INT) - (big >> HOST_BITS_PER_WIDE_INT)); - } -#else - val = ffebld_cu_val_integer4 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); -#endif - break; -#endif -#if FFETARGET_okLOGICAL1 - case FFEBLD_constLOGICAL1: - val = ffebld_cu_val_logical1 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); - break; -#endif -#if FFETARGET_okLOGICAL2 - case FFEBLD_constLOGICAL2: - val = ffebld_cu_val_logical2 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); - break; -#endif -#if FFETARGET_okLOGICAL3 - case FFEBLD_constLOGICAL3: - val = ffebld_cu_val_logical3 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); - break; -#endif -#if FFETARGET_okLOGICAL4 - case FFEBLD_constLOGICAL4: - val = ffebld_cu_val_logical4 (*cu); - item = build_int_2 (val, (val < 0) ? -1 : 0); - break; -#endif - default: - assert ("constant type not supported"==NULL); - return error_mark_node; - break; - } - - TREE_TYPE (item) = tree_type; - - TREE_CONSTANT (item) = 1; - - return item; -} -/* Transform expression into constant tree. - - If the expression can be transformed into a tree that is constant, - that is done, and the tree returned. Else NULL_TREE is returned. - - That way, a caller can attempt to provide compile-time initialization - of a variable and, if that fails, *then* choose to start a new block - and resort to using temporaries, as appropriate. */ - -tree -ffecom_const_expr (ffebld expr) -{ - if (! expr) - return integer_zero_node; - - if (ffebld_op (expr) == FFEBLD_opANY) - return error_mark_node; - - if (ffebld_arity (expr) == 0 - && (ffebld_op (expr) != FFEBLD_opSYMTER - || ffebld_where (expr) == FFEINFO_whereGLOBAL - || ffebld_where (expr) == FFEINFO_whereINTRINSIC)) - { - tree t; - - t = ffecom_expr (expr); - assert (TREE_CONSTANT (t)); - return t; - } - - return NULL_TREE; -} - -/* Handy way to make a field in a struct/union. */ - -tree -ffecom_decl_field (tree context, tree prevfield, const char *name, tree type) -{ - tree field; - - field = build_decl (FIELD_DECL, get_identifier (name), type); - DECL_CONTEXT (field) = context; - DECL_ALIGN (field) = 0; - DECL_USER_ALIGN (field) = 0; - if (prevfield != NULL_TREE) - TREE_CHAIN (prevfield) = field; - - return field; -} - -void -ffecom_close_include (FILE *f) -{ - ffecom_close_include_ (f); -} - -/* End a compound statement (block). */ - -tree -ffecom_end_compstmt (void) -{ - return bison_rule_compstmt_ (); -} - -/* ffecom_end_transition -- Perform end transition on all symbols - - ffecom_end_transition(); - - Calls ffecom_sym_end_transition for each global and local symbol. */ - -void -ffecom_end_transition (void) -{ - ffebld item; - - if (ffe_is_ffedebug ()) - fprintf (dmpout, "; end_stmt_transition\n"); - - ffecom_list_blockdata_ = NULL; - ffecom_list_common_ = NULL; - - ffesymbol_drive (ffecom_sym_end_transition); - if (ffe_is_ffedebug ()) - { - ffestorag_report (); - } - - ffecom_start_progunit_ (); - - for (item = ffecom_list_blockdata_; - item != NULL; - item = ffebld_trail (item)) - { - ffebld callee; - ffesymbol s; - tree dt; - tree t; - tree var; - static int number = 0; - - callee = ffebld_head (item); - s = ffebld_symter (callee); - t = ffesymbol_hook (s).decl_tree; - if (t == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - t = ffesymbol_hook (s).decl_tree; - } - - dt = build_pointer_type (TREE_TYPE (t)); - - var = build_decl (VAR_DECL, - ffecom_get_invented_identifier ("__g77_forceload_%d", - number++), - dt); - DECL_EXTERNAL (var) = 0; - TREE_STATIC (var) = 1; - TREE_PUBLIC (var) = 0; - DECL_INITIAL (var) = error_mark_node; - TREE_USED (var) = 1; - - var = start_decl (var, FALSE); - - t = ffecom_1 (ADDR_EXPR, dt, t); - - finish_decl (var, t, FALSE); - } - - /* This handles any COMMON areas that weren't referenced but have, for - example, important initial data. */ - - for (item = ffecom_list_common_; - item != NULL; - item = ffebld_trail (item)) - ffecom_transform_common_ (ffebld_symter (ffebld_head (item))); - - ffecom_list_common_ = NULL; -} - -/* ffecom_exec_transition -- Perform exec transition on all symbols - - ffecom_exec_transition(); - - Calls ffecom_sym_exec_transition for each global and local symbol. - Make sure error updating not inhibited. */ - -void -ffecom_exec_transition (void) -{ - bool inhibited; - - if (ffe_is_ffedebug ()) - fprintf (dmpout, "; exec_stmt_transition\n"); - - inhibited = ffebad_inhibit (); - ffebad_set_inhibit (FALSE); - - ffesymbol_drive (ffecom_sym_exec_transition); /* Don't retract! */ - ffeequiv_exec_transition (); /* Handle all pending EQUIVALENCEs. */ - if (ffe_is_ffedebug ()) - { - ffestorag_report (); - } - - if (inhibited) - ffebad_set_inhibit (TRUE); -} - -/* Handle assignment statement. - - Convert dest and source using ffecom_expr, then join them - with an ASSIGN op and pass the whole thing to expand_expr_stmt. */ - -void -ffecom_expand_let_stmt (ffebld dest, ffebld source) -{ - tree dest_tree; - tree dest_length; - tree source_tree; - tree expr_tree; - - if (ffeinfo_basictype (ffebld_info (dest)) != FFEINFO_basictypeCHARACTER) - { - bool dest_used; - tree assign_temp; - - /* This attempts to replicate the test below, but must not be - true when the test below is false. (Always err on the side - of creating unused temporaries, to avoid ICEs.) */ - if (ffebld_op (dest) != FFEBLD_opSYMTER - || ((dest_tree = ffesymbol_hook (ffebld_symter (dest)).decl_tree) - && (TREE_CODE (dest_tree) != VAR_DECL - || TREE_ADDRESSABLE (dest_tree)))) - { - ffecom_prepare_expr_ (source, dest); - dest_used = TRUE; - } - else - { - ffecom_prepare_expr_ (source, NULL); - dest_used = FALSE; - } - - ffecom_prepare_expr_w (NULL_TREE, dest); - - /* For COMPLEX assignment like C1=C2, if partial overlap is possible, - create a temporary through which the assignment is to take place, - since MODIFY_EXPR doesn't handle partial overlap properly. */ - if (ffebld_basictype (dest) == FFEINFO_basictypeCOMPLEX - && ffecom_possible_partial_overlap_ (dest, source)) - { - assign_temp = ffecom_make_tempvar ("complex_let", - ffecom_tree_type - [ffebld_basictype (dest)] - [ffebld_kindtype (dest)], - FFETARGET_charactersizeNONE, - -1); - } - else - assign_temp = NULL_TREE; - - ffecom_prepare_end (); - - dest_tree = ffecom_expr_w (NULL_TREE, dest); - if (dest_tree == error_mark_node) - return; - - if ((TREE_CODE (dest_tree) != VAR_DECL) - || TREE_ADDRESSABLE (dest_tree)) - source_tree = ffecom_expr_ (source, dest_tree, dest, &dest_used, - FALSE, FALSE); - else - { - assert (! dest_used); - dest_used = FALSE; - source_tree = ffecom_expr (source); - } - if (source_tree == error_mark_node) - return; - - if (dest_used) - expr_tree = source_tree; - else if (assign_temp) - { - expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node, - assign_temp, - source_tree); - expand_expr_stmt (expr_tree); - expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node, - dest_tree, - assign_temp); - } - else - expr_tree = ffecom_2s (MODIFY_EXPR, void_type_node, - dest_tree, - source_tree); - - expand_expr_stmt (expr_tree); - return; - } - - ffecom_prepare_let_char_ (ffebld_size_known (dest), source); - ffecom_prepare_expr_w (NULL_TREE, dest); - - ffecom_prepare_end (); - - ffecom_char_args_ (&dest_tree, &dest_length, dest); - ffecom_let_char_ (dest_tree, dest_length, ffebld_size_known (dest), - source); -} - -/* ffecom_expr -- Transform expr into gcc tree - - tree t; - ffebld expr; // FFE expression. - tree = ffecom_expr(expr); - - Recursive descent on expr while making corresponding tree nodes and - attaching type info and such. */ - -tree -ffecom_expr (ffebld expr) -{ - return ffecom_expr_ (expr, NULL_TREE, NULL, NULL, FALSE, FALSE); -} - -/* Like ffecom_expr, but return tree usable for assigned GOTO or FORMAT. */ - -tree -ffecom_expr_assign (ffebld expr) -{ - return ffecom_expr_ (expr, NULL_TREE, NULL, NULL, TRUE, FALSE); -} - -/* Like ffecom_expr_rw, but return tree usable for ASSIGN. */ - -tree -ffecom_expr_assign_w (ffebld expr) -{ - return ffecom_expr_ (expr, NULL_TREE, NULL, NULL, TRUE, FALSE); -} - -/* Transform expr for use as into read/write tree and stabilize the - reference. Not for use on CHARACTER expressions. - - Recursive descent on expr while making corresponding tree nodes and - attaching type info and such. */ - -tree -ffecom_expr_rw (tree type, ffebld expr) -{ - assert (expr != NULL); - /* Different target types not yet supported. */ - assert (type == NULL_TREE || type == ffecom_type_expr (expr)); - - return stabilize_reference (ffecom_expr (expr)); -} - -/* Transform expr for use as into write tree and stabilize the - reference. Not for use on CHARACTER expressions. - - Recursive descent on expr while making corresponding tree nodes and - attaching type info and such. */ - -tree -ffecom_expr_w (tree type, ffebld expr) -{ - assert (expr != NULL); - /* Different target types not yet supported. */ - assert (type == NULL_TREE || type == ffecom_type_expr (expr)); - - return stabilize_reference (ffecom_expr (expr)); -} - -/* Do global stuff. */ - -void -ffecom_finish_compile (void) -{ - assert (ffecom_outer_function_decl_ == NULL_TREE); - assert (current_function_decl == NULL_TREE); - - ffeglobal_drive (ffecom_finish_global_); -} - -/* Public entry point for front end to access finish_decl. */ - -void -ffecom_finish_decl (tree decl, tree init, bool is_top_level) -{ - assert (!is_top_level); - finish_decl (decl, init, FALSE); -} - -/* Finish a program unit. */ - -void -ffecom_finish_progunit (void) -{ - ffecom_end_compstmt (); - - ffecom_previous_function_decl_ = current_function_decl; - ffecom_which_entrypoint_decl_ = NULL_TREE; - - finish_function (0); -} - -/* Wrapper for get_identifier. pattern is sprintf-like. */ - -tree -ffecom_get_invented_identifier (const char *pattern, ...) -{ - tree decl; - char *nam; - va_list ap; - - va_start (ap, pattern); - if (vasprintf (&nam, pattern, ap) == 0) - abort (); - va_end (ap); - decl = get_identifier (nam); - free (nam); - IDENTIFIER_INVENTED (decl) = 1; - return decl; -} - -ffeinfoBasictype -ffecom_gfrt_basictype (ffecomGfrt gfrt) -{ - assert (gfrt < FFECOM_gfrt); - - switch (ffecom_gfrt_type_[gfrt]) - { - case FFECOM_rttypeVOID_: - case FFECOM_rttypeVOIDSTAR_: - return FFEINFO_basictypeNONE; - - case FFECOM_rttypeFTNINT_: - return FFEINFO_basictypeINTEGER; - - case FFECOM_rttypeINTEGER_: - return FFEINFO_basictypeINTEGER; - - case FFECOM_rttypeLONGINT_: - return FFEINFO_basictypeINTEGER; - - case FFECOM_rttypeLOGICAL_: - return FFEINFO_basictypeLOGICAL; - - case FFECOM_rttypeREAL_F2C_: - case FFECOM_rttypeREAL_GNU_: - return FFEINFO_basictypeREAL; - - case FFECOM_rttypeCOMPLEX_F2C_: - case FFECOM_rttypeCOMPLEX_GNU_: - return FFEINFO_basictypeCOMPLEX; - - case FFECOM_rttypeDOUBLE_: - case FFECOM_rttypeDOUBLEREAL_: - return FFEINFO_basictypeREAL; - - case FFECOM_rttypeDBLCMPLX_F2C_: - case FFECOM_rttypeDBLCMPLX_GNU_: - return FFEINFO_basictypeCOMPLEX; - - case FFECOM_rttypeCHARACTER_: - return FFEINFO_basictypeCHARACTER; - - default: - return FFEINFO_basictypeANY; - } -} - -ffeinfoKindtype -ffecom_gfrt_kindtype (ffecomGfrt gfrt) -{ - assert (gfrt < FFECOM_gfrt); - - switch (ffecom_gfrt_type_[gfrt]) - { - case FFECOM_rttypeVOID_: - case FFECOM_rttypeVOIDSTAR_: - return FFEINFO_kindtypeNONE; - - case FFECOM_rttypeFTNINT_: - return FFEINFO_kindtypeINTEGER1; - - case FFECOM_rttypeINTEGER_: - return FFEINFO_kindtypeINTEGER1; - - case FFECOM_rttypeLONGINT_: - return FFEINFO_kindtypeINTEGER4; - - case FFECOM_rttypeLOGICAL_: - return FFEINFO_kindtypeLOGICAL1; - - case FFECOM_rttypeREAL_F2C_: - case FFECOM_rttypeREAL_GNU_: - return FFEINFO_kindtypeREAL1; - - case FFECOM_rttypeCOMPLEX_F2C_: - case FFECOM_rttypeCOMPLEX_GNU_: - return FFEINFO_kindtypeREAL1; - - case FFECOM_rttypeDOUBLE_: - case FFECOM_rttypeDOUBLEREAL_: - return FFEINFO_kindtypeREAL2; - - case FFECOM_rttypeDBLCMPLX_F2C_: - case FFECOM_rttypeDBLCMPLX_GNU_: - return FFEINFO_kindtypeREAL2; - - case FFECOM_rttypeCHARACTER_: - return FFEINFO_kindtypeCHARACTER1; - - default: - return FFEINFO_kindtypeANY; - } -} - -void -ffecom_init_0 (void) -{ - tree endlink; - int i; - int j; - tree t; - tree field; - ffetype type; - ffetype base_type; - tree double_ftype_double, double_ftype_double_double; - tree float_ftype_float, float_ftype_float_float; - tree ldouble_ftype_ldouble, ldouble_ftype_ldouble_ldouble; - tree ffecom_tree_ptr_to_fun_type_void; - - /* This block of code comes from the now-obsolete cktyps.c. It checks - whether the compiler environment is buggy in known ways, some of which - would, if not explicitly checked here, result in subtle bugs in g77. */ - - if (ffe_is_do_internal_checks ()) - { - static const char names[][12] - = - {"bar", "bletch", "foo", "foobar"}; - const char *name; - unsigned long ul; - double fl; - - name = bsearch ("foo", &names[0], ARRAY_SIZE (names), sizeof (names[0]), - (int (*)(const void *, const void *)) strcmp); - if (name != &names[2][0]) - { - assert ("bsearch doesn't work, #define FFEPROJ_BSEARCH 0 in proj.h" - == NULL); - abort (); - } - - ul = strtoul ("123456789", NULL, 10); - if (ul != 123456789L) - { - assert ("strtoul doesn't have enough range, #define FFEPROJ_STRTOUL 0\ - in proj.h" == NULL); - abort (); - } - - fl = atof ("56.789"); - if ((fl < 56.788) || (fl > 56.79)) - { - assert ("atof not type double, fix your #include " - == NULL); - abort (); - } - } - - ffecom_outer_function_decl_ = NULL_TREE; - current_function_decl = NULL_TREE; - named_labels = NULL_TREE; - current_binding_level = NULL_BINDING_LEVEL; - free_binding_level = NULL_BINDING_LEVEL; - /* Make the binding_level structure for global names. */ - pushlevel (0); - global_binding_level = current_binding_level; - current_binding_level->prep_state = 2; - - build_common_tree_nodes (1); - - /* Define `int' and `char' first so that dbx will output them first. */ - pushdecl (build_decl (TYPE_DECL, get_identifier ("int"), - integer_type_node)); - /* CHARACTER*1 is unsigned in ICHAR contexts. */ - char_type_node = make_unsigned_type (CHAR_TYPE_SIZE); - pushdecl (build_decl (TYPE_DECL, get_identifier ("char"), - char_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("long int"), - long_integer_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned int"), - unsigned_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("long unsigned int"), - long_unsigned_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("long long int"), - long_long_integer_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("long long unsigned int"), - long_long_unsigned_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("short int"), - short_integer_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("short unsigned int"), - short_unsigned_type_node)); - - /* Set the sizetype before we make other types. This *should* be the - first type we create. */ - - set_sizetype - (TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (SIZE_TYPE)))); - ffecom_typesize_pointer_ - = TREE_INT_CST_LOW (TYPE_SIZE (sizetype)) / BITS_PER_UNIT; - - build_common_tree_nodes_2 (0); - - /* Define both `signed char' and `unsigned char'. */ - pushdecl (build_decl (TYPE_DECL, get_identifier ("signed char"), - signed_char_type_node)); - - pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned char"), - unsigned_char_type_node)); - - pushdecl (build_decl (TYPE_DECL, get_identifier ("float"), - float_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("double"), - double_type_node)); - pushdecl (build_decl (TYPE_DECL, get_identifier ("long double"), - long_double_type_node)); - - /* For now, override what build_common_tree_nodes has done. */ - complex_integer_type_node = ffecom_make_complex_type_ (integer_type_node); - complex_float_type_node = ffecom_make_complex_type_ (float_type_node); - complex_double_type_node = ffecom_make_complex_type_ (double_type_node); - complex_long_double_type_node - = ffecom_make_complex_type_ (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)); - - pushdecl (build_decl (TYPE_DECL, get_identifier ("void"), - void_type_node)); - /* We are not going to have real types in C with less than byte alignment, - so we might as well not have any types that claim to have it. */ - TYPE_ALIGN (void_type_node) = BITS_PER_UNIT; - TYPE_USER_ALIGN (void_type_node) = 0; - - string_type_node = build_pointer_type (char_type_node); - - ffecom_tree_fun_type_void - = build_function_type (void_type_node, NULL_TREE); - - ffecom_tree_ptr_to_fun_type_void - = build_pointer_type (ffecom_tree_fun_type_void); - - endlink = tree_cons (NULL_TREE, void_type_node, NULL_TREE); - - t = tree_cons (NULL_TREE, float_type_node, endlink); - float_ftype_float = build_function_type (float_type_node, t); - t = tree_cons (NULL_TREE, float_type_node, t); - float_ftype_float_float = build_function_type (float_type_node, t); - - t = tree_cons (NULL_TREE, double_type_node, endlink); - double_ftype_double = build_function_type (double_type_node, t); - t = tree_cons (NULL_TREE, double_type_node, t); - double_ftype_double_double = build_function_type (double_type_node, t); - - t = tree_cons (NULL_TREE, long_double_type_node, endlink); - ldouble_ftype_ldouble = build_function_type (long_double_type_node, t); - t = tree_cons (NULL_TREE, long_double_type_node, t); - ldouble_ftype_ldouble_ldouble = build_function_type (long_double_type_node, - t); - - for (i = 0; ((size_t) i) < ARRAY_SIZE (ffecom_tree_type); ++i) - for (j = 0; ((size_t) j) < ARRAY_SIZE (ffecom_tree_type[0]); ++j) - { - ffecom_tree_type[i][j] = NULL_TREE; - ffecom_tree_fun_type[i][j] = NULL_TREE; - ffecom_tree_ptr_to_fun_type[i][j] = NULL_TREE; - ffecom_f2c_typecode_[i][j] = -1; - } - - /* Set up standard g77 types. Note that INTEGER and LOGICAL are set - to size FLOAT_TYPE_SIZE because they have to be the same size as - REAL, which also is FLOAT_TYPE_SIZE, according to the standard. - Compiler options and other such stuff that change the ways these - types are set should not affect this particular setup. */ - - ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER1] - = t = make_signed_type (FLOAT_TYPE_SIZE); - pushdecl (build_decl (TYPE_DECL, get_identifier ("integer"), - t)); - type = ffetype_new (); - base_type = type; - ffeinfo_set_type (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER1, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 1, type); - ffecom_typesize_integer1_ = ffetype_size (type); - assert (ffetype_size (type) == sizeof (ffetargetInteger1)); - - ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER1] - = t = make_unsigned_type (FLOAT_TYPE_SIZE); /* HOLLERITH means unsigned. */ - pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned"), - t)); - - ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER2] - = t = make_signed_type (CHAR_TYPE_SIZE); - pushdecl (build_decl (TYPE_DECL, get_identifier ("byte"), - t)); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER2, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 3, type); - assert (ffetype_size (type) == sizeof (ffetargetInteger2)); - - ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER2] - = t = make_unsigned_type (CHAR_TYPE_SIZE); - pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned byte"), - t)); - - ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER3] - = t = make_signed_type (CHAR_TYPE_SIZE * 2); - pushdecl (build_decl (TYPE_DECL, get_identifier ("word"), - t)); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER3, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 6, type); - assert (ffetype_size (type) == sizeof (ffetargetInteger3)); - - ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER3] - = t = make_unsigned_type (CHAR_TYPE_SIZE * 2); - pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned word"), - t)); - - ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER4] - = t = make_signed_type (FLOAT_TYPE_SIZE * 2); - pushdecl (build_decl (TYPE_DECL, get_identifier ("integer4"), - t)); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGER4, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 2, type); - assert (ffetype_size (type) == sizeof (ffetargetInteger4)); - - ffecom_tree_type[FFEINFO_basictypeHOLLERITH][FFEINFO_kindtypeINTEGER4] - = t = make_unsigned_type (FLOAT_TYPE_SIZE * 2); - pushdecl (build_decl (TYPE_DECL, get_identifier ("unsigned4"), - t)); - -#if 0 - if (ffe_is_do_internal_checks () - && LONG_TYPE_SIZE != FLOAT_TYPE_SIZE - && LONG_TYPE_SIZE != CHAR_TYPE_SIZE - && LONG_TYPE_SIZE != SHORT_TYPE_SIZE - && LONG_TYPE_SIZE != LONG_LONG_TYPE_SIZE) - { - fprintf (stderr, "Sorry, no g77 support for LONG_TYPE_SIZE (%d bits) yet.\n", - LONG_TYPE_SIZE); - } -#endif - - ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL1] - = t = make_signed_type (FLOAT_TYPE_SIZE); - pushdecl (build_decl (TYPE_DECL, get_identifier ("logical"), - t)); - type = ffetype_new (); - base_type = type; - ffeinfo_set_type (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL1, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 1, type); - assert (ffetype_size (type) == sizeof (ffetargetLogical1)); - - ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL2] - = t = make_signed_type (CHAR_TYPE_SIZE); - pushdecl (build_decl (TYPE_DECL, get_identifier ("logical2"), - t)); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL2, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 3, type); - assert (ffetype_size (type) == sizeof (ffetargetLogical2)); - - ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL3] - = t = make_signed_type (CHAR_TYPE_SIZE * 2); - pushdecl (build_decl (TYPE_DECL, get_identifier ("logical3"), - t)); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL3, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 6, type); - assert (ffetype_size (type) == sizeof (ffetargetLogical3)); - - ffecom_tree_type[FFEINFO_basictypeLOGICAL][FFEINFO_kindtypeLOGICAL4] - = t = make_signed_type (FLOAT_TYPE_SIZE * 2); - pushdecl (build_decl (TYPE_DECL, get_identifier ("logical4"), - t)); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICAL4, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 2, type); - assert (ffetype_size (type) == sizeof (ffetargetLogical4)); - - ffecom_tree_type[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL1] - = t = make_node (REAL_TYPE); - TYPE_PRECISION (t) = FLOAT_TYPE_SIZE; - pushdecl (build_decl (TYPE_DECL, get_identifier ("real"), - t)); - layout_type (t); - type = ffetype_new (); - base_type = type; - ffeinfo_set_type (FFEINFO_basictypeREAL, FFEINFO_kindtypeREAL1, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 1, type); - ffecom_f2c_typecode_[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL1] - = FFETARGET_f2cTYREAL; - assert (ffetype_size (type) == sizeof (ffetargetReal1)); - - ffecom_tree_type[FFEINFO_basictypeREAL][FFEINFO_kindtypeREALDOUBLE] - = t = make_node (REAL_TYPE); - TYPE_PRECISION (t) = FLOAT_TYPE_SIZE * 2; /* Always twice REAL. */ - pushdecl (build_decl (TYPE_DECL, get_identifier ("double precision"), - t)); - layout_type (t); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeREAL, FFEINFO_kindtypeREALDOUBLE, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 2, type); - ffecom_f2c_typecode_[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL2] - = FFETARGET_f2cTYDREAL; - assert (ffetype_size (type) == sizeof (ffetargetReal2)); - - ffecom_tree_type[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREAL1] - = t = ffecom_make_complex_type_ (ffecom_tree_type[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL1]); - pushdecl (build_decl (TYPE_DECL, get_identifier ("complex"), - t)); - type = ffetype_new (); - base_type = type; - ffeinfo_set_type (FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREAL1, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 1, type); - ffecom_f2c_typecode_[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREAL1] - = FFETARGET_f2cTYCOMPLEX; - assert (ffetype_size (type) == sizeof (ffetargetComplex1)); - - ffecom_tree_type[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREALDOUBLE] - = t = ffecom_make_complex_type_ (ffecom_tree_type[FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL2]); - pushdecl (build_decl (TYPE_DECL, get_identifier ("double complex"), - t)); - type = ffetype_new (); - ffeinfo_set_type (FFEINFO_basictypeCOMPLEX, FFEINFO_kindtypeREALDOUBLE, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_star (base_type, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / CHAR_TYPE_SIZE, - type); - ffetype_set_kind (base_type, 2, - type); - ffecom_f2c_typecode_[FFEINFO_basictypeCOMPLEX][FFEINFO_kindtypeREAL2] - = FFETARGET_f2cTYDCOMPLEX; - assert (ffetype_size (type) == sizeof (ffetargetComplex2)); - - /* Make function and ptr-to-function types for non-CHARACTER types. */ - - for (i = 0; ((size_t) i) < ARRAY_SIZE (ffecom_tree_type); ++i) - for (j = 0; ((size_t) j) < ARRAY_SIZE (ffecom_tree_type[0]); ++j) - { - if ((t = ffecom_tree_type[i][j]) != NULL_TREE) - { - if (i == FFEINFO_basictypeINTEGER) - { - /* Figure out the smallest INTEGER type that can hold - a pointer on this machine. */ - if (GET_MODE_SIZE (TYPE_MODE (t)) - >= GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (null_pointer_node)))) - { - if ((ffecom_pointer_kind_ == FFEINFO_kindtypeNONE) - || (GET_MODE_SIZE (TYPE_MODE (ffecom_tree_type[i][ffecom_pointer_kind_])) - > GET_MODE_SIZE (TYPE_MODE (t)))) - ffecom_pointer_kind_ = j; - } - } - else if (i == FFEINFO_basictypeCOMPLEX) - t = void_type_node; - /* For f2c compatibility, REAL functions are really - implemented as DOUBLE PRECISION. */ - else if ((i == FFEINFO_basictypeREAL) - && (j == FFEINFO_kindtypeREAL1)) - t = ffecom_tree_type - [FFEINFO_basictypeREAL][FFEINFO_kindtypeREAL2]; - - t = ffecom_tree_fun_type[i][j] = build_function_type (t, - NULL_TREE); - ffecom_tree_ptr_to_fun_type[i][j] = build_pointer_type (t); - } - } - - /* Set up pointer types. */ - - if (ffecom_pointer_kind_ == FFEINFO_basictypeNONE) - fatal_error ("no INTEGER type can hold a pointer on this configuration"); - else if (0 && ffe_is_do_internal_checks ()) - fprintf (stderr, "Pointer type kt=%d\n", ffecom_pointer_kind_); - ffetype_set_kind (ffeinfo_type (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT), - 7, - ffeinfo_type (FFEINFO_basictypeINTEGER, - ffecom_pointer_kind_)); - - if (ffe_is_ugly_assign ()) - ffecom_label_kind_ = ffecom_pointer_kind_; /* Require ASSIGN etc to this. */ - else - ffecom_label_kind_ = FFEINFO_kindtypeINTEGERDEFAULT; - if (0 && ffe_is_do_internal_checks ()) - fprintf (stderr, "Label type kt=%d\n", ffecom_label_kind_); - - ffecom_integer_type_node - = ffecom_tree_type[FFEINFO_basictypeINTEGER][FFEINFO_kindtypeINTEGER1]; - ffecom_integer_zero_node = convert (ffecom_integer_type_node, - integer_zero_node); - ffecom_integer_one_node = convert (ffecom_integer_type_node, - integer_one_node); - - /* Yes, the "FLOAT_TYPE_SIZE" references below are intentional. - Turns out that by TYLONG, runtime/libI77/lio.h really means - "whatever size an ftnint is". For consistency and sanity, - com.h and runtime/f2c.h.in agree that flag, ftnint, and ftlen - all are INTEGER, which we also make out of whatever back-end - integer type is FLOAT_TYPE_SIZE bits wide. This change, from - LONG_TYPE_SIZE, for TYLONG and TYLOGICAL, was necessary to - accommodate machines like the Alpha. Note that this suggests - f2c and libf2c are missing a distinction perhaps needed on - some machines between "int" and "long int". -- burley 0.5.5 950215 */ - - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeINTEGER, FLOAT_TYPE_SIZE, - FFETARGET_f2cTYLONG); - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeINTEGER, SHORT_TYPE_SIZE, - FFETARGET_f2cTYSHORT); - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeINTEGER, CHAR_TYPE_SIZE, - FFETARGET_f2cTYINT1); - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeINTEGER, LONG_LONG_TYPE_SIZE, - FFETARGET_f2cTYQUAD); - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeLOGICAL, FLOAT_TYPE_SIZE, - FFETARGET_f2cTYLOGICAL); - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeLOGICAL, SHORT_TYPE_SIZE, - FFETARGET_f2cTYLOGICAL2); - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeLOGICAL, CHAR_TYPE_SIZE, - FFETARGET_f2cTYLOGICAL1); - /* ~~~Not really such a type in libf2c, e.g. I/O support? */ - ffecom_f2c_set_lio_code_ (FFEINFO_basictypeLOGICAL, LONG_LONG_TYPE_SIZE, - FFETARGET_f2cTYQUAD); - - /* CHARACTER stuff is all special-cased, so it is not handled in the above - loop. CHARACTER items are built as arrays of unsigned char. */ - - ffecom_tree_type[FFEINFO_basictypeCHARACTER] - [FFEINFO_kindtypeCHARACTER1] = t = char_type_node; - type = ffetype_new (); - base_type = type; - ffeinfo_set_type (FFEINFO_basictypeCHARACTER, - FFEINFO_kindtypeCHARACTER1, - type); - ffetype_set_ams (type, - TYPE_ALIGN (t) / BITS_PER_UNIT, 0, - TREE_INT_CST_LOW (TYPE_SIZE (t)) / BITS_PER_UNIT); - ffetype_set_kind (base_type, 1, type); - assert (ffetype_size (type) - == sizeof (((ffetargetCharacter1) { 0, NULL }).text[0])); - - ffecom_tree_fun_type[FFEINFO_basictypeCHARACTER] - [FFEINFO_kindtypeCHARACTER1] = ffecom_tree_fun_type_void; - ffecom_tree_ptr_to_fun_type[FFEINFO_basictypeCHARACTER] - [FFEINFO_kindtypeCHARACTER1] - = ffecom_tree_ptr_to_fun_type_void; - ffecom_f2c_typecode_[FFEINFO_basictypeCHARACTER][FFEINFO_kindtypeCHARACTER1] - = FFETARGET_f2cTYCHAR; - - ffecom_f2c_typecode_[FFEINFO_basictypeANY][FFEINFO_kindtypeANY] - = 0; - - /* Make multi-return-value type and fields. */ - - ffecom_multi_type_node_ = make_node (UNION_TYPE); - - field = NULL_TREE; - - for (i = 0; ((size_t) i) < ARRAY_SIZE (ffecom_tree_type); ++i) - for (j = 0; ((size_t) j) < ARRAY_SIZE (ffecom_tree_type[0]); ++j) - { - char name[30]; - - if (ffecom_tree_type[i][j] == NULL_TREE) - continue; /* Not supported. */ - sprintf (&name[0], "bt_%s_kt_%s", - ffeinfo_basictype_string ((ffeinfoBasictype) i), - ffeinfo_kindtype_string ((ffeinfoKindtype) j)); - ffecom_multi_fields_[i][j] = build_decl (FIELD_DECL, - get_identifier (name), - ffecom_tree_type[i][j]); - DECL_CONTEXT (ffecom_multi_fields_[i][j]) - = ffecom_multi_type_node_; - DECL_ALIGN (ffecom_multi_fields_[i][j]) = 0; - DECL_USER_ALIGN (ffecom_multi_fields_[i][j]) = 0; - TREE_CHAIN (ffecom_multi_fields_[i][j]) = field; - field = ffecom_multi_fields_[i][j]; - } - - TYPE_FIELDS (ffecom_multi_type_node_) = field; - layout_type (ffecom_multi_type_node_); - - /* Subroutines usually return integer because they might have alternate - returns. */ - - ffecom_tree_subr_type - = build_function_type (integer_type_node, NULL_TREE); - ffecom_tree_ptr_to_subr_type - = build_pointer_type (ffecom_tree_subr_type); - ffecom_tree_blockdata_type - = build_function_type (void_type_node, NULL_TREE); - - builtin_function ("__builtin_atanf", float_ftype_float, - BUILT_IN_ATANF, BUILT_IN_NORMAL, "atanf", NULL_TREE); - builtin_function ("__builtin_atan", double_ftype_double, - BUILT_IN_ATAN, BUILT_IN_NORMAL, "atan", NULL_TREE); - builtin_function ("__builtin_atanl", ldouble_ftype_ldouble, - BUILT_IN_ATANL, BUILT_IN_NORMAL, "atanl", NULL_TREE); - - builtin_function ("__builtin_atan2f", float_ftype_float_float, - BUILT_IN_ATAN2F, BUILT_IN_NORMAL, "atan2f", NULL_TREE); - builtin_function ("__builtin_atan2", double_ftype_double_double, - BUILT_IN_ATAN2, BUILT_IN_NORMAL, "atan2", NULL_TREE); - builtin_function ("__builtin_atan2l", ldouble_ftype_ldouble_ldouble, - BUILT_IN_ATAN2L, BUILT_IN_NORMAL, "atan2l", NULL_TREE); - - builtin_function ("__builtin_cosf", float_ftype_float, - BUILT_IN_COSF, BUILT_IN_NORMAL, "cosf", NULL_TREE); - builtin_function ("__builtin_cos", double_ftype_double, - BUILT_IN_COS, BUILT_IN_NORMAL, "cos", NULL_TREE); - builtin_function ("__builtin_cosl", ldouble_ftype_ldouble, - BUILT_IN_COSL, BUILT_IN_NORMAL, "cosl", NULL_TREE); - - builtin_function ("__builtin_expf", float_ftype_float, - BUILT_IN_EXPF, BUILT_IN_NORMAL, "expf", NULL_TREE); - builtin_function ("__builtin_exp", double_ftype_double, - BUILT_IN_EXP, BUILT_IN_NORMAL, "exp", NULL_TREE); - builtin_function ("__builtin_expl", ldouble_ftype_ldouble, - BUILT_IN_EXPL, BUILT_IN_NORMAL, "expl", NULL_TREE); - - builtin_function ("__builtin_floorf", float_ftype_float, - BUILT_IN_FLOORF, BUILT_IN_NORMAL, "floorf", NULL_TREE); - builtin_function ("__builtin_floor", double_ftype_double, - BUILT_IN_FLOOR, BUILT_IN_NORMAL, "floor", NULL_TREE); - builtin_function ("__builtin_floorl", ldouble_ftype_ldouble, - BUILT_IN_FLOORL, BUILT_IN_NORMAL, "floorl", NULL_TREE); - - builtin_function ("__builtin_fmodf", float_ftype_float_float, - BUILT_IN_FMODF, BUILT_IN_NORMAL, "fmodf", NULL_TREE); - builtin_function ("__builtin_fmod", double_ftype_double_double, - BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmod", NULL_TREE); - builtin_function ("__builtin_fmodl", ldouble_ftype_ldouble_ldouble, - BUILT_IN_FMODL, BUILT_IN_NORMAL, "fmodl", NULL_TREE); - - builtin_function ("__builtin_logf", float_ftype_float, - BUILT_IN_LOGF, BUILT_IN_NORMAL, "logf", NULL_TREE); - builtin_function ("__builtin_log", double_ftype_double, - BUILT_IN_LOG, BUILT_IN_NORMAL, "log", NULL_TREE); - builtin_function ("__builtin_logl", ldouble_ftype_ldouble, - BUILT_IN_LOGL, BUILT_IN_NORMAL, "logl", NULL_TREE); - - builtin_function ("__builtin_powf", float_ftype_float_float, - BUILT_IN_POWF, BUILT_IN_NORMAL, "powf", NULL_TREE); - builtin_function ("__builtin_pow", double_ftype_double_double, - BUILT_IN_POW, BUILT_IN_NORMAL, "pow", NULL_TREE); - builtin_function ("__builtin_powl", ldouble_ftype_ldouble_ldouble, - BUILT_IN_POWL, BUILT_IN_NORMAL, "powl", NULL_TREE); - - builtin_function ("__builtin_sinf", float_ftype_float, - BUILT_IN_SINF, BUILT_IN_NORMAL, "sinf", NULL_TREE); - builtin_function ("__builtin_sin", double_ftype_double, - BUILT_IN_SIN, BUILT_IN_NORMAL, "sin", NULL_TREE); - builtin_function ("__builtin_sinl", ldouble_ftype_ldouble, - BUILT_IN_SINL, BUILT_IN_NORMAL, "sinl", NULL_TREE); - - builtin_function ("__builtin_sqrtf", float_ftype_float, - BUILT_IN_SQRTF, BUILT_IN_NORMAL, "sqrtf", NULL_TREE); - builtin_function ("__builtin_sqrt", double_ftype_double, - BUILT_IN_SQRT, BUILT_IN_NORMAL, "sqrt", NULL_TREE); - builtin_function ("__builtin_sqrtl", ldouble_ftype_ldouble, - BUILT_IN_SQRTL, BUILT_IN_NORMAL, "sqrtl", NULL_TREE); - - builtin_function ("__builtin_tanf", float_ftype_float, - BUILT_IN_TANF, BUILT_IN_NORMAL, "tanf", NULL_TREE); - builtin_function ("__builtin_tan", double_ftype_double, - BUILT_IN_TAN, BUILT_IN_NORMAL, "tan", NULL_TREE); - builtin_function ("__builtin_tanl", ldouble_ftype_ldouble, - BUILT_IN_TANL, BUILT_IN_NORMAL, "tanl", NULL_TREE); - - pedantic_lvalues = FALSE; - - ffecom_f2c_make_type_ (&ffecom_f2c_integer_type_node, - FFECOM_f2cINTEGER, - "integer"); - ffecom_f2c_make_type_ (&ffecom_f2c_address_type_node, - FFECOM_f2cADDRESS, - "address"); - ffecom_f2c_make_type_ (&ffecom_f2c_real_type_node, - FFECOM_f2cREAL, - "real"); - ffecom_f2c_make_type_ (&ffecom_f2c_doublereal_type_node, - FFECOM_f2cDOUBLEREAL, - "doublereal"); - ffecom_f2c_make_type_ (&ffecom_f2c_complex_type_node, - FFECOM_f2cCOMPLEX, - "complex"); - ffecom_f2c_make_type_ (&ffecom_f2c_doublecomplex_type_node, - FFECOM_f2cDOUBLECOMPLEX, - "doublecomplex"); - ffecom_f2c_make_type_ (&ffecom_f2c_longint_type_node, - FFECOM_f2cLONGINT, - "longint"); - ffecom_f2c_make_type_ (&ffecom_f2c_logical_type_node, - FFECOM_f2cLOGICAL, - "logical"); - ffecom_f2c_make_type_ (&ffecom_f2c_flag_type_node, - FFECOM_f2cFLAG, - "flag"); - ffecom_f2c_make_type_ (&ffecom_f2c_ftnlen_type_node, - FFECOM_f2cFTNLEN, - "ftnlen"); - ffecom_f2c_make_type_ (&ffecom_f2c_ftnint_type_node, - FFECOM_f2cFTNINT, - "ftnint"); - - ffecom_f2c_ftnlen_zero_node - = convert (ffecom_f2c_ftnlen_type_node, integer_zero_node); - - ffecom_f2c_ftnlen_one_node - = convert (ffecom_f2c_ftnlen_type_node, integer_one_node); - - ffecom_f2c_ftnlen_two_node = build_int_2 (2, 0); - TREE_TYPE (ffecom_f2c_ftnlen_two_node) = ffecom_integer_type_node; - - ffecom_f2c_ptr_to_ftnlen_type_node - = build_pointer_type (ffecom_f2c_ftnlen_type_node); - - ffecom_f2c_ptr_to_ftnint_type_node - = build_pointer_type (ffecom_f2c_ftnint_type_node); - - ffecom_f2c_ptr_to_integer_type_node - = build_pointer_type (ffecom_f2c_integer_type_node); - - ffecom_f2c_ptr_to_real_type_node - = build_pointer_type (ffecom_f2c_real_type_node); - - ffecom_float_zero_ = build_real (float_type_node, dconst0); - ffecom_double_zero_ = build_real (double_type_node, dconst0); - ffecom_float_half_ = build_real (float_type_node, dconsthalf); - ffecom_double_half_ = build_real (double_type_node, dconsthalf); - - /* Do "extern int xargc;". */ - - ffecom_tree_xargc_ = build_decl (VAR_DECL, - get_identifier ("f__xargc"), - integer_type_node); - DECL_EXTERNAL (ffecom_tree_xargc_) = 1; - TREE_STATIC (ffecom_tree_xargc_) = 1; - TREE_PUBLIC (ffecom_tree_xargc_) = 1; - ffecom_tree_xargc_ = start_decl (ffecom_tree_xargc_, FALSE); - finish_decl (ffecom_tree_xargc_, NULL_TREE, FALSE); - -#if 0 /* This is being fixed, and seems to be working now. */ - if ((FLOAT_TYPE_SIZE != 32) - || (TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (null_pointer_node))) != 32)) - { - warning ("configuration: REAL, INTEGER, and LOGICAL are %d bits wide,", - (int) FLOAT_TYPE_SIZE); - warning ("and pointers are %d bits wide, but g77 doesn't yet work", - (int) TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (null_pointer_node)))); - warning ("properly unless they all are 32 bits wide"); - warning ("Please keep this in mind before you report bugs."); - } -#endif - -#if 0 /* Code in ste.c that would crash has been commented out. */ - if (TYPE_PRECISION (ffecom_f2c_ftnlen_type_node) - < TYPE_PRECISION (string_type_node)) - /* I/O will probably crash. */ - warning ("configuration: char * holds %d bits, but ftnlen only %d", - TYPE_PRECISION (string_type_node), - TYPE_PRECISION (ffecom_f2c_ftnlen_type_node)); -#endif - -#if 0 /* ASSIGN-related stuff has been changed to accommodate this. */ - if (TYPE_PRECISION (ffecom_integer_type_node) - < TYPE_PRECISION (string_type_node)) - /* ASSIGN 10 TO I will crash. */ - warning ("configuration: char * holds %d bits, but INTEGER only %d --\n\ - ASSIGN statement might fail", - TYPE_PRECISION (string_type_node), - TYPE_PRECISION (ffecom_integer_type_node)); -#endif -} - -/* ffecom_init_2 -- Initialize - - ffecom_init_2(); */ - -void -ffecom_init_2 (void) -{ - assert (ffecom_outer_function_decl_ == NULL_TREE); - assert (current_function_decl == NULL_TREE); - assert (ffecom_which_entrypoint_decl_ == NULL_TREE); - - ffecom_master_arglist_ = NULL; - ++ffecom_num_fns_; - ffecom_primary_entry_ = NULL; - ffecom_is_altreturning_ = FALSE; - ffecom_func_result_ = NULL_TREE; - ffecom_multi_retval_ = NULL_TREE; -} - -/* ffecom_list_expr -- Transform list of exprs into gcc tree - - tree t; - ffebld expr; // FFE opITEM list. - tree = ffecom_list_expr(expr); - - List of actual args is transformed into corresponding gcc backend list. */ - -tree -ffecom_list_expr (ffebld expr) -{ - tree list; - tree *plist = &list; - tree trail = NULL_TREE; /* Append char length args here. */ - tree *ptrail = &trail; - tree length; - - while (expr != NULL) - { - tree texpr = ffecom_arg_expr (ffebld_head (expr), &length); - - if (texpr == error_mark_node) - return error_mark_node; - - *plist = build_tree_list (NULL_TREE, texpr); - plist = &TREE_CHAIN (*plist); - expr = ffebld_trail (expr); - if (length != NULL_TREE) - { - *ptrail = build_tree_list (NULL_TREE, length); - ptrail = &TREE_CHAIN (*ptrail); - } - } - - *plist = trail; - - return list; -} - -/* ffecom_list_ptr_to_expr -- Transform list of exprs into gcc tree - - tree t; - ffebld expr; // FFE opITEM list. - tree = ffecom_list_ptr_to_expr(expr); - - List of actual args is transformed into corresponding gcc backend list for - use in calling an external procedure (vs. a statement function). */ - -tree -ffecom_list_ptr_to_expr (ffebld expr) -{ - tree list; - tree *plist = &list; - tree trail = NULL_TREE; /* Append char length args here. */ - tree *ptrail = &trail; - tree length; - - while (expr != NULL) - { - tree texpr = ffecom_arg_ptr_to_expr (ffebld_head (expr), &length); - - if (texpr == error_mark_node) - return error_mark_node; - - *plist = build_tree_list (NULL_TREE, texpr); - plist = &TREE_CHAIN (*plist); - expr = ffebld_trail (expr); - if (length != NULL_TREE) - { - *ptrail = build_tree_list (NULL_TREE, length); - ptrail = &TREE_CHAIN (*ptrail); - } - } - - *plist = trail; - - return list; -} - -/* Obtain gcc's LABEL_DECL tree for label. */ - -tree -ffecom_lookup_label (ffelab label) -{ - tree glabel; - - if (ffelab_hook (label) == NULL_TREE) - { - char labelname[16]; - - switch (ffelab_type (label)) - { - case FFELAB_typeLOOPEND: - case FFELAB_typeNOTLOOP: - case FFELAB_typeENDIF: - sprintf (labelname, "%" ffelabValue_f "u", ffelab_value (label)); - glabel = build_decl (LABEL_DECL, get_identifier (labelname), - void_type_node); - DECL_CONTEXT (glabel) = current_function_decl; - DECL_MODE (glabel) = VOIDmode; - break; - - case FFELAB_typeFORMAT: - glabel = build_decl (VAR_DECL, - ffecom_get_invented_identifier - ("__g77_format_%d", (int) ffelab_value (label)), - build_type_variant (build_array_type - (char_type_node, - NULL_TREE), - 1, 0)); - TREE_CONSTANT (glabel) = 1; - TREE_STATIC (glabel) = 1; - DECL_CONTEXT (glabel) = current_function_decl; - DECL_INITIAL (glabel) = NULL; - make_decl_rtl (glabel, NULL); - expand_decl (glabel); - - ffecom_save_tree_forever (glabel); - - break; - - case FFELAB_typeANY: - glabel = error_mark_node; - break; - - default: - assert ("bad label type" == NULL); - glabel = NULL; - break; - } - ffelab_set_hook (label, glabel); - } - else - { - glabel = ffelab_hook (label); - } - - return glabel; -} - -/* Stabilizes the arguments. Don't use this if the lhs and rhs come from - a single source specification (as in the fourth argument of MVBITS). - If the type is NULL_TREE, the type of lhs is used to make the type of - the MODIFY_EXPR. */ - -tree -ffecom_modify (tree newtype, tree lhs, tree rhs) -{ - if (lhs == error_mark_node || rhs == error_mark_node) - return error_mark_node; - - if (newtype == NULL_TREE) - newtype = TREE_TYPE (lhs); - - if (TREE_SIDE_EFFECTS (lhs)) - lhs = stabilize_reference (lhs); - - return ffecom_2s (MODIFY_EXPR, newtype, lhs, rhs); -} - -/* Register source file name. */ - -void -ffecom_file (const char *name) -{ - ffecom_file_ (name); -} - -/* ffecom_notify_init_storage -- An aggregate storage is now fully init'ed - - ffestorag st; - ffecom_notify_init_storage(st); - - Gets called when all possible units in an aggregate storage area (a LOCAL - with equivalences or a COMMON) have been initialized. The initialization - info either is in ffestorag_init or, if that is NULL, - ffestorag_accretion: - - ffestorag_init may contain an opCONTER or opARRTER. opCONTER may occur - even for an array if the array is one element in length! - - ffestorag_accretion will contain an opACCTER. It is much like an - opARRTER except it has an ffebit object in it instead of just a size. - The back end can use the info in the ffebit object, if it wants, to - reduce the amount of actual initialization, but in any case it should - kill the ffebit object when done. Also, set accretion to NULL but - init to a non-NULL value. - - After performing initialization, DO NOT set init to NULL, because that'll - tell the front end it is ok for more initialization to happen. Instead, - set init to an opANY expression or some such thing that you can use to - tell that you've already initialized the object. - - 27-Oct-91 JCB 1.1 - Support two-pass FFE. */ - -void -ffecom_notify_init_storage (ffestorag st) -{ - ffebld init; /* The initialization expression. */ - - if (ffestorag_init (st) == NULL) - { - init = ffestorag_accretion (st); - assert (init != NULL); - ffestorag_set_accretion (st, NULL); - ffestorag_set_accretes (st, 0); - ffestorag_set_init (st, init); - } -} - -/* ffecom_notify_init_symbol -- A symbol is now fully init'ed - - ffesymbol s; - ffecom_notify_init_symbol(s); - - Gets called when all possible units in a symbol (not placed in COMMON - or involved in EQUIVALENCE, unless it as yet has no ffestorag object) - have been initialized. The initialization info either is in - ffesymbol_init or, if that is NULL, ffesymbol_accretion: - - ffesymbol_init may contain an opCONTER or opARRTER. opCONTER may occur - even for an array if the array is one element in length! - - ffesymbol_accretion will contain an opACCTER. It is much like an - opARRTER except it has an ffebit object in it instead of just a size. - The back end can use the info in the ffebit object, if it wants, to - reduce the amount of actual initialization, but in any case it should - kill the ffebit object when done. Also, set accretion to NULL but - init to a non-NULL value. - - After performing initialization, DO NOT set init to NULL, because that'll - tell the front end it is ok for more initialization to happen. Instead, - set init to an opANY expression or some such thing that you can use to - tell that you've already initialized the object. - - 27-Oct-91 JCB 1.1 - Support two-pass FFE. */ - -void -ffecom_notify_init_symbol (ffesymbol s) -{ - ffebld init; /* The initialization expression. */ - - if (ffesymbol_storage (s) == NULL) - return; /* Do nothing until COMMON/EQUIVALENCE - possibilities checked. */ - - if ((ffesymbol_init (s) == NULL) - && ((init = ffesymbol_accretion (s)) != NULL)) - { - ffesymbol_set_accretion (s, NULL); - ffesymbol_set_accretes (s, 0); - ffesymbol_set_init (s, init); - } -} - -/* ffecom_notify_primary_entry -- Learn which is the primary entry point - - ffesymbol s; - ffecom_notify_primary_entry(s); - - Gets called when implicit or explicit PROGRAM statement seen or when - FUNCTION, SUBROUTINE, or BLOCK DATA statement seen, with the primary - global symbol that serves as the entry point. */ - -void -ffecom_notify_primary_entry (ffesymbol s) -{ - ffecom_primary_entry_ = s; - ffecom_primary_entry_kind_ = ffesymbol_kind (s); - - if ((ffecom_primary_entry_kind_ == FFEINFO_kindFUNCTION) - || (ffecom_primary_entry_kind_ == FFEINFO_kindSUBROUTINE)) - ffecom_primary_entry_is_proc_ = TRUE; - else - ffecom_primary_entry_is_proc_ = FALSE; - - if (!ffe_is_silent ()) - { - if (ffecom_primary_entry_kind_ == FFEINFO_kindPROGRAM) - fprintf (stderr, "%s:\n", ffesymbol_text (s)); - else - fprintf (stderr, " %s:\n", ffesymbol_text (s)); - } - - if (ffecom_primary_entry_kind_ == FFEINFO_kindSUBROUTINE) - { - ffebld list; - ffebld arg; - - for (list = ffesymbol_dummyargs (s); - list != NULL; - list = ffebld_trail (list)) - { - arg = ffebld_head (list); - if (ffebld_op (arg) == FFEBLD_opSTAR) - { - ffecom_is_altreturning_ = TRUE; - break; - } - } - } -} - -FILE * -ffecom_open_include (char *name, ffewhereLine l, ffewhereColumn c) -{ - return ffecom_open_include_ (name, l, c); -} - -/* ffecom_ptr_to_expr -- Transform expr into gcc tree with & in front - - tree t; - ffebld expr; // FFE expression. - tree = ffecom_ptr_to_expr(expr); - - Like ffecom_expr, but sticks address-of in front of most things. */ - -tree -ffecom_ptr_to_expr (ffebld expr) -{ - tree item; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffesymbol s; - - assert (expr != NULL); - - switch (ffebld_op (expr)) - { - case FFEBLD_opSYMTER: - s = ffebld_symter (expr); - if (ffesymbol_where (s) == FFEINFO_whereINTRINSIC) - { - ffecomGfrt ix; - - ix = ffeintrin_gfrt_indirect (ffebld_symter_implementation (expr)); - assert (ix != FFECOM_gfrt); - if ((item = ffecom_gfrt_[ix]) == NULL_TREE) - { - ffecom_make_gfrt_ (ix); - item = ffecom_gfrt_[ix]; - } - } - else - { - item = ffesymbol_hook (s).decl_tree; - if (item == NULL_TREE) - { - s = ffecom_sym_transform_ (s); - item = ffesymbol_hook (s).decl_tree; - } - } - assert (item != NULL); - if (item == error_mark_node) - return item; - if (!ffesymbol_hook (s).addr) - item = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (item)), - item); - return item; - - case FFEBLD_opARRAYREF: - return ffecom_arrayref_ (NULL_TREE, expr, 1); - - case FFEBLD_opCONTER: - - bt = ffeinfo_basictype (ffebld_info (expr)); - kt = ffeinfo_kindtype (ffebld_info (expr)); - - item = ffecom_constantunion (&ffebld_constant_union - (ffebld_conter (expr)), bt, kt, - ffecom_tree_type[bt][kt]); - if (item == error_mark_node) - return error_mark_node; - item = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (item)), - item); - return item; - - case FFEBLD_opANY: - return error_mark_node; - - default: - bt = ffeinfo_basictype (ffebld_info (expr)); - kt = ffeinfo_kindtype (ffebld_info (expr)); - - item = ffecom_expr (expr); - if (item == error_mark_node) - return error_mark_node; - - /* The back end currently optimizes a bit too zealously for us, in that - we fail JCB001 if the following block of code is omitted. It checks - to see if the transformed expression is a symbol or array reference, - and encloses it in a SAVE_EXPR if that is the case. */ - - STRIP_NOPS (item); - if ((TREE_CODE (item) == VAR_DECL) - || (TREE_CODE (item) == PARM_DECL) - || (TREE_CODE (item) == RESULT_DECL) - || (TREE_CODE (item) == INDIRECT_REF) - || (TREE_CODE (item) == ARRAY_REF) - || (TREE_CODE (item) == COMPONENT_REF) -#ifdef OFFSET_REF - || (TREE_CODE (item) == OFFSET_REF) -#endif - || (TREE_CODE (item) == BUFFER_REF) - || (TREE_CODE (item) == REALPART_EXPR) - || (TREE_CODE (item) == IMAGPART_EXPR)) - { - item = ffecom_save_tree (item); - } - - item = ffecom_1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (item)), - item); - return item; - } - - assert ("fall-through error" == NULL); - return error_mark_node; -} - -/* Obtain a temp var with given data type. - - size is FFETARGET_charactersizeNONE for a non-CHARACTER type - or >= 0 for a CHARACTER type. - - elements is -1 for a scalar or > 0 for an array of type. */ - -tree -ffecom_make_tempvar (const char *commentary, tree type, - ffetargetCharacterSize size, int elements) -{ - tree t; - static int mynumber; - - assert (current_binding_level->prep_state < 2); - - if (type == error_mark_node) - return error_mark_node; - - if (size != FFETARGET_charactersizeNONE) - type = build_array_type (type, - build_range_type (ffecom_f2c_ftnlen_type_node, - ffecom_f2c_ftnlen_one_node, - build_int_2 (size, 0))); - if (elements != -1) - type = build_array_type (type, - build_range_type (integer_type_node, - integer_zero_node, - build_int_2 (elements - 1, - 0))); - t = build_decl (VAR_DECL, - ffecom_get_invented_identifier ("__g77_%s_%d", - commentary, - mynumber++), - type); - - t = start_decl (t, FALSE); - finish_decl (t, NULL_TREE, FALSE); - - return t; -} - -/* Prepare argument pointer to expression. - - Like ffecom_prepare_expr, except for expressions to be evaluated - via ffecom_arg_ptr_to_expr. */ - -void -ffecom_prepare_arg_ptr_to_expr (ffebld expr) -{ - /* ~~For now, it seems to be the same thing. */ - ffecom_prepare_expr (expr); - return; -} - -/* End of preparations. */ - -bool -ffecom_prepare_end (void) -{ - int prep_state = current_binding_level->prep_state; - - assert (prep_state < 2); - current_binding_level->prep_state = 2; - - return (prep_state == 1) ? TRUE : FALSE; -} - -/* Prepare expression. - - This is called before any code is generated for the current block. - It scans the expression, declares any temporaries that might be needed - during evaluation of the expression, and stores those temporaries in - the appropriate "hook" fields of the expression. `dest', if not NULL, - specifies the destination that ffecom_expr_ will see, in case that - helps avoid generating unused temporaries. - - ~~Improve to avoid allocating unused temporaries by taking `dest' - into account vis-a-vis aliasing requirements of complex/character - functions. */ - -void -ffecom_prepare_expr_ (ffebld expr, ffebld dest UNUSED) -{ - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharacterSize sz; - tree tempvar = NULL_TREE; - - assert (current_binding_level->prep_state < 2); - - if (! expr) - return; - - bt = ffeinfo_basictype (ffebld_info (expr)); - kt = ffeinfo_kindtype (ffebld_info (expr)); - sz = ffeinfo_size (ffebld_info (expr)); - - /* Generate whatever temporaries are needed to represent the result - of the expression. */ - - if (bt == FFEINFO_basictypeCHARACTER) - { - while (ffebld_op (expr) == FFEBLD_opPAREN) - expr = ffebld_left (expr); - } - - switch (ffebld_op (expr)) - { - default: - /* Don't make temps for SYMTER, CONTER, etc. */ - if (ffebld_arity (expr) == 0) - break; - - switch (bt) - { - case FFEINFO_basictypeCOMPLEX: - if (ffebld_op (expr) == FFEBLD_opFUNCREF) - { - ffesymbol s; - - if (ffebld_op (ffebld_left (expr)) != FFEBLD_opSYMTER) - break; - - s = ffebld_symter (ffebld_left (expr)); - if (ffesymbol_where (s) == FFEINFO_whereCONSTANT - || (ffesymbol_where (s) != FFEINFO_whereINTRINSIC - && ! ffesymbol_is_f2c (s)) - || (ffesymbol_where (s) == FFEINFO_whereINTRINSIC - && ! ffe_is_f2c_library ())) - break; - } - else if (ffebld_op (expr) == FFEBLD_opPOWER) - { - /* Requires special treatment. There's no POW_CC function - in libg2c, so POW_ZZ is used, which means we always - need a double-complex temp, not a single-complex. */ - kt = FFEINFO_kindtypeREAL2; - } - else if (ffebld_op (expr) != FFEBLD_opDIVIDE) - /* The other ops don't need temps for complex operands. */ - break; - - /* ~~~Avoid making temps for some intrinsics, such as AIMAG(C), - REAL(C). See 19990325-0.f, routine `check', for cases. */ - tempvar = ffecom_make_tempvar ("complex", - ffecom_tree_type - [FFEINFO_basictypeCOMPLEX][kt], - FFETARGET_charactersizeNONE, - -1); - break; - - case FFEINFO_basictypeCHARACTER: - if (ffebld_op (expr) != FFEBLD_opFUNCREF) - break; - - if (sz == FFETARGET_charactersizeNONE) - /* ~~Kludge alert! This should someday be fixed. */ - sz = 24; - - tempvar = ffecom_make_tempvar ("char", char_type_node, sz, -1); - break; - - default: - break; - } - break; - - case FFEBLD_opCONCATENATE: - { - /* This gets special handling, because only one set of temps - is needed for a tree of these -- the tree is treated as - a flattened list of concatenations when generating code. */ - - ffecomConcatList_ catlist; - tree ltmp, itmp, result; - int count; - int i; - - catlist = ffecom_concat_list_new_ (expr, FFETARGET_charactersizeNONE); - count = ffecom_concat_list_count_ (catlist); - - if (count >= 2) - { - ltmp - = ffecom_make_tempvar ("concat_len", - ffecom_f2c_ftnlen_type_node, - FFETARGET_charactersizeNONE, count); - itmp - = ffecom_make_tempvar ("concat_item", - ffecom_f2c_address_type_node, - FFETARGET_charactersizeNONE, count); - result - = ffecom_make_tempvar ("concat_res", - char_type_node, - ffecom_concat_list_maxlen_ (catlist), - -1); - - tempvar = make_tree_vec (3); - TREE_VEC_ELT (tempvar, 0) = ltmp; - TREE_VEC_ELT (tempvar, 1) = itmp; - TREE_VEC_ELT (tempvar, 2) = result; - } - - for (i = 0; i < count; ++i) - ffecom_prepare_arg_ptr_to_expr (ffecom_concat_list_expr_ (catlist, - i)); - - ffecom_concat_list_kill_ (catlist); - - if (tempvar) - { - ffebld_nonter_set_hook (expr, tempvar); - current_binding_level->prep_state = 1; - } - } - return; - - case FFEBLD_opCONVERT: - if (bt == FFEINFO_basictypeCHARACTER - && ((ffebld_size_known (ffebld_left (expr)) - == FFETARGET_charactersizeNONE) - || (ffebld_size_known (ffebld_left (expr)) >= sz))) - tempvar = ffecom_make_tempvar ("convert", char_type_node, sz, -1); - break; - } - - if (tempvar) - { - ffebld_nonter_set_hook (expr, tempvar); - current_binding_level->prep_state = 1; - } - - /* Prepare subexpressions for this expr. */ - - switch (ffebld_op (expr)) - { - case FFEBLD_opPERCENT_LOC: - ffecom_prepare_ptr_to_expr (ffebld_left (expr)); - break; - - case FFEBLD_opPERCENT_VAL: - case FFEBLD_opPERCENT_REF: - ffecom_prepare_expr (ffebld_left (expr)); - break; - - case FFEBLD_opPERCENT_DESCR: - ffecom_prepare_arg_ptr_to_expr (ffebld_left (expr)); - break; - - case FFEBLD_opITEM: - { - ffebld item; - - for (item = expr; - item != NULL; - item = ffebld_trail (item)) - if (ffebld_head (item) != NULL) - ffecom_prepare_expr (ffebld_head (item)); - } - break; - - default: - /* Need to handle character conversion specially. */ - switch (ffebld_arity (expr)) - { - case 2: - ffecom_prepare_expr (ffebld_left (expr)); - ffecom_prepare_expr (ffebld_right (expr)); - break; - - case 1: - ffecom_prepare_expr (ffebld_left (expr)); - break; - - default: - break; - } - } - - return; -} - -/* Prepare expression for reading and writing. - - Like ffecom_prepare_expr, except for expressions to be evaluated - via ffecom_expr_rw. */ - -void -ffecom_prepare_expr_rw (tree type, ffebld expr) -{ - /* This is all we support for now. */ - assert (type == NULL_TREE || type == ffecom_type_expr (expr)); - - /* ~~For now, it seems to be the same thing. */ - ffecom_prepare_expr (expr); - return; -} - -/* Prepare expression for writing. - - Like ffecom_prepare_expr, except for expressions to be evaluated - via ffecom_expr_w. */ - -void -ffecom_prepare_expr_w (tree type, ffebld expr) -{ - /* This is all we support for now. */ - assert (type == NULL_TREE || type == ffecom_type_expr (expr)); - - /* ~~For now, it seems to be the same thing. */ - ffecom_prepare_expr (expr); - return; -} - -/* Prepare expression for returning. - - Like ffecom_prepare_expr, except for expressions to be evaluated - via ffecom_return_expr. */ - -void -ffecom_prepare_return_expr (ffebld expr) -{ - assert (current_binding_level->prep_state < 2); - - if (ffecom_primary_entry_kind_ == FFEINFO_kindSUBROUTINE - && ffecom_is_altreturning_ - && expr != NULL) - ffecom_prepare_expr (expr); -} - -/* Prepare pointer to expression. - - Like ffecom_prepare_expr, except for expressions to be evaluated - via ffecom_ptr_to_expr. */ - -void -ffecom_prepare_ptr_to_expr (ffebld expr) -{ - /* ~~For now, it seems to be the same thing. */ - ffecom_prepare_expr (expr); - return; -} - -/* Transform expression into constant pointer-to-expression tree. - - If the expression can be transformed into a pointer-to-expression tree - that is constant, that is done, and the tree returned. Else NULL_TREE - is returned. - - That way, a caller can attempt to provide compile-time initialization - of a variable and, if that fails, *then* choose to start a new block - and resort to using temporaries, as appropriate. */ - -tree -ffecom_ptr_to_const_expr (ffebld expr) -{ - if (! expr) - return integer_zero_node; - - if (ffebld_op (expr) == FFEBLD_opANY) - return error_mark_node; - - if (ffebld_arity (expr) == 0 - && (ffebld_op (expr) != FFEBLD_opSYMTER - || ffebld_where (expr) == FFEINFO_whereCOMMON - || ffebld_where (expr) == FFEINFO_whereGLOBAL - || ffebld_where (expr) == FFEINFO_whereINTRINSIC)) - { - tree t; - - t = ffecom_ptr_to_expr (expr); - assert (TREE_CONSTANT (t)); - return t; - } - - return NULL_TREE; -} - -/* ffecom_return_expr -- Returns return-value expr given alt return expr - - tree rtn; // NULL_TREE means use expand_null_return() - ffebld expr; // NULL if no alt return expr to RETURN stmt - rtn = ffecom_return_expr(expr); - - Based on the program unit type and other info (like return function - type, return master function type when alternate ENTRY points, - whether subroutine has any alternate RETURN points, etc), returns the - appropriate expression to be returned to the caller, or NULL_TREE - meaning no return value or the caller expects it to be returned somewhere - else (which is handled by other parts of this module). */ - -tree -ffecom_return_expr (ffebld expr) -{ - tree rtn; - - switch (ffecom_primary_entry_kind_) - { - case FFEINFO_kindPROGRAM: - case FFEINFO_kindBLOCKDATA: - rtn = NULL_TREE; - break; - - case FFEINFO_kindSUBROUTINE: - if (!ffecom_is_altreturning_) - rtn = NULL_TREE; /* No alt returns, never an expr. */ - else if (expr == NULL) - rtn = integer_zero_node; - else - rtn = ffecom_expr (expr); - break; - - case FFEINFO_kindFUNCTION: - if ((ffecom_multi_retval_ != NULL_TREE) - || (ffesymbol_basictype (ffecom_primary_entry_) - == FFEINFO_basictypeCHARACTER) - || ((ffesymbol_basictype (ffecom_primary_entry_) - == FFEINFO_basictypeCOMPLEX) - && (ffecom_num_entrypoints_ == 0) - && ffesymbol_is_f2c (ffecom_primary_entry_))) - { /* Value is returned by direct assignment - into (implicit) dummy. */ - rtn = NULL_TREE; - break; - } - rtn = ffecom_func_result_; -#if 0 - /* Spurious error if RETURN happens before first reference! So elide - this code. In particular, for debugging registry, rtn should always - be non-null after all, but TREE_USED won't be set until we encounter - a reference in the code. Perfectly okay (but weird) code that, - e.g., has "GOTO 20;10 RETURN;20 RTN=0;GOTO 10", would result in - this diagnostic for no reason. Have people use -O -Wuninitialized - and leave it to the back end to find obviously weird cases. */ - - /* Used to "assert(rtn != NULL_TREE);" here, but it's kind of a valid - situation; if the return value has never been referenced, it won't - have a tree under 2pass mode. */ - if ((rtn == NULL_TREE) - || !TREE_USED (rtn)) - { - ffebad_start (FFEBAD_RETURN_VALUE_UNSET); - ffebad_here (0, ffesymbol_where_line (ffecom_primary_entry_), - ffesymbol_where_column (ffecom_primary_entry_)); - ffebad_string (ffesymbol_text (ffesymbol_funcresult - (ffecom_primary_entry_))); - ffebad_finish (); - } -#endif - break; - - default: - assert ("bad unit kind" == NULL); - case FFEINFO_kindANY: - rtn = error_mark_node; - break; - } - - return rtn; -} - -/* Do save_expr only if tree is not error_mark_node. */ - -tree -ffecom_save_tree (tree t) -{ - return save_expr (t); -} - -/* Start a compound statement (block). */ - -void -ffecom_start_compstmt (void) -{ - bison_rule_pushlevel_ (); -} - -/* Public entry point for front end to access start_decl. */ - -tree -ffecom_start_decl (tree decl, bool is_initialized) -{ - DECL_INITIAL (decl) = is_initialized ? error_mark_node : NULL_TREE; - return start_decl (decl, FALSE); -} - -/* ffecom_sym_commit -- Symbol's state being committed to reality - - ffesymbol s; - ffecom_sym_commit(s); - - Does whatever the backend needs when a symbol is committed after having - been backtrackable for a period of time. */ - -void -ffecom_sym_commit (ffesymbol s UNUSED) -{ - assert (!ffesymbol_retractable ()); -} - -/* ffecom_sym_end_transition -- Perform end transition on all symbols - - ffecom_sym_end_transition(); - - Does backend-specific stuff and also calls ffest_sym_end_transition - to do the necessary FFE stuff. - - Backtracking is never enabled when this fn is called, so don't worry - about it. */ - -ffesymbol -ffecom_sym_end_transition (ffesymbol s) -{ - ffestorag st; - - assert (!ffesymbol_retractable ()); - - s = ffest_sym_end_transition (s); - - if ((ffesymbol_kind (s) == FFEINFO_kindBLOCKDATA) - && (ffesymbol_where (s) == FFEINFO_whereGLOBAL)) - { - ffecom_list_blockdata_ - = ffebld_new_item (ffebld_new_symter (s, FFEINTRIN_genNONE, - FFEINTRIN_specNONE, - FFEINTRIN_impNONE), - ffecom_list_blockdata_); - } - - /* This is where we finally notice that a symbol has partial initialization - and finalize it. */ - - if (ffesymbol_accretion (s) != NULL) - { - assert (ffesymbol_init (s) == NULL); - ffecom_notify_init_symbol (s); - } - else if (((st = ffesymbol_storage (s)) != NULL) - && ((st = ffestorag_parent (st)) != NULL) - && (ffestorag_accretion (st) != NULL)) - { - assert (ffestorag_init (st) == NULL); - ffecom_notify_init_storage (st); - } - - if ((ffesymbol_kind (s) == FFEINFO_kindCOMMON) - && (ffesymbol_where (s) == FFEINFO_whereLOCAL) - && (ffesymbol_storage (s) != NULL)) - { - ffecom_list_common_ - = ffebld_new_item (ffebld_new_symter (s, FFEINTRIN_genNONE, - FFEINTRIN_specNONE, - FFEINTRIN_impNONE), - ffecom_list_common_); - } - - return s; -} - -/* ffecom_sym_exec_transition -- Perform exec transition on all symbols - - ffecom_sym_exec_transition(); - - Does backend-specific stuff and also calls ffest_sym_exec_transition - to do the necessary FFE stuff. - - See the long-winded description in ffecom_sym_learned for info - on handling the situation where backtracking is inhibited. */ - -ffesymbol -ffecom_sym_exec_transition (ffesymbol s) -{ - s = ffest_sym_exec_transition (s); - - return s; -} - -/* ffecom_sym_learned -- Initial or more info gained on symbol after exec - - ffesymbol s; - s = ffecom_sym_learned(s); - - Called when a new symbol is seen after the exec transition or when more - info (perhaps) is gained for an UNCERTAIN symbol. The symbol state when - it arrives here is that all its latest info is updated already, so its - state may be UNCERTAIN or UNDERSTOOD, it might already have the hook - field filled in if its gone through here or exec_transition first, and - so on. - - The backend probably wants to check ffesymbol_retractable() to see if - backtracking is in effect. If so, the FFE's changes to the symbol may - be retracted (undone) or committed (ratified), at which time the - appropriate ffecom_sym_retract or _commit function will be called - for that function. - - If the backend has its own backtracking mechanism, great, use it so that - committal is a simple operation. Though it doesn't make much difference, - I suppose: the reason for tentative symbol evolution in the FFE is to - enable error detection in weird incorrect statements early and to disable - incorrect error detection on a correct statement. The backend is not - likely to introduce any information that'll get involved in these - considerations, so it is probably just fine that the implementation - model for this fn and for _exec_transition is to not do anything - (besides the required FFE stuff) if ffesymbol_retractable() returns TRUE - and instead wait until ffecom_sym_commit is called (which it never - will be as long as we're using ambiguity-detecting statement analysis in - the FFE, which we are initially to shake out the code, but don't depend - on this), otherwise go ahead and do whatever is needed. - - In essence, then, when this fn and _exec_transition get called while - backtracking is enabled, a general mechanism would be to flag which (or - both) of these were called (and in what order? neat question as to what - might happen that I'm too lame to think through right now) and then when - _commit is called reproduce the original calling sequence, if any, for - the two fns (at which point backtracking will, of course, be disabled). */ - -ffesymbol -ffecom_sym_learned (ffesymbol s) -{ - ffestorag_exec_layout (s); - - return s; -} - -/* ffecom_sym_retract -- Symbol's state being retracted from reality - - ffesymbol s; - ffecom_sym_retract(s); - - Does whatever the backend needs when a symbol is retracted after having - been backtrackable for a period of time. */ - -void -ffecom_sym_retract (ffesymbol s UNUSED) -{ - assert (!ffesymbol_retractable ()); - -#if 0 /* GCC doesn't commit any backtrackable sins, - so nothing needed here. */ - switch (ffesymbol_hook (s).state) - { - case 0: /* nothing happened yet. */ - break; - - case 1: /* exec transition happened. */ - break; - - case 2: /* learned happened. */ - break; - - case 3: /* learned then exec. */ - break; - - case 4: /* exec then learned. */ - break; - - default: - assert ("bad hook state" == NULL); - break; - } -#endif -} - -/* Create temporary gcc label. */ - -tree -ffecom_temp_label (void) -{ - tree glabel; - static int mynumber = 0; - - glabel = build_decl (LABEL_DECL, - ffecom_get_invented_identifier ("__g77_label_%d", - mynumber++), - void_type_node); - DECL_CONTEXT (glabel) = current_function_decl; - DECL_MODE (glabel) = VOIDmode; - - return glabel; -} - -/* Return an expression that is usable as an arg in a conditional context - (IF, DO WHILE, .NOT., and so on). - - Use the one provided for the back end as of >2.6.0. */ - -tree -ffecom_truth_value (tree expr) -{ - return ffe_truthvalue_conversion (expr); -} - -/* Return the inversion of a truth value (the inversion of what - ffecom_truth_value builds). - - Apparently invert_truthvalue, which is properly in the back end, is - enough for now, so just use it. */ - -tree -ffecom_truth_value_invert (tree expr) -{ - return invert_truthvalue (ffecom_truth_value (expr)); -} - -/* Return the tree that is the type of the expression, as would be - returned in TREE_TYPE(ffecom_expr(expr)), without otherwise - transforming the expression, generating temporaries, etc. */ - -tree -ffecom_type_expr (ffebld expr) -{ - ffeinfoBasictype bt; - ffeinfoKindtype kt; - tree tree_type; - - assert (expr != NULL); - - bt = ffeinfo_basictype (ffebld_info (expr)); - kt = ffeinfo_kindtype (ffebld_info (expr)); - tree_type = ffecom_tree_type[bt][kt]; - - switch (ffebld_op (expr)) - { - case FFEBLD_opCONTER: - case FFEBLD_opSYMTER: - case FFEBLD_opARRAYREF: - case FFEBLD_opUPLUS: - case FFEBLD_opPAREN: - case FFEBLD_opUMINUS: - case FFEBLD_opADD: - case FFEBLD_opSUBTRACT: - case FFEBLD_opMULTIPLY: - case FFEBLD_opDIVIDE: - case FFEBLD_opPOWER: - case FFEBLD_opNOT: - case FFEBLD_opFUNCREF: - case FFEBLD_opSUBRREF: - case FFEBLD_opAND: - case FFEBLD_opOR: - case FFEBLD_opXOR: - case FFEBLD_opNEQV: - case FFEBLD_opEQV: - case FFEBLD_opCONVERT: - case FFEBLD_opLT: - case FFEBLD_opLE: - case FFEBLD_opEQ: - case FFEBLD_opNE: - case FFEBLD_opGT: - case FFEBLD_opGE: - case FFEBLD_opPERCENT_LOC: - return tree_type; - - case FFEBLD_opACCTER: - case FFEBLD_opARRTER: - case FFEBLD_opITEM: - case FFEBLD_opSTAR: - case FFEBLD_opBOUNDS: - case FFEBLD_opREPEAT: - case FFEBLD_opLABTER: - case FFEBLD_opLABTOK: - case FFEBLD_opIMPDO: - case FFEBLD_opCONCATENATE: - case FFEBLD_opSUBSTR: - default: - assert ("bad op for ffecom_type_expr" == NULL); - /* Fall through. */ - case FFEBLD_opANY: - return error_mark_node; - } -} - -/* Return PARM_DECL for arg#1 of master fn containing alternate ENTRY points - - If the PARM_DECL already exists, return it, else create it. It's an - integer_type_node argument for the master function that implements a - subroutine or function with more than one entrypoint and is bound at - run time with the entrypoint number (0 for SUBROUTINE/FUNCTION, 1 for - first ENTRY statement, and so on). */ - -tree -ffecom_which_entrypoint_decl (void) -{ - assert (ffecom_which_entrypoint_decl_ != NULL_TREE); - - return ffecom_which_entrypoint_decl_; -} - -/* The following sections consists of private and public functions - that have the same names and perform roughly the same functions - as counterparts in the C front end. Changes in the C front end - might affect how things should be done here. Only functions - needed by the back end should be public here; the rest should - be private (static in the C sense). Functions needed by other - g77 front-end modules should be accessed by them via public - ffecom_* names, which should themselves call private versions - in this section so the private versions are easy to recognize - when upgrading to a new gcc and finding interesting changes - in the front end. - - Functions named after rule "foo:" in c-parse.y are named - "bison_rule_foo_" so they are easy to find. */ - -static void -bison_rule_pushlevel_ (void) -{ - emit_line_note (input_location); - pushlevel (0); - clear_last_expr (); - expand_start_bindings (0); -} - -static tree -bison_rule_compstmt_ (void) -{ - tree t; - int keep = kept_level_p (); - - /* Make the temps go away. */ - if (! keep) - current_binding_level->names = NULL_TREE; - - emit_line_note (input_location); - expand_end_bindings (getdecls (), keep, 0); - t = poplevel (keep, 1, 0); - - return t; -} - -/* Return a definition for a builtin function named NAME and whose data type - is TYPE. TYPE should be a function type with argument types. - FUNCTION_CODE tells later passes how to compile calls to this function. - See tree.h for its possible values. - - If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME, - the name to be called if we can't opencode the function. If - ATTRS is nonzero, use that for the function's attribute list. */ - -tree -builtin_function (const char *name, tree type, int function_code, - enum built_in_class class, const char *library_name, - tree attrs ATTRIBUTE_UNUSED) -{ - tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); - DECL_EXTERNAL (decl) = 1; - TREE_PUBLIC (decl) = 1; - if (library_name) - SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name)); - make_decl_rtl (decl, NULL); - pushdecl (decl); - DECL_BUILT_IN_CLASS (decl) = class; - DECL_FUNCTION_CODE (decl) = function_code; - - return decl; -} - -/* Handle when a new declaration NEWDECL - has the same name as an old one OLDDECL - in the same binding contour. - Prints an error message if appropriate. - - If safely possible, alter OLDDECL to look like NEWDECL, and return 1. - Otherwise, return 0. */ - -static int -duplicate_decls (tree newdecl, tree olddecl) -{ - int types_match = 1; - int new_is_definition = (TREE_CODE (newdecl) == FUNCTION_DECL - && DECL_INITIAL (newdecl) != 0); - tree oldtype = TREE_TYPE (olddecl); - tree newtype = TREE_TYPE (newdecl); - - if (olddecl == newdecl) - return 1; - - if (TREE_CODE (newtype) == ERROR_MARK - || TREE_CODE (oldtype) == ERROR_MARK) - types_match = 0; - - /* New decl is completely inconsistent with the old one => - tell caller to replace the old one. - This is always an error except in the case of shadowing a builtin. */ - if (TREE_CODE (olddecl) != TREE_CODE (newdecl)) - return 0; - - /* For real parm decl following a forward decl, - return 1 so old decl will be reused. */ - if (types_match && TREE_CODE (newdecl) == PARM_DECL - && TREE_ASM_WRITTEN (olddecl) && ! TREE_ASM_WRITTEN (newdecl)) - return 1; - - /* The new declaration is the same kind of object as the old one. - The declarations may partially match. Print warnings if they don't - match enough. Ultimately, copy most of the information from the new - decl to the old one, and keep using the old one. */ - - if (TREE_CODE (olddecl) == FUNCTION_DECL - && DECL_BUILT_IN (olddecl)) - { - /* A function declaration for a built-in function. */ - if (!TREE_PUBLIC (newdecl)) - return 0; - else if (!types_match) - { - /* Accept the return type of the new declaration if same modes. */ - tree oldreturntype = TREE_TYPE (TREE_TYPE (olddecl)); - tree newreturntype = TREE_TYPE (TREE_TYPE (newdecl)); - - if (TYPE_MODE (oldreturntype) == TYPE_MODE (newreturntype)) - { - /* Function types may be shared, so we can't just modify - the return type of olddecl's function type. */ - tree newtype - = build_function_type (newreturntype, - TYPE_ARG_TYPES (TREE_TYPE (olddecl))); - - types_match = 1; - if (types_match) - TREE_TYPE (olddecl) = newtype; - } - } - if (!types_match) - return 0; - } - else if (TREE_CODE (olddecl) == FUNCTION_DECL - && DECL_SOURCE_LINE (olddecl) == 0) - { - /* A function declaration for a predeclared function - that isn't actually built in. */ - if (!TREE_PUBLIC (newdecl)) - return 0; - else if (!types_match) - { - /* If the types don't match, preserve volatility indication. - Later on, we will discard everything else about the - default declaration. */ - TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl); - } - } - - /* Copy all the DECL_... slots specified in the new decl - except for any that we copy here from the old type. - - Past this point, we don't change OLDTYPE and NEWTYPE - even if we change the types of NEWDECL and OLDDECL. */ - - if (types_match) - { - /* Merge the data types specified in the two decls. */ - if (TREE_CODE (newdecl) != FUNCTION_DECL || !DECL_BUILT_IN (olddecl)) - TREE_TYPE (newdecl) - = TREE_TYPE (olddecl) - = TREE_TYPE (newdecl); - - /* Lay the type out, unless already done. */ - if (oldtype != TREE_TYPE (newdecl)) - { - if (TREE_TYPE (newdecl) != error_mark_node) - layout_type (TREE_TYPE (newdecl)); - if (TREE_CODE (newdecl) != FUNCTION_DECL - && TREE_CODE (newdecl) != TYPE_DECL - && TREE_CODE (newdecl) != CONST_DECL) - layout_decl (newdecl, 0); - } - else - { - /* Since the type is OLDDECL's, make OLDDECL's size go with. */ - DECL_SIZE (newdecl) = DECL_SIZE (olddecl); - DECL_SIZE_UNIT (newdecl) = DECL_SIZE_UNIT (olddecl); - if (TREE_CODE (olddecl) != FUNCTION_DECL) - if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) - { - DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); - DECL_USER_ALIGN (newdecl) |= DECL_USER_ALIGN (olddecl); - } - } - - /* Keep the old rtl since we can safely use it. */ - COPY_DECL_RTL (olddecl, newdecl); - - /* Merge the type qualifiers. */ - if (TREE_READONLY (newdecl)) - TREE_READONLY (olddecl) = 1; - if (TREE_THIS_VOLATILE (newdecl)) - { - TREE_THIS_VOLATILE (olddecl) = 1; - if (TREE_CODE (newdecl) == VAR_DECL) - make_var_volatile (newdecl); - } - - /* Keep source location of definition rather than declaration. - Likewise, keep decl at outer scope. */ - if ((DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0) - || (DECL_CONTEXT (newdecl) != 0 && DECL_CONTEXT (olddecl) == 0)) - { - DECL_SOURCE_LOCATION (newdecl) = DECL_SOURCE_LOCATION (olddecl); - - if (DECL_CONTEXT (olddecl) == 0 - && TREE_CODE (newdecl) != FUNCTION_DECL) - DECL_CONTEXT (newdecl) = 0; - } - - /* Merge the unused-warning information. */ - if (DECL_IN_SYSTEM_HEADER (olddecl)) - DECL_IN_SYSTEM_HEADER (newdecl) = 1; - else if (DECL_IN_SYSTEM_HEADER (newdecl)) - DECL_IN_SYSTEM_HEADER (olddecl) = 1; - - /* Merge the initialization information. */ - if (DECL_INITIAL (newdecl) == 0) - DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl); - - /* Merge the section attribute. - We want to issue an error if the sections conflict but that must be - done later in decl_attributes since we are called before attributes - are assigned. */ - if (DECL_SECTION_NAME (newdecl) == NULL_TREE) - DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl); - - /* Copy the assembler name. */ - COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl); - - if (TREE_CODE (newdecl) == FUNCTION_DECL) - { - DECL_STATIC_CONSTRUCTOR(newdecl) |= DECL_STATIC_CONSTRUCTOR(olddecl); - DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl); - TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl); - TREE_READONLY (newdecl) |= TREE_READONLY (olddecl); - DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl); - DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl); - } - } - /* If cannot merge, then use the new type and qualifiers, - and don't preserve the old rtl. */ - else - { - TREE_TYPE (olddecl) = TREE_TYPE (newdecl); - TREE_READONLY (olddecl) = TREE_READONLY (newdecl); - TREE_THIS_VOLATILE (olddecl) = TREE_THIS_VOLATILE (newdecl); - TREE_SIDE_EFFECTS (olddecl) = TREE_SIDE_EFFECTS (newdecl); - } - - /* Merge the storage class information. */ - /* For functions, static overrides non-static. */ - if (TREE_CODE (newdecl) == FUNCTION_DECL) - { - TREE_PUBLIC (newdecl) &= TREE_PUBLIC (olddecl); - /* This is since we don't automatically - copy the attributes of NEWDECL into OLDDECL. */ - TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl); - /* If this clears `static', clear it in the identifier too. */ - if (! TREE_PUBLIC (olddecl)) - TREE_PUBLIC (DECL_NAME (olddecl)) = 0; - } - if (DECL_EXTERNAL (newdecl)) - { - TREE_STATIC (newdecl) = TREE_STATIC (olddecl); - DECL_EXTERNAL (newdecl) = DECL_EXTERNAL (olddecl); - /* An extern decl does not override previous storage class. */ - TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl); - } - else - { - TREE_STATIC (olddecl) = TREE_STATIC (newdecl); - TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl); - } - - /* If either decl says `inline', this fn is inline, - unless its definition was passed already. */ - if (DECL_INLINE (newdecl) && DECL_INITIAL (olddecl) == 0) - DECL_INLINE (olddecl) = 1; - DECL_INLINE (newdecl) = DECL_INLINE (olddecl); - - /* Get rid of any built-in function if new arg types don't match it - or if we have a function definition. */ - if (TREE_CODE (newdecl) == FUNCTION_DECL - && DECL_BUILT_IN (olddecl) - && (!types_match || new_is_definition)) - { - TREE_TYPE (olddecl) = TREE_TYPE (newdecl); - DECL_BUILT_IN_CLASS (olddecl) = NOT_BUILT_IN; - } - - /* If redeclaring a builtin function, and not a definition, - it stays built in. - Also preserve various other info from the definition. */ - if (TREE_CODE (newdecl) == FUNCTION_DECL && !new_is_definition) - { - if (DECL_BUILT_IN (olddecl)) - { - DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl); - DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl); - } - - DECL_RESULT (newdecl) = DECL_RESULT (olddecl); - DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl); - DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl); - DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl); - } - - /* Copy most of the decl-specific fields of NEWDECL into OLDDECL. - But preserve olddecl's DECL_UID. */ - { - register unsigned olddecl_uid = DECL_UID (olddecl); - - memcpy ((char *) olddecl + sizeof (struct tree_common), - (char *) newdecl + sizeof (struct tree_common), - sizeof (struct tree_decl) - sizeof (struct tree_common)); - DECL_UID (olddecl) = olddecl_uid; - } - - return 1; -} - -/* Finish processing of a declaration; - install its initial value. - If the length of an array type is not known before, - it must be determined now, from the initial value, or it is an error. */ - -static void -finish_decl (tree decl, tree init, bool is_top_level) -{ - register tree type = TREE_TYPE (decl); - int was_incomplete = (DECL_SIZE (decl) == 0); - bool at_top_level = (current_binding_level == global_binding_level); - bool top_level = is_top_level || at_top_level; - - /* Caller should pass TRUE for is_top_level only if we wouldn't be at top - level anyway. */ - assert (!is_top_level || !at_top_level); - - if (TREE_CODE (decl) == PARM_DECL) - assert (init == NULL_TREE); - /* Remember that PARM_DECL doesn't have a DECL_INITIAL field per se -- it - overlaps DECL_ARG_TYPE. */ - else if (init == NULL_TREE) - assert (DECL_INITIAL (decl) == NULL_TREE); - else - assert (DECL_INITIAL (decl) == error_mark_node); - - if (init != NULL_TREE) - { - if (TREE_CODE (decl) != TYPE_DECL) - DECL_INITIAL (decl) = init; - else - { - /* typedef foo = bar; store the type of bar as the type of foo. */ - TREE_TYPE (decl) = TREE_TYPE (init); - DECL_INITIAL (decl) = init = 0; - } - } - - /* Deduce size of array from initialization, if not already known */ - - if (TREE_CODE (type) == ARRAY_TYPE - && TYPE_DOMAIN (type) == 0 - && TREE_CODE (decl) != TYPE_DECL) - { - assert (top_level); - assert (was_incomplete); - - layout_decl (decl, 0); - } - - if (TREE_CODE (decl) == VAR_DECL) - { - if (DECL_SIZE (decl) == NULL_TREE - && TYPE_SIZE (TREE_TYPE (decl)) != NULL_TREE) - layout_decl (decl, 0); - - if (DECL_SIZE (decl) == NULL_TREE - && (TREE_STATIC (decl) - ? - /* A static variable with an incomplete type is an error if it is - initialized. Also if it is not file scope. Otherwise, let it - through, but if it is not `extern' then it may cause an error - message later. */ - (DECL_INITIAL (decl) != 0 || DECL_CONTEXT (decl) != 0) - : - /* An automatic variable with an incomplete type is an error. */ - !DECL_EXTERNAL (decl))) - { - assert ("storage size not known" == NULL); - abort (); - } - - if ((DECL_EXTERNAL (decl) || TREE_STATIC (decl)) - && (DECL_SIZE (decl) != 0) - && (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST)) - { - assert ("storage size not constant" == NULL); - abort (); - } - } - - /* Output the assembler code and/or RTL code for variables and functions, - unless the type is an undefined structure or union. If not, it will get - done when the type is completed. */ - - if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL) - { - rest_of_decl_compilation (decl, NULL, - DECL_CONTEXT (decl) == 0, - 0); - - if (DECL_CONTEXT (decl) != 0) - { - /* Recompute the RTL of a local array now if it used to be an - incomplete type. */ - if (was_incomplete - && !TREE_STATIC (decl) && !DECL_EXTERNAL (decl)) - { - /* If we used it already as memory, it must stay in memory. */ - TREE_ADDRESSABLE (decl) = TREE_USED (decl); - /* If it's still incomplete now, no init will save it. */ - if (DECL_SIZE (decl) == 0) - DECL_INITIAL (decl) = 0; - expand_decl (decl); - } - /* Compute and store the initial value. */ - if (TREE_CODE (decl) != FUNCTION_DECL) - expand_decl_init (decl); - } - } - else if (TREE_CODE (decl) == TYPE_DECL) - { - rest_of_decl_compilation (decl, NULL, - DECL_CONTEXT (decl) == 0, - 0); - } - - /* At the end of a declaration, throw away any variable type sizes of types - defined inside that declaration. There is no use computing them in the - following function definition. */ - if (current_binding_level == global_binding_level) - get_pending_sizes (); -} - -/* Finish up a function declaration and compile that function - all the way to assembler language output. The free the storage - for the function definition. - - This is called after parsing the body of the function definition. - - NESTED is nonzero if the function being finished is nested in another. */ - -static void -finish_function (int nested) -{ - register tree fndecl = current_function_decl; - - assert (fndecl != NULL_TREE); - if (TREE_CODE (fndecl) != ERROR_MARK) - { - if (nested) - assert (DECL_CONTEXT (fndecl) != NULL_TREE); - else - assert (DECL_CONTEXT (fndecl) == NULL_TREE); - } - -/* TREE_READONLY (fndecl) = 1; - This caused &foo to be of type ptr-to-const-function - which then got a warning when stored in a ptr-to-function variable. */ - - poplevel (1, 0, 1); - - if (TREE_CODE (fndecl) != ERROR_MARK) - { - BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; - - /* Must mark the RESULT_DECL as being in this function. */ - - DECL_CONTEXT (DECL_RESULT (fndecl)) = fndecl; - - /* Obey `register' declarations if `setjmp' is called in this fn. */ - /* Generate rtl for function exit. */ - expand_function_end (); - - /* If this is a nested function, protect the local variables in the stack - above us from being collected while we're compiling this function. */ - if (nested) - ggc_push_context (); - - /* Run the optimizers and output the assembler code for this function. */ - rest_of_compilation (fndecl); - - /* Undo the GC context switch. */ - if (nested) - ggc_pop_context (); - } - - if (TREE_CODE (fndecl) != ERROR_MARK - && !nested - && DECL_SAVED_INSNS (fndecl) == 0) - { - /* 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_f_function_context. */ - /* If rest_of_compilation set this to 0, leave it 0. */ - if (DECL_INITIAL (fndecl) != 0) - DECL_INITIAL (fndecl) = error_mark_node; - DECL_ARGUMENTS (fndecl) = 0; - } - - if (!nested) - { - /* 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. */ - ffecom_outer_function_decl_ = current_function_decl = NULL; - } -} - -/* Plug-in replacement for identifying the name of a decl and, for a - function, what we call it in diagnostics. For now, "program unit" - should suffice, since it's a bit of a hassle to figure out which - of several kinds of things it is. Note that it could conceivably - be a statement function, which probably isn't really a program unit - per se, but if that comes up, it should be easy to check (being a - nested function and all). */ - -static const char * -ffe_printable_name (tree decl, int v) -{ - /* Just to keep GCC quiet about the unused variable. - In theory, differing values of V should produce different - output. */ - switch (v) - { - default: - if (TREE_CODE (decl) == ERROR_MARK) - return "erroneous code"; - return IDENTIFIER_POINTER (DECL_NAME (decl)); - } -} - -/* g77's function to print out name of current function that caused - an error. */ - -static void -ffe_print_error_function (diagnostic_context *context __attribute__((unused)), - const char *file) -{ - static ffeglobal last_g = NULL; - static ffesymbol last_s = NULL; - ffeglobal g; - ffesymbol s; - const char *kind; - - if ((ffecom_primary_entry_ == NULL) - || (ffesymbol_global (ffecom_primary_entry_) == NULL)) - { - g = NULL; - s = NULL; - kind = NULL; - } - else - { - g = ffesymbol_global (ffecom_primary_entry_); - if (ffecom_nested_entry_ == NULL) - { - s = ffecom_primary_entry_; - kind = _(ffeinfo_kind_message (ffesymbol_kind (s))); - } - else - { - s = ffecom_nested_entry_; - kind = _("In statement function"); - } - } - - if ((last_g != g) || (last_s != s)) - { - if (file) - fprintf (stderr, "%s: ", file); - - if (s == NULL) - fprintf (stderr, _("Outside of any program unit:\n")); - else - { - const char *name = ffesymbol_text (s); - - fprintf (stderr, "%s `%s':\n", kind, name); - } - - last_g = g; - last_s = s; - } -} - -/* Similar to `lookup_name' but look only at current binding level. */ - -static tree -lookup_name_current_level (tree name) -{ - register tree t; - - if (current_binding_level == global_binding_level) - return IDENTIFIER_GLOBAL_VALUE (name); - - if (IDENTIFIER_LOCAL_VALUE (name) == 0) - return 0; - - for (t = current_binding_level->names; t; t = TREE_CHAIN (t)) - if (DECL_NAME (t) == name) - break; - - return t; -} - -/* Create a new `struct f_binding_level'. */ - -static struct f_binding_level * -make_binding_level (void) -{ - /* NOSTRICT */ - return ggc_alloc (sizeof (struct f_binding_level)); -} - -/* Save and restore the variables in this file and elsewhere - that keep track of the progress of compilation of the current function. - Used for nested functions. */ - -struct f_function -{ - struct f_function *next; - tree named_labels; - tree shadowed_labels; - struct f_binding_level *binding_level; -}; - -struct f_function *f_function_chain; - -/* Restore the variables used during compilation of a C function. */ - -static void -pop_f_function_context (void) -{ - struct f_function *p = f_function_chain; - tree link; - - /* Bring back all the labels that were shadowed. */ - for (link = shadowed_labels; link; link = TREE_CHAIN (link)) - if (DECL_NAME (TREE_VALUE (link)) != 0) - IDENTIFIER_LABEL_VALUE (DECL_NAME (TREE_VALUE (link))) - = TREE_VALUE (link); - - if (current_function_decl != error_mark_node - && DECL_SAVED_INSNS (current_function_decl) == 0) - { - /* 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. */ - DECL_INITIAL (current_function_decl) = error_mark_node; - DECL_ARGUMENTS (current_function_decl) = 0; - } - - pop_function_context (); - - f_function_chain = p->next; - - named_labels = p->named_labels; - shadowed_labels = p->shadowed_labels; - current_binding_level = p->binding_level; - - free (p); -} - -/* Save and reinitialize the variables - used during compilation of a C function. */ - -static void -push_f_function_context (void) -{ - struct f_function *p = xmalloc (sizeof (struct f_function)); - - push_function_context (); - - p->next = f_function_chain; - f_function_chain = p; - - p->named_labels = named_labels; - p->shadowed_labels = shadowed_labels; - p->binding_level = current_binding_level; -} - -static void -push_parm_decl (tree parm) -{ - int old_immediate_size_expand = immediate_size_expand; - - /* Don't try computing parm sizes now -- wait till fn is called. */ - - immediate_size_expand = 0; - - /* Fill in arg stuff. */ - - DECL_ARG_TYPE (parm) = TREE_TYPE (parm); - DECL_ARG_TYPE_AS_WRITTEN (parm) = TREE_TYPE (parm); - TREE_READONLY (parm) = 1; /* All implementation args are read-only. */ - - parm = pushdecl (parm); - - immediate_size_expand = old_immediate_size_expand; - - finish_decl (parm, NULL_TREE, FALSE); -} - -/* Like pushdecl, only it places X in GLOBAL_BINDING_LEVEL, if appropriate. */ - -static tree -pushdecl_top_level (tree x) -{ - register tree t; - register struct f_binding_level *b = current_binding_level; - register tree f = current_function_decl; - - current_binding_level = global_binding_level; - current_function_decl = NULL_TREE; - t = pushdecl (x); - current_binding_level = b; - current_function_decl = f; - return t; -} - -/* Store the list of declarations of the current level. - This is done for the parameter declarations of a function being defined, - after they are modified in the light of any missing parameters. */ - -static tree -storedecls (tree decls) -{ - return current_binding_level->names = decls; -} - -/* Store the parameter declarations into the current function declaration. - This is called after parsing the parameter declarations, before - digesting the body of the function. - - For an old-style definition, modify the function's type - to specify at least the number of arguments. */ - -static void -store_parm_decls (int is_main_program UNUSED) -{ - register tree fndecl = current_function_decl; - - if (fndecl == error_mark_node) - return; - - /* This is a chain of PARM_DECLs from old-style parm declarations. */ - DECL_ARGUMENTS (fndecl) = storedecls (nreverse (getdecls ())); - - /* Initialize the RTL code for the function. */ - init_function_start (fndecl); - - /* Set up parameters and prepare for return, for the function. */ - expand_function_start (fndecl, 0); -} - -static tree -start_decl (tree decl, bool is_top_level) -{ - register tree tem; - bool at_top_level = (current_binding_level == global_binding_level); - bool top_level = is_top_level || at_top_level; - - /* Caller should pass TRUE for is_top_level only if we wouldn't be at top - level anyway. */ - assert (!is_top_level || !at_top_level); - - if (DECL_INITIAL (decl) != NULL_TREE) - { - assert (DECL_INITIAL (decl) == error_mark_node); - assert (!DECL_EXTERNAL (decl)); - } - else if (top_level) - assert ((TREE_STATIC (decl) == 1) || DECL_EXTERNAL (decl) == 1); - - /* For Fortran, we by default put things in .common when possible. */ - DECL_COMMON (decl) = 1; - - /* Add this decl to the current binding level. TEM may equal DECL or it may - be a previous decl of the same name. */ - if (is_top_level) - tem = pushdecl_top_level (decl); - else - tem = pushdecl (decl); - - /* For a local variable, define the RTL now. */ - if (!top_level - /* But not if this is a duplicate decl and we preserved the rtl from the - previous one (which may or may not happen). */ - && !DECL_RTL_SET_P (tem)) - { - if (TYPE_SIZE (TREE_TYPE (tem)) != 0) - expand_decl (tem); - else if (TREE_CODE (TREE_TYPE (tem)) == ARRAY_TYPE - && DECL_INITIAL (tem) != 0) - expand_decl (tem); - } - - return tem; -} - -/* Create the FUNCTION_DECL for a function definition. - DECLSPECS and DECLARATOR are the parts of the declaration; - they describe the function's name and the type it returns, - but twisted together in a fashion that parallels the syntax of C. - - This function creates a binding context for the function body - as well as setting up the FUNCTION_DECL in current_function_decl. - - Returns 1 on success. If the DECLARATOR is not suitable for a function - (it defines a datum instead), we return 0, which tells - ffe_parse_file to report a parse error. - - NESTED is nonzero for a function nested within another function. */ - -static void -start_function (tree name, tree type, int nested, int public) -{ - tree decl1; - tree restype; - int old_immediate_size_expand = immediate_size_expand; - - named_labels = 0; - shadowed_labels = 0; - - /* Don't expand any sizes in the return type of the function. */ - immediate_size_expand = 0; - - if (nested) - { - assert (!public); - assert (current_function_decl != NULL_TREE); - assert (DECL_CONTEXT (current_function_decl) == NULL_TREE); - } - else - { - assert (current_function_decl == NULL_TREE); - } - - if (TREE_CODE (type) == ERROR_MARK) - decl1 = current_function_decl = error_mark_node; - else - { - decl1 = build_decl (FUNCTION_DECL, - name, - type); - TREE_PUBLIC (decl1) = public ? 1 : 0; - if (nested) - DECL_INLINE (decl1) = 1; - TREE_STATIC (decl1) = 1; - DECL_EXTERNAL (decl1) = 0; - - announce_function (decl1); - - /* Make the init_value nonzero so pushdecl knows this is not tentative. - error_mark_node is replaced below (in poplevel) with the BLOCK. */ - DECL_INITIAL (decl1) = error_mark_node; - - /* Record the decl so that the function name is defined. If we already have - a decl for this name, and it is a FUNCTION_DECL, use the old decl. */ - - current_function_decl = pushdecl (decl1); - } - - if (!nested) - ffecom_outer_function_decl_ = current_function_decl; - - pushlevel (0); - current_binding_level->prep_state = 2; - - if (TREE_CODE (current_function_decl) != ERROR_MARK) - { - make_decl_rtl (current_function_decl, NULL); - - restype = TREE_TYPE (TREE_TYPE (current_function_decl)); - DECL_RESULT (current_function_decl) - = build_decl (RESULT_DECL, NULL_TREE, restype); - } - - if (!nested && (TREE_CODE (current_function_decl) != ERROR_MARK)) - TREE_ADDRESSABLE (current_function_decl) = 1; - - immediate_size_expand = old_immediate_size_expand; -} - -/* Here are the public functions the GNU back end needs. */ - -tree -convert (tree type, tree expr) -{ - register tree e = expr; - register enum tree_code code = TREE_CODE (type); - - if (type == TREE_TYPE (e) - || TREE_CODE (e) == ERROR_MARK) - return e; - if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (e))) - return fold (build1 (NOP_EXPR, type, e)); - if (TREE_CODE (TREE_TYPE (e)) == ERROR_MARK - || code == ERROR_MARK) - return error_mark_node; - if (TREE_CODE (TREE_TYPE (e)) == VOID_TYPE) - { - assert ("void value not ignored as it ought to be" == NULL); - return error_mark_node; - } - if (code == VOID_TYPE) - return build1 (CONVERT_EXPR, type, e); - if ((code != RECORD_TYPE) - && (TREE_CODE (TREE_TYPE (e)) == RECORD_TYPE)) - e = ffecom_1 (REALPART_EXPR, TREE_TYPE (TYPE_FIELDS (TREE_TYPE (e))), - e); - if (code == INTEGER_TYPE || code == ENUMERAL_TYPE) - return fold (convert_to_integer (type, e)); - if (code == POINTER_TYPE) - return fold (convert_to_pointer (type, e)); - if (code == REAL_TYPE) - return fold (convert_to_real (type, e)); - if (code == COMPLEX_TYPE) - return fold (convert_to_complex (type, e)); - if (code == RECORD_TYPE) - return fold (ffecom_convert_to_complex_ (type, e)); - - assert ("conversion to non-scalar type requested" == NULL); - return error_mark_node; -} - -/* Return the list of declarations of the current level. - Note that this list is in reverse order unless/until - you nreverse it; and when you do nreverse it, you must - store the result back using `storedecls' or you will lose. */ - -tree -getdecls (void) -{ - return current_binding_level->names; -} - -/* Nonzero if we are currently in the global binding level. */ - -int -global_bindings_p (void) -{ - return current_binding_level == global_binding_level; -} - -static void -ffecom_init_decl_processing (void) -{ - malloc_init (); - - ffe_init_0 (); -} - -/* Delete the node BLOCK from the current binding level. - This is used for the block inside a stmt expr ({...}) - so that the block can be reinserted where appropriate. */ - -static void -delete_block (tree block) -{ - tree t; - if (current_binding_level->blocks == block) - current_binding_level->blocks = TREE_CHAIN (block); - for (t = current_binding_level->blocks; t;) - { - if (TREE_CHAIN (t) == block) - TREE_CHAIN (t) = TREE_CHAIN (block); - else - t = TREE_CHAIN (t); - } - TREE_CHAIN (block) = NULL; - /* Clear TREE_USED which is always set by poplevel. - The flag is set again if insert_block is called. */ - TREE_USED (block) = 0; -} - -void -insert_block (tree block) -{ - TREE_USED (block) = 1; - current_binding_level->blocks - = chainon (current_binding_level->blocks, block); -} - -/* Each front end provides its own. */ -static bool ffe_init (void); -static void ffe_finish (void); -static bool ffe_post_options (const char **); -static void ffe_print_identifier (FILE *, tree, int); - -struct language_function GTY(()) -{ - int unused; -}; - -#undef LANG_HOOKS_NAME -#define LANG_HOOKS_NAME "GNU F77" -#undef LANG_HOOKS_INIT -#define LANG_HOOKS_INIT ffe_init -#undef LANG_HOOKS_FINISH -#define LANG_HOOKS_FINISH ffe_finish -#undef LANG_HOOKS_INIT_OPTIONS -#define LANG_HOOKS_INIT_OPTIONS ffe_init_options -#undef LANG_HOOKS_HANDLE_OPTION -#define LANG_HOOKS_HANDLE_OPTION ffe_handle_option -#undef LANG_HOOKS_POST_OPTIONS -#define LANG_HOOKS_POST_OPTIONS ffe_post_options -#undef LANG_HOOKS_PARSE_FILE -#define LANG_HOOKS_PARSE_FILE ffe_parse_file -#undef LANG_HOOKS_MARK_ADDRESSABLE -#define LANG_HOOKS_MARK_ADDRESSABLE ffe_mark_addressable -#undef LANG_HOOKS_PRINT_IDENTIFIER -#define LANG_HOOKS_PRINT_IDENTIFIER ffe_print_identifier -#undef LANG_HOOKS_DECL_PRINTABLE_NAME -#define LANG_HOOKS_DECL_PRINTABLE_NAME ffe_printable_name -#undef LANG_HOOKS_PRINT_ERROR_FUNCTION -#define LANG_HOOKS_PRINT_ERROR_FUNCTION ffe_print_error_function -#undef LANG_HOOKS_TRUTHVALUE_CONVERSION -#define LANG_HOOKS_TRUTHVALUE_CONVERSION ffe_truthvalue_conversion - -#undef LANG_HOOKS_TYPE_FOR_MODE -#define LANG_HOOKS_TYPE_FOR_MODE ffe_type_for_mode -#undef LANG_HOOKS_TYPE_FOR_SIZE -#define LANG_HOOKS_TYPE_FOR_SIZE ffe_type_for_size -#undef LANG_HOOKS_SIGNED_TYPE -#define LANG_HOOKS_SIGNED_TYPE ffe_signed_type -#undef LANG_HOOKS_UNSIGNED_TYPE -#define LANG_HOOKS_UNSIGNED_TYPE ffe_unsigned_type -#undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE -#define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE ffe_signed_or_unsigned_type - -/* We do not wish to use alias-set based aliasing at all. Used in the - extreme (every object with its own set, with equivalences recorded) it - might be helpful, but there are problems when it comes to inlining. We - get on ok with flag_argument_noalias, and alias-set aliasing does - currently limit how stack slots can be reused, which is a lose. */ -#undef LANG_HOOKS_GET_ALIAS_SET -#define LANG_HOOKS_GET_ALIAS_SET hook_get_alias_set_0 - -const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; - -/* Table indexed by tree code giving a string containing a character - classifying the tree code. Possibilities are - t, d, s, c, r, <, 1, 2 and e. See tree.def for details. */ - -#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, - -const char tree_code_type[] = { -#include "tree.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" -}; -#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" -}; -#undef DEFTREECODE - -static bool -ffe_post_options (const char **pfilename) -{ - const char *filename = *pfilename; - - /* Open input file. */ - if (filename == 0 || !strcmp (filename, "-")) - { - finput = stdin; - filename = "stdin"; - } - else - finput = fopen (filename, "r"); - - if (finput == 0) - fatal_error ("can't open %s: %m", filename); - - return false; -} - - -static bool -ffe_init (void) -{ -#ifdef IO_BUFFER_SIZE - setvbuf (finput, xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); -#endif - - ffecom_init_decl_processing (); - - /* If the file is output from cpp, it should contain a first line - `# 1 "real-filename"', and the current design of gcc (toplev.c - in particular and the way it sets up information relied on by - INCLUDE) requires that we read this now, and store the - "real-filename" info in master_input_filename. Ask the lexer - to try doing this. */ - ffelex_hash_kludge (finput); - - push_srcloc (input_filename, 0); - - /* FIXME: The ffelex_hash_kludge code needs to be cleaned up to - set the new file name. Maybe in ffe_post_options. */ - return true; -} - -static void -ffe_finish (void) -{ - ffe_terminate_0 (); - - if (ffe_is_ffedebug ()) - malloc_pool_display (malloc_pool_image ()); - - fclose (finput); -} - -static bool -ffe_mark_addressable (tree exp) -{ - register tree x = exp; - while (1) - switch (TREE_CODE (x)) - { - case ADDR_EXPR: - case COMPONENT_REF: - case ARRAY_REF: - x = TREE_OPERAND (x, 0); - break; - - case CONSTRUCTOR: - TREE_ADDRESSABLE (x) = 1; - return true; - - case VAR_DECL: - case CONST_DECL: - case PARM_DECL: - case RESULT_DECL: - if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x) - && DECL_NONLOCAL (x)) - { - if (TREE_PUBLIC (x)) - { - assert ("address of global register var requested" == NULL); - return false; - } - assert ("address of register variable requested" == NULL); - } - else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)) - { - if (TREE_PUBLIC (x)) - { - assert ("address of global register var requested" == NULL); - return false; - } - assert ("address of register var requested" == NULL); - } - put_var_into_stack (x, /*rescan=*/true); - - /* drops in */ - case FUNCTION_DECL: - TREE_ADDRESSABLE (x) = 1; -#if 0 /* poplevel deals with this now. */ - if (DECL_CONTEXT (x) == 0) - TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1; -#endif - - default: - return true; - } -} - -/* Exit a binding level. - Pop the level off, and restore the state of the identifier-decl mappings - that were in effect when this level was entered. - - If KEEP is nonzero, this level had explicit declarations, so - and create a "block" (a BLOCK node) for the level - to record its declarations and subblocks for symbol table output. - - If FUNCTIONBODY is nonzero, this level is the body of a function, - so create a block as if KEEP were set and also clear out all - label names. - - If REVERSE is nonzero, reverse the order of decls before putting - them into the BLOCK. */ - -tree -poplevel (int keep, int reverse, int functionbody) -{ - register tree link; - /* The chain of decls was accumulated in reverse order. - Put it into forward order, just for cleanliness. */ - tree decls; - tree subblocks = current_binding_level->blocks; - tree block = 0; - tree decl; - int block_previously_created; - - /* Get the decls in the order they were written. - Usually current_binding_level->names is in reverse order. - But parameter decls were previously put in forward order. */ - - if (reverse) - current_binding_level->names - = decls = nreverse (current_binding_level->names); - else - decls = current_binding_level->names; - - /* Output any nested inline functions within this block - if they weren't already output. */ - - for (decl = decls; decl; decl = TREE_CHAIN (decl)) - if (TREE_CODE (decl) == FUNCTION_DECL - && ! TREE_ASM_WRITTEN (decl) - && DECL_INITIAL (decl) != 0 - && TREE_ADDRESSABLE (decl)) - { - /* If this decl was copied from a file-scope decl - on account of a block-scope extern decl, - propagate TREE_ADDRESSABLE to the file-scope decl. - - DECL_ABSTRACT_ORIGIN can be set to itself if warn_return_type is - true, since then the decl goes through save_for_inline_copying. */ - if (DECL_ABSTRACT_ORIGIN (decl) != 0 - && DECL_ABSTRACT_ORIGIN (decl) != decl) - TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1; - else if (DECL_SAVED_INSNS (decl) != 0) - { - push_function_context (); - output_inline_function (decl); - pop_function_context (); - } - } - - /* If there were any declarations or structure tags in that level, - or if this level is a function body, - create a BLOCK to record them for the life of this function. */ - - block = 0; - block_previously_created = (current_binding_level->this_block != 0); - if (block_previously_created) - block = current_binding_level->this_block; - else if (keep || functionbody) - block = make_node (BLOCK); - if (block != 0) - { - BLOCK_VARS (block) = decls; - BLOCK_SUBBLOCKS (block) = subblocks; - } - - /* In each subblock, record that this is its superior. */ - - for (link = subblocks; link; link = TREE_CHAIN (link)) - BLOCK_SUPERCONTEXT (link) = block; - - /* Clear out the meanings of the local variables of this level. */ - - for (link = decls; link; link = TREE_CHAIN (link)) - { - if (DECL_NAME (link) != 0) - { - /* If the ident. was used or addressed via a local extern decl, - don't forget that fact. */ - if (DECL_EXTERNAL (link)) - { - if (TREE_USED (link)) - TREE_USED (DECL_NAME (link)) = 1; - if (TREE_ADDRESSABLE (link)) - TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (link)) = 1; - } - IDENTIFIER_LOCAL_VALUE (DECL_NAME (link)) = 0; - } - } - - /* If the level being exited is the top level of a function, - check over all the labels, and clear out the current - (function local) meanings of their names. */ - - if (functionbody) - { - /* If this is the top level block of a function, - the vars are the function's parameters. - Don't leave them in the BLOCK because they are - found in the FUNCTION_DECL instead. */ - - BLOCK_VARS (block) = 0; - } - - /* Pop the current level, and free the structure for reuse. */ - - { - register struct f_binding_level *level = current_binding_level; - current_binding_level = current_binding_level->level_chain; - - level->level_chain = free_binding_level; - free_binding_level = level; - } - - /* Dispose of the block that we just made inside some higher level. */ - if (functionbody - && current_function_decl != error_mark_node) - DECL_INITIAL (current_function_decl) = block; - else if (block) - { - if (!block_previously_created) - current_binding_level->blocks - = chainon (current_binding_level->blocks, block); - } - /* If we did not make a block for the level just exited, - any blocks made for inner levels - (since they cannot be recorded as subblocks in that level) - must be carried forward so they will later become subblocks - of something else. */ - else if (subblocks) - current_binding_level->blocks - = chainon (current_binding_level->blocks, subblocks); - - if (block) - TREE_USED (block) = 1; - return block; -} - -static void -ffe_print_identifier (FILE *file, tree node, int indent) -{ - print_node (file, "global", IDENTIFIER_GLOBAL_VALUE (node), indent + 4); - print_node (file, "local", IDENTIFIER_LOCAL_VALUE (node), indent + 4); -} - -/* Record a decl-node X as belonging to the current lexical scope. - Check for errors (such as an incompatible declaration for the same - name already seen in the same scope). - - Returns either X or an old decl for the same name. - If an old decl is returned, it may have been smashed - to agree with what X says. */ - -tree -pushdecl (tree x) -{ - register tree t; - register tree name = DECL_NAME (x); - register struct f_binding_level *b = current_binding_level; - - if ((TREE_CODE (x) == FUNCTION_DECL) - && (DECL_INITIAL (x) == 0) - && DECL_EXTERNAL (x)) - DECL_CONTEXT (x) = NULL_TREE; - else - DECL_CONTEXT (x) = current_function_decl; - - if (name) - { - if (IDENTIFIER_INVENTED (name)) - { - DECL_ARTIFICIAL (x) = 1; - DECL_IN_SYSTEM_HEADER (x) = 1; - } - - t = lookup_name_current_level (name); - - assert ((t == NULL_TREE) || (DECL_CONTEXT (x) == NULL_TREE)); - - /* Don't push non-parms onto list for parms until we understand - why we're doing this and whether it works. */ - - assert ((b == global_binding_level) - || !ffecom_transform_only_dummies_ - || TREE_CODE (x) == PARM_DECL); - - if ((t != NULL_TREE) && duplicate_decls (x, t)) - return t; - - /* If we are processing a typedef statement, generate a whole new - ..._TYPE node (which will be just an variant of the existing - ..._TYPE node with identical properties) and then install the - TYPE_DECL node generated to represent the typedef name as the - TYPE_NAME of this brand new (duplicate) ..._TYPE node. - - The whole point here is to end up with a situation where each and every - ..._TYPE node the compiler creates will be uniquely associated with - AT MOST one node representing a typedef name. This way, even though - the compiler substitutes corresponding ..._TYPE nodes for TYPE_DECL - (i.e. "typedef name") nodes very early on, later parts of the - compiler can always do the reverse translation and get back the - corresponding typedef name. For example, given: - - typedef struct S MY_TYPE; MY_TYPE object; - - Later parts of the compiler might only know that `object' was of type - `struct S' if it were not for code just below. With this code - however, later parts of the compiler see something like: - - struct S' == struct S typedef struct S' MY_TYPE; struct S' object; - - And they can then deduce (from the node for type struct S') that the - original object declaration was: - - MY_TYPE object; - - Being able to do this is important for proper support of protoize, and - also for generating precise symbolic debugging information which - takes full account of the programmer's (typedef) vocabulary. - - Obviously, we don't want to generate a duplicate ..._TYPE node if the - TYPE_DECL node that we are now processing really represents a - standard built-in type. - - Since all standard types are effectively declared at line zero in the - source file, we can easily check to see if we are working on a - standard type by checking the current value of lineno. */ - - if (TREE_CODE (x) == TYPE_DECL) - { - if (DECL_SOURCE_LINE (x) == 0) - { - if (TYPE_NAME (TREE_TYPE (x)) == 0) - TYPE_NAME (TREE_TYPE (x)) = x; - } - else if (TREE_TYPE (x) != error_mark_node) - { - tree tt = TREE_TYPE (x); - - tt = build_type_copy (tt); - TYPE_NAME (tt) = x; - TREE_TYPE (x) = tt; - } - } - - /* This name is new in its binding level. Install the new declaration - and return it. */ - if (b == global_binding_level) - IDENTIFIER_GLOBAL_VALUE (name) = x; - else - IDENTIFIER_LOCAL_VALUE (name) = x; - } - - /* Put decls on list in reverse order. We will reverse them later if - necessary. */ - TREE_CHAIN (x) = b->names; - b->names = x; - - return x; -} - -/* Nonzero if the current level needs to have a BLOCK made. */ - -static int -kept_level_p (void) -{ - tree decl; - - for (decl = current_binding_level->names; - decl; - decl = TREE_CHAIN (decl)) - { - if (TREE_USED (decl) || TREE_CODE (decl) != VAR_DECL - || (DECL_NAME (decl) && ! DECL_ARTIFICIAL (decl))) - /* Currently, there aren't supposed to be non-artificial names - at other than the top block for a function -- they're - believed to always be temps. But it's wise to check anyway. */ - return 1; - } - return 0; -} - -/* Enter a new binding level. - If TAG_TRANSPARENT is nonzero, do so only for the name space of variables, - not for that of tags. */ - -void -pushlevel (int tag_transparent) -{ - register struct f_binding_level *newlevel = NULL_BINDING_LEVEL; - - assert (! tag_transparent); - - if (current_binding_level == global_binding_level) - { - named_labels = 0; - } - - /* Reuse or create a struct for this binding level. */ - - if (free_binding_level) - { - newlevel = free_binding_level; - free_binding_level = free_binding_level->level_chain; - } - else - { - newlevel = make_binding_level (); - } - - /* Add this level to the front of the chain (stack) of levels that - are active. */ - - *newlevel = clear_binding_level; - newlevel->level_chain = current_binding_level; - current_binding_level = newlevel; -} - -/* Set the BLOCK node for the innermost scope - (the one we are currently in). */ - -void -set_block (tree block) -{ - current_binding_level->this_block = block; - current_binding_level->names = chainon (current_binding_level->names, - BLOCK_VARS (block)); - current_binding_level->blocks = chainon (current_binding_level->blocks, - BLOCK_SUBBLOCKS (block)); -} - -static tree -ffe_signed_or_unsigned_type (int unsignedp, tree type) -{ - tree type2; - - if (! INTEGRAL_TYPE_P (type)) - return type; - if (TYPE_PRECISION (type) == TYPE_PRECISION (signed_char_type_node)) - return unsignedp ? unsigned_char_type_node : signed_char_type_node; - if (TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node)) - return unsignedp ? unsigned_type_node : integer_type_node; - if (TYPE_PRECISION (type) == TYPE_PRECISION (short_integer_type_node)) - return unsignedp ? short_unsigned_type_node : short_integer_type_node; - if (TYPE_PRECISION (type) == TYPE_PRECISION (long_integer_type_node)) - return unsignedp ? long_unsigned_type_node : long_integer_type_node; - if (TYPE_PRECISION (type) == TYPE_PRECISION (long_long_integer_type_node)) - return (unsignedp ? long_long_unsigned_type_node - : long_long_integer_type_node); - - type2 = ffe_type_for_size (TYPE_PRECISION (type), unsignedp); - if (type2 == NULL_TREE) - return type; - - return type2; -} - -static tree -ffe_signed_type (tree type) -{ - tree type1 = TYPE_MAIN_VARIANT (type); - ffeinfoKindtype kt; - tree type2; - - if (type1 == unsigned_char_type_node || type1 == char_type_node) - return signed_char_type_node; - if (type1 == unsigned_type_node) - return integer_type_node; - if (type1 == short_unsigned_type_node) - return short_integer_type_node; - if (type1 == long_unsigned_type_node) - return long_integer_type_node; - if (type1 == long_long_unsigned_type_node) - return long_long_integer_type_node; -#if 0 /* gcc/c-* files only */ - if (type1 == unsigned_intDI_type_node) - return intDI_type_node; - if (type1 == unsigned_intSI_type_node) - return intSI_type_node; - if (type1 == unsigned_intHI_type_node) - return intHI_type_node; - if (type1 == unsigned_intQI_type_node) - return intQI_type_node; -#endif - - type2 = ffe_type_for_size (TYPE_PRECISION (type1), 0); - if (type2 != NULL_TREE) - return type2; - - for (kt = 0; kt < ARRAY_SIZE (ffecom_tree_type[0]); ++kt) - { - type2 = ffecom_tree_type[FFEINFO_basictypeHOLLERITH][kt]; - - if (type1 == type2) - return ffecom_tree_type[FFEINFO_basictypeINTEGER][kt]; - } - - return type; -} - -/* Prepare expr to be an argument of a TRUTH_NOT_EXPR, - or validate its data type for an `if' or `while' statement or ?..: exp. - - This preparation consists of taking the ordinary - representation of an expression expr and producing a valid tree - boolean expression describing whether expr is nonzero. We could - simply always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1), - but we optimize comparisons, &&, ||, and !. - - The resulting type should always be `integer_type_node'. */ - -static tree -ffe_truthvalue_conversion (tree expr) -{ - if (TREE_CODE (expr) == ERROR_MARK) - return expr; - -#if 0 /* This appears to be wrong for C++. */ - /* These really should return error_mark_node after 2.4 is stable. - But not all callers handle ERROR_MARK properly. */ - switch (TREE_CODE (TREE_TYPE (expr))) - { - case RECORD_TYPE: - error ("struct type value used where scalar is required"); - return integer_zero_node; - - case UNION_TYPE: - error ("union type value used where scalar is required"); - return integer_zero_node; - - case ARRAY_TYPE: - error ("array type value used where scalar is required"); - return integer_zero_node; - - default: - break; - } -#endif /* 0 */ - - switch (TREE_CODE (expr)) - { - /* It is simpler and generates better code to have only TRUTH_*_EXPR - or comparison expressions as truth values at this level. */ -#if 0 - case COMPONENT_REF: - /* A one-bit unsigned bit-field is already acceptable. */ - if (1 == TREE_INT_CST_LOW (DECL_SIZE (TREE_OPERAND (expr, 1))) - && TREE_UNSIGNED (TREE_OPERAND (expr, 1))) - return expr; - break; -#endif - - case EQ_EXPR: - /* It is simpler and generates better code to have only TRUTH_*_EXPR - or comparison expressions as truth values at this level. */ -#if 0 - if (integer_zerop (TREE_OPERAND (expr, 1))) - return build_unary_op (TRUTH_NOT_EXPR, TREE_OPERAND (expr, 0), 0); -#endif - case NE_EXPR: case LE_EXPR: case GE_EXPR: case LT_EXPR: case GT_EXPR: - case TRUTH_ANDIF_EXPR: - case TRUTH_ORIF_EXPR: - case TRUTH_AND_EXPR: - case TRUTH_OR_EXPR: - case TRUTH_XOR_EXPR: - TREE_TYPE (expr) = integer_type_node; - return expr; - - case ERROR_MARK: - return expr; - - case INTEGER_CST: - return integer_zerop (expr) ? integer_zero_node : integer_one_node; - - case REAL_CST: - return real_zerop (expr) ? integer_zero_node : integer_one_node; - - case ADDR_EXPR: - if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 0))) - return build (COMPOUND_EXPR, integer_type_node, - TREE_OPERAND (expr, 0), integer_one_node); - else - return integer_one_node; - - case COMPLEX_EXPR: - return ffecom_2 ((TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1)) - ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), - integer_type_node, - ffe_truthvalue_conversion (TREE_OPERAND (expr, 0)), - ffe_truthvalue_conversion (TREE_OPERAND (expr, 1))); - - case NEGATE_EXPR: - case ABS_EXPR: - case FLOAT_EXPR: - /* These don't change whether an object is nonzero or zero. */ - return ffe_truthvalue_conversion (TREE_OPERAND (expr, 0)); - - case LROTATE_EXPR: - case RROTATE_EXPR: - /* These don't change whether an object is zero or nonzero, but - we can't ignore them if their second arg has side-effects. */ - if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))) - return build (COMPOUND_EXPR, integer_type_node, TREE_OPERAND (expr, 1), - ffe_truthvalue_conversion (TREE_OPERAND (expr, 0))); - else - return ffe_truthvalue_conversion (TREE_OPERAND (expr, 0)); - - case COND_EXPR: - { - /* Distribute the conversion into the arms of a COND_EXPR. */ - tree arg1 = TREE_OPERAND (expr, 1); - tree arg2 = TREE_OPERAND (expr, 2); - if (! VOID_TYPE_P (TREE_TYPE (arg1))) - arg1 = ffe_truthvalue_conversion (arg1); - if (! VOID_TYPE_P (TREE_TYPE (arg2))) - arg2 = ffe_truthvalue_conversion (arg2); - return fold (build (COND_EXPR, integer_type_node, - TREE_OPERAND (expr, 0), arg1, arg2)); - } - - case CONVERT_EXPR: - /* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE, - since that affects how `default_conversion' will behave. */ - if (TREE_CODE (TREE_TYPE (expr)) == REFERENCE_TYPE - || TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == REFERENCE_TYPE) - break; - /* fall through... */ - case NOP_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 ffe_truthvalue_conversion (TREE_OPERAND (expr, 0)); - break; - - case MINUS_EXPR: - /* With IEEE arithmetic, x - x may not equal 0, so we can't optimize - this case. */ - if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT - && TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE) - break; - /* fall through... */ - case BIT_XOR_EXPR: - /* This and MINUS_EXPR can be changed into a comparison of the - two objects. */ - if (TREE_TYPE (TREE_OPERAND (expr, 0)) - == TREE_TYPE (TREE_OPERAND (expr, 1))) - return ffecom_2 (NE_EXPR, integer_type_node, - TREE_OPERAND (expr, 0), - TREE_OPERAND (expr, 1)); - return ffecom_2 (NE_EXPR, integer_type_node, - TREE_OPERAND (expr, 0), - fold (build1 (NOP_EXPR, - TREE_TYPE (TREE_OPERAND (expr, 0)), - TREE_OPERAND (expr, 1)))); - - case BIT_AND_EXPR: - if (integer_onep (TREE_OPERAND (expr, 1))) - return expr; - break; - - case MODIFY_EXPR: -#if 0 /* No such thing in Fortran. */ - if (warn_parentheses && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR) - warning ("suggest parentheses around assignment used as truth value"); -#endif - break; - - default: - break; - } - - if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE) - return (ffecom_2 - ((TREE_SIDE_EFFECTS (expr) - ? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR), - integer_type_node, - ffe_truthvalue_conversion (ffecom_1 (REALPART_EXPR, - TREE_TYPE (TREE_TYPE (expr)), - expr)), - ffe_truthvalue_conversion (ffecom_1 (IMAGPART_EXPR, - TREE_TYPE (TREE_TYPE (expr)), - expr)))); - - return ffecom_2 (NE_EXPR, integer_type_node, - expr, - convert (TREE_TYPE (expr), integer_zero_node)); -} - -static tree -ffe_type_for_mode (enum machine_mode mode, int unsignedp) -{ - int i; - int j; - tree t; - - if (mode == TYPE_MODE (integer_type_node)) - return unsignedp ? unsigned_type_node : integer_type_node; - - if (mode == TYPE_MODE (signed_char_type_node)) - return unsignedp ? unsigned_char_type_node : signed_char_type_node; - - if (mode == TYPE_MODE (short_integer_type_node)) - return unsignedp ? short_unsigned_type_node : short_integer_type_node; - - if (mode == TYPE_MODE (long_integer_type_node)) - return unsignedp ? long_unsigned_type_node : long_integer_type_node; - - if (mode == TYPE_MODE (long_long_integer_type_node)) - return unsignedp ? long_long_unsigned_type_node : long_long_integer_type_node; - -#if HOST_BITS_PER_WIDE_INT >= 64 - if (mode == TYPE_MODE (intTI_type_node)) - return unsignedp ? unsigned_intTI_type_node : intTI_type_node; -#endif - - if (mode == TYPE_MODE (float_type_node)) - return float_type_node; - - if (mode == TYPE_MODE (double_type_node)) - return double_type_node; - - if (mode == TYPE_MODE (long_double_type_node)) - return long_double_type_node; - - if (mode == TYPE_MODE (build_pointer_type (char_type_node))) - return build_pointer_type (char_type_node); - - if (mode == TYPE_MODE (build_pointer_type (integer_type_node))) - return build_pointer_type (integer_type_node); - - for (i = 0; ((size_t) i) < ARRAY_SIZE (ffecom_tree_type); ++i) - for (j = 0; ((size_t) j) < ARRAY_SIZE (ffecom_tree_type[0]); ++j) - { - if (((t = ffecom_tree_type[i][j]) != NULL_TREE) - && (mode == TYPE_MODE (t))) - { - if ((i == FFEINFO_basictypeINTEGER) && unsignedp) - return ffecom_tree_type[FFEINFO_basictypeHOLLERITH][j]; - else - return t; - } - } - - return 0; -} - -static tree -ffe_type_for_size (unsigned bits, int unsignedp) -{ - ffeinfoKindtype kt; - tree type_node; - - if (bits == TYPE_PRECISION (integer_type_node)) - return unsignedp ? unsigned_type_node : integer_type_node; - - if (bits == TYPE_PRECISION (signed_char_type_node)) - return unsignedp ? unsigned_char_type_node : signed_char_type_node; - - if (bits == TYPE_PRECISION (short_integer_type_node)) - return unsignedp ? short_unsigned_type_node : short_integer_type_node; - - if (bits == TYPE_PRECISION (long_integer_type_node)) - return unsignedp ? long_unsigned_type_node : long_integer_type_node; - - if (bits == TYPE_PRECISION (long_long_integer_type_node)) - return (unsignedp ? long_long_unsigned_type_node - : long_long_integer_type_node); - - for (kt = 0; kt < ARRAY_SIZE (ffecom_tree_type[0]); ++kt) - { - type_node = ffecom_tree_type[FFEINFO_basictypeINTEGER][kt]; - - if ((type_node != NULL_TREE) && (bits == TYPE_PRECISION (type_node))) - return unsignedp ? ffecom_tree_type[FFEINFO_basictypeHOLLERITH][kt] - : type_node; - } - - return 0; -} - -static tree -ffe_unsigned_type (tree type) -{ - tree type1 = TYPE_MAIN_VARIANT (type); - ffeinfoKindtype kt; - tree type2; - - if (type1 == signed_char_type_node || type1 == char_type_node) - return unsigned_char_type_node; - if (type1 == integer_type_node) - return unsigned_type_node; - if (type1 == short_integer_type_node) - return short_unsigned_type_node; - if (type1 == long_integer_type_node) - return long_unsigned_type_node; - if (type1 == long_long_integer_type_node) - return long_long_unsigned_type_node; -#if 0 /* gcc/c-* files only */ - if (type1 == intDI_type_node) - return unsigned_intDI_type_node; - if (type1 == intSI_type_node) - return unsigned_intSI_type_node; - if (type1 == intHI_type_node) - return unsigned_intHI_type_node; - if (type1 == intQI_type_node) - return unsigned_intQI_type_node; -#endif - - type2 = ffe_type_for_size (TYPE_PRECISION (type1), 1); - if (type2 != NULL_TREE) - return type2; - - for (kt = 0; kt < ARRAY_SIZE (ffecom_tree_type[0]); ++kt) - { - type2 = ffecom_tree_type[FFEINFO_basictypeINTEGER][kt]; - - if (type1 == type2) - return ffecom_tree_type[FFEINFO_basictypeHOLLERITH][kt]; - } - - return type; -} - -/* From gcc/cccp.c, the code to handle -I. */ - -/* Skip leading "./" from a directory name. - This may yield the empty string, which represents the current directory. */ - -static const char * -skip_redundant_dir_prefix (const char *dir) -{ - while (dir[0] == '.' && dir[1] == '/') - for (dir += 2; *dir == '/'; dir++) - continue; - if (dir[0] == '.' && !dir[1]) - dir++; - return dir; -} - -/* The file_name_map structure holds a mapping of file names for a - particular directory. This mapping is read from the file named - FILE_NAME_MAP_FILE in that directory. Such a file can be used to - map filenames on a file system with severe filename restrictions, - such as DOS. The format of the file name map file is just a series - of lines with two tokens on each line. The first token is the name - to map, and the second token is the actual name to use. */ - -struct file_name_map -{ - struct file_name_map *map_next; - char *map_from; - char *map_to; -}; - -#define FILE_NAME_MAP_FILE "header.gcc" - -/* Current maximum length of directory names in the search path - for include files. (Altered as we get more of them.) */ - -static int max_include_len = 0; - -struct file_name_list - { - struct file_name_list *next; - const char *fname; - /* Mapping of file names for this directory. */ - struct file_name_map *name_map; - /* Nonzero if name_map is valid. */ - int got_name_map; - }; - -static struct file_name_list *include = NULL; /* First dir to search */ -static struct file_name_list *last_include = NULL; /* Last in chain */ - -/* I/O buffer structure. - The `fname' field is nonzero for source files and #include files - and for the dummy text used for -D and -U. - It is zero for rescanning results of macro expansion - and for expanding macro arguments. */ -#define INPUT_STACK_MAX 400 -static struct file_buf { - const char *fname; - /* Filename specified with #line command. */ - const char *nominal_fname; - /* Record where in the search path this file was found. - For #include_next. */ - struct file_name_list *dir; - ffewhereLine line; - ffewhereColumn column; -} instack[INPUT_STACK_MAX]; - -static int last_error_tick = 0; /* Incremented each time we print it. */ - -/* Current nesting level of input sources. - `instack[indepth]' is the level currently being read. */ -static int indepth = -1; - -typedef struct file_buf FILE_BUF; - -/* Nonzero means -I- has been seen, - so don't look for #include "foo" the source-file directory. */ -static int ignore_srcdir; - -#ifndef INCLUDE_LEN_FUDGE -#define INCLUDE_LEN_FUDGE 0 -#endif - -static void append_include_chain (struct file_name_list *first, - struct file_name_list *last); -static FILE *open_include_file (char *filename, - struct file_name_list *searchptr); -static void print_containing_files (ffebadSeverity sev); -static char *read_filename_string (int ch, FILE *f); -static struct file_name_map *read_name_map (const char *dirname); - -/* Append a chain of `struct file_name_list's - to the end of the main include chain. - FIRST is the beginning of the chain to append, and LAST is the end. */ - -static void -append_include_chain (struct file_name_list *first, - struct file_name_list *last) -{ - struct file_name_list *dir; - - if (!first || !last) - return; - - if (include == 0) - include = first; - else - last_include->next = first; - - for (dir = first; ; dir = dir->next) { - int len = strlen (dir->fname) + INCLUDE_LEN_FUDGE; - if (len > max_include_len) - max_include_len = len; - if (dir == last) - break; - } - - last->next = NULL; - last_include = last; -} - -/* Try to open include file FILENAME. SEARCHPTR is the directory - being tried from the include file search path. This function maps - filenames on file systems based on information read by - read_name_map. */ - -static FILE * -open_include_file (char *filename, struct file_name_list *searchptr) -{ - register struct file_name_map *map; - register char *from; - char *p, *dir; - - if (searchptr && ! searchptr->got_name_map) - { - searchptr->name_map = read_name_map (searchptr->fname - ? searchptr->fname : "."); - searchptr->got_name_map = 1; - } - - /* First check the mapping for the directory we are using. */ - if (searchptr && searchptr->name_map) - { - from = filename; - if (searchptr->fname) - from += strlen (searchptr->fname) + 1; - for (map = searchptr->name_map; map; map = map->map_next) - { - if (! strcmp (map->map_from, from)) - { - /* Found a match. */ - return fopen (map->map_to, "r"); - } - } - } - - /* Try to find a mapping file for the particular directory we are - looking in. Thus #include will look up sys/types.h - in /usr/include/header.gcc and look up types.h in - /usr/include/sys/header.gcc. */ - p = strrchr (filename, '/'); -#ifdef DIR_SEPARATOR - if (! p) p = strrchr (filename, DIR_SEPARATOR); - else { - char *tmp = strrchr (filename, DIR_SEPARATOR); - if (tmp != NULL && tmp > p) p = tmp; - } -#endif - if (! p) - p = filename; - if (searchptr - && searchptr->fname - && strlen (searchptr->fname) == (size_t) (p - filename) - && ! strncmp (searchptr->fname, filename, (int) (p - filename))) - { - /* FILENAME is in SEARCHPTR, which we've already checked. */ - return fopen (filename, "r"); - } - - if (p == filename) - { - from = filename; - map = read_name_map ("."); - } - else - { - dir = xmalloc (p - filename + 1); - memcpy (dir, filename, p - filename); - dir[p - filename] = '\0'; - from = p + 1; - map = read_name_map (dir); - free (dir); - } - for (; map; map = map->map_next) - if (! strcmp (map->map_from, from)) - return fopen (map->map_to, "r"); - - return fopen (filename, "r"); -} - -/* Print the file names and line numbers of the #include - commands which led to the current file. */ - -static void -print_containing_files (ffebadSeverity sev) -{ - FILE_BUF *ip = NULL; - int i; - int first = 1; - const char *str1; - const char *str2; - - /* If stack of files hasn't changed since we last printed - this info, don't repeat it. */ - if (last_error_tick == input_file_stack_tick) - return; - - for (i = indepth; i >= 0; i--) - if (instack[i].fname != NULL) { - ip = &instack[i]; - break; - } - - /* Give up if we don't find a source file. */ - if (ip == NULL) - return; - - /* Find the other, outer source files. */ - for (i--; i >= 0; i--) - if (instack[i].fname != NULL) - { - ip = &instack[i]; - if (first) - { - first = 0; - str1 = "In file included"; - } - else - { - str1 = "... ..."; - } - - if (i == 1) - str2 = ":"; - else - str2 = ""; - - /* xgettext:no-c-format */ - ffebad_start_msg ("%A from %B at %0%C", sev); - ffebad_here (0, ip->line, ip->column); - ffebad_string (str1); - ffebad_string (ip->nominal_fname); - ffebad_string (str2); - ffebad_finish (); - } - - /* Record we have printed the status as of this time. */ - last_error_tick = input_file_stack_tick; -} - -/* Read a space delimited string of unlimited length from a stdio - file. */ - -static char * -read_filename_string (int ch, FILE *f) -{ - char *alloc, *set; - int len; - - len = 20; - set = alloc = xmalloc (len + 1); - if (! ISSPACE (ch)) - { - *set++ = ch; - while ((ch = getc (f)) != EOF && ! ISSPACE (ch)) - { - if (set - alloc == len) - { - len *= 2; - alloc = xrealloc (alloc, len + 1); - set = alloc + len / 2; - } - *set++ = ch; - } - } - *set = '\0'; - ungetc (ch, f); - return alloc; -} - -/* Read the file name map file for DIRNAME. */ - -static struct file_name_map * -read_name_map (const char *dirname) -{ - /* This structure holds a linked list of file name maps, one per - directory. */ - struct file_name_map_list - { - struct file_name_map_list *map_list_next; - char *map_list_name; - struct file_name_map *map_list_map; - }; - static struct file_name_map_list *map_list; - register struct file_name_map_list *map_list_ptr; - char *name; - FILE *f; - size_t dirlen; - int separator_needed; - - dirname = skip_redundant_dir_prefix (dirname); - - for (map_list_ptr = map_list; map_list_ptr; - map_list_ptr = map_list_ptr->map_list_next) - if (! strcmp (map_list_ptr->map_list_name, dirname)) - return map_list_ptr->map_list_map; - - map_list_ptr = xmalloc (sizeof (struct file_name_map_list)); - map_list_ptr->map_list_name = xstrdup (dirname); - map_list_ptr->map_list_map = NULL; - - dirlen = strlen (dirname); - separator_needed = dirlen != 0 && dirname[dirlen - 1] != '/'; - if (separator_needed) - name = concat (dirname, "/", FILE_NAME_MAP_FILE, NULL); - else - name = concat (dirname, FILE_NAME_MAP_FILE, NULL); - f = fopen (name, "r"); - free (name); - if (!f) - map_list_ptr->map_list_map = NULL; - else - { - int ch; - - while ((ch = getc (f)) != EOF) - { - char *from, *to; - struct file_name_map *ptr; - - if (ISSPACE (ch)) - continue; - from = read_filename_string (ch, f); - while ((ch = getc (f)) != EOF && ISSPACE (ch) && ch != '\n') - ; - to = read_filename_string (ch, f); - - ptr = xmalloc (sizeof (struct file_name_map)); - ptr->map_from = from; - - /* Make the real filename absolute. */ - if (*to == '/') - ptr->map_to = to; - else - { - if (separator_needed) - ptr->map_to = concat (dirname, "/", to, NULL); - else - ptr->map_to = concat (dirname, to, NULL); - free (to); - } - - ptr->map_next = map_list_ptr->map_list_map; - map_list_ptr->map_list_map = ptr; - - while ((ch = getc (f)) != '\n') - if (ch == EOF) - break; - } - fclose (f); - } - - map_list_ptr->map_list_next = map_list; - map_list = map_list_ptr; - - return map_list_ptr->map_list_map; -} - -static void -ffecom_file_ (const char *name) -{ - FILE_BUF *fp; - - /* Do partial setup of input buffer for the sake of generating - early #line directives (when -g is in effect). */ - - fp = &instack[++indepth]; - memset (fp, 0, sizeof (FILE_BUF)); - if (name == NULL) - name = ""; - fp->nominal_fname = fp->fname = name; -} - -static void -ffecom_close_include_ (FILE *f) -{ - fclose (f); - - indepth--; - input_file_stack_tick++; - - ffewhere_line_kill (instack[indepth].line); - ffewhere_column_kill (instack[indepth].column); -} - -void -ffecom_decode_include_option (const char *dir) -{ - if (! ignore_srcdir && !strcmp (dir, "-")) - ignore_srcdir = 1; - else - { - struct file_name_list *dirtmp - = xmalloc (sizeof (struct file_name_list)); - dirtmp->next = 0; /* New one goes on the end */ - dirtmp->fname = dir; - dirtmp->got_name_map = 0; - append_include_chain (dirtmp, dirtmp); - } -} - -/* Open INCLUDEd file. */ - -static FILE * -ffecom_open_include_ (char *name, ffewhereLine l, ffewhereColumn c) -{ - char *fbeg = name; - size_t flen = strlen (fbeg); - struct file_name_list *search_start = include; /* Chain of dirs to search */ - struct file_name_list dsp[1]; /* First in chain, if #include "..." */ - struct file_name_list *searchptr = 0; - char *fname; /* Dynamically allocated fname buffer */ - FILE *f; - FILE_BUF *fp; - - if (flen == 0) - return NULL; - - dsp[0].fname = NULL; - - /* If -I- was specified, don't search current dir, only spec'd ones. */ - if (!ignore_srcdir) - { - for (fp = &instack[indepth]; fp >= instack; fp--) - { - int n; - char *ep; - const char *nam; - - if ((nam = fp->nominal_fname) != NULL) - { - /* Found a named file. Figure out dir of the file, - and put it in front of the search list. */ - dsp[0].next = search_start; - search_start = dsp; -#ifndef VMS - ep = strrchr (nam, '/'); -#ifdef DIR_SEPARATOR - if (ep == NULL) ep = strrchr (nam, DIR_SEPARATOR); - else { - char *tmp = strrchr (nam, DIR_SEPARATOR); - if (tmp != NULL && tmp > ep) ep = tmp; - } -#endif -#else /* VMS */ - ep = strrchr (nam, ']'); - if (ep == NULL) ep = strrchr (nam, '>'); - if (ep == NULL) ep = strrchr (nam, ':'); - if (ep != NULL) ep++; -#endif /* VMS */ - if (ep != NULL) - { - n = ep - nam; - fname = xmalloc (n + 1); - strncpy (fname, nam, n); - fname[n] = '\0'; - dsp[0].fname = fname; - if (n + INCLUDE_LEN_FUDGE > max_include_len) - max_include_len = n + INCLUDE_LEN_FUDGE; - } - else - dsp[0].fname = NULL; /* Current directory */ - dsp[0].got_name_map = 0; - break; - } - } - } - - /* Allocate this permanently, because it gets stored in the definitions - of macros. */ - fname = xmalloc (max_include_len + flen + 4); - /* + 2 above for slash and terminating null. */ - /* + 2 added for '.h' on VMS (to support '#include filename') (NOT USED - for g77 yet). */ - - /* If specified file name is absolute, just open it. */ - - if (*fbeg == '/' -#ifdef DIR_SEPARATOR - || *fbeg == DIR_SEPARATOR -#endif - ) - { - strncpy (fname, (char *) fbeg, flen); - fname[flen] = 0; - f = open_include_file (fname, NULL); - } - else - { - f = NULL; - - /* Search directory path, trying to open the file. - Copy each filename tried into FNAME. */ - - for (searchptr = search_start; searchptr; searchptr = searchptr->next) - { - if (searchptr->fname) - { - /* The empty string in a search path is ignored. - This makes it possible to turn off entirely - a standard piece of the list. */ - if (searchptr->fname[0] == 0) - continue; - strcpy (fname, skip_redundant_dir_prefix (searchptr->fname)); - if (fname[0] && fname[strlen (fname) - 1] != '/') - strcat (fname, "/"); - fname[strlen (fname) + flen] = 0; - } - else - fname[0] = 0; - - strncat (fname, fbeg, flen); -#ifdef VMS - /* Change this 1/2 Unix 1/2 VMS file specification into a - full VMS file specification */ - if (searchptr->fname && (searchptr->fname[0] != 0)) - { - /* Fix up the filename */ - hack_vms_include_specification (fname); - } - else - { - /* This is a normal VMS filespec, so use it unchanged. */ - strncpy (fname, (char *) fbeg, flen); - fname[flen] = 0; -#if 0 /* Not for g77. */ - /* if it's '#include filename', add the missing .h */ - if (strchr (fname, '.') == NULL) - strcat (fname, ".h"); -#endif - } -#endif /* VMS */ - f = open_include_file (fname, searchptr); -#ifdef EACCES - if (f == NULL && errno == EACCES) - { - print_containing_files (FFEBAD_severityWARNING); - /* xgettext:no-c-format */ - ffebad_start_msg ("At %0, INCLUDE file %A exists, but is not readable", - FFEBAD_severityWARNING); - ffebad_string (fname); - ffebad_here (0, l, c); - ffebad_finish (); - } -#endif - if (f != NULL) - break; - } - } - - if (f == NULL) - { - /* A file that was not found. */ - - strncpy (fname, (char *) fbeg, flen); - fname[flen] = 0; - print_containing_files (ffebad_severity (FFEBAD_OPEN_INCLUDE)); - ffebad_start (FFEBAD_OPEN_INCLUDE); - ffebad_here (0, l, c); - ffebad_string (fname); - ffebad_finish (); - } - - if (dsp[0].fname != NULL) - free ((char *) dsp[0].fname); - - if (f == NULL) - return NULL; - - if (indepth >= (INPUT_STACK_MAX - 1)) - { - print_containing_files (FFEBAD_severityFATAL); - /* xgettext:no-c-format */ - ffebad_start_msg ("At %0, INCLUDE nesting too deep", - FFEBAD_severityFATAL); - ffebad_string (fname); - ffebad_here (0, l, c); - ffebad_finish (); - return NULL; - } - - instack[indepth].line = ffewhere_line_use (l); - instack[indepth].column = ffewhere_column_use (c); - - fp = &instack[indepth + 1]; - memset (fp, 0, sizeof (FILE_BUF)); - fp->nominal_fname = fp->fname = fname; - fp->dir = searchptr; - - indepth++; - input_file_stack_tick++; - - return f; -} - -/**INDENT* (Do not reformat this comment even with -fca option.) - Data-gathering files: Given the source file listed below, compiled with - f2c I obtained the output file listed after that, and from the output - file I derived the above code. - --------- (begin input file to f2c) - implicit none - character*10 A1,A2 - complex C1,C2 - integer I1,I2 - real R1,R2 - double precision D1,D2 -C - call getem(A1,A2,C1,C2,I1,I2,R1,R2,D1,D2) -c / - call fooI(I1/I2) - call fooR(R1/I1) - call fooD(D1/I1) - call fooC(C1/I1) - call fooR(R1/R2) - call fooD(R1/D1) - call fooD(D1/D2) - call fooD(D1/R1) - call fooC(C1/C2) - call fooC(C1/R1) - call fooZ(C1/D1) -c ** - call fooI(I1**I2) - call fooR(R1**I1) - call fooD(D1**I1) - call fooC(C1**I1) - call fooR(R1**R2) - call fooD(R1**D1) - call fooD(D1**D2) - call fooD(D1**R1) - call fooC(C1**C2) - call fooC(C1**R1) - call fooZ(C1**D1) -c FFEINTRIN_impABS - call fooR(ABS(R1)) -c FFEINTRIN_impACOS - call fooR(ACOS(R1)) -c FFEINTRIN_impAIMAG - call fooR(AIMAG(C1)) -c FFEINTRIN_impAINT - call fooR(AINT(R1)) -c FFEINTRIN_impALOG - call fooR(ALOG(R1)) -c FFEINTRIN_impALOG10 - call fooR(ALOG10(R1)) -c FFEINTRIN_impAMAX0 - call fooR(AMAX0(I1,I2)) -c FFEINTRIN_impAMAX1 - call fooR(AMAX1(R1,R2)) -c FFEINTRIN_impAMIN0 - call fooR(AMIN0(I1,I2)) -c FFEINTRIN_impAMIN1 - call fooR(AMIN1(R1,R2)) -c FFEINTRIN_impAMOD - call fooR(AMOD(R1,R2)) -c FFEINTRIN_impANINT - call fooR(ANINT(R1)) -c FFEINTRIN_impASIN - call fooR(ASIN(R1)) -c FFEINTRIN_impATAN - call fooR(ATAN(R1)) -c FFEINTRIN_impATAN2 - call fooR(ATAN2(R1,R2)) -c FFEINTRIN_impCABS - call fooR(CABS(C1)) -c FFEINTRIN_impCCOS - call fooC(CCOS(C1)) -c FFEINTRIN_impCEXP - call fooC(CEXP(C1)) -c FFEINTRIN_impCHAR - call fooA(CHAR(I1)) -c FFEINTRIN_impCLOG - call fooC(CLOG(C1)) -c FFEINTRIN_impCONJG - call fooC(CONJG(C1)) -c FFEINTRIN_impCOS - call fooR(COS(R1)) -c FFEINTRIN_impCOSH - call fooR(COSH(R1)) -c FFEINTRIN_impCSIN - call fooC(CSIN(C1)) -c FFEINTRIN_impCSQRT - call fooC(CSQRT(C1)) -c FFEINTRIN_impDABS - call fooD(DABS(D1)) -c FFEINTRIN_impDACOS - call fooD(DACOS(D1)) -c FFEINTRIN_impDASIN - call fooD(DASIN(D1)) -c FFEINTRIN_impDATAN - call fooD(DATAN(D1)) -c FFEINTRIN_impDATAN2 - call fooD(DATAN2(D1,D2)) -c FFEINTRIN_impDCOS - call fooD(DCOS(D1)) -c FFEINTRIN_impDCOSH - call fooD(DCOSH(D1)) -c FFEINTRIN_impDDIM - call fooD(DDIM(D1,D2)) -c FFEINTRIN_impDEXP - call fooD(DEXP(D1)) -c FFEINTRIN_impDIM - call fooR(DIM(R1,R2)) -c FFEINTRIN_impDINT - call fooD(DINT(D1)) -c FFEINTRIN_impDLOG - call fooD(DLOG(D1)) -c FFEINTRIN_impDLOG10 - call fooD(DLOG10(D1)) -c FFEINTRIN_impDMAX1 - call fooD(DMAX1(D1,D2)) -c FFEINTRIN_impDMIN1 - call fooD(DMIN1(D1,D2)) -c FFEINTRIN_impDMOD - call fooD(DMOD(D1,D2)) -c FFEINTRIN_impDNINT - call fooD(DNINT(D1)) -c FFEINTRIN_impDPROD - call fooD(DPROD(R1,R2)) -c FFEINTRIN_impDSIGN - call fooD(DSIGN(D1,D2)) -c FFEINTRIN_impDSIN - call fooD(DSIN(D1)) -c FFEINTRIN_impDSINH - call fooD(DSINH(D1)) -c FFEINTRIN_impDSQRT - call fooD(DSQRT(D1)) -c FFEINTRIN_impDTAN - call fooD(DTAN(D1)) -c FFEINTRIN_impDTANH - call fooD(DTANH(D1)) -c FFEINTRIN_impEXP - call fooR(EXP(R1)) -c FFEINTRIN_impIABS - call fooI(IABS(I1)) -c FFEINTRIN_impICHAR - call fooI(ICHAR(A1)) -c FFEINTRIN_impIDIM - call fooI(IDIM(I1,I2)) -c FFEINTRIN_impIDNINT - call fooI(IDNINT(D1)) -c FFEINTRIN_impINDEX - call fooI(INDEX(A1,A2)) -c FFEINTRIN_impISIGN - call fooI(ISIGN(I1,I2)) -c FFEINTRIN_impLEN - call fooI(LEN(A1)) -c FFEINTRIN_impLGE - call fooL(LGE(A1,A2)) -c FFEINTRIN_impLGT - call fooL(LGT(A1,A2)) -c FFEINTRIN_impLLE - call fooL(LLE(A1,A2)) -c FFEINTRIN_impLLT - call fooL(LLT(A1,A2)) -c FFEINTRIN_impMAX0 - call fooI(MAX0(I1,I2)) -c FFEINTRIN_impMAX1 - call fooI(MAX1(R1,R2)) -c FFEINTRIN_impMIN0 - call fooI(MIN0(I1,I2)) -c FFEINTRIN_impMIN1 - call fooI(MIN1(R1,R2)) -c FFEINTRIN_impMOD - call fooI(MOD(I1,I2)) -c FFEINTRIN_impNINT - call fooI(NINT(R1)) -c FFEINTRIN_impSIGN - call fooR(SIGN(R1,R2)) -c FFEINTRIN_impSIN - call fooR(SIN(R1)) -c FFEINTRIN_impSINH - call fooR(SINH(R1)) -c FFEINTRIN_impSQRT - call fooR(SQRT(R1)) -c FFEINTRIN_impTAN - call fooR(TAN(R1)) -c FFEINTRIN_impTANH - call fooR(TANH(R1)) -c FFEINTRIN_imp_CMPLX_C - call fooC(cmplx(C1,C2)) -c FFEINTRIN_imp_CMPLX_D - call fooZ(cmplx(D1,D2)) -c FFEINTRIN_imp_CMPLX_I - call fooC(cmplx(I1,I2)) -c FFEINTRIN_imp_CMPLX_R - call fooC(cmplx(R1,R2)) -c FFEINTRIN_imp_DBLE_C - call fooD(dble(C1)) -c FFEINTRIN_imp_DBLE_D - call fooD(dble(D1)) -c FFEINTRIN_imp_DBLE_I - call fooD(dble(I1)) -c FFEINTRIN_imp_DBLE_R - call fooD(dble(R1)) -c FFEINTRIN_imp_INT_C - call fooI(int(C1)) -c FFEINTRIN_imp_INT_D - call fooI(int(D1)) -c FFEINTRIN_imp_INT_I - call fooI(int(I1)) -c FFEINTRIN_imp_INT_R - call fooI(int(R1)) -c FFEINTRIN_imp_REAL_C - call fooR(real(C1)) -c FFEINTRIN_imp_REAL_D - call fooR(real(D1)) -c FFEINTRIN_imp_REAL_I - call fooR(real(I1)) -c FFEINTRIN_imp_REAL_R - call fooR(real(R1)) -c -c FFEINTRIN_imp_INT_D: -c -c FFEINTRIN_specIDINT - call fooI(IDINT(D1)) -c -c FFEINTRIN_imp_INT_R: -c -c FFEINTRIN_specIFIX - call fooI(IFIX(R1)) -c FFEINTRIN_specINT - call fooI(INT(R1)) -c -c FFEINTRIN_imp_REAL_D: -c -c FFEINTRIN_specSNGL - call fooR(SNGL(D1)) -c -c FFEINTRIN_imp_REAL_I: -c -c FFEINTRIN_specFLOAT - call fooR(FLOAT(I1)) -c FFEINTRIN_specREAL - call fooR(REAL(I1)) -c - end --------- (end input file to f2c) - --------- (begin output from providing above input file as input to: --------- `f2c | gcc -E -C - | sed -e "s:/[*]*://:g" -e "s:[*]*[/]://:g" \ --------- -e "s:^#.*$::g"') - -// -- translated by f2c (version 19950223). - You must link the resulting object file with the libraries: - -lf2c -lm (in that order) -// - - -// f2c.h -- Standard Fortran to C header file // - -/// barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." - - - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) // - - - - -// F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems // -// we assume short, float are OK // -typedef long int // long int // integer; -typedef char *address; -typedef short int shortint; -typedef float real; -typedef double doublereal; -typedef struct { real r, i; } complex; -typedef struct { doublereal r, i; } doublecomplex; -typedef long int // long int // logical; -typedef short int shortlogical; -typedef char logical1; -typedef char integer1; -// typedef long long longint; // // system-dependent // - - - - -// Extern is for use with -E // - - - - -// I/O stuff // - - - - - - - - -typedef long int // int or long int // flag; -typedef long int // int or long int // ftnlen; -typedef long int // int or long int // ftnint; - - -//external read, write// -typedef struct -{ flag cierr; - ftnint ciunit; - flag ciend; - char *cifmt; - ftnint cirec; -} cilist; - -//internal read, write// -typedef struct -{ flag icierr; - char *iciunit; - flag iciend; - char *icifmt; - ftnint icirlen; - ftnint icirnum; -} icilist; - -//open// -typedef struct -{ flag oerr; - ftnint ounit; - char *ofnm; - ftnlen ofnmlen; - char *osta; - char *oacc; - char *ofm; - ftnint orl; - char *oblnk; -} olist; - -//close// -typedef struct -{ flag cerr; - ftnint cunit; - char *csta; -} cllist; - -//rewind, backspace, endfile// -typedef struct -{ flag aerr; - ftnint aunit; -} alist; - -// inquire // -typedef struct -{ flag inerr; - ftnint inunit; - char *infile; - ftnlen infilen; - ftnint *inex; //parameters in standard's order// - ftnint *inopen; - ftnint *innum; - ftnint *innamed; - char *inname; - ftnlen innamlen; - char *inacc; - ftnlen inacclen; - char *inseq; - ftnlen inseqlen; - char *indir; - ftnlen indirlen; - char *infmt; - ftnlen infmtlen; - char *inform; - ftnint informlen; - char *inunf; - ftnlen inunflen; - ftnint *inrecl; - ftnint *innrec; - char *inblank; - ftnlen inblanklen; -} inlist; - - - -union Multitype { // for multiple entry points // - integer1 g; - shortint h; - integer i; - // longint j; // - real r; - doublereal d; - complex c; - doublecomplex z; - }; - -typedef union Multitype Multitype; - -typedef long Long; // No longer used; formerly in Namelist // - -struct Vardesc { // for Namelist // - char *name; - char *addr; - ftnlen *dims; - int type; - }; -typedef struct Vardesc Vardesc; - -struct Namelist { - char *name; - Vardesc **vars; - int nvars; - }; -typedef struct Namelist Namelist; - - - - - - - - -// procedure parameter types for -A and -C++ // - - - - -typedef int // Unknown procedure type // (*U_fp)(); -typedef shortint (*J_fp)(); -typedef integer (*I_fp)(); -typedef real (*R_fp)(); -typedef doublereal (*D_fp)(), (*E_fp)(); -typedef // Complex // void (*C_fp)(); -typedef // Double Complex // void (*Z_fp)(); -typedef logical (*L_fp)(); -typedef shortlogical (*K_fp)(); -typedef // Character // void (*H_fp)(); -typedef // Subroutine // int (*S_fp)(); - -// E_fp is for real functions when -R is not specified // -typedef void C_f; // complex function // -typedef void H_f; // character function // -typedef void Z_f; // double complex function // -typedef doublereal E_f; // real function with -R not specified // - -// undef any lower-case symbols that your C compiler predefines, e.g.: // - - -// (No such symbols should be defined in a strict ANSI C compiler. - We can avoid trouble with f2c-translated code by using - gcc -ansi.) // - - - - - - - - - - - - - - - - - - - - - - - -// Main program // MAIN__() -{ - // System generated locals // - integer i__1; - real r__1, r__2; - doublereal d__1, d__2; - complex q__1; - doublecomplex z__1, z__2, z__3; - logical L__1; - char ch__1[1]; - - // Builtin functions // - void c_div(); - integer pow_ii(); - double pow_ri(), pow_di(); - void pow_ci(); - double pow_dd(); - void pow_zz(); - double acos(), r_imag(), r_int(), log(), r_lg10(), r_mod(), r_nint(), - asin(), atan(), atan2(), c_abs(); - void c_cos(), c_exp(), c_log(), r_cnjg(); - double cos(), cosh(); - void c_sin(), c_sqrt(); - double d_dim(), exp(), r_dim(), d_int(), d_lg10(), d_mod(), d_nint(), - d_sign(), sin(), sinh(), sqrt(), tan(), tanh(); - integer i_dim(), i_dnnt(), i_indx(), i_sign(), i_len(); - logical l_ge(), l_gt(), l_le(), l_lt(); - integer i_nint(); - double r_sign(); - - // Local variables // - extern // Subroutine // int fooa_(), fooc_(), food_(), fooi_(), foor_(), - fool_(), fooz_(), getem_(); - static char a1[10], a2[10]; - static complex c1, c2; - static doublereal d1, d2; - static integer i1, i2; - static real r1, r2; - - - getem_(a1, a2, &c1, &c2, &i1, &i2, &r1, &r2, &d1, &d2, 10L, 10L); -// / // - i__1 = i1 / i2; - fooi_(&i__1); - r__1 = r1 / i1; - foor_(&r__1); - d__1 = d1 / i1; - food_(&d__1); - d__1 = (doublereal) i1; - q__1.r = c1.r / d__1, q__1.i = c1.i / d__1; - fooc_(&q__1); - r__1 = r1 / r2; - foor_(&r__1); - d__1 = r1 / d1; - food_(&d__1); - d__1 = d1 / d2; - food_(&d__1); - d__1 = d1 / r1; - food_(&d__1); - c_div(&q__1, &c1, &c2); - fooc_(&q__1); - q__1.r = c1.r / r1, q__1.i = c1.i / r1; - fooc_(&q__1); - z__1.r = c1.r / d1, z__1.i = c1.i / d1; - fooz_(&z__1); -// ** // - i__1 = pow_ii(&i1, &i2); - fooi_(&i__1); - r__1 = pow_ri(&r1, &i1); - foor_(&r__1); - d__1 = pow_di(&d1, &i1); - food_(&d__1); - pow_ci(&q__1, &c1, &i1); - fooc_(&q__1); - d__1 = (doublereal) r1; - d__2 = (doublereal) r2; - r__1 = pow_dd(&d__1, &d__2); - foor_(&r__1); - d__2 = (doublereal) r1; - d__1 = pow_dd(&d__2, &d1); - food_(&d__1); - d__1 = pow_dd(&d1, &d2); - food_(&d__1); - d__2 = (doublereal) r1; - d__1 = pow_dd(&d1, &d__2); - food_(&d__1); - z__2.r = c1.r, z__2.i = c1.i; - z__3.r = c2.r, z__3.i = c2.i; - pow_zz(&z__1, &z__2, &z__3); - q__1.r = z__1.r, q__1.i = z__1.i; - fooc_(&q__1); - z__2.r = c1.r, z__2.i = c1.i; - z__3.r = r1, z__3.i = 0.; - pow_zz(&z__1, &z__2, &z__3); - q__1.r = z__1.r, q__1.i = z__1.i; - fooc_(&q__1); - z__2.r = c1.r, z__2.i = c1.i; - z__3.r = d1, z__3.i = 0.; - pow_zz(&z__1, &z__2, &z__3); - fooz_(&z__1); -// FFEINTRIN_impABS // - r__1 = (doublereal)(( r1 ) >= 0 ? ( r1 ) : -( r1 )) ; - foor_(&r__1); -// FFEINTRIN_impACOS // - r__1 = acos(r1); - foor_(&r__1); -// FFEINTRIN_impAIMAG // - r__1 = r_imag(&c1); - foor_(&r__1); -// FFEINTRIN_impAINT // - r__1 = r_int(&r1); - foor_(&r__1); -// FFEINTRIN_impALOG // - r__1 = log(r1); - foor_(&r__1); -// FFEINTRIN_impALOG10 // - r__1 = r_lg10(&r1); - foor_(&r__1); -// FFEINTRIN_impAMAX0 // - r__1 = (real) (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ; - foor_(&r__1); -// FFEINTRIN_impAMAX1 // - r__1 = (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 )) ; - foor_(&r__1); -// FFEINTRIN_impAMIN0 // - r__1 = (real) (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ; - foor_(&r__1); -// FFEINTRIN_impAMIN1 // - r__1 = (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 )) ; - foor_(&r__1); -// FFEINTRIN_impAMOD // - r__1 = r_mod(&r1, &r2); - foor_(&r__1); -// FFEINTRIN_impANINT // - r__1 = r_nint(&r1); - foor_(&r__1); -// FFEINTRIN_impASIN // - r__1 = asin(r1); - foor_(&r__1); -// FFEINTRIN_impATAN // - r__1 = atan(r1); - foor_(&r__1); -// FFEINTRIN_impATAN2 // - r__1 = atan2(r1, r2); - foor_(&r__1); -// FFEINTRIN_impCABS // - r__1 = c_abs(&c1); - foor_(&r__1); -// FFEINTRIN_impCCOS // - c_cos(&q__1, &c1); - fooc_(&q__1); -// FFEINTRIN_impCEXP // - c_exp(&q__1, &c1); - fooc_(&q__1); -// FFEINTRIN_impCHAR // - *(unsigned char *)&ch__1[0] = i1; - fooa_(ch__1, 1L); -// FFEINTRIN_impCLOG // - c_log(&q__1, &c1); - fooc_(&q__1); -// FFEINTRIN_impCONJG // - r_cnjg(&q__1, &c1); - fooc_(&q__1); -// FFEINTRIN_impCOS // - r__1 = cos(r1); - foor_(&r__1); -// FFEINTRIN_impCOSH // - r__1 = cosh(r1); - foor_(&r__1); -// FFEINTRIN_impCSIN // - c_sin(&q__1, &c1); - fooc_(&q__1); -// FFEINTRIN_impCSQRT // - c_sqrt(&q__1, &c1); - fooc_(&q__1); -// FFEINTRIN_impDABS // - d__1 = (( d1 ) >= 0 ? ( d1 ) : -( d1 )) ; - food_(&d__1); -// FFEINTRIN_impDACOS // - d__1 = acos(d1); - food_(&d__1); -// FFEINTRIN_impDASIN // - d__1 = asin(d1); - food_(&d__1); -// FFEINTRIN_impDATAN // - d__1 = atan(d1); - food_(&d__1); -// FFEINTRIN_impDATAN2 // - d__1 = atan2(d1, d2); - food_(&d__1); -// FFEINTRIN_impDCOS // - d__1 = cos(d1); - food_(&d__1); -// FFEINTRIN_impDCOSH // - d__1 = cosh(d1); - food_(&d__1); -// FFEINTRIN_impDDIM // - d__1 = d_dim(&d1, &d2); - food_(&d__1); -// FFEINTRIN_impDEXP // - d__1 = exp(d1); - food_(&d__1); -// FFEINTRIN_impDIM // - r__1 = r_dim(&r1, &r2); - foor_(&r__1); -// FFEINTRIN_impDINT // - d__1 = d_int(&d1); - food_(&d__1); -// FFEINTRIN_impDLOG // - d__1 = log(d1); - food_(&d__1); -// FFEINTRIN_impDLOG10 // - d__1 = d_lg10(&d1); - food_(&d__1); -// FFEINTRIN_impDMAX1 // - d__1 = (( d1 ) >= ( d2 ) ? ( d1 ) : ( d2 )) ; - food_(&d__1); -// FFEINTRIN_impDMIN1 // - d__1 = (( d1 ) <= ( d2 ) ? ( d1 ) : ( d2 )) ; - food_(&d__1); -// FFEINTRIN_impDMOD // - d__1 = d_mod(&d1, &d2); - food_(&d__1); -// FFEINTRIN_impDNINT // - d__1 = d_nint(&d1); - food_(&d__1); -// FFEINTRIN_impDPROD // - d__1 = (doublereal) r1 * r2; - food_(&d__1); -// FFEINTRIN_impDSIGN // - d__1 = d_sign(&d1, &d2); - food_(&d__1); -// FFEINTRIN_impDSIN // - d__1 = sin(d1); - food_(&d__1); -// FFEINTRIN_impDSINH // - d__1 = sinh(d1); - food_(&d__1); -// FFEINTRIN_impDSQRT // - d__1 = sqrt(d1); - food_(&d__1); -// FFEINTRIN_impDTAN // - d__1 = tan(d1); - food_(&d__1); -// FFEINTRIN_impDTANH // - d__1 = tanh(d1); - food_(&d__1); -// FFEINTRIN_impEXP // - r__1 = exp(r1); - foor_(&r__1); -// FFEINTRIN_impIABS // - i__1 = (( i1 ) >= 0 ? ( i1 ) : -( i1 )) ; - fooi_(&i__1); -// FFEINTRIN_impICHAR // - i__1 = *(unsigned char *)a1; - fooi_(&i__1); -// FFEINTRIN_impIDIM // - i__1 = i_dim(&i1, &i2); - fooi_(&i__1); -// FFEINTRIN_impIDNINT // - i__1 = i_dnnt(&d1); - fooi_(&i__1); -// FFEINTRIN_impINDEX // - i__1 = i_indx(a1, a2, 10L, 10L); - fooi_(&i__1); -// FFEINTRIN_impISIGN // - i__1 = i_sign(&i1, &i2); - fooi_(&i__1); -// FFEINTRIN_impLEN // - i__1 = i_len(a1, 10L); - fooi_(&i__1); -// FFEINTRIN_impLGE // - L__1 = l_ge(a1, a2, 10L, 10L); - fool_(&L__1); -// FFEINTRIN_impLGT // - L__1 = l_gt(a1, a2, 10L, 10L); - fool_(&L__1); -// FFEINTRIN_impLLE // - L__1 = l_le(a1, a2, 10L, 10L); - fool_(&L__1); -// FFEINTRIN_impLLT // - L__1 = l_lt(a1, a2, 10L, 10L); - fool_(&L__1); -// FFEINTRIN_impMAX0 // - i__1 = (( i1 ) >= ( i2 ) ? ( i1 ) : ( i2 )) ; - fooi_(&i__1); -// FFEINTRIN_impMAX1 // - i__1 = (integer) (doublereal)(( r1 ) >= ( r2 ) ? ( r1 ) : ( r2 )) ; - fooi_(&i__1); -// FFEINTRIN_impMIN0 // - i__1 = (( i1 ) <= ( i2 ) ? ( i1 ) : ( i2 )) ; - fooi_(&i__1); -// FFEINTRIN_impMIN1 // - i__1 = (integer) (doublereal)(( r1 ) <= ( r2 ) ? ( r1 ) : ( r2 )) ; - fooi_(&i__1); -// FFEINTRIN_impMOD // - i__1 = i1 % i2; - fooi_(&i__1); -// FFEINTRIN_impNINT // - i__1 = i_nint(&r1); - fooi_(&i__1); -// FFEINTRIN_impSIGN // - r__1 = r_sign(&r1, &r2); - foor_(&r__1); -// FFEINTRIN_impSIN // - r__1 = sin(r1); - foor_(&r__1); -// FFEINTRIN_impSINH // - r__1 = sinh(r1); - foor_(&r__1); -// FFEINTRIN_impSQRT // - r__1 = sqrt(r1); - foor_(&r__1); -// FFEINTRIN_impTAN // - r__1 = tan(r1); - foor_(&r__1); -// FFEINTRIN_impTANH // - r__1 = tanh(r1); - foor_(&r__1); -// FFEINTRIN_imp_CMPLX_C // - r__1 = c1.r; - r__2 = c2.r; - q__1.r = r__1, q__1.i = r__2; - fooc_(&q__1); -// FFEINTRIN_imp_CMPLX_D // - z__1.r = d1, z__1.i = d2; - fooz_(&z__1); -// FFEINTRIN_imp_CMPLX_I // - r__1 = (real) i1; - r__2 = (real) i2; - q__1.r = r__1, q__1.i = r__2; - fooc_(&q__1); -// FFEINTRIN_imp_CMPLX_R // - q__1.r = r1, q__1.i = r2; - fooc_(&q__1); -// FFEINTRIN_imp_DBLE_C // - d__1 = (doublereal) c1.r; - food_(&d__1); -// FFEINTRIN_imp_DBLE_D // - d__1 = d1; - food_(&d__1); -// FFEINTRIN_imp_DBLE_I // - d__1 = (doublereal) i1; - food_(&d__1); -// FFEINTRIN_imp_DBLE_R // - d__1 = (doublereal) r1; - food_(&d__1); -// FFEINTRIN_imp_INT_C // - i__1 = (integer) c1.r; - fooi_(&i__1); -// FFEINTRIN_imp_INT_D // - i__1 = (integer) d1; - fooi_(&i__1); -// FFEINTRIN_imp_INT_I // - i__1 = i1; - fooi_(&i__1); -// FFEINTRIN_imp_INT_R // - i__1 = (integer) r1; - fooi_(&i__1); -// FFEINTRIN_imp_REAL_C // - r__1 = c1.r; - foor_(&r__1); -// FFEINTRIN_imp_REAL_D // - r__1 = (real) d1; - foor_(&r__1); -// FFEINTRIN_imp_REAL_I // - r__1 = (real) i1; - foor_(&r__1); -// FFEINTRIN_imp_REAL_R // - r__1 = r1; - foor_(&r__1); - -// FFEINTRIN_imp_INT_D: // - -// FFEINTRIN_specIDINT // - i__1 = (integer) d1; - fooi_(&i__1); - -// FFEINTRIN_imp_INT_R: // - -// FFEINTRIN_specIFIX // - i__1 = (integer) r1; - fooi_(&i__1); -// FFEINTRIN_specINT // - i__1 = (integer) r1; - fooi_(&i__1); - -// FFEINTRIN_imp_REAL_D: // - -// FFEINTRIN_specSNGL // - r__1 = (real) d1; - foor_(&r__1); - -// FFEINTRIN_imp_REAL_I: // - -// FFEINTRIN_specFLOAT // - r__1 = (real) i1; - foor_(&r__1); -// FFEINTRIN_specREAL // - r__1 = (real) i1; - foor_(&r__1); - -} // MAIN__ // - --------- (end output file from f2c) - -*/ - -#include "gt-f-com.h" -#include "gtype-f.h" diff --git a/contrib/gcc/f/com.h b/contrib/gcc/f/com.h deleted file mode 100644 index d23db66..0000000 --- a/contrib/gcc/f/com.h +++ /dev/null @@ -1,290 +0,0 @@ -/* com.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1996, 1997, 2000, 2003, 2004 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - com.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_COM_H -#define GCC_F_COM_H - -/* Simple definitions and enumerations. */ - -#define FFECOM_dimensionsMAX 7 /* Max # dimensions (quick hack). */ - -#define FFECOM_SIZE_UNIT "byte" /* Singular form. */ -#define FFECOM_SIZE_UNITS "bytes" /* Plural form. */ - -#define FFECOM_constantNULL NULL_TREE -#define FFECOM_nonterNULL NULL_TREE -#define FFECOM_globalNULL NULL_TREE -#define FFECOM_labelNULL NULL_TREE -#define FFECOM_storageNULL NULL_TREE -#define FFECOM_symbolNULL ffecom_symbol_null_ - -/* Shorthand for types used in f2c.h and that g77 perhaps allows some - flexibility regarding in the section below. I.e. the actual numbers - below aren't important, as long as they're unique. */ - -#define FFECOM_f2ccodeCHAR 1 -#define FFECOM_f2ccodeSHORT 2 -#define FFECOM_f2ccodeINT 3 -#define FFECOM_f2ccodeLONG 4 -#define FFECOM_f2ccodeLONGLONG 5 -#define FFECOM_f2ccodeCHARPTR 6 /* char * */ -#define FFECOM_f2ccodeFLOAT 7 -#define FFECOM_f2ccodeDOUBLE 8 -#define FFECOM_f2ccodeLONGDOUBLE 9 -#define FFECOM_f2ccodeTWOREALS 10 -#define FFECOM_f2ccodeTWODOUBLEREALS 11 - -#if FFECOM_DETERMINE_TYPES /* only for com.c and configure */ - -/* Begin f2c.h information. This must match the info in the f2c.h used - to build the libf2c with which g77-generated code is linked, or there - will probably be bugs, some of them difficult to detect or even trigger. */ - -/* The C front-end provides __g77_integer and __g77_uinteger types so that - the appropriately-sized signed and unsigned integer types are available - for libf2c. If you change this, also the definitions of those types - in ../c-decl.c. */ -#define FFECOM_f2cINTEGER \ - (LONG_TYPE_SIZE == FLOAT_TYPE_SIZE \ - ? FFECOM_f2ccodeLONG \ - : (INT_TYPE_SIZE == FLOAT_TYPE_SIZE \ - ? FFECOM_f2ccodeINT \ - : (abort (), -1))) - -#define FFECOM_f2cLOGICAL FFECOM_f2cINTEGER - -/* The C front-end provides __g77_longint and __g77_ulongint types so that - the appropriately-sized signed and unsigned integer types are available - for libf2c. If you change this, also the definitions of those types - in ../c-decl.c. */ -#define FFECOM_f2cLONGINT \ - (LONG_TYPE_SIZE == (FLOAT_TYPE_SIZE * 2) \ - ? FFECOM_f2ccodeLONG \ - : (LONG_LONG_TYPE_SIZE == (FLOAT_TYPE_SIZE * 2) \ - ? FFECOM_f2ccodeLONGLONG \ - : (abort (), -1))) - -#define FFECOM_f2cADDRESS FFECOM_f2ccodeCHARPTR -#define FFECOM_f2cSHORTINT FFECOM_f2ccodeSHORT -#define FFECOM_f2cREAL FFECOM_f2ccodeFLOAT -#define FFECOM_f2cDOUBLEREAL FFECOM_f2ccodeDOUBLE -#define FFECOM_f2cCOMPLEX FFECOM_f2ccodeTWOREALS -#define FFECOM_f2cDOUBLECOMPLEX FFECOM_f2ccodeTWODOUBLEREALS -#define FFECOM_f2cSHORTLOGICAL FFECOM_f2ccodeSHORT -#define FFECOM_f2cLOGICAL1 FFECOM_f2ccodeCHAR -#define FFECOM_f2cINTEGER1 FFECOM_f2ccodeCHAR - -/* These must be f2c's INTEGER type, to match runtime/f2c.h.in. */ - -#define FFECOM_f2cFLAG FFECOM_f2cINTEGER -#define FFECOM_f2cFTNINT FFECOM_f2cINTEGER -#define FFECOM_f2cFTNLEN FFECOM_f2cINTEGER - -#endif /* #if FFECOM_DETERMINE_TYPES */ - -/* Everything else in f2c.h, specifically the structures used in - interfacing compiled code with the library, must remain exactly - as delivered, or g77 internals (mostly com.c and ste.c) must - be modified accordingly to compensate. Or there will be...trouble. */ - -typedef enum - { -#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX,CONST) CODE, -#include "com-rt.def" -#undef DEFGFRT - FFECOM_gfrt - } ffecomGfrt; - -/* Typedefs. */ - -#ifndef TREE_CODE -#include "tree.h" -#endif - -typedef tree ffecomConstant; -typedef tree ffecomNonter; -typedef tree ffecomLabel; -typedef tree ffecomGlobal; -typedef tree ffecomStorage; -typedef struct _ffecom_symbol_ ffecomSymbol; - -struct _ffecom_symbol_ - { - tree decl_tree; - tree length_tree; /* For CHARACTER dummies. */ - tree vardesc_tree; /* For NAMELIST. */ - tree assign_tree; /* For ASSIGN'ed vars. */ - bool addr; /* Is address of item instead of item. */ - }; - -/* Include files needed by this one. */ - -#include "bld.h" -#include "info.h" -#include "lab.h" -#include "storag.h" -#include "symbol.h" - -extern int global_bindings_p (void); -extern tree getdecls (void); -extern void pushlevel (int); -extern tree poplevel (int,int, int); -extern void insert_block (tree); -extern void set_block (tree); -extern tree pushdecl (tree); - -/* Global objects accessed by users of this module. */ - -extern GTY(()) tree string_type_node; -extern GTY(()) tree ffecom_integer_type_node; -extern GTY(()) tree ffecom_integer_zero_node; -extern GTY(()) tree ffecom_integer_one_node; -extern GTY(()) tree ffecom_tree_type[FFEINFO_basictype][FFEINFO_kindtype]; -extern ffecomSymbol ffecom_symbol_null_; -extern ffeinfoKindtype ffecom_pointer_kind_; -extern ffeinfoKindtype ffecom_label_kind_; - -extern int ffecom_f2c_typecode_[FFEINFO_basictype][FFEINFO_kindtype]; -extern GTY(()) tree ffecom_f2c_integer_type_node; -extern GTY(()) tree ffecom_f2c_address_type_node; -extern GTY(()) tree ffecom_f2c_real_type_node; -extern GTY(()) tree ffecom_f2c_doublereal_type_node; -extern GTY(()) tree ffecom_f2c_complex_type_node; -extern GTY(()) tree ffecom_f2c_doublecomplex_type_node; -extern GTY(()) tree ffecom_f2c_longint_type_node; -extern GTY(()) tree ffecom_f2c_logical_type_node; -extern GTY(()) tree ffecom_f2c_flag_type_node; -extern GTY(()) tree ffecom_f2c_ftnlen_type_node; -extern GTY(()) tree ffecom_f2c_ftnlen_zero_node; -extern GTY(()) tree ffecom_f2c_ftnlen_one_node; -extern GTY(()) tree ffecom_f2c_ftnlen_two_node; -extern GTY(()) tree ffecom_f2c_ptr_to_ftnlen_type_node; -extern GTY(()) tree ffecom_f2c_ftnint_type_node; -extern GTY(()) tree ffecom_f2c_ptr_to_ftnint_type_node; - -/* Declare functions with prototypes. */ - -tree ffecom_1 (enum tree_code code, tree type, tree node); -tree ffecom_1_fn (tree node); -tree ffecom_2 (enum tree_code code, tree type, tree node1, tree node2); -bool ffecom_2pass_advise_entrypoint (ffesymbol entry); -void ffecom_2pass_do_entrypoint (ffesymbol entry); -tree ffecom_2s (enum tree_code code, tree type, tree node1, tree node2); -tree ffecom_3 (enum tree_code code, tree type, tree node1, tree node2, - tree node3); -tree ffecom_3s (enum tree_code code, tree type, tree node1, tree node2, - tree node3); -tree ffecom_arg_expr (ffebld expr, tree *length); -tree ffecom_arg_ptr_to_const_expr (ffebld expr, tree *length); -tree ffecom_arg_ptr_to_expr (ffebld expr, tree *length); -tree ffecom_call_gfrt (ffecomGfrt ix, tree args, tree hook); -tree ffecom_constantunion_with_type (ffebldConstantUnion *cu, - tree tree_type,ffebldConst ct); -tree ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt, - ffeinfoKindtype kt, tree tree_type); -tree ffecom_const_expr (ffebld expr); -tree ffecom_decl_field (tree context, tree prevfield, const char *name, - tree type); -void ffecom_close_include (FILE *f); -void ffecom_decode_include_option (const char *dir); -tree ffecom_end_compstmt (void); -void ffecom_end_transition (void); -void ffecom_exec_transition (void); -void ffecom_expand_let_stmt (ffebld dest, ffebld source); -tree ffecom_expr (ffebld expr); -tree ffecom_expr_assign (ffebld expr); -tree ffecom_expr_assign_w (ffebld expr); -tree ffecom_expr_rw (tree type, ffebld expr); -tree ffecom_expr_w (tree type, ffebld expr); -void ffecom_finish_compile (void); -void ffecom_finish_decl (tree decl, tree init, bool is_top_level); -void ffecom_finish_progunit (void); -tree ffecom_get_invented_identifier (const char *pattern, ...) - ATTRIBUTE_PRINTF_1; -ffeinfoBasictype ffecom_gfrt_basictype (ffecomGfrt ix); -ffeinfoKindtype ffecom_gfrt_kindtype (ffecomGfrt ix); -void ffecom_init_0 (void); -void ffecom_init_2 (void); -tree ffecom_list_expr (ffebld list); -tree ffecom_list_ptr_to_expr (ffebld list); -tree ffecom_lookup_label (ffelab label); -tree ffecom_make_tempvar (const char *commentary, tree type, - ffetargetCharacterSize size, int elements); -tree ffecom_modify (tree newtype, tree lhs, tree rhs); -void ffecom_save_tree_forever (tree t); -void ffecom_file (const char *name); -void ffecom_notify_init_storage (ffestorag st); -void ffecom_notify_init_symbol (ffesymbol s); -void ffecom_notify_primary_entry (ffesymbol fn); -FILE *ffecom_open_include (char *name, ffewhereLine l, ffewhereColumn c); -void ffecom_prepare_arg_ptr_to_expr (ffebld expr); -bool ffecom_prepare_end (void); -void ffecom_prepare_expr_ (ffebld expr, ffebld dest); -void ffecom_prepare_expr_rw (tree type, ffebld expr); -void ffecom_prepare_expr_w (tree type, ffebld expr); -void ffecom_prepare_ptr_to_expr (ffebld expr); -void ffecom_prepare_return_expr (ffebld expr); -tree ffecom_ptr_to_const_expr (ffebld expr); -tree ffecom_ptr_to_expr (ffebld expr); -tree ffecom_return_expr (ffebld expr); -tree ffecom_save_tree (tree t); -void ffecom_start_compstmt (void); -tree ffecom_start_decl (tree decl, bool is_init); -void ffecom_sym_commit (ffesymbol s); -ffesymbol ffecom_sym_end_transition (ffesymbol s); -ffesymbol ffecom_sym_exec_transition (ffesymbol s); -ffesymbol ffecom_sym_learned (ffesymbol s); -void ffecom_sym_retract (ffesymbol s); -tree ffecom_temp_label (void); -tree ffecom_truth_value (tree expr); -tree ffecom_truth_value_invert (tree expr); -tree ffecom_type_expr (ffebld expr); -tree ffecom_which_entrypoint_decl (void); -void ffe_parse_file (int); - -/* Define macros. */ - -#define ffecom_f2c_typecode(bt,kt) ffecom_f2c_typecode_[(bt)][(kt)] -#define ffecom_label_kind() ffecom_label_kind_ -#define ffecom_pointer_kind() ffecom_pointer_kind_ -#define ffecom_prepare_expr(e) ffecom_prepare_expr_ ((e), NULL) - -#define ffecom_init_1() -#define ffecom_init_3() -#define ffecom_init_4() -#define ffecom_terminate_0() -#define ffecom_terminate_1() -#define ffecom_terminate_2() -#define ffecom_terminate_3() -#define ffecom_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_COM_H */ diff --git a/contrib/gcc/f/config-lang.in b/contrib/gcc/f/config-lang.in deleted file mode 100644 index 92ba5cc..0000000 --- a/contrib/gcc/f/config-lang.in +++ /dev/null @@ -1,36 +0,0 @@ -# Top level configure fragment for GNU FORTRAN. -# Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. - -#This file is part of GNU Fortran. - -#GNU Fortran is free software; you can redistribute it and/or modify -#it under the 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 Fortran is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -#02111-1307, USA. - -# Configure looks for the existence of this file to auto-config each language. -# We define several parameters used by configure: -# -# language - name of language as it would appear in $(LANGUAGES) -# compilers - value to add to $(COMPILERS) -# stagestuff - files to add to $(STAGESTUFF) - -language="f77" - -compilers="f771\$(exeext)" - -stagestuff="g77\$(exeext) g77-cross\$(exeext) f771\$(exeext)" - -target_libs=target-libf2c - -gtfiles="\$(srcdir)/f/com.c \$(srcdir)/f/com.h \$(srcdir)/f/ste.c \$(srcdir)/f/where.h \$(srcdir)/f/where.c \$(srcdir)/f/lex.c" diff --git a/contrib/gcc/f/data.c b/contrib/gcc/f/data.c deleted file mode 100644 index 2040f0a..0000000 --- a/contrib/gcc/f/data.c +++ /dev/null @@ -1,1877 +0,0 @@ -/* data.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 2002, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - - Description: - Do the tough things for DATA statement (and INTEGER FOO/.../-style - initializations), like implied-DO and suchlike. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "data.h" -#include "bit.h" -#include "bld.h" -#include "com.h" -#include "expr.h" -#include "global.h" -#include "malloc.h" -#include "st.h" -#include "storag.h" -#include "top.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - -/* I picked this value as one that, when plugged into a couple of small - but nearly identical test cases I have called BIG-0.f and BIG-1.f, - causes BIG-1.f to take about 10 times as long (elapsed) to compile - (in f771 only) as BIG-0.f. These test cases differ in that BIG-0.f - doesn't put the one initialized variable in a common area that has - a large uninitialized array in it, while BIG-1.f does. The size of - the array is this many elements, as long as they all are INTEGER - type. Note that, as of 0.5.18, sparse cases are better handled, - so BIG-2.f now is used; it provides nonzero initial - values for all elements of the same array BIG-0 has. */ -#ifndef FFEDATA_sizeTOO_BIG_INIT_ -#define FFEDATA_sizeTOO_BIG_INIT_ 75*1024 -#endif - -/* Internal typedefs. */ - -typedef struct _ffedata_convert_cache_ *ffedataConvertCache_; -typedef struct _ffedata_impdo_ *ffedataImpdo_; - -/* Private include files. */ - - -/* Internal structure definitions. */ - -struct _ffedata_convert_cache_ - { - ffebld converted; /* Results of converting expr to following - type. */ - ffeinfoBasictype basic_type; - ffeinfoKindtype kind_type; - ffetargetCharacterSize size; - ffeinfoRank rank; - }; - -struct _ffedata_impdo_ - { - ffedataImpdo_ outer; /* Enclosing IMPDO construct. */ - ffebld outer_list; /* Item after my IMPDO on the outer list. */ - ffebld my_list; /* Beginning of list in my IMPDO. */ - ffesymbol itervar; /* Iteration variable. */ - ffetargetIntegerDefault increment; - ffetargetIntegerDefault final; - }; - -/* Static objects accessed by functions in this module. */ - -static ffedataImpdo_ ffedata_stack_ = NULL; -static ffebld ffedata_list_ = NULL; -static bool ffedata_reinit_; /* value_ should report REINIT error. */ -static bool ffedata_reported_error_; /* Error has been reported. */ -static ffesymbol ffedata_symbol_ = NULL; /* Symbol being initialized. */ -static ffeinfoBasictype ffedata_basictype_; /* Info on symbol. */ -static ffeinfoKindtype ffedata_kindtype_; -static ffestorag ffedata_storage_; /* If non-NULL, inits go into this parent. */ -static ffeinfoBasictype ffedata_storage_bt_; /* Info on storage. */ -static ffeinfoKindtype ffedata_storage_kt_; -static ffetargetOffset ffedata_storage_size_; /* Size of entire storage. */ -static ffetargetAlign ffedata_storage_units_; /* #units per storage unit. */ -static ffetargetOffset ffedata_arraysize_; /* Size of array being - inited. */ -static ffetargetOffset ffedata_expected_; /* Number of elements to - init. */ -static ffetargetOffset ffedata_number_; /* #elements inited so far. */ -static ffetargetOffset ffedata_offset_; /* Offset of next element. */ -static ffetargetOffset ffedata_symbolsize_; /* Size of entire sym. */ -static ffetargetCharacterSize ffedata_size_; /* Size of an element. */ -static ffetargetCharacterSize ffedata_charexpected_; /* #char to init. */ -static ffetargetCharacterSize ffedata_charnumber_; /* #chars inited. */ -static ffetargetCharacterSize ffedata_charoffset_; /* Offset of next char. */ -static ffedataConvertCache_ ffedata_convert_cache_; /* Fewer conversions. */ -static int ffedata_convert_cache_max_ = 0; /* #entries available. */ -static int ffedata_convert_cache_use_ = 0; /* #entries in use. */ - -/* Static functions (internal). */ - -static bool ffedata_advance_ (void); -static ffebld ffedata_convert_ (ffebld source, ffelexToken source_token, - ffelexToken dest_token, ffeinfoBasictype bt, ffeinfoKindtype kt, - ffeinfoRank rk, ffetargetCharacterSize sz); -static ffetargetInteger1 ffedata_eval_integer1_ (ffebld expr); -static ffetargetOffset ffedata_eval_offset_ (ffebld subscripts, - ffebld dims); -static ffetargetCharacterSize ffedata_eval_substr_begin_ (ffebld expr); -static ffetargetCharacterSize ffedata_eval_substr_end_ (ffebld expr, - ffetargetCharacterSize min, ffetargetCharacterSize max); -static void ffedata_gather_ (ffestorag mst, ffestorag st); -static void ffedata_pop_ (void); -static void ffedata_push_ (void); -static bool ffedata_value_ (ffebld value, ffelexToken token); - -/* Internal macros. */ - - -/* ffedata_begin -- Initialize with list of targets - - ffebld list; - ffedata_begin(list); // ITEM... list of SYMTERs, ARRAYs, SUBSTRs, ... - - Remember the list. After this call, 0...n calls to ffedata_value must - follow, and then a single call to ffedata_end. */ - -void -ffedata_begin (ffebld list) -{ - assert (ffedata_list_ == NULL); - ffedata_list_ = list; - ffedata_symbol_ = NULL; - ffedata_reported_error_ = FALSE; - ffedata_reinit_ = FALSE; - ffedata_advance_ (); -} - -/* ffedata_end -- End of initialization sequence - - if (ffedata_end(FALSE)) - // everything's ok - - Make sure the end of the list is valid here. */ - -bool -ffedata_end (bool reported_error, ffelexToken t) -{ - reported_error |= ffedata_reported_error_; - - /* If still targets to initialize, too few initializers, so complain. */ - - if ((ffedata_symbol_ != NULL) && !reported_error) - { - reported_error = TRUE; - ffebad_start (FFEBAD_DATA_TOOFEW); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - } - - /* Pop off any impdo stacks (present only if ffedata_symbol_ != NULL). */ - - while (ffedata_stack_ != NULL) - ffedata_pop_ (); - - if (ffedata_list_ != NULL) - { - assert (reported_error); - ffedata_list_ = NULL; - } - - return TRUE; -} - -/* ffedata_gather -- Gather previously disparate initializations into one place - - ffestorag st; // A typeCBLOCK or typeLOCAL aggregate. - ffedata_gather(st); - - Prior to this call, st has no init or accretion info, but (presumably - at least one of) its subordinate storage areas has init or accretion - info. After this call, none of the subordinate storage areas has inits, - because they've all been moved into the newly created init/accretion - info for st. During this call, conflicting inits produce only one - error message. */ - -void -ffedata_gather (ffestorag st) -{ - ffesymbol s; - ffebld b; - - /* Prepare info on the storage area we're putting init info into. */ - - ffetarget_aggregate_info (&ffedata_storage_bt_, &ffedata_storage_kt_, - &ffedata_storage_units_, ffestorag_basictype (st), - ffestorag_kindtype (st)); - ffedata_storage_size_ = ffestorag_size (st) / ffedata_storage_units_; - assert (ffestorag_size (st) % ffedata_storage_units_ == 0); - - /* If a CBLOCK, gather all the init info for its explicit members. */ - - if ((ffestorag_type (st) == FFESTORAG_typeCBLOCK) - && (ffestorag_symbol (st) != NULL)) - { - s = ffestorag_symbol (st); - for (b = ffesymbol_commonlist (s); b != NULL; b = ffebld_trail (b)) - ffedata_gather_ (st, - ffesymbol_storage (ffebld_symter (ffebld_head (b)))); - } - - /* For CBLOCK or LOCAL, gather all the init info for equivalenced members. */ - - ffestorag_drive (ffestorag_list_equivs (st), ffedata_gather_, st); -} - -/* ffedata_value -- Provide some number of initial values - - ffebld value; - ffelexToken t; // Points to the value. - if (ffedata_value(1,value,t)) - // Everything's ok - - Makes sure the value is ok, then remembers it according to the list - provided to ffedata_begin. As many instances of the value may be - supplied as desired, as indicated by the first argument. */ - -bool -ffedata_value (ffetargetIntegerDefault rpt, ffebld value, ffelexToken token) -{ - ffetargetIntegerDefault i; - - /* Maybe ignore zero values, to speed up compiling, even though we lose - checking for multiple initializations for now. */ - - if (!ffe_is_zeros () - && (value != NULL) - && (ffebld_op (value) == FFEBLD_opCONTER) - && ffebld_constant_is_zero (ffebld_conter (value))) - value = NULL; - else if ((value != NULL) - && (ffebld_op (value) == FFEBLD_opANY)) - value = NULL; - else - { - /* Must be a constant. */ - assert (value != NULL); - assert (ffebld_op (value) == FFEBLD_opCONTER); - } - - /* Later we can optimize certain cases by seeing that the target array can - take some number of values, and provide this number to _value_. */ - - if (rpt == 1) - ffedata_convert_cache_use_ = -1; /* Don't bother caching. */ - else - ffedata_convert_cache_use_ = 0; /* Maybe use the cache. */ - - for (i = 0; i < rpt; ++i) - { - if ((ffedata_symbol_ != NULL) - && !ffesymbol_is_init (ffedata_symbol_)) - { - ffesymbol_signal_change (ffedata_symbol_); - ffesymbol_update_init (ffedata_symbol_); - if (1 || ffe_is_90 ()) - ffesymbol_update_save (ffedata_symbol_); -#if FFEGLOBAL_ENABLED - if (ffesymbol_common (ffedata_symbol_) != NULL) - ffeglobal_init_common (ffesymbol_common (ffedata_symbol_), - token); -#endif - ffesymbol_signal_unreported (ffedata_symbol_); - } - if (!ffedata_value_ (value, token)) - return FALSE; - } - - return TRUE; -} - -/* ffedata_advance_ -- Advance initialization target to next item in list - - if (ffedata_advance_()) - // everything's ok - - Sets common info to characterize the next item in the list. Handles - IMPDO constructs accordingly. Does not handle advances within a single - item, as in the common extension "DATA CHARTYPE/33,34,35/", where - CHARTYPE is CHARACTER*3, for example. */ - -static bool -ffedata_advance_ (void) -{ - ffebld next; - - /* Come here after handling an IMPDO. */ - -tail_recurse: /* :::::::::::::::::::: */ - - /* Assume we're not going to find a new target for now. */ - - ffedata_symbol_ = NULL; - - /* If at the end of the list, we're done. */ - - if (ffedata_list_ == NULL) - { - ffetargetIntegerDefault newval; - - if (ffedata_stack_ == NULL) - return TRUE; /* No IMPDO in progress, we is done! */ - - /* Iterate the IMPDO. */ - - newval = ffesymbol_value (ffedata_stack_->itervar) - + ffedata_stack_->increment; - - /* See if we're still in the loop. */ - - if (((ffedata_stack_->increment > 0) - ? newval > ffedata_stack_->final - : newval < ffedata_stack_->final) - || (((ffesymbol_value (ffedata_stack_->itervar) < 0) - == (ffedata_stack_->increment < 0)) - && ((ffesymbol_value (ffedata_stack_->itervar) < 0) - != (newval < 0)))) /* Overflow/underflow? */ - { /* Done with the loop. */ - ffedata_list_ = ffedata_stack_->outer_list; /* Restore list. */ - ffedata_pop_ (); /* Pop me off the impdo stack. */ - } - else - { /* Still in the loop, reset the list and - update the iter var. */ - ffedata_list_ = ffedata_stack_->my_list; /* Reset list. */ - ffesymbol_set_value (ffedata_stack_->itervar, newval); - } - goto tail_recurse; /* :::::::::::::::::::: */ - } - - /* Move to the next item in the list. */ - - next = ffebld_head (ffedata_list_); - ffedata_list_ = ffebld_trail (ffedata_list_); - - /* Really shouldn't happen. */ - - if (next == NULL) - return TRUE; - - /* See what kind of target this is. */ - - switch (ffebld_op (next)) - { - case FFEBLD_opSYMTER: /* Simple reference to scalar or array. */ - ffedata_symbol_ = ffebld_symter (next); - ffedata_storage_ = (ffesymbol_storage (ffedata_symbol_) == NULL) ? NULL - : ffestorag_parent (ffesymbol_storage (ffedata_symbol_)); - if (ffedata_storage_ != NULL) - { - ffetarget_aggregate_info (&ffedata_storage_bt_, &ffedata_storage_kt_, - &ffedata_storage_units_, - ffestorag_basictype (ffedata_storage_), - ffestorag_kindtype (ffedata_storage_)); - ffedata_storage_size_ = ffestorag_size (ffedata_storage_) - / ffedata_storage_units_; - assert (ffestorag_size (ffedata_storage_) % ffedata_storage_units_ == 0); - } - - if ((ffesymbol_init (ffedata_symbol_) != NULL) - || (ffesymbol_accretion (ffedata_symbol_) != NULL) - || ((ffedata_storage_ != NULL) - && (ffestorag_init (ffedata_storage_) != NULL))) - { -#if 0 - ffebad_start (FFEBAD_DATA_REINIT); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; -#else - ffedata_reinit_ = TRUE; - return TRUE; -#endif - } - ffedata_basictype_ = ffesymbol_basictype (ffedata_symbol_); - ffedata_kindtype_ = ffesymbol_kindtype (ffedata_symbol_); - if (ffesymbol_rank (ffedata_symbol_) == 0) - ffedata_arraysize_ = 1; - else - { - ffebld size = ffesymbol_arraysize (ffedata_symbol_); - - assert (size != NULL); - assert (ffebld_op (size) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (size)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (size)) - == FFEINFO_kindtypeINTEGERDEFAULT); - ffedata_arraysize_ = ffebld_constant_integerdefault (ffebld_conter - (size)); - } - ffedata_expected_ = ffedata_arraysize_; - ffedata_number_ = 0; - ffedata_offset_ = 0; - ffedata_size_ = (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) - ? ffesymbol_size (ffedata_symbol_) : 1; - ffedata_symbolsize_ = ffedata_size_ * ffedata_arraysize_; - ffedata_charexpected_ = ffedata_size_; - ffedata_charnumber_ = 0; - ffedata_charoffset_ = 0; - break; - - case FFEBLD_opARRAYREF: /* Reference to element of array. */ - ffedata_symbol_ = ffebld_symter (ffebld_left (next)); - ffedata_storage_ = (ffesymbol_storage (ffedata_symbol_) == NULL) ? NULL - : ffestorag_parent (ffesymbol_storage (ffedata_symbol_)); - if (ffedata_storage_ != NULL) - { - ffetarget_aggregate_info (&ffedata_storage_bt_, &ffedata_storage_kt_, - &ffedata_storage_units_, - ffestorag_basictype (ffedata_storage_), - ffestorag_kindtype (ffedata_storage_)); - ffedata_storage_size_ = ffestorag_size (ffedata_storage_) - / ffedata_storage_units_; - assert (ffestorag_size (ffedata_storage_) % ffedata_storage_units_ == 0); - } - - if ((ffesymbol_init (ffedata_symbol_) != NULL) - || ((ffedata_storage_ != NULL) - && (ffestorag_init (ffedata_storage_) != NULL))) - { -#if 0 - ffebad_start (FFEBAD_DATA_REINIT); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; -#else - ffedata_reinit_ = TRUE; - return TRUE; -#endif - } - ffedata_basictype_ = ffesymbol_basictype (ffedata_symbol_); - ffedata_kindtype_ = ffesymbol_kindtype (ffedata_symbol_); - if (ffesymbol_rank (ffedata_symbol_) == 0) - ffedata_arraysize_ = 1; /* Shouldn't happen in this case... */ - else - { - ffebld size = ffesymbol_arraysize (ffedata_symbol_); - - assert (size != NULL); - assert (ffebld_op (size) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (size)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (size)) - == FFEINFO_kindtypeINTEGERDEFAULT); - ffedata_arraysize_ = ffebld_constant_integerdefault (ffebld_conter - (size)); - } - ffedata_expected_ = 1; - ffedata_number_ = 0; - ffedata_offset_ = ffedata_eval_offset_ (ffebld_right (next), - ffesymbol_dims (ffedata_symbol_)); - ffedata_size_ = (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) - ? ffesymbol_size (ffedata_symbol_) : 1; - ffedata_symbolsize_ = ffedata_size_ * ffedata_arraysize_; - ffedata_charexpected_ = ffedata_size_; - ffedata_charnumber_ = 0; - ffedata_charoffset_ = 0; - break; - - case FFEBLD_opSUBSTR: /* Substring reference to scalar or array - element. */ - { - bool arrayref = ffebld_op (ffebld_left (next)) == FFEBLD_opARRAYREF; - ffebld colon = ffebld_right (next); - - assert (colon != NULL); - - ffedata_symbol_ = ffebld_symter (ffebld_left (arrayref - ? ffebld_left (next) : next)); - ffedata_storage_ = (ffesymbol_storage (ffedata_symbol_) == NULL) ? NULL - : ffestorag_parent (ffesymbol_storage (ffedata_symbol_)); - if (ffedata_storage_ != NULL) - { - ffetarget_aggregate_info (&ffedata_storage_bt_, &ffedata_storage_kt_, - &ffedata_storage_units_, - ffestorag_basictype (ffedata_storage_), - ffestorag_kindtype (ffedata_storage_)); - ffedata_storage_size_ = ffestorag_size (ffedata_storage_) - / ffedata_storage_units_; - assert (ffestorag_size (ffedata_storage_) % ffedata_storage_units_ == 0); - } - - if ((ffesymbol_init (ffedata_symbol_) != NULL) - || ((ffedata_storage_ != NULL) - && (ffestorag_init (ffedata_storage_) != NULL))) - { -#if 0 - ffebad_start (FFEBAD_DATA_REINIT); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; -#else - ffedata_reinit_ = TRUE; - return TRUE; -#endif - } - ffedata_basictype_ = ffesymbol_basictype (ffedata_symbol_); - ffedata_kindtype_ = ffesymbol_kindtype (ffedata_symbol_); - if (ffesymbol_rank (ffedata_symbol_) == 0) - ffedata_arraysize_ = 1; - else - { - ffebld size = ffesymbol_arraysize (ffedata_symbol_); - - assert (size != NULL); - assert (ffebld_op (size) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (size)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (size)) - == FFEINFO_kindtypeINTEGERDEFAULT); - ffedata_arraysize_ = ffebld_constant_integerdefault (ffebld_conter - (size)); - } - ffedata_expected_ = arrayref ? 1 : ffedata_arraysize_; - ffedata_number_ = 0; - ffedata_offset_ = arrayref ? ffedata_eval_offset_ (ffebld_right - (ffebld_left (next)), ffesymbol_dims (ffedata_symbol_)) : 0; - ffedata_size_ = ffesymbol_size (ffedata_symbol_); - ffedata_symbolsize_ = ffedata_size_ * ffedata_arraysize_; - ffedata_charnumber_ = 0; - ffedata_charoffset_ = ffedata_eval_substr_begin_ (ffebld_head (colon)); - ffedata_charexpected_ = ffedata_eval_substr_end_ (ffebld_head - (ffebld_trail (colon)), ffedata_charoffset_, - ffedata_size_) - ffedata_charoffset_ + 1; - } - break; - - case FFEBLD_opIMPDO: /* Implied-DO construct. */ - { - ffebld itervar; - ffebld start; - ffebld end; - ffebld incr; - ffebld item = ffebld_right (next); - - itervar = ffebld_head (item); - item = ffebld_trail (item); - start = ffebld_head (item); - item = ffebld_trail (item); - end = ffebld_head (item); - item = ffebld_trail (item); - incr = ffebld_head (item); - - ffedata_push_ (); - ffedata_stack_->outer_list = ffedata_list_; - ffedata_stack_->my_list = ffedata_list_ = ffebld_left (next); - - assert (ffeinfo_basictype (ffebld_info (itervar)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (itervar)) - == FFEINFO_kindtypeINTEGERDEFAULT); - ffedata_stack_->itervar = ffebld_symter (itervar); - if (ffeinfo_basictype (ffebld_info (start)) != FFEINFO_basictypeINTEGER) - { - ffebad_start (FFEBAD_DATA_EVAL); - ffest_ffebad_here_current_stmt (0); - ffebad_finish (); - ffedata_pop_ (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - assert (ffeinfo_basictype (ffebld_info (start)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (start)) - == FFEINFO_kindtypeINTEGERDEFAULT); - ffesymbol_set_value (ffedata_stack_->itervar, ffedata_eval_integer1_ (start)); - if (ffeinfo_basictype (ffebld_info (end)) != FFEINFO_basictypeINTEGER) - { - ffebad_start (FFEBAD_DATA_EVAL); - ffest_ffebad_here_current_stmt (0); - ffebad_finish (); - ffedata_pop_ (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - assert (ffeinfo_basictype (ffebld_info (end)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (end)) - == FFEINFO_kindtypeINTEGERDEFAULT); - ffedata_stack_->final = ffedata_eval_integer1_ (end); - - if (incr == NULL) - ffedata_stack_->increment = 1; - else - { - if (ffeinfo_basictype (ffebld_info (incr)) != FFEINFO_basictypeINTEGER) - { - ffebad_start (FFEBAD_DATA_EVAL); - ffest_ffebad_here_current_stmt (0); - ffebad_finish (); - ffedata_pop_ (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - assert (ffeinfo_basictype (ffebld_info (incr)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (incr)) - == FFEINFO_kindtypeINTEGERDEFAULT); - ffedata_stack_->increment = ffedata_eval_integer1_ (incr); - if (ffedata_stack_->increment == 0) - { - ffebad_start (FFEBAD_DATA_ZERO); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_stack_->itervar)); - ffebad_finish (); - ffedata_pop_ (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - } - - if ((ffedata_stack_->increment > 0) - ? ffesymbol_value (ffedata_stack_->itervar) - > ffedata_stack_->final - : ffesymbol_value (ffedata_stack_->itervar) - < ffedata_stack_->final) - { - ffedata_reported_error_ = TRUE; - ffebad_start (FFEBAD_DATA_EMPTY); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_stack_->itervar)); - ffebad_finish (); - ffedata_pop_ (); - return FALSE; - } - } - goto tail_recurse; /* :::::::::::::::::::: */ - - case FFEBLD_opANY: - ffedata_reported_error_ = TRUE; - return FALSE; - - default: - assert ("bad op" == NULL); - break; - } - - return TRUE; -} - -/* ffedata_convert_ -- Convert source expression to given type using cache - - ffebld source; - ffelexToken source_token; - ffelexToken dest_token; // Any appropriate token for "destination". - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharactersize sz; - source = ffedata_convert_(source,source_token,dest_token,bt,kt,sz); - - Like ffeexpr_convert, but calls it only if necessary (if the converted - expression doesn't already exist in the cache) and then puts the result - in the cache. */ - -static ffebld -ffedata_convert_ (ffebld source, ffelexToken source_token, - ffelexToken dest_token, ffeinfoBasictype bt, - ffeinfoKindtype kt, ffeinfoRank rk, - ffetargetCharacterSize sz) -{ - ffebld converted; - int i; - int max; - ffedataConvertCache_ cache; - - for (i = 0; i < ffedata_convert_cache_use_; ++i) - if ((bt == ffedata_convert_cache_[i].basic_type) - && (kt == ffedata_convert_cache_[i].kind_type) - && (sz == ffedata_convert_cache_[i].size) - && (rk == ffedata_convert_cache_[i].rank)) - return ffedata_convert_cache_[i].converted; - - converted = ffeexpr_convert (source, source_token, dest_token, bt, kt, rk, - sz, FFEEXPR_contextDATA); - - if (ffedata_convert_cache_use_ >= ffedata_convert_cache_max_) - { - if (ffedata_convert_cache_max_ == 0) - max = 4; - else - max = ffedata_convert_cache_max_ << 1; - - if (max > ffedata_convert_cache_max_) - { - cache = malloc_new_ks (malloc_pool_image (), - "FFEDATA cache", max * sizeof (*cache)); - if (ffedata_convert_cache_max_ != 0) - { - memcpy (cache, ffedata_convert_cache_, - ffedata_convert_cache_max_ * sizeof (*cache)); - malloc_kill_ks (malloc_pool_image (), ffedata_convert_cache_, - ffedata_convert_cache_max_ * sizeof (*cache)); - } - ffedata_convert_cache_ = cache; - ffedata_convert_cache_max_ = max; - } - else - return converted; /* In case int overflows! */ - } - - i = ffedata_convert_cache_use_++; - - ffedata_convert_cache_[i].converted = converted; - ffedata_convert_cache_[i].basic_type = bt; - ffedata_convert_cache_[i].kind_type = kt; - ffedata_convert_cache_[i].size = sz; - ffedata_convert_cache_[i].rank = rk; - - return converted; -} - -/* ffedata_eval_integer1_ -- Evaluate expression - - ffetargetIntegerDefault result; - ffebld expr; // must be kindtypeINTEGER1. - - result = ffedata_eval_integer1_(expr); - - Evalues the expression (which yields a kindtypeINTEGER1 result) and - returns the result. */ - -static ffetargetIntegerDefault -ffedata_eval_integer1_ (ffebld expr) -{ - ffetargetInteger1 result; - ffebad error; - - assert (expr != NULL); - - switch (ffebld_op (expr)) - { - case FFEBLD_opCONTER: - return ffebld_constant_integer1 (ffebld_conter (expr)); - - case FFEBLD_opSYMTER: - return ffesymbol_value (ffebld_symter (expr)); - - case FFEBLD_opUPLUS: - return ffedata_eval_integer1_ (ffebld_left (expr)); - - case FFEBLD_opUMINUS: - error = ffetarget_uminus_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr))); - break; - - case FFEBLD_opADD: - error = ffetarget_add_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opSUBTRACT: - error = ffetarget_subtract_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opMULTIPLY: - error = ffetarget_multiply_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opDIVIDE: - error = ffetarget_divide_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opPOWER: - { - ffebld r = ffebld_right (expr); - - if ((ffeinfo_basictype (ffebld_info (r)) != FFEINFO_basictypeINTEGER) - || (ffeinfo_kindtype (ffebld_info (r)) != FFEINFO_kindtypeINTEGERDEFAULT)) - error = FFEBAD_DATA_EVAL; - else - error = ffetarget_power_integerdefault_integerdefault (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (r)); - } - break; - -#if 0 /* Only for character basictype. */ - case FFEBLD_opCONCATENATE: - error =; - break; -#endif - - case FFEBLD_opNOT: - error = ffetarget_not_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr))); - break; - -#if 0 /* Only for logical basictype. */ - case FFEBLD_opLT: - error =; - break; - - case FFEBLD_opLE: - error =; - break; - - case FFEBLD_opEQ: - error =; - break; - - case FFEBLD_opNE: - error =; - break; - - case FFEBLD_opGT: - error =; - break; - - case FFEBLD_opGE: - error =; - break; -#endif - - case FFEBLD_opAND: - error = ffetarget_and_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opOR: - error = ffetarget_or_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opXOR: - error = ffetarget_xor_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opEQV: - error = ffetarget_eqv_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opNEQV: - error = ffetarget_neqv_integer1 (&result, - ffedata_eval_integer1_ (ffebld_left (expr)), - ffedata_eval_integer1_ (ffebld_right (expr))); - break; - - case FFEBLD_opPAREN: - return ffedata_eval_integer1_ (ffebld_left (expr)); - -#if 0 /* ~~ no idea how to do this */ - case FFEBLD_opPERCENT_LOC: - error =; - break; -#endif - -#if 0 /* not allowed by ANSI, but perhaps as an - extension someday? */ - case FFEBLD_opCONVERT: - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { - default: - error = FFEBAD_DATA_EVAL; - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { - default: - error = FFEBAD_DATA_EVAL; - break; - } - break; - } - break; -#endif - -#if 0 /* not valid ops */ - case FFEBLD_opREPEAT: - error =; - break; - - case FFEBLD_opBOUNDS: - error =; - break; -#endif - -#if 0 /* not allowed by ANSI, but perhaps as an - extension someday? */ - case FFEBLD_opFUNCREF: - error =; - break; -#endif - -#if 0 /* not valid ops */ - case FFEBLD_opSUBRREF: - error =; - break; - - case FFEBLD_opARRAYREF: - error =; - break; -#endif - -#if 0 /* not valid for integer1 */ - case FFEBLD_opSUBSTR: - error =; - break; -#endif - - default: - error = FFEBAD_DATA_EVAL; - break; - } - - if (error != FFEBAD) - { - ffebad_start (error); - ffest_ffebad_here_current_stmt (0); - ffebad_finish (); - result = 0; - } - - return result; -} - -/* ffedata_eval_offset_ -- Evaluate offset info array - - ffetargetOffset offset; // 0...max-1. - ffebld subscripts; // an opITEM list of subscript exprs. - ffebld dims; // an opITEM list of opBOUNDS exprs. - - result = ffedata_eval_offset_(expr); - - Evalues the expression (which yields a kindtypeINTEGER1 result) and - returns the result. */ - -static ffetargetOffset -ffedata_eval_offset_ (ffebld subscripts, ffebld dims) -{ - ffetargetIntegerDefault offset = 0; - ffetargetIntegerDefault width = 1; - ffetargetIntegerDefault value; - ffetargetIntegerDefault lowbound; - ffetargetIntegerDefault highbound; - ffetargetOffset final; - ffebld subscript; - ffebld dim; - ffebld low; - ffebld high; - int rank = 0; - bool ok; - - while (subscripts != NULL) - { - ffeinfoKindtype sub_kind, low_kind, hi_kind; - ffebld sub1, low1, hi1; - - ++rank; - assert (dims != NULL); - - subscript = ffebld_head (subscripts); - dim = ffebld_head (dims); - - assert (ffeinfo_basictype (ffebld_info (subscript)) == FFEINFO_basictypeINTEGER); - if (ffebld_op (subscript) == FFEBLD_opCONTER) - { - /* Force to default - it's a constant expression ! */ - sub_kind = ffeinfo_kindtype (ffebld_info (subscript)); - sub1 = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val ( - sub_kind == FFEINFO_kindtypeINTEGER2 ? subscript->u.conter.expr->u.integer2 : - sub_kind == FFEINFO_kindtypeINTEGER3 ? subscript->u.conter.expr->u.integer3 : - sub_kind == FFEINFO_kindtypeINTEGER4 ? subscript->u.conter.expr->u.integer4 : - subscript->u.conter.expr->u.integer1), NULL); - value = ffedata_eval_integer1_ (sub1); - } - else - value = ffedata_eval_integer1_ (subscript); - - assert (ffebld_op (dim) == FFEBLD_opBOUNDS); - low = ffebld_left (dim); - high = ffebld_right (dim); - - if (low == NULL) - lowbound = 1; - else - { - assert (ffeinfo_basictype (ffebld_info (low)) == FFEINFO_basictypeINTEGER); - if (ffebld_op (low) == FFEBLD_opCONTER) - { - /* Force to default - it's a constant expression ! */ - low_kind = ffeinfo_kindtype (ffebld_info (low)); - low1 = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val ( - low_kind == FFEINFO_kindtypeINTEGER2 ? low->u.conter.expr->u.integer2 : - low_kind == FFEINFO_kindtypeINTEGER3 ? low->u.conter.expr->u.integer3 : - low_kind == FFEINFO_kindtypeINTEGER4 ? low->u.conter.expr->u.integer4 : - low->u.conter.expr->u.integer1), NULL); - lowbound = ffedata_eval_integer1_ (low1); - } - else - lowbound = ffedata_eval_integer1_ (low); - } - - assert (ffeinfo_basictype (ffebld_info (high)) == FFEINFO_basictypeINTEGER); - if (ffebld_op (high) == FFEBLD_opCONTER) - { - /* Force to default - it's a constant expression ! */ - hi_kind = ffeinfo_kindtype (ffebld_info (high)); - hi1 = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val ( - hi_kind == FFEINFO_kindtypeINTEGER2 ? high->u.conter.expr->u.integer2 : - hi_kind == FFEINFO_kindtypeINTEGER3 ? high->u.conter.expr->u.integer3 : - hi_kind == FFEINFO_kindtypeINTEGER4 ? high->u.conter.expr->u.integer4 : - high->u.conter.expr->u.integer1), NULL); - highbound = ffedata_eval_integer1_ (hi1); - } - else - highbound = ffedata_eval_integer1_ (high); - - if ((value < lowbound) || (value > highbound)) - { - char rankstr[10]; - - sprintf (rankstr, "%d", rank); - value = lowbound; - ffebad_start (FFEBAD_DATA_SUBSCRIPT); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_string (rankstr); - ffebad_finish (); - } - - subscripts = ffebld_trail (subscripts); - dims = ffebld_trail (dims); - - offset += width * (value - lowbound); - if (subscripts != NULL) - width *= highbound - lowbound + 1; - } - - assert (dims == NULL); - - ok = ffetarget_offset (&final, offset); - assert (ok); - - return final; -} - -/* ffedata_eval_substr_begin_ -- Evaluate begin-point of substr reference - - ffetargetCharacterSize beginpoint; - ffebld endval; // head(colon). - - beginpoint = ffedata_eval_substr_end_(endval); - - If beginval is NULL, returns 0. Otherwise makes sure beginval is - kindtypeINTEGERDEFAULT, makes sure its value is > 0, - and returns its value minus one, or issues an error message. */ - -static ffetargetCharacterSize -ffedata_eval_substr_begin_ (ffebld expr) -{ - ffetargetIntegerDefault val; - - if (expr == NULL) - return 0; - - assert (ffeinfo_basictype (ffebld_info (expr)) == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (expr)) == FFEINFO_kindtypeINTEGERDEFAULT); - - val = ffedata_eval_integer1_ (expr); - - if (val < 1) - { - val = 1; - ffebad_start (FFEBAD_DATA_RANGE); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - } - - return val - 1; -} - -/* ffedata_eval_substr_end_ -- Evaluate end-point of substr reference - - ffetargetCharacterSize endpoint; - ffebld endval; // head(trail(colon)). - ffetargetCharacterSize min; // beginpoint of substr reference. - ffetargetCharacterSize max; // size of entity. - - endpoint = ffedata_eval_substr_end_(endval,dflt); - - If endval is NULL, returns max. Otherwise makes sure endval is - kindtypeINTEGERDEFAULT, makes sure its value is > min and <= max, - and returns its value minus one, or issues an error message. */ - -static ffetargetCharacterSize -ffedata_eval_substr_end_ (ffebld expr, ffetargetCharacterSize min, - ffetargetCharacterSize max) -{ - ffetargetIntegerDefault val; - - if (expr == NULL) - return max - 1; - - assert (ffeinfo_basictype (ffebld_info (expr)) == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (expr)) == FFEINFO_kindtypeINTEGER1); - - val = ffedata_eval_integer1_ (expr); - - if ((val < (ffetargetIntegerDefault) min) - || (val > (ffetargetIntegerDefault) max)) - { - val = 1; - ffebad_start (FFEBAD_DATA_RANGE); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - } - - return val - 1; -} - -/* ffedata_gather_ -- Gather initial values for sym into master sym inits - - ffestorag mst; // A typeCBLOCK or typeLOCAL aggregate. - ffestorag st; // A typeCOMMON or typeEQUIV member. - ffedata_gather_(mst,st); - - If st has any initialization info, transfer that info into mst and - clear st's info. */ - -static void -ffedata_gather_ (ffestorag mst, ffestorag st) -{ - ffesymbol s; - ffesymbol s_whine; /* Symbol to complain about in diagnostics. */ - ffebld b; - ffetargetOffset offset; - ffetargetOffset units_expected; - ffebitCount actual; - ffebldConstantArray array; - ffebld accter; - ffetargetCopyfunc fn; - void *ptr1; - void *ptr2; - size_t size; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffeinfoBasictype ign_bt; - ffeinfoKindtype ign_kt; - ffetargetAlign units; - ffebit bits; - ffetargetOffset source_offset; - bool whine = FALSE; - - if (st == NULL) - return; /* Nothing to do. */ - - s = ffestorag_symbol (st); - - assert (s != NULL); /* Must have a corresponding symbol (else how - inited?). */ - assert (ffestorag_init (st) == NULL); /* No init info on storage itself. */ - assert (ffestorag_accretion (st) == NULL); - - if ((((b = ffesymbol_init (s)) == NULL) - && ((b = ffesymbol_accretion (s)) == NULL)) - || (ffebld_op (b) == FFEBLD_opANY) - || ((ffebld_op (b) == FFEBLD_opCONVERT) - && (ffebld_op (ffebld_left (b)) == FFEBLD_opANY))) - return; /* Nothing to do. */ - - /* b now holds the init/accretion expr. */ - - ffesymbol_set_init (s, NULL); - ffesymbol_set_accretion (s, NULL); - ffesymbol_set_accretes (s, 0); - - s_whine = ffestorag_symbol (mst); - if (s_whine == NULL) - s_whine = s; - - /* Make sure we haven't fully accreted during an array init. */ - - if (ffestorag_init (mst) != NULL) - { - ffebad_start (FFEBAD_DATA_MULTIPLE); - ffebad_here (0, ffewhere_line_unknown (), ffewhere_column_unknown ()); - ffebad_string (ffesymbol_text (s_whine)); - ffebad_finish (); - return; - } - - bt = ffeinfo_basictype (ffebld_info (b)); - kt = ffeinfo_kindtype (ffebld_info (b)); - - /* Calculate offset for aggregate area. */ - - ffedata_charexpected_ = (bt == FFEINFO_basictypeCHARACTER) - ? ffebld_size (b) : 1; - ffetarget_aggregate_info (&ign_bt, &ign_kt, &units, bt, - kt);/* Find out unit size of source datum. */ - assert (units % ffedata_storage_units_ == 0); - units_expected = ffedata_charexpected_ * units / ffedata_storage_units_; - offset = (ffestorag_offset (st) - ffestorag_offset (mst)) - / ffedata_storage_units_; - - /* Does an accretion array exist? If not, create it. */ - - if (ffestorag_accretion (mst) == NULL) - { -#if FFEDATA_sizeTOO_BIG_INIT_ != 0 - if (ffedata_storage_size_ >= FFEDATA_sizeTOO_BIG_INIT_) - { - char bignum[40]; - - sprintf (&bignum[0], "%ld", (long) ffedata_storage_size_); - ffebad_start (FFEBAD_TOO_BIG_INIT); - ffebad_here (0, ffesymbol_where_line (s_whine), - ffesymbol_where_column (s_whine)); - ffebad_string (ffesymbol_text (s_whine)); - ffebad_string (bignum); - ffebad_finish (); - } -#endif - array = ffebld_constantarray_new (ffedata_storage_bt_, - ffedata_storage_kt_, ffedata_storage_size_); - accter = ffebld_new_accter (array, ffebit_new (ffe_pool_program_unit (), - ffedata_storage_size_)); - ffebld_set_info (accter, ffeinfo_new - (ffedata_storage_bt_, - ffedata_storage_kt_, - 1, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) - ? 1 : FFETARGET_charactersizeNONE)); - ffestorag_set_accretion (mst, accter); - ffestorag_set_accretes (mst, ffedata_storage_size_); - } - else - { - accter = ffestorag_accretion (mst); - assert (ffedata_storage_size_ == (ffetargetOffset) ffebld_accter_size (accter)); - array = ffebld_accter (accter); - } - - /* Put value in accretion array at desired offset. */ - - fn = ffetarget_aggregate_ptr_memcpy (ffedata_storage_bt_, ffedata_storage_kt_, - bt, kt); - - switch (ffebld_op (b)) - { - case FFEBLD_opCONTER: - ffebld_constantarray_prepare (&ptr1, &ptr2, &size, array, ffedata_storage_bt_, - ffedata_storage_kt_, offset, - ffebld_constant_ptr_to_union (ffebld_conter (b)), - bt, kt); - (*fn) (ptr1, ptr2, size); /* Does the appropriate memcpy-like - operation. */ - ffebit_count (ffebld_accter_bits (accter), - offset, FALSE, units_expected, &actual); /* How many FALSE? */ - if (units_expected != (ffetargetOffset) actual) - { - ffebad_start (FFEBAD_DATA_MULTIPLE); - ffebad_here (0, ffewhere_line_unknown (), ffewhere_column_unknown ()); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - } - ffestorag_set_accretes (mst, - ffestorag_accretes (mst) - - actual); /* Decrement # of values - actually accreted. */ - ffebit_set (ffebld_accter_bits (accter), offset, 1, units_expected); - - /* If done accreting for this storage area, establish as initialized. */ - - if (ffestorag_accretes (mst) == 0) - { - ffestorag_set_init (mst, accter); - ffestorag_set_accretion (mst, NULL); - ffebit_kill (ffebld_accter_bits (ffestorag_init (mst))); - ffebld_set_op (ffestorag_init (mst), FFEBLD_opARRTER); - ffebld_set_arrter (ffestorag_init (mst), - ffebld_accter (ffestorag_init (mst))); - ffebld_arrter_set_size (ffestorag_init (mst), - ffedata_storage_size_); - ffebld_arrter_set_pad (ffestorag_init (mst), 0); - ffecom_notify_init_storage (mst); - } - - return; - - case FFEBLD_opARRTER: - ffebld_constantarray_preparray (&ptr1, &ptr2, &size, array, ffedata_storage_bt_, - ffedata_storage_kt_, offset, ffebld_arrter (b), - bt, kt); - size *= ffebld_arrter_size (b); - units_expected *= ffebld_arrter_size (b); - (*fn) (ptr1, ptr2, size); /* Does the appropriate memcpy-like - operation. */ - ffebit_count (ffebld_accter_bits (accter), - offset, FALSE, units_expected, &actual); /* How many FALSE? */ - if (units_expected != (ffetargetOffset) actual) - { - ffebad_start (FFEBAD_DATA_MULTIPLE); - ffebad_here (0, ffewhere_line_unknown (), ffewhere_column_unknown ()); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - } - ffestorag_set_accretes (mst, - ffestorag_accretes (mst) - - actual); /* Decrement # of values - actually accreted. */ - ffebit_set (ffebld_accter_bits (accter), offset, 1, units_expected); - - /* If done accreting for this storage area, establish as initialized. */ - - if (ffestorag_accretes (mst) == 0) - { - ffestorag_set_init (mst, accter); - ffestorag_set_accretion (mst, NULL); - ffebit_kill (ffebld_accter_bits (ffestorag_init (mst))); - ffebld_set_op (ffestorag_init (mst), FFEBLD_opARRTER); - ffebld_set_arrter (ffestorag_init (mst), - ffebld_accter (ffestorag_init (mst))); - ffebld_arrter_set_size (ffestorag_init (mst), - ffedata_storage_size_); - ffebld_arrter_set_pad (ffestorag_init (mst), 0); - ffecom_notify_init_storage (mst); - } - - return; - - case FFEBLD_opACCTER: - ffebld_constantarray_preparray (&ptr1, &ptr2, &size, array, ffedata_storage_bt_, - ffedata_storage_kt_, offset, ffebld_accter (b), - bt, kt); - bits = ffebld_accter_bits (b); - source_offset = 0; - - for (;;) - { - ffetargetOffset unexp; - ffetargetOffset siz; - ffebitCount length; - bool value; - - ffebit_test (bits, source_offset, &value, &length); - if (length == 0) - break; /* Exit the loop early. */ - siz = size * length; - unexp = units_expected * length; - if (value) - { - (*fn) (ptr1, ptr2, siz); /* Does memcpy-like operation. */ - ffebit_count (ffebld_accter_bits (accter), /* How many FALSE? */ - offset, FALSE, unexp, &actual); - if (!whine && (unexp != (ffetargetOffset) actual)) - { - whine = TRUE; /* Don't whine more than once for one gather. */ - ffebad_start (FFEBAD_DATA_MULTIPLE); - ffebad_here (0, ffewhere_line_unknown (), ffewhere_column_unknown ()); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - } - ffestorag_set_accretes (mst, - ffestorag_accretes (mst) - - actual); /* Decrement # of values - actually accreted. */ - ffebit_set (ffebld_accter_bits (accter), offset, 1, unexp); - } - source_offset += length; - offset += unexp; - ptr1 = ((char *) ptr1) + siz; - ptr2 = ((char *) ptr2) + siz; - } - - /* If done accreting for this storage area, establish as initialized. */ - - if (ffestorag_accretes (mst) == 0) - { - ffestorag_set_init (mst, accter); - ffestorag_set_accretion (mst, NULL); - ffebit_kill (ffebld_accter_bits (ffestorag_init (mst))); - ffebld_set_op (ffestorag_init (mst), FFEBLD_opARRTER); - ffebld_set_arrter (ffestorag_init (mst), - ffebld_accter (ffestorag_init (mst))); - ffebld_arrter_set_size (ffestorag_init (mst), - ffedata_storage_size_); - ffebld_arrter_set_pad (ffestorag_init (mst), 0); - ffecom_notify_init_storage (mst); - } - - return; - - default: - assert ("bad init op in gather_" == NULL); - return; - } -} - -/* ffedata_pop_ -- Pop an impdo stack entry - - ffedata_pop_(); */ - -static void -ffedata_pop_ (void) -{ - ffedataImpdo_ victim = ffedata_stack_; - - assert (victim != NULL); - - ffedata_stack_ = ffedata_stack_->outer; - - malloc_kill_ks (ffe_pool_program_unit (), victim, sizeof (*victim)); -} - -/* ffedata_push_ -- Push an impdo stack entry - - ffedata_push_(); */ - -static void -ffedata_push_ (void) -{ - ffedataImpdo_ baby; - - baby = malloc_new_ks (ffe_pool_program_unit (), "ffedataImpdo_", sizeof (*baby)); - - baby->outer = ffedata_stack_; - ffedata_stack_ = baby; -} - -/* ffedata_value_ -- Provide an initial value - - ffebld value; - ffelexToken t; // Points to the value. - if (ffedata_value(value,t)) - // Everything's ok - - Makes sure the value is ok, then remembers it according to the list - provided to ffedata_begin. */ - -static bool -ffedata_value_ (ffebld value, ffelexToken token) -{ - - /* If already reported an error, don't do anything. */ - - if (ffedata_reported_error_) - return FALSE; - - /* If the value is an error marker, remember we've seen one and do nothing - else. */ - - if ((value != NULL) - && (ffebld_op (value) == FFEBLD_opANY)) - { - ffedata_reported_error_ = TRUE; - return FALSE; - } - - /* If too many values (no more targets), complain. */ - - if (ffedata_symbol_ == NULL) - { - ffebad_start (FFEBAD_DATA_TOOMANY); - ffebad_here (0, ffelex_token_where_line (token), - ffelex_token_where_column (token)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - - /* If ffedata_advance_ wanted to register a complaint, do it now - that we have the token to point at instead of just the start - of the whole statement. */ - - if (ffedata_reinit_) - { - ffebad_start (FFEBAD_DATA_REINIT); - ffebad_here (0, ffelex_token_where_line (token), - ffelex_token_where_column (token)); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - -#if FFEGLOBAL_ENABLED - if (ffesymbol_common (ffedata_symbol_) != NULL) - ffeglobal_init_common (ffesymbol_common (ffedata_symbol_), token); -#endif - - /* Convert value to desired type. */ - - if (value != NULL) - { - if (ffedata_convert_cache_use_ == -1) - value = ffeexpr_convert - (value, token, NULL, ffedata_basictype_, - ffedata_kindtype_, 0, - (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) - ? ffedata_charexpected_ : FFETARGET_charactersizeNONE, - FFEEXPR_contextDATA); - else /* Use the cache. */ - value = ffedata_convert_ - (value, token, NULL, ffedata_basictype_, - ffedata_kindtype_, 0, - (ffedata_basictype_ == FFEINFO_basictypeCHARACTER) - ? ffedata_charexpected_ : FFETARGET_charactersizeNONE); - } - - /* If we couldn't, bug out. */ - - if ((value != NULL) && (ffebld_op (value) == FFEBLD_opANY)) - { - ffedata_reported_error_ = TRUE; - return FALSE; - } - - /* Handle the case where initializes go to a parent's storage area. */ - - if (ffedata_storage_ != NULL) - { - ffetargetOffset offset; - ffetargetOffset units_expected; - ffebitCount actual; - ffebldConstantArray array; - ffebld accter; - ffetargetCopyfunc fn; - void *ptr1; - void *ptr2; - size_t size; - ffeinfoBasictype ign_bt; - ffeinfoKindtype ign_kt; - ffetargetAlign units; - - /* Make sure we haven't fully accreted during an array init. */ - - if (ffestorag_init (ffedata_storage_) != NULL) - { - ffebad_start (FFEBAD_DATA_MULTIPLE); - ffebad_here (0, ffelex_token_where_line (token), - ffelex_token_where_column (token)); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - - /* Calculate offset. */ - - offset = ffedata_offset_ * ffedata_size_ + ffedata_charoffset_; - - /* Is offset within range? If not, whine, but don't do anything else. */ - - if (offset + ffedata_charexpected_ - 1 > ffedata_symbolsize_) - { - ffebad_start (FFEBAD_DATA_RANGE); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - - /* Now calculate offset for aggregate area. */ - - ffetarget_aggregate_info (&ign_bt, &ign_kt, &units, ffedata_basictype_, - ffedata_kindtype_); /* Find out unit size of - source datum. */ - assert (units % ffedata_storage_units_ == 0); - units_expected = ffedata_charexpected_ * units / ffedata_storage_units_; - offset *= units / ffedata_storage_units_; - offset += (ffestorag_offset (ffesymbol_storage (ffedata_symbol_)) - - ffestorag_offset (ffedata_storage_)) - / ffedata_storage_units_; - - assert (offset + units_expected - 1 <= ffedata_storage_size_); - - /* Does an accretion array exist? If not, create it. */ - - if (value != NULL) - { - if (ffestorag_accretion (ffedata_storage_) == NULL) - { -#if FFEDATA_sizeTOO_BIG_INIT_ != 0 - if (ffedata_storage_size_ >= FFEDATA_sizeTOO_BIG_INIT_) - { - char bignum[40]; - - sprintf (&bignum[0], "%ld", (long) ffedata_storage_size_); - ffebad_start (FFEBAD_TOO_BIG_INIT); - ffebad_here (0, ffelex_token_where_line (token), - ffelex_token_where_column (token)); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_string (bignum); - ffebad_finish (); - } -#endif - array = ffebld_constantarray_new - (ffedata_storage_bt_, ffedata_storage_kt_, - ffedata_storage_size_); - accter = ffebld_new_accter (array, - ffebit_new (ffe_pool_program_unit (), - ffedata_storage_size_)); - ffebld_set_info (accter, ffeinfo_new - (ffedata_storage_bt_, - ffedata_storage_kt_, - 1, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - (ffedata_basictype_ - == FFEINFO_basictypeCHARACTER) - ? 1 : FFETARGET_charactersizeNONE)); - ffestorag_set_accretion (ffedata_storage_, accter); - ffestorag_set_accretes (ffedata_storage_, ffedata_storage_size_); - } - else - { - accter = ffestorag_accretion (ffedata_storage_); - assert (ffedata_storage_size_ == (ffetargetOffset) ffebld_accter_size (accter)); - array = ffebld_accter (accter); - } - - /* Put value in accretion array at desired offset. */ - - fn = ffetarget_aggregate_ptr_memcpy - (ffedata_storage_bt_, ffedata_storage_kt_, - ffedata_basictype_, ffedata_kindtype_); - ffebld_constantarray_prepare - (&ptr1, &ptr2, &size, array, ffedata_storage_bt_, - ffedata_storage_kt_, offset, - ffebld_constant_ptr_to_union (ffebld_conter (value)), - ffedata_basictype_, ffedata_kindtype_); - (*fn) (ptr1, ptr2, size); /* Does the appropriate memcpy-like - operation. */ - ffebit_count (ffebld_accter_bits (accter), - offset, FALSE, units_expected, - &actual); /* How many FALSE? */ - if (units_expected != (ffetargetOffset) actual) - { - ffebad_start (FFEBAD_DATA_MULTIPLE); - ffebad_here (0, ffelex_token_where_line (token), - ffelex_token_where_column (token)); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - } - ffestorag_set_accretes (ffedata_storage_, - ffestorag_accretes (ffedata_storage_) - - actual); /* Decrement # of values - actually accreted. */ - ffebit_set (ffebld_accter_bits (accter), offset, - 1, units_expected); - - /* If done accreting for this storage area, establish as - initialized. */ - - if (ffestorag_accretes (ffedata_storage_) == 0) - { - ffestorag_set_init (ffedata_storage_, accter); - ffestorag_set_accretion (ffedata_storage_, NULL); - ffebit_kill (ffebld_accter_bits - (ffestorag_init (ffedata_storage_))); - ffebld_set_op (ffestorag_init (ffedata_storage_), - FFEBLD_opARRTER); - ffebld_set_arrter - (ffestorag_init (ffedata_storage_), - ffebld_accter (ffestorag_init (ffedata_storage_))); - ffebld_arrter_set_size (ffestorag_init (ffedata_storage_), - ffedata_storage_size_); - ffebld_arrter_set_pad (ffestorag_init (ffedata_storage_), - 0); - ffecom_notify_init_storage (ffedata_storage_); - } - } - - /* If still accreting, adjust specs accordingly and return. */ - - if (++ffedata_number_ < ffedata_expected_) - { - ++ffedata_offset_; - return TRUE; - } - - return ffedata_advance_ (); - } - - /* Figure out where the value goes -- in an accretion array or directly - into the final initial-value slot for the symbol. */ - - if ((ffedata_number_ != 0) - || (ffedata_arraysize_ > 1) - || (ffedata_charnumber_ != 0) - || (ffedata_size_ > ffedata_charexpected_)) - { /* Accrete this value. */ - ffetargetOffset offset; - ffebitCount actual; - ffebldConstantArray array; - ffebld accter = NULL; - - /* Calculate offset. */ - - offset = ffedata_offset_ * ffedata_size_ + ffedata_charoffset_; - - /* Is offset within range? If not, whine, but don't do anything else. */ - - if (offset + ffedata_charexpected_ - 1 > ffedata_symbolsize_) - { - ffebad_start (FFEBAD_DATA_RANGE); - ffest_ffebad_here_current_stmt (0); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - ffedata_reported_error_ = TRUE; - return FALSE; - } - - /* Does an accretion array exist? If not, create it. */ - - if (value != NULL) - { - if (ffesymbol_accretion (ffedata_symbol_) == NULL) - { -#if FFEDATA_sizeTOO_BIG_INIT_ != 0 - if (ffedata_symbolsize_ >= FFEDATA_sizeTOO_BIG_INIT_ ) - { - char bignum[40]; - - sprintf (&bignum[0], "%ld", (long) ffedata_symbolsize_); - ffebad_start (FFEBAD_TOO_BIG_INIT); - ffebad_here (0, ffelex_token_where_line (token), - ffelex_token_where_column (token)); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_string (bignum); - ffebad_finish (); - } -#endif - array = ffebld_constantarray_new - (ffedata_basictype_, ffedata_kindtype_, - ffedata_symbolsize_); - accter = ffebld_new_accter (array, - ffebit_new (ffe_pool_program_unit (), - ffedata_symbolsize_)); - ffebld_set_info (accter, ffeinfo_new - (ffedata_basictype_, - ffedata_kindtype_, - 1, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - (ffedata_basictype_ - == FFEINFO_basictypeCHARACTER) - ? 1 : FFETARGET_charactersizeNONE)); - ffesymbol_set_accretion (ffedata_symbol_, accter); - ffesymbol_set_accretes (ffedata_symbol_, ffedata_symbolsize_); - } - else - { - accter = ffesymbol_accretion (ffedata_symbol_); - assert (ffedata_symbolsize_ - == (ffetargetOffset) ffebld_accter_size (accter)); - array = ffebld_accter (accter); - } - - /* Put value in accretion array at desired offset. */ - - ffebld_constantarray_put - (array, ffedata_basictype_, ffedata_kindtype_, - offset, ffebld_constant_union (ffebld_conter (value))); - ffebit_count (ffebld_accter_bits (accter), offset, FALSE, - ffedata_charexpected_, - &actual); /* How many FALSE? */ - if (actual != (unsigned long int) ffedata_charexpected_) - { - ffebad_start (FFEBAD_DATA_MULTIPLE); - ffebad_here (0, ffelex_token_where_line (token), - ffelex_token_where_column (token)); - ffebad_string (ffesymbol_text (ffedata_symbol_)); - ffebad_finish (); - } - ffesymbol_set_accretes (ffedata_symbol_, - ffesymbol_accretes (ffedata_symbol_) - - actual); /* Decrement # of values - actually accreted. */ - ffebit_set (ffebld_accter_bits (accter), offset, - 1, ffedata_charexpected_); - ffesymbol_signal_unreported (ffedata_symbol_); - } - - /* If still accreting, adjust specs accordingly and return. */ - - if (++ffedata_number_ < ffedata_expected_) - { - ++ffedata_offset_; - return TRUE; - } - - /* Else, if done accreting for this symbol, establish as initialized. */ - - if ((value != NULL) - && (ffesymbol_accretes (ffedata_symbol_) == 0)) - { - ffesymbol_set_init (ffedata_symbol_, accter); - ffesymbol_set_accretion (ffedata_symbol_, NULL); - ffebit_kill (ffebld_accter_bits (ffesymbol_init (ffedata_symbol_))); - ffebld_set_op (ffesymbol_init (ffedata_symbol_), FFEBLD_opARRTER); - ffebld_set_arrter (ffesymbol_init (ffedata_symbol_), - ffebld_accter (ffesymbol_init (ffedata_symbol_))); - ffebld_arrter_set_size (ffesymbol_init (ffedata_symbol_), - ffedata_symbolsize_); - ffebld_arrter_set_pad (ffestorag_init (ffedata_symbol_), 0); - ffecom_notify_init_symbol (ffedata_symbol_); - } - } - else if (value != NULL) - { - /* Simple, direct, one-shot assignment. */ - ffesymbol_set_init (ffedata_symbol_, value); - ffecom_notify_init_symbol (ffedata_symbol_); - } - - /* Call on advance function to get next target in list. */ - - return ffedata_advance_ (); -} diff --git a/contrib/gcc/f/data.h b/contrib/gcc/f/data.h deleted file mode 100644 index a99369d..0000000 --- a/contrib/gcc/f/data.h +++ /dev/null @@ -1,74 +0,0 @@ -/* data.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - data.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_DATA_H -#define GCC_F_DATA_H - -/* Simple definitions and enumerations. */ - - -/* Typedefs. */ - - -/* Include files needed by this one. */ - -#include "bld.h" -#include "lex.h" -#include "storag.h" - -/* Structure definitions. */ - - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -void ffedata_begin (ffebld list); -bool ffedata_end (bool report_errors, ffelexToken t); -void ffedata_gather (ffestorag st); -bool ffedata_value (ffetargetIntegerDefault rpt, ffebld value, - ffelexToken value_token); - -/* Define macros. */ - -#define ffedata_init_0() -#define ffedata_init_1() -#define ffedata_init_2() -#define ffedata_init_3() -#define ffedata_init_4() -#define ffedata_terminate_0() -#define ffedata_terminate_1() -#define ffedata_terminate_2() -#define ffedata_terminate_3() -#define ffedata_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_DATA_H */ diff --git a/contrib/gcc/f/equiv.c b/contrib/gcc/f/equiv.c deleted file mode 100644 index bd7ac6d..0000000 --- a/contrib/gcc/f/equiv.c +++ /dev/null @@ -1,1484 +0,0 @@ -/* equiv.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 1997, 1998, 2003 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - Handles the EQUIVALENCE relationships in a program unit. - - Modifications: -*/ - -#define FFEEQUIV_DEBUG 0 - -/* Include files. */ - -#include "proj.h" -#include "equiv.h" -#include "bad.h" -#include "bld.h" -#include "com.h" -#include "data.h" -#include "global.h" -#include "lex.h" -#include "malloc.h" -#include "symbol.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - -struct _ffeequiv_list_ - { - ffeequiv first; - ffeequiv last; - }; - -/* Static objects accessed by functions in this module. */ - -static struct _ffeequiv_list_ ffeequiv_list_; - -/* Static functions (internal). */ - -static void ffeequiv_destroy_ (ffeequiv eq); -static void ffeequiv_layout_local_ (ffeequiv eq); -static bool ffeequiv_offset_ (ffetargetOffset *offset, ffesymbol s, - ffebld expr, bool subtract, - ffetargetOffset adjust, bool no_precede); - -/* Internal macros. */ - - -static void -ffeequiv_destroy_ (ffeequiv victim) -{ - ffebld list; - ffebld item; - ffebld expr; - - for (list = victim->list; list != NULL; list = ffebld_trail (list)) - { - for (item = ffebld_head (list); item != NULL; item = ffebld_trail (item)) - { - ffesymbol sym; - - expr = ffebld_head (item); - sym = ffeequiv_symbol (expr); - if (sym == NULL) - continue; - if (ffesymbol_equiv (sym) != NULL) - ffesymbol_set_equiv (sym, NULL); - } - } - ffeequiv_kill (victim); -} - -/* ffeequiv_layout_local_ -- Lay out storage for local equivalenced vars - - ffeequiv eq; - ffeequiv_layout_local_(eq); - - Makes a single master ffestorag object that contains all the vars - in the equivalence, and makes subordinate ffestorag objects for the - vars with the correct offsets. - - The resulting var offsets are relative not necessarily to 0 -- the - are relative to the offset of the master area, which might be 0 or - negative, but should never be positive. */ - -static void -ffeequiv_layout_local_ (ffeequiv eq) -{ - ffestorag st; /* Equivalence storage area. */ - ffebld list; /* List of list of equivalences. */ - ffebld item; /* List of equivalences. */ - ffebld root_exp; /* Expression for root sym. */ - ffestorag root_st; /* Storage for root. */ - ffesymbol root_sym; /* Root itself. */ - ffebld rooted_exp; /* Expression for rooted sym in an eqlist. */ - ffestorag rooted_st; /* Storage for rooted. */ - ffesymbol rooted_sym; /* Rooted symbol itself. */ - ffetargetOffset eqlist_offset;/* Offset for eqlist from rooted sym. */ - ffetargetAlign alignment; - ffetargetAlign modulo; - ffetargetAlign pad; - ffetargetOffset size; - ffetargetOffset num_elements; - bool new_storage; /* Established new storage info. */ - bool need_storage; /* Have need for more storage info. */ - bool init; - - assert (eq != NULL); - - if (ffeequiv_common (eq) != NULL) - { /* Put in common due to programmer error. */ - ffeequiv_destroy_ (eq); - return; - } - - /* Find the symbol for the first valid item in the list of lists, use that - as the root symbol. Doesn't matter if it won't end up at the beginning - of the list, though. */ - -#if FFEEQUIV_DEBUG - fprintf (stderr, "Equiv1:\n"); -#endif - - root_sym = NULL; - root_exp = NULL; - - for (list = ffeequiv_list (eq); - list != NULL; - list = ffebld_trail (list)) - { /* For every equivalence list in the list of - equivs */ - for (item = ffebld_head (list); - item != NULL; - item = ffebld_trail (item)) - { /* For every equivalence item in the list */ - ffetargetOffset ign; /* Ignored. */ - - root_exp = ffebld_head (item); - root_sym = ffeequiv_symbol (root_exp); - if (root_sym == NULL) - continue; /* Ignore me. */ - - assert (ffesymbol_storage (root_sym) == NULL); /* No storage yet. */ - - if (!ffeequiv_offset_ (&ign, root_sym, root_exp, FALSE, 0, FALSE)) - { - /* We can't just eliminate this one symbol from the list - of candidates, because it might be the only one that - ties all these equivs together. So just destroy the - whole list. */ - - ffeequiv_destroy_ (eq); - return; - } - - break; /* Use first valid eqv expr for root exp/sym. */ - } - if (root_sym != NULL) - break; - } - - if (root_sym == NULL) - { - ffeequiv_destroy_ (eq); - return; - } - - -#if FFEEQUIV_DEBUG - fprintf (stderr, " Root: `%s'\n", ffesymbol_text (root_sym)); -#endif - - /* We've got work to do, so make the LOCAL storage object that'll hold all - the equivalenced vars inside it. */ - - st = ffestorag_new (ffestorag_list_master ()); - ffestorag_set_parent (st, NULL); /* Initializations happen here. */ - ffestorag_set_init (st, NULL); - ffestorag_set_accretion (st, NULL); - ffestorag_set_offset (st, 0); /* Assume equiv will be at root offset 0 for now. */ - ffestorag_set_alignment (st, 1); - ffestorag_set_modulo (st, 0); - ffestorag_set_type (st, FFESTORAG_typeLOCAL); - ffestorag_set_basictype (st, ffesymbol_basictype (root_sym)); - ffestorag_set_kindtype (st, ffesymbol_kindtype (root_sym)); - ffestorag_set_typesymbol (st, root_sym); - ffestorag_set_is_save (st, ffeequiv_is_save (eq)); - if (ffesymbol_is_save (root_sym)) - ffestorag_update_save (st); - ffestorag_set_is_init (st, ffeequiv_is_init (eq)); - if (ffesymbol_is_init (root_sym)) - ffestorag_update_init (st); - ffestorag_set_symbol (st, root_sym); /* Assume this will be the root until - we know better (used only to generate - the internal name for the aggregate area, - e.g. for debugging). */ - - /* Make the EQUIV storage object for the root symbol. */ - - if (ffesymbol_rank (root_sym) == 0) - num_elements = 1; - else - num_elements = ffebld_constant_integerdefault (ffebld_conter - (ffesymbol_arraysize (root_sym))); - ffetarget_layout (ffesymbol_text (root_sym), &alignment, &modulo, &size, - ffesymbol_basictype (root_sym), ffesymbol_kindtype (root_sym), - ffesymbol_size (root_sym), num_elements); - ffestorag_set_size (st, size); /* Set initial size of aggregate area. */ - - pad = ffetarget_align (ffestorag_ptr_to_alignment (st), - ffestorag_ptr_to_modulo (st), 0, alignment, - modulo); - assert (pad == 0); - - root_st = ffestorag_new (ffestorag_list_equivs (st)); - ffestorag_set_parent (root_st, st); /* Initializations happen there. */ - ffestorag_set_init (root_st, NULL); - ffestorag_set_accretion (root_st, NULL); - ffestorag_set_symbol (root_st, root_sym); - ffestorag_set_size (root_st, size); - ffestorag_set_offset (root_st, 0); /* Will not change; always 0 relative to itself! */ - ffestorag_set_alignment (root_st, alignment); - ffestorag_set_modulo (root_st, modulo); - ffestorag_set_type (root_st, FFESTORAG_typeEQUIV); - ffestorag_set_basictype (root_st, ffesymbol_basictype (root_sym)); - ffestorag_set_kindtype (root_st, ffesymbol_kindtype (root_sym)); - ffestorag_set_typesymbol (root_st, root_sym); - ffestorag_set_is_save (root_st, FALSE); /* Assume FALSE, then... */ - if (ffestorag_is_save (st)) /* ...update to TRUE if needed. */ - ffestorag_update_save (root_st); - ffestorag_set_is_init (root_st, FALSE); /* Assume FALSE, then... */ - if (ffestorag_is_init (st)) /* ...update to TRUE if needed. */ - ffestorag_update_init (root_st); - ffesymbol_set_storage (root_sym, root_st); - ffesymbol_signal_unreported (root_sym); - init = ffesymbol_is_init (root_sym); - - /* Now that we know the root (offset=0) symbol, revisit all the lists and - do the actual storage allocation. Keep doing this until we've gone - through them all without making any new storage objects. */ - - do - { - new_storage = FALSE; - need_storage = FALSE; - for (list = ffeequiv_list (eq); - list != NULL; - list = ffebld_trail (list)) - { /* For every equivalence list in the list of - equivs */ - /* Now find a "rooted" symbol in this list. That is, find the - first item we can that is valid and whose symbol already - has a storage area, because that means we know where it - belongs in the equivalence area and can then allocate the - rest of the items in the list accordingly. */ - - rooted_sym = NULL; - rooted_exp = NULL; - eqlist_offset = 0; - - for (item = ffebld_head (list); - item != NULL; - item = ffebld_trail (item)) - { /* For every equivalence item in the list */ - rooted_exp = ffebld_head (item); - rooted_sym = ffeequiv_symbol (rooted_exp); - if ((rooted_sym == NULL) - || ((rooted_st = ffesymbol_storage (rooted_sym)) == NULL)) - { - rooted_sym = NULL; - continue; /* Ignore me. */ - } - - need_storage = TRUE; /* Somebody is likely to need - storage. */ - -#if FFEEQUIV_DEBUG - fprintf (stderr, " Rooted: `%s' at %" ffetargetOffset_f "d\n", - ffesymbol_text (rooted_sym), - ffestorag_offset (rooted_st)); -#endif - - /* The offset of this symbol from the equiv's root symbol - is already known, and the size of this symbol is already - incorporated in the size of the equiv's aggregate area. - What we now determine is the offset of this equivalence - _list_ from the equiv's root symbol. - - For example, if we know that A is at offset 16 from the - root symbol, given EQUIVALENCE (B(24),A(2)), we're looking - at A(2), meaning that the offset for this equivalence list - is 20 (4 bytes beyond the beginning of A, assuming typical - array types, dimensions, and type info). */ - - if (!ffeequiv_offset_ (&eqlist_offset, rooted_sym, rooted_exp, FALSE, - ffestorag_offset (rooted_st), FALSE)) - - { /* Can't use this one. */ - ffesymbol_set_equiv (rooted_sym, NULL);/* Equiv area slated for - death. */ - rooted_sym = NULL; - continue; /* Something's wrong with eqv expr, try another. */ - } - -#if FFEEQUIV_DEBUG - fprintf (stderr, " Eqlist offset: %" ffetargetOffset_f "d\n", - eqlist_offset); -#endif - - break; - } - - /* If no rooted symbol, it means this list has no roots -- yet. - So, forget this list this time around, but we'll get back - to it after the outer loop iterates at least one more time, - and, ultimately, it will have a root. */ - - if (rooted_sym == NULL) - { -#if FFEEQUIV_DEBUG - fprintf (stderr, "No roots.\n"); -#endif - continue; - } - - /* We now have a rooted symbol/expr and the offset of this equivalence - list from the root symbol. The other expressions in this - list all identify an initial storage unit that must have the - same offset. */ - - for (item = ffebld_head (list); - item != NULL; - item = ffebld_trail (item)) - { /* For every equivalence item in the list */ - ffebld item_exp; /* Expression for equivalence. */ - ffestorag item_st; /* Storage for var. */ - ffesymbol item_sym; /* Var itself. */ - ffetargetOffset item_offset; /* Offset for var from root. */ - ffetargetOffset new_size; - - item_exp = ffebld_head (item); - item_sym = ffeequiv_symbol (item_exp); - if ((item_sym == NULL) - || (ffesymbol_equiv (item_sym) == NULL)) - continue; /* Ignore me. */ - - if (item_sym == rooted_sym) - continue; /* Rooted sym already set up. */ - - if (!ffeequiv_offset_ (&item_offset, item_sym, item_exp, TRUE, - eqlist_offset, FALSE)) - { - ffesymbol_set_equiv (item_sym, NULL); /* Don't bother with me anymore. */ - continue; - } - -#if FFEEQUIV_DEBUG - fprintf (stderr, " Item `%s' at %" ffetargetOffset_f "d", - ffesymbol_text (item_sym), item_offset); -#endif - - if (ffesymbol_rank (item_sym) == 0) - num_elements = 1; - else - num_elements = ffebld_constant_integerdefault (ffebld_conter - (ffesymbol_arraysize (item_sym))); - ffetarget_layout (ffesymbol_text (item_sym), &alignment, &modulo, - &size, ffesymbol_basictype (item_sym), - ffesymbol_kindtype (item_sym), ffesymbol_size (item_sym), - num_elements); - pad = ffetarget_align (ffestorag_ptr_to_alignment (st), - ffestorag_ptr_to_modulo (st), - item_offset, alignment, modulo); - if (pad != 0) - { - ffebad_start (FFEBAD_EQUIV_ALIGN); - ffebad_string (ffesymbol_text (item_sym)); - ffebad_finish (); - ffesymbol_set_equiv (item_sym, NULL); /* Don't bother with me anymore. */ - continue; - } - - /* If the variable's offset is less than the offset for the - aggregate storage area, it means it has to expand backwards - -- i.e. the new known starting point of the area precedes the - old one. This can't happen with COMMON areas (the standard, - and common sense, disallow it), but it is normal for local - EQUIVALENCE areas. - - Also handle choosing the "documented" rooted symbol for this - area here. It's the symbol at the bottom (lowest offset) - of the aggregate area, with ties going to the name that would - sort to the top of the list of ties. */ - - if (item_offset == ffestorag_offset (st)) - { - if ((item_sym != ffestorag_symbol (st)) - && (strcmp (ffesymbol_text (item_sym), - ffesymbol_text (ffestorag_symbol (st))) - < 0)) - ffestorag_set_symbol (st, item_sym); - } - else if (item_offset < ffestorag_offset (st)) - { - /* Increase size of equiv area to start for lower offset - relative to root symbol. */ - if (! ffetarget_offset_add (&new_size, - ffestorag_offset (st) - - item_offset, - ffestorag_size (st))) - ffetarget_offset_overflow (ffesymbol_text (s)); - else - ffestorag_set_size (st, new_size); - - ffestorag_set_symbol (st, item_sym); - ffestorag_set_offset (st, item_offset); - -#if FFEEQUIV_DEBUG - fprintf (stderr, " [eq offset=%" ffetargetOffset_f - "d, size=%" ffetargetOffset_f "d]", - item_offset, new_size); -#endif - } - - if ((item_st = ffesymbol_storage (item_sym)) == NULL) - { /* Create new ffestorag object, extend equiv - area. */ -#if FFEEQUIV_DEBUG - fprintf (stderr, ".\n"); -#endif - new_storage = TRUE; - item_st = ffestorag_new (ffestorag_list_equivs (st)); - ffestorag_set_parent (item_st, st); /* Initializations - happen there. */ - ffestorag_set_init (item_st, NULL); - ffestorag_set_accretion (item_st, NULL); - ffestorag_set_symbol (item_st, item_sym); - ffestorag_set_size (item_st, size); - ffestorag_set_offset (item_st, item_offset); - ffestorag_set_alignment (item_st, alignment); - ffestorag_set_modulo (item_st, modulo); - ffestorag_set_type (item_st, FFESTORAG_typeEQUIV); - ffestorag_set_basictype (item_st, ffesymbol_basictype (item_sym)); - ffestorag_set_kindtype (item_st, ffesymbol_kindtype (item_sym)); - ffestorag_set_typesymbol (item_st, item_sym); - ffestorag_set_is_save (item_st, FALSE); /* Assume FALSE... */ - if (ffestorag_is_save (st)) /* ...update TRUE */ - ffestorag_update_save (item_st); /* if needed. */ - ffestorag_set_is_init (item_st, FALSE); /* Assume FALSE... */ - if (ffestorag_is_init (st)) /* ...update TRUE */ - ffestorag_update_init (item_st); /* if needed. */ - ffesymbol_set_storage (item_sym, item_st); - ffesymbol_signal_unreported (item_sym); - if (ffesymbol_is_init (item_sym)) - init = TRUE; - - /* Determine new size of equiv area, complain if overflow. */ - - if (!ffetarget_offset_add (&size, item_offset, size) - || !ffetarget_offset_add (&size, -ffestorag_offset (st), size)) - ffetarget_offset_overflow (ffesymbol_text (s)); - else if (size > ffestorag_size (st)) - ffestorag_set_size (st, size); - ffestorag_update (st, item_sym, ffesymbol_basictype (item_sym), - ffesymbol_kindtype (item_sym)); - } - else - { -#if FFEEQUIV_DEBUG - fprintf (stderr, " (was %" ffetargetOffset_f "d).\n", - ffestorag_offset (item_st)); -#endif - /* Make sure offset agrees with known offset. */ - if (item_offset != ffestorag_offset (item_st)) - { - char io1[40]; - char io2[40]; - - sprintf (&io1[0], "%" ffetargetOffset_f "d", item_offset); - sprintf (&io2[0], "%" ffetargetOffset_f "d", ffestorag_offset (item_st)); - ffebad_start (FFEBAD_EQUIV_MISMATCH); - ffebad_string (ffesymbol_text (item_sym)); - ffebad_string (ffesymbol_text (root_sym)); - ffebad_string (io1); - ffebad_string (io2); - ffebad_finish (); - } - } - ffesymbol_set_equiv (item_sym, NULL); /* Don't bother with me anymore. */ - } /* (For every equivalence item in the list) */ - ffebld_set_head (list, NULL); /* Don't do this list again. */ - } /* (For every equivalence list in the list of - equivs) */ - } while (new_storage && need_storage); - - ffesymbol_set_equiv (root_sym, NULL); /* This one has storage now. */ - - ffeequiv_kill (eq); /* Fully processed, no longer needed. */ - - /* If the offset for this storage area is zero (it cannot be positive), - that means the alignment/modulo info is already correct. Otherwise, - the alignment info is correct, but the modulo info reflects a - zero offset, so fix it. */ - - if (ffestorag_offset (st) < 0) - { - /* Calculate the initial padding necessary to preserve - the alignment/modulo requirements for the storage area. - These requirements are themselves kept track of in the - record for the storage area as a whole, but really pertain - to offset 0 of that area, which is where the root symbol - was originally placed. - - The goal here is to have the offset and size for the area - faithfully reflect the area itself, not extra requirements - like alignment. So to meet the alignment requirements, - the modulo for the area should be set as if the area had an - alignment requirement of alignment/0 and was aligned/padded - downward to meet the alignment requirements of the area at - offset zero, the amount of padding needed being the desired - value for the modulo of the area. */ - - alignment = ffestorag_alignment (st); - modulo = ffestorag_modulo (st); - - /* Since we want to move the whole area *down* (lower memory - addresses) as required by the alignment/modulo paid, negate - the offset to ffetarget_align, which assumes aligning *up* - is desired. */ - pad = ffetarget_align (&alignment, &modulo, - - ffestorag_offset (st), - alignment, 0); - ffestorag_set_modulo (st, pad); - } - - if (init) - ffedata_gather (st); /* Gather subordinate inits into one init. */ -} - -/* ffeequiv_offset_ -- Determine offset from start of symbol - - ffetargetOffset offset; - ffesymbol s; // Symbol for error reporting. - ffebld expr; // opSUBSTR, opARRAYREF, opSYMTER, opANY. - bool subtract; // FALSE means add to adjust, TRUE means subtract from it. - ffetargetOffset adjust; // Helps keep answer in pos range (unsigned). - if (!ffeequiv_offset_(&offset,s,expr,subtract,adjust)) - // error doing the calculation, message already printed - - Returns the offset represented by the SUBSTR, ARRAYREF, or SUBSTR/ARRAYREF - combination added-to/subtracted-from the adjustment specified. If there - is an error of some kind, returns FALSE, else returns TRUE. Note that - only the first storage unit specified is considered; A(1:1) and A(1:2000) - have the same first storage unit and so return the same offset. */ - -static bool -ffeequiv_offset_ (ffetargetOffset *offset, ffesymbol s UNUSED, - ffebld expr, bool subtract, ffetargetOffset adjust, - bool no_precede) -{ - ffetargetIntegerDefault value = 0; - ffetargetOffset cval; /* Converted value. */ - ffesymbol sym; - - if (expr == NULL) - return FALSE; - -again: /* :::::::::::::::::::: */ - - switch (ffebld_op (expr)) - { - case FFEBLD_opANY: - return FALSE; - - case FFEBLD_opSYMTER: - { - ffetargetOffset size; /* Size of a single unit. */ - ffetargetAlign a; /* Ignored. */ - ffetargetAlign m; /* Ignored. */ - - sym = ffebld_symter (expr); - if (ffesymbol_basictype (sym) == FFEINFO_basictypeANY) - return FALSE; - - ffetarget_layout (ffesymbol_text (sym), &a, &m, &size, - ffesymbol_basictype (sym), - ffesymbol_kindtype (sym), 1, 1); - - if (value < 0) - { /* Really invalid, as in A(-2:5), but in case - it's wanted.... */ - if (!ffetarget_offset (&cval, -value)) - return FALSE; - - if (!ffetarget_offset_multiply (&cval, cval, size)) - return FALSE; - - if (subtract) - return ffetarget_offset_add (offset, cval, adjust); - - if (no_precede && (cval > adjust)) - { - neg: /* :::::::::::::::::::: */ - ffebad_start (FFEBAD_COMMON_NEG); - ffebad_string (ffesymbol_text (sym)); - ffebad_finish (); - return FALSE; - } - return ffetarget_offset_add (offset, -cval, adjust); - } - - if (!ffetarget_offset (&cval, value)) - return FALSE; - - if (!ffetarget_offset_multiply (&cval, cval, size)) - return FALSE; - - if (!subtract) - return ffetarget_offset_add (offset, cval, adjust); - - if (no_precede && (cval > adjust)) - goto neg; /* :::::::::::::::::::: */ - - return ffetarget_offset_add (offset, -cval, adjust); - } - - case FFEBLD_opARRAYREF: - { - ffebld symexp = ffebld_left (expr); - ffebld subscripts = ffebld_right (expr); - ffebld dims; - ffetargetIntegerDefault width; - ffetargetIntegerDefault arrayval; - ffetargetIntegerDefault lowbound; - ffetargetIntegerDefault highbound; - ffebld subscript; - ffebld dim; - ffebld low; - ffebld high; - int rank = 0; - - if (ffebld_op (symexp) != FFEBLD_opSYMTER) - return FALSE; - - sym = ffebld_symter (symexp); - if (ffesymbol_basictype (sym) == FFEINFO_basictypeANY) - return FALSE; - - if (ffesymbol_size (sym) == FFETARGET_charactersizeNONE) - width = 1; - else - width = ffesymbol_size (sym); - dims = ffesymbol_dims (sym); - - while (subscripts != NULL) - { - ++rank; - if (dims == NULL) - { - ffebad_start (FFEBAD_EQUIV_MANY); - ffebad_string (ffesymbol_text (sym)); - ffebad_finish (); - return FALSE; - } - - subscript = ffebld_head (subscripts); - dim = ffebld_head (dims); - - if (ffebld_op (subscript) == FFEBLD_opANY) - return FALSE; - - assert (ffebld_op (subscript) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (subscript)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (subscript)) - == FFEINFO_kindtypeINTEGERDEFAULT); - arrayval = ffebld_constant_integerdefault (ffebld_conter - (subscript)); - - if (ffebld_op (dim) == FFEBLD_opANY) - return FALSE; - - assert (ffebld_op (dim) == FFEBLD_opBOUNDS); - low = ffebld_left (dim); - high = ffebld_right (dim); - - if (low == NULL) - lowbound = 1; - else - { - if (ffebld_op (low) == FFEBLD_opANY) - return FALSE; - - assert (ffebld_op (low) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (low)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (low)) - == FFEINFO_kindtypeINTEGERDEFAULT); - lowbound - = ffebld_constant_integerdefault (ffebld_conter (low)); - } - - if (ffebld_op (high) == FFEBLD_opANY) - return FALSE; - - assert (ffebld_op (high) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (high)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (high)) - == FFEINFO_kindtypeINTEGER1); - highbound - = ffebld_constant_integerdefault (ffebld_conter (high)); - - if ((arrayval < lowbound) || (arrayval > highbound)) - { - char rankstr[10]; - - sprintf (rankstr, "%d", rank); - ffebad_start (FFEBAD_EQUIV_SUBSCRIPT); - ffebad_string (ffesymbol_text (sym)); - ffebad_string (rankstr); - ffebad_finish (); - } - - subscripts = ffebld_trail (subscripts); - dims = ffebld_trail (dims); - - value += width * (arrayval - lowbound); - if (subscripts != NULL) - width *= highbound - lowbound + 1; - } - - if (dims != NULL) - { - ffebad_start (FFEBAD_EQUIV_FEW); - ffebad_string (ffesymbol_text (sym)); - ffebad_finish (); - return FALSE; - } - - expr = symexp; - } - goto again; /* :::::::::::::::::::: */ - - case FFEBLD_opSUBSTR: - { - ffebld begin = ffebld_head (ffebld_right (expr)); - - expr = ffebld_left (expr); - if (ffebld_op (expr) == FFEBLD_opANY) - return FALSE; - if (ffebld_op (expr) == FFEBLD_opARRAYREF) - sym = ffebld_symter (ffebld_left (expr)); - else if (ffebld_op (expr) == FFEBLD_opSYMTER) - sym = ffebld_symter (expr); - else - sym = NULL; - - if ((sym != NULL) - && (ffesymbol_basictype (sym) == FFEINFO_basictypeANY)) - return FALSE; - - if (begin == NULL) - value = 0; - else - { - if (ffebld_op (begin) == FFEBLD_opANY) - return FALSE; - assert (ffebld_op (begin) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (begin)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (begin)) - == FFEINFO_kindtypeINTEGERDEFAULT); - - value = ffebld_constant_integerdefault (ffebld_conter (begin)); - - if ((value < 1) - || ((sym != NULL) - && (value > ffesymbol_size (sym)))) - { - ffebad_start (FFEBAD_EQUIV_RANGE); - ffebad_string (ffesymbol_text (sym)); - ffebad_finish (); - } - - --value; - } - if ((sym != NULL) - && (ffesymbol_basictype (sym) != FFEINFO_basictypeCHARACTER)) - { - ffebad_start (FFEBAD_EQUIV_SUBSTR); - ffebad_string (ffesymbol_text (sym)); - ffebad_finish (); - value = 0; - } - } - goto again; /* :::::::::::::::::::: */ - - default: - assert ("bad op" == NULL); - return FALSE; - } - -} - -/* ffeequiv_add -- Add list of equivalences to list of lists for eq object - - ffeequiv eq; - ffebld list; - ffelexToken t; // points to first item in equivalence list - ffeequiv_add(eq,list,t); - - Check the list to make sure only one common symbol is involved (even - if multiple times) and agrees with the common symbol for the equivalence - object (or it has no common symbol until now). Prepend (or append, it - doesn't matter) the list to the list of lists for the equivalence object. - Otherwise report an error and return. */ - -void -ffeequiv_add (ffeequiv eq, ffebld list, ffelexToken t) -{ - ffebld item; - ffesymbol symbol; - ffesymbol common = ffeequiv_common (eq); - - for (item = list; item != NULL; item = ffebld_trail (item)) - { - symbol = ffeequiv_symbol (ffebld_head (item)); - - if (ffesymbol_common (symbol) != NULL) /* Is symbol known in COMMON yet? */ - { - if (common == NULL) - common = ffesymbol_common (symbol); - else if (common != ffesymbol_common (symbol)) - { - /* Yes, and symbol disagrees with others on the COMMON area. */ - ffebad_start (FFEBAD_EQUIV_COMMON); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (ffesymbol_text (common)); - ffebad_string (ffesymbol_text (ffesymbol_common (symbol))); - ffebad_finish (); - return; - } - } - } - - if ((common != NULL) - && (ffeequiv_common (eq) == NULL)) /* Is COMMON involved already? */ - ffeequiv_set_common (eq, common); /* No, but it is now. */ - - for (item = list; item != NULL; item = ffebld_trail (item)) - { - symbol = ffeequiv_symbol (ffebld_head (item)); - - if (ffesymbol_equiv (symbol) == NULL) - ffesymbol_set_equiv (symbol, eq); - else - assert (ffesymbol_equiv (symbol) == eq); - - if (ffesymbol_common (symbol) == NULL) /* Is symbol in a COMMON - area? */ - { /* No (at least not yet). */ - if (ffesymbol_is_save (symbol)) - ffeequiv_update_save (eq); /* EQUIVALENCE has >=1 SAVEd entity. */ - if (ffesymbol_is_init (symbol)) - ffeequiv_update_init (eq); /* EQUIVALENCE has >=1 init'd entity. */ - continue; /* Nothing more to do here. */ - } - -#if FFEGLOBAL_ENABLED - if (ffesymbol_is_init (symbol)) - ffeglobal_init_common (ffesymbol_common (symbol), t); -#endif - - if (ffesymbol_is_save (ffesymbol_common (symbol))) - ffeequiv_update_save (eq); /* EQUIVALENCE is in a SAVEd COMMON block. */ - if (ffesymbol_is_init (ffesymbol_common (symbol))) - ffeequiv_update_init (eq); /* EQUIVALENCE is in a init'd COMMON block. */ - } - - ffeequiv_set_list (eq, ffebld_new_item (list, ffeequiv_list (eq))); -} - -/* ffeequiv_exec_transition -- Do the hard work on all the equivalence objects - - ffeequiv_exec_transition(); */ - -void -ffeequiv_exec_transition (void) -{ - while (ffeequiv_list_.first != (ffeequiv) &ffeequiv_list_.first) - ffeequiv_layout_local_ (ffeequiv_list_.first); -} - -/* ffeequiv_init_2 -- Initialize for new program unit - - ffeequiv_init_2(); - - Initializes the list of equivalences. */ - -void -ffeequiv_init_2 (void) -{ - ffeequiv_list_.first = (ffeequiv) &ffeequiv_list_.first; - ffeequiv_list_.last = (ffeequiv) &ffeequiv_list_.first; -} - -/* ffeequiv_kill -- Kill equivalence object after removing from list - - ffeequiv eq; - ffeequiv_kill(eq); - - Removes equivalence object from master list, then kills it. */ - -void -ffeequiv_kill (ffeequiv victim) -{ - victim->next->previous = victim->previous; - victim->previous->next = victim->next; - if (ffe_is_do_internal_checks ()) - { - ffebld list; - ffebld item; - ffebld expr; - - /* Assert that nobody our victim points to still points to it. */ - - assert ((victim->common == NULL) - || (ffesymbol_equiv (victim->common) == NULL)); - - for (list = victim->list; list != NULL; list = ffebld_trail (list)) - { - for (item = ffebld_head (list); item != NULL; item = ffebld_trail (item)) - { - ffesymbol sym; - - expr = ffebld_head (item); - sym = ffeequiv_symbol (expr); - if (sym == NULL) - continue; - assert (ffesymbol_equiv (sym) != victim); - } - } - } - malloc_kill_ks (ffe_pool_program_unit (), victim, sizeof (*victim)); -} - -/* ffeequiv_layout_cblock -- Lay out storage for common area - - ffestorag st; - if (ffeequiv_layout_cblock(st)) - // at least one equiv'd symbol has init/accretion expr. - - Now that the explicitly COMMONed variables in the common area (whose - ffestorag object is passed) have been laid out, lay out the storage - for all variables equivalenced into the area by making subordinate - ffestorag objects for them. */ - -bool -ffeequiv_layout_cblock (ffestorag st) -{ - ffesymbol s = ffestorag_symbol (st); /* CBLOCK symbol. */ - ffebld list; /* List of explicit common vars, in order, in - s. */ - ffebld item; /* List of list of equivalences in a given - explicit common var. */ - ffebld root; /* Expression for (1st) explicit common var - in list of eqs. */ - ffestorag rst; /* Storage for root. */ - ffetargetOffset root_offset; /* Offset for root into common area. */ - ffesymbol sr; /* Root itself. */ - ffeequiv seq; /* Its equivalence object, if any. */ - ffebld var; /* Expression for equivalence. */ - ffestorag vst; /* Storage for var. */ - ffetargetOffset var_offset; /* Offset for var into common area. */ - ffesymbol sv; /* Var itself. */ - ffebld altroot; /* Alternate root. */ - ffesymbol altrootsym; /* Alternate root symbol. */ - ffetargetAlign alignment; - ffetargetAlign modulo; - ffetargetAlign pad; - ffetargetOffset size; - ffetargetOffset num_elements; - bool new_storage; /* Established new storage info. */ - bool need_storage; /* Have need for more storage info. */ - bool ok; - bool init = FALSE; - - assert (st != NULL); - assert (ffestorag_type (st) == FFESTORAG_typeCBLOCK); - assert (ffesymbol_kind (ffestorag_symbol (st)) == FFEINFO_kindCOMMON); - - for (list = ffesymbol_commonlist (ffestorag_symbol (st)); - list != NULL; - list = ffebld_trail (list)) - { /* For every variable in the common area */ - assert (ffebld_op (ffebld_head (list)) == FFEBLD_opSYMTER); - sr = ffebld_symter (ffebld_head (list)); - if ((seq = ffesymbol_equiv (sr)) == NULL) - continue; /* No equivalences to process. */ - rst = ffesymbol_storage (sr); - if (rst == NULL) - { - assert (ffesymbol_kind (sr) == FFEINFO_kindANY); - continue; - } - ffesymbol_set_equiv (sr, NULL); /* Cancel ref to equiv obj. */ - do - { - new_storage = FALSE; - need_storage = FALSE; - for (item = ffeequiv_list (seq); /* Get list of equivs. */ - item != NULL; - item = ffebld_trail (item)) - { /* For every eqv list in the list of equivs - for the variable */ - altroot = NULL; - altrootsym = NULL; - for (root = ffebld_head (item); - root != NULL; - root = ffebld_trail (root)) - { /* For every equivalence item in the list */ - sv = ffeequiv_symbol (ffebld_head (root)); - if (sv == sr) - break; /* Found first mention of "rooted" symbol. */ - if (ffesymbol_storage (sv) != NULL) - { - altroot = root; /* If no mention, use this guy - instead. */ - altrootsym = sv; - } - } - if (root != NULL) - { - root = ffebld_head (root); /* Lose its opITEM. */ - ok = ffeequiv_offset_ (&root_offset, sr, root, FALSE, - ffestorag_offset (rst), TRUE); - /* Equiv point prior to start of common area? */ - } - else if (altroot != NULL) - { - /* Equiv point prior to start of common area? */ - root = ffebld_head (altroot); - ok = ffeequiv_offset_ (&root_offset, altrootsym, root, - FALSE, - ffestorag_offset (ffesymbol_storage (altrootsym)), - TRUE); - ffesymbol_set_equiv (altrootsym, NULL); - } - else - /* No rooted symbol in list of equivalences! */ - { /* Assume this was due to opANY and ignore - this list for now. */ - need_storage = TRUE; - continue; - } - - /* We now know the root symbol and the operating offset of that - root into the common area. The other expressions in the - list all identify an initial storage unit that must have the - same offset. */ - - for (var = ffebld_head (item); - var != NULL; - var = ffebld_trail (var)) - { /* For every equivalence item in the list */ - if (ffebld_head (var) == root) - continue; /* Except root, of course. */ - sv = ffeequiv_symbol (ffebld_head (var)); - if (sv == NULL) - continue; /* Except erroneous stuff (opANY). */ - ffesymbol_set_equiv (sv, NULL); /* Don't need this ref - anymore. */ - if (!ok - || !ffeequiv_offset_ (&var_offset, sv, - ffebld_head (var), TRUE, - root_offset, TRUE)) - continue; /* Can't do negative offset wrt COMMON. */ - - if (ffesymbol_rank (sv) == 0) - num_elements = 1; - else - num_elements = ffebld_constant_integerdefault - (ffebld_conter (ffesymbol_arraysize (sv))); - ffetarget_layout (ffesymbol_text (sv), &alignment, - &modulo, &size, - ffesymbol_basictype (sv), - ffesymbol_kindtype (sv), - ffesymbol_size (sv), num_elements); - pad = ffetarget_align (ffestorag_ptr_to_alignment (st), - ffestorag_ptr_to_modulo (st), - var_offset, alignment, modulo); - if (pad != 0) - { - ffebad_start (FFEBAD_EQUIV_ALIGN); - ffebad_string (ffesymbol_text (sv)); - ffebad_finish (); - continue; - } - - if ((vst = ffesymbol_storage (sv)) == NULL) - { /* Create new ffestorag object, extend - cblock. */ - new_storage = TRUE; - vst = ffestorag_new (ffestorag_list_equivs (st)); - ffestorag_set_parent (vst, st); /* Initializations - happen there. */ - ffestorag_set_init (vst, NULL); - ffestorag_set_accretion (vst, NULL); - ffestorag_set_symbol (vst, sv); - ffestorag_set_size (vst, size); - ffestorag_set_offset (vst, var_offset); - ffestorag_set_alignment (vst, alignment); - ffestorag_set_modulo (vst, modulo); - ffestorag_set_type (vst, FFESTORAG_typeEQUIV); - ffestorag_set_basictype (vst, ffesymbol_basictype (sv)); - ffestorag_set_kindtype (vst, ffesymbol_kindtype (sv)); - ffestorag_set_typesymbol (vst, sv); - ffestorag_set_is_save (vst, FALSE); /* Assume FALSE... */ - if (ffestorag_is_save (st)) /* ...update TRUE */ - ffestorag_update_save (vst); /* if needed. */ - ffestorag_set_is_init (vst, FALSE); /* Assume FALSE... */ - if (ffestorag_is_init (st)) /* ...update TRUE */ - ffestorag_update_init (vst); /* if needed. */ - if (!ffetarget_offset_add (&size, var_offset, size)) - /* Find one size of common block, complain if - overflow. */ - ffetarget_offset_overflow (ffesymbol_text (s)); - else if (size > ffestorag_size (st)) - /* Extend common. */ - ffestorag_set_size (st, size); - ffesymbol_set_storage (sv, vst); - ffesymbol_set_common (sv, s); - ffesymbol_signal_unreported (sv); - ffestorag_update (st, sv, ffesymbol_basictype (sv), - ffesymbol_kindtype (sv)); - if (ffesymbol_is_init (sv)) - init = TRUE; - } - else - { - /* Make sure offset agrees with known offset. */ - if (var_offset != ffestorag_offset (vst)) - { - char io1[40]; - char io2[40]; - - sprintf (&io1[0], "%" ffetargetOffset_f "d", var_offset); - sprintf (&io2[0], "%" ffetargetOffset_f "d", ffestorag_offset (vst)); - ffebad_start (FFEBAD_EQUIV_MISMATCH); - ffebad_string (ffesymbol_text (sv)); - ffebad_string (ffesymbol_text (s)); - ffebad_string (io1); - ffebad_string (io2); - ffebad_finish (); - } - } - } /* (For every equivalence item in the list) */ - } /* (For every eqv list in the list of equivs - for the variable) */ - } - while (new_storage && need_storage); - - ffeequiv_kill (seq); /* Kill equiv obj. */ - } /* (For every variable in the common area) */ - - return init; -} - -/* ffeequiv_merge -- Merge two equivalence objects, return the merged result - - ffeequiv eq1; - ffeequiv eq2; - ffelexToken t; // points to current equivalence item forcing the merge. - eq1 = ffeequiv_merge(eq1,eq2,t); - - If the two equivalence objects can be merged, they are, all the - ffesymbols in their lists of lists are adjusted to point to the merged - equivalence object, and the merged object is returned. - - Otherwise, the two equivalence objects have different non-NULL common - symbols, so the merge cannot take place. An error message is issued and - NULL is returned. */ - -ffeequiv -ffeequiv_merge (ffeequiv eq1, ffeequiv eq2, ffelexToken t) -{ - ffebld list; - ffebld eqs; - ffesymbol symbol; - ffebld last = NULL; - - /* If both equivalence objects point to different common-based symbols, - complain. Of course, one or both might have NULL common symbols now, - and get COMMONed later, but the COMMON statement handler checks for - this. */ - - if ((ffeequiv_common (eq1) != NULL) && (ffeequiv_common (eq2) != NULL) - && (ffeequiv_common (eq1) != ffeequiv_common (eq2))) - { - ffebad_start (FFEBAD_EQUIV_COMMON); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (ffesymbol_text (ffeequiv_common (eq1))); - ffebad_string (ffesymbol_text (ffeequiv_common (eq2))); - ffebad_finish (); - return NULL; - } - - /* Make eq1 the new, merged object (arbitrarily). */ - - if (ffeequiv_common (eq1) == NULL) - ffeequiv_set_common (eq1, ffeequiv_common (eq2)); - - /* If the victim object has any init'ed entities, so does the new object. */ - - if (eq2->is_init) - eq1->is_init = TRUE; - -#if FFEGLOBAL_ENABLED - if (eq1->is_init && (ffeequiv_common (eq1) != NULL)) - ffeglobal_init_common (ffeequiv_common (eq1), t); -#endif - - /* If the victim object has any SAVEd entities, then the new object has - some. */ - - if (ffeequiv_is_save (eq2)) - ffeequiv_update_save (eq1); - - /* If the victim object has any init'd entities, then the new object has - some. */ - - if (ffeequiv_is_init (eq2)) - ffeequiv_update_init (eq1); - - /* Adjust all the symbols in the list of lists of equivalences for the - victim equivalence object so they point to the new merged object - instead. */ - - for (list = ffeequiv_list (eq2); list != NULL; list = ffebld_trail (list)) - { - for (eqs = ffebld_head (list); eqs != NULL; eqs = ffebld_trail (eqs)) - { - symbol = ffeequiv_symbol (ffebld_head (eqs)); - if (ffesymbol_equiv (symbol) == eq2) - ffesymbol_set_equiv (symbol, eq1); - else - assert (ffesymbol_equiv (symbol) == eq1); /* Can see a sym > once. */ - } - - /* For convenience, remember where the last ITEM in the outer list is. */ - - if (ffebld_trail (list) == NULL) - { - last = list; - break; - } - } - - /* Append the list of lists in the new, merged object to the list of lists - in the victim object, then use the new combined list in the new merged - object. */ - - ffebld_set_trail (last, ffeequiv_list (eq1)); - ffeequiv_set_list (eq1, ffeequiv_list (eq2)); - - /* Unlink and kill the victim object. */ - - ffeequiv_kill (eq2); - - return eq1; /* Return the new merged object. */ -} - -/* ffeequiv_new -- Create new equivalence object, put in list - - ffeequiv eq; - eq = ffeequiv_new(); - - Creates a new equivalence object and adds it to the list of equivalence - objects. */ - -ffeequiv -ffeequiv_new (void) -{ - ffeequiv eq; - - eq = malloc_new_ks (ffe_pool_program_unit (), "ffeequiv", sizeof (*eq)); - eq->next = (ffeequiv) &ffeequiv_list_.first; - eq->previous = ffeequiv_list_.last; - ffeequiv_set_common (eq, NULL); /* No COMMON area yet. */ - ffeequiv_set_list (eq, NULL); /* No list of lists of equivalences yet. */ - ffeequiv_set_is_save (eq, FALSE); - ffeequiv_set_is_init (eq, FALSE); - eq->next->previous = eq; - eq->previous->next = eq; - - return eq; -} - -/* ffeequiv_symbol -- Return symbol for equivalence expression - - ffesymbol symbol; - ffebld expr; - symbol = ffeequiv_symbol(expr); - - Finds the terminal SYMTER in an equivalence expression and returns the - ffesymbol for it. */ - -ffesymbol -ffeequiv_symbol (ffebld expr) -{ - assert (expr != NULL); - -again: /* :::::::::::::::::::: */ - - switch (ffebld_op (expr)) - { - case FFEBLD_opARRAYREF: - case FFEBLD_opSUBSTR: - expr = ffebld_left (expr); - goto again; /* :::::::::::::::::::: */ - - case FFEBLD_opSYMTER: - return ffebld_symter (expr); - - case FFEBLD_opANY: - return NULL; - - default: - assert ("bad eq expr" == NULL); - return NULL; - } -} - -/* ffeequiv_update_init -- Update the INIT flag for the area to TRUE - - ffeequiv eq; - ffeequiv_update_init(eq); - - If the INIT flag for the object is already set, return. Else, - set it TRUE and call ffe*_update_init for all objects contained in - this one. */ - -void -ffeequiv_update_init (ffeequiv eq) -{ - ffebld list; /* Current list in list of lists. */ - ffebld item; /* Current item in current list. */ - ffebld expr; /* Expression in head of current item. */ - - if (eq->is_init) - return; - - eq->is_init = TRUE; - - if ((eq->common != NULL) - && !ffesymbol_is_init (eq->common)) - ffesymbol_update_init (eq->common); /* Shouldn't be needed. */ - - for (list = eq->list; list != NULL; list = ffebld_trail (list)) - { - for (item = ffebld_head (list); item != NULL; item = ffebld_trail (item)) - { - expr = ffebld_head (item); - - again: /* :::::::::::::::::::: */ - - switch (ffebld_op (expr)) - { - case FFEBLD_opANY: - break; - - case FFEBLD_opSYMTER: - if (!ffesymbol_is_init (ffebld_symter (expr))) - ffesymbol_update_init (ffebld_symter (expr)); - break; - - case FFEBLD_opARRAYREF: - expr = ffebld_left (expr); - goto again; /* :::::::::::::::::::: */ - - case FFEBLD_opSUBSTR: - expr = ffebld_left (expr); - goto again; /* :::::::::::::::::::: */ - - default: - assert ("bad op for ffeequiv_update_init" == NULL); - break; - } - } - } -} - -/* ffeequiv_update_save -- Update the SAVE flag for the area to TRUE - - ffeequiv eq; - ffeequiv_update_save(eq); - - If the SAVE flag for the object is already set, return. Else, - set it TRUE and call ffe*_update_save for all objects contained in - this one. */ - -void -ffeequiv_update_save (ffeequiv eq) -{ - ffebld list; /* Current list in list of lists. */ - ffebld item; /* Current item in current list. */ - ffebld expr; /* Expression in head of current item. */ - - if (eq->is_save) - return; - - eq->is_save = TRUE; - - if ((eq->common != NULL) - && !ffesymbol_is_save (eq->common)) - ffesymbol_update_save (eq->common); /* Shouldn't be needed. */ - - for (list = eq->list; list != NULL; list = ffebld_trail (list)) - { - for (item = ffebld_head (list); item != NULL; item = ffebld_trail (item)) - { - expr = ffebld_head (item); - - again: /* :::::::::::::::::::: */ - - switch (ffebld_op (expr)) - { - case FFEBLD_opANY: - break; - - case FFEBLD_opSYMTER: - if (!ffesymbol_is_save (ffebld_symter (expr))) - ffesymbol_update_save (ffebld_symter (expr)); - break; - - case FFEBLD_opARRAYREF: - expr = ffebld_left (expr); - goto again; /* :::::::::::::::::::: */ - - case FFEBLD_opSUBSTR: - expr = ffebld_left (expr); - goto again; /* :::::::::::::::::::: */ - - default: - assert ("bad op for ffeequiv_update_save" == NULL); - break; - } - } - } -} diff --git a/contrib/gcc/f/equiv.h b/contrib/gcc/f/equiv.h deleted file mode 100644 index 59abfc8..0000000 --- a/contrib/gcc/f/equiv.h +++ /dev/null @@ -1,100 +0,0 @@ -/* equiv.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - equiv.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_EQUIV_H -#define GCC_F_EQUIV_H - -/* Simple definitions and enumerations. */ - - -/* Typedefs. */ - -typedef struct _ffeequiv_ *ffeequiv; - -/* Include files needed by this one. */ - -#include "bld.h" -#include "lex.h" -#include "storag.h" -#include "symbol.h" - -/* Structure definitions. */ - -struct _ffeequiv_ - { - ffeequiv next; - ffeequiv previous; - ffesymbol common; /* Common area for this equiv, if any. */ - ffebld list; /* List of lists of equiv exprs. */ - bool is_save; /* Any SAVEd members? */ - bool is_init; /* Any initialized members? */ - }; - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -void ffeequiv_add (ffeequiv eq, ffebld list, ffelexToken t); -void ffeequiv_exec_transition (void); -void ffeequiv_init_2 (void); -void ffeequiv_kill (ffeequiv victim); -bool ffeequiv_layout_cblock (ffestorag st); -ffeequiv ffeequiv_merge (ffeequiv eq1, ffeequiv eq2, ffelexToken t); -ffeequiv ffeequiv_new (void); -ffesymbol ffeequiv_symbol (ffebld expr); -void ffeequiv_update_init (ffeequiv eq); -void ffeequiv_update_save (ffeequiv eq); - -/* Define macros. */ - -#define ffeequiv_common(e) ((e)->common) -#define ffeequiv_init_0() -#define ffeequiv_init_1() -#define ffeequiv_init_3() -#define ffeequiv_init_4() -#define ffeequiv_is_init(e) ((e)->is_init) -#define ffeequiv_is_save(e) ((e)->is_save) -#define ffeequiv_list(e) ((e)->list) -#define ffeequiv_next(e) ((e)->next) -#define ffeequiv_previous(e) ((e)->previous) -#define ffeequiv_set_common(e,c) ((e)->common = (c)) -#define ffeequiv_set_init(e,i) ((e)->init = (i)) -#define ffeequiv_set_is_init(e,in) ((e)->is_init = (in)) -#define ffeequiv_set_is_save(e,sa) ((e)->is_save = (sa)) -#define ffeequiv_set_list(e,l) ((e)->list = (l)) -#define ffeequiv_terminate_0() -#define ffeequiv_terminate_1() -#define ffeequiv_terminate_2() -#define ffeequiv_terminate_3() -#define ffeequiv_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_EQUIV_H */ diff --git a/contrib/gcc/f/expr.c b/contrib/gcc/f/expr.c deleted file mode 100644 index ef7661d..0000000 --- a/contrib/gcc/f/expr.c +++ /dev/null @@ -1,18571 +0,0 @@ -/* expr.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None. - - Description: - Handles syntactic and semantic analysis of Fortran expressions. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "expr.h" -#include "bad.h" -#include "bld.h" -#include "com.h" -#include "global.h" -#include "implic.h" -#include "intrin.h" -#include "info.h" -#include "lex.h" -#include "malloc.h" -#include "src.h" -#include "st.h" -#include "symbol.h" -#include "str.h" -#include "target.h" -#include "where.h" -#include "real.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFEEXPR_exprtypeUNKNOWN_, - FFEEXPR_exprtypeOPERAND_, - FFEEXPR_exprtypeUNARY_, - FFEEXPR_exprtypeBINARY_, - FFEEXPR_exprtype_ - } ffeexprExprtype_; - -typedef enum - { - FFEEXPR_operatorPOWER_, - FFEEXPR_operatorMULTIPLY_, - FFEEXPR_operatorDIVIDE_, - FFEEXPR_operatorADD_, - FFEEXPR_operatorSUBTRACT_, - FFEEXPR_operatorCONCATENATE_, - FFEEXPR_operatorLT_, - FFEEXPR_operatorLE_, - FFEEXPR_operatorEQ_, - FFEEXPR_operatorNE_, - FFEEXPR_operatorGT_, - FFEEXPR_operatorGE_, - FFEEXPR_operatorNOT_, - FFEEXPR_operatorAND_, - FFEEXPR_operatorOR_, - FFEEXPR_operatorXOR_, - FFEEXPR_operatorEQV_, - FFEEXPR_operatorNEQV_, - FFEEXPR_operator_ - } ffeexprOperator_; - -typedef enum - { - FFEEXPR_operatorprecedenceHIGHEST_ = 1, - FFEEXPR_operatorprecedencePOWER_ = 1, - FFEEXPR_operatorprecedenceMULTIPLY_ = 2, - FFEEXPR_operatorprecedenceDIVIDE_ = 2, - FFEEXPR_operatorprecedenceADD_ = 3, - FFEEXPR_operatorprecedenceSUBTRACT_ = 3, - FFEEXPR_operatorprecedenceLOWARITH_ = 3, - FFEEXPR_operatorprecedenceCONCATENATE_ = 3, - FFEEXPR_operatorprecedenceLT_ = 4, - FFEEXPR_operatorprecedenceLE_ = 4, - FFEEXPR_operatorprecedenceEQ_ = 4, - FFEEXPR_operatorprecedenceNE_ = 4, - FFEEXPR_operatorprecedenceGT_ = 4, - FFEEXPR_operatorprecedenceGE_ = 4, - FFEEXPR_operatorprecedenceNOT_ = 5, - FFEEXPR_operatorprecedenceAND_ = 6, - FFEEXPR_operatorprecedenceOR_ = 7, - FFEEXPR_operatorprecedenceXOR_ = 8, - FFEEXPR_operatorprecedenceEQV_ = 8, - FFEEXPR_operatorprecedenceNEQV_ = 8, - FFEEXPR_operatorprecedenceLOWEST_ = 8, - FFEEXPR_operatorprecedence_ - } ffeexprOperatorPrecedence_; - -#define FFEEXPR_operatorassociativityL2R_ TRUE -#define FFEEXPR_operatorassociativityR2L_ FALSE -#define FFEEXPR_operatorassociativityPOWER_ FFEEXPR_operatorassociativityR2L_ -#define FFEEXPR_operatorassociativityMULTIPLY_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityDIVIDE_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityADD_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativitySUBTRACT_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityCONCATENATE_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityLT_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityLE_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityEQ_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityNE_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityGT_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityGE_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityNOT_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityAND_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityOR_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityXOR_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityEQV_ FFEEXPR_operatorassociativityL2R_ -#define FFEEXPR_operatorassociativityNEQV_ FFEEXPR_operatorassociativityL2R_ - -typedef enum - { - FFEEXPR_parentypeFUNCTION_, - FFEEXPR_parentypeSUBROUTINE_, - FFEEXPR_parentypeARRAY_, - FFEEXPR_parentypeSUBSTRING_, - FFEEXPR_parentypeFUNSUBSTR_,/* Ambig: check for colon after first expr. */ - FFEEXPR_parentypeEQUIVALENCE_, /* Ambig: ARRAY_ or SUBSTRING_. */ - FFEEXPR_parentypeANY_, /* Allow basically anything. */ - FFEEXPR_parentype_ - } ffeexprParenType_; - -typedef enum - { - FFEEXPR_percentNONE_, - FFEEXPR_percentLOC_, - FFEEXPR_percentVAL_, - FFEEXPR_percentREF_, - FFEEXPR_percentDESCR_, - FFEEXPR_percent_ - } ffeexprPercent_; - -/* Internal typedefs. */ - -typedef struct _ffeexpr_expr_ *ffeexprExpr_; -typedef bool ffeexprOperatorAssociativity_; -typedef struct _ffeexpr_stack_ *ffeexprStack_; - -/* Private include files. */ - - -/* Internal structure definitions. */ - -struct _ffeexpr_expr_ - { - ffeexprExpr_ previous; - ffelexToken token; - ffeexprExprtype_ type; - union - { - struct - { - ffeexprOperator_ op; - ffeexprOperatorPrecedence_ prec; - ffeexprOperatorAssociativity_ as; - } - operator; - ffebld operand; - } - u; - }; - -struct _ffeexpr_stack_ - { - ffeexprStack_ previous; - mallocPool pool; - ffeexprContext context; - ffeexprCallback callback; - ffelexToken first_token; - ffeexprExpr_ exprstack; - ffelexToken tokens[10]; /* Used in certain cases, like (unary) - open-paren. */ - ffebld expr; /* For first of - complex/implied-do/substring/array-elements - / actual-args expression. */ - ffebld bound_list; /* For tracking dimension bounds list of - array. */ - ffebldListBottom bottom; /* For building lists. */ - ffeinfoRank rank; /* For elements in an array reference. */ - bool constant; /* TRUE while elements seen so far are - constants. */ - bool immediate; /* TRUE while elements seen so far are - immediate/constants. */ - ffebld next_dummy; /* Next SFUNC dummy arg in arg list. */ - ffebldListLength num_args; /* Number of dummy args expected in arg list. */ - bool is_rhs; /* TRUE if rhs context, FALSE otherwise. */ - ffeexprPercent_ percent; /* Current %FOO keyword. */ - }; - -struct _ffeexpr_find_ - { - ffelexToken t; - ffelexHandler after; - int level; - }; - -/* Static objects accessed by functions in this module. */ - -static ffeexprStack_ ffeexpr_stack_; /* Expression stack for semantic. */ -static ffelexToken ffeexpr_tokens_[10]; /* Scratchpad tokens for syntactic. */ -static ffestrOther ffeexpr_current_dotdot_; /* Current .FOO. keyword. */ -static long ffeexpr_hollerith_count_; /* ffeexpr_token_number_ and caller. */ -static int ffeexpr_level_; /* Level of DATA implied-DO construct. */ -static bool ffeexpr_is_substr_ok_; /* If OPEN_PAREN as binary "op" ok. */ -static struct _ffeexpr_find_ ffeexpr_find_; - -/* Static functions (internal). */ - -static ffelexHandler ffeexpr_cb_close_paren_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_close_paren_ambig_ (ffelexToken ft, - ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_close_paren_ambig_1_ (ffelexToken t); -static ffelexHandler ffeexpr_cb_close_paren_c_ (ffelexToken ft, - ffebld expr, ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_c_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_close_paren_ci_ (ffelexToken ft, - ffebld expr, ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_ci_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_i_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_i_1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_i_2_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_i_3_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_i_4_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_comma_i_5_ (ffelexToken t); -static ffelexHandler ffeexpr_cb_end_loc_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_end_notloc_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_cb_end_notloc_1_ (ffelexToken t); -static ffesymbol ffeexpr_check_impctrl_ (ffesymbol s); -static void ffeexpr_check_impdo_ (ffebld list, ffelexToken list_t, - ffebld dovar, ffelexToken dovar_t); -static void ffeexpr_update_impdo_ (ffebld expr, ffebld dovar); -static void ffeexpr_update_impdo_sym_ (ffebld expr, ffesymbol dovar); -static ffeexprContext ffeexpr_context_outer_ (ffeexprStack_ s); -static ffeexprExpr_ ffeexpr_expr_new_ (void); -static void ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t); -static bool ffeexpr_isdigits_ (const char *p); -static ffelexHandler ffeexpr_token_first_lhs_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_lhs_1_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_rhs_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_rhs_1_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_rhs_2_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_rhs_3_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_rhs_4_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_rhs_5_ (ffelexToken t); -static ffelexHandler ffeexpr_token_first_rhs_6_ (ffelexToken t); -static ffelexHandler ffeexpr_token_namelist_ (ffelexToken t); -static void ffeexpr_expr_kill_ (ffeexprExpr_ e); -static void ffeexpr_exprstack_push_ (ffeexprExpr_ e); -static void ffeexpr_exprstack_push_binary_ (ffeexprExpr_ e); -static void ffeexpr_exprstack_push_operand_ (ffeexprExpr_ e); -static void ffeexpr_exprstack_push_unary_ (ffeexprExpr_ e); -static void ffeexpr_reduce_ (void); -static ffebld ffeexpr_reduced_bool1_ (ffebld reduced, ffeexprExpr_ op, - ffeexprExpr_ r); -static ffebld ffeexpr_reduced_bool2_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_eqop2_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_math1_ (ffebld reduced, ffeexprExpr_ op, - ffeexprExpr_ r); -static ffebld ffeexpr_reduced_math2_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_power_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_relop2_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_ugly1_ (ffebld reduced, ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_ugly1log_ (ffebld reduced, ffeexprExpr_ op, - ffeexprExpr_ r); -static ffebld ffeexpr_reduced_ugly2_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r); -static ffebld ffeexpr_reduced_ugly2log_ (ffebld reduced, ffeexprExpr_ l, - ffeexprExpr_ op, ffeexprExpr_ r, - bool *); -static ffelexHandler ffeexpr_find_close_paren_ (ffelexToken t, - ffelexHandler after); -static ffelexHandler ffeexpr_nil_finished_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_rhs_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_period_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_end_period_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_swallow_period_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_real_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_real_exponent_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_real_exp_sign_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_number_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_number_exponent_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_number_exp_sign_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_number_period_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_number_per_exp_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_number_real_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_num_per_exp_sign_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_number_real_exp_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_num_real_exp_sn_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_binary_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_binary_period_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_binary_end_per_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_binary_sw_per_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_quote_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_apostrophe_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_apos_char_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_name_rhs_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_name_apos_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_name_apos_name_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_percent_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_percent_name_ (ffelexToken t); -static ffelexHandler ffeexpr_nil_substrp_ (ffelexToken t); -static ffelexHandler ffeexpr_finished_ (ffelexToken t); -static ffebld ffeexpr_finished_ambig_ (ffelexToken t, ffebld expr); -static ffelexHandler ffeexpr_token_lhs_ (ffelexToken t); -static ffelexHandler ffeexpr_token_rhs_ (ffelexToken t); -static ffelexHandler ffeexpr_token_binary_ (ffelexToken t); -static ffelexHandler ffeexpr_token_period_ (ffelexToken t); -static ffelexHandler ffeexpr_token_end_period_ (ffelexToken t); -static ffelexHandler ffeexpr_token_swallow_period_ (ffelexToken t); -static ffelexHandler ffeexpr_token_real_ (ffelexToken t); -static ffelexHandler ffeexpr_token_real_exponent_ (ffelexToken t); -static ffelexHandler ffeexpr_token_real_exp_sign_ (ffelexToken t); -static ffelexHandler ffeexpr_token_number_ (ffelexToken t); -static ffelexHandler ffeexpr_token_number_exponent_ (ffelexToken t); -static ffelexHandler ffeexpr_token_number_exp_sign_ (ffelexToken t); -static ffelexHandler ffeexpr_token_number_period_ (ffelexToken t); -static ffelexHandler ffeexpr_token_number_per_exp_ (ffelexToken t); -static ffelexHandler ffeexpr_token_number_real_ (ffelexToken t); -static ffelexHandler ffeexpr_token_num_per_exp_sign_ (ffelexToken t); -static ffelexHandler ffeexpr_token_number_real_exp_ (ffelexToken t); -static ffelexHandler ffeexpr_token_num_real_exp_sn_ (ffelexToken t); -static ffelexHandler ffeexpr_token_binary_period_ (ffelexToken t); -static ffelexHandler ffeexpr_token_binary_end_per_ (ffelexToken t); -static ffelexHandler ffeexpr_token_binary_sw_per_ (ffelexToken t); -static ffelexHandler ffeexpr_token_quote_ (ffelexToken t); -static ffelexHandler ffeexpr_token_apostrophe_ (ffelexToken t); -static ffelexHandler ffeexpr_token_apos_char_ (ffelexToken t); -static ffelexHandler ffeexpr_token_name_lhs_ (ffelexToken t); -static ffelexHandler ffeexpr_token_name_arg_ (ffelexToken t); -static ffelexHandler ffeexpr_token_name_rhs_ (ffelexToken t); -static ffelexHandler ffeexpr_token_name_apos_ (ffelexToken t); -static ffelexHandler ffeexpr_token_name_apos_name_ (ffelexToken t); -static ffelexHandler ffeexpr_token_percent_ (ffelexToken t); -static ffelexHandler ffeexpr_token_percent_name_ (ffelexToken t); -static ffelexHandler ffeexpr_token_arguments_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_token_elements_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_token_equivalence_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_token_substring_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_token_substring_1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_token_substrp_ (ffelexToken t); -static ffelexHandler ffeexpr_token_intrincheck_ (ffelexToken t); -static ffelexHandler ffeexpr_token_funsubstr_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffeexpr_token_anything_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static void ffeexpr_make_float_const_ (char exp_letter, ffelexToken integer, - ffelexToken decimal, ffelexToken fraction, ffelexToken exponent, - ffelexToken exponent_sign, ffelexToken exponent_digits); -static ffesymbol ffeexpr_declare_unadorned_ (ffelexToken t, bool maybe_intrin); -static ffesymbol ffeexpr_sym_impdoitem_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_lhs_call_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_lhs_data_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_lhs_equivalence_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_lhs_extfunc_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_lhs_impdoctrl_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_lhs_parameter_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_rhs_actualarg_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_rhs_dimlist_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_sym_rhs_let_ (ffesymbol s, ffelexToken t); -static ffesymbol ffeexpr_declare_parenthesized_ (ffelexToken t, - bool maybe_intrin, - ffeexprParenType_ *paren_type); -static ffesymbol ffeexpr_paren_rhs_let_ (ffesymbol s, ffelexToken t); - -/* Internal macros. */ - -#define ffeexpr_paren_lhs_let_(s,t) ffeexpr_sym_rhs_let_(s,t) -#define ffeexpr_sym_lhs_let_(s,t) ffeexpr_sym_rhs_let_(s,t) - -/* ffeexpr_collapse_convert -- Collapse convert expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_convert(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_convert (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharacterSize sz; - ffetargetCharacterSize sz2; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - sz = FFETARGET_charactersizeNONE; - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_integer1_integer2 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_integer1_integer3 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_integer1_integer4 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER1/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer1_real1 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer1_real2 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer1_real3 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER1/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer1_complex1 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer1_complex2 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer1_complex3 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER1/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_convert_integer1_logical1 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_logical1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_convert_integer1_logical2 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_logical2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_convert_integer1_logical3 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_logical3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_convert_integer1_logical4 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_logical4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER1/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_integer1_character1 - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_integer1_hollerith - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_integer1_typeless - (ffebld_cu_ptr_integer1 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("INTEGER1 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_integer2_integer1 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_integer2_integer3 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_integer2_integer4 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER2/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer2_real1 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer2_real2 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer2_real3 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER2/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer2_complex1 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer2_complex2 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer2_complex3 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER2/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_convert_integer2_logical1 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_logical1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_convert_integer2_logical2 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_logical2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_convert_integer2_logical3 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_logical3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_convert_integer2_logical4 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_logical4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER2/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_integer2_character1 - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_integer2_hollerith - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_integer2_typeless - (ffebld_cu_ptr_integer2 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("INTEGER2 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_integer3_integer1 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_integer3_integer2 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_integer3_integer4 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER3/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer3_real1 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer3_real2 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer3_real3 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER3/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer3_complex1 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer3_complex2 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer3_complex3 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER3/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_convert_integer3_logical1 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_logical1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_convert_integer3_logical2 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_logical2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_convert_integer3_logical3 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_logical3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_convert_integer3_logical4 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_logical4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER3/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_integer3_character1 - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_integer3_hollerith - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_integer3_typeless - (ffebld_cu_ptr_integer3 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("INTEGER3 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_integer4_integer1 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_integer4_integer2 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_integer4_integer3 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER4/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer4_real1 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer4_real2 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer4_real3 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER4/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_integer4_complex1 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_integer4_complex2 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_integer4_complex3 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER3/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_convert_integer4_logical1 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_logical1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_convert_integer4_logical2 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_logical2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_convert_integer4_logical3 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_logical3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_convert_integer4_logical4 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_logical4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("INTEGER4/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_integer4_character1 - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_integer4_hollerith - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_integer4_typeless - (ffebld_cu_ptr_integer4 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("INTEGER4 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - sz = FFETARGET_charactersizeNONE; - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_convert_logical1_logical2 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_convert_logical1_logical3 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_convert_logical1_logical4 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL1/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_logical1_integer1 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_logical1_integer2 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_logical1_integer3 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_logical1_integer4 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL1/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_logical1_character1 - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_logical1_hollerith - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_logical1_typeless - (ffebld_cu_ptr_logical1 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("LOGICAL1 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logical1_val - (ffebld_cu_val_logical1 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_convert_logical2_logical1 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_convert_logical2_logical3 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_convert_logical2_logical4 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL2/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_logical2_integer1 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_logical2_integer2 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_logical2_integer3 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_logical2_integer4 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL2/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_logical2_character1 - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_logical2_hollerith - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_logical2_typeless - (ffebld_cu_ptr_logical2 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("LOGICAL2 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logical2_val - (ffebld_cu_val_logical2 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_convert_logical3_logical1 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_convert_logical3_logical2 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_convert_logical3_logical4 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL3/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_logical3_integer1 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_logical3_integer2 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_logical3_integer3 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_logical3_integer4 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL3/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_logical3_character1 - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_logical3_hollerith - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_logical3_typeless - (ffebld_cu_ptr_logical3 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("LOGICAL3 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logical3_val - (ffebld_cu_val_logical3 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_convert_logical4_logical1 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_convert_logical4_logical2 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_convert_logical4_logical3 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL4/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_logical4_integer1 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_logical4_integer2 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_logical4_integer3 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_logical4_integer4 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("LOGICAL4/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_logical4_character1 - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_logical4_hollerith - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_logical4_typeless - (ffebld_cu_ptr_logical4 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("LOGICAL4 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logical4_val - (ffebld_cu_val_logical4 (u)), expr); - break; -#endif - - default: - assert ("bad logical kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - sz = FFETARGET_charactersizeNONE; - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_real1_integer1 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_real1_integer2 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_real1_integer3 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_real1_integer4 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL1/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_real1_real2 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_real1_real3 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL1/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_real1_complex1 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_real1_complex2 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_real1_complex3 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL1/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_real1_character1 - (ffebld_cu_ptr_real1 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_real1_hollerith - (ffebld_cu_ptr_real1 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_real1_typeless - (ffebld_cu_ptr_real1 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("REAL1 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_real1_val - (ffebld_cu_val_real1 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_real2_integer1 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_real2_integer2 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_real2_integer3 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_real2_integer4 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL2/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_real2_real1 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_real2_real3 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL2/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_real2_complex1 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_real2_complex2 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_real2_complex3 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL2/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_real2_character1 - (ffebld_cu_ptr_real2 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_real2_hollerith - (ffebld_cu_ptr_real2 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_real2_typeless - (ffebld_cu_ptr_real2 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("REAL2 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_real2_val - (ffebld_cu_val_real2 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_real3_integer1 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_real3_integer2 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_real3_integer3 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_real3_integer4 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL3/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_real3_real1 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_real3_real2 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL3/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_real3_complex1 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_real3_complex2 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_real3_complex3 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("REAL3/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_real3_character1 - (ffebld_cu_ptr_real3 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_real3_hollerith - (ffebld_cu_ptr_real3 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_real3_typeless - (ffebld_cu_ptr_real3 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("REAL3 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_real3_val - (ffebld_cu_val_real3 (u)), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - sz = FFETARGET_charactersizeNONE; - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_complex1_integer1 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_complex1_integer2 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_complex1_integer3 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_complex1_integer4 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX1/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_complex1_real1 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_complex1_real2 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_complex1_real3 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX1/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_complex1_complex2 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_complex1_complex3 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX1/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_complex1_character1 - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_complex1_hollerith - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_complex1_typeless - (ffebld_cu_ptr_complex1 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("COMPLEX1 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_complex1_val - (ffebld_cu_val_complex1 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_complex2_integer1 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_complex2_integer2 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_complex2_integer3 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_complex2_integer4 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX2/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_complex2_real1 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_complex2_real2 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_complex2_real3 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX2/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_complex2_complex1 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_complex2_complex3 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_complex3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX2/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_complex2_character1 - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_complex2_hollerith - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_complex2_typeless - (ffebld_cu_ptr_complex2 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("COMPLEX2 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_complex2_val - (ffebld_cu_val_complex2 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_convert_complex3_integer1 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_integer1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_convert_complex3_integer2 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_integer2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_convert_complex3_integer3 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_integer3 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_convert_complex3_integer4 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_integer4 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX3/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_complex3_real1 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_real1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_complex3_real2 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_real2 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_convert_complex3_real3 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_real3 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX3/REAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_convert_complex3_complex1 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_complex1 (ffebld_conter (l))); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_convert_complex3_complex2 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_complex2 (ffebld_conter (l))); - break; -#endif - - default: - assert ("COMPLEX3/COMPLEX bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - error = ffetarget_convert_complex3_character1 - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_character1 (ffebld_conter (l))); - break; - - case FFEINFO_basictypeHOLLERITH: - error = ffetarget_convert_complex3_hollerith - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_hollerith (ffebld_conter (l))); - break; - - case FFEINFO_basictypeTYPELESS: - error = ffetarget_convert_complex3_typeless - (ffebld_cu_ptr_complex3 (u), - ffebld_constant_typeless (ffebld_conter (l))); - break; - - default: - assert ("COMPLEX3 bad type" == NULL); - break; - } - - /* If conversion operation is not implemented, return original expr. */ - if (error == FFEBAD_NOCANDO) - return expr; - - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_complex3_val - (ffebld_cu_val_complex3 (u)), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - if ((sz = ffebld_size (expr)) == FFETARGET_charactersizeNONE) - return expr; - kt = ffeinfo_kindtype (ffebld_info (expr)); - switch (kt) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - switch (ffeinfo_basictype (ffebld_info (l))) - { - case FFEINFO_basictypeCHARACTER: - if ((sz2 = ffebld_size (l)) == FFETARGET_charactersizeNONE) - return expr; - assert (kt == ffeinfo_kindtype (ffebld_info (l))); - assert (sz2 == ffetarget_length_character1 - (ffebld_constant_character1 - (ffebld_conter (l)))); - error - = ffetarget_convert_character1_character1 - (ffebld_cu_ptr_character1 (u), sz, - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error - = ffetarget_convert_character1_integer1 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error - = ffetarget_convert_character1_integer2 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error - = ffetarget_convert_character1_integer3 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error - = ffetarget_convert_character1_integer4 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - - default: - assert ("CHARACTER1/INTEGER bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (ffeinfo_kindtype (ffebld_info (l))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error - = ffetarget_convert_character1_logical1 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_logical1 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error - = ffetarget_convert_character1_logical2 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_logical2 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error - = ffetarget_convert_character1_logical3 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_logical3 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error - = ffetarget_convert_character1_logical4 - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_logical4 (ffebld_conter (l)), - ffebld_constant_pool ()); - break; -#endif - - default: - assert ("CHARACTER1/LOGICAL bad source kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeHOLLERITH: - error - = ffetarget_convert_character1_hollerith - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_hollerith (ffebld_conter (l)), - ffebld_constant_pool ()); - break; - - case FFEINFO_basictypeTYPELESS: - error - = ffetarget_convert_character1_typeless - (ffebld_cu_ptr_character1 (u), - sz, - ffebld_constant_typeless (ffebld_conter (l)), - ffebld_constant_pool ()); - break; - - default: - assert ("CHARACTER1 bad type" == NULL); - } - - expr - = ffebld_new_conter_with_orig - (ffebld_constant_new_character1_val - (ffebld_cu_val_character1 (u)), - expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - sz)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - assert (t != NULL); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_paren -- Collapse paren expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_paren(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_paren (ffebld expr, ffelexToken t UNUSED) -{ - ffebld r; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharacterSize len; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - r = ffebld_left (expr); - - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - bt = ffeinfo_basictype (ffebld_info (r)); - kt = ffeinfo_kindtype (ffebld_info (r)); - len = ffebld_size (r); - - expr = ffebld_new_conter_with_orig (ffebld_constant_copy (ffebld_conter (r)), - expr); - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - len)); - - return expr; -} - -/* ffeexpr_collapse_uplus -- Collapse uplus expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_uplus(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_uplus (ffebld expr, ffelexToken t UNUSED) -{ - ffebld r; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharacterSize len; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - r = ffebld_left (expr); - - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - bt = ffeinfo_basictype (ffebld_info (r)); - kt = ffeinfo_kindtype (ffebld_info (r)); - len = ffebld_size (r); - - expr = ffebld_new_conter_with_orig (ffebld_constant_copy (ffebld_conter (r)), - expr); - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - len)); - - return expr; -} - -/* ffeexpr_collapse_uminus -- Collapse uminus expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_uminus(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_uminus (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - r = ffebld_left (expr); - - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_uminus_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_uminus_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_uminus_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_uminus_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_uminus_real1 (ffebld_cu_ptr_real1 (u), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real1_val - (ffebld_cu_val_real1 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_uminus_real2 (ffebld_cu_ptr_real2 (u), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real2_val - (ffebld_cu_val_real2 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_uminus_real3 (ffebld_cu_ptr_real3 (u), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real3_val - (ffebld_cu_val_real3 (u)), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_uminus_complex1 (ffebld_cu_ptr_complex1 (u), - ffebld_constant_complex1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex1_val - (ffebld_cu_val_complex1 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_uminus_complex2 (ffebld_cu_ptr_complex2 (u), - ffebld_constant_complex2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex2_val - (ffebld_cu_val_complex2 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_uminus_complex3 (ffebld_cu_ptr_complex3 (u), - ffebld_constant_complex3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex3_val - (ffebld_cu_val_complex3 (u)), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_not -- Collapse not expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_not(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_not (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - r = ffebld_left (expr); - - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_not_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_not_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_not_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_not_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_not_logical1 (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical1_val - (ffebld_cu_val_logical1 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_not_logical2 (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical2_val - (ffebld_cu_val_logical2 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_not_logical3 (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical3_val - (ffebld_cu_val_logical3 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_not_logical4 (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical4_val - (ffebld_cu_val_logical4 (u)), expr); - break; -#endif - - default: - assert ("bad logical kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_add -- Collapse add expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_add(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_add (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_add_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_add_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_add_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_add_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_add_real1 (ffebld_cu_ptr_real1 (u), - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real1_val - (ffebld_cu_val_real1 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_add_real2 (ffebld_cu_ptr_real2 (u), - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real2_val - (ffebld_cu_val_real2 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_add_real3 (ffebld_cu_ptr_real3 (u), - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real3_val - (ffebld_cu_val_real3 (u)), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_add_complex1 (ffebld_cu_ptr_complex1 (u), - ffebld_constant_complex1 (ffebld_conter (l)), - ffebld_constant_complex1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex1_val - (ffebld_cu_val_complex1 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_add_complex2 (ffebld_cu_ptr_complex2 (u), - ffebld_constant_complex2 (ffebld_conter (l)), - ffebld_constant_complex2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex2_val - (ffebld_cu_val_complex2 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_add_complex3 (ffebld_cu_ptr_complex3 (u), - ffebld_constant_complex3 (ffebld_conter (l)), - ffebld_constant_complex3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex3_val - (ffebld_cu_val_complex3 (u)), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_subtract -- Collapse subtract expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_subtract(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_subtract (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_subtract_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_subtract_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_subtract_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_subtract_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_subtract_real1 (ffebld_cu_ptr_real1 (u), - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real1_val - (ffebld_cu_val_real1 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_subtract_real2 (ffebld_cu_ptr_real2 (u), - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real2_val - (ffebld_cu_val_real2 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_subtract_real3 (ffebld_cu_ptr_real3 (u), - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real3_val - (ffebld_cu_val_real3 (u)), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_subtract_complex1 (ffebld_cu_ptr_complex1 (u), - ffebld_constant_complex1 (ffebld_conter (l)), - ffebld_constant_complex1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex1_val - (ffebld_cu_val_complex1 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_subtract_complex2 (ffebld_cu_ptr_complex2 (u), - ffebld_constant_complex2 (ffebld_conter (l)), - ffebld_constant_complex2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex2_val - (ffebld_cu_val_complex2 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_subtract_complex3 (ffebld_cu_ptr_complex3 (u), - ffebld_constant_complex3 (ffebld_conter (l)), - ffebld_constant_complex3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex3_val - (ffebld_cu_val_complex3 (u)), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_multiply -- Collapse multiply expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_multiply(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_multiply (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_multiply_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_multiply_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_multiply_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_multiply_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_multiply_real1 (ffebld_cu_ptr_real1 (u), - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real1_val - (ffebld_cu_val_real1 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_multiply_real2 (ffebld_cu_ptr_real2 (u), - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real2_val - (ffebld_cu_val_real2 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_multiply_real3 (ffebld_cu_ptr_real3 (u), - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real3_val - (ffebld_cu_val_real3 (u)), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_multiply_complex1 (ffebld_cu_ptr_complex1 (u), - ffebld_constant_complex1 (ffebld_conter (l)), - ffebld_constant_complex1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex1_val - (ffebld_cu_val_complex1 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_multiply_complex2 (ffebld_cu_ptr_complex2 (u), - ffebld_constant_complex2 (ffebld_conter (l)), - ffebld_constant_complex2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex2_val - (ffebld_cu_val_complex2 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_multiply_complex3 (ffebld_cu_ptr_complex3 (u), - ffebld_constant_complex3 (ffebld_conter (l)), - ffebld_constant_complex3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex3_val - (ffebld_cu_val_complex3 (u)), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_divide -- Collapse divide expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_divide(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_divide (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_divide_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_divide_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_divide_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_divide_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_divide_real1 (ffebld_cu_ptr_real1 (u), - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real1_val - (ffebld_cu_val_real1 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_divide_real2 (ffebld_cu_ptr_real2 (u), - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real2_val - (ffebld_cu_val_real2 (u)), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_divide_real3 (ffebld_cu_ptr_real3 (u), - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_real3_val - (ffebld_cu_val_real3 (u)), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_divide_complex1 (ffebld_cu_ptr_complex1 (u), - ffebld_constant_complex1 (ffebld_conter (l)), - ffebld_constant_complex1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex1_val - (ffebld_cu_val_complex1 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_divide_complex2 (ffebld_cu_ptr_complex2 (u), - ffebld_constant_complex2 (ffebld_conter (l)), - ffebld_constant_complex2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex2_val - (ffebld_cu_val_complex2 (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_divide_complex3 (ffebld_cu_ptr_complex3 (u), - ffebld_constant_complex3 (ffebld_conter (l)), - ffebld_constant_complex3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_complex3_val - (ffebld_cu_val_complex3 (u)), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_power -- Collapse power expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_power(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_power (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - if ((ffeinfo_basictype (ffebld_info (r)) != FFEINFO_basictypeINTEGER) - || (ffeinfo_kindtype (ffebld_info (r)) != FFEINFO_kindtypeINTEGERDEFAULT)) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { - case FFEINFO_kindtypeINTEGERDEFAULT: - error = ffetarget_power_integerdefault_integerdefault - (ffebld_cu_ptr_integerdefault (u), - ffebld_constant_integerdefault (ffebld_conter (l)), - ffebld_constant_integerdefault (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_integerdefault_val - (ffebld_cu_val_integerdefault (u)), expr); - break; - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { - case FFEINFO_kindtypeREALDEFAULT: - error = ffetarget_power_realdefault_integerdefault - (ffebld_cu_ptr_realdefault (u), - ffebld_constant_realdefault (ffebld_conter (l)), - ffebld_constant_integerdefault (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_realdefault_val - (ffebld_cu_val_realdefault (u)), expr); - break; - - case FFEINFO_kindtypeREALDOUBLE: - error = ffetarget_power_realdouble_integerdefault - (ffebld_cu_ptr_realdouble (u), - ffebld_constant_realdouble (ffebld_conter (l)), - ffebld_constant_integerdefault (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_realdouble_val - (ffebld_cu_val_realdouble (u)), expr); - break; - -#if FFETARGET_okREALQUAD - case FFEINFO_kindtypeREALQUAD: - error = ffetarget_power_realquad_integerdefault - (ffebld_cu_ptr_realquad (u), - ffebld_constant_realquad (ffebld_conter (l)), - ffebld_constant_integerdefault (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_realquad_val - (ffebld_cu_val_realquad (u)), expr); - break; -#endif - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { - case FFEINFO_kindtypeREALDEFAULT: - error = ffetarget_power_complexdefault_integerdefault - (ffebld_cu_ptr_complexdefault (u), - ffebld_constant_complexdefault (ffebld_conter (l)), - ffebld_constant_integerdefault (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_complexdefault_val - (ffebld_cu_val_complexdefault (u)), expr); - break; - -#if FFETARGET_okCOMPLEXDOUBLE - case FFEINFO_kindtypeREALDOUBLE: - error = ffetarget_power_complexdouble_integerdefault - (ffebld_cu_ptr_complexdouble (u), - ffebld_constant_complexdouble (ffebld_conter (l)), - ffebld_constant_integerdefault (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_complexdouble_val - (ffebld_cu_val_complexdouble (u)), expr); - break; -#endif - -#if FFETARGET_okCOMPLEXQUAD - case FFEINFO_kindtypeREALQUAD: - error = ffetarget_power_complexquad_integerdefault - (ffebld_cu_ptr_complexquad (u), - ffebld_constant_complexquad (ffebld_conter (l)), - ffebld_constant_integerdefault (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_complexquad_val - (ffebld_cu_val_complexquad (u)), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_concatenate -- Collapse concatenate expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_concatenate(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_concatenate (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoKindtype kt; - ffetargetCharacterSize len; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeCHARACTER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_concatenate_character1 (ffebld_cu_ptr_character1 (u), - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_character1 (ffebld_conter (r)), - ffebld_constant_pool (), &len); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_character1_val - (ffebld_cu_val_character1 (u)), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeCHARACTER, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - len)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_eq -- Collapse eq expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_eq(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_eq (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - bool val; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_eq_integer1 (&val, - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_eq_integer2 (&val, - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_eq_integer3 (&val, - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_eq_integer4 (&val, - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_eq_real1 (&val, - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_eq_real2 (&val, - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_eq_real3 (&val, - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_eq_complex1 (&val, - ffebld_constant_complex1 (ffebld_conter (l)), - ffebld_constant_complex1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_eq_complex2 (&val, - ffebld_constant_complex2 (ffebld_conter (l)), - ffebld_constant_complex2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_eq_complex3 (&val, - ffebld_constant_complex3 (ffebld_conter (l)), - ffebld_constant_complex3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_eq_character1 (&val, - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_character1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_ne -- Collapse ne expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_ne(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_ne (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - bool val; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_ne_integer1 (&val, - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_ne_integer2 (&val, - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_ne_integer3 (&val, - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_ne_integer4 (&val, - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_ne_real1 (&val, - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_ne_real2 (&val, - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_ne_real3 (&val, - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCOMPLEX: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_ne_complex1 (&val, - ffebld_constant_complex1 (ffebld_conter (l)), - ffebld_constant_complex1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_ne_complex2 (&val, - ffebld_constant_complex2 (ffebld_conter (l)), - ffebld_constant_complex2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_ne_complex3 (&val, - ffebld_constant_complex3 (ffebld_conter (l)), - ffebld_constant_complex3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad complex kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_ne_character1 (&val, - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_character1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_ge -- Collapse ge expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_ge(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_ge (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - bool val; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_ge_integer1 (&val, - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_ge_integer2 (&val, - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_ge_integer3 (&val, - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_ge_integer4 (&val, - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_ge_real1 (&val, - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_ge_real2 (&val, - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_ge_real3 (&val, - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_ge_character1 (&val, - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_character1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_gt -- Collapse gt expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_gt(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_gt (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - bool val; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_gt_integer1 (&val, - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_gt_integer2 (&val, - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_gt_integer3 (&val, - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_gt_integer4 (&val, - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_gt_real1 (&val, - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_gt_real2 (&val, - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_gt_real3 (&val, - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_gt_character1 (&val, - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_character1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_le -- Collapse le expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_le(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_le (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - bool val; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_le_integer1 (&val, - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_le_integer2 (&val, - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_le_integer3 (&val, - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_le_integer4 (&val, - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_le_real1 (&val, - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_le_real2 (&val, - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_le_real3 (&val, - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_le_character1 (&val, - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_character1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_lt -- Collapse lt expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_lt(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_lt (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - bool val; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (ffeinfo_basictype (ffebld_info (ffebld_left (expr)))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_lt_integer1 (&val, - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_lt_integer2 (&val, - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_lt_integer3 (&val, - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_lt_integer4 (&val, - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeREAL: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okREAL1 - case FFEINFO_kindtypeREAL1: - error = ffetarget_lt_real1 (&val, - ffebld_constant_real1 (ffebld_conter (l)), - ffebld_constant_real1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL2 - case FFEINFO_kindtypeREAL2: - error = ffetarget_lt_real2 (&val, - ffebld_constant_real2 (ffebld_conter (l)), - ffebld_constant_real2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - -#if FFETARGET_okREAL3 - case FFEINFO_kindtypeREAL3: - error = ffetarget_lt_real3 (&val, - ffebld_constant_real3 (ffebld_conter (l)), - ffebld_constant_real3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad real kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffeinfo_kindtype (ffebld_info (ffebld_left (expr)))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_lt_character1 (&val, - ffebld_constant_character1 (ffebld_conter (l)), - ffebld_constant_character1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig - (ffebld_constant_new_logicaldefault (val), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_and -- Collapse and expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_and(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_and (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_and_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_and_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_and_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_and_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_and_logical1 (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical1 (ffebld_conter (l)), - ffebld_constant_logical1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical1_val - (ffebld_cu_val_logical1 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_and_logical2 (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical2 (ffebld_conter (l)), - ffebld_constant_logical2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical2_val - (ffebld_cu_val_logical2 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_and_logical3 (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical3 (ffebld_conter (l)), - ffebld_constant_logical3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical3_val - (ffebld_cu_val_logical3 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_and_logical4 (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical4 (ffebld_conter (l)), - ffebld_constant_logical4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical4_val - (ffebld_cu_val_logical4 (u)), expr); - break; -#endif - - default: - assert ("bad logical kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_or -- Collapse or expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_or(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_or (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_or_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_or_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_or_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_or_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_or_logical1 (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical1 (ffebld_conter (l)), - ffebld_constant_logical1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical1_val - (ffebld_cu_val_logical1 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_or_logical2 (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical2 (ffebld_conter (l)), - ffebld_constant_logical2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical2_val - (ffebld_cu_val_logical2 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_or_logical3 (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical3 (ffebld_conter (l)), - ffebld_constant_logical3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical3_val - (ffebld_cu_val_logical3 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_or_logical4 (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical4 (ffebld_conter (l)), - ffebld_constant_logical4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical4_val - (ffebld_cu_val_logical4 (u)), expr); - break; -#endif - - default: - assert ("bad logical kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_xor -- Collapse xor expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_xor(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_xor (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_xor_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_xor_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_xor_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_xor_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_xor_logical1 (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical1 (ffebld_conter (l)), - ffebld_constant_logical1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical1_val - (ffebld_cu_val_logical1 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_xor_logical2 (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical2 (ffebld_conter (l)), - ffebld_constant_logical2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical2_val - (ffebld_cu_val_logical2 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_xor_logical3 (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical3 (ffebld_conter (l)), - ffebld_constant_logical3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical3_val - (ffebld_cu_val_logical3 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_xor_logical4 (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical4 (ffebld_conter (l)), - ffebld_constant_logical4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical4_val - (ffebld_cu_val_logical4 (u)), expr); - break; -#endif - - default: - assert ("bad logical kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_eqv -- Collapse eqv expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_eqv(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_eqv (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_eqv_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_eqv_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_eqv_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_eqv_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_eqv_logical1 (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical1 (ffebld_conter (l)), - ffebld_constant_logical1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical1_val - (ffebld_cu_val_logical1 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_eqv_logical2 (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical2 (ffebld_conter (l)), - ffebld_constant_logical2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical2_val - (ffebld_cu_val_logical2 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_eqv_logical3 (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical3 (ffebld_conter (l)), - ffebld_constant_logical3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical3_val - (ffebld_cu_val_logical3 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_eqv_logical4 (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical4 (ffebld_conter (l)), - ffebld_constant_logical4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical4_val - (ffebld_cu_val_logical4 (u)), expr); - break; -#endif - - default: - assert ("bad logical kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_neqv -- Collapse neqv expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_neqv(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_neqv (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebldConstantUnion u; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - if (ffebld_op (r) != FFEBLD_opCONTER) - return expr; - - switch (bt = ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeINTEGER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okINTEGER1 - case FFEINFO_kindtypeINTEGER1: - error = ffetarget_neqv_integer1 (ffebld_cu_ptr_integer1 (u), - ffebld_constant_integer1 (ffebld_conter (l)), - ffebld_constant_integer1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer1_val - (ffebld_cu_val_integer1 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER2 - case FFEINFO_kindtypeINTEGER2: - error = ffetarget_neqv_integer2 (ffebld_cu_ptr_integer2 (u), - ffebld_constant_integer2 (ffebld_conter (l)), - ffebld_constant_integer2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer2_val - (ffebld_cu_val_integer2 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER3 - case FFEINFO_kindtypeINTEGER3: - error = ffetarget_neqv_integer3 (ffebld_cu_ptr_integer3 (u), - ffebld_constant_integer3 (ffebld_conter (l)), - ffebld_constant_integer3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer3_val - (ffebld_cu_val_integer3 (u)), expr); - break; -#endif - -#if FFETARGET_okINTEGER4 - case FFEINFO_kindtypeINTEGER4: - error = ffetarget_neqv_integer4 (ffebld_cu_ptr_integer4 (u), - ffebld_constant_integer4 (ffebld_conter (l)), - ffebld_constant_integer4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_integer4_val - (ffebld_cu_val_integer4 (u)), expr); - break; -#endif - - default: - assert ("bad integer kind type" == NULL); - break; - } - break; - - case FFEINFO_basictypeLOGICAL: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okLOGICAL1 - case FFEINFO_kindtypeLOGICAL1: - error = ffetarget_neqv_logical1 (ffebld_cu_ptr_logical1 (u), - ffebld_constant_logical1 (ffebld_conter (l)), - ffebld_constant_logical1 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical1_val - (ffebld_cu_val_logical1 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL2 - case FFEINFO_kindtypeLOGICAL2: - error = ffetarget_neqv_logical2 (ffebld_cu_ptr_logical2 (u), - ffebld_constant_logical2 (ffebld_conter (l)), - ffebld_constant_logical2 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical2_val - (ffebld_cu_val_logical2 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL3 - case FFEINFO_kindtypeLOGICAL3: - error = ffetarget_neqv_logical3 (ffebld_cu_ptr_logical3 (u), - ffebld_constant_logical3 (ffebld_conter (l)), - ffebld_constant_logical3 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical3_val - (ffebld_cu_val_logical3 (u)), expr); - break; -#endif - -#if FFETARGET_okLOGICAL4 - case FFEINFO_kindtypeLOGICAL4: - error = ffetarget_neqv_logical4 (ffebld_cu_ptr_logical4 (u), - ffebld_constant_logical4 (ffebld_conter (l)), - ffebld_constant_logical4 (ffebld_conter (r))); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_logical4_val - (ffebld_cu_val_logical4 (u)), expr); - break; -#endif - - default: - assert ("bad logical kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_collapse_symter -- Collapse symter expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_symter(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_symter (ffebld expr, ffelexToken t UNUSED) -{ - ffebld r; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharacterSize len; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - if ((r = ffesymbol_init (ffebld_symter (expr))) == NULL) - return expr; /* A PARAMETER lhs in progress. */ - - switch (ffebld_op (r)) - { - case FFEBLD_opCONTER: - break; - - case FFEBLD_opANY: - return r; - - default: - return expr; - } - - bt = ffeinfo_basictype (ffebld_info (r)); - kt = ffeinfo_kindtype (ffebld_info (r)); - len = ffebld_size (r); - - expr = ffebld_new_conter_with_orig (ffebld_constant_copy (ffebld_conter (r)), - expr); - - ffebld_set_info (expr, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - len)); - - return expr; -} - -/* ffeexpr_collapse_funcref -- Collapse funcref expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_funcref(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_funcref (ffebld expr, ffelexToken t UNUSED) -{ - return expr; /* ~~someday go ahead and collapse these, - though not required */ -} - -/* ffeexpr_collapse_arrayref -- Collapse arrayref expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_arrayref(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_arrayref (ffebld expr, ffelexToken t UNUSED) -{ - return expr; -} - -/* ffeexpr_collapse_substr -- Collapse substr expr - - ffebld expr; - ffelexToken token; - expr = ffeexpr_collapse_substr(expr,token); - - If the result of the expr is a constant, replaces the expr with the - computed constant. */ - -ffebld -ffeexpr_collapse_substr (ffebld expr, ffelexToken t) -{ - ffebad error = FFEBAD; - ffebld l; - ffebld r; - ffebld start; - ffebld stop; - ffebldConstantUnion u; - ffeinfoKindtype kt; - ffetargetCharacterSize len; - ffetargetIntegerDefault first; - ffetargetIntegerDefault last; - - if (ffeinfo_where (ffebld_info (expr)) != FFEINFO_whereCONSTANT) - return expr; - - l = ffebld_left (expr); - r = ffebld_right (expr); /* opITEM. */ - - if (ffebld_op (l) != FFEBLD_opCONTER) - return expr; - - kt = ffeinfo_kindtype (ffebld_info (l)); - len = ffebld_size (l); - - start = ffebld_head (r); - stop = ffebld_head (ffebld_trail (r)); - if (start == NULL) - first = 1; - else - { - if ((ffebld_op (start) != FFEBLD_opCONTER) - || (ffeinfo_basictype (ffebld_info (start)) != FFEINFO_basictypeINTEGER) - || (ffeinfo_kindtype (ffebld_info (start)) - != FFEINFO_kindtypeINTEGERDEFAULT)) - return expr; - first = ffebld_constant_integerdefault (ffebld_conter (start)); - } - if (stop == NULL) - last = len; - else - { - if ((ffebld_op (stop) != FFEBLD_opCONTER) - || (ffeinfo_basictype (ffebld_info (stop)) != FFEINFO_basictypeINTEGER) - || (ffeinfo_kindtype (ffebld_info (stop)) - != FFEINFO_kindtypeINTEGERDEFAULT)) - return expr; - last = ffebld_constant_integerdefault (ffebld_conter (stop)); - } - - /* Handle problems that should have already been diagnosed, but - left in the expression tree. */ - - if (first <= 0) - first = 1; - if (last < first) - last = first + len - 1; - - if ((first == 1) && (last == len)) - { /* Same as original. */ - expr = ffebld_new_conter_with_orig (ffebld_constant_copy - (ffebld_conter (l)), expr); - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeCHARACTER, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - len)); - - return expr; - } - - switch (ffeinfo_basictype (ffebld_info (expr))) - { - case FFEINFO_basictypeANY: - return expr; - - case FFEINFO_basictypeCHARACTER: - switch (kt = ffeinfo_kindtype (ffebld_info (expr))) - { -#if FFETARGET_okCHARACTER1 - case FFEINFO_kindtypeCHARACTER1: - error = ffetarget_substr_character1 (ffebld_cu_ptr_character1 (u), - ffebld_constant_character1 (ffebld_conter (l)), first, last, - ffebld_constant_pool (), &len); - expr = ffebld_new_conter_with_orig (ffebld_constant_new_character1_val - (ffebld_cu_val_character1 (u)), expr); - break; -#endif - - default: - assert ("bad character kind type" == NULL); - break; - } - break; - - default: - assert ("bad type" == NULL); - return expr; - } - - ffebld_set_info (expr, ffeinfo_new - (FFEINFO_basictypeCHARACTER, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - len)); - - if ((error != FFEBAD) - && ffebad_start (error)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - return expr; -} - -/* ffeexpr_convert -- Convert source expression to given type - - ffebld source; - ffelexToken source_token; - ffelexToken dest_token; // Any appropriate token for "destination". - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharactersize sz; - ffeexprContext context; // Mainly LET or DATA. - source = ffeexpr_convert(source,source_token,dest_token,bt,kt,sz,context); - - If the expression conforms, returns the source expression. Otherwise - returns source wrapped in a convert node doing the conversion, or - ANY wrapped in convert if there is a conversion error (and issues an - error message). Be sensitive to the context for certain aspects of - the conversion. */ - -ffebld -ffeexpr_convert (ffebld source, ffelexToken source_token, ffelexToken dest_token, - ffeinfoBasictype bt, ffeinfoKindtype kt, ffeinfoRank rk, - ffetargetCharacterSize sz, ffeexprContext context) -{ - bool bad; - ffeinfo info; - ffeinfoWhere wh; - - info = ffebld_info (source); - if ((bt != ffeinfo_basictype (info)) - || (kt != ffeinfo_kindtype (info)) - || (rk != 0) /* Can't convert from or to arrays yet. */ - || (ffeinfo_rank (info) != 0) - || (sz != ffebld_size_known (source))) -#if 0 /* Nobody seems to need this spurious CONVERT node. */ - || ((context != FFEEXPR_contextLET) - && (bt == FFEINFO_basictypeCHARACTER) - && (sz == FFETARGET_charactersizeNONE))) -#endif - { - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - switch (bt) - { - case FFEINFO_basictypeLOGICAL: - bad = FALSE; - break; - - case FFEINFO_basictypeINTEGER: - bad = !ffe_is_ugly_logint (); - break; - - case FFEINFO_basictypeCHARACTER: - bad = ffe_is_pedantic () - || !(ffe_is_ugly_init () - && (context == FFEEXPR_contextDATA)); - break; - - default: - bad = TRUE; - break; - } - break; - - case FFEINFO_basictypeINTEGER: - switch (bt) - { - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - bad = FALSE; - break; - - case FFEINFO_basictypeLOGICAL: - bad = !ffe_is_ugly_logint (); - break; - - case FFEINFO_basictypeCHARACTER: - bad = ffe_is_pedantic () - || !(ffe_is_ugly_init () - && (context == FFEEXPR_contextDATA)); - break; - - default: - bad = TRUE; - break; - } - break; - - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - switch (bt) - { - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - bad = FALSE; - break; - - case FFEINFO_basictypeCHARACTER: - bad = TRUE; - break; - - default: - bad = TRUE; - break; - } - break; - - case FFEINFO_basictypeCHARACTER: - bad = (bt != FFEINFO_basictypeCHARACTER) - && (ffe_is_pedantic () - || (bt != FFEINFO_basictypeINTEGER) - || !(ffe_is_ugly_init () - && (context == FFEEXPR_contextDATA))); - break; - - case FFEINFO_basictypeTYPELESS: - case FFEINFO_basictypeHOLLERITH: - bad = ffe_is_pedantic () - || !(ffe_is_ugly_init () - && ((context == FFEEXPR_contextDATA) - || (context == FFEEXPR_contextLET))); - break; - - default: - bad = TRUE; - break; - } - - if (!bad && ((rk != 0) || (ffeinfo_rank (info) != 0))) - bad = TRUE; - - if (bad && (bt != FFEINFO_basictypeANY) && (kt != FFEINFO_kindtypeANY) - && (ffeinfo_basictype (info) != FFEINFO_basictypeANY) - && (ffeinfo_kindtype (info) != FFEINFO_kindtypeANY) - && (ffeinfo_where (info) != FFEINFO_whereANY)) - { - if (ffebad_start (FFEBAD_BAD_TYPES)) - { - if (dest_token == NULL) - ffebad_here (0, ffewhere_line_unknown (), - ffewhere_column_unknown ()); - else - ffebad_here (0, ffelex_token_where_line (dest_token), - ffelex_token_where_column (dest_token)); - assert (source_token != NULL); - ffebad_here (1, ffelex_token_where_line (source_token), - ffelex_token_where_column (source_token)); - ffebad_finish (); - } - - source = ffebld_new_any (); - ffebld_set_info (source, ffeinfo_new_any ()); - } - else - { - switch (ffeinfo_where (info)) - { - case FFEINFO_whereCONSTANT: - wh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - wh = FFEINFO_whereIMMEDIATE; - break; - - default: - wh = FFEINFO_whereFLEETING; - break; - } - source = ffebld_new_convert (source); - ffebld_set_info (source, ffeinfo_new - (bt, - kt, - 0, - FFEINFO_kindENTITY, - wh, - sz)); - source = ffeexpr_collapse_convert (source, source_token); - } - } - - return source; -} - -/* ffeexpr_convert_expr -- Convert source expr to conform to dest expr - - ffebld source; - ffebld dest; - ffelexToken source_token; - ffelexToken dest_token; - ffeexprContext context; - source = ffeexpr_convert_expr(source,source_token,dest,dest_token,context); - - If the expressions conform, returns the source expression. Otherwise - returns source wrapped in a convert node doing the conversion, or - ANY wrapped in convert if there is a conversion error (and issues an - error message). Be sensitive to the context, such as LET or DATA. */ - -ffebld -ffeexpr_convert_expr (ffebld source, ffelexToken source_token, ffebld dest, - ffelexToken dest_token, ffeexprContext context) -{ - ffeinfo info; - - info = ffebld_info (dest); - return ffeexpr_convert (source, source_token, dest_token, - ffeinfo_basictype (info), - ffeinfo_kindtype (info), - ffeinfo_rank (info), - ffebld_size_known (dest), - context); -} - -/* ffeexpr_convert_to_sym -- Convert source expression to conform to symbol - - ffebld source; - ffesymbol dest; - ffelexToken source_token; - ffelexToken dest_token; - source = ffeexpr_convert_to_sym(source,source_token,dest,dest_token); - - If the expressions conform, returns the source expression. Otherwise - returns source wrapped in a convert node doing the conversion, or - ANY wrapped in convert if there is a conversion error (and issues an - error message). */ - -ffebld -ffeexpr_convert_to_sym (ffebld source, ffelexToken source_token, - ffesymbol dest, ffelexToken dest_token) -{ - return ffeexpr_convert (source, source_token, dest_token, ffesymbol_basictype (dest), - ffesymbol_kindtype (dest), ffesymbol_rank (dest), ffesymbol_size (dest), - FFEEXPR_contextLET); -} - -/* Initializes the module. */ - -void -ffeexpr_init_2 (void) -{ - ffeexpr_stack_ = NULL; - ffeexpr_level_ = 0; -} - -/* ffeexpr_lhs -- Begin processing left-hand-side-context expression - - Prepares cluster for delivery of lexer tokens representing an expression - in a left-hand-side context (A in A=B, for example). ffebld is used - to build expressions in the given pool. The appropriate lexer-token - handling routine within ffeexpr is returned. When the end of the - expression is detected, mycallbackroutine is called with the resulting - single ffebld object specifying the entire expression and the first - lexer token that is not considered part of the expression. This caller- - supplied routine itself returns a lexer-token handling routine. Thus, - if necessary, ffeexpr can return several tokens as end-of-expression - tokens if it needs to scan forward more than one in any instance. */ - -ffelexHandler -ffeexpr_lhs (mallocPool pool, ffeexprContext context, ffeexprCallback callback) -{ - ffeexprStack_ s; - - ffebld_pool_push (pool); - s = malloc_new_ks (ffe_pool_program_unit (), "FFEEXPR stack", sizeof (*s)); - s->previous = ffeexpr_stack_; - s->pool = pool; - s->context = context; - s->callback = callback; - s->first_token = NULL; - s->exprstack = NULL; - s->is_rhs = FALSE; - ffeexpr_stack_ = s; - return (ffelexHandler) ffeexpr_token_first_lhs_; -} - -/* ffeexpr_rhs -- Begin processing right-hand-side-context expression - - return ffeexpr_rhs(malloc_pool_image(),mycallbackroutine); // to lexer. - - Prepares cluster for delivery of lexer tokens representing an expression - in a right-hand-side context (B in A=B, for example). ffebld is used - to build expressions in the given pool. The appropriate lexer-token - handling routine within ffeexpr is returned. When the end of the - expression is detected, mycallbackroutine is called with the resulting - single ffebld object specifying the entire expression and the first - lexer token that is not considered part of the expression. This caller- - supplied routine itself returns a lexer-token handling routine. Thus, - if necessary, ffeexpr can return several tokens as end-of-expression - tokens if it needs to scan forward more than one in any instance. */ - -ffelexHandler -ffeexpr_rhs (mallocPool pool, ffeexprContext context, ffeexprCallback callback) -{ - ffeexprStack_ s; - - ffebld_pool_push (pool); - s = malloc_new_ks (ffe_pool_program_unit (), "FFEEXPR stack", sizeof (*s)); - s->previous = ffeexpr_stack_; - s->pool = pool; - s->context = context; - s->callback = callback; - s->first_token = NULL; - s->exprstack = NULL; - s->is_rhs = TRUE; - ffeexpr_stack_ = s; - return (ffelexHandler) ffeexpr_token_first_rhs_; -} - -/* ffeexpr_cb_close_paren_ -- OPEN_PAREN expr - - Pass it to ffeexpr_rhs as the callback routine. - - Makes sure the end token is close-paren and swallows it, else issues - an error message and doesn't swallow the token (passing it along instead). - In either case wraps up subexpression construction by enclosing the - ffebld expression in a paren. */ - -static ffelexHandler -ffeexpr_cb_close_paren_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprExpr_ e; - - if (ffelex_token_type (t) != FFELEX_typeCLOSE_PAREN) - { - /* Oops, naughty user didn't specify the close paren! */ - - if (ffest_ffebad_start (FFEBAD_MISSING_CLOSE_PAREN)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - ffeexpr_exprstack_push_operand_ (e); - - return - (ffelexHandler) ffeexpr_find_close_paren_ (t, - (ffelexHandler) - ffeexpr_token_binary_); - } - - if (expr->op == FFEBLD_opIMPDO) - { - if (ffest_ffebad_start (FFEBAD_IMPDO_PAREN)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - } - else - { - expr = ffebld_new_paren (expr); - ffebld_set_info (expr, ffeinfo_use (ffebld_info (ffebld_left (expr)))); - } - - /* Now push the (parenthesized) expression as an operand onto the - expression stack. */ - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->u.operand = expr; - e->u.operand = ffeexpr_collapse_paren (e->u.operand, ft); - e->token = ffeexpr_stack_->tokens[0]; - ffeexpr_exprstack_push_operand_ (e); - - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_cb_close_paren_ambig_ -- OPEN_PAREN expr - - Pass it to ffeexpr_rhs as the callback routine. - - We get here in the READ/BACKEND/ENDFILE/REWIND case "READ(expr)" - with the next token in t. If the next token is possibly a binary - operator, continue processing the outer expression. If the next - token is COMMA, then the expression is a unit specifier, and - parentheses should not be added to it because it surrounds the - I/O control list that starts with the unit specifier (and continues - on from here -- we haven't seen the CLOSE_PAREN that matches the - OPEN_PAREN, it is up to the callback function to expect to see it - at some point). In this case, we notify the callback function that - the COMMA is inside, not outside, the parens by wrapping the expression - in an opITEM (with a NULL trail) -- the callback function presumably - unwraps it after seeing this kludgey indicator. - - If the next token is CLOSE_PAREN, then we go to the _1_ state to - decide what to do with the token after that. - - 15-Feb-91 JCB 1.1 - Use an extra state for the CLOSE_PAREN case to make READ &co really - work right. */ - -static ffelexHandler -ffeexpr_cb_close_paren_ambig_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprCallback callback; - ffeexprStack_ s; - - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - { /* Need to see the next token before we - decide anything. */ - ffeexpr_stack_->expr = expr; - ffeexpr_tokens_[0] = ffelex_token_use (ft); - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_cb_close_paren_ambig_1_; - } - - expr = ffeexpr_finished_ambig_ (ft, expr); - - /* Let the callback function handle the case where t isn't COMMA. */ - - /* Here is a kludge whereby we tell the callback function the OPEN_PAREN - that preceded the expression starts a list of expressions, and the expr - hasn't been wrapped in a corresponding (and possibly collapsed) opPAREN - node. The callback function should extract the real expr from the head - of this opITEM node after testing it. */ - - expr = ffebld_new_item (expr, NULL); - - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ffelex_token_kill (ffeexpr_stack_->first_token); - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - return (ffelexHandler) (*callback) (ft, expr, t); -} - -/* ffeexpr_cb_close_paren_ambig_1_ -- OPEN_PAREN expr CLOSE_PAREN - - See ffeexpr_cb_close_paren_ambig_. - - We get here in the READ/BACKEND/ENDFILE/REWIND case "READ(expr)" - with the next token in t. If the next token is possibly a binary - operator, continue processing the outer expression. If the next - token is COMMA, the expression is a parenthesized format specifier. - If the next token is not EOS or SEMICOLON, then because it is not a - binary operator (it is NAME, OPEN_PAREN, &c), the expression is - a unit specifier, and parentheses should not be added to it because - they surround the I/O control list that consists of only the unit - specifier. If the next token is EOS or SEMICOLON, the statement - must be disambiguated by looking at the type of the expression -- a - character expression is a parenthesized format specifier, while a - non-character expression is a unit specifier. - - Another issue is how to do the callback so the recipient of the - next token knows how to handle it if it is a COMMA. In all other - cases, disambiguation is straightforward: the same approach as the - above is used. - - EXTENSION: in COMMA case, if not pedantic, use same disambiguation - as for EOS/SEMICOLON case; f2c allows "READ (cilist) [[,]iolist]" - and apparently other compilers do, as well, and some code out there - uses this "feature". - - 19-Feb-91 JCB 1.1 - Extend to allow COMMA as nondisambiguating by itself. Remember - to not try and check info field for opSTAR, since that expr doesn't - have a valid info field. */ - -static ffelexHandler -ffeexpr_cb_close_paren_ambig_1_ (ffelexToken t) -{ - ffeexprCallback callback; - ffeexprStack_ s; - ffelexHandler next; - ffelexToken orig_ft = ffeexpr_tokens_[0]; /* In case callback clobbers - these. */ - ffelexToken orig_t = ffeexpr_tokens_[1]; - ffebld expr = ffeexpr_stack_->expr; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: /* Subexpr is parenthesized format specifier. */ - if (ffe_is_pedantic ()) - goto pedantic_comma; /* :::::::::::::::::::: */ - /* Fall through. */ - case FFELEX_typeEOS: /* Ambiguous; use type of expr to - disambiguate. */ - case FFELEX_typeSEMICOLON: - if ((expr == NULL) || (ffebld_op (expr) == FFEBLD_opANY) - || (ffebld_op (expr) == FFEBLD_opSTAR) - || (ffeinfo_basictype (ffebld_info (expr)) - != FFEINFO_basictypeCHARACTER)) - break; /* Not a valid CHARACTER entity, can't be a - format spec. */ - /* Fall through. */ - default: /* Binary op (we assume; error otherwise); - format specifier. */ - - pedantic_comma: /* :::::::::::::::::::: */ - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILENUMAMBIG: - ffeexpr_stack_->context = FFEEXPR_contextFILENUM; - break; - - case FFEEXPR_contextFILEUNITAMBIG: - ffeexpr_stack_->context = FFEEXPR_contextFILEFORMAT; - break; - - default: - assert ("bad context" == NULL); - break; - } - - ffeexpr_stack_->tokens[0] = ffelex_token_use (ffeexpr_stack_->first_token); - next = (ffelexHandler) ffeexpr_cb_close_paren_ (orig_ft, expr, orig_t); - ffelex_token_kill (orig_ft); - ffelex_token_kill (orig_t); - return (ffelexHandler) (*next) (t); - - case FFELEX_typeOPEN_PAREN:/* Non-binary op; beginning of I/O list. */ - case FFELEX_typeNAME: - break; - } - - expr = ffeexpr_finished_ambig_ (orig_ft, expr); - - /* Here is a kludge whereby we tell the callback function the OPEN_PAREN - that preceded the expression starts a list of expressions, and the expr - hasn't been wrapped in a corresponding (and possibly collapsed) opPAREN - node. The callback function should extract the real expr from the head - of this opITEM node after testing it. */ - - expr = ffebld_new_item (expr, NULL); - - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ffelex_token_kill (ffeexpr_stack_->first_token); - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - next = (ffelexHandler) (*callback) (orig_ft, expr, orig_t); - ffelex_token_kill (orig_ft); - ffelex_token_kill (orig_t); - return (ffelexHandler) (*next) (t); -} - -/* ffeexpr_cb_close_paren_c_ -- OPEN_PAREN expr (possible complex) - - Pass it to ffeexpr_rhs as the callback routine. - - Makes sure the end token is close-paren and swallows it, or a comma - and handles complex/implied-do possibilities, else issues - an error message and doesn't swallow the token (passing it along instead). */ - -static ffelexHandler -ffeexpr_cb_close_paren_c_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - /* First check to see if this is a possible complex entity. It is if the - token is a comma. */ - - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - { - ffeexpr_stack_->tokens[1] = ffelex_token_use (ft); - ffeexpr_stack_->expr = expr; - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextPAREN_, ffeexpr_cb_comma_c_); - } - - return (ffelexHandler) ffeexpr_cb_close_paren_ (ft, expr, t); -} - -/* ffeexpr_cb_comma_c_ -- OPEN_PAREN expr COMMA expr - - Pass it to ffeexpr_rhs as the callback routine. - - If this token is not a comma, we have a complex constant (or an attempt - at one), so handle it accordingly, displaying error messages if the token - is not a close-paren. */ - -static ffelexHandler -ffeexpr_cb_comma_c_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprExpr_ e; - ffeinfoBasictype lty = (ffeexpr_stack_->expr == NULL) - ? FFEINFO_basictypeNONE : ffeinfo_basictype (ffebld_info (ffeexpr_stack_->expr)); - ffeinfoBasictype rty = (expr == NULL) - ? FFEINFO_basictypeNONE : ffeinfo_basictype (ffebld_info (expr)); - ffeinfoKindtype lkt; - ffeinfoKindtype rkt; - ffeinfoKindtype nkt; - bool ok = TRUE; - ffebld orig; - - if ((ffeexpr_stack_->expr == NULL) - || (ffebld_op (ffeexpr_stack_->expr) != FFEBLD_opCONTER) - || (((orig = ffebld_conter_orig (ffeexpr_stack_->expr)) != NULL) - && (((ffebld_op (orig) != FFEBLD_opUMINUS) - && (ffebld_op (orig) != FFEBLD_opUPLUS)) - || (ffebld_conter_orig (ffebld_left (orig)) != NULL))) - || ((lty != FFEINFO_basictypeINTEGER) - && (lty != FFEINFO_basictypeREAL))) - { - if ((lty != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_INVALID_COMPLEX_PART)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[1]), - ffelex_token_where_column (ffeexpr_stack_->tokens[1])); - ffebad_string ("Real"); - ffebad_finish (); - } - ok = FALSE; - } - if ((expr == NULL) - || (ffebld_op (expr) != FFEBLD_opCONTER) - || (((orig = ffebld_conter_orig (expr)) != NULL) - && (((ffebld_op (orig) != FFEBLD_opUMINUS) - && (ffebld_op (orig) != FFEBLD_opUPLUS)) - || (ffebld_conter_orig (ffebld_left (orig)) != NULL))) - || ((rty != FFEINFO_basictypeINTEGER) - && (rty != FFEINFO_basictypeREAL))) - { - if ((rty != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_INVALID_COMPLEX_PART)) - { - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_string ("Imaginary"); - ffebad_finish (); - } - ok = FALSE; - } - - ffelex_token_kill (ffeexpr_stack_->tokens[1]); - - /* Push the (parenthesized) expression as an operand onto the expression - stack. */ - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_stack_->tokens[0]; - - if (ok) - { - if (lty == FFEINFO_basictypeINTEGER) - lkt = FFEINFO_kindtypeREALDEFAULT; - else - lkt = ffeinfo_kindtype (ffebld_info (ffeexpr_stack_->expr)); - if (rty == FFEINFO_basictypeINTEGER) - rkt = FFEINFO_kindtypeREALDEFAULT; - else - rkt = ffeinfo_kindtype (ffebld_info (expr)); - - nkt = ffeinfo_kindtype_max (FFEINFO_basictypeCOMPLEX, lkt, rkt); - ffeexpr_stack_->expr = ffeexpr_convert (ffeexpr_stack_->expr, - ffeexpr_stack_->tokens[1], ffeexpr_stack_->tokens[0], - FFEINFO_basictypeREAL, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - expr = ffeexpr_convert (expr, - ffeexpr_stack_->tokens[1], ffeexpr_stack_->tokens[0], - FFEINFO_basictypeREAL, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - } - else - nkt = FFEINFO_kindtypeANY; - - switch (nkt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: - e->u.operand = ffebld_new_conter (ffebld_constant_new_complex1 - (ffebld_conter (ffeexpr_stack_->expr), ffebld_conter (expr))); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeCOMPLEX, nkt, 0, - FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - break; -#endif - -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: - e->u.operand = ffebld_new_conter (ffebld_constant_new_complex2 - (ffebld_conter (ffeexpr_stack_->expr), ffebld_conter (expr))); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeCOMPLEX, nkt, 0, - FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - break; -#endif - -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: - e->u.operand = ffebld_new_conter (ffebld_constant_new_complex3 - (ffebld_conter (ffeexpr_stack_->expr), ffebld_conter (expr))); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeCOMPLEX, nkt, 0, - FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - break; -#endif - - default: - if (ffebad_start ((nkt == FFEINFO_kindtypeREALDOUBLE) - ? FFEBAD_BAD_DBLCMPLX : FFEBAD_BAD_COMPLEX)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - /* Fall through. */ - case FFEINFO_kindtypeANY: - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - break; - } - ffeexpr_exprstack_push_operand_ (e); - - /* Now, if the token is a close parenthese, we're in great shape so return - the next handler. */ - - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_token_binary_; - - /* Oops, naughty user didn't specify the close paren! */ - - if (ffest_ffebad_start (FFEBAD_MISSING_CLOSE_PAREN)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - - return - (ffelexHandler) ffeexpr_find_close_paren_ (t, - (ffelexHandler) - ffeexpr_token_binary_); -} - -/* ffeexpr_cb_close_paren_ci_ -- OPEN_PAREN expr (possible complex or - implied-DO construct) - - Pass it to ffeexpr_rhs as the callback routine. - - Makes sure the end token is close-paren and swallows it, or a comma - and handles complex/implied-do possibilities, else issues - an error message and doesn't swallow the token (passing it along instead). */ - -static ffelexHandler -ffeexpr_cb_close_paren_ci_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprContext ctx; - - /* First check to see if this is a possible complex or implied-DO entity. - It is if the token is a comma. */ - - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - { - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIMPDOITEM_: - ctx = FFEEXPR_contextIMPDOITEM_; - break; - - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextIMPDOITEMDF_: - ctx = FFEEXPR_contextIMPDOITEMDF_; - break; - - default: - assert ("bad context" == NULL); - ctx = FFEEXPR_contextIMPDOITEM_; - break; - } - - ffeexpr_stack_->tokens[0] = ffelex_token_use (ft); - ffeexpr_stack_->expr = expr; - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - ctx, ffeexpr_cb_comma_ci_); - } - - ffeexpr_stack_->tokens[0] = ffelex_token_use (ffeexpr_stack_->first_token); - return (ffelexHandler) ffeexpr_cb_close_paren_ (ft, expr, t); -} - -/* ffeexpr_cb_comma_ci_ -- OPEN_PAREN expr COMMA expr - - Pass it to ffeexpr_rhs as the callback routine. - - If this token is not a comma, we have a complex constant (or an attempt - at one), so handle it accordingly, displaying error messages if the token - is not a close-paren. If we have a comma here, it is an attempt at an - implied-DO, so start making a list accordingly. Oh, it might be an - equal sign also, meaning an implied-DO with only one item in its list. */ - -static ffelexHandler -ffeexpr_cb_comma_ci_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffebld fexpr; - - /* First check to see if this is a possible complex constant. It is if the - token is not a comma or an equals sign, in which case it should be a - close-paren. */ - - if ((ffelex_token_type (t) != FFELEX_typeCOMMA) - && (ffelex_token_type (t) != FFELEX_typeEQUALS)) - { - ffeexpr_stack_->tokens[1] = ffeexpr_stack_->tokens[0]; - ffeexpr_stack_->tokens[0] = ffelex_token_use (ffeexpr_stack_->first_token); - return (ffelexHandler) ffeexpr_cb_comma_c_ (ft, expr, t); - } - - /* Here we have either EQUALS or COMMA, meaning we are in an implied-DO - construct. Make a list and handle accordingly. */ - - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - fexpr = ffeexpr_stack_->expr; - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - ffebld_append_item (&ffeexpr_stack_->bottom, fexpr); - return (ffelexHandler) ffeexpr_cb_comma_i_1_ (ft, expr, t); -} - -/* ffeexpr_cb_comma_i_ -- OPEN_PAREN expr - - Pass it to ffeexpr_rhs as the callback routine. - - Handle first item in an implied-DO construct. */ - -static ffelexHandler -ffeexpr_cb_comma_i_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeCOMMA) - { - if (ffest_ffebad_start (FFEBAD_BAD_IMPDO)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_finish (); - } - ffebld_end_list (&ffeexpr_stack_->bottom); - ffeexpr_stack_->expr = ffebld_new_any (); - ffebld_set_info (ffeexpr_stack_->expr, ffeinfo_new_any ()); - if (ffelex_token_type (t) != FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_cb_comma_i_5_ (t); - return (ffelexHandler) ffeexpr_cb_comma_i_5_; - } - - return (ffelexHandler) ffeexpr_cb_comma_i_1_ (ft, expr, t); -} - -/* ffeexpr_cb_comma_i_1_ -- OPEN_PAREN expr - - Pass it to ffeexpr_rhs as the callback routine. - - Handle first item in an implied-DO construct. */ - -static ffelexHandler -ffeexpr_cb_comma_i_1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprContext ctxi; - ffeexprContext ctxc; - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATA: - case FFEEXPR_contextDATAIMPDOITEM_: - ctxi = FFEEXPR_contextDATAIMPDOITEM_; - ctxc = FFEEXPR_contextDATAIMPDOCTRL_; - break; - - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIMPDOITEM_: - ctxi = FFEEXPR_contextIMPDOITEM_; - ctxc = FFEEXPR_contextIMPDOCTRL_; - break; - - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextIMPDOITEMDF_: - ctxi = FFEEXPR_contextIMPDOITEMDF_; - ctxc = FFEEXPR_contextIMPDOCTRL_; - break; - - default: - assert ("bad context" == NULL); - ctxi = FFEEXPR_context; - ctxc = FFEEXPR_context; - break; - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - if (ffeexpr_stack_->is_rhs) - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - ctxi, ffeexpr_cb_comma_i_1_); - return (ffelexHandler) ffeexpr_lhs (ffeexpr_stack_->pool, - ctxi, ffeexpr_cb_comma_i_1_); - - case FFELEX_typeEQUALS: - ffebld_end_list (&ffeexpr_stack_->bottom); - - /* Complain if implied-DO variable in list of items to be read. */ - - if ((ctxc == FFEEXPR_contextIMPDOCTRL_) && !ffeexpr_stack_->is_rhs) - ffeexpr_check_impdo_ (ffeexpr_stack_->expr, - ffeexpr_stack_->first_token, expr, ft); - - /* Set doiter flag for all appropriate SYMTERs. */ - - ffeexpr_update_impdo_ (ffeexpr_stack_->expr, expr); - - ffeexpr_stack_->expr = ffebld_new_impdo (ffeexpr_stack_->expr, NULL); - ffebld_set_info (ffeexpr_stack_->expr, - ffeinfo_new (FFEINFO_basictypeNONE, - FFEINFO_kindtypeNONE, - 0, - FFEINFO_kindNONE, - FFEINFO_whereNONE, - FFETARGET_charactersizeNONE)); - ffebld_init_list (&(ffebld_right (ffeexpr_stack_->expr)), - &ffeexpr_stack_->bottom); - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - ctxc, ffeexpr_cb_comma_i_2_); - - default: - if (ffest_ffebad_start (FFEBAD_BAD_IMPDO)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_finish (); - } - ffebld_end_list (&ffeexpr_stack_->bottom); - ffeexpr_stack_->expr = ffebld_new_any (); - ffebld_set_info (ffeexpr_stack_->expr, ffeinfo_new_any ()); - if (ffelex_token_type (t) != FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_cb_comma_i_5_ (t); - return (ffelexHandler) ffeexpr_cb_comma_i_5_; - } -} - -/* ffeexpr_cb_comma_i_2_ -- OPEN_PAREN expr-list EQUALS expr - - Pass it to ffeexpr_rhs as the callback routine. - - Handle start-value in an implied-DO construct. */ - -static ffelexHandler -ffeexpr_cb_comma_i_2_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - ffeexprContext ctx; - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATA: - case FFEEXPR_contextDATAIMPDOITEM_: - ctx = FFEEXPR_contextDATAIMPDOCTRL_; - break; - - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - ctx = FFEEXPR_contextIMPDOCTRL_; - break; - - default: - assert ("bad context" == NULL); - ctx = FFEEXPR_context; - break; - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - ctx, ffeexpr_cb_comma_i_3_); - break; - - default: - if (ffest_ffebad_start (FFEBAD_BAD_IMPDO)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_finish (); - } - ffebld_end_list (&ffeexpr_stack_->bottom); - ffeexpr_stack_->expr = ffebld_new_any (); - ffebld_set_info (ffeexpr_stack_->expr, ffeinfo_new_any ()); - if (ffelex_token_type (t) != FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_cb_comma_i_5_ (t); - return (ffelexHandler) ffeexpr_cb_comma_i_5_; - } -} - -/* ffeexpr_cb_comma_i_3_ -- OPEN_PAREN expr-list EQUALS expr COMMA expr - - Pass it to ffeexpr_rhs as the callback routine. - - Handle end-value in an implied-DO construct. */ - -static ffelexHandler -ffeexpr_cb_comma_i_3_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - ffeexprContext ctx; - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATA: - case FFEEXPR_contextDATAIMPDOITEM_: - ctx = FFEEXPR_contextDATAIMPDOCTRL_; - break; - - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - ctx = FFEEXPR_contextIMPDOCTRL_; - break; - - default: - assert ("bad context" == NULL); - ctx = FFEEXPR_context; - break; - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - ctx, ffeexpr_cb_comma_i_4_); - break; - - case FFELEX_typeCLOSE_PAREN: - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - return (ffelexHandler) ffeexpr_cb_comma_i_4_ (NULL, NULL, t); - break; - - default: - if (ffest_ffebad_start (FFEBAD_BAD_IMPDO)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_finish (); - } - ffebld_end_list (&ffeexpr_stack_->bottom); - ffeexpr_stack_->expr = ffebld_new_any (); - ffebld_set_info (ffeexpr_stack_->expr, ffeinfo_new_any ()); - if (ffelex_token_type (t) != FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_cb_comma_i_5_ (t); - return (ffelexHandler) ffeexpr_cb_comma_i_5_; - } -} - -/* ffeexpr_cb_comma_i_4_ -- OPEN_PAREN expr-list EQUALS expr COMMA expr - [COMMA expr] - - Pass it to ffeexpr_rhs as the callback routine. - - Handle incr-value in an implied-DO construct. */ - -static ffelexHandler -ffeexpr_cb_comma_i_4_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - ffebld_end_list (&ffeexpr_stack_->bottom); - { - ffebld item; - - for (item = ffebld_left (ffeexpr_stack_->expr); - item != NULL; - item = ffebld_trail (item)) - if (ffebld_op (ffebld_head (item)) == FFEBLD_opANY) - goto replace_with_any; /* :::::::::::::::::::: */ - - for (item = ffebld_right (ffeexpr_stack_->expr); - item != NULL; - item = ffebld_trail (item)) - if ((ffebld_head (item) != NULL) /* Increment may be NULL. */ - && (ffebld_op (ffebld_head (item)) == FFEBLD_opANY)) - goto replace_with_any; /* :::::::::::::::::::: */ - } - break; - - default: - if (ffest_ffebad_start (FFEBAD_BAD_IMPDO)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_finish (); - } - ffebld_end_list (&ffeexpr_stack_->bottom); - - replace_with_any: /* :::::::::::::::::::: */ - - ffeexpr_stack_->expr = ffebld_new_any (); - ffebld_set_info (ffeexpr_stack_->expr, ffeinfo_new_any ()); - break; - } - - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_cb_comma_i_5_; - return (ffelexHandler) ffeexpr_cb_comma_i_5_ (t); -} - -/* ffeexpr_cb_comma_i_5_ -- OPEN_PAREN expr-list EQUALS expr COMMA expr - [COMMA expr] CLOSE_PAREN - - Pass it to ffeexpr_rhs as the callback routine. - - Collects token following implied-DO construct for callback function. */ - -static ffelexHandler -ffeexpr_cb_comma_i_5_ (ffelexToken t) -{ - ffeexprCallback callback; - ffeexprStack_ s; - ffelexHandler next; - ffelexToken ft; - ffebld expr; - bool terminate; - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATA: - case FFEEXPR_contextDATAIMPDOITEM_: - terminate = TRUE; - break; - - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - terminate = FALSE; - break; - - default: - assert ("bad context" == NULL); - terminate = FALSE; - break; - } - - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ft = ffeexpr_stack_->first_token; - expr = ffeexpr_stack_->expr; - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, - sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - next = (ffelexHandler) (*callback) (ft, expr, t); - ffelex_token_kill (ft); - if (terminate) - { - ffesymbol_drive_sfnames (ffeexpr_check_impctrl_); - --ffeexpr_level_; - if (ffeexpr_level_ == 0) - ffe_terminate_4 (); - } - return (ffelexHandler) next; -} - -/* ffeexpr_cb_end_loc_ -- Handle end of %LOC subexpression - - Makes sure the end token is close-paren and swallows it, else issues - an error message and doesn't swallow the token (passing it along instead). - In either case wraps up subexpression construction by enclosing the - ffebld expression in a %LOC. */ - -static ffelexHandler -ffeexpr_cb_end_loc_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - ffeexprExpr_ e; - - /* First push the (%LOC) expression as an operand onto the expression - stack. */ - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_stack_->tokens[0]; - e->u.operand = ffebld_new_percent_loc (expr); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeINTEGER, - ffecom_pointer_kind (), - 0, - FFEINFO_kindENTITY, - FFEINFO_whereFLEETING, - FFETARGET_charactersizeNONE)); -#if 0 /* ~~ */ - e->u.operand = ffeexpr_collapse_percent_loc (e->u.operand, ft); -#endif - ffeexpr_exprstack_push_operand_ (e); - - /* Now, if the token is a close parenthese, we're in great shape so return - the next handler. */ - - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - { - ffelex_token_kill (ffeexpr_stack_->tokens[1]); - return (ffelexHandler) ffeexpr_token_binary_; - } - - /* Oops, naughty user didn't specify the close paren! */ - - if (ffest_ffebad_start (FFEBAD_MISSING_CLOSE_PAREN)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[1]), - ffelex_token_where_column (ffeexpr_stack_->tokens[1])); - ffebad_finish (); - } - - ffelex_token_kill (ffeexpr_stack_->tokens[1]); - return - (ffelexHandler) ffeexpr_find_close_paren_ (t, - (ffelexHandler) - ffeexpr_token_binary_); -} - -/* ffeexpr_cb_end_notloc_ -- PERCENT NAME(VAL,REF,DESCR) OPEN_PAREN expr - - Should be CLOSE_PAREN, and make sure expr isn't a %(VAL,REF,DESCR). */ - -static ffelexHandler -ffeexpr_cb_end_notloc_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprExpr_ e; - ffebldOp op; - - /* If expression is itself a %(VAL,REF,DESCR), complain and strip off all - such things until the lowest-level expression is reached. */ - - op = ffebld_op (expr); - if ((op == FFEBLD_opPERCENT_VAL) || (op == FFEBLD_opPERCENT_REF) - || (op == FFEBLD_opPERCENT_DESCR)) - { - if (ffebad_start (FFEBAD_NESTED_PERCENT)) - { - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - } - - do - { - expr = ffebld_left (expr); - op = ffebld_op (expr); - } - while ((op == FFEBLD_opPERCENT_VAL) || (op == FFEBLD_opPERCENT_REF) - || (op == FFEBLD_opPERCENT_DESCR)); - } - - /* Push the expression as an operand onto the expression stack. */ - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_stack_->tokens[0]; - switch (ffeexpr_stack_->percent) - { - case FFEEXPR_percentVAL_: - e->u.operand = ffebld_new_percent_val (expr); - break; - - case FFEEXPR_percentREF_: - e->u.operand = ffebld_new_percent_ref (expr); - break; - - case FFEEXPR_percentDESCR_: - e->u.operand = ffebld_new_percent_descr (expr); - break; - - default: - assert ("%lossage" == NULL); - e->u.operand = expr; - break; - } - ffebld_set_info (e->u.operand, ffebld_info (expr)); -#if 0 /* ~~ */ - e->u.operand = ffeexpr_collapse_percent_ ? ? ? (e->u.operand, ft); -#endif - ffeexpr_exprstack_push_operand_ (e); - - /* Now, if the token is a close parenthese, we're in great shape so return - the next handler. */ - - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_cb_end_notloc_1_; - - /* Oops, naughty user didn't specify the close paren! */ - - if (ffest_ffebad_start (FFEBAD_MISSING_CLOSE_PAREN)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[1]), - ffelex_token_where_column (ffeexpr_stack_->tokens[1])); - ffebad_finish (); - } - - ffebld_set_op (e->u.operand, FFEBLD_opPERCENT_LOC); - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - assert ("bad context?!?!" == NULL); - break; - } - - ffelex_token_kill (ffeexpr_stack_->tokens[1]); - return - (ffelexHandler) ffeexpr_find_close_paren_ (t, - (ffelexHandler) - ffeexpr_cb_end_notloc_1_); -} - -/* ffeexpr_cb_end_notloc_1_ -- PERCENT NAME(VAL,REF,DESCR) OPEN_PAREN expr - CLOSE_PAREN - - Should be COMMA or CLOSE_PAREN, else change back to %LOC. */ - -static ffelexHandler -ffeexpr_cb_end_notloc_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - case FFEEXPR_contextSFUNCDEFACTUALARG_: - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARG_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARG_; - break; - - default: - assert ("bad context?!?!" == NULL); - break; - } - break; - - default: - if (ffebad_start (FFEBAD_INVALID_PERCENT)) - { - ffebad_here (0, - ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_string (ffelex_token_text (ffeexpr_stack_->tokens[1])); - ffebad_finish (); - } - - ffebld_set_op (ffeexpr_stack_->exprstack->u.operand, - FFEBLD_opPERCENT_LOC); - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - assert ("bad context?!?!" == NULL); - break; - } - } - - ffelex_token_kill (ffeexpr_stack_->tokens[1]); - return - (ffelexHandler) ffeexpr_token_binary_ (t); -} - -/* Process DATA implied-DO iterator variables as this implied-DO level - terminates. At this point, ffeexpr_level_ == 1 when we see the - last right-paren in "DATA (A(I),I=1,10)/.../". */ - -static ffesymbol -ffeexpr_check_impctrl_ (ffesymbol s) -{ - assert (s != NULL); - assert (ffesymbol_sfdummyparent (s) != NULL); - - switch (ffesymbol_state (s)) - { - case FFESYMBOL_stateNONE: /* Used as iterator already. Now let symbol - be used as iterator at any level at or - innermore than the outermost of the - current level and the symbol's current - level. */ - if (ffeexpr_level_ < ffesymbol_maxentrynum (s)) - { - ffesymbol_signal_change (s); - ffesymbol_set_maxentrynum (s, ffeexpr_level_); - ffesymbol_signal_unreported (s); - } - break; - - case FFESYMBOL_stateSEEN: /* Seen already in this or other implied-DO. - Error if at outermost level, else it can - still become an iterator. */ - if ((ffeexpr_level_ == 1) - && ffebad_start (FFEBAD_BAD_IMPDCL)) - { - ffebad_string (ffesymbol_text (s)); - ffebad_here (0, ffesymbol_where_line (s), ffesymbol_where_column (s)); - ffebad_finish (); - } - break; - - case FFESYMBOL_stateUNCERTAIN: /* Iterator. */ - assert (ffeexpr_level_ <= ffesymbol_maxentrynum (s)); - ffesymbol_signal_change (s); - ffesymbol_set_state (s, FFESYMBOL_stateNONE); - ffesymbol_signal_unreported (s); - break; - - case FFESYMBOL_stateUNDERSTOOD: - break; /* ANY. */ - - default: - assert ("Sasha Foo!!" == NULL); - break; - } - - return s; -} - -/* Issue diagnostic if implied-DO variable appears in list of lhs - expressions (as in "READ *, (I,I=1,10)"). */ - -static void -ffeexpr_check_impdo_ (ffebld list, ffelexToken list_t, - ffebld dovar, ffelexToken dovar_t) -{ - ffebld item; - ffesymbol dovar_sym; - int itemnum; - - if (ffebld_op (dovar) != FFEBLD_opSYMTER) - return; /* Presumably opANY. */ - - dovar_sym = ffebld_symter (dovar); - - for (itemnum = 1; list != NULL; list = ffebld_trail (list), ++itemnum) - { - if (((item = ffebld_head (list)) != NULL) - && (ffebld_op (item) == FFEBLD_opSYMTER) - && (ffebld_symter (item) == dovar_sym)) - { - char itemno[20]; - - sprintf (&itemno[0], "%d", itemnum); - if (ffebad_start (FFEBAD_DOITER_IMPDO)) - { - ffebad_here (0, ffelex_token_where_line (list_t), - ffelex_token_where_column (list_t)); - ffebad_here (1, ffelex_token_where_line (dovar_t), - ffelex_token_where_column (dovar_t)); - ffebad_string (ffesymbol_text (dovar_sym)); - ffebad_string (itemno); - ffebad_finish (); - } - } - } -} - -/* Decorate any SYMTERs referencing the DO variable with the "doiter" - flag. */ - -static void -ffeexpr_update_impdo_ (ffebld list, ffebld dovar) -{ - ffesymbol dovar_sym; - - if (ffebld_op (dovar) != FFEBLD_opSYMTER) - return; /* Presumably opANY. */ - - dovar_sym = ffebld_symter (dovar); - - ffeexpr_update_impdo_sym_ (list, dovar_sym); /* Recurse! */ -} - -/* Recursive function to update any expr so SYMTERs have "doiter" flag - if they refer to the given variable. */ - -static void -ffeexpr_update_impdo_sym_ (ffebld expr, ffesymbol dovar) -{ - tail_recurse: /* :::::::::::::::::::: */ - - if (expr == NULL) - return; - - switch (ffebld_op (expr)) - { - case FFEBLD_opSYMTER: - if (ffebld_symter (expr) == dovar) - ffebld_symter_set_is_doiter (expr, TRUE); - break; - - case FFEBLD_opITEM: - ffeexpr_update_impdo_sym_ (ffebld_head (expr), dovar); - expr = ffebld_trail (expr); - goto tail_recurse; /* :::::::::::::::::::: */ - - default: - break; - } - - switch (ffebld_arity (expr)) - { - case 2: - ffeexpr_update_impdo_sym_ (ffebld_left (expr), dovar); - expr = ffebld_right (expr); - goto tail_recurse; /* :::::::::::::::::::: */ - - case 1: - expr = ffebld_left (expr); - goto tail_recurse; /* :::::::::::::::::::: */ - - default: - break; - } - - return; -} - -/* ffeexpr_context_outer_ -- Determine context of stack entry, skipping PARENs - - if (ffeexpr_context_outer_(ffeexpr_stack_) == FFEEXPR_contextIF) - // After zero or more PAREN_ contexts, an IF context exists */ - -static ffeexprContext -ffeexpr_context_outer_ (ffeexprStack_ s) -{ - assert (s != NULL); - - for (;;) - { - switch (s->context) - { - case FFEEXPR_contextPAREN_: - case FFEEXPR_contextPARENFILENUM_: - case FFEEXPR_contextPARENFILEUNIT_: - break; - - default: - return s->context; - } - s = s->previous; - assert (s != NULL); - } -} - -/* ffeexpr_percent_ -- Look up name in list of %FOO possibilities - - ffeexprPercent_ p; - ffelexToken t; - p = ffeexpr_percent_(t); - - Returns the identifier for the name, or the NONE identifier. */ - -static ffeexprPercent_ -ffeexpr_percent_ (ffelexToken t) -{ - const char *p; - - switch (ffelex_token_length (t)) - { - case 3: - switch (*(p = ffelex_token_text (t))) - { - case FFESRC_CASE_MATCH_INIT ('L', 'l', match_3l, no_match_3): - if ((ffesrc_char_match_noninit (*++p, 'O', 'o')) - && (ffesrc_char_match_noninit (*++p, 'C', 'c'))) - return FFEEXPR_percentLOC_; - return FFEEXPR_percentNONE_; - - case FFESRC_CASE_MATCH_INIT ('R', 'r', match_3r, no_match_3): - if ((ffesrc_char_match_noninit (*++p, 'E', 'e')) - && (ffesrc_char_match_noninit (*++p, 'F', 'f'))) - return FFEEXPR_percentREF_; - return FFEEXPR_percentNONE_; - - case FFESRC_CASE_MATCH_INIT ('V', 'v', match_3v, no_match_3): - if ((ffesrc_char_match_noninit (*++p, 'A', 'a')) - && (ffesrc_char_match_noninit (*++p, 'L', 'l'))) - return FFEEXPR_percentVAL_; - return FFEEXPR_percentNONE_; - - default: - no_match_3: /* :::::::::::::::::::: */ - return FFEEXPR_percentNONE_; - } - - case 5: - if (ffesrc_strcmp_2c (ffe_case_match (), ffelex_token_text (t), "DESCR", - "descr", "Descr") == 0) - return FFEEXPR_percentDESCR_; - return FFEEXPR_percentNONE_; - - default: - return FFEEXPR_percentNONE_; - } -} - -/* ffeexpr_type_combine -- Binop combine types, check for mythical new COMPLEX - - See prototype. - - If combining the two basictype/kindtype pairs produces a COMPLEX with an - unsupported kind type, complain and use the default kind type for - COMPLEX. */ - -void -ffeexpr_type_combine (ffeinfoBasictype *xnbt, ffeinfoKindtype *xnkt, - ffeinfoBasictype lbt, ffeinfoKindtype lkt, - ffeinfoBasictype rbt, ffeinfoKindtype rkt, - ffelexToken t) -{ - ffeinfoBasictype nbt; - ffeinfoKindtype nkt; - - nbt = ffeinfo_basictype_combine (lbt, rbt); - if ((nbt == FFEINFO_basictypeCOMPLEX) - && ((lbt == nbt) || (lbt == FFEINFO_basictypeREAL)) - && ((rbt == nbt) || (rbt == FFEINFO_basictypeREAL))) - { - nkt = ffeinfo_kindtype_max (nbt, lkt, rkt); - if (ffe_is_pedantic_not_90 () && (nkt == FFEINFO_kindtypeREALDOUBLE)) - nkt = FFEINFO_kindtypeNONE; /* Force error. */ - switch (nkt) - { -#if FFETARGET_okCOMPLEX1 - case FFEINFO_kindtypeREAL1: -#endif -#if FFETARGET_okCOMPLEX2 - case FFEINFO_kindtypeREAL2: -#endif -#if FFETARGET_okCOMPLEX3 - case FFEINFO_kindtypeREAL3: -#endif - break; /* Fine and dandy. */ - - default: - if (t != NULL) - { - ffebad_start ((nkt == FFEINFO_kindtypeREALDOUBLE) - ? FFEBAD_BAD_DBLCMPLX : FFEBAD_BAD_COMPLEX); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - nbt = FFEINFO_basictypeNONE; - nkt = FFEINFO_kindtypeNONE; - break; - - case FFEINFO_kindtypeANY: - nkt = FFEINFO_kindtypeREALDEFAULT; - break; - } - } - else - { /* The normal stuff. */ - if (nbt == lbt) - { - if (nbt == rbt) - nkt = ffeinfo_kindtype_max (nbt, lkt, rkt); - else - nkt = lkt; - } - else if (nbt == rbt) - nkt = rkt; - else - { /* Let the caller do the complaining. */ - nbt = FFEINFO_basictypeNONE; - nkt = FFEINFO_kindtypeNONE; - } - } - - /* Always a good idea to avoid aliasing problems. */ - - *xnbt = nbt; - *xnkt = nkt; -} - -/* ffeexpr_token_first_lhs_ -- First state for lhs expression - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Record line and column of first token in expression, then invoke the - initial-state lhs handler. */ - -static ffelexHandler -ffeexpr_token_first_lhs_ (ffelexToken t) -{ - ffeexpr_stack_->first_token = ffelex_token_use (t); - - /* When changing the list of valid initial lhs tokens, check whether to - update a corresponding list in ffeexpr_cb_close_paren_ambig_1_ for the - READ (expr) case -- it assumes it knows which tokens can - be to indicate an lhs (or implied DO), which right now is the set - {NAME,OPEN_PAREN}. - - This comment also appears in ffeexpr_token_lhs_. */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATA: - ffe_init_4 (); - ffeexpr_level_ = 1; /* Level of DATA implied-DO construct. */ - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - return (ffelexHandler) ffeexpr_lhs (ffeexpr_stack_->pool, - FFEEXPR_contextDATAIMPDOITEM_, ffeexpr_cb_comma_i_); - - case FFEEXPR_contextDATAIMPDOITEM_: - ++ffeexpr_level_; /* Level of DATA implied-DO construct. */ - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - return (ffelexHandler) ffeexpr_lhs (ffeexpr_stack_->pool, - FFEEXPR_contextDATAIMPDOITEM_, ffeexpr_cb_comma_i_); - - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIMPDOITEM_: - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - return (ffelexHandler) ffeexpr_lhs (ffeexpr_stack_->pool, - FFEEXPR_contextIMPDOITEM_, ffeexpr_cb_comma_i_); - - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextIMPDOITEMDF_: - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - return (ffelexHandler) ffeexpr_lhs (ffeexpr_stack_->pool, - FFEEXPR_contextIMPDOITEMDF_, ffeexpr_cb_comma_i_); - - case FFEEXPR_contextFILEEXTFUNC: - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_first_lhs_1_; - - default: - break; - } - break; - - case FFELEX_typeNAME: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILENAMELIST: - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_namelist_; - - case FFEEXPR_contextFILEEXTFUNC: - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_first_lhs_1_; - - default: - break; - } - break; - - default: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILEEXTFUNC: - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_first_lhs_1_; - - default: - break; - } - break; - } - - return (ffelexHandler) ffeexpr_token_lhs_ (t); -} - -/* ffeexpr_token_first_lhs_1_ -- NAME - - return ffeexpr_token_first_lhs_1_; // to lexer - - Handle NAME as an external function (USEROPEN= VXT extension to OPEN - statement). */ - -static ffelexHandler -ffeexpr_token_first_lhs_1_ (ffelexToken t) -{ - ffeexprCallback callback; - ffeexprStack_ s; - ffelexHandler next; - ffelexToken ft; - ffesymbol sy = NULL; - ffebld expr; - - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ft = ffeexpr_stack_->first_token; - s = ffeexpr_stack_->previous; - - if ((ffelex_token_type (ft) != FFELEX_typeNAME) - || (ffesymbol_attrs (sy = ffeexpr_declare_unadorned_ (ft, FALSE)) - & FFESYMBOL_attrANY)) - { - if ((ffelex_token_type (ft) != FFELEX_typeNAME) - || !(ffesymbol_attrs (sy) & FFESYMBOL_attrsANY)) - { - ffebad_start (FFEBAD_EXPR_WRONG); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - } - expr = ffebld_new_any (); - ffebld_set_info (expr, ffeinfo_new_any ()); - } - else - { - expr = ffebld_new_symter (sy, FFEINTRIN_genNONE, FFEINTRIN_specNONE, - FFEINTRIN_impNONE); - ffebld_set_info (expr, ffesymbol_info (sy)); - } - - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, - sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - - next = (ffelexHandler) (*callback) (ft, expr, t); - ffelex_token_kill (ft); - return (ffelexHandler) next; -} - -/* ffeexpr_token_first_rhs_ -- First state for rhs expression - - Record line and column of first token in expression, then invoke the - initial-state rhs handler. - - 19-Feb-91 JCB 1.1 - Allow ASTERISK in PARENFILEUNIT_ case, but only on second level only - (i.e. only as in READ(*), not READ((*))). */ - -static ffelexHandler -ffeexpr_token_first_rhs_ (ffelexToken t) -{ - ffesymbol s; - - ffeexpr_stack_->first_token = ffelex_token_use (t); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeASTERISK: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILEFORMATNML: - ffeexpr_stack_->context = FFEEXPR_contextFILEFORMAT; - /* Fall through. */ - case FFEEXPR_contextFILEUNIT: - case FFEEXPR_contextDIMLIST: - case FFEEXPR_contextFILEFORMAT: - case FFEEXPR_contextCHARACTERSIZE: - if (ffeexpr_stack_->previous != NULL) - break; /* Valid only on first level. */ - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_first_rhs_1_; - - case FFEEXPR_contextPARENFILEUNIT_: - if (ffeexpr_stack_->previous->previous != NULL) - break; /* Valid only on second level. */ - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_first_rhs_1_; - - case FFEEXPR_contextACTUALARG_: - if (ffeexpr_stack_->previous->context - != FFEEXPR_contextSUBROUTINEREF) - { - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - } - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_first_rhs_3_; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - break; - } - break; - - case FFELEX_typeOPEN_PAREN: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILENUMAMBIG: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextPARENFILENUM_, - ffeexpr_cb_close_paren_ambig_); - - case FFEEXPR_contextFILEUNITAMBIG: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextPARENFILEUNIT_, - ffeexpr_cb_close_paren_ambig_); - - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIMPDOITEM_: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextIMPDOITEM_, - ffeexpr_cb_close_paren_ci_); - - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextIMPDOITEMDF_: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextIMPDOITEMDF_, - ffeexpr_cb_close_paren_ci_); - - case FFEEXPR_contextFILEFORMATNML: - ffeexpr_stack_->context = FFEEXPR_contextFILEFORMAT; - break; - - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - break; - } - break; - - case FFELEX_typeNUMBER: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILEFORMATNML: - ffeexpr_stack_->context = FFEEXPR_contextFILEFORMAT; - /* Fall through. */ - case FFEEXPR_contextFILEFORMAT: - if (ffeexpr_stack_->previous != NULL) - break; /* Valid only on first level. */ - assert (ffeexpr_stack_->exprstack == NULL); - return (ffelexHandler) ffeexpr_token_first_rhs_2_; - - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - break; - } - break; - - case FFELEX_typeNAME: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILEFORMATNML: - assert (ffeexpr_stack_->exprstack == NULL); - s = ffesymbol_lookup_local (t); - if ((s != NULL) && (ffesymbol_kind (s) == FFEINFO_kindNAMELIST)) - return (ffelexHandler) ffeexpr_token_namelist_; - ffeexpr_stack_->context = FFEEXPR_contextFILEFORMAT; - break; - - default: - break; - } - break; - - case FFELEX_typePERCENT: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - case FFEEXPR_contextINDEXORACTUALARG_: - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - return (ffelexHandler) ffeexpr_token_first_rhs_5_; - - case FFEEXPR_contextFILEFORMATNML: - ffeexpr_stack_->context = FFEEXPR_contextFILEFORMAT; - break; - - default: - break; - } - - default: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextFILEFORMATNML: - ffeexpr_stack_->context = FFEEXPR_contextFILEFORMAT; - break; - - default: - break; - } - break; - } - - return (ffelexHandler) ffeexpr_token_rhs_ (t); -} - -/* ffeexpr_token_first_rhs_1_ -- ASTERISK - - return ffeexpr_token_first_rhs_1_; // to lexer - - Return STAR as expression. */ - -static ffelexHandler -ffeexpr_token_first_rhs_1_ (ffelexToken t) -{ - ffebld expr; - ffeexprCallback callback; - ffeexprStack_ s; - ffelexHandler next; - ffelexToken ft; - - expr = ffebld_new_star (); - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ft = ffeexpr_stack_->first_token; - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - next = (ffelexHandler) (*callback) (ft, expr, t); - ffelex_token_kill (ft); - return (ffelexHandler) next; -} - -/* ffeexpr_token_first_rhs_2_ -- NUMBER - - return ffeexpr_token_first_rhs_2_; // to lexer - - Return NULL as expression; NUMBER as first (and only) token, unless the - current token is not a terminating token, in which case run normal - expression handling. */ - -static ffelexHandler -ffeexpr_token_first_rhs_2_ (ffelexToken t) -{ - ffeexprCallback callback; - ffeexprStack_ s; - ffelexHandler next; - ffelexToken ft; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - - default: - next = (ffelexHandler) ffeexpr_token_rhs_ (ffeexpr_stack_->first_token); - return (ffelexHandler) (*next) (t); - } - - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ft = ffeexpr_stack_->first_token; - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, - sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - next = (ffelexHandler) (*callback) (ft, NULL, t); - ffelex_token_kill (ft); - return (ffelexHandler) next; -} - -/* ffeexpr_token_first_rhs_3_ -- ASTERISK - - return ffeexpr_token_first_rhs_3_; // to lexer - - Expect NUMBER, make LABTOK (with copy of token if not inhibited after - confirming, else NULL). */ - -static ffelexHandler -ffeexpr_token_first_rhs_3_ (ffelexToken t) -{ - ffelexHandler next; - - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - { /* An error, but let normal processing handle - it. */ - next = (ffelexHandler) ffeexpr_token_rhs_ (ffeexpr_stack_->first_token); - return (ffelexHandler) (*next) (t); - } - - /* Special case: when we see "*10" as an argument to a subroutine - reference, we confirm the current statement and, if not inhibited at - this point, put a copy of the token into a LABTOK node. We do this - instead of just resolving the label directly via ffelab and putting it - into a LABTER simply to improve error reporting and consistency in - ffestc. We put NULL in the LABTOK if we're still inhibited, so ffestb - doesn't have to worry about killing off any tokens when retracting. */ - - ffest_confirmed (); - if (ffest_is_inhibited ()) - ffeexpr_stack_->expr = ffebld_new_labtok (NULL); - else - ffeexpr_stack_->expr = ffebld_new_labtok (ffelex_token_use (t)); - ffebld_set_info (ffeexpr_stack_->expr, - ffeinfo_new (FFEINFO_basictypeNONE, - FFEINFO_kindtypeNONE, - 0, - FFEINFO_kindNONE, - FFEINFO_whereNONE, - FFETARGET_charactersizeNONE)); - - return (ffelexHandler) ffeexpr_token_first_rhs_4_; -} - -/* ffeexpr_token_first_rhs_4_ -- ASTERISK NUMBER - - return ffeexpr_token_first_rhs_4_; // to lexer - - Collect/flush appropriate stuff, send token to callback function. */ - -static ffelexHandler -ffeexpr_token_first_rhs_4_ (ffelexToken t) -{ - ffebld expr; - ffeexprCallback callback; - ffeexprStack_ s; - ffelexHandler next; - ffelexToken ft; - - expr = ffeexpr_stack_->expr; - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ft = ffeexpr_stack_->first_token; - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - next = (ffelexHandler) (*callback) (ft, expr, t); - ffelex_token_kill (ft); - return (ffelexHandler) next; -} - -/* ffeexpr_token_first_rhs_5_ -- PERCENT - - Should be NAME, or pass through original mechanism. If NAME is LOC, - pass through original mechanism, otherwise must be VAL, REF, or DESCR, - in which case handle the argument (in parentheses), etc. */ - -static ffelexHandler -ffeexpr_token_first_rhs_5_ (ffelexToken t) -{ - ffelexHandler next; - - if (ffelex_token_type (t) == FFELEX_typeNAME) - { - ffeexprPercent_ p = ffeexpr_percent_ (t); - - switch (p) - { - case FFEEXPR_percentNONE_: - case FFEEXPR_percentLOC_: - break; /* Treat %LOC as any other expression. */ - - case FFEEXPR_percentVAL_: - case FFEEXPR_percentREF_: - case FFEEXPR_percentDESCR_: - ffeexpr_stack_->percent = p; - ffeexpr_stack_->tokens[0] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_first_rhs_6_; - - default: - assert ("bad percent?!?" == NULL); - break; - } - } - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - assert ("bad context?!?!" == NULL); - break; - } - - next = (ffelexHandler) ffeexpr_token_rhs_ (ffeexpr_stack_->first_token); - return (ffelexHandler) (*next) (t); -} - -/* ffeexpr_token_first_rhs_6_ -- PERCENT NAME(VAL,REF,DESCR) - - Should be OPEN_PAREN, or pass through original mechanism. */ - -static ffelexHandler -ffeexpr_token_first_rhs_6_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken ft; - - if (ffelex_token_type (t) == FFELEX_typeOPEN_PAREN) - { - ffeexpr_stack_->tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - ffeexpr_stack_->context, - ffeexpr_cb_end_notloc_); - } - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - assert ("bad context?!?!" == NULL); - break; - } - - ft = ffeexpr_stack_->tokens[0]; - next = (ffelexHandler) ffeexpr_token_rhs_ (ffeexpr_stack_->first_token); - next = (ffelexHandler) (*next) (ft); - ffelex_token_kill (ft); - return (ffelexHandler) (*next) (t); -} - -/* ffeexpr_token_namelist_ -- NAME - - return ffeexpr_token_namelist_; // to lexer - - Make sure NAME was a valid namelist object, wrap it in a SYMTER and - return. */ - -static ffelexHandler -ffeexpr_token_namelist_ (ffelexToken t) -{ - ffeexprCallback callback; - ffeexprStack_ s; - ffelexHandler next; - ffelexToken ft; - ffesymbol sy; - ffebld expr; - - ffebld_pool_pop (); - callback = ffeexpr_stack_->callback; - ft = ffeexpr_stack_->first_token; - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - - sy = ffesymbol_lookup_local (ft); - if ((sy == NULL) || (ffesymbol_kind (sy) != FFEINFO_kindNAMELIST)) - { - ffebad_start (FFEBAD_EXPR_WRONG); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - expr = ffebld_new_any (); - ffebld_set_info (expr, ffeinfo_new_any ()); - } - else - { - expr = ffebld_new_symter (sy, FFEINTRIN_genNONE, FFEINTRIN_specNONE, - FFEINTRIN_impNONE); - ffebld_set_info (expr, ffesymbol_info (sy)); - } - next = (ffelexHandler) (*callback) (ft, expr, t); - ffelex_token_kill (ft); - return (ffelexHandler) next; -} - -/* ffeexpr_expr_kill_ -- Kill an existing internal expression object - - ffeexprExpr_ e; - ffeexpr_expr_kill_(e); - - Kills the ffewhere info, if necessary, then kills the object. */ - -static void -ffeexpr_expr_kill_ (ffeexprExpr_ e) -{ - if (e->token != NULL) - ffelex_token_kill (e->token); - malloc_kill_ks (ffe_pool_program_unit (), e, sizeof (*e)); -} - -/* ffeexpr_expr_new_ -- Make a new internal expression object - - ffeexprExpr_ e; - e = ffeexpr_expr_new_(); - - Allocates and initializes a new expression object, returns it. */ - -static ffeexprExpr_ -ffeexpr_expr_new_ (void) -{ - ffeexprExpr_ e; - - e = malloc_new_ks (ffe_pool_program_unit (), "FFEEXPR expr", sizeof (*e)); - e->previous = NULL; - e->type = FFEEXPR_exprtypeUNKNOWN_; - e->token = NULL; - return e; -} - -/* Verify that call to global is valid, and register whatever - new information about a global might be discoverable by looking - at the call. */ - -static void -ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t) -{ - int n_args; - ffebld list; - ffebld item; - ffesymbol s; - - assert ((ffebld_op (*expr) == FFEBLD_opSUBRREF) - || (ffebld_op (*expr) == FFEBLD_opFUNCREF)); - - if (ffebld_op (ffebld_left (*expr)) != FFEBLD_opSYMTER) - return; - - if (ffesymbol_retractable ()) - return; - - s = ffebld_symter (ffebld_left (*expr)); - if (ffesymbol_global (s) == NULL) - return; - - for (n_args = 0, list = ffebld_right (*expr); - list != NULL; - list = ffebld_trail (list), ++n_args) - ; - - if (ffeglobal_proc_ref_nargs (s, n_args, t)) - { - ffeglobalArgSummary as; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - bool array; - bool fail = FALSE; - - for (n_args = 0, list = ffebld_right (*expr); - list != NULL; - list = ffebld_trail (list), ++n_args) - { - item = ffebld_head (list); - if (item != NULL) - { - bt = ffeinfo_basictype (ffebld_info (item)); - kt = ffeinfo_kindtype (ffebld_info (item)); - array = (ffeinfo_rank (ffebld_info (item)) > 0); - switch (ffebld_op (item)) - { - case FFEBLD_opLABTOK: - case FFEBLD_opLABTER: - as = FFEGLOBAL_argsummaryALTRTN; - break; - -#if 0 - /* No, %LOC(foo) is just like any INTEGER(KIND=7) - expression, so don't treat it specially. */ - case FFEBLD_opPERCENT_LOC: - as = FFEGLOBAL_argsummaryPTR; - break; -#endif - - case FFEBLD_opPERCENT_VAL: - as = FFEGLOBAL_argsummaryVAL; - break; - - case FFEBLD_opPERCENT_REF: - as = FFEGLOBAL_argsummaryREF; - break; - - case FFEBLD_opPERCENT_DESCR: - as = FFEGLOBAL_argsummaryDESCR; - break; - - case FFEBLD_opFUNCREF: -#if 0 - /* No, LOC(foo) is just like any INTEGER(KIND=7) - expression, so don't treat it specially. */ - if ((ffebld_op (ffebld_left (item)) == FFEBLD_opSYMTER) - && (ffesymbol_specific (ffebld_symter (ffebld_left (item))) - == FFEINTRIN_specLOC)) - { - as = FFEGLOBAL_argsummaryPTR; - break; - } -#endif - /* Fall through. */ - default: - if (ffebld_op (item) == FFEBLD_opSYMTER) - { - as = FFEGLOBAL_argsummaryNONE; - - switch (ffeinfo_kind (ffebld_info (item))) - { - case FFEINFO_kindFUNCTION: - as = FFEGLOBAL_argsummaryFUNC; - break; - - case FFEINFO_kindSUBROUTINE: - as = FFEGLOBAL_argsummarySUBR; - break; - - case FFEINFO_kindNONE: - as = FFEGLOBAL_argsummaryPROC; - break; - - default: - break; - } - - if (as != FFEGLOBAL_argsummaryNONE) - break; - } - - if (bt == FFEINFO_basictypeCHARACTER) - as = FFEGLOBAL_argsummaryDESCR; - else - as = FFEGLOBAL_argsummaryREF; - break; - } - } - else - { - array = FALSE; - as = FFEGLOBAL_argsummaryNONE; - bt = FFEINFO_basictypeNONE; - kt = FFEINFO_kindtypeNONE; - } - - if (! ffeglobal_proc_ref_arg (s, n_args, as, bt, kt, array, t)) - fail = TRUE; - } - if (! fail) - return; - } - - *expr = ffebld_new_any (); - ffebld_set_info (*expr, ffeinfo_new_any ()); -} - -/* Check whether rest of string is all decimal digits. */ - -static bool -ffeexpr_isdigits_ (const char *p) -{ - for (; *p != '\0'; ++p) - if (! ISDIGIT (*p)) - return FALSE; - return TRUE; -} - -/* ffeexpr_exprstack_push_ -- Push an arbitrary expression object onto the stack - - ffeexprExpr_ e; - ffeexpr_exprstack_push_(e); - - Pushes the expression onto the stack without any analysis of the existing - contents of the stack. */ - -static void -ffeexpr_exprstack_push_ (ffeexprExpr_ e) -{ - e->previous = ffeexpr_stack_->exprstack; - ffeexpr_stack_->exprstack = e; -} - -/* ffeexpr_exprstack_push_operand_ -- Push an operand onto the stack, reduce? - - ffeexprExpr_ e; - ffeexpr_exprstack_push_operand_(e); - - Pushes the expression already containing an operand (a constant, variable, - or more complicated expression that has already been fully resolved) after - analyzing the stack and checking for possible reduction (which will never - happen here since the highest precedence operator is ** and it has right- - to-left associativity). */ - -static void -ffeexpr_exprstack_push_operand_ (ffeexprExpr_ e) -{ - ffeexpr_exprstack_push_ (e); -} - -/* ffeexpr_exprstack_push_unary_ -- Push a unary operator onto the stack - - ffeexprExpr_ e; - ffeexpr_exprstack_push_unary_(e); - - Pushes the expression already containing a unary operator. Reduction can - never happen since unary operators are themselves always R-L; that is, the - top of the expression stack is not an operand, in that it is either empty, - has a binary operator at the top, or a unary operator at the top. In any - of these cases, reduction is impossible. */ - -static void -ffeexpr_exprstack_push_unary_ (ffeexprExpr_ e) -{ - if ((ffe_is_pedantic () - || ffe_is_warn_surprising ()) - && (ffeexpr_stack_->exprstack != NULL) - && (ffeexpr_stack_->exprstack->type != FFEEXPR_exprtypeOPERAND_) - && (ffeexpr_stack_->exprstack->u.operator.prec - <= FFEEXPR_operatorprecedenceLOWARITH_) - && (e->u.operator.prec <= FFEEXPR_operatorprecedenceLOWARITH_)) - { - /* xgettext:no-c-format */ - ffebad_start_msg ("Two arithmetic operators in a row at %0 and %1 -- use parentheses", - ffe_is_pedantic () - ? FFEBAD_severityPEDANTIC - : FFEBAD_severityWARNING); - ffebad_here (0, - ffelex_token_where_line (ffeexpr_stack_->exprstack->token), - ffelex_token_where_column (ffeexpr_stack_->exprstack->token)); - ffebad_here (1, - ffelex_token_where_line (e->token), - ffelex_token_where_column (e->token)); - ffebad_finish (); - } - - ffeexpr_exprstack_push_ (e); -} - -/* ffeexpr_exprstack_push_binary_ -- Push a binary operator onto the stack, reduce? - - ffeexprExpr_ e; - ffeexpr_exprstack_push_binary_(e); - - Pushes the expression already containing a binary operator after checking - whether reduction is possible. If the stack is not empty, the top of the - stack must be an operand or syntactic analysis has failed somehow. If - the operand is preceded by a unary operator of higher (or equal and L-R - associativity) precedence than the new binary operator, then reduce that - preceding operator and its operand(s) before pushing the new binary - operator. */ - -static void -ffeexpr_exprstack_push_binary_ (ffeexprExpr_ e) -{ - ffeexprExpr_ ce; - - if (ffe_is_warn_surprising () - /* These next two are always true (see assertions below). */ - && (ffeexpr_stack_->exprstack != NULL) - && (ffeexpr_stack_->exprstack->type == FFEEXPR_exprtypeOPERAND_) - /* If the previous operator is a unary minus, and the binary op - is of higher precedence, might not do what user expects, - e.g. "-2**2" is "-(2**2)", i.e. "-4", not "(-2)**2", which would - yield "4". */ - && (ffeexpr_stack_->exprstack->previous != NULL) - && (ffeexpr_stack_->exprstack->previous->type == FFEEXPR_exprtypeUNARY_) - && (ffeexpr_stack_->exprstack->previous->u.operator.op - == FFEEXPR_operatorSUBTRACT_) - && (e->u.operator.prec - < ffeexpr_stack_->exprstack->previous->u.operator.prec)) - { - /* xgettext:no-c-format */ - ffebad_start_msg ("Operator at %0 has lower precedence than that at %1 -- use parentheses", FFEBAD_severityWARNING); - ffebad_here (0, - ffelex_token_where_line (ffeexpr_stack_->exprstack->previous->token), - ffelex_token_where_column (ffeexpr_stack_->exprstack->previous->token)); - ffebad_here (1, - ffelex_token_where_line (e->token), - ffelex_token_where_column (e->token)); - ffebad_finish (); - } - -again: - assert (ffeexpr_stack_->exprstack != NULL); - assert (ffeexpr_stack_->exprstack->type == FFEEXPR_exprtypeOPERAND_); - if ((ce = ffeexpr_stack_->exprstack->previous) != NULL) - { - assert (ce->type != FFEEXPR_exprtypeOPERAND_); - if ((ce->u.operator.prec < e->u.operator.prec) - || ((ce->u.operator.prec == e->u.operator.prec) - && (e->u.operator.as == FFEEXPR_operatorassociativityL2R_))) - { - ffeexpr_reduce_ (); - goto again; /* :::::::::::::::::::: */ - } - } - - ffeexpr_exprstack_push_ (e); -} - -/* ffeexpr_reduce_ -- Reduce highest operator w/operands on stack - - ffeexpr_reduce_(); - - Converts operand binop operand or unop operand at top of stack to a - single operand having the appropriate ffebld expression, and makes - sure that the expression is proper (like not trying to add two character - variables, not trying to concatenate two numbers). Also does the - requisite type-assignment. */ - -static void -ffeexpr_reduce_ (void) -{ - ffeexprExpr_ operand; /* This is B in -B or A+B. */ - ffeexprExpr_ left_operand; /* When operator is binary, this is A in A+B. */ - ffeexprExpr_ operator; /* This is + in A+B. */ - ffebld reduced; /* This is +(A,B) in A+B or u-(B) in -B. */ - ffebldConstant constnode; /* For checking magical numbers (where mag == - -mag). */ - ffebld expr; - ffebld left_expr; - bool submag = FALSE; - bool bothlogical; - - operand = ffeexpr_stack_->exprstack; - assert (operand != NULL); - assert (operand->type == FFEEXPR_exprtypeOPERAND_); - operator = operand->previous; - assert (operator != NULL); - assert (operator->type != FFEEXPR_exprtypeOPERAND_); - if (operator->type == FFEEXPR_exprtypeUNARY_) - { - expr = operand->u.operand; - switch (operator->u.operator.op) - { - case FFEEXPR_operatorADD_: - reduced = ffebld_new_uplus (expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly1_ (reduced, operator, operand); - reduced = ffeexpr_reduced_math1_ (reduced, operator, operand); - reduced = ffeexpr_collapse_uplus (reduced, operator->token); - break; - - case FFEEXPR_operatorSUBTRACT_: - submag = TRUE; /* Ok to negate a magic number. */ - reduced = ffebld_new_uminus (expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly1_ (reduced, operator, operand); - reduced = ffeexpr_reduced_math1_ (reduced, operator, operand); - reduced = ffeexpr_collapse_uminus (reduced, operator->token); - break; - - case FFEEXPR_operatorNOT_: - reduced = ffebld_new_not (expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly1log_ (reduced, operator, operand); - reduced = ffeexpr_reduced_bool1_ (reduced, operator, operand); - reduced = ffeexpr_collapse_not (reduced, operator->token); - break; - - default: - assert ("unexpected unary op" != NULL); - reduced = NULL; - break; - } - if (!submag - && (ffebld_op (expr) == FFEBLD_opCONTER) - && (ffebld_conter_orig (expr) == NULL) - && ffebld_constant_is_magical (constnode = ffebld_conter (expr))) - { - ffetarget_integer_bad_magical (operand->token); - } - ffeexpr_stack_->exprstack = operator->previous; /* Pops unary-op operand - off stack. */ - ffeexpr_expr_kill_ (operand); - operator->type = FFEEXPR_exprtypeOPERAND_; /* Convert operator, but - save */ - operator->u.operand = reduced; /* the line/column ffewhere info. */ - ffeexpr_exprstack_push_operand_ (operator); /* Push it back on - stack. */ - } - else - { - assert (operator->type == FFEEXPR_exprtypeBINARY_); - left_operand = operator->previous; - assert (left_operand != NULL); - assert (left_operand->type == FFEEXPR_exprtypeOPERAND_); - expr = operand->u.operand; - left_expr = left_operand->u.operand; - switch (operator->u.operator.op) - { - case FFEEXPR_operatorADD_: - reduced = ffebld_new_add (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_math2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_add (reduced, operator->token); - break; - - case FFEEXPR_operatorSUBTRACT_: - submag = TRUE; /* Just to pick the right error if magic - number. */ - reduced = ffebld_new_subtract (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_math2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_subtract (reduced, operator->token); - break; - - case FFEEXPR_operatorMULTIPLY_: - reduced = ffebld_new_multiply (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_math2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_multiply (reduced, operator->token); - break; - - case FFEEXPR_operatorDIVIDE_: - reduced = ffebld_new_divide (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_math2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_divide (reduced, operator->token); - break; - - case FFEEXPR_operatorPOWER_: - reduced = ffebld_new_power (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_power_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_power (reduced, operator->token); - break; - - case FFEEXPR_operatorCONCATENATE_: - reduced = ffebld_new_concatenate (left_expr, expr); - reduced = ffeexpr_reduced_concatenate_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_concatenate (reduced, operator->token); - break; - - case FFEEXPR_operatorLT_: - reduced = ffebld_new_lt (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_relop2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_lt (reduced, operator->token); - break; - - case FFEEXPR_operatorLE_: - reduced = ffebld_new_le (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_relop2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_le (reduced, operator->token); - break; - - case FFEEXPR_operatorEQ_: - reduced = ffebld_new_eq (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_eqop2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_eq (reduced, operator->token); - break; - - case FFEEXPR_operatorNE_: - reduced = ffebld_new_ne (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_eqop2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_ne (reduced, operator->token); - break; - - case FFEEXPR_operatorGT_: - reduced = ffebld_new_gt (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_relop2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_gt (reduced, operator->token); - break; - - case FFEEXPR_operatorGE_: - reduced = ffebld_new_ge (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_reduced_relop2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_ge (reduced, operator->token); - break; - - case FFEEXPR_operatorAND_: - reduced = ffebld_new_and (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2log_ (reduced, left_operand, operator, - operand, &bothlogical); - reduced = ffeexpr_reduced_bool2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_and (reduced, operator->token); - if (ffe_is_ugly_logint() && bothlogical) - reduced = ffeexpr_convert (reduced, left_operand->token, - operator->token, - FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEEXPR_operatorOR_: - reduced = ffebld_new_or (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2log_ (reduced, left_operand, operator, - operand, &bothlogical); - reduced = ffeexpr_reduced_bool2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_or (reduced, operator->token); - if (ffe_is_ugly_logint() && bothlogical) - reduced = ffeexpr_convert (reduced, left_operand->token, - operator->token, - FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEEXPR_operatorXOR_: - reduced = ffebld_new_xor (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2log_ (reduced, left_operand, operator, - operand, &bothlogical); - reduced = ffeexpr_reduced_bool2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_xor (reduced, operator->token); - if (ffe_is_ugly_logint() && bothlogical) - reduced = ffeexpr_convert (reduced, left_operand->token, - operator->token, - FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEEXPR_operatorEQV_: - reduced = ffebld_new_eqv (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2log_ (reduced, left_operand, operator, - operand, NULL); - reduced = ffeexpr_reduced_bool2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_eqv (reduced, operator->token); - break; - - case FFEEXPR_operatorNEQV_: - reduced = ffebld_new_neqv (left_expr, expr); - if (ffe_is_ugly_logint ()) - reduced = ffeexpr_reduced_ugly2log_ (reduced, left_operand, operator, - operand, NULL); - reduced = ffeexpr_reduced_bool2_ (reduced, left_operand, operator, - operand); - reduced = ffeexpr_collapse_neqv (reduced, operator->token); - break; - - default: - assert ("bad bin op" == NULL); - reduced = expr; - break; - } - if ((ffebld_op (left_expr) == FFEBLD_opCONTER) - && (ffebld_conter_orig (expr) == NULL) - && ffebld_constant_is_magical (constnode = ffebld_conter (left_expr))) - { - if ((left_operand->previous != NULL) - && (left_operand->previous->type != FFEEXPR_exprtypeOPERAND_) - && (left_operand->previous->u.operator.op - == FFEEXPR_operatorSUBTRACT_)) - { - if (left_operand->previous->type == FFEEXPR_exprtypeUNARY_) - ffetarget_integer_bad_magical_precedence (left_operand->token, - left_operand->previous->token, - operator->token); - else - ffetarget_integer_bad_magical_precedence_binary - (left_operand->token, - left_operand->previous->token, - operator->token); - } - else - ffetarget_integer_bad_magical (left_operand->token); - } - if ((ffebld_op (expr) == FFEBLD_opCONTER) - && (ffebld_conter_orig (expr) == NULL) - && ffebld_constant_is_magical (constnode = ffebld_conter (expr))) - { - if (submag) - ffetarget_integer_bad_magical_binary (operand->token, - operator->token); - else - ffetarget_integer_bad_magical (operand->token); - } - ffeexpr_stack_->exprstack = left_operand->previous; /* Pops binary-op - operands off stack. */ - ffeexpr_expr_kill_ (left_operand); - ffeexpr_expr_kill_ (operand); - operator->type = FFEEXPR_exprtypeOPERAND_; /* Convert operator, but - save */ - operator->u.operand = reduced; /* the line/column ffewhere info. */ - ffeexpr_exprstack_push_operand_ (operator); /* Push it back on - stack. */ - } -} - -/* ffeexpr_reduced_bool1_ -- Wrap up reduction of NOT operator - - reduced = ffeexpr_reduced_bool1_(reduced,op,r); - - Makes sure the argument for reduced has basictype of - LOGICAL or (ugly) INTEGER. If - argument has where of CONSTANT, assign where CONSTANT to - reduced, else assign where FLEETING. - - If these requirements cannot be met, generate error message. */ - -static ffebld -ffeexpr_reduced_bool1_ (ffebld reduced, ffeexprExpr_ op, ffeexprExpr_ r) -{ - ffeinfo rinfo, ninfo; - ffeinfoBasictype rbt; - ffeinfoKindtype rkt; - ffeinfoRank rrk; - ffeinfoKind rkd; - ffeinfoWhere rwh, nwh; - - rinfo = ffebld_info (ffebld_left (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - if (((rbt == FFEINFO_basictypeLOGICAL) - || (ffe_is_ugly_logint () && (rbt == FFEINFO_basictypeINTEGER))) - && (rrk == 0)) - { - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - ninfo = ffeinfo_new (rbt, rkt, 0, FFEINFO_kindENTITY, nwh, - FFETARGET_charactersizeNONE); - ffebld_set_info (reduced, ninfo); - return reduced; - } - - if ((rbt != FFEINFO_basictypeLOGICAL) - && (!ffe_is_ugly_logint () || (rbt != FFEINFO_basictypeINTEGER))) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_NOT_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else - { - if ((rkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_NOT_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_bool2_ -- Wrap up reduction of boolean operators - - reduced = ffeexpr_reduced_bool2_(reduced,l,op,r); - - Makes sure the left and right arguments for reduced have basictype of - LOGICAL or (ugly) INTEGER. Determine common basictype and - size for reduction (flag expression for combined hollerith/typeless - situations for later determination of effective basictype). If both left - and right arguments have where of CONSTANT, assign where CONSTANT to - reduced, else assign where FLEETING. Create CONVERT ops for args where - needed. Convert typeless - constants to the desired type/size explicitly. - - If these requirements cannot be met, generate error message. */ - -static ffebld -ffeexpr_reduced_bool2_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r) -{ - ffeinfo linfo, rinfo, ninfo; - ffeinfoBasictype lbt, rbt, nbt; - ffeinfoKindtype lkt, rkt, nkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd; - ffeinfoWhere lwh, rwh, nwh; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); - - if (((nbt == FFEINFO_basictypeLOGICAL) - || (ffe_is_ugly_logint () && (nbt == FFEINFO_basictypeINTEGER))) - && (lrk == 0) && (rrk == 0)) - { - switch (lwh) - { - case FFEINFO_whereCONSTANT: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - ninfo = ffeinfo_new (nbt, nkt, 0, FFEINFO_kindENTITY, nwh, - FFETARGET_charactersizeNONE); - ffebld_set_info (reduced, ninfo); - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, nbt, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, nbt, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - return reduced; - } - - if ((lbt != FFEINFO_basictypeLOGICAL) - && (!ffe_is_ugly_logint () || (lbt != FFEINFO_basictypeINTEGER))) - { - if ((rbt != FFEINFO_basictypeLOGICAL) - && (!ffe_is_ugly_logint () || (rbt != FFEINFO_basictypeINTEGER))) - { - if ((lbt != FFEINFO_basictypeANY) && (rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_BOOL_ARGS_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else - { - if ((lbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_BOOL_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_finish (); - } - } - } - else if ((rbt != FFEINFO_basictypeLOGICAL) - && (!ffe_is_ugly_logint () || (rbt != FFEINFO_basictypeINTEGER))) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_BOOL_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if (lrk != 0) - { - if ((lkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_BOOL_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - else - { - if ((rkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_BOOL_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_concatenate_ -- Wrap up reduction of concatenate operator - - reduced = ffeexpr_reduced_concatenate_(reduced,l,op,r); - - Makes sure the left and right arguments for reduced have basictype of - CHARACTER and kind of SCALAR, FUNCTION, or STATEMENT FUNCTION. Assign - basictype of CHARACTER and kind of SCALAR to reduced. Calculate effective - size of concatenation and assign that size to reduced. If both left and - right arguments have where of CONSTANT, assign where CONSTANT to reduced, - else assign where FLEETING. - - If these requirements cannot be met, generate error message using the - info in l, op, and r arguments and assign basictype, size, kind, and where - of ANY. */ - -static ffebld -ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r) -{ - ffeinfo linfo, rinfo, ninfo; - ffeinfoBasictype lbt, rbt, nbt; - ffeinfoKindtype lkt, rkt, nkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd, nkd; - ffeinfoWhere lwh, rwh, nwh; - ffetargetCharacterSize lszm, lszk, rszm, rszk, nszk; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - lszk = ffeinfo_size (linfo); /* Known size. */ - lszm = ffebld_size_max (ffebld_left (reduced)); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - rszk = ffeinfo_size (rinfo); /* Known size. */ - rszm = ffebld_size_max (ffebld_right (reduced)); - - if ((lbt == FFEINFO_basictypeCHARACTER) && (rbt == FFEINFO_basictypeCHARACTER) - && (lkt == rkt) && (lrk == 0) && (rrk == 0) - && (((lszm != FFETARGET_charactersizeNONE) - && (rszm != FFETARGET_charactersizeNONE)) - || (ffeexpr_context_outer_ (ffeexpr_stack_) - == FFEEXPR_contextLET) - || (ffeexpr_context_outer_ (ffeexpr_stack_) - == FFEEXPR_contextSFUNCDEF))) - { - nbt = FFEINFO_basictypeCHARACTER; - nkd = FFEINFO_kindENTITY; - if ((lszk == FFETARGET_charactersizeNONE) - || (rszk == FFETARGET_charactersizeNONE)) - nszk = FFETARGET_charactersizeNONE; /* Ok only in rhs of LET - stmt. */ - else - nszk = lszk + rszk; - - switch (lwh) - { - case FFEINFO_whereCONSTANT: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - nkt = lkt; - ninfo = ffeinfo_new (nbt, nkt, 0, nkd, nwh, nszk); - ffebld_set_info (reduced, ninfo); - return reduced; - } - - if ((lbt != FFEINFO_basictypeCHARACTER) && (rbt != FFEINFO_basictypeCHARACTER)) - { - if ((lbt != FFEINFO_basictypeANY) && (rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_CONCAT_ARGS_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if (lbt != FFEINFO_basictypeCHARACTER) - { - if ((lbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_CONCAT_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_finish (); - } - } - else if (rbt != FFEINFO_basictypeCHARACTER) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_CONCAT_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if ((lrk != 0) || (lszm == FFETARGET_charactersizeNONE)) - { - if ((lkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_CONCAT_ARG_KIND)) - { - const char *what; - - if (lrk != 0) - what = "an array"; - else - what = "of indeterminate length"; - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_string (what); - ffebad_finish (); - } - } - else - { - if (ffebad_start (FFEBAD_CONCAT_ARG_KIND)) - { - const char *what; - - if (rrk != 0) - what = "an array"; - else - what = "of indeterminate length"; - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string (what); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_eqop2_ -- Wrap up reduction of EQ and NE operators - - reduced = ffeexpr_reduced_eqop2_(reduced,l,op,r); - - Makes sure the left and right arguments for reduced have basictype of - INTEGER, REAL, COMPLEX, or CHARACTER. Determine common basictype and - size for reduction. If both left - and right arguments have where of CONSTANT, assign where CONSTANT to - reduced, else assign where FLEETING. Create CONVERT ops for args where - needed. Convert typeless - constants to the desired type/size explicitly. - - If these requirements cannot be met, generate error message. */ - -static ffebld -ffeexpr_reduced_eqop2_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r) -{ - ffeinfo linfo, rinfo, ninfo; - ffeinfoBasictype lbt, rbt, nbt; - ffeinfoKindtype lkt, rkt, nkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd; - ffeinfoWhere lwh, rwh, nwh; - ffetargetCharacterSize lsz, rsz; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - lsz = ffebld_size_known (ffebld_left (reduced)); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - rsz = ffebld_size_known (ffebld_right (reduced)); - - ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); - - if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) - || (nbt == FFEINFO_basictypeCOMPLEX) || (nbt == FFEINFO_basictypeCHARACTER)) - && (lrk == 0) && (rrk == 0)) - { - switch (lwh) - { - case FFEINFO_whereCONSTANT: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - if ((lsz != FFETARGET_charactersizeNONE) - && (rsz != FFETARGET_charactersizeNONE)) - lsz = rsz = (lsz > rsz) ? lsz : rsz; - - ninfo = ffeinfo_new (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICALDEFAULT, - 0, FFEINFO_kindENTITY, nwh, FFETARGET_charactersizeNONE); - ffebld_set_info (reduced, ninfo); - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, nbt, nkt, 0, lsz, - FFEEXPR_contextLET)); - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, nbt, nkt, 0, rsz, - FFEEXPR_contextLET)); - return reduced; - } - - if ((lbt == FFEINFO_basictypeLOGICAL) - && (rbt == FFEINFO_basictypeLOGICAL)) - { - /* xgettext:no-c-format */ - if (ffebad_start_msg ("Use .EQV./.NEQV. instead of .EQ./.NE. at %0 for LOGICAL operands at %1 and %2", - FFEBAD_severityFATAL)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if ((lbt != FFEINFO_basictypeINTEGER) && (lbt != FFEINFO_basictypeREAL) - && (lbt != FFEINFO_basictypeCOMPLEX) && (lbt != FFEINFO_basictypeCHARACTER)) - { - if ((rbt != FFEINFO_basictypeINTEGER) && (rbt != FFEINFO_basictypeREAL) - && (rbt != FFEINFO_basictypeCOMPLEX) && (rbt != FFEINFO_basictypeCHARACTER)) - { - if ((lbt != FFEINFO_basictypeANY) && (rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_EQOP_ARGS_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else - { - if ((lbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_EQOP_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_finish (); - } - } - } - else if ((rbt != FFEINFO_basictypeINTEGER) && (rbt != FFEINFO_basictypeREAL) - && (rbt != FFEINFO_basictypeCOMPLEX) && (rbt != FFEINFO_basictypeCHARACTER)) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_EQOP_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if (lrk != 0) - { - if ((lkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_EQOP_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - else - { - if ((rkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_EQOP_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_math1_ -- Wrap up reduction of + - unary operators - - reduced = ffeexpr_reduced_math1_(reduced,op,r); - - Makes sure the argument for reduced has basictype of - INTEGER, REAL, or COMPLEX. If the argument has where of CONSTANT, - assign where CONSTANT to - reduced, else assign where FLEETING. - - If these requirements cannot be met, generate error message. */ - -static ffebld -ffeexpr_reduced_math1_ (ffebld reduced, ffeexprExpr_ op, ffeexprExpr_ r) -{ - ffeinfo rinfo, ninfo; - ffeinfoBasictype rbt; - ffeinfoKindtype rkt; - ffeinfoRank rrk; - ffeinfoKind rkd; - ffeinfoWhere rwh, nwh; - - rinfo = ffebld_info (ffebld_left (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - if (((rbt == FFEINFO_basictypeINTEGER) || (rbt == FFEINFO_basictypeREAL) - || (rbt == FFEINFO_basictypeCOMPLEX)) && (rrk == 0)) - { - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - ninfo = ffeinfo_new (rbt, rkt, 0, FFEINFO_kindENTITY, nwh, - FFETARGET_charactersizeNONE); - ffebld_set_info (reduced, ninfo); - return reduced; - } - - if ((rbt != FFEINFO_basictypeINTEGER) && (rbt != FFEINFO_basictypeREAL) - && (rbt != FFEINFO_basictypeCOMPLEX)) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_MATH_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else - { - if ((rkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_MATH_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_math2_ -- Wrap up reduction of + - * / operators - - reduced = ffeexpr_reduced_math2_(reduced,l,op,r); - - Makes sure the left and right arguments for reduced have basictype of - INTEGER, REAL, or COMPLEX. Determine common basictype and - size for reduction (flag expression for combined hollerith/typeless - situations for later determination of effective basictype). If both left - and right arguments have where of CONSTANT, assign where CONSTANT to - reduced, else assign where FLEETING. Create CONVERT ops for args where - needed. Convert typeless - constants to the desired type/size explicitly. - - If these requirements cannot be met, generate error message. */ - -static ffebld -ffeexpr_reduced_math2_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r) -{ - ffeinfo linfo, rinfo, ninfo; - ffeinfoBasictype lbt, rbt, nbt; - ffeinfoKindtype lkt, rkt, nkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd; - ffeinfoWhere lwh, rwh, nwh; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); - - if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) - || (nbt == FFEINFO_basictypeCOMPLEX)) && (lrk == 0) && (rrk == 0)) - { - switch (lwh) - { - case FFEINFO_whereCONSTANT: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - ninfo = ffeinfo_new (nbt, nkt, 0, FFEINFO_kindENTITY, nwh, - FFETARGET_charactersizeNONE); - ffebld_set_info (reduced, ninfo); - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, nbt, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, nbt, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - return reduced; - } - - if ((lbt != FFEINFO_basictypeINTEGER) && (lbt != FFEINFO_basictypeREAL) - && (lbt != FFEINFO_basictypeCOMPLEX)) - { - if ((rbt != FFEINFO_basictypeINTEGER) - && (rbt != FFEINFO_basictypeREAL) && (rbt != FFEINFO_basictypeCOMPLEX)) - { - if ((lbt != FFEINFO_basictypeANY) && (rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_MATH_ARGS_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else - { - if ((lbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_MATH_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_finish (); - } - } - } - else if ((rbt != FFEINFO_basictypeINTEGER) && (rbt != FFEINFO_basictypeREAL) - && (rbt != FFEINFO_basictypeCOMPLEX)) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_MATH_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if (lrk != 0) - { - if ((lkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_MATH_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - else - { - if ((rkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_MATH_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_power_ -- Wrap up reduction of ** operator - - reduced = ffeexpr_reduced_power_(reduced,l,op,r); - - Makes sure the left and right arguments for reduced have basictype of - INTEGER, REAL, or COMPLEX. Determine common basictype and - size for reduction (flag expression for combined hollerith/typeless - situations for later determination of effective basictype). If both left - and right arguments have where of CONSTANT, assign where CONSTANT to - reduced, else assign where FLEETING. Create CONVERT ops for args where - needed. Note that real**int or complex**int - comes out as int = real**int etc with no conversions. - - If these requirements cannot be met, generate error message using the - info in l, op, and r arguments and assign basictype, size, kind, and where - of ANY. */ - -static ffebld -ffeexpr_reduced_power_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r) -{ - ffeinfo linfo, rinfo, ninfo; - ffeinfoBasictype lbt, rbt, nbt; - ffeinfoKindtype lkt, rkt, nkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd; - ffeinfoWhere lwh, rwh, nwh; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - if ((rbt == FFEINFO_basictypeINTEGER) - && ((lbt == FFEINFO_basictypeREAL) - || (lbt == FFEINFO_basictypeCOMPLEX))) - { - nbt = lbt; - nkt = ffeinfo_kindtype_max (nbt, lkt, FFEINFO_kindtypeREALDEFAULT); - if (nkt != FFEINFO_kindtypeREALDEFAULT) - { - nkt = ffeinfo_kindtype_max (nbt, lkt, FFEINFO_kindtypeREALDOUBLE); - if (nkt != FFEINFO_kindtypeREALDOUBLE) - nkt = FFEINFO_kindtypeREALDOUBLE; /* Highest kt we can power! */ - } - if (rkt == FFEINFO_kindtypeINTEGER4) - { - /* xgettext:no-c-format */ - ffebad_start_msg ("Unsupported operand for ** at %1 -- converting to default INTEGER", - FFEBAD_severityWARNING); - ffebad_here (0, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - if (rkt != FFEINFO_kindtypeINTEGERDEFAULT) - { - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, - FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - rkt = FFEINFO_kindtypeINTEGERDEFAULT; - } - } - else - { - ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); - -#if 0 /* INTEGER4**INTEGER4 works now. */ - if ((nbt == FFEINFO_basictypeINTEGER) - && (nkt != FFEINFO_kindtypeINTEGERDEFAULT)) - nkt = FFEINFO_kindtypeINTEGERDEFAULT; /* Highest kt we can power! */ -#endif - if (((nbt == FFEINFO_basictypeREAL) - || (nbt == FFEINFO_basictypeCOMPLEX)) - && (nkt != FFEINFO_kindtypeREALDEFAULT)) - { - nkt = ffeinfo_kindtype_max (nbt, nkt, FFEINFO_kindtypeREALDOUBLE); - if (nkt != FFEINFO_kindtypeREALDOUBLE) - nkt = FFEINFO_kindtypeREALDOUBLE; /* Highest kt we can power! */ - } - /* else Gonna turn into an error below. */ - } - - if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) - || (nbt == FFEINFO_basictypeCOMPLEX)) && (lrk == 0) && (rrk == 0)) - { - switch (lwh) - { - case FFEINFO_whereCONSTANT: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - ninfo = ffeinfo_new (nbt, nkt, 0, FFEINFO_kindENTITY, nwh, - FFETARGET_charactersizeNONE); - ffebld_set_info (reduced, ninfo); - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, nbt, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - if (rbt != FFEINFO_basictypeINTEGER) - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, nbt, nkt, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - return reduced; - } - - if ((lbt != FFEINFO_basictypeINTEGER) && (lbt != FFEINFO_basictypeREAL) - && (lbt != FFEINFO_basictypeCOMPLEX)) - { - if ((rbt != FFEINFO_basictypeINTEGER) - && (rbt != FFEINFO_basictypeREAL) && (rbt != FFEINFO_basictypeCOMPLEX)) - { - if ((lbt != FFEINFO_basictypeANY) && (rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_MATH_ARGS_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else - { - if ((lbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_MATH_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_finish (); - } - } - } - else if ((rbt != FFEINFO_basictypeINTEGER) && (rbt != FFEINFO_basictypeREAL) - && (rbt != FFEINFO_basictypeCOMPLEX)) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_MATH_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if (lrk != 0) - { - if ((lkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_MATH_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - else - { - if ((rkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_MATH_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_relop2_ -- Wrap up reduction of LT, LE, GE, and GT operators - - reduced = ffeexpr_reduced_relop2_(reduced,l,op,r); - - Makes sure the left and right arguments for reduced have basictype of - INTEGER, REAL, or CHARACTER. Determine common basictype and - size for reduction. If both left - and right arguments have where of CONSTANT, assign where CONSTANT to - reduced, else assign where FLEETING. Create CONVERT ops for args where - needed. Convert typeless - constants to the desired type/size explicitly. - - If these requirements cannot be met, generate error message. */ - -static ffebld -ffeexpr_reduced_relop2_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r) -{ - ffeinfo linfo, rinfo, ninfo; - ffeinfoBasictype lbt, rbt, nbt; - ffeinfoKindtype lkt, rkt, nkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd; - ffeinfoWhere lwh, rwh, nwh; - ffetargetCharacterSize lsz, rsz; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - lsz = ffebld_size_known (ffebld_left (reduced)); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - rsz = ffebld_size_known (ffebld_right (reduced)); - - ffeexpr_type_combine (&nbt, &nkt, lbt, lkt, rbt, rkt, op->token); - - if (((nbt == FFEINFO_basictypeINTEGER) || (nbt == FFEINFO_basictypeREAL) - || (nbt == FFEINFO_basictypeCHARACTER)) - && (lrk == 0) && (rrk == 0)) - { - switch (lwh) - { - case FFEINFO_whereCONSTANT: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - nwh = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: - nwh = FFEINFO_whereIMMEDIATE; - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - break; - - default: - nwh = FFEINFO_whereFLEETING; - break; - } - - if ((lsz != FFETARGET_charactersizeNONE) - && (rsz != FFETARGET_charactersizeNONE)) - lsz = rsz = (lsz > rsz) ? lsz : rsz; - - ninfo = ffeinfo_new (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICALDEFAULT, - 0, FFEINFO_kindENTITY, nwh, FFETARGET_charactersizeNONE); - ffebld_set_info (reduced, ninfo); - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, nbt, nkt, 0, lsz, - FFEEXPR_contextLET)); - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, nbt, nkt, 0, rsz, - FFEEXPR_contextLET)); - return reduced; - } - - if ((lbt != FFEINFO_basictypeINTEGER) && (lbt != FFEINFO_basictypeREAL) - && (lbt != FFEINFO_basictypeCHARACTER)) - { - if ((rbt != FFEINFO_basictypeINTEGER) && (rbt != FFEINFO_basictypeREAL) - && (rbt != FFEINFO_basictypeCHARACTER)) - { - if ((lbt != FFEINFO_basictypeANY) && (rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_RELOP_ARGS_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_here (2, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else - { - if ((lbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_RELOP_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_finish (); - } - } - } - else if ((rbt != FFEINFO_basictypeINTEGER) && (rbt != FFEINFO_basictypeREAL) - && (rbt != FFEINFO_basictypeCHARACTER)) - { - if ((rbt != FFEINFO_basictypeANY) - && ffebad_start (FFEBAD_RELOP_ARG_TYPE)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_finish (); - } - } - else if (lrk != 0) - { - if ((lkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_RELOP_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (l->token), ffelex_token_where_column (l->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - else - { - if ((rkd != FFEINFO_kindANY) - && ffebad_start (FFEBAD_RELOP_ARG_KIND)) - { - ffebad_here (0, ffelex_token_where_line (op->token), ffelex_token_where_column (op->token)); - ffebad_here (1, ffelex_token_where_line (r->token), ffelex_token_where_column (r->token)); - ffebad_string ("an array"); - ffebad_finish (); - } - } - - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - return reduced; -} - -/* ffeexpr_reduced_ugly1_ -- Deal with TYPELESS, HOLLERITH, and LOGICAL - - reduced = ffeexpr_reduced_ugly1_(reduced,op,r); - - Sigh. */ - -static ffebld -ffeexpr_reduced_ugly1_ (ffebld reduced, ffeexprExpr_ op, ffeexprExpr_ r) -{ - ffeinfo rinfo; - ffeinfoBasictype rbt; - ffeinfoKindtype rkt; - ffeinfoRank rrk; - ffeinfoKind rkd; - ffeinfoWhere rwh; - - rinfo = ffebld_info (ffebld_left (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - if ((rbt == FFEINFO_basictypeTYPELESS) - || (rbt == FFEINFO_basictypeHOLLERITH)) - { - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - r->token, op->token, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - rinfo = ffebld_info (ffebld_left (reduced)); - rbt = FFEINFO_basictypeINTEGER; - rkt = FFEINFO_kindtypeINTEGERDEFAULT; - rrk = 0; - rkd = FFEINFO_kindENTITY; - rwh = ffeinfo_where (rinfo); - } - - if (rbt == FFEINFO_basictypeLOGICAL) - { - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - r->token, op->token, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - } - - return reduced; -} - -/* ffeexpr_reduced_ugly1log_ -- Deal with TYPELESS and HOLLERITH - - reduced = ffeexpr_reduced_ugly1log_(reduced,op,r); - - Sigh. */ - -static ffebld -ffeexpr_reduced_ugly1log_ (ffebld reduced, ffeexprExpr_ op, ffeexprExpr_ r) -{ - ffeinfo rinfo; - ffeinfoBasictype rbt; - ffeinfoKindtype rkt; - ffeinfoRank rrk; - ffeinfoKind rkd; - ffeinfoWhere rwh; - - rinfo = ffebld_info (ffebld_left (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - if ((rbt == FFEINFO_basictypeTYPELESS) - || (rbt == FFEINFO_basictypeHOLLERITH)) - { - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - r->token, op->token, FFEINFO_basictypeLOGICAL, 0, - FFEINFO_kindtypeLOGICALDEFAULT, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - rinfo = ffebld_info (ffebld_left (reduced)); - rbt = FFEINFO_basictypeLOGICAL; - rkt = FFEINFO_kindtypeLOGICALDEFAULT; - rrk = 0; - rkd = FFEINFO_kindENTITY; - rwh = ffeinfo_where (rinfo); - } - - return reduced; -} - -/* ffeexpr_reduced_ugly2_ -- Deal with TYPELESS, HOLLERITH, and LOGICAL - - reduced = ffeexpr_reduced_ugly2_(reduced,l,op,r); - - Sigh. */ - -static ffebld -ffeexpr_reduced_ugly2_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r) -{ - ffeinfo linfo, rinfo; - ffeinfoBasictype lbt, rbt; - ffeinfoKindtype lkt, rkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd; - ffeinfoWhere lwh, rwh; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - if ((lbt == FFEINFO_basictypeTYPELESS) - || (lbt == FFEINFO_basictypeHOLLERITH)) - { - if ((rbt == FFEINFO_basictypeTYPELESS) - || (rbt == FFEINFO_basictypeHOLLERITH)) - { - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, FFEINFO_basictypeINTEGER, 0, - FFEINFO_kindtypeINTEGERDEFAULT, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - linfo = ffebld_info (ffebld_left (reduced)); - rinfo = ffebld_info (ffebld_right (reduced)); - lbt = rbt = FFEINFO_basictypeINTEGER; - lkt = rkt = FFEINFO_kindtypeINTEGERDEFAULT; - lrk = rrk = 0; - lkd = rkd = FFEINFO_kindENTITY; - lwh = ffeinfo_where (linfo); - rwh = ffeinfo_where (rinfo); - } - else - { - ffebld_set_left (reduced, ffeexpr_convert_expr (ffebld_left (reduced), - l->token, ffebld_right (reduced), r->token, - FFEEXPR_contextLET)); - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - } - } - else - { - if ((rbt == FFEINFO_basictypeTYPELESS) - || (rbt == FFEINFO_basictypeHOLLERITH)) - { - ffebld_set_right (reduced, ffeexpr_convert_expr (ffebld_right (reduced), - r->token, ffebld_left (reduced), l->token, - FFEEXPR_contextLET)); - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - } - /* else Leave it alone. */ - } - - if (lbt == FFEINFO_basictypeLOGICAL) - { - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - } - - if (rbt == FFEINFO_basictypeLOGICAL) - { - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - } - - return reduced; -} - -/* ffeexpr_reduced_ugly2log_ -- Deal with TYPELESS and HOLLERITH - - reduced = ffeexpr_reduced_ugly2log_(reduced,l,op,r); - - Sigh. */ - -static ffebld -ffeexpr_reduced_ugly2log_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, - ffeexprExpr_ r, bool *bothlogical) -{ - ffeinfo linfo, rinfo; - ffeinfoBasictype lbt, rbt; - ffeinfoKindtype lkt, rkt; - ffeinfoRank lrk, rrk; - ffeinfoKind lkd, rkd; - ffeinfoWhere lwh, rwh; - - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - - if ((lbt == FFEINFO_basictypeTYPELESS) - || (lbt == FFEINFO_basictypeHOLLERITH)) - { - if ((rbt == FFEINFO_basictypeTYPELESS) - || (rbt == FFEINFO_basictypeHOLLERITH)) - { - ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - linfo = ffebld_info (ffebld_left (reduced)); - rinfo = ffebld_info (ffebld_right (reduced)); - lbt = rbt = FFEINFO_basictypeLOGICAL; - lkt = rkt = FFEINFO_kindtypeLOGICALDEFAULT; - lrk = rrk = 0; - lkd = rkd = FFEINFO_kindENTITY; - lwh = ffeinfo_where (linfo); - rwh = ffeinfo_where (rinfo); - } - else - { - ffebld_set_left (reduced, ffeexpr_convert_expr (ffebld_left (reduced), - l->token, ffebld_right (reduced), r->token, - FFEEXPR_contextLET)); - linfo = ffebld_info (ffebld_left (reduced)); - lbt = ffeinfo_basictype (linfo); - lkt = ffeinfo_kindtype (linfo); - lrk = ffeinfo_rank (linfo); - lkd = ffeinfo_kind (linfo); - lwh = ffeinfo_where (linfo); - } - } - else - { - if ((rbt == FFEINFO_basictypeTYPELESS) - || (rbt == FFEINFO_basictypeHOLLERITH)) - { - ffebld_set_right (reduced, ffeexpr_convert_expr (ffebld_right (reduced), - r->token, ffebld_left (reduced), l->token, - FFEEXPR_contextLET)); - rinfo = ffebld_info (ffebld_right (reduced)); - rbt = ffeinfo_basictype (rinfo); - rkt = ffeinfo_kindtype (rinfo); - rrk = ffeinfo_rank (rinfo); - rkd = ffeinfo_kind (rinfo); - rwh = ffeinfo_where (rinfo); - } - /* else Leave it alone. */ - } - - if (lbt == FFEINFO_basictypeLOGICAL) - { - ffebld_set_left (reduced, - ffeexpr_convert (ffebld_left (reduced), - l->token, op->token, - FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - } - - if (rbt == FFEINFO_basictypeLOGICAL) - { - ffebld_set_right (reduced, - ffeexpr_convert (ffebld_right (reduced), - r->token, op->token, - FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET)); - } - - if (bothlogical != NULL) - *bothlogical = (lbt == FFEINFO_basictypeLOGICAL - && rbt == FFEINFO_basictypeLOGICAL); - - return reduced; -} - -/* Fumble through tokens until a nonmatching CLOSE_PAREN, EOS, or SEMICOLON - is found. - - The idea is to process the tokens as they would be done by normal - expression processing, with the key things being telling the lexer - when hollerith/character constants are about to happen, until the - true closing token is found. */ - -static ffelexHandler -ffeexpr_find_close_paren_ (ffelexToken t, - ffelexHandler after) -{ - ffeexpr_find_.after = after; - ffeexpr_find_.level = 1; - return (ffelexHandler) ffeexpr_nil_rhs_ (t); -} - -static ffelexHandler -ffeexpr_nil_finished_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (--ffeexpr_find_.level == 0) - return (ffelexHandler) ffeexpr_find_.after; - return (ffelexHandler) ffeexpr_nil_binary_; - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLON: - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - return (ffelexHandler) ffeexpr_nil_rhs_; - - default: - if (--ffeexpr_find_.level == 0) - return (ffelexHandler) ffeexpr_find_.after (t); - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - } -} - -static ffelexHandler -ffeexpr_nil_rhs_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeQUOTE: - if (ffe_is_vxt ()) - return (ffelexHandler) ffeexpr_nil_quote_; - ffelex_set_expecting_hollerith (-1, '\"', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - return (ffelexHandler) ffeexpr_nil_apostrophe_; - - case FFELEX_typeAPOSTROPHE: - ffelex_set_expecting_hollerith (-1, '\'', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - return (ffelexHandler) ffeexpr_nil_apostrophe_; - - case FFELEX_typePERCENT: - return (ffelexHandler) ffeexpr_nil_percent_; - - case FFELEX_typeOPEN_PAREN: - ++ffeexpr_find_.level; - return (ffelexHandler) ffeexpr_nil_rhs_; - - case FFELEX_typePLUS: - case FFELEX_typeMINUS: - return (ffelexHandler) ffeexpr_nil_rhs_; - - case FFELEX_typePERIOD: - return (ffelexHandler) ffeexpr_nil_period_; - - case FFELEX_typeNUMBER: - ffeexpr_hollerith_count_ = atol (ffelex_token_text (t)); - if (ffeexpr_hollerith_count_ > 0) - ffelex_set_expecting_hollerith (ffeexpr_hollerith_count_, - '\0', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - return (ffelexHandler) ffeexpr_nil_number_; - - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - return (ffelexHandler) ffeexpr_nil_name_rhs_; - - case FFELEX_typeASTERISK: - case FFELEX_typeSLASH: - case FFELEX_typePOWER: - case FFELEX_typeCONCAT: - case FFELEX_typeREL_EQ: - case FFELEX_typeREL_NE: - case FFELEX_typeREL_LE: - case FFELEX_typeREL_GE: - return (ffelexHandler) ffeexpr_nil_rhs_; - - default: - return (ffelexHandler) ffeexpr_nil_finished_ (t); - } -} - -static ffelexHandler -ffeexpr_nil_period_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_current_dotdot_ = ffestr_other (t); - switch (ffeexpr_current_dotdot_) - { - case FFESTR_otherNone: - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - - case FFESTR_otherTRUE: - case FFESTR_otherFALSE: - case FFESTR_otherNOT: - return (ffelexHandler) ffeexpr_nil_end_period_; - - default: - return (ffelexHandler) ffeexpr_nil_swallow_period_; - } - break; /* Nothing really reaches here. */ - - case FFELEX_typeNUMBER: - return (ffelexHandler) ffeexpr_nil_real_; - - default: - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - } -} - -static ffelexHandler -ffeexpr_nil_end_period_ (ffelexToken t) -{ - switch (ffeexpr_current_dotdot_) - { - case FFESTR_otherNOT: - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - return (ffelexHandler) ffeexpr_nil_rhs_; - - case FFESTR_otherTRUE: - case FFESTR_otherFALSE: - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - return (ffelexHandler) ffeexpr_nil_binary_; - - default: - assert ("Bad [nil] unary dotdot in ffeexpr_current_dotdot_" == NULL); - exit (0); - return NULL; - } -} - -static ffelexHandler -ffeexpr_nil_swallow_period_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - return (ffelexHandler) ffeexpr_nil_rhs_; -} - -static ffelexHandler -ffeexpr_nil_real_ (ffelexToken t) -{ - char d; - const char *p; - - if (((ffelex_token_type (t) != FFELEX_typeNAME) - && (ffelex_token_type (t) != FFELEX_typeNAMES)) - || !(((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q'))) - && ffeexpr_isdigits_ (++p))) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - - if (*p == '\0') - return (ffelexHandler) ffeexpr_nil_real_exponent_; - return (ffelexHandler) ffeexpr_nil_binary_; -} - -static ffelexHandler -ffeexpr_nil_real_exponent_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - - return (ffelexHandler) ffeexpr_nil_real_exp_sign_; -} - -static ffelexHandler -ffeexpr_nil_real_exp_sign_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - return (ffelexHandler) ffeexpr_nil_binary_; -} - -static ffelexHandler -ffeexpr_nil_number_ (ffelexToken t) -{ - char d; - const char *p; - - if (ffeexpr_hollerith_count_ > 0) - ffelex_set_expecting_hollerith (0, '\0', - ffewhere_line_unknown (), - ffewhere_column_unknown ()); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - if ((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q')) - && ffeexpr_isdigits_ (++p)) - { - if (*p == '\0') - { - ffeexpr_find_.t = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_nil_number_exponent_; - } - return (ffelexHandler) ffeexpr_nil_binary_; - } - break; - - case FFELEX_typePERIOD: - ffeexpr_find_.t = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_nil_number_period_; - - case FFELEX_typeHOLLERITH: - return (ffelexHandler) ffeexpr_nil_binary_; - - default: - break; - } - return (ffelexHandler) ffeexpr_nil_binary_ (t); -} - -/* Expects ffeexpr_find_.t. */ - -static ffelexHandler -ffeexpr_nil_number_exponent_ (ffelexToken t) -{ - ffelexHandler nexthandler; - - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - { - nexthandler - = (ffelexHandler) ffeexpr_nil_binary_ (ffeexpr_find_.t); - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) (*nexthandler) (t); - } - - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) ffeexpr_nil_number_exp_sign_; -} - -static ffelexHandler -ffeexpr_nil_number_exp_sign_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - - return (ffelexHandler) ffeexpr_nil_binary_; -} - -/* Expects ffeexpr_find_.t. */ - -static ffelexHandler -ffeexpr_nil_number_period_ (ffelexToken t) -{ - ffelexHandler nexthandler; - char d; - const char *p; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - if ((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q')) - && ffeexpr_isdigits_ (++p)) - { - if (*p == '\0') - return (ffelexHandler) ffeexpr_nil_number_per_exp_; - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) ffeexpr_nil_binary_; - } - nexthandler - = (ffelexHandler) ffeexpr_nil_binary_ (ffeexpr_find_.t); - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) (*nexthandler) (t); - - case FFELEX_typeNUMBER: - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) ffeexpr_nil_number_real_; - - default: - break; - } - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) ffeexpr_nil_binary_ (t); -} - -/* Expects ffeexpr_find_.t. */ - -static ffelexHandler -ffeexpr_nil_number_per_exp_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - { - ffelexHandler nexthandler; - - nexthandler - = (ffelexHandler) ffeexpr_nil_binary_ (ffeexpr_find_.t); - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) (*nexthandler) (t); - } - - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) ffeexpr_nil_num_per_exp_sign_; -} - -static ffelexHandler -ffeexpr_nil_number_real_ (ffelexToken t) -{ - char d; - const char *p; - - if (((ffelex_token_type (t) != FFELEX_typeNAME) - && (ffelex_token_type (t) != FFELEX_typeNAMES)) - || !(((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q'))) - && ffeexpr_isdigits_ (++p))) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - - if (*p == '\0') - return (ffelexHandler) ffeexpr_nil_number_real_exp_; - - return (ffelexHandler) ffeexpr_nil_binary_; -} - -static ffelexHandler -ffeexpr_nil_num_per_exp_sign_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - return (ffelexHandler) ffeexpr_nil_binary_; -} - -static ffelexHandler -ffeexpr_nil_number_real_exp_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - return (ffelexHandler) ffeexpr_nil_num_real_exp_sn_; -} - -static ffelexHandler -ffeexpr_nil_num_real_exp_sn_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - return (ffelexHandler) ffeexpr_nil_binary_; -} - -static ffelexHandler -ffeexpr_nil_binary_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typePLUS: - case FFELEX_typeMINUS: - case FFELEX_typeASTERISK: - case FFELEX_typeSLASH: - case FFELEX_typePOWER: - case FFELEX_typeCONCAT: - case FFELEX_typeOPEN_ANGLE: - case FFELEX_typeCLOSE_ANGLE: - case FFELEX_typeREL_EQ: - case FFELEX_typeREL_NE: - case FFELEX_typeREL_GE: - case FFELEX_typeREL_LE: - return (ffelexHandler) ffeexpr_nil_rhs_; - - case FFELEX_typePERIOD: - return (ffelexHandler) ffeexpr_nil_binary_period_; - - default: - return (ffelexHandler) ffeexpr_nil_finished_ (t); - } -} - -static ffelexHandler -ffeexpr_nil_binary_period_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_current_dotdot_ = ffestr_other (t); - switch (ffeexpr_current_dotdot_) - { - case FFESTR_otherTRUE: - case FFESTR_otherFALSE: - case FFESTR_otherNOT: - return (ffelexHandler) ffeexpr_nil_binary_sw_per_; - - default: - return (ffelexHandler) ffeexpr_nil_binary_end_per_; - } - break; /* Nothing really reaches here. */ - - default: - return (ffelexHandler) ffeexpr_nil_binary_ (t); - } -} - -static ffelexHandler -ffeexpr_nil_binary_end_per_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - return (ffelexHandler) ffeexpr_nil_rhs_; -} - -static ffelexHandler -ffeexpr_nil_binary_sw_per_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - return (ffelexHandler) ffeexpr_nil_binary_; -} - -static ffelexHandler -ffeexpr_nil_quote_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - return (ffelexHandler) ffeexpr_nil_binary_; -} - -static ffelexHandler -ffeexpr_nil_apostrophe_ (ffelexToken t) -{ - assert (ffelex_token_type (t) == FFELEX_typeCHARACTER); - return (ffelexHandler) ffeexpr_nil_apos_char_; -} - -static ffelexHandler -ffeexpr_nil_apos_char_ (ffelexToken t) -{ - char c; - - if ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES)) - { - if ((ffelex_token_length (t) == 1) - && (ffesrc_char_match_init ((c = ffelex_token_text (t)[0]), - 'B', 'b') - || ffesrc_char_match_init (c, 'O', 'o') - || ffesrc_char_match_init (c, 'X', 'x') - || ffesrc_char_match_init (c, 'Z', 'z'))) - return (ffelexHandler) ffeexpr_nil_binary_; - } - if ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES)) - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - return (ffelexHandler) ffeexpr_nil_substrp_ (t); -} - -static ffelexHandler -ffeexpr_nil_name_rhs_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeQUOTE: - case FFELEX_typeAPOSTROPHE: - ffelex_set_hexnum (TRUE); - return (ffelexHandler) ffeexpr_nil_name_apos_; - - case FFELEX_typeOPEN_PAREN: - ++ffeexpr_find_.level; - return (ffelexHandler) ffeexpr_nil_rhs_; - - default: - return (ffelexHandler) ffeexpr_nil_binary_ (t); - } -} - -static ffelexHandler -ffeexpr_nil_name_apos_ (ffelexToken t) -{ - if (ffelex_token_type (t) == FFELEX_typeNAME) - return (ffelexHandler) ffeexpr_nil_name_apos_name_; - return (ffelexHandler) ffeexpr_nil_binary_ (t); -} - -static ffelexHandler -ffeexpr_nil_name_apos_name_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeQUOTE: - return (ffelexHandler) ffeexpr_nil_finished_; - - default: - return (ffelexHandler) ffeexpr_nil_finished_ (t); - } -} - -static ffelexHandler -ffeexpr_nil_percent_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_stack_->percent = ffeexpr_percent_ (t); - ffeexpr_find_.t = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_nil_percent_name_; - - default: - return (ffelexHandler) ffeexpr_nil_rhs_ (t); - } -} - -/* Expects ffeexpr_find_.t. */ - -static ffelexHandler -ffeexpr_nil_percent_name_ (ffelexToken t) -{ - ffelexHandler nexthandler; - - if (ffelex_token_type (t) != FFELEX_typeOPEN_PAREN) - { - nexthandler - = (ffelexHandler) ffeexpr_nil_rhs_ (ffeexpr_find_.t); - ffelex_token_kill (ffeexpr_find_.t); - return (ffelexHandler) (*nexthandler) (t); - } - - ffelex_token_kill (ffeexpr_find_.t); - ++ffeexpr_find_.level; - return (ffelexHandler) ffeexpr_nil_rhs_; -} - -static ffelexHandler -ffeexpr_nil_substrp_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeOPEN_PAREN) - return (ffelexHandler) ffeexpr_nil_binary_ (t); - - ++ffeexpr_find_.level; - return (ffelexHandler) ffeexpr_nil_rhs_; -} - -/* ffeexpr_finished_ -- Reduce expression stack to one expr, finish - - ffelexToken t; - return ffeexpr_finished_(t); - - Reduces expression stack to one (or zero) elements by repeatedly reducing - the top operator on the stack (or, if the top element on the stack is - itself an operator, issuing an error message and discarding it). Calls - finishing routine with the expression, returning the ffelexHandler it - returns to the caller. */ - -static ffelexHandler -ffeexpr_finished_ (ffelexToken t) -{ - ffeexprExpr_ operand; /* This is B in -B or A+B. */ - ffebld expr; - ffeexprCallback callback; - ffeexprStack_ s; - ffebldConstant constnode; /* For detecting magical number. */ - ffelexToken ft; /* Temporary copy of first token in - expression. */ - ffelexHandler next; - ffeinfo info; - bool error = FALSE; - - while (((operand = ffeexpr_stack_->exprstack) != NULL) - && ((operand->previous != NULL) || (operand->type != FFEEXPR_exprtypeOPERAND_))) - { - if (operand->type == FFEEXPR_exprtypeOPERAND_) - ffeexpr_reduce_ (); - else - { - if (ffest_ffebad_start (FFEBAD_MISSING_OPERAND_FOR_OPERATOR)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->exprstack->token), - ffelex_token_where_column (ffeexpr_stack_->exprstack->token)); - ffebad_finish (); - } - ffeexpr_stack_->exprstack = operand->previous; /* Pop the useless - operator. */ - ffeexpr_expr_kill_ (operand); - } - } - - assert ((operand == NULL) || (operand->previous == NULL)); - - ffebld_pool_pop (); - if (operand == NULL) - expr = NULL; - else - { - expr = operand->u.operand; - info = ffebld_info (expr); - if ((ffebld_op (expr) == FFEBLD_opCONTER) - && (ffebld_conter_orig (expr) == NULL) - && ffebld_constant_is_magical (constnode = ffebld_conter (expr))) - { - ffetarget_integer_bad_magical (operand->token); - } - ffeexpr_expr_kill_ (operand); - ffeexpr_stack_->exprstack = NULL; - } - - ft = ffeexpr_stack_->first_token; - -again: /* :::::::::::::::::::: */ - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextLET: - case FFEEXPR_contextSFUNCDEF: - error = (expr == NULL) - || (ffeinfo_rank (info) != 0); - break; - - case FFEEXPR_contextPAREN_: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - break; - } - break; - - case FFEEXPR_contextPARENFILENUM_: - if (ffelex_token_type (t) != FFELEX_typeCOMMA) - ffeexpr_stack_->context = FFEEXPR_contextPAREN_; - else - ffeexpr_stack_->context = FFEEXPR_contextFILENUM; - goto again; /* :::::::::::::::::::: */ - - case FFEEXPR_contextPARENFILEUNIT_: - if (ffelex_token_type (t) != FFELEX_typeCOMMA) - ffeexpr_stack_->context = FFEEXPR_contextPAREN_; - else - ffeexpr_stack_->context = FFEEXPR_contextFILEUNIT; - goto again; /* :::::::::::::::::::: */ - - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - if (!ffe_is_ugly_args () - && ffebad_start (FFEBAD_ACTUALARG)) - { - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - } - break; - - default: - break; - } - error = (expr != NULL) && (ffeinfo_rank (info) != 0); - break; - - case FFEEXPR_contextACTUALARG_: - case FFEEXPR_contextSFUNCDEFACTUALARG_: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: -#if 0 /* Should never get here. */ - expr = ffeexpr_convert (expr, ft, ft, - FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, - 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); -#else - assert ("why hollerith/typeless in actualarg_?" == NULL); -#endif - break; - - default: - break; - } - switch ((expr == NULL) ? FFEBLD_opANY : ffebld_op (expr)) - { - case FFEBLD_opSYMTER: - case FFEBLD_opPERCENT_LOC: - case FFEBLD_opPERCENT_VAL: - case FFEBLD_opPERCENT_REF: - case FFEBLD_opPERCENT_DESCR: - error = FALSE; - break; - - default: - error = (expr != NULL) && (ffeinfo_rank (info) != 0); - break; - } - { - ffesymbol s; - ffeinfoWhere where; - ffeinfoKind kind; - - if (!error - && (expr != NULL) - && (ffebld_op (expr) == FFEBLD_opSYMTER) - && ((s = ffebld_symter (expr)), (where = ffesymbol_where (s)), - (where == FFEINFO_whereINTRINSIC) - || (where == FFEINFO_whereGLOBAL) - || ((where == FFEINFO_whereDUMMY) - && ((kind = ffesymbol_kind (s)), - (kind == FFEINFO_kindFUNCTION) - || (kind == FFEINFO_kindSUBROUTINE)))) - && !ffesymbol_explicitwhere (s)) - { - ffebad_start (where == FFEINFO_whereINTRINSIC - ? FFEBAD_NEED_INTRINSIC : FFEBAD_NEED_EXTERNAL); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - ffesymbol_signal_change (s); - ffesymbol_set_explicitwhere (s, TRUE); - ffesymbol_signal_unreported (s); - } - } - break; - - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextSFUNCDEFINDEX_: - if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0))) - break; - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeNONE: - error = FALSE; - break; - - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeINTEGER: - /* Specifically, allow INTEGER(KIND=2), aka INTEGER*8, through - unmolested. Leave it to downstream to handle kinds. */ - break; - - default: - error = TRUE; - break; - } - break; /* expr==NULL ok for substring; element case - caught by callback. */ - - case FFEEXPR_contextRETURN: - if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0))) - break; - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeNONE: - error = FALSE; - break; - - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextDO: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - error = !ffe_is_ugly_logint (); - if (!ffeexpr_stack_->is_rhs) - break; /* Don't convert lhs variable. */ - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - ffeinfo_kindtype (ffebld_info (expr)), 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - if (!ffeexpr_stack_->is_rhs) - { - error = TRUE; - break; /* Don't convert lhs variable. */ - } - break; - - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeREAL: - break; - - default: - error = TRUE; - break; - } - if (!ffeexpr_stack_->is_rhs - && (ffebld_op (expr) != FFEBLD_opSYMTER)) - error = TRUE; - break; - - case FFEEXPR_contextDOWHILE: - case FFEEXPR_contextIF: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeLOGICAL: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextASSIGN: - case FFEEXPR_contextAGOTO: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - error = (ffeinfo_kindtype (info) != ffecom_label_kind ()); - break; - - case FFEINFO_basictypeLOGICAL: - error = !ffe_is_ugly_logint () - || (ffeinfo_kindtype (info) != ffecom_label_kind ()); - break; - - default: - error = TRUE; - break; - } - if ((expr == NULL) || (ffeinfo_rank (info) != 0) - || (ffebld_op (expr) != FFEBLD_opSYMTER)) - error = TRUE; - break; - - case FFEEXPR_contextCGOTO: - case FFEEXPR_contextFORMAT: - case FFEEXPR_contextDIMLIST: - case FFEEXPR_contextFILENUM: /* See equiv code in _ambig_. */ - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextARITHIF: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeREAL: - error = FALSE; - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextSTOP: - if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0))) - break; - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - error = (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT); - break; - - case FFEINFO_basictypeCHARACTER: - error = (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT); - break; - - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeNONE: - error = FALSE; - break; - - default: - error = TRUE; - break; - } - if ((expr != NULL) && ((ffebld_op (expr) != FFEBLD_opCONTER) - || (ffebld_conter_orig (expr) != NULL))) - error = TRUE; - break; - - case FFEEXPR_contextINCLUDE: - error = (expr == NULL) || (ffeinfo_rank (info) != 0) - || (ffeinfo_basictype (info) != FFEINFO_basictypeCHARACTER) - || (ffebld_op (expr) != FFEBLD_opCONTER) - || (ffebld_conter_orig (expr) != NULL); - break; - - case FFEEXPR_contextSELECTCASE: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeCHARACTER: - case FFEINFO_basictypeLOGICAL: - error = FALSE; - break; - - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextCASE: - if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0))) - break; - switch ((expr == NULL) ? FFEINFO_basictypeINTEGER - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeCHARACTER: - case FFEINFO_basictypeLOGICAL: - error = FALSE; - break; - - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - if ((expr != NULL) && (ffebld_op (expr) != FFEBLD_opCONTER)) - error = TRUE; - break; - - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextDIMLISTCOMMON: - if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0))) - break; - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - if ((expr != NULL) && (ffebld_op (expr) != FFEBLD_opCONTER)) - error = TRUE; - break; - - case FFEEXPR_contextEQVINDEX_: - if ((error = (expr != NULL) && (ffeinfo_rank (info) != 0))) - break; - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeNONE: - error = FALSE; - break; - - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - if ((expr != NULL) && (ffebld_op (expr) != FFEBLD_opCONTER)) - error = TRUE; - break; - - case FFEEXPR_contextPARAMETER: - if (ffeexpr_stack_->is_rhs) - error = (expr == NULL) || (ffeinfo_rank (info) != 0) - || (ffebld_op (expr) != FFEBLD_opCONTER); - else - error = (expr == NULL) || (ffeinfo_rank (info) != 0) - || (ffebld_op (expr) != FFEBLD_opSYMTER); - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - if (ffelex_token_type (t) == FFELEX_typeCOLON) - ffeexpr_stack_->context = FFEEXPR_contextINDEX_; - else - ffeexpr_stack_->context = FFEEXPR_contextACTUALARG_; - goto again; /* :::::::::::::::::::: */ - - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - if (ffelex_token_type (t) == FFELEX_typeCOLON) - ffeexpr_stack_->context = FFEEXPR_contextINDEX_; - else - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - goto again; /* :::::::::::::::::::: */ - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - if (ffelex_token_type (t) == FFELEX_typeCOLON) - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEX_; - else - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARG_; - goto again; /* :::::::::::::::::::: */ - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - if (ffelex_token_type (t) == FFELEX_typeCOLON) - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFINDEX_; - else - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - goto again; /* :::::::::::::::::::: */ - - case FFEEXPR_contextIMPDOCTRL_: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - if (!ffeexpr_stack_->is_rhs - && (ffebld_op (expr) != FFEBLD_opSYMTER)) - error = TRUE; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - if (! ffe_is_ugly_logint ()) - error = TRUE; - if (! ffeexpr_stack_->is_rhs) - break; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - ffeinfo_kindtype (info), 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - break; - - case FFEINFO_basictypeREAL: - if (!ffeexpr_stack_->is_rhs - && ffe_is_warn_surprising () - && !error) - { - ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_string (ffelex_token_text (ft)); - ffebad_finish (); - } - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextDATAIMPDOCTRL_: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - if (ffeexpr_stack_->is_rhs) - { - if ((ffebld_op (expr) != FFEBLD_opCONTER) - && (ffeinfo_where (info) != FFEINFO_whereIMMEDIATE)) - error = TRUE; - } - else if ((ffebld_op (expr) != FFEBLD_opSYMTER) - || (ffeinfo_where (info) != FFEINFO_whereIMMEDIATE)) - error = TRUE; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - if (! ffeexpr_stack_->is_rhs) - break; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - ffeinfo_kindtype (info), 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - if (ffeexpr_stack_->is_rhs - && (ffeinfo_kindtype (ffebld_info (expr)) - != FFEINFO_kindtypeINTEGERDEFAULT)) - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeREAL: - if (!ffeexpr_stack_->is_rhs - && ffe_is_warn_surprising () - && !error) - { - ffebad_start (FFEBAD_DO_REAL); /* See error message!!! */ - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_string (ffelex_token_text (ft)); - ffebad_finish (); - } - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextIMPDOITEM_: - if (ffelex_token_type (t) == FFELEX_typeEQUALS) - { - ffeexpr_stack_->is_rhs = FALSE; - ffeexpr_stack_->context = FFEEXPR_contextIMPDOCTRL_; - goto again; /* :::::::::::::::::::: */ - } - /* Fall through. */ - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextFILEVXTCODE: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - break; - } - error = (expr == NULL) - || ((ffeinfo_rank (info) != 0) - && ((ffebld_op (expr) != FFEBLD_opSYMTER) - || (ffesymbol_arraysize (ffebld_symter (expr)) == NULL) - || (ffebld_op (ffesymbol_arraysize (ffebld_symter (expr))) - == FFEBLD_opSTAR))); /* Bad if null expr, or if - array that is not a SYMTER - (can't happen yet, I - think) or has a NULL or - STAR (assumed) array - size. */ - break; - - case FFEEXPR_contextIMPDOITEMDF_: - if (ffelex_token_type (t) == FFELEX_typeEQUALS) - { - ffeexpr_stack_->is_rhs = FALSE; - ffeexpr_stack_->context = FFEEXPR_contextIMPDOCTRL_; - goto again; /* :::::::::::::::::::: */ - } - /* Fall through. */ - case FFEEXPR_contextIOLISTDF: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - break; - } - error - = (expr == NULL) - || ((ffeinfo_basictype (info) == FFEINFO_basictypeCHARACTER) - && (ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT)) - || ((ffeinfo_rank (info) != 0) - && ((ffebld_op (expr) != FFEBLD_opSYMTER) - || (ffesymbol_arraysize (ffebld_symter (expr)) == NULL) - || (ffebld_op (ffesymbol_arraysize (ffebld_symter (expr))) - == FFEBLD_opSTAR))); /* Bad if null expr, - non-default-kindtype - character expr, or if - array that is not a SYMTER - (can't happen yet, I - think) or has a NULL or - STAR (assumed) array - size. */ - break; - - case FFEEXPR_contextDATAIMPDOITEM_: - error = (expr == NULL) - || (ffebld_op (expr) != FFEBLD_opARRAYREF) - || ((ffeinfo_where (info) != FFEINFO_whereFLEETING_CADDR) - && (ffeinfo_where (info) != FFEINFO_whereFLEETING_IADDR)); - break; - - case FFEEXPR_contextDATAIMPDOINDEX_: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - if ((ffeinfo_where (info) != FFEINFO_whereCONSTANT) - && (ffeinfo_where (info) != FFEINFO_whereIMMEDIATE)) - error = TRUE; - break; - - case FFEEXPR_contextDATA: - if (expr == NULL) - error = TRUE; - else if (ffeexpr_stack_->is_rhs) - error = (ffebld_op (expr) != FFEBLD_opCONTER); - else if (ffebld_op (expr) == FFEBLD_opSYMTER) - error = FALSE; - else - error = (ffeinfo_where (info) != FFEINFO_whereFLEETING_CADDR); - break; - - case FFEEXPR_contextINITVAL: - error = (expr == NULL) || (ffebld_op (expr) != FFEBLD_opCONTER); - break; - - case FFEEXPR_contextEQUIVALENCE: - if (expr == NULL) - error = TRUE; - else if (ffebld_op (expr) == FFEBLD_opSYMTER) - error = FALSE; - else - error = (ffeinfo_where (info) != FFEINFO_whereFLEETING_CADDR); - break; - - case FFEEXPR_contextFILEASSOC: - case FFEEXPR_contextFILEINT: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - /* Maybe this should be supported someday, but, right now, - g77 can't generate a call to libf2c to write to an - integer other than the default size. */ - error = ((! ffeexpr_stack_->is_rhs) - && ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT); - break; - - default: - error = TRUE; - break; - } - if ((expr == NULL) || (ffeinfo_rank (info) != 0)) - error = TRUE; - break; - - case FFEEXPR_contextFILEDFINT: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - error = (ffeinfo_kindtype (info) != FFEINFO_kindtypeINTEGERDEFAULT); - break; - - default: - error = TRUE; - break; - } - if ((expr == NULL) || (ffeinfo_rank (info) != 0)) - error = TRUE; - break; - - case FFEEXPR_contextFILELOG: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - error = FALSE; - break; - - default: - error = TRUE; - break; - } - if ((expr == NULL) || (ffeinfo_rank (info) != 0)) - error = TRUE; - break; - - case FFEEXPR_contextFILECHAR: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeCHARACTER: - error = FALSE; - break; - - default: - error = TRUE; - break; - } - if ((expr == NULL) || (ffeinfo_rank (info) != 0)) - error = TRUE; - break; - - case FFEEXPR_contextFILENUMCHAR: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeCHARACTER: - error = FALSE; - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextFILEDFCHAR: - if ((error = (expr == NULL) || (ffeinfo_rank (info) != 0))) - break; - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeCHARACTER: - error - = (ffeinfo_kindtype (info) - != FFEINFO_kindtypeCHARACTERDEFAULT); - break; - - default: - error = TRUE; - break; - } - if (!ffeexpr_stack_->is_rhs - && (ffebld_op (expr) == FFEBLD_opSUBSTR)) - error = TRUE; - break; - - case FFEEXPR_contextFILEUNIT: /* See equiv code in _ambig_. */ - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - if ((error = (ffeinfo_rank (info) != 0))) - break; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if ((error = (ffeinfo_rank (info) != 0))) - break; - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - if ((error = (ffeinfo_rank (info) != 0))) - break; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffebld_op (expr)) - { /* As if _lhs had been called instead of - _rhs. */ - case FFEBLD_opSYMTER: - error - = (ffeinfo_where (ffebld_info (expr)) == FFEINFO_whereCONSTANT); - break; - - case FFEBLD_opSUBSTR: - error = (ffeinfo_where (ffebld_info (expr)) - == FFEINFO_whereCONSTANT_SUBOBJECT); - break; - - case FFEBLD_opARRAYREF: - error = FALSE; - break; - - default: - error = TRUE; - break; - } - if (!error - && ((ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) - || ((ffeinfo_rank (info) != 0) - && ((ffebld_op (expr) != FFEBLD_opSYMTER) - || (ffesymbol_arraysize (ffebld_symter (expr)) == NULL) - || (ffebld_op (ffesymbol_arraysize (ffebld_symter (expr))) - == FFEBLD_opSTAR))))) /* Bad if - non-default-kindtype - character expr, or if - array that is not a SYMTER - (can't happen yet, I - think), or has a NULL or - STAR (assumed) array - size. */ - error = TRUE; - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextFILEFORMAT: - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeINTEGER: - error = (expr == NULL) - || ((ffeinfo_rank (info) != 0) ? - ffe_is_pedantic () /* F77 C5. */ - : (bool) (ffeinfo_kindtype (info) != ffecom_label_kind ())) - || (ffebld_op (expr) != FFEBLD_opSYMTER); - break; - - case FFEINFO_basictypeLOGICAL: - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - /* F77 C5 -- must be an array of hollerith. */ - error - = ffe_is_pedantic () - || (ffeinfo_rank (info) == 0); - break; - - case FFEINFO_basictypeCHARACTER: - if ((ffeinfo_kindtype (info) != FFEINFO_kindtypeCHARACTERDEFAULT) - || ((ffeinfo_rank (info) != 0) - && ((ffebld_op (expr) != FFEBLD_opSYMTER) - || (ffesymbol_arraysize (ffebld_symter (expr)) == NULL) - || (ffebld_op (ffesymbol_arraysize (ffebld_symter (expr))) - == FFEBLD_opSTAR)))) /* Bad if - non-default-kindtype - character expr, or if - array that is not a SYMTER - (can't happen yet, I - think), or has a NULL or - STAR (assumed) array - size. */ - error = TRUE; - else - error = FALSE; - break; - - default: - error = TRUE; - break; - } - break; - - case FFEEXPR_contextLOC_: - /* See also ffeintrin_check_loc_. */ - if ((expr == NULL) - || (ffeinfo_kind (info) != FFEINFO_kindENTITY) - || ((ffebld_op (expr) != FFEBLD_opSYMTER) - && (ffebld_op (expr) != FFEBLD_opSUBSTR) - && (ffebld_op (expr) != FFEBLD_opARRAYREF))) - error = TRUE; - break; - - default: - error = FALSE; - break; - } - - if (error && ((expr == NULL) || (ffebld_op (expr) != FFEBLD_opANY))) - { - ffebad_start (FFEBAD_EXPR_WRONG); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - expr = ffebld_new_any (); - ffebld_set_info (expr, ffeinfo_new_any ()); - } - - callback = ffeexpr_stack_->callback; - s = ffeexpr_stack_->previous; - malloc_kill_ks (ffe_pool_program_unit (), ffeexpr_stack_, - sizeof (*ffeexpr_stack_)); - ffeexpr_stack_ = s; - next = (ffelexHandler) (*callback) (ft, expr, t); - ffelex_token_kill (ft); - return (ffelexHandler) next; -} - -/* ffeexpr_finished_ambig_ -- Check validity of ambiguous unit/form spec - - ffebld expr; - expr = ffeexpr_finished_ambig_(expr); - - Replicates a bit of ffeexpr_finished_'s task when in a context - of UNIT or FORMAT. */ - -static ffebld -ffeexpr_finished_ambig_ (ffelexToken ft, ffebld expr) -{ - ffeinfo info = ffebld_info (expr); - bool error; - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFILENUMAMBIG: /* Same as FILENUM in _finished_. */ - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = FALSE; - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - default: - error = TRUE; - break; - } - if ((expr == NULL) || (ffeinfo_rank (info) != 0)) - error = TRUE; - break; - - case FFEEXPR_contextFILEUNITAMBIG: /* Same as FILEUNIT in _finished_. */ - if ((expr != NULL) && (ffebld_op (expr) == FFEBLD_opSTAR)) - { - error = FALSE; - break; - } - switch ((expr == NULL) ? FFEINFO_basictypeNONE - : ffeinfo_basictype (info)) - { - case FFEINFO_basictypeLOGICAL: - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeLOGICAL, - FFEINFO_kindtypeLOGICALDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - /* Fall through. */ - case FFEINFO_basictypeREAL: - case FFEINFO_basictypeCOMPLEX: - if (ffe_is_pedantic ()) - { - error = TRUE; - break; - } - /* Fall through. */ - case FFEINFO_basictypeINTEGER: - case FFEINFO_basictypeHOLLERITH: - case FFEINFO_basictypeTYPELESS: - error = (ffeinfo_rank (info) != 0); - expr = ffeexpr_convert (expr, ft, ft, FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - break; - - case FFEINFO_basictypeCHARACTER: - switch (ffebld_op (expr)) - { /* As if _lhs had been called instead of - _rhs. */ - case FFEBLD_opSYMTER: - error - = (ffeinfo_where (ffebld_info (expr)) == FFEINFO_whereCONSTANT); - break; - - case FFEBLD_opSUBSTR: - error = (ffeinfo_where (ffebld_info (expr)) - == FFEINFO_whereCONSTANT_SUBOBJECT); - break; - - case FFEBLD_opARRAYREF: - error = FALSE; - break; - - default: - error = TRUE; - break; - } - break; - - default: - error = TRUE; - break; - } - break; - - default: - assert ("bad context" == NULL); - error = TRUE; - break; - } - - if (error && ((expr == NULL) || (ffebld_op (expr) != FFEBLD_opANY))) - { - ffebad_start (FFEBAD_EXPR_WRONG); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - expr = ffebld_new_any (); - ffebld_set_info (expr, ffeinfo_new_any ()); - } - - return expr; -} - -/* ffeexpr_token_lhs_ -- Initial state for lhs expression - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Basically a smaller version of _rhs_; keep them both in sync, of course. */ - -static ffelexHandler -ffeexpr_token_lhs_ (ffelexToken t) -{ - - /* When changing the list of valid initial lhs tokens, check whether to - update a corresponding list in ffeexpr_cb_close_paren_ambig_1_ for the - READ (expr) case -- it assumes it knows which tokens can - be to indicate an lhs (or implied DO), which right now is the set - {NAME,OPEN_PAREN}. - - This comment also appears in ffeexpr_token_first_lhs_. */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_tokens_[0] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_name_lhs_; - - default: - return (ffelexHandler) ffeexpr_finished_ (t); - } -} - -/* ffeexpr_token_rhs_ -- Initial state for rhs expression - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - The initial state and the post-binary-operator state are the same and - both handled here, with the expression stack used to distinguish - between them. Binary operators are invalid here; unary operators, - constants, subexpressions, and name references are valid. */ - -static ffelexHandler -ffeexpr_token_rhs_ (ffelexToken t) -{ - ffeexprExpr_ e; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeQUOTE: - if (ffe_is_vxt ()) - { - ffeexpr_tokens_[0] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_quote_; - } - ffeexpr_tokens_[0] = ffelex_token_use (t); - ffelex_set_expecting_hollerith (-1, '\"', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - /* Don't have to unset this one. */ - return (ffelexHandler) ffeexpr_token_apostrophe_; - - case FFELEX_typeAPOSTROPHE: - ffeexpr_tokens_[0] = ffelex_token_use (t); - ffelex_set_expecting_hollerith (-1, '\'', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - /* Don't have to unset this one. */ - return (ffelexHandler) ffeexpr_token_apostrophe_; - - case FFELEX_typePERCENT: - ffeexpr_tokens_[0] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_percent_; - - case FFELEX_typeOPEN_PAREN: - ffeexpr_stack_->tokens[0] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextPAREN_, - ffeexpr_cb_close_paren_c_); - - case FFELEX_typePLUS: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeUNARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorADD_; - e->u.operator.prec = FFEEXPR_operatorprecedenceADD_; - e->u.operator.as = FFEEXPR_operatorassociativityADD_; - ffeexpr_exprstack_push_unary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeMINUS: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeUNARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorSUBTRACT_; - e->u.operator.prec = FFEEXPR_operatorprecedenceSUBTRACT_; - e->u.operator.as = FFEEXPR_operatorassociativitySUBTRACT_; - ffeexpr_exprstack_push_unary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typePERIOD: - ffeexpr_tokens_[0] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_period_; - - case FFELEX_typeNUMBER: - ffeexpr_tokens_[0] = ffelex_token_use (t); - ffeexpr_hollerith_count_ = atol (ffelex_token_text (t)); - if (ffeexpr_hollerith_count_ > 0) - ffelex_set_expecting_hollerith (ffeexpr_hollerith_count_, - '\0', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - return (ffelexHandler) ffeexpr_token_number_; - - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_tokens_[0] = ffelex_token_use (t); - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - case FFEEXPR_contextINDEXORACTUALARG_: - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - return (ffelexHandler) ffeexpr_token_name_arg_; - - default: - return (ffelexHandler) ffeexpr_token_name_rhs_; - } - - case FFELEX_typeASTERISK: - case FFELEX_typeSLASH: - case FFELEX_typePOWER: - case FFELEX_typeCONCAT: - case FFELEX_typeREL_EQ: - case FFELEX_typeREL_NE: - case FFELEX_typeREL_LE: - case FFELEX_typeREL_GE: - if (ffest_ffebad_start (FFEBAD_MISSING_FIRST_BINARY_OPERAND)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - return (ffelexHandler) ffeexpr_token_rhs_; - -#if 0 - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCLOSE_ANGLE: - case FFELEX_typeCLOSE_PAREN: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: -#endif - default: - return (ffelexHandler) ffeexpr_finished_ (t); - } -} - -/* ffeexpr_token_period_ -- Rhs PERIOD - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle a period detected at rhs (expecting unary op or operand) state. - Must begin a floating-point value (as in .12) or a dot-dot name, of - which only .NOT., .TRUE., and .FALSE. are truly valid. Other sort-of- - valid names represent binary operators, which are invalid here because - there isn't an operand at the top of the stack. */ - -static ffelexHandler -ffeexpr_token_period_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_current_dotdot_ = ffestr_other (t); - switch (ffeexpr_current_dotdot_) - { - case FFESTR_otherNone: - if (ffest_ffebad_start (FFEBAD_IGNORING_PERIOD)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_rhs_ (t); - - case FFESTR_otherTRUE: - case FFESTR_otherFALSE: - case FFESTR_otherNOT: - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_end_period_; - - default: - if (ffest_ffebad_start (FFEBAD_MISSING_FIRST_BINARY_OPERAND)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_swallow_period_; - } - break; /* Nothing really reaches here. */ - - case FFELEX_typeNUMBER: - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_real_; - - default: - if (ffest_ffebad_start (FFEBAD_IGNORING_PERIOD)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_rhs_ (t); - } -} - -/* ffeexpr_token_end_period_ -- Rhs PERIOD NAME(NOT, TRUE, or FALSE) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Expecting a period to close a .NOT, .TRUE, or .FALSE at rhs (unary op - or operator) state. If period isn't found, issue a diagnostic but - pretend we saw one. ffeexpr_current_dotdot_ must already contained the - dotdot representation of the name in between the two PERIOD tokens. */ - -static ffelexHandler -ffeexpr_token_end_period_ (ffelexToken t) -{ - ffeexprExpr_ e; - - if (ffelex_token_type (t) != FFELEX_typePERIOD) - { - if (ffest_ffebad_start (FFEBAD_INSERTING_PERIOD)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (ffelex_token_text (ffeexpr_tokens_[1])); - ffebad_finish (); - } - } - - ffelex_token_kill (ffeexpr_tokens_[1]); /* Kill "NOT"/"TRUE"/"FALSE" - token. */ - - e = ffeexpr_expr_new_ (); - e->token = ffeexpr_tokens_[0]; - - switch (ffeexpr_current_dotdot_) - { - case FFESTR_otherNOT: - e->type = FFEEXPR_exprtypeUNARY_; - e->u.operator.op = FFEEXPR_operatorNOT_; - e->u.operator.prec = FFEEXPR_operatorprecedenceNOT_; - e->u.operator.as = FFEEXPR_operatorassociativityNOT_; - ffeexpr_exprstack_push_unary_ (e); - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_token_rhs_ (t); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFESTR_otherTRUE: - e->type = FFEEXPR_exprtypeOPERAND_; - e->u.operand - = ffebld_new_conter (ffebld_constant_new_logicaldefault (TRUE)); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICALDEFAULT, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, FFETARGET_charactersizeNONE)); - ffeexpr_exprstack_push_operand_ (e); - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_token_binary_ (t); - return (ffelexHandler) ffeexpr_token_binary_; - - case FFESTR_otherFALSE: - e->type = FFEEXPR_exprtypeOPERAND_; - e->u.operand - = ffebld_new_conter (ffebld_constant_new_logicaldefault (FALSE)); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeLOGICAL, FFEINFO_kindtypeLOGICALDEFAULT, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, FFETARGET_charactersizeNONE)); - ffeexpr_exprstack_push_operand_ (e); - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_token_binary_ (t); - return (ffelexHandler) ffeexpr_token_binary_; - - default: - assert ("Bad unary dotdot in ffeexpr_current_dotdot_" == NULL); - exit (0); - return NULL; - } -} - -/* ffeexpr_token_swallow_period_ -- Rhs PERIOD NAME(not NOT, TRUE, or FALSE) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - A diagnostic has already been issued; just swallow a period if there is - one, then continue with ffeexpr_token_rhs_. */ - -static ffelexHandler -ffeexpr_token_swallow_period_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_token_rhs_ (t); - - return (ffelexHandler) ffeexpr_token_rhs_; -} - -/* ffeexpr_token_real_ -- Rhs PERIOD NUMBER - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - After a period and a string of digits, check next token for possible - exponent designation (D, E, or Q as first/only character) and continue - real-number handling accordingly. Else form basic real constant, push - onto expression stack, and enter binary state using current token (which, - if it is a name not beginning with D, E, or Q, will certainly result - in an error, but that's not for this routine to deal with). */ - -static ffelexHandler -ffeexpr_token_real_ (ffelexToken t) -{ - char d; - const char *p; - - if (((ffelex_token_type (t) != FFELEX_typeNAME) - && (ffelex_token_type (t) != FFELEX_typeNAMES)) - || !(((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q'))) - && ffeexpr_isdigits_ (++p))) - { -#if 0 - /* This code has been removed because it seems inconsistent to - produce a diagnostic in this case, but not all of the other - ones that look for an exponent and cannot recognize one. */ - if (((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES)) - && ffest_ffebad_start (FFEBAD_INVALID_EXPONENT)) - { - char bad[2]; - - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - bad[0] = *(p - 1); - bad[1] = '\0'; - ffebad_string (bad); - ffebad_finish (); - } -#endif - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), NULL, - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - /* Just exponent character by itself? In which case, PLUS or MINUS must - surely be next, followed by a NUMBER token. */ - - if (*p == '\0') - { - ffeexpr_tokens_[2] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_real_exponent_; - } - - ffeexpr_make_float_const_ (d, NULL, ffeexpr_tokens_[0], ffeexpr_tokens_[1], - t, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_real_exponent_ -- Rhs PERIOD NUMBER NAME(D, E, or Q) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Ensures this token is PLUS or MINUS, preserves it, goes to final state - for real number (exponent digits). Else issues diagnostic, assumes a - zero exponent field for number, passes token on to binary state as if - previous token had been "E0" instead of "E", for example. */ - -static ffelexHandler -ffeexpr_token_real_exponent_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - { - if (ffest_ffebad_start (FFEBAD_MISSING_EXPONENT_VALUE)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[2]), - ffelex_token_where_column (ffeexpr_tokens_[2])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), NULL, - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - ffeexpr_tokens_[3] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_real_exp_sign_; -} - -/* ffeexpr_token_real_exp_sign_ -- Rhs PERIOD NUMBER NAME(D,E,Q) PLUS/MINUS - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Make sure token is a NUMBER, make a real constant out of all we have and - push it onto the expression stack. Else issue diagnostic and pretend - exponent field was a zero. */ - -static ffelexHandler -ffeexpr_token_real_exp_sign_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - { - if (ffest_ffebad_start (FFEBAD_MISSING_EXPONENT_VALUE)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[2]), - ffelex_token_where_column (ffeexpr_tokens_[2])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), NULL, - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[3]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - ffeexpr_make_float_const_ (ffelex_token_text (ffeexpr_tokens_[2])[0], NULL, - ffeexpr_tokens_[0], ffeexpr_tokens_[1], ffeexpr_tokens_[2], - ffeexpr_tokens_[3], t); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[3]); - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_number_ -- Rhs NUMBER - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - If the token is a period, we may have a floating-point number, or an - integer followed by a dotdot binary operator. If the token is a name - beginning with D, E, or Q, we definitely have a floating-point number. - If the token is a hollerith constant, that's what we've got, so push - it onto the expression stack and continue with the binary state. - - Otherwise, we have an integer followed by something the binary state - should be able to swallow. */ - -static ffelexHandler -ffeexpr_token_number_ (ffelexToken t) -{ - ffeexprExpr_ e; - ffeinfo ni; - char d; - const char *p; - - if (ffeexpr_hollerith_count_ > 0) - ffelex_set_expecting_hollerith (0, '\0', - ffewhere_line_unknown (), - ffewhere_column_unknown ()); - - /* See if we've got a floating-point number here. */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - if ((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q')) - && ffeexpr_isdigits_ (++p)) - { - - /* Just exponent character by itself? In which case, PLUS or MINUS - must surely be next, followed by a NUMBER token. */ - - if (*p == '\0') - { - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_number_exponent_; - } - ffeexpr_make_float_const_ (d, ffeexpr_tokens_[0], NULL, NULL, t, - NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_binary_; - } - break; - - case FFELEX_typePERIOD: - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_number_period_; - - case FFELEX_typeHOLLERITH: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - e->u.operand = ffebld_new_conter (ffebld_constant_new_hollerith (t)); - ni = ffeinfo_new (FFEINFO_basictypeHOLLERITH, FFEINFO_kindtypeNONE, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - ffelex_token_length (t)); - ffebld_set_info (e->u.operand, ni); - ffeexpr_exprstack_push_operand_ (e); - return (ffelexHandler) ffeexpr_token_binary_; - - default: - break; - } - - /* Nothing specific we were looking for, so make an integer and pass the - current token to the binary state. */ - - ffeexpr_make_float_const_ ('I', ffeexpr_tokens_[0], NULL, NULL, - NULL, NULL, NULL); - return (ffelexHandler) ffeexpr_token_binary_ (t); -} - -/* ffeexpr_token_number_exponent_ -- Rhs NUMBER NAME(D, E, or Q) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Ensures this token is PLUS or MINUS, preserves it, goes to final state - for real number (exponent digits). Else treats number as integer, passes - name to binary, passes current token to subsequent handler. */ - -static ffelexHandler -ffeexpr_token_number_exponent_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - { - ffeexprExpr_ e; - ffelexHandler nexthandler; - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - e->u.operand = ffebld_new_conter (ffebld_constant_new_integerdefault - (ffeexpr_tokens_[0])); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeINTEGER, FFEINFO_kindtypeINTEGERDEFAULT, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, FFETARGET_charactersizeNONE)); - ffeexpr_exprstack_push_operand_ (e); - nexthandler = (ffelexHandler) ffeexpr_token_binary_ (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) (*nexthandler) (t); - } - - ffeexpr_tokens_[2] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_number_exp_sign_; -} - -/* ffeexpr_token_number_exp_sign_ -- Rhs NUMBER NAME(D,E,Q) PLUS/MINUS - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Make sure token is a NUMBER, make a real constant out of all we have and - push it onto the expression stack. Else issue diagnostic and pretend - exponent field was a zero. */ - -static ffelexHandler -ffeexpr_token_number_exp_sign_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - { - if (ffest_ffebad_start (FFEBAD_MISSING_EXPONENT_VALUE)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[1]), - ffelex_token_where_column (ffeexpr_tokens_[1])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffeexpr_make_float_const_ (ffelex_token_text (ffeexpr_tokens_[1])[0], - ffeexpr_tokens_[0], NULL, NULL, - ffeexpr_tokens_[1], ffeexpr_tokens_[2], - NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - ffeexpr_make_float_const_ (ffelex_token_text (ffeexpr_tokens_[1])[0], - ffeexpr_tokens_[0], NULL, NULL, - ffeexpr_tokens_[1], ffeexpr_tokens_[2], t); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_number_period_ -- Rhs NUMBER PERIOD - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle a period detected following a number at rhs state. Must begin a - floating-point value (as in 1., 1.2, 1.E3, or 1.E+3) or a dot-dot name. */ - -static ffelexHandler -ffeexpr_token_number_period_ (ffelexToken t) -{ - ffeexprExpr_ e; - ffelexHandler nexthandler; - const char *p; - char d; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - if ((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q')) - && ffeexpr_isdigits_ (++p)) - { - - /* Just exponent character by itself? In which case, PLUS or MINUS - must surely be next, followed by a NUMBER token. */ - - if (*p == '\0') - { - ffeexpr_tokens_[2] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_number_per_exp_; - } - ffeexpr_make_float_const_ (d, ffeexpr_tokens_[0], - ffeexpr_tokens_[1], NULL, t, NULL, - NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) ffeexpr_token_binary_; - } - /* A name not representing an exponent, so assume it will be something - like EQ, make an integer from the number, pass the period to binary - state and the current token to the resulting state. */ - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - e->u.operand = ffebld_new_conter (ffebld_constant_new_integerdefault - (ffeexpr_tokens_[0])); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - ffeexpr_exprstack_push_operand_ (e); - nexthandler = (ffelexHandler) ffeexpr_token_binary_ - (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) (*nexthandler) (t); - - case FFELEX_typeNUMBER: - ffeexpr_tokens_[2] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_number_real_; - - default: - break; - } - - /* Nothing specific we were looking for, so make a real number and pass the - period and then the current token to the binary state. */ - - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - NULL, NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) ffeexpr_token_binary_ (t); -} - -/* ffeexpr_token_number_per_exp_ -- Rhs NUMBER PERIOD NAME(D, E, or Q) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Ensures this token is PLUS or MINUS, preserves it, goes to final state - for real number (exponent digits). Else treats number as real, passes - name to binary, passes current token to subsequent handler. */ - -static ffelexHandler -ffeexpr_token_number_per_exp_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - { - ffelexHandler nexthandler; - - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - NULL, NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - nexthandler = (ffelexHandler) ffeexpr_token_binary_ (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) (*nexthandler) (t); - } - - ffeexpr_tokens_[3] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_num_per_exp_sign_; -} - -/* ffeexpr_token_number_real_ -- Rhs NUMBER PERIOD NUMBER - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - After a number, period, and number, check next token for possible - exponent designation (D, E, or Q as first/only character) and continue - real-number handling accordingly. Else form basic real constant, push - onto expression stack, and enter binary state using current token (which, - if it is a name not beginning with D, E, or Q, will certainly result - in an error, but that's not for this routine to deal with). */ - -static ffelexHandler -ffeexpr_token_number_real_ (ffelexToken t) -{ - char d; - const char *p; - - if (((ffelex_token_type (t) != FFELEX_typeNAME) - && (ffelex_token_type (t) != FFELEX_typeNAMES)) - || !(((ffesrc_char_match_init ((d = *(p = ffelex_token_text (t))), - 'D', 'd') - || ffesrc_char_match_init (d, 'E', 'e') - || ffesrc_char_match_init (d, 'Q', 'q'))) - && ffeexpr_isdigits_ (++p))) - { -#if 0 - /* This code has been removed because it seems inconsistent to - produce a diagnostic in this case, but not all of the other - ones that look for an exponent and cannot recognize one. */ - if (((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES)) - && ffest_ffebad_start (FFEBAD_INVALID_EXPONENT)) - { - char bad[2]; - - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - bad[0] = *(p - 1); - bad[1] = '\0'; - ffebad_string (bad); - ffebad_finish (); - } -#endif - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - ffeexpr_tokens_[2], NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - /* Just exponent character by itself? In which case, PLUS or MINUS must - surely be next, followed by a NUMBER token. */ - - if (*p == '\0') - { - ffeexpr_tokens_[3] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_number_real_exp_; - } - - ffeexpr_make_float_const_ (d, ffeexpr_tokens_[0], ffeexpr_tokens_[1], - ffeexpr_tokens_[2], t, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_num_per_exp_sign_ -- Rhs NUMBER PERIOD NAME(D,E,Q) PLUS/MINUS - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Make sure token is a NUMBER, make a real constant out of all we have and - push it onto the expression stack. Else issue diagnostic and pretend - exponent field was a zero. */ - -static ffelexHandler -ffeexpr_token_num_per_exp_sign_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - { - if (ffest_ffebad_start (FFEBAD_MISSING_EXPONENT_VALUE)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[2]), - ffelex_token_where_column (ffeexpr_tokens_[2])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - NULL, NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[3]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - ffeexpr_make_float_const_ (ffelex_token_text (ffeexpr_tokens_[2])[0], - ffeexpr_tokens_[0], ffeexpr_tokens_[1], NULL, - ffeexpr_tokens_[2], ffeexpr_tokens_[3], t); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[3]); - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_number_real_exp_ -- Rhs NUMBER PERIOD NUMBER NAME(D, E, or Q) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Ensures this token is PLUS or MINUS, preserves it, goes to final state - for real number (exponent digits). Else issues diagnostic, assumes a - zero exponent field for number, passes token on to binary state as if - previous token had been "E0" instead of "E", for example. */ - -static ffelexHandler -ffeexpr_token_number_real_exp_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typePLUS) - && (ffelex_token_type (t) != FFELEX_typeMINUS)) - { - if (ffest_ffebad_start (FFEBAD_MISSING_EXPONENT_VALUE)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[3]), - ffelex_token_where_column (ffeexpr_tokens_[3])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - ffeexpr_tokens_[2], NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[3]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - ffeexpr_tokens_[4] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_num_real_exp_sn_; -} - -/* ffeexpr_token_num_real_exp_sn_ -- Rhs NUMBER PERIOD NUMBER NAME(D,E,Q) - PLUS/MINUS - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Make sure token is a NUMBER, make a real constant out of all we have and - push it onto the expression stack. Else issue diagnostic and pretend - exponent field was a zero. */ - -static ffelexHandler -ffeexpr_token_num_real_exp_sn_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - { - if (ffest_ffebad_start (FFEBAD_MISSING_EXPONENT_VALUE)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[3]), - ffelex_token_where_column (ffeexpr_tokens_[3])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffeexpr_make_float_const_ (ffesrc_char_internal_init ('E', 'e'), - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - ffeexpr_tokens_[2], NULL, NULL, NULL); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[3]); - ffelex_token_kill (ffeexpr_tokens_[4]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } - - ffeexpr_make_float_const_ (ffelex_token_text (ffeexpr_tokens_[3])[0], - ffeexpr_tokens_[0], ffeexpr_tokens_[1], - ffeexpr_tokens_[2], ffeexpr_tokens_[3], - ffeexpr_tokens_[4], t); - - ffelex_token_kill (ffeexpr_tokens_[0]); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - ffelex_token_kill (ffeexpr_tokens_[3]); - ffelex_token_kill (ffeexpr_tokens_[4]); - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_binary_ -- Handle binary operator possibility - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - The possibility of a binary operator is handled here, meaning the previous - token was an operand. */ - -static ffelexHandler -ffeexpr_token_binary_ (ffelexToken t) -{ - ffeexprExpr_ e; - - if (!ffeexpr_stack_->is_rhs) - return (ffelexHandler) ffeexpr_finished_ (t); /* For now. */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typePLUS: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorADD_; - e->u.operator.prec = FFEEXPR_operatorprecedenceADD_; - e->u.operator.as = FFEEXPR_operatorassociativityADD_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeMINUS: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorSUBTRACT_; - e->u.operator.prec = FFEEXPR_operatorprecedenceSUBTRACT_; - e->u.operator.as = FFEEXPR_operatorassociativitySUBTRACT_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeASTERISK: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATA: - return (ffelexHandler) ffeexpr_finished_ (t); - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorMULTIPLY_; - e->u.operator.prec = FFEEXPR_operatorprecedenceMULTIPLY_; - e->u.operator.as = FFEEXPR_operatorassociativityMULTIPLY_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeSLASH: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATA: - return (ffelexHandler) ffeexpr_finished_ (t); - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorDIVIDE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceDIVIDE_; - e->u.operator.as = FFEEXPR_operatorassociativityDIVIDE_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typePOWER: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorPOWER_; - e->u.operator.prec = FFEEXPR_operatorprecedencePOWER_; - e->u.operator.as = FFEEXPR_operatorassociativityPOWER_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeCONCAT: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorCONCATENATE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceCONCATENATE_; - e->u.operator.as = FFEEXPR_operatorassociativityCONCATENATE_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeOPEN_ANGLE: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFORMAT: - ffebad_start (FFEBAD_FORMAT_EXPR_TOKEN); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - break; - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorLT_; - e->u.operator.prec = FFEEXPR_operatorprecedenceLT_; - e->u.operator.as = FFEEXPR_operatorassociativityLT_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeCLOSE_ANGLE: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFORMAT: - return ffeexpr_finished_ (t); - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorGT_; - e->u.operator.prec = FFEEXPR_operatorprecedenceGT_; - e->u.operator.as = FFEEXPR_operatorassociativityGT_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeREL_EQ: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFORMAT: - ffebad_start (FFEBAD_FORMAT_EXPR_TOKEN); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - break; - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorEQ_; - e->u.operator.prec = FFEEXPR_operatorprecedenceEQ_; - e->u.operator.as = FFEEXPR_operatorassociativityEQ_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeREL_NE: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFORMAT: - ffebad_start (FFEBAD_FORMAT_EXPR_TOKEN); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - break; - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorNE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceNE_; - e->u.operator.as = FFEEXPR_operatorassociativityNE_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeREL_LE: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFORMAT: - ffebad_start (FFEBAD_FORMAT_EXPR_TOKEN); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - break; - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorLE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceLE_; - e->u.operator.as = FFEEXPR_operatorassociativityLE_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typeREL_GE: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextFORMAT: - ffebad_start (FFEBAD_FORMAT_EXPR_TOKEN); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - break; - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorGE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceGE_; - e->u.operator.as = FFEEXPR_operatorassociativityGE_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_; - - case FFELEX_typePERIOD: - ffeexpr_tokens_[0] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_binary_period_; - -#if 0 - case FFELEX_typeOPEN_PAREN: - case FFELEX_typeCLOSE_PAREN: - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeNAME: - case FFELEX_typeNAMES: -#endif - default: - return (ffelexHandler) ffeexpr_finished_ (t); - } -} - -/* ffeexpr_token_binary_period_ -- Binary PERIOD - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle a period detected at binary (expecting binary op or end) state. - Must begin a dot-dot name, of which .NOT., .TRUE., and .FALSE. are not - valid. */ - -static ffelexHandler -ffeexpr_token_binary_period_ (ffelexToken t) -{ - ffeexprExpr_ operand; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_current_dotdot_ = ffestr_other (t); - switch (ffeexpr_current_dotdot_) - { - case FFESTR_otherTRUE: - case FFESTR_otherFALSE: - case FFESTR_otherNOT: - if (ffest_ffebad_start (FFEBAD_MISSING_BINARY_OPERATOR)) - { - operand = ffeexpr_stack_->exprstack; - assert (operand != NULL); - assert (operand->type == FFEEXPR_exprtypeOPERAND_); - ffebad_here (0, ffelex_token_where_line (operand->token), ffelex_token_where_column (operand->token)); - ffebad_here (1, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_binary_sw_per_; - - default: - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_binary_end_per_; - } - break; /* Nothing really reaches here. */ - - default: - if (ffest_ffebad_start (FFEBAD_IGNORING_PERIOD)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_binary_ (t); - } -} - -/* ffeexpr_token_binary_end_per_ -- Binary PERIOD NAME(not NOT, TRUE, or FALSE) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Expecting a period to close a dot-dot at binary (binary op - or operator) state. If period isn't found, issue a diagnostic but - pretend we saw one. ffeexpr_current_dotdot_ must already contained the - dotdot representation of the name in between the two PERIOD tokens. */ - -static ffelexHandler -ffeexpr_token_binary_end_per_ (ffelexToken t) -{ - ffeexprExpr_ e; - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffeexpr_tokens_[0]; - - switch (ffeexpr_current_dotdot_) - { - case FFESTR_otherAND: - e->u.operator.op = FFEEXPR_operatorAND_; - e->u.operator.prec = FFEEXPR_operatorprecedenceAND_; - e->u.operator.as = FFEEXPR_operatorassociativityAND_; - break; - - case FFESTR_otherOR: - e->u.operator.op = FFEEXPR_operatorOR_; - e->u.operator.prec = FFEEXPR_operatorprecedenceOR_; - e->u.operator.as = FFEEXPR_operatorassociativityOR_; - break; - - case FFESTR_otherXOR: - e->u.operator.op = FFEEXPR_operatorXOR_; - e->u.operator.prec = FFEEXPR_operatorprecedenceXOR_; - e->u.operator.as = FFEEXPR_operatorassociativityXOR_; - break; - - case FFESTR_otherEQV: - e->u.operator.op = FFEEXPR_operatorEQV_; - e->u.operator.prec = FFEEXPR_operatorprecedenceEQV_; - e->u.operator.as = FFEEXPR_operatorassociativityEQV_; - break; - - case FFESTR_otherNEQV: - e->u.operator.op = FFEEXPR_operatorNEQV_; - e->u.operator.prec = FFEEXPR_operatorprecedenceNEQV_; - e->u.operator.as = FFEEXPR_operatorassociativityNEQV_; - break; - - case FFESTR_otherLT: - e->u.operator.op = FFEEXPR_operatorLT_; - e->u.operator.prec = FFEEXPR_operatorprecedenceLT_; - e->u.operator.as = FFEEXPR_operatorassociativityLT_; - break; - - case FFESTR_otherLE: - e->u.operator.op = FFEEXPR_operatorLE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceLE_; - e->u.operator.as = FFEEXPR_operatorassociativityLE_; - break; - - case FFESTR_otherEQ: - e->u.operator.op = FFEEXPR_operatorEQ_; - e->u.operator.prec = FFEEXPR_operatorprecedenceEQ_; - e->u.operator.as = FFEEXPR_operatorassociativityEQ_; - break; - - case FFESTR_otherNE: - e->u.operator.op = FFEEXPR_operatorNE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceNE_; - e->u.operator.as = FFEEXPR_operatorassociativityNE_; - break; - - case FFESTR_otherGT: - e->u.operator.op = FFEEXPR_operatorGT_; - e->u.operator.prec = FFEEXPR_operatorprecedenceGT_; - e->u.operator.as = FFEEXPR_operatorassociativityGT_; - break; - - case FFESTR_otherGE: - e->u.operator.op = FFEEXPR_operatorGE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceGE_; - e->u.operator.as = FFEEXPR_operatorassociativityGE_; - break; - - default: - if (ffest_ffebad_start (FFEBAD_INVALID_DOTDOT)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_string (ffelex_token_text (ffeexpr_tokens_[1])); - ffebad_finish (); - } - e->u.operator.op = FFEEXPR_operatorEQ_; - e->u.operator.prec = FFEEXPR_operatorprecedenceEQ_; - e->u.operator.as = FFEEXPR_operatorassociativityEQ_; - break; - } - - ffeexpr_exprstack_push_binary_ (e); - - if (ffelex_token_type (t) != FFELEX_typePERIOD) - { - if (ffest_ffebad_start (FFEBAD_INSERTING_PERIOD)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (ffelex_token_text (ffeexpr_tokens_[1])); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[1]); /* Kill dot-dot token. */ - return (ffelexHandler) ffeexpr_token_rhs_ (t); - } - - ffelex_token_kill (ffeexpr_tokens_[1]); /* Kill dot-dot token. */ - return (ffelexHandler) ffeexpr_token_rhs_; -} - -/* ffeexpr_token_binary_sw_per_ -- Rhs PERIOD NAME(NOT, TRUE, or FALSE) - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - A diagnostic has already been issued; just swallow a period if there is - one, then continue with ffeexpr_token_binary_. */ - -static ffelexHandler -ffeexpr_token_binary_sw_per_ (ffelexToken t) -{ - if (ffelex_token_type (t) != FFELEX_typePERIOD) - return (ffelexHandler) ffeexpr_token_binary_ (t); - - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_quote_ -- Rhs QUOTE - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Expecting a NUMBER that we'll treat as an octal integer. */ - -static ffelexHandler -ffeexpr_token_quote_ (ffelexToken t) -{ - ffeexprExpr_ e; - ffebld anyexpr; - - if (ffelex_token_type (t) != FFELEX_typeNUMBER) - { - if (ffest_ffebad_start (FFEBAD_QUOTE_MISSES_DIGITS)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_rhs_ (t); - } - - /* This is kind of a kludge to prevent any whining about magical numbers - that start out as these octal integers, so "20000000000 (on a 32-bit - 2's-complement machine) by itself won't produce an error. */ - - anyexpr = ffebld_new_any (); - ffebld_set_info (anyexpr, ffeinfo_new_any ()); - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - e->u.operand = ffebld_new_conter_with_orig - (ffebld_constant_new_integeroctal (t), anyexpr); - ffebld_set_info (e->u.operand, ffeinfo_new (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, FFETARGET_charactersizeNONE)); - ffeexpr_exprstack_push_operand_ (e); - return (ffelexHandler) ffeexpr_token_binary_; -} - -/* ffeexpr_token_apostrophe_ -- Rhs APOSTROPHE - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle an open-apostrophe, which begins either a character ('char-const'), - typeless octal ('octal-const'O), or typeless hexadecimal ('hex-const'Z or - 'hex-const'X) constant. */ - -static ffelexHandler -ffeexpr_token_apostrophe_ (ffelexToken t) -{ - assert (ffelex_token_type (t) == FFELEX_typeCHARACTER); - if (ffe_is_pedantic_not_90 () && (ffelex_token_length (t) == 0)) - { - ffebad_start (FFEBAD_NULL_CHAR_CONST); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_apos_char_; -} - -/* ffeexpr_token_apos_char_ -- Rhs APOSTROPHE CHARACTER - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Close-apostrophe is implicit; if this token is NAME, it is a possible - typeless-constant radix specifier. */ - -static ffelexHandler -ffeexpr_token_apos_char_ (ffelexToken t) -{ - ffeexprExpr_ e; - ffeinfo ni; - char c; - ffetargetCharacterSize size; - - if ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES)) - { - if ((ffelex_token_length (t) == 1) - && (ffesrc_char_match_init ((c = ffelex_token_text (t)[0]), 'B', - 'b') - || ffesrc_char_match_init (c, 'O', 'o') - || ffesrc_char_match_init (c, 'X', 'x') - || ffesrc_char_match_init (c, 'Z', 'z'))) - { - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - switch (c) - { - case FFESRC_CASE_MATCH_INIT ('B', 'b', match_b, no_match): - e->u.operand = ffebld_new_conter - (ffebld_constant_new_typeless_bv (ffeexpr_tokens_[1])); - size = ffetarget_size_typeless_binary (ffeexpr_tokens_[1]); - break; - - case FFESRC_CASE_MATCH_INIT ('O', 'o', match_o, no_match): - e->u.operand = ffebld_new_conter - (ffebld_constant_new_typeless_ov (ffeexpr_tokens_[1])); - size = ffetarget_size_typeless_octal (ffeexpr_tokens_[1]); - break; - - case FFESRC_CASE_MATCH_INIT ('X', 'x', match_x, no_match): - e->u.operand = ffebld_new_conter - (ffebld_constant_new_typeless_hxv (ffeexpr_tokens_[1])); - size = ffetarget_size_typeless_hex (ffeexpr_tokens_[1]); - break; - - case FFESRC_CASE_MATCH_INIT ('Z', 'z', match_z, no_match): - e->u.operand = ffebld_new_conter - (ffebld_constant_new_typeless_hzv (ffeexpr_tokens_[1])); - size = ffetarget_size_typeless_hex (ffeexpr_tokens_[1]); - break; - - default: - no_match: /* :::::::::::::::::::: */ - assert ("not BOXZ!" == NULL); - size = 0; - break; - } - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeTYPELESS, FFEINFO_kindtypeNONE, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, size)); - ffeexpr_exprstack_push_operand_ (e); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) ffeexpr_token_binary_; - } - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - e->u.operand = ffebld_new_conter (ffebld_constant_new_characterdefault - (ffeexpr_tokens_[1])); - ni = ffeinfo_new (FFEINFO_basictypeCHARACTER, FFEINFO_kindtypeCHARACTERDEFAULT, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - ffelex_token_length (ffeexpr_tokens_[1])); - ffebld_set_info (e->u.operand, ni); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffeexpr_exprstack_push_operand_ (e); - if ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES)) - { - if (ffest_ffebad_start (FFEBAD_INVALID_RADIX_SPECIFIER)) - { - ffebad_string (ffelex_token_text (t)); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_finish (); - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeBINARY_; - e->token = ffelex_token_use (t); - e->u.operator.op = FFEEXPR_operatorCONCATENATE_; - e->u.operator.prec = FFEEXPR_operatorprecedenceCONCATENATE_; - e->u.operator.as = FFEEXPR_operatorassociativityCONCATENATE_; - ffeexpr_exprstack_push_binary_ (e); - return (ffelexHandler) ffeexpr_token_rhs_ (t); - } - ffeexpr_is_substr_ok_ = !ffe_is_pedantic_not_90 (); /* Allow "'hello'(3:5)". */ - return (ffelexHandler) ffeexpr_token_substrp_ (t); -} - -/* ffeexpr_token_name_lhs_ -- Lhs NAME - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle a name followed by open-paren, period (RECORD.MEMBER), percent - (RECORD%MEMBER), or nothing at all. */ - -static ffelexHandler -ffeexpr_token_name_lhs_ (ffelexToken t) -{ - ffeexprExpr_ e; - ffeexprParenType_ paren_type; - ffesymbol s; - ffebld expr; - ffeinfo info; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextASSIGN: - case FFEEXPR_contextAGOTO: - case FFEEXPR_contextFILEUNIT_DF: - goto just_name; /* :::::::::::::::::::: */ - - default: - break; - } - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffelex_token_use (ffeexpr_tokens_[0]); - s = ffeexpr_declare_parenthesized_ (ffeexpr_tokens_[0], FALSE, - &paren_type); - - switch (ffesymbol_where (s)) - { - case FFEINFO_whereLOCAL: - if (ffeexpr_stack_->context == FFEEXPR_contextSUBROUTINEREF) - ffesymbol_error (s, ffeexpr_tokens_[0]); /* Recursion. */ - break; - - case FFEINFO_whereINTRINSIC: - case FFEINFO_whereGLOBAL: - if (ffeexpr_stack_->context != FFEEXPR_contextSUBROUTINEREF) - ffesymbol_error (s, ffeexpr_tokens_[0]); /* Can call intrin. */ - break; - - case FFEINFO_whereCOMMON: - case FFEINFO_whereDUMMY: - case FFEINFO_whereRESULT: - break; - - case FFEINFO_whereNONE: - case FFEINFO_whereANY: - break; - - default: - ffesymbol_error (s, ffeexpr_tokens_[0]); - break; - } - - if (ffesymbol_attrs (s) & FFESYMBOL_attrsANY) - { - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - } - else - { - e->u.operand = ffebld_new_symter (s, - ffesymbol_generic (s), - ffesymbol_specific (s), - ffesymbol_implementation (s)); - ffebld_set_info (e->u.operand, ffesymbol_info (s)); - } - ffeexpr_exprstack_push_ (e); /* Not a complete operand yet. */ - ffeexpr_stack_->tokens[0] = ffeexpr_tokens_[0]; - switch (paren_type) - { - case FFEEXPR_parentypeSUBROUTINE_: - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextACTUALARG_, - ffeexpr_token_arguments_); - - case FFEEXPR_parentypeARRAY_: - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - ffeexpr_stack_->bound_list = ffesymbol_dims (s); - ffeexpr_stack_->rank = 0; - ffeexpr_stack_->constant = TRUE; - ffeexpr_stack_->immediate = TRUE; - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextDATAIMPDOITEM_: - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextDATAIMPDOINDEX_, - ffeexpr_token_elements_); - - case FFEEXPR_contextEQUIVALENCE: - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextEQVINDEX_, - ffeexpr_token_elements_); - - default: - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextINDEX_, - ffeexpr_token_elements_); - } - - case FFEEXPR_parentypeSUBSTRING_: - e->u.operand = ffeexpr_collapse_symter (e->u.operand, - ffeexpr_tokens_[0]); - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextINDEX_, - ffeexpr_token_substring_); - - case FFEEXPR_parentypeEQUIVALENCE_: - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - ffeexpr_stack_->bound_list = ffesymbol_dims (s); - ffeexpr_stack_->rank = 0; - ffeexpr_stack_->constant = TRUE; - ffeexpr_stack_->immediate = TRUE; - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextEQVINDEX_, - ffeexpr_token_equivalence_); - - case FFEEXPR_parentypeFUNCTION_: /* Invalid case. */ - case FFEEXPR_parentypeFUNSUBSTR_: /* Invalid case. */ - ffesymbol_error (s, ffeexpr_tokens_[0]); - /* Fall through. */ - case FFEEXPR_parentypeANY_: - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextACTUALARG_, - ffeexpr_token_anything_); - - default: - assert ("bad paren type" == NULL); - break; - } - - case FFELEX_typeEQUALS: /* As in "VAR=". */ - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextIMPDOITEM_: /* within - "(,VAR=start,end[,incr])". */ - case FFEEXPR_contextIMPDOITEMDF_: - ffeexpr_stack_->context = FFEEXPR_contextIMPDOCTRL_; - break; - - case FFEEXPR_contextDATAIMPDOITEM_: - ffeexpr_stack_->context = FFEEXPR_contextDATAIMPDOCTRL_; - break; - - default: - break; - } - break; - -#if 0 - case FFELEX_typePERIOD: - case FFELEX_typePERCENT: - assert ("FOO%, FOO. not yet supported!~~" == NULL); - break; -#endif - - default: - break; - } - -just_name: /* :::::::::::::::::::: */ - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - s = ffeexpr_declare_unadorned_ (ffeexpr_tokens_[0], - (ffeexpr_stack_->context - == FFEEXPR_contextSUBROUTINEREF)); - - switch (ffesymbol_where (s)) - { - case FFEINFO_whereCONSTANT: - if ((ffeexpr_stack_->context != FFEEXPR_contextPARAMETER) - || (ffesymbol_kind (s) != FFEINFO_kindENTITY)) - ffesymbol_error (s, ffeexpr_tokens_[0]); - break; - - case FFEINFO_whereIMMEDIATE: - if ((ffeexpr_stack_->context != FFEEXPR_contextDATAIMPDOCTRL_) - && (ffeexpr_stack_->context != FFEEXPR_contextDATAIMPDOINDEX_)) - ffesymbol_error (s, ffeexpr_tokens_[0]); - break; - - case FFEINFO_whereLOCAL: - if (ffeexpr_stack_->context == FFEEXPR_contextSUBROUTINEREF) - ffesymbol_error (s, ffeexpr_tokens_[0]); /* Recurse!. */ - break; - - case FFEINFO_whereINTRINSIC: - if (ffeexpr_stack_->context != FFEEXPR_contextSUBROUTINEREF) - ffesymbol_error (s, ffeexpr_tokens_[0]); /* Can call intrin. */ - break; - - default: - break; - } - - if (ffesymbol_attrs (s) & FFESYMBOL_attrsANY) - { - expr = ffebld_new_any (); - info = ffeinfo_new_any (); - ffebld_set_info (expr, info); - } - else - { - expr = ffebld_new_symter (s, - ffesymbol_generic (s), - ffesymbol_specific (s), - ffesymbol_implementation (s)); - info = ffesymbol_info (s); - ffebld_set_info (expr, info); - if (ffesymbol_is_doiter (s)) - { - ffebad_start (FFEBAD_DOITER); - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffest_ffebad_here_doiter (1, s); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - } - expr = ffeexpr_collapse_symter (expr, ffeexpr_tokens_[0]); - } - - if (ffeexpr_stack_->context == FFEEXPR_contextSUBROUTINEREF) - { - if (ffebld_op (expr) == FFEBLD_opANY) - { - expr = ffebld_new_any (); - ffebld_set_info (expr, ffeinfo_new_any ()); - } - else - { - expr = ffebld_new_subrref (expr, NULL); /* No argument list. */ - if (ffesymbol_generic (s) != FFEINTRIN_genNONE) - ffeintrin_fulfill_generic (&expr, &info, e->token); - else if (ffesymbol_specific (s) != FFEINTRIN_specNONE) - ffeintrin_fulfill_specific (&expr, &info, NULL, e->token); - else - ffeexpr_fulfill_call_ (&expr, e->token); - - if (ffebld_op (expr) != FFEBLD_opANY) - ffebld_set_info (expr, - ffeinfo_new (ffeinfo_basictype (info), - ffeinfo_kindtype (info), - 0, - FFEINFO_kindENTITY, - FFEINFO_whereFLEETING, - ffeinfo_size (info))); - else - ffebld_set_info (expr, ffeinfo_new_any ()); - } - } - - e->u.operand = expr; - ffeexpr_exprstack_push_operand_ (e); - return (ffelexHandler) ffeexpr_finished_ (t); -} - -/* ffeexpr_token_name_arg_ -- Rhs NAME - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle first token in an actual-arg (or possible actual-arg) context - being a NAME, and use second token to refine the context. */ - -static ffelexHandler -ffeexpr_token_name_arg_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - case FFELEX_typeCOMMA: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARG_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARG_; - break; - - default: - break; - } - break; - - default: - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextACTUALARGEXPR_; - break; - - case FFEEXPR_contextINDEXORACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextINDEXORACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - ffeexpr_stack_->context = FFEEXPR_contextSFUNCDEFACTUALARGEXPR_; - break; - - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - ffeexpr_stack_->context - = FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_; - break; - - default: - assert ("bad context in _name_arg_" == NULL); - break; - } - break; - } - - return (ffelexHandler) ffeexpr_token_name_rhs_ (t); -} - -/* ffeexpr_token_name_rhs_ -- Rhs NAME - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle a name followed by open-paren, apostrophe (O'octal-const', - Z'hex-const', or X'hex-const'), period (RECORD.MEMBER). - - 26-Nov-91 JCB 1.2 - When followed by apostrophe or quote, set lex hexnum flag on so - [0-9] as first char of next token seen as starting a potentially - hex number (NAME). - 04-Oct-91 JCB 1.1 - In case of intrinsic, decorate its SYMTER with the type info for - the specific intrinsic. */ - -static ffelexHandler -ffeexpr_token_name_rhs_ (ffelexToken t) -{ - ffeexprExpr_ e; - ffeexprParenType_ paren_type; - ffesymbol s; - bool sfdef; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeQUOTE: - case FFELEX_typeAPOSTROPHE: - ffeexpr_tokens_[1] = ffelex_token_use (t); - ffelex_set_hexnum (TRUE); - return (ffelexHandler) ffeexpr_token_name_apos_; - - case FFELEX_typeOPEN_PAREN: - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffelex_token_use (ffeexpr_tokens_[0]); - s = ffeexpr_declare_parenthesized_ (ffeexpr_tokens_[0], TRUE, - &paren_type); - if (ffesymbol_attrs (s) & FFESYMBOL_attrsANY) - e->u.operand = ffebld_new_any (); - else - e->u.operand = ffebld_new_symter (s, ffesymbol_generic (s), - ffesymbol_specific (s), - ffesymbol_implementation (s)); - ffeexpr_exprstack_push_ (e); /* Not a complete operand yet. */ - ffeexpr_stack_->tokens[0] = ffeexpr_tokens_[0]; - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - sfdef = TRUE; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - assert ("weird context!" == NULL); - sfdef = FALSE; - break; - - default: - sfdef = FALSE; - break; - } - switch (paren_type) - { - case FFEEXPR_parentypeFUNCTION_: - ffebld_set_info (e->u.operand, ffesymbol_info (s)); - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - if (ffesymbol_where (s) == FFEINFO_whereCONSTANT) - { /* A statement function. */ - ffeexpr_stack_->num_args - = ffebld_list_length - (ffeexpr_stack_->next_dummy - = ffesymbol_dummyargs (s)); - ffeexpr_stack_->tokens[1] = NULL; /* !=NULL when > num_args. */ - } - else if ((ffesymbol_where (s) == FFEINFO_whereINTRINSIC) - && !ffe_is_pedantic_not_90 () - && ((ffesymbol_implementation (s) - == FFEINTRIN_impICHAR) - || (ffesymbol_implementation (s) - == FFEINTRIN_impIACHAR) - || (ffesymbol_implementation (s) - == FFEINTRIN_impLEN))) - { /* Allow arbitrary concatenations. */ - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - sfdef - ? FFEEXPR_contextSFUNCDEF - : FFEEXPR_contextLET, - ffeexpr_token_arguments_); - } - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - sfdef - ? FFEEXPR_contextSFUNCDEFACTUALARG_ - : FFEEXPR_contextACTUALARG_, - ffeexpr_token_arguments_); - - case FFEEXPR_parentypeARRAY_: - ffebld_set_info (e->u.operand, - ffesymbol_info (ffebld_symter (e->u.operand))); - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - ffeexpr_stack_->bound_list = ffesymbol_dims (s); - ffeexpr_stack_->rank = 0; - ffeexpr_stack_->constant = TRUE; - ffeexpr_stack_->immediate = TRUE; - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - sfdef - ? FFEEXPR_contextSFUNCDEFINDEX_ - : FFEEXPR_contextINDEX_, - ffeexpr_token_elements_); - - case FFEEXPR_parentypeSUBSTRING_: - ffebld_set_info (e->u.operand, - ffesymbol_info (ffebld_symter (e->u.operand))); - e->u.operand = ffeexpr_collapse_symter (e->u.operand, - ffeexpr_tokens_[0]); - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - sfdef - ? FFEEXPR_contextSFUNCDEFINDEX_ - : FFEEXPR_contextINDEX_, - ffeexpr_token_substring_); - - case FFEEXPR_parentypeFUNSUBSTR_: - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - sfdef - ? FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_ - : FFEEXPR_contextINDEXORACTUALARG_, - ffeexpr_token_funsubstr_); - - case FFEEXPR_parentypeANY_: - ffebld_set_info (e->u.operand, ffesymbol_info (s)); - return - (ffelexHandler) - ffeexpr_rhs (ffeexpr_stack_->pool, - sfdef - ? FFEEXPR_contextSFUNCDEFACTUALARG_ - : FFEEXPR_contextACTUALARG_, - ffeexpr_token_anything_); - - default: - assert ("bad paren type" == NULL); - break; - } - - case FFELEX_typeEQUALS: /* As in "VAR=". */ - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextIMPDOITEM_: /* "(,VAR=start,end[,incr])". */ - case FFEEXPR_contextIMPDOITEMDF_: - ffeexpr_stack_->is_rhs = FALSE; /* Really an lhs construct. */ - ffeexpr_stack_->context = FFEEXPR_contextIMPDOCTRL_; - break; - - default: - break; - } - break; - -#if 0 - case FFELEX_typePERIOD: - case FFELEX_typePERCENT: - ~~Support these two someday, though not required - assert ("FOO%, FOO. not yet supported!~~" == NULL); - break; -#endif - - default: - break; - } - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextINDEXORACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - assert ("strange context" == NULL); - break; - - default: - break; - } - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - s = ffeexpr_declare_unadorned_ (ffeexpr_tokens_[0], FALSE); - if (ffesymbol_attrs (s) & FFESYMBOL_attrsANY) - { - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - } - else - { - e->u.operand = ffebld_new_symter (s, FFEINTRIN_genNONE, - ffesymbol_specific (s), - ffesymbol_implementation (s)); - if (ffesymbol_specific (s) == FFEINTRIN_specNONE) - ffebld_set_info (e->u.operand, ffeinfo_use (ffesymbol_info (s))); - else - { /* Decorate the SYMTER with the actual type - of the intrinsic. */ - ffebld_set_info (e->u.operand, ffeinfo_new - (ffeintrin_basictype (ffesymbol_specific (s)), - ffeintrin_kindtype (ffesymbol_specific (s)), - 0, - ffesymbol_kind (s), - ffesymbol_where (s), - FFETARGET_charactersizeNONE)); - } - if (ffesymbol_is_doiter (s)) - ffebld_symter_set_is_doiter (e->u.operand, TRUE); - e->u.operand = ffeexpr_collapse_symter (e->u.operand, - ffeexpr_tokens_[0]); - } - ffeexpr_exprstack_push_operand_ (e); - return (ffelexHandler) ffeexpr_token_binary_ (t); -} - -/* ffeexpr_token_name_apos_ -- Rhs NAME APOSTROPHE - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Expecting a NAME token, analyze the previous NAME token to see what kind, - if any, typeless constant we've got. - - 01-Sep-90 JCB 1.1 - Expect a NAME instead of CHARACTER in this situation. */ - -static ffelexHandler -ffeexpr_token_name_apos_ (ffelexToken t) -{ - ffeexprExpr_ e; - - ffelex_set_hexnum (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffeexpr_tokens_[2] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_name_apos_name_; - - default: - break; - } - - if (ffest_ffebad_start (FFEBAD_INVALID_RADIX_SPECIFIER)) - { - ffebad_string (ffelex_token_text (ffeexpr_tokens_[0])); - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_here (1, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffelex_token_kill (ffeexpr_tokens_[1]); - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - e->token = ffeexpr_tokens_[0]; - ffeexpr_exprstack_push_operand_ (e); - - return (ffelexHandler) ffeexpr_token_binary_ (t); -} - -/* ffeexpr_token_name_apos_name_ -- Rhs NAME APOSTROPHE NAME - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Expecting an APOSTROPHE token, analyze the previous NAME token to see - what kind, if any, typeless constant we've got. */ - -static ffelexHandler -ffeexpr_token_name_apos_name_ (ffelexToken t) -{ - ffeexprExpr_ e; - char c; - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - e->token = ffeexpr_tokens_[0]; - - if ((ffelex_token_type (t) == ffelex_token_type (ffeexpr_tokens_[1])) - && (ffelex_token_length (ffeexpr_tokens_[0]) == 1) - && (ffesrc_char_match_init ((c = ffelex_token_text (ffeexpr_tokens_[0])[0]), - 'B', 'b') - || ffesrc_char_match_init (c, 'O', 'o') - || ffesrc_char_match_init (c, 'X', 'x') - || ffesrc_char_match_init (c, 'Z', 'z'))) - { - ffetargetCharacterSize size; - - if (!ffe_is_typeless_boz ()) { - - switch (c) - { - case FFESRC_CASE_MATCH_INIT ('B', 'b', imatch_b, no_imatch): - e->u.operand = ffebld_new_conter (ffebld_constant_new_integerbinary - (ffeexpr_tokens_[2])); - break; - - case FFESRC_CASE_MATCH_INIT ('O', 'o', imatch_o, no_imatch): - e->u.operand = ffebld_new_conter (ffebld_constant_new_integeroctal - (ffeexpr_tokens_[2])); - break; - - case FFESRC_CASE_MATCH_INIT ('X', 'x', imatch_x, no_imatch): - e->u.operand = ffebld_new_conter (ffebld_constant_new_integerhex - (ffeexpr_tokens_[2])); - break; - - case FFESRC_CASE_MATCH_INIT ('Z', 'z', imatch_z, no_imatch): - e->u.operand = ffebld_new_conter (ffebld_constant_new_integerhex - (ffeexpr_tokens_[2])); - break; - - default: - no_imatch: /* :::::::::::::::::::: */ - assert ("not BOXZ!" == NULL); - abort (); - } - - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - ffeexpr_exprstack_push_operand_ (e); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) ffeexpr_token_binary_; - } - - switch (c) - { - case FFESRC_CASE_MATCH_INIT ('B', 'b', match_b, no_match): - e->u.operand = ffebld_new_conter (ffebld_constant_new_typeless_bm - (ffeexpr_tokens_[2])); - size = ffetarget_size_typeless_binary (ffeexpr_tokens_[2]); - break; - - case FFESRC_CASE_MATCH_INIT ('O', 'o', match_o, no_match): - e->u.operand = ffebld_new_conter (ffebld_constant_new_typeless_om - (ffeexpr_tokens_[2])); - size = ffetarget_size_typeless_octal (ffeexpr_tokens_[2]); - break; - - case FFESRC_CASE_MATCH_INIT ('X', 'x', match_x, no_match): - e->u.operand = ffebld_new_conter (ffebld_constant_new_typeless_hxm - (ffeexpr_tokens_[2])); - size = ffetarget_size_typeless_hex (ffeexpr_tokens_[2]); - break; - - case FFESRC_CASE_MATCH_INIT ('Z', 'z', match_z, no_match): - e->u.operand = ffebld_new_conter (ffebld_constant_new_typeless_hzm - (ffeexpr_tokens_[2])); - size = ffetarget_size_typeless_hex (ffeexpr_tokens_[2]); - break; - - default: - no_match: /* :::::::::::::::::::: */ - assert ("not BOXZ!" == NULL); - e->u.operand = ffebld_new_conter (ffebld_constant_new_typeless_hzm - (ffeexpr_tokens_[2])); - size = ffetarget_size_typeless_hex (ffeexpr_tokens_[2]); - break; - } - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeTYPELESS, FFEINFO_kindtypeNONE, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, size)); - ffeexpr_exprstack_push_operand_ (e); - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - return (ffelexHandler) ffeexpr_token_binary_; - } - - if (ffest_ffebad_start (FFEBAD_INVALID_RADIX_SPECIFIER)) - { - ffebad_string (ffelex_token_text (ffeexpr_tokens_[0])); - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - ffelex_token_kill (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[2]); - - e->type = FFEEXPR_exprtypeOPERAND_; - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - e->token = ffeexpr_tokens_[0]; - ffeexpr_exprstack_push_operand_ (e); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeQUOTE: - return (ffelexHandler) ffeexpr_token_binary_; - - default: - return (ffelexHandler) ffeexpr_token_binary_ (t); - } -} - -/* ffeexpr_token_percent_ -- Rhs PERCENT - - Handle a percent sign possibly followed by "LOC". If followed instead - by "VAL", "REF", or "DESCR", issue an error message and substitute - "LOC". If followed by something else, treat the percent sign as a - spurious incorrect token and reprocess the token via _rhs_. */ - -static ffelexHandler -ffeexpr_token_percent_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffeexpr_stack_->percent = ffeexpr_percent_ (t); - ffeexpr_tokens_[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_token_percent_name_; - - default: - if (ffest_ffebad_start (FFEBAD_INVALID_TOKEN_IN_EXPRESSION)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - return (ffelexHandler) ffeexpr_token_rhs_ (t); - } -} - -/* ffeexpr_token_percent_name_ -- Rhs PERCENT NAME - - Make sure the token is OPEN_PAREN and prepare for the one-item list of - LHS expressions. Else display an error message. */ - -static ffelexHandler -ffeexpr_token_percent_name_ (ffelexToken t) -{ - ffelexHandler nexthandler; - - if (ffelex_token_type (t) != FFELEX_typeOPEN_PAREN) - { - if (ffest_ffebad_start (FFEBAD_INVALID_TOKEN_IN_EXPRESSION)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->first_token), - ffelex_token_where_column (ffeexpr_stack_->first_token)); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_tokens_[0]); - nexthandler = (ffelexHandler) ffeexpr_token_rhs_ (ffeexpr_tokens_[1]); - ffelex_token_kill (ffeexpr_tokens_[1]); - return (ffelexHandler) (*nexthandler) (t); - } - - switch (ffeexpr_stack_->percent) - { - default: - if (ffest_ffebad_start (FFEBAD_INVALID_PERCENT)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_tokens_[0]), - ffelex_token_where_column (ffeexpr_tokens_[0])); - ffebad_string (ffelex_token_text (ffeexpr_tokens_[1])); - ffebad_finish (); - } - ffeexpr_stack_->percent = FFEEXPR_percentLOC_; - /* Fall through. */ - case FFEEXPR_percentLOC_: - ffeexpr_stack_->tokens[0] = ffeexpr_tokens_[0]; - ffelex_token_kill (ffeexpr_tokens_[1]); - ffeexpr_stack_->tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextLOC_, - ffeexpr_cb_end_loc_); - } -} - -/* ffeexpr_make_float_const_ -- Make a floating-point constant - - See prototype. - - Pass 'E', 'D', or 'Q' for exponent letter. */ - -static void -ffeexpr_make_float_const_ (char exp_letter, ffelexToken integer, - ffelexToken decimal, ffelexToken fraction, - ffelexToken exponent, ffelexToken exponent_sign, - ffelexToken exponent_digits) -{ - ffeexprExpr_ e; - - e = ffeexpr_expr_new_ (); - e->type = FFEEXPR_exprtypeOPERAND_; - if (integer != NULL) - e->token = ffelex_token_use (integer); - else - { - assert (decimal != NULL); - e->token = ffelex_token_use (decimal); - } - - switch (exp_letter) - { -#if !FFETARGET_okREALQUAD - case FFESRC_CASE_MATCH_INIT ('Q', 'q', match_q, no_match): - if (ffebad_start (FFEBAD_QUAD_UNSUPPORTED)) - { - ffebad_here (0, ffelex_token_where_line (e->token), - ffelex_token_where_column (e->token)); - ffebad_finish (); - } - goto match_d; /* The FFESRC_CASE_* macros don't - allow fall-through! */ -#endif - - case FFESRC_CASE_MATCH_INIT ('D', 'd', match_d, no_match): - e->u.operand = ffebld_new_conter (ffebld_constant_new_realdouble - (integer, decimal, fraction, exponent, exponent_sign, exponent_digits)); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeREAL, FFEINFO_kindtypeREALDOUBLE, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, FFETARGET_charactersizeNONE)); - break; - - case FFESRC_CASE_MATCH_INIT ('E', 'e', match_e, no_match): - e->u.operand = ffebld_new_conter (ffebld_constant_new_realdefault - (integer, decimal, fraction, exponent, exponent_sign, exponent_digits)); - ffebld_set_info (e->u.operand, ffeinfo_new (FFEINFO_basictypeREAL, - FFEINFO_kindtypeREALDEFAULT, 0, FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, FFETARGET_charactersizeNONE)); - break; - -#if FFETARGET_okREALQUAD - case FFESRC_CASE_MATCH_INIT ('Q', 'q', match_q, no_match): - e->u.operand = ffebld_new_conter (ffebld_constant_new_realquad - (integer, decimal, fraction, exponent, exponent_sign, exponent_digits)); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeREAL, FFEINFO_kindtypeREALQUAD, - 0, FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, FFETARGET_charactersizeNONE)); - break; -#endif - - case 'I': /* Make an integer. */ - e->u.operand = ffebld_new_conter (ffebld_constant_new_integerdefault - (ffeexpr_tokens_[0])); - ffebld_set_info (e->u.operand, - ffeinfo_new (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, - FFEINFO_kindENTITY, FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - break; - - default: - no_match: /* :::::::::::::::::::: */ - assert ("Lost the exponent letter!" == NULL); - } - - ffeexpr_exprstack_push_operand_ (e); -} - -/* Just like ffesymbol_declare_local, except performs any implicit info - assignment necessary. */ - -static ffesymbol -ffeexpr_declare_unadorned_ (ffelexToken t, bool maybe_intrin) -{ - ffesymbol s; - ffeinfoKind k; - bool bad; - - s = ffesymbol_declare_local (t, maybe_intrin); - - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - /* Special-case these since they can involve a different concept - of "state" (in the stmtfunc name space). */ - { - case FFEEXPR_contextDATAIMPDOINDEX_: - case FFEEXPR_contextDATAIMPDOCTRL_: - if (ffeexpr_context_outer_ (ffeexpr_stack_) - == FFEEXPR_contextDATAIMPDOINDEX_) - s = ffeexpr_sym_impdoitem_ (s, t); - else - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_sym_impdoitem_ (s, t); - else - s = ffeexpr_sym_lhs_impdoctrl_ (s, t); - bad = (ffesymbol_kind (s) != FFEINFO_kindENTITY) - || ((ffesymbol_where (s) != FFEINFO_whereCONSTANT) - && (ffesymbol_where (s) != FFEINFO_whereIMMEDIATE)); - if (bad && (ffesymbol_kind (s) != FFEINFO_kindANY)) - ffesymbol_error (s, t); - return s; - - default: - break; - } - - switch ((ffesymbol_sfdummyparent (s) == NULL) - ? ffesymbol_state (s) - : FFESYMBOL_stateUNDERSTOOD) - { - case FFESYMBOL_stateNONE: /* Before first exec, not seen in expr - context. */ - if (!ffest_seen_first_exec ()) - goto seen; /* :::::::::::::::::::: */ - /* Fall through. */ - case FFESYMBOL_stateUNCERTAIN: /* Unseen since first exec. */ - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextSUBROUTINEREF: - s = ffeexpr_sym_lhs_call_ (s, t); - break; - - case FFEEXPR_contextFILEEXTFUNC: - s = ffeexpr_sym_lhs_extfunc_ (s, t); - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - /* Fall through. */ - case FFEEXPR_contextACTUALARG_: - s = ffeexpr_sym_rhs_actualarg_ (s, t); - break; - - case FFEEXPR_contextDATA: - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_sym_rhs_let_ (s, t); - else - s = ffeexpr_sym_lhs_data_ (s, t); - break; - - case FFEEXPR_contextDATAIMPDOITEM_: - s = ffeexpr_sym_lhs_data_ (s, t); - break; - - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - /* Fall through. */ - case FFEEXPR_contextLET: - case FFEEXPR_contextPAREN_: - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - case FFEEXPR_contextASSIGN: - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextDO: - case FFEEXPR_contextDOWHILE: - case FFEEXPR_contextAGOTO: - case FFEEXPR_contextCGOTO: - case FFEEXPR_contextIF: - case FFEEXPR_contextARITHIF: - case FFEEXPR_contextFORMAT: - case FFEEXPR_contextSTOP: - case FFEEXPR_contextRETURN: - case FFEEXPR_contextSELECTCASE: - case FFEEXPR_contextCASE: - case FFEEXPR_contextFILEASSOC: - case FFEEXPR_contextFILEINT: - case FFEEXPR_contextFILEDFINT: - case FFEEXPR_contextFILELOG: - case FFEEXPR_contextFILENUM: - case FFEEXPR_contextFILENUMAMBIG: - case FFEEXPR_contextFILECHAR: - case FFEEXPR_contextFILENUMCHAR: - case FFEEXPR_contextFILEDFCHAR: - case FFEEXPR_contextFILEKEY: - case FFEEXPR_contextFILEUNIT: - case FFEEXPR_contextFILEUNIT_DF: - case FFEEXPR_contextFILEUNITAMBIG: - case FFEEXPR_contextFILEFORMAT: - case FFEEXPR_contextFILENAMELIST: - case FFEEXPR_contextFILEVXTCODE: - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - case FFEEXPR_contextIMPDOCTRL_: - case FFEEXPR_contextLOC_: - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_sym_rhs_let_ (s, t); - else - s = ffeexpr_sym_lhs_let_ (s, t); - break; - - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextEQUIVALENCE: - case FFEEXPR_contextINCLUDE: - case FFEEXPR_contextPARAMETER: - case FFEEXPR_contextDIMLIST: - case FFEEXPR_contextDIMLISTCOMMON: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextINITVAL: - case FFEEXPR_contextEQVINDEX_: - break; /* Will turn into errors below. */ - - default: - ffesymbol_error (s, t); - break; - } - /* Fall through. */ - case FFESYMBOL_stateUNDERSTOOD: /* Nothing much more to learn. */ - understood: /* :::::::::::::::::::: */ - k = ffesymbol_kind (s); - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextSUBROUTINEREF: - bad = ((k != FFEINFO_kindSUBROUTINE) - && ((ffesymbol_where (s) != FFEINFO_whereINTRINSIC) - || (k != FFEINFO_kindNONE))); - break; - - case FFEEXPR_contextFILEEXTFUNC: - bad = (k != FFEINFO_kindFUNCTION) - || (ffesymbol_where (s) != FFEINFO_whereGLOBAL); - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextACTUALARG_: - switch (k) - { - case FFEINFO_kindENTITY: - bad = FALSE; - break; - - case FFEINFO_kindFUNCTION: - case FFEINFO_kindSUBROUTINE: - bad - = ((ffesymbol_where (s) != FFEINFO_whereGLOBAL) - && (ffesymbol_where (s) != FFEINFO_whereDUMMY) - && ((ffesymbol_where (s) != FFEINFO_whereINTRINSIC) - || !ffeintrin_is_actualarg (ffesymbol_specific (s)))); - break; - - case FFEINFO_kindNONE: - if (ffesymbol_where (s) == FFEINFO_whereINTRINSIC) - { - bad = !(ffeintrin_is_actualarg (ffesymbol_specific (s))); - break; - } - - /* If state is UNDERSTOOD here, it's CHAR*(*) or attrsANY, - and in the former case, attrsTYPE is set, so we - see this as an error as we should, since CHAR*(*) - cannot be actually referenced in a main/block data - program unit. */ - - if ((ffesymbol_attrs (s) & (FFESYMBOL_attrsANY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE)) - == FFESYMBOL_attrsEXTERNAL) - bad = FALSE; - else - bad = TRUE; - break; - - default: - bad = TRUE; - break; - } - break; - - case FFEEXPR_contextDATA: - if (ffeexpr_stack_->is_rhs) - bad = (k != FFEINFO_kindENTITY) - || (ffesymbol_where (s) != FFEINFO_whereCONSTANT); - else - bad = (k != FFEINFO_kindENTITY) - || ((ffesymbol_where (s) != FFEINFO_whereNONE) - && (ffesymbol_where (s) != FFEINFO_whereLOCAL) - && (ffesymbol_where (s) != FFEINFO_whereCOMMON)); - break; - - case FFEEXPR_contextDATAIMPDOITEM_: - bad = TRUE; /* Unadorned item never valid. */ - break; - - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - case FFEEXPR_contextLET: - case FFEEXPR_contextPAREN_: - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - case FFEEXPR_contextASSIGN: - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextDO: - case FFEEXPR_contextDOWHILE: - case FFEEXPR_contextAGOTO: - case FFEEXPR_contextCGOTO: - case FFEEXPR_contextIF: - case FFEEXPR_contextARITHIF: - case FFEEXPR_contextFORMAT: - case FFEEXPR_contextSTOP: - case FFEEXPR_contextRETURN: - case FFEEXPR_contextSELECTCASE: - case FFEEXPR_contextCASE: - case FFEEXPR_contextFILEASSOC: - case FFEEXPR_contextFILEINT: - case FFEEXPR_contextFILEDFINT: - case FFEEXPR_contextFILELOG: - case FFEEXPR_contextFILENUM: - case FFEEXPR_contextFILENUMAMBIG: - case FFEEXPR_contextFILECHAR: - case FFEEXPR_contextFILENUMCHAR: - case FFEEXPR_contextFILEDFCHAR: - case FFEEXPR_contextFILEKEY: - case FFEEXPR_contextFILEUNIT: - case FFEEXPR_contextFILEUNIT_DF: - case FFEEXPR_contextFILEUNITAMBIG: - case FFEEXPR_contextFILEFORMAT: - case FFEEXPR_contextFILENAMELIST: - case FFEEXPR_contextFILEVXTCODE: - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - case FFEEXPR_contextIMPDOCTRL_: - case FFEEXPR_contextLOC_: - bad = (k != FFEINFO_kindENTITY); /* This catches "SUBROUTINE - X(A);EXTERNAL A;CALL - Y(A);B=A", for example. */ - break; - - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextEQUIVALENCE: - case FFEEXPR_contextPARAMETER: - case FFEEXPR_contextDIMLIST: - case FFEEXPR_contextDIMLISTCOMMON: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextINITVAL: - case FFEEXPR_contextEQVINDEX_: - bad = (k != FFEINFO_kindENTITY) - || (ffesymbol_where (s) != FFEINFO_whereCONSTANT); - break; - - case FFEEXPR_contextINCLUDE: - bad = TRUE; - break; - - default: - bad = TRUE; - break; - } - if (bad && (k != FFEINFO_kindANY)) - ffesymbol_error (s, t); - return s; - - case FFESYMBOL_stateSEEN: /* Seen but not yet in exec portion. */ - seen: /* :::::::::::::::::::: */ - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextPARAMETER: - if (ffeexpr_stack_->is_rhs) - ffesymbol_error (s, t); - else - s = ffeexpr_sym_lhs_parameter_ (s, t); - break; - - case FFEEXPR_contextDATA: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - if (ffeexpr_stack_->is_rhs) - ffesymbol_error (s, t); - else - s = ffeexpr_sym_lhs_data_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - case FFEEXPR_contextDATAIMPDOITEM_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_sym_lhs_data_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - case FFEEXPR_contextEQUIVALENCE: - s = ffeexpr_sym_lhs_equivalence_ (s, t); - break; - - case FFEEXPR_contextDIMLIST: - s = ffeexpr_sym_rhs_dimlist_ (s, t); - break; - - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextDIMLISTCOMMON: - case FFEEXPR_contextINITVAL: - case FFEEXPR_contextEQVINDEX_: - ffesymbol_error (s, t); - break; - - case FFEEXPR_contextINCLUDE: - ffesymbol_error (s, t); - break; - - case FFEEXPR_contextACTUALARG_: /* E.g. I in REAL A(Y(I)). */ - case FFEEXPR_contextSFUNCDEFACTUALARG_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_sym_rhs_actualarg_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - assert (ffeexpr_stack_->is_rhs); - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_sym_rhs_let_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - default: - ffesymbol_error (s, t); - break; - } - return s; - - default: - assert ("bad symbol state" == NULL); - return NULL; - break; - } -} - -/* Have FOO in DATA (XYZ(FOO),...)/.../ or DATA (...,XYZ=FOO,BAR,BLETCH). - Could be found via the "statement-function" name space (in which case - it should become an iterator) or the local name space (in which case - it should be either a named constant, or a variable that will have an - sfunc name space sibling that should become an iterator). */ - -static ffesymbol -ffeexpr_sym_impdoitem_ (ffesymbol sp, ffelexToken t) -{ - ffesymbol s; - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffesymbolState ss; - ffesymbolState ns; - ffeinfoKind kind; - ffeinfoWhere where; - - ss = ffesymbol_state (sp); - - if (ffesymbol_sfdummyparent (sp) != NULL) - { /* Have symbol in sfunc name space. */ - switch (ss) - { - case FFESYMBOL_stateNONE: /* Used as iterator already. */ - if (ffeexpr_level_ < ffesymbol_maxentrynum (sp)) - ffesymbol_error (sp, t); /* Can't use dead iterator. */ - else - { /* Can use dead iterator because we're at at - least an innermore (higher-numbered) level - than the iterator's outermost - (lowest-numbered) level. */ - ffesymbol_signal_change (sp); - ffesymbol_set_state (sp, FFESYMBOL_stateSEEN); - ffesymbol_set_maxentrynum (sp, ffeexpr_level_); - ffesymbol_signal_unreported (sp); - } - break; - - case FFESYMBOL_stateSEEN: /* Seen already in this or other - implied-DO. Set symbol level - number to outermost value, as that - tells us we can see it as iterator - at that level at the innermost. */ - if (ffeexpr_level_ < ffesymbol_maxentrynum (sp)) - { - ffesymbol_signal_change (sp); - ffesymbol_set_maxentrynum (sp, ffeexpr_level_); - ffesymbol_signal_unreported (sp); - } - break; - - case FFESYMBOL_stateUNCERTAIN: /* Iterator. */ - assert (ffeexpr_level_ == ffesymbol_maxentrynum (sp)); - ffesymbol_error (sp, t); /* (,,,I=I,10). */ - break; - - case FFESYMBOL_stateUNDERSTOOD: - break; /* ANY. */ - - default: - assert ("Foo Bar!!" == NULL); - break; - } - - return sp; - } - - /* Got symbol in local name space, so we haven't seen it in impdo yet. - First, if it is brand-new and we're in executable statements, set the - attributes and exec-transition it to set state UNCERTAIN or UNDERSTOOD. - Second, if it is now a constant (PARAMETER), then just return it, it - can't be an implied-do iterator. If it is understood, complain if it is - not a valid variable, but make the inner name space iterator anyway and - return that. If it is not understood, improve understanding of the - symbol accordingly, complain accordingly, in either case make the inner - name space iterator and return that. */ - - sa = ffesymbol_attrs (sp); - - if (ffesymbol_state_is_specable (ss) - && ffest_seen_first_exec ()) - { - assert (sa == FFESYMBOL_attrsetNONE); - ffesymbol_signal_change (sp); - ffesymbol_set_state (sp, FFESYMBOL_stateSEEN); - ffesymbol_resolve_intrin (sp); - if (ffeimplic_establish_symbol (sp)) - ffesymbol_set_attr (sp, FFESYMBOL_attrSFARG); - else - ffesymbol_error (sp, t); - - /* After the exec transition, the state will either be UNCERTAIN (could - be a dummy or local var) or UNDERSTOOD (local var, because this is a - PROGRAM/BLOCKDATA program unit). */ - - sp = ffecom_sym_exec_transition (sp); - sa = ffesymbol_attrs (sp); - ss = ffesymbol_state (sp); - } - - ns = ss; - kind = ffesymbol_kind (sp); - where = ffesymbol_where (sp); - - if (ss == FFESYMBOL_stateUNDERSTOOD) - { - if (kind != FFEINFO_kindENTITY) - ffesymbol_error (sp, t); - if (where == FFEINFO_whereCONSTANT) - return sp; - } - else - { - /* Enhance understanding of local symbol. This used to imply exec - transition, but that doesn't seem necessary, since the local symbol - doesn't actually get put into an ffebld tree here -- we just learn - more about it, just like when we see a local symbol's name in the - dummy-arg list of a statement function. */ - - if (ss != FFESYMBOL_stateUNCERTAIN) - { - /* Figure out what kind of object we've got based on previous - declarations of or references to the object. */ - - ns = FFESYMBOL_stateSEEN; - - if (sa & FFESYMBOL_attrsANY) - na = sa; - else if (!(sa & ~(FFESYMBOL_attrsADJUSTS - | FFESYMBOL_attrsANY - | FFESYMBOL_attrsCOMMON - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEQUIV - | FFESYMBOL_attrsINIT - | FFESYMBOL_attrsNAMELIST - | FFESYMBOL_attrsRESULT - | FFESYMBOL_attrsSAVE - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))) - na = sa | FFESYMBOL_attrsSFARG; - else - na = FFESYMBOL_attrsetNONE; - } - else - { /* stateUNCERTAIN. */ - na = sa | FFESYMBOL_attrsSFARG; - ns = FFESYMBOL_stateUNDERSTOOD; - - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - if (sa & FFESYMBOL_attrsEXTERNAL) - { - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - na = FFESYMBOL_attrsetNONE; - } - else if (sa & FFESYMBOL_attrsDUMMY) - { - assert (!(sa & FFESYMBOL_attrsEXTERNAL)); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - kind = FFEINFO_kindENTITY; - } - else if (sa & FFESYMBOL_attrsARRAY) - { - assert (!(sa & ~(FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsTYPE))); - - na = FFESYMBOL_attrsetNONE; - } - else if (sa & FFESYMBOL_attrsSFARG) - { - assert (!(sa & ~(FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - ns = FFESYMBOL_stateUNCERTAIN; - } - else if (sa & FFESYMBOL_attrsTYPE) - { - assert (!(sa & (FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsTYPE - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); - - kind = FFEINFO_kindENTITY; - - if (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN)) - na = FFESYMBOL_attrsetNONE; - else if (ffest_is_entry_valid ()) - ns = FFESYMBOL_stateUNCERTAIN; /* Could be DUMMY or LOCAL. */ - else - where = FFEINFO_whereLOCAL; - } - else - na = FFESYMBOL_attrsetNONE; /* Error. */ - } - - /* Now see what we've got for a new object: NONE means a new error - cropped up; ANY means an old error to be ignored; otherwise, - everything's ok, update the object (symbol) and continue on. */ - - if (na == FFESYMBOL_attrsetNONE) - ffesymbol_error (sp, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (sp); /* May need to back up to previous - version. */ - if (!ffeimplic_establish_symbol (sp)) - ffesymbol_error (sp, t); - else - { - ffesymbol_set_info (sp, - ffeinfo_new (ffesymbol_basictype (sp), - ffesymbol_kindtype (sp), - ffesymbol_rank (sp), - kind, - where, - ffesymbol_size (sp))); - ffesymbol_set_attrs (sp, na); - ffesymbol_set_state (sp, ns); - ffesymbol_resolve_intrin (sp); - if (!ffesymbol_state_is_specable (ns)) - sp = ffecom_sym_learned (sp); - ffesymbol_signal_unreported (sp); /* For debugging purposes. */ - } - } - } - - /* Here we create the sfunc-name-space symbol representing what should - become an iterator in this name space at this or an outermore (lower- - numbered) expression level, else the implied-DO construct is in error. */ - - s = ffesymbol_declare_sfdummy (t); /* Sets maxentrynum to 0 for new obj; - also sets sfa_dummy_parent to - parent symbol. */ - assert (sp == ffesymbol_sfdummyparent (s)); - - ffesymbol_signal_change (s); - ffesymbol_set_state (s, FFESYMBOL_stateSEEN); - ffesymbol_set_maxentrynum (s, ffeexpr_level_); - ffesymbol_set_info (s, - ffeinfo_new (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereIMMEDIATE, - FFETARGET_charactersizeNONE)); - ffesymbol_signal_unreported (s); - - if ((ffesymbol_basictype (sp) != FFEINFO_basictypeINTEGER) - && (ffesymbol_basictype (sp) != FFEINFO_basictypeANY)) - ffesymbol_error (s, t); - - return s; -} - -/* Have FOO in CALL FOO. Local name space, executable context only. */ - -static ffesymbol -ffeexpr_sym_lhs_call_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - ffeintrinGen gen; - ffeintrinSpec spec; - ffeintrinImp imp; - bool error = FALSE; - - assert ((ffesymbol_state (s) == FFESYMBOL_stateNONE) - || (ffesymbol_state (s) == FFESYMBOL_stateUNCERTAIN)); - - na = sa = ffesymbol_attrs (s); - - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - kind = ffesymbol_kind (s); - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (sa & FFESYMBOL_attrsEXTERNAL) - { - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - if (sa & FFESYMBOL_attrsTYPE) - error = TRUE; - else - /* Not TYPE. */ - { - kind = FFEINFO_kindSUBROUTINE; - - if (sa & FFESYMBOL_attrsDUMMY) - ; /* Not TYPE. */ - else if (sa & FFESYMBOL_attrsACTUALARG) - ; /* Not DUMMY or TYPE. */ - else /* Not ACTUALARG, DUMMY, or TYPE. */ - where = FFEINFO_whereGLOBAL; - } - } - else if (sa & FFESYMBOL_attrsDUMMY) - { - assert (!(sa & FFESYMBOL_attrsEXTERNAL)); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - if (sa & FFESYMBOL_attrsTYPE) - error = TRUE; - else - kind = FFEINFO_kindSUBROUTINE; - } - else if (sa & FFESYMBOL_attrsARRAY) - { - assert (!(sa & ~(FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsTYPE))); - - error = TRUE; - } - else if (sa & FFESYMBOL_attrsSFARG) - { - assert (!(sa & ~(FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - error = TRUE; - } - else if (sa & FFESYMBOL_attrsTYPE) - { - assert (!(sa & (FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsTYPE - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); - - error = TRUE; - } - else if (sa == FFESYMBOL_attrsetNONE) - { - assert (ffesymbol_state (s) == FFESYMBOL_stateNONE); - - if (ffeintrin_is_intrinsic (ffesymbol_text (s), t, FALSE, - &gen, &spec, &imp)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - ffesymbol_set_generic (s, gen); - ffesymbol_set_specific (s, spec); - ffesymbol_set_implementation (s, imp); - ffesymbol_set_info (s, - ffeinfo_new (FFEINFO_basictypeNONE, - FFEINFO_kindtypeNONE, - 0, - FFEINFO_kindSUBROUTINE, - FFEINFO_whereINTRINSIC, - FFETARGET_charactersizeNONE)); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - ffesymbol_reference (s, t, FALSE); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - - return s; - } - - kind = FFEINFO_kindSUBROUTINE; - where = FFEINFO_whereGLOBAL; - } - else - error = TRUE; - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (error) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, /* SUBROUTINE. */ - where, /* GLOBAL or DUMMY. */ - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - ffesymbol_reference (s, t, FALSE); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* Have FOO in DATA FOO/.../. Local name space and executable context - only. (This will change in the future when DATA FOO may be followed - by COMMON FOO or even INTEGER FOO(10), etc.) */ - -static ffesymbol -ffeexpr_sym_lhs_data_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - bool error = FALSE; - - assert ((ffesymbol_state (s) == FFESYMBOL_stateNONE) - || (ffesymbol_state (s) == FFESYMBOL_stateUNCERTAIN)); - - na = sa = ffesymbol_attrs (s); - - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - kind = ffesymbol_kind (s); - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (sa & FFESYMBOL_attrsEXTERNAL) - { - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - error = TRUE; - } - else if (sa & FFESYMBOL_attrsDUMMY) - { - assert (!(sa & FFESYMBOL_attrsEXTERNAL)); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - error = TRUE; - } - else if (sa & FFESYMBOL_attrsARRAY) - { - assert (!(sa & ~(FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsTYPE))); - - if (sa & FFESYMBOL_attrsADJUSTABLE) - error = TRUE; - where = FFEINFO_whereLOCAL; - } - else if (sa & FFESYMBOL_attrsSFARG) - { - assert (!(sa & ~(FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - where = FFEINFO_whereLOCAL; - } - else if (sa & FFESYMBOL_attrsTYPE) - { - assert (!(sa & (FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsTYPE - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); - - if (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN)) - error = TRUE; - else - { - kind = FFEINFO_kindENTITY; - where = FFEINFO_whereLOCAL; - } - } - else if (sa == FFESYMBOL_attrsetNONE) - { - assert (ffesymbol_state (s) == FFESYMBOL_stateNONE); - kind = FFEINFO_kindENTITY; - where = FFEINFO_whereLOCAL; - } - else - error = TRUE; - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (error) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - if (!ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, t); - return s; - } - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, /* ENTITY. */ - where, /* LOCAL. */ - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* Have FOO in EQUIVALENCE (...,FOO,...). Does not include - EQUIVALENCE (...,BAR(FOO),...). */ - -static ffesymbol -ffeexpr_sym_lhs_equivalence_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - - na = sa = ffesymbol_attrs (s); - kind = FFEINFO_kindENTITY; - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (!(sa & ~(FFESYMBOL_attrsADJUSTS - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsCOMMON - | FFESYMBOL_attrsEQUIV - | FFESYMBOL_attrsINIT - | FFESYMBOL_attrsNAMELIST - | FFESYMBOL_attrsSAVE - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))) - na = sa | FFESYMBOL_attrsEQUIV; - else - na = FFESYMBOL_attrsetNONE; - - /* Don't know why we're bothering to set kind and where in this code, but - added the following to make it complete, in case it's really important. - Generally this is left up to symbol exec transition. */ - - if (where == FFEINFO_whereNONE) - { - if (na & (FFESYMBOL_attrsADJUSTS - | FFESYMBOL_attrsCOMMON)) - where = FFEINFO_whereCOMMON; - else if (na & FFESYMBOL_attrsSAVE) - where = FFEINFO_whereLOCAL; - } - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (na == FFESYMBOL_attrsetNONE) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, /* Always ENTITY. */ - where, /* NONE, COMMON, or LOCAL. */ - ffesymbol_size (s))); - ffesymbol_set_attrs (s, na); - ffesymbol_set_state (s, FFESYMBOL_stateSEEN); - ffesymbol_resolve_intrin (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* Have FOO in OPEN(...,USEROPEN=FOO,...). Executable context only. - - Note that I think this should be considered semantically similar to - doing CALL XYZ(FOO), in that it should be considered like an - ACTUALARG context. In particular, without EXTERNAL being specified, - it should not be allowed. */ - -static ffesymbol -ffeexpr_sym_lhs_extfunc_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - bool needs_type = FALSE; - bool error = FALSE; - - assert ((ffesymbol_state (s) == FFESYMBOL_stateNONE) - || (ffesymbol_state (s) == FFESYMBOL_stateUNCERTAIN)); - - na = sa = ffesymbol_attrs (s); - - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - kind = ffesymbol_kind (s); - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (sa & FFESYMBOL_attrsEXTERNAL) - { - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - if (sa & FFESYMBOL_attrsTYPE) - where = FFEINFO_whereGLOBAL; - else - /* Not TYPE. */ - { - kind = FFEINFO_kindFUNCTION; - needs_type = TRUE; - - if (sa & FFESYMBOL_attrsDUMMY) - ; /* Not TYPE. */ - else if (sa & FFESYMBOL_attrsACTUALARG) - ; /* Not DUMMY or TYPE. */ - else /* Not ACTUALARG, DUMMY, or TYPE. */ - where = FFEINFO_whereGLOBAL; - } - } - else if (sa & FFESYMBOL_attrsDUMMY) - { - assert (!(sa & FFESYMBOL_attrsEXTERNAL)); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - kind = FFEINFO_kindFUNCTION; - if (!(sa & FFESYMBOL_attrsTYPE)) - needs_type = TRUE; - } - else if (sa & FFESYMBOL_attrsARRAY) - { - assert (!(sa & ~(FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsTYPE))); - - error = TRUE; - } - else if (sa & FFESYMBOL_attrsSFARG) - { - assert (!(sa & ~(FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - error = TRUE; - } - else if (sa & FFESYMBOL_attrsTYPE) - { - assert (!(sa & (FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsTYPE - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); - - if (sa & (FFESYMBOL_attrsADJUSTABLE | FFESYMBOL_attrsANYLEN)) - error = TRUE; - else - { - kind = FFEINFO_kindFUNCTION; - where = FFEINFO_whereGLOBAL; - } - } - else if (sa == FFESYMBOL_attrsetNONE) - { - assert (ffesymbol_state (s) == FFESYMBOL_stateNONE); - kind = FFEINFO_kindFUNCTION; - where = FFEINFO_whereGLOBAL; - needs_type = TRUE; - } - else - error = TRUE; - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (error) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - if (needs_type && !ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, t); - return s; - } - if (!ffesymbol_explicitwhere (s)) - { - ffebad_start (FFEBAD_NEED_EXTERNAL); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - ffesymbol_set_explicitwhere (s, TRUE); - } - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, /* FUNCTION. */ - where, /* GLOBAL or DUMMY. */ - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - ffesymbol_reference (s, t, FALSE); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* Have FOO in DATA (stuff,FOO=1,10)/.../. */ - -static ffesymbol -ffeexpr_sym_lhs_impdoctrl_ (ffesymbol s, ffelexToken t) -{ - ffesymbolState ss; - - /* If the symbol isn't in the sfunc name space, pretend as though we saw a - reference to it already within the imp-DO construct at this level, so as - to get a symbol that is in the sfunc name space. But this is an - erroneous construct, and should be caught elsewhere. */ - - if (ffesymbol_sfdummyparent (s) == NULL) - { - s = ffeexpr_sym_impdoitem_ (s, t); - if (ffesymbol_sfdummyparent (s) == NULL) - { /* PARAMETER FOO...DATA (A(I),FOO=...). */ - ffesymbol_error (s, t); - return s; - } - } - - ss = ffesymbol_state (s); - - switch (ss) - { - case FFESYMBOL_stateNONE: /* Used as iterator already. */ - if (ffeexpr_level_ < ffesymbol_maxentrynum (s)) - ffesymbol_error (s, t); /* Can't reuse dead iterator. F90 disallows - this; F77 allows it but it is a stupid - feature. */ - else - { /* Can use dead iterator because we're at at - least a innermore (higher-numbered) level - than the iterator's outermost - (lowest-numbered) level. This should be - diagnosed later, because it means an item - in this list didn't reference this - iterator. */ -#if 1 - ffesymbol_error (s, t); /* For now, complain. */ -#else /* Someday will detect all cases where initializer doesn't reference - all applicable iterators, in which case reenable this code. */ - ffesymbol_signal_change (s); - ffesymbol_set_state (s, FFESYMBOL_stateUNCERTAIN); - ffesymbol_set_maxentrynum (s, ffeexpr_level_); - ffesymbol_signal_unreported (s); -#endif - } - break; - - case FFESYMBOL_stateSEEN: /* Seen already in this or other implied-DO. - If seen in outermore level, can't be an - iterator here, so complain. If not seen - at current level, complain for now, - because that indicates something F90 - rejects (though we currently don't detect - all such cases for now). */ - if (ffeexpr_level_ <= ffesymbol_maxentrynum (s)) - { - ffesymbol_signal_change (s); - ffesymbol_set_state (s, FFESYMBOL_stateUNCERTAIN); - ffesymbol_signal_unreported (s); - } - else - ffesymbol_error (s, t); - break; - - case FFESYMBOL_stateUNCERTAIN: /* Already iterator! */ - assert ("DATA implied-DO control var seen twice!!" == NULL); - ffesymbol_error (s, t); - break; - - case FFESYMBOL_stateUNDERSTOOD: - break; /* ANY. */ - - default: - assert ("Foo Bletch!!" == NULL); - break; - } - - return s; -} - -/* Have FOO in PARAMETER (FOO=...). */ - -static ffesymbol -ffeexpr_sym_lhs_parameter_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - - sa = ffesymbol_attrs (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (sa & ~(FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsTYPE)) - { - if (!(sa & FFESYMBOL_attrsANY)) - ffesymbol_error (s, t); - } - else - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - if (!ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, t); - return s; - } - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* Have FOO in CALL XYZ(...,FOO,...). Does not include any other - embedding of FOO, such as CALL XYZ((FOO)) or CALL XYZ(FOO+1). */ - -static ffesymbol -ffeexpr_sym_rhs_actualarg_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - ffesymbolState ns; - bool needs_type = FALSE; - - assert ((ffesymbol_state (s) == FFESYMBOL_stateNONE) - || (ffesymbol_state (s) == FFESYMBOL_stateUNCERTAIN)); - - na = sa = ffesymbol_attrs (s); - - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - kind = ffesymbol_kind (s); - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - ns = FFESYMBOL_stateUNDERSTOOD; - - if (sa & FFESYMBOL_attrsEXTERNAL) - { - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - if (sa & FFESYMBOL_attrsTYPE) - where = FFEINFO_whereGLOBAL; - else - /* Not TYPE. */ - { - ns = FFESYMBOL_stateUNCERTAIN; - - if (sa & FFESYMBOL_attrsDUMMY) - assert (kind == FFEINFO_kindNONE); /* FUNCTION, SUBROUTINE. */ - else if (sa & FFESYMBOL_attrsACTUALARG) - ; /* Not DUMMY or TYPE. */ - else - /* Not ACTUALARG, DUMMY, or TYPE. */ - { - assert (kind == FFEINFO_kindNONE); /* FUNCTION, SUBROUTINE. */ - na |= FFESYMBOL_attrsACTUALARG; - where = FFEINFO_whereGLOBAL; - } - } - } - else if (sa & FFESYMBOL_attrsDUMMY) - { - assert (!(sa & FFESYMBOL_attrsEXTERNAL)); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - kind = FFEINFO_kindENTITY; - if (!(sa & FFESYMBOL_attrsTYPE)) - needs_type = TRUE; - } - else if (sa & FFESYMBOL_attrsARRAY) - { - assert (!(sa & ~(FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsTYPE))); - - where = FFEINFO_whereLOCAL; - } - else if (sa & FFESYMBOL_attrsSFARG) - { - assert (!(sa & ~(FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - where = FFEINFO_whereLOCAL; - } - else if (sa & FFESYMBOL_attrsTYPE) - { - assert (!(sa & (FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsTYPE - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); - - if (sa & FFESYMBOL_attrsANYLEN) - ns = FFESYMBOL_stateNONE; - else - { - kind = FFEINFO_kindENTITY; - where = FFEINFO_whereLOCAL; - } - } - else if (sa == FFESYMBOL_attrsetNONE) - { - /* New state is left empty because there isn't any state flag to - set for this case, and it's UNDERSTOOD after all. */ - assert (ffesymbol_state (s) == FFESYMBOL_stateNONE); - kind = FFEINFO_kindENTITY; - where = FFEINFO_whereLOCAL; - needs_type = TRUE; - } - else - ns = FFESYMBOL_stateNONE; /* Error. */ - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (ns == FFESYMBOL_stateNONE) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - if (needs_type && !ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, t); - return s; - } - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, - where, - ffesymbol_size (s))); - ffesymbol_set_attrs (s, na); - ffesymbol_set_state (s, ns); - s = ffecom_sym_learned (s); - ffesymbol_reference (s, t, FALSE); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* Have FOO in DIMENSION XYZ(FOO) or any array declarator containing - a reference to FOO. */ - -static ffesymbol -ffeexpr_sym_rhs_dimlist_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - - na = sa = ffesymbol_attrs (s); - kind = FFEINFO_kindENTITY; - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (!(sa & ~(FFESYMBOL_attrsADJUSTS - | FFESYMBOL_attrsCOMMON - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEQUIV - | FFESYMBOL_attrsINIT - | FFESYMBOL_attrsNAMELIST - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsTYPE))) - na = sa | FFESYMBOL_attrsADJUSTS; - else - na = FFESYMBOL_attrsetNONE; - - /* Since this symbol definitely is going into an expression (the - dimension-list for some dummy array, presumably), figure out WHERE if - possible. */ - - if (where == FFEINFO_whereNONE) - { - if (na & (FFESYMBOL_attrsCOMMON - | FFESYMBOL_attrsEQUIV - | FFESYMBOL_attrsINIT - | FFESYMBOL_attrsNAMELIST)) - where = FFEINFO_whereCOMMON; - else if (na & FFESYMBOL_attrsDUMMY) - where = FFEINFO_whereDUMMY; - } - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (na == FFESYMBOL_attrsetNONE) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - if (!ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, t); - return s; - } - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, /* Always ENTITY. */ - where, /* NONE, COMMON, or DUMMY. */ - ffesymbol_size (s))); - ffesymbol_set_attrs (s, na); - ffesymbol_set_state (s, FFESYMBOL_stateSEEN); - ffesymbol_resolve_intrin (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* Have FOO in XYZ = ...FOO.... Does not include cases like FOO in - XYZ = BAR(FOO), as such cases are handled elsewhere. */ - -static ffesymbol -ffeexpr_sym_rhs_let_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - bool error = FALSE; - - assert ((ffesymbol_state (s) == FFESYMBOL_stateNONE) - || (ffesymbol_state (s) == FFESYMBOL_stateUNCERTAIN)); - - na = sa = ffesymbol_attrs (s); - - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - kind = ffesymbol_kind (s); - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (sa & FFESYMBOL_attrsEXTERNAL) - { - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - error = TRUE; - } - else if (sa & FFESYMBOL_attrsDUMMY) - { - assert (!(sa & FFESYMBOL_attrsEXTERNAL)); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - kind = FFEINFO_kindENTITY; - } - else if (sa & FFESYMBOL_attrsARRAY) - { - assert (!(sa & ~(FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsTYPE))); - - where = FFEINFO_whereLOCAL; - } - else if (sa & FFESYMBOL_attrsSFARG) - { - assert (!(sa & ~(FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - where = FFEINFO_whereLOCAL; - } - else if (sa & FFESYMBOL_attrsTYPE) - { - assert (!(sa & (FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsTYPE - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); - - if (sa & FFESYMBOL_attrsANYLEN) - error = TRUE; - else - { - kind = FFEINFO_kindENTITY; - where = FFEINFO_whereLOCAL; - } - } - else if (sa == FFESYMBOL_attrsetNONE) - { - assert (ffesymbol_state (s) == FFESYMBOL_stateNONE); - kind = FFEINFO_kindENTITY; - where = FFEINFO_whereLOCAL; - } - else - error = TRUE; - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (error) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - if (!ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, t); - return s; - } - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, /* ENTITY. */ - where, /* LOCAL. */ - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* ffeexpr_declare_parenthesized_ -- ffesymbol wrapper for NAME(...) operand - - ffelexToken t; - bool maybe_intrin; - ffeexprParenType_ paren_type; - ffesymbol s; - s = ffeexpr_declare_parenthesized_ (t, maybe_intrin, &paren_type); - - Just like ffesymbol_declare_local, except performs any implicit info - assignment necessary, and it returns the type of the parenthesized list - (list of function args, list of array args, or substring spec). */ - -static ffesymbol -ffeexpr_declare_parenthesized_ (ffelexToken t, bool maybe_intrin, - ffeexprParenType_ *paren_type) -{ - ffesymbol s; - ffesymbolState st; /* Effective state. */ - ffeinfoKind k; - bool bad; - - if (maybe_intrin && ffesrc_check_symbol ()) - { /* Knock off some easy cases. */ - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextSUBROUTINEREF: - case FFEEXPR_contextDATA: - case FFEEXPR_contextDATAIMPDOINDEX_: - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - case FFEEXPR_contextLET: - case FFEEXPR_contextPAREN_: - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextDO: - case FFEEXPR_contextDOWHILE: - case FFEEXPR_contextACTUALARG_: - case FFEEXPR_contextCGOTO: - case FFEEXPR_contextIF: - case FFEEXPR_contextARITHIF: - case FFEEXPR_contextFORMAT: - case FFEEXPR_contextSTOP: - case FFEEXPR_contextRETURN: - case FFEEXPR_contextSELECTCASE: - case FFEEXPR_contextCASE: - case FFEEXPR_contextFILEASSOC: - case FFEEXPR_contextFILEINT: - case FFEEXPR_contextFILEDFINT: - case FFEEXPR_contextFILELOG: - case FFEEXPR_contextFILENUM: - case FFEEXPR_contextFILENUMAMBIG: - case FFEEXPR_contextFILECHAR: - case FFEEXPR_contextFILENUMCHAR: - case FFEEXPR_contextFILEDFCHAR: - case FFEEXPR_contextFILEKEY: - case FFEEXPR_contextFILEUNIT: - case FFEEXPR_contextFILEUNIT_DF: - case FFEEXPR_contextFILEUNITAMBIG: - case FFEEXPR_contextFILEFORMAT: - case FFEEXPR_contextFILENAMELIST: - case FFEEXPR_contextFILEVXTCODE: - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - case FFEEXPR_contextIMPDOCTRL_: - case FFEEXPR_contextDATAIMPDOCTRL_: - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextPARAMETER: - case FFEEXPR_contextDIMLIST: - case FFEEXPR_contextDIMLISTCOMMON: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextINITVAL: - case FFEEXPR_contextEQVINDEX_: - break; /* These could be intrinsic invocations. */ - - case FFEEXPR_contextAGOTO: - case FFEEXPR_contextFILEFORMATNML: - case FFEEXPR_contextALLOCATE: - case FFEEXPR_contextDEALLOCATE: - case FFEEXPR_contextHEAPSTAT: - case FFEEXPR_contextNULLIFY: - case FFEEXPR_contextINCLUDE: - case FFEEXPR_contextDATAIMPDOITEM_: - case FFEEXPR_contextLOC_: - case FFEEXPR_contextINDEXORACTUALARG_: - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - case FFEEXPR_contextPARENFILENUM_: - case FFEEXPR_contextPARENFILEUNIT_: - maybe_intrin = FALSE; - break; /* Can't be intrinsic invocation. */ - - default: - assert ("blah! blah! waaauuggh!" == NULL); - break; - } - } - - s = ffesymbol_declare_local (t, maybe_intrin); - - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - /* Special-case these since they can involve a different concept - of "state" (in the stmtfunc name space). */ - { - case FFEEXPR_contextDATAIMPDOINDEX_: - case FFEEXPR_contextDATAIMPDOCTRL_: - if (ffeexpr_context_outer_ (ffeexpr_stack_) - == FFEEXPR_contextDATAIMPDOINDEX_) - s = ffeexpr_sym_impdoitem_ (s, t); - else - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_sym_impdoitem_ (s, t); - else - s = ffeexpr_sym_lhs_impdoctrl_ (s, t); - if (ffesymbol_kind (s) != FFEINFO_kindANY) - ffesymbol_error (s, t); - return s; - - default: - break; - } - - switch ((ffesymbol_sfdummyparent (s) == NULL) - ? ffesymbol_state (s) - : FFESYMBOL_stateUNDERSTOOD) - { - case FFESYMBOL_stateNONE: /* Before first exec, not seen in expr - context. */ - if (!ffest_seen_first_exec ()) - goto seen; /* :::::::::::::::::::: */ - /* Fall through. */ - case FFESYMBOL_stateUNCERTAIN: /* Unseen since first exec. */ - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextSUBROUTINEREF: - s = ffeexpr_sym_lhs_call_ (s, t); /* "CALL FOO"=="CALL - FOO(...)". */ - break; - - case FFEEXPR_contextDATA: - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_sym_rhs_let_ (s, t); - else - s = ffeexpr_sym_lhs_data_ (s, t); - break; - - case FFEEXPR_contextDATAIMPDOITEM_: - s = ffeexpr_sym_lhs_data_ (s, t); - break; - - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - /* Fall through. */ - case FFEEXPR_contextLET: - case FFEEXPR_contextPAREN_: - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextDO: - case FFEEXPR_contextDOWHILE: - case FFEEXPR_contextACTUALARG_: - case FFEEXPR_contextCGOTO: - case FFEEXPR_contextIF: - case FFEEXPR_contextARITHIF: - case FFEEXPR_contextFORMAT: - case FFEEXPR_contextSTOP: - case FFEEXPR_contextRETURN: - case FFEEXPR_contextSELECTCASE: - case FFEEXPR_contextCASE: - case FFEEXPR_contextFILEASSOC: - case FFEEXPR_contextFILEINT: - case FFEEXPR_contextFILEDFINT: - case FFEEXPR_contextFILELOG: - case FFEEXPR_contextFILENUM: - case FFEEXPR_contextFILENUMAMBIG: - case FFEEXPR_contextFILECHAR: - case FFEEXPR_contextFILENUMCHAR: - case FFEEXPR_contextFILEDFCHAR: - case FFEEXPR_contextFILEKEY: - case FFEEXPR_contextFILEUNIT: - case FFEEXPR_contextFILEUNIT_DF: - case FFEEXPR_contextFILEUNITAMBIG: - case FFEEXPR_contextFILEFORMAT: - case FFEEXPR_contextFILENAMELIST: - case FFEEXPR_contextFILEVXTCODE: - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - case FFEEXPR_contextIMPDOCTRL_: - case FFEEXPR_contextLOC_: - if (ffeexpr_stack_->is_rhs) - s = ffeexpr_paren_rhs_let_ (s, t); - else - s = ffeexpr_paren_lhs_let_ (s, t); - break; - - case FFEEXPR_contextASSIGN: - case FFEEXPR_contextAGOTO: - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextEQUIVALENCE: - case FFEEXPR_contextINCLUDE: - case FFEEXPR_contextPARAMETER: - case FFEEXPR_contextDIMLIST: - case FFEEXPR_contextDIMLISTCOMMON: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextINITVAL: - case FFEEXPR_contextEQVINDEX_: - break; /* Will turn into errors below. */ - - default: - ffesymbol_error (s, t); - break; - } - /* Fall through. */ - case FFESYMBOL_stateUNDERSTOOD: /* Nothing much more to learn. */ - understood: /* :::::::::::::::::::: */ - - /* State might have changed, update it. */ - st = ((ffesymbol_sfdummyparent (s) == NULL) - ? ffesymbol_state (s) - : FFESYMBOL_stateUNDERSTOOD); - - k = ffesymbol_kind (s); - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextSUBROUTINEREF: - bad = ((k != FFEINFO_kindSUBROUTINE) - && ((ffesymbol_where (s) != FFEINFO_whereINTRINSIC) - || (k != FFEINFO_kindNONE))); - break; - - case FFEEXPR_contextDATA: - if (ffeexpr_stack_->is_rhs) - bad = (k != FFEINFO_kindENTITY) - || (ffesymbol_where (s) != FFEINFO_whereCONSTANT); - else - bad = (k != FFEINFO_kindENTITY) - || ((ffesymbol_where (s) != FFEINFO_whereNONE) - && (ffesymbol_where (s) != FFEINFO_whereLOCAL) - && (ffesymbol_where (s) != FFEINFO_whereCOMMON)); - break; - - case FFEEXPR_contextDATAIMPDOITEM_: - bad = (k != FFEINFO_kindENTITY) || (ffesymbol_rank (s) == 0) - || ((ffesymbol_where (s) != FFEINFO_whereNONE) - && (ffesymbol_where (s) != FFEINFO_whereLOCAL) - && (ffesymbol_where (s) != FFEINFO_whereCOMMON)); - break; - - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - case FFEEXPR_contextLET: - case FFEEXPR_contextPAREN_: - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - case FFEEXPR_contextIOLIST: - case FFEEXPR_contextIOLISTDF: - case FFEEXPR_contextDO: - case FFEEXPR_contextDOWHILE: - case FFEEXPR_contextACTUALARG_: - case FFEEXPR_contextCGOTO: - case FFEEXPR_contextIF: - case FFEEXPR_contextARITHIF: - case FFEEXPR_contextFORMAT: - case FFEEXPR_contextSTOP: - case FFEEXPR_contextRETURN: - case FFEEXPR_contextSELECTCASE: - case FFEEXPR_contextCASE: - case FFEEXPR_contextFILEASSOC: - case FFEEXPR_contextFILEINT: - case FFEEXPR_contextFILEDFINT: - case FFEEXPR_contextFILELOG: - case FFEEXPR_contextFILENUM: - case FFEEXPR_contextFILENUMAMBIG: - case FFEEXPR_contextFILECHAR: - case FFEEXPR_contextFILENUMCHAR: - case FFEEXPR_contextFILEDFCHAR: - case FFEEXPR_contextFILEKEY: - case FFEEXPR_contextFILEUNIT: - case FFEEXPR_contextFILEUNIT_DF: - case FFEEXPR_contextFILEUNITAMBIG: - case FFEEXPR_contextFILEFORMAT: - case FFEEXPR_contextFILENAMELIST: - case FFEEXPR_contextFILEVXTCODE: - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextIMPDOITEM_: - case FFEEXPR_contextIMPDOITEMDF_: - case FFEEXPR_contextIMPDOCTRL_: - case FFEEXPR_contextLOC_: - bad = FALSE; /* Let paren-switch handle the cases. */ - break; - - case FFEEXPR_contextASSIGN: - case FFEEXPR_contextAGOTO: - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextEQUIVALENCE: - case FFEEXPR_contextPARAMETER: - case FFEEXPR_contextDIMLIST: - case FFEEXPR_contextDIMLISTCOMMON: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextINITVAL: - case FFEEXPR_contextEQVINDEX_: - bad = (k != FFEINFO_kindENTITY) - || (ffesymbol_where (s) != FFEINFO_whereCONSTANT); - break; - - case FFEEXPR_contextINCLUDE: - bad = TRUE; - break; - - default: - bad = TRUE; - break; - } - - switch (bad ? FFEINFO_kindANY : k) - { - case FFEINFO_kindNONE: /* Case "CHARACTER X,Y; Y=X(?". */ - if (ffesymbol_where (s) == FFEINFO_whereINTRINSIC) - { - if (ffeexpr_context_outer_ (ffeexpr_stack_) - == FFEEXPR_contextSUBROUTINEREF) - *paren_type = FFEEXPR_parentypeSUBROUTINE_; - else - *paren_type = FFEEXPR_parentypeFUNCTION_; - break; - } - if (st == FFESYMBOL_stateUNDERSTOOD) - { - bad = TRUE; - *paren_type = FFEEXPR_parentypeANY_; - } - else - *paren_type = FFEEXPR_parentypeFUNSUBSTR_; - break; - - case FFEINFO_kindFUNCTION: - *paren_type = FFEEXPR_parentypeFUNCTION_; - switch (ffesymbol_where (s)) - { - case FFEINFO_whereLOCAL: - bad = TRUE; /* Attempt to recurse! */ - break; - - case FFEINFO_whereCONSTANT: - bad = ((ffesymbol_sfexpr (s) == NULL) - || (ffebld_op (ffesymbol_sfexpr (s)) - == FFEBLD_opANY)); /* Attempt to recurse! */ - break; - - default: - break; - } - break; - - case FFEINFO_kindSUBROUTINE: - if ((ffeexpr_stack_->context != FFEEXPR_contextSUBROUTINEREF) - || (ffeexpr_stack_->previous != NULL)) - { - bad = TRUE; - *paren_type = FFEEXPR_parentypeANY_; - break; - } - - *paren_type = FFEEXPR_parentypeSUBROUTINE_; - switch (ffesymbol_where (s)) - { - case FFEINFO_whereLOCAL: - case FFEINFO_whereCONSTANT: - bad = TRUE; /* Attempt to recurse! */ - break; - - default: - break; - } - break; - - case FFEINFO_kindENTITY: - if (ffesymbol_rank (s) == 0) - { - if (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER) - *paren_type = FFEEXPR_parentypeSUBSTRING_; - else - { - bad = TRUE; - *paren_type = FFEEXPR_parentypeANY_; - } - } - else - *paren_type = FFEEXPR_parentypeARRAY_; - break; - - default: - case FFEINFO_kindANY: - bad = TRUE; - *paren_type = FFEEXPR_parentypeANY_; - break; - } - - if (bad) - { - if (k == FFEINFO_kindANY) - ffest_shutdown (); - else - ffesymbol_error (s, t); - } - - return s; - - case FFESYMBOL_stateSEEN: /* Seen but not yet in exec portion. */ - seen: /* :::::::::::::::::::: */ - bad = TRUE; - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextPARAMETER: - if (ffeexpr_stack_->is_rhs) - ffesymbol_error (s, t); - else - s = ffeexpr_sym_lhs_parameter_ (s, t); - break; - - case FFEEXPR_contextDATA: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - if (ffeexpr_stack_->is_rhs) - ffesymbol_error (s, t); - else - s = ffeexpr_sym_lhs_data_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - case FFEEXPR_contextDATAIMPDOITEM_: - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_sym_lhs_data_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - case FFEEXPR_contextEQUIVALENCE: - s = ffeexpr_sym_lhs_equivalence_ (s, t); - bad = FALSE; - break; - - case FFEEXPR_contextDIMLIST: - s = ffeexpr_sym_rhs_dimlist_ (s, t); - bad = FALSE; - break; - - case FFEEXPR_contextCHARACTERSIZE: - case FFEEXPR_contextKINDTYPE: - case FFEEXPR_contextDIMLISTCOMMON: - case FFEEXPR_contextINITVAL: - case FFEEXPR_contextEQVINDEX_: - break; - - case FFEEXPR_contextINCLUDE: - break; - - case FFEEXPR_contextINDEX_: - case FFEEXPR_contextACTUALARGEXPR_: - case FFEEXPR_contextINDEXORACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - assert (ffeexpr_stack_->is_rhs); - s = ffecom_sym_exec_transition (s); - if (ffesymbol_state (s) == FFESYMBOL_stateUNDERSTOOD) - goto understood; /* :::::::::::::::::::: */ - s = ffeexpr_paren_rhs_let_ (s, t); - goto understood; /* :::::::::::::::::::: */ - - default: - break; - } - k = ffesymbol_kind (s); - switch (bad ? FFEINFO_kindANY : k) - { - case FFEINFO_kindNONE: /* Case "CHARACTER X,Y; Y=X(?". */ - *paren_type = FFEEXPR_parentypeFUNSUBSTR_; - break; - - case FFEINFO_kindFUNCTION: - *paren_type = FFEEXPR_parentypeFUNCTION_; - switch (ffesymbol_where (s)) - { - case FFEINFO_whereLOCAL: - bad = TRUE; /* Attempt to recurse! */ - break; - - case FFEINFO_whereCONSTANT: - bad = ((ffesymbol_sfexpr (s) == NULL) - || (ffebld_op (ffesymbol_sfexpr (s)) - == FFEBLD_opANY)); /* Attempt to recurse! */ - break; - - default: - break; - } - break; - - case FFEINFO_kindSUBROUTINE: - *paren_type = FFEEXPR_parentypeANY_; - bad = TRUE; /* Cannot possibly be in - contextSUBROUTINEREF. */ - break; - - case FFEINFO_kindENTITY: - if (ffesymbol_rank (s) == 0) - { - if (ffeexpr_stack_->context == FFEEXPR_contextEQUIVALENCE) - *paren_type = FFEEXPR_parentypeEQUIVALENCE_; - else if (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER) - *paren_type = FFEEXPR_parentypeSUBSTRING_; - else - { - bad = TRUE; - *paren_type = FFEEXPR_parentypeANY_; - } - } - else - *paren_type = FFEEXPR_parentypeARRAY_; - break; - - default: - case FFEINFO_kindANY: - bad = TRUE; - *paren_type = FFEEXPR_parentypeANY_; - break; - } - - if (bad) - { - if (k == FFEINFO_kindANY) - ffest_shutdown (); - else - ffesymbol_error (s, t); - } - - return s; - - default: - assert ("bad symbol state" == NULL); - return NULL; - } -} - -/* Have FOO in XYZ = ...FOO(...).... Executable context only. */ - -static ffesymbol -ffeexpr_paren_rhs_let_ (ffesymbol s, ffelexToken t) -{ - ffesymbolAttrs sa; - ffesymbolAttrs na; - ffeinfoKind kind; - ffeinfoWhere where; - ffeintrinGen gen; - ffeintrinSpec spec; - ffeintrinImp imp; - bool maybe_ambig = FALSE; - bool error = FALSE; - - assert ((ffesymbol_state (s) == FFESYMBOL_stateNONE) - || (ffesymbol_state (s) == FFESYMBOL_stateUNCERTAIN)); - - na = sa = ffesymbol_attrs (s); - - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - kind = ffesymbol_kind (s); - where = ffesymbol_where (s); - - /* Figure out what kind of object we've got based on previous declarations - of or references to the object. */ - - if (sa & FFESYMBOL_attrsEXTERNAL) - { - assert (!(sa & ~(FFESYMBOL_attrsACTUALARG - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - if (sa & FFESYMBOL_attrsTYPE) - where = FFEINFO_whereGLOBAL; - else - /* Not TYPE. */ - { - kind = FFEINFO_kindFUNCTION; - - if (sa & FFESYMBOL_attrsDUMMY) - ; /* Not TYPE. */ - else if (sa & FFESYMBOL_attrsACTUALARG) - ; /* Not DUMMY or TYPE. */ - else /* Not ACTUALARG, DUMMY, or TYPE. */ - where = FFEINFO_whereGLOBAL; - } - } - else if (sa & FFESYMBOL_attrsDUMMY) - { - assert (!(sa & FFESYMBOL_attrsEXTERNAL)); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsTYPE))); - - kind = FFEINFO_kindFUNCTION; - maybe_ambig = TRUE; /* If basictypeCHARACTER, can't be sure; kind - could be ENTITY w/substring ref. */ - } - else if (sa & FFESYMBOL_attrsARRAY) - { - assert (!(sa & ~(FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsTYPE))); - - where = FFEINFO_whereLOCAL; - } - else if (sa & FFESYMBOL_attrsSFARG) - { - assert (!(sa & ~(FFESYMBOL_attrsSFARG - | FFESYMBOL_attrsTYPE))); - - where = FFEINFO_whereLOCAL; /* Actually an error, but at least we - know it's a local var. */ - } - else if (sa & FFESYMBOL_attrsTYPE) - { - assert (!(sa & (FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); /* Handled above. */ - assert (!(sa & ~(FFESYMBOL_attrsTYPE - | FFESYMBOL_attrsADJUSTABLE - | FFESYMBOL_attrsANYLEN - | FFESYMBOL_attrsARRAY - | FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsEXTERNAL - | FFESYMBOL_attrsSFARG))); - - if (ffeintrin_is_intrinsic (ffesymbol_text (s), t, FALSE, - &gen, &spec, &imp)) - { - if (!(sa & FFESYMBOL_attrsANYLEN) - && (ffeimplic_peek_symbol_type (s, NULL) - == FFEINFO_basictypeCHARACTER)) - return s; /* Haven't learned anything yet. */ - - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - ffesymbol_set_generic (s, gen); - ffesymbol_set_specific (s, spec); - ffesymbol_set_implementation (s, imp); - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - 0, - FFEINFO_kindFUNCTION, - FFEINFO_whereINTRINSIC, - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - ffesymbol_reference (s, t, FALSE); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - - return s; - } - if (sa & FFESYMBOL_attrsANYLEN) - error = TRUE; /* Error, since the only way we can, - given CHARACTER*(*) FOO, accept - FOO(...) is for FOO to be a dummy - arg or constant, but it can't - become either now. */ - else if (sa & FFESYMBOL_attrsADJUSTABLE) - { - kind = FFEINFO_kindENTITY; - where = FFEINFO_whereLOCAL; - } - else - { - kind = FFEINFO_kindFUNCTION; - where = FFEINFO_whereGLOBAL; - maybe_ambig = TRUE; /* If basictypeCHARACTER, can't be sure; - could be ENTITY/LOCAL w/substring ref. */ - } - } - else if (sa == FFESYMBOL_attrsetNONE) - { - assert (ffesymbol_state (s) == FFESYMBOL_stateNONE); - - if (ffeintrin_is_intrinsic (ffesymbol_text (s), t, FALSE, - &gen, &spec, &imp)) - { - if (ffeimplic_peek_symbol_type (s, NULL) - == FFEINFO_basictypeCHARACTER) - return s; /* Haven't learned anything yet. */ - - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - ffesymbol_set_generic (s, gen); - ffesymbol_set_specific (s, spec); - ffesymbol_set_implementation (s, imp); - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - 0, - FFEINFO_kindFUNCTION, - FFEINFO_whereINTRINSIC, - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - s = ffecom_sym_learned (s); - ffesymbol_reference (s, t, FALSE); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - return s; - } - - kind = FFEINFO_kindFUNCTION; - where = FFEINFO_whereGLOBAL; - maybe_ambig = TRUE; /* If basictypeCHARACTER, can't be sure; - could be ENTITY/LOCAL w/substring ref. */ - } - else - error = TRUE; - - /* Now see what we've got for a new object: NONE means a new error cropped - up; ANY means an old error to be ignored; otherwise, everything's ok, - update the object (symbol) and continue on. */ - - if (error) - ffesymbol_error (s, t); - else if (!(na & FFESYMBOL_attrsANY)) - { - ffesymbol_signal_change (s); /* May need to back up to previous - version. */ - if (!ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, t); - return s; - } - if (maybe_ambig - && (ffesymbol_basictype (s) == FFEINFO_basictypeCHARACTER)) - return s; /* Still not sure, let caller deal with it - based on (...). */ - - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - kind, - where, - ffesymbol_size (s))); - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - s = ffecom_sym_learned (s); - ffesymbol_reference (s, t, FALSE); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - } - - return s; -} - -/* ffeexpr_token_arguments_ -- OPEN_PAREN [expr COMMA]...expr - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle expression (which might be null) and COMMA or CLOSE_PAREN. */ - -static ffelexHandler -ffeexpr_token_arguments_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprExpr_ procedure; - ffebld reduced; - ffeinfo info; - ffeexprContext ctx; - bool check_intrin = FALSE; /* Set TRUE if intrinsic is REAL(Z) or AIMAG(Z). */ - - procedure = ffeexpr_stack_->exprstack; - info = ffebld_info (procedure->u.operand); - - /* Is there an expression to add? If the expression is nil, - it might still be an argument. It is if: - - - The current token is comma, or - - - The -fugly-comma flag was specified *and* the procedure - being invoked is external. - - Otherwise, if neither of the above is the case, just - ignore this (nil) expression. */ - - if ((expr != NULL) - || (ffelex_token_type (t) == FFELEX_typeCOMMA) - || (ffe_is_ugly_comma () - && (ffeinfo_where (info) == FFEINFO_whereGLOBAL))) - { - /* This expression, even if nil, is apparently intended as an argument. */ - - /* Internal procedure (CONTAINS, or statement function)? */ - - if (ffeinfo_where (info) == FFEINFO_whereCONSTANT) - { - if ((expr == NULL) - && ffebad_start (FFEBAD_NULL_ARGUMENT)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_here (1, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - - if (expr == NULL) - ; - else - { - if (ffeexpr_stack_->next_dummy == NULL) - { /* Report later which was the first extra argument. */ - if (ffeexpr_stack_->tokens[1] == NULL) - { - ffeexpr_stack_->tokens[1] = ffelex_token_use (ft); - ffeexpr_stack_->num_args = 0; - } - ++ffeexpr_stack_->num_args; /* Count # of extra arguments. */ - } - else - { - if ((ffeinfo_rank (ffebld_info (expr)) != 0) - && ffebad_start (FFEBAD_ARRAY_AS_SFARG)) - { - ffebad_here (0, - ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_here (1, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_string (ffesymbol_text (ffesymbol_sfdummyparent - (ffebld_symter (ffebld_head - (ffeexpr_stack_->next_dummy))))); - ffebad_finish (); - } - else - { - expr = ffeexpr_convert_expr (expr, ft, - ffebld_head (ffeexpr_stack_->next_dummy), - ffeexpr_stack_->tokens[0], - FFEEXPR_contextLET); - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - } - --ffeexpr_stack_->num_args; /* Count down # of args. */ - ffeexpr_stack_->next_dummy - = ffebld_trail (ffeexpr_stack_->next_dummy); - } - } - } - else - { - if ((expr == NULL) - && ffe_is_pedantic () - && ffebad_start (FFEBAD_NULL_ARGUMENT_W)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_here (1, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - } - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFACTUALARGEXPR_: - case FFEEXPR_contextSFUNCDEFINDEX_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_: - ctx = FFEEXPR_contextSFUNCDEFACTUALARG_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - assert ("bad context" == NULL); - ctx = FFEEXPR_context; - break; - - default: - ctx = FFEEXPR_contextACTUALARG_; - break; - } - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, ctx, - ffeexpr_token_arguments_); - - default: - break; - } - - if ((ffeinfo_where (info) == FFEINFO_whereCONSTANT) - && (ffeexpr_stack_->next_dummy != NULL)) - { /* Too few arguments. */ - if (ffebad_start (FFEBAD_TOO_FEW_ARGUMENTS)) - { - char num[10]; - - sprintf (num, "%" ffebldListLength_f "u", ffeexpr_stack_->num_args); - - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_string (num); - ffebad_string (ffesymbol_text (ffesymbol_sfdummyparent (ffebld_symter - (ffebld_head (ffeexpr_stack_->next_dummy))))); - ffebad_finish (); - } - for (; - ffeexpr_stack_->next_dummy != NULL; - ffeexpr_stack_->next_dummy - = ffebld_trail (ffeexpr_stack_->next_dummy)) - { - expr = ffebld_new_conter (ffebld_constant_new_integerdefault_val (0)); - ffebld_set_info (expr, ffeinfo_new_any ()); - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - } - } - - if ((ffeinfo_where (info) == FFEINFO_whereCONSTANT) - && (ffeexpr_stack_->tokens[1] != NULL)) - { /* Too many arguments to statement function. */ - if (ffebad_start (FFEBAD_TOO_MANY_ARGUMENTS)) - { - char num[10]; - - sprintf (num, "%" ffebldListLength_f "u", ffeexpr_stack_->num_args); - - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[1]), - ffelex_token_where_column (ffeexpr_stack_->tokens[1])); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_string (num); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_stack_->tokens[1]); - } - ffebld_end_list (&ffeexpr_stack_->bottom); - - if (ffebld_op (procedure->u.operand) == FFEBLD_opANY) - { - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - } - else - { - if (ffeexpr_stack_->context != FFEEXPR_contextSUBROUTINEREF) - reduced = ffebld_new_funcref (procedure->u.operand, - ffeexpr_stack_->expr); - else - reduced = ffebld_new_subrref (procedure->u.operand, - ffeexpr_stack_->expr); - if (ffebld_symter_generic (procedure->u.operand) != FFEINTRIN_genNONE) - ffeintrin_fulfill_generic (&reduced, &info, ffeexpr_stack_->tokens[0]); - else if (ffebld_symter_specific (procedure->u.operand) - != FFEINTRIN_specNONE) - ffeintrin_fulfill_specific (&reduced, &info, &check_intrin, - ffeexpr_stack_->tokens[0]); - else - ffeexpr_fulfill_call_ (&reduced, ffeexpr_stack_->tokens[0]); - - if (ffebld_op (reduced) != FFEBLD_opANY) - ffebld_set_info (reduced, - ffeinfo_new (ffeinfo_basictype (info), - ffeinfo_kindtype (info), - 0, - FFEINFO_kindENTITY, - FFEINFO_whereFLEETING, - ffeinfo_size (info))); - else - ffebld_set_info (reduced, ffeinfo_new_any ()); - } - if (ffebld_op (reduced) == FFEBLD_opFUNCREF) - reduced = ffeexpr_collapse_funcref (reduced, ffeexpr_stack_->tokens[0]); - ffeexpr_stack_->exprstack = procedure->previous; /* Pops - not-quite-operand off - stack. */ - procedure->u.operand = reduced; /* Save the line/column ffewhere - info. */ - ffeexpr_exprstack_push_operand_ (procedure); /* Push it back on stack. */ - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - { - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - ffeexpr_is_substr_ok_ = FALSE; /* Nobody likes "FUNC(3)(1:1)".... */ - - /* If the intrinsic needs checking (is REAL(Z) or AIMAG(Z), where - Z is DOUBLE COMPLEX), and a command-line option doesn't already - establish interpretation, probably complain. */ - - if (check_intrin - && !ffe_is_90 () - && !ffe_is_ugly_complex ()) - { - /* If the outer expression is REAL(me...), issue diagnostic - only if next token isn't the close-paren for REAL(me). */ - - if ((ffeexpr_stack_->previous != NULL) - && (ffeexpr_stack_->previous->exprstack != NULL) - && (ffeexpr_stack_->previous->exprstack->type == FFEEXPR_exprtypeOPERAND_) - && ((reduced = ffeexpr_stack_->previous->exprstack->u.operand) != NULL) - && (ffebld_op (reduced) == FFEBLD_opSYMTER) - && (ffebld_symter_implementation (reduced) == FFEINTRIN_impREAL)) - return (ffelexHandler) ffeexpr_token_intrincheck_; - - /* Diagnose the ambiguity now. */ - - if (ffebad_start (FFEBAD_INTRINSIC_CMPAMBIG)) - { - ffebad_string (ffeintrin_name_implementation - (ffebld_symter_implementation - (ffebld_left - (ffeexpr_stack_->exprstack->u.operand)))); - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->exprstack->token), - ffelex_token_where_column (ffeexpr_stack_->exprstack->token)); - ffebad_finish (); - } - } - return (ffelexHandler) ffeexpr_token_substrp_; - } - - if (ffest_ffebad_start (FFEBAD_INVALID_TOKEN_IN_EXPRESSION)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - ffeexpr_is_substr_ok_ = FALSE;/* Nobody likes "FUNC(3)(1:1)".... */ - return - (ffelexHandler) ffeexpr_find_close_paren_ (t, - (ffelexHandler) - ffeexpr_token_substrp_); -} - -/* ffeexpr_token_elements_ -- OPEN_PAREN [expr COMMA]...expr - - Return a pointer to this array to the lexer (ffelex), which will - invoke it for the next token. - - Handle expression and COMMA or CLOSE_PAREN. */ - -static ffelexHandler -ffeexpr_token_elements_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprExpr_ array; - ffebld reduced; - ffeinfo info; - ffeinfoWhere where; - ffetargetIntegerDefault val; - ffetargetIntegerDefault lval = 0; - ffetargetIntegerDefault uval = 0; - ffebld lbound; - ffebld ubound; - bool lcheck; - bool ucheck; - - array = ffeexpr_stack_->exprstack; - info = ffebld_info (array->u.operand); - - if ((expr == NULL) /* && ((ffeexpr_stack_->rank != 0) || - (ffelex_token_type(t) == - FFELEX_typeCOMMA)) */ ) - { - if (ffebad_start (FFEBAD_NULL_ELEMENT)) - { - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_here (1, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - if (ffeexpr_stack_->rank < ffeinfo_rank (info)) - { /* Don't bother if we're going to complain - later! */ - expr = ffebld_new_conter (ffebld_constant_new_integerdefault_val (1)); - ffebld_set_info (expr, ffeinfo_new_any ()); - } - } - - if (expr == NULL) - ; - else if (ffeinfo_rank (info) == 0) - { /* In EQUIVALENCE context, ffeinfo_rank(info) - may == 0. */ - ++ffeexpr_stack_->rank; /* Track anyway, may need for new VXT - feature. */ - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - } - else - { - ++ffeexpr_stack_->rank; - if (ffeexpr_stack_->rank > ffeinfo_rank (info)) - { /* Report later which was the first extra - element. */ - if (ffeexpr_stack_->rank == ffeinfo_rank (info) + 1) - ffeexpr_stack_->tokens[1] = ffelex_token_use (ft); - } - else - { - switch (ffeinfo_where (ffebld_info (expr))) - { - case FFEINFO_whereCONSTANT: - break; - - case FFEINFO_whereIMMEDIATE: - ffeexpr_stack_->constant = FALSE; - break; - - default: - ffeexpr_stack_->constant = FALSE; - ffeexpr_stack_->immediate = FALSE; - break; - } - if (ffebld_op (expr) == FFEBLD_opCONTER - && ffebld_kindtype (expr) == FFEINFO_kindtypeINTEGERDEFAULT) - { - val = ffebld_constant_integerdefault (ffebld_conter (expr)); - - lbound = ffebld_left (ffebld_head (ffeexpr_stack_->bound_list)); - if (lbound == NULL) - { - lcheck = TRUE; - lval = 1; - } - else if (ffebld_op (lbound) == FFEBLD_opCONTER) - { - lcheck = TRUE; - lval = ffebld_constant_integerdefault (ffebld_conter (lbound)); - } - else - lcheck = FALSE; - - ubound = ffebld_right (ffebld_head (ffeexpr_stack_->bound_list)); - assert (ubound != NULL); - if (ffebld_op (ubound) == FFEBLD_opCONTER) - { - ucheck = TRUE; - uval = ffebld_constant_integerdefault (ffebld_conter (ubound)); - } - else - ucheck = FALSE; - - if ((lcheck && (val < lval)) || (ucheck && (val > uval))) - { - ffebad_start (FFEBAD_RANGE_ARRAY); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - } - } - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - ffeexpr_stack_->bound_list = ffebld_trail (ffeexpr_stack_->bound_list); - } - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - switch (ffeexpr_context_outer_ (ffeexpr_stack_)) - { - case FFEEXPR_contextDATAIMPDOITEM_: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextDATAIMPDOINDEX_, - ffeexpr_token_elements_); - - case FFEEXPR_contextEQUIVALENCE: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextEQVINDEX_, - ffeexpr_token_elements_); - - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextSFUNCDEFINDEX_, - ffeexpr_token_elements_); - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - assert ("bad context" == NULL); - break; - - default: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextINDEX_, - ffeexpr_token_elements_); - } - - default: - break; - } - - if ((ffeexpr_stack_->rank != ffeinfo_rank (info)) - && (ffeinfo_rank (info) != 0)) - { - char num[10]; - - if (ffeexpr_stack_->rank < ffeinfo_rank (info)) - { - if (ffebad_start (FFEBAD_TOO_FEW_ELEMENTS)) - { - sprintf (num, "%d", - (int) (ffeinfo_rank (info) - ffeexpr_stack_->rank)); - - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, - ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_string (num); - ffebad_finish (); - } - } - else - { - if (ffebad_start (FFEBAD_TOO_MANY_ELEMENTS)) - { - sprintf (num, "%d", - (int) (ffeexpr_stack_->rank - ffeinfo_rank (info))); - - ffebad_here (0, - ffelex_token_where_line (ffeexpr_stack_->tokens[1]), - ffelex_token_where_column (ffeexpr_stack_->tokens[1])); - ffebad_here (1, - ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_string (num); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_stack_->tokens[1]); - } - while (ffeexpr_stack_->rank++ < ffeinfo_rank (info)) - { - expr = ffebld_new_conter (ffebld_constant_new_integerdefault_val (1)); - ffebld_set_info (expr, ffeinfo_new (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, - 0, FFEINFO_kindENTITY, - FFEINFO_whereCONSTANT, - FFETARGET_charactersizeNONE)); - ffebld_append_item (&ffeexpr_stack_->bottom, expr); - } - } - ffebld_end_list (&ffeexpr_stack_->bottom); - - if (ffebld_op (array->u.operand) == FFEBLD_opANY) - { - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - } - else - { - reduced = ffebld_new_arrayref (array->u.operand, ffeexpr_stack_->expr); - if (ffeexpr_stack_->constant) - where = FFEINFO_whereFLEETING_CADDR; - else if (ffeexpr_stack_->immediate) - where = FFEINFO_whereFLEETING_IADDR; - else - where = FFEINFO_whereFLEETING; - ffebld_set_info (reduced, - ffeinfo_new (ffeinfo_basictype (info), - ffeinfo_kindtype (info), - 0, - FFEINFO_kindENTITY, - where, - ffeinfo_size (info))); - reduced = ffeexpr_collapse_arrayref (reduced, ffeexpr_stack_->tokens[0]); - } - - ffeexpr_stack_->exprstack = array->previous; /* Pops not-quite-operand off - stack. */ - array->u.operand = reduced; /* Save the line/column ffewhere info. */ - ffeexpr_exprstack_push_operand_ (array); /* Push it back on stack. */ - - switch (ffeinfo_basictype (info)) - { - case FFEINFO_basictypeCHARACTER: - ffeexpr_is_substr_ok_ = TRUE; /* Everyone likes "FOO(3)(1:1)".... */ - break; - - case FFEINFO_basictypeNONE: - ffeexpr_is_substr_ok_ = TRUE; - assert (ffeexpr_stack_->context == FFEEXPR_contextEQUIVALENCE); - break; - - default: - ffeexpr_is_substr_ok_ = FALSE; - break; - } - - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - { - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - return (ffelexHandler) ffeexpr_token_substrp_; - } - - if (ffest_ffebad_start (FFEBAD_INVALID_TOKEN_IN_EXPRESSION)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - return - (ffelexHandler) ffeexpr_find_close_paren_ (t, - (ffelexHandler) - ffeexpr_token_substrp_); -} - -/* ffeexpr_token_equivalence_ -- OPEN_PAREN expr - - Return a pointer to this array to the lexer (ffelex), which will - invoke it for the next token. - - If token is COLON, pass off to _substr_, else init list and pass off - to _elements_. This handles the case "EQUIVALENCE (FOO(expr?", where - ? marks the token, and where FOO's rank/type has not yet been established, - meaning we could be in a list of indices or in a substring - specification. */ - -static ffelexHandler -ffeexpr_token_equivalence_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - if (ffelex_token_type (t) == FFELEX_typeCOLON) - return ffeexpr_token_substring_ (ft, expr, t); - - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - return ffeexpr_token_elements_ (ft, expr, t); -} - -/* ffeexpr_token_substring_ -- NAME(of kindENTITY) OPEN_PAREN expr - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle expression (which may be null) and COLON. */ - -static ffelexHandler -ffeexpr_token_substring_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeexprExpr_ string; - ffeinfo info; - ffetargetIntegerDefault i; - ffeexprContext ctx; - ffetargetCharacterSize size; - - string = ffeexpr_stack_->exprstack; - info = ffebld_info (string->u.operand); - size = ffebld_size_max (string->u.operand); - - if (ffelex_token_type (t) == FFELEX_typeCOLON) - { - if ((expr != NULL) - && (ffebld_op (expr) == FFEBLD_opCONTER) - && (((i = ffebld_constant_integerdefault (ffebld_conter (expr))) - < 1) - || ((size != FFETARGET_charactersizeNONE) && (i > size)))) - { - ffebad_start (FFEBAD_RANGE_SUBSTR); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - } - ffeexpr_stack_->expr = expr; - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - ctx = FFEEXPR_contextSFUNCDEFINDEX_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - assert ("bad context" == NULL); - ctx = FFEEXPR_context; - break; - - default: - ctx = FFEEXPR_contextINDEX_; - break; - } - - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, ctx, - ffeexpr_token_substring_1_); - } - - if (ffest_ffebad_start (FFEBAD_MISSING_COLON_IN_SUBSTR)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - - ffeexpr_stack_->expr = NULL; - return (ffelexHandler) ffeexpr_token_substring_1_ (ft, expr, t); -} - -/* ffeexpr_token_substring_1_ -- NAME OPEN_PAREN [expr COMMA]...expr - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - Handle expression (which might be null) and CLOSE_PAREN. */ - -static ffelexHandler -ffeexpr_token_substring_1_ (ffelexToken ft, ffebld last, ffelexToken t) -{ - ffeexprExpr_ string; - ffebld reduced; - ffebld substrlist; - ffebld first = ffeexpr_stack_->expr; - ffebld strop; - ffeinfo info; - ffeinfoWhere lwh; - ffeinfoWhere rwh; - ffeinfoWhere where; - ffeinfoKindtype first_kt; - ffeinfoKindtype last_kt; - ffetargetIntegerDefault first_val; - ffetargetIntegerDefault last_val; - ffetargetCharacterSize size; - ffetargetCharacterSize strop_size_max; - bool first_known; - - string = ffeexpr_stack_->exprstack; - strop = string->u.operand; - info = ffebld_info (strop); - - if (first == NULL - || (ffebld_op (first) == FFEBLD_opCONTER - && ffebld_kindtype (first) == FFEINFO_kindtypeINTEGERDEFAULT)) - { /* The starting point is known. */ - first_val = (first == NULL) ? 1 - : ffebld_constant_integerdefault (ffebld_conter (first)); - first_known = TRUE; - } - else - { /* Assume start of the entity. */ - first_val = 1; - first_known = FALSE; - } - - if (last != NULL - && (ffebld_op (last) == FFEBLD_opCONTER - && ffebld_kindtype (last) == FFEINFO_kindtypeINTEGERDEFAULT)) - { /* The ending point is known. */ - last_val = ffebld_constant_integerdefault (ffebld_conter (last)); - - if (first_known) - { /* The beginning point is a constant. */ - if (first_val <= last_val) - size = last_val - first_val + 1; - else - { - if (0 && ffe_is_90 ()) - size = 0; - else - { - size = 1; - ffebad_start (FFEBAD_ZERO_SIZE); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - } - } - } - else - size = FFETARGET_charactersizeNONE; - - strop_size_max = ffebld_size_max (strop); - - if ((strop_size_max != FFETARGET_charactersizeNONE) - && (last_val > strop_size_max)) - { /* Beyond maximum possible end of string. */ - ffebad_start (FFEBAD_RANGE_SUBSTR); - ffebad_here (0, ffelex_token_where_line (ft), - ffelex_token_where_column (ft)); - ffebad_finish (); - } - } - else - size = FFETARGET_charactersizeNONE; /* The size is not known. */ - -#if 0 /* Don't do this, or "is size of target - known?" would no longer be easily - answerable. To see if there is a max - size, use ffebld_size_max; to get only the - known size, else NONE, use - ffebld_size_known; use ffebld_size if - values are sure to be the same (not - opSUBSTR or opCONCATENATE or known to have - known length). By getting rid of this - "useful info" stuff, we don't end up - blank-padding the constant in the - assignment "A(I:J)='XYZ'" to the known - length of A. */ - if (size == FFETARGET_charactersizeNONE) - size = strop_size_max; /* Assume we use the entire string. */ -#endif - - substrlist - = ffebld_new_item - (first, - ffebld_new_item - (last, - NULL - ) - ) - ; - - if (first == NULL) - lwh = FFEINFO_whereCONSTANT; - else - lwh = ffeinfo_where (ffebld_info (first)); - if (last == NULL) - rwh = FFEINFO_whereCONSTANT; - else - rwh = ffeinfo_where (ffebld_info (last)); - - switch (lwh) - { - case FFEINFO_whereCONSTANT: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - where = FFEINFO_whereCONSTANT; - break; - - case FFEINFO_whereIMMEDIATE: - where = FFEINFO_whereIMMEDIATE; - break; - - default: - where = FFEINFO_whereFLEETING; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (rwh) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: - where = FFEINFO_whereIMMEDIATE; - break; - - default: - where = FFEINFO_whereFLEETING; - break; - } - break; - - default: - where = FFEINFO_whereFLEETING; - break; - } - - if (first == NULL) - first_kt = FFEINFO_kindtypeINTEGERDEFAULT; - else - first_kt = ffeinfo_kindtype (ffebld_info (first)); - if (last == NULL) - last_kt = FFEINFO_kindtypeINTEGERDEFAULT; - else - last_kt = ffeinfo_kindtype (ffebld_info (last)); - - switch (where) - { - case FFEINFO_whereCONSTANT: - switch (ffeinfo_where (info)) - { - case FFEINFO_whereCONSTANT: - break; - - case FFEINFO_whereIMMEDIATE: /* Not possible, actually. */ - where = FFEINFO_whereIMMEDIATE; - break; - - default: - where = FFEINFO_whereFLEETING_CADDR; - break; - } - break; - - case FFEINFO_whereIMMEDIATE: - switch (ffeinfo_where (info)) - { - case FFEINFO_whereCONSTANT: - case FFEINFO_whereIMMEDIATE: /* Not possible, actually. */ - break; - - default: - where = FFEINFO_whereFLEETING_IADDR; - break; - } - break; - - default: - switch (ffeinfo_where (info)) - { - case FFEINFO_whereCONSTANT: - where = FFEINFO_whereCONSTANT_SUBOBJECT; /* An F90 concept. */ - break; - - case FFEINFO_whereIMMEDIATE: /* Not possible, actually. */ - default: - where = FFEINFO_whereFLEETING; - break; - } - break; - } - - if (ffebld_op (strop) == FFEBLD_opANY) - { - reduced = ffebld_new_any (); - ffebld_set_info (reduced, ffeinfo_new_any ()); - } - else - { - reduced = ffebld_new_substr (strop, substrlist); - ffebld_set_info (reduced, ffeinfo_new - (FFEINFO_basictypeCHARACTER, - ffeinfo_kindtype (info), - 0, - FFEINFO_kindENTITY, - where, - size)); - reduced = ffeexpr_collapse_substr (reduced, ffeexpr_stack_->tokens[0]); - } - - ffeexpr_stack_->exprstack = string->previous; /* Pops not-quite-operand off - stack. */ - string->u.operand = reduced; /* Save the line/column ffewhere info. */ - ffeexpr_exprstack_push_operand_ (string); /* Push it back on stack. */ - - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - { - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - ffeexpr_is_substr_ok_ = FALSE; /* Nobody likes "FOO(3:5)(1:1)".... */ - return (ffelexHandler) ffeexpr_token_substrp_; - } - - if (ffest_ffebad_start (FFEBAD_INVALID_TOKEN_IN_EXPRESSION)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->tokens[0]), - ffelex_token_where_column (ffeexpr_stack_->tokens[0])); - ffebad_finish (); - } - - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - ffeexpr_is_substr_ok_ = FALSE;/* Nobody likes "FOO(3:5)(1:1)".... */ - return - (ffelexHandler) ffeexpr_find_close_paren_ (t, - (ffelexHandler) - ffeexpr_token_substrp_); -} - -/* ffeexpr_token_substrp_ -- Rhs - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - If OPEN_PAREN, treat as start of a substring ("(3:4)") construct, and - issue error message if flag (serves as argument) is set. Else, just - forward token to binary_. */ - -static ffelexHandler -ffeexpr_token_substrp_ (ffelexToken t) -{ - ffeexprContext ctx; - - if (ffelex_token_type (t) != FFELEX_typeOPEN_PAREN) - return (ffelexHandler) ffeexpr_token_binary_ (t); - - ffeexpr_stack_->tokens[0] = ffelex_token_use (t); - - switch (ffeexpr_stack_->context) - { - case FFEEXPR_contextSFUNCDEF: - case FFEEXPR_contextSFUNCDEFINDEX_: - ctx = FFEEXPR_contextSFUNCDEFINDEX_; - break; - - case FFEEXPR_contextSFUNCDEFACTUALARG_: - case FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_: - assert ("bad context" == NULL); - ctx = FFEEXPR_context; - break; - - default: - ctx = FFEEXPR_contextINDEX_; - break; - } - - if (!ffeexpr_is_substr_ok_) - { - if (ffebad_start (FFEBAD_BAD_SUBSTR)) - { - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ffeexpr_stack_->exprstack->token), - ffelex_token_where_column (ffeexpr_stack_->exprstack->token)); - ffebad_finish (); - } - - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, ctx, - ffeexpr_token_anything_); - } - - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, ctx, - ffeexpr_token_substring_); -} - -static ffelexHandler -ffeexpr_token_intrincheck_ (ffelexToken t) -{ - if ((ffelex_token_type (t) != FFELEX_typeCLOSE_PAREN) - && ffebad_start (FFEBAD_INTRINSIC_CMPAMBIG)) - { - ffebad_string (ffeintrin_name_implementation - (ffebld_symter_implementation - (ffebld_left - (ffeexpr_stack_->exprstack->u.operand)))); - ffebad_here (0, ffelex_token_where_line (ffeexpr_stack_->exprstack->token), - ffelex_token_where_column (ffeexpr_stack_->exprstack->token)); - ffebad_finish (); - } - - return (ffelexHandler) ffeexpr_token_substrp_ (t); -} - -/* ffeexpr_token_funsubstr_ -- NAME OPEN_PAREN expr - - Return a pointer to this function to the lexer (ffelex), which will - invoke it for the next token. - - If COLON, do everything we would have done since _parenthesized_ if - we had known NAME represented a kindENTITY instead of a kindFUNCTION. - If not COLON, do likewise for kindFUNCTION instead. */ - -static ffelexHandler -ffeexpr_token_funsubstr_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffeinfoWhere where; - ffesymbol s; - ffesymbolAttrs sa; - ffebld symter = ffeexpr_stack_->exprstack->u.operand; - bool needs_type; - ffeintrinGen gen; - ffeintrinSpec spec; - ffeintrinImp imp; - - s = ffebld_symter (symter); - sa = ffesymbol_attrs (s); - where = ffesymbol_where (s); - - /* We get here only if we don't already know enough about FOO when seeing a - FOO(stuff) reference, and FOO might turn out to be a CHARACTER type. If - "stuff" is a substring reference, then FOO is a CHARACTER scalar type. - Else FOO is a function, either intrinsic or external. If intrinsic, it - wouldn't necessarily be CHARACTER type, so unless it has already been - declared DUMMY, it hasn't had its type established yet. It can't be - CHAR*(*) in any case, though it can have an explicit CHAR*n type. */ - - assert (!(sa & ~(FFESYMBOL_attrsDUMMY - | FFESYMBOL_attrsTYPE))); - - needs_type = !(ffesymbol_attrs (s) & FFESYMBOL_attrsDUMMY); - - ffesymbol_signal_change (s); /* Probably already done, but in case.... */ - - if (ffelex_token_type (t) == FFELEX_typeCOLON) - { /* Definitely an ENTITY (char substring). */ - if (needs_type && !ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, ffeexpr_stack_->tokens[0]); - return (ffelexHandler) ffeexpr_token_arguments_ (ft, expr, t); - } - - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - FFEINFO_kindENTITY, - (where == FFEINFO_whereNONE) - ? FFEINFO_whereLOCAL - : where, - ffesymbol_size (s))); - ffebld_set_info (symter, ffeinfo_use (ffesymbol_info (s))); - - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - s = ffecom_sym_learned (s); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - - ffeexpr_stack_->exprstack->u.operand - = ffeexpr_collapse_symter (symter, ffeexpr_tokens_[0]); - - return (ffelexHandler) ffeexpr_token_substring_ (ft, expr, t); - } - - /* The "stuff" isn't a substring notation, so we now know the overall - reference is to a function. */ - - if (ffeintrin_is_intrinsic (ffesymbol_text (s), ffeexpr_stack_->tokens[0], - FALSE, &gen, &spec, &imp)) - { - ffebld_symter_set_generic (symter, gen); - ffebld_symter_set_specific (symter, spec); - ffebld_symter_set_implementation (symter, imp); - ffesymbol_set_generic (s, gen); - ffesymbol_set_specific (s, spec); - ffesymbol_set_implementation (s, imp); - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - 0, - FFEINFO_kindFUNCTION, - FFEINFO_whereINTRINSIC, - ffesymbol_size (s))); - } - else - { /* Not intrinsic, now needs CHAR type. */ - if (!ffeimplic_establish_symbol (s)) - { - ffesymbol_error (s, ffeexpr_stack_->tokens[0]); - return (ffelexHandler) ffeexpr_token_arguments_ (ft, expr, t); - } - - ffesymbol_set_info (s, - ffeinfo_new (ffesymbol_basictype (s), - ffesymbol_kindtype (s), - ffesymbol_rank (s), - FFEINFO_kindFUNCTION, - (where == FFEINFO_whereNONE) - ? FFEINFO_whereGLOBAL - : where, - ffesymbol_size (s))); - } - - ffebld_set_info (symter, ffeinfo_use (ffesymbol_info (s))); - - ffesymbol_set_state (s, FFESYMBOL_stateUNDERSTOOD); - ffesymbol_resolve_intrin (s); - s = ffecom_sym_learned (s); - ffesymbol_reference (s, ffeexpr_stack_->tokens[0], FALSE); - ffesymbol_signal_unreported (s); /* For debugging purposes. */ - ffebld_init_list (&ffeexpr_stack_->expr, &ffeexpr_stack_->bottom); - return (ffelexHandler) ffeexpr_token_arguments_ (ft, expr, t); -} - -/* ffeexpr_token_anything_ -- NAME OPEN_PAREN any-expr - - Handle basically any expression, looking for CLOSE_PAREN. */ - -static ffelexHandler -ffeexpr_token_anything_ (ffelexToken ft UNUSED, ffebld expr UNUSED, - ffelexToken t) -{ - ffeexprExpr_ e = ffeexpr_stack_->exprstack; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLON: - return (ffelexHandler) ffeexpr_rhs (ffeexpr_stack_->pool, - FFEEXPR_contextACTUALARG_, - ffeexpr_token_anything_); - - default: - e->u.operand = ffebld_new_any (); - ffebld_set_info (e->u.operand, ffeinfo_new_any ()); - ffelex_token_kill (ffeexpr_stack_->tokens[0]); - ffeexpr_is_substr_ok_ = FALSE; - if (ffelex_token_type (t) == FFELEX_typeCLOSE_PAREN) - return (ffelexHandler) ffeexpr_token_substrp_; - return (ffelexHandler) ffeexpr_token_substrp_ (t); - } -} - -/* Terminate module. */ - -void -ffeexpr_terminate_2 (void) -{ - assert (ffeexpr_stack_ == NULL); - assert (ffeexpr_level_ == 0); -} diff --git a/contrib/gcc/f/expr.h b/contrib/gcc/f/expr.h deleted file mode 100644 index b82173b..0000000 --- a/contrib/gcc/f/expr.h +++ /dev/null @@ -1,194 +0,0 @@ -/* expr.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - expr.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_EXPR_H -#define GCC_F_EXPR_H - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFEEXPR_contextLET, - FFEEXPR_contextASSIGN, - FFEEXPR_contextIOLIST, - FFEEXPR_contextPARAMETER, - FFEEXPR_contextSUBROUTINEREF, - FFEEXPR_contextDATA, - FFEEXPR_contextIF, - FFEEXPR_contextARITHIF, - FFEEXPR_contextDO, - FFEEXPR_contextDOWHILE, - FFEEXPR_contextFORMAT, - FFEEXPR_contextAGOTO, - FFEEXPR_contextCGOTO, - FFEEXPR_contextCHARACTERSIZE, - FFEEXPR_contextEQUIVALENCE, - FFEEXPR_contextSTOP, - FFEEXPR_contextRETURN, - FFEEXPR_contextSFUNCDEF, - FFEEXPR_contextINCLUDE, - FFEEXPR_contextWHERE, - FFEEXPR_contextSELECTCASE, - FFEEXPR_contextCASE, - FFEEXPR_contextDIMLIST, - FFEEXPR_contextDIMLISTCOMMON, /* Dim list in COMMON stmt. */ - FFEEXPR_contextFILEASSOC, /* ASSOCIATEVARIABLE=. */ - FFEEXPR_contextFILEINT, /* IOSTAT=. */ - FFEEXPR_contextFILEDFINT, /* NEXTREC=. */ - FFEEXPR_contextFILELOG, /* NAMED=. */ - FFEEXPR_contextFILENUM, /* Numerical expression. */ - FFEEXPR_contextFILECHAR, /* Character expression. */ - FFEEXPR_contextFILENUMCHAR, /* READ KEYxyz=. */ - FFEEXPR_contextFILEDFCHAR, /* Default kind character expression. */ - FFEEXPR_contextFILEKEY, /* OPEN KEY=. */ - FFEEXPR_contextFILEEXTFUNC, /* USEROPEN=. */ - FFEEXPR_contextFILEUNIT, /* READ/WRITE UNIT=. */ - FFEEXPR_contextFILEUNIT_DF, /* DEFINE FILE unit (no "(" after it). */ - FFEEXPR_contextFILEFORMATNML, /* [FMT=] or [NML=]. */ - FFEEXPR_contextFILEFORMAT, /* FMT=. */ - FFEEXPR_contextFILENAMELIST,/* NML=. */ - FFEEXPR_contextFILENUMAMBIG,/* BACKSPACE, ENDFILE, REWIND, UNLOCK... - where at e.g. BACKSPACE(, if COMMA seen - before ), it is ok. */ - FFEEXPR_contextFILEUNITAMBIG, /* READ(, if COMMA seen before ), ok. */ - FFEEXPR_contextFILEVXTCODE, /* ENCODE/DECODE third arg (scalar/array). */ - FFEEXPR_contextALLOCATE, /* ALLOCATE objects (weird). */ - FFEEXPR_contextDEALLOCATE, /* DEALLOCATE objects (weird). */ - FFEEXPR_contextHEAPSTAT, /* ALLOCATE/DEALLOCATE STAT= variable. */ - FFEEXPR_contextKINDTYPE, /* KIND=. */ - FFEEXPR_contextINITVAL, /* R426 =initialization-expr. */ - FFEEXPR_contextNULLIFY, /* Pointer names only (F90) or pointers. */ - FFEEXPR_contextIOLISTDF, /* IOLIST w/internal file (V112 9-14 30,31). */ - FFEEXPR_contextINDEX_, /* Element dimension or substring value. */ - FFEEXPR_contextEQVINDEX_, /* EQUIVALENCE element dimension. */ - FFEEXPR_contextDATAIMPDOINDEX_, /* INDEX in DATAIMPDO context. */ - FFEEXPR_contextIMPDOITEM_, - FFEEXPR_contextIMPDOITEMDF_,/* to ...ITEM_ as IOLISTDF is to IOLIST. */ - FFEEXPR_contextIMPDOCTRL_, - FFEEXPR_contextDATAIMPDOITEM_, - FFEEXPR_contextDATAIMPDOCTRL_, - FFEEXPR_contextLOC_, - FFEEXPR_contextACTUALARG_, /* Actual arg to function or subroutine; - turns into ACTUALARGEXPR_ if tokens not - NAME (CLOSE_PAREN/COMMA) or PERCENT.... */ - FFEEXPR_contextACTUALARGEXPR_, /* Like LET but disallow CHAR*(*) - concats. */ - FFEEXPR_contextINDEXORACTUALARG_, /* "CHARACTER FOO; PRINT *,FOO(?". */ - FFEEXPR_contextINDEXORACTUALARGEXPR_, /* ? not NAME - (CLOSE_PAREN/COMMA). */ - FFEEXPR_contextSFUNCDEFINDEX_, /* INDEX_ within stmt-func def. */ - FFEEXPR_contextSFUNCDEFACTUALARG_, - FFEEXPR_contextSFUNCDEFACTUALARGEXPR_, - FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_, - FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_, - FFEEXPR_contextPAREN_, /* Rhs paren except in LET context. */ - FFEEXPR_contextPARENFILENUM_, /* Either PAREN or FILENUM context. */ - FFEEXPR_contextPARENFILEUNIT_, /* Either PAREN or FILEUNIT context. */ - FFEEXPR_context - } ffeexprContext; - -/* Typedefs. */ - - -/* Include files needed by this one. */ - -#include "bld.h" -#include "lex.h" -#include "malloc.h" - -/* Structure definitions. */ - -typedef ffelexHandler (*ffeexprCallback) (ffelexToken ft, ffebld expr, - ffelexToken t); - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -ffebld ffeexpr_collapse_convert (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_paren (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_uplus (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_uminus (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_not (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_add (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_subtract (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_multiply (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_divide (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_power (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_concatenate (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_lt (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_le (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_eq (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_ne (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_gt (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_ge (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_and (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_or (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_xor (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_eqv (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_neqv (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_symter (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_funcref (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_arrayref (ffebld expr, ffelexToken t); -ffebld ffeexpr_collapse_substr (ffebld expr, ffelexToken t); -ffebld ffeexpr_convert (ffebld source, ffelexToken source_token, - ffelexToken dest_token, ffeinfoBasictype bt, ffeinfoKindtype kt, - ffeinfoRank rk, ffetargetCharacterSize sz, - ffeexprContext context); -ffebld ffeexpr_convert_expr (ffebld source, ffelexToken source_token, - ffebld dest, ffelexToken dest_token, - ffeexprContext context); -ffebld ffeexpr_convert_to_sym (ffebld source, ffelexToken source_token, - ffesymbol dest, ffelexToken dest_token); -void ffeexpr_init_2 (void); -ffelexHandler ffeexpr_rhs (mallocPool pool, ffeexprContext context, - ffeexprCallback callback); -ffelexHandler ffeexpr_lhs (mallocPool pool, ffeexprContext context, - ffeexprCallback callback); -void ffeexpr_terminate_2 (void); -void ffeexpr_type_combine (ffeinfoBasictype *nbt, ffeinfoKindtype *nkt, - ffeinfoBasictype lbt, ffeinfoKindtype lkt, - ffeinfoBasictype rbt, ffeinfoKindtype rkt, - ffelexToken t); - -/* Define macros. */ - -#define ffeexpr_init_0() -#define ffeexpr_init_1() -#define ffeexpr_init_3() -#define ffeexpr_init_4() -#define ffeexpr_terminate_0() -#define ffeexpr_terminate_1() -#define ffeexpr_terminate_3() -#define ffeexpr_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_EXPR_H */ diff --git a/contrib/gcc/f/ffe.texi b/contrib/gcc/f/ffe.texi deleted file mode 100644 index fd5d3bf..0000000 --- a/contrib/gcc/f/ffe.texi +++ /dev/null @@ -1,2063 +0,0 @@ -@c Copyright (C) 1999, 2003 Free Software Foundation, Inc. -@c This is part of the G77 manual. -@c For copying conditions, see the file g77.texi. - -@node Front End -@chapter Front End -@cindex GNU Fortran Front End (FFE) -@cindex FFE -@cindex @code{g77}, front end -@cindex front end, @code{g77} - -This chapter describes some aspects of the design and implementation -of the @code{g77} front end. - -To find about things that are ``To Be Determined'' or ``To Be Done'', -search for the string TBD. -If you want to help by working on one or more of these items, -email @email{gcc@@gcc.gnu.org}. -If you're planning to do more than just research issues and offer comments, -see @uref{http://gcc.gnu.org/contribute.html} for steps you might -need to take first. - -@menu -* Overview of Sources:: -* Overview of Translation Process:: -* Philosophy of Code Generation:: -* Two-pass Design:: -* Challenges Posed:: -* Transforming Statements:: -* Transforming Expressions:: -* Internal Naming Conventions:: -@end menu - -@node Overview of Sources -@section Overview of Sources - -The current directory layout includes the following: - -@table @file -@item @var{srcdir}/gcc/ -Non-g77 files in gcc - -@item @var{srcdir}/gcc/f/ -GNU Fortran front end sources - -@item @var{srcdir}/libf2c/ -@code{libg2c} configuration and @code{g2c.h} file generation - -@item @var{srcdir}/libf2c/libF77/ -General support and math portion of @code{libg2c} - -@item @var{srcdir}/libf2c/libI77/ -I/O portion of @code{libg2c} - -@item @var{srcdir}/libf2c/libU77/ -Additional interfaces to Unix @code{libc} for @code{libg2c} -@end table - -Components of note in @code{g77} are described below. - -@file{f/} as a whole contains the source for @code{g77}, -while @file{libf2c/} contains a portion of the separate program -@code{f2c}. -Note that the @code{libf2c} code is not part of the program @code{g77}, -just distributed with it. - -@file{f/} contains text files that document the Fortran compiler, source -files for the GNU Fortran Front End (FFE), and some other stuff. -The @code{g77} compiler code is placed in @file{f/} because it, -along with its contents, -is designed to be a subdirectory of a @code{gcc} source directory, -@file{gcc/}, -which is structured so that language-specific front ends can be ``dropped -in'' as subdirectories. -The C++ front end (@code{g++}), is an example of this---it resides in -the @file{cp/} subdirectory. -Note that the C front end (also referred to as @code{gcc}) -is an exception to this, as its source files reside -in the @file{gcc/} directory itself. - -@file{libf2c/} contains the run-time libraries for the @code{f2c} program, -also used by @code{g77}. -These libraries normally referred to collectively as @code{libf2c}. -When built as part of @code{g77}, -@code{libf2c} is installed under the name @code{libg2c} to avoid -conflict with any existing version of @code{libf2c}, -and thus is often referred to as @code{libg2c} when the -@code{g77} version is specifically being referred to. - -The @code{netlib} version of @code{libf2c/} -contains two distinct libraries, -@code{libF77} and @code{libI77}, -each in their own subdirectories. -In @code{g77}, this distinction is not made, -beyond maintaining the subdirectory structure in the source-code tree. - -@file{libf2c/} is not part of the program @code{g77}, -just distributed with it. -It contains files not present -in the official (@code{netlib}) version of @code{libf2c}, -and also contains some minor changes made from @code{libf2c}, -to fix some bugs, -and to facilitate automatic configuration, building, and installation of -@code{libf2c} (as @code{libg2c}) for use by @code{g77} users. -See @file{libf2c/README} for more information, -including licensing conditions -governing distribution of programs containing code from @code{libg2c}. - -@code{libg2c}, @code{g77}'s version of @code{libf2c}, -adds Dave Love's implementation of @code{libU77}, -in the @file{libf2c/libU77/} directory. -This library is distributed under the -GNU Library General Public License (LGPL)---see the -file @file{libf2c/libU77/COPYING.LIB} -for more information, -as this license -governs distribution conditions for programs containing code -from this portion of the library. - -Files of note in @file{f/} and @file{libf2c/} are described below: - -@table @file -@item f/BUGS -Lists some important bugs known to be in g77. -Or use Info (or GNU Emacs Info mode) to read -the ``Actual Bugs'' node of the @code{g77} documentation: - -@smallexample -info -f f/g77.info -n "Actual Bugs" -@end smallexample - -@item f/ChangeLog -Lists recent changes to @code{g77} internals. - -@item libf2c/ChangeLog -Lists recent changes to @code{libg2c} internals. - -@item f/NEWS -Contains the per-release changes. -These include the user-visible -changes described in the node ``Changes'' -in the @code{g77} documentation, plus internal -changes of import. -Or use: - -@smallexample -info -f f/g77.info -n News -@end smallexample - -@item f/g77.info* -The @code{g77} documentation, in Info format, -produced by building @code{g77}. - -All users of @code{g77} (not just installers) should read this, -using the @code{more} command if neither the @code{info} command, -nor GNU Emacs (with its Info mode), are available, or if users -aren't yet accustomed to using these tools. -All of these files are readable as ``plain text'' files, -though they're easier to navigate using Info readers -such as @code{info} and GNU Emacs Info mode. -@end table - -If you want to explore the FFE code, which lives entirely in @file{f/}, -here are a few clues. -The file @file{g77spec.c} contains the @code{g77}-specific source code -for the @code{g77} command only---this just forms a variant of the -@code{gcc} command, so, -just as the @code{gcc} command itself does not contain the C front end, -the @code{g77} command does not contain the Fortran front end (FFE). -The FFE code ends up in an executable named @file{f771}, -which does the actual compiling, -so it contains the FFE plus the @code{gcc} back end (GBE), -the latter to do most of the optimization, and the code generation. - -The file @file{parse.c} is the source file for @code{yyparse()}, -which is invoked by the GBE to start the compilation process, -for @file{f771}. - -The file @file{top.c} contains the top-level FFE function @code{ffe_file} -and it (along with top.h) define all @samp{ffe_[a-z].*}, @samp{ffe[A-Z].*}, -and @samp{FFE_[A-Za-z].*} symbols. - -The file @file{fini.c} is a @code{main()} program that is used when building -the FFE to generate C header and source files for recognizing keywords. -The files @file{malloc.c} and @file{malloc.h} comprise a memory manager -that defines all @samp{malloc_[a-z].*}, @samp{malloc[A-Z].*}, and -@samp{MALLOC_[A-Za-z].*} symbols. - -All other modules named @var{xyz} -are comprised of all files named @samp{@var{xyz}*.@var{ext}} -and define all @samp{ffe@var{xyz}_[a-z].*}, @samp{ffe@var{xyz}[A-Z].*}, -and @samp{FFE@var{XYZ}_[A-Za-z].*} symbols. -If you understand all this, congratulations---it's easier for me to remember -how it works than to type in these regular expressions. -But it does make it easy to find where a symbol is defined. -For example, the symbol @samp{ffexyz_set_something} would be defined -in @file{xyz.h} and implemented there (if it's a macro) or in @file{xyz.c}. - -The ``porting'' files of note currently are: - -@table @file -@item proj.h -This defines the ``language'' used by all the other source files, -the language being Standard C plus some useful things -like @code{ARRAY_SIZE} and such. - -@item target.c -@itemx target.h -These describe the target machine -in terms of what data types are supported, -how they are denoted -(to what C type does an @code{INTEGER*8} map, for example), -how to convert between them, -and so on. -Over time, versions of @code{g77} rely less on this file -and more on run-time configuration based on GBE info -in @file{com.c}. - -@item com.c -@itemx com.h -These are the primary interface to the GBE. - -@item ste.c -@itemx ste.h -This contains code for implementing recognized executable statements -in the GBE. - -@item src.c -@itemx src.h -These contain information on the format(s) of source files -(such as whether they are never to be processed as case-insensitive -with regard to Fortran keywords). -@end table - -If you want to debug the @file{f771} executable, -for example if it crashes, -note that the global variables @code{lineno} and @code{input_filename} -are usually set to reflect the current line being read by the lexer -during the first-pass analysis of a program unit and to reflect -the current line being processed during the second-pass compilation -of a program unit. - -If an invocation of the function @code{ffestd_exec_end} is on the stack, -the compiler is in the second pass, otherwise it is in the first. - -(This information might help you reduce a test case and/or work around -a bug in @code{g77} until a fix is available.) - -@node Overview of Translation Process -@section Overview of Translation Process - -The order of phases translating source code to the form accepted -by the GBE is: - -@enumerate -@item -Stripping punched-card sources (@file{g77stripcard.c}) - -@item -Lexing (@file{lex.c}) - -@item -Stand-alone statement identification (@file{sta.c}) - -@item -INCLUDE handling (@file{sti.c}) - -@item -Order-dependent statement identification (@file{stq.c}) - -@item -Parsing (@file{stb.c} and @file{expr.c}) - -@item -Constructing (@file{stc.c}) - -@item -Collecting (@file{std.c}) - -@item -Expanding (@file{ste.c}) -@end enumerate - -To get a rough idea of how a particularly twisted Fortran statement -gets treated by the passes, consider: - -@smallexample - FORMAT(I2 4H)=(J/ - & I3) -@end smallexample - -The job of @file{lex.c} is to know enough about Fortran syntax rules -to break the statement up into distinct lexemes without requiring -any feedback from subsequent phases: - -@smallexample -`FORMAT' -`(' -`I24H' -`)' -`=' -`(' -`J' -`/' -`I3' -`)' -@end smallexample - -The job of @file{sta.c} is to figure out the kind of statement, -or, at least, statement form, that sequence of lexemes represent. - -The sooner it can do this (in terms of using the smallest number of -lexemes, starting with the first for each statement), the better, -because that leaves diagnostics for problems beyond the recognition -of the statement form to subsequent phases, -which can usually better describe the nature of the problem. - -In this case, the @samp{=} at ``level zero'' -(not nested within parentheses) -tells @file{sta.c} that this is an @emph{assignment-form}, -not @code{FORMAT}, statement. - -An assignment-form statement might be a statement-function -definition or an executable assignment statement. - -To make that determination, -@file{sta.c} looks at the first two lexemes. - -Since the second lexeme is @samp{(}, -the first must represent an array for this to be an assignment statement, -else it's a statement function. - -Either way, @file{sta.c} hands off the statement to @file{stq.c} -(via @file{sti.c}, which expands INCLUDE files). -@file{stq.c} figures out what a statement that is, -on its own, ambiguous, must actually be based on the context -established by previous statements. - -So, @file{stq.c} watches the statement stream for executable statements, -END statements, and so on, so it knows whether @samp{A(B)=C} is -(intended as) a statement-function definition or an assignment statement. - -After establishing the context-aware statement info, @file{stq.c} -passes the original sample statement on to @file{stb.c} -(either its statement-function parser or its assignment-statement parser). - -@file{stb.c} forms a -statement-specific record containing the pertinent information. -That information includes a source expression and, -for an assignment statement, a destination expression. -Expressions are parsed by @file{expr.c}. - -This record is passed to @file{stc.c}, -which copes with the implications of the statement -within the context established by previous statements. - -For example, if it's the first statement in the file -or after an @code{END} statement, -@file{stc.c} recognizes that, first of all, -a main program unit is now being lexed -(and tells that to @file{std.c} -before telling it about the current statement). - -@file{stc.c} attaches whatever information it can, -usually derived from the context established by the preceding statements, -and passes the information to @file{std.c}. - -@file{std.c} saves this information away, -since the GBE cannot cope with information -that might be incomplete at this stage. - -For example, @samp{I3} might later be determined -to be an argument to an alternate @code{ENTRY} point. - -When @file{std.c} is told about the end of an external (top-level) -program unit, -it passes all the information it has saved away -on statements in that program unit -to @file{ste.c}. - -@file{ste.c} ``expands'' each statement, in sequence, by -constructing the appropriate GBE information and calling -the appropriate GBE routines. - -Details on the transformational phases follow. -Keep in mind that Fortran numbering is used, -so the first character on a line is column 1, -decimal numbering is used, and so on. - -@menu -* g77stripcard:: -* lex.c:: -* sta.c:: -* sti.c:: -* stq.c:: -* stb.c:: -* expr.c:: -* stc.c:: -* std.c:: -* ste.c:: - -* Gotchas (Transforming):: -* TBD (Transforming):: -@end menu - -@node g77stripcard -@subsection g77stripcard - -The @code{g77stripcard} program handles removing content beyond -column 72 (adjustable via a command-line option), -optionally warning about that content being something other -than trailing whitespace or Fortran commentary. - -This program is needed because @code{lex.c} doesn't pay attention -to maximum line lengths at all, to make it easier to maintain, -as well as faster (for sources that don't depend on the maximum -column length vis-a-vis trailing non-blank non-commentary content). - -Just how this program will be run---whether automatically for -old source (perhaps as the default for @file{.f} files?)---is not -yet determined. - -In the meantime, it might as well be implemented as a typical UNIX pipe. - -It should accept a @samp{-fline-length-@var{n}} option, -with the default line length set to 72. - -When the text it strips off the end of a line is not blank -(not spaces and tabs), -it should insert an additional comment line -(beginning with @samp{!}, -so it works for both fixed-form and free-form files) -containing the text, -following the stripped line. -The inserted comment should have a prefix of some kind, -TBD, that distinguishes the comment as representing stripped text. -Users could use that to @code{sed} out such lines, if they wished---it -seems silly to provide a command-line option to delete information -when it can be so easily filtered out by another program. - -(This inserted comment should be designed to ``fit in'' well -with whatever the Fortran community is using these days for -preprocessor, translator, and other such products, like OpenMP. -What that's all about, and how @code{g77} can elegantly fit its -special comment conventions into it all, is TBD as well. -We don't want to reinvent the wheel here, but if there turn out -to be too many conflicting conventions, we might have to invent -one that looks nothing like the others, but which offers their -host products a better infrastructure in which to fit and coexist -peacefully.) - -@code{g77stripcard} probably shouldn't do any tab expansion or other -fancy stuff. -People can use @code{expand} or other pre-filtering if they like. -The idea here is to keep each stage quite simple, while providing -excellent performance for ``normal'' code. - -(Code with junk beyond column 73 is not really ``normal'', -as it comes from a card-punch heritage, -and will be increasingly hard for tomorrow's Fortran programmers to read.) - -@node lex.c -@subsection lex.c - -To help make the lexer simple, fast, and easy to maintain, -while also having @code{g77} generally encourage Fortran programmers -to write simple, maintainable, portable code by maximizing the -performance of compiling that kind of code: - -@itemize @bullet -@item -There'll be just one lexer, for both fixed-form and free-form source. - -@item -It'll care about the form only when handling the first 7 columns of -text, stuff like spaces between strings of alphanumerics, and -how lines are continued. - -Some other distinctions will be handled by subsequent phases, -so at least one of them will have to know which form is involved. - -For example, @samp{I = 2 . 4} is acceptable in fixed form, -and works in free form as well given the implementation @code{g77} -presently uses. -But the standard requires a diagnostic for it in free form, -so the parser has to be able to recognize that -the lexemes aren't contiguous -(information the lexer @emph{does} have to provide) -and that free-form source is being parsed, -so it can provide the diagnostic. - -The @code{g77} lexer doesn't try to gather @samp{2 . 4} into a single lexeme. -Otherwise, it'd have to know a whole lot more about how to parse Fortran, -or subsequent phases (mainly parsing) would have two paths through -lots of critical code---one to handle the lexeme @samp{2}, @samp{.}, -and @samp{4} in sequence, another to handle the lexeme @samp{2.4}. - -@item -It won't worry about line lengths -(beyond the first 7 columns for fixed-form source). - -That is, once it starts parsing the ``statement'' part of a line -(column 7 for fixed-form, column 1 for free-form), -it'll keep going until it finds a newline, -rather than ignoring everything past a particular column -(72 or 132). - -The implication here is that there shouldn't @emph{be} -anything past that last column, other than whitespace or -commentary, because users using typical editors -(or viewing output as typically printed) -won't necessarily know just where the last column is. - -Code that has ``garbage'' beyond the last column -(almost certainly only fixed-form code with a punched-card legacy, -such as code using columns 73-80 for ``sequence numbers'') -will have to be run through @code{g77stripcard} first. - -Also, keeping track of the maximum column position while also watching out -for the end of a line @emph{and} while reading from a file -just makes things slower. -Since a file must be read, and watching for the end of the line -is necessary (unless the typical input file was preprocessed to -include the necessary number of trailing spaces), -dropping the tracking of the maximum column position -is the only way to reduce the complexity of the pertinent code -while maintaining high performance. - -@item -ASCII encoding is assumed for the input file. - -Code written in other character sets will have to be converted first. - -@item -Tabs (ASCII code 9) -will be converted to spaces via the straightforward -approach. - -Specifically, a tab is converted to between one and eight spaces -as necessary to reach column @var{n}, -where dividing @samp{(@var{n} - 1)} by eight -results in a remainder of zero. - -That saves having to pass most source files through @code{expand}. - -@item -Linefeeds (ASCII code 10) -mark the ends of lines. - -@item -A carriage return (ASCII code 13) -is accept if it immediately precedes a linefeed, -in which case it is ignored. - -Otherwise, it is rejected (with a diagnostic). - -@item -Any other characters other than the above -that are not part of the GNU Fortran Character Set -(@pxref{Character Set}) -are rejected with a diagnostic. - -This includes backspaces, form feeds, and the like. - -(It might make sense to allow a form feed in column 1 -as long as that's the only character on a line. -It certainly wouldn't seem to cost much in terms of performance.) - -@item -The end of the input stream (EOF) -ends the current line. - -@item -The distinction between uppercase and lowercase letters -will be preserved. - -It will be up to subsequent phases to decide to fold case. - -Current plans are to permit any casing for Fortran (reserved) keywords -while preserving casing for user-defined names. -(This might not be made the default for @file{.f} files, though.) - -Preserving case seems necessary to provide more direct access -to facilities outside of @code{g77}, such as to C or Pascal code. - -Names of intrinsics will probably be matchable in any case, - -(How @samp{external SiN; r = sin(x)} would be handled is TBD. -I think old @code{g77} might already handle that pretty elegantly, -but whether we can cope with allowing the same fragment to reference -a @emph{different} procedure, even with the same interface, -via @samp{s = SiN(r)}, needs to be determined. -If it can't, we need to make sure that when code introduces -a user-defined name, any intrinsic matching that name -using a case-insensitive comparison -is ``turned off''.) - -@item -Backslashes in @code{CHARACTER} and Hollerith constants -are not allowed. - -This avoids the confusion introduced by some Fortran compiler vendors -providing C-like interpretation of backslashes, -while others provide straight-through interpretation. - -Some kind of lexical construct (TBD) will be provided to allow -flagging of a @code{CHARACTER} -(but probably not a Hollerith) -constant that permits backslashes. -It'll necessarily be a prefix, such as: - -@smallexample -PRINT *, C'This line has a backspace \b here.' -PRINT *, F'This line has a straight backslash \ here.' -@end smallexample - -Further, command-line options might be provided to specify that -one prefix or the other is to be assumed as the default -for @code{CHARACTER} constants. - -However, it seems more helpful for @code{g77} to provide a program -that converts prefix all constants -(or just those containing backslashes) -with the desired designation, -so printouts of code can be read -without knowing the compile-time options used when compiling it. - -If such a program is provided -(let's name it @code{g77slash} for now), -then a command-line option to @code{g77} should not be provided. -(Though, given that it'll be easy to implement, it might be hard -to resist user requests for it ``to compile faster than if we -have to invoke another filter''.) - -This program would take a command-line option to specify the -default interpretation of slashes, -affecting which prefix it uses for constants. - -@code{g77slash} probably should automatically convert Hollerith -constants that contain slashes -to the appropriate @code{CHARACTER} constants. -Then @code{g77} wouldn't have to define a prefix syntax for Hollerith -constants specifying whether they want C-style or straight-through -backslashes. - -@item -To allow for form-neutral INCLUDE files without requiring them -to be preprocessed, -the fixed-form lexer should offer an extension (if possible) -allowing a trailing @samp{&} to be ignored, especially if after -column 72, as it would be using the traditional Unix Fortran source -model (which ignores @emph{everything} after column 72). -@end itemize - -The above implements nearly exactly what is specified by -@ref{Character Set}, -and -@ref{Lines}, -except it also provides automatic conversion of tabs -and ignoring of newline-related carriage returns, -as well as accommodating form-neutral INCLUDE files. - -It also implements the ``pure visual'' model, -by which is meant that a user viewing his code -in a typical text editor -(assuming it's not preprocessed via @code{g77stripcard} or similar) -doesn't need any special knowledge -of whether spaces on the screen are really tabs, -whether lines end immediately after the last visible non-space character -or after a number of spaces and tabs that follow it, -or whether the last line in the file is ended by a newline. - -Most editors don't make these distinctions, -the ANSI FORTRAN 77 standard doesn't require them to, -and it permits a standard-conforming compiler -to define a method for transforming source code to -``standard form'' however it wants. - -So, GNU Fortran defines it such that users have the best chance -of having the code be interpreted the way it looks on the screen -of the typical editor. - -(Fancy editors should @emph{never} be required to correctly read code -written in classic two-dimensional-plaintext form. -By correct reading I mean ability to read it, book-like, without -mistaking text ignored by the compiler for program code and vice versa, -and without having to count beyond the first several columns. -The vague meaning of ASCII TAB, among other things, complicates -this somewhat, but as long as ``everyone'', including the editor, -other tools, and printer, agrees about the every-eighth-column convention, -the GNU Fortran ``pure visual'' model meets these requirements. -Any language or user-visible source form -requiring special tagging of tabs, -the ends of lines after spaces/tabs, -and so on, fails to meet this fairly straightforward specification. -Fortunately, Fortran @emph{itself} does not mandate such a failure, -though most vendor-supplied defaults for their Fortran compilers @emph{do} -fail to meet this specification for readability.) - -Further, this model provides a clean interface -to whatever preprocessors or code-generators are used -to produce input to this phase of @code{g77}. -Mainly, they need not worry about long lines. - -@node sta.c -@subsection sta.c - -@node sti.c -@subsection sti.c - -@node stq.c -@subsection stq.c - -@node stb.c -@subsection stb.c - -@node expr.c -@subsection expr.c - -@node stc.c -@subsection stc.c - -@node std.c -@subsection std.c - -@node ste.c -@subsection ste.c - -@node Gotchas (Transforming) -@subsection Gotchas (Transforming) - -This section is not about transforming ``gotchas'' into something else. -It is about the weirder aspects of transforming Fortran, -however that's defined, -into a more modern, canonical form. - -@subsubsection Multi-character Lexemes - -Each lexeme carries with it a pointer to where it appears in the source. - -To provide the ability for diagnostics to point to column numbers, -in addition to line numbers and names, -lexemes that represent more than one (significant) character -in the source code need, generally, -to provide pointers to where each @emph{character} appears in the source. - -This provides the ability to properly identify the precise location -of the problem in code like - -@smallexample -SUBROUTINE X -END -BLOCK DATA X -END -@end smallexample - -which, in fixed-form source, would result in single lexemes -consisting of the strings @samp{SUBROUTINEX} and @samp{BLOCKDATAX}. -(The problem is that @samp{X} is defined twice, -so a pointer to the @samp{X} in the second definition, -as well as a follow-up pointer to the corresponding pointer in the first, -would be preferable to pointing to the beginnings of the statements.) - -This need also arises when parsing (and diagnosing) @code{FORMAT} -statements. - -Further, it arises when diagnosing -@code{FMT=} specifiers that contain constants -(or partial constants, or even propagated constants!) -in I/O statements, as in: - -@smallexample -PRINT '(I2, 3HAB)', J -@end smallexample - -(A pointer to the beginning of the prematurely-terminated Hollerith -constant, and/or to the close parenthese, is preferable to a pointer -to the open-parenthese or the apostrophe that precedes it.) - -Multi-character lexemes, which would seem to naturally include -at least digit strings, alphanumeric strings, @code{CHARACTER} -constants, and Hollerith constants, therefore need to provide -location information on each character. -(Maybe Hollerith constants don't, but it's unnecessary to except them.) - -The question then arises, what about @emph{other} multi-character lexemes, -such as @samp{**} and @samp{//}, -and Fortran 90's @samp{(/}, @samp{/)}, @samp{::}, and so on? - -Turns out there's a need to identify the location of the second character -of these two-character lexemes. -For example, in @samp{I(/J) = K}, the slash needs to be diagnosed -as the problem, not the open parenthese. -Similarly, it is preferable to diagnose the second slash in -@samp{I = J // K} rather than the first, given the implicit typing -rules, which would result in the compiler disallowing the attempted -concatenation of two integers. -(Though, since that's more of a semantic issue, -it's not @emph{that} much preferable.) - -Even sequences that could be parsed as digit strings could use location info, -for example, to diagnose the @samp{9} in the octal constant @samp{O'129'}. -(This probably will be parsed as a character string, -to be consistent with the parsing of @samp{Z'129A'}.) - -To avoid the hassle of recording the location of the second character, -while also preserving the general rule that each significant character -is distinctly pointed to by the lexeme that contains it, -it's best to simply not have any fixed-size lexemes -larger than one character. - -This new design is expected to make checking for two -@samp{*} lexemes in a row much easier than the old design, -so this is not much of a sacrifice. -It probably makes the lexer much easier to implement -than it makes the parser harder. - -@subsubsection Space-padding Lexemes - -Certain lexemes need to be padded with virtual spaces when the -end of the line (or file) is encountered. - -This is necessary in fixed form, to handle lines that don't -extend to column 72, assuming that's the line length in effect. - -@subsubsection Bizarre Free-form Hollerith Constants - -Last I checked, the Fortran 90 standard actually required the compiler -to silently accept something like - -@smallexample -FORMAT ( 1 2 Htwelve chars ) -@end smallexample - -as a valid @code{FORMAT} statement specifying a twelve-character -Hollerith constant. - -The implication here is that, since the new lexer is a zero-feedback one, -it won't know that the special case of a @code{FORMAT} statement being parsed -requires apparently distinct lexemes @samp{1} and @samp{2} to be treated as -a single lexeme. - -(This is a horrible misfeature of the Fortran 90 language. -It's one of many such misfeatures that almost make me want -to not support them, and forge ahead with designing a new -``GNU Fortran'' language that has the features, -but not the misfeatures, of Fortran 90, -and provide utility programs to do the conversion automatically.) - -So, the lexer must gather distinct chunks of decimal strings into -a single lexeme in contexts where a single decimal lexeme might -start a Hollerith constant. - -(Which probably means it might as well do that all the time -for all multi-character lexemes, even in free-form mode, -leaving it to subsequent phases to pull them apart as they see fit.) - -Compare the treatment of this to how - -@smallexample -CHARACTER * 4 5 HEY -@end smallexample - -and - -@smallexample -CHARACTER * 12 HEY -@end smallexample - -must be treated---the former must be diagnosed, due to the separation -between lexemes, the latter must be accepted as a proper declaration. - -@subsubsection Hollerith Constants - -Recognizing a Hollerith constant---specifically, -that an @samp{H} or @samp{h} after a digit string begins -such a constant---requires some knowledge of context. - -Hollerith constants (such as @samp{2HAB}) can appear after: - -@itemize @bullet -@item -@samp{(} - -@item -@samp{,} - -@item -@samp{=} - -@item -@samp{+}, @samp{-}, @samp{/} - -@item -@samp{*}, except as noted below -@end itemize - -Hollerith constants don't appear after: - -@itemize @bullet -@item -@samp{CHARACTER*}, -which can be treated generally as -any @samp{*} that is the second lexeme of a statement -@end itemize - -@subsubsection Confusing Function Keyword - -While - -@smallexample -REAL FUNCTION FOO () -@end smallexample - -must be a @code{FUNCTION} statement and - -@smallexample -REAL FUNCTION FOO (5) -@end smallexample - -must be a type-definition statement, - -@smallexample -REAL FUNCTION FOO (@var{names}) -@end smallexample - -where @var{names} is a comma-separated list of names, -can be one or the other. - -The only way to disambiguate that statement -(short of mandating free-form source or a short maximum -length for name for external procedures) -is based on the context of the statement. - -In particular, the statement is known to be within an -already-started program unit -(but not at the outer level of the @code{CONTAINS} block), -it is a type-declaration statement. - -Otherwise, the statement is a @code{FUNCTION} statement, -in that it begins a function program unit -(external, or, within @code{CONTAINS}, nested). - -@subsubsection Weird READ - -The statement - -@smallexample -READ (N) -@end smallexample - -is equivalent to either - -@smallexample -READ (UNIT=(N)) -@end smallexample - -or - -@smallexample -READ (FMT=(N)) -@end smallexample - -depending on which would be valid in context. - -Specifically, if @samp{N} is type @code{INTEGER}, -@samp{READ (FMT=(N))} would not be valid, -because parentheses may not be used around @samp{N}, -whereas they may around it in @samp{READ (UNIT=(N))}. - -Further, if @samp{N} is type @code{CHARACTER}, -the opposite is true---@samp{READ (UNIT=(N))} is not valid, -but @samp{READ (FMT=(N))} is. - -Strictly speaking, if anything follows - -@smallexample -READ (N) -@end smallexample - -in the statement, whether the first lexeme after the close -parenthese is a comma could be used to disambiguate the two cases, -without looking at the type of @samp{N}, -because the comma is required for the @samp{READ (FMT=(N))} -interpretation and disallowed for the @samp{READ (UNIT=(N))} -interpretation. - -However, in practice, many Fortran compilers allow -the comma for the @samp{READ (UNIT=(N))} -interpretation anyway -(in that they generally allow a leading comma before -an I/O list in an I/O statement), -and much code takes advantage of this allowance. - -(This is quite a reasonable allowance, since the -juxtaposition of a comma-separated list immediately -after an I/O control-specification list, which is also comma-separated, -without an intervening comma, -looks sufficiently ``wrong'' to programmers -that they can't resist the itch to insert the comma. -@samp{READ (I, J), K, L} simply looks cleaner than -@samp{READ (I, J) K, L}.) - -So, type-based disambiguation is needed unless strict adherence -to the standard is always assumed, and we're not going to assume that. - -@node TBD (Transforming) -@subsection TBD (Transforming) - -Continue researching gotchas, designing the transformational process, -and implementing it. - -Specific issues to resolve: - -@itemize @bullet -@item -Just where should (if it was implemented) @code{USE} processing take place? - -This gets into the whole issue of how @code{g77} should handle the concept -of modules. -I think GNAT already takes on this issue, but don't know more than that. -Jim Giles has written extensively on @code{comp.lang.fortran} -about his opinions on module handling, as have others. -Jim's views should be taken into account. - -Actually, Richard M. Stallman (RMS) also has written up -some guidelines for implementing such things, -but I'm not sure where I read them. -Perhaps the old @email{gcc2@@cygnus.com} list. - -If someone could dig references to these up and get them to me, -that would be much appreciated! -Even though modules are not on the short-term list for implementation, -it'd be helpful to know @emph{now} how to avoid making them harder to -implement them @emph{later}. - -@item -Should the @code{g77} command become just a script that invokes -all the various preprocessing that might be needed, -thus making it seem slower than necessary for legacy code -that people are unwilling to convert, -or should we provide a separate script for that, -thus encouraging people to convert their code once and for all? - -At least, a separate script to behave as old @code{g77} did, -perhaps named @code{g77old}, might ease the transition, -as might a corresponding one that converts source codes -named @code{g77oldnew}. - -These scripts would take all the pertinent options @code{g77} used -to take and run the appropriate filters, -passing the results to @code{g77} or just making new sources out of them -(in a subdirectory, leaving the user to do the dirty deed of -moving or copying them over the old sources). - -@item -Do other Fortran compilers provide a prefix syntax -to govern the treatment of backslashes in @code{CHARACTER} -(or Hollerith) constants? - -Knowing what other compilers provide would help. - -@item -Is it okay to drop support for the @samp{-fintrin-case-initcap}, -@samp{-fmatch-case-initcap}, @samp{-fsymbol-case-initcap}, -and @samp{-fcase-initcap} options? - -I've asked @email{info-gnu-fortran@@gnu.org} for input on this. -Not having to support these makes it easier to write the new front end, -and might also avoid complicated its design. - -The consensus to date (1999-11-17) has been to drop this support. -Can't recall anybody saying they're using it, in fact. -@end itemize - -@node Philosophy of Code Generation -@section Philosophy of Code Generation - -Don't poke the bear. - -The @code{g77} front end generates code -via the @code{gcc} back end. - -@cindex GNU Back End (GBE) -@cindex GBE -@cindex @code{gcc}, back end -@cindex back end, gcc -@cindex code generator -The @code{gcc} back end (GBE) is a large, complex -labyrinth of intricate code -written in a combination of the C language -and specialized languages internal to @code{gcc}. - -While the @emph{code} that implements the GBE -is written in a combination of languages, -the GBE itself is, -to the front end for a language like Fortran, -best viewed as a @emph{compiler} -that compiles its own, unique, language. - -The GBE's ``source'', then, is written in this language, -which consists primarily of -a combination of calls to GBE functions -and @dfn{tree} nodes -(which are, themselves, created -by calling GBE functions). - -So, the @code{g77} generates code by, in effect, -translating the Fortran code it reads -into a form ``written'' in the ``language'' -of the @code{gcc} back end. - -@cindex GBEL -@cindex GNU Back End Language (GBEL) -This language will heretofore be referred to as @dfn{GBEL}, -for GNU Back End Language. - -GBEL is an evolving language, -not fully specified in any published form -as of this writing. -It offers many facilities, -but its ``core'' facilities -are those that corresponding most directly -to those needed to support @code{gcc} -(compiling code written in GNU C). - -The @code{g77} Fortran Front End (FFE) -is designed and implemented -to navigate the currents and eddies -of ongoing GBEL and @code{gcc} development -while also delivering on the potential -of an integrated FFE -(as compared to using a converter like @code{f2c} -and feeding the output into @code{gcc}). - -Goals of the FFE's code-generation strategy include: - -@itemize @bullet -@item -High likelihood of generation of correct code, -or, failing that, producing a fatal diagnostic or crashing. - -@item -Generation of highly optimized code, -as directed by the user -via GBE-specific (versus @code{g77}-specific) constructs, -such as command-line options. - -@item -Fast overall (FFE plus GBE) compilation. - -@item -Preservation of source-level debugging information. -@end itemize - -The strategies historically, and currently, used by the FFE -to achieve these goals include: - -@itemize @bullet -@item -Use of GBEL constructs that most faithfully encapsulate -the semantics of Fortran. - -@item -Avoidance of GBEL constructs that are so rarely used, -or limited to use in specialized situations not related to Fortran, -that their reliability and performance has not yet been established -as sufficient for use by the FFE. - -@item -Flexible design, to readily accommodate changes to specific -code-generation strategies, perhaps governed by command-line options. -@end itemize - -@cindex Bear-poking -@cindex Poking the bear -``Don't poke the bear'' somewhat summarizes the above strategies. -The GBE is the bear. -The FFE is designed and implemented to avoid poking it -in ways that are likely to just annoy it. -The FFE usually either tackles it head-on, -or avoids treating it in ways dissimilar to how -the @code{gcc} front end treats it. - -For example, the FFE uses the native array facility in the back end -instead of the lower-level pointer-arithmetic facility -used by @code{gcc} when compiling @code{f2c} output). -Theoretically, this presents more opportunities for optimization, -faster compile times, -and the production of more faithful debugging information. -These benefits were not, however, immediately realized, -mainly because @code{gcc} itself makes little or no use -of the native array facility. - -Complex arithmetic is a case study of the evolution of this strategy. -When originally implemented, -the GBEL had just evolved its own native complex-arithmetic facility, -so the FFE took advantage of that. - -When porting @code{g77} to 64-bit systems, -it was discovered that the GBE didn't really -implement its native complex-arithmetic facility properly. - -The short-term solution was to rewrite the FFE -to instead use the lower-level facilities -that'd be used by @code{gcc}-compiled code -(assuming that code, itself, didn't use the native complex type -provided, as an extension, by @code{gcc}), -since these were known to work, -and, in any case, if shown to not work, -would likely be rapidly fixed -(since they'd likely not work for vanilla C code in similar circumstances). - -However, the rewrite accommodated the original, native approach as well -by offering a command-line option to select it over the emulated approach. -This allowed users, and especially GBE maintainers, to try out -fixes to complex-arithmetic support in the GBE -while @code{g77} continued to default to compiling more code correctly, -albeit producing (typically) slower executables. - -As of April 1999, it appeared that the last few bugs -in the GBE's support of its native complex-arithmetic facility -were worked out. -The FFE was changed back to default to using that native facility, -leaving emulation as an option. - -Later during the release cycle -(which was called EGCS 1.2, but soon became GCC 2.95), -bugs in the native facility were found. -Reactions among various people included -``the last thing we should do is change the default back'', -``we must change the default back'', -and ``let's figure out whether we can narrow down the bugs to -few enough cases to allow the now-months-long-tested default -to remain the same''. -The latter viewpoint won that particular time. -The bugs exposed other concerns regarding ABI compliance -when the ABI specified treatment of complex data as different -from treatment of what Fortran and GNU C consider the equivalent -aggregation (structure) of real (or float) pairs. - -Other Fortran constructs---arrays, character strings, -complex division, @code{COMMON} and @code{EQUIVALENCE} aggregates, -and so on---involve issues similar to those pertaining to complex arithmetic. - -So, it is possible that the history -of how the FFE handled complex arithmetic -will be repeated, probably in modified form -(and hopefully over shorter timeframes), -for some of these other facilities. - -@node Two-pass Design -@section Two-pass Design - -The FFE does not tell the GBE anything about a program unit -until after the last statement in that unit has been parsed. -(A program unit is a Fortran concept that corresponds, in the C world, -mostly closely to functions definitions in ISO C. -That is, a program unit in Fortran is like a top-level function in C. -Nested functions, found among the extensions offered by GNU C, -correspond roughly to Fortran's statement functions.) - -So, while parsing the code in a program unit, -the FFE saves up all the information -on statements, expressions, names, and so on, -until it has seen the last statement. - -At that point, the FFE revisits the saved information -(in what amounts to a second @dfn{pass} over the program unit) -to perform the actual translation of the program unit into GBEL, -ultimating in the generation of assembly code for it. - -Some lookahead is performed during this second pass, -so the FFE could be viewed as a ``two-plus-pass'' design. - -@menu -* Two-pass Code:: -* Why Two Passes:: -@end menu - -@node Two-pass Code -@subsection Two-pass Code - -Most of the code that turns the first pass (parsing) -into a second pass for code generation -is in @file{@value{path-g77}/std.c}. - -It has external functions, -called mainly by siblings in @file{@value{path-g77}/stc.c}, -that record the information on statements and expressions -in the order they are seen in the source code. -These functions save that information. - -It also has an external function that revisits that information, -calling the siblings in @file{@value{path-g77}/ste.c}, -which handles the actual code generation -(by generating GBEL code, -that is, by calling GBE routines -to represent and specify expressions, statements, and so on). - -@node Why Two Passes -@subsection Why Two Passes - -The need for two passes was not immediately evident -during the design and implementation of the code in the FFE -that was to produce GBEL. -Only after a few kludges, -to handle things like incorrectly-guessed @code{ASSIGN} label nature, -had been implemented, -did enough evidence pile up to make it clear -that @file{std.c} had to be introduced to intercept, -save, then revisit as part of a second pass, -the digested contents of a program unit. - -Other such missteps have occurred during the evolution of the FFE, -because of the different goals of the FFE and the GBE. - -Because the GBE's original, and still primary, goal -was to directly support the GNU C language, -the GBEL, and the GBE itself, -requires more complexity -on the part of most front ends -than it requires of @code{gcc}'s. - -For example, -the GBEL offers an interface that permits the @code{gcc} front end -to implement most, or all, of the language features it supports, -without the front end having to -make use of non-user-defined variables. -(It's almost certainly the case that all of K&R C, -and probably ANSI C as well, -is handled by the @code{gcc} front end -without declaring such variables.) - -The FFE, on the other hand, must resort to a variety of ``tricks'' -to achieve its goals. - -Consider the following C code: - -@smallexample -int -foo (int a, int b) -@{ - int c = 0; - - if ((c = bar (c)) == 0) - goto done; - - quux (c << 1); - -done: - return c; -@} -@end smallexample - -Note what kinds of objects are declared, or defined, before their use, -and before any actual code generation involving them -would normally take place: - -@itemize @bullet -@item -Return type of function - -@item -Entry point(s) of function - -@item -Dummy arguments - -@item -Variables - -@item -Initial values for variables -@end itemize - -Whereas, the following items can, and do, -suddenly appear ``out of the blue'' in C: - -@itemize @bullet -@item -Label references - -@item -Function references -@end itemize - -Not surprisingly, the GBE faithfully permits the latter set of items -to be ``discovered'' partway through GBEL ``programs'', -just as they are permitted to in C. - -Yet, the GBE has tended, at least in the past, -to be reticent to fully support similar ``late'' discovery -of items in the former set. - -This makes Fortran a poor fit for the ``safe'' subset of GBEL. -Consider: - -@smallexample - FUNCTION X (A, ARRAY, ID1) - CHARACTER*(*) A - DOUBLE PRECISION X, Y, Z, TMP, EE, PI - REAL ARRAY(ID1*ID2) - COMMON ID2 - EXTERNAL FRED - - ASSIGN 100 TO J - CALL FOO (I) - IF (I .EQ. 0) PRINT *, A(0) - GOTO 200 - - ENTRY Y (Z) - ASSIGN 101 TO J -200 PRINT *, A(1) - READ *, TMP - GOTO J -100 X = TMP * EE - RETURN -101 Y = TMP * PI - CALL FRED - DATA EE, PI /2.71D0, 3.14D0/ - END -@end smallexample - -Here are some observations about the above code, -which, while somewhat contrived, -conforms to the FORTRAN 77 and Fortran 90 standards: - -@itemize @bullet -@item -The return type of function @samp{X} is not known -until the @samp{DOUBLE PRECISION} line has been parsed. - -@item -Whether @samp{A} is a function or a variable -is not known until the @samp{PRINT *, A(0)} statement -has been parsed. - -@item -The bounds of the array of argument @samp{ARRAY} -depend on a computation involving -the subsequent argument @samp{ID1} -and the blank-common member @samp{ID2}. - -@item -Whether @samp{Y} and @samp{Z} are local variables, -additional function entry points, -or dummy arguments to additional entry points -is not known -until the @code{ENTRY} statement is parsed. - -@item -Similarly, whether @samp{TMP} is a local variable is not known -until the @samp{READ *, TMP} statement is parsed. - -@item -The initial values for @samp{EE} and @samp{PI} -are not known until after the @code{DATA} statement is parsed. - -@item -Whether @samp{FRED} is a function returning type @code{REAL} -or a subroutine -(which can be thought of as returning type @code{void} -@emph{or}, to support alternate returns in a simple way, -type @code{int}) -is not known -until the @samp{CALL FRED} statement is parsed. - -@item -Whether @samp{100} is a @code{FORMAT} label -or the label of an executable statement -is not known -until the @samp{X =} statement is parsed. -(These two types of labels get @emph{very} different treatment, -especially when @code{ASSIGN}'ed.) - -@item -That @samp{J} is a local variable is not known -until the first @code{ASSIGN} statement is parsed. -(This happens @emph{after} executable code has been seen.) -@end itemize - -Very few of these ``discoveries'' -can be accommodated by the GBE as it has evolved over the years. -The GBEL doesn't support several of them, -and those it might appear to support -don't always work properly, -especially in combination with other GBEL and GBE features, -as implemented in the GBE. - -(Had the GBE and its GBEL originally evolved to support @code{g77}, -the shoe would be on the other foot, so to speak---most, if not all, -of the above would be directly supported by the GBEL, -and a few C constructs would probably not, as they are in reality, -be supported. -Both this mythical, and today's real, GBE caters to its GBEL -by, sometimes, scrambling around, cleaning up after itself---after -discovering that assumptions it made earlier during code generation -are incorrect. -That's not a great design, since it indicates significant code -paths that might be rarely tested but used in some key production -environments.) - -So, the FFE handles these discrepancies---between the order in which -it discovers facts about the code it is compiling, -and the order in which the GBEL and GBE support such discoveries---by -performing what amounts to two -passes over each program unit. - -(A few ambiguities can remain at that point, -such as whether, given @samp{EXTERNAL BAZ} -and no other reference to @samp{BAZ} in the program unit, -it is a subroutine, a function, or a block-data---which, in C-speak, -governs its declared return type. -Fortunately, these distinctions are easily finessed -for the procedure, library, and object-file interfaces -supported by @code{g77}.) - -@node Challenges Posed -@section Challenges Posed - -Consider the following Fortran code, which uses various extensions -(including some to Fortran 90): - -@smallexample -SUBROUTINE X(A) -CHARACTER*(*) A -COMPLEX CFUNC -INTEGER*2 CLOCKS(200) -INTEGER IFUNC - -CALL SYSTEM_CLOCK (CLOCKS (IFUNC (CFUNC ('('//A//')')))) -@end smallexample - -The above poses the following challenges to any Fortran compiler -that uses run-time interfaces, and a run-time library, roughly similar -to those used by @code{g77}: - -@itemize @bullet -@item -Assuming the library routine that supports @code{SYSTEM_CLOCK} -expects to set an @code{INTEGER*4} variable via its @code{COUNT} argument, -the compiler must make available to it a temporary variable of that type. - -@item -Further, after the @code{SYSTEM_CLOCK} library routine returns, -the compiler must ensure that the temporary variable it wrote -is copied into the appropriate element of the @samp{CLOCKS} array. -(This assumes the compiler doesn't just reject the code, -which it should if it is compiling under some kind of a ``strict'' option.) - -@item -To determine the correct index into the @samp{CLOCKS} array, -(putting aside the fact that the index, in this particular case, -need not be computed until after -the @code{SYSTEM_CLOCK} library routine returns), -the compiler must ensure that the @code{IFUNC} function is called. - -That requires evaluating its argument, -which requires, for @code{g77} -(assuming @code{-ff2c} is in force), -reserving a temporary variable of type @code{COMPLEX} -for use as a repository for the return value -being computed by @samp{CFUNC}. - -@item -Before invoking @samp{CFUNC}, -is argument must be evaluated, -which requires allocating, at run time, -a temporary large enough to hold the result of the concatenation, -as well as actually performing the concatenation. - -@item -The large temporary needed during invocation of @code{CFUNC} -should, ideally, be deallocated -(or, at least, left to the GBE to dispose of, as it sees fit) -as soon as @code{CFUNC} returns, -which means before @code{IFUNC} is called -(as it might need a lot of dynamically allocated memory). -@end itemize - -@code{g77} currently doesn't support all of the above, -but, so that it might someday, it has evolved to handle -at least some of the above requirements. - -Meeting the above requirements is made more challenging -by conforming to the requirements of the GBEL/GBE combination. - -@node Transforming Statements -@section Transforming Statements - -Most Fortran statements are given their own block, -and, for temporary variables they might need, their own scope. -(A block is what distinguishes @samp{@{ foo (); @}} -from just @samp{foo ();} in C. -A scope is included with every such block, -providing a distinct name space for local variables.) - -Label definitions for the statement precede this block, -so @samp{10 PRINT *, I} is handled more like -@samp{fl10: @{ @dots{} @}} than @samp{@{ fl10: @dots{} @}} -(where @samp{fl10} is just a notation meaning ``Fortran Label 10'' -for the purposes of this document). - -@menu -* Statements Needing Temporaries:: -* Transforming DO WHILE:: -* Transforming Iterative DO:: -* Transforming Block IF:: -* Transforming SELECT CASE:: -@end menu - -@node Statements Needing Temporaries -@subsection Statements Needing Temporaries - -Any temporaries needed during, but not beyond, -execution of a Fortran statement, -are made local to the scope of that statement's block. - -This allows the GBE to share storage for these temporaries -among the various statements without the FFE -having to manage that itself. - -(The GBE could, of course, decide to optimize -management of these temporaries. -For example, it could, theoretically, -schedule some of the computations involving these temporaries -to occur in parallel. -More practically, it might leave the storage for some temporaries -``live'' beyond their scopes, to reduce the number of -manipulations of the stack pointer at run time.) - -Temporaries needed across distinct statement boundaries usually -are associated with Fortran blocks (such as @code{DO}/@code{END DO}). -(Also, there might be temporaries not associated with blocks at all---these -would be in the scope of the entire program unit.) - -Each Fortran block @emph{should} get its own block/scope in the GBE. -This is best, because it allows temporaries to be more naturally handled. -However, it might pose problems when handling labels -(in particular, when they're the targets of @code{GOTO}s outside the Fortran -block), and generally just hassling with replicating -parts of the @code{gcc} front end -(because the FFE needs to support -an arbitrary number of nested back-end blocks -if each Fortran block gets one). - -So, there might still be a need for top-level temporaries, whose -``owning'' scope is that of the containing procedure. - -Also, there seems to be problems declaring new variables after -generating code (within a block) in the back end, leading to, e.g., -@samp{label not defined before binding contour} or similar messages, -when compiling with @samp{-fstack-check} or -when compiling for certain targets. - -Because of that, and because sometimes these temporaries are not -discovered until in the middle of of generating code for an expression -statement (as in the case of the optimization for @samp{X**I}), -it seems best to always -pre-scan all the expressions that'll be expanded for a block -before generating any of the code for that block. - -This pre-scan then handles discovering and declaring, to the back end, -the temporaries needed for that block. - -It's also important to treat distinct items in an I/O list as distinct -statements deserving their own blocks. -That's because there's a requirement -that each I/O item be fully processed before the next one, -which matters in cases like @samp{READ (*,*), I, A(I)}---the -element of @samp{A} read in the second item -@emph{must} be determined from the value -of @samp{I} read in the first item. - -@node Transforming DO WHILE -@subsection Transforming DO WHILE - -@samp{DO WHILE(expr)} @emph{must} be implemented -so that temporaries needed to evaluate @samp{expr} -are generated just for the test, each time. - -Consider how @samp{DO WHILE (A//B .NE. 'END'); @dots{}; END DO} is transformed: - -@smallexample -for (;;) - @{ - int temp0; - - @{ - char temp1[large]; - - libg77_catenate (temp1, a, b); - temp0 = libg77_ne (temp1, 'END'); - @} - - if (! temp0) - break; - - @dots{} - @} -@end smallexample - -In this case, it seems like a time/space tradeoff -between allocating and deallocating @samp{temp1} for each iteration -and allocating it just once for the entire loop. - -However, if @samp{temp1} is allocated just once for the entire loop, -it could be the wrong size for subsequent iterations of that loop -in cases like @samp{DO WHILE (A(I:J)//B .NE. 'END')}, -because the body of the loop might modify @samp{I} or @samp{J}. - -So, the above implementation is used, -though a more optimal one can be used -in specific circumstances. - -@node Transforming Iterative DO -@subsection Transforming Iterative DO - -An iterative @code{DO} loop -(one that specifies an iteration variable) -is required by the Fortran standards -to be implemented as though an iteration count -is computed before entering the loop body, -and that iteration count used to determine -the number of times the loop body is to be performed -(assuming the loop isn't cut short via @code{GOTO} or @code{EXIT}). - -The FFE handles this by allocating a temporary variable -to contain the computed number of iterations. -Since this variable must be in a scope that includes the entire loop, -a GBEL block is created for that loop, -and the variable declared as belonging to the scope of that block. - -@node Transforming Block IF -@subsection Transforming Block IF - -Consider: - -@smallexample -SUBROUTINE X(A,B,C) -CHARACTER*(*) A, B, C -LOGICAL LFUNC - -IF (LFUNC (A//B)) THEN - CALL SUBR1 -ELSE IF (LFUNC (A//C)) THEN - CALL SUBR2 -ELSE - CALL SUBR3 -END -@end smallexample - -The arguments to the two calls to @samp{LFUNC} -require dynamic allocation (at run time), -but are not required during execution of the @code{CALL} statements. - -So, the scopes of those temporaries must be within blocks inside -the block corresponding to the Fortran @code{IF} block. - -This cannot be represented ``naturally'' -in vanilla C, nor in GBEL. -The @code{if}, @code{elseif}, @code{else}, -and @code{endif} constructs -provided by both languages must, -for a given @code{if} block, -share the same C/GBE block. - -Therefore, any temporaries needed during evaluation of @samp{expr} -while executing @samp{ELSE IF(expr)} -must either have been predeclared -at the top of the corresponding @code{IF} block, -or declared within a new block for that @code{ELSE IF}---a block that, -since it cannot contain the @code{else} or @code{else if} itself -(due to the above requirement), -actually implements the rest of the @code{IF} block's -@code{ELSE IF} and @code{ELSE} statements -within an inner block. - -The FFE takes the latter approach. - -@node Transforming SELECT CASE -@subsection Transforming SELECT CASE - -@code{SELECT CASE} poses a few interesting problems for code generation, -if efficiency and frugal stack management are important. - -Consider @samp{SELECT CASE (I('PREFIX'//A))}, -where @samp{A} is @code{CHARACTER*(*)}. -In a case like this---basically, -in any case where largish temporaries are needed -to evaluate the expression---those temporaries should -not be ``live'' during execution of any of the @code{CASE} blocks. - -So, evaluation of the expression is best done within its own block, -which in turn is within the @code{SELECT CASE} block itself -(which contains the code for the CASE blocks as well, -though each within their own block). - -Otherwise, we'd have the rough equivalent of this pseudo-code: - -@smallexample -@{ - char temp[large]; - - libg77_catenate (temp, 'prefix', a); - - switch (i (temp)) - @{ - case 0: - @dots{} - @} -@} -@end smallexample - -And that would leave temp[large] in scope during the CASE blocks -(although a clever back end *could* see that it isn't referenced -in them, and thus free that temp before executing the blocks). - -So this approach is used instead: - -@smallexample -@{ - int temp0; - - @{ - char temp1[large]; - - libg77_catenate (temp1, 'prefix', a); - temp0 = i (temp1); - @} - - switch (temp0) - @{ - case 0: - @dots{} - @} -@} -@end smallexample - -Note how @samp{temp1} goes out of scope before starting the switch, -thus making it easy for a back end to free it. - -The problem @emph{that} solution has, however, -is with @samp{SELECT CASE('prefix'//A)} -(which is currently not supported). - -Unless the GBEL is extended to support arbitrarily long character strings -in its @code{case} facility, -the FFE has to implement @code{SELECT CASE} on @code{CHARACTER} -(probably excepting @code{CHARACTER*1}) -using a cascade of -@code{if}, @code{elseif}, @code{else}, and @code{endif} constructs -in GBEL. - -To prevent the (potentially large) temporary, -needed to hold the selected expression itself (@samp{'prefix'//A}), -from being in scope during execution of the @code{CASE} blocks, -two approaches are available: - -@itemize @bullet -@item -Pre-evaluate all the @code{CASE} tests, -producing an integer ordinal that is used, -a la @samp{temp0} in the earlier example, -as if @samp{SELECT CASE(temp0)} had been written. - -Each corresponding @code{CASE} is replaced with @samp{CASE(@var{i})}, -where @var{i} is the ordinal for that case, -determined while, or before, -generating the cascade of @code{if}-related constructs -to cope with @code{CHARACTER} selection. - -@item -Make @samp{temp0} above just -large enough to hold the longest @code{CASE} string -that'll actually be compared against the expression -(in this case, @samp{'prefix'//A}). - -Since that length must be constant -(because @code{CASE} expressions are all constant), -it won't be so large, -and, further, @samp{temp1} need not be dynamically allocated, -since normal @code{CHARACTER} assignment can be used -into the fixed-length @samp{temp0}. -@end itemize - -Both of these solutions require @code{SELECT CASE} implementation -to be changed so all the corresponding @code{CASE} statements -are seen during the actual code generation for @code{SELECT CASE}. - -@node Transforming Expressions -@section Transforming Expressions - -The interactions between statements, expressions, and subexpressions -at program run time can be viewed as: - -@smallexample -@var{action}(@var{expr}) -@end smallexample - -Here, @var{action} is the series of steps -performed to effect the statement, -and @var{expr} is the expression -whose value is used by @var{action}. - -Expanding the above shows a typical order of events at run time: - -@smallexample -Evaluate @var{expr} -Perform @var{action}, using result of evaluation of @var{expr} -Clean up after evaluating @var{expr} -@end smallexample - -So, if evaluating @var{expr} requires allocating memory, -that memory can be freed before performing @var{action} -only if it is not needed to hold the result of evaluating @var{expr}. -Otherwise, it must be freed no sooner than -after @var{action} has been performed. - -The above are recursive definitions, -in the sense that they apply to subexpressions of @var{expr}. - -That is, evaluating @var{expr} involves -evaluating all of its subexpressions, -performing the @var{action} that computes the -result value of @var{expr}, -then cleaning up after evaluating those subexpressions. - -The recursive nature of this evaluation is implemented -via recursive-descent transformation of the top-level statements, -their expressions, @emph{their} subexpressions, and so on. - -However, that recursive-descent transformation is, -due to the nature of the GBEL, -focused primarily on generating a @emph{single} stream of code -to be executed at run time. - -Yet, from the above, it's clear that multiple streams of code -must effectively be simultaneously generated -during the recursive-descent analysis of statements. - -The primary stream implements the primary @var{action} items, -while at least two other streams implement -the evaluation and clean-up items. - -Requirements imposed by expressions include: - -@itemize @bullet -@item -Whether the caller needs to have a temporary ready -to hold the value of the expression. - -@item -Other stuff??? -@end itemize - -@node Internal Naming Conventions -@section Internal Naming Conventions - -Names exported by FFE modules have the following (regular-expression) forms. -Note that all names beginning @code{ffe@var{mod}} or @code{FFE@var{mod}}, -where @var{mod} is lowercase or uppercase alphanumerics, respectively, -are exported by the module @code{ffe@var{mod}}, -with the source code doing the exporting in @file{@var{mod}.h}. -(Usually, the source code for the implementation is in @file{@var{mod}.c}.) - -Identifiers that don't fit the following forms -are not considered exported, -even if they are according to the C language. -(For example, they might be made available to other modules -solely for use within expansions of exported macros, -not for use within any source code in those other modules.) - -@table @code -@item ffe@var{mod} -The single typedef exported by the module. - -@item FFE@var{umod}_[A-Z][A-Z0-9_]* -(Where @var{umod} is the uppercase for of @var{mod}.) - -A @code{#define} or @code{enum} constant of the type @code{ffe@var{mod}}. - -@item ffe@var{mod}[A-Z][A-Z][a-z0-9]* -A typedef exported by the module. - -The portion of the identifier after @code{ffe@var{mod}} is -referred to as @code{ctype}, a capitalized (mixed-case) form -of @code{type}. - -@item FFE@var{umod}_@var{type}[A-Z][A-Z0-9_]*[A-Z0-9]? -(Where @var{umod} is the uppercase for of @var{mod}.) - -A @code{#define} or @code{enum} constant of the type -@code{ffe@var{mod}@var{type}}, -where @var{type} is the lowercase form of @var{ctype} -in an exported typedef. - -@item ffe@var{mod}_@var{value} -A function that does or returns something, -as described by @var{value} (see below). - -@item ffe@var{mod}_@var{value}_@var{input} -A function that does or returns something based -primarily on the thing described by @var{input} (see below). -@end table - -Below are names used for @var{value} and @var{input}, -along with their definitions. - -@table @code -@item col -A column number within a line (first column is number 1). - -@item file -An encapsulation of a file's name. - -@item find -Looks up an instance of some type that matches specified criteria, -and returns that, even if it has to create a new instance or -crash trying to find it (as appropriate). - -@item initialize -Initializes, usually a module. No type. - -@item int -A generic integer of type @code{int}. - -@item is -A generic integer that contains a true (nonzero) or false (zero) value. - -@item len -A generic integer that contains the length of something. - -@item line -A line number within a source file, -or a global line number. - -@item lookup -Looks up an instance of some type that matches specified criteria, -and returns that, or returns nil. - -@item name -A @code{text} that points to a name of something. - -@item new -Makes a new instance of the indicated type. -Might return an existing one if appropriate---if so, -similar to @code{find} without crashing. - -@item pt -Pointer to a particular character (line, column pairs) -in the input file (source code being compiled). - -@item run -Performs some herculean task. No type. - -@item terminate -Terminates, usually a module. No type. - -@item text -A @code{char *} that points to generic text. -@end table diff --git a/contrib/gcc/f/fini.c b/contrib/gcc/f/fini.c deleted file mode 100644 index 167837b..0000000 --- a/contrib/gcc/f/fini.c +++ /dev/null @@ -1,772 +0,0 @@ -/* fini.c - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - -#define USE_BCONFIG - -#include "proj.h" -#include "malloc.h" - -#undef MAXNAMELEN -#define MAXNAMELEN 100 - -typedef struct _name_ *name; - -struct _name_ - { - name next; - name previous; - name next_alpha; - name previous_alpha; - int namelen; - int kwlen; - char kwname[MAXNAMELEN]; - char name_uc[MAXNAMELEN]; - char name_lc[MAXNAMELEN]; - char name_ic[MAXNAMELEN]; - }; - -struct _name_root_ - { - name first; - name last; - }; - -struct _name_alpha_ - { - name ign1; - name ign2; - name first; - name last; - }; - -static FILE *in; -static FILE *out; -static char prefix[32]; -static char postfix[32]; -static char storage[32]; -static const char *const xspaces[] -= -{ - "", /* 0 */ - " ", /* 1 */ - " ", /* 2 */ - " ", /* 3 */ - " ", /* 4 */ - " ", /* 5 */ - " ", /* 6 */ - " ", /* 7 */ - "\t", /* 8 */ - "\t ", /* 9 */ - "\t ", /* 10 */ - "\t ", /* 11 */ - "\t ", /* 12 */ - "\t ", /* 13 */ - "\t ", /* 14 */ - "\t ", /* 15 */ - "\t\t", /* 16 */ - "\t\t ", /* 17 */ - "\t\t ", /* 18 */ - "\t\t ", /* 19 */ - "\t\t ", /* 20 */ - "\t\t ", /* 21 */ - "\t\t ", /* 22 */ - "\t\t ", /* 23 */ - "\t\t\t", /* 24 */ - "\t\t\t ", /* 25 */ - "\t\t\t ", /* 26 */ - "\t\t\t ", /* 27 */ - "\t\t\t ", /* 28 */ - "\t\t\t ", /* 29 */ - "\t\t\t ", /* 30 */ - "\t\t\t ", /* 31 */ - "\t\t\t\t", /* 32 */ - "\t\t\t\t ", /* 33 */ - "\t\t\t\t ", /* 34 */ - "\t\t\t\t ", /* 35 */ - "\t\t\t\t ", /* 36 */ - "\t\t\t\t ", /* 37 */ - "\t\t\t\t ", /* 38 */ - "\t\t\t\t ", /* 39 */ - "\t\t\t\t\t", /* 40 */ - "\t\t\t\t\t ", /* 41 */ - "\t\t\t\t\t ", /* 42 */ - "\t\t\t\t\t ", /* 43 */ - "\t\t\t\t\t ", /* 44 */ - "\t\t\t\t\t ", /* 45 */ - "\t\t\t\t\t ", /* 46 */ - "\t\t\t\t\t ", /* 47 */ - "\t\t\t\t\t\t", /* 48 */ - "\t\t\t\t\t\t ", /* 49 */ - "\t\t\t\t\t\t ", /* 50 */ - "\t\t\t\t\t\t ", /* 51 */ - "\t\t\t\t\t\t ", /* 52 */ - "\t\t\t\t\t\t ", /* 53 */ - "\t\t\t\t\t\t ", /* 54 */ - "\t\t\t\t\t\t ", /* 55 */ - "\t\t\t\t\t\t\t", /* 56 */ - "\t\t\t\t\t\t\t ", /* 57 */ - "\t\t\t\t\t\t\t ", /* 58 */ - "\t\t\t\t\t\t\t ", /* 59 */ - "\t\t\t\t\t\t\t ", /* 60 */ - "\t\t\t\t\t\t\t ", /* 61 */ - "\t\t\t\t\t\t\t ", /* 62 */ - "\t\t\t\t\t\t\t ", /* 63 */ - "\t\t\t\t\t\t\t\t", /* 64 */ - "\t\t\t\t\t\t\t\t ", /* 65 */ - "\t\t\t\t\t\t\t\t ", /* 66 */ - "\t\t\t\t\t\t\t\t ", /* 67 */ - "\t\t\t\t\t\t\t\t ", /* 68 */ - "\t\t\t\t\t\t\t\t ", /* 69 */ - "\t\t\t\t\t\t\t\t ", /* 70 */ - "\t\t\t\t\t\t\t\t ", /* 71 */ - "\t\t\t\t\t\t\t\t\t", /* 72 */ - "\t\t\t\t\t\t\t\t\t ", /* 73 */ - "\t\t\t\t\t\t\t\t\t ", /* 74 */ - "\t\t\t\t\t\t\t\t\t ", /* 75 */ - "\t\t\t\t\t\t\t\t\t ", /* 76 */ - "\t\t\t\t\t\t\t\t\t ", /* 77 */ - "\t\t\t\t\t\t\t\t\t ", /* 78 */ - "\t\t\t\t\t\t\t\t\t ", /* 79 */ - "\t\t\t\t\t\t\t\t\t\t", /* 80 */ - "\t\t\t\t\t\t\t\t\t\t ", /* 81 */ - "\t\t\t\t\t\t\t\t\t\t ", /* 82 */ - "\t\t\t\t\t\t\t\t\t\t ", /* 83 */ - "\t\t\t\t\t\t\t\t\t\t ", /* 84 */ - "\t\t\t\t\t\t\t\t\t\t ", /* 85 */ - "\t\t\t\t\t\t\t\t\t\t ", /* 86 */ - "\t\t\t\t\t\t\t\t\t\t ",/* 87 */ - "\t\t\t\t\t\t\t\t\t\t\t", /* 88 */ - "\t\t\t\t\t\t\t\t\t\t\t ", /* 89 */ - "\t\t\t\t\t\t\t\t\t\t\t ", /* 90 */ - "\t\t\t\t\t\t\t\t\t\t\t ", /* 91 */ - "\t\t\t\t\t\t\t\t\t\t\t ", /* 92 */ - "\t\t\t\t\t\t\t\t\t\t\t ",/* 93 */ - "\t\t\t\t\t\t\t\t\t\t\t ", /* 94 */ - "\t\t\t\t\t\t\t\t\t\t\t ", /* 95 */ - "\t\t\t\t\t\t\t\t\t\t\t\t", /* 96 */ - "\t\t\t\t\t\t\t\t\t\t\t\t ", /* 97 */ - "\t\t\t\t\t\t\t\t\t\t\t\t ", /* 98 */ - "\t\t\t\t\t\t\t\t\t\t\t\t ",/* 99 */ - "\t\t\t\t\t\t\t\t\t\t\t\t ", /* 100 */ - "\t\t\t\t\t\t\t\t\t\t\t\t ", /* 101 */ - "\t\t\t\t\t\t\t\t\t\t\t\t ", /* 102 */ - "\t\t\t\t\t\t\t\t\t\t\t\t ", /* 103 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t", /* 104 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t ",/* 105 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 106 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 107 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 108 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 109 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 110 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 111 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t", /* 112 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 113 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 114 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 115 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 116 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 117 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 118 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 119 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t", /* 120 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 121 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 122 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 123 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 124 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 125 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 126 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 127 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t", /* 128 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 129 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 130 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 131 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 132 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 133 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 134 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 135 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t", /* 136 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 137 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 138 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 139 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 140 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 141 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 142 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 143 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t", /* 144 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 145 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 146 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 147 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 148 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 149 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 150 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 151 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t", /* 152 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 153 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 154 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 155 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 156 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 157 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 158 */ - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ", /* 159 */ -}; - -void testname (bool nested, int indent, name first, name last); -void testnames (bool nested, int indent, int len, name first, name last); - -int -main (int argc, char **argv) -{ - char buf[MAXNAMELEN]; - char last_buf[MAXNAMELEN]; - char kwname[MAXNAMELEN]; - char routine[32]; - char type[32]; - int i; - int count; - int len; - struct _name_root_ names[200]; - struct _name_alpha_ names_alpha; - name n; - name newname; - char *input_name; - char *output_name; - char *include_name; - FILE *incl; - int fixlengths; - int total_length; - int do_name; /* TRUE if token may be NAME. */ - int do_names; /* TRUE if token may be NAMES. */ - int cc; - bool do_exit = FALSE; - - last_buf[0] = '\0'; - - for (i = 0; ((size_t) i) < ARRAY_SIZE (names); ++i) - { /* Initialize length/name ordered list roots. */ - names[i].first = (name) &names[i]; - names[i].last = (name) &names[i]; - } - names_alpha.first = (name) &names_alpha; /* Initialize name order. */ - names_alpha.last = (name) &names_alpha; - - if (argc != 4) - { - fprintf (stderr, "Command form: fini input output-code output-include\n"); - return (1); - } - - input_name = argv[1]; - output_name = argv[2]; - include_name = argv[3]; - - in = fopen (input_name, "r"); - if (in == NULL) - { - fprintf (stderr, "Cannot open \"%s\"\n", input_name); - return (1); - } - out = fopen (output_name, "w"); - if (out == NULL) - { - fclose (in); - fprintf (stderr, "Cannot open \"%s\"\n", output_name); - return (1); - } - incl = fopen (include_name, "w"); - if (incl == NULL) - { - fclose (in); - fprintf (stderr, "Cannot open \"%s\"\n", include_name); - return (1); - } - - /* Get past the initial block-style comment (man, this parsing code is just - _so_ lame, but I'm too lazy to improve it). */ - - for (;;) - { - cc = getc (in); - if (cc == '{') - { - while (((cc = getc (in)) != '}') && (cc != EOF)) - ; - } - else if (cc != EOF) - { - while (((cc = getc (in)) != EOF) && (! ISALNUM (cc))) - ; - ungetc (cc, in); - break; - } - else - { - assert ("EOF too soon!" == NULL); - return (1); - } - } - - fscanf (in, "%s %s %s %s %s %d %d", prefix, postfix, storage, type, routine, - &do_name, &do_names); - - if (storage[0] == '\0') - storage[1] = '\0'; - else - /* Assume string is quoted somehow, replace ending quote with space. */ - { - if (storage[2] == '\0') - storage[1] = '\0'; - else - storage[strlen (storage) - 1] = ' '; - } - - if (postfix[0] == '\0') - postfix[1] = '\0'; - else /* Assume string is quoted somehow, strip off - ending quote. */ - postfix[strlen (postfix) - 1] = '\0'; - - for (i = 1; storage[i] != '\0'; ++i) - storage[i - 1] = storage[i]; - storage[i - 1] = '\0'; - - for (i = 1; postfix[i] != '\0'; ++i) - postfix[i - 1] = postfix[i]; - postfix[i - 1] = '\0'; - - fixlengths = strlen (prefix) + strlen (postfix); - - while (TRUE) - { - count = fscanf (in, "%s %s", buf, kwname); - if (count == EOF) - break; - len = strlen (buf); - if (len == 0) - continue; /* Skip empty lines. */ - if (buf[0] == ';') - continue; /* Skip commented-out lines. */ - for (i = strlen (buf) - 1; i > 0; --i) - cc = buf[i]; - - /* Make new name object to store name and its keyword. */ - - newname = xmalloc (sizeof (*newname)); - newname->namelen = strlen (buf); - newname->kwlen = strlen (kwname); - total_length = newname->kwlen + fixlengths; - if (total_length >= 32) /* Else resulting keyword name too long. */ - { - fprintf (stderr, "%s: %s%s%s is 31+%d chars long\n", input_name, - prefix, kwname, postfix, total_length - 31); - do_exit = TRUE; - } - strcpy (newname->kwname, kwname); - for (i = 0; i < newname->namelen; ++i) - { - cc = buf[i]; - newname->name_uc[i] = TOUPPER (cc); - newname->name_lc[i] = TOLOWER (cc); - newname->name_ic[i] = cc; - } - newname->name_uc[i] = newname->name_lc[i] = newname->name_ic[i] = '\0'; - - /* Warn user if names aren't alphabetically ordered. */ - - if ((last_buf[0] != '\0') - && (strcmp (last_buf, newname->name_uc) >= 0)) - { - fprintf (stderr, "%s: \"%s\" precedes \"%s\"\n", input_name, - last_buf, newname->name_uc); - do_exit = TRUE; - } - strcpy (last_buf, newname->name_uc); - - /* Append name to end of alpha-sorted list (assumes names entered in - alpha order wrt name, not kwname, even though kwname is output from - this list). */ - - n = names_alpha.last; - newname->next_alpha = n->next_alpha; - newname->previous_alpha = n; - n->next_alpha->previous_alpha = newname; - n->next_alpha = newname; - - /* Insert name in appropriate length/name ordered list. */ - - n = (name) &names[len]; - while ((n->next != (name) &names[len]) - && (strcmp (buf, n->next->name_uc) > 0)) - n = n->next; - if (strcmp (buf, n->next->name_uc) == 0) - { - fprintf (stderr, "%s: extraneous \"%s\"\n", input_name, buf); - do_exit = TRUE; - } - newname->next = n->next; - newname->previous = n; - n->next->previous = newname; - n->next = newname; - } - -#if 0 - for (len = 0; len < ARRAY_SIZE (name); ++len) - { - if (names[len].first == (name) &names[len]) - continue; - printf ("Length %d:\n", len); - for (n = names[len].first; n != (name) &names[len]; n = n->next) - printf (" %s %s %s\n", n->name_uc, n->name_lc, n->name_ic); - } -#endif - - if (do_exit) - return (1); - - /* First output the #include file. */ - - for (n = names_alpha.first; n != (name) &names_alpha; n = n->next_alpha) - { - fprintf (incl, "#define %sl%s%s %d\n", prefix, n->kwname, postfix, - n->namelen); - } - - fprintf (incl, - "\ -\n\ -enum %s_\n\ -{\n\ -%sNone%s,\n\ -", - type, prefix, postfix); - - for (n = names_alpha.first; n != (name) &names_alpha; n = n->next_alpha) - { - fprintf (incl, - "\ -%s%s%s,\n\ -", - prefix, n->kwname, postfix); - } - - fprintf (incl, - "\ -%s%s\n\ -};\n\ -typedef enum %s_ %s;\n\ -", - prefix, postfix, type, type); - - /* Now output the C program. */ - - fprintf (out, - "\ -%s%s\n\ -%s (ffelexToken t)\n\ -%c\n\ - char *p;\n\ - int c;\n\ -\n\ - p = ffelex_token_text (t);\n\ -\n\ -", - storage, type, routine, '{'); - - if (do_name) - { - if (do_names) - fprintf (out, - "\ - if (ffelex_token_type (t) == FFELEX_typeNAME)\n\ - {\n\ - switch (ffelex_token_length (t))\n\ -\t{\n\ -" - ); - else - fprintf (out, - "\ - assert (ffelex_token_type (t) == FFELEX_typeNAME);\n\ -\n\ - switch (ffelex_token_length (t))\n\ - {\n\ -" - ); - -/* Now output the length as a case, followed by the binary search within that length. */ - - for (len = 0; ((size_t) len) < ARRAY_SIZE (names); ++len) - { - if (names[len].first != (name) &names[len]) - { - if (do_names) - fprintf (out, - "\ -\tcase %d:\n\ -", - len); - else - fprintf (out, - "\ - case %d:\n\ -", - len); - testname (FALSE, do_names ? 10 : 6, names[len].first, names[len].last); - if (do_names) - fprintf (out, - "\ -\t break;\n\ -" - ); - else - fprintf (out, - "\ - break;\n\ -" - ); - } - } - - if (do_names) - fprintf (out, - "\ -\t}\n\ - return %sNone%s;\n\ - }\n\ -\n\ -", - prefix, postfix); - else - fprintf (out, - "\ - }\n\ -\n\ - return %sNone%s;\n\ -}\n\ -", - prefix, postfix); - } - - if (do_names) - { - fputs ("\ - assert (ffelex_token_type (t) == FFELEX_typeNAMES);\n\ -\n\ - switch (ffelex_token_length (t))\n\ - {\n\ - default:\n\ -", - out); - - /* Find greatest non-empty length list. */ - - for (len = ARRAY_SIZE (names) - 1; - names[len].first == (name) &names[len]; - --len) - ; - -/* Now output the length as a case, followed by the binary search within that length. */ - - if (len > 0) - { - for (; len != 0; --len) - { - fprintf (out, - "\ - case %d:\n\ -", - len); - if (names[len].first != (name) &names[len]) - testnames (FALSE, 6, len, names[len].first, names[len].last); - } - if (names[1].first == (name) &names[1]) - fprintf (out, - "\ - ;\n\ -" - ); /* Need empty statement after an empty case - 1: */ - } - - fprintf (out, - "\ - }\n\ -\n\ - return %sNone%s;\n\ -}\n\ -", - prefix, postfix); - } - - if (out != stdout) - fclose (out); - if (incl != stdout) - fclose (incl); - if (in != stdin) - fclose (in); - return (0); -} - -void -testname (bool nested, int indent, name first, name last) -{ - name n; - name nhalf; - int num; - int numhalf; - - assert (!nested || indent >= 2); - assert (((size_t) indent) + 4 < ARRAY_SIZE (xspaces)); - - num = 0; - numhalf = 0; - for (n = first, nhalf = first; n != last->next; n = n->next) - { - if ((++num & 1) == 0) - { - nhalf = nhalf->next; - ++numhalf; - } - } - - if (nested) - fprintf (out, - "\ -%s{\n\ -", - xspaces[indent - 2]); - - fprintf (out, - "\ -%sif ((c = ffesrc_strcmp_2c (ffe_case_match (), p, \"%s\", \"%s\", \"%s\")) == 0)\n\ -%sreturn %s%s%s;\n\ -", - xspaces[indent], nhalf->name_uc, nhalf->name_lc, nhalf->name_ic, - xspaces[indent + 2], prefix, nhalf->kwname, postfix); - - if (num != 1) - { - fprintf (out, - "\ -%selse if (c < 0)\n\ -", - xspaces[indent]); - - if (numhalf == 0) - fprintf (out, - "\ -%s;\n\ -", - xspaces[indent + 2]); - else - testname (TRUE, indent + 4, first, nhalf->previous); - - if (num - numhalf > 1) - { - fprintf (out, - "\ -%selse\n\ -", - xspaces[indent]); - - testname (TRUE, indent + 4, nhalf->next, last); - } - } - - if (nested) - fprintf (out, - "\ -%s}\n\ -", - xspaces[indent - 2]); -} - -void -testnames (bool nested, int indent, int len, name first, name last) -{ - name n; - name nhalf; - int num; - int numhalf; - - assert (!nested || indent >= 2); - assert (((size_t) indent) + 4 < ARRAY_SIZE (xspaces)); - - num = 0; - numhalf = 0; - for (n = first, nhalf = first; n != last->next; n = n->next) - { - if ((++num & 1) == 0) - { - nhalf = nhalf->next; - ++numhalf; - } - } - - if (nested) - fprintf (out, - "\ -%s{\n\ -", - xspaces[indent - 2]); - - fprintf (out, - "\ -%sif ((c = ffesrc_strncmp_2c (ffe_case_match (), p, \"%s\", \"%s\", \"%s\", %d)) == 0)\n\ -%sreturn %s%s%s;\n\ -", - xspaces[indent], nhalf->name_uc, nhalf->name_lc, nhalf->name_ic, - len, xspaces[indent + 2], prefix, nhalf->kwname, postfix); - - if (num != 1) - { - fprintf (out, - "\ -%selse if (c < 0)\n\ -", - xspaces[indent]); - - if (numhalf == 0) - fprintf (out, - "\ -%s;\n\ -", - xspaces[indent + 2]); - else - testnames (TRUE, indent + 4, len, first, nhalf->previous); - - if (num - numhalf > 1) - { - fprintf (out, - "\ -%selse\n\ -", - xspaces[indent]); - - testnames (TRUE, indent + 4, len, nhalf->next, last); - } - } - - if (nested) - fprintf (out, - "\ -%s}\n\ -", - xspaces[indent - 2]); -} diff --git a/contrib/gcc/f/g77.1 b/contrib/gcc/f/g77.1 deleted file mode 100644 index 91af9e0..0000000 --- a/contrib/gcc/f/g77.1 +++ /dev/null @@ -1,1719 +0,0 @@ -.\" Automatically generated by Pod::Man version 1.15 -.\" Wed Feb 5 03:13:59 2003 -.\" -.\" Standard preamble: -.\" ====================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R - -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used -.\" to do unbreakable dashes and therefore won't be available. \*(C` and -.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr -.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and -.\" index entries marked with X<> in POD. Of course, you'll have to process -.\" the output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it -.\" makes way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -.bd B 3 -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ====================================================================== -.\" -.IX Title "G77 1" -.TH G77 1 "gcc-3.2.2" "2003-02-05" "GNU" -.UC -.SH "NAME" -g77 \- \s-1GNU\s0 project Fortran 77 compiler -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -g77 [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] - [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR] - [\fB\-W\fR\fIwarn\fR...] [\fB\-pedantic\fR] - [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...] - [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR] - [\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...] - [\fB\-o\fR \fIoutfile\fR] \fIinfile\fR... -.PP -Only the most useful options are listed here; see below for the -remainder. -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -The \fBg77\fR command supports all the options supported by the -\&\fBgcc\fR command. -.PP -All \fBgcc\fR and \fBg77\fR options -are accepted both by \fBg77\fR and by \fBgcc\fR -(as well as any other drivers built at the same time, -such as \fBg++\fR), -since adding \fBg77\fR to the \fBgcc\fR distribution -enables acceptance of \fBg77\fR options -by all of the relevant drivers. -.PP -In some cases, options have positive and negative forms; -the negative form of \fB\-ffoo\fR would be \fB\-fno-foo\fR. -This manual documents only one of these two forms, whichever -one is not the default. -.SH "OPTIONS" -.IX Header "OPTIONS" -Here is a summary of all the options specific to \s-1GNU\s0 Fortran, grouped -by type. Explanations are in the following sections. -.Ip "\fIOverall Options\fR" 4 -.IX Item "Overall Options" -\&\fB\-fversion \-fset-g77\-defaults \-fno-silent\fR -.Ip "\fIShorthand Options\fR" 4 -.IX Item "Shorthand Options" -\&\fB\-ff66 \-fno-f66 \-ff77 \-fno-f77 \-fno-ugly\fR -.Ip "\fIFortran Language Options\fR" 4 -.IX Item "Fortran Language Options" -\&\fB\-ffree-form \-fno-fixed-form \-ff90 -\&\-fvxt \-fdollar-ok \-fno-backslash -\&\-fno-ugly-args \-fno-ugly-assign \-fno-ugly-assumed -\&\-fugly-comma \-fugly-complex \-fugly-init \-fugly-logint -\&\-fonetrip \-ftypeless-boz -\&\-fintrin-case-initcap \-fintrin-case-upper -\&\-fintrin-case-lower \-fintrin-case-any -\&\-fmatch-case-initcap \-fmatch-case-upper -\&\-fmatch-case-lower \-fmatch-case-any -\&\-fsource-case-upper \-fsource-case-lower -\&\-fsource-case-preserve -\&\-fsymbol-case-initcap \-fsymbol-case-upper -\&\-fsymbol-case-lower \-fsymbol-case-any -\&\-fcase-strict-upper \-fcase-strict-lower -\&\-fcase-initcap \-fcase-upper \-fcase-lower \-fcase-preserve -\&\-ff2c-intrinsics-delete \-ff2c-intrinsics-hide -\&\-ff2c-intrinsics-disable \-ff2c-intrinsics-enable -\&\-fbadu77\-intrinsics-delete \-fbadu77\-intrinsics-hide -\&\-fbadu77\-intrinsics-disable \-fbadu77\-intrinsics-enable -\&\-ff90\-intrinsics-delete \-ff90\-intrinsics-hide -\&\-ff90\-intrinsics-disable \-ff90\-intrinsics-enable -\&\-fgnu-intrinsics-delete \-fgnu-intrinsics-hide -\&\-fgnu-intrinsics-disable \-fgnu-intrinsics-enable -\&\-fmil-intrinsics-delete \-fmil-intrinsics-hide -\&\-fmil-intrinsics-disable \-fmil-intrinsics-enable -\&\-funix-intrinsics-delete \-funix-intrinsics-hide -\&\-funix-intrinsics-disable \-funix-intrinsics-enable -\&\-fvxt-intrinsics-delete \-fvxt-intrinsics-hide -\&\-fvxt-intrinsics-disable \-fvxt-intrinsics-enable -\&\-ffixed-line-length-\fR\fIn\fR \fB\-ffixed-line-length-none\fR -.Ip "\fIWarning Options\fR" 4 -.IX Item "Warning Options" -\&\fB\-fsyntax-only \-pedantic \-pedantic-errors \-fpedantic -\&\-w \-Wno-globals \-Wimplicit \-Wunused \-Wuninitialized -\&\-Wall \-Wsurprising -\&\-Werror \-W\fR -.Ip "\fIDebugging Options\fR" 4 -.IX Item "Debugging Options" -\&\fB\-g\fR -.Ip "\fIOptimization Options\fR" 4 -.IX Item "Optimization Options" -\&\fB\-malign-double -\&\-ffloat-store \-fforce-mem \-fforce-addr \-fno-inline -\&\-ffast-math \-fstrength-reduce \-frerun-cse-after-loop -\&\-funsafe-math-optimizations \-fno-trapping-math -\&\-fexpensive-optimizations \-fdelayed-branch -\&\-fschedule-insns \-fschedule-insn2 \-fcaller-saves -\&\-funroll-loops \-funroll-all-loops -\&\-fno-move-all-movables \-fno-reduce-all-givs -\&\-fno-rerun-loop-opt\fR -.Ip "\fIDirectory Options\fR" 4 -.IX Item "Directory Options" -\&\fB\-I\fR\fIdir\fR \fB\-I-\fR -.Ip "\fICode Generation Options\fR" 4 -.IX Item "Code Generation Options" -\&\fB\-fno-automatic \-finit-local-zero \-fno-f2c -\&\-ff2c-library \-fno-underscoring \-fno-ident -\&\-fpcc-struct-return \-freg-struct-return -\&\-fshort-double \-fno-common \-fpack-struct -\&\-fzeros \-fno-second-underscore -\&\-femulate-complex -\&\-falias-check \-fargument-alias -\&\-fargument-noalias \-fno-argument-noalias-global -\&\-fno-globals \-fflatten-arrays -\&\-fbounds-check \-ffortran-bounds-check\fR -.PP -Compilation can involve as many as four stages: preprocessing, code -generation (often what is really meant by the term ``compilation''), -assembly, and linking, always in that order. The first three -stages apply to an individual source file, and end by producing an -object file; linking combines all the object files (those newly -compiled, and those specified as input) into an executable file. -.PP -For any given input file, the file name suffix determines what kind of -program is contained in the file\-\-\-that is, the language in which the -program is written is generally indicated by the suffix. -Suffixes specific to \s-1GNU\s0 Fortran are listed below. -.Ip "\fIfile\fR\fB.f\fR" 4 -.IX Item "file.f" -.PD 0 -.Ip "\fIfile\fR\fB.for\fR" 4 -.IX Item "file.for" -.Ip "\fIfile\fR\fB.FOR\fR" 4 -.IX Item "file.FOR" -.PD -Fortran source code that should not be preprocessed. -.Sp -Such source code cannot contain any preprocessor directives, such -as \f(CW\*(C`#include\*(C'\fR, \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#if\*(C'\fR, and so on. -.Sp -You can force \fB.f\fR files to be preprocessed by \fBcpp\fR by using -\&\fB\-x f77\-cpp-input\fR. -.Ip "\fIfile\fR\fB.F\fR" 4 -.IX Item "file.F" -.PD 0 -.Ip "\fIfile\fR\fB.fpp\fR" 4 -.IX Item "file.fpp" -.Ip "\fIfile\fR\fB.FPP\fR" 4 -.IX Item "file.FPP" -.PD -Fortran source code that must be preprocessed (by the C preprocessor -\&\fBcpp\fR, which is part of \s-1GNU\s0 \s-1CC\s0). -.Sp -Note that preprocessing is not extended to the contents of -files included by the \f(CW\*(C`INCLUDE\*(C'\fR directive\-\-\-the \f(CW\*(C`#include\*(C'\fR -preprocessor directive must be used instead. -.Ip "\fIfile\fR\fB.r\fR" 4 -.IX Item "file.r" -Ratfor source code, which must be preprocessed by the \fBratfor\fR -command, which is available separately (as it is not yet part of the \s-1GNU\s0 -Fortran distribution). -One version in Fortran, adapted for use with \fBg77\fR is at -<\fBftp://members.aol.com/n8tm/rat7.uue\fR> (of uncertain copyright -status). Another, public domain version in C is at -<\fBhttp://sepwww.stanford.edu/sep/prof/ratfor.shar.2\fR>. -.PP -\&\s-1UNIX\s0 users typically use the \fI\fIfile\fI.f\fR and \fI\fIfile\fI.F\fR -nomenclature. -Users of other operating systems, especially those that cannot -distinguish upper-case -letters from lower-case letters in their file names, typically use -the \fI\fIfile\fI.for\fR and \fI\fIfile\fI.fpp\fR nomenclature. -.PP -Use of the preprocessor \fBcpp\fR allows use of C-like -constructs such as \f(CW\*(C`#define\*(C'\fR and \f(CW\*(C`#include\*(C'\fR, but can -lead to unexpected, even mistaken, results due to Fortran's source file -format. -It is recommended that use of the C preprocessor -be limited to \f(CW\*(C`#include\*(C'\fR and, in -conjunction with \f(CW\*(C`#define\*(C'\fR, only \f(CW\*(C`#if\*(C'\fR and related directives, -thus avoiding in-line macro expansion entirely. -This recommendation applies especially -when using the traditional fixed source form. -With free source form, -fewer unexpected transformations are likely to happen, but use of -constructs such as Hollerith and character constants can nevertheless -present problems, especially when these are continued across multiple -source lines. -These problems result, primarily, from differences between the way -such constants are interpreted by the C preprocessor and by a Fortran -compiler. -.PP -Another example of a problem that results from using the C preprocessor -is that a Fortran comment line that happens to contain any -characters ``interesting'' to the C preprocessor, -such as a backslash at the end of the line, -is not recognized by the preprocessor as a comment line, -so instead of being passed through ``raw'', -the line is edited according to the rules for the preprocessor. -For example, the backslash at the end of the line is removed, -along with the subsequent newline, resulting in the next -line being effectively commented out\-\-\-unfortunate if that -line is a non-comment line of important code! -.PP -\&\fINote:\fR The \fB\-traditional\fR and \fB\-undef\fR flags are supplied -to \fBcpp\fR by default, to help avoid unpleasant surprises. -.PP -This means that \s-1ANSI\s0 C preprocessor features (such as the \fB#\fR -operator) aren't available, and only variables in the C reserved -namespace (generally, names with a leading underscore) are liable to -substitution by C predefines. -Thus, if you want to do system-specific -tests, use, for example, \fB#ifdef _\|_linux_\|_\fR rather than \fB#ifdef linux\fR. -Use the \fB\-v\fR option to see exactly how the preprocessor is invoked. -.PP -Unfortunately, the \fB\-traditional\fR flag will not avoid an error from -anything that \fBcpp\fR sees as an unterminated C comment, such as: -.PP -.Vb 2 -\& C Some Fortran compilers accept /* as starting -\& C an inline comment. -.Ve -The following options that affect overall processing are recognized -by the \fBg77\fR and \fBgcc\fR commands in a \s-1GNU\s0 Fortran installation: -.Ip "\fB\-fversion\fR" 4 -.IX Item "-fversion" -Ensure that the \fBg77\fR version of the compiler phase is reported, -if run, -and, starting in \f(CW\*(C`egcs\*(C'\fR version 1.1, -that internal consistency checks in the \fIf771\fR program are run. -.Sp -This option is supplied automatically when \fB\-v\fR or \fB\*(--verbose\fR -is specified as a command-line option for \fBg77\fR or \fBgcc\fR -and when the resulting commands compile Fortran source files. -.Sp -In \s-1GCC\s0 3.1, this is changed back to the behaviour \fBgcc\fR displays -for \fB.c\fR files. -.Ip "\fB\-fset-g77\-defaults\fR" 4 -.IX Item "-fset-g77-defaults" -\&\fIVersion info:\fR -This option was obsolete as of \f(CW\*(C`egcs\*(C'\fR -version 1.1. -The effect is instead achieved -by the \f(CW\*(C`lang_init_options\*(C'\fR routine -in \fIgcc/gcc/f/com.c\fR. -.Sp -Set up whatever \fBgcc\fR options are to apply to Fortran -compilations, and avoid running internal consistency checks -that might take some time. -.Sp -This option is supplied automatically when compiling Fortran code -via the \fBg77\fR or \fBgcc\fR command. -The description of this option is provided so that users seeing -it in the output of, say, \fBg77 \-v\fR understand why it is -there. -.Sp -Also, developers who run \f(CW\*(C`f771\*(C'\fR directly might want to specify it -by hand to get the same defaults as they would running \f(CW\*(C`f771\*(C'\fR -via \fBg77\fR or \fBgcc\fR -However, such developers should, after linking a new \f(CW\*(C`f771\*(C'\fR -executable, invoke it without this option once, -e.g. via \f(CW\*(C`./f771 \-quiet < /dev/null\*(C'\fR, -to ensure that they have not introduced any -internal inconsistencies (such as in the table of -intrinsics) before proceeding\-\--\fBg77\fR will crash -with a diagnostic if it detects an inconsistency. -.Ip "\fB\-fno-silent\fR" 4 -.IX Item "-fno-silent" -Print (to \f(CW\*(C`stderr\*(C'\fR) the names of the program units as -they are compiled, in a form similar to that used by popular -\&\s-1UNIX\s0 \fBf77\fR implementations and \fBf2c\fR -.Sh "Shorthand Options" -.IX Subsection "Shorthand Options" -The following options serve as ``shorthand'' -for other options accepted by the compiler: -.Ip "\fB\-fugly\fR" 4 -.IX Item "-fugly" -\&\fINote:\fR This option is no longer supported. -The information, below, is provided to aid -in the conversion of old scripts. -.Sp -Specify that certain ``ugly'' constructs are to be quietly accepted. -Same as: -.Sp -.Vb 3 -\& -fugly-args -fugly-assign -fugly-assumed -\& -fugly-comma -fugly-complex -fugly-init -\& -fugly-logint -.Ve -These constructs are considered inappropriate to use in new -or well-maintained portable Fortran code, but widely used -in old code. -.Ip "\fB\-fno-ugly\fR" 4 -.IX Item "-fno-ugly" -Specify that all ``ugly'' constructs are to be noisily rejected. -Same as: -.Sp -.Vb 3 -\& -fno-ugly-args -fno-ugly-assign -fno-ugly-assumed -\& -fno-ugly-comma -fno-ugly-complex -fno-ugly-init -\& -fno-ugly-logint -.Ve -.Ip "\fB\-ff66\fR" 4 -.IX Item "-ff66" -Specify that the program is written in idiomatic \s-1FORTRAN\s0 66. -Same as \fB\-fonetrip \-fugly-assumed\fR. -.Sp -The \fB\-fno-f66\fR option is the inverse of \fB\-ff66\fR. -As such, it is the same as \fB\-fno-onetrip \-fno-ugly-assumed\fR. -.Sp -The meaning of this option is likely to be refined as future -versions of \fBg77\fR provide more compatibility with other -existing and obsolete Fortran implementations. -.Ip "\fB\-ff77\fR" 4 -.IX Item "-ff77" -Specify that the program is written in idiomatic \s-1UNIX\s0 \s-1FORTRAN\s0 77 -and/or the dialect accepted by the \fBf2c\fR product. -Same as \fB\-fbackslash \-fno-typeless-boz\fR. -.Sp -The meaning of this option is likely to be refined as future -versions of \fBg77\fR provide more compatibility with other -existing and obsolete Fortran implementations. -.Ip "\fB\-fno-f77\fR" 4 -.IX Item "-fno-f77" -The \fB\-fno-f77\fR option is \fInot\fR the inverse -of \fB\-ff77\fR. -It specifies that the program is not written in idiomatic \s-1UNIX\s0 -\&\s-1FORTRAN\s0 77 or \fBf2c\fR but in a more widely portable dialect. -\&\fB\-fno-f77\fR is the same as \fB\-fno-backslash\fR. -.Sp -The meaning of this option is likely to be refined as future -versions of \fBg77\fR provide more compatibility with other -existing and obsolete Fortran implementations. -.Sh "Options Controlling Fortran Dialect" -.IX Subsection "Options Controlling Fortran Dialect" -The following options control the dialect of Fortran -that the compiler accepts: -.Ip "\fB\-ffree-form\fR" 4 -.IX Item "-ffree-form" -.PD 0 -.Ip "\fB\-fno-fixed-form\fR" 4 -.IX Item "-fno-fixed-form" -.PD -Specify that the source file is written in free form -(introduced in Fortran 90) instead of the more-traditional fixed form. -.Ip "\fB\-ff90\fR" 4 -.IX Item "-ff90" -Allow certain Fortran-90 constructs. -.Sp -This option controls whether certain -Fortran 90 constructs are recognized. -(Other Fortran 90 constructs -might or might not be recognized depending on other options such as -\&\fB\-fvxt\fR, \fB\-ff90\-intrinsics-enable\fR, and the -current level of support for Fortran 90.) -.Ip "\fB\-fvxt\fR" 4 -.IX Item "-fvxt" -Specify the treatment of certain constructs that have different -meanings depending on whether the code is written in -\&\s-1GNU\s0 Fortran (based on \s-1FORTRAN\s0 77 and akin to Fortran 90) -or \s-1VXT\s0 Fortran (more like \s-1VAX\s0 \s-1FORTRAN\s0). -.Sp -The default is \fB\-fno-vxt\fR. -\&\fB\-fvxt\fR specifies that the \s-1VXT\s0 Fortran interpretations -for those constructs are to be chosen. -.Ip "\fB\-fdollar-ok\fR" 4 -.IX Item "-fdollar-ok" -Allow \fB$\fR as a valid character in a symbol name. -.Ip "\fB\-fno-backslash\fR" 4 -.IX Item "-fno-backslash" -Specify that \fB\e\fR is not to be specially interpreted in character -and Hollerith constants a la C and many \s-1UNIX\s0 Fortran compilers. -.Sp -For example, with \fB\-fbackslash\fR in effect, \fBA\enB\fR specifies -three characters, with the second one being newline. -With \fB\-fno-backslash\fR, it specifies four characters, -\&\fBA\fR, \fB\e\fR, \fBn\fR, and \fBB\fR. -.Sp -Note that \fBg77\fR implements a fairly general form of backslash -processing that is incompatible with the narrower forms supported -by some other compilers. -For example, \fB'A\e003B'\fR is a three-character string in \fBg77\fR -whereas other compilers that support backslash might not support -the three-octal-digit form, and thus treat that string as longer -than three characters. -.Ip "\fB\-fno-ugly-args\fR" 4 -.IX Item "-fno-ugly-args" -Disallow passing Hollerith and typeless constants as actual -arguments (for example, \fB\s-1CALL\s0 FOO(4HABCD)\fR). -.Ip "\fB\-fugly-assign\fR" 4 -.IX Item "-fugly-assign" -Use the same storage for a given variable regardless of -whether it is used to hold an assigned-statement label -(as in \fB\s-1ASSIGN\s0 10 \s-1TO\s0 I\fR) or used to hold numeric data -(as in \fBI = 3\fR). -.Ip "\fB\-fugly-assumed\fR" 4 -.IX Item "-fugly-assumed" -Assume any dummy array with a final dimension specified as \fB1\fR -is really an assumed-size array, as if \fB*\fR had been specified -for the final dimension instead of \fB1\fR. -.Sp -For example, \fB\s-1DIMENSION\s0 X(1)\fR is treated as if it -had read \fB\s-1DIMENSION\s0 X(*)\fR. -.Ip "\fB\-fugly-comma\fR" 4 -.IX Item "-fugly-comma" -In an external-procedure invocation, -treat a trailing comma in the argument list -as specification of a trailing null argument, -and treat an empty argument list -as specification of a single null argument. -.Sp -For example, \fB\s-1CALL\s0 \f(BIFOO\fB\|(,)\fR is treated as -\&\fB\s-1CALL\s0 FOO(%\f(BIVAL\fB\|(0), %\f(BIVAL\fB\|(0))\fR. -That is, \fItwo\fR null arguments are specified -by the procedure call when \fB\-fugly-comma\fR is in force. -And \fBF = \f(BIFUNC()\fB\fR is treated as \fBF = FUNC(%\f(BIVAL\fB\|(0))\fR. -.Sp -The default behavior, \fB\-fno-ugly-comma\fR, is to ignore -a single trailing comma in an argument list. -So, by default, \fB\s-1CALL\s0 FOO(X,)\fR is treated -exactly the same as \fB\s-1CALL\s0 \f(BIFOO\fB\|(X)\fR. -.Ip "\fB\-fugly-complex\fR" 4 -.IX Item "-fugly-complex" -Do not complain about \fBREAL(\fR\fIexpr\fR\fB)\fR or -\&\fBAIMAG(\fR\fIexpr\fR\fB)\fR when \fIexpr\fR is a \f(CW\*(C`COMPLEX\*(C'\fR -type other than \f(CW\*(C`COMPLEX(KIND=1)\*(C'\fR\-\-\-usually -this is used to permit \f(CW\*(C`COMPLEX(KIND=2)\*(C'\fR -(\f(CW\*(C`DOUBLE COMPLEX\*(C'\fR) operands. -.Sp -The \fB\-ff90\fR option controls the interpretation -of this construct. -.Ip "\fB\-fno-ugly-init\fR" 4 -.IX Item "-fno-ugly-init" -Disallow use of Hollerith and typeless constants as initial -values (in \f(CW\*(C`PARAMETER\*(C'\fR and \f(CW\*(C`DATA\*(C'\fR statements), and -use of character constants to -initialize numeric types and vice versa. -.Sp -For example, \fB\s-1DATA\s0 I/'F'/, \s-1CHRVAR/65/\s0, J/4HABCD/\fR is disallowed by -\&\fB\-fno-ugly-init\fR. -.Ip "\fB\-fugly-logint\fR" 4 -.IX Item "-fugly-logint" -Treat \f(CW\*(C`INTEGER\*(C'\fR and \f(CW\*(C`LOGICAL\*(C'\fR variables and -expressions as potential stand-ins for each other. -.Sp -For example, automatic conversion between \f(CW\*(C`INTEGER\*(C'\fR and -\&\f(CW\*(C`LOGICAL\*(C'\fR is enabled, for many contexts, via this option. -.Ip "\fB\-fonetrip\fR" 4 -.IX Item "-fonetrip" -Executable iterative \f(CW\*(C`DO\*(C'\fR loops are to be executed at -least once each time they are reached. -.Sp -\&\s-1ANSI\s0 \s-1FORTRAN\s0 77 and more recent versions of the Fortran standard -specify that the body of an iterative \f(CW\*(C`DO\*(C'\fR loop is not executed -if the number of iterations calculated from the parameters of the -loop is less than 1. -(For example, \fB\s-1DO\s0 10 I = 1, 0\fR.) -Such a loop is called a \fIzero-trip loop\fR. -.Sp -Prior to \s-1ANSI\s0 \s-1FORTRAN\s0 77, many compilers implemented \f(CW\*(C`DO\*(C'\fR loops -such that the body of a loop would be executed at least once, even -if the iteration count was zero. -Fortran code written assuming this behavior is said to require -\&\fIone-trip loops\fR. -For example, some code written to the \s-1FORTRAN\s0 66 standard -expects this behavior from its \f(CW\*(C`DO\*(C'\fR loops, although that -standard did not specify this behavior. -.Sp -The \fB\-fonetrip\fR option specifies that the source \fIfile\fR\|(s) being -compiled require one-trip loops. -.Sp -This option affects only those loops specified by the (iterative) \f(CW\*(C`DO\*(C'\fR -statement and by implied-\f(CW\*(C`DO\*(C'\fR lists in I/O statements. -Loops specified by implied-\f(CW\*(C`DO\*(C'\fR lists in \f(CW\*(C`DATA\*(C'\fR and -specification (non-executable) statements are not affected. -.Ip "\fB\-ftypeless-boz\fR" 4 -.IX Item "-ftypeless-boz" -Specifies that prefix-radix non-decimal constants, such as -\&\fBZ'\s-1ABCD\s0'\fR, are typeless instead of \f(CW\*(C`INTEGER(KIND=1)\*(C'\fR. -.Sp -You can test for yourself whether a particular compiler treats -the prefix form as \f(CW\*(C`INTEGER(KIND=1)\*(C'\fR or typeless by running the -following program: -.Sp -.Vb 6 -\& EQUIVALENCE (I, R) -\& R = Z'ABCD1234' -\& J = Z'ABCD1234' -\& IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS' -\& IF (J .NE. I) PRINT *, 'Prefix form is INTEGER' -\& END -.Ve -Reports indicate that many compilers process this form as -\&\f(CW\*(C`INTEGER(KIND=1)\*(C'\fR, though a few as typeless, and at least one -based on a command-line option specifying some kind of -compatibility. -.Ip "\fB\-fintrin-case-initcap\fR" 4 -.IX Item "-fintrin-case-initcap" -.PD 0 -.Ip "\fB\-fintrin-case-upper\fR" 4 -.IX Item "-fintrin-case-upper" -.Ip "\fB\-fintrin-case-lower\fR" 4 -.IX Item "-fintrin-case-lower" -.Ip "\fB\-fintrin-case-any\fR" 4 -.IX Item "-fintrin-case-any" -.PD -Specify expected case for intrinsic names. -\&\fB\-fintrin-case-lower\fR is the default. -.Ip "\fB\-fmatch-case-initcap\fR" 4 -.IX Item "-fmatch-case-initcap" -.PD 0 -.Ip "\fB\-fmatch-case-upper\fR" 4 -.IX Item "-fmatch-case-upper" -.Ip "\fB\-fmatch-case-lower\fR" 4 -.IX Item "-fmatch-case-lower" -.Ip "\fB\-fmatch-case-any\fR" 4 -.IX Item "-fmatch-case-any" -.PD -Specify expected case for keywords. -\&\fB\-fmatch-case-lower\fR is the default. -.Ip "\fB\-fsource-case-upper\fR" 4 -.IX Item "-fsource-case-upper" -.PD 0 -.Ip "\fB\-fsource-case-lower\fR" 4 -.IX Item "-fsource-case-lower" -.Ip "\fB\-fsource-case-preserve\fR" 4 -.IX Item "-fsource-case-preserve" -.PD -Specify whether source text other than character and Hollerith constants -is to be translated to uppercase, to lowercase, or preserved as is. -\&\fB\-fsource-case-lower\fR is the default. -.Ip "\fB\-fsymbol-case-initcap\fR" 4 -.IX Item "-fsymbol-case-initcap" -.PD 0 -.Ip "\fB\-fsymbol-case-upper\fR" 4 -.IX Item "-fsymbol-case-upper" -.Ip "\fB\-fsymbol-case-lower\fR" 4 -.IX Item "-fsymbol-case-lower" -.Ip "\fB\-fsymbol-case-any\fR" 4 -.IX Item "-fsymbol-case-any" -.PD -Specify valid cases for user-defined symbol names. -\&\fB\-fsymbol-case-any\fR is the default. -.Ip "\fB\-fcase-strict-upper\fR" 4 -.IX Item "-fcase-strict-upper" -Same as \fB\-fintrin-case-upper \-fmatch-case-upper \-fsource-case-preserve -\&\-fsymbol-case-upper\fR. -(Requires all pertinent source to be in uppercase.) -.Ip "\fB\-fcase-strict-lower\fR" 4 -.IX Item "-fcase-strict-lower" -Same as \fB\-fintrin-case-lower \-fmatch-case-lower \-fsource-case-preserve -\&\-fsymbol-case-lower\fR. -(Requires all pertinent source to be in lowercase.) -.Ip "\fB\-fcase-initcap\fR" 4 -.IX Item "-fcase-initcap" -Same as \fB\-fintrin-case-initcap \-fmatch-case-initcap \-fsource-case-preserve -\&\-fsymbol-case-initcap\fR. -(Requires all pertinent source to be in initial capitals, -as in \fBPrint *,SqRt(Value)\fR.) -.Ip "\fB\-fcase-upper\fR" 4 -.IX Item "-fcase-upper" -Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-upper -\&\-fsymbol-case-any\fR. -(Maps all pertinent source to uppercase.) -.Ip "\fB\-fcase-lower\fR" 4 -.IX Item "-fcase-lower" -Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-lower -\&\-fsymbol-case-any\fR. -(Maps all pertinent source to lowercase.) -.Ip "\fB\-fcase-preserve\fR" 4 -.IX Item "-fcase-preserve" -Same as \fB\-fintrin-case-any \-fmatch-case-any \-fsource-case-preserve -\&\-fsymbol-case-any\fR. -(Preserves all case in user-defined symbols, -while allowing any-case matching of intrinsics and keywords. -For example, \fBcall Foo(i,I)\fR would pass two \fIdifferent\fR -variables named \fBi\fR and \fBI\fR to a procedure named \fBFoo\fR.) -.Ip "\fB\-fbadu77\-intrinsics-delete\fR" 4 -.IX Item "-fbadu77-intrinsics-delete" -.PD 0 -.Ip "\fB\-fbadu77\-intrinsics-hide\fR" 4 -.IX Item "-fbadu77-intrinsics-hide" -.Ip "\fB\-fbadu77\-intrinsics-disable\fR" 4 -.IX Item "-fbadu77-intrinsics-disable" -.Ip "\fB\-fbadu77\-intrinsics-enable\fR" 4 -.IX Item "-fbadu77-intrinsics-enable" -.PD -Specify status of \s-1UNIX\s0 intrinsics having inappropriate forms. -\&\fB\-fbadu77\-intrinsics-enable\fR is the default. -.Ip "\fB\-ff2c-intrinsics-delete\fR" 4 -.IX Item "-ff2c-intrinsics-delete" -.PD 0 -.Ip "\fB\-ff2c-intrinsics-hide\fR" 4 -.IX Item "-ff2c-intrinsics-hide" -.Ip "\fB\-ff2c-intrinsics-disable\fR" 4 -.IX Item "-ff2c-intrinsics-disable" -.Ip "\fB\-ff2c-intrinsics-enable\fR" 4 -.IX Item "-ff2c-intrinsics-enable" -.PD -Specify status of f2c-specific intrinsics. -\&\fB\-ff2c-intrinsics-enable\fR is the default. -.Ip "\fB\-ff90\-intrinsics-delete\fR" 4 -.IX Item "-ff90-intrinsics-delete" -.PD 0 -.Ip "\fB\-ff90\-intrinsics-hide\fR" 4 -.IX Item "-ff90-intrinsics-hide" -.Ip "\fB\-ff90\-intrinsics-disable\fR" 4 -.IX Item "-ff90-intrinsics-disable" -.Ip "\fB\-ff90\-intrinsics-enable\fR" 4 -.IX Item "-ff90-intrinsics-enable" -.PD -Specify status of F90\-specific intrinsics. -\&\fB\-ff90\-intrinsics-enable\fR is the default. -.Ip "\fB\-fgnu-intrinsics-delete\fR" 4 -.IX Item "-fgnu-intrinsics-delete" -.PD 0 -.Ip "\fB\-fgnu-intrinsics-hide\fR" 4 -.IX Item "-fgnu-intrinsics-hide" -.Ip "\fB\-fgnu-intrinsics-disable\fR" 4 -.IX Item "-fgnu-intrinsics-disable" -.Ip "\fB\-fgnu-intrinsics-enable\fR" 4 -.IX Item "-fgnu-intrinsics-enable" -.PD -Specify status of Digital's COMPLEX-related intrinsics. -\&\fB\-fgnu-intrinsics-enable\fR is the default. -.Ip "\fB\-fmil-intrinsics-delete\fR" 4 -.IX Item "-fmil-intrinsics-delete" -.PD 0 -.Ip "\fB\-fmil-intrinsics-hide\fR" 4 -.IX Item "-fmil-intrinsics-hide" -.Ip "\fB\-fmil-intrinsics-disable\fR" 4 -.IX Item "-fmil-intrinsics-disable" -.Ip "\fB\-fmil-intrinsics-enable\fR" 4 -.IX Item "-fmil-intrinsics-enable" -.PD -Specify status of MIL-STD-1753\-specific intrinsics. -\&\fB\-fmil-intrinsics-enable\fR is the default. -.Ip "\fB\-funix-intrinsics-delete\fR" 4 -.IX Item "-funix-intrinsics-delete" -.PD 0 -.Ip "\fB\-funix-intrinsics-hide\fR" 4 -.IX Item "-funix-intrinsics-hide" -.Ip "\fB\-funix-intrinsics-disable\fR" 4 -.IX Item "-funix-intrinsics-disable" -.Ip "\fB\-funix-intrinsics-enable\fR" 4 -.IX Item "-funix-intrinsics-enable" -.PD -Specify status of \s-1UNIX\s0 intrinsics. -\&\fB\-funix-intrinsics-enable\fR is the default. -.Ip "\fB\-fvxt-intrinsics-delete\fR" 4 -.IX Item "-fvxt-intrinsics-delete" -.PD 0 -.Ip "\fB\-fvxt-intrinsics-hide\fR" 4 -.IX Item "-fvxt-intrinsics-hide" -.Ip "\fB\-fvxt-intrinsics-disable\fR" 4 -.IX Item "-fvxt-intrinsics-disable" -.Ip "\fB\-fvxt-intrinsics-enable\fR" 4 -.IX Item "-fvxt-intrinsics-enable" -.PD -Specify status of \s-1VXT\s0 intrinsics. -\&\fB\-fvxt-intrinsics-enable\fR is the default. -.Ip "\fB\-ffixed-line-length-\fR\fIn\fR" 4 -.IX Item "-ffixed-line-length-n" -Set column after which characters are ignored in typical fixed-form -lines in the source file, and through which spaces are assumed (as -if padded to that length) after the ends of short fixed-form lines. -.Sp -Popular values for \fIn\fR include 72 (the -standard and the default), 80 (card image), and 132 (corresponds -to ``extended-source'' options in some popular compilers). -\&\fIn\fR may be \fBnone\fR, meaning that the entire line is meaningful -and that continued character constants never have implicit spaces appended -to them to fill out the line. -\&\fB\-ffixed-line-length-0\fR means the same thing as -\&\fB\-ffixed-line-length-none\fR. -.Sh "Options to Request or Suppress Warnings" -.IX Subsection "Options to Request or Suppress Warnings" -Warnings are diagnostic messages that report constructions which -are not inherently erroneous but which are risky or suggest there -might have been an error. -.PP -You can request many specific warnings with options beginning \fB\-W\fR, -for example \fB\-Wimplicit\fR to request warnings on implicit -declarations. Each of these specific warning options also has a -negative form beginning \fB\-Wno-\fR to turn off warnings; -for example, \fB\-Wno-implicit\fR. This manual lists only one of the -two forms, whichever is not the default. -.PP -These options control the amount and kinds of warnings produced by \s-1GNU\s0 -Fortran: -.Ip "\fB\-fsyntax-only\fR" 4 -.IX Item "-fsyntax-only" -Check the code for syntax errors, but don't do anything beyond that. -.Ip "\fB\-pedantic\fR" 4 -.IX Item "-pedantic" -Issue warnings for uses of extensions to \s-1ANSI\s0 \s-1FORTRAN\s0 77. -\&\fB\-pedantic\fR also applies to C-language constructs where they -occur in \s-1GNU\s0 Fortran source files, such as use of \fB\ee\fR in a -character constant within a directive like \fB#include\fR. -.Sp -Valid \s-1ANSI\s0 \s-1FORTRAN\s0 77 programs should compile properly with or without -this option. -However, without this option, certain \s-1GNU\s0 extensions and traditional -Fortran features are supported as well. -With this option, many of them are rejected. -.Sp -Some users try to use \fB\-pedantic\fR to check programs for strict \s-1ANSI\s0 -conformance. -They soon find that it does not do quite what they want\-\-\-it finds some -non-ANSI practices, but not all. -However, improvements to \fBg77\fR in this area are welcome. -.Ip "\fB\-pedantic-errors\fR" 4 -.IX Item "-pedantic-errors" -Like \fB\-pedantic\fR, except that errors are produced rather than -warnings. -.Ip "\fB\-fpedantic\fR" 4 -.IX Item "-fpedantic" -Like \fB\-pedantic\fR, but applies only to Fortran constructs. -.Ip "\fB\-w\fR" 4 -.IX Item "-w" -Inhibit all warning messages. -.Ip "\fB\-Wno-globals\fR" 4 -.IX Item "-Wno-globals" -Inhibit warnings about use of a name as both a global name -(a subroutine, function, or block data program unit, or a -common block) and implicitly as the name of an intrinsic -in a source file. -.Sp -Also inhibit warnings about inconsistent invocations and/or -definitions of global procedures (function and subroutines). -Such inconsistencies include different numbers of arguments -and different types of arguments. -.Ip "\fB\-Wimplicit\fR" 4 -.IX Item "-Wimplicit" -Warn whenever a variable, array, or function is implicitly -declared. -Has an effect similar to using the \f(CW\*(C`IMPLICIT NONE\*(C'\fR statement -in every program unit. -(Some Fortran compilers provide this feature by an option -named \fB\-u\fR or \fB/WARNINGS=DECLARATIONS\fR.) -.Ip "\fB\-Wunused\fR" 4 -.IX Item "-Wunused" -Warn whenever a variable is unused aside from its declaration. -.Ip "\fB\-Wuninitialized\fR" 4 -.IX Item "-Wuninitialized" -Warn whenever an automatic variable is used without first being initialized. -.Sp -These warnings are possible only in optimizing compilation, -because they require data-flow information that is computed only -when optimizing. If you don't specify \fB\-O\fR, you simply won't -get these warnings. -.Sp -These warnings occur only for variables that are candidates for -register allocation. Therefore, they do not occur for a variable -whose address is taken, or whose size -is other than 1, 2, 4 or 8 bytes. Also, they do not occur for -arrays, even when they are in registers. -.Sp -Note that there might be no warning about a variable that is used only -to compute a value that itself is never used, because such -computations may be deleted by data-flow analysis before the warnings -are printed. -.Sp -These warnings are made optional because \s-1GNU\s0 Fortran is not smart -enough to see all the reasons why the code might be correct -despite appearing to have an error. Here is one example of how -this can happen: -.Sp -.Vb 6 -\& SUBROUTINE DISPAT(J) -\& IF (J.EQ.1) I=1 -\& IF (J.EQ.2) I=4 -\& IF (J.EQ.3) I=5 -\& CALL FOO(I) -\& END -.Ve -If the value of \f(CW\*(C`J\*(C'\fR is always 1, 2 or 3, then \f(CW\*(C`I\*(C'\fR is -always initialized, but \s-1GNU\s0 Fortran doesn't know this. Here is -another common case: -.Sp -.Vb 6 -\& SUBROUTINE MAYBE(FLAG) -\& LOGICAL FLAG -\& IF (FLAG) VALUE = 9.4 -\& ... -\& IF (FLAG) PRINT *, VALUE -\& END -.Ve -This has no bug because \f(CW\*(C`VALUE\*(C'\fR is used only if it is set. -.Ip "\fB\-Wall\fR" 4 -.IX Item "-Wall" -The \fB\-Wunused\fR and \fB\-Wuninitialized\fR options combined. -These are all the -options which pertain to usage that we recommend avoiding and that we -believe is easy to avoid. -(As more warnings are added to \fBg77\fR some might -be added to the list enabled by \fB\-Wall\fR.) -.PP -The remaining \fB\-W...\fR options are not implied by \fB\-Wall\fR -because they warn about constructions that we consider reasonable to -use, on occasion, in clean programs. -.Ip "\fB\-Wsurprising\fR" 4 -.IX Item "-Wsurprising" -Warn about ``suspicious'' constructs that are interpreted -by the compiler in a way that might well be surprising to -someone reading the code. -These differences can result in subtle, compiler-dependent -(even machine-dependent) behavioral differences. -The constructs warned about include: -.RS 4 -.Ip "\(bu" 4 -Expressions having two arithmetic operators in a row, such -as \fBX*\-Y\fR. -Such a construct is nonstandard, and can produce -unexpected results in more complicated situations such -as \fBX**\-Y*Z\fR. -\&\fBg77\fR along with many other compilers, interprets -this example differently than many programmers, and a few -other compilers. -Specifically, \fBg77\fR interprets \fBX**\-Y*Z\fR as -\&\fB(X**(\-Y))*Z\fR, while others might think it should -be interpreted as \fBX**(\-(Y*Z))\fR. -.Sp -A revealing example is the constant expression \fB2**\-2*1.\fR, -which \fBg77\fR evaluates to .25, while others might evaluate -it to 0., the difference resulting from the way precedence affects -type promotion. -.Sp -(The \fB\-fpedantic\fR option also warns about expressions -having two arithmetic operators in a row.) -.Ip "\(bu" 4 -Expressions with a unary minus followed by an operand and then -a binary operator other than plus or minus. -For example, \fB\-2**2\fR produces a warning, because -the precedence is \fB\-(2**2)\fR, yielding \-4, not -\&\fB(\-2)**2\fR, which yields 4, and which might represent -what a programmer expects. -.Sp -An example of an expression producing different results -in a surprising way is \fB\-I*S\fR, where \fII\fR holds -the value \fB\-2147483648\fR and \fIS\fR holds \fB0.5\fR. -On many systems, negating \fII\fR results in the same -value, not a positive number, because it is already the -lower bound of what an \f(CW\*(C`INTEGER(KIND=1)\*(C'\fR variable can hold. -So, the expression evaluates to a positive number, while -the ``expected'' interpretation, \fB(\-I)*S\fR, would -evaluate to a negative number. -.Sp -Even cases such as \fB\-I*J\fR produce warnings, -even though, in most configurations and situations, -there is no computational difference between the -results of the two interpretations\-\-\-the purpose -of this warning is to warn about differing interpretations -and encourage a better style of coding, not to identify -only those places where bugs might exist in the user's -code. -.Ip "\(bu" 4 -\&\f(CW\*(C`DO\*(C'\fR loops with \f(CW\*(C`DO\*(C'\fR variables that are not -of integral type\-\-\-that is, using \f(CW\*(C`REAL\*(C'\fR -variables as loop control variables. -Although such loops can be written to work in the -``obvious'' way, the way \fBg77\fR is required by the -Fortran standard to interpret such code is likely to -be quite different from the way many programmers expect. -(This is true of all \f(CW\*(C`DO\*(C'\fR loops, but the differences -are pronounced for non-integral loop control variables.) -.RE -.RS 4 -.RE -.Ip "\fB\-Werror\fR" 4 -.IX Item "-Werror" -Make all warnings into errors. -.Ip "\fB\-W\fR" 4 -.IX Item "-W" -Turns on ``extra warnings'' and, if optimization is specified -via \fB\-O\fR, the \fB\-Wuninitialized\fR option. -(This might change in future versions of \fBg77\fR -.Sp -``Extra warnings'' are issued for: -.RS 4 -.Ip "\(bu" 4 -Unused parameters to a procedure (when \fB\-Wunused\fR also is -specified). -.Ip "\(bu" 4 -Overflows involving floating-point constants (not available -for certain configurations). -.RE -.RS 4 -.RE -.PP -Some of these have no effect when compiling programs written in Fortran: -.Ip "\fB\-Wcomment\fR" 4 -.IX Item "-Wcomment" -.PD 0 -.Ip "\fB\-Wformat\fR" 4 -.IX Item "-Wformat" -.Ip "\fB\-Wparentheses\fR" 4 -.IX Item "-Wparentheses" -.Ip "\fB\-Wswitch\fR" 4 -.IX Item "-Wswitch" -.Ip "\fB\-Wtraditional\fR" 4 -.IX Item "-Wtraditional" -.Ip "\fB\-Wshadow\fR" 4 -.IX Item "-Wshadow" -.Ip "\fB\-Wid-clash-\fR\fIlen\fR" 4 -.IX Item "-Wid-clash-len" -.Ip "\fB\-Wlarger-than-\fR\fIlen\fR" 4 -.IX Item "-Wlarger-than-len" -.Ip "\fB\-Wconversion\fR" 4 -.IX Item "-Wconversion" -.Ip "\fB\-Waggregate-return\fR" 4 -.IX Item "-Waggregate-return" -.Ip "\fB\-Wredundant-decls\fR" 4 -.IX Item "-Wredundant-decls" -.PD -These options all could have some relevant meaning for -\&\s-1GNU\s0 Fortran programs, but are not yet supported. -.Sh "Options for Debugging Your Program or \s-1GNU\s0 Fortran" -.IX Subsection "Options for Debugging Your Program or GNU Fortran" -\&\s-1GNU\s0 Fortran has various special options that are used for debugging -either your program or \fBg77\fR -.Ip "\fB\-g\fR" 4 -.IX Item "-g" -Produce debugging information in the operating system's native format -(stabs, \s-1COFF\s0, \s-1XCOFF\s0, or \s-1DWARF\s0). \s-1GDB\s0 can work with this debugging -information. -.Sp -A sample debugging session looks like this (note the use of the breakpoint): -.Sp -.Vb 24 -\& $ cat gdb.f -\& PROGRAM PROG -\& DIMENSION A(10) -\& DATA A /1.,2.,3.,4.,5.,6.,7.,8.,9.,10./ -\& A(5) = 4. -\& PRINT*,A -\& END -\& $ g77 -g -O gdb.f -\& $ gdb a.out -\& ... -\& (gdb) break MAIN__ -\& Breakpoint 1 at 0x8048e96: file gdb.f, line 4. -\& (gdb) run -\& Starting program: /home/toon/g77-bugs/./a.out -\& Breakpoint 1, MAIN__ () at gdb.f:4 -\& 4 A(5) = 4. -\& Current language: auto; currently fortran -\& (gdb) print a(5) -\& $1 = 5 -\& (gdb) step -\& 5 PRINT*,A -\& (gdb) print a(5) -\& $2 = 4 -\& ... -.Ve -One could also add the setting of the breakpoint and the first run command -to the file \fI.gdbinit\fR in the current directory, to simplify the debugging -session. -.Sh "Options That Control Optimization" -.IX Subsection "Options That Control Optimization" -Most Fortran users will want to use no optimization when -developing and testing programs, and use \fB\-O\fR or \fB\-O2\fR when -compiling programs for late-cycle testing and for production use. -However, note that certain diagnostics\-\-\-such as for uninitialized -variables\-\-\-depend on the flow analysis done by \fB\-O\fR, i.e. you -must use \fB\-O\fR or \fB\-O2\fR to get such diagnostics. -.PP -The following flags have particular applicability when -compiling Fortran programs: -.Ip "\fB\-malign-double\fR" 4 -.IX Item "-malign-double" -(Intel x86 architecture only.) -.Sp -Noticeably improves performance of \fBg77\fR programs making -heavy use of \f(CW\*(C`REAL(KIND=2)\*(C'\fR (\f(CW\*(C`DOUBLE PRECISION\*(C'\fR) data -on some systems. -In particular, systems using Pentium, Pentium Pro, 586, and -686 implementations -of the i386 architecture execute programs faster when -\&\f(CW\*(C`REAL(KIND=2)\*(C'\fR (\f(CW\*(C`DOUBLE PRECISION\*(C'\fR) data are -aligned on 64\-bit boundaries -in memory. -.Sp -This option can, at least, make benchmark results more consistent -across various system configurations, versions of the program, -and data sets. -.Sp -\&\fINote:\fR The warning in the \fBgcc\fR documentation about -this option does not apply, generally speaking, to Fortran -code compiled by \fBg77\fR -.Sp -\&\fIAlso also note:\fR The negative form of \fB\-malign-double\fR -is \fB\-mno-align-double\fR, not \fB\-benign-double\fR. -.Ip "\fB\-ffloat-store\fR" 4 -.IX Item "-ffloat-store" -Might help a Fortran program that depends on exact \s-1IEEE\s0 conformance on -some machines, but might slow down a program that doesn't. -.Sp -This option is effective when the floating-point unit is set to work in -\&\s-1IEEE\s0 854 `extended precision'\-\-\-as it typically is on x86 and m68k \s-1GNU\s0 -systems\-\-\-rather than \s-1IEEE\s0 754 double precision. \fB\-ffloat-store\fR -tries to remove the extra precision by spilling data from floating-point -registers into memory and this typically involves a big performance -hit. However, it doesn't affect intermediate results, so that it is -only partially effective. `Excess precision' is avoided in code like: -.Sp -.Vb 2 -\& a = b + c -\& d = a * e -.Ve -but not in code like: -.Sp -.Vb 1 -\& d = (b + c) * e -.Ve -For another, potentially better, way of controlling the precision, -see \f(CW@ref\fR{Floating-point precision}. -.Ip "\fB\-fforce-mem\fR" 4 -.IX Item "-fforce-mem" -.PD 0 -.Ip "\fB\-fforce-addr\fR" 4 -.IX Item "-fforce-addr" -.PD -Might improve optimization of loops. -.Ip "\fB\-fno-inline\fR" 4 -.IX Item "-fno-inline" -Don't compile statement functions inline. -Might reduce the size of a program unit\-\-\-which might be at -expense of some speed (though it should compile faster). -Note that if you are not optimizing, no functions can be expanded inline. -.Ip "\fB\-ffast-math\fR" 4 -.IX Item "-ffast-math" -Might allow some programs designed to not be too dependent -on \s-1IEEE\s0 behavior for floating-point to run faster, or die trying. -Sets \fB\-funsafe-math-optimizations\fR, and -\&\fB\-fno-trapping-math\fR. -.Ip "\fB\-funsafe-math-optimizations\fR" 4 -.IX Item "-funsafe-math-optimizations" -Allow optimizations that may be give incorrect results -for certain \s-1IEEE\s0 inputs. -.Ip "\fB\-fno-trapping-math\fR" 4 -.IX Item "-fno-trapping-math" -Allow the compiler to assume that floating-point arithmetic -will not generate traps on any inputs. This is useful, for -example, when running a program using \s-1IEEE\s0 \*(L"non-stop\*(R" -floating-point arithmetic. -.Ip "\fB\-fstrength-reduce\fR" 4 -.IX Item "-fstrength-reduce" -Might make some loops run faster. -.Ip "\fB\-frerun-cse-after-loop\fR" 4 -.IX Item "-frerun-cse-after-loop" -.PD 0 -.Ip "\fB\-fexpensive-optimizations\fR" 4 -.IX Item "-fexpensive-optimizations" -.Ip "\fB\-fdelayed-branch\fR" 4 -.IX Item "-fdelayed-branch" -.Ip "\fB\-fschedule-insns\fR" 4 -.IX Item "-fschedule-insns" -.Ip "\fB\-fschedule-insns2\fR" 4 -.IX Item "-fschedule-insns2" -.Ip "\fB\-fcaller-saves\fR" 4 -.IX Item "-fcaller-saves" -.PD -Might improve performance on some code. -.Ip "\fB\-funroll-loops\fR" 4 -.IX Item "-funroll-loops" -Typically improves performance on code using iterative \f(CW\*(C`DO\*(C'\fR loops by -unrolling them and is probably generally appropriate for Fortran, though -it is not turned on at any optimization level. -Note that outer loop unrolling isn't done specifically; decisions about -whether to unroll a loop are made on the basis of its instruction count. -.Sp -Also, no `loop discovery'[1] is done, so only loops written with \f(CW\*(C`DO\*(C'\fR -benefit from loop optimizations, including\-\-\-but not limited -to\-\-\-unrolling. Loops written with \f(CW\*(C`IF\*(C'\fR and \f(CW\*(C`GOTO\*(C'\fR are not -currently recognized as such. This option unrolls only iterative -\&\f(CW\*(C`DO\*(C'\fR loops, not \f(CW\*(C`DO WHILE\*(C'\fR loops. -.Ip "\fB\-funroll-all-loops\fR" 4 -.IX Item "-funroll-all-loops" -Probably improves performance on code using \f(CW\*(C`DO WHILE\*(C'\fR loops by -unrolling them in addition to iterative \f(CW\*(C`DO\*(C'\fR loops. In the absence -of \f(CW\*(C`DO WHILE\*(C'\fR, this option is equivalent to \fB\-funroll-loops\fR -but possibly slower. -.Ip "\fB\-fno-move-all-movables\fR" 4 -.IX Item "-fno-move-all-movables" -.PD 0 -.Ip "\fB\-fno-reduce-all-givs\fR" 4 -.IX Item "-fno-reduce-all-givs" -.Ip "\fB\-fno-rerun-loop-opt\fR" 4 -.IX Item "-fno-rerun-loop-opt" -.PD -In general, the optimizations enabled with these options will lead to -faster code being generated by \s-1GNU\s0 Fortran; hence they are enabled by default -when issuing the \fBg77\fR command. -.Sp -\&\fB\-fmove-all-movables\fR and \fB\-freduce-all-givs\fR will enable -loop optimization to move all loop-invariant index computations in nested -loops over multi-rank array dummy arguments out of these loops. -.Sp -\&\fB\-frerun-loop-opt\fR will move offset calculations resulting -from the fact that Fortran arrays by default have a lower bound of 1 -out of the loops. -.Sp -These three options are intended to be removed someday, once -loop optimization is sufficiently advanced to perform all those -transformations without help from these options. -.Sh "Options Controlling the Preprocessor" -.IX Subsection "Options Controlling the Preprocessor" -These options control the C preprocessor, which is run on each C source -file before actual compilation. -.PP -Some of these options also affect how \fBg77\fR processes the -\&\f(CW\*(C`INCLUDE\*(C'\fR directive. -Since this directive is processed even when preprocessing -is not requested, it is not described in this section. -.PP -However, the \f(CW\*(C`INCLUDE\*(C'\fR directive does not apply -preprocessing to the contents of the included file itself. -.PP -Therefore, any file that contains preprocessor directives -(such as \f(CW\*(C`#include\*(C'\fR, \f(CW\*(C`#define\*(C'\fR, and \f(CW\*(C`#if\*(C'\fR) -must be included via the \f(CW\*(C`#include\*(C'\fR directive, not -via the \f(CW\*(C`INCLUDE\*(C'\fR directive. -Therefore, any file containing preprocessor directives, -if included, is necessarily included by a file that itself -contains preprocessor directives. -.Sh "Options for Directory Search" -.IX Subsection "Options for Directory Search" -These options affect how the \fBcpp\fR preprocessor searches -for files specified via the \f(CW\*(C`#include\*(C'\fR directive. -Therefore, when compiling Fortran programs, they are meaningful -when the preprocessor is used. -.PP -Some of these options also affect how \fBg77\fR searches -for files specified via the \f(CW\*(C`INCLUDE\*(C'\fR directive, -although files included by that directive are not, -themselves, preprocessed. -These options are: -.Ip "\fB\-I-\fR" 4 -.IX Item "-I-" -.PD 0 -.Ip "\fB\-I\fR\fIdir\fR" 4 -.IX Item "-Idir" -.PD -These affect interpretation of the \f(CW\*(C`INCLUDE\*(C'\fR directive -(as well as of the \f(CW\*(C`#include\*(C'\fR directive of the \fBcpp\fR -preprocessor). -.Sp -Note that \fB\-I\fR\fIdir\fR must be specified \fIwithout\fR any -spaces between \fB\-I\fR and the directory name\-\-\-that is, -\&\fB\-Ifoo/bar\fR is valid, but \fB\-I foo/bar\fR -is rejected by the \fBg77\fR compiler (though the preprocessor supports -the latter form). -Also note that the general behavior of \fB\-I\fR and -\&\f(CW\*(C`INCLUDE\*(C'\fR is pretty much the same as of \fB\-I\fR with -\&\f(CW\*(C`#include\*(C'\fR in the \fBcpp\fR preprocessor, with regard to -looking for \fIheader.gcc\fR files and other such things. -.Sh "Options for Code Generation Conventions" -.IX Subsection "Options for Code Generation Conventions" -These machine-independent options control the interface conventions -used in code generation. -.PP -Most of them have both positive and negative forms; the negative form -of \fB\-ffoo\fR would be \fB\-fno-foo\fR. In the table below, only -one of the forms is listed\-\-\-the one which is not the default. You -can figure out the other form by either removing \fBno-\fR or adding -it. -.Ip "\fB\-fno-automatic\fR" 4 -.IX Item "-fno-automatic" -Treat each program unit as if the \f(CW\*(C`SAVE\*(C'\fR statement was specified -for every local variable and array referenced in it. -Does not affect common blocks. -(Some Fortran compilers provide this option under -the name \fB\-static\fR.) -.Ip "\fB\-finit-local-zero\fR" 4 -.IX Item "-finit-local-zero" -Specify that variables and arrays that are local to a program unit -(not in a common block and not passed as an argument) are to be initialized -to binary zeros. -.Sp -Since there is a run-time penalty for initialization of variables -that are not given the \f(CW\*(C`SAVE\*(C'\fR attribute, it might be a -good idea to also use \fB\-fno-automatic\fR with \fB\-finit-local-zero\fR. -.Ip "\fB\-fno-f2c\fR" 4 -.IX Item "-fno-f2c" -Do not generate code designed to be compatible with code generated -by \fBf2c\fR use the \s-1GNU\s0 calling conventions instead. -.Sp -The \fBf2c\fR calling conventions require functions that return -type \f(CW\*(C`REAL(KIND=1)\*(C'\fR to actually return the C type \f(CW\*(C`double\*(C'\fR, -and functions that return type \f(CW\*(C`COMPLEX\*(C'\fR to return the -values via an extra argument in the calling sequence that points -to where to store the return value. -Under the \s-1GNU\s0 calling conventions, such functions simply return -their results as they would in \s-1GNU\s0 C\-\--\f(CW\*(C`REAL(KIND=1)\*(C'\fR functions -return the C type \f(CW\*(C`float\*(C'\fR, and \f(CW\*(C`COMPLEX\*(C'\fR functions -return the \s-1GNU\s0 C type \f(CW\*(C`complex\*(C'\fR (or its \f(CW\*(C`struct\*(C'\fR -equivalent). -.Sp -This does not affect the generation of code that interfaces with the -\&\f(CW\*(C`libg2c\*(C'\fR library. -.Sp -However, because the \f(CW\*(C`libg2c\*(C'\fR library uses \fBf2c\fR -calling conventions, \fBg77\fR rejects attempts to pass -intrinsics implemented by routines in this library as actual -arguments when \fB\-fno-f2c\fR is used, to avoid bugs when -they are actually called by code expecting the \s-1GNU\s0 calling -conventions to work. -.Sp -For example, \fB\s-1INTRINSIC\s0 \s-1ABS\s0;CALL FOO(\s-1ABS\s0)\fR is -rejected when \fB\-fno-f2c\fR is in force. -(Future versions of the \fBg77\fR run-time library might -offer routines that provide GNU-callable versions of the -routines that implement the \fBf2c\fR intrinsics -that may be passed as actual arguments, so that -valid programs need not be rejected when \fB\-fno-f2c\fR -is used.) -.Sp -\&\fBCaution:\fR If \fB\-fno-f2c\fR is used when compiling any -source file used in a program, it must be used when compiling -\&\fIall\fR Fortran source files used in that program. -.Ip "\fB\-ff2c-library\fR" 4 -.IX Item "-ff2c-library" -Specify that use of \f(CW\*(C`libg2c\*(C'\fR (or the original \f(CW\*(C`libf2c\*(C'\fR) -is required. -This is the default for the current version of \fBg77\fR -.Sp -Currently it is not -valid to specify \fB\-fno-f2c-library\fR. -This option is provided so users can specify it in shell -scripts that build programs and libraries that require the -\&\f(CW\*(C`libf2c\*(C'\fR library, even when being compiled by future -versions of \fBg77\fR that might otherwise default to -generating code for an incompatible library. -.Ip "\fB\-fno-underscoring\fR" 4 -.IX Item "-fno-underscoring" -Do not transform names of entities specified in the Fortran -source file by appending underscores to them. -.Sp -With \fB\-funderscoring\fR in effect, \fBg77\fR appends two underscores -to names with underscores and one underscore to external names with -no underscores. (\fBg77\fR also appends two underscores to internal -names with underscores to avoid naming collisions with external names. -The \fB\-fno-second-underscore\fR option disables appending of the -second underscore in all cases.) -.Sp -This is done to ensure compatibility with code produced by many -\&\s-1UNIX\s0 Fortran compilers, including \fBf2c\fR which perform the -same transformations. -.Sp -Use of \fB\-fno-underscoring\fR is not recommended unless you are -experimenting with issues such as integration of (\s-1GNU\s0) Fortran into -existing system environments (vis-a-vis existing libraries, tools, and -so on). -.Sp -For example, with \fB\-funderscoring\fR, and assuming other defaults like -\&\fB\-fcase-lower\fR and that \fB\f(BIj()\fB\fR and \fB\f(BImax_count()\fB\fR are -external functions while \fBmy_var\fR and \fBlvar\fR are local variables, -a statement like -.Sp -.Vb 1 -\& I = J() + MAX_COUNT (MY_VAR, LVAR) -.Ve -is implemented as something akin to: -.Sp -.Vb 1 -\& i = j_() + max_count__(&my_var__, &lvar); -.Ve -With \fB\-fno-underscoring\fR, the same statement is implemented as: -.Sp -.Vb 1 -\& i = j() + max_count(&my_var, &lvar); -.Ve -Use of \fB\-fno-underscoring\fR allows direct specification of -user-defined names while debugging and when interfacing \fBg77\fR -code with other languages. -.Sp -Note that just because the names match does \fInot\fR mean that the -interface implemented by \fBg77\fR for an external name matches the -interface implemented by some other language for that same name. -That is, getting code produced by \fBg77\fR to link to code produced -by some other compiler using this or any other method can be only a -small part of the overall solution\-\-\-getting the code generated by -both compilers to agree on issues other than naming can require -significant effort, and, unlike naming disagreements, linkers normally -cannot detect disagreements in these other areas. -.Sp -Also, note that with \fB\-fno-underscoring\fR, the lack of appended -underscores introduces the very real possibility that a user-defined -external name will conflict with a name in a system library, which -could make finding unresolved-reference bugs quite difficult in some -cases\-\-\-they might occur at program run time, and show up only as -buggy behavior at run time. -.Sp -In future versions of \fBg77\fR we hope to improve naming and linking -issues so that debugging always involves using the names as they appear -in the source, even if the names as seen by the linker are mangled to -prevent accidental linking between procedures with incompatible -interfaces. -.Ip "\fB\-fno-second-underscore\fR" 4 -.IX Item "-fno-second-underscore" -Do not append a second underscore to names of entities specified -in the Fortran source file. -.Sp -This option has no effect if \fB\-fno-underscoring\fR is -in effect. -.Sp -Otherwise, with this option, an external name such as \fB\s-1MAX_COUNT\s0\fR -is implemented as a reference to the link-time external symbol -\&\fBmax_count_\fR, instead of \fBmax_count_\|_\fR. -.Ip "\fB\-fno-ident\fR" 4 -.IX Item "-fno-ident" -Ignore the \fB#ident\fR directive. -.Ip "\fB\-fzeros\fR" 4 -.IX Item "-fzeros" -Treat initial values of zero as if they were any other value. -.Sp -As of version 0.5.18, \fBg77\fR normally treats \f(CW\*(C`DATA\*(C'\fR and -other statements that are used to specify initial values of zero -for variables and arrays as if no values were actually specified, -in the sense that no diagnostics regarding multiple initializations -are produced. -.Sp -This is done to speed up compiling of programs that initialize -large arrays to zeros. -.Sp -Use \fB\-fzeros\fR to revert to the simpler, slower behavior -that can catch multiple initializations by keeping track of -all initializations, zero or otherwise. -.Sp -\&\fICaution:\fR Future versions of \fBg77\fR might disregard this option -(and its negative form, the default) or interpret it somewhat -differently. -The interpretation changes will affect only non-standard -programs; standard-conforming programs should not be affected. -.Ip "\fB\-femulate-complex\fR" 4 -.IX Item "-femulate-complex" -Implement \f(CW\*(C`COMPLEX\*(C'\fR arithmetic via emulation, -instead of using the facilities of -the \fBgcc\fR back end that provide direct support of -\&\f(CW\*(C`complex\*(C'\fR arithmetic. -.Sp -(\fBgcc\fR had some bugs in its back-end support -for \f(CW\*(C`complex\*(C'\fR arithmetic, due primarily to the support not being -completed as of version 2.8.1 and \f(CW\*(C`egcs\*(C'\fR 1.1.2.) -.Sp -Use \fB\-femulate-complex\fR if you suspect code-generation bugs, -or experience compiler crashes, -that might result from \fBg77\fR using the \f(CW\*(C`COMPLEX\*(C'\fR support -in the \fBgcc\fR back end. -If using that option fixes the bugs or crashes you are seeing, -that indicates a likely \fBg77\fR bugs -(though, all compiler crashes are considered bugs), -so, please report it. -(Note that the known bugs, now believed fixed, produced compiler crashes -rather than causing the generation of incorrect code.) -.Sp -Use of this option should not affect how Fortran code compiled -by \fBg77\fR works in terms of its interfaces to other code, -e.g. that compiled by \fBf2c\fR -.Sp -As of \s-1GCC\s0 version 3.0, this option is not necessary anymore. -.Sp -\&\fICaution:\fR Future versions of \fBg77\fR might ignore both forms -of this option. -.Ip "\fB\-falias-check\fR" 4 -.IX Item "-falias-check" -.PD 0 -.Ip "\fB\-fargument-alias\fR" 4 -.IX Item "-fargument-alias" -.Ip "\fB\-fargument-noalias\fR" 4 -.IX Item "-fargument-noalias" -.Ip "\fB\-fno-argument-noalias-global\fR" 4 -.IX Item "-fno-argument-noalias-global" -.PD -\&\fIVersion info:\fR -These options are not supported by -versions of \fBg77\fR based on \fBgcc\fR version 2.8. -.Sp -These options specify to what degree aliasing -(overlap) -is permitted between -arguments (passed as pointers) and \f(CW\*(C`COMMON\*(C'\fR (external, or -public) storage. -.Sp -The default for Fortran code, as mandated by the \s-1FORTRAN\s0 77 and -Fortran 90 standards, is \fB\-fargument-noalias-global\fR. -The default for code written in the C language family is -\&\fB\-fargument-alias\fR. -.Sp -Note that, on some systems, compiling with \fB\-fforce-addr\fR in -effect can produce more optimal code when the default aliasing -options are in effect (and when optimization is enabled). -.Ip "\fB\-fno-globals\fR" 4 -.IX Item "-fno-globals" -Disable diagnostics about inter-procedural -analysis problems, such as disagreements about the -type of a function or a procedure's argument, -that might cause a compiler crash when attempting -to inline a reference to a procedure within a -program unit. -(The diagnostics themselves are still produced, but -as warnings, unless \fB\-Wno-globals\fR is specified, -in which case no relevant diagnostics are produced.) -.Sp -Further, this option disables such inlining, to -avoid compiler crashes resulting from incorrect -code that would otherwise be diagnosed. -.Sp -As such, this option might be quite useful when -compiling existing, ``working'' code that happens -to have a few bugs that do not generally show themselves, -but which \fBg77\fR diagnoses. -.Sp -Use of this option therefore has the effect of -instructing \fBg77\fR to behave more like it did -up through version 0.5.19.1, when it paid little or -no attention to disagreements between program units -about a procedure's type and argument information, -and when it performed no inlining of procedures -(except statement functions). -.Sp -Without this option, \fBg77\fR defaults to performing -the potentially inlining procedures as it started doing -in version 0.5.20, but as of version 0.5.21, it also -diagnoses disagreements that might cause such inlining -to crash the compiler as (fatal) errors, -and warns about similar disagreements -that are currently believed to not -likely to result in the compiler later crashing -or producing incorrect code. -.Ip "\fB\-fflatten-arrays\fR" 4 -.IX Item "-fflatten-arrays" -Use back end's C-like constructs -(pointer plus offset) -instead of its \f(CW\*(C`ARRAY_REF\*(C'\fR construct -to handle all array references. -.Sp -\&\fINote:\fR This option is not supported. -It is intended for use only by \fBg77\fR developers, -to evaluate code-generation issues. -It might be removed at any time. -.Ip "\fB\-fbounds-check\fR" 4 -.IX Item "-fbounds-check" -.PD 0 -.Ip "\fB\-ffortran-bounds-check\fR" 4 -.IX Item "-ffortran-bounds-check" -.PD -Enable generation of run-time checks for array subscripts -and substring start and end points -against the (locally) declared minimum and maximum values. -.Sp -The current implementation uses the \f(CW\*(C`libf2c\*(C'\fR -library routine \f(CW\*(C`s_rnge\*(C'\fR to print the diagnostic. -.Sp -However, whereas \fBf2c\fR generates a single check per -reference for a multi-dimensional array, of the computed -offset against the valid offset range (0 through the size of the array), -\&\fBg77\fR generates a single check per \fIsubscript\fR expression. -This catches some cases of potential bugs that \fBf2c\fR does not, -such as references to below the beginning of an assumed-size array. -.Sp -\&\fBg77\fR also generates checks for \f(CW\*(C`CHARACTER\*(C'\fR substring references, -something \fBf2c\fR currently does not do. -.Sp -Use the new \fB\-ffortran-bounds-check\fR option -to specify bounds-checking for only the Fortran code you are compiling, -not necessarily for code written in other languages. -.Sp -\&\fINote:\fR To provide more detailed information on the offending subscript, -\&\fBg77\fR provides the \f(CW\*(C`libg2c\*(C'\fR run-time library routine \f(CW\*(C`s_rnge\*(C'\fR -with somewhat differently-formatted information. -Here's a sample diagnostic: -.Sp -.Vb 3 -\& Subscript out of range on file line 4, procedure rnge.f/bf. -\& Attempt to access the -6-th element of variable b[subscript-2-of-2]. -\& Aborted -.Ve -The above message indicates that the offending source line is -line 4 of the file \fIrnge.f\fR, -within the program unit (or statement function) named \fBbf\fR. -The offended array is named \fBb\fR. -The offended array dimension is the second for a two-dimensional array, -and the offending, computed subscript expression was \fB\-6\fR. -.Sp -For a \f(CW\*(C`CHARACTER\*(C'\fR substring reference, the second line has -this appearance: -.Sp -.Vb 1 -\& Attempt to access the 11-th element of variable a[start-substring]. -.Ve -This indicates that the offended \f(CW\*(C`CHARACTER\*(C'\fR variable or array -is named \fBa\fR, -the offended substring position is the starting (leftmost) position, -and the offending substring expression is \fB11\fR. -.Sp -(Though the verbage of \f(CW\*(C`s_rnge\*(C'\fR is not ideal -for the purpose of the \fBg77\fR compiler, -the above information should provide adequate diagnostic abilities -to it users.) -.PP -Some of these do \fInot\fR work when compiling programs written in Fortran: -.Ip "\fB\-fpcc-struct-return\fR" 4 -.IX Item "-fpcc-struct-return" -.PD 0 -.Ip "\fB\-freg-struct-return\fR" 4 -.IX Item "-freg-struct-return" -.PD -You should not use these except strictly the same way as you -used them to build the version of \f(CW\*(C`libg2c\*(C'\fR with which -you will be linking all code compiled by \fBg77\fR with the -same option. -.Ip "\fB\-fshort-double\fR" 4 -.IX Item "-fshort-double" -This probably either has no effect on Fortran programs, or -makes them act loopy. -.Ip "\fB\-fno-common\fR" 4 -.IX Item "-fno-common" -Do not use this when compiling Fortran programs, -or there will be Trouble. -.Ip "\fB\-fpack-struct\fR" 4 -.IX Item "-fpack-struct" -This probably will break any calls to the \f(CW\*(C`libg2c\*(C'\fR library, -at the very least, even if it is built with the same option. -.SH "ENVIRONMENT" -.IX Header "ENVIRONMENT" -\&\s-1GNU\s0 Fortran currently does not make use of any environment -variables to control its operation above and beyond those -that affect the operation of \fBgcc\fR. -.SH "BUGS" -.IX Header "BUGS" -For instructions on reporting bugs, see -<\fBhttp://gcc.gnu.org/bugs.html\fR>. Use of the \fBgccbug\fR -script to report bugs is recommended. -.SH "FOOTNOTES" -.IX Header "FOOTNOTES" -.Ip "1." 4 -\&\fIloop discovery\fR refers to the -process by which a compiler, or indeed any reader of a program, -determines which portions of the program are more likely to be executed -repeatedly as it is being run. Such discovery typically is done early -when compiling using optimization techniques, so the ``discovered'' -loops get more attention\-\-\-and more run-time resources, such as -registers\-\-\-from the compiler. It is easy to ``discover'' loops that are -constructed out of looping constructs in the language -(such as Fortran's \f(CW\*(C`DO\*(C'\fR). For some programs, ``discovering'' loops -constructed out of lower-level constructs (such as \f(CW\*(C`IF\*(C'\fR and -\&\f(CW\*(C`GOTO\*(C'\fR) can lead to generation of more optimal code -than otherwise. -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf-funding\fR\|(7), -\&\fIcpp\fR\|(1), \fIgcov\fR\|(1), \fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), \fIgdb\fR\|(1), \fIadb\fR\|(1), \fIdbx\fR\|(1), \fIsdb\fR\|(1) -and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIg77\fR, \fIas\fR, -\&\fIld\fR, \fIbinutils\fR and \fIgdb\fR. -.SH "AUTHOR" -.IX Header "AUTHOR" -See the Info entry for \fBg77\fR for contributors to \s-1GCC\s0 and G77. -.SH "COPYRIGHT" -.IX Header "COPYRIGHT" -Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. -.PP -Permission is granted to copy, distribute and/or modify this document -under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or -any later version published by the Free Software Foundation; with the -Invariant Sections being ``\s-1GNU\s0 General Public License'' and ``Funding -Free Software'', the Front-Cover texts being (a) (see below), and with -the Back-Cover Texts being (b) (see below). A copy of the license is -included in the \fIgfdl\fR\|(7) man page. -.PP -(a) The \s-1FSF\s0's Front-Cover Text is: -.PP -.Vb 1 -\& A GNU Manual -.Ve -(b) The \s-1FSF\s0's Back-Cover Text is: -.PP -.Vb 3 -\& You have freedom to copy and modify this GNU Manual, like GNU -\& software. Copies published by the Free Software Foundation raise -\& funds for GNU development. -.Ve diff --git a/contrib/gcc/f/g77.texi b/contrib/gcc/f/g77.texi deleted file mode 100644 index 2317231..0000000 --- a/contrib/gcc/f/g77.texi +++ /dev/null @@ -1,11849 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@c %**start of header -@setfilename g77.info - -@set last-update 2004-03-21 -@set copyrights-g77 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - -@include root.texi - -@c This tells @include'd files that they're part of the overall G77 doc -@c set. (They might be part of a higher-level doc set too.) -@set DOC-G77 - -@c @setfilename useg77.info -@c @setfilename portg77.info -@c To produce the full manual, use the "g77.info" setfilename, and -@c make sure the following do NOT begin with '@c' (and the @clear lines DO) -@set INTERNALS -@set USING -@c To produce a user-only manual, use the "useg77.info" setfilename, and -@c make sure the following does NOT begin with '@c': -@c @clear INTERNALS -@c To produce a porter-only manual, use the "portg77.info" setfilename, -@c and make sure the following does NOT begin with '@c': -@c @clear USING - -@ifset INTERNALS -@ifset USING -@settitle Using and Porting GNU Fortran -@end ifset -@end ifset -@c seems reasonable to assume at least one of INTERNALS or USING is set... -@ifclear INTERNALS -@settitle Using GNU Fortran -@end ifclear -@ifclear USING -@settitle Porting GNU Fortran -@end ifclear -@c then again, have some fun -@ifclear INTERNALS -@ifclear USING -@settitle Doing Squat with GNU Fortran -@end ifclear -@end ifclear - -@syncodeindex fn cp -@syncodeindex vr cp -@c %**end of header - -@c Cause even numbered pages to be printed on the left hand side of -@c the page and odd numbered pages to be printed on the right hand -@c side of the page. Using this, you can print on both sides of a -@c sheet of paper and have the text on the same part of the sheet. - -@c The text on right hand pages is pushed towards the right hand -@c margin and the text on left hand pages is pushed toward the left -@c hand margin. -@c (To provide the reverse effect, set bindingoffset to -0.75in.) - -@c @tex -@c \global\bindingoffset=0.75in -@c \global\normaloffset =0.75in -@c @end tex - -@copying -Copyright @copyright{} @value{copyrights-g77} Free Software Foundation, Inc. - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with the -Invariant Sections being ``GNU General Public License'' and ``Funding -Free Software'', the Front-Cover -texts being (a) (see below), and with the Back-Cover Texts being (b) -(see below). A copy of the license is included in the section entitled -``GNU Free Documentation License''. - -(a) The FSF's Front-Cover Text is: - - A GNU Manual - -(b) The FSF's Back-Cover Text is: - - You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development. -@end copying - -@ifinfo -@dircategory Programming -@direntry -* g77: (g77). The GNU Fortran compiler. -@end direntry -@ifset INTERNALS -@ifset USING -This file documents the use and the internals of the GNU Fortran (@command{g77}) -compiler. -It corresponds to the @value{which-g77} version of @command{g77}. -@end ifset -@end ifset -@ifclear USING -This file documents the internals of the GNU Fortran (@command{g77}) compiler. -It corresponds to the @value{which-g77} version of @command{g77}. -@end ifclear -@ifclear INTERNALS -This file documents the use of the GNU Fortran (@command{g77}) compiler. -It corresponds to the @value{which-g77} version of @command{g77}. -@end ifclear - -Published by the Free Software Foundation -59 Temple Place - Suite 330 -Boston, MA 02111-1307 USA - -@insertcopying -@end ifinfo - -Contributed by James Craig Burley (@email{@value{email-burley}}). -Inspired by a first pass at translating @file{g77-0.5.16/f/DOC} that -was contributed to Craig by David Ronis (@email{ronis@@onsager.chem.mcgill.ca}). - -@setchapternewpage odd -@titlepage -@ifset INTERNALS -@ifset USING -@center @titlefont{Using and Porting GNU Fortran} - -@end ifset -@end ifset -@ifclear INTERNALS -@title Using GNU Fortran -@end ifclear -@ifclear USING -@title Porting GNU Fortran -@end ifclear -@sp 2 -@center James Craig Burley -@sp 3 -@center Last updated @value{last-update} -@sp 1 -@center for version @value{which-g77} -@page -@vskip 0pt plus 1filll -For the @value{which-g77} Version* -@sp 1 -Published by the Free Software Foundation @* -59 Temple Place - Suite 330@* -Boston, MA 02111-1307, USA@* -@c Last printed ??ber, 19??.@* -@c Printed copies are available for $? each.@* -@c ISBN ??? -@sp 1 -@insertcopying -@end titlepage -@summarycontents -@contents -@page - -@node Top, Copying,, (DIR) -@top Introduction -@cindex Introduction - -@ifset INTERNALS -@ifset USING -This manual documents how to run, install and port @command{g77}, -as well as its new features and incompatibilities, -and how to report bugs. -It corresponds to the @value{which-g77} version of @command{g77}. -@end ifset -@end ifset - -@ifclear INTERNALS -This manual documents how to run and install @command{g77}, -as well as its new features and incompatibilities, and how to report -bugs. -It corresponds to the @value{which-g77} version of @command{g77}. -@end ifclear -@ifclear USING -This manual documents how to port @command{g77}, -as well as its new features and incompatibilities, -and how to report bugs. -It corresponds to the @value{which-g77} version of @command{g77}. -@end ifclear - -@ifset DEVELOPMENT -@emph{Warning:} This document is still under development, -and might not accurately reflect the @command{g77} code base -of which it is a part. -Efforts are made to keep it somewhat up-to-date, -but they are particularly concentrated -on any version of this information -that is distributed as part of a @emph{released} @command{g77}. - -In particular, while this document is intended to apply to -the @value{which-g77} version of @command{g77}, -only an official @emph{release} of that version -is expected to contain documentation that is -most consistent with the @command{g77} product in that version. -@end ifset - -@menu -* Copying:: GNU General Public License says - how you can copy and share GNU Fortran. -* GNU Free Documentation License:: - How you can copy and share this manual. -* Contributors:: People who have contributed to GNU Fortran. -* Funding:: How to help assure continued work for free software. -* Funding GNU Fortran:: How to help assure continued work on GNU Fortran. -@ifset USING -* Getting Started:: Finding your way around this manual. -* What is GNU Fortran?:: How @command{g77} fits into the universe. -* G77 and GCC:: You can compile Fortran, C, or other programs. -* Invoking G77:: Command options supported by @command{g77}. -* News:: News about recent releases of @command{g77}. -* Changes:: User-visible changes to recent releases of @command{g77}. -* Language:: The GNU Fortran language. -* Compiler:: The GNU Fortran compiler. -* Other Dialects:: Dialects of Fortran supported by @command{g77}. -* Other Compilers:: Fortran compilers other than @command{g77}. -* Other Languages:: Languages other than Fortran. -* Debugging and Interfacing:: How @command{g77} generates code. -* Collected Fortran Wisdom:: How to avoid Trouble. -* Trouble:: If you have trouble with GNU Fortran. -* Open Questions:: Things we'd like to know. -* Bugs:: How, why, and where to report bugs. -* Service:: How to find suppliers of support for GNU Fortran. -@end ifset -@ifset INTERNALS -* Adding Options:: Guidance on teaching @command{g77} about new options. -* Projects:: Projects for @command{g77} internals hackers. -* Front End:: Design and implementation of the @command{g77} front end. -@end ifset - -* M: Diagnostics. Diagnostics produced by @command{g77}. - -* Keyword Index:: Index of concepts and symbol names. -@end menu -@c yes, the "M: " @emph{is} intentional -- bad.def references it (CMPAMBIG)! - -@include gpl.texi - -@include fdl.texi - -@node Contributors -@unnumbered Contributors to GNU Fortran -@cindex contributors -@cindex credits - -In addition to James Craig Burley, who wrote the front end, -many people have helped create and improve GNU Fortran. - -@itemize @bullet -@item -The packaging and compiler portions of GNU Fortran are based largely -on the GCC compiler. -@xref{Contributors,,Contributors to GCC,gcc,Using the GNU Compiler -Collection (GCC)}, -for more information. - -@item -The run-time library used by GNU Fortran is a repackaged version -of the @code{libf2c} library (combined from the @code{libF77} and -@code{libI77} libraries) provided as part of @command{f2c}, available for -free from @code{netlib} sites on the Internet. - -@item -Cygnus Support and The Free Software Foundation contributed -significant money and/or equipment to Craig's efforts. - -@item -The following individuals served as alpha testers prior to @command{g77}'s -public release. This work consisted of testing, researching, sometimes -debugging, and occasionally providing small amounts of code and fixes -for @command{g77}, plus offering plenty of helpful advice to Craig: - -@itemize @w{} -@item -Jonathan Corbet -@item -Dr.@: Mark Fernyhough -@item -Takafumi Hayashi (The University of Aizu)---@email{takafumi@@u-aizu.ac.jp} -@item -Kate Hedstrom -@item -Michel Kern (INRIA and Rice University)---@email{Michel.Kern@@inria.fr} -@item -Dr.@: A. O. V. Le Blanc -@item -Dave Love -@item -Rick Lutowski -@item -Toon Moene -@item -Rick Niles -@item -Derk Reefman -@item -Wayne K. Schroll -@item -Bill Thorson -@item -Pedro A. M. Vazquez -@item -Ian Watson -@end itemize - -@item -Dave Love (@email{d.love@@dl.ac.uk}) -wrote the libU77 part of the run-time library. - -@item -Scott Snyder (@email{snyder@@d0sgif.fnal.gov}) -provided the patch to add rudimentary support -for @code{INTEGER*1}, @code{INTEGER*2}, and -@code{LOGICAL*1}. -This inspired Craig to add further support, -even though the resulting support -would still be incomplete. -This support is believed to be completed at version 3.4 -of @command{gcc} by Roger Sayle (@email{roger@@eyesopen.com}). - -@item -David Ronis (@email{ronis@@onsager.chem.mcgill.ca}) inspired -and encouraged Craig to rewrite the documentation in texinfo -format by contributing a first pass at a translation of the -old @file{g77-0.5.16/f/DOC} file. - -@item -Toon Moene (@email{toon@@moene.indiv.nluug.nl}) performed -some analysis of generated code as part of an overall project -to improve @command{g77} code generation to at least be as good -as @command{f2c} used in conjunction with @command{gcc}. -So far, this has resulted in the three, somewhat -experimental, options added by @command{g77} to the @command{gcc} -compiler and its back end. - -(These, in turn, had made their way into the @code{egcs} -version of the compiler, and do not exist in @command{gcc} -version 2.8 or versions of @command{g77} based on that version -of @command{gcc}.) - -@item -John Carr (@email{jfc@@mit.edu}) wrote the alias analysis improvements. - -@item -Thanks to Mary Cortani and the staff at Craftwork Solutions -(@email{support@@craftwork.com}) for all of their support. - -@item -Many other individuals have helped debug, test, and improve @command{g77} -over the past several years, and undoubtedly more people -will be doing so in the future. -If you have done so, and would like -to see your name listed in the above list, please ask! -The default is that people wish to remain anonymous. -@end itemize - -@include funding.texi - -@node Funding GNU Fortran -@chapter Funding GNU Fortran -@cindex funding improvements -@cindex improvements, funding - -James Craig Burley (@email{@value{email-burley}}), the original author -of @command{g77}, stopped working on it in September 1999 -(He has a web page at @uref{@value{www-burley}}.) - -GNU Fortran is currently maintained by Toon Moene -(@email{toon@@moene.indiv.nluug.nl}), with the help of countless other -volunteers. - -As with other GNU software, funding is important because it can pay for -needed equipment, personnel, and so on. - -@cindex FSF, funding the -@cindex funding the FSF -The FSF provides information on the best way to fund ongoing -development of GNU software (such as GNU Fortran) in documents -such as the ``GNUS Bulletin''. -Email @email{gnu@@gnu.org} for information on funding the FSF. - -Another important way to support work on GNU Fortran is to volunteer -to help out. - -Email @email{@value{email-general}} to volunteer for this work. - -However, we strongly expect that there will never be a version 0.6 -of @command{g77}. Work on this compiler has stopped as of the release -of GCC 3.1, except for bug fixing. @command{g77} will be succeeded by -@command{g95} - see @uref{http://g95.sourceforge.net}. - -@xref{Funding,,Funding Free Software}, for more information. - -@node Getting Started -@chapter Getting Started -@cindex getting started -@cindex new users -@cindex newbies -@cindex beginners - -If you don't need help getting started reading the portions -of this manual that are most important to you, you should skip -this portion of the manual. - -If you are new to compilers, especially Fortran compilers, or -new to how compilers are structured under UNIX and UNIX-like -systems, you'll want to see @ref{What is GNU Fortran?}. - -If you are new to GNU compilers, or have used only one GNU -compiler in the past and not had to delve into how it lets -you manage various versions and configurations of @command{gcc}, -you should see @ref{G77 and GCC}. - -Everyone except experienced @command{g77} users should -see @ref{Invoking G77}. - -If you're acquainted with previous versions of @command{g77}, -you should see @ref{News,,News About GNU Fortran}. -Further, if you've actually used previous versions of @command{g77}, -especially if you've written or modified Fortran code to -be compiled by previous versions of @command{g77}, you -should see @ref{Changes}. - -If you intend to write or otherwise compile code that is -not already strictly conforming ANSI FORTRAN 77---and this -is probably everyone---you should see @ref{Language}. - -If you run into trouble getting Fortran code to compile, -link, run, or work properly, you might find answers -if you see @ref{Debugging and Interfacing}, -see @ref{Collected Fortran Wisdom}, -and see @ref{Trouble}. -You might also find that the problems you are encountering -are bugs in @command{g77}---see @ref{Bugs}, for information on -reporting them, after reading the other material. - -If you need further help with @command{g77}, or with -freely redistributable software in general, -see @ref{Service}. - -If you would like to help the @command{g77} project, -see @ref{Funding GNU Fortran}, for information on -helping financially, and see @ref{Projects}, for information -on helping in other ways. - -If you're generally curious about the future of -@command{g77}, see @ref{Projects}. -If you're curious about its past, -see @ref{Contributors}, -and see @ref{Funding GNU Fortran}. - -To see a few of the questions maintainers of @command{g77} have, -and that you might be able to answer, -see @ref{Open Questions}. - -@ifset USING -@node What is GNU Fortran? -@chapter What is GNU Fortran? -@cindex concepts, basic -@cindex basic concepts - -GNU Fortran, or @command{g77}, is designed initially as a free replacement -for, or alternative to, the UNIX @command{f77} command. -(Similarly, @command{gcc} is designed as a replacement -for the UNIX @command{cc} command.) - -@command{g77} also is designed to fit in well with the other -fine GNU compilers and tools. - -Sometimes these design goals conflict---in such cases, resolution -often is made in favor of fitting in well with Project GNU. -These cases are usually identified in the appropriate -sections of this manual. - -@cindex compilers -As compilers, @command{g77}, @command{gcc}, and @command{f77} -share the following characteristics: - -@itemize @bullet -@cindex source code -@cindex file, source -@cindex code, source -@cindex source file -@item -They read a user's program, stored in a file and -containing instructions written in the appropriate -language (Fortran, C, and so on). -This file contains @dfn{source code}. - -@cindex translation of user programs -@cindex machine code -@cindex code, machine -@cindex mistakes -@item -They translate the user's program into instructions -a computer can carry out more quickly than it takes -to translate the instructions in the first place. -These instructions are called @dfn{machine code}---code -designed to be efficiently translated and processed -by a machine such as a computer. -Humans usually aren't as good writing machine code -as they are at writing Fortran or C, because -it is easy to make tiny mistakes writing machine code. -When writing Fortran or C, it is easy -to make big mistakes. - -@cindex debugger -@cindex bugs, finding -@cindex @command{gdb}, command -@cindex commands, @command{gdb} -@item -They provide information in the generated machine code -that can make it easier to find bugs in the program -(using a debugging tool, called a @dfn{debugger}, -such as @command{gdb}). - -@cindex libraries -@cindex linking -@cindex @command{ld} command -@cindex commands, @command{ld} -@item -They locate and gather machine code already generated -to perform actions requested by statements in -the user's program. -This machine code is organized -into @dfn{libraries} and is located and gathered -during the @dfn{link} phase of the compilation -process. -(Linking often is thought of as a separate -step, because it can be directly invoked via the -@command{ld} command. -However, the @command{g77} and @command{gcc} -commands, as with most compiler commands, automatically -perform the linking step by calling on @command{ld} -directly, unless asked to not do so by the user.) - -@cindex language, incorrect use of -@cindex incorrect use of language -@item -They attempt to diagnose cases where the user's -program contains incorrect usages of the language. -The @dfn{diagnostics} produced by the compiler -indicate the problem and the location in the user's -source file where the problem was first noticed. -The user can use this information to locate and -fix the problem. -@cindex diagnostics, incorrect -@cindex incorrect diagnostics -@cindex error messages, incorrect -@cindex incorrect error messages -(Sometimes an incorrect usage -of the language leads to a situation where the -compiler can no longer make any sense of what -follows---while a human might be able to---and -thus ends up complaining about many ``problems'' -it encounters that, in fact, stem from just one -problem, usually the first one reported.) - -@cindex warnings -@cindex questionable instructions -@item -They attempt to diagnose cases where the user's -program contains a correct usage of the language, -but instructs the computer to do something questionable. -These diagnostics often are in the form of @dfn{warnings}, -instead of the @dfn{errors} that indicate incorrect -usage of the language. -@end itemize - -How these actions are performed is generally under the -control of the user. -Using command-line options, the user can specify -how persnickety the compiler is to be regarding -the program (whether to diagnose questionable usage -of the language), how much time to spend making -the generated machine code run faster, and so on. - -@cindex components of @command{g77} -@cindex @command{g77}, components of -@command{g77} consists of several components: - -@cindex @command{gcc}, command -@cindex commands, @command{gcc} -@itemize @bullet -@item -A modified version of the @command{gcc} command, which also might be -installed as the system's @command{cc} command. -(In many cases, @command{cc} refers to the -system's ``native'' C compiler, which -might be a non-GNU compiler, or an older version -of @command{gcc} considered more stable or that is -used to build the operating system kernel.) - -@cindex @command{g77}, command -@cindex commands, @command{g77} -@item -The @command{g77} command itself, which also might be installed as the -system's @command{f77} command. - -@cindex libg2c library -@cindex libf2c library -@cindex libraries, libf2c -@cindex libraries, libg2c -@cindex run-time, library -@item -The @code{libg2c} run-time library. -This library contains the machine code needed to support -capabilities of the Fortran language that are not directly -provided by the machine code generated by the @command{g77} -compilation phase. - -@code{libg2c} is just the unique name @command{g77} gives -to its version of @code{libf2c} to distinguish it from -any copy of @code{libf2c} installed from @command{f2c} -(or versions of @command{g77} that built @code{libf2c} under -that same name) -on the system. - -The maintainer of @code{libf2c} currently is -@email{dmg@@bell-labs.com}. - -@cindex @code{f771}, program -@cindex programs, @code{f771} -@cindex assembler -@cindex @command{as} command -@cindex commands, @command{as} -@cindex assembly code -@cindex code, assembly -@item -The compiler itself, internally named @code{f771}. - -Note that @code{f771} does not generate machine code directly---it -generates @dfn{assembly code} that is a more readable form -of machine code, leaving the conversion to actual machine code -to an @dfn{assembler}, usually named @command{as}. -@end itemize - -@command{gcc} is often thought of as ``the C compiler'' only, -but it does more than that. -Based on command-line options and the names given for files -on the command line, @command{gcc} determines which actions to perform, including -preprocessing, compiling (in a variety of possible languages), assembling, -and linking. - -@cindex driver, gcc command as -@cindex @command{gcc}, command as driver -@cindex executable file -@cindex files, executable -@cindex cc1 program -@cindex programs, cc1 -@cindex preprocessor -@cindex cpp program -@cindex programs, cpp -For example, the command @samp{gcc foo.c} @dfn{drives} the file -@file{foo.c} through the preprocessor @command{cpp}, then -the C compiler (internally named -@code{cc1}), then the assembler (usually @command{as}), then the linker -(@command{ld}), producing an executable program named @file{a.out} (on -UNIX systems). - -@cindex cc1plus program -@cindex programs, cc1plus -As another example, the command @samp{gcc foo.cc} would do much the same as -@samp{gcc foo.c}, but instead of using the C compiler named @code{cc1}, -@command{gcc} would use the C++ compiler (named @code{cc1plus}). - -@cindex @code{f771}, program -@cindex programs, @code{f771} -In a GNU Fortran installation, @command{gcc} recognizes Fortran source -files by name just like it does C and C++ source files. -It knows to use the Fortran compiler named @code{f771}, instead of -@code{cc1} or @code{cc1plus}, to compile Fortran files. - -@cindex @command{gcc}, not recognizing Fortran source -@cindex unrecognized file format -@cindex file format not recognized -Non-Fortran-related operation of @command{gcc} is generally -unaffected by installing the GNU Fortran version of @command{gcc}. -However, without the installed version of @command{gcc} being the -GNU Fortran version, @command{gcc} will not be able to compile -and link Fortran programs---and since @command{g77} uses @command{gcc} -to do most of the actual work, neither will @command{g77}! - -@cindex @command{g77}, command -@cindex commands, @command{g77} -The @command{g77} command is essentially just a front-end for -the @command{gcc} command. -Fortran users will normally use @command{g77} instead of @command{gcc}, -because @command{g77} -knows how to specify the libraries needed to link with Fortran programs -(@code{libg2c} and @code{lm}). -@command{g77} can still compile and link programs and -source files written in other languages, just like @command{gcc}. - -@cindex printing version information -@cindex version information, printing -The command @samp{g77 -v} is a quick -way to display lots of version information for the various programs -used to compile a typical preprocessed Fortran source file---this -produces much more output than @samp{gcc -v} currently does. -(If it produces an error message near the end of the output---diagnostics -from the linker, usually @command{ld}---you might -have an out-of-date @code{libf2c} that improperly handles -complex arithmetic.) -In the output of this command, the line beginning @samp{GNU Fortran Front -End} identifies the version number of GNU Fortran; immediately -preceding that line is a line identifying the version of @command{gcc} -with which that version of @command{g77} was built. - -@cindex libf2c library -@cindex libraries, libf2c -The @code{libf2c} library is distributed with GNU Fortran for -the convenience of its users, but is not part of GNU Fortran. -It contains the procedures -needed by Fortran programs while they are running. - -@cindex in-line code -@cindex code, in-line -For example, while code generated by @command{g77} is likely -to do additions, subtractions, and multiplications @dfn{in line}---in -the actual compiled code---it is not likely to do trigonometric -functions this way. - -Instead, operations like trigonometric -functions are compiled by the @code{f771} compiler -(invoked by @command{g77} when compiling Fortran code) into machine -code that, when run, calls on functions in @code{libg2c}, so -@code{libg2c} must be linked with almost every useful program -having any component compiled by GNU Fortran. -(As mentioned above, the @command{g77} command takes -care of all this for you.) - -The @code{f771} program represents most of what is unique to GNU Fortran. -While much of the @code{libg2c} component comes from -the @code{libf2c} component of @command{f2c}, -a free Fortran-to-C converter distributed by Bellcore (AT&T), -plus @code{libU77}, provided by Dave Love, -and the @command{g77} command is just a small front-end to @command{gcc}, -@code{f771} is a combination of two rather -large chunks of code. - -@cindex GNU Back End (GBE) -@cindex GBE -@cindex @command{gcc}, back end -@cindex back end, gcc -@cindex code generator -One chunk is the so-called @dfn{GNU Back End}, or GBE, -which knows how to generate fast code for a wide variety of processors. -The same GBE is used by the C, C++, and Fortran compiler programs @code{cc1}, -@code{cc1plus}, and @code{f771}, plus others. -Often the GBE is referred to as the ``gcc back end'' or -even just ``gcc''---in this manual, the term GBE is used -whenever the distinction is important. - -@cindex GNU Fortran Front End (FFE) -@cindex FFE -@cindex @command{g77}, front end -@cindex front end, @command{g77} -The other chunk of @code{f771} is the -majority of what is unique about GNU Fortran---the code that knows how -to interpret Fortran programs to determine what they are intending to -do, and then communicate that knowledge to the GBE for actual compilation -of those programs. -This chunk is called the @dfn{Fortran Front End} (FFE). -The @code{cc1} and @code{cc1plus} programs have their own front ends, -for the C and C++ languages, respectively. -These fronts ends are responsible for diagnosing -incorrect usage of their respective languages by the -programs the process, and are responsible for most of -the warnings about questionable constructs as well. -(The GBE handles producing some warnings, like those -concerning possible references to undefined variables.) - -Because so much is shared among the compilers for various languages, -much of the behavior and many of the user-selectable options for these -compilers are similar. -For example, diagnostics (error messages and -warnings) are similar in appearance; command-line -options like @option{-Wall} have generally similar effects; and the quality -of generated code (in terms of speed and size) is roughly similar -(since that work is done by the shared GBE). - -@node G77 and GCC -@chapter Compile Fortran, C, or Other Programs -@cindex compiling programs -@cindex programs, compiling - -@cindex @command{gcc}, command -@cindex commands, @command{gcc} -A GNU Fortran installation includes a modified version of the @command{gcc} -command. - -In a non-Fortran installation, @command{gcc} recognizes C, C++, -and Objective-C source files. - -In a GNU Fortran installation, @command{gcc} also recognizes Fortran source -files and accepts Fortran-specific command-line options, plus some -command-line options that are designed to cater to Fortran users -but apply to other languages as well. - -@xref{G++ and GCC,,Programming Languages Supported by GCC,gcc,Using -the GNU Compiler Collection (GCC)}, -for information on the way different languages are handled -by the GCC compiler (@command{gcc}). - -@cindex @command{g77}, command -@cindex commands, @command{g77} -Also provided as part of GNU Fortran is the @command{g77} command. -The @command{g77} command is designed to make compiling and linking Fortran -programs somewhat easier than when using the @command{gcc} command for -these tasks. -It does this by analyzing the command line somewhat and changing it -appropriately before submitting it to the @command{gcc} command. - -@cindex -v option -@cindex @command{g77} options, -v -@cindex options, -v -Use the @option{-v} option with @command{g77} -to see what is going on---the first line of output is the invocation -of the @command{gcc} command. - -@include invoke.texi - -@include news.texi - -@set USERVISONLY -@include news.texi -@clear USERVISONLY - -@node Language -@chapter The GNU Fortran Language - -@cindex standard, ANSI FORTRAN 77 -@cindex ANSI FORTRAN 77 standard -@cindex reference works -GNU Fortran supports a variety of extensions to, and dialects -of, the Fortran language. -Its primary base is the ANSI FORTRAN 77 standard, currently available on -the network at -@uref{http://www.fortran.com/fortran/F77_std/rjcnf0001.html} -or as monolithic text at -@uref{http://www.fortran.com/fortran/F77_std/f77_std.html}. -It offers some extensions that are popular among users -of UNIX @command{f77} and @command{f2c} compilers, some that -are popular among users of other compilers (such as Digital -products), some that are popular among users of the -newer Fortran 90 standard, and some that are introduced -by GNU Fortran. - -@cindex textbooks -(If you need a text on Fortran, -a few freely available electronic references have pointers from -@uref{http://www.fortran.com/F/books.html}. There is a `cooperative -net project', @cite{User Notes on Fortran Programming} at -@uref{ftp://vms.huji.ac.il/fortran/} and mirrors elsewhere; some of this -material might not apply specifically to @command{g77}.) - -Part of what defines a particular implementation of a Fortran -system, such as @command{g77}, is the particular characteristics -of how it supports types, constants, and so on. -Much of this is left up to the implementation by the various -Fortran standards and accepted practice in the industry. - -The GNU Fortran @emph{language} is described below. -Much of the material is organized along the same lines -as the ANSI FORTRAN 77 standard itself. - -@xref{Other Dialects}, for information on features @command{g77} supports -that are not part of the GNU Fortran language. - -@emph{Note}: This portion of the documentation definitely needs a lot -of work! - -@menu -Relationship to the ANSI FORTRAN 77 standard: -* Direction of Language Development:: Where GNU Fortran is headed. -* Standard Support:: Degree of support for the standard. - -Extensions to the ANSI FORTRAN 77 standard: -* Conformance:: -* Notation Used:: -* Terms and Concepts:: -* Characters Lines Sequence:: -* Data Types and Constants:: -* Expressions:: -* Specification Statements:: -* Control Statements:: -* Functions and Subroutines:: -* Scope and Classes of Names:: -* I/O:: -* Fortran 90 Features:: -@end menu - -@node Direction of Language Development -@section Direction of Language Development -@cindex direction of language development -@cindex features, language -@cindex language, features - -The purpose of the following description of the GNU Fortran -language is to promote wide portability of GNU Fortran programs. - -GNU Fortran is an evolving language, due to the -fact that @command{g77} itself is in beta test. -Some current features of the language might later -be redefined as dialects of Fortran supported by @command{g77} -when better ways to express these features are added to @command{g77}, -for example. -Such features would still be supported by -@command{g77}, but would be available only when -one or more command-line options were used. - -The GNU Fortran @emph{language} is distinct from the -GNU Fortran @emph{compilation system} (@command{g77}). - -For example, @command{g77} supports various dialects of -Fortran---in a sense, these are languages other than -GNU Fortran---though its primary -purpose is to support the GNU Fortran language, which also is -described in its documentation and by its implementation. - -On the other hand, non-GNU compilers might offer -support for the GNU Fortran language, and are encouraged -to do so. - -Currently, the GNU Fortran language is a fairly fuzzy object. -It represents something of a cross between what @command{g77} accepts -when compiling using the prevailing defaults and what this -document describes as being part of the language. - -Future versions of @command{g77} are expected to clarify the -definition of the language in the documentation. -Often, this will mean adding new features to the language, in the form -of both new documentation and new support in @command{g77}. -However, it might occasionally mean removing a feature -from the language itself to ``dialect'' status. -In such a case, the documentation would be adjusted -to reflect the change, and @command{g77} itself would likely be changed -to require one or more command-line options to continue supporting -the feature. - -The development of the GNU Fortran language is intended to strike -a balance between: - -@itemize @bullet -@item -Serving as a mostly-upwards-compatible language from the -de facto UNIX Fortran dialect as supported by @command{f77}. - -@item -Offering new, well-designed language features. -Attributes of such features include -not making existing code any harder to read -(for those who might be unaware that the new -features are not in use) and -not making state-of-the-art -compilers take longer to issue diagnostics, -among others. - -@item -Supporting existing, well-written code without gratuitously -rejecting non-standard constructs, regardless of the origin -of the code (its dialect). - -@item -Offering default behavior and command-line options to reduce -and, where reasonable, eliminate the need for programmers to make -any modifications to code that already works in existing -production environments. - -@item -Diagnosing constructs that have different meanings in different -systems, languages, and dialects, while offering clear, -less ambiguous ways to express each of the different meanings -so programmers can change their code appropriately. -@end itemize - -One of the biggest practical challenges for the developers of the -GNU Fortran language is meeting the sometimes contradictory demands -of the above items. - -For example, a feature might be widely used in one popular environment, -but the exact same code that utilizes that feature might not work -as expected---perhaps it might mean something entirely different---in -another popular environment. - -Traditionally, Fortran compilers---even portable ones---have solved this -problem by simply offering the appropriate feature to users of -the respective systems. -This approach treats users of various Fortran systems and dialects -as remote ``islands'', or camps, of programmers, and assume that these -camps rarely come into contact with each other (or, -especially, with each other's code). - -Project GNU takes a radically different approach to software and language -design, in that it assumes that users of GNU software do not necessarily -care what kind of underlying system they are using, regardless -of whether they are using software (at the user-interface -level) or writing it (for example, writing Fortran or C code). - -As such, GNU users rarely need consider just what kind of underlying -hardware (or, in many cases, operating system) they are using at any -particular time. -They can use and write software designed for a general-purpose, -widely portable, heterogeneous environment---the GNU environment. - -In line with this philosophy, GNU Fortran must evolve into a product -that is widely ported and portable not only in the sense that it can -be successfully built, installed, and run by users, but in the larger -sense that its users can use it in the same way, and expect largely the -same behaviors from it, regardless of the kind of system they are using -at any particular time. - -This approach constrains the solutions @command{g77} can use to resolve -conflicts between various camps of Fortran users. -If these two camps disagree about what a particular construct should -mean, @command{g77} cannot simply be changed to treat that particular construct as -having one meaning without comment (such as a warning), lest the users -expecting it to have the other meaning are unpleasantly surprised that -their code misbehaves when executed. - -The use of the ASCII backslash character in character constants is -an excellent (and still somewhat unresolved) example of this kind of -controversy. -@xref{Backslash in Constants}. -Other examples are likely to arise in the future, as @command{g77} developers -strive to improve its ability to accept an ever-wider variety of existing -Fortran code without requiring significant modifications to said code. - -Development of GNU Fortran is further constrained by the desire -to avoid requiring programmers to change their code. -This is important because it allows programmers, administrators, -and others to more faithfully evaluate and validate @command{g77} -(as an overall product and as new versions are distributed) -without having to support multiple versions of their programs -so that they continue to work the same way on their existing -systems (non-GNU perhaps, but possibly also earlier versions -of @command{g77}). - -@node Standard Support -@section ANSI FORTRAN 77 Standard Support -@cindex ANSI FORTRAN 77 support -@cindex standard, support for -@cindex support, FORTRAN 77 -@cindex compatibility, FORTRAN 77 -@cindex FORTRAN 77 compatibility - -GNU Fortran supports ANSI FORTRAN 77 with the following caveats. -In summary, the only ANSI FORTRAN 77 features @command{g77} doesn't -support are those that are probably rarely used in actual code, -some of which are explicitly disallowed by the Fortran 90 standard. - -@menu -* No Passing External Assumed-length:: CHAR*(*) CFUNC restriction. -* No Passing Dummy Assumed-length:: CHAR*(*) CFUNC restriction. -* No Pathological Implied-DO:: No @samp{((@dots{}, I=@dots{}), I=@dots{})}. -* No Useless Implied-DO:: No @samp{(A, I=1, 1)}. -@end menu - -@node No Passing External Assumed-length -@subsection No Passing External Assumed-length - -@command{g77} disallows passing of an external procedure -as an actual argument if the procedure's -type is declared @code{CHARACTER*(*)}. For example: - -@example -CHARACTER*(*) CFUNC -EXTERNAL CFUNC -CALL FOO(CFUNC) -END -@end example - -@noindent -It isn't clear whether the standard considers this conforming. - -@node No Passing Dummy Assumed-length -@subsection No Passing Dummy Assumed-length - -@command{g77} disallows passing of a dummy procedure -as an actual argument if the procedure's -type is declared @code{CHARACTER*(*)}. - -@example -SUBROUTINE BAR(CFUNC) -CHARACTER*(*) CFUNC -EXTERNAL CFUNC -CALL FOO(CFUNC) -END -@end example - -@noindent -It isn't clear whether the standard considers this conforming. - -@node No Pathological Implied-DO -@subsection No Pathological Implied-DO - -The @code{DO} variable for an implied-@code{DO} construct in a -@code{DATA} statement may not be used as the @code{DO} variable -for an outer implied-@code{DO} construct. For example, this -fragment is disallowed by @command{g77}: - -@smallexample -DATA ((A(I, I), I= 1, 10), I= 1, 10) /@dots{}/ -@end smallexample - -@noindent -This also is disallowed by Fortran 90, as it offers no additional -capabilities and would have a variety of possible meanings. - -Note that it is @emph{very} unlikely that any production Fortran code -tries to use this unsupported construct. - -@node No Useless Implied-DO -@subsection No Useless Implied-DO - -An array element initializer in an implied-@code{DO} construct in a -@code{DATA} statement must contain at least one reference to the @code{DO} -variables of each outer implied-@code{DO} construct. For example, -this fragment is disallowed by @command{g77}: - -@smallexample -DATA (A, I= 1, 1) /1./ -@end smallexample - -@noindent -This also is disallowed by Fortran 90, as FORTRAN 77's more permissive -requirements offer no additional capabilities. -However, @command{g77} doesn't necessarily diagnose all cases -where this requirement is not met. - -Note that it is @emph{very} unlikely that any production Fortran code -tries to use this unsupported construct. - -@node Conformance -@section Conformance - -(The following information augments or overrides the information in -Section 1.4 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 1 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -The definition of the GNU Fortran language is akin to that of -the ANSI FORTRAN 77 language in that it does not generally require -conforming implementations to diagnose cases where programs do -not conform to the language. - -However, @command{g77} as a compiler is being developed in a way that -is intended to enable it to diagnose such cases in an easy-to-understand -manner. - -A program that conforms to the GNU Fortran language should, when -compiled, linked, and executed using a properly installed @command{g77} -system, perform as described by the GNU Fortran language definition. -Reasons for different behavior include, among others: - -@itemize @bullet -@item -Use of resources (memory---heap, stack, and so on; disk space; CPU -time; etc.) exceeds those of the system. - -@item -Range and/or precision of calculations required by the program -exceeds that of the system. - -@item -Excessive reliance on behaviors that are system-dependent -(non-portable Fortran code). - -@item -Bugs in the program. - -@item -Bug in @command{g77}. - -@item -Bugs in the system. -@end itemize - -Despite these ``loopholes'', the availability of a clear specification -of the language of programs submitted to @command{g77}, as this document -is intended to provide, is considered an important aspect of providing -a robust, clean, predictable Fortran implementation. - -The definition of the GNU Fortran language, while having no special -legal status, can therefore be viewed as a sort of contract, or agreement. -This agreement says, in essence, ``if you write a program in this language, -and run it in an environment (such as a @command{g77} system) that supports -this language, the program should behave in a largely predictable way''. - -@node Notation Used -@section Notation Used in This Chapter - -(The following information augments or overrides the information in -Section 1.5 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 1 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -In this chapter, ``must'' denotes a requirement, ``may'' denotes permission, -and ``must not'' and ``may not'' denote prohibition. -Terms such as ``might'', ``should'', and ``can'' generally add little or -nothing in the way of weight to the GNU Fortran language itself, -but are used to explain or illustrate the language. - -For example: - -@display -``The @code{FROBNITZ} statement must precede all executable -statements in a program unit, and may not specify any dummy -arguments. It may specify local or common variables and arrays. -Its use should be limited to portions of the program designed to -be non-portable and system-specific, because it might cause the -containing program unit to behave quite differently on different -systems.'' -@end display - -Insofar as the GNU Fortran language is specified, -the requirements and permissions denoted by the above sample statement -are limited to the placement of the statement and the kinds of -things it may specify. -The rest of the statement---the content regarding non-portable portions -of the program and the differing behavior of program units containing -the @code{FROBNITZ} statement---does not pertain the GNU Fortran -language itself. -That content offers advice and warnings about the @code{FROBNITZ} -statement. - -@emph{Remember:} The GNU Fortran language definition specifies -both what constitutes a valid GNU Fortran program and how, -given such a program, a valid GNU Fortran implementation is -to interpret that program. - -It is @emph{not} incumbent upon a valid GNU Fortran implementation -to behave in any particular way, any consistent way, or any -predictable way when it is asked to interpret input that is -@emph{not} a valid GNU Fortran program. - -Such input is said to have @dfn{undefined} behavior when -interpreted by a valid GNU Fortran implementation, though -an implementation may choose to specify behaviors for some -cases of inputs that are not valid GNU Fortran programs. - -Other notation used herein is that of the GNU texinfo format, -which is used to generate printed hardcopy, on-line hypertext -(Info), and on-line HTML versions, all from a single source -document. -This notation is used as follows: - -@itemize @bullet -@item -Keywords defined by the GNU Fortran language are shown -in uppercase, as in: @code{COMMON}, @code{INTEGER}, and -@code{BLOCK DATA}. - -Note that, in practice, many Fortran programs are written -in lowercase---uppercase is used in this manual as a -means to readily distinguish keywords and sample Fortran-related -text from the prose in this document. - -@item -Portions of actual sample program, input, or output text -look like this: @samp{Actual program text}. - -Generally, uppercase is used for all Fortran-specific and -Fortran-related text, though this does not always include -literal text within Fortran code. - -For example: @samp{PRINT *, 'My name is Bob'}. - -@item -A metasyntactic variable---that is, a name used in this document -to serve as a placeholder for whatever text is used by the -user or programmer---appears as shown in the following example: - -``The @code{INTEGER @var{ivar}} statement specifies that -@var{ivar} is a variable or array of type @code{INTEGER}.'' - -In the above example, any valid text may be substituted for -the metasyntactic variable @var{ivar} to make the statement -apply to a specific instance, as long as the same text is -substituted for @emph{both} occurrences of @var{ivar}. - -@item -Ellipses (``@dots{}'') are used to indicate further text that -is either unimportant or expanded upon further, elsewhere. - -@item -Names of data types are in the style of Fortran 90, in most -cases. - -@xref{Kind Notation}, for information on the relationship -between Fortran 90 nomenclature (such as @code{INTEGER(KIND=1)}) -and the more traditional, less portably concise nomenclature -(such as @code{INTEGER*4}). -@end itemize - -@node Terms and Concepts -@section Fortran Terms and Concepts - -(The following information augments or overrides the information in -Chapter 2 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 2 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -@menu -* Syntactic Items:: -* Statements Comments Lines:: -* Scope of Names and Labels:: -@end menu - -@node Syntactic Items -@subsection Syntactic Items - -(Corresponds to Section 2.2 of ANSI X3.9-1978 FORTRAN 77.) - -@cindex limits, lengths of names -In GNU Fortran, a symbolic name is at least one character long, -and has no arbitrary upper limit on length. -However, names of entities requiring external linkage (such as -external functions, external subroutines, and @code{COMMON} areas) -might be restricted to some arbitrary length by the system. -Such a restriction is no more constrained than that of one -through six characters. - -Underscores (@samp{_}) are accepted in symbol names after the first -character (which must be a letter). - -@node Statements Comments Lines -@subsection Statements, Comments, and Lines - -(Corresponds to Section 2.3 of ANSI X3.9-1978 FORTRAN 77.) - -@cindex trailing comment -@cindex comment -@cindex characters, comment -@cindex ! -@cindex exclamation point -@cindex continuation character -@cindex characters, continuation -Use of an exclamation point (@samp{!}) to begin a -trailing comment (a comment that extends to the end of the same -source line) is permitted under the following conditions: - -@itemize @bullet -@item -The exclamation point does not appear in column 6. -Otherwise, it is treated as an indicator of a continuation -line. - -@item -The exclamation point appears outside a character or Hollerith -constant. -Otherwise, the exclamation point is considered part of the -constant. - -@item -The exclamation point appears to the left of any other possible -trailing comment. -That is, a trailing comment may contain exclamation points -in their commentary text. -@end itemize - -@cindex ; -@cindex semicolon -@cindex statements, separated by semicolon -Use of a semicolon (@samp{;}) as a statement separator -is permitted under the following conditions: - -@itemize @bullet -@item -The semicolon appears outside a character or Hollerith -constant. -Otherwise, the semicolon is considered part of the -constant. - -@item -The semicolon appears to the left of a trailing comment. -Otherwise, the semicolon is considered part of that -comment. - -@item -Neither a logical @code{IF} statement nor a non-construct -@code{WHERE} statement (a Fortran 90 feature) may be -followed (in the same, possibly continued, line) by -a semicolon used as a statement separator. - -This restriction avoids the confusion -that can result when reading a line such as: - -@smallexample -IF (VALIDP) CALL FOO; CALL BAR -@end smallexample - -@noindent -Some readers might think the @samp{CALL BAR} is executed -only if @samp{VALIDP} is @code{.TRUE.}, while others might -assume its execution is unconditional. - -(At present, @command{g77} does not diagnose code that -violates this restriction.) -@end itemize - -@node Scope of Names and Labels -@subsection Scope of Symbolic Names and Statement Labels -@cindex scope - -(Corresponds to Section 2.9 of ANSI X3.9-1978 FORTRAN 77.) - -Included in the list of entities that have a scope of a -program unit are construct names (a Fortran 90 feature). -@xref{Construct Names}, for more information. - -@node Characters Lines Sequence -@section Characters, Lines, and Execution Sequence - -(The following information augments or overrides the information in -Chapter 3 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 3 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -@menu -* Character Set:: -* Lines:: -* Continuation Line:: -* Statements:: -* Statement Labels:: -* Order:: -* INCLUDE:: -* Cpp-style directives:: -@end menu - -@node Character Set -@subsection GNU Fortran Character Set -@cindex characters - -(Corresponds to Section 3.1 of ANSI X3.9-1978 FORTRAN 77.) - -Letters include uppercase letters (the twenty-six characters -of the English alphabet) and lowercase letters (their lowercase -equivalent). -Generally, lowercase letters may be used in place of uppercase -letters, though in character and Hollerith constants, they -are distinct. - -Special characters include: - -@itemize @bullet -@item -@cindex ; -@cindex semicolon -Semicolon (@samp{;}) - -@item -@cindex ! -@cindex exclamation point -Exclamation point (@samp{!}) - -@item -@cindex " -@cindex double quote -Double quote (@samp{"}) - -@item -@cindex \ -@cindex backslash -Backslash (@samp{\}) - -@item -@cindex ? -@cindex question mark -Question mark (@samp{?}) - -@item -@cindex # -@cindex hash mark -@cindex pound sign -Hash mark (@samp{#}) - -@item -@cindex & -@cindex ampersand -Ampersand (@samp{&}) - -@item -@cindex % -@cindex percent sign -Percent sign (@samp{%}) - -@item -@cindex _ -@cindex underscore -Underscore (@samp{_}) - -@item -@cindex < -@cindex open angle -@cindex left angle -@cindex open bracket -@cindex left bracket -Open angle (@samp{<}) - -@item -@cindex > -@cindex close angle -@cindex right angle -@cindex close bracket -@cindex right bracket -Close angle (@samp{>}) - -@item -The FORTRAN 77 special characters (@key{SPC}, @samp{=}, -@samp{+}, @samp{-}, @samp{*}, @samp{/}, @samp{(}, -@samp{)}, @samp{,}, @samp{.}, @samp{$}, @samp{'}, -and @samp{:}) -@end itemize - -@cindex blank -@cindex space -@cindex SPC -Note that this document refers to @key{SPC} as @dfn{space}, -while X3.9-1978 FORTRAN 77 refers to it as @dfn{blank}. - -@node Lines -@subsection Lines -@cindex lines -@cindex source file format -@cindex source format -@cindex file, source -@cindex source code -@cindex code, source -@cindex fixed form -@cindex free form - -(Corresponds to Section 3.2 of ANSI X3.9-1978 FORTRAN 77.) - -The way a Fortran compiler views source files depends entirely on the -implementation choices made for the compiler, since those choices -are explicitly left to the implementation by the published Fortran -standards. - -The GNU Fortran language mandates a view applicable to UNIX-like -text files---files that are made up of an arbitrary number of lines, -each with an arbitrary number of characters (sometimes called stream-based -files). - -This view does not apply to types of files that are specified as -having a particular number of characters on every single line (sometimes -referred to as record-based files). - -Because a ``line in a program unit is a sequence of 72 characters'', -to quote X3.9-1978, the GNU Fortran language specifies that a -stream-based text file is translated to GNU Fortran lines as follows: - -@itemize @bullet -@item -A newline in the file is the character that represents the end of -a line of text to the underlying system. -For example, on ASCII-based systems, a newline is the @key{NL} -character, which has ASCII value 10 (decimal). - -@item -Each newline in the file serves to end the line of text that precedes -it (and that does not contain a newline). - -@item -The end-of-file marker (@code{EOF}) also serves to end the line -of text that precedes it (and that does not contain a newline). - -@item -@cindex blank -@cindex space -@cindex SPC -Any line of text that is shorter than 72 characters is padded to that length -with spaces (called ``blanks'' in the standard). - -@item -Any line of text that is longer than 72 characters is truncated to that -length, but the truncated remainder must consist entirely of spaces. - -@item -Characters other than newline and the GNU Fortran character set -are invalid. -@end itemize - -For the purposes of the remainder of this description of the GNU -Fortran language, the translation described above has already -taken place, unless otherwise specified. - -The result of the above translation is that the source file appears, -in terms of the remainder of this description of the GNU Fortran language, -as if it had an arbitrary -number of 72-character lines, each character being among the GNU Fortran -character set. - -For example, if the source file itself has two newlines in a row, -the second newline becomes, after the above translation, a single -line containing 72 spaces. - -@node Continuation Line -@subsection Continuation Line -@cindex continuation line, number of -@cindex lines, continuation -@cindex number of continuation lines -@cindex limits, continuation lines - -(Corresponds to Section 3.2.3 of ANSI X3.9-1978 FORTRAN 77.) - -A continuation line is any line that both - -@itemize @bullet -@item -Contains a continuation character, and - -@item -Contains only spaces in columns 1 through 5 -@end itemize - -A continuation character is any character of the GNU Fortran character set -other than space (@key{SPC}) or zero (@samp{0}) -in column 6, or a digit (@samp{0} through @samp{9}) in column -7 through 72 of a line that has only spaces to the left of that -digit. - -The continuation character is ignored as far as the content of -the statement is concerned. - -The GNU Fortran language places no limit on the number of -continuation lines in a statement. -In practice, the limit depends on a variety of factors, such as -available memory, statement content, and so on, but no -GNU Fortran system may impose an arbitrary limit. - -@node Statements -@subsection Statements - -(Corresponds to Section 3.3 of ANSI X3.9-1978 FORTRAN 77.) - -Statements may be written using an arbitrary number of continuation -lines. - -Statements may be separated using the semicolon (@samp{;}), except -that the logical @code{IF} and non-construct @code{WHERE} statements -may not be separated from subsequent statements using only a semicolon -as statement separator. - -The @code{END PROGRAM}, @code{END SUBROUTINE}, @code{END FUNCTION}, -and @code{END BLOCK DATA} statements are alternatives to the @code{END} -statement. -These alternatives may be written as normal statements---they are not -subject to the restrictions of the @code{END} statement. - -However, no statement other than @code{END} may have an initial line -that appears to be an @code{END} statement---even @code{END PROGRAM}, -for example, must not be written as: - -@example - END - &PROGRAM -@end example - -@node Statement Labels -@subsection Statement Labels - -(Corresponds to Section 3.4 of ANSI X3.9-1978 FORTRAN 77.) - -A statement separated from its predecessor via a semicolon may be -labeled as follows: - -@itemize @bullet -@item -The semicolon is followed by the label for the statement, -which in turn follows the label. - -@item -The label must be no more than five digits in length. - -@item -The first digit of the label for the statement is not -the first non-space character on a line. -Otherwise, that character is treated as a continuation -character. -@end itemize - -A statement may have only one label defined for it. - -@node Order -@subsection Order of Statements and Lines - -(Corresponds to Section 3.5 of ANSI X3.9-1978 FORTRAN 77.) - -Generally, @code{DATA} statements may precede executable statements. -However, specification statements pertaining to any entities -initialized by a @code{DATA} statement must precede that @code{DATA} -statement. -For example, -after @samp{DATA I/1/}, @samp{INTEGER I} is not permitted, but -@samp{INTEGER J} is permitted. - -The last line of a program unit may be an @code{END} statement, -or may be: - -@itemize @bullet -@item -An @code{END PROGRAM} statement, if the program unit is a main program. - -@item -An @code{END SUBROUTINE} statement, if the program unit is a subroutine. - -@item -An @code{END FUNCTION} statement, if the program unit is a function. - -@item -An @code{END BLOCK DATA} statement, if the program unit is a block data. -@end itemize - -@node INCLUDE -@subsection Including Source Text -@cindex INCLUDE directive - -Additional source text may be included in the processing of -the source file via the @code{INCLUDE} directive: - -@example -INCLUDE @var{filename} -@end example - -@noindent -The source text to be included is identified by @var{filename}, -which is a literal GNU Fortran character constant. -The meaning and interpretation of @var{filename} depends on the -implementation, but typically is a filename. - -(@command{g77} treats it as a filename that it searches for -in the current directory and/or directories specified -via the @option{-I} command-line option.) - -The effect of the @code{INCLUDE} directive is as if the -included text directly replaced the directive in the source -file prior to interpretation of the program. -Included text may itself use @code{INCLUDE}. -The depth of nested @code{INCLUDE} references depends on -the implementation, but typically is a positive integer. - -This virtual replacement treats the statements and @code{INCLUDE} -directives in the included text as syntactically distinct from -those in the including text. - -Therefore, the first non-comment line of the included text -must not be a continuation line. -The included text must therefore have, after the non-comment -lines, either an initial line (statement), an @code{INCLUDE} -directive, or nothing (the end of the included text). - -Similarly, the including text may end the @code{INCLUDE} -directive with a semicolon or the end of the line, but it -cannot follow an @code{INCLUDE} directive at the end of its -line with a continuation line. -Thus, the last statement in an included text may not be -continued. - -Any statements between two @code{INCLUDE} directives on the -same line are treated as if they appeared in between the -respective included texts. -For example: - -@smallexample -INCLUDE 'A'; PRINT *, 'B'; INCLUDE 'C'; END PROGRAM -@end smallexample - -@noindent -If the text included by @samp{INCLUDE 'A'} constitutes -a @samp{PRINT *, 'A'} statement and the text included by -@samp{INCLUDE 'C'} constitutes a @samp{PRINT *, 'C'} statement, -then the output of the above sample program would be - -@example -A -B -C -@end example - -@noindent -(with suitable allowances for how an implementation defines -its handling of output). - -Included text must not include itself directly or indirectly, -regardless of whether the @var{filename} used to reference -the text is the same. - -Note that @code{INCLUDE} is @emph{not} a statement. -As such, it is neither a non-executable or executable -statement. -However, if the text it includes constitutes one or more -executable statements, then the placement of @code{INCLUDE} -is subject to effectively the same restrictions as those -on executable statements. - -An @code{INCLUDE} directive may be continued across multiple -lines as if it were a statement. -This permits long names to be used for @var{filename}. - -@node Cpp-style directives -@subsection Cpp-style directives -@cindex # -@cindex preprocessor - -@code{cpp} output-style @code{#} directives -(@pxref{C Preprocessor Output,,, cpp, The C Preprocessor}) -are recognized by the compiler even -when the preprocessor isn't run on the input (as it is when compiling -@samp{.F} files). (Note the distinction between these @command{cpp} -@code{#} @emph{output} directives and @code{#line} @emph{input} -directives.) - -@node Data Types and Constants -@section Data Types and Constants - -(The following information augments or overrides the information in -Chapter 4 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 4 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -To more concisely express the appropriate types for -entities, this document uses the more concise -Fortran 90 nomenclature such as @code{INTEGER(KIND=1)} -instead of the more traditional, but less portably concise, -byte-size-based nomenclature such as @code{INTEGER*4}, -wherever reasonable. - -When referring to generic types---in contexts where the -specific precision and range of a type are not important---this -document uses the generic type names @code{INTEGER}, @code{LOGICAL}, -@code{REAL}, @code{COMPLEX}, and @code{CHARACTER}. - -In some cases, the context requires specification of a -particular type. -This document uses the @samp{KIND=} notation to accomplish -this throughout, sometimes supplying the more traditional -notation for clarification, though the traditional notation -might not work the same way on all GNU Fortran implementations. - -Use of @samp{KIND=} makes this document more concise because -@command{g77} is able to define values for @samp{KIND=} that -have the same meanings on all systems, due to the way the -Fortran 90 standard specifies these values are to be used. - -(In particular, that standard permits an implementation to -arbitrarily assign nonnegative values. -There are four distinct sets of assignments: one to the @code{CHARACTER} -type; one to the @code{INTEGER} type; one to the @code{LOGICAL} type; -and the fourth to both the @code{REAL} and @code{COMPLEX} types. -Implementations are free to assign these values in any order, -leave gaps in the ordering of assignments, and assign more than -one value to a representation.) - -This makes @samp{KIND=} values superior to the values used -in non-standard statements such as @samp{INTEGER*4}, because -the meanings of the values in those statements vary from machine -to machine, compiler to compiler, even operating system to -operating system. - -However, use of @samp{KIND=} is @emph{not} generally recommended -when writing portable code (unless, for example, the code is -going to be compiled only via @command{g77}, which is a widely -ported compiler). -GNU Fortran does not yet have adequate language constructs to -permit use of @samp{KIND=} in a fashion that would make the -code portable to Fortran 90 implementations; and, this construct -is known to @emph{not} be accepted by many popular FORTRAN 77 -implementations, so it cannot be used in code that is to be ported -to those. - -The distinction here is that this document is able to use -specific values for @samp{KIND=} to concisely document the -types of various operations and operands. - -A Fortran program should use the FORTRAN 77 designations for the -appropriate GNU Fortran types---such as @code{INTEGER} for -@code{INTEGER(KIND=1)}, @code{REAL} for @code{REAL(KIND=1)}, -and @code{DOUBLE COMPLEX} for @code{COMPLEX(KIND=2)}---and, -where no such designations exist, make use of appropriate -techniques (preprocessor macros, parameters, and so on) -to specify the types in a fashion that may be easily adjusted -to suit each particular implementation to which the program -is ported. -(These types generally won't need to be adjusted for ports of -@command{g77}.) - -Further details regarding GNU Fortran data types and constants -are provided below. - -@menu -* Types:: -* Constants:: -* Integer Type:: -* Character Type:: -@end menu - -@node Types -@subsection Data Types - -(Corresponds to Section 4.1 of ANSI X3.9-1978 FORTRAN 77.) - -GNU Fortran supports these types: - -@enumerate -@item -Integer (generic type @code{INTEGER}) - -@item -Real (generic type @code{REAL}) - -@item -Double precision - -@item -Complex (generic type @code{COMPLEX}) - -@item -Logical (generic type @code{LOGICAL}) - -@item -Character (generic type @code{CHARACTER}) - -@item -Double Complex -@end enumerate - -(The types numbered 1 through 6 above are standard FORTRAN 77 types.) - -The generic types shown above are referred to in this document -using only their generic type names. -Such references usually indicate that any specific type (kind) -of that generic type is valid. - -For example, a context described in this document as accepting -the @code{COMPLEX} type also is likely to accept the -@code{DOUBLE COMPLEX} type. - -The GNU Fortran language supports three ways to specify -a specific kind of a generic type. - -@menu -* Double Notation:: As in @code{DOUBLE COMPLEX}. -* Star Notation:: As in @code{INTEGER*4}. -* Kind Notation:: As in @code{INTEGER(KIND=1)}. -@end menu - -@node Double Notation -@subsubsection Double Notation - -The GNU Fortran language supports two uses of the keyword -@code{DOUBLE} to specify a specific kind of type: - -@itemize @bullet -@item -@code{DOUBLE PRECISION}, equivalent to @code{REAL(KIND=2)} - -@item -@code{DOUBLE COMPLEX}, equivalent to @code{COMPLEX(KIND=2)} -@end itemize - -Use one of the above forms where a type name is valid. - -While use of this notation is popular, it doesn't scale -well in a language or dialect rich in intrinsic types, -as is the case for the GNU Fortran language (especially -planned future versions of it). - -After all, one rarely sees type names such as @samp{DOUBLE INTEGER}, -@samp{QUADRUPLE REAL}, or @samp{QUARTER INTEGER}. -Instead, @code{INTEGER*8}, @code{REAL*16}, and @code{INTEGER*1} -often are substituted for these, respectively, even though they -do not always have the same meanings on all systems. -(And, the fact that @samp{DOUBLE REAL} does not exist as such -is an inconsistency.) - -Therefore, this document uses ``double notation'' only on occasion -for the benefit of those readers who are accustomed to it. - -@node Star Notation -@subsubsection Star Notation -@cindex *@var{n} notation - -The following notation specifies the storage size for a type: - -@smallexample -@var{generic-type}*@var{n} -@end smallexample - -@noindent -@var{generic-type} must be a generic type---one of -@code{INTEGER}, @code{REAL}, @code{COMPLEX}, @code{LOGICAL}, -or @code{CHARACTER}. -@var{n} must be one or more digits comprising a decimal -integer number greater than zero. - -Use the above form where a type name is valid. - -The @samp{*@var{n}} notation specifies that the amount of storage -occupied by variables and array elements of that type is @var{n} -times the storage occupied by a @code{CHARACTER*1} variable. - -This notation might indicate a different degree of precision and/or -range for such variables and array elements, and the functions that -return values of types using this notation. -It does not limit the precision or range of values of that type -in any particular way---use explicit code to do that. - -Further, the GNU Fortran language requires no particular values -for @var{n} to be supported by an implementation via the @samp{*@var{n}} -notation. -@command{g77} supports @code{INTEGER*1} (as @code{INTEGER(KIND=3)}) -on all systems, for example, -but not all implementations are required to do so, and @command{g77} -is known to not support @code{REAL*1} on most (or all) systems. - -As a result, except for @var{generic-type} of @code{CHARACTER}, -uses of this notation should be limited to isolated -portions of a program that are intended to handle system-specific -tasks and are expected to be non-portable. - -(Standard FORTRAN 77 supports the @samp{*@var{n}} notation for -only @code{CHARACTER}, where it signifies not only the amount -of storage occupied, but the number of characters in entities -of that type. -However, almost all Fortran compilers have supported this -notation for generic types, though with a variety of meanings -for @var{n}.) - -Specifications of types using the @samp{*@var{n}} notation -always are interpreted as specifications of the appropriate -types described in this document using the @samp{KIND=@var{n}} -notation, described below. - -While use of this notation is popular, it doesn't serve well -in the context of a widely portable dialect of Fortran, such as -the GNU Fortran language. - -For example, even on one particular machine, two or more popular -Fortran compilers might well disagree on the size of a type -declared @code{INTEGER*2} or @code{REAL*16}. -Certainly there -is known to be disagreement over such things among Fortran -compilers on @emph{different} systems. - -Further, this notation offers no elegant way to specify sizes -that are not even multiples of the ``byte size'' typically -designated by @code{INTEGER*1}. -Use of ``absurd'' values (such as @code{INTEGER*1000}) would -certainly be possible, but would perhaps be stretching the original -intent of this notation beyond the breaking point in terms -of widespread readability of documentation and code making use -of it. - -Therefore, this document uses ``star notation'' only on occasion -for the benefit of those readers who are accustomed to it. - -@node Kind Notation -@subsubsection Kind Notation -@cindex KIND= notation - -The following notation specifies the kind-type selector of a type: - -@smallexample -@var{generic-type}(KIND=@var{n}) -@end smallexample - -@noindent -Use the above form where a type name is valid. - -@var{generic-type} must be a generic type---one of -@code{INTEGER}, @code{REAL}, @code{COMPLEX}, @code{LOGICAL}, -or @code{CHARACTER}. -@var{n} must be an integer initialization expression that -is a positive, nonzero value. - -Programmers are discouraged from writing these values directly -into their code. -Future versions of the GNU Fortran language will offer -facilities that will make the writing of code portable -to @command{g77} @emph{and} Fortran 90 implementations simpler. - -However, writing code that ports to existing FORTRAN 77 -implementations depends on avoiding the @samp{KIND=} construct. - -The @samp{KIND=} construct is thus useful in the context -of GNU Fortran for two reasons: - -@itemize @bullet -@item -It provides a means to specify a type in a fashion that -is portable across all GNU Fortran implementations (though -not other FORTRAN 77 and Fortran 90 implementations). - -@item -It provides a sort of Rosetta stone for this document to use -to concisely describe the types of various operations and -operands. -@end itemize - -The values of @var{n} in the GNU Fortran language are -assigned using a scheme that: - -@itemize @bullet -@item -Attempts to maximize the ability of readers -of this document to quickly familiarize themselves -with assignments for popular types - -@item -Provides a unique value for each specific desired -meaning - -@item -Provides a means to automatically assign new values so -they have a ``natural'' relationship to existing values, -if appropriate, or, if no such relationship exists, will -not interfere with future values assigned on the basis -of such relationships - -@item -Avoids using values that are similar to values used -in the existing, popular @samp{*@var{n}} notation, -to prevent readers from expecting that these implied -correspondences work on all GNU Fortran implementations -@end itemize - -The assignment system accomplishes this by assigning -to each ``fundamental meaning'' of a specific type a -unique prime number. -Combinations of fundamental meanings---for example, a type -that is two times the size of some other type---are assigned -values of @var{n} that are the products of the values for -those fundamental meanings. - -A prime value of @var{n} is never given more than one fundamental -meaning, to avoid situations where some code or system -cannot reasonably provide those meanings in the form of a -single type. - -The values of @var{n} assigned so far are: - -@table @code -@item KIND=0 -This value is reserved for future use. - -The planned future use is for this value to designate, -explicitly, context-sensitive kind-type selection. -For example, the expression @samp{1D0 * 0.1_0} would -be equivalent to @samp{1D0 * 0.1D0}. - -@item KIND=1 -This corresponds to the default types for -@code{REAL}, @code{INTEGER}, @code{LOGICAL}, @code{COMPLEX}, -and @code{CHARACTER}, as appropriate. - -These are the ``default'' types described in the Fortran 90 standard, -though that standard does not assign any particular @samp{KIND=} -value to these types. - -(Typically, these are @code{REAL*4}, @code{INTEGER*4}, -@code{LOGICAL*4}, and @code{COMPLEX*8}.) - -@item KIND=2 -This corresponds to types that occupy twice as much -storage as the default types. -@code{REAL(KIND=2)} is @code{DOUBLE PRECISION} (typically @code{REAL*8}), -@code{COMPLEX(KIND=2)} is @code{DOUBLE COMPLEX} (typically @code{COMPLEX*16}), - -These are the ``double precision'' types described in the Fortran 90 -standard, -though that standard does not assign any particular @samp{KIND=} -value to these types. - -@var{n} of 4 thus corresponds to types that occupy four times -as much storage as the default types, @var{n} of 8 to types that -occupy eight times as much storage, and so on. - -The @code{INTEGER(KIND=2)} and @code{LOGICAL(KIND=2)} types -are not necessarily supported by every GNU Fortran implementation. - -@item KIND=3 -This corresponds to types that occupy as much -storage as the default @code{CHARACTER} type, -which is the same effective type as @code{CHARACTER(KIND=1)} -(making that type effectively the same as @code{CHARACTER(KIND=3)}). - -(Typically, these are @code{INTEGER*1} and @code{LOGICAL*1}.) - -@var{n} of 6 thus corresponds to types that occupy twice as -much storage as the @var{n}=3 types, @var{n} of 12 to types -that occupy four times as much storage, and so on. - -These are not necessarily supported by every GNU Fortran -implementation. - -@item KIND=5 -This corresponds to types that occupy half the -storage as the default (@var{n}=1) types. - -(Typically, these are @code{INTEGER*2} and @code{LOGICAL*2}.) - -@var{n} of 25 thus corresponds to types that occupy one-quarter -as much storage as the default types. - -These are not necessarily supported by every GNU Fortran -implementation. - -@item KIND=7 -@cindex pointers -This is valid only as @code{INTEGER(KIND=7)} and -denotes the @code{INTEGER} type that has the smallest -storage size that holds a pointer on the system. - -A pointer representable by this type is capable of uniquely -addressing a @code{CHARACTER*1} variable, array, array element, -or substring. - -(Typically this is equivalent to @code{INTEGER*4} or, -on 64-bit systems, @code{INTEGER*8}. -In a compatible C implementation, it typically would -be the same size and semantics of the C type @code{void *}.) -@end table - -Note that these are @emph{proposed} correspondences and might change -in future versions of @command{g77}---avoid writing code depending -on them while @command{g77}, and therefore the GNU Fortran language -it defines, is in beta testing. - -Values not specified in the above list are reserved to -future versions of the GNU Fortran language. - -Implementation-dependent meanings will be assigned new, -unique prime numbers so as to not interfere with other -implementation-dependent meanings, and offer the possibility -of increasing the portability of code depending on such -types by offering support for them in other GNU Fortran -implementations. - -Other meanings that might be given unique values are: - -@itemize @bullet -@item -Types that make use of only half their storage size for -representing precision and range. - -For example, some compilers offer options that cause -@code{INTEGER} types to occupy the amount of storage -that would be needed for @code{INTEGER(KIND=2)} types, but the -range remains that of @code{INTEGER(KIND=1)}. - -@item -The IEEE single floating-point type. - -@item -Types with a specific bit pattern (endianness), such as the -little-endian form of @code{INTEGER(KIND=1)}. -These could permit, conceptually, use of portable code and -implementations on data files written by existing systems. -@end itemize - -Future @emph{prime} numbers should be given meanings in as incremental -a fashion as possible, to allow for flexibility and -expressiveness in combining types. - -For example, instead of defining a prime number for little-endian -IEEE doubles, one prime number might be assigned the meaning -``little-endian'', another the meaning ``IEEE double'', and the -value of @var{n} for a little-endian IEEE double would thus -naturally be the product of those two respective assigned values. -(It could even be reasonable to have IEEE values result from the -products of prime values denoting exponent and fraction sizes -and meanings, hidden bit usage, availability and representations -of special values such as subnormals, infinities, and Not-A-Numbers -(NaNs), and so on.) - -This assignment mechanism, while not inherently required for -future versions of the GNU Fortran language, is worth using -because it could ease management of the ``space'' of supported -types much easier in the long run. - -The above approach suggests a mechanism for specifying inheritance -of intrinsic (built-in) types for an entire, widely portable -product line. -It is certainly reasonable that, unlike programmers of other languages -offering inheritance mechanisms that employ verbose names for classes -and subclasses, along with graphical browsers to elucidate the -relationships, Fortran programmers would employ -a mechanism that works by multiplying prime numbers together -and finding the prime factors of such products. - -Most of the advantages for the above scheme have been explained -above. -One disadvantage is that it could lead to the defining, -by the GNU Fortran language, of some fairly large prime numbers. -This could lead to the GNU Fortran language being declared -``munitions'' by the United States Department of Defense. - -@node Constants -@subsection Constants -@cindex constants -@cindex types, constants - -(Corresponds to Section 4.2 of ANSI X3.9-1978 FORTRAN 77.) - -A @dfn{typeless constant} has one of the following forms: - -@smallexample -'@var{binary-digits}'B -'@var{octal-digits}'O -'@var{hexadecimal-digits}'Z -'@var{hexadecimal-digits}'X -@end smallexample - -@noindent -@var{binary-digits}, @var{octal-digits}, and @var{hexadecimal-digits} -are nonempty strings of characters in the set @samp{01}, @samp{01234567}, -and @samp{0123456789ABCDEFabcdef}, respectively. -(The value for @samp{A} (and @samp{a}) is 10, for @samp{B} and @samp{b} -is 11, and so on.) - -A prefix-radix constant, such as @samp{Z'ABCD'}, can optionally be -treated as typeless. @xref{Fortran Dialect Options,, Options -Controlling Fortran Dialect}, for information on the -@option{-ftypeless-boz} option. - -Typeless constants have values that depend on the context in which -they are used. - -All other constants, called @dfn{typed constants}, are interpreted---converted -to internal form---according to their inherent type. -Thus, context is @emph{never} a determining factor for the type, and hence -the interpretation, of a typed constant. -(All constants in the ANSI FORTRAN 77 language are typed constants.) - -For example, @samp{1} is always type @code{INTEGER(KIND=1)} in GNU -Fortran (called default INTEGER in Fortran 90), -@samp{9.435784839284958} is always type @code{REAL(KIND=1)} (even if the -additional precision specified is lost, and even when used in a -@code{REAL(KIND=2)} context), @samp{1E0} is always type @code{REAL(KIND=2)}, -and @samp{1D0} is always type @code{REAL(KIND=2)}. - -@node Integer Type -@subsection Integer Type - -(Corresponds to Section 4.3 of ANSI X3.9-1978 FORTRAN 77.) - -An integer constant also may have one of the following forms: - -@smallexample -B'@var{binary-digits}' -O'@var{octal-digits}' -Z'@var{hexadecimal-digits}' -X'@var{hexadecimal-digits}' -@end smallexample - -@noindent -@var{binary-digits}, @var{octal-digits}, and @var{hexadecimal-digits} -are nonempty strings of characters in the set @samp{01}, @samp{01234567}, -and @samp{0123456789ABCDEFabcdef}, respectively. -(The value for @samp{A} (and @samp{a}) is 10, for @samp{B} and @samp{b} -is 11, and so on.) - -@node Character Type -@subsection Character Type - -(Corresponds to Section 4.8 of ANSI X3.9-1978 FORTRAN 77.) - -@cindex double quoted character constants -A character constant may be delimited by a pair of double quotes -(@samp{"}) instead of apostrophes. -In this case, an apostrophe within the constant represents -a single apostrophe, while a double quote is represented in -the source text of the constant by two consecutive double -quotes with no intervening spaces. - -@cindex zero-length CHARACTER -@cindex null CHARACTER strings -@cindex empty CHARACTER strings -@cindex strings, empty -@cindex CHARACTER, null -A character constant may be empty (have a length of zero). - -A character constant may include a substring specification, -The value of such a constant is the value of the substring---for -example, the value of @samp{'hello'(3:5)} is the same -as the value of @samp{'llo'}. - -@node Expressions -@section Expressions - -(The following information augments or overrides the information in -Chapter 6 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 6 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -@menu -* %LOC():: -@end menu - -@node %LOC() -@subsection The @code{%LOC()} Construct -@cindex %LOC() construct - -@example -%LOC(@var{arg}) -@end example - -The @code{%LOC()} construct is an expression -that yields the value of the location of its argument, -@var{arg}, in memory. -The size of the type of the expression depends on the system---typically, -it is equivalent to either @code{INTEGER(KIND=1)} or @code{INTEGER(KIND=2)}, -though it is actually type @code{INTEGER(KIND=7)}. - -The argument to @code{%LOC()} must be suitable as the -left-hand side of an assignment statement. -That is, it may not be a general expression involving -operators such as addition, subtraction, and so on, -nor may it be a constant. - -Use of @code{%LOC()} is recommended only for code that -is accessing facilities outside of GNU Fortran, such as -operating system or windowing facilities. -It is best to constrain such uses to isolated portions of -a program---portions that deal specifically and exclusively -with low-level, system-dependent facilities. -Such portions might well provide a portable interface for -use by the program as a whole, but are themselves not -portable, and should be thoroughly tested each time they -are rebuilt using a new compiler or version of a compiler. - -Do not depend on @code{%LOC()} returning a pointer that -can be safely used to @emph{define} (change) the argument. -While this might work in some circumstances, it is hard -to predict whether it will continue to work when a program -(that works using this unsafe behavior) -is recompiled using different command-line options or -a different version of @command{g77}. - -Generally, @code{%LOC()} is safe when used as an argument -to a procedure that makes use of the value of the corresponding -dummy argument only during its activation, and only when -such use is restricted to referencing (reading) the value -of the argument to @code{%LOC()}. - -@emph{Implementation Note:} Currently, @command{g77} passes -arguments (those not passed using a construct such as @code{%VAL()}) -by reference or descriptor, depending on the type of -the actual argument. -Thus, given @samp{INTEGER I}, @samp{CALL FOO(I)} would -seem to mean the same thing as @samp{CALL FOO(%VAL(%LOC(I)))}, and -in fact might compile to identical code. - -However, @samp{CALL FOO(%VAL(%LOC(I)))} emphatically means -``pass, by value, the address of @samp{I} in memory''. -While @samp{CALL FOO(I)} might use that same approach in a -particular version of @command{g77}, another version or compiler -might choose a different implementation, such as copy-in/copy-out, -to effect the desired behavior---and which will therefore not -necessarily compile to the same code as would -@samp{CALL FOO(%VAL(%LOC(I)))} -using the same version or compiler. - -@xref{Debugging and Interfacing}, for detailed information on -how this particular version of @command{g77} implements various -constructs. - -@node Specification Statements -@section Specification Statements - -(The following information augments or overrides the information in -Chapter 8 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 8 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -@menu -* NAMELIST:: -* DOUBLE COMPLEX:: -@end menu - -@node NAMELIST -@subsection @code{NAMELIST} Statement -@cindex NAMELIST statement -@cindex statements, NAMELIST - -The @code{NAMELIST} statement, and related I/O constructs, are -supported by the GNU Fortran language in essentially the same -way as they are by @command{f2c}. - -This follows Fortran 90 with the restriction that on @code{NAMELIST} -input, subscripts must have the form -@smallexample -@var{subscript} [ @code{:} @var{subscript} [ @code{:} @var{stride}]] -@end smallexample -i.e.@: -@smallexample -&xx x(1:3,8:10:2)=1,2,3,4,5,6/ -@end smallexample -is allowed, but not, say, -@smallexample -&xx x(:3,8::2)=1,2,3,4,5,6/ -@end smallexample - -As an extension of the Fortran 90 form, @code{$} and @code{$END} may be -used in place of @code{&} and @code{/} in @code{NAMELIST} input, so that -@smallexample -$&xx x(1:3,8:10:2)=1,2,3,4,5,6 $end -@end smallexample -could be used instead of the example above. - -@node DOUBLE COMPLEX -@subsection @code{DOUBLE COMPLEX} Statement -@cindex DOUBLE COMPLEX - -@code{DOUBLE COMPLEX} is a type-statement (and type) that -specifies the type @code{COMPLEX(KIND=2)} in GNU Fortran. - -@node Control Statements -@section Control Statements - -(The following information augments or overrides the information in -Chapter 11 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 11 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -@menu -* DO WHILE:: -* END DO:: -* Construct Names:: -* CYCLE and EXIT:: -@end menu - -@node DO WHILE -@subsection DO WHILE -@cindex DO WHILE -@cindex DO -@cindex MIL-STD 1753 - -The @code{DO WHILE} statement, a feature of both the MIL-STD 1753 and -Fortran 90 standards, is provided by the GNU Fortran language. -The Fortran 90 ``do forever'' statement comprising just @code{DO} is -also supported. - -@node END DO -@subsection END DO -@cindex END DO -@cindex MIL-STD 1753 - -The @code{END DO} statement is provided by the GNU Fortran language. - -This statement is used in one of two ways: - -@itemize @bullet -@item -The Fortran 90 meaning, in which it specifies the termination -point of a single @code{DO} loop started with a @code{DO} statement -that specifies no termination label. - -@item -The MIL-STD 1753 meaning, in which it specifies the termination -point of one or more @code{DO} loops, all of which start with a -@code{DO} statement that specify the label defined for the -@code{END DO} statement. - -This kind of @code{END DO} statement is merely a synonym for -@code{CONTINUE}, except it is permitted only when the statement -is labeled and a target of one or more labeled @code{DO} loops. - -It is expected that this use of @code{END DO} will be removed from -the GNU Fortran language in the future, though it is likely that -it will long be supported by @command{g77} as a dialect form. -@end itemize - -@node Construct Names -@subsection Construct Names -@cindex construct names - -The GNU Fortran language supports construct names as defined -by the Fortran 90 standard. -These names are local to the program unit and are defined -as follows: - -@smallexample -@var{construct-name}: @var{block-statement} -@end smallexample - -@noindent -Here, @var{construct-name} is the construct name itself; -its definition is connoted by the single colon (@samp{:}); and -@var{block-statement} is an @code{IF}, @code{DO}, -or @code{SELECT CASE} statement that begins a block. - -A block that is given a construct name must also specify the -same construct name in its termination statement: - -@example -END @var{block} @var{construct-name} -@end example - -@noindent -Here, @var{block} must be @code{IF}, @code{DO}, or @code{SELECT}, -as appropriate. - -@node CYCLE and EXIT -@subsection The @code{CYCLE} and @code{EXIT} Statements - -@cindex CYCLE statement -@cindex EXIT statement -@cindex statements, CYCLE -@cindex statements, EXIT -The @code{CYCLE} and @code{EXIT} statements specify that -the remaining statements in the current iteration of a -particular active (enclosing) @code{DO} loop are to be skipped. - -@code{CYCLE} specifies that these statements are skipped, -but the @code{END DO} statement that marks the end of the -@code{DO} loop be executed---that is, the next iteration, -if any, is to be started. -If the statement marking the end of the @code{DO} loop is -not @code{END DO}---in other words, if the loop is not -a block @code{DO}---the @code{CYCLE} statement does not -execute that statement, but does start the next iteration (if any). - -@code{EXIT} specifies that the loop specified by the -@code{DO} construct is terminated. - -The @code{DO} loop affected by @code{CYCLE} and @code{EXIT} -is the innermost enclosing @code{DO} loop when the following -forms are used: - -@example -CYCLE -EXIT -@end example - -Otherwise, the following forms specify the construct name -of the pertinent @code{DO} loop: - -@example -CYCLE @var{construct-name} -EXIT @var{construct-name} -@end example - -@code{CYCLE} and @code{EXIT} can be viewed as glorified @code{GO TO} -statements. -However, they cannot be easily thought of as @code{GO TO} statements -in obscure cases involving FORTRAN 77 loops. -For example: - -@smallexample - DO 10 I = 1, 5 - DO 10 J = 1, 5 - IF (J .EQ. 5) EXIT - DO 10 K = 1, 5 - IF (K .EQ. 3) CYCLE -10 PRINT *, 'I=', I, ' J=', J, ' K=', K -20 CONTINUE -@end smallexample - -@noindent -In particular, neither the @code{EXIT} nor @code{CYCLE} statements -above are equivalent to a @code{GO TO} statement to either label -@samp{10} or @samp{20}. - -To understand the effect of @code{CYCLE} and @code{EXIT} in the -above fragment, it is helpful to first translate it to its equivalent -using only block @code{DO} loops: - -@smallexample - DO I = 1, 5 - DO J = 1, 5 - IF (J .EQ. 5) EXIT - DO K = 1, 5 - IF (K .EQ. 3) CYCLE -10 PRINT *, 'I=', I, ' J=', J, ' K=', K - END DO - END DO - END DO -20 CONTINUE -@end smallexample - -Adding new labels allows translation of @code{CYCLE} and @code{EXIT} -to @code{GO TO} so they may be more easily understood by programmers -accustomed to FORTRAN coding: - -@smallexample - DO I = 1, 5 - DO J = 1, 5 - IF (J .EQ. 5) GOTO 18 - DO K = 1, 5 - IF (K .EQ. 3) GO TO 12 -10 PRINT *, 'I=', I, ' J=', J, ' K=', K -12 END DO - END DO -18 END DO -20 CONTINUE -@end smallexample - -@noindent -Thus, the @code{CYCLE} statement in the innermost loop skips over -the @code{PRINT} statement as it begins the next iteration of the -loop, while the @code{EXIT} statement in the middle loop ends that -loop but @emph{not} the outermost loop. - -@node Functions and Subroutines -@section Functions and Subroutines - -(The following information augments or overrides the information in -Chapter 15 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 15 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -@menu -* %VAL():: -* %REF():: -* %DESCR():: -* Generics and Specifics:: -* REAL() and AIMAG() of Complex:: -* CMPLX() of DOUBLE PRECISION:: -* MIL-STD 1753:: -* f77/f2c Intrinsics:: -* Table of Intrinsic Functions:: -@end menu - -@node %VAL() -@subsection The @code{%VAL()} Construct -@cindex %VAL() construct - -@example -%VAL(@var{arg}) -@end example - -The @code{%VAL()} construct specifies that an argument, -@var{arg}, is to be passed by value, instead of by reference -or descriptor. - -@code{%VAL()} is restricted to actual arguments in -invocations of external procedures. - -Use of @code{%VAL()} is recommended only for code that -is accessing facilities outside of GNU Fortran, such as -operating system or windowing facilities. -It is best to constrain such uses to isolated portions of -a program---portions the deal specifically and exclusively -with low-level, system-dependent facilities. -Such portions might well provide a portable interface for -use by the program as a whole, but are themselves not -portable, and should be thoroughly tested each time they -are rebuilt using a new compiler or version of a compiler. - -@emph{Implementation Note:} Currently, @command{g77} passes -all arguments either by reference or by descriptor. - -Thus, use of @code{%VAL()} tends to be restricted to cases -where the called procedure is written in a language other -than Fortran that supports call-by-value semantics. -(C is an example of such a language.) - -@xref{Procedures,,Procedures (SUBROUTINE and FUNCTION)}, -for detailed information on -how this particular version of @command{g77} passes arguments -to procedures. - -@node %REF() -@subsection The @code{%REF()} Construct -@cindex %REF() construct - -@example -%REF(@var{arg}) -@end example - -The @code{%REF()} construct specifies that an argument, -@var{arg}, is to be passed by reference, instead of by -value or descriptor. - -@code{%REF()} is restricted to actual arguments in -invocations of external procedures. - -Use of @code{%REF()} is recommended only for code that -is accessing facilities outside of GNU Fortran, such as -operating system or windowing facilities. -It is best to constrain such uses to isolated portions of -a program---portions the deal specifically and exclusively -with low-level, system-dependent facilities. -Such portions might well provide a portable interface for -use by the program as a whole, but are themselves not -portable, and should be thoroughly tested each time they -are rebuilt using a new compiler or version of a compiler. - -Do not depend on @code{%REF()} supplying a pointer to the -procedure being invoked. -While that is a likely implementation choice, other -implementation choices are available that preserve Fortran -pass-by-reference semantics without passing a pointer to -the argument, @var{arg}. -(For example, a copy-in/copy-out implementation.) - -@emph{Implementation Note:} Currently, @command{g77} passes -all arguments -(other than variables and arrays of type @code{CHARACTER}) -by reference. -Future versions of, or dialects supported by, @command{g77} might -not pass @code{CHARACTER} functions by reference. - -Thus, use of @code{%REF()} tends to be restricted to cases -where @var{arg} is type @code{CHARACTER} but the called -procedure accesses it via a means other than the method -used for Fortran @code{CHARACTER} arguments. - -@xref{Procedures,,Procedures (SUBROUTINE and FUNCTION)}, for detailed information on -how this particular version of @command{g77} passes arguments -to procedures. - -@node %DESCR() -@subsection The @code{%DESCR()} Construct -@cindex %DESCR() construct - -@example -%DESCR(@var{arg}) -@end example - -The @code{%DESCR()} construct specifies that an argument, -@var{arg}, is to be passed by descriptor, instead of by -value or reference. - -@code{%DESCR()} is restricted to actual arguments in -invocations of external procedures. - -Use of @code{%DESCR()} is recommended only for code that -is accessing facilities outside of GNU Fortran, such as -operating system or windowing facilities. -It is best to constrain such uses to isolated portions of -a program---portions the deal specifically and exclusively -with low-level, system-dependent facilities. -Such portions might well provide a portable interface for -use by the program as a whole, but are themselves not -portable, and should be thoroughly tested each time they -are rebuilt using a new compiler or version of a compiler. - -Do not depend on @code{%DESCR()} supplying a pointer -and/or a length passed by value -to the procedure being invoked. -While that is a likely implementation choice, other -implementation choices are available that preserve the -pass-by-reference semantics without passing a pointer to -the argument, @var{arg}. -(For example, a copy-in/copy-out implementation.) -And, future versions of @command{g77} might change the -way descriptors are implemented, such as passing a -single argument pointing to a record containing the -pointer/length information instead of passing that same -information via two arguments as it currently does. - -@emph{Implementation Note:} Currently, @command{g77} passes -all variables and arrays of type @code{CHARACTER} -by descriptor. -Future versions of, or dialects supported by, @command{g77} might -pass @code{CHARACTER} functions by descriptor as well. - -Thus, use of @code{%DESCR()} tends to be restricted to cases -where @var{arg} is not type @code{CHARACTER} but the called -procedure accesses it via a means similar to the method -used for Fortran @code{CHARACTER} arguments. - -@xref{Procedures,,Procedures (SUBROUTINE and FUNCTION)}, for detailed information on -how this particular version of @command{g77} passes arguments -to procedures. - -@node Generics and Specifics -@subsection Generics and Specifics -@cindex generic intrinsics -@cindex intrinsics, generic - -The ANSI FORTRAN 77 language defines generic and specific -intrinsics. -In short, the distinctions are: - -@itemize @bullet -@item -@emph{Specific} intrinsics have -specific types for their arguments and a specific return -type. - -@item -@emph{Generic} intrinsics are treated, -on a case-by-case basis in the program's source code, -as one of several possible specific intrinsics. - -Typically, a generic intrinsic has a return type that -is determined by the type of one or more of its arguments. -@end itemize - -The GNU Fortran language generalizes these concepts somewhat, -especially by providing intrinsic subroutines and generic -intrinsics that are treated as either a specific intrinsic subroutine -or a specific intrinsic function (e.g. @code{SECOND}). - -However, GNU Fortran avoids generalizing this concept to -the point where existing code would be accepted as meaning -something possibly different than what was intended. - -For example, @code{ABS} is a generic intrinsic, so all working -code written using @code{ABS} of an @code{INTEGER} argument -expects an @code{INTEGER} return value. -Similarly, all such code expects that @code{ABS} of an @code{INTEGER*2} -argument returns an @code{INTEGER*2} return value. - -Yet, @code{IABS} is a @emph{specific} intrinsic that accepts only -an @code{INTEGER(KIND=1)} argument. -Code that passes something other than an @code{INTEGER(KIND=1)} -argument to @code{IABS} is not valid GNU Fortran code, because -it is not clear what the author intended. - -For example, if @samp{J} is @code{INTEGER(KIND=6)}, @samp{IABS(J)} -is not defined by the GNU Fortran language, because the programmer -might have used that construct to mean any of the following, subtly -different, things: - -@itemize @bullet -@item -Convert @samp{J} to @code{INTEGER(KIND=1)} first -(as if @samp{IABS(INT(J))} had been written). - -@item -Convert the result of the intrinsic to @code{INTEGER(KIND=1)} -(as if @samp{INT(ABS(J))} had been written). - -@item -No conversion (as if @samp{ABS(J)} had been written). -@end itemize - -The distinctions matter especially when types and values wider than -@code{INTEGER(KIND=1)} (such as @code{INTEGER(KIND=2)}), or when -operations performing more ``arithmetic'' than absolute-value, are involved. - -The following sample program is not a valid GNU Fortran program, but -might be accepted by other compilers. -If so, the output is likely to be revealing in terms of how a given -compiler treats intrinsics (that normally are specific) when they -are given arguments that do not conform to their stated requirements: - -@cindex JCB002 program -@smallexample - PROGRAM JCB002 -C Version 1: -C Modified 1999-02-15 (Burley) to delete my email address. -C Modified 1997-05-21 (Burley) to accommodate compilers that implement -C INT(I1-I2) as INT(I1)-INT(I2) given INTEGER*2 I1,I2. -C -C Version 0: -C Written by James Craig Burley 1997-02-20. -C -C Purpose: -C Determine how compilers handle non-standard IDIM -C on INTEGER*2 operands, which presumably can be -C extrapolated into understanding how the compiler -C generally treats specific intrinsics that are passed -C arguments not of the correct types. -C -C If your compiler implements INTEGER*2 and INTEGER -C as the same type, change all INTEGER*2 below to -C INTEGER*1. -C - INTEGER*2 I0, I4 - INTEGER I1, I2, I3 - INTEGER*2 ISMALL, ILARGE - INTEGER*2 ITOOLG, ITWO - INTEGER*2 ITMP - LOGICAL L2, L3, L4 -C -C Find smallest INTEGER*2 number. -C - ISMALL=0 - 10 I0 = ISMALL-1 - IF ((I0 .GE. ISMALL) .OR. (I0+1 .NE. ISMALL)) GOTO 20 - ISMALL = I0 - GOTO 10 - 20 CONTINUE -C -C Find largest INTEGER*2 number. -C - ILARGE=0 - 30 I0 = ILARGE+1 - IF ((I0 .LE. ILARGE) .OR. (I0-1 .NE. ILARGE)) GOTO 40 - ILARGE = I0 - GOTO 30 - 40 CONTINUE -C -C Multiplying by two adds stress to the situation. -C - ITWO = 2 -C -C Need a number that, added to -2, is too wide to fit in I*2. -C - ITOOLG = ISMALL -C -C Use IDIM the straightforward way. -C - I1 = IDIM (ILARGE, ISMALL) * ITWO + ITOOLG -C -C Calculate result for first interpretation. -C - I2 = (INT (ILARGE) - INT (ISMALL)) * ITWO + ITOOLG -C -C Calculate result for second interpretation. -C - ITMP = ILARGE - ISMALL - I3 = (INT (ITMP)) * ITWO + ITOOLG -C -C Calculate result for third interpretation. -C - I4 = (ILARGE - ISMALL) * ITWO + ITOOLG -C -C Print results. -C - PRINT *, 'ILARGE=', ILARGE - PRINT *, 'ITWO=', ITWO - PRINT *, 'ITOOLG=', ITOOLG - PRINT *, 'ISMALL=', ISMALL - PRINT *, 'I1=', I1 - PRINT *, 'I2=', I2 - PRINT *, 'I3=', I3 - PRINT *, 'I4=', I4 - PRINT * - L2 = (I1 .EQ. I2) - L3 = (I1 .EQ. I3) - L4 = (I1 .EQ. I4) - IF (L2 .AND. .NOT.L3 .AND. .NOT.L4) THEN - PRINT *, 'Interp 1: IDIM(I*2,I*2) => IDIM(INT(I*2),INT(I*2))' - STOP - END IF - IF (L3 .AND. .NOT.L2 .AND. .NOT.L4) THEN - PRINT *, 'Interp 2: IDIM(I*2,I*2) => INT(DIM(I*2,I*2))' - STOP - END IF - IF (L4 .AND. .NOT.L2 .AND. .NOT.L3) THEN - PRINT *, 'Interp 3: IDIM(I*2,I*2) => DIM(I*2,I*2)' - STOP - END IF - PRINT *, 'Results need careful analysis.' - END -@end smallexample - -No future version of the GNU Fortran language -will likely permit specific intrinsic invocations with wrong-typed -arguments (such as @code{IDIM} in the above example), since -it has been determined that disagreements exist among -many production compilers on the interpretation of -such invocations. -These disagreements strongly suggest that Fortran programmers, -and certainly existing Fortran programs, disagree about the -meaning of such invocations. - -The first version of @code{JCB002} didn't accommodate some compilers' -treatment of @samp{INT(I1-I2)} where @samp{I1} and @samp{I2} are -@code{INTEGER*2}. -In such a case, these compilers apparently convert both -operands to @code{INTEGER*4} and then do an @code{INTEGER*4} subtraction, -instead of doing an @code{INTEGER*2} subtraction on the -original values in @samp{I1} and @samp{I2}. - -However, the results of the careful analyses done on the outputs -of programs compiled by these various compilers show that they -all implement either @samp{Interp 1} or @samp{Interp 2} above. - -Specifically, it is believed that the new version of @code{JCB002} -above will confirm that: - -@itemize @bullet -@item -Digital Semiconductor (``DEC'') Alpha OSF/1, HP-UX 10.0.1, AIX 3.2.5 -@command{f77} compilers all implement @samp{Interp 1}. - -@item -IRIX 5.3 @command{f77} compiler implements @samp{Interp 2}. - -@item -Solaris 2.5, SunOS 4.1.3, DECstation ULTRIX 4.3, -and IRIX 6.1 @command{f77} compilers all implement @samp{Interp 3}. -@end itemize - -If you get different results than the above for the stated -compilers, or have results for other compilers that might be -worth adding to the above list, please let us know the details -(compiler product, version, machine, results, and so on). - -@node REAL() and AIMAG() of Complex -@subsection @code{REAL()} and @code{AIMAG()} of Complex -@cindex @code{Real} intrinsic -@cindex intrinsics, @code{Real} -@cindex @code{AImag} intrinsic -@cindex intrinsics, @code{AImag} - -The GNU Fortran language disallows @code{REAL(@var{expr})} -and @code{AIMAG(@var{expr})}, -where @var{expr} is any @code{COMPLEX} type other than @code{COMPLEX(KIND=1)}, -except when they are used in the following way: - -@example -REAL(REAL(@var{expr})) -REAL(AIMAG(@var{expr})) -@end example - -@noindent -The above forms explicitly specify that the desired effect -is to convert the real or imaginary part of @var{expr}, which might -be some @code{REAL} type other than @code{REAL(KIND=1)}, -to type @code{REAL(KIND=1)}, -and have that serve as the value of the expression. - -The GNU Fortran language offers clearly named intrinsics to extract the -real and imaginary parts of a complex entity without any -conversion: - -@example -REALPART(@var{expr}) -IMAGPART(@var{expr}) -@end example - -To express the above using typical extended FORTRAN 77, -use the following constructs -(when @var{expr} is @code{COMPLEX(KIND=2)}): - -@example -DBLE(@var{expr}) -DIMAG(@var{expr}) -@end example - -The FORTRAN 77 language offers no way -to explicitly specify the real and imaginary parts of a complex expression of -arbitrary type, apparently as a result of requiring support for -only one @code{COMPLEX} type (@code{COMPLEX(KIND=1)}). -The concepts of converting an expression to type @code{REAL(KIND=1)} and -of extracting the real part of a complex expression were -thus ``smooshed'' by FORTRAN 77 into a single intrinsic, since -they happened to have the exact same effect in that language -(due to having only one @code{COMPLEX} type). - -@emph{Note:} When @option{-ff90} is in effect, -@command{g77} treats @samp{REAL(@var{expr})}, where @var{expr} is of -type @code{COMPLEX}, as @samp{REALPART(@var{expr})}, -whereas with @samp{-fugly-complex -fno-f90} in effect, it is -treated as @samp{REAL(REALPART(@var{expr}))}. - -@xref{Ugly Complex Part Extraction}, for more information. - -@node CMPLX() of DOUBLE PRECISION -@subsection @code{CMPLX()} of @code{DOUBLE PRECISION} -@cindex @code{Cmplx} intrinsic -@cindex intrinsics, @code{Cmplx} - -In accordance with Fortran 90 and at least some (perhaps all) -other compilers, the GNU Fortran language defines @code{CMPLX()} -as always returning a result that is type @code{COMPLEX(KIND=1)}. - -This means @samp{CMPLX(D1,D2)}, where @samp{D1} and @samp{D2} -are @code{REAL(KIND=2)} (@code{DOUBLE PRECISION}), is treated as: - -@example -CMPLX(SNGL(D1), SNGL(D2)) -@end example - -(It was necessary for Fortran 90 to specify this behavior -for @code{DOUBLE PRECISION} arguments, since that is -the behavior mandated by FORTRAN 77.) - -The GNU Fortran language also provides the @code{DCMPLX()} intrinsic, -which is provided by some FORTRAN 77 compilers to construct -a @code{DOUBLE COMPLEX} entity from of @code{DOUBLE PRECISION} -operands. -However, this solution does not scale well when more @code{COMPLEX} types -(having various precisions and ranges) are offered by Fortran implementations. - -Fortran 90 extends the @code{CMPLX()} intrinsic by adding -an extra argument used to specify the desired kind of complex -result. -However, this solution is somewhat awkward to use, and -@command{g77} currently does not support it. - -The GNU Fortran language provides a simple way to build a complex -value out of two numbers, with the precise type of the value -determined by the types of the two numbers (via the usual -type-promotion mechanism): - -@example -COMPLEX(@var{real}, @var{imag}) -@end example - -When @var{real} and @var{imag} are the same @code{REAL} types, @code{COMPLEX()} -performs no conversion other than to put them together to form a -complex result of the same (complex version of real) type. - -@xref{Complex Intrinsic}, for more information. - -@node MIL-STD 1753 -@subsection MIL-STD 1753 Support -@cindex MIL-STD 1753 - -The GNU Fortran language includes the MIL-STD 1753 intrinsics -@code{BTEST}, @code{IAND}, @code{IBCLR}, @code{IBITS}, -@code{IBSET}, @code{IEOR}, @code{IOR}, @code{ISHFT}, -@code{ISHFTC}, @code{MVBITS}, and @code{NOT}. - -@node f77/f2c Intrinsics -@subsection @command{f77}/@command{f2c} Intrinsics - -The bit-manipulation intrinsics supported by traditional -@command{f77} and by @command{f2c} are available in the GNU Fortran language. -These include @code{AND}, @code{LSHIFT}, @code{OR}, @code{RSHIFT}, -and @code{XOR}. - -Also supported are the intrinsics @code{CDABS}, -@code{CDCOS}, @code{CDEXP}, @code{CDLOG}, @code{CDSIN}, -@code{CDSQRT}, @code{DCMPLX}, @code{DCONJG}, @code{DFLOAT}, -@code{DIMAG}, @code{DREAL}, and @code{IMAG}, -@code{ZABS}, @code{ZCOS}, @code{ZEXP}, @code{ZLOG}, @code{ZSIN}, -and @code{ZSQRT}. - -@node Table of Intrinsic Functions -@subsection Table of Intrinsic Functions -@cindex intrinsics, table of -@cindex table of intrinsics - -(Corresponds to Section 15.10 of ANSI X3.9-1978 FORTRAN 77.) - -The GNU Fortran language adds various functions, subroutines, types, -and arguments to the set of intrinsic functions in ANSI FORTRAN 77. -The complete set of intrinsics supported by the GNU Fortran language -is described below. - -Note that a name is not treated as that of an intrinsic if it is -specified in an @code{EXTERNAL} statement in the same program unit; -if a command-line option is used to disable the groups to which -the intrinsic belongs; or if the intrinsic is not named in an -@code{INTRINSIC} statement and a command-line option is used to -hide the groups to which the intrinsic belongs. - -So, it is recommended that any reference in a program unit to -an intrinsic procedure that is not a standard FORTRAN 77 -intrinsic be accompanied by an appropriate @code{INTRINSIC} -statement in that program unit. -This sort of defensive programming makes it more -likely that an implementation will issue a diagnostic rather -than generate incorrect code for such a reference. - -The terminology used below is based on that of the Fortran 90 -standard, so that the text may be more concise and accurate: - -@itemize @bullet -@item -@code{OPTIONAL} means the argument may be omitted. - -@item -@samp{A-1, A-2, @dots{}, A-n} means more than one argument -(generally named @samp{A}) may be specified. - -@item -@samp{scalar} means the argument must not be an array (must -be a variable or array element, or perhaps a constant if expressions -are permitted). - -@item -@samp{DIMENSION(4)} means the argument must be an array having 4 elements. - -@item -@code{INTENT(IN)} means the argument must be an expression -(such as a constant or a variable that is defined upon invocation -of the intrinsic). - -@item -@code{INTENT(OUT)} means the argument must be definable by the -invocation of the intrinsic (that is, must not be a constant nor -an expression involving operators other than array reference and -substring reference). - -@item -@code{INTENT(INOUT)} means the argument must be defined prior to, -and definable by, invocation of the intrinsic (a combination of -the requirements of @code{INTENT(IN)} and @code{INTENT(OUT)}. - -@item -@xref{Kind Notation}, for an explanation of @code{KIND}. -@end itemize - -@ifinfo -(Note that the empty lines appearing in the menu below -are not intentional---they result from a bug in the -GNU @command{makeinfo} program@dots{}a program that, if it -did not exist, would leave this document in far worse shape!) -@end ifinfo - -@c The actual documentation for intrinsics comes from -@c intdoc.texi, which in turn is automatically generated -@c from the internal g77 tables in intrin.def _and_ the -@c largely hand-written text in intdoc.h. So, if you want -@c to change or add to existing documentation on intrinsics, -@c you probably want to edit intdoc.h. -@c -@set familyF77 -@set familyGNU -@set familyASC -@set familyMIL -@set familyF90 -@clear familyVXT -@clear familyFVZ -@set familyF2C -@set familyF2U -@clear familyBADU77 -@include intdoc.texi - -@node Scope and Classes of Names -@section Scope and Classes of Symbolic Names -@cindex symbol names, scope and classes -@cindex scope - -(The following information augments or overrides the information in -Chapter 18 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran -language. -Chapter 18 of that document otherwise serves as the basis -for the relevant aspects of GNU Fortran.) - -@menu -* Underscores in Symbol Names:: -@end menu - -@node Underscores in Symbol Names -@subsection Underscores in Symbol Names -@cindex underscore - -Underscores (@samp{_}) are accepted in symbol names after the first -character (which must be a letter). - -@node I/O -@section I/O - -@cindex dollar sign -A dollar sign at the end of an output format specification suppresses -the newline at the end of the output. - -@cindex <> edit descriptor -@cindex edit descriptor, <> -Edit descriptors in @code{FORMAT} statements may contain compile-time -@code{INTEGER} constant expressions in angle brackets, such as -@smallexample -10 FORMAT (I) -@end smallexample - -The @code{OPEN} specifier @code{NAME=} is equivalent to @code{FILE=}. - -These Fortran 90 features are supported: -@itemize @bullet -@item -@cindex FORMAT descriptors -@cindex Z edit descriptor -@cindex edit descriptor, Z -@cindex O edit descriptor -@cindex edit descriptor, O -The @code{O} and @code{Z} edit descriptors are supported for I/O of -integers in octal and hexadecimal formats, respectively. -@item -The @code{FILE=} specifier may be omitted in an @code{OPEN} statement if -@code{STATUS='SCRATCH'} is supplied. The @code{STATUS='REPLACE'} -specifier is supported. -@end itemize - -@node Fortran 90 Features -@section Fortran 90 Features -@cindex Fortran 90 -@cindex extensions, from Fortran 90 - -For convenience this section collects a list (probably incomplete) of -the Fortran 90 features supported by the GNU Fortran language, even if -they are documented elsewhere. -@xref{Characters Lines Sequence,,@asis{Characters, Lines, and Execution Sequence}}, -for information on additional fixed source form lexical issues. -@cindex @option{-ffree-form} -Further, the free source form is supported through the -@option{-ffree-form} option. -@cindex @option{-ff90} -Other Fortran 90 features can be turned on by the @option{-ff90} option; -see @ref{Fortran 90}. -For information on the Fortran 90 intrinsics available, -see @ref{Table of Intrinsic Functions}. - -@table @asis -@item Automatic arrays in procedures -@item Character assignments -@cindex character assignments -In character assignments, the variable being assigned may occur on the -right hand side of the assignment. -@item Character strings -@cindex double quoted character constants -Strings may have zero length and substrings of character constants are -permitted. Character constants may be enclosed in double quotes -(@code{"}) as well as single quotes. @xref{Character Type}. -@item Construct names -(Symbolic tags on blocks.) @xref{Construct Names}. -@item @code{CYCLE} and @code{EXIT} -@xref{CYCLE and EXIT,,The @code{CYCLE} and @code{EXIT} Statements}. -@item @code{DOUBLE COMPLEX} -@xref{DOUBLE COMPLEX,,@code{DOUBLE COMPLEX} Statement}. -@item @code{DO WHILE} -@xref{DO WHILE}. -@item @code{END} decoration -@xref{Statements}. -@item @code{END DO} -@xref{END DO}. -@item @code{KIND} -@item @code{IMPLICIT NONE} -@item @code{INCLUDE} statements -@xref{INCLUDE}. -@item List-directed and namelist I/O on internal files -@item Binary, octal and hexadecimal constants -These are supported more generally than required by Fortran 90. -@xref{Integer Type}. -@item @samp{O} and @samp{Z} edit descriptors -@item @code{NAMELIST} -@xref{NAMELIST}. -@item @code{OPEN} specifiers -@code{STATUS='REPLACE'} is supported. -The @code{FILE=} specifier may be omitted in an @code{OPEN} statement if -@code{STATUS='SCRATCH'} is supplied. -@item @code{FORMAT} edit descriptors -@cindex FORMAT descriptors -@cindex Z edit descriptor -@cindex edit descriptor, Z -The @code{Z} edit descriptor is supported. -@item Relational operators -The operators @code{<}, @code{<=}, @code{==}, @code{/=}, @code{>} and -@code{>=} may be used instead of @code{.LT.}, @code{.LE.}, @code{.EQ.}, -@code{.NE.}, @code{.GT.} and @code{.GE.} respectively. -@item @code{SELECT CASE} -Not fully implemented. -@xref{SELECT CASE on CHARACTER Type,, @code{SELECT CASE} on @code{CHARACTER} Type}. -@item Specification statements -A limited subset of the Fortran 90 syntax and semantics for variable -declarations is supported, including @code{KIND}. @xref{Kind Notation}. -(@code{KIND} is of limited usefulness in the absence of the -@code{KIND}-related intrinsics, since these intrinsics permit writing -more widely portable code.) An example of supported @code{KIND} usage -is: -@smallexample -INTEGER (KIND=1) :: FOO=1, BAR=2 -CHARACTER (LEN=3) FOO -@end smallexample -@code{PARAMETER} and @code{DIMENSION} attributes aren't supported. -@end table - -@node Other Dialects -@chapter Other Dialects - -GNU Fortran supports a variety of features that are not -considered part of the GNU Fortran language itself, but -are representative of various dialects of Fortran that -@command{g77} supports in whole or in part. - -Any of the features listed below might be disallowed by -@command{g77} unless some command-line option is specified. -Currently, some of the features are accepted using the -default invocation of @command{g77}, but that might change -in the future. - -@emph{Note: This portion of the documentation definitely needs a lot -of work!} - -@menu -* Source Form:: Details of fixed-form and free-form source. -* Trailing Comment:: Use of @samp{/*} to start a comment. -* Debug Line:: Use of @samp{D} in column 1. -* Dollar Signs:: Use of @samp{$} in symbolic names. -* Case Sensitivity:: Uppercase and lowercase in source files. -* VXT Fortran:: @dots{}versus the GNU Fortran language. -* Fortran 90:: @dots{}versus the GNU Fortran language. -* Pedantic Compilation:: Enforcing the standard. -* Distensions:: Misfeatures supported by GNU Fortran. -@end menu - -@node Source Form -@section Source Form -@cindex source file format -@cindex source format -@cindex file, source -@cindex source code -@cindex code, source -@cindex fixed form -@cindex free form - -GNU Fortran accepts programs written in either fixed form or -free form. - -Fixed form -corresponds to ANSI FORTRAN 77 (plus popular extensions, such as -allowing tabs) and Fortran 90's fixed form. - -Free form corresponds to -Fortran 90's free form (though possibly not entirely up-to-date, and -without complaining about some things that for which Fortran 90 requires -diagnostics, such as the spaces in the constant in @samp{R = 3 . 1}). - -The way a Fortran compiler views source files depends entirely on the -implementation choices made for the compiler, since those choices -are explicitly left to the implementation by the published Fortran -standards. -GNU Fortran currently tries to be somewhat like a few popular compilers -(@command{f2c}, Digital (``DEC'') Fortran, and so on). - -This section describes how @command{g77} interprets source lines. - -@menu -* Carriage Returns:: Carriage returns ignored. -* Tabs:: Tabs converted to spaces. -* Short Lines:: Short lines padded with spaces (fixed-form only). -* Long Lines:: Long lines truncated. -* Ampersands:: Special Continuation Lines. -@end menu - -@node Carriage Returns -@subsection Carriage Returns -@cindex carriage returns - -Carriage returns (@samp{\r}) in source lines are ignored. -This is somewhat different from @command{f2c}, which seems to treat them as -spaces outside character/Hollerith constants, and encodes them as @samp{\r} -inside such constants. - -@node Tabs -@subsection Tabs -@cindex tab character -@cindex horizontal tab - -A source line with a @key{TAB} character anywhere in it is treated as -entirely significant---however long it is---instead of ending in -column 72 (for fixed-form source) or 132 (for free-form source). -This also is different from @command{f2c}, which encodes tabs as -@samp{\t} (the ASCII @key{TAB} character) inside character -and Hollerith constants, but nevertheless seems to treat the column -position as if it had been affected by the canonical tab positioning. - -@command{g77} effectively -translates tabs to the appropriate number of spaces (a la the default -for the UNIX @command{expand} command) before doing any other processing, other -than (currently) noting whether a tab was found on a line and using this -information to decide how to interpret the length of the line and continued -constants. - -@node Short Lines -@subsection Short Lines -@cindex short source lines -@cindex space, padding with -@cindex source lines, short -@cindex lines, short - -Source lines shorter than the applicable fixed-form length are treated as -if they were padded with spaces to that length. -(None of this is relevant to source files written in free form.) - -This affects only -continued character and Hollerith constants, and is a different -interpretation than provided by some other popular compilers -(although a bit more consistent with the traditional punched-card -basis of Fortran and the way the Fortran standard expressed fixed -source form). - -@command{g77} might someday offer an option to warn about cases where differences -might be seen as a result of this treatment, and perhaps an option to -specify the alternate behavior as well. - -Note that this padding cannot apply to lines that are effectively of -infinite length---such lines are specified using command-line options -like @option{-ffixed-line-length-none}, for example. - -@node Long Lines -@subsection Long Lines -@cindex long source lines -@cindex truncation, of long lines -@cindex lines, long -@cindex source lines, long - -Source lines longer than the applicable length are truncated to that -length. -Currently, @command{g77} does not warn if the truncated characters are -not spaces, to accommodate existing code written for systems that -treated truncated text as commentary (especially in columns 73 through 80). - -@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}, -for information on the @option{-ffixed-line-length-@var{n}} option, -which can be used to set the line length applicable to fixed-form -source files. - -@node Ampersands -@subsection Ampersand Continuation Line -@cindex ampersand continuation line -@cindex continuation line, ampersand - -A @samp{&} in column 1 of fixed-form source denotes an arbitrary-length -continuation line, imitating the behavior of @command{f2c}. - -@node Trailing Comment -@section Trailing Comment - -@cindex trailing comment -@cindex comment -@cindex characters, comment -@cindex /* -@cindex ! -@cindex exclamation point -@command{g77} supports use of @samp{/*} to start a trailing -comment. -In the GNU Fortran language, @samp{!} is used for this purpose. - -@samp{/*} is not in the GNU Fortran language -because the use of @samp{/*} in a program might -suggest to some readers that a block, not trailing, comment is -started (and thus ended by @samp{*/}, not end of line), -since that is the meaning of @samp{/*} in C. - -Also, such readers might think they can use @samp{//} to start -a trailing comment as an alternative to @samp{/*}, but -@samp{//} already denotes concatenation, and such a ``comment'' -might actually result in a program that compiles without -error (though it would likely behave incorrectly). - -@node Debug Line -@section Debug Line -@cindex debug line -@cindex comment line, debug - -Use of @samp{D} or @samp{d} as the first character (column 1) of -a source line denotes a debug line. - -In turn, a debug line is treated as either a comment line -or a normal line, depending on whether debug lines are enabled. - -When treated as a comment line, a line beginning with @samp{D} or -@samp{d} is treated as if it the first character was @samp{C} or @samp{c}, respectively. -When treated as a normal line, such a line is treated as if -the first character was @key{SPC} (space). - -(Currently, @command{g77} provides no means for treating debug -lines as normal lines.) - -@node Dollar Signs -@section Dollar Signs in Symbol Names -@cindex dollar sign -@cindex $ - -Dollar signs (@samp{$}) are allowed in symbol names (after the first character) -when the @option{-fdollar-ok} option is specified. - -@node Case Sensitivity -@section Case Sensitivity -@cindex case sensitivity -@cindex source file format -@cindex code, source -@cindex source code -@cindex uppercase letters -@cindex lowercase letters -@cindex letters, uppercase -@cindex letters, lowercase - -GNU Fortran offers the programmer way too much flexibility in deciding -how source files are to be treated vis-a-vis uppercase and lowercase -characters. -There are 66 useful settings that affect case sensitivity, plus 10 -settings that are nearly useless, with the remaining 116 settings -being either redundant or useless. - -None of these settings have any effect on the contents of comments -(the text after a @samp{c} or @samp{C} in Column 1, for example) -or of character or Hollerith constants. -Note that things like the @samp{E} in the statement -@samp{CALL FOO(3.2E10)} and the @samp{TO} in @samp{ASSIGN 10 TO LAB} -are considered built-in keywords, and so are affected by -these settings. - -Low-level switches are identified in this section as follows: - -@itemize @w{} -@item A -Source Case Conversion: - -@itemize @w{} -@item 0 -Preserve (see Note 1) -@item 1 -Convert to Upper Case -@item 2 -Convert to Lower Case -@end itemize - -@item B -Built-in Keyword Matching: - -@itemize @w{} -@item 0 -Match Any Case (per-character basis) -@item 1 -Match Upper Case Only -@item 2 -Match Lower Case Only -@item 3 -Match InitialCaps Only (see tables for spellings) -@end itemize - -@item C -Built-in Intrinsic Matching: - -@itemize @w{} -@item 0 -Match Any Case (per-character basis) -@item 1 -Match Upper Case Only -@item 2 -Match Lower Case Only -@item 3 -Match InitialCaps Only (see tables for spellings) -@end itemize - -@item D -User-defined Symbol Possibilities (warnings only): - -@itemize @w{} -@item 0 -Allow Any Case (per-character basis) -@item 1 -Allow Upper Case Only -@item 2 -Allow Lower Case Only -@item 3 -Allow InitialCaps Only (see Note 2) -@end itemize -@end itemize - -Note 1: @command{g77} eventually will support @code{NAMELIST} in a manner that is -consistent with these source switches---in the sense that input will be -expected to meet the same requirements as source code in terms -of matching symbol names and keywords (for the exponent letters). - -Currently, however, @code{NAMELIST} is supported by @code{libg2c}, -which uppercases @code{NAMELIST} input and symbol names for matching. -This means not only that @code{NAMELIST} output currently shows symbol -(and keyword) names in uppercase even if lower-case source -conversion (option A2) is selected, but that @code{NAMELIST} cannot be -adequately supported when source case preservation (option A0) -is selected. - -If A0 is selected, a warning message will be -output for each @code{NAMELIST} statement to this effect. -The behavior -of the program is undefined at run time if two or more symbol names -appear in a given @code{NAMELIST} such that the names are identical -when converted to upper case (e.g. @samp{NAMELIST /X/ VAR, Var, var}). -For complete and total elegance, perhaps there should be a warning -when option A2 is selected, since the output of NAMELIST is currently -in uppercase but will someday be lowercase (when a @code{libg77} is written), -but that seems to be overkill for a product in beta test. - -Note 2: Rules for InitialCaps names are: - -@itemize @minus -@item -Must be a single uppercase letter, @strong{or} -@item -Must start with an uppercase letter and contain at least one -lowercase letter. -@end itemize - -So @samp{A}, @samp{Ab}, @samp{ABc}, @samp{AbC}, and @samp{Abc} are -valid InitialCaps names, but @samp{AB}, @samp{A2}, and @samp{ABC} are -not. -Note that most, but not all, built-in names meet these -requirements---the exceptions are some of the two-letter format -specifiers, such as @code{BN} and @code{BZ}. - -Here are the names of the corresponding command-line options: - -@smallexample -A0: -fsource-case-preserve -A1: -fsource-case-upper -A2: -fsource-case-lower - -B0: -fmatch-case-any -B1: -fmatch-case-upper -B2: -fmatch-case-lower -B3: -fmatch-case-initcap - -C0: -fintrin-case-any -C1: -fintrin-case-upper -C2: -fintrin-case-lower -C3: -fintrin-case-initcap - -D0: -fsymbol-case-any -D1: -fsymbol-case-upper -D2: -fsymbol-case-lower -D3: -fsymbol-case-initcap -@end smallexample - -Useful combinations of the above settings, along with abbreviated -option names that set some of these combinations all at once: - -@smallexample - 1: A0-- B0--- C0--- D0--- -fcase-preserve - 2: A0-- B0--- C0--- D-1-- - 3: A0-- B0--- C0--- D--2- - 4: A0-- B0--- C0--- D---3 - 5: A0-- B0--- C-1-- D0--- - 6: A0-- B0--- C-1-- D-1-- - 7: A0-- B0--- C-1-- D--2- - 8: A0-- B0--- C-1-- D---3 - 9: A0-- B0--- C--2- D0--- -10: A0-- B0--- C--2- D-1-- -11: A0-- B0--- C--2- D--2- -12: A0-- B0--- C--2- D---3 -13: A0-- B0--- C---3 D0--- -14: A0-- B0--- C---3 D-1-- -15: A0-- B0--- C---3 D--2- -16: A0-- B0--- C---3 D---3 -17: A0-- B-1-- C0--- D0--- -18: A0-- B-1-- C0--- D-1-- -19: A0-- B-1-- C0--- D--2- -20: A0-- B-1-- C0--- D---3 -21: A0-- B-1-- C-1-- D0--- -22: A0-- B-1-- C-1-- D-1-- -fcase-strict-upper -23: A0-- B-1-- C-1-- D--2- -24: A0-- B-1-- C-1-- D---3 -25: A0-- B-1-- C--2- D0--- -26: A0-- B-1-- C--2- D-1-- -27: A0-- B-1-- C--2- D--2- -28: A0-- B-1-- C--2- D---3 -29: A0-- B-1-- C---3 D0--- -30: A0-- B-1-- C---3 D-1-- -31: A0-- B-1-- C---3 D--2- -32: A0-- B-1-- C---3 D---3 -33: A0-- B--2- C0--- D0--- -34: A0-- B--2- C0--- D-1-- -35: A0-- B--2- C0--- D--2- -36: A0-- B--2- C0--- D---3 -37: A0-- B--2- C-1-- D0--- -38: A0-- B--2- C-1-- D-1-- -39: A0-- B--2- C-1-- D--2- -40: A0-- B--2- C-1-- D---3 -41: A0-- B--2- C--2- D0--- -42: A0-- B--2- C--2- D-1-- -43: A0-- B--2- C--2- D--2- -fcase-strict-lower -44: A0-- B--2- C--2- D---3 -45: A0-- B--2- C---3 D0--- -46: A0-- B--2- C---3 D-1-- -47: A0-- B--2- C---3 D--2- -48: A0-- B--2- C---3 D---3 -49: A0-- B---3 C0--- D0--- -50: A0-- B---3 C0--- D-1-- -51: A0-- B---3 C0--- D--2- -52: A0-- B---3 C0--- D---3 -53: A0-- B---3 C-1-- D0--- -54: A0-- B---3 C-1-- D-1-- -55: A0-- B---3 C-1-- D--2- -56: A0-- B---3 C-1-- D---3 -57: A0-- B---3 C--2- D0--- -58: A0-- B---3 C--2- D-1-- -59: A0-- B---3 C--2- D--2- -60: A0-- B---3 C--2- D---3 -61: A0-- B---3 C---3 D0--- -62: A0-- B---3 C---3 D-1-- -63: A0-- B---3 C---3 D--2- -64: A0-- B---3 C---3 D---3 -fcase-initcap -65: A-1- B01-- C01-- D01-- -fcase-upper -66: A--2 B0-2- C0-2- D0-2- -fcase-lower -@end smallexample - -Number 22 is the ``strict'' ANSI FORTRAN 77 model wherein all input -(except comments, character constants, and Hollerith strings) must -be entered in uppercase. -Use @option{-fcase-strict-upper} to specify this -combination. - -Number 43 is like Number 22 except all input must be lowercase. Use -@option{-fcase-strict-lower} to specify this combination. - -Number 65 is the ``classic'' ANSI FORTRAN 77 model as implemented on many -non-UNIX machines whereby all the source is translated to uppercase. -Use @option{-fcase-upper} to specify this combination. - -Number 66 is the ``canonical'' UNIX model whereby all the source is -translated to lowercase. -Use @option{-fcase-lower} to specify this combination. - -There are a few nearly useless combinations: - -@smallexample -67: A-1- B01-- C01-- D--2- -68: A-1- B01-- C01-- D---3 -69: A-1- B01-- C--23 D01-- -70: A-1- B01-- C--23 D--2- -71: A-1- B01-- C--23 D---3 -72: A--2 B01-- C0-2- D-1-- -73: A--2 B01-- C0-2- D---3 -74: A--2 B01-- C-1-3 D0-2- -75: A--2 B01-- C-1-3 D-1-- -76: A--2 B01-- C-1-3 D---3 -@end smallexample - -The above allow some programs to be compiled but with restrictions that -make most useful programs impossible: Numbers 67 and 72 warn about -@emph{any} user-defined symbol names (such as @samp{SUBROUTINE FOO}); -Numbers -68 and 73 warn about any user-defined symbol names longer than one -character that don't have at least one non-alphabetic character after -the first; -Numbers 69 and 74 disallow any references to intrinsics; -and Numbers 70, 71, 75, and 76 are combinations of the restrictions in -67+69, 68+69, 72+74, and 73+74, respectively. - -All redundant combinations are shown in the above tables anyplace -where more than one setting is shown for a low-level switch. -For example, @samp{B0-2-} means either setting 0 or 2 is valid for switch B. -The ``proper'' setting in such a case is the one that copies the setting -of switch A---any other setting might slightly reduce the speed of -the compiler, though possibly to an unmeasurable extent. - -All remaining combinations are useless in that they prevent successful -compilation of non-null source files (source files with something other -than comments). - -@node VXT Fortran -@section VXT Fortran - -@cindex VXT extensions -@cindex extensions, VXT -@command{g77} supports certain constructs that -have different meanings in VXT Fortran than they -do in the GNU Fortran language. - -Generally, this manual uses the invented term VXT Fortran to refer -VAX FORTRAN (circa v4). -That compiler offered many popular features, though not necessarily -those that are specific to the VAX processor architecture, -the VMS operating system, -or Digital Equipment Corporation's Fortran product line. -(VAX and VMS probably are trademarks of Digital Equipment -Corporation.) - -An extension offered by a Digital Fortran product that also is -offered by several other Fortran products for different kinds of -systems is probably going to be considered for inclusion in @command{g77} -someday, and is considered a VXT Fortran feature. - -The @option{-fvxt} option generally specifies that, where -the meaning of a construct is ambiguous (means one thing -in GNU Fortran and another in VXT Fortran), the VXT Fortran -meaning is to be assumed. - -@menu -* Double Quote Meaning:: @samp{"2000} as octal constant. -* Exclamation Point:: @samp{!} in column 6. -@end menu - -@node Double Quote Meaning -@subsection Meaning of Double Quote -@cindex double quotes -@cindex character constants -@cindex constants, character -@cindex octal constants -@cindex constants, octal - -@command{g77} treats double-quote (@samp{"}) -as beginning an octal constant of @code{INTEGER(KIND=1)} type -when the @option{-fvxt} option is specified. -The form of this octal constant is - -@example -"@var{octal-digits} -@end example - -@noindent -where @var{octal-digits} is a nonempty string of characters in -the set @samp{01234567}. - -For example, the @option{-fvxt} option permits this: - -@example -PRINT *, "20 -END -@end example - -@noindent -The above program would print the value @samp{16}. - -@xref{Integer Type}, for information on the preferred construct -for integer constants specified using GNU Fortran's octal notation. - -(In the GNU Fortran language, the double-quote character (@samp{"}) -delimits a character constant just as does apostrophe (@samp{'}). -There is no way to allow -both constructs in the general case, since statements like -@samp{PRINT *,"2000 !comment?"} would be ambiguous.) - -@node Exclamation Point -@subsection Meaning of Exclamation Point in Column 6 -@cindex ! -@cindex exclamation point -@cindex continuation character -@cindex characters, continuation -@cindex comment character -@cindex characters, comment - -@command{g77} treats an exclamation point (@samp{!}) in column 6 of -a fixed-form source file -as a continuation character rather than -as the beginning of a comment -(as it does in any other column) -when the @option{-fvxt} option is specified. - -The following program, when run, prints a message indicating -whether it is interpreted according to GNU Fortran (and Fortran 90) -rules or VXT Fortran rules: - -@smallexample -C234567 (This line begins in column 1.) - I = 0 - !1 - IF (I.EQ.0) PRINT *, ' I am a VXT Fortran program' - IF (I.EQ.1) PRINT *, ' I am a Fortran 90 program' - IF (I.LT.0 .OR. I.GT.1) PRINT *, ' I am a HAL 9000 computer' - END -@end smallexample - -(In the GNU Fortran and Fortran 90 languages, exclamation point is -a valid character and, unlike space (@key{SPC}) or zero (@samp{0}), -marks a line as a continuation line when it appears in column 6.) - -@node Fortran 90 -@section Fortran 90 -@cindex compatibility, Fortran 90 -@cindex Fortran 90, compatibility - -The GNU Fortran language includes a number of features that are -part of Fortran 90, even when the @option{-ff90} option is not specified. -The features enabled by @option{-ff90} are intended to be those that, -when @option{-ff90} is not specified, would have another -meaning to @command{g77}---usually meaning something invalid in the -GNU Fortran language. - -So, the purpose of @option{-ff90} is not to specify whether @command{g77} is -to gratuitously reject Fortran 90 constructs. -The @option{-pedantic} option specified with @option{-fno-f90} is intended -to do that, although its implementation is certainly incomplete at -this point. - -When @option{-ff90} is specified: - -@itemize @bullet -@item -The type of @samp{REAL(@var{expr})} and @samp{AIMAG(@var{expr})}, -where @var{expr} is @code{COMPLEX} type, -is the same type as the real part of @var{expr}. - -For example, assuming @samp{Z} is type @code{COMPLEX(KIND=2)}, -@samp{REAL(Z)} would return a value of type @code{REAL(KIND=2)}, -not of type @code{REAL(KIND=1)}, since @option{-ff90} is specified. -@end itemize - -@node Pedantic Compilation -@section Pedantic Compilation -@cindex pedantic compilation -@cindex compilation, pedantic - -The @option{-fpedantic} command-line option specifies that @command{g77} -is to warn about code that is not standard-conforming. -This is useful for finding -some extensions @command{g77} accepts that other compilers might not accept. -(Note that the @option{-pedantic} and @option{-pedantic-errors} options -always imply @option{-fpedantic}.) - -With @option{-fno-f90} in force, ANSI FORTRAN 77 is used as the standard -for conforming code. -With @option{-ff90} in force, Fortran 90 is used. - -The constructs for which @command{g77} issues diagnostics when @option{-fpedantic} -and @option{-fno-f90} are in force are: - -@itemize @bullet -@item -Automatic arrays, as in - -@example -SUBROUTINE X(N) -REAL A(N) -@dots{} -@end example - -@noindent -where @samp{A} is not listed in any @code{ENTRY} statement, -and thus is not a dummy argument. - -@item -The commas in @samp{READ (5), I} and @samp{WRITE (10), J}. - -These commas are disallowed by FORTRAN 77, but, while strictly -superfluous, are syntactically elegant, -especially given that commas are required in statements such -as @samp{READ 99, I} and @samp{PRINT *, J}. -Many compilers permit the superfluous commas for this reason. - -@item -@code{DOUBLE COMPLEX}, either explicitly or implicitly. - -An explicit use of this type is via a @code{DOUBLE COMPLEX} or -@code{IMPLICIT DOUBLE COMPLEX} statement, for examples. - -An example of an implicit use is the expression @samp{C*D}, -where @samp{C} is @code{COMPLEX(KIND=1)} -and @samp{D} is @code{DOUBLE PRECISION}. -This expression is prohibited by ANSI FORTRAN 77 -because the rules of promotion would suggest that it -produce a @code{DOUBLE COMPLEX} result---a type not -provided for by that standard. - -@item -Automatic conversion of numeric -expressions to @code{INTEGER(KIND=1)} in contexts such as: - -@itemize @minus -@item -Array-reference indexes. -@item -Alternate-return values. -@item -Computed @code{GOTO}. -@item -@code{FORMAT} run-time expressions (not yet supported). -@item -Dimension lists in specification statements. -@item -Numbers for I/O statements (such as @samp{READ (UNIT=3.2), I}) -@item -Sizes of @code{CHARACTER} entities in specification statements. -@item -Kind types in specification entities (a Fortran 90 feature). -@item -Initial, terminal, and incrementation parameters for implied-@code{DO} -constructs in @code{DATA} statements. -@end itemize - -@item -Automatic conversion of @code{LOGICAL} expressions to @code{INTEGER} -in contexts such as arithmetic @code{IF} (where @code{COMPLEX} -expressions are disallowed anyway). - -@item -Zero-size array dimensions, as in: - -@example -INTEGER I(10,20,4:2) -@end example - -@item -Zero-length @code{CHARACTER} entities, as in: - -@example -PRINT *, '' -@end example - -@item -Substring operators applied to character constants and named -constants, as in: - -@example -PRINT *, 'hello'(3:5) -@end example - -@item -Null arguments passed to statement function, as in: - -@example -PRINT *, FOO(,3) -@end example - -@item -Disagreement among program units regarding whether a given @code{COMMON} -area is @code{SAVE}d (for targets where program units in a single source -file are ``glued'' together as they typically are for UNIX development -environments). - -@item -Disagreement among program units regarding the size of a -named @code{COMMON} block. - -@item -Specification statements following first @code{DATA} statement. - -(In the GNU Fortran language, @samp{DATA I/1/} may be followed by @samp{INTEGER J}, -but not @samp{INTEGER I}. -The @option{-fpedantic} option disallows both of these.) - -@item -Semicolon as statement separator, as in: - -@example -CALL FOO; CALL BAR -@end example -@c -@c @item -@c Comma before list of I/O items in @code{WRITE} -@c @c, @code{ENCODE}, @code{DECODE}, and @code{REWRITE} -@c statements, as with @code{READ} (as explained above). - -@item -Use of @samp{&} in column 1 of fixed-form source (to indicate continuation). - -@item -Use of @code{CHARACTER} constants to initialize numeric entities, and vice -versa. - -@item -Expressions having two arithmetic operators in a row, such -as @samp{X*-Y}. -@end itemize - -If @option{-fpedantic} is specified along with @option{-ff90}, the -following constructs result in diagnostics: - -@itemize @bullet -@item -Use of semicolon as a statement separator on a line -that has an @code{INCLUDE} directive. -@end itemize - -@node Distensions -@section Distensions -@cindex distensions -@cindex ugly features -@cindex features, ugly - -The @option{-fugly-*} command-line options determine whether certain -features supported by VAX FORTRAN and other such compilers, but considered -too ugly to be in code that can be changed to use safer and/or more -portable constructs, are accepted. -These are humorously referred to as ``distensions'', -extensions that just plain look ugly in the harsh light of day. - -@menu -* Ugly Implicit Argument Conversion:: Disabled via @option{-fno-ugly-args}. -* Ugly Assumed-Size Arrays:: Enabled via @option{-fugly-assumed}. -* Ugly Null Arguments:: Enabled via @option{-fugly-comma}. -* Ugly Complex Part Extraction:: Enabled via @option{-fugly-complex}. -* Ugly Conversion of Initializers:: Disabled via @option{-fno-ugly-init}. -* Ugly Integer Conversions:: Enabled via @option{-fugly-logint}. -* Ugly Assigned Labels:: Enabled via @option{-fugly-assign}. -@end menu - -@node Ugly Implicit Argument Conversion -@subsection Implicit Argument Conversion -@cindex Hollerith constants -@cindex constants, Hollerith - -The @option{-fno-ugly-args} option disables -passing typeless and Hollerith constants as actual arguments -in procedure invocations. -For example: - -@example -CALL FOO(4HABCD) -CALL BAR('123'O) -@end example - -@noindent -These constructs can be too easily used to create non-portable -code, but are not considered as ``ugly'' as others. -Further, they are widely used in existing Fortran source code -in ways that often are quite portable. -Therefore, they are enabled by default. - -@node Ugly Assumed-Size Arrays -@subsection Ugly Assumed-Size Arrays -@cindex arrays, assumed-size -@cindex assumed-size arrays -@cindex DIMENSION X(1) - -The @option{-fugly-assumed} option enables -the treatment of any array with a final dimension specified as @samp{1} -as an assumed-size array, as if @samp{*} had been specified -instead. - -For example, @samp{DIMENSION X(1)} is treated as if it -had read @samp{DIMENSION X(*)} if @samp{X} is listed as -a dummy argument in a preceding @code{SUBROUTINE}, @code{FUNCTION}, -or @code{ENTRY} statement in the same program unit. - -Use an explicit lower bound to avoid this interpretation. -For example, @samp{DIMENSION X(1:1)} is never treated as if -it had read @samp{DIMENSION X(*)} or @samp{DIMENSION X(1:*)}. -Nor is @samp{DIMENSION X(2-1)} affected by this option, -since that kind of expression is unlikely to have been -intended to designate an assumed-size array. - -This option is used to prevent warnings being issued about apparent -out-of-bounds reference such as @samp{X(2) = 99}. - -It also prevents the array from being used in contexts that -disallow assumed-size arrays, such as @samp{PRINT *,X}. -In such cases, a diagnostic is generated and the source file is -not compiled. - -The construct affected by this option is used only in old code -that pre-exists the widespread acceptance of adjustable and assumed-size -arrays in the Fortran community. - -@emph{Note:} This option does not affect how @samp{DIMENSION X(1)} is -treated if @samp{X} is listed as a dummy argument only -@emph{after} the @code{DIMENSION} statement (presumably in -an @code{ENTRY} statement). -For example, @option{-fugly-assumed} has no effect on the -following program unit: - -@example -SUBROUTINE X -REAL A(1) -RETURN -ENTRY Y(A) -PRINT *, A -END -@end example - -@node Ugly Complex Part Extraction -@subsection Ugly Complex Part Extraction -@cindex complex values -@cindex real part -@cindex imaginary part - -The @option{-fugly-complex} option enables -use of the @code{REAL()} and @code{AIMAG()} -intrinsics with arguments that are -@code{COMPLEX} types other than @code{COMPLEX(KIND=1)}. - -With @option{-ff90} in effect, these intrinsics return -the unconverted real and imaginary parts (respectively) -of their argument. - -With @option{-fno-f90} in effect, these intrinsics convert -the real and imaginary parts to @code{REAL(KIND=1)}, and return -the result of that conversion. - -Due to this ambiguity, the GNU Fortran language defines -these constructs as invalid, except in the specific -case where they are entirely and solely passed as an -argument to an invocation of the @code{REAL()} intrinsic. -For example, - -@example -REAL(REAL(Z)) -@end example - -@noindent -is permitted even when @samp{Z} is @code{COMPLEX(KIND=2)} -and @option{-fno-ugly-complex} is in effect, because the -meaning is clear. - -@command{g77} enforces this restriction, unless @option{-fugly-complex} -is specified, in which case the appropriate interpretation is -chosen and no diagnostic is issued. - -@xref{CMPAMBIG}, for information on how to cope with existing -code with unclear expectations of @code{REAL()} and @code{AIMAG()} -with @code{COMPLEX(KIND=2)} arguments. - -@xref{RealPart Intrinsic}, for information on the @code{REALPART()} -intrinsic, used to extract the real part of a complex expression -without conversion. -@xref{ImagPart Intrinsic}, for information on the @code{IMAGPART()} -intrinsic, used to extract the imaginary part of a complex expression -without conversion. - -@node Ugly Null Arguments -@subsection Ugly Null Arguments -@cindex trailing comma -@cindex comma, trailing -@cindex characters, comma -@cindex null arguments -@cindex arguments, null - -The @option{-fugly-comma} option enables use of a single trailing comma -to mean ``pass an extra trailing null argument'' -in a list of actual arguments to an external procedure, -and use of an empty list of arguments to such a procedure -to mean ``pass a single null argument''. - -@cindex omitting arguments -@cindex arguments, omitting -(Null arguments often are used in some procedure-calling -schemes to indicate omitted arguments.) - -For example, @samp{CALL FOO(,)} means ``pass -two null arguments'', rather than ``pass one null argument''. -Also, @samp{CALL BAR()} means ``pass one null argument''. - -This construct is considered ``ugly'' because it does not -provide an elegant way to pass a single null argument -that is syntactically distinct from passing no arguments. -That is, this construct changes the meaning of code that -makes no use of the construct. - -So, with @option{-fugly-comma} in force, @samp{CALL FOO()} -and @samp{I = JFUNC()} pass a single null argument, instead -of passing no arguments as required by the Fortran 77 and -90 standards. - -@emph{Note:} Many systems gracefully allow the case -where a procedure call passes one extra argument that the -called procedure does not expect. - -So, in practice, there might be no difference in -the behavior of a program that does @samp{CALL FOO()} -or @samp{I = JFUNC()} and is compiled with @option{-fugly-comma} -in force as compared to its behavior when compiled -with the default, @option{-fno-ugly-comma}, in force, -assuming @samp{FOO} and @samp{JFUNC} do not expect any -arguments to be passed. - -@node Ugly Conversion of Initializers -@subsection Ugly Conversion of Initializers - -The constructs disabled by @option{-fno-ugly-init} are: - -@itemize @bullet -@cindex Hollerith constants -@cindex constants, Hollerith -@item -Use of Hollerith and typeless constants in contexts where they set -initial (compile-time) values for variables, arrays, and named -constants---that is, @code{DATA} and @code{PARAMETER} statements, plus -type-declaration statements specifying initial values. - -Here are some sample initializations that are disabled by the -@option{-fno-ugly-init} option: - -@example -PARAMETER (VAL='9A304FFE'X) -REAL*8 STRING/8HOUTPUT00/ -DATA VAR/4HABCD/ -@end example - -@cindex character constants -@cindex constants, character -@item -In the same contexts as above, use of character constants to initialize -numeric items and vice versa (one constant per item). - -Here are more sample initializations that are disabled by the -@option{-fno-ugly-init} option: - -@example -INTEGER IA -CHARACTER BELL -PARAMETER (IA = 'A') -PARAMETER (BELL = 7) -@end example - -@item -Use of Hollerith and typeless constants on the right-hand side -of assignment statements to numeric types, and in other -contexts (such as passing arguments in invocations of -intrinsic procedures and statement functions) that -are treated as assignments to known types (the dummy -arguments, in these cases). - -Here are sample statements that are disabled by the -@option{-fno-ugly-init} option: - -@example -IVAR = 4HABCD -PRINT *, IMAX0(2HAB, 2HBA) -@end example -@end itemize - -The above constructs, when used, -can tend to result in non-portable code. -But, they are widely used in existing Fortran code in ways -that often are quite portable. -Therefore, they are enabled by default. - -@node Ugly Integer Conversions -@subsection Ugly Integer Conversions - -The constructs enabled via @option{-fugly-logint} are: - -@itemize @bullet -@item -Automatic conversion between @code{INTEGER} and @code{LOGICAL} as -dictated by -context (typically implies nonportable dependencies on how a -particular implementation encodes @code{.TRUE.} and @code{.FALSE.}). - -@item -Use of a @code{LOGICAL} variable in @code{ASSIGN} and assigned-@code{GOTO} -statements. -@end itemize - -The above constructs are disabled by default because use -of them tends to lead to non-portable code. -Even existing Fortran code that uses that often turns out -to be non-portable, if not outright buggy. - -Some of this is due to differences among implementations as -far as how @code{.TRUE.} and @code{.FALSE.} are encoded as -@code{INTEGER} values---Fortran code that assumes a particular -coding is likely to use one of the above constructs, and is -also likely to not work correctly on implementations using -different encodings. - -@xref{Equivalence Versus Equality}, for more information. - -@node Ugly Assigned Labels -@subsection Ugly Assigned Labels -@cindex ASSIGN statement -@cindex statements, ASSIGN -@cindex assigned labels -@cindex pointers - -The @option{-fugly-assign} option forces @command{g77} to use the -same storage for assigned labels as it would for a normal -assignment to the same variable. - -For example, consider the following code fragment: - -@example -I = 3 -ASSIGN 10 TO I -@end example - -@noindent -Normally, for portability and improved diagnostics, @command{g77} -reserves distinct storage for a ``sibling'' of @samp{I}, used -only for @code{ASSIGN} statements to that variable (along with -the corresponding assigned-@code{GOTO} and assigned-@code{FORMAT}-I/O -statements that reference the variable). - -However, some code (that violates the ANSI FORTRAN 77 standard) -attempts to copy assigned labels among variables involved with -@code{ASSIGN} statements, as in: - -@example -ASSIGN 10 TO I -ISTATE(5) = I -@dots{} -J = ISTATE(ICUR) -GOTO J -@end example - -@noindent -Such code doesn't work under @command{g77} unless @option{-fugly-assign} -is specified on the command-line, ensuring that the value of @code{I} -referenced in the second line is whatever value @command{g77} uses -to designate statement label @samp{10}, so the value may be -copied into the @samp{ISTATE} array, later retrieved into a -variable of the appropriate type (@samp{J}), and used as the target of -an assigned-@code{GOTO} statement. - -@emph{Note:} To avoid subtle program bugs, -when @option{-fugly-assign} is specified, -@command{g77} requires the type of variables -specified in assigned-label contexts -@emph{must} be the same type returned by @code{%LOC()}. -On many systems, this type is effectively the same -as @code{INTEGER(KIND=1)}, while, on others, it is -effectively the same as @code{INTEGER(KIND=2)}. - -Do @emph{not} depend on @command{g77} actually writing valid pointers -to these variables, however. -While @command{g77} currently chooses that implementation, it might -be changed in the future. - -@xref{Assigned Statement Labels,,Assigned Statement Labels (ASSIGN and GOTO)}, -for implementation details on assigned-statement labels. - -@node Compiler -@chapter The GNU Fortran Compiler - -The GNU Fortran compiler, @command{g77}, supports programs written -in the GNU Fortran language and in some other dialects of Fortran. - -Some aspects of how @command{g77} works are universal regardless -of dialect, and yet are not properly part of the GNU Fortran -language itself. -These are described below. - -@emph{Note: This portion of the documentation definitely needs a lot -of work!} - -@menu -* Compiler Limits:: -* Run-time Environment Limits:: -* Compiler Types:: -* Compiler Constants:: -* Compiler Intrinsics:: -@end menu - -@node Compiler Limits -@section Compiler Limits -@cindex limits, compiler -@cindex compiler limits - -@command{g77}, as with GNU tools in general, imposes few arbitrary restrictions -on lengths of identifiers, number of continuation lines, number of external -symbols in a program, and so on. - -@cindex options, -Nl -@cindex -Nl option -@cindex options, -Nx -@cindex -Nx option -@cindex limits, continuation lines -@cindex limits, lengths of names -For example, some other Fortran compiler have an option -(such as @option{-Nl@var{x}}) to increase the limit on the -number of continuation lines. -Also, some Fortran compilation systems have an option -(such as @option{-Nx@var{x}}) to increase the limit on the -number of external symbols. - -@command{g77}, @command{gcc}, and GNU @command{ld} (the GNU linker) have -no equivalent options, since they do not impose arbitrary -limits in these areas. - -@cindex rank, maximum -@cindex maximum rank -@cindex number of dimensions, maximum -@cindex maximum number of dimensions -@cindex limits, rank -@cindex limits, array dimensions -@command{g77} does currently limit the number of dimensions in an array -to the same degree as do the Fortran standards---seven (7). -This restriction might be lifted in a future version. - -@node Run-time Environment Limits -@section Run-time Environment Limits -@cindex limits, run-time library -@cindex wraparound - -As a portable Fortran implementation, -@command{g77} offers its users direct access to, -and otherwise depends upon, -the underlying facilities of the system -used to build @command{g77}, -the system on which @command{g77} itself is used to compile programs, -and the system on which the @command{g77}-compiled program is actually run. -(For most users, the three systems are of the same -type---combination of operating environment and hardware---often -the same physical system.) - -The run-time environment for a particular system -inevitably imposes some limits on a program's use -of various system facilities. -These limits vary from system to system. - -Even when such limits might be well beyond the -possibility of being encountered on a particular system, -the @command{g77} run-time environment -has certain built-in limits, -usually, but not always, stemming from intrinsics -with inherently limited interfaces. - -Currently, the @command{g77} run-time environment -does not generally offer a less-limiting environment -by augmenting the underlying system's own environment. - -Therefore, code written in the GNU Fortran language, -while syntactically and semantically portable, -might nevertheless make non-portable assumptions -about the run-time environment---assumptions that -prove to be false for some particular environments. - -The GNU Fortran language, -the @command{g77} compiler and run-time environment, -and the @command{g77} documentation -do not yet offer comprehensive portable work-arounds for such limits, -though programmers should be able to -find their own in specific instances. - -Not all of the limitations are described in this document. -Some of the known limitations include: - -@menu -* Timer Wraparounds:: -* Year 2000 (Y2K) Problems:: -* Array Size:: -* Character-variable Length:: -* Year 10000 (Y10K) Problems:: -@end menu - -@node Timer Wraparounds -@subsection Timer Wraparounds - -Intrinsics that return values computed from system timers, -whether elapsed (wall-clock) timers, -process CPU timers, -or other kinds of timers, -are prone to experiencing wrap-around errors -(or returning wrapped-around values from successive calls) -due to insufficient ranges -offered by the underlying system's timers. - -@cindex negative time -@cindex short time -@cindex long time -Some of the symptoms of such behaviors include -apparently negative time being computed for a duration, -an extremely short amount of time being computed for a long duration, -and an extremely long amount of time being computed for a short duration. - -See the following for intrinsics -known to have potential problems in these areas -on at least some systems: -@ref{CPU_Time Intrinsic}, -@ref{DTime Intrinsic (function)}, @ref{DTime Intrinsic (subroutine)}, -@ref{ETime Intrinsic (function)}, @ref{ETime Intrinsic (subroutine)}, -@ref{MClock Intrinsic}, @ref{MClock8 Intrinsic}, -@ref{Secnds Intrinsic}, -@ref{Second Intrinsic (function)}, @ref{Second Intrinsic (subroutine)}, -@ref{System_Clock Intrinsic}, -@ref{Time Intrinsic (UNIX)}, @ref{Time Intrinsic (VXT)}, -@ref{Time8 Intrinsic}. - -@node Year 2000 (Y2K) Problems -@subsection Year 2000 (Y2K) Problems -@cindex Y2K compliance -@cindex Year 2000 compliance - -While the @command{g77} compiler itself is believed to -be Year-2000 (Y2K) compliant, -some intrinsics are not, -and, potentially, some underlying systems are not, -perhaps rendering some Y2K-compliant intrinsics -non-compliant when used on those particular systems. - -Fortran code that uses non-Y2K-compliant intrinsics -(listed below) -is, itself, almost certainly not compliant, -and should be modified to use Y2K-compliant intrinsics instead. - -Fortran code that uses no non-Y2K-compliant intrinsics, -but which currently is running on a non-Y2K-compliant system, -can be made more Y2K compliant by compiling and -linking it for use on a new Y2K-compliant system, -such as a new version of an old, non-Y2K-compliant, system. - -Currently, information on Y2K and related issues -is being maintained at -@uref{http://www.gnu.org/software/year2000-list.html}. - -See the following for intrinsics -known to have potential problems in these areas -on at least some systems: -@ref{Date Intrinsic}, -@ref{IDate Intrinsic (VXT)}. - -@cindex y2kbuggy -@cindex date_y2kbuggy_0 -@cindex vxtidate_y2kbuggy_0 -@cindex G77_date_y2kbuggy_0 -@cindex G77_vxtidate_y2kbuggy_0 -The @code{libg2c} library -shipped with any @command{g77} that warns -about invocation of a non-Y2K-compliant intrinsic -has renamed the @code{EXTERNAL} procedure names -of those intrinsics. -This is done so that -the @code{libg2c} implementations of these intrinsics -cannot be directly linked to -as @code{EXTERNAL} names -(which normally would avoid the non-Y2K-intrinsic warning). - -The renamed forms of the @code{EXTERNAL} names -of these renamed procedures -may be linked to -by appending the string @samp{_y2kbug} -to the name of the procedure -in the source code. -For example: - -@smallexample -CHARACTER*20 STR -INTEGER YY, MM, DD -EXTERNAL DATE_Y2KBUG, VXTIDATE_Y2KBUG -CALL DATE_Y2KBUG (STR) -CALL VXTIDATE_Y2KBUG (MM, DD, YY) -@end smallexample - -(Note that the @code{EXTERNAL} statement -is not actually required, -since the modified names are not recognized as intrinsics -by the current version of @command{g77}. -But it is shown in this specific case, -for purposes of illustration.) - -The renaming of @code{EXTERNAL} procedure names of these intrinsics -causes unresolved references at link time. -For example, @samp{EXTERNAL DATE; CALL DATE(STR)} -is normally compiled by @command{g77} -as, in C, @samp{date_(&str, 20);}. -This, in turn, links to the @code{date_} procedure -in the @code{libE77} portion of @code{libg2c}, -which purposely calls a nonexistent procedure -named @code{G77_date_y2kbuggy_0}. -The resulting link-time error is designed, via this name, -to encourage the programmer to look up the -index entries to this portion of the @command{g77} documentation. - -Generally, we recommend that the @code{EXTERNAL} method -of invoking procedures in @code{libg2c} -@emph{not} be used. -When used, some of the correctness checking -normally performed by @command{g77} -is skipped. - -In particular, it is probably better to use the -@code{INTRINSIC} method of invoking -non-Y2K-compliant procedures, -so anyone compiling the code -can quickly notice the potential Y2K problems -(via the warnings printing by @command{g77}) -without having to even look at the code itself. - -If there are problems linking @code{libg2c} -to code compiled by @command{g77} -that involve the string @samp{y2kbug}, -and these are not explained above, -that probably indicates -that a version of @code{libg2c} -older than @command{g77} -is being linked to, -or that the new library is being linked -to code compiled by an older version of @command{g77}. - -That's because, as of the version that warns about -non-Y2K-compliant intrinsic invocation, -@command{g77} references the @code{libg2c} implementations -of those intrinsics -using new names, containing the string @samp{y2kbug}. - -So, linking newly-compiled code -(invoking one of the intrinsics in question) -to an old library -might yield an unresolved reference -to @code{G77_date_y2kbug_0}. -(The old library calls it @code{G77_date_0}.) - -Similarly, linking previously-compiled code -to a new library -might yield an unresolved reference -to @code{G77_vxtidate_0}. -(The new library calls it @code{G77_vxtidate_y2kbug_0}.) - -The proper fix for the above problems -is to obtain the latest release of @command{g77} -and related products -(including @code{libg2c}) -and install them on all systems, -then recompile, relink, and install -(as appropriate) -all existing Fortran programs. - -(Normally, this sort of renaming is steadfastly avoided. -In this case, however, it seems more important to highlight -potential Y2K problems -than to ease the transition -of potentially non-Y2K-compliant code -to new versions of @command{g77} and @code{libg2c}.) - -@node Array Size -@subsection Array Size -@cindex limits, array size -@cindex array size - -Currently, @command{g77} uses the default @code{INTEGER} type -for array indexes, -which limits the sizes of single-dimension arrays -on systems offering a larger address space -than can be addressed by that type. -(That @command{g77} puts all arrays in memory -could be considered another limitation---it -could use large temporary files---but that decision -is left to the programmer as an implementation choice -by most Fortran implementations.) - -@c ??? Investigate this, to offer a more clear statement -@c than the following paragraphs do. -- burley 1999-02-17 -It is not yet clear whether this limitation -never, sometimes, or always applies to the -sizes of multiple-dimension arrays as a whole. - -For example, on a system with 64-bit addresses -and 32-bit default @code{INTEGER}, -an array with a size greater than can be addressed -by a 32-bit offset -can be declared using multiple dimensions. -Such an array is therefore larger -than a single-dimension array can be, -on the same system. - -@cindex limits, multi-dimension arrays -@cindex multi-dimension arrays -@cindex arrays, dimensioning -Whether large multiple-dimension arrays are reliably supported -depends mostly on the @command{gcc} back end (code generator) -used by @command{g77}, and has not yet been fully investigated. - -@node Character-variable Length -@subsection Character-variable Length -@cindex limits, on character-variable length -@cindex character-variable length - -Currently, @command{g77} uses the default @code{INTEGER} type -for the lengths of @code{CHARACTER} variables -and array elements. - -This means that, for example, -a system with a 64-bit address space -and a 32-bit default @code{INTEGER} type -does not, under @command{g77}, -support a @code{CHARACTER*@var{n}} declaration -where @var{n} is greater than 2147483647. - -@node Year 10000 (Y10K) Problems -@subsection Year 10000 (Y10K) Problems -@cindex Y10K compliance -@cindex Year 10000 compliance - -Most intrinsics returning, or computing values based on, -date information are prone to Year-10000 (Y10K) problems, -due to supporting only 4 digits for the year. - -See the following for examples: -@ref{FDate Intrinsic (function)}, @ref{FDate Intrinsic (subroutine)}, -@ref{IDate Intrinsic (UNIX)}, -@ref{Time Intrinsic (VXT)}, -@ref{Date_and_Time Intrinsic}. - -@node Compiler Types -@section Compiler Types -@cindex types, of data -@cindex data types - -Fortran implementations have a fair amount of freedom given them by the -standard as far as how much storage space is used and how much precision -and range is offered by the various types such as @code{LOGICAL(KIND=1)}, -@code{INTEGER(KIND=1)}, @code{REAL(KIND=1)}, @code{REAL(KIND=2)}, -@code{COMPLEX(KIND=1)}, and @code{CHARACTER}. -Further, many compilers offer so-called @samp{*@var{n}} notation, but -the interpretation of @var{n} varies across compilers and target architectures. - -The standard requires that @code{LOGICAL(KIND=1)}, @code{INTEGER(KIND=1)}, -and @code{REAL(KIND=1)} -occupy the same amount of storage space, and that @code{COMPLEX(KIND=1)} -and @code{REAL(KIND=2)} take twice as much storage space as @code{REAL(KIND=1)}. -Further, it requires that @code{COMPLEX(KIND=1)} -entities be ordered such that when a @code{COMPLEX(KIND=1)} variable is -storage-associated (such as via @code{EQUIVALENCE}) -with a two-element @code{REAL(KIND=1)} array named @samp{R}, @samp{R(1)} -corresponds to the real element and @samp{R(2)} to the imaginary -element of the @code{COMPLEX(KIND=1)} variable. - -(Few requirements as to precision or ranges of any of these are -placed on the implementation, nor is the relationship of storage sizes of -these types to the @code{CHARACTER} type specified, by the standard.) - -@command{g77} follows the above requirements, warning when compiling -a program requires placement of items in memory that contradict the -requirements of the target architecture. -(For example, a program can require placement of a @code{REAL(KIND=2)} -on a boundary that is not an even multiple of its size, but still an -even multiple of the size of a @code{REAL(KIND=1)} variable. -On some target architectures, using the canonical -mapping of Fortran types to underlying architectural types, such -placement is prohibited by the machine definition or -the Application Binary Interface (ABI) in force for -the configuration defined for building @command{gcc} and @command{g77}. -@command{g77} warns about such -situations when it encounters them.) - -@command{g77} follows consistent rules for configuring the mapping between Fortran -types, including the @samp{*@var{n}} notation, and the underlying architectural -types as accessed by a similarly-configured applicable version of the -@command{gcc} compiler. -These rules offer a widely portable, consistent Fortran/C -environment, although they might well conflict with the expectations of -users of Fortran compilers designed and written for particular -architectures. - -These rules are based on the configuration that is in force for the -version of @command{gcc} built in the same release as @command{g77} (and -which was therefore used to build both the @command{g77} compiler -components and the @code{libg2c} run-time library): - -@table @code -@cindex REAL(KIND=1) type -@cindex types, REAL(KIND=1) -@item REAL(KIND=1) -Same as @code{float} type. - -@cindex REAL(KIND=2) type -@cindex types, REAL(KIND=2) -@item REAL(KIND=2) -Same as whatever floating-point type that is twice the size -of a @code{float}---usually, this is a @code{double}. - -@cindex INTEGER(KIND=1) type -@cindex types, INTEGER(KIND=1) -@item INTEGER(KIND=1) -Same as an integral type that is occupies the same amount -of memory storage as @code{float}---usually, this is either -an @code{int} or a @code{long int}. - -@cindex LOGICAL(KIND=1) type -@cindex types, LOGICAL(KIND=1) -@item LOGICAL(KIND=1) -Same @command{gcc} type as @code{INTEGER(KIND=1)}. - -@cindex INTEGER(KIND=2) type -@cindex types, INTEGER(KIND=2) -@item INTEGER(KIND=2) -Twice the size, and usually nearly twice the range, -as @code{INTEGER(KIND=1)}---usually, this is either -a @code{long int} or a @code{long long int}. - -@cindex LOGICAL(KIND=2) type -@cindex types, LOGICAL(KIND=2) -@item LOGICAL(KIND=2) -Same @command{gcc} type as @code{INTEGER(KIND=2)}. - -@cindex INTEGER(KIND=3) type -@cindex types, INTEGER(KIND=3) -@item INTEGER(KIND=3) -Same @command{gcc} type as signed @code{char}. - -@cindex LOGICAL(KIND=3) type -@cindex types, LOGICAL(KIND=3) -@item LOGICAL(KIND=3) -Same @command{gcc} type as @code{INTEGER(KIND=3)}. - -@cindex INTEGER(KIND=6) type -@cindex types, INTEGER(KIND=6) -@item INTEGER(KIND=6) -Twice the size, and usually nearly twice the range, -as @code{INTEGER(KIND=3)}---usually, this is -a @code{short}. - -@cindex LOGICAL(KIND=6) type -@cindex types, LOGICAL(KIND=6) -@item LOGICAL(KIND=6) -Same @command{gcc} type as @code{INTEGER(KIND=6)}. - -@cindex COMPLEX(KIND=1) type -@cindex types, COMPLEX(KIND=1) -@item COMPLEX(KIND=1) -Two @code{REAL(KIND=1)} scalars (one for the real part followed by -one for the imaginary part). - -@cindex COMPLEX(KIND=2) type -@cindex types, COMPLEX(KIND=2) -@item COMPLEX(KIND=2) -Two @code{REAL(KIND=2)} scalars. - -@cindex *@var{n} notation -@item @var{numeric-type}*@var{n} -(Where @var{numeric-type} is any type other than @code{CHARACTER}.) -Same as whatever @command{gcc} type occupies @var{n} times the storage -space of a @command{gcc} @code{char} item. - -@cindex DOUBLE PRECISION type -@cindex types, DOUBLE PRECISION -@item DOUBLE PRECISION -Same as @code{REAL(KIND=2)}. - -@cindex DOUBLE COMPLEX type -@cindex types, DOUBLE COMPLEX -@item DOUBLE COMPLEX -Same as @code{COMPLEX(KIND=2)}. -@end table - -Note that the above are proposed correspondences and might change -in future versions of @command{g77}---avoid writing code depending -on them. - -Other types supported by @command{g77} -are derived from gcc types such as @code{char}, @code{short}, -@code{int}, @code{long int}, @code{long long int}, @code{long double}, -and so on. -That is, whatever types @command{gcc} already supports, @command{g77} supports -now or probably will support in a future version. -The rules for the @samp{@var{numeric-type}*@var{n}} notation -apply to these types, -and new values for @samp{@var{numeric-type}(KIND=@var{n})} will be -assigned in a way that encourages clarity, consistency, and portability. - -@node Compiler Constants -@section Compiler Constants -@cindex constants -@cindex types, constants - -@command{g77} strictly assigns types to @emph{all} constants not -documented as ``typeless'' (typeless constants including @samp{'1'Z}, -for example). -Many other Fortran compilers attempt to assign types to typed constants -based on their context. -This results in hard-to-find bugs, nonportable -code, and is not in the spirit (though it strictly follows the letter) -of the 77 and 90 standards. - -@command{g77} might offer, in a future release, explicit constructs by -which a wider variety of typeless constants may be specified, and/or -user-requested warnings indicating places where @command{g77} might differ -from how other compilers assign types to constants. - -@xref{Context-Sensitive Constants}, for more information on this issue. - -@node Compiler Intrinsics -@section Compiler Intrinsics - -@command{g77} offers an ever-widening set of intrinsics. -Currently these all are procedures (functions and subroutines). - -Some of these intrinsics are unimplemented, but their names reserved -to reduce future problems with existing code as they are implemented. -Others are implemented as part of the GNU Fortran language, while -yet others are provided for compatibility with other dialects of -Fortran but are not part of the GNU Fortran language. - -To manage these distinctions, @command{g77} provides intrinsic @emph{groups}, -a facility that is simply an extension of the intrinsic groups provided -by the GNU Fortran language. - -@menu -* Intrinsic Groups:: How intrinsics are grouped for easy management. -* Other Intrinsics:: Intrinsics other than those in the GNU - Fortran language. -@end menu - -@node Intrinsic Groups -@subsection Intrinsic Groups -@cindex groups of intrinsics -@cindex intrinsics, groups - -A given specific intrinsic belongs in one or more groups. -Each group is deleted, disabled, hidden, or enabled -by default or a command-line option. -The meaning of each term follows. - -@table @b -@cindex deleted intrinsics -@cindex intrinsics, deleted -@item Deleted -No intrinsics are recognized as belonging to that group. - -@cindex disabled intrinsics -@cindex intrinsics, disabled -@item Disabled -Intrinsics are recognized as belonging to the group, but -references to them (other than via the @code{INTRINSIC} statement) -are disallowed through that group. - -@cindex hidden intrinsics -@cindex intrinsics, hidden -@item Hidden -Intrinsics in that group are recognized and enabled (if implemented) -@emph{only} if the first mention of the actual name of an intrinsic -in a program unit is in an @code{INTRINSIC} statement. - -@cindex enabled intrinsics -@cindex intrinsics, enabled -@item Enabled -Intrinsics in that group are recognized and enabled (if implemented). -@end table - -The distinction between deleting and disabling a group is illustrated -by the following example. -Assume intrinsic @samp{FOO} belongs only to group @samp{FGR}. -If group @samp{FGR} is deleted, the following program unit will -successfully compile, because @samp{FOO()} will be seen as a -reference to an external function named @samp{FOO}: - -@example -PRINT *, FOO() -END -@end example - -@noindent -If group @samp{FGR} is disabled, compiling the above program will produce -diagnostics, either because the @samp{FOO} intrinsic is improperly invoked -or, if properly invoked, it is not enabled. -To change the above program so it references an external function @samp{FOO} -instead of the disabled @samp{FOO} intrinsic, -add the following line to the top: - -@example -EXTERNAL FOO -@end example - -@noindent -So, deleting a group tells @command{g77} to pretend as though the intrinsics in -that group do not exist at all, whereas disabling it tells @command{g77} to -recognize them as (disabled) intrinsics in intrinsic-like contexts. - -Hiding a group is like enabling it, but the intrinsic must be first -named in an @code{INTRINSIC} statement to be considered a reference to the -intrinsic rather than to an external procedure. -This might be the ``safest'' way to treat a new group of intrinsics -when compiling old -code, because it allows the old code to be generally written as if -those new intrinsics never existed, but to be changed to use them -by inserting @code{INTRINSIC} statements in the appropriate places. -However, it should be the goal of development to use @code{EXTERNAL} -for all names of external procedures that might be intrinsic names. - -If an intrinsic is in more than one group, it is enabled if any of its -containing groups are enabled; if not so enabled, it is hidden if -any of its containing groups are hidden; if not so hidden, it is disabled -if any of its containing groups are disabled; if not so disabled, it is -deleted. -This extra complication is necessary because some intrinsics, -such as @code{IBITS}, belong to more than one group, and hence should be -enabled if any of the groups to which they belong are enabled, and so -on. - -The groups are: - -@cindex intrinsics, groups of -@cindex groups of intrinsics -@table @code -@cindex @code{badu77} intrinsics group -@item badu77 -UNIX intrinsics having inappropriate forms (usually functions that -have intended side effects). - -@cindex @code{gnu} intrinsics group -@item gnu -Intrinsics the GNU Fortran language supports that are extensions to -the Fortran standards (77 and 90). - -@cindex @command{f2c} intrinsics group -@item f2c -Intrinsics supported by AT&T's @command{f2c} converter and/or @code{libf2c}. - -@cindex @code{f90} intrinsics group -@item f90 -Fortran 90 intrinsics. - -@cindex @code{mil} intrinsics group -@item mil -MIL-STD 1753 intrinsics (@code{MVBITS}, @code{IAND}, @code{BTEST}, and so on). - -@cindex @code{mil} intrinsics group -@item unix -UNIX intrinsics (@code{IARGC}, @code{EXIT}, @code{ERF}, and so on). - -@cindex @code{mil} intrinsics group -@item vxt -VAX/VMS FORTRAN (current as of v4) intrinsics. -@end table - -@node Other Intrinsics -@subsection Other Intrinsics -@cindex intrinsics, others -@cindex other intrinsics - -@command{g77} supports intrinsics other than those in the GNU Fortran -language proper. -This set of intrinsics is described below. - -@ifinfo -(Note that the empty lines appearing in the menu below -are not intentional---they result from a bug in the -@code{makeinfo} program.) -@end ifinfo - -@c The actual documentation for intrinsics comes from -@c intdoc.texi, which in turn is automatically generated -@c from the internal g77 tables in intrin.def _and_ the -@c largely hand-written text in intdoc.h. So, if you want -@c to change or add to existing documentation on intrinsics, -@c you probably want to edit intdoc.h. -@c -@clear familyF77 -@clear familyGNU -@clear familyASC -@clear familyMIL -@clear familyF90 -@set familyVXT -@set familyFVZ -@clear familyF2C -@clear familyF2U -@set familyBADU77 -@include intdoc.texi - -@node Other Compilers -@chapter Other Compilers - -An individual Fortran source file can be compiled to -an object (@file{*.o}) file instead of to the final -program executable. -This allows several portions of a program to be compiled -at different times and linked together whenever a new -version of the program is needed. -However, it introduces the issue of @dfn{object compatibility} -across the various object files (and libraries, or @file{*.a} -files) that are linked together to produce any particular -executable file. - -Object compatibility is an issue when combining, in one -program, Fortran code compiled by more than one compiler -(or more than one configuration of a compiler). -If the compilers -disagree on how to transform the names of procedures, there -will normally be errors when linking such programs. -Worse, if the compilers agree on naming, but disagree on issues -like how to pass parameters, return arguments, and lay out -@code{COMMON} areas, the earliest detected errors might be the -incorrect results produced by the program (and that assumes -these errors are detected, which is not always the case). - -Normally, @command{g77} generates code that is -object-compatible with code generated by a version of -@command{f2c} configured (with, for example, @file{f2c.h} definitions) -to be generally compatible with @command{g77} as built by @command{gcc}. -(Normally, @command{f2c} will, by default, conform to the appropriate -configuration, but it is possible that older or perhaps even newer -versions of @command{f2c}, or versions having certain configuration changes -to @command{f2c} internals, will produce object files that are -incompatible with @command{g77}.) - -For example, a Fortran string subroutine -argument will become two arguments on the C side: a @code{char *} -and an @code{int} length. - -Much of this compatibility results from the fact that -@command{g77} uses the same run-time library, -@code{libf2c}, used by @command{f2c}, -though @command{g77} gives its version the name @code{libg2c} -so as to avoid conflicts when linking, -installing them in the same directories, -and so on. - -Other compilers might or might not generate code that -is object-compatible with @code{libg2c} and current @command{g77}, -and some might offer such compatibility only when explicitly -selected via a command-line option to the compiler. - -@emph{Note: This portion of the documentation definitely needs a lot -of work!} - -@menu -* Dropping f2c Compatibility:: When speed is more important. -* Compilers Other Than f2c:: Interoperation with code from other compilers. -@end menu - -@node Dropping f2c Compatibility -@section Dropping @command{f2c} Compatibility - -Specifying @option{-fno-f2c} allows @command{g77} to generate, in -some cases, faster code, by not needing to allow to the possibility -of linking with code compiled by @command{f2c}. - -For example, this affects how @code{REAL(KIND=1)}, -@code{COMPLEX(KIND=1)}, and @code{COMPLEX(KIND=2)} functions are called. -With @option{-fno-f2c}, they are -compiled as returning the appropriate @command{gcc} type -(@code{float}, @code{__complex__ float}, @code{__complex__ double}, -in many configurations). - -With @option{-ff2c} in force, they -are compiled differently (with perhaps slower run-time performance) -to accommodate the restrictions inherent in @command{f2c}'s use of K&R -C as an intermediate language---@code{REAL(KIND=1)} functions -return C's @code{double} type, while @code{COMPLEX} functions return -@code{void} and use an extra argument pointing to a place for the functions to -return their values. - -It is possible that, in some cases, leaving @option{-ff2c} in force -might produce faster code than using @option{-fno-f2c}. -Feel free to experiment, but remember to experiment with changing the way -@emph{entire programs and their Fortran libraries are compiled} at -a time, since this sort of experimentation affects the interface -of code generated for a Fortran source file---that is, it affects -object compatibility. - -Note that @command{f2c} compatibility is a fairly static target to achieve, -though not necessarily perfectly so, since, like @command{g77}, it is -still being improved. -However, specifying @option{-fno-f2c} causes @command{g77} -to generate code that will probably be incompatible with code -generated by future versions of @command{g77} when the same option -is in force. -You should make sure you are always able to recompile complete -programs from source code when upgrading to new versions of @command{g77} -or @command{f2c}, especially when using options such as @option{-fno-f2c}. - -Therefore, if you are using @command{g77} to compile libraries and other -object files for possible future use and you don't want to require -recompilation for future use with subsequent versions of @command{g77}, -you might want to stick with @command{f2c} compatibility for now, and -carefully watch for any announcements about changes to the -@command{f2c}/@code{libf2c} interface that might affect existing programs -(thus requiring recompilation). - -It is probable that a future version of @command{g77} will not, -by default, generate object files compatible with @command{f2c}, -and that version probably would no longer use @code{libf2c}. -If you expect to depend on this compatibility in the -long term, use the options @samp{-ff2c -ff2c-library} when compiling -all of the applicable code. -This should cause future versions of @command{g77} either to produce -compatible code (at the expense of the availability of some features and -performance), or at the very least, to produce diagnostics. - -(The library @command{g77} produces will no longer be named @file{libg2c} -when it is no longer generally compatible with @file{libf2c}. -It will likely be referred to, and, if installed as a distinct -library, named @code{libg77}, or some other as-yet-unused name.) - -@node Compilers Other Than f2c -@section Compilers Other Than @command{f2c} - -On systems with Fortran compilers other than @command{f2c} and @command{g77}, -code compiled by @command{g77} is not expected to work -well with code compiled by the native compiler. -(This is true for @command{f2c}-compiled objects as well.) -Libraries compiled with the native compiler probably will have -to be recompiled with @command{g77} to be used with @command{g77}-compiled code. - -Reasons for such incompatibilities include: - -@itemize @bullet -@item -There might be differences in the way names of Fortran procedures -are translated for use in the system's object-file format. -For example, the statement @samp{CALL FOO} might be compiled -by @command{g77} to call a procedure the linker @command{ld} sees -given the name @samp{_foo_}, while the apparently corresponding -statement @samp{SUBROUTINE FOO} might be compiled by the -native compiler to define the linker-visible name @samp{_foo}, -or @samp{_FOO_}, and so on. - -@item -There might be subtle type mismatches which cause subroutine arguments -and function return values to get corrupted. - -This is why simply getting @command{g77} to -transform procedure names the same way a native -compiler does is not usually a good idea---unless -some effort has been made to ensure that, aside -from the way the two compilers transform procedure -names, everything else about the way they generate -code for procedure interfaces is identical. - -@item -Native compilers -use libraries of private I/O routines which will not be available -at link time unless you have the native compiler---and you would -have to explicitly ask for them. - -For example, on the Sun you -would have to add @samp{-L/usr/lang/SCx.x -lF77 -lV77} to the link -command. -@end itemize - -@node Other Languages -@chapter Other Languages - -@emph{Note: This portion of the documentation definitely needs a lot -of work!} - -@menu -* Interoperating with C and C++:: -@end menu - -@node Interoperating with C and C++ -@section Tools and advice for interoperating with C and C++ - -@cindex C, linking with -@cindex C++, linking with -@cindex linking with C -The following discussion assumes that you are running @command{g77} in @command{f2c} -compatibility mode, i.e.@: not using @option{-fno-f2c}. -It provides some -advice about quick and simple techniques for linking Fortran and C (or -C++), the most common requirement. -For the full story consult the -description of code generation. -@xref{Debugging and Interfacing}. - -When linking Fortran and C, it's usually best to use @command{g77} to do -the linking so that the correct libraries are included (including the -maths one). -If you're linking with C++ you will want to add -@option{-lstdc++}, @option{-lg++} or whatever. -If you need to use another -driver program (or @command{ld} directly), -you can find out what linkage -options @command{g77} passes by running @samp{g77 -v}. - -@menu -* C Interfacing Tools:: -* C Access to Type Information:: -* f2c Skeletons and Prototypes:: -* C++ Considerations:: -* Startup Code:: -@end menu - -@node C Interfacing Tools -@subsection C Interfacing Tools -@pindex f2c -@cindex cfortran.h -@cindex Netlib -Even if you don't actually use it as a compiler, @command{f2c} from -@uref{ftp://ftp.netlib.org/f2c/src}, can be a useful tool when you're -interfacing (linking) Fortran and C@. -@xref{f2c Skeletons and Prototypes,,Generating Skeletons and Prototypes with @command{f2c}}. - -To use @command{f2c} for this purpose you only need retrieve and -build the @file{src} directory from the distribution, consult the -@file{README} instructions there for machine-specifics, and install the -@command{f2c} program on your path. - -Something else that might be useful is @samp{cfortran.h} from -@uref{ftp://zebra.desy.de/cfortran}. -This is a fairly general tool which -can be used to generate interfaces for calling in both directions -between Fortran and C@. -It can be used in @command{f2c} mode with -@command{g77}---consult its documentation for details. - -@node C Access to Type Information -@subsection Accessing Type Information in C - -@cindex types, Fortran/C -Generally, C code written to link with -@command{g77} code---calling and/or being -called from Fortran---should @samp{#include } to define the C -versions of the Fortran types. -Don't assume Fortran @code{INTEGER} types -correspond to C @code{int}s, for instance; instead, declare them as -@code{integer}, a type defined by @file{g2c.h}. -@file{g2c.h} is installed where @command{gcc} will find it by -default, assuming you use a copy of @command{gcc} compatible with -@command{g77}, probably built at the same time as @command{g77}. - -@node f2c Skeletons and Prototypes -@subsection Generating Skeletons and Prototypes with @command{f2c} - -@pindex f2c -@cindex -fno-second-underscore -A simple and foolproof way to write @command{g77}-callable C routines---e.g.@: to -interface with an existing library---is to write a file (named, for -example, @file{fred.f}) of dummy Fortran -skeletons comprising just the declaration of the routine(s) and dummy -arguments plus @code{END} statements. -Then run @command{f2c} on file @file{fred.f} to produce @file{fred.c} -into which you can edit -useful code, confident the calling sequence is correct, at least. -(There are some errors otherwise commonly made in generating C -interfaces with @command{f2c} conventions, -such as not using @code{doublereal} -as the return type of a @code{REAL} @code{FUNCTION}.) - -@pindex ftnchek -@command{f2c} also can help with calling Fortran from C, using its -@option{-P} option to generate C prototypes appropriate for calling the -Fortran.@footnote{The files generated like this can also be used for -inter-unit consistency checking of dummy and actual arguments, although -the @command{ftnchek} tool from @uref{ftp://ftp.netlib.org/fortran} -or @uref{ftp://ftp.dsm.fordham.edu} is -probably better for this purpose.} -If the Fortran code containing any -routines to be called from C is in file @file{joe.f}, use the command -@kbd{f2c -P joe.f} to generate the file @file{joe.P} containing -prototype information. -@code{#include} this in the C which has to call -the Fortran routines to make sure you get it right. - -@xref{Arrays,,Arrays (DIMENSION)}, for information on the differences -between the way Fortran (including compilers like @command{g77}) and -C handle arrays. - -@node C++ Considerations -@subsection C++ Considerations - -@cindex C++ -@command{f2c} can be used to generate suitable code for compilation with a -C++ system using the @option{-C++} option. -The important thing about linking @command{g77}-compiled -code with C++ is that the prototypes for the @command{g77} -routines must specify C linkage to avoid name mangling. -So, use an @samp{extern "C"} declaration. -@command{f2c}'s @option{-C++} option will not take care -of this when generating skeletons or prototype files as above, however, -it will avoid clashes with C++ reserved words in addition to those in C@. - -@node Startup Code -@subsection Startup Code - -@cindex startup code -@cindex run-time, initialization -@cindex initialization, run-time -Unlike with some runtime systems, -it shouldn't be necessary -(unless there are bugs) -to use a Fortran main program unit to ensure the -runtime---specifically the I/O system---is initialized. - -However, to use the @command{g77} intrinsics @code{GETARG} and @code{IARGC}, -either the @code{main} routine from the @file{libg2c} library must be used, -or the @code{f_setarg} routine -(new as of @code{egcs} version 1.1 and @command{g77} version 0.5.23) -must be called with the appropriate @code{argc} and @code{argv} arguments -prior to the program calling @code{GETARG} or @code{IARGC}. - -To provide more flexibility for mixed-language programming -involving @command{g77} while allowing for shared libraries, -as of @code{egcs} version 1.1 and @command{g77} version 0.5.23, -@command{g77}'s @code{main} routine in @code{libg2c} -does the following, in order: - -@enumerate -@item -Calls @code{f_setarg} -with the incoming @code{argc} and @code{argv} arguments, -in the same order as for @code{main} itself. - -This sets up the command-line environment -for @code{GETARG} and @code{IARGC}. - -@item -Calls @code{f_setsig} (with no arguments). - -This sets up the signaling and exception environment. - -@item -Calls @code{f_init} (with no arguments). - -This initializes the I/O environment, -though that should not be necessary, -as all I/O functions in @code{libf2c} -are believed to call @code{f_init} automatically, -if necessary. - -(A future version of @command{g77} might skip this explicit step, -to speed up normal exit of a program.) - -@item -Arranges for @code{f_exit} to be called (with no arguments) -when the program exits. - -This ensures that the I/O environment is properly shut down -before the program exits normally. -Otherwise, output buffers might not be fully flushed, -scratch files might not be deleted, and so on. - -The simple way @code{main} does this is -to call @code{f_exit} itself after calling -@code{MAIN__} (in the next step). - -However, this does not catch the cases where the program -might call @code{exit} directly, -instead of using the @code{EXIT} intrinsic -(implemented as @code{exit_} in @code{libf2c}). - -So, @code{main} attempts to use -the operating environment's @code{onexit} or @code{atexit} -facility, if available, -to cause @code{f_exit} to be called automatically -upon any invocation of @code{exit}. - -@item -Calls @code{MAIN__} (with no arguments). - -This starts executing the Fortran main program unit for -the application. -(Both @command{g77} and @command{f2c} currently compile a main -program unit so that its global name is @code{MAIN__}.) - -@item -If no @code{onexit} or @code{atexit} is provided by the system, -calls @code{f_exit}. - -@item -Calls @code{exit} with a zero argument, -to signal a successful program termination. - -@item -Returns a zero value to the caller, -to signal a successful program termination, -in case @code{exit} doesn't exit on the system. -@end enumerate - -All of the above names are C @code{extern} names, -i.e.@: not mangled. - -When using the @code{main} procedure provided by @command{g77} -without a Fortran main program unit, -you need to provide @code{MAIN__} -as the entry point for your C code. -(Make sure you link the object file that defines that -entry point with the rest of your program.) - -To provide your own @code{main} procedure -in place of @command{g77}'s, -make sure you specify the object file defining that procedure -@emph{before} @option{-lg2c} on the @command{g77} command line. -Since the @option{-lg2c} option is implicitly provided, -this is usually straightforward. -(Use the @option{--verbose} option to see how and where -@command{g77} implicitly adds @option{-lg2c} in a command line -that will link the program. -Feel free to specify @option{-lg2c} explicitly, -as appropriate.) - -However, when providing your own @code{main}, -make sure you perform the appropriate tasks in the -appropriate order. -For example, if your @code{main} does not call @code{f_setarg}, -make sure the rest of your application does not call -@code{GETARG} or @code{IARGC}. - -And, if your @code{main} fails to ensure that @code{f_exit} -is called upon program exit, -some files might end up incompletely written, -some scratch files might be left lying around, -and some existing files being written might be left -with old data not properly truncated at the end. - -Note that, generally, the @command{g77} operating environment -does not depend on a procedure named @code{MAIN__} actually -being called prior to any other @command{g77}-compiled code. -That is, @code{MAIN__} does not, itself, -set up any important operating-environment characteristics -upon which other code might depend. -This might change in future versions of @command{g77}, -with appropriate notification in the release notes. - -For more information, consult the source code for the above routines. -These are in @file{@value{path-libf2c}/libF77/}, named @file{main.c}, -@file{setarg.c}, @file{setsig.c}, @file{getarg_.c}, and @file{iargc_.c}. - -Also, the file @file{@value{path-g77}/com.c} contains the code @command{g77} -uses to open-code (inline) references to @code{IARGC}. - -@node Debugging and Interfacing -@chapter Debugging and Interfacing -@cindex debugging -@cindex interfacing -@cindex calling C routines -@cindex C routines calling Fortran -@cindex f2c compatibility - -GNU Fortran currently generates code that is object-compatible with -the @command{f2c} converter. -Also, it avoids limitations in the current GBE, such as the -inability to generate a procedure with -multiple entry points, by generating code that is structured -differently (in terms of procedure names, scopes, arguments, and -so on) than might be expected. - -As a result, writing code in other languages that calls on, is -called by, or shares in-memory data with @command{g77}-compiled code generally -requires some understanding of the way @command{g77} compiles code for -various constructs. - -Similarly, using a debugger to debug @command{g77}-compiled -code, even if that debugger supports native Fortran debugging, generally -requires this sort of information. - -This section describes some of the basic information on how -@command{g77} compiles code for constructs involving interfaces to other -languages and to debuggers. - -@emph{Caution:} Much or all of this information pertains to only the current -release of @command{g77}, sometimes even to using certain compiler options -with @command{g77} (such as @option{-fno-f2c}). -Do not write code that depends on this -information without clearly marking said code as nonportable and -subject to review for every new release of @command{g77}. -This information -is provided primarily to make debugging of code generated by this -particular release of @command{g77} easier for the user, and partly to make -writing (generally nonportable) interface code easier. -Both of these -activities require tracking changes in new version of @command{g77} as they -are installed, because new versions can change the behaviors -described in this section. - -@menu -* Main Program Unit:: How @command{g77} compiles a main program unit. -* Procedures:: How @command{g77} constructs parameter lists - for procedures. -* Functions:: Functions returning floating-point or character data. -* Names:: Naming of user-defined variables, procedures, etc. -* Common Blocks:: Accessing common variables while debugging. -* Local Equivalence Areas:: Accessing @code{EQUIVALENCE} while debugging. -* Complex Variables:: How @command{g77} performs complex arithmetic. -* Arrays:: Dealing with (possibly multi-dimensional) arrays. -* Adjustable Arrays:: Special consideration for adjustable arrays. -* Alternate Entry Points:: How @command{g77} implements alternate @code{ENTRY}. -* Alternate Returns:: How @command{g77} handles alternate returns. -* Assigned Statement Labels:: How @command{g77} handles @code{ASSIGN}. -* Run-time Library Errors:: Meanings of some @code{IOSTAT=} values. -@end menu - -@node Main Program Unit -@section Main Program Unit (PROGRAM) -@cindex PROGRAM statement -@cindex statements, PROGRAM - -When @command{g77} compiles a main program unit, it gives it the public -procedure name @code{MAIN__}. -The @code{libg2c} library has the actual @code{main()} procedure -as is typical of C-based environments, and -it is this procedure that performs some initial start-up -activity and then calls @code{MAIN__}. - -Generally, @command{g77} and @code{libg2c} are designed so that you need not -include a main program unit written in Fortran in your program---it -can be written in C or some other language. -Especially for I/O handling, this is the case, although @command{g77} version 0.5.16 -includes a bug fix for @code{libg2c} that solved a problem with using the -@code{OPEN} statement as the first Fortran I/O activity in a program -without a Fortran main program unit. - -However, if you don't intend to use @command{g77} (or @command{f2c}) to compile -your main program unit---that is, if you intend to compile a @code{main()} -procedure using some other language---you should carefully -examine the code for @code{main()} in @code{libg2c}, found in the source -file @file{@value{path-libf2c}/libF77/main.c}, to see what kinds of things -might need to be done by your @code{main()} in order to provide the -Fortran environment your Fortran code is expecting. - -@cindex @code{IArgC} intrinsic -@cindex intrinsics, @code{IArgC} -@cindex @code{GetArg} intrinsic -@cindex intrinsics, @code{GetArg} -For example, @code{libg2c}'s @code{main()} sets up the information used by -the @code{IARGC} and @code{GETARG} intrinsics. -Bypassing @code{libg2c}'s @code{main()} -without providing a substitute for this activity would mean -that invoking @code{IARGC} and @code{GETARG} would produce undefined -results. - -@cindex debugging -@cindex main program unit, debugging -@cindex main() -@cindex MAIN__() -@cindex .gdbinit -When debugging, one implication of the fact that @code{main()}, which -is the place where the debugged program ``starts'' from the -debugger's point of view, is in @code{libg2c} is that you won't be -starting your Fortran program at a point you recognize as your -Fortran code. - -The standard way to get around this problem is to set a break -point (a one-time, or temporary, break point will do) at -the entrance to @code{MAIN__}, and then run the program. -A convenient way to do so is to add the @command{gdb} command - -@example -tbreak MAIN__ -@end example - -@noindent -to the file @file{.gdbinit} in the directory in which you're debugging -(using @command{gdb}). - -After doing this, the debugger will see the current execution -point of the program as at the beginning of the main program -unit of your program. - -Of course, if you really want to set a break point at some -other place in your program and just start the program -running, without first breaking at @code{MAIN__}, -that should work fine. - -@node Procedures -@section Procedures (SUBROUTINE and FUNCTION) -@cindex procedures -@cindex SUBROUTINE statement -@cindex statements, SUBROUTINE -@cindex FUNCTION statement -@cindex statements, FUNCTION -@cindex signature of procedures - -Currently, @command{g77} passes arguments via reference---specifically, -by passing a pointer to the location in memory of a variable, array, -array element, a temporary location that holds the result of evaluating an -expression, or a temporary or permanent location that holds the value -of a constant. - -Procedures that accept @code{CHARACTER} arguments are implemented by -@command{g77} so that each @code{CHARACTER} argument has two actual arguments. - -The first argument occupies the expected position in the -argument list and has the user-specified name. -This argument -is a pointer to an array of characters, passed by the caller. - -The second argument is appended to the end of the user-specified -calling sequence and is named @samp{__g77_length_@var{x}}, where @var{x} -is the user-specified name. -This argument is of the C type @code{ftnlen} -(see @file{@value{path-libf2c}/g2c.h.in} for information on that type) and -is the number of characters the caller has allocated in the -array pointed to by the first argument. - -A procedure will ignore the length argument if @samp{X} is not declared -@code{CHARACTER*(*)}, because for other declarations, it knows the -length. -Not all callers necessarily ``know'' this, however, which -is why they all pass the extra argument. - -The contents of the @code{CHARACTER} argument are specified by the -address passed in the first argument (named after it). -The procedure can read or write these contents as appropriate. - -When more than one @code{CHARACTER} argument is present in the argument -list, the length arguments are appended in the order -the original arguments appear. -So @samp{CALL FOO('HI','THERE')} is implemented in -C as @samp{foo("hi","there",2,5);}, ignoring the fact that @command{g77} -does not provide the trailing null bytes on the constant -strings (@command{f2c} does provide them, but they are unnecessary in -a Fortran environment, and you should not expect them to be -there). - -Note that the above information applies to @code{CHARACTER} variables and -arrays @strong{only}. -It does @strong{not} apply to external @code{CHARACTER} -functions or to intrinsic @code{CHARACTER} functions. -That is, no second length argument is passed to @samp{FOO} in this case: - -@example -CHARACTER X -EXTERNAL X -CALL FOO(X) -@end example - -@noindent -Nor does @samp{FOO} expect such an argument in this case: - -@example -SUBROUTINE FOO(X) -CHARACTER X -EXTERNAL X -@end example - -Because of this implementation detail, if a program has a bug -such that there is disagreement as to whether an argument is -a procedure, and the type of the argument is @code{CHARACTER}, subtle -symptoms might appear. - -@node Functions -@section Functions (FUNCTION and RETURN) -@cindex functions -@cindex FUNCTION statement -@cindex statements, FUNCTION -@cindex RETURN statement -@cindex statements, RETURN -@cindex return type of functions - -@command{g77} handles in a special way functions that return the following -types: - -@itemize @bullet -@item -@code{CHARACTER} -@item -@code{COMPLEX} -@item -@code{REAL(KIND=1)} -@end itemize - -For @code{CHARACTER}, @command{g77} implements a subroutine (a C function -returning @code{void}) -with two arguments prepended: @samp{__g77_result}, which the caller passes -as a pointer to a @code{char} array expected to hold the return value, -and @samp{__g77_length}, which the caller passes as an @code{ftnlen} value -specifying the length of the return value as declared in the calling -program. -For @code{CHARACTER*(*)}, the called function uses @samp{__g77_length} -to determine the size of the array that @samp{__g77_result} points to; -otherwise, it ignores that argument. - -For @code{COMPLEX}, when @option{-ff2c} is in -force, @command{g77} implements -a subroutine with one argument prepended: @samp{__g77_result}, which the -caller passes as a pointer to a variable of the type of the function. -The called function writes the return value into this variable instead -of returning it as a function value. -When @option{-fno-f2c} is in force, -@command{g77} implements a @code{COMPLEX} function as @command{gcc}'s -@samp{__complex__ float} or @samp{__complex__ double} function -(or an emulation thereof, when @option{-femulate-complex} is in effect), -returning the result of the function in the same way as @command{gcc} would. - -For @code{REAL(KIND=1)}, when @option{-ff2c} is in force, @command{g77} implements -a function that actually returns @code{REAL(KIND=2)} (typically -C's @code{double} type). -When @option{-fno-f2c} is in force, @code{REAL(KIND=1)} -functions return @code{float}. - -@node Names -@section Names -@cindex symbol names -@cindex transforming symbol names - -Fortran permits each implementation to decide how to represent -names as far as how they're seen in other contexts, such as debuggers -and when interfacing to other languages, and especially as far -as how casing is handled. - -External names---names of entities that are public, or ``accessible'', -to all modules in a program---normally have an underscore (@samp{_}) -appended by @command{g77}, -to generate code that is compatible with @command{f2c}. -External names include names of Fortran things like common blocks, -external procedures (subroutines and functions, but not including -statement functions, which are internal procedures), and entry point -names. - -However, use of the @option{-fno-underscoring} option -disables this kind of transformation of external names (though inhibiting -the transformation certainly improves the chances of colliding with -incompatible externals written in other languages---but that -might be intentional. - -@cindex -fno-underscoring option -@cindex options, -fno-underscoring -@cindex -fno-second-underscore option -@cindex options, -fno-underscoring -When @option{-funderscoring} is in force, any name (external or local) -that already has at least one underscore in it is -implemented by @command{g77} by appending two underscores. -(This second underscore can be disabled via the -@option{-fno-second-underscore} option.) -External names are changed this way for @command{f2c} compatibility. -Local names are changed this way to avoid collisions with external names -that are different in the source code---@command{f2c} does the same thing, but -there's no compatibility issue there except for user expectations while -debugging. - -For example: - -@example -Max_Cost = 0 -@end example - -@cindex debugging -@noindent -Here, a user would, in the debugger, refer to this variable using the -name @samp{max_cost__} (or @samp{MAX_COST__} or @samp{Max_Cost__}, -as described below). -(We hope to improve @command{g77} in this regard in the future---don't -write scripts depending on this behavior! -Also, consider experimenting with the @option{-fno-underscoring} -option to try out debugging without having to massage names by -hand like this.) - -@command{g77} provides a number of command-line options that allow the user -to control how case mapping is handled for source files. -The default is the traditional UNIX model for Fortran compilers---names -are mapped to lower case. -Other command-line options can be specified to map names to upper -case, or to leave them exactly as written in the source file. - -For example: - -@example -Foo = 9.436 -@end example - -@noindent -Here, it is normally the case that the variable assigned will be named -@samp{foo}. -This would be the name to enter when using a debugger to -access the variable. - -However, depending on the command-line options specified, the -name implemented by @command{g77} might instead be @samp{FOO} or even -@samp{Foo}, thus affecting how debugging is done. - -Also: - -@example -Call Foo -@end example - -@noindent -This would normally call a procedure that, if it were in a separate C program, -be defined starting with the line: - -@example -void foo_() -@end example - -@noindent -However, @command{g77} command-line options could be used to change the casing -of names, resulting in the name @samp{FOO_} or @samp{Foo_} being given to the -procedure instead of @samp{foo_}, and the @option{-fno-underscoring} option -could be used to inhibit the appending of the underscore to the name. - -@node Common Blocks -@section Common Blocks (COMMON) -@cindex common blocks -@cindex @code{COMMON} statement -@cindex statements, @code{COMMON} - -@command{g77} names and lays out @code{COMMON} areas -the same way @command{f2c} does, -for compatibility with @command{f2c}. - -@node Local Equivalence Areas -@section Local Equivalence Areas (EQUIVALENCE) -@cindex equivalence areas -@cindex local equivalence areas -@cindex EQUIVALENCE statement -@cindex statements, EQUIVALENCE - -@command{g77} treats storage-associated areas involving a @code{COMMON} -block as explained in the section on common blocks. - -A local @code{EQUIVALENCE} area is a collection of variables and arrays -connected to each other in any way via @code{EQUIVALENCE}, none of which are -listed in a @code{COMMON} statement. - -(@emph{Note:} @command{g77} version 0.5.18 and earlier chose the name -for @var{x} using a different method when more than one name was -in the list of names of entities placed at the beginning of the -array. -Though the documentation specified that the first name listed in -the @code{EQUIVALENCE} statements was chosen for @var{x}, @command{g77} -in fact chose the name using a method that was so complicated, -it seemed easier to change it to an alphabetical sort than to describe the -previous method in the documentation.) - -@node Complex Variables -@section Complex Variables (COMPLEX) -@cindex complex variables -@cindex imaginary part -@cindex COMPLEX statement -@cindex statements, COMPLEX - -As of 0.5.20, @command{g77} defaults to handling @code{COMPLEX} types -(and related intrinsics, constants, functions, and so on) -in a manner that -makes direct debugging involving these types in Fortran -language mode difficult. - -Essentially, @command{g77} implements these types using an -internal construct similar to C's @code{struct}, at least -as seen by the @command{gcc} back end. - -Currently, the back end, when outputting debugging info with -the compiled code for the assembler to digest, does not detect -these @code{struct} types as being substitutes for Fortran -complex. -As a result, the Fortran language modes of debuggers such as -@command{gdb} see these types as C @code{struct} types, which -they might or might not support. - -Until this is fixed, switch to C language mode to work with -entities of @code{COMPLEX} type and then switch back to Fortran language -mode afterward. -(In @command{gdb}, this is accomplished via @samp{set lang c} and -either @samp{set lang fortran} or @samp{set lang auto}.) - -@node Arrays -@section Arrays (DIMENSION) -@cindex DIMENSION statement -@cindex statements, DIMENSION -@cindex array ordering -@cindex ordering, array -@cindex column-major ordering -@cindex row-major ordering -@cindex arrays - -Fortran uses ``column-major ordering'' in its arrays. -This differs from other languages, such as C, which use ``row-major ordering''. -The difference is that, with Fortran, array elements adjacent to -each other in memory differ in the @emph{first} subscript instead of -the last; @samp{A(5,10,20)} immediately follows @samp{A(4,10,20)}, -whereas with row-major ordering it would follow @samp{A(5,10,19)}. - -This consideration -affects not only interfacing with and debugging Fortran code, -it can greatly affect how code is designed and written, especially -when code speed and size is a concern. - -Fortran also differs from C, a popular language for interfacing and -to support directly in debuggers, in the way arrays are treated. -In C, arrays are single-dimensional and have interesting relationships -to pointers, neither of which is true for Fortran. -As a result, dealing with Fortran arrays from within -an environment limited to C concepts can be challenging. - -For example, accessing the array element @samp{A(5,10,20)} is easy enough -in Fortran (use @samp{A(5,10,20)}), but in C some difficult machinations -are needed. -First, C would treat the A array as a single-dimension array. -Second, C does not understand low bounds for arrays as does Fortran. -Third, C assumes a low bound of zero (0), while Fortran defaults to a -low bound of one (1) and can supports an arbitrary low bound. -Therefore, calculations must be done -to determine what the C equivalent of @samp{A(5,10,20)} would be, and these -calculations require knowing the dimensions of @samp{A}. - -For @samp{DIMENSION A(2:11,21,0:29)}, the calculation of the offset of -@samp{A(5,10,20)} would be: - -@example - (5-2) -+ (10-1)*(11-2+1) -+ (20-0)*(11-2+1)*(21-1+1) -= 4293 -@end example - -@noindent -So the C equivalent in this case would be @samp{a[4293]}. - -When using a debugger directly on Fortran code, the C equivalent -might not work, because some debuggers cannot understand the notion -of low bounds other than zero. However, unlike @command{f2c}, @command{g77} -does inform the GBE that a multi-dimensional array (like @samp{A} -in the above example) is really multi-dimensional, rather than a -single-dimensional array, so at least the dimensionality of the array -is preserved. - -Debuggers that understand Fortran should have no trouble with -nonzero low bounds, but for non-Fortran debuggers, especially -C debuggers, the above example might have a C equivalent of -@samp{a[4305]}. -This calculation is arrived at by eliminating the subtraction -of the lower bound in the first parenthesized expression on each -line---that is, for @samp{(5-2)} substitute @samp{(5)}, for @samp{(10-1)} -substitute @samp{(10)}, and for @samp{(20-0)} substitute @samp{(20)}. -Actually, the implication of -this can be that the expression @samp{*(&a[2][1][0] + 4293)} works fine, -but that @samp{a[20][10][5]} produces the equivalent of -@samp{*(&a[0][0][0] + 4305)} because of the missing lower bounds. - -Come to think of it, perhaps -the behavior is due to the debugger internally compensating for -the lower bounds by offsetting the base address of @samp{a}, leaving -@samp{&a} set lower, in this case, than @samp{&a[2][1][0]} (the address of -its first element as identified by subscripts equal to the -corresponding lower bounds). - -You know, maybe nobody really needs to use arrays. - -@node Adjustable Arrays -@section Adjustable Arrays (DIMENSION) -@cindex arrays, adjustable -@cindex adjustable arrays -@cindex arrays, automatic -@cindex automatic arrays -@cindex DIMENSION statement -@cindex statements, DIMENSION -@cindex dimensioning arrays -@cindex arrays, dimensioning - -Adjustable and automatic arrays in Fortran require the implementation -(in this -case, the @command{g77} compiler) to ``memorize'' the expressions that -dimension the arrays each time the procedure is invoked. -This is so that subsequent changes to variables used in those -expressions, made during execution of the procedure, do not -have any effect on the dimensions of those arrays. - -For example: - -@example -REAL ARRAY(5) -DATA ARRAY/5*2/ -CALL X(ARRAY, 5) -END -SUBROUTINE X(A, N) -DIMENSION A(N) -N = 20 -PRINT *, N, A -END -@end example - -@noindent -Here, the implementation should, when running the program, print something -like: - -@example -20 2. 2. 2. 2. 2. -@end example - -@noindent -Note that this shows that while the value of @samp{N} was successfully -changed, the size of the @samp{A} array remained at 5 elements. - -To support this, @command{g77} generates code that executes before any user -code (and before the internally generated computed @code{GOTO} to handle -alternate entry points, as described below) that evaluates each -(nonconstant) expression in the list of subscripts for an -array, and saves the result of each such evaluation to be used when -determining the size of the array (instead of re-evaluating the -expressions). - -So, in the above example, when @samp{X} is first invoked, code is -executed that copies the value of @samp{N} to a temporary. -And that same temporary serves as the actual high bound for the single -dimension of the @samp{A} array (the low bound being the constant 1). -Since the user program cannot (legitimately) change the value -of the temporary during execution of the procedure, the size -of the array remains constant during each invocation. - -For alternate entry points, the code @command{g77} generates takes into -account the possibility that a dummy adjustable array is not actually -passed to the actual entry point being invoked at that time. -In that case, the public procedure implementing the entry point -passes to the master private procedure implementing all the -code for the entry points a @code{NULL} pointer where a pointer to that -adjustable array would be expected. -The @command{g77}-generated code -doesn't attempt to evaluate any of the expressions in the subscripts -for an array if the pointer to that array is @code{NULL} at run time in -such cases. -(Don't depend on this particular implementation -by writing code that purposely passes @code{NULL} pointers where the -callee expects adjustable arrays, even if you know the callee -won't reference the arrays---nor should you pass @code{NULL} pointers -for any dummy arguments used in calculating the bounds of such -arrays or leave undefined any values used for that purpose in -COMMON---because the way @command{g77} implements these things might -change in the future!) - -@node Alternate Entry Points -@section Alternate Entry Points (ENTRY) -@cindex alternate entry points -@cindex entry points -@cindex ENTRY statement -@cindex statements, ENTRY - -The GBE does not understand the general concept of -alternate entry points as Fortran provides via the ENTRY statement. -@command{g77} gets around this by using an approach to compiling procedures -having at least one @code{ENTRY} statement that is almost identical to the -approach used by @command{f2c}. -(An alternate approach could be used that -would probably generate faster, but larger, code that would also -be a bit easier to debug.) - -Information on how @command{g77} implements @code{ENTRY} is provided for those -trying to debug such code. -The choice of implementation seems -unlikely to affect code (compiled in other languages) that interfaces -to such code. - -@command{g77} compiles exactly one public procedure for the primary entry -point of a procedure plus each @code{ENTRY} point it specifies, as usual. -That is, in terms of the public interface, there is no difference -between - -@example -SUBROUTINE X -END -SUBROUTINE Y -END -@end example - -@noindent -and: - -@example -SUBROUTINE X -ENTRY Y -END -@end example - -The difference between the above two cases lies in the code compiled -for the @samp{X} and @samp{Y} procedures themselves, plus the fact that, -for the second case, an extra internal procedure is compiled. - -For every Fortran procedure with at least one @code{ENTRY} -statement, @command{g77} compiles an extra procedure -named @samp{__g77_masterfun_@var{x}}, where @var{x} is -the name of the primary entry point (which, in the above case, -using the standard compiler options, would be @samp{x_} in C). - -This extra procedure is compiled as a private procedure---that is, -a procedure not accessible by name to separately compiled modules. -It contains all the code in the program unit, including the code -for the primary entry point plus for every entry point. -(The code for each public procedure is quite short, and explained later.) - -The extra procedure has some other interesting characteristics. - -The argument list for this procedure is invented by @command{g77}. -It contains -a single integer argument named @samp{__g77_which_entrypoint}, -passed by value (as in Fortran's @samp{%VAL()} intrinsic), specifying the -entry point index---0 for the primary entry point, 1 for the -first entry point (the first @code{ENTRY} statement encountered), 2 for -the second entry point, and so on. - -It also contains, for functions returning @code{CHARACTER} and -(when @option{-ff2c} is in effect) @code{COMPLEX} functions, -and for functions returning different types among the -@code{ENTRY} statements (e.g. @samp{REAL FUNCTION R()} -containing @samp{ENTRY I()}), an argument named @samp{__g77_result} that -is expected at run time to contain a pointer to where to store -the result of the entry point. -For @code{CHARACTER} functions, this -storage area is an array of the appropriate number of characters; -for @code{COMPLEX} functions, it is the appropriate area for the return -type; for multiple-return-type functions, it is a union of all the supported return -types (which cannot include @code{CHARACTER}, since combining @code{CHARACTER} -and non-@code{CHARACTER} return types via @code{ENTRY} in a single function -is not supported by @command{g77}). - -For @code{CHARACTER} functions, the @samp{__g77_result} argument is followed -by yet another argument named @samp{__g77_length} that, at run time, -specifies the caller's expected length of the returned value. -Note that only @code{CHARACTER*(*)} functions and entry points actually -make use of this argument, even though it is always passed by -all callers of public @code{CHARACTER} functions (since the caller does not -generally know whether such a function is @code{CHARACTER*(*)} or whether -there are any other callers that don't have that information). - -The rest of the argument list is the union of all the arguments -specified for all the entry points (in their usual forms, e.g. -@code{CHARACTER} arguments have extra length arguments, all appended at -the end of this list). -This is considered the ``master list'' of -arguments. - -The code for this procedure has, before the code for the first -executable statement, code much like that for the following Fortran -statement: - -@smallexample - GOTO (100000,100001,100002), __g77_which_entrypoint -100000 @dots{}code for primary entry point@dots{} -100001 @dots{}code immediately following first ENTRY statement@dots{} -100002 @dots{}code immediately following second ENTRY statement@dots{} -@end smallexample - -@noindent -(Note that invalid Fortran statement labels and variable names -are used in the above example to highlight the fact that it -represents code generated by the @command{g77} internals, not code to be -written by the user.) - -It is this code that, when the procedure is called, picks which -entry point to start executing. - -Getting back to the public procedures (@samp{x} and @samp{Y} in the original -example), those procedures are fairly simple. -Their interfaces -are just like they would be if they were self-contained procedures -(without @code{ENTRY}), of course, since that is what the callers -expect. -Their code consists of simply calling the private -procedure, described above, with the appropriate extra arguments -(the entry point index, and perhaps a pointer to a multiple-type- -return variable, local to the public procedure, that contains -all the supported returnable non-character types). -For arguments -that are not listed for a given entry point that are listed for -other entry points, and therefore that are in the ``master list'' -for the private procedure, null pointers (in C, the @code{NULL} macro) -are passed. -Also, for entry points that are part of a multiple-type- -returning function, code is compiled after the call of the private -procedure to extract from the multi-type union the appropriate result, -depending on the type of the entry point in question, returning -that result to the original caller. - -When debugging a procedure containing alternate entry points, you -can either set a break point on the public procedure itself (e.g. -a break point on @samp{X} or @samp{Y}) or on the private procedure that -contains most of the pertinent code (e.g. @samp{__g77_masterfun_@var{x}}). -If you do the former, you should use the debugger's command to -``step into'' the called procedure to get to the actual code; with -the latter approach, the break point leaves you right at the -actual code, skipping over the public entry point and its call -to the private procedure (unless you have set a break point there -as well, of course). - -Further, the list of dummy arguments that is visible when the -private procedure is active is going to be the expanded version -of the list for whichever particular entry point is active, -as explained above, and the way in which return values are -handled might well be different from how they would be handled -for an equivalent single-entry function. - -@node Alternate Returns -@section Alternate Returns (SUBROUTINE and RETURN) -@cindex subroutines -@cindex alternate returns -@cindex SUBROUTINE statement -@cindex statements, SUBROUTINE -@cindex RETURN statement -@cindex statements, RETURN - -Subroutines with alternate returns (e.g. @samp{SUBROUTINE X(*)} and -@samp{CALL X(*50)}) are implemented by @command{g77} as functions returning -the C @code{int} type. -The actual alternate-return arguments are omitted from the calling sequence. -Instead, the caller uses -the return value to do a rough equivalent of the Fortran -computed-@code{GOTO} statement, as in @samp{GOTO (50), X()} in the -example above (where @samp{X} is quietly declared as an @code{INTEGER(KIND=1)} -function), and the callee just returns whatever integer -is specified in the @code{RETURN} statement for the subroutine -For example, @samp{RETURN 1} is implemented as @samp{X = 1} followed -by @samp{RETURN} -in C, and @samp{RETURN} by itself is @samp{X = 0} and @samp{RETURN}). - -@node Assigned Statement Labels -@section Assigned Statement Labels (ASSIGN and GOTO) -@cindex assigned statement labels -@cindex statement labels, assigned -@cindex ASSIGN statement -@cindex statements, ASSIGN -@cindex GOTO statement -@cindex statements, GOTO - -For portability to machines where a pointer (such as to a label, -which is how @command{g77} implements @code{ASSIGN} and its relatives, -the assigned-@code{GOTO} and assigned-@code{FORMAT}-I/O statements) -is wider (bitwise) than an @code{INTEGER(KIND=1)}, @command{g77} -uses a different memory location to hold the @code{ASSIGN}ed value of a variable -than it does the numerical value in that variable, unless the -variable is wide enough (can hold enough bits). - -In particular, while @command{g77} implements - -@example -I = 10 -@end example - -@noindent -as, in C notation, @samp{i = 10;}, it implements - -@example -ASSIGN 10 TO I -@end example - -@noindent -as, in GNU's extended C notation (for the label syntax), -@samp{__g77_ASSIGN_I = &&L10;} (where @samp{L10} is just a massaging -of the Fortran label @samp{10} to make the syntax C-like; @command{g77} doesn't -actually generate the name @samp{L10} or any other name like that, -since debuggers cannot access labels anyway). - -While this currently means that an @code{ASSIGN} statement does not -overwrite the numeric contents of its target variable, @emph{do not} -write any code depending on this feature. -@command{g77} has already changed this implementation across -versions and might do so in the future. -This information is provided only to make debugging Fortran programs -compiled with the current version of @command{g77} somewhat easier. -If there's no debugger-visible variable named @samp{__g77_ASSIGN_I} -in a program unit that does @samp{ASSIGN 10 TO I}, that probably -means @command{g77} has decided it can store the pointer to the label directly -into @samp{I} itself. - -@xref{Ugly Assigned Labels}, for information on a command-line option -to force @command{g77} to use the same storage for both normal and -assigned-label uses of a variable. - -@node Run-time Library Errors -@section Run-time Library Errors -@cindex IOSTAT= -@cindex error values -@cindex error messages -@cindex messages, run-time -@cindex I/O, errors - -The @code{libg2c} library currently has the following table to relate -error code numbers, returned in @code{IOSTAT=} variables, to messages. -This information should, in future versions of this document, be -expanded upon to include detailed descriptions of each message. - -In line with good coding practices, any of the numbers in the -list below should @emph{not} be directly written into Fortran -code you write. -Instead, make a separate @code{INCLUDE} file that defines -@code{PARAMETER} names for them, and use those in your code, -so you can more easily change the actual numbers in the future. - -The information below is culled from the definition -of @code{F_err} in @file{f/runtime/libI77/err.c} in the -@command{g77} source tree. - -@smallexample -100: "error in format" -101: "illegal unit number" -102: "formatted io not allowed" -103: "unformatted io not allowed" -104: "direct io not allowed" -105: "sequential io not allowed" -106: "can't backspace file" -107: "null file name" -108: "can't stat file" -109: "unit not connected" -110: "off end of record" -111: "truncation failed in endfile" -112: "incomprehensible list input" -113: "out of free space" -114: "unit not connected" -115: "read unexpected character" -116: "bad logical input field" -117: "bad variable type" -118: "bad namelist name" -119: "variable not in namelist" -120: "no end record" -121: "variable count incorrect" -122: "subscript for scalar variable" -123: "invalid array section" -124: "substring out of bounds" -125: "subscript out of bounds" -126: "can't read file" -127: "can't write file" -128: "'new' file exists" -129: "can't append to file" -130: "non-positive record number" -131: "I/O started while already doing I/O" -@end smallexample - -@node Collected Fortran Wisdom -@chapter Collected Fortran Wisdom -@cindex wisdom -@cindex legacy code -@cindex code, legacy -@cindex writing code -@cindex code, writing - -Most users of @command{g77} can be divided into two camps: - -@itemize @bullet -@item -Those writing new Fortran code to be compiled by @command{g77}. - -@item -Those using @command{g77} to compile existing, ``legacy'' code. -@end itemize - -Users writing new code generally understand most of the necessary -aspects of Fortran to write ``mainstream'' code, but often need -help deciding how to handle problems, such as the construction -of libraries containing @code{BLOCK DATA}. - -Users dealing with ``legacy'' code sometimes don't have much -experience with Fortran, but believe that the code they're compiling -already works when compiled by other compilers (and might -not understand why, as is sometimes the case, it doesn't work -when compiled by @command{g77}). - -The following information is designed to help users do a better job -coping with existing, ``legacy'' Fortran code, and with writing -new code as well. - -@menu -* Advantages Over f2c:: If @command{f2c} is so great, why @command{g77}? -* Block Data and Libraries:: How @command{g77} solves a common problem. -* Loops:: Fortran @code{DO} loops surprise many people. -* Working Programs:: Getting programs to work should be done first. -* Overly Convenient Options:: Temptations to avoid, habits to not form. -* Faster Programs:: Everybody wants these, but at what cost? -@end menu - -@node Advantages Over f2c -@section Advantages Over f2c - -Without @command{f2c}, @command{g77} would have taken much longer to -do and probably not been as good for quite a while. -Sometimes people who notice how much @command{g77} depends on, and -documents encouragement to use, @command{f2c} ask why @command{g77} -was created if @command{f2c} already existed. - -This section gives some basic answers to these questions, though it -is not intended to be comprehensive. - -@menu -* Language Extensions:: Features used by Fortran code. -* Diagnostic Abilities:: Abilities to spot problems early. -* Compiler Options:: Features helpful to accommodate legacy code, etc. -* Compiler Speed:: Speed of the compilation process. -* Program Speed:: Speed of the generated, optimized code. -* Ease of Debugging:: Debugging ease-of-use at the source level. -* Character and Hollerith Constants:: A byte saved is a byte earned. -@end menu - -@node Language Extensions -@subsection Language Extensions - -@command{g77} offers several extensions to FORTRAN 77 language that @command{f2c} -doesn't: - -@itemize @bullet -@item -Automatic arrays - -@item -@code{CYCLE} and @code{EXIT} - -@item -Construct names - -@item -@code{SELECT CASE} - -@item -@code{KIND=} and @code{LEN=} notation - -@item -Semicolon as statement separator - -@item -Constant expressions in @code{FORMAT} statements -(such as @samp{FORMAT(I)}, -where @samp{J} is a @code{PARAMETER} named constant) - -@item -@code{MvBits} intrinsic - -@item -@code{libU77} (Unix-compatibility) library, -with routines known to compiler as intrinsics -(so they work even when compiler options are used -to change the interfaces used by Fortran routines) -@end itemize - -@command{g77} also implements iterative @code{DO} loops -so that they work even in the presence of certain ``extreme'' inputs, -unlike @command{f2c}. -@xref{Loops}. - -However, @command{f2c} offers a few that @command{g77} doesn't, such as: - -@itemize @bullet -@item -Intrinsics in @code{PARAMETER} statements - -@item -Array bounds expressions (such as @samp{REAL M(N(2))}) - -@item -@code{AUTOMATIC} statement -@end itemize - -It is expected that @command{g77} will offer some or all of these missing -features at some time in the future. - -@node Diagnostic Abilities -@subsection Diagnostic Abilities - -@command{g77} offers better diagnosis of problems in @code{FORMAT} statements. -@command{f2c} doesn't, for example, emit any diagnostic for -@samp{FORMAT(XZFAJG10324)}, -leaving that to be diagnosed, at run time, by -the @code{libf2c} run-time library. - -@node Compiler Options -@subsection Compiler Options - -@command{g77} offers compiler options that @command{f2c} doesn't, -most of which are designed to more easily accommodate -legacy code: - -@itemize @bullet -@item -Two that control the automatic appending of extra -underscores to external names - -@item -One that allows dollar signs (@samp{$}) in symbol names - -@item -A variety that control acceptance of various -``ugly'' constructs - -@item -Several that specify acceptable use of upper and lower case -in the source code - -@item -Many that enable, disable, delete, or hide -groups of intrinsics - -@item -One to specify the length of fixed-form source lines -(normally 72) - -@item -One to specify the the source code is written in -Fortran-90-style free-form -@end itemize - -However, @command{f2c} offers a few that @command{g77} doesn't, -like an option to have @code{REAL} default to @code{REAL*8}. -It is expected that @command{g77} will offer all of the -missing options pertinent to being a Fortran compiler -at some time in the future. - -@node Compiler Speed -@subsection Compiler Speed - -Saving the steps of writing and then rereading C code is a big reason -why @command{g77} should be able to compile code much faster than using -@command{f2c} in conjunction with the equivalent invocation of @command{gcc}. - -However, due to @command{g77}'s youth, lots of self-checking is still being -performed. -As a result, this improvement is as yet unrealized -(though the potential seems to be there for quite a big speedup -in the future). -It is possible that, as of version 0.5.18, @command{g77} -is noticeably faster compiling many Fortran source files than using -@command{f2c} in conjunction with @command{gcc}. - -@node Program Speed -@subsection Program Speed - -@command{g77} has the potential to better optimize code than @command{f2c}, -even when @command{gcc} is used to compile the output of @command{f2c}, -because @command{f2c} must necessarily -translate Fortran into a somewhat lower-level language (C) that cannot -preserve all the information that is potentially useful for optimization, -while @command{g77} can gather, preserve, and transmit that information directly -to the GBE. - -For example, @command{g77} implements @code{ASSIGN} and assigned -@code{GOTO} using direct assignment of pointers to labels and direct -jumps to labels, whereas @command{f2c} maps the assigned labels to -integer values and then uses a C @code{switch} statement to encode -the assigned @code{GOTO} statements. - -However, as is typical, theory and reality don't quite match, at least -not in all cases, so it is still the case that @command{f2c} plus @command{gcc} -can generate code that is faster than @command{g77}. - -Version 0.5.18 of @command{g77} offered default -settings and options, via patches to the @command{gcc} -back end, that allow for better program speed, though -some of these improvements also affected the performance -of programs translated by @command{f2c} and then compiled -by @command{g77}'s version of @command{gcc}. - -Version 0.5.20 of @command{g77} offers further performance -improvements, at least one of which (alias analysis) is -not generally applicable to @command{f2c} (though @command{f2c} -could presumably be changed to also take advantage of -this new capability of the @command{gcc} back end, assuming -this is made available in an upcoming release of @command{gcc}). - -@node Ease of Debugging -@subsection Ease of Debugging - -Because @command{g77} compiles directly to assembler code like @command{gcc}, -instead of translating to an intermediate language (C) as does @command{f2c}, -support for debugging can be better for @command{g77} than @command{f2c}. - -However, although @command{g77} might be somewhat more ``native'' in terms of -debugging support than @command{f2c} plus @command{gcc}, there still are a lot -of things ``not quite right''. -Many of the important ones should be resolved in the near future. - -For example, @command{g77} doesn't have to worry about reserved names -like @command{f2c} does. -Given @samp{FOR = WHILE}, @command{f2c} must necessarily -translate this to something @emph{other} than -@samp{for = while;}, because C reserves those words. - -However, @command{g77} does still uses things like an extra level of indirection -for @code{ENTRY}-laden procedures---in this case, because the back end doesn't -yet support multiple entry points. - -Another example is that, given - -@smallexample -COMMON A, B -EQUIVALENCE (B, C) -@end smallexample - -@noindent -the @command{g77} user should be able to access the variables directly, by name, -without having to traverse C-like structures and unions, while @command{f2c} -is unlikely to ever offer this ability (due to limitations in the -C language). - -Yet another example is arrays. -@command{g77} represents them to the debugger -using the same ``dimensionality'' as in the source code, while @command{f2c} -must necessarily convert them all to one-dimensional arrays to fit -into the confines of the C language. -However, the level of support -offered by debuggers for interactive Fortran-style access to arrays -as compiled by @command{g77} can vary widely. -In some cases, it can actually -be an advantage that @command{f2c} converts everything to widely supported -C semantics. - -In fairness, @command{g77} could do many of the things @command{f2c} does -to get things working at least as well as @command{f2c}---for now, -the developers prefer making @command{g77} work the -way they think it is supposed to, and finding help improving the -other products (the back end of @command{gcc}; @command{gdb}; and so on) -to get things working properly. - -@node Character and Hollerith Constants -@subsection Character and Hollerith Constants -@cindex character constants -@cindex constants, character -@cindex Hollerith constants -@cindex constants, Hollerith -@cindex trailing null byte -@cindex null byte, trailing -@cindex zero byte, trailing - -To avoid the extensive hassle that would be needed to avoid this, -@command{f2c} uses C character constants to encode character and Hollerith -constants. -That means a constant like @samp{'HELLO'} is translated to -@samp{"hello"} in C, which further means that an extra null byte is -present at the end of the constant. -This null byte is superfluous. - -@command{g77} does not generate such null bytes. -This represents significant -savings of resources, such as on systems where @file{/dev/null} or -@file{/dev/zero} represent bottlenecks in the systems' performance, -because @command{g77} simply asks for fewer zeros from the operating -system than @command{f2c}. -(Avoiding spurious use of zero bytes, each byte typically have -eight zero bits, also reduces the liabilities in case -Microsoft's rumored patent on the digits 0 and 1 is upheld.) - -@node Block Data and Libraries -@section Block Data and Libraries -@cindex block data and libraries -@cindex BLOCK DATA statement -@cindex statements, BLOCK DATA -@cindex libraries, containing BLOCK DATA -@cindex f2c compatibility -@cindex compatibility, f2c - -To ensure that block data program units are linked, especially a concern -when they are put into libraries, give each one a name (as in -@samp{BLOCK DATA FOO}) and make sure there is an @samp{EXTERNAL FOO} -statement in every program unit that uses any common block -initialized by the corresponding @code{BLOCK DATA}. -@command{g77} currently compiles a @code{BLOCK DATA} as if it were a -@code{SUBROUTINE}, -that is, it generates an actual procedure having the appropriate name. -The procedure does nothing but return immediately if it happens to be -called. -For @samp{EXTERNAL FOO}, where @samp{FOO} is not otherwise referenced in the -same program unit, @command{g77} assumes there exists a @samp{BLOCK DATA FOO} -in the program and ensures that by generating a -reference to it so the linker will make sure it is present. -(Specifically, @command{g77} outputs in the data section a static pointer to the -external name @samp{FOO}.) - -The implementation @command{g77} currently uses to make this work is -one of the few things not compatible with @command{f2c} as currently -shipped. -@command{f2c} currently does nothing with @samp{EXTERNAL FOO} except -issue a warning that @samp{FOO} is not otherwise referenced, -and, for @samp{BLOCK DATA FOO}, -@command{f2c} doesn't generate a dummy procedure with the name @samp{FOO}. -The upshot is that you shouldn't mix @command{f2c} and @command{g77} in -this particular case. -If you use @command{f2c} to compile @samp{BLOCK DATA FOO}, -then any @command{g77}-compiled program unit that says @samp{EXTERNAL FOO} -will result in an unresolved reference when linked. -If you do the -opposite, then @samp{FOO} might not be linked in under various -circumstances (such as when @samp{FOO} is in a library, or you're -using a ``clever'' linker---so clever, it produces a broken program -with little or no warning by omitting initializations of global data -because they are contained in unreferenced procedures). - -The changes you make to your code to make @command{g77} handle this situation, -however, appear to be a widely portable way to handle it. -That is, many systems permit it (as they should, since the -FORTRAN 77 standard permits @samp{EXTERNAL FOO} when @samp{FOO} -is a block data program unit), and of the ones -that might not link @samp{BLOCK DATA FOO} under some circumstances, most of -them appear to do so once @samp{EXTERNAL FOO} is present in the appropriate -program units. - -Here is the recommended approach to modifying a program containing -a program unit such as the following: - -@smallexample -BLOCK DATA FOO -COMMON /VARS/ X, Y, Z -DATA X, Y, Z / 3., 4., 5. / -END -@end smallexample - -@noindent -If the above program unit might be placed in a library module, then -ensure that every program unit in every program that references that -particular @code{COMMON} area uses the @code{EXTERNAL} statement -to force the area to be initialized. - -For example, change a program unit that starts with - -@smallexample -INTEGER FUNCTION CURX() -COMMON /VARS/ X, Y, Z -CURX = X -END -@end smallexample - -@noindent -so that it uses the @code{EXTERNAL} statement, as in: - -@smallexample -INTEGER FUNCTION CURX() -COMMON /VARS/ X, Y, Z -EXTERNAL FOO -CURX = X -END -@end smallexample - -@noindent -That way, @samp{CURX} is compiled by @command{g77} (and many other -compilers) so that the linker knows it must include @samp{FOO}, -the @code{BLOCK DATA} program unit that sets the initial values -for the variables in @samp{VAR}, in the executable program. - -@node Loops -@section Loops -@cindex DO statement -@cindex statements, DO -@cindex trips, number of -@cindex number of trips - -The meaning of a @code{DO} loop in Fortran is precisely specified -in the Fortran standard@dots{}and is quite different from what -many programmers might expect. - -In particular, Fortran iterative @code{DO} loops are implemented as if -the number of trips through the loop is calculated @emph{before} -the loop is entered. - -The number of trips for a loop is calculated from the @var{start}, -@var{end}, and @var{increment} values specified in a statement such as: - -@smallexample -DO @var{iter} = @var{start}, @var{end}, @var{increment} -@end smallexample - -@noindent -The trip count is evaluated using a fairly simple formula -based on the three values following the @samp{=} in the -statement, and it is that trip count that is effectively -decremented during each iteration of the loop. -If, at the beginning of an iteration of the loop, the -trip count is zero or negative, the loop terminates. -The per-loop-iteration modifications to @var{iter} are not -related to determining whether to terminate the loop. - -There are two important things to remember about the trip -count: - -@itemize @bullet -@item -It can be @emph{negative}, in which case it is -treated as if it was zero---meaning the loop is -not executed at all. - -@item -The type used to @emph{calculate} the trip count -is the same type as @var{iter}, but the final -calculation, and thus the type of the trip -count itself, always is @code{INTEGER(KIND=1)}. -@end itemize - -These two items mean that there are loops that cannot -be written in straightforward fashion using the Fortran @code{DO}. - -For example, on a system with the canonical 32-bit two's-complement -implementation of @code{INTEGER(KIND=1)}, the following loop will not work: - -@smallexample -DO I = -2000000000, 2000000000 -@end smallexample - -@noindent -Although the @var{start} and @var{end} values are well within -the range of @code{INTEGER(KIND=1)}, the @emph{trip count} is not. -The expected trip count is 40000000001, which is outside -the range of @code{INTEGER(KIND=1)} on many systems. - -Instead, the above loop should be constructed this way: - -@smallexample -I = -2000000000 -DO - IF (I .GT. 2000000000) EXIT - @dots{} - I = I + 1 -END DO -@end smallexample - -@noindent -The simple @code{DO} construct and the @code{EXIT} statement -(used to leave the innermost loop) -are F90 features that @command{g77} supports. - -Some Fortran compilers have buggy implementations of @code{DO}, -in that they don't follow the standard. -They implement @code{DO} as a straightforward translation -to what, in C, would be a @code{for} statement. -Instead of creating a temporary variable to hold the trip count -as calculated at run time, these compilers -use the iteration variable @var{iter} to control -whether the loop continues at each iteration. - -The bug in such an implementation shows up when the -trip count is within the range of the type of @var{iter}, -but the magnitude of @samp{ABS(@var{end}) + ABS(@var{incr})} -exceeds that range. For example: - -@smallexample -DO I = 2147483600, 2147483647 -@end smallexample - -@noindent -A loop started by the above statement will work as implemented -by @command{g77}, but the use, by some compilers, of a -more C-like implementation akin to - -@smallexample -for (i = 2147483600; i <= 2147483647; ++i) -@end smallexample - -@noindent -produces a loop that does not terminate, because @samp{i} -can never be greater than 2147483647, since incrementing it -beyond that value overflows @samp{i}, setting it to -2147483648. -This is a large, negative number that still is less than 2147483647. - -Another example of unexpected behavior of @code{DO} involves -using a nonintegral iteration variable @var{iter}, that is, -a @code{REAL} variable. -Consider the following program: - -@smallexample - DATA BEGIN, END, STEP /.1, .31, .007/ - DO 10 R = BEGIN, END, STEP - IF (R .GT. END) PRINT *, R, ' .GT. ', END, '!!' - PRINT *,R -10 CONTINUE - PRINT *,'LAST = ',R - IF (R .LE. END) PRINT *, R, ' .LE. ', END, '!!' - END -@end smallexample - -@noindent -A C-like view of @code{DO} would hold that the two ``exclamatory'' -@code{PRINT} statements are never executed. -However, this is the output of running the above program -as compiled by @command{g77} on a GNU/Linux ix86 system: - -@smallexample - .100000001 - .107000001 - .114 - .120999999 - @dots{} - .289000005 - .296000004 - .303000003 -LAST = .310000002 - .310000002 .LE. .310000002!! -@end smallexample - -Note that one of the two checks in the program turned up -an apparent violation of the programmer's expectation---yet, -the loop is correctly implemented by @command{g77}, in that -it has 30 iterations. -This trip count of 30 is correct when evaluated using -the floating-point representations for the @var{begin}, -@var{end}, and @var{incr} values (.1, .31, .007) on GNU/Linux -ix86 are used. -On other systems, an apparently more accurate trip count -of 31 might result, but, nevertheless, @command{g77} is -faithfully following the Fortran standard, and the result -is not what the author of the sample program above -apparently expected. -(Such other systems might, for different values in the @code{DATA} -statement, violate the other programmer's expectation, -for example.) - -Due to this combination of imprecise representation -of floating-point values and the often-misunderstood -interpretation of @code{DO} by standard-conforming -compilers such as @command{g77}, use of @code{DO} loops -with @code{REAL} iteration -variables is not recommended. -Such use can be caught by specifying @option{-Wsurprising}. -@xref{Warning Options}, for more information on this -option. - -@node Working Programs -@section Working Programs - -Getting Fortran programs to work in the first place can be -quite a challenge---even when the programs already work on -other systems, or when using other compilers. - -@command{g77} offers some facilities that might be useful for -tracking down bugs in such programs. - -@menu -* Not My Type:: -* Variables Assumed To Be Zero:: -* Variables Assumed To Be Saved:: -* Unwanted Variables:: -* Unused Arguments:: -* Surprising Interpretations of Code:: -* Aliasing Assumed To Work:: -* Output Assumed To Flush:: -* Large File Unit Numbers:: -* Floating-point precision:: -* Inconsistent Calling Sequences:: -@end menu - -@node Not My Type -@subsection Not My Type -@cindex mistyped variables -@cindex variables, mistyped -@cindex mistyped functions -@cindex functions, mistyped -@cindex implicit typing - -A fruitful source of bugs in Fortran source code is use, or -mis-use, of Fortran's implicit-typing feature, whereby the -type of a variable, array, or function is determined by the -first character of its name. - -Simple cases of this include statements like @samp{LOGX=9.227}, -without a statement such as @samp{REAL LOGX}. -In this case, @samp{LOGX} is implicitly given @code{INTEGER(KIND=1)} -type, with the result of the assignment being that it is given -the value @samp{9}. - -More involved cases include a function that is defined starting -with a statement like @samp{DOUBLE PRECISION FUNCTION IPS(@dots{})}. -Any caller of this function that does not also declare @samp{IPS} -as type @code{DOUBLE PRECISION} (or, in GNU Fortran, @code{REAL(KIND=2)}) -is likely to assume it returns -@code{INTEGER}, or some other type, leading to invalid results -or even program crashes. - -The @option{-Wimplicit} option might catch failures to -properly specify the types of -variables, arrays, and functions in the code. - -However, in code that makes heavy use of Fortran's -implicit-typing facility, this option might produce so -many warnings about cases that are working, it would be -hard to find the one or two that represent bugs. -This is why so many experienced Fortran programmers strongly -recommend widespread use of the @code{IMPLICIT NONE} statement, -despite it not being standard FORTRAN 77, to completely turn -off implicit typing. -(@command{g77} supports @code{IMPLICIT NONE}, as do almost all -FORTRAN 77 compilers.) - -Note that @option{-Wimplicit} catches only implicit typing of -@emph{names}. -It does not catch implicit typing of expressions such -as @samp{X**(2/3)}. -Such expressions can be buggy as well---in fact, @samp{X**(2/3)} -is equivalent to @samp{X**0}, due to the way Fortran expressions -are given types and then evaluated. -(In this particular case, the programmer probably wanted -@samp{X**(2./3.)}.) - -@node Variables Assumed To Be Zero -@subsection Variables Assumed To Be Zero -@cindex zero-initialized variables -@cindex variables, assumed to be zero -@cindex uninitialized variables - -Many Fortran programs were developed on systems that provided -automatic initialization of all, or some, variables and arrays -to zero. -As a result, many of these programs depend, sometimes -inadvertently, on this behavior, though to do so violates -the Fortran standards. - -You can ask @command{g77} for this behavior by specifying the -@option{-finit-local-zero} option when compiling Fortran code. -(You might want to specify @option{-fno-automatic} as well, -to avoid code-size inflation for non-optimized compilations.) - -Note that a program that works better when compiled with the -@option{-finit-local-zero} option -is almost certainly depending on a particular system's, -or compiler's, tendency to initialize some variables to zero. -It might be worthwhile finding such cases and fixing them, -using techniques such as compiling with the @option{-O -Wuninitialized} -options using @command{g77}. - -@node Variables Assumed To Be Saved -@subsection Variables Assumed To Be Saved -@cindex variables, retaining values across calls -@cindex saved variables -@cindex static variables - -Many Fortran programs were developed on systems that -saved the values of all, or some, variables and arrays -across procedure calls. -As a result, many of these programs depend, sometimes -inadvertently, on being able to assign a value to a -variable, perform a @code{RETURN} to a calling procedure, -and, upon subsequent invocation, reference the previously -assigned variable to obtain the value. - -They expect this despite not using the @code{SAVE} statement -to specify that the value in a variable is expected to survive -procedure returns and calls. -Depending on variables and arrays to retain values across -procedure calls without using @code{SAVE} to require it violates -the Fortran standards. - -You can ask @command{g77} to assume @code{SAVE} is specified for all -relevant (local) variables and arrays by using the -@option{-fno-automatic} option. - -Note that a program that works better when compiled with the -@option{-fno-automatic} option -is almost certainly depending on not having to use -the @code{SAVE} statement as required by the Fortran standard. -It might be worthwhile finding such cases and fixing them, -using techniques such as compiling with the @samp{-O -Wuninitialized} -options using @command{g77}. - -@node Unwanted Variables -@subsection Unwanted Variables - -The @option{-Wunused} option can find bugs involving -implicit typing, sometimes -more easily than using @option{-Wimplicit} in code that makes -heavy use of implicit typing. -An unused variable or array might indicate that the -spelling for its declaration is different from that of -its intended uses. - -Other than cases involving typos, unused variables rarely -indicate actual bugs in a program. -However, investigating such cases thoroughly has, on occasion, -led to the discovery of code that had not been completely -written---where the programmer wrote declarations as needed -for the whole algorithm, wrote some or even most of the code -for that algorithm, then got distracted and forgot that the -job was not complete. - -@node Unused Arguments -@subsection Unused Arguments -@cindex unused arguments -@cindex arguments, unused - -As with unused variables, It is possible that unused arguments -to a procedure might indicate a bug. -Compile with @samp{-W -Wunused} option to catch cases of -unused arguments. - -Note that @option{-W} also enables warnings regarding overflow -of floating-point constants under certain circumstances. - -@node Surprising Interpretations of Code -@subsection Surprising Interpretations of Code - -The @option{-Wsurprising} option can help find bugs involving -expression evaluation or in -the way @code{DO} loops with non-integral iteration variables -are handled. -Cases found by this option might indicate a difference of -interpretation between the author of the code involved, and -a standard-conforming compiler such as @command{g77}. -Such a difference might produce actual bugs. - -In any case, changing the code to explicitly do what the -programmer might have expected it to do, so @command{g77} and -other compilers are more likely to follow the programmer's -expectations, might be worthwhile, especially if such changes -make the program work better. - -@node Aliasing Assumed To Work -@subsection Aliasing Assumed To Work -@cindex -falias-check option -@cindex options, -falias-check -@cindex -fargument-alias option -@cindex options, -fargument-alias -@cindex -fargument-noalias option -@cindex options, -fargument-noalias -@cindex -fno-argument-noalias-global option -@cindex options, -fno-argument-noalias-global -@cindex aliasing -@cindex anti-aliasing -@cindex overlapping arguments -@cindex overlays -@cindex association, storage -@cindex storage association -@cindex scheduling of reads and writes -@cindex reads and writes, scheduling - -The @option{-falias-check}, @option{-fargument-alias}, -@option{-fargument-noalias}, -and @option{-fno-argument-noalias-global} options, -introduced in version 0.5.20 and -@command{g77}'s version 2.7.2.2.f.2 of @command{gcc}, -were withdrawn as of @command{g77} version 0.5.23 -due to their not being supported by @command{gcc} version 2.8. - -These options control the assumptions regarding aliasing -(overlapping) of writes and reads to main memory (core) made -by the @command{gcc} back end. - -The information below still is useful, but applies to -only those versions of @command{g77} that support the -alias analysis implied by support for these options. - -These options are effective only when compiling with @option{-O} -(specifying any level other than @option{-O0}) -or with @option{-falias-check}. - -The default for Fortran code is @option{-fargument-noalias-global}. -(The default for C code and code written in other C-based languages -is @option{-fargument-alias}. -These defaults apply regardless of whether you use @command{g77} or -@command{gcc} to compile your code.) - -Note that, on some systems, compiling with @option{-fforce-addr} in -effect can produce more optimal code when the default aliasing -options are in effect (and when optimization is enabled). - -If your program is not working when compiled with optimization, -it is possible it is violating the Fortran standards (77 and 90) -by relying on the ability to ``safely'' modify variables and -arrays that are aliased, via procedure calls, to other variables -and arrays, without using @code{EQUIVALENCE} to explicitly -set up this kind of aliasing. - -(The FORTRAN 77 standard's prohibition of this sort of -overlap, generally referred to therein as ``storage -association'', appears in Sections 15.9.3.6. -This prohibition allows implementations, such as @command{g77}, -to, for example, implement the passing of procedures and -even values in @code{COMMON} via copy operations into local, -perhaps more efficiently accessed temporaries at entry to a -procedure, and, where appropriate, via copy operations back -out to their original locations in memory at exit from that -procedure, without having to take into consideration the -order in which the local copies are updated by the code, -among other things.) - -To test this hypothesis, try compiling your program with -the @option{-fargument-alias} option, which causes the -compiler to revert to assumptions essentially the same as -made by versions of @command{g77} prior to 0.5.20. - -If the program works using this option, that strongly suggests -that the bug is in your program. -Finding and fixing the bug(s) should result in a program that -is more standard-conforming and that can be compiled by @command{g77} -in a way that results in a faster executable. - -(You might want to try compiling with @option{-fargument-noalias}, -a kind of half-way point, to see if the problem is limited to -aliasing between dummy arguments and @code{COMMON} variables---this -option assumes that such aliasing is not done, while still allowing -aliasing among dummy arguments.) - -An example of aliasing that is invalid according to the standards -is shown in the following program, which might @emph{not} produce -the expected results when executed: - -@smallexample -I = 1 -CALL FOO(I, I) -PRINT *, I -END - -SUBROUTINE FOO(J, K) -J = J + K -K = J * K -PRINT *, J, K -END -@end smallexample - -The above program attempts to use the temporary aliasing of the -@samp{J} and @samp{K} arguments in @samp{FOO} to effect a -pathological behavior---the simultaneous changing of the values -of @emph{both} @samp{J} and @samp{K} when either one of them -is written. - -The programmer likely expects the program to print these values: - -@example -2 4 -4 -@end example - -However, since the program is not standard-conforming, an -implementation's behavior when running it is undefined, because -subroutine @samp{FOO} modifies at least one of the arguments, -and they are aliased with each other. -(Even if one of the assignment statements was deleted, the -program would still violate these rules. -This kind of on-the-fly aliasing is permitted by the standard -only when none of the aliased items are defined, or written, -while the aliasing is in effect.) - -As a practical example, an optimizing compiler might schedule -the @samp{J =} part of the second line of @samp{FOO} @emph{after} -the reading of @samp{J} and @samp{K} for the @samp{J * K} expression, -resulting in the following output: - -@example -2 2 -2 -@end example - -Essentially, compilers are promised (by the standard and, therefore, -by programmers who write code they claim to be standard-conforming) -that if they cannot detect aliasing via static analysis of a single -program unit's @code{EQUIVALENCE} and @code{COMMON} statements, no -such aliasing exists. -In such cases, compilers are free to assume that an assignment to -one variable will not change the value of another variable, allowing -it to avoid generating code to re-read the value of the other -variable, to re-schedule reads and writes, and so on, to produce -a faster executable. - -The same promise holds true for arrays (as seen by the called -procedure)---an element of one dummy array cannot be aliased -with, or overlap, any element of another dummy array or be -in a @code{COMMON} area known to the procedure. - -(These restrictions apply only when the procedure defines, or -writes to, one of the aliased variables or arrays.) - -Unfortunately, there is no way to find @emph{all} possible cases of -violations of the prohibitions against aliasing in Fortran code. -Static analysis is certainly imperfect, as is run-time analysis, -since neither can catch all violations. -(Static analysis can catch all likely violations, and some that -might never actually happen, while run-time analysis can catch -only those violations that actually happen during a particular run. -Neither approach can cope with programs mixing Fortran code with -routines written in other languages, however.) - -Currently, @command{g77} provides neither static nor run-time facilities -to detect any cases of this problem, although other products might. -Run-time facilities are more likely to be offered by future -versions of @command{g77}, though patches improving @command{g77} so that -it provides either form of detection are welcome. - -@node Output Assumed To Flush -@subsection Output Assumed To Flush -@cindex ALWAYS_FLUSH -@cindex synchronous write errors -@cindex disk full -@cindex flushing output -@cindex fflush() -@cindex I/O, flushing -@cindex output, flushing -@cindex writes, flushing -@cindex NFS -@cindex network file system - -For several versions prior to 0.5.20, @command{g77} configured its -version of the @code{libf2c} run-time library so that one of -its configuration macros, @code{ALWAYS_FLUSH}, was defined. - -This was done as a result of a belief that many programs expected -output to be flushed to the operating system (under UNIX, via -the @code{fflush()} library call) with the result that errors, -such as disk full, would be immediately flagged via the -relevant @code{ERR=} and @code{IOSTAT=} mechanism. - -Because of the adverse effects this approach had on the performance -of many programs, @command{g77} no longer configures @code{libf2c} -(now named @code{libg2c} in its @command{g77} incarnation) -to always flush output. - -If your program depends on this behavior, either insert the -appropriate @samp{CALL FLUSH} statements, or modify the sources -to the @code{libg2c}, rebuild and reinstall @command{g77}, and -relink your programs with the modified library. - -(Ideally, @code{libg2c} would offer the choice at run-time, so -that a compile-time option to @command{g77} or @command{f2c} could -result in generating the appropriate calls to flushing or -non-flushing library routines.) - -Some Fortran programs require output -(writes) to be flushed to the operating system (under UNIX, -via the @code{fflush()} library call) so that errors, -such as disk full, are immediately flagged via the relevant -@code{ERR=} and @code{IOSTAT=} mechanism, instead of such -errors being flagged later as subsequent writes occur, forcing -the previously written data to disk, or when the file is -closed. - -Essentially, the difference can be viewed as synchronous error -reporting (immediate flagging of errors during writes) versus -asynchronous, or, more precisely, buffered error reporting -(detection of errors might be delayed). - -@code{libg2c} supports flagging write errors immediately when -it is built with the @code{ALWAYS_FLUSH} macro defined. -This results in a @code{libg2c} that runs slower, sometimes -quite a bit slower, under certain circumstances---for example, -accessing files via the networked file system NFS---but the -effect can be more reliable, robust file I/O. - -If you know that Fortran programs requiring this level of precision -of error reporting are to be compiled using the -version of @command{g77} you are building, you might wish to -modify the @command{g77} source tree so that the version of -@code{libg2c} is built with the @code{ALWAYS_FLUSH} macro -defined, enabling this behavior. - -To do this, find this line in @file{@value{path-libf2c}/f2c.h} in -your @command{g77} source tree: - -@example -/* #define ALWAYS_FLUSH */ -@end example - -Remove the leading @samp{/*@w{ }}, -so the line begins with @samp{#define}, -and the trailing @samp{@w{ }*/}. - -Then build or rebuild @command{g77} as appropriate. - -@node Large File Unit Numbers -@subsection Large File Unit Numbers -@cindex MXUNIT -@cindex unit numbers -@cindex maximum unit number -@cindex illegal unit number -@cindex increasing maximum unit number - -If your program crashes at run time with a message including -the text @samp{illegal unit number}, that probably is -a message from the run-time library, @code{libg2c}. - -The message means that your program has attempted to use a -file unit number that is out of the range accepted by -@code{libg2c}. -Normally, this range is 0 through 99, and the high end -of the range is controlled by a @code{libg2c} source-file -macro named @code{MXUNIT}. - -If you can easily change your program to use unit numbers -in the range 0 through 99, you should do so. - -As distributed, whether as part of @command{f2c} or @command{g77}, -@code{libf2c} accepts file unit numbers only in the range -0 through 99. -For example, a statement such as @samp{WRITE (UNIT=100)} causes -a run-time crash in @code{libf2c}, because the unit number, -100, is out of range. - -If you know that Fortran programs at your installation require -the use of unit numbers higher than 99, you can change the -value of the @code{MXUNIT} macro, which represents the maximum unit -number, to an appropriately higher value. - -To do this, edit the file @file{@value{path-libf2c}/libI77/fio.h} in your -@command{g77} source tree, changing the following line: - -@example -#define MXUNIT 100 -@end example - -Change the line so that the value of @code{MXUNIT} is defined to be -at least one @emph{greater} than the maximum unit number used by -the Fortran programs on your system. - -(For example, a program that does @samp{WRITE (UNIT=255)} would require -@code{MXUNIT} set to at least 256 to avoid crashing.) - -Then build or rebuild @command{g77} as appropriate. - -@emph{Note:} Changing this macro has @emph{no} effect on other limits -your system might place on the number of files open at the same time. -That is, the macro might allow a program to do @samp{WRITE (UNIT=100)}, -but the library and operating system underlying @code{libf2c} might -disallow it if many other files have already been opened (via @code{OPEN} or -implicitly via @code{READ}, @code{WRITE}, and so on). -Information on how to increase these other limits should be found -in your system's documentation. - -@node Floating-point precision -@subsection Floating-point precision - -@cindex IEEE 754 conformance -@cindex conformance, IEEE 754 -@cindex floating-point, precision -@cindex ix86 floating-point -@cindex x86 floating-point -If your program depends on exact IEEE 754 floating-point handling it may -help on some systems---specifically x86 or m68k hardware---to use -the @option{-ffloat-store} option or to reset the precision flag on the -floating-point unit. -@xref{Optimize Options}. - -However, it might be better simply to put the FPU into double precision -mode and not take the performance hit of @option{-ffloat-store}. On x86 -and m68k GNU systems you can do this with a technique similar to that -for turning on floating-point exceptions -(@pxref{Floating-point Exception Handling}). -The control word could be set to double precision by some code like this -one: -@smallexample -#include -@{ - fpu_control_t cw = (_FPU_DEFAULT & ~_FPU_EXTENDED) | _FPU_DOUBLE; - _FPU_SETCW(cw); -@} -@end smallexample -(It is not clear whether this has any effect on the operation of the GNU -maths library, but we have no evidence of it causing trouble.) - -Some targets (such as the Alpha) may need special options for full IEEE -conformance. -@xref{Submodel Options,,Hardware Models and Configurations,gcc,Using -the GNU Compiler Collection (GCC)}. - -@node Inconsistent Calling Sequences -@subsection Inconsistent Calling Sequences - -@pindex ftnchek -@cindex floating-point, errors -@cindex ix86 FPU stack -@cindex x86 FPU stack -Code containing inconsistent calling sequences in the same file is -normally rejected---see @ref{GLOBALS}. -(Use, say, @command{ftnchek} to ensure -consistency across source files. -@xref{f2c Skeletons and Prototypes,, -Generating Skeletons and Prototypes with @command{f2c}}.) - -Mysterious errors, which may appear to be code generation problems, can -appear specifically on the x86 architecture with some such -inconsistencies. On x86 hardware, floating-point return values of -functions are placed on the floating-point unit's register stack, not -the normal stack. Thus calling a @code{REAL} or @code{DOUBLE PRECISION} -@code{FUNCTION} as some other sort of procedure, or vice versa, -scrambles the floating-point stack. This may break unrelated code -executed later. Similarly if, say, external C routines are written -incorrectly. - -@node Overly Convenient Options -@section Overly Convenient Command-line Options -@cindex overly convenient options -@cindex options, overly convenient - -These options should be used only as a quick-and-dirty way to determine -how well your program will run under different compilation models -without having to change the source. -Some are more problematic -than others, depending on how portable and maintainable you want the -program to be (and, of course, whether you are allowed to change it -at all is crucial). - -You should not continue to use these command-line options to compile -a given program, but rather should make changes to the source code: - -@table @code -@cindex -finit-local-zero option -@cindex options, -finit-local-zero -@item -finit-local-zero -(This option specifies that any uninitialized local variables -and arrays have default initialization to binary zeros.) - -Many other compilers do this automatically, which means lots of -Fortran code developed with those compilers depends on it. - -It is safer (and probably -would produce a faster program) to find the variables and arrays that -need such initialization and provide it explicitly via @code{DATA}, so that -@option{-finit-local-zero} is not needed. - -Consider using @option{-Wuninitialized} (which requires @option{-O}) to -find likely candidates, but -do not specify @option{-finit-local-zero} or @option{-fno-automatic}, -or this technique won't work. - -@cindex -fno-automatic option -@cindex options, -fno-automatic -@item -fno-automatic -(This option specifies that all local variables and arrays -are to be treated as if they were named in @code{SAVE} statements.) - -Many other compilers do this automatically, which means lots of -Fortran code developed with those compilers depends on it. - -The effect of this is that all non-automatic variables and arrays -are made static, that is, not placed on the stack or in heap storage. -This might cause a buggy program to appear to work better. -If so, rather than relying on this command-line option (and hoping all -compilers provide the equivalent one), add @code{SAVE} -statements to some or all program unit sources, as appropriate. -Consider using @option{-Wuninitialized} (which requires @option{-O}) -to find likely candidates, but -do not specify @option{-finit-local-zero} or @option{-fno-automatic}, -or this technique won't work. - -The default is @option{-fautomatic}, which tells @command{g77} to try -and put variables and arrays on the stack (or in fast registers) -where possible and reasonable. -This tends to make programs faster. - -@cindex automatic arrays -@cindex arrays, automatic -@emph{Note:} Automatic variables and arrays are not affected -by this option. -These are variables and arrays that are @emph{necessarily} automatic, -either due to explicit statements, or due to the way they are -declared. -Examples include local variables and arrays not given the -@code{SAVE} attribute in procedures declared @code{RECURSIVE}, -and local arrays declared with non-constant bounds (automatic -arrays). -Currently, @command{g77} supports only automatic arrays, not -@code{RECURSIVE} procedures or other means of explicitly -specifying that variables or arrays are automatic. - -@cindex -f@var{group}-intrinsics-hide option -@cindex options, -f@var{group}-intrinsics-hide -@item -f@var{group}-intrinsics-hide -Change the source code to use @code{EXTERNAL} for any external procedure -that might be the name of an intrinsic. -It is easy to find these using @option{-f@var{group}-intrinsics-disable}. -@end table - -@node Faster Programs -@section Faster Programs -@cindex speed, of programs -@cindex programs, speeding up - -Aside from the usual @command{gcc} options, such as @option{-O}, -@option{-ffast-math}, and so on, consider trying some of the -following approaches to speed up your program (once you get -it working). - -@menu -* Aligned Data:: -* Prefer Automatic Uninitialized Variables:: -* Avoid f2c Compatibility:: -* Use Submodel Options:: -@end menu - -@node Aligned Data -@subsection Aligned Data -@cindex alignment -@cindex data, aligned -@cindex stack, aligned -@cindex aligned data -@cindex aligned stack -@cindex Pentium optimizations -@cindex optimization, for Pentium - -On some systems, such as those with Pentium Pro CPUs, programs -that make heavy use of @code{REAL(KIND=2)} (@code{DOUBLE PRECISION}) -might run much slower -than possible due to the compiler not aligning these 64-bit -values to 64-bit boundaries in memory. -(The effect also is present, though -to a lesser extent, on the 586 (Pentium) architecture.) - -The Intel x86 architecture generally ensures that these programs will -work on all its implementations, -but particular implementations (such as Pentium Pro) -perform better with more strict alignment. -(Such behavior isn't unique to the Intel x86 architecture.) -Other architectures might @emph{demand} 64-bit alignment -of 64-bit data. - -There are a variety of approaches to use to address this problem: - -@itemize @bullet -@item -@cindex @code{COMMON} layout -@cindex layout of @code{COMMON} blocks -Order your @code{COMMON} and @code{EQUIVALENCE} areas such -that the variables and arrays with the widest alignment -guidelines come first. - -For example, on most systems, this would mean placing -@code{COMPLEX(KIND=2)}, @code{REAL(KIND=2)}, and -@code{INTEGER(KIND=2)} entities first, followed by @code{REAL(KIND=1)}, -@code{INTEGER(KIND=1)}, and @code{LOGICAL(KIND=1)} entities, then -@code{INTEGER(KIND=6)} entities, and finally @code{CHARACTER} -and @code{INTEGER(KIND=3)} entities. - -The reason to use such placement is it makes it more likely -that your data will be aligned properly, without requiring -you to do detailed analysis of each aggregate (@code{COMMON} -and @code{EQUIVALENCE}) area. - -Specifically, on systems where the above guidelines are -appropriate, placing @code{CHARACTER} entities before -@code{REAL(KIND=2)} entities can work just as well, -but only if the number of bytes occupied by the @code{CHARACTER} -entities is divisible by the recommended alignment for -@code{REAL(KIND=2)}. - -By ordering the placement of entities in aggregate -areas according to the simple guidelines above, you -avoid having to carefully count the number of bytes -occupied by each entity to determine whether the -actual alignment of each subsequent entity meets the -alignment guidelines for the type of that entity. - -If you don't ensure correct alignment of @code{COMMON} elements, the -compiler may be forced by some systems to violate the Fortran semantics by -adding padding to get @code{DOUBLE PRECISION} data properly aligned. -If the unfortunate practice is employed of overlaying different types of -data in the @code{COMMON} block, the different variants -of this block may become misaligned with respect to each other. -Even if your platform doesn't require strict alignment, -@code{COMMON} should be laid out as above for portability. -(Unfortunately the FORTRAN 77 standard didn't anticipate this -possible requirement, which is compiler-independent on a given platform.) - -@item -@cindex -malign-double option -@cindex options, -malign-double -Use the (x86-specific) @option{-malign-double} option when compiling -programs for the Pentium and Pentium Pro architectures (called 586 -and 686 in the @command{gcc} configuration subsystem). -The warning about this in the @command{gcc} manual isn't -generally relevant to Fortran, -but using it will force @code{COMMON} to be padded if necessary to align -@code{DOUBLE PRECISION} data. - -When @code{DOUBLE PRECISION} data is forcibly aligned -in @code{COMMON} by @command{g77} due to specifying @option{-malign-double}, -@command{g77} issues a warning about the need to -insert padding. - -In this case, each and every program unit that uses -the same @code{COMMON} area -must specify the same layout of variables and their types -for that area -and be compiled with @option{-malign-double} as well. -@command{g77} will issue warnings in each case, -but as long as every program unit using that area -is compiled with the same warnings, -the resulting object files should work when linked together -unless the program makes additional assumptions about -@code{COMMON} area layouts that are outside the scope -of the FORTRAN 77 standard, -or uses @code{EQUIVALENCE} or different layouts -in ways that assume no padding is ever inserted by the compiler. - -@item -Ensure that @file{crt0.o} or @file{crt1.o} -on your system guarantees a 64-bit -aligned stack for @code{main()}. -The recent one from GNU (@code{glibc2}) will do this on x86 systems, -but we don't know of any other x86 setups where it will be right. -Read your system's documentation to determine if -it is appropriate to upgrade to a more recent version -to obtain the optimal alignment. -@end itemize - -Progress is being made on making this work -``out of the box'' on future versions of @command{g77}, -@command{gcc}, and some of the relevant operating systems -(such as GNU/Linux). - -@node Prefer Automatic Uninitialized Variables -@subsection Prefer Automatic Uninitialized Variables - -If you're using @option{-fno-automatic} already, you probably -should change your code to allow compilation with @option{-fautomatic} -(the default), to allow the program to run faster. - -Similarly, you should be able to use @option{-fno-init-local-zero} -(the default) instead of @option{-finit-local-zero}. -This is because it is rare that every variable affected by these -options in a given program actually needs to -be so affected. - -For example, @option{-fno-automatic}, which effectively @code{SAVE}s -every local non-automatic variable and array, affects even things like -@code{DO} iteration -variables, which rarely need to be @code{SAVE}d, and this often reduces -run-time performances. -Similarly, @option{-fno-init-local-zero} forces such -variables to be initialized to zero---when @code{SAVE}d (such as when -@option{-fno-automatic}), this by itself generally affects only -startup time for a program, but when not @code{SAVE}d, -it can slow down the procedure every time it is called. - -@xref{Overly Convenient Options,,Overly Convenient Command-Line Options}, -for information on the @option{-fno-automatic} and -@option{-finit-local-zero} options and how to convert -their use into selective changes in your own code. - -@node Avoid f2c Compatibility -@subsection Avoid f2c Compatibility -@cindex -fno-f2c option -@cindex options, -fno-f2c -@cindex @command{f2c} compatibility -@cindex compatibility, @command{f2c} - -If you aren't linking with any code compiled using -@command{f2c}, try using the @option{-fno-f2c} option when -compiling @emph{all} the code in your program. -(Note that @code{libf2c} is @emph{not} an example of code -that is compiled using @command{f2c}---it is compiled by a C -compiler, typically @command{gcc}.) - -@node Use Submodel Options -@subsection Use Submodel Options -@cindex submodels - -Using an appropriate @option{-m} option to generate specific code for your -CPU may be worthwhile, though it may mean the executable won't run on -other versions of the CPU that don't support the same instruction set. -@xref{Submodel Options,,Hardware Models and Configurations,gcc,Using the -GNU Compiler Collection (GCC)}. For instance on an x86 system the -compiler might have -been built---as shown by @samp{g77 -v}---for the target -@samp{i386-pc-linux-gnu}, i.e.@: an @samp{i386} CPU@. In that case to -generate code best optimized for a Pentium you could use the option -@option{-march=pentium}. - -For recent CPUs that don't have explicit support in the released version -of @command{gcc}, it @emph{might} still be possible to get improvements -with certain @option{-m} options. - -@option{-fomit-frame-pointer} can help performance on x86 systems and -others. It will, however, inhibit debugging on the systems on which it -is not turned on anyway by @option{-O}. - -@node Trouble -@chapter Known Causes of Trouble with GNU Fortran -@cindex bugs, known -@cindex installation trouble -@cindex known causes of trouble - -This section describes known problems that affect users of GNU Fortran. -Most of these are not GNU Fortran bugs per se---if they were, we would -fix them. -But the result for a user might be like the result of a bug. - -Some of these problems are due to bugs in other software, some are -missing features that are too much work to add, and some are places -where people's opinions differ as to what is best. - -(Note that some of this portion of the manual is lifted -directly from the @command{gcc} manual, with minor modifications -to tailor it to users of @command{g77}. -Anytime a bug seems to have more to do with the @command{gcc} -portion of @command{g77}, see -@ref{Trouble,,Known Causes of Trouble with GCC, -gcc,Using the GNU Compiler Collection (GCC)}.) - -@menu -* But-bugs:: Bugs really in other programs or elsewhere. -* Known Bugs:: Bugs known to be in this version of @command{g77}. -* Missing Features:: Features we already know we want to add later. -* Disappointments:: Regrettable things we can't change. -* Non-bugs:: Things we think are right, but some others disagree. -* Warnings and Errors:: Which problems in your code get warnings, - and which get errors. -@end menu - -@node But-bugs -@section Bugs Not In GNU Fortran -@cindex but-bugs - -These are bugs to which the maintainers often have to reply, -``but that isn't a bug in @command{g77}@dots{}''. -Some of these already are fixed in new versions of other -software; some still need to be fixed; some are problems -with how @command{g77} is installed or is being used; -some are the result of bad hardware that causes software -to misbehave in sometimes bizarre ways; -some just cannot be addressed at this time until more -is known about the problem. - -Please don't re-report these bugs to the @command{g77} maintainers---if -you must remind someone how important it is to you that the problem -be fixed, talk to the people responsible for the other products -identified below, but preferably only after you've tried the -latest versions of those products. -The @command{g77} maintainers have their hands full working on -just fixing and improving @command{g77}, without serving as a -clearinghouse for all bugs that happen to affect @command{g77} -users. - -@xref{Collected Fortran Wisdom}, for information on behavior -of Fortran programs, and the programs that compile them, that -might be @emph{thought} to indicate bugs. - -@menu -* Signal 11 and Friends:: Strange behavior by any software. -* Cannot Link Fortran Programs:: Unresolved references. -* Large Common Blocks:: Problems on older GNU/Linux systems. -* Debugger Problems:: When the debugger crashes. -* NeXTStep Problems:: Misbehaving executables. -* Stack Overflow:: More misbehaving executables. -* Nothing Happens:: Less behaving executables. -* Strange Behavior at Run Time:: Executables misbehaving due to - bugs in your program. -* Floating-point Errors:: The results look wrong, but@dots{}. -@end menu - -@node Signal 11 and Friends -@subsection Signal 11 and Friends -@cindex signal 11 -@cindex hardware errors - -A whole variety of strange behaviors can occur when the -software, or the way you are using the software, -stresses the hardware in a way that triggers hardware bugs. -This might seem hard to believe, but it happens frequently -enough that there exist documents explaining in detail -what the various causes of the problems are, what -typical symptoms look like, and so on. - -Generally these problems are referred to in this document -as ``signal 11'' crashes, because the Linux kernel, running -on the most popular hardware (the Intel x86 line), often -stresses the hardware more than other popular operating -systems. -When hardware problems do occur under GNU/Linux on x86 -systems, these often manifest themselves as ``signal 11'' -problems, as illustrated by the following diagnostic: - -@smallexample -sh# @kbd{g77 myprog.f} -gcc: Internal compiler error: program f771 got fatal signal 11 -sh# -@end smallexample - -It is @emph{very} important to remember that the above -message is @emph{not} the only one that indicates a -hardware problem, nor does it always indicate a hardware -problem. - -In particular, on systems other than those running the Linux -kernel, the message might appear somewhat or very different, -as it will if the error manifests itself while running a -program other than the @command{g77} compiler. -For example, -it will appear somewhat different when running your program, -when running Emacs, and so on. - -How to cope with such problems is well beyond the scope -of this manual. - -However, users of Linux-based systems (such as GNU/Linux) -should review @uref{http://www.bitwizard.nl/sig11/}, a source -of detailed information on diagnosing hardware problems, -by recognizing their common symptoms. - -Users of other operating systems and hardware might -find this reference useful as well. -If you know of similar material for another hardware/software -combination, please let us know so we can consider including -a reference to it in future versions of this manual. - -@node Cannot Link Fortran Programs -@subsection Cannot Link Fortran Programs -@cindex unresolved reference (various) -@cindex linking error for user code -@cindex code, user -@cindex @command{ld}, error linking user code -@cindex @command{ld}, can't find strange names -On some systems, perhaps just those with out-of-date (shared?) -libraries, unresolved-reference errors happen when linking @command{g77}-compiled -programs (which should be done using @command{g77}). - -If this happens to you, try appending @option{-lc} to the command you -use to link the program, e.g. @samp{g77 foo.f -lc}. -@command{g77} already specifies @samp{-lg2c -lm} when it calls the linker, -but it cannot also specify @option{-lc} because not all systems have a -file named @file{libc.a}. - -It is unclear at this point whether there are legitimately installed -systems where @samp{-lg2c -lm} is insufficient to resolve code produced -by @command{g77}. - -@cindex undefined reference (_main) -@cindex linking error, user code -@cindex @command{ld}, error linking user code -@cindex code, user -@cindex @command{ld}, can't find @samp{_main} -If your program doesn't link due to unresolved references to names -like @samp{_main}, make sure you're using the @command{g77} command to do the -link, since this command ensures that the necessary libraries are -loaded by specifying @samp{-lg2c -lm} when it invokes the @command{gcc} -command to do the actual link. -(Use the @option{-v} option to discover -more about what actually happens when you use the @command{g77} and @command{gcc} -commands.) - -Also, try specifying @option{-lc} as the last item on the @command{g77} -command line, in case that helps. - -@node Large Common Blocks -@subsection Large Common Blocks -@cindex common blocks, large -@cindex large common blocks -@cindex linking, errors -@cindex @command{ld}, errors -@cindex errors, linker -On some older GNU/Linux systems, programs with common blocks larger -than 16MB cannot be linked without some kind of error -message being produced. - -This is a bug in older versions of @command{ld}, fixed in -more recent versions of @code{binutils}, such as version 2.6. - -@node Debugger Problems -@subsection Debugger Problems -@cindex @command{gdb}, support -@cindex support, @command{gdb} -There are some known problems when using @command{gdb} on code -compiled by @command{g77}. -Inadequate investigation as of the release of 0.5.16 results in not -knowing which products are the culprit, but @file{gdb-4.14} definitely -crashes when, for example, an attempt is made to print the contents -of a @code{COMPLEX(KIND=2)} dummy array, on at least some GNU/Linux -machines, plus some others. -Attempts to access assumed-size arrays are -also known to crash recent versions of @command{gdb}. -(@command{gdb}'s Fortran support was done for a different compiler -and isn't properly compatible with @command{g77}.) - -@node NeXTStep Problems -@subsection NeXTStep Problems -@cindex NeXTStep problems -@cindex bus error -@cindex segmentation violation -Developers of Fortran code on NeXTStep (all architectures) have to -watch out for the following problem when writing programs with -large, statically allocated (i.e. non-stack based) data structures -(common blocks, saved arrays). - -Due to the way the native loader (@file{/bin/ld}) lays out -data structures in virtual memory, it is very easy to create an -executable wherein the @samp{__DATA} segment overlaps (has addresses in -common) with the @samp{UNIX STACK} segment. - -This leads to all sorts of trouble, from the executable simply not -executing, to bus errors. -The NeXTStep command line tool @command{ebadexec} points to -the problem as follows: - -@smallexample -% @kbd{/bin/ebadexec a.out} -/bin/ebadexec: __LINKEDIT segment (truncated address = 0x3de000 -rounded size = 0x2a000) of executable file: a.out overlaps with UNIX -STACK segment (truncated address = 0x400000 rounded size = -0x3c00000) of executable file: a.out -@end smallexample - -(In the above case, it is the @samp{__LINKEDIT} segment that overlaps the -stack segment.) - -This can be cured by assigning the @samp{__DATA} segment -(virtual) addresses beyond the stack segment. -A conservative -estimate for this is from address 6000000 (hexadecimal) onwards---this -has always worked for me [Toon Moene]: - -@smallexample -% @kbd{g77 -segaddr __DATA 6000000 test.f} -% @kbd{ebadexec a.out} -ebadexec: file: a.out appears to be executable -% -@end smallexample - -Browsing through @file{@value{path-g77}/Makefile.in}, -you will find that the @code{f771} program itself also has to be -linked with these flags---it has large statically allocated -data structures. -(Version 0.5.18 reduces this somewhat, but probably -not enough.) - -(The above item was contributed by Toon Moene -(@email{toon@@moene.indiv.nluug.nl}).) - -@node Stack Overflow -@subsection Stack Overflow -@cindex stack, overflow -@cindex segmentation violation -@command{g77} code might fail at runtime (probably with a ``segmentation -violation'') due to overflowing the stack. -This happens most often on systems with an environment -that provides substantially more heap space (for use -when arbitrarily allocating and freeing memory) than stack -space. - -Often this can be cured by -increasing or removing your shell's limit on stack usage, typically -using @kbd{limit stacksize} (in @command{csh} and derivatives) or -@kbd{ulimit -s} (in @command{sh} and derivatives). - -Increasing the allowed stack size might, however, require -changing some operating system or system configuration parameters. - -You might be able to work around the problem by compiling with the -@option{-fno-automatic} option to reduce stack usage, probably at the -expense of speed. - -@command{g77}, on most machines, puts many variables and arrays on the stack -where possible, and can be configured (by changing -@code{FFECOM_sizeMAXSTACKITEM} in @file{@value{path-g77}/com.c}) to force -smaller-sized entities into static storage (saving -on stack space) or permit larger-sized entities to be put on the -stack (which can improve run-time performance, as it presents -more opportunities for the GBE to optimize the generated code). - -@emph{Note:} Putting more variables and arrays on the stack -might cause problems due to system-dependent limits on stack size. -Also, the value of @code{FFECOM_sizeMAXSTACKITEM} has no -effect on automatic variables and arrays. -@xref{But-bugs}, for more information. -@emph{Note:} While @code{libg2c} places a limit on the range -of Fortran file-unit numbers, the underlying library and operating -system might impose different kinds of limits. -For example, some systems limit the number of files simultaneously -open by a running program. -Information on how to increase these limits should be found -in your system's documentation. - -@cindex automatic arrays -@cindex arrays, automatic -However, if your program uses large automatic arrays -(for example, has declarations like @samp{REAL A(N)} where -@samp{A} is a local array and @samp{N} is a dummy or -@code{COMMON} variable that can have a large value), -neither use of @option{-fno-automatic}, -nor changing the cut-off point for @command{g77} for using the stack, -will solve the problem by changing the placement of these -large arrays, as they are @emph{necessarily} automatic. - -@command{g77} currently provides no means to specify that -automatic arrays are to be allocated on the heap instead -of the stack. -So, other than increasing the stack size, your best bet is to -change your source code to avoid large automatic arrays. -Methods for doing this currently are outside the scope of -this document. - -(@emph{Note:} If your system puts stack and heap space in the -same memory area, such that they are effectively combined, then -a stack overflow probably indicates a program that is either -simply too large for the system, or buggy.) - -@node Nothing Happens -@subsection Nothing Happens -@cindex nothing happens -@cindex naming programs -@cindex @command{test} programs -@cindex programs, @command{test} -It is occasionally reported that a ``simple'' program, -such as a ``Hello, World!'' program, does nothing when -it is run, even though the compiler reported no errors, -despite the program containing nothing other than a -simple @code{PRINT} statement. - -This most often happens because the program has been -compiled and linked on a UNIX system and named @command{test}, -though other names can lead to similarly unexpected -run-time behavior on various systems. - -Essentially this problem boils down to giving -your program a name that is already known to -the shell you are using to identify some other program, -which the shell continues to execute instead of your -program when you invoke it via, for example: - -@smallexample -sh# @kbd{test} -sh# -@end smallexample - -Under UNIX and many other system, a simple command name -invokes a searching mechanism that might well not choose -the program located in the current working directory if -there is another alternative (such as the @command{test} -command commonly installed on UNIX systems). - -The reliable way to invoke a program you just linked in -the current directory under UNIX is to specify it using -an explicit pathname, as in: - -@smallexample -sh# @kbd{./test} - Hello, World! -sh# -@end smallexample - -Users who encounter this problem should take the time to -read up on how their shell searches for commands, how to -set their search path, and so on. -The relevant UNIX commands to learn about include -@command{man}, @command{info} (on GNU systems), @command{setenv} (or -@command{set} and @command{env}), @command{which}, and @command{find}. - -@node Strange Behavior at Run Time -@subsection Strange Behavior at Run Time -@cindex segmentation violation -@cindex bus error -@cindex overwritten data -@cindex data, overwritten -@command{g77} code might fail at runtime with ``segmentation violation'', -``bus error'', or even something as subtle as a procedure call -overwriting a variable or array element that it is not supposed -to touch. - -These can be symptoms of a wide variety of actual bugs that -occurred earlier during the program's run, but manifested -themselves as @emph{visible} problems some time later. - -Overflowing the bounds of an array---usually by writing beyond -the end of it---is one of two kinds of bug that often occurs -in Fortran code. -(Compile your code with the @option{-fbounds-check} option -to catch many of these kinds of errors at program run time.) - -The other kind of bug is a mismatch between the actual arguments -passed to a procedure and the dummy arguments as declared by that -procedure. - -Both of these kinds of bugs, and some others as well, can be -difficult to track down, because the bug can change its behavior, -or even appear to not occur, when using a debugger. - -That is, these bugs can be quite sensitive to data, including -data representing the placement of other data in memory (that is, -pointers, such as the placement of stack frames in memory). - -@command{g77} now offers the -ability to catch and report some of these problems at compile, link, or -run time, such as by generating code to detect references to -beyond the bounds of most arrays (except assumed-size arrays), -and checking for agreement between calling and called procedures. -Future improvements are likely to be made in the procedure-mismatch area, -at least. - -In the meantime, finding and fixing the programming -bugs that lead to these behaviors is, ultimately, the user's -responsibility, as difficult as that task can sometimes be. - -@cindex infinite spaces printed -@cindex space, endless printing of -@cindex libc, non-ANSI or non-default -@cindex C library -@cindex linking against non-standard library -@cindex Solaris -One runtime problem that has been observed might have a simple solution. -If a formatted @code{WRITE} produces an endless stream of spaces, check -that your program is linked against the correct version of the C library. -The configuration process takes care to account for your -system's normal @file{libc} not being ANSI-standard, which will -otherwise cause this behavior. -If your system's default library is -ANSI-standard and you subsequently link against a non-ANSI one, there -might be problems such as this one. - -Specifically, on Solaris2 systems, -avoid picking up the @code{BSD} library from @file{/usr/ucblib}. - -@node Floating-point Errors -@subsection Floating-point Errors -@cindex floating-point errors -@cindex rounding errors -@cindex inconsistent floating-point results -@cindex results, inconsistent -Some programs appear to produce inconsistent floating-point -results compiled by @command{g77} versus by other compilers. - -Often the reason for this behavior is the fact that floating-point -values are represented on almost all Fortran systems by -@emph{approximations}, and these approximations are inexact -even for apparently simple values like 0.1, 0.2, 0.3, 0.4, 0.6, -0.7, 0.8, 0.9, 1.1, and so on. -Most Fortran systems, including all current ports of @command{g77}, -use binary arithmetic to represent these approximations. - -Therefore, the exact value of any floating-point approximation -as manipulated by @command{g77}-compiled code is representable by -adding some combination of the values 1.0, 0.5, 0.25, 0.125, and -so on (just keep dividing by two) through the precision of the -fraction (typically around 23 bits for @code{REAL(KIND=1)}, 52 for -@code{REAL(KIND=2)}), then multiplying the sum by a integral -power of two (in Fortran, by @samp{2**N}) that typically is between --127 and +128 for @code{REAL(KIND=1)} and -1023 and +1024 for -@code{REAL(KIND=2)}, then multiplying by -1 if the number -is negative. - -So, a value like 0.2 is exactly represented in decimal---since -it is a fraction, @samp{2/10}, with a denominator that is compatible -with the base of the number system (base 10). -However, @samp{2/10} cannot be represented by any finite number -of sums of any of 1.0, 0.5, 0.25, and so on, so 0.2 cannot -be exactly represented in binary notation. - -(On the other hand, decimal notation can represent any binary -number in a finite number of digits. -Decimal notation cannot do so with ternary, or base-3, -notation, which would represent floating-point numbers as -sums of any of @samp{1/1}, @samp{1/3}, @samp{1/9}, and so on. -After all, no finite number of decimal digits can exactly -represent @samp{1/3}. -Fortunately, few systems use ternary notation.) - -Moreover, differences in the way run-time I/O libraries convert -between these approximations and the decimal representation often -used by programmers and the programs they write can result in -apparent differences between results that do not actually exist, -or exist to such a small degree that they usually are not worth -worrying about. - -For example, consider the following program: - -@smallexample -PRINT *, 0.2 -END -@end smallexample - -When compiled by @command{g77}, the above program might output -@samp{0.20000003}, while another compiler might produce a -executable that outputs @samp{0.2}. - -This particular difference is due to the fact that, currently, -conversion of floating-point values by the @code{libg2c} library, -used by @command{g77}, handles only double-precision values. - -Since @samp{0.2} in the program is a single-precision value, it -is converted to double precision (still in binary notation) -before being converted back to decimal. -The conversion to binary appends @emph{binary} zero digits to the -original value---which, again, is an inexact approximation of -0.2---resulting in an approximation that is much less exact -than is connoted by the use of double precision. - -(The appending of binary zero digits has essentially the same -effect as taking a particular decimal approximation of -@samp{1/3}, such as @samp{0.3333333}, and appending decimal -zeros to it, producing @samp{0.33333330000000000}. -Treating the resulting decimal approximation as if it really -had 18 or so digits of valid precision would make it seem -a very poor approximation of @samp{1/3}.) - -As a result of converting the single-precision approximation -to double precision by appending binary zeros, the conversion -of the resulting double-precision -value to decimal produces what looks like an incorrect -result, when in fact the result is @emph{inexact}, and -is probably no less inaccurate or imprecise an approximation -of 0.2 than is produced by other compilers that happen to output -the converted value as ``exactly'' @samp{0.2}. -(Some compilers behave in a way that can make them appear -to retain more accuracy across a conversion of a single-precision -constant to double precision. -@xref{Context-Sensitive Constants}, to see why -this practice is illusory and even dangerous.) - -Note that a more exact approximation of the constant is -computed when the program is changed to specify a -double-precision constant: - -@smallexample -PRINT *, 0.2D0 -END -@end smallexample - -Future versions of @command{g77} and/or @code{libg2c} might convert -single-precision values directly to decimal, -instead of converting them to double precision first. -This would tend to result in output that is more consistent -with that produced by some other Fortran implementations. - -A useful source of information on floating-point computation is David -Goldberg, `What Every Computer Scientist Should Know About -Floating-Point Arithmetic', Computing Surveys, 23, March 1991, pp.@: -5-48. -An online version is available at -@uref{http://docs.sun.com/}. - -Information related to the IEEE 754 floating-point standard can be found -at @uref{http://grouper.ieee.org/groups/754/} and -@uref{http://http.cs.berkeley.edu/%7Ewkahan/ieee754status/}; -see also slides from the short course referenced from -@uref{http://http.cs.berkeley.edu/%7Efateman/}. - -The supplement to the PostScript-formatted Goldberg document, -referenced above, is available in HTML format. -See `Differences Among IEEE 754 Implementations' by Doug Priest. -This document explores some of the issues surrounding computing -of extended (80-bit) results on processors such as the x86, -especially when those results are arbitrarily truncated -to 32-bit or 64-bit values by the compiler -as ``spills''. - -@cindex spills of floating-point results -@cindex 80-bit spills -@cindex truncation, of floating-point values -(@emph{Note:} @command{g77} specifically, and @command{gcc} generally, -does arbitrarily truncate 80-bit results during spills -as of this writing. -It is not yet clear whether a future version of -the GNU compiler suite will offer 80-bit spills -as an option, or perhaps even as the default behavior.) - -@c xref would be different between editions: -The GNU C library provides routines for controlling the FPU, and other -documentation about this. - -@xref{Floating-point precision}, regarding IEEE 754 conformance. - -@include bugs.texi - -@node Missing Features -@section Missing Features - -This section lists features we know are missing from @command{g77}, -and which we want to add someday. -(There is no priority implied in the ordering below.) - -@menu -GNU Fortran language: -* Better Source Model:: -* Fortran 90 Support:: -* Intrinsics in PARAMETER Statements:: -* Arbitrary Concatenation:: -* SELECT CASE on CHARACTER Type:: -* RECURSIVE Keyword:: -* Popular Non-standard Types:: -* Full Support for Compiler Types:: -* Array Bounds Expressions:: -* POINTER Statements:: -* Sensible Non-standard Constructs:: -* READONLY Keyword:: -* FLUSH Statement:: -* Expressions in FORMAT Statements:: -* Explicit Assembler Code:: -* Q Edit Descriptor:: - -GNU Fortran dialects: -* Old-style PARAMETER Statements:: -* TYPE and ACCEPT I/O Statements:: -* STRUCTURE UNION RECORD MAP:: -* OPEN CLOSE and INQUIRE Keywords:: -* ENCODE and DECODE:: -* AUTOMATIC Statement:: -* Suppressing Space Padding:: -* Fortran Preprocessor:: -* Bit Operations on Floating-point Data:: -* Really Ugly Character Assignments:: - -New facilities: -* POSIX Standard:: -* Floating-point Exception Handling:: -* Nonportable Conversions:: -* Large Automatic Arrays:: -* Support for Threads:: -* Increasing Precision/Range:: -* Enabling Debug Lines:: - -Better diagnostics: -* Better Warnings:: -* Gracefully Handle Sensible Bad Code:: -* Non-standard Conversions:: -* Non-standard Intrinsics:: -* Modifying DO Variable:: -* Better Pedantic Compilation:: -* Warn About Implicit Conversions:: -* Invalid Use of Hollerith Constant:: -* Dummy Array Without Dimensioning Dummy:: -* Invalid FORMAT Specifiers:: -* Ambiguous Dialects:: -* Unused Labels:: -* Informational Messages:: - -Run-time facilities: -* Uninitialized Variables at Run Time:: -* Portable Unformatted Files:: -* Better List-directed I/O:: -* Default to Console I/O:: - -Debugging: -* Labels Visible to Debugger:: -@end menu - -@node Better Source Model -@subsection Better Source Model - -@command{g77} needs to provide, as the default source-line model, -a ``pure visual'' mode, where -the interpretation of a source program in this mode can be accurately -determined by a user looking at a traditionally displayed rendition -of the program (assuming the user knows whether the program is fixed -or free form). - -The design should assume the user cannot tell tabs from spaces -and cannot see trailing spaces on lines, but has canonical tab stops -and, for fixed-form source, has the ability to always know exactly -where column 72 is (since the Fortran standard itself requires -this for fixed-form source). - -This would change the default treatment of fixed-form source -to not treat lines with tabs as if they were infinitely long---instead, -they would end at column 72 just as if the tabs were replaced -by spaces in the canonical way. - -As part of this, provide common alternate models (Digital, @command{f2c}, -and so on) via command-line options. -This includes allowing arbitrarily long -lines for free-form source as well as fixed-form source and providing -various limits and diagnostics as appropriate. - -@cindex sequence numbers -@cindex columns 73 through 80 -Also, @command{g77} should offer, perhaps even default to, warnings -when characters beyond the last valid column are anything other -than spaces. -This would mean code with ``sequence numbers'' in columns 73 through 80 -would be rejected, and there's a lot of that kind of code around, -but one of the most frequent bugs encountered by new users is -accidentally writing fixed-form source code into and beyond -column 73. -So, maybe the users of old code would be able to more easily handle -having to specify, say, a @option{-Wno-col73to80} option. - -@node Fortran 90 Support -@subsection Fortran 90 Support -@cindex Fortran 90, support -@cindex support, Fortran 90 - -@command{g77} does not support many of the features that -distinguish Fortran 90 (and, now, Fortran 95) from -ANSI FORTRAN 77. - -Some Fortran 90 features are supported, because they -make sense to offer even to die-hard users of F77. -For example, many of them codify various ways F77 has -been extended to meet users' needs during its tenure, -so @command{g77} might as well offer them as the primary -way to meet those same needs, even if it offers compatibility -with one or more of the ways those needs were met -by other F77 compilers in the industry. - -Still, many important F90 features are not supported, -because no attempt has been made to research each and -every feature and assess its viability in @command{g77}. -In the meantime, users who need those features must -use Fortran 90 compilers anyway, and the best approach -to adding some F90 features to GNU Fortran might well be -to fund a comprehensive project to create GNU Fortran 95. - -@node Intrinsics in PARAMETER Statements -@subsection Intrinsics in @code{PARAMETER} Statements -@cindex PARAMETER statement -@cindex statements, PARAMETER - -@command{g77} doesn't allow intrinsics in @code{PARAMETER} statements. - -Related to this, @command{g77} doesn't allow non-integral -exponentiation in @code{PARAMETER} statements, such as -@samp{PARAMETER (R=2**.25)}. -It is unlikely @command{g77} will ever support this feature, -as doing it properly requires complete emulation of -a target computer's floating-point facilities when -building @command{g77} as a cross-compiler. -But, if the @command{gcc} back end is enhanced to provide -such a facility, @command{g77} will likely use that facility -in implementing this feature soon afterwards. - -@node Arbitrary Concatenation -@subsection Arbitrary Concatenation -@cindex concatenation -@cindex CHARACTER*(*) -@cindex run-time, dynamic allocation - -@command{g77} doesn't support arbitrary operands for concatenation -in contexts where run-time allocation is required. -For example: - -@smallexample -SUBROUTINE X(A) -CHARACTER*(*) A -CALL FOO(A // 'suffix') -@end smallexample - -@node SELECT CASE on CHARACTER Type -@subsection @code{SELECT CASE} on @code{CHARACTER} Type - -Character-type selector/cases for @code{SELECT CASE} currently -are not supported. - -@node RECURSIVE Keyword -@subsection @code{RECURSIVE} Keyword -@cindex RECURSIVE keyword -@cindex keywords, RECURSIVE -@cindex recursion, lack of -@cindex lack of recursion - -@command{g77} doesn't support the @code{RECURSIVE} keyword that -F90 compilers do. -Nor does it provide any means for compiling procedures -designed to do recursion. - -All recursive code can be rewritten to not use recursion, -but the result is not pretty. - -@node Increasing Precision/Range -@subsection Increasing Precision/Range -@cindex -r8 -@cindex -qrealsize=8 -@cindex -i8 -@cindex f2c -@cindex increasing precision -@cindex precision, increasing -@cindex increasing range -@cindex range, increasing -@cindex Toolpack -@cindex Netlib - -Some compilers, such as @command{f2c}, have an option (@option{-r8}, -@option{-qrealsize=8} or -similar) that provides automatic treatment of @code{REAL} -entities such that they have twice the storage size, and -a corresponding increase in the range and precision, of what -would normally be the @code{REAL(KIND=1)} (default @code{REAL}) type. -(This affects @code{COMPLEX} the same way.) - -They also typically offer another option (@option{-i8}) to increase -@code{INTEGER} entities so they are twice as large -(with roughly twice as much range). - -(There are potential pitfalls in using these options.) - -@command{g77} does not yet offer any option that performs these -kinds of transformations. -Part of the problem is the lack of detailed specifications regarding -exactly how these options affect the interpretation of constants, -intrinsics, and so on. - -Until @command{g77} addresses this need, programmers could improve -the portability of their code by modifying it to not require -compile-time options to produce correct results. -Some free tools are available which may help, specifically -in Toolpack (which one would expect to be sound) and the @file{fortran} -section of the Netlib repository. - -Use of preprocessors can provide a fairly portable means -to work around the lack of widely portable methods in the Fortran -language itself (though increasing acceptance of Fortran 90 would -alleviate this problem). - -@node Popular Non-standard Types -@subsection Popular Non-standard Types -@cindex @code{INTEGER*2} support -@cindex types, @code{INTEGER*2} -@cindex @code{LOGICAL*1} support -@cindex types, @code{LOGICAL*1} - -@command{g77} doesn't fully support @code{INTEGER*2}, @code{LOGICAL*1}, -and similar. -In the meantime, version 0.5.18 provides rudimentary support -for them. - -@node Full Support for Compiler Types -@subsection Full Support for Compiler Types - -@cindex @code{REAL*16} support -@cindex types, @code{REAL*16} -@cindex @code{INTEGER*8} support -@cindex types, @code{INTEGER*8} -@command{g77} doesn't support @code{INTEGER}, @code{REAL}, and @code{COMPLEX} equivalents -for @emph{all} applicable back-end-supported types (@code{char}, @code{short int}, -@code{int}, @code{long int}, @code{long long int}, and @code{long double}). -This means providing intrinsic support, and maybe constant -support (using F90 syntax) as well, and, for most -machines will result in automatic support of @code{INTEGER*1}, -@code{INTEGER*2}, @code{INTEGER*8}, maybe even @code{REAL*16}, -and so on. - -@node Array Bounds Expressions -@subsection Array Bounds Expressions -@cindex array elements, in adjustable array bounds -@cindex function references, in adjustable array bounds -@cindex array bounds, adjustable -@cindex @code{DIMENSION} statement -@cindex statements, @code{DIMENSION} - -@command{g77} doesn't support more general expressions to dimension -arrays, such as array element references, function -references, etc. - -For example, @command{g77} currently does not accept the following: - -@smallexample -SUBROUTINE X(M, N) -INTEGER N(10), M(N(2), N(1)) -@end smallexample - -@node POINTER Statements -@subsection POINTER Statements -@cindex POINTER statement -@cindex statements, POINTER -@cindex Cray pointers - -@command{g77} doesn't support pointers or allocatable objects -(other than automatic arrays). -This set of features is -probably considered just behind intrinsics -in @code{PARAMETER} statements on the list of large, -important things to add to @command{g77}. - -In the meantime, consider using the @code{INTEGER(KIND=7)} -declaration to specify that a variable must be -able to hold a pointer. -This construct is not portable to other non-GNU compilers, -but it is portable to all machines GNU Fortran supports -when @command{g77} is used. - -@xref{Functions and Subroutines}, for information on -@code{%VAL()}, @code{%REF()}, and @code{%DESCR()} -constructs, which are useful for passing pointers to -procedures written in languages other than Fortran. - -@node Sensible Non-standard Constructs -@subsection Sensible Non-standard Constructs - -@command{g77} rejects things other compilers accept, -like @samp{INTRINSIC SQRT,SQRT}. -As time permits in the future, some of these things that are easy for -humans to read and write and unlikely to be intended to mean something -else will be accepted by @command{g77} (though @option{-fpedantic} should -trigger warnings about such non-standard constructs). - -Until @command{g77} no longer gratuitously rejects sensible code, -you might as well fix your code -to be more standard-conforming and portable. - -The kind of case that is important to except from the -recommendation to change your code is one where following -good coding rules would force you to write non-standard -code that nevertheless has a clear meaning. - -For example, when writing an @code{INCLUDE} file that -defines a common block, it might be appropriate to -include a @code{SAVE} statement for the common block -(such as @samp{SAVE /CBLOCK/}), so that variables -defined in the common block retain their values even -when all procedures declaring the common block become -inactive (return to their callers). - -However, putting @code{SAVE} statements in an @code{INCLUDE} -file would prevent otherwise standard-conforming code -from also specifying the @code{SAVE} statement, by itself, -to indicate that all local variables and arrays are to -have the @code{SAVE} attribute. - -For this reason, @command{g77} already has been changed to -allow this combination, because although the general -problem of gratuitously rejecting unambiguous and -``safe'' constructs still exists in @command{g77}, this -particular construct was deemed useful enough that -it was worth fixing @command{g77} for just this case. - -So, while there is no need to change your code -to avoid using this particular construct, there -might be other, equally appropriate but non-standard -constructs, that you shouldn't have to stop using -just because @command{g77} (or any other compiler) -gratuitously rejects it. - -Until the general problem is solved, if you have -any such construct you believe is worthwhile -using (e.g. not just an arbitrary, redundant -specification of an attribute), please submit a -bug report with an explanation, so we can consider -fixing @command{g77} just for cases like yours. - -@node READONLY Keyword -@subsection @code{READONLY} Keyword -@cindex READONLY - -Support for @code{READONLY}, in @code{OPEN} statements, -requires @code{libg2c} support, -to make sure that @samp{CLOSE(@dots{},STATUS='DELETE')} -does not delete a file opened on a unit -with the @code{READONLY} keyword, -and perhaps to trigger a fatal diagnostic -if a @code{WRITE} or @code{PRINT} -to such a unit is attempted. - -@emph{Note:} It is not sufficient for @command{g77} and @code{libg2c} -(its version of @code{libf2c}) -to assume that @code{READONLY} does not need some kind of explicit support -at run time, -due to UNIX systems not (generally) needing it. -@command{g77} is not just a UNIX-based compiler! - -Further, mounting of non-UNIX filesystems on UNIX systems -(such as via NFS) -might require proper @code{READONLY} support. - -@cindex SHARED -(Similar issues might be involved with supporting the @code{SHARED} -keyword.) - -@node FLUSH Statement -@subsection @code{FLUSH} Statement - -@command{g77} could perhaps use a @code{FLUSH} statement that -does what @samp{CALL FLUSH} does, -but that supports @samp{*} as the unit designator (same unit as for -@code{PRINT}) and accepts @code{ERR=} and/or @code{IOSTAT=} -specifiers. - -@node Expressions in FORMAT Statements -@subsection Expressions in @code{FORMAT} Statements -@cindex FORMAT statement -@cindex statements, FORMAT - -@command{g77} doesn't support @samp{FORMAT(I)} and the like. -Supporting this requires a significant redesign or replacement -of @code{libg2c}. - -However, @command{g77} does support -this construct when the expression is constant -(as of version 0.5.22). -For example: - -@smallexample - PARAMETER (IWIDTH = 12) -10 FORMAT (I) -@end smallexample - -Otherwise, at least for output (@code{PRINT} and -@code{WRITE}), Fortran code making use of this feature can -be rewritten to avoid it by constructing the @code{FORMAT} -string in a @code{CHARACTER} variable or array, then -using that variable or array in place of the @code{FORMAT} -statement label to do the original @code{PRINT} or @code{WRITE}. - -Many uses of this feature on input can be rewritten this way -as well, but not all can. -For example, this can be rewritten: - -@smallexample - READ 20, I -20 FORMAT (I) -@end smallexample - -However, this cannot, in general, be rewritten, especially -when @code{ERR=} and @code{END=} constructs are employed: - -@smallexample - READ 30, J, I -30 FORMAT (I) -@end smallexample - -@node Explicit Assembler Code -@subsection Explicit Assembler Code - -@command{g77} needs to provide some way, a la @command{gcc}, for @command{g77} -code to specify explicit assembler code. - -@node Q Edit Descriptor -@subsection Q Edit Descriptor -@cindex FORMAT statement -@cindex Q edit descriptor -@cindex edit descriptor, Q - -The @code{Q} edit descriptor in @code{FORMAT}s isn't supported. -(This is meant to get the number of characters remaining in an input record.) -Supporting this requires a significant redesign or replacement -of @code{libg2c}. - -A workaround might be using internal I/O or the stream-based intrinsics. -@xref{FGetC Intrinsic (subroutine)}. - -@node Old-style PARAMETER Statements -@subsection Old-style PARAMETER Statements -@cindex PARAMETER statement -@cindex statements, PARAMETER - -@command{g77} doesn't accept @samp{PARAMETER I=1}. -Supporting this obsolete form of -the @code{PARAMETER} statement would not be particularly hard, as most of the -parsing code is already in place and working. - -Until time/money is -spent implementing it, you might as well fix your code to use the -standard form, @samp{PARAMETER (I=1)} (possibly needing -@samp{INTEGER I} preceding the @code{PARAMETER} statement as well, -otherwise, in the obsolete form of @code{PARAMETER}, the -type of the variable is set from the type of the constant being -assigned to it). - -@node TYPE and ACCEPT I/O Statements -@subsection @code{TYPE} and @code{ACCEPT} I/O Statements -@cindex TYPE statement -@cindex statements, TYPE -@cindex ACCEPT statement -@cindex statements, ACCEPT - -@command{g77} doesn't support the I/O statements @code{TYPE} and -@code{ACCEPT}. -These are common extensions that should be easy to support, -but also are fairly easy to work around in user code. - -Generally, any @samp{TYPE fmt,list} I/O statement can be replaced -by @samp{PRINT fmt,list}. -And, any @samp{ACCEPT fmt,list} statement can be -replaced by @samp{READ fmt,list}. - -@node STRUCTURE UNION RECORD MAP -@subsection @code{STRUCTURE}, @code{UNION}, @code{RECORD}, @code{MAP} -@cindex STRUCTURE statement -@cindex statements, STRUCTURE -@cindex UNION statement -@cindex statements, UNION -@cindex RECORD statement -@cindex statements, RECORD -@cindex MAP statement -@cindex statements, MAP - -@command{g77} doesn't support @code{STRUCTURE}, @code{UNION}, @code{RECORD}, -@code{MAP}. -This set of extensions is quite a bit -lower on the list of large, important things to add to @command{g77}, partly -because it requires a great deal of work either upgrading or -replacing @code{libg2c}. - -@node OPEN CLOSE and INQUIRE Keywords -@subsection @code{OPEN}, @code{CLOSE}, and @code{INQUIRE} Keywords -@cindex disposition of files -@cindex OPEN statement -@cindex statements, OPEN -@cindex CLOSE statement -@cindex statements, CLOSE -@cindex INQUIRE statement -@cindex statements, INQUIRE - -@command{g77} doesn't have support for keywords such as @code{DISP='DELETE'} in -the @code{OPEN}, @code{CLOSE}, and @code{INQUIRE} statements. -These extensions are easy to add to @command{g77} itself, but -require much more work on @code{libg2c}. - -@cindex FORM='PRINT' -@cindex ANS carriage control -@cindex carriage control -@pindex asa -@pindex fpr -@command{g77} doesn't support @code{FORM='PRINT'} or an equivalent to -translate the traditional `carriage control' characters in column 1 of -output to use backspaces, carriage returns and the like. However -programs exist to translate them in output files (or standard output). -These are typically called either @command{fpr} or @command{asa}. You can get -a version of @command{asa} from -@uref{ftp://sunsite.unc.edu/pub/Linux/devel/lang/fortran} for GNU -systems which will probably build easily on other systems. -Alternatively, @command{fpr} is in BSD distributions in various archive -sites. - -@c (Can both programs can be used in a pipeline, -@c with a named input file, -@c and/or with a named output file???) - -@node ENCODE and DECODE -@subsection @code{ENCODE} and @code{DECODE} -@cindex ENCODE statement -@cindex statements, ENCODE -@cindex DECODE statement -@cindex statements, DECODE - -@command{g77} doesn't support @code{ENCODE} or @code{DECODE}. - -These statements are best replaced by READ and WRITE statements -involving internal files (CHARACTER variables and arrays). - -For example, replace a code fragment like - -@smallexample - INTEGER*1 LINE(80) -@dots{} - DECODE (80, 9000, LINE) A, B, C -@dots{} -9000 FORMAT (1X, 3(F10.5)) -@end smallexample - -@noindent -with: - -@smallexample - CHARACTER*80 LINE -@dots{} - READ (UNIT=LINE, FMT=9000) A, B, C -@dots{} -9000 FORMAT (1X, 3(F10.5)) -@end smallexample - -Similarly, replace a code fragment like - -@smallexample - INTEGER*1 LINE(80) -@dots{} - ENCODE (80, 9000, LINE) A, B, C -@dots{} -9000 FORMAT (1X, 'OUTPUT IS ', 3(F10.5)) -@end smallexample - -@noindent -with: - -@smallexample - CHARACTER*80 LINE -@dots{} - WRITE (UNIT=LINE, FMT=9000) A, B, C -@dots{} -9000 FORMAT (1X, 'OUTPUT IS ', 3(F10.5)) -@end smallexample - -It is entirely possible that @code{ENCODE} and @code{DECODE} will -be supported by a future version of @command{g77}. - -@node AUTOMATIC Statement -@subsection @code{AUTOMATIC} Statement -@cindex @code{AUTOMATIC} statement -@cindex statements, @code{AUTOMATIC} -@cindex automatic variables -@cindex variables, automatic - -@command{g77} doesn't support the @code{AUTOMATIC} statement that -@command{f2c} does. - -@code{AUTOMATIC} would identify a variable or array -as not being @code{SAVE}'d, which is normally the default, -but which would be especially useful for code that, @emph{generally}, -needed to be compiled with the @option{-fno-automatic} option. - -@code{AUTOMATIC} also would serve as a hint to the compiler that placing -the variable or array---even a very large array--on the stack is acceptable. - -@code{AUTOMATIC} would not, by itself, designate the containing procedure -as recursive. - -@code{AUTOMATIC} should work syntactically like @code{SAVE}, -in that @code{AUTOMATIC} with no variables listed should apply to -all pertinent variables and arrays -(which would not include common blocks or their members). - -Variables and arrays denoted as @code{AUTOMATIC} -would not be permitted to be initialized via @code{DATA} -or other specification of any initial values, -requiring explicit initialization, -such as via assignment statements. - -@cindex UNSAVE -@cindex STATIC -Perhaps @code{UNSAVE} and @code{STATIC}, -as strict semantic opposites to @code{SAVE} and @code{AUTOMATIC}, -should be provided as well. - -@node Suppressing Space Padding -@subsection Suppressing Space Padding of Source Lines - -@command{g77} should offer VXT-Fortran-style suppression of virtual -spaces at the end of a source line -if an appropriate command-line option is specified. - -This affects cases where -a character constant is continued onto the next line in a fixed-form -source file, as in the following example: - -@smallexample -10 PRINT *,'HOW MANY - 1 SPACES?' -@end smallexample - -@noindent -@command{g77}, and many other compilers, virtually extend -the continued line through column 72 with spaces that become part -of the character constant, but Digital Fortran normally didn't, -leaving only one space between @samp{MANY} and @samp{SPACES?} -in the output of the above statement. - -Fairly recently, at least one version of Digital Fortran -was enhanced to provide the other behavior when a -command-line option is specified, apparently due to demand -from readers of the USENET group @file{comp.lang.fortran} -to offer conformance to this widespread practice in the -industry. -@command{g77} should return the favor by offering conformance -to Digital's approach to handling the above example. - -@node Fortran Preprocessor -@subsection Fortran Preprocessor - -@command{g77} should offer a preprocessor designed specifically -for Fortran to replace @samp{cpp -traditional}. -There are several out there worth evaluating, at least. - -Such a preprocessor would recognize Hollerith constants, -properly parse comments and character constants, and so on. -It might also recognize, process, and thus preprocess -files included via the @code{INCLUDE} directive. - -@node Bit Operations on Floating-point Data -@subsection Bit Operations on Floating-point Data -@cindex @code{And} intrinsic -@cindex intrinsics, @code{And} -@cindex @code{Or} intrinsic -@cindex intrinsics, @code{Or} -@cindex @code{Shift} intrinsic -@cindex intrinsics, @code{Shift} - -@command{g77} does not allow @code{REAL} and other non-integral types for -arguments to intrinsics like @code{And}, @code{Or}, and @code{Shift}. - -For example, this program is rejected by @command{g77}, because -the intrinsic @code{Iand} does not accept @code{REAL} arguments: - -@smallexample -DATA A/7.54/, B/9.112/ -PRINT *, IAND(A, B) -END -@end smallexample - -@node Really Ugly Character Assignments -@subsection Really Ugly Character Assignments - -An option such as @option{-fugly-char} should be provided -to allow - -@smallexample -REAL*8 A1 -DATA A1 / '12345678' / -@end smallexample - -and: - -@smallexample -REAL*8 A1 -A1 = 'ABCDEFGH' -@end smallexample - -@node POSIX Standard -@subsection @code{POSIX} Standard - -@command{g77} should support the POSIX standard for Fortran. - -@node Floating-point Exception Handling -@subsection Floating-point Exception Handling -@cindex floating-point, exceptions -@cindex exceptions, floating-point -@cindex FPE handling -@cindex NaN values - -The @command{gcc} backend and, consequently, @command{g77}, currently provides no -general control over whether or not floating-point exceptions are trapped or -ignored. -(Ignoring them typically results in NaN values being -propagated in systems that conform to IEEE 754.) -The behavior is normally inherited from the system-dependent startup -code, though some targets, such as the Alpha, have code generation -options which change the behavior. - -Most systems provide some C-callable mechanism to change this; this can -be invoked at startup using @command{gcc}'s @code{constructor} attribute. -For example, just compiling and linking the following C code with your -program will turn on exception trapping for the ``common'' exceptions -on a GNU system using glibc 2.2 or newer: - -@smallexample -#define _GNU_SOURCE 1 -#include -static void __attribute__ ((constructor)) -trapfpe () -@{ - /* Enable some exceptions. At startup all exceptions are masked. */ - - feenableexcept (FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW); -@} -@end smallexample - -Assuming the above source is in file @file{trapfpe.c}, -then compile this routine as follows: -@smallexample -gcc -c trapfpe.c -@end smallexample -and subsequently use it by adding @file{trapfpe.o} to the @command{g77} -command line when linking. - -@node Nonportable Conversions -@subsection Nonportable Conversions -@cindex nonportable conversions -@cindex conversions, nonportable - -@command{g77} doesn't accept some particularly nonportable, -silent data-type conversions such as @code{LOGICAL} -to @code{REAL} (as in @samp{A=.FALSE.}, where @samp{A} -is type @code{REAL}), that other compilers might -quietly accept. - -Some of these conversions are accepted by @command{g77} -when the @option{-fugly-logint} option is specified. -Perhaps it should accept more or all of them. - -@node Large Automatic Arrays -@subsection Large Automatic Arrays -@cindex automatic arrays -@cindex arrays, automatic - -Currently, automatic arrays always are allocated on the stack. -For situations where the stack cannot be made large enough, -@command{g77} should offer a compiler option that specifies -allocation of automatic arrays in heap storage. - -@node Support for Threads -@subsection Support for Threads -@cindex threads -@cindex parallel processing - -Neither the code produced by @command{g77} nor the @code{libg2c} library -are thread-safe, nor does @command{g77} have support for parallel processing -(other than the instruction-level parallelism available on some -processors). -A package such as PVM might help here. - -@node Enabling Debug Lines -@subsection Enabling Debug Lines -@cindex debug line -@cindex comment line, debug - -An option such as @option{-fdebug-lines} should be provided -to turn fixed-form lines beginning with @samp{D} -to be treated as if they began with a space, -instead of as if they began with a @samp{C} -(as comment lines). - -@node Better Warnings -@subsection Better Warnings - -Because of how @command{g77} generates code via the back end, -it doesn't always provide warnings the user wants. -Consider: - -@smallexample -PROGRAM X -PRINT *, A -END -@end smallexample - -Currently, the above is not flagged as a case of -using an uninitialized variable, -because @command{g77} generates a run-time library call that looks, -to the GBE, like it might actually @emph{modify} @samp{A} at run time. -(And, in fact, depending on the previous run-time library call, -it would!) - -Fixing this requires one of the following: - -@itemize @bullet -@item -Switch to new library, @code{libg77}, that provides -a more ``clean'' interface, -vis-a-vis input, output, and modified arguments, -so the GBE can tell what's going on. - -This would provide a pretty big performance improvement, -at least theoretically, and, ultimately, in practice, -for some types of code. - -@item -Have @command{g77} pass a pointer to a temporary -containing a copy of @samp{A}, -instead of to @samp{A} itself. -The GBE would then complain about the copy operation -involving a potentially uninitialized variable. - -This might also provide a performance boost for some code, -because @samp{A} might then end up living in a register, -which could help with inner loops. - -@item -Have @command{g77} use a GBE construct similar to @code{ADDR_EXPR} -but with extra information on the fact that the -item pointed to won't be modified -(a la @code{const} in C). - -Probably the best solution for now, but not quite trivial -to implement in the general case. -@end itemize - -@node Gracefully Handle Sensible Bad Code -@subsection Gracefully Handle Sensible Bad Code - -@command{g77} generally should continue processing for -warnings and recoverable (user) errors whenever possible---that -is, it shouldn't gratuitously make bad or useless code. - -For example: - -@smallexample -INTRINSIC ZABS -CALL FOO(ZABS) -END -@end smallexample - -@noindent -When compiling the above with @option{-ff2c-intrinsics-disable}, -@command{g77} should indeed complain about passing @code{ZABS}, -but it still should compile, instead of rejecting -the entire @code{CALL} statement. -(Some of this is related to improving -the compiler internals to improve how statements are analyzed.) - -@node Non-standard Conversions -@subsection Non-standard Conversions - -@option{-Wconversion} and related should flag places where non-standard -conversions are found. -Perhaps much of this would be part of @option{-Wugly*}. - -@node Non-standard Intrinsics -@subsection Non-standard Intrinsics - -@command{g77} needs a new option, like @option{-Wintrinsics}, to warn about use of -non-standard intrinsics without explicit @code{INTRINSIC} statements for them. -This would help find code that might fail silently when ported to another -compiler. - -@node Modifying DO Variable -@subsection Modifying @code{DO} Variable - -@command{g77} should warn about modifying @code{DO} variables -via @code{EQUIVALENCE}. -(The internal information gathered to produce this warning -might also be useful in setting the -internal ``doiter'' flag for a variable or even array -reference within a loop, since that might produce faster code someday.) - -For example, this code is invalid, so @command{g77} should warn about -the invalid assignment to @samp{NOTHER}: - -@smallexample -EQUIVALENCE (I, NOTHER) -DO I = 1, 100 - IF (I.EQ. 10) NOTHER = 20 -END DO -@end smallexample - -@node Better Pedantic Compilation -@subsection Better Pedantic Compilation - -@command{g77} needs to support @option{-fpedantic} more thoroughly, -and use it only to generate -warnings instead of rejecting constructs outright. -Have it warn: -if a variable that dimensions an array is not a dummy or placed -explicitly in @code{COMMON} (F77 does not allow it to be -placed in @code{COMMON} via @code{EQUIVALENCE}); if specification statements -follow statement-function-definition statements; about all sorts of -syntactic extensions. - -@node Warn About Implicit Conversions -@subsection Warn About Implicit Conversions - -@command{g77} needs a @option{-Wpromotions} option to warn if source code appears -to expect automatic, silent, and -somewhat dangerous compiler-assisted conversion of @code{REAL(KIND=1)} -constants to @code{REAL(KIND=2)} based on context. - -For example, it would warn about cases like this: - -@smallexample -DOUBLE PRECISION FOO -PARAMETER (TZPHI = 9.435784839284958) -FOO = TZPHI * 3D0 -@end smallexample - -@node Invalid Use of Hollerith Constant -@subsection Invalid Use of Hollerith Constant - -@command{g77} should disallow statements like @samp{RETURN 2HAB}, -which are invalid in both source forms -(unlike @samp{RETURN (2HAB)}, -which probably still makes no sense but at least can -be reliably parsed). -Fixed-form processing rejects it, but not free-form, except -in a way that is a bit difficult to understand. - -@node Dummy Array Without Dimensioning Dummy -@subsection Dummy Array Without Dimensioning Dummy - -@command{g77} should complain when a list of dummy arguments containing an -adjustable dummy array does -not also contain every variable listed in the dimension list of the -adjustable array. - -Currently, @command{g77} does complain about a variable that -dimensions an array but doesn't appear in any dummy list or @code{COMMON} -area, but this needs to be extended to catch cases where it doesn't appear in -every dummy list that also lists any arrays it dimensions. - -For example, @command{g77} should warn about the entry point @samp{ALT} -below, since it includes @samp{ARRAY} but not @samp{ISIZE} in its -list of arguments: - -@smallexample -SUBROUTINE PRIMARY(ARRAY, ISIZE) -REAL ARRAY(ISIZE) -ENTRY ALT(ARRAY) -@end smallexample - -@node Invalid FORMAT Specifiers -@subsection Invalid FORMAT Specifiers - -@command{g77} should check @code{FORMAT} specifiers for validity -as it does @code{FORMAT} statements. - -For example, a diagnostic would be produced for: - -@smallexample -PRINT 'HI THERE!' !User meant PRINT *, 'HI THERE!' -@end smallexample - -@node Ambiguous Dialects -@subsection Ambiguous Dialects - -@command{g77} needs a set of options such as @option{-Wugly*}, @option{-Wautomatic}, -@option{-Wvxt}, @option{-Wf90}, and so on. -These would warn about places in the user's source where ambiguities -are found, helpful in resolving ambiguities in the program's -dialect or dialects. - -@node Unused Labels -@subsection Unused Labels - -@command{g77} should warn about unused labels when @option{-Wunused} is in effect. - -@node Informational Messages -@subsection Informational Messages - -@command{g77} needs an option to suppress information messages (notes). -@option{-w} does this but also suppresses warnings. -The default should be to suppress info messages. - -Perhaps info messages should simply be eliminated. - -@node Uninitialized Variables at Run Time -@subsection Uninitialized Variables at Run Time - -@command{g77} needs an option to initialize everything (not otherwise -explicitly initialized) to ``weird'' -(machine-dependent) values, e.g. NaNs, bad (non-@code{NULL}) pointers, and -largest-magnitude integers, would help track down references to -some kinds of uninitialized variables at run time. - -Note that use of the options @samp{-O -Wuninitialized} can catch -many such bugs at compile time. - -@node Portable Unformatted Files -@subsection Portable Unformatted Files - -@cindex unformatted files -@cindex file formats -@cindex binary data -@cindex byte ordering -@command{g77} has no facility for exchanging unformatted files with systems -using different number formats---even differing only in endianness (byte -order)---or written by other compilers. Some compilers provide -facilities at least for doing byte-swapping during unformatted I/O. - -It is unrealistic to expect to cope with exchanging unformatted files -with arbitrary other compiler runtimes, but the @command{g77} runtime -should at least be able to read files written by @command{g77} on systems -with different number formats, particularly if they differ only in byte -order. - -In case you do need to write a program to translate to or from -@command{g77} (@code{libf2c}) unformatted files, they are written as -follows: -@table @asis -@item Sequential -Unformatted sequential records consist of -@enumerate -@item -A number giving the length of the record contents; -@item -the length of record contents again (for backspace). -@end enumerate - -The record length is of C type -@code{long}; this means that it is 8 bytes on 64-bit systems such as -Alpha GNU/Linux and 4 bytes on other systems, such as x86 GNU/Linux. -Consequently such files cannot be exchanged between 64-bit and 32-bit -systems, even with the same basic number format. -@item Direct access -Unformatted direct access files form a byte stream of length -@var{records}*@var{recl} bytes, where @var{records} is the maximum -record number (@code{REC=@var{records}}) written and @var{recl} is the -record length in bytes specified in the @code{OPEN} statement -(@code{RECL=@var{recl}}). Data appear in the records as determined by -the relevant @code{WRITE} statement. Dummy records with arbitrary -contents appear in the file in place of records which haven't been -written. -@end table - -Thus for exchanging a sequential or direct access unformatted file -between big- and little-endian 32-bit systems using IEEE 754 floating -point it would be sufficient to reverse the bytes in consecutive words -in the file if, and @emph{only} if, only @code{REAL*4}, @code{COMPLEX}, -@code{INTEGER*4} and/or @code{LOGICAL*4} data have been written to it by -@command{g77}. - -If necessary, it is possible to do byte-oriented i/o with @command{g77}'s -@code{FGETC} and @code{FPUTC} intrinsics. Byte-swapping can be done in -Fortran by equivalencing larger sized variables to an @code{INTEGER*1} -array or a set of scalars. - -@cindex HDF -@cindex PDB -If you need to exchange binary data between arbitrary system and -compiler variations, we recommend using a portable binary format with -Fortran bindings, such as NCSA's HDF (@uref{http://hdf.ncsa.uiuc.edu/}) -or PACT's PDB@footnote{No, not @emph{that} one.} -(@uref{http://www.llnl.gov/def_sci/pact/pact_homepage.html}). (Unlike, -say, CDF or XDR, HDF-like systems write in the native number formats and -only incur overhead when they are read on a system with a different -format.) A future @command{g77} runtime library should use such -techniques. - -@node Better List-directed I/O -@subsection Better List-directed I/O - -Values output using list-directed I/O -(@samp{PRINT *, R, D}) -should be written with a field width, precision, and so on -appropriate for the type (precision) of each value. - -(Currently, no distinction is made between single-precision -and double-precision values -by @code{libf2c}.) - -It is likely this item will require the @code{libg77} project -to be undertaken. - -In the meantime, use of formatted I/O is recommended. -While it might be of little consolation, -@command{g77} does support @samp{FORMAT(F.4)}, for example, -as long as @samp{WIDTH} is defined as a named constant -(via @code{PARAMETER}). -That at least allows some compile-time specification -of the precision of a data type, -perhaps controlled by preprocessing directives. - -@node Default to Console I/O -@subsection Default to Console I/O - -The default I/O units, -specified by @samp{READ @var{fmt}}, -@samp{READ (UNIT=*)}, -@samp{WRITE (UNIT=*)}, and -@samp{PRINT @var{fmt}}, -should not be units 5 (input) and 6 (output), -but, rather, unit numbers not normally available -for use in statements such as @code{OPEN} and @code{CLOSE}. - -Changing this would allow a program to connect units 5 and 6 -to files via @code{OPEN}, -but still use @samp{READ (UNIT=*)} and @samp{PRINT} -to do I/O to the ``console''. - -This change probably requires the @code{libg77} project. - -@node Labels Visible to Debugger -@subsection Labels Visible to Debugger - -@command{g77} should output debugging information for statements labels, -for use by debuggers that know how to support them. -Same with weirder things like construct names. -It is not yet known if any debug formats or debuggers support these. - -@node Disappointments -@section Disappointments and Misunderstandings - -These problems are perhaps regrettable, but we don't know any practical -way around them for now. - -@menu -* Mangling of Names:: @samp{SUBROUTINE FOO} is given - external name @samp{foo_}. -* Multiple Definitions of External Names:: No doing both @samp{COMMON /FOO/} - and @samp{SUBROUTINE FOO}. -* Limitation on Implicit Declarations:: No @samp{IMPLICIT CHARACTER*(*)}. -@end menu - -@node Mangling of Names -@subsection Mangling of Names in Source Code -@cindex naming issues -@cindex external names -@cindex common blocks -@cindex name space -@cindex underscore - -The current external-interface design, which includes naming of -external procedures, COMMON blocks, and the library interface, -has various usability problems, including things like adding -underscores where not really necessary (and preventing easier -inter-language operability) and yet not providing complete -namespace freedom for user C code linked with Fortran apps (due -to the naming of functions in the library, among other things). - -Project GNU should at least get all this ``right'' for systems -it fully controls, such as the Hurd, and provide defaults and -options for compatibility with existing systems and interoperability -with popular existing compilers. - -@node Multiple Definitions of External Names -@subsection Multiple Definitions of External Names -@cindex block data -@cindex BLOCK DATA statement -@cindex statements, BLOCK DATA -@cindex @code{COMMON} statement -@cindex statements, @code{COMMON} -@cindex naming conflicts - -@command{g77} doesn't allow a common block and an external procedure or -@code{BLOCK DATA} to have the same name. -Some systems allow this, but @command{g77} does not, -to be compatible with @command{f2c}. - -@command{g77} could special-case the way it handles -@code{BLOCK DATA}, since it is not compatible with @command{f2c} in this -particular area (necessarily, since @command{g77} offers an -important feature here), but -it is likely that such special-casing would be very annoying to people -with programs that use @samp{EXTERNAL FOO}, with no other mention of -@samp{FOO} in the same program unit, to refer to external procedures, since -the result would be that @command{g77} would treat these references as requests to -force-load BLOCK DATA program units. - -In that case, if @command{g77} modified -names of @code{BLOCK DATA} so they could have the same names as -@code{COMMON}, users -would find that their programs wouldn't link because the @samp{FOO} procedure -didn't have its name translated the same way. - -(Strictly speaking, -@command{g77} could emit a null-but-externally-satisfying definition of -@samp{FOO} with its name transformed as if it had been a -@code{BLOCK DATA}, but that probably invites more trouble than it's -worth.) - -@node Limitation on Implicit Declarations -@subsection Limitation on Implicit Declarations -@cindex IMPLICIT CHARACTER*(*) statement -@cindex statements, IMPLICIT CHARACTER*(*) - -@command{g77} disallows @code{IMPLICIT CHARACTER*(*)}. -This is not standard-conforming. - -@node Non-bugs -@section Certain Changes We Don't Want to Make - -This section lists changes that people frequently request, but which -we do not make because we think GNU Fortran is better without them. - -@menu -* Backslash in Constants:: Why @samp{'\\'} is a constant that - is one, not two, characters long. -* Initializing Before Specifying:: Why @samp{DATA VAR/1/} can't precede - @samp{COMMON VAR}. -* Context-Sensitive Intrinsicness:: Why @samp{CALL SQRT} won't work. -* Context-Sensitive Constants:: Why @samp{9.435784839284958} is a - single-precision constant, - and might be interpreted as - @samp{9.435785} or similar. -* Equivalence Versus Equality:: Why @samp{.TRUE. .EQ. .TRUE.} won't work. -* Order of Side Effects:: Why @samp{J = IFUNC() - IFUNC()} might - not behave as expected. -@end menu - -@node Backslash in Constants -@subsection Backslash in Constants -@cindex backslash -@cindex @command{f77} support -@cindex support, @command{f77} - -In the opinion of many experienced Fortran users, -@option{-fno-backslash} should be the default, not @option{-fbackslash}, -as currently set by @command{g77}. - -First of all, you can always specify -@option{-fno-backslash} to turn off this processing. - -Despite not being within the spirit (though apparently within the -letter) of the ANSI FORTRAN 77 standard, @command{g77} defaults to -@option{-fbackslash} because that is what most UNIX @command{f77} commands -default to, and apparently lots of code depends on this feature. - -This is a particularly troubling issue. -The use of a C construct in the midst of Fortran code -is bad enough, worse when it makes existing Fortran -programs stop working (as happens when programs written -for non-UNIX systems are ported to UNIX systems with -compilers that provide the @option{-fbackslash} feature -as the default---sometimes with no option to turn it off). - -The author of GNU Fortran wished, for reasons of linguistic -purity, to make @option{-fno-backslash} the default for GNU -Fortran and thus require users of UNIX @command{f77} and @command{f2c} -to specify @option{-fbackslash} to get the UNIX behavior. - -However, the realization that @command{g77} is intended as -a replacement for @emph{UNIX} @command{f77}, caused the author -to choose to make @command{g77} as compatible with -@command{f77} as feasible, which meant making @option{-fbackslash} -the default. - -The primary focus on compatibility is at the source-code -level, and the question became ``What will users expect -a replacement for @command{f77} to do, by default?'' -Although at least one UNIX @command{f77} does not provide -@option{-fbackslash} as a default, it appears that -the majority of them do, which suggests that -the majority of code that is compiled by UNIX @command{f77} -compilers expects @option{-fbackslash} to be the default. - -It is probably the case that more code exists -that would @emph{not} work with @option{-fbackslash} -in force than code that requires it be in force. - -However, most of @emph{that} code is not being compiled -with @command{f77}, -and when it is, new build procedures (shell scripts, -makefiles, and so on) must be set up anyway so that -they work under UNIX. -That makes a much more natural and safe opportunity for -non-UNIX users to adapt their build procedures for -@command{g77}'s default of @option{-fbackslash} than would -exist for the majority of UNIX @command{f77} users who -would have to modify existing, working build procedures -to explicitly specify @option{-fbackslash} if that was -not the default. - -One suggestion has been to configure the default for -@option{-fbackslash} (and perhaps other options as well) -based on the configuration of @command{g77}. - -This is technically quite straightforward, but will be avoided -even in cases where not configuring defaults to be -dependent on a particular configuration greatly inconveniences -some users of legacy code. - -Many users appreciate the GNU compilers because they provide an -environment that is uniform across machines. -These users would be -inconvenienced if the compiler treated things like the -format of the source code differently on certain machines. - -Occasionally users write programs intended only for a particular machine -type. -On these occasions, the users would benefit if the GNU Fortran compiler -were to support by default the same dialect as the other compilers on -that machine. -But such applications are rare. -And users writing a -program to run on more than one type of machine cannot possibly benefit -from this kind of compatibility. -(This is consistent with the design goals for @command{gcc}. -To change them for @command{g77}, you must first change them -for @command{gcc}. -Do not ask the maintainers of @command{g77} to do this for you, -or to disassociate @command{g77} from the widely understood, if -not widely agreed-upon, goals for GNU compilers in general.) - -This is why GNU Fortran does and will treat backslashes in the same -fashion on all types of machines (by default). -@xref{Direction of Language Development}, for more information on -this overall philosophy guiding the development of the GNU Fortran -language. - -Of course, users strongly concerned about portability should indicate -explicitly in their build procedures which options are expected -by their source code, or write source code that has as few such -expectations as possible. - -For example, avoid writing code that depends on backslash (@samp{\}) -being interpreted either way in particular, such as by -starting a program unit with: - -@smallexample -CHARACTER BACKSL -PARAMETER (BACKSL = '\\') -@end smallexample - -@noindent -Then, use concatenation of @samp{BACKSL} anyplace a backslash -is desired. -In this way, users can write programs which have the same meaning -in many Fortran dialects. - -(However, this technique does not work for Hollerith constants---which -is just as well, since the only generally portable uses for Hollerith -constants are in places where character constants can and should -be used instead, for readability.) - -@node Initializing Before Specifying -@subsection Initializing Before Specifying -@cindex initialization, statement placement -@cindex placing initialization statements - -@command{g77} does not allow @samp{DATA VAR/1/} to appear in the -source code before @samp{COMMON VAR}, -@samp{DIMENSION VAR(10)}, @samp{INTEGER VAR}, and so on. -In general, @command{g77} requires initialization of a variable -or array to be specified @emph{after} all other specifications -of attributes (type, size, placement, and so on) of that variable -or array are specified (though @emph{confirmation} of data type is -permitted). - -It is @emph{possible} @command{g77} will someday allow all of this, -even though it is not allowed by the FORTRAN 77 standard. - -Then again, maybe it is better to have -@command{g77} always require placement of @code{DATA} -so that it can possibly immediately write constants -to the output file, thus saving time and space. - -That is, @samp{DATA A/1000000*1/} should perhaps always -be immediately writable to canonical assembler, unless it's already known -to be in a @code{COMMON} area following as-yet-uninitialized stuff, -and to do this it cannot be followed by @samp{COMMON A}. - -@node Context-Sensitive Intrinsicness -@subsection Context-Sensitive Intrinsicness -@cindex intrinsics, context-sensitive -@cindex context-sensitive intrinsics - -@command{g77} treats procedure references to @emph{possible} intrinsic -names as always enabling their intrinsic nature, regardless of -whether the @emph{form} of the reference is valid for that -intrinsic. - -For example, @samp{CALL SQRT} is interpreted by @command{g77} as -an invalid reference to the @code{SQRT} intrinsic function, -because the reference is a subroutine invocation. - -First, @command{g77} recognizes the statement @samp{CALL SQRT} -as a reference to a @emph{procedure} named @samp{SQRT}, not -to a @emph{variable} with that name (as it would for a statement -such as @samp{V = SQRT}). - -Next, @command{g77} establishes that, in the program unit being compiled, -@code{SQRT} is an intrinsic---not a subroutine that -happens to have the same name as an intrinsic (as would be -the case if, for example, @samp{EXTERNAL SQRT} was present). - -Finally, @command{g77} recognizes that the @emph{form} of the -reference is invalid for that particular intrinsic. -That is, it recognizes that it is invalid for an intrinsic -@emph{function}, such as @code{SQRT}, to be invoked as -a @emph{subroutine}. - -At that point, @command{g77} issues a diagnostic. - -Some users claim that it is ``obvious'' that @samp{CALL SQRT} -references an external subroutine of their own, not an -intrinsic function. - -However, @command{g77} knows about intrinsic -subroutines, not just functions, and is able to support both having -the same names, for example. - -As a result of this, @command{g77} rejects calls -to intrinsics that are not subroutines, and function invocations -of intrinsics that are not functions, just as it (and most compilers) -rejects invocations of intrinsics with the wrong number (or types) -of arguments. - -So, use the @samp{EXTERNAL SQRT} statement in a program unit that calls -a user-written subroutine named @samp{SQRT}. - -@node Context-Sensitive Constants -@subsection Context-Sensitive Constants -@cindex constants, context-sensitive -@cindex context-sensitive constants - -@command{g77} does not use context to determine the types of -constants or named constants (@code{PARAMETER}), except -for (non-standard) typeless constants such as @samp{'123'O}. - -For example, consider the following statement: - -@smallexample -PRINT *, 9.435784839284958 * 2D0 -@end smallexample - -@noindent -@command{g77} will interpret the (truncated) constant -@samp{9.435784839284958} as a @code{REAL(KIND=1)}, not @code{REAL(KIND=2)}, -constant, because the suffix @code{D0} is not specified. - -As a result, the output of the above statement when -compiled by @command{g77} will appear to have ``less precision'' -than when compiled by other compilers. - -In these and other cases, some compilers detect the -fact that a single-precision constant is used in -a double-precision context and therefore interpret the -single-precision constant as if it was @emph{explicitly} -specified as a double-precision constant. -(This has the effect of appending @emph{decimal}, not -@emph{binary}, zeros to the fractional part of the -number---producing different computational results.) - -The reason this misfeature is dangerous is that a slight, -apparently innocuous change to the source code can change -the computational results. -Consider: - -@smallexample -REAL ALMOST, CLOSE -DOUBLE PRECISION FIVE -PARAMETER (ALMOST = 5.000000000001) -FIVE = 5 -CLOSE = 5.000000000001 -PRINT *, 5.000000000001 - FIVE -PRINT *, ALMOST - FIVE -PRINT *, CLOSE - FIVE -END -@end smallexample - -@noindent -Running the above program should -result in the same value being -printed three times. -With @command{g77} as the compiler, -it does. - -However, compiled by many other compilers, -running the above program would print -two or three distinct values, because -in two or three of the statements, the -constant @samp{5.000000000001}, which -on most systems is exactly equal to @samp{5.} -when interpreted as a single-precision constant, -is instead interpreted as a double-precision -constant, preserving the represented -precision. -However, this ``clever'' promotion of -type does not extend to variables or, -in some compilers, to named constants. - -Since programmers often are encouraged to replace manifest -constants or permanently-assigned variables with named -constants (@code{PARAMETER} in Fortran), and might need -to replace some constants with variables having the same -values for pertinent portions of code, -it is important that compilers treat code so modified in the -same way so that the results of such programs are the same. -@command{g77} helps in this regard by treating constants just -the same as variables in terms of determining their types -in a context-independent way. - -Still, there is a lot of existing Fortran code that has -been written to depend on the way other compilers freely -interpret constants' types based on context, so anything -@command{g77} can do to help flag cases of this in such code -could be very helpful. - -@node Equivalence Versus Equality -@subsection Equivalence Versus Equality -@cindex .EQV., with integer operands -@cindex comparing logical expressions -@cindex logical expressions, comparing - -Use of @code{.EQ.} and @code{.NE.} on @code{LOGICAL} operands -is not supported, except via @option{-fugly-logint}, which is not -recommended except for legacy code (where the behavior expected -by the @emph{code} is assumed). - -Legacy code should be changed, as resources permit, to use @code{.EQV.} -and @code{.NEQV.} instead, as these are permitted by the various -Fortran standards. - -New code should never be written expecting @code{.EQ.} or @code{.NE.} -to work if either of its operands is @code{LOGICAL}. - -The problem with supporting this ``feature'' is that there is -unlikely to be consensus on how it works, as illustrated by the -following sample program: - -@smallexample -LOGICAL L,M,N -DATA L,M,N /3*.FALSE./ -IF (L.AND.M.EQ.N) PRINT *,'L.AND.M.EQ.N' -END -@end smallexample - -The issue raised by the above sample program is: what is the -precedence of @code{.EQ.} (and @code{.NE.}) when applied to -@code{LOGICAL} operands? - -Some programmers will argue that it is the same as the precedence -for @code{.EQ.} when applied to numeric (such as @code{INTEGER}) -operands. -By this interpretation, the subexpression @samp{M.EQ.N} must be -evaluated first in the above program, resulting in a program that, -when run, does not execute the @code{PRINT} statement. - -Other programmers will argue that the precedence is the same as -the precedence for @code{.EQV.}, which is restricted by the standards -to @code{LOGICAL} operands. -By this interpretation, the subexpression @samp{L.AND.M} must be -evaluated first, resulting in a program that @emph{does} execute -the @code{PRINT} statement. - -Assigning arbitrary semantic interpretations to syntactic expressions -that might legitimately have more than one ``obvious'' interpretation -is generally unwise. - -The creators of the various Fortran standards have done a good job -in this case, requiring a distinct set of operators (which have their -own distinct precedence) to compare @code{LOGICAL} operands. -This requirement results in expression syntax with more certain -precedence (without requiring substantial context), making it easier -for programmers to read existing code. -@command{g77} will avoid muddying up elements of the Fortran language -that were well-designed in the first place. - -(Ask C programmers about the precedence of expressions such as -@samp{(a) & (b)} and @samp{(a) - (b)}---they cannot even tell -you, without knowing more context, whether the @samp{&} and @samp{-} -operators are infix (binary) or unary!) - -Most dangerous of all is the fact that, -even assuming consensus on its meaning, -an expression like @samp{L.AND.M.EQ.N}, -if it is the result of a typographical error, -doesn't @emph{look} like it has such a typo. -Even experienced Fortran programmers would not likely notice that -@samp{L.AND.M.EQV.N} was, in fact, intended. - -So, this is a prime example of a circumstance in which -a quality compiler diagnoses the code, -instead of leaving it up to someone debugging it -to know to turn on special compiler options -that might diagnose it. - -@node Order of Side Effects -@subsection Order of Side Effects -@cindex side effects, order of evaluation -@cindex order of evaluation, side effects - -@command{g77} does not necessarily produce code that, when run, performs -side effects (such as those performed by function invocations) -in the same order as in some other compiler---or even in the same -order as another version, port, or invocation (using different -command-line options) of @command{g77}. - -It is never safe to depend on the order of evaluation of side effects. -For example, an expression like this may very well behave differently -from one compiler to another: - -@smallexample -J = IFUNC() - IFUNC() -@end smallexample - -@noindent -There is no guarantee that @samp{IFUNC} will be evaluated in any particular -order. -Either invocation might happen first. -If @samp{IFUNC} returns 5 the first time it is invoked, and -returns 12 the second time, @samp{J} might end up with the -value @samp{7}, or it might end up with @samp{-7}. - -Generally, in Fortran, procedures with side-effects intended to -be visible to the caller are best designed as @emph{subroutines}, -not functions. -Examples of such side-effects include: - -@itemize @bullet -@item -The generation of random numbers -that are intended to influence return values. - -@item -Performing I/O -(other than internal I/O to local variables). - -@item -Updating information in common blocks. -@end itemize - -An example of a side-effect that is not intended to be visible -to the caller is a function that maintains a cache of recently -calculated results, intended solely to speed repeated invocations -of the function with identical arguments. -Such a function can be safely used in expressions, because -if the compiler optimizes away one or more calls to the -function, operation of the program is unaffected (aside -from being speeded up). - -@node Warnings and Errors -@section Warning Messages and Error Messages - -@cindex error messages -@cindex warnings vs errors -@cindex messages, warning and error -The GNU compiler can produce two kinds of diagnostics: errors and -warnings. -Each kind has a different purpose: - -@itemize @w{} -@item -@emph{Errors} report problems that make it impossible to compile your -program. -GNU Fortran reports errors with the source file name, line -number, and column within the line where the problem is apparent. - -@item -@emph{Warnings} report other unusual conditions in your code that -@emph{might} indicate a problem, although compilation can (and does) -proceed. -Warning messages also report the source file name, line number, -and column information, -but include the text @samp{warning:} to distinguish them -from error messages. -@end itemize - -Warnings might indicate danger points where you should check to make sure -that your program really does what you intend; or the use of obsolete -features; or the use of nonstandard features of GNU Fortran. -Many warnings are issued only if you ask for them, with one of the -@option{-W} options (for instance, @option{-Wall} requests a variety of -useful warnings). - -@emph{Note:} Currently, the text of the line and a pointer to the column -is printed in most @command{g77} diagnostics. - -@xref{Warning Options,,Options to Request or Suppress Warnings}, for -more detail on these and related command-line options. - -@node Open Questions -@chapter Open Questions - -Please consider offering useful answers to these questions! - -@itemize @bullet -@item -@code{LOC()} and other intrinsics are probably somewhat misclassified. -Is the a need for more precise classification of intrinsics, and if so, -what are the appropriate groupings? -Is there a need to individually -enable/disable/delete/hide intrinsics from the command line? -@end itemize - -@node Bugs -@chapter Reporting Bugs -@cindex bugs -@cindex reporting bugs - -Your bug reports play an essential role in making GNU Fortran reliable. - -When you encounter a problem, the first thing to do is to see if it is -already known. @xref{Trouble}. If it isn't known, then you should -report the problem. - -@menu -* Criteria: Bug Criteria. Have you really found a bug? -* Reporting: Bug Reporting. How to report a bug effectively. -@end menu - -@xref{Trouble,,Known Causes of Trouble with GNU Fortran}, -for information on problems we already know about. - -@xref{Service,,How To Get Help with GNU Fortran}, -for information on where to ask for help. - -@node Bug Criteria -@section Have You Found a Bug? -@cindex bug criteria - -If you are not sure whether you have found a bug, here are some guidelines: - -@itemize @bullet -@cindex fatal signal -@cindex core dump -@item -If the compiler gets a fatal signal, for any input whatever, that is a -compiler bug. -Reliable compilers never crash---they just remain obsolete. - -@cindex invalid assembly code -@cindex assembly code, invalid -@item -If the compiler produces invalid assembly code, for any input whatever, -@c (except an @code{asm} statement), -that is a compiler bug, unless the -compiler reports errors (not just warnings) which would ordinarily -prevent the assembler from being run. - -@cindex undefined behavior -@cindex undefined function value -@item -If the compiler produces valid assembly code that does not correctly -execute the input source code, that is a compiler bug. - -However, you must double-check to make sure, because you might have run -into an incompatibility between GNU Fortran and traditional Fortran. -@c (@pxref{Incompatibilities}). -These incompatibilities might be considered -bugs, but they are inescapable consequences of valuable features. - -Or you might have a program whose behavior is undefined, which happened -by chance to give the desired results with another Fortran compiler. -It is best to check the relevant Fortran standard thoroughly if -it is possible that the program indeed does something undefined. - -After you have localized the error to a single source line, it should -be easy to check for these things. -If your program is correct and well defined, you have found -a compiler bug. - -It might help if, in your submission, you identified the specific -language in the relevant Fortran standard that specifies the -desired behavior, if it isn't likely to be obvious and agreed-upon -by all Fortran users. - -@item -If the compiler produces an error message for valid input, that is a -compiler bug. - -@cindex invalid input -@item -If the compiler does not produce an error message for invalid input, -that is a compiler bug. -However, you should note that your idea of -``invalid input'' might be someone else's idea -of ``an extension'' or ``support for traditional practice''. - -@item -If you are an experienced user of Fortran compilers, your suggestions -for improvement of GNU Fortran are welcome in any case. -@end itemize - -Many, perhaps most, bug reports against @command{g77} turn out to -be bugs in the user's code. -While we find such bug reports educational, they sometimes take -a considerable amount of time to track down or at least respond -to---time we could be spending making @command{g77}, not some user's -code, better. - -Some steps you can take to verify that the bug is not certainly -in the code you're compiling with @command{g77}: - -@itemize @bullet -@item -Compile your code using the @command{g77} options @samp{-W -Wall -O}. -These options enable many useful warning; the @option{-O} option -enables flow analysis that enables the uninitialized-variable -warning. - -If you investigate the warnings and find evidence of possible bugs -in your code, fix them first and retry @command{g77}. - -@item -Compile your code using the @command{g77} options @option{-finit-local-zero}, -@option{-fno-automatic}, @option{-ffloat-store}, and various -combinations thereof. - -If your code works with any of these combinations, that is not -proof that the bug isn't in @command{g77}---a @command{g77} bug exposed -by your code might simply be avoided, or have a different, more subtle -effect, when different options are used---but it can be a -strong indicator that your code is making unwarranted assumptions -about the Fortran dialect and/or underlying machine it is -being compiled and run on. - -@xref{Overly Convenient Options,,Overly Convenient Command-Line Options}, -for information on the @option{-fno-automatic} and -@option{-finit-local-zero} options and how to convert -their use into selective changes in your own code. - -@item -@pindex ftnchek -Validate your code with @command{ftnchek} or a similar code-checking -tool. -@command{ftnchek} can be found at @uref{ftp://ftp.netlib.org/fortran} -or @uref{ftp://ftp.dsm.fordham.edu}. - -@pindex make -@cindex Makefile example -Here are some sample @file{Makefile} rules using @command{ftnchek} -``project'' files to do cross-file checking and @command{sfmakedepend} -(from @uref{ftp://ahab.rutgers.edu/pub/perl/sfmakedepend}) -to maintain dependencies automatically. -These assume the use of GNU @command{make}. - -@smallexample -# Dummy suffix for ftnchek targets: -.SUFFIXES: .chek -.PHONY: chekall - -# How to compile .f files (for implicit rule): -FC = g77 -# Assume `include' directory: -FFLAGS = -Iinclude -g -O -Wall - -# Flags for ftnchek: -CHEK1 = -array=0 -include=includes -noarray -CHEK2 = -nonovice -usage=1 -notruncation -CHEKFLAGS = $(CHEK1) $(CHEK2) - -# Run ftnchek with all the .prj files except the one corresponding -# to the target's root: -%.chek : %.f ; \ - ftnchek $(filter-out $*.prj,$(PRJS)) $(CHEKFLAGS) \ - -noextern -library $< - -# Derive a project file from a source file: -%.prj : %.f ; \ - ftnchek $(CHEKFLAGS) -noextern -project -library $< - -# The list of objects is assumed to be in variable OBJS. -# Sources corresponding to the objects: -SRCS = $(OBJS:%.o=%.f) -# ftnchek project files: -PRJS = $(OBJS:%.o=%.prj) - -# Build the program -prog: $(OBJS) ; \ - $(FC) -o $@ $(OBJS) - -chekall: $(PRJS) ; \ - ftnchek $(CHEKFLAGS) $(PRJS) - -prjs: $(PRJS) - -# For Emacs M-x find-tag: -TAGS: $(SRCS) ; \ - etags $(SRCS) - -# Rebuild dependencies: -depend: ; \ - sfmakedepend -I $(PLTLIBDIR) -I includes -a prj $(SRCS1) -@end smallexample - -@item -Try your code out using other Fortran compilers, such as @command{f2c}. -If it does not work on at least one other compiler (assuming the -compiler supports the features the code needs), that is a strong -indicator of a bug in the code. - -However, even if your code works on many compilers @emph{except} -@command{g77}, that does @emph{not} mean the bug is in @command{g77}. -It might mean the bug is in your code, and that @command{g77} simply -exposes it more readily than other compilers. -@end itemize - -@node Bug Reporting -@section How to Report Bugs -@cindex compiler bugs, reporting - -Bugs should be reported to our bug database. Please refer to -@uref{http://gcc.gnu.org/bugs.html} for up-to-date instructions how to -submit bug reports. Copies of this file in HTML (@file{bugs.html}) and -plain text (@file{BUGS}) are also part of GCC releases. - - -@node Service -@chapter How To Get Help with GNU Fortran - -If you need help installing, using or changing GNU Fortran, there are two -ways to find it: - -@itemize @bullet -@item -Look in the service directory for someone who might help you for a fee. -The service directory is found in the file named @file{SERVICE} in the -GCC distribution. - -@item -Send a message to @email{@value{email-help}}. -@end itemize - -@end ifset -@ifset INTERNALS -@node Adding Options -@chapter Adding Options -@cindex options, adding -@cindex adding options - -To add a new command-line option to @command{g77}, first decide -what kind of option you wish to add. -Search the @command{g77} and @command{gcc} documentation for one -or more options that is most closely like the one you want to add -(in terms of what kind of effect it has, and so on) to -help clarify its nature. - -@itemize @bullet -@item -@emph{Fortran options} are options that apply only -when compiling Fortran programs. -They are accepted by @command{g77} and @command{gcc}, but -they apply only when compiling Fortran programs. - -@item -@emph{Compiler options} are options that apply -when compiling most any kind of program. -@end itemize - -@emph{Fortran options} are listed in the file -@file{@value{path-g77}/lang-options.h}, -which is used during the build of @command{gcc} to -build a list of all options that are accepted by -at least one language's compiler. -This list goes into the @code{documented_lang_options} array -in @file{gcc/toplev.c}, which uses this array to -determine whether a particular option should be -offered to the linked-in front end for processing -by calling @code{lang_option_decode}, which, for -@command{g77}, is in @file{@value{path-g77}/com.c} and just -calls @code{ffe_decode_option}. - -If the linked-in front end ``rejects'' a -particular option passed to it, @file{toplev.c} -just ignores the option, because @emph{some} -language's compiler is willing to accept it. - -This allows commands like @samp{gcc -fno-asm foo.c bar.f} -to work, even though Fortran compilation does -not currently support the @option{-fno-asm} option; -even though the @code{f771} version of @code{lang_decode_option} -rejects @option{-fno-asm}, @file{toplev.c} doesn't -produce a diagnostic because some other language (C) -does accept it. - -This also means that commands like -@samp{g77 -fno-asm foo.f} yield no diagnostics, -despite the fact that no phase of the command was -able to recognize and process @option{-fno-asm}---perhaps -a warning about this would be helpful if it were -possible. - -Code that processes Fortran options is found in -@file{@value{path-g77}/top.c}, function @code{ffe_decode_option}. -This code needs to check positive and negative forms -of each option. - -The defaults for Fortran options are set in their -global definitions, also found in @file{@value{path-g77}/top.c}. -Many of these defaults are actually macros defined -in @file{@value{path-g77}/target.h}, since they might be -machine-specific. -However, since, in practice, GNU compilers -should behave the same way on all configurations -(especially when it comes to language constructs), -the practice of setting defaults in @file{target.h} -is likely to be deprecated and, ultimately, stopped -in future versions of @command{g77}. - -Accessor macros for Fortran options, used by code -in the @command{g77} FFE, are defined in @file{@value{path-g77}/top.h}. - -@emph{Compiler options} are listed in @file{gcc/toplev.c} -in the array @code{f_options}. -An option not listed in @code{lang_options} is -looked up in @code{f_options} and handled from there. - -The defaults for compiler options are set in the -global definitions for the corresponding variables, -some of which are in @file{gcc/toplev.c}. - -You can set different defaults for @emph{Fortran-oriented} -or @emph{Fortran-reticent} compiler options by changing -the source code of @command{g77} and rebuilding. -How to do this depends on the version of @command{g77}: - -@table @code -@item G77 0.5.24 (EGCS 1.1) -@itemx G77 0.5.25 (EGCS 1.2 - which became GCC 2.95) -Change the @code{lang_init_options} routine in @file{gcc/gcc/f/com.c}. - -(Note that these versions of @command{g77} -perform internal consistency checking automatically -when the @option{-fversion} option is specified.) - -@item G77 0.5.23 -@itemx G77 0.5.24 (EGCS 1.0) -Change the way @code{f771} handles the @option{-fset-g77-defaults} -option, which is always provided as the first option when -called by @command{g77} or @command{gcc}. - -This code is in @code{ffe_decode_options} in @file{@value{path-g77}/top.c}. -Have it change just the variables that you want to default -to a different setting for Fortran compiles compared to -compiles of other languages. - -The @option{-fset-g77-defaults} option is passed to @code{f771} -automatically because of the specification information -kept in @file{@value{path-g77}/lang-specs.h}. -This file tells the @command{gcc} command how to recognize, -in this case, Fortran source files (those to be preprocessed, -and those that are not), and further, how to invoke the -appropriate programs (including @code{f771}) to process -those source files. - -It is in @file{@value{path-g77}/lang-specs.h} that @option{-fset-g77-defaults}, -@option{-fversion}, and other options are passed, as appropriate, -even when the user has not explicitly specified them. -Other ``internal'' options such as @option{-quiet} also -are passed via this mechanism. -@end table - -@node Projects -@chapter Projects -@cindex projects - -If you want to contribute to @command{g77} by doing research, -design, specification, documentation, coding, or testing, -the following information should give you some ideas. - -@menu -* Efficiency:: Make @command{g77} itself compile code faster. -* Better Optimization:: Teach @command{g77} to generate faster code. -* Simplify Porting:: Make @command{g77} easier to configure, build, - and install. -* More Extensions:: Features many users won't know to ask for. -* Machine Model:: @command{g77} should better leverage @command{gcc}. -* Internals Documentation:: Make maintenance easier. -* Internals Improvements:: Make internals more robust. -* Better Diagnostics:: Make using @command{g77} on new code easier. -@end menu - -@node Efficiency -@section Improve Efficiency -@cindex efficiency - -Don't bother doing any performance analysis until most of the -following items are taken care of, because there's no question -they represent serious space/time problems, although some of -them show up only given certain kinds of (popular) input. - -@itemize @bullet -@item -Improve @code{malloc} package and its uses to specify more info about -memory pools and, where feasible, use obstacks to implement them. - -@item -Skip over uninitialized portions of aggregate areas (arrays, -@code{COMMON} areas, @code{EQUIVALENCE} areas) so zeros need not be output. -This would reduce memory usage for large initialized aggregate -areas, even ones with only one initialized element. - -As of version 0.5.18, a portion of this item has already been -accomplished. - -@item -Prescan the statement (in @file{sta.c}) so that the nature of the statement -is determined as much as possible by looking entirely at its form, -and not looking at any context (previous statements, including types -of symbols). -This would allow ripping out of the statement-confirmation, -symbol retraction/confirmation, and diagnostic inhibition -mechanisms. -Plus, it would result in much-improved diagnostics. -For example, @samp{CALL some-intrinsic(@dots{})}, where the intrinsic -is not a subroutine intrinsic, would result actual error instead of the -unimplemented-statement catch-all. - -@item -Throughout @command{g77}, don't pass line/column pairs where -a simple @code{ffewhere} type, which points to the error as much as is -desired by the configuration, will do, and don't pass @code{ffelexToken} types -where a simple @code{ffewhere} type will do. -Then, allow new default -configuration of @code{ffewhere} such that the source line text is not -preserved, and leave it to things like Emacs' next-error function -to point to them (now that @samp{next-error} supports column, -or, perhaps, character-offset, numbers). -The change in calling sequences should improve performance somewhat, -as should not having to save source lines. -(Whether this whole -item will improve performance is questionable, but it should -improve maintainability.) - -@item -Handle @samp{DATA (A(I),I=1,1000000)/1000000*2/} more efficiently, especially -as regards the assembly output. -Some of this might require improving -the back end, but lots of improvement in space/time required in @command{g77} -itself can be fairly easily obtained without touching the back end. -Maybe type-conversion, where necessary, can be speeded up as well in -cases like the one shown (converting the @samp{2} into @samp{2.}). - -@item -If analysis shows it to be worthwhile, optimize @file{lex.c}. - -@item -Consider redesigning @file{lex.c} to not need any feedback -during tokenization, by keeping track of enough parse state on its -own. -@end itemize - -@node Better Optimization -@section Better Optimization -@cindex optimization, better -@cindex code generation, improving - -Much of this work should be put off until after @command{g77} has -all the features necessary for its widespread acceptance as a -useful F77 compiler. -However, perhaps this work can be done in parallel during -the feature-adding work. - -@itemize @bullet -@item -Do the equivalent of the trick of putting @samp{extern inline} in front -of every function definition in @code{libg2c} and #include'ing the resulting -file in @command{f2c}+@command{gcc}---that is, inline all run-time-library functions -that are at all worth inlining. -(Some of this has already been done, such as for integral exponentiation.) - -@item -When doing @samp{CHAR_VAR = CHAR_FUNC(@dots{})}, -and it's clear that types line up -and @samp{CHAR_VAR} is addressable or not a @code{VAR_DECL}, -make @samp{CHAR_VAR}, not a -temporary, be the receiver for @samp{CHAR_FUNC}. -(This is now done for @code{COMPLEX} variables.) - -@item -Design and implement Fortran-specific optimizations that don't -really belong in the back end, or where the front end needs to -give the back end more info than it currently does. - -@item -Design and implement a new run-time library interface, with the -code going into @code{libgcc} so no special linking is required to -link Fortran programs using standard language features. -This library -would speed up lots of things, from I/O (using precompiled formats, -doing just one, or, at most, very few, calls for arrays or array sections, -and so on) to general computing (array/section implementations of -various intrinsics, implementation of commonly performed loops that -aren't likely to be optimally compiled otherwise, etc.). - -Among the important things the library would do are: - -@itemize @bullet -@item -Be a one-stop-shop-type -library, hence shareable and usable by all, in that what are now -library-build-time options in @code{libg2c} would be moved at least to the -@command{g77} compile phase, if not to finer grains (such as choosing how -list-directed I/O formatting is done by default at @code{OPEN} time, for -preconnected units via options or even statements in the main program -unit, maybe even on a per-I/O basis with appropriate pragma-like -devices). -@end itemize - -@item -Probably requiring the new library design, change interface to -normally have @code{COMPLEX} functions return their values in the way -@command{gcc} would if they were declared @code{__complex__ float}, -rather than using -the mechanism currently used by @code{CHARACTER} functions (whereby the -functions are compiled as returning void and their first arg is -a pointer to where to store the result). -(Don't append underscores to -external names for @code{COMPLEX} functions in some cases once @command{g77} uses -@command{gcc} rather than @command{f2c} calling conventions.) - -@item -Do something useful with @code{doiter} references where possible. -For example, @samp{CALL FOO(I)} cannot modify @samp{I} if within -a @code{DO} loop that uses @samp{I} as the -iteration variable, and the back end might find that info useful -in determining whether it needs to read @samp{I} back into a register after -the call. -(It normally has to do that, unless it knows @samp{FOO} never -modifies its passed-by-reference argument, which is rarely the case -for Fortran-77 code.) -@end itemize - -@node Simplify Porting -@section Simplify Porting -@cindex porting, simplify -@cindex simplify porting - -Making @command{g77} easier to configure, port, build, and install, either -as a single-system compiler or as a cross-compiler, would be -very useful. - -@itemize @bullet -@item -A new library (replacing @code{libg2c}) should improve portability as well as -produce more optimal code. -Further, @command{g77} and the new library should -conspire to simplify naming of externals, such as by removing unnecessarily -added underscores, and to reduce/eliminate the possibility of naming -conflicts, while making debugger more straightforward. - -Also, it should -make multi-language applications more feasible, such as by providing -Fortran intrinsics that get Fortran unit numbers given C @code{FILE *} -descriptors. - -@item -Possibly related to a new library, @command{g77} should produce the equivalent -of a @command{gcc} @samp{main(argc, argv)} function when it compiles a -main program unit, instead of compiling something that must be -called by a library -implementation of @code{main()}. - -This would do many useful things such as -provide more flexibility in terms of setting up exception handling, -not requiring programmers to start their debugging sessions with -@kbd{breakpoint MAIN__} followed by @kbd{run}, and so on. - -@item -The GBE needs to understand the difference between alignment -requirements and desires. -For example, on Intel x86 machines, @command{g77} currently imposes -overly strict alignment requirements, due to the back end, but it -would be useful for Fortran and C programmers to be able to override -these @emph{recommendations} as long as they don't violate the actual -processor @emph{requirements}. -@end itemize - -@node More Extensions -@section More Extensions -@cindex extensions, more - -These extensions are not the sort of things users ask for ``by name'', -but they might improve the usability of @command{g77}, and Fortran in -general, in the long run. -Some of these items really pertain to improving @command{g77} internals -so that some popular extensions can be more easily supported. - -@itemize @bullet -@item -Look through all the documentation on the GNU Fortran language, -dialects, compiler, missing features, bugs, and so on. -Many mentions of incomplete or missing features are -sprinkled throughout. -It is not worth repeating them here. - -@item -Consider adding a @code{NUMERIC} type to designate typeless numeric constants, -named and unnamed. -The idea is to provide a forward-looking, effective -replacement for things like the old-style @code{PARAMETER} statement -when people -really need typelessness in a maintainable, portable, clearly documented -way. -Maybe @code{TYPELESS} would include @code{CHARACTER}, @code{POINTER}, -and whatever else might come along. -(This is not really a call for polymorphism per se, just -an ability to express limited, syntactic polymorphism.) - -@item -Support @samp{OPEN(@dots{},KEY=(@dots{}),@dots{})}. - -@item -Support arbitrary file unit numbers, instead of limiting them -to 0 through @samp{MXUNIT-1}. -(This is a @code{libg2c} issue.) - -@item -@samp{OPEN(NOSPANBLOCKS,@dots{})} is treated as -@samp{OPEN(UNIT=NOSPANBLOCKS,@dots{})}, so a -later @code{UNIT=} in the first example is invalid. -Make sure this is what users of this feature would expect. - -@item -Currently @command{g77} disallows @samp{READ(1'10)} since -it is an obnoxious syntax, but -supporting it might be pretty easy if needed. -More details are needed, such -as whether general expressions separated by an apostrophe are supported, -or maybe the record number can be a general expression, and so on. - -@item -Support @code{STRUCTURE}, @code{UNION}, @code{MAP}, and @code{RECORD} -fully. -Currently there is no support at all -for @code{%FILL} in @code{STRUCTURE} and related syntax, -whereas the rest of the -stuff has at least some parsing support. -This requires either major -changes to @code{libg2c} or its replacement. - -@item -F90 and @command{g77} probably disagree about label scoping relative to -@code{INTERFACE} and @code{END INTERFACE}, and their contained -procedure interface bodies (blocks?). - -@item -@code{ENTRY} doesn't support F90 @code{RESULT()} yet, -since that was added after S8.112. - -@item -Empty-statement handling (10 ;;CONTINUE;;) probably isn't consistent -with the final form of the standard (it was vague at S8.112). - -@item -It seems to be an ``open'' question whether a file, immediately after being -@code{OPEN}ed,is positioned at the beginning, the end, or wherever---it -might be nice to offer an option of opening to ``undefined'' status, requiring -an explicit absolute-positioning operation to be performed before any -other (besides @code{CLOSE}) to assist in making applications port to systems -(some IBM?) that @code{OPEN} to the end of a file or some such thing. -@end itemize - -@node Machine Model -@section Machine Model - -This items pertain to generalizing @command{g77}'s view of -the machine model to more fully accept whatever the GBE -provides it via its configuration. - -@itemize @bullet -@item -Switch to using @code{REAL_VALUE_TYPE} to represent floating-point constants -exclusively so the target float format need not be required. -This -means changing the way @command{g77} handles initialization of aggregate areas -having more than one type, such as @code{REAL} and @code{INTEGER}, -because currently -it initializes them as if they were arrays of @code{char} and uses the -bit patterns of the constants of the various types in them to determine -what to stuff in elements of the arrays. - -@item -Rely more and more on back-end info and capabilities, especially in the -area of constants (where having the @command{g77} front-end's IL just store -the appropriate tree nodes containing constants might be best). - -@item -Suite of C and Fortran programs that a user/administrator can run on a -machine to help determine the configuration for @command{g77} before building -and help determine if the compiler works (especially with whatever -libraries are installed) after building. -@end itemize - -@node Internals Documentation -@section Internals Documentation - -Better info on how @command{g77} works and how to port it is needed. - -@xref{Front End}, which contains some information -on @command{g77} internals. - -@node Internals Improvements -@section Internals Improvements - -Some more items that would make @command{g77} more reliable -and easier to maintain: - -@itemize @bullet -@item -Generally make expression handling focus -more on critical syntax stuff, leaving semantics to callers. -For example, -anything a caller can check, semantically, let it do so, rather -than having @file{expr.c} do it. -(Exceptions might include things like -diagnosing @samp{FOO(I--K:)=BAR} where @samp{FOO} is a @code{PARAMETER}---if -it seems -important to preserve the left-to-right-in-source order of production -of diagnostics.) - -@item -Come up with better naming conventions for @option{-D} to establish requirements -to achieve desired implementation dialect via @file{proj.h}. - -@item -Clean up used tokens and @code{ffewhere}s in @code{ffeglobal_terminate_1}. - -@item -Replace @file{sta.c} @code{outpooldisp} mechanism with @code{malloc_pool_use}. - -@item -Check for @code{opANY} in more places in @file{com.c}, @file{std.c}, -and @file{ste.c}, and get rid of the @samp{opCONVERT(opANY)} kludge -(after determining if there is indeed no real need for it). - -@item -Utility to read and check @file{bad.def} messages and their references in the -code, to make sure calls are consistent with message templates. - -@item -Search and fix @samp{&ffe@dots{}} and similar so that -@samp{ffe@dots{}ptr@dots{}} macros are -available instead (a good argument for wishing this could have written all -this stuff in C++, perhaps). -On the other hand, it's questionable whether this sort of -improvement is really necessary, given the availability of -tools such as Emacs and Perl, which make finding any -address-taking of structure members easy enough? - -@item -Some modules truly export the member names of their structures (and the -structures themselves), maybe fix this, and fix other modules that just -appear to as well (by appending @samp{_}, though it'd be ugly and probably -not worth the time). - -@item -Implement C macros @samp{RETURNS(value)} and @samp{SETS(something,value)} -in @file{proj.h} -and use them throughout @command{g77} source code (especially in the definitions -of access macros in @samp{.h} files) so they can be tailored -to catch code writing into a @samp{RETURNS()} or reading from a @samp{SETS()}. - -@item -Decorate throughout with @code{const} and other such stuff. - -@item -All F90 notational derivations in the source code are still based -on the S8.112 version of the draft standard. -Probably should update -to the official standard, or put documentation of the rules as used -in the code@dots{}uh@dots{}in the code. - -@item -Some @code{ffebld_new} calls (those outside of @file{ffeexpr.c} or -inside but invoked via paths not involving @code{ffeexpr_lhs} or -@code{ffeexpr_rhs}) might be creating things -in improper pools, leading to such things staying around too long or -(doubtful, but possible and dangerous) not long enough. - -@item -Some @code{ffebld_list_new} (or whatever) calls might not be matched by -@code{ffebld_list_bottom} (or whatever) calls, which might someday matter. -(It definitely is not a problem just yet.) - -@item -Probably not doing clean things when we fail to @code{EQUIVALENCE} something -due to alignment/mismatch or other problems---they end up without -@code{ffestorag} objects, so maybe the backend (and other parts of the front -end) can notice that and handle like an @code{opANY} (do what it wants, just -don't complain or crash). -Most of this seems to have been addressed -by now, but a code review wouldn't hurt. -@end itemize - -@node Better Diagnostics -@section Better Diagnostics - -These are things users might not ask about, or that need to -be looked into, before worrying about. -Also here are items that involve reducing unnecessary diagnostic -clutter. - -@itemize @bullet -@item -When @code{FUNCTION} and @code{ENTRY} point types disagree (@code{CHARACTER} -lengths, type classes, and so on), -@code{ANY}-ize the offending @code{ENTRY} point and any @emph{new} dummies -it specifies. - -@item -Speed up and improve error handling for data when repeat-count is -specified. -For example, don't output 20 unnecessary messages after the -first necessary one for: - -@smallexample -INTEGER X(20) -CONTINUE -DATA (X(I), J= 1, 20) /20*5/ -END -@end smallexample - -@noindent -(The @code{CONTINUE} statement ensures the @code{DATA} statement -is processed in the context of executable, not specification, -statements.) -@end itemize - -@include ffe.texi - -@end ifset - -@ifset USING -@node Diagnostics -@chapter Diagnostics -@cindex diagnostics - -Some diagnostics produced by @command{g77} require sufficient explanation -that the explanations are given below, and the diagnostics themselves -identify the appropriate explanation. - -Identification uses the GNU Info format---specifically, the @command{info} -command that displays the explanation is given within square -brackets in the diagnostic. -For example: - -@smallexample -foo.f:5: Invalid statement [info -f g77 M FOOEY] -@end smallexample - -More details about the above diagnostic is found in the @command{g77} Info -documentation, menu item @samp{M}, submenu item @samp{FOOEY}, -which is displayed by typing the UNIX command -@samp{info -f g77 M FOOEY}. - -Other Info readers, such as EMACS, may be just as easily used to display -the pertinent node. -In the above example, @samp{g77} is the Info document name, -@samp{M} is the top-level menu item to select, -and, in that node (named @samp{Diagnostics}, the name of -this chapter, which is the very text you're reading now), -@samp{FOOEY} is the menu item to select. - -@iftex -In this printed version of the @command{g77} manual, the above example -points to a section, below, entitled @samp{FOOEY}---though, of course, -as the above is just a sample, no such section exists. -@end iftex - -@menu -* CMPAMBIG:: Ambiguous use of intrinsic. -* EXPIMP:: Intrinsic used explicitly and implicitly. -* INTGLOB:: Intrinsic also used as name of global. -* LEX:: Various lexer messages -* GLOBALS:: Disagreements about globals. -* LINKFAIL:: When linking @code{f771} fails. -* Y2KBAD:: Use of non-Y2K-compliant intrinsic. -@end menu - -@node CMPAMBIG -@section @code{CMPAMBIG} - -@noindent -@smallexample -Ambiguous use of intrinsic @var{intrinsic} @dots{} -@end smallexample - -The type of the argument to the invocation of the @var{intrinsic} -intrinsic is a @code{COMPLEX} type other than @code{COMPLEX(KIND=1)}. -Typically, it is @code{COMPLEX(KIND=2)}, also known as -@code{DOUBLE COMPLEX}. - -The interpretation of this invocation depends on the particular -dialect of Fortran for which the code was written. -Some dialects convert the real part of the argument to -@code{REAL(KIND=1)}, thus losing precision; other dialects, -and Fortran 90, do no such conversion. - -So, GNU Fortran rejects such invocations except under certain -circumstances, to avoid making an incorrect assumption that results -in generating the wrong code. - -To determine the dialect of the program unit, perhaps even whether -that particular invocation is properly coded, determine how the -result of the intrinsic is used. - -The result of @var{intrinsic} is expected (by the original programmer) -to be @code{REAL(KIND=1)} (the non-Fortran-90 interpretation) if: - -@itemize @bullet -@item -It is passed as an argument to a procedure that explicitly or -implicitly declares that argument @code{REAL(KIND=1)}. - -For example, -a procedure with no @code{DOUBLE PRECISION} or @code{IMPLICIT DOUBLE PRECISION} -statement specifying the dummy argument corresponding to an -actual argument of @samp{REAL(Z)}, where @samp{Z} is declared -@code{DOUBLE COMPLEX}, strongly suggests that the programmer -expected @samp{REAL(Z)} to return @code{REAL(KIND=1)} instead -of @code{REAL(KIND=2)}. - -@item -It is used in a context that would otherwise not include -any @code{REAL(KIND=2)} but where treating the @var{intrinsic} -invocation as @code{REAL(KIND=2)} would result in unnecessary -promotions and (typically) more expensive operations on the -wider type. - -For example: - -@smallexample -DOUBLE COMPLEX Z -@dots{} -R(1) = T * REAL(Z) -@end smallexample - -The above example suggests the programmer expected the real part -of @samp{Z} to be converted to @code{REAL(KIND=1)} before being -multiplied by @samp{T} (presumed, along with @samp{R} above, to -be type @code{REAL(KIND=1)}). - -Otherwise, the conversion would have to be delayed until after -the multiplication, requiring not only an extra conversion -(of @samp{T} to @code{REAL(KIND=2)}), but a (typically) more -expensive multiplication (a double-precision multiplication instead -of a single-precision one). -@end itemize - -The result of @var{intrinsic} is expected (by the original programmer) -to be @code{REAL(KIND=2)} (the Fortran 90 interpretation) if: - -@itemize @bullet -@item -It is passed as an argument to a procedure that explicitly or -implicitly declares that argument @code{REAL(KIND=2)}. - -For example, a procedure specifying a @code{DOUBLE PRECISION} -dummy argument corresponding to an -actual argument of @samp{REAL(Z)}, where @samp{Z} is declared -@code{DOUBLE COMPLEX}, strongly suggests that the programmer -expected @samp{REAL(Z)} to return @code{REAL(KIND=2)} instead -of @code{REAL(KIND=1)}. - -@item -It is used in an expression context that includes -other @code{REAL(KIND=2)} operands, -or is assigned to a @code{REAL(KIND=2)} variable or array element. - -For example: - -@smallexample -DOUBLE COMPLEX Z -DOUBLE PRECISION R, T -@dots{} -R(1) = T * REAL(Z) -@end smallexample - -The above example suggests the programmer expected the real part -of @samp{Z} to @emph{not} be converted to @code{REAL(KIND=1)} -by the @code{REAL()} intrinsic. - -Otherwise, the conversion would have to be immediately followed -by a conversion back to @code{REAL(KIND=2)}, losing -the original, full precision of the real part of @code{Z}, -before being multiplied by @samp{T}. -@end itemize - -Once you have determined whether a particular invocation of @var{intrinsic} -expects the Fortran 90 interpretation, you can: - -@itemize @bullet -@item -Change it to @samp{DBLE(@var{expr})} (if @var{intrinsic} is -@code{REAL}) or @samp{DIMAG(@var{expr})} (if @var{intrinsic} -is @code{AIMAG}) -if it expected the Fortran 90 interpretation. - -This assumes @var{expr} is @code{COMPLEX(KIND=2)}---if it is -some other type, such as @code{COMPLEX*32}, you should use the -appropriate intrinsic, such as the one to convert to @code{REAL*16} -(perhaps @code{DBLEQ()} in place of @code{DBLE()}, and -@code{QIMAG()} in place of @code{DIMAG()}). - -@item -Change it to @samp{REAL(@var{intrinsic}(@var{expr}))}, -otherwise. -This converts to @code{REAL(KIND=1)} in all working -Fortran compilers. -@end itemize - -If you don't want to change the code, and you are certain that all -ambiguous invocations of @var{intrinsic} in the source file have -the same expectation regarding interpretation, you can: - -@itemize @bullet -@item -Compile with the @command{g77} option @option{-ff90}, to enable the -Fortran 90 interpretation. - -@item -Compile with the @command{g77} options @samp{-fno-f90 -fugly-complex}, -to enable the non-Fortran-90 interpretations. -@end itemize - -@xref{REAL() and AIMAG() of Complex}, for more information on this -issue. - -Note: If the above suggestions don't produce enough evidence -as to whether a particular program expects the Fortran 90 -interpretation of this ambiguous invocation of @var{intrinsic}, -there is one more thing you can try. - -If you have access to most or all the compilers used on the -program to create successfully tested and deployed executables, -read the documentation for, and @emph{also} test out, each compiler -to determine how it treats the @var{intrinsic} intrinsic in -this case. -(If all the compilers don't agree on an interpretation, there -might be lurking bugs in the deployed versions of the program.) - -The following sample program might help: - -@cindex JCB003 program -@smallexample - PROGRAM JCB003 -C -C Written by James Craig Burley 1997-02-23. -C -C Determine how compilers handle non-standard REAL -C and AIMAG on DOUBLE COMPLEX operands. -C - DOUBLE COMPLEX Z - REAL R - Z = (3.3D0, 4.4D0) - R = Z - CALL DUMDUM(Z, R) - R = REAL(Z) - R - IF (R .NE. 0.) PRINT *, 'REAL() is Fortran 90' - IF (R .EQ. 0.) PRINT *, 'REAL() is not Fortran 90' - R = 4.4D0 - CALL DUMDUM(Z, R) - R = AIMAG(Z) - R - IF (R .NE. 0.) PRINT *, 'AIMAG() is Fortran 90' - IF (R .EQ. 0.) PRINT *, 'AIMAG() is not Fortran 90' - END -C -C Just to make sure compiler doesn't use naive flow -C analysis to optimize away careful work above, -C which might invalidate results.... -C - SUBROUTINE DUMDUM(Z, R) - DOUBLE COMPLEX Z - REAL R - END -@end smallexample - -If the above program prints contradictory results on a -particular compiler, run away! - -@node EXPIMP -@section @code{EXPIMP} - -@noindent -@smallexample -Intrinsic @var{intrinsic} referenced @dots{} -@end smallexample - -The @var{intrinsic} is explicitly declared in one program -unit in the source file and implicitly used as an intrinsic -in another program unit in the same source file. - -This diagnostic is designed to catch cases where a program -might depend on using the name @var{intrinsic} as an intrinsic -in one program unit and as a global name (such as the name -of a subroutine or function) in another, but @command{g77} recognizes -the name as an intrinsic in both cases. - -After verifying that the program unit making implicit use -of the intrinsic is indeed written expecting the intrinsic, -add an @samp{INTRINSIC @var{intrinsic}} statement to that -program unit to prevent this warning. - -This and related warnings are disabled by using -the @option{-Wno-globals} option when compiling. - -Note that this warning is not issued for standard intrinsics. -Standard intrinsics include those described in the FORTRAN 77 -standard and, if @option{-ff90} is specified, those described -in the Fortran 90 standard. -Such intrinsics are not as likely to be confused with user -procedures as intrinsics provided as extensions to the -standard by @command{g77}. - -@node INTGLOB -@section @code{INTGLOB} - -@noindent -@smallexample -Same name `@var{intrinsic}' given @dots{} -@end smallexample - -The name @var{intrinsic} is used for a global entity (a common -block or a program unit) in one program unit and implicitly -used as an intrinsic in another program unit. - -This diagnostic is designed to catch cases where a program -intends to use a name entirely as a global name, but @command{g77} -recognizes the name as an intrinsic in the program unit that -references the name, a situation that would likely produce -incorrect code. - -For example: - -@smallexample -INTEGER FUNCTION TIME() -@dots{} -END -@dots{} -PROGRAM SAMP -INTEGER TIME -PRINT *, 'Time is ', TIME() -END -@end smallexample - -The above example defines a program unit named @samp{TIME}, but -the reference to @samp{TIME} in the main program unit @samp{SAMP} -is normally treated by @command{g77} as a reference to the intrinsic -@code{TIME()} (unless a command-line option that prevents such -treatment has been specified). - -As a result, the program @samp{SAMP} will @emph{not} -invoke the @samp{TIME} function in the same source file. - -Since @command{g77} recognizes @code{libU77} procedures as -intrinsics, and since some existing code uses the same names -for its own procedures as used by some @code{libU77} -procedures, this situation is expected to arise often enough -to make this sort of warning worth issuing. - -After verifying that the program unit making implicit use -of the intrinsic is indeed written expecting the intrinsic, -add an @samp{INTRINSIC @var{intrinsic}} statement to that -program unit to prevent this warning. - -Or, if you believe the program unit is designed to invoke the -program-defined procedure instead of the intrinsic (as -recognized by @command{g77}), add an @samp{EXTERNAL @var{intrinsic}} -statement to the program unit that references the name to -prevent this warning. - -This and related warnings are disabled by using -the @option{-Wno-globals} option when compiling. - -Note that this warning is not issued for standard intrinsics. -Standard intrinsics include those described in the FORTRAN 77 -standard and, if @option{-ff90} is specified, those described -in the Fortran 90 standard. -Such intrinsics are not as likely to be confused with user -procedures as intrinsics provided as extensions to the -standard by @command{g77}. - -@node LEX -@section @code{LEX} - -@noindent -@smallexample -Unrecognized character @dots{} -Invalid first character @dots{} -Line too long @dots{} -Non-numeric character @dots{} -Continuation indicator @dots{} -Label at @dots{} invalid with continuation line indicator @dots{} -Character constant @dots{} -Continuation line @dots{} -Statement at @dots{} begins with invalid token -@end smallexample - -Although the diagnostics identify specific problems, they can -be produced when general problems such as the following occur: - -@itemize @bullet -@item -The source file contains something other than Fortran code. - -If the code in the file does not look like many of the examples -elsewhere in this document, it might not be Fortran code. -(Note that Fortran code often is written in lower case letters, -while the examples in this document use upper case letters, -for stylistic reasons.) - -For example, if the file contains lots of strange-looking -characters, it might be APL source code; if it contains lots -of parentheses, it might be Lisp source code; if it -contains lots of bugs, it might be C++ source code. - -@item -The source file contains free-form Fortran code, but @option{-ffree-form} -was not specified on the command line to compile it. - -Free form is a newer form for Fortran code. -The older, classic form is called fixed form. - -@cindex continuation character -@cindex characters, continuation -Fixed-form code is visually fairly distinctive, because -numerical labels and comments are all that appear in -the first five columns of a line, the sixth column is -reserved to denote continuation lines, -and actual statements start at or beyond column 7. -Spaces generally are not significant, so if you -see statements such as @samp{REALX,Y} and @samp{DO10I=1,100}, -you are looking at fixed-form code. -@cindex * -@cindex asterisk -Comment lines are indicated by the letter @samp{C} or the symbol -@samp{*} in column 1. -@cindex trailing comment -@cindex comment -@cindex characters, comment -@cindex ! -@cindex exclamation point -(Some code uses @samp{!} or @samp{/*} to begin in-line comments, -which many compilers support.) - -Free-form code is distinguished from fixed-form source -primarily by the fact that statements may start anywhere. -(If lots of statements start in columns 1 through 6, -that's a strong indicator of free-form source.) -Consecutive keywords must be separated by spaces, so -@samp{REALX,Y} is not valid, while @samp{REAL X,Y} is. -There are no comment lines per se, but @samp{!} starts a -comment anywhere in a line (other than within a character or -Hollerith constant). - -@xref{Source Form}, for more information. - -@item -The source file is in fixed form and has been edited without -sensitivity to the column requirements. - -Statements in fixed-form code must be entirely contained within -columns 7 through 72 on a given line. -Starting them ``early'' is more likely to result in diagnostics -than finishing them ``late'', though both kinds of errors are -often caught at compile time. - -For example, if the following code fragment is edited by following -the commented instructions literally, the result, shown afterward, -would produce a diagnostic when compiled: - -@smallexample -C On XYZZY systems, remove "C" on next line: -C CALL XYZZY_RESET -@end smallexample - -The result of editing the above line might be: - -@smallexample -C On XYZZY systems, remove "C" on next line: - CALL XYZZY_RESET -@end smallexample - -However, that leaves the first @samp{C} in the @code{CALL} -statement in column 6, making it a comment line, which is -not really what the author intended, and which is likely -to result in one of the above-listed diagnostics. - -@emph{Replacing} the @samp{C} in column 1 with a space -is the proper change to make, to ensure the @code{CALL} -keyword starts in or after column 7. - -Another common mistake like this is to forget that fixed-form -source lines are significant through only column 72, and that, -normally, any text beyond column 72 is ignored or is diagnosed -at compile time. - -@xref{Source Form}, for more information. - -@item -The source file requires preprocessing, and the preprocessing -is not being specified at compile time. - -A source file containing lines beginning with @code{#define}, -@code{#include}, @code{#if}, and so on is likely one that -requires preprocessing. - -If the file's suffix is @samp{.f}, @samp{.for}, or @samp{.FOR}, -the file normally will be compiled @emph{without} preprocessing -by @command{g77}. - -Change the file's suffix from @samp{.f} to @samp{.F} -(or, on systems with case-insensitive file names, -to @samp{.fpp} or @samp{.FPP}), -from @samp{.for} to @samp{.fpp}, -or from @samp{.FOR} to @samp{.FPP}. -@command{g77} compiles files with such names @emph{with} -preprocessing. - -@pindex cpp -@cindex preprocessor -@cindex cpp program -@cindex programs, cpp -@cindex @option{-x f77-cpp-input} option -@cindex options, @option{-x f77-cpp-input} -Or, learn how to use @command{gcc}'s @option{-x} option to specify -the language @samp{f77-cpp-input} for Fortran files that -require preprocessing. -@xref{Overall Options,,Options Controlling the Kind of -Output,gcc,Using the GNU Compiler Collection (GCC)}. - -@item -The source file is preprocessed, and the results of preprocessing -result in syntactic errors that are not necessarily obvious to -someone examining the source file itself. - -Examples of errors resulting from preprocessor macro expansion -include exceeding the line-length limit, improperly starting, -terminating, or incorporating the apostrophe or double-quote in -a character constant, improperly forming a Hollerith constant, -and so on. - -@xref{Overall Options,,Options Controlling the Kind of Output}, -for suggestions about how to use, and not use, preprocessing -for Fortran code. -@end itemize - -@node GLOBALS -@section @code{GLOBALS} - -@noindent -@smallexample -Global name @var{name} defined at @dots{} already defined@dots{} -Global name @var{name} at @dots{} has different type@dots{} -Too many arguments passed to @var{name} at @dots{} -Too few arguments passed to @var{name} at @dots{} -Argument #@var{n} of @var{name} is @dots{} -@end smallexample - -These messages all identify disagreements about the -global procedure named @var{name} among different program units -(usually including @var{name} itself). - -Whether a particular disagreement is reported -as a warning or an error -can depend on the relative order -of the disagreeing portions of the source file. - -Disagreements between a procedure invocation -and the @emph{subsequent} procedure itself -are, usually, diagnosed as errors -when the procedure itself @emph{precedes} the invocation. -Other disagreements are diagnosed via warnings. - -@cindex forward references -@cindex in-line code -@cindex compilation, in-line -This distinction, between warnings and errors, -is due primarily to the present tendency of the @command{gcc} back end -to inline only those procedure invocations that are -@emph{preceded} by the corresponding procedure definitions. -If the @command{gcc} back end is changed -to inline ``forward references'', -in which invocations precede definitions, -the @command{g77} front end will be changed -to treat both orderings as errors, accordingly. - -The sorts of disagreements that are diagnosed by @command{g77} include -whether a procedure is a subroutine or function; -if it is a function, the type of the return value of the procedure; -the number of arguments the procedure accepts; -and the type of each argument. - -Disagreements regarding global names among program units -in a Fortran program @emph{should} be fixed in the code itself. -However, if that is not immediately practical, -and the code has been working for some time, -it is possible it will work -when compiled with the @option{-fno-globals} option. - -The @option{-fno-globals} option -causes these diagnostics to all be warnings -and disables all inlining of references to global procedures -(to avoid subsequent compiler crashes and bad-code generation). -Use of the @option{-Wno-globals} option as well as @option{-fno-globals} -suppresses all of these diagnostics. -(@option{-Wno-globals} by itself disables only the warnings, -not the errors.) - -After using @option{-fno-globals} to work around these problems, -it is wise to stop using that option and address them by fixing -the Fortran code, because such problems, while they might not -actually result in bugs on some systems, indicate that the code -is not as portable as it could be. -In particular, the code might appear to work on a particular -system, but have bugs that affect the reliability of the data -without exhibiting any other outward manifestations of the bugs. - -@node LINKFAIL -@section @code{LINKFAIL} - -@noindent -On AIX 4.1, @command{g77} might not build with the native (non-GNU) tools -due to a linker bug in coping with the @option{-bbigtoc} option which -leads to a @samp{Relocation overflow} error. The GNU linker is not -recommended on current AIX versions, though; it was developed under a -now-unsupported version. This bug is said to be fixed by `update PTF -U455193 for APAR IX75823'. - -Compiling with @option{-mminimal-toc} -might solve this problem, e.g.@: by adding -@smallexample -BOOT_CFLAGS='-mminimal-toc -O2 -g' -@end smallexample -to the @code{make bootstrap} command line. - -@node Y2KBAD -@section @code{Y2KBAD} -@cindex Y2K compliance -@cindex Year 2000 compliance - -@noindent -@smallexample -Intrinsic `@var{name}', invoked at (^), known to be non-Y2K-compliant@dots{} -@end smallexample - -This diagnostic indicates that -the specific intrinsic invoked by the name @var{name} -is known to have an interface -that is not Year-2000 (Y2K) compliant. - -@xref{Year 2000 (Y2K) Problems}. - -@end ifset - -@node Keyword Index -@unnumbered Keyword Index - -@printindex cp -@bye diff --git a/contrib/gcc/f/g77spec.c b/contrib/gcc/f/g77spec.c deleted file mode 100644 index ce1bc69..0000000 --- a/contrib/gcc/f/g77spec.c +++ /dev/null @@ -1,541 +0,0 @@ -/* Specific flags and argument handling of the Fortran front-end. - Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006 - 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 contains a filter for the main `gcc' driver, which is - replicated for the `g77' driver by adding this filter. The purpose - of this filter is to be basically identical to gcc (in that - it faithfully passes all of the original arguments to gcc) but, - unless explicitly overridden by the user in certain ways, ensure - that the needs of the language supported by this wrapper are met. - - For GNU Fortran (g77), we do the following to the argument list - before passing it to `gcc': - - 1. Make sure `-lg2c -lm' is at the end of the list. - - 2. Make sure each time `-lg2c' or `-lm' is seen, it forms - part of the series `-lg2c -lm'. - - #1 and #2 are not done if `-nostdlib' or any option that disables - the linking phase is present, or if `-xfoo' is in effect. Note that - a lack of source files or -l options disables linking. - - This program was originally made out of gcc/cp/g++spec.c, but the - way it builds the new argument list was rewritten so it is much - easier to maintain, improve the way it decides to add or not add - extra arguments, etc. And several improvements were made in the - handling of arguments, primarily to make it more consistent with - `gcc' itself. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "gcc.h" -#include "intl.h" - -#ifndef MATH_LIBRARY -#define MATH_LIBRARY "-lm" -#endif - -#ifndef FORTRAN_INIT -#define FORTRAN_INIT "-lfrtbegin" -#endif - -#ifndef FORTRAN_LIBRARY -#define FORTRAN_LIBRARY "-lg2c" -#endif - -/* Options this driver needs to recognize, not just know how to - skip over. */ -typedef enum -{ - OPTION_b, /* Aka --prefix. */ - OPTION_B, /* Aka --target. */ - OPTION_c, /* Aka --compile. */ - OPTION_driver, /* Wrapper-specific option. */ - OPTION_E, /* Aka --preprocess. */ - OPTION_help, /* --help. */ - OPTION_i, /* -imacros, -include, -include-*. */ - OPTION_l, - OPTION_L, /* Aka --library-directory. */ - OPTION_M, /* Aka --dependencies. */ - OPTION_MM, /* Aka --user-dependencies. */ - OPTION_nostdlib, /* Aka --no-standard-libraries, or - -nodefaultlibs. */ - OPTION_o, /* Aka --output. */ - OPTION_S, /* Aka --assemble. */ - OPTION_syntax_only, /* -fsyntax-only. */ - OPTION_v, /* Aka --verbose. */ - OPTION_version, /* --version. */ - OPTION_V, /* Aka --use-version. */ - OPTION_x, /* Aka --language. */ - OPTION_ /* Unrecognized or unimportant. */ -} Option; - -/* The original argument list and related info is copied here. */ -static int g77_xargc; -static const char *const *g77_xargv; -static void lookup_option (Option *, int *, const char **, const char *); -static void append_arg (const char *); - -/* The new argument list will be built here. */ -static int g77_newargc; -static const char **g77_newargv; - -#ifndef SWITCH_TAKES_ARG -#define SWITCH_TAKES_ARG(CHAR) DEFAULT_SWITCH_TAKES_ARG(CHAR) -#endif - -#ifndef WORD_SWITCH_TAKES_ARG -#define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR) -#endif - -/* Assumes text[0] == '-'. Returns number of argv items that belong to - (and follow) this one, an option id for options important to the - caller, and a pointer to the first char of the arg, if embedded (else - returns NULL, meaning no arg or it's the next argv). - - Note that this also assumes gcc.c's pass converting long options - to short ones, where available, has already been run. */ - -static void -lookup_option (Option *xopt, int *xskip, const char **xarg, const char *text) -{ - Option opt = OPTION_; - int skip; - const char *arg = NULL; - - if ((skip = SWITCH_TAKES_ARG (text[1]))) - skip -= (text[2] != '\0'); /* See gcc.c. */ - - if (text[1] == 'B') - opt = OPTION_B, skip = (text[2] == '\0'), arg = text + 2; - else if (text[1] == 'b') - opt = OPTION_b, skip = (text[2] == '\0'), arg = text + 2; - else if ((text[1] == 'c') && (text[2] == '\0')) - opt = OPTION_c, skip = 0; - else if ((text[1] == 'E') && (text[2] == '\0')) - opt = OPTION_E, skip = 0; - else if (text[1] == 'i') - opt = OPTION_i, skip = 0; - else if (text[1] == 'l') - opt = OPTION_l; - else if (text[1] == 'L') - opt = OPTION_L, arg = text + 2; - else if (text[1] == 'o') - opt = OPTION_o; - else if ((text[1] == 'S') && (text[2] == '\0')) - opt = OPTION_S, skip = 0; - else if (text[1] == 'V') - opt = OPTION_V, skip = (text[2] == '\0'); - else if ((text[1] == 'v') && (text[2] == '\0')) - opt = OPTION_v, skip = 0; - else if (text[1] == 'x') - opt = OPTION_x, arg = text + 2; - else - { - if ((skip = WORD_SWITCH_TAKES_ARG (text + 1)) != 0) /* See gcc.c. */ - ; - else if (! strncmp (text, "-fdriver", 8)) /* Really --driver!! */ - opt = OPTION_driver; /* Never mind arg, this is unsupported. */ - else if (! strcmp (text, "-fhelp")) /* Really --help!! */ - opt = OPTION_help; - else if (! strcmp (text, "-M")) - opt = OPTION_M; - else if (! strcmp (text, "-MM")) - opt = OPTION_MM; - else if (! strcmp (text, "-nostdlib") - || ! strcmp (text, "-nodefaultlibs")) - opt = OPTION_nostdlib; - else if (! strcmp (text, "-fsyntax-only")) - opt = OPTION_syntax_only; - else if (! strcmp (text, "-dumpversion")) - opt = OPTION_version; - else if (! strcmp (text, "-fversion")) /* Really --version!! */ - opt = OPTION_version; - else if (! strcmp (text, "-Xlinker") - || ! strcmp (text, "-specs")) - skip = 1; - else - skip = 0; - } - - if (xopt != NULL) - *xopt = opt; - if (xskip != NULL) - *xskip = skip; - if (xarg != NULL) - { - if ((arg != NULL) - && (arg[0] == '\0')) - *xarg = NULL; - else - *xarg = arg; - } -} - -/* Append another argument to the list being built. As long as it is - identical to the corresponding arg in the original list, just increment - the new arg count. Otherwise allocate a new list, etc. */ - -static void -append_arg (const char *arg) -{ - static int newargsize; - -#if 0 - fprintf (stderr, "`%s'\n", arg); -#endif - - if (g77_newargv == g77_xargv - && g77_newargc < g77_xargc - && (arg == g77_xargv[g77_newargc] - || ! strcmp (arg, g77_xargv[g77_newargc]))) - { - ++g77_newargc; - return; /* Nothing new here. */ - } - - if (g77_newargv == g77_xargv) - { /* Make new arglist. */ - int i; - - newargsize = (g77_xargc << 2) + 20; /* This should handle all. */ - g77_newargv = xmalloc (newargsize * sizeof (char *)); - - /* Copy what has been done so far. */ - for (i = 0; i < g77_newargc; ++i) - g77_newargv[i] = g77_xargv[i]; - } - - if (g77_newargc == newargsize) - fatal ("overflowed output arg list for `%s'", arg); - - g77_newargv[g77_newargc++] = arg; -} - -void -lang_specific_driver (int *in_argc, const char *const **in_argv, - int *in_added_libraries ATTRIBUTE_UNUSED) -{ - int argc = *in_argc; - const char *const *argv = *in_argv; - int i; - int verbose = 0; - Option opt; - int skip; - const char *arg; - - /* This will be NULL if we encounter a situation where we should not - link in libf2c. */ - const char *library = FORTRAN_LIBRARY; - - /* 0 => -xnone in effect. - 1 => -xfoo in effect. */ - int saw_speclang = 0; - - /* 0 => initial/reset state - 1 => last arg was -l - 2 => last two args were -l -lm. */ - int saw_library = 0; - - /* 0 => initial/reset state - 1 => FORTRAN_INIT linked in */ - int use_init = 0; - /* By default, we throw on the math library if we have one. */ - int need_math = (MATH_LIBRARY[0] != '\0'); - - /* The number of input and output files in the incoming arg list. */ - int n_infiles = 0; - int n_outfiles = 0; - -#if 0 - fprintf (stderr, "Incoming:"); - for (i = 0; i < argc; i++) - fprintf (stderr, " %s", argv[i]); - fprintf (stderr, "\n"); -#endif - - g77_xargc = argc; - g77_xargv = argv; - g77_newargc = 0; - g77_newargv = (const char **) argv; - - /* First pass through arglist. - - If -nostdlib or a "turn-off-linking" option is anywhere in the - command line, don't do any library-option processing (except - relating to -x). Also, if -v is specified, but no other options - that do anything special (allowing -V version, etc.), remember - to add special stuff to make gcc command actually invoke all - the different phases of the compilation process so all the version - numbers can be seen. - - Also, here is where all problems with missing arguments to options - are caught. If this loop is exited normally, it means all options - have the appropriate number of arguments as far as the rest of this - program is concerned. */ - - for (i = 1; i < argc; ++i) - { - if ((argv[i][0] == '+') && (argv[i][1] == 'e')) - { - continue; - } - - if ((argv[i][0] != '-') || (argv[i][1] == '\0')) - { - ++n_infiles; - continue; - } - - lookup_option (&opt, &skip, NULL, argv[i]); - - switch (opt) - { - case OPTION_nostdlib: - case OPTION_c: - case OPTION_S: - case OPTION_syntax_only: - case OPTION_E: - case OPTION_M: - case OPTION_MM: - /* These options disable linking entirely or linking of the - standard libraries. */ - library = 0; - break; - - case OPTION_l: - ++n_infiles; - break; - - case OPTION_o: - ++n_outfiles; - break; - - case OPTION_v: - verbose = 1; - break; - - case OPTION_b: - case OPTION_B: - case OPTION_L: - case OPTION_i: - case OPTION_V: - /* These options are useful in conjunction with -v to get - appropriate version info. */ - break; - - case OPTION_version: - printf ("GNU Fortran (GCC) %s\n", version_string); - printf ("Copyright %s 2006 Free Software Foundation, Inc.\n", - _("(C)")); - printf ("\n"); - printf (_("\ -GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\ -You may redistribute copies of GNU Fortran\n\ -under the terms of the GNU General Public License.\n\ -For more information about these matters, see the file named COPYING\n\ -or type the command `info -f g77 Copying'.\n\ -")); - exit (0); - break; - - case OPTION_help: - /* Let gcc.c handle this, as it has a really - cool facility for handling --help and --verbose --help. */ - return; - - case OPTION_driver: - fatal ("--driver no longer supported"); - break; - - default: - break; - } - - /* This is the one place we check for missing arguments in the - program. */ - - if (i + skip < argc) - i += skip; - else - fatal ("argument to `%s' missing", argv[i]); - } - - if ((n_outfiles != 0) && (n_infiles == 0)) - fatal ("no input files; unwilling to write output files"); - - /* If there are no input files, no need for the library. */ - if (n_infiles == 0) - library = 0; - - /* Second pass through arglist, transforming arguments as appropriate. */ - - append_arg (argv[0]); /* Start with command name, of course. */ - - for (i = 1; i < argc; ++i) - { - if (argv[i][0] == '\0') - { - append_arg (argv[i]); /* Interesting. Just append as is. */ - continue; - } - - if ((argv[i][0] == '-') && (argv[i][1] != 'l')) - { - /* Not a filename or library. */ - - if (saw_library == 1 && need_math) /* -l. */ - append_arg (MATH_LIBRARY); - - saw_library = 0; - - lookup_option (&opt, &skip, &arg, argv[i]); - - if (argv[i][1] == '\0') - { - append_arg (argv[i]); /* "-" == Standard input. */ - continue; - } - - if (opt == OPTION_x) - { - /* Track input language. */ - const char *lang; - - if (arg == NULL) - lang = argv[i+1]; - else - lang = arg; - - saw_speclang = (strcmp (lang, "none") != 0); - } - - append_arg (argv[i]); - - for (; skip != 0; --skip) - append_arg (argv[++i]); - - continue; - } - - /* A filename/library, not an option. */ - - if (saw_speclang) - saw_library = 0; /* -xfoo currently active. */ - else - { /* -lfoo or filename. */ - if (strcmp (argv[i], MATH_LIBRARY) == 0) - { - if (saw_library == 1) - saw_library = 2; /* -l -lm. */ - else - { - if (0 == use_init) - { - append_arg (FORTRAN_INIT); - use_init = 1; - } - append_arg (FORTRAN_LIBRARY); - } - } - else if (strcmp (argv[i], FORTRAN_LIBRARY) == 0) - saw_library = 1; /* -l. */ - else - { /* Other library, or filename. */ - if (saw_library == 1 && need_math) - append_arg (MATH_LIBRARY); - saw_library = 0; - } - } - append_arg (argv[i]); - } - - /* Append `-lg2c -lm' as necessary. */ - - if (library) - { /* Doing a link and no -nostdlib. */ - if (saw_speclang) - append_arg ("-xnone"); - - switch (saw_library) - { - case 0: - if (0 == use_init) - { - append_arg (FORTRAN_INIT); - use_init = 1; - } - append_arg (library); - case 1: - if (need_math) - append_arg (MATH_LIBRARY); - default: - break; - } - } - -#ifdef ENABLE_SHARED_LIBGCC - if (library) - { - int i; - - for (i = 1; i < g77_newargc; i++) - if (g77_newargv[i][0] == '-') - if (strcmp (g77_newargv[i], "-static-libgcc") == 0 - || strcmp (g77_newargv[i], "-static") == 0) - break; - - if (i == g77_newargc) - append_arg ("-shared-libgcc"); - } - -#endif - - if (verbose - && g77_newargv != g77_xargv) - { - fprintf (stderr, "Driving:"); - for (i = 0; i < g77_newargc; i++) - fprintf (stderr, " %s", g77_newargv[i]); - fprintf (stderr, "\n"); - } - - *in_argc = g77_newargc; - *in_argv = g77_newargv; -} - -/* Called before linking. Returns 0 on success and -1 on failure. */ -int lang_specific_pre_link (void) /* Not used for F77. */ -{ - return 0; -} - -/* Number of extra output files that lang_specific_pre_link may generate. */ -int lang_specific_extra_outfiles = 0; /* Not used for F77. */ - -/* Table of language-specific spec functions. */ -const struct spec_function lang_specific_spec_functions[] = -{ - { 0, 0 } -}; diff --git a/contrib/gcc/f/global.c b/contrib/gcc/f/global.c deleted file mode 100644 index 8793f62..0000000 --- a/contrib/gcc/f/global.c +++ /dev/null @@ -1,1586 +0,0 @@ -/* global.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1997, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - - Description: - Manages information kept across individual program units within a single - source file. This includes reporting errors when a name is defined - multiple times (for example, two program units named FOO) and when a - COMMON block is given initial data in more than one program unit. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "global.h" -#include "info.h" -#include "lex.h" -#include "malloc.h" -#include "name.h" -#include "symbol.h" -#include "top.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - -#if FFEGLOBAL_ENABLED -static ffenameSpace ffeglobal_filewide_ = NULL; -static const char *const ffeglobal_type_string_[] = -{ - [FFEGLOBAL_typeNONE] = "??", - [FFEGLOBAL_typeMAIN] = "main program", - [FFEGLOBAL_typeEXT] = "external", - [FFEGLOBAL_typeSUBR] = "subroutine", - [FFEGLOBAL_typeFUNC] = "function", - [FFEGLOBAL_typeBDATA] = "block data", - [FFEGLOBAL_typeCOMMON] = "common block", - [FFEGLOBAL_typeANY] = "?any?" -}; -#endif - -/* Static functions (internal). */ - - -/* Internal macros. */ - - -/* Call given fn with all globals - - ffeglobal (*fn)(ffeglobal g); - ffeglobal_drive(fn); */ - -#if FFEGLOBAL_ENABLED -void -ffeglobal_drive (ffeglobal (*fn) (ffeglobal)) -{ - if (ffeglobal_filewide_ != NULL) - ffename_space_drive_global (ffeglobal_filewide_, fn); -} - -#endif -/* ffeglobal_new_ -- Make new global - - ffename n; - ffeglobal g; - g = ffeglobal_new_(n); */ - -#if FFEGLOBAL_ENABLED -static ffeglobal -ffeglobal_new_ (ffename n) -{ - ffeglobal g; - - assert (n != NULL); - - g = malloc_new_ks (malloc_pool_image (), "FFEGLOBAL", sizeof (*g)); - g->n = n; - g->hook = FFECOM_globalNULL; - g->tick = 0; - - ffename_set_global (n, g); - - return g; -} - -#endif -/* ffeglobal_init_1 -- Initialize per file - - ffeglobal_init_1(); */ - -void -ffeglobal_init_1 (void) -{ -#if FFEGLOBAL_ENABLED - if (ffeglobal_filewide_ != NULL) - ffename_space_kill (ffeglobal_filewide_); - ffeglobal_filewide_ = ffename_space_new (malloc_pool_image ()); -#endif -} - -/* ffeglobal_init_common -- Initial value specified for common block - - ffesymbol s; // the ffesymbol for the common block - ffelexToken t; // the token with the point of initialization - ffeglobal_init_common(s,t); - - For back ends where file-wide global symbols are not maintained, does - nothing. Otherwise, makes sure this common block hasn't already been - initialized in a previous program unit, and flag that it's been - initialized in this one. */ - -void -ffeglobal_init_common (ffesymbol s, ffelexToken t) -{ -#if FFEGLOBAL_ENABLED - ffeglobal g; - - g = ffesymbol_global (s); - - if ((g == NULL) || (g->type != FFEGLOBAL_typeCOMMON)) - return; - if (g->type == FFEGLOBAL_typeANY) - return; - - if (g->tick == ffe_count_2) - return; - - if (g->tick != 0) - { - if (g->u.common.initt != NULL) - { - ffebad_start (FFEBAD_COMMON_ALREADY_INIT); - ffebad_string (ffesymbol_text (s)); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->u.common.initt), - ffelex_token_where_column (g->u.common.initt)); - ffebad_finish (); - } - - /* Complain about just one attempt to reinit per program unit, but - continue referring back to the first such successful attempt. */ - } - else - { - if (g->u.common.blank) - { - /* Not supposed to initialize blank common, though it works. */ - ffebad_start (FFEBAD_COMMON_BLANK_INIT); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - - g->u.common.initt = ffelex_token_use (t); - } - - g->tick = ffe_count_2; -#endif -} - -/* ffeglobal_new_common -- New common block - - ffesymbol s; // the ffesymbol for the new common block - ffelexToken t; // the token with the name of the common block - bool blank; // TRUE if blank common - ffeglobal_new_common(s,t,blank); - - For back ends where file-wide global symbols are not maintained, does - nothing. Otherwise, makes sure this symbol hasn't been seen before or - is known as a common block. */ - -void -ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank) -{ -#if FFEGLOBAL_ENABLED - ffename n; - ffeglobal g; - - if (ffesymbol_global (s) == NULL) - { - n = ffename_find (ffeglobal_filewide_, t); - g = ffename_global (n); - } - else - { - g = ffesymbol_global (s); - n = NULL; - } - - if ((g != NULL) && (g->type == FFEGLOBAL_typeANY)) - return; - - if ((g != NULL) && (g->type != FFEGLOBAL_typeNONE)) - { - if (g->type == FFEGLOBAL_typeCOMMON) - { - /* The names match, so the "blankness" should match too! */ - assert (g->u.common.blank == blank); - } - else - { - /* This global name has already been established, - but as something other than a common block. */ - if (ffe_is_globals () || ffe_is_warn_globals ()) - { - ffebad_start (ffe_is_globals () - ? FFEBAD_FILEWIDE_ALREADY_SEEN - : FFEBAD_FILEWIDE_ALREADY_SEEN_W); - ffebad_string (ffelex_token_text (t)); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - g->type = FFEGLOBAL_typeANY; - } - } - else - { - if (g == NULL) - { - g = ffeglobal_new_ (n); - g->intrinsic = FALSE; - } - else if (g->intrinsic - && !g->explicit_intrinsic - && ffe_is_warn_globals ()) - { - /* Common name previously used as intrinsic. Though it works, - warn, because the intrinsic reference might have been intended - as a ref to an external procedure, but g77's vast list of - intrinsics happened to snarf the name. */ - ffebad_start (FFEBAD_INTRINSIC_GLOBAL); - ffebad_string (ffelex_token_text (t)); - ffebad_string ("common block"); - ffebad_string ("intrinsic"); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - g->t = ffelex_token_use (t); - g->type = FFEGLOBAL_typeCOMMON; - g->u.common.have_pad = FALSE; - g->u.common.have_save = FALSE; - g->u.common.have_size = FALSE; - g->u.common.blank = blank; - } - - ffesymbol_set_global (s, g); -#endif -} - -/* ffeglobal_new_progunit_ -- New program unit - - ffesymbol s; // the ffesymbol for the new unit - ffelexToken t; // the token with the name of the unit - ffeglobalType type; // the type of the new unit - ffeglobal_new_progunit_(s,t,type); - - For back ends where file-wide global symbols are not maintained, does - nothing. Otherwise, makes sure this symbol hasn't been seen before. */ - -void -ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type) -{ -#if FFEGLOBAL_ENABLED - ffename n; - ffeglobal g; - - n = ffename_find (ffeglobal_filewide_, t); - g = ffename_global (n); - if ((g != NULL) && (g->type == FFEGLOBAL_typeANY)) - return; - - if ((g != NULL) - && ((g->type == FFEGLOBAL_typeMAIN) - || (g->type == FFEGLOBAL_typeSUBR) - || (g->type == FFEGLOBAL_typeFUNC) - || (g->type == FFEGLOBAL_typeBDATA)) - && g->u.proc.defined) - { - /* This program unit has already been defined. */ - if (ffe_is_globals () || ffe_is_warn_globals ()) - { - ffebad_start (ffe_is_globals () - ? FFEBAD_FILEWIDE_ALREADY_SEEN - : FFEBAD_FILEWIDE_ALREADY_SEEN_W); - ffebad_string (ffelex_token_text (t)); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - g->type = FFEGLOBAL_typeANY; - } - else if ((g != NULL) - && (g->type != FFEGLOBAL_typeNONE) - && (g->type != FFEGLOBAL_typeEXT) - && (g->type != type)) - { - /* A reference to this program unit has been seen, but its - context disagrees about the new definition regarding - what kind of program unit it is. (E.g. `call foo' followed - by `function foo'.) But `external foo' alone doesn't mean - disagreement with either a function or subroutine, though - g77 normally interprets it as a request to force-load - a block data program unit by that name (to cope with libs). */ - if (ffe_is_globals () || ffe_is_warn_globals ()) - { - ffebad_start (ffe_is_globals () - ? FFEBAD_FILEWIDE_DISAGREEMENT - : FFEBAD_FILEWIDE_DISAGREEMENT_W); - ffebad_string (ffelex_token_text (t)); - ffebad_string (ffeglobal_type_string_[type]); - ffebad_string (ffeglobal_type_string_[g->type]); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - g->type = FFEGLOBAL_typeANY; - } - else - { - if (g == NULL) - { - g = ffeglobal_new_ (n); - g->intrinsic = FALSE; - g->u.proc.n_args = -1; - g->u.proc.other_t = NULL; - } - else if ((ffesymbol_basictype (s) != FFEINFO_basictypeNONE) - && (g->type == FFEGLOBAL_typeFUNC) - && ((ffesymbol_basictype (s) != g->u.proc.bt) - || (ffesymbol_kindtype (s) != g->u.proc.kt) - || ((ffesymbol_size (s) != FFETARGET_charactersizeNONE) - && (ffesymbol_size (s) != g->u.proc.sz)))) - { - /* The previous reference and this new function definition - disagree about the type of the function. I (Burley) think - this rarely occurs, because when this code is reached, - the type info doesn't appear to be filled in yet. */ - if (ffe_is_globals () || ffe_is_warn_globals ()) - { - ffebad_start (ffe_is_globals () - ? FFEBAD_FILEWIDE_TYPE_MISMATCH - : FFEBAD_FILEWIDE_TYPE_MISMATCH_W); - ffebad_string (ffelex_token_text (t)); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - g->type = FFEGLOBAL_typeANY; - return; - } - if (g->intrinsic - && !g->explicit_intrinsic - && ffe_is_warn_globals ()) - { - /* This name, previously used as an intrinsic, now is known - to also be a global procedure name. Warn, since the previous - use as an intrinsic might have been intended to refer to - this procedure. */ - ffebad_start (FFEBAD_INTRINSIC_GLOBAL); - ffebad_string (ffelex_token_text (t)); - ffebad_string ("global"); - ffebad_string ("intrinsic"); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - g->t = ffelex_token_use (t); - if ((g->tick == 0) - || (g->u.proc.bt == FFEINFO_basictypeNONE) - || (g->u.proc.kt == FFEINFO_kindtypeNONE)) - { - g->u.proc.bt = ffesymbol_basictype (s); - g->u.proc.kt = ffesymbol_kindtype (s); - g->u.proc.sz = ffesymbol_size (s); - } - /* If there's a known disagreement about the kind of program - unit, then don't even bother tracking arglist argreement. */ - if ((g->tick != 0) - && (g->type != type)) - g->u.proc.n_args = -1; - g->tick = ffe_count_2; - g->type = type; - g->u.proc.defined = TRUE; - } - - ffesymbol_set_global (s, g); -#endif -} - -/* ffeglobal_pad_common -- Check initial padding of common area - - ffesymbol s; // the common area - ffetargetAlign pad; // the initial padding - ffeglobal_pad_common(s,pad,ffesymbol_where_line(s), - ffesymbol_where_column(s)); - - In global-enabled mode, make sure the padding agrees with any existing - padding established for the common area, otherwise complain. - In global-disabled mode, warn about nonzero padding. */ - -void -ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl, - ffewhereColumn wc) -{ -#if FFEGLOBAL_ENABLED - ffeglobal g; - - g = ffesymbol_global (s); - if ((g == NULL) || (g->type != FFEGLOBAL_typeCOMMON)) - return; /* Let someone else catch this! */ - if (g->type == FFEGLOBAL_typeANY) - return; - - if (!g->u.common.have_pad) - { - g->u.common.have_pad = TRUE; - g->u.common.pad = pad; - g->u.common.pad_where_line = ffewhere_line_use (wl); - g->u.common.pad_where_col = ffewhere_column_use (wc); - - if (pad != 0) - { - char padding[20]; - - sprintf (&padding[0], "%" ffetargetAlign_f "u", pad); - ffebad_start (FFEBAD_COMMON_INIT_PAD); - ffebad_string (ffesymbol_text (s)); - ffebad_string (padding); - ffebad_string ((pad == 1) - ? FFECOM_SIZE_UNIT : FFECOM_SIZE_UNITS); - ffebad_here (0, wl, wc); - ffebad_finish (); - } - } - else - { - if (g->u.common.pad != pad) - { - char padding_1[20]; - char padding_2[20]; - - sprintf (&padding_1[0], "%" ffetargetAlign_f "u", pad); - sprintf (&padding_2[0], "%" ffetargetAlign_f "u", g->u.common.pad); - ffebad_start (FFEBAD_COMMON_DIFF_PAD); - ffebad_string (ffesymbol_text (s)); - ffebad_string (padding_1); - ffebad_here (0, wl, wc); - ffebad_string (padding_2); - ffebad_string ((pad == 1) - ? FFECOM_SIZE_UNIT : FFECOM_SIZE_UNITS); - ffebad_string ((g->u.common.pad == 1) - ? FFECOM_SIZE_UNIT : FFECOM_SIZE_UNITS); - ffebad_here (1, g->u.common.pad_where_line, g->u.common.pad_where_col); - ffebad_finish (); - } - - if (g->u.common.pad < pad) - { - g->u.common.pad = pad; - g->u.common.pad_where_line = ffewhere_line_use (wl); - g->u.common.pad_where_col = ffewhere_column_use (wc); - } - } -#endif -} - -/* Collect info for a global's argument. */ - -void -ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as, - ffeinfoBasictype bt, ffeinfoKindtype kt, - bool array) -{ - ffeglobal g = ffesymbol_global (s); - ffeglobalArgInfo_ ai; - - assert (g != NULL); - - if (g->type == FFEGLOBAL_typeANY) - return; - - assert (g->u.proc.n_args >= 0); - - if (argno >= g->u.proc.n_args) - return; /* Already complained about this discrepancy. */ - - ai = &g->u.proc.arg_info[argno]; - - /* Maybe warn about previous references. */ - - if ((ai->t != NULL) - && ffe_is_warn_globals ()) - { - const char *refwhy = NULL; - const char *defwhy = NULL; - bool warn = FALSE; - - switch (as) - { - case FFEGLOBAL_argsummaryREF: - if ((ai->as != FFEGLOBAL_argsummaryREF) - && (ai->as != FFEGLOBAL_argsummaryNONE) - && ((ai->as != FFEGLOBAL_argsummaryDESCR) /* Choose better message. */ - || (ai->bt != FFEINFO_basictypeCHARACTER) - || (ai->bt == bt))) - { - warn = TRUE; - refwhy = "passed by reference"; - } - break; - - case FFEGLOBAL_argsummaryDESCR: - if ((ai->as != FFEGLOBAL_argsummaryDESCR) - && (ai->as != FFEGLOBAL_argsummaryNONE) - && ((ai->as != FFEGLOBAL_argsummaryREF) /* Choose better message. */ - || (bt != FFEINFO_basictypeCHARACTER) - || (ai->bt == bt))) - { - warn = TRUE; - refwhy = "passed by descriptor"; - } - break; - - case FFEGLOBAL_argsummaryPROC: - if ((ai->as != FFEGLOBAL_argsummaryPROC) - && (ai->as != FFEGLOBAL_argsummarySUBR) - && (ai->as != FFEGLOBAL_argsummaryFUNC) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - warn = TRUE; - refwhy = "a procedure"; - } - break; - - case FFEGLOBAL_argsummarySUBR: - if ((ai->as != FFEGLOBAL_argsummaryPROC) - && (ai->as != FFEGLOBAL_argsummarySUBR) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - warn = TRUE; - refwhy = "a subroutine"; - } - break; - - case FFEGLOBAL_argsummaryFUNC: - if ((ai->as != FFEGLOBAL_argsummaryPROC) - && (ai->as != FFEGLOBAL_argsummaryFUNC) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - warn = TRUE; - refwhy = "a function"; - } - break; - - case FFEGLOBAL_argsummaryALTRTN: - if ((ai->as != FFEGLOBAL_argsummaryALTRTN) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - warn = TRUE; - refwhy = "an alternate-return label"; - } - break; - - default: - break; - } - - if ((refwhy != NULL) && (defwhy == NULL)) - { - /* Fill in the def info. */ - - switch (ai->as) - { - case FFEGLOBAL_argsummaryNONE: - defwhy = "omitted"; - break; - - case FFEGLOBAL_argsummaryVAL: - defwhy = "passed by value"; - break; - - case FFEGLOBAL_argsummaryREF: - defwhy = "passed by reference"; - break; - - case FFEGLOBAL_argsummaryDESCR: - defwhy = "passed by descriptor"; - break; - - case FFEGLOBAL_argsummaryPROC: - defwhy = "a procedure"; - break; - - case FFEGLOBAL_argsummarySUBR: - defwhy = "a subroutine"; - break; - - case FFEGLOBAL_argsummaryFUNC: - defwhy = "a function"; - break; - - case FFEGLOBAL_argsummaryALTRTN: - defwhy = "an alternate-return label"; - break; - -#if 0 - case FFEGLOBAL_argsummaryPTR: - defwhy = "a pointer"; - break; -#endif - - default: - defwhy = "???"; - break; - } - } - - if (!warn - && (bt != FFEINFO_basictypeHOLLERITH) - && (bt != FFEINFO_basictypeTYPELESS) - && (bt != FFEINFO_basictypeNONE) - && (ai->bt != FFEINFO_basictypeHOLLERITH) - && (ai->bt != FFEINFO_basictypeTYPELESS) - && (ai->bt != FFEINFO_basictypeNONE)) - { - /* Check types. */ - - if ((bt != ai->bt) - && ((bt != FFEINFO_basictypeREAL) - || (ai->bt != FFEINFO_basictypeCOMPLEX)) - && ((bt != FFEINFO_basictypeCOMPLEX) - || (ai->bt != FFEINFO_basictypeREAL))) - { - warn = TRUE; /* We can cope with these differences. */ - refwhy = "one type"; - defwhy = "some other type"; - } - - if (!warn && (kt != ai->kt)) - { - warn = TRUE; - refwhy = "one precision"; - defwhy = "some other precision"; - } - } - - if (warn) - { - char num[60]; - - if (name == NULL) - sprintf (&num[0], "%d", argno + 1); - else - { - if (strlen (name) < 30) - sprintf (&num[0], "%d (named `%s')", argno + 1, name); - else - sprintf (&num[0], "%d (named `%.*s...')", argno + 1, 30, name); - } - ffebad_start (FFEBAD_FILEWIDE_ARG_W); - ffebad_string (ffesymbol_text (s)); - ffebad_string (num); - ffebad_string (refwhy); - ffebad_string (defwhy); - ffebad_here (0, ffelex_token_where_line (g->t), ffelex_token_where_column (g->t)); - ffebad_here (1, ffelex_token_where_line (ai->t), ffelex_token_where_column (ai->t)); - ffebad_finish (); - } - } - - /* Define this argument. */ - - if (ai->t != NULL) - ffelex_token_kill (ai->t); - if ((as != FFEGLOBAL_argsummaryPROC) - || (ai->t == NULL)) - ai->as = as; /* Otherwise leave SUBR/FUNC info intact. */ - ai->t = ffelex_token_use (g->t); - if (name == NULL) - ai->name = NULL; - else - { - ai->name = malloc_new_ks (malloc_pool_image (), - "ffeglobalArgInfo_ name", - strlen (name) + 1); - strcpy (ai->name, name); - } - ai->bt = bt; - ai->kt = kt; - ai->array = array; -} - -/* Collect info on #args a global accepts. */ - -void -ffeglobal_proc_def_nargs (ffesymbol s, int n_args) -{ - ffeglobal g = ffesymbol_global (s); - - assert (g != NULL); - - if (g->type == FFEGLOBAL_typeANY) - return; - - if (g->u.proc.n_args >= 0) - { - if (g->u.proc.n_args == n_args) - return; - - if (ffe_is_warn_globals ()) - { - ffebad_start (FFEBAD_FILEWIDE_NARGS_W); - ffebad_string (ffesymbol_text (s)); - if (g->u.proc.n_args > n_args) - ffebad_string ("few"); - else - ffebad_string ("many"); - ffebad_here (0, ffelex_token_where_line (g->u.proc.other_t), - ffelex_token_where_column (g->u.proc.other_t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - } - - /* This is new info we can use in cross-checking future references - and a possible future definition. */ - - g->u.proc.n_args = n_args; - g->u.proc.other_t = NULL; /* No other reference yet. */ - - if (n_args == 0) - { - g->u.proc.arg_info = NULL; - return; - } - - g->u.proc.arg_info = malloc_new_ks (malloc_pool_image (), - "ffeglobalArgInfo_", - n_args * sizeof (g->u.proc.arg_info[0])); - while (n_args-- > 0) - g->u.proc.arg_info[n_args].t = NULL; -} - -/* Verify that the info for a global's argument is valid. */ - -bool -ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as, - ffeinfoBasictype bt, ffeinfoKindtype kt, - bool array, ffelexToken t) -{ - ffeglobal g = ffesymbol_global (s); - ffeglobalArgInfo_ ai; - - assert (g != NULL); - - if (g->type == FFEGLOBAL_typeANY) - return FALSE; - - assert (g->u.proc.n_args >= 0); - - if (argno >= g->u.proc.n_args) - return TRUE; /* Already complained about this discrepancy. */ - - ai = &g->u.proc.arg_info[argno]; - - /* Warn about previous references. */ - - if (ai->t != NULL) - { - const char *refwhy = NULL; - const char *defwhy = NULL; - bool fail = FALSE; - bool warn = FALSE; - - switch (as) - { - case FFEGLOBAL_argsummaryNONE: - if (g->u.proc.defined) - { - fail = TRUE; - refwhy = "omitted"; - defwhy = "not optional"; - } - break; - - case FFEGLOBAL_argsummaryVAL: - if (ai->as != FFEGLOBAL_argsummaryVAL) - { - fail = TRUE; - refwhy = "passed by value"; - } - break; - - case FFEGLOBAL_argsummaryREF: - if ((ai->as != FFEGLOBAL_argsummaryREF) - && (ai->as != FFEGLOBAL_argsummaryNONE) - && ((ai->as != FFEGLOBAL_argsummaryDESCR) /* Choose better message. */ - || (ai->bt != FFEINFO_basictypeCHARACTER) - || (ai->bt == bt))) - { - fail = TRUE; - refwhy = "passed by reference"; - } - break; - - case FFEGLOBAL_argsummaryDESCR: - if ((ai->as != FFEGLOBAL_argsummaryDESCR) - && (ai->as != FFEGLOBAL_argsummaryNONE) - && ((ai->as != FFEGLOBAL_argsummaryREF) /* Choose better message. */ - || (bt != FFEINFO_basictypeCHARACTER) - || (ai->bt == bt))) - { - fail = TRUE; - refwhy = "passed by descriptor"; - } - break; - - case FFEGLOBAL_argsummaryPROC: - if ((ai->as != FFEGLOBAL_argsummaryPROC) - && (ai->as != FFEGLOBAL_argsummarySUBR) - && (ai->as != FFEGLOBAL_argsummaryFUNC) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - fail = TRUE; - refwhy = "a procedure"; - } - break; - - case FFEGLOBAL_argsummarySUBR: - if ((ai->as != FFEGLOBAL_argsummaryPROC) - && (ai->as != FFEGLOBAL_argsummarySUBR) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - fail = TRUE; - refwhy = "a subroutine"; - } - break; - - case FFEGLOBAL_argsummaryFUNC: - if ((ai->as != FFEGLOBAL_argsummaryPROC) - && (ai->as != FFEGLOBAL_argsummaryFUNC) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - fail = TRUE; - refwhy = "a function"; - } - break; - - case FFEGLOBAL_argsummaryALTRTN: - if ((ai->as != FFEGLOBAL_argsummaryALTRTN) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - fail = TRUE; - refwhy = "an alternate-return label"; - } - break; - -#if 0 - case FFEGLOBAL_argsummaryPTR: - if ((ai->as != FFEGLOBAL_argsummaryPTR) - && (ai->as != FFEGLOBAL_argsummaryNONE)) - { - fail = TRUE; - refwhy = "a pointer"; - } - break; -#endif - - default: - break; - } - - if ((refwhy != NULL) && (defwhy == NULL)) - { - /* Fill in the def info. */ - - switch (ai->as) - { - case FFEGLOBAL_argsummaryNONE: - defwhy = "omitted"; - break; - - case FFEGLOBAL_argsummaryVAL: - defwhy = "passed by value"; - break; - - case FFEGLOBAL_argsummaryREF: - defwhy = "passed by reference"; - break; - - case FFEGLOBAL_argsummaryDESCR: - defwhy = "passed by descriptor"; - break; - - case FFEGLOBAL_argsummaryPROC: - defwhy = "a procedure"; - break; - - case FFEGLOBAL_argsummarySUBR: - defwhy = "a subroutine"; - break; - - case FFEGLOBAL_argsummaryFUNC: - defwhy = "a function"; - break; - - case FFEGLOBAL_argsummaryALTRTN: - defwhy = "an alternate-return label"; - break; - -#if 0 - case FFEGLOBAL_argsummaryPTR: - defwhy = "a pointer"; - break; -#endif - - default: - defwhy = "???"; - break; - } - } - - if (!fail && !warn - && (bt != FFEINFO_basictypeHOLLERITH) - && (bt != FFEINFO_basictypeTYPELESS) - && (bt != FFEINFO_basictypeNONE) - && (ai->bt != FFEINFO_basictypeHOLLERITH) - && (ai->bt != FFEINFO_basictypeNONE) - && (ai->bt != FFEINFO_basictypeTYPELESS)) - { - /* Check types. */ - - if ((bt != ai->bt) - && ((bt != FFEINFO_basictypeREAL) - || (ai->bt != FFEINFO_basictypeCOMPLEX)) - && ((bt != FFEINFO_basictypeCOMPLEX) - || (ai->bt != FFEINFO_basictypeREAL))) - { - if (((bt == FFEINFO_basictypeINTEGER) - && (ai->bt == FFEINFO_basictypeLOGICAL)) - || ((bt == FFEINFO_basictypeLOGICAL) - && (ai->bt == FFEINFO_basictypeINTEGER))) - warn = TRUE; /* We can cope with these differences. */ - else - fail = TRUE; - refwhy = "one type"; - defwhy = "some other type"; - } - - if (!fail && !warn && (kt != ai->kt)) - { - fail = TRUE; - refwhy = "one precision"; - defwhy = "some other precision"; - } - } - - if (fail && ! g->u.proc.defined) - { - /* No point failing if we're worried only about invocations. */ - fail = FALSE; - warn = TRUE; - } - - if (fail && ! ffe_is_globals ()) - { - warn = TRUE; - fail = FALSE; - } - - if (fail || (warn && ffe_is_warn_globals ())) - { - char num[60]; - - if (ai->name == NULL) - sprintf (&num[0], "%d", argno + 1); - else - { - if (strlen (ai->name) < 30) - sprintf (&num[0], "%d (named `%s')", argno + 1, ai->name); - else - sprintf (&num[0], "%d (named `%.*s...')", argno + 1, 30, ai->name); - } - ffebad_start (fail ? FFEBAD_FILEWIDE_ARG : FFEBAD_FILEWIDE_ARG_W); - ffebad_string (ffesymbol_text (s)); - ffebad_string (num); - ffebad_string (refwhy); - ffebad_string (defwhy); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (ai->t), ffelex_token_where_column (ai->t)); - ffebad_finish (); - return (fail ? FALSE : TRUE); - } - - if (warn) - return TRUE; - } - - /* Define this argument. */ - - if (ai->t != NULL) - ffelex_token_kill (ai->t); - if ((as != FFEGLOBAL_argsummaryPROC) - || (ai->t == NULL)) - ai->as = as; - ai->t = ffelex_token_use (g->t); - ai->name = NULL; - ai->bt = bt; - ai->kt = kt; - ai->array = array; - return TRUE; -} - -bool -ffeglobal_proc_ref_nargs (ffesymbol s, int n_args, ffelexToken t) -{ - ffeglobal g = ffesymbol_global (s); - - assert (g != NULL); - - if (g->type == FFEGLOBAL_typeANY) - return FALSE; - - if (g->u.proc.n_args >= 0) - { - if (g->u.proc.n_args == n_args) - return TRUE; - - if (g->u.proc.defined && ffe_is_globals ()) - { - ffebad_start (FFEBAD_FILEWIDE_NARGS); - ffebad_string (ffesymbol_text (s)); - if (g->u.proc.n_args > n_args) - ffebad_string ("few"); - else - ffebad_string ("many"); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - return FALSE; - } - - if (ffe_is_warn_globals ()) - { - ffebad_start (FFEBAD_FILEWIDE_NARGS_W); - ffebad_string (ffesymbol_text (s)); - if (g->u.proc.n_args > n_args) - ffebad_string ("few"); - else - ffebad_string ("many"); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - - return TRUE; /* Don't replace the info we already have. */ - } - - /* This is new info we can use in cross-checking future references - and a possible future definition. */ - - g->u.proc.n_args = n_args; - g->u.proc.other_t = ffelex_token_use (t); - - /* Make this "the" place we found the global, since it has the most info. */ - - if (g->t != NULL) - ffelex_token_kill (g->t); - g->t = ffelex_token_use (t); - - if (n_args == 0) - { - g->u.proc.arg_info = NULL; - return TRUE; - } - - g->u.proc.arg_info = malloc_new_ks (malloc_pool_image (), - "ffeglobalArgInfo_", - n_args * sizeof (g->u.proc.arg_info[0])); - while (n_args-- > 0) - g->u.proc.arg_info[n_args].t = NULL; - - return TRUE; -} - -/* Return a global for a promoted symbol (one that has heretofore - been assumed to be local, but since discovered to be global). */ - -ffeglobal -ffeglobal_promoted (ffesymbol s) -{ -#if FFEGLOBAL_ENABLED - ffename n; - ffeglobal g; - - assert (ffesymbol_global (s) == NULL); - - n = ffename_find (ffeglobal_filewide_, ffename_token (ffesymbol_name (s))); - g = ffename_global (n); - - return g; -#else - return NULL; -#endif -} - -/* Register a reference to an intrinsic. Such a reference is always - valid, though a warning might be in order if the same name has - already been used for a global. */ - -void -ffeglobal_ref_intrinsic (ffesymbol s, ffelexToken t, bool explicit) -{ -#if FFEGLOBAL_ENABLED - ffename n; - ffeglobal g; - - if (ffesymbol_global (s) == NULL) - { - n = ffename_find (ffeglobal_filewide_, t); - g = ffename_global (n); - } - else - { - g = ffesymbol_global (s); - n = NULL; - } - - if ((g != NULL) && (g->type == FFEGLOBAL_typeANY)) - return; - - if ((g != NULL) && (g->type != FFEGLOBAL_typeNONE)) - { - if (! explicit - && ! g->intrinsic - && ffe_is_warn_globals ()) - { - /* This name, previously used as a global, now is used - for an intrinsic. Warn, since this new use as an - intrinsic might have been intended to refer to - the global procedure. */ - ffebad_start (FFEBAD_INTRINSIC_GLOBAL); - ffebad_string (ffelex_token_text (t)); - ffebad_string ("intrinsic"); - ffebad_string ("global"); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - } - else - { - if (g == NULL) - { - g = ffeglobal_new_ (n); - g->tick = ffe_count_2; - g->type = FFEGLOBAL_typeNONE; - g->intrinsic = TRUE; - g->explicit_intrinsic = explicit; - g->t = ffelex_token_use (t); - } - else if (g->intrinsic - && (explicit != g->explicit_intrinsic) - && (g->tick != ffe_count_2) - && ffe_is_warn_globals ()) - { - /* An earlier reference to this intrinsic disagrees with - this reference vis-a-vis explicit `intrinsic foo', - which suggests that the one relying on implicit - intrinsicacity might have actually intended to refer - to a global of the same name. */ - ffebad_start (FFEBAD_INTRINSIC_EXPIMP); - ffebad_string (ffelex_token_text (t)); - ffebad_string (explicit ? "explicit" : "implicit"); - ffebad_string (explicit ? "implicit" : "explicit"); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - } - - g->intrinsic = TRUE; - if (explicit) - g->explicit_intrinsic = TRUE; - - ffesymbol_set_global (s, g); -#endif -} - -/* Register a reference to a global. Returns TRUE if the reference - is valid. */ - -bool -ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type) -{ -#if FFEGLOBAL_ENABLED - ffename n = NULL; - ffeglobal g; - - /* It is never really _known_ that an EXTERNAL statement - names a BLOCK DATA by just looking at the program unit, - so override a different notion here. */ - if (type == FFEGLOBAL_typeBDATA) - type = FFEGLOBAL_typeEXT; - - g = ffesymbol_global (s); - if (g == NULL) - { - n = ffename_find (ffeglobal_filewide_, t); - g = ffename_global (n); - if (g != NULL) - ffesymbol_set_global (s, g); - } - - if ((g != NULL) && (g->type == FFEGLOBAL_typeANY)) - return TRUE; - - if ((g != NULL) - && (g->type != FFEGLOBAL_typeNONE) - && (g->type != FFEGLOBAL_typeEXT) - && (g->type != type) - && (type != FFEGLOBAL_typeEXT)) - { - /* Disagreement about (fully refined) class of program unit - (main, subroutine, function, block data). Treat EXTERNAL/ - COMMON disagreements distinctly. */ - if ((((type == FFEGLOBAL_typeBDATA) - && (g->type != FFEGLOBAL_typeCOMMON)) - || ((g->type == FFEGLOBAL_typeBDATA) - && (type != FFEGLOBAL_typeCOMMON) - && ! g->u.proc.defined))) - { -#if 0 /* This is likely to just annoy people. */ - if (ffe_is_warn_globals ()) - { - /* Warn about EXTERNAL of a COMMON name, though it works. */ - ffebad_start (FFEBAD_FILEWIDE_TIFF); - ffebad_string (ffelex_token_text (t)); - ffebad_string (ffeglobal_type_string_[type]); - ffebad_string (ffeglobal_type_string_[g->type]); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } -#endif - } - else if (ffe_is_globals () || ffe_is_warn_globals ()) - { - ffebad_start (ffe_is_globals () - ? FFEBAD_FILEWIDE_DISAGREEMENT - : FFEBAD_FILEWIDE_DISAGREEMENT_W); - ffebad_string (ffelex_token_text (t)); - ffebad_string (ffeglobal_type_string_[type]); - ffebad_string (ffeglobal_type_string_[g->type]); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - g->type = FFEGLOBAL_typeANY; - return (! ffe_is_globals ()); - } - } - - if ((g != NULL) - && (type == FFEGLOBAL_typeFUNC)) - { - /* If just filling in this function's type, do so. */ - if ((g->tick == ffe_count_2) - && (ffesymbol_basictype (s) != FFEINFO_basictypeNONE) - && (ffesymbol_kindtype (s) != FFEINFO_kindtypeNONE)) - { - g->u.proc.bt = ffesymbol_basictype (s); - g->u.proc.kt = ffesymbol_kindtype (s); - g->u.proc.sz = ffesymbol_size (s); - } - /* Make sure there is type agreement. */ - if (g->type == FFEGLOBAL_typeFUNC - && g->u.proc.bt != FFEINFO_basictypeNONE - && ffesymbol_basictype (s) != FFEINFO_basictypeNONE - && (ffesymbol_basictype (s) != g->u.proc.bt - || ffesymbol_kindtype (s) != g->u.proc.kt - /* CHARACTER*n disagreements matter only once a - definition is involved, since the definition might - be CHARACTER*(*), which accepts all references. */ - || (g->u.proc.defined - && ffesymbol_size (s) != g->u.proc.sz - && ffesymbol_size (s) != FFETARGET_charactersizeNONE - && g->u.proc.sz != FFETARGET_charactersizeNONE))) - { - int error; - - /* Type mismatch between function reference/definition and - this subsequent reference (which might just be the filling-in - of type info for the definition, but we can't reach here - if that's the case and there was a previous definition). - - It's an error given a previous definition, since that - implies inlining can crash the compiler, unless the user - asked for no such inlining. */ - error = (g->tick != ffe_count_2 - && g->u.proc.defined - && ffe_is_globals ()); - if (error || ffe_is_warn_globals ()) - { - ffebad_start (error - ? FFEBAD_FILEWIDE_TYPE_MISMATCH - : FFEBAD_FILEWIDE_TYPE_MISMATCH_W); - ffebad_string (ffelex_token_text (t)); - if (g->tick == ffe_count_2) - { - /* Current reference fills in type info for definition. - The current token doesn't necessarily point to the actual - definition of the function, so use the definition pointer - and the pointer to the pre-definition type info. */ - ffebad_here (0, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_here (1, ffelex_token_where_line (g->u.proc.other_t), - ffelex_token_where_column (g->u.proc.other_t)); - } - else - { - /* Current reference is not a filling-in of a current - definition. The current token is fine, as is - the previous-mention token. */ - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - } - ffebad_finish (); - if (error) - g->type = FFEGLOBAL_typeANY; - return FALSE; - } - } - } - - if (g == NULL) - { - g = ffeglobal_new_ (n); - g->t = ffelex_token_use (t); - g->tick = ffe_count_2; - g->intrinsic = FALSE; - g->type = type; - g->u.proc.defined = FALSE; - g->u.proc.bt = ffesymbol_basictype (s); - g->u.proc.kt = ffesymbol_kindtype (s); - g->u.proc.sz = ffesymbol_size (s); - g->u.proc.n_args = -1; - ffesymbol_set_global (s, g); - } - else if (g->intrinsic - && !g->explicit_intrinsic - && (g->tick != ffe_count_2) - && ffe_is_warn_globals ()) - { - /* Now known as a global, this name previously was seen as an - intrinsic. Warn, in case the previous reference was intended - for the same global. */ - ffebad_start (FFEBAD_INTRINSIC_GLOBAL); - ffebad_string (ffelex_token_text (t)); - ffebad_string ("global"); - ffebad_string ("intrinsic"); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_here (1, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_finish (); - } - - if ((g->type != type) - && (type != FFEGLOBAL_typeEXT)) - { - /* We've learned more, so point to where we learned it. */ - g->t = ffelex_token_use (t); - g->type = type; - g->hook = FFECOM_globalNULL; /* Discard previous _DECL. */ - g->u.proc.n_args = -1; - } - - return TRUE; -#endif -} - -/* ffeglobal_save_common -- Check SAVE status of common area - - ffesymbol s; // the common area - bool save; // TRUE if SAVEd, FALSE otherwise - ffeglobal_save_common(s,save,ffesymbol_where_line(s), - ffesymbol_where_column(s)); - - In global-enabled mode, make sure the save info agrees with any existing - info established for the common area, otherwise complain. - In global-disabled mode, do nothing. */ - -void -ffeglobal_save_common (ffesymbol s, bool save, ffewhereLine wl, - ffewhereColumn wc) -{ -#if FFEGLOBAL_ENABLED - ffeglobal g; - - g = ffesymbol_global (s); - if ((g == NULL) || (g->type != FFEGLOBAL_typeCOMMON)) - return; /* Let someone else catch this! */ - if (g->type == FFEGLOBAL_typeANY) - return; - - if (!g->u.common.have_save) - { - g->u.common.have_save = TRUE; - g->u.common.save = save; - g->u.common.save_where_line = ffewhere_line_use (wl); - g->u.common.save_where_col = ffewhere_column_use (wc); - } - else - { - if ((g->u.common.save != save) && ffe_is_pedantic ()) - { - ffebad_start (FFEBAD_COMMON_DIFF_SAVE); - ffebad_string (ffesymbol_text (s)); - ffebad_here (save ? 0 : 1, wl, wc); - ffebad_here (save ? 1 : 0, g->u.common.pad_where_line, g->u.common.pad_where_col); - ffebad_finish (); - } - } -#endif -} - -/* ffeglobal_size_common -- Establish size of COMMON area - - ffesymbol s; // the common area - ffetargetOffset size; // size in units - if (ffeglobal_size_common(s,size)) // new size is largest seen - - In global-enabled mode, set the size if it current size isn't known or is - smaller than new size, and for non-blank common, complain if old size - is different from new. Return TRUE if the new size is the largest seen - for this COMMON area (or if no size was known for it previously). - In global-disabled mode, do nothing. */ - -#if FFEGLOBAL_ENABLED -bool -ffeglobal_size_common (ffesymbol s, ffetargetOffset size) -{ - ffeglobal g; - - g = ffesymbol_global (s); - if ((g == NULL) || (g->type != FFEGLOBAL_typeCOMMON)) - return FALSE; - if (g->type == FFEGLOBAL_typeANY) - return FALSE; - - if (!g->u.common.have_size) - { - g->u.common.have_size = TRUE; - g->u.common.size = size; - return TRUE; - } - - if ((g->tick > 0) && (g->tick < ffe_count_2) - && (g->u.common.size < size)) - { - char oldsize[40]; - char newsize[40]; - - /* Common block initialized in a previous program unit, which - effectively freezes its size, but now the program is trying - to enlarge it. */ - - sprintf (&oldsize[0], "%" ffetargetOffset_f "d", g->u.common.size); - sprintf (&newsize[0], "%" ffetargetOffset_f "d", size); - - ffebad_start (FFEBAD_COMMON_ENLARGED); - ffebad_string (ffesymbol_text (s)); - ffebad_string (oldsize); - ffebad_string (newsize); - ffebad_string ((g->u.common.size == 1) - ? FFECOM_SIZE_UNIT : FFECOM_SIZE_UNITS); - ffebad_string ((size == 1) - ? FFECOM_SIZE_UNIT : FFECOM_SIZE_UNITS); - ffebad_here (0, ffelex_token_where_line (g->u.common.initt), - ffelex_token_where_column (g->u.common.initt)); - ffebad_here (1, ffesymbol_where_line (s), - ffesymbol_where_column (s)); - ffebad_finish (); - } - else if ((g->u.common.size != size) && !g->u.common.blank) - { - char oldsize[40]; - char newsize[40]; - - /* Warn about this even if not -pedantic, because putting all - program units in a single source file is the only way to - detect this. Apparently UNIX-model linkers neither handle - nor report when they make a common unit smaller than - requested, such as when the smaller-declared version is - initialized and the larger-declared version is not. So - if people complain about strange overwriting, we can tell - them to put all their code in a single file and compile - that way. Warnings about differing sizes must therefore - always be issued. */ - - sprintf (&oldsize[0], "%" ffetargetOffset_f "d", g->u.common.size); - sprintf (&newsize[0], "%" ffetargetOffset_f "d", size); - - ffebad_start (FFEBAD_COMMON_DIFF_SIZE); - ffebad_string (ffesymbol_text (s)); - ffebad_string (oldsize); - ffebad_string (newsize); - ffebad_string ((g->u.common.size == 1) - ? FFECOM_SIZE_UNIT : FFECOM_SIZE_UNITS); - ffebad_string ((size == 1) - ? FFECOM_SIZE_UNIT : FFECOM_SIZE_UNITS); - ffebad_here (0, ffelex_token_where_line (g->t), - ffelex_token_where_column (g->t)); - ffebad_here (1, ffesymbol_where_line (s), - ffesymbol_where_column (s)); - ffebad_finish (); - } - - if (size > g->u.common.size) - { - g->u.common.size = size; - return TRUE; - } - - return FALSE; -} - -#endif -void -ffeglobal_terminate_1 (void) -{ -} diff --git a/contrib/gcc/f/global.h b/contrib/gcc/f/global.h deleted file mode 100644 index dc499df..0000000 --- a/contrib/gcc/f/global.h +++ /dev/null @@ -1,193 +0,0 @@ -/* global.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1997, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - global.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_GLOBAL_H -#define GCC_F_GLOBAL_H - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFEGLOBAL_typeNONE, - FFEGLOBAL_typeMAIN, - FFEGLOBAL_typeEXT, /* EXTERNAL is all we know. */ - FFEGLOBAL_typeSUBR, - FFEGLOBAL_typeFUNC, - FFEGLOBAL_typeBDATA, - FFEGLOBAL_typeCOMMON, - FFEGLOBAL_typeANY, /* Confusion reigns, so just ignore. */ - FFEGLOBAL_type - } ffeglobalType; - -typedef enum - { - FFEGLOBAL_argsummaryNONE, /* No arg present. */ - FFEGLOBAL_argsummaryVAL, /* Pass-by-value. */ - FFEGLOBAL_argsummaryREF, /* Pass-by-reference. */ - FFEGLOBAL_argsummaryDESCR, /* Pass-by-descriptor. */ - FFEGLOBAL_argsummaryPROC, /* Procedure (intrinsic, external). */ - FFEGLOBAL_argsummarySUBR, /* Subroutine (intrinsic, external). */ - FFEGLOBAL_argsummaryFUNC, /* Function (intrinsic, external). */ - FFEGLOBAL_argsummaryALTRTN, /* Alternate-return (label). */ - FFEGLOBAL_argsummaryANY, - FFEGLOBAL_argsummary - } ffeglobalArgSummary; - -/* Typedefs. */ - -typedef struct _ffeglobal_arginfo_ *ffeglobalArgInfo_; -typedef struct _ffeglobal_ *ffeglobal; - -/* Include files needed by this one. */ - -#include "info.h" -#include "lex.h" -#include "name.h" -#include "symbol.h" -#include "target.h" -#include "top.h" - -/* Structure definitions. */ - -struct _ffeglobal_arginfo_ -{ - ffelexToken t; /* Different from master token when difference is important. */ - char *name; /* Name of dummy arg, or NULL if not yet known. */ - ffeglobalArgSummary as; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - bool array; -}; - -struct _ffeglobal_ -{ - ffelexToken t; - ffename n; - ffecomGlobal hook; - ffeCounter tick; /* Recent transition in this progunit. */ - ffeglobalType type; - bool intrinsic; /* Known as intrinsic? */ - bool explicit_intrinsic; /* Explicit intrinsic? */ - union { - struct { - ffelexToken initt; /* First initial value. */ - bool have_pad; /* Padding info avail for COMMON? */ - ffetargetAlign pad; /* Initial padding for COMMON. */ - ffewhereLine pad_where_line; - ffewhereColumn pad_where_col; - bool have_save; /* Save info avail for COMMON? */ - bool save; /* Save info for COMMON. */ - ffewhereLine save_where_line; - ffewhereColumn save_where_col; - bool have_size; /* Size info avail for COMMON? */ - ffetargetOffset size; /* Size info for COMMON. */ - bool blank; /* TRUE if blank COMMON. */ - } common; - struct { - bool defined; /* Seen actual code yet? */ - ffeinfoBasictype bt; /* NONE for non-function. */ - ffeinfoKindtype kt; /* NONE for non-function. */ - ffetargetCharacterSize sz; - int n_args; /* 0 for main/blockdata. */ - ffelexToken other_t; /* Location of reference. */ - ffeglobalArgInfo_ arg_info; /* Info on each argument. */ - } proc; - } u; -}; - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -void ffeglobal_drive (ffeglobal (*fn) (ffeglobal)); -void ffeglobal_init_1 (void); -void ffeglobal_init_common (ffesymbol s, ffelexToken t); -void ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type); -void ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank); -void ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl, - ffewhereColumn wc); -void ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as, - ffeinfoBasictype bt, ffeinfoKindtype kt, - bool array); -void ffeglobal_proc_def_nargs (ffesymbol s, int n_args); -bool ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as, - ffeinfoBasictype bt, ffeinfoKindtype kt, - bool array, ffelexToken t); -bool ffeglobal_proc_ref_nargs (ffesymbol s, int n_args, ffelexToken t); -ffeglobal ffeglobal_promoted (ffesymbol s); -void ffeglobal_ref_intrinsic (ffesymbol s, ffelexToken t, bool explicit); -bool ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type); -void ffeglobal_save_common (ffesymbol s, bool save, ffewhereLine wl, - ffewhereColumn wc); -bool ffeglobal_size_common (ffesymbol s, ffetargetOffset size); -void ffeglobal_terminate_1 (void); - -/* Define macros. */ - -#define FFEGLOBAL_ENABLED 1 - -#define ffeglobal_common_init(g) ((g)->tick != 0) -#define ffeglobal_common_have_pad(g) ((g)->u.common.have_pad) -#define ffeglobal_common_have_size(g) ((g)->u.common.have_size) -#define ffeglobal_common_pad(g) ((g)->u.common.pad) -#define ffeglobal_common_size(g) ((g)->u.common.size) -#define ffeglobal_hook(g) ((g)->hook) -#define ffeglobal_init_0() -#define ffeglobal_init_2() -#define ffeglobal_init_3() -#define ffeglobal_init_4() -#define ffeglobal_new_blockdata(s,t) \ - ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeBDATA) -#define ffeglobal_new_function(s,t) \ - ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeFUNC) -#define ffeglobal_new_program(s,t) \ - ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeMAIN) -#define ffeglobal_new_subroutine(s,t) \ - ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeSUBR) -#define ffeglobal_ref_blockdata(s,t) \ - ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeBDATA) -#define ffeglobal_ref_external(s,t) \ - ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeEXT) -#define ffeglobal_ref_function(s,t) \ - ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeFUNC) -#define ffeglobal_ref_subroutine(s,t) \ - ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeSUBR) -#define ffeglobal_set_hook(g,h) ((g)->hook = (h)) -#define ffeglobal_terminate_0() -#define ffeglobal_terminate_2() -#define ffeglobal_terminate_3() -#define ffeglobal_terminate_4() -#define ffeglobal_text(g) ffename_text((g)->n) -#define ffeglobal_type(g) ((g)->type) - -/* End of #include file. */ - -#endif /* ! GCC_F_GLOBAL_H */ - diff --git a/contrib/gcc/f/implic.c b/contrib/gcc/f/implic.c deleted file mode 100644 index c7a28cb..0000000 --- a/contrib/gcc/f/implic.c +++ /dev/null @@ -1,383 +0,0 @@ -/* implic.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 2002, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None. - - Description: - The GNU Fortran Front End. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "implic.h" -#include "info.h" -#include "src.h" -#include "symbol.h" -#include "target.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFEIMPLIC_stateINITIAL_, - FFEIMPLIC_stateASSUMED_, - FFEIMPLIC_stateESTABLISHED_, - FFEIMPLIC_state - } ffeimplicState_; - -/* Internal typedefs. */ - -typedef struct _ffeimplic_ *ffeimplic_; - -/* Private include files. */ - - -/* Internal structure definitions. */ - -struct _ffeimplic_ - { - ffeimplicState_ state; - ffeinfo info; - }; - -/* Static objects accessed by functions in this module. */ - -/* NOTE: This is definitely ASCII-specific!! */ - -static struct _ffeimplic_ ffeimplic_table_['z' - 'A' + 1]; - -/* Static functions (internal). */ - -static ffeimplic_ ffeimplic_lookup_ (unsigned char c); - -/* Internal macros. */ - - -/* ffeimplic_lookup_ -- Look up implicit descriptor for initial character - - ffeimplic_ imp; - if ((imp = ffeimplic_lookup_('A')) == NULL) - // error - - Returns a pointer to an implicit descriptor block based on the character - passed, or NULL if it is not a valid initial character for an implicit - data type. */ - -static ffeimplic_ -ffeimplic_lookup_ (unsigned char c) -{ - /* NOTE: This is definitely ASCII-specific!! */ - if (ISIDST (c)) - return &ffeimplic_table_[c - 'A']; - return NULL; -} - -/* ffeimplic_establish_initial -- Establish type of implicit initial letter - - ffesymbol s; - if (!ffeimplic_establish_initial(s)) - // error - - Assigns implicit type information to the symbol based on the first - character of the symbol's name. */ - -bool -ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type, - ffeinfoKindtype kind_type, ffetargetCharacterSize size) -{ - ffeimplic_ imp; - - imp = ffeimplic_lookup_ (c); - if (imp == NULL) - return FALSE; /* Character not A-Z or some such thing. */ - if (ffeinfo_basictype (imp->info) == FFEINFO_basictypeNONE) - return FALSE; /* IMPLICIT NONE in effect here. */ - - switch (imp->state) - { - case FFEIMPLIC_stateINITIAL_: - imp->info = ffeinfo_new (basic_type, - kind_type, - 0, - FFEINFO_kindNONE, - FFEINFO_whereNONE, - size); - imp->state = FFEIMPLIC_stateESTABLISHED_; - return TRUE; - - case FFEIMPLIC_stateASSUMED_: - if ((ffeinfo_basictype (imp->info) != basic_type) - || (ffeinfo_kindtype (imp->info) != kind_type) - || (ffeinfo_size (imp->info) != size)) - return FALSE; - imp->state = FFEIMPLIC_stateESTABLISHED_; - return TRUE; - - case FFEIMPLIC_stateESTABLISHED_: - return FALSE; - - default: - assert ("Weird state for implicit object" == NULL); - return FALSE; - } -} - -/* ffeimplic_establish_symbol -- Establish implicit type of a symbol - - ffesymbol s; - if (!ffeimplic_establish_symbol(s)) - // error - - Assigns implicit type information to the symbol based on the first - character of the symbol's name. - - If symbol already has a type, return TRUE. - Get first character of symbol's name. - Get ffeimplic_ object for it (return FALSE if NULL returned). - Return FALSE if object has no assigned type (IMPLICIT NONE). - Copy the type information from the object to the symbol. - If the object is state "INITIAL", set to state "ASSUMED" so no - subsequent IMPLICIT statement may change the state. - Return TRUE. */ - -bool -ffeimplic_establish_symbol (ffesymbol s) -{ - char c; - ffeimplic_ imp; - - if (ffesymbol_basictype (s) != FFEINFO_basictypeNONE) - return TRUE; - - c = *(ffesymbol_text (s)); - imp = ffeimplic_lookup_ (c); - if (imp == NULL) - return FALSE; /* First character not A-Z or some such - thing. */ - if (ffeinfo_basictype (imp->info) == FFEINFO_basictypeNONE) - return FALSE; /* IMPLICIT NONE in effect here. */ - - ffesymbol_signal_change (s); /* Gonna change, save existing? */ - - /* Establish basictype, kindtype, size; preserve rank, kind, where. */ - - ffesymbol_set_info (s, - ffeinfo_new (ffeinfo_basictype (imp->info), - ffeinfo_kindtype (imp->info), - ffesymbol_rank (s), - ffesymbol_kind (s), - ffesymbol_where (s), - ffeinfo_size (imp->info))); - - if (imp->state == FFEIMPLIC_stateINITIAL_) - imp->state = FFEIMPLIC_stateASSUMED_; - - if (ffe_is_warn_implicit ()) - { - /* xgettext:no-c-format */ - ffebad_start_msg ("Implicit declaration of `%A' at %0", - FFEBAD_severityWARNING); - ffebad_here (0, ffesymbol_where_line (s), - ffesymbol_where_column (s)); - ffebad_string (ffesymbol_text (s)); - ffebad_finish (); - } - - return TRUE; -} - -/* ffeimplic_init_2 -- Initialize table - - ffeimplic_init_2(); - - Assigns initial type information to all initial letters. - - Allows for holes in the sequence of letters (i.e. EBCDIC). */ - -void -ffeimplic_init_2 (void) -{ - ffeimplic_ imp; - char c; - - for (c = 'A'; c <= 'z'; ++c) - { - imp = &ffeimplic_table_[c - 'A']; - imp->state = FFEIMPLIC_stateINITIAL_; - switch (c) - { - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case '_': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - imp->info = ffeinfo_new (FFEINFO_basictypeREAL, - FFEINFO_kindtypeREALDEFAULT, - 0, - FFEINFO_kindNONE, - FFEINFO_whereNONE, - FFETARGET_charactersizeNONE); - break; - - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - imp->info = ffeinfo_new (FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGERDEFAULT, 0, FFEINFO_kindNONE, FFEINFO_whereNONE, - FFETARGET_charactersizeNONE); - break; - - default: - imp->info = ffeinfo_new (FFEINFO_basictypeNONE, FFEINFO_kindtypeNONE, 0, - FFEINFO_kindNONE, FFEINFO_whereNONE, FFETARGET_charactersizeNONE); - break; - } - } -} - -/* ffeimplic_none -- Implement IMPLICIT NONE statement - - ffeimplic_none(); - - Assigns null type information to all initial letters. */ - -void -ffeimplic_none (void) -{ - ffeimplic_ imp; - - for (imp = &ffeimplic_table_[0]; - imp != &ffeimplic_table_[ARRAY_SIZE (ffeimplic_table_)]; - imp++) - { - imp->info = ffeinfo_new (FFEINFO_basictypeNONE, - FFEINFO_kindtypeNONE, - 0, - FFEINFO_kindNONE, - FFEINFO_whereNONE, - FFETARGET_charactersizeNONE); - } -} - -/* ffeimplic_peek_symbol_type -- Determine implicit type of a symbol - - ffesymbol s; - const char *name; // name for s in case it is NULL, or NULL if s never NULL - if (ffeimplic_peek_symbol_type(s,name) == FFEINFO_basictypeCHARACTER) - // is or will be a CHARACTER-typed name - - Like establish_symbol, but doesn't change anything. - - If symbol is non-NULL and already has a type, return it. - Get first character of symbol's name or from name arg if symbol is NULL. - Get ffeimplic_ object for it (return FALSE if NULL returned). - Return NONE if object has no assigned type (IMPLICIT NONE). - Return the data type indicated in the object. - - 24-Oct-91 JCB 2.0 - Take a char * instead of ffelexToken, since the latter isn't always - needed anyway (as when ffecom calls it). */ - -ffeinfoBasictype -ffeimplic_peek_symbol_type (ffesymbol s, const char *name) -{ - char c; - ffeimplic_ imp; - - if (s == NULL) - c = *name; - else - { - if (ffesymbol_basictype (s) != FFEINFO_basictypeNONE) - return ffesymbol_basictype (s); - - c = *(ffesymbol_text (s)); - } - - imp = ffeimplic_lookup_ (c); - if (imp == NULL) - return FFEINFO_basictypeNONE; /* First character not A-Z or - something. */ - return ffeinfo_basictype (imp->info); -} - -/* ffeimplic_terminate_2 -- Terminate table - - ffeimplic_terminate_2(); - - Kills info object for each entry in table. */ - -void -ffeimplic_terminate_2 (void) -{ -} diff --git a/contrib/gcc/f/implic.h b/contrib/gcc/f/implic.h deleted file mode 100644 index 44fbfac..0000000 --- a/contrib/gcc/f/implic.h +++ /dev/null @@ -1,74 +0,0 @@ -/* implic.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - implic.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_IMPLIC_H -#define GCC_F_IMPLIC_H - -/* Simple definitions and enumerations. */ - - -/* Typedefs. */ - - -/* Include files needed by this one. */ - -#include "info.h" -#include "symbol.h" -#include "target.h" - -/* Structure definitions. */ - - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -bool ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type, - ffeinfoKindtype kind_type, ffetargetCharacterSize size); -bool ffeimplic_establish_symbol (ffesymbol s); -void ffeimplic_init_2 (void); -void ffeimplic_none (void); -ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, const char *name); -void ffeimplic_terminate_2 (void); - -/* Define macros. */ - -#define ffeimplic_init_0() -#define ffeimplic_init_1() -#define ffeimplic_init_3() -#define ffeimplic_init_4() -#define ffeimplic_terminate_0() -#define ffeimplic_terminate_1() -#define ffeimplic_terminate_3() -#define ffeimplic_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_IMPLIC_H */ diff --git a/contrib/gcc/f/info-b.def b/contrib/gcc/f/info-b.def deleted file mode 100644 index 088d108..0000000 --- a/contrib/gcc/f/info-b.def +++ /dev/null @@ -1,36 +0,0 @@ -/* info-b.def -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - info.c - - Modifications: -*/ - -FFEINFO_BASICTYPE (FFEINFO_basictypeNONE, "None", "") -FFEINFO_BASICTYPE (FFEINFO_basictypeINTEGER, "INTEGER", "i") -FFEINFO_BASICTYPE (FFEINFO_basictypeLOGICAL, "LOGICAL", "l") -FFEINFO_BASICTYPE (FFEINFO_basictypeREAL, "REAL", "r") -FFEINFO_BASICTYPE (FFEINFO_basictypeCOMPLEX, "COMPLEX", "c") -FFEINFO_BASICTYPE (FFEINFO_basictypeCHARACTER, "CHARACTER", "a") -FFEINFO_BASICTYPE (FFEINFO_basictypeHOLLERITH, "Hollerith", "h") -FFEINFO_BASICTYPE (FFEINFO_basictypeTYPELESS, "Typeless", "t") -FFEINFO_BASICTYPE (FFEINFO_basictypeANY, "Any", "~") diff --git a/contrib/gcc/f/info-k.def b/contrib/gcc/f/info-k.def deleted file mode 100644 index 9e6052d..0000000 --- a/contrib/gcc/f/info-k.def +++ /dev/null @@ -1,41 +0,0 @@ -/* info-k.def -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 2002 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - info.c - - Modifications: -*/ - -# -/* Kind messages are used in diagnostic location reports of the - form ": In function `foo': ". */ - -FFEINFO_KIND (FFEINFO_kindNONE, "In unknown kind", "") -FFEINFO_KIND (FFEINFO_kindENTITY, "In entity", "e") -FFEINFO_KIND (FFEINFO_kindFUNCTION, "In function", "f") -FFEINFO_KIND (FFEINFO_kindSUBROUTINE, "In subroutine", "u") -FFEINFO_KIND (FFEINFO_kindPROGRAM, "In program", "p") -FFEINFO_KIND (FFEINFO_kindBLOCKDATA, "In block-data unit", "b") -FFEINFO_KIND (FFEINFO_kindCOMMON, "In common block", "c") -FFEINFO_KIND (FFEINFO_kindCONSTRUCT, "In construct", ":") -FFEINFO_KIND (FFEINFO_kindNAMELIST, "In namelist", "n") -FFEINFO_KIND (FFEINFO_kindANY, "In anything", "~") diff --git a/contrib/gcc/f/info-w.def b/contrib/gcc/f/info-w.def deleted file mode 100644 index 57e3f8c..0000000 --- a/contrib/gcc/f/info-w.def +++ /dev/null @@ -1,41 +0,0 @@ -/* info-w.def -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - info.c - - Modifications: -*/ - -FFEINFO_WHERE (FFEINFO_whereNONE, "None", "") -FFEINFO_WHERE (FFEINFO_whereLOCAL, "Local", "l") /* Defined locally. */ -FFEINFO_WHERE (FFEINFO_whereCOMMON, "Common", "c") /* In a common area. */ -FFEINFO_WHERE (FFEINFO_whereDUMMY, "Dummy", "d") /* A dummy argument. */ -FFEINFO_WHERE (FFEINFO_whereGLOBAL, "Global", "g") /* Reference to external global like FUNCTION, SUBR. */ -FFEINFO_WHERE (FFEINFO_whereRESULT, "Result", "r") /* Result of this function. */ -FFEINFO_WHERE (FFEINFO_whereFLEETING, "Fleeting", "f") /* Result of "X*Y", "FUNCREF(5,1.3)", "ARRAY(X)", etc. */ -FFEINFO_WHERE (FFEINFO_whereFLEETING_CADDR, "Fleet-Const", "fp") /* "A(3)", "CHARS(4:5)". */ -FFEINFO_WHERE (FFEINFO_whereFLEETING_IADDR, "Fleet-Immed", "fi") /* A(IX) in "DATA (A(IX),IX=1,100)/.../". */ -FFEINFO_WHERE (FFEINFO_whereIMMEDIATE, "Immediate", "i") /* IX in "DATA (A(IX),IX=1,100)/.../". */ -FFEINFO_WHERE (FFEINFO_whereINTRINSIC, "Intrinsic", "b") -FFEINFO_WHERE (FFEINFO_whereCONSTANT, "Constant", "p") /* For kindFUNCTION, means statement function! */ -FFEINFO_WHERE (FFEINFO_whereCONSTANT_SUBOBJECT, "Const-subobj", "q") /* As in "'FOO'(I:J)". */ -FFEINFO_WHERE (FFEINFO_whereANY, "Any", "~") diff --git a/contrib/gcc/f/info.c b/contrib/gcc/f/info.c deleted file mode 100644 index 3c0030f..0000000 --- a/contrib/gcc/f/info.c +++ /dev/null @@ -1,303 +0,0 @@ -/* info.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 2002, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - An abstraction for information maintained on a per-operator and per- - operand basis in expression trees. - - Modifications: - 30-Aug-90 JCB 2.0 - Extensive rewrite for new cleaner approach. -*/ - -/* Include files. */ - -#include "proj.h" -#include "info.h" -#include "target.h" -#include "type.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - -static const char *const ffeinfo_basictype_string_[] -= -{ -#define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM, -#include "info-b.def" -#undef FFEINFO_BASICTYPE -}; -static const char *const ffeinfo_kind_message_[] -= -{ -#define FFEINFO_KIND(kwd,msgid,snam) msgid, -#include "info-k.def" -#undef FFEINFO_KIND -}; -static const char *const ffeinfo_kind_string_[] -= -{ -#define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM, -#include "info-k.def" -#undef FFEINFO_KIND -}; -static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype]; -static const char *const ffeinfo_kindtype_string_[] -= -{ - "", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "*", -}; -static const char *const ffeinfo_where_string_[] -= -{ -#define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM, -#include "info-w.def" -#undef FFEINFO_WHERE -}; -static ffetype ffeinfo_types_[FFEINFO_basictype][FFEINFO_kindtype]; - -/* Static functions (internal). */ - - -/* Internal macros. */ - - -/* ffeinfo_basictype_combine -- Combine two basictypes into highest rank type - - ffeinfoBasictype i, j, k; - k = ffeinfo_basictype_combine(i,j); - - Returns a type based on "standard" operation between two given types. */ - -ffeinfoBasictype -ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype r) -{ - assert (l < FFEINFO_basictype); - assert (r < FFEINFO_basictype); - return ffeinfo_combine_[l][r]; -} - -/* ffeinfo_basictype_string -- Return tiny string showing the basictype - - ffeinfoBasictype i; - printf("%s",ffeinfo_basictype_string(dt)); - - Returns the string based on the basic type. */ - -const char * -ffeinfo_basictype_string (ffeinfoBasictype basictype) -{ - if (basictype >= ARRAY_SIZE (ffeinfo_basictype_string_)) - return "?\?\?"; - return ffeinfo_basictype_string_[basictype]; -} - -/* ffeinfo_init_0 -- Initialize - - ffeinfo_init_0(); */ - -void -ffeinfo_init_0 (void) -{ - ffeinfoBasictype i; - ffeinfoBasictype j; - - assert (FFEINFO_basictype == ARRAY_SIZE (ffeinfo_basictype_string_)); - assert (FFEINFO_kind == ARRAY_SIZE (ffeinfo_kind_message_)); - assert (FFEINFO_kind == ARRAY_SIZE (ffeinfo_kind_string_)); - assert (FFEINFO_kindtype == ARRAY_SIZE (ffeinfo_kindtype_string_)); - assert (FFEINFO_where == ARRAY_SIZE (ffeinfo_where_string_)); - - /* Make array that, given two basic types, produces resulting basic type. */ - - for (i = 0; i < FFEINFO_basictype; ++i) - for (j = 0; j < FFEINFO_basictype; ++j) - if ((i == FFEINFO_basictypeANY) || (j == FFEINFO_basictypeANY)) - ffeinfo_combine_[i][j] = FFEINFO_basictypeANY; - else - ffeinfo_combine_[i][j] = FFEINFO_basictypeNONE; - -#define same(bt) ffeinfo_combine_[bt][bt] = bt -#define use2(bt1,bt2) ffeinfo_combine_[bt1][bt2] \ - = ffeinfo_combine_[bt2][bt1] = bt2 - - same (FFEINFO_basictypeINTEGER); - same (FFEINFO_basictypeLOGICAL); - same (FFEINFO_basictypeREAL); - same (FFEINFO_basictypeCOMPLEX); - same (FFEINFO_basictypeCHARACTER); - use2 (FFEINFO_basictypeINTEGER, FFEINFO_basictypeREAL); - use2 (FFEINFO_basictypeINTEGER, FFEINFO_basictypeCOMPLEX); - use2 (FFEINFO_basictypeREAL, FFEINFO_basictypeCOMPLEX); - -#undef same -#undef use2 -} - -/* ffeinfo_kind_message -- Return helpful string showing the kind - - ffeinfoKind kind; - printf("%s",ffeinfo_kind_message(kind)); - - Returns the string based on the kind. */ - -const char * -ffeinfo_kind_message (ffeinfoKind kind) -{ - if (kind >= ARRAY_SIZE (ffeinfo_kind_message_)) - return "?\?\?"; - return ffeinfo_kind_message_[kind]; -} - -/* ffeinfo_kind_string -- Return tiny string showing the kind - - ffeinfoKind kind; - printf("%s",ffeinfo_kind_string(kind)); - - Returns the string based on the kind. */ - -const char * -ffeinfo_kind_string (ffeinfoKind kind) -{ - if (kind >= ARRAY_SIZE (ffeinfo_kind_string_)) - return "?\?\?"; - return ffeinfo_kind_string_[kind]; -} - -ffeinfoKindtype -ffeinfo_kindtype_max(ffeinfoBasictype bt, - ffeinfoKindtype k1, - ffeinfoKindtype k2) -{ - if ((bt == FFEINFO_basictypeANY) - || (k1 == FFEINFO_kindtypeANY) - || (k2 == FFEINFO_kindtypeANY)) - return FFEINFO_kindtypeANY; - - if (ffetype_size (ffeinfo_types_[bt][k1]) - > ffetype_size (ffeinfo_types_[bt][k2])) - return k1; - return k2; -} - -/* ffeinfo_kindtype_string -- Return tiny string showing the kind type - - ffeinfoKindtype kind_type; - printf("%s",ffeinfo_kindtype_string(kind)); - - Returns the string based on the kind type. */ - -const char * -ffeinfo_kindtype_string (ffeinfoKindtype kind_type) -{ - if (kind_type >= ARRAY_SIZE (ffeinfo_kindtype_string_)) - return "?\?\?"; - return ffeinfo_kindtype_string_[kind_type]; -} - -void -ffeinfo_set_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype, - ffetype type) -{ - assert (basictype < FFEINFO_basictype); - assert (kindtype < FFEINFO_kindtype); - assert (ffeinfo_types_[basictype][kindtype] == NULL); - - ffeinfo_types_[basictype][kindtype] = type; -} - -ffetype -ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype) -{ - assert (basictype < FFEINFO_basictype); - assert (kindtype < FFEINFO_kindtype); - - return ffeinfo_types_[basictype][kindtype]; -} - -/* ffeinfo_where_string -- Return tiny string showing the where - - ffeinfoWhere where; - printf("%s",ffeinfo_where_string(where)); - - Returns the string based on the where. */ - -const char * -ffeinfo_where_string (ffeinfoWhere where) -{ - if (where >= ARRAY_SIZE (ffeinfo_where_string_)) - return "?\?\?"; - return ffeinfo_where_string_[where]; -} - -/* ffeinfo_new -- Return object representing datatype, kind, and where info - - ffeinfo i; - i = ffeinfo_new(FFEINFO_datatypeINTEGER,FFEINFO_kindSCALAR, - FFEINFO_whereLOCAL); - - Returns the string based on the data type. */ - -#ifndef __GNUC__ -ffeinfo -ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype, - ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where, - ffetargetCharacterSize size) -{ - ffeinfo i; - - i.basictype = basictype; - i.kindtype = kindtype; - i.rank = rank; - i.size = size; - i.kind = kind; - i.where = where; - i.size = size; - - return i; -} -#endif diff --git a/contrib/gcc/f/info.h b/contrib/gcc/f/info.h deleted file mode 100644 index 69defd2..0000000 --- a/contrib/gcc/f/info.h +++ /dev/null @@ -1,186 +0,0 @@ -/* info.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - info.c - - Modifications: - 30-Aug-90 JCB 2.0 - Extensive rewrite for new cleaner approach. -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_INFO_H -#define GCC_F_INFO_H - -/* Simple definitions and enumerations. */ - -typedef enum - { -#define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) KWD, -#include "info-b.def" -#undef FFEINFO_BASICTYPE - FFEINFO_basictype - } ffeinfoBasictype; - -typedef enum - { /* If these kindtypes aren't in size order, - change _kindtype_max. */ - FFEINFO_kindtypeNONE, - FFEINFO_kindtypeINTEGER1, - FFEINFO_kindtypeINTEGER2, - FFEINFO_kindtypeINTEGER3, - FFEINFO_kindtypeINTEGER4, - FFEINFO_kindtypeINTEGER5, - FFEINFO_kindtypeINTEGER6, - FFEINFO_kindtypeINTEGER7, - FFEINFO_kindtypeINTEGER8, - FFEINFO_kindtypeLOGICAL1 = 1, /* Ok to omit, but ok to overlap. */ - FFEINFO_kindtypeLOGICAL2, - FFEINFO_kindtypeLOGICAL3, - FFEINFO_kindtypeLOGICAL4, - FFEINFO_kindtypeLOGICAL5, - FFEINFO_kindtypeLOGICAL6, - FFEINFO_kindtypeLOGICAL7, - FFEINFO_kindtypeLOGICAL8, - FFEINFO_kindtypeREAL1 = 1, /* Ok to omit, but ok to overlap. */ - FFEINFO_kindtypeREAL2, - FFEINFO_kindtypeREAL3, - FFEINFO_kindtypeREAL4, - FFEINFO_kindtypeREAL5, - FFEINFO_kindtypeREAL6, - FFEINFO_kindtypeREAL7, - FFEINFO_kindtypeREAL8, - FFEINFO_kindtypeCHARACTER1 = 1, /* Ok to omit, but ok to overlap. */ - FFEINFO_kindtypeCHARACTER2, - FFEINFO_kindtypeCHARACTER3, - FFEINFO_kindtypeCHARACTER4, - FFEINFO_kindtypeCHARACTER5, - FFEINFO_kindtypeCHARACTER6, - FFEINFO_kindtypeCHARACTER7, - FFEINFO_kindtypeCHARACTER8, - FFEINFO_kindtypeANY, - FFEINFO_kindtype - } ffeinfoKindtype; - -typedef enum - { -#define FFEINFO_KIND(KWD,LNAM,SNAM) KWD, -#include "info-k.def" -#undef FFEINFO_KIND - FFEINFO_kind - } ffeinfoKind; - -typedef enum - { -#define FFEINFO_WHERE(KWD,LNAM,SNAM) KWD, -#include "info-w.def" -#undef FFEINFO_WHERE - FFEINFO_where - } ffeinfoWhere; - -/* Typedefs. */ - -typedef struct _ffeinfo_ ffeinfo; -typedef char ffeinfoRank; - -/* Include files needed by this one. */ - -#include "target.h" -#include "type.h" - -/* Structure definitions. */ - -struct _ffeinfo_ - { - ffeinfoBasictype basictype; - ffeinfoKindtype kindtype; - ffeinfoRank rank; - ffeinfoKind kind; - ffeinfoWhere where; - ffetargetCharacterSize size; - }; - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -ffeinfoBasictype ffeinfo_basictype_combine (ffeinfoBasictype l, - ffeinfoBasictype r); -const char *ffeinfo_basictype_string (ffeinfoBasictype basictype); -void ffeinfo_init_0 (void); -const char *ffeinfo_kind_message (ffeinfoKind kind); -const char *ffeinfo_kind_string (ffeinfoKind kind); -ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt, - ffeinfoKindtype k1, - ffeinfoKindtype k2); -const char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type); -const char *ffeinfo_where_string (ffeinfoWhere where); -ffeinfo ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype, - ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where, - ffetargetCharacterSize size); -void ffeinfo_set_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype, - ffetype type); -ffetype ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype); - -/* Define macros. */ - -#define ffeinfo_basictype(i) (i.basictype) -#define ffeinfo_init_1() -#define ffeinfo_init_2() -#define ffeinfo_init_3() -#define ffeinfo_init_4() -#define ffeinfo_kind(i) (i.kind) -#define ffeinfo_kindtype(i) (i.kindtype) -#ifdef __GNUC__ -#define ffeinfo_new(bt,kt,r,k,w,sz) \ - ((ffeinfo) {(bt), (kt), (r), (k), (w), (sz)}) -#endif -#define ffeinfo_new_any() \ - ffeinfo_new (FFEINFO_basictypeANY, FFEINFO_kindtypeANY, 0, \ - FFEINFO_kindANY, FFEINFO_whereANY, \ - FFETARGET_charactersizeNONE) -#define ffeinfo_new_null() \ - ffeinfo_new (FFEINFO_basictypeNONE, FFEINFO_kindtypeNONE, 0, \ - FFEINFO_kindNONE, FFEINFO_whereNONE, \ - FFETARGET_charactersizeNONE) -#define ffeinfo_rank(i) (i.rank) -#define ffeinfo_size(i) (i.size) -#define ffeinfo_terminate_0() -#define ffeinfo_terminate_1() -#define ffeinfo_terminate_2() -#define ffeinfo_terminate_3() -#define ffeinfo_terminate_4() -#define ffeinfo_use(i) i -#define ffeinfo_where(i) (i.where) - -#define FFEINFO_kindtypeINTEGERDEFAULT FFEINFO_kindtypeINTEGER1 -#define FFEINFO_kindtypeLOGICALDEFAULT FFEINFO_kindtypeLOGICAL1 -#define FFEINFO_kindtypeREALDEFAULT FFEINFO_kindtypeREAL1 -#define FFEINFO_kindtypeREALDOUBLE FFEINFO_kindtypeREAL2 -#define FFEINFO_kindtypeREALQUAD FFEINFO_kindtypeREAL3 -#define FFEINFO_kindtypeCHARACTERDEFAULT FFEINFO_kindtypeCHARACTER1 - -/* End of #include file. */ - -#endif /* ! GCC_F_INFO_H */ diff --git a/contrib/gcc/f/intdoc.c b/contrib/gcc/f/intdoc.c deleted file mode 100644 index b24c79a..0000000 --- a/contrib/gcc/f/intdoc.c +++ /dev/null @@ -1,1325 +0,0 @@ -/* intdoc.c - Copyright (C) 1997, 2000, 2001, 2003 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - -/* From f/proj.h, which uses #error -- not all C compilers - support that, and we want *this* program to be compilable - by pretty much any C compiler. */ -#include "bconfig.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "assert.h" - -/* Pull in the intrinsics info, but only the doc parts. */ -#define FFEINTRIN_DOC 1 -#include "intrin.h" - -const char *family_name (ffeintrinFamily family); -static void dumpif (ffeintrinFamily fam); -static void dumpendif (void); -static void dumpclearif (void); -static void dumpem (void); -static void dumpgen (int menu, const char *name, const char *name_uc, - ffeintrinGen gen); -static void dumpspec (int menu, const char *name, const char *name_uc, - ffeintrinSpec spec); -static void dumpimp (int menu, const char *name, const char *name_uc, size_t genno, ffeintrinFamily family, - ffeintrinImp imp, ffeintrinSpec spec); -static const char *argument_info_ptr (ffeintrinImp imp, int argno); -static const char *argument_info_string (ffeintrinImp imp, int argno); -static const char *argument_name_ptr (ffeintrinImp imp, int argno); -static const char *argument_name_string (ffeintrinImp imp, int argno); -#if 0 -static const char *elaborate_if_complex (ffeintrinImp imp, int argno); -static const char *elaborate_if_maybe_complex (ffeintrinImp imp, int argno); -static const char *elaborate_if_real (ffeintrinImp imp, int argno); -#endif -static void print_type_string (const char *c); - -int -main (int argc, char **argv ATTRIBUTE_UNUSED) -{ - if (argc != 1) - { - fprintf (stderr, "\ -Usage: intdoc > intdoc.texi\n\ - Collects and dumps documentation on g77 intrinsics\n\ - to the file named intdoc.texi.\n"); - exit (1); - } - - dumpem (); - return 0; -} - -struct _ffeintrin_name_ - { - const char *const name_uc; - const char *const name_lc; - const char *const name_ic; - const ffeintrinGen generic; - const ffeintrinSpec specific; - }; - -struct _ffeintrin_gen_ - { - const char *const name; /* Name as seen in program. */ - const ffeintrinSpec specs[2]; - }; - -struct _ffeintrin_spec_ - { - const char *const name; /* Uppercase name as seen in source code, - lowercase if no source name, "none" if no - name at all (NONE case). */ - const bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */ - const ffeintrinFamily family; - const ffeintrinImp implementation; - }; - -struct _ffeintrin_imp_ - { - const char *const name; /* Name of implementation. */ - const char *const control; - }; - -static const struct _ffeintrin_name_ names[] = { -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \ - { UPPER, LOWER, MIXED, FFEINTRIN_ ## GEN, FFEINTRIN_ ## SPEC }, -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - -static const struct _ffeintrin_gen_ gens[] = { -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) \ - { NAME, { SPEC1, SPEC2, }, }, -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - -static const struct _ffeintrin_imp_ imps[] = { -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \ - { NAME, CONTROL }, -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \ - { NAME, CONTROL }, -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - -static const struct _ffeintrin_spec_ specs[] = { -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \ - { NAME, CALLABLE, FAMILY, IMP, }, -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - -struct cc_pair { const ffeintrinImp imp; const char *const text; }; - -static const char *descriptions[FFEINTRIN_imp] = { 0 }; -static const struct cc_pair cc_descriptions[] = { -#define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, DESCRIPTION }, -#include "intdoc.h0" -#undef DEFDOC -}; - -static const char *summaries[FFEINTRIN_imp] = { 0 }; -static const struct cc_pair cc_summaries[] = { -#define DEFDOC(IMP,SUMMARY,DESCRIPTION) { FFEINTRIN_imp ## IMP, SUMMARY }, -#include "intdoc.h0" -#undef DEFDOC -}; - -const char * -family_name (ffeintrinFamily family) -{ - switch (family) - { - case FFEINTRIN_familyF77: - return "familyF77"; - - case FFEINTRIN_familyASC: - return "familyASC"; - - case FFEINTRIN_familyMIL: - return "familyMIL"; - - case FFEINTRIN_familyGNU: - return "familyGNU"; - - case FFEINTRIN_familyF90: - return "familyF90"; - - case FFEINTRIN_familyVXT: - return "familyVXT"; - - case FFEINTRIN_familyFVZ: - return "familyFVZ"; - - case FFEINTRIN_familyF2C: - return "familyF2C"; - - case FFEINTRIN_familyF2U: - return "familyF2U"; - - case FFEINTRIN_familyBADU77: - return "familyBADU77"; - - default: - assert ("bad family" == NULL); - return "??"; - } -} - -static int in_ifset = 0; -static ffeintrinFamily latest_family = FFEINTRIN_familyNONE; - -static void -dumpif (ffeintrinFamily fam) -{ - assert (fam != FFEINTRIN_familyNONE); - if ((in_ifset != 2) - || (fam != latest_family)) - { - if (in_ifset == 2) - printf ("@end ifset\n"); - latest_family = fam; - printf ("@ifset %s\n", family_name (fam)); - } - in_ifset = 1; -} - -static void -dumpendif (void) -{ - in_ifset = 2; -} - -static void -dumpclearif (void) -{ - if ((in_ifset == 2) - || (latest_family != FFEINTRIN_familyNONE)) - printf ("@end ifset\n"); - latest_family = FFEINTRIN_familyNONE; - in_ifset = 0; -} - -static void -dumpem (void) -{ - int i; - - for (i = 0; ((size_t) i) < ARRAY_SIZE (cc_descriptions); ++i) - { - assert (descriptions[cc_descriptions[i].imp] == NULL); - descriptions[cc_descriptions[i].imp] = cc_descriptions[i].text; - } - - for (i = 0; ((size_t) i) < ARRAY_SIZE (cc_summaries); ++i) - { - assert (summaries[cc_summaries[i].imp] == NULL); - summaries[cc_summaries[i].imp] = cc_summaries[i].text; - } - - printf ("@c This file is automatically derived from intdoc.c, intdoc.in,\n"); - printf ("@c ansify.c, intrin.def, and intrin.h. Edit those files instead.\n"); - printf ("@menu\n"); - for (i = 0; ((size_t) i) < ARRAY_SIZE (names); ++i) - { - if (names[i].generic != FFEINTRIN_genNONE) - dumpgen (1, names[i].name_ic, names[i].name_uc, - names[i].generic); - if (names[i].specific != FFEINTRIN_specNONE) - dumpspec (1, names[i].name_ic, names[i].name_uc, - names[i].specific); - } - dumpclearif (); - - printf ("@end menu\n\n"); - - for (i = 0; ((size_t) i) < ARRAY_SIZE (names); ++i) - { - if (names[i].generic != FFEINTRIN_genNONE) - dumpgen (0, names[i].name_ic, names[i].name_uc, - names[i].generic); - if (names[i].specific != FFEINTRIN_specNONE) - dumpspec (0, names[i].name_ic, names[i].name_uc, - names[i].specific); - } - dumpclearif (); -} - -static void -dumpgen (int menu, const char *name, const char *name_uc, ffeintrinGen gen) -{ - size_t i; - int total = 0; - - if (!menu) - { - for (i = 0; i < ARRAY_SIZE (gens[gen].specs); ++i) - { - if (gens[gen].specs[i] != FFEINTRIN_specNONE) - ++total; - } - } - - for (i = 0; i < ARRAY_SIZE (gens[gen].specs); ++i) - { - ffeintrinSpec spec; - size_t j; - - if ((spec = gens[gen].specs[i]) == FFEINTRIN_specNONE) - continue; - - dumpif (specs[spec].family); - dumpimp (menu, name, name_uc, i, specs[spec].family, specs[spec].implementation, - spec); - if (!menu && (total > 0)) - { - if (total == 1) - { - printf ("\ -For information on another intrinsic with the same name:\n"); - } - else - { - printf ("\ -For information on other intrinsics with the same name:\n"); - } - for (j = 0; j < ARRAY_SIZE (gens[gen].specs); ++j) - { - if (j == i) - continue; - if ((spec = gens[gen].specs[j]) == FFEINTRIN_specNONE) - continue; - printf ("@xref{%s Intrinsic (%s)}.\n", - name, specs[spec].name); - } - printf ("\n"); - } - dumpendif (); - } -} - -static void -dumpspec (int menu, const char *name, const char *name_uc, ffeintrinSpec spec) -{ - dumpif (specs[spec].family); - dumpimp (menu, name, name_uc, 0, specs[spec].family, specs[spec].implementation, - FFEINTRIN_specNONE); - dumpendif (); -} - -static void -dumpimp (int menu, const char *name, const char *name_uc, size_t genno, - ffeintrinFamily family, ffeintrinImp imp, ffeintrinSpec spec) -{ - const char *c; - bool subr; - const char *argc; - const char *argi; - int colon; - int argno; - - assert ((imp != FFEINTRIN_impNONE) || !genno); - - if (menu) - { - printf ("* %s Intrinsic", - name); - if (spec != FFEINTRIN_specNONE) - printf (" (%s)", specs[spec].name); /* See XYZZY1 below */ - printf ("::"); -#define INDENT_SUMMARY 24 - if ((imp == FFEINTRIN_impNONE) - || (summaries[imp] != NULL)) - { - int spaces = INDENT_SUMMARY - 14 - strlen (name); - const char *c; - - if (spec != FFEINTRIN_specNONE) - spaces -= (3 + strlen (specs[spec].name)); /* See XYZZY1 above */ - if (spaces < 1) - spaces = 1; - while (spaces--) - fputc (' ', stdout); - - if (imp == FFEINTRIN_impNONE) - { - printf ("(Reserved for future use.)\n"); - return; - } - - for (c = summaries[imp]; c[0] != '\0'; ++c) - { - if (c[0] == '@' && ISDIGIT (c[1])) - { - int argno = c[1] - '0'; - - c += 2; - while (ISDIGIT (c[0])) - { - argno = 10 * argno + (c[0] - '0'); - ++c; - } - assert (c[0] == '@'); - if (argno == 0) - printf ("%s", name); - else if (argno == 99) - { /* Yeah, this is a major kludge. */ - printf ("\n"); - spaces = INDENT_SUMMARY + 1; - while (spaces--) - fputc (' ', stdout); - } - else - printf ("%s", argument_name_string (imp, argno - 1)); - } - else - fputc (c[0], stdout); - } - } - printf ("\n"); - return; - } - - printf ("@node %s Intrinsic", name); - if (spec != FFEINTRIN_specNONE) - printf (" (%s)", specs[spec].name); - printf ("\n@subsubsection %s Intrinsic", name); - if (spec != FFEINTRIN_specNONE) - printf (" (%s)", specs[spec].name); - printf ("\n@cindex %s intrinsic\n@cindex intrinsics, %s\n", - name, name); - - if (imp == FFEINTRIN_impNONE) - { - printf ("\n\ -This intrinsic is not yet implemented.\n\ -The name is, however, reserved as an intrinsic.\n\ -Use @samp{EXTERNAL %s} to use this name for an\n\ -external procedure.\n\ -\n\ -", - name); - return; - } - - c = imps[imp].control; - subr = (c[0] == '-'); - colon = (c[2] == ':') ? 2 : 3; - - printf ("\n\ -@noindent\n\ -@example\n\ -%s%s(", - (subr ? "CALL " : ""), name); - - fflush (stdout); - - for (argno = 0; ; ++argno) - { - argc = argument_name_ptr (imp, argno); - if (argc == NULL) - break; - if (argno > 0) - printf (", "); - printf ("@var{%s}", argc); - argi = argument_info_string (imp, argno); - if ((argi[0] == '*') - || (argi[0] == 'n') - || (argi[0] == '+') - || (argi[0] == 'p')) - printf ("-1, @var{%s}-2, @dots{}, @var{%s}-n", - argc, argc); - } - - printf (")\n\ -@end example\n\ -\n\ -"); - - if (!subr) - { - int other_arg; - const char *arg_string; - const char *arg_info; - - if (ISDIGIT (c[colon + 1])) - { - other_arg = c[colon + 1] - '0'; - arg_string = argument_name_string (imp, other_arg); - arg_info = argument_info_string (imp, other_arg); - } - else - { - other_arg = -1; - arg_string = NULL; - arg_info = NULL; - } - - printf ("\ -@noindent\n\ -%s: ", name); - print_type_string (c); - printf (" function"); - - if ((c[0] == 'R') - && (c[1] == 'C')) - { - assert (other_arg >= 0); - - if ((arg_info[0] == '?') || (arg_info[0] == '!') || (arg_info[0] == '+') - || (arg_info[0] == '*') || (arg_info[0] == 'n') || (arg_info[0] == 'p')) - ++arg_info; - if ((arg_info[0] == 'F') || (arg_info[0] == 'N')) - printf (".\n\ -The exact type is @samp{REAL(KIND=1)} when argument @var{%s} is\n\ -any type other than @code{COMPLEX}, or when it is @code{COMPLEX(KIND=1)}.\n\ -When @var{%s} is any @code{COMPLEX} type other than @code{COMPLEX(KIND=1)},\n\ -this intrinsic is valid only when used as the argument to\n\ -@code{REAL()}, as explained below.\n\n", - arg_string, - arg_string); - else - printf (".\n\ -This intrinsic is valid when argument @var{%s} is\n\ -@code{COMPLEX(KIND=1)}.\n\ -When @var{%s} is any other @code{COMPLEX} type,\n\ -this intrinsic is valid only when used as the argument to\n\ -@code{REAL()}, as explained below.\n\n", - arg_string, - arg_string); - } -#if 0 - else if ((c[0] == 'I') - && (c[1] == '7')) - printf (", the exact type being wide enough to hold a pointer\n\ -on the target system (typically @code{INTEGER(KIND=1)} or @code{INTEGER(KIND=4)}).\n\n"); -#endif - else if (c[1] == '=' && ISDIGIT (c[colon + 1])) - { - assert (other_arg >= 0); - - if ((arg_info[0] == '?') || (arg_info[0] == '!') || (arg_info[0] == '+') - || (arg_info[0] == '*') || (arg_info[0] == 'n') || (arg_info[0] == 'p')) - ++arg_info; - - if (((c[0] == arg_info[0]) - && ((c[0] == 'A') || (c[0] == 'C') || (c[0] == 'I') - || (c[0] == 'L') || (c[0] == 'R'))) - || ((c[0] == 'R') - && (arg_info[0] == 'C')) - || ((c[0] == 'C') - && (arg_info[0] == 'R'))) - printf (", the @samp{KIND=} value of the type being that of argument @var{%s}.\n\n", - arg_string); - else if ((c[0] == 'S') - && ((arg_info[0] == 'C') - || (arg_info[0] == 'F') - || (arg_info[0] == 'N'))) - printf (".\n\ -The exact type depends on that of argument @var{%s}---if @var{%s} is\n\ -@code{COMPLEX}, this function's type is @code{REAL}\n\ -with the same @samp{KIND=} value as the type of @var{%s}.\n\ -Otherwise, this function's type is the same as that of @var{%s}.\n\n", - arg_string, arg_string, arg_string, arg_string); - else - printf (", the exact type being that of argument @var{%s}.\n\n", - arg_string); - } - else if ((c[1] == '=') - && (c[colon + 1] == '*')) - printf (", the exact type being the result of cross-promoting the\n\ -types of all the arguments.\n\n"); - else if (c[1] == '=') - assert ("?0:?:" == NULL); - else - printf (".\n\n"); - } - - for (argno = 0, argc = &c[colon + 3]; *argc != '\0'; ++argno) - { - char optionality = '\0'; - char extra = '\0'; - char basic; - char kind; - int length; - int elements; - - printf ("\ -@noindent\n\ -@var{"); - for (; ; ++argc) - { - if (argc[0] == '=') - break; - printf ("%c", *argc); - } - printf ("}: "); - - ++argc; - if ((*argc == '?') - || (*argc == '!') - || (*argc == '*') - || (*argc == '+') - || (*argc == 'n') - || (*argc == 'p')) - optionality = *(argc++); - basic = *(argc++); - kind = *(argc++); - if (*argc == '[') - { - length = *++argc - '0'; - if (*++argc != ']') - length = 10 * length + (*(argc++) - '0'); - ++argc; - } - else - length = -1; - if (*argc == '(') - { - elements = *++argc - '0'; - if (*++argc != ')') - elements = 10 * elements + (*(argc++) - '0'); - ++argc; - } - else if (*argc == '&') - { - elements = -1; - ++argc; - } - else - elements = 0; - if ((*argc == '&') - || (*argc == 'i') - || (*argc == 'w') - || (*argc == 'x')) - extra = *(argc++); - if (*argc == ',') - ++argc; - - switch (basic) - { - case '-': - switch (kind) - { - case '*': - printf ("Any type"); - break; - - default: - assert ("kind arg" == NULL); - break; - } - break; - - case 'A': - assert ((kind == '1') || (kind == '*')); - printf ("@code{CHARACTER"); - if (length != -1) - printf ("*%d", length); - printf ("}"); - break; - - case 'C': - switch (kind) - { - case '*': - printf ("@code{COMPLEX}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{COMPLEX(KIND=%d)}", (kind - '0')); - break; - - case 'A': - printf ("Same @samp{KIND=} value as for @var{%s}", - argument_name_string (imp, 0)); - break; - - default: - assert ("Ca" == NULL); - break; - } - break; - - case 'I': - switch (kind) - { - case '*': - printf ("@code{INTEGER}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)}", (kind - '0')); - break; - - case 'A': - printf ("@code{INTEGER} with same @samp{KIND=} value as for @var{%s}", - argument_name_string (imp, 0)); - break; - - case 'N': - printf ("@code{INTEGER} not wider than the default kind"); - break; - - default: - assert ("Ia" == NULL); - break; - } - break; - - case 'L': - switch (kind) - { - case '*': - printf ("@code{LOGICAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{LOGICAL(KIND=%d)}", (kind - '0')); - break; - - case 'A': - printf ("@code{LOGICAL} with same @samp{KIND=} value as for @var{%s}", - argument_name_string (imp, 0)); - break; - - case 'N': - printf ("@code{LOGICAL} not wider than the default kind"); - break; - - default: - assert ("La" == NULL); - break; - } - break; - - case 'R': - switch (kind) - { - case '*': - printf ("@code{REAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{REAL(KIND=%d)}", (kind - '0')); - break; - - case 'A': - printf ("@code{REAL} with same @samp{KIND=} value as for @var{%s}", - argument_name_string (imp, 0)); - break; - - default: - assert ("Ra" == NULL); - break; - } - break; - - case 'B': - switch (kind) - { - case '*': - printf ("@code{INTEGER} or @code{LOGICAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}", - (kind - '0'), (kind - '0')); - break; - - case 'A': - printf ("Same type and @samp{KIND=} value as for @var{%s}", - argument_name_string (imp, 0)); - break; - - case 'N': - printf ("@code{INTEGER} or @code{LOGICAL} not wider than the default kind"); - break; - - default: - assert ("Ba" == NULL); - break; - } - break; - - case 'F': - switch (kind) - { - case '*': - printf ("@code{REAL} or @code{COMPLEX}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}", - (kind - '0'), (kind - '0')); - break; - - case 'A': - printf ("Same type as @var{%s}", - argument_name_string (imp, 0)); - break; - - default: - assert ("Fa" == NULL); - break; - } - break; - - case 'N': - switch (kind) - { - case '*': - printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}", - (kind - '0'), (kind - '0'), (kind - '0')); - break; - - default: - assert ("N1" == NULL); - break; - } - break; - - case 'S': - switch (kind) - { - case '*': - printf ("@code{INTEGER} or @code{REAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}", - (kind - '0'), (kind - '0')); - break; - - case 'A': - printf ("@code{INTEGER} or @code{REAL} with same @samp{KIND=} value as for @var{%s}", - argument_name_string (imp, 0)); - break; - - default: - assert ("Sa" == NULL); - break; - } - break; - - case 'g': - printf ("@samp{*@var{label}}, where @var{label} is the label\n\ -of an executable statement"); - break; - - case 's': - printf ("Signal handler (@code{INTEGER FUNCTION} or @code{SUBROUTINE})\n\ -or dummy/global @code{INTEGER(KIND=1)} scalar"); - break; - - default: - assert ("arg type?" == NULL); - break; - } - - switch (optionality) - { - case '\0': - break; - - case '!': - printf ("; OPTIONAL (must be omitted if @var{%s} is @code{COMPLEX})", - argument_name_string (imp, argno-1)); - break; - - case '?': - printf ("; OPTIONAL"); - break; - - case '*': - printf ("; OPTIONAL"); - break; - - case 'n': - case '+': - break; - - case 'p': - printf ("; at least two such arguments must be provided"); - break; - - default: - assert ("optionality!" == NULL); - break; - } - - switch (elements) - { - case -1: - break; - - case 0: - if ((basic != 'g') - && (basic != 's')) - printf ("; scalar"); - break; - - default: - assert (extra != '\0'); - printf ("; DIMENSION(%d)", elements); - break; - } - - switch (extra) - { - case '\0': - if ((basic != 'g') - && (basic != 's')) - printf ("; INTENT(IN)"); - break; - - case 'i': - break; - - case '&': - printf ("; cannot be a constant or expression"); - break; - - case 'w': - printf ("; INTENT(OUT)"); - break; - - case 'x': - printf ("; INTENT(INOUT)"); - break; - } - - printf (".\n\n"); - } - - printf ("\ -@noindent\n\ -Intrinsic groups: "); - switch (family) - { - case FFEINTRIN_familyF77: - printf ("(standard FORTRAN 77)."); - break; - - case FFEINTRIN_familyGNU: - printf ("@code{gnu}."); - break; - - case FFEINTRIN_familyASC: - printf ("@code{f2c}, @code{f90}."); - break; - - case FFEINTRIN_familyMIL: - printf ("@code{mil}, @code{f90}, @code{vxt}."); - break; - - case FFEINTRIN_familyF90: - printf ("@code{f90}."); - break; - - case FFEINTRIN_familyVXT: - printf ("@code{vxt}."); - break; - - case FFEINTRIN_familyFVZ: - printf ("@code{f2c}, @code{vxt}."); - break; - - case FFEINTRIN_familyF2C: - printf ("@code{f2c}."); - break; - - case FFEINTRIN_familyF2U: - printf ("@code{unix}."); - break; - - case FFEINTRIN_familyBADU77: - printf ("@code{badu77}."); - break; - - default: - assert ("bad family" == NULL); - printf ("@code{???}."); - break; - } - printf ("\n\n"); - - if (descriptions[imp] != NULL) - { - const char *c = descriptions[imp]; - - printf ("\ -@noindent\n\ -Description:\n\ -\n"); - - while (c[0] != '\0') - { - if (c[0] == '@' && ISDIGIT (c[1])) - { - int argno = c[1] - '0'; - - c += 2; - while (ISDIGIT (c[0])) - { - argno = 10 * argno + (c[0] - '0'); - ++c; - } - assert (c[0] == '@'); - if (argno == 0) - printf ("%s", name_uc); - else - printf ("%s", argument_name_string (imp, argno - 1)); - } - else - fputc (c[0], stdout); - ++c; - } - - printf ("\n"); - } -} - -static const char * -argument_info_ptr (ffeintrinImp imp, int argno) -{ - const char *c = imps[imp].control; - static char arginfos[8][32]; - static int argx = 0; - int i; - - if (c[2] == ':') - c += 5; - else - c += 6; - - while (argno--) - { - while ((c[0] != ',') && (c[0] != '\0')) - ++c; - if (c[0] != ',') - break; - ++c; - } - - if (c[0] == '\0') - return NULL; - - for (; (c[0] != '=') && (c[0] != '\0'); ++c) - ; - - assert (c[0] == '='); - - for (i = 0, ++c; (c[0] != ',') && (c[0] != '\0'); ++c, ++i) - arginfos[argx][i] = c[0]; - - arginfos[argx][i] = '\0'; - - c = &arginfos[argx][0]; - ++argx; - if (((size_t) argx) >= ARRAY_SIZE (arginfos)) - argx = 0; - - return c; -} - -static const char * -argument_info_string (ffeintrinImp imp, int argno) -{ - const char *p; - - p = argument_info_ptr (imp, argno); - assert (p != NULL); - return p; -} - -static const char * -argument_name_ptr (ffeintrinImp imp, int argno) -{ - const char *c = imps[imp].control; - static char argnames[8][32]; - static int argx = 0; - int i; - - if (c[2] == ':') - c += 5; - else - c += 6; - - while (argno--) - { - while ((c[0] != ',') && (c[0] != '\0')) - ++c; - if (c[0] != ',') - break; - ++c; - } - - if (c[0] == '\0') - return NULL; - - for (i = 0; (c[0] != '=') && (c[0] != '\0'); ++c, ++i) - argnames[argx][i] = c[0]; - - assert (c[0] == '='); - argnames[argx][i] = '\0'; - - c = &argnames[argx][0]; - ++argx; - if (((size_t) argx) >= ARRAY_SIZE (argnames)) - argx = 0; - - return c; -} - -static const char * -argument_name_string (ffeintrinImp imp, int argno) -{ - const char *p; - - p = argument_name_ptr (imp, argno); - assert (p != NULL); - return p; -} - -static void -print_type_string (const char *c) -{ - char basic = c[0]; - char kind = c[1]; - - switch (basic) - { - case 'A': - assert ((kind == '1') || (kind == '=')); - if (c[2] == ':') - printf ("@code{CHARACTER*1}"); - else - { - assert (c[2] == '*'); - printf ("@code{CHARACTER*(*)}"); - } - break; - - case 'C': - switch (kind) - { - case '=': - printf ("@code{COMPLEX}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{COMPLEX(KIND=%d)}", (kind - '0')); - break; - - default: - assert ("Ca" == NULL); - break; - } - break; - - case 'I': - switch (kind) - { - case '=': - printf ("@code{INTEGER}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)}", (kind - '0')); - break; - - default: - assert ("Ia" == NULL); - break; - } - break; - - case 'L': - switch (kind) - { - case '=': - printf ("@code{LOGICAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{LOGICAL(KIND=%d)}", (kind - '0')); - break; - - default: - assert ("La" == NULL); - break; - } - break; - - case 'R': - switch (kind) - { - case '=': - printf ("@code{REAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{REAL(KIND=%d)}", (kind - '0')); - break; - - case 'C': - printf ("@code{REAL}"); - break; - - default: - assert ("Ra" == NULL); - break; - } - break; - - case 'B': - switch (kind) - { - case '=': - printf ("@code{INTEGER} or @code{LOGICAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)} or @code{LOGICAL(KIND=%d)}", - (kind - '0'), (kind - '0')); - break; - - default: - assert ("Ba" == NULL); - break; - } - break; - - case 'F': - switch (kind) - { - case '=': - printf ("@code{REAL} or @code{COMPLEX}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{REAL(KIND=%d)} or @code{COMPLEX(KIND=%d)}", - (kind - '0'), (kind - '0')); - break; - - default: - assert ("Fa" == NULL); - break; - } - break; - - case 'N': - switch (kind) - { - case '=': - printf ("@code{INTEGER}, @code{REAL}, or @code{COMPLEX}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)}, @code{REAL(KIND=%d)}, or @code{COMPLEX(KIND=%d)}", - (kind - '0'), (kind - '0'), (kind - '0')); - break; - - default: - assert ("N1" == NULL); - break; - } - break; - - case 'S': - switch (kind) - { - case '=': - printf ("@code{INTEGER} or @code{REAL}"); - break; - - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - printf ("@code{INTEGER(KIND=%d)} or @code{REAL(KIND=%d)}", - (kind - '0'), (kind - '0')); - break; - - default: - assert ("Sa" == NULL); - break; - } - break; - - default: - assert ("type?" == NULL); - break; - } -} diff --git a/contrib/gcc/f/intdoc.in b/contrib/gcc/f/intdoc.in deleted file mode 100644 index 6f2423f..0000000 --- a/contrib/gcc/f/intdoc.in +++ /dev/null @@ -1,2705 +0,0 @@ -/* Copyright (C) 1997, 1999, 2003 Free Software Foundation, Inc. - * This is part of the G77 manual. - * For copying conditions, see the file g77.texi. */ - -/* This is the file containing the verbage for the - intrinsics. It consists of a data base built up - via DEFDOC macros of the form: - - DEFDOC (IMP, SUMMARY, DESCRIPTION) - - IMP is the implementation keyword used in the intrin module. - SUMMARY is the short summary to go in the "* Menu:" section - of the Info document. DESCRIPTION is the longer description - to go in the documentation itself. - - Note that IMP is leveraged across multiple intrinsic names. - - To make for more accurate and consistent documentation, - the translation made by intdoc.c of the text in SUMMARY - and DESCRIPTION includes the special sequence - - @ARGNO@ - - where ARGNO is a series of digits forming a number that - is substituted by intdoc.c as follows: - - 0 The initial-caps form of the intrinsic name (e.g. Float). - 1-98 The initial-caps form of the ARGNO'th argument. - 99 (SUMMARY only) a newline plus the appropriate # of spaces. - - Hope this info is enough to encourage people to feel free to - add documentation to this file! - -*/ - -#define ARCHAIC(upper,mixed) \ - "Archaic form of @code{" #upper "()} that is specific\n\ -to one type for @var{@1@}.\n\ -@xref{" #mixed " Intrinsic}.\n" - -#define ARCHAIC_2nd(upper,mixed) \ - "Archaic form of @code{" #upper "()} that is specific\n\ -to one type for @var{@2@}.\n\ -@xref{" #mixed " Intrinsic}.\n" - -#define ARCHAIC_2(upper,mixed) \ - "Archaic form of @code{" #upper "()} that is specific\n\ -to one type for @var{@1@} and @var{@2@}.\n\ -@xref{" #mixed " Intrinsic}.\n" - -DEFDOC (ABS, "Absolute value.", "\ -Returns the absolute value of @var{@1@}. - -If @var{@1@} is type @code{COMPLEX}, the absolute -value is computed as: - -@example -SQRT(REALPART(@var{@1@})**2+IMAGPART(@var{@1@})**2) -@end example - -@noindent -Otherwise, it is computed by negating @var{@1@} if -it is negative, or returning @var{@1@}. - -@xref{Sign Intrinsic}, for how to explicitly -compute the positive or negative form of the absolute -value of an expression. -") - -DEFDOC (CABS, "Absolute value (archaic).", ARCHAIC (ABS, Abs)) - -DEFDOC (DABS, "Absolute value (archaic).", ARCHAIC (ABS, Abs)) - -DEFDOC (IABS, "Absolute value (archaic).", ARCHAIC (ABS, Abs)) - -DEFDOC (CDABS, "Absolute value (archaic).", ARCHAIC (ABS, Abs)) - -DEFDOC (ACHAR, "ASCII character from code.", "\ -Returns the ASCII character corresponding to the -code specified by @var{@1@}. - -@xref{IAChar Intrinsic}, for the inverse of this function. - -@xref{Char Intrinsic}, for the function corresponding -to the system's native character set. -") - -DEFDOC (IACHAR, "ASCII code for character.", "\ -Returns the code for the ASCII character in the -first character position of @var{@1@}. - -@xref{AChar Intrinsic}, for the inverse of this function. - -@xref{IChar Intrinsic}, for the function corresponding -to the system's native character set. -") - -DEFDOC (CHAR, "Character from code.", "\ -Returns the character corresponding to the -code specified by @var{@1@}, using the system's -native character set. - -Because the system's native character set is used, -the correspondence between character and their codes -is not necessarily the same between GNU Fortran -implementations. - -Note that no intrinsic exists to convert a numerical -value to a printable character string. -For example, there is no intrinsic that, given -an @code{INTEGER} or @code{REAL} argument with the -value @samp{154}, returns the @code{CHARACTER} -result @samp{'154'}. - -Instead, you can use internal-file I/O to do this kind -of conversion. -For example: - -@smallexample -INTEGER VALUE -CHARACTER*10 STRING -VALUE = 154 -WRITE (STRING, '(I10)'), VALUE -PRINT *, STRING -END -@end smallexample - -The above program, when run, prints: - -@smallexample - 154 -@end smallexample - -@xref{IChar Intrinsic}, for the inverse of the @code{@0@} function. - -@xref{AChar Intrinsic}, for the function corresponding -to the ASCII character set. -") - -DEFDOC (ICHAR, "Code for character.", "\ -Returns the code for the character in the -first character position of @var{@1@}. - -Because the system's native character set is used, -the correspondence between character and their codes -is not necessarily the same between GNU Fortran -implementations. - -Note that no intrinsic exists to convert a printable -character string to a numerical value. -For example, there is no intrinsic that, given -the @code{CHARACTER} value @samp{'154'}, returns an -@code{INTEGER} or @code{REAL} value with the value @samp{154}. - -Instead, you can use internal-file I/O to do this kind -of conversion. -For example: - -@smallexample -INTEGER VALUE -CHARACTER*10 STRING -STRING = '154' -READ (STRING, '(I10)'), VALUE -PRINT *, VALUE -END -@end smallexample - -The above program, when run, prints: - -@smallexample - 154 -@end smallexample - -@xref{Char Intrinsic}, for the inverse of the @code{@0@} function. - -@xref{IAChar Intrinsic}, for the function corresponding -to the ASCII character set. -") - -DEFDOC (ACOS, "Arc cosine.", "\ -Returns the arc-cosine (inverse cosine) of @var{@1@} -in radians. - -@xref{Cos Intrinsic}, for the inverse of this function. -") - -DEFDOC (DACOS, "Arc cosine (archaic).", ARCHAIC (ACOS, ACos)) - -DEFDOC (AIMAG, "Convert/extract imaginary part of complex.", "\ -Returns the (possibly converted) imaginary part of @var{@1@}. - -Use of @code{@0@()} with an argument of a type -other than @code{COMPLEX(KIND=1)} is restricted to the following case: - -@example -REAL(AIMAG(@1@)) -@end example - -@noindent -This expression converts the imaginary part of @1@ to -@code{REAL(KIND=1)}. - -@xref{REAL() and AIMAG() of Complex}, for more information. -") - -DEFDOC (DIMAG, "Convert/extract imaginary part of complex (archaic).", ARCHAIC (AIMAG, AImag)) - -DEFDOC (AINT, "Truncate to whole number.", "\ -Returns @var{@1@} with the fractional portion of its -magnitude truncated and its sign preserved. -(Also called ``truncation towards zero''.) - -@xref{ANInt Intrinsic}, for how to round to nearest -whole number. - -@xref{Int Intrinsic}, for how to truncate and then convert -number to @code{INTEGER}. -") - -DEFDOC (DINT, "Truncate to whole number (archaic).", ARCHAIC (AINT, AInt)) - -DEFDOC (INT, "Convert to @code{INTEGER} value truncated@99@to whole number.", "\ -Returns @var{@1@} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=1)}. - -If @var{@1@} is type @code{COMPLEX}, its real part is -truncated and converted, and its imaginary part is disregarded. - -@xref{NInt Intrinsic}, for how to convert, rounded to nearest -whole number. - -@xref{AInt Intrinsic}, for how to truncate to whole number -without converting. -") - -DEFDOC (IDINT, "Convert to @code{INTEGER} value truncated@99@to whole number (archaic).", ARCHAIC (INT, Int)) - -DEFDOC (ANINT, "Round to nearest whole number.", "\ -Returns @var{@1@} with the fractional portion of its -magnitude eliminated by rounding to the nearest whole -number and with its sign preserved. - -A fractional portion exactly equal to -@samp{.5} is rounded to the whole number that -is larger in magnitude. -(Also called ``Fortran round''.) - -@xref{AInt Intrinsic}, for how to truncate to -whole number. - -@xref{NInt Intrinsic}, for how to round and then convert -number to @code{INTEGER}. -") - -DEFDOC (DNINT, "Round to nearest whole number (archaic).", ARCHAIC (ANINT, ANInt)) - -DEFDOC (NINT, "Convert to @code{INTEGER} value rounded@99@to nearest whole number.", "\ -Returns @var{@1@} with the fractional portion of its -magnitude eliminated by rounding to the nearest whole -number and with its sign preserved, converted -to type @code{INTEGER(KIND=1)}. - -If @var{@1@} is type @code{COMPLEX}, its real part is -rounded and converted. - -A fractional portion exactly equal to -@samp{.5} is rounded to the whole number that -is larger in magnitude. -(Also called ``Fortran round''.) - -@xref{Int Intrinsic}, for how to convert, truncate to -whole number. - -@xref{ANInt Intrinsic}, for how to round to nearest whole number -without converting. -") - -DEFDOC (IDNINT, "Convert to @code{INTEGER} value rounded@99@to nearest whole number (archaic).", ARCHAIC (NINT, NInt)) - -DEFDOC (LOG, "Natural logarithm.", "\ -Returns the natural logarithm of @var{@1@}, which must -be greater than zero or, if type @code{COMPLEX}, must not -be zero. - -@xref{Exp Intrinsic}, for the inverse of this function. - -@xref{Log10 Intrinsic}, for the `common' (base-10) logarithm function. -") - -DEFDOC (ALOG, "Natural logarithm (archaic).", ARCHAIC (LOG, Log)) - -DEFDOC (CLOG, "Natural logarithm (archaic).", ARCHAIC (LOG, Log)) - -DEFDOC (DLOG, "Natural logarithm (archaic).", ARCHAIC (LOG, Log)) - -DEFDOC (CDLOG, "Natural logarithm (archaic).", ARCHAIC (LOG, Log)) - -DEFDOC (LOG10, "Common logarithm.", "\ -Returns the common logarithm (base 10) of @var{@1@}, which must -be greater than zero. - -The inverse of this function is @samp{10. ** LOG10(@var{@1@})}. - -@xref{Log Intrinsic}, for the natural logarithm function. -") - -DEFDOC (ALOG10, "Common logarithm (archaic).", ARCHAIC (LOG10, Log10)) - -DEFDOC (DLOG10, "Common logarithm (archaic).", ARCHAIC (LOG10, Log10)) - -DEFDOC (MAX, "Maximum value.", "\ -Returns the argument with the largest value. - -@xref{Min Intrinsic}, for the opposite function. -") - -DEFDOC (AMAX0, "Maximum value (archaic).", "\ -Archaic form of @code{MAX()} that is specific -to one type for @var{@1@} and a different return type. -@xref{Max Intrinsic}. -") - -DEFDOC (AMAX1, "Maximum value (archaic).", ARCHAIC (MAX, Max)) - -DEFDOC (DMAX1, "Maximum value (archaic).", ARCHAIC (MAX, Max)) - -DEFDOC (MAX0, "Maximum value (archaic).", ARCHAIC (MAX, Max)) - -DEFDOC (MAX1, "Maximum value (archaic).", "\ -Archaic form of @code{MAX()} that is specific -to one type for @var{@1@} and a different return type. -@xref{Max Intrinsic}. -") - -DEFDOC (MIN, "Minimum value.", "\ -Returns the argument with the smallest value. - -@xref{Max Intrinsic}, for the opposite function. -") - -DEFDOC (AMIN0, "Minimum value (archaic).", "\ -Archaic form of @code{MIN()} that is specific -to one type for @var{@1@} and a different return type. -@xref{Min Intrinsic}. -") - -DEFDOC (AMIN1, "Minimum value (archaic).", ARCHAIC (MIN, Min)) - -DEFDOC (DMIN1, "Minimum value (archaic).", ARCHAIC (MIN, Min)) - -DEFDOC (MIN0, "Minimum value (archaic).", ARCHAIC (MIN, Min)) - -DEFDOC (MIN1, "Minimum value (archaic).", "\ -Archaic form of @code{MIN()} that is specific -to one type for @var{@1@} and a different return type. -@xref{Min Intrinsic}. -") - -DEFDOC (MOD, "Remainder.", "\ -Returns remainder calculated as: - -@smallexample -@var{@1@} - (INT(@var{@1@} / @var{@2@}) * @var{@2@}) -@end smallexample - -@var{@2@} must not be zero. -") - -DEFDOC (AMOD, "Remainder (archaic).", ARCHAIC (MOD, Mod)) - -DEFDOC (DMOD, "Remainder (archaic).", ARCHAIC (MOD, Mod)) - -DEFDOC (AND, "Boolean AND.", "\ -Returns value resulting from boolean AND of -pair of bits in each of @var{@1@} and @var{@2@}. -") - -DEFDOC (IAND, "Boolean AND.", "\ -Returns value resulting from boolean AND of -pair of bits in each of @var{@1@} and @var{@2@}. -") - -DEFDOC (OR, "Boolean OR.", "\ -Returns value resulting from boolean OR of -pair of bits in each of @var{@1@} and @var{@2@}. -") - -DEFDOC (IOR, "Boolean OR.", "\ -Returns value resulting from boolean OR of -pair of bits in each of @var{@1@} and @var{@2@}. -") - -DEFDOC (XOR, "Boolean XOR.", "\ -Returns value resulting from boolean exclusive-OR of -pair of bits in each of @var{@1@} and @var{@2@}. -") - -DEFDOC (IEOR, "Boolean XOR.", "\ -Returns value resulting from boolean exclusive-OR of -pair of bits in each of @var{@1@} and @var{@2@}. -") - -DEFDOC (NOT, "Boolean NOT.", "\ -Returns value resulting from boolean NOT of each bit -in @var{@1@}. -") - -DEFDOC (ASIN, "Arc sine.", "\ -Returns the arc-sine (inverse sine) of @var{@1@} -in radians. - -@xref{Sin Intrinsic}, for the inverse of this function. -") - -DEFDOC (DASIN, "Arc sine (archaic).", ARCHAIC (ASIN, ASin)) - -DEFDOC (ATAN, "Arc tangent.", "\ -Returns the arc-tangent (inverse tangent) of @var{@1@} -in radians. - -@xref{Tan Intrinsic}, for the inverse of this function. -") - -DEFDOC (DATAN, "Arc tangent (archaic).", ARCHAIC (ATAN, ATan)) - -DEFDOC (ATAN2, "Arc tangent.", "\ -Returns the arc-tangent (inverse tangent) of the complex -number (@var{@1@}, @var{@2@}) in radians. - -@xref{Tan Intrinsic}, for the inverse of this function. -") - -DEFDOC (DATAN2, "Arc tangent (archaic).", ARCHAIC_2 (ATAN2, ATan2)) - -DEFDOC (BIT_SIZE, "Number of bits in argument's type.", "\ -Returns the number of bits (integer precision plus sign bit) -represented by the type for @var{@1@}. - -@xref{BTest Intrinsic}, for how to test the value of a -bit in a variable or array. - -@xref{IBSet Intrinsic}, for how to set a bit in a variable to 1. - -@xref{IBClr Intrinsic}, for how to set a bit in a variable to 0. - -") - -DEFDOC (BTEST, "Test bit.", "\ -Returns @code{.TRUE.} if bit @var{@2@} in @var{@1@} is -1, @code{.FALSE.} otherwise. - -(Bit 0 is the low-order (rightmost) bit, adding the value -@ifinfo -2**0, -@end ifinfo -@iftex -@tex -$2^0$, -@end tex -@end iftex -or 1, -to the number if set to 1; -bit 1 is the next-higher-order bit, adding -@ifinfo -2**1, -@end ifinfo -@iftex -@tex -$2^1$, -@end tex -@end iftex -or 2; -bit 2 adds -@ifinfo -2**2, -@end ifinfo -@iftex -@tex -$2^2$, -@end tex -@end iftex -or 4; and so on.) - -@xref{Bit_Size Intrinsic}, for how to obtain the number of bits -in a type. -The leftmost bit of @var{@1@} is @samp{BIT_SIZE(@var{@1@}-1)}. -") - -DEFDOC (CMPLX, "Construct @code{COMPLEX(KIND=1)} value.", "\ -If @var{@1@} is not type @code{COMPLEX}, -constructs a value of type @code{COMPLEX(KIND=1)} from the -real and imaginary values specified by @var{@1@} and -@var{@2@}, respectively. -If @var{@2@} is omitted, @samp{0.} is assumed. - -If @var{@1@} is type @code{COMPLEX}, -converts it to type @code{COMPLEX(KIND=1)}. - -@xref{Complex Intrinsic}, for information on easily constructing -a @code{COMPLEX} value of arbitrary precision from @code{REAL} -arguments. -") - -DEFDOC (DCMPLX, "Construct @code{COMPLEX(KIND=2)} value.", "\ -If @var{@1@} is not type @code{COMPLEX}, -constructs a value of type @code{COMPLEX(KIND=2)} from the -real and imaginary values specified by @var{@1@} and -@var{@2@}, respectively. -If @var{@2@} is omitted, @samp{0D0} is assumed. - -If @var{@1@} is type @code{COMPLEX}, -converts it to type @code{COMPLEX(KIND=2)}. - -Although this intrinsic is not standard Fortran, -it is a popular extension offered by many compilers -that support @code{DOUBLE COMPLEX}, since it offers -the easiest way to convert to @code{DOUBLE COMPLEX} -without using Fortran 90 features (such as the @samp{KIND=} -argument to the @code{CMPLX()} intrinsic). - -(@samp{CMPLX(0D0, 0D0)} returns a single-precision -@code{COMPLEX} result, as required by standard FORTRAN 77. -That's why so many compilers provide @code{DCMPLX()}, since -@samp{DCMPLX(0D0, 0D0)} returns a @code{DOUBLE COMPLEX} -result. -Still, @code{DCMPLX()} converts even @code{REAL*16} arguments -to their @code{REAL*8} equivalents in most dialects of -Fortran, so neither it nor @code{CMPLX()} allow easy -construction of arbitrary-precision values without -potentially forcing a conversion involving extending or -reducing precision. -GNU Fortran provides such an intrinsic, called @code{COMPLEX()}.) - -@xref{Complex Intrinsic}, for information on easily constructing -a @code{COMPLEX} value of arbitrary precision from @code{REAL} -arguments. -") - -DEFDOC (CONJG, "Complex conjugate.", "\ -Returns the complex conjugate: - -@example -COMPLEX(REALPART(@var{@1@}), -IMAGPART(@var{@1@})) -@end example -") - -DEFDOC (DCONJG, "Complex conjugate (archaic).", ARCHAIC (CONJG, Conjg)) - -DEFDOC (COS, "Cosine.", "\ -Returns the cosine of @var{@1@}, an angle measured -in radians. - -@xref{ACos Intrinsic}, for the inverse of this function. -") - -DEFDOC (CCOS, "Cosine (archaic).", ARCHAIC (COS, Cos)) - -DEFDOC (DCOS, "Cosine (archaic).", ARCHAIC (COS, Cos)) - -DEFDOC (CDCOS, "Cosine (archaic).", ARCHAIC (COS, Cos)) - -DEFDOC (COSH, "Hyperbolic cosine.", "\ -Returns the hyperbolic cosine of @var{@1@}. -") - -DEFDOC (DCOSH, "Hyperbolic cosine (archaic).", ARCHAIC (COSH, CosH)) - -DEFDOC (SQRT, "Square root.", "\ -Returns the square root of @var{@1@}, which must -not be negative. - -To calculate and represent the square root of a negative -number, complex arithmetic must be used. -For example, @samp{SQRT(COMPLEX(@var{@1@}))}. - -The inverse of this function is @samp{SQRT(@var{@1@}) * SQRT(@var{@1@})}. -") - -DEFDOC (CSQRT, "Square root (archaic).", ARCHAIC (SQRT, SqRt)) - -DEFDOC (DSQRT, "Square root (archaic).", ARCHAIC (SQRT, SqRt)) - -DEFDOC (CDSQRT, "Square root (archaic).", ARCHAIC (SQRT, SqRt)) - -DEFDOC (DBLE, "Convert to double precision.", "\ -Returns @var{@1@} converted to double precision -(@code{REAL(KIND=2)}). -If @var{@1@} is @code{COMPLEX}, the real part of -@var{@1@} is used for the conversion -and the imaginary part disregarded. - -@xref{Sngl Intrinsic}, for the function that converts -to single precision. - -@xref{Int Intrinsic}, for the function that converts -to @code{INTEGER}. - -@xref{Complex Intrinsic}, for the function that converts -to @code{COMPLEX}. -") - -DEFDOC (DIM, "Difference magnitude (non-negative subtract).", "\ -Returns @samp{@var{@1@}-@var{@2@}} if @var{@1@} is greater than -@var{@2@}; otherwise returns zero. -") - -DEFDOC (DDIM, "Difference magnitude (archaic).", ARCHAIC_2 (DIM, DiM)) -DEFDOC (IDIM, "Difference magnitude (archaic).", ARCHAIC_2 (DIM, DiM)) - -DEFDOC (DPROD, "Double-precision product.", "\ -Returns @samp{DBLE(@var{@1@})*DBLE(@var{@2@})}. -") - -DEFDOC (EXP, "Exponential.", "\ -Returns @samp{@var{e}**@var{@1@}}, where -@var{e} is approximately 2.7182818. - -@xref{Log Intrinsic}, for the inverse of this function. -") - -DEFDOC (CEXP, "Exponential (archaic).", ARCHAIC (EXP, Exp)) - -DEFDOC (DEXP, "Exponential (archaic).", ARCHAIC (EXP, Exp)) - -DEFDOC (CDEXP, "Exponential (archaic).", ARCHAIC (EXP, Exp)) - -DEFDOC (FLOAT, "Conversion (archaic).", ARCHAIC (REAL, Real)) -DEFDOC (DFLOAT, "Conversion (archaic).", ARCHAIC (REAL, Real)) - -DEFDOC (IFIX, "Conversion (archaic).", ARCHAIC (INT, Int)) - -DEFDOC (LONG, "Conversion to @code{INTEGER(KIND=1)} (archaic).", "\ -Archaic form of @code{INT()} that is specific -to one type for @var{@1@}. -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. -") - -DEFDOC (SHORT, "Convert to @code{INTEGER(KIND=6)} value@99@truncated to whole number.", "\ -Returns @var{@1@} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=6)}. - -If @var{@1@} is type @code{COMPLEX}, its real part -is truncated and converted, and its imaginary part is disregarded. - -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. -") - -DEFDOC (INT2, "Convert to @code{INTEGER(KIND=6)} value@99@truncated to whole number.", "\ -Returns @var{@1@} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=6)}. - -If @var{@1@} is type @code{COMPLEX}, its real part -is truncated and converted, and its imaginary part is disregarded. - -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. -") - -DEFDOC (INT8, "Convert to @code{INTEGER(KIND=2)} value@99@truncated to whole number.", "\ -Returns @var{@1@} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=2)}. - -If @var{@1@} is type @code{COMPLEX}, its real part -is truncated and converted, and its imaginary part is disregarded. - -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. -") - -DEFDOC (LEN, "Length of character entity.", "\ -Returns the length of @var{@1@}. - -If @var{@1@} is an array, the length of an element -of @var{@1@} is returned. - -Note that @var{@1@} need not be defined when this -intrinsic is invoked, since only the length, not -the content, of @var{@1@} is needed. - -@xref{Bit_Size Intrinsic}, for the function that determines -the size of its argument in bits. -") - -DEFDOC (TAN, "Tangent.", "\ -Returns the tangent of @var{@1@}, an angle measured -in radians. - -@xref{ATan Intrinsic}, for the inverse of this function. -") - -DEFDOC (DTAN, "Tangent (archaic).", ARCHAIC (TAN, Tan)) - -DEFDOC (TANH, "Hyperbolic tangent.", "\ -Returns the hyperbolic tangent of @var{@1@}. -") - -DEFDOC (DTANH, "Hyperbolic tangent (archaic).", ARCHAIC (TANH, TanH)) - -DEFDOC (SNGL, "Convert (archaic).", ARCHAIC (REAL, Real)) - -DEFDOC (SIN, "Sine.", "\ -Returns the sine of @var{@1@}, an angle measured -in radians. - -@xref{ASin Intrinsic}, for the inverse of this function. -") - -DEFDOC (CSIN, "Sine (archaic).", ARCHAIC (SIN, Sin)) - -DEFDOC (DSIN, "Sine (archaic).", ARCHAIC (SIN, Sin)) - -DEFDOC (CDSIN, "Sine (archaic).", ARCHAIC (SIN, Sin)) - -DEFDOC (SINH, "Hyperbolic sine.", "\ -Returns the hyperbolic sine of @var{@1@}. -") - -DEFDOC (DSINH, "Hyperbolic sine (archaic).", ARCHAIC (SINH, SinH)) - -DEFDOC (LSHIFT, "Left-shift bits.", "\ -Returns @var{@1@} shifted to the left -@var{@2@} bits. - -Although similar to the expression -@samp{@var{@1@}*(2**@var{@2@})}, there -are important differences. -For example, the sign of the result is -not necessarily the same as the sign of -@var{@1@}. - -Currently this intrinsic is defined assuming -the underlying representation of @var{@1@} -is as a two's-complement integer. -It is unclear at this point whether that -definition will apply when a different -representation is involved. - -@xref{LShift Intrinsic}, for the inverse of this function. - -@xref{IShft Intrinsic}, for information -on a more widely available left-shifting -intrinsic that is also more precisely defined. -") - -DEFDOC (RSHIFT, "Right-shift bits.", "\ -Returns @var{@1@} shifted to the right -@var{@2@} bits. - -Although similar to the expression -@samp{@var{@1@}/(2**@var{@2@})}, there -are important differences. -For example, the sign of the result is -undefined. - -Currently this intrinsic is defined assuming -the underlying representation of @var{@1@} -is as a two's-complement integer. -It is unclear at this point whether that -definition will apply when a different -representation is involved. - -@xref{RShift Intrinsic}, for the inverse of this function. - -@xref{IShft Intrinsic}, for information -on a more widely available right-shifting -intrinsic that is also more precisely defined. -") - -DEFDOC (LGE, "Lexically greater than or equal.", "\ -Returns @samp{.TRUE.} if @samp{@var{@1@}.GE.@var{@2@}}, -@samp{.FALSE.} otherwise. -@var{@1@} and @var{@2@} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{@1@} and @var{@2@} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -The lexical comparison intrinsics @code{LGe}, @code{LGt}, -@code{LLe}, and @code{LLt} differ from the corresponding -intrinsic operators @code{.GE.}, @code{.GT.}, -@code{.LE.}, @code{.LT.}. -Because the ASCII collating sequence is assumed, -the following expressions always return @samp{.TRUE.}: - -@smallexample -LGE ('0', ' ') -LGE ('A', '0') -LGE ('a', 'A') -@end smallexample - -The following related expressions do @emph{not} always -return @samp{.TRUE.}, as they are not necessarily evaluated -assuming the arguments use ASCII encoding: - -@smallexample -'0' .GE. ' ' -'A' .GE. '0' -'a' .GE. 'A' -@end smallexample - -The same difference exists -between @code{LGt} and @code{.GT.}; -between @code{LLe} and @code{.LE.}; and -between @code{LLt} and @code{.LT.}. -") - -DEFDOC (LGT, "Lexically greater than.", "\ -Returns @samp{.TRUE.} if @samp{@var{@1@}.GT.@var{@2@}}, -@samp{.FALSE.} otherwise. -@var{@1@} and @var{@2@} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{@1@} and @var{@2@} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -@xref{LGe Intrinsic}, for information on the distinction -between the @code{@0@} intrinsic and the @code{.GT.} -operator. -") - -DEFDOC (LLE, "Lexically less than or equal.", "\ -Returns @samp{.TRUE.} if @samp{@var{@1@}.LE.@var{@2@}}, -@samp{.FALSE.} otherwise. -@var{@1@} and @var{@2@} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{@1@} and @var{@2@} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -@xref{LGe Intrinsic}, for information on the distinction -between the @code{@0@} intrinsic and the @code{.LE.} -operator. -") - -DEFDOC (LLT, "Lexically less than.", "\ -Returns @samp{.TRUE.} if @samp{@var{@1@}.LT.@var{@2@}}, -@samp{.FALSE.} otherwise. -@var{@1@} and @var{@2@} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{@1@} and @var{@2@} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -@xref{LGe Intrinsic}, for information on the distinction -between the @code{@0@} intrinsic and the @code{.LT.} -operator. -") - -DEFDOC (SIGN, "Apply sign to magnitude.", "\ -Returns @samp{ABS(@var{@1@})*@var{s}}, where -@var{s} is +1 if @samp{@var{@2@}.GE.0}, --1 otherwise. - -@xref{Abs Intrinsic}, for the function that returns -the magnitude of a value. -") - -DEFDOC (DSIGN, "Apply sign to magnitude (archaic).", ARCHAIC_2 (SIGN, Sign)) -DEFDOC (ISIGN, "Apply sign to magnitude (archaic).", ARCHAIC_2 (SIGN, Sign)) - -DEFDOC (REAL, "Convert value to type @code{REAL(KIND=1)}.", "\ -Converts @var{@1@} to @code{REAL(KIND=1)}. - -Use of @code{@0@()} with a @code{COMPLEX} argument -(other than @code{COMPLEX(KIND=1)}) is restricted to the following case: - -@example -REAL(REAL(@1@)) -@end example - -@noindent -This expression converts the real part of @1@ to -@code{REAL(KIND=1)}. - -@xref{RealPart Intrinsic}, for information on a GNU Fortran -intrinsic that extracts the real part of an arbitrary -@code{COMPLEX} value. - -@xref{REAL() and AIMAG() of Complex}, for more information. -") - -DEFDOC (DREAL, "Convert value to type @code{REAL(KIND=2)}.", "\ -Converts @var{@1@} to @code{REAL(KIND=2)}. - -If @var{@1@} is type @code{COMPLEX}, its real part -is converted (if necessary) to @code{REAL(KIND=2)}, -and its imaginary part is disregarded. - -Although this intrinsic is not standard Fortran, -it is a popular extension offered by many compilers -that support @code{DOUBLE COMPLEX}, since it offers -the easiest way to extract the real part of a @code{DOUBLE COMPLEX} -value without using the Fortran 90 @code{REAL()} intrinsic -in a way that produces a return value inconsistent with -the way many FORTRAN 77 compilers handle @code{REAL()} of -a @code{DOUBLE COMPLEX} value. - -@xref{RealPart Intrinsic}, for information on a GNU Fortran -intrinsic that avoids these areas of confusion. - -@xref{Dble Intrinsic}, for information on the standard FORTRAN 77 -replacement for @code{DREAL()}. - -@xref{REAL() and AIMAG() of Complex}, for more information on -this issue. -") - -DEFDOC (IMAGPART, "Extract imaginary part of complex.", "\ -The imaginary part of @var{@1@} is returned, without conversion. - -@emph{Note:} The way to do this in standard Fortran 90 -is @samp{AIMAG(@var{@1@})}. -However, when, for example, @var{@1@} is @code{DOUBLE COMPLEX}, -@samp{AIMAG(@var{@1@})} means something different for some compilers -that are not true Fortran 90 compilers but offer some -extensions standardized by Fortran 90 (such as the -@code{DOUBLE COMPLEX} type, also known as @code{COMPLEX(KIND=2)}). - -The advantage of @code{@0@()} is that, while not necessarily -more or less portable than @code{AIMAG()}, it is more likely to -cause a compiler that doesn't support it to produce a diagnostic -than generate incorrect code. - -@xref{REAL() and AIMAG() of Complex}, for more information. -") - -DEFDOC (COMPLEX, "Build complex value from real and@99@imaginary parts.", "\ -Returns a @code{COMPLEX} value that has @samp{@1@} and @samp{@2@} as its -real and imaginary parts, respectively. - -If @var{@1@} and @var{@2@} are the same type, and that type is not -@code{INTEGER}, no data conversion is performed, and the type of -the resulting value has the same kind value as the types -of @var{@1@} and @var{@2@}. - -If @var{@1@} and @var{@2@} are not the same type, the usual type-promotion -rules are applied to both, converting either or both to the -appropriate @code{REAL} type. -The type of the resulting value has the same kind value as the -type to which both @var{@1@} and @var{@2@} were converted, in this case. - -If @var{@1@} and @var{@2@} are both @code{INTEGER}, they are both converted -to @code{REAL(KIND=1)}, and the result of the @code{@0@()} -invocation is type @code{COMPLEX(KIND=1)}. - -@emph{Note:} The way to do this in standard Fortran 90 -is too hairy to describe here, but it is important to -note that @samp{CMPLX(D1,D2)} returns a @code{COMPLEX(KIND=1)} -result even if @samp{D1} and @samp{D2} are type @code{REAL(KIND=2)}. -Hence the availability of @code{COMPLEX()} in GNU Fortran. -") - -DEFDOC (LOC, "Address of entity in core.", "\ -The @code{LOC()} intrinsic works the -same way as the @code{%LOC()} construct. -@xref{%LOC(),,The @code{%LOC()} Construct}, for -more information. -") - -DEFDOC (REALPART, "Extract real part of complex.", "\ -The real part of @var{@1@} is returned, without conversion. - -@emph{Note:} The way to do this in standard Fortran 90 -is @samp{REAL(@var{@1@})}. -However, when, for example, @var{@1@} is @code{COMPLEX(KIND=2)}, -@samp{REAL(@var{@1@})} means something different for some compilers -that are not true Fortran 90 compilers but offer some -extensions standardized by Fortran 90 (such as the -@code{DOUBLE COMPLEX} type, also known as @code{COMPLEX(KIND=2)}). - -The advantage of @code{@0@()} is that, while not necessarily -more or less portable than @code{REAL()}, it is more likely to -cause a compiler that doesn't support it to produce a diagnostic -than generate incorrect code. - -@xref{REAL() and AIMAG() of Complex}, for more information. -") - -DEFDOC (GETARG, "Obtain command-line argument.", "\ -Sets @var{@2@} to the @var{@1@}-th command-line argument (or to all -blanks if there are fewer than @var{@2@} command-line arguments); -@code{CALL @0@(0, @var{value})} sets @var{value} to the name of the -program (on systems that support this feature). - -@xref{IArgC Intrinsic}, for information on how to get the number -of arguments. -") - -DEFDOC (ABORT, "Abort the program.", "\ -Prints a message and potentially causes a core dump via @code{abort(3)}. -") - -DEFDOC (EXIT, "Terminate the program.", "\ -Exit the program with status @var{@1@} after closing open Fortran -I/O units and otherwise behaving as @code{exit(2)}. -If @var{@1@} is omitted the canonical `success' value -will be returned to the system. -") - -DEFDOC (IARGC, "Obtain count of command-line arguments.", "\ -Returns the number of command-line arguments. - -This count does not include the specification of the program -name itself. -") - -DEFDOC (CTIME_func, "Convert time to Day Mon dd hh:mm:ss yyyy.", "\ -Converts @var{@1@}, a system time value, such as returned by -@code{TIME8()}, to a string of the form @samp{Sat Aug 19 18:13:14 1995}, -and returns that string as the function value. - -@xref{Time8 Intrinsic}. -") - -DEFDOC (CTIME_subr, "Convert time to Day Mon dd hh:mm:ss yyyy.", "\ -Converts @var{@1@}, a system time value, such as returned by -@code{TIME8()}, to a string of the form @samp{Sat Aug 19 18:13:14 1995}, -and returns that string in @var{@2@}. - -@xref{Time8 Intrinsic}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. -") - -DEFDOC (DATE, "Get current date as dd-Mon-yy.", "\ -Returns @var{@1@} in the form @samp{@var{dd}-@var{mmm}-@var{yy}}, -representing the numeric day of the month @var{dd}, a three-character -abbreviation of the month name @var{mmm} and the last two digits of -the year @var{yy}, e.g.@: @samp{25-Nov-96}. - -@cindex Y2K compliance -@cindex Year 2000 compliance -This intrinsic is not recommended, due to the year 2000 approaching. -Therefore, programs making use of this intrinsic -might not be Year 2000 (Y2K) compliant. -@xref{CTime Intrinsic (subroutine)}, for information on obtaining more digits -for the current (or any) date. -") - -DEFDOC (DTIME_func, "Get elapsed time since last time.", "\ -Initially, return the number of seconds of runtime -since the start of the process's execution -as the function value, -and the user and system components of this in @samp{@var{@1@}(1)} -and @samp{@var{@1@}(2)} respectively. -The functions' value is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}. - -Subsequent invocations of @samp{@0@()} return values accumulated since the -previous invocation. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (DTIME_subr, "Get elapsed time since last time.", "\ -Initially, return the number of seconds of runtime -since the start of the process's execution -in @var{@2@}, -and the user and system components of this in @samp{@var{@1@}(1)} -and @samp{@var{@1@}(2)} respectively. -The value of @var{@2@} is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}. - -Subsequent invocations of @samp{@0@()} set values based on accumulations -since the previous invocation. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. -") - -DEFDOC (ETIME_func, "Get elapsed time for process.", "\ -Return the number of seconds of runtime -since the start of the process's execution -as the function value, -and the user and system components of this in @samp{@var{@1@}(1)} -and @samp{@var{@1@}(2)} respectively. -The functions' value is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. -") - -DEFDOC (ETIME_subr, "Get elapsed time for process.", "\ -Return the number of seconds of runtime -since the start of the process's execution -in @var{@2@}, -and the user and system components of this in @samp{@var{@1@}(1)} -and @samp{@var{@1@}(2)} respectively. -The value of @var{@2@} is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. -") - -DEFDOC (FDATE_func, "Get current time as Day Mon dd hh:mm:ss yyyy.", "\ -Returns the current date (using the same format as @code{CTIME()}). - -Equivalent to: - -@example -CTIME(TIME8()) -@end example - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -@xref{CTime Intrinsic (function)}. -") - -DEFDOC (FDATE_subr, "Get current time as Day Mon dd hh:mm:ss yyyy.", "\ -Returns the current date (using the same format as @code{CTIME()}) -in @var{@1@}. - -Equivalent to: - -@example -CALL CTIME(@var{@1@}, TIME8()) -@end example - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -@xref{CTime Intrinsic (subroutine)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. -") - -DEFDOC (GMTIME, "Convert time to GMT time info.", "\ -Given a system time value @var{@1@}, fills @var{@2@} with values -extracted from it appropriate to the GMT time zone using -@code{gmtime(3)}. - -The array elements are as follows: - -@enumerate -@item -Seconds after the minute, range 0--59 or 0--61 to allow for leap -seconds - -@item -Minutes after the hour, range 0--59 - -@item -Hours past midnight, range 0--23 - -@item -Day of month, range 0--31 - -@item -Number of months since January, range 0--12 - -@item -Years since 1900 - -@item -Number of days since Sunday, range 0--6 - -@item -Days since January 1 - -@item -Daylight savings indicator: positive if daylight savings is in effect, -zero if not, and negative if the information isn't available. -@end enumerate -") - -DEFDOC (LTIME, "Convert time to local time info.", "\ -Given a system time value @var{@1@}, fills @var{@2@} with values -extracted from it appropriate to the GMT time zone using -@code{localtime(3)}. - -The array elements are as follows: - -@enumerate -@item -Seconds after the minute, range 0--59 or 0--61 to allow for leap -seconds - -@item -Minutes after the hour, range 0--59 - -@item -Hours past midnight, range 0--23 - -@item -Day of month, range 0--31 - -@item -Number of months since January, range 0--12 - -@item -Years since 1900 - -@item -Number of days since Sunday, range 0--6 - -@item -Days since January 1 - -@item -Daylight savings indicator: positive if daylight savings is in effect, -zero if not, and negative if the information isn't available. -@end enumerate -") - -DEFDOC (IDATE_unix, "Get local time info.", "\ -Fills @var{@1@} with the numerical values at the current local time. -The day (in the range 1--31), month (in the range 1--12), -and year appear in elements 1, 2, and 3 of @var{@1@}, respectively. -The year has four significant digits. - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. -") - -DEFDOC (IDATE_vxt, "Get local time info (VAX/VMS).", "\ -Returns the numerical values of the current local time. -The month (in the range 1--12) is returned in @var{@1@}, -the day (in the range 1--31) in @var{@2@}, -and the year in @var{@3@} (in the range 0--99). - -@cindex Y2K compliance -@cindex Year 2000 compliance -@cindex wraparound, Y2K -@cindex limits, Y2K -This intrinsic is not recommended, due to the fact that -its return value for year wraps around century boundaries -(change from a larger value to a smaller one). -Therefore, programs making use of this intrinsic, for -instance, might not be Year 2000 (Y2K) compliant. -For example, the date might appear, -to such programs, to wrap around -as of the Year 2000. - -@xref{IDate Intrinsic (UNIX)}, for information on obtaining more digits -for the current date. -") - -DEFDOC (ITIME, "Get local time of day.", "\ -Returns the current local time hour, minutes, and seconds in elements -1, 2, and 3 of @var{@1@}, respectively. -") - -DEFDOC (MCLOCK, "Get number of clock ticks for process.", "\ -Returns the number of clock ticks since the start of the process. -Supported on systems with @code{clock(3)} (q.v.). - -@cindex wraparound, timings -@cindex limits, timings -This intrinsic is not fully portable, such as to systems -with 32-bit @code{INTEGER} types but supporting times -wider than 32 bits. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -@xref{MClock8 Intrinsic}, for information on a -similar intrinsic that might be portable to more -GNU Fortran implementations, though to fewer -Fortran compilers. - -If the system does not support @code{clock(3)}, --1 is returned. -") - -DEFDOC (MCLOCK8, "Get number of clock ticks for process.", "\ -Returns the number of clock ticks since the start of the process. -Supported on systems with @code{clock(3)} (q.v.). - -@cindex wraparound, timings -@cindex limits, timings -@emph{Warning:} this intrinsic does not increase the range -of the timing values over that returned by @code{clock(3)}. -On a system with a 32-bit @code{clock(3)}, -@code{@0@} will return a 32-bit value, -even though converted to an @samp{INTEGER(KIND=2)} value. -That means overflows of the 32-bit value can still occur. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -No Fortran implementations other than GNU Fortran are -known to support this intrinsic at the time of this -writing. -@xref{MClock Intrinsic}, for information on a -similar intrinsic that might be portable to more Fortran -compilers, though to fewer GNU Fortran implementations. - -If the system does not support @code{clock(3)}, --1 is returned. -") - -DEFDOC (SECNDS, "Get local time offset since midnight.", "\ -Returns the local time in seconds since midnight minus the value -@var{@1@}. - -@cindex wraparound, timings -@cindex limits, timings -This values returned by this intrinsic -become numerically less than previous values -(they wrap around) during a single run of the -compiler program, under normal circumstances -(such as running through the midnight hour). -") - -DEFDOC (SECOND_func, "Get CPU time for process in seconds.", "\ -Returns the process's runtime in seconds---the same value as the -UNIX function @code{etime} returns. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. -") - -DEFDOC (SECOND_subr, "Get CPU time for process@99@in seconds.", "\ -Returns the process's runtime in seconds in @var{@1@}---the same value -as the UNIX function @code{etime} returns. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -This routine is known from Cray Fortran. @xref{CPU_Time Intrinsic}, -for a standard equivalent. -") - -DEFDOC (SYSTEM_CLOCK, "Get current system clock value.", "\ -Returns in @var{@1@} the current value of the system clock; this is -the value returned by the UNIX function @code{times(2)} -in this implementation, but -isn't in general. -@var{@2@} is the number of clock ticks per second and -@var{@3@} is the maximum value this can take, which isn't very useful -in this implementation since it's just the maximum C @code{unsigned -int} value. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. -") - -DEFDOC (CPU_TIME, "Get current CPU time.", "\ -Returns in @var{@1@} the current value of the system time. -This implementation of the Fortran 95 intrinsic is just an alias for -@code{second} @xref{Second Intrinsic (subroutine)}. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. -") - -DEFDOC (TIME8, "Get current time as time value.", "\ -Returns the current time encoded as a long integer -(in the manner of the UNIX function @code{time(3)}). -This value is suitable for passing to @code{CTIME}, -@code{GMTIME}, and @code{LTIME}. - -@cindex wraparound, timings -@cindex limits, timings -@emph{Warning:} this intrinsic does not increase the range -of the timing values over that returned by @code{time(3)}. -On a system with a 32-bit @code{time(3)}, -@code{@0@} will return a 32-bit value, -even though converted to an @samp{INTEGER(KIND=2)} value. -That means overflows of the 32-bit value can still occur. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -No Fortran implementations other than GNU Fortran are -known to support this intrinsic at the time of this -writing. -@xref{Time Intrinsic (UNIX)}, for information on a -similar intrinsic that might be portable to more Fortran -compilers, though to fewer GNU Fortran implementations. -") - -DEFDOC (TIME_unix, "Get current time as time value.", "\ -Returns the current time encoded as an integer -(in the manner of the UNIX function @code{time(3)}). -This value is suitable for passing to @code{CTIME}, -@code{GMTIME}, and @code{LTIME}. - -@cindex wraparound, timings -@cindex limits, timings -This intrinsic is not fully portable, such as to systems -with 32-bit @code{INTEGER} types but supporting times -wider than 32 bits. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -@xref{Time8 Intrinsic}, for information on a -similar intrinsic that might be portable to more -GNU Fortran implementations, though to fewer -Fortran compilers. -") - -#define BES(num,n,val) "\ -Calculates the Bessel function of the " #num " kind of \ -order " #n " of @var{@" #val "@}.\n\ -See @code{bessel(3m)}, on whose implementation the \ -function depends.\ -" - -DEFDOC (BESJ0, "Bessel function.", BES (first, 0, 1)) -DEFDOC (BESJ1, "Bessel function.", BES (first, 1, 1)) -DEFDOC (BESJN, "Bessel function.", BES (first, @var{N}, 2)) -DEFDOC (BESY0, "Bessel function.", BES (second, 0, 1)) -DEFDOC (BESY1, "Bessel function.", BES (second, 1, 1)) -DEFDOC (BESYN, "Bessel function.", BES (second, @var{N}, 2)) -DEFDOC (DBESJ0, "Bessel function (archaic).", ARCHAIC (BESJ0, BesJ0)) -DEFDOC (DBESJ1, "Bessel function (archaic).", ARCHAIC (BESJ1, BesJ1)) -DEFDOC (DBESJN, "Bessel function (archaic).", ARCHAIC_2nd (BESJN, BesJN)) -DEFDOC (DBESY0, "Bessel function (archaic).", ARCHAIC (BESY0, BesY0)) -DEFDOC (DBESY1, "Bessel function (archaic).", ARCHAIC (BESY1, BesY1)) -DEFDOC (DBESYN, "Bessel function (archaic).", ARCHAIC_2nd (BESYN, BesYN)) - -DEFDOC (ERF, "Error function.", "\ -Returns the error function of @var{@1@}. -See @code{erf(3m)}, which provides the implementation. -") - -DEFDOC (ERFC, "Complementary error function.", "\ -Returns the complementary error function of @var{@1@}: -@samp{ERFC(R) = 1 - ERF(R)} (except that the result might be more -accurate than explicitly evaluating that formulae would give). -See @code{erfc(3m)}, which provides the implementation. -") - -DEFDOC (DERF, "Error function (archaic).", ARCHAIC (ERF, ErF)) -DEFDOC (DERFC, "Complementary error function (archaic).", ARCHAIC (ERFC, ErFC)) - -DEFDOC (IRAND, "Random number.", "\ -Returns a uniform quasi-random number up to a system-dependent limit. -If @var{@1@} is 0, the next number in sequence is returned; if -@var{@1@} is 1, the generator is restarted by calling the UNIX function -@samp{srand(0)}; if @var{@1@} has any other value, -it is used as a new seed with @code{srand()}. - -@xref{SRand Intrinsic}. - -@emph{Note:} As typically implemented (by the routine of the same -name in the C library), this random number generator is a very poor -one, though the BSD and GNU libraries provide a much better -implementation than the `traditional' one. -On a different system you almost certainly want to use something better. -") - -DEFDOC (RAND, "Random number.", "\ -Returns a uniform quasi-random number between 0 and 1. -If @var{@1@} is 0, the next number in sequence is returned; if -@var{@1@} is 1, the generator is restarted by calling @samp{srand(0)}; -if @var{@1@} has any other value, it is used as a new seed with -@code{srand}. - -@xref{SRand Intrinsic}. - -@emph{Note:} As typically implemented (by the routine of the same -name in the C library), this random number generator is a very poor -one, though the BSD and GNU libraries provide a much better -implementation than the `traditional' one. -On a different system you -almost certainly want to use something better. -") - -DEFDOC (SRAND, "Random seed.", "\ -Reinitializes the generator with the seed in @var{@1@}. -@xref{IRand Intrinsic}. -@xref{Rand Intrinsic}. -") - -DEFDOC (ACCESS, "Check file accessibility.", "\ -Checks file @var{@1@} for accessibility in the mode specified by @var{@2@} and -returns 0 if the file is accessible in that mode, otherwise an error -code if the file is inaccessible or @var{@2@} is invalid. -See @code{access(2)}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -@var{@2@} may be a concatenation of any of the following characters: - -@table @samp -@item r -Read permission - -@item w -Write permission - -@item x -Execute permission - -@item @kbd{SPC} -Existence -@end table -") - -DEFDOC (CHDIR_subr, "Change directory.", "\ -Sets the current working directory to be @var{@1@}. -If the @var{@2@} argument is supplied, it contains 0 -on success or a nonzero error code otherwise upon return. -See @code{chdir(3)}. - -@emph{Caution:} Using this routine during I/O to a unit connected with a -non-absolute file name can cause subsequent I/O on such a unit to fail -because the I/O library might reopen files by name. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@2@} argument. -") - -DEFDOC (CHDIR_func, "Change directory.", "\ -Sets the current working directory to be @var{@1@}. -Returns 0 on success or a nonzero error code. -See @code{chdir(3)}. - -@emph{Caution:} Using this routine during I/O to a unit connected with a -non-absolute file name can cause subsequent I/O on such a unit to fail -because the I/O library might reopen files by name. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (CHMOD_func, "Change file modes.", "\ -Changes the access mode of file @var{@1@} according to the -specification @var{@2@}, which is given in the format of -@code{chmod(1)}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -Currently, @var{@1@} must not contain the single quote -character. - -Returns 0 on success or a nonzero error code otherwise. - -Note that this currently works -by actually invoking @code{/bin/chmod} (or the @code{chmod} found when -the library was configured) and so might fail in some circumstances and -will, anyway, be slow. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (CHMOD_subr, "Change file modes.", "\ -Changes the access mode of file @var{@1@} according to the -specification @var{@2@}, which is given in the format of -@code{chmod(1)}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -Currently, @var{@1@} must not contain the single quote -character. - -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Note that this currently works -by actually invoking @code{/bin/chmod} (or the @code{chmod} found when -the library was configured) and so might fail in some circumstances and -will, anyway, be slow. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (GETCWD_func, "Get current working directory.", "\ -Places the current working directory in @var{@1@}. -Returns 0 on -success, otherwise a nonzero error code -(@code{ENOSYS} if the system does not provide @code{getcwd(3)} -or @code{getwd(3)}). -") - -DEFDOC (GETCWD_subr, "Get current working directory.", "\ -Places the current working directory in @var{@1@}. -If the @var{@2@} argument is supplied, it contains 0 -success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{getcwd(3)} -or @code{getwd(3)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@2@} argument. -") - -DEFDOC (FSTAT_func, "Get file information.", "\ -Obtains data about the file open on Fortran I/O unit @var{@1@} and -places them in the array @var{@2@}. -The values in this array are -extracted from the @code{stat} structure as returned by -@code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -Returns 0 on success or a nonzero error code. -") - -DEFDOC (FSTAT_subr, "Get file information.", "\ -Obtains data about the file open on Fortran I/O unit @var{@1@} and -places them in the array @var{@2@}. -The values in this array are -extracted from the @code{stat} structure as returned by -@code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (LSTAT_func, "Get file information.", "\ -Obtains data about the given file @var{@1@} and places them in the array -@var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -If @var{@1@} is a symbolic link it returns data on the -link itself, so the routine is available only on systems that support -symbolic links. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -Returns 0 on success or a nonzero error code -(@code{ENOSYS} if the system does not provide @code{lstat(2)}). -") - -DEFDOC (LSTAT_subr, "Get file information.", "\ -Obtains data about the given file @var{@1@} and places them in the array -@var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -If @var{@1@} is a symbolic link it returns data on the -link itself, so the routine is available only on systems that support -symbolic links. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{lstat(2)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (STAT_func, "Get file information.", "\ -Obtains data about the given file @var{@1@} and places them in the array -@var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -Returns 0 on success or a nonzero error code. -") - -DEFDOC (STAT_subr, "Get file information.", "\ -Obtains data about the given file @var{@1@} and places them in the array -@var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (LINK_subr, "Make hard link in file system.", "\ -Makes a (hard) link from file @var{@1@} to @var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{@1@} and @var{@2@}---otherwise, -trailing blanks in @var{@1@} and @var{@2@} are ignored. -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return. -See @code{link(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (LINK_func, "Make hard link in file system.", "\ -Makes a (hard) link from file @var{@1@} to @var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{@1@} and @var{@2@}---otherwise, -trailing blanks in @var{@1@} and @var{@2@} are ignored. -Returns 0 on success or a nonzero error code. -See @code{link(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (SYMLNK_subr, "Make symbolic link in file system.", "\ -Makes a symbolic link from file @var{@1@} to @var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{@1@} and @var{@2@}---otherwise, -trailing blanks in @var{@1@} and @var{@2@} are ignored. -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{symlink(2)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (SYMLNK_func, "Make symbolic link in file system.", "\ -Makes a symbolic link from file @var{@1@} to @var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{@1@} and @var{@2@}---otherwise, -trailing blanks in @var{@1@} and @var{@2@} are ignored. -Returns 0 on success or a nonzero error code -(@code{ENOSYS} if the system does not provide @code{symlink(2)}). - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (RENAME_subr, "Rename file.", "\ -Renames the file @var{@1@} to @var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{@1@} and @var{@2@}---otherwise, -trailing blanks in @var{@1@} and @var{@2@} are ignored. -See @code{rename(2)}. -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (RENAME_func, "Rename file.", "\ -Renames the file @var{@1@} to @var{@2@}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{@1@} and @var{@2@}---otherwise, -trailing blanks in @var{@1@} and @var{@2@} are ignored. -See @code{rename(2)}. -Returns 0 on success or a nonzero error code. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (UMASK_subr, "Set file creation permissions mask.", "\ -Sets the file creation mask to @var{@1@} and returns the old value in -argument @var{@2@} if it is supplied. -See @code{umask(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. -") - -DEFDOC (UMASK_func, "Set file creation permissions mask.", "\ -Sets the file creation mask to @var{@1@} and returns the old value. -See @code{umask(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (UNLINK_subr, "Unlink file.", "\ -Unlink the file @var{@1@}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -If the @var{@2@} argument is supplied, it contains -0 on success or a nonzero error code upon return. -See @code{unlink(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@2@} argument. -") - -DEFDOC (UNLINK_func, "Unlink file.", "\ -Unlink the file @var{@1@}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -Returns 0 on success or a nonzero error code. -See @code{unlink(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (GERROR, "Get error message for last error.", "\ -Returns the system error message corresponding to the last system -error (C @code{errno}). -") - -DEFDOC (IERRNO, "Get error number for last error.", "\ -Returns the last system error number (corresponding to the C -@code{errno}). -") - -DEFDOC (PERROR, "Print error message for last error.", "\ -Prints (on the C @code{stderr} stream) a newline-terminated error -message corresponding to the last system error. -This is prefixed by @var{@1@}, a colon and a space. -See @code{perror(3)}. -") - -DEFDOC (GETGID, "Get process group id.", "\ -Returns the group id for the current process. -") - -DEFDOC (GETUID, "Get process user id.", "\ -Returns the user id for the current process. -") - -DEFDOC (GETPID, "Get process id.", "\ -Returns the process id for the current process. -") - -DEFDOC (GETENV, "Get environment variable.", "\ -Sets @var{@2@} to the value of environment variable given by the -value of @var{@1@} (@code{$name} in shell terms) or to blanks if -@code{$name} has not been set. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{@1@}---otherwise, -trailing blanks in @var{@1@} are ignored. -") - -DEFDOC (GETLOG, "Get login name.", "\ -Returns the login name for the process in @var{@1@}. - -@emph{Caution:} On some systems, the @code{getlogin(3)} -function, which this intrinsic calls at run time, -is either not implemented or returns a null pointer. -In the latter case, this intrinsic returns blanks -in @var{@1@}. -") - -DEFDOC (HOSTNM_func, "Get host name.", "\ -Fills @var{@1@} with the system's host name returned by -@code{gethostname(2)}, returning 0 on success or a nonzero error code -(@code{ENOSYS} if the system does not provide @code{gethostname(2)}). - -On some systems (specifically SCO) it might be necessary to link the -``socket'' library if you call this routine. -Typically this means adding @samp{-lg2c -lsocket -lm} -to the @code{g77} command line when linking the program. -") - -DEFDOC (HOSTNM_subr, "Get host name.", "\ -Fills @var{@1@} with the system's host name returned by -@code{gethostname(2)}. -If the @var{@2@} argument is supplied, it contains -0 on success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{gethostname(2)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@2@} argument. - -On some systems (specifically SCO) it might be necessary to link the -``socket'' library if you call this routine. -Typically this means adding @samp{-lg2c -lsocket -lm} -to the @code{g77} command line when linking the program. -") - -DEFDOC (FLUSH, "Flush buffered output.", "\ -Flushes Fortran unit(s) currently open for output. -Without the optional argument, all such units are flushed, -otherwise just the unit specified by @var{@1@}. - -Some non-GNU implementations of Fortran provide this intrinsic -as a library procedure that might or might not support the -(optional) @var{@1@} argument. -") - -DEFDOC (FNUM, "Get file descriptor from Fortran unit number.", "\ -Returns the Unix file descriptor number corresponding to the open -Fortran I/O unit @var{@1@}. -This could be passed to an interface to C I/O routines. -") - -#define IOWARN " -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. -" - -DEFDOC (FGET_func, "Read a character from unit 5 stream-wise.", "\ -Reads a single character into @var{@1@} in stream mode from unit 5 -(by-passing normal formatted input) using @code{getc(3)}. -Returns 0 on -success, @minus{}1 on end-of-file, and the error code from -@code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FGET_subr, "Read a character from unit 5 stream-wise.", "\ -Reads a single character into @var{@1@} in stream mode from unit 5 -(by-passing normal formatted output) using @code{getc(3)}. -Returns in -@var{@2@} 0 on success, @minus{}1 on end-of-file, and the error code -from @code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FGETC_func, "Read a character stream-wise.", "\ -Reads a single character into @var{@2@} in stream mode from unit @var{@1@} -(by-passing normal formatted output) using @code{getc(3)}. -Returns 0 on -success, @minus{}1 on end-of-file, and the error code from -@code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FGETC_subr, "Read a character stream-wise.", "\ -Reads a single character into @var{@2@} in stream mode from unit @var{@1@} -(by-passing normal formatted output) using @code{getc(3)}. -Returns in -@var{@3@} 0 on success, @minus{}1 on end-of-file, and the error code from -@code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FPUT_func, "Write a character to unit 6 stream-wise.", "\ -Writes the single character @var{@1@} in stream mode to unit 6 -(by-passing normal formatted output) using @code{getc(3)}. -Returns 0 on -success, the error code from @code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FPUT_subr, "Write a character to unit 6 stream-wise.", "\ -Writes the single character @var{@1@} in stream mode to unit 6 -(by-passing normal formatted output) using @code{putc(3)}. -Returns in -@var{@2@} 0 on success, the error code from @code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FPUTC_func, "Write a character stream-wise.", "\ -Writes the single character @var{@2@} in stream mode to unit @var{@1@} -(by-passing normal formatted output) using @code{putc(3)}. -Returns 0 on -success, the error code from @code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FPUTC_subr, "Write a character stream-wise.", "\ -Writes the single character @var{@1@} in stream mode to unit 6 -(by-passing normal formatted output) using @code{putc(3)}. -Returns in -@var{@2@} 0 on success, the error code from @code{ferror(3)} otherwise. -" IOWARN) - -DEFDOC (FSEEK, "Position file (low-level).", "\ -Attempts to move Fortran unit @var{@1@} to the specified -@var{@2@}: absolute offset if @var{@3@}=0; relative to the -current offset if @var{@3@}=1; relative to the end of the file if -@var{@3@}=2. -It branches to label @var{@4@} if @var{@1@} is -not open or if the call otherwise fails. -") - -DEFDOC (FTELL_func, "Get file position (low-level).", "\ -Returns the current offset of Fortran unit @var{@1@} -(or @minus{}1 if @var{@1@} is not open). -") - -DEFDOC (FTELL_subr, "Get file position (low-level).", "\ -Sets @var{@2@} to the current offset of Fortran unit @var{@1@} -(or to @minus{}1 if @var{@1@} is not open). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. -") - -DEFDOC (ISATTY, "Is unit connected to a terminal?", "\ -Returns @code{.TRUE.} if and only if the Fortran I/O unit -specified by @var{@1@} is connected -to a terminal device. -See @code{isatty(3)}. -") - -DEFDOC (TTYNAM_func, "Get name of terminal device for unit.", "\ -Returns the name of the terminal device open on logical unit -@var{@1@} or a blank string if @var{@1@} is not connected to a -terminal. -") - -DEFDOC (TTYNAM_subr, "Get name of terminal device for unit.", "\ -Sets @var{@2@} to the name of the terminal device open on logical unit -@var{@1@} or to a blank string if @var{@1@} is not connected to a -terminal. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. -") - -DEFDOC (SIGNAL_subr, "Muck with signal handling.", "\ -If @var{@2@} is a an @code{EXTERNAL} routine, arranges for it to be -invoked with a single integer argument (of system-dependent length) -when signal @var{@1@} occurs. -If @var{@2@} is an integer, it can be -used to turn off handling of signal @var{@1@} or revert to its default -action. -See @code{signal(2)}. - -Note that @var{@2@} will be called using C conventions, -so the value of its argument in Fortran terms -Fortran terms is obtained by applying @code{%LOC()} (or @code{LOC()}) to it. - -The value returned by @code{signal(2)} is written to @var{@3@}, if -that argument is supplied. -Otherwise the return value is ignored. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. - -@emph{Warning:} Use of the @code{libf2c} run-time library function -@samp{signal_} directly -(such as via @samp{EXTERNAL SIGNAL}) -requires use of the @code{%VAL()} construct -to pass an @code{INTEGER} value -(such as @samp{SIG_IGN} or @samp{SIG_DFL}) -for the @var{@2@} argument. - -However, while @samp{CALL SIGNAL(@var{signum}, %VAL(SIG_IGN))} -works when @samp{SIGNAL} is treated as an external procedure -(and resolves, at link time, to @code{libf2c}'s @samp{signal_} routine), -this construct is not valid when @samp{SIGNAL} is recognized -as the intrinsic of that name. - -Therefore, for maximum portability and reliability, -code such references to the @samp{SIGNAL} facility as follows: - -@smallexample -INTRINSIC SIGNAL -@dots{} -CALL SIGNAL(@var{signum}, SIG_IGN) -@end smallexample - -@code{g77} will compile such a call correctly, -while other compilers will generally either do so as well -or reject the @samp{INTRINSIC SIGNAL} statement via a diagnostic, -allowing you to take appropriate action. -") - -DEFDOC (SIGNAL_func, "Muck with signal handling.", "\ -If @var{@2@} is a an @code{EXTERNAL} routine, arranges for it to be -invoked with a single integer argument (of system-dependent length) -when signal @var{@1@} occurs. -If @var{@2@} is an integer, it can be -used to turn off handling of signal @var{@1@} or revert to its default -action. -See @code{signal(2)}. - -Note that @var{@2@} will be called using C conventions, -so the value of its argument in Fortran terms -is obtained by applying @code{%LOC()} (or @code{LOC()}) to it. - -The value returned by @code{signal(2)} is returned. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -@emph{Warning:} If the returned value is stored in -an @code{INTEGER(KIND=1)} (default @code{INTEGER}) argument, -truncation of the original return value occurs on some systems -(such as Alphas, which have 64-bit pointers but 32-bit default integers), -with no warning issued by @code{g77} under normal circumstances. - -Therefore, the following code fragment might silently fail on -some systems: - -@smallexample -INTEGER RTN -EXTERNAL MYHNDL -RTN = SIGNAL(@var{signum}, MYHNDL) -@dots{} -! Restore original handler: -RTN = SIGNAL(@var{signum}, RTN) -@end smallexample - -The reason for the failure is that @samp{RTN} might not hold -all the information on the original handler for the signal, -thus restoring an invalid handler. -This bug could manifest itself as a spurious run-time failure -at an arbitrary point later during the program's execution, -for example. - -@emph{Warning:} Use of the @code{libf2c} run-time library function -@samp{signal_} directly -(such as via @samp{EXTERNAL SIGNAL}) -requires use of the @code{%VAL()} construct -to pass an @code{INTEGER} value -(such as @samp{SIG_IGN} or @samp{SIG_DFL}) -for the @var{@2@} argument. - -However, while @samp{RTN = SIGNAL(@var{signum}, %VAL(SIG_IGN))} -works when @samp{SIGNAL} is treated as an external procedure -(and resolves, at link time, to @code{libf2c}'s @samp{signal_} routine), -this construct is not valid when @samp{SIGNAL} is recognized -as the intrinsic of that name. - -Therefore, for maximum portability and reliability, -code such references to the @samp{SIGNAL} facility as follows: - -@smallexample -INTRINSIC SIGNAL -@dots{} -RTN = SIGNAL(@var{signum}, SIG_IGN) -@end smallexample - -@code{g77} will compile such a call correctly, -while other compilers will generally either do so as well -or reject the @samp{INTRINSIC SIGNAL} statement via a diagnostic, -allowing you to take appropriate action. -") - -DEFDOC (KILL_func, "Signal a process.", "\ -Sends the signal specified by @var{@2@} to the process @var{@1@}. -Returns 0 on success or a nonzero error code. -See @code{kill(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -") - -DEFDOC (KILL_subr, "Signal a process.", "\ -Sends the signal specified by @var{@2@} to the process @var{@1@}. -If the @var{@3@} argument is supplied, it contains -0 on success or a nonzero error code upon return. -See @code{kill(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@3@} argument. -") - -DEFDOC (LNBLNK, "Get last non-blank character in string.", "\ -Returns the index of the last non-blank character in @var{@1@}. -@code{LNBLNK} and @code{LEN_TRIM} are equivalent. -") - -DEFDOC (SLEEP, "Sleep for a specified time.", "\ -Causes the process to pause for @var{@1@} seconds. -See @code{sleep(2)}. -") - -DEFDOC (SYSTEM_subr, "Invoke shell (system) command.", "\ -Passes the command @var{@1@} to a shell (see @code{system(3)}). -If argument @var{@2@} is present, it contains the value returned by -@code{system(3)}, presumably 0 if the shell command succeeded. -Note that which shell is used to invoke the command is system-dependent -and environment-dependent. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{@2@} argument. -") - -DEFDOC (SYSTEM_func, "Invoke shell (system) command.", "\ -Passes the command @var{@1@} to a shell (see @code{system(3)}). -Returns the value returned by -@code{system(3)}, presumably 0 if the shell command succeeded. -Note that which shell is used to invoke the command is system-dependent -and environment-dependent. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -However, the function form can be valid in cases where the -actual side effects performed by the call are unimportant to -the application. - -For example, on a UNIX system, @samp{SAME = SYSTEM('cmp a b')} -does not perform any side effects likely to be important to the -program, so the programmer would not care if the actual system -call (and invocation of @code{cmp}) was optimized away in a situation -where the return value could be determined otherwise, or was not -actually needed (@samp{SAME} not actually referenced after the -sample assignment statement). -") - -DEFDOC (TIME_vxt, "Get the time as a character value.", "\ -Returns in @var{@1@} a character representation of the current time as -obtained from @code{ctime(3)}. - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -@xref{FDate Intrinsic (subroutine)}, for an equivalent routine. -") - -DEFDOC (IBCLR, "Clear a bit.", "\ -Returns the value of @var{@1@} with bit @var{@2@} cleared (set to -zero). -@xref{BTest Intrinsic}, for information on bit positions. -") - -DEFDOC (IBSET, "Set a bit.", "\ -Returns the value of @var{@1@} with bit @var{@2@} set (to one). -@xref{BTest Intrinsic}, for information on bit positions. -") - -DEFDOC (IBITS, "Extract a bit subfield of a variable.", "\ -Extracts a subfield of length @var{@3@} from @var{@1@}, starting from -bit position @var{@2@} and extending left for @var{@3@} bits. -The result is right-justified and the remaining bits are zeroed. -The value -of @samp{@var{@2@}+@var{@3@}} must be less than or equal to the value -@samp{BIT_SIZE(@var{@1@})}. -@xref{Bit_Size Intrinsic}. -") - -DEFDOC (ISHFT, "Logical bit shift.", "\ -All bits representing @var{@1@} are shifted @var{@2@} places. -@samp{@var{@2@}.GT.0} indicates a left shift, @samp{@var{@2@}.EQ.0} -indicates no shift and @samp{@var{@2@}.LT.0} indicates a right shift. -If the absolute value of the shift count is greater than -@samp{BIT_SIZE(@var{@1@})}, the result is undefined. -Bits shifted out from the left end or the right end are lost. -Zeros are shifted in from the opposite end. - -@xref{IShftC Intrinsic}, for the circular-shift equivalent. -") - -DEFDOC (ISHFTC, "Circular bit shift.", "\ -The rightmost @var{@3@} bits of the argument @var{@1@} -are shifted circularly @var{@2@} -places, i.e.@: the bits shifted out of one end are shifted into -the opposite end. -No bits are lost. -The unshifted bits of the result are the same as -the unshifted bits of @var{@1@}. -The absolute value of the argument @var{@2@} -must be less than or equal to @var{@3@}. -The value of @var{@3@} must be greater than or equal to one and less than -or equal to @samp{BIT_SIZE(@var{@1@})}. - -@xref{IShft Intrinsic}, for the logical shift equivalent. -") - -DEFDOC (MVBITS, "Moving a bit field.", "\ -Moves @var{@3@} bits from positions @var{@2@} through -@samp{@var{@2@}+@var{@3@}-1} of @var{@1@} to positions @var{@5@} through -@samp{@var{@2@}+@var{@3@}-1} of @var{@4@}. The portion of argument -@var{@4@} not affected by the movement of bits is unchanged. Arguments -@var{@1@} and @var{@4@} are permitted to be the same numeric storage -unit. The values of @samp{@var{@2@}+@var{@3@}} and -@samp{@var{@5@}+@var{@3@}} must be less than or equal to -@samp{BIT_SIZE(@var{@1@})}. -") - -DEFDOC (INDEX, "Locate a CHARACTER substring.", "\ -Returns the position of the start of the first occurrence of string -@var{@2@} as a substring in @var{@1@}, counting from one. -If @var{@2@} doesn't occur in @var{@1@}, zero is returned. -") - -DEFDOC (ALARM, "Execute a routine after a given delay.", "\ -Causes external subroutine @var{@2@} to be executed after a delay of -@var{@1@} seconds by using @code{alarm(1)} to set up a signal and -@code{signal(2)} to catch it. -If @var{@3@} is supplied, it will be -returned with the number of seconds remaining until any previously -scheduled alarm was due to be delivered, or zero if there was no -previously scheduled alarm. -@xref{Signal Intrinsic (subroutine)}. -") - -DEFDOC (DATE_AND_TIME, "Get the current date and time.", "\ -Returns: -@table @var -@item @1@ -The date in the form @var{ccyymmdd}: century, year, month and day; -@item @2@ -The time in the form @samp{@var{hhmmss.ss}}: hours, minutes, seconds -and milliseconds; -@item @3@ -The difference between local time and UTC (GMT) in the form @var{Shhmm}: -sign, hours and minutes, e.g.@: @samp{-0500} (winter in New York); -@item @4@ -The year, month of the year, day of the month, time difference in -minutes from UTC, hour of the day, minutes of the hour, seconds -of the minute, and milliseconds -of the second in successive values of the array. -@end table - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -On systems where a millisecond timer isn't available, the millisecond -value is returned as zero. -") diff --git a/contrib/gcc/f/intdoc.texi b/contrib/gcc/f/intdoc.texi deleted file mode 100644 index e657510..0000000 --- a/contrib/gcc/f/intdoc.texi +++ /dev/null @@ -1,10931 +0,0 @@ -@c This file is automatically derived from intdoc.c, intdoc.in, -@c ansify.c, intrin.def, and intrin.h. Edit those files instead. -@menu -@ifset familyF2U -* Abort Intrinsic:: Abort the program. -@end ifset -@ifset familyF77 -* Abs Intrinsic:: Absolute value. -@end ifset -@ifset familyF2U -* Access Intrinsic:: Check file accessibility. -@end ifset -@ifset familyASC -* AChar Intrinsic:: ASCII character from code. -@end ifset -@ifset familyF77 -* ACos Intrinsic:: Arc cosine. -@end ifset -@ifset familyVXT -* ACosD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF90 -* AdjustL Intrinsic:: (Reserved for future use.) -* AdjustR Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* AImag Intrinsic:: Convert/extract imaginary part of complex. -@end ifset -@ifset familyVXT -* AIMax0 Intrinsic:: (Reserved for future use.) -* AIMin0 Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* AInt Intrinsic:: Truncate to whole number. -@end ifset -@ifset familyVXT -* AJMax0 Intrinsic:: (Reserved for future use.) -* AJMin0 Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* Alarm Intrinsic:: Execute a routine after a given delay. -@end ifset -@ifset familyF90 -* All Intrinsic:: (Reserved for future use.) -* Allocated Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* ALog Intrinsic:: Natural logarithm (archaic). -* ALog10 Intrinsic:: Common logarithm (archaic). -* AMax0 Intrinsic:: Maximum value (archaic). -* AMax1 Intrinsic:: Maximum value (archaic). -* AMin0 Intrinsic:: Minimum value (archaic). -* AMin1 Intrinsic:: Minimum value (archaic). -* AMod Intrinsic:: Remainder (archaic). -@end ifset -@ifset familyF2C -* And Intrinsic:: Boolean AND. -@end ifset -@ifset familyF77 -* ANInt Intrinsic:: Round to nearest whole number. -@end ifset -@ifset familyF90 -* Any Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* ASin Intrinsic:: Arc sine. -@end ifset -@ifset familyVXT -* ASinD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF90 -* Associated Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* ATan Intrinsic:: Arc tangent. -* ATan2 Intrinsic:: Arc tangent. -@end ifset -@ifset familyVXT -* ATan2D Intrinsic:: (Reserved for future use.) -* ATanD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* BesJ0 Intrinsic:: Bessel function. -* BesJ1 Intrinsic:: Bessel function. -* BesJN Intrinsic:: Bessel function. -* BesY0 Intrinsic:: Bessel function. -* BesY1 Intrinsic:: Bessel function. -* BesYN Intrinsic:: Bessel function. -@end ifset -@ifset familyVXT -* BITest Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF90 -* Bit_Size Intrinsic:: Number of bits in argument's type. -@end ifset -@ifset familyVXT -* BJTest Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyMIL -* BTest Intrinsic:: Test bit. -@end ifset -@ifset familyF77 -* CAbs Intrinsic:: Absolute value (archaic). -* CCos Intrinsic:: Cosine (archaic). -@end ifset -@ifset familyFVZ -* CDAbs Intrinsic:: Absolute value (archaic). -* CDCos Intrinsic:: Cosine (archaic). -* CDExp Intrinsic:: Exponential (archaic). -* CDLog Intrinsic:: Natural logarithm (archaic). -* CDSin Intrinsic:: Sine (archaic). -* CDSqRt Intrinsic:: Square root (archaic). -@end ifset -@ifset familyF90 -* Ceiling Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* CExp Intrinsic:: Exponential (archaic). -* Char Intrinsic:: Character from code. -@end ifset -@ifset familyF2U -* ChDir Intrinsic (subroutine):: Change directory. -@end ifset -@ifset familyBADU77 -* ChDir Intrinsic (function):: Change directory. -@end ifset -@ifset familyF2U -* ChMod Intrinsic (subroutine):: Change file modes. -@end ifset -@ifset familyBADU77 -* ChMod Intrinsic (function):: Change file modes. -@end ifset -@ifset familyF77 -* CLog Intrinsic:: Natural logarithm (archaic). -* Cmplx Intrinsic:: Construct @code{COMPLEX(KIND=1)} value. -@end ifset -@ifset familyGNU -* Complex Intrinsic:: Build complex value from real and - imaginary parts. -@end ifset -@ifset familyF77 -* Conjg Intrinsic:: Complex conjugate. -* Cos Intrinsic:: Cosine. -@end ifset -@ifset familyVXT -* CosD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* CosH Intrinsic:: Hyperbolic cosine. -@end ifset -@ifset familyF90 -* Count Intrinsic:: (Reserved for future use.) -* CPU_Time Intrinsic:: Get current CPU time. -* CShift Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* CSin Intrinsic:: Sine (archaic). -* CSqRt Intrinsic:: Square root (archaic). -@end ifset -@ifset familyF2U -* CTime Intrinsic (subroutine):: Convert time to Day Mon dd hh:mm:ss yyyy. -* CTime Intrinsic (function):: Convert time to Day Mon dd hh:mm:ss yyyy. -@end ifset -@ifset familyF77 -* DAbs Intrinsic:: Absolute value (archaic). -* DACos Intrinsic:: Arc cosine (archaic). -@end ifset -@ifset familyVXT -* DACosD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* DASin Intrinsic:: Arc sine (archaic). -@end ifset -@ifset familyVXT -* DASinD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* DATan Intrinsic:: Arc tangent (archaic). -* DATan2 Intrinsic:: Arc tangent (archaic). -@end ifset -@ifset familyVXT -* DATan2D Intrinsic:: (Reserved for future use.) -* DATanD Intrinsic:: (Reserved for future use.) -* Date Intrinsic:: Get current date as dd-Mon-yy. -@end ifset -@ifset familyF90 -* Date_and_Time Intrinsic:: Get the current date and time. -@end ifset -@ifset familyF2U -* DbesJ0 Intrinsic:: Bessel function (archaic). -* DbesJ1 Intrinsic:: Bessel function (archaic). -* DbesJN Intrinsic:: Bessel function (archaic). -* DbesY0 Intrinsic:: Bessel function (archaic). -* DbesY1 Intrinsic:: Bessel function (archaic). -* DbesYN Intrinsic:: Bessel function (archaic). -@end ifset -@ifset familyF77 -* Dble Intrinsic:: Convert to double precision. -@end ifset -@ifset familyVXT -* DbleQ Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyFVZ -* DCmplx Intrinsic:: Construct @code{COMPLEX(KIND=2)} value. -* DConjg Intrinsic:: Complex conjugate (archaic). -@end ifset -@ifset familyF77 -* DCos Intrinsic:: Cosine (archaic). -@end ifset -@ifset familyVXT -* DCosD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* DCosH Intrinsic:: Hyperbolic cosine (archaic). -* DDiM Intrinsic:: Difference magnitude (archaic). -@end ifset -@ifset familyF2U -* DErF Intrinsic:: Error function (archaic). -* DErFC Intrinsic:: Complementary error function (archaic). -@end ifset -@ifset familyF77 -* DExp Intrinsic:: Exponential (archaic). -@end ifset -@ifset familyFVZ -* DFloat Intrinsic:: Conversion (archaic). -@end ifset -@ifset familyVXT -* DFlotI Intrinsic:: (Reserved for future use.) -* DFlotJ Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF90 -* Digits Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* DiM Intrinsic:: Difference magnitude (non-negative subtract). -@end ifset -@ifset familyFVZ -* DImag Intrinsic:: Convert/extract imaginary part of complex (archaic). -@end ifset -@ifset familyF77 -* DInt Intrinsic:: Truncate to whole number (archaic). -* DLog Intrinsic:: Natural logarithm (archaic). -* DLog10 Intrinsic:: Common logarithm (archaic). -* DMax1 Intrinsic:: Maximum value (archaic). -* DMin1 Intrinsic:: Minimum value (archaic). -* DMod Intrinsic:: Remainder (archaic). -* DNInt Intrinsic:: Round to nearest whole number (archaic). -@end ifset -@ifset familyF90 -* Dot_Product Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* DProd Intrinsic:: Double-precision product. -@end ifset -@ifset familyVXT -* DReal Intrinsic:: Convert value to type @code{REAL(KIND=2)}. -@end ifset -@ifset familyF77 -* DSign Intrinsic:: Apply sign to magnitude (archaic). -* DSin Intrinsic:: Sine (archaic). -@end ifset -@ifset familyVXT -* DSinD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* DSinH Intrinsic:: Hyperbolic sine (archaic). -* DSqRt Intrinsic:: Square root (archaic). -* DTan Intrinsic:: Tangent (archaic). -@end ifset -@ifset familyVXT -* DTanD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* DTanH Intrinsic:: Hyperbolic tangent (archaic). -@end ifset -@ifset familyF2U -* DTime Intrinsic (subroutine):: Get elapsed time since last time. -@end ifset -@ifset familyBADU77 -* DTime Intrinsic (function):: Get elapsed time since last time. -@end ifset -@ifset familyF90 -* EOShift Intrinsic:: (Reserved for future use.) -* Epsilon Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* ErF Intrinsic:: Error function. -* ErFC Intrinsic:: Complementary error function. -* ETime Intrinsic (subroutine):: Get elapsed time for process. -* ETime Intrinsic (function):: Get elapsed time for process. -* Exit Intrinsic:: Terminate the program. -@end ifset -@ifset familyF77 -* Exp Intrinsic:: Exponential. -@end ifset -@ifset familyF90 -* Exponent Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* FDate Intrinsic (subroutine):: Get current time as Day Mon dd hh:mm:ss yyyy. -* FDate Intrinsic (function):: Get current time as Day Mon dd hh:mm:ss yyyy. -* FGet Intrinsic (subroutine):: Read a character from unit 5 stream-wise. -@end ifset -@ifset familyBADU77 -* FGet Intrinsic (function):: Read a character from unit 5 stream-wise. -@end ifset -@ifset familyF2U -* FGetC Intrinsic (subroutine):: Read a character stream-wise. -@end ifset -@ifset familyBADU77 -* FGetC Intrinsic (function):: Read a character stream-wise. -@end ifset -@ifset familyF77 -* Float Intrinsic:: Conversion (archaic). -@end ifset -@ifset familyVXT -* FloatI Intrinsic:: (Reserved for future use.) -* FloatJ Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF90 -* Floor Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* Flush Intrinsic:: Flush buffered output. -* FNum Intrinsic:: Get file descriptor from Fortran unit number. -* FPut Intrinsic (subroutine):: Write a character to unit 6 stream-wise. -@end ifset -@ifset familyBADU77 -* FPut Intrinsic (function):: Write a character to unit 6 stream-wise. -@end ifset -@ifset familyF2U -* FPutC Intrinsic (subroutine):: Write a character stream-wise. -@end ifset -@ifset familyBADU77 -* FPutC Intrinsic (function):: Write a character stream-wise. -@end ifset -@ifset familyF90 -* Fraction Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* FSeek Intrinsic:: Position file (low-level). -* FStat Intrinsic (subroutine):: Get file information. -* FStat Intrinsic (function):: Get file information. -* FTell Intrinsic (subroutine):: Get file position (low-level). -* FTell Intrinsic (function):: Get file position (low-level). -* GError Intrinsic:: Get error message for last error. -* GetArg Intrinsic:: Obtain command-line argument. -* GetCWD Intrinsic (subroutine):: Get current working directory. -* GetCWD Intrinsic (function):: Get current working directory. -* GetEnv Intrinsic:: Get environment variable. -* GetGId Intrinsic:: Get process group id. -* GetLog Intrinsic:: Get login name. -* GetPId Intrinsic:: Get process id. -* GetUId Intrinsic:: Get process user id. -* GMTime Intrinsic:: Convert time to GMT time info. -* HostNm Intrinsic (subroutine):: Get host name. -* HostNm Intrinsic (function):: Get host name. -@end ifset -@ifset familyF90 -* Huge Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* IAbs Intrinsic:: Absolute value (archaic). -@end ifset -@ifset familyASC -* IAChar Intrinsic:: ASCII code for character. -@end ifset -@ifset familyMIL -* IAnd Intrinsic:: Boolean AND. -@end ifset -@ifset familyF2U -* IArgC Intrinsic:: Obtain count of command-line arguments. -@end ifset -@ifset familyMIL -* IBClr Intrinsic:: Clear a bit. -* IBits Intrinsic:: Extract a bit subfield of a variable. -* IBSet Intrinsic:: Set a bit. -@end ifset -@ifset familyF77 -* IChar Intrinsic:: Code for character. -@end ifset -@ifset familyF2U -* IDate Intrinsic (UNIX):: Get local time info. -@end ifset -@ifset familyVXT -* IDate Intrinsic (VXT):: Get local time info (VAX/VMS). -@end ifset -@ifset familyF77 -* IDiM Intrinsic:: Difference magnitude (archaic). -* IDInt Intrinsic:: Convert to @code{INTEGER} value truncated - to whole number (archaic). -* IDNInt Intrinsic:: Convert to @code{INTEGER} value rounded - to nearest whole number (archaic). -@end ifset -@ifset familyMIL -* IEOr Intrinsic:: Boolean XOR. -@end ifset -@ifset familyF2U -* IErrNo Intrinsic:: Get error number for last error. -@end ifset -@ifset familyF77 -* IFix Intrinsic:: Conversion (archaic). -@end ifset -@ifset familyVXT -* IIAbs Intrinsic:: (Reserved for future use.) -* IIAnd Intrinsic:: (Reserved for future use.) -* IIBClr Intrinsic:: (Reserved for future use.) -* IIBits Intrinsic:: (Reserved for future use.) -* IIBSet Intrinsic:: (Reserved for future use.) -* IIDiM Intrinsic:: (Reserved for future use.) -* IIDInt Intrinsic:: (Reserved for future use.) -* IIDNnt Intrinsic:: (Reserved for future use.) -* IIEOr Intrinsic:: (Reserved for future use.) -* IIFix Intrinsic:: (Reserved for future use.) -* IInt Intrinsic:: (Reserved for future use.) -* IIOr Intrinsic:: (Reserved for future use.) -* IIQint Intrinsic:: (Reserved for future use.) -* IIQNnt Intrinsic:: (Reserved for future use.) -* IIShftC Intrinsic:: (Reserved for future use.) -* IISign Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2C -* Imag Intrinsic:: Extract imaginary part of complex. -@end ifset -@ifset familyGNU -* ImagPart Intrinsic:: Extract imaginary part of complex. -@end ifset -@ifset familyVXT -* IMax0 Intrinsic:: (Reserved for future use.) -* IMax1 Intrinsic:: (Reserved for future use.) -* IMin0 Intrinsic:: (Reserved for future use.) -* IMin1 Intrinsic:: (Reserved for future use.) -* IMod Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* Index Intrinsic:: Locate a CHARACTER substring. -@end ifset -@ifset familyVXT -* INInt Intrinsic:: (Reserved for future use.) -* INot Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* Int Intrinsic:: Convert to @code{INTEGER} value truncated - to whole number. -@end ifset -@ifset familyGNU -* Int2 Intrinsic:: Convert to @code{INTEGER(KIND=6)} value - truncated to whole number. -* Int8 Intrinsic:: Convert to @code{INTEGER(KIND=2)} value - truncated to whole number. -@end ifset -@ifset familyMIL -* IOr Intrinsic:: Boolean OR. -@end ifset -@ifset familyF2U -* IRand Intrinsic:: Random number. -* IsaTty Intrinsic:: Is unit connected to a terminal? -@end ifset -@ifset familyMIL -* IShft Intrinsic:: Logical bit shift. -* IShftC Intrinsic:: Circular bit shift. -@end ifset -@ifset familyF77 -* ISign Intrinsic:: Apply sign to magnitude (archaic). -@end ifset -@ifset familyF2U -* ITime Intrinsic:: Get local time of day. -@end ifset -@ifset familyVXT -* IZExt Intrinsic:: (Reserved for future use.) -* JIAbs Intrinsic:: (Reserved for future use.) -* JIAnd Intrinsic:: (Reserved for future use.) -* JIBClr Intrinsic:: (Reserved for future use.) -* JIBits Intrinsic:: (Reserved for future use.) -* JIBSet Intrinsic:: (Reserved for future use.) -* JIDiM Intrinsic:: (Reserved for future use.) -* JIDInt Intrinsic:: (Reserved for future use.) -* JIDNnt Intrinsic:: (Reserved for future use.) -* JIEOr Intrinsic:: (Reserved for future use.) -* JIFix Intrinsic:: (Reserved for future use.) -* JInt Intrinsic:: (Reserved for future use.) -* JIOr Intrinsic:: (Reserved for future use.) -* JIQint Intrinsic:: (Reserved for future use.) -* JIQNnt Intrinsic:: (Reserved for future use.) -* JIShft Intrinsic:: (Reserved for future use.) -* JIShftC Intrinsic:: (Reserved for future use.) -* JISign Intrinsic:: (Reserved for future use.) -* JMax0 Intrinsic:: (Reserved for future use.) -* JMax1 Intrinsic:: (Reserved for future use.) -* JMin0 Intrinsic:: (Reserved for future use.) -* JMin1 Intrinsic:: (Reserved for future use.) -* JMod Intrinsic:: (Reserved for future use.) -* JNInt Intrinsic:: (Reserved for future use.) -* JNot Intrinsic:: (Reserved for future use.) -* JZExt Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* Kill Intrinsic (subroutine):: Signal a process. -@end ifset -@ifset familyBADU77 -* Kill Intrinsic (function):: Signal a process. -@end ifset -@ifset familyF90 -* Kind Intrinsic:: (Reserved for future use.) -* LBound Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* Len Intrinsic:: Length of character entity. -@end ifset -@ifset familyF90 -* Len_Trim Intrinsic:: Get last non-blank character in string. -@end ifset -@ifset familyF77 -* LGe Intrinsic:: Lexically greater than or equal. -* LGt Intrinsic:: Lexically greater than. -@end ifset -@ifset familyF2U -* Link Intrinsic (subroutine):: Make hard link in file system. -@end ifset -@ifset familyBADU77 -* Link Intrinsic (function):: Make hard link in file system. -@end ifset -@ifset familyF77 -* LLe Intrinsic:: Lexically less than or equal. -* LLt Intrinsic:: Lexically less than. -@end ifset -@ifset familyF2U -* LnBlnk Intrinsic:: Get last non-blank character in string. -* Loc Intrinsic:: Address of entity in core. -@end ifset -@ifset familyF77 -* Log Intrinsic:: Natural logarithm. -* Log10 Intrinsic:: Common logarithm. -@end ifset -@ifset familyF90 -* Logical Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* Long Intrinsic:: Conversion to @code{INTEGER(KIND=1)} (archaic). -@end ifset -@ifset familyF2C -* LShift Intrinsic:: Left-shift bits. -@end ifset -@ifset familyF2U -* LStat Intrinsic (subroutine):: Get file information. -* LStat Intrinsic (function):: Get file information. -* LTime Intrinsic:: Convert time to local time info. -@end ifset -@ifset familyF90 -* MatMul Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* Max Intrinsic:: Maximum value. -* Max0 Intrinsic:: Maximum value (archaic). -* Max1 Intrinsic:: Maximum value (archaic). -@end ifset -@ifset familyF90 -* MaxExponent Intrinsic:: (Reserved for future use.) -* MaxLoc Intrinsic:: (Reserved for future use.) -* MaxVal Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* MClock Intrinsic:: Get number of clock ticks for process. -* MClock8 Intrinsic:: Get number of clock ticks for process. -@end ifset -@ifset familyF90 -* Merge Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* Min Intrinsic:: Minimum value. -* Min0 Intrinsic:: Minimum value (archaic). -* Min1 Intrinsic:: Minimum value (archaic). -@end ifset -@ifset familyF90 -* MinExponent Intrinsic:: (Reserved for future use.) -* MinLoc Intrinsic:: (Reserved for future use.) -* MinVal Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* Mod Intrinsic:: Remainder. -@end ifset -@ifset familyF90 -* Modulo Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyMIL -* MvBits Intrinsic:: Moving a bit field. -@end ifset -@ifset familyF90 -* Nearest Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* NInt Intrinsic:: Convert to @code{INTEGER} value rounded - to nearest whole number. -@end ifset -@ifset familyMIL -* Not Intrinsic:: Boolean NOT. -@end ifset -@ifset familyF2C -* Or Intrinsic:: Boolean OR. -@end ifset -@ifset familyF90 -* Pack Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* PError Intrinsic:: Print error message for last error. -@end ifset -@ifset familyF90 -* Precision Intrinsic:: (Reserved for future use.) -* Present Intrinsic:: (Reserved for future use.) -* Product Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyVXT -* QAbs Intrinsic:: (Reserved for future use.) -* QACos Intrinsic:: (Reserved for future use.) -* QACosD Intrinsic:: (Reserved for future use.) -* QASin Intrinsic:: (Reserved for future use.) -* QASinD Intrinsic:: (Reserved for future use.) -* QATan Intrinsic:: (Reserved for future use.) -* QATan2 Intrinsic:: (Reserved for future use.) -* QATan2D Intrinsic:: (Reserved for future use.) -* QATanD Intrinsic:: (Reserved for future use.) -* QCos Intrinsic:: (Reserved for future use.) -* QCosD Intrinsic:: (Reserved for future use.) -* QCosH Intrinsic:: (Reserved for future use.) -* QDiM Intrinsic:: (Reserved for future use.) -* QExp Intrinsic:: (Reserved for future use.) -* QExt Intrinsic:: (Reserved for future use.) -* QExtD Intrinsic:: (Reserved for future use.) -* QFloat Intrinsic:: (Reserved for future use.) -* QInt Intrinsic:: (Reserved for future use.) -* QLog Intrinsic:: (Reserved for future use.) -* QLog10 Intrinsic:: (Reserved for future use.) -* QMax1 Intrinsic:: (Reserved for future use.) -* QMin1 Intrinsic:: (Reserved for future use.) -* QMod Intrinsic:: (Reserved for future use.) -* QNInt Intrinsic:: (Reserved for future use.) -* QSin Intrinsic:: (Reserved for future use.) -* QSinD Intrinsic:: (Reserved for future use.) -* QSinH Intrinsic:: (Reserved for future use.) -* QSqRt Intrinsic:: (Reserved for future use.) -* QTan Intrinsic:: (Reserved for future use.) -* QTanD Intrinsic:: (Reserved for future use.) -* QTanH Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF90 -* Radix Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* Rand Intrinsic:: Random number. -@end ifset -@ifset familyF90 -* Random_Number Intrinsic:: (Reserved for future use.) -* Random_Seed Intrinsic:: (Reserved for future use.) -* Range Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* Real Intrinsic:: Convert value to type @code{REAL(KIND=1)}. -@end ifset -@ifset familyGNU -* RealPart Intrinsic:: Extract real part of complex. -@end ifset -@ifset familyF2U -* Rename Intrinsic (subroutine):: Rename file. -@end ifset -@ifset familyBADU77 -* Rename Intrinsic (function):: Rename file. -@end ifset -@ifset familyF90 -* Repeat Intrinsic:: (Reserved for future use.) -* Reshape Intrinsic:: (Reserved for future use.) -* RRSpacing Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2C -* RShift Intrinsic:: Right-shift bits. -@end ifset -@ifset familyF90 -* Scale Intrinsic:: (Reserved for future use.) -* Scan Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyVXT -* Secnds Intrinsic:: Get local time offset since midnight. -@end ifset -@ifset familyF2U -* Second Intrinsic (function):: Get CPU time for process in seconds. -* Second Intrinsic (subroutine):: Get CPU time for process - in seconds. -@end ifset -@ifset familyF90 -* Selected_Int_Kind Intrinsic:: (Reserved for future use.) -* Selected_Real_Kind Intrinsic:: (Reserved for future use.) -* Set_Exponent Intrinsic:: (Reserved for future use.) -* Shape Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* Short Intrinsic:: Convert to @code{INTEGER(KIND=6)} value - truncated to whole number. -@end ifset -@ifset familyF77 -* Sign Intrinsic:: Apply sign to magnitude. -@end ifset -@ifset familyF2U -* Signal Intrinsic (subroutine):: Muck with signal handling. -@end ifset -@ifset familyBADU77 -* Signal Intrinsic (function):: Muck with signal handling. -@end ifset -@ifset familyF77 -* Sin Intrinsic:: Sine. -@end ifset -@ifset familyVXT -* SinD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* SinH Intrinsic:: Hyperbolic sine. -@end ifset -@ifset familyF2U -* Sleep Intrinsic:: Sleep for a specified time. -@end ifset -@ifset familyF77 -* Sngl Intrinsic:: Convert (archaic). -@end ifset -@ifset familyVXT -* SnglQ Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF90 -* Spacing Intrinsic:: (Reserved for future use.) -* Spread Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* SqRt Intrinsic:: Square root. -@end ifset -@ifset familyF2U -* SRand Intrinsic:: Random seed. -* Stat Intrinsic (subroutine):: Get file information. -* Stat Intrinsic (function):: Get file information. -@end ifset -@ifset familyF90 -* Sum Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* SymLnk Intrinsic (subroutine):: Make symbolic link in file system. -@end ifset -@ifset familyBADU77 -* SymLnk Intrinsic (function):: Make symbolic link in file system. -@end ifset -@ifset familyF2U -* System Intrinsic (subroutine):: Invoke shell (system) command. -@end ifset -@ifset familyBADU77 -* System Intrinsic (function):: Invoke shell (system) command. -@end ifset -@ifset familyF90 -* System_Clock Intrinsic:: Get current system clock value. -@end ifset -@ifset familyF77 -* Tan Intrinsic:: Tangent. -@end ifset -@ifset familyVXT -* TanD Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF77 -* TanH Intrinsic:: Hyperbolic tangent. -@end ifset -@ifset familyF2U -* Time Intrinsic (UNIX):: Get current time as time value. -@end ifset -@ifset familyVXT -* Time Intrinsic (VXT):: Get the time as a character value. -@end ifset -@ifset familyF2U -* Time8 Intrinsic:: Get current time as time value. -@end ifset -@ifset familyF90 -* Tiny Intrinsic:: (Reserved for future use.) -* Transfer Intrinsic:: (Reserved for future use.) -* Transpose Intrinsic:: (Reserved for future use.) -* Trim Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* TtyNam Intrinsic (subroutine):: Get name of terminal device for unit. -* TtyNam Intrinsic (function):: Get name of terminal device for unit. -@end ifset -@ifset familyF90 -* UBound Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2U -* UMask Intrinsic (subroutine):: Set file creation permissions mask. -@end ifset -@ifset familyBADU77 -* UMask Intrinsic (function):: Set file creation permissions mask. -@end ifset -@ifset familyF2U -* Unlink Intrinsic (subroutine):: Unlink file. -@end ifset -@ifset familyBADU77 -* Unlink Intrinsic (function):: Unlink file. -@end ifset -@ifset familyF90 -* Unpack Intrinsic:: (Reserved for future use.) -* Verify Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2C -* XOr Intrinsic:: Boolean XOR. -* ZAbs Intrinsic:: Absolute value (archaic). -* ZCos Intrinsic:: Cosine (archaic). -* ZExp Intrinsic:: Exponential (archaic). -@end ifset -@ifset familyVXT -* ZExt Intrinsic:: (Reserved for future use.) -@end ifset -@ifset familyF2C -* ZLog Intrinsic:: Natural logarithm (archaic). -* ZSin Intrinsic:: Sine (archaic). -* ZSqRt Intrinsic:: Square root (archaic). -@end ifset -@end menu - -@ifset familyF2U -@node Abort Intrinsic -@subsubsection Abort Intrinsic -@cindex Abort intrinsic -@cindex intrinsics, Abort - -@noindent -@example -CALL Abort() -@end example - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Prints a message and potentially causes a core dump via @code{abort(3)}. - -@end ifset -@ifset familyF77 -@node Abs Intrinsic -@subsubsection Abs Intrinsic -@cindex Abs intrinsic -@cindex intrinsics, Abs - -@noindent -@example -Abs(@var{A}) -@end example - -@noindent -Abs: @code{INTEGER} or @code{REAL} function. -The exact type depends on that of argument @var{A}---if @var{A} is -@code{COMPLEX}, this function's type is @code{REAL} -with the same @samp{KIND=} value as the type of @var{A}. -Otherwise, this function's type is the same as that of @var{A}. - -@noindent -@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the absolute value of @var{A}. - -If @var{A} is type @code{COMPLEX}, the absolute -value is computed as: - -@example -SQRT(REALPART(@var{A})**2+IMAGPART(@var{A})**2) -@end example - -@noindent -Otherwise, it is computed by negating @var{A} if -it is negative, or returning @var{A}. - -@xref{Sign Intrinsic}, for how to explicitly -compute the positive or negative form of the absolute -value of an expression. - -@end ifset -@ifset familyF2U -@node Access Intrinsic -@subsubsection Access Intrinsic -@cindex Access intrinsic -@cindex intrinsics, Access - -@noindent -@example -Access(@var{Name}, @var{Mode}) -@end example - -@noindent -Access: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Mode}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Checks file @var{Name} for accessibility in the mode specified by @var{Mode} and -returns 0 if the file is accessible in that mode, otherwise an error -code if the file is inaccessible or @var{Mode} is invalid. -See @code{access(2)}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{Name}---otherwise, -trailing blanks in @var{Name} are ignored. -@var{Mode} may be a concatenation of any of the following characters: - -@table @samp -@item r -Read permission - -@item w -Write permission - -@item x -Execute permission - -@item @kbd{SPC} -Existence -@end table - -@end ifset -@ifset familyASC -@node AChar Intrinsic -@subsubsection AChar Intrinsic -@cindex AChar intrinsic -@cindex intrinsics, AChar - -@noindent -@example -AChar(@var{I}) -@end example - -@noindent -AChar: @code{CHARACTER*1} function. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{f90}. - -@noindent -Description: - -Returns the ASCII character corresponding to the -code specified by @var{I}. - -@xref{IAChar Intrinsic}, for the inverse of this function. - -@xref{Char Intrinsic}, for the function corresponding -to the system's native character set. - -@end ifset -@ifset familyF77 -@node ACos Intrinsic -@subsubsection ACos Intrinsic -@cindex ACos intrinsic -@cindex intrinsics, ACos - -@noindent -@example -ACos(@var{X}) -@end example - -@noindent -ACos: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the arc-cosine (inverse cosine) of @var{X} -in radians. - -@xref{Cos Intrinsic}, for the inverse of this function. - -@end ifset -@ifset familyVXT -@node ACosD Intrinsic -@subsubsection ACosD Intrinsic -@cindex ACosD intrinsic -@cindex intrinsics, ACosD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL ACosD} to use this name for an -external procedure. - -@end ifset -@ifset familyF90 -@node AdjustL Intrinsic -@subsubsection AdjustL Intrinsic -@cindex AdjustL intrinsic -@cindex intrinsics, AdjustL - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL AdjustL} to use this name for an -external procedure. - -@node AdjustR Intrinsic -@subsubsection AdjustR Intrinsic -@cindex AdjustR intrinsic -@cindex intrinsics, AdjustR - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL AdjustR} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node AImag Intrinsic -@subsubsection AImag Intrinsic -@cindex AImag intrinsic -@cindex intrinsics, AImag - -@noindent -@example -AImag(@var{Z}) -@end example - -@noindent -AImag: @code{REAL} function. -This intrinsic is valid when argument @var{Z} is -@code{COMPLEX(KIND=1)}. -When @var{Z} is any other @code{COMPLEX} type, -this intrinsic is valid only when used as the argument to -@code{REAL()}, as explained below. - -@noindent -@var{Z}: @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the (possibly converted) imaginary part of @var{Z}. - -Use of @code{AIMAG()} with an argument of a type -other than @code{COMPLEX(KIND=1)} is restricted to the following case: - -@example -REAL(AIMAG(Z)) -@end example - -@noindent -This expression converts the imaginary part of Z to -@code{REAL(KIND=1)}. - -@xref{REAL() and AIMAG() of Complex}, for more information. - -@end ifset -@ifset familyVXT -@node AIMax0 Intrinsic -@subsubsection AIMax0 Intrinsic -@cindex AIMax0 intrinsic -@cindex intrinsics, AIMax0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL AIMax0} to use this name for an -external procedure. - -@node AIMin0 Intrinsic -@subsubsection AIMin0 Intrinsic -@cindex AIMin0 intrinsic -@cindex intrinsics, AIMin0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL AIMin0} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node AInt Intrinsic -@subsubsection AInt Intrinsic -@cindex AInt intrinsic -@cindex intrinsics, AInt - -@noindent -@example -AInt(@var{A}) -@end example - -@noindent -AInt: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{A}. - -@noindent -@var{A}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @var{A} with the fractional portion of its -magnitude truncated and its sign preserved. -(Also called ``truncation towards zero''.) - -@xref{ANInt Intrinsic}, for how to round to nearest -whole number. - -@xref{Int Intrinsic}, for how to truncate and then convert -number to @code{INTEGER}. - -@end ifset -@ifset familyVXT -@node AJMax0 Intrinsic -@subsubsection AJMax0 Intrinsic -@cindex AJMax0 intrinsic -@cindex intrinsics, AJMax0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL AJMax0} to use this name for an -external procedure. - -@node AJMin0 Intrinsic -@subsubsection AJMin0 Intrinsic -@cindex AJMin0 intrinsic -@cindex intrinsics, AJMin0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL AJMin0} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node Alarm Intrinsic -@subsubsection Alarm Intrinsic -@cindex Alarm intrinsic -@cindex intrinsics, Alarm - -@noindent -@example -CALL Alarm(@var{Seconds}, @var{Handler}, @var{Status}) -@end example - -@noindent -@var{Seconds}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Handler}: Signal handler (@code{INTEGER FUNCTION} or @code{SUBROUTINE}) -or dummy/global @code{INTEGER(KIND=1)} scalar. - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Causes external subroutine @var{Handler} to be executed after a delay of -@var{Seconds} seconds by using @code{alarm(1)} to set up a signal and -@code{signal(2)} to catch it. -If @var{Status} is supplied, it will be -returned with the number of seconds remaining until any previously -scheduled alarm was due to be delivered, or zero if there was no -previously scheduled alarm. -@xref{Signal Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node All Intrinsic -@subsubsection All Intrinsic -@cindex All intrinsic -@cindex intrinsics, All - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL All} to use this name for an -external procedure. - -@node Allocated Intrinsic -@subsubsection Allocated Intrinsic -@cindex Allocated intrinsic -@cindex intrinsics, Allocated - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Allocated} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node ALog Intrinsic -@subsubsection ALog Intrinsic -@cindex ALog intrinsic -@cindex intrinsics, ALog - -@noindent -@example -ALog(@var{X}) -@end example - -@noindent -ALog: @code{REAL(KIND=1)} function. - -@noindent -@var{X}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{LOG()} that is specific -to one type for @var{X}. -@xref{Log Intrinsic}. - -@node ALog10 Intrinsic -@subsubsection ALog10 Intrinsic -@cindex ALog10 intrinsic -@cindex intrinsics, ALog10 - -@noindent -@example -ALog10(@var{X}) -@end example - -@noindent -ALog10: @code{REAL(KIND=1)} function. - -@noindent -@var{X}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{LOG10()} that is specific -to one type for @var{X}. -@xref{Log10 Intrinsic}. - -@node AMax0 Intrinsic -@subsubsection AMax0 Intrinsic -@cindex AMax0 intrinsic -@cindex intrinsics, AMax0 - -@noindent -@example -AMax0(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -AMax0: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MAX()} that is specific -to one type for @var{A} and a different return type. -@xref{Max Intrinsic}. - -@node AMax1 Intrinsic -@subsubsection AMax1 Intrinsic -@cindex AMax1 intrinsic -@cindex intrinsics, AMax1 - -@noindent -@example -AMax1(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -AMax1: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MAX()} that is specific -to one type for @var{A}. -@xref{Max Intrinsic}. - -@node AMin0 Intrinsic -@subsubsection AMin0 Intrinsic -@cindex AMin0 intrinsic -@cindex intrinsics, AMin0 - -@noindent -@example -AMin0(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -AMin0: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MIN()} that is specific -to one type for @var{A} and a different return type. -@xref{Min Intrinsic}. - -@node AMin1 Intrinsic -@subsubsection AMin1 Intrinsic -@cindex AMin1 intrinsic -@cindex intrinsics, AMin1 - -@noindent -@example -AMin1(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -AMin1: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MIN()} that is specific -to one type for @var{A}. -@xref{Min Intrinsic}. - -@node AMod Intrinsic -@subsubsection AMod Intrinsic -@cindex AMod intrinsic -@cindex intrinsics, AMod - -@noindent -@example -AMod(@var{A}, @var{P}) -@end example - -@noindent -AMod: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -@var{P}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MOD()} that is specific -to one type for @var{A}. -@xref{Mod Intrinsic}. - -@end ifset -@ifset familyF2C -@node And Intrinsic -@subsubsection And Intrinsic -@cindex And intrinsic -@cindex intrinsics, And - -@noindent -@example -And(@var{I}, @var{J}) -@end example - -@noindent -And: @code{INTEGER} or @code{LOGICAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{I}: @code{INTEGER} or @code{LOGICAL}; scalar; INTENT(IN). - -@noindent -@var{J}: @code{INTEGER} or @code{LOGICAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Returns value resulting from boolean AND of -pair of bits in each of @var{I} and @var{J}. - -@end ifset -@ifset familyF77 -@node ANInt Intrinsic -@subsubsection ANInt Intrinsic -@cindex ANInt intrinsic -@cindex intrinsics, ANInt - -@noindent -@example -ANInt(@var{A}) -@end example - -@noindent -ANInt: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{A}. - -@noindent -@var{A}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @var{A} with the fractional portion of its -magnitude eliminated by rounding to the nearest whole -number and with its sign preserved. - -A fractional portion exactly equal to -@samp{.5} is rounded to the whole number that -is larger in magnitude. -(Also called ``Fortran round''.) - -@xref{AInt Intrinsic}, for how to truncate to -whole number. - -@xref{NInt Intrinsic}, for how to round and then convert -number to @code{INTEGER}. - -@end ifset -@ifset familyF90 -@node Any Intrinsic -@subsubsection Any Intrinsic -@cindex Any intrinsic -@cindex intrinsics, Any - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Any} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node ASin Intrinsic -@subsubsection ASin Intrinsic -@cindex ASin intrinsic -@cindex intrinsics, ASin - -@noindent -@example -ASin(@var{X}) -@end example - -@noindent -ASin: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the arc-sine (inverse sine) of @var{X} -in radians. - -@xref{Sin Intrinsic}, for the inverse of this function. - -@end ifset -@ifset familyVXT -@node ASinD Intrinsic -@subsubsection ASinD Intrinsic -@cindex ASinD intrinsic -@cindex intrinsics, ASinD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL ASinD} to use this name for an -external procedure. - -@end ifset -@ifset familyF90 -@node Associated Intrinsic -@subsubsection Associated Intrinsic -@cindex Associated intrinsic -@cindex intrinsics, Associated - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Associated} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node ATan Intrinsic -@subsubsection ATan Intrinsic -@cindex ATan intrinsic -@cindex intrinsics, ATan - -@noindent -@example -ATan(@var{X}) -@end example - -@noindent -ATan: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the arc-tangent (inverse tangent) of @var{X} -in radians. - -@xref{Tan Intrinsic}, for the inverse of this function. - -@node ATan2 Intrinsic -@subsubsection ATan2 Intrinsic -@cindex ATan2 intrinsic -@cindex intrinsics, ATan2 - -@noindent -@example -ATan2(@var{Y}, @var{X}) -@end example - -@noindent -ATan2: @code{REAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{Y}: @code{REAL}; scalar; INTENT(IN). - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the arc-tangent (inverse tangent) of the complex -number (@var{Y}, @var{X}) in radians. - -@xref{Tan Intrinsic}, for the inverse of this function. - -@end ifset -@ifset familyVXT -@node ATan2D Intrinsic -@subsubsection ATan2D Intrinsic -@cindex ATan2D intrinsic -@cindex intrinsics, ATan2D - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL ATan2D} to use this name for an -external procedure. - -@node ATanD Intrinsic -@subsubsection ATanD Intrinsic -@cindex ATanD intrinsic -@cindex intrinsics, ATanD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL ATanD} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node BesJ0 Intrinsic -@subsubsection BesJ0 Intrinsic -@cindex BesJ0 intrinsic -@cindex intrinsics, BesJ0 - -@noindent -@example -BesJ0(@var{X}) -@end example - -@noindent -BesJ0: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Calculates the Bessel function of the first kind of order 0 of @var{X}. -See @code{bessel(3m)}, on whose implementation the function depends. -@node BesJ1 Intrinsic -@subsubsection BesJ1 Intrinsic -@cindex BesJ1 intrinsic -@cindex intrinsics, BesJ1 - -@noindent -@example -BesJ1(@var{X}) -@end example - -@noindent -BesJ1: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Calculates the Bessel function of the first kind of order 1 of @var{X}. -See @code{bessel(3m)}, on whose implementation the function depends. -@node BesJN Intrinsic -@subsubsection BesJN Intrinsic -@cindex BesJN intrinsic -@cindex intrinsics, BesJN - -@noindent -@example -BesJN(@var{N}, @var{X}) -@end example - -@noindent -BesJN: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN). - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Calculates the Bessel function of the first kind of order @var{N} of @var{X}. -See @code{bessel(3m)}, on whose implementation the function depends. -@node BesY0 Intrinsic -@subsubsection BesY0 Intrinsic -@cindex BesY0 intrinsic -@cindex intrinsics, BesY0 - -@noindent -@example -BesY0(@var{X}) -@end example - -@noindent -BesY0: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Calculates the Bessel function of the second kind of order 0 of @var{X}. -See @code{bessel(3m)}, on whose implementation the function depends. -@node BesY1 Intrinsic -@subsubsection BesY1 Intrinsic -@cindex BesY1 intrinsic -@cindex intrinsics, BesY1 - -@noindent -@example -BesY1(@var{X}) -@end example - -@noindent -BesY1: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Calculates the Bessel function of the second kind of order 1 of @var{X}. -See @code{bessel(3m)}, on whose implementation the function depends. -@node BesYN Intrinsic -@subsubsection BesYN Intrinsic -@cindex BesYN intrinsic -@cindex intrinsics, BesYN - -@noindent -@example -BesYN(@var{N}, @var{X}) -@end example - -@noindent -BesYN: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN). - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Calculates the Bessel function of the second kind of order @var{N} of @var{X}. -See @code{bessel(3m)}, on whose implementation the function depends. -@end ifset -@ifset familyVXT -@node BITest Intrinsic -@subsubsection BITest Intrinsic -@cindex BITest intrinsic -@cindex intrinsics, BITest - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL BITest} to use this name for an -external procedure. - -@end ifset -@ifset familyF90 -@node Bit_Size Intrinsic -@subsubsection Bit_Size Intrinsic -@cindex Bit_Size intrinsic -@cindex intrinsics, Bit_Size - -@noindent -@example -Bit_Size(@var{I}) -@end example - -@noindent -Bit_Size: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar. - -@noindent -Intrinsic groups: @code{f90}. - -@noindent -Description: - -Returns the number of bits (integer precision plus sign bit) -represented by the type for @var{I}. - -@xref{BTest Intrinsic}, for how to test the value of a -bit in a variable or array. - -@xref{IBSet Intrinsic}, for how to set a bit in a variable to 1. - -@xref{IBClr Intrinsic}, for how to set a bit in a variable to 0. - - -@end ifset -@ifset familyVXT -@node BJTest Intrinsic -@subsubsection BJTest Intrinsic -@cindex BJTest intrinsic -@cindex intrinsics, BJTest - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL BJTest} to use this name for an -external procedure. - -@end ifset -@ifset familyMIL -@node BTest Intrinsic -@subsubsection BTest Intrinsic -@cindex BTest intrinsic -@cindex intrinsics, BTest - -@noindent -@example -BTest(@var{I}, @var{Pos}) -@end example - -@noindent -BTest: @code{LOGICAL(KIND=1)} function. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Pos}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Returns @code{.TRUE.} if bit @var{Pos} in @var{I} is -1, @code{.FALSE.} otherwise. - -(Bit 0 is the low-order (rightmost) bit, adding the value -@ifinfo -2**0, -@end ifinfo -@iftex -@tex -$2^0$, -@end tex -@end iftex -or 1, -to the number if set to 1; -bit 1 is the next-higher-order bit, adding -@ifinfo -2**1, -@end ifinfo -@iftex -@tex -$2^1$, -@end tex -@end iftex -or 2; -bit 2 adds -@ifinfo -2**2, -@end ifinfo -@iftex -@tex -$2^2$, -@end tex -@end iftex -or 4; and so on.) - -@xref{Bit_Size Intrinsic}, for how to obtain the number of bits -in a type. -The leftmost bit of @var{I} is @samp{BIT_SIZE(@var{I}-1)}. - -@end ifset -@ifset familyF77 -@node CAbs Intrinsic -@subsubsection CAbs Intrinsic -@cindex CAbs intrinsic -@cindex intrinsics, CAbs - -@noindent -@example -CAbs(@var{A}) -@end example - -@noindent -CAbs: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ABS()} that is specific -to one type for @var{A}. -@xref{Abs Intrinsic}. - -@node CCos Intrinsic -@subsubsection CCos Intrinsic -@cindex CCos intrinsic -@cindex intrinsics, CCos - -@noindent -@example -CCos(@var{X}) -@end example - -@noindent -CCos: @code{COMPLEX(KIND=1)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{COS()} that is specific -to one type for @var{X}. -@xref{Cos Intrinsic}. - -@end ifset -@ifset familyFVZ -@node CDAbs Intrinsic -@subsubsection CDAbs Intrinsic -@cindex CDAbs intrinsic -@cindex intrinsics, CDAbs - -@noindent -@example -CDAbs(@var{A}) -@end example - -@noindent -CDAbs: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{ABS()} that is specific -to one type for @var{A}. -@xref{Abs Intrinsic}. - -@node CDCos Intrinsic -@subsubsection CDCos Intrinsic -@cindex CDCos intrinsic -@cindex intrinsics, CDCos - -@noindent -@example -CDCos(@var{X}) -@end example - -@noindent -CDCos: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{COS()} that is specific -to one type for @var{X}. -@xref{Cos Intrinsic}. - -@node CDExp Intrinsic -@subsubsection CDExp Intrinsic -@cindex CDExp intrinsic -@cindex intrinsics, CDExp - -@noindent -@example -CDExp(@var{X}) -@end example - -@noindent -CDExp: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{EXP()} that is specific -to one type for @var{X}. -@xref{Exp Intrinsic}. - -@node CDLog Intrinsic -@subsubsection CDLog Intrinsic -@cindex CDLog intrinsic -@cindex intrinsics, CDLog - -@noindent -@example -CDLog(@var{X}) -@end example - -@noindent -CDLog: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{LOG()} that is specific -to one type for @var{X}. -@xref{Log Intrinsic}. - -@node CDSin Intrinsic -@subsubsection CDSin Intrinsic -@cindex CDSin intrinsic -@cindex intrinsics, CDSin - -@noindent -@example -CDSin(@var{X}) -@end example - -@noindent -CDSin: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{SIN()} that is specific -to one type for @var{X}. -@xref{Sin Intrinsic}. - -@node CDSqRt Intrinsic -@subsubsection CDSqRt Intrinsic -@cindex CDSqRt intrinsic -@cindex intrinsics, CDSqRt - -@noindent -@example -CDSqRt(@var{X}) -@end example - -@noindent -CDSqRt: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{SQRT()} that is specific -to one type for @var{X}. -@xref{SqRt Intrinsic}. - -@end ifset -@ifset familyF90 -@node Ceiling Intrinsic -@subsubsection Ceiling Intrinsic -@cindex Ceiling intrinsic -@cindex intrinsics, Ceiling - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Ceiling} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node CExp Intrinsic -@subsubsection CExp Intrinsic -@cindex CExp intrinsic -@cindex intrinsics, CExp - -@noindent -@example -CExp(@var{X}) -@end example - -@noindent -CExp: @code{COMPLEX(KIND=1)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{EXP()} that is specific -to one type for @var{X}. -@xref{Exp Intrinsic}. - -@node Char Intrinsic -@subsubsection Char Intrinsic -@cindex Char intrinsic -@cindex intrinsics, Char - -@noindent -@example -Char(@var{I}) -@end example - -@noindent -Char: @code{CHARACTER*1} function. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the character corresponding to the -code specified by @var{I}, using the system's -native character set. - -Because the system's native character set is used, -the correspondence between character and their codes -is not necessarily the same between GNU Fortran -implementations. - -Note that no intrinsic exists to convert a numerical -value to a printable character string. -For example, there is no intrinsic that, given -an @code{INTEGER} or @code{REAL} argument with the -value @samp{154}, returns the @code{CHARACTER} -result @samp{'154'}. - -Instead, you can use internal-file I/O to do this kind -of conversion. -For example: - -@smallexample -INTEGER VALUE -CHARACTER*10 STRING -VALUE = 154 -WRITE (STRING, '(I10)'), VALUE -PRINT *, STRING -END -@end smallexample - -The above program, when run, prints: - -@smallexample - 154 -@end smallexample - -@xref{IChar Intrinsic}, for the inverse of the @code{CHAR} function. - -@xref{AChar Intrinsic}, for the function corresponding -to the ASCII character set. - -@end ifset -@ifset familyF2U -@node ChDir Intrinsic (subroutine) -@subsubsection ChDir Intrinsic (subroutine) -@cindex ChDir intrinsic -@cindex intrinsics, ChDir - -@noindent -@example -CALL ChDir(@var{Dir}, @var{Status}) -@end example - -@noindent -@var{Dir}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Sets the current working directory to be @var{Dir}. -If the @var{Status} argument is supplied, it contains 0 -on success or a nonzero error code otherwise upon return. -See @code{chdir(3)}. - -@emph{Caution:} Using this routine during I/O to a unit connected with a -non-absolute file name can cause subsequent I/O on such a unit to fail -because the I/O library might reopen files by name. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{ChDir Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node ChDir Intrinsic (function) -@subsubsection ChDir Intrinsic (function) -@cindex ChDir intrinsic -@cindex intrinsics, ChDir - -@noindent -@example -ChDir(@var{Dir}) -@end example - -@noindent -ChDir: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Dir}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Sets the current working directory to be @var{Dir}. -Returns 0 on success or a nonzero error code. -See @code{chdir(3)}. - -@emph{Caution:} Using this routine during I/O to a unit connected with a -non-absolute file name can cause subsequent I/O on such a unit to fail -because the I/O library might reopen files by name. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{ChDir Intrinsic (subroutine)}. - -@end ifset -@ifset familyF2U -@node ChMod Intrinsic (subroutine) -@subsubsection ChMod Intrinsic (subroutine) -@cindex ChMod intrinsic -@cindex intrinsics, ChMod - -@noindent -@example -CALL ChMod(@var{Name}, @var{Mode}, @var{Status}) -@end example - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Mode}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Changes the access mode of file @var{Name} according to the -specification @var{Mode}, which is given in the format of -@code{chmod(1)}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{Name}---otherwise, -trailing blanks in @var{Name} are ignored. -Currently, @var{Name} must not contain the single quote -character. - -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Note that this currently works -by actually invoking @code{/bin/chmod} (or the @code{chmod} found when -the library was configured) and so might fail in some circumstances and -will, anyway, be slow. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{ChMod Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node ChMod Intrinsic (function) -@subsubsection ChMod Intrinsic (function) -@cindex ChMod intrinsic -@cindex intrinsics, ChMod - -@noindent -@example -ChMod(@var{Name}, @var{Mode}) -@end example - -@noindent -ChMod: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Mode}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Changes the access mode of file @var{Name} according to the -specification @var{Mode}, which is given in the format of -@code{chmod(1)}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{Name}---otherwise, -trailing blanks in @var{Name} are ignored. -Currently, @var{Name} must not contain the single quote -character. - -Returns 0 on success or a nonzero error code otherwise. - -Note that this currently works -by actually invoking @code{/bin/chmod} (or the @code{chmod} found when -the library was configured) and so might fail in some circumstances and -will, anyway, be slow. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{ChMod Intrinsic (subroutine)}. - -@end ifset -@ifset familyF77 -@node CLog Intrinsic -@subsubsection CLog Intrinsic -@cindex CLog intrinsic -@cindex intrinsics, CLog - -@noindent -@example -CLog(@var{X}) -@end example - -@noindent -CLog: @code{COMPLEX(KIND=1)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{LOG()} that is specific -to one type for @var{X}. -@xref{Log Intrinsic}. - -@node Cmplx Intrinsic -@subsubsection Cmplx Intrinsic -@cindex Cmplx intrinsic -@cindex intrinsics, Cmplx - -@noindent -@example -Cmplx(@var{X}, @var{Y}) -@end example - -@noindent -Cmplx: @code{COMPLEX(KIND=1)} function. - -@noindent -@var{X}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -@var{Y}: @code{INTEGER} or @code{REAL}; OPTIONAL (must be omitted if @var{X} is @code{COMPLEX}); scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -If @var{X} is not type @code{COMPLEX}, -constructs a value of type @code{COMPLEX(KIND=1)} from the -real and imaginary values specified by @var{X} and -@var{Y}, respectively. -If @var{Y} is omitted, @samp{0.} is assumed. - -If @var{X} is type @code{COMPLEX}, -converts it to type @code{COMPLEX(KIND=1)}. - -@xref{Complex Intrinsic}, for information on easily constructing -a @code{COMPLEX} value of arbitrary precision from @code{REAL} -arguments. - -@end ifset -@ifset familyGNU -@node Complex Intrinsic -@subsubsection Complex Intrinsic -@cindex Complex intrinsic -@cindex intrinsics, Complex - -@noindent -@example -Complex(@var{Real}, @var{Imag}) -@end example - -@noindent -Complex: @code{COMPLEX} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{Real}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -@var{Imag}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{gnu}. - -@noindent -Description: - -Returns a @code{COMPLEX} value that has @samp{Real} and @samp{Imag} as its -real and imaginary parts, respectively. - -If @var{Real} and @var{Imag} are the same type, and that type is not -@code{INTEGER}, no data conversion is performed, and the type of -the resulting value has the same kind value as the types -of @var{Real} and @var{Imag}. - -If @var{Real} and @var{Imag} are not the same type, the usual type-promotion -rules are applied to both, converting either or both to the -appropriate @code{REAL} type. -The type of the resulting value has the same kind value as the -type to which both @var{Real} and @var{Imag} were converted, in this case. - -If @var{Real} and @var{Imag} are both @code{INTEGER}, they are both converted -to @code{REAL(KIND=1)}, and the result of the @code{COMPLEX()} -invocation is type @code{COMPLEX(KIND=1)}. - -@emph{Note:} The way to do this in standard Fortran 90 -is too hairy to describe here, but it is important to -note that @samp{CMPLX(D1,D2)} returns a @code{COMPLEX(KIND=1)} -result even if @samp{D1} and @samp{D2} are type @code{REAL(KIND=2)}. -Hence the availability of @code{COMPLEX()} in GNU Fortran. - -@end ifset -@ifset familyF77 -@node Conjg Intrinsic -@subsubsection Conjg Intrinsic -@cindex Conjg intrinsic -@cindex intrinsics, Conjg - -@noindent -@example -Conjg(@var{Z}) -@end example - -@noindent -Conjg: @code{COMPLEX} function, the @samp{KIND=} value of the type being that of argument @var{Z}. - -@noindent -@var{Z}: @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the complex conjugate: - -@example -COMPLEX(REALPART(@var{Z}), -IMAGPART(@var{Z})) -@end example - -@node Cos Intrinsic -@subsubsection Cos Intrinsic -@cindex Cos intrinsic -@cindex intrinsics, Cos - -@noindent -@example -Cos(@var{X}) -@end example - -@noindent -Cos: @code{REAL} or @code{COMPLEX} function, the exact type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL} or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the cosine of @var{X}, an angle measured -in radians. - -@xref{ACos Intrinsic}, for the inverse of this function. - -@end ifset -@ifset familyVXT -@node CosD Intrinsic -@subsubsection CosD Intrinsic -@cindex CosD intrinsic -@cindex intrinsics, CosD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL CosD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node CosH Intrinsic -@subsubsection CosH Intrinsic -@cindex CosH intrinsic -@cindex intrinsics, CosH - -@noindent -@example -CosH(@var{X}) -@end example - -@noindent -CosH: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the hyperbolic cosine of @var{X}. - -@end ifset -@ifset familyF90 -@node Count Intrinsic -@subsubsection Count Intrinsic -@cindex Count intrinsic -@cindex intrinsics, Count - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Count} to use this name for an -external procedure. - -@node CPU_Time Intrinsic -@subsubsection CPU_Time Intrinsic -@cindex CPU_Time intrinsic -@cindex intrinsics, CPU_Time - -@noindent -@example -CALL CPU_Time(@var{Seconds}) -@end example - -@noindent -@var{Seconds}: @code{REAL}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{f90}. - -@noindent -Description: - -Returns in @var{Seconds} the current value of the system time. -This implementation of the Fortran 95 intrinsic is just an alias for -@code{second} @xref{Second Intrinsic (subroutine)}. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -@node CShift Intrinsic -@subsubsection CShift Intrinsic -@cindex CShift intrinsic -@cindex intrinsics, CShift - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL CShift} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node CSin Intrinsic -@subsubsection CSin Intrinsic -@cindex CSin intrinsic -@cindex intrinsics, CSin - -@noindent -@example -CSin(@var{X}) -@end example - -@noindent -CSin: @code{COMPLEX(KIND=1)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{SIN()} that is specific -to one type for @var{X}. -@xref{Sin Intrinsic}. - -@node CSqRt Intrinsic -@subsubsection CSqRt Intrinsic -@cindex CSqRt intrinsic -@cindex intrinsics, CSqRt - -@noindent -@example -CSqRt(@var{X}) -@end example - -@noindent -CSqRt: @code{COMPLEX(KIND=1)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{SQRT()} that is specific -to one type for @var{X}. -@xref{SqRt Intrinsic}. - -@end ifset -@ifset familyF2U -@node CTime Intrinsic (subroutine) -@subsubsection CTime Intrinsic (subroutine) -@cindex CTime intrinsic -@cindex intrinsics, CTime - -@noindent -@example -CALL CTime(@var{STime}, @var{Result}) -@end example - -@noindent -@var{STime}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Result}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Converts @var{STime}, a system time value, such as returned by -@code{TIME8()}, to a string of the form @samp{Sat Aug 19 18:13:14 1995}, -and returns that string in @var{Result}. - -@xref{Time8 Intrinsic}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. - -For information on other intrinsics with the same name: -@xref{CTime Intrinsic (function)}. - -@node CTime Intrinsic (function) -@subsubsection CTime Intrinsic (function) -@cindex CTime intrinsic -@cindex intrinsics, CTime - -@noindent -@example -CTime(@var{STime}) -@end example - -@noindent -CTime: @code{CHARACTER*(*)} function. - -@noindent -@var{STime}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Converts @var{STime}, a system time value, such as returned by -@code{TIME8()}, to a string of the form @samp{Sat Aug 19 18:13:14 1995}, -and returns that string as the function value. - -@xref{Time8 Intrinsic}. - -For information on other intrinsics with the same name: -@xref{CTime Intrinsic (subroutine)}. - -@end ifset -@ifset familyF77 -@node DAbs Intrinsic -@subsubsection DAbs Intrinsic -@cindex DAbs intrinsic -@cindex intrinsics, DAbs - -@noindent -@example -DAbs(@var{A}) -@end example - -@noindent -DAbs: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ABS()} that is specific -to one type for @var{A}. -@xref{Abs Intrinsic}. - -@node DACos Intrinsic -@subsubsection DACos Intrinsic -@cindex DACos intrinsic -@cindex intrinsics, DACos - -@noindent -@example -DACos(@var{X}) -@end example - -@noindent -DACos: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ACOS()} that is specific -to one type for @var{X}. -@xref{ACos Intrinsic}. - -@end ifset -@ifset familyVXT -@node DACosD Intrinsic -@subsubsection DACosD Intrinsic -@cindex DACosD intrinsic -@cindex intrinsics, DACosD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DACosD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node DASin Intrinsic -@subsubsection DASin Intrinsic -@cindex DASin intrinsic -@cindex intrinsics, DASin - -@noindent -@example -DASin(@var{X}) -@end example - -@noindent -DASin: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ASIN()} that is specific -to one type for @var{X}. -@xref{ASin Intrinsic}. - -@end ifset -@ifset familyVXT -@node DASinD Intrinsic -@subsubsection DASinD Intrinsic -@cindex DASinD intrinsic -@cindex intrinsics, DASinD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DASinD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node DATan Intrinsic -@subsubsection DATan Intrinsic -@cindex DATan intrinsic -@cindex intrinsics, DATan - -@noindent -@example -DATan(@var{X}) -@end example - -@noindent -DATan: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ATAN()} that is specific -to one type for @var{X}. -@xref{ATan Intrinsic}. - -@node DATan2 Intrinsic -@subsubsection DATan2 Intrinsic -@cindex DATan2 intrinsic -@cindex intrinsics, DATan2 - -@noindent -@example -DATan2(@var{Y}, @var{X}) -@end example - -@noindent -DATan2: @code{REAL(KIND=2)} function. - -@noindent -@var{Y}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ATAN2()} that is specific -to one type for @var{Y} and @var{X}. -@xref{ATan2 Intrinsic}. - -@end ifset -@ifset familyVXT -@node DATan2D Intrinsic -@subsubsection DATan2D Intrinsic -@cindex DATan2D intrinsic -@cindex intrinsics, DATan2D - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DATan2D} to use this name for an -external procedure. - -@node DATanD Intrinsic -@subsubsection DATanD Intrinsic -@cindex DATanD intrinsic -@cindex intrinsics, DATanD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DATanD} to use this name for an -external procedure. - -@node Date Intrinsic -@subsubsection Date Intrinsic -@cindex Date intrinsic -@cindex intrinsics, Date - -@noindent -@example -CALL Date(@var{Date}) -@end example - -@noindent -@var{Date}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{vxt}. - -@noindent -Description: - -Returns @var{Date} in the form @samp{@var{dd}-@var{mmm}-@var{yy}}, -representing the numeric day of the month @var{dd}, a three-character -abbreviation of the month name @var{mmm} and the last two digits of -the year @var{yy}, e.g.@: @samp{25-Nov-96}. - -@cindex Y2K compliance -@cindex Year 2000 compliance -This intrinsic is not recommended, due to the year 2000 approaching. -Therefore, programs making use of this intrinsic -might not be Year 2000 (Y2K) compliant. -@xref{CTime Intrinsic (subroutine)}, for information on obtaining more digits -for the current (or any) date. - -@end ifset -@ifset familyF90 -@node Date_and_Time Intrinsic -@subsubsection Date_and_Time Intrinsic -@cindex Date_and_Time intrinsic -@cindex intrinsics, Date_and_Time - -@noindent -@example -CALL Date_and_Time(@var{Date}, @var{Time}, @var{Zone}, @var{Values}) -@end example - -@noindent -@var{Date}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -@var{Time}: @code{CHARACTER}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -@var{Zone}: @code{CHARACTER}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -@var{Values}: @code{INTEGER(KIND=1)}; OPTIONAL; DIMENSION(8); INTENT(OUT). - -@noindent -Intrinsic groups: @code{f90}. - -@noindent -Description: - -Returns: -@table @var -@item Date -The date in the form @var{ccyymmdd}: century, year, month and day; -@item Time -The time in the form @samp{@var{hhmmss.ss}}: hours, minutes, seconds -and milliseconds; -@item Zone -The difference between local time and UTC (GMT) in the form @var{Shhmm}: -sign, hours and minutes, e.g.@: @samp{-0500} (winter in New York); -@item Values -The year, month of the year, day of the month, time difference in -minutes from UTC, hour of the day, minutes of the hour, seconds -of the minute, and milliseconds -of the second in successive values of the array. -@end table - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -On systems where a millisecond timer isn't available, the millisecond -value is returned as zero. - -@end ifset -@ifset familyF2U -@node DbesJ0 Intrinsic -@subsubsection DbesJ0 Intrinsic -@cindex DbesJ0 intrinsic -@cindex intrinsics, DbesJ0 - -@noindent -@example -DbesJ0(@var{X}) -@end example - -@noindent -DbesJ0: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{BESJ0()} that is specific -to one type for @var{X}. -@xref{BesJ0 Intrinsic}. - -@node DbesJ1 Intrinsic -@subsubsection DbesJ1 Intrinsic -@cindex DbesJ1 intrinsic -@cindex intrinsics, DbesJ1 - -@noindent -@example -DbesJ1(@var{X}) -@end example - -@noindent -DbesJ1: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{BESJ1()} that is specific -to one type for @var{X}. -@xref{BesJ1 Intrinsic}. - -@node DbesJN Intrinsic -@subsubsection DbesJN Intrinsic -@cindex DbesJN intrinsic -@cindex intrinsics, DbesJN - -@noindent -@example -DbesJN(@var{N}, @var{X}) -@end example - -@noindent -DbesJN: @code{REAL(KIND=2)} function. - -@noindent -@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN). - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{BESJN()} that is specific -to one type for @var{X}. -@xref{BesJN Intrinsic}. - -@node DbesY0 Intrinsic -@subsubsection DbesY0 Intrinsic -@cindex DbesY0 intrinsic -@cindex intrinsics, DbesY0 - -@noindent -@example -DbesY0(@var{X}) -@end example - -@noindent -DbesY0: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{BESY0()} that is specific -to one type for @var{X}. -@xref{BesY0 Intrinsic}. - -@node DbesY1 Intrinsic -@subsubsection DbesY1 Intrinsic -@cindex DbesY1 intrinsic -@cindex intrinsics, DbesY1 - -@noindent -@example -DbesY1(@var{X}) -@end example - -@noindent -DbesY1: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{BESY1()} that is specific -to one type for @var{X}. -@xref{BesY1 Intrinsic}. - -@node DbesYN Intrinsic -@subsubsection DbesYN Intrinsic -@cindex DbesYN intrinsic -@cindex intrinsics, DbesYN - -@noindent -@example -DbesYN(@var{N}, @var{X}) -@end example - -@noindent -DbesYN: @code{REAL(KIND=2)} function. - -@noindent -@var{N}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN). - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{BESYN()} that is specific -to one type for @var{X}. -@xref{BesYN Intrinsic}. - -@end ifset -@ifset familyF77 -@node Dble Intrinsic -@subsubsection Dble Intrinsic -@cindex Dble intrinsic -@cindex intrinsics, Dble - -@noindent -@example -Dble(@var{A}) -@end example - -@noindent -Dble: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @var{A} converted to double precision -(@code{REAL(KIND=2)}). -If @var{A} is @code{COMPLEX}, the real part of -@var{A} is used for the conversion -and the imaginary part disregarded. - -@xref{Sngl Intrinsic}, for the function that converts -to single precision. - -@xref{Int Intrinsic}, for the function that converts -to @code{INTEGER}. - -@xref{Complex Intrinsic}, for the function that converts -to @code{COMPLEX}. - -@end ifset -@ifset familyVXT -@node DbleQ Intrinsic -@subsubsection DbleQ Intrinsic -@cindex DbleQ intrinsic -@cindex intrinsics, DbleQ - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DbleQ} to use this name for an -external procedure. - -@end ifset -@ifset familyFVZ -@node DCmplx Intrinsic -@subsubsection DCmplx Intrinsic -@cindex DCmplx intrinsic -@cindex intrinsics, DCmplx - -@noindent -@example -DCmplx(@var{X}, @var{Y}) -@end example - -@noindent -DCmplx: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -@var{Y}: @code{INTEGER} or @code{REAL}; OPTIONAL (must be omitted if @var{X} is @code{COMPLEX}); scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -If @var{X} is not type @code{COMPLEX}, -constructs a value of type @code{COMPLEX(KIND=2)} from the -real and imaginary values specified by @var{X} and -@var{Y}, respectively. -If @var{Y} is omitted, @samp{0D0} is assumed. - -If @var{X} is type @code{COMPLEX}, -converts it to type @code{COMPLEX(KIND=2)}. - -Although this intrinsic is not standard Fortran, -it is a popular extension offered by many compilers -that support @code{DOUBLE COMPLEX}, since it offers -the easiest way to convert to @code{DOUBLE COMPLEX} -without using Fortran 90 features (such as the @samp{KIND=} -argument to the @code{CMPLX()} intrinsic). - -(@samp{CMPLX(0D0, 0D0)} returns a single-precision -@code{COMPLEX} result, as required by standard FORTRAN 77. -That's why so many compilers provide @code{DCMPLX()}, since -@samp{DCMPLX(0D0, 0D0)} returns a @code{DOUBLE COMPLEX} -result. -Still, @code{DCMPLX()} converts even @code{REAL*16} arguments -to their @code{REAL*8} equivalents in most dialects of -Fortran, so neither it nor @code{CMPLX()} allow easy -construction of arbitrary-precision values without -potentially forcing a conversion involving extending or -reducing precision. -GNU Fortran provides such an intrinsic, called @code{COMPLEX()}.) - -@xref{Complex Intrinsic}, for information on easily constructing -a @code{COMPLEX} value of arbitrary precision from @code{REAL} -arguments. - -@node DConjg Intrinsic -@subsubsection DConjg Intrinsic -@cindex DConjg intrinsic -@cindex intrinsics, DConjg - -@noindent -@example -DConjg(@var{Z}) -@end example - -@noindent -DConjg: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{Z}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{CONJG()} that is specific -to one type for @var{Z}. -@xref{Conjg Intrinsic}. - -@end ifset -@ifset familyF77 -@node DCos Intrinsic -@subsubsection DCos Intrinsic -@cindex DCos intrinsic -@cindex intrinsics, DCos - -@noindent -@example -DCos(@var{X}) -@end example - -@noindent -DCos: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{COS()} that is specific -to one type for @var{X}. -@xref{Cos Intrinsic}. - -@end ifset -@ifset familyVXT -@node DCosD Intrinsic -@subsubsection DCosD Intrinsic -@cindex DCosD intrinsic -@cindex intrinsics, DCosD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DCosD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node DCosH Intrinsic -@subsubsection DCosH Intrinsic -@cindex DCosH intrinsic -@cindex intrinsics, DCosH - -@noindent -@example -DCosH(@var{X}) -@end example - -@noindent -DCosH: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{COSH()} that is specific -to one type for @var{X}. -@xref{CosH Intrinsic}. - -@node DDiM Intrinsic -@subsubsection DDiM Intrinsic -@cindex DDiM intrinsic -@cindex intrinsics, DDiM - -@noindent -@example -DDiM(@var{X}, @var{Y}) -@end example - -@noindent -DDiM: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -@var{Y}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{DIM()} that is specific -to one type for @var{X} and @var{Y}. -@xref{DiM Intrinsic}. - -@end ifset -@ifset familyF2U -@node DErF Intrinsic -@subsubsection DErF Intrinsic -@cindex DErF intrinsic -@cindex intrinsics, DErF - -@noindent -@example -DErF(@var{X}) -@end example - -@noindent -DErF: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{ERF()} that is specific -to one type for @var{X}. -@xref{ErF Intrinsic}. - -@node DErFC Intrinsic -@subsubsection DErFC Intrinsic -@cindex DErFC intrinsic -@cindex intrinsics, DErFC - -@noindent -@example -DErFC(@var{X}) -@end example - -@noindent -DErFC: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{ERFC()} that is specific -to one type for @var{X}. -@xref{ErFC Intrinsic}. - -@end ifset -@ifset familyF77 -@node DExp Intrinsic -@subsubsection DExp Intrinsic -@cindex DExp intrinsic -@cindex intrinsics, DExp - -@noindent -@example -DExp(@var{X}) -@end example - -@noindent -DExp: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{EXP()} that is specific -to one type for @var{X}. -@xref{Exp Intrinsic}. - -@end ifset -@ifset familyFVZ -@node DFloat Intrinsic -@subsubsection DFloat Intrinsic -@cindex DFloat intrinsic -@cindex intrinsics, DFloat - -@noindent -@example -DFloat(@var{A}) -@end example - -@noindent -DFloat: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{REAL()} that is specific -to one type for @var{A}. -@xref{Real Intrinsic}. - -@end ifset -@ifset familyVXT -@node DFlotI Intrinsic -@subsubsection DFlotI Intrinsic -@cindex DFlotI intrinsic -@cindex intrinsics, DFlotI - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DFlotI} to use this name for an -external procedure. - -@node DFlotJ Intrinsic -@subsubsection DFlotJ Intrinsic -@cindex DFlotJ intrinsic -@cindex intrinsics, DFlotJ - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DFlotJ} to use this name for an -external procedure. - -@end ifset -@ifset familyF90 -@node Digits Intrinsic -@subsubsection Digits Intrinsic -@cindex Digits intrinsic -@cindex intrinsics, Digits - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Digits} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node DiM Intrinsic -@subsubsection DiM Intrinsic -@cindex DiM intrinsic -@cindex intrinsics, DiM - -@noindent -@example -DiM(@var{X}, @var{Y}) -@end example - -@noindent -DiM: @code{INTEGER} or @code{REAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{X}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -@var{Y}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{@var{X}-@var{Y}} if @var{X} is greater than -@var{Y}; otherwise returns zero. - -@end ifset -@ifset familyFVZ -@node DImag Intrinsic -@subsubsection DImag Intrinsic -@cindex DImag intrinsic -@cindex intrinsics, DImag - -@noindent -@example -DImag(@var{Z}) -@end example - -@noindent -DImag: @code{REAL(KIND=2)} function. - -@noindent -@var{Z}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{vxt}. - -@noindent -Description: - -Archaic form of @code{AIMAG()} that is specific -to one type for @var{Z}. -@xref{AImag Intrinsic}. - -@end ifset -@ifset familyF77 -@node DInt Intrinsic -@subsubsection DInt Intrinsic -@cindex DInt intrinsic -@cindex intrinsics, DInt - -@noindent -@example -DInt(@var{A}) -@end example - -@noindent -DInt: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{AINT()} that is specific -to one type for @var{A}. -@xref{AInt Intrinsic}. - -@node DLog Intrinsic -@subsubsection DLog Intrinsic -@cindex DLog intrinsic -@cindex intrinsics, DLog - -@noindent -@example -DLog(@var{X}) -@end example - -@noindent -DLog: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{LOG()} that is specific -to one type for @var{X}. -@xref{Log Intrinsic}. - -@node DLog10 Intrinsic -@subsubsection DLog10 Intrinsic -@cindex DLog10 intrinsic -@cindex intrinsics, DLog10 - -@noindent -@example -DLog10(@var{X}) -@end example - -@noindent -DLog10: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{LOG10()} that is specific -to one type for @var{X}. -@xref{Log10 Intrinsic}. - -@node DMax1 Intrinsic -@subsubsection DMax1 Intrinsic -@cindex DMax1 intrinsic -@cindex intrinsics, DMax1 - -@noindent -@example -DMax1(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -DMax1: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MAX()} that is specific -to one type for @var{A}. -@xref{Max Intrinsic}. - -@node DMin1 Intrinsic -@subsubsection DMin1 Intrinsic -@cindex DMin1 intrinsic -@cindex intrinsics, DMin1 - -@noindent -@example -DMin1(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -DMin1: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MIN()} that is specific -to one type for @var{A}. -@xref{Min Intrinsic}. - -@node DMod Intrinsic -@subsubsection DMod Intrinsic -@cindex DMod intrinsic -@cindex intrinsics, DMod - -@noindent -@example -DMod(@var{A}, @var{P}) -@end example - -@noindent -DMod: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -@var{P}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MOD()} that is specific -to one type for @var{A}. -@xref{Mod Intrinsic}. - -@node DNInt Intrinsic -@subsubsection DNInt Intrinsic -@cindex DNInt intrinsic -@cindex intrinsics, DNInt - -@noindent -@example -DNInt(@var{A}) -@end example - -@noindent -DNInt: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ANINT()} that is specific -to one type for @var{A}. -@xref{ANInt Intrinsic}. - -@end ifset -@ifset familyF90 -@node Dot_Product Intrinsic -@subsubsection Dot_Product Intrinsic -@cindex Dot_Product intrinsic -@cindex intrinsics, Dot_Product - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Dot_Product} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node DProd Intrinsic -@subsubsection DProd Intrinsic -@cindex DProd intrinsic -@cindex intrinsics, DProd - -@noindent -@example -DProd(@var{X}, @var{Y}) -@end example - -@noindent -DProd: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -@var{Y}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{DBLE(@var{X})*DBLE(@var{Y})}. - -@end ifset -@ifset familyVXT -@node DReal Intrinsic -@subsubsection DReal Intrinsic -@cindex DReal intrinsic -@cindex intrinsics, DReal - -@noindent -@example -DReal(@var{A}) -@end example - -@noindent -DReal: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{vxt}. - -@noindent -Description: - -Converts @var{A} to @code{REAL(KIND=2)}. - -If @var{A} is type @code{COMPLEX}, its real part -is converted (if necessary) to @code{REAL(KIND=2)}, -and its imaginary part is disregarded. - -Although this intrinsic is not standard Fortran, -it is a popular extension offered by many compilers -that support @code{DOUBLE COMPLEX}, since it offers -the easiest way to extract the real part of a @code{DOUBLE COMPLEX} -value without using the Fortran 90 @code{REAL()} intrinsic -in a way that produces a return value inconsistent with -the way many FORTRAN 77 compilers handle @code{REAL()} of -a @code{DOUBLE COMPLEX} value. - -@xref{RealPart Intrinsic}, for information on a GNU Fortran -intrinsic that avoids these areas of confusion. - -@xref{Dble Intrinsic}, for information on the standard FORTRAN 77 -replacement for @code{DREAL()}. - -@xref{REAL() and AIMAG() of Complex}, for more information on -this issue. - -@end ifset -@ifset familyF77 -@node DSign Intrinsic -@subsubsection DSign Intrinsic -@cindex DSign intrinsic -@cindex intrinsics, DSign - -@noindent -@example -DSign(@var{A}, @var{B}) -@end example - -@noindent -DSign: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -@var{B}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{SIGN()} that is specific -to one type for @var{A} and @var{B}. -@xref{Sign Intrinsic}. - -@node DSin Intrinsic -@subsubsection DSin Intrinsic -@cindex DSin intrinsic -@cindex intrinsics, DSin - -@noindent -@example -DSin(@var{X}) -@end example - -@noindent -DSin: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{SIN()} that is specific -to one type for @var{X}. -@xref{Sin Intrinsic}. - -@end ifset -@ifset familyVXT -@node DSinD Intrinsic -@subsubsection DSinD Intrinsic -@cindex DSinD intrinsic -@cindex intrinsics, DSinD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DSinD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node DSinH Intrinsic -@subsubsection DSinH Intrinsic -@cindex DSinH intrinsic -@cindex intrinsics, DSinH - -@noindent -@example -DSinH(@var{X}) -@end example - -@noindent -DSinH: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{SINH()} that is specific -to one type for @var{X}. -@xref{SinH Intrinsic}. - -@node DSqRt Intrinsic -@subsubsection DSqRt Intrinsic -@cindex DSqRt intrinsic -@cindex intrinsics, DSqRt - -@noindent -@example -DSqRt(@var{X}) -@end example - -@noindent -DSqRt: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{SQRT()} that is specific -to one type for @var{X}. -@xref{SqRt Intrinsic}. - -@node DTan Intrinsic -@subsubsection DTan Intrinsic -@cindex DTan intrinsic -@cindex intrinsics, DTan - -@noindent -@example -DTan(@var{X}) -@end example - -@noindent -DTan: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{TAN()} that is specific -to one type for @var{X}. -@xref{Tan Intrinsic}. - -@end ifset -@ifset familyVXT -@node DTanD Intrinsic -@subsubsection DTanD Intrinsic -@cindex DTanD intrinsic -@cindex intrinsics, DTanD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL DTanD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node DTanH Intrinsic -@subsubsection DTanH Intrinsic -@cindex DTanH intrinsic -@cindex intrinsics, DTanH - -@noindent -@example -DTanH(@var{X}) -@end example - -@noindent -DTanH: @code{REAL(KIND=2)} function. - -@noindent -@var{X}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{TANH()} that is specific -to one type for @var{X}. -@xref{TanH Intrinsic}. - -@end ifset -@ifset familyF2U -@node DTime Intrinsic (subroutine) -@subsubsection DTime Intrinsic (subroutine) -@cindex DTime intrinsic -@cindex intrinsics, DTime - -@noindent -@example -CALL DTime(@var{TArray}, @var{Result}) -@end example - -@noindent -@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT). - -@noindent -@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Initially, return the number of seconds of runtime -since the start of the process's execution -in @var{Result}, -and the user and system components of this in @samp{@var{TArray}(1)} -and @samp{@var{TArray}(2)} respectively. -The value of @var{Result} is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}. - -Subsequent invocations of @samp{DTIME()} set values based on accumulations -since the previous invocation. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. - -For information on other intrinsics with the same name: -@xref{DTime Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node DTime Intrinsic (function) -@subsubsection DTime Intrinsic (function) -@cindex DTime intrinsic -@cindex intrinsics, DTime - -@noindent -@example -DTime(@var{TArray}) -@end example - -@noindent -DTime: @code{REAL(KIND=1)} function. - -@noindent -@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Initially, return the number of seconds of runtime -since the start of the process's execution -as the function value, -and the user and system components of this in @samp{@var{TArray}(1)} -and @samp{@var{TArray}(2)} respectively. -The functions' value is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}. - -Subsequent invocations of @samp{DTIME()} return values accumulated since the -previous invocation. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{DTime Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node EOShift Intrinsic -@subsubsection EOShift Intrinsic -@cindex EOShift intrinsic -@cindex intrinsics, EOShift - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL EOShift} to use this name for an -external procedure. - -@node Epsilon Intrinsic -@subsubsection Epsilon Intrinsic -@cindex Epsilon intrinsic -@cindex intrinsics, Epsilon - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Epsilon} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node ErF Intrinsic -@subsubsection ErF Intrinsic -@cindex ErF intrinsic -@cindex intrinsics, ErF - -@noindent -@example -ErF(@var{X}) -@end example - -@noindent -ErF: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the error function of @var{X}. -See @code{erf(3m)}, which provides the implementation. - -@node ErFC Intrinsic -@subsubsection ErFC Intrinsic -@cindex ErFC intrinsic -@cindex intrinsics, ErFC - -@noindent -@example -ErFC(@var{X}) -@end example - -@noindent -ErFC: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the complementary error function of @var{X}: -@samp{ERFC(R) = 1 - ERF(R)} (except that the result might be more -accurate than explicitly evaluating that formulae would give). -See @code{erfc(3m)}, which provides the implementation. - -@node ETime Intrinsic (subroutine) -@subsubsection ETime Intrinsic (subroutine) -@cindex ETime intrinsic -@cindex intrinsics, ETime - -@noindent -@example -CALL ETime(@var{TArray}, @var{Result}) -@end example - -@noindent -@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT). - -@noindent -@var{Result}: @code{REAL(KIND=1)}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Return the number of seconds of runtime -since the start of the process's execution -in @var{Result}, -and the user and system components of this in @samp{@var{TArray}(1)} -and @samp{@var{TArray}(2)} respectively. -The value of @var{Result} is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. - -For information on other intrinsics with the same name: -@xref{ETime Intrinsic (function)}. - -@node ETime Intrinsic (function) -@subsubsection ETime Intrinsic (function) -@cindex ETime intrinsic -@cindex intrinsics, ETime - -@noindent -@example -ETime(@var{TArray}) -@end example - -@noindent -ETime: @code{REAL(KIND=1)} function. - -@noindent -@var{TArray}: @code{REAL(KIND=1)}; DIMENSION(2); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Return the number of seconds of runtime -since the start of the process's execution -as the function value, -and the user and system components of this in @samp{@var{TArray}(1)} -and @samp{@var{TArray}(2)} respectively. -The functions' value is equal to @samp{@var{TArray}(1) + @var{TArray}(2)}. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -For information on other intrinsics with the same name: -@xref{ETime Intrinsic (subroutine)}. - -@node Exit Intrinsic -@subsubsection Exit Intrinsic -@cindex Exit intrinsic -@cindex intrinsics, Exit - -@noindent -@example -CALL Exit(@var{Status}) -@end example - -@noindent -@var{Status}: @code{INTEGER} not wider than the default kind; OPTIONAL; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Exit the program with status @var{Status} after closing open Fortran -I/O units and otherwise behaving as @code{exit(2)}. -If @var{Status} is omitted the canonical `success' value -will be returned to the system. - -@end ifset -@ifset familyF77 -@node Exp Intrinsic -@subsubsection Exp Intrinsic -@cindex Exp intrinsic -@cindex intrinsics, Exp - -@noindent -@example -Exp(@var{X}) -@end example - -@noindent -Exp: @code{REAL} or @code{COMPLEX} function, the exact type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL} or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{@var{e}**@var{X}}, where -@var{e} is approximately 2.7182818. - -@xref{Log Intrinsic}, for the inverse of this function. - -@end ifset -@ifset familyF90 -@node Exponent Intrinsic -@subsubsection Exponent Intrinsic -@cindex Exponent intrinsic -@cindex intrinsics, Exponent - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Exponent} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node FDate Intrinsic (subroutine) -@subsubsection FDate Intrinsic (subroutine) -@cindex FDate intrinsic -@cindex intrinsics, FDate - -@noindent -@example -CALL FDate(@var{Date}) -@end example - -@noindent -@var{Date}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the current date (using the same format as @code{CTIME()}) -in @var{Date}. - -Equivalent to: - -@example -CALL CTIME(@var{Date}, TIME8()) -@end example - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -@xref{CTime Intrinsic (subroutine)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. - -For information on other intrinsics with the same name: -@xref{FDate Intrinsic (function)}. - -@node FDate Intrinsic (function) -@subsubsection FDate Intrinsic (function) -@cindex FDate intrinsic -@cindex intrinsics, FDate - -@noindent -@example -FDate() -@end example - -@noindent -FDate: @code{CHARACTER*(*)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the current date (using the same format as @code{CTIME()}). - -Equivalent to: - -@example -CTIME(TIME8()) -@end example - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -@xref{CTime Intrinsic (function)}. - -For information on other intrinsics with the same name: -@xref{FDate Intrinsic (subroutine)}. - -@node FGet Intrinsic (subroutine) -@subsubsection FGet Intrinsic (subroutine) -@cindex FGet intrinsic -@cindex intrinsics, FGet - -@noindent -@example -CALL FGet(@var{C}, @var{Status}) -@end example - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Reads a single character into @var{C} in stream mode from unit 5 -(by-passing normal formatted output) using @code{getc(3)}. -Returns in -@var{Status} 0 on success, @minus{}1 on end-of-file, and the error code -from @code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FGet Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node FGet Intrinsic (function) -@subsubsection FGet Intrinsic (function) -@cindex FGet intrinsic -@cindex intrinsics, FGet - -@noindent -@example -FGet(@var{C}) -@end example - -@noindent -FGet: @code{INTEGER(KIND=1)} function. - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Reads a single character into @var{C} in stream mode from unit 5 -(by-passing normal formatted input) using @code{getc(3)}. -Returns 0 on -success, @minus{}1 on end-of-file, and the error code from -@code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FGet Intrinsic (subroutine)}. - -@end ifset -@ifset familyF2U -@node FGetC Intrinsic (subroutine) -@subsubsection FGetC Intrinsic (subroutine) -@cindex FGetC intrinsic -@cindex intrinsics, FGetC - -@noindent -@example -CALL FGetC(@var{Unit}, @var{C}, @var{Status}) -@end example - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Reads a single character into @var{C} in stream mode from unit @var{Unit} -(by-passing normal formatted output) using @code{getc(3)}. -Returns in -@var{Status} 0 on success, @minus{}1 on end-of-file, and the error code from -@code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FGetC Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node FGetC Intrinsic (function) -@subsubsection FGetC Intrinsic (function) -@cindex FGetC intrinsic -@cindex intrinsics, FGetC - -@noindent -@example -FGetC(@var{Unit}, @var{C}) -@end example - -@noindent -FGetC: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Reads a single character into @var{C} in stream mode from unit @var{Unit} -(by-passing normal formatted output) using @code{getc(3)}. -Returns 0 on -success, @minus{}1 on end-of-file, and the error code from -@code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FGetC Intrinsic (subroutine)}. - -@end ifset -@ifset familyF77 -@node Float Intrinsic -@subsubsection Float Intrinsic -@cindex Float intrinsic -@cindex intrinsics, Float - -@noindent -@example -Float(@var{A}) -@end example - -@noindent -Float: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{REAL()} that is specific -to one type for @var{A}. -@xref{Real Intrinsic}. - -@end ifset -@ifset familyVXT -@node FloatI Intrinsic -@subsubsection FloatI Intrinsic -@cindex FloatI intrinsic -@cindex intrinsics, FloatI - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL FloatI} to use this name for an -external procedure. - -@node FloatJ Intrinsic -@subsubsection FloatJ Intrinsic -@cindex FloatJ intrinsic -@cindex intrinsics, FloatJ - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL FloatJ} to use this name for an -external procedure. - -@end ifset -@ifset familyF90 -@node Floor Intrinsic -@subsubsection Floor Intrinsic -@cindex Floor intrinsic -@cindex intrinsics, Floor - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Floor} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node Flush Intrinsic -@subsubsection Flush Intrinsic -@cindex Flush intrinsic -@cindex intrinsics, Flush - -@noindent -@example -CALL Flush(@var{Unit}) -@end example - -@noindent -@var{Unit}: @code{INTEGER}; OPTIONAL; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Flushes Fortran unit(s) currently open for output. -Without the optional argument, all such units are flushed, -otherwise just the unit specified by @var{Unit}. - -Some non-GNU implementations of Fortran provide this intrinsic -as a library procedure that might or might not support the -(optional) @var{Unit} argument. - -@node FNum Intrinsic -@subsubsection FNum Intrinsic -@cindex FNum intrinsic -@cindex intrinsics, FNum - -@noindent -@example -FNum(@var{Unit}) -@end example - -@noindent -FNum: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the Unix file descriptor number corresponding to the open -Fortran I/O unit @var{Unit}. -This could be passed to an interface to C I/O routines. - -@node FPut Intrinsic (subroutine) -@subsubsection FPut Intrinsic (subroutine) -@cindex FPut intrinsic -@cindex intrinsics, FPut - -@noindent -@example -CALL FPut(@var{C}, @var{Status}) -@end example - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Writes the single character @var{C} in stream mode to unit 6 -(by-passing normal formatted output) using @code{putc(3)}. -Returns in -@var{Status} 0 on success, the error code from @code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FPut Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node FPut Intrinsic (function) -@subsubsection FPut Intrinsic (function) -@cindex FPut intrinsic -@cindex intrinsics, FPut - -@noindent -@example -FPut(@var{C}) -@end example - -@noindent -FPut: @code{INTEGER(KIND=1)} function. - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Writes the single character @var{C} in stream mode to unit 6 -(by-passing normal formatted output) using @code{getc(3)}. -Returns 0 on -success, the error code from @code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FPut Intrinsic (subroutine)}. - -@end ifset -@ifset familyF2U -@node FPutC Intrinsic (subroutine) -@subsubsection FPutC Intrinsic (subroutine) -@cindex FPutC intrinsic -@cindex intrinsics, FPutC - -@noindent -@example -CALL FPutC(@var{Unit}, @var{C}, @var{Status}) -@end example - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Writes the single character @var{Unit} in stream mode to unit 6 -(by-passing normal formatted output) using @code{putc(3)}. -Returns in -@var{C} 0 on success, the error code from @code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FPutC Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node FPutC Intrinsic (function) -@subsubsection FPutC Intrinsic (function) -@cindex FPutC intrinsic -@cindex intrinsics, FPutC - -@noindent -@example -FPutC(@var{Unit}, @var{C}) -@end example - -@noindent -FPutC: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Writes the single character @var{C} in stream mode to unit @var{Unit} -(by-passing normal formatted output) using @code{putc(3)}. -Returns 0 on -success, the error code from @code{ferror(3)} otherwise. - -Stream I/O should not be mixed with normal record-oriented (formatted or -unformatted) I/O on the same unit; the results are unpredictable. - -For information on other intrinsics with the same name: -@xref{FPutC Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node Fraction Intrinsic -@subsubsection Fraction Intrinsic -@cindex Fraction intrinsic -@cindex intrinsics, Fraction - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Fraction} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node FSeek Intrinsic -@subsubsection FSeek Intrinsic -@cindex FSeek intrinsic -@cindex intrinsics, FSeek - -@noindent -@example -CALL FSeek(@var{Unit}, @var{Offset}, @var{Whence}, @var{ErrLab}) -@end example - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Offset}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Whence}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{ErrLab}: @samp{*@var{label}}, where @var{label} is the label -of an executable statement; OPTIONAL. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Attempts to move Fortran unit @var{Unit} to the specified -@var{Offset}: absolute offset if @var{Whence}=0; relative to the -current offset if @var{Whence}=1; relative to the end of the file if -@var{Whence}=2. -It branches to label @var{ErrLab} if @var{Unit} is -not open or if the call otherwise fails. - -@node FStat Intrinsic (subroutine) -@subsubsection FStat Intrinsic (subroutine) -@cindex FStat intrinsic -@cindex intrinsics, FStat - -@noindent -@example -CALL FStat(@var{Unit}, @var{SArray}, @var{Status}) -@end example - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{SArray}: @code{INTEGER(KIND=1)}; DIMENSION(13); INTENT(OUT). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Obtains data about the file open on Fortran I/O unit @var{Unit} and -places them in the array @var{SArray}. -The values in this array are -extracted from the @code{stat} structure as returned by -@code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{FStat Intrinsic (function)}. - -@node FStat Intrinsic (function) -@subsubsection FStat Intrinsic (function) -@cindex FStat intrinsic -@cindex intrinsics, FStat - -@noindent -@example -FStat(@var{Unit}, @var{SArray}) -@end example - -@noindent -FStat: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{SArray}: @code{INTEGER(KIND=1)}; DIMENSION(13); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Obtains data about the file open on Fortran I/O unit @var{Unit} and -places them in the array @var{SArray}. -The values in this array are -extracted from the @code{stat} structure as returned by -@code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -Returns 0 on success or a nonzero error code. - -For information on other intrinsics with the same name: -@xref{FStat Intrinsic (subroutine)}. - -@node FTell Intrinsic (subroutine) -@subsubsection FTell Intrinsic (subroutine) -@cindex FTell intrinsic -@cindex intrinsics, FTell - -@noindent -@example -CALL FTell(@var{Unit}, @var{Offset}) -@end example - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Offset}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Sets @var{Offset} to the current offset of Fortran unit @var{Unit} -(or to @minus{}1 if @var{Unit} is not open). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. - -For information on other intrinsics with the same name: -@xref{FTell Intrinsic (function)}. - -@node FTell Intrinsic (function) -@subsubsection FTell Intrinsic (function) -@cindex FTell intrinsic -@cindex intrinsics, FTell - -@noindent -@example -FTell(@var{Unit}) -@end example - -@noindent -FTell: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the current offset of Fortran unit @var{Unit} -(or @minus{}1 if @var{Unit} is not open). - -For information on other intrinsics with the same name: -@xref{FTell Intrinsic (subroutine)}. - -@node GError Intrinsic -@subsubsection GError Intrinsic -@cindex GError intrinsic -@cindex intrinsics, GError - -@noindent -@example -CALL GError(@var{Message}) -@end example - -@noindent -@var{Message}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the system error message corresponding to the last system -error (C @code{errno}). - -@node GetArg Intrinsic -@subsubsection GetArg Intrinsic -@cindex GetArg intrinsic -@cindex intrinsics, GetArg - -@noindent -@example -CALL GetArg(@var{Pos}, @var{Value}) -@end example - -@noindent -@var{Pos}: @code{INTEGER} not wider than the default kind; scalar; INTENT(IN). - -@noindent -@var{Value}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Sets @var{Value} to the @var{Pos}-th command-line argument (or to all -blanks if there are fewer than @var{Value} command-line arguments); -@code{CALL GETARG(0, @var{value})} sets @var{value} to the name of the -program (on systems that support this feature). - -@xref{IArgC Intrinsic}, for information on how to get the number -of arguments. - -@node GetCWD Intrinsic (subroutine) -@subsubsection GetCWD Intrinsic (subroutine) -@cindex GetCWD intrinsic -@cindex intrinsics, GetCWD - -@noindent -@example -CALL GetCWD(@var{Name}, @var{Status}) -@end example - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Places the current working directory in @var{Name}. -If the @var{Status} argument is supplied, it contains 0 -success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{getcwd(3)} -or @code{getwd(3)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{GetCWD Intrinsic (function)}. - -@node GetCWD Intrinsic (function) -@subsubsection GetCWD Intrinsic (function) -@cindex GetCWD intrinsic -@cindex intrinsics, GetCWD - -@noindent -@example -GetCWD(@var{Name}) -@end example - -@noindent -GetCWD: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Places the current working directory in @var{Name}. -Returns 0 on -success, otherwise a nonzero error code -(@code{ENOSYS} if the system does not provide @code{getcwd(3)} -or @code{getwd(3)}). - -For information on other intrinsics with the same name: -@xref{GetCWD Intrinsic (subroutine)}. - -@node GetEnv Intrinsic -@subsubsection GetEnv Intrinsic -@cindex GetEnv intrinsic -@cindex intrinsics, GetEnv - -@noindent -@example -CALL GetEnv(@var{Name}, @var{Value}) -@end example - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Value}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Sets @var{Value} to the value of environment variable given by the -value of @var{Name} (@code{$name} in shell terms) or to blanks if -@code{$name} has not been set. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{Name}---otherwise, -trailing blanks in @var{Name} are ignored. - -@node GetGId Intrinsic -@subsubsection GetGId Intrinsic -@cindex GetGId intrinsic -@cindex intrinsics, GetGId - -@noindent -@example -GetGId() -@end example - -@noindent -GetGId: @code{INTEGER(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the group id for the current process. - -@node GetLog Intrinsic -@subsubsection GetLog Intrinsic -@cindex GetLog intrinsic -@cindex intrinsics, GetLog - -@noindent -@example -CALL GetLog(@var{Login}) -@end example - -@noindent -@var{Login}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the login name for the process in @var{Login}. - -@emph{Caution:} On some systems, the @code{getlogin(3)} -function, which this intrinsic calls at run time, -is either not implemented or returns a null pointer. -In the latter case, this intrinsic returns blanks -in @var{Login}. - -@node GetPId Intrinsic -@subsubsection GetPId Intrinsic -@cindex GetPId intrinsic -@cindex intrinsics, GetPId - -@noindent -@example -GetPId() -@end example - -@noindent -GetPId: @code{INTEGER(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the process id for the current process. - -@node GetUId Intrinsic -@subsubsection GetUId Intrinsic -@cindex GetUId intrinsic -@cindex intrinsics, GetUId - -@noindent -@example -GetUId() -@end example - -@noindent -GetUId: @code{INTEGER(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the user id for the current process. - -@node GMTime Intrinsic -@subsubsection GMTime Intrinsic -@cindex GMTime intrinsic -@cindex intrinsics, GMTime - -@noindent -@example -CALL GMTime(@var{STime}, @var{TArray}) -@end example - -@noindent -@var{STime}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -@var{TArray}: @code{INTEGER(KIND=1)}; DIMENSION(9); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Given a system time value @var{STime}, fills @var{TArray} with values -extracted from it appropriate to the GMT time zone using -@code{gmtime(3)}. - -The array elements are as follows: - -@enumerate -@item -Seconds after the minute, range 0--59 or 0--61 to allow for leap -seconds - -@item -Minutes after the hour, range 0--59 - -@item -Hours past midnight, range 0--23 - -@item -Day of month, range 0--31 - -@item -Number of months since January, range 0--12 - -@item -Years since 1900 - -@item -Number of days since Sunday, range 0--6 - -@item -Days since January 1 - -@item -Daylight savings indicator: positive if daylight savings is in effect, -zero if not, and negative if the information isn't available. -@end enumerate - -@node HostNm Intrinsic (subroutine) -@subsubsection HostNm Intrinsic (subroutine) -@cindex HostNm intrinsic -@cindex intrinsics, HostNm - -@noindent -@example -CALL HostNm(@var{Name}, @var{Status}) -@end example - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Fills @var{Name} with the system's host name returned by -@code{gethostname(2)}. -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{gethostname(2)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -On some systems (specifically SCO) it might be necessary to link the -``socket'' library if you call this routine. -Typically this means adding @samp{-lg2c -lsocket -lm} -to the @code{g77} command line when linking the program. - -For information on other intrinsics with the same name: -@xref{HostNm Intrinsic (function)}. - -@node HostNm Intrinsic (function) -@subsubsection HostNm Intrinsic (function) -@cindex HostNm intrinsic -@cindex intrinsics, HostNm - -@noindent -@example -HostNm(@var{Name}) -@end example - -@noindent -HostNm: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Fills @var{Name} with the system's host name returned by -@code{gethostname(2)}, returning 0 on success or a nonzero error code -(@code{ENOSYS} if the system does not provide @code{gethostname(2)}). - -On some systems (specifically SCO) it might be necessary to link the -``socket'' library if you call this routine. -Typically this means adding @samp{-lg2c -lsocket -lm} -to the @code{g77} command line when linking the program. - -For information on other intrinsics with the same name: -@xref{HostNm Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node Huge Intrinsic -@subsubsection Huge Intrinsic -@cindex Huge intrinsic -@cindex intrinsics, Huge - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Huge} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node IAbs Intrinsic -@subsubsection IAbs Intrinsic -@cindex IAbs intrinsic -@cindex intrinsics, IAbs - -@noindent -@example -IAbs(@var{A}) -@end example - -@noindent -IAbs: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{ABS()} that is specific -to one type for @var{A}. -@xref{Abs Intrinsic}. - -@end ifset -@ifset familyASC -@node IAChar Intrinsic -@subsubsection IAChar Intrinsic -@cindex IAChar intrinsic -@cindex intrinsics, IAChar - -@noindent -@example -IAChar(@var{C}) -@end example - -@noindent -IAChar: @code{INTEGER(KIND=1)} function. - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}, @code{f90}. - -@noindent -Description: - -Returns the code for the ASCII character in the -first character position of @var{C}. - -@xref{AChar Intrinsic}, for the inverse of this function. - -@xref{IChar Intrinsic}, for the function corresponding -to the system's native character set. - -@end ifset -@ifset familyMIL -@node IAnd Intrinsic -@subsubsection IAnd Intrinsic -@cindex IAnd intrinsic -@cindex intrinsics, IAnd - -@noindent -@example -IAnd(@var{I}, @var{J}) -@end example - -@noindent -IAnd: @code{INTEGER} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{J}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Returns value resulting from boolean AND of -pair of bits in each of @var{I} and @var{J}. - -@end ifset -@ifset familyF2U -@node IArgC Intrinsic -@subsubsection IArgC Intrinsic -@cindex IArgC intrinsic -@cindex intrinsics, IArgC - -@noindent -@example -IArgC() -@end example - -@noindent -IArgC: @code{INTEGER(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the number of command-line arguments. - -This count does not include the specification of the program -name itself. - -@end ifset -@ifset familyMIL -@node IBClr Intrinsic -@subsubsection IBClr Intrinsic -@cindex IBClr intrinsic -@cindex intrinsics, IBClr - -@noindent -@example -IBClr(@var{I}, @var{Pos}) -@end example - -@noindent -IBClr: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Pos}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Returns the value of @var{I} with bit @var{Pos} cleared (set to -zero). -@xref{BTest Intrinsic}, for information on bit positions. - -@node IBits Intrinsic -@subsubsection IBits Intrinsic -@cindex IBits intrinsic -@cindex intrinsics, IBits - -@noindent -@example -IBits(@var{I}, @var{Pos}, @var{Len}) -@end example - -@noindent -IBits: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Pos}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Len}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Extracts a subfield of length @var{Len} from @var{I}, starting from -bit position @var{Pos} and extending left for @var{Len} bits. -The result is right-justified and the remaining bits are zeroed. -The value -of @samp{@var{Pos}+@var{Len}} must be less than or equal to the value -@samp{BIT_SIZE(@var{I})}. -@xref{Bit_Size Intrinsic}. - -@node IBSet Intrinsic -@subsubsection IBSet Intrinsic -@cindex IBSet intrinsic -@cindex intrinsics, IBSet - -@noindent -@example -IBSet(@var{I}, @var{Pos}) -@end example - -@noindent -IBSet: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Pos}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Returns the value of @var{I} with bit @var{Pos} set (to one). -@xref{BTest Intrinsic}, for information on bit positions. - -@end ifset -@ifset familyF77 -@node IChar Intrinsic -@subsubsection IChar Intrinsic -@cindex IChar intrinsic -@cindex intrinsics, IChar - -@noindent -@example -IChar(@var{C}) -@end example - -@noindent -IChar: @code{INTEGER(KIND=1)} function. - -@noindent -@var{C}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the code for the character in the -first character position of @var{C}. - -Because the system's native character set is used, -the correspondence between character and their codes -is not necessarily the same between GNU Fortran -implementations. - -Note that no intrinsic exists to convert a printable -character string to a numerical value. -For example, there is no intrinsic that, given -the @code{CHARACTER} value @samp{'154'}, returns an -@code{INTEGER} or @code{REAL} value with the value @samp{154}. - -Instead, you can use internal-file I/O to do this kind -of conversion. -For example: - -@smallexample -INTEGER VALUE -CHARACTER*10 STRING -STRING = '154' -READ (STRING, '(I10)'), VALUE -PRINT *, VALUE -END -@end smallexample - -The above program, when run, prints: - -@smallexample - 154 -@end smallexample - -@xref{Char Intrinsic}, for the inverse of the @code{ICHAR} function. - -@xref{IAChar Intrinsic}, for the function corresponding -to the ASCII character set. - -@end ifset -@ifset familyF2U -@node IDate Intrinsic (UNIX) -@subsubsection IDate Intrinsic (UNIX) -@cindex IDate intrinsic -@cindex intrinsics, IDate - -@noindent -@example -CALL IDate(@var{TArray}) -@end example - -@noindent -@var{TArray}: @code{INTEGER(KIND=1)}; DIMENSION(3); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Fills @var{TArray} with the numerical values at the current local time. -The day (in the range 1--31), month (in the range 1--12), -and year appear in elements 1, 2, and 3 of @var{TArray}, respectively. -The year has four significant digits. - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -For information on other intrinsics with the same name: -@xref{IDate Intrinsic (VXT)}. - -@end ifset -@ifset familyVXT -@node IDate Intrinsic (VXT) -@subsubsection IDate Intrinsic (VXT) -@cindex IDate intrinsic -@cindex intrinsics, IDate - -@noindent -@example -CALL IDate(@var{M}, @var{D}, @var{Y}) -@end example - -@noindent -@var{M}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT). - -@noindent -@var{D}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT). - -@noindent -@var{Y}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{vxt}. - -@noindent -Description: - -Returns the numerical values of the current local time. -The month (in the range 1--12) is returned in @var{M}, -the day (in the range 1--31) in @var{D}, -and the year in @var{Y} (in the range 0--99). - -@cindex Y2K compliance -@cindex Year 2000 compliance -@cindex wraparound, Y2K -@cindex limits, Y2K -This intrinsic is not recommended, due to the fact that -its return value for year wraps around century boundaries -(change from a larger value to a smaller one). -Therefore, programs making use of this intrinsic, for -instance, might not be Year 2000 (Y2K) compliant. -For example, the date might appear, -to such programs, to wrap around -as of the Year 2000. - -@xref{IDate Intrinsic (UNIX)}, for information on obtaining more digits -for the current date. - -For information on other intrinsics with the same name: -@xref{IDate Intrinsic (UNIX)}. - -@end ifset -@ifset familyF77 -@node IDiM Intrinsic -@subsubsection IDiM Intrinsic -@cindex IDiM intrinsic -@cindex intrinsics, IDiM - -@noindent -@example -IDiM(@var{X}, @var{Y}) -@end example - -@noindent -IDiM: @code{INTEGER(KIND=1)} function. - -@noindent -@var{X}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -@var{Y}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{DIM()} that is specific -to one type for @var{X} and @var{Y}. -@xref{DiM Intrinsic}. - -@node IDInt Intrinsic -@subsubsection IDInt Intrinsic -@cindex IDInt intrinsic -@cindex intrinsics, IDInt - -@noindent -@example -IDInt(@var{A}) -@end example - -@noindent -IDInt: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{INT()} that is specific -to one type for @var{A}. -@xref{Int Intrinsic}. - -@node IDNInt Intrinsic -@subsubsection IDNInt Intrinsic -@cindex IDNInt intrinsic -@cindex intrinsics, IDNInt - -@noindent -@example -IDNInt(@var{A}) -@end example - -@noindent -IDNInt: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{NINT()} that is specific -to one type for @var{A}. -@xref{NInt Intrinsic}. - -@end ifset -@ifset familyMIL -@node IEOr Intrinsic -@subsubsection IEOr Intrinsic -@cindex IEOr intrinsic -@cindex intrinsics, IEOr - -@noindent -@example -IEOr(@var{I}, @var{J}) -@end example - -@noindent -IEOr: @code{INTEGER} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{J}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Returns value resulting from boolean exclusive-OR of -pair of bits in each of @var{I} and @var{J}. - -@end ifset -@ifset familyF2U -@node IErrNo Intrinsic -@subsubsection IErrNo Intrinsic -@cindex IErrNo intrinsic -@cindex intrinsics, IErrNo - -@noindent -@example -IErrNo() -@end example - -@noindent -IErrNo: @code{INTEGER(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the last system error number (corresponding to the C -@code{errno}). - -@end ifset -@ifset familyF77 -@node IFix Intrinsic -@subsubsection IFix Intrinsic -@cindex IFix intrinsic -@cindex intrinsics, IFix - -@noindent -@example -IFix(@var{A}) -@end example - -@noindent -IFix: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{INT()} that is specific -to one type for @var{A}. -@xref{Int Intrinsic}. - -@end ifset -@ifset familyVXT -@node IIAbs Intrinsic -@subsubsection IIAbs Intrinsic -@cindex IIAbs intrinsic -@cindex intrinsics, IIAbs - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIAbs} to use this name for an -external procedure. - -@node IIAnd Intrinsic -@subsubsection IIAnd Intrinsic -@cindex IIAnd intrinsic -@cindex intrinsics, IIAnd - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIAnd} to use this name for an -external procedure. - -@node IIBClr Intrinsic -@subsubsection IIBClr Intrinsic -@cindex IIBClr intrinsic -@cindex intrinsics, IIBClr - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIBClr} to use this name for an -external procedure. - -@node IIBits Intrinsic -@subsubsection IIBits Intrinsic -@cindex IIBits intrinsic -@cindex intrinsics, IIBits - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIBits} to use this name for an -external procedure. - -@node IIBSet Intrinsic -@subsubsection IIBSet Intrinsic -@cindex IIBSet intrinsic -@cindex intrinsics, IIBSet - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIBSet} to use this name for an -external procedure. - -@node IIDiM Intrinsic -@subsubsection IIDiM Intrinsic -@cindex IIDiM intrinsic -@cindex intrinsics, IIDiM - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIDiM} to use this name for an -external procedure. - -@node IIDInt Intrinsic -@subsubsection IIDInt Intrinsic -@cindex IIDInt intrinsic -@cindex intrinsics, IIDInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIDInt} to use this name for an -external procedure. - -@node IIDNnt Intrinsic -@subsubsection IIDNnt Intrinsic -@cindex IIDNnt intrinsic -@cindex intrinsics, IIDNnt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIDNnt} to use this name for an -external procedure. - -@node IIEOr Intrinsic -@subsubsection IIEOr Intrinsic -@cindex IIEOr intrinsic -@cindex intrinsics, IIEOr - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIEOr} to use this name for an -external procedure. - -@node IIFix Intrinsic -@subsubsection IIFix Intrinsic -@cindex IIFix intrinsic -@cindex intrinsics, IIFix - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIFix} to use this name for an -external procedure. - -@node IInt Intrinsic -@subsubsection IInt Intrinsic -@cindex IInt intrinsic -@cindex intrinsics, IInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IInt} to use this name for an -external procedure. - -@node IIOr Intrinsic -@subsubsection IIOr Intrinsic -@cindex IIOr intrinsic -@cindex intrinsics, IIOr - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIOr} to use this name for an -external procedure. - -@node IIQint Intrinsic -@subsubsection IIQint Intrinsic -@cindex IIQint intrinsic -@cindex intrinsics, IIQint - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIQint} to use this name for an -external procedure. - -@node IIQNnt Intrinsic -@subsubsection IIQNnt Intrinsic -@cindex IIQNnt intrinsic -@cindex intrinsics, IIQNnt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIQNnt} to use this name for an -external procedure. - -@node IIShftC Intrinsic -@subsubsection IIShftC Intrinsic -@cindex IIShftC intrinsic -@cindex intrinsics, IIShftC - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IIShftC} to use this name for an -external procedure. - -@node IISign Intrinsic -@subsubsection IISign Intrinsic -@cindex IISign intrinsic -@cindex intrinsics, IISign - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IISign} to use this name for an -external procedure. - -@end ifset -@ifset familyF2C -@node Imag Intrinsic -@subsubsection Imag Intrinsic -@cindex Imag intrinsic -@cindex intrinsics, Imag - -@noindent -@example -Imag(@var{Z}) -@end example - -@noindent -Imag: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{Z}. - -@noindent -@var{Z}: @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -The imaginary part of @var{Z} is returned, without conversion. - -@emph{Note:} The way to do this in standard Fortran 90 -is @samp{AIMAG(@var{Z})}. -However, when, for example, @var{Z} is @code{DOUBLE COMPLEX}, -@samp{AIMAG(@var{Z})} means something different for some compilers -that are not true Fortran 90 compilers but offer some -extensions standardized by Fortran 90 (such as the -@code{DOUBLE COMPLEX} type, also known as @code{COMPLEX(KIND=2)}). - -The advantage of @code{IMAG()} is that, while not necessarily -more or less portable than @code{AIMAG()}, it is more likely to -cause a compiler that doesn't support it to produce a diagnostic -than generate incorrect code. - -@xref{REAL() and AIMAG() of Complex}, for more information. - -@end ifset -@ifset familyGNU -@node ImagPart Intrinsic -@subsubsection ImagPart Intrinsic -@cindex ImagPart intrinsic -@cindex intrinsics, ImagPart - -@noindent -@example -ImagPart(@var{Z}) -@end example - -@noindent -ImagPart: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{Z}. - -@noindent -@var{Z}: @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{gnu}. - -@noindent -Description: - -The imaginary part of @var{Z} is returned, without conversion. - -@emph{Note:} The way to do this in standard Fortran 90 -is @samp{AIMAG(@var{Z})}. -However, when, for example, @var{Z} is @code{DOUBLE COMPLEX}, -@samp{AIMAG(@var{Z})} means something different for some compilers -that are not true Fortran 90 compilers but offer some -extensions standardized by Fortran 90 (such as the -@code{DOUBLE COMPLEX} type, also known as @code{COMPLEX(KIND=2)}). - -The advantage of @code{IMAGPART()} is that, while not necessarily -more or less portable than @code{AIMAG()}, it is more likely to -cause a compiler that doesn't support it to produce a diagnostic -than generate incorrect code. - -@xref{REAL() and AIMAG() of Complex}, for more information. - -@end ifset -@ifset familyVXT -@node IMax0 Intrinsic -@subsubsection IMax0 Intrinsic -@cindex IMax0 intrinsic -@cindex intrinsics, IMax0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IMax0} to use this name for an -external procedure. - -@node IMax1 Intrinsic -@subsubsection IMax1 Intrinsic -@cindex IMax1 intrinsic -@cindex intrinsics, IMax1 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IMax1} to use this name for an -external procedure. - -@node IMin0 Intrinsic -@subsubsection IMin0 Intrinsic -@cindex IMin0 intrinsic -@cindex intrinsics, IMin0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IMin0} to use this name for an -external procedure. - -@node IMin1 Intrinsic -@subsubsection IMin1 Intrinsic -@cindex IMin1 intrinsic -@cindex intrinsics, IMin1 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IMin1} to use this name for an -external procedure. - -@node IMod Intrinsic -@subsubsection IMod Intrinsic -@cindex IMod intrinsic -@cindex intrinsics, IMod - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IMod} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node Index Intrinsic -@subsubsection Index Intrinsic -@cindex Index intrinsic -@cindex intrinsics, Index - -@noindent -@example -Index(@var{String}, @var{Substring}) -@end example - -@noindent -Index: @code{INTEGER(KIND=1)} function. - -@noindent -@var{String}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Substring}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the position of the start of the first occurrence of string -@var{Substring} as a substring in @var{String}, counting from one. -If @var{Substring} doesn't occur in @var{String}, zero is returned. - -@end ifset -@ifset familyVXT -@node INInt Intrinsic -@subsubsection INInt Intrinsic -@cindex INInt intrinsic -@cindex intrinsics, INInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL INInt} to use this name for an -external procedure. - -@node INot Intrinsic -@subsubsection INot Intrinsic -@cindex INot intrinsic -@cindex intrinsics, INot - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL INot} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node Int Intrinsic -@subsubsection Int Intrinsic -@cindex Int intrinsic -@cindex intrinsics, Int - -@noindent -@example -Int(@var{A}) -@end example - -@noindent -Int: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @var{A} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=1)}. - -If @var{A} is type @code{COMPLEX}, its real part is -truncated and converted, and its imaginary part is disregarded. - -@xref{NInt Intrinsic}, for how to convert, rounded to nearest -whole number. - -@xref{AInt Intrinsic}, for how to truncate to whole number -without converting. - -@end ifset -@ifset familyGNU -@node Int2 Intrinsic -@subsubsection Int2 Intrinsic -@cindex Int2 intrinsic -@cindex intrinsics, Int2 - -@noindent -@example -Int2(@var{A}) -@end example - -@noindent -Int2: @code{INTEGER(KIND=6)} function. - -@noindent -@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{gnu}. - -@noindent -Description: - -Returns @var{A} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=6)}. - -If @var{A} is type @code{COMPLEX}, its real part -is truncated and converted, and its imaginary part is disregarded. - -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. - -@node Int8 Intrinsic -@subsubsection Int8 Intrinsic -@cindex Int8 intrinsic -@cindex intrinsics, Int8 - -@noindent -@example -Int8(@var{A}) -@end example - -@noindent -Int8: @code{INTEGER(KIND=2)} function. - -@noindent -@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{gnu}. - -@noindent -Description: - -Returns @var{A} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=2)}. - -If @var{A} is type @code{COMPLEX}, its real part -is truncated and converted, and its imaginary part is disregarded. - -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. - -@end ifset -@ifset familyMIL -@node IOr Intrinsic -@subsubsection IOr Intrinsic -@cindex IOr intrinsic -@cindex intrinsics, IOr - -@noindent -@example -IOr(@var{I}, @var{J}) -@end example - -@noindent -IOr: @code{INTEGER} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{J}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Returns value resulting from boolean OR of -pair of bits in each of @var{I} and @var{J}. - -@end ifset -@ifset familyF2U -@node IRand Intrinsic -@subsubsection IRand Intrinsic -@cindex IRand intrinsic -@cindex intrinsics, IRand - -@noindent -@example -IRand(@var{Flag}) -@end example - -@noindent -IRand: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Flag}: @code{INTEGER}; OPTIONAL; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns a uniform quasi-random number up to a system-dependent limit. -If @var{Flag} is 0, the next number in sequence is returned; if -@var{Flag} is 1, the generator is restarted by calling the UNIX function -@samp{srand(0)}; if @var{Flag} has any other value, -it is used as a new seed with @code{srand()}. - -@xref{SRand Intrinsic}. - -@emph{Note:} As typically implemented (by the routine of the same -name in the C library), this random number generator is a very poor -one, though the BSD and GNU libraries provide a much better -implementation than the `traditional' one. -On a different system you almost certainly want to use something better. - -@node IsaTty Intrinsic -@subsubsection IsaTty Intrinsic -@cindex IsaTty intrinsic -@cindex intrinsics, IsaTty - -@noindent -@example -IsaTty(@var{Unit}) -@end example - -@noindent -IsaTty: @code{LOGICAL(KIND=1)} function. - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns @code{.TRUE.} if and only if the Fortran I/O unit -specified by @var{Unit} is connected -to a terminal device. -See @code{isatty(3)}. - -@end ifset -@ifset familyMIL -@node IShft Intrinsic -@subsubsection IShft Intrinsic -@cindex IShft intrinsic -@cindex intrinsics, IShft - -@noindent -@example -IShft(@var{I}, @var{Shift}) -@end example - -@noindent -IShft: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Shift}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -All bits representing @var{I} are shifted @var{Shift} places. -@samp{@var{Shift}.GT.0} indicates a left shift, @samp{@var{Shift}.EQ.0} -indicates no shift and @samp{@var{Shift}.LT.0} indicates a right shift. -If the absolute value of the shift count is greater than -@samp{BIT_SIZE(@var{I})}, the result is undefined. -Bits shifted out from the left end or the right end are lost. -Zeros are shifted in from the opposite end. - -@xref{IShftC Intrinsic}, for the circular-shift equivalent. - -@node IShftC Intrinsic -@subsubsection IShftC Intrinsic -@cindex IShftC intrinsic -@cindex intrinsics, IShftC - -@noindent -@example -IShftC(@var{I}, @var{Shift}, @var{Size}) -@end example - -@noindent -IShftC: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Shift}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Size}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -The rightmost @var{Size} bits of the argument @var{I} -are shifted circularly @var{Shift} -places, i.e.@: the bits shifted out of one end are shifted into -the opposite end. -No bits are lost. -The unshifted bits of the result are the same as -the unshifted bits of @var{I}. -The absolute value of the argument @var{Shift} -must be less than or equal to @var{Size}. -The value of @var{Size} must be greater than or equal to one and less than -or equal to @samp{BIT_SIZE(@var{I})}. - -@xref{IShft Intrinsic}, for the logical shift equivalent. - -@end ifset -@ifset familyF77 -@node ISign Intrinsic -@subsubsection ISign Intrinsic -@cindex ISign intrinsic -@cindex intrinsics, ISign - -@noindent -@example -ISign(@var{A}, @var{B}) -@end example - -@noindent -ISign: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -@var{B}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{SIGN()} that is specific -to one type for @var{A} and @var{B}. -@xref{Sign Intrinsic}. - -@end ifset -@ifset familyF2U -@node ITime Intrinsic -@subsubsection ITime Intrinsic -@cindex ITime intrinsic -@cindex intrinsics, ITime - -@noindent -@example -CALL ITime(@var{TArray}) -@end example - -@noindent -@var{TArray}: @code{INTEGER(KIND=1)}; DIMENSION(3); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the current local time hour, minutes, and seconds in elements -1, 2, and 3 of @var{TArray}, respectively. - -@end ifset -@ifset familyVXT -@node IZExt Intrinsic -@subsubsection IZExt Intrinsic -@cindex IZExt intrinsic -@cindex intrinsics, IZExt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL IZExt} to use this name for an -external procedure. - -@node JIAbs Intrinsic -@subsubsection JIAbs Intrinsic -@cindex JIAbs intrinsic -@cindex intrinsics, JIAbs - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIAbs} to use this name for an -external procedure. - -@node JIAnd Intrinsic -@subsubsection JIAnd Intrinsic -@cindex JIAnd intrinsic -@cindex intrinsics, JIAnd - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIAnd} to use this name for an -external procedure. - -@node JIBClr Intrinsic -@subsubsection JIBClr Intrinsic -@cindex JIBClr intrinsic -@cindex intrinsics, JIBClr - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIBClr} to use this name for an -external procedure. - -@node JIBits Intrinsic -@subsubsection JIBits Intrinsic -@cindex JIBits intrinsic -@cindex intrinsics, JIBits - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIBits} to use this name for an -external procedure. - -@node JIBSet Intrinsic -@subsubsection JIBSet Intrinsic -@cindex JIBSet intrinsic -@cindex intrinsics, JIBSet - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIBSet} to use this name for an -external procedure. - -@node JIDiM Intrinsic -@subsubsection JIDiM Intrinsic -@cindex JIDiM intrinsic -@cindex intrinsics, JIDiM - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIDiM} to use this name for an -external procedure. - -@node JIDInt Intrinsic -@subsubsection JIDInt Intrinsic -@cindex JIDInt intrinsic -@cindex intrinsics, JIDInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIDInt} to use this name for an -external procedure. - -@node JIDNnt Intrinsic -@subsubsection JIDNnt Intrinsic -@cindex JIDNnt intrinsic -@cindex intrinsics, JIDNnt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIDNnt} to use this name for an -external procedure. - -@node JIEOr Intrinsic -@subsubsection JIEOr Intrinsic -@cindex JIEOr intrinsic -@cindex intrinsics, JIEOr - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIEOr} to use this name for an -external procedure. - -@node JIFix Intrinsic -@subsubsection JIFix Intrinsic -@cindex JIFix intrinsic -@cindex intrinsics, JIFix - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIFix} to use this name for an -external procedure. - -@node JInt Intrinsic -@subsubsection JInt Intrinsic -@cindex JInt intrinsic -@cindex intrinsics, JInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JInt} to use this name for an -external procedure. - -@node JIOr Intrinsic -@subsubsection JIOr Intrinsic -@cindex JIOr intrinsic -@cindex intrinsics, JIOr - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIOr} to use this name for an -external procedure. - -@node JIQint Intrinsic -@subsubsection JIQint Intrinsic -@cindex JIQint intrinsic -@cindex intrinsics, JIQint - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIQint} to use this name for an -external procedure. - -@node JIQNnt Intrinsic -@subsubsection JIQNnt Intrinsic -@cindex JIQNnt intrinsic -@cindex intrinsics, JIQNnt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIQNnt} to use this name for an -external procedure. - -@node JIShft Intrinsic -@subsubsection JIShft Intrinsic -@cindex JIShft intrinsic -@cindex intrinsics, JIShft - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIShft} to use this name for an -external procedure. - -@node JIShftC Intrinsic -@subsubsection JIShftC Intrinsic -@cindex JIShftC intrinsic -@cindex intrinsics, JIShftC - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JIShftC} to use this name for an -external procedure. - -@node JISign Intrinsic -@subsubsection JISign Intrinsic -@cindex JISign intrinsic -@cindex intrinsics, JISign - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JISign} to use this name for an -external procedure. - -@node JMax0 Intrinsic -@subsubsection JMax0 Intrinsic -@cindex JMax0 intrinsic -@cindex intrinsics, JMax0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JMax0} to use this name for an -external procedure. - -@node JMax1 Intrinsic -@subsubsection JMax1 Intrinsic -@cindex JMax1 intrinsic -@cindex intrinsics, JMax1 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JMax1} to use this name for an -external procedure. - -@node JMin0 Intrinsic -@subsubsection JMin0 Intrinsic -@cindex JMin0 intrinsic -@cindex intrinsics, JMin0 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JMin0} to use this name for an -external procedure. - -@node JMin1 Intrinsic -@subsubsection JMin1 Intrinsic -@cindex JMin1 intrinsic -@cindex intrinsics, JMin1 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JMin1} to use this name for an -external procedure. - -@node JMod Intrinsic -@subsubsection JMod Intrinsic -@cindex JMod intrinsic -@cindex intrinsics, JMod - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JMod} to use this name for an -external procedure. - -@node JNInt Intrinsic -@subsubsection JNInt Intrinsic -@cindex JNInt intrinsic -@cindex intrinsics, JNInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JNInt} to use this name for an -external procedure. - -@node JNot Intrinsic -@subsubsection JNot Intrinsic -@cindex JNot intrinsic -@cindex intrinsics, JNot - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JNot} to use this name for an -external procedure. - -@node JZExt Intrinsic -@subsubsection JZExt Intrinsic -@cindex JZExt intrinsic -@cindex intrinsics, JZExt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL JZExt} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node Kill Intrinsic (subroutine) -@subsubsection Kill Intrinsic (subroutine) -@cindex Kill intrinsic -@cindex intrinsics, Kill - -@noindent -@example -CALL Kill(@var{Pid}, @var{Signal}, @var{Status}) -@end example - -@noindent -@var{Pid}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Signal}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Sends the signal specified by @var{Signal} to the process @var{Pid}. -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return. -See @code{kill(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{Kill Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node Kill Intrinsic (function) -@subsubsection Kill Intrinsic (function) -@cindex Kill intrinsic -@cindex intrinsics, Kill - -@noindent -@example -Kill(@var{Pid}, @var{Signal}) -@end example - -@noindent -Kill: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Pid}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Signal}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Sends the signal specified by @var{Signal} to the process @var{Pid}. -Returns 0 on success or a nonzero error code. -See @code{kill(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{Kill Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node Kind Intrinsic -@subsubsection Kind Intrinsic -@cindex Kind intrinsic -@cindex intrinsics, Kind - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Kind} to use this name for an -external procedure. - -@node LBound Intrinsic -@subsubsection LBound Intrinsic -@cindex LBound intrinsic -@cindex intrinsics, LBound - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL LBound} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node Len Intrinsic -@subsubsection Len Intrinsic -@cindex Len intrinsic -@cindex intrinsics, Len - -@noindent -@example -Len(@var{String}) -@end example - -@noindent -Len: @code{INTEGER(KIND=1)} function. - -@noindent -@var{String}: @code{CHARACTER}; scalar. - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the length of @var{String}. - -If @var{String} is an array, the length of an element -of @var{String} is returned. - -Note that @var{String} need not be defined when this -intrinsic is invoked, since only the length, not -the content, of @var{String} is needed. - -@xref{Bit_Size Intrinsic}, for the function that determines -the size of its argument in bits. - -@end ifset -@ifset familyF90 -@node Len_Trim Intrinsic -@subsubsection Len_Trim Intrinsic -@cindex Len_Trim intrinsic -@cindex intrinsics, Len_Trim - -@noindent -@example -Len_Trim(@var{String}) -@end example - -@noindent -Len_Trim: @code{INTEGER(KIND=1)} function. - -@noindent -@var{String}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f90}. - -@noindent -Description: - -Returns the index of the last non-blank character in @var{String}. -@code{LNBLNK} and @code{LEN_TRIM} are equivalent. - -@end ifset -@ifset familyF77 -@node LGe Intrinsic -@subsubsection LGe Intrinsic -@cindex LGe intrinsic -@cindex intrinsics, LGe - -@noindent -@example -LGe(@var{String_A}, @var{String_B}) -@end example - -@noindent -LGe: @code{LOGICAL(KIND=1)} function. - -@noindent -@var{String_A}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{String_B}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{.TRUE.} if @samp{@var{String_A}.GE.@var{String_B}}, -@samp{.FALSE.} otherwise. -@var{String_A} and @var{String_B} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{String_A} and @var{String_B} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -The lexical comparison intrinsics @code{LGe}, @code{LGt}, -@code{LLe}, and @code{LLt} differ from the corresponding -intrinsic operators @code{.GE.}, @code{.GT.}, -@code{.LE.}, @code{.LT.}. -Because the ASCII collating sequence is assumed, -the following expressions always return @samp{.TRUE.}: - -@smallexample -LGE ('0', ' ') -LGE ('A', '0') -LGE ('a', 'A') -@end smallexample - -The following related expressions do @emph{not} always -return @samp{.TRUE.}, as they are not necessarily evaluated -assuming the arguments use ASCII encoding: - -@smallexample -'0' .GE. ' ' -'A' .GE. '0' -'a' .GE. 'A' -@end smallexample - -The same difference exists -between @code{LGt} and @code{.GT.}; -between @code{LLe} and @code{.LE.}; and -between @code{LLt} and @code{.LT.}. - -@node LGt Intrinsic -@subsubsection LGt Intrinsic -@cindex LGt intrinsic -@cindex intrinsics, LGt - -@noindent -@example -LGt(@var{String_A}, @var{String_B}) -@end example - -@noindent -LGt: @code{LOGICAL(KIND=1)} function. - -@noindent -@var{String_A}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{String_B}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{.TRUE.} if @samp{@var{String_A}.GT.@var{String_B}}, -@samp{.FALSE.} otherwise. -@var{String_A} and @var{String_B} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{String_A} and @var{String_B} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -@xref{LGe Intrinsic}, for information on the distinction -between the @code{LGT} intrinsic and the @code{.GT.} -operator. - -@end ifset -@ifset familyF2U -@node Link Intrinsic (subroutine) -@subsubsection Link Intrinsic (subroutine) -@cindex Link intrinsic -@cindex intrinsics, Link - -@noindent -@example -CALL Link(@var{Path1}, @var{Path2}, @var{Status}) -@end example - -@noindent -@var{Path1}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Path2}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Makes a (hard) link from file @var{Path1} to @var{Path2}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{Path1} and @var{Path2}---otherwise, -trailing blanks in @var{Path1} and @var{Path2} are ignored. -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return. -See @code{link(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{Link Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node Link Intrinsic (function) -@subsubsection Link Intrinsic (function) -@cindex Link intrinsic -@cindex intrinsics, Link - -@noindent -@example -Link(@var{Path1}, @var{Path2}) -@end example - -@noindent -Link: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Path1}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Path2}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Makes a (hard) link from file @var{Path1} to @var{Path2}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{Path1} and @var{Path2}---otherwise, -trailing blanks in @var{Path1} and @var{Path2} are ignored. -Returns 0 on success or a nonzero error code. -See @code{link(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{Link Intrinsic (subroutine)}. - -@end ifset -@ifset familyF77 -@node LLe Intrinsic -@subsubsection LLe Intrinsic -@cindex LLe intrinsic -@cindex intrinsics, LLe - -@noindent -@example -LLe(@var{String_A}, @var{String_B}) -@end example - -@noindent -LLe: @code{LOGICAL(KIND=1)} function. - -@noindent -@var{String_A}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{String_B}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{.TRUE.} if @samp{@var{String_A}.LE.@var{String_B}}, -@samp{.FALSE.} otherwise. -@var{String_A} and @var{String_B} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{String_A} and @var{String_B} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -@xref{LGe Intrinsic}, for information on the distinction -between the @code{LLE} intrinsic and the @code{.LE.} -operator. - -@node LLt Intrinsic -@subsubsection LLt Intrinsic -@cindex LLt intrinsic -@cindex intrinsics, LLt - -@noindent -@example -LLt(@var{String_A}, @var{String_B}) -@end example - -@noindent -LLt: @code{LOGICAL(KIND=1)} function. - -@noindent -@var{String_A}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{String_B}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{.TRUE.} if @samp{@var{String_A}.LT.@var{String_B}}, -@samp{.FALSE.} otherwise. -@var{String_A} and @var{String_B} are interpreted as containing -ASCII character codes. -If either value contains a character not in the ASCII -character set, the result is processor dependent. - -If the @var{String_A} and @var{String_B} are not the same length, -the shorter is compared as if spaces were appended to -it to form a value that has the same length as the longer. - -@xref{LGe Intrinsic}, for information on the distinction -between the @code{LLT} intrinsic and the @code{.LT.} -operator. - -@end ifset -@ifset familyF2U -@node LnBlnk Intrinsic -@subsubsection LnBlnk Intrinsic -@cindex LnBlnk intrinsic -@cindex intrinsics, LnBlnk - -@noindent -@example -LnBlnk(@var{String}) -@end example - -@noindent -LnBlnk: @code{INTEGER(KIND=1)} function. - -@noindent -@var{String}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the index of the last non-blank character in @var{String}. -@code{LNBLNK} and @code{LEN_TRIM} are equivalent. - -@node Loc Intrinsic -@subsubsection Loc Intrinsic -@cindex Loc intrinsic -@cindex intrinsics, Loc - -@noindent -@example -Loc(@var{Entity}) -@end example - -@noindent -Loc: @code{INTEGER(KIND=7)} function. - -@noindent -@var{Entity}: Any type; cannot be a constant or expression. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -The @code{LOC()} intrinsic works the -same way as the @code{%LOC()} construct. -@xref{%LOC(),,The @code{%LOC()} Construct}, for -more information. - -@end ifset -@ifset familyF77 -@node Log Intrinsic -@subsubsection Log Intrinsic -@cindex Log intrinsic -@cindex intrinsics, Log - -@noindent -@example -Log(@var{X}) -@end example - -@noindent -Log: @code{REAL} or @code{COMPLEX} function, the exact type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL} or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the natural logarithm of @var{X}, which must -be greater than zero or, if type @code{COMPLEX}, must not -be zero. - -@xref{Exp Intrinsic}, for the inverse of this function. - -@xref{Log10 Intrinsic}, for the `common' (base-10) logarithm function. - -@node Log10 Intrinsic -@subsubsection Log10 Intrinsic -@cindex Log10 intrinsic -@cindex intrinsics, Log10 - -@noindent -@example -Log10(@var{X}) -@end example - -@noindent -Log10: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the common logarithm (base 10) of @var{X}, which must -be greater than zero. - -The inverse of this function is @samp{10. ** LOG10(@var{X})}. - -@xref{Log Intrinsic}, for the natural logarithm function. - -@end ifset -@ifset familyF90 -@node Logical Intrinsic -@subsubsection Logical Intrinsic -@cindex Logical intrinsic -@cindex intrinsics, Logical - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Logical} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node Long Intrinsic -@subsubsection Long Intrinsic -@cindex Long intrinsic -@cindex intrinsics, Long - -@noindent -@example -Long(@var{A}) -@end example - -@noindent -Long: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER(KIND=6)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Archaic form of @code{INT()} that is specific -to one type for @var{A}. -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. - -@end ifset -@ifset familyF2C -@node LShift Intrinsic -@subsubsection LShift Intrinsic -@cindex LShift intrinsic -@cindex intrinsics, LShift - -@noindent -@example -LShift(@var{I}, @var{Shift}) -@end example - -@noindent -LShift: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Shift}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Returns @var{I} shifted to the left -@var{Shift} bits. - -Although similar to the expression -@samp{@var{I}*(2**@var{Shift})}, there -are important differences. -For example, the sign of the result is -not necessarily the same as the sign of -@var{I}. - -Currently this intrinsic is defined assuming -the underlying representation of @var{I} -is as a two's-complement integer. -It is unclear at this point whether that -definition will apply when a different -representation is involved. - -@xref{LShift Intrinsic}, for the inverse of this function. - -@xref{IShft Intrinsic}, for information -on a more widely available left-shifting -intrinsic that is also more precisely defined. - -@end ifset -@ifset familyF2U -@node LStat Intrinsic (subroutine) -@subsubsection LStat Intrinsic (subroutine) -@cindex LStat intrinsic -@cindex intrinsics, LStat - -@noindent -@example -CALL LStat(@var{File}, @var{SArray}, @var{Status}) -@end example - -@noindent -@var{File}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{SArray}: @code{INTEGER(KIND=1)}; DIMENSION(13); INTENT(OUT). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Obtains data about the given file @var{File} and places them in the array -@var{SArray}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{File}---otherwise, -trailing blanks in @var{File} are ignored. -If @var{File} is a symbolic link it returns data on the -link itself, so the routine is available only on systems that support -symbolic links. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{lstat(2)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{LStat Intrinsic (function)}. - -@node LStat Intrinsic (function) -@subsubsection LStat Intrinsic (function) -@cindex LStat intrinsic -@cindex intrinsics, LStat - -@noindent -@example -LStat(@var{File}, @var{SArray}) -@end example - -@noindent -LStat: @code{INTEGER(KIND=1)} function. - -@noindent -@var{File}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{SArray}: @code{INTEGER(KIND=1)}; DIMENSION(13); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Obtains data about the given file @var{File} and places them in the array -@var{SArray}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{File}---otherwise, -trailing blanks in @var{File} are ignored. -If @var{File} is a symbolic link it returns data on the -link itself, so the routine is available only on systems that support -symbolic links. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -Returns 0 on success or a nonzero error code -(@code{ENOSYS} if the system does not provide @code{lstat(2)}). - -For information on other intrinsics with the same name: -@xref{LStat Intrinsic (subroutine)}. - -@node LTime Intrinsic -@subsubsection LTime Intrinsic -@cindex LTime intrinsic -@cindex intrinsics, LTime - -@noindent -@example -CALL LTime(@var{STime}, @var{TArray}) -@end example - -@noindent -@var{STime}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -@var{TArray}: @code{INTEGER(KIND=1)}; DIMENSION(9); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Given a system time value @var{STime}, fills @var{TArray} with values -extracted from it appropriate to the GMT time zone using -@code{localtime(3)}. - -The array elements are as follows: - -@enumerate -@item -Seconds after the minute, range 0--59 or 0--61 to allow for leap -seconds - -@item -Minutes after the hour, range 0--59 - -@item -Hours past midnight, range 0--23 - -@item -Day of month, range 0--31 - -@item -Number of months since January, range 0--12 - -@item -Years since 1900 - -@item -Number of days since Sunday, range 0--6 - -@item -Days since January 1 - -@item -Daylight savings indicator: positive if daylight savings is in effect, -zero if not, and negative if the information isn't available. -@end enumerate - -@end ifset -@ifset familyF90 -@node MatMul Intrinsic -@subsubsection MatMul Intrinsic -@cindex MatMul intrinsic -@cindex intrinsics, MatMul - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL MatMul} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node Max Intrinsic -@subsubsection Max Intrinsic -@cindex Max intrinsic -@cindex intrinsics, Max - -@noindent -@example -Max(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -Max: @code{INTEGER} or @code{REAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{A}: @code{INTEGER} or @code{REAL}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the argument with the largest value. - -@xref{Min Intrinsic}, for the opposite function. - -@node Max0 Intrinsic -@subsubsection Max0 Intrinsic -@cindex Max0 intrinsic -@cindex intrinsics, Max0 - -@noindent -@example -Max0(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -Max0: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MAX()} that is specific -to one type for @var{A}. -@xref{Max Intrinsic}. - -@node Max1 Intrinsic -@subsubsection Max1 Intrinsic -@cindex Max1 intrinsic -@cindex intrinsics, Max1 - -@noindent -@example -Max1(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -Max1: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MAX()} that is specific -to one type for @var{A} and a different return type. -@xref{Max Intrinsic}. - -@end ifset -@ifset familyF90 -@node MaxExponent Intrinsic -@subsubsection MaxExponent Intrinsic -@cindex MaxExponent intrinsic -@cindex intrinsics, MaxExponent - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL MaxExponent} to use this name for an -external procedure. - -@node MaxLoc Intrinsic -@subsubsection MaxLoc Intrinsic -@cindex MaxLoc intrinsic -@cindex intrinsics, MaxLoc - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL MaxLoc} to use this name for an -external procedure. - -@node MaxVal Intrinsic -@subsubsection MaxVal Intrinsic -@cindex MaxVal intrinsic -@cindex intrinsics, MaxVal - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL MaxVal} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node MClock Intrinsic -@subsubsection MClock Intrinsic -@cindex MClock intrinsic -@cindex intrinsics, MClock - -@noindent -@example -MClock() -@end example - -@noindent -MClock: @code{INTEGER(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the number of clock ticks since the start of the process. -Supported on systems with @code{clock(3)} (q.v.). - -@cindex wraparound, timings -@cindex limits, timings -This intrinsic is not fully portable, such as to systems -with 32-bit @code{INTEGER} types but supporting times -wider than 32 bits. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -@xref{MClock8 Intrinsic}, for information on a -similar intrinsic that might be portable to more -GNU Fortran implementations, though to fewer -Fortran compilers. - -If the system does not support @code{clock(3)}, --1 is returned. - -@node MClock8 Intrinsic -@subsubsection MClock8 Intrinsic -@cindex MClock8 intrinsic -@cindex intrinsics, MClock8 - -@noindent -@example -MClock8() -@end example - -@noindent -MClock8: @code{INTEGER(KIND=2)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the number of clock ticks since the start of the process. -Supported on systems with @code{clock(3)} (q.v.). - -@cindex wraparound, timings -@cindex limits, timings -@emph{Warning:} this intrinsic does not increase the range -of the timing values over that returned by @code{clock(3)}. -On a system with a 32-bit @code{clock(3)}, -@code{MCLOCK8} will return a 32-bit value, -even though converted to an @samp{INTEGER(KIND=2)} value. -That means overflows of the 32-bit value can still occur. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -No Fortran implementations other than GNU Fortran are -known to support this intrinsic at the time of this -writing. -@xref{MClock Intrinsic}, for information on a -similar intrinsic that might be portable to more Fortran -compilers, though to fewer GNU Fortran implementations. - -If the system does not support @code{clock(3)}, --1 is returned. - -@end ifset -@ifset familyF90 -@node Merge Intrinsic -@subsubsection Merge Intrinsic -@cindex Merge intrinsic -@cindex intrinsics, Merge - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Merge} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node Min Intrinsic -@subsubsection Min Intrinsic -@cindex Min intrinsic -@cindex intrinsics, Min - -@noindent -@example -Min(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -Min: @code{INTEGER} or @code{REAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{A}: @code{INTEGER} or @code{REAL}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the argument with the smallest value. - -@xref{Max Intrinsic}, for the opposite function. - -@node Min0 Intrinsic -@subsubsection Min0 Intrinsic -@cindex Min0 intrinsic -@cindex intrinsics, Min0 - -@noindent -@example -Min0(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -Min0: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{INTEGER(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MIN()} that is specific -to one type for @var{A}. -@xref{Min Intrinsic}. - -@node Min1 Intrinsic -@subsubsection Min1 Intrinsic -@cindex Min1 intrinsic -@cindex intrinsics, Min1 - -@noindent -@example -Min1(@var{A}-1, @var{A}-2, @dots{}, @var{A}-n) -@end example - -@noindent -Min1: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=1)}; at least two such arguments must be provided; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{MIN()} that is specific -to one type for @var{A} and a different return type. -@xref{Min Intrinsic}. - -@end ifset -@ifset familyF90 -@node MinExponent Intrinsic -@subsubsection MinExponent Intrinsic -@cindex MinExponent intrinsic -@cindex intrinsics, MinExponent - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL MinExponent} to use this name for an -external procedure. - -@node MinLoc Intrinsic -@subsubsection MinLoc Intrinsic -@cindex MinLoc intrinsic -@cindex intrinsics, MinLoc - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL MinLoc} to use this name for an -external procedure. - -@node MinVal Intrinsic -@subsubsection MinVal Intrinsic -@cindex MinVal intrinsic -@cindex intrinsics, MinVal - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL MinVal} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node Mod Intrinsic -@subsubsection Mod Intrinsic -@cindex Mod intrinsic -@cindex intrinsics, Mod - -@noindent -@example -Mod(@var{A}, @var{P}) -@end example - -@noindent -Mod: @code{INTEGER} or @code{REAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{A}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -@var{P}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns remainder calculated as: - -@smallexample -@var{A} - (INT(@var{A} / @var{P}) * @var{P}) -@end smallexample - -@var{P} must not be zero. - -@end ifset -@ifset familyF90 -@node Modulo Intrinsic -@subsubsection Modulo Intrinsic -@cindex Modulo intrinsic -@cindex intrinsics, Modulo - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Modulo} to use this name for an -external procedure. - -@end ifset -@ifset familyMIL -@node MvBits Intrinsic -@subsubsection MvBits Intrinsic -@cindex MvBits intrinsic -@cindex intrinsics, MvBits - -@noindent -@example -CALL MvBits(@var{From}, @var{FromPos}, @var{Len}, @var{TO}, @var{ToPos}) -@end example - -@noindent -@var{From}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{FromPos}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Len}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{TO}: @code{INTEGER} with same @samp{KIND=} value as for @var{From}; scalar; INTENT(INOUT). - -@noindent -@var{ToPos}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Moves @var{Len} bits from positions @var{FromPos} through -@samp{@var{FromPos}+@var{Len}-1} of @var{From} to positions @var{ToPos} through -@samp{@var{FromPos}+@var{Len}-1} of @var{TO}. The portion of argument -@var{TO} not affected by the movement of bits is unchanged. Arguments -@var{From} and @var{TO} are permitted to be the same numeric storage -unit. The values of @samp{@var{FromPos}+@var{Len}} and -@samp{@var{ToPos}+@var{Len}} must be less than or equal to -@samp{BIT_SIZE(@var{From})}. - -@end ifset -@ifset familyF90 -@node Nearest Intrinsic -@subsubsection Nearest Intrinsic -@cindex Nearest intrinsic -@cindex intrinsics, Nearest - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Nearest} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node NInt Intrinsic -@subsubsection NInt Intrinsic -@cindex NInt intrinsic -@cindex intrinsics, NInt - -@noindent -@example -NInt(@var{A}) -@end example - -@noindent -NInt: @code{INTEGER(KIND=1)} function. - -@noindent -@var{A}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @var{A} with the fractional portion of its -magnitude eliminated by rounding to the nearest whole -number and with its sign preserved, converted -to type @code{INTEGER(KIND=1)}. - -If @var{A} is type @code{COMPLEX}, its real part is -rounded and converted. - -A fractional portion exactly equal to -@samp{.5} is rounded to the whole number that -is larger in magnitude. -(Also called ``Fortran round''.) - -@xref{Int Intrinsic}, for how to convert, truncate to -whole number. - -@xref{ANInt Intrinsic}, for how to round to nearest whole number -without converting. - -@end ifset -@ifset familyMIL -@node Not Intrinsic -@subsubsection Not Intrinsic -@cindex Not intrinsic -@cindex intrinsics, Not - -@noindent -@example -Not(@var{I}) -@end example - -@noindent -Not: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{mil}, @code{f90}, @code{vxt}. - -@noindent -Description: - -Returns value resulting from boolean NOT of each bit -in @var{I}. - -@end ifset -@ifset familyF2C -@node Or Intrinsic -@subsubsection Or Intrinsic -@cindex Or intrinsic -@cindex intrinsics, Or - -@noindent -@example -Or(@var{I}, @var{J}) -@end example - -@noindent -Or: @code{INTEGER} or @code{LOGICAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{I}: @code{INTEGER} or @code{LOGICAL}; scalar; INTENT(IN). - -@noindent -@var{J}: @code{INTEGER} or @code{LOGICAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Returns value resulting from boolean OR of -pair of bits in each of @var{I} and @var{J}. - -@end ifset -@ifset familyF90 -@node Pack Intrinsic -@subsubsection Pack Intrinsic -@cindex Pack intrinsic -@cindex intrinsics, Pack - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Pack} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node PError Intrinsic -@subsubsection PError Intrinsic -@cindex PError intrinsic -@cindex intrinsics, PError - -@noindent -@example -CALL PError(@var{String}) -@end example - -@noindent -@var{String}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Prints (on the C @code{stderr} stream) a newline-terminated error -message corresponding to the last system error. -This is prefixed by @var{String}, a colon and a space. -See @code{perror(3)}. - -@end ifset -@ifset familyF90 -@node Precision Intrinsic -@subsubsection Precision Intrinsic -@cindex Precision intrinsic -@cindex intrinsics, Precision - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Precision} to use this name for an -external procedure. - -@node Present Intrinsic -@subsubsection Present Intrinsic -@cindex Present intrinsic -@cindex intrinsics, Present - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Present} to use this name for an -external procedure. - -@node Product Intrinsic -@subsubsection Product Intrinsic -@cindex Product intrinsic -@cindex intrinsics, Product - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Product} to use this name for an -external procedure. - -@end ifset -@ifset familyVXT -@node QAbs Intrinsic -@subsubsection QAbs Intrinsic -@cindex QAbs intrinsic -@cindex intrinsics, QAbs - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QAbs} to use this name for an -external procedure. - -@node QACos Intrinsic -@subsubsection QACos Intrinsic -@cindex QACos intrinsic -@cindex intrinsics, QACos - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QACos} to use this name for an -external procedure. - -@node QACosD Intrinsic -@subsubsection QACosD Intrinsic -@cindex QACosD intrinsic -@cindex intrinsics, QACosD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QACosD} to use this name for an -external procedure. - -@node QASin Intrinsic -@subsubsection QASin Intrinsic -@cindex QASin intrinsic -@cindex intrinsics, QASin - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QASin} to use this name for an -external procedure. - -@node QASinD Intrinsic -@subsubsection QASinD Intrinsic -@cindex QASinD intrinsic -@cindex intrinsics, QASinD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QASinD} to use this name for an -external procedure. - -@node QATan Intrinsic -@subsubsection QATan Intrinsic -@cindex QATan intrinsic -@cindex intrinsics, QATan - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QATan} to use this name for an -external procedure. - -@node QATan2 Intrinsic -@subsubsection QATan2 Intrinsic -@cindex QATan2 intrinsic -@cindex intrinsics, QATan2 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QATan2} to use this name for an -external procedure. - -@node QATan2D Intrinsic -@subsubsection QATan2D Intrinsic -@cindex QATan2D intrinsic -@cindex intrinsics, QATan2D - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QATan2D} to use this name for an -external procedure. - -@node QATanD Intrinsic -@subsubsection QATanD Intrinsic -@cindex QATanD intrinsic -@cindex intrinsics, QATanD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QATanD} to use this name for an -external procedure. - -@node QCos Intrinsic -@subsubsection QCos Intrinsic -@cindex QCos intrinsic -@cindex intrinsics, QCos - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QCos} to use this name for an -external procedure. - -@node QCosD Intrinsic -@subsubsection QCosD Intrinsic -@cindex QCosD intrinsic -@cindex intrinsics, QCosD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QCosD} to use this name for an -external procedure. - -@node QCosH Intrinsic -@subsubsection QCosH Intrinsic -@cindex QCosH intrinsic -@cindex intrinsics, QCosH - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QCosH} to use this name for an -external procedure. - -@node QDiM Intrinsic -@subsubsection QDiM Intrinsic -@cindex QDiM intrinsic -@cindex intrinsics, QDiM - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QDiM} to use this name for an -external procedure. - -@node QExp Intrinsic -@subsubsection QExp Intrinsic -@cindex QExp intrinsic -@cindex intrinsics, QExp - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QExp} to use this name for an -external procedure. - -@node QExt Intrinsic -@subsubsection QExt Intrinsic -@cindex QExt intrinsic -@cindex intrinsics, QExt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QExt} to use this name for an -external procedure. - -@node QExtD Intrinsic -@subsubsection QExtD Intrinsic -@cindex QExtD intrinsic -@cindex intrinsics, QExtD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QExtD} to use this name for an -external procedure. - -@node QFloat Intrinsic -@subsubsection QFloat Intrinsic -@cindex QFloat intrinsic -@cindex intrinsics, QFloat - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QFloat} to use this name for an -external procedure. - -@node QInt Intrinsic -@subsubsection QInt Intrinsic -@cindex QInt intrinsic -@cindex intrinsics, QInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QInt} to use this name for an -external procedure. - -@node QLog Intrinsic -@subsubsection QLog Intrinsic -@cindex QLog intrinsic -@cindex intrinsics, QLog - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QLog} to use this name for an -external procedure. - -@node QLog10 Intrinsic -@subsubsection QLog10 Intrinsic -@cindex QLog10 intrinsic -@cindex intrinsics, QLog10 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QLog10} to use this name for an -external procedure. - -@node QMax1 Intrinsic -@subsubsection QMax1 Intrinsic -@cindex QMax1 intrinsic -@cindex intrinsics, QMax1 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QMax1} to use this name for an -external procedure. - -@node QMin1 Intrinsic -@subsubsection QMin1 Intrinsic -@cindex QMin1 intrinsic -@cindex intrinsics, QMin1 - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QMin1} to use this name for an -external procedure. - -@node QMod Intrinsic -@subsubsection QMod Intrinsic -@cindex QMod intrinsic -@cindex intrinsics, QMod - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QMod} to use this name for an -external procedure. - -@node QNInt Intrinsic -@subsubsection QNInt Intrinsic -@cindex QNInt intrinsic -@cindex intrinsics, QNInt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QNInt} to use this name for an -external procedure. - -@node QSin Intrinsic -@subsubsection QSin Intrinsic -@cindex QSin intrinsic -@cindex intrinsics, QSin - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QSin} to use this name for an -external procedure. - -@node QSinD Intrinsic -@subsubsection QSinD Intrinsic -@cindex QSinD intrinsic -@cindex intrinsics, QSinD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QSinD} to use this name for an -external procedure. - -@node QSinH Intrinsic -@subsubsection QSinH Intrinsic -@cindex QSinH intrinsic -@cindex intrinsics, QSinH - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QSinH} to use this name for an -external procedure. - -@node QSqRt Intrinsic -@subsubsection QSqRt Intrinsic -@cindex QSqRt intrinsic -@cindex intrinsics, QSqRt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QSqRt} to use this name for an -external procedure. - -@node QTan Intrinsic -@subsubsection QTan Intrinsic -@cindex QTan intrinsic -@cindex intrinsics, QTan - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QTan} to use this name for an -external procedure. - -@node QTanD Intrinsic -@subsubsection QTanD Intrinsic -@cindex QTanD intrinsic -@cindex intrinsics, QTanD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QTanD} to use this name for an -external procedure. - -@node QTanH Intrinsic -@subsubsection QTanH Intrinsic -@cindex QTanH intrinsic -@cindex intrinsics, QTanH - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL QTanH} to use this name for an -external procedure. - -@end ifset -@ifset familyF90 -@node Radix Intrinsic -@subsubsection Radix Intrinsic -@cindex Radix intrinsic -@cindex intrinsics, Radix - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Radix} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node Rand Intrinsic -@subsubsection Rand Intrinsic -@cindex Rand intrinsic -@cindex intrinsics, Rand - -@noindent -@example -Rand(@var{Flag}) -@end example - -@noindent -Rand: @code{REAL(KIND=1)} function. - -@noindent -@var{Flag}: @code{INTEGER}; OPTIONAL; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns a uniform quasi-random number between 0 and 1. -If @var{Flag} is 0, the next number in sequence is returned; if -@var{Flag} is 1, the generator is restarted by calling @samp{srand(0)}; -if @var{Flag} has any other value, it is used as a new seed with -@code{srand}. - -@xref{SRand Intrinsic}. - -@emph{Note:} As typically implemented (by the routine of the same -name in the C library), this random number generator is a very poor -one, though the BSD and GNU libraries provide a much better -implementation than the `traditional' one. -On a different system you -almost certainly want to use something better. - -@end ifset -@ifset familyF90 -@node Random_Number Intrinsic -@subsubsection Random_Number Intrinsic -@cindex Random_Number intrinsic -@cindex intrinsics, Random_Number - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Random_Number} to use this name for an -external procedure. - -@node Random_Seed Intrinsic -@subsubsection Random_Seed Intrinsic -@cindex Random_Seed intrinsic -@cindex intrinsics, Random_Seed - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Random_Seed} to use this name for an -external procedure. - -@node Range Intrinsic -@subsubsection Range Intrinsic -@cindex Range intrinsic -@cindex intrinsics, Range - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Range} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node Real Intrinsic -@subsubsection Real Intrinsic -@cindex Real intrinsic -@cindex intrinsics, Real - -@noindent -@example -Real(@var{A}) -@end example - -@noindent -Real: @code{REAL} function. -The exact type is @samp{REAL(KIND=1)} when argument @var{A} is -any type other than @code{COMPLEX}, or when it is @code{COMPLEX(KIND=1)}. -When @var{A} is any @code{COMPLEX} type other than @code{COMPLEX(KIND=1)}, -this intrinsic is valid only when used as the argument to -@code{REAL()}, as explained below. - -@noindent -@var{A}: @code{INTEGER}, @code{REAL}, or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Converts @var{A} to @code{REAL(KIND=1)}. - -Use of @code{REAL()} with a @code{COMPLEX} argument -(other than @code{COMPLEX(KIND=1)}) is restricted to the following case: - -@example -REAL(REAL(A)) -@end example - -@noindent -This expression converts the real part of A to -@code{REAL(KIND=1)}. - -@xref{RealPart Intrinsic}, for information on a GNU Fortran -intrinsic that extracts the real part of an arbitrary -@code{COMPLEX} value. - -@xref{REAL() and AIMAG() of Complex}, for more information. - -@end ifset -@ifset familyGNU -@node RealPart Intrinsic -@subsubsection RealPart Intrinsic -@cindex RealPart intrinsic -@cindex intrinsics, RealPart - -@noindent -@example -RealPart(@var{Z}) -@end example - -@noindent -RealPart: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{Z}. - -@noindent -@var{Z}: @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{gnu}. - -@noindent -Description: - -The real part of @var{Z} is returned, without conversion. - -@emph{Note:} The way to do this in standard Fortran 90 -is @samp{REAL(@var{Z})}. -However, when, for example, @var{Z} is @code{COMPLEX(KIND=2)}, -@samp{REAL(@var{Z})} means something different for some compilers -that are not true Fortran 90 compilers but offer some -extensions standardized by Fortran 90 (such as the -@code{DOUBLE COMPLEX} type, also known as @code{COMPLEX(KIND=2)}). - -The advantage of @code{REALPART()} is that, while not necessarily -more or less portable than @code{REAL()}, it is more likely to -cause a compiler that doesn't support it to produce a diagnostic -than generate incorrect code. - -@xref{REAL() and AIMAG() of Complex}, for more information. - -@end ifset -@ifset familyF2U -@node Rename Intrinsic (subroutine) -@subsubsection Rename Intrinsic (subroutine) -@cindex Rename intrinsic -@cindex intrinsics, Rename - -@noindent -@example -CALL Rename(@var{Path1}, @var{Path2}, @var{Status}) -@end example - -@noindent -@var{Path1}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Path2}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Renames the file @var{Path1} to @var{Path2}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{Path1} and @var{Path2}---otherwise, -trailing blanks in @var{Path1} and @var{Path2} are ignored. -See @code{rename(2)}. -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{Rename Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node Rename Intrinsic (function) -@subsubsection Rename Intrinsic (function) -@cindex Rename intrinsic -@cindex intrinsics, Rename - -@noindent -@example -Rename(@var{Path1}, @var{Path2}) -@end example - -@noindent -Rename: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Path1}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Path2}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Renames the file @var{Path1} to @var{Path2}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{Path1} and @var{Path2}---otherwise, -trailing blanks in @var{Path1} and @var{Path2} are ignored. -See @code{rename(2)}. -Returns 0 on success or a nonzero error code. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{Rename Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node Repeat Intrinsic -@subsubsection Repeat Intrinsic -@cindex Repeat intrinsic -@cindex intrinsics, Repeat - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Repeat} to use this name for an -external procedure. - -@node Reshape Intrinsic -@subsubsection Reshape Intrinsic -@cindex Reshape intrinsic -@cindex intrinsics, Reshape - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Reshape} to use this name for an -external procedure. - -@node RRSpacing Intrinsic -@subsubsection RRSpacing Intrinsic -@cindex RRSpacing intrinsic -@cindex intrinsics, RRSpacing - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL RRSpacing} to use this name for an -external procedure. - -@end ifset -@ifset familyF2C -@node RShift Intrinsic -@subsubsection RShift Intrinsic -@cindex RShift intrinsic -@cindex intrinsics, RShift - -@noindent -@example -RShift(@var{I}, @var{Shift}) -@end example - -@noindent -RShift: @code{INTEGER} function, the @samp{KIND=} value of the type being that of argument @var{I}. - -@noindent -@var{I}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Shift}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Returns @var{I} shifted to the right -@var{Shift} bits. - -Although similar to the expression -@samp{@var{I}/(2**@var{Shift})}, there -are important differences. -For example, the sign of the result is -undefined. - -Currently this intrinsic is defined assuming -the underlying representation of @var{I} -is as a two's-complement integer. -It is unclear at this point whether that -definition will apply when a different -representation is involved. - -@xref{RShift Intrinsic}, for the inverse of this function. - -@xref{IShft Intrinsic}, for information -on a more widely available right-shifting -intrinsic that is also more precisely defined. - -@end ifset -@ifset familyF90 -@node Scale Intrinsic -@subsubsection Scale Intrinsic -@cindex Scale intrinsic -@cindex intrinsics, Scale - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Scale} to use this name for an -external procedure. - -@node Scan Intrinsic -@subsubsection Scan Intrinsic -@cindex Scan intrinsic -@cindex intrinsics, Scan - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Scan} to use this name for an -external procedure. - -@end ifset -@ifset familyVXT -@node Secnds Intrinsic -@subsubsection Secnds Intrinsic -@cindex Secnds intrinsic -@cindex intrinsics, Secnds - -@noindent -@example -Secnds(@var{T}) -@end example - -@noindent -Secnds: @code{REAL(KIND=1)} function. - -@noindent -@var{T}: @code{REAL(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{vxt}. - -@noindent -Description: - -Returns the local time in seconds since midnight minus the value -@var{T}. - -@cindex wraparound, timings -@cindex limits, timings -This values returned by this intrinsic -become numerically less than previous values -(they wrap around) during a single run of the -compiler program, under normal circumstances -(such as running through the midnight hour). - -@end ifset -@ifset familyF2U -@node Second Intrinsic (function) -@subsubsection Second Intrinsic (function) -@cindex Second intrinsic -@cindex intrinsics, Second - -@noindent -@example -Second() -@end example - -@noindent -Second: @code{REAL(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the process's runtime in seconds---the same value as the -UNIX function @code{etime} returns. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -For information on other intrinsics with the same name: -@xref{Second Intrinsic (subroutine)}. - -@node Second Intrinsic (subroutine) -@subsubsection Second Intrinsic (subroutine) -@cindex Second intrinsic -@cindex intrinsics, Second - -@noindent -@example -CALL Second(@var{Seconds}) -@end example - -@noindent -@var{Seconds}: @code{REAL}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the process's runtime in seconds in @var{Seconds}---the same value -as the UNIX function @code{etime} returns. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -This routine is known from Cray Fortran. @xref{CPU_Time Intrinsic}, -for a standard equivalent. - -For information on other intrinsics with the same name: -@xref{Second Intrinsic (function)}. - -@end ifset -@ifset familyF90 -@node Selected_Int_Kind Intrinsic -@subsubsection Selected_Int_Kind Intrinsic -@cindex Selected_Int_Kind intrinsic -@cindex intrinsics, Selected_Int_Kind - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Selected_Int_Kind} to use this name for an -external procedure. - -@node Selected_Real_Kind Intrinsic -@subsubsection Selected_Real_Kind Intrinsic -@cindex Selected_Real_Kind intrinsic -@cindex intrinsics, Selected_Real_Kind - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Selected_Real_Kind} to use this name for an -external procedure. - -@node Set_Exponent Intrinsic -@subsubsection Set_Exponent Intrinsic -@cindex Set_Exponent intrinsic -@cindex intrinsics, Set_Exponent - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Set_Exponent} to use this name for an -external procedure. - -@node Shape Intrinsic -@subsubsection Shape Intrinsic -@cindex Shape intrinsic -@cindex intrinsics, Shape - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Shape} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node Short Intrinsic -@subsubsection Short Intrinsic -@cindex Short intrinsic -@cindex intrinsics, Short - -@noindent -@example -Short(@var{A}) -@end example - -@noindent -Short: @code{INTEGER(KIND=6)} function. - -@noindent -@var{A}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns @var{A} with the fractional portion of its -magnitude truncated and its sign preserved, converted -to type @code{INTEGER(KIND=6)}. - -If @var{A} is type @code{COMPLEX}, its real part -is truncated and converted, and its imaginary part is disregarded. - -@xref{Int Intrinsic}. - -The precise meaning of this intrinsic might change -in a future version of the GNU Fortran language, -as more is learned about how it is used. - -@end ifset -@ifset familyF77 -@node Sign Intrinsic -@subsubsection Sign Intrinsic -@cindex Sign intrinsic -@cindex intrinsics, Sign - -@noindent -@example -Sign(@var{A}, @var{B}) -@end example - -@noindent -Sign: @code{INTEGER} or @code{REAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{A}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -@var{B}: @code{INTEGER} or @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns @samp{ABS(@var{A})*@var{s}}, where -@var{s} is +1 if @samp{@var{B}.GE.0}, --1 otherwise. - -@xref{Abs Intrinsic}, for the function that returns -the magnitude of a value. - -@end ifset -@ifset familyF2U -@node Signal Intrinsic (subroutine) -@subsubsection Signal Intrinsic (subroutine) -@cindex Signal intrinsic -@cindex intrinsics, Signal - -@noindent -@example -CALL Signal(@var{Number}, @var{Handler}, @var{Status}) -@end example - -@noindent -@var{Number}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Handler}: Signal handler (@code{INTEGER FUNCTION} or @code{SUBROUTINE}) -or dummy/global @code{INTEGER(KIND=1)} scalar. - -@noindent -@var{Status}: @code{INTEGER(KIND=7)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -If @var{Handler} is a an @code{EXTERNAL} routine, arranges for it to be -invoked with a single integer argument (of system-dependent length) -when signal @var{Number} occurs. -If @var{Handler} is an integer, it can be -used to turn off handling of signal @var{Number} or revert to its default -action. -See @code{signal(2)}. - -Note that @var{Handler} will be called using C conventions, -so the value of its argument in Fortran terms -Fortran terms is obtained by applying @code{%LOC()} (or @code{LOC()}) to it. - -The value returned by @code{signal(2)} is written to @var{Status}, if -that argument is supplied. -Otherwise the return value is ignored. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -@emph{Warning:} Use of the @code{libf2c} run-time library function -@samp{signal_} directly -(such as via @samp{EXTERNAL SIGNAL}) -requires use of the @code{%VAL()} construct -to pass an @code{INTEGER} value -(such as @samp{SIG_IGN} or @samp{SIG_DFL}) -for the @var{Handler} argument. - -However, while @samp{CALL SIGNAL(@var{signum}, %VAL(SIG_IGN))} -works when @samp{SIGNAL} is treated as an external procedure -(and resolves, at link time, to @code{libf2c}'s @samp{signal_} routine), -this construct is not valid when @samp{SIGNAL} is recognized -as the intrinsic of that name. - -Therefore, for maximum portability and reliability, -code such references to the @samp{SIGNAL} facility as follows: - -@smallexample -INTRINSIC SIGNAL -@dots{} -CALL SIGNAL(@var{signum}, SIG_IGN) -@end smallexample - -@code{g77} will compile such a call correctly, -while other compilers will generally either do so as well -or reject the @samp{INTRINSIC SIGNAL} statement via a diagnostic, -allowing you to take appropriate action. - -For information on other intrinsics with the same name: -@xref{Signal Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node Signal Intrinsic (function) -@subsubsection Signal Intrinsic (function) -@cindex Signal intrinsic -@cindex intrinsics, Signal - -@noindent -@example -Signal(@var{Number}, @var{Handler}) -@end example - -@noindent -Signal: @code{INTEGER(KIND=7)} function. - -@noindent -@var{Number}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Handler}: Signal handler (@code{INTEGER FUNCTION} or @code{SUBROUTINE}) -or dummy/global @code{INTEGER(KIND=1)} scalar. - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -If @var{Handler} is a an @code{EXTERNAL} routine, arranges for it to be -invoked with a single integer argument (of system-dependent length) -when signal @var{Number} occurs. -If @var{Handler} is an integer, it can be -used to turn off handling of signal @var{Number} or revert to its default -action. -See @code{signal(2)}. - -Note that @var{Handler} will be called using C conventions, -so the value of its argument in Fortran terms -is obtained by applying @code{%LOC()} (or @code{LOC()}) to it. - -The value returned by @code{signal(2)} is returned. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -@emph{Warning:} If the returned value is stored in -an @code{INTEGER(KIND=1)} (default @code{INTEGER}) argument, -truncation of the original return value occurs on some systems -(such as Alphas, which have 64-bit pointers but 32-bit default integers), -with no warning issued by @code{g77} under normal circumstances. - -Therefore, the following code fragment might silently fail on -some systems: - -@smallexample -INTEGER RTN -EXTERNAL MYHNDL -RTN = SIGNAL(@var{signum}, MYHNDL) -@dots{} -! Restore original handler: -RTN = SIGNAL(@var{signum}, RTN) -@end smallexample - -The reason for the failure is that @samp{RTN} might not hold -all the information on the original handler for the signal, -thus restoring an invalid handler. -This bug could manifest itself as a spurious run-time failure -at an arbitrary point later during the program's execution, -for example. - -@emph{Warning:} Use of the @code{libf2c} run-time library function -@samp{signal_} directly -(such as via @samp{EXTERNAL SIGNAL}) -requires use of the @code{%VAL()} construct -to pass an @code{INTEGER} value -(such as @samp{SIG_IGN} or @samp{SIG_DFL}) -for the @var{Handler} argument. - -However, while @samp{RTN = SIGNAL(@var{signum}, %VAL(SIG_IGN))} -works when @samp{SIGNAL} is treated as an external procedure -(and resolves, at link time, to @code{libf2c}'s @samp{signal_} routine), -this construct is not valid when @samp{SIGNAL} is recognized -as the intrinsic of that name. - -Therefore, for maximum portability and reliability, -code such references to the @samp{SIGNAL} facility as follows: - -@smallexample -INTRINSIC SIGNAL -@dots{} -RTN = SIGNAL(@var{signum}, SIG_IGN) -@end smallexample - -@code{g77} will compile such a call correctly, -while other compilers will generally either do so as well -or reject the @samp{INTRINSIC SIGNAL} statement via a diagnostic, -allowing you to take appropriate action. - -For information on other intrinsics with the same name: -@xref{Signal Intrinsic (subroutine)}. - -@end ifset -@ifset familyF77 -@node Sin Intrinsic -@subsubsection Sin Intrinsic -@cindex Sin intrinsic -@cindex intrinsics, Sin - -@noindent -@example -Sin(@var{X}) -@end example - -@noindent -Sin: @code{REAL} or @code{COMPLEX} function, the exact type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL} or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the sine of @var{X}, an angle measured -in radians. - -@xref{ASin Intrinsic}, for the inverse of this function. - -@end ifset -@ifset familyVXT -@node SinD Intrinsic -@subsubsection SinD Intrinsic -@cindex SinD intrinsic -@cindex intrinsics, SinD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL SinD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node SinH Intrinsic -@subsubsection SinH Intrinsic -@cindex SinH intrinsic -@cindex intrinsics, SinH - -@noindent -@example -SinH(@var{X}) -@end example - -@noindent -SinH: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the hyperbolic sine of @var{X}. - -@end ifset -@ifset familyF2U -@node Sleep Intrinsic -@subsubsection Sleep Intrinsic -@cindex Sleep intrinsic -@cindex intrinsics, Sleep - -@noindent -@example -CALL Sleep(@var{Seconds}) -@end example - -@noindent -@var{Seconds}: @code{INTEGER(KIND=1)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Causes the process to pause for @var{Seconds} seconds. -See @code{sleep(2)}. - -@end ifset -@ifset familyF77 -@node Sngl Intrinsic -@subsubsection Sngl Intrinsic -@cindex Sngl intrinsic -@cindex intrinsics, Sngl - -@noindent -@example -Sngl(@var{A}) -@end example - -@noindent -Sngl: @code{REAL(KIND=1)} function. - -@noindent -@var{A}: @code{REAL(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Archaic form of @code{REAL()} that is specific -to one type for @var{A}. -@xref{Real Intrinsic}. - -@end ifset -@ifset familyVXT -@node SnglQ Intrinsic -@subsubsection SnglQ Intrinsic -@cindex SnglQ intrinsic -@cindex intrinsics, SnglQ - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL SnglQ} to use this name for an -external procedure. - -@end ifset -@ifset familyF90 -@node Spacing Intrinsic -@subsubsection Spacing Intrinsic -@cindex Spacing intrinsic -@cindex intrinsics, Spacing - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Spacing} to use this name for an -external procedure. - -@node Spread Intrinsic -@subsubsection Spread Intrinsic -@cindex Spread intrinsic -@cindex intrinsics, Spread - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Spread} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node SqRt Intrinsic -@subsubsection SqRt Intrinsic -@cindex SqRt intrinsic -@cindex intrinsics, SqRt - -@noindent -@example -SqRt(@var{X}) -@end example - -@noindent -SqRt: @code{REAL} or @code{COMPLEX} function, the exact type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL} or @code{COMPLEX}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the square root of @var{X}, which must -not be negative. - -To calculate and represent the square root of a negative -number, complex arithmetic must be used. -For example, @samp{SQRT(COMPLEX(@var{X}))}. - -The inverse of this function is @samp{SQRT(@var{X}) * SQRT(@var{X})}. - -@end ifset -@ifset familyF2U -@node SRand Intrinsic -@subsubsection SRand Intrinsic -@cindex SRand intrinsic -@cindex intrinsics, SRand - -@noindent -@example -CALL SRand(@var{Seed}) -@end example - -@noindent -@var{Seed}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Reinitializes the generator with the seed in @var{Seed}. -@xref{IRand Intrinsic}. -@xref{Rand Intrinsic}. - -@node Stat Intrinsic (subroutine) -@subsubsection Stat Intrinsic (subroutine) -@cindex Stat intrinsic -@cindex intrinsics, Stat - -@noindent -@example -CALL Stat(@var{File}, @var{SArray}, @var{Status}) -@end example - -@noindent -@var{File}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{SArray}: @code{INTEGER(KIND=1)}; DIMENSION(13); INTENT(OUT). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Obtains data about the given file @var{File} and places them in the array -@var{SArray}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{File}---otherwise, -trailing blanks in @var{File} are ignored. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{Stat Intrinsic (function)}. - -@node Stat Intrinsic (function) -@subsubsection Stat Intrinsic (function) -@cindex Stat intrinsic -@cindex intrinsics, Stat - -@noindent -@example -Stat(@var{File}, @var{SArray}) -@end example - -@noindent -Stat: @code{INTEGER(KIND=1)} function. - -@noindent -@var{File}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{SArray}: @code{INTEGER(KIND=1)}; DIMENSION(13); INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Obtains data about the given file @var{File} and places them in the array -@var{SArray}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{File}---otherwise, -trailing blanks in @var{File} are ignored. -The values in this array are extracted from the -@code{stat} structure as returned by @code{fstat(2)} q.v., as follows: - -@enumerate -@item -Device ID - -@item -Inode number - -@item -File mode - -@item -Number of links - -@item -Owner's uid - -@item -Owner's gid - -@item -ID of device containing directory entry for file -(0 if not available) - -@item -File size (bytes) - -@item -Last access time - -@item -Last modification time - -@item -Last file status change time - -@item -Preferred I/O block size (-1 if not available) - -@item -Number of blocks allocated (-1 if not available) -@end enumerate - -Not all these elements are relevant on all systems. -If an element is not relevant, it is returned as 0. - -Returns 0 on success or a nonzero error code. - -For information on other intrinsics with the same name: -@xref{Stat Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node Sum Intrinsic -@subsubsection Sum Intrinsic -@cindex Sum intrinsic -@cindex intrinsics, Sum - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Sum} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node SymLnk Intrinsic (subroutine) -@subsubsection SymLnk Intrinsic (subroutine) -@cindex SymLnk intrinsic -@cindex intrinsics, SymLnk - -@noindent -@example -CALL SymLnk(@var{Path1}, @var{Path2}, @var{Status}) -@end example - -@noindent -@var{Path1}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Path2}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Makes a symbolic link from file @var{Path1} to @var{Path2}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{Path1} and @var{Path2}---otherwise, -trailing blanks in @var{Path1} and @var{Path2} are ignored. -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return -(@code{ENOSYS} if the system does not provide @code{symlink(2)}). - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{SymLnk Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node SymLnk Intrinsic (function) -@subsubsection SymLnk Intrinsic (function) -@cindex SymLnk intrinsic -@cindex intrinsics, SymLnk - -@noindent -@example -SymLnk(@var{Path1}, @var{Path2}) -@end example - -@noindent -SymLnk: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Path1}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Path2}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Makes a symbolic link from file @var{Path1} to @var{Path2}. -A null character (@samp{CHAR(0)}) marks the end of -the names in @var{Path1} and @var{Path2}---otherwise, -trailing blanks in @var{Path1} and @var{Path2} are ignored. -Returns 0 on success or a nonzero error code -(@code{ENOSYS} if the system does not provide @code{symlink(2)}). - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{SymLnk Intrinsic (subroutine)}. - -@end ifset -@ifset familyF2U -@node System Intrinsic (subroutine) -@subsubsection System Intrinsic (subroutine) -@cindex System intrinsic -@cindex intrinsics, System - -@noindent -@example -CALL System(@var{Command}, @var{Status}) -@end example - -@noindent -@var{Command}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Passes the command @var{Command} to a shell (see @code{system(3)}). -If argument @var{Status} is present, it contains the value returned by -@code{system(3)}, presumably 0 if the shell command succeeded. -Note that which shell is used to invoke the command is system-dependent -and environment-dependent. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{System Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node System Intrinsic (function) -@subsubsection System Intrinsic (function) -@cindex System intrinsic -@cindex intrinsics, System - -@noindent -@example -System(@var{Command}) -@end example - -@noindent -System: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Command}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Passes the command @var{Command} to a shell (see @code{system(3)}). -Returns the value returned by -@code{system(3)}, presumably 0 if the shell command succeeded. -Note that which shell is used to invoke the command is system-dependent -and environment-dependent. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. -However, the function form can be valid in cases where the -actual side effects performed by the call are unimportant to -the application. - -For example, on a UNIX system, @samp{SAME = SYSTEM('cmp a b')} -does not perform any side effects likely to be important to the -program, so the programmer would not care if the actual system -call (and invocation of @code{cmp}) was optimized away in a situation -where the return value could be determined otherwise, or was not -actually needed (@samp{SAME} not actually referenced after the -sample assignment statement). - -For information on other intrinsics with the same name: -@xref{System Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node System_Clock Intrinsic -@subsubsection System_Clock Intrinsic -@cindex System_Clock intrinsic -@cindex intrinsics, System_Clock - -@noindent -@example -CALL System_Clock(@var{Count}, @var{Rate}, @var{Max}) -@end example - -@noindent -@var{Count}: @code{INTEGER(KIND=1)}; scalar; INTENT(OUT). - -@noindent -@var{Rate}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -@var{Max}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{f90}. - -@noindent -Description: - -Returns in @var{Count} the current value of the system clock; this is -the value returned by the UNIX function @code{times(2)} -in this implementation, but -isn't in general. -@var{Rate} is the number of clock ticks per second and -@var{Max} is the maximum value this can take, which isn't very useful -in this implementation since it's just the maximum C @code{unsigned -int} value. - -@cindex wraparound, timings -@cindex limits, timings -On some systems, the underlying timings are represented -using types with sufficiently small limits that overflows -(wraparounds) are possible, such as 32-bit types. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -@end ifset -@ifset familyF77 -@node Tan Intrinsic -@subsubsection Tan Intrinsic -@cindex Tan intrinsic -@cindex intrinsics, Tan - -@noindent -@example -Tan(@var{X}) -@end example - -@noindent -Tan: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the tangent of @var{X}, an angle measured -in radians. - -@xref{ATan Intrinsic}, for the inverse of this function. - -@end ifset -@ifset familyVXT -@node TanD Intrinsic -@subsubsection TanD Intrinsic -@cindex TanD intrinsic -@cindex intrinsics, TanD - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL TanD} to use this name for an -external procedure. - -@end ifset -@ifset familyF77 -@node TanH Intrinsic -@subsubsection TanH Intrinsic -@cindex TanH intrinsic -@cindex intrinsics, TanH - -@noindent -@example -TanH(@var{X}) -@end example - -@noindent -TanH: @code{REAL} function, the @samp{KIND=} value of the type being that of argument @var{X}. - -@noindent -@var{X}: @code{REAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: (standard FORTRAN 77). - -@noindent -Description: - -Returns the hyperbolic tangent of @var{X}. - -@end ifset -@ifset familyF2U -@node Time Intrinsic (UNIX) -@subsubsection Time Intrinsic (UNIX) -@cindex Time intrinsic -@cindex intrinsics, Time - -@noindent -@example -Time() -@end example - -@noindent -Time: @code{INTEGER(KIND=1)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the current time encoded as an integer -(in the manner of the UNIX function @code{time(3)}). -This value is suitable for passing to @code{CTIME}, -@code{GMTIME}, and @code{LTIME}. - -@cindex wraparound, timings -@cindex limits, timings -This intrinsic is not fully portable, such as to systems -with 32-bit @code{INTEGER} types but supporting times -wider than 32 bits. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -@xref{Time8 Intrinsic}, for information on a -similar intrinsic that might be portable to more -GNU Fortran implementations, though to fewer -Fortran compilers. - -For information on other intrinsics with the same name: -@xref{Time Intrinsic (VXT)}. - -@end ifset -@ifset familyVXT -@node Time Intrinsic (VXT) -@subsubsection Time Intrinsic (VXT) -@cindex Time intrinsic -@cindex intrinsics, Time - -@noindent -@example -CALL Time(@var{Time}) -@end example - -@noindent -@var{Time}: @code{CHARACTER*8}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{vxt}. - -@noindent -Description: - -Returns in @var{Time} a character representation of the current time as -obtained from @code{ctime(3)}. - -@cindex Y10K compliance -@cindex Year 10000 compliance -@cindex wraparound, Y10K -@cindex limits, Y10K -Programs making use of this intrinsic -might not be Year 10000 (Y10K) compliant. -For example, the date might appear, -to such programs, to wrap around -(change from a larger value to a smaller one) -as of the Year 10000. - -@xref{FDate Intrinsic (subroutine)}, for an equivalent routine. - -For information on other intrinsics with the same name: -@xref{Time Intrinsic (UNIX)}. - -@end ifset -@ifset familyF2U -@node Time8 Intrinsic -@subsubsection Time8 Intrinsic -@cindex Time8 intrinsic -@cindex intrinsics, Time8 - -@noindent -@example -Time8() -@end example - -@noindent -Time8: @code{INTEGER(KIND=2)} function. - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the current time encoded as a long integer -(in the manner of the UNIX function @code{time(3)}). -This value is suitable for passing to @code{CTIME}, -@code{GMTIME}, and @code{LTIME}. - -@cindex wraparound, timings -@cindex limits, timings -@emph{Warning:} this intrinsic does not increase the range -of the timing values over that returned by @code{time(3)}. -On a system with a 32-bit @code{time(3)}, -@code{TIME8} will return a 32-bit value, -even though converted to an @samp{INTEGER(KIND=2)} value. -That means overflows of the 32-bit value can still occur. -Therefore, the values returned by this intrinsic -might be, or become, negative, -or numerically less than previous values, -during a single run of the compiled program. - -No Fortran implementations other than GNU Fortran are -known to support this intrinsic at the time of this -writing. -@xref{Time Intrinsic (UNIX)}, for information on a -similar intrinsic that might be portable to more Fortran -compilers, though to fewer GNU Fortran implementations. - -@end ifset -@ifset familyF90 -@node Tiny Intrinsic -@subsubsection Tiny Intrinsic -@cindex Tiny intrinsic -@cindex intrinsics, Tiny - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Tiny} to use this name for an -external procedure. - -@node Transfer Intrinsic -@subsubsection Transfer Intrinsic -@cindex Transfer intrinsic -@cindex intrinsics, Transfer - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Transfer} to use this name for an -external procedure. - -@node Transpose Intrinsic -@subsubsection Transpose Intrinsic -@cindex Transpose intrinsic -@cindex intrinsics, Transpose - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Transpose} to use this name for an -external procedure. - -@node Trim Intrinsic -@subsubsection Trim Intrinsic -@cindex Trim intrinsic -@cindex intrinsics, Trim - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Trim} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node TtyNam Intrinsic (subroutine) -@subsubsection TtyNam Intrinsic (subroutine) -@cindex TtyNam intrinsic -@cindex intrinsics, TtyNam - -@noindent -@example -CALL TtyNam(@var{Unit}, @var{Name}) -@end example - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Name}: @code{CHARACTER}; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Sets @var{Name} to the name of the terminal device open on logical unit -@var{Unit} or to a blank string if @var{Unit} is not connected to a -terminal. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. - -For information on other intrinsics with the same name: -@xref{TtyNam Intrinsic (function)}. - -@node TtyNam Intrinsic (function) -@subsubsection TtyNam Intrinsic (function) -@cindex TtyNam intrinsic -@cindex intrinsics, TtyNam - -@noindent -@example -TtyNam(@var{Unit}) -@end example - -@noindent -TtyNam: @code{CHARACTER*(*)} function. - -@noindent -@var{Unit}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Returns the name of the terminal device open on logical unit -@var{Unit} or a blank string if @var{Unit} is not connected to a -terminal. - -For information on other intrinsics with the same name: -@xref{TtyNam Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node UBound Intrinsic -@subsubsection UBound Intrinsic -@cindex UBound intrinsic -@cindex intrinsics, UBound - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL UBound} to use this name for an -external procedure. - -@end ifset -@ifset familyF2U -@node UMask Intrinsic (subroutine) -@subsubsection UMask Intrinsic (subroutine) -@cindex UMask intrinsic -@cindex intrinsics, UMask - -@noindent -@example -CALL UMask(@var{Mask}, @var{Old}) -@end example - -@noindent -@var{Mask}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -@var{Old}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Sets the file creation mask to @var{Mask} and returns the old value in -argument @var{Old} if it is supplied. -See @code{umask(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine. - -For information on other intrinsics with the same name: -@xref{UMask Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node UMask Intrinsic (function) -@subsubsection UMask Intrinsic (function) -@cindex UMask intrinsic -@cindex intrinsics, UMask - -@noindent -@example -UMask(@var{Mask}) -@end example - -@noindent -UMask: @code{INTEGER(KIND=1)} function. - -@noindent -@var{Mask}: @code{INTEGER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Sets the file creation mask to @var{Mask} and returns the old value. -See @code{umask(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{UMask Intrinsic (subroutine)}. - -@end ifset -@ifset familyF2U -@node Unlink Intrinsic (subroutine) -@subsubsection Unlink Intrinsic (subroutine) -@cindex Unlink intrinsic -@cindex intrinsics, Unlink - -@noindent -@example -CALL Unlink(@var{File}, @var{Status}) -@end example - -@noindent -@var{File}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -@var{Status}: @code{INTEGER(KIND=1)}; OPTIONAL; scalar; INTENT(OUT). - -@noindent -Intrinsic groups: @code{unix}. - -@noindent -Description: - -Unlink the file @var{File}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{File}---otherwise, -trailing blanks in @var{File} are ignored. -If the @var{Status} argument is supplied, it contains -0 on success or a nonzero error code upon return. -See @code{unlink(2)}. - -Some non-GNU implementations of Fortran provide this intrinsic as -only a function, not as a subroutine, or do not support the -(optional) @var{Status} argument. - -For information on other intrinsics with the same name: -@xref{Unlink Intrinsic (function)}. - -@end ifset -@ifset familyBADU77 -@node Unlink Intrinsic (function) -@subsubsection Unlink Intrinsic (function) -@cindex Unlink intrinsic -@cindex intrinsics, Unlink - -@noindent -@example -Unlink(@var{File}) -@end example - -@noindent -Unlink: @code{INTEGER(KIND=1)} function. - -@noindent -@var{File}: @code{CHARACTER}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{badu77}. - -@noindent -Description: - -Unlink the file @var{File}. -A null character (@samp{CHAR(0)}) marks the end of -the name in @var{File}---otherwise, -trailing blanks in @var{File} are ignored. -Returns 0 on success or a nonzero error code. -See @code{unlink(2)}. - -Due to the side effects performed by this intrinsic, the function -form is not recommended. - -For information on other intrinsics with the same name: -@xref{Unlink Intrinsic (subroutine)}. - -@end ifset -@ifset familyF90 -@node Unpack Intrinsic -@subsubsection Unpack Intrinsic -@cindex Unpack intrinsic -@cindex intrinsics, Unpack - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Unpack} to use this name for an -external procedure. - -@node Verify Intrinsic -@subsubsection Verify Intrinsic -@cindex Verify intrinsic -@cindex intrinsics, Verify - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL Verify} to use this name for an -external procedure. - -@end ifset -@ifset familyF2C -@node XOr Intrinsic -@subsubsection XOr Intrinsic -@cindex XOr intrinsic -@cindex intrinsics, XOr - -@noindent -@example -XOr(@var{I}, @var{J}) -@end example - -@noindent -XOr: @code{INTEGER} or @code{LOGICAL} function, the exact type being the result of cross-promoting the -types of all the arguments. - -@noindent -@var{I}: @code{INTEGER} or @code{LOGICAL}; scalar; INTENT(IN). - -@noindent -@var{J}: @code{INTEGER} or @code{LOGICAL}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Returns value resulting from boolean exclusive-OR of -pair of bits in each of @var{I} and @var{J}. - -@node ZAbs Intrinsic -@subsubsection ZAbs Intrinsic -@cindex ZAbs intrinsic -@cindex intrinsics, ZAbs - -@noindent -@example -ZAbs(@var{A}) -@end example - -@noindent -ZAbs: @code{REAL(KIND=2)} function. - -@noindent -@var{A}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Archaic form of @code{ABS()} that is specific -to one type for @var{A}. -@xref{Abs Intrinsic}. - -@node ZCos Intrinsic -@subsubsection ZCos Intrinsic -@cindex ZCos intrinsic -@cindex intrinsics, ZCos - -@noindent -@example -ZCos(@var{X}) -@end example - -@noindent -ZCos: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Archaic form of @code{COS()} that is specific -to one type for @var{X}. -@xref{Cos Intrinsic}. - -@node ZExp Intrinsic -@subsubsection ZExp Intrinsic -@cindex ZExp intrinsic -@cindex intrinsics, ZExp - -@noindent -@example -ZExp(@var{X}) -@end example - -@noindent -ZExp: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Archaic form of @code{EXP()} that is specific -to one type for @var{X}. -@xref{Exp Intrinsic}. - -@end ifset -@ifset familyVXT -@node ZExt Intrinsic -@subsubsection ZExt Intrinsic -@cindex ZExt intrinsic -@cindex intrinsics, ZExt - -This intrinsic is not yet implemented. -The name is, however, reserved as an intrinsic. -Use @samp{EXTERNAL ZExt} to use this name for an -external procedure. - -@end ifset -@ifset familyF2C -@node ZLog Intrinsic -@subsubsection ZLog Intrinsic -@cindex ZLog intrinsic -@cindex intrinsics, ZLog - -@noindent -@example -ZLog(@var{X}) -@end example - -@noindent -ZLog: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Archaic form of @code{LOG()} that is specific -to one type for @var{X}. -@xref{Log Intrinsic}. - -@node ZSin Intrinsic -@subsubsection ZSin Intrinsic -@cindex ZSin intrinsic -@cindex intrinsics, ZSin - -@noindent -@example -ZSin(@var{X}) -@end example - -@noindent -ZSin: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Archaic form of @code{SIN()} that is specific -to one type for @var{X}. -@xref{Sin Intrinsic}. - -@node ZSqRt Intrinsic -@subsubsection ZSqRt Intrinsic -@cindex ZSqRt intrinsic -@cindex intrinsics, ZSqRt - -@noindent -@example -ZSqRt(@var{X}) -@end example - -@noindent -ZSqRt: @code{COMPLEX(KIND=2)} function. - -@noindent -@var{X}: @code{COMPLEX(KIND=2)}; scalar; INTENT(IN). - -@noindent -Intrinsic groups: @code{f2c}. - -@noindent -Description: - -Archaic form of @code{SQRT()} that is specific -to one type for @var{X}. -@xref{SqRt Intrinsic}. - -@end ifset diff --git a/contrib/gcc/f/intrin.c b/contrib/gcc/f/intrin.c deleted file mode 100644 index a379684..0000000 --- a/contrib/gcc/f/intrin.c +++ /dev/null @@ -1,2119 +0,0 @@ -/* intrin.c -- Recognize references to intrinsics - Copyright (C) 1995, 1996, 1997, 1998, 2002, - 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - -*/ - -#include "proj.h" -#include "intrin.h" -#include "expr.h" -#include "info.h" -#include "src.h" -#include "symbol.h" -#include "target.h" -#include "top.h" - -struct _ffeintrin_name_ - { - const char *const name_uc; - const char *const name_lc; - const char *const name_ic; - const ffeintrinGen generic; - const ffeintrinSpec specific; - }; - -struct _ffeintrin_gen_ - { - const char *const name; /* Name as seen in program. */ - const ffeintrinSpec specs[2]; - }; - -struct _ffeintrin_spec_ - { - const char *const name; /* Uppercase name as seen in source code, - lowercase if no source name, "none" if no - name at all (NONE case). */ - const bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */ - const ffeintrinFamily family; - const ffeintrinImp implementation; - }; - -struct _ffeintrin_imp_ - { - const char *const name; /* Name of implementation. */ - const ffecomGfrt gfrt_direct;/* library routine, direct-callable form. */ - const ffecomGfrt gfrt_f2c; /* library routine, f2c-callable form. */ - const ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */ - const char *const control; - const char y2kbad; - }; - -static ffebad ffeintrin_check_ (ffeintrinImp imp, ffebldOp op, - ffebld args, ffeinfoBasictype *xbt, - ffeinfoKindtype *xkt, - ffetargetCharacterSize *xsz, - bool *check_intrin, - ffelexToken t, - bool commit); -static bool ffeintrin_check_any_ (ffebld arglist); -static int ffeintrin_cmp_name_ (const void *name, const void *intrinsic); - -static const struct _ffeintrin_name_ ffeintrin_names_[] -= -{ /* Alpha order. */ -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) \ - { UPPER, LOWER, MIXED, FFEINTRIN_ ## GEN, FFEINTRIN_ ## SPEC }, -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - -static const struct _ffeintrin_gen_ ffeintrin_gens_[] -= -{ -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) \ - { NAME, { SPEC1, SPEC2, }, }, -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - -static const struct _ffeintrin_imp_ ffeintrin_imps_[] -= -{ -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \ - { NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \ - FFECOM_gfrt ## GFRTGNU, CONTROL, FALSE }, -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \ - { NAME, FFECOM_gfrt ## GFRTDIRECT, FFECOM_gfrt ## GFRTF2C, \ - FFECOM_gfrt ## GFRTGNU, CONTROL, Y2KBAD }, -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - -static const struct _ffeintrin_spec_ ffeintrin_specs_[] -= -{ -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) \ - { NAME, CALLABLE, FAMILY, IMP, }, -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY -}; - - -static ffebad -ffeintrin_check_ (ffeintrinImp imp, ffebldOp op, - ffebld args, ffeinfoBasictype *xbt, - ffeinfoKindtype *xkt, - ffetargetCharacterSize *xsz, - bool *check_intrin, - ffelexToken t, - bool commit) -{ - const char *c = ffeintrin_imps_[imp].control; - bool subr = (c[0] == '-'); - const char *argc; - ffebld arg; - ffeinfoBasictype bt; - ffeinfoKindtype kt; - ffetargetCharacterSize sz = FFETARGET_charactersizeNONE; - ffeinfoKindtype firstarg_kt; - bool need_col; - ffeinfoBasictype col_bt = FFEINFO_basictypeNONE; - ffeinfoKindtype col_kt = FFEINFO_kindtypeNONE; - int colon = (c[2] == ':') ? 2 : 3; - int argno; - - /* Check procedure type (function vs. subroutine) against - invocation. */ - - if (op == FFEBLD_opSUBRREF) - { - if (!subr) - return FFEBAD_INTRINSIC_IS_FUNC; - } - else if (op == FFEBLD_opFUNCREF) - { - if (subr) - return FFEBAD_INTRINSIC_IS_SUBR; - } - else - return FFEBAD_INTRINSIC_REF; - - /* Check the arglist for validity. */ - - if ((args != NULL) - && (ffebld_head (args) != NULL)) - firstarg_kt = ffeinfo_kindtype (ffebld_info (ffebld_head (args))); - else - firstarg_kt = FFEINFO_kindtype; - - for (argc = &c[colon + 3], - arg = args; - *argc != '\0'; - ) - { - char optional = '\0'; - char required = '\0'; - char extra = '\0'; - char basic; - char kind; - int length; - int elements; - bool lastarg_complex = FALSE; - - /* We don't do anything with keywords yet. */ - do - { - } while (*(++argc) != '='); - - ++argc; - if ((*argc == '?') - || (*argc == '!') - || (*argc == '*')) - optional = *(argc++); - if ((*argc == '+') - || (*argc == 'n') - || (*argc == 'p')) - required = *(argc++); - basic = *(argc++); - kind = *(argc++); - if (*argc == '[') - { - length = *++argc - '0'; - if (*++argc != ']') - length = 10 * length + (*(argc++) - '0'); - ++argc; - } - else - length = -1; - if (*argc == '(') - { - elements = *++argc - '0'; - if (*++argc != ')') - elements = 10 * elements + (*(argc++) - '0'); - ++argc; - } - else if (*argc == '&') - { - elements = -1; - ++argc; - } - else - elements = 0; - if ((*argc == '&') - || (*argc == 'i') - || (*argc == 'w') - || (*argc == 'x')) - extra = *(argc++); - if (*argc == ',') - ++argc; - - /* Break out of this loop only when current arg spec completely - processed. */ - - do - { - bool okay; - ffebld a; - ffeinfo i; - bool anynum; - ffeinfoBasictype abt = FFEINFO_basictypeNONE; - ffeinfoKindtype akt = FFEINFO_kindtypeNONE; - - if ((arg == NULL) - || (ffebld_head (arg) == NULL)) - { - if (required != '\0') - return FFEBAD_INTRINSIC_TOOFEW; - if (optional == '\0') - return FFEBAD_INTRINSIC_TOOFEW; - if (arg != NULL) - arg = ffebld_trail (arg); - break; /* Try next argspec. */ - } - - a = ffebld_head (arg); - i = ffebld_info (a); - anynum = (ffeinfo_basictype (i) == FFEINFO_basictypeHOLLERITH) - || (ffeinfo_basictype (i) == FFEINFO_basictypeTYPELESS); - - /* See how well the arg matches up to the spec. */ - - switch (basic) - { - case 'A': - okay = (ffeinfo_basictype (i) == FFEINFO_basictypeCHARACTER) - && ((length == -1) - || (ffeinfo_size (i) == (ffetargetCharacterSize) length)); - break; - - case 'C': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); - abt = FFEINFO_basictypeCOMPLEX; - break; - - case 'I': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER); - abt = FFEINFO_basictypeINTEGER; - break; - - case 'L': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); - abt = FFEINFO_basictypeLOGICAL; - break; - - case 'R': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - abt = FFEINFO_basictypeREAL; - break; - - case 'B': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); - break; - - case 'F': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - break; - - case 'N': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - break; - - case 'S': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - break; - - case 'g': - okay = ((ffebld_op (a) == FFEBLD_opLABTER) - || (ffebld_op (a) == FFEBLD_opLABTOK)); - elements = -1; - extra = '-'; - break; - - case 's': - okay = (((((ffeinfo_basictype (i) == FFEINFO_basictypeNONE) - && (ffeinfo_kindtype (i) == FFEINFO_kindtypeNONE) - && (ffeinfo_kind (i) == FFEINFO_kindSUBROUTINE)) - || ((ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - && (ffeinfo_kindtype (i) == FFEINFO_kindtypeINTEGERDEFAULT) - && (ffeinfo_kind (i) == FFEINFO_kindFUNCTION)) - || (ffeinfo_kind (i) == FFEINFO_kindNONE)) - && ((ffeinfo_where (i) == FFEINFO_whereDUMMY) - || (ffeinfo_where (i) == FFEINFO_whereGLOBAL))) - || ((ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - && (ffeinfo_kind (i) == FFEINFO_kindENTITY))); - elements = -1; - extra = '-'; - break; - - case '-': - default: - okay = TRUE; - break; - } - - switch (kind) - { - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - akt = (kind - '0'); - if ((ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL)) - { - switch (akt) - { /* Translate to internal kinds for now! */ - default: - break; - - case 2: - akt = 4; - break; - - case 3: - akt = 2; - break; - - case 4: - akt = 5; - break; - - case 6: - akt = 3; - break; - - case 7: - akt = ffecom_pointer_kind (); - break; - } - } - okay &= anynum || (ffeinfo_kindtype (i) == akt); - break; - - case 'A': - okay &= anynum || (ffeinfo_kindtype (i) == firstarg_kt); - akt = (firstarg_kt == FFEINFO_kindtype) ? FFEINFO_kindtypeNONE - : firstarg_kt; - break; - - case 'N': - /* Accept integers and logicals not wider than the default integer/logical. */ - if (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - { - okay &= anynum || (ffeinfo_kindtype (i) == FFEINFO_kindtypeINTEGER1 - || ffeinfo_kindtype (i) == FFEINFO_kindtypeINTEGER2 - || ffeinfo_kindtype (i) == FFEINFO_kindtypeINTEGER3); - akt = FFEINFO_kindtypeINTEGER1; /* The default. */ - } - else if (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL) - { - okay &= anynum || (ffeinfo_kindtype (i) == FFEINFO_kindtypeLOGICAL1 - || ffeinfo_kindtype (i) == FFEINFO_kindtypeLOGICAL2 - || ffeinfo_kindtype (i) == FFEINFO_kindtypeLOGICAL3); - akt = FFEINFO_kindtypeLOGICAL1; /* The default. */ - } - break; - - case '*': - default: - break; - } - - switch (elements) - { - ffebld b; - - case -1: - break; - - case 0: - if (ffeinfo_rank (i) != 0) - okay = FALSE; - break; - - default: - if ((ffeinfo_rank (i) != 1) - || (ffebld_op (a) != FFEBLD_opSYMTER) - || ((b = ffesymbol_arraysize (ffebld_symter (a))) == NULL) - || (ffebld_op (b) != FFEBLD_opCONTER) - || (ffeinfo_basictype (ffebld_info (b)) != FFEINFO_basictypeINTEGER) - || (ffeinfo_kindtype (ffebld_info (b)) != FFEINFO_kindtypeINTEGERDEFAULT) - || (ffebld_constant_integer1 (ffebld_conter (b)) != elements)) - okay = FALSE; - break; - } - - switch (extra) - { - case '&': - if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) - || ((ffebld_op (a) != FFEBLD_opSYMTER) - && (ffebld_op (a) != FFEBLD_opSUBSTR) - && (ffebld_op (a) != FFEBLD_opARRAYREF))) - okay = FALSE; - break; - - case 'w': - case 'x': - if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) - || ((ffebld_op (a) != FFEBLD_opSYMTER) - && (ffebld_op (a) != FFEBLD_opARRAYREF) - && (ffebld_op (a) != FFEBLD_opSUBSTR))) - okay = FALSE; - break; - - case '-': - case 'i': - break; - - default: - if (ffeinfo_kind (i) != FFEINFO_kindENTITY) - okay = FALSE; - break; - } - - if ((optional == '!') - && lastarg_complex) - okay = FALSE; - - if (!okay) - { - /* If it wasn't optional, it's an error, - else maybe it could match a later argspec. */ - if (optional == '\0') - return FFEBAD_INTRINSIC_REF; - break; /* Try next argspec. */ - } - - lastarg_complex - = (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); - - if (anynum) - { - /* If we know dummy arg type, convert to that now. */ - - if ((abt != FFEINFO_basictypeNONE) - && (akt != FFEINFO_kindtypeNONE) - && commit) - { - /* We have a known type, convert hollerith/typeless - to it. */ - - a = ffeexpr_convert (a, t, NULL, - abt, akt, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - ffebld_set_head (arg, a); - } - } - - arg = ffebld_trail (arg); /* Arg accepted, now move on. */ - - if (optional == '*') - continue; /* Go ahead and try another arg. */ - if (required == '\0') - break; - if ((required == 'n') - || (required == '+')) - { - optional = '*'; - required = '\0'; - } - else if (required == 'p') - required = 'n'; - } while (TRUE); - } - - if (arg != NULL) - return FFEBAD_INTRINSIC_TOOMANY; - - /* Set up the initial type for the return value of the function. */ - - need_col = FALSE; - switch (c[0]) - { - case 'A': - bt = FFEINFO_basictypeCHARACTER; - sz = (c[2] == '*') ? FFETARGET_charactersizeNONE : 1; - break; - - case 'C': - bt = FFEINFO_basictypeCOMPLEX; - break; - - case 'I': - bt = FFEINFO_basictypeINTEGER; - break; - - case 'L': - bt = FFEINFO_basictypeLOGICAL; - break; - - case 'R': - bt = FFEINFO_basictypeREAL; - break; - - case 'B': - case 'F': - case 'N': - case 'S': - need_col = TRUE; - /* Fall through. */ - case '-': - default: - bt = FFEINFO_basictypeNONE; - break; - } - - switch (c[1]) - { - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - kt = (c[1] - '0'); - if ((bt == FFEINFO_basictypeINTEGER) - || (bt == FFEINFO_basictypeLOGICAL)) - { - switch (kt) - { /* Translate to internal kinds for now! */ - default: - break; - - case 2: - kt = 4; - break; - - case 3: - kt = 2; - break; - - case 4: - kt = 5; - break; - - case 6: - kt = 3; - break; - - case 7: - kt = ffecom_pointer_kind (); - break; - } - } - break; - - case 'C': - if (ffe_is_90 ()) - need_col = TRUE; - kt = 1; - break; - - case '=': - need_col = TRUE; - /* Fall through. */ - case '-': - default: - kt = FFEINFO_kindtypeNONE; - break; - } - - /* Determine collective type of COL, if there is one. */ - - if (need_col || c[colon + 1] != '-') - { - bool okay = TRUE; - bool have_anynum = FALSE; - int arg_count=0; - - for (arg = args, arg_count=0; - arg != NULL; - arg = ffebld_trail (arg), arg_count++ ) - { - ffebld a = ffebld_head (arg); - ffeinfo i; - bool anynum; - - if (a == NULL) - continue; - i = ffebld_info (a); - - if ( c[colon+1] != '*' && (c[colon+1]-'0') != arg_count ) - continue; - - anynum = (ffeinfo_basictype (i) == FFEINFO_basictypeHOLLERITH) - || (ffeinfo_basictype (i) == FFEINFO_basictypeTYPELESS); - if (anynum) - { - have_anynum = TRUE; - continue; - } - - if ((col_bt == FFEINFO_basictypeNONE) - && (col_kt == FFEINFO_kindtypeNONE)) - { - col_bt = ffeinfo_basictype (i); - col_kt = ffeinfo_kindtype (i); - } - else - { - ffeexpr_type_combine (&col_bt, &col_kt, - col_bt, col_kt, - ffeinfo_basictype (i), - ffeinfo_kindtype (i), - NULL); - if ((col_bt == FFEINFO_basictypeNONE) - || (col_kt == FFEINFO_kindtypeNONE)) - return FFEBAD_INTRINSIC_REF; - } - } - - if (have_anynum - && ((col_bt == FFEINFO_basictypeNONE) - || (col_kt == FFEINFO_kindtypeNONE))) - { - /* No type, but have hollerith/typeless. Use type of return - value to determine type of COL. */ - - switch (c[0]) - { - case 'A': - return FFEBAD_INTRINSIC_REF; - - case 'B': - case 'I': - case 'L': - if ((col_bt != FFEINFO_basictypeNONE) - && (col_bt != FFEINFO_basictypeINTEGER)) - return FFEBAD_INTRINSIC_REF; - /* Fall through. */ - case 'N': - case 'S': - case '-': - default: - col_bt = FFEINFO_basictypeINTEGER; - col_kt = FFEINFO_kindtypeINTEGER1; - break; - - case 'C': - if ((col_bt != FFEINFO_basictypeNONE) - && (col_bt != FFEINFO_basictypeCOMPLEX)) - return FFEBAD_INTRINSIC_REF; - col_bt = FFEINFO_basictypeCOMPLEX; - col_kt = FFEINFO_kindtypeREAL1; - break; - - case 'R': - if ((col_bt != FFEINFO_basictypeNONE) - && (col_bt != FFEINFO_basictypeREAL)) - return FFEBAD_INTRINSIC_REF; - /* Fall through. */ - case 'F': - col_bt = FFEINFO_basictypeREAL; - col_kt = FFEINFO_kindtypeREAL1; - break; - } - } - - switch (c[0]) - { - case 'B': - okay = (col_bt == FFEINFO_basictypeINTEGER) - || (col_bt == FFEINFO_basictypeLOGICAL); - if (need_col) - bt = col_bt; - break; - - case 'F': - okay = (col_bt == FFEINFO_basictypeCOMPLEX) - || (col_bt == FFEINFO_basictypeREAL); - if (need_col) - bt = col_bt; - break; - - case 'N': - okay = (col_bt == FFEINFO_basictypeCOMPLEX) - || (col_bt == FFEINFO_basictypeINTEGER) - || (col_bt == FFEINFO_basictypeREAL); - if (need_col) - bt = col_bt; - break; - - case 'S': - okay = (col_bt == FFEINFO_basictypeINTEGER) - || (col_bt == FFEINFO_basictypeREAL) - || (col_bt == FFEINFO_basictypeCOMPLEX); - if (need_col) - bt = ((col_bt != FFEINFO_basictypeCOMPLEX) ? col_bt - : FFEINFO_basictypeREAL); - break; - } - - switch (c[1]) - { - case '=': - if (need_col) - kt = col_kt; - break; - - case 'C': - if (col_bt == FFEINFO_basictypeCOMPLEX) - { - if (col_kt != FFEINFO_kindtypeREALDEFAULT) - *check_intrin = TRUE; - if (need_col) - kt = col_kt; - } - break; - } - - if (!okay) - return FFEBAD_INTRINSIC_REF; - } - - /* Now, convert args in the arglist to the final type of the COL. */ - - for (argno = 0, argc = &c[colon + 3], - arg = args; - *argc != '\0'; - ++argno) - { - char optional = '\0'; - char required = '\0'; - char extra = '\0'; - char basic; - char kind; - int length; - int elements; - bool lastarg_complex = FALSE; - - /* We don't do anything with keywords yet. */ - do - { - } while (*(++argc) != '='); - - ++argc; - if ((*argc == '?') - || (*argc == '!') - || (*argc == '*')) - optional = *(argc++); - if ((*argc == '+') - || (*argc == 'n') - || (*argc == 'p')) - required = *(argc++); - basic = *(argc++); - kind = *(argc++); - if (*argc == '[') - { - length = *++argc - '0'; - if (*++argc != ']') - length = 10 * length + (*(argc++) - '0'); - ++argc; - } - else - length = -1; - if (*argc == '(') - { - elements = *++argc - '0'; - if (*++argc != ')') - elements = 10 * elements + (*(argc++) - '0'); - ++argc; - } - else if (*argc == '&') - { - elements = -1; - ++argc; - } - else - elements = 0; - if ((*argc == '&') - || (*argc == 'i') - || (*argc == 'w') - || (*argc == 'x')) - extra = *(argc++); - if (*argc == ',') - ++argc; - - /* Break out of this loop only when current arg spec completely - processed. */ - - do - { - bool okay; - ffebld a; - ffeinfo i; - bool anynum; - ffeinfoBasictype abt = FFEINFO_basictypeNONE; - ffeinfoKindtype akt = FFEINFO_kindtypeNONE; - - if ((arg == NULL) - || (ffebld_head (arg) == NULL)) - { - if (arg != NULL) - arg = ffebld_trail (arg); - break; /* Try next argspec. */ - } - - a = ffebld_head (arg); - i = ffebld_info (a); - anynum = (ffeinfo_basictype (i) == FFEINFO_basictypeHOLLERITH) - || (ffeinfo_basictype (i) == FFEINFO_basictypeTYPELESS); - - /* Determine what the default type for anynum would be. */ - - if (anynum) - { - switch (c[colon + 1]) - { - case '-': - break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - if (argno != (c[colon + 1] - '0')) - break; - case '*': - abt = col_bt; - akt = col_kt; - break; - } - } - - /* Again, match arg up to the spec. We go through all of - this again to properly follow the contour of optional - arguments. Probably this level of flexibility is not - needed, perhaps it's even downright naughty. */ - - switch (basic) - { - case 'A': - okay = (ffeinfo_basictype (i) == FFEINFO_basictypeCHARACTER) - && ((length == -1) - || (ffeinfo_size (i) == (ffetargetCharacterSize) length)); - break; - - case 'C': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); - abt = FFEINFO_basictypeCOMPLEX; - break; - - case 'I': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER); - abt = FFEINFO_basictypeINTEGER; - break; - - case 'L': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); - abt = FFEINFO_basictypeLOGICAL; - break; - - case 'R': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - abt = FFEINFO_basictypeREAL; - break; - - case 'B': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL); - break; - - case 'F': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - break; - - case 'N': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX) - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - break; - - case 'S': - okay = anynum - || (ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeREAL); - break; - - case 'g': - okay = ((ffebld_op (a) == FFEBLD_opLABTER) - || (ffebld_op (a) == FFEBLD_opLABTOK)); - elements = -1; - extra = '-'; - break; - - case 's': - okay = (((((ffeinfo_basictype (i) == FFEINFO_basictypeNONE) - && (ffeinfo_kindtype (i) == FFEINFO_kindtypeNONE) - && (ffeinfo_kind (i) == FFEINFO_kindSUBROUTINE)) - || ((ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - && (ffeinfo_kindtype (i) == FFEINFO_kindtypeINTEGERDEFAULT) - && (ffeinfo_kind (i) == FFEINFO_kindFUNCTION)) - || (ffeinfo_kind (i) == FFEINFO_kindNONE)) - && ((ffeinfo_where (i) == FFEINFO_whereDUMMY) - || (ffeinfo_where (i) == FFEINFO_whereGLOBAL))) - || ((ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - && (ffeinfo_kind (i) == FFEINFO_kindENTITY))); - elements = -1; - extra = '-'; - break; - - case '-': - default: - okay = TRUE; - break; - } - - switch (kind) - { - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - akt = (kind - '0'); - if ((ffeinfo_basictype (i) == FFEINFO_basictypeINTEGER) - || (ffeinfo_basictype (i) == FFEINFO_basictypeLOGICAL)) - { - switch (akt) - { /* Translate to internal kinds for now! */ - default: - break; - - case 2: - akt = 4; - break; - - case 3: - akt = 2; - break; - - case 4: - akt = 5; - break; - - case 6: - akt = 3; - break; - - case 7: - akt = ffecom_pointer_kind (); - break; - } - } - okay &= anynum || (ffeinfo_kindtype (i) == akt); - break; - - case 'A': - okay &= anynum || (ffeinfo_kindtype (i) == firstarg_kt); - akt = (firstarg_kt == FFEINFO_kindtype) ? FFEINFO_kindtypeNONE - : firstarg_kt; - break; - - case '*': - default: - break; - } - - switch (elements) - { - ffebld b; - - case -1: - break; - - case 0: - if (ffeinfo_rank (i) != 0) - okay = FALSE; - break; - - default: - if ((ffeinfo_rank (i) != 1) - || (ffebld_op (a) != FFEBLD_opSYMTER) - || ((b = ffesymbol_arraysize (ffebld_symter (a))) == NULL) - || (ffebld_op (b) != FFEBLD_opCONTER) - || (ffeinfo_basictype (ffebld_info (b)) != FFEINFO_basictypeINTEGER) - || (ffeinfo_kindtype (ffebld_info (b)) != FFEINFO_kindtypeINTEGERDEFAULT) - || (ffebld_constant_integer1 (ffebld_conter (b)) != elements)) - okay = FALSE; - break; - } - - switch (extra) - { - case '&': - if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) - || ((ffebld_op (a) != FFEBLD_opSYMTER) - && (ffebld_op (a) != FFEBLD_opSUBSTR) - && (ffebld_op (a) != FFEBLD_opARRAYREF))) - okay = FALSE; - break; - - case 'w': - case 'x': - if ((ffeinfo_kind (i) != FFEINFO_kindENTITY) - || ((ffebld_op (a) != FFEBLD_opSYMTER) - && (ffebld_op (a) != FFEBLD_opARRAYREF) - && (ffebld_op (a) != FFEBLD_opSUBSTR))) - okay = FALSE; - break; - - case '-': - case 'i': - break; - - default: - if (ffeinfo_kind (i) != FFEINFO_kindENTITY) - okay = FALSE; - break; - } - - if ((optional == '!') - && lastarg_complex) - okay = FALSE; - - if (!okay) - { - /* If it wasn't optional, it's an error, - else maybe it could match a later argspec. */ - if (optional == '\0') - return FFEBAD_INTRINSIC_REF; - break; /* Try next argspec. */ - } - - lastarg_complex - = (ffeinfo_basictype (i) == FFEINFO_basictypeCOMPLEX); - - if (anynum && commit) - { - /* If we know dummy arg type, convert to that now. */ - - if (abt == FFEINFO_basictypeNONE) - abt = FFEINFO_basictypeINTEGER; - if (akt == FFEINFO_kindtypeNONE) - akt = FFEINFO_kindtypeINTEGER1; - - /* We have a known type, convert hollerith/typeless to it. */ - - a = ffeexpr_convert (a, t, NULL, - abt, akt, 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - ffebld_set_head (arg, a); - } - else if ((c[colon + 1] == '*') && commit) - { - /* This is where we promote types to the consensus - type for the COL. Maybe this is where -fpedantic - should issue a warning as well. */ - - a = ffeexpr_convert (a, t, NULL, - col_bt, col_kt, 0, - ffeinfo_size (i), - FFEEXPR_contextLET); - ffebld_set_head (arg, a); - } - - arg = ffebld_trail (arg); /* Arg accepted, now move on. */ - - if (optional == '*') - continue; /* Go ahead and try another arg. */ - if (required == '\0') - break; - if ((required == 'n') - || (required == '+')) - { - optional = '*'; - required = '\0'; - } - else if (required == 'p') - required = 'n'; - } while (TRUE); - } - - *xbt = bt; - *xkt = kt; - *xsz = sz; - return FFEBAD; -} - -static bool -ffeintrin_check_any_ (ffebld arglist) -{ - ffebld item; - - for (; arglist != NULL; arglist = ffebld_trail (arglist)) - { - item = ffebld_head (arglist); - if ((item != NULL) - && (ffebld_op (item) == FFEBLD_opANY)) - return TRUE; - } - - return FALSE; -} - -/* Compare a forced-to-uppercase name with a known-upper-case name. */ - -static int -upcasecmp_ (const char *name, const char *ucname) -{ - for ( ; *name != 0 && *ucname != 0; name++, ucname++) - { - int i = TOUPPER(*name) - *ucname; - - if (i != 0) - return i; - } - - return *name - *ucname; -} - -/* Compare name to intrinsic's name. - The intrinsics table is sorted on the upper case entries; so first - compare irrespective of case on the `uc' entry. If it matches, - compare according to the setting of intrinsics case comparison mode. */ - -static int -ffeintrin_cmp_name_ (const void *name, const void *intrinsic) -{ - const char *const uc = ((const struct _ffeintrin_name_ *) intrinsic)->name_uc; - const char *const lc = ((const struct _ffeintrin_name_ *) intrinsic)->name_lc; - const char *const ic = ((const struct _ffeintrin_name_ *) intrinsic)->name_ic; - int i; - - if ((i = upcasecmp_ (name, uc)) == 0) - { - switch (ffe_case_intrin ()) - { - case FFE_caseLOWER: - return strcmp(name, lc); - case FFE_caseINITCAP: - return strcmp(name, ic); - default: - return 0; - } - } - - return i; -} - -/* Return basic type of intrinsic implementation, based on its - run-time implementation *only*. (This is used only when - the type of an intrinsic name is needed without having a - list of arguments, i.e. an interface signature, such as when - passing the intrinsic itself, or really the run-time-library - function, as an argument.) - - If there's no eligible intrinsic implementation, there must be - a bug somewhere else; no such reference should have been permitted - to go this far. (Well, this might be wrong.) */ - -ffeinfoBasictype -ffeintrin_basictype (ffeintrinSpec spec) -{ - ffeintrinImp imp; - ffecomGfrt gfrt; - - assert (spec < FFEINTRIN_spec); - imp = ffeintrin_specs_[spec].implementation; - assert (imp < FFEINTRIN_imp); - - if (ffe_is_f2c ()) - gfrt = ffeintrin_imps_[imp].gfrt_f2c; - else - gfrt = ffeintrin_imps_[imp].gfrt_gnu; - - assert (gfrt != FFECOM_gfrt); - - return ffecom_gfrt_basictype (gfrt); -} - -/* Return family to which specific intrinsic belongs. */ - -ffeintrinFamily -ffeintrin_family (ffeintrinSpec spec) -{ - if (spec >= FFEINTRIN_spec) - return FALSE; - return ffeintrin_specs_[spec].family; -} - -/* Check and fill in info on func/subr ref node. - - ffebld expr; // FUNCREF or SUBRREF with no info (caller - // gets it from the modified info structure). - ffeinfo info; // Already filled in, will be overwritten. - ffelexToken token; // Used for error message. - ffeintrin_fulfill_generic (&expr, &info, token); - - Based on the generic id, figure out which specific procedure is meant and - pick that one. Else return an error, a la _specific. */ - -void -ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t) -{ - ffebld symter; - ffebldOp op; - ffeintrinGen gen; - ffeintrinSpec spec = FFEINTRIN_specNONE; - ffeinfoBasictype bt = FFEINFO_basictypeNONE; - ffeinfoKindtype kt = FFEINFO_kindtypeNONE; - ffetargetCharacterSize sz = FFETARGET_charactersizeNONE; - ffeintrinImp imp; - ffeintrinSpec tspec; - ffeintrinImp nimp = FFEINTRIN_impNONE; - ffebad error; - bool any = FALSE; - bool highly_specific = FALSE; - int i; - - op = ffebld_op (*expr); - assert ((op == FFEBLD_opFUNCREF) || (op == FFEBLD_opSUBRREF)); - assert (ffebld_op (ffebld_left (*expr)) == FFEBLD_opSYMTER); - - gen = ffebld_symter_generic (ffebld_left (*expr)); - assert (gen != FFEINTRIN_genNONE); - - imp = FFEINTRIN_impNONE; - error = FFEBAD; - - any = ffeintrin_check_any_ (ffebld_right (*expr)); - - for (i = 0; - (((size_t) i) < ARRAY_SIZE (ffeintrin_gens_[gen].specs)) - && ((tspec = ffeintrin_gens_[gen].specs[i]) != FFEINTRIN_specNONE) - && !any; - ++i) - { - ffeintrinImp timp = ffeintrin_specs_[tspec].implementation; - ffeinfoBasictype tbt; - ffeinfoKindtype tkt; - ffetargetCharacterSize tsz; - ffeIntrinsicState state - = ffeintrin_state_family (ffeintrin_specs_[tspec].family); - ffebad terror; - - if (state == FFE_intrinsicstateDELETED) - continue; - - if (timp != FFEINTRIN_impNONE) - { - if (!(ffeintrin_imps_[timp].control[0] == '-') - != !(ffebld_op (*expr) == FFEBLD_opSUBRREF)) - continue; /* Form of reference must match form of specific. */ - } - - if (state == FFE_intrinsicstateDISABLED) - terror = FFEBAD_INTRINSIC_DISABLED; - else if (timp == FFEINTRIN_impNONE) - terror = FFEBAD_INTRINSIC_UNIMPL; - else - { - terror = ffeintrin_check_ (timp, ffebld_op (*expr), - ffebld_right (*expr), - &tbt, &tkt, &tsz, NULL, t, FALSE); - if (terror == FFEBAD) - { - if (imp != FFEINTRIN_impNONE) - { - ffebad_start (FFEBAD_INTRINSIC_AMBIG); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (ffeintrin_gens_[gen].name); - ffebad_string (ffeintrin_specs_[spec].name); - ffebad_string (ffeintrin_specs_[tspec].name); - ffebad_finish (); - } - else - { - if (ffebld_symter_specific (ffebld_left (*expr)) - == tspec) - highly_specific = TRUE; - imp = timp; - spec = tspec; - bt = tbt; - kt = tkt; - sz = tkt; - error = terror; - } - } - else if (terror != FFEBAD) - { /* This error has precedence over others. */ - if ((error == FFEBAD_INTRINSIC_DISABLED) - || (error == FFEBAD_INTRINSIC_UNIMPL)) - error = FFEBAD; - } - } - - if (error == FFEBAD) - error = terror; - } - - if (any || (imp == FFEINTRIN_impNONE)) - { - if (!any) - { - if (error == FFEBAD) - error = FFEBAD_INTRINSIC_REF; - ffebad_start (error); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (ffeintrin_gens_[gen].name); - ffebad_finish (); - } - - *expr = ffebld_new_any (); - *info = ffeinfo_new_any (); - } - else - { - if (!highly_specific && (nimp != FFEINTRIN_impNONE)) - { - fprintf (stderr, "lineno=%ld, gen=%s, imp=%s, timp=%s\n", - (long) input_line, - ffeintrin_gens_[gen].name, - ffeintrin_imps_[imp].name, - ffeintrin_imps_[nimp].name); - assert ("Ambiguous generic reference" == NULL); - abort (); - } - error = ffeintrin_check_ (imp, ffebld_op (*expr), - ffebld_right (*expr), - &bt, &kt, &sz, NULL, t, TRUE); - assert (error == FFEBAD); - *info = ffeinfo_new (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereFLEETING, - sz); - symter = ffebld_left (*expr); - ffebld_symter_set_specific (symter, spec); - ffebld_symter_set_implementation (symter, imp); - ffebld_set_info (symter, - ffeinfo_new (bt, - kt, - 0, - (bt == FFEINFO_basictypeNONE) - ? FFEINFO_kindSUBROUTINE - : FFEINFO_kindFUNCTION, - FFEINFO_whereINTRINSIC, - sz)); - - if ((ffesymbol_attrs (ffebld_symter (symter)) & FFESYMBOL_attrsTYPE) - && (((bt != ffesymbol_basictype (ffebld_symter (symter))) - || (kt != ffesymbol_kindtype (ffebld_symter (symter))) - || ((sz != FFETARGET_charactersizeNONE) - && (sz != ffesymbol_size (ffebld_symter (symter))))))) - { - ffebad_start (FFEBAD_INTRINSIC_TYPE); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (ffeintrin_gens_[gen].name); - ffebad_finish (); - } - if (ffeintrin_imps_[imp].y2kbad) - { - ffebad_start (FFEBAD_INTRINSIC_Y2KBAD); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (ffeintrin_gens_[gen].name); - ffebad_finish (); - } - } -} - -/* Check and fill in info on func/subr ref node. - - ffebld expr; // FUNCREF or SUBRREF with no info (caller - // gets it from the modified info structure). - ffeinfo info; // Already filled in, will be overwritten. - bool check_intrin; // May be omitted, else set TRUE if intrinsic needs checking. - ffelexToken token; // Used for error message. - ffeintrin_fulfill_specific (&expr, &info, &check_intrin, token); - - Based on the specific id, determine whether the arg list is valid - (number, type, rank, and kind of args) and fill in the info structure - accordingly. Currently don't rewrite the expression, but perhaps - someday do so for constant collapsing, except when an error occurs, - in which case it is overwritten with ANY and info is also overwritten - accordingly. */ - -void -ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info, - bool *check_intrin, ffelexToken t) -{ - ffebld symter; - ffebldOp op; - ffeintrinGen gen; - ffeintrinSpec spec; - ffeintrinImp imp; - ffeinfoBasictype bt = FFEINFO_basictypeNONE; - ffeinfoKindtype kt = FFEINFO_kindtypeNONE; - ffetargetCharacterSize sz = FFETARGET_charactersizeNONE; - ffeIntrinsicState state; - ffebad error; - bool any = FALSE; - const char *name; - - op = ffebld_op (*expr); - assert ((op == FFEBLD_opFUNCREF) || (op == FFEBLD_opSUBRREF)); - assert (ffebld_op (ffebld_left (*expr)) == FFEBLD_opSYMTER); - - gen = ffebld_symter_generic (ffebld_left (*expr)); - spec = ffebld_symter_specific (ffebld_left (*expr)); - assert (spec != FFEINTRIN_specNONE); - - if (gen != FFEINTRIN_genNONE) - name = ffeintrin_gens_[gen].name; - else - name = ffeintrin_specs_[spec].name; - - state = ffeintrin_state_family (ffeintrin_specs_[spec].family); - - imp = ffeintrin_specs_[spec].implementation; - if (check_intrin != NULL) - *check_intrin = FALSE; - - any = ffeintrin_check_any_ (ffebld_right (*expr)); - - if (state == FFE_intrinsicstateDISABLED) - error = FFEBAD_INTRINSIC_DISABLED; - else if (imp == FFEINTRIN_impNONE) - error = FFEBAD_INTRINSIC_UNIMPL; - else if (!any) - { - error = ffeintrin_check_ (imp, ffebld_op (*expr), - ffebld_right (*expr), - &bt, &kt, &sz, check_intrin, t, TRUE); - } - else - error = FFEBAD; /* Not really needed, but quiet -Wuninitialized. */ - - if (any || (error != FFEBAD)) - { - if (!any) - { - - ffebad_start (error); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (name); - ffebad_finish (); - } - - *expr = ffebld_new_any (); - *info = ffeinfo_new_any (); - } - else - { - *info = ffeinfo_new (bt, - kt, - 0, - FFEINFO_kindENTITY, - FFEINFO_whereFLEETING, - sz); - symter = ffebld_left (*expr); - ffebld_set_info (symter, - ffeinfo_new (bt, - kt, - 0, - (bt == FFEINFO_basictypeNONE) - ? FFEINFO_kindSUBROUTINE - : FFEINFO_kindFUNCTION, - FFEINFO_whereINTRINSIC, - sz)); - - if ((ffesymbol_attrs (ffebld_symter (symter)) & FFESYMBOL_attrsTYPE) - && (((bt != ffesymbol_basictype (ffebld_symter (symter))) - || (kt != ffesymbol_kindtype (ffebld_symter (symter))) - || (sz != ffesymbol_size (ffebld_symter (symter)))))) - { - ffebad_start (FFEBAD_INTRINSIC_TYPE); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (name); - ffebad_finish (); - } - if (ffeintrin_imps_[imp].y2kbad) - { - ffebad_start (FFEBAD_INTRINSIC_Y2KBAD); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_string (name); - ffebad_finish (); - } - } -} - -/* Return run-time index of intrinsic implementation as direct call. */ - -ffecomGfrt -ffeintrin_gfrt_direct (ffeintrinImp imp) -{ - assert (imp < FFEINTRIN_imp); - - return ffeintrin_imps_[imp].gfrt_direct; -} - -/* Return run-time index of intrinsic implementation as actual argument. */ - -ffecomGfrt -ffeintrin_gfrt_indirect (ffeintrinImp imp) -{ - assert (imp < FFEINTRIN_imp); - - if (! ffe_is_f2c ()) - return ffeintrin_imps_[imp].gfrt_gnu; - return ffeintrin_imps_[imp].gfrt_f2c; -} - -void -ffeintrin_init_0 (void) -{ - int i; - const char *p1; - const char *p2; - const char *p3; - int colon; - - if (!ffe_is_do_internal_checks ()) - return; - - assert (FFEINTRIN_gen == ARRAY_SIZE (ffeintrin_gens_)); - assert (FFEINTRIN_imp == ARRAY_SIZE (ffeintrin_imps_)); - assert (FFEINTRIN_spec == ARRAY_SIZE (ffeintrin_specs_)); - - for (i = 1; ((size_t) i) < ARRAY_SIZE (ffeintrin_names_); ++i) - { /* Make sure binary-searched list is in alpha - order. */ - if (strcmp (ffeintrin_names_[i - 1].name_uc, - ffeintrin_names_[i].name_uc) >= 0) - assert ("name list out of order" == NULL); - } - - for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_names_); ++i) - { - assert ((ffeintrin_names_[i].generic == FFEINTRIN_genNONE) - || (ffeintrin_names_[i].specific == FFEINTRIN_specNONE)); - - p1 = ffeintrin_names_[i].name_uc; - p2 = ffeintrin_names_[i].name_lc; - p3 = ffeintrin_names_[i].name_ic; - for (; *p1 != '\0' && *p2 != '\0' && *p3 != '\0'; ++p1, ++p2, ++p3) - { - if ((ISDIGIT (*p1) || (*p1 == '_')) && (*p1 == *p2) && (*p1 == *p3)) - continue; - if (! ISUPPER ((unsigned char)*p1) || ! ISLOWER ((unsigned char)*p2) - || (*p1 != TOUPPER (*p2)) - || ((*p3 != *p1) && (*p3 != *p2))) - break; - } - assert ((*p1 == *p2) && (*p1 == *p3) && (*p1 == '\0')); - } - - for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_imps_); ++i) - { - const char *c = ffeintrin_imps_[i].control; - - if (c[0] == '\0') - continue; - - if ((c[0] != '-') - && (c[0] != 'A') - && (c[0] != 'C') - && (c[0] != 'I') - && (c[0] != 'L') - && (c[0] != 'R') - && (c[0] != 'B') - && (c[0] != 'F') - && (c[0] != 'N') - && (c[0] != 'S')) - { - fprintf (stderr, "%s: bad return-base-type\n", - ffeintrin_imps_[i].name); - continue; - } - if ((c[1] != '-') - && (c[1] != '=') - && ((c[1] < '1') - || (c[1] > '9')) - && (c[1] != 'C')) - { - fprintf (stderr, "%s: bad return-kind-type\n", - ffeintrin_imps_[i].name); - continue; - } - if (c[2] == ':') - colon = 2; - else - { - if (c[2] != '*') - { - fprintf (stderr, "%s: bad return-modifier\n", - ffeintrin_imps_[i].name); - continue; - } - colon = 3; - } - if ((c[colon] != ':') || (c[colon + 2] != ':')) - { - fprintf (stderr, "%s: bad control\n", - ffeintrin_imps_[i].name); - continue; - } - if ((c[colon + 1] != '-') - && (c[colon + 1] != '*') - && (! ISDIGIT (c[colon + 1]))) - { - fprintf (stderr, "%s: bad COL-spec\n", - ffeintrin_imps_[i].name); - continue; - } - c += (colon + 3); - while (c[0] != '\0') - { - while ((c[0] != '=') - && (c[0] != ',') - && (c[0] != '\0')) - ++c; - if (c[0] != '=') - { - fprintf (stderr, "%s: bad keyword\n", - ffeintrin_imps_[i].name); - break; - } - if ((c[1] == '?') - || (c[1] == '!') - || (c[1] == '+') - || (c[1] == '*') - || (c[1] == 'n') - || (c[1] == 'p')) - ++c; - if ((c[1] != '-') - && (c[1] != 'A') - && (c[1] != 'C') - && (c[1] != 'I') - && (c[1] != 'L') - && (c[1] != 'R') - && (c[1] != 'B') - && (c[1] != 'F') - && (c[1] != 'N') - && (c[1] != 'S') - && (c[1] != 'g') - && (c[1] != 's')) - { - fprintf (stderr, "%s: bad arg-base-type\n", - ffeintrin_imps_[i].name); - break; - } - if ((c[2] != '*') - && ((c[2] < '1') - || (c[2] > '9')) - && (c[2] != 'A')) - { - fprintf (stderr, "%s: bad arg-kind-type\n", - ffeintrin_imps_[i].name); - break; - } - if (c[3] == '[') - { - if ((! ISDIGIT (c[4])) - || ((c[5] != ']') - && (++c, ! ISDIGIT (c[4]) - || (c[5] != ']')))) - { - fprintf (stderr, "%s: bad arg-len\n", - ffeintrin_imps_[i].name); - break; - } - c += 3; - } - if (c[3] == '(') - { - if ((! ISDIGIT (c[4])) - || ((c[5] != ')') - && (++c, ! ISDIGIT (c[4]) - || (c[5] != ')')))) - { - fprintf (stderr, "%s: bad arg-rank\n", - ffeintrin_imps_[i].name); - break; - } - c += 3; - } - else if ((c[3] == '&') - && (c[4] == '&')) - ++c; - if ((c[3] == '&') - || (c[3] == 'i') - || (c[3] == 'w') - || (c[3] == 'x')) - ++c; - if (c[3] == ',') - { - c += 4; - continue; - } - if (c[3] != '\0') - { - fprintf (stderr, "%s: bad arg-list\n", - ffeintrin_imps_[i].name); - } - break; - } - } -} - -/* Determine whether intrinsic is okay as an actual argument. */ - -bool -ffeintrin_is_actualarg (ffeintrinSpec spec) -{ - ffeIntrinsicState state; - - if (spec >= FFEINTRIN_spec) - return FALSE; - - state = ffeintrin_state_family (ffeintrin_specs_[spec].family); - - return (!ffe_is_pedantic () || ffeintrin_specs_[spec].is_actualarg) - && (ffe_is_f2c () - ? (ffeintrin_imps_[ffeintrin_specs_[spec].implementation].gfrt_f2c - != FFECOM_gfrt) - : (ffeintrin_imps_[ffeintrin_specs_[spec].implementation].gfrt_gnu - != FFECOM_gfrt)) - && ((state == FFE_intrinsicstateENABLED) - || (state == FFE_intrinsicstateHIDDEN)); -} - -/* Determine if name is intrinsic, return info. - - const char *name; // C-string name of possible intrinsic. - ffelexToken t; // NULL if no diagnostic to be given. - bool explicit; // TRUE if INTRINSIC name. - ffeintrinGen gen; // (TRUE only) Generic id of intrinsic. - ffeintrinSpec spec; // (TRUE only) Specific id of intrinsic. - ffeintrinImp imp; // (TRUE only) Implementation id of intrinsic. - if (ffeintrin_is_intrinsic (name, t, explicit, - &gen, &spec, &imp)) - // is an intrinsic, use gen, spec, imp, and - // kind accordingly. */ - -bool -ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit, - ffeintrinGen *xgen, ffeintrinSpec *xspec, - ffeintrinImp *ximp) -{ - struct _ffeintrin_name_ *intrinsic; - ffeintrinGen gen; - ffeintrinSpec spec; - ffeintrinImp imp; - ffeIntrinsicState state; - bool disabled = FALSE; - bool unimpl = FALSE; - - intrinsic = bsearch (name, &ffeintrin_names_[0], - ARRAY_SIZE (ffeintrin_names_), - sizeof (struct _ffeintrin_name_), - (void *) ffeintrin_cmp_name_); - - if (intrinsic == NULL) - return FALSE; - - gen = intrinsic->generic; - spec = intrinsic->specific; - imp = ffeintrin_specs_[spec].implementation; - - /* Generic is okay only if at least one of its specifics is okay. */ - - if (gen != FFEINTRIN_genNONE) - { - int i; - ffeintrinSpec tspec; - bool ok = FALSE; - - name = ffeintrin_gens_[gen].name; - - for (i = 0; - (((size_t) i) < ARRAY_SIZE (ffeintrin_gens_[gen].specs)) - && ((tspec - = ffeintrin_gens_[gen].specs[i]) != FFEINTRIN_specNONE); - ++i) - { - state = ffeintrin_state_family (ffeintrin_specs_[tspec].family); - - if (state == FFE_intrinsicstateDELETED) - continue; - - if (state == FFE_intrinsicstateDISABLED) - { - disabled = TRUE; - continue; - } - - if (ffeintrin_specs_[tspec].implementation == FFEINTRIN_impNONE) - { - unimpl = TRUE; - continue; - } - - if ((state == FFE_intrinsicstateENABLED) - || (explicit - && (state == FFE_intrinsicstateHIDDEN))) - { - ok = TRUE; - break; - } - } - if (!ok) - gen = FFEINTRIN_genNONE; - } - - /* Specific is okay only if not: unimplemented, disabled, deleted, or - hidden and not explicit. */ - - if (spec != FFEINTRIN_specNONE) - { - if (gen != FFEINTRIN_genNONE) - name = ffeintrin_gens_[gen].name; - else - name = ffeintrin_specs_[spec].name; - - if (((state = ffeintrin_state_family (ffeintrin_specs_[spec].family)) - == FFE_intrinsicstateDELETED) - || (!explicit - && (state == FFE_intrinsicstateHIDDEN))) - spec = FFEINTRIN_specNONE; - else if (state == FFE_intrinsicstateDISABLED) - { - disabled = TRUE; - spec = FFEINTRIN_specNONE; - } - else if (imp == FFEINTRIN_impNONE) - { - unimpl = TRUE; - spec = FFEINTRIN_specNONE; - } - } - - /* If neither is okay, not an intrinsic. */ - - if ((gen == FFEINTRIN_genNONE) && (spec == FFEINTRIN_specNONE)) - { - /* Here is where we produce a diagnostic about a reference to a - disabled or unimplemented intrinsic, if the diagnostic is desired. */ - - if ((disabled || unimpl) - && (t != NULL)) - { - ffebad_start (disabled - ? FFEBAD_INTRINSIC_DISABLED - : FFEBAD_INTRINSIC_UNIMPLW); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (name); - ffebad_finish (); - } - - return FALSE; - } - - /* Determine whether intrinsic is function or subroutine. If no specific - id, scan list of possible specifics for generic to get consensus. If - not unanimous, or clear from the context, return NONE. */ - - if (spec == FFEINTRIN_specNONE) - { - int i; - ffeintrinSpec tspec; - ffeintrinImp timp; - bool at_least_one_ok = FALSE; - - for (i = 0; - (((size_t) i) < ARRAY_SIZE (ffeintrin_gens_[gen].specs)) - && ((tspec - = ffeintrin_gens_[gen].specs[i]) != FFEINTRIN_specNONE); - ++i) - { - if (((state = ffeintrin_state_family (ffeintrin_specs_[tspec].family)) - == FFE_intrinsicstateDELETED) - || (state == FFE_intrinsicstateDISABLED)) - continue; - - if ((timp = ffeintrin_specs_[tspec].implementation) - == FFEINTRIN_impNONE) - continue; - - at_least_one_ok = TRUE; - break; - } - - if (!at_least_one_ok) - { - *xgen = FFEINTRIN_genNONE; - *xspec = FFEINTRIN_specNONE; - *ximp = FFEINTRIN_impNONE; - return FALSE; - } - } - - *xgen = gen; - *xspec = spec; - *ximp = imp; - return TRUE; -} - -/* Return TRUE if intrinsic is standard F77 (or, if -ff90, F90). */ - -bool -ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec) -{ - if (spec == FFEINTRIN_specNONE) - { - if (gen == FFEINTRIN_genNONE) - return FALSE; - - spec = ffeintrin_gens_[gen].specs[0]; - if (spec == FFEINTRIN_specNONE) - return FALSE; - } - - if ((ffeintrin_specs_[spec].family == FFEINTRIN_familyF77) - || (ffe_is_90 () - && ((ffeintrin_specs_[spec].family == FFEINTRIN_familyF90) - || (ffeintrin_specs_[spec].family == FFEINTRIN_familyMIL) - || (ffeintrin_specs_[spec].family == FFEINTRIN_familyASC)))) - return TRUE; - return FALSE; -} - -/* Return kind type of intrinsic implementation. See ffeintrin_basictype, - its sibling. */ - -ffeinfoKindtype -ffeintrin_kindtype (ffeintrinSpec spec) -{ - ffeintrinImp imp; - ffecomGfrt gfrt; - - assert (spec < FFEINTRIN_spec); - imp = ffeintrin_specs_[spec].implementation; - assert (imp < FFEINTRIN_imp); - - if (ffe_is_f2c ()) - gfrt = ffeintrin_imps_[imp].gfrt_f2c; - else - gfrt = ffeintrin_imps_[imp].gfrt_gnu; - - assert (gfrt != FFECOM_gfrt); - - return ffecom_gfrt_kindtype (gfrt); -} - -/* Return name of generic intrinsic. */ - -const char * -ffeintrin_name_generic (ffeintrinGen gen) -{ - assert (gen < FFEINTRIN_gen); - return ffeintrin_gens_[gen].name; -} - -/* Return name of intrinsic implementation. */ - -const char * -ffeintrin_name_implementation (ffeintrinImp imp) -{ - assert (imp < FFEINTRIN_imp); - return ffeintrin_imps_[imp].name; -} - -/* Return external/internal name of specific intrinsic. */ - -const char * -ffeintrin_name_specific (ffeintrinSpec spec) -{ - assert (spec < FFEINTRIN_spec); - return ffeintrin_specs_[spec].name; -} - -/* Return state of family. */ - -ffeIntrinsicState -ffeintrin_state_family (ffeintrinFamily family) -{ - ffeIntrinsicState state; - - switch (family) - { - case FFEINTRIN_familyNONE: - return FFE_intrinsicstateDELETED; - - case FFEINTRIN_familyF77: - return FFE_intrinsicstateENABLED; - - case FFEINTRIN_familyASC: - state = ffe_intrinsic_state_f2c (); - state = ffe_state_max (state, ffe_intrinsic_state_f90 ()); - return state; - - case FFEINTRIN_familyMIL: - state = ffe_intrinsic_state_vxt (); - state = ffe_state_max (state, ffe_intrinsic_state_f90 ()); - state = ffe_state_max (state, ffe_intrinsic_state_mil ()); - return state; - - case FFEINTRIN_familyGNU: - state = ffe_intrinsic_state_gnu (); - return state; - - case FFEINTRIN_familyF90: - state = ffe_intrinsic_state_f90 (); - return state; - - case FFEINTRIN_familyVXT: - state = ffe_intrinsic_state_vxt (); - return state; - - case FFEINTRIN_familyFVZ: - state = ffe_intrinsic_state_f2c (); - state = ffe_state_max (state, ffe_intrinsic_state_vxt ()); - return state; - - case FFEINTRIN_familyF2C: - state = ffe_intrinsic_state_f2c (); - return state; - - case FFEINTRIN_familyF2U: - state = ffe_intrinsic_state_unix (); - return state; - - case FFEINTRIN_familyBADU77: - state = ffe_intrinsic_state_badu77 (); - return state; - - default: - assert ("bad family" == NULL); - return FFE_intrinsicstateDELETED; - } -} diff --git a/contrib/gcc/f/intrin.def b/contrib/gcc/f/intrin.def deleted file mode 100644 index 5d712ba..0000000 --- a/contrib/gcc/f/intrin.def +++ /dev/null @@ -1,3358 +0,0 @@ -/* intrin.def -- Public #include File (module.h template V1.0) - The Free Software Foundation has released this file into the - public domain. - - Owning Modules: - intrin.c - - Modifications: -*/ - -/* Intrinsic names listed in alphabetical order, sorted by uppercase name. - This list is keyed to the names of intrinsics as seen in source code. */ - -DEFNAME ("ABORT", "abort", "Abort", genNONE, specABORT) /* UNIX */ -DEFNAME ("ABS", "abs", "Abs", genNONE, specABS) -DEFNAME ("ACCESS", "access", "Access", genNONE, specACCESS) /* UNIX */ -DEFNAME ("ACHAR", "achar", "AChar", genNONE, specACHAR) /* F90, F2C */ -DEFNAME ("ACOS", "acos", "ACos", genNONE, specACOS) -DEFNAME ("ACOSD", "acosd", "ACosD", genNONE, specACOSD) /* VXT */ -DEFNAME ("ADJUSTL", "adjustl", "AdjustL", genNONE, specADJUSTL) /* F90 */ -DEFNAME ("ADJUSTR", "adjustr", "AdjustR", genNONE, specADJUSTR) /* F90 */ -DEFNAME ("AIMAG", "aimag", "AImag", genNONE, specAIMAG) -DEFNAME ("AIMAX0", "aimax0", "AIMax0", genNONE, specAIMAX0) /* VXT */ -DEFNAME ("AIMIN0", "aimin0", "AIMin0", genNONE, specAIMIN0) /* VXT */ -DEFNAME ("AINT", "aint", "AInt", genNONE, specAINT) -DEFNAME ("AJMAX0", "ajmax0", "AJMax0", genNONE, specAJMAX0) /* VXT */ -DEFNAME ("AJMIN0", "ajmin0", "AJMin0", genNONE, specAJMIN0) /* VXT */ -DEFNAME ("ALARM", "alarm", "Alarm", genNONE, specALARM) /* UNIX */ -DEFNAME ("ALL", "all", "All", genNONE, specALL) /* F90 */ -DEFNAME ("ALLOCATED", "allocated", "Allocated", genNONE, specALLOCATED) /* F90 */ -DEFNAME ("ALOG", "alog", "ALog", genNONE, specALOG) -DEFNAME ("ALOG10", "alog10", "ALog10", genNONE, specALOG10) -DEFNAME ("AMAX0", "amax0", "AMax0", genNONE, specAMAX0) -DEFNAME ("AMAX1", "amax1", "AMax1", genNONE, specAMAX1) -DEFNAME ("AMIN0", "amin0", "AMin0", genNONE, specAMIN0) -DEFNAME ("AMIN1", "amin1", "AMin1", genNONE, specAMIN1) -DEFNAME ("AMOD", "amod", "AMod", genNONE, specAMOD) -DEFNAME ("AND", "and", "And", genNONE, specAND) /* F2C */ -DEFNAME ("ANINT", "anint", "ANInt", genNONE, specANINT) -DEFNAME ("ANY", "any", "Any", genNONE, specANY) /* F90 */ -DEFNAME ("ASIN", "asin", "ASin", genNONE, specASIN) -DEFNAME ("ASIND", "asind", "ASinD", genNONE, specASIND) /* VXT */ -DEFNAME ("ASSOCIATED", "associated", "Associated", genNONE, specASSOCIATED) /* F90 */ -DEFNAME ("ATAN", "atan", "ATan", genNONE, specATAN) -DEFNAME ("ATAN2", "atan2", "ATan2", genNONE, specATAN2) -DEFNAME ("ATAN2D", "atan2d", "ATan2D", genNONE, specATAN2D) /* VXT */ -DEFNAME ("ATAND", "atand", "ATanD", genNONE, specATAND) /* VXT */ -DEFNAME ("BESJ0", "besj0", "BesJ0", genNONE, specBESJ0) /* UNIX */ -DEFNAME ("BESJ1", "besj1", "BesJ1", genNONE, specBESJ1) /* UNIX */ -DEFNAME ("BESJN", "besjn", "BesJN", genNONE, specBESJN) /* UNIX */ -DEFNAME ("BESY0", "besy0", "BesY0", genNONE, specBESY0) /* UNIX */ -DEFNAME ("BESY1", "besy1", "BesY1", genNONE, specBESY1) /* UNIX */ -DEFNAME ("BESYN", "besyn", "BesYN", genNONE, specBESYN) /* UNIX */ -DEFNAME ("BITEST", "bitest", "BITest", genNONE, specBITEST) /* VXT */ -DEFNAME ("BIT_SIZE", "bit_size", "Bit_Size", genNONE, specBIT_SIZE) /* F90 */ -DEFNAME ("BJTEST", "bjtest", "BJTest", genNONE, specBJTEST) /* VXT */ -DEFNAME ("BTEST", "btest", "BTest", genNONE, specBTEST) /* F90, VXT */ -DEFNAME ("CABS", "cabs", "CAbs", genNONE, specCABS) -DEFNAME ("CCOS", "ccos", "CCos", genNONE, specCCOS) -DEFNAME ("CDABS", "cdabs", "CDAbs", genNONE, specCDABS) /* VXT */ -DEFNAME ("CDCOS", "cdcos", "CDCos", genNONE, specCDCOS) /* VXT */ -DEFNAME ("CDEXP", "cdexp", "CDExp", genNONE, specCDEXP) /* VXT */ -DEFNAME ("CDLOG", "cdlog", "CDLog", genNONE, specCDLOG) /* VXT */ -DEFNAME ("CDSIN", "cdsin", "CDSin", genNONE, specCDSIN) /* VXT */ -DEFNAME ("CDSQRT", "cdsqrt", "CDSqRt", genNONE, specCDSQRT) /* VXT */ -DEFNAME ("CEILING", "ceiling", "Ceiling", genNONE, specCEILING) /* F90 */ -DEFNAME ("CEXP", "cexp", "CExp", genNONE, specCEXP) -DEFNAME ("CHAR", "char", "Char", genNONE, specCHAR) -DEFNAME ("CHDIR", "chdir", "ChDir", genCHDIR, specNONE) /* UNIX */ -DEFNAME ("CHMOD", "chmod", "ChMod", genCHMOD, specNONE) /* UNIX */ -DEFNAME ("CLOG", "clog", "CLog", genNONE, specCLOG) -DEFNAME ("CMPLX", "cmplx", "Cmplx", genNONE, specCMPLX) -DEFNAME ("COMPLEX", "complex", "Complex", genNONE, specCOMPLEX) -DEFNAME ("CONJG", "conjg", "Conjg", genNONE, specCONJG) -DEFNAME ("COS", "cos", "Cos", genNONE, specCOS) -DEFNAME ("COSD", "cosd", "CosD", genNONE, specCOSD) /* VXT */ -DEFNAME ("COSH", "cosh", "CosH", genNONE, specCOSH) -DEFNAME ("COUNT", "count", "Count", genNONE, specCOUNT) /* F90 */ -DEFNAME ("CPU_TIME", "cpu_time", "CPU_Time", genNONE, specCPU_TIME) /* F95 */ -DEFNAME ("CSHIFT", "cshift", "CShift", genNONE, specCSHIFT) /* F90 */ -DEFNAME ("CSIN", "csin", "CSin", genNONE, specCSIN) -DEFNAME ("CSQRT", "csqrt", "CSqRt", genNONE, specCSQRT) -DEFNAME ("CTIME", "ctime", "CTime", genCTIME, specNONE) /* UNIX */ -DEFNAME ("DABS", "dabs", "DAbs", genNONE, specDABS) -DEFNAME ("DACOS", "dacos", "DACos", genNONE, specDACOS) -DEFNAME ("DACOSD", "dacosd", "DACosD", genNONE, specDACOSD) /* VXT */ -DEFNAME ("DASIN", "dasin", "DASin", genNONE, specDASIN) -DEFNAME ("DASIND", "dasind", "DASinD", genNONE, specDASIND) /* VXT */ -DEFNAME ("DATAN", "datan", "DATan", genNONE, specDATAN) -DEFNAME ("DATAN2", "datan2", "DATan2", genNONE, specDATAN2) -DEFNAME ("DATAN2D", "datan2d", "DATan2D", genNONE, specDATAN2D) /* VXT */ -DEFNAME ("DATAND", "datand", "DATanD", genNONE, specDATAND) /* VXT */ -DEFNAME ("DATE", "date", "Date", genNONE, specDATE) /* VXT */ -DEFNAME ("DATE_AND_TIME", "date_and_time", "Date_and_Time", genNONE, specDATE_AND_TIME) /* F90 */ -DEFNAME ("DBESJ0", "dbesj0", "DbesJ0", genNONE, specDBESJ0) /* UNIX */ -DEFNAME ("DBESJ1", "dbesj1", "DbesJ1", genNONE, specDBESJ1) /* UNIX */ -DEFNAME ("DBESJN", "dbesjn", "DbesJN", genNONE, specDBESJN) /* UNIX */ -DEFNAME ("DBESY0", "dbesy0", "DbesY0", genNONE, specDBESY0) /* UNIX */ -DEFNAME ("DBESY1", "dbesy1", "DbesY1", genNONE, specDBESY1) /* UNIX */ -DEFNAME ("DBESYN", "dbesyn", "DbesYN", genNONE, specDBESYN) /* UNIX */ -DEFNAME ("DBLE", "dble", "Dble", genNONE, specDBLE) -DEFNAME ("DBLEQ", "dbleq", "DbleQ", genNONE, specDBLEQ) /* VXT */ -DEFNAME ("DCMPLX", "dcmplx", "DCmplx", genNONE, specDCMPLX) /* F2C, VXT */ -DEFNAME ("DCONJG", "dconjg", "DConjg", genNONE, specDCONJG) /* F2C, VXT */ -DEFNAME ("DCOS", "dcos", "DCos", genNONE, specDCOS) -DEFNAME ("DCOSD", "dcosd", "DCosD", genNONE, specDCOSD) /* VXT */ -DEFNAME ("DCOSH", "dcosh", "DCosH", genNONE, specDCOSH) -DEFNAME ("DDIM", "ddim", "DDiM", genNONE, specDDIM) -DEFNAME ("DERF", "derf", "DErF", genNONE, specDERF) /* UNIX */ -DEFNAME ("DERFC", "derfc", "DErFC", genNONE, specDERFC) /* UNIX */ -DEFNAME ("DEXP", "dexp", "DExp", genNONE, specDEXP) -DEFNAME ("DFLOAT", "dfloat", "DFloat", genNONE, specDFLOAT) /* F2C, VXT */ -DEFNAME ("DFLOTI", "dfloti", "DFlotI", genNONE, specDFLOTI) /* VXT */ -DEFNAME ("DFLOTJ", "dflotj", "DFlotJ", genNONE, specDFLOTJ) /* VXT */ -DEFNAME ("DIGITS", "digits", "Digits", genNONE, specDIGITS) /* F90 */ -DEFNAME ("DIM", "dim", "DiM", genNONE, specDIM) -DEFNAME ("DIMAG", "dimag", "DImag", genNONE, specDIMAG) /* F2C, VXT */ -DEFNAME ("DINT", "dint", "DInt", genNONE, specDINT) -DEFNAME ("DLOG", "dlog", "DLog", genNONE, specDLOG) -DEFNAME ("DLOG10", "dlog10", "DLog10", genNONE, specDLOG10) -DEFNAME ("DMAX1", "dmax1", "DMax1", genNONE, specDMAX1) -DEFNAME ("DMIN1", "dmin1", "DMin1", genNONE, specDMIN1) -DEFNAME ("DMOD", "dmod", "DMod", genNONE, specDMOD) -DEFNAME ("DNINT", "dnint", "DNInt", genNONE, specDNINT) -DEFNAME ("DOT_PRODUCT", "dot_product", "Dot_Product", genNONE, specDOT_PRODUCT) /* F90 */ -DEFNAME ("DPROD", "dprod", "DProd", genNONE, specDPROD) -DEFNAME ("DREAL", "dreal", "DReal", genNONE, specDREAL) /* VXT */ -DEFNAME ("DSIGN", "dsign", "DSign", genNONE, specDSIGN) -DEFNAME ("DSIN", "dsin", "DSin", genNONE, specDSIN) -DEFNAME ("DSIND", "dsind", "DSinD", genNONE, specDSIND) /* VXT */ -DEFNAME ("DSINH", "dsinh", "DSinH", genNONE, specDSINH) -DEFNAME ("DSQRT", "dsqrt", "DSqRt", genNONE, specDSQRT) -DEFNAME ("DTAN", "dtan", "DTan", genNONE, specDTAN) -DEFNAME ("DTAND", "dtand", "DTanD", genNONE, specDTAND) /* VXT */ -DEFNAME ("DTANH", "dtanh", "DTanH", genNONE, specDTANH) -DEFNAME ("DTIME", "dtime", "DTime", genDTIME, specNONE) /* UNIX */ -DEFNAME ("EOSHIFT", "eoshift", "EOShift", genNONE, specEOSHIFT) /* F90 */ -DEFNAME ("EPSILON", "epsilon", "Epsilon", genNONE, specEPSILON) /* F90 */ -DEFNAME ("ERF", "erf", "ErF", genNONE, specERF) /* UNIX */ -DEFNAME ("ERFC", "erfc", "ErFC", genNONE, specERFC) /* UNIX */ -DEFNAME ("ETIME", "etime", "ETime", genETIME, specNONE) /* UNIX */ -DEFNAME ("EXIT", "exit", "Exit", genNONE, specEXIT) /* UNIX */ -DEFNAME ("EXP", "exp", "Exp", genNONE, specEXP) -DEFNAME ("EXPONENT", "exponent", "Exponent", genNONE, specEXPONENT) /* F90 */ -DEFNAME ("FDATE", "fdate", "FDate", genFDATE, specNONE) /* UNIX */ -DEFNAME ("FGET", "fget", "FGet", genFGET, specNONE) /* UNIX */ -DEFNAME ("FGETC", "fgetc", "FGetC", genFGETC, specNONE) /* UNIX */ -DEFNAME ("FLOAT", "float", "Float", genNONE, specFLOAT) -DEFNAME ("FLOATI", "floati", "FloatI", genNONE, specFLOATI) /* VXT */ -DEFNAME ("FLOATJ", "floatj", "FloatJ", genNONE, specFLOATJ) /* VXT */ -DEFNAME ("FLOOR", "floor", "Floor", genNONE, specFLOOR) /* F90 */ -DEFNAME ("FLUSH", "flush", "Flush", genNONE, specFLUSH) /* UNIX */ -DEFNAME ("FNUM", "fnum", "FNum", genNONE, specFNUM) /* UNIX */ -DEFNAME ("FPABSP", "fpabsp", "FPAbsP", genFPABSP, specNONE) /* F2C */ -DEFNAME ("FPEXPN", "fpexpn", "FPExpn", genFPEXPN, specNONE) /* F2C */ -DEFNAME ("FPFRAC", "fpfrac", "FPFrac", genFPFRAC, specNONE) /* F2C */ -DEFNAME ("FPMAKE", "fpmake", "FPMake", genFPMAKE, specNONE) /* F2C */ -DEFNAME ("FPRRSP", "fprrsp", "FPRRSp", genFPRRSP, specNONE) /* F2C */ -DEFNAME ("FPSCAL", "fpscal", "FPScal", genFPSCAL, specNONE) /* F2C */ -DEFNAME ("FPUT", "fput", "FPut", genFPUT, specNONE) /* UNIX */ -DEFNAME ("FPUTC", "fputc", "FPutC", genFPUTC, specNONE) /* UNIX */ -DEFNAME ("FRACTION", "fraction", "Fraction", genNONE, specFRACTION) /* F90 */ -DEFNAME ("FSEEK", "fseek", "FSeek", genNONE, specFSEEK) /* UNIX */ -DEFNAME ("FSTAT", "fstat", "FStat", genFSTAT, specNONE) /* UNIX */ -DEFNAME ("FTELL", "ftell", "FTell", genFTELL, specNONE) /* UNIX */ -DEFNAME ("GERROR", "gerror", "GError", genNONE, specGERROR) /* UNIX */ -DEFNAME ("GETARG", "getarg", "GetArg", genNONE, specGETARG) /* UNIX */ -DEFNAME ("GETCWD", "getcwd", "GetCWD", genGETCWD, specNONE) /* UNIX */ -DEFNAME ("GETENV", "getenv", "GetEnv", genNONE, specGETENV) /* UNIX */ -DEFNAME ("GETGID", "getgid", "GetGId", genNONE, specGETGID) /* UNIX */ -DEFNAME ("GETLOG", "getlog", "GetLog", genNONE, specGETLOG) /* UNIX */ -DEFNAME ("GETPID", "getpid", "GetPId", genNONE, specGETPID) /* UNIX */ -DEFNAME ("GETUID", "getuid", "GetUId", genNONE, specGETUID) /* UNIX */ -DEFNAME ("GMTIME", "gmtime", "GMTime", genNONE, specGMTIME) /* UNIX */ -DEFNAME ("HOSTNM", "hostnm", "HostNm", genHOSTNM, specNONE) /* UNIX */ -DEFNAME ("HUGE", "huge", "Huge", genNONE, specHUGE) /* F90 */ -DEFNAME ("IABS", "iabs", "IAbs", genNONE, specIABS) -DEFNAME ("IACHAR", "iachar", "IAChar", genNONE, specIACHAR) /* F90, F2C */ -DEFNAME ("IAND", "iand", "IAnd", genNONE, specIAND) /* F90, VXT */ -DEFNAME ("IARGC", "iargc", "IArgC", genNONE, specIARGC) /* UNIX */ -DEFNAME ("IBCLR", "ibclr", "IBClr", genNONE, specIBCLR) /* F90, VXT */ -DEFNAME ("IBITS", "ibits", "IBits", genNONE, specIBITS) /* F90, VXT */ -DEFNAME ("IBSET", "ibset", "IBSet", genNONE, specIBSET) /* F90, VXT */ -DEFNAME ("ICHAR", "ichar", "IChar", genNONE, specICHAR) -DEFNAME ("IDATE", "idate", "IDate", genIDATE, specNONE) /* UNIX, VXT */ -DEFNAME ("IDIM", "idim", "IDiM", genNONE, specIDIM) -DEFNAME ("IDINT", "idint", "IDInt", genNONE, specIDINT) -DEFNAME ("IDNINT", "idnint", "IDNInt", genNONE, specIDNINT) -DEFNAME ("IEOR", "ieor", "IEOr", genNONE, specIEOR) /* F90, VXT */ -DEFNAME ("IERRNO", "ierrno", "IErrNo", genNONE, specIERRNO) /* UNIX */ -DEFNAME ("IFIX", "ifix", "IFix", genNONE, specIFIX) -DEFNAME ("IIABS", "iiabs", "IIAbs", genNONE, specIIABS) /* VXT */ -DEFNAME ("IIAND", "iiand", "IIAnd", genNONE, specIIAND) /* VXT */ -DEFNAME ("IIBCLR", "iibclr", "IIBClr", genNONE, specIIBCLR) /* VXT */ -DEFNAME ("IIBITS", "iibits", "IIBits", genNONE, specIIBITS) /* VXT */ -DEFNAME ("IIBSET", "iibset", "IIBSet", genNONE, specIIBSET) /* VXT */ -DEFNAME ("IIDIM", "iidim", "IIDiM", genNONE, specIIDIM) /* VXT */ -DEFNAME ("IIDINT", "iidint", "IIDInt", genNONE, specIIDINT) /* VXT */ -DEFNAME ("IIDNNT", "iidnnt", "IIDNnt", genNONE, specIIDNNT) /* VXT */ -DEFNAME ("IIEOR", "iieor", "IIEOr", genNONE, specIIEOR) /* VXT */ -DEFNAME ("IIFIX", "iifix", "IIFix", genNONE, specIIFIX) /* VXT */ -DEFNAME ("IINT", "iint", "IInt", genNONE, specIINT) /* VXT */ -DEFNAME ("IIOR", "iior", "IIOr", genNONE, specIIOR) /* VXT */ -DEFNAME ("IIQINT", "iiqint", "IIQint", genNONE, specIIQINT) /* VXT */ -DEFNAME ("IIQNNT", "iiqnnt", "IIQNnt", genNONE, specIIQNNT) /* VXT */ -DEFNAME ("IISHFT", "iishft", "IIShft", genNONE, specNONE) /* VXT */ -DEFNAME ("IISHFTC", "iishftc", "IIShftC", genNONE, specIISHFTC) /* VXT */ -DEFNAME ("IISIGN", "iisign", "IISign", genNONE, specIISIGN) /* VXT */ -DEFNAME ("IMAG", "imag", "Imag", genNONE, specIMAG) /* F2C */ -DEFNAME ("IMAGPART", "imagpart", "ImagPart", genNONE, specIMAGPART) /* GNU */ -DEFNAME ("IMAX0", "imax0", "IMax0", genNONE, specIMAX0) /* VXT */ -DEFNAME ("IMAX1", "imax1", "IMax1", genNONE, specIMAX1) /* VXT */ -DEFNAME ("IMIN0", "imin0", "IMin0", genNONE, specIMIN0) /* VXT */ -DEFNAME ("IMIN1", "imin1", "IMin1", genNONE, specIMIN1) /* VXT */ -DEFNAME ("IMOD", "imod", "IMod", genNONE, specIMOD) /* VXT */ -DEFNAME ("INDEX", "index", "Index", genNONE, specINDEX) -DEFNAME ("ININT", "inint", "INInt", genNONE, specININT) /* VXT */ -DEFNAME ("INOT", "inot", "INot", genNONE, specINOT) /* VXT */ -DEFNAME ("INT", "int", "Int", genNONE, specINT) -DEFNAME ("INT2", "int2", "Int2", genNONE, specINT2) /* MS */ -DEFNAME ("INT8", "int8", "Int8", genNONE, specINT8) /* GNU */ -DEFNAME ("IOR", "ior", "IOr", genNONE, specIOR) /* F90, VXT */ -DEFNAME ("IRAND", "irand", "IRand", genNONE, specIRAND) /* UNIX */ -DEFNAME ("ISATTY", "isatty", "IsaTty", genNONE, specISATTY) /* UNIX */ -DEFNAME ("ISHFT", "ishft", "IShft", genNONE, specISHFT) /* F90 */ -DEFNAME ("ISHFTC", "ishftc", "IShftC", genNONE, specISHFTC) /* F90, VXT */ -DEFNAME ("ISIGN", "isign", "ISign", genNONE, specISIGN) -DEFNAME ("ITIME", "itime", "ITime", genNONE, specITIME) /* UNIX */ -DEFNAME ("IZEXT", "izext", "IZExt", genNONE, specIZEXT) /* VXT */ -DEFNAME ("JIABS", "jiabs", "JIAbs", genNONE, specJIABS) /* VXT */ -DEFNAME ("JIAND", "jiand", "JIAnd", genNONE, specJIAND) /* VXT */ -DEFNAME ("JIBCLR", "jibclr", "JIBClr", genNONE, specJIBCLR) /* VXT */ -DEFNAME ("JIBITS", "jibits", "JIBits", genNONE, specJIBITS) /* VXT */ -DEFNAME ("JIBSET", "jibset", "JIBSet", genNONE, specJIBSET) /* VXT */ -DEFNAME ("JIDIM", "jidim", "JIDiM", genNONE, specJIDIM) /* VXT */ -DEFNAME ("JIDINT", "jidint", "JIDInt", genNONE, specJIDINT) /* VXT */ -DEFNAME ("JIDNNT", "jidnnt", "JIDNnt", genNONE, specJIDNNT) /* VXT */ -DEFNAME ("JIEOR", "jieor", "JIEOr", genNONE, specJIEOR) /* VXT */ -DEFNAME ("JIFIX", "jifix", "JIFix", genNONE, specJIFIX) /* VXT */ -DEFNAME ("JINT", "jint", "JInt", genNONE, specJINT) /* VXT */ -DEFNAME ("JIOR", "jior", "JIOr", genNONE, specJIOR) /* VXT */ -DEFNAME ("JIQINT", "jiqint", "JIQint", genNONE, specJIQINT) /* VXT */ -DEFNAME ("JIQNNT", "jiqnnt", "JIQNnt", genNONE, specJIQNNT) /* VXT */ -DEFNAME ("JISHFT", "jishft", "JIShft", genNONE, specJISHFT) /* VXT */ -DEFNAME ("JISHFTC", "jishftc", "JIShftC", genNONE, specJISHFTC) /* VXT */ -DEFNAME ("JISIGN", "jisign", "JISign", genNONE, specJISIGN) /* VXT */ -DEFNAME ("JMAX0", "jmax0", "JMax0", genNONE, specJMAX0) /* VXT */ -DEFNAME ("JMAX1", "jmax1", "JMax1", genNONE, specJMAX1) /* VXT */ -DEFNAME ("JMIN0", "jmin0", "JMin0", genNONE, specJMIN0) /* VXT */ -DEFNAME ("JMIN1", "jmin1", "JMin1", genNONE, specJMIN1) /* VXT */ -DEFNAME ("JMOD", "jmod", "JMod", genNONE, specJMOD) /* VXT */ -DEFNAME ("JNINT", "jnint", "JNInt", genNONE, specJNINT) /* VXT */ -DEFNAME ("JNOT", "jnot", "JNot", genNONE, specJNOT) /* VXT */ -DEFNAME ("JZEXT", "jzext", "JZExt", genNONE, specJZEXT) /* VXT */ -DEFNAME ("KILL", "kill", "Kill", genKILL, specNONE) /* UNIX */ -DEFNAME ("KIND", "kind", "Kind", genNONE, specKIND) /* F90 */ -DEFNAME ("LBOUND", "lbound", "LBound", genNONE, specLBOUND) /* F90 */ -DEFNAME ("LEN", "len", "Len", genNONE, specLEN) -DEFNAME ("LEN_TRIM", "len_trim", "Len_Trim", genNONE, specLEN_TRIM) /* F90 */ -DEFNAME ("LGE", "lge", "LGe", genNONE, specLGE) -DEFNAME ("LGT", "lgt", "LGt", genNONE, specLGT) -DEFNAME ("LINK", "link", "Link", genLINK, specNONE) /* UNIX */ -DEFNAME ("LLE", "lle", "LLe", genNONE, specLLE) -DEFNAME ("LLT", "llt", "LLt", genNONE, specLLT) -DEFNAME ("LNBLNK", "lnblnk", "LnBlnk", genNONE, specLNBLNK) /* UNIX */ -DEFNAME ("LOC", "loc", "Loc", genNONE, specLOC) /* VXT */ -DEFNAME ("LOG", "log", "Log", genNONE, specLOG) -DEFNAME ("LOG10", "log10", "Log10", genNONE, specLOG10) -DEFNAME ("LOGICAL", "logical", "Logical", genNONE, specLOGICAL) /* F90 */ -DEFNAME ("LONG", "long", "Long", genNONE, specLONG) /* UNIX */ -DEFNAME ("LSHIFT", "lshift", "LShift", genNONE, specLSHIFT) /* F2C */ -DEFNAME ("LSTAT", "lstat", "LStat", genLSTAT, specNONE) /* UNIX */ -DEFNAME ("LTIME", "ltime", "LTime", genNONE, specLTIME) /* UNIX */ -DEFNAME ("MATMUL", "matmul", "MatMul", genNONE, specMATMUL) /* F90 */ -DEFNAME ("MAX", "max", "Max", genNONE, specMAX) -DEFNAME ("MAX0", "max0", "Max0", genNONE, specMAX0) -DEFNAME ("MAX1", "max1", "Max1", genNONE, specMAX1) -DEFNAME ("MAXEXPONENT", "maxexponent", "MaxExponent", genNONE, specMAXEXPONENT) /* F90 */ -DEFNAME ("MAXLOC", "maxloc", "MaxLoc", genNONE, specMAXLOC) /* F90 */ -DEFNAME ("MAXVAL", "maxval", "MaxVal", genNONE, specMAXVAL) /* F90 */ -DEFNAME ("MCLOCK", "mclock", "MClock", genNONE, specMCLOCK) /* UNIX */ -DEFNAME ("MCLOCK8", "mclock8", "MClock8", genNONE, specMCLOCK8) /* UNIX */ -DEFNAME ("MERGE", "merge", "Merge", genNONE, specMERGE) /* F90 */ -DEFNAME ("MIN", "min", "Min", genNONE, specMIN) -DEFNAME ("MIN0", "min0", "Min0", genNONE, specMIN0) -DEFNAME ("MIN1", "min1", "Min1", genNONE, specMIN1) -DEFNAME ("MINEXPONENT", "minexponent", "MinExponent", genNONE, specMINEXPONENT) /* F90 */ -DEFNAME ("MINLOC", "minloc", "MinLoc", genNONE, specMINLOC) /* F90 */ -DEFNAME ("MINVAL", "minval", "MinVal", genNONE, specMINVAL) /* F90 */ -DEFNAME ("MOD", "mod", "Mod", genNONE, specMOD) -DEFNAME ("MODULO", "modulo", "Modulo", genNONE, specMODULO) /* F90 */ -DEFNAME ("MVBITS", "mvbits", "MvBits", genNONE, specMVBITS) /* F90 */ -DEFNAME ("NEAREST", "nearest", "Nearest", genNONE, specNEAREST) /* F90 */ -DEFNAME ("NINT", "nint", "NInt", genNONE, specNINT) -DEFNAME ("NOT", "not", "Not", genNONE, specNOT) /* F2C, F90, VXT */ -DEFNAME ("OR", "or", "Or", genNONE, specOR) /* F2C */ -DEFNAME ("PACK", "pack", "Pack", genNONE, specPACK) /* F90 */ -DEFNAME ("PERROR", "perror", "PError", genNONE, specPERROR) /* UNIX */ -DEFNAME ("PRECISION", "precision", "Precision", genNONE, specPRECISION) /* F90 */ -DEFNAME ("PRESENT", "present", "Present", genNONE, specPRESENT) /* F90 */ -DEFNAME ("PRODUCT", "product", "Product", genNONE, specPRODUCT) /* F90 */ -DEFNAME ("QABS", "qabs", "QAbs", genNONE, specQABS) /* VXT */ -DEFNAME ("QACOS", "qacos", "QACos", genNONE, specQACOS) /* VXT */ -DEFNAME ("QACOSD", "qacosd", "QACosD", genNONE, specQACOSD) /* VXT */ -DEFNAME ("QASIN", "qasin", "QASin", genNONE, specQASIN) /* VXT */ -DEFNAME ("QASIND", "qasind", "QASinD", genNONE, specQASIND) /* VXT */ -DEFNAME ("QATAN", "qatan", "QATan", genNONE, specQATAN) /* VXT */ -DEFNAME ("QATAN2", "qatan2", "QATan2", genNONE, specQATAN2) /* VXT */ -DEFNAME ("QATAN2D", "qatan2d", "QATan2D", genNONE, specQATAN2D) /* VXT */ -DEFNAME ("QATAND", "qatand", "QATanD", genNONE, specQATAND) /* VXT */ -DEFNAME ("QCOS", "qcos", "QCos", genNONE, specQCOS) /* VXT */ -DEFNAME ("QCOSD", "qcosd", "QCosD", genNONE, specQCOSD) /* VXT */ -DEFNAME ("QCOSH", "qcosh", "QCosH", genNONE, specQCOSH) /* VXT */ -DEFNAME ("QDIM", "qdim", "QDiM", genNONE, specQDIM) /* VXT */ -DEFNAME ("QEXP", "qexp", "QExp", genNONE, specQEXP) /* VXT */ -DEFNAME ("QEXT", "qext", "QExt", genNONE, specQEXT) /* VXT */ -DEFNAME ("QEXTD", "qextd", "QExtD", genNONE, specQEXTD) /* VXT */ -DEFNAME ("QFLOAT", "qfloat", "QFloat", genNONE, specQFLOAT) /* VXT */ -DEFNAME ("QINT", "qint", "QInt", genNONE, specQINT) /* VXT */ -DEFNAME ("QLOG", "qlog", "QLog", genNONE, specQLOG) /* VXT */ -DEFNAME ("QLOG10", "qlog10", "QLog10", genNONE, specQLOG10) /* VXT */ -DEFNAME ("QMAX1", "qmax1", "QMax1", genNONE, specQMAX1) /* VXT */ -DEFNAME ("QMIN1", "qmin1", "QMin1", genNONE, specQMIN1) /* VXT */ -DEFNAME ("QMOD", "qmod", "QMod", genNONE, specQMOD) /* VXT */ -DEFNAME ("QNINT", "qnint", "QNInt", genNONE, specQNINT) /* VXT */ -DEFNAME ("QSIN", "qsin", "QSin", genNONE, specQSIN) /* VXT */ -DEFNAME ("QSIND", "qsind", "QSinD", genNONE, specQSIND) /* VXT */ -DEFNAME ("QSINH", "qsinh", "QSinH", genNONE, specQSINH) /* VXT */ -DEFNAME ("QSQRT", "qsqrt", "QSqRt", genNONE, specQSQRT) /* VXT */ -DEFNAME ("QTAN", "qtan", "QTan", genNONE, specQTAN) /* VXT */ -DEFNAME ("QTAND", "qtand", "QTanD", genNONE, specQTAND) /* VXT */ -DEFNAME ("QTANH", "qtanh", "QTanH", genNONE, specQTANH) /* VXT */ -DEFNAME ("RADIX", "radix", "Radix", genNONE, specRADIX) /* F90 */ -DEFNAME ("RAND", "rand", "Rand", genNONE, specRAND) /* UNIX */ -DEFNAME ("RANDOM_NUMBER", "random_number", "Random_Number", genNONE, specRANDOM_NUMBER) /* F90 */ -DEFNAME ("RANDOM_SEED", "random_seed", "Random_Seed", genNONE, specRANDOM_SEED) /* F90 */ -DEFNAME ("RANGE", "range", "Range", genNONE, specRANGE) /* F90 */ -DEFNAME ("REAL", "real", "Real", genNONE, specREAL) -DEFNAME ("REALPART", "realpart", "RealPart", genNONE, specREALPART) /* GNU */ -DEFNAME ("RENAME", "rename", "Rename", genRENAME, specNONE) /* UNIX */ -DEFNAME ("REPEAT", "repeat", "Repeat", genNONE, specREPEAT) /* F90 */ -DEFNAME ("RESHAPE", "reshape", "Reshape", genNONE, specRESHAPE) /* F90 */ -DEFNAME ("RRSPACING", "rrspacing", "RRSpacing", genNONE, specRRSPACING) /* F90 */ -DEFNAME ("RSHIFT", "rshift", "RShift", genNONE, specRSHIFT) /* F2C */ -DEFNAME ("SCALE", "scale", "Scale", genNONE, specSCALE) /* F90 */ -DEFNAME ("SCAN", "scan", "Scan", genNONE, specSCAN) /* F90 */ -DEFNAME ("SECNDS", "secnds", "Secnds", genNONE, specSECNDS) /* VXT */ -DEFNAME ("SECOND", "second", "Second", genSECOND, specNONE) /* UNIX */ -DEFNAME ("SELECTED_INT_KIND", "selected_int_kind", "Selected_Int_Kind", genNONE, specSEL_INT_KIND) /* F90 */ -DEFNAME ("SELECTED_REAL_KIND", "selected_real_kind", "Selected_Real_Kind", genNONE, specSEL_REAL_KIND) /* F90 */ -DEFNAME ("SET_EXPONENT", "set_exponent", "Set_Exponent", genNONE, specSET_EXPONENT) /* F90 */ -DEFNAME ("SHAPE", "shape", "Shape", genNONE, specSHAPE) /* F90 */ -DEFNAME ("SHORT", "short", "Short", genNONE, specSHORT) /* UNIX */ -DEFNAME ("SIGN", "sign", "Sign", genNONE, specSIGN) -DEFNAME ("SIGNAL", "signal", "Signal", genSIGNAL, specNONE) /* UNIX */ -DEFNAME ("SIN", "sin", "Sin", genNONE, specSIN) -DEFNAME ("SIND", "sind", "SinD", genNONE, specSIND) /* VXT */ -DEFNAME ("SINH", "sinh", "SinH", genNONE, specSINH) -DEFNAME ("SLEEP", "sleep", "Sleep", genNONE, specSLEEP) /* UNIX */ -DEFNAME ("SNGL", "sngl", "Sngl", genNONE, specSNGL) -DEFNAME ("SNGLQ", "snglq", "SnglQ", genNONE, specSNGLQ) /* VXT */ -DEFNAME ("SPACING", "spacing", "Spacing", genNONE, specSPACING) /* F90 */ -DEFNAME ("SPREAD", "spread", "Spread", genNONE, specSPREAD) /* F90 */ -DEFNAME ("SQRT", "sqrt", "SqRt", genNONE, specSQRT) -DEFNAME ("SRAND", "srand", "SRand", genNONE, specSRAND) /* UNIX */ -DEFNAME ("STAT", "stat", "Stat", genSTAT, specNONE) /* UNIX */ -DEFNAME ("SUM", "sum", "Sum", genNONE, specSUM) /* F90 */ -DEFNAME ("SYMLNK", "symlnk", "SymLnk", genSYMLNK, specNONE) /* UNIX */ -DEFNAME ("SYSTEM", "system", "System", genSYSTEM, specNONE) /* UNIX */ -DEFNAME ("SYSTEM_CLOCK", "system_clock", "System_Clock", genNONE, specSYSTEM_CLOCK) /* F90 */ -DEFNAME ("TAN", "tan", "Tan", genNONE, specTAN) -DEFNAME ("TAND", "tand", "TanD", genNONE, specTAND) /* VXT */ -DEFNAME ("TANH", "tanh", "TanH", genNONE, specTANH) -DEFNAME ("TIME", "time", "Time", genTIME, specNONE) /* UNIX, VXT */ -DEFNAME ("TIME8", "time8", "Time8", genNONE, specTIME8) /* UNIX */ -DEFNAME ("TINY", "tiny", "Tiny", genNONE, specTINY) /* F90 */ -DEFNAME ("TRANSFER", "transfer", "Transfer", genNONE, specTRANSFER) /* F90 */ -DEFNAME ("TRANSPOSE", "transpose", "Transpose", genNONE, specTRANSPOSE) /* F90 */ -DEFNAME ("TRIM", "trim", "Trim", genNONE, specTRIM) /* F90 */ -DEFNAME ("TTYNAM", "ttynam", "TtyNam", genTTYNAM, specNONE) /* UNIX */ -DEFNAME ("UBOUND", "ubound", "UBound", genNONE, specUBOUND) /* F90 */ -DEFNAME ("UMASK", "umask", "UMask", genUMASK, specNONE) /* UNIX */ -DEFNAME ("UNLINK", "unlink", "Unlink", genUNLINK, specNONE) /* UNIX */ -DEFNAME ("UNPACK", "unpack", "Unpack", genNONE, specUNPACK) /* F90 */ -DEFNAME ("VERIFY", "verify", "Verify", genNONE, specVERIFY) /* F90 */ -DEFNAME ("XOR", "xor", "XOr", genNONE, specXOR) /* F2C */ -DEFNAME ("ZABS", "zabs", "ZAbs", genNONE, specZABS) /* F2C */ -DEFNAME ("ZCOS", "zcos", "ZCos", genNONE, specZCOS) /* F2C */ -DEFNAME ("ZEXP", "zexp", "ZExp", genNONE, specZEXP) /* F2C */ -DEFNAME ("ZEXT", "zext", "ZExt", genNONE, specZEXT) /* VXT */ -DEFNAME ("ZLOG", "zlog", "ZLog", genNONE, specZLOG) /* F2C */ -DEFNAME ("ZSIN", "zsin", "ZSin", genNONE, specZSIN) /* F2C */ -DEFNAME ("ZSQRT", "zsqrt", "ZSqRt", genNONE, specZSQRT) /* F2C */ - -/* Internally generic intrinsics. - - Should properly be called "mapped" intrinsics. These are intrinsics - that map to one or more generally different implementations -- e.g. - that have differing interpretations depending on the Fortran dialect - being used. Also, this includes the placeholder intrinsics that - have no specific versions, but we want to reserve the names for now. */ - -DEFGEN (CTIME, "CTIME", /* UNIX */ - FFEINTRIN_specCTIME_subr, - FFEINTRIN_specCTIME_func - ) -DEFGEN (CHDIR, "CHDIR", /* UNIX */ - FFEINTRIN_specCHDIR_subr, - FFEINTRIN_specCHDIR_func - ) -DEFGEN (CHMOD, "CHMOD", /* UNIX */ - FFEINTRIN_specCHMOD_subr, - FFEINTRIN_specCHMOD_func - ) -DEFGEN (DTIME, "DTIME", /* UNIX */ - FFEINTRIN_specDTIME_subr, - FFEINTRIN_specDTIME_func - ) -DEFGEN (ETIME, "ETIME", /* UNIX */ - FFEINTRIN_specETIME_subr, - FFEINTRIN_specETIME_func - ) -DEFGEN (FDATE, "FDATE", /* UNIX */ - FFEINTRIN_specFDATE_subr, - FFEINTRIN_specFDATE_func - ) -DEFGEN (FGET, "FGET", /* UNIX */ - FFEINTRIN_specFGET_subr, - FFEINTRIN_specFGET_func - ) -DEFGEN (FGETC, "FGETC", /* UNIX */ - FFEINTRIN_specFGETC_subr, - FFEINTRIN_specFGETC_func - ) -DEFGEN (FPABSP, "FPABSP", /* F2C */ - FFEINTRIN_specNONE, - FFEINTRIN_specNONE - ) -DEFGEN (FPEXPN, "FPEXPN", /* F2C */ - FFEINTRIN_specNONE, - FFEINTRIN_specNONE - ) -DEFGEN (FPFRAC, "FPFRAC", /* F2C */ - FFEINTRIN_specNONE, - FFEINTRIN_specNONE - ) -DEFGEN (FPMAKE, "FPMAKE", /* F2C */ - FFEINTRIN_specNONE, - FFEINTRIN_specNONE - ) -DEFGEN (FPRRSP, "FPRRSP", /* F2C */ - FFEINTRIN_specNONE, - FFEINTRIN_specNONE - ) -DEFGEN (FPSCAL, "FPSCAL", /* F2C */ - FFEINTRIN_specNONE, - FFEINTRIN_specNONE - ) -DEFGEN (FPUT, "FPUT", /* UNIX */ - FFEINTRIN_specFPUT_subr, - FFEINTRIN_specFPUT_func - ) -DEFGEN (FPUTC, "FPUTC", /* UNIX */ - FFEINTRIN_specFPUTC_subr, - FFEINTRIN_specFPUTC_func - ) -DEFGEN (FSTAT, "FSTAT", /* UNIX */ - FFEINTRIN_specFSTAT_subr, - FFEINTRIN_specFSTAT_func - ) -DEFGEN (FTELL, "FTELL", /* UNIX */ - FFEINTRIN_specFTELL_subr, - FFEINTRIN_specFTELL_func - ) -DEFGEN (GETCWD, "GETCWD", /* UNIX */ - FFEINTRIN_specGETCWD_subr, - FFEINTRIN_specGETCWD_func - ) -DEFGEN (HOSTNM, "HOSTNM", /* UNIX */ - FFEINTRIN_specHOSTNM_subr, - FFEINTRIN_specHOSTNM_func - ) -DEFGEN (IDATE, "IDATE", /* UNIX/VXT */ - FFEINTRIN_specIDATE_unix, - FFEINTRIN_specIDATE_vxt - ) -DEFGEN (KILL, "KILL", /* UNIX */ - FFEINTRIN_specKILL_subr, - FFEINTRIN_specKILL_func - ) -DEFGEN (LINK, "LINK", /* UNIX */ - FFEINTRIN_specLINK_subr, - FFEINTRIN_specLINK_func - ) -DEFGEN (LSTAT, "LSTAT", /* UNIX */ - FFEINTRIN_specLSTAT_subr, - FFEINTRIN_specLSTAT_func - ) -DEFGEN (RENAME, "RENAME", /* UNIX */ - FFEINTRIN_specRENAME_subr, - FFEINTRIN_specRENAME_func - ) -DEFGEN (SECOND, "SECOND", /* UNIX/CRAY */ - FFEINTRIN_specSECOND_func, - FFEINTRIN_specSECOND_subr - ) -DEFGEN (SIGNAL, "SIGNAL", /* UNIX */ - FFEINTRIN_specSIGNAL_subr, - FFEINTRIN_specSIGNAL_func - ) -DEFGEN (STAT, "STAT", /* UNIX */ - FFEINTRIN_specSTAT_subr, - FFEINTRIN_specSTAT_func - ) -DEFGEN (SYMLNK, "SYMLNK", /* UNIX */ - FFEINTRIN_specSYMLNK_subr, - FFEINTRIN_specSYMLNK_func - ) -DEFGEN (SYSTEM, "SYSTEM", /* UNIX */ - FFEINTRIN_specSYSTEM_subr, - FFEINTRIN_specSYSTEM_func - ) -DEFGEN (TIME, "TIME", /* UNIX/VXT */ - FFEINTRIN_specTIME_unix, - FFEINTRIN_specTIME_vxt - ) -DEFGEN (TTYNAM, "TTYNAM", /* UNIX/VXT */ - FFEINTRIN_specTTYNAM_subr, - FFEINTRIN_specTTYNAM_func - ) -DEFGEN (UMASK, "UMASK", /* UNIX */ - FFEINTRIN_specUMASK_subr, - FFEINTRIN_specUMASK_func - ) -DEFGEN (UNLINK, "UNLINK", /* UNIX */ - FFEINTRIN_specUNLINK_subr, - FFEINTRIN_specUNLINK_func - ) -DEFGEN (NONE, "none", - FFEINTRIN_specNONE, - FFEINTRIN_specNONE - ) - -/* Specific intrinsic information. - - Currently this list starts with the list of F77-standard intrinsics - in alphabetical order, then continues with the list of all other - intrinsics. - - The second boolean argument specifies whether the intrinsic is - allowed by the standard to be passed as an actual argument. */ - -DEFSPEC (ABS, - "ABS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impABS - ) -DEFSPEC (ACOS, - "ACOS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impACOS - ) -DEFSPEC (AIMAG, - "AIMAG", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impAIMAG - ) -DEFSPEC (AINT, - "AINT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impAINT - ) -DEFSPEC (ALOG, - "ALOG", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impALOG - ) -DEFSPEC (ALOG10, - "ALOG10", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impALOG10 - ) -DEFSPEC (AMAX0, - "AMAX0", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impAMAX0 - ) -DEFSPEC (AMAX1, - "AMAX1", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impAMAX1 - ) -DEFSPEC (AMIN0, - "AMIN0", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impAMIN0 - ) -DEFSPEC (AMIN1, - "AMIN1", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impAMIN1 - ) -DEFSPEC (AMOD, - "AMOD", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impAMOD - ) -DEFSPEC (ANINT, - "ANINT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impANINT - ) -DEFSPEC (ASIN, - "ASIN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impASIN - ) -DEFSPEC (ATAN, - "ATAN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impATAN - ) -DEFSPEC (ATAN2, - "ATAN2", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impATAN2 - ) -DEFSPEC (CABS, - "CABS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCABS - ) -DEFSPEC (CCOS, - "CCOS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCCOS - ) -DEFSPEC (CEXP, - "CEXP", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCEXP - ) -DEFSPEC (CHAR, - "CHAR", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impCHAR - ) -DEFSPEC (CLOG, - "CLOG", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCLOG - ) -DEFSPEC (CMPLX, - "CMPLX", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impCMPLX - ) -DEFSPEC (CONJG, - "CONJG", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCONJG - ) -DEFSPEC (COS, - "COS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCOS - ) -DEFSPEC (COSH, - "COSH", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCOSH - ) -DEFSPEC (CSIN, - "CSIN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCSIN - ) -DEFSPEC (CSQRT, - "CSQRT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impCSQRT - ) -DEFSPEC (DABS, - "DABS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDABS - ) -DEFSPEC (DACOS, - "DACOS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDACOS - ) -DEFSPEC (DASIN, - "DASIN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDASIN - ) -DEFSPEC (DATAN, - "DATAN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDATAN - ) -DEFSPEC (DATAN2, - "DATAN2", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDATAN2 - ) -DEFSPEC (DBLE, - "DBLE", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impDBLE - ) -DEFSPEC (DCOS, - "DCOS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDCOS - ) -DEFSPEC (DCOSH, - "DCOSH", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDCOSH - ) -DEFSPEC (DDIM, - "DDIM", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDDIM - ) -DEFSPEC (DEXP, - "DEXP", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDEXP - ) -DEFSPEC (DIM, - "DIM", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDIM - ) -DEFSPEC (DINT, - "DINT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDINT - ) -DEFSPEC (DLOG, - "DLOG", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDLOG - ) -DEFSPEC (DLOG10, - "DLOG10", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDLOG10 - ) -DEFSPEC (DMAX1, - "DMAX1", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impDMAX1 - ) -DEFSPEC (DMIN1, - "DMIN1", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impDMIN1 - ) -DEFSPEC (DMOD, - "DMOD", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDMOD - ) -DEFSPEC (DNINT, - "DNINT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDNINT - ) -DEFSPEC (DPROD, - "DPROD", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDPROD - ) -DEFSPEC (DSIGN, - "DSIGN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDSIGN - ) -DEFSPEC (DSIN, - "DSIN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDSIN - ) -DEFSPEC (DSINH, - "DSINH", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDSINH - ) -DEFSPEC (DSQRT, - "DSQRT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDSQRT - ) -DEFSPEC (DTAN, - "DTAN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDTAN - ) -DEFSPEC (DTANH, - "DTANH", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impDTANH - ) -DEFSPEC (EXP, - "EXP", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impEXP - ) -DEFSPEC (FLOAT, - "FLOAT", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impFLOAT - ) -DEFSPEC (IABS, - "IABS", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impIABS - ) -DEFSPEC (ICHAR, - "ICHAR", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impICHAR - ) -DEFSPEC (IDIM, - "IDIM", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impIDIM - ) -DEFSPEC (IDINT, - "IDINT", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impIDINT - ) -DEFSPEC (IDNINT, - "IDNINT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impIDNINT - ) -DEFSPEC (IFIX, - "IFIX", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impIFIX - ) -DEFSPEC (INDEX, - "INDEX", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impINDEX - ) -DEFSPEC (INT, - "INT", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impINT - ) -DEFSPEC (ISIGN, - "ISIGN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impISIGN - ) -DEFSPEC (LEN, - "LEN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impLEN - ) -DEFSPEC (LGE, - "LGE", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impLGE - ) -DEFSPEC (LGT, - "LGT", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impLGT - ) -DEFSPEC (LLE, - "LLE", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impLLE - ) -DEFSPEC (LLT, - "LLT", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impLLT - ) -DEFSPEC (LOG, - "LOG", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impLOG - ) -DEFSPEC (LOG10, - "LOG10", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impLOG10 - ) -DEFSPEC (MAX, - "MAX", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impMAX - ) -DEFSPEC (MAX0, - "MAX0", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impMAX0 - ) -DEFSPEC (MAX1, - "MAX1", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impMAX1 - ) -DEFSPEC (MIN, - "MIN", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impMIN - ) -DEFSPEC (MIN0, - "MIN0", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impMIN0 - ) -DEFSPEC (MIN1, - "MIN1", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impMIN1 - ) -DEFSPEC (MOD, - "MOD", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impMOD - ) -DEFSPEC (NINT, - "NINT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impNINT - ) -DEFSPEC (REAL, - "REAL", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impREAL - ) -DEFSPEC (SIGN, - "SIGN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impSIGN - ) -DEFSPEC (SIN, - "SIN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impSIN - ) -DEFSPEC (SINH, - "SINH", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impSINH - ) -DEFSPEC (SNGL, - "SNGL", - FALSE, - FFEINTRIN_familyF77, - FFEINTRIN_impSNGL - ) -DEFSPEC (SQRT, - "SQRT", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impSQRT - ) -DEFSPEC (TAN, - "TAN", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impTAN - ) -DEFSPEC (TANH, - "TANH", - TRUE, - FFEINTRIN_familyF77, - FFEINTRIN_impTANH - ) - -DEFSPEC (ABORT, - "ABORT", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impABORT - ) -DEFSPEC (ACCESS, - "ACCESS", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impACCESS -) -DEFSPEC (ACHAR, - "ACHAR", - FALSE, - FFEINTRIN_familyASC, - FFEINTRIN_impACHAR - ) -DEFSPEC (ACOSD, - "ACOSD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (ADJUSTL, - "ADJUSTL", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (ADJUSTR, - "ADJUSTR", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (AIMAX0, - "AIMAX0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (AIMIN0, - "AIMIN0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (AJMAX0, - "AJMAX0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (AJMIN0, - "AJMIN0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (ALARM, - "ALARM", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impALARM - ) -DEFSPEC (ALL, - "ALL", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (ALLOCATED, - "ALLOCATED", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (AND, - "AND", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impAND - ) -DEFSPEC (ANY, - "ANY", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (ASIND, - "ASIND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (ASSOCIATED, - "ASSOCIATED", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (ATAN2D, - "ATAN2D", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (ATAND, - "ATAND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (BESJ0, - "BESJ0", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impBESJ0 -) -DEFSPEC (BESJ1, - "BESJ1", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impBESJ1 -) -DEFSPEC (BESJN, - "BESJN", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impBESJN -) -DEFSPEC (BESY0, - "BESY0", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impBESY0 -) -DEFSPEC (BESY1, - "BESY1", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impBESY1 -) -DEFSPEC (BESYN, - "BESYN", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impBESYN -) -DEFSPEC (BIT_SIZE, - "BIT_SIZE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impBIT_SIZE - ) -DEFSPEC (BITEST, - "BITEST", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (BJTEST, - "BJTEST", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (BTEST, - "BTEST", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impBTEST - ) -DEFSPEC (CDABS, - "CDABS", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impCDABS - ) -DEFSPEC (CDCOS, - "CDCOS", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impCDCOS - ) -DEFSPEC (CDEXP, - "CDEXP", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impCDEXP - ) -DEFSPEC (CDLOG, - "CDLOG", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impCDLOG - ) -DEFSPEC (CDSIN, - "CDSIN", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impCDSIN - ) -DEFSPEC (CDSQRT, - "CDSQRT", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impCDSQRT - ) -DEFSPEC (CEILING, - "CEILING", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (CHDIR_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impCHDIR_func -) -DEFSPEC (CHDIR_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impCHDIR_subr -) -DEFSPEC (CHMOD_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impCHMOD_func -) -DEFSPEC (CHMOD_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impCHMOD_subr -) -DEFSPEC (COMPLEX, - "COMPLEX", - FALSE, - FFEINTRIN_familyGNU, - FFEINTRIN_impCOMPLEX - ) -DEFSPEC (COSD, - "COSD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (COUNT, - "COUNT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (CSHIFT, - "CSHIFT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (CPU_TIME, - "CPU_TIME", - FALSE, - FFEINTRIN_familyF95, - FFEINTRIN_impCPU_TIME -) -DEFSPEC (CTIME_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impCTIME_func -) -DEFSPEC (CTIME_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impCTIME_subr -) -DEFSPEC (DACOSD, - "DACOSD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DASIND, - "DASIND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DATAN2D, - "DATAN2D", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DATAND, - "DATAND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DATE, - "DATE", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impDATE -) -DEFSPEC (DATE_AND_TIME, - "DATE_AND_TIME", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impDATE_AND_TIME - ) -DEFSPEC (DBESJ0, - "DBESJ0", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDBESJ0 -) -DEFSPEC (DBESJ1, - "DBESJ1", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDBESJ1 -) -DEFSPEC (DBESJN, - "DBESJN", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDBESJN -) -DEFSPEC (DBESY0, - "DBESY0", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDBESY0 -) -DEFSPEC (DBESY1, - "DBESY1", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDBESY1 -) -DEFSPEC (DBESYN, - "DBESYN", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDBESYN -) -DEFSPEC (DBLEQ, - "DBLEQ", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DCMPLX, - "DCMPLX", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impDCMPLX - ) -DEFSPEC (DCONJG, - "DCONJG", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impDCONJG - ) -DEFSPEC (DCOSD, - "DCOSD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DERF, - "DERF", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDERF - ) -DEFSPEC (DERFC, - "DERFC", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDERFC - ) -DEFSPEC (DFLOAT, - "DFLOAT", - FALSE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impDFLOAT - ) -DEFSPEC (DFLOTI, - "DFLOTI", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DFLOTJ, - "DFLOTJ", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DIGITS, - "DIGITS", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (DIMAG, - "DIMAG", - TRUE, - FFEINTRIN_familyFVZ, - FFEINTRIN_impDIMAG - ) -DEFSPEC (DOT_PRODUCT, - "DOT_PRODUCT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (DREAL, - "DREAL", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impDREAL - ) -DEFSPEC (DSIND, - "DSIND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DTAND, - "DTAND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (DTIME_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impDTIME_func -) -DEFSPEC (DTIME_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impDTIME_subr -) -DEFSPEC (EOSHIFT, - "EOSHIFT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (EPSILON, - "EPSILON", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (ERF, - "ERF", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impERF - ) -DEFSPEC (ERFC, - "ERFC", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impERFC - ) -DEFSPEC (ETIME_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impETIME_func -) -DEFSPEC (ETIME_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impETIME_subr -) -DEFSPEC (EXIT, - "EXIT", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impEXIT - ) -DEFSPEC (EXPONENT, - "EXPONENT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (FDATE_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFDATE_func -) -DEFSPEC (FDATE_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFDATE_subr -) -DEFSPEC (FGET_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impFGET_func -) -DEFSPEC (FGET_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFGET_subr -) -DEFSPEC (FGETC_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impFGETC_func -) -DEFSPEC (FGETC_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFGETC_subr -) -DEFSPEC (FLOATI, - "FLOATI", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (FLOATJ, - "FLOATJ", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (FLOOR, - "FLOOR", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (FLUSH, - "FLUSH", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFLUSH - ) -DEFSPEC (FNUM, - "FNUM", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFNUM -) -DEFSPEC (FPUT_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impFPUT_func -) -DEFSPEC (FPUT_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFPUT_subr -) -DEFSPEC (FPUTC_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impFPUTC_func -) -DEFSPEC (FPUTC_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFPUTC_subr -) -DEFSPEC (FRACTION, - "FRACTION", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (FSEEK, - "FSEEK", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFSEEK - ) -DEFSPEC (FSTAT_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFSTAT_func -) -DEFSPEC (FSTAT_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFSTAT_subr -) -DEFSPEC (FTELL_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFTELL_func - ) -DEFSPEC (FTELL_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impFTELL_subr - ) -DEFSPEC (GERROR, - "GERROR", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGERROR -) -DEFSPEC (GETARG, - "GETARG", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETARG - ) -DEFSPEC (GETCWD_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETCWD_func -) -DEFSPEC (GETCWD_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETCWD_subr -) -DEFSPEC (GETENV, - "GETENV", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETENV - ) -DEFSPEC (GETGID, - "GETGID", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETGID -) -DEFSPEC (GETLOG, - "GETLOG", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETLOG -) -DEFSPEC (GETPID, - "GETPID", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETPID -) -DEFSPEC (GETUID, - "GETUID", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGETUID -) -DEFSPEC (GMTIME, - "GMTIME", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impGMTIME -) -DEFSPEC (HOSTNM_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impHOSTNM_func -) -DEFSPEC (HOSTNM_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impHOSTNM_subr -) -DEFSPEC (HUGE, - "HUGE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (IACHAR, - "IACHAR", - FALSE, - FFEINTRIN_familyASC, - FFEINTRIN_impIACHAR - ) -DEFSPEC (IAND, - "IAND", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impIAND - ) -DEFSPEC (IARGC, - "IARGC", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impIARGC - ) -DEFSPEC (IBCLR, - "IBCLR", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impIBCLR - ) -DEFSPEC (IBITS, - "IBITS", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impIBITS - ) -DEFSPEC (IBSET, - "IBSET", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impIBSET - ) -DEFSPEC (IDATE_unix, - "UNIX", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impIDATE_unix -) -DEFSPEC (IDATE_vxt, - "VXT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impIDATE_vxt -) -DEFSPEC (IEOR, - "IEOR", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impIEOR - ) -DEFSPEC (IERRNO, - "IERRNO", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impIERRNO -) -DEFSPEC (IIABS, - "IIABS", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIAND, - "IIAND", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIBCLR, - "IIBCLR", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIBITS, - "IIBITS", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIBSET, - "IIBSET", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIDIM, - "IIDIM", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIDINT, - "IIDINT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIDNNT, - "IIDNNT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIEOR, - "IIEOR", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIFIX, - "IIFIX", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IINT, - "IINT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIOR, - "IIOR", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIQINT, - "IIQINT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IIQNNT, - "IIQNNT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IISHFT, - "IISHFT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IISHFTC, - "IISHFTC", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IISIGN, - "IISIGN", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IMAG, - "IMAG", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impIMAGPART - ) -DEFSPEC (IMAGPART, - "IMAGPART", - FALSE, - FFEINTRIN_familyGNU, - FFEINTRIN_impIMAGPART - ) -DEFSPEC (IMAX0, - "IMAX0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IMAX1, - "IMAX1", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IMIN0, - "IMIN0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IMIN1, - "IMIN1", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (IMOD, - "IMOD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (ININT, - "ININT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (INOT, - "INOT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (INT2, - "INT2", - FALSE, - FFEINTRIN_familyGNU, - FFEINTRIN_impINT2 - ) -DEFSPEC (INT8, - "INT8", - FALSE, - FFEINTRIN_familyGNU, - FFEINTRIN_impINT8 - ) -DEFSPEC (IOR, - "IOR", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impIOR - ) -DEFSPEC (IRAND, - "IRAND", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impIRAND -) -DEFSPEC (ISATTY, - "ISATTY", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impISATTY -) -DEFSPEC (ISHFT, - "ISHFT", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impISHFT - ) -DEFSPEC (ISHFTC, - "ISHFTC", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impISHFTC - ) -DEFSPEC (ITIME, - "ITIME", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impITIME -) -DEFSPEC (IZEXT, - "IZEXT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIABS, - "JIABS", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIAND, - "JIAND", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIBCLR, - "JIBCLR", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIBITS, - "JIBITS", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIBSET, - "JIBSET", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIDIM, - "JIDIM", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIDINT, - "JIDINT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIDNNT, - "JIDNNT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIEOR, - "JIEOR", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIFIX, - "JIFIX", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JINT, - "JINT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIOR, - "JIOR", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIQINT, - "JIQINT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JIQNNT, - "JIQNNT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JISHFT, - "JISHFT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JISHFTC, - "JISHFTC", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JISIGN, - "JISIGN", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JMAX0, - "JMAX0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JMAX1, - "JMAX1", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JMIN0, - "JMIN0", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JMIN1, - "JMIN1", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JMOD, - "JMOD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JNINT, - "JNINT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JNOT, - "JNOT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (JZEXT, - "JZEXT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (KILL_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impKILL_func -) -DEFSPEC (KILL_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impKILL_subr -) -DEFSPEC (KIND, - "KIND", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (LBOUND, - "LBOUND", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (LINK_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impLINK_func -) -DEFSPEC (LINK_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impLINK_subr -) -DEFSPEC (LEN_TRIM, - "LEN_TRIM", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impLNBLNK - ) -DEFSPEC (LNBLNK, - "LNBLNK", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impLNBLNK -) -DEFSPEC (LOC, - "LOC", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impLOC - ) -DEFSPEC (LOGICAL, - "LOGICAL", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (LONG, - "LONG", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impLONG - ) -DEFSPEC (LSHIFT, - "LSHIFT", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impLSHIFT - ) -DEFSPEC (LSTAT_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impLSTAT_func -) -DEFSPEC (LSTAT_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impLSTAT_subr -) -DEFSPEC (LTIME, - "LTIME", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impLTIME -) -DEFSPEC (MATMUL, - "MATMUL", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MAXEXPONENT, - "MAXEXPONENT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MAXLOC, - "MAXLOC", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MAXVAL, - "MAXVAL", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MCLOCK, - "MCLOCK", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impMCLOCK -) -DEFSPEC (MCLOCK8, - "MCLOCK8", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impMCLOCK8 -) -DEFSPEC (MERGE, - "MERGE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MINEXPONENT, - "MINEXPONENT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MINLOC, - "MINLOC", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MINVAL, - "MINVAL", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MODULO, - "MODULO", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (MVBITS, - "MVBITS", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impMVBITS - ) -DEFSPEC (NEAREST, - "NEAREST", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (NOT, - "NOT", - FALSE, - FFEINTRIN_familyMIL, - FFEINTRIN_impNOT - ) -DEFSPEC (OR, - "OR", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impOR - ) -DEFSPEC (PACK, - "PACK", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (PERROR, - "PERROR", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impPERROR -) -DEFSPEC (PRECISION, - "PRECISION", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (PRESENT, - "PRESENT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (PRODUCT, - "PRODUCT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (QABS, - "QABS", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QACOS, - "QACOS", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QACOSD, - "QACOSD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QASIN, - "QASIN", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QASIND, - "QASIND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QATAN, - "QATAN", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QATAN2, - "QATAN2", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QATAN2D, - "QATAN2D", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QATAND, - "QATAND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QCOS, - "QCOS", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QCOSD, - "QCOSD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QCOSH, - "QCOSH", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QDIM, - "QDIM", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QEXP, - "QEXP", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QEXT, - "QEXT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QEXTD, - "QEXTD", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QFLOAT, - "QFLOAT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QINT, - "QINT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QLOG, - "QLOG", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QLOG10, - "QLOG10", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QMAX1, - "QMAX1", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QMIN1, - "QMIN1", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QMOD, - "QMOD", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QNINT, - "QNINT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QSIGN, - "QSIGN", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QSIN, - "QSIN", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QSIND, - "QSIND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QSINH, - "QSINH", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QSQRT, - "QSQRT", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QTAN, - "QTAN", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QTAND, - "QTAND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (QTANH, - "QTANH", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (RADIX, - "RADIX", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (RAND, - "RAND", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impRAND -) -DEFSPEC (RANDOM_NUMBER, - "RANDOM_NUMBER", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (RANDOM_SEED, - "RANDOM_SEED", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (RANGE, - "RANGE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (REALPART, - "REALPART", - FALSE, - FFEINTRIN_familyGNU, - FFEINTRIN_impREALPART - ) -DEFSPEC (RENAME_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impRENAME_func -) -DEFSPEC (RENAME_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impRENAME_subr -) -DEFSPEC (REPEAT, - "REPEAT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (RESHAPE, - "RESHAPE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (RRSPACING, - "RRSPACING", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (RSHIFT, - "RSHIFT", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impRSHIFT - ) -DEFSPEC (SCALE, - "SCALE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SCAN, - "SCAN", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SECNDS, - "SECNDS", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impSECNDS -) -DEFSPEC (SECOND_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSECOND_func -) -DEFSPEC (SECOND_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSECOND_subr -) -DEFSPEC (SEL_INT_KIND, - "SEL_INT_KIND", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SEL_REAL_KIND, - "SEL_REAL_KIND", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SET_EXPONENT, - "SET_EXPONENT", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SHAPE, - "SHAPE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SHORT, - "SHORT", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSHORT - ) -DEFSPEC (SIGNAL_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impSIGNAL_func - ) -DEFSPEC (SIGNAL_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSIGNAL_subr - ) -DEFSPEC (SIND, - "SIND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (SLEEP, - "SLEEP", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSLEEP -) -DEFSPEC (SNGLQ, - "SNGLQ", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (SPACING, - "SPACING", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SPREAD, - "SPREAD", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SRAND, - "SRAND", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSRAND -) -DEFSPEC (STAT_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSTAT_func -) -DEFSPEC (STAT_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSTAT_subr -) -DEFSPEC (SUM, - "SUM", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (SYMLNK_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impSYMLNK_func -) -DEFSPEC (SYMLNK_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSYMLNK_subr -) -DEFSPEC (SYSTEM_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impSYSTEM_func - ) -DEFSPEC (SYSTEM_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impSYSTEM_subr - ) -DEFSPEC (SYSTEM_CLOCK, - "SYSTEM_CLOCK", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impSYSTEM_CLOCK - ) -DEFSPEC (TAND, - "TAND", - TRUE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (TIME8, - "UNIX", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impTIME8 -) -DEFSPEC (TIME_unix, - "UNIX", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impTIME_unix -) -DEFSPEC (TIME_vxt, - "VXT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impTIME_vxt -) -DEFSPEC (TINY, - "TINY", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (TRANSFER, - "TRANSFER", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (TRANSPOSE, - "TRANSPOSE", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (TRIM, - "TRIM", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (TTYNAM_func, - "function", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impTTYNAM_func -) -DEFSPEC (TTYNAM_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impTTYNAM_subr -) -DEFSPEC (UBOUND, - "UBOUND", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (UMASK_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impUMASK_func -) -DEFSPEC (UMASK_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impUMASK_subr -) -DEFSPEC (UNLINK_func, - "function", - FALSE, - FFEINTRIN_familyBADU77, - FFEINTRIN_impUNLINK_func -) -DEFSPEC (UNLINK_subr, - "subroutine", - FALSE, - FFEINTRIN_familyF2U, - FFEINTRIN_impUNLINK_subr -) -DEFSPEC (UNPACK, - "UNPACK", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (VERIFY, - "VERIFY", - FALSE, - FFEINTRIN_familyF90, - FFEINTRIN_impNONE - ) -DEFSPEC (XOR, - "XOR", - FALSE, - FFEINTRIN_familyF2C, - FFEINTRIN_impXOR - ) -DEFSPEC (ZABS, - "ZABS", - TRUE, - FFEINTRIN_familyF2C, - FFEINTRIN_impCDABS - ) -DEFSPEC (ZCOS, - "ZCOS", - TRUE, - FFEINTRIN_familyF2C, - FFEINTRIN_impCDCOS - ) -DEFSPEC (ZEXP, - "ZEXP", - TRUE, - FFEINTRIN_familyF2C, - FFEINTRIN_impCDEXP - ) -DEFSPEC (ZEXT, - "ZEXT", - FALSE, - FFEINTRIN_familyVXT, - FFEINTRIN_impNONE - ) -DEFSPEC (ZLOG, - "ZLOG", - TRUE, - FFEINTRIN_familyF2C, - FFEINTRIN_impCDLOG - ) -DEFSPEC (ZSIN, - "ZSIN", - TRUE, - FFEINTRIN_familyF2C, - FFEINTRIN_impCDSIN - ) -DEFSPEC (ZSQRT, - "ZSQRT", - TRUE, - FFEINTRIN_familyF2C, - FFEINTRIN_impCDSQRT - ) -DEFSPEC (NONE, - "none", - FALSE, - FFEINTRIN_familyNONE, - FFEINTRIN_impNONE - ) - -/* Intrinsic implementations ordered in two sections: - F77, then extensions; secondarily, alphabetical - ordering. */ - -/* The DEFIMP macro specifies the following fields for an intrinsic: - - CODE -- The internal name for this intrinsic; `FFEINTRIN_imp' - prepends this to form the `enum' name. - - NAME -- The textual name to use when printing information on - this intrinsic. - - GFRTDIRECT -- The run-time library routine that is suitable for - a call to implement a *direct* invocation of the - intrinsic (e.g. `ABS(10)'). - - GFRTF2C -- The run-time library routine that is suitable for - passing as an argument to a procedure that will - invoke the argument as an EXTERNAL procedure, when - f2c calling conventions will be used (e.g. - `CALL FOO(ABS)', when FOO compiled with -ff2c). - - GFRTGNU -- The run-time library routine that is suitable for - passing as an argument to a procedure that will - invoke the argument as an EXTERNAL procedure, when - GNU calling conventions will be used (e.g. - `CALL FOO(ABS)', when FOO compiled with -fno-f2c). - - CONTROL -- A control string, described below. - - The DEFIMPY macro specifies the above, plus: - - Y2KBAD -- TRUE if the intrinsic is known to be non-Y2K-compliant, - FALSE if it is known to be Y2K-compliant. (In terms of - interface and libg2c implementation.) - -*/ - -/* The control string has the following format: - - ::[,...] - - is: - - [] - - is: - - - Subroutine - A Character - C Complex - I Integer - L Logical - R Real - B Boolean (I or L), decided by co-operand list (COL) - F Floating-point (C or R), decided by COL - N Numeric (C, I, or R), decided by co-operand list (COL) - S Scalar numeric (I or R), decided by COL, which may be COMPLEX - - is: - - - Subroutine - = Decided by COL - 1 (Default) - 2 (Twice the size of 1) - 3 (Same size as CHARACTER*1) - 4 (Twice the size of 2) - 6 (Twice the size as 3) - 7 (Same size as `char *') - C Like 1 (F77), except (F90), if COL is COMPLEX, uses kind type of COL - - is: - - * Valid for of `A' only, means program may - declare any length for return value, default being (*) - - is: - - - - is: - - - No COL (return-base-type and return-kind-type must be definitive) - * All arguments form COL (must have more than one argument) - n Argument n (0 for first arg, 1 for second, etc.) forms COL - - is: - - =[][][][] - - is the standard keyword name for the argument. - - is: - - ? Argument is optional - ! Like ?, but argument must be omitted if previous arg was COMPLEX - + One or more of these arguments must be specified - * Zero or more of these arguments must be specified - n Numbered names for arguments, one or more must be specified - p Like n, but two or more must be specified - - is: - - - Any is valid (arg-kind-type is 0) - A Character*(*) - C Complex - I Integer - L Logical - R Real - B Boolean (I or L) - F Floating-point (C or R) - N Numeric (C, I, or R) - S Scalar numeric (I or R) - g GOTO label (alternate-return form of CALL) (arg-kind-type is 0) - s Signal handler (INTEGER FUNCTION, SUBROUTINE or dummy/global - default INTEGER variable) (arg-kind-type is 0) - - is: - - * Any is valid - 1 (Default) - 2 (Twice the size of 1) - 3 (Same size as CHARACTER*1) - 4 (Twice the size of 2) - 6 (Twice the size as 3) - A Same as first argument - N Not wider than the default kind - - is: - - (Default) CHARACTER*(*) - [n] CHARACTER*n - - is: - - (default) Rank-0 (variable or array element) - (n) Rank-1 array n elements long - & Any (arg-extra is &) - - is: - - (default) Arg is INTENT(IN) - i Arg's attributes are all that matter (inquiry function) - w Arg is INTENT(OUT) - x Arg is INTENT(INOUT) - & Arg can have its address taken (LOC(), for example) - -*/ - -DEFIMP (ABS, "ABS", ,ABS,, "S=:0:A=N*") -DEFIMP (ACOS, "ACOS", L_ACOS,ACOS,, "R=:0:X=R*") -DEFIMP (AIMAG, "AIMAG", ,AIMAG,, "RC:0:Z=C*") -DEFIMP (AINT, "AINT", ,AINT,, "R=:0:A=R*") -DEFIMP (ALOG, "ALOG", L_LOG,ALOG,, "R1:-:X=R1") -DEFIMP (ALOG10, "ALOG10", L_LOG10,ALOG10,,"R1:-:X=R1") -DEFIMP (AMAX0, "AMAX0", ,,, "R1:*:A=pI1") -DEFIMP (AMAX1, "AMAX1", ,,, "R1:*:A=pR1") -DEFIMP (AMIN0, "AMIN0", ,,, "R1:*:A=pI1") -DEFIMP (AMIN1, "AMIN1", ,,, "R1:*:A=pR1") -DEFIMP (AMOD, "AMOD", L_FMOD,AMOD,, "R1:*:A=R1,P=R1") -DEFIMP (ANINT, "ANINT", ,ANINT,, "R=:0:A=R*") -DEFIMP (ASIN, "ASIN", L_ASIN,ASIN,, "R=:0:X=R*") -DEFIMP (ATAN, "ATAN", L_ATAN,ATAN,, "R=:0:X=R*") -DEFIMP (ATAN2, "ATAN2", L_ATAN2,ATAN2,, "R=:*:Y=R*,X=R*") -DEFIMP (CABS, "CABS", ,CABS,, "R1:-:A=C1") -DEFIMP (CCOS, "CCOS", ,CCOS,, "C1:-:X=C1") -DEFIMP (CEXP, "CEXP", ,CEXP,, "C1:-:X=C1") -DEFIMP (CHAR, "CHAR", ,,, "A1:-:I=I*") -DEFIMP (CLOG, "CLOG", ,CLOG,, "C1:-:X=C1") -DEFIMP (CMPLX, "CMPLX", ,,, "C1:*:X=N*,Y=!S*") -DEFIMP (CONJG, "CONJG", ,CONJG,, "C=:0:Z=C*") -DEFIMP (COS, "COS", L_COS,COS,, "F=:0:X=F*") -DEFIMP (COSH, "COSH", L_COSH,COSH,, "R=:0:X=R*") -DEFIMP (CSIN, "CSIN", ,CSIN,, "C1:-:X=C1") -DEFIMP (CSQRT, "CSQRT", ,CSQRT,, "C1:-:X=C1") -DEFIMP (DABS, "DABS", ,DABS,, "R2:-:A=R2") -DEFIMP (DACOS, "DACOS", L_ACOS,DACOS,, "R2:-:X=R2") -DEFIMP (DASIN, "DASIN", L_ASIN,DASIN,, "R2:-:X=R2") -DEFIMP (DATAN, "DATAN", L_ATAN,DATAN,, "R2:-:X=R2") -DEFIMP (DATAN2, "DATAN2", L_ATAN2,DATAN2,,"R2:*:Y=R2,X=R2") -DEFIMP (DBLE, "DBLE", ,,, "R2:-:A=N*") -DEFIMP (DCMPLX, "DCMPLX", ,,, "C2:*:X=N*,Y=!S*") -DEFIMP (DCOS, "DCOS", L_COS,DCOS,, "R2:-:X=R2") -DEFIMP (DCOSH, "DCOSH", L_COSH,DCOSH,, "R2:-:X=R2") -DEFIMP (DDIM, "DDIM", ,DDIM,, "R2:*:X=R2,Y=R2") -DEFIMP (DEXP, "DEXP", L_EXP,DEXP,, "R2:-:X=R2") -DEFIMP (DIM, "DIM", ,DIM,, "S=:*:X=S*,Y=S*") -DEFIMP (DINT, "DINT", ,DINT,, "R2:-:A=R2") -DEFIMP (DLOG, "DLOG", L_LOG,DLOG,, "R2:-:X=R2") -DEFIMP (DLOG10, "DLOG10", L_LOG10,DLOG10,,"R2:-:X=R2") -DEFIMP (DMAX1, "DMAX1", ,,, "R2:*:A=pR2") -DEFIMP (DMIN1, "DMIN1", ,,, "R2:*:A=pR2") -DEFIMP (DMOD, "DMOD", L_FMOD,DMOD,, "R2:*:A=R2,P=R2") -DEFIMP (DNINT, "DNINT", ,DNINT,, "R2:-:A=R2") -DEFIMP (DPROD, "DPROD", ,DPROD,, "R2:*:X=R1,Y=R1") -DEFIMP (DSIGN, "DSIGN", ,DSIGN,, "R2:*:A=R2,B=R2") -DEFIMP (DSIN, "DSIN", L_SIN,DSIN,, "R2:-:X=R2") -DEFIMP (DSINH, "DSINH", L_SINH,DSINH,, "R2:-:X=R2") -DEFIMP (DSQRT, "DSQRT", L_SQRT,DSQRT,, "R2:-:X=R2") -DEFIMP (DTAN, "DTAN", L_TAN,DTAN,, "R2:-:X=R2") -DEFIMP (DTANH, "DTANH", L_TANH,DTANH,, "R2:-:X=R2") -DEFIMP (EXP, "EXP", L_EXP,EXP,, "F=:0:X=F*") -DEFIMP (FLOAT, "FLOAT", ,,, "R1:-:A=I*") -DEFIMP (IABS, "IABS", ,IABS,IABS, "I1:-:A=I1") -DEFIMP (ICHAR, "ICHAR", ,,, "I1:-:C=A*") -DEFIMP (IDIM, "IDIM", ,IDIM,IDIM, "I1:*:X=I1,Y=I1") -DEFIMP (IDINT, "IDINT", ,,, "I1:-:A=R2") -DEFIMP (IDNINT, "IDNINT", ,IDNINT,IDNINT, "I1:-:A=R2") -DEFIMP (IFIX, "IFIX", ,,, "I1:-:A=R1") -DEFIMP (INDEX, "INDEX", ,INDEX,INDEX, "I1:*:String=A*,Substring=A*") -DEFIMP (INT, "INT", ,,, "I1:-:A=N*") -DEFIMP (ISIGN, "ISIGN", ,ISIGN,ISIGN, "I1:*:A=I1,B=I1") -DEFIMP (LEN, "LEN", ,LEN,LEN, "I1:-:String=A*i") -DEFIMP (LGE, "LGE", ,LGE,LGE, "L1:*:String_A=A1,String_B=A1") -DEFIMP (LGT, "LGT", ,LGT,LGT, "L1:*:String_A=A1,String_B=A1") -DEFIMP (LLE, "LLE", ,LLE,LLE, "L1:*:String_A=A1,String_B=A1") -DEFIMP (LLT, "LLT", ,LLT,LLT, "L1:*:String_A=A1,String_B=A1") -DEFIMP (LOG, "LOG", L_LOG,ALOG,, "F=:0:X=F*") -DEFIMP (LOG10, "LOG10", L_LOG10,ALOG10,,"R=:0:X=R*") -DEFIMP (MAX, "MAX", ,,, "S=:*:A=pS*") -DEFIMP (MIN, "MIN", ,,, "S=:*:A=pS*") -DEFIMP (MAX0, "MAX0", ,,, "I1:*:A=pI1") -DEFIMP (MAX1, "MAX1", ,,, "I1:*:A=pR1") -DEFIMP (MIN0, "MIN0", ,,, "I1:*:A=pI1") -DEFIMP (MIN1, "MIN1", ,,, "I1:*:A=pR1") -DEFIMP (MOD, "MOD", ,MOD,MOD, "S=:*:A=S*,P=S*") -DEFIMP (NINT, "NINT", ,NINT,NINT, "I1:-:A=R*") -DEFIMP (REAL, "REAL", ,,, "RC:0:A=N*") -DEFIMP (SIGN, "SIGN", ,SIGN,, "S=:*:A=S*,B=S*") -DEFIMP (SIN, "SIN", L_SIN,SIN,, "F=:0:X=F*") -DEFIMP (SINH, "SINH", L_SINH,SINH,, "R=:0:X=R*") -DEFIMP (SNGL, "SNGL", ,,, "R1:-:A=R2") -DEFIMP (SQRT, "SQRT", L_SQRT,SQRT,, "F=:0:X=F*") -DEFIMP (TAN, "TAN", L_TAN,TAN,, "R=:0:X=R*") -DEFIMP (TANH, "TANH", L_TANH,TANH,, "R=:0:X=R*") - -DEFIMP (ABORT, "ABORT", ABORT,,, "--:-:") -DEFIMP (ACCESS, "ACCESS", ACCESS,,, "I1:-:Name=A1,Mode=A1") -DEFIMP (ACHAR, "ACHAR", ,,, "A1:-:I=I*") -DEFIMP (ALARM, "ALARM", ALARM,,, "--:-:Seconds=I*,Handler=s*,Status=?I1w") -DEFIMP (AND, "AND", ,,, "B=:*:I=B*,J=B*") -DEFIMP (BESJ0, "BESJ0", L_BESJ0,,, "R=:0:X=R*") -DEFIMP (BESJ1, "BESJ1", L_BESJ1,,, "R=:0:X=R*") -DEFIMP (BESJN, "BESJN", L_BESJN,,, "R=:1:N=IN,X=R*") -DEFIMP (BESY0, "BESY0", L_BESY0,,, "R=:0:X=R*") -DEFIMP (BESY1, "BESY1", L_BESY1,,, "R=:0:X=R*") -DEFIMP (BESYN, "BESYN", L_BESYN,,, "R=:1:N=IN,X=R*") -DEFIMP (BIT_SIZE, "BIT_SIZE", ,,, "I=:0:I=I*i") -DEFIMP (BTEST, "BTEST", ,,, "L1:*:I=I*,Pos=I*") -DEFIMP (CDABS, "CDABS", ,CDABS,, "R2:-:A=C2") -DEFIMP (CDCOS, "CDCOS", ,CDCOS,, "C2:-:X=C2") -DEFIMP (CDEXP, "CDEXP", ,CDEXP,, "C2:-:X=C2") -DEFIMP (CDLOG, "CDLOG", ,CDLOG,, "C2:-:X=C2") -DEFIMP (CDSIN, "CDSIN", ,CDSIN,, "C2:-:X=C2") -DEFIMP (CDSQRT, "CDSQRT", ,CDSQRT,, "C2:-:X=C2") -DEFIMP (CHDIR_func, "CHDIR_func", CHDIR,,, "I1:-:Dir=A1") -DEFIMP (CHDIR_subr, "CHDIR_subr", CHDIR,,, "--:-:Dir=A1,Status=?I1w") -DEFIMP (CHMOD_func, "CHMOD_func", CHMOD,,, "I1:-:Name=A1,Mode=A1") -DEFIMP (CHMOD_subr, "CHMOD_subr", CHMOD,,, "--:-:Name=A1,Mode=A1,Status=?I1w") -DEFIMP (COMPLEX, "COMPLEX", ,,, "C=:*:Real=S*,Imag=S*") -DEFIMP (CPU_TIME, "CPU_TIME", SECOND,,, "--:-:Seconds=R*w") -DEFIMP (CTIME_func, "CTIME_func", CTIME,,, "A1*:-:STime=I*") -DEFIMP (CTIME_subr, "CTIME_subr", CTIME,,, "--:-:STime=I*,Result=A1w") -DEFIMPY (DATE, "DATE", DATE,,, "--:-:Date=A1w", TRUE) -DEFIMP (DATE_AND_TIME, "DATE_AND_TIME", DATE_AND_TIME,,, "--:-:Date=A1w,Time=?A1w,Zone=?A1w,Values=?I1(8)w") -DEFIMP (DBESJ0, "DBESJ0", L_BESJ0,,, "R2:-:X=R2") -DEFIMP (DBESJ1, "DBESJ1", L_BESJ1,,, "R2:-:X=R2") -DEFIMP (DBESJN, "DBESJN", L_BESJN,,, "R2:-:N=IN,X=R2") -DEFIMP (DBESY0, "DBESY0", L_BESY0,,, "R2:-:X=R2") -DEFIMP (DBESY1, "DBESY1", L_BESY1,,, "R2:-:X=R2") -DEFIMP (DBESYN, "DBESYN", L_BESYN,,, "R2:-:N=IN,X=R2") -DEFIMP (DCONJG, "DCONJG", ,DCONJG,, "C2:-:Z=C2") -DEFIMP (DERF, "DERF", L_ERF,DERF,, "R2:-:X=R2") -DEFIMP (DERFC, "DERFC", L_ERFC,DERFC,, "R2:-:X=R2") -DEFIMP (DFLOAT, "DFLOAT", ,,, "R2:-:A=I*") -DEFIMP (DIMAG, "DIMAG", ,DIMAG,, "R2:-:Z=C2") -DEFIMP (DREAL, "DREAL", ,,, "R2:-:A=N*") -DEFIMP (DTIME_func, "DTIME_func", DTIME,,, "R1:-:TArray=R1(2)w") -DEFIMP (DTIME_subr, "DTIME_subr", DTIME,,, "--:-:TArray=R1(2)w,Result=R1w") -DEFIMP (ERF, "ERF", L_ERF,ERF,, "R=:0:X=R*") -DEFIMP (ERFC, "ERFC", L_ERFC,ERFC,, "R=:0:X=R*") -DEFIMP (ETIME_func, "ETIME_func", ETIME,,, "R1:-:TArray=R1(2)w") -DEFIMP (ETIME_subr, "ETIME_subr", ETIME,,, "--:-:TArray=R1(2)w,Result=R1w") -DEFIMP (EXIT, "EXIT", EXIT,,, "--:-:Status=?IN") -DEFIMP (FDATE_func, "FDATE_func", FDATE,,, "A1*:-:") -DEFIMP (FDATE_subr, "FDATE_subr", FDATE,,, "--:-:Date=A1w") -DEFIMP (FGET_func, "FGET_func", FGET,,, "I1:-:C=A1w") -DEFIMP (FGET_subr, "FGET_subr", FGET,,, "--:-:C=A1w,Status=?I1w") -DEFIMP (FGETC_func, "FGETC_func", FGETC,,, "I1:-:Unit=I*,C=A1w") -DEFIMP (FGETC_subr, "FGETC_subr", FGETC,,, "--:-:Unit=I*,C=A1w,Status=?I1w") -DEFIMP (FLUSH, "FLUSH", ,,, "--:-:Unit=?I*") -DEFIMP (FNUM, "FNUM", FNUM,,, "I1:-:Unit=I*") -DEFIMP (FPUT_func, "FPUT_func", FPUT,,, "I1:-:C=A1") -DEFIMP (FPUT_subr, "FPUT_subr", FPUT,,, "--:-:C=A1,Status=?I1w") -DEFIMP (FPUTC_func, "FPUTC_func", FPUTC,,, "I1:-:Unit=I*,C=A1") -DEFIMP (FPUTC_subr, "FPUTC_subr", FPUTC,,, "--:-:Unit=I*,C=A1,Status=?I1w") -DEFIMP (FSEEK, "FSEEK", FSEEK,,, "--:-:Unit=I*,Offset=I*,Whence=I*,ErrLab=?g*") -DEFIMP (FSTAT_func, "FSTAT_func", FSTAT,,, "I1:-:Unit=I*,SArray=I1(13)w") -DEFIMP (FSTAT_subr, "FSTAT_subr", FSTAT,,, "--:-:Unit=I*,SArray=I1(13)w,Status=?I1w") -DEFIMP (FTELL_func, "FTELL_func", FTELL,,, "I1:-:Unit=I*") -DEFIMP (FTELL_subr, "FTELL_subr", FTELL,,, "--:-:Unit=I*,Offset=I1w") -DEFIMP (GERROR, "GERROR", GERROR,,, "--:-:Message=A1w") -DEFIMP (GETARG, "GETARG", GETARG,,, "--:-:Pos=IN,Value=A1w") -DEFIMP (GETCWD_func, "GETCWD_func", GETCWD,,, "I1:-:Name=A1w") -DEFIMP (GETCWD_subr, "GETCWD_subr", GETCWD,,, "--:-:Name=A1w,Status=?I1w") -DEFIMP (GETGID, "GETGID", GETGID,,, "I1:-:") -DEFIMP (GETLOG, "GETLOG", GETLOG,,, "--:-:Login=A1w") -DEFIMP (GETPID, "GETPID", GETPID,,, "I1:-:") -DEFIMP (GETUID, "GETUID", GETUID,,, "I1:-:") -DEFIMP (GETENV, "GETENV", GETENV,,, "--:-:Name=A1,Value=A1w") -DEFIMP (GMTIME, "GMTIME", GMTIME,,, "--:-:STime=I1,TArray=I1(9)w") -DEFIMP (HOSTNM_func, "HOSTNM_func", HOSTNM,,, "I1:-:Name=A1w") -DEFIMP (HOSTNM_subr, "HOSTNM_subr", HOSTNM,,, "--:-:Name=A1w,Status=?I1w") -DEFIMP (IACHAR, "IACHAR", ,,, "I1:-:C=A*") -DEFIMP (IAND, "IAND", ,,, "I=:*:I=I*,J=I*") -DEFIMP (IARGC, "IARGC", IARGC,,, "I1:-:") -DEFIMP (IBCLR, "IBCLR", ,,, "I=:0:I=I*,Pos=I*") -DEFIMP (IBITS, "IBITS", ,,, "I=:0:I=I*,Pos=I*,Len=I*") -DEFIMP (IBSET, "IBSET", ,,, "I=:0:I=I*,Pos=I*") -DEFIMP (IDATE_unix, "IDATE_unix", IDATE,,, "--:-:TArray=I1(3)w") -DEFIMPY (IDATE_vxt, "IDATE_vxt", VXTIDATE,,, "--:-:M=I1w,D=I1w,Y=I1w", TRUE) -DEFIMP (IEOR, "IEOR", ,,, "I=:*:I=I*,J=I*") -DEFIMP (IOR, "IOR", ,,, "I=:*:I=I*,J=I*") -DEFIMP (IERRNO, "IERRNO", IERRNO,,, "I1:-:") -DEFIMP (IMAGPART, "IMAGPART", ,,, "R=:0:Z=C*") -DEFIMP (INT2, "INT2", ,,, "I6:-:A=N*") -DEFIMP (INT8, "INT8", ,,, "I2:-:A=N*") -DEFIMP (IRAND, "IRAND", IRAND,,, "I1:-:Flag=?I*") -DEFIMP (ISATTY, "ISATTY", ISATTY,,, "L1:-:Unit=I*") -DEFIMP (ISHFT, "ISHFT", ,,, "I=:0:I=I*,Shift=I*") -DEFIMP (ISHFTC, "ISHFTC", ,,, "I=:0:I=I*,Shift=I*,Size=I*") -DEFIMP (ITIME, "ITIME", ITIME,,, "--:-:TArray=I1(3)w") -DEFIMP (KILL_func, "KILL_func", KILL,,, "I1:-:Pid=I*,Signal=I*") -DEFIMP (KILL_subr, "KILL_subr", KILL,,, "--:-:Pid=I*,Signal=I*,Status=?I1w") -DEFIMP (LINK_func, "LINK_func", LINK,,, "I1:-:Path1=A1,Path2=A1") -DEFIMP (LINK_subr, "LINK_subr", LINK,,, "--:-:Path1=A1,Path2=A1,Status=?I1w") -DEFIMP (LNBLNK, "LNBLNK", LNBLNK,,, "I1:-:String=A1") -DEFIMP (LONG, "LONG", ,,, "I1:-:A=I6") -DEFIMP (LSTAT_func, "LSTAT_func", LSTAT,,, "I1:-:File=A1,SArray=I1(13)w") -DEFIMP (LSTAT_subr, "LSTAT_subr", LSTAT,,, "--:-:File=A1,SArray=I1(13)w,Status=?I1w") -DEFIMP (LTIME, "LTIME", LTIME,,, "--:-:STime=I1,TArray=I1(9)w") -DEFIMP (LOC, "LOC", ,,, "I7:-:Entity=-*&&") -DEFIMP (LSHIFT, "LSHIFT", ,,, "I=:0:I=I*,Shift=I*") -DEFIMP (MCLOCK, "MCLOCK", MCLOCK,,, "I1:-:") -DEFIMP (MCLOCK8, "MCLOCK8", MCLOCK,,, "I2:-:") -DEFIMP (MVBITS, "MVBITS", ,,, "--:-:From=I*,FromPos=I*,Len=I*,TO=IAx,ToPos=I*") -DEFIMP (NOT, "NOT", ,,, "I=:0:I=I*") -DEFIMP (OR, "OR", ,,, "B=:*:I=B*,J=B*") -DEFIMP (PERROR, "PERROR", PERROR,,, "--:-:String=A1") -DEFIMP (RAND, "RAND", RAND,,, "R1:-:Flag=?I*") -DEFIMP (REALPART, "REALPART", ,,, "R=:0:Z=C*") -DEFIMP (RENAME_func, "RENAME_func", RENAME,,, "I1:-:Path1=A1,Path2=A1") -DEFIMP (RENAME_subr, "RENAME_subr", RENAME,,, "--:-:Path1=A1,Path2=A1,Status=?I1w") -DEFIMP (RSHIFT, "RSHIFT", ,,, "I=:0:I=I*,Shift=I*") -DEFIMP (SECNDS, "SECNDS", SECNDS,,, "R1:-:T=R1") -DEFIMP (SECOND_func, "SECOND_func", SECOND,SECOND,, "R1:-:") -DEFIMP (SECOND_subr, "SECOND_subr", SECOND,,, "--:-:Seconds=R*w") -DEFIMP (SHORT, "SHORT", ,,, "I6:-:A=I*") -DEFIMP (SIGNAL_func, "SIGNAL_func", L_SIGNAL,,, "I7:-:Number=I*,Handler=s*") -DEFIMP (SIGNAL_subr, "SIGNAL_subr", L_SIGNAL,,, "--:-:Number=I*,Handler=s*,Status=?I7w") -DEFIMP (SLEEP, "SLEEP", SLEEP,,, "--:-:Seconds=I1") -DEFIMP (SRAND, "SRAND", SRAND,,, "--:-:Seed=I*") -DEFIMP (STAT_func, "STAT_func", STAT,,, "I1:-:File=A1,SArray=I1(13)w") -DEFIMP (STAT_subr, "STAT_subr", STAT,,, "--:-:File=A1,SArray=I1(13)w,Status=?I1w") -DEFIMP (SYMLNK_func, "SYMLNK_func", SYMLNK,,, "I1:-:Path1=A1,Path2=A1") -DEFIMP (SYMLNK_subr, "SYMLNK_subr", SYMLNK,,, "--:-:Path1=A1,Path2=A1,Status=?I1w") -DEFIMP (SYSTEM_func, "SYSTEM_func", SYSTEM,SYSTEM,SYSTEM,"I1:-:Command=A1") -DEFIMP (SYSTEM_subr, "SYSTEM_subr", SYSTEM,,, "--:-:Command=A1,Status=?I1w") -DEFIMP (SYSTEM_CLOCK, "SYSTEM_CLOCK", SYSTEM_CLOCK,,, "--:-:Count=I1w,Rate=?I1w,Max=?I1w") -DEFIMP (TIME8, "TIME8", TIME,,, "I2:-:") -DEFIMP (TIME_unix, "TIME_unix", TIME,,, "I1:-:") -DEFIMP (TIME_vxt, "TIME_vxt", VXTTIME,,, "--:-:Time=A1[8]w") -DEFIMP (TTYNAM_func, "TTYNAM_func", TTYNAM,,, "A1*:-:Unit=I*") -DEFIMP (TTYNAM_subr, "TTYNAM_subr", TTYNAM,,, "--:-:Unit=I*,Name=A1w") -DEFIMP (UMASK_func, "UMASK_func", UMASK,,, "I1:-:Mask=I*") -DEFIMP (UMASK_subr, "UMASK_subr", UMASK,,, "--:-:Mask=I*,Old=?I1w") -DEFIMP (UNLINK_func, "UNLINK_func", UNLINK,,, "I1:-:File=A1") -DEFIMP (UNLINK_subr, "UNLINK_subr", UNLINK,,, "--:-:File=A1,Status=?I1w") -DEFIMP (XOR, "XOR", ,,, "B=:*:I=B*,J=B*") -DEFIMP (NONE, "none", ,,, "") diff --git a/contrib/gcc/f/intrin.h b/contrib/gcc/f/intrin.h deleted file mode 100644 index e741e69..0000000 --- a/contrib/gcc/f/intrin.h +++ /dev/null @@ -1,135 +0,0 @@ -/* intrin.h -- Public interface for intrin.c - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - -*/ - -#ifndef GCC_F_INTRIN_H -#define GCC_F_INTRIN_H - -#ifndef FFEINTRIN_DOC -#define FFEINTRIN_DOC 0 /* 1 means intrinsic documentation only (intdoc.c). */ -#endif - -typedef enum - { - FFEINTRIN_familyNONE, /* Not in any family. */ - FFEINTRIN_familyF77, /* ANSI FORTRAN 77. */ - FFEINTRIN_familyGNU, /* GNU Fortran intrinsics. */ - FFEINTRIN_familyF2C, /* f2c intrinsics. */ - FFEINTRIN_familyF90, /* Fortran 90. */ - FFEINTRIN_familyF95 = FFEINTRIN_familyF90, - FFEINTRIN_familyVXT, /* VAX/VMS FORTRAN. */ - FFEINTRIN_familyMIL, /* MIL STD 1753 (MVBITS, etc), in mil, vxt, and f90. */ - FFEINTRIN_familyASC, /* ASCII-related (ACHAR, IACHAR), both f2c and f90. */ - FFEINTRIN_familyFVZ, /* in both f2c and VAX/VMS FORTRAN. */ - FFEINTRIN_familyF2U, /* libf2c/libU77 UNIX system intrinsics. */ - FFEINTRIN_familyBADU77, /* libU77 UNIX system intrinsics with bad form. */ - FFEINTRIN_family - } ffeintrinFamily; - -typedef enum - { -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) FFEINTRIN_gen ## CODE, -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY - FFEINTRIN_gen - } ffeintrinGen; - -typedef enum - { -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) FFEINTRIN_spec ## CODE, -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY - FFEINTRIN_spec - } ffeintrinSpec; - -typedef enum - { -#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC) -#define DEFGEN(CODE,NAME,SPEC1,SPEC2) -#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) -#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \ - FFEINTRIN_imp ## CODE, -#define DEFIMPY(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL,Y2KBAD) \ - FFEINTRIN_imp ## CODE, -#include "intrin.def" -#undef DEFNAME -#undef DEFGEN -#undef DEFSPEC -#undef DEFIMP -#undef DEFIMPY - FFEINTRIN_imp - } ffeintrinImp; - -#if !FFEINTRIN_DOC - -#include "bld.h" -#include "info.h" - -ffeinfoBasictype ffeintrin_basictype (ffeintrinSpec spec); -ffeintrinFamily ffeintrin_family (ffeintrinSpec spec); -void ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t); -void ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info, - bool *check_intrin, ffelexToken t); -ffecomGfrt ffeintrin_gfrt_direct (ffeintrinImp imp); -ffecomGfrt ffeintrin_gfrt_indirect (ffeintrinImp imp); -void ffeintrin_init_0 (void); -#define ffeintrin_init_1() -#define ffeintrin_init_2() -#define ffeintrin_init_3() -#define ffeintrin_init_4() -bool ffeintrin_is_actualarg (ffeintrinSpec spec); -bool ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit, - ffeintrinGen *gen, ffeintrinSpec *spec, - ffeintrinImp *imp); -bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec); -ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec); -const char *ffeintrin_name_generic (ffeintrinGen gen); -const char *ffeintrin_name_implementation (ffeintrinImp imp); -const char *ffeintrin_name_specific (ffeintrinSpec spec); -ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family); -#define ffeintrin_terminate_0() -#define ffeintrin_terminate_1() -#define ffeintrin_terminate_2() -#define ffeintrin_terminate_3() -#define ffeintrin_terminate_4() - -#endif /* !FFEINTRIN_DOC */ - -/* End of #include file. */ - -#endif /* ! GCC_F_INTRIN_H */ diff --git a/contrib/gcc/f/invoke.texi b/contrib/gcc/f/invoke.texi deleted file mode 100644 index fd1b804..0000000 --- a/contrib/gcc/f/invoke.texi +++ /dev/null @@ -1,2233 +0,0 @@ -@c Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 -@c Free Software Foundation, Inc. -@c This is part of the G77 manual. -@c For copying conditions, see the file g77.texi. - -@ignore -@c man begin COPYRIGHT -Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 -Free Software Foundation, Inc. - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with the -Invariant Sections being ``GNU General Public License'' and ``Funding -Free Software'', the Front-Cover texts being (a) (see below), and with -the Back-Cover Texts being (b) (see below). A copy of the license is -included in the gfdl(7) man page. - -(a) The FSF's Front-Cover Text is: - - A GNU Manual - -(b) The FSF's Back-Cover Text is: - - You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development. -@c man end -@c Set file name and title for the man page. -@setfilename g77 -@settitle GNU project Fortran 77 compiler. -@c man begin SYNOPSIS -g77 [@option{-c}|@option{-S}|@option{-E}] - [@option{-g}] [@option{-pg}] [@option{-O}@var{level}] - [@option{-W}@var{warn}@dots{}] [@option{-pedantic}] - [@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}] - [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-f}@var{option}@dots{}] [@option{-m}@var{machine-option}@dots{}] - [@option{-o} @var{outfile}] @var{infile}@dots{} - -Only the most useful options are listed here; see below for the -remainder. -@c man end -@c man begin SEEALSO -gpl(7), gfdl(7), fsf-funding(7), -cpp(1), gcov(1), gcc(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1) -and the Info entries for @file{gcc}, @file{cpp}, @file{g77}, @file{as}, -@file{ld}, @file{binutils} and @file{gdb}. -@c man end -@c man begin BUGS -For instructions on reporting bugs, see -@w{@uref{http://gcc.gnu.org/bugs.html}}. Use of the @command{gccbug} -script to report bugs is recommended. -@c man end -@c man begin AUTHOR -See the Info entry for @command{g77} for contributors to GCC and G77@. -@c man end -@end ignore - -@node Invoking G77 -@chapter GNU Fortran Command Options -@cindex GNU Fortran command options -@cindex command options -@cindex options, GNU Fortran command - -@c man begin DESCRIPTION - -The @command{g77} command supports all the options supported by the -@command{gcc} command. -@xref{Invoking GCC,,GCC Command Options,gcc,Using the GNU Compiler -Collection (GCC)}, for information -on the non-Fortran-specific aspects of the @command{gcc} command (and, -therefore, the @command{g77} command). - -@cindex options, negative forms -@cindex negative forms of options -All @command{gcc} and @command{g77} options -are accepted both by @command{g77} and by @command{gcc} -(as well as any other drivers built at the same time, -such as @command{g++}), -since adding @command{g77} to the @command{gcc} distribution -enables acceptance of @command{g77} options -by all of the relevant drivers. - -In some cases, options have positive and negative forms; -the negative form of @option{-ffoo} would be @option{-fno-foo}. -This manual documents only one of these two forms, whichever -one is not the default. - -@c man end - -@menu -* Option Summary:: Brief list of all @command{g77} options, - without explanations. -* Overall Options:: Controlling the kind of output: - an executable, object files, assembler files, - or preprocessed source. -* Shorthand Options:: Options that are shorthand for other options. -* Fortran Dialect Options:: Controlling the variant of Fortran language - compiled. -* Warning Options:: How picky should the compiler be? -* Debugging Options:: Symbol tables, measurements, and debugging dumps. -* Optimize Options:: How much optimization? -* Preprocessor Options:: Controlling header files and macro definitions. - Also, getting dependency information for Make. -* Directory Options:: Where to find header files and libraries. - Where to find the compiler executable files. -* Code Gen Options:: Specifying conventions for function calls, data layout - and register usage. -* Environment Variables:: Env vars that affect GNU Fortran. -@end menu - -@node Option Summary -@section Option Summary - -@c man begin OPTIONS - -Here is a summary of all the options specific to GNU Fortran, grouped -by type. Explanations are in the following sections. - -@table @emph -@item Overall Options -@xref{Overall Options,,Options Controlling the Kind of Output}. -@gccoptlist{ --fversion -fset-g77-defaults -fno-silent} - -@item Shorthand Options -@xref{Shorthand Options}. -@gccoptlist{ --ff66 -fno-f66 -ff77 -fno-f77 -fno-ugly} - -@item Fortran Language Options -@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}. -@gccoptlist{ --ffree-form -fno-fixed-form -ff90 @gol --fvxt -fdollar-ok -fno-backslash @gol --fno-ugly-args -fno-ugly-assign -fno-ugly-assumed @gol --fugly-comma -fugly-complex -fugly-init -fugly-logint @gol --fonetrip -ftypeless-boz @gol --fintrin-case-initcap -fintrin-case-upper @gol --fintrin-case-lower -fintrin-case-any @gol --fmatch-case-initcap -fmatch-case-upper @gol --fmatch-case-lower -fmatch-case-any @gol --fsource-case-upper -fsource-case-lower @gol --fsource-case-preserve @gol --fsymbol-case-initcap -fsymbol-case-upper @gol --fsymbol-case-lower -fsymbol-case-any @gol --fcase-strict-upper -fcase-strict-lower @gol --fcase-initcap -fcase-upper -fcase-lower -fcase-preserve @gol --ff2c-intrinsics-delete -ff2c-intrinsics-hide @gol --ff2c-intrinsics-disable -ff2c-intrinsics-enable @gol --fbadu77-intrinsics-delete -fbadu77-intrinsics-hide @gol --fbadu77-intrinsics-disable -fbadu77-intrinsics-enable @gol --ff90-intrinsics-delete -ff90-intrinsics-hide @gol --ff90-intrinsics-disable -ff90-intrinsics-enable @gol --fgnu-intrinsics-delete -fgnu-intrinsics-hide @gol --fgnu-intrinsics-disable -fgnu-intrinsics-enable @gol --fmil-intrinsics-delete -fmil-intrinsics-hide @gol --fmil-intrinsics-disable -fmil-intrinsics-enable @gol --funix-intrinsics-delete -funix-intrinsics-hide @gol --funix-intrinsics-disable -funix-intrinsics-enable @gol --fvxt-intrinsics-delete -fvxt-intrinsics-hide @gol --fvxt-intrinsics-disable -fvxt-intrinsics-enable @gol --ffixed-line-length-@var{n} -ffixed-line-length-none} - -@item Warning Options -@xref{Warning Options,,Options to Request or Suppress Warnings}. -@gccoptlist{ --fsyntax-only -pedantic -pedantic-errors -fpedantic @gol --w -Wno-globals -Wimplicit -Wunused -Wuninitialized @gol --Wall -Wsurprising @gol --Werror -W} - -@item Debugging Options -@xref{Debugging Options,,Options for Debugging Your Program or GCC}. -@gccoptlist{ --g} - -@item Optimization Options -@xref{Optimize Options,,Options that Control Optimization}. -@gccoptlist{ --malign-double @gol --ffloat-store -fforce-mem -fforce-addr -fno-inline @gol --ffast-math -fstrength-reduce -frerun-cse-after-loop @gol --funsafe-math-optimizations -ffinite-math-only -fno-trapping-math @gol --fexpensive-optimizations -fdelayed-branch @gol --fschedule-insns -fschedule-insn2 -fcaller-saves @gol --funroll-loops -funroll-all-loops @gol --fno-move-all-movables -fno-reduce-all-givs @gol --fno-rerun-loop-opt} - -@item Directory Options -@xref{Directory Options,,Options for Directory Search}. -@gccoptlist{ --I@var{dir} -I-} - -@item Code Generation Options -@xref{Code Gen Options,,Options for Code Generation Conventions}. -@gccoptlist{ --fno-automatic -finit-local-zero -fno-f2c @gol --ff2c-library -fno-underscoring -fno-ident @gol --fpcc-struct-return -freg-struct-return @gol --fshort-double -fno-common -fpack-struct @gol --fzeros -fno-second-underscore @gol --femulate-complex @gol --falias-check -fargument-alias @gol --fargument-noalias -fno-argument-noalias-global @gol --fno-globals -fflatten-arrays @gol --fbounds-check -ffortran-bounds-check} -@end table - -@c man end - -@menu -* Overall Options:: Controlling the kind of output: - an executable, object files, assembler files, - or preprocessed source. -* Shorthand Options:: Options that are shorthand for other options. -* Fortran Dialect Options:: Controlling the variant of Fortran language - compiled. -* Warning Options:: How picky should the compiler be? -* Debugging Options:: Symbol tables, measurements, and debugging dumps. -* Optimize Options:: How much optimization? -* Preprocessor Options:: Controlling header files and macro definitions. - Also, getting dependency information for Make. -* Directory Options:: Where to find header files and libraries. - Where to find the compiler executable files. -* Code Gen Options:: Specifying conventions for function calls, data layout - and register usage. -@end menu - -@node Overall Options -@section Options Controlling the Kind of Output -@cindex overall options -@cindex options, overall - -@c man begin OPTIONS - -Compilation can involve as many as four stages: preprocessing, code -generation (often what is really meant by the term ``compilation''), -assembly, and linking, always in that order. The first three -stages apply to an individual source file, and end by producing an -object file; linking combines all the object files (those newly -compiled, and those specified as input) into an executable file. - -@cindex file name suffix -@cindex suffixes, file name -@cindex file name extension -@cindex extensions, file name -@cindex file type -@cindex types, file -For any given input file, the file name suffix determines what kind of -program is contained in the file---that is, the language in which the -program is written is generally indicated by the suffix. -Suffixes specific to GNU Fortran are listed below. -@xref{Overall Options,,Options Controlling the Kind of -Output,gcc,Using the GNU Compiler Collection (GCC)}, for -information on suffixes recognized by GCC. - -@table @gcctabopt -@cindex .f filename suffix -@cindex .for filename suffix -@cindex .FOR filename suffix -@item @var{file}.f -@item @var{file}.for -@item @var{file}.FOR -Fortran source code that should not be preprocessed. - -Such source code cannot contain any preprocessor directives, such -as @code{#include}, @code{#define}, @code{#if}, and so on. - -You can force @samp{.f} files to be preprocessed by @command{cpp} by using -@option{-x f77-cpp-input}. -@xref{LEX}. - -@cindex preprocessor -@cindex C preprocessor -@cindex cpp preprocessor -@cindex Fortran preprocessor -@cindex cpp program -@cindex programs, cpp -@cindex .F filename suffix -@cindex .fpp filename suffix -@cindex .FPP filename suffix -@item @var{file}.F -@item @var{file}.fpp -@item @var{file}.FPP -Fortran source code that must be preprocessed (by the C preprocessor -@command{cpp}, which is part of GCC). - -Note that preprocessing is not extended to the contents of -files included by the @code{INCLUDE} directive---the @code{#include} -preprocessor directive must be used instead. - -@cindex Ratfor preprocessor -@cindex programs, @command{ratfor} -@cindex @samp{.r} filename suffix -@cindex @command{ratfor} -@item @var{file}.r -Ratfor source code, which must be preprocessed by the @command{ratfor} -command, which is available separately (as it is not yet part of the GNU -Fortran distribution). -A public domain version in C is at -@uref{http://sepwww.stanford.edu/sep/prof/ratfor.shar.2}. -@end table - -UNIX users typically use the @file{@var{file}.f} and @file{@var{file}.F} -nomenclature. -Users of other operating systems, especially those that cannot -distinguish upper-case -letters from lower-case letters in their file names, typically use -the @file{@var{file}.for} and @file{@var{file}.fpp} nomenclature. - -@cindex #define -@cindex #include -@cindex #if -Use of the preprocessor @command{cpp} allows use of C-like -constructs such as @code{#define} and @code{#include}, but can -lead to unexpected, even mistaken, results due to Fortran's source file -format. -It is recommended that use of the C preprocessor -be limited to @code{#include} and, in -conjunction with @code{#define}, only @code{#if} and related directives, -thus avoiding in-line macro expansion entirely. -This recommendation applies especially -when using the traditional fixed source form. -With free source form, -fewer unexpected transformations are likely to happen, but use of -constructs such as Hollerith and character constants can nevertheless -present problems, especially when these are continued across multiple -source lines. -These problems result, primarily, from differences between the way -such constants are interpreted by the C preprocessor and by a Fortran -compiler. - -Another example of a problem that results from using the C preprocessor -is that a Fortran comment line that happens to contain any -characters ``interesting'' to the C preprocessor, -such as a backslash at the end of the line, -is not recognized by the preprocessor as a comment line, -so instead of being passed through ``raw'', -the line is edited according to the rules for the preprocessor. -For example, the backslash at the end of the line is removed, -along with the subsequent newline, resulting in the next -line being effectively commented out---unfortunate if that -line is a non-comment line of important code! - -@emph{Note:} The @option{-traditional} and @option{-undef} flags are supplied -to @command{cpp} by default, to help avoid unpleasant surprises. -@xref{Preprocessor Options,,Options Controlling the Preprocessor, -gcc,Using the GNU Compiler Collection (GCC)}. -This means that ANSI C preprocessor features (such as the @samp{#} -operator) aren't available, and only variables in the C reserved -namespace (generally, names with a leading underscore) are liable to -substitution by C predefines. -Thus, if you want to do system-specific -tests, use, for example, @samp{#ifdef __linux__} rather than @samp{#ifdef linux}. -Use the @option{-v} option to see exactly how the preprocessor is invoked. - -@cindex /* -Unfortunately, the @option{-traditional} flag will not avoid an error from -anything that @command{cpp} sees as an unterminated C comment, such as: -@smallexample -C Some Fortran compilers accept /* as starting -C an inline comment. -@end smallexample -@xref{Trailing Comment}. - -The following options that affect overall processing are recognized -by the @command{g77} and @command{gcc} commands in a GNU Fortran installation: - -@table @gcctabopt -@cindex -fversion option -@cindex options, -fversion -@cindex printing version information -@cindex version information, printing -@cindex consistency checks -@cindex internal consistency checks -@cindex checks, of internal consistency -@item -fversion -Ensure that the @command{g77} version of the compiler phase is reported, -if run, -and, starting in @code{egcs} version 1.1, -that internal consistency checks in the @file{f771} program are run. - -This option is supplied automatically when @option{-v} or @option{--verbose} -is specified as a command-line option for @command{g77} or @command{gcc} -and when the resulting commands compile Fortran source files. - -In GCC 3.1, this is changed back to the behavior @command{gcc} displays -for @samp{.c} files. - -@cindex -fset-g77-defaults option -@cindex options, -fset-g77-defaults -@item -fset-g77-defaults -@emph{Version info:} -This option was obsolete as of @code{egcs} -version 1.1. -The effect is instead achieved -by the @code{lang_init_options} routine -in @file{gcc/gcc/f/com.c}. - -@cindex consistency checks -@cindex internal consistency checks -@cindex checks, of internal consistency -Set up whatever @command{gcc} options are to apply to Fortran -compilations, and avoid running internal consistency checks -that might take some time. - -This option is supplied automatically when compiling Fortran code -via the @command{g77} or @command{gcc} command. -The description of this option is provided so that users seeing -it in the output of, say, @samp{g77 -v} understand why it is -there. - -@cindex modifying @command{g77} -@cindex @command{g77}, modifying -Also, developers who run @code{f771} directly might want to specify it -by hand to get the same defaults as they would running @code{f771} -via @command{g77} or @command{gcc} -However, such developers should, after linking a new @code{f771} -executable, invoke it without this option once, -e.g. via @kbd{./f771 -quiet < /dev/null}, -to ensure that they have not introduced any -internal inconsistencies (such as in the table of -intrinsics) before proceeding---@command{g77} will crash -with a diagnostic if it detects an inconsistency. - -@cindex -fno-silent option -@cindex options, -fno-silent -@cindex f2c compatibility -@cindex compatibility, f2c -@cindex status, compilation -@cindex compilation, status -@cindex reporting compilation status -@cindex printing compilation status -@item -fno-silent -Print (to @code{stderr}) the names of the program units as -they are compiled, in a form similar to that used by popular -UNIX @command{f77} implementations and @command{f2c} -@end table - -@xref{Overall Options,,Options Controlling the Kind of Output, -gcc,Using the GNU Compiler Collection (GCC)}, for information -on more options that control the overall operation of the @command{gcc} command -(and, by extension, the @command{g77} command). - -@node Shorthand Options -@section Shorthand Options -@cindex shorthand options -@cindex options, shorthand -@cindex macro options -@cindex options, macro - -The following options serve as ``shorthand'' -for other options accepted by the compiler: - -@table @gcctabopt -@cindex -fugly option -@cindex options, -fugly -@item -fugly -@cindex ugly features -@cindex features, ugly -@emph{Note:} This option is no longer supported. -The information, below, is provided to aid -in the conversion of old scripts. - -Specify that certain ``ugly'' constructs are to be quietly accepted. -Same as: - -@smallexample --fugly-args -fugly-assign -fugly-assumed --fugly-comma -fugly-complex -fugly-init --fugly-logint -@end smallexample - -These constructs are considered inappropriate to use in new -or well-maintained portable Fortran code, but widely used -in old code. -@xref{Distensions}, for more information. - -@cindex -fno-ugly option -@cindex options, -fno-ugly -@item -fno-ugly -@cindex ugly features -@cindex features, ugly -Specify that all ``ugly'' constructs are to be noisily rejected. -Same as: - -@smallexample --fno-ugly-args -fno-ugly-assign -fno-ugly-assumed --fno-ugly-comma -fno-ugly-complex -fno-ugly-init --fno-ugly-logint -@end smallexample - -@xref{Distensions}, for more information. - -@cindex -ff66 option -@cindex options, -ff66 -@item -ff66 -@cindex FORTRAN 66 -@cindex compatibility, FORTRAN 66 -Specify that the program is written in idiomatic FORTRAN 66. -Same as @samp{-fonetrip -fugly-assumed}. - -The @option{-fno-f66} option is the inverse of @option{-ff66}. -As such, it is the same as @samp{-fno-onetrip -fno-ugly-assumed}. - -The meaning of this option is likely to be refined as future -versions of @command{g77} provide more compatibility with other -existing and obsolete Fortran implementations. - -@cindex -ff77 option -@cindex options, -ff77 -@item -ff77 -@cindex UNIX f77 -@cindex f2c compatibility -@cindex compatibility, f2c -@cindex f77 compatibility -@cindex compatibility, f77 -Specify that the program is written in idiomatic UNIX FORTRAN 77 -and/or the dialect accepted by the @command{f2c} product. -Same as @samp{-fbackslash -fno-typeless-boz}. - -The meaning of this option is likely to be refined as future -versions of @command{g77} provide more compatibility with other -existing and obsolete Fortran implementations. - -@cindex -fno-f77 option -@cindex options, -fno-f77 -@item -fno-f77 -@cindex UNIX f77 -The @option{-fno-f77} option is @emph{not} the inverse -of @option{-ff77}. -It specifies that the program is not written in idiomatic UNIX -FORTRAN 77 or @command{f2c} but in a more widely portable dialect. -@option{-fno-f77} is the same as @option{-fno-backslash}. - -The meaning of this option is likely to be refined as future -versions of @command{g77} provide more compatibility with other -existing and obsolete Fortran implementations. -@end table - -@node Fortran Dialect Options -@section Options Controlling Fortran Dialect -@cindex dialect options -@cindex language, dialect options -@cindex options, dialect - -The following options control the dialect of Fortran -that the compiler accepts: - -@table @gcctabopt -@cindex -ffree-form option -@cindex options, -ffree-form -@cindex -fno-fixed-form option -@cindex options, -fno-fixed-form -@cindex source file format -@cindex free form -@cindex fixed form -@cindex Fortran 90, features -@item -ffree-form -@item -fno-fixed-form -Specify that the source file is written in free form -(introduced in Fortran 90) instead of the more-traditional fixed form. - -@cindex -ff90 option -@cindex options, -ff90 -@cindex Fortran 90, features -@item -ff90 -Allow certain Fortran-90 constructs. - -This option controls whether certain -Fortran 90 constructs are recognized. -(Other Fortran 90 constructs -might or might not be recognized depending on other options such as -@option{-fvxt}, @option{-ff90-intrinsics-enable}, and the -current level of support for Fortran 90.) - -@xref{Fortran 90}, for more information. - -@cindex -fvxt option -@cindex options, -fvxt -@item -fvxt -@cindex Fortran 90, features -@cindex VXT extensions -Specify the treatment of certain constructs that have different -meanings depending on whether the code is written in -GNU Fortran (based on FORTRAN 77 and akin to Fortran 90) -or VXT Fortran (more like VAX FORTRAN). - -The default is @option{-fno-vxt}. -@option{-fvxt} specifies that the VXT Fortran interpretations -for those constructs are to be chosen. - -@xref{VXT Fortran}, for more information. - -@cindex -fdollar-ok option -@cindex options, -fdollar-ok -@item -fdollar-ok -@cindex dollar sign -@cindex symbol names -@cindex character set -Allow @samp{$} as a valid character in a symbol name. - -@cindex -fno-backslash option -@cindex options, -fno-backslash -@item -fno-backslash -@cindex backslash -@cindex character constants -@cindex Hollerith constants -Specify that @samp{\} is not to be specially interpreted in character -and Hollerith constants a la C and many UNIX Fortran compilers. - -For example, with @option{-fbackslash} in effect, @samp{A\nB} specifies -three characters, with the second one being newline. -With @option{-fno-backslash}, it specifies four characters, -@samp{A}, @samp{\}, @samp{n}, and @samp{B}. - -Note that @command{g77} implements a fairly general form of backslash -processing that is incompatible with the narrower forms supported -by some other compilers. -For example, @samp{'A\003B'} is a three-character string in @command{g77} -whereas other compilers that support backslash might not support -the three-octal-digit form, and thus treat that string as longer -than three characters. - -@xref{Backslash in Constants}, for -information on why @option{-fbackslash} is the default -instead of @option{-fno-backslash}. - -@cindex -fno-ugly-args option -@cindex options, -fno-ugly-args -@item -fno-ugly-args -Disallow passing Hollerith and typeless constants as actual -arguments (for example, @samp{CALL FOO(4HABCD)}). - -@xref{Ugly Implicit Argument Conversion}, for more information. - -@cindex -fugly-assign option -@cindex options, -fugly-assign -@item -fugly-assign -Use the same storage for a given variable regardless of -whether it is used to hold an assigned-statement label -(as in @samp{ASSIGN 10 TO I}) or used to hold numeric data -(as in @samp{I = 3}). - -@xref{Ugly Assigned Labels}, for more information. - -@cindex -fugly-assumed option -@cindex options, -fugly-assumed -@item -fugly-assumed -Assume any dummy array with a final dimension specified as @samp{1} -is really an assumed-size array, as if @samp{*} had been specified -for the final dimension instead of @samp{1}. - -For example, @samp{DIMENSION X(1)} is treated as if it -had read @samp{DIMENSION X(*)}. - -@xref{Ugly Assumed-Size Arrays}, for more information. - -@cindex -fugly-comma option -@cindex options, -fugly-comma -@item -fugly-comma -In an external-procedure invocation, -treat a trailing comma in the argument list -as specification of a trailing null argument, -and treat an empty argument list -as specification of a single null argument. - -For example, @samp{CALL FOO(,)} is treated as -@samp{CALL FOO(%VAL(0), %VAL(0))}. -That is, @emph{two} null arguments are specified -by the procedure call when @option{-fugly-comma} is in force. -And @samp{F = FUNC()} is treated as @samp{F = FUNC(%VAL(0))}. - -The default behavior, @option{-fno-ugly-comma}, is to ignore -a single trailing comma in an argument list. -So, by default, @samp{CALL FOO(X,)} is treated -exactly the same as @samp{CALL FOO(X)}. - -@xref{Ugly Null Arguments}, for more information. - -@cindex -fugly-complex option -@cindex options, -fugly-complex -@item -fugly-complex -Do not complain about @samp{REAL(@var{expr})} or -@samp{AIMAG(@var{expr})} when @var{expr} is a @code{COMPLEX} -type other than @code{COMPLEX(KIND=1)}---usually -this is used to permit @code{COMPLEX(KIND=2)} -(@code{DOUBLE COMPLEX}) operands. - -The @option{-ff90} option controls the interpretation -of this construct. - -@xref{Ugly Complex Part Extraction}, for more information. - -@cindex -fno-ugly-init option -@cindex options, -fno-ugly-init -@item -fno-ugly-init -Disallow use of Hollerith and typeless constants as initial -values (in @code{PARAMETER} and @code{DATA} statements), and -use of character constants to -initialize numeric types and vice versa. - -For example, @samp{DATA I/'F'/, CHRVAR/65/, J/4HABCD/} is disallowed by -@option{-fno-ugly-init}. - -@xref{Ugly Conversion of Initializers}, for more information. - -@cindex -fugly-logint option -@cindex options, -fugly-logint -@item -fugly-logint -Treat @code{INTEGER} and @code{LOGICAL} variables and -expressions as potential stand-ins for each other. - -For example, automatic conversion between @code{INTEGER} and -@code{LOGICAL} is enabled, for many contexts, via this option. - -@xref{Ugly Integer Conversions}, for more information. - -@cindex -fonetrip option -@cindex options, -fonetrip -@item -fonetrip -@cindex FORTRAN 66 -@cindex @code{DO} loops, one-trip -@cindex one-trip @code{DO} loops -@cindex @code{DO} loops, zero-trip -@cindex zero-trip @code{DO} loops -@cindex compatibility, FORTRAN 66 -Executable iterative @code{DO} loops are to be executed at -least once each time they are reached. - -ANSI FORTRAN 77 and more recent versions of the Fortran standard -specify that the body of an iterative @code{DO} loop is not executed -if the number of iterations calculated from the parameters of the -loop is less than 1. -(For example, @samp{DO 10 I = 1, 0}.) -Such a loop is called a @dfn{zero-trip loop}. - -Prior to ANSI FORTRAN 77, many compilers implemented @code{DO} loops -such that the body of a loop would be executed at least once, even -if the iteration count was zero. -Fortran code written assuming this behavior is said to require -@dfn{one-trip loops}. -For example, some code written to the FORTRAN 66 standard -expects this behavior from its @code{DO} loops, although that -standard did not specify this behavior. - -The @option{-fonetrip} option specifies that the source file(s) being -compiled require one-trip loops. - -This option affects only those loops specified by the (iterative) @code{DO} -statement and by implied-@code{DO} lists in I/O statements. -Loops specified by implied-@code{DO} lists in @code{DATA} and -specification (non-executable) statements are not affected. - -@cindex -ftypeless-boz option -@cindex options, -ftypeless-boz -@cindex prefix-radix constants -@cindex constants, prefix-radix -@cindex constants, types -@cindex types, constants -@item -ftypeless-boz -Specifies that prefix-radix non-decimal constants, such as -@samp{Z'ABCD'}, are typeless instead of @code{INTEGER(KIND=1)}. - -You can test for yourself whether a particular compiler treats -the prefix form as @code{INTEGER(KIND=1)} or typeless by running the -following program: - -@smallexample -EQUIVALENCE (I, R) -R = Z'ABCD1234' -J = Z'ABCD1234' -IF (J .EQ. I) PRINT *, 'Prefix form is TYPELESS' -IF (J .NE. I) PRINT *, 'Prefix form is INTEGER' -END -@end smallexample - -Reports indicate that many compilers process this form as -@code{INTEGER(KIND=1)}, though a few as typeless, and at least one -based on a command-line option specifying some kind of -compatibility. - -@cindex -fintrin-case-initcap option -@cindex options, -fintrin-case-initcap -@item -fintrin-case-initcap -@cindex -fintrin-case-upper option -@cindex options, -fintrin-case-upper -@item -fintrin-case-upper -@cindex -fintrin-case-lower option -@cindex options, -fintrin-case-lower -@item -fintrin-case-lower -@cindex -fintrin-case-any option -@cindex options, -fintrin-case-any -@item -fintrin-case-any -Specify expected case for intrinsic names. -@option{-fintrin-case-lower} is the default. - -@cindex -fmatch-case-initcap option -@cindex options, -fmatch-case-initcap -@item -fmatch-case-initcap -@cindex -fmatch-case-upper option -@cindex options, -fmatch-case-upper -@item -fmatch-case-upper -@cindex -fmatch-case-lower option -@cindex options, -fmatch-case-lower -@item -fmatch-case-lower -@cindex -fmatch-case-any option -@cindex options, -fmatch-case-any -@item -fmatch-case-any -Specify expected case for keywords. -@option{-fmatch-case-lower} is the default. - -@cindex -fsource-case-upper option -@cindex options, -fsource-case-upper -@item -fsource-case-upper -@cindex -fsource-case-lower option -@cindex options, -fsource-case-lower -@item -fsource-case-lower -@cindex -fsource-case-preserve option -@cindex options, -fsource-case-preserve -@item -fsource-case-preserve -Specify whether source text other than character and Hollerith constants -is to be translated to uppercase, to lowercase, or preserved as is. -@option{-fsource-case-lower} is the default. - -@cindex -fsymbol-case-initcap option -@cindex options, -fsymbol-case-initcap -@item -fsymbol-case-initcap -@cindex -fsymbol-case-upper option -@cindex options, -fsymbol-case-upper -@item -fsymbol-case-upper -@cindex -fsymbol-case-lower option -@cindex options, -fsymbol-case-lower -@item -fsymbol-case-lower -@cindex -fsymbol-case-any option -@cindex options, -fsymbol-case-any -@item -fsymbol-case-any -Specify valid cases for user-defined symbol names. -@option{-fsymbol-case-any} is the default. - -@cindex -fcase-strict-upper option -@cindex options, -fcase-strict-upper -@item -fcase-strict-upper -Same as @samp{-fintrin-case-upper -fmatch-case-upper -fsource-case-preserve --fsymbol-case-upper}. -(Requires all pertinent source to be in uppercase.) - -@cindex -fcase-strict-lower option -@cindex options, -fcase-strict-lower -@item -fcase-strict-lower -Same as @samp{-fintrin-case-lower -fmatch-case-lower -fsource-case-preserve --fsymbol-case-lower}. -(Requires all pertinent source to be in lowercase.) - -@cindex -fcase-initcap option -@cindex options, -fcase-initcap -@item -fcase-initcap -Same as @samp{-fintrin-case-initcap -fmatch-case-initcap -fsource-case-preserve --fsymbol-case-initcap}. -(Requires all pertinent source to be in initial capitals, -as in @samp{Print *,SqRt(Value)}.) - -@cindex -fcase-upper option -@cindex options, -fcase-upper -@item -fcase-upper -Same as @samp{-fintrin-case-any -fmatch-case-any -fsource-case-upper --fsymbol-case-any}. -(Maps all pertinent source to uppercase.) - -@cindex -fcase-lower option -@cindex options, -fcase-lower -@item -fcase-lower -Same as @samp{-fintrin-case-any -fmatch-case-any -fsource-case-lower --fsymbol-case-any}. -(Maps all pertinent source to lowercase.) - -@cindex -fcase-preserve option -@cindex options, -fcase-preserve -@item -fcase-preserve -Same as @samp{-fintrin-case-any -fmatch-case-any -fsource-case-preserve --fsymbol-case-any}. -(Preserves all case in user-defined symbols, -while allowing any-case matching of intrinsics and keywords. -For example, @samp{call Foo(i,I)} would pass two @emph{different} -variables named @samp{i} and @samp{I} to a procedure named @samp{Foo}.) - -@cindex -fbadu77-intrinsics-delete option -@cindex options, -fbadu77-intrinsics-delete -@item -fbadu77-intrinsics-delete -@cindex -fbadu77-intrinsics-hide option -@cindex options, -fbadu77-intrinsics-hide -@item -fbadu77-intrinsics-hide -@cindex -fbadu77-intrinsics-disable option -@cindex options, -fbadu77-intrinsics-disable -@item -fbadu77-intrinsics-disable -@cindex -fbadu77-intrinsics-enable option -@cindex options, -fbadu77-intrinsics-enable -@item -fbadu77-intrinsics-enable -@cindex @code{badu77} intrinsics -@cindex intrinsics, @code{badu77} -Specify status of UNIX intrinsics having inappropriate forms. -@option{-fbadu77-intrinsics-enable} is the default. -@xref{Intrinsic Groups}. - -@cindex -ff2c-intrinsics-delete option -@cindex options, -ff2c-intrinsics-delete -@item -ff2c-intrinsics-delete -@cindex -ff2c-intrinsics-hide option -@cindex options, -ff2c-intrinsics-hide -@item -ff2c-intrinsics-hide -@cindex -ff2c-intrinsics-disable option -@cindex options, -ff2c-intrinsics-disable -@item -ff2c-intrinsics-disable -@cindex -ff2c-intrinsics-enable option -@cindex options, -ff2c-intrinsics-enable -@item -ff2c-intrinsics-enable -@cindex @command{f2c} intrinsics -@cindex intrinsics, @command{f2c} -Specify status of f2c-specific intrinsics. -@option{-ff2c-intrinsics-enable} is the default. -@xref{Intrinsic Groups}. - -@cindex -ff90-intrinsics-delete option -@cindex options, -ff90-intrinsics-delete -@item -ff90-intrinsics-delete -@cindex -ff90-intrinsics-hide option -@cindex options, -ff90-intrinsics-hide -@item -ff90-intrinsics-hide -@cindex -ff90-intrinsics-disable option -@cindex options, -ff90-intrinsics-disable -@item -ff90-intrinsics-disable -@cindex -ff90-intrinsics-enable option -@cindex options, -ff90-intrinsics-enable -@item -ff90-intrinsics-enable -@cindex Fortran 90, intrinsics -@cindex intrinsics, Fortran 90 -Specify status of F90-specific intrinsics. -@option{-ff90-intrinsics-enable} is the default. -@xref{Intrinsic Groups}. - -@cindex -fgnu-intrinsics-delete option -@cindex options, -fgnu-intrinsics-delete -@item -fgnu-intrinsics-delete -@cindex -fgnu-intrinsics-hide option -@cindex options, -fgnu-intrinsics-hide -@item -fgnu-intrinsics-hide -@cindex -fgnu-intrinsics-disable option -@cindex options, -fgnu-intrinsics-disable -@item -fgnu-intrinsics-disable -@cindex -fgnu-intrinsics-enable option -@cindex options, -fgnu-intrinsics-enable -@item -fgnu-intrinsics-enable -@cindex Digital Fortran features -@cindex @code{COMPLEX} intrinsics -@cindex intrinsics, @code{COMPLEX} -Specify status of Digital's COMPLEX-related intrinsics. -@option{-fgnu-intrinsics-enable} is the default. -@xref{Intrinsic Groups}. - -@cindex -fmil-intrinsics-delete option -@cindex options, -fmil-intrinsics-delete -@item -fmil-intrinsics-delete -@cindex -fmil-intrinsics-hide option -@cindex options, -fmil-intrinsics-hide -@item -fmil-intrinsics-hide -@cindex -fmil-intrinsics-disable option -@cindex options, -fmil-intrinsics-disable -@item -fmil-intrinsics-disable -@cindex -fmil-intrinsics-enable option -@cindex options, -fmil-intrinsics-enable -@item -fmil-intrinsics-enable -@cindex MIL-STD 1753 -@cindex intrinsics, MIL-STD 1753 -Specify status of MIL-STD-1753-specific intrinsics. -@option{-fmil-intrinsics-enable} is the default. -@xref{Intrinsic Groups}. - -@cindex -funix-intrinsics-delete option -@cindex options, -funix-intrinsics-delete -@item -funix-intrinsics-delete -@cindex -funix-intrinsics-hide option -@cindex options, -funix-intrinsics-hide -@item -funix-intrinsics-hide -@cindex -funix-intrinsics-disable option -@cindex options, -funix-intrinsics-disable -@item -funix-intrinsics-disable -@cindex -funix-intrinsics-enable option -@cindex options, -funix-intrinsics-enable -@item -funix-intrinsics-enable -@cindex UNIX intrinsics -@cindex intrinsics, UNIX -Specify status of UNIX intrinsics. -@option{-funix-intrinsics-enable} is the default. -@xref{Intrinsic Groups}. - -@cindex -fvxt-intrinsics-delete option -@cindex options, -fvxt-intrinsics-delete -@item -fvxt-intrinsics-delete -@cindex -fvxt-intrinsics-hide option -@cindex options, -fvxt-intrinsics-hide -@item -fvxt-intrinsics-hide -@cindex -fvxt-intrinsics-disable option -@cindex options, -fvxt-intrinsics-disable -@item -fvxt-intrinsics-disable -@cindex -fvxt-intrinsics-enable option -@cindex options, -fvxt-intrinsics-enable -@item -fvxt-intrinsics-enable -@cindex VXT intrinsics -@cindex intrinsics, VXT -Specify status of VXT intrinsics. -@option{-fvxt-intrinsics-enable} is the default. -@xref{Intrinsic Groups}. - -@cindex -ffixed-line-length-@var{n} option -@cindex options, -ffixed-line-length-@var{n} -@item -ffixed-line-length-@var{n} -@cindex source file format -@cindex lines, length -@cindex length of source lines -@cindex fixed form -@cindex limits, lengths of source lines -Set column after which characters are ignored in typical fixed-form -lines in the source file, and through which spaces are assumed (as -if padded to that length) after the ends of short fixed-form lines. - -@cindex card image -@cindex extended-source option -Popular values for @var{n} include 72 (the -standard and the default), 80 (card image), and 132 (corresponds -to ``extended-source'' options in some popular compilers). -@var{n} may be @samp{none}, meaning that the entire line is meaningful -and that continued character constants never have implicit spaces appended -to them to fill out the line. -@option{-ffixed-line-length-0} means the same thing as -@option{-ffixed-line-length-none}. - -@xref{Source Form}, for more information. -@end table - -@node Warning Options -@section Options to Request or Suppress Warnings -@cindex options, warnings -@cindex warnings, suppressing -@cindex messages, warning -@cindex suppressing warnings - -Warnings are diagnostic messages that report constructions which -are not inherently erroneous but which are risky or suggest there -might have been an error. - -You can request many specific warnings with options beginning @option{-W}, -for example @option{-Wimplicit} to request warnings on implicit -declarations. Each of these specific warning options also has a -negative form beginning @option{-Wno-} to turn off warnings; -for example, @option{-Wno-implicit}. This manual lists only one of the -two forms, whichever is not the default. - -These options control the amount and kinds of warnings produced by GNU -Fortran: - -@table @gcctabopt -@cindex syntax checking -@cindex -fsyntax-only option -@cindex options, -fsyntax-only -@item -fsyntax-only -Check the code for syntax errors, but don't do anything beyond that. - -@cindex -pedantic option -@cindex options, -pedantic -@item -pedantic -Issue warnings for uses of extensions to ANSI FORTRAN 77. -@option{-pedantic} also applies to C-language constructs where they -occur in GNU Fortran source files, such as use of @samp{\e} in a -character constant within a directive like @samp{#include}. - -Valid ANSI FORTRAN 77 programs should compile properly with or without -this option. -However, without this option, certain GNU extensions and traditional -Fortran features are supported as well. -With this option, many of them are rejected. - -Some users try to use @option{-pedantic} to check programs for strict ANSI -conformance. -They soon find that it does not do quite what they want---it finds some -non-ANSI practices, but not all. -However, improvements to @command{g77} in this area are welcome. - -@cindex -pedantic-errors option -@cindex options, -pedantic-errors -@item -pedantic-errors -Like @option{-pedantic}, except that errors are produced rather than -warnings. - -@cindex -fpedantic option -@cindex options, -fpedantic -@item -fpedantic -Like @option{-pedantic}, but applies only to Fortran constructs. - -@cindex -w option -@cindex options, -w -@item -w -Inhibit all warning messages. - -@cindex -Wno-globals option -@cindex options, -Wno-globals -@item -Wno-globals -@cindex global names, warning -@cindex warnings, global names -Inhibit warnings about use of a name as both a global name -(a subroutine, function, or block data program unit, or a -common block) and implicitly as the name of an intrinsic -in a source file. - -Also inhibit warnings about inconsistent invocations and/or -definitions of global procedures (function and subroutines). -Such inconsistencies include different numbers of arguments -and different types of arguments. - -@cindex -Wimplicit option -@cindex options, -Wimplicit -@item -Wimplicit -@cindex implicit declaration, warning -@cindex warnings, implicit declaration -@cindex -u option -@cindex /WARNINGS=DECLARATIONS switch -@cindex IMPLICIT NONE, similar effect -@cindex effecting IMPLICIT NONE -Warn whenever a variable, array, or function is implicitly -declared. -Has an effect similar to using the @code{IMPLICIT NONE} statement -in every program unit. -(Some Fortran compilers provide this feature by an option -named @option{-u} or @samp{/WARNINGS=DECLARATIONS}.) - -@cindex -Wunused option -@cindex options, -Wunused -@item -Wunused -@cindex unused variables -@cindex variables, unused -Warn whenever a variable is unused aside from its declaration. - -@cindex -Wuninitialized option -@cindex options, -Wuninitialized -@item -Wuninitialized -@cindex uninitialized variables -@cindex variables, uninitialized -Warn whenever an automatic variable is used without first being initialized. - -These warnings are possible only in optimizing compilation, -because they require data-flow information that is computed only -when optimizing. If you don't specify @option{-O}, you simply won't -get these warnings. - -These warnings occur only for variables that are candidates for -register allocation. Therefore, they do not occur for a variable -@c that is declared @code{VOLATILE}, or -whose address is taken, or whose size -is other than 1, 2, 4 or 8 bytes. Also, they do not occur for -arrays, even when they are in registers. - -Note that there might be no warning about a variable that is used only -to compute a value that itself is never used, because such -computations may be deleted by data-flow analysis before the warnings -are printed. - -These warnings are made optional because GNU Fortran is not smart -enough to see all the reasons why the code might be correct -despite appearing to have an error. Here is one example of how -this can happen: - -@example -SUBROUTINE DISPAT(J) -IF (J.EQ.1) I=1 -IF (J.EQ.2) I=4 -IF (J.EQ.3) I=5 -CALL FOO(I) -END -@end example - -@noindent -If the value of @code{J} is always 1, 2 or 3, then @code{I} is -always initialized, but GNU Fortran doesn't know this. Here is -another common case: - -@example -SUBROUTINE MAYBE(FLAG) -LOGICAL FLAG -IF (FLAG) VALUE = 9.4 -@dots{} -IF (FLAG) PRINT *, VALUE -END -@end example - -@noindent -This has no bug because @code{VALUE} is used only if it is set. - -@cindex -Wall option -@cindex options, -Wall -@item -Wall -@cindex all warnings -@cindex warnings, all -The @option{-Wunused} and @option{-Wuninitialized} options combined. -These are all the -options which pertain to usage that we recommend avoiding and that we -believe is easy to avoid. -(As more warnings are added to @command{g77} some might -be added to the list enabled by @option{-Wall}.) -@end table - -The remaining @option{-W@dots{}} options are not implied by @option{-Wall} -because they warn about constructions that we consider reasonable to -use, on occasion, in clean programs. - -@table @gcctabopt -@c @item -W -@c Print extra warning messages for these events: -@c -@c @itemize @bullet -@c @item -@c If @option{-Wall} or @option{-Wunused} is also specified, warn about unused -@c arguments. -@c -@c @end itemize -@c -@cindex -Wsurprising option -@cindex options, -Wsurprising -@item -Wsurprising -Warn about ``suspicious'' constructs that are interpreted -by the compiler in a way that might well be surprising to -someone reading the code. -These differences can result in subtle, compiler-dependent -(even machine-dependent) behavioral differences. -The constructs warned about include: - -@itemize @bullet -@item -Expressions having two arithmetic operators in a row, such -as @samp{X*-Y}. -Such a construct is nonstandard, and can produce -unexpected results in more complicated situations such -as @samp{X**-Y*Z}. -@command{g77} along with many other compilers, interprets -this example differently than many programmers, and a few -other compilers. -Specifically, @command{g77} interprets @samp{X**-Y*Z} as -@samp{(X**(-Y))*Z}, while others might think it should -be interpreted as @samp{X**(-(Y*Z))}. - -A revealing example is the constant expression @samp{2**-2*1.}, -which @command{g77} evaluates to .25, while others might evaluate -it to 0., the difference resulting from the way precedence affects -type promotion. - -(The @option{-fpedantic} option also warns about expressions -having two arithmetic operators in a row.) - -@item -Expressions with a unary minus followed by an operand and then -a binary operator other than plus or minus. -For example, @samp{-2**2} produces a warning, because -the precedence is @samp{-(2**2)}, yielding -4, not -@samp{(-2)**2}, which yields 4, and which might represent -what a programmer expects. - -An example of an expression producing different results -in a surprising way is @samp{-I*S}, where @var{I} holds -the value @samp{-2147483648} and @var{S} holds @samp{0.5}. -On many systems, negating @var{I} results in the same -value, not a positive number, because it is already the -lower bound of what an @code{INTEGER(KIND=1)} variable can hold. -So, the expression evaluates to a positive number, while -the ``expected'' interpretation, @samp{(-I)*S}, would -evaluate to a negative number. - -Even cases such as @samp{-I*J} produce warnings, -even though, in most configurations and situations, -there is no computational difference between the -results of the two interpretations---the purpose -of this warning is to warn about differing interpretations -and encourage a better style of coding, not to identify -only those places where bugs might exist in the user's -code. - -@cindex DO statement -@cindex statements, DO -@item -@code{DO} loops with @code{DO} variables that are not -of integral type---that is, using @code{REAL} -variables as loop control variables. -Although such loops can be written to work in the -``obvious'' way, the way @command{g77} is required by the -Fortran standard to interpret such code is likely to -be quite different from the way many programmers expect. -(This is true of all @code{DO} loops, but the differences -are pronounced for non-integral loop control variables.) - -@xref{Loops}, for more information. -@end itemize - -@cindex -Werror option -@cindex options, -Werror -@item -Werror -Make all warnings into errors. - -@cindex -W option -@cindex options, -W -@item -W -@cindex extra warnings -@cindex warnings, extra -Turns on ``extra warnings'' and, if optimization is specified -via @option{-O}, the @option{-Wuninitialized} option. -(This might change in future versions of @command{g77} - -``Extra warnings'' are issued for: - -@itemize @bullet -@item -@cindex unused parameters -@cindex parameters, unused -@cindex unused arguments -@cindex arguments, unused -@cindex unused dummies -@cindex dummies, unused -Unused parameters to a procedure (when @option{-Wunused} also is -specified). - -@item -@cindex overflow -Overflows involving floating-point constants (not available -for certain configurations). -@end itemize -@end table - -@xref{Warning Options,,Options to Request or Suppress Warnings, -gcc,Using the GNU Compiler Collection (GCC)}, for information on more -options offered -by the GBE shared by @command{g77} @command{gcc} and other GNU compilers. - -Some of these have no effect when compiling programs written in Fortran: - -@table @gcctabopt -@cindex -Wcomment option -@cindex options, -Wcomment -@item -Wcomment -@cindex -Wformat option -@cindex options, -Wformat -@item -Wformat -@cindex -Wparentheses option -@cindex options, -Wparentheses -@item -Wparentheses -@cindex -Wswitch option -@cindex options, -Wswitch -@item -Wswitch -@cindex -Wswitch-default option -@cindex options, -Wswitch-default -@item -Wswitch-default -@cindex -Wswitch-enum option -@cindex options, -Wswitch-enum -@item -Wswitch-enum -@cindex -Wtraditional option -@cindex options, -Wtraditional -@item -Wtraditional -@cindex -Wshadow option -@cindex options, -Wshadow -@item -Wshadow -@cindex -Wid-clash-@var{len} option -@cindex options, -Wid-clash-@var{len} -@item -Wid-clash-@var{len} -@cindex -Wlarger-than-@var{len} option -@cindex options, -Wlarger-than-@var{len} -@item -Wlarger-than-@var{len} -@cindex -Wconversion option -@cindex options, -Wconversion -@item -Wconversion -@cindex -Waggregate-return option -@cindex options, -Waggregate-return -@item -Waggregate-return -@cindex -Wredundant-decls option -@cindex options, -Wredundant-decls -@item -Wredundant-decls -@cindex unsupported warnings -@cindex warnings, unsupported -These options all could have some relevant meaning for -GNU Fortran programs, but are not yet supported. -@end table - -@node Debugging Options -@section Options for Debugging Your Program or GNU Fortran -@cindex options, debugging -@cindex debugging information options - -GNU Fortran has various special options that are used for debugging -either your program or @command{g77} - -@table @gcctabopt -@cindex -g option -@cindex options, -g -@item -g -Produce debugging information in the operating system's native format -(stabs, COFF, XCOFF, or DWARF). GDB can work with this debugging -information. - -A sample debugging session looks like this (note the use of the breakpoint): -@smallexample -$ cat gdb.f - PROGRAM PROG - DIMENSION A(10) - DATA A /1.,2.,3.,4.,5.,6.,7.,8.,9.,10./ - A(5) = 4. - PRINT*,A - END -$ g77 -g -O gdb.f -$ gdb a.out -... -(gdb) break MAIN__ -Breakpoint 1 at 0x8048e96: file gdb.f, line 4. -(gdb) run -Starting program: /home/toon/g77-bugs/./a.out -Breakpoint 1, MAIN__ () at gdb.f:4 -4 A(5) = 4. -Current language: auto; currently fortran -(gdb) print a(5) -$1 = 5 -(gdb) step -5 PRINT*,A -(gdb) print a(5) -$2 = 4 -... -@end smallexample -One could also add the setting of the breakpoint and the first run command -to the file @file{.gdbinit} in the current directory, to simplify the debugging -session. -@end table - -@xref{Debugging Options,,Options for Debugging Your Program or GCC, -gcc,Using the GNU Compiler Collection (GCC)}, for more information on -debugging options. - -@node Optimize Options -@section Options That Control Optimization -@cindex optimize options -@cindex options, optimization - -Most Fortran users will want to use no optimization when -developing and testing programs, and use @option{-O} or @option{-O2} when -compiling programs for late-cycle testing and for production use. -However, note that certain diagnostics---such as for uninitialized -variables---depend on the flow analysis done by @option{-O}, i.e.@: you -must use @option{-O} or @option{-O2} to get such diagnostics. - -The following flags have particular applicability when -compiling Fortran programs: - -@table @gcctabopt -@cindex -malign-double option -@cindex options, -malign-double -@item -malign-double -(Intel x86 architecture only.) - -Noticeably improves performance of @command{g77} programs making -heavy use of @code{REAL(KIND=2)} (@code{DOUBLE PRECISION}) data -on some systems. -In particular, systems using Pentium, Pentium Pro, 586, and -686 implementations -of the i386 architecture execute programs faster when -@code{REAL(KIND=2)} (@code{DOUBLE PRECISION}) data are -aligned on 64-bit boundaries -in memory. - -This option can, at least, make benchmark results more consistent -across various system configurations, versions of the program, -and data sets. - -@emph{Note:} The warning in the @command{gcc} documentation about -this option does not apply, generally speaking, to Fortran -code compiled by @command{g77} - -@xref{Aligned Data}, for more information on alignment issues. - -@emph{Also also note:} The negative form of @option{-malign-double} -is @option{-mno-align-double}, not @option{-benign-double}. - -@cindex -ffloat-store option -@cindex options, -ffloat-store -@item -ffloat-store -@cindex IEEE 754 conformance -@cindex conformance, IEEE 754 -@cindex floating-point, precision -Might help a Fortran program that depends on exact IEEE conformance on -some machines, but might slow down a program that doesn't. - -This option is effective when the floating-point unit is set to work in -IEEE 854 `extended precision'---as it typically is on x86 and m68k GNU -systems---rather than IEEE 754 double precision. @option{-ffloat-store} -tries to remove the extra precision by spilling data from floating-point -registers into memory and this typically involves a big performance -hit. However, it doesn't affect intermediate results, so that it is -only partially effective. `Excess precision' is avoided in code like: -@smallexample -a = b + c -d = a * e -@end smallexample -but not in code like: -@smallexample - d = (b + c) * e -@end smallexample - -For another, potentially better, way of controlling the precision, -see @ref{Floating-point precision}. - -@cindex -fforce-mem option -@cindex options, -fforce-mem -@item -fforce-mem -@cindex -fforce-addr option -@cindex options, -fforce-addr -@item -fforce-addr -@cindex loops, speeding up -@cindex speed, of loops -Might improve optimization of loops. - -@cindex -fno-inline option -@cindex options, -fno-inline -@item -fno-inline -@cindex in-line code -@cindex compilation, in-line -@c DL: Only relevant for -O3? TM: No, statement functions are -@c inlined even at -O1. -Don't compile statement functions inline. -Might reduce the size of a program unit---which might be at -expense of some speed (though it should compile faster). -Note that if you are not optimizing, no functions can be expanded inline. - -@cindex -ffast-math option -@cindex options, -ffast-math -@item -ffast-math -@cindex IEEE 754 conformance -@cindex conformance, IEEE 754 -Might allow some programs designed to not be too dependent -on IEEE behavior for floating-point to run faster, or die trying. -Sets @option{-funsafe-math-optimizations}, @option{-ffinite-math-only}, -and @option{-fno-trapping-math}. - -@cindex -funsafe-math-optimizations option -@cindex options, -funsafe-math-optimizations -@item -funsafe-math-optimizations -Allow optimizations that may be give incorrect results -for certain IEEE inputs. - -@cindex -ffinite-math-only option -@cindex options, -ffinite-math-only -@item -ffinite-math-only -Allow optimizations for floating-point arithmetic that assume -that arguments and results are not NaNs or +-Infs. - -This option should never be turned on by any @option{-O} option since -it can result in incorrect output for programs which depend on -an exact implementation of IEEE or ISO rules/specifications. - -The default is @option{-fno-finite-math-only}. - -@cindex -fno-trapping-math option -@cindex options, -fno-trapping-math -@item -fno-trapping-math -Allow the compiler to assume that floating-point arithmetic -will not generate traps on any inputs. This is useful, for -example, when running a program using IEEE "non-stop" -floating-point arithmetic. - -@cindex -fstrength-reduce option -@cindex options, -fstrength-reduce -@item -fstrength-reduce -@cindex loops, speeding up -@cindex speed, of loops -@c DL: normally defaulted? -Might make some loops run faster. - -@cindex -frerun-cse-after-loop option -@cindex options, -frerun-cse-after-loop -@item -frerun-cse-after-loop -@cindex -fexpensive-optimizations option -@cindex options, -fexpensive-optimizations -@c DL: This is -O2? -@item -fexpensive-optimizations -@cindex -fdelayed-branch option -@cindex options, -fdelayed-branch -@item -fdelayed-branch -@cindex -fschedule-insns option -@cindex options, -fschedule-insns -@item -fschedule-insns -@cindex -fschedule-insns2 option -@cindex options, -fschedule-insns2 -@item -fschedule-insns2 -@cindex -fcaller-saves option -@cindex options, -fcaller-saves -@item -fcaller-saves -Might improve performance on some code. - -@cindex -funroll-loops option -@cindex options, -funroll-loops -@item -funroll-loops -@cindex loops, unrolling -@cindex unrolling loops -@cindex loops, optimizing -@cindex indexed (iterative) @code{DO} -@cindex iterative @code{DO} -@c DL: fixme: Craig doesn't like `indexed' but f95 doesn't seem to -@c provide a suitable term -@c CB: I've decided on `iterative', for the time being, and changed -@c my previous, rather bizarre, use of `imperative' to that -@c (though `precomputed-trip' would be a more precise adjective) -Typically improves performance on code using iterative @code{DO} loops by -unrolling them and is probably generally appropriate for Fortran, though -it is not turned on at any optimization level. -Note that outer loop unrolling isn't done specifically; decisions about -whether to unroll a loop are made on the basis of its instruction count. - -@c DL: Fixme: This should obviously go somewhere else... -Also, no `loop discovery'@footnote{@dfn{loop discovery} refers to the -process by which a compiler, or indeed any reader of a program, -determines which portions of the program are more likely to be executed -repeatedly as it is being run. Such discovery typically is done early -when compiling using optimization techniques, so the ``discovered'' -loops get more attention---and more run-time resources, such as -registers---from the compiler. It is easy to ``discover'' loops that are -constructed out of looping constructs in the language -(such as Fortran's @code{DO}). For some programs, ``discovering'' loops -constructed out of lower-level constructs (such as @code{IF} and -@code{GOTO}) can lead to generation of more optimal code -than otherwise.} is done, so only loops written with @code{DO} -benefit from loop optimizations, including---but not limited -to---unrolling. Loops written with @code{IF} and @code{GOTO} are not -currently recognized as such. This option unrolls only iterative -@code{DO} loops, not @code{DO WHILE} loops. - -@cindex -funroll-all-loops option -@cindex options, -funroll-all-loops -@cindex DO WHILE -@item -funroll-all-loops -@c DL: Check my understanding of -funroll-all-loops v. -funroll-loops is correct. -Probably improves performance on code using @code{DO WHILE} loops by -unrolling them in addition to iterative @code{DO} loops. In the absence -of @code{DO WHILE}, this option is equivalent to @option{-funroll-loops} -but possibly slower. - -@item -fno-move-all-movables -@cindex -fno-move-all-movables option -@cindex options, -fno-move-all-movables -@item -fno-reduce-all-givs -@cindex -fno-reduce-all-givs option -@cindex options, -fno-reduce-all-givs -@item -fno-rerun-loop-opt -@cindex -fno-rerun-loop-opt option -@cindex options, -fno-rerun-loop-opt -In general, the optimizations enabled with these options will lead to -faster code being generated by GNU Fortran; hence they are enabled by default -when issuing the @command{g77} command. - -@option{-fmove-all-movables} and @option{-freduce-all-givs} will enable -loop optimization to move all loop-invariant index computations in nested -loops over multi-rank array dummy arguments out of these loops. - -@option{-frerun-loop-opt} will move offset calculations resulting -from the fact that Fortran arrays by default have a lower bound of 1 -out of the loops. - -These three options are intended to be removed someday, once -loop optimization is sufficiently advanced to perform all those -transformations without help from these options. -@end table - -@xref{Optimize Options,,Options That Control Optimization, -gcc,Using the GNU Compiler Collection (GCC)}, for more information on options -to optimize the generated machine code. - -@node Preprocessor Options -@section Options Controlling the Preprocessor -@cindex preprocessor options -@cindex options, preprocessor -@cindex cpp program -@cindex programs, cpp - -These options control the C preprocessor, which is run on each C source -file before actual compilation. - -@xref{Preprocessor Options,,Options Controlling the Preprocessor, -gcc,Using the GNU Compiler Collection (GCC)}, for information on C -preprocessor options. - -@cindex INCLUDE directive -@cindex directive, INCLUDE -Some of these options also affect how @command{g77} processes the -@code{INCLUDE} directive. -Since this directive is processed even when preprocessing -is not requested, it is not described in this section. -@xref{Directory Options,,Options for Directory Search}, for -information on how @command{g77} processes the @code{INCLUDE} directive. - -However, the @code{INCLUDE} directive does not apply -preprocessing to the contents of the included file itself. - -Therefore, any file that contains preprocessor directives -(such as @code{#include}, @code{#define}, and @code{#if}) -must be included via the @code{#include} directive, not -via the @code{INCLUDE} directive. -Therefore, any file containing preprocessor directives, -if included, is necessarily included by a file that itself -contains preprocessor directives. - -@node Directory Options -@section Options for Directory Search -@cindex directory, options -@cindex options, directory search -@cindex search path - -These options affect how the @command{cpp} preprocessor searches -for files specified via the @code{#include} directive. -Therefore, when compiling Fortran programs, they are meaningful -when the preprocessor is used. - -@cindex INCLUDE directive -@cindex directive, INCLUDE -Some of these options also affect how @command{g77} searches -for files specified via the @code{INCLUDE} directive, -although files included by that directive are not, -themselves, preprocessed. -These options are: - -@table @gcctabopt -@cindex -I- option -@cindex options, -I- -@item -I- -@cindex -Idir option -@cindex options, -Idir -@item -I@var{dir} -@cindex directory, search paths for inclusion -@cindex inclusion, directory search paths for -@cindex search paths, for included files -@cindex paths, search -These affect interpretation of the @code{INCLUDE} directive -(as well as of the @code{#include} directive of the @command{cpp} -preprocessor). - -Note that @option{-I@var{dir}} must be specified @emph{without} any -spaces between @option{-I} and the directory name---that is, -@option{-Ifoo/bar} is valid, but @option{-I foo/bar} -is rejected by the @command{g77} compiler (though the preprocessor supports -the latter form). -@c this is due to toplev.c's inflexible option processing -Also note that the general behavior of @option{-I} and -@code{INCLUDE} is pretty much the same as of @option{-I} with -@code{#include} in the @command{cpp} preprocessor, with regard to -looking for @file{header.gcc} files and other such things. - -@xref{Directory Options,,Options for Directory Search, -gcc,Using the GNU Compiler Collection (GCC)}, for information on the -@option{-I} option. -@end table - -@node Code Gen Options -@section Options for Code Generation Conventions -@cindex code generation, conventions -@cindex options, code generation -@cindex run-time, options - -These machine-independent options control the interface conventions -used in code generation. - -Most of them have both positive and negative forms; the negative form -of @option{-ffoo} would be @option{-fno-foo}. In the table below, only -one of the forms is listed---the one which is not the default. You -can figure out the other form by either removing @option{no-} or adding -it. - -@table @gcctabopt -@cindex -fno-automatic option -@cindex options, -fno-automatic -@item -fno-automatic -@cindex SAVE statement -@cindex statements, SAVE -Treat each program unit as if the @code{SAVE} statement was specified -for every local variable and array referenced in it. -Does not affect common blocks. -(Some Fortran compilers provide this option under -the name @option{-static}.) - -@cindex -finit-local-zero option -@cindex options, -finit-local-zero -@item -finit-local-zero -@cindex DATA statement -@cindex statements, DATA -@cindex initialization, of local variables -@cindex variables, initialization of -@cindex uninitialized variables -@cindex variables, uninitialized -Specify that variables and arrays that are local to a program unit -(not in a common block and not passed as an argument) are to be initialized -to binary zeros. - -Since there is a run-time penalty for initialization of variables -that are not given the @code{SAVE} attribute, it might be a -good idea to also use @option{-fno-automatic} with @option{-finit-local-zero}. - -@cindex -fno-f2c option -@cindex options, -fno-f2c -@item -fno-f2c -@cindex @command{f2c} compatibility -@cindex compatibility, @command{f2c} -Do not generate code designed to be compatible with code generated -by @command{f2c} use the GNU calling conventions instead. - -The @command{f2c} calling conventions require functions that return -type @code{REAL(KIND=1)} to actually return the C type @code{double}, -and functions that return type @code{COMPLEX} to return the -values via an extra argument in the calling sequence that points -to where to store the return value. -Under the GNU calling conventions, such functions simply return -their results as they would in GNU C---@code{REAL(KIND=1)} functions -return the C type @code{float}, and @code{COMPLEX} functions -return the GNU C type @code{complex} (or its @code{struct} -equivalent). - -This does not affect the generation of code that interfaces with the -@code{libg2c} library. - -However, because the @code{libg2c} library uses @command{f2c} -calling conventions, @command{g77} rejects attempts to pass -intrinsics implemented by routines in this library as actual -arguments when @option{-fno-f2c} is used, to avoid bugs when -they are actually called by code expecting the GNU calling -conventions to work. - -For example, @samp{INTRINSIC ABS;CALL FOO(ABS)} is -rejected when @option{-fno-f2c} is in force. -(Future versions of the @command{g77} run-time library might -offer routines that provide GNU-callable versions of the -routines that implement the @command{f2c} intrinsics -that may be passed as actual arguments, so that -valid programs need not be rejected when @option{-fno-f2c} -is used.) - -@strong{Caution:} If @option{-fno-f2c} is used when compiling any -source file used in a program, it must be used when compiling -@emph{all} Fortran source files used in that program. - -@c seems kinda dumb to tell people about an option they can't use -- jcb -@c then again, we want users building future-compatible libraries with it. -@cindex -ff2c-library option -@cindex options, -ff2c-library -@item -ff2c-library -Specify that use of @code{libg2c} (or the original @code{libf2c}) -is required. -This is the default for the current version of @command{g77} - -Currently it is not -valid to specify @option{-fno-f2c-library}. -This option is provided so users can specify it in shell -scripts that build programs and libraries that require the -@code{libf2c} library, even when being compiled by future -versions of @command{g77} that might otherwise default to -generating code for an incompatible library. - -@cindex -fno-underscoring option -@cindex options, -fno-underscoring -@item -fno-underscoring -@cindex underscore -@cindex symbol names, underscores -@cindex transforming symbol names -@cindex symbol names, transforming -Do not transform names of entities specified in the Fortran -source file by appending underscores to them. - -With @option{-funderscoring} in effect, @command{g77} appends two underscores -to names with underscores and one underscore to external names with -no underscores. (@command{g77} also appends two underscores to internal -names with underscores to avoid naming collisions with external names. -The @option{-fno-second-underscore} option disables appending of the -second underscore in all cases.) - -This is done to ensure compatibility with code produced by many -UNIX Fortran compilers, including @command{f2c} which perform the -same transformations. - -Use of @option{-fno-underscoring} is not recommended unless you are -experimenting with issues such as integration of (GNU) Fortran into -existing system environments (vis-a-vis existing libraries, tools, and -so on). - -For example, with @option{-funderscoring}, and assuming other defaults like -@option{-fcase-lower} and that @samp{j()} and @samp{max_count()} are -external functions while @samp{my_var} and @samp{lvar} are local variables, -a statement like - -@smallexample -I = J() + MAX_COUNT (MY_VAR, LVAR) -@end smallexample - -@noindent -is implemented as something akin to: - -@smallexample -i = j_() + max_count__(&my_var__, &lvar); -@end smallexample - -With @option{-fno-underscoring}, the same statement is implemented as: - -@smallexample -i = j() + max_count(&my_var, &lvar); -@end smallexample - -Use of @option{-fno-underscoring} allows direct specification of -user-defined names while debugging and when interfacing @command{g77} -code with other languages. - -Note that just because the names match does @emph{not} mean that the -interface implemented by @command{g77} for an external name matches the -interface implemented by some other language for that same name. -That is, getting code produced by @command{g77} to link to code produced -by some other compiler using this or any other method can be only a -small part of the overall solution---getting the code generated by -both compilers to agree on issues other than naming can require -significant effort, and, unlike naming disagreements, linkers normally -cannot detect disagreements in these other areas. - -Also, note that with @option{-fno-underscoring}, the lack of appended -underscores introduces the very real possibility that a user-defined -external name will conflict with a name in a system library, which -could make finding unresolved-reference bugs quite difficult in some -cases---they might occur at program run time, and show up only as -buggy behavior at run time. - -In future versions of @command{g77} we hope to improve naming and linking -issues so that debugging always involves using the names as they appear -in the source, even if the names as seen by the linker are mangled to -prevent accidental linking between procedures with incompatible -interfaces. - -@cindex -fno-second-underscore option -@cindex options, -fno-second-underscore -@item -fno-second-underscore -@cindex underscore -@cindex symbol names, underscores -@cindex transforming symbol names -@cindex symbol names, transforming -Do not append a second underscore to names of entities specified -in the Fortran source file. - -This option has no effect if @option{-fno-underscoring} is -in effect. - -Otherwise, with this option, an external name such as @samp{MAX_COUNT} -is implemented as a reference to the link-time external symbol -@samp{max_count_}, instead of @samp{max_count__}. - -@cindex -fno-ident option -@cindex options, -fno-ident -@item -fno-ident -Ignore the @samp{#ident} directive. - -@cindex -fzeros option -@cindex options, -fzeros -@item -fzeros -Treat initial values of zero as if they were any other value. - -As of version 0.5.18, @command{g77} normally treats @code{DATA} and -other statements that are used to specify initial values of zero -for variables and arrays as if no values were actually specified, -in the sense that no diagnostics regarding multiple initializations -are produced. - -This is done to speed up compiling of programs that initialize -large arrays to zeros. - -Use @option{-fzeros} to revert to the simpler, slower behavior -that can catch multiple initializations by keeping track of -all initializations, zero or otherwise. - -@emph{Caution:} Future versions of @command{g77} might disregard this option -(and its negative form, the default) or interpret it somewhat -differently. -The interpretation changes will affect only non-standard -programs; standard-conforming programs should not be affected. - -@cindex -femulate-complex option -@cindex options, -femulate-complex -@item -femulate-complex -Implement @code{COMPLEX} arithmetic via emulation, -instead of using the facilities of -the @command{gcc} back end that provide direct support of -@code{complex} arithmetic. - -(@command{gcc} had some bugs in its back-end support -for @code{complex} arithmetic, due primarily to the support not being -completed as of version 2.8.1 and @code{egcs} 1.1.2.) - -Use @option{-femulate-complex} if you suspect code-generation bugs, -or experience compiler crashes, -that might result from @command{g77} using the @code{COMPLEX} support -in the @command{gcc} back end. -If using that option fixes the bugs or crashes you are seeing, -that indicates a likely @command{g77} bugs -(though, all compiler crashes are considered bugs), -so, please report it. -(Note that the known bugs, now believed fixed, produced compiler crashes -rather than causing the generation of incorrect code.) - -Use of this option should not affect how Fortran code compiled -by @command{g77} works in terms of its interfaces to other code, -e.g. that compiled by @command{f2c} - -As of GCC version 3.0, this option is not necessary anymore. - -@emph{Caution:} Future versions of @command{g77} might ignore both forms -of this option. - -@cindex -falias-check option -@cindex options, -falias-check -@cindex -fargument-alias option -@cindex options, -fargument-alias -@cindex -fargument-noalias option -@cindex options, -fargument-noalias -@cindex -fno-argument-noalias-global option -@cindex options, -fno-argument-noalias-global -@item -falias-check -@item -fargument-alias -@item -fargument-noalias -@item -fno-argument-noalias-global -@emph{Version info:} -These options are not supported by -versions of @command{g77} based on @command{gcc} version 2.8. - -These options specify to what degree aliasing -(overlap) -is permitted between -arguments (passed as pointers) and @code{COMMON} (external, or -public) storage. - -The default for Fortran code, as mandated by the FORTRAN 77 and -Fortran 90 standards, is @option{-fargument-noalias-global}. -The default for code written in the C language family is -@option{-fargument-alias}. - -Note that, on some systems, compiling with @option{-fforce-addr} in -effect can produce more optimal code when the default aliasing -options are in effect (and when optimization is enabled). - -@xref{Aliasing Assumed To Work}, for detailed information on the implications -of compiling Fortran code that depends on the ability to alias dummy -arguments. - -@cindex -fno-globals option -@cindex options, -fno-globals -@item -fno-globals -@cindex global names, warning -@cindex warnings, global names -@cindex in-line code -@cindex compilation, in-line -Disable diagnostics about inter-procedural -analysis problems, such as disagreements about the -type of a function or a procedure's argument, -that might cause a compiler crash when attempting -to inline a reference to a procedure within a -program unit. -(The diagnostics themselves are still produced, but -as warnings, unless @option{-Wno-globals} is specified, -in which case no relevant diagnostics are produced.) - -Further, this option disables such inlining, to -avoid compiler crashes resulting from incorrect -code that would otherwise be diagnosed. - -As such, this option might be quite useful when -compiling existing, ``working'' code that happens -to have a few bugs that do not generally show themselves, -but which @command{g77} diagnoses. - -Use of this option therefore has the effect of -instructing @command{g77} to behave more like it did -up through version 0.5.19.1, when it paid little or -no attention to disagreements between program units -about a procedure's type and argument information, -and when it performed no inlining of procedures -(except statement functions). - -Without this option, @command{g77} defaults to performing -the potentially inlining procedures as it started doing -in version 0.5.20, but as of version 0.5.21, it also -diagnoses disagreements that might cause such inlining -to crash the compiler as (fatal) errors, -and warns about similar disagreements -that are currently believed to not -likely to result in the compiler later crashing -or producing incorrect code. - -@cindex -fflatten-arrays option -@item -fflatten-arrays -@cindex array performance -@cindex arrays, flattening -Use back end's C-like constructs -(pointer plus offset) -instead of its @code{ARRAY_REF} construct -to handle all array references. - -@emph{Note:} This option is not supported. -It is intended for use only by @command{g77} developers, -to evaluate code-generation issues. -It might be removed at any time. - -@cindex -fbounds-check option -@cindex -ffortran-bounds-check option -@item -fbounds-check -@itemx -ffortran-bounds-check -@cindex bounds checking -@cindex range checking -@cindex array bounds checking -@cindex subscript checking -@cindex substring checking -@cindex checking subscripts -@cindex checking substrings -Enable generation of run-time checks for array subscripts -and substring start and end points -against the (locally) declared minimum and maximum values. - -The current implementation uses the @code{libf2c} -library routine @code{s_rnge} to print the diagnostic. - -However, whereas @command{f2c} generates a single check per -reference for a multi-dimensional array, of the computed -offset against the valid offset range (0 through the size of the array), -@command{g77} generates a single check per @emph{subscript} expression. -This catches some cases of potential bugs that @command{f2c} does not, -such as references to below the beginning of an assumed-size array. - -@command{g77} also generates checks for @code{CHARACTER} substring references, -something @command{f2c} currently does not do. - -Use the new @option{-ffortran-bounds-check} option -to specify bounds-checking for only the Fortran code you are compiling, -not necessarily for code written in other languages. - -@emph{Note:} To provide more detailed information on the offending subscript, -@command{g77} provides the @code{libg2c} run-time library routine @code{s_rnge} -with somewhat differently-formatted information. -Here's a sample diagnostic: - -@smallexample -Subscript out of range on file line 4, procedure rnge.f/bf. -Attempt to access the -6-th element of variable b[subscript-2-of-2]. -Aborted -@end smallexample - -The above message indicates that the offending source line is -line 4 of the file @file{rnge.f}, -within the program unit (or statement function) named @samp{bf}. -The offended array is named @samp{b}. -The offended array dimension is the second for a two-dimensional array, -and the offending, computed subscript expression was @samp{-6}. - -For a @code{CHARACTER} substring reference, the second line has -this appearance: - -@smallexample -Attempt to access the 11-th element of variable a[start-substring]. -@end smallexample - -This indicates that the offended @code{CHARACTER} variable or array -is named @samp{a}, -the offended substring position is the starting (leftmost) position, -and the offending substring expression is @samp{11}. - -(Though the verbage of @code{s_rnge} is not ideal -for the purpose of the @command{g77} compiler, -the above information should provide adequate diagnostic abilities -to it users.) -@end table - -@xref{Code Gen Options,,Options for Code Generation Conventions, -gcc,Using the GNU Compiler Collection (GCC)}, for information on more options -offered by the GBE -shared by @command{g77} @command{gcc} and other GNU compilers. - -Some of these do @emph{not} work when compiling programs written in Fortran: - -@table @gcctabopt -@cindex -fpcc-struct-return option -@cindex options, -fpcc-struct-return -@item -fpcc-struct-return -@cindex -freg-struct-return option -@cindex options, -freg-struct-return -@item -freg-struct-return -You should not use these except strictly the same way as you -used them to build the version of @code{libg2c} with which -you will be linking all code compiled by @command{g77} with the -same option. - -@cindex -fshort-double option -@cindex options, -fshort-double -@item -fshort-double -This probably either has no effect on Fortran programs, or -makes them act loopy. - -@cindex -fno-common option -@cindex options, -fno-common -@item -fno-common -Do not use this when compiling Fortran programs, -or there will be Trouble. - -@cindex -fpack-struct option -@cindex options, -fpack-struct -@item -fpack-struct -This probably will break any calls to the @code{libg2c} library, -at the very least, even if it is built with the same option. -@end table - -@c man end - -@node Environment Variables -@section Environment Variables Affecting GNU Fortran -@cindex environment variables - -@c man begin ENVIRONMENT - -GNU Fortran currently does not make use of any environment -variables to control its operation above and beyond those -that affect the operation of @command{gcc}. - -@xref{Environment Variables,,Environment Variables Affecting GCC, -gcc,Using the GNU Compiler Collection (GCC)}, for information on environment -variables. - -@c man end diff --git a/contrib/gcc/f/lab.c b/contrib/gcc/f/lab.c deleted file mode 100644 index 1d27874..0000000 --- a/contrib/gcc/f/lab.c +++ /dev/null @@ -1,157 +0,0 @@ -/* lab.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - - Description: - Complex data abstraction for Fortran labels. Maintains a single master - list for all labels; it is expected initialization and termination of - this list will occur on program-unit boundaries. - - Modifications: - 22-Aug-89 JCB 1.1 - Change ffelab_new for new ffewhere interface. -*/ - -/* Include files. */ - -#include "proj.h" -#include "lab.h" -#include "malloc.h" - -/* Externals defined here. */ - -ffelab ffelab_list_; -ffelabNumber ffelab_num_news_; - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - - -/* Static functions (internal). */ - - -/* Internal macros. */ - - -/* ffelab_find -- Find the ffelab object having the desired label value - - ffelab l; - ffelabValue v; - l = ffelab_find(v); - - If the desired ffelab object doesn't exist, returns NULL. - - Straightforward search of list of ffelabs. */ - -ffelab -ffelab_find (ffelabValue v) -{ - ffelab l; - - for (l = ffelab_list_; (l != NULL) && (ffelab_value (l) != v); l = l->next) - ; - - return l; -} - -/* ffelab_finish -- Shut down label management - - ffelab_finish(); - - At the end of processing a program unit, call this routine to shut down - label management. - - Kill all the labels on the list. */ - -void -ffelab_finish (void) -{ - ffelab l; - ffelab pl; - - for (pl = NULL, l = ffelab_list_; l != NULL; pl = l, l = l->next) - if (pl != NULL) - malloc_kill_ks (ffe_pool_any_unit (), pl, sizeof (*pl)); - - if (pl != NULL) - malloc_kill_ks (ffe_pool_any_unit (), pl, sizeof (*pl)); -} - -/* ffelab_init_3 -- Initialize label management system - - ffelab_init_3(); - - Initialize the label management system. Do this before a new program - unit is going to be processed. */ - -void -ffelab_init_3 (void) -{ - ffelab_list_ = NULL; - ffelab_num_news_ = 0; -} - -/* ffelab_new -- Create an ffelab object. - - ffelab l; - ffelabValue v; - l = ffelab_new(v); - - Create a label having a given value. If the value isn't known, pass - FFELAB_valueNONE, and set it later with ffelab_set_value. - - Allocate, initialize, and stick at top of label list. - - 22-Aug-89 JCB 1.1 - Change for new ffewhere interface. */ - -ffelab -ffelab_new (ffelabValue v) -{ - ffelab l; - - ++ffelab_num_news_; - l = malloc_new_ks (ffe_pool_any_unit (), "FFELAB label", sizeof (*l)); - l->next = ffelab_list_; - l->hook = FFECOM_labelNULL; - l->value = v; - l->firstref_line = ffewhere_line_unknown (); - l->firstref_col = ffewhere_column_unknown (); - l->doref_line = ffewhere_line_unknown (); - l->doref_col = ffewhere_column_unknown (); - l->definition_line = ffewhere_line_unknown (); - l->definition_col = ffewhere_column_unknown (); - l->type = FFELAB_typeUNKNOWN; - ffelab_list_ = l; - return l; -} diff --git a/contrib/gcc/f/lab.h b/contrib/gcc/f/lab.h deleted file mode 100644 index f3f8986..0000000 --- a/contrib/gcc/f/lab.h +++ /dev/null @@ -1,152 +0,0 @@ -/* lab.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - lab.c - - Modifications: - 22-Aug-89 JCB 1.1 - Change for new ffewhere interface. -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_LAB_H -#define GCC_F_LAB_H - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFELAB_typeUNKNOWN, /* No info yet on label. */ - FFELAB_typeANY, /* Label valid for anything, no msgs. */ - FFELAB_typeUSELESS, /* No valid way to reference this label. */ - FFELAB_typeASSIGNABLE, /* Target of ASSIGN: so FORMAT or BRANCH. */ - FFELAB_typeFORMAT, /* FORMAT label. */ - FFELAB_typeLOOPEND, /* Target of a labeled DO statement. */ - FFELAB_typeNOTLOOP, /* Branch target statement not valid DO - target. */ - FFELAB_typeENDIF, /* END IF label. */ - FFELAB_type - } ffelabType; - -#define FFELAB_valueNONE 0 -#define FFELAB_valueMAX 99999 - -/* Typedefs. */ - -typedef struct _ffelab_ *ffelab; -typedef ffelab ffelabHandle; -typedef unsigned long ffelabNumber; /* Count of new labels. */ -#define ffelabNumber_f "l" -typedef unsigned long ffelabValue; -#define ffelabValue_f "l" - -/* Include files needed by this one. */ - -#include "com.h" -#include "where.h" - -/* Structure definitions. */ - -struct _ffelab_ - { - ffelab next; - ffecomLabel hook; - ffelabValue value; /* 1 through 99999, or 100000+ for temp - labels. */ - unsigned long blocknum; /* Managed entirely by user of module. */ - ffewhereLine firstref_line; - ffewhereColumn firstref_col; - ffewhereLine doref_line; - ffewhereColumn doref_col; - ffewhereLine definition_line; /* ffewhere_line_unknown() if not - defined. */ - ffewhereColumn definition_col; - ffelabType type; - }; - -/* Global objects accessed by users of this module. */ - -extern ffelab ffelab_list_; -extern ffelabNumber ffelab_num_news_; - -/* Declare functions with prototypes. */ - -ffelab ffelab_find (ffelabValue v); -void ffelab_finish (void); -void ffelab_init_3 (void); -ffelab ffelab_new (ffelabValue v); - -/* Define macros. */ - -#define ffelab_blocknum(l) ((l)->blocknum) -#define ffelab_definition_column(l) ((l)->definition_col) -#define ffelab_definition_filename(l) \ - ffewhere_line_filename((l)->definition_line) -#define ffelab_definition_filelinenum(l) \ - ffewhere_line_filelinenum((l)->definition_line) -#define ffelab_definition_line(l) ((l)->definition_line) -#define ffelab_definition_line_number(l) \ - ffewhere_line_number((l)->definition_line) -#define ffelab_doref_column(l) ((l)->doref_col) -#define ffelab_doref_filename(l) ffewhere_line_filename((l)->doref_line) -#define ffelab_doref_filelinenum(l) ffewhere_line_filelinenum((l)->doref_line) -#define ffelab_doref_line(l) ((l)->doref_line) -#define ffelab_doref_line_number(l) ffewhere_line_number((l)->doref_line) -#define ffelab_firstref_column(l) ((l)->firstref_col) -#define ffelab_firstref_filename(l) ffewhere_line_filename((l)->firstref_line) -#define ffelab_firstref_filelinenum(l) \ - ffewhere_line_filelinenum((l)->firstref_line) -#define ffelab_firstref_line(l) ((l)->firstref_line) -#define ffelab_firstref_line_number(l) ffewhere_line_number((l)->firstref_line) -#define ffelab_handle_done(h) -#define ffelab_handle_first() ((ffelabHandle) ffelab_list_) -#define ffelab_handle_next(h) ((ffelabHandle) (((ffelab) h)->next)) -#define ffelab_handle_target(h) ((ffelab) h) -#define ffelab_hook(l) ((l)->hook) -#define ffelab_init_0() -#define ffelab_init_1() -#define ffelab_init_2() -#define ffelab_init_4() -#define ffelab_kill(l) ffelab_set_value(l,FFELAB_valueNONE); -#define ffelab_new_generated() (ffelab_new(ffelab_generated_++)) -#define ffelab_number() (ffelab_num_news_) -#define ffelab_set_blocknum(l,b) ((l)->blocknum = (b)) -#define ffelab_set_definition_column(l,cn) ((l)->definition_col = (cn)) -#define ffelab_set_definition_line(l,ln) ((l)->definition_line = (ln)) -#define ffelab_set_doref_column(l,cn) ((l)->doref_col = (cn)) -#define ffelab_set_doref_line(l,ln) ((l)->doref_line = (ln)) -#define ffelab_set_firstref_column(l,cn) ((l)->firstref_col = (cn)) -#define ffelab_set_firstref_line(l,ln) ((l)->firstref_line = (ln)) -#define ffelab_set_hook(l,h) ((l)->hook = (h)) -#define ffelab_set_type(l,t) ((l)->type = (t)) -#define ffelab_terminate_0() -#define ffelab_terminate_1() -#define ffelab_terminate_2() -#define ffelab_terminate_3() -#define ffelab_terminate_4() -#define ffelab_type(l) ((l)->type) -#define ffelab_value(l) ((l)->value) - -/* End of #include file. */ - -#endif /* ! GCC_F_LAB_H */ diff --git a/contrib/gcc/f/lang-specs.h b/contrib/gcc/f/lang-specs.h deleted file mode 100644 index 9ed51ef..0000000 --- a/contrib/gcc/f/lang-specs.h +++ /dev/null @@ -1,47 +0,0 @@ -/* lang-specs.h file for Fortran - Copyright (C) 1995, 1996, 1997, 1999, 2000, 2002, 2003 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - -*/ - -/* This is the contribution to the `default_compilers' array in gcc.c for - g77. */ - - {".F", "@f77-cpp-input", 0}, - {".fpp", "@f77-cpp-input", 0}, - {".FPP", "@f77-cpp-input", 0}, - {"@f77-cpp-input", - "cc1 -E -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options) \ - %{E|M|MM:%(cpp_debug_options)}\ - %{!M:%{!MM:%{!E: -o %|.f |\n\ - f771 %|.f %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}", 0}, - {".r", "@ratfor", 0}, - {"@ratfor", - "%{C:%{!E:%eGCC does not support -C without using -E}}\ - %{CC:%{!E:%eGCC does not support -CC without using -E}}\ - ratfor %{C} %{CC} %{v} %{E:%W{o*}} %{!E: %{!pipe:-o %g.f} %i |\n\ - f771 %m.f %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}", 0}, - {".f", "@f77", 0}, - {".for", "@f77", 0}, - {".FOR", "@f77", 0}, - {"@f77", - "%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0}, diff --git a/contrib/gcc/f/lang.opt b/contrib/gcc/f/lang.opt deleted file mode 100644 index d6a53b7..0000000 --- a/contrib/gcc/f/lang.opt +++ /dev/null @@ -1,402 +0,0 @@ -; Options for the Fortran 77 front end. -; Copyright (C) 2003 Free Software Foundation, Inc. -; -; This file is part of GCC. -; -; GCC is free software; you can redistribute it and/or modify it under -; the terms of the GNU General Public License as published by the Free -; Software Foundation; either version 2, or (at your option) any later -; version. -; -; 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. - -; See c.opt for a description of this file's format. - -; Please try to keep this file in ASCII collating order. - -Language -F77 - -I -F77 Joined -Add a directory for INCLUDE searching - -Wall -F77 -; Documented in C - -Wcomment -F77 - -Wcomments -F77 - -Wglobals -F77 -Enable warnings about inter-procedural problems - -Wimplicit -F77 - -Wimport -F77 - -Wsurprising -F77 -Warn about constructs with surprising meanings - -Wtrigraphs -F77 - -fautomatic -F77 -Do not treat local variables and COMMON blocks as if they were named in SAVE statements - -fbackslash -F77 -Backslashes in character and hollerith constants are special (not C-style) - -fbadu77-intrinsics-delete -F77 RejectNegative -Delete libU77 intrinsics with bad interfaces - -fbadu77-intrinsics-disable -F77 RejectNegative -Disable libU77 intrinsics with bad interfaces - -fbadu77-intrinsics-enable -F77 RejectNegative -Enable libU77 intrinsics with bad interfaces - -fbadu77-intrinsics-hide -F77 RejectNegative -Hide libU77 intrinsics with bad interfaces - -fcase-initcap -F77 RejectNegative -Program written in strict mixed-case - -fcase-lower -F77 RejectNegative -Compile as if program written in lowercase - -fcase-preserve -F77 RejectNegative -Preserve case used in program - -fcase-strict-lower -F77 RejectNegative -Program written in lowercase - -fcase-strict-upper -F77 RejectNegative -Program written in uppercase - -fcase-upper -F77 RejectNegative -Compile as if program written in uppercase - -fdebug-kludge -F77 -Emit special debugging information for COMMON and EQUIVALENCE (disabled) - -fdollar-ok -F77 -Allow '$' in symbol names - -femulate-complex -F77 -Have front end emulate COMPLEX arithmetic to avoid bugs - -ff2c -F77 -f2c-compatible code can be generated - -ff2c-intrinsics-delete -F77 RejectNegative -Delete non-FORTRAN-77 intrinsics f2c supports - -ff2c-intrinsics-disable -F77 RejectNegative -Disable non-FORTRAN-77 intrinsics f2c supports - -ff2c-intrinsics-enable -F77 RejectNegative -Enable non-FORTRAN-77 intrinsics f2c supports - -ff2c-intrinsics-hide -F77 RejectNegative -Hide non-FORTRAN-77 intrinsics f2c supports - -ff2c-library -F77 -Unsupported; generate libf2c-calling code - -ff66 -F77 -Program is written in typical FORTRAN 66 dialect - -ff77 -F77 -Program is written in typical Unix-f77 dialect - -ff90 -F77 -Program is written in Fortran-90-ish dialect - -ff90-intrinsics-delete -F77 RejectNegative -Delete non-FORTRAN-77 intrinsics F90 supports - -ff90-intrinsics-disable -F77 RejectNegative -Disable non-FORTRAN-77 intrinsics F90 supports - -ff90-intrinsics-enable -F77 RejectNegative -Enable non-FORTRAN-77 intrinsics F90 supports - -ff90-intrinsics-hide -F77 RejectNegative -Hide non-FORTRAN-77 intrinsics F90 supports - -ff90-not-vxt -F77 RejectNegative - -ffixed-form -F77 - -ffixed-line-length- -F77 Joined -ffixed-line-length- Set the maximum line length to - -fflatten-arrays -F77 -Unsupported; affects code generation of arrays - -ffortran-bounds-check -F77 -Generate code to check subscript and substring bounds - -ffree-form -F77 -Program is written in Fortran-90-ish free form - -fglobals -F77 -Enable fatal diagnostics about inter-procedural problems - -fgnu-intrinsics-delete -F77 RejectNegative -Delete non-FORTRAN-77 intrinsics g77 supports - -fgnu-intrinsics-disable -F77 RejectNegative -Disable non-FORTRAN 77 intrinsics F90 supports - -fgnu-intrinsics-enable -F77 RejectNegative -Enable non-FORTRAN 77 intrinsics F90 supports - -fgnu-intrinsics-hide -F77 RejectNegative -Hide non-FORTRAN 77 intrinsics F90 supports - -finit-local-zero -F77 -Initialize local vars and arrays to zero - -fintrin-case-any -F77 RejectNegative -Intrinsics letters in arbitrary cases - -fintrin-case-initcap -F77 RejectNegative -Intrinsics spelled as e.g. SqRt - -fintrin-case-lower -F77 RejectNegative -Intrinsics in lowercase - -fintrin-case-upper -F77 RejectNegative -Intrinsics in uppercase - -fmatch-case-any -F77 RejectNegative -Language keyword letters in arbitrary cases - -fmatch-case-initcap -F77 RejectNegative -Language keywords spelled as e.g. IOStat - -fmatch-case-lower -F77 RejectNegative -Language keywords in lowercase - -fmatch-case-upper -F77 RejectNegative -Language keywords in uppercase - -fmil-intrinsics-delete -F77 RejectNegative -Delete MIL-STD 1753 intrinsics - -fmil-intrinsics-disable -F77 RejectNegative -Disable MIL-STD 1753 intrinsics - -fmil-intrinsics-enable -F77 RejectNegative -Enable MIL-STD 1753 intrinsics - -fmil-intrinsics-hide -F77 RejectNegative -Hide MIL-STD 1753 intrinsics - -fonetrip -F77 -Take at least one trip through each iterative DO loop - -fpedantic -F77 -Warn about use of (only a few for now) Fortran extensions - -fpreprocessed -F77 - -fsecond-underscore -F77 -Allow appending a second underscore to externals - -fsilent -F77 -Do not print names of program units as they are compiled - -fsource-case-lower -F77 RejectNegative -Internally convert most source to lowercase - -fsource-case-preserve -F77 RejectNegative -Internally preserve source case - -fsource-case-upper -F77 RejectNegative -Internally convert most source to uppercase - -fsymbol-case-any -F77 RejectNegative - -fsymbol-case-initcap -F77 RejectNegative -Symbol names spelled in mixed case - -fsymbol-case-lower -F77 RejectNegative -Symbol names in lowercase - -fsymbol-case-upper -F77 RejectNegative -Symbol names in uppercase - -ftypeless-boz -F77 -Make prefix-radix non-decimal constants be typeless - -fugly -F77 -Allow all ugly features - -fugly-args -F77 -Hollerith and typeless can be passed as arguments - -fugly-assign -F77 -Allow ordinary copying of ASSIGN'ed vars - -fugly-assumed -F77 -Dummy array dimensioned to (1) is assumed-size - -fugly-comma -F77 -Trailing comma in procedure call denotes null argument - -fugly-complex -F77 -Allow REAL(Z) and AIMAG(Z) given DOUBLE COMPLEX Z - -fugly-init -F77 -Initialization via DATA and PARAMETER is not type-compatible - -fugly-logint -F77 -Allow INTEGER and LOGICAL interchangeability - -funderscoring -F77 -Append underscores to externals - -funix-intrinsics-delete -F77 RejectNegative -Delete libU77 intrinsics - -funix-intrinsics-disable -F77 RejectNegative -Disable libU77 intrinsics - -funix-intrinsics-enable -F77 RejectNegative -Enable libU77 intrinsics - -funix-intrinsics-hide -F77 RejectNegative -Hide libU77 intrinsics - -fversion -F77 RejectNegative -Print g77-specific version information and run internal tests - -fvxt -F77 -Program is written in VXT (Digital-like) FORTRAN - -fvxt-intrinsics-delete -F77 RejectNegative -Delete non-FORTRAN-77 intrinsics VXT FORTRAN supports - -fvxt-intrinsics-disable -F77 RejectNegative -Disable non-FORTRAN-77 intrinsics VXT FORTRAN supports - -fvxt-intrinsics-enable -F77 RejectNegative -Enable non-FORTRAN-77 intrinsics VXT FORTRAN supports - -fvxt-intrinsics-hide -F77 RejectNegative -Hide non-FORTRAN-77 intrinsics VXT FORTRAN supports - -fvxt-not-f90 -F77 RejectNegative - -fxyzzy -F77 -Print internal debugging-related information - -fzeros -F77 -Treat initial values of 0 like non-zero values - -; This comment is to ensure we retain the blank line above. diff --git a/contrib/gcc/f/lex.c b/contrib/gcc/f/lex.c deleted file mode 100644 index 8475d2f..0000000 --- a/contrib/gcc/f/lex.c +++ /dev/null @@ -1,4571 +0,0 @@ -/* Implementation of Fortran lexer - Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - -#include "proj.h" -#include "top.h" -#include "bad.h" -#include "com.h" -#include "lex.h" -#include "malloc.h" -#include "src.h" -#include "debug.h" -#include "flags.h" -#include "input.h" -#include "toplev.h" -#include "output.h" -#include "ggc.h" - -static void ffelex_append_to_token_ (char c); -static int ffelex_backslash_ (int c, ffewhereColumnNumber col); -static void ffelex_bad_1_ (ffebad errnum, ffewhereLineNumber ln0, - ffewhereColumnNumber cn0); -static void ffelex_bad_2_ (ffebad errnum, ffewhereLineNumber ln0, - ffewhereColumnNumber cn0, ffewhereLineNumber ln1, - ffewhereColumnNumber cn1); -static void ffelex_bad_here_ (int num, ffewhereLineNumber ln0, - ffewhereColumnNumber cn0); -static void ffelex_finish_statement_ (void); -static int ffelex_get_directive_line_ (char **text, FILE *finput); -static int ffelex_hash_ (FILE *f); -static ffewhereColumnNumber ffelex_image_char_ (int c, - ffewhereColumnNumber col); -static void ffelex_include_ (void); -static bool ffelex_is_free_char_ctx_contin_ (ffewhereColumnNumber col); -static bool ffelex_is_free_nonc_ctx_contin_ (ffewhereColumnNumber col); -static void ffelex_next_line_ (void); -static void ffelex_prepare_eos_ (void); -static void ffelex_send_token_ (void); -static ffelexHandler ffelex_swallow_tokens_ (ffelexToken t); -static ffelexToken ffelex_token_new_ (void); - -/* Pertaining to the geometry of the input file. */ - -/* Initial size for card image to be allocated. */ -#define FFELEX_columnINITIAL_SIZE_ 255 - -/* The card image itself, which grows as source lines get longer. It - has room for ffelex_card_size_ + 8 characters, and the length of the - current image is ffelex_card_length_. (The + 8 characters are made - available for easy handling of tabs and such.) */ -static char *ffelex_card_image_; -static ffewhereColumnNumber ffelex_card_size_; -static ffewhereColumnNumber ffelex_card_length_; - -/* Max width for free-form lines (ISO F90). */ -#define FFELEX_FREE_MAX_COLUMNS_ 132 - -/* True if we saw a tab on the current line, as this (currently) means - the line is therefore treated as though final_nontab_column_ were - infinite. */ -static bool ffelex_saw_tab_; - -/* TRUE if current line is known to be erroneous, so don't bother - expanding room for it just to display it. */ -static bool ffelex_bad_line_ = FALSE; - -/* Last column for vanilla, i.e. non-tabbed, line. Usually 72 or 132. */ -static ffewhereColumnNumber ffelex_final_nontab_column_; - -/* Array for quickly deciding what kind of line the current card has, - based on its first character. */ -static ffelexType ffelex_first_char_[256]; - -/* Pertaining to file management. */ - -/* The wf argument of the most recent active ffelex_file_(fixed,free) - function. */ -static GTY (()) ffewhereFile ffelex_current_wf_; - -/* TRUE if an INCLUDE statement can be processed (ffelex_set_include - can be called). */ -static bool ffelex_permit_include_; - -/* TRUE if an INCLUDE statement is pending (ffelex_set_include has been - called). */ -static bool ffelex_set_include_; - -/* Information on the pending INCLUDE file. */ -static FILE *ffelex_include_file_; -static bool ffelex_include_free_form_; -static GTY(()) ffewhereFile ffelex_include_wherefile_; - -/* Current master line count. */ -static ffewhereLineNumber ffelex_linecount_current_; -/* Next master line count. */ -static ffewhereLineNumber ffelex_linecount_next_; - -/* ffewhere info on the latest (currently active) line read from the - active source file. */ -static ffewhereLine ffelex_current_wl_; -static ffewhereColumn ffelex_current_wc_; - -/* Pertaining to tokens in general. */ - -/* Initial capacity for text in a CHARACTER/HOLLERITH/NAME/NAMES/NUMBER - token. */ -#define FFELEX_columnTOKEN_SIZE_ 63 -#if FFELEX_columnTOKEN_SIZE_ < FFEWHERE_indexMAX -#error "token size too small!" -#endif - -/* Current token being lexed. */ -static ffelexToken ffelex_token_; - -/* Handler for current token. */ -static ffelexHandler ffelex_handler_; - -/* TRUE if fixed-form lexer is to generate NAMES instead of NAME tokens. */ -static bool ffelex_names_; - -/* TRUE if both lexers are to generate NAMES instead of NAME tokens. */ -static bool ffelex_names_pure_; - -/* TRUE if 0-9 starts a NAME token instead of NUMBER, for parsing hex - numbers. */ -static bool ffelex_hexnum_; - -/* For ffelex_swallow_tokens(). */ -static ffelexHandler ffelex_eos_handler_; - -/* Number of tokens sent since last EOS or beginning of input file - (include INCLUDEd files). */ -static unsigned long int ffelex_number_of_tokens_; - -/* Number of labels sent (as NUMBER tokens) since last reset of - ffelex_number_of_tokens_ to 0, should be 0 or 1 in most cases. - (Fixed-form source only.) */ -static unsigned long int ffelex_label_tokens_; - -/* Metering for token management, to catch token-memory leaks. */ -static long int ffelex_total_tokens_ = 0; -static long int ffelex_old_total_tokens_ = 1; -static long int ffelex_token_nextid_ = 0; - -/* Pertaining to lexing CHARACTER and HOLLERITH tokens. */ - -/* >0 if a Hollerith constant of that length might be in mid-lex, used - when the next character seen is 'H' or 'h' to enter HOLLERITH lexing - mode (see ffelex_raw_mode_). */ -static long int ffelex_expecting_hollerith_; - -/* -3: Backslash (escape) sequence being lexed in CHARACTER. - -2: Possible closing apostrophe/quote seen in CHARACTER. - -1: Lexing CHARACTER. - 0: Not lexing CHARACTER or HOLLERITH. - >0: Lexing HOLLERITH, value is # chars remaining to expect. */ -static long int ffelex_raw_mode_; - -/* When lexing CHARACTER, open quote/apostrophe (either ' or "). */ -static char ffelex_raw_char_; - -/* TRUE when backslash processing had to use most recent character - to finish its state engine, but that character is not part of - the backslash sequence, so must be reconsidered as a "normal" - character in CHARACTER/HOLLERITH lexing. */ -static bool ffelex_backslash_reconsider_ = FALSE; - -/* Characters preread before lexing happened (might include EOF). */ -static int *ffelex_kludge_chars_ = NULL; - -/* Doing the kludge processing, so not initialized yet. */ -static bool ffelex_kludge_flag_ = FALSE; - -/* The beginning of a (possible) CHARACTER/HOLLERITH token. */ -static ffewhereLine ffelex_raw_where_line_; -static ffewhereColumn ffelex_raw_where_col_; - - -/* Call this to append another character to the current token. If it isn't - currently big enough for it, it will be enlarged. The current token - must be a CHARACTER, HOLLERITH, NAME, NAMES, or NUMBER. */ - -static void -ffelex_append_to_token_ (char c) -{ - if (ffelex_token_->text == NULL) - { - ffelex_token_->text - = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - FFELEX_columnTOKEN_SIZE_ + 1); - ffelex_token_->size = FFELEX_columnTOKEN_SIZE_; - ffelex_token_->length = 0; - } - else if (ffelex_token_->length >= ffelex_token_->size) - { - ffelex_token_->text - = malloc_resize_ksr (malloc_pool_image (), - ffelex_token_->text, - (ffelex_token_->size << 1) + 1, - ffelex_token_->size + 1); - ffelex_token_->size <<= 1; - assert (ffelex_token_->length < ffelex_token_->size); - } - ffelex_token_->text[ffelex_token_->length++] = c; -} - -/* Do backslash (escape) processing for a CHARACTER/HOLLERITH token - being lexed. */ - -static int -ffelex_backslash_ (int c, ffewhereColumnNumber col) -{ - static int state = 0; - static unsigned int count; - static int code; - static unsigned int firstdig = 0; - static int nonnull; - static ffewhereLineNumber line; - static ffewhereColumnNumber column; - - /* See gcc/c-lex.c readescape() for a straightforward version - of this state engine for handling backslashes in character/ - hollerith constants. */ - -#define wide_flag 0 - - switch (state) - { - case 0: - if ((c == '\\') - && (ffelex_raw_mode_ != 0) - && ffe_is_backslash ()) - { - state = 1; - column = col + 1; - line = ffelex_linecount_current_; - return EOF; - } - return c; - - case 1: - state = 0; /* Assume simple case. */ - switch (c) - { - case 'x': - code = 0; - count = 0; - nonnull = 0; - state = 2; - return EOF; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': - code = c - '0'; - count = 1; - state = 3; - return EOF; - - case '\\': case '\'': case '"': - return c; - -#if 0 /* Inappropriate for Fortran. */ - case '\n': - ffelex_next_line_ (); - *ignore_ptr = 1; - return 0; -#endif - - case 'n': - return TARGET_NEWLINE; - - case 't': - return TARGET_TAB; - - case 'r': - return TARGET_CR; - - case 'f': - return TARGET_FF; - - case 'b': - return TARGET_BS; - - case 'a': - return TARGET_BELL; - - case 'v': - return TARGET_VT; - - case 'e': - case 'E': - case '(': - case '{': - case '[': - case '%': - if (pedantic) - { - char m[2]; - - m[0] = c; - m[1] = '\0'; - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("Non-ISO-C-standard escape sequence `\\%A' at %0", - FFEBAD_severityPEDANTIC); - ffelex_bad_here_ (0, line, column); - ffebad_string (m); - ffebad_finish (); - } - return (c == 'E' || c == 'e') ? 033 : c; - - case '?': - return c; - - default: - if (c >= 040 && c < 0177) - { - char m[2]; - - m[0] = c; - m[1] = '\0'; - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("Unknown escape sequence `\\%A' at %0", - FFEBAD_severityPEDANTIC); - ffelex_bad_here_ (0, line, column); - ffebad_string (m); - ffebad_finish (); - } - else if (c == EOF) - { - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("Unterminated escape sequence `\\' at %0", - FFEBAD_severityPEDANTIC); - ffelex_bad_here_ (0, line, column); - ffebad_finish (); - } - else - { - char m[20]; - - sprintf (&m[0], "%x", c); - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("Unknown escape sequence `\\' followed by char code 0x%A at %0", - FFEBAD_severityPEDANTIC); - ffelex_bad_here_ (0, line, column); - ffebad_string (m); - ffebad_finish (); - } - } - return c; - - case 2: - if (ISXDIGIT (c)) - { - code = (code * 16) + hex_value (c); - if (code != 0 || count != 0) - { - if (count == 0) - firstdig = code; - count++; - } - nonnull = 1; - return EOF; - } - - state = 0; - - if (! nonnull) - { - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("\\x used at %0 with no following hex digits", - FFEBAD_severityFATAL); - ffelex_bad_here_ (0, line, column); - ffebad_finish (); - } - else if (count == 0) - /* Digits are all 0's. Ok. */ - ; - else if ((count - 1) * 4 >= TYPE_PRECISION (integer_type_node) - || (count > 1 - && ((1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4)) - <= (int) firstdig))) - { - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("Hex escape at %0 out of range", - FFEBAD_severityPEDANTIC); - ffelex_bad_here_ (0, line, column); - ffebad_finish (); - } - break; - - case 3: - if ((c <= '7') && (c >= '0') && (count++ < 3)) - { - code = (code * 8) + (c - '0'); - return EOF; - } - state = 0; - break; - - default: - assert ("bad backslash state" == NULL); - abort (); - } - - /* Come here when code has a built character, and c is the next - character that might (or might not) be the next one in the constant. */ - - /* Don't bother doing this check for each character going into - CHARACTER or HOLLERITH constants, just the escaped-value ones. - gcc apparently checks every single character, which seems - like it'd be kinda slow and not worth doing anyway. */ - - if (!wide_flag - && TYPE_PRECISION (char_type_node) < HOST_BITS_PER_INT - && code >= (1 << TYPE_PRECISION (char_type_node))) - { - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("Escape sequence at %0 out of range for character", - FFEBAD_severityFATAL); - ffelex_bad_here_ (0, line, column); - ffebad_finish (); - } - - if (c == EOF) - { - /* Known end of constant, just append this character. */ - ffelex_append_to_token_ (code); - if (ffelex_raw_mode_ > 0) - --ffelex_raw_mode_; - return EOF; - } - - /* Have two characters to handle. Do the first, then leave it to the - caller to detect anything special about the second. */ - - ffelex_append_to_token_ (code); - if (ffelex_raw_mode_ > 0) - --ffelex_raw_mode_; - ffelex_backslash_reconsider_ = TRUE; - return c; -} - -/* ffelex_bad_1_ -- Issue diagnostic with one source point - - ffelex_bad_1_(FFEBAD_SOME_ERROR,ffelex_linecount_current_,column + 1); - - Creates ffewhere line and column objects for the source point, sends them - along with the error code to ffebad, then kills the line and column - objects before returning. */ - -static void -ffelex_bad_1_ (ffebad errnum, ffewhereLineNumber ln0, ffewhereColumnNumber cn0) -{ - ffewhereLine wl0; - ffewhereColumn wc0; - - wl0 = ffewhere_line_new (ln0); - wc0 = ffewhere_column_new (cn0); - ffebad_start_lex (errnum); - ffebad_here (0, wl0, wc0); - ffebad_finish (); - ffewhere_line_kill (wl0); - ffewhere_column_kill (wc0); -} - -/* ffelex_bad_2_ -- Issue diagnostic with two source points - - ffelex_bad_2_(FFEBAD_SOME_ERROR,ffelex_linecount_current_,column + 1, - otherline,othercolumn); - - Creates ffewhere line and column objects for the source points, sends them - along with the error code to ffebad, then kills the line and column - objects before returning. */ - -static void -ffelex_bad_2_ (ffebad errnum, ffewhereLineNumber ln0, ffewhereColumnNumber cn0, - ffewhereLineNumber ln1, ffewhereColumnNumber cn1) -{ - ffewhereLine wl0, wl1; - ffewhereColumn wc0, wc1; - - wl0 = ffewhere_line_new (ln0); - wc0 = ffewhere_column_new (cn0); - wl1 = ffewhere_line_new (ln1); - wc1 = ffewhere_column_new (cn1); - ffebad_start_lex (errnum); - ffebad_here (0, wl0, wc0); - ffebad_here (1, wl1, wc1); - ffebad_finish (); - ffewhere_line_kill (wl0); - ffewhere_column_kill (wc0); - ffewhere_line_kill (wl1); - ffewhere_column_kill (wc1); -} - -static void -ffelex_bad_here_ (int n, ffewhereLineNumber ln0, - ffewhereColumnNumber cn0) -{ - ffewhereLine wl0; - ffewhereColumn wc0; - - wl0 = ffewhere_line_new (ln0); - wc0 = ffewhere_column_new (cn0); - ffebad_here (n, wl0, wc0); - ffewhere_line_kill (wl0); - ffewhere_column_kill (wc0); -} - -static int -ffelex_getc_ (FILE *finput) -{ - int c; - - if (ffelex_kludge_chars_ == NULL) - return getc (finput); - - c = *ffelex_kludge_chars_++; - if (c != 0) - return c; - - ffelex_kludge_chars_ = NULL; - return getc (finput); -} - -static int -ffelex_cfebackslash_ (int *use_d, int *d, FILE *finput) -{ - register int c = getc (finput); - register int code; - register unsigned count; - unsigned firstdig = 0; - int nonnull; - - *use_d = 0; - - switch (c) - { - case 'x': - code = 0; - count = 0; - nonnull = 0; - while (1) - { - c = getc (finput); - if (! ISXDIGIT (c)) - { - *use_d = 1; - *d = c; - break; - } - code = (code * 16) + hex_value (c); - if (code != 0 || count != 0) - { - if (count == 0) - firstdig = code; - count++; - } - nonnull = 1; - } - if (! nonnull) - error ("\\x used with no following hex digits"); - else if (count == 0) - /* Digits are all 0's. Ok. */ - ; - else if ((count - 1) * 4 >= TYPE_PRECISION (integer_type_node) - || (count > 1 - && (((unsigned) 1 - << (TYPE_PRECISION (integer_type_node) - (count - 1) - * 4)) - <= firstdig))) - pedwarn ("hex escape out of range"); - return code; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': - code = 0; - count = 0; - while ((c <= '7') && (c >= '0') && (count++ < 3)) - { - code = (code * 8) + (c - '0'); - c = getc (finput); - } - *use_d = 1; - *d = c; - return code; - - case '\\': case '\'': case '"': - return c; - - case '\n': - ffelex_next_line_ (); - *use_d = 2; - return 0; - - case EOF: - *use_d = 1; - *d = EOF; - return EOF; - - case 'n': - return TARGET_NEWLINE; - - case 't': - return TARGET_TAB; - - case 'r': - return TARGET_CR; - - case 'f': - return TARGET_FF; - - case 'b': - return TARGET_BS; - - case 'a': - return TARGET_BELL; - - case 'v': - return TARGET_VT; - - case 'e': - case 'E': - if (pedantic) - pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c); - return 033; - - case '?': - return c; - - /* `\(', etc, are used at beginning of line to avoid confusing Emacs. */ - case '(': - case '{': - case '[': - /* `\%' is used to prevent SCCS from getting confused. */ - case '%': - if (pedantic) - pedwarn ("non-ISO escape sequence `\\%c'", c); - return c; - } - if (c >= 040 && c < 0177) - pedwarn ("unknown escape sequence `\\%c'", c); - else - pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c); - return c; -} - -/* A miniature version of the C front-end lexer. */ - -static int -ffelex_cfelex_ (ffelexToken *xtoken, FILE *finput, int c) -{ - ffelexToken token; - char buff[129]; - char *p; - char *q; - char *r; - register unsigned buffer_length; - - if ((*xtoken != NULL) && !ffelex_kludge_flag_) - ffelex_token_kill (*xtoken); - - switch (c) - { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - buffer_length = ARRAY_SIZE (buff); - p = &buff[0]; - q = p; - r = &buff[buffer_length]; - for (;;) - { - *p++ = c; - if (p >= r) - { - register unsigned bytes_used = (p - q); - - buffer_length *= 2; - if (q == &buff[0]) - { - q = xmalloc (buffer_length); - memcpy (q, buff, bytes_used); - } - else - q = xrealloc (q, buffer_length); - p = &q[bytes_used]; - r = &q[buffer_length]; - } - c = ffelex_getc_ (finput); - if (! ISDIGIT (c)) - break; - } - *p = '\0'; - token = ffelex_token_new_number (q, ffewhere_line_unknown (), - ffewhere_column_unknown ()); - - if (q != &buff[0]) - free (q); - - break; - - case '\"': - buffer_length = ARRAY_SIZE (buff); - p = &buff[0]; - q = p; - r = &buff[buffer_length]; - c = ffelex_getc_ (finput); - for (;;) - { - bool done = FALSE; - int use_d = 0; - int d = 0; - - switch (c) - { - case '\"': - c = getc (finput); - done = TRUE; - break; - - case '\\': /* ~~~~~ */ - c = ffelex_cfebackslash_ (&use_d, &d, finput); - break; - - case EOF: - case '\n': - error ("badly formed directive -- no closing quote"); - done = TRUE; - break; - - default: - break; - } - if (done) - break; - - if (use_d != 2) /* 0=>c, 1=>cd, 2=>nil. */ - { - *p++ = c; - if (p >= r) - { - register unsigned bytes_used = (p - q); - - buffer_length = bytes_used * 2; - if (q == &buff[0]) - { - q = xmalloc (buffer_length); - memcpy (q, buff, bytes_used); - } - else - q = xrealloc (q, buffer_length); - p = &q[bytes_used]; - r = &q[buffer_length]; - } - } - if (use_d == 1) - c = d; - else - c = getc (finput); - } - *p = '\0'; - token = ffelex_token_new_character (q, ffewhere_line_unknown (), - ffewhere_column_unknown ()); - - if (q != &buff[0]) - free (q); - - break; - - default: - token = NULL; - break; - } - - *xtoken = token; - return c; -} - -static void -ffelex_file_pop_ (const char *filename) -{ - if (input_file_stack->next) - { - struct file_stack *p = input_file_stack; - input_file_stack = p->next; - free (p); - input_file_stack_tick++; - (*debug_hooks->end_source_file) (input_file_stack->location.line); - } - else - error ("#-lines for entering and leaving files don't match"); - - /* Now that we've pushed or popped the input stack, - update the name in the top element. */ - if (input_file_stack) - input_file_stack->location.file = filename; -} - -static void -ffelex_file_push_ (int old_lineno, const char *filename) -{ - struct file_stack *p = xmalloc (sizeof (struct file_stack)); - - input_file_stack->location.line = old_lineno; - p->next = input_file_stack; - p->location.file = filename; - input_file_stack = p; - input_file_stack_tick++; - - (*debug_hooks->start_source_file) (0, filename); - - /* Now that we've pushed or popped the input stack, - update the name in the top element. */ - if (input_file_stack) - input_file_stack->location.file = filename; -} - -/* Prepare to finish a statement-in-progress by sending the current - token, if any, then setting up EOS as the current token with the - appropriate current pointer. The caller can then move the current - pointer before actually sending EOS, if desired, as it is in - typical fixed-form cases. */ - -static void -ffelex_prepare_eos_ (void) -{ - if (ffelex_token_->type != FFELEX_typeNONE) - { - ffelex_backslash_ (EOF, 0); - - switch (ffelex_raw_mode_) - { - case -2: - break; - - case -1: - ffebad_start_lex ((ffelex_raw_char_ == '\'') ? FFEBAD_NO_CLOSING_APOSTROPHE - : FFEBAD_NO_CLOSING_QUOTE); - ffebad_here (0, ffelex_token_->where_line, ffelex_token_->where_col); - ffebad_here (1, ffelex_current_wl_, ffelex_current_wc_); - ffebad_finish (); - break; - - case 0: - break; - - default: - { - char num[20]; - - ffebad_start_lex (FFEBAD_NOT_ENOUGH_HOLLERITH_CHARS); - ffebad_here (0, ffelex_token_->where_line, ffelex_token_->where_col); - ffebad_here (1, ffelex_current_wl_, ffelex_current_wc_); - sprintf (num, "%lu", (unsigned long) ffelex_raw_mode_); - ffebad_string (num); - ffebad_finish (); - /* Make sure the token has some text, might as well fill up with spaces. */ - do - { - ffelex_append_to_token_ (' '); - } while (--ffelex_raw_mode_ > 0); - break; - } - } - ffelex_raw_mode_ = 0; - ffelex_send_token_ (); - } - ffelex_token_->type = FFELEX_typeEOS; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_use (ffelex_current_wc_); -} - -static void -ffelex_finish_statement_ (void) -{ - if ((ffelex_number_of_tokens_ == 0) - && (ffelex_token_->type == FFELEX_typeNONE)) - return; /* Don't have a statement pending. */ - - if (ffelex_token_->type != FFELEX_typeEOS) - ffelex_prepare_eos_ (); - - ffelex_permit_include_ = TRUE; - ffelex_send_token_ (); - ffelex_permit_include_ = FALSE; - ffelex_number_of_tokens_ = 0; - ffelex_label_tokens_ = 0; - ffelex_names_ = TRUE; - ffelex_names_pure_ = FALSE; /* Probably not necessary. */ - ffelex_hexnum_ = FALSE; - - if (!ffe_is_ffedebug ()) - return; - - /* For debugging purposes only. */ - - if (ffelex_total_tokens_ != ffelex_old_total_tokens_) - { - fprintf (dmpout, "; token_track had %ld tokens, now have %ld.\n", - ffelex_old_total_tokens_, ffelex_total_tokens_); - ffelex_old_total_tokens_ = ffelex_total_tokens_; - } -} - -/* Copied from gcc/c-common.c get_directive_line. */ - -static int -ffelex_get_directive_line_ (char **text, FILE *finput) -{ - static char *directive_buffer = NULL; - static unsigned buffer_length = 0; - register char *p; - register char *buffer_limit; - register int looking_for = 0; - register int char_escaped = 0; - - if (buffer_length == 0) - { - directive_buffer = xmalloc (128); - buffer_length = 128; - } - - buffer_limit = &directive_buffer[buffer_length]; - - for (p = directive_buffer; ; ) - { - int c; - - /* Make buffer bigger if it is full. */ - if (p >= buffer_limit) - { - register unsigned bytes_used = (p - directive_buffer); - - buffer_length *= 2; - directive_buffer = xrealloc (directive_buffer, buffer_length); - p = &directive_buffer[bytes_used]; - buffer_limit = &directive_buffer[buffer_length]; - } - - c = getc (finput); - - /* Discard initial whitespace. */ - if ((c == ' ' || c == '\t') && p == directive_buffer) - continue; - - /* Detect the end of the directive. */ - if ((c == '\n' && looking_for == 0) - || c == EOF) - { - if (looking_for != 0) - error ("bad directive -- missing close-quote"); - - *p++ = '\0'; - *text = directive_buffer; - return c; - } - - *p++ = c; - if (c == '\n') - ffelex_next_line_ (); - - /* Handle string and character constant syntax. */ - if (looking_for) - { - if (looking_for == c && !char_escaped) - looking_for = 0; /* Found terminator... stop looking. */ - } - else - if (c == '\'' || c == '"') - looking_for = c; /* Don't stop buffering until we see another - one of these (or an EOF). */ - - /* Handle backslash. */ - char_escaped = (c == '\\' && ! char_escaped); - } -} - -/* Handle # directives that make it through (or are generated by) the - preprocessor. As much as reasonably possible, emulate the behavior - of the gcc compiler phase cc1, though interactions between #include - and INCLUDE might possibly produce bizarre results in terms of - error reporting and the generation of debugging info vis-a-vis the - locations of some things. - - Returns the next character unhandled, which is always newline or EOF. */ - -static int -ffelex_hash_ (FILE *finput) -{ - register int c; - ffelexToken token = NULL; - - /* Read first nonwhite char after the `#'. */ - - c = ffelex_getc_ (finput); - while (c == ' ' || c == '\t') - c = ffelex_getc_ (finput); - - /* If a letter follows, then if the word here is `line', skip - it and ignore it; otherwise, ignore the line, with an error - if the word isn't `pragma', `ident', `define', or `undef'. */ - - if (ISALPHA(c)) - { - if (c == 'p') - { - if (getc (finput) == 'r' - && getc (finput) == 'a' - && getc (finput) == 'g' - && getc (finput) == 'm' - && getc (finput) == 'a' - && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n' - || c == EOF)) - { - goto skipline; - } - } - else if (c == 'd') - { - if (getc (finput) == 'e' - && getc (finput) == 'f' - && getc (finput) == 'i' - && getc (finput) == 'n' - && getc (finput) == 'e' - && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n' - || c == EOF)) - { - char *text; - - c = ffelex_get_directive_line_ (&text, finput); - - if (debug_info_level == DINFO_LEVEL_VERBOSE) - (*debug_hooks->define) (input_line, text); - - goto skipline; - } - } - else if (c == 'u') - { - if (getc (finput) == 'n' - && getc (finput) == 'd' - && getc (finput) == 'e' - && getc (finput) == 'f' - && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n' - || c == EOF)) - { - char *text; - - c = ffelex_get_directive_line_ (&text, finput); - - if (debug_info_level == DINFO_LEVEL_VERBOSE) - (*debug_hooks->undef) (input_line, text); - - goto skipline; - } - } - else if (c == 'l') - { - if (getc (finput) == 'i' - && getc (finput) == 'n' - && getc (finput) == 'e' - && ((c = getc (finput)) == ' ' || c == '\t')) - goto linenum; - } - else if (c == 'i') - { - if (getc (finput) == 'd' - && getc (finput) == 'e' - && getc (finput) == 'n' - && getc (finput) == 't' - && ((c = getc (finput)) == ' ' || c == '\t')) - { - /* #ident. The pedantic warning is now in cpp. */ - - /* Here we have just seen `#ident '. - A string constant should follow. */ - - while (c == ' ' || c == '\t') - c = getc (finput); - - /* If no argument, ignore the line. */ - if (c == '\n' || c == EOF) - return c; - - c = ffelex_cfelex_ (&token, finput, c); - - if ((token == NULL) - || (ffelex_token_type (token) != FFELEX_typeCHARACTER)) - { - error ("invalid #ident"); - goto skipline; - } - - if (! flag_no_ident) - { -#ifdef ASM_OUTPUT_IDENT - ASM_OUTPUT_IDENT (asm_out_file, - ffelex_token_text (token)); -#endif - } - - /* Skip the rest of this line. */ - goto skipline; - } - } - - error ("undefined or invalid # directive"); - goto skipline; - } - - linenum: - /* Here we have either `#line' or `# '. - In either case, it should be a line number; a digit should follow. */ - - while (c == ' ' || c == '\t') - c = ffelex_getc_ (finput); - - /* If the # is the only nonwhite char on the line, - just ignore it. Check the new newline. */ - if (c == '\n' || c == EOF) - return c; - - /* Something follows the #; read a token. */ - - c = ffelex_cfelex_ (&token, finput, c); - - if ((token != NULL) - && (ffelex_token_type (token) == FFELEX_typeNUMBER)) - { - location_t old_loc = input_location; - ffewhereFile wf; - - /* subtract one, because it is the following line that - gets the specified number */ - int l = atoi (ffelex_token_text (token)) - 1; - - /* Is this the last nonwhite stuff on the line? */ - while (c == ' ' || c == '\t') - c = ffelex_getc_ (finput); - if (c == '\n' || c == EOF) - { - /* No more: store the line number and check following line. */ - input_line = l; - if (!ffelex_kludge_flag_) - { - ffewhere_file_set (NULL, TRUE, (ffewhereLineNumber) l); - - if (token != NULL) - ffelex_token_kill (token); - } - return c; - } - - /* More follows: it must be a string constant (filename). */ - - /* Read the string constant. */ - c = ffelex_cfelex_ (&token, finput, c); - - if ((token == NULL) - || (ffelex_token_type (token) != FFELEX_typeCHARACTER)) - { - error ("invalid #line"); - goto skipline; - } - - input_line = l; - - if (ffelex_kludge_flag_) - input_filename = ggc_strdup (ffelex_token_text (token)); - else - { - wf = ffewhere_file_new (ffelex_token_text (token), - ffelex_token_length (token)); - input_filename = ffewhere_file_name (wf); - ffewhere_file_set (wf, TRUE, (ffewhereLineNumber) l); - } - -#if 0 /* Not sure what g77 should do with this yet. */ - /* Each change of file name - reinitializes whether we are now in a system header. */ - in_system_header = 0; -#endif - - if (main_input_filename == 0) - main_input_filename = input_filename; - - /* Is this the last nonwhite stuff on the line? */ - while (c == ' ' || c == '\t') - c = getc (finput); - if (c == '\n' || c == EOF) - { - if (!ffelex_kludge_flag_) - { - /* Update the name in the top element of input_file_stack. */ - if (input_file_stack) - input_file_stack->location.file = input_filename; - - if (token != NULL) - ffelex_token_kill (token); - } - return c; - } - - c = ffelex_cfelex_ (&token, finput, c); - - /* `1' after file name means entering new file. - `2' after file name means just left a file. */ - - if ((token != NULL) - && (ffelex_token_type (token) == FFELEX_typeNUMBER)) - { - int num = atoi (ffelex_token_text (token)); - - if (ffelex_kludge_flag_) - { - input_line = 1; - input_filename = old_loc.file; - error ("use `#line ...' instead of `# ...' in first line"); - } - - if (num == 1) - { - /* Pushing to a new file. */ - ffelex_file_push_ (old_loc.line, input_filename); - } - else if (num == 2) - { - /* Popping out of a file. */ - ffelex_file_pop_ (input_filename); - } - - /* Is this the last nonwhite stuff on the line? */ - while (c == ' ' || c == '\t') - c = getc (finput); - if (c == '\n' || c == EOF) - { - if (token != NULL) - ffelex_token_kill (token); - return c; - } - - c = ffelex_cfelex_ (&token, finput, c); - } - - /* `3' after file name means this is a system header file. */ - -#if 0 /* Not sure what g77 should do with this yet. */ - if ((token != NULL) - && (ffelex_token_type (token) == FFELEX_typeNUMBER) - && (atoi (ffelex_token_text (token)) == 3)) - in_system_header = 1; -#endif - - while (c == ' ' || c == '\t') - c = getc (finput); - if (((token != NULL) - || (c != '\n' && c != EOF)) - && ffelex_kludge_flag_) - { - input_line = 1; - input_filename = old_loc.file; - error ("use `#line ...' instead of `# ...' in first line"); - } - if (c == '\n' || c == EOF) - { - if (token != NULL && !ffelex_kludge_flag_) - ffelex_token_kill (token); - return c; - } - } - else - error ("invalid #-line"); - - /* skip the rest of this line. */ - skipline: - if ((token != NULL) && !ffelex_kludge_flag_) - ffelex_token_kill (token); - while ((c = getc (finput)) != EOF && c != '\n') - ; - return c; -} - -/* "Image" a character onto the card image, return incremented column number. - - Normally invoking this function as in - column = ffelex_image_char_ (c, column); - is the same as doing: - ffelex_card_image_[column++] = c; - - However, tabs and carriage returns are handled specially, to preserve - the visual "image" of the input line (in most editors) in the card - image. - - Carriage returns are ignored, as they are assumed to be followed - by newlines. - - A tab is handled by first doing: - ffelex_card_image_[column++] = ' '; - That is, it translates to at least one space. Then, as many spaces - are imaged as necessary to bring the column number to the next tab - position, where tab positions start in the ninth column and each - eighth column afterwards. ALSO, a static var named ffelex_saw_tab_ - is set to TRUE to notify the lexer that a tab was seen. - - Columns are numbered and tab stops set as illustrated below: - - 012345670123456701234567... - x y z - xx yy zz - ... - xxxxxxx yyyyyyy zzzzzzz - xxxxxxxx yyyyyyyy... */ - -static ffewhereColumnNumber -ffelex_image_char_ (int c, ffewhereColumnNumber column) -{ - ffewhereColumnNumber old_column = column; - - if (column >= ffelex_card_size_) - { - ffewhereColumnNumber newmax = ffelex_card_size_ << 1; - - if (ffelex_bad_line_) - return column; - - if ((newmax >> 1) != ffelex_card_size_) - { /* Overflowed column number. */ - overflow: /* :::::::::::::::::::: */ - - ffelex_bad_line_ = TRUE; - strcpy (&ffelex_card_image_[column - 3], "..."); - ffelex_card_length_ = column; - ffelex_bad_1_ (FFEBAD_LINE_TOO_LONG, - ffelex_linecount_current_, column + 1); - return column; - } - - ffelex_card_image_ - = malloc_resize_ksr (malloc_pool_image (), - ffelex_card_image_, - newmax + 9, - ffelex_card_size_ + 9); - ffelex_card_size_ = newmax; - } - - switch (c) - { - case '\r': - break; - - case '\t': - ffelex_saw_tab_ = TRUE; - ffelex_card_image_[column++] = ' '; - while ((column & 7) != 0) - ffelex_card_image_[column++] = ' '; - break; - - case '\0': - if (!ffelex_bad_line_) - { - ffelex_bad_line_ = TRUE; - strcpy (&ffelex_card_image_[column], "[\\0]"); - ffelex_card_length_ = column + 4; - /* xgettext:no-c-format */ - ffebad_start_msg_lex ("Null character at %0 -- line ignored", - FFEBAD_severityFATAL); - ffelex_bad_here_ (0, ffelex_linecount_current_, column + 1); - ffebad_finish (); - column += 4; - } - break; - - default: - ffelex_card_image_[column++] = c; - break; - } - - if (column < old_column) - { - column = old_column; - goto overflow; /* :::::::::::::::::::: */ - } - - return column; -} - -static void -ffelex_include_ (void) -{ - ffewhereFile include_wherefile = ffelex_include_wherefile_; - FILE *include_file = ffelex_include_file_; - /* The rest of this is to push, and after the INCLUDE file is processed, - pop, the static lexer state info that pertains to each particular - input file. */ - char *card_image; - ffewhereColumnNumber card_size = ffelex_card_size_; - ffewhereColumnNumber card_length = ffelex_card_length_; - ffewhereLine current_wl = ffelex_current_wl_; - ffewhereColumn current_wc = ffelex_current_wc_; - bool saw_tab = ffelex_saw_tab_; - ffewhereColumnNumber final_nontab_column = ffelex_final_nontab_column_; - ffewhereFile current_wf = ffelex_current_wf_; - ffewhereLineNumber linecount_current = ffelex_linecount_current_; - ffewhereLineNumber linecount_offset - = ffewhere_line_filelinenum (current_wl); - location_t old_loc = input_location; - - if (card_length != 0) - { - card_image = malloc_new_ks (malloc_pool_image (), - "FFELEX saved card image", - card_length); - memcpy (card_image, ffelex_card_image_, card_length); - } - else - card_image = NULL; - - ffelex_set_include_ = FALSE; - - ffelex_next_line_ (); - - ffewhere_file_set (include_wherefile, TRUE, 0); - - ffelex_file_push_ (old_loc.line, ffewhere_file_name (include_wherefile)); - - if (ffelex_include_free_form_) - ffelex_file_free (include_wherefile, include_file); - else - ffelex_file_fixed (include_wherefile, include_file); - - ffelex_file_pop_ (ffewhere_file_name (current_wf)); - - ffewhere_file_set (current_wf, TRUE, linecount_offset); - - ffecom_close_include (include_file); - - if (card_length != 0) - { - assert (ffelex_card_size_ >= card_length); /* It shrunk?? */ - memcpy (ffelex_card_image_, card_image, card_length); - } - ffelex_card_image_[card_length] = '\0'; - - input_location = old_loc; - ffelex_linecount_current_ = linecount_current; - ffelex_current_wf_ = current_wf; - ffelex_final_nontab_column_ = final_nontab_column; - ffelex_saw_tab_ = saw_tab; - ffelex_current_wc_ = current_wc; - ffelex_current_wl_ = current_wl; - ffelex_card_length_ = card_length; - ffelex_card_size_ = card_size; -} - -/* ffelex_is_free_char_ctx_contin_ -- Character Context Continuation? - - ffewhereColumnNumber col; - int c; // Char at col. - if ((c == '&') && ffelex_is_free_char_ctx_contin_(col + 1)) - // We have a continuation indicator. - - If there are spaces starting at ffelex_card_image_[col] up through - the null character, where is 0 or greater, returns TRUE. */ - -static bool -ffelex_is_free_char_ctx_contin_ (ffewhereColumnNumber col) -{ - while (ffelex_card_image_[col] != '\0') - { - if (ffelex_card_image_[col++] != ' ') - return FALSE; - } - return TRUE; -} - -/* ffelex_is_free_nonc_ctx_contin_ -- Noncharacter Context Continuation? - - ffewhereColumnNumber col; - int c; // Char at col. - if ((c == '&') && ffelex_is_free_nonc_ctx_contin_(col + 1)) - // We have a continuation indicator. - - If there are spaces starting at ffelex_card_image_[col] up through - the null character or '!', where is 0 or greater, returns TRUE. */ - -static bool -ffelex_is_free_nonc_ctx_contin_ (ffewhereColumnNumber col) -{ - while ((ffelex_card_image_[col] != '\0') && (ffelex_card_image_[col] != '!')) - { - if (ffelex_card_image_[col++] != ' ') - return FALSE; - } - return TRUE; -} - -static void -ffelex_next_line_ (void) -{ - ffelex_linecount_current_ = ffelex_linecount_next_; - ++ffelex_linecount_next_; - ++input_line; -} - -static void -ffelex_send_token_ (void) -{ - ++ffelex_number_of_tokens_; - - ffelex_backslash_ (EOF, 0); - - if (ffelex_token_->text == NULL) - { - if (ffelex_token_->type == FFELEX_typeCHARACTER) - { - ffelex_append_to_token_ ('\0'); - ffelex_token_->length = 0; - } - } - else - ffelex_token_->text[ffelex_token_->length] = '\0'; - - assert (ffelex_raw_mode_ == 0); - - if (ffelex_token_->type == FFELEX_typeNAMES) - { - ffewhere_line_kill (ffelex_token_->currentnames_line); - ffewhere_column_kill (ffelex_token_->currentnames_col); - } - - assert (ffelex_handler_ != NULL); - ffelex_handler_ = (ffelexHandler) (*ffelex_handler_) (ffelex_token_); - assert (ffelex_handler_ != NULL); - - ffelex_token_kill (ffelex_token_); - - ffelex_token_ = ffelex_token_new_ (); - ffelex_token_->uses = 1; - ffelex_token_->text = NULL; - if (ffelex_raw_mode_ < 0) - { - ffelex_token_->type = FFELEX_typeCHARACTER; - ffelex_token_->where_line = ffelex_raw_where_line_; - ffelex_token_->where_col = ffelex_raw_where_col_; - ffelex_raw_where_line_ = ffewhere_line_unknown (); - ffelex_raw_where_col_ = ffewhere_column_unknown (); - } - else - { - ffelex_token_->type = FFELEX_typeNONE; - ffelex_token_->where_line = ffewhere_line_unknown (); - ffelex_token_->where_col = ffewhere_column_unknown (); - } - - if (ffelex_set_include_) - ffelex_include_ (); -} - -/* ffelex_swallow_tokens_ -- Eat all tokens delivered to me - - return ffelex_swallow_tokens_; - - Return this handler when you don't want to look at any more tokens in the - statement because you've encountered an unrecoverable error in the - statement. */ - -static ffelexHandler -ffelex_swallow_tokens_ (ffelexToken t) -{ - assert (ffelex_eos_handler_ != NULL); - - if ((ffelex_token_type (t) == FFELEX_typeEOS) - || (ffelex_token_type (t) == FFELEX_typeSEMICOLON)) - return (ffelexHandler) (*ffelex_eos_handler_) (t); - - return (ffelexHandler) ffelex_swallow_tokens_; -} - -static ffelexToken -ffelex_token_new_ (void) -{ - ffelexToken t; - - ++ffelex_total_tokens_; - - t = malloc_new_ks (malloc_pool_image (), "FFELEX token", sizeof (*t)); - t->id_ = ffelex_token_nextid_++; - return t; -} - -static const char * -ffelex_type_string_ (ffelexType type) -{ - static const char *const types[] = { - "FFELEX_typeNONE", - "FFELEX_typeCOMMENT", - "FFELEX_typeEOS", - "FFELEX_typeEOF", - "FFELEX_typeERROR", - "FFELEX_typeRAW", - "FFELEX_typeQUOTE", - "FFELEX_typeDOLLAR", - "FFELEX_typeHASH", - "FFELEX_typePERCENT", - "FFELEX_typeAMPERSAND", - "FFELEX_typeAPOSTROPHE", - "FFELEX_typeOPEN_PAREN", - "FFELEX_typeCLOSE_PAREN", - "FFELEX_typeASTERISK", - "FFELEX_typePLUS", - "FFELEX_typeMINUS", - "FFELEX_typePERIOD", - "FFELEX_typeSLASH", - "FFELEX_typeNUMBER", - "FFELEX_typeOPEN_ANGLE", - "FFELEX_typeEQUALS", - "FFELEX_typeCLOSE_ANGLE", - "FFELEX_typeNAME", - "FFELEX_typeCOMMA", - "FFELEX_typePOWER", - "FFELEX_typeCONCAT", - "FFELEX_typeDEBUG", - "FFELEX_typeNAMES", - "FFELEX_typeHOLLERITH", - "FFELEX_typeCHARACTER", - "FFELEX_typeCOLON", - "FFELEX_typeSEMICOLON", - "FFELEX_typeUNDERSCORE", - "FFELEX_typeQUESTION", - "FFELEX_typeOPEN_ARRAY", - "FFELEX_typeCLOSE_ARRAY", - "FFELEX_typeCOLONCOLON", - "FFELEX_typeREL_LE", - "FFELEX_typeREL_NE", - "FFELEX_typeREL_EQ", - "FFELEX_typePOINTS", - "FFELEX_typeREL_GE" - }; - - if (type >= ARRAY_SIZE (types)) - return "???"; - return types[type]; -} - -void -ffelex_display_token (ffelexToken t) -{ - if (t == NULL) - t = ffelex_token_; - - fprintf (dmpout, "; Token #%lu is %s (line %" ffewhereLineNumber_f "u, col %" - ffewhereColumnNumber_f "u)", - t->id_, - ffelex_type_string_ (t->type), - ffewhere_line_number (t->where_line), - ffewhere_column_number (t->where_col)); - - if (t->text != NULL) - fprintf (dmpout, ": \"%.*s\"\n", - (int) t->length, - t->text); - else - fprintf (dmpout, ".\n"); -} - -/* ffelex_expecting_character -- Tells if next token expected to be CHARACTER - - if (ffelex_expecting_character()) - // next token delivered by lexer will be CHARACTER. - - If the most recent call to ffelex_set_expecting_hollerith since the last - token was delivered by the lexer passed a length of -1, then we return - TRUE, because the next token we deliver will be typeCHARACTER, else we - return FALSE. */ - -bool -ffelex_expecting_character (void) -{ - return (ffelex_raw_mode_ != 0); -} - -/* ffelex_file_fixed -- Lex a given file in fixed source form - - ffewhere wf; - FILE *f; - ffelex_file_fixed(wf,f); - - Lexes the file according to Fortran 90 ANSI + VXT specifications. */ - -ffelexHandler -ffelex_file_fixed (ffewhereFile wf, FILE *f) -{ - register int c = 0; /* Character currently under consideration. */ - register ffewhereColumnNumber column = 0; /* Not really; 0 means column 1... */ - bool disallow_continuation_line; - bool ignore_disallowed_continuation = FALSE; - int latest_char_in_file = 0; /* For getting back into comment-skipping - code. */ - ffelexType lextype; - ffewhereColumnNumber first_label_char; /* First char of label -- - column number. */ - char label_string[6]; /* Text of label. */ - int labi; /* Length of label text. */ - bool finish_statement; /* Previous statement finished? */ - bool have_content; /* This line have content? */ - bool just_do_label; /* Nothing but label (and continuation?) on - line. */ - - /* Lex is called for a particular file, not for a particular program unit. - Yet the two events do share common characteristics. The first line in a - file or in a program unit cannot be a continuation line. No token can - be in mid-formation. No current label for the statement exists, since - there is no current statement. */ - - assert (ffelex_handler_ != NULL); - - input_line = 0; - input_filename = ffewhere_file_name (wf); - ffelex_current_wf_ = wf; - disallow_continuation_line = TRUE; - ignore_disallowed_continuation = FALSE; - ffelex_token_->type = FFELEX_typeNONE; - ffelex_number_of_tokens_ = 0; - ffelex_label_tokens_ = 0; - ffelex_current_wl_ = ffewhere_line_unknown (); - ffelex_current_wc_ = ffewhere_column_unknown (); - latest_char_in_file = '\n'; - - goto first_line; /* :::::::::::::::::::: */ - - /* Come here to get a new line. */ - - beginning_of_line: /* :::::::::::::::::::: */ - - disallow_continuation_line = FALSE; - - /* Come here directly when last line didn't clarify the continuation issue. */ - - beginning_of_line_again: /* :::::::::::::::::::: */ - - first_line: /* :::::::::::::::::::: */ - - c = latest_char_in_file; - if ((c == EOF) || ((c = ffelex_getc_ (f)) == EOF)) - { - - end_of_file: /* :::::::::::::::::::: */ - - /* Line ending in EOF instead of \n still counts as a whole line. */ - - ffelex_finish_statement_ (); - ffewhere_line_kill (ffelex_current_wl_); - ffewhere_column_kill (ffelex_current_wc_); - return (ffelexHandler) ffelex_handler_; - } - - ffelex_next_line_ (); - - ffelex_bad_line_ = FALSE; - - /* Skip over comment (and otherwise ignored) lines as quickly as possible! */ - - while (((lextype = ffelex_first_char_[c]) == FFELEX_typeCOMMENT) - || (lextype == FFELEX_typeERROR) - || (lextype == FFELEX_typeSLASH) - || (lextype == FFELEX_typeHASH)) - { - /* Test most frequent type of line first, etc. */ - if ((lextype == FFELEX_typeCOMMENT) - || ((lextype == FFELEX_typeSLASH) - && ((c = getc (f)) == '*'))) /* NOTE SIDE-EFFECT. */ - { - /* Typical case (straight comment), just ignore rest of line. */ - comment_line: /* :::::::::::::::::::: */ - - while ((c != '\n') && (c != EOF)) - c = getc (f); - } - else if (lextype == FFELEX_typeHASH) - c = ffelex_hash_ (f); - else if (lextype == FFELEX_typeSLASH) - { - /* SIDE-EFFECT ABOVE HAS HAPPENED. */ - ffelex_card_image_[0] = '/'; - ffelex_card_image_[1] = c; - column = 2; - goto bad_first_character; /* :::::::::::::::::::: */ - } - else - /* typeERROR or unsupported typeHASH. */ - { /* Bad first character, get line and display - it with message. */ - column = ffelex_image_char_ (c, 0); - - bad_first_character: /* :::::::::::::::::::: */ - - ffelex_bad_line_ = TRUE; - while (((c = getc (f)) != '\n') && (c != EOF)) - column = ffelex_image_char_ (c, column); - ffelex_card_image_[column] = '\0'; - ffelex_card_length_ = column; - ffelex_bad_1_ (FFEBAD_FIRST_CHAR_INVALID, - ffelex_linecount_current_, 1); - } - - /* Read past last char in line. */ - - if (c == EOF) - { - ffelex_next_line_ (); - goto end_of_file; /* :::::::::::::::::::: */ - } - - c = getc (f); - - ffelex_next_line_ (); - - if (c == EOF) - goto end_of_file; /* :::::::::::::::::::: */ - - ffelex_bad_line_ = FALSE; - } /* while [c, first char, means comment] */ - - ffelex_saw_tab_ - = (c == '&') - || (ffelex_final_nontab_column_ == 0); - - if (lextype == FFELEX_typeDEBUG) - c = ' '; /* A 'D' or 'd' in column 1 with the - debug-lines option on. */ - - column = ffelex_image_char_ (c, 0); - - /* Read the entire line in as is (with whitespace processing). */ - - while (((c = getc (f)) != '\n') && (c != EOF)) - column = ffelex_image_char_ (c, column); - - if (ffelex_bad_line_) - { - ffelex_card_image_[column] = '\0'; - ffelex_card_length_ = column; - goto comment_line; /* :::::::::::::::::::: */ - } - - /* If no tab, cut off line after column 72/132. */ - - if (!ffelex_saw_tab_ && (column > ffelex_final_nontab_column_)) - { - /* Technically, we should now fill ffelex_card_image_ up thru column - 72/132 with spaces, since character/hollerith constants must count - them in that manner. To save CPU time in several ways (avoid a loop - here that would be used only when we actually end a line in - character-constant mode; avoid writing memory unnecessarily; avoid a - loop later checking spaces when not scanning for character-constant - characters), we don't do this, and we do the appropriate thing when - we encounter end-of-line while actually processing a character - constant. */ - - column = ffelex_final_nontab_column_; - } - - ffelex_card_image_[column] = '\0'; - ffelex_card_length_ = column; - - /* Save next char in file so we can use register-based c while analyzing - line we just read. */ - - latest_char_in_file = c; /* Should be either '\n' or EOF. */ - - have_content = FALSE; - - /* Handle label, if any. */ - - labi = 0; - first_label_char = FFEWHERE_columnUNKNOWN; - for (column = 0; column < 5; ++column) - { - switch (c = ffelex_card_image_[column]) - { - case '\0': - case '!': - goto stop_looking; /* :::::::::::::::::::: */ - - case ' ': - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - label_string[labi++] = c; - if (first_label_char == FFEWHERE_columnUNKNOWN) - first_label_char = column + 1; - break; - - case '&': - if (column != 0) - { - ffelex_bad_1_ (FFEBAD_LABEL_FIELD_NOT_NUMERIC, - ffelex_linecount_current_, - column + 1); - goto beginning_of_line_again; /* :::::::::::::::::::: */ - } - if (ffe_is_pedantic ()) - ffelex_bad_1_ (FFEBAD_AMPERSAND, - ffelex_linecount_current_, 1); - finish_statement = FALSE; - just_do_label = FALSE; - goto got_a_continuation; /* :::::::::::::::::::: */ - - case '/': - if (ffelex_card_image_[column + 1] == '*') - goto stop_looking; /* :::::::::::::::::::: */ - /* Fall through. */ - default: - ffelex_bad_1_ (FFEBAD_LABEL_FIELD_NOT_NUMERIC, - ffelex_linecount_current_, column + 1); - goto beginning_of_line_again; /* :::::::::::::::::::: */ - } - } - - stop_looking: /* :::::::::::::::::::: */ - - label_string[labi] = '\0'; - - /* Find first nonblank char starting with continuation column. */ - - if (column == 5) /* In which case we didn't see end of line in - label field. */ - while ((c = ffelex_card_image_[column]) == ' ') - ++column; - - /* Now we're trying to figure out whether this is a continuation line and - whether there's anything else of substance on the line. The cases are - as follows: - - 1. If a line has an explicit continuation character (other than the digit - zero), then if it also has a label, the label is ignored and an error - message is printed. Any remaining text on the line is passed to the - parser tasks, thus even an all-blank line (possibly with an ignored - label) aside from a positive continuation character might have meaning - in the midst of a character or hollerith constant. - - 2. If a line has no explicit continuation character (that is, it has a - space in column 6 and the first non-space character past column 6 is - not a digit 0-9), then there are two possibilities: - - A. A label is present and/or a non-space (and non-comment) character - appears somewhere after column 6. Terminate processing of the previous - statement, if any, send the new label for the next statement, if any, - and start processing a new statement with this non-blank character, if - any. - - B. The line is essentially blank, except for a possible comment character. - Don't terminate processing of the previous statement and don't pass any - characters to the parser tasks, since the line is not flagged as a - continuation line. We treat it just like a completely blank line. - - 3. If a line has a continuation character of zero (0), then we terminate - processing of the previous statement, if any, send the new label for the - next statement, if any, and start processing a new statement, if any - non-blank characters are present. - - If, when checking to see if we should terminate the previous statement, it - is found that there is no previous statement but that there is an - outstanding label, substitute CONTINUE as the statement for the label - and display an error message. */ - - finish_statement = FALSE; - just_do_label = FALSE; - - switch (c) - { - case '!': /* ANSI Fortran 90 says ! in column 6 is - continuation. */ - /* VXT Fortran says ! anywhere is comment, even column 6. */ - if (ffe_is_vxt () || (column != 5)) - goto no_tokens_on_line; /* :::::::::::::::::::: */ - goto got_a_continuation; /* :::::::::::::::::::: */ - - case '/': - if (ffelex_card_image_[column + 1] != '*') - goto some_other_character; /* :::::::::::::::::::: */ - /* Fall through. */ - if (column == 5) - { - /* This seems right to do. But it is close to call, since / * starting - in column 6 will thus be interpreted as a continuation line - beginning with '*'. */ - - goto got_a_continuation;/* :::::::::::::::::::: */ - } - /* Fall through. */ - case '\0': - /* End of line. Therefore may be continued-through line, so handle - pending label as possible to-be-continued and drive end-of-statement - for any previous statement, else treat as blank line. */ - - no_tokens_on_line: /* :::::::::::::::::::: */ - - if (ffe_is_pedantic () && (c == '/')) - ffelex_bad_1_ (FFEBAD_NON_ANSI_COMMENT, - ffelex_linecount_current_, column + 1); - if (first_label_char != FFEWHERE_columnUNKNOWN) - { /* Can't be a continued-through line if it - has a label. */ - finish_statement = TRUE; - have_content = TRUE; - just_do_label = TRUE; - break; - } - goto beginning_of_line_again; /* :::::::::::::::::::: */ - - case '0': - if (ffe_is_pedantic () && (column != 5)) - ffelex_bad_1_ (FFEBAD_NON_ANSI_CONTINUATION_COLUMN, - ffelex_linecount_current_, column + 1); - finish_statement = TRUE; - goto check_for_content; /* :::::::::::::::::::: */ - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - - /* NOTE: This label can be reached directly from the code - that lexes the label field in columns 1-5. */ - got_a_continuation: /* :::::::::::::::::::: */ - - if (first_label_char != FFEWHERE_columnUNKNOWN) - { - ffelex_bad_2_ (FFEBAD_LABEL_ON_CONTINUATION, - ffelex_linecount_current_, - first_label_char, - ffelex_linecount_current_, - column + 1); - first_label_char = FFEWHERE_columnUNKNOWN; - } - if (disallow_continuation_line) - { - if (!ignore_disallowed_continuation) - ffelex_bad_1_ (FFEBAD_INVALID_CONTINUATION, - ffelex_linecount_current_, column + 1); - goto beginning_of_line_again; /* :::::::::::::::::::: */ - } - if (ffe_is_pedantic () && (column != 5)) - ffelex_bad_1_ (FFEBAD_NON_ANSI_CONTINUATION_COLUMN, - ffelex_linecount_current_, column + 1); - if ((ffelex_raw_mode_ != 0) - && (((c = ffelex_card_image_[column + 1]) != '\0') - || !ffelex_saw_tab_)) - { - ++column; - have_content = TRUE; - break; - } - - check_for_content: /* :::::::::::::::::::: */ - - while ((c = ffelex_card_image_[++column]) == ' ') - ; - if ((c == '\0') - || (c == '!') - || ((c == '/') - && (ffelex_card_image_[column + 1] == '*'))) - { - if (ffe_is_pedantic () && (c == '/')) - ffelex_bad_1_ (FFEBAD_NON_ANSI_COMMENT, - ffelex_linecount_current_, column + 1); - just_do_label = TRUE; - } - else - have_content = TRUE; - break; - - default: - - some_other_character: /* :::::::::::::::::::: */ - - if (column == 5) - goto got_a_continuation;/* :::::::::::::::::::: */ - - /* Here is the very normal case of a regular character starting in - column 7 or beyond with a blank in column 6. */ - - finish_statement = TRUE; - have_content = TRUE; - break; - } - - if (have_content - || (first_label_char != FFEWHERE_columnUNKNOWN)) - { - /* The line has content of some kind, install new end-statement - point for error messages. Note that "content" includes cases - where there's little apparent content but enough to finish - a statement. That's because finishing a statement can trigger - an impending INCLUDE, and that requires accurate line info being - maintained by the lexer. */ - - if (finish_statement) - ffelex_prepare_eos_ (); /* Prepare EOS before we move current pointer. */ - - ffewhere_line_kill (ffelex_current_wl_); - ffewhere_column_kill (ffelex_current_wc_); - ffelex_current_wl_ = ffewhere_line_new (ffelex_linecount_current_); - ffelex_current_wc_ = ffewhere_column_new (ffelex_card_length_ + 1); - } - - /* We delay this for a combination of reasons. Mainly, it can start - INCLUDE processing, and we want to delay that until the lexer's - info on the line is coherent. And we want to delay that until we're - sure there's a reason to make that info coherent, to avoid saving - lots of useless lines. */ - - if (finish_statement) - ffelex_finish_statement_ (); - - /* If label is present, enclose it in a NUMBER token and send it along. */ - - if (first_label_char != FFEWHERE_columnUNKNOWN) - { - assert (ffelex_token_->type == FFELEX_typeNONE); - ffelex_token_->type = FFELEX_typeNUMBER; - ffelex_append_to_token_ ('\0'); /* Make room for label text. */ - strcpy (ffelex_token_->text, label_string); - ffelex_token_->where_line - = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (first_label_char); - ffelex_token_->length = labi; - ffelex_send_token_ (); - ++ffelex_label_tokens_; - } - - if (just_do_label) - goto beginning_of_line; /* :::::::::::::::::::: */ - - /* Here is the main engine for parsing. c holds the character at column. - It is already known that c is not a blank, end of line, or shriek, - unless ffelex_raw_mode_ is not 0 (indicating we are in a - character/hollerith constant). A partially filled token may already - exist in ffelex_token_. One special case: if, when the end of the line - is reached, continuation_line is FALSE and the only token on the line is - END, then it is indeed the last statement. We don't look for - continuation lines during this program unit in that case. This is - according to ANSI. */ - - if (ffelex_raw_mode_ != 0) - { - - parse_raw_character: /* :::::::::::::::::::: */ - - if (c == '\0') - { - ffewhereColumnNumber i; - - if (ffelex_saw_tab_ || (column >= ffelex_final_nontab_column_)) - goto beginning_of_line; /* :::::::::::::::::::: */ - - /* Pad out line with "virtual" spaces. */ - - for (i = column; i < ffelex_final_nontab_column_; ++i) - ffelex_card_image_[i] = ' '; - ffelex_card_image_[i] = '\0'; - ffelex_card_length_ = i; - c = ' '; - } - - switch (ffelex_raw_mode_) - { - case -3: - c = ffelex_backslash_ (c, column); - if (c == EOF) - break; - - if (!ffelex_backslash_reconsider_) - ffelex_append_to_token_ (c); - ffelex_raw_mode_ = -1; - break; - - case -2: - if (c == ffelex_raw_char_) - { - ffelex_raw_mode_ = -1; - ffelex_append_to_token_ (c); - } - else - { - ffelex_raw_mode_ = 0; - ffelex_backslash_reconsider_ = TRUE; - } - break; - - case -1: - if (c == ffelex_raw_char_) - ffelex_raw_mode_ = -2; - else - { - c = ffelex_backslash_ (c, column); - if (c == EOF) - { - ffelex_raw_mode_ = -3; - break; - } - - ffelex_append_to_token_ (c); - } - break; - - default: - c = ffelex_backslash_ (c, column); - if (c == EOF) - break; - - if (!ffelex_backslash_reconsider_) - { - ffelex_append_to_token_ (c); - --ffelex_raw_mode_; - } - break; - } - - if (ffelex_backslash_reconsider_) - ffelex_backslash_reconsider_ = FALSE; - else - c = ffelex_card_image_[++column]; - - if (ffelex_raw_mode_ == 0) - { - ffelex_send_token_ (); - assert (ffelex_raw_mode_ == 0); - while (c == ' ') - c = ffelex_card_image_[++column]; - if ((c == '\0') - || (c == '!') - || ((c == '/') - && (ffelex_card_image_[column + 1] == '*'))) - goto beginning_of_line; /* :::::::::::::::::::: */ - goto parse_nonraw_character; /* :::::::::::::::::::: */ - } - goto parse_raw_character; /* :::::::::::::::::::: */ - } - - parse_nonraw_character: /* :::::::::::::::::::: */ - - switch (ffelex_token_->type) - { - case FFELEX_typeNONE: - switch (c) - { - case '\"': - ffelex_token_->type = FFELEX_typeQUOTE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '$': - ffelex_token_->type = FFELEX_typeDOLLAR; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '%': - ffelex_token_->type = FFELEX_typePERCENT; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '&': - ffelex_token_->type = FFELEX_typeAMPERSAND; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '\'': - ffelex_token_->type = FFELEX_typeAPOSTROPHE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '(': - ffelex_token_->type = FFELEX_typeOPEN_PAREN; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case ')': - ffelex_token_->type = FFELEX_typeCLOSE_PAREN; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '*': - ffelex_token_->type = FFELEX_typeASTERISK; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '+': - ffelex_token_->type = FFELEX_typePLUS; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case ',': - ffelex_token_->type = FFELEX_typeCOMMA; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '-': - ffelex_token_->type = FFELEX_typeMINUS; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '.': - ffelex_token_->type = FFELEX_typePERIOD; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '/': - ffelex_token_->type = FFELEX_typeSLASH; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - ffelex_token_->type - = ffelex_hexnum_ ? FFELEX_typeNAME : FFELEX_typeNUMBER; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_append_to_token_ (c); - break; - - case ':': - ffelex_token_->type = FFELEX_typeCOLON; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case ';': - ffelex_token_->type = FFELEX_typeSEMICOLON; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_permit_include_ = TRUE; - ffelex_send_token_ (); - ffelex_permit_include_ = FALSE; - break; - - case '<': - ffelex_token_->type = FFELEX_typeOPEN_ANGLE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '=': - ffelex_token_->type = FFELEX_typeEQUALS; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '>': - ffelex_token_->type = FFELEX_typeCLOSE_ANGLE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '?': - ffelex_token_->type = FFELEX_typeQUESTION; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '_': - if (1 || ffe_is_90 ()) - { - ffelex_token_->type = FFELEX_typeUNDERSCORE; - ffelex_token_->where_line - = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col - = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - } - /* Fall through. */ - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - c = ffesrc_char_source (c); - - if (ffesrc_char_match_init (c, 'H', 'h') - && ffelex_expecting_hollerith_ != 0) - { - ffelex_raw_mode_ = ffelex_expecting_hollerith_; - ffelex_token_->type = FFELEX_typeHOLLERITH; - ffelex_token_->where_line = ffelex_raw_where_line_; - ffelex_token_->where_col = ffelex_raw_where_col_; - ffelex_raw_where_line_ = ffewhere_line_unknown (); - ffelex_raw_where_col_ = ffewhere_column_unknown (); - c = ffelex_card_image_[++column]; - goto parse_raw_character; /* :::::::::::::::::::: */ - } - - if (ffelex_names_) - { - ffelex_token_->where_line - = ffewhere_line_use (ffelex_token_->currentnames_line - = ffewhere_line_use (ffelex_current_wl_)); - ffelex_token_->where_col - = ffewhere_column_use (ffelex_token_->currentnames_col - = ffewhere_column_new (column + 1)); - ffelex_token_->type = FFELEX_typeNAMES; - } - else - { - ffelex_token_->where_line - = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_token_->type = FFELEX_typeNAME; - } - ffelex_append_to_token_ (c); - break; - - default: - ffelex_bad_1_ (FFEBAD_UNRECOGNIZED_CHARACTER, - ffelex_linecount_current_, column + 1); - ffelex_finish_statement_ (); - disallow_continuation_line = TRUE; - ignore_disallowed_continuation = TRUE; - goto beginning_of_line_again; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeNAME: - switch (c) - { - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - c = ffesrc_char_source (c); - /* Fall through. */ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '_': - case '$': - if ((c == '$') - && !ffe_is_dollar_ok ()) - { - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - ffelex_append_to_token_ (c); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeNAMES: - switch (c) - { - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - c = ffesrc_char_source (c); - /* Fall through. */ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '_': - case '$': - if ((c == '$') - && !ffe_is_dollar_ok ()) - { - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - if (ffelex_token_->length < FFEWHERE_indexMAX) - { - ffewhere_track (&ffelex_token_->currentnames_line, - &ffelex_token_->currentnames_col, - ffelex_token_->wheretrack, - ffelex_token_->length, - ffelex_linecount_current_, - column + 1); - } - ffelex_append_to_token_ (c); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeNUMBER: - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - ffelex_append_to_token_ (c); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeASTERISK: - switch (c) - { - case '*': /* ** */ - ffelex_token_->type = FFELEX_typePOWER; - ffelex_send_token_ (); - break; - - default: /* * not followed by another *. */ - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeCOLON: - switch (c) - { - case ':': /* :: */ - ffelex_token_->type = FFELEX_typeCOLONCOLON; - ffelex_send_token_ (); - break; - - default: /* : not followed by another :. */ - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeSLASH: - switch (c) - { - case '/': /* // */ - ffelex_token_->type = FFELEX_typeCONCAT; - ffelex_send_token_ (); - break; - - case ')': /* /) */ - ffelex_token_->type = FFELEX_typeCLOSE_ARRAY; - ffelex_send_token_ (); - break; - - case '=': /* /= */ - ffelex_token_->type = FFELEX_typeREL_NE; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeOPEN_PAREN: - switch (c) - { - case '/': /* (/ */ - ffelex_token_->type = FFELEX_typeOPEN_ARRAY; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeOPEN_ANGLE: - switch (c) - { - case '=': /* <= */ - ffelex_token_->type = FFELEX_typeREL_LE; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeEQUALS: - switch (c) - { - case '=': /* == */ - ffelex_token_->type = FFELEX_typeREL_EQ; - ffelex_send_token_ (); - break; - - case '>': /* => */ - ffelex_token_->type = FFELEX_typePOINTS; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeCLOSE_ANGLE: - switch (c) - { - case '=': /* >= */ - ffelex_token_->type = FFELEX_typeREL_GE; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - default: - assert ("Serious error!!" == NULL); - abort (); - break; - } - - c = ffelex_card_image_[++column]; - - parse_next_character: /* :::::::::::::::::::: */ - - if (ffelex_raw_mode_ != 0) - goto parse_raw_character; /* :::::::::::::::::::: */ - - while (c == ' ') - c = ffelex_card_image_[++column]; - - if ((c == '\0') - || (c == '!') - || ((c == '/') - && (ffelex_card_image_[column + 1] == '*'))) - { - if ((ffelex_number_of_tokens_ == ffelex_label_tokens_) - && (ffelex_token_->type == FFELEX_typeNAMES) - && (ffelex_token_->length == 3) - && (ffesrc_strncmp_2c (ffe_case_match (), - ffelex_token_->text, - "END", "end", "End", - 3) - == 0)) - { - ffelex_finish_statement_ (); - disallow_continuation_line = TRUE; - ignore_disallowed_continuation = FALSE; - goto beginning_of_line_again; /* :::::::::::::::::::: */ - } - goto beginning_of_line; /* :::::::::::::::::::: */ - } - goto parse_nonraw_character; /* :::::::::::::::::::: */ -} - -/* ffelex_file_free -- Lex a given file in free source form - - ffewhere wf; - FILE *f; - ffelex_file_free(wf,f); - - Lexes the file according to Fortran 90 ANSI + VXT specifications. */ - -ffelexHandler -ffelex_file_free (ffewhereFile wf, FILE *f) -{ - register int c = 0; /* Character currently under consideration. */ - register ffewhereColumnNumber column = 0; /* Not really; 0 means column 1... */ - bool continuation_line = FALSE; - ffewhereColumnNumber continuation_column; - int latest_char_in_file = 0; /* For getting back into comment-skipping - code. */ - - /* Lex is called for a particular file, not for a particular program unit. - Yet the two events do share common characteristics. The first line in a - file or in a program unit cannot be a continuation line. No token can - be in mid-formation. No current label for the statement exists, since - there is no current statement. */ - - assert (ffelex_handler_ != NULL); - - input_line = 0; - input_filename = ffewhere_file_name (wf); - ffelex_current_wf_ = wf; - continuation_line = FALSE; - ffelex_token_->type = FFELEX_typeNONE; - ffelex_number_of_tokens_ = 0; - ffelex_current_wl_ = ffewhere_line_unknown (); - ffelex_current_wc_ = ffewhere_column_unknown (); - latest_char_in_file = '\n'; - - /* Come here to get a new line. */ - - beginning_of_line: /* :::::::::::::::::::: */ - - c = latest_char_in_file; - if ((c == EOF) || ((c = ffelex_getc_ (f)) == EOF)) - { - - end_of_file: /* :::::::::::::::::::: */ - - /* Line ending in EOF instead of \n still counts as a whole line. */ - - ffelex_finish_statement_ (); - ffewhere_line_kill (ffelex_current_wl_); - ffewhere_column_kill (ffelex_current_wc_); - return (ffelexHandler) ffelex_handler_; - } - - ffelex_next_line_ (); - - ffelex_bad_line_ = FALSE; - - /* Skip over initial-comment and empty lines as quickly as possible! */ - - while ((c == '\n') - || (c == '!') - || (c == '#')) - { - if (c == '#') - c = ffelex_hash_ (f); - - comment_line: /* :::::::::::::::::::: */ - - while ((c != '\n') && (c != EOF)) - c = getc (f); - - if (c == EOF) - { - ffelex_next_line_ (); - goto end_of_file; /* :::::::::::::::::::: */ - } - - c = getc (f); - - ffelex_next_line_ (); - - if (c == EOF) - goto end_of_file; /* :::::::::::::::::::: */ - } - - ffelex_saw_tab_ = FALSE; - - column = ffelex_image_char_ (c, 0); - - /* Read the entire line in as is (with whitespace processing). */ - - while (((c = getc (f)) != '\n') && (c != EOF)) - column = ffelex_image_char_ (c, column); - - if (ffelex_bad_line_) - { - ffelex_card_image_[column] = '\0'; - ffelex_card_length_ = column; - goto comment_line; /* :::::::::::::::::::: */ - } - - /* If no tab, cut off line after column 132. */ - - if (!ffelex_saw_tab_ && (column > FFELEX_FREE_MAX_COLUMNS_)) - column = FFELEX_FREE_MAX_COLUMNS_; - - ffelex_card_image_[column] = '\0'; - ffelex_card_length_ = column; - - /* Save next char in file so we can use register-based c while analyzing - line we just read. */ - - latest_char_in_file = c; /* Should be either '\n' or EOF. */ - - column = 0; - continuation_column = 0; - - /* Skip over initial spaces to see if the first nonblank character - is exclamation point, newline, or EOF (line is therefore a comment) or - ampersand (line is therefore a continuation line). */ - - while ((c = ffelex_card_image_[column]) == ' ') - ++column; - - switch (c) - { - case '!': - case '\0': - goto beginning_of_line; /* :::::::::::::::::::: */ - - case '&': - continuation_column = column + 1; - break; - - default: - break; - } - - /* The line definitely has content of some kind, install new end-statement - point for error messages. */ - - ffewhere_line_kill (ffelex_current_wl_); - ffewhere_column_kill (ffelex_current_wc_); - ffelex_current_wl_ = ffewhere_line_new (ffelex_linecount_current_); - ffelex_current_wc_ = ffewhere_column_new (ffelex_card_length_ + 1); - - /* Figure out which column to start parsing at. */ - - if (continuation_line) - { - if (continuation_column == 0) - { - if (ffelex_raw_mode_ != 0) - { - ffelex_bad_1_ (FFEBAD_BAD_CHAR_CONTINUE, - ffelex_linecount_current_, column + 1); - } - else if (ffelex_token_->type != FFELEX_typeNONE) - { - ffelex_bad_1_ (FFEBAD_BAD_LEXTOK_CONTINUE, - ffelex_linecount_current_, column + 1); - } - } - else if (ffelex_is_free_char_ctx_contin_ (continuation_column)) - { /* Line contains only a single "&" as only - nonblank character. */ - ffelex_bad_1_ (FFEBAD_BAD_FREE_CONTINUE, - ffelex_linecount_current_, continuation_column); - goto beginning_of_line; /* :::::::::::::::::::: */ - } - column = continuation_column; - } - else - column = 0; - - c = ffelex_card_image_[column]; - continuation_line = FALSE; - - /* Here is the main engine for parsing. c holds the character at column. - It is already known that c is not a blank, end of line, or shriek, - unless ffelex_raw_mode_ is not 0 (indicating we are in a - character/hollerith constant). A partially filled token may already - exist in ffelex_token_. */ - - if (ffelex_raw_mode_ != 0) - { - - parse_raw_character: /* :::::::::::::::::::: */ - - switch (c) - { - case '&': - if (ffelex_is_free_char_ctx_contin_ (column + 1)) - { - continuation_line = TRUE; - goto beginning_of_line; /* :::::::::::::::::::: */ - } - break; - - case '\0': - ffelex_finish_statement_ (); - goto beginning_of_line; /* :::::::::::::::::::: */ - - default: - break; - } - - switch (ffelex_raw_mode_) - { - case -3: - c = ffelex_backslash_ (c, column); - if (c == EOF) - break; - - if (!ffelex_backslash_reconsider_) - ffelex_append_to_token_ (c); - ffelex_raw_mode_ = -1; - break; - - case -2: - if (c == ffelex_raw_char_) - { - ffelex_raw_mode_ = -1; - ffelex_append_to_token_ (c); - } - else - { - ffelex_raw_mode_ = 0; - ffelex_backslash_reconsider_ = TRUE; - } - break; - - case -1: - if (c == ffelex_raw_char_) - ffelex_raw_mode_ = -2; - else - { - c = ffelex_backslash_ (c, column); - if (c == EOF) - { - ffelex_raw_mode_ = -3; - break; - } - - ffelex_append_to_token_ (c); - } - break; - - default: - c = ffelex_backslash_ (c, column); - if (c == EOF) - break; - - if (!ffelex_backslash_reconsider_) - { - ffelex_append_to_token_ (c); - --ffelex_raw_mode_; - } - break; - } - - if (ffelex_backslash_reconsider_) - ffelex_backslash_reconsider_ = FALSE; - else - c = ffelex_card_image_[++column]; - - if (ffelex_raw_mode_ == 0) - { - ffelex_send_token_ (); - assert (ffelex_raw_mode_ == 0); - while (c == ' ') - c = ffelex_card_image_[++column]; - if ((c == '\0') || (c == '!')) - { - ffelex_finish_statement_ (); - goto beginning_of_line; /* :::::::::::::::::::: */ - } - if ((c == '&') && ffelex_is_free_nonc_ctx_contin_ (column + 1)) - { - continuation_line = TRUE; - goto beginning_of_line; /* :::::::::::::::::::: */ - } - goto parse_nonraw_character_noncontin; /* :::::::::::::::::::: */ - } - goto parse_raw_character; /* :::::::::::::::::::: */ - } - - parse_nonraw_character: /* :::::::::::::::::::: */ - - if ((c == '&') && ffelex_is_free_nonc_ctx_contin_ (column + 1)) - { - continuation_line = TRUE; - goto beginning_of_line; /* :::::::::::::::::::: */ - } - - parse_nonraw_character_noncontin: /* :::::::::::::::::::: */ - - switch (ffelex_token_->type) - { - case FFELEX_typeNONE: - if (c == ' ') - { /* Otherwise - finish-statement/continue-statement - already checked. */ - while (c == ' ') - c = ffelex_card_image_[++column]; - if ((c == '\0') || (c == '!')) - { - ffelex_finish_statement_ (); - goto beginning_of_line; /* :::::::::::::::::::: */ - } - if ((c == '&') && ffelex_is_free_nonc_ctx_contin_ (column + 1)) - { - continuation_line = TRUE; - goto beginning_of_line; /* :::::::::::::::::::: */ - } - } - - switch (c) - { - case '\"': - ffelex_token_->type = FFELEX_typeQUOTE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '$': - ffelex_token_->type = FFELEX_typeDOLLAR; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '%': - ffelex_token_->type = FFELEX_typePERCENT; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '&': - ffelex_token_->type = FFELEX_typeAMPERSAND; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '\'': - ffelex_token_->type = FFELEX_typeAPOSTROPHE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '(': - ffelex_token_->type = FFELEX_typeOPEN_PAREN; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case ')': - ffelex_token_->type = FFELEX_typeCLOSE_PAREN; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '*': - ffelex_token_->type = FFELEX_typeASTERISK; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '+': - ffelex_token_->type = FFELEX_typePLUS; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case ',': - ffelex_token_->type = FFELEX_typeCOMMA; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '-': - ffelex_token_->type = FFELEX_typeMINUS; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '.': - ffelex_token_->type = FFELEX_typePERIOD; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '/': - ffelex_token_->type = FFELEX_typeSLASH; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - ffelex_token_->type - = ffelex_hexnum_ ? FFELEX_typeNAME : FFELEX_typeNUMBER; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_append_to_token_ (c); - break; - - case ':': - ffelex_token_->type = FFELEX_typeCOLON; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case ';': - ffelex_token_->type = FFELEX_typeSEMICOLON; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_permit_include_ = TRUE; - ffelex_send_token_ (); - ffelex_permit_include_ = FALSE; - break; - - case '<': - ffelex_token_->type = FFELEX_typeOPEN_ANGLE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '=': - ffelex_token_->type = FFELEX_typeEQUALS; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '>': - ffelex_token_->type = FFELEX_typeCLOSE_ANGLE; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - break; - - case '?': - ffelex_token_->type = FFELEX_typeQUESTION; - ffelex_token_->where_line = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - - case '_': - if (1 || ffe_is_90 ()) - { - ffelex_token_->type = FFELEX_typeUNDERSCORE; - ffelex_token_->where_line - = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col - = ffewhere_column_new (column + 1); - ffelex_send_token_ (); - break; - } - /* Fall through. */ - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - c = ffesrc_char_source (c); - - if (ffesrc_char_match_init (c, 'H', 'h') - && ffelex_expecting_hollerith_ != 0) - { - ffelex_raw_mode_ = ffelex_expecting_hollerith_; - ffelex_token_->type = FFELEX_typeHOLLERITH; - ffelex_token_->where_line = ffelex_raw_where_line_; - ffelex_token_->where_col = ffelex_raw_where_col_; - ffelex_raw_where_line_ = ffewhere_line_unknown (); - ffelex_raw_where_col_ = ffewhere_column_unknown (); - c = ffelex_card_image_[++column]; - goto parse_raw_character; /* :::::::::::::::::::: */ - } - - if (ffelex_names_pure_) - { - ffelex_token_->where_line - = ffewhere_line_use (ffelex_token_->currentnames_line - = ffewhere_line_use (ffelex_current_wl_)); - ffelex_token_->where_col - = ffewhere_column_use (ffelex_token_->currentnames_col - = ffewhere_column_new (column + 1)); - ffelex_token_->type = FFELEX_typeNAMES; - } - else - { - ffelex_token_->where_line - = ffewhere_line_use (ffelex_current_wl_); - ffelex_token_->where_col = ffewhere_column_new (column + 1); - ffelex_token_->type = FFELEX_typeNAME; - } - ffelex_append_to_token_ (c); - break; - - default: - ffelex_bad_1_ (FFEBAD_UNRECOGNIZED_CHARACTER, - ffelex_linecount_current_, column + 1); - ffelex_finish_statement_ (); - goto beginning_of_line; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeNAME: - switch (c) - { - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - c = ffesrc_char_source (c); - /* Fall through. */ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '_': - case '$': - if ((c == '$') - && !ffe_is_dollar_ok ()) - { - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - ffelex_append_to_token_ (c); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeNAMES: - switch (c) - { - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - c = ffesrc_char_source (c); - /* Fall through. */ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '_': - case '$': - if ((c == '$') - && !ffe_is_dollar_ok ()) - { - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - if (ffelex_token_->length < FFEWHERE_indexMAX) - { - ffewhere_track (&ffelex_token_->currentnames_line, - &ffelex_token_->currentnames_col, - ffelex_token_->wheretrack, - ffelex_token_->length, - ffelex_linecount_current_, - column + 1); - } - ffelex_append_to_token_ (c); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeNUMBER: - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - ffelex_append_to_token_ (c); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeASTERISK: - switch (c) - { - case '*': /* ** */ - ffelex_token_->type = FFELEX_typePOWER; - ffelex_send_token_ (); - break; - - default: /* * not followed by another *. */ - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeCOLON: - switch (c) - { - case ':': /* :: */ - ffelex_token_->type = FFELEX_typeCOLONCOLON; - ffelex_send_token_ (); - break; - - default: /* : not followed by another :. */ - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeSLASH: - switch (c) - { - case '/': /* // */ - ffelex_token_->type = FFELEX_typeCONCAT; - ffelex_send_token_ (); - break; - - case ')': /* /) */ - ffelex_token_->type = FFELEX_typeCLOSE_ARRAY; - ffelex_send_token_ (); - break; - - case '=': /* /= */ - ffelex_token_->type = FFELEX_typeREL_NE; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeOPEN_PAREN: - switch (c) - { - case '/': /* (/ */ - ffelex_token_->type = FFELEX_typeOPEN_ARRAY; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeOPEN_ANGLE: - switch (c) - { - case '=': /* <= */ - ffelex_token_->type = FFELEX_typeREL_LE; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeEQUALS: - switch (c) - { - case '=': /* == */ - ffelex_token_->type = FFELEX_typeREL_EQ; - ffelex_send_token_ (); - break; - - case '>': /* => */ - ffelex_token_->type = FFELEX_typePOINTS; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - case FFELEX_typeCLOSE_ANGLE: - switch (c) - { - case '=': /* >= */ - ffelex_token_->type = FFELEX_typeREL_GE; - ffelex_send_token_ (); - break; - - default: - ffelex_send_token_ (); - goto parse_next_character; /* :::::::::::::::::::: */ - } - break; - - default: - assert ("Serious error!" == NULL); - abort (); - break; - } - - c = ffelex_card_image_[++column]; - - parse_next_character: /* :::::::::::::::::::: */ - - if (ffelex_raw_mode_ != 0) - goto parse_raw_character; /* :::::::::::::::::::: */ - - if ((c == '\0') || (c == '!')) - { - ffelex_finish_statement_ (); - goto beginning_of_line; /* :::::::::::::::::::: */ - } - goto parse_nonraw_character; /* :::::::::::::::::::: */ -} - -/* See the code in com.c that calls this to understand why. */ - -void -ffelex_hash_kludge (FILE *finput) -{ - /* If you change this constant string, you have to change whatever - code might thus be affected by it in terms of having to use - ffelex_getc_() instead of getc() in the lexers and _hash_. */ - static const char match[] = "# 1 \""; - static int kludge[ARRAY_SIZE (match) + 1]; - int c; - const char *p; - int *q; - - /* Read chars as long as they match the target string. - Copy them into an array that will serve as a record - of what we read (essentially a multi-char ungetc(), - for code that uses ffelex_getc_ instead of getc() elsewhere - in the lexer. */ - for (p = &match[0], q = &kludge[0], c = getc (finput); - (c == *p) && (*p != '\0') && (c != EOF); - ++p, ++q, c = getc (finput)) - *q = c; - - *q = c; /* Might be EOF, which requires int. */ - *++q = 0; - - ffelex_kludge_chars_ = &kludge[0]; - - if (*p == 0) - { - ffelex_kludge_flag_ = TRUE; - ++ffelex_kludge_chars_; - ffelex_hash_ (finput); /* Handle it NOW rather than later. */ - ffelex_kludge_flag_ = FALSE; - } -} - -void -ffelex_init_1 (void) -{ - unsigned int i; - - ffelex_final_nontab_column_ = ffe_fixed_line_length (); - ffelex_card_size_ = FFELEX_columnINITIAL_SIZE_; - ffelex_card_image_ = malloc_new_ksr (malloc_pool_image (), - "FFELEX card image", - FFELEX_columnINITIAL_SIZE_ + 9); - ffelex_card_image_[0] = '\0'; - - for (i = 0; i < 256; ++i) - ffelex_first_char_[i] = FFELEX_typeERROR; - - ffelex_first_char_['\t'] = FFELEX_typeRAW; - ffelex_first_char_['\n'] = FFELEX_typeCOMMENT; - ffelex_first_char_['\v'] = FFELEX_typeCOMMENT; - ffelex_first_char_['\f'] = FFELEX_typeCOMMENT; - ffelex_first_char_['\r'] = FFELEX_typeRAW; - ffelex_first_char_[' '] = FFELEX_typeRAW; - ffelex_first_char_['!'] = FFELEX_typeCOMMENT; - ffelex_first_char_['*'] = FFELEX_typeCOMMENT; - ffelex_first_char_['/'] = FFELEX_typeSLASH; - ffelex_first_char_['&'] = FFELEX_typeRAW; - ffelex_first_char_['#'] = FFELEX_typeHASH; - - for (i = '0'; i <= '9'; ++i) - ffelex_first_char_[i] = FFELEX_typeRAW; - - if ((ffe_case_match () == FFE_caseNONE) - || ((ffe_case_match () == FFE_caseUPPER) - && (ffe_case_source () != FFE_caseLOWER)) /* Idiot! :-) */ - || ((ffe_case_match () == FFE_caseLOWER) - && (ffe_case_source () == FFE_caseLOWER))) - { - ffelex_first_char_['C'] = FFELEX_typeCOMMENT; - ffelex_first_char_['D'] = FFELEX_typeCOMMENT; - } - if ((ffe_case_match () == FFE_caseNONE) - || ((ffe_case_match () == FFE_caseLOWER) - && (ffe_case_source () != FFE_caseUPPER)) /* Idiot! :-) */ - || ((ffe_case_match () == FFE_caseUPPER) - && (ffe_case_source () == FFE_caseUPPER))) - { - ffelex_first_char_['c'] = FFELEX_typeCOMMENT; - ffelex_first_char_['d'] = FFELEX_typeCOMMENT; - } - - ffelex_linecount_current_ = 0; - ffelex_linecount_next_ = 1; - ffelex_raw_mode_ = 0; - ffelex_set_include_ = FALSE; - ffelex_permit_include_ = FALSE; - ffelex_names_ = TRUE; /* First token in program is a names. */ - ffelex_names_pure_ = FALSE; /* Free-form lexer does NAMES only for - FORMAT. */ - ffelex_hexnum_ = FALSE; - ffelex_expecting_hollerith_ = 0; - ffelex_raw_where_line_ = ffewhere_line_unknown (); - ffelex_raw_where_col_ = ffewhere_column_unknown (); - - ffelex_token_ = ffelex_token_new_ (); - ffelex_token_->type = FFELEX_typeNONE; - ffelex_token_->uses = 1; - ffelex_token_->where_line = ffewhere_line_unknown (); - ffelex_token_->where_col = ffewhere_column_unknown (); - ffelex_token_->text = NULL; - - ffelex_handler_ = NULL; -} - -/* ffelex_is_names_expected -- Is the current parser expecting NAMES vs. NAME? - - if (ffelex_is_names_expected()) - // Deliver NAMES token - else - // Deliver NAME token - - Must be called while lexer is active, obviously. */ - -bool -ffelex_is_names_expected (void) -{ - return ffelex_names_; -} - -/* Current card image, which has the master linecount number - ffelex_linecount_current_. */ - -char * -ffelex_line (void) -{ - return ffelex_card_image_; -} - -/* ffelex_line_length -- Return length of current lexer line - - printf("Length is %lu\n",ffelex_line_length()); - - Must be called while lexer is active, obviously. */ - -ffewhereColumnNumber -ffelex_line_length (void) -{ - return ffelex_card_length_; -} - -/* Master line count of current card image, or 0 if no card image - is current. */ - -ffewhereLineNumber -ffelex_line_number (void) -{ - return ffelex_linecount_current_; -} - -/* ffelex_set_expecting_hollerith -- Set hollerith expectation status - - ffelex_set_expecting_hollerith(0); - - Lex initially assumes no hollerith constant is about to show up. If - syntactic analysis expects one, it should call this function with the - number of characters expected in the constant immediately after recognizing - the decimal number preceding the "H" and the constant itself. Then, if - the next character is indeed H, the lexer will interpret it as beginning - a hollerith constant and ship the token formed by reading the specified - number of characters (interpreting blanks and otherwise-comments too) - from the input file. It is up to syntactic analysis to call this routine - again with 0 to turn hollerith detection off immediately upon receiving - the token that might or might not be HOLLERITH. - - Also call this after seeing an APOSTROPHE or QUOTE token that begins a - character constant. Pass the expected termination character (apostrophe - or quote). - - Pass for length either the length of the hollerith (must be > 0), -1 - meaning expecting a character constant, or 0 to cancel expectation of - a hollerith only after calling it with a length of > 0 and receiving the - next token (which may or may not have been a HOLLERITH token). - - Pass for which either an apostrophe or quote when passing length of -1. - Else which is a don't-care. - - Pass for line and column the line/column info for the token beginning the - character or hollerith constant, for use in error messages, when passing - a length of -1 -- this function will invoke ffewhere_line/column_use to - make its own copies. Else line and column are don't-cares (when length - is 0) and the outstanding copies of the previous line/column info, if - still around, are killed. - - 21-Feb-90 JCB 3.1 - When called with length of 0, also zero ffelex_raw_mode_. This is - so ffest_save_ can undo the effects of replaying tokens like - APOSTROPHE and QUOTE. - 25-Jan-90 JCB 3.0 - New line, column arguments allow error messages to point to the true - beginning of a character/hollerith constant, rather than the beginning - of the content part, which makes them more consistent and helpful. - 05-Nov-89 JCB 2.0 - New "which" argument allows caller to specify termination character, - which should be apostrophe or double-quote, to support Fortran 90. */ - -void -ffelex_set_expecting_hollerith (long length, char which, - ffewhereLine line, ffewhereColumn column) -{ - - /* First kill the pending line/col info, if any (should only be pending - when this call has length==0, the previous call had length>0, and a - non-HOLLERITH token was sent in between the calls, but play it safe). */ - - ffewhere_line_kill (ffelex_raw_where_line_); - ffewhere_column_kill (ffelex_raw_where_col_); - - /* Now handle the length function. */ - switch (length) - { - case 0: - ffelex_expecting_hollerith_ = 0; - ffelex_raw_mode_ = 0; - ffelex_raw_where_line_ = ffewhere_line_unknown (); - ffelex_raw_where_col_ = ffewhere_column_unknown (); - return; /* Don't set new line/column info from args. */ - - case -1: - ffelex_raw_mode_ = -1; - ffelex_raw_char_ = which; - break; - - default: /* length > 0 */ - ffelex_expecting_hollerith_ = length; - break; - } - - /* Now set new line/column information from passed args. */ - - ffelex_raw_where_line_ = ffewhere_line_use (line); - ffelex_raw_where_col_ = ffewhere_column_use (column); -} - -/* ffelex_set_handler -- Set handler for tokens before calling _fixed or _free - - ffelex_set_handler((ffelexHandler) my_first_handler); - - Must be called before calling ffelex_file_fixed or ffelex_file_free or - after they return, but not while they are active. */ - -void -ffelex_set_handler (ffelexHandler first) -{ - ffelex_handler_ = first; -} - -/* ffelex_set_hexnum -- Set hexnum flag - - ffelex_set_hexnum(TRUE); - - Lex normally interprets a token starting with [0-9] as a NUMBER token, - so if it sees a [A-Za-z] in it, it stops parsing the NUMBER and leaves - the character as the first of the next token. But when parsing a - hexadecimal number, by calling this function with TRUE before starting - the parse of the token itself, lex will interpret [0-9] as the start - of a NAME token. */ - -void -ffelex_set_hexnum (bool f) -{ - ffelex_hexnum_ = f; -} - -/* ffelex_set_include -- Set INCLUDE file to be processed next - - ffewhereFile wf; // The ffewhereFile object for the file. - bool free_form; // TRUE means read free-form file, FALSE fixed-form. - FILE *fi; // The file to INCLUDE. - ffelex_set_include(wf,free_form,fi); - - Must be called only after receiving the EOS token following a valid - INCLUDE statement specifying a file that has already been successfully - opened. */ - -void -ffelex_set_include (ffewhereFile wf, bool free_form, FILE *fi) -{ - assert (ffelex_permit_include_); - assert (!ffelex_set_include_); - ffelex_set_include_ = TRUE; - ffelex_include_free_form_ = free_form; - ffelex_include_file_ = fi; - ffelex_include_wherefile_ = wf; -} - -/* ffelex_set_names -- Set names/name flag, names = TRUE - - ffelex_set_names(FALSE); - - Lex initially assumes multiple names should be formed. If this function is - called with FALSE, then single names are formed instead. The differences - are a difference in the token type (FFELEX_typeNAMES vs. FFELEX_typeNAME) - and in whether full source-location tracking is performed (it is for - multiple names, not for single names), which is more expensive in terms of - CPU time. */ - -void -ffelex_set_names (bool f) -{ - ffelex_names_ = f; - if (!f) - ffelex_names_pure_ = FALSE; -} - -/* ffelex_set_names_pure -- Set names/name (pure) flag, names = TRUE - - ffelex_set_names_pure(FALSE); - - Like ffelex_set_names, except affects both lexers. Normally, the - free-form lexer need not generate NAMES tokens because adjacent NAME - tokens must be separated by spaces which causes the lexer to generate - separate tokens for analysis (whereas in fixed-form the spaces are - ignored resulting in one long token). But in FORMAT statements, for - some reason, the Fortran 90 standard specifies that spaces can occur - anywhere within a format-item-list with no effect on the format spec - (except of course within character string edit descriptors), which means - that "1PE14.2" and "1 P E 1 4 . 2" are equivalent. For the FORMAT - statement handling, the existence of spaces makes it hard to deal with, - because each token is seen distinctly (i.e. seven tokens in the latter - example). But when no spaces are provided, as in the former example, - then only four tokens are generated, NUMBER("1"), NAME("PE14"), PERIOD, - NUMBER ("2"). By generating a NAMES instead of NAME, three things happen: - One, ffest_kw_format_ does a substring rather than full-string match, - and thus matches "PE14" to "PE"; two, ffelex_token_xyz_from_names functions - may be used to pull NAME/NAMES and NUMBER tokens out of the NAMES token; - and three, error reporting can point to the actual character rather than - at or prior to it. The first two things could be resolved by providing - alternate functions fairly easy, thus allowing FORMAT handling to expect - both lexers to generate NAME tokens instead of NAMES (with otherwise minor - changes to FORMAT parsing), but the third, error reporting, would suffer, - and when one makes mistakes in a FORMAT, believe me, one wants a pointer - to exactly where the compilers thinks the problem is, to even begin to get - a handle on it. So there. */ - -void -ffelex_set_names_pure (bool f) -{ - ffelex_names_pure_ = f; - ffelex_names_ = f; -} - -/* ffelex_splice_tokens -- Splice off and send tokens from a NAMES - - return (ffelexHandler) ffelex_splice_tokens(first_handler,master_token, - start_char_index); - - Returns first_handler if start_char_index chars into master_token (which - must be a NAMES token) is '\0'. Else, creates a subtoken from that - char, either NUMBER (if it is a digit), a NAME (if a valid firstnamechar), - an UNDERSCORE (if an underscore), or DOLLAR (if a dollar sign) - and sends it to first_handler. If anything other than NAME is sent, the - character at the end of it in the master token is examined to see if it - begins a NAME, NUMBER, UNDERSCORE, or DOLLAR, and, if so, - the handler returned by first_handler is invoked with that token, and - this process is repeated until the end of the master token or a NAME - token is reached. */ - -ffelexHandler -ffelex_splice_tokens (ffelexHandler first, ffelexToken master, - ffeTokenLength start) -{ - unsigned char *p; - ffeTokenLength i; - ffelexToken t; - - p = ffelex_token_text (master) + (i = start); - - while (*p != '\0') - { - if (ISDIGIT (*p)) - { - t = ffelex_token_number_from_names (master, i); - p += ffelex_token_length (t); - i += ffelex_token_length (t); - } - else if (ffesrc_is_name_init (*p)) - { - t = ffelex_token_name_from_names (master, i, 0); - p += ffelex_token_length (t); - i += ffelex_token_length (t); - } - else if (*p == '$') - { - t = ffelex_token_dollar_from_names (master, i); - ++p; - ++i; - } - else if (*p == '_') - { - t = ffelex_token_uscore_from_names (master, i); - ++p; - ++i; - } - else - { - assert ("not a valid NAMES character" == NULL); - t = NULL; - } - assert (first != NULL); - first = (ffelexHandler) (*first) (t); - ffelex_token_kill (t); - } - - return first; -} - -/* ffelex_swallow_tokens -- Eat all tokens delivered to me - - return ffelex_swallow_tokens; - - Return this handler when you don't want to look at any more tokens in the - statement because you've encountered an unrecoverable error in the - statement. */ - -ffelexHandler -ffelex_swallow_tokens (ffelexToken t, ffelexHandler handler) -{ - assert (handler != NULL); - - if ((t != NULL) && ((ffelex_token_type (t) == FFELEX_typeEOS) - || (ffelex_token_type (t) == FFELEX_typeSEMICOLON))) - return (ffelexHandler) (*handler) (t); - - ffelex_eos_handler_ = handler; - return (ffelexHandler) ffelex_swallow_tokens_; -} - -/* ffelex_token_dollar_from_names -- Return a dollar from within a names token - - ffelexToken t; - t = ffelex_token_dollar_from_names(t,6); - - It's as if you made a new token of dollar type having the dollar - at, in the example above, the sixth character of the NAMES token. */ - -ffelexToken -ffelex_token_dollar_from_names (ffelexToken t, ffeTokenLength start) -{ - ffelexToken nt; - - assert (t != NULL); - assert (ffelex_token_type (t) == FFELEX_typeNAMES); - assert (start < t->length); - assert (t->text[start] == '$'); - - /* Now make the token. */ - - nt = ffelex_token_new_ (); - nt->type = FFELEX_typeDOLLAR; - nt->length = 0; - nt->uses = 1; - ffewhere_set_from_track (&nt->where_line, &nt->where_col, t->where_line, - t->where_col, t->wheretrack, start); - nt->text = NULL; - return nt; -} - -/* ffelex_token_kill -- Decrement use count for token, kill if no uses left - - ffelexToken t; - ffelex_token_kill(t); - - Complements a call to ffelex_token_use or ffelex_token_new_.... */ - -void -ffelex_token_kill (ffelexToken t) -{ - assert (t != NULL); - - assert (t->uses > 0); - - if (--t->uses != 0) - return; - - --ffelex_total_tokens_; - - if (t->type == FFELEX_typeNAMES) - ffewhere_track_kill (t->where_line, t->where_col, - t->wheretrack, t->length); - ffewhere_line_kill (t->where_line); - ffewhere_column_kill (t->where_col); - if (t->text != NULL) - malloc_kill_ksr (malloc_pool_image (), t->text, t->size + 1); - malloc_kill_ks (malloc_pool_image (), t, sizeof (*t)); -} - -/* Make a new NAME token that is a substring of a NAMES token. */ - -ffelexToken -ffelex_token_name_from_names (ffelexToken t, ffeTokenLength start, - ffeTokenLength len) -{ - ffelexToken nt; - - assert (t != NULL); - assert (ffelex_token_type (t) == FFELEX_typeNAMES); - assert (start < t->length); - if (len == 0) - len = t->length - start; - else - { - assert (len > 0); - assert ((start + len) <= t->length); - } - assert (ffelex_is_firstnamechar ((unsigned char)(t->text[start]))); - - nt = ffelex_token_new_ (); - nt->type = FFELEX_typeNAME; - nt->size = len; /* Assume nobody's gonna fiddle with token - text. */ - nt->length = len; - nt->uses = 1; - ffewhere_set_from_track (&nt->where_line, &nt->where_col, t->where_line, - t->where_col, t->wheretrack, start); - nt->text = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - len + 1); - strncpy (nt->text, t->text + start, len); - nt->text[len] = '\0'; - return nt; -} - -/* Make a new NAMES token that is a substring of another NAMES token. */ - -ffelexToken -ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start, - ffeTokenLength len) -{ - ffelexToken nt; - - assert (t != NULL); - assert (ffelex_token_type (t) == FFELEX_typeNAMES); - assert (start < t->length); - if (len == 0) - len = t->length - start; - else - { - assert (len > 0); - assert ((start + len) <= t->length); - } - assert (ffelex_is_firstnamechar ((unsigned char)(t->text[start]))); - - nt = ffelex_token_new_ (); - nt->type = FFELEX_typeNAMES; - nt->size = len; /* Assume nobody's gonna fiddle with token - text. */ - nt->length = len; - nt->uses = 1; - ffewhere_set_from_track (&nt->where_line, &nt->where_col, t->where_line, - t->where_col, t->wheretrack, start); - ffewhere_track_copy (nt->wheretrack, t->wheretrack, start, len); - nt->text = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - len + 1); - strncpy (nt->text, t->text + start, len); - nt->text[len] = '\0'; - return nt; -} - -/* Make a new CHARACTER token. */ - -ffelexToken -ffelex_token_new_character (const char *s, ffewhereLine l, ffewhereColumn c) -{ - ffelexToken t; - - t = ffelex_token_new_ (); - t->type = FFELEX_typeCHARACTER; - t->length = t->size = strlen (s); /* Assume it won't get bigger. */ - t->uses = 1; - t->text = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - t->size + 1); - strcpy (t->text, s); - t->where_line = ffewhere_line_use (l); - t->where_col = ffewhere_column_new (c); - return t; -} - -/* Make a new EOF token right after end of file. */ - -ffelexToken -ffelex_token_new_eof (void) -{ - ffelexToken t; - - t = ffelex_token_new_ (); - t->type = FFELEX_typeEOF; - t->uses = 1; - t->text = NULL; - t->where_line = ffewhere_line_new (ffelex_linecount_current_); - t->where_col = ffewhere_column_new (1); - return t; -} - -/* Make a new NAME token. */ - -ffelexToken -ffelex_token_new_name (const char *s, ffewhereLine l, ffewhereColumn c) -{ - ffelexToken t; - - assert (ffelex_is_firstnamechar ((unsigned char)*s)); - - t = ffelex_token_new_ (); - t->type = FFELEX_typeNAME; - t->length = t->size = strlen (s); /* Assume it won't get bigger. */ - t->uses = 1; - t->text = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - t->size + 1); - strcpy (t->text, s); - t->where_line = ffewhere_line_use (l); - t->where_col = ffewhere_column_new (c); - return t; -} - -/* Make a new NAMES token. */ - -ffelexToken -ffelex_token_new_names (const char *s, ffewhereLine l, ffewhereColumn c) -{ - ffelexToken t; - - assert (ffelex_is_firstnamechar ((unsigned char)*s)); - - t = ffelex_token_new_ (); - t->type = FFELEX_typeNAMES; - t->length = t->size = strlen (s); /* Assume it won't get bigger. */ - t->uses = 1; - t->text = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - t->size + 1); - strcpy (t->text, s); - t->where_line = ffewhere_line_use (l); - t->where_col = ffewhere_column_new (c); - ffewhere_track_clear (t->wheretrack, t->length); /* Assume contiguous - names. */ - return t; -} - -/* Make a new NUMBER token. - - The first character of the string must be a digit, and only the digits - are copied into the new number. So this may be used to easily extract - a NUMBER token from within any text string. Then the length of the - resulting token may be used to calculate where the digits stopped - in the original string. */ - -ffelexToken -ffelex_token_new_number (const char *s, ffewhereLine l, ffewhereColumn c) -{ - ffelexToken t; - ffeTokenLength len; - - /* How long is the string of decimal digits at s? */ - - len = strspn (s, "0123456789"); - - /* Make sure there is at least one digit. */ - - assert (len != 0); - - /* Now make the token. */ - - t = ffelex_token_new_ (); - t->type = FFELEX_typeNUMBER; - t->length = t->size = len; /* Assume it won't get bigger. */ - t->uses = 1; - t->text = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - len + 1); - strncpy (t->text, s, len); - t->text[len] = '\0'; - t->where_line = ffewhere_line_use (l); - t->where_col = ffewhere_column_new (c); - return t; -} - -/* Make a new token of any type that doesn't contain text. A private - function that is used by public macros in the interface file. */ - -ffelexToken -ffelex_token_new_simple_ (ffelexType type, ffewhereLine l, ffewhereColumn c) -{ - ffelexToken t; - - t = ffelex_token_new_ (); - t->type = type; - t->uses = 1; - t->text = NULL; - t->where_line = ffewhere_line_use (l); - t->where_col = ffewhere_column_new (c); - return t; -} - -/* Make a new NUMBER token from an existing NAMES token. - - Like ffelex_token_new_number, this function calculates the length - of the digit string itself. */ - -ffelexToken -ffelex_token_number_from_names (ffelexToken t, ffeTokenLength start) -{ - ffelexToken nt; - ffeTokenLength len; - - assert (t != NULL); - assert (ffelex_token_type (t) == FFELEX_typeNAMES); - assert (start < t->length); - - /* How long is the string of decimal digits at s? */ - - len = strspn (t->text + start, "0123456789"); - - /* Make sure there is at least one digit. */ - - assert (len != 0); - - /* Now make the token. */ - - nt = ffelex_token_new_ (); - nt->type = FFELEX_typeNUMBER; - nt->size = len; /* Assume nobody's gonna fiddle with token - text. */ - nt->length = len; - nt->uses = 1; - ffewhere_set_from_track (&nt->where_line, &nt->where_col, t->where_line, - t->where_col, t->wheretrack, start); - nt->text = malloc_new_ksr (malloc_pool_image (), "FFELEX token text", - len + 1); - strncpy (nt->text, t->text + start, len); - nt->text[len] = '\0'; - return nt; -} - -/* Make a new UNDERSCORE token from a NAMES token. */ - -ffelexToken -ffelex_token_uscore_from_names (ffelexToken t, ffeTokenLength start) -{ - ffelexToken nt; - - assert (t != NULL); - assert (ffelex_token_type (t) == FFELEX_typeNAMES); - assert (start < t->length); - assert (t->text[start] == '_'); - - /* Now make the token. */ - - nt = ffelex_token_new_ (); - nt->type = FFELEX_typeUNDERSCORE; - nt->uses = 1; - ffewhere_set_from_track (&nt->where_line, &nt->where_col, t->where_line, - t->where_col, t->wheretrack, start); - nt->text = NULL; - return nt; -} - -/* ffelex_token_use -- Return another instance of a token - - ffelexToken t; - t = ffelex_token_use(t); - - In a sense, the new token is a copy of the old, though it might be the - same with just a new use count. - - We use the use count method (easy). */ - -ffelexToken -ffelex_token_use (ffelexToken t) -{ - if (t == NULL) - assert ("_token_use: null token" == NULL); - t->uses++; - return t; -} - -#include "gt-f-lex.h" diff --git a/contrib/gcc/f/lex.h b/contrib/gcc/f/lex.h deleted file mode 100644 index 04dfbed..0000000 --- a/contrib/gcc/f/lex.h +++ /dev/null @@ -1,200 +0,0 @@ -/* lex.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - lex.c - - Modifications: - 22-Aug-89 JCB 1.1 - Change for new ffewhere interface. -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_LEX_H -#define GCC_F_LEX_H - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFELEX_typeNONE, - FFELEX_typeCOMMENT, - FFELEX_typeEOS, - FFELEX_typeEOF, - FFELEX_typeERROR, - FFELEX_typeRAW, - FFELEX_typeQUOTE, - FFELEX_typeDOLLAR, - FFELEX_typeHASH, - FFELEX_typePERCENT, - FFELEX_typeAMPERSAND, - FFELEX_typeAPOSTROPHE, - FFELEX_typeOPEN_PAREN, - FFELEX_typeCLOSE_PAREN, - FFELEX_typeASTERISK, - FFELEX_typePLUS, - FFELEX_typeMINUS, - FFELEX_typePERIOD, - FFELEX_typeSLASH, - FFELEX_typeNUMBER, /* Grep: [0-9][0-9]*. */ - FFELEX_typeOPEN_ANGLE, - FFELEX_typeEQUALS, - FFELEX_typeCLOSE_ANGLE, - FFELEX_typeNAME, /* Grep: [A-Za-z][A-Za-z0-9_]*. */ - FFELEX_typeCOMMA, - FFELEX_typePOWER, /* "**". */ - FFELEX_typeCONCAT, /* "//". */ - FFELEX_typeDEBUG, - FFELEX_typeNAMES, /* Same as FFELEX_typeNAME in initial - context. */ - FFELEX_typeHOLLERITH, /* part of H. */ - FFELEX_typeCHARACTER, /* part of '' or "". */ - FFELEX_typeCOLON, - FFELEX_typeSEMICOLON, - FFELEX_typeUNDERSCORE, - FFELEX_typeQUESTION, - FFELEX_typeOPEN_ARRAY, /* "(/". */ - FFELEX_typeCLOSE_ARRAY, /* "/)". */ - FFELEX_typeCOLONCOLON, /* "::". */ - FFELEX_typeREL_LE, /* "<=". */ - FFELEX_typeREL_NE, /* "<>". */ - FFELEX_typeREL_EQ, /* "==". */ - FFELEX_typePOINTS, /* "=>". */ - FFELEX_typeREL_GE, /* ">=". */ - FFELEX_type - } ffelexType; - -/* Typedefs. */ - -typedef struct _lextoken_ *ffelexToken; -typedef void *lex_sigh_; -typedef lex_sigh_ (*lex_sigh__) (ffelexToken); -typedef lex_sigh__ (*ffelexHandler) (ffelexToken); - -/* Include files needed by this one. */ - -#include "top.h" -#include "where.h" - -/* Structure definitions. */ - -struct _lextoken_ - { - long int id_; /* DEBUG ONLY. */ - ffeTokenLength size; - ffeTokenLength length; - unsigned short uses; - char *text; - ffelexType type; - ffewhereLine where_line; - ffewhereColumn where_col; - ffewhereLine currentnames_line; /* For tracking NAMES tokens. */ - ffewhereColumn currentnames_col; /* For tracking NAMES tokens. */ - ffewhereTrack wheretrack; /* For tracking NAMES tokens. */ - }; - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -void ffelex_display_token (ffelexToken t); -bool ffelex_expecting_character (void); -ffelexHandler ffelex_file_fixed (ffewhereFile wf, FILE *f); -ffelexHandler ffelex_file_free (ffewhereFile wf, FILE *f); -void ffelex_hash_kludge (FILE *f); -void ffelex_init_1 (void); -bool ffelex_is_names_expected (void); -char *ffelex_line (void); -ffewhereColumnNumber ffelex_line_length (void); -ffewhereLineNumber ffelex_line_number (void); -void ffelex_set_expecting_hollerith (long length, char which, - ffewhereLine line, - ffewhereColumn column); -void ffelex_set_handler (ffelexHandler first); -void ffelex_set_hexnum (bool on); -void ffelex_set_include (ffewhereFile wf, bool free_form, FILE *fi); -void ffelex_set_names (bool on); -void ffelex_set_names_pure (bool on); -ffelexHandler ffelex_splice_tokens (ffelexHandler first, ffelexToken master, - ffeTokenLength start); -ffelexHandler ffelex_swallow_tokens (ffelexToken t, ffelexHandler handler); -ffelexToken ffelex_token_dollar_from_names (ffelexToken t, - ffeTokenLength start); -void ffelex_token_kill (ffelexToken t); -ffelexToken ffelex_token_name_from_names (ffelexToken t, - ffeTokenLength start, - ffeTokenLength len); -ffelexToken ffelex_token_names_from_names (ffelexToken t, - ffeTokenLength start, - ffeTokenLength len); -ffelexToken ffelex_token_new (void); -ffelexToken ffelex_token_new_character (const char *s, ffewhereLine l, - ffewhereColumn c); -ffelexToken ffelex_token_new_eof (void); -ffelexToken ffelex_token_new_name (const char *s, ffewhereLine l, - ffewhereColumn c); -ffelexToken ffelex_token_new_names (const char *s, ffewhereLine l, - ffewhereColumn c); -ffelexToken ffelex_token_new_number (const char *s, ffewhereLine l, - ffewhereColumn c); -ffelexToken ffelex_token_new_simple_ (ffelexType type, ffewhereLine l, - ffewhereColumn c); -ffelexToken ffelex_token_number_from_names (ffelexToken t, - ffeTokenLength start); -ffelexToken ffelex_token_uscore_from_names (ffelexToken t, - ffeTokenLength start); -ffelexToken ffelex_token_use (ffelexToken t); - -/* Define macros. */ - -#define ffelex_init_0() -#define ffelex_init_2() -#define ffelex_init_3() -#define ffelex_init_4() -#define ffelex_is_firstnamechar(c) ISIDST (c) -#define ffelex_terminate_0() -#define ffelex_terminate_1() -#define ffelex_terminate_2() -#define ffelex_terminate_3() -#define ffelex_terminate_4() -#define ffelex_token_length(t) ((t)->length) -#define ffelex_token_new_eos(l,c) \ - ffelex_token_new_simple_ (FFELEX_typeEOS, (l), (c)) -#define ffelex_token_new_period(l,c) \ - ffelex_token_new_simple_ (FFELEX_typePERIOD, (l), (c)) -#define ffelex_token_strcmp(t1,t2) strcmp ((t1)->text, (t2)->text) -#define ffelex_token_text(t) ((t)->text) -#define ffelex_token_type(t) ((t)->type) -#define ffelex_token_where_column(t) ((t)->where_col) -#define ffelex_token_where_filename(t) \ - ffewhere_line_filename ((t)->where_line) -#define ffelex_token_where_filelinenum(t) \ - ffewhere_line_filelinenum((t)->where_line) -#define ffelex_token_where_line(t) ((t)->where_line) -#define ffelex_token_where_line_number(t) \ - ffewhere_line_number ((t)->where_line) -#define ffelex_token_wheretrack(t) ((t)->wheretrack) - -/* End of #include file. */ - -#endif /* ! GCC_F_LEX_H */ diff --git a/contrib/gcc/f/malloc.c b/contrib/gcc/f/malloc.c deleted file mode 100644 index b9addb8..0000000 --- a/contrib/gcc/f/malloc.c +++ /dev/null @@ -1,559 +0,0 @@ -/* malloc.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - Fast pool-based memory allocation. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "malloc.h" - -/* Externals defined here. */ - -struct _malloc_root_ malloc_root_ -= -{ - { - &malloc_root_.malloc_pool_image_, - &malloc_root_.malloc_pool_image_, - (mallocPool) &malloc_root_.malloc_pool_image_.eldest, - (mallocPool) &malloc_root_.malloc_pool_image_.eldest, - (mallocArea_) &malloc_root_.malloc_pool_image_.first, - (mallocArea_) &malloc_root_.malloc_pool_image_.first, - 0, -#if MALLOC_DEBUG - 0, 0, 0, 0, 0, 0, 0, { '/' } -#else - { 0 } -#endif - }, -}; - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - -static void *malloc_reserve_ = NULL; /* For crashes. */ -#if MALLOC_DEBUG -static const char *const malloc_types_[] = -{"KS", "KSR", "NF", "NFR", "US", "USR"}; -#endif - -/* Static functions (internal). */ - -static void malloc_kill_area_ (mallocPool pool, mallocArea_ a); -#if MALLOC_DEBUG -static void malloc_verify_area_ (mallocPool pool, mallocArea_ a); -#endif - -/* Internal macros. */ - -struct max_alignment { - char c; - union { - HOST_WIDEST_INT i; - long double d; - } u; -}; - -#define MAX_ALIGNMENT (offsetof (struct max_alignment, u)) -#define ROUNDED_AREA_SIZE (MAX_ALIGNMENT * ((sizeof(mallocArea_) + MAX_ALIGNMENT - 1) / MAX_ALIGNMENT)) - -#if MALLOC_DEBUG -#define malloc_kill_(ptr,s) do {memset((ptr),127,(s));free((ptr));} while(0) -#else -#define malloc_kill_(ptr,s) free((ptr)) -#endif - -/* malloc_kill_area_ -- Kill storage area and its object - - malloc_kill_area_(mallocPool pool,mallocArea_ area); - - Does the actual killing of a storage area. */ - -static void -malloc_kill_area_ (mallocPool pool UNUSED, mallocArea_ a) -{ -#if MALLOC_DEBUG - assert (strcmp (a->name, ((char *) (a->where)) + a->size) == 0); -#endif - malloc_kill_ (a->where - ROUNDED_AREA_SIZE, a->size); - a->next->previous = a->previous; - a->previous->next = a->next; -#if MALLOC_DEBUG - pool->freed += a->size; - pool->frees++; -#endif - - malloc_kill_ (a, - offsetof (struct _malloc_area_, name) - + strlen (a->name) + 1); -} - -/* malloc_verify_area_ -- Verify storage area and its object - - malloc_verify_area_(mallocPool pool,mallocArea_ area); - - Does the actual verifying of a storage area. */ - -#if MALLOC_DEBUG -static void -malloc_verify_area_ (mallocPool pool UNUSED, mallocArea_ a UNUSED) -{ - mallocSize s = a->size; - - assert (strcmp (a->name, ((char *) (a->where)) + s) == 0); -} -#endif - -/* malloc_init -- Initialize malloc cluster - - malloc_init(); - - Call malloc_init before you do anything else. */ - -void -malloc_init (void) -{ - if (malloc_reserve_ != NULL) - return; - malloc_reserve_ = xmalloc (20 * 1024); /* In case of crash, free this first. */ -} - -/* malloc_pool_display -- Display a pool - - mallocPool p; - malloc_pool_display(p); - - Displays information associated with the pool and its subpools. */ - -void -malloc_pool_display (mallocPool p UNUSED) -{ -#if MALLOC_DEBUG - mallocPool q; - mallocArea_ a; - - fprintf (dmpout, "Pool \"%s\": bytes allocated=%lu, freed=%lu, old sizes=%lu, new sizes\ -=%lu,\n allocations=%lu, frees=%lu, resizes=%lu, uses=%lu\n Subpools:\n", - p->name, p->allocated, p->freed, p->old_sizes, p->new_sizes, p->allocations, - p->frees, p->resizes, p->uses); - - for (q = p->eldest; q != (mallocPool) & p->eldest; q = q->next) - fprintf (dmpout, " \"%s\"\n", q->name); - - fprintf (dmpout, " Storage areas:\n"); - - for (a = p->first; a != (mallocArea_) & p->first; a = a->next) - { - fprintf (dmpout, " "); - malloc_display_ (a); - } -#endif -} - -/* malloc_pool_kill -- Destroy a pool - - mallocPool p; - malloc_pool_kill(p); - - Releases all storage associated with the pool and its subpools. */ - -void -malloc_pool_kill (mallocPool p) -{ - mallocPool q; - mallocArea_ a; - - if (--p->uses != 0) - return; - -#if 0 - malloc_pool_display (p); -#endif - - assert (p->next->previous == p); - assert (p->previous->next == p); - - /* Kill off all the subpools. */ - - while ((q = p->eldest) != (mallocPool) &p->eldest) - { - q->uses = 1; /* Force the kill. */ - malloc_pool_kill (q); - } - - /* Now free all the storage areas. */ - - while ((a = p->first) != (mallocArea_) & p->first) - { - malloc_kill_area_ (p, a); - } - - /* Now remove from list of sibling pools. */ - - p->next->previous = p->previous; - p->previous->next = p->next; - - /* Finally, free the pool itself. */ - - malloc_kill_ (p, - offsetof (struct _malloc_pool_, name) - + strlen (p->name) + 1); -} - -/* malloc_pool_new -- Make a new pool - - mallocPool p; - p = malloc_pool_new("My new pool",malloc_pool_image(),1024); - - Makes a new pool with the given name and default new-chunk allocation. */ - -mallocPool -malloc_pool_new (const char *name, mallocPool parent, - unsigned long chunks UNUSED) -{ - mallocPool p; - - if (parent == NULL) - parent = malloc_pool_image (); - - p = malloc_new_ (offsetof (struct _malloc_pool_, name) - + (MALLOC_DEBUG ? strlen (name) + 1 : 0)); - p->next = (mallocPool) &(parent->eldest); - p->previous = parent->youngest; - parent->youngest->next = p; - parent->youngest = p; - p->eldest = (mallocPool) &(p->eldest); - p->youngest = (mallocPool) &(p->eldest); - p->first = (mallocArea_) &(p->first); - p->last = (mallocArea_) &(p->first); - p->uses = 1; -#if MALLOC_DEBUG - p->allocated = p->freed = p->old_sizes = p->new_sizes = p->allocations - = p->frees = p->resizes = 0; - strcpy (p->name, name); -#endif - return p; -} - -/* malloc_pool_use -- Use an existing pool - - mallocPool p; - p = malloc_pool_new(pool); - - Increments use count for pool; means a matching malloc_pool_kill must - be performed before a subsequent one will actually kill the pool. */ - -mallocPool -malloc_pool_use (mallocPool pool) -{ - ++pool->uses; - return pool; -} - -/* malloc_display_ -- Display info on a mallocArea_ - - mallocArea_ a; - malloc_display_(a); - - Simple. */ - -void -malloc_display_ (mallocArea_ a UNUSED) -{ -#if MALLOC_DEBUG - fprintf (dmpout, "At %08lX, size=%" mallocSize_f "u, type=%s, \"%s\"\n", - (unsigned long) a->where, a->size, malloc_types_[a->type], a->name); -#endif -} - -/* malloc_find_inpool_ -- Find mallocArea_ for object in pool - - mallocPool pool; - void *ptr; - mallocArea_ a; - a = malloc_find_inpool_(pool,ptr); - - Search for object in list of mallocArea_s, die if not found. */ - -mallocArea_ -malloc_find_inpool_ (mallocPool pool UNUSED, void *ptr) -{ - mallocArea_ *t; - t = (mallocArea_ *) (ptr - ROUNDED_AREA_SIZE); - return *t; -} - -/* malloc_kill_inpool_ -- Kill object - - malloc_kill_inpool_(NULL,MALLOC_typeUS_,ptr,size_in_bytes); - - Find the mallocArea_ for the pointer, make sure the type is proper, and - kill both of them. */ - -void -malloc_kill_inpool_ (mallocPool pool, mallocType_ type UNUSED, - void *ptr, mallocSize s UNUSED) -{ - mallocArea_ a; - - if (pool == NULL) - pool = malloc_pool_image (); - -#if MALLOC_DEBUG - assert ((pool == malloc_pool_image ()) - || malloc_pool_find_ (pool, malloc_pool_image ())); -#endif - - a = malloc_find_inpool_ (pool, ptr); -#if MALLOC_DEBUG - assert (a->type == type); - if ((type != MALLOC_typeUS_) && (type != MALLOC_typeUSR_)) - assert (a->size == s); -#endif - malloc_kill_area_ (pool, a); -} - -/* malloc_new_ -- Allocate new object, die if unable - - ptr = malloc_new_(size_in_bytes); - - Call malloc, bomb if it returns NULL. */ - -void * -malloc_new_ (mallocSize s) -{ - void *ptr; - unsigned ss = s; - -#if MALLOC_DEBUG && 0 - assert (s == (mallocSize) ss);/* Else alloc is too big for this - library/sys. */ -#endif - - ptr = xmalloc (ss); -#if MALLOC_DEBUG - memset (ptr, 126, ss); /* Catch some kinds of errors more - quickly/reliably. */ -#endif - return ptr; -} - -/* malloc_new_inpool_ -- Allocate new object, die if unable - - ptr = malloc_new_inpool_(NULL,MALLOC_typeUS_,"object",size_in_bytes); - - Allocate the structure and allocate a mallocArea_ to describe it, then - add it to the list of mallocArea_s for the pool. */ - -void * -malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s) -{ - void *ptr; - mallocArea_ a; - unsigned short i; - mallocArea_ *temp; - - if (pool == NULL) - pool = malloc_pool_image (); - -#if MALLOC_DEBUG - assert ((pool == malloc_pool_image ()) - || malloc_pool_find_ (pool, malloc_pool_image ())); -#endif - - ptr = malloc_new_ (ROUNDED_AREA_SIZE + s + (i = (MALLOC_DEBUG ? strlen (name) + 1 : 0))); -#if MALLOC_DEBUG - strcpy (((char *) (ptr)) + s, name); -#endif - a = malloc_new_ (offsetof (struct _malloc_area_, name) + i); - temp = (mallocArea_ *) ptr; - *temp = a; - ptr = ptr + ROUNDED_AREA_SIZE; - switch (type) - { /* A little optimization to speed up killing - of non-permanent stuff. */ - case MALLOC_typeKP_: - case MALLOC_typeKPR_: - a->next = (mallocArea_) &pool->first; - break; - - default: - a->next = pool->first; - break; - } - a->previous = a->next->previous; - a->next->previous = a; - a->previous->next = a; - a->where = ptr; -#if MALLOC_DEBUG - a->size = s; - a->type = type; - strcpy (a->name, name); - pool->allocated += s; - pool->allocations++; -#endif - return ptr; -} - -/* malloc_new_zinpool_ -- Allocate new zeroed object, die if unable - - ptr = malloc_new_zinpool_(NULL,MALLOC_typeUS_,"object",size_in_bytes,0); - - Like malloc_new_inpool_, but zeros out all the bytes in the area (assuming - you pass it a 0). */ - -void * -malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s, - int z) -{ - void *ptr; - - ptr = malloc_new_inpool_ (pool, type, name, s); - memset (ptr, z, s); - return ptr; -} - -/* malloc_pool_find_ -- See if pool is a descendant of another pool - - if (malloc_pool_find_(target_pool,parent_pool)) ...; - - Recursive descent on each of the children of the parent pool, after - first checking the children themselves. */ - -char -malloc_pool_find_ (mallocPool pool, mallocPool parent) -{ - mallocPool p; - - for (p = parent->eldest; p != (mallocPool) & parent->eldest; p = p->next) - { - if ((p == pool) || malloc_pool_find_ (pool, p)) - return 1; - } - return 0; -} - -/* malloc_resize_inpool_ -- Resize existing object in pool - - ptr = malloc_resize_inpool_(NULL,MALLOC_typeUSR_,ptr,new_size,old_size); - - Find the object's mallocArea_, check it out, then do the resizing. */ - -void * -malloc_resize_inpool_ (mallocPool pool, mallocType_ type UNUSED, - void *ptr, mallocSize ns, mallocSize os UNUSED) -{ - mallocArea_ a; - mallocArea_ *temp; - - if (pool == NULL) - pool = malloc_pool_image (); - -#if MALLOC_DEBUG - assert ((pool == malloc_pool_image ()) - || malloc_pool_find_ (pool, malloc_pool_image ())); -#endif - - a = malloc_find_inpool_ (pool, ptr); -#if MALLOC_DEBUG - assert (a->type == type); - if ((type == MALLOC_typeKSR_) || (type == MALLOC_typeKPR_)) - assert (a->size == os); - assert (strcmp (a->name, ((char *) (ptr)) + os) == 0); -#endif - ptr = malloc_resize_ (ptr - ROUNDED_AREA_SIZE, ROUNDED_AREA_SIZE + ns + (MALLOC_DEBUG ? strlen (a->name) + 1: 0)); - temp = (mallocArea_ *) ptr; - *temp = a; - ptr = ptr + ROUNDED_AREA_SIZE; - a->where = ptr; -#if MALLOC_DEBUG - a->size = ns; - strcpy (((char *) (ptr)) + ns, a->name); - pool->old_sizes += os; - pool->new_sizes += ns; - pool->resizes++; -#endif - return ptr; -} - -/* malloc_resize_ -- Reallocate object, die if unable - - ptr = malloc_resize_(ptr,size_in_bytes); - - Call realloc, bomb if it returns NULL. */ - -void * -malloc_resize_ (void *ptr, mallocSize s) -{ - int ss = s; - -#if MALLOC_DEBUG && 0 - assert (s == (mallocSize) ss);/* Too big if failure here. */ -#endif - - ptr = xrealloc (ptr, ss); - return ptr; -} - -/* malloc_verify_inpool_ -- Verify object - - Find the mallocArea_ for the pointer, make sure the type is proper, and - verify both of them. */ - -void -malloc_verify_inpool_ (mallocPool pool UNUSED, mallocType_ type UNUSED, - void *ptr UNUSED, mallocSize s UNUSED) -{ -#if MALLOC_DEBUG - mallocArea_ a; - - if (pool == NULL) - pool = malloc_pool_image (); - - assert ((pool == malloc_pool_image ()) - || malloc_pool_find_ (pool, malloc_pool_image ())); - - a = malloc_find_inpool_ (pool, ptr); - assert (a->type == type); - if ((type != MALLOC_typeUS_) && (type != MALLOC_typeUSR_)) - assert (a->size == s); - malloc_verify_area_ (pool, a); -#endif -} diff --git a/contrib/gcc/f/malloc.h b/contrib/gcc/f/malloc.h deleted file mode 100644 index 1c82720..0000000 --- a/contrib/gcc/f/malloc.h +++ /dev/null @@ -1,183 +0,0 @@ -/* malloc.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - malloc.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_MALLOC_H -#define GCC_F_MALLOC_H - -#ifndef MALLOC_DEBUG -#define MALLOC_DEBUG 0 /* 1 means check caller's use of this module. */ -#endif - -/* Simple definitions and enumerations. */ - -typedef enum - { - MALLOC_typeKS_, - MALLOC_typeKSR_, - MALLOC_typeKP_, - MALLOC_typeKPR_, - MALLOC_typeUS_, - MALLOC_typeUSR_, - MALLOC_type_ - } mallocType_; - -/* Typedefs. */ - -typedef struct _malloc_area_ *mallocArea_; -typedef struct _malloc_pool_ *mallocPool; -typedef unsigned long int mallocSize; -#define mallocSize_f "l" - -/* Include files needed by this one. */ - - -/* Structure definitions. */ - -struct _malloc_area_ - { - mallocArea_ next; - mallocArea_ previous; - void *where; -#if MALLOC_DEBUG - mallocSize size; - mallocType_ type; -#endif - char name[1]; - }; - -struct _malloc_pool_ - { - mallocPool next; - mallocPool previous; - mallocPool eldest; - mallocPool youngest; - mallocArea_ first; - mallocArea_ last; - unsigned long uses; -#if MALLOC_DEBUG - mallocSize allocated; - mallocSize freed; - mallocSize old_sizes; - mallocSize new_sizes; - unsigned long allocations; - unsigned long frees; - unsigned long resizes; -#endif - char name[1]; - }; - -struct _malloc_root_ - { - struct _malloc_pool_ malloc_pool_image_; - }; - -/* Global objects accessed by users of this module. */ - -extern struct _malloc_root_ malloc_root_; - -/* Declare functions with prototypes. */ - -void malloc_display_ (mallocArea_ a); -mallocArea_ malloc_find_inpool_ (mallocPool pool, void *ptr); -void malloc_init (void); -void malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr, - mallocSize size); -void *malloc_new_ (mallocSize size); -void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, - mallocSize size); -void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name, - mallocSize size, int z); -void malloc_pool_display (mallocPool p); -char malloc_pool_find_ (mallocPool p, mallocPool parent); -void malloc_pool_kill (mallocPool p); -mallocPool malloc_pool_new (const char *name, mallocPool parent, unsigned long chunks); -mallocPool malloc_pool_use (mallocPool p); -void *malloc_resize_ (void *ptr, mallocSize new_size); -void *malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr, - mallocSize new_size, mallocSize old_size); -void malloc_verify_inpool_ (mallocPool pool, mallocType_ type, void *ptr, - mallocSize size); - -/* Define macros. */ - -#define malloc_new_ks(pool,name,size) \ - malloc_new_inpool_ (pool,MALLOC_typeKS_,name,size) -#define malloc_new_ksr(pool,name,size) \ - malloc_new_inpool_ (pool,MALLOC_typeKSR_,name,size) -#define malloc_new_kp(pool,name,size) \ - malloc_new_inpool_ (pool,MALLOC_typeKP_,name,size) -#define malloc_new_kpr(pool,name,size) \ - malloc_new_inpool_ (pool,MALLOC_typeKPR_,name,size) -#define malloc_new_us(pool,name,size) \ - malloc_new_inpool_ (pool,MALLOC_typeUS_,name,size) -#define malloc_new_usr(pool,name,size) \ - malloc_new_inpool_ (pool,MALLOC_typeUSR_,name,size) -#define malloc_new_zks(pool,name,size,z) \ - malloc_new_zinpool_ (pool,MALLOC_typeKS_,name,size,z) -#define malloc_new_zksr(pool,name,size,z) \ - malloc_new_zinpool_ (pool,MALLOC_typeKSR_,name,size,z) -#define malloc_new_zkp(pool,name,size,z) \ - malloc_new_zinpool_ (pool,MALLOC_typeKP_,name,size,z) -#define malloc_new_zkpr(pool,name,size,z) \ - malloc_new_zinpool_ (pool,MALLOC_typeKPR_,name,size,z) -#define malloc_new_zus(pool,name,size,z) \ - malloc_new_zinpool_ (pool,MALLOC_typeUS_,name,size,z) -#define malloc_new_zusr(pool,name,size,z) \ - malloc_new_zinpool_ (pool,MALLOC_typeUSR_,name,size,z) -#define malloc_kill_ks(pool,ptr,size) \ - malloc_kill_inpool_ (pool,MALLOC_typeKS_,ptr,size) -#define malloc_kill_ksr(pool,ptr,size) \ - malloc_kill_inpool_ (pool,MALLOC_typeKSR_,ptr,size) -#define malloc_kill_us(pool,ptr) \ - malloc_kill_inpool_ (pool,MALLOC_typeUS_,ptr,0) -#define malloc_kill_usr(pool,ptr) \ - malloc_kill_inpool_ (pool,MALLOC_typeUSR_,ptr,0) -#define malloc_pool_image() (&malloc_root_.malloc_pool_image_) -#define malloc_resize_ksr(pool,ptr,new_size,old_size) \ - malloc_resize_inpool_ (pool,MALLOC_typeKSR_,ptr,new_size,old_size) -#define malloc_resize_kpr(pool,ptr,new_size,old_size) \ - malloc_resize_inpool_ (pool,MALLOC_typeKPR_,ptr,new_size,old_size) -#define malloc_resize_usr(pool,ptr,new_size) \ - malloc_resize_inpool_ (pool,MALLOC_typeUSR_,ptr,new_size,0) -#define malloc_verify_kp(pool,name,size) \ - malloc_verify_inpool_ (pool,MALLOC_typeKP_,name,size) -#define malloc_verify_kpr(pool,name,size) \ - malloc_verify_inpool_ (pool,MALLOC_typeKPR_,name,size) -#define malloc_verify_ks(pool,ptr,size) \ - malloc_verify_inpool_ (pool,MALLOC_typeKS_,ptr,size) -#define malloc_verify_ksr(pool,ptr,size) \ - malloc_verify_inpool_ (pool,MALLOC_typeKSR_,ptr,size) -#define malloc_verify_us(pool,ptr) \ - malloc_verify_inpool_ (pool,MALLOC_typeUS_,ptr,0) -#define malloc_verify_usr(pool,ptr) \ - malloc_verify_inpool_ (pool,MALLOC_typeUSR_,ptr,0) - -/* End of #include file. */ - -#endif /* ! GCC_F_MALLOC_H */ diff --git a/contrib/gcc/f/name.c b/contrib/gcc/f/name.c deleted file mode 100644 index 26f713e..0000000 --- a/contrib/gcc/f/name.c +++ /dev/null @@ -1,241 +0,0 @@ -/* name.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None. - - Description: - Name and name space abstraction. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "bad.h" -#include "name.h" -#include "lex.h" -#include "malloc.h" -#include "src.h" -#include "where.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - - -/* Static functions (internal). */ - -static ffename ffename_lookup_ (ffenameSpace ns, ffelexToken t, bool *found); - -/* Internal macros. */ - - -/* Searches for and returns the matching ffename object, or returns a - pointer to the name before which the new name should go. */ - -static ffename -ffename_lookup_ (ffenameSpace ns, ffelexToken t, bool *found) -{ - ffename n; - - for (n = ns->first; n != (ffename) &ns->first; n = n->next) - { - if (ffelex_token_strcmp (t, n->t) == 0) - { - *found = TRUE; - return n; - } - } - - *found = FALSE; - return n; /* (n == (ffename) &ns->first) */ -} - -/* Searches for and returns the matching ffename object, or creates a new - one (with a NULL ffesymbol) and returns that. If last arg is TRUE, - check whether token meets character-content requirements (such as - "all characters must be uppercase", as determined by - ffesrc_bad_char_symbol (), issue diagnostic if it doesn't. */ - -ffename -ffename_find (ffenameSpace ns, ffelexToken t) -{ - ffename n; - ffename newn; - bool found; - - assert (ns != NULL); - assert ((t != NULL) && ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES))); - - n = ffename_lookup_ (ns, t, &found); - if (found) - return n; - - newn = malloc_new_ks (ns->pool, "FFENAME name", sizeof (*n)); - newn->next = n; - newn->previous = n->previous; - n->previous = newn; - newn->previous->next = newn; - newn->t = ffelex_token_use (t); - newn->u.s = NULL; - - return newn; -} - -/* ffename_kill -- Kill name from name space - - ffenameSpace ns; - ffename s; - ffename_kill(ns,s); - - Removes the name from the name space. */ - -void -ffename_kill (ffenameSpace ns, ffename n) -{ - assert (ns != NULL); - assert (n != NULL); - - ffelex_token_kill (n->t); - n->next->previous = n->previous; - n->previous->next = n->next; - malloc_kill_ks (ns->pool, n, sizeof (*n)); -} - -/* ffename_lookup -- Look up name in name space - - ffenameSpace ns; - ffelexToken t; - ffename s; - n = ffename_lookup(ns,t); - - Searches for and returns the matching ffename object, or returns NULL. */ - -ffename -ffename_lookup (ffenameSpace ns, ffelexToken t) -{ - ffename n; - bool found; - - assert (ns != NULL); - assert ((t != NULL) && ((ffelex_token_type (t) == FFELEX_typeNAME) - || (ffelex_token_type (t) == FFELEX_typeNAMES))); - - n = ffename_lookup_ (ns, t, &found); - - return found ? n : NULL; -} - -/* ffename_space_drive_global -- Call given fn for each global in name space - - ffenameSpace ns; - ffeglobal (*fn)(); - ffename_space_drive_global(ns,fn); */ - -void -ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal)) -{ - ffename n; - - if (ns == NULL) - return; - - for (n = ns->first; n != (ffename) &ns->first; n = n->next) - { - if (n->u.g != NULL) - n->u.g = (*fn) (n->u.g); - } -} - -/* ffename_space_drive_symbol -- Call given fn for each symbol in name space - - ffenameSpace ns; - ffesymbol (*fn)(); - ffename_space_drive_symbol(ns,fn); */ - -void -ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol)) -{ - ffename n; - - if (ns == NULL) - return; - - for (n = ns->first; n != (ffename) &ns->first; n = n->next) - { - if (n->u.s != NULL) - n->u.s = (*fn) (n->u.s); - } -} - -/* ffename_space_kill -- Kill name space - - ffenameSpace ns; - ffename_space_kill(ns); - - Removes the names from the name space; kills the name space. */ - -void -ffename_space_kill (ffenameSpace ns) -{ - assert (ns != NULL); - - while (ns->first != (ffename) &ns->first) - ffename_kill (ns, ns->first); - - malloc_kill_ks (ns->pool, ns, sizeof (*ns)); -} - -/* ffename_space_new -- Create name space - - ffenameSpace ns; - ns = ffename_space_new(malloc_pool_image()); - - Create new name space. */ - -ffenameSpace -ffename_space_new (mallocPool pool) -{ - ffenameSpace ns; - - ns = malloc_new_ks (pool, "FFENAME space", sizeof (*ns)); - ns->first = (ffename) &ns->first; - ns->last = (ffename) &ns->first; - ns->pool = pool; - - return ns; -} diff --git a/contrib/gcc/f/name.h b/contrib/gcc/f/name.h deleted file mode 100644 index 4b18805..0000000 --- a/contrib/gcc/f/name.h +++ /dev/null @@ -1,109 +0,0 @@ -/* name.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - name.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_NAME_H -#define GCC_F_NAME_H - -/* Simple definitions and enumerations. */ - - -/* Typedefs. */ - -typedef struct _ffename_ *ffename; -typedef struct _ffename_space_ *ffenameSpace; - -/* Include files needed by this one. */ - -#include "global.h" -#include "lex.h" -#include "malloc.h" -#include "symbol.h" - -/* Structure definitions. */ - -struct _ffename_ - { - ffename next; - ffename previous; - ffelexToken t; - union - { - ffesymbol s; - ffeglobal g; - } - u; - }; - -struct _ffename_space_ - { - ffename first; - ffename last; - mallocPool pool; - }; - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -ffename ffename_find (ffenameSpace ns, ffelexToken t); -void ffename_kill (ffenameSpace ns, ffename n); -ffename ffename_lookup (ffenameSpace ns, ffelexToken t); -void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal)); -void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol)); -void ffename_space_kill (ffenameSpace ns); -ffenameSpace ffename_space_new (mallocPool pool); - -/* Define macros. */ - -#define ffename_first_token(n) ((n)->t) -#define ffename_global(n) ((n)->u.g) -#define ffename_init_0() -#define ffename_init_1() -#define ffename_init_2() -#define ffename_init_3() -#define ffename_init_4() -#define ffename_set_global(n,glob) ((n)->u.g = (glob)) -#define ffename_set_symbol(n,sym) ((n)->u.s = (sym)) -#define ffename_symbol(n) ((n)->u.s) -#define ffename_terminate_0() -#define ffename_terminate_1() -#define ffename_terminate_2() -#define ffename_terminate_3() -#define ffename_terminate_4() -#define ffename_text(n) ffelex_token_text((n)->t) -#define ffename_token(n) ((n)->t) -#define ffename_where_filename(n) ffelex_token_where_filename((n)->t) -#define ffename_where_filelinenum(n) ffelex_token_where_filelinenum((n)->t) -#define ffename_where_line(n) ffelex_token_where_line((n)->t) -#define ffename_where_column(n) ffelex_token_where_column((n)->t) - -/* End of #include file. */ - -#endif /* ! GCC_F_NAME_H */ diff --git a/contrib/gcc/f/news.texi b/contrib/gcc/f/news.texi deleted file mode 100644 index fcba273..0000000 --- a/contrib/gcc/f/news.texi +++ /dev/null @@ -1,3177 +0,0 @@ -@c Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 -@c 2003, 2004 -@c Free Software Foundation, Inc. -@c This is part of the G77 manual. -@c For copying conditions, see the file g77.texi. - -@c The text of this file appears in the file NEWS -@c in the G77 distribution, as well as in the G77 manual. - -@c Keep this the same as the dates above, since it's used -@c in the standalone derivations of this file (e.g. NEWS). -@set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - -@set last-update-news 2004-12-29 - -@ifset DOC-NEWS -@include root.texi -@c The immediately following lines apply to the NEWS file -@c which is derived from this file. -@emph{Note:} This file is automatically generated from the files -@file{news0.texi} and @file{news.texi}. -@file{NEWS} is @emph{not} a source file, -although it is normally included within source distributions. - -This file lists news about the @value{which-g77} version -(and some other versions) of the GNU Fortran compiler. -Copyright (C) @value{copyrights-news} Free Software Foundation, Inc. -You may copy, distribute, and modify it freely as long as you preserve -this copyright notice and permission notice. - -@node Top,,, (dir) -@chapter News About GNU Fortran -@end ifset - -@ifset DOC-G77 -@ifset USERVISONLY -@node Changes -@chapter User-visible Changes -@cindex versions, recent -@cindex recent versions -@cindex changes, user-visible -@cindex user-visible changes - -This chapter describes changes to @command{g77} that are visible -to the programmers who actually write and maintain Fortran -code they compile with @command{g77}. -Information on changes to installation procedures, -changes to the documentation, and bug fixes is -not provided here, unless it is likely to affect how -users use @command{g77}. -@xref{News,,News About GNU Fortran}, for information on -such changes to @command{g77}. -@end ifset - -@ifclear USERVISONLY -@node News -@chapter News About GNU Fortran -@cindex versions, recent -@cindex recent versions -@end ifclear -@end ifset - -@ifclear USERVISONLY - -@emph{@code{GCC} 3.4.x is the last edition of @code{GCC} to contain @command{g77} - from @code{GCC} 4.0 onwards, use @command{gfortran}} - -Changes made to recent versions of GNU Fortran are listed -below, with the most recent version first. - -The changes are generally listed in order: - -@enumerate -@item -Code-generation and run-time-library bug-fixes - -@item -Compiler and run-time-library crashes involving valid code -that have been fixed - -@item -New features - -@item -Fixes and enhancements to existing features - -@item -New diagnostics - -@item -Internal improvements - -@item -Miscellany -@end enumerate - -This order is not strict---for example, some items -involve a combination of these elements. -@end ifclear - -Note that two variants of @command{g77} are tracked below. -The @code{egcs} variant is described vis-a-vis -previous versions of @code{egcs} and/or -an official FSF version, as appropriate. -Note that all such variants are obsolete @emph{as of July 1999} - -the information is retained here only for its historical value. - -Therefore, @code{egcs} versions sometimes have multiple listings -to help clarify how they differ from other versions, -though this can make getting a complete picture -of what a particular @code{egcs} version contains -somewhat more difficult. - -@ifset DOC-G77 -For information on bugs in the @value{which-g77} version of @command{g77}, -see @ref{Known Bugs,,Known Bugs In GNU Fortran}. -@end ifset - -@ifset DOC-BUGS -For information on bugs in the @value{which-g77} version of @command{g77}, -see @file{@value{path-g77}/BUGS}. -@end ifset - -@ifset DEVELOPMENT -@emph{Warning:} The information below is still under development, -and might not accurately reflect the @command{g77} code base -of which it is a part. -Efforts are made to keep it somewhat up-to-date, -but they are particularly concentrated -on any version of this information -that is distributed as part of a @emph{released} @command{g77}. - -In particular, while this information is intended to apply to -the @value{which-g77} version of @command{g77}, -only an official @emph{release} of that version -is expected to contain documentation that is -most consistent with the @command{g77} product in that version. - -Nevertheless, information on @emph{previous} releases of @command{g77}, below, -is likely to be more up-to-date and accurate -than the equivalent information that accompanied -those releases, -assuming the last-updated date of the information below -is later than the dates of those releases. - -That's due to attempts to keep this development version -of news about previous @command{g77} versions up-to-date. -@end ifset - -The following information was last updated on @value{last-update-news}: - -@heading In @code{GCC} 3.4 versus @code{GCC} 3.3: -@itemize @bullet -@item -Problem Reports fixed (in chronological order of submission): -@table @code -@item 8485 -g77 doesn't accept INTEGER*8 constant in PARAMETER multiplication. -@item 11918 -(libf2c) isatty does not call f_init. -@item 12317 -Incorrect documentation for Fortran debugging features. -@end table -@item -Roger Sayle (@email{roger@@eyesopen.com}) fixed the remaining -problems with regard to the support of INTEGER*8, INTEGER*2 and INTEGER*1 -as a fallout of fixing PR 8485. -@end itemize - -@heading In @code{GCC} 3.3 versus @code{GCC} 3.2: -@itemize @bullet -@item -Problem Reports fixed (in chronological order of submission): -@table @code -@item 1832 --list directed i/o overflow hangs, -fbounds-check doesn't detect -@item 3924 -g77 generates code which is rejected by GAS if COFF debugging info is -requested -@item 6286 -Broken links on web pages -@item 6367 -(libf2c) multiple repeat counts confuse namelist read into array -@item 6491 -Logical operations error on logicals when using -fugly-logint -@item 6742 -Generation of C++ Prototype for FORTRAN and extern "C" -@item 7113 -Failure of g77.f-torture/execute/f90-intrinsic-bit.f -Os on irix6.5 -@item 7236 -(libf2c) OPEN(...,RECL=nnn,...) without ACCESS='DIRECT' should assume a direct -access file -@item 7278 -g77 "bug"; the executable misbehave (use of options -O2 -fno-automatic -gave wrong results) -@item 7384 -(libf2c) DATE_AND_TIME milliseconds field inactive on Windows -@item 7388 -Incorrect output with 0-based array of characters -@item 8587 -Double complex zero ** double precision number -> NaN instead of zero -@item 9038 --ffixed-line-length-none -x f77-cpp-input gives: Warning: unknown register name line-length-none -@item 9263 -ICE caused by invalid PARAMETER in implied DO loop -@item 10197 -Direct access files not unformatted by default -@item 10726 -Documentation for function IDATE Intrinsic (UNIX) is wrong [fixed in 3.3.1]. -@end table -@item -Richard Henderson (@email{rth@@redhat.com}) analyzed and improved the handling -of (no-)aliasing information for dummy arguments and improved the optimization -of induction variables in unrolled loops. -@end itemize - -@heading In @code{GCC} 3.2 versus @code{GCC} 3.1: -@itemize @bullet -@item -Problem Reports fixed (in chronological order of submission): -@table @code -@item 7681 -ICE in compensate_edge, at reg-stack.c:2591 -@item 8308 -gcc-3.x does not compile files with suffix .r (RATFOR) [Fixed in 3.2.1] -@item 9258 -[3.2/3.3/3.4 regression] ICE in compensate_edge, at reg-stack.c:2589 -@end table -@end itemize - -@heading In @code{GCC} 3.1 (formerly known as g77-0.5.27) versus @code{GCC} 3.0: -@itemize @bullet -@item -Problem Reports fixed (in chronological order of submission): -@table @code -@item 947 -Data statement initialization with subscript of kind INTEGER*2 -@item 3743 -Reference to intrinsic `ISHFT' invalid -@item 3807 -Function BESJN(integer,double) problems -@item 3957 -g77 -pipe -xf77-cpp-input sends output to stdout -@item 4279 -g77 -h" gives bogus output -@item 4730 -ICE on valid input using CALL EXIT(%VAL(...)) -@item 4752 -g77 -v -c -xf77-version /dev/null -xnone causes ice -@item 4885 -BACKSPACE example that doesn't work as of gcc/g77-3.0.x -@item 5122 -g77 rejects accepted use of INTEGER*2 as type of DATA statement loop index -@item 5397 -ICE on compiling source with 540 000 000 REAL array -@item 5473 -ICE on BESJN(integer*8,real) -@item 5837 -bug in loop unrolling -@item 6106 -sparc-sun-solaris2.7 gcc-3.1 extra g77 testsuite failures w/-m64 -@item 6138 -Incorrect acces of integer*1 variables on PA -@item 6304 -Failure of LAPACK test dtest on irix6.5 with -mabi=64 -O2 -@end table - -@item -@command{g77} now has its man page generated from the texinfo documentation, -to guarantee that it remains up to date. - -@item -@command{g77} used to reject the following program on 32-bit targets: -@smallexample -PROGRAM PROG -DIMENSION A(140 000 000) -END -@end smallexample -with the message: -@smallexample -prog.f: In program `prog': -prog.f:2: - DIMENSION A(140 000 000) - ^ -Array `a' at (^) is too large to handle -@end smallexample -because 140 000 000 REALs is larger than the largest bit-extent that can be -expressed in 32 bits. However, bit-sizes never play a role after offsets -have been converted to byte addresses. Therefore this check has been removed, -and the limit is now 2 Gbyte of memory (around 530 000 000 REALs). -Note: On GNU/Linux systems one has to compile and link programs that occupy -more than 1 Gbyte statically, i.e.@: @code{g77 -static ...}. - -@item -Based on work done by Juergen Pfeifer (@email{juergen.pfeifer@@gmx.net}) -libf2c is now a shared library. One can still link in all objects with -the program by specifying the @option{-static} option. - -@item -Robert Anderson (@email{rwa@@alumni.princeton.edu}) thought up a two -line change that enables g77 to compile such code as: -@smallexample -SUBROUTINE SUB(A, N) -DIMENSION N(2) -DIMENSION A(N(1),N(2)) -A(1,1) = 1. -END -@end smallexample -Note the use of array elements in the bounds of the adjustable array A. - -@item -George Helffrich (@email{george@@geo.titech.ac.jp}) implemented a change -in substring index checking (when specifying @option{-fbounds-check}) -that permits the use of zero length substrings of the form -@code{string(1:0)}. - -@item -Based on code developed by Pedro Vazquez (@email{vazquez@@penelope.iqm.unicamp.br}), -the @code{libf2c} library is now able to read and write files larger than -2 Gbyte on 32-bit target machines, if the operating system supports this. -@end itemize - -@heading In 0.5.26, @code{GCC} 3.0 versus @code{GCC} 2.95: -@itemize @bullet -@item -When a REWIND was issued after a WRITE statement on an unformatted -file, the implicit truncation was performed by copying the truncated -file to /tmp and copying the result back. This has been fixed by using -the @code{ftruncate} OS function. Thanks go to the GAMESS developers -for bringing this to our attention. - -@item -Using options @option{-g}, @option{-ggdb} or @option{-gdwarf[-2]} (where -appropriate for your target) now also enables debugging information -for COMMON BLOCK and EQUIVALENCE items to be emitted. -Thanks go to Andrew Vaught (@email{andy@@xena.eas.asu.edu}) and -George Helffrich (@email{george@@geology.bristol.ac.uk}) for -fixing this longstanding problem. - -@item -It is not necessary anymore to use the option @option{-femulate-complex} -to compile Fortran code using COMPLEX arithmetic, even on 64-bit machines -(like the Alpha). This will improve code generation. - -@item -INTRINSIC arithmetic functions are now treated as routines that do not -depend on anything but their argument(s). This enables further instruction -scheduling, because it is known that they cannot read or modify arbitrary -locations. - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 2000-12-05. - -This fixes a bug where a namelist containing initialization of LOGICAL -items and a variable starting with T or F would be read incorrectly. - -@item -The @code{TtyNam} intrinsics now set @var{Name} to all spaces (at run time) -if the system has no @code{ttyname} implementation available. - -@item -Upgrade to @code{libf2c} as of 1999-06-28. - -This fixes a bug whereby -input to a @code{NAMELIST} read involving a repeat count, -such as @samp{K(5)=10*3}, -was not properly handled by @code{libf2c}. -The first item was written to @samp{K(5)}, -but the remaining nine were written elsewhere (still within the array), -not necessarily starting at @samp{K(6)}. -@end ifclear -@end itemize - -@heading In 0.5.25, @code{GCC} 2.95 (@code{EGCS} 1.2) versus @code{EGCS} 1.1.2: -@itemize @bullet -@ifclear USERVISONLY -@item -@command{g77} no longer generates bad code for assignments, -or other conversions, -of @code{REAL} or @code{COMPLEX} constant expressions -to type @code{INTEGER(KIND=2)} -(often referred to as @code{INTEGER*8}). - -For example, @samp{INTEGER*8 J; J = 4E10} now works as documented. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer truncates @code{INTEGER(KIND=2)} -(usually @code{INTEGER*8}) -subscript expressions when evaluating array references -on systems with pointers widers than @code{INTEGER(KIND=1)} -(such as Alphas). -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer generates bad code -for an assignment to a @code{COMPLEX} variable or array -that partially overlaps one or more of the sources -of the same assignment -(a very rare construction). -It now assigns through a temporary, -in cases where such partial overlap is deemed possible. -@end ifclear - -@ifclear USERVISONLY -@item -@code{libg2c} (@code{libf2c}) no longer loses track -of the file being worked on -during a @code{BACKSPACE} operation. -@end ifclear - -@ifclear USERVISONLY -@item -@code{libg2c} (@code{libf2c}) fixes a bug whereby -input to a @code{NAMELIST} read involving a repeat count, -such as @samp{K(5)=10*3}, -was not properly handled by @code{libf2c}. -The first item was written to @samp{K(5)}, -but the remaining nine were written elsewhere (still within the array), -not necessarily starting at @samp{K(6)}. -@end ifclear - -@ifclear USERVISONLY -@item -@c Tim Prince reported this, regarding the TEST_FPU benchmark. -Automatic arrays now seem to be working on HP-UX systems. -@end ifclear - -@ifclear USERVISONLY -@item -The @code{Date} intrinsic now returns the correct result -on big-endian systems. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} so it no longer crashes when compiling -I/O statements using keywords that define @code{INTEGER} values, -such as @samp{IOSTAT=@var{j}}, -where @var{j} is other than default @code{INTEGER} -(such as @code{INTEGER*2}). -Instead, it issues a diagnostic. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} so it properly handles @samp{DATA A/@var{rpt}*@var{val}/}, -where @var{rpt} is not default @code{INTEGER}, such as @code{INTEGER*2}, -instead of producing a spurious diagnostic. -Also fix @samp{DATA (A(I),I=1,N)}, -where @samp{N} is not default @code{INTEGER} -to work instead of crashing @command{g77}. -@end ifclear - -@ifclear USERVISONLY -@item -The @option{-ax} option is now obeyed when compiling Fortran programs. -(It is passed to the @file{f771} driver.) -@end ifclear - -@item -The new @option{-fbounds-check} option -causes @command{g77} to compile run-time bounds checks -of array subscripts, as well as of substring start and end points. - -@item -@code{libg2c} now supports building as multilibbed library, -which provides better support for systems -that require options such as @option{-mieee} -to work properly. - -@item -Source file names with the suffixes @samp{.FOR} and @samp{.FPP} -now are recognized by @command{g77} -as if they ended in @samp{.for} and @samp{.fpp}, respectively. - -@item -The order of arguments to the @emph{subroutine} forms of the -@code{CTime}, @code{DTime}, @code{ETime}, and @code{TtyNam} -intrinsics has been swapped. -The argument serving as the returned value -for the corresponding function forms -now is the @emph{second} argument, -making these consistent with the other subroutine forms -of @code{libU77} intrinsics. - -@item -@command{g77} now warns about a reference to an intrinsic -that has an interface that is not Year 2000 (Y2K) compliant. -Also, @code{libg2c} has been changed to increase the likelihood -of catching references to the implementations of these intrinsics -using the @code{EXTERNAL} mechanism -(which would avoid the new warnings). - -@ifset DOC-G77 -@xref{Year 2000 (Y2K) Problems}, for more information. -@end ifset - -@ifclear USERVISONLY -@item -@command{g77} now warns about a reference to a function -when the corresponding @emph{subsequent} function program unit -disagrees with the reference concerning the type of the function. -@end ifclear - -@item -@option{-fno-emulate-complex} is now the default option. -This should result in improved performance -of code that uses the @code{COMPLEX} data type. - -@cindex alignment -@cindex double-precision performance -@cindex -malign-double -@item -The @option{-malign-double} option -now reliably aligns @emph{all} double-precision variables and arrays -on Intel x86 targets. - -@ifclear USERVISONLY -@item -Even without the @option{-malign-double} option, -@command{g77} reliably aligns local double-precision variables -that are not in @code{EQUIVALENCE} areas -and not @code{SAVE}'d. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} now open-codes (``inlines'') division of @code{COMPLEX} operands -instead of generating a run-time call to -the @code{libf2c} routines @code{c_div} or @code{z_div}, -unless the @option{-Os} option is specified. -@end ifclear - -@item -@command{g77} no longer generates code to maintain @code{errno}, -a C-language concept, -when performing operations such as the @code{SqRt} intrinsic. - -@ifclear USERVISONLY -@item -@command{g77} developers can temporarily use -the @option{-fflatten-arrays} option -to compare how the compiler handles code generation -using C-like constructs as compared to the -Fortran-like method constructs normally used. -@end ifclear - -@ifclear USERVISONLY -@item -A substantial portion of the @command{g77} front end's code-generation component -was rewritten. -It now generates code using facilities more robustly supported -by the @command{gcc} back end. -One effect of this rewrite is that some codes no longer produce -a spurious ``label @var{lab} used before containing binding contour'' -message. -@end ifclear - -@item -Support for the @option{-fugly} option has been removed. - -@ifclear USERVISONLY -@item -Improve documentation and indexing, -including information on Year 2000 (Y2K) compliance, -and providing more information on internals of the front end. -@end ifclear - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 1999-05-10. -@end ifclear -@end itemize - -@heading In 0.5.24 versus 0.5.23: - -There is no @command{g77} version 0.5.24 at this time, -or planned. -0.5.24 is the version number designated for bug fixes and, -perhaps, some new features added, -to 0.5.23. -Version 0.5.23 requires @command{gcc} 2.8.1, -as 0.5.24 was planned to require. - -Due to @code{EGCS} becoming @code{GCC} -(which is now an acronym for ``GNU Compiler Collection''), -and @code{EGCS} 1.2 becoming officially designated @code{GCC} 2.95, -there seems to be no need for an actual 0.5.24 release. - -To reduce the confusion already resulting from use of 0.5.24 -to designate @command{g77} versions within @code{EGCS} versions 1.0 and 1.1, -as well as in versions of @command{g77} documentation and notices -during that period, -``mainline'' @command{g77} version numbering resumes -at 0.5.25 with @code{GCC} 2.95 (@code{EGCS} 1.2), -skipping over 0.5.24 as a placeholder version number. - -To repeat, there is no @command{g77} 0.5.24, but there is now a 0.5.25. -Please remain calm and return to your keypunch units. - -@c 1999-03-15: EGCS 1.1.2 released. -@heading In @code{EGCS} 1.1.2 versus @code{EGCS} 1.1.1: -@ifclear USERVISONLY -@itemize @bullet -@item -Fix the @code{IDate} intrinsic (VXT) (in @code{libg2c}) -so the returned year is in the documented, non-Y2K-compliant range -of 0-99, -instead of being returned as 100 in the year 2000. - -@ifset DOC-G77 -@xref{IDate Intrinsic (VXT)}, -for more information. -@end ifset - -@item -Fix the @code{Date_and_Time} intrinsic (in @code{libg2c}) -to return the milliseconds value properly -in @var{Values}(8). - -@item -Fix the @code{LStat} intrinsic (in @code{libg2c}) -to return device-ID information properly -in @var{SArray}(7). - -@item -Improve documentation. -@end itemize -@end ifclear - -@c 1998-12-04: EGCS 1.1.1 released. -@heading In @code{EGCS} 1.1.1 versus @code{EGCS} 1.1: -@ifclear USERVISONLY -@itemize @bullet -@item -Fix @code{libg2c} so it performs an implicit @code{ENDFILE} operation -(as appropriate) -whenever a @code{REWIND} is done. - -(This bug was introduced in 0.5.23 and @code{egcs} 1.1 in -@command{g77}'s version of @code{libf2c}.) - -@item -Fix @code{libg2c} so it no longer crashes with a spurious diagnostic -upon doing any I/O following a direct formatted write. - -(This bug was introduced in 0.5.23 and @code{egcs} 1.1 in -@command{g77}'s version of @code{libf2c}.) - -@item -Fix @command{g77} so it no longer crashes compiling references -to the @code{Rand} intrinsic on some systems. - -@item -Fix @command{g77} portion of installation process so it works -better on some systems -(those with shells requiring @samp{else true} clauses -on @code{if} constructs -for the completion code to be set properly). -@end itemize -@end ifclear - -@c 1998-09-03: EGCS 1.1 released. -@heading In @code{EGCS} 1.1 versus @code{EGCS} 1.0.3: -@itemize @bullet -@ifclear USERVISONLY -@item -Fix bugs in the @code{libU77} intrinsic @code{HostNm} -that wrote one byte beyond the end of its @code{CHARACTER} -argument, -and in the @code{libU77} intrinsics -@code{GMTime} and @code{LTime} -that overwrote their arguments. -@end ifclear - -@ifclear USERVISONLY -@item -Assumed arrays with negative bounds -(such as @samp{REAL A(-1:*)}) -no longer elicit spurious diagnostics from @command{g77}, -even on systems with pointers having -different sizes than integers. - -This bug is not known to have existed in any -recent version of @command{gcc}. -It was introduced in an early release of @code{egcs}. -@end ifclear - -@ifclear USERVISONLY -@item -Valid combinations of @code{EXTERNAL}, -passing that external as a dummy argument -without explicitly giving it a type, -and, in a subsequent program unit, -referencing that external as -an external function with a different type -no longer crash @command{g77}. -@end ifclear - -@ifclear USERVISONLY -@item -@code{CASE DEFAULT} no longer crashes @command{g77}. -@end ifclear - -@ifclear USERVISONLY -@item -The @option{-Wunused} option no longer issues a spurious -warning about the ``master'' procedure generated by -@command{g77} for procedures containing @code{ENTRY} statements. -@end ifclear - -@item -Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a -compile-time constant @code{INTEGER} expression. - -@item -Fix @command{g77} @option{-g} option so procedures that -use @code{ENTRY} can be stepped through, line by line, -in @command{gdb}. - -@item -Allow any @code{REAL} argument to intrinsics -@code{Second} and @code{CPU_Time}. - -@item -Use @code{tempnam}, if available, to open scratch files -(as in @samp{OPEN(STATUS='SCRATCH')}) -so that the @code{TMPDIR} environment variable, -if present, is used. - -@item -@command{g77}'s version of @code{libf2c} separates out -the setting of global state -(such as command-line arguments and signal handling) -from @file{main.o} into distinct, new library -archive members. - -This should make it easier to write portable applications -that have their own (non-Fortran) @code{main()} routine -properly set up the @code{libf2c} environment, even -when @code{libf2c} (now @code{libg2c}) is a shared library. - -@ifclear USERVISONLY -@item -@command{g77} no longer installs the @file{f77} command -and @file{f77.1} man page -in the @file{/usr} or @file{/usr/local} hierarchy, -even if the @file{f77-install-ok} file exists -in the source or build directory. -See the installation documentation for more information. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer installs the @file{libf2c.a} library -and @file{f2c.h} include file -in the @file{/usr} or @file{/usr/local} hierarchy, -even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist -in the source or build directory. -See the installation documentation for more information. -@end ifclear - -@ifclear USERVISONLY -@item -The @file{libf2c.a} library produced by @command{g77} has been -renamed to @file{libg2c.a}. -It is installed only in the @command{gcc} ``private'' -directory hierarchy, @file{gcc-lib}. -This allows system administrators and users to choose which -version of the @code{libf2c} library from @code{netlib} they -wish to use on a case-by-case basis. -See the installation documentation for more information. -@end ifclear - -@ifclear USERVISONLY -@item -The @file{f2c.h} include (header) file produced by @command{g77} -has been renamed to @file{g2c.h}. -It is installed only in the @command{gcc} ``private'' -directory hierarchy, @file{gcc-lib}. -This allows system administrators and users to choose which -version of the include file from @code{netlib} they -wish to use on a case-by-case basis. -See the installation documentation for more information. -@end ifclear - -@item -The @command{g77} command now expects the run-time library -to be named @code{libg2c.a} instead of @code{libf2c.a}, -to ensure that a version other than the one built and -installed as part of the same @command{g77} version is picked up. - -@ifclear USERVISONLY -@item -During the configuration and build process, -@command{g77} creates subdirectories it needs only as it -needs them. -Other cleaning up of the configuration and build process -has been performed as well. -@end ifclear - -@ifclear USERVISONLY -@item -@code{install-info} now used to update the directory of -Info documentation to contain an entry for @command{g77} -(during installation). -@end ifclear - -@item -Some diagnostics have been changed from warnings to errors, -to prevent inadvertent use of the resulting, probably buggy, -programs. -These mostly include diagnostics about use of unsupported features -in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and -@code{WRITE} statements, -and about truncations of various sorts of constants. - -@ifclear USERVISONLY -@item -Improve compilation of @code{FORMAT} expressions so that -a null byte is appended to the last operand if it -is a constant. -This provides a cleaner run-time diagnostic as provided -by @code{libf2c} for statements like @samp{PRINT '(I1', 42}. -@end ifclear - -@ifclear USERVISONLY -@item -Improve documentation and indexing. -@end ifclear - -@ifclear USERVISONLY -@item -The upgrade to @code{libf2c} as of 1998-06-18 -should fix a variety of problems, including -those involving some uses of the @code{T} format -specifier, and perhaps some build (porting) problems -as well. -@end ifclear -@end itemize - -@c 1998-09-03: EGCS 1.1 released. -@heading In @code{EGCS} 1.1 versus @command{g77} 0.5.23: -@itemize @bullet -@ifclear USERVISONLY -@cindex DNRM2 -@cindex stack, 387 coprocessor -@cindex Intel x86 -@cindex -O2 -@item -Fix a code-generation bug that afflicted -Intel x86 targets when @option{-O2} was specified -compiling, for example, an old version of -the @code{DNRM2} routine. - -The x87 coprocessor stack was being -mismanaged in cases involving assigned @code{GOTO} -and @code{ASSIGN}. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer produces incorrect code -and initial values -for @code{EQUIVALENCE} and @code{COMMON} -aggregates that, due to ``unnatural'' ordering of members -vis-a-vis their types, require initial padding. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} crash compiling code -containing the construct @samp{CMPLX(0.)} or similar. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer crashes when compiling code -containing specification statements such as -@samp{INTEGER(KIND=7) PTR}. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer crashes when compiling code -such as @samp{J = SIGNAL(1, 2)}. -@end ifclear - -@item -@command{g77} now treats @samp{%LOC(@var{expr})} and -@samp{LOC(@var{expr})} as ``ordinary'' expressions -when they are used as arguments in procedure calls. -This change applies only to global (filewide) analysis, -making it consistent with -how @command{g77} actually generates code -for these cases. - -Previously, @command{g77} treated these expressions -as denoting special ``pointer'' arguments -for the purposes of filewide analysis. - -@ifclear USERVISONLY -@item -Fix @command{g77} crash -(or apparently infinite run-time) -when compiling certain complicated expressions -involving @code{COMPLEX} arithmetic -(especially multiplication). -@end ifclear - -@cindex alignment -@cindex double-precision performance -@cindex -malign-double -@item -Align static double-precision variables and arrays -on Intel x86 targets -regardless of whether @option{-malign-double} is specified. - -Generally, this affects only local variables and arrays -having the @code{SAVE} attribute -or given initial values via @code{DATA}. - -@item -The @command{g77} driver now ensures that @option{-lg2c} -is specified in the link phase prior to any -occurrence of @option{-lm}. -This prevents accidentally linking to a routine -in the SunOS4 @option{-lm} library -when the generated code wants to link to the one -in @code{libf2c} (@code{libg2c}). - -@item -@command{g77} emits more debugging information when -@option{-g} is used. - -This new information allows, for example, -@kbd{which __g77_length_a} to be used in @command{gdb} -to determine the type of the phantom length argument -supplied with @code{CHARACTER} variables. - -This information pertains to internally-generated -type, variable, and other information, -not to the longstanding deficiencies vis-a-vis -@code{COMMON} and @code{EQUIVALENCE}. - -@item -The F90 @code{Date_and_Time} intrinsic now is -supported. - -@item -The F90 @code{System_Clock} intrinsic allows -the optional arguments (except for the @code{Count} -argument) to be omitted. - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 1998-06-18. -@end ifclear - -@ifclear USERVISONLY -@item -Improve documentation and indexing. -@end ifclear -@end itemize - -@ifset DOC-NEWS -@heading In previous versions: - -Information on previous versions is not provided -in this @file{@value{path-g77}/NEWS} file, -to keep it short. -See @file{@value{path-g77}/news.texi}, -or any of its other derivations -(Info, HTML, dvi forms) -for such information. -@end ifset - -@ifclear DOC-NEWS -@c 1998-05-20: 0.5.23 released. -@heading In 0.5.23 versus 0.5.22: -@itemize @bullet -@item -This release contains several regressions against -version 0.5.22 of @command{g77}, due to using the -``vanilla'' @command{gcc} back end instead of patching -it to fix a few bugs and improve performance in a -few cases. - -Features that have been dropped from this version -of @command{g77} due to their being implemented -via @command{g77}-specific patches to the @command{gcc} -back end in previous releases include: - -@itemize @minus -@item -Support for @code{__restrict__} keyword, -the options @option{-fargument-alias}, @option{-fargument-noalias}, -and @option{-fargument-noalias-global}, -and the corresponding alias-analysis code. - -(@code{egcs} has the alias-analysis -code, but not the @code{__restrict__} keyword. -@code{egcs} @command{g77} users benefit from the alias-analysis -code despite the lack of the @code{__restrict__} keyword, -which is a C-language construct.) - -@item -Support for the GNU compiler options -@option{-fmove-all-movables}, -@option{-freduce-all-givs}, -and @option{-frerun-loop-opt}. - -(@code{egcs} supports these options. -@command{g77} users of @code{egcs} benefit from them even if -they are not explicitly specified, -because the defaults are optimized for @command{g77} users.) - -@item -Support for the @option{-W} option warning about -integer division by zero. - -@item -The Intel x86-specific option @option{-malign-double} -applying to stack-allocated data -as well as statically-allocate data. -@end itemize - -@ifclear USERVISONLY -Note that the @file{gcc/f/gbe/} subdirectory has been removed -from this distribution as a result of @command{g77} no longer -including patches for the @command{gcc} back end. -@end ifclear - -@ifclear USERVISONLY -@item -Fix bugs in the @code{libU77} intrinsic @code{HostNm} -that wrote one byte beyond the end of its @code{CHARACTER} -argument, -and in the @code{libU77} intrinsics -@code{GMTime} and @code{LTime} -that overwrote their arguments. -@end ifclear - -@item -Support @command{gcc} version 2.8, -and remove support for prior versions of @command{gcc}. - -@cindex -@w{}-driver option -@cindex @command{g77} options, -@w{}-driver -@cindex options, -@w{}-driver -@item -Remove support for the @option{--driver} option, -as @command{g77} now does all the driving, -just like @command{gcc}. - -@ifclear USERVISONLY -@item -@code{CASE DEFAULT} no longer crashes @command{g77}. -@end ifclear - -@ifclear USERVISONLY -@item -Valid combinations of @code{EXTERNAL}, -passing that external as a dummy argument -without explicitly giving it a type, -and, in a subsequent program unit, -referencing that external as -an external function with a different type -no longer crash @command{g77}. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer installs the @file{f77} command -and @file{f77.1} man page -in the @file{/usr} or @file{/usr/local} hierarchy, -even if the @file{f77-install-ok} file exists -in the source or build directory. -See the installation documentation for more information. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} no longer installs the @file{libf2c.a} library -and @file{f2c.h} include file -in the @file{/usr} or @file{/usr/local} hierarchy, -even if the @file{f2c-install-ok} or @file{f2c-exists-ok} files exist -in the source or build directory. -See the installation documentation for more information. -@end ifclear - -@ifclear USERVISONLY -@item -The @file{libf2c.a} library produced by @command{g77} has been -renamed to @file{libg2c.a}. -It is installed only in the @command{gcc} ``private'' -directory hierarchy, @file{gcc-lib}. -This allows system administrators and users to choose which -version of the @code{libf2c} library from @code{netlib} they -wish to use on a case-by-case basis. -See the installation documentation for more information. -@end ifclear - -@ifclear USERVISONLY -@item -The @file{f2c.h} include (header) file produced by @command{g77} -has been renamed to @file{g2c.h}. -It is installed only in the @command{gcc} ``private'' -directory hierarchy, @file{gcc-lib}. -This allows system administrators and users to choose which -version of the include file from @code{netlib} they -wish to use on a case-by-case basis. -See the installation documentation for more information. -@end ifclear - -@item -The @command{g77} command now expects the run-time library -to be named @code{libg2c.a} instead of @code{libf2c.a}, -to ensure that a version other than the one built and -installed as part of the same @command{g77} version is picked up. - -@ifclear USERVISONLY -@item -The @option{-Wunused} option no longer issues a spurious -warning about the ``master'' procedure generated by -@command{g77} for procedures containing @code{ENTRY} statements. -@end ifclear - -@item -@command{g77}'s version of @code{libf2c} separates out -the setting of global state -(such as command-line arguments and signal handling) -from @file{main.o} into distinct, new library -archive members. - -This should make it easier to write portable applications -that have their own (non-Fortran) @code{main()} routine -properly set up the @code{libf2c} environment, even -when @code{libf2c} (now @code{libg2c}) is a shared library. - -@ifclear USERVISONLY -@item -During the configuration and build process, -@command{g77} creates subdirectories it needs only as it -needs them, thus avoiding unnecessary creation of, for example, -@file{stage1/f/runtime} when doing a non-bootstrap build. -Other cleaning up of the configuration and build process -has been performed as well. -@end ifclear - -@ifclear USERVISONLY -@item -@code{install-info} now used to update the directory of -Info documentation to contain an entry for @command{g77} -(during installation). -@end ifclear - -@item -Some diagnostics have been changed from warnings to errors, -to prevent inadvertent use of the resulting, probably buggy, -programs. -These mostly include diagnostics about use of unsupported features -in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and -@code{WRITE} statements, -and about truncations of various sorts of constants. - -@ifclear USERVISONLY -@item -Improve documentation and indexing. -@end ifclear - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 1998-04-20. - -This should fix a variety of problems, including -those involving some uses of the @code{T} format -specifier, and perhaps some build (porting) problems -as well. -@end ifclear -@end itemize - -@c 1998-03-16: 0.5.22 released. -@heading In 0.5.22 versus 0.5.21: -@itemize @bullet -@ifclear USERVISONLY -@item -Fix code generation for iterative @code{DO} loops that -have one or more references to the iteration variable, -or to aliases of it, in their control expressions. -For example, @samp{DO 10 J=2,J} now is compiled correctly. -@end ifclear - -@ifclear USERVISONLY -@cindex DNRM2 -@cindex stack, 387 coprocessor -@cindex Intel x86 -@cindex -O2 -@item -Fix a code-generation bug that afflicted -Intel x86 targets when @option{-O2} was specified -compiling, for example, an old version of -the @code{DNRM2} routine. - -The x87 coprocessor stack was being -mismanaged in cases involving assigned @code{GOTO} -and @code{ASSIGN}. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @code{DTime} intrinsic so as not to truncate -results to integer values (on some systems). -@end ifclear - -@item -Fix @code{Signal} intrinsic so it offers portable -support for 64-bit systems (such as Digital Alphas -running GNU/Linux). - -@ifclear USERVISONLY -@item -Fix run-time crash involving @code{NAMELIST} on 64-bit -machines such as Alphas. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} version of @code{libf2c} so it no longer -produces a spurious @samp{I/O recursion} diagnostic at run time -when an I/O operation (such as @samp{READ *,I}) is interrupted -in a manner that causes the program to be terminated -via the @code{f_exit} routine (such as via @kbd{C-c}). -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} crash triggered by @code{CASE} statement with -an omitted lower or upper bound. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} crash compiling references to @code{CPU_Time} -intrinsic. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} crash -(or apparently infinite run-time) -when compiling certain complicated expressions -involving @code{COMPLEX} arithmetic -(especially multiplication). -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} crash on statements such as -@samp{PRINT *, (REAL(Z(I)),I=1,2)}, where -@samp{Z} is @code{DOUBLE COMPLEX}. -@end ifclear - -@ifclear USERVISONLY -@item -Fix a @command{g++} crash. -@end ifclear - -@item -Support @samp{FORMAT(I<@var{expr}>)} when @var{expr} is a -compile-time constant @code{INTEGER} expression. - -@item -Fix @command{g77} @option{-g} option so procedures that -use @code{ENTRY} can be stepped through, line by line, -in @command{gdb}. - -@ifclear USERVISONLY -@item -Fix a profiling-related bug in @command{gcc} back end for -Intel x86 architecture. -@end ifclear - -@item -Allow any @code{REAL} argument to intrinsics -@code{Second} and @code{CPU_Time}. - -@item -Allow any numeric argument to intrinsics -@code{Int2} and @code{Int8}. - -@item -Use @code{tempnam}, if available, to open scratch files -(as in @samp{OPEN(STATUS='SCRATCH')}) -so that the @code{TMPDIR} environment variable, -if present, is used. - -@item -Rename the @command{gcc} keyword @code{restrict} to -@code{__restrict__}, to avoid rejecting valid, existing, -C programs. -Support for @code{restrict} is now more like support -for @code{complex}. - -@ifclear USERVISONLY -@item -Fix @option{-fpedantic} to not reject procedure invocations -such as @samp{I=J()} and @samp{CALL FOO()}. -@end ifclear - -@item -Fix @option{-fugly-comma} to affect invocations of -only external procedures. -Restore rejection of gratuitous trailing omitted -arguments to intrinsics, as in @samp{I=MAX(3,4,,)}. - -@item -Fix compiler so it accepts @option{-fgnu-intrinsics-*} and -@option{-fbadu77-intrinsics-*} options. - -@ifclear USERVISONLY -@item -Improve diagnostic messages from @code{libf2c} -so it is more likely that the printing of the -active format string is limited to the string, -with no trailing garbage being printed. - -(Unlike @command{f2c}, @command{g77} did not append -a null byte to its compiled form of every -format string specified via a @code{FORMAT} statement. -However, @command{f2c} would exhibit the problem -anyway for a statement like @samp{PRINT '(I)garbage', 1} -by printing @samp{(I)garbage} as the format string.) -@end ifclear - -@ifclear USERVISONLY -@item -Improve compilation of @code{FORMAT} expressions so that -a null byte is appended to the last operand if it -is a constant. -This provides a cleaner run-time diagnostic as provided -by @code{libf2c} for statements like @samp{PRINT '(I1', 42}. -@end ifclear - -@ifclear USERVISONLY -@item -Fix various crashes involving code with diagnosed errors. -@end ifclear - -@ifclear USERVISONLY -@item -Fix cross-compilation bug when configuring @code{libf2c}. -@end ifclear - -@ifclear USERVISONLY -@item -Improve diagnostics. -@end ifclear - -@ifclear USERVISONLY -@item -Improve documentation and indexing. -@end ifclear - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 1997-09-23. -This fixes a formatted-I/O bug that afflicted -64-bit systems with 32-bit integers -(such as Digital Alpha running GNU/Linux). -@end ifclear -@end itemize - -@c 1998-03-18: EGCS 1.0.2 released. -@heading In @code{EGCS} 1.0.2 versus @code{EGCS} 1.0.1: -@itemize @bullet -@ifclear USERVISONLY -@item -Fix @command{g77} crash triggered by @code{CASE} statement with -an omitted lower or upper bound. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} crash on statements such as -@samp{PRINT *, (REAL(Z(I)),I=1,2)}, where -@samp{Z} is @code{DOUBLE COMPLEX}. -@end ifclear - -@ifclear USERVISONLY -@cindex ELF support -@cindex support, ELF -@cindex -fPIC option -@cindex options, -fPIC -@item -Fix @option{-fPIC} (such as compiling for ELF targets) -on the Intel x86 architecture target -so invalid assembler code is no longer produced. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @option{-fpedantic} to not reject procedure invocations -such as @samp{I=J()} and @samp{CALL FOO()}. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @option{-fugly-comma} to affect invocations of -only external procedures. -Restore rejection of gratuitous trailing omitted -arguments to intrinsics, as in @samp{I=MAX(3,4,,)}. -@end ifclear - -@item -Fix compiler so it accepts @option{-fgnu-intrinsics-*} and -@option{-fbadu77-intrinsics-*} options. -@end itemize - -@c 1998-01-06: EGCS 1.0.1 released. -@heading In @code{EGCS} 1.0.1 versus @code{EGCS} 1.0: -@ifclear USERVISONLY -@itemize @bullet -@item -Fix run-time crash involving @code{NAMELIST} on 64-bit -machines such as Alphas. -@end itemize -@end ifclear - -@c 1997-12-03: EGCS 1.0 released. -@heading In @code{EGCS} 1.0 versus @command{g77} 0.5.21: -@itemize @bullet -@item -Version 1.0 of @code{egcs} -contains several regressions against -version 0.5.21 of @command{g77}, -due to using the -``vanilla'' @command{gcc} back end instead of patching -it to fix a few bugs and improve performance in a -few cases. - -Features that have been dropped from this version -of @command{g77} due to their being implemented -via @command{g77}-specific patches to the @command{gcc} -back end in previous releases include: - -@itemize @minus -@item -Support for the C-language @code{restrict} keyword. - -@item -Support for the @option{-W} option warning about -integer division by zero. - -@item -The Intel x86-specific option @option{-malign-double} -applying to stack-allocated data -as well as statically-allocate data. -@end itemize - -@ifclear USERVISONLY -Note that the @file{gcc/f/gbe/} subdirectory has been removed -from this distribution as a result of @command{g77} -being fully integrated with -the @code{egcs} variant of the @command{gcc} back end. -@end ifclear - -@ifclear USERVISONLY -@item -Fix code generation for iterative @code{DO} loops that -have one or more references to the iteration variable, -or to aliases of it, in their control expressions. -For example, @samp{DO 10 J=2,J} now is compiled correctly. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @code{DTime} intrinsic so as not to truncate -results to integer values (on some systems). -@end ifclear - -@ifclear USERVISONLY -@item -@c Toon Moene discovered these. -Some Fortran code, miscompiled -by @command{g77} built on @command{gcc} version 2.8.1 -on m68k-next-nextstep3 configurations -when using the @option{-O2} option, -is now compiled correctly. -It is believed that a C function known to miscompile -on that configuration -when using the @samp{-O2 -funroll-loops} options -also is now compiled correctly. -@end ifclear - -@ifclear USERVISONLY -@item -Remove support for non-@code{egcs} versions of @command{gcc}. -@end ifclear - -@cindex -@w{}-driver option -@cindex @command{g77} options, -@w{}-driver -@cindex options, -@w{}-driver -@item -Remove support for the @option{--driver} option, -as @command{g77} now does all the driving, -just like @command{gcc}. - -@item -Allow any numeric argument to intrinsics -@code{Int2} and @code{Int8}. - -@ifclear USERVISONLY -@item -Improve diagnostic messages from @code{libf2c} -so it is more likely that the printing of the -active format string is limited to the string, -with no trailing garbage being printed. - -(Unlike @command{f2c}, @command{g77} did not append -a null byte to its compiled form of every -format string specified via a @code{FORMAT} statement. -However, @code{f2c} would exhibit the problem -anyway for a statement like @samp{PRINT '(I)garbage', 1} -by printing @samp{(I)garbage} as the format string.) -@end ifclear - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 1997-09-23. -This fixes a formatted-I/O bug that afflicted -64-bit systems with 32-bit integers -(such as Digital Alpha running GNU/Linux). -@end ifclear -@end itemize - -@c 1997-09-09: 0.5.21 released. -@heading In 0.5.21: -@itemize @bullet -@ifclear USERVISONLY -@item -Fix a code-generation bug introduced by 0.5.20 -caused by loop unrolling (by specifying -@option{-funroll-loops} or similar). -This bug afflicted all code compiled by -version 2.7.2.2.f.2 of @command{gcc} (C, C++, -Fortran, and so on). -@end ifclear - -@ifclear USERVISONLY -@item -Fix a code-generation bug manifested when -combining local @code{EQUIVALENCE} with a -@code{DATA} statement that follows -the first executable statement (or is -treated as an executable-context statement -as a result of using the @option{-fpedantic} -option). -@end ifclear - -@ifclear USERVISONLY -@item -Fix a compiler crash that occurred when an -integer division by a constant zero is detected. -Instead, when the @option{-W} option is specified, -the @command{gcc} back end issues a warning about such a case. -This bug afflicted all code compiled by -version 2.7.2.2.f.2 of @command{gcc} (C, C++, -Fortran, and so on). -@end ifclear -@ifset USERVISONLY -@item -When the @option{-W} option is specified, @command{gcc}, @command{g77}, -and other GNU compilers that incorporate the @command{gcc} -back end as modified by @command{g77}, issue -a warning about integer division by constant zero. -@end ifset - -@ifclear USERVISONLY -@item -Fix a compiler crash that occurred in some cases -of procedure inlining. -(Such cases became more frequent in 0.5.20.) -@end ifclear - -@ifclear USERVISONLY -@item -Fix a compiler crash resulting from using @code{DATA} -or similar to initialize a @code{COMPLEX} variable or -array to zero. -@end ifclear - -@ifclear USERVISONLY -@item -Fix compiler crashes involving use of @code{AND}, @code{OR}, -or @code{XOR} intrinsics. -@end ifclear - -@ifclear USERVISONLY -@item -Fix compiler bug triggered when using a @code{COMMON} -or @code{EQUIVALENCE} variable -as the target of an @code{ASSIGN} -or assigned-@code{GOTO} statement. -@end ifclear - -@ifclear USERVISONLY -@item -Fix compiler crashes due to using the name of a some -non-standard intrinsics (such as @code{FTell} or -@code{FPutC}) as such and as the name of a procedure -or common block. -Such dual use of a name in a program is allowed by -the standard. -@end ifclear - -@c @command{g77}'s version of @code{libf2c} has been modified -@c so that the external names of library's procedures do not -@c conflict with names used for Fortran procedures compiled -@c by @command{g77}. -@c An additional layer of jacket procedures has been added -@c to @code{libf2c} to map the old names to the new names, -@c for automatic use by programs that interface to the -@c library procedures via the external-procedure mechanism. -@c -@c For example, the intrinsic @code{FPUTC} previously was -@c implemented by @command{g77} as a call to the @code{libf2c} -@c routine @code{fputc_}. -@c This would conflict with a Fortran procedure named @code{FPUTC} -@c (using default compiler options), and this conflict -@c would cause a crash under certain circumstances. -@c -@c Now, the intrinsic @code{FPUTC} calls @code{G77_fputc_0}, -@c which does not conflict with the @code{fputc_} external -@c that implements a Fortran procedure named @code{FPUTC}. -@c -@c Programs that refer to @code{FPUTC} as an external procedure -@c without supplying their own implementation will link to -@c the new @code{libf2c} routine @code{fputc_}, which is -@c simply a jacket routine that calls @code{G77_fputc_0}. - -@ifclear USERVISONLY -@item -Place automatic arrays on the stack, even if -@code{SAVE} or the @option{-fno-automatic} option -is in effect. -This avoids a compiler crash in some cases. -@end ifclear - -@ifclear USERVISONLY -@item -The @option{-malign-double} option now reliably aligns -@code{DOUBLE PRECISION} optimally on Pentium and -Pentium Pro architectures (586 and 686 in @command{gcc}). -@end ifclear - -@item -New option @option{-Wno-globals} disables warnings -about ``suspicious'' use of a name both as a global -name and as the implicit name of an intrinsic, and -warnings about disagreements over the number or natures of -arguments passed to global procedures, or the -natures of the procedures themselves. - -The default is to issue such warnings, which are -new as of this version of @command{g77}. - -@item -New option @option{-fno-globals} disables diagnostics -about potentially fatal disagreements -analysis problems, such as disagreements over the -number or natures of arguments passed to global -procedures, or the natures of those procedures themselves. - -The default is to issue such diagnostics and flag -the compilation as unsuccessful. -With this option, the diagnostics are issued as -warnings, or, if @option{-Wno-globals} is specified, -are not issued at all. - -This option also disables inlining of global procedures, -to avoid compiler crashes resulting from coding errors -that these diagnostics normally would identify. - -@ifclear USERVISONLY -@item -Diagnose cases where a reference to a procedure -disagrees with the type of that procedure, or -where disagreements about the number or nature -of arguments exist. -This avoids a compiler crash. -@end ifclear - -@ifclear USERVISONLY -@item -Fix parsing bug whereby @command{g77} rejected a -second initialization specification immediately -following the first's closing @samp{/} without -an intervening comma in a @code{DATA} statement, -and the second specification was an implied-DO list. -@end ifclear - -@ifclear USERVISONLY -@item -Improve performance of the @command{gcc} back end so -certain complicated expressions involving @code{COMPLEX} -arithmetic (especially multiplication) don't appear to -take forever to compile. -@end ifclear - -@ifclear USERVISONLY -@item -Fix a couple of profiling-related bugs in @command{gcc} -back end. -@end ifclear - -@ifclear USERVISONLY -@item -Integrate GNU Ada's (GNAT's) changes to the back end, -which consist almost entirely of bug fixes. -These fixes are circa version 3.10p of GNAT. -@end ifclear - -@ifclear USERVISONLY -@item -Include some other @command{gcc} fixes that seem useful in -@command{g77}'s version of @command{gcc}. -(See @file{gcc/ChangeLog} for details---compare it -to that file in the vanilla @code{gcc-2.7.2.3.tar.gz} -distribution.) -@end ifclear - -@item -Fix @code{libU77} routines that accept file and other names -to strip trailing blanks from them, for consistency -with other implementations. -Blanks may be forcibly appended to such names by -appending a single null character (@samp{CHAR(0)}) -to the significant trailing blanks. - -@item -Fix @code{CHMOD} intrinsic to work with file names -that have embedded blanks, commas, and so on. - -@item -Fix @code{SIGNAL} intrinsic so it accepts an -optional third @code{Status} argument. - -@ifclear USERVISONLY -@item -Fix @code{IDATE()} intrinsic subroutine (VXT form) -so it accepts arguments in the correct order. -Documentation fixed accordingly, and for -@code{GMTIME()} and @code{LTIME()} as well. -@end ifclear - -@item -Make many changes to @code{libU77} intrinsics to -support existing code more directly. - -Such changes include allowing both subroutine and -function forms of many routines, changing @code{MCLOCK()} -and @code{TIME()} to return @code{INTEGER(KIND=1)} values, -introducing @code{MCLOCK8()} and @code{TIME8()} to -return @code{INTEGER(KIND=2)} values, -and placing functions that are intended to perform -side effects in a new intrinsic group, @code{badu77}. - -@ifclear USERVISONLY -@item -Improve @code{libU77} so it is more portable. -@end ifclear - -@item -Add options @option{-fbadu77-intrinsics-delete}, -@option{-fbadu77-intrinsics-hide}, and so on. - -@ifclear USERVISONLY -@item -Fix crashes involving diagnosed or invalid code. -@end ifclear - -@ifclear USERVISONLY -@item -@command{g77} and @command{gcc} now do a somewhat better -job detecting and diagnosing arrays that are too -large to handle before these cause diagnostics -during the assembler or linker phase, a compiler -crash, or generation of incorrect code. -@end ifclear - -@ifclear USERVISONLY -@item -Make some fixes to alias analysis code. -@end ifclear - -@ifclear USERVISONLY -@item -Add support for @code{restrict} keyword in @command{gcc} -front end. -@end ifclear - -@ifclear USERVISONLY -@item -Support @command{gcc} version 2.7.2.3 -(modified by @command{g77} into version 2.7.2.3.f.1), -and remove -support for prior versions of @command{gcc}. -@end ifclear - -@ifclear USERVISONLY -@item -Incorporate GNAT's patches to the @command{gcc} back -end into @command{g77}'s, so GNAT users do not need -to apply GNAT's patches to build both GNAT and @command{g77} -from the same source tree. -@end ifclear - -@ifclear USERVISONLY -@item -Modify @command{make} rules and related code so that -generation of Info documentation doesn't require -compilation using @command{gcc}. -Now, any ANSI C compiler should be adequate to -produce the @command{g77} documentation (in particular, -the tables of intrinsics) from scratch. -@end ifclear - -@item -Add @code{INT2} and @code{INT8} intrinsics. - -@item -Add @code{CPU_TIME} intrinsic. - -@item -Add @code{ALARM} intrinsic. - -@item -@code{CTIME} intrinsic now accepts any @code{INTEGER} -argument, not just @code{INTEGER(KIND=2)}. - -@ifclear USERVISONLY -@item -Warn when explicit type declaration disagrees with -the type of an intrinsic invocation. -@end ifclear - -@ifclear USERVISONLY -@item -Support @samp{*f771} entry in @command{gcc} @file{specs} file. -@end ifclear - -@ifclear USERVISONLY -@item -Fix typo in @command{make} rule @command{g77-cross}, used only for -cross-compiling. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @code{libf2c} build procedure to re-archive library -if previous attempt to archive was interrupted. -@end ifclear - -@ifclear USERVISONLY -@item -Change @command{gcc} to unroll loops only during the last -invocation (of as many as two invocations) of loop -optimization. -@end ifclear - -@ifclear USERVISONLY -@item -Improve handling of @option{-fno-f2c} so that code that -attempts to pass an intrinsic as an actual argument, -such as @samp{CALL FOO(ABS)}, is rejected due to the fact -that the run-time-library routine is, effectively, -compiled with @option{-ff2c} in effect. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} driver to recognize @option{-fsyntax-only} -as an option that inhibits linking, just like @option{-c} or -@option{-S}, and to recognize and properly handle the -@option{-nostdlib}, @option{-M}, @option{-MM}, @option{-nodefaultlibs}, -and @option{-Xlinker} options. -@end ifclear - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 1997-08-16. -@end ifclear - -@ifclear USERVISONLY -@item -Modify @code{libf2c} to consistently and clearly diagnose -recursive I/O (at run time). -@end ifclear - -@item -@command{g77} driver now prints version information (such as produced -by @kbd{g77 -v}) to @code{stderr} instead of @code{stdout}. - -@item -The @samp{.r} suffix now designates a Ratfor source file, -to be preprocessed via the @command{ratfor} command, available -separately. - -@ifclear USERVISONLY -@item -Fix some aspects of how @command{gcc} determines what kind of -system is being configured and what kinds are supported. -For example, GNU Linux/Alpha ELF systems now are directly -supported. -@end ifclear - -@ifclear USERVISONLY -@item -Improve diagnostics. -@end ifclear - -@ifclear USERVISONLY -@item -Improve documentation and indexing. -@end ifclear - -@ifclear USERVISONLY -@item -Include all pertinent files for @code{libf2c} that come -from @code{netlib.bell-labs.com}; give any such files -that aren't quite accurate in @command{g77}'s version of -@code{libf2c} the suffix @samp{.netlib}. -@end ifclear - -@ifclear USERVISONLY -@item -Reserve @code{INTEGER(KIND=0)} for future use. -@end ifclear -@end itemize - -@c 1997-02-28: 0.5.20 released. -@heading In 0.5.20: -@itemize @bullet -@item -The @option{-fno-typeless-boz} option is now the default. - -This option specifies that non-decimal-radix -constants using the prefixed-radix form (such as @samp{Z'1234'}) -are to be interpreted as @code{INTEGER(KIND=1)} constants. -Specify @option{-ftypeless-boz} to cause such -constants to be interpreted as typeless. - -(Version 0.5.19 introduced @option{-fno-typeless-boz} and -its inverse.) - -@ifset DOC-G77 -@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}, -for information on the @option{-ftypeless-boz} option. -@end ifset - -@item -Options @option{-ff90-intrinsics-enable} and -@option{-fvxt-intrinsics-enable} now are the -defaults. - -Some programs might use names that clash with -intrinsic names defined (and now enabled) by these -options or by the new @code{libU77} intrinsics. -Users of such programs might need to compile them -differently (using, for example, @option{-ff90-intrinsics-disable}) -or, better yet, insert appropriate @code{EXTERNAL} -statements specifying that these names are not intended -to be names of intrinsics. - -@item -The @code{ALWAYS_FLUSH} macro is no longer defined when -building @code{libf2c}, which should result in improved -I/O performance, especially over NFS. - -@emph{Note:} If you have code that depends on the behavior -of @code{libf2c} when built with @code{ALWAYS_FLUSH} defined, -you will have to modify @code{libf2c} accordingly before -building it from this and future versions of @command{g77}. - -@ifset DOC-G77 -@xref{Output Assumed To Flush}, for more information. -@end ifset - -@item -Dave Love's implementation of @code{libU77} has been -added to the version of @code{libf2c} distributed with -and built as part of @command{g77}. -@command{g77} now knows about the routines in this library -as intrinsics. - -@item -New option @option{-fvxt} specifies that the -source file is written in VXT Fortran, instead of GNU Fortran. - -@ifset DOC-G77 -@xref{VXT Fortran}, for more information on the constructs -recognized when the @option{-fvxt} option is specified. -@end ifset - -@item -The @option{-fvxt-not-f90} option has been deleted, -along with its inverse, @option{-ff90-not-vxt}. - -If you used one of these deleted options, you should -re-read the pertinent documentation to determine which -options, if any, are appropriate for compiling your -code with this version of @command{g77}. - -@ifset DOC-G77 -@xref{Other Dialects}, for more information. -@end ifset - -@item -The @option{-fugly} option now issues a warning, as it -likely will be removed in a future version. - -(Enabling all the @option{-fugly-*} options is unlikely -to be feasible, or sensible, in the future, -so users should learn to specify only those -@option{-fugly-*} options they really need for a -particular source file.) - -@item -The @option{-fugly-assumed} option, introduced in -version 0.5.19, has been changed to -better accommodate old and new code. - -@ifset DOC-G77 -@xref{Ugly Assumed-Size Arrays}, for more information. -@end ifset - -@ifclear USERVISONLY -@item -Make a number of fixes to the @command{g77} front end and -the @command{gcc} back end to better support Alpha (AXP) -machines. -This includes providing at least one bug-fix to the -@command{gcc} back end for Alphas. -@end ifclear - -@item -Related to supporting Alpha (AXP) machines, the @code{LOC()} -intrinsic and @code{%LOC()} construct now return -values of @code{INTEGER(KIND=0)} type, -as defined by the GNU Fortran language. - -This type is wide enough -(holds the same number of bits) -as the character-pointer type on the machine. - -On most machines, this won't make a difference, -whereas, on Alphas and other systems with 64-bit pointers, -the @code{INTEGER(KIND=0)} type is equivalent to @code{INTEGER(KIND=2)} -(often referred to as @code{INTEGER*8}) -instead of the more common @code{INTEGER(KIND=1)} -(often referred to as @code{INTEGER*4}). - -@item -Emulate @code{COMPLEX} arithmetic in the @command{g77} front -end, to avoid bugs in @code{complex} support in the -@command{gcc} back end. -New option @option{-fno-emulate-complex} -causes @command{g77} to revert the 0.5.19 behavior. - -@ifclear USERVISONLY -@item -Fix bug whereby @samp{REAL A(1)}, for example, caused -a compiler crash if @option{-fugly-assumed} was in effect -and @var{A} was a local (automatic) array. -That case is no longer affected by the new -handling of @option{-fugly-assumed}. -@end ifclear - -@ifclear USERVISONLY -@item -Fix @command{g77} command driver so that @samp{g77 -o foo.f} -no longer deletes @file{foo.f} before issuing other -diagnostics, and so the @option{-x} option is properly -handled. -@end ifclear - -@ifclear USERVISONLY -@item -Enable inlining of subroutines and functions by the @command{gcc} -back end. -This works as it does for @command{gcc} itself---program units -may be inlined for invocations that follow them in the same -program unit, as long as the appropriate compile-time -options are specified. -@end ifclear - -@item -Dummy arguments are no longer assumed to potentially alias -(overlap) -other dummy arguments or @code{COMMON} areas when any of -these are defined (assigned to) by Fortran code. - -This can result in faster and/or smaller programs when -compiling with optimization enabled, though on some -systems this effect is observed only when @option{-fforce-addr} -also is specified. - -New options @option{-falias-check}, @option{-fargument-alias}, -@option{-fargument-noalias}, -and @option{-fno-argument-noalias-global} control the -way @command{g77} handles potential aliasing. - -@ifset DOC-G77 -@xref{Aliasing Assumed To Work}, for detailed information on why the -new defaults might result in some programs no longer working the way they -did when compiled by previous versions of @command{g77}. -@end ifset - -@ifclear USERVISONLY -@item -The @code{CONJG()} and @code{DCONJG()} intrinsics now -are compiled in-line. -@end ifclear - -@ifclear USERVISONLY -@item -The bug-fix for 0.5.19.1 has been re-done. -The @command{g77} compiler has been changed back to -assume @code{libf2c} has no aliasing problems in -its implementations of the @code{COMPLEX} (and -@code{DOUBLE COMPLEX}) intrinsics. -The @code{libf2c} has been changed to have no such -problems. - -As a result, 0.5.20 is expected to offer improved performance -over 0.5.19.1, perhaps as good as 0.5.19 in most -or all cases, due to this change alone. - -@emph{Note:} This change requires version 0.5.20 of -@code{libf2c}, at least, when linking code produced -by any versions of @command{g77} other than 0.5.19.1. -Use @samp{g77 -v} to determine the version numbers -of the @code{libF77}, @code{libI77}, and @code{libU77} -components of the @code{libf2c} library. -(If these version numbers are not printed---in -particular, if the linker complains about unresolved -references to names like @samp{g77__fvers__}---that -strongly suggests your installation has an obsolete -version of @code{libf2c}.) -@end ifclear - -@item -New option @option{-fugly-assign} specifies that the -same memory locations are to be used to hold the -values assigned by both statements @samp{I = 3} and -@samp{ASSIGN 10 TO I}, for example. -(Normally, @command{g77} uses a separate memory location -to hold assigned statement labels.) - -@ifset DOC-G77 -@xref{Ugly Assigned Labels}, for more information. -@end ifset - -@item -@code{FORMAT} and @code{ENTRY} statements now are allowed to -precede @code{IMPLICIT NONE} statements. - -@ifclear USERVISONLY -@item -Produce diagnostic for unsupported @code{SELECT CASE} on -@code{CHARACTER} type, instead of crashing, at compile time. -@end ifclear - -@ifclear USERVISONLY -@item -Fix crashes involving diagnosed or invalid code. -@end ifclear - -@ifclear USERVISONLY -@item -Change approach to building @code{libf2c} archive -(@file{libf2c.a}) so that members are added to it -only when truly necessary, so the user that installs -an already-built @command{g77} doesn't need to have write -access to the build tree (whereas the user doing the -build might not have access to install new software -on the system). -@end ifclear - -@ifclear USERVISONLY -@item -Support @command{gcc} version 2.7.2.2 -(modified by @command{g77} into version 2.7.2.2.f.2), -and remove -support for prior versions of @command{gcc}. -@end ifclear - -@ifclear USERVISONLY -@item -Upgrade to @code{libf2c} as of 1997-02-08, and -fix up some of the build procedures. -@end ifclear - -@ifclear USERVISONLY -@item -Improve general build procedures for @command{g77}, -fixing minor bugs (such as deletion of any file -named @file{f771} in the parent directory of @code{gcc/}). -@end ifclear - -@item -Enable full support of @code{INTEGER(KIND=2)} -(often referred to as @code{INTEGER*8}) -available in -@code{libf2c} and @file{f2c.h} so that @command{f2c} users -may make full use of its features via the @command{g77} -version of @file{f2c.h} and the @code{INTEGER(KIND=2)} -support routines in the @command{g77} version of @code{libf2c}. - -@item -Improve @command{g77} driver and @code{libf2c} so that @samp{g77 -v} -yields version information on the library. - -@item -The @code{SNGL} and @code{FLOAT} intrinsics now are -specific intrinsics, instead of synonyms for the -generic intrinsic @code{REAL}. - -@item -New intrinsics have been added. -These are @code{REALPART}, @code{IMAGPART}, -@code{COMPLEX}, -@code{LONG}, and @code{SHORT}. - -@item -A new group of intrinsics, @code{gnu}, has been added -to contain the new @code{REALPART}, @code{IMAGPART}, -and @code{COMPLEX} intrinsics. -An old group, @code{dcp}, has been removed. - -@item -Complain about industry-wide ambiguous references -@samp{REAL(@var{expr})} and @samp{AIMAG(@var{expr})}, -where @var{expr} is @code{DOUBLE COMPLEX} (or any -complex type other than @code{COMPLEX}), unless -@option{-ff90} option specifies Fortran 90 interpretation -or new @option{-fugly-complex} option, in conjunction with -@option{-fnot-f90}, specifies @command{f2c} interpretation. - -@ifclear USERVISONLY -@item -Make improvements to diagnostics. -@end ifclear - -@ifclear USERVISONLY -@item -Speed up compiler a bit. -@end ifclear - -@ifclear USERVISONLY -@item -Improvements to documentation and indexing, including -a new chapter containing information on one, later -more, diagnostics that users are directed to pull -up automatically via a message in the diagnostic itself. - -(Hence the menu item @code{M} for the node -@code{Diagnostics} in the top-level menu of -the Info documentation.) -@end ifclear -@end itemize - -@ifclear DOC-OLDNEWS -@heading In previous versions: - -Information on previous versions is archived -in @file{@value{path-g77}/news.texi} -following the test of the @code{DOC-OLDNEWS} macro. -@end ifclear - -@ifset DOC-OLDNEWS -@c 1997-02-01: 0.5.19.1 released. -@heading In 0.5.19.1: -@itemize @bullet -@item -Code-generation bugs afflicting operations on complex -data have been fixed. - -These bugs occurred when assigning the result of an -operation to a complex variable (or array element) -that also served as an input to that operation. - -The operations affected by this bug were: @code{CONJG()}, -@code{DCONJG()}, @code{CCOS()}, @code{CDCOS()}, -@code{CLOG()}, @code{CDLOG()}, @code{CSIN()}, @code{CDSIN()}, -@code{CSQRT()}, @code{CDSQRT()}, complex division, and -raising a @code{DOUBLE COMPLEX} operand to an @code{INTEGER} -power. -(The related generic and @samp{Z}-prefixed intrinsics, -such as @code{ZSIN()}, also were affected.) - -For example, @samp{C = CSQRT(C)}, @samp{Z = Z/C}, and @samp{Z = Z**I} -(where @samp{C} is @code{COMPLEX} and @samp{Z} is -@code{DOUBLE COMPLEX}) have been fixed. -@end itemize - -@c 1996-12-07: 0.5.19 released. -@heading In 0.5.19: -@itemize @bullet -@item -Fix @code{FORMAT} statement parsing so negative values for -specifiers such as @code{P} (e.g. @samp{FORMAT(-1PF8.1)}) -are correctly processed as negative. - -@item -Fix @code{SIGNAL} intrinsic so it once again accepts a -procedure as its second argument. - -@item -A temporary kludge option provides bare-bones information on -@code{COMMON} and @code{EQUIVALENCE} members at debug time. - -@item -New @option{-fonetrip} option specifies FORTRAN-66-style -one-trip @code{DO} loops. - -@item -New @option{-fno-silent} option causes names of program units -to be printed as they are compiled, in a fashion similar to -UNIX @command{f77} and @command{f2c}. - -@item -New @option{-fugly-assumed} option specifies that arrays -dimensioned via @samp{DIMENSION X(1)}, for example, are to be -treated as assumed-size. - -@item -New @option{-fno-typeless-boz} option specifies that non-decimal-radix -constants using the prefixed-radix form (such as @samp{Z'1234'}) -are to be interpreted as @code{INTEGER} constants. - -@item -New @option{-ff66} option is a ``shorthand'' option that specifies -behaviors considered appropriate for FORTRAN 66 programs. - -@item -New @option{-ff77} option is a ``shorthand'' option that specifies -behaviors considered appropriate for UNIX @command{f77} programs. - -@item -New @option{-fugly-comma} and @option{-fugly-logint} options provided -to perform some of what @option{-fugly} used to do. -@option{-fugly} and @option{-fno-ugly} are now ``shorthand'' options, -in that they do nothing more than enable (or disable) other -@option{-fugly-*} options. - -@item -Fix parsing of assignment statements involving targets that -are substrings of elements of @code{CHARACTER} arrays having -names such as @samp{READ}, @samp{WRITE}, @samp{GOTO}, and -@samp{REALFUNCTIONFOO}. - -@item -Fix crashes involving diagnosed code. - -@item -Fix handling of local @code{EQUIVALENCE} areas so certain cases -of valid Fortran programs are not misdiagnosed as improperly -extending the area backwards. - -@item -Support @command{gcc} version 2.7.2.1. - -@item -Upgrade to @code{libf2c} as of 1996-09-26, and -fix up some of the build procedures. - -@item -Change code generation for list-directed I/O so it allows -for new versions of @code{libf2c} that might return nonzero -status codes for some operations previously assumed to always -return zero. - -This change not only affects how @code{IOSTAT=} variables -are set by list-directed I/O, it also affects whether -@code{END=} and @code{ERR=} labels are reached by these -operations. - -@item -Add intrinsic support for new @code{FTELL} and @code{FSEEK} -procedures in @code{libf2c}. - -@item -Modify @code{fseek_()} in @code{libf2c} to be more portable -(though, in practice, there might be no systems where this -matters) and to catch invalid @code{whence} arguments. - -@item -Some useless warnings from the @option{-Wunused} option have -been eliminated. - -@item -Fix a problem building the @file{f771} executable -on AIX systems by linking with the @option{-bbigtoc} option. - -@item -Abort configuration if @command{gcc} has not been patched -using the patch file provided in the @file{gcc/f/gbe/} -subdirectory. - -@item -Add options @option{--help} and @option{--version} to the -@command{g77} command, to conform to GNU coding guidelines. -Also add printing of @command{g77} version number when -the @option{--verbose} (@option{-v}) option is used. - -@item -Change internally generated name for local @code{EQUIVALENCE} -areas to one based on the alphabetically sorted first name -in the list of names for entities placed at the beginning -of the areas. - -@item -Improvements to documentation and indexing. -@end itemize - -@c 1996-04-01: 0.5.18 released. -@heading In 0.5.18: -@itemize @bullet -@item -Add some rudimentary support for @code{INTEGER*1}, -@code{INTEGER*2}, @code{INTEGER*8}, -and their @code{LOGICAL} equivalents. -(This support works on most, maybe all, @command{gcc} targets.) - -Thanks to Scott Snyder (@email{snyder@@d0sgif.fnal.gov}) -for providing the patch for this! - -Among the missing elements from the support for these -features are full intrinsic support and constants. - -@item -Add some rudimentary support for the @code{BYTE} and -@code{WORD} type-declaration statements. -@code{BYTE} corresponds to @code{INTEGER*1}, -while @code{WORD} corresponds to @code{INTEGER*2}. - -Thanks to Scott Snyder (@email{snyder@@d0sgif.fnal.gov}) -for providing the patch for this! - -@item -The compiler code handling intrinsics has been largely -rewritten to accommodate the new types. -No new intrinsics or arguments for existing -intrinsics have been added, so there is, at this -point, no intrinsic to convert to @code{INTEGER*8}, -for example. - -@item -Support automatic arrays in procedures. - -@item -Reduce space/time requirements for handling large -@emph{sparsely} initialized aggregate arrays. -This improvement applies to only a subset of -the general problem to be addressed in 0.6. - -@item -Treat initial values of zero as if they weren't -specified (in DATA and type-declaration statements). -The initial values will be set to zero anyway, but the amount -of compile time processing them will be reduced, -in some cases significantly (though, again, this -is only a subset of the general problem to be -addressed in 0.6). - -A new option, @option{-fzeros}, is introduced to -enable the traditional treatment of zeros as any -other value. - -@item -With @option{-ff90} in force, @command{g77} incorrectly -interpreted @samp{REAL(Z)} as returning a @code{REAL} -result, instead of as a @code{DOUBLE PRECISION} -result. -(Here, @samp{Z} is @code{DOUBLE COMPLEX}.) - -With @option{-fno-f90} in force, the interpretation remains -unchanged, since this appears to be how at least some -F77 code using the @code{DOUBLE COMPLEX} extension expected -it to work. - -Essentially, @samp{REAL(Z)} in F90 is the same as -@samp{DBLE(Z)}, while in extended F77, it appears to -be the same as @samp{REAL(REAL(Z))}. - -@item -An expression involving exponentiation, where both operands -were type @code{INTEGER} and the right-hand operand -was negative, was erroneously evaluated. - -@item -Fix bugs involving @code{DATA} implied-@code{DO} constructs -(these involved an errant diagnostic and a crash, both on good -code, one involving subsequent statement-function definition). - -@item -Close @code{INCLUDE} files after processing them, so compiling source -files with lots of @code{INCLUDE} statements does not result in -being unable to open @code{INCLUDE} files after all the available -file descriptors are used up. - -@item -Speed up compiling, especially of larger programs, and perhaps -slightly reduce memory utilization while compiling (this is -@emph{not} the improvement planned for 0.6 involving large aggregate -areas)---these improvements result from simply turning -off some low-level code to do self-checking that hasn't been -triggered in a long time. - -@item -Introduce three new options that -implement optimizations in the @command{gcc} back end (GBE). -These options are @option{-fmove-all-movables}, @option{-freduce-all-givs}, -and @option{-frerun-loop-opt}, which are enabled, by default, -for Fortran compilations. -These optimizations are intended to help toon Fortran programs. - -@item -Patch the GBE to do a better job optimizing certain -kinds of references to array elements. - -@item -Due to patches to the GBE, the version number of @command{gcc} -also is patched to make it easier to manage installations, -especially useful if it turns out a @command{g77} change to the -GBE has a bug. - -The @command{g77}-modified version number is the @command{gcc} -version number with the string @samp{.f.@var{n}} appended, -where @samp{f} identifies the version as enhanced for -Fortran, and @var{n} is @samp{1} for the first Fortran -patch for that version of @command{gcc}, @samp{2} for the -second, and so on. - -So, this introduces version 2.7.2.f.1 of @command{gcc}. - -@item -Make several improvements and fixes to diagnostics, including -the removal of two that were inappropriate or inadequate. - -@item -Warning about two successive arithmetic operators, produced -by @option{-Wsurprising}, now produced @emph{only} when both -operators are, indeed, arithmetic (not relational/boolean). - -@item -@option{-Wsurprising} now warns about the remaining cases -of using non-integral variables for implied-@code{DO} -loops, instead of these being rejected unless @option{-fpedantic} -or @option{-fugly} specified. - -@item -Allow @code{SAVE} of a local variable or array, even after -it has been given an initial value via @code{DATA}, for example. - -@item -Introduce an Info version of @command{g77} documentation, which -supersedes @file{gcc/f/CREDITS}, @file{gcc/f/DOC}, and -@file{gcc/f/PROJECTS}. -These files will be removed in a future release. -The files @file{gcc/f/BUGS}, @file{gcc/f/INSTALL}, and -@file{gcc/f/NEWS} now are automatically built from -the texinfo source when distributions are made. - -This effort was inspired by a first pass at translating -@file{g77-0.5.16/f/DOC} that was contributed to Craig by -David Ronis (@email{ronis@@onsager.chem.mcgill.ca}). - -@item -New @option{-fno-second-underscore} option to specify -that, when @option{-funderscoring} is in effect, a second -underscore is not to be appended to Fortran names already -containing an underscore. - -@item -Change the way iterative @code{DO} loops work to follow -the F90 standard. -In particular, calculation of the iteration count is -still done by converting the start, end, and increment -parameters to the type of the @code{DO} variable, but -the result of the calculation is always converted to -the default @code{INTEGER} type. - -(This should have no effect on existing code compiled -by @command{g77}, but code written to assume that use -of a @emph{wider} type for the @code{DO} variable -will result in an iteration count being fully calculated -using that wider type (wider -than default @code{INTEGER}) must be rewritten.) - -@item -Support @command{gcc} version 2.7.2. - -@item -Upgrade to @code{libf2c} as of 1996-03-23, and -fix up some of the build procedures. - -Note that the email addresses related to @command{f2c} -have changed---the distribution site now is -named @code{netlib.bell-labs.com}, and the -maintainer's new address is @email{dmg@@bell-labs.com}. -@end itemize - -@c 1995-11-18: 0.5.17 released. -@heading In 0.5.17: -@itemize @bullet -@item -@strong{Fix serious bug} in @samp{g77 -v} command that can cause removal of a -system's @file{/dev/null} special file if run by user @code{root}. - -@strong{All users} of version 0.5.16 should ensure that -they have not removed @file{/dev/null} or replaced it with an ordinary -file (e.g. by comparing the output of @samp{ls -l /dev/null} with -@samp{ls -l /dev/zero}. -If the output isn't basically the -same, contact your system -administrator about restoring @file{/dev/null} to its proper status). - -This bug is particularly insidious because removing @file{/dev/null} as -a special file can go undetected for quite a while, aside from -various applications and programs exhibiting sudden, strange -behaviors. - -I sincerely apologize for not realizing the -implications of the fact that when @samp{g77 -v} runs the @command{ld} command -with @samp{-o /dev/null} that @command{ld} tries to @emph{remove} the executable -it is supposed to build (especially if it reports unresolved -references, which it should in this case)! - -@item -Fix crash on @samp{CHARACTER*(*) FOO} in a main or block data program unit. - -@item -Fix crash that can occur when diagnostics given outside of any -program unit (such as when input file contains @samp{@@foo}). - -@item -Fix crashes, infinite loops (hangs), and such involving diagnosed code. - -@item -Fix @code{ASSIGN}'ed variables so they can be @code{SAVE}'d or dummy arguments, -and issue clearer error message in cases where target of @code{ASSIGN} -or @code{ASSIGN}ed @code{GOTO}/@code{FORMAT} is too small (which should -never happen). - -@item -Make @code{libf2c} build procedures work on more systems again by -eliminating unnecessary invocations of @samp{ld -r -x} and @command{mv}. - -@item -Fix omission of @option{-funix-intrinsics-@dots{}} options in list of permitted -options to compiler. - -@item -Fix failure to always diagnose missing type declaration for -@code{IMPLICIT NONE}. - -@item -Fix compile-time performance problem (which could sometimes -crash the compiler, cause a hang, or whatever, due to a bug -in the back end) involving exponentiation with a large @code{INTEGER} -constant for the right-hand operator (e.g. @samp{I**32767}). - -@item -Fix build procedures so cross-compiling @command{g77} (the @command{fini} -utility in particular) is properly built using the host compiler. - -@item -Add new @option{-Wsurprising} option to warn about constructs that are -interpreted by the Fortran standard (and @command{g77}) in ways that -are surprising to many programmers. - -@item -Add @code{ERF()} and @code{ERFC()} as generic intrinsics mapping to existing -@code{ERF}/@code{DERF} and @code{ERFC}/@code{DERFC} specific intrinsics. - -@emph{Note:} You should -specify @samp{INTRINSIC ERF,ERFC} in any code where you might use -these as generic intrinsics, to improve likelihood of diagnostics -(instead of subtle run-time bugs) when using a compiler that -doesn't support these as intrinsics (e.g. @command{f2c}). - -@item -Remove from @option{-fno-pedantic} the diagnostic about @code{DO} -with non-@code{INTEGER} index variable; issue that under -@option{-Wsurprising} instead. - -@item -Clarify some diagnostics that say things like ``ignored'' when that's -misleading. - -@item -Clarify diagnostic on use of @code{.EQ.}/@code{.NE.} on @code{LOGICAL} -operands. - -@item -Minor improvements to code generation for various operations on -@code{LOGICAL} operands. - -@item -Minor improvement to code generation for some @code{DO} loops on some -machines. - -@item -Support @command{gcc} version 2.7.1. - -@item -Upgrade to @code{libf2c} as of 1995-11-15. -@end itemize - -@c 1995-08-30: 0.5.16 released. -@heading In 0.5.16: -@itemize @bullet -@item -Fix a code-generation bug involving complicated @code{EQUIVALENCE} statements -not involving @code{COMMON}. - -@item -Fix code-generation bugs involving invoking ``gratis'' library procedures -in @code{libf2c} from code compiled with @option{-fno-f2c} by making these -procedures known to @command{g77} as intrinsics (not affected by -fno-f2c). -This is known to fix code invoking @code{ERF()}, @code{ERFC()}, -@code{DERF()}, and @code{DERFC()}. - -@item -Update @code{libf2c} to include netlib patches through 1995-08-16, and -@code{#define} @code{WANT_LEAD_0} to 1 to make @command{g77}-compiled code more -consistent with other Fortran implementations by outputting -leading zeros in formatted and list-directed output. - -@item -Fix a code-generation bug involving adjustable dummy arrays with high -bounds whose primaries are changed during procedure execution, and -which might well improve code-generation performance for such arrays -compared to @command{f2c} plus @command{gcc} (but apparently only when using -@file{gcc-2.7.0} or later). - -@item -Fix a code-generation bug involving invocation of @code{COMPLEX} and -@code{DOUBLE COMPLEX} @code{FUNCTION}s and doing @code{COMPLEX} and -@code{DOUBLE COMPLEX} divides, when the result -of the invocation or divide is assigned directly to a variable -that overlaps one or more of the arguments to the invocation or divide. - -@item -Fix crash by not generating new optimal code for @samp{X**I} if @samp{I} is -nonconstant and the expression is used to dimension a dummy -array, since the @command{gcc} back end does not support the necessary -mechanics (and the @command{gcc} front end rejects the equivalent -construct, as it turns out). - -@item -Fix crash on expressions like @samp{COMPLEX**INTEGER}. - -@item -Fix crash on expressions like @samp{(1D0,2D0)**2}, i.e. raising a -@code{DOUBLE COMPLEX} constant to an @code{INTEGER} constant power. - -@item -Fix crashes and such involving diagnosed code. - -@item -Diagnose, instead of crashing on, statement function definitions -having duplicate dummy argument names. - -@item -Fix bug causing rejection of good code involving statement function -definitions. - -@item -Fix bug resulting in debugger not knowing size of local equivalence -area when any member of area has initial value (via @code{DATA}, -for example). - -@item -Fix installation bug that prevented installation of @command{g77} driver. -Provide for easy selection of whether to install copy of @command{g77} -as @command{f77} to replace the broken code. - -@item -Fix @command{gcc} driver (affects @command{g77} thereby) to not -gratuitously invoke the -@code{f771} program (e.g. when @option{-E} is specified). - -@item -Fix diagnostic to point to correct source line when it immediately -follows an @code{INCLUDE} statement. - -@item -Support more compiler options in @command{gcc}/@command{g77} when -compiling Fortran files. -These options include @option{-p}, @option{-pg}, @option{-aux-info}, @option{-P}, -correct setting of version-number macros for preprocessing, full -recognition of @option{-O0}, and -automatic insertion of configuration-specific linker specs. - -@item -Add new intrinsics that interface to existing routines in @code{libf2c}: -@code{ABORT}, @code{DERF}, @code{DERFC}, @code{ERF}, @code{ERFC}, @code{EXIT}, -@code{FLUSH}, @code{GETARG}, @code{GETENV}, @code{IARGC}, -@code{SIGNAL}, and @code{SYSTEM}. -Note that @code{ABORT}, @code{EXIT}, @code{FLUSH}, @code{SIGNAL}, and -@code{SYSTEM} are intrinsic subroutines, not functions (since they -have side effects), so to get the return values from @code{SIGNAL} -and @code{SYSTEM}, append a final argument specifying an @code{INTEGER} -variable or array element (e.g. @samp{CALL SYSTEM('rm foo',ISTAT)}). - -@item -Add new intrinsic group named @code{unix} to contain the new intrinsics, -and by default enable this new group. - -@item -Move @code{LOC()} intrinsic out of the @code{vxt} group to the new -@code{unix} group. - -@item -Improve @command{g77} so that @samp{g77 -v} by itself (or with -certain other options, including @option{-B}, @option{-b}, @option{-i}, -@option{-nostdlib}, and @option{-V}) reports lots more useful -version info, and so that long-form options @command{gcc} accepts are -understood by @command{g77} as well (even in truncated, unambiguous forms). - -@item -Add new @command{g77} option @option{--driver=name} to specify driver when -default, @command{gcc}, isn't appropriate. - -@item -Add support for @samp{#} directives (as output by the preprocessor) in the -compiler, and enable generation of those directives by the -preprocessor (when compiling @samp{.F} files) so diagnostics and debugging -info are more useful to users of the preprocessor. - -@item -Produce better diagnostics, more like @command{gcc}, with info such as -@samp{In function `foo':} and @samp{In file included from...:}. - -@item -Support @command{gcc}'s @option{-fident} and @option{-fno-ident} options. - -@item -When @option{-Wunused} in effect, don't warn about local variables used as -statement-function dummy arguments or @code{DATA} implied-@code{DO} iteration -variables, even though, strictly speaking, these are not uses -of the variables themselves. - -@item -When @samp{-W -Wunused} in effect, don't warn about unused dummy arguments -at all, since there's no way to turn this off for individual -cases (@command{g77} might someday start warning about these)---applies -to @command{gcc} versions 2.7.0 and later, since earlier versions didn't -warn about unused dummy arguments. - -@item -New option @option{-fno-underscoring} that inhibits transformation of names -(by appending one or two underscores) so users may experiment -with implications of such an environment. - -@item -Minor improvement to @file{gcc/f/info} module to make it easier to build -@command{g77} using the native (non-@command{gcc}) compiler on certain machines -(but definitely not all machines nor all non-@command{gcc} compilers). -Please -do not report bugs showing problems compilers have with -macros defined in @file{gcc/f/target.h} and used in places like -@file{gcc/f/expr.c}. - -@item -Add warning to be printed for each invocation of the compiler -if the target machine @code{INTEGER}, @code{REAL}, or @code{LOGICAL} size -is not 32 bits, -since @command{g77} is known to not work well for such cases. - -@item -Lots of new documentation (though work is still needed to put it into -canonical GNU format). - -@item -Build @code{libf2c} with @option{-g0}, not @option{-g2}, in effect -(by default), to produce -smaller library without lots of debugging clutter. -@end itemize - -@c 1995-05-19: 0.5.15 released. -@heading In 0.5.15: -@itemize @bullet -@item -Fix bad code generation involving @samp{X**I} and temporary, internal variables -generated by @command{g77} and the back end (such as for @code{DO} loops). - -@item -Fix crash given @samp{CHARACTER A;DATA A/.TRUE./}. - -@item -Replace crash with diagnostic given @samp{CHARACTER A;DATA A/1.0/}. - -@item -Fix crash or other erratic behavior when null character constant -(@samp{''}) is encountered. - -@item -Fix crash or other erratic behavior involving diagnosed code. - -@item -Fix code generation for external functions returning type @code{REAL} when -the @option{-ff2c} option is in force (which it is by default) so that -@command{f2c} compatibility is indeed provided. - -@item -Disallow @samp{COMMON I(10)} if @samp{I} has previously been specified -with an array declarator. - -@item -New @option{-ffixed-line-length-@var{n}} option, where @var{n} is the -maximum length -of a typical fixed-form line, defaulting to 72 columns, such -that characters beyond column @var{n} are ignored, or @var{n} is @samp{none}, -meaning no characters are ignored. -does not affect lines -with @samp{&} in column 1, which are always processed as if -@option{-ffixed-line-length-none} was in effect. - -@item -No longer generate better code for some kinds of array references, -as @command{gcc} back end is to be fixed to do this even better, and it -turned out to slow down some code in some cases after all. - -@item -In @code{COMMON} and @code{EQUIVALENCE} areas with any members given initial -values (e.g. via @code{DATA}), uninitialized members now always -initialized to binary zeros (though this is not required by -the standard, and might not be done in future versions -of @command{g77}). -Previously, in some @code{COMMON}/@code{EQUIVALENCE} areas -(essentially those with members of more than one type), the -uninitialized members were initialized to spaces, to -cater to @code{CHARACTER} types, but it seems no existing code expects -that, while much existing code expects binary zeros. -@end itemize - -@heading In 0.5.14: -@itemize @bullet -@item -Don't emit bad code when low bound of adjustable array is nonconstant -and thus might vary as an expression at run time. - -@item -Emit correct code for calculation of number of trips in @code{DO} loops -for cases -where the loop should not execute at all. -(This bug affected cases -where the difference between the begin and end values was less -than the step count, though probably not for floating-point cases.) - -@item -Fix crash when extra parentheses surround item in -@code{DATA} implied-@code{DO} list. - -@item -Fix crash over minor internal inconsistencies in handling diagnostics, -just substitute dummy strings where necessary. - -@item -Fix crash on some systems when compiling call to @code{MVBITS()} intrinsic. - -@item -Fix crash on array assignment @samp{TYPE@var{ddd}(@dots{})=@dots{}}, where @var{ddd} -is a string of one or more digits. - -@item -Fix crash on @code{DCMPLX()} with a single @code{INTEGER} argument. - -@item -Fix various crashes involving code with diagnosed errors. - -@item -Support @option{-I} option for @code{INCLUDE} statement, plus @command{gcc}'s -@file{header.gcc} facility for handling systems like MS-DOS. - -@item -Allow @code{INCLUDE} statement to be continued across multiple lines, -even allow it to coexist with other statements on the same line. - -@item -Incorporate Bellcore fixes to @code{libf2c} through 1995-03-15---this -fixes a bug involving infinite loops reading EOF with empty list-directed -I/O list. - -@item -Remove all the @command{g77}-specific auto-configuration scripts, code, -and so on, -except for temporary substitutes for bsearch() and strtoul(), as -too many configure/build problems were reported in these areas. -People will have to fix their systems' problems themselves, or at -least somewhere other than @command{g77}, which expects a working ANSI C -environment (and, for now, a GNU C compiler to compile @command{g77} itself). - -@item -Complain if initialized common redeclared as larger in subsequent program -unit. - -@item -Warn if blank common initialized, since its size can vary and hence -related warnings that might be helpful won't be seen. - -@item -New @option{-fbackslash} option, on by default, that causes @samp{\} -within @code{CHARACTER} -and Hollerith constants to be interpreted a la GNU C. -Note that -this behavior is somewhat different from @command{f2c}'s, which supports only -a limited subset of backslash (escape) sequences. - -@item -Make @option{-fugly-args} the default. - -@item -New @option{-fugly-init} option, on by default, that allows typeless/Hollerith -to be specified as initial values for variables or named constants -(@code{PARAMETER}), and also allows character<->numeric conversion in -those contexts---turn off via @option{-fno-ugly-init}. - -@item -New @option{-finit-local-zero} option to initialize -local variables to binary zeros. -This does not affect whether they are @code{SAVE}d, i.e. made -automatic or static. - -@item -New @option{-Wimplicit} option to warn about implicitly typed variables, arrays, -and functions. -(Basically causes all program units to default to @code{IMPLICIT NONE}.) - -@item -@option{-Wall} now implies @option{-Wuninitialized} as with @command{gcc} -(i.e. unless @option{-O} not specified, since @option{-Wuninitialized} -requires @option{-O}), and implies @option{-Wunused} as well. - -@item -@option{-Wunused} no longer gives spurious messages for unused -@code{EXTERNAL} names (since they are assumed to refer to block data -program units, to make use of libraries more reliable). - -@item -Support @code{%LOC()} and @code{LOC()} of character arguments. - -@item -Support null (zero-length) character constants and expressions. - -@item -Support @command{f2c}'s @code{IMAG()} generic intrinsic. - -@item -Support @code{ICHAR()}, @code{IACHAR()}, and @code{LEN()} of -character expressions that are valid in assignments but -not normally as actual arguments. - -@item -Support @command{f2c}-style @samp{&} in column 1 to mean continuation line. - -@item -Allow @code{NAMELIST}, @code{EXTERNAL}, @code{INTRINSIC}, and @code{VOLATILE} -in @code{BLOCK DATA}, even though these are not allowed by the standard. - -@item -Allow @code{RETURN} in main program unit. - -@item -Changes to Hollerith-constant support to obey Appendix C of the -standard: - -@itemize @minus -@item -Now padded on the right with zeros, not spaces. - -@item -Hollerith ``format specifications'' in the form of arrays of -non-character allowed. - -@item -Warnings issued when non-space truncation occurs when converting -to another type. - -@item -When specified as actual argument, now passed -by reference to @code{INTEGER} (padded on right with spaces if constant -too small, otherwise fully intact if constant wider the @code{INTEGER} -type) instead of by value. -@end itemize - -@strong{Warning:} @command{f2c} differs on the -interpretation of @samp{CALL FOO(1HX)}, which it treats exactly the -same as @samp{CALL FOO('X')}, but which the standard and @command{g77} treat -as @samp{CALL FOO(%REF('X '))} (padded with as many spaces as necessary -to widen to @code{INTEGER}), essentially. - -@item -Changes and fixes to typeless-constant support: - -@itemize @minus -@item -Now treated as a typeless double-length @code{INTEGER} value. - -@item -Warnings issued when overflow occurs. - -@item -Padded on the left with zeros when converting -to a larger type. - -@item -Should be properly aligned and ordered on -the target machine for whatever type it is turned into. - -@item -When specified as actual argument, now passed as reference to -a default @code{INTEGER} constant. -@end itemize - -@item -@code{%DESCR()} of a non-@code{CHARACTER} expression now passes a pointer to -the expression plus a length for the expression just as if -it were a @code{CHARACTER} expression. -For example, @samp{CALL FOO(%DESCR(D))}, where -@samp{D} is @code{REAL*8}, is the same as @samp{CALL FOO(D,%VAL(8)))}. - -@item -Name of multi-entrypoint master function changed to incorporate -the name of the primary entry point instead of a decimal -value, so the name of the master function for @samp{SUBROUTINE X} -with alternate entry points is now @samp{__g77_masterfun_x}. - -@item -Remove redundant message about zero-step-count @code{DO} loops. - -@item -Clean up diagnostic messages, shortening many of them. - -@item -Fix typo in @command{g77} man page. - -@item -Clarify implications of constant-handling bugs in @file{f/BUGS}. - -@item -Generate better code for @samp{**} operator with a right-hand operand of -type @code{INTEGER}. - -@item -Generate better code for @code{SQRT()} and @code{DSQRT()}, -also when @option{-ffast-math} -specified, enable better code generation for @code{SIN()} and @code{COS()}. - -@item -Generate better code for some kinds of array references. - -@item -Speed up lexing somewhat (this makes the compilation phase noticeably -faster). -@end itemize - -@end ifset -@end ifclear diff --git a/contrib/gcc/f/news0.texi b/contrib/gcc/f/news0.texi deleted file mode 100644 index 21176c3..0000000 --- a/contrib/gcc/f/news0.texi +++ /dev/null @@ -1,9 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@c %**start of header -@setfilename NEWS -@c %**end of header - -@c This tells news.texi that it's generating just the NEWS file. -@set DOC-NEWS -@include news.texi -@bye diff --git a/contrib/gcc/f/parse.c b/contrib/gcc/f/parse.c deleted file mode 100644 index d822773..0000000 --- a/contrib/gcc/f/parse.c +++ /dev/null @@ -1,49 +0,0 @@ -/* GNU Fortran - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - -#include "proj.h" -#include "top.h" -#include "com.h" -#include "where.h" -#include "version.h" -#include "flags.h" - -extern FILE *finput; - -void -ffe_parse_file (int set_yydebug ATTRIBUTE_UNUSED) -{ - const char *fname; - ffewhereFile wf; - - if (ffe_is_version ()) - fprintf (stderr, "GNU Fortran Front End version %s\n", version_string); - - if (!ffe_is_pedantic ()) - ffe_set_is_pedantic (pedantic); - - fname = main_input_filename ? main_input_filename : ""; - wf = ffewhere_file_new (fname, strlen (fname)); - ffecom_file (fname); - ffe_file (wf, finput); - - ffecom_finish_compile (); -} diff --git a/contrib/gcc/f/proj.h b/contrib/gcc/f/proj.h deleted file mode 100644 index 0896bdf..0000000 --- a/contrib/gcc/f/proj.h +++ /dev/null @@ -1,52 +0,0 @@ -/* proj.h file for Gnu Fortran - Copyright (C) 1995, 1996, 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - -*/ - -#ifndef GCC_F_PROJ_H -#define GCC_F_PROJ_H - -#ifdef USE_BCONFIG -#include "bconfig.h" -#else -#include "config.h" -#endif -#include "system.h" -#include "coretypes.h" -#include "tm.h" - -#if (GCC_VERSION < 2000) - #error "You have to use gcc 2.x to build g77." -#endif - -/* Include files everyone gets. is needed for assert(). */ - -#include "assert.h" - -#ifndef UNUSED /* Compile with -DUNUSED= if cc doesn't support this. */ -#define UNUSED ATTRIBUTE_UNUSED -#endif /* !defined (UNUSED) */ - -#ifndef dmpout -#define dmpout stderr -#endif - -#endif /* ! GCC_F_PROJ_H */ diff --git a/contrib/gcc/f/root.texi b/contrib/gcc/f/root.texi deleted file mode 100644 index 1956abc..0000000 --- a/contrib/gcc/f/root.texi +++ /dev/null @@ -1,14 +0,0 @@ -@include gcc-common.texi - -@set email-general gcc@@gcc.gnu.org -@set email-help gcc-help@@gcc.gnu.org -@set email-bugs gcc-bugs@@gcc.gnu.org or bug-gcc@@gnu.org -@set email-patch gcc-patches@@gcc.gnu.org -@set path-g77 gcc/gcc/f -@set path-libf2c gcc/libf2c - -@set which-g77 GCC-@value{version-GCC} -@set which-gcc GCC - -@set email-burley craig@@jcb-sc.com -@set www-burley http://world.std.com/%7Eburley/ diff --git a/contrib/gcc/f/src.c b/contrib/gcc/f/src.c deleted file mode 100644 index 54fc777..0000000 --- a/contrib/gcc/f/src.c +++ /dev/null @@ -1,427 +0,0 @@ -/* src.c -- Implementation File - Copyright (C) 1995, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - - Description: - Source-file functions to handle various combinations of case sensitivity - and insensitivity at run time. - - Modifications: -*/ - -#include "proj.h" -#include "src.h" -#include "top.h" - -/* This array is set up so that, given a source-mapped character, the result - of indexing into this array will match an upper-cased character depending - on the source-mapped character's case and the established ffe_case_match() - setting. So the uppercase cells contain identies (e.g. ['A'] == 'A') - as long as uppercase matching is permitted (!FFE_caseLOWER) and the - lowercase cells contain uppercased identities (e.g. ['a'] == 'A') as long - as lowercase matching is permitted (!FFE_caseUPPER). Else the case - cells contain -1. _init_ is for the first character of a keyword, - and _noninit_ is for other characters. */ - -char ffesrc_char_match_init_[256]; -char ffesrc_char_match_noninit_[256]; - -/* This array is used to map input source according to the established - ffe_case_source() setting: for FFE_caseNONE, the array is all - identities; for FFE_caseUPPER, the lowercase cells contain - uppercased identities; and vice versa for FFE_caseLOWER. */ - -char ffesrc_char_source_[256]; - -/* This array is used to map an internally generated character so that it - will be accepted as an initial character in a keyword. The assumption - is that the incoming character is uppercase. */ - -char ffesrc_char_internal_init_[256]; - -/* This array is used to determine if a particular character is valid in - a symbol name according to the established ffe_case_symbol() setting: - for FFE_caseNONE, the array is all FFEBAD; for FFE_caseUPPER, the - lowercase cells contain a non-FFEBAD error code (FFEBAD_SYMBOL_UPPER_CASE); - and vice versa for FFE_caseLOWER. _init_ and _noninit_ distinguish - between initial and subsequent characters for the caseINITCAP case, - and their error codes are different for appropriate messages -- - specifically, _noninit_ contains a non-FFEBAD error code for all - except lowercase characters for the caseINITCAP case. - - See ffesrc_check_symbol_, it must be TRUE if this array is not all - FFEBAD. */ - -ffebad ffesrc_bad_symbol_init_[256]; -ffebad ffesrc_bad_symbol_noninit_[256]; - -/* Set TRUE if any element in ffesrc_bad_symbol (with an index representing - a character that can also be in the text of a token passed to - ffename_find, strictly speaking) is not FFEBAD. I.e., TRUE if it is - necessary to check token characters against the ffesrc_bad_symbol_ - array. */ - -bool ffesrc_check_symbol_; - -/* These are set TRUE if the kind of character (upper/lower) is ok as a match - in the context (initial/noninitial character of keyword). */ - -bool ffesrc_ok_match_init_upper_; -bool ffesrc_ok_match_init_lower_; -bool ffesrc_ok_match_noninit_upper_; -bool ffesrc_ok_match_noninit_lower_; - -/* Initialize table of alphabetic matches. */ - -void -ffesrc_init_1 (void) -{ - int i; - - for (i = 0; i < 256; ++i) - { - ffesrc_char_match_init_[i] = i; - ffesrc_char_match_noninit_[i] = i; - ffesrc_char_source_[i] = i; - ffesrc_char_internal_init_[i] = i; - ffesrc_bad_symbol_init_[i] = FFEBAD; - ffesrc_bad_symbol_noninit_[i] = FFEBAD; - } - - ffesrc_check_symbol_ = (ffe_case_symbol () != FFE_caseNONE); - - ffesrc_ok_match_init_upper_ = (ffe_case_match () != FFE_caseLOWER); - ffesrc_ok_match_init_lower_ = (ffe_case_match () != FFE_caseUPPER) - && (ffe_case_match () != FFE_caseINITCAP); - ffesrc_ok_match_noninit_upper_ = (ffe_case_match () != FFE_caseLOWER) - && (ffe_case_match () != FFE_caseINITCAP); - ffesrc_ok_match_noninit_lower_ = (ffe_case_match () != FFE_caseUPPER); - - /* Note that '-' is used to flag an invalid match character. '-' is - somewhat arbitrary, actually. -1 was used, but that's not wise on a - system with unsigned chars as default -- it'd turn into 255 or some such - large positive number, which would sort higher than the alphabetics and - thus possibly cause problems. So '-' is picked just because it's never - likely to be a symbol character in Fortran and because it's "less than" - any alphabetic character. EBCDIC might see things differently, I don't - remember it well enough, but that's just tough -- lots of other things - might have to change to support EBCDIC -- anyway, some other character - could easily be picked. */ - -#define FFESRC_INVALID_SYMBOL_CHAR_ '-' - - if (!ffesrc_ok_match_init_upper_) - for (i = 'A'; i <= 'Z'; ++i) - ffesrc_char_match_init_[i] = FFESRC_INVALID_SYMBOL_CHAR_; - - if (ffesrc_ok_match_init_lower_) - for (i = 'a'; i <= 'z'; ++i) - ffesrc_char_match_init_[i] = TOUPPER (i); - else - for (i = 'a'; i <= 'z'; ++i) - ffesrc_char_match_init_[i] = FFESRC_INVALID_SYMBOL_CHAR_; - - if (!ffesrc_ok_match_noninit_upper_) - for (i = 'A'; i <= 'Z'; ++i) - ffesrc_char_match_noninit_[i] = FFESRC_INVALID_SYMBOL_CHAR_; - - if (ffesrc_ok_match_noninit_lower_) - for (i = 'a'; i <= 'z'; ++i) - ffesrc_char_match_noninit_[i] = TOUPPER (i); - else - for (i = 'a'; i <= 'z'; ++i) - ffesrc_char_match_noninit_[i] = FFESRC_INVALID_SYMBOL_CHAR_; - - if (ffe_case_source () == FFE_caseLOWER) - for (i = 'A'; i <= 'Z'; ++i) - ffesrc_char_source_[i] = TOLOWER (i); - else if (ffe_case_source () == FFE_caseUPPER) - for (i = 'a'; i <= 'z'; ++i) - ffesrc_char_source_[i] = TOUPPER (i); - - if (ffe_case_match () == FFE_caseLOWER) - for (i = 'A'; i <= 'Z'; ++i) - ffesrc_char_internal_init_[i] = TOLOWER (i); - - switch (ffe_case_symbol ()) - { - case FFE_caseLOWER: - for (i = 'A'; i <= 'Z'; ++i) - { - ffesrc_bad_symbol_init_[i] = FFEBAD_SYMBOL_UPPER_CASE; - ffesrc_bad_symbol_noninit_[i] = FFEBAD_SYMBOL_UPPER_CASE; - } - break; - - case FFE_caseUPPER: - for (i = 'a'; i <= 'z'; ++i) - { - ffesrc_bad_symbol_init_[i] = FFEBAD_SYMBOL_LOWER_CASE; - ffesrc_bad_symbol_noninit_[i] = FFEBAD_SYMBOL_LOWER_CASE; - } - break; - - case FFE_caseINITCAP: - for (i = 0; i < 256; ++i) - ffesrc_bad_symbol_noninit_[i] = FFEBAD_SYMBOL_NOLOWER_INITCAP; - for (i = 'a'; i <= 'z'; ++i) - { - ffesrc_bad_symbol_init_[i] = FFEBAD_SYMBOL_LOWER_INITCAP; - ffesrc_bad_symbol_noninit_[i] = FFEBAD; - } - break; - - default: - break; - } -} - -/* Compare two strings a la strcmp, the first being a source string with its - length passed, and the second being a constant string passed - in InitialCaps form. Also, the return value is always -1, 0, or 1. */ - -int -ffesrc_strcmp_1ns2i (ffeCase mcase, const char *var, int len, - const char *str_ic) -{ - char c; - char d; - - switch (mcase) - { - case FFE_caseNONE: - for (; len > 0; --len, ++var, ++str_ic) - { - c = ffesrc_char_source (*var); /* Transform source. */ - c = TOUPPER (c); /* Upcase source. */ - d = TOUPPER (*str_ic); /* Upcase InitialCaps char. */ - if (c != d) - { - if ((d != '\0') && (c < d)) - return -1; - else - return 1; - } - } - break; - - case FFE_caseUPPER: - for (; len > 0; --len, ++var, ++str_ic) - { - c = ffesrc_char_source (*var); /* Transform source. */ - d = TOUPPER (*str_ic); /* Transform InitialCaps char. */ - if (c != d) - { - if ((d != '\0') && (c < d)) - return -1; - else - return 1; - } - } - break; - - case FFE_caseLOWER: - for (; len > 0; --len, ++var, ++str_ic) - { - c = ffesrc_char_source (*var); /* Transform source. */ - d = TOLOWER (*str_ic); /* Transform InitialCaps char. */ - if (c != d) - { - if ((d != '\0') && (c < d)) - return -1; - else - return 1; - } - } - break; - - case FFE_caseINITCAP: - for (; len > 0; --len, ++var, ++str_ic) - { - c = ffesrc_char_source (*var); /* Transform source. */ - d = *str_ic; /* No transform of InitialCaps char. */ - if (c != d) - { - c = TOUPPER (c); - d = TOUPPER (d); - while ((len > 0) && (c == d)) - { /* Skip past equivalent (case-ins) chars. */ - --len, ++var, ++str_ic; - if (len > 0) - c = TOUPPER (*var); - d = TOUPPER (*str_ic); - } - if ((d != '\0') && (c < d)) - return -1; - else - return 1; - } - } - break; - - default: - assert ("bad case value" == NULL); - return -1; - } - - if (*str_ic == '\0') - return 0; - return -1; -} - -/* Compare two strings a la strcmp, the second being a constant string passed - in both uppercase and lowercase form. If not equal, the uppercase string - is used to determine the sign of the return value. Also, the return - value is always -1, 0, or 1. */ - -int -ffesrc_strcmp_2c (ffeCase mcase, const char *var, const char *str_uc, - const char *str_lc, const char *str_ic) -{ - int i; - char c; - - switch (mcase) - { - case FFE_caseNONE: - for (; *var != '\0'; ++var, ++str_uc) - { - c = TOUPPER (*var); /* Upcase source. */ - if (c != *str_uc) - { - if ((*str_uc != '\0') && (c < *str_uc)) - return -1; - else - return 1; - } - } - if (*str_uc == '\0') - return 0; - return -1; - - case FFE_caseUPPER: - i = strcmp (var, str_uc); - break; - - case FFE_caseLOWER: - i = strcmp (var, str_lc); - break; - - case FFE_caseINITCAP: - for (; *var != '\0'; ++var, ++str_ic, ++str_uc) - { - if (*var != *str_ic) - { - c = TOUPPER (*var); - while ((c != '\0') && (c == *str_uc)) - { /* Skip past equivalent (case-ins) chars. */ - ++var, ++str_uc; - c = TOUPPER (*var); - } - if ((*str_uc != '\0') && (c < *str_uc)) - return -1; - else - return 1; - } - } - if (*str_ic == '\0') - return 0; - return -1; - - default: - assert ("bad case value" == NULL); - return -1; - } - - if (i == 0) - return 0; - else if (i < 0) - return -1; - return 1; -} - -/* Compare two strings a la strncmp, the second being a constant string passed - in uppercase, lowercase, and InitialCaps form. If not equal, the - uppercase string is used to determine the sign of the return value. */ - -int -ffesrc_strncmp_2c (ffeCase mcase, const char *var, const char *str_uc, - const char *str_lc, const char *str_ic, int len) -{ - int i; - char c; - - switch (mcase) - { - case FFE_caseNONE: - for (; len > 0; ++var, ++str_uc, --len) - { - c = TOUPPER (*var); /* Upcase source. */ - if (c != *str_uc) - { - if (c < *str_uc) - return -1; - else - return 1; - } - } - return 0; - - case FFE_caseUPPER: - i = strncmp (var, str_uc, len); - break; - - case FFE_caseLOWER: - i = strncmp (var, str_lc, len); - break; - - case FFE_caseINITCAP: - for (; len > 0; ++var, ++str_ic, ++str_uc, --len) - { - if (*var != *str_ic) - { - c = TOUPPER (*var); - while ((len > 0) && (c == *str_uc)) - { /* Skip past equivalent (case-ins) chars. */ - --len, ++var, ++str_uc; - if (len > 0) - c = TOUPPER (*var); - } - if ((len > 0) && (c < *str_uc)) - return -1; - else - return 1; - } - } - return 0; - - default: - assert ("bad case value" == NULL); - return -1; - } - - if (i == 0) - return 0; - else if (i < 0) - return -1; - return 1; -} diff --git a/contrib/gcc/f/src.h b/contrib/gcc/f/src.h deleted file mode 100644 index ce5843e..0000000 --- a/contrib/gcc/f/src.h +++ /dev/null @@ -1,140 +0,0 @@ -/* src.h -- Public #include File - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - src.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_SRC_H -#define GCC_F_SRC_H - -#include "bad.h" -#include "top.h" - -extern char ffesrc_char_match_init_[256]; -extern char ffesrc_char_match_noninit_[256]; -extern char ffesrc_char_source_[256]; -extern char ffesrc_char_internal_init_[256]; -extern ffebad ffesrc_bad_symbol_init_[256]; -extern ffebad ffesrc_bad_symbol_noninit_[256]; -extern bool ffesrc_check_symbol_; -extern bool ffesrc_ok_match_init_upper_; -extern bool ffesrc_ok_match_init_lower_; -extern bool ffesrc_ok_match_noninit_upper_; -extern bool ffesrc_ok_match_noninit_lower_; - -/* These C-language-syntax modifiers could avoid the match arg if gcc's - extension allowing macros to generate dynamic labels was used. They - could use the no_match arg (and the "caller's" label defs) if there - was a way to say "goto default" in a switch statement. Oh well. - - NOTE: These macro assume "case FFESRC_CASE_MATCH_[NON]INIT(...):" is used - to invoke them, and thus assume the "above" case does not fall through to - this one. This syntax was chosen to keep indenting tools working. */ - -#define FFESRC_CASE_MATCH_INIT(upper, lower, match, no_match) \ - upper: if (!ffesrc_ok_match_init_upper_) goto no_match; \ - else goto match; \ - case lower: if (!ffesrc_ok_match_init_lower_) goto no_match; \ - match - -#define FFESRC_CASE_MATCH_NONINIT(upper, lower, match, no_match) \ - upper: if (!ffesrc_ok_match_noninit_upper_) goto no_match; \ - else goto match; \ - case lower: if (!ffesrc_ok_match_noninit_lower_) goto no_match; \ - match - -/* If character is ok in a symbol name (not including intrinsic names), - returns FFEBAD, else returns something else, type ffebad. */ - -#define ffesrc_bad_char_symbol_init(c) \ - (ffesrc_bad_symbol_init_[(unsigned int) (c)]) -#define ffesrc_bad_char_symbol_noninit(c) \ - (ffesrc_bad_symbol_noninit_[(unsigned int) (c)]) - -/* Returns TRUE if character is ok in a symbol name (including - intrinsic names). Doesn't care about case settings, this is - used just for parsing (before semantic complaints about symbol- - name casing and such). One specific usage is to decide whether - an underscore is valid as the first or subsequent character in - some symbol name -- if not, an underscore is a separate token - (while lexing, for example). Note that ffesrc_is_name_init - must return TRUE for a (not necessarily proper) subset of - characters for which ffelex_is_firstnamechar returns TRUE. */ - -#define ffesrc_is_name_init(c) \ - ((ISALPHA ((c))) || (! (1 || ffe_is_90 ()) && ((c) == '_'))) -#define ffesrc_is_name_noninit(c) \ - ((ISALNUM ((c))) || (! (1 || ffe_is_90 ()) && ((c) == '_'))) - -/* Test if source-translated character matches given alphabetic character - (passed in both uppercase and lowercase, to allow for custom speedup - of compilation in environments where compile-time options aren't needed - for casing). */ - -#define ffesrc_char_match_init(c, up, low) \ - (ffesrc_char_match_init_[(unsigned int) (c)] == up) - -#define ffesrc_char_match_noninit(c, up, low) \ - (ffesrc_char_match_noninit_[(unsigned int) (c)] == up) - -/* Translate character from input-file form to source form. */ - -#define ffesrc_char_source(c) (ffesrc_char_source_[(unsigned int) (c)]) - -/* Translate internal character (upper/lower) to source form in an - initial-character context (i.e. ffesrc_char_match_init of the result - will always succeed). */ - -#define ffesrc_char_internal_init(up, low) \ - (ffesrc_char_internal_init_[(unsigned int) (up)]) - -/* Returns TRUE if a name representing a symbol should be checked for - validity according to compile-time options. That is, if it is possible - that ffesrc_bad_char_symbol(c) can return something other than FFEBAD - for any valid character in an ffelex NAME(S) token. */ - -#define ffesrc_check_symbol() ffesrc_check_symbol_ - -#define ffesrc_init_0() -void ffesrc_init_1 (void); -#define ffesrc_init_2() -#define ffesrc_init_3() -#define ffesrc_init_4() -int ffesrc_strcmp_1ns2i (ffeCase mcase, const char *var, int len, - const char *str_ic); -int ffesrc_strcmp_2c (ffeCase mcase, const char *var, const char *str_uc, - const char *str_lc, const char *str_ic); -int ffesrc_strncmp_2c (ffeCase mcase, const char *var, const char *str_uc, - const char *str_lc, const char *str_ic, int len); -#define ffesrc_terminate_0() -#define ffesrc_terminate_1() -#define ffesrc_terminate_2() -#define ffesrc_terminate_3() -#define ffesrc_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_SRC_H */ diff --git a/contrib/gcc/f/st.c b/contrib/gcc/f/st.c deleted file mode 100644 index cdfdfb5..0000000 --- a/contrib/gcc/f/st.c +++ /dev/null @@ -1,554 +0,0 @@ -/* st.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - The high-level input level to statement handling for the rest of the - FFE. ffest_first is the first state for the lexer to invoke to start - a statement. A statement normally starts with a NUMBER token (to indicate - a label def) followed by a NAME token (to indicate what kind of statement - it is), though of course the NUMBER token may be omitted. ffest_first - gathers the first NAME token and returns a state of ffest_second_, - where the trailing underscore means "internal to ffest" and thus outside - users should not depend on this. ffest_second_ then looks at the second - token in conjunction with the first, decides what possible statements are - meant, and tries each possible statement in turn, from most likely to - least likely. A successful attempt currently is recorded, and further - successful attempts by other possibilities raise an assertion error in - ffest_confirmed (this is to detect ambiguities). A failure in an - attempt is signaled by calling ffest_ffebad_start; this results in the - next token sent by ffest_save_ (the intermediary when more than one - possible statement exists) being EOS to shut down processing and the next - possibility tried. - - When all possibilities have been tried, the successful one is retried with - inhibition turned off (FALSE) as reported by ffest_is_inhibited(). If - there is no successful one, the first one is retried so the user gets to - see the error messages. - - In the future, after syntactic bugs have been reasonably shaken out and - ambiguities thus detected, the first successful possibility will be - enabled (inhibited goes FALSE) as soon as it confirms success by calling - ffest_confirmed, thus retrying the possibility will not be necessary. - - The only complication in all this is that expression handling is - happening while possibilities are inhibited. It is up to the expression - handler, conceptually, to not make any changes to its knowledge base for - variable names and so on when inhibited that cannot be undone if - the current possibility fails (shuts down via ffest_ffebad_start). In - fact, this business is handled not be ffeexpr, but by lower levels. - - ffesta functions serve only to provide information used in syntactic - processing of possible statements, and thus may not make changes to the - knowledge base for variables and such. - - ffestb functions perform the syntactic analysis for possible statements, - and thus again may not make changes to the knowledge base except under the - auspices of ffeexpr and its subordinates, changes which can be undone when - necessary. - - ffestc functions perform the semantic analysis for the chosen statement, - and thus may change the knowledge base as necessary since they are invoked - by ffestb functions only after a given statement is confirmed and - enabled. Note, however, that a few ffestc functions (identified by - their statement names rather than grammar numbers) indicate valid forms - that are, outside of any context, ambiguous, such as ELSE WHERE and - PRIVATE; these functions should make a quick decision as to what is - intended and dispatch to the appropriate specific ffestc function. - - ffestd functions actually implement statements. When called, the - statement is considered valid and is either an executable statement or - a nonexecutable statement with direct-output results. For example, CALL, - GOTO, and assignment statements pass through ffestd because they are - executable; DATA statements pass through because they map directly to the - output file (or at least might so map); ENTRY statements also pass through - because they essentially affect code generation in an immediate way; - whereas INTEGER, SAVE, and SUBROUTINE statements do not go through - ffestd functions because they merely update the knowledge base. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "st.h" -#include "bad.h" -#include "lex.h" -#include "sta.h" -#include "stb.h" -#include "stc.h" -#include "std.h" -#include "ste.h" -#include "stp.h" -#include "str.h" -#include "sts.h" -#include "stt.h" -#include "stu.h" -#include "stv.h" -#include "stw.h" - -/* Externals defined here. */ - - -/* Simple definitions and enumerations. */ - - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - - -/* Static functions (internal). */ - - -/* Internal macros. */ - - -/* ffest_confirmed -- Confirm current possibility as only one - - ffest_confirmed(); - - Sets the confirmation flag. During debugging for ambiguous constructs, - asserts that the confirmation flag for a previous possibility has not - yet been set. */ - -void -ffest_confirmed (void) -{ - ffesta_confirmed (); -} - -/* ffest_eof -- End of (non-INCLUDEd) source file - - ffest_eof(); - - Call after piping tokens through ffest_first, where the most recent - token sent through must be EOS. - - 20-Feb-91 JCB 1.1 - Put new EOF token in ffesta_tokens[0], not NULL, because too much - code expects something there for error reporting and the like. Also, - do basically the same things ffest_second and ffesta_zero do for - processing a statement (make and destroy pools, et cetera). */ - -void -ffest_eof (void) -{ - ffesta_eof (); -} - -/* ffest_ffebad_here_current_stmt -- ffebad_here with ptr to current stmt - - ffest_ffebad_here_current_stmt(0); - - Outsiders can call this fn if they have no more convenient place to - point to (via a token or pair of ffewhere objects) and they know a - current, useful statement is being evaluted by ffest (i.e. they are - being called from ffestb, ffestc, ffestd, ... functions). */ - -void -ffest_ffebad_here_current_stmt (ffebadIndex i) -{ - ffesta_ffebad_here_current_stmt (i); -} - -/* ffest_ffebad_here_doiter -- Calls ffebad_here with ptr to DO iter var - - ffesymbol s; - // call ffebad_start first, of course. - ffest_ffebad_here_doiter(0,s); - // call ffebad_finish afterwards, naturally. - - Searches the stack of blocks backwards for a DO loop that has s - as its iteration variable, then calls ffebad_here with pointers to - that particular reference to the variable. Crashes if the DO loop - can't be found. */ - -void -ffest_ffebad_here_doiter (ffebadIndex i, ffesymbol s) -{ - ffestc_ffebad_here_doiter (i, s); -} - -/* ffest_ffebad_start -- Start a possibly inhibited error report - - if (ffest_ffebad_start(FFEBAD_SOME_ERROR)) - { - ffebad_here, ffebad_string ...; - ffebad_finish(); - } - - Call if the error might indicate that ffest is evaluating the wrong - statement form, instead of calling ffebad_start directly. If ffest - is choosing between forms, it will return FALSE, send an EOS/SEMICOLON - token through as the next token (if the current one isn't already one - of those), and try another possible form. Otherwise, ffebad_start is - called with the argument and TRUE returned. */ - -bool -ffest_ffebad_start (ffebad errnum) -{ - return ffesta_ffebad_start (errnum); -} - -/* ffest_first -- Parse the first token in a statement - - return ffest_first; // to lexer. */ - -ffelexHandler -ffest_first (ffelexToken t) -{ - return ffesta_first (t); -} - -/* ffest_init_0 -- Initialize for entire image invocation - - ffest_init_0(); - - Call just once per invocation of the compiler (not once per invocation - of the front end). - - Gets memory for the list of possibles once and for all, since this - list never gets larger than a certain size (FFEST_maxPOSSIBLES_) - and is not particularly large. Initializes the array of pointers to - this list. Initializes the executable and nonexecutable lists. */ - -void -ffest_init_0 (void) -{ - ffesta_init_0 (); - ffestb_init_0 (); - ffestc_init_0 (); - ffestd_init_0 (); - ffeste_init_0 (); - ffestp_init_0 (); - ffestr_init_0 (); - ffests_init_0 (); - ffestt_init_0 (); - ffestu_init_0 (); - ffestv_init_0 (); - ffestw_init_0 (); -} - -/* ffest_init_1 -- Initialize for entire image invocation - - ffest_init_1(); - - Call just once per invocation of the compiler (not once per invocation - of the front end). - - Gets memory for the list of possibles once and for all, since this - list never gets larger than a certain size (FFEST_maxPOSSIBLES_) - and is not particularly large. Initializes the array of pointers to - this list. Initializes the executable and nonexecutable lists. */ - -void -ffest_init_1 (void) -{ - ffesta_init_1 (); - ffestb_init_1 (); - ffestc_init_1 (); - ffestd_init_1 (); - ffeste_init_1 (); - ffestp_init_1 (); - ffestr_init_1 (); - ffests_init_1 (); - ffestt_init_1 (); - ffestu_init_1 (); - ffestv_init_1 (); - ffestw_init_1 (); -} - -/* ffest_init_2 -- Initialize for entire image invocation - - ffest_init_2(); - - Call just once per invocation of the compiler (not once per invocation - of the front end). - - Gets memory for the list of possibles once and for all, since this - list never gets larger than a certain size (FFEST_maxPOSSIBLES_) - and is not particularly large. Initializes the array of pointers to - this list. Initializes the executable and nonexecutable lists. */ - -void -ffest_init_2 (void) -{ - ffesta_init_2 (); - ffestb_init_2 (); - ffestc_init_2 (); - ffestd_init_2 (); - ffeste_init_2 (); - ffestp_init_2 (); - ffestr_init_2 (); - ffests_init_2 (); - ffestt_init_2 (); - ffestu_init_2 (); - ffestv_init_2 (); - ffestw_init_2 (); -} - -/* ffest_init_3 -- Initialize for any program unit - - ffest_init_3(); */ - -void -ffest_init_3 (void) -{ - ffesta_init_3 (); - ffestb_init_3 (); - ffestc_init_3 (); - ffestd_init_3 (); - ffeste_init_3 (); - ffestp_init_3 (); - ffestr_init_3 (); - ffests_init_3 (); - ffestt_init_3 (); - ffestu_init_3 (); - ffestv_init_3 (); - ffestw_init_3 (); - - ffestw_display_state (); -} - -/* ffest_init_4 -- Initialize for statement functions - - ffest_init_4(); */ - -void -ffest_init_4 (void) -{ - ffesta_init_4 (); - ffestb_init_4 (); - ffestc_init_4 (); - ffestd_init_4 (); - ffeste_init_4 (); - ffestp_init_4 (); - ffestr_init_4 (); - ffests_init_4 (); - ffestt_init_4 (); - ffestu_init_4 (); - ffestv_init_4 (); - ffestw_init_4 (); -} - -/* Test whether ENTRY statement is valid. - - Returns TRUE if current program unit is known to be FUNCTION or SUBROUTINE. - Else returns FALSE. */ - -bool -ffest_is_entry_valid (void) -{ - return ffesta_is_entry_valid; -} - -/* ffest_is_inhibited -- Test whether the current possibility is inhibited - - if (!ffest_is_inhibited()) - // implement the statement. - - Just make sure the current possibility has been confirmed. If anyone - really needs to test whether the current possibility is inhibited prior - to confirming it, that indicates a need to begin statement processing - before it is certain that the given possibility is indeed the statement - to be processed. As of this writing, there does not appear to be such - a need. If there is, then when confirming a statement would normally - immediately disable the inhibition (whereas currently we leave the - confirmed statement disabled until we've tried the other possibilities, - to check for ambiguities), we must check to see if the possibility has - already tested for inhibition prior to confirmation and, if so, maintain - inhibition until the end of the statement (which may be forced right - away) and then rerun the entire statement from the beginning. Otherwise, - initial calls to ffestb functions won't have been made, but subsequent - calls (after confirmation) will, which is wrong. Of course, this all - applies only to those statements implemented via multiple calls to - ffestb, although if a statement requiring only a single ffestb call - tested for inhibition prior to confirmation, it would likely mean that - the ffestb call would be completely dropped without this mechanism. */ - -bool -ffest_is_inhibited (void) -{ - return ffesta_is_inhibited (); -} - -/* ffest_seen_first_exec -- Test whether first executable stmt has been seen - - if (ffest_seen_first_exec()) - // No more spec stmts can be seen. - - In a case where, say, the first statement is PARAMETER(A)=B, FALSE - will be returned while the PARAMETER statement is being run, and TRUE - will be returned if it doesn't confirm and the assignment statement - is being run. */ - -bool -ffest_seen_first_exec (void) -{ - return ffesta_seen_first_exec; -} - -/* Shut down current parsing possibility, but without bothering the - user with a diagnostic if we're not inhibited. */ - -void -ffest_shutdown (void) -{ - ffesta_shutdown (); -} - -/* ffest_sym_end_transition -- Update symbol info just before end of unit - - ffesymbol s; - ffest_sym_end_transition(s); */ - -ffesymbol -ffest_sym_end_transition (ffesymbol s) -{ - return ffestu_sym_end_transition (s); -} - -/* ffest_sym_exec_transition -- Update symbol just before first exec stmt - - ffesymbol s; - ffest_sym_exec_transition(s); */ - -ffesymbol -ffest_sym_exec_transition (ffesymbol s) -{ - return ffestu_sym_exec_transition (s); -} - -/* ffest_terminate_0 -- Terminate for entire image invocation - - ffest_terminate_0(); */ - -void -ffest_terminate_0 (void) -{ - ffesta_terminate_0 (); - ffestb_terminate_0 (); - ffestc_terminate_0 (); - ffestd_terminate_0 (); - ffeste_terminate_0 (); - ffestp_terminate_0 (); - ffestr_terminate_0 (); - ffests_terminate_0 (); - ffestt_terminate_0 (); - ffestu_terminate_0 (); - ffestv_terminate_0 (); - ffestw_terminate_0 (); -} - -/* ffest_terminate_1 -- Terminate for source file - - ffest_terminate_1(); */ - -void -ffest_terminate_1 (void) -{ - ffesta_terminate_1 (); - ffestb_terminate_1 (); - ffestc_terminate_1 (); - ffestd_terminate_1 (); - ffeste_terminate_1 (); - ffestp_terminate_1 (); - ffestr_terminate_1 (); - ffests_terminate_1 (); - ffestt_terminate_1 (); - ffestu_terminate_1 (); - ffestv_terminate_1 (); - ffestw_terminate_1 (); -} - -/* ffest_terminate_2 -- Terminate for outer program unit - - ffest_terminate_2(); */ - -void -ffest_terminate_2 (void) -{ - ffesta_terminate_2 (); - ffestb_terminate_2 (); - ffestc_terminate_2 (); - ffestd_terminate_2 (); - ffeste_terminate_2 (); - ffestp_terminate_2 (); - ffestr_terminate_2 (); - ffests_terminate_2 (); - ffestt_terminate_2 (); - ffestu_terminate_2 (); - ffestv_terminate_2 (); - ffestw_terminate_2 (); -} - -/* ffest_terminate_3 -- Terminate for any program unit - - ffest_terminate_3(); */ - -void -ffest_terminate_3 (void) -{ - ffesta_terminate_3 (); - ffestb_terminate_3 (); - ffestc_terminate_3 (); - ffestd_terminate_3 (); - ffeste_terminate_3 (); - ffestp_terminate_3 (); - ffestr_terminate_3 (); - ffests_terminate_3 (); - ffestt_terminate_3 (); - ffestu_terminate_3 (); - ffestv_terminate_3 (); - ffestw_terminate_3 (); -} - -/* ffest_terminate_4 -- Terminate for statement functions - - ffest_terminate_4(); */ - -void -ffest_terminate_4 (void) -{ - ffesta_terminate_4 (); - ffestb_terminate_4 (); - ffestc_terminate_4 (); - ffestd_terminate_4 (); - ffeste_terminate_4 (); - ffestp_terminate_4 (); - ffestr_terminate_4 (); - ffests_terminate_4 (); - ffestt_terminate_4 (); - ffestu_terminate_4 (); - ffestv_terminate_4 (); - ffestw_terminate_4 (); -} diff --git a/contrib/gcc/f/st.h b/contrib/gcc/f/st.h deleted file mode 100644 index 65b99f9..0000000 --- a/contrib/gcc/f/st.h +++ /dev/null @@ -1,81 +0,0 @@ -/* st.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - st.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_ST_H -#define GCC_F_ST_H - -/* Simple definitions and enumerations. */ - - -/* Typedefs. */ - - -/* Include files needed by this one. */ - -#include "bad.h" -#include "lex.h" -#include "symbol.h" - -/* Structure definitions. */ - - -/* Global objects accessed by users of this module. */ - - -/* Declare functions with prototypes. */ - -void ffest_confirmed (void); -void ffest_eof (void); -bool ffest_ffebad_start (ffebad errnum); -void ffest_ffebad_here_current_stmt (ffebadIndex i); -void ffest_ffebad_here_doiter (ffebadIndex i, ffesymbol s); -ffelexHandler ffest_first (ffelexToken t); -void ffest_init_0 (void); -void ffest_init_1 (void); -void ffest_init_2 (void); -void ffest_init_3 (void); -void ffest_init_4 (void); -bool ffest_is_entry_valid (void); -bool ffest_is_inhibited (void); -bool ffest_seen_first_exec (void); -void ffest_shutdown (void); -ffesymbol ffest_sym_end_transition (ffesymbol s); -ffesymbol ffest_sym_exec_transition (ffesymbol s); -void ffest_terminate_0 (void); -void ffest_terminate_1 (void); -void ffest_terminate_2 (void); -void ffest_terminate_3 (void); -void ffest_terminate_4 (void); - -/* Define macros. */ - - -/* End of #include file. */ - -#endif /* ! GCC_F_ST_H */ diff --git a/contrib/gcc/f/sta.c b/contrib/gcc/f/sta.c deleted file mode 100644 index ee75fa8..0000000 --- a/contrib/gcc/f/sta.c +++ /dev/null @@ -1,1722 +0,0 @@ -/* sta.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - None - - Description: - Analyzes the first two tokens, figures out what statements are - possible, tries parsing the possible statements by calling on - the ffestb functions. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "sta.h" -#include "bad.h" -#include "implic.h" -#include "lex.h" -#include "malloc.h" -#include "stb.h" -#include "stc.h" -#include "std.h" -#include "str.h" -#include "storag.h" -#include "symbol.h" - -/* Externals defined here. */ - -ffelexToken ffesta_tokens[FFESTA_tokensMAX]; /* For use by a possible. */ -ffestrFirst ffesta_first_kw; /* First NAME(S) looked up. */ -ffestrSecond ffesta_second_kw; /* Second NAME(S) looked up. */ -mallocPool ffesta_output_pool; /* Pool for results of stmt handling. */ -mallocPool ffesta_scratch_pool; /* Pool for stmt scratch handling. */ -ffelexToken ffesta_construct_name; -ffelexToken ffesta_label_token; /* Pending label stuff. */ -bool ffesta_seen_first_exec; -bool ffesta_is_entry_valid = FALSE; /* TRUE only in SUBROUTINE/FUNCTION. */ -bool ffesta_line_has_semicolons = FALSE; - -/* Simple definitions and enumerations. */ - -#define FFESTA_ABORT_ON_CONFIRM_ 1 /* 0=slow, tested way; 1=faster way - that might not always work. Here's - the old description of what used - to not work with ==1: (try - "CONTINUE\10 - FORMAT('hi',I11)\END"). Problem - is that the "topology" of the - confirmed stmt's tokens with - regard to CHARACTER, HOLLERITH, - NAME/NAMES/NUMBER tokens (like hex - numbers), isn't traced if we abort - early, then other stmts might get - their grubby hands on those - unprocessed tokens and commit them - improperly. Ideal fix is to rerun - the confirmed stmt and forget the - rest. */ - -#define FFESTA_maxPOSSIBLES_ 8/* Never more than this # of possibles. */ - -/* Internal typedefs. */ - -typedef struct _ffesta_possible_ *ffestaPossible_; - -/* Private include files. */ - - -/* Internal structure definitions. */ - -struct _ffesta_possible_ - { - ffestaPossible_ next; - ffestaPossible_ previous; - ffelexHandler handler; - bool named; - }; - -struct _ffesta_possible_root_ - { - ffestaPossible_ first; - ffestaPossible_ last; - ffelexHandler nil; - }; - -/* Static objects accessed by functions in this module. */ - -static bool ffesta_is_inhibited_ = FALSE; -static ffelexToken ffesta_token_0_; /* For use by ffest possibility - handling. */ -static ffestaPossible_ ffesta_possibles_[FFESTA_maxPOSSIBLES_]; -static int ffesta_num_possibles_ = 0; /* Number of possibilities. */ -static struct _ffesta_possible_root_ ffesta_possible_nonexecs_; -static struct _ffesta_possible_root_ ffesta_possible_execs_; -static ffestaPossible_ ffesta_current_possible_; -static ffelexHandler ffesta_current_handler_; -static bool ffesta_confirmed_current_ = FALSE; -static bool ffesta_confirmed_other_ = FALSE; -static ffestaPossible_ ffesta_confirmed_possible_; -static bool ffesta_current_shutdown_ = FALSE; -#if !FFESTA_ABORT_ON_CONFIRM_ -static bool ffesta_is_two_into_statement_ = FALSE; /* For IF, WHERE stmts. */ -static ffelexToken ffesta_twotokens_1_; /* For IF, WHERE stmts. */ -static ffelexToken ffesta_twotokens_2_; /* For IF, WHERE stmts. */ -#endif -static ffestaPooldisp ffesta_outpooldisp_; /* After statement dealt - with. */ -static bool ffesta_inhibit_confirmation_ = FALSE; - -/* Static functions (internal). */ - -static void ffesta_add_possible_ (ffelexHandler fn, bool exec, bool named); -static bool ffesta_inhibited_exec_transition_ (void); -static void ffesta_reset_possibles_ (void); -static ffelexHandler ffesta_save_ (ffelexToken t); -static ffelexHandler ffesta_second_ (ffelexToken t); -#if !FFESTA_ABORT_ON_CONFIRM_ -static ffelexHandler ffesta_send_two_ (ffelexToken t); -#endif - -/* Internal macros. */ - -#define ffesta_add_possible_exec_(fn) (ffesta_add_possible_ (fn, TRUE, TRUE)) -#define ffesta_add_possible_nonexec_(fn) (ffesta_add_possible_ (fn, FALSE, TRUE)) -#define ffesta_add_possible_unnamed_exec_(fn) (ffesta_add_possible_ (fn, TRUE, FALSE)) -#define ffesta_add_possible_unnamed_nonexec_(fn) (ffesta_add_possible_ (fn, FALSE, FALSE)) - -/* Add possible statement to appropriate list. */ - -static void -ffesta_add_possible_ (ffelexHandler fn, bool exec, bool named) -{ - ffestaPossible_ p; - - assert (ffesta_num_possibles_ < FFESTA_maxPOSSIBLES_); - - p = ffesta_possibles_[ffesta_num_possibles_++]; - - if (exec) - { - p->next = (ffestaPossible_) &ffesta_possible_execs_.first; - p->previous = ffesta_possible_execs_.last; - } - else - { - p->next = (ffestaPossible_) &ffesta_possible_nonexecs_.first; - p->previous = ffesta_possible_nonexecs_.last; - } - p->next->previous = p; - p->previous->next = p; - - p->handler = fn; - p->named = named; -} - -/* ffesta_inhibited_exec_transition_ -- Do exec transition while inhibited - - if (!ffesta_inhibited_exec_transition_()) // couldn't transition... - - Invokes ffestc_exec_transition, but first enables ffebad and ffesta and - afterwards disables them again. Then returns the result of the - invocation of ffestc_exec_transition. */ - -static bool -ffesta_inhibited_exec_transition_ (void) -{ - bool result; - - assert (ffebad_inhibit ()); - assert (ffesta_is_inhibited_); - - ffebad_set_inhibit (FALSE); - ffesta_is_inhibited_ = FALSE; - - result = ffestc_exec_transition (); - - ffebad_set_inhibit (TRUE); - ffesta_is_inhibited_ = TRUE; - - return result; -} - -/* ffesta_reset_possibles_ -- Reset (clear) lists of possible statements - - ffesta_reset_possibles_(); - - Clears the lists of executable and nonexecutable statements. */ - -static void -ffesta_reset_possibles_ (void) -{ - ffesta_num_possibles_ = 0; - - ffesta_possible_execs_.first = ffesta_possible_execs_.last - = (ffestaPossible_) &ffesta_possible_execs_.first; - ffesta_possible_nonexecs_.first = ffesta_possible_nonexecs_.last - = (ffestaPossible_) &ffesta_possible_nonexecs_.first; -} - -/* ffesta_save_ -- Save token on list, pass thru to current handler - - return ffesta_save_; // to lexer. - - Receives a token from the lexer. Saves it in the list of tokens. Calls - the current handler with the token. - - If no shutdown error occurred (via - ffest_ffebad_start), then if the token was EOS or SEMICOLON, mark the - current possible as successful and confirmed but try the next possible - anyway until ambiguities in the form handling are ironed out. */ - -static ffelexHandler -ffesta_save_ (ffelexToken t) -{ - static ffelexToken *saved_tokens = NULL; /* A variable-sized array. */ - static unsigned int num_saved_tokens = 0; /* Number currently saved. */ - static unsigned int max_saved_tokens = 0; /* Maximum to be saved. */ - unsigned int toknum; /* Index into saved_tokens array. */ - ffelexToken eos; /* EOS created on-the-fly for shutdown - purposes. */ - ffelexToken t2; /* Another temporary token (no intersect with - eos, btw). */ - - /* Save the current token. */ - - if (saved_tokens == NULL) - { - saved_tokens - = malloc_new_ksr (malloc_pool_image (), "FFEST Saved Tokens", - (max_saved_tokens = 8) * sizeof (ffelexToken)); - /* Start off with 8. */ - } - else if (num_saved_tokens >= max_saved_tokens) - { - toknum = max_saved_tokens; - max_saved_tokens <<= 1; /* Multiply by two. */ - assert (max_saved_tokens > toknum); - saved_tokens - = malloc_resize_ksr (malloc_pool_image (), saved_tokens, - max_saved_tokens * sizeof (ffelexToken), - toknum * sizeof (ffelexToken)); - } - - *(saved_tokens + num_saved_tokens++) = ffelex_token_use (t); - - /* Transmit the current token to the current handler. */ - - ffesta_current_handler_ = (ffelexHandler) (*ffesta_current_handler_) (t); - - /* See if this possible has been shut down, or confirmed in which case we - might as well shut it down anyway to save time. */ - - if ((ffesta_current_shutdown_ || (FFESTA_ABORT_ON_CONFIRM_ - && ffesta_confirmed_current_)) - && !ffelex_expecting_character ()) - { - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - - default: - eos = ffelex_token_new_eos (ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffesta_inhibit_confirmation_ = ffesta_current_shutdown_; - (*ffesta_current_handler_) (eos); - ffesta_inhibit_confirmation_ = FALSE; - ffelex_token_kill (eos); - break; - } - } - else - { - - /* If this is an EOS or SEMICOLON token, switch to next handler, else - return self as next handler for lexer. */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - - default: - return (ffelexHandler) ffesta_save_; - } - } - - next_handler: /* :::::::::::::::::::: */ - - /* Note that a shutdown also happens after seeing the first two tokens - after "IF (expr)" or "WHERE (expr)" where a statement follows, even - though there is no error. This causes the IF or WHERE form to be - implemented first before ffest_first is called for the first token in - the following statement. */ - - if (ffesta_current_shutdown_) - ffesta_current_shutdown_ = FALSE; /* Only after sending EOS! */ - else - assert (ffesta_confirmed_current_); - - if (ffesta_confirmed_current_) - { - ffesta_confirmed_current_ = FALSE; - ffesta_confirmed_other_ = TRUE; - } - - /* Pick next handler. */ - - ffesta_current_possible_ = ffesta_current_possible_->next; - ffesta_current_handler_ = ffesta_current_possible_->handler; - if (ffesta_current_handler_ == NULL) - { /* No handler in this list, try exec list if - not tried yet. */ - if (ffesta_current_possible_ - == (ffestaPossible_) &ffesta_possible_nonexecs_.first) - { - ffesta_current_possible_ = ffesta_possible_execs_.first; - ffesta_current_handler_ = ffesta_current_possible_->handler; - } - if ((ffesta_current_handler_ == NULL) - || (!ffesta_seen_first_exec - && ((ffesta_confirmed_possible_ != NULL) - || !ffesta_inhibited_exec_transition_ ()))) - /* Don't run execs if: (decoding the "if" ^^^ up here ^^^) - we - have no exec handler available, or - we haven't seen the first - executable statement yet, and - we've confirmed a nonexec - (otherwise even a nonexec would cause a transition), or - a - nonexec-to-exec transition can't be made at the statement context - level (as in an executable statement in the middle of a STRUCTURE - definition); if it can be made, ffestc_exec_transition makes the - corresponding transition at the statement state level so - specification statements are no longer accepted following an - unrecognized statement. (Note: it is valid for f_e_t_ to decide - to always return TRUE by "shrieking" away the statement state - stack until a transitionable state is reached. Or it can leave - the stack as is and return FALSE.) - - If we decide not to run execs, enter this block to rerun the - confirmed statement, if any. */ - { /* At end of both lists! Pick confirmed or - first possible. */ - ffebad_set_inhibit (FALSE); - ffesta_is_inhibited_ = FALSE; - ffesta_confirmed_other_ = FALSE; - ffesta_tokens[0] = ffesta_token_0_; - if (ffesta_confirmed_possible_ == NULL) - { /* No confirmed success, just use first - named possible, or first possible if - no named possibles. */ - ffestaPossible_ possible = ffesta_possible_nonexecs_.first; - ffestaPossible_ first = NULL; - ffestaPossible_ first_named = NULL; - ffestaPossible_ first_exec = NULL; - - for (;;) - { - if (possible->handler == NULL) - { - if (possible == (ffestaPossible_) &ffesta_possible_nonexecs_.first) - { - possible = first_exec = ffesta_possible_execs_.first; - continue; - } - else - break; - } - if (first == NULL) - first = possible; - if (possible->named - && (first_named == NULL)) - first_named = possible; - - possible = possible->next; - } - - if (first_named != NULL) - ffesta_current_possible_ = first_named; - else if (ffesta_seen_first_exec - && (first_exec != NULL)) - ffesta_current_possible_ = first_exec; - else - ffesta_current_possible_ = first; - - ffesta_current_handler_ = ffesta_current_possible_->handler; - assert (ffesta_current_handler_ != NULL); - } - else - { /* Confirmed success, use it. */ - ffesta_current_possible_ = ffesta_confirmed_possible_; - ffesta_current_handler_ = ffesta_confirmed_possible_->handler; - } - ffesta_reset_possibles_ (); - } - else - { /* Switching from [empty?] list of nonexecs - to nonempty list of execs at this point. */ - ffesta_tokens[0] = ffelex_token_use (ffesta_token_0_); - ffesymbol_set_retractable (ffesta_scratch_pool); - } - } - else - { - ffesta_tokens[0] = ffelex_token_use (ffesta_token_0_); - ffesymbol_set_retractable (ffesta_scratch_pool); - } - - /* Send saved tokens to current handler until either shut down or all - tokens sent. */ - - for (toknum = 0; toknum < num_saved_tokens; ++toknum) - { - t = *(saved_tokens + toknum); - switch (ffelex_token_type (t)) - { - case FFELEX_typeCHARACTER: - ffelex_set_expecting_hollerith (0, '\0', - ffewhere_line_unknown (), - ffewhere_column_unknown ()); - ffesta_current_handler_ - = (ffelexHandler) (*ffesta_current_handler_) (t); - break; - - case FFELEX_typeNAMES: - if (ffelex_is_names_expected ()) - ffesta_current_handler_ - = (ffelexHandler) (*ffesta_current_handler_) (t); - else - { - t2 = ffelex_token_name_from_names (t, 0, 0); - ffesta_current_handler_ - = (ffelexHandler) (*ffesta_current_handler_) (t2); - ffelex_token_kill (t2); - } - break; - - default: - ffesta_current_handler_ - = (ffelexHandler) (*ffesta_current_handler_) (t); - break; - } - - if (!ffesta_is_inhibited_) - ffelex_token_kill (t); /* Won't need this any more. */ - - /* See if this possible has been shut down. */ - - else if ((ffesta_current_shutdown_ || (FFESTA_ABORT_ON_CONFIRM_ - && ffesta_confirmed_current_)) - && !ffelex_expecting_character ()) - { - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - - default: - eos = ffelex_token_new_eos (ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffesta_inhibit_confirmation_ = ffesta_current_shutdown_; - (*ffesta_current_handler_) (eos); - ffesta_inhibit_confirmation_ = FALSE; - ffelex_token_kill (eos); - break; - } - goto next_handler; /* :::::::::::::::::::: */ - } - } - - /* Finished sending all the tokens so far. If still trying possibilities, - then if we've just sent an EOS or SEMICOLON token through, go to the - next handler. Otherwise, return self so we can gather and process more - tokens. */ - - if (ffesta_is_inhibited_) - { - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - goto next_handler; /* :::::::::::::::::::: */ - - default: -#if FFESTA_ABORT_ON_CONFIRM_ - assert (!ffesta_confirmed_other_); /* Catch ambiguities. */ -#endif - return (ffelexHandler) ffesta_save_; - } - } - - /* This was the one final possibility, uninhibited, so send the final - handler it sent. */ - - num_saved_tokens = 0; -#if !FFESTA_ABORT_ON_CONFIRM_ - if (ffesta_is_two_into_statement_) - { /* End of the line for the previous two - tokens, resurrect them. */ - ffelexHandler next; - - ffesta_is_two_into_statement_ = FALSE; - next = (ffelexHandler) ffesta_first (ffesta_twotokens_1_); - ffelex_token_kill (ffesta_twotokens_1_); - next = (ffelexHandler) (*next) (ffesta_twotokens_2_); - ffelex_token_kill (ffesta_twotokens_2_); - return (ffelexHandler) next; - } -#endif - - assert (ffesta_current_handler_ != NULL); - return (ffelexHandler) ffesta_current_handler_; -} - -/* ffesta_second_ -- Parse the token after a NAME/NAMES in a statement - - return ffesta_second_; // to lexer. - - The second token cannot be a NAMES, since the first token is a NAME or - NAMES. If the second token is a NAME, look up its name in the list of - second names for use by whoever needs it. - - Then make a list of all the possible statements this could be, based on - looking at the first two tokens. Two lists of possible statements are - created, one consisting of nonexecutable statements, the other consisting - of executable statements. - - If the total number of possibilities is one, just fire up that - possibility by calling its handler function, passing the first two - tokens through it and so on. - - Otherwise, start up a process whereby tokens are passed to the first - possibility on the list until EOS or SEMICOLON is reached or an error - is detected. But inhibit any actual reporting of errors; just record - their existence in the list. If EOS or SEMICOLON is reached with no - errors (other than non-form errors happening downstream, such as an - overflowing value for an integer or a GOTO statement identifying a label - on a FORMAT statement), then that is the only possible statement. Rerun - the statement with error-reporting turned on if any non-form errors were - generated, otherwise just use its results, then erase the list of tokens - memorized during the search process. If a form error occurs, immediately - cancel that possibility by sending EOS as the next token, remember the - error code for that possibility, and try the next possibility on the list, - first sending it the list of tokens memorized while handling the first - possibility, then continuing on as before. - - Ultimately, either the end of the list of possibilities will be reached - without any successful forms being detected, in which case we pick one - based on hueristics (usually the first possibility) and rerun it with - error reporting turned on using the list of memorized tokens so the user - sees the error, or one of the possibilities will effectively succeed. */ - -static ffelexHandler -ffesta_second_ (ffelexToken t) -{ - ffelexHandler next; - ffesymbol s; - - assert (ffelex_token_type (t) != FFELEX_typeNAMES); - - if (ffelex_token_type (t) == FFELEX_typeNAME) - ffesta_second_kw = ffestr_second (t); - - /* Here we use switch on the first keyword name and handle each possible - recognizable name by looking at the second token, and building the list - of possible names accordingly. For now, just put every possible - statement on the list for ambiguity checking. */ - - switch (ffesta_first_kw) - { - case FFESTR_firstASSIGN: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R838); - break; - - case FFESTR_firstBACKSPACE: - ffestb_args.beru.len = FFESTR_firstlBACKSPACE; - ffestb_args.beru.badname = "BACKSPACE"; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_beru); - break; - - case FFESTR_firstBLOCK: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_block); - break; - - case FFESTR_firstBLOCKDATA: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_blockdata); - break; - - case FFESTR_firstBYTE: - ffestb_args.decl.len = FFESTR_firstlBYTE; - ffestb_args.decl.type = FFESTP_typeBYTE; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); - break; - - case FFESTR_firstCALL: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R1212); - break; - - case FFESTR_firstCASE: - case FFESTR_firstCASEDEFAULT: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R810); - break; - - case FFESTR_firstCHRCTR: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_chartype); - break; - - case FFESTR_firstCLOSE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R907); - break; - - case FFESTR_firstCOMMON: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R547); - break; - - case FFESTR_firstCMPLX: - ffestb_args.decl.len = FFESTR_firstlCMPLX; - ffestb_args.decl.type = FFESTP_typeCOMPLEX; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); - break; - - case FFESTR_firstCONTINUE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R841); - break; - - case FFESTR_firstCYCLE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R834); - break; - - case FFESTR_firstDATA: - if (ffe_is_pedantic_not_90 ()) - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R528); - else - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R528); - break; - - case FFESTR_firstDIMENSION: - ffestb_args.R524.len = FFESTR_firstlDIMENSION; - ffestb_args.R524.badname = "DIMENSION"; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R524); - break; - - case FFESTR_firstDO: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_do); - break; - - case FFESTR_firstDBL: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_double); - break; - - case FFESTR_firstDBLCMPLX: - ffestb_args.decl.len = FFESTR_firstlDBLCMPLX; - ffestb_args.decl.type = FFESTP_typeDBLCMPLX; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_dbltype); - break; - - case FFESTR_firstDBLPRCSN: - ffestb_args.decl.len = FFESTR_firstlDBLPRCSN; - ffestb_args.decl.type = FFESTP_typeDBLPRCSN; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_dbltype); - break; - - case FFESTR_firstDOWHILE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_dowhile); - break; - - case FFESTR_firstELSE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_else); - break; - - case FFESTR_firstELSEIF: - ffestb_args.elsexyz.second = FFESTR_secondIF; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_elsexyz); - break; - - case FFESTR_firstEND: - if ((ffelex_token_type (ffesta_token_0_) == FFELEX_typeNAMES) - || (ffelex_token_type (t) != FFELEX_typeNAME)) - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_end); - else - { - switch (ffesta_second_kw) - { - case FFESTR_secondBLOCK: - case FFESTR_secondBLOCKDATA: - case FFESTR_secondDO: - case FFESTR_secondFILE: - case FFESTR_secondFUNCTION: - case FFESTR_secondIF: - case FFESTR_secondPROGRAM: - case FFESTR_secondSELECT: - case FFESTR_secondSUBROUTINE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_end); - break; - - default: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_end); - break; - } - } - break; - - case FFESTR_firstENDBLOCK: - ffestb_args.endxyz.len = FFESTR_firstlENDBLOCK; - ffestb_args.endxyz.second = FFESTR_secondBLOCK; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENDBLOCKDATA: - ffestb_args.endxyz.len = FFESTR_firstlENDBLOCKDATA; - ffestb_args.endxyz.second = FFESTR_secondBLOCKDATA; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENDDO: - ffestb_args.endxyz.len = FFESTR_firstlENDDO; - ffestb_args.endxyz.second = FFESTR_secondDO; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENDFILE: - ffestb_args.beru.len = FFESTR_firstlENDFILE; - ffestb_args.beru.badname = "ENDFILE"; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_beru); - break; - - case FFESTR_firstENDFUNCTION: - ffestb_args.endxyz.len = FFESTR_firstlENDFUNCTION; - ffestb_args.endxyz.second = FFESTR_secondFUNCTION; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENDIF: - ffestb_args.endxyz.len = FFESTR_firstlENDIF; - ffestb_args.endxyz.second = FFESTR_secondIF; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENDPROGRAM: - ffestb_args.endxyz.len = FFESTR_firstlENDPROGRAM; - ffestb_args.endxyz.second = FFESTR_secondPROGRAM; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENDSELECT: - ffestb_args.endxyz.len = FFESTR_firstlENDSELECT; - ffestb_args.endxyz.second = FFESTR_secondSELECT; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENDSUBROUTINE: - ffestb_args.endxyz.len = FFESTR_firstlENDSUBROUTINE; - ffestb_args.endxyz.second = FFESTR_secondSUBROUTINE; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_endxyz); - break; - - case FFESTR_firstENTRY: - ffestb_args.dummy.len = FFESTR_firstlENTRY; - ffestb_args.dummy.badname = "ENTRY"; - ffestb_args.dummy.is_subr = ffestc_is_entry_in_subr (); - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_dummy); - break; - - case FFESTR_firstEQUIVALENCE: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R544); - break; - - case FFESTR_firstEXIT: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R835); - break; - - case FFESTR_firstEXTERNAL: - ffestb_args.varlist.len = FFESTR_firstlEXTERNAL; - ffestb_args.varlist.badname = "EXTERNAL"; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_varlist); - break; - - /* WARNING: don't put anything that might cause an item to precede - FORMAT in the list of possible statements (it's added below) without - making sure FORMAT still is first. It has to run with - ffelex_set_names_pure(TRUE), to make sure the lexer delivers NAMES - tokens. */ - - case FFESTR_firstFORMAT: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R1001); - break; - - case FFESTR_firstFUNCTION: - ffestb_args.dummy.len = FFESTR_firstlFUNCTION; - ffestb_args.dummy.badname = "FUNCTION"; - ffestb_args.dummy.is_subr = FALSE; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_dummy); - break; - - case FFESTR_firstGO: - if ((ffelex_token_type (ffesta_token_0_) == FFELEX_typeNAMES) - || (ffelex_token_type (t) != FFELEX_typeNAME)) - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto); - else - switch (ffesta_second_kw) - { - case FFESTR_secondTO: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto); - break; - default: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto); - break; - } - break; - - case FFESTR_firstGOTO: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto); - break; - - case FFESTR_firstIF: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_if); - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R840); - break; - - case FFESTR_firstIMPLICIT: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_R539); - break; - - case FFESTR_firstINCLUDE: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_S3P4); - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - case FFELEX_typeNAME: - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeQUOTE: - break; - - default: - break; - } - break; - - case FFESTR_firstINQUIRE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R923); - break; - - case FFESTR_firstINTGR: - ffestb_args.decl.len = FFESTR_firstlINTGR; - ffestb_args.decl.type = FFESTP_typeINTEGER; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); - break; - - case FFESTR_firstINTRINSIC: - ffestb_args.varlist.len = FFESTR_firstlINTRINSIC; - ffestb_args.varlist.badname = "INTRINSIC"; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_varlist); - break; - - case FFESTR_firstLGCL: - ffestb_args.decl.len = FFESTR_firstlLGCL; - ffestb_args.decl.type = FFESTP_typeLOGICAL; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); - break; - - case FFESTR_firstNAMELIST: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R542); - break; - - case FFESTR_firstOPEN: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R904); - break; - - case FFESTR_firstPARAMETER: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R537); - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_V027); - break; - - case FFESTR_firstPAUSE: - ffestb_args.halt.len = FFESTR_firstlPAUSE; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_halt); - break; - - case FFESTR_firstPRINT: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R911); - break; - - case FFESTR_firstPROGRAM: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R1102); - break; - - case FFESTR_firstREAD: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R909); - break; - - case FFESTR_firstREAL: - ffestb_args.decl.len = FFESTR_firstlREAL; - ffestb_args.decl.type = FFESTP_typeREAL; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); - break; - - case FFESTR_firstRETURN: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R1227); - break; - - case FFESTR_firstREWIND: - ffestb_args.beru.len = FFESTR_firstlREWIND; - ffestb_args.beru.badname = "REWIND"; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_beru); - break; - - case FFESTR_firstSAVE: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R522); - break; - - case FFESTR_firstSELECT: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R809); - break; - - case FFESTR_firstSELECTCASE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R809); - break; - - case FFESTR_firstSTOP: - ffestb_args.halt.len = FFESTR_firstlSTOP; - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_halt); - break; - - case FFESTR_firstSUBROUTINE: - ffestb_args.dummy.len = FFESTR_firstlSUBROUTINE; - ffestb_args.dummy.badname = "SUBROUTINE"; - ffestb_args.dummy.is_subr = TRUE; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_dummy); - break; - - case FFESTR_firstTYPE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_V020); - break; - - case FFESTR_firstVIRTUAL: - ffestb_args.R524.len = FFESTR_firstlVIRTUAL; - ffestb_args.R524.badname = "VIRTUAL"; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_R524); - break; - - case FFESTR_firstVOLATILE: - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_V014); - break; - - case FFESTR_firstWORD: - ffestb_args.decl.len = FFESTR_firstlWORD; - ffestb_args.decl.type = FFESTP_typeWORD; - ffesta_add_possible_nonexec_ ((ffelexHandler) ffestb_decl_gentype); - break; - - case FFESTR_firstWRITE: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_R910); - break; - - default: - break; - } - - /* Now check the default cases, which are always "live" (meaning that no - other possibility can override them). These are where the second token - is OPEN_PAREN, PERCENT, EQUALS, POINTS, or COLON. */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - s = ffesymbol_lookup_local (ffesta_token_0_); - if (((s == NULL) || (ffesymbol_dims (s) == NULL)) - && !ffesta_seen_first_exec) - { /* Not known as array; may be stmt function. */ - ffesta_add_possible_unnamed_nonexec_ ((ffelexHandler) ffestb_R1229); - - /* If the symbol is (or will be due to implicit typing) of - CHARACTER type, then the statement might be an assignment - statement. If so, since it can't be a function invocation nor - an array element reference, the open paren following the symbol - name must be followed by an expression and a colon. Without the - colon (which cannot appear in a stmt function definition), the - let stmt rejects. So CHARACTER_NAME(...)=expr, unlike any other - type, is not ambiguous alone. */ - - if (ffeimplic_peek_symbol_type (s, - ffelex_token_text (ffesta_token_0_)) - == FFEINFO_basictypeCHARACTER) - ffesta_add_possible_unnamed_exec_ ((ffelexHandler) ffestb_let); - } - else /* Not statement function if known as an - array. */ - ffesta_add_possible_unnamed_exec_ ((ffelexHandler) ffestb_let); - break; - - case FFELEX_typeEQUALS: - ffesta_add_possible_unnamed_exec_ ((ffelexHandler) ffestb_let); - break; - - case FFELEX_typeCOLON: - ffesta_add_possible_exec_ ((ffelexHandler) ffestb_construct); - break; - - default: - ; - } - - /* Now see how many possibilities are on the list. */ - - switch (ffesta_num_possibles_) - { - case 0: /* None, so invalid statement. */ - no_stmts: /* :::::::::::::::::::: */ - ffesta_tokens[0] = ffesta_token_0_; - ffesta_ffebad_2t (FFEBAD_UNREC_STMT, ffesta_token_0_, t); - next = (ffelexHandler) ffelex_swallow_tokens (NULL, - (ffelexHandler) ffesta_zero); - break; - - case 1: /* One, so just do it! */ - ffesta_tokens[0] = ffesta_token_0_; - next = ffesta_possible_execs_.first->handler; - if (next == NULL) - { /* Have a nonexec stmt. */ - next = ffesta_possible_nonexecs_.first->handler; - assert (next != NULL); - } - else if (ffesta_seen_first_exec) - ; /* Have an exec stmt after exec transition. */ - else if (!ffestc_exec_transition ()) - /* 1 exec stmt only, but not valid in context, so pretend as though - statement is unrecognized. */ - goto no_stmts; /* :::::::::::::::::::: */ - break; - - default: /* More than one, so try them in order. */ - ffesta_confirmed_possible_ = NULL; - ffesta_current_possible_ = ffesta_possible_nonexecs_.first; - ffesta_current_handler_ = ffesta_current_possible_->handler; - if (ffesta_current_handler_ == NULL) - { - ffesta_current_possible_ = ffesta_possible_execs_.first; - ffesta_current_handler_ = ffesta_current_possible_->handler; - assert (ffesta_current_handler_ != NULL); - if (!ffesta_seen_first_exec) - { /* Need to do exec transition now. */ - ffesta_tokens[0] = ffesta_token_0_; - if (!ffestc_exec_transition ()) - goto no_stmts; /* :::::::::::::::::::: */ - } - } - ffesta_tokens[0] = ffelex_token_use (ffesta_token_0_); - next = (ffelexHandler) ffesta_save_; - ffebad_set_inhibit (TRUE); - ffesta_is_inhibited_ = TRUE; - break; - } - - ffesta_output_pool - = malloc_pool_new ("Statement Output", ffe_pool_program_unit (), 1024); - ffesta_scratch_pool - = malloc_pool_new ("Statement Scratch", ffe_pool_program_unit (), 1024); - ffesta_outpooldisp_ = FFESTA_pooldispDISCARD; - - if (ffesta_is_inhibited_) - ffesymbol_set_retractable (ffesta_scratch_pool); - - ffelex_set_names (FALSE); /* Most handlers will want this. If not, - they have to set it TRUE again (its value - at the beginning of a statement). */ - - return (ffelexHandler) (*next) (t); -} - -/* ffesta_send_two_ -- Send the two tokens saved by ffesta_two after all - - return ffesta_send_two_; // to lexer. - - Currently, if this function gets called, it means that the two tokens - saved by ffesta_two did not have their handlers derailed by - ffesta_save_, which probably means they weren't sent by ffesta_save_ - but directly by the lexer, which probably means the original statement - (which should be IF (expr) or WHERE (expr)) somehow evaluated to only - one possibility in ffesta_second_ or somebody optimized FFEST to - immediately revert to one possibility upon confirmation but forgot to - change this function (and thus perhaps the entire resubmission - mechanism). */ - -#if !FFESTA_ABORT_ON_CONFIRM_ -static ffelexHandler -ffesta_send_two_ (ffelexToken t) -{ - assert ("what am I doing here?" == NULL); - return NULL; -} - -#endif -/* ffesta_confirmed -- Confirm current possibility as only one - - ffesta_confirmed(); - - Sets the confirmation flag. During debugging for ambiguous constructs, - asserts that the confirmation flag for a previous possibility has not - yet been set. */ - -void -ffesta_confirmed (void) -{ - if (ffesta_inhibit_confirmation_) - return; - ffesta_confirmed_current_ = TRUE; - assert (!ffesta_confirmed_other_ - || (ffesta_confirmed_possible_ == ffesta_current_possible_)); - ffesta_confirmed_possible_ = ffesta_current_possible_; -} - -/* ffesta_eof -- End of (non-INCLUDEd) source file - - ffesta_eof(); - - Call after piping tokens through ffest_first, where the most recent - token sent through must be EOS. - - 20-Feb-91 JCB 1.1 - Put new EOF token in ffesta_tokens[0], not NULL, because too much - code expects something there for error reporting and the like. Also, - do basically the same things ffest_second and ffesta_zero do for - processing a statement (make and destroy pools, et cetera). */ - -void -ffesta_eof (void) -{ - ffesta_tokens[0] = ffelex_token_new_eof (); - - ffesta_output_pool - = malloc_pool_new ("Statement Output", ffe_pool_program_unit (), 1024); - ffesta_scratch_pool - = malloc_pool_new ("Statement Scratch", ffe_pool_program_unit (), 1024); - ffesta_outpooldisp_ = FFESTA_pooldispDISCARD; - - ffestc_eof (); - - if (ffesta_tokens[0] != NULL) - ffelex_token_kill (ffesta_tokens[0]); - - if (ffesta_output_pool != NULL) - { - if (ffesta_outpooldisp_ == FFESTA_pooldispDISCARD) - malloc_pool_kill (ffesta_output_pool); - ffesta_output_pool = NULL; - } - - if (ffesta_scratch_pool != NULL) - { - malloc_pool_kill (ffesta_scratch_pool); - ffesta_scratch_pool = NULL; - } - - if (ffesta_label_token != NULL) - { - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; - } - - if (ffe_is_ffedebug ()) - { - ffestorag_report (); - } -} - -/* ffesta_ffebad_here_current_stmt -- ffebad_here with ptr to current stmt - - ffesta_ffebad_here_current_stmt(0); - - Outsiders can call this fn if they have no more convenient place to - point to (via a token or pair of ffewhere objects) and they know a - current, useful statement is being evaluted by ffest (i.e. they are - being called from ffestb, ffestc, ffestd, ... functions). */ - -void -ffesta_ffebad_here_current_stmt (ffebadIndex i) -{ - assert (ffesta_tokens[0] != NULL); - ffebad_here (i, ffelex_token_where_line (ffesta_tokens[0]), - ffelex_token_where_column (ffesta_tokens[0])); -} - -/* ffesta_ffebad_start -- Start a possibly inhibited error report - - if (ffesta_ffebad_start(FFEBAD_SOME_ERROR)) - { - ffebad_here, ffebad_string ...; - ffebad_finish(); - } - - Call if the error might indicate that ffest is evaluating the wrong - statement form, instead of calling ffebad_start directly. If ffest - is choosing between forms, it will return FALSE, send an EOS/SEMICOLON - token through as the next token (if the current one isn't already one - of those), and try another possible form. Otherwise, ffebad_start is - called with the argument and TRUE returned. */ - -bool -ffesta_ffebad_start (ffebad errnum) -{ - if (!ffesta_is_inhibited_) - { - ffebad_start (errnum); - return TRUE; - } - - if (!ffesta_confirmed_current_) - ffesta_current_shutdown_ = TRUE; - - return FALSE; -} - -/* ffesta_first -- Parse the first token in a statement - - return ffesta_first; // to lexer. */ - -ffelexHandler -ffesta_first (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeSEMICOLON: - case FFELEX_typeEOS: - ffesta_tokens[0] = ffelex_token_use (t); - if (ffesta_label_token != NULL) - { - ffebad_start (FFEBAD_LABEL_WITHOUT_STMT); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_string (ffelex_token_text (ffesta_label_token)); - ffebad_here (1, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffesta_token_0_ = ffelex_token_use (t); - ffesta_first_kw = ffestr_first (t); - return (ffelexHandler) ffesta_second_; - - case FFELEX_typeNUMBER: - if (ffesta_line_has_semicolons - && !ffe_is_free_form () - && ffe_is_pedantic ()) - { - ffebad_start (FFEBAD_LABEL_WRONG_PLACE); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (ffelex_token_text (t)); - ffebad_finish (); - } - if (ffesta_label_token == NULL) - { - ffesta_label_token = ffelex_token_use (t); - return (ffelexHandler) ffesta_first; - } - else - { - ffebad_start (FFEBAD_EXTRA_LABEL_DEF); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_string (ffelex_token_text (t)); - ffebad_here (1, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_string (ffelex_token_text (ffesta_label_token)); - ffebad_finish (); - - return (ffelexHandler) ffesta_first; - } - - default: /* Invalid first token. */ - ffesta_tokens[0] = ffelex_token_use (t); - ffebad_start (FFEBAD_STMT_BEGINS_BAD); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffesta_init_0 -- Initialize for entire image invocation - - ffesta_init_0(); - - Call just once per invocation of the compiler (not once per invocation - of the front end). - - Gets memory for the list of possibles once and for all, since this - list never gets larger than a certain size (FFESTA_maxPOSSIBLES_) - and is not particularly large. Initializes the array of pointers to - this list. Initializes the executable and nonexecutable lists. */ - -void -ffesta_init_0 (void) -{ - ffestaPossible_ ptr; - int i; - - ptr = malloc_new_kp (malloc_pool_image (), "FFEST possibles", - FFESTA_maxPOSSIBLES_ * sizeof (*ptr)); - - for (i = 0; i < FFESTA_maxPOSSIBLES_; ++i) - ffesta_possibles_[i] = ptr++; - - ffesta_possible_execs_.first = ffesta_possible_execs_.last - = (ffestaPossible_) &ffesta_possible_execs_.first; - ffesta_possible_nonexecs_.first = ffesta_possible_nonexecs_.last - = (ffestaPossible_) &ffesta_possible_nonexecs_.first; - ffesta_possible_execs_.nil = ffesta_possible_nonexecs_.nil = NULL; -} - -/* ffesta_init_3 -- Initialize for any program unit - - ffesta_init_3(); */ - -void -ffesta_init_3 (void) -{ - ffesta_output_pool = NULL; /* May be doing this just before reaching */ - ffesta_scratch_pool = NULL; /* ffesta_zero or ffesta_two. */ - /* NOTE: we let the ffe_terminate_2 action of killing the program_unit pool - handle the killing of the output and scratch pools for us, which is why - we don't have a terminate_3 action to do so. */ - ffesta_construct_name = NULL; - ffesta_label_token = NULL; - ffesta_seen_first_exec = FALSE; -} - -/* ffesta_is_inhibited -- Test whether the current possibility is inhibited - - if (!ffesta_is_inhibited()) - // implement the statement. - - Just make sure the current possibility has been confirmed. If anyone - really needs to test whether the current possibility is inhibited prior - to confirming it, that indicates a need to begin statement processing - before it is certain that the given possibility is indeed the statement - to be processed. As of this writing, there does not appear to be such - a need. If there is, then when confirming a statement would normally - immediately disable the inhibition (whereas currently we leave the - confirmed statement disabled until we've tried the other possibilities, - to check for ambiguities), we must check to see if the possibility has - already tested for inhibition prior to confirmation and, if so, maintain - inhibition until the end of the statement (which may be forced right - away) and then rerun the entire statement from the beginning. Otherwise, - initial calls to ffestb functions won't have been made, but subsequent - calls (after confirmation) will, which is wrong. Of course, this all - applies only to those statements implemented via multiple calls to - ffestb, although if a statement requiring only a single ffestb call - tested for inhibition prior to confirmation, it would likely mean that - the ffestb call would be completely dropped without this mechanism. */ - -bool -ffesta_is_inhibited (void) -{ - assert (ffesta_confirmed_current_ || ffesta_inhibit_confirmation_); - return ffesta_is_inhibited_; -} - -/* ffesta_ffebad_1p -- Issue diagnostic with one source character - - ffelexToken names_token; - ffeTokenLength index; - ffelexToken next_token; - ffesta_ffebad_1p(FFEBAD_SOME_ERROR,names_token,index,next_token); - - Equivalent to "if (ffest_ffebad_start(FFEBAD_SOME_ERROR))" followed by - sending one argument, the location of index with names_token, if TRUE is - returned. If index is equal to the length of names_token, meaning it - points to the end of the token, then uses the location in next_token - (which should be the token sent by the lexer after it sent names_token) - instead. */ - -void -ffesta_ffebad_1p (ffebad errnum, ffelexToken names_token, ffeTokenLength index, - ffelexToken next_token) -{ - ffewhereLine line; - ffewhereColumn col; - - assert (index <= ffelex_token_length (names_token)); - - if (ffesta_ffebad_start (errnum)) - { - if (index == ffelex_token_length (names_token)) - { - assert (next_token != NULL); - line = ffelex_token_where_line (next_token); - col = ffelex_token_where_column (next_token); - ffebad_here (0, line, col); - } - else - { - ffewhere_set_from_track (&line, &col, - ffelex_token_where_line (names_token), - ffelex_token_where_column (names_token), - ffelex_token_wheretrack (names_token), - index); - ffebad_here (0, line, col); - ffewhere_line_kill (line); - ffewhere_column_kill (col); - } - ffebad_finish (); - } -} - -void -ffesta_ffebad_1sp (ffebad errnum, const char *s, ffelexToken names_token, - ffeTokenLength index, ffelexToken next_token) -{ - ffewhereLine line; - ffewhereColumn col; - - assert (index <= ffelex_token_length (names_token)); - - if (ffesta_ffebad_start (errnum)) - { - ffebad_string (s); - if (index == ffelex_token_length (names_token)) - { - assert (next_token != NULL); - line = ffelex_token_where_line (next_token); - col = ffelex_token_where_column (next_token); - ffebad_here (0, line, col); - } - else - { - ffewhere_set_from_track (&line, &col, - ffelex_token_where_line (names_token), - ffelex_token_where_column (names_token), - ffelex_token_wheretrack (names_token), - index); - ffebad_here (0, line, col); - ffewhere_line_kill (line); - ffewhere_column_kill (col); - } - ffebad_finish (); - } -} - -void -ffesta_ffebad_1st (ffebad errnum, const char *s, ffelexToken t) -{ - if (ffesta_ffebad_start (errnum)) - { - ffebad_string (s); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } -} - -/* ffesta_ffebad_1t -- Issue diagnostic with one source token - - ffelexToken t; - ffesta_ffebad_1t(FFEBAD_SOME_ERROR,t); - - Equivalent to "if (ffesta_ffebad_start(FFEBAD_SOME_ERROR))" followed by - sending one argument, the location of the token t, if TRUE is returned. */ - -void -ffesta_ffebad_1t (ffebad errnum, ffelexToken t) -{ - if (ffesta_ffebad_start (errnum)) - { - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } -} - -void -ffesta_ffebad_2st (ffebad errnum, const char *s, ffelexToken t1, ffelexToken t2) -{ - if (ffesta_ffebad_start (errnum)) - { - ffebad_string (s); - ffebad_here (0, ffelex_token_where_line (t1), ffelex_token_where_column (t1)); - ffebad_here (1, ffelex_token_where_line (t2), ffelex_token_where_column (t2)); - ffebad_finish (); - } -} - -/* ffesta_ffebad_2t -- Issue diagnostic with two source tokens - - ffelexToken t1, t2; - ffesta_ffebad_2t(FFEBAD_SOME_ERROR,t1,t2); - - Equivalent to "if (ffesta_ffebad_start(FFEBAD_SOME_ERROR))" followed by - sending two argument, the locations of the tokens t1 and t2, if TRUE is - returned. */ - -void -ffesta_ffebad_2t (ffebad errnum, ffelexToken t1, ffelexToken t2) -{ - if (ffesta_ffebad_start (errnum)) - { - ffebad_here (0, ffelex_token_where_line (t1), ffelex_token_where_column (t1)); - ffebad_here (1, ffelex_token_where_line (t2), ffelex_token_where_column (t2)); - ffebad_finish (); - } -} - -ffestaPooldisp -ffesta_outpooldisp (void) -{ - return ffesta_outpooldisp_; -} - -void -ffesta_set_outpooldisp (ffestaPooldisp d) -{ - ffesta_outpooldisp_ = d; -} - -/* Shut down current parsing possibility, but without bothering the - user with a diagnostic if we're not inhibited. */ - -void -ffesta_shutdown (void) -{ - if (ffesta_is_inhibited_) - ffesta_current_shutdown_ = TRUE; -} - -/* ffesta_two -- Deal with the first two tokens after a swallowed statement - - return ffesta_two(first_token,second_token); // to lexer. - - Like ffesta_zero, except instead of expecting an EOS or SEMICOLON, it - expects the first two tokens of a statement that is part of another - statement: the first two tokens of statement in "IF (expr) statement" or - "WHERE (expr) statement", in particular. The first token must be a NAME - or NAMES, the second can be basically anything. The statement type MUST - be confirmed by now. - - If we're not inhibited, just handle things as if we were ffesta_zero - and saw an EOS just before the two tokens. - - If we're inhibited, set ffesta_current_shutdown_ to shut down the current - statement and continue with other possibilities, then (presumably) come - back to this one for real when not inhibited. */ - -ffelexHandler -ffesta_two (ffelexToken first, ffelexToken second) -{ -#if FFESTA_ABORT_ON_CONFIRM_ - ffelexHandler next; -#endif - - assert ((ffelex_token_type (first) == FFELEX_typeNAME) - || (ffelex_token_type (first) == FFELEX_typeNAMES)); - assert (ffesta_tokens[0] != NULL); - - if (ffesta_is_inhibited_) /* Oh, not really done with statement. */ - { - ffesta_current_shutdown_ = TRUE; - /* To catch the EOS on shutdown. */ - return (ffelexHandler) ffelex_swallow_tokens (second, - (ffelexHandler) ffesta_zero); - } - - ffestw_display_state (); - - ffelex_token_kill (ffesta_tokens[0]); - - if (ffesta_output_pool != NULL) - { - if (ffesta_outpooldisp_ == FFESTA_pooldispDISCARD) - malloc_pool_kill (ffesta_output_pool); - ffesta_output_pool = NULL; - } - - if (ffesta_scratch_pool != NULL) - { - malloc_pool_kill (ffesta_scratch_pool); - ffesta_scratch_pool = NULL; - } - - ffesta_reset_possibles_ (); - ffesta_confirmed_current_ = FALSE; - - /* What happens here is somewhat interesting. We effectively derail the - line of handlers for these two tokens, the first two in a statement, by - setting a flag to TRUE. This flag tells ffesta_save_ (or, conceivably, - the lexer via ffesta_second_'s case 1:, where it has only one possible - kind of statement -- someday this will be more likely, i.e. after - confirmation causes an immediate switch to only the one context rather - than just setting a flag and running through the remaining possibles to - look for ambiguities) that the last two tokens it sent did not reach the - truly desired targets (ffest_first and ffesta_second_) since that would - otherwise attempt to recursively invoke ffesta_save_ in most cases, - while the existing ffesta_save_ was still alive and making use of static - (nonrecursive) variables. Instead, ffesta_save_, upon seeing this flag - set TRUE, sets it to FALSE and resubmits the two tokens copied here to - ffest_first and, presumably, ffesta_second_, kills them, and returns the - handler returned by the handler for the second token. Thus, even though - ffesta_save_ is still (likely to be) recursively invoked, the former - invocation is past the use of any static variables possibly changed - during the first-two-token invocation of the latter invocation. */ - -#if FFESTA_ABORT_ON_CONFIRM_ - /* Shouldn't be in ffesta_save_ at all here. */ - - next = (ffelexHandler) ffesta_first (first); - return (ffelexHandler) (*next) (second); -#else - ffesta_twotokens_1_ = ffelex_token_use (first); - ffesta_twotokens_2_ = ffelex_token_use (second); - - ffesta_is_two_into_statement_ = TRUE; - return (ffelexHandler) ffesta_send_two_; /* Shouldn't get called. */ -#endif -} - -/* ffesta_zero -- Deal with the end of a swallowed statement - - return ffesta_zero; // to lexer. - - NOTICE that this code is COPIED, largely, into a - similar function named ffesta_two that gets invoked in place of - _zero_ when the end of the statement happens before EOS or SEMICOLON and - to tokens into the next statement have been read (as is the case with the - logical-IF and WHERE-stmt statements). So any changes made here should - probably be made in _two_ at the same time. */ - -ffelexHandler -ffesta_zero (ffelexToken t) -{ - assert ((ffelex_token_type (t) == FFELEX_typeEOS) - || (ffelex_token_type (t) == FFELEX_typeSEMICOLON)); - assert (ffesta_tokens[0] != NULL); - - if (ffesta_is_inhibited_) - ffesymbol_retract (TRUE); - else - ffestw_display_state (); - - /* Do CONTINUE if nothing else. This is done specifically so that "IF - (...) BLAH" causes the same things to happen as if "IF (...) CONTINUE" - was done, so that tracking of labels and such works. (Try a small - program like "DO 10 ...", "IF (...) BLAH", "10 CONTINUE", "END".) - - But it turns out that just testing "!ffesta_confirmed_current_" - isn't enough, because then typing "GOTO" instead of "BLAH" above - doesn't work -- the statement is confirmed (we know the user - attempted a GOTO) but ffestc hasn't seen it. So, instead, just - always tell ffestc to do "any" statement it needs to reset. */ - - if (!ffesta_is_inhibited_ - && ffesta_seen_first_exec) - { - ffestc_any (); - } - - ffelex_token_kill (ffesta_tokens[0]); - - if (ffesta_is_inhibited_) /* Oh, not really done with statement. */ - return (ffelexHandler) ffesta_zero; /* Call me again when done! */ - - if (ffesta_output_pool != NULL) - { - if (ffesta_outpooldisp_ == FFESTA_pooldispDISCARD) - malloc_pool_kill (ffesta_output_pool); - ffesta_output_pool = NULL; - } - - if (ffesta_scratch_pool != NULL) - { - malloc_pool_kill (ffesta_scratch_pool); - ffesta_scratch_pool = NULL; - } - - ffesta_reset_possibles_ (); - ffesta_confirmed_current_ = FALSE; - - if (ffelex_token_type (t) == FFELEX_typeSEMICOLON) - { - ffesta_line_has_semicolons = TRUE; - if (ffe_is_pedantic_not_90 ()) - { - ffebad_start (FFEBAD_SEMICOLON); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - } - else - ffesta_line_has_semicolons = FALSE; - - if (ffesta_label_token != NULL) - { - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; - } - - if (ffe_is_ffedebug ()) - { - ffestorag_report (); - } - - ffelex_set_names (TRUE); - return (ffelexHandler) ffesta_first; -} diff --git a/contrib/gcc/f/sta.h b/contrib/gcc/f/sta.h deleted file mode 100644 index cf41777..0000000 --- a/contrib/gcc/f/sta.h +++ /dev/null @@ -1,117 +0,0 @@ -/* sta.h -- Private #include File (module.h template V1.0) - Copyright (C) 1995 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - sta.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_STA_H -#define GCC_F_STA_H - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFESTA_pooldispDISCARD, /* Default state. */ - FFESTA_pooldispPRESERVE, /* Preserve through end of program unit. */ - FFESTA_pooldisp - } ffestaPooldisp; - -#define FFESTA_tokensMAX 10 /* Max # tokens in fixed positions. */ - -/* Typedefs. */ - -/* Include files needed by this one. */ - -#include "bad.h" -#include "lex.h" -#include "malloc.h" -#include "str.h" -#include "symbol.h" - -typedef mallocPool ffestaPool; /* No need for use count yet. */ - -/* Structure definitions. */ - - -/* Global objects accessed by users of this module. */ - -extern ffelexToken ffesta_tokens[FFESTA_tokensMAX]; -extern ffestrFirst ffesta_first_kw; -extern ffestrSecond ffesta_second_kw; -extern mallocPool ffesta_output_pool; -extern mallocPool ffesta_scratch_pool; -extern ffelexToken ffesta_construct_name; -extern ffelexToken ffesta_label_token; -extern bool ffesta_seen_first_exec; -extern bool ffesta_is_entry_valid; -extern bool ffesta_line_has_semicolons; - -/* Declare functions with prototypes. */ - -void ffesta_confirmed (void); -void ffesta_eof (void); -bool ffesta_ffebad_start (ffebad errnum); -void ffesta_ffebad_here_current_stmt (ffebadIndex i); -ffelexHandler ffesta_first (ffelexToken t); -void ffesta_init_0 (void); -void ffesta_init_3 (void); -bool ffesta_is_inhibited (void); -void ffesta_terminate_0 (void); -void ffesta_terminate_1 (void); -void ffesta_terminate_2 (void); -void ffesta_terminate_3 (void); -void ffesta_terminate_4 (void); -void ffesta_ffebad_here_doiter (ffebadIndex i, ffesymbol s); -void ffesta_shutdown (void); -ffesymbol ffesta_sym_end_transition (ffesymbol s); -ffesymbol ffesta_sym_exec_transition (ffesymbol s); -void ffesta_ffebad_1p (ffebad msg, ffelexToken names_token, - ffeTokenLength index, ffelexToken next_token); -void ffesta_ffebad_1sp (ffebad msg, const char *s, ffelexToken names_token, - ffeTokenLength index, ffelexToken next_token); -void ffesta_ffebad_1st (ffebad msg, const char *s, ffelexToken t); -void ffesta_ffebad_1t (ffebad msg, ffelexToken t); -void ffesta_ffebad_2st (ffebad msg, const char *s, ffelexToken t1, ffelexToken t2); -void ffesta_ffebad_2t (ffebad msg, ffelexToken t1, ffelexToken t2); -ffelexHandler ffesta_zero (ffelexToken t); -ffelexHandler ffesta_two (ffelexToken first, ffelexToken second); -ffestaPooldisp ffesta_outpooldisp (void); -void ffesta_set_outpooldisp (ffestaPooldisp d); - -/* Define macros. */ - -#define ffesta_init_1() -#define ffesta_init_2() -#define ffesta_init_4() -#define ffesta_terminate_0() -#define ffesta_terminate_1() -#define ffesta_terminate_2() -#define ffesta_terminate_3() -#define ffesta_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_STA_H */ diff --git a/contrib/gcc/f/stb.c b/contrib/gcc/f/stb.c deleted file mode 100644 index 673f96c..0000000 --- a/contrib/gcc/f/stb.c +++ /dev/null @@ -1,17812 +0,0 @@ -/* stb.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 2002, 2003 - Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - st.c - - Description: - Parses the proper form for statements, builds up expression trees for - them, but does not actually implement them. Uses ffebad (primarily via - ffesta_ffebad_start) to indicate errors in form. In many cases, an invalid - statement form indicates another possible statement needs to be looked at - by ffest. In a few cases, a valid statement form might not completely - determine the nature of the statement, as in REALFUNCTIONA(B), which is - a valid form for either the first statement of a function named A taking - an argument named B or for the declaration of a real array named FUNCTIONA - with an adjustable size of B. A similar (though somewhat easier) choice - must be made for the statement-function-def vs. assignment forms, as in - the case of FOO(A) = A+2.0. - - A given parser consists of one or more state handlers, the first of which - is the initial state, and the last of which (for any given input) returns - control to a final state handler (ffesta_zero or ffesta_two, explained - below). The functions handling the states for a given parser usually have - the same names, differing only in the final number, as in ffestb_foo_ - (handles the initial state), ffestb_foo_1_, ffestb_foo_2_ (handle - subsequent states), although liberties sometimes are taken with the "foo" - part either when keywords are clarified into given statements or are - transferred into other possible areas. (For example, the type-name - states can hop over to _dummy_ functions when the FUNCTION or RECURSIVE - keywords are seen, though this kind of thing is kept to a minimum.) Only - the names without numbers are exported to the rest of ffest; the others - are local (static). - - Each initial state is provided with the first token in ffesta_tokens[0], - which will be killed upon return to the final state (ffesta_zero or - ffelex_swallow_tokens passed through to ffesta_zero), so while it may - be changed to another token, a valid token must be left there to be - killed. Also, a "convenient" array of tokens are left in - ffesta_tokens[1..FFESTA_tokensMAX]. The initial state of this set of - elements is undefined, thus, if tokens are stored here, they must be - killed before returning to the final state. Any parser may also use - cross-state local variables by sticking a structure containing storage - for those variables in the local union ffestb_local_ (unless the union - goes on strike). Furthermore, parsers that handle more than one first or - second tokens (like _varlist_, which handles EXTERNAL, INTENT, INTRINSIC, - OPTIONAL, - PUBLIC, or PRIVATE, and _endxyz_, which handles ENDBLOCK, ENDBLOCKDATA, - ENDDO, ENDIF, and so on) may expect arguments from ffest in the - ffest-wide union ffest_args_, the substructure specific to the parser. - - A parser's responsibility is: to call either ffesta_confirmed or - ffest_ffebad_start before returning to the final state; to be the only - parser that can possibly call ffesta_confirmed for a given statement; - to call ffest_ffebad_start immediately upon recognizing a bad token - (specifically one that another statement parser might confirm upon); - to call ffestc functions only after calling ffesta_confirmed and only - when ffesta_is_inhibited returns FALSE; and to call ffesta_is_inhibited - only after calling ffesta_confirmed. Confirm as early as reasonably - possible, even when only one ffestc function is called for the statement - later on, because early confirmation can enhance the error-reporting - capabilities if a subsequent error is detected and this parser isn't - the first possibility for the statement. - - To assist the parser, functions like ffesta_ffebad_1t and _1p_ have - been provided to make use of ffest_ffebad_start fairly easy. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "stb.h" -#include "bad.h" -#include "expr.h" -#include "lex.h" -#include "malloc.h" -#include "src.h" -#include "sta.h" -#include "stc.h" -#include "stp.h" -#include "str.h" - -/* Externals defined here. */ - -struct _ffestb_args_ ffestb_args; - -/* Simple definitions and enumerations. */ - -#define FFESTB_KILL_EASY_ 1 /* 1 for only one _subr_kill_xyz_ fn. */ - -/* Internal typedefs. */ - -union ffestb_subrargs_u_ - { - struct - { - ffesttTokenList labels; /* Input arg, must not be NULL. */ - ffelexHandler handler; /* Input arg, call me when done. */ - bool ok; /* Output arg, TRUE if list ended in - CLOSE_PAREN. */ - } - label_list; - struct - { - ffesttDimList dims; /* Input arg, must not be NULL. */ - ffelexHandler handler; /* Input arg, call me when done. */ - mallocPool pool; /* Pool to allocate into. */ - bool ok; /* Output arg, TRUE if list ended in - CLOSE_PAREN. */ - ffeexprContext ctx; /* DIMLIST or DIMLISTCOMMON. */ -#ifdef FFECOM_dimensionsMAX - int ndims; /* For backends that really can't have - infinite dims. */ -#endif - } - dim_list; - struct - { - ffesttTokenList args; /* Input arg, must not be NULL. */ - ffelexHandler handler; /* Input arg, call me when done. */ - ffelexToken close_paren;/* Output arg if ok, CLOSE_PAREN token. */ - bool is_subr; /* Input arg, TRUE if list in subr-def - context. */ - bool ok; /* Output arg, TRUE if list ended in - CLOSE_PAREN. */ - bool names; /* Do ffelex_set_names(TRUE) before return. */ - } - name_list; - }; - -union ffestb_local_u_ - { - struct - { - ffebld expr; - } - call_stmt; - struct - { - ffebld expr; - } - go_to; - struct - { - ffebld dest; - bool vxtparam; /* If assignment might really be VXT - PARAMETER stmt. */ - } - let; - struct - { - ffebld expr; - } - if_stmt; - struct - { - ffebld expr; - } - else_stmt; - struct - { - ffebld expr; - } - dowhile; - struct - { - ffebld var; - ffebld start; - ffebld end; - } - do_stmt; - struct - { - bool is_cblock; - } - R522; - struct - { - ffebld expr; - bool started; - } - parameter; - struct - { - ffesttExprList exprs; - bool started; - } - equivalence; - struct - { - ffebld expr; - bool started; - } - data; - struct - { - ffestrOther kw; - } - varlist; - struct - { - ffelexHandler next; - } - construct; - struct - { - ffesttFormatList f; - ffestpFormatType current; /* What we're currently working on. */ - ffelexToken t; /* Token of what we're currently working on. */ - ffesttFormatValue pre; - ffesttFormatValue post; - ffesttFormatValue dot; - ffesttFormatValue exp; - bool sign; /* _3_, pos/neg; elsewhere, signed/unsigned. */ - bool complained; /* If run-time expr seen in nonexec context. */ - } - format; - struct - { - ffebld expr; - } - selectcase; - struct - { - ffesttCaseList cases; - } - case_stmt; - struct - { - bool is_cblock; - } - V014; - struct - { - ffestpBeruIx ix; - bool label; - bool left; - ffeexprContext context; - } - beru; - struct - { - ffestpCloseIx ix; - bool label; - bool left; - ffeexprContext context; - } - close; - struct - { - ffestpDeleteIx ix; - bool label; - bool left; - ffeexprContext context; - } - delete; - struct - { - ffestpDeleteIx ix; - bool label; - bool left; - ffeexprContext context; - } - find; - struct - { - ffestpInquireIx ix; - bool label; - bool left; - ffeexprContext context; - bool may_be_iolength; - } - inquire; - struct - { - ffestpOpenIx ix; - bool label; - bool left; - ffeexprContext context; - } - open; - struct - { - ffestpReadIx ix; - bool label; - bool left; - ffeexprContext context; - } - read; - struct - { - ffestpRewriteIx ix; - bool label; - bool left; - ffeexprContext context; - } - rewrite; - struct - { - ffestpWriteIx ix; - bool label; - bool left; - ffeexprContext context; - } - vxtcode; - struct - { - ffestpWriteIx ix; - bool label; - bool left; - ffeexprContext context; - } - write; - struct - { - bool started; - } - common; - struct - { - bool started; - } - dimension; - struct - { - bool started; - } - dimlist; - struct - { - const char *badname; - ffestrFirst first_kw; - bool is_subr; - } - dummy; - struct - { - ffebld kind; /* Kind type parameter, if any. */ - ffelexToken kindt; /* Kind type first token, if any. */ - ffebld len; /* Length type parameter, if any. */ - ffelexToken lent; /* Length type parameter, if any. */ - ffelexHandler handler; - ffelexToken recursive; - ffebld expr; - ffesttTokenList toklist;/* For ambiguity resolution. */ - ffesttImpList imps; /* List of IMPLICIT letters. */ - ffelexHandler imp_handler; /* Call if paren list wasn't letters. */ - const char *badname; - ffestrOther kw; /* INTENT(IN/OUT/INOUT). */ - ffestpType type; - bool parameter; /* If PARAMETER attribute seen (governs =expr - context). */ - bool coloncolon; /* If COLONCOLON seen (allows =expr). */ - bool aster_after; /* "*" seen after, not before, - [RECURSIVE]FUNCTIONxyz. */ - bool empty; /* Ambig function dummy arg list empty so - far? */ - bool imp_started; /* Started IMPLICIT statement already. */ - bool imp_seen_comma; /* TRUE if next COMMA within parens means not - R541. */ - } - decl; - struct - { - bool started; - } - vxtparam; - }; /* Merge with the one in ffestb later. */ - -/* Private include files. */ - - -/* Internal structure definitions. */ - - -/* Static objects accessed by functions in this module. */ - -static union ffestb_subrargs_u_ ffestb_subrargs_; -static union ffestb_local_u_ ffestb_local_; - -/* Static functions (internal). */ - -static void ffestb_subr_ambig_to_ents_ (void); -static ffelexHandler ffestb_subr_ambig_nope_ (ffelexToken t); -static ffelexHandler ffestb_subr_dimlist_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_subr_dimlist_1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_subr_dimlist_2_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_subr_name_list_ (ffelexToken t); -static ffelexHandler ffestb_subr_name_list_1_ (ffelexToken t); -static void ffestb_subr_R1001_append_p_ (void); -static ffelexHandler ffestb_decl_kindparam_ (ffelexToken t); -static ffelexHandler ffestb_decl_kindparam_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_kindparam_2_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_starkind_ (ffelexToken t); -static ffelexHandler ffestb_decl_starlen_ (ffelexToken t); -static ffelexHandler ffestb_decl_starlen_1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_typeparams_ (ffelexToken t); -static ffelexHandler ffestb_decl_typeparams_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_typeparams_2_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_typeparams_3_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_subr_label_list_ (ffelexToken t); -static ffelexHandler ffestb_subr_label_list_1_ (ffelexToken t); -static ffelexHandler ffestb_do1_ (ffelexToken t); -static ffelexHandler ffestb_do2_ (ffelexToken t); -static ffelexHandler ffestb_do3_ (ffelexToken t); -static ffelexHandler ffestb_do4_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_do5_ (ffelexToken t); -static ffelexHandler ffestb_do6_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_do7_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_do8_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_do9_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_else1_ (ffelexToken t); -static ffelexHandler ffestb_else2_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_else3_ (ffelexToken t); -static ffelexHandler ffestb_else4_ (ffelexToken t); -static ffelexHandler ffestb_else5_ (ffelexToken t); -static ffelexHandler ffestb_end1_ (ffelexToken t); -static ffelexHandler ffestb_end2_ (ffelexToken t); -static ffelexHandler ffestb_end3_ (ffelexToken t); -static ffelexHandler ffestb_goto1_ (ffelexToken t); -static ffelexHandler ffestb_goto2_ (ffelexToken t); -static ffelexHandler ffestb_goto3_ (ffelexToken t); -static ffelexHandler ffestb_goto4_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_goto5_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_goto6_ (ffelexToken t); -static ffelexHandler ffestb_goto7_ (ffelexToken t); -static ffelexHandler ffestb_halt1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_if1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_if2_ (ffelexToken t); -static ffelexHandler ffestb_if3_ (ffelexToken t); -static ffelexHandler ffestb_let1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_let2_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_varlist5_ (ffelexToken t); -static ffelexHandler ffestb_varlist6_ (ffelexToken t); -static ffelexHandler ffestb_R5221_ (ffelexToken t); -static ffelexHandler ffestb_R5222_ (ffelexToken t); -static ffelexHandler ffestb_R5223_ (ffelexToken t); -static ffelexHandler ffestb_R5224_ (ffelexToken t); -static ffelexHandler ffestb_R5281_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R5282_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R5283_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R5284_ (ffelexToken t); -static ffelexHandler ffestb_R5371_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R5372_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R5373_ (ffelexToken t); -static ffelexHandler ffestb_R5421_ (ffelexToken t); -static ffelexHandler ffestb_R5422_ (ffelexToken t); -static ffelexHandler ffestb_R5423_ (ffelexToken t); -static ffelexHandler ffestb_R5424_ (ffelexToken t); -static ffelexHandler ffestb_R5425_ (ffelexToken t); -static ffelexHandler ffestb_R5441_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R5442_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R5443_ (ffelexToken t); -static ffelexHandler ffestb_R5444_ (ffelexToken t); -static ffelexHandler ffestb_R8341_ (ffelexToken t); -static ffelexHandler ffestb_R8351_ (ffelexToken t); -static ffelexHandler ffestb_R8381_ (ffelexToken t); -static ffelexHandler ffestb_R8382_ (ffelexToken t); -static ffelexHandler ffestb_R8383_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R8401_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R8402_ (ffelexToken t); -static ffelexHandler ffestb_R8403_ (ffelexToken t); -static ffelexHandler ffestb_R8404_ (ffelexToken t); -static ffelexHandler ffestb_R8405_ (ffelexToken t); -static ffelexHandler ffestb_R8406_ (ffelexToken t); -static ffelexHandler ffestb_R8407_ (ffelexToken t); -static ffelexHandler ffestb_R11021_ (ffelexToken t); -static ffelexHandler ffestb_R1111_1_ (ffelexToken t); -static ffelexHandler ffestb_R1111_2_ (ffelexToken t); -static ffelexHandler ffestb_R12121_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R12271_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_construct1_ (ffelexToken t); -static ffelexHandler ffestb_construct2_ (ffelexToken t); -static ffelexHandler ffestb_R8091_ (ffelexToken t); -static ffelexHandler ffestb_R8092_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R8093_ (ffelexToken t); -static ffelexHandler ffestb_R8101_ (ffelexToken t); -static ffelexHandler ffestb_R8102_ (ffelexToken t); -static ffelexHandler ffestb_R8103_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R8104_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R10011_ (ffelexToken t); -static ffelexHandler ffestb_R10012_ (ffelexToken t); -static ffelexHandler ffestb_R10013_ (ffelexToken t); -static ffelexHandler ffestb_R10014_ (ffelexToken t); -static ffelexHandler ffestb_R10015_ (ffelexToken t); -static ffelexHandler ffestb_R10016_ (ffelexToken t); -static ffelexHandler ffestb_R10017_ (ffelexToken t); -static ffelexHandler ffestb_R10018_ (ffelexToken t); -static ffelexHandler ffestb_R10019_ (ffelexToken t); -static ffelexHandler ffestb_R100110_ (ffelexToken t); -static ffelexHandler ffestb_R100111_ (ffelexToken t); -static ffelexHandler ffestb_R100112_ (ffelexToken t); -static ffelexHandler ffestb_R100113_ (ffelexToken t); -static ffelexHandler ffestb_R100114_ (ffelexToken t); -static ffelexHandler ffestb_R100115_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R100116_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R100117_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R100118_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_S3P41_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0141_ (ffelexToken t); -static ffelexHandler ffestb_V0142_ (ffelexToken t); -static ffelexHandler ffestb_V0143_ (ffelexToken t); -static ffelexHandler ffestb_V0144_ (ffelexToken t); -#if FFESTB_KILL_EASY_ -static void ffestb_subr_kill_easy_ (ffestpInquireIx max); -#else -static void ffestb_subr_kill_accept_ (void); -static void ffestb_subr_kill_beru_ (void); -static void ffestb_subr_kill_close_ (void); -static void ffestb_subr_kill_delete_ (void); -static void ffestb_subr_kill_find_ (void); /* Not written yet. */ -static void ffestb_subr_kill_inquire_ (void); -static void ffestb_subr_kill_open_ (void); -static void ffestb_subr_kill_print_ (void); -static void ffestb_subr_kill_read_ (void); -static void ffestb_subr_kill_rewrite_ (void); -static void ffestb_subr_kill_type_ (void); -static void ffestb_subr_kill_vxtcode_ (void); /* Not written yet. */ -static void ffestb_subr_kill_write_ (void); -#endif -static ffelexHandler ffestb_beru1_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_beru2_ (ffelexToken t); -static ffelexHandler ffestb_beru3_ (ffelexToken t); -static ffelexHandler ffestb_beru4_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_beru5_ (ffelexToken t); -static ffelexHandler ffestb_beru6_ (ffelexToken t); -static ffelexHandler ffestb_beru7_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_beru8_ (ffelexToken t); -static ffelexHandler ffestb_beru9_ (ffelexToken t); -static ffelexHandler ffestb_beru10_ (ffelexToken t); -static ffelexHandler ffestb_R9041_ (ffelexToken t); -static ffelexHandler ffestb_R9042_ (ffelexToken t); -static ffelexHandler ffestb_R9043_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9044_ (ffelexToken t); -static ffelexHandler ffestb_R9045_ (ffelexToken t); -static ffelexHandler ffestb_R9046_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9047_ (ffelexToken t); -static ffelexHandler ffestb_R9048_ (ffelexToken t); -static ffelexHandler ffestb_R9049_ (ffelexToken t); -static ffelexHandler ffestb_R9071_ (ffelexToken t); -static ffelexHandler ffestb_R9072_ (ffelexToken t); -static ffelexHandler ffestb_R9073_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9074_ (ffelexToken t); -static ffelexHandler ffestb_R9075_ (ffelexToken t); -static ffelexHandler ffestb_R9076_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9077_ (ffelexToken t); -static ffelexHandler ffestb_R9078_ (ffelexToken t); -static ffelexHandler ffestb_R9079_ (ffelexToken t); -static ffelexHandler ffestb_R9091_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9092_ (ffelexToken t); -static ffelexHandler ffestb_R9093_ (ffelexToken t); -static ffelexHandler ffestb_R9094_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9095_ (ffelexToken t); -static ffelexHandler ffestb_R9096_ (ffelexToken t); -static ffelexHandler ffestb_R9097_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9098_ (ffelexToken t); -static ffelexHandler ffestb_R9099_ (ffelexToken t); -static ffelexHandler ffestb_R90910_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R90911_ (ffelexToken t); -static ffelexHandler ffestb_R90912_ (ffelexToken t); -static ffelexHandler ffestb_R90913_ (ffelexToken t); -static ffelexHandler ffestb_R90914_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R90915_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9101_ (ffelexToken t); -static ffelexHandler ffestb_R9102_ (ffelexToken t); -static ffelexHandler ffestb_R9103_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9104_ (ffelexToken t); -static ffelexHandler ffestb_R9105_ (ffelexToken t); -static ffelexHandler ffestb_R9106_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9107_ (ffelexToken t); -static ffelexHandler ffestb_R9108_ (ffelexToken t); -static ffelexHandler ffestb_R9109_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R91010_ (ffelexToken t); -static ffelexHandler ffestb_R91011_ (ffelexToken t); -static ffelexHandler ffestb_R91012_ (ffelexToken t); -static ffelexHandler ffestb_R91013_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R91014_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9111_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9112_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9231_ (ffelexToken t); -static ffelexHandler ffestb_R9232_ (ffelexToken t); -static ffelexHandler ffestb_R9233_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9234_ (ffelexToken t); -static ffelexHandler ffestb_R9235_ (ffelexToken t); -static ffelexHandler ffestb_R9236_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_R9237_ (ffelexToken t); -static ffelexHandler ffestb_R9238_ (ffelexToken t); -static ffelexHandler ffestb_R9239_ (ffelexToken t); -static ffelexHandler ffestb_R92310_ (ffelexToken t); -static ffelexHandler ffestb_R92311_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0201_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0202_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_dummy1_ (ffelexToken t); -static ffelexHandler ffestb_dummy2_ (ffelexToken t); -static ffelexHandler ffestb_R5241_ (ffelexToken t); -static ffelexHandler ffestb_R5242_ (ffelexToken t); -static ffelexHandler ffestb_R5243_ (ffelexToken t); -static ffelexHandler ffestb_R5244_ (ffelexToken t); -static ffelexHandler ffestb_R5471_ (ffelexToken t); -static ffelexHandler ffestb_R5472_ (ffelexToken t); -static ffelexHandler ffestb_R5473_ (ffelexToken t); -static ffelexHandler ffestb_R5474_ (ffelexToken t); -static ffelexHandler ffestb_R5475_ (ffelexToken t); -static ffelexHandler ffestb_R5476_ (ffelexToken t); -static ffelexHandler ffestb_R5477_ (ffelexToken t); -static ffelexHandler ffestb_R12291_ (ffelexToken t); -static ffelexHandler ffestb_R12292_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_chartype1_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrs_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrs_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrs_2_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrs_7_ (ffelexToken t); -static ffelexHandler ffestb_decl_attrsp_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_2_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_3_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_4_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_5_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_6_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_ents_7_ (ffelexToken t); -static ffelexHandler ffestb_decl_ents_8_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_ents_9_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_ents_10_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_ents_11_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_2_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_3_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_4_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_entsp_5_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_6_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_7_ (ffelexToken t); -static ffelexHandler ffestb_decl_entsp_8_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_2_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_3_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_decl_funcname_4_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_5_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_6_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_7_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_8_ (ffelexToken t); -static ffelexHandler ffestb_decl_funcname_9_ (ffelexToken t); -static ffelexHandler ffestb_V0271_ (ffelexToken t); -static ffelexHandler ffestb_V0272_ (ffelexToken ft, ffebld expr, - ffelexToken t); -static ffelexHandler ffestb_V0273_ (ffelexToken t); -static ffelexHandler ffestb_decl_R5391_ (ffelexToken t); -static ffelexHandler ffestb_decl_R5392_ (ffelexToken t); -static ffelexHandler ffestb_decl_R5394_ (ffelexToken t); -static ffelexHandler ffestb_decl_R5395_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539letters_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539letters_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539letters_2_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539letters_3_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539letters_4_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539letters_5_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539maybe_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539maybe_1_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539maybe_2_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539maybe_3_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539maybe_4_ (ffelexToken t); -static ffelexHandler ffestb_decl_R539maybe_5_ (ffelexToken t); - -/* Internal macros. */ - -#if FFESTB_KILL_EASY_ -#define ffestb_subr_kill_accept_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_acceptix) -#define ffestb_subr_kill_beru_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_beruix) -#define ffestb_subr_kill_close_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_closeix) -#define ffestb_subr_kill_delete_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_deleteix) -#define ffestb_subr_kill_find_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_findix) -#define ffestb_subr_kill_inquire_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_inquireix) -#define ffestb_subr_kill_open_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_openix) -#define ffestb_subr_kill_print_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_printix) -#define ffestb_subr_kill_read_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_readix) -#define ffestb_subr_kill_rewrite_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_rewriteix) -#define ffestb_subr_kill_type_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_typeix) -#define ffestb_subr_kill_vxtcode_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_vxtcodeix) -#define ffestb_subr_kill_write_() \ - ffestb_subr_kill_easy_((ffestpInquireIx) FFESTP_writeix) -#endif - -/* ffestb_subr_ambig_nope_ -- Cleans up and aborts ambig w/o confirming - - ffestb_subr_ambig_nope_(); - - Switch from ambiguity handling in _entsp_ functions to handling entities - in _ents_ (perform housekeeping tasks). */ - -static ffelexHandler -ffestb_subr_ambig_nope_ (ffelexToken t) -{ - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_subr_ambig_to_ents_ -- Switches from ambiguity to entity decl - - ffestb_subr_ambig_to_ents_(); - - Switch from ambiguity handling in _entsp_ functions to handling entities - in _ents_ (perform housekeeping tasks). */ - -static void -ffestb_subr_ambig_to_ents_ (void) -{ - ffelexToken nt; - - nt = ffelex_token_name_from_names (ffesta_tokens[1], 0, 0); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_tokens[1] = nt; - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (!ffestb_local_.decl.aster_after) - { - if (ffestb_local_.decl.type == FFESTP_typeCHARACTER) - { - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, - ffestb_local_.decl.len, ffestb_local_.decl.lent); - if (ffestb_local_.decl.kindt != NULL) - { - ffelex_token_kill (ffestb_local_.decl.kindt); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - } - if (ffestb_local_.decl.lent != NULL) - { - ffelex_token_kill (ffestb_local_.decl.lent); - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - } - } - else - { - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, NULL, - NULL); - if (ffestb_local_.decl.kindt != NULL) - { - ffelex_token_kill (ffestb_local_.decl.kindt); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - } - } - return; - } - if (ffestb_local_.decl.type == FFESTP_typeCHARACTER) - { - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, NULL, NULL); - if (ffestb_local_.decl.kindt != NULL) - { - ffelex_token_kill (ffestb_local_.decl.kindt); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - } - } - else if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - /* NAME/NAMES token already in ffesta_tokens[1]. */ -} - -/* ffestb_subr_dimlist_ -- OPEN_PAREN expr - - (ffestb_subr_dimlist_) // to expression handler - - Deal with a dimension list. - - 19-Dec-90 JCB 1.1 - Detect too many dimensions if backend wants it. */ - -static ffelexHandler -ffestb_subr_dimlist_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; -#ifdef FFECOM_dimensionsMAX - if (ffestb_subrargs_.dim_list.ndims++ == FFECOM_dimensionsMAX) - { - ffesta_ffebad_1t (FFEBAD_TOO_MANY_DIMS, ft); - ffestb_subrargs_.dim_list.ok = TRUE; /* Not a parse error, really. */ - return (ffelexHandler) ffestb_subrargs_.dim_list.handler; - } -#endif - ffestt_dimlist_append (ffestb_subrargs_.dim_list.dims, NULL, expr, - ffelex_token_use (t)); - ffestb_subrargs_.dim_list.ok = TRUE; - return (ffelexHandler) ffestb_subrargs_.dim_list.handler; - - case FFELEX_typeCOMMA: - if ((expr != NULL) && (ffebld_op (expr) == FFEBLD_opSTAR)) - break; -#ifdef FFECOM_dimensionsMAX - if (ffestb_subrargs_.dim_list.ndims++ == FFECOM_dimensionsMAX) - { - ffesta_ffebad_1t (FFEBAD_TOO_MANY_DIMS, ft); - return (ffelexHandler) ffeexpr_rhs (ffestb_subrargs_.dim_list.pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_2_); - } -#endif - ffestt_dimlist_append (ffestb_subrargs_.dim_list.dims, NULL, expr, - ffelex_token_use (t)); - return (ffelexHandler) ffeexpr_rhs (ffestb_subrargs_.dim_list.pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_); - - case FFELEX_typeCOLON: - if ((expr != NULL) && (ffebld_op (expr) == FFEBLD_opSTAR)) - break; -#ifdef FFECOM_dimensionsMAX - if (ffestb_subrargs_.dim_list.ndims++ == FFECOM_dimensionsMAX) - { - ffesta_ffebad_1t (FFEBAD_TOO_MANY_DIMS, ft); - return (ffelexHandler) ffeexpr_rhs (ffestb_subrargs_.dim_list.pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_2_); - } -#endif - ffestt_dimlist_append (ffestb_subrargs_.dim_list.dims, expr, NULL, - ffelex_token_use (t)); /* NULL second expr for - now, just plug in. */ - return (ffelexHandler) ffeexpr_rhs (ffestb_subrargs_.dim_list.pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_1_); - - default: - break; - } - - ffestb_subrargs_.dim_list.ok = FALSE; - return (ffelexHandler) ffestb_subrargs_.dim_list.handler (t); -} - -/* ffestb_subr_dimlist_1_ -- OPEN_PAREN expr COLON expr - - (ffestb_subr_dimlist_1_) // to expression handler - - Get the upper bound. */ - -static ffelexHandler -ffestb_subr_dimlist_1_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_subrargs_.dim_list.dims->previous->upper = expr; - ffestb_subrargs_.dim_list.ok = TRUE; - return (ffelexHandler) ffestb_subrargs_.dim_list.handler; - - case FFELEX_typeCOMMA: - if ((expr != NULL) && (ffebld_op (expr) == FFEBLD_opSTAR)) - break; - ffestb_subrargs_.dim_list.dims->previous->upper = expr; - return (ffelexHandler) ffeexpr_rhs (ffestb_subrargs_.dim_list.pool, - ffestb_subrargs_.dim_list.ctx, (ffeexprCallback) ffestb_subr_dimlist_); - - default: - break; - } - - ffestb_subrargs_.dim_list.ok = FALSE; - return (ffelexHandler) ffestb_subrargs_.dim_list.handler (t); -} - -/* ffestb_subr_dimlist_2_ -- OPEN_PAREN too-many-dim-exprs - - (ffestb_subr_dimlist_2_) // to expression handler - - Get the upper bound. */ - -static ffelexHandler -ffestb_subr_dimlist_2_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_subrargs_.dim_list.ok = TRUE; /* Not a parse error, really. */ - return (ffelexHandler) ffestb_subrargs_.dim_list.handler; - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLON: - if ((expr != NULL) && (ffebld_op (expr) == FFEBLD_opSTAR)) - break; - return (ffelexHandler) ffeexpr_rhs (ffestb_subrargs_.dim_list.pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_2_); - - default: - break; - } - - ffestb_subrargs_.dim_list.ok = FALSE; - return (ffelexHandler) ffestb_subrargs_.dim_list.handler (t); -} - -/* ffestb_subr_name_list_ -- Collect a list of name args and close-paren - - return ffestb_subr_name_list_; // to lexer after seeing OPEN_PAREN - - This implements R1224 in the Fortran 90 spec. The arg list may be - empty, or be a comma-separated list (an optional trailing comma currently - results in a warning but no other effect) of arguments. For functions, - however, "*" is invalid (we implement dummy-arg-name, rather than R1224 - dummy-arg, which itself is either dummy-arg-name or "*"). */ - -static ffelexHandler -ffestb_subr_name_list_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (ffestt_tokenlist_count (ffestb_subrargs_.name_list.args) != 0) - { /* Trailing comma, warn. */ - ffebad_start (FFEBAD_TRAILING_COMMA); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - ffestb_subrargs_.name_list.ok = TRUE; - ffestb_subrargs_.name_list.close_paren = ffelex_token_use (t); - if (ffestb_subrargs_.name_list.names) - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_subrargs_.name_list.handler; - - case FFELEX_typeASTERISK: - if (!ffestb_subrargs_.name_list.is_subr) - break; - - case FFELEX_typeNAME: - ffestt_tokenlist_append (ffestb_subrargs_.name_list.args, - ffelex_token_use (t)); - return (ffelexHandler) ffestb_subr_name_list_1_; - - default: - break; - } - - ffestb_subrargs_.name_list.ok = FALSE; - ffestb_subrargs_.name_list.close_paren = ffelex_token_use (t); - if (ffestb_subrargs_.name_list.names) - ffelex_set_names (TRUE); - return (ffelexHandler) (*ffestb_subrargs_.name_list.handler) (t); -} - -/* ffestb_subr_name_list_1_ -- NAME or ASTERISK - - return ffestb_subr_name_list_1_; // to lexer - - The next token must be COMMA or CLOSE_PAREN, either way go to original - state, but only after adding the appropriate name list item. */ - -static ffelexHandler -ffestb_subr_name_list_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_subr_name_list_; - - case FFELEX_typeCLOSE_PAREN: - ffestb_subrargs_.name_list.ok = TRUE; - ffestb_subrargs_.name_list.close_paren = ffelex_token_use (t); - if (ffestb_subrargs_.name_list.names) - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_subrargs_.name_list.handler; - - default: - ffestb_subrargs_.name_list.ok = FALSE; - ffestb_subrargs_.name_list.close_paren = ffelex_token_use (t); - if (ffestb_subrargs_.name_list.names) - ffelex_set_names (TRUE); - return (ffelexHandler) (*ffestb_subrargs_.name_list.handler) (t); - } -} - -static void -ffestb_subr_R1001_append_p_ (void) -{ - ffesttFormatList f; - - if (!ffestb_local_.format.pre.present) - { - ffesta_ffebad_1t (FFEBAD_FORMAT_BAD_P_SPEC, ffestb_local_.format.t); - ffelex_token_kill (ffestb_local_.format.t); - return; - } - - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeP; - f->t = ffestb_local_.format.t; - f->u.R1010.val = ffestb_local_.format.pre; -} - -/* ffestb_decl_kindparam_ -- "type" OPEN_PAREN - - return ffestb_decl_kindparam_; // to lexer - - Handle "[KIND=]expr)". */ - -static ffelexHandler -ffestb_decl_kindparam_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_kindparam_1_; - - default: - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextKINDTYPE, - (ffeexprCallback) ffestb_decl_kindparam_2_))) - (t); - } -} - -/* ffestb_decl_kindparam_1_ -- "type" OPEN_PAREN NAME - - return ffestb_decl_kindparam_1_; // to lexer - - Handle "[KIND=]expr)". */ - -static ffelexHandler -ffestb_decl_kindparam_1_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestr_other (ffesta_tokens[1]) != FFESTR_otherKIND) - break; - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextKINDTYPE, (ffeexprCallback) ffestb_decl_kindparam_2_); - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextKINDTYPE, (ffeexprCallback) ffestb_decl_kindparam_2_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_kindparam_2_ -- "type" OPEN_PAREN ["KIND="] expr - - (ffestb_decl_kindparam_2_) // to expression handler - - Handle "[KIND=]expr)". */ - -static ffelexHandler -ffestb_decl_kindparam_2_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_local_.decl.kind = expr; - ffestb_local_.decl.kindt = ffelex_token_use (ft); - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_local_.decl.handler; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_starkind_ -- "type" ASTERISK - - return ffestb_decl_starkind_; // to lexer - - Handle NUMBER. */ - -static ffelexHandler -ffestb_decl_starkind_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestb_local_.decl.kindt = ffelex_token_use (t); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_local_.decl.handler; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_starlen_ -- "CHARACTER" ASTERISK - - return ffestb_decl_starlen_; // to lexer - - Handle NUMBER. */ - -static ffelexHandler -ffestb_decl_starlen_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = ffelex_token_use (t); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_local_.decl.handler; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCHARACTERSIZE, - (ffeexprCallback) ffestb_decl_starlen_1_); - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_starlen_1_ -- "CHARACTER" ASTERISK OPEN_PAREN expr - - (ffestb_decl_starlen_1_) // to expression handler - - Handle CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_starlen_1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestb_local_.decl.len = expr; - ffestb_local_.decl.lent = ffelex_token_use (ft); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_local_.decl.handler; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_typeparams_ -- "CHARACTER" OPEN_PAREN - - return ffestb_decl_typeparams_; // to lexer - - Handle "[KIND=]expr)". */ - -static ffelexHandler -ffestb_decl_typeparams_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_typeparams_1_; - - default: - if (ffestb_local_.decl.lent == NULL) - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCHARACTERSIZE, - (ffeexprCallback) ffestb_decl_typeparams_2_))) - (t); - if (ffestb_local_.decl.kindt != NULL) - break; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextKINDTYPE, - (ffeexprCallback) ffestb_decl_typeparams_3_))) - (t); - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_typeparams_1_ -- "CHARACTER" OPEN_PAREN NAME - - return ffestb_decl_typeparams_1_; // to lexer - - Handle "[KIND=]expr)". */ - -static ffelexHandler -ffestb_decl_typeparams_1_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - switch (ffestr_other (ffesta_tokens[1])) - { - case FFESTR_otherLEN: - if (ffestb_local_.decl.lent != NULL) - break; - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCHARACTERSIZE, - (ffeexprCallback) ffestb_decl_typeparams_2_); - - case FFESTR_otherKIND: - if (ffestb_local_.decl.kindt != NULL) - break; - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextKINDTYPE, - (ffeexprCallback) ffestb_decl_typeparams_3_); - - default: - break; - } - break; - - default: - nt = ffesta_tokens[1]; - if (ffestb_local_.decl.lent == NULL) - next = (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCHARACTERSIZE, - (ffeexprCallback) ffestb_decl_typeparams_2_))) - (nt); - else if (ffestb_local_.decl.kindt == NULL) - next = (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextKINDTYPE, - (ffeexprCallback) ffestb_decl_typeparams_3_))) - (nt); - else - { - ffesta_tokens[1] = nt; - break; - } - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_typeparams_2_ -- "CHARACTER" OPEN_PAREN ["LEN="] expr - - (ffestb_decl_typeparams_2_) // to expression handler - - Handle "[LEN=]expr)". */ - -static ffelexHandler -ffestb_decl_typeparams_2_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_local_.decl.len = expr; - ffestb_local_.decl.lent = ffelex_token_use (ft); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_local_.decl.handler; - - case FFELEX_typeCOMMA: - ffestb_local_.decl.len = expr; - ffestb_local_.decl.lent = ffelex_token_use (ft); - return (ffelexHandler) ffestb_decl_typeparams_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_typeparams_3_ -- "CHARACTER" OPEN_PAREN ["KIND="] expr - - (ffestb_decl_typeparams_3_) // to expression handler - - Handle "[KIND=]expr)". */ - -static ffelexHandler -ffestb_decl_typeparams_3_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_local_.decl.kind = expr; - ffestb_local_.decl.kindt = ffelex_token_use (ft); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_local_.decl.handler; - - case FFELEX_typeCOMMA: - ffestb_local_.decl.kind = expr; - ffestb_local_.decl.kindt = ffelex_token_use (ft); - return (ffelexHandler) ffestb_decl_typeparams_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - ffestb_local_.decl.badname, - t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_subr_label_list_ -- Collect a tokenlist of labels and close-paren - - return ffestb_subr_label_list_; // to lexer after seeing OPEN_PAREN - - First token must be a NUMBER. Must be followed by zero or more COMMA - NUMBER pairs. Must then be followed by a CLOSE_PAREN. If all ok, put - the NUMBER tokens in a token list and return via the handler for the - token after CLOSE_PAREN. Else return via - same handler, but with the ok return value set FALSE. */ - -static ffelexHandler -ffestb_subr_label_list_ (ffelexToken t) -{ - if (ffelex_token_type (t) == FFELEX_typeNUMBER) - { - ffestt_tokenlist_append (ffestb_subrargs_.label_list.labels, - ffelex_token_use (t)); - return (ffelexHandler) ffestb_subr_label_list_1_; - } - - ffestb_subrargs_.label_list.ok = FALSE; - return (ffelexHandler) (*ffestb_subrargs_.label_list.handler) (t); -} - -/* ffestb_subr_label_list_1_ -- NUMBER - - return ffestb_subr_label_list_1_; // to lexer after seeing NUMBER - - The next token must be COMMA, in which case go back to - ffestb_subr_label_list_, or CLOSE_PAREN, in which case set ok to TRUE - and go to the handler. */ - -static ffelexHandler -ffestb_subr_label_list_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_subr_label_list_; - - case FFELEX_typeCLOSE_PAREN: - ffestb_subrargs_.label_list.ok = TRUE; - return (ffelexHandler) ffestb_subrargs_.label_list.handler; - - default: - ffestb_subrargs_.label_list.ok = FALSE; - return (ffelexHandler) (*ffestb_subrargs_.label_list.handler) (t); - } -} - -/* ffestb_do -- Parse the DO statement - - return ffestb_do; // to lexer - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_do (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexHandler next; - ffelexToken nt; - ffestrSecond kw; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstDO) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_do1_; - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_do2_; - - case FFELEX_typeNAME: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_do3_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_do1_ (t); - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstDO) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlDO); - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: /* Must be "DO" label "WHILE". */ - if (! ISDIGIT (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = ffelex_token_number_from_names (ffesta_tokens[0], - i); - p += ffelex_token_length (ffesta_tokens[1]); - i += ffelex_token_length (ffesta_tokens[1]); - if (((*p) != 'W') && ((*p) != 'w')) - goto bad_i1; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - kw = ffestr_second (nt); - ffelex_token_kill (nt); - if (kw != FFESTR_secondWHILE) - goto bad_i1; /* :::::::::::::::::::: */ - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDOWHILE, (ffeexprCallback) ffestb_do4_); - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (*p == '\0') - { - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_do2_; - } - if (! ISDIGIT (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = ffelex_token_number_from_names (ffesta_tokens[0], - i); - p += ffelex_token_length (ffesta_tokens[1]); - i += ffelex_token_length (ffesta_tokens[1]); - if (*p != '\0') - goto bad_i1; /* :::::::::::::::::::: */ - return (ffelexHandler) ffestb_do2_; - - case FFELEX_typeEQUALS: - if (ISDIGIT (*p)) - { - ffesta_tokens[1] - = ffelex_token_number_from_names (ffesta_tokens[0], i); - p += ffelex_token_length (ffesta_tokens[1]); - i += ffelex_token_length (ffesta_tokens[1]); - } - else - ffesta_tokens[1] = NULL; - if (!ffesrc_is_name_init (*p)) - goto bad_i1; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_lhs - (ffesta_output_pool, FFEEXPR_contextDO, - (ffeexprCallback) ffestb_do6_))) - (nt); - ffelex_token_kill (nt); /* Will get it back in _6_... */ - return (ffelexHandler) (*next) (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (ISDIGIT (*p)) - { - ffesta_tokens[1] - = ffelex_token_number_from_names (ffesta_tokens[0], i); - p += ffelex_token_length (ffesta_tokens[1]); - i += ffelex_token_length (ffesta_tokens[1]); - } - else - ffesta_tokens[1] = NULL; - if (*p != '\0') - goto bad_i1; /* :::::::::::::::::::: */ - return (ffelexHandler) ffestb_do1_ (t); - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i1: /* :::::::::::::::::::: */ - if (ffesta_tokens[1]) - ffelex_token_kill (ffesta_tokens[1]); - -bad_i: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "DO", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dowhile -- Parse the DOWHILE statement - - return ffestb_dowhile; // to lexer - - Make sure the statement has a valid form for the DOWHILE statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_dowhile (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstDOWHILE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlDOWHILE); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDOWHILE, (ffeexprCallback) ffestb_do4_); - - case FFELEX_typeEQUALS:/* Not really DOWHILE, but DOWHILExyz=.... */ - ffesta_tokens[1] = NULL; - nt = ffelex_token_name_from_names (ffesta_tokens[0], FFESTR_firstlDO, - 0); - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_lhs - (ffesta_output_pool, FFEEXPR_contextDO, - (ffeexprCallback) ffestb_do6_))) - (nt); - ffelex_token_kill (nt); /* Will get it back in _6_... */ - return (ffelexHandler) (*next) (t); - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "DO", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do1_ -- "DO" [label] - - return ffestb_do1_; // to lexer - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - return (ffelexHandler) ffestb_do2_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (ffesta_tokens[1] != NULL) - ffestc_R819B (ffesta_construct_name, ffesta_tokens[1], NULL, - NULL); - else - ffestc_R820B (ffesta_construct_name, NULL, NULL); - } - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeNAME: - return (ffelexHandler) ffestb_do2_ (t); - - default: - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do2_ -- "DO" [label] [,] - - return ffestb_do2_; // to lexer - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_do3_; - - default: - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do3_ -- "DO" [label] [,] NAME - - return ffestb_do3_; // to lexer - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do3_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextDO, (ffeexprCallback) ffestb_do6_))) - (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[2]); /* Will get it back in _6_... */ - return (ffelexHandler) (*next) (t); - - case FFELEX_typeOPEN_PAREN: - if (ffestr_second (ffesta_tokens[2]) != FFESTR_secondWHILE) - { - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid token. */ - } - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDOWHILE, (ffeexprCallback) ffestb_do4_); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do4_ -- "DO" [label] [,] "WHILE" OPEN_PAREN expr - - (ffestb_do4_) // to expression handler - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do4_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffesta_tokens[2] = ffelex_token_use (ft); - ffestb_local_.dowhile.expr = expr; - return (ffelexHandler) ffestb_do5_; - - default: - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do5_ -- "DO" [label] [,] "WHILE" OPEN_PAREN expr CLOSE_PAREN - - return ffestb_do5_; // to lexer - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (ffesta_tokens[1] != NULL) - ffestc_R819B (ffesta_construct_name, ffesta_tokens[1], - ffestb_local_.dowhile.expr, ffesta_tokens[2]); - else - ffestc_R820B (ffesta_construct_name, ffestb_local_.dowhile.expr, - ffesta_tokens[2]); - } - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do6_ -- "DO" [label] [,] var-expr - - (ffestb_do6_) // to expression handler - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do6_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - /* _3_ already ensured that this would be an EQUALS token. If not, it is a - bug in the FFE. */ - - assert (ffelex_token_type (t) == FFELEX_typeEQUALS); - - ffesta_tokens[2] = ffelex_token_use (ft); - ffestb_local_.do_stmt.var = expr; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDO, (ffeexprCallback) ffestb_do7_); -} - -/* ffestb_do7_ -- "DO" [label] [,] var-expr EQUALS expr - - (ffestb_do7_) // to expression handler - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do7_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (expr == NULL) - break; - ffesta_tokens[3] = ffelex_token_use (ft); - ffestb_local_.do_stmt.start = expr; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDO, (ffeexprCallback) ffestb_do8_); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do8_ -- "DO" [label] [,] var-expr EQUALS expr COMMA expr - - (ffestb_do8_) // to expression handler - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do8_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - ffesta_tokens[4] = ffelex_token_use (ft); - ffestb_local_.do_stmt.end = expr; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDO, (ffeexprCallback) ffestb_do9_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - ffesta_tokens[4] = ffelex_token_use (ft); - ffestb_local_.do_stmt.end = expr; - return (ffelexHandler) ffestb_do9_ (NULL, NULL, t); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[3]); - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_do9_ -- "DO" [label] [,] var-expr EQUALS expr COMMA expr - [COMMA expr] - - (ffestb_do9_) // to expression handler - - Make sure the statement has a valid form for the DO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_do9_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if ((expr == NULL) && (ft != NULL)) - break; - if (!ffesta_is_inhibited ()) - { - if (ffesta_tokens[1] != NULL) - ffestc_R819A (ffesta_construct_name, ffesta_tokens[1], - ffestb_local_.do_stmt.var, ffesta_tokens[2], - ffestb_local_.do_stmt.start, ffesta_tokens[3], - ffestb_local_.do_stmt.end, ffesta_tokens[4], expr, ft); - else - ffestc_R820A (ffesta_construct_name, ffestb_local_.do_stmt.var, - ffesta_tokens[2], ffestb_local_.do_stmt.start, - ffesta_tokens[3], ffestb_local_.do_stmt.end, - ffesta_tokens[4], expr, ft); - } - ffelex_token_kill (ffesta_tokens[4]); - ffelex_token_kill (ffesta_tokens[3]); - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[4]); - ffelex_token_kill (ffesta_tokens[3]); - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_else -- Parse the ELSE statement - - return ffestb_else; // to lexer - - Make sure the statement has a valid form for the ELSE statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_else (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstELSE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - ffestb_args.elsexyz.second = FFESTR_secondNone; - return (ffelexHandler) ffestb_else1_ (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - break; - } - - ffesta_confirmed (); - ffestb_args.elsexyz.second = ffesta_second_kw; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_else1_; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstELSE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlELSE) - { - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlELSE); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - } - else - ffesta_tokens[1] = NULL; - ffestb_args.elsexyz.second = FFESTR_secondNone; - return (ffelexHandler) ffestb_else1_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "ELSE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_elsexyz -- Parse an ELSEIF/ELSEWHERE statement - - return ffestb_elsexyz; // to lexer - - Expects len and second to be set in ffestb_args.elsexyz to the length - of the ELSExyz keyword involved and the corresponding ffestrSecond value. */ - -ffelexHandler -ffestb_elsexyz (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (ffesta_first_kw == FFESTR_firstELSEIF) - goto bad_0; /* :::::::::::::::::::: */ - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_else1_ (t); - - case FFELEX_typeNAME: - ffesta_confirmed (); - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (ffesta_first_kw != FFESTR_firstELSEIF) - goto bad_0; /* :::::::::::::::::::: */ - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_else1_ (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (ffesta_first_kw != FFESTR_firstELSEIF) - goto bad_1; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlELSEIF) - { - i = FFESTR_firstlELSEIF; - goto bad_i; /* :::::::::::::::::::: */ - } - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_else1_ (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlELSE); - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_else1_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "ELSE IF", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_else1_ -- "ELSE" (NAME) - - return ffestb_else1_; // to lexer - - If EOS/SEMICOLON, implement the appropriate statement (keep in mind that - "ELSE WHERE" is ambiguous at the syntactic level). If OPEN_PAREN, start - expression analysis with callback at _2_. */ - -static ffelexHandler -ffestb_else1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - if (ffestb_args.elsexyz.second == FFESTR_secondIF) - { - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIF, (ffeexprCallback) ffestb_else2_); - } - /* Fall through. */ - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE", t); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - } - - switch (ffestb_args.elsexyz.second) - { - - default: - if (!ffesta_is_inhibited ()) - ffestc_R805 (ffesta_tokens[1]); - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); -} - -/* ffestb_else2_ -- "ELSE" "IF" OPEN_PAREN expr - - (ffestb_else2_) // to expression handler - - Make sure the next token is CLOSE_PAREN. */ - -static ffelexHandler -ffestb_else2_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffestb_local_.else_stmt.expr = expr; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_else3_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE IF", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_else3_ -- "ELSE" "IF" OPEN_PAREN expr CLOSE_PAREN - - return ffestb_else3_; // to lexer - - Make sure the next token is "THEN". */ - -static ffelexHandler -ffestb_else3_ (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_confirmed (); - if (ffestr_first (t) == FFESTR_firstTHEN) - return (ffelexHandler) ffestb_else4_; - break; - - case FFELEX_typeNAMES: - ffesta_confirmed (); - if (ffestr_first (t) != FFESTR_firstTHEN) - break; - if (ffelex_token_length (t) == FFESTR_firstlTHEN) - return (ffelexHandler) ffestb_else4_; - p = ffelex_token_text (t) + (i = FFESTR_firstlTHEN); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[2] = ffelex_token_name_from_names (t, i, 0); - return (ffelexHandler) ffestb_else5_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE IF", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "ELSE IF", t, i, NULL); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_else4_ -- "ELSE" "IF" OPEN_PAREN expr CLOSE_PAREN "THEN" - - return ffestb_else4_; // to lexer - - Handle a NAME or EOS/SEMICOLON, then go to state _5_. */ - -static ffelexHandler -ffestb_else4_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_tokens[2] = NULL; - return (ffelexHandler) ffestb_else5_ (t); - - case FFELEX_typeNAME: - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_else5_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE IF", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_else5_ -- "ELSE" "IF" OPEN_PAREN expr CLOSE_PAREN "THEN" - - return ffestb_else5_; // to lexer - - Make sure the next token is EOS or SEMICOLON; implement R804. */ - -static ffelexHandler -ffestb_else5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R804 (ffestb_local_.else_stmt.expr, ffesta_tokens[1], - ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_tokens[2] != NULL) - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ELSE IF", t); - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_tokens[2] != NULL) - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_end -- Parse the END statement - - return ffestb_end; // to lexer - - Make sure the statement has a valid form for the END statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_end (ffelexToken t) -{ - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstEND) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_tokens[1] = NULL; - ffestb_args.endxyz.second = FFESTR_secondNone; - return (ffelexHandler) ffestb_end3_ (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - break; - } - - ffesta_confirmed (); - ffestb_args.endxyz.second = ffesta_second_kw; - switch (ffesta_second_kw) - { - case FFESTR_secondFILE: - ffestb_args.beru.badname = "ENDFILE"; - return (ffelexHandler) ffestb_beru; - - case FFESTR_secondBLOCK: - return (ffelexHandler) ffestb_end1_; - - case FFESTR_secondNone: - goto bad_1; /* :::::::::::::::::::: */ - - default: - return (ffelexHandler) ffestb_end2_; - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstEND) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlEND) - { - i = FFESTR_firstlEND; - goto bad_i; /* :::::::::::::::::::: */ - } - ffesta_tokens[1] = NULL; - ffestb_args.endxyz.second = FFESTR_secondNone; - return (ffelexHandler) ffestb_end3_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "END", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_endxyz -- Parse an ENDxyz statement - - return ffestb_endxyz; // to lexer - - Expects len and second to be set in ffestb_args.endxyz to the length - of the ENDxyz keyword involved and the corresponding ffestrSecond value. */ - -ffelexHandler -ffestb_endxyz (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_end3_ (t); - - case FFELEX_typeNAME: - ffesta_confirmed (); - switch (ffestb_args.endxyz.second) - { - case FFESTR_secondBLOCK: - if (ffesta_second_kw != FFESTR_secondDATA) - goto bad_1; /* :::::::::::::::::::: */ - return (ffelexHandler) ffestb_end2_; - - default: - return (ffelexHandler) ffestb_end2_ (t); - } - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - if (ffestb_args.endxyz.second == FFESTR_secondBLOCK) - { - i = FFESTR_firstlEND; - goto bad_i; /* :::::::::::::::::::: */ - } - if (ffelex_token_length (ffesta_tokens[0]) != ffestb_args.endxyz.len) - { - p = ffelex_token_text (ffesta_tokens[0]) - + (i = ffestb_args.endxyz.len); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_end3_ (t); - } - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_end3_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "END", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_end1_ -- "END" "BLOCK" - - return ffestb_end1_; // to lexer - - Make sure the next token is "DATA". */ - -static ffelexHandler -ffestb_end1_ (ffelexToken t) -{ - if ((ffelex_token_type (t) == FFELEX_typeNAME) - && (ffesrc_strcmp_2c (ffe_case_match (), ffelex_token_text (t), "DATA", - "data", "Data") - == 0)) - { - return (ffelexHandler) ffestb_end2_; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_end2_ -- "END" - - return ffestb_end2_; // to lexer - - Make sure the next token is a NAME or EOS. */ - -static ffelexHandler -ffestb_end2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_end3_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_end3_ (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_end3_ -- "END" (NAME) - - return ffestb_end3_; // to lexer - - Make sure the next token is an EOS, then implement the statement. */ - -static ffelexHandler -ffestb_end3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", t); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (ffestb_args.endxyz.second == FFESTR_secondNone) - { - if (!ffesta_is_inhibited ()) - ffestc_end (); - return (ffelexHandler) ffesta_zero (t); - } - break; - } - - switch (ffestb_args.endxyz.second) - { - case FFESTR_secondIF: - if (!ffesta_is_inhibited ()) - ffestc_R806 (ffesta_tokens[1]); - break; - - case FFESTR_secondSELECT: - if (!ffesta_is_inhibited ()) - ffestc_R811 (ffesta_tokens[1]); - break; - - case FFESTR_secondDO: - if (!ffesta_is_inhibited ()) - ffestc_R825 (ffesta_tokens[1]); - break; - - case FFESTR_secondPROGRAM: - if (!ffesta_is_inhibited ()) - ffestc_R1103 (ffesta_tokens[1]); - break; - - case FFESTR_secondBLOCK: - case FFESTR_secondBLOCKDATA: - if (!ffesta_is_inhibited ()) - ffestc_R1112 (ffesta_tokens[1]); - break; - - case FFESTR_secondFUNCTION: - if (!ffesta_is_inhibited ()) - ffestc_R1221 (ffesta_tokens[1]); - break; - - case FFESTR_secondSUBROUTINE: - if (!ffesta_is_inhibited ()) - ffestc_R1225 (ffesta_tokens[1]); - break; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "END", ffesta_tokens[0]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); -} - -/* ffestb_goto -- Parse the GOTO statement - - return ffestb_goto; // to lexer - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_goto (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffesta_first_kw) - { - case FFESTR_firstGO: - if ((ffelex_token_type (t) != FFELEX_typeNAME) - || (ffesta_second_kw != FFESTR_secondTO)) - goto bad_1; /* :::::::::::::::::::: */ - ffesta_confirmed (); - return (ffelexHandler) ffestb_goto1_; - - case FFESTR_firstGOTO: - return (ffelexHandler) ffestb_goto1_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstGOTO) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - case FFELEX_typePERCENT: /* Since GOTO I%J is apparently valid - in '90. */ - case FFELEX_typeCOMMA: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - } - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlGOTO) - { - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlGOTO); - if (ISDIGIT (*p)) - { - nt = ffelex_token_number_from_names (ffesta_tokens[0], i); - p += ffelex_token_length (nt); - i += ffelex_token_length (nt); - if (*p != '\0') - { - ffelex_token_kill (nt); - goto bad_i; /* :::::::::::::::::::: */ - } - } - else if (ffesrc_is_name_init (*p)) - { - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - } - else - goto bad_i; /* :::::::::::::::::::: */ - next = (ffelexHandler) ffestb_goto1_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } - return (ffelexHandler) ffestb_goto1_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "GO TO", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "GO TO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "GO TO", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_goto1_ -- "GOTO" or "GO" "TO" - - return ffestb_goto1_; // to lexer - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_goto1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - if (ffelex_token_type (ffesta_tokens[0]) == FFELEX_typeNAME) - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_goto2_; - - case FFELEX_typeOPEN_PAREN: - ffesta_tokens[1] = ffelex_token_use (t); - ffestb_subrargs_.label_list.labels = ffestt_tokenlist_create (); - ffestb_subrargs_.label_list.handler = (ffelexHandler) ffestb_goto3_; - return (ffelexHandler) ffestb_subr_label_list_; - - case FFELEX_typeNAME: - if (ffelex_token_type (ffesta_tokens[0]) == FFELEX_typeNAME) - ffesta_confirmed (); - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextAGOTO, - (ffeexprCallback) ffestb_goto4_))) - (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "GO TO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_goto2_ -- "GO/TO" NUMBER - - return ffestb_goto2_; // to lexer - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_goto2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R836 (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "GO TO", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_goto3_ -- "GO/TO" OPEN_PAREN label-list CLOSE_PAREN - - return ffestb_goto3_; // to lexer - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_goto3_ (ffelexToken t) -{ - if (!ffestb_subrargs_.label_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextCGOTO, - (ffeexprCallback) ffestb_goto5_); - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - - default: - ffesta_confirmed (); - /* Fall through. */ - case FFELEX_typeOPEN_PAREN: /* Could still be assignment!! */ - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextCGOTO, - (ffeexprCallback) ffestb_goto5_))) - (t); - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "computed-GOTO", t); - ffelex_token_kill (ffesta_tokens[1]); - ffestt_tokenlist_kill (ffestb_subrargs_.label_list.labels); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_goto4_ -- "GO/TO" expr - - (ffestb_goto4_) // to expression handler - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_goto4_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffestb_local_.go_to.expr = expr; - return (ffelexHandler) ffestb_goto6_; - - case FFELEX_typeOPEN_PAREN: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffestb_local_.go_to.expr = expr; - return (ffelexHandler) ffestb_goto6_ (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R839 (expr, ft, NULL); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "assigned-GOTO", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_goto5_ -- "GO/TO" OPEN_PAREN label-list CLOSE_PAREN (COMMA) expr - - (ffestb_goto5_) // to expression handler - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_goto5_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R837 (ffestb_subrargs_.label_list.labels, expr, ft); - ffelex_token_kill (ffesta_tokens[1]); - ffestt_tokenlist_kill (ffestb_subrargs_.label_list.labels); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "computed-GOTO", t); - ffelex_token_kill (ffesta_tokens[1]); - ffestt_tokenlist_kill (ffestb_subrargs_.label_list.labels); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_goto6_ -- "GO/TO" expr (COMMA) - - return ffestb_goto6_; // to lexer - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_goto6_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffesta_tokens[2] = ffelex_token_use (t); - ffestb_subrargs_.label_list.labels = ffestt_tokenlist_create (); - ffestb_subrargs_.label_list.handler = (ffelexHandler) ffestb_goto7_; - return (ffelexHandler) ffestb_subr_label_list_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "assigned-GOTO", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_goto7_ -- "GO/TO" expr (COMMA) OPEN_PAREN label-list CLOSE_PAREN - - return ffestb_goto7_; // to lexer - - Make sure the statement has a valid form for the GOTO statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_goto7_ (ffelexToken t) -{ - if (!ffestb_subrargs_.label_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R839 (ffestb_local_.go_to.expr, ffesta_tokens[1], - ffestb_subrargs_.label_list.labels); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffestt_tokenlist_kill (ffestb_subrargs_.label_list.labels); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "assigned-GOTO", t); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffestt_tokenlist_kill (ffestb_subrargs_.label_list.labels); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_halt -- Parse the STOP/PAUSE statement - - return ffestb_halt; // to lexer - - Make sure the statement has a valid form for the STOP/PAUSE statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_halt (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeQUOTE: - ffesta_confirmed (); - break; - } - - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextSTOP, - (ffeexprCallback) ffestb_halt1_))) - (t); - - case FFELEX_typeNAMES: - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeQUOTE: - ffesta_confirmed (); - break; - } - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextSTOP, - (ffeexprCallback) ffestb_halt1_); - next = (ffelexHandler) ffelex_splice_tokens (next, ffesta_tokens[0], - ffestb_args.halt.len); - if (next == NULL) - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - (ffesta_first_kw == FFESTR_firstSTOP) - ? "STOP" : "PAUSE", - ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - (ffesta_first_kw == FFESTR_firstSTOP) - ? "STOP" : "PAUSE", - t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_halt1_ -- "STOP/PAUSE" expr - - (ffestb_halt1_) // to expression handler - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_halt1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (ffesta_first_kw == FFESTR_firstSTOP) - ffestc_R842 (expr, ft); - else - ffestc_R843 (expr, ft); - } - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - (ffesta_first_kw == FFESTR_firstSTOP) - ? "STOP" : "PAUSE", - t); - break; - } - - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_if -- Parse an IF statement - - return ffestb_if; // to lexer - - Make sure the statement has a valid form for an IF statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_if (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstIF) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstIF) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlIF) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextIF, - (ffeexprCallback) ffestb_if1_); - -bad_0: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IF", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IF", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_if1_ -- "IF" OPEN_PAREN expr - - (ffestb_if1_) // to expression handler - - Make sure the next token is CLOSE_PAREN. */ - -static ffelexHandler -ffestb_if1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffestb_local_.if_stmt.expr = expr; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_if2_; - - default: - break; - } - - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IF", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_if2_ -- "IF" OPEN_PAREN expr CLOSE_PAREN - - return ffestb_if2_; // to lexer - - Make sure the next token is NAME. */ - -static ffelexHandler -ffestb_if2_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - ffesta_confirmed (); - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_if3_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - if ((ffesta_construct_name == NULL) - || (ffelex_token_type (t) != FFELEX_typeNUMBER)) - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IF", t); - else - ffesta_ffebad_2st (FFEBAD_INVALID_STMT_FORM, "CONSTRUCT", - ffesta_construct_name, t); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_if3_ -- "IF" OPEN_PAREN expr CLOSE_PAREN NAME - - return ffestb_if3_; // to lexer - - If the next token is EOS or SEMICOLON and the preceding NAME was "THEN", - implement R803. Else, implement R807 and send the preceding NAME followed - by the current token. */ - -static ffelexHandler -ffestb_if3_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (ffestr_first (ffesta_tokens[2]) == FFESTR_firstTHEN) - { - if (!ffesta_is_inhibited ()) - ffestc_R803 (ffesta_construct_name, ffestb_local_.if_stmt.expr, - ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - return (ffelexHandler) ffesta_zero (t); - } - break; - - default: - break; - } - - if (ffesta_construct_name != NULL) - { - if (!ffesta_is_inhibited ()) - ffesta_ffebad_2st (FFEBAD_INVALID_STMT_FORM, "CONSTRUCT", - ffesta_construct_name, ffesta_tokens[2]); - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - } - - if (!ffesta_is_inhibited ()) - ffestc_R807 (ffestb_local_.if_stmt.expr, ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - { - ffelexToken my_2 = ffesta_tokens[2]; - - next = (ffelexHandler) ffesta_two (my_2, t); - ffelex_token_kill (my_2); - } - return (ffelexHandler) next; -} - -/* ffestb_let -- Parse an assignment statement - - return ffestb_let; // to lexer - - Make sure the statement has a valid form for an assignment statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_let (ffelexToken t) -{ - ffelexHandler next; - bool vxtparam; /* TRUE if it might really be a VXT PARAMETER - stmt. */ - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - vxtparam = FALSE; - break; - - case FFELEX_typeNAMES: - vxtparam = TRUE; - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - case FFELEX_typePERCENT: - case FFELEX_typePOINTS: - ffestb_local_.let.vxtparam = FALSE; - break; - - case FFELEX_typeEQUALS: - if (!vxtparam || (ffesta_first_kw != FFESTR_firstPARAMETER)) - { - ffestb_local_.let.vxtparam = FALSE; - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + FFESTR_firstlPARAMETER; - ffestb_local_.let.vxtparam = ffesrc_is_name_init (*p); - break; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - next = (ffelexHandler) (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextLET, - (ffeexprCallback) ffestb_let1_))) - (ffesta_tokens[0]); - return (ffelexHandler) (*next) (t); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "assignment", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "assignment", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_let1_ -- expr - - (ffestb_let1_) // to expression handler - - Make sure the next token is EQUALS or POINTS. */ - -static ffelexHandler -ffestb_let1_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - ffestb_local_.let.dest = expr; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextLET, (ffeexprCallback) ffestb_let2_); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "assignment", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_let2_ -- expr EQUALS/POINTS expr - - (ffestb_end2_) // to expression handler - - Make sure the next token is EOS or SEMICOLON; implement the statement. */ - -static ffelexHandler -ffestb_let2_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (ffestb_local_.let.vxtparam && !ffestc_is_let_not_V027 ()) - break; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_let (ffestb_local_.let.dest, expr, ft); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, - (ffelex_token_type (ffesta_tokens[1]) == FFELEX_typeEQUALS) - ? "assignment" : "pointer-assignment", - t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_varlist -- Parse EXTERNAL/INTENT/INTRINSIC/OPTIONAL/PUBLIC/PRIVATE - statement - - return ffestb_varlist; // to lexer - - Make sure the statement has a valid form. If it - does, implement the statement. */ - -ffelexHandler -ffestb_varlist (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - switch (ffesta_first_kw) - { - case FFESTR_firstEXTERNAL: - if (!ffesta_is_inhibited ()) - ffestc_R1207_start (); - break; - - case FFESTR_firstINTRINSIC: - if (!ffesta_is_inhibited ()) - ffestc_R1208_start (); - break; - - default: - break; - } - return (ffelexHandler) ffestb_varlist5_ (t); - } - - case FFELEX_typeNAMES: - p = ffelex_token_text (ffesta_tokens[0]) + (i = ffestb_args.varlist.len); - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (*p != '\0') - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - ffesta_confirmed (); /* Error, but clearly intended. */ - - if (*p != '\0') - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - switch (ffesta_first_kw) - { - case FFESTR_firstEXTERNAL: - if (!ffesta_is_inhibited ()) - ffestc_R1207_start (); - break; - - case FFESTR_firstINTRINSIC: - if (!ffesta_is_inhibited ()) - ffestc_R1208_start (); - break; - - default: - break; - } - return (ffelexHandler) ffestb_varlist5_ (t); - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - /* Here, we have at least one char after the first keyword and t is - COMMA or EOS/SEMICOLON. Also we know that this form is valid for - only the statements reaching here (specifically, INTENT won't reach - here). */ - - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstEXTERNAL: - ffestc_R1207_start (); - break; - - case FFESTR_firstINTRINSIC: - ffestc_R1208_start (); - break; - - default: - assert (FALSE); - } - } - next = (ffelexHandler) ffestb_varlist5_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_varlist5_ -- Handles the list of variable names - - return ffestb_varlist5_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_varlist5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_varlist6_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, t); - break; - } - - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstEXTERNAL: - ffestc_R1207_finish (); - break; - - case FFESTR_firstINTRINSIC: - ffestc_R1208_finish (); - break; - - default: - assert (FALSE); - } - } - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_varlist6_ -- (whatever) NAME - - return ffestb_varlist6_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_varlist6_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstEXTERNAL: - ffestc_R1207_item (ffesta_tokens[1]); - break; - - case FFESTR_firstINTRINSIC: - ffestc_R1208_item (ffesta_tokens[1]); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_varlist5_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstEXTERNAL: - ffestc_R1207_item (ffesta_tokens[1]); - ffestc_R1207_finish (); - break; - - case FFESTR_firstINTRINSIC: - ffestc_R1208_item (ffesta_tokens[1]); - ffestc_R1208_finish (); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.varlist.badname, t); - break; - } - - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstEXTERNAL: - ffestc_R1207_finish (); - break; - - case FFESTR_firstINTRINSIC: - ffestc_R1208_finish (); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R522 -- Parse the SAVE statement - - return ffestb_R522; // to lexer - - Make sure the statement has a valid form for the SAVE statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R522 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstSAVE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R522 (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeNAME: - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R522start (); - return (ffelexHandler) ffestb_R5221_ (t); - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R522start (); - return (ffelexHandler) ffestb_R5221_; - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstSAVE) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlSAVE); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (*p != '\0') - break; - if (!ffesta_is_inhibited ()) - ffestc_R522 (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - ffestc_R522start (); - return (ffelexHandler) ffestb_R5221_ (t); - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - ffestc_R522start (); - return (ffelexHandler) ffestb_R5221_; - } - - /* Here, we have at least one char after "SAVE" and t is COMMA or - EOS/SEMICOLON. */ - - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - if (!ffesta_is_inhibited ()) - ffestc_R522start (); - next = (ffelexHandler) ffestb_R5221_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SAVE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SAVE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "SAVE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5221_ -- "SAVE" [COLONCOLON] - - return ffestb_R5221_; // to lexer - - Handle NAME or SLASH. */ - -static ffelexHandler -ffestb_R5221_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffestb_local_.R522.is_cblock = FALSE; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R5224_; - - case FFELEX_typeSLASH: - ffestb_local_.R522.is_cblock = TRUE; - return (ffelexHandler) ffestb_R5222_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SAVE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R522finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5222_ -- "SAVE" [COLONCOLON] SLASH - - return ffestb_R5222_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_R5222_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R5223_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SAVE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R522finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5223_ -- "SAVE" [COLONCOLON] SLASH NAME - - return ffestb_R5223_; // to lexer - - Handle SLASH. */ - -static ffelexHandler -ffestb_R5223_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_R5224_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SAVE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R522finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5224_ -- "SAVE" [COLONCOLON] R523 - - return ffestb_R5224_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_R5224_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - { - if (ffestb_local_.R522.is_cblock) - ffestc_R522item_cblock (ffesta_tokens[1]); - else - ffestc_R522item_object (ffesta_tokens[1]); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R5221_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - if (ffestb_local_.R522.is_cblock) - ffestc_R522item_cblock (ffesta_tokens[1]); - else - ffestc_R522item_object (ffesta_tokens[1]); - ffestc_R522finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SAVE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R522finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R528 -- Parse the DATA statement - - return ffestb_R528; // to lexer - - Make sure the statement has a valid form for the DATA statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R528 (ffelexToken t) -{ - unsigned const char *p; - ffeTokenLength i; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstDATA) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeSLASH: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - break; - - case FFELEX_typeOPEN_PAREN: - break; - } - ffestb_local_.data.started = FALSE; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5281_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstDATA) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlDATA); - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (*p == '\0') - { - ffestb_local_.data.started = FALSE; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextDATA, - (ffeexprCallback) - ffestb_R5281_))) - (t); - } - break; - - case FFELEX_typeCOMMA: - case FFELEX_typeSLASH: - ffesta_confirmed (); - break; - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffestb_local_.data.started = FALSE; - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - next = (ffelexHandler) (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5281_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DATA", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DATA", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "DATA", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5281_ -- "DATA" expr-list - - (ffestb_R5281_) // to expression handler - - Handle COMMA or SLASH. */ - -static ffelexHandler -ffestb_R5281_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.data.started) - { - ffestc_R528_start (); - ffestb_local_.data.started = TRUE; - } - ffestc_R528_item_object (expr, ft); - } - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5281_); - - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.data.started) - { - ffestc_R528_start (); - ffestb_local_.data.started = TRUE; - } - ffestc_R528_item_object (expr, ft); - ffestc_R528_item_startvals (); - } - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5282_); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DATA", t); - break; - } - - if (ffestb_local_.data.started && !ffesta_is_inhibited ()) - ffestc_R528_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5282_ -- "DATA" expr-list SLASH expr-list - - (ffestb_R5282_) // to expression handler - - Handle ASTERISK, COMMA, or SLASH. */ - -static ffelexHandler -ffestb_R5282_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R528_item_value (NULL, NULL, expr, ft); - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5282_); - - case FFELEX_typeASTERISK: - if (expr == NULL) - break; - ffestb_local_.data.expr = ffeexpr_convert (expr, ft, t, - FFEINFO_basictypeINTEGER, - FFEINFO_kindtypeINTEGER1, - 0, - FFETARGET_charactersizeNONE, - FFEEXPR_contextLET); - ffesta_tokens[1] = ffelex_token_use (ft); - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5283_); - - case FFELEX_typeSLASH: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_R528_item_value (NULL, NULL, expr, ft); - ffestc_R528_item_endvals (t); - } - return (ffelexHandler) ffestb_R5284_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DATA", t); - break; - } - - if (!ffesta_is_inhibited ()) - { - ffestc_R528_item_endvals (t); - ffestc_R528_finish (); - } - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5283_ -- "DATA" expr-list SLASH expr ASTERISK expr - - (ffestb_R5283_) // to expression handler - - Handle COMMA or SLASH. */ - -static ffelexHandler -ffestb_R5283_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R528_item_value (ffestb_local_.data.expr, ffesta_tokens[1], - expr, ft); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5282_); - - case FFELEX_typeSLASH: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_R528_item_value (ffestb_local_.data.expr, ffesta_tokens[1], - expr, ft); - ffestc_R528_item_endvals (t); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R5284_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DATA", t); - break; - } - - if (!ffesta_is_inhibited ()) - { - ffestc_R528_item_endvals (t); - ffestc_R528_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5284_ -- "DATA" expr-list SLASH expr-list SLASH - - return ffestb_R5284_; // to lexer - - Handle [COMMA] NAME or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_R5284_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5281_); - - case FFELEX_typeNAME: - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_R5281_))) - (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R528_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "DATA", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R528_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R537 -- Parse a PARAMETER statement - - return ffestb_R537; // to lexer - - Make sure the statement has a valid form for an PARAMETER statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R537 (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstPARAMETER) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstPARAMETER) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlPARAMETER) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - ffestb_local_.parameter.started = FALSE; - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextPARAMETER, - (ffeexprCallback) ffestb_R5371_); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R5371_ -- "PARAMETER" OPEN_PAREN expr - - (ffestb_R5371_) // to expression handler - - Make sure the next token is EQUALS. */ - -static ffelexHandler -ffestb_R5371_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffestb_local_.parameter.expr = expr; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextPARAMETER, (ffeexprCallback) ffestb_R5372_); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - if (ffestb_local_.parameter.started) - ffestc_R537_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5372_ -- "PARAMETER" OPEN_PAREN expr EQUALS expr - - (ffestb_R5372_) // to expression handler - - Make sure the next token is COMMA or CLOSE_PAREN. */ - -static ffelexHandler -ffestb_R5372_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.parameter.started) - { - ffestc_R537_start (); - ffestb_local_.parameter.started = TRUE; - } - ffestc_R537_item (ffestb_local_.parameter.expr, ffesta_tokens[1], - expr, ft); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextPARAMETER, - (ffeexprCallback) ffestb_R5371_); - - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.parameter.started) - { - ffestc_R537_start (); - ffestb_local_.parameter.started = TRUE; - } - ffestc_R537_item (ffestb_local_.parameter.expr, ffesta_tokens[1], - expr, ft); - ffestc_R537_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R5373_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - if (ffestb_local_.parameter.started) - ffestc_R537_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5373_ -- "PARAMETER" OPEN_PAREN expr EQUALS expr CLOSE_PAREN - - return ffestb_R5373_; // to lexer - - Make sure the next token is EOS or SEMICOLON, or generate an error. All - cleanup has already been done, by the way. */ - -static ffelexHandler -ffestb_R5373_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R542 -- Parse the NAMELIST statement - - return ffestb_R542; // to lexer - - Make sure the statement has a valid form for the NAMELIST statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R542 (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstNAMELIST) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstNAMELIST) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlNAMELIST); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeSLASH: - break; - } - - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R542_start (); - return (ffelexHandler) ffestb_R5421_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NAMELIST", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NAMELIST", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "NAMELIST", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5421_ -- "NAMELIST" SLASH - - return ffestb_R5421_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_R5421_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (!ffesta_is_inhibited ()) - ffestc_R542_item_nlist (t); - return (ffelexHandler) ffestb_R5422_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NAMELIST", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R542_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5422_ -- "NAMELIST" SLASH NAME - - return ffestb_R5422_; // to lexer - - Handle SLASH. */ - -static ffelexHandler -ffestb_R5422_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_R5423_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NAMELIST", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R542_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5423_ -- "NAMELIST" SLASH NAME SLASH - - return ffestb_R5423_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_R5423_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (!ffesta_is_inhibited ()) - ffestc_R542_item_nitem (t); - return (ffelexHandler) ffestb_R5424_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NAMELIST", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R542_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5424_ -- "NAMELIST" SLASH NAME SLASH NAME - - return ffestb_R5424_; // to lexer - - Handle COMMA, EOS/SEMICOLON, or SLASH. */ - -static ffelexHandler -ffestb_R5424_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R5425_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R542_finish (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_R5421_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NAMELIST", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R542_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5425_ -- "NAMELIST" SLASH NAME SLASH NAME COMMA - - return ffestb_R5425_; // to lexer - - Handle NAME or SLASH. */ - -static ffelexHandler -ffestb_R5425_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (!ffesta_is_inhibited ()) - ffestc_R542_item_nitem (t); - return (ffelexHandler) ffestb_R5424_; - - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_R5421_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "NAMELIST", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R542_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R544 -- Parse an EQUIVALENCE statement - - return ffestb_R544; // to lexer - - Make sure the statement has a valid form for an EQUIVALENCE statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R544 (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstEQUIVALENCE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstEQUIVALENCE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlEQUIVALENCE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - ffestb_local_.equivalence.started = FALSE; - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextEQUIVALENCE, - (ffeexprCallback) ffestb_R5441_); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EQUIVALENCE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EQUIVALENCE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R5441_ -- "EQUIVALENCE" OPEN_PAREN expr - - (ffestb_R5441_) // to expression handler - - Make sure the next token is COMMA. */ - -static ffelexHandler -ffestb_R5441_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - ffestb_local_.equivalence.exprs = ffestt_exprlist_create (); - ffestt_exprlist_append (ffestb_local_.equivalence.exprs, expr, - ffelex_token_use (ft)); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextEQUIVALENCE, - (ffeexprCallback) ffestb_R5442_); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EQUIVALENCE", t); - if (ffestb_local_.equivalence.started) - ffestc_R544_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5442_ -- "EQUIVALENCE" OPEN_PAREN expr COMMA expr - - (ffestb_R5442_) // to expression handler - - Make sure the next token is COMMA or CLOSE_PAREN. For COMMA, we just - append the expression to our list and continue; for CLOSE_PAREN, we - append the expression and move to _3_. */ - -static ffelexHandler -ffestb_R5442_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - ffestt_exprlist_append (ffestb_local_.equivalence.exprs, expr, - ffelex_token_use (ft)); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextEQUIVALENCE, - (ffeexprCallback) ffestb_R5442_); - - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestt_exprlist_append (ffestb_local_.equivalence.exprs, expr, - ffelex_token_use (ft)); - return (ffelexHandler) ffestb_R5443_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EQUIVALENCE", t); - if (ffestb_local_.equivalence.started) - ffestc_R544_finish (); - ffestt_exprlist_kill (ffestb_local_.equivalence.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5443_ -- "EQUIVALENCE" OPEN_PAREN expr COMMA expr CLOSE_PAREN - - return ffestb_R5443_; // to lexer - - Make sure the next token is COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_R5443_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.equivalence.started) - { - ffestc_R544_start (); - ffestb_local_.equivalence.started = TRUE; - } - ffestc_R544_item (ffestb_local_.equivalence.exprs); - } - ffestt_exprlist_kill (ffestb_local_.equivalence.exprs); - return (ffelexHandler) ffestb_R5444_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.equivalence.started) - { - ffestc_R544_start (); - ffestb_local_.equivalence.started = TRUE; - } - ffestc_R544_item (ffestb_local_.equivalence.exprs); - ffestc_R544_finish (); - } - ffestt_exprlist_kill (ffestb_local_.equivalence.exprs); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EQUIVALENCE", t); - if (ffestb_local_.equivalence.started) - ffestc_R544_finish (); - ffestt_exprlist_kill (ffestb_local_.equivalence.exprs); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5444_ -- "EQUIVALENCE" OPEN_PAREN expr COMMA expr CLOSE_PAREN COMMA - - return ffestb_R5444_; // to lexer - - Make sure the next token is OPEN_PAREN, or generate an error. */ - -static ffelexHandler -ffestb_R5444_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextEQUIVALENCE, - (ffeexprCallback) ffestb_R5441_); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EQUIVALENCE", t); - if (ffestb_local_.equivalence.started) - ffestc_R544_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R834 -- Parse the CYCLE statement - - return ffestb_R834; // to lexer - - Make sure the statement has a valid form for the CYCLE statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_R834 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCYCLE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R8341_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_R8341_ (t); - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstCYCLE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlCYCLE); - if (*p == '\0') - { - ffesta_tokens[1] = NULL; - } - else - { - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - } - return (ffelexHandler) ffestb_R8341_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CYCLE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CYCLE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "CYCLE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8341_ -- "CYCLE" [NAME] - - return ffestb_R8341_; // to lexer - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R8341_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R834 (ffesta_tokens[1]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CYCLE", t); - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R835 -- Parse the EXIT statement - - return ffestb_R835; // to lexer - - Make sure the statement has a valid form for the EXIT statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_R835 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstEXIT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R8351_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_R8351_ (t); - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstEXIT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlEXIT); - if (*p == '\0') - { - ffesta_tokens[1] = NULL; - } - else - { - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - } - return (ffelexHandler) ffestb_R8351_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EXIT", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EXIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "EXIT", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8351_ -- "EXIT" [NAME] - - return ffestb_R8351_; // to lexer - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R8351_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R835 (ffesta_tokens[1]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "EXIT", t); - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R838 -- Parse the ASSIGN statement - - return ffestb_R838; // to lexer - - Make sure the statement has a valid form for the ASSIGN statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R838 (ffelexToken t) -{ - unsigned const char *p; - ffeTokenLength i; - ffelexHandler next; - ffelexToken et; /* First token in target. */ - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstASSIGN) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNUMBER: - break; - } - ffesta_tokens[1] = ffelex_token_use (t); - ffesta_confirmed (); - return (ffelexHandler) ffestb_R8381_; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstASSIGN) - goto bad_0; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - /* Fall through. */ - case FFELEX_typePERCENT: - case FFELEX_typeOPEN_PAREN: - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlASSIGN); - if (! ISDIGIT (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_number_from_names (ffesta_tokens[0], i); - p += ffelex_token_length (ffesta_tokens[1]); /* Skip to "TO". */ - i += ffelex_token_length (ffesta_tokens[1]); - if (!ffesrc_char_match_init (*p, 'T', 't') /* "TO". */ - || (++i, !ffesrc_char_match_noninit (*++p, 'O', 'o'))) - { - bad_i_1: /* :::::::::::::::::::: */ - ffelex_token_kill (ffesta_tokens[1]); - goto bad_i; /* :::::::::::::::::::: */ - } - ++p, ++i; - if (!ffesrc_is_name_init (*p)) - goto bad_i_1; /* :::::::::::::::::::: */ - et = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - next = (ffelexHandler) - (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - FFEEXPR_contextASSIGN, - (ffeexprCallback) - ffestb_R8383_))) - (et); - ffelex_token_kill (et); - return (ffelexHandler) (*next) (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ASSIGN", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid first token. */ - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ASSIGN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "ASSIGN", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8381_ -- "ASSIGN" NUMBER - - return ffestb_R8381_; // to lexer - - Make sure the next token is "TO". */ - -static ffelexHandler -ffestb_R8381_ (ffelexToken t) -{ - if ((ffelex_token_type (t) == FFELEX_typeNAME) - && (ffesrc_strcmp_2c (ffe_case_match (), ffelex_token_text (t), "TO", "to", - "To") == 0)) - { - return (ffelexHandler) ffestb_R8382_; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ASSIGN", t); - if (ffelex_token_type (t) == FFELEX_typeNAME) - return (ffelexHandler) ffestb_R8382_ (t); /* Maybe user forgot "TO". */ - - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8382_ -- "ASSIGN" NUMBER ("TO") - - return ffestb_R8382_; // to lexer - - Make sure the next token is a name, then pass it along to the expression - evaluator as an LHS expression. The callback function is _3_. */ - -static ffelexHandler -ffestb_R8382_ (ffelexToken t) -{ - if (ffelex_token_type (t) == FFELEX_typeNAME) - { - return (ffelexHandler) - (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, FFEEXPR_contextASSIGN, - (ffeexprCallback) ffestb_R8383_))) - (t); - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ASSIGN", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8383_ -- "ASSIGN" NUMBER ("TO") expression - - (ffestb_R8383_) // to expression handler - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R8383_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R838 (ffesta_tokens[1], expr, ft); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "ASSIGN", t); - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R840 -- Parse an arithmetic-IF statement - - return ffestb_R840; // to lexer - - Make sure the statement has a valid form for an arithmetic-IF statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R840 (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlIF) - goto bad_0; /* :::::::::::::::::::: */ - if (ffesta_first_kw != FFESTR_firstIF) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstIF) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextARITHIF, - (ffeexprCallback) ffestb_R8401_); - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R8401_ -- "IF" OPEN_PAREN expr - - (ffestb_R8401_) // to expression handler - - Make sure the next token is CLOSE_PAREN. */ - -static ffelexHandler -ffestb_R8401_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - ffestb_local_.if_stmt.expr = expr; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffelex_set_names (TRUE); /* In case it's a logical IF instead. */ - return (ffelexHandler) ffestb_R8402_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8402_ -- "IF" OPEN_PAREN expr CLOSE_PAREN - - return ffestb_R8402_; // to lexer - - Make sure the next token is NUMBER. */ - -static ffelexHandler -ffestb_R8402_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffesta_confirmed (); - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R8403_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8403_ -- "IF" OPEN_PAREN expr CLOSE_PAREN NUMBER - - return ffestb_R8403_; // to lexer - - Make sure the next token is COMMA. */ - -static ffelexHandler -ffestb_R8403_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R8404_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8404_ -- "IF" OPEN_PAREN expr CLOSE_PAREN NUMBER COMMA - - return ffestb_R8404_; // to lexer - - Make sure the next token is NUMBER. */ - -static ffelexHandler -ffestb_R8404_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffesta_tokens[3] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R8405_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8405_ -- "IF" OPEN_PAREN expr CLOSE_PAREN NUMBER COMMA NUMBER - - return ffestb_R8405_; // to lexer - - Make sure the next token is COMMA. */ - -static ffelexHandler -ffestb_R8405_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R8406_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8406_ -- "IF" OPEN_PAREN expr CLOSE_PAREN NUMBER COMMA NUMBER COMMA - - return ffestb_R8406_; // to lexer - - Make sure the next token is NUMBER. */ - -static ffelexHandler -ffestb_R8406_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffesta_tokens[4] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R8407_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8407_ -- "IF" OPEN_PAREN expr CLOSE_PAREN NUMBER COMMA NUMBER COMMA - NUMBER - - return ffestb_R8407_; // to lexer - - Make sure the next token is EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R8407_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R840 (ffestb_local_.if_stmt.expr, ffesta_tokens[1], - ffesta_tokens[2], ffesta_tokens[3], ffesta_tokens[4]); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - ffelex_token_kill (ffesta_tokens[4]); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "arithmetic-IF", t); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffesta_tokens[3]); - ffelex_token_kill (ffesta_tokens[4]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R841 -- Parse the CONTINUE statement - - return ffestb_R841; // to lexer - - Make sure the statement has a valid form for the CONTINUE statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_R841 (ffelexToken t) -{ - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCONTINUE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstCONTINUE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlCONTINUE) - { - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlCONTINUE); - goto bad_i; /* :::::::::::::::::::: */ - } - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R841 (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CONTINUE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid first token. */ - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CONTINUE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "CONTINUE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R1102 -- Parse the PROGRAM statement - - return ffestb_R1102; // to lexer - - Make sure the statement has a valid form for the PROGRAM statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R1102 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstPROGRAM) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - break; - } - - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R11021_; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstPROGRAM) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlPROGRAM); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_R11021_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PROGRAM", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PROGRAM", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "PROGRAM", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R11021_ -- "PROGRAM" NAME - - return ffestb_R11021_; // to lexer - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R11021_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1102 (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PROGRAM", t); - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_block -- Parse the BLOCK DATA statement - - return ffestb_block; // to lexer - - Make sure the statement has a valid form for the BLOCK DATA statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_block (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstBLOCK) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - if (ffesta_second_kw != FFESTR_secondDATA) - goto bad_1; /* :::::::::::::::::::: */ - break; - } - - ffesta_confirmed (); - return (ffelexHandler) ffestb_R1111_1_; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "BLOCK DATA", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "BLOCK DATA", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_blockdata -- Parse the BLOCKDATA statement - - return ffestb_blockdata; // to lexer - - Make sure the statement has a valid form for the BLOCKDATA statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_blockdata (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstBLOCKDATA) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R1111_2_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_R1111_2_ (t); - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstBLOCKDATA) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - } - ffesta_confirmed (); - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlBLOCKDATA); - if (*p == '\0') - { - ffesta_tokens[1] = NULL; - } - else - { - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - } - return (ffelexHandler) ffestb_R1111_2_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "BLOCK DATA", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "BLOCK DATA", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "BLOCK DATA", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R1111_1_ -- "BLOCK" "DATA" - - return ffestb_R1111_1_; // to lexer - - Make sure the next token is a NAME, EOS, or SEMICOLON token. */ - -static ffelexHandler -ffestb_R1111_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R1111_2_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_R1111_2_ (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "BLOCK DATA", t); - break; - } - - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R1111_2_ -- "BLOCK/DATA" NAME - - return ffestb_R1111_2_; // to lexer - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R1111_2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1111 (ffesta_tokens[1]); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "BLOCK DATA", t); - break; - } - - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R1212 -- Parse the CALL statement - - return ffestb_R1212; // to lexer - - Make sure the statement has a valid form for the CALL statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R1212 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCALL) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - break; - } - ffesta_confirmed (); - return (ffelexHandler) - (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, FFEEXPR_contextSUBROUTINEREF, - (ffeexprCallback) ffestb_R12121_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstCALL) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlCALL); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - next = (ffelexHandler) - (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, FFEEXPR_contextSUBROUTINEREF, - (ffeexprCallback) ffestb_R12121_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CALL", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CALL", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "CALL", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12121_ -- "CALL" expr - - (ffestb_R12121_) // to expression handler - - Make sure the statement has a valid form for the CALL statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R12121_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R1212 (expr, ft); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CALL", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R1227 -- Parse the RETURN statement - - return ffestb_R1227; // to lexer - - Make sure the statement has a valid form for the RETURN statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R1227 (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstRETURN) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); - break; - - default: - break; - } - - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextRETURN, - (ffeexprCallback) ffestb_R12271_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstRETURN) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - default: - break; - } - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextRETURN, (ffeexprCallback) ffestb_R12271_); - next = (ffelexHandler) ffelex_splice_tokens (next, ffesta_tokens[0], - FFESTR_firstlRETURN); - if (next == NULL) - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RETURN", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RETURN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R12271_ -- "RETURN" expr - - (ffestb_R12271_) // to expression handler - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R12271_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1227 (expr, ft); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "RETURN", t); - break; - } - - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_construct -- Parse a construct name - - return ffestb_construct; // to lexer - - Make sure the statement can have a construct name (if-then-stmt, do-stmt, - select-case-stmt). */ - -ffelexHandler -ffestb_construct (ffelexToken t UNUSED) -{ - /* This handler gets invoked only when token 0 is NAME/NAMES and token 1 is - COLON. */ - - ffesta_confirmed (); - ffelex_set_names (TRUE); - return (ffelexHandler) ffestb_construct1_; -} - -/* ffestb_construct1_ -- NAME COLON - - return ffestb_construct1_; // to lexer - - Make sure we've got a NAME that is DO, DOWHILE, IF, SELECT, or SELECTCASE. */ - -static ffelexHandler -ffestb_construct1_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_first_kw = ffestr_first (t); - switch (ffesta_first_kw) - { - case FFESTR_firstIF: - ffestb_local_.construct.next = (ffelexHandler) ffestb_if; - break; - - case FFESTR_firstDO: - ffestb_local_.construct.next = (ffelexHandler) ffestb_do; - break; - - case FFESTR_firstDOWHILE: - ffestb_local_.construct.next = (ffelexHandler) ffestb_dowhile; - break; - - case FFESTR_firstSELECT: - case FFESTR_firstSELECTCASE: - ffestb_local_.construct.next = (ffelexHandler) ffestb_R809; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - ffesta_construct_name = ffesta_tokens[0]; - ffesta_tokens[0] = ffelex_token_use (t); - return (ffelexHandler) ffestb_construct2_; - - case FFELEX_typeNAMES: - ffesta_first_kw = ffestr_first (t); - switch (ffesta_first_kw) - { - case FFESTR_firstIF: - if (ffelex_token_length (t) != FFESTR_firstlIF) - goto bad; /* :::::::::::::::::::: */ - ffestb_local_.construct.next = (ffelexHandler) ffestb_if; - break; - - case FFESTR_firstDO: - ffestb_local_.construct.next = (ffelexHandler) ffestb_do; - break; - - case FFESTR_firstDOWHILE: - if (ffelex_token_length (t) != FFESTR_firstlDOWHILE) - goto bad; /* :::::::::::::::::::: */ - ffestb_local_.construct.next = (ffelexHandler) ffestb_dowhile; - break; - - case FFESTR_firstSELECTCASE: - if (ffelex_token_length (t) != FFESTR_firstlSELECTCASE) - goto bad; /* :::::::::::::::::::: */ - ffestb_local_.construct.next = (ffelexHandler) ffestb_R809; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - ffesta_construct_name = ffesta_tokens[0]; - ffesta_tokens[0] = ffelex_token_use (t); - return (ffelexHandler) ffestb_construct2_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_2st (FFEBAD_INVALID_STMT_FORM, "CONSTRUCT", - ffesta_tokens[0], t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_construct2_ -- NAME COLON "DO/DOWHILE/IF/SELECT/SELECTCASE" - - return ffestb_construct2_; // to lexer - - This extra step is needed to set ffesta_second_kw if the second token - (here) is a NAME, so DO and SELECT can continue to expect it. */ - -static ffelexHandler -ffestb_construct2_ (ffelexToken t) -{ - if (ffelex_token_type (t) == FFELEX_typeNAME) - ffesta_second_kw = ffestr_second (t); - return (ffelexHandler) (*ffestb_local_.construct.next) (t); -} - -/* ffestb_R809 -- Parse the SELECTCASE statement - - return ffestb_R809; // to lexer - - Make sure the statement has a valid form for the SELECTCASE statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R809 (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffesta_first_kw) - { - case FFESTR_firstSELECT: - if ((ffelex_token_type (t) != FFELEX_typeNAME) - || (ffesta_second_kw != FFESTR_secondCASE)) - goto bad_1; /* :::::::::::::::::::: */ - ffesta_confirmed (); - return (ffelexHandler) ffestb_R8091_; - - case FFESTR_firstSELECTCASE: - return (ffelexHandler) ffestb_R8091_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstSELECTCASE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlSELECTCASE); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - return (ffelexHandler) ffestb_R8091_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SELECT CASE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SELECT CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "SELECT CASE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8091_ -- "SELECTCASE" or "SELECT" "CASE" - - return ffestb_R8091_; // to lexer - - Make sure the statement has a valid form for the SELECTCASE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R8091_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextSELECTCASE, (ffeexprCallback) ffestb_R8092_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SELECT CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8092_ -- "SELECT/CASE" OPEN_PAREN expr - - (ffestb_R8092_) // to expression handler - - Make sure the statement has a valid form for the SELECTCASE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R8092_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffesta_tokens[1] = ffelex_token_use (ft); - ffestb_local_.selectcase.expr = expr; - return (ffelexHandler) ffestb_R8093_; - - default: - break; - } - - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SELECT CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8093_ -- "SELECT/CASE" OPEN_PAREN expr CLOSE_PAREN - - return ffestb_R8093_; // to lexer - - Make sure the statement has a valid form for the SELECTCASE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R8093_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R809 (ffesta_construct_name, ffestb_local_.selectcase.expr, - ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - return ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - if (ffesta_construct_name != NULL) - { - ffelex_token_kill (ffesta_construct_name); - ffesta_construct_name = NULL; - } - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "SELECT CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R810 -- Parse the CASE statement - - return ffestb_R810; // to lexer - - Make sure the statement has a valid form for the CASE statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R810 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCASE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - if (ffesta_second_kw != FFESTR_secondDEFAULT) - goto bad_1; /* :::::::::::::::::::: */ - ffestb_local_.case_stmt.cases = NULL; - return (ffelexHandler) ffestb_R8101_; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.case_stmt.cases = ffestt_caselist_create (); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCASE, (ffeexprCallback) ffestb_R8103_); - } - - case FFELEX_typeNAMES: - switch (ffesta_first_kw) - { - case FFESTR_firstCASEDEFAULT: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - } - ffestb_local_.case_stmt.cases = NULL; - p = ffelex_token_text (ffesta_tokens[0]) - + (i = FFESTR_firstlCASEDEFAULT); - if (*p == '\0') - return (ffelexHandler) ffestb_R8101_ (t); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] = ffelex_token_name_from_names (ffesta_tokens[0], i, - 0); - return (ffelexHandler) ffestb_R8102_ (t); - - case FFESTR_firstCASE: - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlCASE); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - ffestb_local_.case_stmt.cases = ffestt_caselist_create (); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCASE, (ffeexprCallback) ffestb_R8103_); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CASE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "CASE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8101_ -- "CASE" case-selector - - return ffestb_R8101_; // to lexer - - Make sure the statement has a valid form for the CASE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R8101_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R8102_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_tokens[1] = NULL; - return (ffelexHandler) ffestb_R8102_ (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - if (ffestb_local_.case_stmt.cases != NULL) - ffestt_caselist_kill (ffestb_local_.case_stmt.cases); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8102_ -- "CASE" case-selector [NAME] - - return ffestb_R8102_; // to lexer - - Make sure the statement has a valid form for the CASE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R8102_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R810 (ffestb_local_.case_stmt.cases, ffesta_tokens[1]); - if (ffestb_local_.case_stmt.cases != NULL) - ffestt_caselist_kill (ffestb_local_.case_stmt.cases); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - break; - - default: - break; - } - - if (ffestb_local_.case_stmt.cases != NULL) - ffestt_caselist_kill (ffestb_local_.case_stmt.cases); - if (ffesta_tokens[1] != NULL) - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8103_ -- "CASE" OPEN_PAREN expr - - (ffestb_R8103_) // to expression handler - - Make sure the statement has a valid form for the CASE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R8103_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestt_caselist_append (ffestb_local_.case_stmt.cases, FALSE, expr, NULL, - ffelex_token_use (ft)); - return (ffelexHandler) ffestb_R8101_; - - case FFELEX_typeCOMMA: - ffestt_caselist_append (ffestb_local_.case_stmt.cases, FALSE, expr, NULL, - ffelex_token_use (ft)); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCASE, (ffeexprCallback) ffestb_R8103_); - - case FFELEX_typeCOLON: - ffestt_caselist_append (ffestb_local_.case_stmt.cases, TRUE, expr, NULL, - ffelex_token_use (ft)); /* NULL second expr for - now, just plug in. */ - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCASE, (ffeexprCallback) ffestb_R8104_); - - default: - break; - } - - ffestt_caselist_kill (ffestb_local_.case_stmt.cases); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R8104_ -- "CASE" OPEN_PAREN expr COLON expr - - (ffestb_R8104_) // to expression handler - - Make sure the statement has a valid form for the CASE statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_R8104_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestb_local_.case_stmt.cases->previous->expr2 = expr; - return (ffelexHandler) ffestb_R8101_; - - case FFELEX_typeCOMMA: - ffestb_local_.case_stmt.cases->previous->expr2 = expr; - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCASE, (ffeexprCallback) ffestb_R8103_); - - default: - break; - } - - ffestt_caselist_kill (ffestb_local_.case_stmt.cases); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CASE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R1001 -- Parse a FORMAT statement - - return ffestb_R1001; // to lexer - - Make sure the statement has a valid form for an FORMAT statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R1001 (ffelexToken t) -{ - ffesttFormatList f; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstFORMAT) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstFORMAT) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlFORMAT) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_local_.format.complained = FALSE; - ffestb_local_.format.f = NULL; /* No parent yet. */ - ffestb_local_.format.f = ffestt_formatlist_create (NULL, - ffelex_token_use (t)); - ffelex_set_names_pure (TRUE); /* Have even free-form lexer give us - NAMES. */ - return (ffelexHandler) ffestb_R10011_; - - case FFELEX_typeOPEN_ARRAY:/* "(/". */ - ffesta_confirmed (); - ffestb_local_.format.complained = FALSE; - ffestb_local_.format.f = ffestt_formatlist_create (NULL, - ffelex_token_use (t)); - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - ffelex_set_names_pure (TRUE); /* Have even free-form lexer give us - NAMES. */ - return (ffelexHandler) ffestb_R100112_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R10011_ -- "FORMAT" OPEN_PAREN expr - - return ffestb_R10011_; // to lexer - - For CLOSE_PAREN, wrap up the format list and if it is the top-level one, - exit. For anything else, pass it to _2_. */ - -static ffelexHandler -ffestb_R10011_ (ffelexToken t) -{ - ffesttFormatList f; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - break; - - default: - return (ffelexHandler) ffestb_R10012_ (t); - } - - /* If we have a format we're working on, continue working on it. */ - - f = ffestb_local_.format.f->u.root.parent; - - if (f != NULL) - { - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - } - - return (ffelexHandler) ffestb_R100114_; -} - -/* ffestb_R10012_ -- "FORMAT" OPEN_PAREN [format-item-list] - - return ffestb_R10012_; // to lexer - - The initial state for a format-item. Here, just handle the initial - number, sign for number, or run-time expression. Also handle spurious - comma, close-paren (indicating spurious comma), close-array (like - close-paren but preceded by slash), and quoted strings. */ - -static ffelexHandler -ffestb_R10012_ (ffelexToken t) -{ - unsigned long unsigned_val; - ffesttFormatList f; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_ANGLE: - ffesta_confirmed (); - ffestb_local_.format.pre.t = ffelex_token_use (t); - ffelex_set_names_pure (FALSE); - if (!ffesta_seen_first_exec && !ffestb_local_.format.complained) - { - ffestb_local_.format.complained = TRUE; - ffebad_start (FFEBAD_FORMAT_EXPR_SPEC); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFORMAT, (ffeexprCallback) ffestb_R100115_); - - case FFELEX_typeNUMBER: - ffestb_local_.format.sign = FALSE; /* No sign present. */ - ffestb_local_.format.pre.present = TRUE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = ffelex_token_use (t); - ffestb_local_.format.pre.u.unsigned_val = unsigned_val - = strtoul (ffelex_token_text (t), NULL, 10); - ffelex_set_expecting_hollerith (unsigned_val, '\0', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - return (ffelexHandler) ffestb_R10014_; - - case FFELEX_typePLUS: - ffestb_local_.format.sign = TRUE; /* Positive. */ - ffestb_local_.format.pre.t = ffelex_token_use (t); - return (ffelexHandler) ffestb_R10013_; - - case FFELEX_typeMINUS: - ffestb_local_.format.sign = FALSE; /* Negative. */ - ffestb_local_.format.pre.t = ffelex_token_use (t); - return (ffelexHandler) ffestb_R10013_; - - case FFELEX_typeCOLON: - case FFELEX_typeCOLONCOLON:/* "::". */ - case FFELEX_typeSLASH: - case FFELEX_typeCONCAT: /* "//". */ - case FFELEX_typeNAMES: - case FFELEX_typeDOLLAR: - case FFELEX_typeOPEN_PAREN: - case FFELEX_typeOPEN_ARRAY:/* "(/". */ - ffestb_local_.format.sign = FALSE; /* No sign present. */ - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - return (ffelexHandler) ffestb_R10014_ (t); - - case FFELEX_typeCOMMA: - ffebad_start (FFEBAD_FORMAT_EXTRA_COMMA); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - return (ffelexHandler) ffestb_R10012_; - - case FFELEX_typeCLOSE_PAREN: - ffebad_start (FFEBAD_FORMAT_EXTRA_COMMA); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - f = ffestb_local_.format.f->u.root.parent; - if (f == NULL) - return (ffelexHandler) ffestb_R100114_; - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeCLOSE_ARRAY: /* "/)". */ - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - f = ffestb_local_.format.f->u.root.parent; - if (f == NULL) - return (ffelexHandler) ffestb_R100114_; - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_ffebad_1t (FFEBAD_FORMAT_MISSING_PAREN, t); - for (f = ffestb_local_.format.f; - f->u.root.parent != NULL; - f = f->u.root.parent->next) - ; - ffestb_local_.format.f = f; - return (ffelexHandler) ffestb_R100114_ (t); - - case FFELEX_typeQUOTE: - if (ffe_is_vxt ()) - break; /* Error, probably something like FORMAT("17) - = X. */ - ffelex_set_expecting_hollerith (-1, '\"', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); /* Don't have to unset - this one. */ - return (ffelexHandler) ffestb_R100113_; - - case FFELEX_typeAPOSTROPHE: -#if 0 /* No apparent need for this, and not killed - anywhere. */ - ffesta_tokens[1] = ffelex_token_use (t); -#endif - ffelex_set_expecting_hollerith (-1, '\'', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); /* Don't have to unset - this one. */ - return (ffelexHandler) ffestb_R100113_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R10013_ -- "FORMAT" OPEN_PAREN [format-item-list] PLUS/MINUS - - return ffestb_R10013_; // to lexer - - Expect a NUMBER or complain about and then ignore the PLUS/MINUS. */ - -static ffelexHandler -ffestb_R10013_ (ffelexToken t) -{ - unsigned long unsigned_val; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestb_local_.format.pre.present = TRUE; - ffestb_local_.format.pre.rtexpr = FALSE; - unsigned_val = strtoul (ffelex_token_text (t), NULL, 10); - ffestb_local_.format.pre.u.signed_val = ffestb_local_.format.sign - ? unsigned_val : -unsigned_val; - ffestb_local_.format.sign = TRUE; /* Sign present. */ - return (ffelexHandler) ffestb_R10014_; - - default: - ffebad_start (FFEBAD_FORMAT_SPURIOUS_SIGN); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffelex_token_kill (ffestb_local_.format.pre.t); - return (ffelexHandler) ffestb_R10012_ (t); - } -} - -/* ffestb_R10014_ -- "FORMAT" OPEN_PAREN [format-item-list] [[+/-] NUMBER] - - return ffestb_R10014_; // to lexer - - Here is where we expect to see the actual NAMES, COLON, SLASH, OPEN_PAREN, - OPEN_ARRAY, COLONCOLON, CONCAT, DOLLAR, or HOLLERITH that identifies what - kind of format-item we're dealing with. But if we see a NUMBER instead, it - means free-form spaces number like "5 6 X", so scale the current number - accordingly and reenter this state. (I really wouldn't be surprised if - they change this spacing rule in the F90 spec so that you can't embed - spaces within numbers or within keywords like BN in a free-source-form - program.) */ - -static ffelexHandler -ffestb_R10014_ (ffelexToken t) -{ - ffesttFormatList f; - ffeTokenLength i; - const char *p; - ffestrFormat kw; - - ffelex_set_expecting_hollerith (0, '\0', - ffewhere_line_unknown (), - ffewhere_column_unknown ()); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeHOLLERITH: - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeR1016; - f->t = ffelex_token_use (t); - ffelex_token_kill (ffestb_local_.format.pre.t); /* It WAS present! */ - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeNUMBER: - assert (ffestb_local_.format.pre.present); - ffesta_confirmed (); - if (ffestb_local_.format.pre.rtexpr) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_NUMBER); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - return (ffelexHandler) ffestb_R10014_; - } - if (ffestb_local_.format.sign) - { - for (i = ffelex_token_length (t) + 1; i > 0; --i) - ffestb_local_.format.pre.u.signed_val *= 10; - ffestb_local_.format.pre.u.signed_val += strtoul (ffelex_token_text (t), - NULL, 10); - } - else - { - for (i = ffelex_token_length (t) + 1; i > 0; --i) - ffestb_local_.format.pre.u.unsigned_val *= 10; - ffestb_local_.format.pre.u.unsigned_val += strtoul (ffelex_token_text (t), - NULL, 10); - ffelex_set_expecting_hollerith (ffestb_local_.format.pre.u.unsigned_val, - '\0', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); - } - return (ffelexHandler) ffestb_R10014_; - - case FFELEX_typeCOLONCOLON: /* "::". */ - if (ffestb_local_.format.pre.present) - { - ffesta_ffebad_1t (FFEBAD_FORMAT_BAD_COLON_SPEC, - ffestb_local_.format.pre.t); - ffelex_token_kill (ffestb_local_.format.pre.t); - ffestb_local_.format.pre.present = FALSE; - } - else - { - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeCOLON; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - } - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeCOLON; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - return (ffelexHandler) ffestb_R100112_; - - case FFELEX_typeCOLON: - if (ffestb_local_.format.pre.present) - { - ffesta_ffebad_1t (FFEBAD_FORMAT_BAD_COLON_SPEC, - ffestb_local_.format.pre.t); - ffelex_token_kill (ffestb_local_.format.pre.t); - return (ffelexHandler) ffestb_R100112_; - } - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeCOLON; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - return (ffelexHandler) ffestb_R100112_; - - case FFELEX_typeCONCAT: /* "//". */ - if (ffestb_local_.format.sign) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_SIGN); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffestb_local_.format.pre.u.unsigned_val - = (ffestb_local_.format.pre.u.signed_val < 0) - ? -ffestb_local_.format.pre.u.signed_val - : ffestb_local_.format.pre.u.signed_val; - } - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val = ffestb_local_.format.pre; - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val = ffestb_local_.format.pre; - return (ffelexHandler) ffestb_R100112_; - - case FFELEX_typeSLASH: - if (ffestb_local_.format.sign) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_SIGN); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffestb_local_.format.pre.u.unsigned_val - = (ffestb_local_.format.pre.u.signed_val < 0) - ? -ffestb_local_.format.pre.u.signed_val - : ffestb_local_.format.pre.u.signed_val; - } - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val = ffestb_local_.format.pre; - return (ffelexHandler) ffestb_R100112_; - - case FFELEX_typeOPEN_PAREN: - if (ffestb_local_.format.sign) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_SIGN); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffestb_local_.format.pre.u.unsigned_val - = (ffestb_local_.format.pre.u.signed_val < 0) - ? -ffestb_local_.format.pre.u.signed_val - : ffestb_local_.format.pre.u.signed_val; - } - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeFORMAT; - f->t = ffelex_token_use (t); - f->u.R1003D.R1004 = ffestb_local_.format.pre; - f->u.R1003D.format = ffestb_local_.format.f - = ffestt_formatlist_create (f, ffelex_token_use (t)); - return (ffelexHandler) ffestb_R10011_; - - case FFELEX_typeOPEN_ARRAY:/* "(/". */ - if (ffestb_local_.format.sign) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_SIGN); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffestb_local_.format.pre.u.unsigned_val - = (ffestb_local_.format.pre.u.signed_val < 0) - ? -ffestb_local_.format.pre.u.signed_val - : ffestb_local_.format.pre.u.signed_val; - } - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeFORMAT; - f->t = ffelex_token_use (t); - f->u.R1003D.R1004 = ffestb_local_.format.pre; - f->u.R1003D.format = ffestb_local_.format.f - = ffestt_formatlist_create (f, ffelex_token_use (t)); - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - return (ffelexHandler) ffestb_R100112_; - - case FFELEX_typeCLOSE_ARRAY: /* "/)". */ - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val = ffestb_local_.format.pre; - f = ffestb_local_.format.f->u.root.parent; - if (f == NULL) - return (ffelexHandler) ffestb_R100114_; - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeQUOTE: - if (ffe_is_vxt ()) - break; /* A totally bad character in a VXT FORMAT. */ - ffebad_start (FFEBAD_FORMAT_SPURIOUS_NUMBER); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffelex_token_kill (ffestb_local_.format.pre.t); - ffesta_confirmed (); -#if 0 /* No apparent need for this, and not killed - anywhere. */ - ffesta_tokens[1] = ffelex_token_use (t); -#endif - ffelex_set_expecting_hollerith (-1, '\"', - ffelex_token_where_line (t), - ffelex_token_where_column (t)); /* Don't have to unset - this one. */ - return (ffelexHandler) ffestb_R100113_; - - case FFELEX_typeAPOSTROPHE: - ffesta_confirmed (); - ffebad_start (FFEBAD_FORMAT_SPURIOUS_NUMBER); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffelex_token_kill (ffestb_local_.format.pre.t); -#if 0 /* No apparent need for this, and not killed - anywhere. */ - ffesta_tokens[1] = ffelex_token_use (t); -#endif - ffelex_set_expecting_hollerith (-1, '\'', ffelex_token_where_line (t), - ffelex_token_where_column (t)); /* Don't have to unset - this one. */ - return (ffelexHandler) ffestb_R100113_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_ffebad_1t (FFEBAD_FORMAT_MISSING_PAREN, t); - for (f = ffestb_local_.format.f; - f->u.root.parent != NULL; - f = f->u.root.parent->next) - ; - ffestb_local_.format.f = f; - ffelex_token_kill (ffestb_local_.format.pre.t); - return (ffelexHandler) ffestb_R100114_ (t); - - case FFELEX_typeDOLLAR: - ffestb_local_.format.t = ffelex_token_use (t); - if (ffestb_local_.format.pre.present) - ffesta_confirmed (); /* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeDOLLAR; - return (ffelexHandler) ffestb_R10015_; - - case FFELEX_typeNAMES: - kw = ffestr_format (t); - ffestb_local_.format.t = ffelex_token_use (t); - switch (kw) - { - case FFESTR_formatI: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeI; - i = FFESTR_formatlI; - break; - - case FFESTR_formatB: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeB; - i = FFESTR_formatlB; - break; - - case FFESTR_formatO: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeO; - i = FFESTR_formatlO; - break; - - case FFESTR_formatZ: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeZ; - i = FFESTR_formatlZ; - break; - - case FFESTR_formatF: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeF; - i = FFESTR_formatlF; - break; - - case FFESTR_formatE: - ffestb_local_.format.current = FFESTP_formattypeE; - i = FFESTR_formatlE; - break; - - case FFESTR_formatEN: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeEN; - i = FFESTR_formatlEN; - break; - - case FFESTR_formatG: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeG; - i = FFESTR_formatlG; - break; - - case FFESTR_formatL: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeL; - i = FFESTR_formatlL; - break; - - case FFESTR_formatA: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeA; - i = FFESTR_formatlA; - break; - - case FFESTR_formatD: - ffestb_local_.format.current = FFESTP_formattypeD; - i = FFESTR_formatlD; - break; - - case FFESTR_formatQ: - ffestb_local_.format.current = FFESTP_formattypeQ; - i = FFESTR_formatlQ; - break; - - case FFESTR_formatDOLLAR: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeDOLLAR; - i = FFESTR_formatlDOLLAR; - break; - - case FFESTR_formatP: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeP; - i = FFESTR_formatlP; - break; - - case FFESTR_formatT: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeT; - i = FFESTR_formatlT; - break; - - case FFESTR_formatTL: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeTL; - i = FFESTR_formatlTL; - break; - - case FFESTR_formatTR: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeTR; - i = FFESTR_formatlTR; - break; - - case FFESTR_formatX: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeX; - i = FFESTR_formatlX; - break; - - case FFESTR_formatS: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeS; - i = FFESTR_formatlS; - break; - - case FFESTR_formatSP: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeSP; - i = FFESTR_formatlSP; - break; - - case FFESTR_formatSS: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeSS; - i = FFESTR_formatlSS; - break; - - case FFESTR_formatBN: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeBN; - i = FFESTR_formatlBN; - break; - - case FFESTR_formatBZ: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeBZ; - i = FFESTR_formatlBZ; - break; - - case FFESTR_formatH: /* Error, either "H" or "H". */ - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeH; - i = FFESTR_formatlH; - break; - - case FFESTR_formatPD: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_subr_R1001_append_p_ (); - ffestb_local_.format.t = ffelex_token_name_from_names (t, - FFESTR_formatlP, 1); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - ffestb_local_.format.current = FFESTP_formattypeD; - i = FFESTR_formatlPD; - break; - - case FFESTR_formatPE: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_subr_R1001_append_p_ (); - ffestb_local_.format.t = ffelex_token_name_from_names (t, - FFESTR_formatlP, 1); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - ffestb_local_.format.current = FFESTP_formattypeE; - i = FFESTR_formatlPE; - break; - - case FFESTR_formatPEN: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_subr_R1001_append_p_ (); - ffestb_local_.format.t = ffelex_token_name_from_names (t, - FFESTR_formatlP, 1); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - ffestb_local_.format.current = FFESTP_formattypeEN; - i = FFESTR_formatlPEN; - break; - - case FFESTR_formatPF: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_subr_R1001_append_p_ (); - ffestb_local_.format.t = ffelex_token_name_from_names (t, - FFESTR_formatlP, 1); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - ffestb_local_.format.current = FFESTP_formattypeF; - i = FFESTR_formatlPF; - break; - - case FFESTR_formatPG: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_subr_R1001_append_p_ (); - ffestb_local_.format.t = ffelex_token_name_from_names (t, - FFESTR_formatlP, 1); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - ffestb_local_.format.current = FFESTP_formattypeG; - i = FFESTR_formatlPG; - break; - - default: - if (ffestb_local_.format.pre.present) - ffesta_confirmed ();/* Number preceding this invalid elsewhere. */ - ffestb_local_.format.current = FFESTP_formattypeNone; - p = strpbrk (ffelex_token_text (t), "0123456789"); - if (p == NULL) - i = ffelex_token_length (t); - else - i = p - ffelex_token_text (t); - break; - } - p = ffelex_token_text (t) + i; - if (*p == '\0') - return (ffelexHandler) ffestb_R10015_; - if (! ISDIGIT (*p)) - { - if (ffestb_local_.format.current == FFESTP_formattypeH) - p = strpbrk (p, "0123456789"); - else - { - p = NULL; - ffestb_local_.format.current = FFESTP_formattypeNone; - } - if (p == NULL) - return (ffelexHandler) ffestb_R10015_; - i = p - ffelex_token_text (t); /* Collect digits. */ - } - ffestb_local_.format.post.present = TRUE; - ffestb_local_.format.post.rtexpr = FALSE; - ffestb_local_.format.post.t = ffelex_token_number_from_names (t, i); - ffestb_local_.format.post.u.unsigned_val - = strtoul (ffelex_token_text (ffestb_local_.format.post.t), NULL, 10); - p += ffelex_token_length (ffestb_local_.format.post.t); - i += ffelex_token_length (ffestb_local_.format.post.t); - if (*p == '\0') - return (ffelexHandler) ffestb_R10016_; - if ((kw != FFESTR_formatP) || - !ffelex_is_firstnamechar ((unsigned char)*p)) - { - if (ffestb_local_.format.current != FFESTP_formattypeH) - ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, i, NULL); - return (ffelexHandler) ffestb_R10016_; - } - - /* Here we have [number]P[number][text]. Treat as - [number]P,[number][text]. */ - - ffestb_subr_R1001_append_p_ (); - t = ffestb_local_.format.t = ffelex_token_names_from_names (t, i, 0); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre = ffestb_local_.format.post; - kw = ffestr_format (t); - switch (kw) - { /* Only a few possibilities here. */ - case FFESTR_formatD: - ffestb_local_.format.current = FFESTP_formattypeD; - i = FFESTR_formatlD; - break; - - case FFESTR_formatE: - ffestb_local_.format.current = FFESTP_formattypeE; - i = FFESTR_formatlE; - break; - - case FFESTR_formatEN: - ffestb_local_.format.current = FFESTP_formattypeEN; - i = FFESTR_formatlEN; - break; - - case FFESTR_formatF: - ffestb_local_.format.current = FFESTP_formattypeF; - i = FFESTR_formatlF; - break; - - case FFESTR_formatG: - ffestb_local_.format.current = FFESTP_formattypeG; - i = FFESTR_formatlG; - break; - - default: - ffebad_start (FFEBAD_FORMAT_P_NOCOMMA); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - ffestb_local_.format.current = FFESTP_formattypeNone; - p = strpbrk (ffelex_token_text (t), "0123456789"); - if (p == NULL) - i = ffelex_token_length (t); - else - i = p - ffelex_token_text (t); - } - p = ffelex_token_text (t) + i; - if (*p == '\0') - return (ffelexHandler) ffestb_R10015_; - if (! ISDIGIT (*p)) - { - ffestb_local_.format.current = FFESTP_formattypeNone; - p = strpbrk (p, "0123456789"); - if (p == NULL) - return (ffelexHandler) ffestb_R10015_; - i = p - ffelex_token_text (t); /* Collect digits anyway. */ - } - ffestb_local_.format.post.present = TRUE; - ffestb_local_.format.post.rtexpr = FALSE; - ffestb_local_.format.post.t = ffelex_token_number_from_names (t, i); - ffestb_local_.format.post.u.unsigned_val - = strtoul (ffelex_token_text (ffestb_local_.format.post.t), NULL, 10); - p += ffelex_token_length (ffestb_local_.format.post.t); - i += ffelex_token_length (ffestb_local_.format.post.t); - if (*p == '\0') - return (ffelexHandler) ffestb_R10016_; - ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, i, NULL); - return (ffelexHandler) ffestb_R10016_; - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - if (ffestb_local_.format.pre.present) - ffelex_token_kill (ffestb_local_.format.pre.t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); -} - -/* ffestb_R10015_ -- [[+/-] NUMBER] NAMES - - return ffestb_R10015_; // to lexer - - Here we've gotten at least the initial mnemonic for the edit descriptor. - We expect either a NUMBER, for the post-mnemonic value, a NAMES, for - further clarification (in free-form only, sigh) of the mnemonic, or - anything else. In all cases we go to _6_, with the difference that for - NUMBER and NAMES we send the next token rather than the current token. */ - -static ffelexHandler -ffestb_R10015_ (ffelexToken t) -{ - bool split_pea; /* New NAMES requires splitting kP from new - edit desc. */ - ffestrFormat kw; - const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_ANGLE: - ffesta_confirmed (); - ffestb_local_.format.post.t = ffelex_token_use (t); - ffelex_set_names_pure (FALSE); - if (!ffesta_seen_first_exec && !ffestb_local_.format.complained) - { - ffestb_local_.format.complained = TRUE; - ffebad_start (FFEBAD_FORMAT_EXPR_SPEC); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFORMAT, (ffeexprCallback) ffestb_R100116_); - - case FFELEX_typeNUMBER: - ffestb_local_.format.post.present = TRUE; - ffestb_local_.format.post.rtexpr = FALSE; - ffestb_local_.format.post.t = ffelex_token_use (t); - ffestb_local_.format.post.u.unsigned_val - = strtoul (ffelex_token_text (t), NULL, 10); - return (ffelexHandler) ffestb_R10016_; - - case FFELEX_typeNAMES: - ffesta_confirmed (); /* NAMES " " NAMES invalid elsewhere in - free-form. */ - kw = ffestr_format (t); - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeP: - split_pea = TRUE; - break; - - case FFESTP_formattypeH: /* An error, maintain this indicator. */ - kw = FFESTR_formatNone; - split_pea = FALSE; - break; - - default: - split_pea = FALSE; - break; - } - - switch (kw) - { - case FFESTR_formatF: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeP: - ffestb_local_.format.current = FFESTP_formattypeF; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlF; - break; - - case FFESTR_formatE: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeP: - ffestb_local_.format.current = FFESTP_formattypeE; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlE; - break; - - case FFESTR_formatEN: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeP: - ffestb_local_.format.current = FFESTP_formattypeEN; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlEN; - break; - - case FFESTR_formatG: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeP: - ffestb_local_.format.current = FFESTP_formattypeG; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlG; - break; - - case FFESTR_formatL: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeT: - ffestb_local_.format.current = FFESTP_formattypeTL; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlL; - break; - - case FFESTR_formatD: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeP: - ffestb_local_.format.current = FFESTP_formattypeD; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlD; - break; - - case FFESTR_formatS: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeS: - ffestb_local_.format.current = FFESTP_formattypeSS; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlS; - break; - - case FFESTR_formatP: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeS: - ffestb_local_.format.current = FFESTP_formattypeSP; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlP; - break; - - case FFESTR_formatR: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeT: - ffestb_local_.format.current = FFESTP_formattypeTR; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlR; - break; - - case FFESTR_formatZ: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeB: - ffestb_local_.format.current = FFESTP_formattypeBZ; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlZ; - break; - - case FFESTR_formatN: - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeE: - ffestb_local_.format.current = FFESTP_formattypeEN; - break; - - case FFESTP_formattypeB: - ffestb_local_.format.current = FFESTP_formattypeBN; - break; - - default: - ffestb_local_.format.current = FFESTP_formattypeNone; - break; - } - i = FFESTR_formatlN; - break; - - default: - if (ffestb_local_.format.current != FFESTP_formattypeH) - ffestb_local_.format.current = FFESTP_formattypeNone; - split_pea = FALSE; /* Go ahead and let the P be in the party. */ - p = strpbrk (ffelex_token_text (t), "0123456789"); - if (p == NULL) - i = ffelex_token_length (t); - else - i = p - ffelex_token_text (t); - } - - if (split_pea) - { - ffestb_subr_R1001_append_p_ (); - ffestb_local_.format.t = ffelex_token_use (t); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre.present = FALSE; - ffestb_local_.format.pre.rtexpr = FALSE; - ffestb_local_.format.pre.t = NULL; - ffestb_local_.format.pre.u.unsigned_val = 1; - } - - p = ffelex_token_text (t) + i; - if (*p == '\0') - return (ffelexHandler) ffestb_R10015_; - if (! ISDIGIT (*p)) - { - ffestb_local_.format.current = FFESTP_formattypeNone; - p = strpbrk (p, "0123456789"); - if (p == NULL) - return (ffelexHandler) ffestb_R10015_; - i = p - ffelex_token_text (t); /* Collect digits anyway. */ - } - ffestb_local_.format.post.present = TRUE; - ffestb_local_.format.post.rtexpr = FALSE; - ffestb_local_.format.post.t = ffelex_token_number_from_names (t, i); - ffestb_local_.format.post.u.unsigned_val - = strtoul (ffelex_token_text (ffestb_local_.format.post.t), NULL, 10); - p += ffelex_token_length (ffestb_local_.format.post.t); - i += ffelex_token_length (ffestb_local_.format.post.t); - if (*p == '\0') - return (ffelexHandler) ffestb_R10016_; - ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, i, NULL); - return (ffelexHandler) ffestb_R10016_; - - default: - ffestb_local_.format.post.present = FALSE; - ffestb_local_.format.post.rtexpr = FALSE; - ffestb_local_.format.post.t = NULL; - ffestb_local_.format.post.u.unsigned_val = 1; - return (ffelexHandler) ffestb_R10016_ (t); - } -} - -/* ffestb_R10016_ -- [[+/-] NUMBER] NAMES NUMBER - - return ffestb_R10016_; // to lexer - - Expect a PERIOD here. Maybe find a NUMBER to append to the current - number, in which case return to this state. Maybe find a NAMES to switch - from a kP descriptor to a new descriptor (else the NAMES is spurious), - in which case generator the P item and go to state _4_. Anything - else, pass token on to state _8_. */ - -static ffelexHandler -ffestb_R10016_ (ffelexToken t) -{ - ffeTokenLength i; - - switch (ffelex_token_type (t)) - { - case FFELEX_typePERIOD: - return (ffelexHandler) ffestb_R10017_; - - case FFELEX_typeNUMBER: - assert (ffestb_local_.format.post.present); - ffesta_confirmed (); - if (ffestb_local_.format.post.rtexpr) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_NUMBER); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - return (ffelexHandler) ffestb_R10016_; - } - for (i = ffelex_token_length (t) + 1; i > 0; --i) - ffestb_local_.format.post.u.unsigned_val *= 10; - ffestb_local_.format.post.u.unsigned_val += strtoul (ffelex_token_text (t), - NULL, 10); - return (ffelexHandler) ffestb_R10016_; - - case FFELEX_typeNAMES: - ffesta_confirmed (); /* NUMBER " " NAMES invalid elsewhere. */ - if (ffestb_local_.format.current != FFESTP_formattypeP) - { - ffesta_ffebad_1t (FFEBAD_FORMAT_TEXT_IN_NUMBER, t); - return (ffelexHandler) ffestb_R10016_; - } - ffestb_subr_R1001_append_p_ (); - ffestb_local_.format.sign = FALSE; - ffestb_local_.format.pre = ffestb_local_.format.post; - return (ffelexHandler) ffestb_R10014_ (t); - - default: - ffestb_local_.format.dot.present = FALSE; - ffestb_local_.format.dot.rtexpr = FALSE; - ffestb_local_.format.dot.t = NULL; - ffestb_local_.format.dot.u.unsigned_val = 1; - return (ffelexHandler) ffestb_R10018_ (t); - } -} - -/* ffestb_R10017_ -- [[+/-] NUMBER] NAMES NUMBER PERIOD - - return ffestb_R10017_; // to lexer - - Here we've gotten the period following the edit descriptor. - We expect either a NUMBER, for the dot value, or something else, which - probably means we're not even close to being in a real FORMAT statement. */ - -static ffelexHandler -ffestb_R10017_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_ANGLE: - ffestb_local_.format.dot.t = ffelex_token_use (t); - ffelex_set_names_pure (FALSE); - if (!ffesta_seen_first_exec && !ffestb_local_.format.complained) - { - ffestb_local_.format.complained = TRUE; - ffebad_start (FFEBAD_FORMAT_EXPR_SPEC); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFORMAT, (ffeexprCallback) ffestb_R100117_); - - case FFELEX_typeNUMBER: - ffestb_local_.format.dot.present = TRUE; - ffestb_local_.format.dot.rtexpr = FALSE; - ffestb_local_.format.dot.t = ffelex_token_use (t); - ffestb_local_.format.dot.u.unsigned_val - = strtoul (ffelex_token_text (t), NULL, 10); - return (ffelexHandler) ffestb_R10018_; - - default: - ffelex_token_kill (ffestb_local_.format.t); - if (ffestb_local_.format.pre.present) - ffelex_token_kill (ffestb_local_.format.pre.t); - if (ffestb_local_.format.post.present) - ffelex_token_kill (ffestb_local_.format.post.t); - ffesta_ffebad_1t (FFEBAD_FORMAT_MISSING_DOT, t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R10018_ -- [[+/-] NUMBER] NAMES NUMBER PERIOD NUMBER - - return ffestb_R10018_; // to lexer - - Expect a NAMES here, which must begin with "E" to be valid. Maybe find a - NUMBER to append to the current number, in which case return to this state. - Anything else, pass token on to state _10_. */ - -static ffelexHandler -ffestb_R10018_ (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - assert (ffestb_local_.format.dot.present); - ffesta_confirmed (); - if (ffestb_local_.format.dot.rtexpr) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_NUMBER); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - return (ffelexHandler) ffestb_R10018_; - } - for (i = ffelex_token_length (t) + 1; i > 0; --i) - ffestb_local_.format.dot.u.unsigned_val *= 10; - ffestb_local_.format.dot.u.unsigned_val += strtoul (ffelex_token_text (t), - NULL, 10); - return (ffelexHandler) ffestb_R10018_; - - case FFELEX_typeNAMES: - if (!ffesrc_char_match_init (*(p = ffelex_token_text (t)), 'E', 'e')) - { - ffesta_ffebad_1t (FFEBAD_FORMAT_TEXT_IN_NUMBER, t); - return (ffelexHandler) ffestb_R10018_; - } - if (*++p == '\0') - return (ffelexHandler) ffestb_R10019_; /* Go get NUMBER. */ - i = 1; - if (! ISDIGIT (*p)) - { - ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, 1, NULL); - return (ffelexHandler) ffestb_R10018_; - } - ffestb_local_.format.exp.present = TRUE; - ffestb_local_.format.exp.rtexpr = FALSE; - ffestb_local_.format.exp.t = ffelex_token_number_from_names (t, i); - ffestb_local_.format.exp.u.unsigned_val - = strtoul (ffelex_token_text (ffestb_local_.format.exp.t), NULL, 10); - p += ffelex_token_length (ffestb_local_.format.exp.t); - i += ffelex_token_length (ffestb_local_.format.exp.t); - if (*p == '\0') - return (ffelexHandler) ffestb_R100110_; - ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, i, NULL); - return (ffelexHandler) ffestb_R100110_; - - default: - ffestb_local_.format.exp.present = FALSE; - ffestb_local_.format.exp.rtexpr = FALSE; - ffestb_local_.format.exp.t = NULL; - ffestb_local_.format.exp.u.unsigned_val = 1; - return (ffelexHandler) ffestb_R100110_ (t); - } -} - -/* ffestb_R10019_ -- [[+/-] NUMBER] NAMES NUMBER PERIOD NUMBER "E" - - return ffestb_R10019_; // to lexer - - Here we've gotten the "E" following the edit descriptor. - We expect either a NUMBER, for the exponent value, or something else. */ - -static ffelexHandler -ffestb_R10019_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_ANGLE: - ffestb_local_.format.exp.t = ffelex_token_use (t); - ffelex_set_names_pure (FALSE); - if (!ffesta_seen_first_exec && !ffestb_local_.format.complained) - { - ffestb_local_.format.complained = TRUE; - ffebad_start (FFEBAD_FORMAT_EXPR_SPEC); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - } - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFORMAT, (ffeexprCallback) ffestb_R100118_); - - case FFELEX_typeNUMBER: - ffestb_local_.format.exp.present = TRUE; - ffestb_local_.format.exp.rtexpr = FALSE; - ffestb_local_.format.exp.t = ffelex_token_use (t); - ffestb_local_.format.exp.u.unsigned_val - = strtoul (ffelex_token_text (t), NULL, 10); - return (ffelexHandler) ffestb_R100110_; - - default: - ffelex_token_kill (ffestb_local_.format.t); - if (ffestb_local_.format.pre.present) - ffelex_token_kill (ffestb_local_.format.pre.t); - if (ffestb_local_.format.post.present) - ffelex_token_kill (ffestb_local_.format.post.t); - if (ffestb_local_.format.dot.present) - ffelex_token_kill (ffestb_local_.format.dot.t); - ffesta_ffebad_1t (FFEBAD_FORMAT_MISSING_EXP, t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R100110_ -- [[+/-] NUMBER] NAMES NUMBER [PERIOD NUMBER ["E" NUMBER]] - - return ffestb_R100110_; // to lexer - - Maybe find a NUMBER to append to the current number, in which case return - to this state. Anything else, handle current descriptor, then pass token - on to state _10_. */ - -static ffelexHandler -ffestb_R100110_ (ffelexToken t) -{ - ffeTokenLength i; - enum expect - { - required, - optional, - disallowed - }; - ffebad err; - enum expect pre; - enum expect post; - enum expect dot; - enum expect exp; - bool R1005; - ffesttFormatList f; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - assert (ffestb_local_.format.exp.present); - ffesta_confirmed (); - if (ffestb_local_.format.exp.rtexpr) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_NUMBER); - ffebad_here (0, ffelex_token_where_line (t), ffelex_token_where_column (t)); - ffebad_finish (); - return (ffelexHandler) ffestb_R100110_; - } - for (i = ffelex_token_length (t) + 1; i > 0; --i) - ffestb_local_.format.exp.u.unsigned_val *= 10; - ffestb_local_.format.exp.u.unsigned_val += strtoul (ffelex_token_text (t), - NULL, 10); - return (ffelexHandler) ffestb_R100110_; - - default: - if (ffestb_local_.format.sign - && (ffestb_local_.format.current != FFESTP_formattypeP) - && (ffestb_local_.format.current != FFESTP_formattypeH)) - { - ffebad_start (FFEBAD_FORMAT_SPURIOUS_SIGN); - ffebad_here (0, ffelex_token_where_line (ffestb_local_.format.pre.t), - ffelex_token_where_column (ffestb_local_.format.pre.t)); - ffebad_finish (); - ffestb_local_.format.pre.u.unsigned_val - = (ffestb_local_.format.pre.u.signed_val < 0) - ? -ffestb_local_.format.pre.u.signed_val - : ffestb_local_.format.pre.u.signed_val; - } - switch (ffestb_local_.format.current) - { - case FFESTP_formattypeI: - err = FFEBAD_FORMAT_BAD_I_SPEC; - pre = optional; - post = required; - dot = optional; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeB: - err = FFEBAD_FORMAT_BAD_B_SPEC; - pre = optional; - post = required; - dot = optional; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeO: - err = FFEBAD_FORMAT_BAD_O_SPEC; - pre = optional; - post = required; - dot = optional; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeZ: - err = FFEBAD_FORMAT_BAD_Z_SPEC; - pre = optional; - post = required; - dot = optional; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeF: - err = FFEBAD_FORMAT_BAD_F_SPEC; - pre = optional; - post = required; - dot = required; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeE: - err = FFEBAD_FORMAT_BAD_E_SPEC; - pre = optional; - post = required; - dot = required; - exp = optional; - R1005 = TRUE; - break; - - case FFESTP_formattypeEN: - err = FFEBAD_FORMAT_BAD_EN_SPEC; - pre = optional; - post = required; - dot = required; - exp = optional; - R1005 = TRUE; - break; - - case FFESTP_formattypeG: - err = FFEBAD_FORMAT_BAD_G_SPEC; - pre = optional; - post = required; - dot = required; - exp = optional; - R1005 = TRUE; - break; - - case FFESTP_formattypeL: - err = FFEBAD_FORMAT_BAD_L_SPEC; - pre = optional; - post = required; - dot = disallowed; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeA: - err = FFEBAD_FORMAT_BAD_A_SPEC; - pre = optional; - post = optional; - dot = disallowed; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeD: - err = FFEBAD_FORMAT_BAD_D_SPEC; - pre = optional; - post = required; - dot = required; - exp = disallowed; - R1005 = TRUE; - break; - - case FFESTP_formattypeQ: - err = FFEBAD_FORMAT_BAD_Q_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeDOLLAR: - err = FFEBAD_FORMAT_BAD_DOLLAR_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeP: - err = FFEBAD_FORMAT_BAD_P_SPEC; - pre = required; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeT: - err = FFEBAD_FORMAT_BAD_T_SPEC; - pre = disallowed; - post = required; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeTL: - err = FFEBAD_FORMAT_BAD_TL_SPEC; - pre = disallowed; - post = required; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeTR: - err = FFEBAD_FORMAT_BAD_TR_SPEC; - pre = disallowed; - post = required; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeX: - err = FFEBAD_FORMAT_BAD_X_SPEC; - pre = ffe_is_pedantic() ? required : optional; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeS: - err = FFEBAD_FORMAT_BAD_S_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeSP: - err = FFEBAD_FORMAT_BAD_SP_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeSS: - err = FFEBAD_FORMAT_BAD_SS_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeBN: - err = FFEBAD_FORMAT_BAD_BN_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeBZ: - err = FFEBAD_FORMAT_BAD_BZ_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeH: /* Definitely an error, make sure of - it. */ - err = FFEBAD_FORMAT_BAD_H_SPEC; - pre = ffestb_local_.format.pre.present ? disallowed : required; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - - case FFESTP_formattypeNone: - ffesta_ffebad_1t (FFEBAD_FORMAT_BAD_SPEC, - ffestb_local_.format.t); - - clean_up_to_11_: /* :::::::::::::::::::: */ - - ffelex_token_kill (ffestb_local_.format.t); - if (ffestb_local_.format.pre.present) - ffelex_token_kill (ffestb_local_.format.pre.t); - if (ffestb_local_.format.post.present) - ffelex_token_kill (ffestb_local_.format.post.t); - if (ffestb_local_.format.dot.present) - ffelex_token_kill (ffestb_local_.format.dot.t); - if (ffestb_local_.format.exp.present) - ffelex_token_kill (ffestb_local_.format.exp.t); - return (ffelexHandler) ffestb_R100111_ (t); - - default: - assert ("bad format item" == NULL); - err = FFEBAD_FORMAT_BAD_H_SPEC; - pre = disallowed; - post = disallowed; - dot = disallowed; - exp = disallowed; - R1005 = FALSE; - break; - } - if (((pre == disallowed) && ffestb_local_.format.pre.present) - || ((pre == required) && !ffestb_local_.format.pre.present)) - { - ffesta_ffebad_1t (err, (pre == required) - ? ffestb_local_.format.t : ffestb_local_.format.pre.t); - goto clean_up_to_11_; /* :::::::::::::::::::: */ - } - if (((post == disallowed) && ffestb_local_.format.post.present) - || ((post == required) && !ffestb_local_.format.post.present)) - { - ffesta_ffebad_1t (err, (post == required) - ? ffestb_local_.format.t : ffestb_local_.format.post.t); - goto clean_up_to_11_; /* :::::::::::::::::::: */ - } - if (((dot == disallowed) && ffestb_local_.format.dot.present) - || ((dot == required) && !ffestb_local_.format.dot.present)) - { - ffesta_ffebad_1t (err, (dot == required) - ? ffestb_local_.format.t : ffestb_local_.format.dot.t); - goto clean_up_to_11_; /* :::::::::::::::::::: */ - } - if (((exp == disallowed) && ffestb_local_.format.exp.present) - || ((exp == required) && !ffestb_local_.format.exp.present)) - { - ffesta_ffebad_1t (err, (exp == required) - ? ffestb_local_.format.t : ffestb_local_.format.exp.t); - goto clean_up_to_11_; /* :::::::::::::::::::: */ - } - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = ffestb_local_.format.current; - f->t = ffestb_local_.format.t; - if (R1005) - { - f->u.R1005.R1004 = ffestb_local_.format.pre; - f->u.R1005.R1006 = ffestb_local_.format.post; - f->u.R1005.R1007_or_R1008 = ffestb_local_.format.dot; - f->u.R1005.R1009 = ffestb_local_.format.exp; - } - else - /* Must be R1010. */ - { - if (pre == disallowed) - f->u.R1010.val = ffestb_local_.format.post; - else - f->u.R1010.val = ffestb_local_.format.pre; - } - return (ffelexHandler) ffestb_R100111_ (t); - } -} - -/* ffestb_R100111_ -- edit-descriptor - - return ffestb_R100111_; // to lexer - - Expect a COMMA, CLOSE_PAREN, CLOSE_ARRAY, COLON, COLONCOLON, SLASH, or - CONCAT, or complain about missing comma. */ - -static ffelexHandler -ffestb_R100111_ (ffelexToken t) -{ - ffesttFormatList f; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R10012_; - - case FFELEX_typeCOLON: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeSLASH: - case FFELEX_typeCONCAT: - return (ffelexHandler) ffestb_R10012_ (t); - - case FFELEX_typeCLOSE_PAREN: - f = ffestb_local_.format.f->u.root.parent; - if (f == NULL) - return (ffelexHandler) ffestb_R100114_; - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeCLOSE_ARRAY: /* "/)". */ - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - f = ffestb_local_.format.f->u.root.parent; - if (f == NULL) - return (ffelexHandler) ffestb_R100114_; - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeOPEN_ANGLE: - case FFELEX_typeDOLLAR: - case FFELEX_typeNUMBER: - case FFELEX_typeOPEN_PAREN: - case FFELEX_typeOPEN_ARRAY: - case FFELEX_typeQUOTE: - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeNAMES: - ffesta_ffebad_1t (FFEBAD_FORMAT_MISSING_COMMA, t); - return (ffelexHandler) ffestb_R10012_ (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_ffebad_1t (FFEBAD_FORMAT_MISSING_PAREN, t); - for (f = ffestb_local_.format.f; - f->u.root.parent != NULL; - f = f->u.root.parent->next) - ; - ffestb_local_.format.f = f; - return (ffelexHandler) ffestb_R100114_ (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R100112_ -- COLON, COLONCOLON, SLASH, OPEN_ARRAY, or CONCAT - - return ffestb_R100112_; // to lexer - - Like _11_ except the COMMA is optional. */ - -static ffelexHandler -ffestb_R100112_ (ffelexToken t) -{ - ffesttFormatList f; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R10012_; - - case FFELEX_typeCOLON: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeSLASH: - case FFELEX_typeCONCAT: - case FFELEX_typeOPEN_ANGLE: - case FFELEX_typeNAMES: - case FFELEX_typeDOLLAR: - case FFELEX_typeNUMBER: - case FFELEX_typeOPEN_PAREN: - case FFELEX_typeOPEN_ARRAY: - case FFELEX_typeQUOTE: - case FFELEX_typeAPOSTROPHE: - case FFELEX_typePLUS: - case FFELEX_typeMINUS: - return (ffelexHandler) ffestb_R10012_ (t); - - case FFELEX_typeCLOSE_PAREN: - f = ffestb_local_.format.f->u.root.parent; - if (f == NULL) - return (ffelexHandler) ffestb_R100114_; - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeCLOSE_ARRAY: /* "/)". */ - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeSLASH; - f->t = ffelex_token_use (t); - f->u.R1010.val.present = FALSE; - f->u.R1010.val.rtexpr = FALSE; - f->u.R1010.val.t = NULL; - f->u.R1010.val.u.unsigned_val = 1; - f = ffestb_local_.format.f->u.root.parent; - if (f == NULL) - return (ffelexHandler) ffestb_R100114_; - ffestb_local_.format.f = f->next; - return (ffelexHandler) ffestb_R100111_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffesta_ffebad_1t (FFEBAD_FORMAT_MISSING_PAREN, t); - for (f = ffestb_local_.format.f; - f->u.root.parent != NULL; - f = f->u.root.parent->next) - ; - ffestb_local_.format.f = f; - return (ffelexHandler) ffestb_R100114_ (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R100113_ -- Handle CHARACTER token. - - return ffestb_R100113_; // to lexer - - Append the format item to the list, go to _11_. */ - -static ffelexHandler -ffestb_R100113_ (ffelexToken t) -{ - ffesttFormatList f; - - assert (ffelex_token_type (t) == FFELEX_typeCHARACTER); - - if (ffe_is_pedantic_not_90 () && (ffelex_token_length (t) == 0)) - { - ffebad_start (FFEBAD_NULL_CHAR_CONST); - ffebad_here (0, ffelex_token_where_line (t), - ffelex_token_where_column (t)); - ffebad_finish (); - } - - f = ffestt_formatlist_append (ffestb_local_.format.f); - f->type = FFESTP_formattypeR1016; - f->t = ffelex_token_use (t); - return (ffelexHandler) ffestb_R100111_; -} - -/* ffestb_R100114_ -- "FORMAT" OPEN_PAREN format-item-list CLOSE_PAREN - - return ffestb_R100114_; // to lexer - - Handle EOS/SEMICOLON or something else. */ - -static ffelexHandler -ffestb_R100114_ (ffelexToken t) -{ - ffelex_set_names_pure (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited () && !ffestb_local_.format.complained) - ffestc_R1001 (ffestb_local_.format.f); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R100115_ -- OPEN_ANGLE expr - - (ffestb_R100115_) // to expression handler - - Handle expression prior to the edit descriptor. */ - -static ffelexHandler -ffestb_R100115_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_ANGLE: - ffestb_local_.format.pre.present = TRUE; - ffestb_local_.format.pre.rtexpr = TRUE; - ffestb_local_.format.pre.u.expr = expr; - ffelex_set_names_pure (TRUE); - return (ffelexHandler) ffestb_R10014_; - - default: - ffelex_token_kill (ffestb_local_.format.pre.t); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R100116_ -- "[n]X" OPEN_ANGLE expr - - (ffestb_R100116_) // to expression handler - - Handle expression after the edit descriptor. */ - -static ffelexHandler -ffestb_R100116_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_ANGLE: - ffestb_local_.format.post.present = TRUE; - ffestb_local_.format.post.rtexpr = TRUE; - ffestb_local_.format.post.u.expr = expr; - ffelex_set_names_pure (TRUE); - return (ffelexHandler) ffestb_R10016_; - - default: - ffelex_token_kill (ffestb_local_.format.t); - ffelex_token_kill (ffestb_local_.format.post.t); - if (ffestb_local_.format.pre.present) - ffelex_token_kill (ffestb_local_.format.pre.t); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R100117_ -- "[n]X[n]." OPEN_ANGLE expr - - (ffestb_R100117_) // to expression handler - - Handle expression after the PERIOD. */ - -static ffelexHandler -ffestb_R100117_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_ANGLE: - ffestb_local_.format.dot.present = TRUE; - ffestb_local_.format.dot.rtexpr = TRUE; - ffestb_local_.format.dot.u.expr = expr; - ffelex_set_names_pure (TRUE); - return (ffelexHandler) ffestb_R10018_; - - default: - ffelex_token_kill (ffestb_local_.format.t); - ffelex_token_kill (ffestb_local_.format.dot.t); - if (ffestb_local_.format.pre.present) - ffelex_token_kill (ffestb_local_.format.pre.t); - if (ffestb_local_.format.post.present) - ffelex_token_kill (ffestb_local_.format.post.t); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_R100118_ -- "[n]X[n].[n]E" OPEN_ANGLE expr - - (ffestb_R100118_) // to expression handler - - Handle expression after the "E". */ - -static ffelexHandler -ffestb_R100118_ (ffelexToken ft UNUSED, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_ANGLE: - ffestb_local_.format.exp.present = TRUE; - ffestb_local_.format.exp.rtexpr = TRUE; - ffestb_local_.format.exp.u.expr = expr; - ffelex_set_names_pure (TRUE); - return (ffelexHandler) ffestb_R100110_; - - default: - ffelex_token_kill (ffestb_local_.format.t); - ffelex_token_kill (ffestb_local_.format.exp.t); - if (ffestb_local_.format.pre.present) - ffelex_token_kill (ffestb_local_.format.pre.t); - if (ffestb_local_.format.post.present) - ffelex_token_kill (ffestb_local_.format.post.t); - if (ffestb_local_.format.dot.present) - ffelex_token_kill (ffestb_local_.format.dot.t); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FORMAT", t); - ffestt_formatlist_kill (ffestb_local_.format.f); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - } -} - -/* ffestb_S3P4 -- Parse the INCLUDE line - - return ffestb_S3P4; // to lexer - - Make sure the statement has a valid form for the INCLUDE line. If it - does, implement the statement. */ - -ffelexHandler -ffestb_S3P4 (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexHandler next; - ffelexToken nt; - ffelexToken ut; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstINCLUDE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeQUOTE: - break; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - ffesta_confirmed (); - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextINCLUDE, - (ffeexprCallback) ffestb_S3P41_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstINCLUDE) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlINCLUDE); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeAPOSTROPHE: - case FFELEX_typeQUOTE: - break; - } - ffesta_confirmed (); - if (*p == '\0') - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, FFEEXPR_contextINCLUDE, - (ffeexprCallback) ffestb_S3P41_))) - (t); - if (! ISDIGIT (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_number_from_names (ffesta_tokens[0], i); - p += ffelex_token_length (nt); - i += ffelex_token_length (nt); - if ((*p != '_') || (++i, *++p != '\0')) - { - ffelex_token_kill (nt); - goto bad_i; /* :::::::::::::::::::: */ - } - ut = ffelex_token_uscore_from_names (ffesta_tokens[0], i - 1); - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextINCLUDE, - (ffeexprCallback) ffestb_S3P41_))) - (nt); - ffelex_token_kill (nt); - next = (ffelexHandler) (*next) (ut); - ffelex_token_kill (ut); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INCLUDE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INCLUDE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "INCLUDE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_S3P41_ -- "INCLUDE" [NUMBER "_"] expr - - (ffestb_S3P41_) // to expression handler - - Make sure the next token is an EOS, but not a SEMICOLON. */ - -static ffelexHandler -ffestb_S3P41_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - if (ffe_is_pedantic () - && ((ffelex_token_type (t) == FFELEX_typeSEMICOLON) - || ffesta_line_has_semicolons)) - { - /* xgettext:no-c-format */ - ffebad_start_msg ("INCLUDE at %0 not the only statement on the source line", FFEBAD_severityWARNING); - ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]), - ffelex_token_where_column (ffesta_tokens[0])); - ffebad_finish (); - } - ffestc_S3P4 (expr, ft); - } - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INCLUDE", t); - break; - } - - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V014 -- Parse the VOLATILE statement - - return ffestb_V014; // to lexer - - Make sure the statement has a valid form for the VOLATILE statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_V014 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstVOLATILE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V014_start (); - return (ffelexHandler) ffestb_V0141_ (t); - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V014_start (); - return (ffelexHandler) ffestb_V0141_; - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstVOLATILE) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlVOLATILE); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - ffestc_V014_start (); - return (ffelexHandler) ffestb_V0141_ (t); - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - ffestc_V014_start (); - return (ffelexHandler) ffestb_V0141_; - } - - /* Here, we have at least one char after "VOLATILE" and t is COMMA or - EOS/SEMICOLON. */ - - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - if (!ffesta_is_inhibited ()) - ffestc_V014_start (); - next = (ffelexHandler) ffestb_V0141_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "VOLATILE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "VOLATILE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "VOLATILE", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0141_ -- "VOLATILE" [COLONCOLON] - - return ffestb_V0141_; // to lexer - - Handle NAME or SLASH. */ - -static ffelexHandler -ffestb_V0141_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffestb_local_.V014.is_cblock = FALSE; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0144_; - - case FFELEX_typeSLASH: - ffestb_local_.V014.is_cblock = TRUE; - return (ffelexHandler) ffestb_V0142_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "VOLATILE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V014_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0142_ -- "VOLATILE" [COLONCOLON] SLASH - - return ffestb_V0142_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_V0142_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0143_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "VOLATILE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V014_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0143_ -- "VOLATILE" [COLONCOLON] SLASH NAME - - return ffestb_V0143_; // to lexer - - Handle SLASH. */ - -static ffelexHandler -ffestb_V0143_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_V0144_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "VOLATILE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V014_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0144_ -- "VOLATILE" [COLONCOLON] R523 - - return ffestb_V0144_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_V0144_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - { - if (ffestb_local_.V014.is_cblock) - ffestc_V014_item_cblock (ffesta_tokens[1]); - else - ffestc_V014_item_object (ffesta_tokens[1]); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_V0141_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - if (ffestb_local_.V014.is_cblock) - ffestc_V014_item_cblock (ffesta_tokens[1]); - else - ffestc_V014_item_object (ffesta_tokens[1]); - ffestc_V014_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "VOLATILE", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V014_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_subr_kill_easy_ -- Kill I/O statement data structure - - ffestb_subr_kill_easy_(); - - Kills all tokens in the I/O data structure. Assumes that they are - overlaid with each other (union) in ffest_private.h and the typing - and structure references assume (though not necessarily dangerous if - FALSE) that INQUIRE has the most file elements. */ - -#if FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_easy_ (ffestpInquireIx max) -{ - ffestpInquireIx ix; - - for (ix = 0; ix < max; ++ix) - { - if (ffestp_file.inquire.inquire_spec[ix].kw_or_val_present) - { - if (ffestp_file.inquire.inquire_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.inquire.inquire_spec[ix].kw); - if (ffestp_file.inquire.inquire_spec[ix].value_present) - ffelex_token_kill (ffestp_file.inquire.inquire_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_accept_ -- Kill ACCEPT statement data structure - - ffestb_subr_kill_accept_(); - - Kills all tokens in the ACCEPT data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_accept_ (void) -{ - ffestpAcceptIx ix; - - for (ix = 0; ix < FFESTP_acceptix; ++ix) - { - if (ffestp_file.accept.accept_spec[ix].kw_or_val_present) - { - if (ffestp_file.accept.accept_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.accept.accept_spec[ix].kw); - if (ffestp_file.accept.accept_spec[ix].value_present) - ffelex_token_kill (ffestp_file.accept.accept_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_beru_ -- Kill BACKSPACE/ENDFILE/REWIND/UNLOCK statement - data structure - - ffestb_subr_kill_beru_(); - - Kills all tokens in the BACKSPACE/ENDFILE/REWIND/UNLOCK data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_beru_ (void) -{ - ffestpBeruIx ix; - - for (ix = 0; ix < FFESTP_beruix; ++ix) - { - if (ffestp_file.beru.beru_spec[ix].kw_or_val_present) - { - if (ffestp_file.beru.beru_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.beru.beru_spec[ix].kw); - if (ffestp_file.beru.beru_spec[ix].value_present) - ffelex_token_kill (ffestp_file.beru.beru_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_close_ -- Kill CLOSE statement data structure - - ffestb_subr_kill_close_(); - - Kills all tokens in the CLOSE data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_close_ (void) -{ - ffestpCloseIx ix; - - for (ix = 0; ix < FFESTP_closeix; ++ix) - { - if (ffestp_file.close.close_spec[ix].kw_or_val_present) - { - if (ffestp_file.close.close_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.close.close_spec[ix].kw); - if (ffestp_file.close.close_spec[ix].value_present) - ffelex_token_kill (ffestp_file.close.close_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_delete_ -- Kill DELETE statement data structure - - ffestb_subr_kill_delete_(); - - Kills all tokens in the DELETE data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_delete_ (void) -{ - ffestpDeleteIx ix; - - for (ix = 0; ix < FFESTP_deleteix; ++ix) - { - if (ffestp_file.delete.delete_spec[ix].kw_or_val_present) - { - if (ffestp_file.delete.delete_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.delete.delete_spec[ix].kw); - if (ffestp_file.delete.delete_spec[ix].value_present) - ffelex_token_kill (ffestp_file.delete.delete_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_inquire_ -- Kill INQUIRE statement data structure - - ffestb_subr_kill_inquire_(); - - Kills all tokens in the INQUIRE data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_inquire_ (void) -{ - ffestpInquireIx ix; - - for (ix = 0; ix < FFESTP_inquireix; ++ix) - { - if (ffestp_file.inquire.inquire_spec[ix].kw_or_val_present) - { - if (ffestp_file.inquire.inquire_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.inquire.inquire_spec[ix].kw); - if (ffestp_file.inquire.inquire_spec[ix].value_present) - ffelex_token_kill (ffestp_file.inquire.inquire_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_open_ -- Kill OPEN statement data structure - - ffestb_subr_kill_open_(); - - Kills all tokens in the OPEN data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_open_ (void) -{ - ffestpOpenIx ix; - - for (ix = 0; ix < FFESTP_openix; ++ix) - { - if (ffestp_file.open.open_spec[ix].kw_or_val_present) - { - if (ffestp_file.open.open_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.open.open_spec[ix].kw); - if (ffestp_file.open.open_spec[ix].value_present) - ffelex_token_kill (ffestp_file.open.open_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_print_ -- Kill PRINT statement data structure - - ffestb_subr_kill_print_(); - - Kills all tokens in the PRINT data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_print_ (void) -{ - ffestpPrintIx ix; - - for (ix = 0; ix < FFESTP_printix; ++ix) - { - if (ffestp_file.print.print_spec[ix].kw_or_val_present) - { - if (ffestp_file.print.print_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.print.print_spec[ix].kw); - if (ffestp_file.print.print_spec[ix].value_present) - ffelex_token_kill (ffestp_file.print.print_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_read_ -- Kill READ statement data structure - - ffestb_subr_kill_read_(); - - Kills all tokens in the READ data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_read_ (void) -{ - ffestpReadIx ix; - - for (ix = 0; ix < FFESTP_readix; ++ix) - { - if (ffestp_file.read.read_spec[ix].kw_or_val_present) - { - if (ffestp_file.read.read_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.read.read_spec[ix].kw); - if (ffestp_file.read.read_spec[ix].value_present) - ffelex_token_kill (ffestp_file.read.read_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_rewrite_ -- Kill REWRITE statement data structure - - ffestb_subr_kill_rewrite_(); - - Kills all tokens in the REWRITE data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_rewrite_ (void) -{ - ffestpRewriteIx ix; - - for (ix = 0; ix < FFESTP_rewriteix; ++ix) - { - if (ffestp_file.rewrite.rewrite_spec[ix].kw_or_val_present) - { - if (ffestp_file.rewrite.rewrite_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.rewrite.rewrite_spec[ix].kw); - if (ffestp_file.rewrite.rewrite_spec[ix].value_present) - ffelex_token_kill (ffestp_file.rewrite.rewrite_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_type_ -- Kill TYPE statement data structure - - ffestb_subr_kill_type_(); - - Kills all tokens in the TYPE data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_type_ (void) -{ - ffestpTypeIx ix; - - for (ix = 0; ix < FFESTP_typeix; ++ix) - { - if (ffestp_file.type.type_spec[ix].kw_or_val_present) - { - if (ffestp_file.type.type_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.type.type_spec[ix].kw); - if (ffestp_file.type.type_spec[ix].value_present) - ffelex_token_kill (ffestp_file.type.type_spec[ix].value); - } - } -} - -#endif -/* ffestb_subr_kill_write_ -- Kill WRITE statement data structure - - ffestb_subr_kill_write_(); - - Kills all tokens in the WRITE data structure. */ - -#if !FFESTB_KILL_EASY_ -static void -ffestb_subr_kill_write_ (void) -{ - ffestpWriteIx ix; - - for (ix = 0; ix < FFESTP_writeix; ++ix) - { - if (ffestp_file.write.write_spec[ix].kw_or_val_present) - { - if (ffestp_file.write.write_spec[ix].kw_present) - ffelex_token_kill (ffestp_file.write.write_spec[ix].kw); - if (ffestp_file.write.write_spec[ix].value_present) - ffelex_token_kill (ffestp_file.write.write_spec[ix].value); - } - } -} - -#endif -/* ffestb_beru -- Parse the BACKSPACE/ENDFILE/REWIND/UNLOCK statement - - return ffestb_beru; // to lexer - - Make sure the statement has a valid form for the BACKSPACE/ENDFILE/REWIND/ - UNLOCK statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_beru (ffelexToken t) -{ - ffelexHandler next; - ffestpBeruIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); - break; - - case FFELEX_typeOPEN_PAREN: - for (ix = 0; ix < FFESTP_beruix; ++ix) - ffestp_file.beru.beru_spec[ix].kw_or_val_present = FALSE; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_beru2_; - - default: - break; - } - - for (ix = 0; ix < FFESTP_beruix; ++ix) - ffestp_file.beru.beru_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, - (ffeexprCallback) ffestb_beru1_))) - (t); - - case FFELEX_typeNAMES: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeOPEN_PAREN: - if (ffelex_token_length (ffesta_tokens[0]) - != ffestb_args.beru.len) - break; - - for (ix = 0; ix < FFESTP_beruix; ++ix) - ffestp_file.beru.beru_spec[ix].kw_or_val_present = FALSE; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_beru2_; - - default: - break; - } - for (ix = 0; ix < FFESTP_beruix; ++ix) - ffestp_file.beru.beru_spec[ix].kw_or_val_present = FALSE; - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_beru1_); - next = (ffelexHandler) ffelex_splice_tokens (next, ffesta_tokens[0], - ffestb_args.beru.len); - if (next == NULL) - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_beru1_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" expr - - (ffestb_beru1_) // to expression handler - - Make sure the next token is an EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_beru1_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - ffesta_confirmed (); - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].kw_or_val_present - = TRUE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].kw_present = FALSE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].value_present = TRUE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].value_is_label - = FALSE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].value - = ffelex_token_use (ft); - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].u.expr = expr; - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstBACKSPACE: - ffestc_R919 (); - break; - - case FFESTR_firstENDFILE: - case FFESTR_firstEND: - ffestc_R920 (); - break; - - case FFESTR_firstREWIND: - ffestc_R921 (); - break; - - default: - assert (FALSE); - } - } - ffestb_subr_kill_beru_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_beru2_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN - - return ffestb_beru2_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_beru2_ (ffelexToken t) -{ - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_beru3_; - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUMAMBIG, (ffeexprCallback) ffestb_beru4_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_beru3_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN NAME - - return ffestb_beru3_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_beru3_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - ffelexToken ot; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffelex_token_kill (ffesta_tokens[1]); - nt = ffesta_tokens[2]; - next = (ffelexHandler) ffestb_beru5_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - nt = ffesta_tokens[1]; - ot = ffesta_tokens[2]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUMAMBIG, (ffeexprCallback) ffestb_beru4_))) - (nt); - ffelex_token_kill (nt); - next = (ffelexHandler) (*next) (ot); - ffelex_token_kill (ot); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_beru4_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN expr [CLOSE_PAREN] - - (ffestb_beru4_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. - - 15-Feb-91 JCB 1.2 - Now using new mechanism whereby expr comes back as opITEM if the - expr is considered part (or all) of an I/O control list (and should - be stripped of its outer opITEM node) or not if it is considered - a plain unit number that happens to have been enclosed in parens. - 26-Mar-90 JCB 1.1 - No longer expecting close-paren here because of constructs like - BACKSPACE (5)+2, so now expecting either COMMA because it was a - construct like BACKSPACE (5+2,... or EOS/SEMICOLON because it is like - the former construct. Ah, the vagaries of Fortran. */ - -static ffelexHandler -ffestb_beru4_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - bool inlist; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - if (ffebld_op (expr) == FFEBLD_opITEM) - { - inlist = TRUE; - expr = ffebld_head (expr); - } - else - inlist = FALSE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].kw_or_val_present - = TRUE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].kw_present = FALSE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].value_present = TRUE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].value_is_label - = FALSE; - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].value - = ffelex_token_use (ft); - ffestp_file.beru.beru_spec[FFESTP_beruixUNIT].u.expr = expr; - if (inlist) - return (ffelexHandler) ffestb_beru9_ (t); - return (ffelexHandler) ffestb_beru10_ (t); - - default: - break; - } - - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_beru5_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN [external-file-unit - COMMA] - - return ffestb_beru5_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_beru5_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.beru.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioERR: - ffestb_local_.beru.ix = FFESTP_beruixERR; - ffestb_local_.beru.label = TRUE; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.beru.ix = FFESTP_beruixIOSTAT; - ffestb_local_.beru.left = TRUE; - ffestb_local_.beru.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioUNIT: - ffestb_local_.beru.ix = FFESTP_beruixUNIT; - ffestb_local_.beru.left = FALSE; - ffestb_local_.beru.context = FFEEXPR_contextFILENUM; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.beru.beru_spec[ffestb_local_.beru.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix] - .kw_or_val_present = TRUE; - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix] - .kw_present = TRUE; - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix] - .value_present = FALSE; - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix].value_is_label - = ffestb_local_.beru.label; - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_beru6_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_beru6_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN [external-file-unit - COMMA] NAME - - return ffestb_beru6_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_beru6_ (ffelexToken t) -{ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.beru.label) - return (ffelexHandler) ffestb_beru8_; - if (ffestb_local_.beru.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.beru.context, - (ffeexprCallback) ffestb_beru7_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.beru.context, - (ffeexprCallback) ffestb_beru7_); - - default: - break; - } - - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_beru7_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_beru7_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_beru7_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix].value_present - = TRUE; - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix].value - = ffelex_token_use (ft); - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_beru5_; - return (ffelexHandler) ffestb_beru10_; - - default: - break; - } - - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_beru8_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN ... NAME EQUALS - - return ffestb_beru8_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_beru8_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix].value_present - = TRUE; - ffestp_file.beru.beru_spec[ffestb_local_.beru.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_beru9_; - - default: - break; - } - - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_beru9_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN ... NAME EQUALS - NUMBER - - return ffestb_beru9_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_beru9_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_beru5_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_beru10_; - - default: - break; - } - - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_beru10_ -- "BACKSPACE/ENDFILE/REWIND/UNLOCK" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_beru10_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_beru10_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - switch (ffesta_first_kw) - { - case FFESTR_firstBACKSPACE: - ffestc_R919 (); - break; - - case FFESTR_firstENDFILE: - case FFESTR_firstEND: - ffestc_R920 (); - break; - - case FFESTR_firstREWIND: - ffestc_R921 (); - break; - - default: - assert (FALSE); - } - } - ffestb_subr_kill_beru_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_beru_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.beru.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R904 -- Parse an OPEN statement - - return ffestb_R904; // to lexer - - Make sure the statement has a valid form for an OPEN statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R904 (ffelexToken t) -{ - ffestpOpenIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstOPEN) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstOPEN) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlOPEN) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - for (ix = 0; ix < FFESTP_openix; ++ix) - ffestp_file.open.open_spec[ix].kw_or_val_present = FALSE; - - return (ffelexHandler) ffestb_R9041_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R9041_ -- "OPEN" OPEN_PAREN - - return ffestb_R9041_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9041_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9042_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_R9043_))) - (t); - } -} - -/* ffestb_R9042_ -- "OPEN" OPEN_PAREN NAME - - return ffestb_R9042_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_R9042_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_R9044_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_R9043_))) - (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9043_ -- "OPEN" OPEN_PAREN expr - - (ffestb_R9043_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9043_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.open.open_spec[FFESTP_openixUNIT].kw_or_val_present - = TRUE; - ffestp_file.open.open_spec[FFESTP_openixUNIT].kw_present = FALSE; - ffestp_file.open.open_spec[FFESTP_openixUNIT].value_present = TRUE; - ffestp_file.open.open_spec[FFESTP_openixUNIT].value_is_label - = FALSE; - ffestp_file.open.open_spec[FFESTP_openixUNIT].value - = ffelex_token_use (ft); - ffestp_file.open.open_spec[FFESTP_openixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9044_; - return (ffelexHandler) ffestb_R9049_; - - default: - break; - } - - ffestb_subr_kill_open_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9044_ -- "OPEN" OPEN_PAREN [external-file-unit COMMA] - - return ffestb_R9044_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9044_ (ffelexToken t) -{ - ffestrOpen kw; - - ffestb_local_.open.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_open (t); - switch (kw) - { - case FFESTR_openACCESS: - ffestb_local_.open.ix = FFESTP_openixACCESS; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openACTION: - ffestb_local_.open.ix = FFESTP_openixACTION; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openASSOCIATEVARIABLE: - ffestb_local_.open.ix = FFESTP_openixASSOCIATEVARIABLE; - ffestb_local_.open.left = TRUE; - ffestb_local_.open.context = FFEEXPR_contextFILEASSOC; - break; - - case FFESTR_openBLANK: - ffestb_local_.open.ix = FFESTP_openixBLANK; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openBLOCKSIZE: - ffestb_local_.open.ix = FFESTP_openixBLOCKSIZE; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_openBUFFERCOUNT: - ffestb_local_.open.ix = FFESTP_openixBUFFERCOUNT; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_openCARRIAGECONTROL: - ffestb_local_.open.ix = FFESTP_openixCARRIAGECONTROL; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_openDEFAULTFILE: - ffestb_local_.open.ix = FFESTP_openixDEFAULTFILE; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_openDELIM: - ffestb_local_.open.ix = FFESTP_openixDELIM; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openDISP: - case FFESTR_openDISPOSE: - ffestb_local_.open.ix = FFESTP_openixDISPOSE; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_openERR: - ffestb_local_.open.ix = FFESTP_openixERR; - ffestb_local_.open.label = TRUE; - break; - - case FFESTR_openEXTENDSIZE: - ffestb_local_.open.ix = FFESTP_openixEXTENDSIZE; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_openFILE: - case FFESTR_openNAME: - ffestb_local_.open.ix = FFESTP_openixFILE; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_openFORM: - ffestb_local_.open.ix = FFESTP_openixFORM; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openINITIALSIZE: - ffestb_local_.open.ix = FFESTP_openixINITIALSIZE; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_openIOSTAT: - ffestb_local_.open.ix = FFESTP_openixIOSTAT; - ffestb_local_.open.left = TRUE; - ffestb_local_.open.context = FFEEXPR_contextFILEINT; - break; - -#if 0 /* Haven't added support for expression - context yet (though easy). */ - case FFESTR_openKEY: - ffestb_local_.open.ix = FFESTP_openixKEY; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEKEY; - break; -#endif - - case FFESTR_openMAXREC: - ffestb_local_.open.ix = FFESTP_openixMAXREC; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_openNOSPANBLOCKS: - if (ffestp_file.open.open_spec[FFESTP_openixNOSPANBLOCKS] - .kw_or_val_present) - goto bad; /* :::::::::::::::::::: */ - ffestp_file.open.open_spec[FFESTP_openixNOSPANBLOCKS] - .kw_or_val_present = TRUE; - ffestp_file.open.open_spec[FFESTP_openixNOSPANBLOCKS] - .kw_present = TRUE; - ffestp_file.open.open_spec[FFESTP_openixNOSPANBLOCKS] - .value_present = FALSE; - ffestp_file.open.open_spec[FFESTP_openixNOSPANBLOCKS].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9048_; - - case FFESTR_openORGANIZATION: - ffestb_local_.open.ix = FFESTP_openixORGANIZATION; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_openPAD: - ffestb_local_.open.ix = FFESTP_openixPAD; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openPOSITION: - ffestb_local_.open.ix = FFESTP_openixPOSITION; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openREADONLY: - if (ffestp_file.open.open_spec[FFESTP_openixREADONLY] - .kw_or_val_present) - goto bad; /* :::::::::::::::::::: */ - ffestp_file.open.open_spec[FFESTP_openixREADONLY] - .kw_or_val_present = TRUE; - ffestp_file.open.open_spec[FFESTP_openixREADONLY] - .kw_present = TRUE; - ffestp_file.open.open_spec[FFESTP_openixREADONLY] - .value_present = FALSE; - ffestp_file.open.open_spec[FFESTP_openixREADONLY].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9048_; - - case FFESTR_openRECL: - case FFESTR_openRECORDSIZE: - ffestb_local_.open.ix = FFESTP_openixRECL; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_openRECORDTYPE: - ffestb_local_.open.ix = FFESTP_openixRECORDTYPE; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_openSHARED: - if (ffestp_file.open.open_spec[FFESTP_openixSHARED] - .kw_or_val_present) - goto bad; /* :::::::::::::::::::: */ - ffestp_file.open.open_spec[FFESTP_openixSHARED] - .kw_or_val_present = TRUE; - ffestp_file.open.open_spec[FFESTP_openixSHARED] - .kw_present = TRUE; - ffestp_file.open.open_spec[FFESTP_openixSHARED] - .value_present = FALSE; - ffestp_file.open.open_spec[FFESTP_openixSHARED].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9048_; - - case FFESTR_openSTATUS: - case FFESTR_openTYPE: - ffestb_local_.open.ix = FFESTP_openixSTATUS; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_openUNIT: - ffestb_local_.open.ix = FFESTP_openixUNIT; - ffestb_local_.open.left = FALSE; - ffestb_local_.open.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_openUSEROPEN: - ffestb_local_.open.ix = FFESTP_openixUSEROPEN; - ffestb_local_.open.left = TRUE; - ffestb_local_.open.context = FFEEXPR_contextFILEEXTFUNC; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.open.open_spec[ffestb_local_.open.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.open.open_spec[ffestb_local_.open.ix] - .kw_or_val_present = TRUE; - ffestp_file.open.open_spec[ffestb_local_.open.ix] - .kw_present = TRUE; - ffestp_file.open.open_spec[ffestb_local_.open.ix] - .value_present = FALSE; - ffestp_file.open.open_spec[ffestb_local_.open.ix].value_is_label - = ffestb_local_.open.label; - ffestp_file.open.open_spec[ffestb_local_.open.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9045_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_open_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9045_ -- "OPEN" OPEN_PAREN [external-file-unit COMMA] NAME - - return ffestb_R9045_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_R9045_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.open.label) - return (ffelexHandler) ffestb_R9047_; - if (ffestb_local_.open.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.open.context, - (ffeexprCallback) ffestb_R9046_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.open.context, - (ffeexprCallback) ffestb_R9046_); - - default: - break; - } - - ffestb_subr_kill_open_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9046_ -- "OPEN" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_R9046_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9046_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.open.open_spec[ffestb_local_.open.ix].value_present - = TRUE; - ffestp_file.open.open_spec[ffestb_local_.open.ix].value - = ffelex_token_use (ft); - ffestp_file.open.open_spec[ffestb_local_.open.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9044_; - return (ffelexHandler) ffestb_R9049_; - - default: - break; - } - - ffestb_subr_kill_open_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9047_ -- "OPEN" OPEN_PAREN ... NAME EQUALS - - return ffestb_R9047_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_R9047_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.open.open_spec[ffestb_local_.open.ix].value_present - = TRUE; - ffestp_file.open.open_spec[ffestb_local_.open.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9048_; - - default: - break; - } - - ffestb_subr_kill_open_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9048_ -- "OPEN" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_R9048_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9048_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R9044_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_R9049_; - - default: - break; - } - - ffestb_subr_kill_open_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9049_ -- "OPEN" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_R9049_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_R9049_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R904 (); - ffestb_subr_kill_open_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_open_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "OPEN", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R907 -- Parse a CLOSE statement - - return ffestb_R907; // to lexer - - Make sure the statement has a valid form for a CLOSE statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R907 (ffelexToken t) -{ - ffestpCloseIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCLOSE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstCLOSE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlCLOSE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - for (ix = 0; ix < FFESTP_closeix; ++ix) - ffestp_file.close.close_spec[ix].kw_or_val_present = FALSE; - - return (ffelexHandler) ffestb_R9071_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R9071_ -- "CLOSE" OPEN_PAREN - - return ffestb_R9071_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9071_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9072_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_R9073_))) - (t); - } -} - -/* ffestb_R9072_ -- "CLOSE" OPEN_PAREN NAME - - return ffestb_R9072_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_R9072_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_R9074_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_R9073_))) - (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9073_ -- "CLOSE" OPEN_PAREN expr - - (ffestb_R9073_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9073_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.close.close_spec[FFESTP_closeixUNIT].kw_or_val_present - = TRUE; - ffestp_file.close.close_spec[FFESTP_closeixUNIT].kw_present = FALSE; - ffestp_file.close.close_spec[FFESTP_closeixUNIT].value_present = TRUE; - ffestp_file.close.close_spec[FFESTP_closeixUNIT].value_is_label - = FALSE; - ffestp_file.close.close_spec[FFESTP_closeixUNIT].value - = ffelex_token_use (ft); - ffestp_file.close.close_spec[FFESTP_closeixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9074_; - return (ffelexHandler) ffestb_R9079_; - - default: - break; - } - - ffestb_subr_kill_close_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9074_ -- "CLOSE" OPEN_PAREN [external-file-unit COMMA] - - return ffestb_R9074_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9074_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.close.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioERR: - ffestb_local_.close.ix = FFESTP_closeixERR; - ffestb_local_.close.label = TRUE; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.close.ix = FFESTP_closeixIOSTAT; - ffestb_local_.close.left = TRUE; - ffestb_local_.close.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioSTATUS: - case FFESTR_genioDISP: - case FFESTR_genioDISPOSE: - ffestb_local_.close.ix = FFESTP_closeixSTATUS; - ffestb_local_.close.left = FALSE; - ffestb_local_.close.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_genioUNIT: - ffestb_local_.close.ix = FFESTP_closeixUNIT; - ffestb_local_.close.left = FALSE; - ffestb_local_.close.context = FFEEXPR_contextFILENUM; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.close.close_spec[ffestb_local_.close.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.close.close_spec[ffestb_local_.close.ix] - .kw_or_val_present = TRUE; - ffestp_file.close.close_spec[ffestb_local_.close.ix] - .kw_present = TRUE; - ffestp_file.close.close_spec[ffestb_local_.close.ix] - .value_present = FALSE; - ffestp_file.close.close_spec[ffestb_local_.close.ix].value_is_label - = ffestb_local_.close.label; - ffestp_file.close.close_spec[ffestb_local_.close.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9075_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_close_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9075_ -- "CLOSE" OPEN_PAREN [external-file-unit COMMA] NAME - - return ffestb_R9075_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_R9075_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.close.label) - return (ffelexHandler) ffestb_R9077_; - if (ffestb_local_.close.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.close.context, - (ffeexprCallback) ffestb_R9076_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.close.context, - (ffeexprCallback) ffestb_R9076_); - - default: - break; - } - - ffestb_subr_kill_close_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9076_ -- "CLOSE" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_R9076_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9076_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.close.close_spec[ffestb_local_.close.ix].value_present - = TRUE; - ffestp_file.close.close_spec[ffestb_local_.close.ix].value - = ffelex_token_use (ft); - ffestp_file.close.close_spec[ffestb_local_.close.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9074_; - return (ffelexHandler) ffestb_R9079_; - - default: - break; - } - - ffestb_subr_kill_close_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9077_ -- "CLOSE" OPEN_PAREN ... NAME EQUALS - - return ffestb_R9077_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_R9077_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.close.close_spec[ffestb_local_.close.ix].value_present - = TRUE; - ffestp_file.close.close_spec[ffestb_local_.close.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9078_; - - default: - break; - } - - ffestb_subr_kill_close_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9078_ -- "CLOSE" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_R9078_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9078_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R9074_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_R9079_; - - default: - break; - } - - ffestb_subr_kill_close_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9079_ -- "CLOSE" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_R9079_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_R9079_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R907 (); - ffestb_subr_kill_close_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_close_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "CLOSE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R909 -- Parse the READ statement - - return ffestb_R909; // to lexer - - Make sure the statement has a valid form for the READ - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_R909 (ffelexToken t) -{ - ffelexHandler next; - ffestpReadIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstREAD) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); - break; - - case FFELEX_typeOPEN_PAREN: - for (ix = 0; ix < FFESTP_readix; ++ix) - ffestp_file.read.read_spec[ix].kw_or_val_present = FALSE; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9092_; - - default: - break; - } - - for (ix = 0; ix < FFESTP_readix; ++ix) - ffestp_file.read.read_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9091_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstREAD) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlREAD) - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlREAD) - break; - - for (ix = 0; ix < FFESTP_readix; ++ix) - ffestp_file.read.read_spec[ix].kw_or_val_present = FALSE; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9092_; - - default: - break; - } - for (ix = 0; ix < FFESTP_readix; ++ix) - ffestp_file.read.read_spec[ix].kw_or_val_present = FALSE; - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9091_); - next = (ffelexHandler) ffelex_splice_tokens (next, ffesta_tokens[0], - FFESTR_firstlREAD); - if (next == NULL) - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R9091_ -- "READ" expr - - (ffestb_R9091_) // to expression handler - - Make sure the next token is a COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_R9091_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - ffestp_file.read.read_spec[FFESTP_readixFORMAT].kw_or_val_present - = TRUE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].kw_present = FALSE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value_present = TRUE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value_is_label - = (expr == NULL); - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value - = ffelex_token_use (ft); - ffestp_file.read.read_spec[FFESTP_readixFORMAT].u.expr = expr; - if (!ffesta_is_inhibited ()) - ffestc_R909_start (TRUE); - ffestb_subr_kill_read_ (); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestc_context_iolist (), - (ffeexprCallback) ffestb_R90915_); - if (!ffesta_is_inhibited ()) - ffestc_R909_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9092_ -- "READ" OPEN_PAREN - - return ffestb_R9092_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9092_ (ffelexToken t) -{ - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9093_; - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEUNITAMBIG, (ffeexprCallback) ffestb_R9094_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9093_ -- "READ" OPEN_PAREN NAME - - return ffestb_R9093_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_R9093_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - ffelexToken ot; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffelex_token_kill (ffesta_tokens[1]); - nt = ffesta_tokens[2]; - next = (ffelexHandler) ffestb_R9098_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - nt = ffesta_tokens[1]; - ot = ffesta_tokens[2]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEUNITAMBIG, (ffeexprCallback) ffestb_R9094_))) - (nt); - ffelex_token_kill (nt); - next = (ffelexHandler) (*next) (ot); - ffelex_token_kill (ot); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9094_ -- "READ" OPEN_PAREN expr [CLOSE_PAREN] - - (ffestb_R9094_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. - - 15-Feb-91 JCB 1.1 - Use new ffeexpr mechanism whereby the expr is encased in an opITEM if - ffeexpr decided it was an item in a control list (hence a unit - specifier), or a format specifier otherwise. */ - -static ffelexHandler -ffestb_R9094_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - if (expr == NULL) - goto bad; /* :::::::::::::::::::: */ - - if (ffebld_op (expr) != FFEBLD_opITEM) - { - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - ffestp_file.read.read_spec[FFESTP_readixFORMAT].kw_or_val_present - = TRUE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].kw_present = FALSE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value_present = TRUE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value_is_label - = FALSE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value - = ffelex_token_use (ft); - ffestp_file.read.read_spec[FFESTP_readixFORMAT].u.expr = expr; - if (!ffesta_is_inhibited ()) - ffestc_R909_start (TRUE); - ffestb_subr_kill_read_ (); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - ffestc_context_iolist (), - (ffeexprCallback) ffestb_R90915_); - if (!ffesta_is_inhibited ()) - ffestc_R909_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - goto bad; /* :::::::::::::::::::: */ - } - } - - expr = ffebld_head (expr); - - if (expr == NULL) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - ffestp_file.read.read_spec[FFESTP_readixUNIT].kw_or_val_present - = TRUE; - ffestp_file.read.read_spec[FFESTP_readixUNIT].kw_present = FALSE; - ffestp_file.read.read_spec[FFESTP_readixUNIT].value_present = TRUE; - ffestp_file.read.read_spec[FFESTP_readixUNIT].value_is_label - = FALSE; - ffestp_file.read.read_spec[FFESTP_readixUNIT].value - = ffelex_token_use (ft); - ffestp_file.read.read_spec[FFESTP_readixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9095_; - return (ffelexHandler) ffestb_R90913_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9095_ -- "READ" OPEN_PAREN expr COMMA - - return ffestb_R9095_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9095_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9096_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9097_))) - (t); - } -} - -/* ffestb_R9096_ -- "READ" OPEN_PAREN expr COMMA NAME - - return ffestb_R9096_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_R9096_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_R9098_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9097_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9097_ -- "READ" OPEN_PAREN expr COMMA expr - - (ffestb_R9097_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9097_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - ffestp_file.read.read_spec[FFESTP_readixFORMAT].kw_or_val_present - = TRUE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].kw_present = FALSE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value_present = TRUE; - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value_is_label - = (expr == NULL); - ffestp_file.read.read_spec[FFESTP_readixFORMAT].value - = ffelex_token_use (ft); - ffestp_file.read.read_spec[FFESTP_readixFORMAT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9098_; - return (ffelexHandler) ffestb_R90913_; - - default: - break; - } - - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9098_ -- "READ" OPEN_PAREN [external-file-unit COMMA [format - COMMA]] - - return ffestb_R9098_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9098_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.read.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioADVANCE: - ffestb_local_.read.ix = FFESTP_readixADVANCE; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_genioEOR: - ffestb_local_.read.ix = FFESTP_readixEOR; - ffestb_local_.read.label = TRUE; - break; - - case FFESTR_genioERR: - ffestb_local_.read.ix = FFESTP_readixERR; - ffestb_local_.read.label = TRUE; - break; - - case FFESTR_genioEND: - ffestb_local_.read.ix = FFESTP_readixEND; - ffestb_local_.read.label = TRUE; - break; - - case FFESTR_genioFMT: - ffestb_local_.read.ix = FFESTP_readixFORMAT; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILEFORMAT; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.read.ix = FFESTP_readixIOSTAT; - ffestb_local_.read.left = TRUE; - ffestb_local_.read.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioKEY: - case FFESTR_genioKEYEQ: - ffestb_local_.read.ix = FFESTP_readixKEYEQ; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILENUMCHAR; - break; - - case FFESTR_genioKEYGE: - ffestb_local_.read.ix = FFESTP_readixKEYGE; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILENUMCHAR; - break; - - case FFESTR_genioKEYGT: - ffestb_local_.read.ix = FFESTP_readixKEYGT; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILENUMCHAR; - break; - - case FFESTR_genioKEYID: - ffestb_local_.read.ix = FFESTP_readixKEYID; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_genioNML: - ffestb_local_.read.ix = FFESTP_readixFORMAT; - ffestb_local_.read.left = TRUE; - ffestb_local_.read.context = FFEEXPR_contextFILENAMELIST; - break; - - case FFESTR_genioNULLS: - ffestb_local_.read.ix = FFESTP_readixNULLS; - ffestb_local_.read.left = TRUE; - ffestb_local_.read.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioREC: - ffestb_local_.read.ix = FFESTP_readixREC; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_genioSIZE: - ffestb_local_.read.ix = FFESTP_readixSIZE; - ffestb_local_.read.left = TRUE; - ffestb_local_.read.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioUNIT: - ffestb_local_.read.ix = FFESTP_readixUNIT; - ffestb_local_.read.left = FALSE; - ffestb_local_.read.context = FFEEXPR_contextFILEUNIT; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.read.read_spec[ffestb_local_.read.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.read.read_spec[ffestb_local_.read.ix] - .kw_or_val_present = TRUE; - ffestp_file.read.read_spec[ffestb_local_.read.ix] - .kw_present = TRUE; - ffestp_file.read.read_spec[ffestb_local_.read.ix] - .value_present = FALSE; - ffestp_file.read.read_spec[ffestb_local_.read.ix].value_is_label - = ffestb_local_.read.label; - ffestp_file.read.read_spec[ffestb_local_.read.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9099_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9099_ -- "READ" OPEN_PAREN [external-file-unit COMMA [format - COMMA]] NAME - - return ffestb_R9099_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_R9099_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.read.label) - return (ffelexHandler) ffestb_R90911_; - if (ffestb_local_.read.left) - return (ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.read.context, - (ffeexprCallback) ffestb_R90910_); - return (ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.read.context, - (ffeexprCallback) ffestb_R90910_); - - default: - break; - } - - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R90910_ -- "READ" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_R90910_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R90910_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - { - if (ffestb_local_.read.context == FFEEXPR_contextFILEFORMAT) - ffestp_file.read.read_spec[ffestb_local_.read.ix] - .value_is_label = TRUE; - else - break; - } - ffestp_file.read.read_spec[ffestb_local_.read.ix].value_present - = TRUE; - ffestp_file.read.read_spec[ffestb_local_.read.ix].value - = ffelex_token_use (ft); - ffestp_file.read.read_spec[ffestb_local_.read.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9098_; - return (ffelexHandler) ffestb_R90913_; - - default: - break; - } - - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R90911_ -- "READ" OPEN_PAREN ... NAME EQUALS - - return ffestb_R90911_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_R90911_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.read.read_spec[ffestb_local_.read.ix].value_present - = TRUE; - ffestp_file.read.read_spec[ffestb_local_.read.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R90912_; - - default: - break; - } - - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R90912_ -- "READ" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_R90912_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R90912_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R9098_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_R90913_; - - default: - break; - } - - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R90913_ -- "READ" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_R90913_; // to lexer - - Handle EOS or SEMICOLON here. - - 15-Feb-91 JCB 1.1 - Fix to allow implied-DO construct here (OPEN_PAREN) -- actually, - don't presume knowledge of what an initial token in an lhs context - is going to be, let ffeexpr_lhs handle that as much as possible. */ - -static ffelexHandler -ffestb_R90913_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - ffestc_R909_start (FALSE); - ffestc_R909_finish (); - } - ffestb_subr_kill_read_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_confirmed (); - /* Fall through. */ - case FFELEX_typeOPEN_PAREN: /* Could still be assignment!! */ - break; - } - - /* If token isn't NAME or OPEN_PAREN, ffeexpr_lhs will ultimately whine - about it, so leave it up to that code. */ - - /* EXTENSION: Allow an optional preceding COMMA here if not pedantic. (f2c - provides this extension, as do other compilers, supposedly.) */ - - if (!ffe_is_pedantic () && (ffelex_token_type (t) == FFELEX_typeCOMMA)) - return (ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - ffestc_context_iolist (), - (ffeexprCallback) ffestb_R90914_); - - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_lhs (ffesta_output_pool, - ffestc_context_iolist (), - (ffeexprCallback) ffestb_R90914_))) - (t); -} - -/* ffestb_R90914_ -- "READ(...)" expr - - (ffestb_R90914_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_R90914_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R909_start (FALSE); - ffestb_subr_kill_read_ (); - - if (!ffesta_is_inhibited ()) - ffestc_R909_item (expr, ft); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestc_context_iolist (), - (ffeexprCallback) ffestb_R90915_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R909_start (FALSE); - ffestb_subr_kill_read_ (); - - if (!ffesta_is_inhibited ()) - { - ffestc_R909_item (expr, ft); - ffestc_R909_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_read_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R90915_ -- "READ(...)" expr COMMA expr - - (ffestb_R90915_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_R90915_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R909_item (expr, ft); - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestc_context_iolist (), - (ffeexprCallback) ffestb_R90915_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_R909_item (expr, ft); - ffestc_R909_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R909_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "READ", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R910 -- Parse the WRITE statement - - return ffestb_R910; // to lexer - - Make sure the statement has a valid form for the WRITE - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_R910 (ffelexToken t) -{ - ffestpWriteIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstWRITE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - for (ix = 0; ix < FFESTP_writeix; ++ix) - ffestp_file.write.write_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) ffestb_R9101_; - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstWRITE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlWRITE) - goto bad_0; /* :::::::::::::::::::: */ - - for (ix = 0; ix < FFESTP_writeix; ++ix) - ffestp_file.write.write_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) ffestb_R9101_; - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R9101_ -- "WRITE" OPEN_PAREN - - return ffestb_R9101_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9101_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9102_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEUNIT, (ffeexprCallback) ffestb_R9103_))) - (t); - } -} - -/* ffestb_R9102_ -- "WRITE" OPEN_PAREN NAME - - return ffestb_R9102_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_R9102_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_R9107_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEUNIT, (ffeexprCallback) ffestb_R9103_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9103_ -- "WRITE" OPEN_PAREN expr [CLOSE_PAREN] - - (ffestb_R9103_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_R9103_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.write.write_spec[FFESTP_writeixUNIT].kw_or_val_present - = TRUE; - ffestp_file.write.write_spec[FFESTP_writeixUNIT].kw_present = FALSE; - ffestp_file.write.write_spec[FFESTP_writeixUNIT].value_present = TRUE; - ffestp_file.write.write_spec[FFESTP_writeixUNIT].value_is_label - = FALSE; - ffestp_file.write.write_spec[FFESTP_writeixUNIT].value - = ffelex_token_use (ft); - ffestp_file.write.write_spec[FFESTP_writeixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9104_; - return (ffelexHandler) ffestb_R91012_; - - default: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9104_ -- "WRITE" OPEN_PAREN expr COMMA - - return ffestb_R9104_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9104_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9105_; - - default: - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9106_))) - (t); - } -} - -/* ffestb_R9105_ -- "WRITE" OPEN_PAREN expr COMMA NAME - - return ffestb_R9105_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_R9105_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_R9107_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - nt = ffesta_tokens[1]; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9106_))) - (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9106_ -- "WRITE" OPEN_PAREN expr COMMA expr - - (ffestb_R9106_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9106_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - ffestp_file.write.write_spec[FFESTP_writeixFORMAT].kw_or_val_present - = TRUE; - ffestp_file.write.write_spec[FFESTP_writeixFORMAT].kw_present = FALSE; - ffestp_file.write.write_spec[FFESTP_writeixFORMAT].value_present = TRUE; - ffestp_file.write.write_spec[FFESTP_writeixFORMAT].value_is_label - = (expr == NULL); - ffestp_file.write.write_spec[FFESTP_writeixFORMAT].value - = ffelex_token_use (ft); - ffestp_file.write.write_spec[FFESTP_writeixFORMAT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9107_; - return (ffelexHandler) ffestb_R91012_; - - default: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9107_ -- "WRITE" OPEN_PAREN [external-file-unit COMMA [format - COMMA]] - - return ffestb_R9107_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9107_ (ffelexToken t) -{ - ffestrGenio kw; - - ffestb_local_.write.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_genio (t); - switch (kw) - { - case FFESTR_genioADVANCE: - ffestb_local_.write.ix = FFESTP_writeixADVANCE; - ffestb_local_.write.left = FALSE; - ffestb_local_.write.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_genioEOR: - ffestb_local_.write.ix = FFESTP_writeixEOR; - ffestb_local_.write.label = TRUE; - break; - - case FFESTR_genioERR: - ffestb_local_.write.ix = FFESTP_writeixERR; - ffestb_local_.write.label = TRUE; - break; - - case FFESTR_genioFMT: - ffestb_local_.write.ix = FFESTP_writeixFORMAT; - ffestb_local_.write.left = FALSE; - ffestb_local_.write.context = FFEEXPR_contextFILEFORMAT; - break; - - case FFESTR_genioIOSTAT: - ffestb_local_.write.ix = FFESTP_writeixIOSTAT; - ffestb_local_.write.left = TRUE; - ffestb_local_.write.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_genioNML: - ffestb_local_.write.ix = FFESTP_writeixFORMAT; - ffestb_local_.write.left = TRUE; - ffestb_local_.write.context = FFEEXPR_contextFILENAMELIST; - break; - - case FFESTR_genioREC: - ffestb_local_.write.ix = FFESTP_writeixREC; - ffestb_local_.write.left = FALSE; - ffestb_local_.write.context = FFEEXPR_contextFILENUM; - break; - - case FFESTR_genioUNIT: - ffestb_local_.write.ix = FFESTP_writeixUNIT; - ffestb_local_.write.left = FALSE; - ffestb_local_.write.context = FFEEXPR_contextFILEUNIT; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.write.write_spec[ffestb_local_.write.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.write.write_spec[ffestb_local_.write.ix] - .kw_or_val_present = TRUE; - ffestp_file.write.write_spec[ffestb_local_.write.ix] - .kw_present = TRUE; - ffestp_file.write.write_spec[ffestb_local_.write.ix] - .value_present = FALSE; - ffestp_file.write.write_spec[ffestb_local_.write.ix].value_is_label - = ffestb_local_.write.label; - ffestp_file.write.write_spec[ffestb_local_.write.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9108_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9108_ -- "WRITE" OPEN_PAREN [external-file-unit COMMA [format - COMMA]] NAME - - return ffestb_R9108_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_R9108_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.write.label) - return (ffelexHandler) ffestb_R91010_; - if (ffestb_local_.write.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.write.context, - (ffeexprCallback) ffestb_R9109_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.write.context, - (ffeexprCallback) ffestb_R9109_); - - default: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9109_ -- "WRITE" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_R9109_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9109_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - { - if (ffestb_local_.write.context == FFEEXPR_contextFILEFORMAT) - ffestp_file.write.write_spec[ffestb_local_.write.ix] - .value_is_label = TRUE; - else - break; - } - ffestp_file.write.write_spec[ffestb_local_.write.ix].value_present - = TRUE; - ffestp_file.write.write_spec[ffestb_local_.write.ix].value - = ffelex_token_use (ft); - ffestp_file.write.write_spec[ffestb_local_.write.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9107_; - return (ffelexHandler) ffestb_R91012_; - - default: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R91010_ -- "WRITE" OPEN_PAREN ... NAME EQUALS - - return ffestb_R91010_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_R91010_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.write.write_spec[ffestb_local_.write.ix].value_present - = TRUE; - ffestp_file.write.write_spec[ffestb_local_.write.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R91011_; - - default: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R91011_ -- "WRITE" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_R91011_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R91011_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R9107_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_R91012_; - - default: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R91012_ -- "WRITE" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_R91012_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_R91012_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - ffestc_R910_start (); - ffestc_R910_finish (); - } - ffestb_subr_kill_write_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_confirmed (); - /* Fall through. */ - case FFELEX_typeOPEN_PAREN: /* Could still be assignment!! */ - - /* EXTENSION: Allow an optional preceding COMMA here if not pedantic. - (f2c provides this extension, as do other compilers, supposedly.) */ - - if (!ffe_is_pedantic () && (ffelex_token_type (t) == FFELEX_typeCOMMA)) - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestc_context_iolist (), (ffeexprCallback) ffestb_R91013_); - - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestc_context_iolist (), (ffeexprCallback) ffestb_R91013_))) - (t); - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R91013_ -- "WRITE(...)" expr - - (ffestb_R91013_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_R91013_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R910_start (); - ffestb_subr_kill_write_ (); - - if (!ffesta_is_inhibited ()) - ffestc_R910_item (expr, ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestc_context_iolist (), (ffeexprCallback) ffestb_R91014_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R910_start (); - ffestb_subr_kill_write_ (); - - if (!ffesta_is_inhibited ()) - { - ffestc_R910_item (expr, ft); - ffestc_R910_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_write_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R91014_ -- "WRITE(...)" expr COMMA expr - - (ffestb_R91014_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_R91014_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R910_item (expr, ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestc_context_iolist (), (ffeexprCallback) ffestb_R91014_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_R910_item (expr, ft); - ffestc_R910_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R910_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "WRITE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R911 -- Parse the PRINT statement - - return ffestb_R911; // to lexer - - Make sure the statement has a valid form for the PRINT - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_R911 (ffelexToken t) -{ - ffelexHandler next; - ffestpPrintIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstPRINT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - case FFELEX_typeNUMBER: - ffesta_confirmed (); - break; - - default: - break; - } - - for (ix = 0; ix < FFESTP_printix; ++ix) - ffestp_file.print.print_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9111_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstPRINT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlPRINT) - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - default: - break; - } - for (ix = 0; ix < FFESTP_printix; ++ix) - ffestp_file.print.print_spec[ix].kw_or_val_present = FALSE; - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_R9111_); - next = (ffelexHandler) ffelex_splice_tokens (next, ffesta_tokens[0], - FFESTR_firstlPRINT); - if (next == NULL) - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PRINT", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PRINT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R9111_ -- "PRINT" expr - - (ffestb_R9111_) // to expression handler - - Make sure the next token is a COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_R9111_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - ffesta_confirmed (); - ffestp_file.print.print_spec[FFESTP_printixFORMAT].kw_or_val_present - = TRUE; - ffestp_file.print.print_spec[FFESTP_printixFORMAT].kw_present = FALSE; - ffestp_file.print.print_spec[FFESTP_printixFORMAT].value_present = TRUE; - ffestp_file.print.print_spec[FFESTP_printixFORMAT].value_is_label - = (expr == NULL); - ffestp_file.print.print_spec[FFESTP_printixFORMAT].value - = ffelex_token_use (ft); - ffestp_file.print.print_spec[FFESTP_printixFORMAT].u.expr = expr; - if (!ffesta_is_inhibited ()) - ffestc_R911_start (); - ffestb_subr_kill_print_ (); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_R9112_); - if (!ffesta_is_inhibited ()) - ffestc_R911_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_print_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PRINT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9112_ -- "PRINT" expr COMMA expr - - (ffestb_R9112_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_R9112_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R911_item (expr, ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_R9112_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_R911_item (expr, ft); - ffestc_R911_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R911_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PRINT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R923 -- Parse an INQUIRE statement - - return ffestb_R923; // to lexer - - Make sure the statement has a valid form for an INQUIRE statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_R923 (ffelexToken t) -{ - ffestpInquireIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstINQUIRE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstINQUIRE) - goto bad_0; /* :::::::::::::::::::: */ - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlINQUIRE) - goto bad_0; /* :::::::::::::::::::: */ - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - for (ix = 0; ix < FFESTP_inquireix; ++ix) - ffestp_file.inquire.inquire_spec[ix].kw_or_val_present = FALSE; - - ffestb_local_.inquire.may_be_iolength = TRUE; - return (ffelexHandler) ffestb_R9231_; - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_R9231_ -- "INQUIRE" OPEN_PAREN - - return ffestb_R9231_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9231_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9232_; - - default: - ffestb_local_.inquire.may_be_iolength = FALSE; - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_R9233_))) - (t); - } -} - -/* ffestb_R9232_ -- "INQUIRE" OPEN_PAREN NAME - - return ffestb_R9232_; // to lexer - - If EQUALS here, go to states that handle it. Else, send NAME and this - token thru expression handler. */ - -static ffelexHandler -ffestb_R9232_ (ffelexToken t) -{ - ffelexHandler next; - ffelexToken nt; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - nt = ffesta_tokens[1]; - next = (ffelexHandler) ffestb_R9234_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - ffestb_local_.inquire.may_be_iolength = FALSE; - next = (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILENUM, (ffeexprCallback) ffestb_R9233_))) - (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) (*next) (t); - } -} - -/* ffestb_R9233_ -- "INQUIRE" OPEN_PAREN expr - - (ffestb_R9233_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9233_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.inquire.inquire_spec[FFESTP_inquireixUNIT].kw_or_val_present - = TRUE; - ffestp_file.inquire.inquire_spec[FFESTP_inquireixUNIT].kw_present = FALSE; - ffestp_file.inquire.inquire_spec[FFESTP_inquireixUNIT].value_present = TRUE; - ffestp_file.inquire.inquire_spec[FFESTP_inquireixUNIT].value_is_label - = FALSE; - ffestp_file.inquire.inquire_spec[FFESTP_inquireixUNIT].value - = ffelex_token_use (ft); - ffestp_file.inquire.inquire_spec[FFESTP_inquireixUNIT].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9234_; - return (ffelexHandler) ffestb_R9239_; - - default: - break; - } - - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9234_ -- "INQUIRE" OPEN_PAREN [external-file-unit COMMA] - - return ffestb_R9234_; // to lexer - - Handle expr construct (not NAME=expr construct) here. */ - -static ffelexHandler -ffestb_R9234_ (ffelexToken t) -{ - ffestrInquire kw; - - ffestb_local_.inquire.label = FALSE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - kw = ffestr_inquire (t); - if (kw != FFESTR_inquireIOLENGTH) - ffestb_local_.inquire.may_be_iolength = FALSE; - switch (kw) - { - case FFESTR_inquireACCESS: - ffestb_local_.inquire.ix = FFESTP_inquireixACCESS; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireACTION: - ffestb_local_.inquire.ix = FFESTP_inquireixACTION; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireBLANK: - ffestb_local_.inquire.ix = FFESTP_inquireixBLANK; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireCARRIAGECONTROL: - ffestb_local_.inquire.ix = FFESTP_inquireixCARRIAGECONTROL; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_inquireDEFAULTFILE: - ffestb_local_.inquire.ix = FFESTP_inquireixDEFAULTFILE; - ffestb_local_.inquire.left = FALSE; - ffestb_local_.inquire.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_inquireDELIM: - ffestb_local_.inquire.ix = FFESTP_inquireixDELIM; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireDIRECT: - ffestb_local_.inquire.ix = FFESTP_inquireixDIRECT; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireERR: - ffestb_local_.inquire.ix = FFESTP_inquireixERR; - ffestb_local_.inquire.label = TRUE; - break; - - case FFESTR_inquireEXIST: - ffestb_local_.inquire.ix = FFESTP_inquireixEXIST; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILELOG; - break; - - case FFESTR_inquireFILE: - ffestb_local_.inquire.ix = FFESTP_inquireixFILE; - ffestb_local_.inquire.left = FALSE; - ffestb_local_.inquire.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_inquireFORM: - ffestb_local_.inquire.ix = FFESTP_inquireixFORM; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireFORMATTED: - ffestb_local_.inquire.ix = FFESTP_inquireixFORMATTED; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireIOLENGTH: - if (!ffestb_local_.inquire.may_be_iolength) - goto bad; /* :::::::::::::::::::: */ - ffestb_local_.inquire.ix = FFESTP_inquireixIOLENGTH; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_inquireIOSTAT: - ffestb_local_.inquire.ix = FFESTP_inquireixIOSTAT; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_inquireKEYED: - ffestb_local_.inquire.ix = FFESTP_inquireixKEYED; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_inquireNAME: - ffestb_local_.inquire.ix = FFESTP_inquireixNAME; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_inquireNAMED: - ffestb_local_.inquire.ix = FFESTP_inquireixNAMED; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILELOG; - break; - - case FFESTR_inquireNEXTREC: - ffestb_local_.inquire.ix = FFESTP_inquireixNEXTREC; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFINT; - break; - - case FFESTR_inquireNUMBER: - ffestb_local_.inquire.ix = FFESTP_inquireixNUMBER; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_inquireOPENED: - ffestb_local_.inquire.ix = FFESTP_inquireixOPENED; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILELOG; - break; - - case FFESTR_inquireORGANIZATION: - ffestb_local_.inquire.ix = FFESTP_inquireixORGANIZATION; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_inquirePAD: - ffestb_local_.inquire.ix = FFESTP_inquireixPAD; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquirePOSITION: - ffestb_local_.inquire.ix = FFESTP_inquireixPOSITION; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireREAD: - ffestb_local_.inquire.ix = FFESTP_inquireixREAD; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireREADWRITE: - ffestb_local_.inquire.ix = FFESTP_inquireixREADWRITE; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireRECL: - ffestb_local_.inquire.ix = FFESTP_inquireixRECL; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEINT; - break; - - case FFESTR_inquireRECORDTYPE: - ffestb_local_.inquire.ix = FFESTP_inquireixRECORDTYPE; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILECHAR; - break; - - case FFESTR_inquireSEQUENTIAL: - ffestb_local_.inquire.ix = FFESTP_inquireixSEQUENTIAL; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireUNFORMATTED: - ffestb_local_.inquire.ix = FFESTP_inquireixUNFORMATTED; - ffestb_local_.inquire.left = TRUE; - ffestb_local_.inquire.context = FFEEXPR_contextFILEDFCHAR; - break; - - case FFESTR_inquireUNIT: - ffestb_local_.inquire.ix = FFESTP_inquireixUNIT; - ffestb_local_.inquire.left = FALSE; - ffestb_local_.inquire.context = FFEEXPR_contextFILENUM; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - if (ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix] - .kw_or_val_present) - break; /* Can't specify a keyword twice! */ - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix] - .kw_or_val_present = TRUE; - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix] - .kw_present = TRUE; - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix] - .value_present = FALSE; - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix].value_is_label - = ffestb_local_.inquire.label; - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix].kw - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9235_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9235_ -- "INQUIRE" OPEN_PAREN [external-file-unit COMMA] NAME - - return ffestb_R9235_; // to lexer - - Make sure EQUALS here, send next token to expression handler. */ - -static ffelexHandler -ffestb_R9235_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (ffestb_local_.inquire.label) - return (ffelexHandler) ffestb_R9237_; - if (ffestb_local_.inquire.left) - return (ffelexHandler) ffeexpr_lhs (ffesta_output_pool, - ffestb_local_.inquire.context, - (ffeexprCallback) ffestb_R9236_); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.inquire.context, - (ffeexprCallback) ffestb_R9236_); - - default: - break; - } - - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9236_ -- "INQUIRE" OPEN_PAREN ... NAME EQUALS expr - - (ffestb_R9236_) // to expression handler - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9236_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (ffestb_local_.inquire.ix == FFESTP_inquireixIOLENGTH) - break; /* IOLENGTH=expr must be followed by - CLOSE_PAREN. */ - /* Fall through. */ - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix].value_present - = TRUE; - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix].value - = ffelex_token_use (ft); - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix].u.expr = expr; - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_R9234_; - if (ffestb_local_.inquire.ix == FFESTP_inquireixIOLENGTH) - return (ffelexHandler) ffestb_R92310_; - return (ffelexHandler) ffestb_R9239_; - - default: - break; - } - - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9237_ -- "INQUIRE" OPEN_PAREN ... NAME EQUALS - - return ffestb_R9237_; // to lexer - - Handle NUMBER for label here. */ - -static ffelexHandler -ffestb_R9237_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix].value_present - = TRUE; - ffestp_file.inquire.inquire_spec[ffestb_local_.inquire.ix].value - = ffelex_token_use (t); - return (ffelexHandler) ffestb_R9238_; - - default: - break; - } - - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9238_ -- "INQUIRE" OPEN_PAREN ... NAME EQUALS NUMBER - - return ffestb_R9238_; // to lexer - - Handle COMMA or CLOSE_PAREN here. */ - -static ffelexHandler -ffestb_R9238_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_R9234_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_R9239_; - - default: - break; - } - - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R9239_ -- "INQUIRE" OPEN_PAREN ... CLOSE_PAREN - - return ffestb_R9239_; // to lexer - - Handle EOS or SEMICOLON here. */ - -static ffelexHandler -ffestb_R9239_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R923A (); - ffestb_subr_kill_inquire_ (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R92310_ -- "INQUIRE(IOLENGTH=expr)" - - return ffestb_R92310_; // to lexer - - Make sure EOS or SEMICOLON not here; begin R923B processing and expect - output IO list. */ - -static ffelexHandler -ffestb_R92310_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - break; - - default: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R923B_start (); - ffestb_subr_kill_inquire_ (); - return (ffelexHandler) (*((ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_R92311_))) - (t); - } - - ffestb_subr_kill_inquire_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R92311_ -- "INQUIRE(IOLENGTH=expr)" expr - - (ffestb_R92311_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_R92311_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_R923B_item (expr, ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_R92311_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_R923B_item (expr, ft); - ffestc_R923B_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R923B_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "INQUIRE", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V020 -- Parse the TYPE statement - - return ffestb_V020; // to lexer - - Make sure the statement has a valid form for the TYPE - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_V020 (ffelexToken t) -{ - ffeTokenLength i; - const char *p; - ffelexHandler next; - ffestpTypeIx ix; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstTYPE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - case FFELEX_typeCOMMA: /* Because "TYPE,PUBLIC::A" is ambiguous with - '90. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNUMBER: - ffesta_confirmed (); - break; - - case FFELEX_typeNAME: /* Because TYPE A is ambiguous with '90. */ - default: - break; - } - - for (ix = 0; ix < FFESTP_typeix; ++ix) - ffestp_file.type.type_spec[ix].kw_or_val_present = FALSE; - return (ffelexHandler) (*((ffelexHandler) - ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_V0201_))) - (t); - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstTYPE) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - if (ffelex_token_length (ffesta_tokens[0]) != FFESTR_firstlTYPE) - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (ffelex_token_length (ffesta_tokens[0]) == FFESTR_firstlTYPE) - break; /* Else might be assignment/stmtfuncdef. */ - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typeCOLON: - goto bad_1; /* :::::::::::::::::::: */ - - default: - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlTYPE); - if (ISDIGIT (*p)) - ffesta_confirmed (); /* Else might be '90 TYPE statement. */ - for (ix = 0; ix < FFESTP_typeix; ++ix) - ffestp_file.type.type_spec[ix].kw_or_val_present = FALSE; - next = (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextFILEFORMATNML, (ffeexprCallback) ffestb_V0201_); - next = (ffelexHandler) ffelex_splice_tokens (next, ffesta_tokens[0], - FFESTR_firstlTYPE); - if (next == NULL) - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE I/O", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE I/O", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_V0201_ -- "TYPE" expr - - (ffestb_V0201_) // to expression handler - - Make sure the next token is a COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_V0201_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - bool comma = TRUE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffe_is_vxt () && (expr != NULL) - && (ffebld_op (expr) == FFEBLD_opSYMTER)) - break; - comma = FALSE; - /* Fall through. */ - case FFELEX_typeCOMMA: - if (!ffe_is_vxt () && comma && (expr != NULL) - && (ffebld_op (expr) == FFEBLD_opPAREN) - && (ffebld_op (ffebld_left (expr)) == FFEBLD_opSYMTER)) - break; - ffesta_confirmed (); - ffestp_file.type.type_spec[FFESTP_typeixFORMAT].kw_or_val_present - = TRUE; - ffestp_file.type.type_spec[FFESTP_typeixFORMAT].kw_present = FALSE; - ffestp_file.type.type_spec[FFESTP_typeixFORMAT].value_present = TRUE; - ffestp_file.type.type_spec[FFESTP_typeixFORMAT].value_is_label - = (expr == NULL); - ffestp_file.type.type_spec[FFESTP_typeixFORMAT].value - = ffelex_token_use (ft); - ffestp_file.type.type_spec[FFESTP_typeixFORMAT].u.expr = expr; - if (!ffesta_is_inhibited ()) - ffestc_V020_start (); - ffestb_subr_kill_type_ (); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_V0202_); - if (!ffesta_is_inhibited ()) - ffestc_V020_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestb_subr_kill_type_ (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE I/O", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0202_ -- "TYPE" expr COMMA expr - - (ffestb_V0202_) // to expression handler - - Handle COMMA or EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_V0202_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_V020_item (expr, ft); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextIOLIST, (ffeexprCallback) ffestb_V0202_); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_V020_item (expr, ft); - ffestc_V020_finish (); - } - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_V020_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "TYPE I/O", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dummy -- Parse an ENTRY/FUNCTION/SUBROUTINE statement - - return ffestb_dummy; // to lexer - - Make sure the statement has a valid form for an ENTRY/FUNCTION/SUBROUTINE - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_dummy (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - break; - } - - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - ffestb_local_.decl.recursive = NULL; - ffestb_local_.dummy.badname = ffestb_args.dummy.badname; - ffestb_local_.dummy.is_subr = ffestb_args.dummy.is_subr; - ffestb_local_.dummy.first_kw = ffesta_first_kw; - return (ffelexHandler) ffestb_dummy1_; - - case FFELEX_typeNAMES: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeOPEN_PAREN: - break; - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = ffestb_args.dummy.len); - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffesta_tokens[1] - = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - ffestb_local_.decl.recursive = NULL; - ffestb_local_.dummy.badname = ffestb_args.dummy.badname; - ffestb_local_.dummy.is_subr = ffestb_args.dummy.is_subr; - ffestb_local_.dummy.first_kw = ffesta_first_kw; - return (ffelexHandler) ffestb_dummy1_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dummy.badname, ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.dummy.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, ffestb_args.dummy.badname, ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dummy1_ -- "ENTRY/FUNCTION/SUBROUTINE" NAME - - return ffestb_dummy1_; // to lexer - - Make sure the next token is an EOS, SEMICOLON, or OPEN_PAREN. In the - former case, just implement a null arg list, else get the arg list and - then implement. */ - -static ffelexHandler -ffestb_dummy1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (ffestb_local_.dummy.first_kw == FFESTR_firstFUNCTION) - { - ffesta_confirmed (); /* Later, not if typename w/o RECURSIVE. */ - break; /* Produce an error message, need that open - paren. */ - } - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { /* Pretend as though we got a truly NULL - list. */ - ffestb_subrargs_.name_list.args = NULL; - ffestb_subrargs_.name_list.ok = TRUE; - ffestb_subrargs_.name_list.close_paren = ffelex_token_use (t); - return (ffelexHandler) ffestb_dummy2_ (t); - } - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.name_list.args = ffestt_tokenlist_create (); - ffestb_subrargs_.name_list.handler = (ffelexHandler) ffestb_dummy2_; - ffestb_subrargs_.name_list.is_subr = ffestb_local_.dummy.is_subr; - ffestb_subrargs_.name_list.names = FALSE; - return (ffelexHandler) ffestb_subr_name_list_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_local_.dummy.badname, t); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_dummy2_ -- NAME OPEN_PAREN arg-list CLOSE_PAREN - - return ffestb_dummy2_; // to lexer - - Make sure the statement has a valid form for a dummy-def statement. If it - does, implement the statement. */ - -static ffelexHandler -ffestb_dummy2_ (ffelexToken t) -{ - if (!ffestb_subrargs_.name_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - switch (ffestb_local_.dummy.first_kw) - { - case FFESTR_firstFUNCTION: - ffestc_R1219 (ffesta_tokens[1], ffestb_subrargs_.name_list.args, - ffestb_subrargs_.name_list.close_paren, FFESTP_typeNone, - NULL, NULL, NULL, NULL, ffestb_local_.decl.recursive, NULL); - break; - - case FFESTR_firstSUBROUTINE: - ffestc_R1223 (ffesta_tokens[1], ffestb_subrargs_.name_list.args, - ffestb_subrargs_.name_list.close_paren, - ffestb_local_.decl.recursive); - break; - - case FFESTR_firstENTRY: - ffestc_R1226 (ffesta_tokens[1], ffestb_subrargs_.name_list.args, - ffestb_subrargs_.name_list.close_paren); - break; - - default: - assert (FALSE); - } - } - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - if (ffestb_subrargs_.name_list.args != NULL) - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeNAME: - ffesta_confirmed (); - if ((ffestb_local_.dummy.first_kw != FFESTR_firstFUNCTION) - || (ffestr_other (t) != FFESTR_otherRESULT)) - break; - ffestb_local_.decl.type = FFESTP_typeNone; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_funcname_6_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_local_.dummy.badname, t); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - if (ffestb_subrargs_.name_list.args != NULL) - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R524 -- Parse the DIMENSION statement - - return ffestb_R524; // to lexer - - Make sure the statement has a valid form for the DIMENSION statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_R524 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R524_start (ffesta_first_kw == FFESTR_firstVIRTUAL); - ffestb_local_.dimension.started = TRUE; - return (ffelexHandler) ffestb_R5241_ (t); - } - - case FFELEX_typeNAMES: - p = ffelex_token_text (ffesta_tokens[0]) + (i = ffestb_args.R524.len); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - break; - } - - /* Here, we have at least one char after "DIMENSION" and t is - OPEN_PAREN. */ - - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - ffestb_local_.dimension.started = FALSE; - next = (ffelexHandler) ffestb_R5241_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.R524.badname, ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.R524.badname, t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, ffestb_args.R524.badname, ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5241_ -- "DIMENSION" - - return ffestb_R5241_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_R5241_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R5242_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.R524.badname, t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R524_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5242_ -- "DIMENSION" ... NAME - - return ffestb_R5242_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_R5242_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.dim_list.dims = ffestt_dimlist_create (); - ffestb_subrargs_.dim_list.handler = (ffelexHandler) ffestb_R5243_; - ffestb_subrargs_.dim_list.pool = ffesta_output_pool; - ffestb_subrargs_.dim_list.ctx = ffesta_is_entry_valid - ? FFEEXPR_contextDIMLIST : FFEEXPR_contextDIMLISTCOMMON; -#ifdef FFECOM_dimensionsMAX - ffestb_subrargs_.dim_list.ndims = 0; -#endif - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.R524.badname, t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R524_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5243_ -- "DIMENSION" ... NAME OPEN_PAREN dimlist CLOSE_PAREN - - return ffestb_R5243_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_R5243_ (ffelexToken t) -{ - if (!ffestb_subrargs_.dim_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.dimension.started) - { - ffestc_R524_start (ffesta_first_kw == FFESTR_firstVIRTUAL); - ffestb_local_.dimension.started = TRUE; - } - ffestc_R524_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_R5244_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.dimension.started) - { - ffestc_R524_start (ffesta_first_kw == FFESTR_firstVIRTUAL); - ffestb_local_.dimension.started = TRUE; - } - ffestc_R524_item (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffestc_R524_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.R524.badname, t); - if (ffestb_local_.dimension.started && !ffesta_is_inhibited ()) - ffestc_R524_finish (); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5244_ -- "DIMENSION" ... COMMA - - return ffestb_R5244_; // to lexer - - Make sure we don't have EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R5244_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R524_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, ffestb_args.R524.badname, t); - return (ffelexHandler) ffesta_zero (t); - - default: - return (ffelexHandler) ffestb_R5241_ (t); - } -} - -/* ffestb_R547 -- Parse the COMMON statement - - return ffestb_R547; // to lexer - - Make sure the statement has a valid form for the COMMON statement. If it - does, implement the statement. */ - -ffelexHandler -ffestb_R547 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexToken nt; - ffelexHandler next; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCOMMON) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - case FFELEX_typeSLASH: - case FFELEX_typeCONCAT: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R547_start (); - ffestb_local_.common.started = TRUE; - return (ffelexHandler) ffestb_R5471_ (t); - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstCOMMON) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlCOMMON); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeSLASH: - case FFELEX_typeCONCAT: - ffesta_confirmed (); - if (*p != '\0') - break; - if (!ffesta_is_inhibited ()) - ffestc_R547_start (); - ffestb_local_.common.started = TRUE; - return (ffelexHandler) ffestb_R5471_ (t); - - case FFELEX_typeOPEN_PAREN: - break; - } - - /* Here, we have at least one char after "COMMON" and t is COMMA, - EOS/SEMICOLON, OPEN_PAREN, SLASH, or CONCAT. */ - - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - nt = ffelex_token_name_from_names (ffesta_tokens[0], i, 0); - if (ffelex_token_type (t) == FFELEX_typeOPEN_PAREN) - ffestb_local_.common.started = FALSE; - else - { - if (!ffesta_is_inhibited ()) - ffestc_R547_start (); - ffestb_local_.common.started = TRUE; - } - next = (ffelexHandler) ffestb_R5471_ (nt); - ffelex_token_kill (nt); - return (ffelexHandler) (*next) (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "COMMON", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5471_ -- "COMMON" - - return ffestb_R5471_; // to lexer - - Handle NAME, SLASH, or CONCAT. */ - -static ffelexHandler -ffestb_R5471_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - return (ffelexHandler) ffestb_R5474_ (t); - - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_R5472_; - - case FFELEX_typeCONCAT: - if (!ffesta_is_inhibited ()) - ffestc_R547_item_cblock (NULL); - return (ffelexHandler) ffestb_R5474_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R547_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5472_ -- "COMMON" SLASH - - return ffestb_R5472_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_R5472_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R5473_; - - case FFELEX_typeSLASH: - if (!ffesta_is_inhibited ()) - ffestc_R547_item_cblock (NULL); - return (ffelexHandler) ffestb_R5474_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R547_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5473_ -- "COMMON" SLASH NAME - - return ffestb_R5473_; // to lexer - - Handle SLASH. */ - -static ffelexHandler -ffestb_R5473_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeSLASH: - if (!ffesta_is_inhibited ()) - ffestc_R547_item_cblock (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R5474_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R547_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5474_ -- "COMMON" [SLASH NAME SLASH] or "COMMON" CONCAT - - return ffestb_R5474_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_R5474_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_R5475_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R547_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5475_ -- "COMMON" ... NAME - - return ffestb_R5475_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_R5475_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.dim_list.dims = ffestt_dimlist_create (); - ffestb_subrargs_.dim_list.handler = (ffelexHandler) ffestb_R5476_; - ffestb_subrargs_.dim_list.pool = ffesta_output_pool; - ffestb_subrargs_.dim_list.ctx = FFEEXPR_contextDIMLISTCOMMON; -#ifdef FFECOM_dimensionsMAX - ffestb_subrargs_.dim_list.ndims = 0; -#endif - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextDIMLISTCOMMON, (ffeexprCallback) ffestb_subr_dimlist_); - - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_R547_item_object (ffesta_tokens[1], NULL); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R5477_; - - case FFELEX_typeSLASH: - case FFELEX_typeCONCAT: - if (!ffesta_is_inhibited ()) - ffestc_R547_item_object (ffesta_tokens[1], NULL); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_R5471_ (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_R547_item_object (ffesta_tokens[1], NULL); - ffestc_R547_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_R547_finish (); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5476_ -- "COMMON" ... NAME OPEN_PAREN dimlist CLOSE_PAREN - - return ffestb_R5476_; // to lexer - - Handle COMMA, SLASH, CONCAT, EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_R5476_ (ffelexToken t) -{ - if (!ffestb_subrargs_.dim_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.common.started) - { - ffestc_R547_start (); - ffestb_local_.common.started = TRUE; - } - ffestc_R547_item_object (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_R5477_; - - case FFELEX_typeSLASH: - case FFELEX_typeCONCAT: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.common.started) - { - ffestc_R547_start (); - ffestb_local_.common.started = TRUE; - } - ffestc_R547_item_object (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_R5471_ (t); - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - if (!ffestb_local_.common.started) - ffestc_R547_start (); - ffestc_R547_item_object (ffesta_tokens[1], - ffestb_subrargs_.dim_list.dims); - ffestc_R547_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - if (ffestb_local_.common.started && !ffesta_is_inhibited ()) - ffestc_R547_finish (); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R5477_ -- "COMMON" ... COMMA - - return ffestb_R5477_; // to lexer - - Make sure we don't have EOS or SEMICOLON. */ - -static ffelexHandler -ffestb_R5477_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R547_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "COMMON", t); - return (ffelexHandler) ffesta_zero (t); - - default: - return (ffelexHandler) ffestb_R5471_ (t); - } -} - -/* ffestb_R1229 -- Parse a STMTFUNCTION statement - - return ffestb_R1229; // to lexer - - Make sure the statement has a valid form for a STMTFUNCTION - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_R1229 (ffelexToken t) -{ - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - case FFELEX_typeNAMES: - break; - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - break; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeNAME: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - ffestb_subrargs_.name_list.args = ffestt_tokenlist_create (); - ffestb_subrargs_.name_list.handler = (ffelexHandler) ffestb_R12291_; - ffestb_subrargs_.name_list.is_subr = FALSE; /* No "*" items in list! */ - ffestb_subrargs_.name_list.names = TRUE; /* In case "IF(FOO)CALL - FOO...". */ - return (ffelexHandler) ffestb_subr_name_list_; - -bad_0: /* :::::::::::::::::::: */ -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_2t (FFEBAD_UNREC_STMT, ffesta_tokens[0], t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12291_ -- "STMTFUNCTION" OPEN_PAREN dummy-name-list CLOSE_PAREN - - return ffestb_R12291_; // to lexer - - Make sure the statement has a valid form for a STMTFUNCTION statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12291_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - if (!ffestb_subrargs_.name_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1229_start (ffesta_tokens[0], - ffestb_subrargs_.name_list.args, - ffestb_subrargs_.name_list.close_paren); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextSFUNCDEF, (ffeexprCallback) ffestb_R12292_); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_2t (FFEBAD_UNREC_STMT, ffesta_tokens[0], t); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_R12292_ -- "STMTFUNCTION" OPEN_PAREN dummy-name-list CLOSE_PAREN - EQUALS expr - - (ffestb_R12292_) // to expression handler - - Make sure the statement has a valid form for a STMTFUNCTION statement. If - it does, implement the statement. */ - -static ffelexHandler -ffestb_R12292_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - if (expr == NULL) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R1229_finish (expr, ft); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffestc_R1229_finish (NULL, NULL); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "statement-function-definition", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_chartype -- Parse the CHARACTER statement - - return ffestb_decl_chartype; // to lexer - - Make sure the statement has a valid form for the CHARACTER statement. If - it does, implement the statement. */ - -ffelexHandler -ffestb_decl_chartype (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - ffestb_local_.decl.type = FFESTP_typeCHARACTER; - ffestb_local_.decl.recursive = NULL; - ffestb_local_.decl.parameter = FALSE; /* No PARAMETER attribute seen. */ - ffestb_local_.decl.coloncolon = FALSE; /* No COLONCOLON seen. */ - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstCHRCTR) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeASTERISK: - ffesta_confirmed (); - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_chartype1_; - ffestb_local_.decl.badname = "TYPEDECL"; - return (ffelexHandler) ffestb_decl_starlen_; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_attrsp_; - ffestb_local_.decl.badname = "_TYPEDECL"; - return (ffelexHandler) ffestb_decl_typeparams_; - - case FFELEX_typeNAME: - ffesta_confirmed (); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_entsp_ (t); - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstCHRCTR) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlCHRCTR); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (*p != '\0') - break; - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeASTERISK: - ffesta_confirmed (); - if (*p != '\0') - break; - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_chartype1_; - ffestb_local_.decl.badname = "TYPEDECL"; - return (ffelexHandler) ffestb_decl_starlen_; - - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (*p != '\0') - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (*p != '\0') - break; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_attrsp_; - ffestb_local_.decl.badname = "TYPEDECL"; - return (ffelexHandler) ffestb_decl_typeparams_; - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffesta_tokens[1] = ffelex_token_names_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_decl_entsp_2_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_chartype1_ -- "CHARACTER" ASTERISK char-length - - return ffestb_decl_chartype1_; // to lexer - - Handle COMMA, COLONCOLON, or anything else. */ - -static ffelexHandler -ffestb_decl_chartype1_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - /* Fall through. */ - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, ffestb_local_.decl.len, ffestb_local_.decl.lent); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffestb_decl_ents_; - - default: - return (ffelexHandler) ffestb_decl_entsp_ (t); - } -} - -/* ffestb_decl_dbltype -- Parse the DOUBLEPRECISION/DOUBLECOMPLEX statement - - return ffestb_decl_dbltype; // to lexer - - Make sure the statement has a valid form for the DOUBLEPRECISION/ - DOUBLECOMPLEX statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_decl_dbltype (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - ffestb_local_.decl.type = ffestb_args.decl.type; - ffestb_local_.decl.recursive = NULL; - ffestb_local_.decl.parameter = FALSE; /* No PARAMETER attribute seen. */ - ffestb_local_.decl.coloncolon = FALSE; /* No COLONCOLON seen. */ - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeNAME: - ffesta_confirmed (); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_entsp_ (t); - } - - case FFELEX_typeNAMES: - p = ffelex_token_text (ffesta_tokens[0]) + (i = ffestb_args.decl.len); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (*p != '\0') - break; - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (*p != '\0') - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeOPEN_PAREN: - if (*p != '\0') - break; - goto bad_1; /* :::::::::::::::::::: */ - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffesta_tokens[1] = ffelex_token_names_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_decl_entsp_2_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_double -- Parse the DOUBLE PRECISION/DOUBLE COMPLEX statement - - return ffestb_decl_double; // to lexer - - Make sure the statement has a valid form for the DOUBLE PRECISION/ - DOUBLE COMPLEX statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_decl_double (ffelexToken t) -{ - ffestb_local_.decl.recursive = NULL; - ffestb_local_.decl.parameter = FALSE; /* No PARAMETER attribute seen. */ - ffestb_local_.decl.coloncolon = FALSE; /* No COLONCOLON seen. */ - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstDBL) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - ffesta_confirmed (); - switch (ffestr_second (t)) - { - case FFESTR_secondCOMPLEX: - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - break; - - case FFESTR_secondPRECISION: - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - break; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_attrsp_; - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_decl_gentype -- Parse the INTEGER/REAL/COMPLEX/LOGICAL statement - - return ffestb_decl_gentype; // to lexer - - Make sure the statement has a valid form for the INTEGER/REAL/COMPLEX/ - LOGICAL statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_decl_gentype (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - - ffestb_local_.decl.type = ffestb_args.decl.type; - ffestb_local_.decl.recursive = NULL; - ffestb_local_.decl.parameter = FALSE; /* No PARAMETER attribute seen. */ - ffestb_local_.decl.coloncolon = FALSE; /* No COLONCOLON seen. */ - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeASTERISK: - ffesta_confirmed (); - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_attrsp_; - ffestb_local_.decl.badname = "TYPEDECL"; - return (ffelexHandler) ffestb_decl_starkind_; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_attrsp_; - ffestb_local_.decl.badname = "TYPEDECL"; - return (ffelexHandler) ffestb_decl_kindparam_; - - case FFELEX_typeNAME: - ffesta_confirmed (); - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_entsp_ (t); - } - - case FFELEX_typeNAMES: - p = ffelex_token_text (ffesta_tokens[0]) + (i = ffestb_args.decl.len); - switch (ffelex_token_type (t)) - { - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - break; - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (*p != '\0') - break; - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - ffesta_confirmed (); - if (*p != '\0') - goto bad_i; /* :::::::::::::::::::: */ - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeSLASH: - ffesta_confirmed (); - if (*p != '\0') - break; - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeASTERISK: - ffesta_confirmed (); - if (*p != '\0') - break; - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_attrsp_; - ffestb_local_.decl.badname = "TYPEDECL"; - return (ffelexHandler) ffestb_decl_starkind_; - - case FFELEX_typeOPEN_PAREN: - if (*p != '\0') - break; - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_attrsp_; - ffestb_local_.decl.badname = "TYPEDECL"; - return (ffelexHandler) ffestb_decl_kindparam_; - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - ffesta_tokens[1] = ffelex_token_names_from_names (ffesta_tokens[0], i, 0); - return (ffelexHandler) ffestb_decl_entsp_2_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "type-declaration", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrs_ -- "type" [type parameters] COMMA - - return ffestb_decl_attrs_; // to lexer - - Handle NAME of an attribute. */ - -static ffelexHandler -ffestb_decl_attrs_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - switch (ffestr_first (t)) - { - case FFESTR_firstDIMENSION: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_attrs_1_; - - case FFESTR_firstEXTERNAL: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribEXTERNAL, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; - - case FFESTR_firstINTRINSIC: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribINTRINSIC, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; - - case FFESTR_firstPARAMETER: - ffestb_local_.decl.parameter = TRUE; - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribPARAMETER, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; - - case FFESTR_firstSAVE: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribSAVE, t, - FFESTR_otherNone, NULL); - return (ffelexHandler) ffestb_decl_attrs_7_; - - default: - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, t); - return (ffelexHandler) ffestb_decl_attrs_7_; - } - break; - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrs_1_ -- "type" [type parameters] ",DIMENSION" - - return ffestb_decl_attrs_1_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_attrs_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.dim_list.dims = ffestt_dimlist_create (); - ffestb_subrargs_.dim_list.handler = (ffelexHandler) ffestb_decl_attrs_2_; - ffestb_subrargs_.dim_list.pool = ffesta_scratch_pool; - ffestb_subrargs_.dim_list.ctx = ffesta_is_entry_valid - ? FFEEXPR_contextDIMLIST : FFEEXPR_contextDIMLISTCOMMON; -#ifdef FFECOM_dimensionsMAX - ffestb_subrargs_.dim_list.ndims = 0; -#endif - return (ffelexHandler) ffeexpr_rhs (ffesta_scratch_pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_); - - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_decl_attrs_7_ (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_ATTR, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrs_2_ -- "type" [type parameters] ",DIMENSION" OPEN_PAREN - dimlist CLOSE_PAREN - - return ffestb_decl_attrs_2_; // to lexer - - Handle COMMA or COLONCOLON. */ - -static ffelexHandler -ffestb_decl_attrs_2_ (ffelexToken t) -{ - if (!ffestb_subrargs_.dim_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - if (!ffesta_is_inhibited ()) - ffestc_decl_attrib (FFESTP_attribDIMENSION, ffesta_tokens[1], - FFESTR_otherNone, ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_decl_attrs_7_ (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrs_7_ -- "type" [type parameters] attribute - - return ffestb_decl_attrs_7_; // to lexer - - Handle COMMA (another attribute) or COLONCOLON (entities). */ - -static ffelexHandler -ffestb_decl_attrs_7_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - return (ffelexHandler) ffestb_decl_ents_; - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_attrsp_ -- "type" [type parameters] - - return ffestb_decl_attrsp_; // to lexer - - Handle COMMA (meaning we have attributes), COLONCOLON (meaning we have - no attributes but entities), or go to entsp to see about functions or - entities. */ - -static ffelexHandler -ffestb_decl_attrsp_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, - ffestb_local_.decl.len, ffestb_local_.decl.lent); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffestb_decl_attrs_; - - case FFELEX_typeCOLONCOLON: - ffestb_local_.decl.coloncolon = TRUE; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, - ffestb_local_.decl.len, ffestb_local_.decl.lent); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffestb_decl_ents_; - - default: - return (ffelexHandler) ffestb_decl_entsp_ (t); - } -} - -/* ffestb_decl_ents_ -- "type" [type parameters] [attributes "::"] - - return ffestb_decl_ents_; // to lexer - - Handle NAME of an entity. */ - -static ffelexHandler -ffestb_decl_ents_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_ents_1_; - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_1_ -- "type" [type parameters] [attributes "::"] NAME - - return ffestb_decl_ents_1_; // to lexer - - Handle ASTERISK, OPEN_PAREN, EQUALS, SLASH, COMMA, or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_ents_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_decl_item (ffesta_tokens[1], NULL, NULL, NULL, NULL, NULL, NULL, - NULL, FALSE); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_decl_item (ffesta_tokens[1], NULL, NULL, NULL, NULL, NULL, NULL, - NULL, FALSE); - ffestc_decl_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeASTERISK: - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_ents_2_; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_ents_3_ (t); - - case FFELEX_typeEQUALS: - case FFELEX_typeSLASH: - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_subrargs_.dim_list.dims = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_ents_7_ (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_2_ -- "type" [type parameters] [attributes "::"] NAME - ASTERISK - - return ffestb_decl_ents_2_; // to lexer - - Handle NUMBER or OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_ents_2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - if (ffestb_local_.decl.type != FFESTP_typeCHARACTER) - { - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_ents_3_; - } - /* Fall through. *//* (CHARACTER's *n is always a len spec. */ - case FFELEX_typeOPEN_PAREN:/* "*(" is after the (omitted) - "(array-spec)". */ - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_subrargs_.dim_list.dims = NULL; - return (ffelexHandler) ffestb_decl_ents_5_ (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_3_ -- "type" [type parameters] [attributes "::"] NAME - [ASTERISK NUMBER] - - return ffestb_decl_ents_3_; // to lexer - - Handle ASTERISK, OPEN_PAREN, EQUALS, SLASH, COMMA, or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_ents_3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, NULL, NULL, NULL, NULL, NULL, FALSE); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, NULL, NULL, NULL, NULL, NULL, FALSE); - ffestc_decl_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeASTERISK: - ffestb_subrargs_.dim_list.dims = NULL; - return (ffelexHandler) ffestb_decl_ents_5_; - - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.dim_list.dims = ffestt_dimlist_create (); - ffestb_subrargs_.dim_list.handler = (ffelexHandler) ffestb_decl_ents_4_; - ffestb_subrargs_.dim_list.pool = ffesta_output_pool; - ffestb_subrargs_.dim_list.ctx = ffesta_is_entry_valid - ? FFEEXPR_contextDIMLIST : FFEEXPR_contextDIMLISTCOMMON; -#ifdef FFECOM_dimensionsMAX - ffestb_subrargs_.dim_list.ndims = 0; -#endif - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_subrargs_.dim_list.ctx, - (ffeexprCallback) ffestb_subr_dimlist_); - - case FFELEX_typeEQUALS: - case FFELEX_typeSLASH: - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_subrargs_.dim_list.dims = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_ents_7_ (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_4_ -- "type" [type parameters] [attributes "::"] NAME - [ASTERISK NUMBER] [OPEN_PAREN dimlist CLOSE_PAREN] - - return ffestb_decl_ents_4_; // to lexer - - Handle ASTERISK, EQUALS, SLASH, COMMA, or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_ents_4_ (ffelexToken t) -{ - ffelexToken nt; - - if (!ffestb_subrargs_.dim_list.ok) - goto bad; /* :::::::::::::::::::: */ - - if (ffelex_token_type (ffesta_tokens[1]) == FFELEX_typeNAMES) - { - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeASTERISK: - case FFELEX_typeSLASH: /* But NOT FFELEX_typeEQUALS. */ - case FFELEX_typeCOLONCOLON: /* Actually an error. */ - break; /* Confirm and handle. */ - - default: /* Perhaps EQUALS, as in - INTEGERFUNCTIONX(A)=B. */ - goto bad; /* :::::::::::::::::::: */ - } - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - { - nt = ffelex_token_name_from_names (ffesta_tokens[1], 0, 0); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_tokens[1] = nt; - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - NULL, NULL, NULL, NULL); - } - } - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_subrargs_.dim_list.dims, - ffestb_local_.decl.len, ffestb_local_.decl.lent, NULL, NULL, - FALSE); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_subrargs_.dim_list.dims, - ffestb_local_.decl.len, ffestb_local_.decl.lent, NULL, NULL, - FALSE); - ffestc_decl_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeASTERISK: - if (ffestb_local_.decl.lent != NULL) - break; /* Can't specify "*length" twice. */ - return (ffelexHandler) ffestb_decl_ents_5_; - - case FFELEX_typeEQUALS: - case FFELEX_typeSLASH: - return (ffelexHandler) ffestb_decl_ents_7_ (t); - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - if ((ffelex_token_type (ffesta_tokens[1]) != FFELEX_typeNAMES) - && !ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_5_ -- "type" [type parameters] [attributes "::"] NAME - [ASTERISK NUMBER] [OPEN_PAREN dimlist CLOSE_PAREN] - ASTERISK - - return ffestb_decl_ents_5_; // to lexer - - Handle NUMBER or OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_ents_5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_ents_7_; - - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCHARACTERSIZE, (ffeexprCallback) ffestb_decl_ents_6_); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_6_ -- "type" [type parameters] [attributes "::"] NAME - [ASTERISK NUMBER] [OPEN_PAREN dimlist CLOSE_PAREN] - ASTERISK OPEN_PAREN expr - - (ffestb_decl_ents_6_) // to expression handler - - Handle CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_ents_6_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - ffestb_local_.decl.len = expr; - ffestb_local_.decl.lent = ffelex_token_use (ft); - return (ffelexHandler) ffestb_decl_ents_7_; - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_7_ -- "type" [type parameters] [attributes "::"] NAME - [ASTERISK NUMBER] [OPEN_PAREN dimlist CLOSE_PAREN] - [ASTERISK charlength] - - return ffestb_decl_ents_7_; // to lexer - - Handle EQUALS, SLASH, COMMA, or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_ents_7_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (!ffesta_is_inhibited ()) - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_subrargs_.dim_list.dims, - ffestb_local_.decl.len, ffestb_local_.decl.lent, NULL, NULL, - FALSE); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_subrargs_.dim_list.dims, - ffestb_local_.decl.len, ffestb_local_.decl.lent, NULL, NULL, - FALSE); - ffestc_decl_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeEQUALS: - if (!ffestb_local_.decl.coloncolon) - ffesta_ffebad_1t (FFEBAD_INVALID_TYPEDECL_INIT, t); - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - ffestb_local_.decl.parameter ? FFEEXPR_contextPARAMETER - : FFEEXPR_contextINITVAL, (ffeexprCallback) ffestb_decl_ents_8_); - - case FFELEX_typeSLASH: - if (!ffesta_is_inhibited ()) - { - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_subrargs_.dim_list.dims, - ffestb_local_.decl.len, ffestb_local_.decl.lent, NULL, NULL, - TRUE); - ffestc_decl_itemstartvals (); - } - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_decl_ents_9_); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_8_ -- "type" [type parameters] [attributes "::"] NAME - [ASTERISK NUMBER] [OPEN_PAREN dimlist CLOSE_PAREN] - [ASTERISK charlength] EQUALS expr - - (ffestb_decl_ents_8_) // to expression handler - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_ents_8_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_subrargs_.dim_list.dims, - ffestb_local_.decl.len, ffestb_local_.decl.lent, expr, ft, - FALSE); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - { - ffestc_decl_item (ffesta_tokens[1], ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_subrargs_.dim_list.dims, - ffestb_local_.decl.len, ffestb_local_.decl.lent, expr, ft, - FALSE); - ffestc_decl_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_subrargs_.dim_list.dims != NULL) - ffestt_dimlist_kill (ffestb_subrargs_.dim_list.dims); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_9_ -- "type" ... SLASH expr - - (ffestb_decl_ents_9_) // to expression handler - - Handle ASTERISK, COMMA, or SLASH. */ - -static ffelexHandler -ffestb_decl_ents_9_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_decl_itemvalue (NULL, NULL, expr, ft); - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_decl_ents_9_); - - case FFELEX_typeASTERISK: - if (expr == NULL) - break; - ffestb_local_.decl.expr = expr; - ffesta_tokens[1] = ffelex_token_use (ft); - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_decl_ents_10_); - - case FFELEX_typeSLASH: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_decl_itemvalue (NULL, NULL, expr, ft); - ffestc_decl_itemendvals (t); - } - return (ffelexHandler) ffestb_decl_ents_11_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - break; - } - - if (!ffesta_is_inhibited ()) - { - ffestc_decl_itemendvals (t); - ffestc_decl_finish (); - } - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_10_ -- "type" ... SLASH expr ASTERISK expr - - (ffestb_decl_ents_10_) // to expression handler - - Handle COMMA or SLASH. */ - -static ffelexHandler -ffestb_decl_ents_10_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_decl_itemvalue (ffestb_local_.decl.expr, ffesta_tokens[1], - expr, ft); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffeexpr_rhs - (ffesta_output_pool, FFEEXPR_contextDATA, - (ffeexprCallback) ffestb_decl_ents_9_); - - case FFELEX_typeSLASH: - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_decl_itemvalue (ffestb_local_.decl.expr, ffesta_tokens[1], - expr, ft); - ffestc_decl_itemendvals (t); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_decl_ents_11_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - break; - } - - if (!ffesta_is_inhibited ()) - { - ffestc_decl_itemendvals (t); - ffestc_decl_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_ents_11_ -- "type" [type parameters] [attributes "::"] NAME - [ASTERISK NUMBER] [OPEN_PAREN dimlist CLOSE_PAREN] - [ASTERISK charlength] SLASH initvals SLASH - - return ffestb_decl_ents_11_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_ents_11_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_decl_ents_; - - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (!ffesta_is_inhibited ()) - ffestc_decl_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_entsp_ -- "type" [type parameters] - - return ffestb_decl_entsp_; // to lexer - - Handle NAME or NAMES beginning either an entity (object) declaration or - a function definition.. */ - -static ffelexHandler -ffestb_decl_entsp_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_entsp_1_; - - case FFELEX_typeNAMES: - ffesta_confirmed (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_entsp_2_; - - default: - break; - } - - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "type-declaration", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_entsp_1_ -- "type" [type parameters] NAME - - return ffestb_decl_entsp_1_; // to lexer - - If we get another NAME token here, then the previous one must be - "RECURSIVE" or "FUNCTION" and we handle it accordingly. Otherwise, - we send the previous and current token through to _ents_. */ - -static ffelexHandler -ffestb_decl_entsp_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - switch (ffestr_first (ffesta_tokens[1])) - { - case FFESTR_firstFUNCTION: - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_decl_funcname_ (t); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", ffesta_tokens[1]); - break; - } - break; - - default: - if ((ffelex_token_type (ffesta_tokens[1]) != FFELEX_typeNAMES) - && !ffesta_is_inhibited ()) - ffestc_decl_start (ffestb_local_.decl.type, ffesta_tokens[0], - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, - ffestb_local_.decl.len, ffestb_local_.decl.lent); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - /* NAME/NAMES token already in ffesta_tokens[1]. */ - return (ffelexHandler) ffestb_decl_ents_1_ (t); - } - - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_entsp_2_ -- "type" [type parameters] NAMES - - return ffestb_decl_entsp_2_; // to lexer - - If we get an ASTERISK or OPEN_PAREN here, then if the previous NAMES - begins with "FUNCTION" or "RECURSIVEFUNCTION" and is followed by a - first-name-char, we have a possible syntactically ambiguous situation. - Otherwise, we have a straightforward situation just as if we went - through _entsp_1_ instead of here. */ - -static ffelexHandler -ffestb_decl_entsp_2_ (ffelexToken t) -{ - ffelexToken nt; - bool asterisk_ok; - unsigned const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeASTERISK: - ffesta_confirmed (); - switch (ffestb_local_.decl.type) - { - case FFESTP_typeINTEGER: - case FFESTP_typeREAL: - case FFESTP_typeCOMPLEX: - case FFESTP_typeLOGICAL: - asterisk_ok = (ffestb_local_.decl.kindt == NULL); - break; - - case FFESTP_typeCHARACTER: - asterisk_ok = (ffestb_local_.decl.lent == NULL); - break; - - case FFESTP_typeBYTE: - case FFESTP_typeWORD: - default: - asterisk_ok = FALSE; - break; - } - switch (ffestr_first (ffesta_tokens[1])) - { - case FFESTR_firstFUNCTION: - if (!asterisk_ok) - break; /* For our own convenience, treat as non-FN - stmt. */ - p = ffelex_token_text (ffesta_tokens[1]) - + (i = FFESTR_firstlFUNCTION); - if (!ffesrc_is_name_init (*p)) - break; - ffestb_local_.decl.recursive = NULL; - ffesta_tokens[2] = ffelex_token_name_from_names (ffesta_tokens[1], - FFESTR_firstlFUNCTION, 0); - return (ffelexHandler) ffestb_decl_entsp_3_; - - default: - break; - } - break; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.aster_after = FALSE; - switch (ffestr_first (ffesta_tokens[1])) - { - case FFESTR_firstFUNCTION: - p = ffelex_token_text (ffesta_tokens[1]) - + (i = FFESTR_firstlFUNCTION); - if (!ffesrc_is_name_init (*p)) - break; - ffestb_local_.decl.recursive = NULL; - ffesta_tokens[2] = ffelex_token_name_from_names (ffesta_tokens[1], - FFESTR_firstlFUNCTION, 0); - return (ffelexHandler) ffestb_decl_entsp_5_ (t); - - default: - break; - } - if ((ffestb_local_.decl.kindt != NULL) - || (ffestb_local_.decl.lent != NULL)) - break; /* Have kind/len type param, definitely not - assignment stmt. */ - return (ffelexHandler) ffestb_decl_entsp_1_ (t); - - default: - break; - } - - nt = ffelex_token_name_from_names (ffesta_tokens[1], 0, 0); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_tokens[1] = nt; /* Change NAMES to NAME. */ - return (ffelexHandler) ffestb_decl_entsp_1_ (t); -} - -/* ffestb_decl_entsp_3_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME ASTERISK - - return ffestb_decl_entsp_3_; // to lexer - - Handle NUMBER or OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_entsp_3_ (ffelexToken t) -{ - ffestb_local_.decl.aster_after = TRUE; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - switch (ffestb_local_.decl.type) - { - case FFESTP_typeINTEGER: - case FFESTP_typeREAL: - case FFESTP_typeCOMPLEX: - case FFESTP_typeLOGICAL: - ffestb_local_.decl.kindt = ffelex_token_use (t); - break; - - case FFESTP_typeCHARACTER: - ffestb_local_.decl.lent = ffelex_token_use (t); - break; - - case FFESTP_typeBYTE: - case FFESTP_typeWORD: - default: - assert (FALSE); - } - return (ffelexHandler) ffestb_decl_entsp_5_; - - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCHARACTERSIZE, - (ffeexprCallback) ffestb_decl_entsp_4_); - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_entsp_4_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME ASTERISK OPEN_PAREN expr - - (ffestb_decl_entsp_4_) // to expression handler - - Allow only CLOSE_PAREN; and deal with character-length expression. */ - -static ffelexHandler -ffestb_decl_entsp_4_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - switch (ffestb_local_.decl.type) - { - case FFESTP_typeCHARACTER: - ffestb_local_.decl.len = expr; - ffestb_local_.decl.lent = ffelex_token_use (ft); - break; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - break; - } - return (ffelexHandler) ffestb_decl_entsp_5_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_entsp_5_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] - - return ffestb_decl_entsp_5_; // to lexer - - Make sure the next token is an OPEN_PAREN. Get the arg list or dimension - list. If it can't be an arg list, or if the CLOSE_PAREN is followed by - something other than EOS/SEMICOLON or NAME, then treat as dimension list - and handle statement as an R426/R501. If it can't be a dimension list, or - if the CLOSE_PAREN is followed by NAME, treat as an arg list and handle - statement as an R1219. If it can be either an arg list or a dimension - list and if the CLOSE_PAREN is followed by EOS/SEMICOLON, ask FFESTC - whether to treat the statement as an R426/R501 or an R1219 and act - accordingly. */ - -static ffelexHandler -ffestb_decl_entsp_5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - if (ffestb_local_.decl.aster_after && (ffestb_local_.decl.len != NULL)) - { /* "CHARACTER[RECURSIVE]FUNCTIONxyz*(len-expr) - (..." must be a function-stmt, since the - (len-expr) cannot precede (array-spec) in - an object declaration but can precede - (name-list) in a function stmt. */ - ffelex_token_kill (ffesta_tokens[1]); - ffesta_tokens[1] = ffesta_tokens[2]; - return (ffelexHandler) ffestb_decl_funcname_4_ (t); - } - ffestb_local_.decl.toklist = ffestt_tokenlist_create (); - ffestb_local_.decl.empty = TRUE; - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_entsp_6_; - - default: - break; - } - - assert (ffestb_local_.decl.aster_after); - ffesta_confirmed (); /* We've seen an ASTERISK, so even EQUALS - confirmed. */ - ffestb_subr_ambig_to_ents_ (); - ffestb_subrargs_.dim_list.dims = NULL; - return (ffelexHandler) ffestb_decl_ents_7_ (t); -} - -/* ffestb_decl_entsp_6_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN - - return ffestb_decl_entsp_6_; // to lexer - - If CLOSE_PAREN, we definitely have an R1219 function-stmt, since - the notation "name()" is invalid for a declaration. */ - -static ffelexHandler -ffestb_decl_entsp_6_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (!ffestb_local_.decl.empty) - { /* Trailing comma, just a warning for - stmt func def, so allow ambiguity. */ - ffestt_tokenlist_append (ffestb_local_.decl.toklist, - ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_entsp_8_; - } - ffelex_token_kill (ffesta_tokens[1]); - ffesta_tokens[1] = ffesta_tokens[2]; - next = (ffelexHandler) ffestt_tokenlist_handle - (ffestb_local_.decl.toklist, (ffelexHandler) ffestb_decl_funcname_4_); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); - - case FFELEX_typeNAME: - ffestb_local_.decl.empty = FALSE; - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_entsp_7_; - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typePERCENT: - case FFELEX_typePERIOD: - case FFELEX_typeOPEN_PAREN: - if ((ffestb_local_.decl.kindt != NULL) - || (ffestb_local_.decl.lent != NULL)) - break; /* type(params)name or type*val name, either - way confirmed. */ - return (ffelexHandler) ffestb_subr_ambig_nope_ (t); - - default: - break; - } - - ffesta_confirmed (); - ffestb_subr_ambig_to_ents_ (); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_decl_ents_3_); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); -} - -/* ffestb_decl_entsp_7_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN NAME - - return ffestb_decl_entsp_7_; // to lexer - - Expect COMMA or CLOSE_PAREN to remain ambiguous, else not an R1219 - function-stmt. */ - -static ffelexHandler -ffestb_decl_entsp_7_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_entsp_8_; - - case FFELEX_typeCOMMA: - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_entsp_6_; - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typePERCENT: - case FFELEX_typePERIOD: - case FFELEX_typeOPEN_PAREN: - if ((ffestb_local_.decl.kindt != NULL) - || (ffestb_local_.decl.lent != NULL)) - break; /* type(params)name or type*val name, either - way confirmed. */ - return (ffelexHandler) ffestb_subr_ambig_nope_ (t); - - default: - break; - } - - ffesta_confirmed (); - ffestb_subr_ambig_to_ents_ (); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_decl_ents_3_); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); -} - -/* ffestb_decl_entsp_8_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN name-list - CLOSE_PAREN - - return ffestb_decl_entsp_8_; // to lexer - - If EOS/SEMICOLON, situation remains ambiguous, ask FFESTC to resolve - it. If NAME (must be "RESULT", but that is checked later on), - definitely an R1219 function-stmt. Anything else, handle as entity decl. */ - -static ffelexHandler -ffestb_decl_entsp_8_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (ffestc_is_decl_not_R1219 ()) - break; - /* Fall through. */ - case FFELEX_typeNAME: - ffesta_confirmed (); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_tokens[1] = ffesta_tokens[2]; - next = (ffelexHandler) ffestt_tokenlist_handle - (ffestb_local_.decl.toklist, (ffelexHandler) ffestb_decl_funcname_4_); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); - - case FFELEX_typeEQUALS: - case FFELEX_typePOINTS: - case FFELEX_typePERCENT: - case FFELEX_typePERIOD: - case FFELEX_typeOPEN_PAREN: - if ((ffestb_local_.decl.kindt != NULL) - || (ffestb_local_.decl.lent != NULL)) - break; /* type(params)name or type*val name, either - way confirmed. */ - return (ffelexHandler) ffestb_subr_ambig_nope_ (t); - - default: - break; - } - - ffesta_confirmed (); - ffestb_subr_ambig_to_ents_ (); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_decl_ents_3_); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); -} - -/* ffestb_decl_funcname_ -- "type" [type parameters] [RECURSIVE] FUNCTION - - return ffestb_decl_funcname_; // to lexer - - Handle NAME of a function. */ - -static ffelexHandler -ffestb_decl_funcname_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_funcname_1_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_1_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME - - return ffestb_decl_funcname_1_; // to lexer - - Handle ASTERISK or OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_funcname_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeASTERISK: - return (ffelexHandler) ffestb_decl_funcname_2_; - - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffestb_decl_funcname_4_ (t); - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_2_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME ASTERISK - - return ffestb_decl_funcname_2_; // to lexer - - Handle NUMBER or OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_funcname_2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNUMBER: - switch (ffestb_local_.decl.type) - { - case FFESTP_typeINTEGER: - case FFESTP_typeREAL: - case FFESTP_typeCOMPLEX: - case FFESTP_typeLOGICAL: - if (ffestb_local_.decl.kindt == NULL) - ffestb_local_.decl.kindt = ffelex_token_use (t); - else - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - break; - - case FFESTP_typeCHARACTER: - if (ffestb_local_.decl.lent == NULL) - ffestb_local_.decl.lent = ffelex_token_use (t); - else - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - break; - - case FFESTP_typeBYTE: - case FFESTP_typeWORD: - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - break; - } - return (ffelexHandler) ffestb_decl_funcname_4_; - - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextCHARACTERSIZE, - (ffeexprCallback) ffestb_decl_funcname_3_); - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_3_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME ASTERISK OPEN_PAREN expr - - (ffestb_decl_funcname_3_) // to expression handler - - Allow only CLOSE_PAREN; and deal with character-length expression. */ - -static ffelexHandler -ffestb_decl_funcname_3_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - if (expr == NULL) - break; - switch (ffestb_local_.decl.type) - { - case FFESTP_typeCHARACTER: - if (ffestb_local_.decl.lent == NULL) - { - ffestb_local_.decl.len = expr; - ffestb_local_.decl.lent = ffelex_token_use (ft); - } - else - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - break; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - break; - } - return (ffelexHandler) ffestb_decl_funcname_4_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_4_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] - - return ffestb_decl_funcname_4_; // to lexer - - Make sure the next token is an OPEN_PAREN. Get the arg list and - then implement. */ - -static ffelexHandler -ffestb_decl_funcname_4_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_subrargs_.name_list.args = ffestt_tokenlist_create (); - ffestb_subrargs_.name_list.handler - = (ffelexHandler) ffestb_decl_funcname_5_; - ffestb_subrargs_.name_list.is_subr = FALSE; - ffestb_subrargs_.name_list.names = FALSE; - return (ffelexHandler) ffestb_subr_name_list_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_5_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN arg-list - CLOSE_PAREN - - return ffestb_decl_funcname_5_; // to lexer - - Must have EOS/SEMICOLON or "RESULT" here. */ - -static ffelexHandler -ffestb_decl_funcname_5_ (ffelexToken t) -{ - if (!ffestb_subrargs_.name_list.ok) - goto bad; /* :::::::::::::::::::: */ - - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R1219 (ffesta_tokens[1], ffestb_subrargs_.name_list.args, - ffestb_subrargs_.name_list.close_paren, ffestb_local_.decl.type, - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, - ffestb_local_.decl.len, ffestb_local_.decl.lent, - ffestb_local_.decl.recursive, NULL); - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeNAME: - if (ffestr_other (t) != FFESTR_otherRESULT) - break; - return (ffelexHandler) ffestb_decl_funcname_6_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_6_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN arglist - CLOSE_PAREN "RESULT" - - return ffestb_decl_funcname_6_; // to lexer - - Make sure the next token is an OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_funcname_6_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - return (ffelexHandler) ffestb_decl_funcname_7_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_7_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN arglist - CLOSE_PAREN "RESULT" OPEN_PAREN - - return ffestb_decl_funcname_7_; // to lexer - - Make sure the next token is a NAME. */ - -static ffelexHandler -ffestb_decl_funcname_7_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[2] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_funcname_8_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_8_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN arglist - CLOSE_PAREN "RESULT" OPEN_PAREN NAME - - return ffestb_decl_funcname_8_; // to lexer - - Make sure the next token is a CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_funcname_8_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_decl_funcname_9_; - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_funcname_9_ -- "type" [type parameters] [RECURSIVE] FUNCTION - NAME [type parameter] OPEN_PAREN arg-list - CLOSE_PAREN "RESULT" OPEN_PAREN NAME CLOSE_PAREN - - return ffestb_decl_funcname_9_; // to lexer - - Must have EOS/SEMICOLON here. */ - -static ffelexHandler -ffestb_decl_funcname_9_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffesta_is_inhibited ()) - ffestc_R1219 (ffesta_tokens[1], ffestb_subrargs_.name_list.args, - ffestb_subrargs_.name_list.close_paren, ffestb_local_.decl.type, - ffestb_local_.decl.kind, ffestb_local_.decl.kindt, - ffestb_local_.decl.len, ffestb_local_.decl.lent, - ffestb_local_.decl.recursive, ffesta_tokens[2]); - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - if (ffestb_local_.decl.recursive != NULL) - ffelex_token_kill (ffestb_local_.decl.recursive); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffelex_token_kill (ffesta_tokens[1]); - ffelex_token_kill (ffesta_tokens[2]); - ffelex_token_kill (ffestb_subrargs_.name_list.close_paren); - ffestt_tokenlist_kill (ffestb_subrargs_.name_list.args); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "FUNCTION", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} -/* ffestb_V027 -- Parse the VXT PARAMETER statement - - return ffestb_V027; // to lexer - - Make sure the statement has a valid form for the VXT PARAMETER statement. - If it does, implement the statement. */ - -ffelexHandler -ffestb_V027 (ffelexToken t) -{ - unsigned const char *p; - ffeTokenLength i; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstPARAMETER) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - break; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - ffesta_confirmed (); - ffestb_local_.vxtparam.started = TRUE; - if (!ffesta_is_inhibited ()) - ffestc_V027_start (); - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0271_; - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstPARAMETER) - goto bad_0; /* :::::::::::::::::::: */ - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlPARAMETER); - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - break; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - if (!ffesrc_is_name_init (*p)) - goto bad_i; /* :::::::::::::::::::: */ - ffestb_local_.vxtparam.started = FALSE; - ffesta_tokens[1] = ffelex_token_name_from_names (ffesta_tokens[0], i, - 0); - return (ffelexHandler) ffestb_V0271_ (t); - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ - -bad_i: /* :::::::::::::::::::: */ - ffesta_ffebad_1sp (FFEBAD_INVALID_STMT_FORM, "PARAMETER", ffesta_tokens[0], i, t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0271_ -- "PARAMETER" NAME - - return ffestb_V0271_; // to lexer - - Handle EQUALS. */ - -static ffelexHandler -ffestb_V0271_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEQUALS: - return (ffelexHandler) ffeexpr_rhs (ffesta_output_pool, - FFEEXPR_contextPARAMETER, (ffeexprCallback) ffestb_V0272_); - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.vxtparam.started && !ffesta_is_inhibited ()) - ffestc_V027_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0272_ -- "PARAMETER" NAME EQUALS expr - - (ffestb_V0272_) // to expression handler - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_V0272_ (ffelexToken ft, ffebld expr, ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffestb_local_.vxtparam.started) - { - if (ffestc_is_let_not_V027 ()) - break; /* Not a valid VXTPARAMETER stmt. */ - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_V027_start (); - ffestb_local_.vxtparam.started = TRUE; - } - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - { - ffestc_V027_item (ffesta_tokens[1], expr, ft); - ffestc_V027_finish (); - } - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeCOMMA: - ffesta_confirmed (); - if (!ffestb_local_.vxtparam.started) - { - if (!ffesta_is_inhibited ()) - ffestc_V027_start (); - ffestb_local_.vxtparam.started = TRUE; - } - if (expr == NULL) - break; - if (!ffesta_is_inhibited ()) - ffestc_V027_item (ffesta_tokens[1], expr, ft); - ffelex_token_kill (ffesta_tokens[1]); - return (ffelexHandler) ffestb_V0273_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - if (ffestb_local_.vxtparam.started && !ffesta_is_inhibited ()) - ffestc_V027_finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_V0273_ -- "PARAMETER" NAME EQUALS expr COMMA - - return ffestb_V0273_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_V0273_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_V0271_; - - default: - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "PARAMETER", t); - break; - } - - if (ffestb_local_.vxtparam.started && !ffesta_is_inhibited ()) - ffestc_V027_finish (); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539 -- Parse the IMPLICIT FUNCTION statement - - return ffestb_decl_R539; // to lexer - - Make sure the statement has a valid form for the IMPLICIT - statement. If it does, implement the statement. */ - -ffelexHandler -ffestb_decl_R539 (ffelexToken t) -{ - ffeTokenLength i; - unsigned const char *p; - ffelexToken nt; - ffestrSecond kw; - - ffestb_local_.decl.recursive = NULL; - - switch (ffelex_token_type (ffesta_tokens[0])) - { - case FFELEX_typeNAME: - if (ffesta_first_kw != FFESTR_firstIMPLICIT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - ffesta_confirmed (); /* Error, but clearly intended. */ - goto bad_1; /* :::::::::::::::::::: */ - - default: - goto bad_1; /* :::::::::::::::::::: */ - - case FFELEX_typeNAME: - break; - } - ffesta_confirmed (); - ffestb_local_.decl.imp_started = FALSE; - switch (ffesta_second_kw) - { - case FFESTR_secondINTEGER: - ffestb_local_.decl.type = FFESTP_typeINTEGER; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondBYTE: - ffestb_local_.decl.type = FFESTP_typeBYTE; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondWORD: - ffestb_local_.decl.type = FFESTP_typeWORD; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondREAL: - ffestb_local_.decl.type = FFESTP_typeREAL; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondCOMPLEX: - ffestb_local_.decl.type = FFESTP_typeCOMPLEX; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondLOGICAL: - ffestb_local_.decl.type = FFESTP_typeLOGICAL; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondCHARACTER: - ffestb_local_.decl.type = FFESTP_typeCHARACTER; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondDOUBLE: - return (ffelexHandler) ffestb_decl_R5392_; - - case FFESTR_secondDOUBLEPRECISION: - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_R539letters_; - - case FFESTR_secondDOUBLECOMPLEX: - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_R539letters_; - - case FFESTR_secondNONE: - return (ffelexHandler) ffestb_decl_R5394_; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - case FFELEX_typeNAMES: - if (ffesta_first_kw != FFESTR_firstIMPLICIT) - goto bad_0; /* :::::::::::::::::::: */ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeCOLONCOLON: - case FFELEX_typeASTERISK: - case FFELEX_typeSEMICOLON: - case FFELEX_typeEOS: - ffesta_confirmed (); - break; - - case FFELEX_typeOPEN_PAREN: - break; - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - p = ffelex_token_text (ffesta_tokens[0]) + (i = FFESTR_firstlIMPLICIT); - if (!ffesrc_is_name_init (*p)) - goto bad_0; /* :::::::::::::::::::: */ - ffestb_local_.decl.imp_started = FALSE; - nt = ffelex_token_name_from_names (ffesta_tokens[0], - FFESTR_firstlIMPLICIT, 0); - kw = ffestr_second (nt); - ffelex_token_kill (nt); - switch (kw) - { - case FFESTR_secondINTEGER: - ffestb_local_.decl.type = FFESTP_typeINTEGER; - return (ffelexHandler) ffestb_decl_R5391_ (t); - - case FFESTR_secondBYTE: - ffestb_local_.decl.type = FFESTP_typeBYTE; - return (ffelexHandler) ffestb_decl_R5391_ (t); - - case FFESTR_secondWORD: - ffestb_local_.decl.type = FFESTP_typeWORD; - return (ffelexHandler) ffestb_decl_R5391_ (t); - - case FFESTR_secondREAL: - ffestb_local_.decl.type = FFESTP_typeREAL; - return (ffelexHandler) ffestb_decl_R5391_ (t); - - case FFESTR_secondCOMPLEX: - ffestb_local_.decl.type = FFESTP_typeCOMPLEX; - return (ffelexHandler) ffestb_decl_R5391_ (t); - - case FFESTR_secondLOGICAL: - ffestb_local_.decl.type = FFESTP_typeLOGICAL; - return (ffelexHandler) ffestb_decl_R5391_ (t); - - case FFESTR_secondCHARACTER: - ffestb_local_.decl.type = FFESTP_typeCHARACTER; - return (ffelexHandler) ffestb_decl_R5391_ (t); - - case FFESTR_secondDOUBLEPRECISION: - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_R539letters_ (t); - - case FFESTR_secondDOUBLECOMPLEX: - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_R539letters_ (t); - - case FFESTR_secondNONE: - return (ffelexHandler) ffestb_decl_R5394_ (t); - - default: - goto bad_1; /* :::::::::::::::::::: */ - } - - default: - goto bad_0; /* :::::::::::::::::::: */ - } - -bad_0: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", ffesta_tokens[0]); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); - -bad_1: /* :::::::::::::::::::: */ - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, - (ffelexHandler) ffesta_zero); /* Invalid second token. */ -} - -/* ffestb_decl_R5391_ -- "IMPLICIT" generic-type - - return ffestb_decl_R5391_; // to lexer - - Handle ASTERISK or OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_R5391_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeASTERISK: - ffesta_confirmed (); - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_R539letters_; - ffestb_local_.decl.badname = "IMPLICIT"; - if (ffestb_local_.decl.type == FFESTP_typeCHARACTER) - return (ffelexHandler) ffestb_decl_starlen_; - return (ffelexHandler) ffestb_decl_starkind_; - - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.handler = (ffelexHandler) ffestb_decl_R539letters_; - ffestb_local_.decl.badname = "IMPLICIT"; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - if (ffestb_local_.decl.type == FFESTP_typeCHARACTER) - ffestb_local_.decl.imp_handler - = (ffelexHandler) ffestb_decl_typeparams_; - else - ffestb_local_.decl.imp_handler - = (ffelexHandler) ffestb_decl_kindparam_; - return (ffelexHandler) ffestb_decl_R539maybe_ (t); - - default: - break; - } - - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R5392_ -- "IMPLICIT" "DOUBLE" - - return ffestb_decl_R5392_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_decl_R5392_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - switch (ffestr_second (t)) - { - case FFESTR_secondPRECISION: - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - break; - - case FFESTR_secondCOMPLEX: - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - break; - - default: - goto bad; /* :::::::::::::::::::: */ - } - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_R539letters_; - - default: - break; - } - -bad: /* :::::::::::::::::::: */ - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R5394_ -- "IMPLICIT" "NONE" - - return ffestb_decl_R5394_; // to lexer - - Handle EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_R5394_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R539 (); /* IMPLICIT NONE. */ - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R5395_ -- "IMPLICIT" implicit-spec-list COMMA - - return ffestb_decl_R5395_; // to lexer - - Handle NAME for next type-spec. */ - -static ffelexHandler -ffestb_decl_R5395_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - switch (ffestr_second (t)) - { - case FFESTR_secondINTEGER: - ffestb_local_.decl.type = FFESTP_typeINTEGER; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondBYTE: - ffestb_local_.decl.type = FFESTP_typeBYTE; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondWORD: - ffestb_local_.decl.type = FFESTP_typeWORD; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondREAL: - ffestb_local_.decl.type = FFESTP_typeREAL; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondCOMPLEX: - ffestb_local_.decl.type = FFESTP_typeCOMPLEX; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondLOGICAL: - ffestb_local_.decl.type = FFESTP_typeLOGICAL; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondCHARACTER: - ffestb_local_.decl.type = FFESTP_typeCHARACTER; - return (ffelexHandler) ffestb_decl_R5391_; - - case FFESTR_secondDOUBLE: - return (ffelexHandler) ffestb_decl_R5392_; - - case FFESTR_secondDOUBLEPRECISION: - ffestb_local_.decl.type = FFESTP_typeDBLPRCSN; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_R539letters_; - - case FFESTR_secondDOUBLECOMPLEX: - ffestb_local_.decl.type = FFESTP_typeDBLCMPLX; - ffestb_local_.decl.kind = NULL; - ffestb_local_.decl.kindt = NULL; - ffestb_local_.decl.len = NULL; - ffestb_local_.decl.lent = NULL; - return (ffelexHandler) ffestb_decl_R539letters_; - - default: - break; - } - break; - - default: - break; - } - - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539letters_ -- "IMPLICIT" type-spec - - return ffestb_decl_R539letters_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_R539letters_ (ffelexToken t) -{ - ffelex_set_names (FALSE); - - switch (ffelex_token_type (t)) - { - case FFELEX_typeOPEN_PAREN: - ffestb_local_.decl.imps = ffestt_implist_create (); - return (ffelexHandler) ffestb_decl_R539letters_1_; - - default: - break; - } - - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539letters_1_ -- "IMPLICIT" type-spec OPEN_PAREN - - return ffestb_decl_R539letters_1_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_decl_R539letters_1_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (ffelex_token_length (t) != 1) - break; - ffesta_tokens[1] = ffelex_token_use (t); - return (ffelexHandler) ffestb_decl_R539letters_2_; - - default: - break; - } - - ffestt_implist_kill (ffestb_local_.decl.imps); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539letters_2_ -- "IMPLICIT" type-spec OPEN_PAREN NAME - - return ffestb_decl_R539letters_2_; // to lexer - - Handle COMMA or MINUS. */ - -static ffelexHandler -ffestb_decl_R539letters_2_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffestt_implist_append (ffestb_local_.decl.imps, ffesta_tokens[1], NULL); - return (ffelexHandler) ffestb_decl_R539letters_1_; - - case FFELEX_typeCLOSE_PAREN: - ffestt_implist_append (ffestb_local_.decl.imps, ffesta_tokens[1], NULL); - return (ffelexHandler) ffestb_decl_R539letters_5_; - - case FFELEX_typeMINUS: - return (ffelexHandler) ffestb_decl_R539letters_3_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffestt_implist_kill (ffestb_local_.decl.imps); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539letters_3_ -- "IMPLICIT" type-spec OPEN_PAREN NAME MINUS - - return ffestb_decl_R539letters_3_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_decl_R539letters_3_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (ffelex_token_length (t) != 1) - break; - ffestt_implist_append (ffestb_local_.decl.imps, ffesta_tokens[1], - ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539letters_4_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffestt_implist_kill (ffestb_local_.decl.imps); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539letters_4_ -- "IMPLICIT" type-spec OPEN_PAREN NAME MINUS - NAME - - return ffestb_decl_R539letters_4_; // to lexer - - Handle COMMA or CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_R539letters_4_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - return (ffelexHandler) ffestb_decl_R539letters_1_; - - case FFELEX_typeCLOSE_PAREN: - return (ffelexHandler) ffestb_decl_R539letters_5_; - - default: - break; - } - - ffestt_implist_kill (ffestb_local_.decl.imps); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539letters_5_ -- "IMPLICIT" type-spec OPEN_PAREN - letter-spec-list CLOSE_PAREN - - return ffestb_decl_R539letters_5_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_R539letters_5_ (ffelexToken t) -{ - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - if (!ffestb_local_.decl.imp_started) - { - ffestb_local_.decl.imp_started = TRUE; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R539start (); - } - if (!ffesta_is_inhibited ()) - ffestc_R539item (ffestb_local_.decl.type, ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_local_.decl.len, - ffestb_local_.decl.lent, ffestb_local_.decl.imps); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffestt_implist_kill (ffestb_local_.decl.imps); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_decl_R5395_; - if (!ffesta_is_inhibited ()) - ffestc_R539finish (); - return (ffelexHandler) ffesta_zero (t); - - default: - break; - } - - ffestt_implist_kill (ffestb_local_.decl.imps); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} - -/* ffestb_decl_R539maybe_ -- "IMPLICIT" generic-type-spec - - return ffestb_decl_R539maybe_; // to lexer - - Handle OPEN_PAREN. */ - -static ffelexHandler -ffestb_decl_R539maybe_ (ffelexToken t) -{ - assert (ffelex_token_type (t) == FFELEX_typeOPEN_PAREN); - ffestb_local_.decl.imps = ffestt_implist_create (); - ffestb_local_.decl.toklist = ffestt_tokenlist_create (); - ffestb_local_.decl.imp_seen_comma - = (ffestb_local_.decl.type != FFESTP_typeCHARACTER); - return (ffelexHandler) ffestb_decl_R539maybe_1_; -} - -/* ffestb_decl_R539maybe_1_ -- "IMPLICIT" generic-type-spec OPEN_PAREN - - return ffestb_decl_R539maybe_1_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_decl_R539maybe_1_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (ffelex_token_length (t) != 1) - break; - ffesta_tokens[1] = ffelex_token_use (t); - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539maybe_2_; - - default: - break; - } - - ffestt_implist_kill (ffestb_local_.decl.imps); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_local_.decl.imp_handler); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); -} - -/* ffestb_decl_R539maybe_2_ -- "IMPLICIT" generic-type-spec OPEN_PAREN NAME - - return ffestb_decl_R539maybe_2_; // to lexer - - Handle COMMA or MINUS. */ - -static ffelexHandler -ffestb_decl_R539maybe_2_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - ffestt_implist_append (ffestb_local_.decl.imps, ffesta_tokens[1], NULL); - if (ffestb_local_.decl.imp_seen_comma) - { - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) ffestb_decl_R539letters_1_; - } - ffestb_local_.decl.imp_seen_comma = TRUE; - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539maybe_1_; - - case FFELEX_typeCLOSE_PAREN: - ffestt_implist_append (ffestb_local_.decl.imps, ffesta_tokens[1], NULL); - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539maybe_5_; - - case FFELEX_typeMINUS: - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539maybe_3_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffestt_implist_kill (ffestb_local_.decl.imps); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_local_.decl.imp_handler); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); -} - -/* ffestb_decl_R539maybe_3_ -- "IMPLICIT" type-spec OPEN_PAREN NAME MINUS - - return ffestb_decl_R539maybe_3_; // to lexer - - Handle NAME. */ - -static ffelexHandler -ffestb_decl_R539maybe_3_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeNAME: - if (ffelex_token_length (t) != 1) - break; - ffestt_implist_append (ffestb_local_.decl.imps, ffesta_tokens[1], - ffelex_token_use (t)); - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539maybe_4_; - - default: - break; - } - - ffelex_token_kill (ffesta_tokens[1]); - ffestt_implist_kill (ffestb_local_.decl.imps); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_local_.decl.imp_handler); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); -} - -/* ffestb_decl_R539maybe_4_ -- "IMPLICIT" type-spec OPEN_PAREN NAME MINUS - NAME - - return ffestb_decl_R539maybe_4_; // to lexer - - Handle COMMA or CLOSE_PAREN. */ - -static ffelexHandler -ffestb_decl_R539maybe_4_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - if (ffestb_local_.decl.imp_seen_comma) - { - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) ffestb_decl_R539letters_1_; - } - ffestb_local_.decl.imp_seen_comma = TRUE; - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539maybe_1_; - - case FFELEX_typeCLOSE_PAREN: - ffestt_tokenlist_append (ffestb_local_.decl.toklist, ffelex_token_use (t)); - return (ffelexHandler) ffestb_decl_R539maybe_5_; - - default: - break; - } - - ffestt_implist_kill (ffestb_local_.decl.imps); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_local_.decl.imp_handler); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); -} - -/* ffestb_decl_R539maybe_5_ -- "IMPLICIT" type-spec OPEN_PAREN - letter-spec-list CLOSE_PAREN - - return ffestb_decl_R539maybe_5_; // to lexer - - Handle COMMA or EOS/SEMICOLON. */ - -static ffelexHandler -ffestb_decl_R539maybe_5_ (ffelexToken t) -{ - ffelexHandler next; - - switch (ffelex_token_type (t)) - { - case FFELEX_typeCOMMA: - case FFELEX_typeEOS: - case FFELEX_typeSEMICOLON: - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - if (!ffestb_local_.decl.imp_started) - { - ffestb_local_.decl.imp_started = TRUE; - ffesta_confirmed (); - if (!ffesta_is_inhibited ()) - ffestc_R539start (); - } - if (!ffesta_is_inhibited ()) - ffestc_R539item (ffestb_local_.decl.type, ffestb_local_.decl.kind, - ffestb_local_.decl.kindt, ffestb_local_.decl.len, - ffestb_local_.decl.lent, ffestb_local_.decl.imps); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - ffestt_implist_kill (ffestb_local_.decl.imps); - if (ffelex_token_type (t) == FFELEX_typeCOMMA) - return (ffelexHandler) ffestb_decl_R5395_; - if (!ffesta_is_inhibited ()) - ffestc_R539finish (); - return (ffelexHandler) ffesta_zero (t); - - case FFELEX_typeOPEN_PAREN: - ffesta_confirmed (); - ffestt_implist_kill (ffestb_local_.decl.imps); - next = (ffelexHandler) ffestt_tokenlist_handle (ffestb_local_.decl.toklist, - (ffelexHandler) ffestb_local_.decl.imp_handler); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - return (ffelexHandler) (*next) (t); - - default: - break; - } - - ffestt_implist_kill (ffestb_local_.decl.imps); - ffestt_tokenlist_kill (ffestb_local_.decl.toklist); - if (ffestb_local_.decl.kindt != NULL) - ffelex_token_kill (ffestb_local_.decl.kindt); - if (ffestb_local_.decl.lent != NULL) - ffelex_token_kill (ffestb_local_.decl.lent); - if (ffestb_local_.decl.imp_started && !ffesta_is_inhibited ()) - ffestc_R539finish (); - ffesta_ffebad_1st (FFEBAD_INVALID_STMT_FORM, "IMPLICIT", t); - return (ffelexHandler) ffelex_swallow_tokens (t, (ffelexHandler) ffesta_zero); -} diff --git a/contrib/gcc/f/stb.h b/contrib/gcc/f/stb.h deleted file mode 100644 index 88cb7c54..0000000 --- a/contrib/gcc/f/stb.h +++ /dev/null @@ -1,177 +0,0 @@ -/* stb.h -- Private #include File (module.h template V1.0) - Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Owning Modules: - stb.c - - Modifications: -*/ - -/* Allow multiple inclusion to work. */ - -#ifndef GCC_F_STB_H -#define GCC_F_STB_H - -/* Simple definitions and enumerations. */ - - -/* Typedefs. */ - - -/* Include files needed by this one. */ - -#include "bad.h" -#include "expr.h" -#include "lex.h" -#include "stp.h" -#include "str.h" - -/* Structure definitions. */ - -struct _ffestb_args_ - { - struct - { - const char *badname; - ffeTokenLength len; /* Length of "ENTRY/FUNCTION/SUBROUTINE". */ - bool is_subr; /* TRUE if SUBROUTINE or if ENTRY within - SUBROUTINE. */ - } - dummy; - struct - { - const char *badname; - ffeTokenLength len; /* Length of - "BACKSPACE/ENDFILE/REWIND/UNLOCK". */ - } - beru; - struct - { - ffeTokenLength len; /* Length of keyword including "END". */ - ffestrSecond second; /* Second keyword. */ - } - endxyz; - struct - { - ffestrSecond second; /* Second keyword. */ - } - elsexyz; - struct - { - ffeTokenLength len; /* Length of "STOP/PAUSE". */ - } - halt; - struct - { - const char *badname; - ffeTokenLength len; /* Length of - "EXTERNAL/INTENT/INTRINSIC/OPTIONAL/PUBLIC/ - PRIVATE". */ - } - varlist; - struct - { - const char *badname; - ffeTokenLength len; /* Length of "DIMENSION/VIRTUAL". */ - } - R524; - struct - { - ffeTokenLength len; /* Length of first keyword. */ - ffestpType type; /* Type of declaration. */ - } - decl; - }; - -/* Global objects accessed by users of this module. */ - -extern struct _ffestb_args_ ffestb_args; - -/* Declare functions with prototypes. */ - -ffelexHandler ffestb_beru (ffelexToken t); -ffelexHandler ffestb_block (ffelexToken t); -ffelexHandler ffestb_blockdata (ffelexToken t); -ffelexHandler ffestb_decl_chartype (ffelexToken t); -ffelexHandler ffestb_construct (ffelexToken t); -ffelexHandler ffestb_decl_dbltype (ffelexToken t); -ffelexHandler ffestb_decl_double (ffelexToken t); -ffelexHandler ffestb_dimlist (ffelexToken t); -ffelexHandler ffestb_do (ffelexToken t); -ffelexHandler ffestb_dowhile (ffelexToken t); -ffelexHandler ffestb_dummy (ffelexToken t); -ffelexHandler ffestb_else (ffelexToken t); -ffelexHandler ffestb_elsexyz (ffelexToken t); -ffelexHandler ffestb_end (ffelexToken t); -ffelexHandler ffestb_endxyz (ffelexToken t); -ffelexHandler ffestb_decl_gentype (ffelexToken t); -ffelexHandler ffestb_goto (ffelexToken t); -ffelexHandler ffestb_halt (ffelexToken t); -ffelexHandler ffestb_if (ffelexToken t); -ffelexHandler ffestb_let (ffelexToken t); -ffelexHandler ffestb_varlist (ffelexToken t); -ffelexHandler ffestb_R522 (ffelexToken t); -ffelexHandler ffestb_R524 (ffelexToken t); -ffelexHandler ffestb_R528 (ffelexToken t); -ffelexHandler ffestb_R537 (ffelexToken t); -ffelexHandler ffestb_decl_R539 (ffelexToken t); -ffelexHandler ffestb_R542 (ffelexToken t); -ffelexHandler ffestb_R544 (ffelexToken t); -ffelexHandler ffestb_R547 (ffelexToken t); -ffelexHandler ffestb_R809 (ffelexToken t); -ffelexHandler ffestb_R810 (ffelexToken t); -ffelexHandler ffestb_R834 (ffelexToken t); -ffelexHandler ffestb_R835 (ffelexToken t); -ffelexHandler ffestb_R838 (ffelexToken t); -ffelexHandler ffestb_R840 (ffelexToken t); -ffelexHandler ffestb_R841 (ffelexToken t); -ffelexHandler ffestb_R904 (ffelexToken t); -ffelexHandler ffestb_R907 (ffelexToken t); -ffelexHandler ffestb_R909 (ffelexToken t); -ffelexHandler ffestb_R910 (ffelexToken t); -ffelexHandler ffestb_R911 (ffelexToken t); -ffelexHandler ffestb_R923 (ffelexToken t); -ffelexHandler ffestb_R1001 (ffelexToken t); -ffelexHandler ffestb_R1102 (ffelexToken t); -ffelexHandler ffestb_R1212 (ffelexToken t); -ffelexHandler ffestb_R1227 (ffelexToken t); -ffelexHandler ffestb_R1229 (ffelexToken t); -ffelexHandler ffestb_S3P4 (ffelexToken t); -ffelexHandler ffestb_V014 (ffelexToken t); -ffelexHandler ffestb_V020 (ffelexToken t); -ffelexHandler ffestb_V027 (ffelexToken t); - -/* Define macros. */ - -#define ffestb_init_0() -#define ffestb_init_1() -#define ffestb_init_2() -#define ffestb_init_3() -#define ffestb_init_4() -#define ffestb_terminate_0() -#define ffestb_terminate_1() -#define ffestb_terminate_2() -#define ffestb_terminate_3() -#define ffestb_terminate_4() - -/* End of #include file. */ - -#endif /* ! GCC_F_STB_H */ diff --git a/contrib/gcc/f/stc.c b/contrib/gcc/f/stc.c deleted file mode 100644 index 5f05813..0000000 --- a/contrib/gcc/f/stc.c +++ /dev/null @@ -1,10459 +0,0 @@ -/* stc.c -- Implementation File (module.c template V1.0) - Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. - Contributed by James Craig Burley. - -This file is part of GNU Fortran. - -GNU Fortran is free software; you can redistribute it and/or modify -it under the 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 Fortran is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 Fortran; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - - Related Modules: - st.c - - Description: - Verifies the proper semantics for statements, checking expressions already - semantically analyzed individually, collectively, checking label defs and - refs, and so on. Uses ffebad to indicate errors in semantics. - - In many cases, both a token and a keyword (ffestrFirst, ffestrSecond, - or ffestrOther) is provided. ONLY USE THE TOKEN as a pointer to the - source-code location for an error message or similar; use the keyword - as the semantic matching for the token, since the token's text might - not match the keyword's code. For example, INTENT(IN OUT) A in free - source form passes to ffestc_R519_start the token "IN" but the keyword - FFESTR_otherINOUT, and the latter is correct. - - Generally, either a single ffestc function handles an entire statement, - in which case its name is ffestc_xyz_, or more than one function is - needed, in which case its names are ffestc_xyz_start_, - ffestc_xyz_item_ or ffestc_xyz_item_abc_, and ffestc_xyz_finish_. - The caller must call _start_ before calling any _item_ functions, and - must call _finish_ afterwards. If it is clearly a syntactic matter as - to restrictions on the number and variety of _item_ calls, then the caller - should report any errors and ffestc_ should presume it has been taken - care of and handle any semantic problems with grace and no error messages. - If the permitted number and variety of _item_ calls has some basis in - semantics, then the caller should not generate any messages and ffestc - should do all the checking. - - A few ffestc functions have names rather than grammar numbers, like - ffestc_elsewhere and ffestc_end. These are cases where the actual - statement depends on its context rather than just its form; ELSE WHERE - may be the obvious (WHERE...ELSE WHERE...END WHERE) or something a little - more subtle (WHERE: IF THEN...ELSE WHERE...END IF WHERE). The actual - ffestc functions do exist and do work, but may or may not be invoked - by ffestb depending on whether some form of resolution is possible. - For example, ffestc_R1103 end-program-stmt is reachable directly when - END PROGRAM [name] is specified, or via ffestc_end when END is specified - and the context is a main program. So ffestc_xyz_ should make a quick - determination of the context and pick the appropriate ffestc_Nxyz_ - function to invoke, without a lot of ceremony. - - Modifications: -*/ - -/* Include files. */ - -#include "proj.h" -#include "stc.h" -#include "bad.h" -#include "bld.h" -#include "data.h" -#include "expr.h" -#include "global.h" -#include "implic.h" -#include "lex.h" -#include "malloc.h" -#include "src.h" -#include "sta.h" -#include "std.h" -#include "stp.h" -#include "str.h" -#include "stt.h" -#include "stw.h" - -/* Externals defined here. */ - -ffeexprContext ffestc_iolist_context_ = FFEEXPR_contextIOLIST; -/* Valid only from READ/WRITE start to finish. */ - -/* Simple definitions and enumerations. */ - -typedef enum - { - FFESTC_orderOK_, /* Statement ok in this context, process. */ - FFESTC_orderBAD_, /* Statement not ok in this context, don't - process. */ - FFESTC_orderBADOK_, /* Don't process but push block if - applicable. */ - FFESTC - } ffestcOrder_; - -typedef enum - { - FFESTC_stateletSIMPLE_, /* Expecting simple/start. */ - FFESTC_stateletATTRIB_, /* Expecting attrib/item/itemstart. */ - FFESTC_stateletITEM_, /* Expecting item/itemstart/finish. */ - FFESTC_stateletITEMVALS_, /* Expecting itemvalue/itemendvals. */ - FFESTC_ - } ffestcStatelet_; - -/* Internal typedefs. */ - - -/* Private include files. */ - - -/* Internal structure definitions. */ - -union ffestc_local_u_ - { - struct - { - ffebld initlist; /* For list of one sym in INTEGER I/3/ case. */ - ffetargetCharacterSize stmt_size; - ffetargetCharacterSize size; - ffeinfoBasictype basic_type; - ffeinfoKindtype stmt_kind_type; - ffeinfoKindtype kind_type; - bool per_var_kind_ok; - char is_R426; /* 1=R426, 2=R501. */ - } - decl; - struct - { - ffebld objlist; /* For list of target objects. */ - ffebldListBottom list_bottom; /* For building lists. */ - } - data; - struct - { - ffebldListBottom list_bottom; /* For building lists. */ - int entry_num; - } - dummy; - struct - { - ffesymbol symbol; /* NML symbol. */ - } - namelist; - struct - { - ffelexToken t; /* First token in list. */ - ffeequiv eq; /* Current equivalence being built up. */ - ffebld list; /* List of expressions in equivalence. */ - ffebldListBottom bottom; - bool ok; /* TRUE while current list still being - processed. */ - bool save; /* TRUE if any var in list is SAVEd. */ - } - equiv; - struct - { - ffesymbol symbol; /* BCB/NCB symbol. */ - } - common; - struct - { - ffesymbol symbol; /* SFN symbol. */ - } - sfunc; - }; /* Merge with the one in ffestc later. */ - -/* Static objects accessed by functions in this module. */ - -static bool ffestc_ok_; /* _start_ fn's send this to _xyz_ fn's. */ -static bool ffestc_parent_ok_; /* Parent sym for baby sym fn's ok. */ -static char ffestc_namelist_; /* 0=>not namelist, 1=>namelist, 2=>error. */ -static union ffestc_local_u_ ffestc_local_; -static ffestcStatelet_ ffestc_statelet_ = FFESTC_stateletSIMPLE_; -static ffestwShriek ffestc_shriek_after1_ = NULL; -static unsigned long ffestc_blocknum_ = 0; /* Next block# to assign. */ -static int ffestc_entry_num_; -static int ffestc_sfdummy_argno_; -static int ffestc_saved_entry_num_; -static ffelab ffestc_label_; - -/* Static functions (internal). */ - -static void ffestc_R544_equiv_ (ffebld expr, ffelexToken t); -static void ffestc_establish_declinfo_ (ffebld kind, ffelexToken kindt, - ffebld len, ffelexToken lent); -static void ffestc_establish_declstmt_ (ffestpType type, ffelexToken typet, - ffebld kind, ffelexToken kindt, - ffebld len, ffelexToken lent); -static void ffestc_establish_impletter_ (ffelexToken first, ffelexToken last); -static ffeinfoKindtype ffestc_kindtype_kind_ (ffeinfoBasictype bt, - ffetargetCharacterSize val); -static ffeinfoKindtype ffestc_kindtype_star_ (ffeinfoBasictype bt, - ffetargetCharacterSize val); -static void ffestc_labeldef_any_ (void); -static bool ffestc_labeldef_begin_ (void); -static void ffestc_labeldef_branch_begin_ (void); -static void ffestc_labeldef_branch_end_ (void); -static void ffestc_labeldef_endif_ (void); -static void ffestc_labeldef_format_ (void); -static void ffestc_labeldef_invalid_ (void); -static void ffestc_labeldef_notloop_ (void); -static void ffestc_labeldef_notloop_begin_ (void); -static void ffestc_labeldef_useless_ (void); -static bool ffestc_labelref_is_assignable_ (ffelexToken label_token, - ffelab *label); -static bool ffestc_labelref_is_branch_ (ffelexToken label_token, - ffelab *label); -static bool ffestc_labelref_is_format_ (ffelexToken label_token, - ffelab *label); -static bool ffestc_labelref_is_loopend_ (ffelexToken label_token, - ffelab *label); -static ffestcOrder_ ffestc_order_actiondo_ (void); -static ffestcOrder_ ffestc_order_actionif_ (void); -static ffestcOrder_ ffestc_order_actionwhere_ (void); -static void ffestc_order_any_ (void); -static void ffestc_order_bad_ (void); -static ffestcOrder_ ffestc_order_blockdata_ (void); -static ffestcOrder_ ffestc_order_blockspec_ (void); -static ffestcOrder_ ffestc_order_data_ (void); -static ffestcOrder_ ffestc_order_data77_ (void); -static ffestcOrder_ ffestc_order_do_ (void); -static ffestcOrder_ ffestc_order_entry_ (void); -static ffestcOrder_ ffestc_order_exec_ (void); -static ffestcOrder_ ffestc_order_format_ (void); -static ffestcOrder_ ffestc_order_function_ (void); -static ffestcOrder_ ffestc_order_iface_ (void); -static ffestcOrder_ ffestc_order_ifthen_ (void); -static ffestcOrder_ ffestc_order_implicit_ (void); -static ffestcOrder_ ffestc_order_implicitnone_ (void); -static ffestcOrder_ ffestc_order_parameter_ (void); -static ffestcOrder_ ffestc_order_program_ (void); -static ffestcOrder_ ffestc_order_progspec_ (void); -static ffestcOrder_ ffestc_order_selectcase_ (void); -static ffestcOrder_ ffestc_order_sfunc_ (void); -static ffestcOrder_ ffestc_order_subroutine_ (void); -static ffestcOrder_ ffestc_order_typedecl_ (void); -static ffestcOrder_ ffestc_order_unit_ (void); -static void ffestc_promote_dummy_ (ffelexToken t); -static void ffestc_promote_execdummy_ (ffelexToken t); -static void ffestc_promote_sfdummy_ (ffelexToken t); -static void ffestc_shriek_begin_program_ (void); -static void ffestc_shriek_blockdata_ (bool ok); -static void ffestc_shriek_do_ (bool ok); -static void ffestc_shriek_end_program_ (bool ok); -static void ffestc_shriek_function_ (bool ok); -static void ffestc_shriek_if_ (bool ok); -static void ffestc_shriek_ifthen_ (bool ok); -static void ffestc_shriek_select_ (bool ok); -static void ffestc_shriek_subroutine_ (bool ok); -static int ffestc_subr_binsrch_ (const char *const *list, int size, - ffestpFile *spec, const char *whine); -static ffestvFormat ffestc_subr_format_ (ffestpFile *spec); -static bool ffestc_subr_is_branch_ (ffestpFile *spec); -static bool ffestc_subr_is_format_ (ffestpFile *spec); -static bool ffestc_subr_is_present_ (const char *name, ffestpFile *spec); -static int ffestc_subr_speccmp_ (const char *string, ffestpFile *spec, - const char **target, int *length); -static ffestvUnit ffestc_subr_unit_ (ffestpFile *spec); -static void ffestc_try_shriek_do_ (void); - -/* Internal macros. */ - -#define ffestc_check_simple_() \ - assert(ffestc_statelet_ == FFESTC_stateletSIMPLE_) -#define ffestc_check_start_() \ - assert(ffestc_statelet_ == FFESTC_stateletSIMPLE_); \ - ffestc_statelet_ = FFESTC_stateletATTRIB_ -#define ffestc_check_attrib_() \ - assert(ffestc_statelet_ == FFESTC_stateletATTRIB_) -#define ffestc_check_item_() \ - assert(ffestc_statelet_ == FFESTC_stateletATTRIB_ \ - || ffestc_statelet_ == FFESTC_stateletITEM_); \ - ffestc_statelet_ = FFESTC_stateletITEM_ -#define ffestc_check_item_startvals_() \ - assert(ffestc_statelet_ == FFESTC_stateletATTRIB_ \ - || ffestc_statelet_ == FFESTC_stateletITEM_); \ - ffestc_statelet_ = FFESTC_stateletITEMVALS_ -#define ffestc_check_item_value_() \ - assert(ffestc_statelet_ == FFESTC_stateletITEMVALS_) -#define ffestc_check_item_endvals_() \ - assert(ffestc_statelet_ == FFESTC_stateletITEMVALS_); \ - ffestc_statelet_ = FFESTC_stateletITEM_ -#define ffestc_check_finish_() \ - assert(ffestc_statelet_ == FFESTC_stateletATTRIB_ \ - || ffestc_statelet_ == FFESTC_stateletITEM_); \ - ffestc_statelet_ = FFESTC_stateletSIMPLE_ -#define ffestc_order_action_() ffestc_order_exec_() -#define ffestc_shriek_if_lost_ ffestc_shriek_if_ - -/* ffestc_establish_declinfo_ -- Determine specific type/params info for entity - - ffestc_establish_declinfo_(kind,kind_token,len,len_token); - - Must be called after _declstmt_ called to establish base type. */ - -static void -ffestc_establish_declinfo_ (ffebld kind, ffelexToken kindt, ffebld len, - ffelexToken lent) -{ - ffeinfoBasictype bt = ffestc_local_.decl.basic_type; - ffeinfoKindtype kt; - ffetargetCharacterSize val; - - if (kindt == NULL) - kt = ffestc_local_.decl.stmt_kind_type; - else if (!ffestc_local_.decl.per_var_kind_ok) - { - ffebad_start (FFEBAD_KINDTYPE); - ffebad_here (0, ffelex_token_where_line (kindt), - ffelex_token_where_column (kindt)); - ffebad_here (1, ffelex_token_where_line (ffesta_tokens[0]), - ffelex_token_where_column (ffesta_tokens[0])); - ffebad_finish (); - kt = ffestc_local_.decl.stmt_kind_type; - } - else - { - if (kind == NULL) - { - assert (ffelex_token_type (kindt) == FFELEX_typeNUMBER); - val = atol (ffelex_token_text (kindt)); - kt = ffestc_kindtype_star_ (bt, val); - } - else if (ffebld_op (kind) == FFEBLD_opANY) - kt = ffestc_local_.decl.stmt_kind_type; - else - { - assert (ffebld_op (kind) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (kind)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (kind)) - == FFEINFO_kindtypeINTEGERDEFAULT); - val = ffebld_constant_integerdefault (ffebld_conter (kind)); - kt = ffestc_kindtype_kind_ (bt, val); - } - - if (kt == FFEINFO_kindtypeNONE) - { /* Not valid kind type. */ - ffebad_start (FFEBAD_KINDTYPE); - ffebad_here (0, ffelex_token_where_line (kindt), - ffelex_token_where_column (kindt)); - ffebad_here (1, ffelex_token_where_line (ffesta_tokens[0]), - ffelex_token_where_column (ffesta_tokens[0])); - ffebad_finish (); - kt = ffestc_local_.decl.stmt_kind_type; - } - } - - ffestc_local_.decl.kind_type = kt; - - /* Now check length specification for CHARACTER data type. */ - - if (((len == NULL) && (lent == NULL)) - || (bt != FFEINFO_basictypeCHARACTER)) - val = ffestc_local_.decl.stmt_size; - else - { - if (len == NULL) - { - assert (ffelex_token_type (lent) == FFELEX_typeNUMBER); - val = atol (ffelex_token_text (lent)); - } - else if (ffebld_op (len) == FFEBLD_opSTAR) - val = FFETARGET_charactersizeNONE; - else if (ffebld_op (len) == FFEBLD_opANY) - val = FFETARGET_charactersizeNONE; - else - { - assert (ffebld_op (len) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (len)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (len)) - == FFEINFO_kindtypeINTEGERDEFAULT); - val = ffebld_constant_integerdefault (ffebld_conter (len)); - } - } - - if ((val == 0) && !(0 && ffe_is_90 ())) - { - val = 1; - ffebad_start (FFEBAD_ZERO_SIZE); - ffebad_here (0, ffelex_token_where_line (lent), ffelex_token_where_column (lent)); - ffebad_finish (); - } - ffestc_local_.decl.size = val; -} - -/* ffestc_establish_declstmt_ -- Establish host-specific type/params info - - ffestc_establish_declstmt_(type,type_token,kind,kind_token,len, - len_token); */ - -static void -ffestc_establish_declstmt_ (ffestpType type, ffelexToken typet, ffebld kind, - ffelexToken kindt, ffebld len, ffelexToken lent) -{ - ffeinfoBasictype bt; - ffeinfoKindtype ktd; /* Default kindtype. */ - ffeinfoKindtype kt; - ffetargetCharacterSize val; - bool per_var_kind_ok = TRUE; - - /* Determine basictype and default kindtype. */ - - switch (type) - { - case FFESTP_typeINTEGER: - bt = FFEINFO_basictypeINTEGER; - ktd = FFEINFO_kindtypeINTEGERDEFAULT; - break; - - case FFESTP_typeBYTE: - bt = FFEINFO_basictypeINTEGER; - ktd = FFEINFO_kindtypeINTEGER2; - break; - - case FFESTP_typeWORD: - bt = FFEINFO_basictypeINTEGER; - ktd = FFEINFO_kindtypeINTEGER3; - break; - - case FFESTP_typeREAL: - bt = FFEINFO_basictypeREAL; - ktd = FFEINFO_kindtypeREALDEFAULT; - break; - - case FFESTP_typeCOMPLEX: - bt = FFEINFO_basictypeCOMPLEX; - ktd = FFEINFO_kindtypeREALDEFAULT; - break; - - case FFESTP_typeLOGICAL: - bt = FFEINFO_basictypeLOGICAL; - ktd = FFEINFO_kindtypeLOGICALDEFAULT; - break; - - case FFESTP_typeCHARACTER: - bt = FFEINFO_basictypeCHARACTER; - ktd = FFEINFO_kindtypeCHARACTERDEFAULT; - break; - - case FFESTP_typeDBLPRCSN: - bt = FFEINFO_basictypeREAL; - ktd = FFEINFO_kindtypeREALDOUBLE; - per_var_kind_ok = FALSE; - break; - - case FFESTP_typeDBLCMPLX: - bt = FFEINFO_basictypeCOMPLEX; -#if FFETARGET_okCOMPLEX2 - ktd = FFEINFO_kindtypeREALDOUBLE; -#else - ktd = FFEINFO_kindtypeREALDEFAULT; - ffebad_start (FFEBAD_BAD_DBLCMPLX); - ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]), - ffelex_token_where_column (ffesta_tokens[0])); - ffebad_finish (); -#endif - per_var_kind_ok = FALSE; - break; - - default: - assert ("Unexpected type (F90 TYPE?)!" == NULL); - bt = FFEINFO_basictypeNONE; - ktd = FFEINFO_kindtypeNONE; - break; - } - - if (kindt == NULL) - kt = ktd; - else - { /* Not necessarily default kind type. */ - if (kind == NULL) - { /* Shouldn't happen for CHARACTER. */ - assert (ffelex_token_type (kindt) == FFELEX_typeNUMBER); - val = atol (ffelex_token_text (kindt)); - kt = ffestc_kindtype_star_ (bt, val); - } - else if (ffebld_op (kind) == FFEBLD_opANY) - kt = ktd; - else - { - assert (ffebld_op (kind) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (kind)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (kind)) - == FFEINFO_kindtypeINTEGERDEFAULT); - val = ffebld_constant_integerdefault (ffebld_conter (kind)); - kt = ffestc_kindtype_kind_ (bt, val); - } - - if (kt == FFEINFO_kindtypeNONE) - { /* Not valid kind type. */ - ffebad_start (FFEBAD_KINDTYPE); - ffebad_here (0, ffelex_token_where_line (kindt), - ffelex_token_where_column (kindt)); - ffebad_here (1, ffelex_token_where_line (typet), - ffelex_token_where_column (typet)); - ffebad_finish (); - kt = ktd; - } - } - - ffestc_local_.decl.basic_type = bt; - ffestc_local_.decl.stmt_kind_type = kt; - ffestc_local_.decl.per_var_kind_ok = per_var_kind_ok; - - /* Now check length specification for CHARACTER data type. */ - - if (((len == NULL) && (lent == NULL)) - || (type != FFESTP_typeCHARACTER)) - val = (type == FFESTP_typeCHARACTER) ? 1 : FFETARGET_charactersizeNONE; - else - { - if (len == NULL) - { - assert (ffelex_token_type (lent) == FFELEX_typeNUMBER); - val = atol (ffelex_token_text (lent)); - } - else if (ffebld_op (len) == FFEBLD_opSTAR) - val = FFETARGET_charactersizeNONE; - else if (ffebld_op (len) == FFEBLD_opANY) - val = FFETARGET_charactersizeNONE; - else - { - assert (ffebld_op (len) == FFEBLD_opCONTER); - assert (ffeinfo_basictype (ffebld_info (len)) - == FFEINFO_basictypeINTEGER); - assert (ffeinfo_kindtype (ffebld_info (len)) - == FFEINFO_kindtypeINTEGERDEFAULT); - val = ffebld_constant_integerdefault (ffebld_conter (len)); - } - } - - if ((val == 0) && !(0 && ffe_is_90 ())) - { - val = 1; - ffebad_start (FFEBAD_ZERO_SIZE); - ffebad_here (0, ffelex_token_where_line (lent), ffelex_token_where_column (lent)); - ffebad_finish (); - } - ffestc_local_.decl.stmt_size = val; -} - -/* ffestc_establish_impletter_ -- Establish type/params for IMPLICIT letter(s) - - ffestc_establish_impletter_(first_letter_token,last_letter_token); */ - -static void -ffestc_establish_impletter_ (ffelexToken first, ffelexToken last) -{ - bool ok = FALSE; /* Stays FALSE if first letter > last. */ - char c; - - if (last == NULL) - ok = ffeimplic_establish_initial (c = *(ffelex_token_text (first)), - ffestc_local_.decl.basic_type, - ffestc_local_.decl.kind_type, - ffestc_local_.decl.size); - else - { - for (c = *(ffelex_token_text (first)); - c <= *(ffelex_token_text (last)); - c++) - { - ok = ffeimplic_establish_initial (c, - ffestc_local_.decl.basic_type, - ffestc_local_.decl.kind_type, - ffestc_local_.decl.size); - if (!ok) - break; - } - } - - if (!ok) - { - char cs[2]; - - cs[0] = c; - cs[1] = '\0'; - - ffebad_start (FFEBAD_BAD_IMPLICIT); - ffebad_here (0, ffelex_token_where_line (first), ffelex_token_where_column (first)); - ffebad_string (cs); - ffebad_finish (); - } -} - -/* ffestc_init_3 -- Initialize ffestc for new program unit - - ffestc_init_3(); */ - -void -ffestc_init_3 (void) -{ - ffestv_save_state_ = FFESTV_savestateNONE; - ffestc_entry_num_ = 0; - ffestv_num_label_defines_ = 0; -} - -/* ffestc_init_4 -- Initialize ffestc for new scoping unit - - ffestc_init_4(); - - For SUBROUTINEs/FUNCTIONs within INTERFACE/END INTERFACE, derived-TYPE- - defs, and statement function defs. */ - -void -ffestc_init_4 (void) -{ - ffestc_saved_entry_num_ = ffestc_entry_num_; - ffestc_entry_num_ = 0; -} - -/* ffestc_kindtype_kind_ -- Determine kindtype from basictype and KIND= value - - ffeinfoKindtype kt; - ffeinfoBasictype bt; - ffetargetCharacterSize val; - kt = ffestc_kindtype_kind_(bt,val); - if (kt == FFEINFO_kindtypeNONE) - // unsupported/invalid KIND= value for type */ - -static ffeinfoKindtype -ffestc_kindtype_kind_ (ffeinfoBasictype bt, ffetargetCharacterSize val) -{ - ffetype type; - ffetype base_type; - ffeinfoKindtype kt; - - base_type = ffeinfo_type (bt, 1); /* ~~ */ - assert (base_type != NULL); - - type = ffetype_lookup_kind (base_type, (int) val); - if (type == NULL) - return FFEINFO_kindtypeNONE; - - for (kt = 1; kt < FFEINFO_kindtype; ++kt) - if (ffeinfo_type (bt, kt) == type) - return kt; - - return FFEINFO_kindtypeNONE; -} - -/* ffestc_kindtype_star_ -- Determine kindtype from basictype and * value - - ffeinfoKindtype kt; - ffeinfoBasictype bt; - ffetargetCharacterSize val; - kt = ffestc_kindtype_star_(bt,val); - if (kt == FFEINFO_kindtypeNONE) - // unsupported/invalid * value for type */ - -static ffeinfoKindtype -ffestc_kindtype_star_ (ffeinfoBasictype bt, ffetargetCharacterSize val) -{ - ffetype type; - ffetype base_type; - ffeinfoKindtype kt; - - base_type = ffeinfo_type (bt, 1); /* ~~ */ - assert (base_type != NULL); - - type = ffetype_lookup_star (base_type, (int) val); - if (type == NULL) - return FFEINFO_kindtypeNONE; - - for (kt = 1; kt < FFEINFO_kindtype; ++kt) - if (ffeinfo_type (bt, kt) == type) - return kt; - - return FFEINFO_kindtypeNONE; -} - -/* Define label as usable for anything without complaint. */ - -static void -ffestc_labeldef_any_ (void) -{ - if ((ffesta_label_token == NULL) - || !ffestc_labeldef_begin_ ()) - return; - - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffestc_labeldef_branch_end_ (); -} - -/* ffestc_labeldef_begin_ -- Define label as unknown, initially - - ffestc_labeldef_begin_(); */ - -static bool -ffestc_labeldef_begin_ (void) -{ - ffelabValue label_value; - ffelab label; - - label_value = (ffelabValue) atol (ffelex_token_text (ffesta_label_token)); - if ((label_value == 0) || (label_value > FFELAB_valueMAX)) - { - ffebad_start (FFEBAD_LABEL_NUMBER_INVALID); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - } - - label = ffelab_find (label_value); - if (label == NULL) - { - label = ffestc_label_ = ffelab_new (label_value); - ffestv_num_label_defines_++; - ffelab_set_definition_line (label, - ffewhere_line_use (ffelex_token_where_line (ffesta_label_token))); - ffelab_set_definition_column (label, - ffewhere_column_use (ffelex_token_where_column (ffesta_label_token))); - - return TRUE; - } - - if (ffewhere_line_is_unknown (ffelab_definition_line (label))) - { - ffestv_num_label_defines_++; - ffestc_label_ = label; - ffelab_set_definition_line (label, - ffewhere_line_use (ffelex_token_where_line (ffesta_label_token))); - ffelab_set_definition_column (label, - ffewhere_column_use (ffelex_token_where_column (ffesta_label_token))); - - return TRUE; - } - - ffebad_start (FFEBAD_LABEL_ALREADY_DEFINED); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_definition_line (label), - ffelab_definition_column (label)); - ffebad_string (ffelex_token_text (ffesta_label_token)); - ffebad_finish (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; - return FALSE; -} - -/* ffestc_labeldef_branch_begin_ -- Define label as a branch target one - - ffestc_labeldef_branch_begin_(); */ - -static void -ffestc_labeldef_branch_begin_ (void) -{ - if ((ffesta_label_token == NULL) - || (ffestc_shriek_after1_ != NULL) - || !ffestc_labeldef_begin_ ()) - return; - - switch (ffelab_type (ffestc_label_)) - { - case FFELAB_typeUNKNOWN: - case FFELAB_typeASSIGNABLE: - ffelab_set_type (ffestc_label_, FFELAB_typeNOTLOOP); - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_stack_top ())); - ffestd_labeldef_branch (ffestc_label_); - break; - - case FFELAB_typeNOTLOOP: - if (ffelab_blocknum (ffestc_label_) - < ffestw_blocknum (ffestw_stack_top ())) - { - ffebad_start (FFEBAD_LABEL_BLOCK); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - } - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_stack_top ())); - ffestd_labeldef_branch (ffestc_label_); - break; - - case FFELAB_typeLOOPEND: - if ((ffestw_state (ffestw_stack_top ()) != FFESTV_stateDO) - || (ffestw_label (ffestw_stack_top ()) != ffestc_label_)) - { /* Unterminated block. */ - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_DO_BLOCK_END); - ffebad_here (0, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_here (1, ffestw_line (ffestw_stack_top ()), ffestw_col (ffestw_stack_top ())); - ffebad_here (2, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - break; - } - ffestd_labeldef_branch (ffestc_label_); - /* Leave something around for _branch_end_() to handle. */ - return; - - case FFELAB_typeFORMAT: - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - break; - - default: - assert ("bad label" == NULL); - /* Fall through. */ - case FFELAB_typeANY: - break; - } - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* Define possible end of labeled-DO-loop. Call only after calling - ffestc_labeldef_branch_begin_, or when other branch_* functions - recognize that a label might also be serving as a branch end (in - which case they must issue a diagnostic). */ - -static void -ffestc_labeldef_branch_end_ (void) -{ - if (ffesta_label_token == NULL) - return; - - assert (ffestc_label_ != NULL); - assert ((ffelab_type (ffestc_label_) == FFELAB_typeLOOPEND) - || (ffelab_type (ffestc_label_) == FFELAB_typeANY)); - - while ((ffestw_state (ffestw_stack_top ()) == FFESTV_stateDO) - && (ffestw_label (ffestw_stack_top ()) == ffestc_label_)) - ffestc_shriek_do_ (TRUE); - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* ffestc_labeldef_endif_ -- Define label as an END IF one - - ffestc_labeldef_endif_(); */ - -static void -ffestc_labeldef_endif_ (void) -{ - if ((ffesta_label_token == NULL) - || (ffestc_shriek_after1_ != NULL) - || !ffestc_labeldef_begin_ ()) - return; - - switch (ffelab_type (ffestc_label_)) - { - case FFELAB_typeUNKNOWN: - case FFELAB_typeASSIGNABLE: - ffelab_set_type (ffestc_label_, FFELAB_typeENDIF); - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_previous (ffestw_stack_top ()))); - ffestd_labeldef_endif (ffestc_label_); - break; - - case FFELAB_typeNOTLOOP: - if (ffelab_blocknum (ffestc_label_) - < ffestw_blocknum (ffestw_previous (ffestw_stack_top ()))) - { - ffebad_start (FFEBAD_LABEL_BLOCK); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - } - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_previous (ffestw_stack_top ()))); - ffestd_labeldef_endif (ffestc_label_); - break; - - case FFELAB_typeLOOPEND: - if ((ffestw_state (ffestw_stack_top ()) != FFESTV_stateDO) - || (ffestw_label (ffestw_stack_top ()) != ffestc_label_)) - { /* Unterminated block. */ - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_DO_BLOCK_END); - ffebad_here (0, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_here (1, ffestw_line (ffestw_stack_top ()), ffestw_col (ffestw_stack_top ())); - ffebad_here (2, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - break; - } - ffestd_labeldef_endif (ffestc_label_); - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_finish (); - ffestc_labeldef_branch_end_ (); - return; - - case FFELAB_typeFORMAT: - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - break; - - default: - assert ("bad label" == NULL); - /* Fall through. */ - case FFELAB_typeANY: - break; - } - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* ffestc_labeldef_format_ -- Define label as a FORMAT one - - ffestc_labeldef_format_(); */ - -static void -ffestc_labeldef_format_ (void) -{ - if ((ffesta_label_token == NULL) - || (ffestc_shriek_after1_ != NULL)) - { - ffebad_start (FFEBAD_FORMAT_NO_LABEL_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_tokens[0]), - ffelex_token_where_column (ffesta_tokens[0])); - ffebad_finish (); - return; - } - - if (!ffestc_labeldef_begin_ ()) - return; - - switch (ffelab_type (ffestc_label_)) - { - case FFELAB_typeUNKNOWN: - case FFELAB_typeASSIGNABLE: - ffelab_set_type (ffestc_label_, FFELAB_typeFORMAT); - ffestd_labeldef_format (ffestc_label_); - break; - - case FFELAB_typeFORMAT: - ffestd_labeldef_format (ffestc_label_); - break; - - case FFELAB_typeLOOPEND: - if ((ffestw_state (ffestw_stack_top ()) != FFESTV_stateDO) - || (ffestw_label (ffestw_stack_top ()) != ffestc_label_)) - { /* Unterminated block. */ - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_DO_BLOCK_END); - ffebad_here (0, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_here (1, ffestw_line (ffestw_stack_top ()), ffestw_col (ffestw_stack_top ())); - ffebad_here (2, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - break; - } - ffestd_labeldef_format (ffestc_label_); - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_finish (); - ffestc_labeldef_branch_end_ (); - return; - - case FFELAB_typeNOTLOOP: - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - break; - - default: - assert ("bad label" == NULL); - /* Fall through. */ - case FFELAB_typeANY: - break; - } - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* ffestc_labeldef_invalid_ -- Label definition invalid, complain if present - - ffestc_labeldef_invalid_(); */ - -static void -ffestc_labeldef_invalid_ (void) -{ - if ((ffesta_label_token == NULL) - || (ffestc_shriek_after1_ != NULL) - || !ffestc_labeldef_begin_ ()) - return; - - ffebad_start (FFEBAD_INVALID_LABEL_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* Define label as a non-loop-ending one on a statement that can't - be in the "then" part of a logical IF, such as a block-IF statement. */ - -static void -ffestc_labeldef_notloop_ (void) -{ - if (ffesta_label_token == NULL) - return; - - assert (ffestc_shriek_after1_ == NULL); - - if (!ffestc_labeldef_begin_ ()) - return; - - switch (ffelab_type (ffestc_label_)) - { - case FFELAB_typeUNKNOWN: - case FFELAB_typeASSIGNABLE: - ffelab_set_type (ffestc_label_, FFELAB_typeNOTLOOP); - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_stack_top ())); - ffestd_labeldef_notloop (ffestc_label_); - break; - - case FFELAB_typeNOTLOOP: - if (ffelab_blocknum (ffestc_label_) - < ffestw_blocknum (ffestw_stack_top ())) - { - ffebad_start (FFEBAD_LABEL_BLOCK); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - } - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_stack_top ())); - ffestd_labeldef_notloop (ffestc_label_); - break; - - case FFELAB_typeLOOPEND: - if ((ffestw_state (ffestw_stack_top ()) != FFESTV_stateDO) - || (ffestw_label (ffestw_stack_top ()) != ffestc_label_)) - { /* Unterminated block. */ - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_DO_BLOCK_END); - ffebad_here (0, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_here (1, ffestw_line (ffestw_stack_top ()), ffestw_col (ffestw_stack_top ())); - ffebad_here (2, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - break; - } - ffestd_labeldef_notloop (ffestc_label_); - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_finish (); - ffestc_labeldef_branch_end_ (); - return; - - case FFELAB_typeFORMAT: - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - break; - - default: - assert ("bad label" == NULL); - /* Fall through. */ - case FFELAB_typeANY: - break; - } - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* Define label as a non-loop-ending one. Use this when it is - possible that the pending label is inhibited because we're in - the midst of a logical-IF, and thus _branch_end_ is going to - be called after the current statement to resolve a potential - loop-ending label. */ - -static void -ffestc_labeldef_notloop_begin_ (void) -{ - if ((ffesta_label_token == NULL) - || (ffestc_shriek_after1_ != NULL) - || !ffestc_labeldef_begin_ ()) - return; - - switch (ffelab_type (ffestc_label_)) - { - case FFELAB_typeUNKNOWN: - case FFELAB_typeASSIGNABLE: - ffelab_set_type (ffestc_label_, FFELAB_typeNOTLOOP); - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_stack_top ())); - ffestd_labeldef_notloop (ffestc_label_); - break; - - case FFELAB_typeNOTLOOP: - if (ffelab_blocknum (ffestc_label_) - < ffestw_blocknum (ffestw_stack_top ())) - { - ffebad_start (FFEBAD_LABEL_BLOCK); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - } - ffelab_set_blocknum (ffestc_label_, - ffestw_blocknum (ffestw_stack_top ())); - ffestd_labeldef_notloop (ffestc_label_); - break; - - case FFELAB_typeLOOPEND: - if ((ffestw_state (ffestw_stack_top ()) != FFESTV_stateDO) - || (ffestw_label (ffestw_stack_top ()) != ffestc_label_)) - { /* Unterminated block. */ - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_DO_BLOCK_END); - ffebad_here (0, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_here (1, ffestw_line (ffestw_stack_top ()), ffestw_col (ffestw_stack_top ())); - ffebad_here (2, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - break; - } - ffestd_labeldef_branch (ffestc_label_); - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_finish (); - return; - - case FFELAB_typeFORMAT: - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - break; - - default: - assert ("bad label" == NULL); - /* Fall through. */ - case FFELAB_typeANY: - break; - } - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* ffestc_labeldef_useless_ -- Define label as a useless one - - ffestc_labeldef_useless_(); */ - -static void -ffestc_labeldef_useless_ (void) -{ - if ((ffesta_label_token == NULL) - || (ffestc_shriek_after1_ != NULL) - || !ffestc_labeldef_begin_ ()) - return; - - switch (ffelab_type (ffestc_label_)) - { - case FFELAB_typeUNKNOWN: - ffelab_set_type (ffestc_label_, FFELAB_typeUSELESS); - ffestd_labeldef_useless (ffestc_label_); - break; - - case FFELAB_typeLOOPEND: - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - if ((ffestw_state (ffestw_stack_top ()) != FFESTV_stateDO) - || (ffestw_label (ffestw_stack_top ()) != ffestc_label_)) - { /* Unterminated block. */ - ffebad_start (FFEBAD_LABEL_DO_BLOCK_END); - ffebad_here (0, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_here (1, ffestw_line (ffestw_stack_top ()), ffestw_col (ffestw_stack_top ())); - ffebad_here (2, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_finish (); - break; - } - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_doref_line (ffestc_label_), - ffelab_doref_column (ffestc_label_)); - ffebad_finish (); - ffestc_labeldef_branch_end_ (); - return; - - case FFELAB_typeASSIGNABLE: - case FFELAB_typeFORMAT: - case FFELAB_typeNOTLOOP: - ffelab_set_type (ffestc_label_, FFELAB_typeANY); - ffestd_labeldef_any (ffestc_label_); - - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelex_token_where_line (ffesta_label_token), - ffelex_token_where_column (ffesta_label_token)); - ffebad_here (1, ffelab_firstref_line (ffestc_label_), - ffelab_firstref_column (ffestc_label_)); - ffebad_finish (); - break; - - default: - assert ("bad label" == NULL); - /* Fall through. */ - case FFELAB_typeANY: - break; - } - - ffestc_try_shriek_do_ (); - - ffelex_token_kill (ffesta_label_token); - ffesta_label_token = NULL; -} - -/* ffestc_labelref_is_assignable_ -- Reference to label in ASSIGN stmt - - if (ffestc_labelref_is_assignable_(label_token,&label)) - // label ref is ok, label is filled in with ffelab object */ - -static bool -ffestc_labelref_is_assignable_ (ffelexToken label_token, ffelab *x_label) -{ - ffelab label; - ffelabValue label_value; - - label_value = (ffelabValue) atol (ffelex_token_text (label_token)); - if ((label_value == 0) || (label_value > FFELAB_valueMAX)) - { - ffebad_start (FFEBAD_LABEL_NUMBER_INVALID); - ffebad_here (0, ffelex_token_where_line (label_token), - ffelex_token_where_column (label_token)); - ffebad_finish (); - return FALSE; - } - - label = ffelab_find (label_value); - if (label == NULL) - { - label = ffelab_new (label_value); - ffelab_set_firstref_line (label, - ffewhere_line_use (ffelex_token_where_line (label_token))); - ffelab_set_firstref_column (label, - ffewhere_column_use (ffelex_token_where_column (label_token))); - } - - switch (ffelab_type (label)) - { - case FFELAB_typeUNKNOWN: - ffelab_set_type (label, FFELAB_typeASSIGNABLE); - break; - - case FFELAB_typeASSIGNABLE: - case FFELAB_typeLOOPEND: - case FFELAB_typeFORMAT: - case FFELAB_typeNOTLOOP: - case FFELAB_typeENDIF: - break; - - case FFELAB_typeUSELESS: - ffelab_set_type (label, FFELAB_typeANY); - ffestd_labeldef_any (label); - - ffebad_start (FFEBAD_LABEL_USE_DEF); - ffebad_here (0, ffelab_firstref_line (label), ffelab_firstref_column (label)); - ffebad_here (1, ffelex_token_where_line (label_token), - ffelex_token_where_column (label_token)); - ffebad_finish (); - - ffestc_try_shriek_do_ (); - - return FALSE; - - default: - assert ("bad label" == NULL); - /* Fall through. */ - case FFELAB_typeANY: - break; - } - - *x_label = label; - return TRUE; -} - -/* ffestc_labelref_is_branch_ -- Reference to label in branch stmt - - if (ffestc_labelref_is_branch_(label_token,&label)) - // label ref is ok, label is filled in with ffelab object */ - -static bool -ffestc_labelref_is_branch_ (ffelexToken label_token, ffelab *x_label) -{ - ffelab label; - ffelabValue label_value; - ffestw block; - unsigned long blocknum; - - label_value = (ffelabValue) atol (ffelex_token_text (label_token)); - if ((label_value == 0) || (label_value > FFELAB_valueMAX)) - { - ffebad_start (FFEBAD_LABEL_NUMBER_INVALID); - ffebad_here (0, ffelex_token_where_line (label_token), - ffelex_token_where_column (label_token)); - ffebad_finish (); - return FALSE; - } - - label = ffelab_find (label_value); - if (label == NULL) - { - label = ffelab_new (label_value); - ffelab_set_firstref_line (label, - ffewhere_line_use (ffelex_token_where_line (label_token))); - ffelab_set_firstref_column (label, - ffewhere_column_use (ffelex_token_where_column (label_token))); - } - - switch (ffelab_type (label)) - { - case FFELAB_typeUNKNOWN: - case FFELAB_typeASSIGNABLE: - ffelab_set_type (label, FFELAB_typeNOTLOOP); - ffelab_set_blocknum (label, ffestw_blocknum (ffestw_stack_top ())); - break; - - case FFELAB_typeLOOPEND: - if (ffelab_blocknum (label) != 0) - break; /* Already taken care of. */ - for (block = ffestw_top_do (ffestw_stack_top ()); - (block != NULL) && (ffestw_label (block) != label); - block = ffestw_top_do (ffestw_previous (block))) - ; /* Find most recent DO